From 1128c200e2e408cd292262bde6e280822f012c22 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Sat, 6 Apr 2024 12:14:20 -0300 Subject: [PATCH 001/151] rewrite func_hud_800915FC --- src/engine/fox_hud.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/engine/fox_hud.c b/src/engine/fox_hud.c index 2db59f19..178bc597 100644 --- a/src/engine/fox_hud.c +++ b/src/engine/fox_hud.c @@ -4156,7 +4156,7 @@ bool func_hud_800915FC(Actor* actor) { Vec3f vec; Boss* boss; Object_58* obj58; - s32 ret = false; + bool ret = false; Math_Vec3fFromAngles(&vec, 0.0f, actor->unk_0F4.y, 650.0f + actor->fwork[9] * 10.0f); @@ -4200,19 +4200,12 @@ bool func_hud_800915FC(Actor* actor) { y = 280.0f; } - while (true) { - if (fabsf(boss->obj.pos.x - (actor->obj.pos.x + vec.x)) > 1000.0f) { - break; - } - if (fabsf(boss->obj.pos.z - (actor->obj.pos.z + vec.z)) > 1000.0f) { - break; - } - if (fabsf(boss->obj.pos.y - (actor->obj.pos.y)) > y) { - break; - } + if (!(fabsf(boss->obj.pos.x - (actor->obj.pos.x + vec.x)) > 1000.0f) && + !(fabsf(boss->obj.pos.z - (actor->obj.pos.z + vec.z)) > 1000.0f) && + !(fabsf(boss->obj.pos.y - (actor->obj.pos.y)) > y)) { ret = true; - break; } + return ret; } From d777ce991729fe3c495023beab75470c47bffaf5 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Sat, 6 Apr 2024 12:35:39 -0300 Subject: [PATCH 002/151] SectorZ_Missile_Update rename --- include/i4.h | 2 +- linker_scripts/us/symbol_addrs_overlays.txt | 2 +- src/engine/fox_360.c | 2 +- src/overlays/ovl_i4/fox_sz.c | 35 +++++++++++---------- 4 files changed, 21 insertions(+), 20 deletions(-) diff --git a/include/i4.h b/include/i4.h index 1034e586..17756715 100644 --- a/include/i4.h +++ b/include/i4.h @@ -30,7 +30,7 @@ void Katina_Boss316_Init(Boss *); void Katina_80198594(Actor*); void Katina_80198930(void); void SectorZ_80199900(Actor *, s32); -void SectorZ_80199C60(Actor*); +void SectorZ_Missile_Update(Actor*); void SectorZ_8019AB8C(Actor*); void SectorZ_8019EA68(void); diff --git a/linker_scripts/us/symbol_addrs_overlays.txt b/linker_scripts/us/symbol_addrs_overlays.txt index 26f3c499..bbf1054b 100644 --- a/linker_scripts/us/symbol_addrs_overlays.txt +++ b/linker_scripts/us/symbol_addrs_overlays.txt @@ -156,7 +156,7 @@ D_i3_801C27A0 = 0x801C27A0; //segment:ovl_i3 size:0x20 Katina_80198594 = 0x80198594;//segment:ovl_i4 Katina_Boss316_Init = 0x80193CA4;//segment:ovl_i4 -SectorZ_80199C60 = 0x80199C60;//segment:ovl_i4 +SectorZ_Missile_Update = 0x80199C60;//segment:ovl_i4 SectorZ_80199900 = 0x80199900;//segment:ovl_i4 D_i4_801A03C0 = 0x801A03C0;//segment:ovl_i4 D_BO_8019EE80 = 0x8019EE80;//segment:ovl_i4 diff --git a/src/engine/fox_360.c b/src/engine/fox_360.c index 9dbdfa93..ed76eff4 100644 --- a/src/engine/fox_360.c +++ b/src/engine/fox_360.c @@ -1379,7 +1379,7 @@ void ActorAllRange_Update(Actor* this) { sp104 = 2; break; case 5: - SectorZ_80199C60(this); + SectorZ_Missile_Update(this); sp104 = 1; break; case 0: diff --git a/src/overlays/ovl_i4/fox_sz.c b/src/overlays/ovl_i4/fox_sz.c index c588e9b3..1b5cb5bb 100644 --- a/src/overlays/ovl_i4/fox_sz.c +++ b/src/overlays/ovl_i4/fox_sz.c @@ -107,7 +107,7 @@ typedef enum { // https://decomp.me/scratch/7td7r #ifdef NON_MATCHING -void SectorZ_80199C60(Actor* missile) { +void SectorZ_Missile_Update(Actor* this) { f32 xDist; f32 yDist; f32 zDist; @@ -115,7 +115,7 @@ void SectorZ_80199C60(Actor* missile) { f32 y; s32 pad; - switch (++missile->iwork[9]) { + switch (++this->iwork[9]) { case 600: Radio_PlayMessage(gMsg_ID_16080, RCID_ROB64); break; @@ -130,31 +130,31 @@ void SectorZ_80199C60(Actor* missile) { } /* Distance between the Great Fox and the missile */ - xDist = gBosses[0].obj.pos.x - missile->obj.pos.x; - zDist = gBosses[0].obj.pos.z - missile->obj.pos.z; + xDist = gBosses[0].obj.pos.x - this->obj.pos.x; + zDist = gBosses[0].obj.pos.z - this->obj.pos.z; SIN_DEG(gGameFrameCount); // WTF if (xDist) {} if (zDist) {} - if (missile->aiType < AI360_GREAT_FOX) { - xDist = SIN_DEG((missile->index * 45) + gGameFrameCount) * 5000.0f; - zDist = COS_DEG((missile->index * 45) + (gGameFrameCount * 2)) * 5000.0f; + if (this->aiType < AI360_GREAT_FOX) { + xDist = SIN_DEG((this->index * 45) + gGameFrameCount) * 5000.0f; + zDist = COS_DEG((this->index * 45) + (gGameFrameCount * 2)) * 5000.0f; } else { zDist = 0.0f; xDist = 0.0f; } - missile->fwork[MISSILE_TARGET_X] = (gBosses[0].obj.pos.x + xDist) + 400.0f; - missile->fwork[MISSILE_TARGET_Y] = (gBosses[0].obj.pos.y + zDist) + 100.0f; - missile->fwork[MISSILE_TARGET_Z] = gBosses[0].obj.pos.z; - missile->fwork[3] = 1.4f; + this->fwork[MISSILE_TARGET_X] = (gBosses[0].obj.pos.x + xDist) + 400.0f; + this->fwork[MISSILE_TARGET_Y] = (gBosses[0].obj.pos.y + zDist) + 100.0f; + this->fwork[MISSILE_TARGET_Z] = gBosses[0].obj.pos.z; + this->fwork[3] = 1.4f; - if (((fabsf(missile->fwork[MISSILE_TARGET_X] - missile->obj.pos.x) < 800.0f) && - (fabsf(missile->fwork[MISSILE_TARGET_Y] - missile->obj.pos.y) < 800.0f)) && - (fabsf(missile->fwork[MISSILE_TARGET_Z] - missile->obj.pos.z) < 800.0f)) { - SectorZ_80199900(missile, 0); + if (((fabsf(this->fwork[MISSILE_TARGET_X] - this->obj.pos.x) < 800.0f) && + (fabsf(this->fwork[MISSILE_TARGET_Y] - this->obj.pos.y) < 800.0f)) && + (fabsf(this->fwork[MISSILE_TARGET_Z] - this->obj.pos.z) < 800.0f)) { + SectorZ_80199900(this, 0); gCameraShake = 25; gBosses[0].dmgType = DMG_UNK_100; if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_5)) { @@ -164,7 +164,8 @@ void SectorZ_80199C60(Actor* missile) { return; } } - if (((fabsf(missile->fwork[MISSILE_TARGET_Z] - missile->obj.pos.z) < 2000.0f) && + + if (((fabsf(this->fwork[MISSILE_TARGET_Z] - this->obj.pos.z) < 2000.0f) && (((gPlayer[0].camEye.z < 0.0f) || (D_edisplay_801615D0.y < 0.0f)) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_10))) && (((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_10)) || @@ -175,7 +176,7 @@ void SectorZ_80199C60(Actor* missile) { } } #else -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i4/fox_sz/SectorZ_80199C60.s") +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i4/fox_sz/SectorZ_Missile_Update.s") #endif void SectorZ_80199FCC(Actor* actor, s32 arg1) { From 5c59226db41a3a2f707e1ac2a773511954093533 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Sun, 7 Apr 2024 00:37:21 -0300 Subject: [PATCH 003/151] fix fake --- src/overlays/ovl_i4/fox_bo.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/overlays/ovl_i4/fox_bo.c b/src/overlays/ovl_i4/fox_bo.c index 73ea0119..30a74efd 100644 --- a/src/overlays/ovl_i4/fox_bo.c +++ b/src/overlays/ovl_i4/fox_bo.c @@ -467,9 +467,6 @@ s32 Bolse_8018CCE8(Actor* actor) { var_v0 = 0; - x = gActors[i].obj.pos.x; - z = gActors[i].obj.pos.z; - for (i = 0; i < 4; i += 2) { if (i != 0) { x = gActors[i].obj.pos.x; From f2c5292e7b5331d7428b21841d4e814dafdfc1a8 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Sun, 7 Apr 2024 01:05:58 -0300 Subject: [PATCH 004/151] fix fakes --- src/engine/fox_enmy.c | 10 +++++++--- src/engine/fox_play.c | 5 ++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/engine/fox_enmy.c b/src/engine/fox_enmy.c index 938296e4..ac05bc6f 100644 --- a/src/engine/fox_enmy.c +++ b/src/engine/fox_enmy.c @@ -729,8 +729,8 @@ bool func_enmy_8006326C(Vec3f* arg0, Vec3f* arg1, ObjectId objId, Object* obj) { Vec3f sp50; Vec3f sp44; s32 colId; - s32 pad1[3]; - f32 sp30; + s32 pad1[2]; + f32 sp30[2]; s32 pad2; sp74.x = arg0->x - obj->pos.x; @@ -764,7 +764,7 @@ bool func_enmy_8006326C(Vec3f* arg0, Vec3f* arg1, ObjectId objId, Object* obj) { } else if (objId == OBJ_BOSS_313) { colId = COL1_8; } - if (func_col1_800998FC(&sp5C, &sp50, arg1, colId, &sp44, &sp30) > 0) { + if (func_col1_800998FC(&sp5C, &sp50, arg1, colId, &sp44, sp30) > 0) { return true; } } else { @@ -2798,14 +2798,18 @@ void TexturedLine_Update(TexturedLine* texLine) { if (texLine->timer != 0) { texLine->timer--; } + sp34 = texLine->unk_04.x - texLine->unk_10.x; sp30 = texLine->unk_04.y - texLine->unk_10.y; sp2C = texLine->unk_04.z - texLine->unk_10.z; + texLine->unk_20 = Math_Atan2F(sp34, sp2C); texLine->unk_1C = -Math_Atan2F(sp30, sqrtf(SQ(sp34) + SQ(sp2C))); + if (texLine->mode != 4) { texLine->unk_24 = sqrtf(SQ(sp34) + SQ(sp30) + SQ(sp2C)); } + if (gGameState == GSTATE_PLAY) { if (((texLine->mode == 1) || (texLine->mode == 101) || (texLine->mode == 50)) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) && (gPlayer[0].unk_1F4 == 0)) { diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index eb9ba85b..1b168aba 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -1191,8 +1191,7 @@ bool func_play_800A8054(ObjectId objId, f32 arg1, f32 arg2, f32 arg3, f32 arg4, Vec3f sp54; Vec3f sp48; Vec3f sp3C; - f32 pad1; - f32 sp34; + f32 sp34[2]; s32 colId; s32 useCol2; @@ -1361,7 +1360,7 @@ bool func_play_800A8054(ObjectId objId, f32 arg1, f32 arg2, f32 arg3, f32 arg4, } if (!useCol2) { - if (func_col1_800998FC(&sp54, &sp48, arg8, colId, &sp3C, &sp34) > 0) { + if (func_col1_800998FC(&sp54, &sp48, arg8, colId, &sp3C, sp34) > 0) { return true; } } else { From b8278dd1d72ad8c44657d27a005b79c3d81a89e5 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Sun, 7 Apr 2024 10:53:00 -0300 Subject: [PATCH 005/151] Add scratches in the repo for remaining functions in audio_symthesis --- src/audio/audio_synthesis.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/audio/audio_synthesis.c b/src/audio/audio_synthesis.c index 44042134..ebd3f6af 100644 --- a/src/audio/audio_synthesis.c +++ b/src/audio/audio_synthesis.c @@ -159,6 +159,7 @@ void func_80008364(f32* buffer0, f32* buffer1, s32 length, f32* buffer2) { } } +// https://decomp.me/scratch/8eyVg #ifdef NON_MATCHING void func_80008780(f32* arg0, s32 arg1, f32* arg2) { s32 length; @@ -364,6 +365,7 @@ void func_80008780(f32* arg0, s32 arg1, f32* arg2) { #pragma GLOBAL_ASM("asm/us/nonmatchings/audio/audio_synthesis/func_80008780.s") #endif +// https://decomp.me/scratch/mYlns #ifdef NON_MATCHING void func_80009124(s16** arg0) { s16* var_a1; @@ -787,6 +789,7 @@ Acmd* func_8000A25C(s16* aiBuf, s32 aiBufLen, Acmd* aList, s32 updateIndex) { return aList; } +// https://decomp.me/scratch/RgX4r #ifdef NON_MATCHING Acmd* func_8000A700(s32 noteIndex, NoteSubEu* noteSub, NoteSynthesisState* synthState, s16* aiBuf, s32 aiBufLen, Acmd* aList, s32 updateIndex) { From 2d3e940f26fd5b37b1823e96cd971834cb1ab0eb Mon Sep 17 00:00:00 2001 From: inspectredc <78732756+inspectredc@users.noreply.github.com> Date: Sun, 7 Apr 2024 18:10:58 +0100 Subject: [PATCH 006/151] Match Area6_8018C54C (#201) * Match Area6_8018C54C * can remove if now rest is matching * just use if 1 --- src/overlays/ovl_i3/fox_a6.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/overlays/ovl_i3/fox_a6.c b/src/overlays/ovl_i3/fox_a6.c index d1976d8b..77f9685f 100644 --- a/src/overlays/ovl_i3/fox_a6.c +++ b/src/overlays/ovl_i3/fox_a6.c @@ -1781,9 +1781,6 @@ void Area6_8018C0D0(f32* arg0, f32 arg1, Vec3f* arg2, f32 arg3, s32 arg4) { Matrix_Pop(&gGfxMatrix); } -#ifdef NON_MATCHING -// weirdness on setting spAC.x to 0.0f and in loading bossA6 near the fakeness -// https://decomp.me/scratch/mwrs8 void Area6_8018C54C(Boss* bossA6) { Vec3f spD0[30]; Vec3f spC4; @@ -1804,10 +1801,12 @@ void Area6_8018C54C(Boss* bossA6) { Animation_GetFrameData(&D_A6_6018994, 0, spD0); if (D_i3_801C22F0.unk_24 != 255.0f) { RCP_SetupDL(&gMasterDisp, 0x47); - spAC.x = 0.0f; gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) D_i3_801C22F0.unk_24); + spAC.x = 0.0f; if ((gSysFrameCount & 1) == 0) { + spAC.x = 1.0f; + if (1) {} spAC.x = 0.0f; } spAC.y = spAC.z = 0.0f; @@ -1855,7 +1854,7 @@ void Area6_8018C54C(Boss* bossA6) { bossA6->swork[A6_SWK_27 + i]--; if (bossA6->swork[A6_SWK_27 + i] <= 0) { bossA6->swork[A6_SWK_18 + i] = 4; - bossA6->swork[A6_SWK_38 + i] = 1; + bossA6->swork[A6_SWK_38] = 1; bossA6->fwork[A6_FWK_10 + i] = bossA6->fwork[A6_FWK_19 + i] = bossA6->fwork[A6_FWK_13 + i] = bossA6->fwork[A6_FWK_22 + i] = 0.0f; bossA6->fwork[A6_FWK_25 + i] = -90.0f; @@ -1973,10 +1972,6 @@ void Area6_8018C54C(Boss* bossA6) { Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 74.0f, 1); } } -#else -void Area6_8018C54C(Boss* bossA6); -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/fox_a6/Area6_8018C54C.s") -#endif void Area6_8018D3CC(s32 arg0, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 xRot, f32 yRot, f32 zRot) { From b4ca33057e05e750d59bc12ab8911e094c14e6fc Mon Sep 17 00:00:00 2001 From: inspectredc <78732756+inspectredc@users.noreply.github.com> Date: Sun, 7 Apr 2024 21:41:16 +0100 Subject: [PATCH 007/151] Match Aquas_801B6FF8 (#202) --- src/overlays/ovl_i3/fox_aq.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/src/overlays/ovl_i3/fox_aq.c b/src/overlays/ovl_i3/fox_aq.c index a590f5ce..2d6948c2 100644 --- a/src/overlays/ovl_i3/fox_aq.c +++ b/src/overlays/ovl_i3/fox_aq.c @@ -3961,20 +3961,15 @@ void Aquas_801B6E54(Actor* actor) { } // OBJ_ACTOR_262 action -#ifdef NON_MATCHING -// reloads 0.0f for temp_fs2_2. -// https://decomp.me/scratch/02s9H - void Aquas_801B6FF8(Actor* actor) { s32 i; f32 temp_dx; f32 temp_dy; f32 temp_dz; - f32 temp_fs2_2; + s32 pad; f32 spA8; Vec3f sp9C; Vec3f sp90; - f32 var_fs0; if (actor->health == -100) { actor->itemDrop = DROP_SILVER_RING_50p; @@ -4015,15 +4010,15 @@ void Aquas_801B6FF8(Actor* actor) { temp_dy = actor->fwork[2] - actor->obj.pos.y; temp_dz = actor->fwork[3] - actor->obj.pos.z; spA8 = Math_RadToDeg(Math_Atan2F(temp_dx, temp_dz)); - var_fs0 = Math_RadToDeg(-Math_Atan2F(temp_dy, sqrtf(SQ(temp_dx) + SQ(temp_dz)))); - temp_fs2_2 = Math_SmoothStepToAngle(&actor->obj.rot.y, spA8, 0.1f, 1.0f, 0.0f); - Math_SmoothStepToAngle(&actor->obj.rot.x, var_fs0, 0.1f, 1.0f, 0.0f); + temp_dz = Math_RadToDeg(-Math_Atan2F(temp_dy, sqrtf(SQ(temp_dx) + SQ(temp_dz)))); + temp_dy = Math_SmoothStepToAngle(&actor->obj.rot.y, spA8, 0.1f, 1.0f, 0); + Math_SmoothStepToAngle(&actor->obj.rot.x, temp_dz, 0.1f, 1.0f, 0); - var_fs0 = 340.0f; - if (temp_fs2_2 < 0.0f) { - var_fs0 = 20.0f; + temp_dz = 340.0f; + if (temp_dy < 0.0f) { + temp_dz = 20.0f; } - Math_SmoothStepToAngle(&actor->obj.rot.z, var_fs0, 0.1f, 1.0f, 0.f); + Math_SmoothStepToAngle(&actor->obj.rot.z, temp_dz, 0.1f, 1.0f, 0.f); Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1); sp9C.x = sp9C.y = 0.0f; @@ -4075,9 +4070,6 @@ void Aquas_801B6FF8(Actor* actor) { } } } -#else -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/fox_aq/Aquas_801B6FF8.s") -#endif bool Aquas_801B76EC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); From f8cceb5f1d8f35b76e047889c3688bf0af46821e Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Sun, 7 Apr 2024 18:42:58 -0300 Subject: [PATCH 008/151] fix wrong symbol use --- src/engine/fox_edata_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/fox_edata_info.c b/src/engine/fox_edata_info.c index 3a2f8611..4e3626af 100644 --- a/src/engine/fox_edata_info.c +++ b/src/engine/fox_edata_info.c @@ -243,7 +243,7 @@ ObjectInfo D_edata_800CC124[0x190] = { /* OBJ_80_148 */ {(void*) D_FO_60079B0, 0, (ObjectFunc) NULL, D_FO_600FF80, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_80_149 */ {(void*) D_FO_6007D80, 0, (ObjectFunc) NULL, D_FO_600FFA0, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_80_150 */ {(void*) D_FO_6006310, 0, (ObjectFunc) NULL, D_FO_600FFC0, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_151 */ {(void*) D_TI_60066E0, 0, (ObjectFunc) NULL, D_FO_600FEB8, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_80_151 */ {(void*) D_FO_60066E0, 0, (ObjectFunc) NULL, D_FO_600FEB8, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_80_152 */ {(void*) D_BO_600F4C0, 0, (ObjectFunc) NULL, D_BO_6011C10, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_80_153 */ {(void*) D_BO_600B8B0, 0, (ObjectFunc) NULL, D_BO_6011C48, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_80_154 */ {(void*) D_KA_600BAF0, 0, (ObjectFunc) NULL, D_KA_601115C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, From ccfd4e8159e8f09bd756a7f33c315a0c243a3619 Mon Sep 17 00:00:00 2001 From: inspectredc <78732756+inspectredc@users.noreply.github.com> Date: Sun, 7 Apr 2024 22:50:23 +0100 Subject: [PATCH 009/151] Match Aquas_801B638C (#203) --- src/overlays/ovl_i3/fox_aq.c | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/src/overlays/ovl_i3/fox_aq.c b/src/overlays/ovl_i3/fox_aq.c index 2d6948c2..79c187bc 100644 --- a/src/overlays/ovl_i3/fox_aq.c +++ b/src/overlays/ovl_i3/fox_aq.c @@ -3777,9 +3777,7 @@ void Aquas_801B6344(Actor* actor) { actor->iwork[14] = actor->iwork[16] = actor->obj.rot.z; } -#ifdef NON_MATCHING -// The big spherical angle calculation has a reg swap. -// https://decomp.me/scratch/DLrGN +// OBJ_ACTOR_259 action void Aquas_801B638C(Actor* actor) { Actor* var_v0; s32 i; @@ -3790,7 +3788,6 @@ void Aquas_801B638C(Actor* actor) { f32 temp_fsc; f32 temp2; f32 temp_dx; - f32 sp98; Vec3f sp8C; Vec3f sp80; @@ -3880,8 +3877,6 @@ void Aquas_801B638C(Actor* actor) { } } } - // temp_dx = actor->obj.pos.x - actor->fwork[15]; - // temp_dz = actor->obj.pos.z - actor->fwork[16]; sp98 = sqrtf(SQ(actor->obj.pos.z - actor->fwork[16]) + SQ(actor->obj.pos.x - actor->fwork[15])); actor->fwork[13] -= 20.0f; actor->fwork[14] += 5.0f; @@ -3889,17 +3884,16 @@ void Aquas_801B638C(Actor* actor) { temp_fsc = COS_DEG(actor->fwork[14]) * sp98 * 0.8f; temp_fscc = COS_DEG(actor->obj.rot.y) * temp_fsc; temp2 = -SIN_DEG(actor->obj.rot.y) * temp_fsc; - temp_ryr = Math_Atan2F(actor->obj.pos.x - actor->fwork[15] + temp_fscc, - actor->obj.pos.z - actor->fwork[16] + temp2); - temp_fscc = actor->obj.pos.y - spB4; - var_rxd = -Math_Atan2F(temp_fscc, sp98); - temp_ryr = Math_RadToDeg(temp_ryr); - Math_SmoothStepToAngle(&actor->obj.rot.y, temp_ryr, 0.1f, 100.0f, 0.001f); - var_rxd = Math_RadToDeg(var_rxd); + temp_fscc = Math_Atan2F(actor->obj.pos.x - actor->fwork[15] + temp_fscc, + actor->obj.pos.z - actor->fwork[16] + temp2); + temp_fsc = -Math_Atan2F(actor->obj.pos.y - spB4, sp98); + temp_fscc = Math_RadToDeg(temp_fscc); + Math_SmoothStepToAngle(&actor->obj.rot.y, temp_fscc, 0.1f, 100.0f, 0.001f); + temp_fscc = Math_RadToDeg(temp_fsc); if (actor->obj.pos.y >= 1000.0f) { - var_rxd = 0.0f; + temp_fscc = 0.0f; } - Math_SmoothStepToAngle(&actor->obj.rot.x, var_rxd, 0.1f, 100.0f, 0.001f); + Math_SmoothStepToAngle(&actor->obj.rot.x, temp_fscc, 0.1f, 100.0f, 0.001f); Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1); sp8C.x = sp8C.y = 0.0f; @@ -3936,10 +3930,6 @@ void Aquas_801B638C(Actor* actor) { } } } -#else -// OBJ_ACTOR_259 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/fox_aq/Aquas_801B638C.s") -#endif void Aquas_801B6E54(Actor* actor) { s32 i; From f6fc05afd3e3f54b2764a861909ec1a5dc296815 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Sun, 7 Apr 2024 18:52:11 -0300 Subject: [PATCH 010/151] fix wrong symbol use --- src/engine/fox_edata_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/fox_edata_info.c b/src/engine/fox_edata_info.c index 4e3626af..65dd7bd0 100644 --- a/src/engine/fox_edata_info.c +++ b/src/engine/fox_edata_info.c @@ -145,7 +145,7 @@ ObjectInfo D_edata_800CC124[0x190] = { /* OBJ_80_50, */ {(void*) D_VE1_6007410, 0, (ObjectFunc) NULL, D_VE1_601B518, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_80_51, */ {(void*) D_VE1_6006F50, 0, (ObjectFunc) NULL, D_VE1_601B584, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_80_52, */ {(void*) D_VE1_6005780, 0, (ObjectFunc) Venom1_80193540, D_VE1_601B5F4, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_53, */ {(void*) D_AQ_6003610, 0, (ObjectFunc) NULL, D_VE1_601B644, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_80_53, */ {(void*) D_VE1_6003610, 0, (ObjectFunc) NULL, D_VE1_601B644, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_80_54, */ {(void*) D_CO_6000E00, 0, (ObjectFunc) Obj54_Update, D_CO_603E0EC, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_80_55, */ {(void*) D_CO_6013B50, 0, (ObjectFunc) NULL, D_CO_603E88C, 1000.0f, 0, 0, 41, 0, 0.0f, 0 }, /* OBJ_80_56, */ {(void*) Corneria_8018F31C, 2, (ObjectFunc) Corneria_8018F044, D_CO_603E8A8, 1000.0f, 0, 0, 39, 0, 0.0f, 0 }, From be0d328b4e649be60bf03249bed6fd271bf0693a Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Mon, 8 Apr 2024 00:05:42 -0300 Subject: [PATCH 011/151] avoid ub in func_play_800B79B0 & comment --- src/engine/fox_play.c | 3 + src/overlays/ovl_i3/fox_aq.c | 485 ++++++++++++++++++++++++++++++++--- 2 files changed, 454 insertions(+), 34 deletions(-) diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index 1b168aba..ded040cf 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -6233,6 +6233,9 @@ void func_play_800B79B0(void) { sp3A = 0; } else { var_v0_2 = 0; +#ifdef AVOID_UB + sp3A = 0; +#endif } if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) && !(gGameFrameCount & var_v0_2)) { diff --git a/src/overlays/ovl_i3/fox_aq.c b/src/overlays/ovl_i3/fox_aq.c index 79c187bc..6566f9ef 100644 --- a/src/overlays/ovl_i3/fox_aq.c +++ b/src/overlays/ovl_i3/fox_aq.c @@ -8,7 +8,7 @@ #include "assets/ast_blue_marine.h" #include "assets/ast_aquas.h" -const char D_i3_801C1A30[] = "プレイヤーのすべてをクリア \n"; +const char D_i3_801C1A30[] = "プレイヤーのすべてをクリア \n"; // Clear of all players const char D_i3_801C1A50[] = "i %d\n"; typedef enum { @@ -318,6 +318,7 @@ void Aquas_801A8E30(void) { sp64[i] = RAND_FLOAT_CENTERED(70.0f); } } + for (i = 0; i < 34; i++) { j = (sp5C[i].v.ob[2] + 200) / 25; sp58[i].v.ob[0] = sp5C[i].v.ob[0] + spA8[j]; @@ -401,6 +402,7 @@ void Aquas_801A95C8(void) { Math_SmoothStepToF(&gPlayer[0].camEye.x, gCsCamEyeX, 0.1f, 50.0f, 0.0001f); Math_SmoothStepToF(&gPlayer[0].camEye.y, gCsCamEyeY, 0.1f, 50.0f, 0.0001f); Math_SmoothStepToF(&gPlayer[0].camEye.z, gCsCamEyeZ, 0.1f, 50.0f, 0.0001f); + Math_SmoothStepToF(&gPlayer[0].camAt.x, gCsCamAtX, 0.1f, 50.0f, 0.0001f); Math_SmoothStepToF(&gPlayer[0].camAt.y, gCsCamAtY, 0.1f, 50.0f, 0.0001f); Math_SmoothStepToF(&gPlayer[0].camAt.z, gCsCamAtZ, 0.1f, 50.0f, 0.0001f); @@ -434,6 +436,7 @@ void Aquas_801A9824(void) { s32* var_v0_3; gTeamShields[1] = gTeamShields[2] = gTeamShields[3] = 255; + for (i = 0; i < ARRAY_COUNT(D_i3_801C4190); i++) { D_i3_801C4190[i] = 0; } @@ -449,6 +452,7 @@ void Aquas_801A9824(void) { for (i = 0; i < ARRAY_COUNT(D_i3_801C4308); i++) { D_i3_801C4308[i] = 0; } + D_i3_801C4458 = D_i3_801C445C = 0.0f; D_i3_801C4450 = D_i3_801C4454 = 0; D_i3_801C41B8[12] = 40.0f; @@ -457,6 +461,7 @@ void Aquas_801A9824(void) { D_i3_801C41B8[15] = 20.0f; D_i3_801C41B8[16] = 30.0f; D_i3_801C41B8[17] = 50.0f; + if (D_ctx_80177CA0 != 0) { D_i3_801C41B8[12] = 0.0f; D_i3_801C41B8[13] = 3.0f; @@ -465,6 +470,7 @@ void Aquas_801A9824(void) { D_i3_801C41B8[16] = 0.0f; D_i3_801C41B8[17] = 0.0f; } + D_i3_801C4190[5] = 0; D_i3_801C41B8[25] = D_bg_8015F970; D_i3_801C41B8[26] = 128.0f; @@ -475,10 +481,12 @@ void Aquas_801A99D4(Player* player) { Math_SmoothStepToF(&D_bg_8015F970, D_i3_801C41B8[25], 1.0f, 10.0f, 0.00001f); Math_SmoothStepToF(&D_AQ_801C4188, D_i3_801C41B8[26], 0.1f, 10.0f, 0.00001f); + if ((D_i3_801C4190[8] < sp24) && (D_i3_801C41B8[25] < 4600.0f)) { D_i3_801C4190[8] = sp24; D_i3_801C41B8[25] += 150.0f; D_i3_801C41B8[26] = D_AQ_801C4188 - 6.0f; + if (D_i3_801C41B8[26] < 0.0f) { D_i3_801C41B8[26] = 0.0f; } @@ -509,9 +517,11 @@ void Aquas_801A99D4(Player* player) { if (D_i3_801C41B8[17] < 0.0f) { D_i3_801C41B8[17] = 0.0f; } + gLight1R = D_i3_801C41B8[12]; gLight1G = D_i3_801C41B8[13]; gLight1B = D_i3_801C41B8[14]; + gAmbientR = D_i3_801C41B8[15]; gAmbientG = D_i3_801C41B8[16]; gAmbientB = D_i3_801C41B8[17]; @@ -526,12 +536,11 @@ void Aquas_801A9C98(Player* player) { if ((D_i3_801C4190[0] != 777) && (D_i3_801C4190[0] > 0)) { i = D_i3_801C4190[0] - 1; actor = &gActors[i]; + if ((actor->obj.status != OBJ_ACTIVE) || ((player->unk_138 - 300.0f) <= actor->obj.pos.z) || (actor->obj.pos.z <= (player->unk_138 - 7000.0f)) || (actor->obj.id != D_i3_801C4190[1]) || (actor->health == 0)) { - D_i3_801C4190[0] = D_i3_801C4190[3] = D_i3_801C4190[5] = - - D_i3_801C4190[1] = 0; + D_i3_801C4190[0] = D_i3_801C4190[3] = D_i3_801C4190[5] = D_i3_801C4190[1] = 0; } else { var_v0 = 1; if (actor->info.hitbox[1] == 200000.0f) { @@ -576,10 +585,13 @@ void Aquas_801A9ED0(Player* player) { Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8) * M_DTOR, 0); Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, 1); + sp70.x = 0.0f; sp70.y = 0.0f; sp70.z = -1200.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp70, &sp64); + if (D_i3_801C4190[3] == 0) { sp8C = D_i3_801C4190[4]; @@ -593,6 +605,7 @@ void Aquas_801A9ED0(Player* player) { temp_fa0 = gBosses[0].obj.pos.y + tempy[0] - tempy[1] - 200.0f; temp_fv1 = gBosses[0].obj.pos.x + tempy[2] + tempy[3] + 200.0f; temp_fa1 = gBosses[0].obj.pos.x + tempy[2] - tempy[3] - 200.0f; + if ((gBosses[0].state >= 10) && ((player->pos.y + sp64.y) <= temp_fv0) && (temp_fa0 <= (player->pos.y + sp64.y)) && ((player->pos.x + sp64.x) <= temp_fv1) && (temp_fa1 <= (player->pos.x + sp64.x))) { @@ -635,12 +648,15 @@ void Aquas_801AA20C(void) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); var_fs1 = -10.0f; var_fs2 = 10.0f; + if (D_i3_801C4190[0] != 0) { var_fs1 = var_fs2 = 0.0f; } + Matrix_Translate(gGfxMatrix, D_i3_801C41B8[0] + var_fs1, D_i3_801C41B8[1] + var_fs2, D_i3_801C41B8[2] + gPlayer[0].unk_144, 1); Matrix_Scale(gGfxMatrix, D_i3_801C41B8[5], D_i3_801C41B8[5], D_i3_801C41B8[5], 1); + for (i = 0; i < 4; i++) { Matrix_RotateZ(gGfxMatrix, M_PI / 2, 1); Matrix_Translate(gGfxMatrix, var_fs1, var_fs2, 0.0f, 1); @@ -677,6 +693,7 @@ void Aquas_801AA4BC(Player* player) { Math_SmoothStepToF(&player->wings.unk_10, 70.0f, 0.3f, 100.0f, 0); } } + if ((gInputHold->button & R_TRIG) && !(gInputHold->button & Z_TRIG)) { sp3C = -90.0f; sp38 = 0.2f; @@ -687,8 +704,10 @@ void Aquas_801AA4BC(Player* player) { Math_SmoothStepToF(&player->wings.unk_10, -70.0f, 0.3f, 100.0f, 0); } } + Math_SmoothStepToF(&player->unk_12C, sp3C, sp38, 10.0f, 0); } + if ((gInputPress->button & Z_TRIG) && (player->unk_230 == 0)) { player->sfx.bank = 1; if (player->timer_1E0 != 0) { @@ -700,6 +719,7 @@ void Aquas_801AA4BC(Player* player) { player->timer_1E0 = 10; } } + if ((gInputPress->button & R_TRIG) && (player->unk_230 == 0)) { player->sfx.bank = 1; if (player->timer_1E4 != 0) { @@ -711,17 +731,22 @@ void Aquas_801AA4BC(Player* player) { player->timer_1E4 = 10; } } + Math_SmoothStepToF(&player->unk_150, 1.0f, 0.05f, 10.0f, 0.0001f); + player->unk_130 = Math_ModF(player->unk_130, 360.0f); + if (player->unk_280 > 0) { player->unk_280 -= 30; if (player->unk_280 <= 0) { player->unk_280 = 0; } } + if (player->unk_1DC == 0) { Math_SmoothStepToF(&player->unk_130, 0.0f, 0.1f, 10.0f, 0.00001f); } + if (player->timer_1E0 != 0) { player->timer_1E0--; } @@ -737,6 +762,7 @@ void Aquas_801AA4BC(Player* player) { if (player->timer_1E8 != 0) { player->timer_1E8--; } + if (player->unk_1DC != 0) { player->timer_1E0 = player->timer_1E4 = 0; player->unk_150 = 1.5f; @@ -770,12 +796,15 @@ void Aquas_801AA8E8(Player* player) { if (player->state_1C8 != PLAYERSTATE_1C8_3) { var_fv0 = var_fv1 = 0.0f; } + Math_SmoothStepToF(&player->unk_030, var_fv0, 0.05f, 1.0f, 0.05f); + if (player->pos.y < (gGroundLevel + 50.0f)) { Math_SmoothStepToF(&player->unk_02C, var_fv1 * 0.3f, 0.05f, 1.0f, 0.05f); } else { Math_SmoothStepToF(&player->unk_02C, var_fv1, 0.05f, 2.0f, 0.05f); } + gCsCamEyeX = (player->pos.x - player->unk_0AC) * (600.0f / player->unk_09C); gCsCamEyeX -= player->unk_030 * 1.5f; gCsCamEyeX += player->unk_0AC + D_i3_801C41B8[9]; @@ -790,19 +819,26 @@ void Aquas_801AA8E8(Player* player) { gCsCamAtY += player->unk_060 * 10.0f; gCsCamAtY -= player->unk_02C * -0.55f; gCsCamAtY += player->unk_0B0 + D_i3_801C41B8[10]; + if (gCsCamAtY < 20.0f) { gCsCamAtY = 20.0f; } + gCsCamEyeZ = 240.0f; gCsCamAtZ = player->unk_138 + (D_ctx_80177D20 - 1.0f); + Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, player->unk_014, 1000.0f, 0); Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, player->unk_014, 1000.0f, 0); Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, 0.2f, 30.0f, 0.0f); + Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, player->unk_014, 1000.0f, 0); Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, player->unk_014, 1000.0f, 0); Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, player->unk_014, 1000.0f, 0); + Math_SmoothStepToF(&player->unk_014, 1.0f, 1.0f, 0.05f, 0.0f); + temp = -player->unk_0EC; + Math_SmoothStepToF(&player->unk_034, temp * 0.3f, 0.1f, 1.5f, 0.0f); } @@ -823,14 +859,19 @@ void Aquas_801AACF8(Player* player) { Aquas_801AA4BC(player); Aquas_801A99D4(player); Aquas_801A8E30(); + sp64 = -gInputPress->stick_x; sp5C = gInputPress->stick_y; + D_ctx_80177970 = 0.68f; + Math_SmoothStepToF(&player->unk_180, sp64 * D_ctx_80177970, 1.0f, 10.0f, 0.0001f); + var_fa0 = fabsf(player->unk_180 * 0.5f); if (var_fa0 > 2.0f) { var_fa0 = 2.0f; } + if (player->unk_180 < 0.0f) { if (D_i3_801C41B8[3] > player->unk_180) { D_i3_801C41B8[3] -= var_fa0; @@ -840,9 +881,12 @@ void Aquas_801AACF8(Player* player) { D_i3_801C41B8[3] += var_fa0; } } + Math_SmoothStepToF(&D_i3_801C41B8[3], player->unk_180, 0.1f, 2.0f, 0.00001f); + sp60 = D_i3_801C41B8[3]; D_ctx_80177968 = 7.0f; + if ((player->pos.x < (-player->unk_09C + player->unk_0AC + 10.0f)) && (sp60 >= 20.0f)) { D_ctx_80177968 = 2.0f; Math_SmoothStepToF(&D_i3_801C41B8[9], 30.0f, 0.1f, 10.0f, 0.0001f); @@ -851,15 +895,20 @@ void Aquas_801AACF8(Player* player) { D_ctx_80177968 = 2.0f; Math_SmoothStepToF(&D_i3_801C41B8[9], -30.0f, 0.1f, 10.0f, 0.0001f); } + Math_SmoothStepToF(&player->unk_0E8, sp60, 0.3f, D_ctx_80177968, 0.00001f); + if (D_ctx_80177968 != 2.0f) { Math_SmoothStepToF(&D_i3_801C41B8[9], 0.0f, 0.1f, 20.0f, 0.0001f); } + Math_SmoothStepToF(&player->unk_17C, sp5C * D_ctx_80177970, 1.0f, 7.0f, 0.0001f); + var_fa1 = fabsf(player->unk_17C * 0.05f); if (var_fa1 > 2.0f) { var_fa1 = 2.0f; } + if (player->unk_17C * -1.0f < 0.0f) { if (D_i3_801C41B8[4] > player->unk_17C) { D_i3_801C41B8[4] -= var_fa1; @@ -869,9 +918,12 @@ void Aquas_801AACF8(Player* player) { D_i3_801C41B8[4] += var_fa1; } } + Math_SmoothStepToF(&D_i3_801C41B8[4], player->unk_17C * -1.0f, 0.1f, 3.0f, 0.00001f); + sp58 = D_i3_801C41B8[4] * 0.8f; D_ctx_80177968 = 10.0f; + if (player->pos.y < (gGroundLevel + 50.0f)) { if (sp58 <= 0.0f) { sp58 = 0.0f; @@ -884,6 +936,7 @@ void Aquas_801AACF8(Player* player) { } else { D_i3_801C4190[7] = 0; } + if ((player->unk_0A0 - 50.0f) <= player->pos.y) { if (sp58 >= 0.0f) { Math_SmoothStepToF(&D_i3_801C41B8[10], 30.0f, 1.0f, 1.0f, 0.00001f); @@ -891,30 +944,45 @@ void Aquas_801AACF8(Player* player) { } else { Math_SmoothStepToF(&D_i3_801C41B8[10], 0.0f, 0.1f, 1.0f, 0.00001f); } + Math_SmoothStepToF(&player->unk_0E4, sp58, 1.0f, D_ctx_80177968, 0.00001f); + var_fv1_2 = 2.0f; if (sp64 == 0.0f) { var_fv1_2 = 1.0f; } + Math_SmoothStepToF(&player->unk_0EC, player->unk_180 * 0.7f, 0.08f, var_fv1_2, 0.0001f); + player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; + Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, 0); Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), 1); + sp8C.x = sp8C.y = 0.0f; sp8C.z = player->unk_0D0; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp8C, &sp68); + sp68.x *= 1.4f; sp68.y *= 1.4f; + Matrix_RotateY(gCalcMatrix, player->unk_114 * M_DTOR, 0); Matrix_RotateX(gCalcMatrix, player->unk_120 * M_DTOR, 1); + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp68, &sp80); + sp8C.x = sp8C.y = 0.0f; sp8C.z = -player->unk_110; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp8C, &sp74); + player->vel.x = (sp80.x + sp74.x) * player->unk_150; player->vel.y = (sp80.y + sp74.y) * player->unk_150; player->vel.z = sp80.z + sp74.z; + player->pos.x += player->vel.x; + if (player->pos.x > player->unk_09C + player->unk_0AC) { player->pos.x = player->unk_09C + player->unk_0AC; player->vel.x = 0.0f; @@ -923,7 +991,9 @@ void Aquas_801AACF8(Player* player) { player->pos.x = player->unk_0AC - player->unk_09C; player->vel.x = 0.0f; } + player->pos.y += player->vel.y; + if (player->pos.y > player->unk_0A0) { player->pos.y = player->unk_0A0; player->vel.y = 0.0f; @@ -932,6 +1002,7 @@ void Aquas_801AACF8(Player* player) { player->pos.y = player->unk_0A4; player->vel.y = 0.0f; } + if (player->pos.x > (player->unk_0AC + (player->unk_09C - 100.0f))) { player->flags_228 = 1; } @@ -944,6 +1015,7 @@ void Aquas_801AACF8(Player* player) { if (player->pos.y <= (gGroundLevel + 100)) { player->flags_228 = 4; } + if (D_i3_801C4190[6] != 0) { player->unk_0D0 = 20.0f; Math_SmoothStepToF(&D_i3_801BFB60, -40.0f, 0.01f, 0.1f, 0.0f); @@ -952,6 +1024,7 @@ void Aquas_801AACF8(Player* player) { player->vel.z = 0.0f; } } + player->pos.z += player->vel.z; player->unk_138 = player->pos.z; player->unk_060 = SIN_DEG(player->unk_0F4 * 0.7f) * 0.5f; @@ -959,6 +1032,7 @@ void Aquas_801AACF8(Player* player) { player->unk_0F4 += 8.0f + D_i3_801C41B8[24]; player->unk_080 = -SIN_DEG(player->unk_088) * 0.5f; player->unk_0F0 = SIN_DEG(player->unk_0F4) * 1.5f; + if (player->pos.y < (D_ctx_80177CC0 + 50.0f)) { Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + player->unk_114) * M_DTOR, 0); Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, 1); @@ -1000,11 +1074,13 @@ void Aquas_801ABA40(PlayerShot* shot) { D_i3_801C41B8[21] = shot->obj.pos.x; D_i3_801C41B8[22] = shot->obj.pos.y; D_i3_801C41B8[23] = shot->obj.pos.z; + if ((fabsf(shot->obj.pos.z - (gPlayer[0].camEye.z - D_ctx_80177D20)) > 10000.0f) || (fabsf(shot->obj.pos.y - gPlayer[0].camEye.y) > 1500.0f) || ((fabsf(shot->obj.pos.x - gPlayer[0].camEye.x) > 4000.0f) && (shot->unk_5C != 0))) { shot->unk_64 = 0; } + if (shot->obj.pos.y < gGroundLevel) { shot->obj.pos.y = gGroundLevel + 2.0f; func_beam_800365E4(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.0f, 90.0f, 2.0f, 0, @@ -1023,7 +1099,9 @@ void Aquas_801ABA40(PlayerShot* shot) { if (!(gGameFrameCount & 1)) { func_beam_80035DEC(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z); } + func_beam_80038140(shot); + shot->unk_2C = (shot->obj.pos.y * 0.01f) + 1.2f; shot->unk_30 = (shot->obj.pos.y * 0.003f) + 0.6f; shot->unk_34 = (shot->obj.pos.y * 0.001f) + 0.6f; @@ -1031,6 +1109,7 @@ void Aquas_801ABA40(PlayerShot* shot) { if (shot->unk_58 < 30) { shot->unk_58 = 30; } + switch (shot->unk_5C) { case 0: shot->unk_64 = 50; @@ -1038,6 +1117,7 @@ void Aquas_801ABA40(PlayerShot* shot) { shot->obj.rot.x = gPlayer[0].unk_0E4; shot->unk_5C++; break; + case 1: if (D_i3_801C4190[3] != 0) { sp7C = shot->obj.pos.x - D_i3_801C41B8[0]; @@ -1057,12 +1137,14 @@ void Aquas_801ABA40(PlayerShot* shot) { shot->unk_64 = 10; } } + if (shot->unk_54 == 0) { shot->unk_54 = -30.0f; } if (!(gGameFrameCount & 3)) { Math_SmoothStepToF(&shot->unk_54, D_i3_801C4458, 0.1f, 50.0f, 0.0001f); } + Matrix_RotateY(gCalcMatrix, shot->obj.rot.y * M_DTOR, 0); Matrix_RotateX(gCalcMatrix, shot->obj.rot.x * M_DTOR, 1); sp60.x = sp60.y = 0.0f; @@ -1076,6 +1158,7 @@ void Aquas_801ABA40(PlayerShot* shot) { } break; } + if (D_i3_801C4454 < 297) { D_ctx_80178370 = shot->obj.pos.x; D_ctx_80178374 = shot->obj.pos.y; @@ -1085,6 +1168,7 @@ void Aquas_801ABA40(PlayerShot* shot) { D_ctx_80178368 = 150; Math_SmoothStepToF(&D_ctx_8017836C, 0.8f, 1.0f, 0.08f, 0.001f); } + if (D_i3_801C4454 != 0) { D_i3_801C4454--; } @@ -1141,35 +1225,43 @@ void Aquas_801AC274(Player* player) { D_i3_801C41B8[21] = D_i3_801C41B8[22] = D_i3_801C41B8[23] = 0.0f; D_i3_801C4190[5] = D_i3_801C4190[3] = 0; } + Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + player->unk_114) * M_DTOR, 0); Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, 1); + sp68.x = 0.0f; sp68.y = 0.0f; sp68.z = -1200.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp68, &sp5C); + D_i3_801C41B8[6] = player->pos.x + sp5C.x; D_i3_801C41B8[7] = player->pos.y + sp5C.y; D_i3_801C41B8[8] = player->unk_138 + sp5C.z; - if (D_i3_801C4190[3] == 0) { + if (D_i3_801C4190[3] == 0) { if (D_i3_801C4190[0] == 0) { D_i3_801C41B8[0] = player->pos.x + sp5C.x; D_i3_801C41B8[1] = player->pos.y + sp5C.y; D_i3_801C41B8[2] = player->unk_138 + sp5C.z; D_i3_801C41B8[5] = 3.0f; } + D_i3_801C41B8[11] = 10000.0f; temp = D_i3_801C4190[0]; + for (i = 0, actor = gActors; i < 60; i++, actor++) { if ((actor->obj.status == OBJ_ACTIVE) && (actor->obj.id != OBJ_ACTOR_189)) { var_v1 = 1; if (actor->info.hitbox[1] == HITBOX_TYPE_2) { var_v1 = 5; } + tempy1 = actor->obj.pos.y + actor->info.hitbox[var_v1 + 2] + actor->info.hitbox[var_v1 + 3] + 200.0f; tempy2 = actor->obj.pos.y + actor->info.hitbox[var_v1 + 2] - actor->info.hitbox[var_v1 + 3] - 200.0f; tempx1 = actor->obj.pos.x + actor->info.hitbox[var_v1 + 4] + actor->info.hitbox[var_v1 + 5] + 200.0f; tempx2 = actor->obj.pos.x + actor->info.hitbox[var_v1 + 4] - actor->info.hitbox[var_v1 + 5] - 200.0f; + if ((actor->health > 0) && (actor->timer_0C2 < 5) && (actor->obj.pos.z <= (player->unk_138 - 300.0f)) && ((player->unk_138 - 7000.0f) <= actor->obj.pos.z) && (player->pos.y + sp5C.y <= tempy1) && (tempy2 <= player->pos.y + sp5C.y) && (player->pos.x + sp5C.x <= tempx1) && @@ -1196,15 +1288,18 @@ void Aquas_801AC274(Player* player) { Aquas_801A9C98(player); Aquas_801A9DE4(player); } + if (gInputPress->button & A_BUTTON) { Aquas_801AC18C(player); } + if (gInputPress->button & B_BUTTON) { Aquas_801AC09C(player); if (D_i3_801C4190[0] != 0) { D_i3_801C4190[3] = 1; } } + if (D_i3_801C4190[5] == 0) { D_ctx_80178370 = player->pos.x; D_ctx_80178374 = player->pos.y - 5.0f; @@ -1263,6 +1358,7 @@ void Aquas_801AC918(Effect* effect) { if (effect->unk_46 != 0) { effect->unk_46--; } + switch (effect->state) { case 0: if (effect->vel.y < 5.0f) { @@ -1276,6 +1372,7 @@ void Aquas_801AC918(Effect* effect) { effect->vel.x = __cosf(gPlayer[0].unk_058) * temp_fs0; effect->vel.z = __sinf(gPlayer[0].unk_058) * temp_fs0; break; + case 1: if (effect->unk_46 == 0) { Object_Kill(&effect->obj, effect->sfxSource); @@ -1288,6 +1385,7 @@ void Aquas_801AC918(Effect* effect) { effect->vel.x = COS_DEG(effect->unk_60.y) * temp_fs0; effect->vel.z = -SIN_DEG(effect->unk_60.y) * temp_fs0; break; + case 2: if (effect->vel.y < 10.0f) { effect->vel.y += 0.2f; @@ -1341,23 +1439,28 @@ void Aquas_801ACE50(Player* player) { Vec3f sp48; player->sfx.boost = 0; + if (player->timer_27C != 0) { player->timer_27C--; player->unk_110 += 0.3f; Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + player->unk_114) * M_DTOR, 0); Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, 1); + sp54.x = sp54.y = 0.0f; sp54.z = 70.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48); Aquas_801AC8A8(player->pos.x + RAND_FLOAT_CENTERED(10.0f) + sp48.x, player->pos.y + RAND_FLOAT_CENTERED(10.0f) + sp48.y, player->unk_138 + RAND_FLOAT_CENTERED(10.0f) + (sp48.z * -1.0f), 0.4f, 1); Math_SmoothStepToF(&player->unk_08C, -130.0f, 0.1f, 10.0f, 0.00001f); + player->unk_130 -= player->unk_258; player->unk_258 += 0.2f; if (player->unk_258 > 50.0f) { player->unk_258 = 50.0f; } + if (!(gGameFrameCount & 1) && (gBlurAlpha > 64)) { gBlurAlpha -= 1; } @@ -1369,12 +1472,14 @@ void Aquas_801ACE50(Player* player) { gBlurAlpha = 255; } } + if (!(gBrakeButton[player->num] & gInputHold->button) && !(gBoostButton[player->num] & gInputHold->button)) { player->unk_2B4 = 1; if (player->unk_2BC == 0.0f) { player->unk_2B4 = 0; } } + if ((gBoostButton[player->num] & gInputHold->button) && (player->unk_230 == 0) && (player->state_1C8 != PLAYERSTATE_1C8_5) && (player->unk_2B4 == 0)) { if (player->unk_2BC == 0) { @@ -1441,7 +1546,9 @@ void Aquas_801AD328(Player* player) { player->unk_2B4 = 0; D_i3_801C41B8[28] = 0.0f; } + Math_SmoothStepToF(&D_i3_801C41B8[28], 0.0f, 1.0f, 1.0f, 0.0001f); + if (player->unk_110 < 0.0f) { player->unk_110 += 0.5f; if (player->unk_110 > 0.0f) { @@ -1457,6 +1564,7 @@ void Aquas_801AD598(Actor* actor) { s32 i; D_i3_801C27C0 = &D_i3_801C27C8[50 * actor->iwork[0]]; + for (i = 50 * actor->iwork[0]; i < 50 * actor->iwork[0] + 50; i++, D_i3_801C27C0++) { D_i3_801C27C0->pos.x = actor->obj.pos.x; D_i3_801C27C0->pos.y = actor->obj.pos.y; @@ -1478,7 +1586,7 @@ void Aquas_801AD688(Actor* actor) { // OBJ_ACTOR_255 action void Aquas_801AD6C0(Actor* actor) { - s32 var_v0; + s32 var_v0 = actor->iwork[2] - 1; f32 sp80; f32 sp7C; f32 sp78; @@ -1490,7 +1598,6 @@ void Aquas_801AD6C0(Actor* actor) { Vec3f sp50; Vec3f sp44; - var_v0 = actor->iwork[2] - 1; if ((D_i3_801C42A0[23] == 0) || (gActors[var_v0].state >= 4)) { actor->timer_0C2 = 30000; actor->state = 2; @@ -1498,13 +1605,17 @@ void Aquas_801AD6C0(Actor* actor) { actor->vel.x = 0.0f; actor->vel.z = 0.0f; } + if ((gPlayer[0].unk_138 + 500.0f) <= actor->obj.pos.z) { Object_Kill(&actor->obj, actor->sfxSource); } + actor->unk_04E++; + if (actor->unk_04E >= 50) { actor->unk_04E = 0; } + switch (actor->state) { case 0: if (actor->timer_0BC != 0) { @@ -1517,6 +1628,7 @@ void Aquas_801AD6C0(Actor* actor) { actor->state++; } break; + case 1: if (actor->unk_0D0 != 0) { if (actor->health > 0) { @@ -1534,6 +1646,7 @@ void Aquas_801AD6C0(Actor* actor) { } } } + if (actor->obj.pos.z <= (gPlayer[0].unk_138 - 200.0f)) { actor->fwork[7] = sp80 = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(100.0f) - actor->obj.pos.x; actor->fwork[8] = sp7C = gPlayer[0].pos.y - 30.0f - actor->obj.pos.y; @@ -1543,6 +1656,7 @@ void Aquas_801AD6C0(Actor* actor) { sp7C = actor->fwork[8]; sp78 = actor->fwork[9] + 600.0f; } + Math_RadToDeg(Math_Atan2F(sp80, sp78)); sp70 = sqrtf(SQ(sp80) + SQ(sp78)); Math_RadToDeg(-Math_Atan2F(sp7C, sp70)); @@ -1554,31 +1668,40 @@ void Aquas_801AD6C0(Actor* actor) { sp74 = COS_DEG(actor->fwork[1]) * sp70 * actor->fwork[6]; sp80 = COS_DEG(actor->unk_0F4.y) * sp74; sp78 = -SIN_DEG(actor->unk_0F4.y) * sp74; + if (sp7C < 20.0f) { sp7C = 20.0f; } + if ((Rand_ZeroOne() < 0.7) && (actor->obj.rot.z == 0.0f)) { actor->fwork[2] = 360.0f; } + Math_SmoothStepToF(&actor->unk_0F4.z, actor->fwork[2], 0.1f, 10.0f, 0.001f); + if (actor->unk_0F4.z >= 360.0f) { actor->unk_0F4.z = 0.0f; actor->fwork[2] = 0.0f; } + sp68 = Math_RadToDeg(Math_Atan2F(gPlayer[0].pos.x + sp80 + RAND_FLOAT_CENTERED(200.0f) - actor->obj.pos.x, gPlayer[0].unk_138 + sp78 - actor->obj.pos.z)); sp6C = Math_RadToDeg(-Math_Atan2F(gPlayer[0].pos.y - 30.0f + sp7C - actor->obj.pos.y, sp70)); + if (gPlayer[0].unk_138 <= actor->obj.pos.z) { sp68 = actor->unk_0F4.y; sp6C = actor->unk_0F4.x; } + Math_SmoothStepToAngle(&actor->unk_0F4.y, sp68, 1.0f, 5.0f, 0.001f); Math_SmoothStepToAngle(&actor->unk_0F4.x, sp6C, 1.0f, 5.0f, 0.001f); Matrix_RotateY(gCalcMatrix, actor->unk_0F4.y * M_DTOR, 0); Matrix_RotateX(gCalcMatrix, actor->unk_0F4.x * M_DTOR, 1); + sp5C.x = 0.0f; sp5C.y = 0.0f; sp5C.z = 40.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp5C, &sp50); sp5C.z = 10.0f + (actor->iwork[0] + 1) * RAND_FLOAT(10.0f); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp5C, &sp44); @@ -1586,6 +1709,7 @@ void Aquas_801AD6C0(Actor* actor) { actor->vel.y = sp50.y; actor->vel.z = sp44.z; break; + case 2: if (actor->timer_0C6 == 0) { actor->timer_0C6 = 15; @@ -1626,10 +1750,13 @@ void Aquas_801ADF7C(f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 zRot, s32 index) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, xPos, yPos, zPos + D_ctx_80177D20, 1); + Matrix_RotateY(gGfxMatrix, M_DTOR * yRot, 1); Matrix_RotateX(gGfxMatrix, M_DTOR * xRot, 1); Matrix_RotateZ(gGfxMatrix, M_DTOR * zRot, 1); + Graphics_SetScaleMtx(scale); + if (index < 2) { if (!flag) { RCP_SetupDL(&gMasterDisp, 0x39); @@ -1712,7 +1839,9 @@ void Aquas_801AE3D8(Actor* actor) { if (actor->obj.pos.y <= 347.0f) { actor->obj.pos.y = 347.0f; } + actor->scale = fabsf(D_i3_801C4308[10] / -28.0f) + 0.5f; + if (actor->scale > 1.3f) { actor->scale = 1.3f; } @@ -1725,6 +1854,7 @@ void Aquas_801AE3D8(Actor* actor) { actor->info.hitbox[10] = 116.0f; } } + if (actor->unk_0D0 != 0) { actor->unk_0D0 = 0; if ((fabsf(D_i3_801C4308[10]) >= 6.0f) && (gBosses[0].state >= 10) && @@ -1733,9 +1863,11 @@ void Aquas_801AE3D8(Actor* actor) { actor->iwork[1] = 0; D_i3_801C4308[79] -= 5.0f; AUDIO_PLAY_SFX(0x29036050, actor->sfxSource, 4); + if (D_i3_801C4308[79] <= -28.0f) { D_i3_801C4308[79] = -28.0f; } + if (D_i3_801C4308[10] <= -23.0f) { if (gBosses[0].timer_052 == 0) { gBosses[0].timer_052 = 72; @@ -1749,6 +1881,7 @@ void Aquas_801AE3D8(Actor* actor) { actor->iwork[1] = 0; actor->timer_0C6 = 0; } + if (gBosses[0].swork[AQ_SWK_0] == 0) { gBosses[0].swork[AQ_SWK_0] = 1; actor->info.hitbox[10] = 300.0f; @@ -1773,6 +1906,7 @@ void Aquas_801AE3D8(Actor* actor) { } } break; + case 1: if (!(gGameFrameCount & 1)) { func_effect_8007C120(actor->obj.pos.x, actor->fwork[0] + actor->obj.pos.y, actor->obj.pos.z, @@ -1781,11 +1915,13 @@ void Aquas_801AE3D8(Actor* actor) { actor->obj.pos.z + 200.0f, actor->vel.x, actor->vel.y, actor->vel.z, 0.1f, 10); actor->fwork[0] += 40.0f; } + if ((actor->fwork[2] * 400.0f) <= actor->fwork[0]) { actor->timer_0BC = 20; actor->state++; } break; + case 2: if (actor->timer_0BC == 0) { for (i = 0; i < 6; i++) { @@ -1798,6 +1934,7 @@ void Aquas_801AE3D8(Actor* actor) { actor->state++; } break; + case 3: if (actor->timer_0BC == 0) { Math_SmoothStepToF(&actor->fwork[3], 0.0f, 0.1f, 2.0f, 0); @@ -1806,11 +1943,16 @@ void Aquas_801AE3D8(Actor* actor) { func_effect_8007BC7C(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 50.0f); func_effect_8007BC7C(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 50.0f); func_effect_8007BC7C(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 50.0f); + Object_Kill(&actor->obj, actor->sfxSource); + D_i3_801C42A0[23]--; + gBosses[0].swork[AQ_SWK_0] = 3; gBosses[0].swork[AQ_SWK_19] = 30; + D_i3_801C4308[79] = 0.0f; + if (D_i3_801C42A0[23] == 0) { D_i3_801C4308[79] = -180.0f; for (i = 0; i < 60; i++) { @@ -1841,20 +1983,24 @@ void Aquas_801AEB44(Actor* actor) { actor->iwork[1]++; actor->iwork[1] %= 8; } + temp_v1_2 = SEGMENTED_TO_VIRTUAL(D_AQ_6019078); if (actor->iwork[1] < 4) { var_t5 = SEGMENTED_TO_VIRTUAL(D_AQ_6018C78); } else { var_t5 = SEGMENTED_TO_VIRTUAL(D_AQ_6018878); } + var_t1 = actor->iwork[1] % 4; if (var_t1 >= 3) { var_t1 = 4 - var_t1; } + var_fv0 = actor->timer_0C6 / 60.0f; if (var_fv0 < 0.1f) { var_fv0 = 0.1f; } + for (i = 0; i < 28; i += 1) { D_i3_801C3A88[actor->iwork[0]][gSysFrameCount % 2][i].n.ob[0] = temp_v1_2[i].v.ob[0] + (s16) ((((var_t5[i].n.ob[0] - temp_v1_2[i].n.ob[0]) * var_t1) / 2) * var_fv0); @@ -1875,6 +2021,7 @@ void Aquas_801AEB44(Actor* actor) { temp_v1_2[i].n.n[2] + (((var_t5[i].n.n[2] - temp_v1_2[i].n.n[2]) * var_t1) / 2); D_i3_801C3A88[actor->iwork[0]][gSysFrameCount % 2][i].n.a = temp_v1_2[i].n.a; } + Matrix_Scale(gGfxMatrix, actor->fwork[1] - 0.25f + ((1.5f - actor->scale) * 0.5f), actor->scale, actor->fwork[1], 1); if (actor->state != 0) { @@ -1887,6 +2034,7 @@ void Aquas_801AEB44(Actor* actor) { RCP_SetupDL(&gMasterDisp, 0x16); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } + Matrix_SetGfxMtx(&gMasterDisp); gDPSetTextureLUT(gMasterDisp++, G_TT_RGBA16); gDPLoadTLUT_pal256(gMasterDisp++, D_AQ_6008FC8); @@ -2182,12 +2330,14 @@ void Aquas_801B099C(Actor* actor) { Matrix_RotateZ(gGfxMatrix, (actor->obj.rot.z + actor->fwork[5]) * M_DTOR, 1); Matrix_Scale(gGfxMatrix, actor->fwork[0], actor->fwork[1], actor->fwork[2], 1); Matrix_SetGfxMtx(&gMasterDisp); + if (!(actor->timer_0C6 & 1)) { RCP_SetupDL(&gMasterDisp, 0x39); } else { RCP_SetupDL(&gMasterDisp, 0x3D); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } + switch (actor->iwork[0]) { case 0: gSPDisplayList(gMasterDisp++, D_AQ_6019E80); @@ -2209,6 +2359,7 @@ void Aquas_801B0B60(Actor* actor) { if ((actor->unk_0D0 != 0) || (gBosses[0].state >= 16)) { actor->state = 3; } + switch (actor->state) { case 0: if (actor->timer_0BC == 0) { @@ -2227,6 +2378,7 @@ void Aquas_801B0B60(Actor* actor) { actor->state++; } break; + case 1: if (actor->timer_0BE == 0) { Matrix_RotateY(gCalcMatrix, actor->fwork[4] * M_DTOR, 0); @@ -2241,6 +2393,7 @@ void Aquas_801B0B60(Actor* actor) { actor->state++; } break; + case 2: if (actor->timer_0C0 == 0) { actor->iwork[1] -= 20; @@ -2251,6 +2404,7 @@ void Aquas_801B0B60(Actor* actor) { } } break; + case 3: if (Rand_ZeroOne() < 0.1) { actor->itemDrop = DROP_SILVER_RING_10p; @@ -2263,6 +2417,7 @@ void Aquas_801B0B60(Actor* actor) { func_effect_8007A6F0(&actor->obj.pos, 0x29018049); break; } + if (!(gGameFrameCount & 0xF)) { Aquas_801AC8A8(actor->obj.pos.x + RAND_FLOAT_CENTERED(10.0f), actor->obj.pos.y + RAND_FLOAT_CENTERED(10.0f), actor->obj.pos.z + RAND_FLOAT_CENTERED(10.0f), 2.0f, 1); @@ -2306,6 +2461,7 @@ void Aquas_801B1008(Boss* bossAQ, s32 timer) { bossAQ->swork[AQ_SWK_22]++; bossAQ->swork[AQ_SWK_22] &= 3; } + if ((fabsf(D_i3_801C4308[10]) >= 15.0f) && (bossAQ->timer_056 == 0)) { bossAQ->swork[AQ_SWK_2] = bossAQ->swork[AQ_SWK_3] = 1; bossAQ->timer_056 = 60; @@ -2320,6 +2476,7 @@ void Aquas_BossAq_Init(Boss* bossAQ) { gBossActive = 1; gBossFrameCount = 0; bossAQ->health = 150; + for (i = 0, actor = gActors; i < 2; actor++) { if (actor->obj.status == OBJ_FREE) { Actor_Initialize(actor); @@ -2349,6 +2506,7 @@ void Aquas_BossAq_Init(Boss* bossAQ) { bossAQ->swork[AQ_SWK_17] = 10; D_i3_801C42A0[1] = D_i3_801C42A0[2] = D_i3_801C42A0[4] = D_i3_801C42A0[5] = (D_i3_801C42A0[6] = D_i3_801C42A0[7] = 0) ^ 0; // fake + for (i = 0; i < AQ_LIMB_MAX; i++) { sBossAQlimbTimers[i] = 0; } @@ -3182,7 +3340,9 @@ bool Aquas_801B42AC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th } else if ((sBossAQlimbTimers[limbIndex] != 0) && (D_ctx_80177854 != 100)) { sBossAQlimbTimers[limbIndex]--; } + gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); + if ((D_i3_801C42A0[0] != 255) && (limbIndex != 27)) { RCP_SetupDL(&gMasterDisp, 0x3A); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, D_i3_801C42A0[0]); @@ -3193,6 +3353,7 @@ bool Aquas_801B42AC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th RCP_SetupDL(&gMasterDisp, 0x3D); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } + switch (limbIndex) { case AQ_LIMB_4: rot->x = D_i3_801C4308[13]; @@ -3200,6 +3361,7 @@ bool Aquas_801B42AC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th sp58 = this->fwork[AQ_FWK_9]; sp54 = this->fwork[AQ_FWK_10]; break; + case AQ_LIMB_5: RCP_SetupDL(&gMasterDisp, 0x3D); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, gBosses[0].swork[AQ_SWK_14], gBosses[0].swork[AQ_SWK_15], @@ -3211,12 +3373,14 @@ bool Aquas_801B42AC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th sp58 = D_i3_801C4308[65]; sp54 = D_i3_801C4308[72]; break; + case AQ_LIMB_6: rot->x = D_i3_801C4308[12]; sp5C = this->fwork[AQ_FWK_8]; sp58 = this->fwork[AQ_FWK_9]; sp54 = this->fwork[AQ_FWK_10]; break; + case AQ_LIMB_7: rot->x = D_i3_801C4308[16]; rot->y = D_i3_801C4308[18]; @@ -3227,6 +3391,7 @@ bool Aquas_801B42AC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th sp58 = D_i3_801C4308[59]; sp54 = D_i3_801C4308[66]; break; + case AQ_LIMB_8: rot->x = D_i3_801C4308[17]; rot->y = D_i3_801C4308[19]; @@ -3237,13 +3402,16 @@ bool Aquas_801B42AC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th sp58 = D_i3_801C4308[60]; sp54 = D_i3_801C4308[67]; break; + case AQ_LIMB_9: rot->x += D_i3_801C4308[47]; rot->y += D_i3_801C4308[47]; rot->z += D_i3_801C4308[47]; + sp5C = D_i3_801C4308[54]; sp58 = D_i3_801C4308[61]; sp54 = D_i3_801C4308[68]; + if (sp50) { RCP_SetupDL(&gMasterDisp, 0x3D); if (gBosses[0].health != 0) { @@ -3253,6 +3421,7 @@ bool Aquas_801B42AC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th } } break; + case AQ_LIMB_10: rot->x += D_i3_801C4308[48]; rot->y += D_i3_801C4308[48]; @@ -3261,6 +3430,7 @@ bool Aquas_801B42AC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th sp58 = D_i3_801C4308[62]; sp54 = D_i3_801C4308[69]; break; + case AQ_LIMB_12: rot->x = D_i3_801C4308[14]; rot->y = D_i3_801C4308[15]; @@ -3268,6 +3438,7 @@ bool Aquas_801B42AC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th sp58 = this->fwork[AQ_FWK_9]; sp54 = this->fwork[AQ_FWK_10]; break; + case AQ_LIMB_15: rot->x += D_i3_801C4308[49]; rot->y += D_i3_801C4308[49]; @@ -3276,6 +3447,7 @@ bool Aquas_801B42AC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th sp58 = D_i3_801C4308[63]; sp54 = D_i3_801C4308[70]; break; + case AQ_LIMB_18: rot->y += D_i3_801C4308[50]; rot->z += D_i3_801C4308[50]; @@ -3283,6 +3455,7 @@ bool Aquas_801B42AC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th sp58 = D_i3_801C4308[64]; sp54 = D_i3_801C4308[71]; break; + case AQ_LIMB_22: rot->x += D_i3_801C4308[51]; rot->y += D_i3_801C4308[51]; @@ -3291,13 +3464,16 @@ bool Aquas_801B42AC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th sp58 = this->fwork[AQ_FWK_9]; sp54 = this->fwork[AQ_FWK_10]; break; + case AQ_LIMB_24: rot->x = D_i3_801C4308[10]; rot->z = D_i3_801C4308[11]; break; + case AQ_LIMB_27: break; } + if (sp5C > 0.0f) { Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, 1); Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, 1); @@ -3334,6 +3510,7 @@ void Aquas_801B49DC(s32 limbIndex, Vec3f* rot, void* thisx) { D_i3_801C4308[22] = sp6C.y; D_i3_801C4308[23] = sp6C.z; break; + case AQ_LIMB_7: Matrix_MultVec3f(gCalcMatrix, &sp60, &sp6C); D_i3_801C4308[24] = sp6C.x; @@ -3344,6 +3521,7 @@ void Aquas_801B49DC(s32 limbIndex, Vec3f* rot, void* thisx) { D_i3_801C4308[74] = sp6C.y; D_i3_801C4308[75] = sp6C.z; break; + case AQ_LIMB_8: Matrix_MultVec3f(gCalcMatrix, &sp60, &sp6C); D_i3_801C4308[27] = sp6C.x; @@ -3354,36 +3532,42 @@ void Aquas_801B49DC(s32 limbIndex, Vec3f* rot, void* thisx) { D_i3_801C4308[77] = sp6C.y; D_i3_801C4308[78] = sp6C.z; break; + case AQ_LIMB_9: Matrix_MultVec3f(gCalcMatrix, &sp60, &sp6C); D_i3_801C4308[30] = sp6C.x; D_i3_801C4308[31] = sp6C.y; D_i3_801C4308[32] = sp6C.z; break; + case AQ_LIMB_10: Matrix_MultVec3f(gCalcMatrix, &sp60, &sp6C); D_i3_801C4308[33] = sp6C.x; D_i3_801C4308[34] = sp6C.y; D_i3_801C4308[35] = sp6C.z; break; + case AQ_LIMB_15: Matrix_MultVec3f(gCalcMatrix, &sp60, &sp6C); D_i3_801C4308[36] = sp6C.x; D_i3_801C4308[37] = sp6C.y; D_i3_801C4308[38] = sp6C.z; break; + case AQ_LIMB_18: Matrix_MultVec3f(gCalcMatrix, &sp60, &sp6C); D_i3_801C4308[39] = sp6C.x; D_i3_801C4308[40] = sp6C.y; D_i3_801C4308[41] = sp6C.z; break; + case AQ_LIMB_22: Matrix_MultVec3f(gCalcMatrix, &sp60, &sp6C); D_i3_801C4308[42] = sp6C.x; D_i3_801C4308[43] = sp6C.y; D_i3_801C4308[44] = sp6C.z; break; + case AQ_LIMB_24: Matrix_MultVec3f(gCalcMatrix, &sp54, &sp6C); D_i3_801C4308[1] = sp6C.x; @@ -3398,6 +3582,7 @@ void Aquas_801B49DC(s32 limbIndex, Vec3f* rot, void* thisx) { D_i3_801C4308[6] = sp6C.y; D_i3_801C4308[9] = sp6C.z; break; + case AQ_LIMB_27: break; } @@ -3417,7 +3602,7 @@ f32 D_i3_801C0224[11] = { Vec3f D_i3_801C0250 = { 0.0f, 0.0f, 0.0f }; bool Aquas_801B4DDC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { - Actor* this = thisx; + Actor* this = (Actor*) thisx; if (!(this->timer_0C6 & 1)) { RCP_SetupDL(&gMasterDisp, 0x39); @@ -3433,7 +3618,7 @@ bool Aquas_801B4DDC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th void Aquas_801B4E94(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp24 = D_i3_801C0250; - Actor* this = thisx; + Actor* this = (Actor*) thisx; if (this->health == 0) { switch (limbIndex) { @@ -3504,6 +3689,7 @@ void Aquas_801B50E8(Actor* actor) { actor->state = 7; func_effect_8007A6F0(&actor->obj.pos, 0x29038090); } + switch (actor->state) { case 0: for (i = 0; i < 8; i++) { @@ -3519,6 +3705,7 @@ void Aquas_801B50E8(Actor* actor) { actor->fwork[4] = 1000.0f + RAND_FLOAT_CENTERED(400.0f); actor->state++; break; + case 2: Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].unk_138, 1.0f, 10.0f, 0); if (fabsf(actor->obj.pos.z - gPlayer[0].unk_138) < actor->fwork[4]) { @@ -3529,6 +3716,7 @@ void Aquas_801B50E8(Actor* actor) { func_effect_8007B8F8(actor->obj.pos.x, gGroundLevel + 30.0f, actor->obj.pos.z, 10.0f); } break; + case 3: Math_SmoothStepToAngle(&actor->obj.rot.x, 270.0f, 1.0f, 100.0f, 0.0001f); if (actor->obj.rot.x == 270.0f) { @@ -3537,6 +3725,7 @@ void Aquas_801B50E8(Actor* actor) { actor->state = 4; } break; + case 4: Math_SmoothStepToF(&actor->vel.y, 0.0f, 1.0f, 4.0f, 0.0001f); actor->vel.z = gPlayer[0].vel.z; @@ -3553,6 +3742,7 @@ void Aquas_801B50E8(Actor* actor) { actor->obj.pos.z + RAND_FLOAT_CENTERED(100.0f), 1.0f, 1); } break; + case 5: actor->vel.z = gPlayer[0].vel.z; Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].unk_138 - 1000.0f, 0.1f, 100.0f, 0); @@ -3578,6 +3768,7 @@ void Aquas_801B50E8(Actor* actor) { } } break; + case 6: Math_SmoothStepToAngle(&actor->obj.rot.x, actor->fwork[3], 1.0f, 5.0f, 0); Math_SmoothStepToAngle(&actor->obj.rot.y, actor->fwork[2], 1.0f, 5.0f, 0); @@ -3587,6 +3778,7 @@ void Aquas_801B50E8(Actor* actor) { actor->obj.pos.z + RAND_FLOAT_CENTERED(100.0f), 1.0f, 1); } break; + case 7: for (i = 0; i < 8; i++) { Aquas_801A9448(&actor->vwork[i], &actor->vwork[8 + i], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(5.0f), @@ -3600,6 +3792,7 @@ void Aquas_801B50E8(Actor* actor) { func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 6.0f); break; } + if (actor->state >= 2) { if (actor->state < 3) { actor->unk_0B6++; @@ -3610,6 +3803,7 @@ void Aquas_801B50E8(Actor* actor) { actor->unk_0B6 = 0; } } + if (actor->unk_0D0 != 0) { actor->unk_0D0 = 0; if (actor->health != 0) { @@ -3646,7 +3840,7 @@ bool Aquas_801B5C18(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th f32 sp64 = 1.0f; Vec3f sp58; Vec3f sp4C = { 0.0f, 0.0f, 0.0f }; - Actor* this = thisx; + Actor* this = (Actor*) thisx; if (!(this->timer_0C6 & 1)) { RCP_SetupDL(&gMasterDisp, 0x39); @@ -3654,6 +3848,7 @@ bool Aquas_801B5C18(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th RCP_SetupDL(&gMasterDisp, 0x3D); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } + switch (limbIndex) { case 7: RCP_SetupDL(&gMasterDisp, 0x40); @@ -3668,6 +3863,7 @@ bool Aquas_801B5C18(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) this->fwork[4]); break; } + if (sp6C != 1.0f) { Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, 1); Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, 1); @@ -3692,7 +3888,7 @@ void Aquas_801B5F68(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp3C = { 0.0f, 0.0f, 0.0f }; Vec3f sp30; Vec3f sp24; - Actor* this = thisx; + Actor* this = (Actor*) thisx; if ((this->health == 0) || (limbIndex == 7)) { switch (limbIndex) { @@ -3799,23 +3995,28 @@ void Aquas_801B638C(Actor* actor) { RAND_FLOAT_CENTERED(10.0f), 48, actor->scale, 200, i); func_effect_8007BC7C(actor->vwork[i].x, actor->vwork[i].y, actor->vwork[i].z, 10.0f); } + func_effect_800815DC(); func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 150.0f, 10.0f); func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 150.0f, 10.0f); func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 150.0f, 10.0f); + for (i = 0; i < 5; i++) { func_effect_80081A8C(actor->obj.pos.x + RAND_FLOAT(i * 15.0f), actor->obj.pos.y + RAND_FLOAT(i * 3.0f), actor->obj.pos.z + RAND_FLOAT(i * 5.0f), 1.0f + RAND_FLOAT(1.0f), 7); } + actor->itemDrop = DROP_SILVER_RING_50p; if (actor->iwork[16] != 0) { actor->itemDrop = DROP_GOLD_RING_1; } + func_enmy_80066254(actor); Object_Kill(&actor->obj, actor->sfxSource); AUDIO_PLAY_SFX(0x1903001D, actor->sfxSource, 4); func_effect_8007A6F0(&actor->obj.pos, 0x29038090); } + actor->fwork[5] = (actor->obj.pos.y * 0.01f) + 2.5f; actor->fwork[6] = (actor->obj.pos.y * 0.003f) + 0.8f; actor->fwork[7] = (actor->obj.pos.y * 0.001f) + 0.8f; @@ -3823,7 +4024,6 @@ void Aquas_801B638C(Actor* actor) { if (actor->iwork[12] < 30.0f) { actor->iwork[12] = 30; } - actor->fwork[1] = (actor->obj.pos.y * 0.0032f) + 1.0f; actor->fwork[2] = (actor->obj.pos.y * 0.0032f) + 1.5f; actor->fwork[3] = (actor->obj.pos.y * 0.0032f) + 2.0f; @@ -3831,10 +4031,12 @@ void Aquas_801B638C(Actor* actor) { if (actor->fwork[11] > 1200.0f) { actor->fwork[11] = 1200.0f; } + actor->unk_0B6++; if (actor->unk_0B6 >= Animation_GetFrameCount(&D_AQ_6002628)) { actor->unk_0B6 = 0; } + switch (actor->state) { case 0: for (i = 0; i < 9; i++) { @@ -3855,8 +4057,8 @@ void Aquas_801B638C(Actor* actor) { actor->fwork[15] = actor->obj.pos.x + sp80.x; actor->fwork[16] = actor->obj.pos.z + sp80.z; actor->state = 1; - break; + case 1: if (actor->timer_0BC == 1) { actor->iwork[15] = 1; @@ -3880,34 +4082,46 @@ void Aquas_801B638C(Actor* actor) { sp98 = sqrtf(SQ(actor->obj.pos.z - actor->fwork[16]) + SQ(actor->obj.pos.x - actor->fwork[15])); actor->fwork[13] -= 20.0f; actor->fwork[14] += 5.0f; + spB4 = SIN_DEG(actor->fwork[13]) * sp98 * 0.1f; temp_fsc = COS_DEG(actor->fwork[14]) * sp98 * 0.8f; temp_fscc = COS_DEG(actor->obj.rot.y) * temp_fsc; temp2 = -SIN_DEG(actor->obj.rot.y) * temp_fsc; + temp_fscc = Math_Atan2F(actor->obj.pos.x - actor->fwork[15] + temp_fscc, actor->obj.pos.z - actor->fwork[16] + temp2); temp_fsc = -Math_Atan2F(actor->obj.pos.y - spB4, sp98); temp_fscc = Math_RadToDeg(temp_fscc); + Math_SmoothStepToAngle(&actor->obj.rot.y, temp_fscc, 0.1f, 100.0f, 0.001f); + temp_fscc = Math_RadToDeg(temp_fsc); + if (actor->obj.pos.y >= 1000.0f) { temp_fscc = 0.0f; } + Math_SmoothStepToAngle(&actor->obj.rot.x, temp_fscc, 0.1f, 100.0f, 0.001f); Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1); + sp8C.x = sp8C.y = 0.0f; sp8C.z = 10.0f; + if (actor->iwork[14] != 0) { sp8C.z = 30.0f; } + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp8C, &sp80); + actor->vel.x = sp80.x; actor->vel.y = sp80.y; actor->vel.z = sp80.z; + if (actor->iwork[15] != 0) { actor->vel.x = actor->vel.y = actor->vel.z = 0.0f; } + if ((actor->iwork[14] != 0) && (actor->obj.pos.z < (gPlayer[0].unk_138 - 2000.0f))) { actor->iwork[14] = 0; actor->timer_0BC = 500; @@ -3915,6 +4129,7 @@ void Aquas_801B638C(Actor* actor) { } break; } + if (actor->unk_0D0 != 0) { actor->unk_0D0 = 0; if ((actor->health != 0) && (actor->unk_0D2 == 0)) { @@ -3942,7 +4157,9 @@ void Aquas_801B6E54(Actor* actor) { actor->vwork[15 + i].y = actor->obj.rot.y; actor->vwork[15 + i].z = actor->obj.rot.z; } + actor->health = 0; + if (actor->obj.rot.z != 0) { actor->obj.rot.z = 0.0f; actor->state = 1; @@ -3973,6 +4190,7 @@ void Aquas_801B6FF8(Actor* actor) { Object_Kill(&actor->obj, actor->sfxSource); func_effect_8007A6F0(&actor->obj.pos, 0x29038090); } + switch (actor->state) { case 0: if (actor->timer_0BC == 0) { @@ -4029,6 +4247,7 @@ void Aquas_801B6FF8(Actor* actor) { actor->vel.z = sp90.z; break; } + if (!(gGameFrameCount & 3)) { for (i = 0; i < 3; i++) { func_effect_80081A8C(actor->obj.pos.x + RAND_FLOAT_CENTERED(70.0f), @@ -4036,10 +4255,12 @@ void Aquas_801B6FF8(Actor* actor) { actor->obj.pos.z + RAND_FLOAT_CENTERED(70.0f), 1.0f, 1); } } + actor->unk_0B6++; if (Animation_GetFrameCount(&D_AQ_60260EC) < actor->unk_0B6) { actor->unk_0B6 = 0; } + if (actor->unk_0D0 != 0) { actor->unk_0D0 = 0; if (actor->health > -100) { @@ -4071,7 +4292,7 @@ bool Aquas_801B76EC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th void Aquas_801B7754(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp24 = { 0.0f, 0.0f, 0.0f }; - Actor* this = thisx; + Actor* this = (Actor*) thisx; if (this->health == -100) { switch (limbIndex) { @@ -4162,6 +4383,7 @@ void Aquas_801B7AF0(Actor* actor) { actor->fwork[5] = 20.0f; actor->fwork[6] = 20.0f; actor->health = 60; + for (i = 0; i < 10; i++) { actor->vwork[0 + i].x = actor->obj.pos.x; actor->vwork[0 + i].y = actor->obj.pos.y; @@ -4190,6 +4412,7 @@ void Aquas_801B7C78(Actor* actor) { func_effect_80081A8C(actor->obj.pos.x + RAND_FLOAT(i * 15.0f), actor->obj.pos.y + RAND_FLOAT(i * 3.0f), actor->obj.pos.z + RAND_FLOAT(i * 5.0f), 1.0f + RAND_FLOAT(0.5f), 7); } + for (i = 0; i < 10; i++) { Aquas_801A9448(&actor->vwork[0 + i], &actor->vwork[10 + i], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(5.0f), RAND_FLOAT_CENTERED(10.0f), 52, actor->scale, 200, i); @@ -4206,45 +4429,56 @@ void Aquas_801B7C78(Actor* actor) { } } } + func_effect_800815DC(); func_effect_8007D0E0(actor->vwork[7].x, actor->vwork[7].y, actor->vwork[7].z, 5.0f); + actor->itemDrop = DROP_SILVER_RING_25p; + func_enmy_80066254(actor); Object_Kill(&actor->obj, actor->sfxSource); func_effect_8007A6F0(&actor->obj.pos, 0x29038090); } + if (actor->state != 6) { spAC = gPlayer[0].pos.x - actor->obj.pos.x; Math_SmoothStepToAngle(&actor->obj.rot.y, Math_RadToDeg(Math_Atan2F(spAC, gPlayer[0].unk_138 - actor->obj.pos.z)), 1.0f, 5.0f, 0.001f); } + if (((actor->state >= 2) && (actor->state < 4)) || (actor->state >= 5)) { Math_SmoothStepToF(&actor->fwork[4], 10.0f, 0.2f, 20.0f, 0); Math_SmoothStepToF(&actor->fwork[5], 20.0f, 0.2f, 20.0f, 0); Math_SmoothStepToF(&actor->fwork[6], 20.0f, 0.2f, 20.0f, 0); } + if ((actor->state >= 4) && (actor->state < 5)) { Math_SmoothStepToF(&actor->fwork[4], 159.0f, 0.1f, 10.0f, 0); Math_SmoothStepToF(&actor->fwork[5], 159.0f, 0.1f, 10.0f, 0); Math_SmoothStepToF(&actor->fwork[6], 255.0f, 0.1f, 10.0f, 0); } + if (((actor->state < 5) || (actor->state == 7)) && (actor->health != 0) && !(gGameFrameCount & 0xF)) { func_effect_8007B8F8(actor->vwork[22].x, gGroundLevel, actor->vwork[22].z, 5.0f); } + Math_SmoothStepToF(&actor->fwork[1], actor->fwork[2], 0.1f, 2.0f, 0.00001f); Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].camEye.z - D_ctx_80177D20 + actor->fwork[3], 0.1f, actor->fwork[1], 0.00001); + if ((actor->state == 1) && (fabsf(actor->fwork[7] - actor->obj.pos.z) >= 10000.0f)) { actor->timer_0C0 = 20; actor->state = 5; } + switch (actor->state) { case 0: actor->timer_0BE = (s32) (100.0f + RAND_FLOAT(150.0f)); actor->state = 1; actor->fwork[7] = actor->obj.pos.z; break; + case 1: if (actor->timer_0BC != 0) { Math_SmoothStepToF(&actor->fwork[4], 255.0f, 0.1f, 50.0f, 0); @@ -4259,20 +4493,24 @@ void Aquas_801B7C78(Actor* actor) { actor->state = 2; } } + if (!(gGameFrameCount & 3)) { Aquas_801AC8A8(actor->vwork[7].x + RAND_FLOAT_CENTERED(120.0f), actor->vwork[7].y + RAND_FLOAT_CENTERED(50.0f), actor->vwork[7].z + 100.0f + RAND_FLOAT_CENTERED(100.0f), 1.0f, 0); } break; + case 2: actor->unk_0B6 += actor->iwork[1]; if (actor->unk_0B6 >= Animation_GetFrameCount(&D_AQ_6024F80)) { actor->unk_0B6 = 0; actor->timer_0BE = 0; + if (actor->iwork[1] >= 2) { actor->timer_0BE = 30; } + for (i = 0; i < 10; i++) { Aquas_801AC8A8(actor->vwork[7].x + RAND_FLOAT_CENTERED(120.0f), actor->vwork[7].y + RAND_FLOAT_CENTERED(50.0f), @@ -4281,6 +4519,7 @@ void Aquas_801B7C78(Actor* actor) { actor->state = 3; } break; + case 3: if (actor->timer_0BE == 0) { for (i = 0; i < 2; i++) { @@ -4293,6 +4532,7 @@ void Aquas_801B7C78(Actor* actor) { actor->state = 4; } break; + case 4: actor->iwork[5]++; if (actor->timer_0C0 == 0) { @@ -4303,7 +4543,9 @@ void Aquas_801B7C78(Actor* actor) { actor->state = 7; } } + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); + if ((actor->unk_0B6 < 21) && (actor->state == 4) && (actor->iwork[3] != 0)) { j = actor->iwork[3] - 1; effect = &gEffects[j]; @@ -4314,14 +4556,19 @@ void Aquas_801B7C78(Actor* actor) { temp_fs2 = Math_RadToDeg(Math_Atan2F(spAC, temp_dz)); temp1 = Math_RadToDeg(-Math_Atan2F(temp_dy, sqrtf(SQ(spAC) + SQ(temp_dz)))); + Matrix_RotateY(gCalcMatrix, M_DTOR * temp_fs2, 0); Matrix_RotateX(gCalcMatrix, M_DTOR * temp1, 1); + sp90.x = sp90.y = 0.0f; sp90.z = 30.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp90, &sp84); + effect->vel.x = sp84.x; effect->vel.y = sp84.y; effect->vel.z = sp84.z; + effect->unk_44 = 2; effect->timer_50 = 100; actor->iwork[3] = 0; @@ -4332,6 +4579,7 @@ void Aquas_801B7C78(Actor* actor) { effect->obj.pos.z = actor->vwork[21].z; } } + if ((actor->unk_0B6 < 58) && (actor->state == 4) && (actor->iwork[2] != 0)) { j = actor->iwork[2] - 1; effect = &gEffects[j]; @@ -4339,16 +4587,22 @@ void Aquas_801B7C78(Actor* actor) { spAC = gPlayer[0].pos.x - effect->obj.pos.x; temp_dy = gPlayer[0].pos.y - effect->obj.pos.y; temp_dz = gPlayer[0].unk_138 - 50.0f - effect->obj.pos.z; + temp_fs2 = Math_RadToDeg(Math_Atan2F(spAC, temp_dz)); temp1 = Math_RadToDeg(-Math_Atan2F(temp_dy, sqrtf(SQ(spAC) + SQ(temp_dz)))); + Matrix_RotateY(gCalcMatrix, M_DTOR * temp_fs2, 0); Matrix_RotateX(gCalcMatrix, M_DTOR * temp1, 1); + sp90.x = sp90.y = 0.0f; sp90.z = 50.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp90, &sp84); + effect->vel.x = sp84.x; effect->vel.y = sp84.y; effect->vel.z = sp84.z; + effect->unk_44 = 2; effect->timer_50 = 100; actor->iwork[2] = 0; @@ -4359,39 +4613,49 @@ void Aquas_801B7C78(Actor* actor) { } } break; + case 5: Math_SmoothStepToAngle(&actor->obj.rot.x, 40.0f, 0.1f, 10.0f, 0); + actor->unk_0B6++; if (actor->unk_0B6 >= Animation_GetFrameCount(&D_AQ_6024F80)) { actor->unk_0B6 = Animation_GetFrameCount(&D_AQ_6024F80) - 1; } + if (actor->timer_0C0 == 0) { temp_dy = gPlayer[0].pos.y - 50.0f - actor->obj.pos.y; temp_dz = gPlayer[0].unk_138 - actor->obj.pos.z; temp1 = Math_RadToDeg(-Math_Atan2F(temp_dy, sqrtf(SQ(spAC) + SQ(temp_dz)))); Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); Matrix_RotateX(gCalcMatrix, M_DTOR * temp1, 1); + sp90.x = sp90.y = 0.0f; sp90.z = 40.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp90, &sp84); + actor->vel.x = sp84.x; actor->vel.y = sp84.y; actor->vel.z = sp84.z; actor->state = 6; } break; + case 6: actor->unk_0B6++; if (actor->unk_0B6 >= Animation_GetFrameCount(&D_AQ_6024F80)) { actor->unk_0B6 = Animation_GetFrameCount(&D_AQ_6024F80) - 1; } + Math_SmoothStepToAngle(&actor->obj.rot.x, 30.0f, 0.1f, 10.0f, 0); + if (!(gGameFrameCount & 1)) { Aquas_801AC8A8(actor->vwork[7].x + RAND_FLOAT_CENTERED(120.0f), actor->vwork[7].y + RAND_FLOAT_CENTERED(50.0f), actor->vwork[7].z + RAND_FLOAT_CENTERED(100.0f), 2.0f, 0); } break; + case 7: actor->unk_0B6--; if (actor->unk_0B6 <= 0) { @@ -4401,9 +4665,11 @@ void Aquas_801B7C78(Actor* actor) { } break; } + if (actor->iwork[0] != 0) { actor->health = 0; } + if (actor->unk_0D0 != 0) { actor->unk_0D0 = 0; if (actor->health != 0) { @@ -4435,13 +4701,15 @@ void Aquas_801B7C78(Actor* actor) { } bool Aquas_801B8C50(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { - Actor* this = thisx; + Actor* this = (Actor*) thisx; RCP_SetupDL(&gMasterDisp, 0x3A); + if (this->timer_0C6 & 1) { RCP_SetupDL(&gMasterDisp, 0x22); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } + if ((this->timer_0C6 == 0) && ((this->fwork[6] <= 254.0f) || (this->state >= 4))) { RCP_SetupDL(&gMasterDisp, 0x22); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, (s32) this->fwork[4], (s32) this->fwork[5], (s32) this->fwork[6], @@ -4455,7 +4723,7 @@ void Aquas_801B8D7C(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp40 = { 108.0f, 0.0f, 24.0f }; Vec3f sp34 = { 102.0f, 14.0f, -21.0f }; Vec3f sp28 = { 0.0f, 0.0f, 0.0f }; - Actor* this = thisx; + Actor* this = (Actor*) thisx; switch (limbIndex) { case 1: @@ -4467,18 +4735,21 @@ void Aquas_801B8D7C(s32 limbIndex, Vec3f* rot, void* thisx) { Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[23]); } break; + case 2: if (this->health == 0) { Matrix_MultVec3f(gCalcMatrix, &sp4C, &this->vwork[1]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[11]); } break; + case 3: if (this->health == 0) { Matrix_MultVec3f(gCalcMatrix, &sp4C, &this->vwork[2]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[12]); } break; + case 4: if (this->health == 0) { Matrix_MultVec3f(gCalcMatrix, &sp4C, &this->vwork[3]); @@ -4488,36 +4759,42 @@ void Aquas_801B8D7C(s32 limbIndex, Vec3f* rot, void* thisx) { Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[24]); } break; + case 5: if (this->health == 0) { Matrix_MultVec3f(gCalcMatrix, &sp4C, &this->vwork[4]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[14]); } break; + case 6: if (this->health == 0) { Matrix_MultVec3f(gCalcMatrix, &sp4C, &this->vwork[5]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[15]); } break; + case 9: if (this->health == 0) { Matrix_MultVec3f(gCalcMatrix, &sp4C, &this->vwork[6]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[16]); } break; + case 10: if (this->health == 0) { Matrix_MultVec3f(gCalcMatrix, &sp4C, &this->vwork[7]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[17]); } break; + case 11: if (this->health == 0) { Matrix_MultVec3f(gCalcMatrix, &sp4C, &this->vwork[8]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[18]); } break; + case 12: if (this->health == 0) { Matrix_MultVec3f(gCalcMatrix, &sp4C, &this->vwork[9]); @@ -4559,23 +4836,29 @@ void Aquas_801B91A4(Actor* actor) { Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1); + if ((actor->health == 0) && (actor->state > 0)) { actor->itemDrop = DROP_NONE; func_enmy_80066254(actor); + for (i = 0; i < 5; i++) { func_effect_80081A8C(actor->obj.pos.x + RAND_FLOAT(i * 15.0f), actor->obj.pos.y + RAND_FLOAT(i * 3.0f), actor->obj.pos.z + RAND_FLOAT(i * 5.0f), 0.5f + RAND_FLOAT(0.3f), 7); } + for (i = RAND_INT(10.0f); i < 13; i++) { Aquas_801A9448(&actor->vwork[0 + i], &actor->vwork[13 + i], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(5.0f), RAND_FLOAT_CENTERED(10.0f), 53, actor->scale, 200, i); func_effect_8007BC7C(actor->vwork[0 + i].x, actor->vwork[0 + i].y, actor->vwork[0 + i].z + 100.0f, 6.0f); } + Object_Kill(&actor->obj, actor->sfxSource); + func_effect_800815DC(); func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 5.0f); func_effect_8007A6F0(&actor->obj.pos, 0x29038090); } + switch (actor->state) { case 0: for (i = 0; i < 13; i++) { @@ -4586,9 +4869,11 @@ void Aquas_801B91A4(Actor* actor) { actor->vwork[13 + i].y = actor->obj.rot.y; actor->vwork[13 + i].z = actor->obj.rot.z; } + actor->health = 30; actor->unk_0B6 = 19; actor->fwork[1] = actor->obj.pos.z; + if (actor->obj.rot.z >= 4.0f) { actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_AQ_60314AC); actor->health = 200; @@ -4603,7 +4888,9 @@ void Aquas_801B91A4(Actor* actor) { } spC4.x = spC4.y = 0.0f; spC4.z = 40.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &spC4, &spB8); + actor->fwork[4] = spB8.x; actor->fwork[5] = spB8.y; actor->fwork[6] = spB8.z; @@ -4611,6 +4898,7 @@ void Aquas_801B91A4(Actor* actor) { actor->obj.rot.z = 0.0f; } break; + case 1: actor->unk_0B6++; if (actor->unk_0B6 >= Animation_GetFrameCount(&D_AQ_6000AE4)) { @@ -4621,9 +4909,11 @@ void Aquas_801B91A4(Actor* actor) { actor->vel.y = actor->fwork[5]; actor->vel.z = actor->fwork[6]; } + Math_SmoothStepToF(&actor->vel.x, 0.0f, 0.1f, 1.0f, 0.00001f); Math_SmoothStepToF(&actor->vel.y, 0.0f, 0.1f, 1.0f, 0.00001f); Math_SmoothStepToF(&actor->vel.z, 0.0f, 0.1f, 1.0f, 0.00001f); + i = 0; if (actor->iwork[1] != 0) { if (!(actor->unk_0B6 & 7)) { @@ -4634,6 +4924,7 @@ void Aquas_801B91A4(Actor* actor) { i = 1; } } + if ((actor->unk_0B6 > 36) && (i != 0) && (fabsf(gPlayer[0].unk_138 - actor->obj.pos.z) > 1000.0f)) { spfA4 = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(200.0f) - actor->vwork[26].x; spA0 = gPlayer[0].pos.y + RAND_FLOAT_CENTERED(200.0f) - actor->vwork[26].y; @@ -4650,6 +4941,7 @@ void Aquas_801B91A4(Actor* actor) { 0.0f, 0.0f, 0.0f, 0.0f, spAC.x, spAC.y, spAC.z, 1.0f); } break; + case 2: actor->unk_0B6++; if ((actor->unk_0B6 >= Animation_GetFrameCount(&D_AQ_6000AE4)) && (actor->fwork[8] < 1.0f)) { @@ -4659,13 +4951,16 @@ void Aquas_801B91A4(Actor* actor) { actor->fwork[8] = 700.0f; Aquas_801A9728(actor, 50.0f, 10.0f, 8); } + Math_SmoothStepToF(&actor->obj.pos.y, actor->fwork[7] + actor->fwork[8], 0.1f, 10.0f, 0.00001f); Math_SmoothStepToF(&actor->fwork[8], 0.0f, 0.1f, 10.0f, 0.0001f); + if (actor->unk_0B6 >= 40) { Aquas_801AC8A8(actor->obj.pos.x + RAND_FLOAT_CENTERED(70.0f), actor->obj.pos.y - 50.0f + RAND_FLOAT_CENTERED(50.0f), actor->obj.pos.z + RAND_FLOAT_CENTERED(100.0f), 1.0f, 0); } + if (actor->unk_0B6 >= 37) { actor->obj.rot.y += 20.0f; actor->fwork[2] += 20.0f; @@ -4684,6 +4979,7 @@ void Aquas_801B91A4(Actor* actor) { } break; } + if (actor->unk_0D0 != 0) { actor->unk_0D0 = 0; if ((actor->health != 0) && (actor->state != 0)) { @@ -4705,58 +5001,59 @@ void Aquas_801B91A4(Actor* actor) { void Aquas_801B9DB0(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp34 = { 0.0f, 0.0f, 0.0f }; Vec3f sp28 = { -27.0f, 7.0f, 5.0f }; - Actor* this = thisx; + Actor* this = (Actor*) thisx; if ((this->health == 0) || (limbIndex == 12)) { switch (limbIndex) { case 1: Matrix_MultVec3f(gCalcMatrix, &sp34, &this->vwork[0]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[13]); - return; + break; case 2: Matrix_MultVec3f(gCalcMatrix, &sp34, &this->vwork[1]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[14]); - return; + break; case 3: Matrix_MultVec3f(gCalcMatrix, &sp34, &this->vwork[2]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[15]); - return; + break; case 4: Matrix_MultVec3f(gCalcMatrix, &sp34, &this->vwork[3]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[16]); - return; + break; case 5: Matrix_MultVec3f(gCalcMatrix, &sp34, &this->vwork[4]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[17]); - return; + break; case 6: Matrix_MultVec3f(gCalcMatrix, &sp34, &this->vwork[5]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[18]); - return; + break; case 7: Matrix_MultVec3f(gCalcMatrix, &sp34, &this->vwork[6]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[19]); - return; + break; case 8: Matrix_MultVec3f(gCalcMatrix, &sp34, &this->vwork[7]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[20]); - return; + break; case 9: Matrix_MultVec3f(gCalcMatrix, &sp34, &this->vwork[8]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[21]); - return; + break; case 10: Matrix_MultVec3f(gCalcMatrix, &sp34, &this->vwork[9]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[22]); - return; + break; case 11: Matrix_MultVec3f(gCalcMatrix, &sp34, &this->vwork[10]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[23]); - return; + break; case 12: Matrix_MultVec3f(gCalcMatrix, &sp34, &this->vwork[11]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[24]); Matrix_Push(&gCalcMatrix); + switch (gGameFrameCount & 3) { case 0: break; @@ -4770,10 +5067,11 @@ void Aquas_801B9DB0(s32 limbIndex, Vec3f* rot, void* thisx) { Matrix_RotateX(gCalcMatrix, 3 * M_PI / 2, 1); break; } + Matrix_MultVec3f(gCalcMatrix, &sp28, &this->vwork[26]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[27]); Matrix_Pop(&gCalcMatrix); - return; + break; case 21: Matrix_MultVec3f(gCalcMatrix, &sp34, &this->vwork[12]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[25]); @@ -4794,10 +5092,13 @@ void Aquas_801BA108(Actor* actor) { RCP_SetupDL(&gMasterDisp, 0x1E); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 95, 31, 255); } + Matrix_Scale(gCalcMatrix, actor->scale, actor->scale, actor->scale, 1); + if (actor->state == 1) { Matrix_RotateX(gCalcMatrix, (actor->obj.rot.x + 90.0f) * M_DTOR, 1); } + Animation_GetFrameData(&D_AQ_6000AE4, actor->unk_0B6, sp40); Animation_DrawSkeleton(3, D_AQ_6000DB0, sp40, NULL, Aquas_801B9DB0, actor, gCalcMatrix); } @@ -4817,7 +5118,9 @@ void Aquas_801BA26C(Actor* actor) { if (actor->unk_0B6 >= Animation_GetFrameCount(&D_AQ_6020A40)) { actor->unk_0B6 = 0; } + sp3E = Animation_GetFrameData(&D_AQ_6020A40, actor->unk_0B6, sp40); + if ((fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 150.0f) && (fabsf(actor->obj.pos.y - gPlayer[0].pos.y) < 500.0f) && (fabsf(actor->obj.pos.z - gPlayer[0].unk_138) < 700.0f)) { @@ -4825,6 +5128,7 @@ void Aquas_801BA26C(Actor* actor) { actor->fwork[0] = 0.0f; } break; + case 2: actor->unk_0B6 += 2; if (actor->unk_0B6 >= Animation_GetFrameCount(&D_AQ_601DE50)) { @@ -4881,8 +5185,10 @@ void Aquas_801BA6A4(Actor* actor) { actor->obj.pos.y + RAND_FLOAT_CENTERED(50.0f), actor->obj.pos.z + RAND_FLOAT_CENTERED(100.0f), 2.0f, 0); } + actor->fwork[1] += 10.0f; actor->vel.x = SIN_DEG(actor->fwork[1]) * 10.0f; + if (actor->obj.pos.y < (gGroundLevel + 30.0f)) { AUDIO_PLAY_SFX(0x19400007, actor->sfxSource, 4); actor->iwork[1] = 1; @@ -4895,15 +5201,19 @@ void Aquas_801BA6A4(Actor* actor) { } } break; + case 1: if (actor->iwork[1] == 0) { actor->obj.rot.z += actor->fwork[2]; + if (!(gGameFrameCount & 3)) { Aquas_801AC8A8(actor->obj.pos.x + RAND_FLOAT_CENTERED(70.0f), actor->obj.pos.y + RAND_FLOAT_CENTERED(50.0f), actor->obj.pos.z + RAND_FLOAT_CENTERED(50.0f), 1.0f, 0); } + Math_SmoothStepToF(&actor->vel.y, -7.0f, 0.1f, 1.0f, 0.0001f); + if (actor->obj.pos.y < (gGroundLevel + 20.0f)) { actor->gravity = 0.0f; if (actor->vel.y < 0.0f) { @@ -4921,6 +5231,7 @@ void Aquas_801BA6A4(Actor* actor) { Math_SmoothStepToF(&actor->vel.z, 0.0f, 0.1f, 1.0f, 0.0001f); break; } + if (actor->unk_0D0 != 0) { actor->unk_0D0 = 0; actor->health -= actor->damage; @@ -4933,12 +5244,15 @@ void Aquas_801BA6A4(Actor* actor) { Actor_Initialize(var_s0); var_s0->obj.status = OBJ_INIT; var_s0->obj.id = OBJ_ACTOR_265; + var_s0->obj.pos.x = actor->obj.pos.x; var_s0->obj.pos.y = actor->obj.pos.y + 20.0f; var_s0->obj.pos.z = actor->obj.pos.z; + var_s0->vel.x = RAND_FLOAT_CENTERED(50.0f); var_s0->vel.y = RAND_FLOAT(5.0f); var_s0->vel.z = RAND_FLOAT_CENTERED(50.0f); + var_s0->state = 1; Object_SetInfo(&var_s0->info, var_s0->obj.id); @@ -4986,6 +5300,7 @@ void Aquas_801BADF8(Actor* actor) { } actor->state++; break; + case 1: if (actor->unk_0D0 != 0) { actor->unk_0D0 = 0; @@ -4996,6 +5311,7 @@ void Aquas_801BADF8(Actor* actor) { actor->state++; } break; + case 2: for (i = 0; i < 5; i++) { Aquas_801A9448(&actor->vwork[0 + i], &actor->vwork[5 + i], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(5.0f), @@ -5010,7 +5326,7 @@ void Aquas_801BADF8(Actor* actor) { void Aquas_801BB0C4(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp24 = { 0.0f, 0.0f, 0.0f }; - Actor* this = thisx; + Actor* this = (Actor*) thisx; if (this->state != 0) { switch (limbIndex) { @@ -5097,17 +5413,22 @@ void Aquas_801BB26C(Actor* actor) { actor->iwork[8] = RAND_INT(120.0f); actor->iwork[9] = RAND_INT(120.0f); actor->unk_0B6 = RAND_INT(Animation_GetFrameCount(&D_AQ_6023780)); + if (actor->iwork[2] == 0) { actor->iwork[18] = fabsf(actor->obj.rot.y / 10.0f); if ((actor->iwork[18] == 0) || (actor->iwork[18] == 2)) { actor->iwork[19] = 1; } actor->iwork[13] = D_i3_801C4450 * 3; + Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, 0); + sp54.x = 0.0f; sp54.y = actor->obj.rot.x * 10.0f; sp54.z = 0.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48); + for (sp64 = 0, sp44 = gActors; sp64 < 60; sp64++, sp44++) { if (sp44->obj.status == OBJ_FREE) { Actor_Initialize(sp44); @@ -5126,11 +5447,15 @@ void Aquas_801BB26C(Actor* actor) { break; } } + Matrix_RotateZ(gCalcMatrix, (actor->obj.rot.z + 90.0f) * M_DTOR, 0); + sp54.x = 0.0f; sp54.y = actor->obj.rot.x * 10.0f; sp54.z = 0.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48); + for (sp60 = 0, sp40 = gActors; sp60 < 60; sp60++, sp40++) { if (sp40->obj.status == OBJ_FREE) { Actor_Initialize(sp40); @@ -5200,6 +5525,7 @@ void Aquas_801BB79C(Actor* actor) { } } break; + case 3: case 4: i = actor->iwork[19] + (actor->iwork[2] * 2); @@ -5229,10 +5555,13 @@ void Aquas_801BB79C(Actor* actor) { } else { actor->vel.x = actor->vel.y = 0.0f; } + if (actor->iwork[2] == 0) { sp70 = &gActors[actor->iwork[0] - 1]; sp6C = &gActors[actor->iwork[1] - 1]; + Math_SmoothStepToF(&actor->fwork[21], 200.0f, 0.1f, 2.0f, 0.0001f); + if ((actor->iwork[13] == sp70->iwork[13]) && (actor->iwork[14] == 0)) { i = 1; if (!((sp70->obj.id == OBJ_ACTOR_267) && (sp70->obj.status == OBJ_ACTIVE))) { @@ -5249,10 +5578,13 @@ void Aquas_801BB79C(Actor* actor) { sp70->timer_0C6 = actor->timer_0C6; } } + if (!(gGameFrameCount & 7)) { func_effect_8007A6F0(&sp70->obj.pos, 0x3100208E); } + Aquas_801A92EC(actor, sp70->obj.pos.x, sp70->obj.pos.y, sp70->obj.pos.z, actor->iwork[13], i); + if ((actor->fwork[21] > 200.0f) && (actor->iwork[17] != 0)) { Matrix_RotateZ(gCalcMatrix, actor->fwork[20] * M_DTOR, 0); sp80.x = 0.0f; @@ -5264,6 +5596,7 @@ void Aquas_801BB79C(Actor* actor) { sp70->obj.pos.z = actor->obj.pos.z; } } + if ((actor->iwork[13] == sp6C->iwork[13]) && (actor->iwork[15] == 0)) { i = 1; if (!((sp6C->obj.id == OBJ_ACTOR_267) && (sp6C->obj.status == OBJ_ACTIVE))) { @@ -5280,10 +5613,13 @@ void Aquas_801BB79C(Actor* actor) { sp6C->timer_0C6 = actor->timer_0C6; } } + if (!(gGameFrameCount & 3)) { func_effect_8007A6F0(&sp6C->obj.pos, 0x3100208E); } + Aquas_801A92EC(actor, sp6C->obj.pos.x, sp6C->obj.pos.y, sp6C->obj.pos.z, actor->iwork[13] + 1, i); + if ((actor->fwork[21] > 200.0f) && (actor->iwork[17] != 0)) { Matrix_RotateZ(gCalcMatrix, (actor->fwork[20] + 90.0f) * M_DTOR, 0); sp80.x = 0.0f; @@ -5313,38 +5649,46 @@ void Aquas_801BB79C(Actor* actor) { sp70->timer_0C6 = actor->timer_0C6; } } + if (!(gGameFrameCount & 0xF)) { func_effect_8007A6F0(&sp70->obj.pos, 0x3100208E); } + Aquas_801A92EC(actor, sp70->obj.pos.x, sp70->obj.pos.y, sp70->obj.pos.z, actor->iwork[13] + 2, i); } } + if (!(gGameFrameCount & 3)) { func_effect_8007C120(actor->obj.pos.x + RAND_FLOAT_CENTERED(100.0f), actor->obj.pos.y + RAND_FLOAT_CENTERED(100.0f), actor->obj.pos.z + RAND_FLOAT_CENTERED(50.0f), actor->vel.x, actor->vel.y, actor->vel.z, 0.05f + RAND_FLOAT(0.03f), 10); } + if (actor->timer_0BE == 0) { D_i3_801C41B8[18] = 255.0f; D_i3_801C41B8[19] = 255.0f; D_i3_801C41B8[20] = 255.0f; actor->timer_0BE = 10; } + if (actor->iwork[3] == 0) { Math_SmoothStepToF(&actor->fwork[1], 30.0f, 0.1f, 1.0f, 0.00001f); } else { Math_SmoothStepToF(&actor->fwork[1], 100.0f, 0.1f, 1.0f, 0.00001f); } + if (actor->timer_0BC == 0) { actor->timer_0BC = 100; actor->iwork[3]++; actor->iwork[3] &= 1; } + actor->unk_0B6 += 2; if (actor->unk_0B6 >= Animation_GetFrameCount(&D_AQ_6023780)) { actor->unk_0B6 = 0; } + if (actor->iwork[4] < 30) { actor->fwork[2] += D_i3_801C0344[0].x; actor->fwork[3] += D_i3_801C0344[0].y; @@ -5362,6 +5706,7 @@ void Aquas_801BB79C(Actor* actor) { actor->fwork[4] = 255.0f; } } + for (i = 0; i < 2; i++) { if (actor->iwork[i + 5] < 30) { actor->fwork[i + 5] += D_i3_801C0344[2].x; @@ -5381,6 +5726,7 @@ void Aquas_801BB79C(Actor* actor) { } } } + for (i = 0; i < 3; i++) { it0 = i * 12 + 3 * actor->iwork[10 + i]; Math_SmoothStepToF(&actor->fwork[11 + i], D_i3_801C0374[it0 + 0], 0.1f, 5.0f, 0.000001f); @@ -5392,30 +5738,37 @@ void Aquas_801BB79C(Actor* actor) { actor->iwork[10 + i]++; } } + actor->iwork[4]++; if (actor->iwork[4] >= 60) { actor->iwork[4] = 0; } + actor->iwork[5]++; if (actor->iwork[5] >= 60) { actor->iwork[5] = 0; } + actor->iwork[6]++; if (actor->iwork[6] >= 60) { actor->iwork[6] = 0; } + actor->iwork[7]++; if (actor->iwork[7] >= 120) { actor->iwork[7] = actor->iwork[10] = 0; } + actor->iwork[8]++; if (actor->iwork[8] >= 60) { actor->iwork[8] = actor->iwork[11] = 0; } + actor->iwork[9]++; if (actor->iwork[9] >= 120) { actor->iwork[9] = actor->iwork[12] = 0; } + if (actor->unk_0D0 != 0) { actor->unk_0D0 = 0; AUDIO_PLAY_SFX(0x2903408F, actor->sfxSource, 4); @@ -5425,6 +5778,7 @@ void Aquas_801BB79C(Actor* actor) { actor->timer_0C0 = actor->timer_0C6 = 80; } } + if (actor->iwork[20] != 0) { actor->iwork[20]--; } @@ -5437,47 +5791,57 @@ bool Aquas_801BC530(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th f32 sp54 = 0.0f; f32 sp50 = 0.0f; f32 sp4C = 0.0f; - Actor* this = thisx; + Actor* this = (Actor*) thisx; RCP_SetupDL(&gMasterDisp, 0x29); + if (!(this->timer_0C6 & 1)) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 191, 255, 223, (s32) this->fwork[1]); } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255); } + switch (limbIndex) { case 1: sp54 = this->fwork[12]; sp50 = this->fwork[15]; sp4C = this->fwork[18]; break; + case 2: sp54 = this->fwork[13]; sp50 = this->fwork[16]; sp4C = this->fwork[19]; break; + case 3: gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, (s32) this->fwork[5], (s32) this->fwork[7], (s32) this->fwork[9], 255); break; + case 4: gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, (s32) this->fwork[2], (s32) this->fwork[3], (s32) this->fwork[4], 255); break; + case 5: gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, (s32) this->fwork[6], (s32) this->fwork[8], (s32) this->fwork[10], 255); break; + case 11: sp54 = this->fwork[11]; sp50 = this->fwork[14]; sp4C = this->fwork[17]; } + if (sp54 > 0.0f) { Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, 1); + Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, 1); Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, 1); Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, 1); + if (*dList != NULL) { Matrix_MultVec3f(gCalcMatrix, &sp64, &sp58); func_edisplay_8005F670(&sp58); @@ -5522,16 +5886,20 @@ void Aquas_801BC9A0(Actor* actor) { actor->vwork[0].x = actor->obj.pos.x; actor->vwork[0].y = actor->obj.pos.y; actor->vwork[0].z = actor->obj.pos.z; + actor->vwork[1].x = actor->obj.pos.x; actor->vwork[1].y = actor->obj.pos.y; actor->vwork[1].z = actor->obj.pos.z; + actor->vwork[4].x = actor->obj.pos.x; actor->vwork[4].y = actor->obj.pos.y; actor->vwork[4].z = actor->obj.pos.z; + actor->iwork[1] = actor->obj.rot.z; if (actor->iwork[1] >= 9) { actor->iwork[1] = 7; } + if (actor->obj.rot.y != 0) { actor->health = 7650; actor->iwork[3] = 1; @@ -5544,6 +5912,7 @@ void Aquas_801BC9A0(Actor* actor) { } actor->obj.rot.y = actor->obj.rot.z = 0.0f; break; + case 1: if (actor->unk_0D0 != 0) { actor->unk_0D0 = 0; @@ -5557,6 +5926,7 @@ void Aquas_801BC9A0(Actor* actor) { } } break; + case 3: for (i = 0; i < 2; i++) { for (j = 0; j < 60; j++) { @@ -5567,6 +5937,7 @@ void Aquas_801BC9A0(Actor* actor) { } } } + for (i = 0; i < 2; i++) { for (j = 0, var_s0 = gActors; j < 60; j++, var_s0++) { if (var_s0->obj.status == OBJ_FREE) { @@ -5578,6 +5949,7 @@ void Aquas_801BC9A0(Actor* actor) { var_s0->obj.pos.z = actor->vwork[i].z; var_s0->iwork[0] = i + 1; Object_SetInfo(&var_s0->info, var_s0->obj.id); + if (i == 0) { var_s0->fwork[0] = RAND_FLOAT(360.0f); Matrix_RotateY(gCalcMatrix, var_s0->fwork[0] * M_DTOR, 0); @@ -5596,23 +5968,28 @@ void Aquas_801BC9A0(Actor* actor) { } } } + for (j = 0; j < 10; j++) { Aquas_801A9448(&actor->vwork[4], &actor->vwork[5], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(5.0f), RAND_FLOAT_CENTERED(10.0f), 58, 0.2f + RAND_FLOAT(1.0f), 200, 0); func_effect_8007BC7C(actor->vwork[4].x, actor->vwork[4].y, actor->vwork[4].z + 50.0f, 6.0f); } + func_effect_800815DC(); func_effect_8007D0E0(actor->vwork[4].x, actor->vwork[4].y, actor->vwork[4].z, 10.0f); + for (j = 0; j < 20; j++) { Aquas_801AC8A8(actor->vwork[4].x + RAND_FLOAT_CENTERED(100.0f), actor->vwork[4].y + RAND_FLOAT_CENTERED(200.0f), actor->vwork[4].z + 100.0f + RAND_FLOAT_CENTERED(200.0f), 6.0f, 2); } + func_effect_800815DC(); func_effect_8007D0E0(actor->vwork[4].x, actor->vwork[4].y, actor->vwork[4].z + 150.0f, 10.0f); actor->timer_0BC = 4; actor->state = 4; break; + case 4: if (actor->timer_0BC == 0) { actor->obj.pos.x = actor->vwork[4].x; @@ -5624,14 +6001,17 @@ void Aquas_801BC9A0(Actor* actor) { func_effect_8007A6F0(&actor->obj.pos, 0x19021078); } break; + case 5: Math_SmoothStepToAngle(&actor->obj.rot.y, actor->fwork[0], 0.1f, 10.0f, 0.0001f); Math_SmoothStepToAngle(&actor->obj.rot.x, 90.0f, 0.1f, 1.0f, 0.0001f); + if (!(gGameFrameCount & 1) && (actor->iwork[2] == 0)) { Aquas_801AC8A8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f), actor->obj.pos.y + RAND_RANGE(-45.0f, 105.0f), actor->obj.pos.z + RAND_FLOAT_CENTERED(200.0f), 6.0f, 2); } + if ((actor->obj.pos.y < (gGroundLevel + 30.0f)) && (actor->iwork[2] == 0)) { actor->iwork[2] = 1; actor->vel.x = actor->vel.y = actor->vel.z = actor->gravity = 0.0f; @@ -5648,18 +6028,20 @@ void Aquas_801BC9A0(Actor* actor) { void Aquas_801BD17C(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp2C = { 0.0f, 0.0f, 0.0f }; - Actor* this = thisx; + Actor* this = (Actor*) thisx; if (this->state == 3) { switch (limbIndex) { case 1: Matrix_MultVec3f(gCalcMatrix, &sp2C, &this->vwork[4]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[5]); - return; + break; + case 2: Matrix_MultVec3f(gCalcMatrix, &sp2C, &this->vwork[0]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[2]); - return; + break; + case 5: Matrix_MultVec3f(gCalcMatrix, &sp2C, &this->vwork[1]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[3]); @@ -5702,6 +6084,7 @@ void Aquas_801BD3B0(Actor* actor, f32 x, f32 y, f32 z) { Math_SmoothStepToAngle(&actor->obj.rot.y, actor->fwork[6], 0.1f, 100.0f, 0.00001f); Math_SmoothStepToAngle(&actor->obj.rot.x, actor->fwork[7], 0.1f, 100.0f, 0.00001f); + if (!(gGameFrameCount & 3)) { actor->fwork[6] = Math_RadToDeg(Math_Atan2F(x, z)); temp = sqrtf(SQ(x) + SQ(z)); @@ -5744,6 +6127,7 @@ void Aquas_801BD54C(Actor* actor) { // needed to match } } + switch (actor->state) { case 0: if (actor->obj.rot.z != 0) { @@ -5753,6 +6137,7 @@ void Aquas_801BD54C(Actor* actor) { actor->state = 1; actor->fwork[5] = actor->obj.pos.z; break; + case 1: sp64 = actor->index; for (sp68 = 0; sp68 < 15; sp68++) { @@ -5782,10 +6167,12 @@ void Aquas_801BD54C(Actor* actor) { } actor->state = 2; break; + case 2: if (actor->obj.pos.y < gGroundLevel + 30.0f) { actor->obj.pos.y = gGroundLevel + 30.0f; } + if ((actor->iwork[2] != 0) || (actor->timer_0BE != 0)) { actor->timer_0BC = 0; } else { @@ -5793,6 +6180,7 @@ void Aquas_801BD54C(Actor* actor) { Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].camEye.z - D_ctx_80177D20 - actor->fwork[3], 0.1f, 30.0f, 0.00001f); } + if ((actor->timer_0BC == 0) && (actor->iwork[2] == 0) && (actor->timer_0BE == 0)) { actor->timer_0BC = 60; actor->fwork[1] = RAND_FLOAT_CENTERED(300.0f); @@ -5803,9 +6191,11 @@ void Aquas_801BD54C(Actor* actor) { actor->iwork[1]++; actor->iwork[1] &= 3; } + sp5C = gPlayer[0].pos.x - actor->obj.pos.x; sp58 = gPlayer[0].pos.y - actor->obj.pos.y; sp54 = gPlayer[0].unk_138 - actor->obj.pos.z; + if (actor->timer_0BE == 0) { actor->iwork[2] = 0; if (actor->iwork[0] == 0) { @@ -5837,6 +6227,7 @@ void Aquas_801BD54C(Actor* actor) { } } else if ((D_i3_801C41B8[21] != 0) && (D_i3_801C41B8[22] != 0) && (D_i3_801C41B8[23] != 0)) { sp68 = actor->iwork[0]; + var_fs0 = 50.0f; if (Rand_ZeroOne() < 0.5f) { var_fs0 = -50.0f; @@ -5849,6 +6240,7 @@ void Aquas_801BD54C(Actor* actor) { } if (1) {} } + if ((actor->iwork[2] != 0) && (D_i3_801C4190[5] == 0)) { actor->iwork[2] = 0; actor->fwork[4] = 40.0f; @@ -5856,17 +6248,22 @@ void Aquas_801BD54C(Actor* actor) { } Aquas_801BD3B0(actor, sp5C, sp58, sp54); break; + case 3: sp5C = gPlayer[0].pos.x + actor->fwork[1] - actor->obj.pos.x; sp58 = gPlayer[0].pos.y + actor->fwork[2] - actor->obj.pos.y; sp54 = gPlayer[0].unk_138 + 10000.0f - actor->fwork[3] - actor->obj.pos.z; + actor->iwork[2] = 1; + Aquas_801BD3B0(actor, sp5C, sp58, sp54); + if ((gPlayer[0].unk_138 + 1000.0f) < actor->obj.pos.z) { Object_Kill(&actor->obj, actor->sfxSource); } break; } + actor->unk_0B6++; if (Animation_GetFrameCount(&D_AQ_60135E0) < actor->unk_0B6) { actor->unk_0B6 = 0; @@ -5931,9 +6328,11 @@ void Aquas_801BDF14(void) { Actor_Initialize(var_s0); var_s0->obj.status = OBJ_INIT; var_s0->obj.id = OBJ_ACTOR_195; + var_s0->obj.pos.x = D_i3_801C0504[i].x; var_s0->obj.pos.y = D_i3_801C0504[i].y; var_s0->obj.pos.z = D_i3_801C0504[i].z; + var_s0->unk_0F4.y = D_i3_801C075C[i]; var_s0->unk_0B6 = 41; var_s0->iwork[0] = RAND_INT(20.0f); @@ -5952,10 +6351,12 @@ void Aquas_801BE034(Actor* actor) { temp = D_i3_801C0828[actor->iwork[2]]; Math_SmoothStepToAngle(&actor->unk_0F4.y, temp, 1.0f, 100.0f, 0.00001f); } + actor->iwork[0]++; if (actor->iwork[0] >= Animation_GetFrameCount(&D_AQ_60135E0)) { actor->iwork[0] = 0; } + if (gPlayer[0].unk_1D0 >= 5) { Object_Kill(&actor->obj, actor->sfxSource); } @@ -5987,14 +6388,19 @@ void Aquas_801BE274(Actor* actor, f32 yRot, f32 xRot) { Matrix_RotateY(gCalcMatrix, 0.017453292f * yRot, 0); Matrix_RotateX(gCalcMatrix, 0.017453292f * xRot, 1); + sp40.x = sp40.y = 0.0f; sp40.z = 50.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp40, &sp64); + sp64.x += actor->obj.pos.x; sp64.y += actor->obj.pos.y + 8.0f; sp64.z = actor->obj.pos.z; + sp40.x = sp40.y = 0.0f; sp40.z = 80.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp40, &sp58); func_effect_8007F04C(355, sp64.x, sp64.y, sp64.z, xRot, yRot, 0.0f, 0.0f, 0.0f, 0.0f, sp58.x, sp58.y, sp58.z, 1.0f); } @@ -6016,6 +6422,7 @@ void Aquas_801BE3F8(Actor* actor) { actor->fwork[2] = 0.8f; actor->state++; break; + case 1: if (fabsf(gPlayer[0].pos.z - actor->obj.pos.z) <= 3000.0f) { actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_AQ_60314E4); @@ -6025,6 +6432,7 @@ void Aquas_801BE3F8(Actor* actor) { actor->state++; } break; + case 2: actor->unk_0B6++; if (actor->unk_0B6 == 10) { @@ -6034,6 +6442,7 @@ void Aquas_801BE3F8(Actor* actor) { 3.0f, 2); } } + if ((actor->unk_0B6 == 18) && (actor->health != 0)) { actor->unk_0B6 = 17; if ((fabsf(actor->obj.pos.z - gPlayer[0].unk_138) > 1000.0f) && (actor->timer_0BC < 20) && @@ -6049,15 +6458,18 @@ void Aquas_801BE3F8(Actor* actor) { } } } + if (actor->unk_0B6 >= Animation_GetFrameCount(&D_AQ_602201C)) { actor->info.bonus = 0; actor->unk_0B6 = Animation_GetFrameCount(&D_AQ_602201C) - 1; actor->state++; } break; + case 3: break; } + if (actor->unk_0D0 != 0) { actor->unk_0D0 = 0; if (actor->health != 0) { @@ -6065,12 +6477,15 @@ void Aquas_801BE3F8(Actor* actor) { actor->health -= actor->damage; if (actor->health <= 0) { actor->health = actor->itemDrop = 0; + func_enmy_80066254(actor); + for (i = 0; i < 10; i++) { Aquas_801AC8A8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f), actor->obj.pos.y + 50.0f + RAND_FLOAT_CENTERED(70.0f), actor->obj.pos.z + 100.0f, 3.0f, 2); } + for (i = 0; i < 3; i++) { func_effect_80081A8C(actor->obj.pos.x + RAND_FLOAT(15.0f), actor->obj.pos.y + RAND_FLOAT(3.0f), actor->obj.pos.z + RAND_FLOAT(5.0f), 1.0f + RAND_FLOAT(0.5f), 7); @@ -6079,6 +6494,7 @@ void Aquas_801BE3F8(Actor* actor) { func_effect_8007CF30(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 51.0f, 10.0f); } } + if (actor->state == 1) { actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_AQ_60314E4); actor->info.damage = 0; @@ -6096,6 +6512,7 @@ void Aquas_801BEB1C(Actor* actor) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 143, 143, 255); Animation_GetFrameData(&D_AQ_602201C, actor->unk_0B6, actor->vwork); Animation_DrawSkeleton(1, D_AQ_60220E8, actor->vwork, NULL, NULL, &actor->index, &gIdentityMatrix); + if (actor->health != 0) { RCP_SetupDL(&gMasterDisp, 0x37); Matrix_Scale(gGfxMatrix, actor->fwork[0], actor->fwork[1], actor->fwork[2], 1); From 52e1b6cb17e7ca10b1e7d5a4e0e0dd023e475a9a Mon Sep 17 00:00:00 2001 From: petrie911 <69443847+petrie911@users.noreply.github.com> Date: Mon, 8 Apr 2024 17:25:56 -0500 Subject: [PATCH 012/151] Further docs on script, various other things (#204) * stuff * too much * Torch commit * torch again * names and such * names * even more stuff * format * enums * whoops on the gbi --- .vscode/settings.json | 3 +- assets/yaml/us/ast_andross.yaml | 2 + assets/yaml/us/ast_aquas.yaml | 2 + assets/yaml/us/ast_area_6.yaml | 2 + assets/yaml/us/ast_bolse.yaml | 2 + assets/yaml/us/ast_corneria.yaml | 2 + assets/yaml/us/ast_fortuna.yaml | 2 + assets/yaml/us/ast_katina.yaml | 2 + assets/yaml/us/ast_macbeth.yaml | 2 + assets/yaml/us/ast_meteo.yaml | 2 + assets/yaml/us/ast_sector_x.yaml | 2 + assets/yaml/us/ast_sector_y.yaml | 2 + assets/yaml/us/ast_sector_z.yaml | 2 + assets/yaml/us/ast_solar.yaml | 2 + assets/yaml/us/ast_titania.yaml | 2 + assets/yaml/us/ast_training.yaml | 2 + assets/yaml/us/ast_venom_1.yaml | 2 + assets/yaml/us/ast_venom_2.yaml | 2 + assets/yaml/us/ast_versus.yaml | 2 + assets/yaml/us/ast_zoness.yaml | 2 + config.yml | 4 +- include/context.h | 58 +- include/fox_option.h | 2 +- include/functions.h | 56 +- include/global.h | 1 + include/i1.h | 10 +- include/i3.h | 4 +- include/i5.h | 4 +- include/libultra/ultra64.h | 2 +- include/prevent_bss_reordering3.h | 28 + include/prevent_context_reordering.h | 140 +-- include/sf64event.h | 374 +++++++ include/sf64level.h | 393 ------- include/sf64object.h | 479 ++++++++- include/sf64player.h | 39 +- include/sf64thread.h | 9 +- include/sys.h | 8 +- include/variables.h | 88 +- linker_scripts/us/symbol_addrs_engine.txt | 116 +- linker_scripts/us/symbol_addrs_nlib_funcs.txt | 4 +- src/engine/fox_360.c | 256 ++--- src/engine/fox_A48A0.c | 14 +- src/engine/fox_beam.c | 92 +- src/engine/fox_bg.c | 54 +- src/engine/fox_boss.c | 12 +- src/engine/fox_context.c | 66 +- src/engine/fox_demo.c | 137 +-- src/engine/fox_display.c | 141 +-- src/engine/fox_edata_info.c | 291 +++--- src/engine/fox_edisplay.c | 526 +++++----- src/engine/fox_effect.c | 127 +-- src/engine/fox_enmy.c | 987 +++++++++--------- src/engine/fox_enmy2.c | 625 +++++------ src/engine/fox_game.c | 120 +-- src/engine/fox_hud.c | 408 ++++---- src/engine/fox_message.c | 2 +- src/engine/fox_play.c | 557 +++++----- src/engine/fox_radio.c | 73 +- src/engine/fox_rcp.c | 1 - src/engine/fox_std_lib.c | 4 +- src/engine/fox_tank.c | 49 +- src/engine/fox_versus.c | 57 +- src/mods/sfxjukebox.c | 2 +- src/overlays/ovl_ending/fox_end1.c | 66 +- src/overlays/ovl_ending/fox_end2.c | 27 +- src/overlays/ovl_i1/fox_co.c | 234 +++-- src/overlays/ovl_i1/fox_tr.c | 52 +- src/overlays/ovl_i1/fox_tr360.c | 28 +- src/overlays/ovl_i1/fox_ve1.c | 96 +- src/overlays/ovl_i2/fox_me.c | 146 +-- src/overlays/ovl_i2/fox_sx.c | 98 +- src/overlays/ovl_i3/fox_a6.c | 174 +-- src/overlays/ovl_i3/fox_aq.c | 447 ++++---- src/overlays/ovl_i3/fox_so.c | 160 +-- src/overlays/ovl_i3/fox_zo.c | 283 ++--- src/overlays/ovl_i4/fox_bo.c | 175 ++-- src/overlays/ovl_i4/fox_fo.c | 288 ++--- src/overlays/ovl_i4/fox_ka.c | 151 +-- src/overlays/ovl_i4/fox_sz.c | 158 +-- src/overlays/ovl_i5/fox_ma.c | 318 +++--- src/overlays/ovl_i5/fox_ti.c | 167 +-- src/overlays/ovl_i5/fox_ti_cs.c | 24 +- src/overlays/ovl_i6/fox_andross.c | 294 +++--- src/overlays/ovl_i6/fox_sy.c | 520 ++++----- src/overlays/ovl_i6/fox_turret.c | 10 +- src/overlays/ovl_i6/fox_ve2.c | 97 +- src/overlays/ovl_menu/fox_map.c | 167 ++- src/overlays/ovl_menu/fox_option.c | 97 +- src/overlays/ovl_menu/fox_title.c | 172 +-- src/sys/sys_lib.c | 4 +- src/sys/sys_math.c | 1 + tools/Torch | 2 +- 92 files changed, 5714 insertions(+), 5203 deletions(-) create mode 100644 include/prevent_bss_reordering3.h create mode 100644 include/sf64event.h diff --git a/.vscode/settings.json b/.vscode/settings.json index f9c5ca86..c7749127 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -136,7 +136,8 @@ "ast_vs_menu.h": "c", "sf64mesg.h": "c", "sf64audio_external.h": "c", - "audioseq_cmd.h": "c" + "audioseq_cmd.h": "c", + "ultralog.h": "c" }, "C_Cpp_Runner.msvcBatchPath": "" } \ No newline at end of file diff --git a/assets/yaml/us/ast_andross.yaml b/assets/yaml/us/ast_andross.yaml index 1ec4aa7d..002f2646 100644 --- a/assets/yaml/us/ast_andross.yaml +++ b/assets/yaml/us/ast_andross.yaml @@ -9,6 +9,8 @@ - '#include "sf64object.h"' - '#include "structs.h"' - '#include "sf64level.h"' + - '#include "sf64event.h"' + - '#include "sf64player.h"' - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' diff --git a/assets/yaml/us/ast_aquas.yaml b/assets/yaml/us/ast_aquas.yaml index 51e98546..df2aec6c 100644 --- a/assets/yaml/us/ast_aquas.yaml +++ b/assets/yaml/us/ast_aquas.yaml @@ -9,6 +9,8 @@ - '#include "sf64object.h"' - '#include "structs.h"' - '#include "sf64level.h"' + - '#include "sf64event.h"' + - '#include "sf64player.h"' - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' diff --git a/assets/yaml/us/ast_area_6.yaml b/assets/yaml/us/ast_area_6.yaml index bca6b106..474696ce 100644 --- a/assets/yaml/us/ast_area_6.yaml +++ b/assets/yaml/us/ast_area_6.yaml @@ -9,6 +9,8 @@ - '#include "sf64object.h"' - '#include "structs.h"' - '#include "sf64level.h"' + - '#include "sf64event.h"' + - '#include "sf64player.h"' - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' D_A6_6000000: diff --git a/assets/yaml/us/ast_bolse.yaml b/assets/yaml/us/ast_bolse.yaml index 50fda4e1..a5c8ff17 100644 --- a/assets/yaml/us/ast_bolse.yaml +++ b/assets/yaml/us/ast_bolse.yaml @@ -9,6 +9,8 @@ - '#include "sf64object.h"' - '#include "structs.h"' - '#include "sf64level.h"' + - '#include "sf64event.h"' + - '#include "sf64player.h"' - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' # Bolse Defense Outpost diff --git a/assets/yaml/us/ast_corneria.yaml b/assets/yaml/us/ast_corneria.yaml index 0d4620cd..abfe041b 100644 --- a/assets/yaml/us/ast_corneria.yaml +++ b/assets/yaml/us/ast_corneria.yaml @@ -9,6 +9,8 @@ - '#include "sf64object.h"' - '#include "structs.h"' - '#include "sf64level.h"' + - '#include "sf64event.h"' + - '#include "sf64player.h"' - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' diff --git a/assets/yaml/us/ast_fortuna.yaml b/assets/yaml/us/ast_fortuna.yaml index 6eac2f96..e782ea7c 100644 --- a/assets/yaml/us/ast_fortuna.yaml +++ b/assets/yaml/us/ast_fortuna.yaml @@ -8,6 +8,8 @@ - '#include "gfx.h"' - '#include "sf64object.h"' - '#include "sf64level.h"' + - '#include "sf64event.h"' + - '#include "sf64player.h"' - '#include "sf64audio_external.h"' - '#include "structs.h"' diff --git a/assets/yaml/us/ast_katina.yaml b/assets/yaml/us/ast_katina.yaml index efb8dde8..74660f94 100644 --- a/assets/yaml/us/ast_katina.yaml +++ b/assets/yaml/us/ast_katina.yaml @@ -8,6 +8,8 @@ - '#include "gfx.h"' - '#include "sf64object.h"' - '#include "sf64level.h"' + - '#include "sf64event.h"' + - '#include "sf64player.h"' - '#include "sf64audio_external.h"' - '#include "structs.h"' diff --git a/assets/yaml/us/ast_macbeth.yaml b/assets/yaml/us/ast_macbeth.yaml index 9845ffaa..c95f7f61 100644 --- a/assets/yaml/us/ast_macbeth.yaml +++ b/assets/yaml/us/ast_macbeth.yaml @@ -9,6 +9,8 @@ - '#include "sf64object.h"' - '#include "structs.h"' - '#include "sf64level.h"' + - '#include "sf64event.h"' + - '#include "sf64player.h"' - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' diff --git a/assets/yaml/us/ast_meteo.yaml b/assets/yaml/us/ast_meteo.yaml index 07285072..190ed367 100644 --- a/assets/yaml/us/ast_meteo.yaml +++ b/assets/yaml/us/ast_meteo.yaml @@ -9,6 +9,8 @@ - '#include "sf64object.h"' - '#include "structs.h"' - '#include "sf64level.h"' + - '#include "sf64event.h"' + - '#include "sf64player.h"' - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' # Meteo diff --git a/assets/yaml/us/ast_sector_x.yaml b/assets/yaml/us/ast_sector_x.yaml index 04430e98..0fcc5178 100644 --- a/assets/yaml/us/ast_sector_x.yaml +++ b/assets/yaml/us/ast_sector_x.yaml @@ -9,6 +9,8 @@ - '#include "sf64object.h"' - '#include "structs.h"' - '#include "sf64level.h"' + - '#include "sf64event.h"' + - '#include "sf64player.h"' - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' diff --git a/assets/yaml/us/ast_sector_y.yaml b/assets/yaml/us/ast_sector_y.yaml index 96661beb..22420b11 100644 --- a/assets/yaml/us/ast_sector_y.yaml +++ b/assets/yaml/us/ast_sector_y.yaml @@ -9,6 +9,8 @@ - '#include "sf64object.h"' - '#include "structs.h"' - '#include "sf64level.h"' + - '#include "sf64event.h"' + - '#include "sf64player.h"' - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' - '#include "sf64mesg.h"' diff --git a/assets/yaml/us/ast_sector_z.yaml b/assets/yaml/us/ast_sector_z.yaml index 130a17c3..9021db0a 100644 --- a/assets/yaml/us/ast_sector_z.yaml +++ b/assets/yaml/us/ast_sector_z.yaml @@ -9,6 +9,8 @@ - '#include "sf64object.h"' - '#include "structs.h"' - '#include "sf64level.h"' + - '#include "sf64event.h"' + - '#include "sf64player.h"' - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' diff --git a/assets/yaml/us/ast_solar.yaml b/assets/yaml/us/ast_solar.yaml index 835e03f5..1a1f05e8 100644 --- a/assets/yaml/us/ast_solar.yaml +++ b/assets/yaml/us/ast_solar.yaml @@ -9,6 +9,8 @@ - '#include "sf64object.h"' - '#include "structs.h"' - '#include "sf64level.h"' + - '#include "sf64event.h"' + - '#include "sf64player.h"' - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' diff --git a/assets/yaml/us/ast_titania.yaml b/assets/yaml/us/ast_titania.yaml index 3650f19b..129571c0 100644 --- a/assets/yaml/us/ast_titania.yaml +++ b/assets/yaml/us/ast_titania.yaml @@ -9,6 +9,8 @@ - '#include "sf64object.h"' - '#include "structs.h"' - '#include "sf64level.h"' + - '#include "sf64event.h"' + - '#include "sf64player.h"' - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' diff --git a/assets/yaml/us/ast_training.yaml b/assets/yaml/us/ast_training.yaml index 63938977..501c80c6 100644 --- a/assets/yaml/us/ast_training.yaml +++ b/assets/yaml/us/ast_training.yaml @@ -9,6 +9,8 @@ - '#include "sf64object.h"' - '#include "structs.h"' - '#include "sf64level.h"' + - '#include "sf64event.h"' + - '#include "sf64player.h"' - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' diff --git a/assets/yaml/us/ast_venom_1.yaml b/assets/yaml/us/ast_venom_1.yaml index a9d31f5e..f1080732 100644 --- a/assets/yaml/us/ast_venom_1.yaml +++ b/assets/yaml/us/ast_venom_1.yaml @@ -8,6 +8,8 @@ - '#include "gfx.h"' - '#include "sf64object.h"' - '#include "sf64level.h"' + - '#include "sf64event.h"' + - '#include "sf64player.h"' - '#include "sf64audio_external.h"' - '#include "structs.h"' - '#include "sf64mesg.h"' diff --git a/assets/yaml/us/ast_venom_2.yaml b/assets/yaml/us/ast_venom_2.yaml index 04ee9f9d..d3f3e6b0 100644 --- a/assets/yaml/us/ast_venom_2.yaml +++ b/assets/yaml/us/ast_venom_2.yaml @@ -8,6 +8,8 @@ - '#include "gfx.h"' - '#include "sf64object.h"' - '#include "sf64level.h"' + - '#include "sf64event.h"' + - '#include "sf64player.h"' - '#include "sf64audio_external.h"' - '#include "structs.h"' diff --git a/assets/yaml/us/ast_versus.yaml b/assets/yaml/us/ast_versus.yaml index edc77d54..8d9bb09b 100644 --- a/assets/yaml/us/ast_versus.yaml +++ b/assets/yaml/us/ast_versus.yaml @@ -9,6 +9,8 @@ - '#include "sf64object.h"' - '#include "structs.h"' - '#include "sf64level.h"' + - '#include "sf64event.h"' + - '#include "sf64player.h"' - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' diff --git a/assets/yaml/us/ast_zoness.yaml b/assets/yaml/us/ast_zoness.yaml index 26bd8f3c..8696c932 100644 --- a/assets/yaml/us/ast_zoness.yaml +++ b/assets/yaml/us/ast_zoness.yaml @@ -9,6 +9,8 @@ - '#include "sf64object.h"' - '#include "structs.h"' - '#include "sf64level.h"' + - '#include "sf64event.h"' + - '#include "sf64player.h"' - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' D_ZO_6000000: diff --git a/config.yml b/config.yml index 9d3ff553..619255b9 100644 --- a/config.yml +++ b/config.yml @@ -16,4 +16,6 @@ f7475fb11e7e6830f82883412638e8390791ab87: - include/sf64object.h - include/sf64level.h - include/sf64mesg.h - - include/sf64audio_external.h \ No newline at end of file + - include/sf64audio_external.h + - include/sf64event.h + - include/sf64player.h \ No newline at end of file diff --git a/include/context.h b/include/context.h index 3b1063b4..8b00a24b 100644 --- a/include/context.h +++ b/include/context.h @@ -11,10 +11,10 @@ extern s32 gOverlayStage; extern s32 D_ctx_80177824; // some sort of flag extern s32 D_ctx_8017782C; // some sort of flag. all range related? extern GameState gGameState; -extern s32 D_Timer_8017783C; // next game state timer? +extern s32 gNextGameStateTimer; // next game state timer? extern s32 D_ctx_80177844; // timer for vs item spawn extern OptionState gOptionMenuStatus; -extern s32 D_ctx_80177854; // pause-related state +extern s32 gPlayState; // pause-related state extern s32 D_ctx_80177868; // some sort of state. pause-related? extern LevelMode gLevelMode; extern DrawMode gDrawMode; @@ -22,9 +22,9 @@ extern s32 gPlayerNum; extern s32 gCamCount; extern s32 gTeamShields[6]; extern s32 gSavedTeamShields[6]; -extern UNK_TYPE D_ctx_801778F0[6]; +extern UNK_TYPE gPrevPlanetSavedTeamShields[6]; extern s32 gTeamDamage[6]; -extern u8 D_ctx_80177930; // next planet path +extern u8 gNextPlanetPath; // next planet path extern f32 gGroundLevel; extern f32 D_ctx_80177950; extern f32 D_ctx_80177968; @@ -53,7 +53,7 @@ extern s32 D_ctx_80177B70[7]; extern PlanetId D_ctx_80177B90[7]; extern s32 D_ctx_80177BB0[7]; extern s32 D_ctx_80177BD8[22]; // overruns D_ctx_80177C30? -extern s32 D_ctx_80177C38[6]; +extern s32 gPrevPlanetTeamShields[6]; extern s32 D_ctx_80177C58[6]; extern u8 gSoundMode; extern s32 gVolumeSettings[3]; @@ -77,13 +77,13 @@ extern s32 gGameFrameCount; extern s32 D_ctx_80177DC8; extern s32 D_ctx_80177E70; extern s32 D_ctx_80177E78; -extern s32 D_ctx_80177E80; +extern s32 gRingPassCount; extern Vec3f D_ctx_80177E88; extern Vec3f D_ctx_80177F10; extern UNK_TYPE F_80178020; extern s32 D_ctx_8017812C; extern LevelId gCurrentLevel; -extern s32 D_ctx_8017827C; +extern s32 gLevelStage; extern s32 gBossActive; extern s32 D_ctx_8017828C; extern s32 D_ctx_80178294; @@ -101,17 +101,17 @@ extern UNK_TYPE F_801782F0; extern s32 D_ctx_801782F8; extern s32 D_ctx_80178300; extern u16* D_ctx_80178308; -extern ObjectInit* D_ctx_80178310; +extern ObjectInit* gLevelObjects; extern s32 gFogRed; extern s32 gFogGreen; extern s32 gFogBlue; extern s32 gFogAlpha; -extern s32 D_ctx_80178340; // alpha something -extern s32 D_ctx_80178348; // red something -extern s32 D_ctx_80178350; // green something -extern s32 D_ctx_80178354; // blue something -extern s32 D_ctx_80178358; // alpha target -extern s32 D_ctx_8017835C; // alpha step +extern s32 gFillScreenAlpha; // alpha something +extern s32 gFillScreenRed; // red something +extern s32 gFillScreenGreen; // green something +extern s32 gFillScreenBlue; // blue something +extern s32 gFillScreenAlphaTarget; // alpha target +extern s32 gFillScreenAlphaStep; // alpha step extern s32 D_ctx_80178360; // 2 lights second color extern s32 D_ctx_80178364; extern s32 D_ctx_80178368; @@ -120,10 +120,10 @@ extern f32 D_ctx_80178370; // Vec3f? extern f32 D_ctx_80178374; extern f32 D_ctx_80178378; extern s32 D_ctx_8017837C; -extern u32 D_ctx_80178380[4]; // player alphas -extern s32 D_ctx_80178390[4]; // player reds -extern s32 D_ctx_801783A0[4]; // player greens -extern s32 D_ctx_801783B0[4]; // player blues +extern u32 gPlayerFillScreenAlphas[4]; // player alphas +extern s32 gPlayerFillScreenReds[4]; // player reds +extern s32 gPlayerFillScreenGreens[4]; // player greens +extern s32 gPlayerFillScreenBlues[4]; // player blues extern s32 D_ctx_801783C0[4]; extern f32 D_ctx_801783D0; // something x translate extern f32 D_ctx_801783D4; // something y translate @@ -218,8 +218,8 @@ extern s32 D_ctx_80161A78; extern s32 D_ctx_80161A7C; extern s32 D_ctx_80161A80; extern s32 D_ctx_80161A84; -extern s32 D_ctx_80161A88; -extern s32 D_ctx_80161A8C; +extern s32 gGroundType; +extern s32 gSavedGroundType; extern u8 gGoldRingCount[4]; extern u8 D_ctx_80161A94[4]; extern s32 gHitCount; @@ -229,7 +229,7 @@ extern LaserStrength gLaserStrength[4]; extern s32 D_ctx_80161AB8; extern UNK_TYPE F_80161AC0[16]; extern Object_80 gObjects80[50]; -extern Object_4C gObjects4C[40]; +extern Sprite gSprites[40]; extern Actor gActors[60]; extern Boss gBosses[4]; extern Effect gEffects[100]; @@ -245,10 +245,10 @@ extern f32 D_ctx_80176B98[2][100]; extern f32 D_ctx_80176EB8[2][100]; extern f32 D_ctx_801771D8[2][100]; extern f32 D_ctx_80177500[2][100]; -extern u16 D_ctx_80177828; // enemy shot speed? +extern u16 gEnemyShotSpeed; // enemy shot speed? extern u8 D_ctx_80177830; // show level complete status overlay -extern s32 D_ctx_80177838; // level clear related -extern s32 D_ctx_80177840; // timer for mission accomplished scrren +extern s32 gLevelStatusScreenTimer; // level clear related +extern s32 gLevelClearScreenTimer; // timer for mission accomplished scrren extern s32 gBossHealthBar; extern s32 D_ctx_80177850; // bonus text related. set to 15 but never read extern s32 D_ctx_80177858[4]; @@ -270,7 +270,7 @@ extern OSContPad* gInputPress; extern u8* D_ctx_80177984; extern s32 D_ctx_80177990[4]; extern f32 D_ctx_801779A8[4]; -extern u8 D_ctx_801779BC; +extern u8 gPauseEnabled; extern s32 gChargeTimers[4]; extern f32 D_ctx_801779E4; extern f32 D_ctx_801779F4; @@ -301,8 +301,8 @@ extern s32 D_ctx_80177CAC; extern s32 D_ctx_80177CB4; extern s32 D_ctx_80177CBC; extern s32 D_ctx_80177CC4; -extern s32 D_ctx_80177CD0[6]; -extern s32 D_ctx_80177CF0[6]; +extern s32 gStarWolfTeamAlive[6]; +extern s32 gSavedStarWolfTeamAlive[6]; extern s32 gRightWingHealth[4]; extern s32 gLeftWingHealth[4]; extern s32 D_ctx_80177D40[4]; @@ -314,8 +314,8 @@ extern s32 D_ctx_80177DB8[4]; extern s32 D_ctx_80177DD0[4][10]; extern s32 D_ctx_80177E74; extern s32 D_ctx_80177E7C; -extern s32 D_ctx_80177E84; -extern Vec3f D_ctx_80177E98[10]; +extern s32 gChangeTo360; +extern Vec3f gTeamArrowsViewPos[10]; extern f32 D_ctx_80177F20[65]; extern f32 D_ctx_80178028[65]; extern f32 D_ctx_80178130[65]; diff --git a/include/fox_option.h b/include/fox_option.h index 51877be6..5078e561 100644 --- a/include/fox_option.h +++ b/include/fox_option.h @@ -77,7 +77,7 @@ typedef enum OptionId { #define OPTION_COUNT ARRAY_COUNT(sOptionCardList) -extern void* D_menu_801B68B0[]; +extern u8* D_menu_801B68B0[]; extern u8* D_menu_801B68D4[]; extern s32 D_menu_801B8220[]; // total hits ranking? see Option_80197DE4 diff --git a/include/functions.h b/include/functions.h index 41678dcd..c2e31d14 100644 --- a/include/functions.h +++ b/include/functions.h @@ -10,7 +10,7 @@ // fox_360 void func_360_8002ED60(Player*); void func_360_8002E3E0(Actor*); -void func_360_8002E548(void); +void AllRange_UpdateCountdown(void); void func_360_8002E5E0(Boss*); void func_360_8002E604(Boss*); void func_360_8002E628(Boss*); @@ -30,7 +30,7 @@ void func_360_8002FC00(Actor*); void func_360_8003088C(Actor*); bool func_360_80031900(Actor*); void ActorAllRange_Update(Actor* this); -void ActorAllRange_Draw(Actor* actor); +void ActorAllRange_Draw(Actor* this); //fox_beam void func_beam_80038140(PlayerShot* shot); @@ -38,8 +38,8 @@ void func_beam_80036318(PlayerShot* shot); void func_beam_80035DEC(f32 xPos, f32 yPos, f32 zPos); void PlayerShot_Initialize(PlayerShot*); void func_beam_800365E4(f32, f32, f32, f32, f32, f32, f32, f32, f32, s32, s32); -void func_beam_8003D9B8(void); -void func_beam_8003DA0C(void); +void PlayerShot_Update(void); +void PlayerShot_Draw(void); // fox_bg void func_bg_8003DAF0(void); @@ -91,7 +91,7 @@ void func_demo_800515C4(void); void func_display_80053658(WingInfo*); void func_display_8005465C(s32); void func_display_80057814(Player*); -void func_display_80057D00(void); +void Play_Draw(void); // fox_edata void func_edata_800594F0(Object_80*); @@ -101,15 +101,15 @@ void func_edata_800596B0(Actor*); // fox_edisplay void Graphics_SetScaleMtx(f32); -void func_edisplay_80059850(Object_4C*); +void Sprite168_Draw(Sprite*); void Actor201_Draw(Actor*); void Actor202_Draw(Actor*); void Obj39_Draw(Object_80*); void func_edisplay_80059B20(Object_80*); void Obj42_Draw(Object_80*); void Actor196_Draw(Actor*); -void func_edisplay_80059C34(Object_4C*); -void func_edisplay_80059C40(Object_4C*); +void Sprite167_Draw(Sprite*); +void FogShadow_Draw(Sprite*); void func_edisplay_80059F68(Object_80*); void func_edisplay_80059FDC(Object_80*); void Actor189_Draw(Actor*); @@ -146,7 +146,7 @@ void Object_Kill(Object*, f32*); bool func_enmy_80060FE4(Vec3f*, f32); void Object_SetInfo(ObjectInfo* info, u32 objId); void Object_80_Initialize(Object_80*); -void Object_4C_Initialize(Object_4C*); +void Sprite_Initialize(Sprite*); void Actor_Initialize(Actor*); void Boss_Initialize(Boss*); void Item_Initialize(Item*); @@ -167,14 +167,14 @@ void func_enmy_800652CC(Object_80*); void func_enmy_800654E4(Object*); void func_enmy_800656D4(Actor*); void func_enmy_800660F0(Actor*); -void func_enmy_80066254(Actor*); +void Actor_Despawn(Actor*); void func_enmy_8006654C(Actor*); void func_enmy_8006684C(Actor*); void func_enmy_800669A0(Actor*); void func_enmy_80066A80(Actor*); void func_enmy_80066C00(Object_80*); void func_enmy_80066D5C(Object_80*); -void func_enmy_80066E8C(Object_4C*); +void Sprite167_Update(Sprite*); void func_enmy_80066EA8(Object_80*); void func_enmy_80066EF0(Item*); void func_enmy_800671D0(Item*); @@ -191,25 +191,25 @@ void ItemGoldRing_Update(Item*); void ItemWingRepair_Update(Item*); void ItemMeteoWarp_Update(Item*); void ItemCheckpoint_Update(Item*); -void func_enmy_80068C48(Item*); -void func_enmy_80068C88(Item*); -void func_enmy_80068FE0(Object_4C*); +void ItemRingCheck_Update(Item*); +void ItemPathChange_Update(Item*); +void Sprite_UpdateDoodad(Sprite*); void Object_Dying(s32, ObjectId); -void func_enmy_80069924(Effect*); -void func_enmy_800693E8(Actor*); -void func_enmy_80069658(Boss*); -void func_enmy_800696F8(Object_80*); -void func_enmy_80069858(Object_4C*); -void func_enmy_80069A10(Item*); +void Effect_Move(Effect*); +void Actor_Move(Actor*); +void Boss_Move(Boss*); +void Object80_Move(Object_80*); +void Sprite_Move(Sprite*); +void Item_Move(Item*); void Actor_Update(Actor*); void Boss_Update(Boss*); void Object_80_Update(Object_80*); -void Object_4C_Update(Object_4C*); +void Sprite_Update(Sprite*); void Item_Update(Item*); void Effect_Update(Effect*); void TexturedLine_Update(TexturedLine*); void TexturedLine_UpdateAll(void); -void Object_UpdateAll(void); +void Object_Update(void); //fox_enmy2 void Actor237_Update(Actor*); @@ -342,11 +342,11 @@ void func_effect_8007E3E4(Effect*); void func_effect_8007E45C(Effect*); void func_effect_8007E5CC(Effect*); void func_effect_8007E648(Effect*); -void func_effect_8007E93C(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPos, f32 arg5); +void func_effect_8007E93C(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPos, f32 speed); void func_effect_8007EE68(ObjectId objId, Vec3f* pos, Vec3f* rot, Vec3f* arg3, Vec3f* arg4, f32 scale2); void func_effect_8007F04C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 zRot, f32 unkX, f32 unkY, f32 unkZ, f32 xVel, f32 yVel, f32 zVel, f32 scale2); -void func_effect_8007F11C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 arg4); -void func_effect_8007F20C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 arg4); +void func_effect_8007F11C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 speed); +void func_effect_8007F20C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 speed); void func_effect_8007F438(Effect*); void func_effect_8007F6B0(Effect*); void func_effect_8007F958(Effect*); @@ -418,7 +418,7 @@ bool func_hud_800915FC(Actor*); bool func_hud_800924E0(Actor*); void ActorTeamBoss_Init(Actor*); -void ActorTeamBoss_Update(Actor* actor); +void ActorTeamBoss_Update(Actor* this); void func_hud_80093164(Actor*); void func_hud_800935E8(Player*); void func_hud_800953A0(Actor*, s32); @@ -447,7 +447,7 @@ void func_play_800A3FB0(void); s32 Play_GetMaxShields(void); void func_play_800A6028(f32*, u32); void func_play_800AC290(Player* player, PlayerShot* shot, f32 arg2, f32 arg3, PlayerShotId shotId, f32 arg5); -void func_play_800A5844(void); +void Play_Setup(void); void func_play_800A594C(void); void func_play_800A5D6C(void); void func_play_800A5EBC(void); @@ -478,7 +478,7 @@ void func_play_800B6F50(f32, f32, f32, f32, f32, f32); void func_play_800B7184(Player*, s32); void func_play_800B73E0(Player*); void func_play_800B852C(ObjectId , Item*); -void func_play_800B86CC(void); +void Play_Main(void); void func_play_800A668C(f32 xPos, f32 yPos, f32 zPos); void func_play_800AD7F0(Player* player); void func_play_800ADF58(Player* player); diff --git a/include/global.h b/include/global.h index f001ef09..9811992c 100644 --- a/include/global.h +++ b/include/global.h @@ -12,6 +12,7 @@ #include "assets/ast_radio.h" #include "sf64object.h" #include "sf64level.h" +#include "sf64event.h" #include "sf64player.h" #include "i1.h" #include "i2.h" diff --git a/include/i1.h b/include/i1.h index 608abcc8..90c56785 100644 --- a/include/i1.h +++ b/include/i1.h @@ -15,7 +15,7 @@ extern void Corneria_8018F880(Player*); extern void Corneria_80191160(Player*); extern void Venom1_801988B8(Player*); -void Corneria_801875A4(Object_4C*); +void Corneria_801875A4(Sprite*); void Corneria_80189058(Boss*); void Corneria_8018AA74(Boss*); void Corneria_8018AED0(Actor*); @@ -36,10 +36,10 @@ void Corneria_8018EE84(Boss*); void Corneria_8018EF90(Boss*); void Corneria_8018F044(Object_80*); void Corneria_8018F31C(Object_80*); -void Venom1_801922DC(Object_4C*); -void Venom1_80192358(Object_4C*); -void Venom1_801923C0(Object_4C*); -void Venom1_8019243C(Object_4C*); +void Venom1_BossTrigger1_Update(Sprite*); +void Venom1_BossTrigger2_Update(Sprite*); +void Venom1_BossTrigger3_Update(Sprite*); +void Venom1_BossTrigger4_Update(Sprite*); void Venom1_80192518(Actor*); void Venom1_80192CD4(Actor*); void Venom1_80192E2C(Actor*); diff --git a/include/i3.h b/include/i3.h index 261519fc..75acfa8d 100644 --- a/include/i3.h +++ b/include/i3.h @@ -45,7 +45,7 @@ void Zoness_80192834(Actor* actor); void Zoness_80192C18(Actor* actor); void Zoness_80192E64(Actor* actor); void Zoness_80193240(Actor* actor); -void Zoness_BossZo_Init(Boss* bossZO); +void Zoness_BossZo_Init(Boss* this); void Zoness_801949DC(Boss* bossZO); void Zoness_80194A84(Boss* bossZO); void Zoness_8019969C(Actor* actor); @@ -69,7 +69,7 @@ void Zoness_8019C454(Actor* actor); void Zoness_8019C83C(Actor* actor); void Zoness_8019CBEC(Actor* actor); void Zoness_8019CE58(Actor* actor); -void Zoness_Actor247_Init(Actor* actor); +void Zoness_Actor247_Init(Actor* this); void Zoness_8019D15C(Actor* actor); void Zoness_8019D3C4(Actor* actor); void Zoness_8019D428(Player* player); diff --git a/include/i5.h b/include/i5.h index 4a4fe28a..a711acd7 100644 --- a/include/i5.h +++ b/include/i5.h @@ -35,7 +35,7 @@ void Titania_8018BFB0(Actor *); void Titania_8018E3B0(Actor *); void Titania_8018E3CC(Actor *); void Titania_8018E5E8(Actor *); -void Titania_8018EFF0(Object_4C *); +void Titania_8018EFF0(Sprite *); void Titania_8018F0D8(Object_80 *); void Titania_Boss306_Init(Boss *); void Titania_801990DC(Boss *); @@ -80,7 +80,7 @@ void Titania_8018E54C(Actor*); void Titania_8018E5B4(Actor*); void Titania_8018E5F8(Actor*); void Titania_8018EF14(Actor*); -void Titania_8018F038(Object_4C*); +void Titania_Cactus_Update(Sprite*); void Titania_8018F4D8(Object_80*); void Titania_8018F8B8(Object_80*); void Titania_80197A94(Boss*); diff --git a/include/libultra/ultra64.h b/include/libultra/ultra64.h index 94e177cc..afa11db4 100644 --- a/include/libultra/ultra64.h +++ b/include/libultra/ultra64.h @@ -32,7 +32,7 @@ #include #include #include -#include +// #include #include #include #include diff --git a/include/prevent_bss_reordering3.h b/include/prevent_bss_reordering3.h new file mode 100644 index 00000000..3d690bfe --- /dev/null +++ b/include/prevent_bss_reordering3.h @@ -0,0 +1,28 @@ +#ifndef PREVENT_BSS_REORDERING3_H +#define PREVENT_BSS_REORDERING3_H + +/** + * See the explanation at prevent_bss_reordering.h + * + * Instead of producing 64 dummy declarations, this header only produces 32 + * dummy declarations + */ + +struct Dummy200 { int x; }; +struct Dummy201 { int x; }; +struct Dummy202 { int x; }; +struct Dummy203 { int x; }; +struct Dummy204 { int x; }; +struct Dummy205 { int x; }; +struct Dummy206 { int x; }; +struct Dummy207 { int x; }; +struct Dummy208 { int x; }; +struct Dummy209 { int x; }; +struct Dummy210 { int x; }; +struct Dummy211 { int x; }; +struct Dummy212 { int x; }; +struct Dummy213 { int x; }; +struct Dummy214 { int x; }; +struct Dummy215 { int x; }; + +#endif diff --git a/include/prevent_context_reordering.h b/include/prevent_context_reordering.h index 3dbec6b7..2273a083 100644 --- a/include/prevent_context_reordering.h +++ b/include/prevent_context_reordering.h @@ -1,7 +1,7 @@ #ifndef PREVENT_CONTEXT_REORDERING_H #define PREVENT_CONTEXT_REORDERING_H -extern int Dummyhalf; +// extern int Dummyhalf; // struct Dummy0 {int x;}; // struct Dummy1 {int x;}; // struct Dummy2 {int x;}; @@ -9,20 +9,20 @@ extern int Dummyhalf; // struct Dummy4 {int x;}; // struct Dummy5 {int x;}; // struct Dummy6 {int x;}; -// struct Dummy7 {int x;}; -// struct Dummy8 {int x;}; -// struct Dummy9 {int x;}; -// struct Dummy10 {int x;}; -// struct Dummy11 {int x;}; -// struct Dummy12 {int x;}; -// struct Dummy13 {int x;}; -// struct Dummy14 {int x;}; -// struct Dummy15 {int x;}; -// struct Dummy16 {int x;}; -// struct Dummy17 {int x;}; -// struct Dummy18 {int x;}; -// struct Dummy19 {int x;}; -// struct Dummy20 {int x;}; +struct Dummy7 {int x;}; +struct Dummy8 {int x;}; +struct Dummy9 {int x;}; +struct Dummy10 {int x;}; +struct Dummy11 {int x;}; +struct Dummy12 {int x;}; +struct Dummy13 {int x;}; +struct Dummy14 {int x;}; +struct Dummy15 {int x;}; +struct Dummy16 {int x;}; +struct Dummy17 {int x;}; +struct Dummy18 {int x;}; +struct Dummy19 {int x;}; +struct Dummy20 {int x;}; struct Dummy21 {int x;}; struct Dummy22 {int x;}; struct Dummy23 {int x;}; @@ -74,60 +74,60 @@ struct Dummy68 {int x;}; struct Dummy69 {int x;}; struct Dummy70 {int x;}; struct Dummy71 {int x;}; -// struct Dummy72 {int x;}; -// struct Dummy73 {int x;}; -// struct Dummy75 { int x; }; -// struct Dummy76 { int x; }; -// struct Dummy77 { int x; }; -// struct Dummy78 { int x; }; -// struct Dummy79 { int x; }; -// struct Dummy80 { int x; }; -// struct Dummy81 { int x; }; -// struct Dummy82 { int x; }; -// struct Dummy83 { int x; }; -// struct Dummy84 { int x; }; -// struct Dummy85 { int x; }; -// struct Dummy86 { int x; }; -// struct Dummy87 { int x; }; -// struct Dummy88 { int x; }; -// struct Dummy89 { int x; }; -// struct Dummy90 { int x; }; -// struct Dummy91 { int x; }; -// struct Dummy92 { int x; }; -// struct Dummy93 { int x; }; -// struct Dummy94 { int x; }; -// struct Dummy95 { int x; }; -// struct Dummy96 { int x; }; -// struct Dummy97 { int x; }; -// struct Dummy98 { int x; }; -// struct Dummy99 { int x; }; -// struct Dummy100 { int x; }; -// struct Dummy101 { int x; }; -// struct Dummy102 { int x; }; -// struct Dummy103 { int x; }; -// struct Dummy104 { int x; }; -// struct Dummy105 { int x; }; -// struct Dummy106 { int x; }; -// struct Dummy107 { int x; }; -// struct Dummy108 { int x; }; -// struct Dummy109 { int x; }; -// struct Dummy110 { int x; }; -// struct Dummy111 { int x; }; -// struct Dummy112 { int x; }; -// struct Dummy113 { int x; }; -// struct Dummy114 { int x; }; -// struct Dummy115 { int x; }; -// struct Dummy116 { int x; }; -// struct Dummy117 { int x; }; -// struct Dummy118 { int x; }; -// struct Dummy119 { int x; }; -// struct Dummy120 { int x; }; -// struct Dummy121 { int x; }; -// struct Dummy122 { int x; }; -// struct Dummy123 { int x; }; -// struct Dummy124 { int x; }; -// struct Dummy125 { int x; }; -// struct Dummy126 { int x; }; -// struct Dummy127 { int x; }; +struct Dummy72 {int x;}; +struct Dummy73 {int x;}; +struct Dummy75 { int x; }; +struct Dummy76 { int x; }; +struct Dummy77 { int x; }; +struct Dummy78 { int x; }; +struct Dummy79 { int x; }; +struct Dummy80 { int x; }; +struct Dummy81 { int x; }; +struct Dummy82 { int x; }; +struct Dummy83 { int x; }; +struct Dummy84 { int x; }; +struct Dummy85 { int x; }; +struct Dummy86 { int x; }; +struct Dummy87 { int x; }; +struct Dummy88 { int x; }; +struct Dummy89 { int x; }; +struct Dummy90 { int x; }; +struct Dummy91 { int x; }; +struct Dummy92 { int x; }; +struct Dummy93 { int x; }; +struct Dummy94 { int x; }; +struct Dummy95 { int x; }; +struct Dummy96 { int x; }; +struct Dummy97 { int x; }; +struct Dummy98 { int x; }; +struct Dummy99 { int x; }; +struct Dummy100 { int x; }; +struct Dummy101 { int x; }; +struct Dummy102 { int x; }; +struct Dummy103 { int x; }; +struct Dummy104 { int x; }; +struct Dummy105 { int x; }; +struct Dummy106 { int x; }; +struct Dummy107 { int x; }; +struct Dummy108 { int x; }; +struct Dummy109 { int x; }; +struct Dummy110 { int x; }; +struct Dummy111 { int x; }; +struct Dummy112 { int x; }; +struct Dummy113 { int x; }; +struct Dummy114 { int x; }; +struct Dummy115 { int x; }; +struct Dummy116 { int x; }; +struct Dummy117 { int x; }; +struct Dummy118 { int x; }; +struct Dummy119 { int x; }; +struct Dummy120 { int x; }; +struct Dummy121 { int x; }; +struct Dummy122 { int x; }; +struct Dummy123 { int x; }; +struct Dummy124 { int x; }; +struct Dummy125 { int x; }; +struct Dummy126 { int x; }; +struct Dummy127 { int x; }; #endif diff --git a/include/sf64event.h b/include/sf64event.h new file mode 100644 index 00000000..baded134 --- /dev/null +++ b/include/sf64event.h @@ -0,0 +1,374 @@ +#ifndef SF64_EVENT +#define SF64_EVENT + +#define EV_OPC(opcode) (((opcode) & 0x7F) << 9) +#define EV_OPC_MASK(cmd) ((cmd) & (0x7F << 9)) +#define EVENT_CMD(opcode, arg1, arg2) (EV_OPC(opcode) | ((s16) (arg1) & 0x1FF)), (arg2) + +#define EV_ZMODE(zmode) (((zmode) & 3) << 7) +#define EV_ZMODE_MASK(cmd) ((cmd) & (3 << 7)) + +#define EV_CHANGE_AI 200 + +#define EVENT_PLAY_MSG(rcid, msg) EVENT_CMD(EVOP_PLAY_MSG, rcid, msg) +#define EVENT_STOP_SCRIPT() EVENT_CMD(EVOP_STOP_SCRIPT, 0, 0) +#define EVENT_MAKE_TEXLINE(color) EVENT_CMD(EVOP_MAKE_TEXLINE, 0, color) +#define EVENT_STOP_TEXLINE() EVENT_CMD(EVOP_STOP_TEXLINE, 0, 0) +#define EVENT_INIT_ACTOR(info, health) EVENT_CMD(EVOP_INIT_ACTOR, health, info) +#define EVENT_SET_SPEED(speed, zmode, time) EVENT_CMD(EVOP_SET_SPEED, EV_ZMODE(zmode) | ((speed) & 0x7F), time) +#define EVENT_SET_ACCEL(speedTarget, zmode, time) EVENT_CMD(EVOP_SET_ACCEL, EV_ZMODE(zmode) | ((speedTarget) & 0x7F), time) +#define EVENT_SET_ROTATE() EVENT_CMD(EVOP_SET_ROTATE, 0, 0) +#define EVENT_STOP_ROTATE() EVENT_CMD(EVOP_STOP_ROTATE, 0, 0) +#define EVENT_SET_TRIGGER(cond, cmd) EVENT_CMD(EVOP_SET_TRIGGER, cmd, cond) +#define EVENT_CLEAR_TRIGGER(cmd) EVENT_SET_TRIGGER(EVC_NONE, cmd) +#define EVENT_LOOP(count, cmd) EVENT_CMD(EVOP_LOOP, cmd, count) +#define EVENT_GOTO(cmd) EVENT_LOOP(0, cmd) +#define EVENT_SET_GROUND(type) EVENT_CMD(EVOP_SET_GROUND, 0, type) +#define EVENT_DROP_ITEM(item) EVENT_CMD(EVOP_DROP_ITEM, 0, item) +#define EVENT_ADD_TO_GROUP(num, flags) EVENT_CMD(EVOP_ADD_TO_GROUP, flags, num) +#define EVENT_SET_REVERB(reverb) EVENT_CMD(EVOP_SET_REVERB, 0, reverb) +#define EVENT_STOP_BGM() EVENT_CMD(EVOP_STOP_BGM, 0, 0) +#define EVENT_SET_ACTION(action) EVENT_CMD(EVOP_SET_ACTION, 0, action) +#define EVENT_RESTORE_TEAM(teammate) EVENT_CMD(EVOP_RESTORE_TEAM, 0, teammate) +#define EVENT_PLAY_SFX(sfx) EVENT_CMD(EVOP_PLAY_SFX, 0, sfx) +#define EVENT_STOP_SFX(sfx) EVENT_CMD(EVOP_STOP_SFX, 0, sfx) +#define EVENT_SET_CALL(duration, voiceParam) EVENT_CMD(EVOP_SET_CALL, voiceParam, duration) +#define EVENT_ROT_PLUS_X(rot, rotVel) EVENT_CMD(EVOP_ROT_PLUS_X, rotVel * 10, rot) +#define EVENT_ROT_MINUS_X(rot, rotVel) EVENT_CMD(EVOP_ROT_MINUS_X, rotVel * 10, rot) +#define EVENT_ROT_PLUS_Y(rot, rotVel) EVENT_CMD(EVOP_ROT_PLUS_Y, rotVel * 10, rot) +#define EVENT_ROT_MINUS_Y(rot, rotVel) EVENT_CMD(EVOP_ROT_MINUS_Y, rotVel * 10, rot) +#define EVENT_ROT_PLUS_Z(rot, rotVel) EVENT_CMD(EVOP_ROT_PLUS_Z, rotVel * 10, rot) +#define EVENT_ROT_MINUS_Z(rot, rotVel) EVENT_CMD(EVOP_ROT_MINUS_Z, rotVel * 10, rot) +#define EVENT_F4_PLUS_X(rot, rotVel) EVENT_CMD(EVOP_F4_PLUS_X, rotVel * 10, rot) +#define EVENT_F4_MINUS_X(rot, rotVel) EVENT_CMD(EVOP_F4_MINUS_X, rotVel * 10, rot) +#define EVENT_F4_PLUS_Y(rot, rotVel) EVENT_CMD(EVOP_F4_PLUS_Y, rotVel * 10, rot) +#define EVENT_F4_MINUS_Y(rot, rotVel) EVENT_CMD(EVOP_F4_MINUS_Y, rotVel * 10, rot) +#define EVENT_SET_BASE_ZVEL(zvel) EVENT_CMD(EVOP_SET_BASE_ZVEL, 0, zvel) +#define EVENT_SET_TEAM_ID(teamId) EVENT_CMD(EVOP_SET_TEAM_ID, 0, teamId) +#define EVENT_DAMAGE_TEAM(teamId, damage) EVENT_CMD(EVOP_DAMAGE_TEAM, damage, teamId) +#define EVENT_SET_TARGET(teamId, spread) EVENT_CMD(EVOP_SET_TARGET, teamId, spread) +#define EVENT_CHASE_TARGET(duration, turnRate) EVENT_CMD(EVOP_CHASE_TARGET, duration, turnRate) + +typedef enum EventModeZ { + EMZ_REST, + EMZ_RELATIVE, + EMZ_PLAYER, + EMZ_3, +} EventModeZ; + +typedef enum EventOpcode { + /* 0 */ EVOP_SET_SPEED, + /* 1 */ EVOP_SET_ACCEL, + /* 2 */ EVOP_SET_BASE_ZVEL, + /* 3 */ EVOP_SET_TO_IWORK_9, + /* 4 */ EVOP_SET_IWORK_13, + /* 8 */ EVOP_CLEAR_IWORK_13 = 8, + /* 9 */ EVOP_F4_PLUS_X, + /* 10 */ EVOP_F4_MINUS_X, + /* 11 */ EVOP_F4_PLUS_Y, + /* 12 */ EVOP_F4_MINUS_Y, + /* 16 */ EVOP_ROT_PLUS_X = 16, + /* 17 */ EVOP_ROT_MINUS_X, + /* 18 */ EVOP_ROT_PLUS_Y, + /* 19 */ EVOP_ROT_MINUS_Y, + /* 20 */ EVOP_ROT_PLUS_Z, + /* 21 */ EVOP_ROT_MINUS_Z, + /* 24 */ EVOP_SET_ROTATE = 24, + /* 25 */ EVOP_STOP_ROTATE, + /* 40 */ EVOP_SET_STATE_6 = 40, + /* 41 */ EVOP_SET_STATE_7, + /* 42 */ EVOP_SET_STATE_8, + /* 43 */ EVOP_SET_STATE_9, + /* 44 */ EVOP_CHASE_TARGET, + /* 45 */ EVOP_SET_TARGET, + /* 46 */ EVOP_SET_STATE_14, + /* 47 */ EVOP_SET_STATE_15, + /* 48 */ EVOP_SET_WAIT, + /* 56 */ EVOP_SET_CALL = 56, + /* 57 */ EVOP_RESTORE_TEAM, + /* 58 */ EVOP_PLAY_SFX, + /* 59 */ EVOP_STOP_SFX, + /* 96 */ EVOP_SET_TRIGGER = 96, + /* 104 */ EVOP_INIT_ACTOR = 104, + /* 105 */ EVOP_SET_TEAM_ID, + /* 112 */ EVOP_SET_ACTION = 112, + /* 113 */ EVOP_ADD_TO_GROUP, + /* 116 */ EVOP_DROP_ITEM = 116, + /* 118 */ EVOP_SET_REVERB = 118, + /* 119 */ EVOP_SET_GROUND, + /* 120 */ EVOP_PLAY_MSG, + /* 121 */ EVOP_DAMAGE_TEAM, + /* 122 */ EVOP_STOP_BGM, + /* 124 */ EVOP_MAKE_TEXLINE = 124, + /* 125 */ EVOP_STOP_TEXLINE, + /* 126 */ EVOP_LOOP, + /* 127 */ EVOP_STOP_SCRIPT, +} EventOpcode; + +typedef enum EventCondition { + /* 0 */ EVC_NONE, + /* 1 */ EVC_1, + /* 2 */ EVC_TEAM_COUNT_3, + /* 3 */ EVC_TEAM_COUNT_2, + /* 4 */ EVC_TEAM_COUNT_1, + /* 5 */ EVC_TEAM_COUNT_0, + /* 6 */ EVC_FALCO_ACTIVE, + /* 7 */ EVC_PEPPY_ACTIVE, + /* 8 */ EVC_SLIPPY_ACTIVE, + /* 9 */ EVC_CLOSE_LEFT_100, + /* 10 */ EVC_CLOSE_LEFT_400, + /* 11 */ EVC_CLOSE_LEFT_700, + /* 12 */ EVC_CLOSE_LEFT_200, + /* 13 */ EVC_CLOSE_RIGHT_100, + /* 14 */ EVC_CLOSE_RIGHT_400, + /* 15 */ EVC_CLOSE_RIGHT_700, + /* 16 */ EVC_CLOSE_RIGHT_200, + /* 17 */ EVC_CLOSE_ABOVE_100, + /* 18 */ EVC_CLOSE_ABOVE_400, + /* 19 */ EVC_CLOSE_ABOVE_700, + /* 20 */ EVC_CLOSE_ABOVE_200, + /* 21 */ EVC_CLOSE_BELOW_100, + /* 22 */ EVC_CLOSE_BELOW_400, + /* 23 */ EVC_CLOSE_BELOW_700, + /* 24 */ EVC_CLOSE_BELOW_200, + /* 25 */ EVC_HEALTH_100p, + /* 26 */ EVC_HEALTH_75p, + /* 27 */ EVC_HEALTH_50p, + /* 28 */ EVC_HEALTH_25p, + /* 29 */ EVC_HEALTH_0p, + /* 30 */ EVC_UNK270_5PLUS, + /* 31 */ EVC_UNK270_NONZERO, + /* 32 */ EVC_UNK270_ZERO, + /* 33 */ EVC_UNK250_GREATER_168, + /* 34 */ EVC_UNK250_LESS_84, + /* 35 */ EVC_SINGLE_LASER, + /* 36 */ EVC_TWIN_LASER, + /* 37 */ EVC_HYPER_LASER, + /* 38 */ EVC_UNK3_LASER, + /* 39 */ EVC_SHOT_CLOSE_150, + /* 40 */ EVC_SHOT_CLOSE_300, + /* 41 */ EVC_41, + /* 42 */ EVC_42, + /* 43 */ EVC_43, + /* 44 */ EVC_TOOK_DAMAGE, + /* 45 */ EVC_PASSED_ALL_RINGS, + /* 46 */ EVC_46, + /* 47 */ EVC_PRESS_CRIGHT, + /* 48 */ EVC_WING_BROKEN, + /* 49 */ EVC_ME_CLEAR, + /* 50 */ EVC_FO_CLEAR, + /* 51 */ EVC_SX_CLEAR, + /* 52 */ EVC_TI_CLEAR, + /* 53 */ EVC_BO_CLEAR, + /* 54 */ EVC_SY_CLEAR, + /* 55 */ EVC_KA_CLEAR, + /* 56 */ EVC_SO_CLEAR, + /* 57 */ EVC_MA_CLEAR, + /* 58 */ EVC_AQ_CLEAR, + /* 59 */ EVC_ZO_CLEAR, + /* 60 */ EVC_SZ_CLEAR, + /* 61 */ EVC_A6_CLEAR, + /* 62 */ EVC_62, + /* 63 */ EVC_63, + /* 64 */ EVC_MISSED_SEARCHLIGHT, + /* 65 */ EVC_30_HITS, + /* 66 */ EVC_80_HITS, + /* 67 */ EVC_EXPERT_MODE, + /* 68 */ EVC_68, + /* 69 */ EVC_69, + /* 100 */ EVC_100=100, +} EventCondition; + +typedef enum EventState { + /* 0 */ EVSTATE_READY, + /* 1 */ EVSTATE_WAIT, + /* 2 */ EVSTATE_F4_PLUS_X, + /* 3 */ EVSTATE_F4_MINUS_X, + /* 4 */ EVSTATE_F4_PLUS_Y, + /* 5 */ EVSTATE_F4_MINUS_Y, + /* 6 */ EVSTATE_6, + /* 7 */ EVSTATE_7, + /* 8 */ EVSTATE_8, + /* 9 */ EVSTATE_9, + /* 10 */ EVSTATE_ME_AS_OPEN, + /* 11 */ EVSTATE_ME_AS_CLOSE, + /* 12 */ EVSTATE_TEAM_RETREAT, + /* 13 */ EVSTATE_CHASE_TARGET, + /* 14 */ EVSTATE_14, + /* 15 */ EVSTATE_15, + /* 200 */ EVSTATE_SCRIPT_END = 200, + /* 1000 */ EVSTATE_1000 = 1000, +} EventState; + +typedef enum EventAction { + /* 0 */ EVACT_NONE, + /* 1 */ EVACT_1, + /* 2 */ EVACT_2, + /* 3 */ EVACT_3, + /* 4 */ EVACT_4, + /* 5 */ EVACT_5, + /* 6 */ EVACT_6, + /* 7 */ EVACT_7, + /* 8 */ EVACT_8, + /* 9 */ EVACT_9, + /* 10 */ EVACT_10, + /* 11 */ EVACT_11, + /* 12 */ EVACT_DESPAWN, + /* 13 */ EVACT_13, + /* 14 */ EVACT_ME_AS_OPEN, + /* 15 */ EVACT_ME_AS_CLOSE, + /* 16 */ EVACT_16, + /* 17 */ EVACT_17, + /* 18 */ EVACT_GFOX_COVER_FIRE, + /* 19 */ EVACT_19, +} EventAction; + +typedef enum EventActorInfo { + /* 0 */ EINFO_0, + /* 1 */ EINFO_1, + /* 2 */ EINFO_2, + /* 3 */ EINFO_3, + /* 4 */ EINFO_4, + /* 5 */ EINFO_5, + /* 6 */ EINFO_6, + /* 7 */ EINFO_7, + /* 8 */ EINFO_8, + /* 9 */ EINFO_9, + /* 10 */ EINFO_10, + /* 11 */ EINFO_11, + /* 12 */ EINFO_12, + /* 13 */ EINFO_13, + /* 14 */ EINFO_14, + /* 15 */ EINFO_15, + /* 16 */ EINFO_16, + /* 17 */ EINFO_17, + /* 18 */ EINFO_18, + /* 19 */ EINFO_19, + /* 20 */ EINFO_20, + /* 21 */ EINFO_21, + /* 22 */ EINFO_22, + /* 23 */ EINFO_23, + /* 24 */ EINFO_24, + /* 25 */ EINFO_25, + /* 26 */ EINFO_26, + /* 27 */ EINFO_27, + /* 28 */ EINFO_28, + /* 29 */ EINFO_29, + /* 30 */ EINFO_30, + /* 31 */ EINFO_31, + /* 32 */ EINFO_32, + /* 33 */ EINFO_33, + /* 34 */ EINFO_34, + /* 35 */ EINFO_35, + /* 36 */ EINFO_36, + /* 37 */ EINFO_37, + /* 38 */ EINFO_38, + /* 39 */ EINFO_39, + /* 40 */ EINFO_40, + /* 41 */ EINFO_41, + /* 42 */ EINFO_42, + /* 43 */ EINFO_43, + /* 44 */ EINFO_44, + /* 45 */ EINFO_45, + /* 46 */ EINFO_46, + /* 47 */ EINFO_47, + /* 48 */ EINFO_48, + /* 49 */ EINFO_49, + /* 50 */ EINFO_50, + /* 51 */ EINFO_51, + /* 52 */ EINFO_52, + /* 53 */ EINFO_53, + /* 54 */ EINFO_54, + /* 55 */ EINFO_55, + /* 56 */ EINFO_56, + /* 57 */ EINFO_57, + /* 58 */ EINFO_58, + /* 59 */ EINFO_59, + /* 60 */ EINFO_60, + /* 61 */ EINFO_61, + /* 62 */ EINFO_62, + /* 63 */ EINFO_63, + /* 64 */ EINFO_64, + /* 65 */ EINFO_65, + /* 66 */ EINFO_66, + /* 67 */ EINFO_67, + /* 68 */ EINFO_68, + /* 69 */ EINFO_69, + /* 70 */ EINFO_70, + /* 71 */ EINFO_71, + /* 72 */ EINFO_72, + /* 73 */ EINFO_73, + /* 74 */ EINFO_74, + /* 75 */ EINFO_75, + /* 76 */ EINFO_76, + /* 77 */ EINFO_77, + /* 78 */ EINFO_78, + /* 79 */ EINFO_79, + /* 80 */ EINFO_80, + /* 81 */ EINFO_81, + /* 82 */ EINFO_82, + /* 83 */ EINFO_83, + /* 84 */ EINFO_84, + /* 85 */ EINFO_85, + /* 86 */ EINFO_86, + /* 87 */ EINFO_87, + /* 88 */ EINFO_88, + /* 89 */ EINFO_89, + /* 90 */ EINFO_90, + /* 91 */ EINFO_91, + /* 92 */ EINFO_92, + /* 93 */ EINFO_93, + /* 94 */ EINFO_94, + /* 95 */ EINFO_95, + /* 96 */ EINFO_96, + /* 97 */ EINFO_97, + /* 98 */ EINFO_98, + /* 99 */ EINFO_99, + /* 100 */ EINFO_100, + /* 101 */ EINFO_101, + /* 102 */ EINFO_102, + /* 103 */ EINFO_103, + /* 104 */ EINFO_104, + /* 105 */ EINFO_105, + /* 106 */ EINFO_106, + /* 107 */ EINFO_107, + /* 200 */ EINFO_200 = 200, + /* 300 */ EINFO_300 = 300, +} EventActorInfo; + +typedef enum EventSfx { + /* 0 */ EVSFX_0, + /* 1 */ EVSFX_1, + /* 2 */ EVSFX_2, + /* 3 */ EVSFX_3, + /* 4 */ EVSFX_4, + /* 5 */ EVSFX_5, + /* 6 */ EVSFX_6, + /* 7 */ EVSFX_7, + /* 8 */ EVSFX_8, + /* 9 */ EVSFX_9, + /* 10 */ EVSFX_10, + /* 11 */ EVSFX_11, + /* 12 */ EVSFX_12, + /* 13 */ EVSFX_13, + /* 14 */ EVSFX_14, + /* 15 */ EVSFX_15, + /* 16 */ EVSFX_16, + /* 17 */ EVSFX_17, + /* 18 */ EVSFX_18, + /* 19 */ EVSFX_19, + /* 20 */ EVSFX_20, + /* 21 */ EVSFX_21, + /* 22 */ EVSFX_22, +} EventSfx; + +typedef enum TexLineColor { + /* 0 */ TXLC_WHITE, + /* 1 */ TXLC_LIGHT_BLUE, + /* 2 */ TXLC_BLUE, + /* 3 */ TXLC_GREEN, + /* 4 */ TXLC_RED, + /* 5 */ TXLC_YELLOW, +} TexLineColor; + +#endif diff --git a/include/sf64level.h b/include/sf64level.h index 02a39496..4591fa92 100644 --- a/include/sf64level.h +++ b/include/sf64level.h @@ -115,403 +115,10 @@ typedef enum VsStage { /* 2 */ VS_STAGE_SECTOR_Z, } VsStage; -#define EV_OPC(opcode) (((opcode) & 0x7F) << 9) -#define EV_OPC_MASK(cmd) ((cmd) & (0x7F << 9)) -#define EVENT_CMD(opcode, arg1, arg2) (EV_OPC(opcode) | ((s16) (arg1) & 0x1FF)), (arg2) - -#define EV_ZMODE(zmode) (((zmode) & 3) << 7) -#define EV_ZMODE_MASK(cmd) ((cmd) & (3 << 7)) - -#define EVENT_PLAY_MSG(rcid, msg) EVENT_CMD(EVOP_PLAY_MSG, rcid, msg) -#define EVENT_STOP_SCRIPT() EVENT_CMD(EVOP_STOP_SCRIPT, 0, 0) -#define EVENT_MAKE_TEXLINE(color) EVENT_CMD(EVOP_MAKE_TEXLINE, 0, color) -#define EVENT_STOP_TEXLINE() EVENT_CMD(EVOP_STOP_TEXLINE, 0, 0) -#define EVENT_INIT_ACTOR(info, health) EVENT_CMD(EVOP_INIT_ACTOR, health, info) -#define EVENT_SET_SPEED(speed, zmode, time) EVENT_CMD(EVOP_SET_SPEED, EV_ZMODE(zmode) | ((speed) & 0x7F), time) -#define EVENT_SET_ACCEL(speedTarget, zmode, time) EVENT_CMD(EVOP_SET_ACCEL, EV_ZMODE(zmode) | ((speedTarget) & 0x7F), time) -#define EVENT_SET_ROTATE() EVENT_CMD(EVOP_SET_ROTATE, 0, 0) -#define EVENT_STOP_ROTATE() EVENT_CMD(EVOP_STOP_ROTATE, 0, 0) -#define EVENT_SET_TRIGGER(cond, cmd) EVENT_CMD(EVOP_SET_TRIGGER, cmd, cond) -#define EVENT_CLEAR_TRIGGER(cmd) EVENT_SET_TRIGGER(EVC_NONE, cmd) -#define EVENT_LOOP(cmd, count) EVENT_CMD(EVOP_LOOP, cmd, count) -#define EVENT_SET_GROUND(type) EVENT_CMD(EVOP_SET_GROUND, 0, type) -#define EVENT_DROP_ITEM(item) EVENT_CMD(EVOP_DROP_ITEM, 0, item) -#define EVENT_ADD_TO_GROUP(num, flags) EVENT_CMD(EVOP_ADD_TO_GROUP, flags, num) -#define EVENT_SET_REVERB(reverb) EVENT_CMD(EVOP_SET_REVERB, 0, reverb) -#define EVENT_STOP_BGM() EVENT_CMD(EVOP_STOP_BGM, 0, 0) -#define EVENT_SET_ACTION(action) EVENT_CMD(EVOP_SET_ACTION, 0, action) -#define EVENT_RESTORE_TEAM(teammate) EVENT_CMD(EVOP_RESTORE_TEAM, 0, teammate) -#define EVENT_PLAY_SFX(sfx) EVENT_CMD(EVOP_PLAY_SFX, 0, sfx) -#define EVENT_STOP_SFX(sfx) EVENT_CMD(EVOP_STOP_SFX, 0, sfx) -#define EVENT_SET_CALL(duration, voiceParam) EVENT_CMD(EVOP_SET_CALL, voiceParam, duration) -#define EVENT_ROT_PLUS_X(rot, rotVel) EVENT_CMD(EVOP_ROT_PLUS_X, rotVel * 10, rot) -#define EVENT_ROT_MINUS_X(rot, rotVel) EVENT_CMD(EVOP_ROT_MINUS_X, rotVel * 10, rot) -#define EVENT_ROT_PLUS_Y(rot, rotVel) EVENT_CMD(EVOP_ROT_PLUS_Y, rotVel * 10, rot) -#define EVENT_ROT_MINUS_Y(rot, rotVel) EVENT_CMD(EVOP_ROT_MINUS_Y, rotVel * 10, rot) -#define EVENT_ROT_PLUS_Z(rot, rotVel) EVENT_CMD(EVOP_ROT_PLUS_Z, rotVel * 10, rot) -#define EVENT_ROT_MINUS_Z(rot, rotVel) EVENT_CMD(EVOP_ROT_MINUS_Z, rotVel * 10, rot) -#define EVENT_F4_PLUS_X(rot, rotVel) EVENT_CMD(EVOP_F4_PLUS_X, rotVel * 10, rot) -#define EVENT_F4_MINUS_X(rot, rotVel) EVENT_CMD(EVOP_F4_MINUS_X, rotVel * 10, rot) -#define EVENT_F4_PLUS_Y(rot, rotVel) EVENT_CMD(EVOP_F4_PLUS_Y, rotVel * 10, rot) -#define EVENT_F4_MINUS_Y(rot, rotVel) EVENT_CMD(EVOP_F4_MINUS_Y, rotVel * 10, rot) -#define EVENT_SET_BASE_ZVEL(zvel) EVENT_CMD(EVOP_SET_BASE_ZVEL, 0, zvel) - -typedef enum EventModeZ { - EMZ_REST, - EMZ_RELATIVE, - EMZ_PLAYER, - EMZ_3, -} EventModeZ; - -typedef enum EventOpcode { - /* 0 */ EVOP_SET_SPEED, - /* 1 */ EVOP_SET_ACCEL, - /* 2 */ EVOP_SET_BASE_ZVEL, - /* 3 */ EVOP_SET_TO_IWORK_9, - /* 4 */ EVOP_SET_IWORK_13, - /* 8 */ EVOP_CLEAR_IWORK_13 = 8, - /* 9 */ EVOP_F4_PLUS_X, - /* 10 */ EVOP_F4_MINUS_X, - /* 11 */ EVOP_F4_PLUS_Y, - /* 12 */ EVOP_F4_MINUS_Y, - /* 16 */ EVOP_ROT_PLUS_X = 16, - /* 17 */ EVOP_ROT_MINUS_X, - /* 18 */ EVOP_ROT_PLUS_Y, - /* 19 */ EVOP_ROT_MINUS_Y, - /* 20 */ EVOP_ROT_PLUS_Z, - /* 21 */ EVOP_ROT_MINUS_Z, - /* 24 */ EVOP_SET_ROTATE = 24, - /* 25 */ EVOP_STOP_ROTATE, - /* 40 */ EVOP_SET_STATE_6 = 40, - /* 41 */ EVOP_SET_STATE_7, - /* 42 */ EVOP_SET_STATE_8, - /* 43 */ EVOP_SET_STATE_9, - /* 44 */ EVOP_SET_STATE_13, - /* 45 */ EVOP_SET_IWORK_1_TO_IWORK_12, - /* 46 */ EVOP_SET_STATE_14, - /* 47 */ EVOP_SET_STATE_15, - /* 48 */ EVOP_SET_STATE_1, - /* 56 */ EVOP_SET_CALL = 56, - /* 57 */ EVOP_RESTORE_TEAM, - /* 58 */ EVOP_PLAY_SFX, - /* 59 */ EVOP_STOP_SFX, - /* 96 */ EVOP_SET_TRIGGER = 96, - /* 104 */ EVOP_INIT_ACTOR = 104, - /* 105 */ EVOP_SET_IWORK_12, - /* 112 */ EVOP_SET_ACTION = 112, - /* 113 */ EVOP_ADD_TO_GROUP, - /* 116 */ EVOP_DROP_ITEM = 116, - /* 118 */ EVOP_SET_REVERB = 118, - /* 119 */ EVOP_SET_GROUND, - /* 120 */ EVOP_PLAY_MSG, - /* 121 */ EVOP_DAMAGE_TEAM, - /* 122 */ EVOP_STOP_BGM, - /* 124 */ EVOP_MAKE_TEXLINE = 124, - /* 125 */ EVOP_STOP_TEXLINE, - /* 126 */ EVOP_LOOP, - /* 127 */ EVOP_STOP_SCRIPT, -} EventOpcode; - -typedef enum EventCondition { - /* 0 */ EVC_NONE, - /* 1 */ EVC_1, - /* 2 */ EVC_TEAM_COUNT_3, - /* 3 */ EVC_TEAM_COUNT_2, - /* 4 */ EVC_TEAM_COUNT_1, - /* 5 */ EVC_TEAM_COUNT_0, - /* 6 */ EVC_FALCO_ACTIVE, - /* 7 */ EVC_PEPPY_ACTIVE, - /* 8 */ EVC_SLIPPY_ACTIVE, - /* 9 */ EVC_9, - /* 10 */ EVC_10, - /* 11 */ EVC_11, - /* 12 */ EVC_12, - /* 13 */ EVC_13, - /* 14 */ EVC_14, - /* 15 */ EVC_15, - /* 16 */ EVC_16, - /* 17 */ EVC_17, - /* 18 */ EVC_18, - /* 19 */ EVC_19, - /* 20 */ EVC_20, - /* 21 */ EVC_21, - /* 22 */ EVC_22, - /* 23 */ EVC_23, - /* 24 */ EVC_24, - /* 25 */ EVC_HEALTH_100p, - /* 26 */ EVC_HEALTH_75p, - /* 27 */ EVC_HEALTH_50p, - /* 28 */ EVC_HEALTH_25p, - /* 29 */ EVC_HEALTH_0p, - /* 30 */ EVC_30, - /* 31 */ EVC_31, - /* 32 */ EVC_32, - /* 33 */ EVC_33, - /* 34 */ EVC_34, - /* 35 */ EVC_SINGLE_LASER, - /* 36 */ EVC_TWIN_LASER, - /* 37 */ EVC_HYPER_LASER, - /* 38 */ EVC_UNK3_LASER, - /* 39 */ EVC_39, - /* 40 */ EVC_40, - /* 41 */ EVC_41, - /* 42 */ EVC_42, - /* 43 */ EVC_43, - /* 44 */ EVC_44, - /* 45 */ EVC_45, - /* 46 */ EVC_46, - /* 47 */ EVC_PRESS_CRIGHT, - /* 48 */ EVC_WING_BROKEN, - /* 49 */ EVC_ME_CLEAR, - /* 50 */ EVC_FO_CLEAR, - /* 51 */ EVC_SX_CLEAR, - /* 52 */ EVC_TI_CLEAR, - /* 53 */ EVC_BO_CLEAR, - /* 54 */ EVC_SY_CLEAR, - /* 55 */ EVC_KA_CLEAR, - /* 56 */ EVC_SO_CLEAR, - /* 57 */ EVC_MA_CLEAR, - /* 58 */ EVC_AQ_CLEAR, - /* 59 */ EVC_ZO_CLEAR, - /* 60 */ EVC_SZ_CLEAR, - /* 61 */ EVC_A6_CLEAR, - /* 62 */ EVC_62, - /* 63 */ EVC_63, - /* 64 */ EVC_64, - /* 65 */ EVC_30_HITS, - /* 66 */ EVC_80_HITS, - /* 67 */ EVC_EXPERT_MODE, - /* 68 */ EVC_68, - /* 69 */ EVC_69, - /* 100 */ EVC_100=100, -} EventCondition; - -typedef enum EventState { - /* 0 */ EVSTATE_0, - /* 1 */ EVSTATE_1, - /* 2 */ EVSTATE_F4_PLUS_X, - /* 3 */ EVSTATE_F4_MINUS_X, - /* 4 */ EVSTATE_F4_PLUS_Y, - /* 5 */ EVSTATE_F4_MINUS_Y, - /* 6 */ EVSTATE_6, - /* 7 */ EVSTATE_7, - /* 8 */ EVSTATE_8, - /* 9 */ EVSTATE_9, - /* 10 */ EVSTATE_10, - /* 11 */ EVSTATE_11, - /* 12 */ EVSTATE_TEAM_RETREAT, - /* 13 */ EVSTATE_13, - /* 14 */ EVSTATE_14, - /* 15 */ EVSTATE_15, - /* 200 */ EVSTATE_SCRIPT_END = 200, - /* 1000 */ EVSTATE_1000 = 1000, -} EventState; - -typedef enum EventAction { - /* 0 */ EVACT_0, - /* 1 */ EVACT_1, - /* 2 */ EVACT_2, - /* 3 */ EVACT_3, - /* 4 */ EVACT_4, - /* 5 */ EVACT_5, - /* 6 */ EVACT_6, - /* 7 */ EVACT_7, - /* 8 */ EVACT_8, - /* 9 */ EVACT_9, - /* 10 */ EVACT_10, - /* 11 */ EVACT_11, - /* 12 */ EVACT_12, - /* 13 */ EVACT_13, - /* 14 */ EVACT_14, - /* 15 */ EVACT_15, - /* 16 */ EVACT_16, - /* 17 */ EVACT_17, - /* 18 */ EVACT_18, - /* 19 */ EVACT_19, -} EventAction; - -typedef enum EventActorInfo { - /* 0 */ EINFO_0, - /* 1 */ EINFO_1, - /* 2 */ EINFO_2, - /* 3 */ EINFO_3, - /* 4 */ EINFO_4, - /* 5 */ EINFO_5, - /* 6 */ EINFO_6, - /* 7 */ EINFO_7, - /* 8 */ EINFO_8, - /* 9 */ EINFO_9, - /* 10 */ EINFO_10, - /* 11 */ EINFO_11, - /* 12 */ EINFO_12, - /* 13 */ EINFO_13, - /* 14 */ EINFO_14, - /* 15 */ EINFO_15, - /* 16 */ EINFO_16, - /* 17 */ EINFO_17, - /* 18 */ EINFO_18, - /* 19 */ EINFO_19, - /* 20 */ EINFO_20, - /* 21 */ EINFO_21, - /* 22 */ EINFO_22, - /* 23 */ EINFO_23, - /* 24 */ EINFO_24, - /* 25 */ EINFO_25, - /* 26 */ EINFO_26, - /* 27 */ EINFO_27, - /* 28 */ EINFO_28, - /* 29 */ EINFO_29, - /* 30 */ EINFO_30, - /* 31 */ EINFO_31, - /* 32 */ EINFO_32, - /* 33 */ EINFO_33, - /* 34 */ EINFO_34, - /* 35 */ EINFO_35, - /* 36 */ EINFO_36, - /* 37 */ EINFO_37, - /* 38 */ EINFO_38, - /* 39 */ EINFO_39, - /* 40 */ EINFO_40, - /* 41 */ EINFO_41, - /* 42 */ EINFO_42, - /* 43 */ EINFO_43, - /* 44 */ EINFO_44, - /* 45 */ EINFO_45, - /* 46 */ EINFO_46, - /* 47 */ EINFO_47, - /* 48 */ EINFO_48, - /* 49 */ EINFO_49, - /* 50 */ EINFO_50, - /* 51 */ EINFO_51, - /* 52 */ EINFO_52, - /* 53 */ EINFO_53, - /* 54 */ EINFO_54, - /* 55 */ EINFO_55, - /* 56 */ EINFO_56, - /* 57 */ EINFO_57, - /* 58 */ EINFO_58, - /* 59 */ EINFO_59, - /* 60 */ EINFO_60, - /* 61 */ EINFO_61, - /* 62 */ EINFO_62, - /* 63 */ EINFO_63, - /* 64 */ EINFO_64, - /* 65 */ EINFO_65, - /* 66 */ EINFO_66, - /* 67 */ EINFO_67, - /* 68 */ EINFO_68, - /* 69 */ EINFO_69, - /* 70 */ EINFO_70, - /* 71 */ EINFO_71, - /* 72 */ EINFO_72, - /* 73 */ EINFO_73, - /* 74 */ EINFO_74, - /* 75 */ EINFO_75, - /* 76 */ EINFO_76, - /* 77 */ EINFO_77, - /* 78 */ EINFO_78, - /* 79 */ EINFO_79, - /* 80 */ EINFO_80, - /* 81 */ EINFO_81, - /* 82 */ EINFO_82, - /* 83 */ EINFO_83, - /* 84 */ EINFO_84, - /* 85 */ EINFO_85, - /* 86 */ EINFO_86, - /* 87 */ EINFO_87, - /* 88 */ EINFO_88, - /* 89 */ EINFO_89, - /* 90 */ EINFO_90, - /* 91 */ EINFO_91, - /* 92 */ EINFO_92, - /* 93 */ EINFO_93, - /* 94 */ EINFO_94, - /* 95 */ EINFO_95, - /* 96 */ EINFO_96, - /* 97 */ EINFO_97, - /* 98 */ EINFO_98, - /* 99 */ EINFO_99, - /* 100 */ EINFO_100, - /* 101 */ EINFO_101, - /* 102 */ EINFO_102, - /* 103 */ EINFO_103, - /* 104 */ EINFO_104, - /* 105 */ EINFO_105, - /* 106 */ EINFO_106, - /* 107 */ EINFO_107, - /* 200 */ EINFO_200 = 200, - /* 300 */ EINFO_300 = 300, -} EventActorInfo; - -typedef enum EventSfx { - /* 0 */ EVSFX_0, - /* 1 */ EVSFX_1, - /* 2 */ EVSFX_2, - /* 3 */ EVSFX_3, - /* 4 */ EVSFX_4, - /* 5 */ EVSFX_5, - /* 6 */ EVSFX_6, - /* 7 */ EVSFX_7, - /* 8 */ EVSFX_8, - /* 9 */ EVSFX_9, - /* 10 */ EVSFX_10, - /* 11 */ EVSFX_11, - /* 12 */ EVSFX_12, - /* 13 */ EVSFX_13, - /* 14 */ EVSFX_14, - /* 15 */ EVSFX_15, - /* 16 */ EVSFX_16, - /* 17 */ EVSFX_17, - /* 18 */ EVSFX_18, - /* 19 */ EVSFX_19, - /* 20 */ EVSFX_20, - /* 21 */ EVSFX_21, - /* 22 */ EVSFX_22, -} EventSfx; - -typedef enum TexLineColor { - /* 0 */ TXLC_WHITE, - /* 1 */ TXLC_LIGHT_BLUE, - /* 2 */ TXLC_BLUE, - /* 3 */ TXLC_GREEN, - /* 4 */ TXLC_RED, - /* 5 */ TXLC_YELLOW, -} TexLineColor; - typedef enum GroundType { /* 0 */ GROUNDTYPE_GRASS, /* 1 */ GROUNDTYPE_ROCK, /* 2 */ GROUNDTYPE_WATER, } GroundType; -typedef enum ItemDrop { - /* 0 */ DROP_NONE, - /* 1 */ DROP_SILVER_RING, - /* 2 */ DROP_SILVER_RING_50p, - /* 3 */ DROP_SILVER_RING_33p, - /* 4 */ DROP_SILVER_RING_25p, - /* 5 */ DROP_BOMB, - /* 6 */ DROP_BOMB_50p, - /* 7 */ DROP_BOMB_33p, - /* 8 */ DROP_BOMB_25p, - /* 9 */ DROP_LASERS, - /* 10 */ DROP_LASERS_50p, - /* 11 */ DROP_LASERS_33p, - /* 12 */ DROP_LASERS_25p, - /* 13 */ DROP_1UP, - /* 14 */ DROP_GOLD_RING_1, - /* 15 */ DROP_GOLD_RING_2, - /* 16 */ DROP_GOLD_RING_3, - /* 17 */ DROP_GOLD_RING_4, - /* 18 */ DROP_GOLD_RING_GROUP, - /* 19 */ DROP_LASERS_GROUP, - /* 20 */ DROP_BOMB_GROUP, - /* 21 */ DROP_SILVER_RING_GROUP, - /* 22 */ DROP_SILVER_RING_10p, - /* 23 */ DROP_WING_REPAIR, - /* 24 */ DROP_TEAM_MESG, - /* 25 */ DROP_SILVER_STAR, - /* 26 */ DROP_MAX, -} ItemDrop; - #endif diff --git a/include/sf64object.h b/include/sf64object.h index c69e7ecd..80134ba2 100644 --- a/include/sf64object.h +++ b/include/sf64object.h @@ -148,7 +148,6 @@ typedef struct { /* 0x48 */ s32 state; /* 0x4C */ s32 timer_4C; /* 0x50 */ s8 dmgType; - /* 0x51 */ char pad51[3]; /* 0x54 */ s32 dmgPart; /* 0x58 */ f32 unk_58; /* 0x5C */ f32 unk_5C; @@ -166,7 +165,7 @@ typedef struct { /* 0x45 */ u8 unk_45; /* 0x46 */ s8 unk_46; /* 0x48 */ s32 unk_48; -} Object_4C; // size = 0x4C +} Sprite; // size = 0x4C typedef struct { /* 0x00 */ Object obj; @@ -450,21 +449,21 @@ typedef enum ObjectId { /* 158 */ OBJ_80_158, /* 159 */ OBJ_80_159, /* 160 */ OBJ_80_160, - /* 161 */ OBJ_4C_161, - /* 162 */ OBJ_4C_162, - /* 163 */ OBJ_4C_163, - /* 164 */ OBJ_4C_164, - /* 165 */ OBJ_4C_165, - /* 166 */ OBJ_4C_166, - /* 167 */ OBJ_4C_167, - /* 168 */ OBJ_4C_168, - /* 169 */ OBJ_4C_169, - /* 170 */ OBJ_4C_170, - /* 171 */ OBJ_4C_171, - /* 172 */ OBJ_4C_172, - /* 173 */ OBJ_4C_173, - /* 174 */ OBJ_4C_174, - /* 175 */ OBJ_4C_175, + /* 161 */ OBJ_SPRITE_CO_POLE, + /* 162 */ OBJ_SPRITE_CO_TREE, + /* 163 */ OBJ_SPRITE_FO_POLE, + /* 164 */ OBJ_SPRITE_FOG_SHADOW, + /* 165 */ OBJ_SPRITE_CO_RUIN1, + /* 166 */ OBJ_SPRITE_CO_RUIN2, + /* 167 */ OBJ_SPRITE_167, + /* 168 */ OBJ_SPRITE_168, + /* 169 */ OBJ_SPRITE_TI_CACTUS, + /* 170 */ OBJ_SPRITE_CO_SMOKE, + /* 171 */ OBJ_SPRITE_VE1_BOSS_TRIGGER1, + /* 172 */ OBJ_SPRITE_VE1_BOSS_TRIGGER2, + /* 173 */ OBJ_SPRITE_VE1_BOSS_TRIGGER3, + /* 174 */ OBJ_SPRITE_VE1_BOSS_TRIGGER4, + /* 175 */ OBJ_SPRITE_GFOX_TARGET, /* 176 */ OBJ_ACTOR_176, /* 177 */ OBJ_ACTOR_177, /* 178 */ OBJ_ACTOR_178, @@ -617,13 +616,13 @@ typedef enum ObjectId { /* 325 */ OBJ_ITEM_SILVER_STAR, /* 326 */ OBJ_ITEM_METEO_WARP, /* 327 */ OBJ_ITEM_BOMB, - /* 328 */ OBJ_ITEM_328, - /* 329 */ OBJ_ITEM_329, - /* 330 */ OBJ_ITEM_330, - /* 331 */ OBJ_ITEM_331, - /* 332 */ OBJ_ITEM_332, - /* 333 */ OBJ_ITEM_333, - /* 334 */ OBJ_ITEM_334, + /* 328 */ OBJ_ITEM_PATH_SPLIT_X, + /* 329 */ OBJ_ITEM_PATH_TURN_LEFT, + /* 330 */ OBJ_ITEM_PATH_TURN_RIGHT, + /* 331 */ OBJ_ITEM_PATH_SPLIT_Y, + /* 332 */ OBJ_ITEM_PATH_TURN_UP, + /* 333 */ OBJ_ITEM_PATH_TURN_DOWN, + /* 334 */ OBJ_ITEM_RING_CHECK, /* 335 */ OBJ_ITEM_1UP, /* 336 */ OBJ_ITEM_GOLD_RING, /* 337 */ OBJ_ITEM_WING_REPAIR, @@ -701,6 +700,36 @@ typedef enum ObjectId { #define ACTOR_EVENT_ID 1000 +typedef enum ItemDrop { + /* 0 */ DROP_NONE, + /* 1 */ DROP_SILVER_RING, + /* 2 */ DROP_SILVER_RING_50p, + /* 3 */ DROP_SILVER_RING_33p, + /* 4 */ DROP_SILVER_RING_25p, + /* 5 */ DROP_BOMB, + /* 6 */ DROP_BOMB_50p, + /* 7 */ DROP_BOMB_33p, + /* 8 */ DROP_BOMB_25p, + /* 9 */ DROP_LASERS, + /* 10 */ DROP_LASERS_50p, + /* 11 */ DROP_LASERS_33p, + /* 12 */ DROP_LASERS_25p, + /* 13 */ DROP_1UP, + /* 14 */ DROP_GOLD_RING_1, + /* 15 */ DROP_GOLD_RING_2, + /* 16 */ DROP_GOLD_RING_3, + /* 17 */ DROP_GOLD_RING_4, + /* 18 */ DROP_GOLD_RING_GROUP, + /* 19 */ DROP_LASERS_GROUP, + /* 20 */ DROP_BOMB_GROUP, + /* 21 */ DROP_SILVER_RING_GROUP, + /* 22 */ DROP_SILVER_RING_10p, + /* 23 */ DROP_WING_REPAIR, + /* 24 */ DROP_TEAM_MESG, + /* 25 */ DROP_SILVER_STAR, + /* 26 */ DROP_MAX, +} ItemDrop; + typedef enum AllRangeAi { /* 0 */ AI360_FOX, /* 1 */ AI360_FALCO, @@ -874,4 +903,406 @@ typedef enum { /* 50 */ LN_VWK_MAX, } BossLNvwork; +typedef Object_80 Object80_0; +typedef Object_80 Object80_1; +typedef Object_80 Object80_2; +typedef Object_80 Object80_3; +typedef Object_80 Object80_4; +typedef Object_80 Object80_5; +typedef Object_80 Object80_6; +typedef Object_80 Object80_7; +typedef Object_80 Object80_8; +typedef Object_80 Object80_9; +typedef Object_80 Object80_10; +typedef Object_80 Object80_11; +typedef Object_80 Object80_12; +typedef Object_80 Object80_13; +typedef Object_80 Object80_14; +typedef Object_80 Object80_15; +typedef Object_80 Object80_16; +typedef Object_80 Object80_17; +typedef Object_80 Object80_18; +typedef Object_80 Object80_19; +typedef Object_80 Object80_20; +typedef Object_80 Object80_21; +typedef Object_80 Object80_22; +typedef Object_80 Object80_23; +typedef Object_80 Object80_24; +typedef Object_80 Object80_25; +typedef Object_80 Object80_26; +typedef Object_80 Object80_27; +typedef Object_80 Object80_28; +typedef Object_80 Object80_29; +typedef Object_80 Object80_30; +typedef Object_80 Object80_31; +typedef Object_80 Object80_32; +typedef Object_80 Object80_33; +typedef Object_80 Object80_34; +typedef Object_80 Object80_35; +typedef Object_80 Object80_36; +typedef Object_80 Object80_37; +typedef Object_80 Object80_38; +typedef Object_80 Object80_39; +typedef Object_80 Object80_40; +typedef Object_80 Object80_41; +typedef Object_80 Object80_42; +typedef Object_80 Object80_43; +typedef Object_80 Object80_44; +typedef Object_80 Object80_45; +typedef Object_80 Object80_46; +typedef Object_80 Object80_47; +typedef Object_80 Object80_48; +typedef Object_80 Object80_49; +typedef Object_80 Object80_50; +typedef Object_80 Object80_51; +typedef Object_80 Object80_52; +typedef Object_80 Object80_53; +typedef Object_80 Object80_54; +typedef Object_80 Object80_55; +typedef Object_80 Object80_56; +typedef Object_80 Object80_57; +typedef Object_80 Object80_58; +typedef Object_80 Object80_59; +typedef Object_80 Object80_60; +typedef Object_80 Object80_61; +typedef Object_80 Object80_62; +typedef Object_80 Object80_63; +typedef Object_80 Object80_64; +typedef Object_80 Object80_65; +typedef Object_80 Object80_66; +typedef Object_80 Object80_67; +typedef Object_80 Object80_68; +typedef Object_80 Object80_69; +typedef Object_80 Object80_70; +typedef Object_80 Object80_71; +typedef Object_80 Object80_72; +typedef Object_80 Object80_73; +typedef Object_80 Object80_74; +typedef Object_80 Object80_75; +typedef Object_80 Object80_76; +typedef Object_80 Object80_77; +typedef Object_80 Object80_78; +typedef Object_80 Object80_79; +typedef Object_80 Object80_80; +typedef Object_80 Object80_81; +typedef Object_80 Object80_82; +typedef Object_80 Object80_83; +typedef Object_80 Object80_84; +typedef Object_80 Object80_85; +typedef Object_80 Object80_86; +typedef Object_80 Object80_87; +typedef Object_80 Object80_88; +typedef Object_80 Object80_89; +typedef Object_80 Object80_90; +typedef Object_80 Object80_91; +typedef Object_80 Object80_92; +typedef Object_80 Object80_93; +typedef Object_80 Object80_94; +typedef Object_80 Object80_95; +typedef Object_80 Object80_96; +typedef Object_80 Object80_97; +typedef Object_80 Object80_98; +typedef Object_80 Object80_99; +typedef Object_80 Object80_100; +typedef Object_80 Object80_101; +typedef Object_80 Object80_102; +typedef Object_80 Object80_103; +typedef Object_80 Object80_104; +typedef Object_80 Object80_105; +typedef Object_80 Object80_106; +typedef Object_80 Object80_107; +typedef Object_80 Object80_108; +typedef Object_80 Object80_109; +typedef Object_80 Object80_110; +typedef Object_80 Object80_111; +typedef Object_80 Object80_112; +typedef Object_80 Object80_113; +typedef Object_80 Object80_114; +typedef Object_80 Object80_115; +typedef Object_80 Object80_116; +typedef Object_80 Object80_117; +typedef Object_80 Object80_118; +typedef Object_80 Object80_119; +typedef Object_80 Object80_120; +typedef Object_80 Object80_121; +typedef Object_80 Object80_122; +typedef Object_80 Object80_123; +typedef Object_80 Object80_124; +typedef Object_80 Object80_125; +typedef Object_80 Object80_126; +typedef Object_80 Object80_127; +typedef Object_80 Object80_128; +typedef Object_80 Object80_129; +typedef Object_80 Object80_130; +typedef Object_80 Object80_131; +typedef Object_80 Object80_132; +typedef Object_80 Object80_133; +typedef Object_80 Object80_134; +typedef Object_80 Object80_135; +typedef Object_80 Object80_136; +typedef Object_80 Object80_137; +typedef Object_80 Object80_138; +typedef Object_80 Object80_139; +typedef Object_80 Object80_140; +typedef Object_80 Object80_141; +typedef Object_80 Object80_142; +typedef Object_80 Object80_143; +typedef Object_80 Object80_144; +typedef Object_80 Object80_145; +typedef Object_80 Object80_146; +typedef Object_80 Object80_147; +typedef Object_80 Object80_148; +typedef Object_80 Object80_149; +typedef Object_80 Object80_150; +typedef Object_80 Object80_151; +typedef Object_80 Object80_152; +typedef Object_80 Object80_153; +typedef Object_80 Object80_154; +typedef Object_80 Object80_155; +typedef Object_80 Object80_156; +typedef Object_80 Object80_157; +typedef Object_80 Object80_158; +typedef Object_80 Object80_159; +typedef Object_80 Object80_160; +typedef Sprite CoPole; +typedef Sprite CoTree; +typedef Sprite FoPole; +typedef Sprite FogShadow; +typedef Sprite CoRuin1; +typedef Sprite CoRuin2; +typedef Sprite Sprite167; +typedef Sprite Sprite168; +typedef Sprite TiCactus; +typedef Sprite CoSmoke; +typedef Sprite Ve1BossTrigger1; +typedef Sprite Ve1BossTrigger2; +typedef Sprite Ve1BossTrigger3; +typedef Sprite Ve1BossTrigger4; +typedef Sprite GfoxTarget; +typedef Actor Actor176; +typedef Actor Actor177; +typedef Actor Actor178; +typedef Actor Actor179; +typedef Actor Actor180; +typedef Actor Actor181; +typedef Actor Actor182; +typedef Actor Actor183; +typedef Actor Actor184; +typedef Actor Actor185; +typedef Actor Actor186; +typedef Actor Actor187; +typedef Actor Actor188; +typedef Actor Actor189; +typedef Actor Actor190; +typedef Actor Actor191; +typedef Actor Actor192; +typedef Actor Actor193; +typedef Actor Actor194; +typedef Actor Actor195; +typedef Actor Actor196; +typedef Actor ActorAllRange; +typedef Actor ActorTeamBoss; +typedef Actor Actor199; +typedef Actor ActorEvent; +typedef Actor Actor201; +typedef Actor Actor202; +typedef Actor ActorSlippySX; +typedef Actor Actor204; +typedef Actor Actor205; +typedef Actor Actor206; +typedef Actor Actor207; +typedef Actor Actor208; +typedef Actor Actor209; +typedef Actor Actor210; +typedef Actor Actor211; +typedef Actor Actor212; +typedef Actor Actor213; +typedef Actor Actor214; +typedef Actor Actor215; +typedef Actor Actor216; +typedef Actor Actor217; +typedef Actor Actor218; +typedef Actor Actor219; +typedef Actor Actor220; +typedef Actor Actor221; +typedef Actor Actor222; +typedef Actor Actor223; +typedef Actor Actor224; +typedef Actor Actor225; +typedef Actor Actor226; +typedef Actor Actor227; +typedef Actor Actor228; +typedef Actor Actor229; +typedef Actor Actor230; +typedef Actor Actor231; +typedef Actor Actor232; +typedef Actor Actor233; +typedef Actor Actor234; +typedef Actor Actor235; +typedef Actor Actor236; +typedef Actor Actor237; +typedef Actor Actor238; +typedef Actor Actor239; +typedef Actor Actor240; +typedef Actor Actor241; +typedef Actor Actor242; +typedef Actor Actor243; +typedef Actor Actor244; +typedef Actor Actor245; +typedef Actor Actor246; +typedef Actor Actor247; +typedef Actor Actor248; +typedef Actor Actor249; +typedef Actor Actor250; +typedef Actor Actor251; +typedef Actor Actor252; +typedef Actor Actor253; +typedef Actor Actor254; +typedef Actor Actor255; +typedef Actor Actor256; +typedef Actor Actor257; +typedef Actor Actor258; +typedef Actor Actor259; +typedef Actor Actor260; +typedef Actor Actor261; +typedef Actor Actor262; +typedef Actor Actor263; +typedef Actor Actor264; +typedef Actor Actor265; +typedef Actor Actor266; +typedef Actor Actor267; +typedef Actor Actor268; +typedef Actor Actor269; +typedef Actor Actor270; +typedef Actor Actor271; +typedef Actor Actor272; +typedef Actor Actor273; +typedef Actor Actor274; +typedef Actor Actor275; +typedef Actor Actor276; +typedef Actor Actor277; +typedef Actor Actor278; +typedef Actor Actor279; +typedef Actor Actor280; +typedef Actor Actor281; +typedef Actor Actor282; +typedef Actor Actor283; +typedef Actor Actor284; +typedef Actor Actor285; +typedef Actor Actor286; +typedef Actor Actor287; +typedef Actor Actor288; +typedef Actor Actor289; +typedef Actor Actor290; +typedef Actor ActorSupplies; +typedef Boss Boss292; +typedef Boss Boss293; +typedef Boss Boss294; +typedef Boss Boss295; +typedef Boss Boss296; +typedef Boss Boss297; +typedef Boss Boss298; +typedef Boss Boss299; +typedef Boss Boss300; +typedef Boss Boss301; +typedef Boss BossA6; +typedef Boss Boss303; +typedef Boss Boss304; +typedef Boss Boss305; +typedef Boss Boss306; +typedef Boss BossZO; +typedef Boss Boss308; +typedef Boss Boss309; +typedef Boss Boss310; +typedef Boss Boss311; +typedef Boss Boss312; +typedef Boss Boss313; +typedef Boss Boss314; +typedef Boss BossSO; +typedef Boss Boss316; +typedef Boss Boss317; +typedef Boss BossAQ; +typedef Boss Boss319; +typedef Boss Boss320; +typedef Boss Boss321; +typedef Item ItemLasers; +typedef Item ItemCheckpoint; +typedef Item ItemSilverStar; +typedef Item ItemSilverRing; +typedef Item ItemMeteoWarp; +typedef Item ItemBomb; +typedef Item ItemPathSplitX; +typedef Item ItemPathTurnLeft; +typedef Item ItemPathTurnRight; +typedef Item ItemPathSplitY; +typedef Item ItemPathTurnUp; +typedef Item ItemPathTurnDown; +typedef Item ItemRingCheck; +typedef Item Item1UP; +typedef Item ItemGoldRing; +typedef Item ItemWingRepair; +typedef Item ItemTrainingRing; +typedef Effect Effect339; +typedef Effect Effect340; +typedef Effect Effect341; +typedef Effect Effect342; +typedef Effect Effect343; +typedef Effect Effect344; +typedef Effect Effect345; +typedef Effect Effect346; +typedef Effect Effect347; +typedef Effect Effect348; +typedef Effect Effect349; +typedef Effect Effect350; +typedef Effect Effect351; +typedef Effect Effect352; +typedef Effect Effect353; +typedef Effect Effect354; +typedef Effect Effect355; +typedef Effect Effect356; +typedef Effect Effect357; +typedef Effect Effect358; +typedef Effect Effect359; +typedef Effect Effect360; +typedef Effect Effect361; +typedef Effect Effect362; +typedef Effect Effect363; +typedef Effect Effect364; +typedef Effect Effect365; +typedef Effect Effect366; +typedef Effect Effect367; +typedef Effect Effect368; +typedef Effect Effect369; +typedef Effect Effect370; +typedef Effect Effect371; +typedef Effect Effect372; +typedef Effect Effect373; +typedef Effect Effect374; +typedef Effect Effect375; +typedef Effect Effect376; +typedef Effect Effect377; +typedef Effect Effect378; +typedef Effect Effect379; +typedef Effect Effect380; +typedef Effect Effect381; +typedef Effect Effect382; +typedef Effect Effect383; +typedef Effect Effect384; +typedef Effect Effect385; +typedef Effect Effect386; +typedef Effect Effect387; +typedef Effect Effect388; +typedef Effect Effect389; +typedef Effect Effect390; +typedef Effect Effect391; +typedef Effect Effect392; +typedef Effect Effect393; +typedef Effect Effect394; +typedef Effect Effect395; +typedef Effect Effect396; +typedef Effect Effect397; +typedef Effect Effect398; +typedef Effect Effect399; + + #endif diff --git a/include/sf64player.h b/include/sf64player.h index 2817e56e..31523e2a 100644 --- a/include/sf64player.h +++ b/include/sf64player.h @@ -4,6 +4,25 @@ #include "sf64math.h" #include "sf64object.h" +#define PFLAG_228_0 (1 << 0) +#define PFLAG_228_1 (1 << 1) +#define PFLAG_228_2 (1 << 2) +#define PFLAG_228_3 (1 << 3) +#define PFLAG_228_4 (1 << 4) +#define PFLAG_228_5 (1 << 5) +#define PFLAG_228_6 (1 << 6) +#define PFLAG_228_7 (1 << 7) + +typedef enum TeamId { + /* 0 */ TEAM_ID_FOX, + /* 1 */ TEAM_ID_FALCO, + /* 2 */ TEAM_ID_SLIPPY, + /* 3 */ TEAM_ID_PEPPY, + /* 4 */ TEAM_ID_KATT, + /* 5 */ TEAM_ID_BILL, + /* 6 */ TEAM_ID_MAX, +} TeamId; + typedef enum WingState { /* 0 */ WINGSTATE_NONE, /* 1 */ WINGSTATE_BROKEN, @@ -20,15 +39,15 @@ typedef enum PlayerForm { } PlayerForm; typedef enum DrawMode { - /* 0 */ DRAWMODE_0, - /* 1 */ DRAWMODE_1, - /* 2 */ DRAWMODE_2, + /* 0 */ DRAW_NONE, + /* 1 */ DRAW_TITLE, + /* 2 */ DRAW_OPTION, /* 3 */ DRAW_MAP, - /* 4 */ DRAWMODE_4, - /* 5 */ DRAWMODE_5, - /* 6 */ DRAWMODE_6, - /* 7 */ DRAWMODE_7, - /* 8 */ DRAWMODE_8, + /* 4 */ DRAW_PLAY, + /* 5 */ DRAW_UNK_MAP, + /* 6 */ DRAW_UNK_VS, + /* 7 */ DRAW_UNK_7, + /* 8 */ DRAW_ENDING, } DrawMode; typedef enum LevelMode { @@ -216,7 +235,7 @@ typedef struct Player { /* 0x18C */ f32 unk_18C; /* 0x190 */ f32 unk_190; /* 0x194 */ f32 unk_194; - /* 0x198 */ s32 unk_198; + /* 0x198 */ s32 savedCockpitView; /* 0x19C */ s32 unk_19C; /* 0x1A0 */ s32 unk_1A0; /* 0x1A4 */ s32 unk_1A4; @@ -255,7 +274,7 @@ typedef struct Player { /* 0x22C */ s32 unk_22C; /* 0x230 */ s32 unk_230; /* 0x234 */ s32 unk_234; - /* 0x238 */ s32 unk_238; + /* 0x238 */ s32 cockpitView; /* 0x23C */ s32 unk_23C; /* 0x240 */ s32 unk_240; /* 0x244 */ s32 timer_244; diff --git a/include/sf64thread.h b/include/sf64thread.h index 407d0f72..9c37be1b 100644 --- a/include/sf64thread.h +++ b/include/sf64thread.h @@ -13,7 +13,7 @@ typedef enum { /* 5 */ GSTATE_GAME_OVER, /* 6 */ GSTATE_VS_INIT, /* 7 */ GSTATE_PLAY, - /* 8 */ GSTATE_CREDITS, + /* 8 */ GSTATE_ENDING, /* 100 */ GSTATE_BOOT = 100, /* 101 */ GSTATE_BOOT_WAIT, /* 102 */ GSTATE_SHOW_LOGO, @@ -22,6 +22,13 @@ typedef enum { /* 105 */ GSTATE_START, } GameState; +typedef enum PlayState { + /* 0 */ PLAY_STANDBY, + /* 1 */ PLAY_INIT, + /* 2 */ PLAY_UPDATE, + /* 100 */ PLAY_PAUSE=100, +} PlayState; + typedef void (*TimerAction)(s32*, s32); typedef struct { diff --git a/include/sys.h b/include/sys.h index 7686ec02..e9a403ff 100644 --- a/include/sys.h +++ b/include/sys.h @@ -24,8 +24,8 @@ typedef s32 (*CompareFunc)(void*, void*); s32 Lib_vsPrintf(char* dst, const char* fmt, va_list args); void Lib_vTable(s32 index, void (**table)(s32, s32), s32 arg0, s32 arg1); void Lib_QuickSort(u8* first, u32 length, u32 size, CompareFunc cFunc); -void Lib_Perspective(Gfx** dList); -void Lib_Ortho(Gfx** dList); +void Lib_InitPerspective(Gfx** dList); +void Lib_InitOrtho(Gfx** dList); void Lib_DmaRead(void* src, void* dst, s32 size); void Lib_FillScreen(u8 setFill); @@ -40,7 +40,7 @@ s32 vsprintf(char* dst, const char* fmt, va_list args); void Game_Initialize(void); void Game_Update(void); -extern s32 D_game_800D2860[]; +extern s32 gShowCrosshairs[]; extern s32 D_game_800D2870; extern f32 D_game_80161A10; @@ -48,7 +48,7 @@ extern f32 D_game_80161A14; extern s32 gPlayerInactive[4]; extern s32 D_game_80161A28; extern u8 D_game_80161A2C; -extern u16 D_game_80161A2E; +extern u16 gNextLevelStage; extern u16 gNextLevel; extern u16 gNextGameState; extern u16 D_game_80161A34; diff --git a/include/variables.h b/include/variables.h index 372884fd..c56749bb 100644 --- a/include/variables.h +++ b/include/variables.h @@ -26,28 +26,28 @@ extern Actor* D_display_800CA234; extern s32 D_display_Timer_800CA238; // fox_edata -extern f32 D_edata_800CBE70[]; -extern f32 D_edata_800CBE8C[]; -extern f32 D_edata_800CBEA8[]; -extern f32 D_edata_800CBEC4[]; -extern f32 D_edata_800CBEE0[]; -extern f32 D_edata_800CBEFC[]; -extern f32 D_edata_800CBF18[]; -extern f32 D_edata_800CBF34[]; -extern f32 D_edata_800CBF38[]; -extern f32 D_edata_800CBF54[]; -extern f32 D_edata_800CBF70[]; +extern f32 gActor241Hitbox[]; +extern f32 gDefaultCubeHitbox100[]; +extern f32 gDefaultCubeHitbox150[]; +extern f32 gDefaultCubeHitbox200[]; +extern f32 gDefaultCubeHitbox300[]; +extern f32 gDefaultCubeHitbox400[]; +extern f32 gItemRingCheckHitbox[]; +extern f32 gHitboxNone[]; +extern f32 gItemCheckpointHitbox[]; +extern f32 gItemSupplyRingHitbox[]; +extern f32 gMeteoWarpHitbox[]; extern f32 D_edata_800CBF8C[]; -extern f32 D_edata_800CBFA8[]; -extern f32 D_edata_800CBFC8[]; -extern f32 D_edata_800CBFE4[]; -extern f32 D_edata_800CC000[]; -extern f32 D_edata_800CC01C[]; -extern f32 D_edata_800CC038[]; -extern f32 D_edata_800CC054[]; -extern f32 D_edata_800CC070[]; -extern f32 D_edata_800CC0D4[]; -extern f32 D_edata_800CC0F0[]; +extern f32 gItemLasersHitbox[]; +extern f32 gItemBombHitbox[]; +extern f32 gActor190_191Hitbox[]; +extern f32 gActor194HItbox[]; +extern f32 gTeamHitbox[]; +extern f32 gActorAllRangeHItbox[]; +extern f32 gWarpZoneEvent94Hitbox[]; +extern f32 gWarpZoneEvent96Hitbox[]; +extern f32 gWarpZoneEvent92Hitbox[]; +extern f32 gWarpZoneEvent93Hitbox[]; extern ObjectInfo D_edata_800CC124[]; extern f32* D_edata_800CF964[]; @@ -74,12 +74,12 @@ extern f32 D_edisplay_800CFCCC[]; extern Gfx D_edisplay_800CFD80[]; // fox_enmy -extern ObjectInit* D_enmy_800CFDA0[]; +extern ObjectInit* gLevelObjectInits[]; extern u32 D_enmy_800CFF54[9]; // fox_enmy2 extern s32 D_enmy2_800CFF80[4]; -extern s32 D_enmy2_800CFF90; +extern s32 gCallVoiceParam; // fox_hud extern s16 D_hud_800D1970; @@ -96,22 +96,22 @@ extern u8 D_play_800D3180[30]; extern s32 gCurrentMsgPri; // fox_360 -extern s32 D_360_8015F900; -extern s32 D_360_8015F904; -extern s16 D_360_8015F908; -extern s32 D_360_8015F90C; -extern s32 D_360_8015F910; -extern f32 D_360_8015F914; -extern f32 D_360_8015F918; -extern f32 D_360_8015F91C; -extern u8 D_360_8015F920; -extern u8 D_360_8015F921; -extern s32 D_360_8015F924; -extern s32 D_360_8015F928; -extern s32 D_360_8015F930[3]; -extern s32 D_360_8015F93C; -extern s32 D_360_8015F940; -extern f32 D_360_8015F944; +extern s32 gAllRangeSupplyTimer; +extern s32 sStarWolfKillTimer; +extern s16 gStarWolfMsgTimer; +extern s32 gAllRangeWingRepairTimer; +extern s32 gAllRangeWingRepairSent; +extern f32 gSzMissileR; +extern f32 gSzMissileG; +extern f32 gSzMissileB; +extern u8 gKaKilledAlly; +extern u8 gKaAllyKillCount; +extern s32 gAllRangeCheckpoint; +extern s32 gAllRangeEventTimer; +extern s32 gAllRangeCountdown[3]; +extern s32 gShowAllRangeCountdown; +extern s32 gAllRangeFrameCount; +extern f32 gAllRangeCountdownScale; // fox_bg extern f32 D_bg_800C9C30; @@ -133,7 +133,7 @@ extern s32 gBossFrameCount; // fox_display extern Vec3f D_display_801613B0[]; // static, here for reordering extern Vec3f D_display_801613E0[]; // static, here for reordering -extern s16 D_display_80161410; +extern s16 gReflectY; extern Matrix D_display_80161418[]; // static, here for reordering extern Vec3f D_display_80161518[]; // static, here for reordering extern Vec3f D_display_80161548[]; // static, here for reordering @@ -146,11 +146,11 @@ extern Vec3f D_edisplay_801615D0; // fox_enmy extern s32 D_enmy_Timer_80161670[4]; -extern s32 D_enmy_80161680; -extern u8 D_enmy_80161684; +extern s32 gLastPathChange; +extern u8 gMissedZoSearchlight; // fox_enmy2 -extern s32 D_enmy2_80161690; +extern s32 gCallTimer; // fox_hud extern s32 D_hud_80161704; @@ -164,7 +164,7 @@ extern s32 D_hud_80161730; extern s32 gShowBossHealth; // 0x80161734 // fox_play -extern u8 D_play_80161A50; +extern u8 gSavedZoSearchlightStatus; extern f32 D_play_80161A54; extern s32 D_play_80161A58; extern s32 D_play_80161A5C; diff --git a/linker_scripts/us/symbol_addrs_engine.txt b/linker_scripts/us/symbol_addrs_engine.txt index b937f0b4..26376749 100644 --- a/linker_scripts/us/symbol_addrs_engine.txt +++ b/linker_scripts/us/symbol_addrs_engine.txt @@ -120,7 +120,7 @@ D_radio_80178734 = 0x80178734; D_radio_80178738 = 0x80178738; D_radio_8017873C = 0x8017873C; D_radio_80178740 = 0x80178740; -D_radio_80178744 = 0x80178744; +sRadioUseRedBox = 0x80178744; D_radio_80178748 = 0x80178748; // fox_versus @@ -168,7 +168,7 @@ gSaveFile = 0x80178870; //size:0x200 func_edisplay_800596C0 = 0x800596C0; func_edisplay_800597C0 = 0x800597C0; Graphics_SetScaleMtx = 0x8005980C; -func_edisplay_80059850 = 0x80059850; +Sprite168_Draw = 0x80059850; func_edisplay_800598DC = 0x800598DC; Actor201_Draw = 0x800598E8; func_edisplay_800599A4 = 0x800599A4; @@ -179,8 +179,8 @@ func_edisplay_80059BB0 = 0x80059BB0; Obj42_Draw = 0x80059BBC; Actor196_Draw = 0x80059BF0; func_edisplay_80059C28 = 0x80059C28; -func_edisplay_80059C34 = 0x80059C34; -func_edisplay_80059C40 = 0x80059C40; +Sprite167_Draw = 0x80059C34; +FogShadow_Draw = 0x80059C40; func_edisplay_80059F68 = 0x80059F68; func_edisplay_80059FDC = 0x80059FDC; func_edisplay_8005A010 = 0x8005A010; @@ -209,7 +209,7 @@ func_edisplay_8005D008 = 0x8005D008; func_edisplay_8005D1F0 = 0x8005D1F0; func_edisplay_8005D3CC = 0x8005D3CC; Object_80_Draw = 0x8005D654; -Object_4C_Draw = 0x8005D8B8; +Sprite_Draw = 0x8005D8B8; Actor_DrawOnRails = 0x8005D954; Actor_DrawAllRange = 0x8005DBC0; Boss_Draw = 0x8005E1B8; @@ -258,13 +258,13 @@ func_enmy_80060FE4 = 0x80060FE4; func_enmy_80061148 = 0x80061148; Object_SetInfo = 0x800612B8; Object_80_Initialize = 0x80061364; -Object_4C_Initialize = 0x80061394; +Sprite_Initialize = 0x80061394; Actor_Initialize = 0x800613C4; Boss_Initialize = 0x80061404; Item_Initialize = 0x80061444; Effect_Initialize = 0x80061474; Object_80_Load = 0x800614B4; -Object_4C_Load = 0x800615A0; +Sprite_Load = 0x800615A0; Actor_Load = 0x8006168C; Boss_Load = 0x80061778; Item_Load = 0x80061864; @@ -299,7 +299,7 @@ func_enmy_800655C8 = 0x800655C8; func_enmy_8006566C = 0x8006566C; func_enmy_800656D4 = 0x800656D4; func_enmy_800660F0 = 0x800660F0; -func_enmy_80066254 = 0x80066254; +Actor_Despawn = 0x80066254; func_enmy_8006654C = 0x8006654C; func_enmy_8006684C = 0x8006684C; func_enmy_800669A0 = 0x800669A0; @@ -308,7 +308,7 @@ func_enmy_80066A8C = 0x80066A8C; func_enmy_80066C00 = 0x80066C00; func_enmy_80066D5C = 0x80066D5C; func_enmy_80066E80 = 0x80066E80; -func_enmy_80066E8C = 0x80066E8C; +Sprite167_Update = 0x80066E8C; func_enmy_80066EA8 = 0x80066EA8; func_enmy_80066EE4 = 0x80066EE4; func_enmy_80066EF0 = 0x80066EF0; @@ -327,25 +327,25 @@ ItemGoldRing_Update = 0x800685F8; ItemWingRepair_Update = 0x80068618; ItemMeteoWarp_Update = 0x80068688; ItemCheckpoint_Update = 0x80068914; -func_enmy_80068C48 = 0x80068C48; -func_enmy_80068C88 = 0x80068C88; -func_enmy_80068FE0 = 0x80068FE0; +ItemRingCheck_Update = 0x80068C48; +ItemPathChange_Update = 0x80068C88; +Sprite_UpdateDoodad = 0x80068FE0; Object_Dying = 0x800690D0; -func_enmy_800693E8 = 0x800693E8; -func_enmy_80069658 = 0x80069658; -func_enmy_800696F8 = 0x800696F8; -func_enmy_80069858 = 0x80069858; -func_enmy_80069924 = 0x80069924; -func_enmy_80069A10 = 0x80069A10; +Actor_Move = 0x800693E8; +Boss_Move = 0x80069658; +Object80_Move = 0x800696F8; +Sprite_Move = 0x80069858; +Effect_Move = 0x80069924; +Item_Move = 0x80069A10; Actor_Update = 0x80069AAC; Boss_Update = 0x80069CBC; Object_80_Update = 0x80069DF4; -Object_4C_Update = 0x80069E88; +Sprite_Update = 0x80069E88; Item_Update = 0x80069F30; Effect_Update = 0x80069FD4; TexturedLine_Update = 0x8006A06C; TexturedLine_UpdateAll = 0x8006A38C; -Object_UpdateAll = 0x8006A3E8; +Object_Update = 0x8006A3E8; // fox_enmy2 D_800D0DBC = 0x800D0DBC;//size:24 @@ -356,7 +356,7 @@ D_game_80161A14 = 0x80161A14; gPlayerInactive = 0x80161A18; //size:0x10 D_game_80161A28 = 0x80161A28; D_game_80161A2C = 0x80161A2C; -D_game_80161A2E = 0x80161A2E; +gNextLevelStage = 0x80161A2E; gNextLevel = 0x80161A30; gNextGameState = 0x80161A32; D_game_80161A34 = 0x80161A34; @@ -366,7 +366,7 @@ D_game_80161A39 = 0x80161A39; D_game_80161A3C = 0x80161A3C; D_game_80161A40 = 0x80161A40; D_game_80161A44 = 0x80161A44; -D_game_800D2860 = 0x800D2860; +gShowCrosshairs = 0x800D2860; D_game_800D2870 = 0x800D2870; sVsCameraULx = 0x800D2874; sVsCameraLRx = 0x800D2884; @@ -381,7 +381,7 @@ func_game_800A1C14 = 0x800A1C14; func_game_800A1E68 = 0x800A1E68; func_game_800A1F44 = 0x800A1F44; func_game_800A1FB0 = 0x800A1FB0; -func_game_800A24DC = 0x800A24DC; +Game_Draw = 0x800A24DC; func_game_800A25DC = 0x800A25DC; Game_Update = 0x800A26C0; func_game_800A3608 = 0x800A3608; @@ -397,7 +397,7 @@ gMedalFlashTimer = 0x801617B8; D_800D1AEC = 0x800D1AEC; //type:s32 size:0x1B0 // fox_play -D_play_80161A50 = 0x80161A50; +gSavedZoSearchlightStatus = 0x80161A50; D_play_80161A54 = 0x80161A54; D_play_80161A5C = 0x80161A5C; gScreenFlashTimer = 0x80161A60; @@ -413,8 +413,8 @@ D_ctx_80161A78 = 0x80161A78; D_ctx_80161A7C = 0x80161A7C; D_ctx_80161A80 = 0x80161A80; D_ctx_80161A84 = 0x80161A84; -D_ctx_80161A88 = 0x80161A88; -D_ctx_80161A8C = 0x80161A8C; +gGroundType = 0x80161A88; +gSavedGroundType = 0x80161A8C; gGoldRingCount = 0x80161A90; gHitCount = 0x80161A98; gSavedHitCount = 0x80161A9C; @@ -422,7 +422,7 @@ gLifeCount = 0x80161AA0; gLaserStrength = 0x80161AA8;//size:0x10 D_ctx_80161AB8 = 0x80161AB8; gObjects80 = 0x80161B00; //size:0x1900 -gObjects4C = 0x80163400; //size:0xBE0 +gSprites = 0x80163400; //size:0xBE0 gActors = 0x80163FE0; //size:0xB130 gBosses = 0x8016F110; //size:0x1020 gEffects = 0x80170130; //size:0x36B0 @@ -441,17 +441,17 @@ gOverlaySetup = 0x801774F8; D_ctx_80177500 = 0x80177500; gOverlayStage = 0x80177820; D_ctx_80177824 = 0x80177824; -D_ctx_80177828 = 0x80177828; +gEnemyShotSpeed = 0x80177828; D_ctx_8017782C = 0x8017782C; D_ctx_80177830 = 0x80177830; gGameState = 0x80177834; -D_ctx_80177838 = 0x80177838; -D_Timer_8017783C = 0x8017783C; -D_ctx_80177840 = 0x80177840; +gLevelStatusScreenTimer = 0x80177838; +gNextGameStateTimer = 0x8017783C; +gLevelClearScreenTimer = 0x80177840; gOptionMenuStatus = 0x8017784C; //type:OptionState gBossHealthBar = 0x80177848; D_ctx_80177850 = 0x80177850; -D_ctx_80177854 = 0x80177854; +gPlayState = 0x80177854; D_ctx_80177858 = 0x80177858; D_ctx_80177868 = 0x80177868; D_ctx_80177870 = 0x80177870; @@ -468,11 +468,11 @@ gTeamShields = 0x801778B0; //size:0x18 D_ctx_801778C8 = 0x801778C8; gSavedTeamShields = 0x801778D0; //size:0x18 gVersusMode = 0x801778E8; -D_ctx_801778F0 = 0x801778F0;//size=0x18 +gPrevPlanetSavedTeamShields = 0x801778F0;//size=0x18 gBoostButton = 0x80177908; gTeamDamage = 0x80177910; gBrakeButton = 0x80177928; -D_ctx_80177930 = 0x80177930; +gNextPlanetPath = 0x80177930; gShootButton = 0x80177938; gGroundLevel = 0x80177940; gBombButton = 0x80177948; @@ -535,7 +535,7 @@ D_ctx_80177CB4 = 0x80177CB4; D_ctx_80177CBC = 0x80177CBC; D_ctx_80177CC4 = 0x80177CC4; D_ctx_80177CC8 = 0x80177CC8; -D_ctx_80177CD0 = 0x80177CD0; // size:0x18 +gStarWolfTeamAlive = 0x80177CD0; // size:0x18 D_ctx_80177D08 = 0x80177D08; gRightWingHealth = 0x80177D10; D_ctx_80177D20 = 0x80177D20; @@ -552,9 +552,9 @@ gGameFrameCount = 0x80177DB0; D_ctx_80177DC8 = 0x80177DC8; D_ctx_80177E70 = 0x80177E70; D_ctx_80177E78 = 0x80177E78; -D_ctx_80177E80 = 0x80177E80; +gRingPassCount = 0x80177E80; D_ctx_80177E88 = 0x80177E88; // size:0xC -D_ctx_80177E98 = 0x80177E98; +gTeamArrowsViewPos = 0x80177E98; D_ctx_80177F10 = 0x80177F10; D_ctx_80177F20 = 0x80177F20; //size:0xF4 D_ctx_80178028 = 0x80178028; //size:0xF4 @@ -562,7 +562,7 @@ D_ctx_8017812C = 0x8017812C; D_ctx_80178130 = 0x80178130; //size:0xF4 gCurrentLevel = 0x80178234; D_ctx_80178238 = 0x80178238;//size:0x3D type:u8 -D_ctx_8017827C = 0x8017827C; +gLevelStage = 0x8017827C; gPlayer = 0x80178280; gBossActive = 0x80178284; D_ctx_80178288 = 0x80178288; @@ -586,26 +586,26 @@ D_ctx_801782F8 = 0x801782F8; D_ctx_801782FC = 0x801782FC; D_ctx_80178300 = 0x80178300; D_ctx_80178308 = 0x80178308; -D_ctx_80178310 = 0x80178310; +gLevelObjects = 0x80178310; gFogRed = 0x80178320; gFogGreen = 0x80178328; gFogBlue = 0x80178330; gFogAlpha = 0x80178338; -D_ctx_80178340 = 0x80178340; -D_ctx_80178348 = 0x80178348; -D_ctx_80178350 = 0x80178350; -D_ctx_80178354 = 0x80178354; -D_ctx_80178358 = 0x80178358; -D_ctx_8017835C = 0x8017835C; +gFillScreenAlpha = 0x80178340; +gFillScreenRed = 0x80178348; +gFillScreenGreen = 0x80178350; +gFillScreenBlue = 0x80178354; +gFillScreenAlphaTarget = 0x80178358; +gFillScreenAlphaStep = 0x8017835C; D_ctx_80178360 = 0x80178360; D_ctx_80178364 = 0x80178364; D_ctx_80178368 = 0x80178368; D_ctx_8017836C = 0x8017836C; D_ctx_80178370 = 0x80178370; -D_ctx_80178380 = 0x80178380; -D_ctx_80178390 = 0x80178390; -D_ctx_801783A0 = 0x801783A0; -D_ctx_801783B0 = 0x801783B0; +gPlayerFillScreenAlphas = 0x80178380; +gPlayerFillScreenReds = 0x80178390; +gPlayerFillScreenGreens = 0x801783A0; +gPlayerFillScreenBlues = 0x801783B0; D_ctx_801783D0 = 0x801783D0; D_ctx_801783D4 = 0x801783D4; gFogNear = 0x801783D8; @@ -679,7 +679,7 @@ func_play_800A5330 = 0x800A5330; func_play_800A5338 = 0x800A5338; func_play_800A55B0 = 0x800A55B0; func_play_800A57E0 = 0x800A57E0; -func_play_800A5844 = 0x800A5844; +Play_Setup = 0x800A5844; func_play_800A594C = 0x800A594C; func_play_800A5D6C = 0x800A5D6C; func_play_800A5EBC = 0x800A5EBC; @@ -690,7 +690,7 @@ BonusText_Initialize = 0x800A60B8; TexturedLine_Initialize = 0x800A60E8; RadarMark_Initialize = 0x800A6118; func_play_800A6148 = 0x800A6148; -func_play_800A6590 = 0x800A6590; +Play_UpdateFillScreen = 0x800A6590; func_play_800A668C = 0x800A668C; func_play_800A670C = 0x800A670C; func_play_800A69F8 = 0x800A69F8; @@ -713,7 +713,7 @@ func_play_800AB304 = 0x800AB304; func_play_800AB334 = 0x800AB334; func_play_800AB964 = 0x800AB964; func_play_800ABA08 = 0x800ABA08; -func_play_800ABAB4 = 0x800ABAB4; +Play_Init = 0x800ABAB4; func_play_800AC290 = 0x800AC290; func_play_800AC650 = 0x800AC650; func_play_800ACA40 = 0x800ACA40; @@ -750,7 +750,7 @@ func_play_800B41EC = 0x800B41EC; func_play_800B42B0 = 0x800B42B0; func_play_800B44C4 = 0x800B44C4; func_play_800B46F8 = 0x800B46F8; -func_play_800B48BC = 0x800B48BC; +Player_Update1 = 0x800B48BC; func_play_800B56BC = 0x800B56BC; func_play_800B5D30 = 0x800B5D30; func_play_800B5FBC = 0x800B5FBC; @@ -759,16 +759,16 @@ func_play_800B6848 = 0x800B6848; func_play_800B6BFC = 0x800B6BFC; func_play_800B6F50 = 0x800B6F50; func_play_800B7184 = 0x800B7184; -func_play_800B71E4 = 0x800B71E4; +Player_Update2 = 0x800B71E4; func_play_800B73E0 = 0x800B73E0; -func_play_800B79B0 = 0x800B79B0; -func_play_800B832C = 0x800B832C; +Play_UpdateLevel = 0x800B79B0; +Play_Update = 0x800B832C; func_play_800B852C = 0x800B852C; func_play_800B86A4 = 0x800B86A4; -func_play_800B86CC = 0x800B86CC; +Play_Main = 0x800B86CC; D_tank_800C9F2C = 0x800C9F2C; -D_edata_800CBF34 = 0x800CBF34; +gHitboxNone = 0x800CBF34; D_bg_8015F970 = 0x8015F970; D_bg_8015F984 = 0x8015F984; D_ctx_8017796C = 0x8017796C; diff --git a/linker_scripts/us/symbol_addrs_nlib_funcs.txt b/linker_scripts/us/symbol_addrs_nlib_funcs.txt index d946b34f..15b60b1f 100644 --- a/linker_scripts/us/symbol_addrs_nlib_funcs.txt +++ b/linker_scripts/us/symbol_addrs_nlib_funcs.txt @@ -12,8 +12,8 @@ Lib_vsPrintf = 0x80002E80; Lib_vTable = 0x80002EA0; Lib_SwapBuffers = 0x80002EE4; Lib_QuickSort = 0x80002F88; -Lib_Perspective = 0x8000316C; -Lib_Ortho = 0x800032B4; +Lib_InitPerspective = 0x8000316C; +Lib_InitOrtho = 0x800032B4; Lib_DmaRead = 0x800033E0; Lib_FillScreen = 0x800034E8; diff --git a/src/engine/fox_360.c b/src/engine/fox_360.c index ed76eff4..dfffbaed 100644 --- a/src/engine/fox_360.c +++ b/src/engine/fox_360.c @@ -35,22 +35,22 @@ s32 D_360_800C9B4C = 96 * 30; /* static */ Vec3f D_360_800C9B98 = { 60.0f, 0.0f, -170.0f }; /* static */ Vec3f D_360_800C9BA4 = { -60.0f, 0.0f, -170.0f }; -s32 D_360_8015F900; -s32 D_360_8015F904; -s16 D_360_8015F908; -s32 D_360_8015F90C; -s32 D_360_8015F910; -f32 D_360_8015F914; -f32 D_360_8015F918; -f32 D_360_8015F91C; -u8 D_360_8015F920; -u8 D_360_8015F921; -s32 D_360_8015F924; -s32 D_360_8015F928; -s32 D_360_8015F930[3]; -s32 D_360_8015F93C; -s32 D_360_8015F940; -f32 D_360_8015F944; +s32 gAllRangeSupplyTimer; +s32 sStarWolfKillTimer; +s16 gStarWolfMsgTimer; +s32 gAllRangeWingRepairTimer; +s32 gAllRangeWingRepairSent; +f32 gSzMissileR; +f32 gSzMissileG; +f32 gSzMissileB; +u8 gKaKilledAlly; +u8 gKaAllyKillCount; +s32 gAllRangeCheckpoint; +s32 gAllRangeEventTimer; +s32 gAllRangeCountdown[3]; +s32 gShowAllRangeCountdown; +s32 gAllRangeFrameCount; +f32 gAllRangeCountdownScale; void func_360_8002E3E0(Actor* actor) { s32 hits = 0; @@ -61,23 +61,23 @@ void func_360_8002E3E0(Actor* actor) { (void) "time=%d\n"; (void) "time=%d\n"; if (gCurrentLevel == LEVEL_VENOM_2) { - if (D_360_8015F940 < 128 * 30) { + if (gAllRangeFrameCount < 128 * 30) { hits = 50; - } else if (D_360_8015F940 < 192 * 30) { + } else if (gAllRangeFrameCount < 192 * 30) { hits = 30; - } else if (D_360_8015F940 < 256 * 30) { + } else if (gAllRangeFrameCount < 256 * 30) { hits = 20; - } else if (D_360_8015F940 < 320 * 30) { + } else if (gAllRangeFrameCount < 320 * 30) { hits = 10; } } else { - if (D_360_8015F940 < 128 * 30) { + if (gAllRangeFrameCount < 128 * 30) { hits = 10; - } else if (D_360_8015F940 < 192 * 30) { + } else if (gAllRangeFrameCount < 192 * 30) { hits = 5; - } else if (D_360_8015F940 < 256 * 30) { + } else if (gAllRangeFrameCount < 256 * 30) { hits = 2; - } else if (D_360_8015F940 < 320 * 30) { + } else if (gAllRangeFrameCount < 320 * 30) { hits = 1; } } @@ -97,12 +97,12 @@ bool func_360_8002E4F8(u16* msg, RadioCharacterId rcid) { } } -void func_360_8002E548(void) { - if (D_360_8015F93C != 0) { - s32 sp24 = D_360_8015F930[1]; +void AllRange_UpdateCountdown(void) { + if (gShowAllRangeCountdown != 0) { + s32 seconds = gAllRangeCountdown[1]; - func_hud_8008E51C(D_360_8015F930, D_360_8015F944); - if ((D_360_8015F930[0] == 0) && (sp24 != D_360_8015F930[1]) && (D_360_8015F930[1] < 15)) { + func_hud_8008E51C(gAllRangeCountdown, gAllRangeCountdownScale); + if ((gAllRangeCountdown[0] == 0) && (seconds != gAllRangeCountdown[1]) && (gAllRangeCountdown[1] < 15)) { AUDIO_PLAY_SFX(0x4900C02A, gDefaultSfxSource, 4); } } @@ -174,9 +174,9 @@ void func_360_8002E700(Player* player) { break; case 1: if (gCsFrameCount >= 47) { - D_ctx_80178358 = 255; - D_ctx_8017835C = 32; - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0; + gFillScreenAlphaTarget = 255; + gFillScreenAlphaStep = 32; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; } if (gCsFrameCount >= 64) { player->unk_1D0++; @@ -184,8 +184,8 @@ void func_360_8002E700(Player* player) { } break; case 2: - if (D_ctx_80178340 == 255) { - D_ctx_80178358 = 0; + if (gFillScreenAlpha == 255) { + gFillScreenAlphaTarget = 0; player->pos.x = 400.0f; player->pos.y = -420.0f; player->pos.z = 0.0f; @@ -206,9 +206,9 @@ void func_360_8002E700(Player* player) { } break; case 3: - D_ctx_8017835C = 32; + gFillScreenAlphaStep = 32; gCsCamEyeZ -= 1.0f; - if (D_ctx_80178340 == 0) { + if (gFillScreenAlpha == 0) { player->unk_190 = player->unk_194 = 5.0f; player->unk_114 = 90.0f; player->unk_0D0 = D_play_80161A54; @@ -278,7 +278,7 @@ void func_360_8002ED60(Player* player) { } void func_360_8002EE34(void) { - D_360_8015F904 = gRadioState = gActors[1].iwork[1] = gActors[2].iwork[1] = gActors[3].iwork[1] = 0; + sStarWolfKillTimer = gRadioState = gActors[1].iwork[1] = gActors[2].iwork[1] = gActors[3].iwork[1] = 0; } void func_360_8002EE64(Actor* actor) { @@ -390,7 +390,7 @@ void func_360_8002F180(void) { actor->iwork[11] = 1; if (actor->aiType <= AI360_PEPPY) { AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_edata_800CC01C); + actor->info.hitbox = SEGMENTED_TO_VIRTUAL(gTeamHitbox); actor->info.unk_1C = 0.0f; actor->info.bonus = 0; } else { @@ -405,7 +405,7 @@ void func_360_8002F3E0(void) { s32 i; for (i = 0, actor = &gActors[4]; i < 4; i++, actor++) { - if (D_ctx_80177CD0[i] != 0) { + if (gStarWolfTeamAlive[i] != 0) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; actor->obj.pos.x = D_360_800C9AFC[i].x; @@ -443,7 +443,7 @@ void func_360_8002F5F4(u16* msg, RadioCharacterId character) { } void func_360_8002F64C(u16* msg, RadioCharacterId character) { - if ((D_ctx_80177CD0[0] + D_ctx_80177CD0[1] + D_ctx_80177CD0[2] + D_ctx_80177CD0[3]) == 0) { + if ((gStarWolfTeamAlive[0] + gStarWolfTeamAlive[1] + gStarWolfTeamAlive[2] + gStarWolfTeamAlive[3]) == 0) { gRadioState = 0; } func_360_8002F5F4(msg, character); @@ -453,19 +453,19 @@ void func_360_8002F69C(Actor* actor) { Actor* otherActor; s32 i; - if (D_360_8015F904 != 0) { - D_360_8015F904--; - if ((D_360_8015F904 == 0) && (gCurrentLevel != LEVEL_BOLSE) && - ((D_ctx_80177CD0[0] + D_ctx_80177CD0[1] + D_ctx_80177CD0[2] + D_ctx_80177CD0[3]) == 1)) { + if (sStarWolfKillTimer != 0) { + sStarWolfKillTimer--; + if ((sStarWolfKillTimer == 0) && (gCurrentLevel != LEVEL_BOLSE) && + ((gStarWolfTeamAlive[0] + gStarWolfTeamAlive[1] + gStarWolfTeamAlive[2] + gStarWolfTeamAlive[3]) == 1)) { Radio_PlayMessage(gMsg_ID_19465, RCID_FOX); } } - if (((D_360_8015F928 + 100) == (0, D_360_800C9B4C)) && (gCurrentLevel != LEVEL_VENOM_2)) { + if (((gAllRangeEventTimer + 100) == (0, D_360_800C9B4C)) && (gCurrentLevel != LEVEL_VENOM_2)) { // fake? SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 30); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 30); } - if (D_360_8015F928 == D_360_800C9B4C) { + if (gAllRangeEventTimer == D_360_800C9B4C) { func_360_8002F3E0(); actor->state = 3; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_0; @@ -485,9 +485,9 @@ void func_360_8002F69C(Actor* actor) { gPlayer[0].camAt.y = gActors[4].obj.pos.y; gPlayer[0].camAt.z = gActors[4].obj.pos.z; } - if (D_360_8015F928 > D_360_800C9B4C) { - if (D_360_8015F908 == 0) { - D_360_8015F940++; + if (gAllRangeEventTimer > D_360_800C9B4C) { + if (gStarWolfMsgTimer == 0) { + gAllRangeFrameCount++; for (i = 1, otherActor = &gActors[1]; i < 8; i++, otherActor++) { if ((otherActor->obj.status == OBJ_ACTIVE) && (otherActor->state == 2) && (otherActor->health < 70) && (otherActor->timer_0C6 != 0) && (otherActor->unk_0D4 == 1)) { @@ -526,13 +526,13 @@ void func_360_8002F69C(Actor* actor) { } } } - if (gTeamShields[1] <= 0) { + if (gTeamShields[TEAM_ID_FALCO] <= 0) { gActors[AI360_LEON].aiIndex = AI360_FOX; } - if (gTeamShields[2] <= 0) { + if (gTeamShields[TEAM_ID_SLIPPY] <= 0) { gActors[AI360_ANDREW].aiIndex = AI360_FOX; } - if (gTeamShields[3] <= 0) { + if (gTeamShields[TEAM_ID_PEPPY] <= 0) { gActors[AI360_PIGMA].aiIndex = AI360_FOX; } } @@ -611,7 +611,7 @@ void func_360_8002FC00(Actor* actor) { bool func_360_8002FE74(void) { switch (gCurrentLevel) { case LEVEL_FORTUNA: - return D_360_8015F928 == D_360_800C9B4C + 2400; + return gAllRangeEventTimer == D_360_800C9B4C + 2400; case LEVEL_BOLSE: return gBosses[2].swork[36] == 4; case LEVEL_KATINA: @@ -624,16 +624,16 @@ void func_360_8002FEF0(Actor* actor) { Actor* newActor; s32 i; - if ((D_enmy2_80161690 != 0) && (gControllerPress[gMainController].button & R_CBUTTONS)) { + if ((gCallTimer != 0) && (gControllerPress[gMainController].button & R_CBUTTONS)) { func_8001AF40(0); - D_enmy2_800CFF90 = 0; - D_enmy2_80161690 = 0; + gCallVoiceParam = 0; + gCallTimer = 0; Radio_PlayMessage(gMsg_ID_20230, RCID_ROB64); - D_360_8015F900 = 160; + gAllRangeSupplyTimer = 160; } - if (D_360_8015F900 != 0) { - D_360_8015F900--; - if (D_360_8015F900 == 0) { + if (gAllRangeSupplyTimer != 0) { + gAllRangeSupplyTimer--; + if (gAllRangeSupplyTimer == 0) { for (i = 20, newActor = &gActors[20]; i < 60; i++, newActor++) { if (newActor->obj.status == OBJ_FREE) { Actor_Initialize(newActor); @@ -657,13 +657,13 @@ void func_360_8002FEF0(Actor* actor) { } } } - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) && (D_360_8015F910 == 0)) { - if (D_360_8015F90C != 0) { - D_360_8015F90C--; + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) && !gAllRangeWingRepairSent) { + if (gAllRangeWingRepairTimer != 0) { + gAllRangeWingRepairTimer--; } - if ((gPlayer[0].shields < 64) || func_360_8002FE74() || (D_360_8015F90C == 1)) { - D_enmy2_80161690 = 60; - D_360_8015F910 = 1; + if ((gPlayer[0].shields < 64) || func_360_8002FE74() || (gAllRangeWingRepairTimer == 1)) { + gCallTimer = 60; + gAllRangeWingRepairSent = true; } } } @@ -673,7 +673,7 @@ void func_360_8003010C(Actor* actor) { Object_Kill(&actor->obj, actor->sfxSource); return; } - D_360_8015F928++; + gAllRangeEventTimer++; switch (gCurrentLevel) { case LEVEL_FORTUNA: Fortuna_80187960(actor); @@ -907,14 +907,14 @@ void func_360_8003088C(Actor* actor) { actor->timer_0BC = 0; } if ((gCurrentLevel == LEVEL_KATINA) && (actor->unk_0B6 == 1) && (actor->unk_0D4 == 1)) { - if (D_360_8015F921 < 2) { + if (gKaAllyKillCount < 2) { func_360_8002F5F4(gMsg_ID_18018, RCID_BILL); } - D_360_8015F921++; + gKaAllyKillCount++; } switch (actor->aiType) { case AI360_WOLF: - D_ctx_80177CD0[0] = 0; + gStarWolfTeamAlive[0] = 0; if (gCurrentLevel == LEVEL_VENOM_2) { func_360_8002F64C(gMsg_ID_19458, RCID_WOLF); } else { @@ -922,7 +922,7 @@ void func_360_8003088C(Actor* actor) { } break; case AI360_LEON: - D_ctx_80177CD0[1] = 0; + gStarWolfTeamAlive[1] = 0; if (gCurrentLevel == LEVEL_VENOM_2) { func_360_8002F64C(gMsg_ID_19459, RCID_LEON); } else { @@ -930,7 +930,7 @@ void func_360_8003088C(Actor* actor) { } break; case AI360_PIGMA: - D_ctx_80177CD0[2] = 0; + gStarWolfTeamAlive[2] = 0; if (gCurrentLevel == LEVEL_VENOM_2) { func_360_8002F64C(gMsg_ID_19460, RCID_PIGMA); } else { @@ -938,7 +938,7 @@ void func_360_8003088C(Actor* actor) { } break; case AI360_ANDREW: - D_ctx_80177CD0[3] = 0; + gStarWolfTeamAlive[3] = 0; if (gCurrentLevel == LEVEL_VENOM_2) { func_360_8002F64C(gMsg_ID_19461, RCID_ANDREW); } else { @@ -946,8 +946,8 @@ void func_360_8003088C(Actor* actor) { } break; } - if ((actor->aiType >= AI360_WOLF) && (actor->aiType < AI360_KATT)) { - D_360_8015F904 = 150; + if ((actor->aiType >= AI360_WOLF) && (actor->aiType <= AI360_ANDREW)) { + sStarWolfKillTimer = 150; } switch (actor->unk_0D4) { case 1: @@ -969,7 +969,8 @@ void func_360_8003088C(Actor* actor) { case 103: case 104: if ((actor->aiType >= AI360_WOLF) && (actor->aiType < AI360_KATT)) { - if ((D_ctx_80177CD0[0] + D_ctx_80177CD0[1] + D_ctx_80177CD0[2] + D_ctx_80177CD0[3]) == 0) { + if ((gStarWolfTeamAlive[0] + gStarWolfTeamAlive[1] + gStarWolfTeamAlive[2] + + gStarWolfTeamAlive[3]) == 0) { switch (actor->unk_0D4) { case 102: Radio_PlayMessage(gMsg_ID_9438, RCID_FALCO); @@ -1052,8 +1053,8 @@ void func_360_8003088C(Actor* actor) { } else if (actor->unk_0D4 < 105) { if (actor->aiType >= AI360_WOLF) { if (actor->unk_0D4 == 1) { - if ((gCurrentLevel == LEVEL_KATINA) && (actor->unk_0B6 == 1) && (D_360_8015F920 == 0)) { - D_360_8015F920 = 1; + if ((gCurrentLevel == LEVEL_KATINA) && (actor->unk_0B6 == 1) && (gKaKilledAlly == 0)) { + gKaKilledAlly = 1; Radio_PlayMessage(gMsg_ID_18015, RCID_BILL); } else if (actor->aiType == AI360_KATT) { func_360_8002F5F4(gMsg_ID_20084, RCID_KATT); @@ -1093,7 +1094,7 @@ void func_360_8003088C(Actor* actor) { (actor->iwork[2] != AI360_FOX)) { switch (actor->aiType) { case AI360_FALCO: - if (gTeamShields[1] >= 90) { + if (gTeamShields[TEAM_ID_FALCO] >= 90) { func_360_8002F5F4(gMsg_ID_9130, RCID_FALCO); } else { Radio_PlayMessage(gMsg_ID_9151, RCID_FALCO); @@ -1104,7 +1105,7 @@ void func_360_8003088C(Actor* actor) { } break; case AI360_SLIPPY: - if (gTeamShields[2] >= 90) { + if (gTeamShields[TEAM_ID_SLIPPY] >= 90) { func_360_8002F5F4(gMsg_ID_9140, RCID_SLIPPY); } else { Radio_PlayMessage(gMsg_ID_9152, RCID_SLIPPY); @@ -1115,7 +1116,7 @@ void func_360_8003088C(Actor* actor) { } break; case AI360_PEPPY: - if (gTeamShields[3] >= 90) { + if (gTeamShields[TEAM_ID_PEPPY] >= 90) { func_360_8002F5F4(gMsg_ID_9150, RCID_PEPPY); } else { Radio_PlayMessage(gMsg_ID_9153, RCID_PEPPY); @@ -1221,7 +1222,7 @@ void ActorAllRange_Update(Actor* this) { } } if ((this->timer_0CA[0] != 0) && (gCurrentLevel != LEVEL_VENOM_2) && (this->aiType < AI360_10) && - (this->timer_0CA[0] < 5) && !(gGameFrameCount & 0x1F)) { + (this->timer_0CA[0] < 5) && ((gGameFrameCount % 32) == 0)) { this->iwork[16] = 10; } if ((this->iwork[16] != 0) && (this->state < 7)) { @@ -1567,8 +1568,8 @@ void ActorAllRange_Update(Actor* this) { this->iwork[0] = 1; } } - if ((gRadioState == 0) && (this->timer_0C4 == 0) && (D_360_8015F928 > 700) && - (D_360_8015F908 == 0) && (gActors[0].obj.status == OBJ_ACTIVE)) { + if ((gRadioState == 0) && (this->timer_0C4 == 0) && (gAllRangeEventTimer > 700) && + (gStarWolfMsgTimer == 0) && (gActors[0].obj.status == OBJ_ACTIVE)) { this->timer_0C4 = 600; if (Rand_ZeroOne() < 0.5f) { gActors[this->aiIndex].iwork[6]++; @@ -1616,22 +1617,22 @@ void ActorAllRange_Update(Actor* this) { } break; case AI360_WOLF: - if (D_ctx_80177CD0[0] != 0) { + if (gStarWolfTeamAlive[0] != 0) { func_360_8002F5F4(gMsg_ID_9330, RCID_WOLF); } break; case AI360_LEON: - if (D_ctx_80177CD0[1] != 0) { + if (gStarWolfTeamAlive[1] != 0) { func_360_8002F5F4(gMsg_ID_9340, RCID_LEON); } break; case AI360_PIGMA: - if (D_ctx_80177CD0[2] != 0) { + if (gStarWolfTeamAlive[2] != 0) { func_360_8002F5F4(gMsg_ID_9350, RCID_PIGMA); } break; case AI360_ANDREW: - if (D_ctx_80177CD0[3] != 0) { + if (gStarWolfTeamAlive[3] != 0) { func_360_8002F5F4(gMsg_ID_9360, RCID_ANDREW); } break; @@ -1818,7 +1819,7 @@ void ActorAllRange_Update(Actor* this) { break; case 8: this->fwork[1] = 40.0f; - if (this->index & 1) { + if ((this->index % 2) != 0) { Math_SmoothStepToAngle(&this->obj.rot.z, 355.0f, 0.1f, 3.0f, 0.01f); } else { Math_SmoothStepToAngle(&this->obj.rot.z, 5.0f, 0.1f, 3.0f, 0.01f); @@ -1942,7 +1943,7 @@ void ActorAllRange_Update(Actor* this) { } if ((this->fwork[7] > 0.01f) && (this->fwork[7] < 359.9f)) { Math_SmoothStepToAngle(&this->obj.rot.z, this->fwork[7], 0.2f, 100.0f, 0.01f); - if ((this->aiType == AI360_KATT) && !(gGameFrameCount & 1)) { + if ((this->aiType == AI360_KATT) && ((gGameFrameCount % 2) == 0)) { if ((this->fwork[7] > 10.0f) && (this->fwork[7] < 350.0f)) { Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, 0); Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, 1); @@ -2154,7 +2155,7 @@ void func_360_80035098(Actor* actor) { bool func_360_800352E0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { Actor* this = thisx; - if (this->timer_0C6 & 1) { + if ((this->timer_0C6 % 2) != 0) { RCP_SetupDL(&gMasterDisp, 0x22); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 128, 128, 255); } else { @@ -2165,41 +2166,40 @@ bool func_360_800352E0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* } if ((limbIndex == 1) || (limbIndex == 2)) { RCP_SetupDL(&gMasterDisp, 0x22); - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, (s32) D_360_8015F914, (s32) D_360_8015F918, (s32) D_360_8015F91C, - 255); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, (s32) gSzMissileR, (s32) gSzMissileG, (s32) gSzMissileB, 255); } return false; } -void ActorAllRange_Draw(Actor* actor) { +void ActorAllRange_Draw(ActorAllRange* this) { f32 sp38; s32 pad[3]; Vec3f sp1E4 = { 0.0f, 0.0f, 0.0f }; Vec3f sp7C[30]; f32 pad2; - if (actor->aiType != AI360_EVENT_HANDLER) { - if ((actor->iwork[8] != 0) && (actor->aiType < AI360_GREAT_FOX)) { - pad2 = SIN_DEG(actor->iwork[8] * 400.0f); - sp38 = actor->iwork[8] * pad2; + if (this->aiType != AI360_EVENT_HANDLER) { + if ((this->iwork[8] != 0) && (this->aiType < AI360_GREAT_FOX)) { + pad2 = SIN_DEG(this->iwork[8] * 400.0f); + sp38 = this->iwork[8] * pad2; Matrix_RotateY(gGfxMatrix, M_DTOR * sp38, 1); Matrix_RotateX(gGfxMatrix, M_DTOR * sp38, 1); Matrix_RotateZ(gGfxMatrix, M_DTOR * sp38, 1); Matrix_SetGfxMtx(&gMasterDisp); } - if ((actor->timer_0C6 % 2) == 0) { + if ((this->timer_0C6 % 2) == 0) { RCP_SetupDL(&gMasterDisp, 0x1D); gSPFogPosition(gMasterDisp++, gFogNear, 1005); } - switch (actor->aiType) { + switch (this->aiType) { case AI360_FOX: case AI360_FALCO: case AI360_SLIPPY: case AI360_PEPPY: Matrix_Push(&gGfxMatrix); - func_edisplay_8005B388(actor); + func_edisplay_8005B388(this); Matrix_Pop(&gGfxMatrix); - func_360_80035098(actor); + func_360_80035098(this); break; case AI360_WOLF: case AI360_LEON: @@ -2209,43 +2209,43 @@ void ActorAllRange_Draw(Actor* actor) { gSPDisplayList(gMasterDisp++, D_STAR_WOLF_F0103D0); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 30.0f, 0.0f, -60.0f, 1); - func_edisplay_8005B1E8(actor, 2); + func_edisplay_8005B1E8(this, 2); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, -30.0f, 0.0f, -60.0f, 1); - func_edisplay_8005B1E8(actor, 2); + func_edisplay_8005B1E8(this, 2); Matrix_Pop(&gGfxMatrix); - func_360_80035098(actor); - func_360_80034E64(actor); + func_360_80035098(this); + func_360_80034E64(this); } else { gSPDisplayList(gMasterDisp++, D_STAR_WOLF_F00F200); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, 1); if (gCurrentLevel == LEVEL_BOLSE) { - func_edisplay_8005B1E8(actor, 3); + func_edisplay_8005B1E8(this, 3); } else { - func_edisplay_8005B1E8(actor, 2); + func_edisplay_8005B1E8(this, 2); } } break; case AI360_KATT: gSPDisplayList(gMasterDisp++, D_D009A40); - func_edisplay_8005ADAC(actor); + func_edisplay_8005ADAC(this); break; case AI360_BILL: gSPDisplayList(gMasterDisp++, D_D00B880); - func_edisplay_8005ADAC(actor); + func_edisplay_8005ADAC(this); break; case AI360_GREAT_FOX: - func_edisplay_8005F670(&actor->obj.pos); - actor->unk_0B6 = 1; - func_demo_8004FEC0(actor); + func_edisplay_8005F670(&this->obj.pos); + this->unk_0B6 = 1; + func_demo_8004FEC0(this); break; case AI360_MISSILE: Animation_GetFrameData(&D_SZ_6006D64, 0, sp7C); - Animation_DrawSkeleton(3, D_SZ_6006E50, sp7C, func_360_800352E0, NULL, actor, gCalcMatrix); + Animation_DrawSkeleton(3, D_SZ_6006E50, sp7C, func_360_800352E0, NULL, this, gCalcMatrix); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -400.0f, 1); - Matrix_Scale(gGfxMatrix, actor->fwork[29], actor->fwork[29], actor->fwork[29], 1); - func_edisplay_8005B1E8(actor, 3); + Matrix_Scale(gGfxMatrix, this->fwork[29], this->fwork[29], this->fwork[29], 1); + func_edisplay_8005B1E8(this, 3); break; default: if (gCurrentLevel == LEVEL_FORTUNA) { @@ -2254,47 +2254,47 @@ void ActorAllRange_Draw(Actor* actor) { gSPDisplayList(gMasterDisp++, D_FO_6006BE0); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -100.0f, 1); Matrix_Scale(gGfxMatrix, 1.5f, 1.5f, 1.5f, 1); - func_edisplay_8005B1E8(actor, 2); + func_edisplay_8005B1E8(this, 2); } else if (gCurrentLevel == LEVEL_KATINA) { - switch (actor->unk_0B6) { + switch (this->unk_0B6) { case 0: gSPDisplayList(gMasterDisp++, D_KA_600EFF0); break; case 1: gSPDisplayList(gMasterDisp++, D_KA_600E050); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, 1); - func_edisplay_8005B1E8(actor, 0); + func_edisplay_8005B1E8(this, 0); break; case 3: gSPDisplayList(gMasterDisp++, D_KA_6001530); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 30.0f, 1); - func_360_80034E64(actor); + func_360_80034E64(this); break; } } else if (gCurrentLevel == LEVEL_SECTOR_Z) { gSPDisplayList(gMasterDisp++, D_SZ_6004FE0) Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, 1); - func_edisplay_8005B1E8(actor, 2); + func_edisplay_8005B1E8(this, 2); } else if (gCurrentLevel == LEVEL_BOLSE) { gSPDisplayList(gMasterDisp++, D_BO_6008770) Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, 1); - func_edisplay_8005B1E8(actor, 2); + func_edisplay_8005B1E8(this, 2); Matrix_Pop(&gGfxMatrix); - func_360_80034E64(actor); + func_360_80034E64(this); } else if (gCurrentLevel == LEVEL_VENOM_ANDROSS) { - Animation_GetFrameData(&D_VE2_600C200, actor->unk_04A, actor->vwork); + Animation_GetFrameData(&D_VE2_600C200, this->unk_04A, this->vwork); Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 10.0f, 1); - Animation_DrawSkeleton(0, D_VE2_600C2AC, actor->vwork, NULL, NULL, actor, &gIdentityMatrix); + Animation_DrawSkeleton(0, D_VE2_600C2AC, this->vwork, NULL, NULL, this, &gIdentityMatrix); } else if (gCurrentLevel == LEVEL_VERSUS) { gSPDisplayList(gMasterDisp++, D_versus_3015740); } else if (gCurrentLevel == LEVEL_TRAINING) { - if (actor->aiIndex == AI360_FOX) { + if (this->aiIndex == AI360_FOX) { gSPDisplayList(gMasterDisp++, D_STAR_WOLF_F00F200); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, 1); - func_edisplay_8005B1E8(actor, 3); + func_edisplay_8005B1E8(this, 3); } else { gSPDisplayList(gMasterDisp++, D_ENMY_PLANET_40068F0); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, 1); - func_edisplay_8005B1E8(actor, 2); + func_edisplay_8005B1E8(this, 2); } } break; diff --git a/src/engine/fox_A48A0.c b/src/engine/fox_A48A0.c index 9eb4b111..0f9adc10 100644 --- a/src/engine/fox_A48A0.c +++ b/src/engine/fox_A48A0.c @@ -14,13 +14,13 @@ void func_800A3CA0(void) { void func_800A3E00(void) { switch (D_ctx_80177868) { case 0: - if (D_Timer_8017783C == 0) { + if (gNextGameStateTimer == 0) { D_ctx_80177868 = 1; } break; case 1: D_ctx_80177868 = 2; - gDrawMode = DRAWMODE_7; + gDrawMode = DRAW_UNK_7; gCsCamAtY = 0.0f; gCsCamAtX = gCsCamAtY; gCsCamEyeZ = gCsCamAtX; @@ -32,14 +32,14 @@ void func_800A3E00(void) { if ((gControllerPress[0].button & START_BUTTON) || (gControllerPress[1].button & START_BUTTON)) { func_8001D638(0); D_ctx_80177868 = 3; - gDrawMode = DRAWMODE_0; - func_play_800A5844(); - D_Timer_8017783C = 0; + gDrawMode = DRAW_NONE; + Play_Setup(); + gNextGameStateTimer = 0; } break; case 3: - if (D_Timer_8017783C == 0) { - D_ctx_80177854 = 2; + if (gNextGameStateTimer == 0) { + gPlayState = PLAY_UPDATE; } break; } diff --git a/src/engine/fox_beam.c b/src/engine/fox_beam.c index b23aa806..b81d1fd2 100644 --- a/src/engine/fox_beam.c +++ b/src/engine/fox_beam.c @@ -60,7 +60,7 @@ void func_beam_80035E78(PlayerShot* shot) { gScreenFlashTimer = 4; if (shot->obj.pos.y < (gGroundLevel + 450.0f)) { gCameraShake = 15; - if (D_ctx_80161A88 == 2) { + if (gGroundType == GROUNDTYPE_WATER) { func_effect_8007D9DC(shot->obj.pos.x, gGroundLevel + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, shot->unk_48 * 3.0f, 0); func_effect_8007D9DC(shot->obj.pos.x, gGroundLevel + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, @@ -184,7 +184,7 @@ void func_beam_800365E4(f32 xPos, f32 yPos, f32 zPos, f32 arg3, f32 arg4, f32 ar s32 unk44, s32 time) { s32 i; - if ((D_ctx_801784AC != 4) && (gLevelType == LEVELTYPE_PLANET) && (D_ctx_80161A88 != 2) && + if ((D_ctx_801784AC != 4) && (gLevelType == LEVELTYPE_PLANET) && (gGroundType != GROUNDTYPE_WATER) && (gCurrentLevel != LEVEL_SOLAR) && (gCurrentLevel != LEVEL_BOLSE) && (gCurrentLevel != LEVEL_TRAINING) && (gCurrentLevel != LEVEL_ZONESS)) { for (i = 0; i < 50; i++) { @@ -213,7 +213,7 @@ void func_beam_800366CC(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yRot, void func_beam_80036770(f32 xPos, f32 yPos, f32 zPos, f32 yRot, f32 scale) { s32 i; - if ((D_ctx_801784AC != 4) && (gLevelType == LEVELTYPE_PLANET) && (D_ctx_80161A88 <= 0) && + if ((D_ctx_801784AC != 4) && (gLevelType == LEVELTYPE_PLANET) && (gGroundType <= GROUNDTYPE_GRASS) && (gCurrentLevel != LEVEL_TRAINING) && (gCurrentLevel != LEVEL_SOLAR) && (gCurrentLevel != LEVEL_ZONESS)) { for (i = 0; i < 50; i++) { if (gEffects[i].obj.status == OBJ_FREE) { @@ -459,12 +459,12 @@ bool func_beam_80037438(PlayerShot* shot, Actor* actor) { return false; } -bool func_beam_80037698(PlayerShot* shot, Object_4C* obj4C) { - f32* temp_v0 = obj4C->info.hitbox; +bool func_beam_80037698(PlayerShot* shot, Sprite* sprite) { + f32* temp_v0 = sprite->info.hitbox; - if (((s32) temp_v0[0] != 0) && (fabsf(temp_v0[1] + obj4C->obj.pos.z - shot->obj.pos.z) < temp_v0[2]) && - (fabsf(temp_v0[3] + obj4C->obj.pos.y - shot->obj.pos.y) < temp_v0[4]) && - (fabsf(temp_v0[5] + obj4C->obj.pos.x - shot->obj.pos.x) < temp_v0[6])) { + if (((s32) temp_v0[0] != 0) && (fabsf(temp_v0[1] + sprite->obj.pos.z - shot->obj.pos.z) < temp_v0[2]) && + (fabsf(temp_v0[3] + sprite->obj.pos.y - shot->obj.pos.y) < temp_v0[4]) && + (fabsf(temp_v0[5] + sprite->obj.pos.x - shot->obj.pos.x) < temp_v0[6])) { return true; } return false; @@ -730,7 +730,7 @@ void func_beam_80038140(PlayerShot* shot) { Actor* actor; Boss* boss; Object_58* obj58; - Object_4C* obj4C; + Sprite* sprite; Object_80* obj80; Effect* effect; bool sp60; @@ -929,15 +929,15 @@ void func_beam_80038140(PlayerShot* shot) { } } if (sp60) { - for (i = 0, obj4C = gObjects4C; i < 40; i++, obj4C++) { - if (obj4C->obj.status == OBJ_ACTIVE) { - if (obj4C->obj.id != OBJ_4C_169) { - if (func_beam_80037698(shot, obj4C)) { - obj4C->unk_46 = 1; + for (i = 0, sprite = gSprites; i < 40; i++, sprite++) { + if (sprite->obj.status == OBJ_ACTIVE) { + if (sprite->obj.id != OBJ_SPRITE_TI_CACTUS) { + if (func_beam_80037698(shot, sprite)) { + sprite->unk_46 = 1; } } else { - if (func_beam_80036874(shot, obj4C->info.hitbox, &obj4C->obj) != 0) { - obj4C->unk_46 = 1; + if (func_beam_80036874(shot, sprite->info.hitbox, &sprite->obj) != 0) { + sprite->unk_46 = 1; } } } @@ -1257,7 +1257,7 @@ void func_beam_80039A50(PlayerShot* shot) { Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].unk_058, 1); Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].unk_05C, 1); Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 40.0f * M_DTOR, 1); - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.7f, 1); } else { Matrix_Scale(gGfxMatrix, 1.2f, 1.2f, 1.2f, 1); @@ -1334,7 +1334,7 @@ void func_beam_80039A50(PlayerShot* shot) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_versus_301AD60); } else { - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { var_fv1 = M_PI; } else { var_fv1 = 0.0f; @@ -1346,7 +1346,7 @@ void func_beam_80039A50(PlayerShot* shot) { gSPDisplayList(gMasterDisp++, D_versus_301AD60); } } else { - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { var_fv1 = M_PI; } else { var_fv1 = 0.0f; @@ -1436,7 +1436,7 @@ void func_beam_80039A50(PlayerShot* shot) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_101C2E0); Matrix_Pop(&gGfxMatrix); - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.7f, 1); } else { Matrix_Scale(gGfxMatrix, 1.3f, 1.3f, 1.3f, 1); @@ -1452,7 +1452,7 @@ void func_beam_80039A50(PlayerShot* shot) { Matrix_Translate(gGfxMatrix, shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + D_ctx_80177D20, 1); Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].unk_058, 1); Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].unk_05C, 1); - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { Matrix_Scale(gGfxMatrix, 1.2f, 1.2f, 1.2f, 1); } else { Matrix_Scale(gGfxMatrix, 1.5f, 1.5f, 1.5f, 1); @@ -1560,7 +1560,7 @@ void func_beam_8003B00C(PlayerShot* shot, Player* player) { shot->unk_48 += shot->vel.x; shot->unk_4C += shot->vel.y; shot->unk_50 += shot->vel.z; - if (!(gGameFrameCount & 3)) { + if (((gGameFrameCount % 4) == 0)) { func_play_800A668C(D_ctx_8017849C, D_ctx_801784A0, D_ctx_80178498); } if ((fabsf(shot->obj.pos.x - shot->unk_48) < 200.0f) && (fabsf(shot->obj.pos.y - shot->unk_4C) < 200.0f) && @@ -1591,7 +1591,7 @@ void func_beam_8003B55C(PlayerShot* shot, s32 index) { Vec3f sp44; Vec3f sp38; - if ((D_ctx_80161A88 == 2) && (shot->obj.pos.y < (gGroundLevel + 50.0f)) && (index == 0)) { + if ((gGroundType == GROUNDTYPE_WATER) && (shot->obj.pos.y < (gGroundLevel + 50.0f)) && (index == 0)) { func_effect_8007ACE0(shot->obj.pos.x, gGroundLevel, shot->obj.pos.z, 0.1f, 1.5f, shot->obj.rot.y + 20.0f); func_effect_8007ACE0(shot->obj.pos.x, gGroundLevel, shot->obj.pos.z, 0.1f, 1.5f, shot->obj.rot.y - 20.0f); } @@ -1620,7 +1620,7 @@ void func_beam_8003B55C(PlayerShot* shot, s32 index) { func_beam_80036770(shot->obj.pos.x, gGroundLevel + 2.0f, shot->obj.pos.z, shot->obj.rot.y, 2.0f); } } - if (D_ctx_80161A88 == 2) { + if (gGroundType == GROUNDTYPE_WATER) { Object_Kill(&shot->obj, shot->sfxSource); return; } @@ -1644,7 +1644,7 @@ void func_beam_8003B55C(PlayerShot* shot, s32 index) { if (shot->unk_64 == 0) { Object_Kill(&shot->obj, shot->sfxSource); return; - } else if ((shot->playerNum < 110) || (shot->unk_64 & 1)) { + } else if ((shot->playerNum < 110) || ((shot->unk_64 % 2) != 0)) { func_beam_80038140(shot); } } @@ -1761,10 +1761,10 @@ void func_beam_8003C008(PlayerShot* shot) { for (i = 0; i < ARRAY_COUNT(gBosses); i++, boss++) { if ((boss->obj.status == OBJ_ACTIVE) && (boss->timer_05A == 0)) { if (boss->obj.id == OBJ_BOSS_316) { - var_s6 = gGameFrameCount & 7; + var_s6 = gGameFrameCount % 8U; var_fs2 = shot->unk_44 * 40.0f; } else { - var_s6 = gGameFrameCount & 0xF; + var_s6 = gGameFrameCount % 16U; var_fs2 = shot->unk_44 * 30.0f; } hitboxData = boss->info.hitbox; @@ -1839,7 +1839,7 @@ void func_beam_8003C4D0(PlayerShot* shot, s32 damage) { f32 sp60; s32 pad[2]; Actor* actor; - Object_4C* obj4C; + Sprite* sprite; Object_80* obj80; Effect* effect; Player* player; @@ -1856,14 +1856,15 @@ void func_beam_8003C4D0(PlayerShot* shot, s32 damage) { obj80->dmgPart = 0; } } - for (i = 0, obj4C = gObjects4C; i < 40; i++, obj4C++) { - if ((obj4C->obj.status == OBJ_ACTIVE) && ((obj4C->obj.id == OBJ_4C_163) || (obj4C->obj.id == OBJ_4C_169) || - (obj4C->obj.id == OBJ_4C_161) || (obj4C->obj.id == OBJ_4C_162))) { - sp68 = obj4C->obj.pos.x - shot->obj.pos.x; - sp64 = obj4C->obj.pos.y - shot->obj.pos.y; - sp60 = obj4C->obj.pos.z - shot->obj.pos.z; + for (i = 0, sprite = gSprites; i < 40; i++, sprite++) { + if ((sprite->obj.status == OBJ_ACTIVE) && + ((sprite->obj.id == OBJ_SPRITE_FO_POLE) || (sprite->obj.id == OBJ_SPRITE_TI_CACTUS) || + (sprite->obj.id == OBJ_SPRITE_CO_POLE) || (sprite->obj.id == OBJ_SPRITE_CO_TREE))) { + sp68 = sprite->obj.pos.x - shot->obj.pos.x; + sp64 = sprite->obj.pos.y - shot->obj.pos.y; + sp60 = sprite->obj.pos.z - shot->obj.pos.z; if (sqrtf(SQ(sp68) + SQ(sp64) + SQ(sp60)) < temp_fs2) { - obj4C->unk_46 = 1; + sprite->unk_46 = 1; } } } @@ -1898,7 +1899,7 @@ void func_beam_8003C4D0(PlayerShot* shot, s32 damage) { if (actor->info.bonus != 0) { shot->bonus++; } - } else if ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->scale >= 0.5f) && (damage >= 31)) { + } else if ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->scale >= 0.5f) && (damage > 30)) { actor->unk_0D4 = shot->playerNum + 1; actor->vel.x = sp68 * 0.03f; actor->vel.y = sp64 * 0.03f; @@ -2065,7 +2066,7 @@ void func_beam_8003CF90(PlayerShot* shot) { Player* player; if ((shot->obj.pos.y < gGroundLevel) || (shot->unk_64 == 1)) { - if ((D_ctx_80161A88 == 2) && (shot->obj.pos.y < gGroundLevel)) { + if ((gGroundType == GROUNDTYPE_WATER) && (shot->obj.pos.y < gGroundLevel)) { shot->unk_48 = 10.0f; func_effect_8007D9DC(shot->obj.pos.x, gGroundLevel + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, shot->unk_48 * 3.0f, 0); @@ -2207,18 +2208,19 @@ void func_beam_8003D54C(PlayerShot* shot, s32 index) { gHitCount += shot->bonus; } if ((shot->bonus >= 7) && (gBossActive == 0) && (gLevelMode == LEVELMODE_ON_RAILS) && - ((gTeamShields[1] > 0) || (gTeamShields[2] > 0) || (gTeamShields[3] > 0))) { + ((gTeamShields[TEAM_ID_FALCO] > 0) || (gTeamShields[TEAM_ID_SLIPPY] > 0) || + (gTeamShields[TEAM_ID_PEPPY] > 0))) { do { teamId = RAND_INT(2.9f) + 1; } while (gTeamShields[teamId] <= 0); switch (teamId) { - case 1: + case TEAM_ID_FALCO: Radio_PlayMessage(gMsg_ID_7100, RCID_FALCO); break; - case 2: + case TEAM_ID_SLIPPY: Radio_PlayMessage(gMsg_ID_15252, RCID_SLIPPY); break; - case 3: + case TEAM_ID_PEPPY: Radio_PlayMessage(gMsg_ID_17160, RCID_PEPPY); break; } @@ -2276,7 +2278,7 @@ void func_beam_8003D854(PlayerShot* shot) { } } -void func_beam_8003D9B8(void) { +void PlayerShot_Update(void) { s32 i; for (i = 0; i < 16; i++) { @@ -2285,18 +2287,18 @@ void func_beam_8003D9B8(void) { } } -void func_beam_8003DA0C(void) { +void PlayerShot_Draw(void) { s32 i; for (i = 0; i < 16; i++) { gPlayerShots[i].index = i; if (gPlayerShots[i].obj.status != 0) { - if (!((D_display_80161410 < 0) && (gPlayerShots[i].obj.rot.x < -10.0f))) { + if (!((gReflectY < 0) && (gPlayerShots[i].obj.rot.x < -10.0f))) { Matrix_Push(&gGfxMatrix); func_beam_8003AF88(&gPlayerShots[i]); Matrix_Pop(&gGfxMatrix); } - if (D_display_80161410 > 0) { + if (gReflectY > 0) { func_edisplay_8005F290(gPlayerShots[i].sfxSource, &D_beam_8015F950); } } diff --git a/src/engine/fox_bg.c b/src/engine/fox_bg.c index 71952a96..03e7f34b 100644 --- a/src/engine/fox_bg.c +++ b/src/engine/fox_bg.c @@ -21,6 +21,9 @@ #include "assets/ast_area_6.h" #include "assets/ast_zoness.h" +#include "prevent_bss_reordering2.h" +#include "prevent_bss_reordering3.h" + f32 D_bg_8015F960; u8 D_bg_8015F964; f32 D_bg_8015F968; @@ -505,8 +508,7 @@ void func_bg_8003E1E8(void) { RCP_SetupDL_36(); sp138 = D_ctx_80178420; sp134 = D_ctx_80178424; - if (((gCurrentLevel == LEVEL_SECTOR_X) || (gCurrentLevel == LEVEL_METEO)) && - (D_ctx_8017827C == 1)) { + if (((gCurrentLevel == LEVEL_SECTOR_X) || (gCurrentLevel == LEVEL_METEO)) && (gLevelStage == 1)) { sp11C = LEVEL_WARP_ZONE; } if (sp11C == LEVEL_SECTOR_X) { @@ -604,7 +606,7 @@ void func_bg_8003E1E8(void) { break; case LEVEL_FORTUNA: sp128 = 1.5f; - if ((gCsFrameCount > 400) && (D_ctx_80177930 == 0)) { + if ((gCsFrameCount > 400) && (gNextPlanetPath == 0)) { sp128 = 0.75f; } Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, 1); @@ -676,23 +678,23 @@ void func_bg_80040450(void) { Gfx** var_s3; f32* var_s4; s32 i; - s32 temp = gLevelType; + s32 levelType = gLevelType; if ((gCurrentLevel == LEVEL_KATINA) || (gCurrentLevel == LEVEL_VENOM_2) || (gCurrentLevel == LEVEL_VENOM_ANDROSS) || (gCurrentLevel == LEVEL_SOLAR) || (gCurrentLevel == LEVEL_TRAINING) || gVersusMode) { return; } - D_ctx_80178380[gPlayerNum] -= D_bg_800C9E4C[temp]; - if (D_ctx_80178380[gPlayerNum] > 300) { - D_ctx_80178380[gPlayerNum] = 0; + gPlayerFillScreenAlphas[gPlayerNum] -= D_bg_800C9E4C[levelType]; + if (gPlayerFillScreenAlphas[gPlayerNum] > 300) { + gPlayerFillScreenAlphas[gPlayerNum] = 0; } if (((gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2)) || (((gPlayer[gPlayerNum].state_1C8 == PLAYERSTATE_1C8_5) || (gLevelMode == LEVELMODE_ALL_RANGE) || (gPlayer[gPlayerNum].state_1C8 == PLAYERSTATE_1C8_7)) && (gLevelType == LEVELTYPE_PLANET) && (gCurrentLevel != LEVEL_TITANIA) && (gCurrentLevel != LEVEL_AQUAS))) { - D_ctx_80178390[gPlayerNum] = 128; - D_ctx_801783A0[gPlayerNum] = 128; - D_ctx_801783B0[gPlayerNum] = 128; + gPlayerFillScreenReds[gPlayerNum] = 128; + gPlayerFillScreenGreens[gPlayerNum] = 128; + gPlayerFillScreenBlues[gPlayerNum] = 128; sp44 = Math_RadToDeg(gPlayer[gPlayerNum].unk_058); var_fa0 = Math_RadToDeg(gPlayer[gPlayerNum].unk_05C); if (var_fa0 > 180.0f) { @@ -704,18 +706,18 @@ void func_bg_80040450(void) { if (gCurrentLevel == LEVEL_KATINA) { D_ctx_801783D4 -= 80.0f; } - if ((gCurrentLevel == LEVEL_ZONESS) && (gPlayer[0].unk_1D0 >= 2) && (D_enmy_80161684 == 0)) { + if ((gCurrentLevel == LEVEL_ZONESS) && (gPlayer[0].unk_1D0 >= 2) && !gMissedZoSearchlight) { D_ctx_801783D4 -= 60.0f; D_ctx_801783D0 -= 480.0f; } if ((D_ctx_801783D0 < 120.0f) && (D_ctx_801783D0 > -120.0f) && (D_ctx_801783D4 < 120.0f)) { - D_ctx_80178380[gPlayerNum] += D_bg_800C9E4C[temp] * 2; - if (D_bg_800C9E54[temp] < D_ctx_80178380[gPlayerNum]) { - D_ctx_80178380[gPlayerNum] = D_bg_800C9E54[temp]; + gPlayerFillScreenAlphas[gPlayerNum] += D_bg_800C9E4C[levelType] * 2; + if (D_bg_800C9E54[levelType] < gPlayerFillScreenAlphas[gPlayerNum]) { + gPlayerFillScreenAlphas[gPlayerNum] = D_bg_800C9E54[levelType]; } } } - if (D_ctx_80178380[gPlayerNum] != 0) { + if (gPlayerFillScreenAlphas[gPlayerNum] != 0) { Matrix_Push(&gGfxMatrix); Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].unk_034 * M_DTOR, 1); Matrix_Translate(gGfxMatrix, D_ctx_801783D0, D_ctx_801783D4, -200.0f, 1); @@ -755,12 +757,12 @@ void func_bg_80040954(void) { f32 var_fv0; if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) || (gLevelType == LEVELTYPE_SPACE) || - (D_ctx_80178380[gPlayerNum] == 0)) { + (gPlayerFillScreenAlphas[gPlayerNum] == 0)) { return; } var_fs2 = 1.0f; - if (D_ctx_80178380[gPlayerNum] < 80) { - var_fs2 = D_ctx_80178380[gPlayerNum] / 80.0f; + if (gPlayerFillScreenAlphas[gPlayerNum] < 80) { + var_fs2 = gPlayerFillScreenAlphas[gPlayerNum] / 80.0f; } var_fs2 *= D_bg_800C9E5C[gLevelType]; Matrix_Push(&gGfxMatrix); @@ -887,16 +889,16 @@ void func_bg_80040CE4(void) { temp_fv0 = Math_ModF((10000.0f - gPlayer[gPlayerNum].unk_0AC) * 0.32f, 128.0f); gDPSetupTile(gMasterDisp++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32, temp_fv0, temp_s0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD); - switch (D_ctx_80161A88) { - case 0: + switch (gGroundType) { + case GROUNDTYPE_GRASS: gDPLoadTileTexture(gMasterDisp++, D_CO_601B6C0, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32); gBgColor = 0x845; // 8, 8, 32 break; - case 1: + case GROUNDTYPE_ROCK: gDPLoadTileTexture(gMasterDisp++, D_CO_6028260, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32); gBgColor = 0x845; // 8, 8, 32 break; - case 2: + case GROUNDTYPE_WATER: RCP_SetupDL_45(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 128); gDPLoadTileTexture(gMasterDisp++, D_CO_6028A60, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32); @@ -914,7 +916,7 @@ void func_bg_80040CE4(void) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_601B640); } else { - D_ctx_80161A88 = 0; + gGroundType = GROUNDTYPE_GRASS; gBgColor = 0x845; // 8, 8, 32 for (i = 0; i < 4; i++) { Matrix_Push(&gGfxMatrix); @@ -1100,7 +1102,7 @@ void func_bg_80040CE4(void) { Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -2000.0f, 1); Matrix_Scale(gGfxMatrix, 3.0f, 2.0f, 3.0f, 1); Matrix_SetGfxMtx(&gMasterDisp); - if (gGameFrameCount & 1) { + if ((gGameFrameCount % 2) != 0) { gSPDisplayList(gMasterDisp++, D_SO_60005B0); } else { gSPDisplayList(gMasterDisp++, D_SO_6002E60); @@ -1111,7 +1113,7 @@ void func_bg_80040CE4(void) { Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -1500.0f, 1); Matrix_Scale(gGfxMatrix, 3.0f, 2.0f, 3.0f, 1); Matrix_SetGfxMtx(&gMasterDisp); - if (gGameFrameCount & 1) { + if ((gGameFrameCount % 2) != 0) { gSPDisplayList(gMasterDisp++, D_ZO_6008830); } else { gSPDisplayList(gMasterDisp++, D_ZO_600B0E0); @@ -1137,7 +1139,7 @@ void func_bg_80042D38(void) { RCP_SetupDL_37(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 125); Matrix_SetGfxMtx(&gMasterDisp); - if (gGameFrameCount & 1) { + if ((gGameFrameCount % 2) != 0) { gSPDisplayList(gMasterDisp++, D_AQ_602C030); } else { gSPDisplayList(gMasterDisp++, D_AQ_602C088); diff --git a/src/engine/fox_boss.c b/src/engine/fox_boss.c index 419702df..9ba48bab 100644 --- a/src/engine/fox_boss.c +++ b/src/engine/fox_boss.c @@ -41,22 +41,22 @@ void func_boss_80042EC0(Boss* boss) { D_ctx_80177850 = 15; } -void Boss299_Init(Boss* boss) { +void Boss299_Init(Boss299* this) { } -void Boss299_Update(Boss* boss) { +void Boss299_Update(Boss299* this) { } -void Boss299_Draw(Boss* boss) { +void Boss299_Draw(Boss299* this) { } -void Boss300_Init(Boss* boss) { +void Boss300_Init(Boss300* this) { } -void Boss300_Update(Boss* boss) { +void Boss300_Update(Boss300* this) { } -void Boss300_Draw(Boss* boss) { +void Boss300_Draw(Boss300* this) { } void func_boss_80042FF4(Actor* actor, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7, f32 arg8, diff --git a/src/engine/fox_context.c b/src/engine/fox_context.c index e2a7a97a..939f3ff5 100644 --- a/src/engine/fox_context.c +++ b/src/engine/fox_context.c @@ -9,10 +9,10 @@ s32 gOverlayStage; s32 D_ctx_80177824; // some sort of flag s32 D_ctx_8017782C; // some sort of flag. all range related? GameState gGameState; -s32 D_Timer_8017783C; // next game state timer? -s32 D_ctx_80177844; // timer for vs item spawn +s32 gNextGameStateTimer; // next game state timer? +s32 D_ctx_80177844; // timer for vs item spawn OptionState gOptionMenuStatus; -s32 D_ctx_80177854; // pause-related state +s32 gPlayState; // pause-related state s32 D_ctx_80177868; // some sort of state. pause-related? LevelMode gLevelMode; DrawMode gDrawMode; @@ -20,9 +20,9 @@ s32 gPlayerNum; s32 gCamCount; s32 gTeamShields[6]; s32 gSavedTeamShields[6]; -s32 D_ctx_801778F0[6]; +s32 gPrevPlanetSavedTeamShields[6]; s32 gTeamDamage[6]; -u8 D_ctx_80177930; // next planet path +u8 gNextPlanetPath; // next planet path f32 gGroundLevel; f32 D_ctx_80177950; f32 D_ctx_80177968; @@ -50,8 +50,8 @@ s32 D_ctx_80177B50[7]; s32 D_ctx_80177B70[7]; PlanetId D_ctx_80177B90[7]; s32 D_ctx_80177BB0[7]; -s32 D_ctx_80177BD8[22]; // overruns D_ctx_80177C38? -s32 D_ctx_80177C38[6]; +s32 D_ctx_80177BD8[22]; // overruns gPrevPlanetTeamShields? +s32 gPrevPlanetTeamShields[6]; s32 D_ctx_80177C58[6]; u8 gSoundMode; s32 gVolumeSettings[3]; @@ -75,13 +75,13 @@ s32 gGameFrameCount; s32 D_ctx_80177DC8; s32 D_ctx_80177E70; s32 D_ctx_80177E78; -s32 D_ctx_80177E80; +s32 gRingPassCount; Vec3f D_ctx_80177E88; Vec3f D_ctx_80177F10; UNK_TYPE F_80178020; s32 D_ctx_8017812C; LevelId gCurrentLevel; -s32 D_ctx_8017827C; +s32 gLevelStage; s32 gBossActive; s32 D_ctx_8017828C; s32 D_ctx_80178294; @@ -102,19 +102,19 @@ UNK_TYPE F_801782F0; s32 D_ctx_801782F8; s32 D_ctx_80178300; u16* D_ctx_80178308; -ObjectInit* D_ctx_80178310; +ObjectInit* gLevelObjects; UNK_TYPE F_80178318; s32 gFogRed; s32 gFogGreen; s32 gFogBlue; s32 gFogAlpha; -s32 D_ctx_80178340; // alpha something -s32 D_ctx_80178348; // red something -s32 D_ctx_80178350; // green something -s32 D_ctx_80178354; // blue something -s32 D_ctx_80178358; // alpha target -s32 D_ctx_8017835C; // alpha step -s32 D_ctx_80178360; // 2 lights second color +s32 gFillScreenAlpha; // alpha something +s32 gFillScreenRed; // red something +s32 gFillScreenGreen; // green something +s32 gFillScreenBlue; // blue something +s32 gFillScreenAlphaTarget; // alpha target +s32 gFillScreenAlphaStep; // alpha step +s32 D_ctx_80178360; // 2 lights second color s32 D_ctx_80178364; s32 D_ctx_80178368; f32 D_ctx_8017836C; // 2 lights second color brightness @@ -122,10 +122,10 @@ f32 D_ctx_80178370; // Vec3f? f32 D_ctx_80178374; f32 D_ctx_80178378; s32 D_ctx_8017837C; -u32 D_ctx_80178380[4]; // player alphas -s32 D_ctx_80178390[4]; // player reds -s32 D_ctx_801783A0[4]; // player greens -s32 D_ctx_801783B0[4]; // player alphas +u32 gPlayerFillScreenAlphas[4]; // player alphas +s32 gPlayerFillScreenReds[4]; // player reds +s32 gPlayerFillScreenGreens[4]; // player greens +s32 gPlayerFillScreenBlues[4]; // player alphas UNK_TYPE D_ctx_801783C0[4]; f32 D_ctx_801783D0; // something x translate f32 D_ctx_801783D4; // something y translate @@ -232,8 +232,8 @@ s32 D_ctx_80161A78; s32 D_ctx_80161A7C; s32 D_ctx_80161A80; s32 D_ctx_80161A84; -s32 D_ctx_80161A88; -s32 D_ctx_80161A8C; +s32 gGroundType; +s32 gSavedGroundType; u8 gGoldRingCount[4]; u8 D_ctx_80161A94[4]; s32 gHitCount; @@ -247,7 +247,7 @@ UNK_TYPE F_80161AE0[4]; UNK_TYPE F_80161AF0[4]; UNK_TYPE P_800D31A4 = 0; Object_80 gObjects80[50]; -Object_4C gObjects4C[40]; +Sprite gSprites[40]; Actor gActors[60]; Boss gBosses[4]; Effect gEffects[100]; @@ -264,10 +264,10 @@ f32 D_ctx_80176EB8[2][100]; f32 D_ctx_801771D8[2][100]; f32 D_ctx_80177500[2][100]; UNK_TYPE P_800D31A8 = 0; -u16 D_ctx_80177828; // enemy shot speed? -u8 D_ctx_80177830; // show level complete status overlay -s32 D_ctx_80177838; // level clear related -s32 D_ctx_80177840; // timer for mission accomplished scrren +u16 gEnemyShotSpeed; // enemy shot speed? +u8 D_ctx_80177830; // show level complete status overlay +s32 gLevelStatusScreenTimer; // level clear related +s32 gLevelClearScreenTimer; // timer for mission accomplished scrren s32 gBossHealthBar; s32 D_ctx_80177850; // bonus text related. set to 15 but never read s32 D_ctx_80177858[4]; @@ -289,7 +289,7 @@ OSContPad* gInputPress; u8* D_ctx_80177984; s32 D_ctx_80177990[4]; f32 D_ctx_801779A8[4]; -u8 D_ctx_801779BC; +u8 gPauseEnabled; s32 gChargeTimers[4]; f32 D_ctx_801779E4; f32 D_ctx_801779F4; @@ -320,8 +320,8 @@ s32 D_ctx_80177CAC; s32 D_ctx_80177CB4; s32 D_ctx_80177CBC; s32 D_ctx_80177CC4; -s32 D_ctx_80177CD0[6]; -s32 D_ctx_80177CF0[6]; +s32 gStarWolfTeamAlive[6]; +s32 gSavedStarWolfTeamAlive[6]; s32 gRightWingHealth[4]; s32 gLeftWingHealth[4]; s32 D_ctx_80177D40[4]; @@ -333,8 +333,8 @@ s32 D_ctx_80177DB8[4]; s32 D_ctx_80177DD0[4][10]; s32 D_ctx_80177E74; s32 D_ctx_80177E7C; -s32 D_ctx_80177E84; -Vec3f D_ctx_80177E98[10]; +s32 gChangeTo360; +Vec3f gTeamArrowsViewPos[10]; f32 D_ctx_80177F20[65]; f32 D_ctx_80178028[65]; f32 D_ctx_80178130[65]; diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index a37f5747..2314c5c2 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -113,8 +113,8 @@ static Animation* D_demo_800CA1F4[] = { void func_demo_80048AC0(s32 teamId) { s32 teamShield; - if (teamId == 1) { - if (gTeamShields[1] < 64) { + if (teamId == TEAM_ID_FALCO) { + if (gTeamShields[TEAM_ID_FALCO] < 64) { Radio_PlayMessage(gMsg_ID_20303, RCID_FALCO); return; } @@ -134,28 +134,28 @@ void func_demo_80048AC0(s32 teamId) { if (teamShield > 160) { switch (teamId) { - case 2: + case TEAM_ID_SLIPPY: Radio_PlayMessage(gMsg_ID_20011, RCID_SLIPPY); break; - case 3: + case TEAM_ID_PEPPY: Radio_PlayMessage(gMsg_ID_20012, RCID_PEPPY); break; } } else if (teamShield > 64) { switch (teamId) { - case 2: + case TEAM_ID_SLIPPY: Radio_PlayMessage(gMsg_ID_20013, RCID_SLIPPY); break; - case 3: + case TEAM_ID_PEPPY: Radio_PlayMessage(gMsg_ID_20014, RCID_PEPPY); break; } } else { switch (teamId) { - case 2: + case TEAM_ID_SLIPPY: Radio_PlayMessage(gMsg_ID_20015, RCID_SLIPPY); break; - case 3: + case TEAM_ID_PEPPY: Radio_PlayMessage(gMsg_ID_20016, RCID_PEPPY); break; } @@ -179,7 +179,7 @@ void func_demo_80048CC4(Actor* actor, s32 arg1) { actor->unk_0B6 = 1; } else { actor->iwork[11] = 1; - AUDIO_PLAY_SFX(0x3100000CU, actor->sfxSource, 4U); + AUDIO_PLAY_SFX(0x3100000CU, actor->sfxSource, 4); } } @@ -230,19 +230,19 @@ void func_demo_80048E40(Player* player) { switch (gCsFrameCount) { case 101: - if (gTeamShields[1] > 0) { + if (gTeamShields[TEAM_ID_FALCO] > 0) { func_demo_80048CC4(&gActors[0], 0); } - if (gTeamShields[2] > 0) { + if (gTeamShields[TEAM_ID_SLIPPY] > 0) { func_demo_80048CC4(&gActors[1], 1); } - if (gTeamShields[3] > 0) { + if (gTeamShields[TEAM_ID_PEPPY] > 0) { func_demo_80048CC4(&gActors[2], 2); } break; case 100: - D_ctx_80177840 = 100; + gLevelClearScreenTimer = 100; break; case 200: @@ -284,10 +284,10 @@ void func_demo_80048E40(Player* player) { } if (gCsFrameCount > 540) { - D_ctx_80178358 = 255; - D_ctx_80178348 = (D_ctx_80178350 = (D_ctx_80178354 = 0)); - D_ctx_8017835C = 8; - if (D_ctx_80178340 == 255) { + gFillScreenAlphaTarget = 255; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; + gFillScreenAlphaStep = 8; + if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_6; player->timer_1F8 = 0; D_ctx_8017837C = 4; @@ -296,7 +296,7 @@ void func_demo_80048E40(Player* player) { } else { D_play_800D3180[LEVEL_SECTOR_X] = Play_CheckMedalStatus(150) + 1; } - D_ctx_80177930 = 2; + gNextPlanetPath = 2; } } } else { @@ -451,7 +451,7 @@ void func_demo_80049C0C(Player* player) { player->pos.x += player->vel.x; player->flags_228 = 0; - player->unk_238 = 0; + player->cockpitView = 0; player->pos.y += player->vel.y; player->pos.z += player->vel.z; @@ -486,13 +486,13 @@ void func_demo_80049C0C(Player* player) { player->vel.z = -500.0f; player->unk_0CC = -500.0f; - if (gTeamShields[1] > 0) { + if (gTeamShields[TEAM_ID_FALCO] > 0) { func_demo_80049968(&gActors[0], 0); } - if (gTeamShields[2] > 0) { + if (gTeamShields[TEAM_ID_SLIPPY] > 0) { func_demo_80049968(&gActors[1], 1); } - if (gTeamShields[3] > 0) { + if (gTeamShields[TEAM_ID_PEPPY] > 0) { func_demo_80049968(&gActors[2], 2); } @@ -538,17 +538,17 @@ void func_demo_80049C0C(Player* player) { var_v0 = 1; player->unk_190 = 2.0f; - if ((player->timer_1F8 == 95) && (gTeamShields[1] > 0)) { + if ((player->timer_1F8 == 95) && (gTeamShields[TEAM_ID_FALCO] > 0)) { gActors[0].state = var_v0; AUDIO_PLAY_SFX(0x0940802AU, gActors[0].sfxSource, 0); } - if ((player->timer_1F8 == 90) && (gTeamShields[3] > 0)) { + if ((player->timer_1F8 == 90) && (gTeamShields[TEAM_ID_PEPPY] > 0)) { gActors[2].state = var_v0; AUDIO_PLAY_SFX(0x0940802AU, gActors[2].sfxSource, 0); } - if ((player->timer_1F8 == 85) && (gTeamShields[2] > 0)) { + if ((player->timer_1F8 == 85) && (gTeamShields[TEAM_ID_SLIPPY] > 0)) { gActors[1].state = var_v0; AUDIO_PLAY_SFX(0x0940802AU, gActors[1].sfxSource, 0); } @@ -570,10 +570,10 @@ void func_demo_80049C0C(Player* player) { Math_SmoothStepToF(&D_ctx_801779A8[player->num], 100.0f, 1.0f, 3.0f, 0.0f); player->unk_034 -= 0.5f; if (player->timer_1F8 == 0) { - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255; - D_ctx_80178358 = 255; - D_ctx_8017835C = 8; - if (D_ctx_80178340 == 255) { + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; + gFillScreenAlphaTarget = 255; + gFillScreenAlphaStep = 8; + if (gFillScreenAlpha == 255) { func_play_800A6148(); player->unk_1D0 = 5; player->timer_1F8 = 10; @@ -586,7 +586,7 @@ void func_demo_80049C0C(Player* player) { player->timer_27C = gSavedHitCount = D_ctx_80177DC8 = D_ctx_80177CA0 = 0; player->unk_234 = 1; - D_ctx_8017827C = 1; + gLevelStage = 1; D_display_800CA230 = 0.15f; AUDIO_PLAY_SFX(0x11407079U, gDefaultSfxSource, 0); func_play_800AB334(); @@ -597,9 +597,9 @@ void func_demo_80049C0C(Player* player) { case 5: Math_SmoothStepToF(&D_ctx_801779A8[player->num], 100.0f, 1.0f, 3.0f, 0.0f); if (player->timer_1F8 == 0) { - D_ctx_80178358 = 0; - D_ctx_8017835C = 8; - if (D_ctx_80178340 == 0) { + gFillScreenAlphaTarget = 0; + gFillScreenAlphaStep = 8; + if (gFillScreenAlpha == 0) { player->unk_1D0 = 6; player->timer_1F8 = 50; } @@ -785,7 +785,7 @@ void func_demo_8004A888(Effect* effect) { void func_demo_8004AA84(void) { s32 i; - if (!(gGameFrameCount & 7) && (gLevelType == LEVELTYPE_PLANET)) { + if (((gGameFrameCount % 8) == 0) && (gLevelType == LEVELTYPE_PLANET)) { for (i = 0; i < ARRAY_COUNT(gEffects); i++) { if (gEffects[i].obj.status == OBJ_FREE) { func_demo_8004A888(&gEffects[i]); @@ -810,7 +810,7 @@ void func_demo_8004AAF4(Player* player) { gCsFrameCount += 1; Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 20.0f, 0.0f); if (gCsFrameCount == 37) { - D_ctx_80177E84 = 1; + gChangeTo360 = true; if (gCurrentLevel == LEVEL_VENOM_ANDROSS) { Radio_PlayMessage(gMsg_ID_19466, RCID_FOX); AUDIO_PLAY_BGM(SEQ_ID_AND_BRAIN | SEQ_FLAG); @@ -1099,7 +1099,7 @@ void func_demo_8004B368(Player* player) { } if ((180.0f - fabsf(player->unk_0EC)) <= 3.0f) { - D_ctx_80161A88 = 1; + gGroundType = GROUNDTYPE_ROCK; } if (player->timer_1F8 == 0) { @@ -1156,20 +1156,20 @@ void func_demo_8004B368(Player* player) { player->vel.y = 5.0f; - if ((player->timer_1F8 == 50) && (gTeamShields[1] > 0)) { + if ((player->timer_1F8 == 50) && (gTeamShields[TEAM_ID_FALCO] > 0)) { func_demo_8004A840(0); } - if ((player->timer_1F8 == 70) && (gTeamShields[2] > 0)) { + if ((player->timer_1F8 == 70) && (gTeamShields[TEAM_ID_SLIPPY] > 0)) { func_demo_8004A840(1); } if (player->timer_1F8 == 90) { func_play_800A6148(); - if (gTeamShields[3] > 0) { + if (gTeamShields[TEAM_ID_PEPPY] > 0) { func_demo_8004A840(2); } - D_ctx_80161A88 = 0; + gGroundType = GROUNDTYPE_GRASS; } Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, 0); @@ -1211,7 +1211,7 @@ void func_demo_8004B368(Player* player) { switch (gCsFrameCount) { case 330: - D_ctx_80177840 = 100; + gLevelClearScreenTimer = 100; break; case 410: @@ -1219,7 +1219,7 @@ void func_demo_8004B368(Player* player) { break; case 550: - if ((gTeamShields[2] == (-1)) || (gTeamShields[2] == 0)) { + if ((gTeamShields[TEAM_ID_SLIPPY] == (-1)) || (gTeamShields[TEAM_ID_SLIPPY] == 0)) { Radio_PlayMessage(gMsg_ID_20333, RCID_ROB64); } else { Radio_PlayMessage(gMsg_ID_2300, RCID_SLIPPY); @@ -1227,7 +1227,7 @@ void func_demo_8004B368(Player* player) { break; case 682: - if ((gTeamShields[3] == -1) || (gTeamShields[3] == 0)) { + if ((gTeamShields[TEAM_ID_PEPPY] == -1) || (gTeamShields[TEAM_ID_PEPPY] == 0)) { Radio_PlayMessage(gMsg_ID_20332, RCID_ROB64); } else { Radio_PlayMessage(gMsg_ID_2310, RCID_PEPPY); @@ -1235,7 +1235,7 @@ void func_demo_8004B368(Player* player) { break; case 816: - if ((gTeamShields[1] == -1) || (gTeamShields[1] == 0)) { + if ((gTeamShields[TEAM_ID_FALCO] == -1) || (gTeamShields[TEAM_ID_FALCO] == 0)) { Radio_PlayMessage(gMsg_ID_20331, RCID_ROB64); } else { Radio_PlayMessage(gMsg_ID_2320, RCID_FALCO); @@ -1359,10 +1359,10 @@ void func_demo_8004C930(Player* player) { switch (player->form) { case FORM_ARWING: - if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) || ((gCurrentLevel == LEVEL_VENOM_2) && (D_ctx_8017827C == 1))) { + if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) || ((gCurrentLevel == LEVEL_VENOM_2) && (gLevelStage == 1))) { Andross_80193C4C(player); } else if (gCurrentLevel == LEVEL_SECTOR_X) { - if (D_ctx_8017827C == 0) { + if (gLevelStage == 0) { SectorX_80194728(player); } else { func_demo_80048E40(player); @@ -1393,7 +1393,7 @@ void func_demo_8004C930(Player* player) { Venom2_80196D88(player); func_play_800AA800(player); } else if (gCurrentLevel == LEVEL_METEO) { - if (D_ctx_8017827C == 0) { + if (gLevelStage == 0) { Meteo_8018E084(player); } else { func_demo_80048E40(player); @@ -1422,7 +1422,7 @@ void func_demo_8004C930(Player* player) { if (gCurrentLevel == LEVEL_TITANIA) { Titania_801882CC(player); - } else if (D_ctx_80177930 != 0) { + } else if (gNextPlanetPath != 0) { Macbeth_801AF8F4(player); } else { Macbeth_801B3D04(player); @@ -1627,7 +1627,8 @@ void func_demo_8004D440(Player* player) { Radio_PlayMessage(gMsg_ID_20318, RCID_FOX); } else { if ((gCurrentLevel != LEVEL_TRAINING) && - ((gTeamShields[1] > 0) || (gTeamShields[2] > 0) || (gTeamShields[3] > 0))) { + ((gTeamShields[TEAM_ID_FALCO] > 0) || (gTeamShields[TEAM_ID_SLIPPY] > 0) || + (gTeamShields[TEAM_ID_PEPPY] > 0))) { do { teamId = RAND_INT(2.9f) + 1; } while (gTeamShields[teamId] <= 0); @@ -1711,11 +1712,11 @@ void func_demo_8004D828(Player* player) { } if (gCamCount == 1) { - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { func_effect_8007D24C(RAND_FLOAT_CENTERED(20.0) + player->pos.x, RAND_FLOAT_CENTERED(20.0) + player->pos.y, player->unk_138, 2.2f); } - } else if (!(gGameFrameCount & 3)) { + } else if (((gGameFrameCount % 4) == 0)) { func_effect_8007D10C(RAND_FLOAT_CENTERED(10.0f) + player->pos.x, RAND_FLOAT_CENTERED(10.0f) + player->pos.y, RAND_FLOAT_CENTERED(10.0f) + player->unk_138, 2.2f); } @@ -1827,7 +1828,7 @@ void func_demo_8004DEF8(Player* player) { player->unk_0E4 += 26.0f; } - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { func_effect_8007D24C(RAND_FLOAT_CENTERED(20.0) + player->pos.x, RAND_FLOAT_CENTERED(20.0) + player->pos.y, player->unk_138, 2.2f); } @@ -1882,7 +1883,7 @@ void func_demo_8004DEF8(Player* player) { player->unk_034 += 10.0f; } - if ((D_ctx_80161A88 == 2) && (player->pos.y <= player->unk_0A4)) { + if ((gGroundType == GROUNDTYPE_WATER) && (player->pos.y <= player->unk_0A4)) { func_effect_8007D9DC(player->pos.x, gGroundLevel + 2.0f, player->unk_138, 3.0f, 20.0f, 0); func_effect_8007ADF4(player->pos.x, gGroundLevel, player->unk_138, 0.1f, 2.0f); } @@ -1892,7 +1893,7 @@ void func_demo_8004E3D8(Player* player) { player->flags_228 = 0; player->unk_280 = 0; - if (gGameFrameCount & 1) { + if ((gGameFrameCount % 2) != 0) { D_80137E84[gPlayerNum] = 1; } @@ -2385,7 +2386,7 @@ void func_demo_8004F8AC(Actor* actor) { break; case LEVEL_METEO: - if (D_ctx_8017827C == 0) { + if (gLevelStage == 0) { Meteo_8018ED9C(actor); break; } @@ -2407,11 +2408,11 @@ void func_demo_8004F8AC(Actor* actor) { case 1: Math_SmoothStepToF(&actor->scale, 0.5f, 0.03f, 0.01f, 0.0f); - D_ctx_80178348 = D_ctx_80178340 = D_ctx_80178350 = D_ctx_80178354 = 0; + gFillScreenRed = gFillScreenAlpha = gFillScreenGreen = gFillScreenBlue = 0; if ((actor->timer_0BC == 43) || (actor->timer_0BC == 46) || (actor->timer_0BC == 49)) { - D_ctx_80178340 = 192; - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255; + gFillScreenAlpha = 192; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; } actor->iwork[0] -= 2; @@ -2442,7 +2443,7 @@ void func_demo_8004F8AC(Actor* actor) { break; case LEVEL_SECTOR_X: - if (D_ctx_8017827C != 0) { + if (gLevelStage != 0) { func_demo_80049630(actor); break; } @@ -2589,7 +2590,7 @@ void func_demo_8004FEC0(Actor* actor) { break; case 25: - if (actor->index & 1) { + if ((actor->index % 2) != 0) { gSPDisplayList(gMasterDisp++, D_SZ_6001DA0); } else { gSPDisplayList(gMasterDisp++, D_SZ_6001360); @@ -2625,7 +2626,7 @@ void func_demo_8004FEC0(Actor* actor) { Matrix_RotateZ(gGfxMatrix, (2.0f * gGameFrameCount) * M_DTOR, 1); Matrix_RotateX(gGfxMatrix, 2.0f * RAND_FLOAT_SEEDED(M_PI), 1); - switch (sp2D0 & 3) { + switch ((s32) (sp2D0 % 4U)) { case 0: Matrix_Scale(gGfxMatrix, 1.0f, 0.3f, 1.0f, 1); break; @@ -2674,7 +2675,7 @@ void func_demo_8004FEC0(Actor* actor) { RCP_SetupDL(&gMasterDisp, 0x40); - switch ((gGameFrameCount >> 3) & 3) { + switch ((gGameFrameCount >> 3) % 4U) { case 0: sp2DC = 255.0f; sp2D8 = 0.0f; @@ -2909,7 +2910,7 @@ void func_demo_800515C4(void) { if (gGameState == GSTATE_TITLE) { var_fp = D_TITLE_60320E0; - } else if (gGameState == GSTATE_CREDITS) { + } else if (gGameState == GSTATE_ENDING) { var_fp = D_END_7010970; } else { var_fp = D_1024AC0; @@ -2933,13 +2934,13 @@ void func_demo_800515C4(void) { if ((i != 1) || gGreatFoxIntact) { sp9C[i] = 0.0f; if (i < 2) { - if (!(gGameFrameCount & 0x38)) { - sp9C[i] = D_demo_800CA170[gGameFrameCount & 7]; + if ((gGameFrameCount & ((64 - 1) & ~(8 - 1))) == 0) { + sp9C[i] = D_demo_800CA170[gGameFrameCount % 8U]; } gDPSetEnvColor(gMasterDisp++, 255, 32, 32, 128); } else { - if (!((gGameFrameCount + 32) & 0x38)) { - sp9C[i] = D_demo_800CA170[gGameFrameCount & 7]; + if (((gGameFrameCount + 32) & 0x38) == 0) { + sp9C[i] = D_demo_800CA170[gGameFrameCount % 8U]; } gDPSetEnvColor(gMasterDisp++, 32, 32, 255, 128); } @@ -2955,7 +2956,7 @@ void func_demo_800515C4(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 48); gDPSetEnvColor(gMasterDisp++, 255, 255, 0, 48); for (i = 0, var_s6_2 = D_demo_800CA0EC; i < 3; i++, var_s6_2++) { - sp9C[i] = D_demo_800CA190[gGameFrameCount & 1]; + sp9C[i] = D_demo_800CA190[gGameFrameCount % 2U]; Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, var_s6_2->x, var_s6_2->y, var_s6_2->z, 1); Matrix_Scale(gGfxMatrix, sp9C[i], sp9C[i], 1.0f, 1); diff --git a/src/engine/fox_display.c b/src/engine/fox_display.c index 2cc32156..81981513 100644 --- a/src/engine/fox_display.c +++ b/src/engine/fox_display.c @@ -7,7 +7,7 @@ Vec3f D_display_801613B0[4]; Vec3f D_display_801613E0[4]; -s16 D_display_80161410; +s16 gReflectY; Matrix D_display_80161418[4]; Vec3f D_display_80161518[4]; Vec3f D_display_80161548[4]; @@ -32,7 +32,7 @@ void func_display_80051B30(void) { Vec3f sp68; Vec3f sp5C; - if ((D_ctx_80177854 == 100) || (D_display_800CA234 == NULL)) { + if ((gPlayState == PLAY_PAUSE) || (D_display_800CA234 == NULL)) { return; } if ((D_display_800CA234->obj.status != OBJ_ACTIVE) || (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_3)) { @@ -290,7 +290,7 @@ void func_display_80052884(Player* player) { if (gPlayerNum == player->num) { sp64 = 0.0f; if (gChargeTimers[player->num] >= 20) { - sp64 = (f32) (gGameFrameCount & 7) * 80.0f; + sp64 = (s32) (gGameFrameCount % 8U) * 80.0f; } sp58.x = 0.0f; sp58.y = 0.0f; @@ -363,7 +363,7 @@ void func_display_80052D48(Player* player) { if (!gVersusMode) { sp2C *= 1.1f; } - if (gGameFrameCount & 1) { + if ((gGameFrameCount % 2) != 0) { sp2C *= 1.1f; } Matrix_Push(&gGfxMatrix); @@ -386,7 +386,7 @@ void func_display_80052D48(Player* player) { if (!gVersusMode) { sp2C *= 1.1f; } - if (gGameFrameCount & 1) { + if ((gGameFrameCount % 2) != 0) { sp2C *= 1.1f; } Matrix_Push(&gGfxMatrix); @@ -408,7 +408,7 @@ void func_display_80052D48(Player* player) { } void func_display_8005314C(void) { - if (D_display_80161410 != 0) { + if (gReflectY != 0) { gSPSetGeometryMode(gMasterDisp++, G_CULL_FRONT); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); } @@ -429,7 +429,7 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, if (wings->rightState == WINGSTATE_BROKEN) { *gfxPtr = D_arwing_3015120; } - if ((D_display_800CA22C != 0) && (D_ctx_80177D40[0] & 1)) { + if ((D_display_800CA22C != 0) && ((D_ctx_80177D40[0] % 2) != 0)) { RCP_SetupDL(&gMasterDisp, 0x22); func_display_8005314C(); if (D_ctx_80177D40[0] > 1000) { @@ -444,7 +444,7 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, if (wings->rightState != 2) { *gfxPtr = NULL; } - if ((D_display_800CA22C != 0) && (D_ctx_80177D40[0] & 1)) { + if ((D_display_800CA22C != 0) && ((D_ctx_80177D40[0] % 2) != 0)) { RCP_SetupDL(&gMasterDisp, 0x22); func_display_8005314C(); if (D_ctx_80177D40[0] > 1000) { @@ -461,7 +461,7 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, if (wings->leftState == WINGSTATE_BROKEN) { *gfxPtr = D_arwing_3014BF0; } - if ((D_display_800CA22C != 0) && (D_ctx_80177D58[0] & 1)) { + if ((D_display_800CA22C != 0) && ((D_ctx_80177D58[0] % 2) != 0)) { RCP_SetupDL(&gMasterDisp, 0x22); func_display_8005314C(); if (D_ctx_80177D58[0] > 1000) { @@ -476,7 +476,7 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, if (wings->leftState != 2) { *gfxPtr = NULL; } - if ((D_display_800CA22C != 0) && (D_ctx_80177D58[0] & 1)) { + if ((D_display_800CA22C != 0) && ((D_ctx_80177D58[0] % 2) != 0)) { RCP_SetupDL(&gMasterDisp, 0x22); func_display_8005314C(); if (D_ctx_80177D58[0] > 1000) { @@ -549,7 +549,7 @@ void func_display_80053658(WingInfo* wings) { Matrix_RotateY(gGfxMatrix, wings->unk_34 * M_DTOR, 1); Matrix_RotateX(gGfxMatrix, wings->unk_30 * M_DTOR, 1); Matrix_Scale(gGfxMatrix, 1.0f / 70.925f, 1.0f / 70.925f, 1.0f / 70.925f, 1); - if (gGameState == GSTATE_CREDITS) { + if (gGameState == GSTATE_ENDING) { Matrix_Scale(gGfxMatrix, 0.95f, 0.95f, 0.95f, 1); } Matrix_SetGfxMtx(&gMasterDisp); @@ -606,7 +606,7 @@ void func_display_80053C38(Player* player, s32 arg1) { if ((gPlayerNum == player->num) && (arg1 == 0)) { sp48 = 0.0f; if (gChargeTimers[player->num] >= 20) { - sp48 = (f32) (gGameFrameCount & 7) * 80.0f; + sp48 = (s32) (gGameFrameCount % 8U) * 80.0f; } sp4C.x = 0.0f; sp4C.y = 0.0f; @@ -615,7 +615,7 @@ void func_display_80053C38(Player* player, s32 arg1) { sp4C.z = 2400.0f + sp48; Matrix_MultVec3f(gGfxMatrix, &sp4C, &D_display_801613E0[1]); } - if ((player->unk_238 != 0) && (gLevelMode == LEVELMODE_ON_RAILS) && + if ((player->cockpitView != 0) && (gLevelMode == LEVELMODE_ON_RAILS) && (fabsf(player->unk_138 + D_ctx_80177D20 - player->camEye.z) < 10.0f)) { if (arg1 == 0) { D_display_800CA228 = 1; @@ -645,7 +645,7 @@ void func_display_80053C38(Player* player, s32 arg1) { player->wings.unk_10 = 0.0f; } D_display_800CA22C = 1; - D_display_80161410 = arg1; + gReflectY = arg1; func_display_80053658(&player->wings); } } @@ -711,7 +711,7 @@ void func_display_80054300(Player* player) { if (player->unk_068 > 30.0f) { gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); } - if ((D_ctx_80161A88 == 2) && (player->unk_068 < 10.0f)) { + if ((gGroundType == GROUNDTYPE_WATER) && (player->unk_068 < 10.0f)) { player->unk_23C = 90; } else { player->unk_23C = 180; @@ -789,7 +789,7 @@ void func_display_8005478C(Player* player) { } else { Matrix_Scale(gGfxMatrix, player->unk_194, player->unk_194, 1.0f, 1); } - if (gGameFrameCount & 1) { + if ((gGameFrameCount % 2) != 0) { Matrix_Scale(gGfxMatrix, 0.9f, 0.63f, 1.0f, 1); } else { Matrix_Scale(gGfxMatrix, 0.80999994f, 0.567f, 1.0f, 1); @@ -871,7 +871,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->unk_238 != 0) && (gLevelMode == LEVELMODE_ON_RAILS)) { + if ((player->cockpitView != 0) && (gLevelMode == LEVELMODE_ON_RAILS)) { Matrix_MultVec3f(gCalcMatrix, &spB8, &sp94); } else { Matrix_MultVec3f(gCalcMatrix, &spC4, &sp94); @@ -881,7 +881,7 @@ void func_display_80054E80(Player* player) { Matrix_Translate(gGfxMatrix, sp94.x, sp94.y, sp94.z, 0); Matrix_Scale(gGfxMatrix, sp80, sp80, 1.0f, 1); Matrix_Push(&gGfxMatrix); - if ((player->unk_238 != 0) && (gLevelMode == LEVELMODE_ON_RAILS)) { + if ((player->cockpitView != 0) && (gLevelMode == LEVELMODE_ON_RAILS)) { Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 3.0f, 1); } else { Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 10.0f, 1); @@ -913,11 +913,11 @@ void func_display_80054E80(Player* player) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_101C2E0); Matrix_Pop(&gGfxMatrix); - if ((player->unk_238 != 0) && (gLevelMode == LEVELMODE_ON_RAILS)) { + if ((player->cockpitView != 0) && (gLevelMode == LEVELMODE_ON_RAILS)) { Matrix_Scale(gGfxMatrix, 0.3f, 0.3f, 0.3f, 1); } Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 1.0f, 1); - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.0f, 1); } else { Matrix_Scale(gGfxMatrix, 1.3f, 1.3f, 1.0f, 1); @@ -938,7 +938,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->unk_238 != 0) && (gLevelMode == LEVELMODE_ON_RAILS)) { + if ((player->cockpitView != 0) && (gLevelMode == LEVELMODE_ON_RAILS)) { Matrix_MultVec3f(gCalcMatrix, &spB8, &sp94); } else { Matrix_MultVec3f(gCalcMatrix, &spC4, &sp94); @@ -982,7 +982,7 @@ void func_display_80054E80(Player* player) { void func_display_80055788(Player* player) { f32 sp54; - if (gChargeTimers[player->num] >= 11) { + if (gChargeTimers[player->num] > 10) { RCP_SetupDL(&gMasterDisp, 0x43); Matrix_Push(&gGfxMatrix); sp54 = gChargeTimers[player->num] / 20.0f; @@ -1019,7 +1019,7 @@ void func_display_80055788(Player* player) { gSPDisplayList(gMasterDisp++, D_101C2E0); Matrix_Pop(&gGfxMatrix); Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 1.0f, 1); - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.0f, 1); } else { Matrix_Scale(gGfxMatrix, 1.3f, 1.3f, 1.0f, 1); @@ -1098,7 +1098,7 @@ void func_display_80055E98(Player* player) { } if (player->unk_25C != 0.0f) { sp54 = 0.0f; - if (gGameFrameCount & 1) { + if ((gGameFrameCount % 2) != 0) { sp54 = 180.0f; } var_fs0 = player->unk_0E8; @@ -1316,8 +1316,8 @@ void func_display_80056E2C(Player* player) { f32 sp2C; if ((player->unk_234 != 0) && (player->unk_240 == 0)) { - sp34 = D_display_800CA334[gGameFrameCount & 7]; - sp30 = D_display_800CA334[(gGameFrameCount + 4) & 7]; + sp34 = D_display_800CA334[gGameFrameCount % 8U]; + sp30 = D_display_800CA334[(gGameFrameCount + 4) % 8U]; if (player->unk_1D4 != 0) { sp34 = sp30 = 0.0f; } @@ -1363,16 +1363,17 @@ void func_display_80057248(void) { if (!(gGameFrameCount & 4)) { RCP_SetupDL_40(); - for (i = 0; i < ARRAY_COUNT(D_ctx_80177E98); i++) { - if (D_ctx_80177E98[i].z < 0.0f) { - var_fs0 = (VEC3F_MAG(&D_ctx_80177E98[i])) * 0.0015f; + for (i = 0; i < ARRAY_COUNT(gTeamArrowsViewPos); i++) { + if (gTeamArrowsViewPos[i].z < 0.0f) { + var_fs0 = (VEC3F_MAG(&gTeamArrowsViewPos[i])) * 0.0015f; if (var_fs0 > 100.0f) { var_fs0 = 100.0f; } else if (var_fs0 < 1.0f) { var_fs0 = 1.0f; } Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_ctx_80177E98[i].x, D_ctx_80177E98[i].y, D_ctx_80177E98[i].z, 1); + Matrix_Translate(gGfxMatrix, gTeamArrowsViewPos[i].x, gTeamArrowsViewPos[i].y, gTeamArrowsViewPos[i].z, + 1); Matrix_Scale(gGfxMatrix, var_fs0 * 0.25f, var_fs0 * 0.25f, 1.0f, 1); if ((i == 0) && (gCurrentLevel == LEVEL_SECTOR_Z)) { Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 1.0f, 1); @@ -1387,8 +1388,8 @@ void func_display_80057248(void) { } Matrix_Pop(&gGfxMatrix); } - D_ctx_80177E98[i].x = D_ctx_80177E98[i].y = 0; - D_ctx_80177E98[i].z = 100.0f; + gTeamArrowsViewPos[i].x = gTeamArrowsViewPos[i].y = 0; + gTeamArrowsViewPos[i].z = 100.0f; } gDPSetTextureFilter(gMasterDisp++, G_TF_BILERP); } @@ -1413,7 +1414,7 @@ void func_display_80057504(void) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, D_display_80161578[i].x, D_display_80161578[i].y, D_display_80161578[i].z, 1); - if ((D_ctx_80177854 != 100) && (i == gPlayerNum)) { + if ((gPlayState != PLAY_PAUSE) && (i == gPlayerNum)) { Math_SmoothStepToF(&D_display_801615A8[i], 0.0f, 0.5f, 20.0f, 0); Math_SmoothStepToF(&D_display_801615B8[i], 1.0, 0.5f, 0.2f, 0); } @@ -1510,11 +1511,11 @@ void func_display_800578C4(Player* player) { } } -void func_display_80057D00(void) { +void Play_Draw(void) { s32 i; - Vec3f sp78; - Vec3f sp6C; - Vec3f sp60; + Vec3f tempVec; + Vec3f playerCamUp; + Vec3f opponentPos; s32 pad; Player* opponent; Player* player = &gPlayer[gPlayerNum]; @@ -1542,23 +1543,23 @@ void func_display_80057D00(void) { Matrix_RotateY(gCalcMatrix, player->unk_114 * M_DTOR, 0); Matrix_RotateX(gCalcMatrix, player->unk_120 * M_DTOR, 1); - sp78.x = player->camEye.x - player->pos.x; - sp78.y = player->camEye.y - player->pos.y; - sp78.z = player->camEye.z - (player->unk_138 + player->unk_144); - Matrix_MultVec3f(gCalcMatrix, &sp78, &gPlayerCamEye); + tempVec.x = player->camEye.x - player->pos.x; + tempVec.y = player->camEye.y - player->pos.y; + tempVec.z = player->camEye.z - (player->unk_138 + player->unk_144); + Matrix_MultVec3f(gCalcMatrix, &tempVec, &gPlayerCamEye); gPlayerCamEye.x += player->pos.x; gPlayerCamEye.y += player->pos.y; gPlayerCamEye.z += player->unk_138 + player->unk_144; - sp78.x = player->camAt.x - player->pos.x; - sp78.y = player->camAt.y - player->pos.y; - sp78.z = player->camAt.z - (player->unk_138 + player->unk_144); - Matrix_MultVec3f(gCalcMatrix, &sp78, &gPlayerCamAt); + tempVec.x = player->camAt.x - player->pos.x; + tempVec.y = player->camAt.y - player->pos.y; + tempVec.z = player->camAt.z - (player->unk_138 + player->unk_144); + Matrix_MultVec3f(gCalcMatrix, &tempVec, &gPlayerCamAt); gPlayerCamAt.x += player->pos.x; gPlayerCamAt.y += player->pos.y; gPlayerCamAt.z += player->unk_138 + player->unk_144; - if ((player->unk_238 != 0) && (player->unk_110 > 5.0f)) { + if ((player->cockpitView != 0) && (player->unk_110 > 5.0f)) { gPlayerCamAt.x += SIN_DEG(gGameFrameCount * 150.0f) * player->unk_110 * 0.2f; } } else if (player->state_1C8 == PLAYERSTATE_1C8_7) { @@ -1577,10 +1578,10 @@ void func_display_80057D00(void) { Matrix_RotateY(gCalcMatrix, -player->unk_058, 0); Matrix_RotateX(gCalcMatrix, player->unk_05C, 1); Matrix_RotateZ(gCalcMatrix, -player->unk_034 * M_DTOR, 1); - sp78.x = 0.0f; - sp78.y = 100.0f; - sp78.z = 0.0f; - Matrix_MultVec3f(gCalcMatrix, &sp78, &sp6C); + tempVec.x = 0.0f; + tempVec.y = 100.0f; + tempVec.z = 0.0f; + Matrix_MultVec3f(gCalcMatrix, &tempVec, &playerCamUp); if (D_ctx_80178410 != 0) { D_ctx_80178428 = DEG_TO_RAD(gPlayer[0].unk_034); func_play_800B6F50(gPlayerCamEye.x, gPlayerCamEye.y, gPlayerCamEye.z, gPlayerCamAt.x, gPlayerCamAt.y, @@ -1591,7 +1592,7 @@ void func_display_80057D00(void) { func_bg_80040450(); Matrix_Push(&gGfxMatrix); Matrix_LookAt(gGfxMatrix, gPlayerCamEye.x, gPlayerCamEye.y, gPlayerCamEye.z, gPlayerCamAt.x, gPlayerCamAt.y, - gPlayerCamAt.z, sp6C.x, sp6C.y, sp6C.z, 1); + gPlayerCamAt.z, playerCamUp.x, playerCamUp.y, playerCamUp.z, 1); if ((gLevelType == LEVELTYPE_PLANET) || (gCurrentLevel == LEVEL_BOLSE)) { if ((gCurrentLevel == LEVEL_TITANIA) && ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2) || (gPlayer[0].unk_19C != 0))) { @@ -1601,7 +1602,7 @@ void func_display_80057D00(void) { Ground_801B58AC(&gMasterDisp, D_ctx_80177CC8); D_ctx_80177CC8 = 0.0f; Matrix_Pop(&gGfxMatrix); - } else if (D_ctx_80161A88 != 2) { + } else if (gGroundType != GROUNDTYPE_WATER) { D_bg_8015F964 = 0; func_bg_80040CE4(); } @@ -1609,22 +1610,22 @@ void func_display_80057D00(void) { Lights_SetOneLight(&gMasterDisp, gLight2x, gLight2y, gLight2z, gLight2R, gLight2G, gLight2B, gAmbientR, gAmbientG, gAmbientB); for (i = 0, opponent = gPlayer; i < gCamCount; i++, opponent++) { - sp60.x = opponent->pos.x; - sp60.y = opponent->pos.y; - sp60.z = opponent->unk_138; - func_edisplay_8005F670(&sp60); + opponentPos.x = opponent->pos.x; + opponentPos.y = opponent->pos.y; + opponentPos.z = opponent->unk_138; + func_edisplay_8005F670(&opponentPos); func_display_800564C0(opponent, 0); func_display_80057814(opponent); } - if ((D_ctx_80161A88 == 2) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2)) { + if ((gGroundType == GROUNDTYPE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2)) { Lights_SetOneLight(&gMasterDisp, gLight2x, -1 * gLight2y, gLight2z, gLight2R, gLight2G, gLight2B, gAmbientR, gAmbientG, gAmbientB); Matrix_Push(&gGfxMatrix); Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, 1); for (i = 0, opponent = gPlayer; i < gCamCount; i++, opponent++) { - sp60.x = opponent->pos.x; - sp60.y = opponent->pos.y; - sp60.z = opponent->unk_138; + opponentPos.x = opponent->pos.x; + opponentPos.y = opponent->pos.y; + opponentPos.z = opponent->unk_138; func_display_800564C0(opponent, 1); } Matrix_Pop(&gGfxMatrix); @@ -1633,17 +1634,17 @@ void func_display_80057D00(void) { gAmbientB); Object_Draw(1); TexturedLine_Draw(); - D_display_80161410 = 1; - func_beam_8003DA0C(); - if ((D_ctx_80161A88 == 2) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2)) { + gReflectY = 1; + PlayerShot_Draw(); + if ((gGroundType == GROUNDTYPE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2)) { Matrix_Push(&gGfxMatrix); Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, 1); - D_display_80161410 = -1; - func_beam_8003DA0C(); + gReflectY = -1; + PlayerShot_Draw(); Matrix_Pop(&gGfxMatrix); } - D_display_80161410 = -1; - if ((D_ctx_80161A88 == 2) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2)) { + gReflectY = -1; + if ((gGroundType == GROUNDTYPE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2)) { Matrix_Push(&gGfxMatrix); Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, 1); for (i = 0, opponent = gPlayer; i < gCamCount; i++, opponent++) { @@ -1657,7 +1658,7 @@ void func_display_80057D00(void) { if (gCurrentLevel == LEVEL_AQUAS) { Effect_Draw(0); } - if ((D_ctx_80161A88 == 2) || (D_ctx_80177AC8 != 0)) { + if ((gGroundType == GROUNDTYPE_WATER) || (D_ctx_80177AC8 != 0)) { D_bg_8015F964 = 1; Effect_Draw(1); func_bg_80040CE4(); @@ -1667,7 +1668,7 @@ void func_display_80057D00(void) { ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2)))) { Effect_Draw(0); } - D_display_80161410 = 1; + gReflectY = 1; for (i = 0, opponent = gPlayer; i < gCamCount; i++, opponent++) { if (D_display_800CA224[i] != 0) { func_display_80056E2C(opponent); @@ -1691,7 +1692,7 @@ void func_display_80057D00(void) { } for (i = 0, opponent = gPlayer; i < gCamCount; i++, opponent++) { if (D_display_800CA224[i] != 0) { - if (D_game_800D2860[i]) { + if (gShowCrosshairs[i]) { func_display_80053F7C(opponent); } if (opponent->form == FORM_LANDMASTER) { diff --git a/src/engine/fox_edata_info.c b/src/engine/fox_edata_info.c index 65dd7bd0..fffa8a53 100644 --- a/src/engine/fox_edata_info.c +++ b/src/engine/fox_edata_info.c @@ -22,86 +22,87 @@ #include "assets/ast_area_6.h" #include "assets/ast_zoness.h" -f32 D_edata_800CBE70[] = { +f32 gActor241Hitbox[] = { 1.0f, 0.0f, 50.0f, 0.0f, 25.0f, 0.0f, 25.0f, }; -f32 D_edata_800CBE8C[] = { +f32 gDefaultCubeHitbox100[] = { 1.0f, 0.0f, 50.0f, 0.0f, 50.0f, 0.0f, 50.0f, }; -f32 D_edata_800CBEA8[] = { +f32 gDefaultCubeHitbox150[] = { 1.0f, 0.0f, 75.0f, 0.0f, 75.0f, 0.0f, 75.0f, }; -f32 D_edata_800CBEC4[] = { +f32 gDefaultCubeHitbox200[] = { 1.0f, 0.0f, 100.0f, 0.0f, 100.0f, 0.0f, 100.0f, }; -f32 D_edata_800CBEE0[] = { +f32 gDefaultCubeHitbox300[] = { + // unused 1.0f, 0.0f, 150.0f, 0.0f, 150.0f, 0.0f, 150.0f, }; -f32 D_edata_800CBEFC[] = { +f32 gDefaultCubeHitbox400[] = { 1.0f, 0.0f, 200.0f, 0.0f, 200.0f, 0.0f, 200.0f, }; -f32 D_edata_800CBF18[] = { +f32 gItemRingCheckHitbox[] = { 1.0f, -113.0f, 61.0f, 98.0f, 100.0f, 0.0f, 219.0f, }; -f32 D_edata_800CBF34[] = { +f32 gHitboxNone[] = { 0.0f, }; -f32 D_edata_800CBF38[] = { +f32 gItemCheckpointHitbox[] = { 1.0f, -40.0f, 40.0f, 0.0f, 180.0f, 0.0f, 180.0f, }; -f32 D_edata_800CBF54[] = { +f32 gItemSupplyRingHitbox[] = { 1.0f, 0.0f, 120.0f, 0.0f, 120.0f, 0.0f, 120.0f, }; -f32 D_edata_800CBF70[] = { +f32 gMeteoWarpHitbox[] = { 1.0f, -40.0f, 100.0f, 0.0f, 100.0f, 0.0f, 100.0f, }; f32 D_edata_800CBF8C[] = { 1.0f, 0.0f, 100.0f, 0.0f, 1200.0f, 0.0f, 1200.0f, }; -f32 D_edata_800CBFA8[] = { +f32 gItemLasersHitbox[] = { 1.0f, 0.0f, 120.0f, 0.0f, 120.0f, 0.0f, 120.0f, 0.0f, }; -f32 D_edata_800CBFC8[] = { +f32 gItemBombHitbox[] = { 1.0f, 0.0f, 120.0f, 0.0f, 120.0f, 0.0f, 120.0f, }; -f32 D_edata_800CBFE4[] = { +f32 gActor190_191Hitbox[] = { 1.0f, 0.0f, 40.0f, 0.0f, 40.0f, 0.0f, 40.0f, }; -f32 D_edata_800CC000[] = { +f32 gActor194HItbox[] = { 1.0f, 0.0f, 50.0f, 0.0f, 50.0f, 0.0f, 50.0f, }; -f32 D_edata_800CC01C[] = { +f32 gTeamHitbox[] = { 1.0f, 0.0f, 40.0f, 0.0f, 40.0f, 0.0f, 40.0f, }; -f32 D_edata_800CC038[] = { +f32 gActorAllRangeHItbox[] = { 1.0f, 0.0f, 40.0f, 0.0f, 40.0f, 0.0f, 40.0f, }; -f32 D_edata_800CC054[] = { +f32 gWarpZoneEvent94Hitbox[] = { 1.0f, 0.0f, 140.0f, 0.0f, 170.0f, 0.0f, 140.0f, }; -f32 D_edata_800CC070[] = { +f32 gWarpZoneEvent96Hitbox[] = { 4.0f, 0.0f, 140.0f, -675.0f, 140.0f, 0.0f, 810.0f, 0.0f, 140.0f, 675.0f, 140.0f, 0.0f, 810.0f, 0.0f, 140.0f, 0.0f, 810.0f, 675.0f, 140.0f, 0.0f, 140.0f, 0.0f, 810.0f, -675.0f, 140.0f, }; -f32 D_edata_800CC0D4[] = { +f32 gWarpZoneEvent92Hitbox[] = { 1.0f, 0.0f, 140.0f, 0.0f, 140.0f, 0.0f, 1800.0f, }; -f32 D_edata_800CC0F0[] = { +f32 gWarpZoneEvent93Hitbox[] = { 2.0f, 0.0f, 140.0f, 0.0f, 140.0f, 0.0f, 1800.0f, 1.0f, 141.0f, 1.0f, 1800.0f, 1.0f, 140.0f, }; // clang-format off ObjectInfo D_edata_800CC124[0x190] = { /* OBJ_80_0, */ {(void*) D_CO_6015F00, 0, (ObjectFunc) NULL, D_CO_603E3E0, 800.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_80_1, */ {(void*) D_CO_602E9E0, 0, (ObjectFunc) NULL, D_edata_800CBF34, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_2, */ {(void*) D_CO_601BEC0, 0, (ObjectFunc) NULL, D_edata_800CBF34, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_3, */ {(void*) D_CO_602E7A0, 0, (ObjectFunc) NULL, D_edata_800CBF34, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_4, */ {(void*) D_CO_60244A0, 0, (ObjectFunc) NULL, D_edata_800CBF34, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_5, */ {(void*) D_CO_602E570, 0, (ObjectFunc) NULL, D_edata_800CBF34, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_80_1, */ {(void*) D_CO_602E9E0, 0, (ObjectFunc) NULL, gHitboxNone, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_80_2, */ {(void*) D_CO_601BEC0, 0, (ObjectFunc) NULL, gHitboxNone, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_80_3, */ {(void*) D_CO_602E7A0, 0, (ObjectFunc) NULL, gHitboxNone, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_80_4, */ {(void*) D_CO_60244A0, 0, (ObjectFunc) NULL, gHitboxNone, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_80_5, */ {(void*) D_CO_602E570, 0, (ObjectFunc) NULL, gHitboxNone, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_80_6, */ {(void*) D_CO_60132B0, 0, (ObjectFunc) NULL, D_CO_603DCA4, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_80_7, */ {(void*) D_CO_602E080, 0, (ObjectFunc) NULL, D_CO_603DD40, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_8, */ {(void*) D_CO_60164F0, 0, (ObjectFunc) NULL, D_edata_800CBF34, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_9, */ {(void*) D_CO_6014500, 0, (ObjectFunc) NULL, D_edata_800CBF34, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_80_8, */ {(void*) D_CO_60164F0, 0, (ObjectFunc) NULL, gHitboxNone, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_80_9, */ {(void*) D_CO_6014500, 0, (ObjectFunc) NULL, gHitboxNone, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_80_10, */ {(void*) D_CO_602D5F0, 0, (ObjectFunc) NULL, D_CO_603DDF0, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, /* OBJ_80_11, */ {(void*) D_CO_601A7D0, 0, (ObjectFunc) NULL, D_CO_603DE8C, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, /* OBJ_80_12, */ {(void*) D_CO_6014B50, 0, (ObjectFunc) NULL, D_CO_603DEF4, 500.0f, 0, 0, 39, 0, 0.0f, 0 }, @@ -131,7 +132,7 @@ ObjectInfo D_edata_800CC124[0x190] = { /* OBJ_80_36, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_60066E0, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_80_37, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_600672C, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_80_38, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_6006778, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_39, */ {(void*) Obj39_Draw, 1, (ObjectFunc) Obj39_Update, D_edata_800CBF34, 6000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_80_39, */ {(void*) Obj39_Draw, 1, (ObjectFunc) Obj39_Update, gHitboxNone, 6000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_80_40, */ {(void*) func_edisplay_80059F68, 1, (ObjectFunc) func_enmy_80066D5C, D_CO_603E4A4, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_80_41, */ {(void*) func_edisplay_80059FDC, 1, (ObjectFunc) func_enmy_80066EA8, D_CO_603E4DC, 300.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_80_42, */ {(void*) Obj42_Draw, 1, (ObjectFunc) Obj42_Update, D_CO_603E514, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, @@ -154,7 +155,7 @@ ObjectInfo D_edata_800CC124[0x190] = { /* OBJ_80_59, */ {(void*) D_MA_6024010, 0, (ObjectFunc) NULL, D_MA_603626C, 300.0f, 0, 0, 5, 0, 0.0f, 0 }, /* OBJ_80_60, */ {(void*) D_MA_6027180, 0, (ObjectFunc) NULL, D_MA_6036288, 400.0f, 0, 0, 5, 0, 0.0f, 0 }, /* OBJ_80_61, */ {(void*) Macbeth_801A2A78, 1, (ObjectFunc) NULL, D_MA_60362A4, 200.0f, 0, 0, 5, 0, 0.0f, 0 }, - /* OBJ_80_62, */ {(void*) D_MA_60270E0, 0, (ObjectFunc) NULL, D_edata_800CBF34, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_80_62, */ {(void*) D_MA_60270E0, 0, (ObjectFunc) NULL, gHitboxNone, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_80_63, */ {(void*) D_MA_6013960, 0, (ObjectFunc) NULL, D_MA_6036894, 500.0f, 0, 0, 5, 0, 0.0f, 0 }, /* OBJ_80_64, */ {(void*) D_MA_600AF40, 0, (ObjectFunc) NULL, D_MA_60368E0, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_80_65, */ {(void*) Macbeth_801A6608, 1, (ObjectFunc) NULL, D_MA_6036724, 400.0f, 0, 0, 0, 0, 0.0f, 0 }, @@ -168,34 +169,34 @@ ObjectInfo D_edata_800CC124[0x190] = { /* OBJ_80_73, */ {(void*) D_MA_6030630, 0, (ObjectFunc) NULL, D_MA_6036410, 1100.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_80_74, */ {(void*) D_MA_602DC20, 0, (ObjectFunc) NULL, D_MA_603643C, 1000.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_80_75, */ {(void*) D_MA_601B0D0, 0, (ObjectFunc) NULL, D_MA_6036760, 3000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_76, */ {(void*) D_MA_60075D0, 0, (ObjectFunc) NULL, D_edata_800CBF34, 1000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_80_76, */ {(void*) D_MA_60075D0, 0, (ObjectFunc) NULL, gHitboxNone, 1000.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_80_77, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, D_MA_6036344, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_78, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, D_edata_800CBF34, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_79, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, D_edata_800CBF34, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_80, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, D_edata_800CBF34, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_81, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, D_edata_800CBF34, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_82, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, D_edata_800CBF34, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_83, */ {(void*) Macbeth_801A3240, 1, (ObjectFunc) Macbeth_801A2DD8, D_edata_800CBF34, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_84, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, D_edata_800CBF34, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_85, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, D_edata_800CBF34, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_86, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, D_edata_800CBF34, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_87, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, D_edata_800CBF34, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_88, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, D_edata_800CBF34, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_89, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, D_edata_800CBF34, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_90, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, D_edata_800CBF34, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_91, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, D_edata_800CBF34, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_92, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, D_edata_800CBF34, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_93, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, D_edata_800CBF34, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_94, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, D_edata_800CBF34, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_95, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, D_edata_800CBF34, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_96, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, D_edata_800CBF34, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_97, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, D_edata_800CBF34, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_98, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, D_edata_800CBF34, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_99, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, D_edata_800CBF34, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_100 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, D_edata_800CBF34, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_101 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, D_edata_800CBF34, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_102 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, D_edata_800CBF34, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_103 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, D_edata_800CBF34, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_80_78, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_80_79, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_80_80, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_80_81, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_80_82, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_80_83, */ {(void*) Macbeth_801A3240, 1, (ObjectFunc) Macbeth_801A2DD8, gHitboxNone, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_80_84, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_80_85, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_80_86, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_80_87, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_80_88, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_80_89, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_80_90, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_80_91, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_80_92, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_80_93, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_80_94, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_80_95, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_80_96, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_80_97, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_80_98, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_80_99, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_80_100 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_80_101 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_80_102 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_80_103 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_80_104 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) Macbeth_801A0BD8, D_MA_6036594, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_80_105 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, D_MA_6036204, 1300.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_80_106 */ {(void*) D_SY_60097E0, 0, (ObjectFunc) NULL, D_SY_6034478, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, @@ -203,10 +204,10 @@ ObjectInfo D_edata_800CC124[0x190] = { /* OBJ_80_108 */ {(void*) D_SY_60102C0, 0, (ObjectFunc) NULL, D_SY_6034588, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, /* OBJ_80_109 */ {(void*) D_SY_60036A0, 0, (ObjectFunc) SectorY_801A4E44, D_SY_6034664, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, /* OBJ_80_110 */ {(void*) D_SY_6005360, 0, (ObjectFunc) NULL, D_SY_6034770, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_80_111 */ {(void*) Obj111_Draw, 1, (ObjectFunc) NULL, D_edata_800CBF34, 2000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_80_111 */ {(void*) Obj111_Draw, 1, (ObjectFunc) NULL, gHitboxNone, 2000.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_80_112 */ {(void*) D_SY_600F6C0, 0, (ObjectFunc) SectorY_801A52B8, D_SY_60347F0, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_80_113 */ {(void*) D_SY_601B610, 0, (ObjectFunc) NULL, D_edata_800CBF34, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_114 */ {(void*) D_SY_601C6A0, 0, (ObjectFunc) NULL, D_edata_800CBF34, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_80_113 */ {(void*) D_SY_601B610, 0, (ObjectFunc) NULL, gHitboxNone, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_80_114 */ {(void*) D_SY_601C6A0, 0, (ObjectFunc) NULL, gHitboxNone, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_80_115 */ {(void*) D_SY_60188D0, 0, (ObjectFunc) NULL, D_SY_603486C, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_80_116 */ {(void*) D_SY_60034D0, 0, (ObjectFunc) NULL, D_SY_60347D4, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_80_117 */ {(void*) D_AQ_60231C0, 0, (ObjectFunc) NULL, D_AQ_6030C60, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, @@ -216,9 +217,9 @@ ObjectInfo D_edata_800CC124[0x190] = { /* OBJ_80_121 */ {(void*) D_AQ_602B4C0, 0, (ObjectFunc) NULL, D_AQ_6030E14, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_80_122 */ {(void*) D_AQ_600EE10, 0, (ObjectFunc) NULL, D_AQ_6030E30_Hitbox, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, /* OBJ_80_123 */ {(void*) D_AQ_60120F0, 0, (ObjectFunc) NULL, D_AQ_6030E4C, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_80_124 */ {(void*) D_AQ_600EEF0, 0, (ObjectFunc) NULL, D_edata_800CBF34, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_80_124 */ {(void*) D_AQ_600EEF0, 0, (ObjectFunc) NULL, gHitboxNone, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, /* OBJ_80_125 */ {(void*) D_AQ_600BF80, 0, (ObjectFunc) NULL, D_AQ_6030E68, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_80_126 */ {(void*) Aquas_801BE1FC, 1, (ObjectFunc) NULL, D_edata_800CBF34, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_80_126 */ {(void*) Aquas_801BE1FC, 1, (ObjectFunc) NULL, gHitboxNone, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, /* OBJ_80_127 */ {(void*) D_VE1_9005C80, 0, (ObjectFunc) Venom1_801924A8, D_VE1_601B678, 1000.0f, 0, 0, 42, 0, 0.0f, 0 }, /* OBJ_80_128 */ {(void*) D_VE1_9003F50, 0, (ObjectFunc) NULL, D_VE1_601B6C4, 3200.0f, 0, 0, 42, 0, 0.0f, 0 }, /* OBJ_80_129 */ {(void*) D_VE1_900F060, 0, (ObjectFunc) NULL, D_VE1_601B710, 3200.0f, 0, 0, 42, 0, 0.0f, 0 }, @@ -229,17 +230,17 @@ ObjectInfo D_edata_800CC124[0x190] = { /* OBJ_80_134 */ {(void*) D_VE2_6003000, 0, (ObjectFunc) NULL, D_ANDROSS_C038BA4, 0.0f, 0, 0, 41, 1, 0.0f, 0 }, /* OBJ_80_135 */ {(void*) D_TI_6006890, 0, (ObjectFunc) NULL, D_ANDROSS_C038B40, 0.0f, 0, 0, 41, 1, 0.0f, 0 }, /* OBJ_80_136 */ {(void*) D_VE2_6002990, 0, (ObjectFunc) NULL, D_ANDROSS_C038B40, 0.0f, 0, 0, 41, 1, 0.0f, 0 }, - /* OBJ_80_137 */ {(void*) D_VE2_6004170, 0, (ObjectFunc) NULL, D_edata_800CBF34, 0.0f, 0, 0, 0, 1, 0.0f, 0 }, + /* OBJ_80_137 */ {(void*) D_VE2_6004170, 0, (ObjectFunc) NULL, gHitboxNone, 0.0f, 0, 0, 0, 1, 0.0f, 0 }, /* OBJ_80_138 */ {(void*) D_versus_3017600, 0, (ObjectFunc) NULL, D_versus_302EE64, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_80_139 */ {(void*) D_versus_3017600, 0, (ObjectFunc) NULL, D_versus_302EE80, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_140 */ {(void*) D_versus_30173C0, 0, (ObjectFunc) NULL, D_edata_800CBF34, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_141 */ {(void*) D_versus_30174E0, 0, (ObjectFunc) NULL, D_edata_800CBF34, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_80_140 */ {(void*) D_versus_30173C0, 0, (ObjectFunc) NULL, gHitboxNone, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_80_141 */ {(void*) D_versus_30174E0, 0, (ObjectFunc) NULL, gHitboxNone, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_80_142 */ {(void*) D_versus_301B080, 0, (ObjectFunc) NULL, D_versus_302EE9C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_80_143 */ {(void*) D_versus_3016B00, 0, (ObjectFunc) NULL, D_versus_302EE00, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_80_144 */ {(void*) D_versus_3013780, 0, (ObjectFunc) NULL, D_versus_302ED4C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_80_145 */ {(void*) D_versus_3013580, 0, (ObjectFunc) NULL, D_versus_302ED98, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_80_146 */ {(void*) D_versus_3012ED0, 0, (ObjectFunc) NULL, D_versus_302EDB4, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_147 */ {(void*) NULL, 0, (ObjectFunc) NULL, D_edata_800CBF34, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_80_147 */ {(void*) NULL, 0, (ObjectFunc) NULL, gHitboxNone, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_80_148 */ {(void*) D_FO_60079B0, 0, (ObjectFunc) NULL, D_FO_600FF80, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_80_149 */ {(void*) D_FO_6007D80, 0, (ObjectFunc) NULL, D_FO_600FFA0, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_80_150 */ {(void*) D_FO_6006310, 0, (ObjectFunc) NULL, D_FO_600FFC0, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, @@ -247,55 +248,55 @@ ObjectInfo D_edata_800CC124[0x190] = { /* OBJ_80_152 */ {(void*) D_BO_600F4C0, 0, (ObjectFunc) NULL, D_BO_6011C10, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_80_153 */ {(void*) D_BO_600B8B0, 0, (ObjectFunc) NULL, D_BO_6011C48, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_80_154 */ {(void*) D_KA_600BAF0, 0, (ObjectFunc) NULL, D_KA_601115C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_155 */ {(void*) NULL, 0, (ObjectFunc) NULL, D_edata_800CBF34, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_80_155 */ {(void*) NULL, 0, (ObjectFunc) NULL, gHitboxNone, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_80_156 */ {(void*) SectorY_80197CB8, 1, (ObjectFunc) NULL, D_SY_6034368, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_80_157 */ {(void*) D_SZ_6001DA0, 0, (ObjectFunc) NULL, D_SZ_600924C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_80_158 */ {(void*) D_SZ_6001360, 0, (ObjectFunc) NULL, D_SZ_60092E8, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_80_159 */ {(void*) D_VE2_6008370, 0, (ObjectFunc) NULL, D_VE2_601668C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_80_160 */ {(void*) D_VE2_6010960, 0, (ObjectFunc) NULL, D_VE2_6016714, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_4C_161 */ {(void*) D_CO_602F7C0, 0, (ObjectFunc) func_enmy_80068FE0, D_CO_603E468, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_4C_162 */ {(void*) D_CO_601C9B0, 0, (ObjectFunc) func_enmy_80068FE0, D_CO_603E484, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_4C_163 */ {(void*) D_FO_600A420, 0, (ObjectFunc) func_enmy_80068FE0, D_FO_600FE9C, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_4C_164 */ {(void*) func_edisplay_80059C40, 1, (ObjectFunc) NULL, D_edata_800CBF34, 1800.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_4C_165 */ {(void*) D_CO_602DCA0, 0, (ObjectFunc) NULL, D_edata_800CBF34, -100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_4C_166 */ {(void*) D_CO_601F500, 0, (ObjectFunc) NULL, D_edata_800CBF34, -100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_4C_167 */ {(void*) func_edisplay_80059C34, 1, (ObjectFunc) func_enmy_80066E8C, D_edata_800CBF34, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_4C_168 */ {(void*) func_edisplay_80059850, 1, (ObjectFunc) NULL, D_edata_800CBF34, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_4C_169 */ {(void*) D_TI_60023B0, 0, (ObjectFunc) Titania_8018F038, D_TI_60068BC, 100.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_4C_170 */ {(void*) NULL, 1, (ObjectFunc) Corneria_801875A4, D_edata_800CBF34, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_4C_171 */ {(void*) NULL, 1, (ObjectFunc) Venom1_801922DC, D_edata_800CBF34, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_4C_172 */ {(void*) NULL, 1, (ObjectFunc) Venom1_80192358, D_edata_800CBF34, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_4C_173 */ {(void*) NULL, 1, (ObjectFunc) Venom1_801923C0, D_edata_800CBF34, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_4C_174 */ {(void*) NULL, 1, (ObjectFunc) Venom1_8019243C, D_edata_800CBF34, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_4C_175 */ {(void*) NULL, 1, (ObjectFunc) NULL, D_edata_800CBF34, 1000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SPRITE_CO_POLE */ {(void*) D_CO_602F7C0, 0, (ObjectFunc) Sprite_UpdateDoodad, D_CO_603E468, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SPRITE_CO_TREE */ {(void*) D_CO_601C9B0, 0, (ObjectFunc) Sprite_UpdateDoodad, D_CO_603E484, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SPRITE_FO_POLE */ {(void*) D_FO_600A420, 0, (ObjectFunc) Sprite_UpdateDoodad, D_FO_600FE9C, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SPRITE_FOG_SHADOW */ {(void*) FogShadow_Draw, 1, (ObjectFunc) NULL, gHitboxNone, 1800.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SPRITE_CO_RUIN1 */ {(void*) D_CO_602DCA0, 0, (ObjectFunc) NULL, gHitboxNone, -100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SPRITE_CO_RUIN2 */ {(void*) D_CO_601F500, 0, (ObjectFunc) NULL, gHitboxNone, -100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SPRITE_167 */ {(void*) Sprite167_Draw, 1, (ObjectFunc) Sprite167_Update, gHitboxNone, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SPRITE_168 */ {(void*) Sprite168_Draw, 1, (ObjectFunc) NULL, gHitboxNone, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SPRITE_TI_CACTUS */ {(void*) D_TI_60023B0, 0, (ObjectFunc) Titania_Cactus_Update, D_TI_60068BC, 100.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SPRITE_CO_SMOKE */ {(void*) NULL, 1, (ObjectFunc) Corneria_801875A4, gHitboxNone, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SPRITE_VE1_BOSS_TRIGGER1 */ {(void*) NULL, 1, (ObjectFunc) Venom1_BossTrigger1_Update, gHitboxNone, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SPRITE_VE1_BOSS_TRIGGER2 */ {(void*) NULL, 1, (ObjectFunc) Venom1_BossTrigger2_Update, gHitboxNone, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SPRITE_VE1_BOSS_TRIGGER3 */ {(void*) NULL, 1, (ObjectFunc) Venom1_BossTrigger3_Update, gHitboxNone, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SPRITE_VE1_BOSS_TRIGGER4 */ {(void*) NULL, 1, (ObjectFunc) Venom1_BossTrigger4_Update, gHitboxNone, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SPRITE_GFOX_TARGET */ {(void*) NULL, 1, (ObjectFunc) NULL, gHitboxNone, 1000.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ACTOR_176 */ {(void*) Corneria_8018BAAC, 2, (ObjectFunc) Corneria_8018AED0, D_CO_603E5D0, 500.0f, 0, 0, 39, 1, 200.0f, 1 }, /* OBJ_ACTOR_177 */ {(void*) Corneria_8018BBA4, 2, (ObjectFunc) Corneria_8018B15C, D_CO_603E5D0, 500.0f, 0, 0, 39, 1, 200.0f, 1 }, /* OBJ_ACTOR_178 */ {(void*) Corneria_8018BBF8, 2, (ObjectFunc) Corneria_8018B418, D_CO_603E5D0, 500.0f, 0, 0, 39, 1, 200.0f, 1 }, /* OBJ_ACTOR_179 */ {(void*) Corneria_8018BD7C, 2, (ObjectFunc) Corneria_8018B58C, D_CO_603E604, 500.0f, 0, 0, 39, 1, 0.0f, 1 }, - /* OBJ_ACTOR_180 */ {(void*) func_edisplay_8005B6A4, 1, (ObjectFunc) func_enmy_80066A80, D_edata_800CBF34, 1000.0f, 0, 0, 39, 0, 0.0f, 1 }, + /* OBJ_ACTOR_180 */ {(void*) func_edisplay_8005B6A4, 1, (ObjectFunc) func_enmy_80066A80, gHitboxNone, 1000.0f, 0, 0, 39, 0, 0.0f, 1 }, /* OBJ_ACTOR_181 */ {(void*) D_ME_6018C00, 0, (ObjectFunc) Meteo_8018756C, D_ME_602F6EC, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, /* OBJ_ACTOR_182 */ {(void*) func_edisplay_8005B71C, 1, (ObjectFunc) Meteo_80187650, D_ME_602F708, 100.0f, 0, 1, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_183 */ {(void*) Meteo_8018DA6C, 1, (ObjectFunc) Meteo_8018D9EC, D_edata_800CBF34, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, - /* OBJ_ACTOR_184 */ {(void*) Meteo_8018DAEC, 1, (ObjectFunc) Meteo_8018D9EC, D_edata_800CBF34, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, - /* OBJ_ACTOR_185 */ {(void*) Meteo_8018DB6C, 1, (ObjectFunc) Meteo_8018D9EC, D_edata_800CBF34, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, + /* OBJ_ACTOR_183 */ {(void*) Meteo_8018DA6C, 1, (ObjectFunc) Meteo_8018D9EC, gHitboxNone, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, + /* OBJ_ACTOR_184 */ {(void*) Meteo_8018DAEC, 1, (ObjectFunc) Meteo_8018D9EC, gHitboxNone, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, + /* OBJ_ACTOR_185 */ {(void*) Meteo_8018DB6C, 1, (ObjectFunc) Meteo_8018D9EC, gHitboxNone, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, /* OBJ_ACTOR_186 */ {(void*) func_edisplay_8005B7CC, 1, (ObjectFunc) Meteo_8018795C, D_ME_602F724, 200.0f, 0, 1, 39, 0, 1.0f, 1 }, /* OBJ_ACTOR_187 */ {(void*) D_ME_6018450, 0, (ObjectFunc) Meteo_801877C4, D_ME_602F740, 200.0f, 0, 1, 39, 0, 1.0f, 1 }, /* OBJ_ACTOR_188 */ {(void*) Aquas_801BEC74, 1, (ObjectFunc) Aquas_801BEC68, D_AQ_6030BE0, 200.0f, 0, 1, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_189 */ {(void*) Actor189_Draw, 1, (ObjectFunc) Actor189_Update, D_edata_800CBF34, 0.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_ACTOR_190 */ {(void*) func_edisplay_8005B848, 1, (ObjectFunc) func_enmy_800656D4, D_edata_800CBFE4, 100.0f, 0, 1, 39, 0, 1.0f, 0 }, - /* OBJ_ACTOR_191 */ {(void*) func_edisplay_8005B848, 1, (ObjectFunc) func_enmy_800656D4, D_edata_800CBFE4, 100.0f, 0, 1, 39, 0, 1.0f, 0 }, + /* OBJ_ACTOR_189 */ {(void*) Actor189_Draw, 1, (ObjectFunc) Actor189_Update, gHitboxNone, 0.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_ACTOR_190 */ {(void*) func_edisplay_8005B848, 1, (ObjectFunc) func_enmy_800656D4, gActor190_191Hitbox, 100.0f, 0, 1, 39, 0, 1.0f, 0 }, + /* OBJ_ACTOR_191 */ {(void*) func_edisplay_8005B848, 1, (ObjectFunc) func_enmy_800656D4, gActor190_191Hitbox, 100.0f, 0, 1, 39, 0, 1.0f, 0 }, /* 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, D_edata_800CC000, 200.0f, 0, 1, 39, 0, 0.0f, 1 }, - /* OBJ_ACTOR_195 */ {(void*) func_demo_8004FEC0, 1, (ObjectFunc) func_demo_8004F8AC, D_edata_800CBF34, 20000.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_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, D_edata_800CC038, 20000.0f, 0, 1, 39, 1, 1.0f, 1 }, - /* OBJ_ACTOR_TEAM_BOSS */ {(void*) ActorAllRange_Draw, 1, (ObjectFunc) ActorTeamBoss_Update, D_edata_800CC01C, 20000.0f, 0, 0, 39, 1, 0.0f, 0 }, - /* OBJ_ACTOR_199 */ {(void*) Andross_80188448, 1, (ObjectFunc) Andross_801880E4, D_edata_800CBF34, 20000.0f, 0, 0, 39, 1, 0.0f, 0 }, - /* OBJ_ACTOR_EVENT */ {(void*) ActorEvent_Draw, 1, (ObjectFunc) ActorEvent_Update, D_edata_800CBF34, 2000.0f, 0, 1, 39, 0, 0.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 }, + /* OBJ_ACTOR_199 */ {(void*) Andross_80188448, 1, (ObjectFunc) Andross_801880E4, gHitboxNone, 20000.0f, 0, 0, 39, 1, 0.0f, 0 }, + /* OBJ_ACTOR_EVENT */ {(void*) ActorEvent_Draw, 1, (ObjectFunc) ActorEvent_Update, gHitboxNone, 2000.0f, 0, 1, 39, 0, 0.0f, 1 }, /* OBJ_ACTOR_201 */ {(void*) Actor201_Draw, 1, (ObjectFunc) Actor201_Update, D_ME_602F684, 100.0f, 0, 1, 39, 0, 1.0f, 1 }, /* OBJ_ACTOR_202 */ {(void*) Actor202_Draw, 1, (ObjectFunc) Actor202_Update, D_ME_602F6A0, 100.0f, 0, 1, 39, 0, 180.0f, 1 }, - /* OBJ_ACTOR_SLIPPY_SX */ {(void*) SectorX_8018F884, 1, (ObjectFunc) SectorX_8018F330, D_edata_800CBF34, 1000.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_ACTOR_SLIPPY_SX */ {(void*) SectorX_8018F884, 1, (ObjectFunc) SectorX_8018F330, gHitboxNone, 1000.0f, 0, 0, 39, 0, 0.0f, 0 }, /* OBJ_ACTOR_204 */ {(void*) SectorY_Actor204_Draw, 1, (ObjectFunc) SectorY_Actor204_Update, D_SY_603405C, 1000.0f, 0, 0, 39, 0, 1.0f, 1 }, /* OBJ_ACTOR_205 */ {(void*) Macbeth_801A12C4, 1, (ObjectFunc) Macbeth_8019C778, D_MA_60359C8, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, /* OBJ_ACTOR_206 */ {(void*) Macbeth_801A12C4, 1, (ObjectFunc) Macbeth_801AC438, D_MA_6035A48, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, @@ -316,7 +317,7 @@ ObjectInfo D_edata_800CC124[0x190] = { /* OBJ_ACTOR_221 */ {(void*) Macbeth_801AE2C0, 1, (ObjectFunc) Macbeth_801ADD68, D_MA_603694C, 300.0f, 0, 0, 40, 1, 1.0f, 0 }, /* OBJ_ACTOR_222 */ {(void*) Macbeth_801AEEFC, 1, (ObjectFunc) Macbeth_801AEC04, D_MA_6036968, 300.0f, 0, 0, 40, 1, 1.0f, 0 }, /* OBJ_ACTOR_223 */ {(void*) Macbeth_801A54E8, 1, (ObjectFunc) Macbeth_801A4B24, D_MA_60364DC, 300.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_224 */ {(void*) NULL, 1, (ObjectFunc) Titania_80189194, D_edata_800CBF34, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_ACTOR_224 */ {(void*) NULL, 1, (ObjectFunc) Titania_80189194, gHitboxNone, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, /* OBJ_ACTOR_225 */ {(void*) D_TI1_700AB70, 0, (ObjectFunc) Titania_8018AB44, D_TI_60064AC, 50.0f, 0, 0, 39, 1, 1.0f, 0 }, /* OBJ_ACTOR_226 */ {(void*) Titania_80189AFC, 1, (ObjectFunc) Titania_801895B8, D_TI_60064C8, 300.0f, 0, 0, 39, 1, 70.0f, 1 }, /* OBJ_ACTOR_227 */ {(void*) Titania_8018E5B4, 1, (ObjectFunc) Titania_8018E54C, D_TI_60067C4, 0.0f, 0, 0, 39, 1, 0.0f, 0 }, @@ -326,22 +327,22 @@ ObjectInfo D_edata_800CC124[0x190] = { /* OBJ_ACTOR_231 */ {(void*) Titania_8018BE84, 1, (ObjectFunc) Titania_8018B9D0, D_TI_6006858, 0.0f, 0, 0, 39, 1, 0.0f, 1 }, /* OBJ_ACTOR_232 */ {(void*) Titania_8018B6AC, 1, (ObjectFunc) Titania_8018B268, D_TI_6006890, 0.0f, 0, 0, 39, 1, 20.0f, 1 }, /* OBJ_ACTOR_233 */ {(void*) Titania_8018A1C0, 1, (ObjectFunc) Titania_80189CC8, D_TI_60068F0, 200.0f, 0, 0, 39, 1, 1.0f, 1 }, - /* OBJ_ACTOR_234 */ {(void*) Actor234_Draw, 1, (ObjectFunc) Actor234_Update, D_edata_800CBF34, 2000.0f, 0, 0, 39, 0, 0.0f, 5 }, + /* OBJ_ACTOR_234 */ {(void*) Actor234_Draw, 1, (ObjectFunc) Actor234_Update, gHitboxNone, 2000.0f, 0, 0, 39, 0, 0.0f, 5 }, /* OBJ_ACTOR_235 */ {(void*) Zoness_80190430, 2, (ObjectFunc) Zoness_801904CC, D_ZO_602C294, 1000.0f, 0, 1, 40, 0, 1.0f, 1 }, /* OBJ_ACTOR_236 */ {(void*) Zoness_80190F08, 1, (ObjectFunc) Zoness_80190A00, D_ZO_602BC58, 5000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_237 */ {(void*) Actor237_Draw, 1, (ObjectFunc) Actor237_Update, D_edata_800CBF34, 200.0f, 0, 0, 40, 0, 0.0f, 2 }, - /* OBJ_ACTOR_238 */ {(void*) Zoness_801914C4, 2, (ObjectFunc) Zoness_80191010, D_edata_800CBE8C, 200.0f, 0, 1, 40, 0, 1.0f, 1 }, - /* OBJ_ACTOR_239 */ {(void*) NULL, 1, (ObjectFunc) NULL, D_edata_800CBF34, 1000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ACTOR_240 */ {(void*) Zoness_80191B4C, 1, (ObjectFunc) Zoness_80191680, D_edata_800CBE8C, 1500.0f, 0, 1, 40, 0, 20.0f, 0 }, - /* OBJ_ACTOR_241 */ {(void*) Zoness_80191DB0, 1, (ObjectFunc) Zoness_80191BC4, D_edata_800CBE70, 1500.0f, 0, 1, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_237 */ {(void*) Actor237_Draw, 1, (ObjectFunc) Actor237_Update, gHitboxNone, 200.0f, 0, 0, 40, 0, 0.0f, 2 }, + /* OBJ_ACTOR_238 */ {(void*) Zoness_801914C4, 2, (ObjectFunc) Zoness_80191010, gDefaultCubeHitbox100, 200.0f, 0, 1, 40, 0, 1.0f, 1 }, + /* OBJ_ACTOR_239 */ {(void*) NULL, 1, (ObjectFunc) NULL, gHitboxNone, 1000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ACTOR_240 */ {(void*) Zoness_80191B4C, 1, (ObjectFunc) Zoness_80191680, gDefaultCubeHitbox100, 1500.0f, 0, 1, 40, 0, 20.0f, 0 }, + /* OBJ_ACTOR_241 */ {(void*) Zoness_80191DB0, 1, (ObjectFunc) Zoness_80191BC4, gActor241Hitbox, 1500.0f, 0, 1, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_242 */ {(void*) Zoness_80191FFC, 2, (ObjectFunc) Zoness_80192094, D_ZO_602BE3C, 500.0f, 0, 0, 40, 0, 1.0f, 0 }, - /* OBJ_ACTOR_243 */ {(void*) Zoness_80192C18, 2, (ObjectFunc) Zoness_80192834, D_edata_800CBE8C, 0.0f, 0, 1, 40, 0, 1.0f, 1 }, + /* OBJ_ACTOR_243 */ {(void*) Zoness_80192C18, 2, (ObjectFunc) Zoness_80192834, gDefaultCubeHitbox100, 0.0f, 0, 1, 40, 0, 1.0f, 1 }, /* OBJ_ACTOR_244 */ {(void*) Zoness_80193240, 2, (ObjectFunc) Zoness_80192E64, D_ZO_602BE58, 2000.0f, 0, 0, 40, 0, 50.0f, 0 }, - /* OBJ_ACTOR_245 */ {(void*) Zoness_8019983C, 1, (ObjectFunc) Zoness_8019969C, D_edata_800CBE8C, 200.0f, 0, 0, 40, 0, 1.0f, 0 }, - /* OBJ_ACTOR_246 */ {(void*) Zoness_80199E24, 1, (ObjectFunc) Zoness_80199A28, D_edata_800CBE8C, 2000.0f, 0, 0, 40, 0, 1.0f, 0 }, + /* OBJ_ACTOR_245 */ {(void*) Zoness_8019983C, 1, (ObjectFunc) Zoness_8019969C, gDefaultCubeHitbox100, 200.0f, 0, 0, 40, 0, 1.0f, 0 }, + /* OBJ_ACTOR_246 */ {(void*) Zoness_80199E24, 1, (ObjectFunc) Zoness_80199A28, gDefaultCubeHitbox100, 2000.0f, 0, 0, 40, 0, 1.0f, 0 }, /* OBJ_ACTOR_247 */ {(void*) Zoness_8019D3C4, 1, (ObjectFunc) Zoness_8019D15C, D_ZO_602BFC4, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_248 */ {(void*) Zoness_8019A1FC, 1, (ObjectFunc) Zoness_80199F10, D_edata_800CBEA8, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_249 */ {(void*) Zoness_8019ACCC, 1, (ObjectFunc) Zoness_8019A5D4, D_edata_800CBEC4, 5000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_248 */ {(void*) Zoness_8019A1FC, 1, (ObjectFunc) Zoness_80199F10, gDefaultCubeHitbox150, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_249 */ {(void*) Zoness_8019ACCC, 1, (ObjectFunc) Zoness_8019A5D4, gDefaultCubeHitbox200, 5000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_250 */ {(void*) Zoness_8019B7DC, 1, (ObjectFunc) Zoness_8019B548, D_ZO_602C1D4, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_251 */ {(void*) Zoness_8019BDE0, 2, (ObjectFunc) Zoness_8019B854, D_ZO_602C218, 1000.0f, 0, 0, 40, 0, 1.0f, 1 }, /* OBJ_ACTOR_252 */ {(void*) Zoness_8019C1CC, 1, (ObjectFunc) Zoness_8019BE48, D_ZO_602C234, 200.0f, 0, 0, 40, 0, 80.0f, 1 }, @@ -350,13 +351,13 @@ ObjectInfo D_edata_800CC124[0x190] = { /* OBJ_ACTOR_255 */ {(void*) Aquas_801AE168, 1, (ObjectFunc) Aquas_801AD6C0, D_AQ_6030BFC, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_256 */ {(void*) Aquas_801AEB44, 1, (ObjectFunc) Aquas_801AE3D8, D_AQ_6030C18, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_257 */ {(void*) Aquas_801B099C, 1, (ObjectFunc) Aquas_801AFA5C, D_AQ_6030C44, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_258 */ {(void*) Aquas_801B0EC0, 1, (ObjectFunc) Aquas_801B0B60, D_edata_800CBE8C, 200.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_258 */ {(void*) Aquas_801B0EC0, 1, (ObjectFunc) Aquas_801B0B60, gDefaultCubeHitbox100, 200.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_259 */ {(void*) Aquas_801B619C, 2, (ObjectFunc) Aquas_801B638C, D_AQ_6031398, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_260 */ {(void*) Aquas_801B90DC, 2, (ObjectFunc) Aquas_801B7C78, D_AQ_60313CC, 300.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_261 */ {(void*) Aquas_801B504C, 2, (ObjectFunc) Aquas_801B50E8, D_AQ_6031400, 300.0f, 0, 0, 40, 0, 0.0f, 1 }, /* OBJ_ACTOR_262 */ {(void*) Aquas_801B7A24, 2, (ObjectFunc) Aquas_801B6FF8, D_AQ_603144C, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_263 */ {(void*) Aquas_801BA108, 2, (ObjectFunc) Aquas_801B91A4, D_AQ_6031480, 200.0f, 0, 0, 40, 0, 0.0f, 1 }, - /* OBJ_ACTOR_264 */ {(void*) Aquas_801BA4E4, 1, (ObjectFunc) Aquas_801BA26C, D_edata_800CBE8C, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ACTOR_264 */ {(void*) Aquas_801BA4E4, 1, (ObjectFunc) Aquas_801BA26C, gDefaultCubeHitbox100, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ACTOR_265 */ {(void*) Aquas_801BAD7C, 1, (ObjectFunc) Aquas_801BA6A4, D_AQ_6031500, 200.0f, 0, 0, 40, 0, 0.0f, 1 }, /* OBJ_ACTOR_266 */ {(void*) Aquas_801BB204, 2, (ObjectFunc) Aquas_801BADF8, D_AQ_6031538, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ACTOR_267 */ {(void*) Aquas_801BC930, 2, (ObjectFunc) Aquas_801BB79C, D_AQ_6031554, 800.0f, 0, 0, 40, 0, 0.0f, 0 }, @@ -366,24 +367,24 @@ ObjectInfo D_edata_800CC124[0x190] = { /* OBJ_ACTOR_271 */ {(void*) func_360_8002E694, 2, (ObjectFunc) func_360_8002E670, D_BO_6011B24, 0.0f, 0, 0, 39, 0, 730.0f, 1 }, /* OBJ_ACTOR_272 */ {(void*) func_360_8002E6DC, 1, (ObjectFunc) func_360_8002E6B8, D_BO_6011BF4, 0.0f, 0, 0, 39, 0, 150.0f, 1 }, /* OBJ_ACTOR_273 */ {(void*) Fortuna_80188FE4, 2, (ObjectFunc) Fortuna_80188AD0, D_FO_600FF30, 0.0f, 0, 0, 39, 0, 220.0f, 1 }, - /* OBJ_ACTOR_274 */ {(void*) SectorZ_8019E3A8, 1, (ObjectFunc) SectorZ_8019E234, D_edata_800CBEC4, 0.0f, 0, 0, 39, 0, 1.0f, 0 }, - /* OBJ_ACTOR_275 */ {(void*) Solar_8019F7AC, 1, (ObjectFunc) Solar_8019F20C, D_edata_800CBE8C, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_276 */ {(void*) Solar_8019F7AC, 1, (ObjectFunc) Solar_8019F20C, D_edata_800CBE8C, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_277 */ {(void*) Solar_8019F7AC, 1, (ObjectFunc) Solar_8019F20C, D_edata_800CBEC4, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_278 */ {(void*) NULL, 1, (ObjectFunc) Solar_8019EA7C, D_edata_800CBF34, 200.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* OBJ_ACTOR_279 */ {(void*) NULL, 1, (ObjectFunc) Solar_801A003C, D_edata_800CBF34, 1000.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* OBJ_ACTOR_274 */ {(void*) SectorZ_8019E3A8, 1, (ObjectFunc) SectorZ_8019E234, gDefaultCubeHitbox200, 0.0f, 0, 0, 39, 0, 1.0f, 0 }, + /* OBJ_ACTOR_275 */ {(void*) Solar_8019F7AC, 1, (ObjectFunc) Solar_8019F20C, gDefaultCubeHitbox100, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_276 */ {(void*) Solar_8019F7AC, 1, (ObjectFunc) Solar_8019F20C, gDefaultCubeHitbox100, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_277 */ {(void*) Solar_8019F7AC, 1, (ObjectFunc) Solar_8019F20C, gDefaultCubeHitbox200, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_278 */ {(void*) NULL, 1, (ObjectFunc) Solar_8019EA7C, gHitboxNone, 200.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* OBJ_ACTOR_279 */ {(void*) NULL, 1, (ObjectFunc) Solar_801A003C, gHitboxNone, 1000.0f, 0, 0, 0, 0, 0.0f, 1 }, /* OBJ_ACTOR_280 */ {(void*) D_VE1_900DD20, 0, (ObjectFunc) Venom1_80192518, D_VE1_601B7F8, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, /* OBJ_ACTOR_281 */ {(void*) Venom1_80192E2C, 1, (ObjectFunc) Venom1_80192CD4, D_VE1_601B830, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, /* OBJ_ACTOR_282 */ {(void*) D_VE1_901DA50, 0, (ObjectFunc) Venom1_80192CD4, D_VE1_601B868, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, /* OBJ_ACTOR_283 */ {(void*) D_VE1_9023AD0, 0, (ObjectFunc) Venom1_80192EB0, D_VE1_601B8A0, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, /* OBJ_ACTOR_284 */ {(void*) Venom1_801934D0, 1, (ObjectFunc) Venom1_801933DC, D_VE1_601B8D8, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_285 */ {(void*) Andross_80193244, 1, (ObjectFunc) Andross_80192E94, D_edata_800CBE8C, 1000.0f, 0, 0, 20, 0, 1.0f, 1 }, - /* OBJ_ACTOR_286 */ {(void*) Andross_80188660, 1, (ObjectFunc) Andross_80188528, D_edata_800CBE8C, 1000.0f, 0, 0, 20, 0, 0.0f, 0 }, - /* OBJ_ACTOR_287 */ {(void*) NULL, 1, (ObjectFunc) Andross_80189724, D_edata_800CBF34, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_288 */ {(void*) NULL, 1, (ObjectFunc) Andross_801893B8, D_edata_800CBF34, 1000.0f, 0, 0, 20, 1, 0.0f, 0 }, - /* OBJ_ACTOR_289 */ {(void*) func_edata_800596B0, 1, (ObjectFunc) Andross_80189470, D_edata_800CBF34, 1000.0f, 0, 0, 20, 1, 0.0f, 0 }, - /* OBJ_ACTOR_290 */ {(void*) NULL, 1, (ObjectFunc) Andross_8018933C, D_edata_800CBF34, 1000.0f, 0, 0, 20, 0, 0.0f, 0 }, - /* OBJ_ACTOR_SUPPLIES */ {(void*) ActorSupplies_Draw, 1, (ObjectFunc) ActorSupplies_Update, D_edata_800CBEA8, 1000.0f, 0, 0, 0, 0, 1.0f, 0 }, + /* OBJ_ACTOR_285 */ {(void*) Andross_80193244, 1, (ObjectFunc) Andross_80192E94, gDefaultCubeHitbox100, 1000.0f, 0, 0, 20, 0, 1.0f, 1 }, + /* OBJ_ACTOR_286 */ {(void*) Andross_80188660, 1, (ObjectFunc) Andross_80188528, gDefaultCubeHitbox100, 1000.0f, 0, 0, 20, 0, 0.0f, 0 }, + /* OBJ_ACTOR_287 */ {(void*) NULL, 1, (ObjectFunc) Andross_80189724, gHitboxNone, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_288 */ {(void*) NULL, 1, (ObjectFunc) Andross_801893B8, gHitboxNone, 1000.0f, 0, 0, 20, 1, 0.0f, 0 }, + /* OBJ_ACTOR_289 */ {(void*) func_edata_800596B0, 1, (ObjectFunc) Andross_80189470, gHitboxNone, 1000.0f, 0, 0, 20, 1, 0.0f, 0 }, + /* OBJ_ACTOR_290 */ {(void*) NULL, 1, (ObjectFunc) Andross_8018933C, gHitboxNone, 1000.0f, 0, 0, 20, 0, 0.0f, 0 }, + /* OBJ_ACTOR_SUPPLIES */ {(void*) ActorSupplies_Draw, 1, (ObjectFunc) ActorSupplies_Update, gDefaultCubeHitbox150, 1000.0f, 0, 0, 0, 0, 1.0f, 0 }, /* OBJ_BOSS_292 */ {(void*) Corneria_8018AA74, 2, (ObjectFunc) Corneria_80189058, D_CO_603E620, 20000.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_293 */ {(void*) Corneria_8018ECAC, 1, (ObjectFunc) Corneria_8018C19C, D_CO_603E840, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_294 */ {(void*) Corneria_8018ED78, 1, (ObjectFunc) Corneria_8018DDAC, D_CO_603E714, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, @@ -391,8 +392,8 @@ ObjectInfo D_edata_800CC124[0x190] = { /* OBJ_BOSS_296 */ {(void*) Corneria_8018EF90, 1, (ObjectFunc) Corneria_8018E76C, D_CO_603E7C4, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_297 */ {(void*) Meteo_8018BACC, 1, (ObjectFunc) Meteo_8018978C, D_ME_602F75C, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_298 */ {(void*) Meteo_801887D0, 1, (ObjectFunc) Meteo_80188344, D_ME_602FA50, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_299 */ {(void*) Boss299_Draw, 2, (ObjectFunc) Boss299_Update, D_edata_800CBF34, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_300 */ {(void*) Boss300_Draw, 1, (ObjectFunc) Boss300_Update, D_edata_800CBF34, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_299 */ {(void*) Boss299_Draw, 2, (ObjectFunc) Boss299_Update, gHitboxNone, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_300 */ {(void*) Boss300_Draw, 1, (ObjectFunc) Boss300_Update, gHitboxNone, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_301 */ {(void*) Aquas_801BEC5C, 1, (ObjectFunc) Aquas_801BEC50, D_AQ_6030B10, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_A6 */ {(void*) Area6_8018C54C, 1, (ObjectFunc) Area6_80187944, D_A6_6028454, 2000.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_303 */ {(void*) SectorX_80193434, 2, (ObjectFunc) SectorX_80190078, D_SX_6032550, 20000.0f, 0, 0, 20, 0, 0.0f, 10 }, @@ -401,35 +402,35 @@ ObjectInfo D_edata_800CC124[0x190] = { /* OBJ_BOSS_306 */ {(void*) Titania_801982A8, 1, (ObjectFunc) Titania_80197A94,D_TI_801B83A8, 1000.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_ZO */ {(void*) Zoness_801949DC, 2, (ObjectFunc) Zoness_80194A84, D_ZO_602C044, 1000.0f, 0, 0, 40, 0, 1.0f, 10 }, /* OBJ_BOSS_308 */ {(void*) func_hud_8008FE78, 1, (ObjectFunc) func_hud_800907C4, D_FO_600FFE0, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, - /* OBJ_BOSS_309 */ {(void*) func_360_8002E604, 1, (ObjectFunc) func_360_8002E5E0, D_edata_800CBF34, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, - /* OBJ_BOSS_310 */ {(void*) func_360_8002E64C, 1, (ObjectFunc) func_360_8002E628, D_edata_800CBF34, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, + /* OBJ_BOSS_309 */ {(void*) func_360_8002E604, 1, (ObjectFunc) func_360_8002E5E0, gHitboxNone, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, + /* OBJ_BOSS_310 */ {(void*) func_360_8002E64C, 1, (ObjectFunc) func_360_8002E628, gHitboxNone, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_311 */ {(void*) Bolse_80191AFC, 2, (ObjectFunc) Bolse_801912FC, D_BO_6011C80, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_312 */ {(void*) Venom2_80196288, 2, (ObjectFunc) Venom2_80196210, D_VE2_60166F4, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_313 */ {(void*) SectorZ_8019E98C, 1, (ObjectFunc) SectorZ_8019E454, D_SZ_6009388, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_314 */ {(void*) SectorY_8019E2C4, 2, (ObjectFunc) SectorY_8019C888, D_edata_800CBF34, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_SO */ {(void*) Solar_801A71B8, 2, (ObjectFunc) Solar_801A5B3C, D_edata_800CBF34, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_314 */ {(void*) SectorY_8019E2C4, 2, (ObjectFunc) SectorY_8019C888, gHitboxNone, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_SO */ {(void*) Solar_801A71B8, 2, (ObjectFunc) Solar_801A5B3C, gHitboxNone, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_316 */ {(void*) Katina_801968F4, 1, (ObjectFunc) Katina_801946C4, D_KA_6011058, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_317 */ {(void*) Katina_80193B1C, 1, (ObjectFunc) Katina_80193718, D_KA_601115C, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_AQ */ {(void*) Aquas_801B4D84, 2, (ObjectFunc) Aquas_801B134C, D_AQ_6030F74, 10000.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_319 */ {(void*) Venom1_801985E4, 1, (ObjectFunc) Venom1_80194398,D_VE1_8019A9B8, 3000.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_320 */ {(void*) Andross_801928C8, 2, (ObjectFunc) Andross_8018DBF0, D_ANDROSS_C038DC0, 10000.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_321 */ {(void*) Andross_8018B8C0, 1, (ObjectFunc) Andross_80189B70, D_ANDROSS_C038F24, 10000.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_ITEM_LASERS */ {(void*) ItemLasers_Draw, 1, (ObjectFunc) ItemLasers_Update, D_edata_800CBFA8, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ITEM_CHECKPOINT */ {(void*) ItemCheckpoint_Draw, 1, (ObjectFunc) ItemCheckpoint_Update, D_edata_800CBF38, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ITEM_SILVER_RING */ {(void*) ItemSilverRing_Draw, 1, (ObjectFunc) ItemSupplyRing_Update, D_edata_800CBF54, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ITEM_SILVER_STAR */ {(void*) ItemSilverStar_Draw, 1, (ObjectFunc) ItemSilverStar_Update, D_edata_800CBF54, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ITEM_METEO_WARP */ {(void*) ItemMeteoWarp_Draw, 1, (ObjectFunc) ItemMeteoWarp_Update, D_edata_800CBF70, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ITEM_BOMB */ {(void*) ItemBomb_Draw, 1, (ObjectFunc) ItemPickup_Update, D_edata_800CBFC8, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ITEM_328 */ {(void*) NULL, 1, (ObjectFunc) func_enmy_80068C88, D_edata_800CBF8C, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ITEM_329 */ {(void*) NULL, 1, (ObjectFunc) func_enmy_80068C88, D_edata_800CBF8C, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ITEM_330 */ {(void*) NULL, 1, (ObjectFunc) func_enmy_80068C88, D_edata_800CBF8C, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ITEM_331 */ {(void*) NULL, 1, (ObjectFunc) func_enmy_80068C88, D_edata_800CBF8C, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ITEM_332 */ {(void*) NULL, 1, (ObjectFunc) func_enmy_80068C88, D_edata_800CBF8C, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ITEM_333 */ {(void*) NULL, 1, (ObjectFunc) func_enmy_80068C88, D_edata_800CBF8C, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ITEM_334 */ {(void*) NULL, 1, (ObjectFunc) func_enmy_80068C48, D_edata_800CBF18, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ITEM_1UP */ {(void*) D_1022120, 0, (ObjectFunc) Item1up_Update, D_edata_800CBE8C, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ITEM_GOLD_RING */ {(void*) ItemGoldRing_Draw, 1, (ObjectFunc) ItemGoldRing_Update, D_edata_800CBF54, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ITEM_WING_REPAIR */ {(void*) D_arwing_3007650, 0, (ObjectFunc) ItemWingRepair_Update, D_edata_800CBFA8, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ITEM_LASERS */ {(void*) ItemLasers_Draw, 1, (ObjectFunc) ItemLasers_Update, gItemLasersHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ITEM_CHECKPOINT */ {(void*) ItemCheckpoint_Draw, 1, (ObjectFunc) ItemCheckpoint_Update, gItemCheckpointHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ITEM_SILVER_RING */ {(void*) ItemSilverRing_Draw, 1, (ObjectFunc) ItemSupplyRing_Update, gItemSupplyRingHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ITEM_SILVER_STAR */ {(void*) ItemSilverStar_Draw, 1, (ObjectFunc) ItemSilverStar_Update, gItemSupplyRingHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ITEM_METEO_WARP */ {(void*) ItemMeteoWarp_Draw, 1, (ObjectFunc) ItemMeteoWarp_Update, gMeteoWarpHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ITEM_BOMB */ {(void*) ItemBomb_Draw, 1, (ObjectFunc) ItemPickup_Update, gItemBombHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ITEM_PATH_SPLIT_X */ {(void*) NULL, 1, (ObjectFunc) ItemPathChange_Update, D_edata_800CBF8C, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ITEM_PATH_TURN_LEFT */ {(void*) NULL, 1, (ObjectFunc) ItemPathChange_Update, D_edata_800CBF8C, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ITEM_PATH_TURN_RIGHT */ {(void*) NULL, 1, (ObjectFunc) ItemPathChange_Update, D_edata_800CBF8C, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ITEM_PATH_SPLIT_Y */ {(void*) NULL, 1, (ObjectFunc) ItemPathChange_Update, D_edata_800CBF8C, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ITEM_PATH_TURN_UP */ {(void*) NULL, 1, (ObjectFunc) ItemPathChange_Update, D_edata_800CBF8C, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ITEM_PATH_TURN_DOWN */ {(void*) NULL, 1, (ObjectFunc) ItemPathChange_Update, D_edata_800CBF8C, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ITEM_RING_CHECK */ {(void*) NULL, 1, (ObjectFunc) ItemRingCheck_Update, gItemRingCheckHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ITEM_1UP */ {(void*) D_1022120, 0, (ObjectFunc) Item1up_Update, gDefaultCubeHitbox100, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ITEM_GOLD_RING */ {(void*) ItemGoldRing_Draw, 1, (ObjectFunc) ItemGoldRing_Update, gItemSupplyRingHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ITEM_WING_REPAIR */ {(void*) D_arwing_3007650, 0, (ObjectFunc) ItemWingRepair_Update, gItemLasersHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ITEM_TRAINING_RING */ {(void*) gItemTrainingRingDL, 0, (ObjectFunc) Training_ItemRing_Update, D_TR_6009CFC, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_EFFECT_339 */ {(void*) func_effect_8007D55C, 1, (ObjectFunc) func_effect_8007D2F4, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, /* OBJ_EFFECT_340 */ {(void*) func_effect_8007D55C, 1, (ObjectFunc) func_effect_8007D748, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, diff --git a/src/engine/fox_edisplay.c b/src/engine/fox_edisplay.c index fa7bb842..9a60f9f9 100644 --- a/src/engine/fox_edisplay.c +++ b/src/engine/fox_edisplay.c @@ -1,3 +1,4 @@ +#include "prevent_bss_reordering.h" #include "global.h" #include "assets/ast_katina.h" #include "assets/ast_venom_1.h" @@ -20,7 +21,6 @@ #include "assets/ast_enmy_planet.h" #include "assets/ast_ve1_boss.h" #include "assets/ast_zoness.h" -// #include "prevent_bss_reordering.h" Vec3f D_edisplay_801615D0; Vec3f D_edisplay_801615E0; @@ -50,7 +50,7 @@ void Graphics_SetScaleMtx(f32 scale) { Matrix_SetGfxMtx(&gMasterDisp); } -void func_edisplay_80059850(Object_4C* obj4C) { +void Sprite168_Draw(Sprite168* this) { RCP_SetupDL(&gMasterDisp, 0x40); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 60); RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); @@ -59,7 +59,7 @@ void func_edisplay_80059850(Object_4C* obj4C) { void func_edisplay_800598DC(s32 arg0) { } -void Actor201_Draw(Actor* actor) { +void Actor201_Draw(Actor201* this) { RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gSPDisplayList(gMasterDisp++, D_MA_6025B50); RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); @@ -88,17 +88,17 @@ f32 D_edisplay_800CFA2C[] = { 1.0f, 1.0f, 0.95f, 0.9f, 0.85f, 0.8f, 0.75f, 0.7f, 0.65f, 0.6f, }; -void Actor202_Draw(Actor* actor) { +void Actor202_Draw(Actor202* this) { Vec3f sp30[30]; - f32 temp = D_edisplay_800CF9B0[actor->unk_0B6] - 114.0f; + f32 temp = D_edisplay_800CF9B0[this->unk_0B6] - 114.0f; Matrix_Translate(gGfxMatrix, 0.f, -temp, 0.0f, 1); Matrix_SetGfxMtx(&gMasterDisp); - Animation_GetFrameData(&D_ME_601E8C4, actor->unk_0B6, sp30); - Animation_DrawSkeleton(1, D_ME_601E9D0, sp30, NULL, func_edisplay_800599A4, &actor->index, &gIdentityMatrix); + Animation_GetFrameData(&D_ME_601E8C4, this->unk_0B6, sp30); + Animation_DrawSkeleton(1, D_ME_601E9D0, sp30, NULL, func_edisplay_800599A4, &this->index, &gIdentityMatrix); } -void Obj39_Draw(Object_80* obj80) { +void Obj39_Draw(Object80_39* this) { gSPDisplayList(gMasterDisp++, D_ME_601AE40); } @@ -114,12 +114,12 @@ void func_edisplay_80059B20(Object_80* obj80) { void func_edisplay_80059BB0(void* arg0) { } -void Obj42_Draw(Object_80* obj80) { +void Obj42_Draw(Object80_42* this) { gSPDisplayList(gMasterDisp++, D_CO_6023AC0); } -void Actor196_Draw(Actor* actor) { - if (actor->unk_0B6 != 0) { +void Actor196_Draw(Actor196* this) { + if (this->unk_0B6 != 0) { gSPDisplayList(gMasterDisp++, D_CO_6032BC0); } } @@ -127,40 +127,40 @@ void Actor196_Draw(Actor* actor) { void func_edisplay_80059C28(void* arg0) { } -void func_edisplay_80059C34(Object_4C* obj4C) { +void Sprite167_Draw(Sprite167* this) { } -void func_edisplay_80059C40(Object_4C* obj4C) { +void FogShadow_Draw(FogShadow* this) { RCP_SetupDL_47(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 180); - switch (obj4C->unk_45) { - case 0: + switch (this->unk_45) { + case OBJ_80_0: Matrix_Scale(gGfxMatrix, 2.0f, 1.0f, 0.7f, 1); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_6034B90); break; - case 21: + case OBJ_80_21: Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.7f, 1); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_6034B90); break; - case 6: - case 7: + case OBJ_80_6: + case OBJ_80_7: Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 10.55f, 1); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_Gfx_800DAC20); break; - case 56: + case OBJ_80_56: Matrix_Scale(gGfxMatrix, 1.6f, 1.0f, 1.0f, 1); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_6034B90); break; - case 20: + case OBJ_80_20: Matrix_Scale(gGfxMatrix, 1.2f, 1.0f, 1.3f, 1); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_6034B90); break; - case 22: + case OBJ_80_22: Matrix_Scale(gGfxMatrix, 2.2f, 1.0f, 1.4f, 1); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_6034B90); @@ -179,8 +179,8 @@ void func_edisplay_80059FDC(Object_80* obj80) { gSPDisplayList(gMasterDisp++, D_CO_6035DA0); } -void func_edisplay_8005A010(Object_4C* obj4C) { - if (obj4C->unk_48 == 0) { +void func_edisplay_8005A010(Sprite* sprite) { + if (sprite->unk_48 == 0) { Matrix_RotateY(gGfxMatrix, M_PI / 2, 1); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_60361F0); @@ -236,8 +236,8 @@ Gfx* D_edisplay_800CFC64[] = { D_AQ_6023940, D_AQ_6023D70, D_AQ_60249C0, D_AQ_60 Gfx* D_edisplay_800CFC7C[] = { D_ZO_601B570, D_ZO_601B710, D_ZO_60209B0, D_ZO_6020B70, D_ZO_6020D50, D_ZO_601B8F0, D_ZO_601B3B0, D_ZO_601B1C0, D_ZO_6011660 }; -void Actor189_Draw(Actor* actor) { - switch (actor->state) { +void Actor189_Draw(Actor189* this) { + switch (this->state) { case 0: Matrix_Translate(gGfxMatrix, 18.0f, 15.0f, -15.0f, 1); Matrix_RotateY(gGfxMatrix, M_PI, 1); @@ -251,15 +251,15 @@ void Actor189_Draw(Actor* actor) { gSPDisplayList(gMasterDisp++, D_arwing_3015D80); break; case 2: - Graphics_SetScaleMtx(actor->scale); + Graphics_SetScaleMtx(this->scale); gSPDisplayList(gMasterDisp++, D_arwing_30155E0); break; case 3: gSPDisplayList(gMasterDisp++, D_arwing_3011720); break; case 4: - Graphics_SetScaleMtx(actor->scale); - if (actor->index & 1) { + Graphics_SetScaleMtx(this->scale); + if ((this->index % 2) != 0) { gSPDisplayList(gMasterDisp++, D_10194C0); } else { gSPDisplayList(gMasterDisp++, D_1024290); @@ -267,11 +267,11 @@ void Actor189_Draw(Actor* actor) { break; case 39: gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - gSPDisplayList(gMasterDisp++, D_edisplay_800CFAC4[actor->unk_048]); + gSPDisplayList(gMasterDisp++, D_edisplay_800CFAC4[this->unk_048]); break; case 40: gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); - switch (actor->unk_048) { + switch (this->unk_048) { case 0: break; case 1: @@ -287,7 +287,7 @@ void Actor189_Draw(Actor* actor) { break; } if (gCurrentLevel != LEVEL_SOLAR) { - gSPDisplayList(gMasterDisp++, D_TI_801B769C[actor->unk_046]); + gSPDisplayList(gMasterDisp++, D_TI_801B769C[this->unk_046]); } else { if (gBosses[0].fwork[3] < 4800.0f) { RCP_SetupDL(&gMasterDisp, 0x1E); @@ -298,58 +298,58 @@ void Actor189_Draw(Actor* actor) { gDPSetFogColor(gMasterDisp++, 16, 16, 16, gFogAlpha); gSPFogPosition(gMasterDisp++, gFogNear, gFogFar); } - Graphics_SetScaleMtx(actor->scale); - gSPDisplayList(gMasterDisp++, D_edisplay_800CFB40[actor->unk_046]); + Graphics_SetScaleMtx(this->scale); + gSPDisplayList(gMasterDisp++, D_edisplay_800CFB40[this->unk_046]); } break; case 41: - Graphics_SetScaleMtx(actor->scale); - gSPDisplayList(gMasterDisp++, D_edisplay_800CFADC[actor->unk_048]); + Graphics_SetScaleMtx(this->scale); + gSPDisplayList(gMasterDisp++, D_edisplay_800CFADC[this->unk_048]); break; case 42: - Graphics_SetScaleMtx(actor->scale); - gSPDisplayList(gMasterDisp++, D_edisplay_800CFB08[actor->unk_048]); + Graphics_SetScaleMtx(this->scale); + gSPDisplayList(gMasterDisp++, D_edisplay_800CFB08[this->unk_048]); break; case 43: - Graphics_SetScaleMtx(actor->scale); - gSPDisplayList(gMasterDisp++, D_edisplay_800CFB14[actor->unk_048]); + Graphics_SetScaleMtx(this->scale); + gSPDisplayList(gMasterDisp++, D_edisplay_800CFB14[this->unk_048]); break; case 44: - Graphics_SetScaleMtx(actor->scale); - gSPDisplayList(gMasterDisp++, D_edisplay_800CFB28[actor->unk_048]); + Graphics_SetScaleMtx(this->scale); + gSPDisplayList(gMasterDisp++, D_edisplay_800CFB28[this->unk_048]); break; case 45: gSPDisplayList(gMasterDisp++, D_ENMY_PLANET_40018A0); break; case 46: - if ((actor->unk_048 == 2) || (actor->unk_048 == 3) || (actor->unk_048 == 4)) { + if ((this->unk_048 == 2) || (this->unk_048 == 3) || (this->unk_048 == 4)) { RCP_SetupDL(&gMasterDisp, 0x21); } gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - gSPDisplayList(gMasterDisp++, D_TI_801B7584[actor->unk_048]); + gSPDisplayList(gMasterDisp++, D_TI_801B7584[this->unk_048]); break; case 47: - gSPDisplayList(gMasterDisp++, D_TI_801B7608[actor->unk_048]); + gSPDisplayList(gMasterDisp++, D_TI_801B7608[this->unk_048]); break; case 48: - Graphics_SetScaleMtx(actor->scale); - gSPDisplayList(gMasterDisp++, D_edisplay_800CFB64[actor->unk_048]); + Graphics_SetScaleMtx(this->scale); + gSPDisplayList(gMasterDisp++, D_edisplay_800CFB64[this->unk_048]); break; case 49: - Graphics_SetScaleMtx(actor->scale); - gSPDisplayList(gMasterDisp++, D_edisplay_800CFB88[actor->unk_048]); + Graphics_SetScaleMtx(this->scale); + gSPDisplayList(gMasterDisp++, D_edisplay_800CFB88[this->unk_048]); break; case 50: Graphics_SetScaleMtx(0.7f); - if (actor->iwork[1] == 1) { + if (this->iwork[1] == 1) { RCP_SetupDL(&gMasterDisp, 0x1E); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); - } else if (actor->iwork[1] == 2) { + } else if (this->iwork[1] == 2) { RCP_SetupDL(&gMasterDisp, 0x1E); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); Graphics_SetScaleMtx(0.7f); } - switch (actor->iwork[0]) { + switch (this->iwork[0]) { case 0: gSPDisplayList(gMasterDisp++, D_VE1_90234D0); break; @@ -363,60 +363,60 @@ void Actor189_Draw(Actor* actor) { gSPDisplayList(gMasterDisp++, D_VE1_9010FD0); break; } - if (actor->iwork[1] != 0) { + if (this->iwork[1] != 0) { RCP_SetupDL(&gMasterDisp, 0x1D); Graphics_SetScaleMtx(0.7f); } break; case 51: - Graphics_SetScaleMtx(actor->scale); - gSPDisplayList(gMasterDisp++, D_edisplay_800CFBA8[actor->unk_048]); + Graphics_SetScaleMtx(this->scale); + gSPDisplayList(gMasterDisp++, D_edisplay_800CFBA8[this->unk_048]); break; case 52: - Graphics_SetScaleMtx(actor->scale); - gSPDisplayList(gMasterDisp++, D_edisplay_800CFBE4[actor->unk_048]); + Graphics_SetScaleMtx(this->scale); + gSPDisplayList(gMasterDisp++, D_edisplay_800CFBE4[this->unk_048]); break; case 53: - Graphics_SetScaleMtx(actor->scale); - gSPDisplayList(gMasterDisp++, D_edisplay_800CFC0C[actor->unk_048]); + Graphics_SetScaleMtx(this->scale); + gSPDisplayList(gMasterDisp++, D_edisplay_800CFC0C[this->unk_048]); break; case 54: - Graphics_SetScaleMtx(actor->scale); - gSPDisplayList(gMasterDisp++, D_edisplay_800CFC40[actor->unk_048]); + Graphics_SetScaleMtx(this->scale); + gSPDisplayList(gMasterDisp++, D_edisplay_800CFC40[this->unk_048]); break; case 55: - Graphics_SetScaleMtx(actor->scale); - gSPDisplayList(gMasterDisp++, D_edisplay_800CFC50[actor->unk_048]); + Graphics_SetScaleMtx(this->scale); + gSPDisplayList(gMasterDisp++, D_edisplay_800CFC50[this->unk_048]); break; case 56: - Graphics_SetScaleMtx(actor->scale); + Graphics_SetScaleMtx(this->scale); RCP_SetupDL(&gMasterDisp, 0x29); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 191, 255, 223, 255); - gSPDisplayList(gMasterDisp++, D_edisplay_800CFC64[actor->unk_048]); + gSPDisplayList(gMasterDisp++, D_edisplay_800CFC64[this->unk_048]); break; case 58: - Graphics_SetScaleMtx(actor->scale); + Graphics_SetScaleMtx(this->scale); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_AQ_60148B0); break; case 59: - Graphics_SetScaleMtx(actor->scale); + Graphics_SetScaleMtx(this->scale); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_edisplay_800CFC7C[actor->unk_048]); + gSPDisplayList(gMasterDisp++, D_edisplay_800CFC7C[this->unk_048]); break; case 70: gSPDisplayList(gMasterDisp++, D_10177C0); break; case 57: - gSPDisplayList(gMasterDisp++, D_VE1_8019A008[actor->unk_048]); + gSPDisplayList(gMasterDisp++, D_VE1_8019A008[this->unk_048]); break; default: - if (actor->state > 9) { - if (actor->state == 36) { + if (this->state > 9) { + if (this->state == 36) { gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); } - gSPDisplayList(gMasterDisp++, D_edisplay_800CFA54[actor->state - 10]); + gSPDisplayList(gMasterDisp++, D_edisplay_800CFA54[this->state - 10]); } break; } @@ -435,7 +435,7 @@ void func_edisplay_8005ADAC(Actor* actor) { } Math_SmoothStepToF(&actor->fwork[29], temp1, 0.3f, 5.0f, 0.0f); sp5C = actor->fwork[29]; - if (gGameFrameCount & 1) { + if ((gGameFrameCount % 2) != 0) { sp5C *= 1.111f; } Matrix_Push(&gGfxMatrix); @@ -453,7 +453,7 @@ void func_edisplay_8005ADAC(Actor* actor) { sp5C = actor->fwork[21]; if ((sp5C != 0.0f) && (gLevelType == LEVELTYPE_PLANET)) { sp54 = 0.0f; - if (gGameFrameCount & 1) { + if ((gGameFrameCount % 2) != 0) { sp54 = 180.0f; } RCP_SetupDL_64_2(); @@ -491,7 +491,7 @@ void func_edisplay_8005B1E8(Actor* actor, s32 levelType) { if (actor->iwork[11] >= 2) { scale = D_edisplay_800CFCA0[actor->iwork[11] - 2] * 0.45f; } - if (gGameFrameCount & 1) { + if ((gGameFrameCount % 2) != 0) { scale *= 1.2f; } Matrix_Push(&gGfxMatrix); @@ -589,7 +589,7 @@ void func_edisplay_8005B848(Actor* actor) { break; } scale = 2.0f; - if (gGameFrameCount & 1) { + if ((gGameFrameCount % 2) != 0) { scale = 1.7f; } Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, 1); @@ -683,7 +683,7 @@ void func_edisplay_8005BAB4(ObjectId objId, s32 index) { case OBJ_BOSS_295: case OBJ_BOSS_296: COS_DEG(gBosses[index].obj.rot.z); - if (D_ctx_80161A88 == 2) { + if (gGroundType == GROUNDTYPE_WATER) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 90); } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 150); @@ -760,10 +760,10 @@ void func_edisplay_8005BAB4(ObjectId objId, s32 index) { } } -void ItemCheckpoint_Draw(Item* item) { +void ItemCheckpoint_Draw(ItemCheckpoint* this) { s32 i; - if ((gGameFrameCount & 0x18) && (item->state == 0)) { + if ((gGameFrameCount & 0x18) && (this->state == 0)) { Matrix_Push(&gGfxMatrix); RCP_SetupDL(&gMasterDisp, 0x40); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255); @@ -777,53 +777,53 @@ void ItemCheckpoint_Draw(Item* item) { RCP_SetupDL(&gMasterDisp, 0x1D); gSPTexture(gMasterDisp++, 2000, 2000, 0, G_TX_RENDERTILE, G_ON); gSPSetGeometryMode(gMasterDisp++, G_TEXTURE_GEN); - Matrix_RotateZ(gGfxMatrix, item->unk_58 * M_DTOR, 1); + Matrix_RotateZ(gGfxMatrix, this->unk_58 * M_DTOR, 1); for (i = 0; i < 8; i++) { Matrix_Push(&gGfxMatrix); Matrix_RotateZ(gGfxMatrix, i * 45.0f * M_DTOR, 1); - Matrix_Translate(gGfxMatrix, 2.0f * item->scale, 0.0f, 0.0f, 1); - Matrix_RotateZ(gGfxMatrix, (gGameFrameCount + (i * 110.0f)) * M_DTOR * 7.2f * item->unk_54, 1); - Graphics_SetScaleMtx(2.0f * item->unk_50); + Matrix_Translate(gGfxMatrix, 2.0f * this->scale, 0.0f, 0.0f, 1); + Matrix_RotateZ(gGfxMatrix, (gGameFrameCount + (i * 110.0f)) * M_DTOR * 7.2f * this->unk_54, 1); + Graphics_SetScaleMtx(2.0f * this->unk_50); gSPDisplayList(gMasterDisp++, D_101CAE0); Matrix_Pop(&gGfxMatrix); } gSPClearGeometryMode(gMasterDisp++, G_TEXTURE_GEN); } -void ItemSilverRing_Draw(Item* item) { +void ItemSilverRing_Draw(ItemSilverRing* this) { RCP_SetupDL(&gMasterDisp, 0x1D); gSPTexture(gMasterDisp++, 3000, 0, 0, G_TX_RENDERTILE, G_ON); gSPSetGeometryMode(gMasterDisp++, G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR); - Graphics_SetScaleMtx(item->scale); + Graphics_SetScaleMtx(this->scale); gSPDisplayList(gMasterDisp++, D_101A570); gSPClearGeometryMode(gMasterDisp++, G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR); } -void ItemSilverStar_Draw(Item* item) { +void ItemSilverStar_Draw(ItemSilverStar* this) { RCP_SetupDL(&gMasterDisp, 0x1D); gSPTexture(gMasterDisp++, 3000, 0, 0, G_TX_RENDERTILE, G_ON); gSPSetGeometryMode(gMasterDisp++, G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR); - Graphics_SetScaleMtx(item->scale); + Graphics_SetScaleMtx(this->scale); gSPDisplayList(gMasterDisp++, D_1019CA0); gSPClearGeometryMode(gMasterDisp++, G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR); } -void ItemGoldRing_Draw(Item* item) { +void ItemGoldRing_Draw(ItemGoldRing* this) { RCP_SetupDL(&gMasterDisp, 0x1D); gSPTexture(gMasterDisp++, 1900, 1700, 0, G_TX_RENDERTILE, G_ON); gSPSetGeometryMode(gMasterDisp++, G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR); - Graphics_SetScaleMtx(item->scale); + Graphics_SetScaleMtx(this->scale); gSPDisplayList(gMasterDisp++, D_1016870); gSPClearGeometryMode(gMasterDisp++, G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR); } -void ItemBomb_Draw(Item* item) { +void ItemBomb_Draw(ItemBomb* this) { if (gCurrentLevel == LEVEL_AQUAS) { - Graphics_SetScaleMtx(item->scale); + Graphics_SetScaleMtx(this->scale); gSPDisplayList(gMasterDisp++, D_blue_marine_3005980); } else { - Graphics_SetScaleMtx(item->scale * 0.1f); + Graphics_SetScaleMtx(this->scale * 0.1f); RCP_SetupDL(&gMasterDisp, 0x1D); gSPTexture(gMasterDisp++, 2000, 2000, 0, G_TX_RENDERTILE, G_ON); gSPSetGeometryMode(gMasterDisp++, G_TEXTURE_GEN); @@ -835,8 +835,8 @@ void ItemBomb_Draw(Item* item) { } } -void ItemLasers_Draw(Item* item) { - Graphics_SetScaleMtx(item->scale * 0.1f); +void ItemLasers_Draw(ItemLasers* this) { + Graphics_SetScaleMtx(this->scale * 0.1f); RCP_SetupDL(&gMasterDisp, 0x1D); gSPTexture(gMasterDisp++, 2000, 2000, 0, G_TX_RENDERTILE, G_ON); gSPSetGeometryMode(gMasterDisp++, G_TEXTURE_GEN); @@ -847,16 +847,16 @@ void ItemLasers_Draw(Item* item) { gSPDisplayList(gMasterDisp++, D_101A8E0); } -void ItemMeteoWarp_Draw(Item* item) { +void ItemMeteoWarp_Draw(ItemMeteoWarp* this) { s32 i; - item->obj.rot.y = (Math_Atan2F(gPlayer[gPlayerNum].camEye.x - item->obj.pos.x, - gPlayer[gPlayerNum].camEye.z - (item->obj.pos.z + D_ctx_80177D20)) * + this->obj.rot.y = (Math_Atan2F(gPlayer[gPlayerNum].camEye.x - this->obj.pos.x, + gPlayer[gPlayerNum].camEye.z - (this->obj.pos.z + D_ctx_80177D20)) * 180.0f) / M_PI; - if (item->state != 0) { + if (this->state != 0) { RCP_SetupDL(&gMasterDisp, 0x29); - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, item->unk_44); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, this->unk_44); } else { RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } @@ -864,7 +864,7 @@ void ItemMeteoWarp_Draw(Item* item) { for (i = 0; i < 7; i++) { Matrix_Push(&gGfxMatrix); Matrix_RotateZ(gGfxMatrix, (i * 360.0f / 7.0f) * M_DTOR, 1); - Matrix_Translate(gGfxMatrix, 0.0f, item->scale, 0.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, this->scale, 0.0f, 1); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_102FE80); Matrix_Pop(&gGfxMatrix); @@ -940,22 +940,22 @@ void func_edisplay_8005D3CC(Object* obj, f32 xRot, f32 yRot, f32 zRot, s32 drawT } } -void Object_80_Draw(Object_80* obj80, s32 arg1) { - obj80->obj.pos.y += gCameraShakeY; - func_edisplay_8005D008(&obj80->obj, obj80->info.drawType); - obj80->obj.pos.y -= gCameraShakeY; - if (obj80->info.drawType == 0) { - if ((obj80->obj.id == OBJ_80_19) || (obj80->obj.id == OBJ_80_55) || (obj80->obj.id == OBJ_80_9) || - (obj80->obj.id == OBJ_80_50)) { +void Object_80_Draw(Object_80* this, s32 arg1) { + this->obj.pos.y += gCameraShakeY; + func_edisplay_8005D008(&this->obj, this->info.drawType); + this->obj.pos.y -= gCameraShakeY; + if (this->info.drawType == 0) { + if ((this->obj.id == OBJ_80_19) || (this->obj.id == OBJ_80_55) || (this->obj.id == OBJ_80_9) || + (this->obj.id == OBJ_80_50)) { RCP_SetupDL_57(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); if (arg1 < 0) { func_edisplay_800596C0(); } - gSPDisplayList(gMasterDisp++, obj80->info.dList); + gSPDisplayList(gMasterDisp++, this->info.dList); RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } else { - if (obj80->obj.id == OBJ_80_8) { + if (this->obj.id == OBJ_80_8) { if (arg1 < 0) { return; // weird control flow } @@ -965,79 +965,79 @@ void Object_80_Draw(Object_80* obj80, s32 arg1) { if (arg1 < 0) { func_edisplay_800596C0(); } - gSPDisplayList(gMasterDisp++, obj80->info.dList); - if (obj80->obj.id == OBJ_80_8) { + gSPDisplayList(gMasterDisp++, this->info.dList); + if (this->obj.id == OBJ_80_8) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } } - } else if (obj80->info.draw != NULL) { + } else if (this->info.draw != NULL) { func_edisplay_800597C0(arg1); - obj80->info.draw(&obj80->obj); + this->info.draw(&this->obj); } } -void Object_4C_Draw(Object_4C* obj4C, s32 arg1) { +void Sprite_Draw(Sprite* this, s32 arg1) { if (arg1 >= 0) { - obj4C->obj.pos.y += gCameraShakeY; - func_edisplay_8005D008(&obj4C->obj, 0); - obj4C->obj.pos.y -= gCameraShakeY; - if (obj4C->info.drawType == 0) { - gSPDisplayList(gMasterDisp++, obj4C->info.dList); - } else if (obj4C->info.draw != NULL) { - obj4C->info.draw(&obj4C->obj); + this->obj.pos.y += gCameraShakeY; + func_edisplay_8005D008(&this->obj, 0); + this->obj.pos.y -= gCameraShakeY; + if (this->info.drawType == 0) { + gSPDisplayList(gMasterDisp++, this->info.dList); + } else if (this->info.draw != NULL) { + this->info.draw(&this->obj); } } } -void Actor_DrawOnRails(Actor* actor) { +void Actor_DrawOnRails(Actor* this) { Vec3f sp34 = { 0.0f, 0.0f, 0.0f }; - if (actor->info.draw != NULL) { - switch (actor->obj.id) { + if (this->info.draw != NULL) { + switch (this->obj.id) { case OBJ_ACTOR_194: - Actor194_Draw(actor); + Actor194_Draw(this); return; case OBJ_ACTOR_236: - Zoness_80190F08(actor); + Zoness_80190F08(this); return; } - if ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0B4 == EINFO_200)) { - Actor194_Draw(actor); + if ((this->obj.id == OBJ_ACTOR_EVENT) && (this->unk_0B4 == EINFO_200)) { + Actor194_Draw(this); } else { - if (actor->info.unk_19 != 0) { - actor->obj.pos.y += gCameraShakeY; - func_edisplay_8005D008(&actor->obj, actor->info.drawType); - actor->obj.pos.y -= gCameraShakeY; - } else if ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0B4 != EINFO_31)) { - func_edisplay_8005D3CC(&actor->obj, actor->vwork[29].x, actor->vwork[29].y, - actor->vwork[29].z + actor->unk_0F4.z, actor->info.drawType); + if (this->info.unk_19 != 0) { + this->obj.pos.y += gCameraShakeY; + func_edisplay_8005D008(&this->obj, this->info.drawType); + this->obj.pos.y -= gCameraShakeY; + } else if ((this->obj.id == OBJ_ACTOR_EVENT) && (this->unk_0B4 != EINFO_31)) { + func_edisplay_8005D3CC(&this->obj, this->vwork[29].x, this->vwork[29].y, + this->vwork[29].z + this->unk_0F4.z, this->info.drawType); } else { - func_edisplay_8005D008(&actor->obj, actor->info.drawType); + func_edisplay_8005D008(&this->obj, this->info.drawType); } - if (actor->info.drawType == 0) { - gSPDisplayList(gMasterDisp++, actor->info.dList); - func_edisplay_8005F1EC(actor->sfxSource); + if (this->info.drawType == 0) { + gSPDisplayList(gMasterDisp++, this->info.dList); + func_edisplay_8005F1EC(this->sfxSource); } else { - actor->info.draw(&actor->obj); - func_edisplay_8005F1EC(actor->sfxSource); - if (((actor->obj.id == OBJ_ACTOR_TEAM_BOSS) || - ((actor->obj.id == OBJ_ACTOR_SLIPPY_SX) && (actor->unk_0B6 > 0))) && - (D_display_80161410 > 0)) { - Matrix_MultVec3f(gGfxMatrix, &sp34, &D_ctx_80177E98[actor->aiType]); + this->info.draw(&this->obj); + func_edisplay_8005F1EC(this->sfxSource); + if (((this->obj.id == OBJ_ACTOR_TEAM_BOSS) || + ((this->obj.id == OBJ_ACTOR_SLIPPY_SX) && (this->unk_0B6 > 0))) && + (gReflectY > 0)) { + Matrix_MultVec3f(gGfxMatrix, &sp34, &gTeamArrowsViewPos[this->aiType]); } } - if ((actor->timer_0CA[0] != 0) && (D_display_80161410 > 0)) { - sp34.y += actor->info.unk_1C; + if ((this->timer_0CA[0] != 0) && (gReflectY > 0)) { + sp34.y += this->info.unk_1C; Matrix_MultVec3f(gGfxMatrix, &sp34, &D_display_80161578[0]); if (D_display_80161578[0].z > -200.0f) { - actor->timer_0CA[0] = 0; + this->timer_0CA[0] = 0; } } } } } -void Actor_DrawAllRange(Actor* actor) { +void Actor_DrawAllRange(Actor* this) { s32 var_v1; Vec3f sp50 = { 0.0f, 0.0f, 0.0f }; f32 var_fa1; @@ -1046,40 +1046,40 @@ void Actor_DrawAllRange(Actor* actor) { f32 var_fv1; D_edisplay_801615EC = 0; - if (actor->info.drawType == 2) { + if (this->info.drawType == 2) { Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, D_ctx_80177D20, 1); - Matrix_Translate(gCalcMatrix, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 0); + Matrix_Translate(gCalcMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0); Matrix_Push(&gGfxMatrix); Matrix_Mult(gGfxMatrix, gCalcMatrix, 1); Matrix_MultVec3f(gGfxMatrix, &sp50, &D_edisplay_801615E0); Matrix_Pop(&gGfxMatrix); var_fv0 = 0.0f; var_fv1 = -12000.0f; - if ((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->aiType >= AI360_GREAT_FOX)) { + if ((this->obj.id == OBJ_ACTOR_ALLRANGE) && (this->aiType >= AI360_GREAT_FOX)) { var_fv0 = 1000.0f; var_fv1 = -25000.0f; } if ((var_fv0 > D_edisplay_801615E0.z) && (D_edisplay_801615E0.z > var_fv1)) { if (fabsf(D_edisplay_801615E0.x) < (fabsf(D_edisplay_801615E0.z * 0.5f) + 500.0f)) { if (fabsf(D_edisplay_801615E0.y) < (fabsf(D_edisplay_801615E0.z * 0.5f) + 500.0f)) { - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, 1); - actor->info.draw(&actor->obj); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, 1); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, 1); + this->info.draw(&this->obj); D_edisplay_801615EC = 1; - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) && (actor->obj.id == OBJ_ACTOR_ALLRANGE) && - (actor->aiType == AI360_MISSILE)) { - D_ctx_80177E98[0] = D_edisplay_801615E0; + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) && (this->obj.id == OBJ_ACTOR_ALLRANGE) && + (this->aiType == AI360_MISSILE)) { + gTeamArrowsViewPos[0] = D_edisplay_801615E0; } } } } } else { - Matrix_Translate(gGfxMatrix, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 1); + Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1); Matrix_MultVec3f(gGfxMatrix, &sp50, &D_edisplay_801615E0); if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_0) || - ((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->aiType >= AI360_GREAT_FOX)) || - ((actor->obj.id == OBJ_ACTOR_195) && (actor->info.bonus != 0))) { + ((this->obj.id == OBJ_ACTOR_ALLRANGE) && (this->aiType >= AI360_GREAT_FOX)) || + ((this->obj.id == OBJ_ACTOR_195) && (this->info.bonus != 0))) { var_ft5 = var_fv0 = 3000.0f; var_fv1 = -29000.0f; var_fa1 = 0.7f; @@ -1092,19 +1092,19 @@ void Actor_DrawAllRange(Actor* actor) { if ((var_fv0 > D_edisplay_801615E0.z) && (D_edisplay_801615E0.z > var_fv1)) { if (fabsf(D_edisplay_801615E0.x) < (fabsf(D_edisplay_801615E0.z * var_fa1) + var_ft5)) { if (fabsf(D_edisplay_801615E0.y) < (fabsf(D_edisplay_801615E0.z * var_fa1) + var_ft5)) { - if (actor->info.draw != NULL) { - Matrix_RotateY(gGfxMatrix, actor->obj.rot.y * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, actor->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gGfxMatrix, actor->obj.rot.z * M_DTOR, 1); + if (this->info.draw != NULL) { + Matrix_RotateY(gGfxMatrix, this->obj.rot.y * M_DTOR, 1); + Matrix_RotateX(gGfxMatrix, this->obj.rot.x * M_DTOR, 1); + Matrix_RotateZ(gGfxMatrix, this->obj.rot.z * M_DTOR, 1); Matrix_SetGfxMtx(&gMasterDisp); - actor->info.draw(&actor->obj); + this->info.draw(&this->obj); D_edisplay_801615EC = 1; if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) && - (((actor->obj.id == OBJ_ACTOR_ALLRANGE) && - ((actor->aiType <= AI360_PEPPY) || (actor->aiType == AI360_KATT) || - (actor->aiType == AI360_BILL))) || - (actor->obj.id == OBJ_ACTOR_TEAM_BOSS))) { - D_ctx_80177E98[actor->aiType] = D_edisplay_801615E0; + (((this->obj.id == OBJ_ACTOR_ALLRANGE) && + ((this->aiType <= AI360_PEPPY) || (this->aiType == AI360_KATT) || + (this->aiType == AI360_BILL))) || + (this->obj.id == OBJ_ACTOR_TEAM_BOSS))) { + gTeamArrowsViewPos[this->aiType] = D_edisplay_801615E0; } } } @@ -1112,25 +1112,25 @@ void Actor_DrawAllRange(Actor* actor) { } } if (D_edisplay_801615EC == 0) { - actor->timer_0CA[gPlayerNum] = 0; - if ((actor->obj.id == OBJ_ACTOR_189) || (actor->obj.id == OBJ_ACTOR_286)) { - Object_Kill(&actor->obj, actor->sfxSource); + this->timer_0CA[gPlayerNum] = 0; + if ((this->obj.id == OBJ_ACTOR_189) || (this->obj.id == OBJ_ACTOR_286)) { + Object_Kill(&this->obj, this->sfxSource); } } for (var_v1 = 0; var_v1 < gCamCount; var_v1++) { - if (actor->timer_0CA[var_v1] != 0) { + if (this->timer_0CA[var_v1] != 0) { D_display_80161578[var_v1] = D_edisplay_801615E0; - D_display_80161578[var_v1].y += actor->info.unk_1C; + D_display_80161578[var_v1].y += this->info.unk_1C; if ((var_v1 == gPlayerNum) && (D_display_80161578[var_v1].z > -300.0f)) { - actor->timer_0CA[var_v1] = 0; + this->timer_0CA[var_v1] = 0; } } } - func_edisplay_8005F290(actor->sfxSource, &D_edisplay_801615E0); - actor->iwork[24] = D_edisplay_801615EC; + func_edisplay_8005F290(this->sfxSource, &D_edisplay_801615E0); + this->iwork[24] = D_edisplay_801615EC; } -void Boss_Draw(Boss* boss, s32 arg1) { +void Boss_Draw(Boss* this, s32 arg1) { f32 var_fa1; f32 var_ft5; f32 var_fv0; @@ -1138,21 +1138,21 @@ void Boss_Draw(Boss* boss, s32 arg1) { f32 sp3C; Vec3f sp30 = { 0.0f, 0.0f, 0.0f }; - if (boss->info.unk_19 != 0) { - boss->obj.pos.y += boss->unk_068 + gCameraShakeY; - func_edisplay_8005D1F0(&boss->obj, boss->info.drawType); - boss->obj.pos.y -= boss->unk_068 + gCameraShakeY; + if (this->info.unk_19 != 0) { + this->obj.pos.y += this->unk_068 + gCameraShakeY; + func_edisplay_8005D1F0(&this->obj, this->info.drawType); + this->obj.pos.y -= this->unk_068 + gCameraShakeY; } else { - func_edisplay_8005D1F0(&boss->obj, boss->info.drawType); + func_edisplay_8005D1F0(&this->obj, this->info.drawType); } Matrix_MultVec3f(&D_edisplay_801615F0, &sp30, &D_edisplay_801615D0); - func_edisplay_8005F290(boss->sfxSource, &D_edisplay_801615D0); - if ((boss->obj.id == OBJ_BOSS_316) || (boss->obj.id == OBJ_BOSS_317)) { + func_edisplay_8005F290(this->sfxSource, &D_edisplay_801615D0); + if ((this->obj.id == OBJ_BOSS_316) || (this->obj.id == OBJ_BOSS_317)) { var_fa1 = 6000.0f; var_fv0 = 6000.0f; var_ft5 = 0.9f; var_fv1 = -20000.0f; - } else if (boss->obj.id == OBJ_BOSS_313) { + } else if (this->obj.id == OBJ_BOSS_313) { var_fv1 = -25000.0f; var_ft5 = 0.7f; var_fa1 = 3000.0f; @@ -1168,59 +1168,59 @@ void Boss_Draw(Boss* boss, s32 arg1) { if (fabsf(D_edisplay_801615D0.x) < (fabsf(D_edisplay_801615D0.z * var_ft5) + var_fa1)) { if (fabsf(D_edisplay_801615D0.y) < (fabsf(D_edisplay_801615D0.z * var_ft5) + var_fa1)) { sp3C = 1.0f; - if (boss->obj.id != OBJ_BOSS_309) { - if (boss->obj.id != OBJ_BOSS_316) { - func_edisplay_8005F670(&boss->obj.pos); + if (this->obj.id != OBJ_BOSS_309) { + if (this->obj.id != OBJ_BOSS_316) { + func_edisplay_8005F670(&this->obj.pos); } - if (boss->info.drawType != 2) { + if (this->info.drawType != 2) { Matrix_SetGfxMtx(&gMasterDisp); } if (arg1 < 0) { func_edisplay_800596C0(); } - boss->info.draw(&boss->obj); + this->info.draw(&this->obj); } } } } D_edisplay_801615D0.y = sp3C; - if (boss->obj.id == OBJ_BOSS_309) { - boss->vwork[30] = D_edisplay_801615D0; - func_edisplay_8005F670(&boss->obj.pos); + if (this->obj.id == OBJ_BOSS_309) { + this->vwork[30] = D_edisplay_801615D0; + func_edisplay_8005F670(&this->obj.pos); Matrix_SetGfxMtx(&gMasterDisp); - boss->info.draw(&boss->obj); + this->info.draw(&this->obj); } } -void Effect_DrawOnRails(Effect* effect, s32 arg1) { - if ((arg1 < 0) && (effect->obj.pos.y < 7.0f)) { +void Effect_DrawOnRails(Effect* this, s32 arg1) { + if ((arg1 < 0) && (this->obj.pos.y < 7.0f)) { return; } - if ((effect->obj.id == OBJ_EFFECT_353) || (effect->obj.id == OBJ_EFFECT_369)) { - func_edisplay_8005D3CC(&effect->obj, effect->unk_60.x, effect->unk_60.y, effect->unk_60.z, 0); - } else if (effect->info.unk_14 == -1) { - effect->obj.pos.y += gCameraShakeY; - func_edisplay_8005D008(&effect->obj, 0); - effect->obj.pos.y -= gCameraShakeY; + if ((this->obj.id == OBJ_EFFECT_353) || (this->obj.id == OBJ_EFFECT_369)) { + func_edisplay_8005D3CC(&this->obj, this->unk_60.x, this->unk_60.y, this->unk_60.z, 0); + } else if (this->info.unk_14 == -1) { + this->obj.pos.y += gCameraShakeY; + func_edisplay_8005D008(&this->obj, 0); + this->obj.pos.y -= gCameraShakeY; } else { - func_edisplay_8005D008(&effect->obj, 0); + func_edisplay_8005D008(&this->obj, 0); } - if (effect->info.draw != NULL) { - effect->info.draw(&effect->obj); + if (this->info.draw != NULL) { + this->info.draw(&this->obj); } } -void Effect_DrawAllRange(Effect* effect) { +void Effect_DrawAllRange(Effect* this) { Vec3f sp4C = { 0.0f, 0.0f, 0.0f }; Vec3f sp40; f32 var_fv0; u8 sp3B = 0; - if (effect->info.unk_14 == -1) { - Matrix_Translate(gGfxMatrix, effect->obj.pos.x, effect->obj.pos.y + gCameraShakeY, - effect->obj.pos.z + D_ctx_80177D20, 1); + if (this->info.unk_14 == -1) { + Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y + gCameraShakeY, this->obj.pos.z + D_ctx_80177D20, + 1); } else { - Matrix_Translate(gGfxMatrix, effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z + D_ctx_80177D20, 1); + Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + D_ctx_80177D20, 1); } Matrix_MultVec3f(gGfxMatrix, &sp4C, &sp40); if ((gCurrentLevel == LEVEL_SECTOR_Z) || (gCurrentLevel == LEVEL_BOLSE)) { @@ -1231,53 +1231,53 @@ void Effect_DrawAllRange(Effect* effect) { if ((sp40.z < 0.0f) && (var_fv0 < sp40.z)) { if (fabsf(sp40.x) < (fabsf(sp40.z * 0.5f) + 500.0f)) { if (fabsf(sp40.y) < (fabsf(sp40.z * 0.5f) + 500.0f)) { - if (effect->info.draw != NULL) { - Matrix_RotateY(gGfxMatrix, effect->obj.rot.y * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, effect->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gGfxMatrix, effect->obj.rot.z * M_DTOR, 1); + if (this->info.draw != NULL) { + Matrix_RotateY(gGfxMatrix, this->obj.rot.y * M_DTOR, 1); + Matrix_RotateX(gGfxMatrix, this->obj.rot.x * M_DTOR, 1); + Matrix_RotateZ(gGfxMatrix, this->obj.rot.z * M_DTOR, 1); Matrix_SetGfxMtx(&gMasterDisp); - effect->info.draw(&effect->obj); + this->info.draw(&this->obj); } sp3B = 1; } } } - func_edisplay_8005F290(effect->sfxSource, &sp40); - if ((sp3B == 0) && (effect->obj.id != OBJ_EFFECT_352) && (effect->obj.id != OBJ_EFFECT_373) && (!gVersusMode)) { - Object_Kill(&effect->obj, effect->sfxSource); + func_edisplay_8005F290(this->sfxSource, &sp40); + if ((sp3B == 0) && (this->obj.id != OBJ_EFFECT_352) && (this->obj.id != OBJ_EFFECT_373) && (!gVersusMode)) { + Object_Kill(&this->obj, this->sfxSource); } } -void Item_Draw(Item* item, s32 arg1) { +void Item_Draw(Item* this, s32 arg1) { Vec3f sp44 = { 0.0f, 0.0f, 0.0f }; Vec3f sp38; u8 var_v0; - Matrix_Translate(gGfxMatrix, item->obj.pos.x, item->obj.pos.y, item->obj.pos.z + D_ctx_80177D20, 1); + Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + D_ctx_80177D20, 1); Matrix_MultVec3f(gGfxMatrix, &sp44, &sp38); var_v0 = 0; if ((sp38.z < 0.0f) && (sp38.z > -12000.0f)) { if (fabsf(sp38.x) < (fabsf(sp38.z * 0.5f) + 500.0f)) { if (fabsf(sp38.y) < (fabsf(sp38.z * 0.5f) + 500.0f)) { - if (item->info.draw != NULL) { - Matrix_RotateY(gGfxMatrix, item->obj.rot.y * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, item->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gGfxMatrix, item->obj.rot.z * M_DTOR, 1); + if (this->info.draw != NULL) { + Matrix_RotateY(gGfxMatrix, this->obj.rot.y * M_DTOR, 1); + Matrix_RotateX(gGfxMatrix, this->obj.rot.x * M_DTOR, 1); + Matrix_RotateZ(gGfxMatrix, this->obj.rot.z * M_DTOR, 1); Matrix_SetGfxMtx(&gMasterDisp); - if (item->info.drawType == 0) { - gSPDisplayList(gMasterDisp++, item->info.dList); + if (this->info.drawType == 0) { + gSPDisplayList(gMasterDisp++, this->info.dList); } else { - item->info.draw(&item->obj); + this->info.draw(&this->obj); } } var_v0 = 1; } } } - func_edisplay_8005F290(item->sfxSource, &sp38); - if ((var_v0 == 0) && (gLevelMode == LEVELMODE_ALL_RANGE) && (gCamCount == 1) && (item->obj.id < 336) && + func_edisplay_8005F290(this->sfxSource, &sp38); + if ((var_v0 == 0) && (gLevelMode == LEVELMODE_ALL_RANGE) && (gCamCount == 1) && (this->obj.id < 336) && (gCurrentLevel != LEVEL_VENOM_ANDROSS)) { - Object_Kill(&item->obj, item->sfxSource); + Object_Kill(&this->obj, this->sfxSource); } } @@ -1303,7 +1303,7 @@ void func_edisplay_8005EA24(Actor* actor) { } else { gSPDisplayList(gMasterDisp++, D_KA_600DBC0); } - } else if ((actor->aiType < AI360_KATT) || (gCurrentLevel != LEVEL_FORTUNA)) { + } else if ((actor->aiType <= AI360_ANDREW) || (gCurrentLevel != LEVEL_FORTUNA)) { gSPDisplayList(gMasterDisp++, D_STAR_WOLF_F014310); } else if (gCurrentLevel == LEVEL_FORTUNA) { gSPDisplayList(gMasterDisp++, D_FO_6009F90); @@ -1418,7 +1418,7 @@ void func_edisplay_8005F290(f32* sfxSrc, Vec3f* pos) { Object_ClampSfxSource(sfxSrc); } -void Object_58_Draw(Object_58* obj58) { +void Object_58_Draw(Object_58* this) { Vec3f sp54 = { 0.0f, 0.0f, 0.0f }; Vec3f sp48; f32 sp44 = 1000.0f; @@ -1426,41 +1426,41 @@ void Object_58_Draw(Object_58* obj58) { f32 sp3C = 2000.0f; f32 sp38 = 0.5f; - if (obj58->obj.id == OBJ_80_156) { + if (this->obj.id == OBJ_80_156) { sp44 = 4000.0f; sp40 = -13000.0f; sp3C = 4500.0f; } else if (gCurrentLevel == LEVEL_VENOM_ANDROSS) { sp40 = -20000.0f; sp38 = 0.4f; - } else if (obj58->obj.id == OBJ_80_143) { + } else if (this->obj.id == OBJ_80_143) { sp44 = 6000.0f; sp40 = -20000.0f; sp3C = 6000.0f; sp38 = 0.9f; } if ((gLevelType == LEVELTYPE_PLANET) || (gCurrentLevel == LEVEL_BOLSE)) { - Matrix_Translate(gGfxMatrix, obj58->obj.pos.x, obj58->obj.pos.y + gCameraShakeY, obj58->obj.pos.z, 1); + Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y + gCameraShakeY, this->obj.pos.z, 1); } else { - Matrix_Translate(gGfxMatrix, obj58->obj.pos.x, obj58->obj.pos.y, obj58->obj.pos.z, 1); + Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1); } Matrix_MultVec3f(gGfxMatrix, &sp54, &sp48); if ((sp48.z < sp44) && (sp40 < sp48.z)) { if (fabsf(sp48.y) < (fabsf(sp48.z * sp38) + sp3C)) { if (fabsf(sp48.x) < (fabsf(sp48.z * sp38) + sp3C)) { - func_edisplay_8005F670(&obj58->obj.pos); - if (obj58->obj.id == OBJ_80_131) { - Matrix_RotateY(gGfxMatrix, obj58->obj.rot.y * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, obj58->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gGfxMatrix, obj58->obj.rot.z * M_DTOR, 1); + func_edisplay_8005F670(&this->obj.pos); + if (this->obj.id == OBJ_80_131) { + Matrix_RotateY(gGfxMatrix, this->obj.rot.y * M_DTOR, 1); + Matrix_RotateX(gGfxMatrix, this->obj.rot.x * M_DTOR, 1); + Matrix_RotateZ(gGfxMatrix, this->obj.rot.z * M_DTOR, 1); Matrix_RotateY(gGfxMatrix, M_PI / 2, 1); Matrix_Translate(gGfxMatrix, -551.0f, 0.0f, 0.0f, 1); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_VE2_6007650); } else { - Matrix_RotateY(gGfxMatrix, obj58->obj.rot.y * M_DTOR, 1); + Matrix_RotateY(gGfxMatrix, this->obj.rot.y * M_DTOR, 1); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, obj58->info.dList); + gSPDisplayList(gMasterDisp++, this->info.dList); } } } @@ -1542,7 +1542,7 @@ void Object_DrawAll(s32 arg0) { s32 pad[5]; // probably separate iterators for each loop Actor* actor; Boss* boss; - Object_4C* obj4C; + Sprite* sprite; Object_58* obj58; Item* item; Object_80* obj80; @@ -1559,7 +1559,7 @@ void Object_DrawAll(s32 arg0) { spAC.y = obj58->sfxSource[1]; spAC.z = obj58->sfxSource[2]; Matrix_MultVec3fNoTranslate(&D_BO_8019EE80, &spAC, &obj58->obj.pos); - obj58->obj.rot.y = gBosses[0].obj.rot.y + (*obj58).unk_54; + obj58->obj.rot.y = obj58->unk_54 + gBosses->obj.rot.y; } Matrix_Push(&gGfxMatrix); Object_58_Draw(obj58); @@ -1582,7 +1582,7 @@ void Object_DrawAll(s32 arg0) { } for (i = 0, boss = gBosses; i < ARRAY_COUNT(gBosses); i++, boss++) { if ((boss->obj.status >= OBJ_ACTIVE) && (boss->obj.id != OBJ_BOSS_310)) { - if (!(boss->timer_05C & 1)) { + if ((boss->timer_05C % 2) == 0) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } else { RCP_SetupDL_27(); @@ -1601,21 +1601,21 @@ void Object_DrawAll(s32 arg0) { } Lights_SetOneLight(&gMasterDisp, gLight1x, gLight1y, gLight1z, gLight1R, gLight1G, gLight1B, gAmbientR, gAmbientG, gAmbientB); - for (i = 0, obj4C = gObjects4C; i < ARRAY_COUNT(gObjects4C); i++, obj4C++) { - if ((obj4C->obj.status >= OBJ_ACTIVE) && func_enmy_80060FE4(&obj4C->obj.pos, -12000.0f)) { + for (i = 0, sprite = gSprites; i < ARRAY_COUNT(gSprites); i++, sprite++) { + if ((sprite->obj.status >= OBJ_ACTIVE) && func_enmy_80060FE4(&sprite->obj.pos, -12000.0f)) { Matrix_Push(&gGfxMatrix); - if ((obj4C->obj.id == OBJ_4C_165) || (obj4C->obj.id == OBJ_4C_166)) { + if ((sprite->obj.id == OBJ_SPRITE_CO_RUIN1) || (sprite->obj.id == OBJ_SPRITE_CO_RUIN2)) { RCP_SetupDL_57(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } else { RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } - Object_4C_Draw(obj4C, arg0); + Sprite_Draw(sprite, arg0); Matrix_Pop(&gGfxMatrix); } } for (i = 0, actor = gActors; i < ARRAY_COUNT(gActors); i++, actor++) { if (actor->obj.status >= OBJ_ACTIVE) { - if (!(actor->timer_0C6 & 1)) { + if ((actor->timer_0C6 % 2) == 0) { if (gCurrentLevel == LEVEL_UNK_15) { RCP_SetupDL_23(); } else { @@ -1707,7 +1707,7 @@ void Effect_DrawAll(s32 arg0) { } for (i = 0, boss = gBosses; i < ARRAY_COUNT(gBosses); i++, boss++) { if ((boss->obj.status >= OBJ_ACTIVE) && (boss->obj.id == OBJ_BOSS_310)) { - if (!(boss->timer_05C & 1)) { + if ((boss->timer_05C % 2) == 0) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } else { RCP_SetupDL_27(); @@ -1721,10 +1721,10 @@ void Effect_DrawAll(s32 arg0) { } void Object_Draw(s32 arg0) { - D_display_80161410 = 1; + gReflectY = 1; Object_DrawAll(1); - if ((D_ctx_80161A88 == 2) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2)) { - D_display_80161410 = -1; + if ((gGroundType == GROUNDTYPE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2)) { + gReflectY = -1; Lights_SetOneLight(&gMasterDisp, gLight1x, -1 * gLight1y, gLight1z, gLight1R, gLight1G, gLight1B, gAmbientR, gAmbientG, gAmbientB); Matrix_Push(&gGfxMatrix); @@ -1738,16 +1738,16 @@ void Object_Draw(s32 arg0) { void Effect_Draw(u8 arg0) { if (arg0 == 0) { - D_display_80161410 = 1; + gReflectY = 1; Effect_DrawAll(1); - } else if ((D_ctx_80161A88 == 2) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2)) { - D_display_80161410 = -1; + } else if ((gGroundType == GROUNDTYPE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2)) { + gReflectY = -1; Matrix_Push(&gGfxMatrix); Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, 1); Effect_DrawAll(-1); Matrix_Pop(&gGfxMatrix); } - D_display_80161410 = 1; + gReflectY = 1; } Vtx D_edisplay_800CFD40[] = { @@ -1785,7 +1785,7 @@ void TexturedLine_Draw(void) { Matrix_Scale(gGfxMatrix, texLine->unk_28, texLine->unk_28, texLine->unk_24, 1); if ((gCurrentLevel == LEVEL_AQUAS) || (gCurrentLevel == LEVEL_VENOM_ANDROSS)) { - s32 alpha = (gGameFrameCount & 1) ? 180 : 50; + s32 alpha = ((gGameFrameCount % 2) != 0) ? 180 : 50; gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, alpha); if (gCurrentLevel == LEVEL_AQUAS) { diff --git a/src/engine/fox_effect.c b/src/engine/fox_effect.c index c1c712ce..6aca85e3 100644 --- a/src/engine/fox_effect.c +++ b/src/engine/fox_effect.c @@ -252,7 +252,7 @@ void func_effect_80077B84(Effect* effect) { if (gCurrentLevel == LEVEL_BOLSE) { RCP_SetupDL(&gMasterDisp, 0x26); } - switch ((effect->index + gGameFrameCount) & 3) { + switch ((effect->index + gGameFrameCount) % 4U) { case 0: gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 0, 0, effect->unk_44); break; @@ -332,13 +332,13 @@ static f32 D_800D1534[][10] = { void func_effect_800780F8(Effect* effect) { s32 i; - if (effect->unk_4A >= 11) { - if (!((effect->index + gGameFrameCount) & 1)) { + if (effect->unk_4A > 10) { + if (((effect->index + gGameFrameCount) % 2) == 0) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 128, 128, 32); } else { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 128, 128, 128); } - } else if (!((effect->index + gGameFrameCount) & 1)) { + } else if (((effect->index + gGameFrameCount) % 2) == 0) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); } else { gDPSetPrimColor(gMasterDisp++, 0, 0, 96, 96, 255, 255); @@ -456,7 +456,7 @@ void func_effect_80078AE0(void* effect) { void func_effect_80078AEC(Effect* effect) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 180); - Graphics_SetScaleMtx(effect->scale2 * (13.0f + ((gGameFrameCount & 1) * 2.5f))); + Graphics_SetScaleMtx(effect->scale2 * (13.0f + ((s32) (gGameFrameCount % 2U) * 2.5f))); gSPDisplayList(gMasterDisp++, D_102ED50); } @@ -472,7 +472,7 @@ void func_effect_80078BE0(Effect* effect) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 160); var_fv0 = 3.0f; - if (gGameFrameCount & 1) { + if ((gGameFrameCount % 2) != 0) { var_fv0 *= 1.2f; } Graphics_SetScaleMtx(effect->scale2 * var_fv0); @@ -667,7 +667,7 @@ void func_effect_8007968C(Effect* effect) { Object_Kill(&effect->obj, effect->sfxSource); } } else { - if (!(gGameFrameCount & 3)) { + if (((gGameFrameCount % 4) == 0)) { func_effect_8007D2C8(effect->obj.pos.x, effect->obj.pos.y + 550.0f, effect->obj.pos.z, 10.0f); } if ((effect->timer_50 == 0) || (effect->obj.pos.y < (gGroundLevel - 100.0f))) { @@ -683,7 +683,7 @@ void func_effect_8007968C(Effect* effect) { effect->vel.y -= 0.5f; } - if ((gCurrentLevel == LEVEL_BOLSE) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) && (gCsFrameCount >= 176)) { + if ((gCurrentLevel == LEVEL_BOLSE) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) && (gCsFrameCount > 175)) { effect->vel.x *= 0.95f; effect->vel.y *= 0.95f; effect->vel.z *= 0.95f; @@ -726,7 +726,7 @@ void func_effect_800798F0(Effect* effect) { case LEVEL_MACBETH: switch (effect->unk_44) { case 1: - if (effect->index & 1) { + if ((effect->index % 2) != 0) { gSPDisplayList(gMasterDisp++, D_MA_6022530); } else { gSPDisplayList(gMasterDisp++, D_MA_6022450); @@ -735,7 +735,7 @@ void func_effect_800798F0(Effect* effect) { case 2: RCP_SetupDL(&gMasterDisp, 0x39); - if (effect->index & 1) { + if ((effect->index % 2) != 0) { gSPDisplayList(gMasterDisp++, D_MA_601A7A0); } else { gSPDisplayList(gMasterDisp++, D_MA_60223C0); @@ -812,7 +812,7 @@ void func_effect_800798F0(Effect* effect) { break; default: - if (effect->index & 1) { + if ((effect->index % 2) != 0) { gSPDisplayList(gMasterDisp++, D_10194C0); } else { gSPDisplayList(gMasterDisp++, D_1024290); @@ -830,7 +830,7 @@ void func_effect_800798F0(Effect* effect) { default: switch (effect->unk_4C) { case 0: - if (effect->index & 1) { + if ((effect->index % 2) != 0) { gSPDisplayList(gMasterDisp++, D_10194C0); } else { gSPDisplayList(gMasterDisp++, D_1024290); @@ -838,7 +838,7 @@ void func_effect_800798F0(Effect* effect) { break; case 1: - switch (effect->index & 3) { + switch ((s32) (effect->index % 4U)) { case 0: Matrix_Scale(gGfxMatrix, 1.0f, 0.3f, 1.0f, 1); break; @@ -875,18 +875,18 @@ void func_effect_8007A28C(Effect* effect) { effect->obj.rot.y += 1.0f; Math_SmoothStepToF(&effect->scale2, effect->scale1, 0.05f, 1.5f, 0.001f); - if (effect->timer_50 >= 11) { + if (effect->timer_50 > 10) { D_ctx_801779A8[0] = 60.0f; } if (effect->timer_50 == 48) { - D_ctx_80178340 = 150; + gFillScreenAlpha = 150; } if (effect->timer_50 > 45) { - D_ctx_80178358 = 0; - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255; + gFillScreenAlphaTarget = 0; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; } - D_ctx_8017835C = 3; + gFillScreenAlphaStep = 3; if (effect->timer_50 == 0) { effect->unk_44 -= 2; @@ -899,7 +899,7 @@ void func_effect_8007A28C(Effect* effect) { } void func_effect_8007A3C0(Effect* effect) { - if (D_display_80161410 > 0) { + if (gReflectY > 0) { Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, 1); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL_64_2(); @@ -1026,9 +1026,9 @@ void func_effect_8007A994(Effect* effect) { effect->obj.rot.z += effect->unk_60.z; effect->vel.y += effect->unk_60.y; - if (effect->unk_4A & 1) { + if ((effect->unk_4A % 2) != 0) { effect->unk_48++; - if (effect->unk_48 >= 6) { + if (effect->unk_48 > 5) { effect->unk_48 = 5; } } @@ -1408,8 +1408,8 @@ void func_effect_8007B9DC(Effect* effect) { if (gCurrentLevel != LEVEL_MACBETH) { gDPSetPrimColor(gMasterDisp++, 0, 0, 140, 99, 58, effect->unk_4A); } else { - gDPSetPrimColor(gMasterDisp++, 0, 0, (gGameFrameCount & 3) + 5, (gGameFrameCount & 3) + 3, - (gGameFrameCount & 3) + 3, 220); + gDPSetPrimColor(gMasterDisp++, 0, 0, (gGameFrameCount % 4U) + 5, (gGameFrameCount % 4U) + 3, + (gGameFrameCount % 4U) + 3, 220); } //! DEBUG: Hold Z on controller 4 to set up a display list. if (!(gControllerHold[3].button & A_BUTTON)) { @@ -1648,7 +1648,7 @@ void func_effect_8007C50C(Effect* effect) { f32 randY; f32 randOther; - if (!(effect->timer_50 & 7)) { + if ((effect->timer_50 % 8) == 0) { randX = RAND_FLOAT_CENTERED(40.0f) * effect->scale2; randY = RAND_FLOAT_CENTERED(40.0f) * effect->scale2; randOther = RAND_FLOAT(1.0f) + 1.0f; @@ -2117,7 +2117,7 @@ void func_effect_8007D8A8(Effect* effect) { Object_Kill(&effect->obj, effect->sfxSource); } } - if (effect->unk_4C >= 16) { + if (effect->unk_4C > 15) { effect->unk_44 -= 20; } } @@ -2188,7 +2188,7 @@ void func_effect_8007DB70(Effect* effect) { func_effect_8007D0E0(effect->obj.pos.x, effect->obj.pos.y + 30.0f, effect->obj.pos.z, 7.0f); func_effect_8007BFFC(effect->obj.pos.x, effect->obj.pos.y + 30.0f, effect->obj.pos.z, 0.0f, 0.0f, 0.0f, 4.0f, 5); - if ((effect->obj.pos.y < (gGroundLevel + 10.0f)) || (D_ctx_80161A88 != 2)) { + if ((effect->obj.pos.y < (gGroundLevel + 10.0f)) || (gGroundType != GROUNDTYPE_WATER)) { func_beam_800365E4(effect->obj.pos.x, 3.0f, effect->obj.pos.z, effect->obj.pos.x, effect->obj.pos.z, 0.0f, 0.0f, 90.0f, 5.0f, 0, 0); break; @@ -2251,7 +2251,8 @@ void func_effect_8007E014(Effect* effect) { effect->obj.rot.z = RAD_TO_DEG(z); } - if (((effect->unk_44 == 1) || (effect->unk_44 == 3)) && ((effect->timer_50 & 3) == 1) && (Rand_ZeroOne() < 0.5f)) { + if (((effect->unk_44 == 1) || (effect->unk_44 == 3)) && ((s32) (effect->timer_50 % 4U) == 1) && + (Rand_ZeroOne() < 0.5f)) { func_effect_8007D10C(effect->obj.pos.x, effect->obj.pos.y + (effect->scale2 * 5.0f), effect->obj.pos.z + 3.0f, (RAND_FLOAT(0.7f) + 1.0f) * (effect->scale2 * 1.2f)); } @@ -2358,7 +2359,7 @@ void func_effect_8007E648(Effect* effect) { } } -void func_effect_8007E6B8(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPos, f32 arg5) { +void func_effect_8007E6B8(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPos, f32 speed) { f32 sp54; f32 sp50; f32 temp_ft4; @@ -2384,7 +2385,7 @@ void func_effect_8007E6B8(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPo sp40.x = 0.0f; sp40.y = 0.0f; - sp40.z = arg5; + sp40.z = speed; Matrix_MultVec3f(gCalcMatrix, &sp40, &sp34); @@ -2415,7 +2416,7 @@ void func_effect_8007E6B8(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPo AUDIO_PLAY_SFX(0x29002002, effect->sfxSource, 4); } -void func_effect_8007E93C(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPos, f32 arg5) { +void func_effect_8007E93C(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPos, f32 speed) { f32 sp54; f32 sp50; f32 temp_ft4; @@ -2441,7 +2442,7 @@ void func_effect_8007E93C(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPo sp40.x = 0.0f; sp40.y = 0.0f; - sp40.z = arg5; + sp40.z = speed; Matrix_MultVec3f(gCalcMatrix, &sp40, &sp34); @@ -2577,14 +2578,14 @@ void func_effect_8007F04C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 xRot } } -void func_effect_8007F11C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 arg4) { +void func_effect_8007F11C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 speed) { s32 i; if ((fabsf(zPos - gPlayer[0].unk_138) > 300.0f) || (fabsf(xPos - gPlayer[0].pos.x) > 300.0f)) { for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { Matrix_Push(&gCalcMatrix); - func_effect_8007E6B8(&gEffects[i], objId, xPos, yPos, zPos, arg4); + func_effect_8007E6B8(&gEffects[i], objId, xPos, yPos, zPos, speed); Matrix_Pop(&gCalcMatrix); break; } @@ -2592,14 +2593,14 @@ void func_effect_8007F11C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 arg4 } } -void func_effect_8007F20C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 arg4) { +void func_effect_8007F20C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 speed) { s32 i; if ((fabsf(zPos - gPlayer[0].camEye.z) > 300.0f) || (fabsf(xPos - gPlayer[0].camEye.x) > 300.0f)) { for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { Matrix_Push(&gCalcMatrix); - func_effect_8007E93C(&gEffects[i], objId, xPos, yPos, zPos, arg4); + func_effect_8007E93C(&gEffects[i], objId, xPos, yPos, zPos, speed); Matrix_Pop(&gCalcMatrix); break; } @@ -2627,7 +2628,7 @@ void func_effect_8007F2FC(Effect* effect) { effect->obj.pos.z -= effect->vel.z * 0.5f; } - if ((effect->unk_44 == 1) && !(gGameFrameCount & 1)) { + if ((effect->unk_44 == 1) && ((gGameFrameCount % 2) == 0)) { func_effect_8007D0E0(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 1.5f); } } @@ -2678,7 +2679,7 @@ void func_effect_8007F5AC(Effect* effect) { effect->vel.x -= 0.5f; } - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { effect->unk_44--; if (effect->unk_44 < 20) { Object_Kill(&effect->obj, effect->sfxSource); @@ -2712,7 +2713,7 @@ void func_effect_8007F6B0(Effect* effect) { Object_Kill(&effect->obj, effect->sfxSource); } - if (!(gGameFrameCount & 3) && (effect->state == 0)) { + if (((gGameFrameCount % 4) == 0) && (effect->state == 0)) { randfloat = RAND_FLOAT(30.0f); for (i = 0; i < 36; i += 2) { temp = (i * 10.0f * M_DTOR) + randfloat; @@ -2759,7 +2760,7 @@ void func_effect_8007F958(Effect* effect) { return; } - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { randFloat = RAND_FLOAT(144.0f); for (i = 0; i < 5; i++) { temp = (i * 72.0f * M_DTOR) + randFloat; @@ -2800,7 +2801,7 @@ void func_effect_8007FBE0(Effect* effect) { Object_Kill(&effect->obj, effect->sfxSource); } - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { randFloat = RAND_FLOAT(144.0f); for (i = 0; i < 10; i++) { temp = (i * 36.0f * M_DTOR) + randFloat; @@ -2899,7 +2900,7 @@ void func_effect_8007FE88(Effect* effect) { } } else if (effect->obj.pos.y < gGroundLevel) { Object_Kill(&effect->obj, effect->sfxSource); - if (D_ctx_80161A88 != 2) { + if (gGroundType != GROUNDTYPE_WATER) { effect->obj.pos.y = gGroundLevel; func_effect_8007D074(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 2.0f); } @@ -2932,7 +2933,7 @@ void func_effect_800802F8(Effect* effect) { func_effect_8007FE88(effect); effect->obj.rot.z += 10.0f; effect->scale2 = 3.0f; - if (gGameFrameCount & 1) { + if ((gGameFrameCount % 2) != 0) { effect->scale2 = 3.5f; } } @@ -3030,7 +3031,7 @@ void func_effect_8008040C(Effect* effect) { } } else if (effect->obj.pos.y < gGroundLevel) { Object_Kill(&effect->obj, effect->sfxSource); - if (D_ctx_80161A88 != 2) { + if (gGroundType != GROUNDTYPE_WATER) { effect->obj.pos.y = gGroundLevel; func_effect_8007D074(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 2.0f); } @@ -3092,7 +3093,7 @@ void func_effect_80080ACC(Effect* effect) { } temp_ft2 = (((f32) effect->unk_44 / (f32) effect->unk_46) * 255.0f); effect->unk_48 = temp_ft2; - if (temp_ft2 >= 256) { + if (temp_ft2 > 255) { effect->unk_48 = 255; } if (effect->unk_48 < 32) { @@ -3266,7 +3267,7 @@ void func_effect_80080D04(Effect* effect) { D_800D18E4++; } - if (!((effect->index + gGameFrameCount) & 1)) { + if (((effect->index + gGameFrameCount) % 2) == 0) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); } else { gDPSetPrimColor(gMasterDisp++, 0, 0, 96, 96, 255, 255); @@ -3490,7 +3491,7 @@ void func_effect_80081C5C(Effect* effect) { break; } - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { func_effect_8007C484(RAND_FLOAT_CENTERED(50.0f) + effect->obj.pos.x, RAND_FLOAT_CENTERED(50.0f) + effect->obj.pos.y, RAND_FLOAT_CENTERED(50.0f) + effect->obj.pos.z, effect->vel.x, effect->vel.y, @@ -3513,7 +3514,7 @@ void func_effect_80081C5C(Effect* effect) { effect->unk_60.z += 10.0f; effect->vel.z = 5.0f; - if (!(gGameFrameCount & 7)) { + if (((gGameFrameCount % 8) == 0)) { effect->unk_44++; effect->unk_44 &= 1; } @@ -3556,7 +3557,7 @@ void func_effect_80081C5C(Effect* effect) { break; } - if (!(gGameFrameCount & 3)) { + if (((gGameFrameCount % 4) == 0)) { func_effect_8007C120((RAND_FLOAT_CENTERED(effect->scale2) * 50.0f) + effect->obj.pos.x, (RAND_FLOAT_CENTERED(effect->scale2) * 50.0f) + effect->obj.pos.y, (RAND_FLOAT_CENTERED(effect->scale2) * 50.0f) + effect->obj.pos.z, effect->vel.x, @@ -3614,7 +3615,7 @@ void func_effect_80081C5C(Effect* effect) { case 7: switch (gCurrentLevel) { case LEVEL_AQUAS: - if (!(gGameFrameCount & 3)) { + if (((gGameFrameCount % 4) == 0)) { func_effect_80081A8C(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, effect->scale2, 6); } @@ -3628,7 +3629,7 @@ void func_effect_80081C5C(Effect* effect) { break; case LEVEL_ZONESS: - if (!(gGameFrameCount & 3)) { + if (((gGameFrameCount % 4) == 0)) { // clang-format off func_effect_80081A8C(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, effect->scale2 * 3.0f, 6); // clang-format on @@ -3677,10 +3678,10 @@ void func_effect_80081C5C(Effect* effect) { gEffects[ARRAY_COUNT(gEffects) - 1].obj.status = gEffects[ARRAY_COUNT(gEffects) - 2].obj.status = OBJ_FREE; func_effect_80081BEC(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 1.0f, 10); - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255; - D_ctx_80178340 = D_ctx_80178358 = 255; - D_ctx_80178358 = 0; - D_ctx_8017835C = 25; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; + gFillScreenAlpha = gFillScreenAlphaTarget = 255; + gFillScreenAlphaTarget = 0; + gFillScreenAlphaStep = 25; effect->timer_50 = 10; D_800D18EC = 0.0f; D_800D18E8 = 0.0f; @@ -3693,8 +3694,8 @@ void func_effect_80081C5C(Effect* effect) { case 1: Math_SmoothStepToF(&effect->scale2, 8.0f, 0.1f, 1.0f, 0.00001f); if (effect->timer_50 == 0) { - if (D_ctx_80178340 != 0) { - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = D_ctx_80178340 = 0; + if (gFillScreenAlpha != 0) { + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 0; } effect->timer_50 = gBosses[0].timer_050; effect->unk_44++; @@ -3748,20 +3749,20 @@ void func_effect_80081C5C(Effect* effect) { case 0: D_ctx_801779A8[0] = 50.0f; if (effect->unk_46 == 10) { - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255; - D_ctx_80178340 = D_ctx_80178358 = 255; - D_ctx_80178358 = 0; - D_ctx_8017835C = 25; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; + gFillScreenAlpha = gFillScreenAlphaTarget = 255; + gFillScreenAlphaTarget = 0; + gFillScreenAlphaStep = 25; gCameraShake = 50; } if (effect->unk_46 == 0) { - D_ctx_80178348 = (D_ctx_80178350 = (D_ctx_80178354 = (D_ctx_80178340 = 0))); + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 0; effect->unk_46 = 50; } if (effect->unk_46 != 0) { effect->unk_46 -= 1; } - if ((!(gGameFrameCount & 0xF)) && (effect->timer_50 == 0)) { + if ((((gGameFrameCount % 16) == 0)) && (effect->timer_50 == 0)) { D_800D18EC = RAD_TO_DEG(Math_Atan2F(gPlayer[0].camEye.x - gBosses[0].obj.pos.x, gPlayer[0].camEye.z - (gBosses[0].obj.pos.z + D_ctx_80177D20))); @@ -3940,7 +3941,7 @@ void func_effect_80082F78(Effect* effect) { break; case 10: - if (D_ctx_80177854 != 100) { + if (gPlayState != PLAY_PAUSE) { Texture_Scroll(D_A6_6012840, 16, 16, 0); } RCP_SetupDL(&gMasterDisp, 0x35); diff --git a/src/engine/fox_enmy.c b/src/engine/fox_enmy.c index ac05bc6f..d5d7a43a 100644 --- a/src/engine/fox_enmy.c +++ b/src/engine/fox_enmy.c @@ -20,10 +20,10 @@ #include "assets/ast_zoness.h" s32 D_enmy_Timer_80161670[4]; -s32 D_enmy_80161680; -u8 D_enmy_80161684; +s32 gLastPathChange; +u8 gMissedZoSearchlight; -ObjectInit* D_enmy_800CFDA0[] = { +ObjectInit* gLevelObjectInits[] = { D_CO_60371A4, D_ME_6026CC4, D_SX_602A164, D_A6_6023F64, D_A6_60287A4, D_SY_602E4F4, D_VE1_6007E74, D_SO_601F234, D_ZO_6026714, D_ANDROSS_C035154, D_TR_6006AA4, D_MA_6031000, D_TI_6006C60, D_AQ_602E5C8, D_FO_600EAD4, NULL, D_KA_6011044, D_BO_600FF74, D_SZ_6006EB4, D_VE2_6014D94, D_versus_302DE3C, @@ -148,11 +148,11 @@ void Object_80_Initialize(Object_80* obj80) { } } -void Object_4C_Initialize(Object_4C* obj4C) { +void Sprite_Initialize(Sprite* sprite) { s32 i; - u8* ptr = (u8*) obj4C; + u8* ptr = (u8*) sprite; - for (i = 0; i < sizeof(Object_4C); i++, ptr++) { + for (i = 0; i < sizeof(Sprite); i++, ptr++) { *ptr = 0; } } @@ -210,18 +210,18 @@ void Object_80_Load(Object_80* obj80, ObjectInit* objInit) { Object_SetInfo(&obj80->info, obj80->obj.id); } -void Object_4C_Load(Object_4C* obj4C, ObjectInit* objInit) { - Object_4C_Initialize(obj4C); - obj4C->obj.status = OBJ_INIT; - obj4C->obj.pos.z = -objInit->zPos1; - obj4C->obj.pos.z += -3000.0f + objInit->zPos2; - obj4C->obj.pos.x = objInit->xPos; - obj4C->obj.pos.y = objInit->yPos; - obj4C->obj.rot.y = objInit->rot.y; - obj4C->obj.rot.x = objInit->rot.x; - obj4C->obj.rot.z = objInit->rot.z; - obj4C->obj.id = objInit->id; - Object_SetInfo(&obj4C->info, obj4C->obj.id); +void Sprite_Load(Sprite* sprite, ObjectInit* objInit) { + Sprite_Initialize(sprite); + sprite->obj.status = OBJ_INIT; + sprite->obj.pos.z = -objInit->zPos1; + sprite->obj.pos.z += -3000.0f + objInit->zPos2; + sprite->obj.pos.x = objInit->xPos; + sprite->obj.pos.y = objInit->yPos; + sprite->obj.rot.y = objInit->rot.y; + sprite->obj.rot.x = objInit->rot.x; + sprite->obj.rot.z = objInit->rot.z; + sprite->obj.id = objInit->id; + Object_SetInfo(&sprite->info, sprite->obj.id); } void Actor_Load(Actor* actor, ObjectInit* objInit) { @@ -369,12 +369,12 @@ 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 arg2) { +void func_enmy_80061F0C(Actor* actor, ObjectInit* objInit, s32 index) { Vec3f sp24; Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; - actor->index = arg2; + actor->index = index; actor->obj.pos.z = -objInit->zPos1; actor->obj.pos.z += -3000.0f + objInit->zPos2; actor->obj.pos.x = objInit->xPos; @@ -401,16 +401,16 @@ void func_enmy_80061F0C(Actor* actor, ObjectInit* objInit, s32 arg2) { sp24.z = actor->obj.pos.z - D_ctx_80177F10.z; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp24, &actor->vwork[28]); actor->iwork[9] = D_ctx_80177E78; - D_ctx_80177E70 = arg2; + D_ctx_80177E70 = index; Actor_Update(actor); } -void Object_Load(ObjectInit* objInit, f32 arg1, f32 arg2, f32 arg3, f32 arg4) { +void Object_Load(ObjectInit* objInit, f32 xMax, f32 xMin, f32 yMax, f32 yMin) { s32 i; - if ((arg1 > objInit->xPos - gPlayer[0].unk_0AC) && (objInit->xPos - gPlayer[0].unk_0AC > arg2) && - (arg3 > objInit->yPos - gPlayer[0].unk_0B0) && (objInit->yPos - gPlayer[0].unk_0B0 > arg4)) { - if (objInit->id < OBJ_4C_161) { + if ((xMax > objInit->xPos - gPlayer[0].unk_0AC) && (objInit->xPos - gPlayer[0].unk_0AC > xMin) && + (yMax > objInit->yPos - gPlayer[0].unk_0B0) && (objInit->yPos - gPlayer[0].unk_0B0 > yMin)) { + if (objInit->id < OBJ_SPRITE_CO_POLE) { for (i = 0; i < ARRAY_COUNT(gObjects80); i++) { if (gObjects80[i].obj.status == OBJ_FREE) { Object_80_Load(&gObjects80[i], objInit); @@ -418,10 +418,10 @@ void Object_Load(ObjectInit* objInit, f32 arg1, f32 arg2, f32 arg3, f32 arg4) { } } } - if ((objInit->id >= OBJ_4C_161) && (objInit->id < OBJ_ACTOR_176)) { - for (i = 0; i < ARRAY_COUNT(gObjects4C); i++) { - if (gObjects4C[i].obj.status == OBJ_FREE) { - Object_4C_Load(&gObjects4C[i], objInit); + if ((objInit->id >= OBJ_SPRITE_CO_POLE) && (objInit->id < OBJ_ACTOR_176)) { + for (i = 0; i < ARRAY_COUNT(gSprites); i++) { + if (gSprites[i].obj.status == OBJ_FREE) { + Sprite_Load(&gSprites[i], objInit); break; } } @@ -504,38 +504,38 @@ void Object_Load(ObjectInit* objInit, f32 arg1, f32 arg2, f32 arg3, f32 arg4) { } void func_enmy_80062568(void) { - ObjectInit* var_s1; + ObjectInit* objInit; s32 var_s0; s32 temp = gCurrentLevel; // seems fake if (1) {} - D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(D_enmy_800CFDA0[temp]); + gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[temp]); var_s0 = D_ctx_80177CA0 - 40; - var_s1 = &D_ctx_80178310[var_s0]; + objInit = &gLevelObjects[var_s0]; - for (; var_s0 < D_ctx_80177CA0; var_s0++, var_s1++) { - Object_Load(var_s1, 4000.0f, -4000.0f, 4000.0f, -4000.0f); + for (; var_s0 < D_ctx_80177CA0; var_s0++, objInit++) { + Object_Load(objInit, 4000.0f, -4000.0f, 4000.0f, -4000.0f); } } void func_enmy_80062664(void) { ObjectInit* objInit; - f32 var_fs1; - f32 var_fs2; - f32 var_fs3; - f32 var_fs4; + f32 xMax; + f32 xMin; + f32 yMax; + f32 yMin; s32 i; s32 j; - if ((gCurrentLevel == LEVEL_METEO) && (D_ctx_8017827C == 1)) { - D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(D_ME_602B148); - } else if ((gCurrentLevel == LEVEL_SECTOR_X) && (D_ctx_8017827C == 1)) { - D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(D_SX_602F18C); - } else if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (D_ctx_8017827C == 1)) { - D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(D_ANDROSS_C0356A4); - } else if ((gCurrentLevel == LEVEL_VENOM_1) && (D_ctx_8017827C == 1)) { - D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(D_VE1_6010088); + if ((gCurrentLevel == LEVEL_METEO) && (gLevelStage == 1)) { + gLevelObjects = SEGMENTED_TO_VIRTUAL(D_ME_602B148); + } else if ((gCurrentLevel == LEVEL_SECTOR_X) && (gLevelStage == 1)) { + gLevelObjects = SEGMENTED_TO_VIRTUAL(D_SX_602F18C); + } else if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gLevelStage == 1)) { + gLevelObjects = SEGMENTED_TO_VIRTUAL(D_ANDROSS_C0356A4); + } else if ((gCurrentLevel == LEVEL_VENOM_1) && (gLevelStage == 1)) { + gLevelObjects = SEGMENTED_TO_VIRTUAL(D_VE1_6010088); } else { - D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(D_enmy_800CFDA0[gCurrentLevel]); + gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]); } if (D_ctx_8017812C == 0) { for (j = 0; j < D_ctx_801782B8; j++) { @@ -547,37 +547,37 @@ void func_enmy_80062664(void) { } } if (gCurrentLevel == LEVEL_METEO) { - var_fs3 = var_fs1 = 10000.0f; - var_fs4 = var_fs2 = -10000.0f; + yMax = xMax = 10000.0f; + yMin = xMin = -10000.0f; } else if (gCurrentLevel == LEVEL_SECTOR_Y) { - var_fs3 = var_fs1 = 6000.0f; - var_fs4 = var_fs2 = -6000.0f; + yMax = xMax = 6000.0f; + yMin = xMin = -6000.0f; } else if (gCurrentLevel == LEVEL_VENOM_1) { - var_fs3 = var_fs1 = 3500.0f; - var_fs4 = var_fs2 = -3500.0f; + yMax = xMax = 3500.0f; + yMin = xMin = -3500.0f; } else { - var_fs3 = var_fs1 = 4000.0f; - var_fs4 = var_fs2 = -4000.0f; + yMax = xMax = 4000.0f; + yMin = xMin = -4000.0f; } if ((gPlayer[0].timer_210 != 0) && (gPlayer[0].unk_118 < 0.0f)) { - var_fs1 = 10000.0f; + xMax = 10000.0f; } if ((gPlayer[0].timer_210 != 0) && (gPlayer[0].unk_118 > 0.0f)) { - var_fs2 = -10000.0f; + xMin = -10000.0f; } - D_enmy_80161680 = 0; + gLastPathChange = 0; - for (i = 0, objInit = &D_ctx_80178310[D_ctx_80177DC8]; i < 10000; i++, D_ctx_80177DC8++, objInit++) { + for (i = 0, objInit = &gLevelObjects[D_ctx_80177DC8]; i < 10000; i++, D_ctx_80177DC8++, objInit++) { if ((objInit->id > OBJ_INVALID) && D_ctx_80177D20 <= objInit->zPos1 && objInit->zPos1 <= D_ctx_80177D20 + 200.0f) { if ((gCurrentLevel == LEVEL_VENOM_1) && (objInit->id >= ACTOR_EVENT_ID)) { if (((objInit->rot.y < 180.0f) && (objInit->xPos < gPlayer[0].unk_0AC)) || ((objInit->rot.y > 180.0f) && (gPlayer[0].unk_0AC < objInit->xPos))) { - Object_Load(objInit, var_fs1, var_fs2, var_fs3, var_fs4); + Object_Load(objInit, xMax, xMin, yMax, yMin); } } else { - Object_Load(objInit, var_fs1, var_fs2, var_fs3, var_fs4); + Object_Load(objInit, xMax, xMin, yMax, yMin); } } else { break; @@ -797,7 +797,7 @@ bool func_enmy_8006326C(Vec3f* arg0, Vec3f* arg1, ObjectId objId, Object* obj) { s32 func_enmy_8006351C(s32 index, Vec3f* pos, Vec3f* arg2, s32 arg3) { Object_58* obj58; Object_80* obj80; - Object_4C* obj4C; + Sprite* sprite; Boss* boss; Actor* actor; Vec3f temp; @@ -837,13 +837,14 @@ s32 func_enmy_8006351C(s32 index, Vec3f* pos, Vec3f* arg2, s32 arg3) { } } } - obj4C = gObjects4C; - for (i = 0; i < ARRAY_COUNT(gObjects4C); i++, obj4C++) { - if ((obj4C->obj.status == OBJ_ACTIVE) && (fabsf(pos->x - obj4C->obj.pos.x) < 500.0f) && - (fabsf(pos->z - obj4C->obj.pos.z) < 500.0f) && - func_enmy_800631A8(pos, obj4C->info.hitbox, &obj4C->obj.pos)) { - if ((obj4C->obj.id == OBJ_4C_163) || (obj4C->obj.id == OBJ_4C_162) || (obj4C->obj.id == OBJ_4C_162)) { - obj4C->unk_46 = 1; + sprite = gSprites; + for (i = 0; i < ARRAY_COUNT(gSprites); i++, sprite++) { + if ((sprite->obj.status == OBJ_ACTIVE) && (fabsf(pos->x - sprite->obj.pos.x) < 500.0f) && + (fabsf(pos->z - sprite->obj.pos.z) < 500.0f) && + func_enmy_800631A8(pos, sprite->info.hitbox, &sprite->obj.pos)) { + if ((sprite->obj.id == OBJ_SPRITE_FO_POLE) || (sprite->obj.id == OBJ_SPRITE_CO_TREE) || + (sprite->obj.id == OBJ_SPRITE_CO_TREE)) { + sprite->unk_46 = 1; } return 0; } @@ -949,23 +950,23 @@ void func_enmy_80063D58(Object_80* obj80) { s32 i; obj80->obj.pos.y = gGroundLevel; - for (i = 0; i < ARRAY_COUNT(gObjects4C); i++) { - if (gObjects4C[i].obj.status == OBJ_FREE) { - Object_4C_Initialize(&gObjects4C[i]); - gObjects4C[i].obj.status = OBJ_INIT; - gObjects4C[i].obj.id = OBJ_4C_164; - gObjects4C[i].unk_45 = obj80->obj.id; - gObjects4C[i].obj.pos.x = obj80->obj.pos.x; - gObjects4C[i].obj.pos.y = 5.0f; - gObjects4C[i].obj.pos.z = obj80->obj.pos.z; + for (i = 0; i < ARRAY_COUNT(gSprites); i++) { + if (gSprites[i].obj.status == OBJ_FREE) { + Sprite_Initialize(&gSprites[i]); + gSprites[i].obj.status = OBJ_INIT; + gSprites[i].obj.id = OBJ_SPRITE_FOG_SHADOW; + gSprites[i].unk_45 = obj80->obj.id; + gSprites[i].obj.pos.x = obj80->obj.pos.x; + gSprites[i].obj.pos.y = 5.0f; + gSprites[i].obj.pos.z = obj80->obj.pos.z; if ((obj80->obj.id == OBJ_80_0) || (obj80->obj.id == OBJ_80_6) || (obj80->obj.id == OBJ_80_7) || (obj80->obj.id == OBJ_80_56) || (obj80->obj.id == OBJ_80_20) || (obj80->obj.id == OBJ_80_21) || (obj80->obj.id == OBJ_80_22)) { - gObjects4C[i].obj.rot.y = obj80->obj.rot.y; + gSprites[i].obj.rot.y = obj80->obj.rot.y; } else { - gObjects4C[i].obj.rot.y = 44.9f; + gSprites[i].obj.rot.y = 44.9f; } - Object_SetInfo(&gObjects4C[i].info, gObjects4C[i].obj.id); + Object_SetInfo(&gSprites[i].info, gSprites[i].obj.id); break; } } @@ -979,7 +980,7 @@ void func_enmy_80063E5C(Object_80* obj80, f32* hitboxData) { if (item->obj.status == OBJ_FREE) { Item_Initialize(&gItems[i]); item->obj.status = OBJ_INIT; - item->obj.id = OBJ_ITEM_334; + item->obj.id = OBJ_ITEM_RING_CHECK; item->obj.pos.x = obj80->obj.pos.x; item->obj.pos.y = obj80->obj.pos.y; item->obj.pos.z = obj80->obj.pos.z; @@ -1011,8 +1012,8 @@ void Object_Init(s32 index, ObjectId objId) { PosRot* var_v0; switch (objId) { - case OBJ_4C_170: - func_effect_8007A6F0(&gObjects4C[index].obj.pos, 0x11000055); + case OBJ_SPRITE_CO_SMOKE: + func_effect_8007A6F0(&gSprites[index].obj.pos, 0x11000055); break; case OBJ_ACTOR_234: AUDIO_PLAY_SFX(0x11030010, gActors[index].sfxSource, 0); @@ -1076,21 +1077,21 @@ void Object_Init(s32 index, ObjectId objId) { } break; case OBJ_ITEM_METEO_WARP: - if (D_ctx_80177E80 < 0) { + if (gRingPassCount < 0) { gItems[index].obj.status = OBJ_FREE; } break; - case OBJ_ITEM_331: - case OBJ_ITEM_332: - case OBJ_ITEM_333: + case OBJ_ITEM_PATH_SPLIT_Y: + case OBJ_ITEM_PATH_TURN_UP: + case OBJ_ITEM_PATH_TURN_DOWN: func_enmy_80063F74(&gItems[index]); break; - case OBJ_ITEM_328: - case OBJ_ITEM_329: + case OBJ_ITEM_PATH_SPLIT_X: + case OBJ_ITEM_PATH_TURN_LEFT: func_enmy_80063F58(&gItems[index]); break; - case OBJ_ITEM_330: - if (((D_ctx_80177E80 >= 7) && (gCurrentLevel == LEVEL_CORNERIA) && (gTeamShields[1] > 0)) || + case OBJ_ITEM_PATH_TURN_RIGHT: + if (((gRingPassCount >= 7) && (gCurrentLevel == LEVEL_CORNERIA) && (gTeamShields[TEAM_ID_FALCO] > 0)) || (gCurrentLevel != LEVEL_CORNERIA)) { func_enmy_80063F58(&gItems[index]); } else { @@ -1098,7 +1099,7 @@ void Object_Init(s32 index, ObjectId objId) { } break; case OBJ_80_0: - func_enmy_80063E5C(&gObjects80[index], D_edata_800CBF18); + func_enmy_80063E5C(&gObjects80[index], gItemRingCheckHitbox); /* fallthrough */ case OBJ_80_6: case OBJ_80_7: @@ -1263,8 +1264,8 @@ void Object_Init(s32 index, ObjectId objId) { case OBJ_ACTOR_228: Titania_8018E5E8(&gActors[index]); break; - case OBJ_4C_169: - Titania_8018EFF0(&gObjects4C[index]); + case OBJ_SPRITE_TI_CACTUS: + Titania_8018EFF0(&gSprites[index]); break; case OBJ_BOSS_306: Titania_Boss306_Init(&gBosses[index]); @@ -1560,9 +1561,9 @@ void func_enmy_800656D4(Actor* actor) { if (actor->timer_0BE == 0) { actor->timer_0BE = 30; Math_Vec3fFromAngles(&sp98, actor->obj.rot.x, actor->obj.rot.y, 120.0f); - func_effect_8007F04C(0x161, actor->obj.pos.x + sp98.x, actor->obj.pos.y + sp98.y, actor->obj.pos.z + sp98.z, - actor->obj.rot.x, actor->obj.rot.y, actor->obj.rot.z, 0.0f, 0.0f, 0.0f, sp98.x, sp98.y, - sp98.z, 1.0f); + func_effect_8007F04C(OBJ_EFFECT_353, actor->obj.pos.x + sp98.x, actor->obj.pos.y + sp98.y, + actor->obj.pos.z + sp98.z, actor->obj.rot.x, actor->obj.rot.y, actor->obj.rot.z, 0.0f, + 0.0f, 0.0f, sp98.x, sp98.y, sp98.z, 1.0f); } var_fv0 = 330.0f; if (sp84 < 0.0f) { @@ -1594,7 +1595,7 @@ void func_enmy_800656D4(Actor* actor) { if (gCurrentLevel == LEVEL_AREA_6) { actor->itemDrop = DROP_SILVER_RING_10p; } - func_enmy_80066254(actor); + Actor_Despawn(actor); } func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); } @@ -1639,7 +1640,7 @@ void func_enmy_800660F0(Actor* actor) { } } -void func_enmy_80066254(Actor* actor) { +void Actor_Despawn(Actor* actor) { Actor* otherActor; s32 i; @@ -1688,11 +1689,11 @@ void func_enmy_80066254(Actor* actor) { func_enmy_800660F0(actor); AUDIO_PLAY_SFX(0x4900000C, gDefaultSfxSource, 4); } else if (actor->itemDrop == DROP_TEAM_MESG) { - if (gTeamShields[3] > 0) { + if (gTeamShields[TEAM_ID_PEPPY] > 0) { Radio_PlayMessage(gMsg_ID_20261, RCID_PEPPY); - } else if (gTeamShields[2] > 0) { + } else if (gTeamShields[TEAM_ID_SLIPPY] > 0) { Radio_PlayMessage(gMsg_ID_20263, RCID_SLIPPY); - } else if (gTeamShields[1] > 0) { + } else if (gTeamShields[TEAM_ID_FALCO] > 0) { Radio_PlayMessage(gMsg_ID_20262, RCID_FALCO); } } else if (Rand_ZeroOne() <= D_enmy_800CFE5C[actor->itemDrop]) { @@ -1769,7 +1770,7 @@ void func_enmy_8006684C(Actor* actor) { if (actor->timer_0BE == 1) { Object_Kill(&actor->obj, actor->sfxSource); actor->itemDrop = DROP_SILVER_RING; - func_enmy_80066254(actor); + Actor_Despawn(actor); AUDIO_PLAY_SFX(0x2903B009, actor->sfxSource, 4); BonusText_Display(actor->obj.pos.x, actor->obj.pos.y + 250.0f, actor->obj.pos.z, 3); gHitCount += 3; @@ -1872,8 +1873,8 @@ void func_enmy_80066D5C(Object_80* obj80) { void func_enmy_80066E80(Object_80* obj80) { } -void func_enmy_80066E8C(Object_4C* obj4C) { - obj4C->obj.rot.y += 0.2f; +void Sprite167_Update(Sprite167* this) { + this->obj.rot.y += 0.2f; } void func_enmy_80066EA8(Object_80* obj80) { @@ -1883,7 +1884,7 @@ void func_enmy_80066EA8(Object_80* obj80) { } } -void func_enmy_80066EE4(Object_4C* obj4C) { +void func_enmy_80066EE4(Sprite* sprite) { } void func_enmy_80066EF0(Item* item) { @@ -1892,7 +1893,7 @@ void func_enmy_80066EF0(Item* item) { if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_0)) { Object_Kill(&item->obj, item->sfxSource); } - if ((gLevelMode == LEVELMODE_ON_RAILS) && (D_enmy_80161680 == 0)) { + if ((gLevelMode == LEVELMODE_ON_RAILS) && (gLastPathChange == 0)) { var_fa1 = 900.0f; if (gPlayer[0].form != FORM_ARWING) { var_fa1 = 600.0f; @@ -1983,52 +1984,52 @@ void func_enmy_800674B4(f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 ar } } -void ActorSupplies_Update(Actor* actor) { +void ActorSupplies_Update(ActorSupplies* this) { Player* player = &gPlayer[0]; s32 i; - actor->obj.rot.y += 1.0f; + this->obj.rot.y += 1.0f; if (gLevelMode == LEVELMODE_ALL_RANGE) { if (gCurrentLevel == LEVEL_SECTOR_Z) { - Math_SmoothStepToF(&actor->obj.pos.x, -2000.0f, 0.05f, 60.0f, 0.01f); - Math_SmoothStepToF(&actor->obj.pos.y, -200.0f, 0.05f, 3.0f, 0.01f); - Math_SmoothStepToF(&actor->obj.pos.z, 0.0f, 0.05f, 0.f, 0.01f); + Math_SmoothStepToF(&this->obj.pos.x, -2000.0f, 0.05f, 60.0f, 0.01f); + Math_SmoothStepToF(&this->obj.pos.y, -200.0f, 0.05f, 3.0f, 0.01f); + Math_SmoothStepToF(&this->obj.pos.z, 0.0f, 0.05f, 0.f, 0.01f); } else { - Math_SmoothStepToF(&actor->obj.pos.y, 300.0f, 0.05f, 50.0f, 0.01f); + Math_SmoothStepToF(&this->obj.pos.y, 300.0f, 0.05f, 50.0f, 0.01f); } } - if (actor->unk_0D0 != 0) { - actor->unk_0D0 = 0; - actor->health -= actor->damage; - if (actor->health <= 0) { - func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); - func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 5.0f); + if (this->unk_0D0 != 0) { + this->unk_0D0 = 0; + this->health -= this->damage; + if (this->health <= 0) { + func_effect_8007A6F0(&this->obj.pos, 0x2903A008); + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 5.0f); if (((player[0].wings.rightState <= WINGSTATE_BROKEN) || (player[0].wings.leftState <= WINGSTATE_BROKEN)) && (player[0].form != FORM_LANDMASTER)) { - actor->itemDrop = DROP_WING_REPAIR; + this->itemDrop = DROP_WING_REPAIR; } else if (gPlayer[0].shields < 128) { - actor->itemDrop = DROP_SILVER_STAR; + this->itemDrop = DROP_SILVER_STAR; } else if ((gLaserStrength[0] == LASERS_SINGLE) && (player[0].form != FORM_LANDMASTER)) { - actor->itemDrop = DROP_LASERS; + this->itemDrop = DROP_LASERS; } else { - actor->itemDrop = DROP_BOMB; + this->itemDrop = DROP_BOMB; } - func_enmy_80066254(actor); + Actor_Despawn(this); for (i = 0; i < 6; i++) { - func_enmy_800674B4(D_enmy_800CFEC4[i].x + actor->obj.pos.x, D_enmy_800CFEC4[i].y + actor->obj.pos.y, - D_enmy_800CFEC4[i].z + actor->obj.pos.z, D_enmy_800CFF0C[i].y + actor->obj.rot.y, - D_enmy_800CFF0C[i].x + actor->obj.rot.x, RAND_FLOAT_CENTERED(40.0f), + func_enmy_800674B4(D_enmy_800CFEC4[i].x + this->obj.pos.x, D_enmy_800CFEC4[i].y + this->obj.pos.y, + D_enmy_800CFEC4[i].z + this->obj.pos.z, D_enmy_800CFF0C[i].y + this->obj.rot.y, + D_enmy_800CFF0C[i].x + this->obj.rot.x, RAND_FLOAT_CENTERED(40.0f), RAND_FLOAT(10.0f) + 10.0f, RAND_FLOAT_CENTERED(40.0f)); - func_effect_800794CC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 0.6f); + func_effect_800794CC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0.6f); } - Object_Kill(&actor->obj, actor->sfxSource); + Object_Kill(&this->obj, this->sfxSource); } } gRadarMarks[63].unk_00 = 1; gRadarMarks[63].unk_02 = 103; - gRadarMarks[63].pos.x = actor->obj.pos.x; - gRadarMarks[63].pos.y = actor->obj.pos.y; - gRadarMarks[63].pos.z = actor->obj.pos.z; + gRadarMarks[63].pos.x = this->obj.pos.x; + gRadarMarks[63].pos.y = this->obj.pos.y; + gRadarMarks[63].pos.z = this->obj.pos.z; gRadarMarks[63].unk_10 = 0.0f; } @@ -2066,268 +2067,268 @@ void func_enmy_80067A40(void) { } } -void Item1up_Update(Item* item) { - func_enmy_80066EF0(item); - func_enmy_800671D0(item); - if (item->collected) { - Object_Kill(&item->obj, item->sfxSource); - func_enmy_80060F30(gPlayer[item->playerNum].sfxSource, 0x4900C024, item->playerNum); +void Item1up_Update(Item1UP* this) { + func_enmy_80066EF0(this); + func_enmy_800671D0(this); + if (this->collected) { + Object_Kill(&this->obj, this->sfxSource); + func_enmy_80060F30(gPlayer[this->playerNum].sfxSource, 0x4900C024, this->playerNum); if (gCurrentLevel != LEVEL_TRAINING) { - gLifeCount[item->playerNum]++; + gLifeCount[this->playerNum]++; } } - if (item->timer_48 == 1) { - Object_Kill(&item->obj, item->sfxSource); + if (this->timer_48 == 1) { + Object_Kill(&this->obj, this->sfxSource); } } -void ItemPickup_Update(Item* item) { - func_enmy_80066EF0(item); - func_enmy_800671D0(item); - if (item->state == 0) { - switch (item->obj.id) { +void ItemPickup_Update(Item* this) { + func_enmy_80066EF0(this); + func_enmy_800671D0(this); + if (this->state == 0) { + switch (this->obj.id) { case OBJ_ITEM_BOMB: - item->scale = 18.0f; - if (item->collected) { - item->timer_4A = 50; - item->state = 1; - item->timer_48 = 20; - item->unk_50 = 60.0f; - gBombCount[item->playerNum]++; - func_enmy_80060F30(gPlayer[item->playerNum].sfxSource, 0x49002005, item->playerNum); - func_enmy_80060F30(gPlayer[item->playerNum].sfxSource, 0x49002006, item->playerNum); + this->scale = 18.0f; + if (this->collected) { + this->timer_4A = 50; + this->state = 1; + this->timer_48 = 20; + this->unk_50 = 60.0f; + gBombCount[this->playerNum]++; + func_enmy_80060F30(gPlayer[this->playerNum].sfxSource, 0x49002005, this->playerNum); + func_enmy_80060F30(gPlayer[this->playerNum].sfxSource, 0x49002006, this->playerNum); } break; case OBJ_ITEM_LASERS: - item->scale = 18.0f; - if (item->collected) { - item->timer_4A = 50; - item->state = 1; - item->timer_48 = 20; - item->unk_50 = 60.0f; - gLaserStrength[item->playerNum]++; - if (gLaserStrength[item->playerNum] > LASERS_HYPER) { - gLaserStrength[item->playerNum] = LASERS_HYPER; + this->scale = 18.0f; + if (this->collected) { + this->timer_4A = 50; + this->state = 1; + this->timer_48 = 20; + this->unk_50 = 60.0f; + gLaserStrength[this->playerNum]++; + if (gLaserStrength[this->playerNum] > LASERS_HYPER) { + gLaserStrength[this->playerNum] = LASERS_HYPER; } - func_enmy_80060F30(gPlayer[item->playerNum].sfxSource, 0x49002004, item->playerNum); + func_enmy_80060F30(gPlayer[this->playerNum].sfxSource, 0x49002004, this->playerNum); if (gExpertMode) { - gRightWingHealth[item->playerNum] = gLeftWingHealth[item->playerNum] = 10; + gRightWingHealth[this->playerNum] = gLeftWingHealth[this->playerNum] = 10; } else { - gRightWingHealth[item->playerNum] = gLeftWingHealth[item->playerNum] = 60; + gRightWingHealth[this->playerNum] = gLeftWingHealth[this->playerNum] = 60; } - D_ctx_80177D40[item->playerNum] = 1030; - D_ctx_80177D58[item->playerNum] = 1030; + D_ctx_80177D40[this->playerNum] = 1030; + D_ctx_80177D58[this->playerNum] = 1030; } break; } } else { - Math_SmoothStepToF(&item->scale, 2.5f, 1.0f, 0.5f, 0.0f); - item->obj.pos.x += (gPlayer[item->playerNum].pos.x - item->obj.pos.x) * 0.5f; - if (gPlayer[item->playerNum].form == FORM_LANDMASTER) { - item->obj.pos.y += ((gPlayer[item->playerNum].pos.y + 50.0f) - item->obj.pos.y) * 0.5f; + Math_SmoothStepToF(&this->scale, 2.5f, 1.0f, 0.5f, 0.0f); + this->obj.pos.x += (gPlayer[this->playerNum].pos.x - this->obj.pos.x) * 0.5f; + if (gPlayer[this->playerNum].form == FORM_LANDMASTER) { + this->obj.pos.y += ((gPlayer[this->playerNum].pos.y + 50.0f) - this->obj.pos.y) * 0.5f; } else { - item->obj.pos.y += (gPlayer[item->playerNum].pos.y - item->obj.pos.y) * 0.5f; + this->obj.pos.y += (gPlayer[this->playerNum].pos.y - this->obj.pos.y) * 0.5f; } - item->obj.pos.z += (gPlayer[item->playerNum].unk_138 - item->obj.pos.z) * 0.5f; - if (item->timer_48 == 0) { - Object_Kill(&item->obj, item->sfxSource); + this->obj.pos.z += (gPlayer[this->playerNum].unk_138 - this->obj.pos.z) * 0.5f; + if (this->timer_48 == 0) { + Object_Kill(&this->obj, this->sfxSource); } } } -void ItemLasers_Update(Item* item) { +void ItemLasers_Update(ItemLasers* this) { if (!gVersusMode && ((gPlayer[0].wings.leftState <= WINGSTATE_BROKEN) || (gPlayer[0].wings.rightState <= WINGSTATE_BROKEN))) { - item->obj.id = OBJ_ITEM_WING_REPAIR; - Object_SetInfo(&item->info, item->obj.id); - item->timer_48 = 2000; - AUDIO_PLAY_SFX(0x1900302B, item->sfxSource, 0); + this->obj.id = OBJ_ITEM_WING_REPAIR; + Object_SetInfo(&this->info, this->obj.id); + this->timer_48 = 2000; + AUDIO_PLAY_SFX(0x1900302B, this->sfxSource, 0); } else { - ItemPickup_Update(item); + ItemPickup_Update(this); } } -void ItemSupplyRing_Update(Item* item) { +void ItemSupplyRing_Update(Item* this) { Vec3f sp4C; Vec3f sp40; - switch (item->state) { + switch (this->state) { case 0: - Math_SmoothStepToF(&item->scale, 0.4f, 1.0f, 0.05f, 0.0f); - func_enmy_80066EF0(item); - func_enmy_800671D0(item); - if (item->collected) { - item->state = 1; - item->timer_48 = 50; - if (item->obj.id == OBJ_ITEM_SILVER_RING) { - gPlayer[item->playerNum].heal += 32; - func_enmy_80060F30(gPlayer[item->playerNum].sfxSource, 0x4900200E, item->playerNum); - } else if (item->obj.id == OBJ_ITEM_GOLD_RING) { + Math_SmoothStepToF(&this->scale, 0.4f, 1.0f, 0.05f, 0.0f); + func_enmy_80066EF0(this); + func_enmy_800671D0(this); + if (this->collected) { + this->state = 1; + this->timer_48 = 50; + if (this->obj.id == OBJ_ITEM_SILVER_RING) { + gPlayer[this->playerNum].heal += 32; + func_enmy_80060F30(gPlayer[this->playerNum].sfxSource, 0x4900200E, this->playerNum); + } else if (this->obj.id == OBJ_ITEM_GOLD_RING) { gGoldRingCount[0]++; if (gGoldRingCount[0] == 3) { - func_enmy_80060F30(gPlayer[item->playerNum].sfxSource, 0x49008015, item->playerNum); + func_enmy_80060F30(gPlayer[this->playerNum].sfxSource, 0x49008015, this->playerNum); } else if (gGoldRingCount[0] == 6) { - func_enmy_80060F30(gPlayer[item->playerNum].sfxSource, 0x4900C024, item->playerNum); + func_enmy_80060F30(gPlayer[this->playerNum].sfxSource, 0x4900C024, this->playerNum); if (gCurrentLevel != LEVEL_TRAINING) { - gLifeCount[item->playerNum]++; + gLifeCount[this->playerNum]++; } - gPlayer[item->playerNum].heal += 32; - BonusText_Display(gPlayer[item->playerNum].pos.x, gPlayer[item->playerNum].pos.y, - gPlayer[item->playerNum].unk_138, BONUS_TEXT_1UP); + gPlayer[this->playerNum].heal += 32; + BonusText_Display(gPlayer[this->playerNum].pos.x, gPlayer[this->playerNum].pos.y, + gPlayer[this->playerNum].unk_138, BONUS_TEXT_1UP); } else { - gPlayer[item->playerNum].heal += 32; - func_enmy_80060F30(gPlayer[item->playerNum].sfxSource, 0x49003013, item->playerNum); + gPlayer[this->playerNum].heal += 32; + func_enmy_80060F30(gPlayer[this->playerNum].sfxSource, 0x49003013, this->playerNum); } } else { - gPlayer[item->playerNum].heal += 128; - func_enmy_80060F30(gPlayer[item->playerNum].sfxSource, 0x4900200D, item->playerNum); + gPlayer[this->playerNum].heal += 128; + func_enmy_80060F30(gPlayer[this->playerNum].sfxSource, 0x4900200D, this->playerNum); } } - if ((item->obj.id == OBJ_ITEM_GOLD_RING) && (item->timer_48 == 1)) { - Object_Kill(&item->obj, item->sfxSource); + if ((this->obj.id == OBJ_ITEM_GOLD_RING) && (this->timer_48 == 1)) { + Object_Kill(&this->obj, this->sfxSource); } break; case 1: - if (item->timer_48 > 30) { - Math_SmoothStepToF(&item->scale, 1.0f, 1.0f, 0.06f, 0.0f); + if (this->timer_48 > 30) { + Math_SmoothStepToF(&this->scale, 1.0f, 1.0f, 0.06f, 0.0f); } else { - Math_SmoothStepToF(&item->scale, 0.0f, 1.0f, 0.06f, 0.0f); + Math_SmoothStepToF(&this->scale, 0.0f, 1.0f, 0.06f, 0.0f); } - item->obj.pos.x += (gPlayer[item->playerNum].pos.x - item->obj.pos.x) * 0.5f; - if (gPlayer[item->playerNum].form == FORM_LANDMASTER) { - item->obj.pos.y += (gPlayer[item->playerNum].pos.y + 50.0f - item->obj.pos.y) * 0.5f; + this->obj.pos.x += (gPlayer[this->playerNum].pos.x - this->obj.pos.x) * 0.5f; + if (gPlayer[this->playerNum].form == FORM_LANDMASTER) { + this->obj.pos.y += (gPlayer[this->playerNum].pos.y + 50.0f - this->obj.pos.y) * 0.5f; } else { - item->obj.pos.y += (gPlayer[item->playerNum].pos.y - item->obj.pos.y) * 0.5f; + this->obj.pos.y += (gPlayer[this->playerNum].pos.y - this->obj.pos.y) * 0.5f; } - if ((gPlayer[0].unk_238 != 0) && (gLevelMode == LEVELMODE_ON_RAILS)) { - item->obj.pos.z += (gPlayer[item->playerNum].unk_138 - 300.0f - item->obj.pos.z) * 0.3f; + if ((gPlayer[0].cockpitView != 0) && (gLevelMode == LEVELMODE_ON_RAILS)) { + this->obj.pos.z += (gPlayer[this->playerNum].unk_138 - 300.0f - this->obj.pos.z) * 0.3f; } else { - item->obj.pos.z += (gPlayer[item->playerNum].unk_138 - item->obj.pos.z) * 0.5f; + this->obj.pos.z += (gPlayer[this->playerNum].unk_138 - this->obj.pos.z) * 0.5f; } - item->obj.rot.z += 22.0f; - Math_SmoothStepToAngle(&item->obj.rot.y, Math_RadToDeg(-gPlayer[item->playerNum].unk_058), 0.2f, 10.0f, + this->obj.rot.z += 22.0f; + Math_SmoothStepToAngle(&this->obj.rot.y, Math_RadToDeg(-gPlayer[this->playerNum].unk_058), 0.2f, 10.0f, 0.0f); - if (item->timer_48 == 0) { - Object_Kill(&item->obj, item->sfxSource); + if (this->timer_48 == 0) { + Object_Kill(&this->obj, this->sfxSource); } - if (item->scale > 0.3f) { - Matrix_RotateY(gCalcMatrix, item->obj.rot.y * M_DTOR, 0); + if (this->scale > 0.3f) { + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, 0); Matrix_RotateZ(gCalcMatrix, gGameFrameCount * 37.0f * M_DTOR, 1); sp4C.x = 0.0f; - sp4C.y = item->scale * 100.0f; + sp4C.y = this->scale * 100.0f; sp4C.z = 0.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp4C, &sp40); - func_effect_80078E50(item->obj.pos.x + sp40.x, item->obj.pos.y + sp40.y, item->obj.pos.z + sp40.z, + func_effect_80078E50(this->obj.pos.x + sp40.x, this->obj.pos.y + sp40.y, this->obj.pos.z + sp40.z, 3.5f); } break; } } -void ItemSilverStar_Update(Item* item) { - ItemSupplyRing_Update(item); +void ItemSilverStar_Update(ItemSilverStar* this) { + ItemSupplyRing_Update(this); } -void ItemGoldRing_Update(Item* item) { - ItemSupplyRing_Update(item); +void ItemGoldRing_Update(ItemGoldRing* this) { + ItemSupplyRing_Update(this); } -void ItemWingRepair_Update(Item* item) { - func_enmy_80066EF0(item); - func_enmy_800671D0(item); - if (item->collected) { +void ItemWingRepair_Update(ItemWingRepair* this) { + func_enmy_80066EF0(this); + func_enmy_800671D0(this); + if (this->collected) { func_enmy_80067A40(); - Object_Kill(&item->obj, item->sfxSource); + Object_Kill(&this->obj, this->sfxSource); } - if (item->timer_48 == 1) { - Object_Kill(&item->obj, item->sfxSource); + if (this->timer_48 == 1) { + Object_Kill(&this->obj, this->sfxSource); } } -void ItemMeteoWarp_Update(Item* item) { - func_enmy_80066EF0(item); - if (item->state > 0) { - if (item->state == 1) { - item->obj.rot.z -= 10.0f; - item->obj.pos.x += (gPlayer[item->playerNum].pos.x - item->obj.pos.x) * 0.3f; - item->obj.pos.y += (gPlayer[item->playerNum].pos.y - item->obj.pos.y) * 0.3f; - item->obj.pos.z += (gPlayer[item->playerNum].unk_138 - item->obj.pos.z) * 0.3f; - item->scale -= 5.0f; - if (item->scale < 0.0f) { - item->scale = 0.0f; +void ItemMeteoWarp_Update(ItemMeteoWarp* this) { + func_enmy_80066EF0(this); + if (this->state > 0) { + if (this->state == 1) { + this->obj.rot.z -= 10.0f; + this->obj.pos.x += (gPlayer[this->playerNum].pos.x - this->obj.pos.x) * 0.3f; + this->obj.pos.y += (gPlayer[this->playerNum].pos.y - this->obj.pos.y) * 0.3f; + this->obj.pos.z += (gPlayer[this->playerNum].unk_138 - this->obj.pos.z) * 0.3f; + this->scale -= 5.0f; + if (this->scale < 0.0f) { + this->scale = 0.0f; } } - item->unk_44 -= 10; - if (item->unk_44 < 0) { - Object_Kill(&item->obj, item->sfxSource); + this->unk_44 -= 10; + if (this->unk_44 < 0) { + Object_Kill(&this->obj, this->sfxSource); } } else { - item->scale = 100.0f; - if (D_ctx_80177E80 < 0) { - item->state = 2; - item->unk_44 = 255; - } else if (item->collected) { - item->state = 1; - item->unk_44 = 255; - gPlayer[item->playerNum].timer_27C = 100; - AUDIO_PLAY_SFX(D_enmy_800CFF54[D_ctx_80177E80], gPlayer[0].sfxSource, 0); - if (D_ctx_80177E80 == 0) { + this->scale = 100.0f; + if (gRingPassCount < 0) { + this->state = 2; + this->unk_44 = 255; + } else if (this->collected) { + this->state = 1; + this->unk_44 = 255; + gPlayer[this->playerNum].timer_27C = 100; + AUDIO_PLAY_SFX(D_enmy_800CFF54[gRingPassCount], gPlayer[0].sfxSource, 0); + if (gRingPassCount == 0) { gPlayer[0].unk_110 = 0.0f; } - D_ctx_80177E80++; - if (D_ctx_80177E80 >= 7) { + gRingPassCount++; + if (gRingPassCount >= 7) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_8; gPlayer[0].unk_1D0 = 0; AUDIO_PLAY_SFX(0x1900602A, gDefaultSfxSource, 0); - D_ctx_80177930 = 2; + gNextPlanetPath = 2; D_play_800D3180[gCurrentLevel] = 1; } } } } -void ItemCheckpoint_Update(Item* item) { +void ItemCheckpoint_Update(ItemCheckpoint* this) { s32 i; - func_enmy_80066EF0(item); - item->unk_58 -= item->unk_44; - if (item->state > 0) { - item->unk_44++; - item->obj.pos.x += (gPlayer[item->playerNum].pos.x - item->obj.pos.x) * 0.3f; - if (gPlayer[item->playerNum].form == FORM_LANDMASTER) { - item->obj.pos.y += (gPlayer[item->playerNum].pos.y + 50.0f - item->obj.pos.y) * 0.3f; + func_enmy_80066EF0(this); + this->unk_58 -= this->unk_44; + if (this->state > 0) { + this->unk_44++; + this->obj.pos.x += (gPlayer[this->playerNum].pos.x - this->obj.pos.x) * 0.3f; + if (gPlayer[this->playerNum].form == FORM_LANDMASTER) { + this->obj.pos.y += (gPlayer[this->playerNum].pos.y + 50.0f - this->obj.pos.y) * 0.3f; } else { - item->obj.pos.y += (gPlayer[item->playerNum].pos.y - item->obj.pos.y) * 0.3f; + this->obj.pos.y += (gPlayer[this->playerNum].pos.y - this->obj.pos.y) * 0.3f; } - if (gPlayer[0].unk_238 != 0) { - item->obj.pos.z += (gPlayer[item->playerNum].unk_138 - 200.0f - item->obj.pos.z) * 0.3f; + if (gPlayer[0].cockpitView != 0) { + this->obj.pos.z += (gPlayer[this->playerNum].unk_138 - 200.0f - this->obj.pos.z) * 0.3f; } else { - item->obj.pos.z += (gPlayer[item->playerNum].unk_138 - 100.0f - item->obj.pos.z) * 0.3f; + this->obj.pos.z += (gPlayer[this->playerNum].unk_138 - 100.0f - this->obj.pos.z) * 0.3f; } - if (item->timer_48 == 0) { - Math_SmoothStepToF(&item->scale, 5.0f, 0.2f, 15.0f, 0.01f); - Math_SmoothStepToF(&item->unk_50, 0.0f, 0.1f, 0.03f, 0.0f); - Math_SmoothStepToF(&item->unk_54, 4.0f, 0.1f, 0.2f, 0.01f); + if (this->timer_48 == 0) { + Math_SmoothStepToF(&this->scale, 5.0f, 0.2f, 15.0f, 0.01f); + Math_SmoothStepToF(&this->unk_50, 0.0f, 0.1f, 0.03f, 0.0f); + Math_SmoothStepToF(&this->unk_54, 4.0f, 0.1f, 0.2f, 0.01f); } - if (item->scale <= 6.5f) { - Object_Kill(&item->obj, item->sfxSource); + if (this->scale <= 6.5f) { + Object_Kill(&this->obj, this->sfxSource); } } else { - item->unk_44 = 2; - item->unk_50 = 1.0f; - item->unk_54 = 1.0f; - item->scale = 100.0f; - if (item->collected) { - gPlayer[item->playerNum].heal = 128; - item->state++; - item->timer_48 = 15; - D_ctx_80161A8C = D_ctx_80161A88; - D_ctx_80177CB0 = -item->obj.pos.z; + this->unk_44 = 2; + this->unk_50 = 1.0f; + this->unk_54 = 1.0f; + this->scale = 100.0f; + if (this->collected) { + gPlayer[this->playerNum].heal = 128; + this->state++; + this->timer_48 = 15; + gSavedGroundType = gGroundType; + D_ctx_80177CB0 = -this->obj.pos.z; D_ctx_80177CB0 -= 250.0f; D_ctx_80177CA0 = D_ctx_80177DC8; - D_play_80161A50 = D_enmy_80161684; + gSavedZoSearchlightStatus = gMissedZoSearchlight; gSavedHitCount = gHitCount; - for (i = 1; i < 4; i++) { + for (i = TEAM_ID_FALCO; i <= TEAM_ID_PEPPY; i++) { gSavedTeamShields[i] = gTeamShields[i]; } AUDIO_PLAY_SFX(0x4900400F, gDefaultSfxSource, 4); @@ -2335,102 +2336,102 @@ void ItemCheckpoint_Update(Item* item) { } } -void func_enmy_80068C48(Item* item) { +void ItemRingCheck_Update(Item* item) { if (item->collected) { Object_Kill(&item->obj, item->sfxSource); - D_ctx_80177E80++; + gRingPassCount++; } } -void func_enmy_80068C88(Item* item) { - D_enmy_80161680 = item->obj.id; +void ItemPathChange_Update(Item* this) { + gLastPathChange = this->obj.id; if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_3) { - Object_Kill(&item->obj, item->sfxSource); - } else if (((gCurrentLevel == LEVEL_METEO) || (gCurrentLevel == LEVEL_SECTOR_X)) && (D_ctx_8017827C == 1)) { + Object_Kill(&this->obj, this->sfxSource); + } else if (((gCurrentLevel == LEVEL_METEO) || (gCurrentLevel == LEVEL_SECTOR_X)) && (gLevelStage == 1)) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_7; gPlayer[0].unk_1D0 = 0; - Object_Kill(&item->obj, item->sfxSource); + Object_Kill(&this->obj, this->sfxSource); } else if (gCurrentLevel == LEVEL_TRAINING) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_9; gPlayer[0].unk_1D0 = 0; - Object_Kill(&item->obj, item->sfxSource); - } else if (item->state == 0) { - if (((item->obj.pos.z + D_ctx_80177D20) > -2700.0f) && (fabsf(item->obj.pos.x - gPlayer[0].pos.x) < 1000.0f)) { - switch (item->obj.id) { - case OBJ_ITEM_331: - case OBJ_ITEM_332: - case OBJ_ITEM_333: + Object_Kill(&this->obj, this->sfxSource); + } else if (this->state == 0) { + if (((this->obj.pos.z + D_ctx_80177D20) > -2700.0f) && (fabsf(this->obj.pos.x - gPlayer[0].pos.x) < 1000.0f)) { + switch (this->obj.id) { + case OBJ_ITEM_PATH_SPLIT_Y: + case OBJ_ITEM_PATH_TURN_UP: + case OBJ_ITEM_PATH_TURN_DOWN: break; - case OBJ_ITEM_328: - gPlayer[0].flags_228 = 0x30; + case OBJ_ITEM_PATH_SPLIT_X: + gPlayer[0].flags_228 = PFLAG_228_4 | PFLAG_228_5; break; - case OBJ_ITEM_329: - gPlayer[0].flags_228 = 0x20; + case OBJ_ITEM_PATH_TURN_LEFT: + gPlayer[0].flags_228 = PFLAG_228_5; break; - case OBJ_ITEM_330: - gPlayer[0].flags_228 = 0x10; + case OBJ_ITEM_PATH_TURN_RIGHT: + gPlayer[0].flags_228 = PFLAG_228_4; break; } } - if (item->collected) { - Object_Kill(&item->obj, item->sfxSource); + if (this->collected) { + Object_Kill(&this->obj, this->sfxSource); gPlayer[0].unk_0B4 = 0.0f; - gPlayer[0].timer_210 = item->scale * 0.05f; - switch (item->obj.id) { - case OBJ_ITEM_328: - if (item->obj.pos.x < gPlayer[0].pos.x) { + gPlayer[0].timer_210 = this->scale * 0.05f; + switch (this->obj.id) { + case OBJ_ITEM_PATH_SPLIT_X: + if (this->obj.pos.x < gPlayer[0].pos.x) { gPlayer[0].unk_118 = -30.0f; - gPlayer[0].unk_0B8 = gPlayer[0].unk_0AC + item->scale; + gPlayer[0].unk_0B8 = gPlayer[0].unk_0AC + this->scale; } else { gPlayer[0].unk_118 = 30.0f; - gPlayer[0].unk_0B8 = gPlayer[0].unk_0AC - item->scale; + gPlayer[0].unk_0B8 = gPlayer[0].unk_0AC - this->scale; } break; - case OBJ_ITEM_329: + case OBJ_ITEM_PATH_TURN_LEFT: gPlayer[0].unk_118 = 30.0f; - gPlayer[0].unk_0B8 = gPlayer[0].unk_0AC - item->scale; + gPlayer[0].unk_0B8 = gPlayer[0].unk_0AC - this->scale; break; - case OBJ_ITEM_330: + case OBJ_ITEM_PATH_TURN_RIGHT: gPlayer[0].unk_118 = -30.0f; - gPlayer[0].unk_0B8 = gPlayer[0].unk_0AC + item->scale; + gPlayer[0].unk_0B8 = gPlayer[0].unk_0AC + this->scale; break; - case OBJ_ITEM_331: - if (item->obj.pos.y < gPlayer[0].pos.y) { + case OBJ_ITEM_PATH_SPLIT_Y: + if (this->obj.pos.y < gPlayer[0].pos.y) { gPlayer[0].unk_124 = 30.0f; - gPlayer[0].unk_0BC = gPlayer[0].unk_0B0 + item->scale; + gPlayer[0].unk_0BC = gPlayer[0].unk_0B0 + this->scale; } else { gPlayer[0].unk_124 = -30.0f; - gPlayer[0].unk_0BC = gPlayer[0].unk_0B0 - item->scale; + gPlayer[0].unk_0BC = gPlayer[0].unk_0B0 - this->scale; } break; - case OBJ_ITEM_332: + case OBJ_ITEM_PATH_TURN_UP: gPlayer[0].unk_124 = 30.0f; - gPlayer[0].unk_0BC = gPlayer[0].unk_0B0 + item->scale; + gPlayer[0].unk_0BC = gPlayer[0].unk_0B0 + this->scale; break; - case OBJ_ITEM_333: + case OBJ_ITEM_PATH_TURN_DOWN: gPlayer[0].unk_124 = -30.0f; - gPlayer[0].unk_0BC = gPlayer[0].unk_0B0 - item->scale; + gPlayer[0].unk_0BC = gPlayer[0].unk_0B0 - this->scale; break; } } } } -void func_enmy_80068FE0(Object_4C* obj4C) { - obj4C->obj.rot.y = (Math_Atan2F(gPlayer[0].camEye.x - obj4C->obj.pos.x, - gPlayer[0].camEye.z - (obj4C->obj.pos.z + D_ctx_80177D20)) * - 180.0f) / - M_PI; - if (obj4C->unk_46 != 0) { - obj4C->obj.status = OBJ_FREE; - func_effect_8007A6F0(&obj4C->obj.pos, 0x1903400F); - switch (obj4C->obj.id) { - case OBJ_4C_161: - func_effect_8007D074(obj4C->obj.pos.x, obj4C->obj.pos.y + 160.0f, obj4C->obj.pos.z, 4.0f); +void Sprite_UpdateDoodad(Sprite* this) { + this->obj.rot.y = + (Math_Atan2F(gPlayer[0].camEye.x - this->obj.pos.x, gPlayer[0].camEye.z - (this->obj.pos.z + D_ctx_80177D20)) * + 180.0f) / + M_PI; + if (this->unk_46 != 0) { + this->obj.status = OBJ_FREE; + func_effect_8007A6F0(&this->obj.pos, 0x1903400F); + switch (this->obj.id) { + case OBJ_SPRITE_CO_POLE: + func_effect_8007D074(this->obj.pos.x, this->obj.pos.y + 160.0f, this->obj.pos.z, 4.0f); break; default: - case OBJ_4C_169: - func_effect_8007D074(obj4C->obj.pos.x, obj4C->obj.pos.y + 96.0f, obj4C->obj.pos.z, 5.0f); + case OBJ_SPRITE_TI_CACTUS: + func_effect_8007D074(this->obj.pos.x, this->obj.pos.y + 96.0f, this->obj.pos.z, 5.0f); break; } } @@ -2464,7 +2465,7 @@ void Object_Dying(s32 index, ObjectId objId) { case OBJ_ACTOR_182: Object_Kill(&gActors[index].obj, gActors[index].sfxSource); func_effect_8007D2C8(gActors[index].obj.pos.x, gActors[index].obj.pos.y, gActors[index].obj.pos.z, 10.0f); - func_enmy_80066254(&gActors[index]); + Actor_Despawn(&gActors[index]); break; case OBJ_ACTOR_192: func_enmy_8006684C(&gActors[index]); @@ -2481,7 +2482,7 @@ void Object_Dying(s32 index, ObjectId objId) { } } -void func_enmy_800693E8(Actor* actor) { +void Actor_Move(Actor* actor) { actor->obj.pos.x += actor->vel.x; actor->obj.pos.z += actor->vel.z; actor->obj.pos.y += actor->vel.y; @@ -2516,19 +2517,19 @@ void func_enmy_800693E8(Actor* actor) { case OBJ_ACTOR_EVENT: if ((actor->unk_0B4 >= 200) && (actor->unk_0B4 < 300)) { D_ctx_80176550[actor->unk_046] = 0; - } else if ((actor->unk_0B4 == 38) && (actor->unk_046 != 2)) { - D_ctx_80177E80 = -1; + } else if ((actor->unk_0B4 == EINFO_38) && (actor->unk_046 != 2)) { + gRingPassCount = -1; } break; case OBJ_ACTOR_252: - D_enmy_80161684 = 1; + gMissedZoSearchlight = true; break; } } } } -void func_enmy_80069658(Boss* boss) { +void Boss_Move(Boss* boss) { boss->obj.pos.x += boss->vel.x; boss->obj.pos.y += boss->vel.y; boss->obj.pos.z += boss->vel.z; @@ -2539,7 +2540,7 @@ void func_enmy_80069658(Boss* boss) { } } -void func_enmy_800696F8(Object_80* obj80) { +void Object80_Move(Object_80* obj80) { if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2) { obj80->obj.pos.z += obj80->unk_60; if (obj80->info.unk_10 < obj80->obj.pos.z) { @@ -2563,24 +2564,25 @@ void func_enmy_800696F8(Object_80* obj80) { } } -void func_enmy_80069858(Object_4C* obj4C) { +void Sprite_Move(Sprite* sprite) { if (D_ctx_80161AB8 != 0) { - f32 temp_fv0 = fabsf(obj4C->obj.pos.x - gPlayer[0].camEye.x); + f32 temp_fv0 = fabsf(sprite->obj.pos.x - gPlayer[0].camEye.x); f32 var_fa0 = 500.0f; - if (((obj4C->obj.id == OBJ_4C_164) && ((obj4C->unk_45 == 6) || (obj4C->unk_45 == 7))) || - (obj4C->obj.id == OBJ_80_8)) { + if (((sprite->obj.id == OBJ_SPRITE_FOG_SHADOW) && + ((sprite->unk_45 == OBJ_80_6) || (sprite->unk_45 == OBJ_80_7))) || + (sprite->obj.id == OBJ_80_8)) { var_fa0 = 1000.0f; } temp_fv0 = ((temp_fv0 - var_fa0) < 0.0f) ? 0.0f * 1.7f : (temp_fv0 - var_fa0) * 1.7f; temp_fv0 -= gPlayer[0].camEye.z; - if ((obj4C->info.unk_10 - temp_fv0) < (obj4C->obj.pos.z + D_ctx_80177D20)) { - obj4C->obj.status = OBJ_FREE; + if ((sprite->info.unk_10 - temp_fv0) < (sprite->obj.pos.z + D_ctx_80177D20)) { + sprite->obj.status = OBJ_FREE; } } } -void func_enmy_80069924(Effect* effect) { +void Effect_Move(Effect* effect) { effect->obj.pos.x += effect->vel.x; effect->obj.pos.y += effect->vel.y; effect->obj.pos.z += effect->vel.z; @@ -2594,251 +2596,248 @@ void func_enmy_80069924(Effect* effect) { } } -void func_enmy_80069A10(Item* item) { +void Item_Move(Item* item) { if (D_ctx_80161AB8 != 0) { f32 temp = (0.0f - gPlayer[0].camEye.z); if ((item->info.unk_10 - temp) < (item->obj.pos.z + D_ctx_80177D20)) { Object_Kill(&item->obj, item->sfxSource); if ((item->obj.id == OBJ_ITEM_METEO_WARP) && (item->state == 0)) { - D_ctx_80177E80 = -1; + gRingPassCount = -1; } } } } -void Actor_Update(Actor* actor) { +void Actor_Update(Actor* this) { s32 i; - if (actor->timer_0BC != 0) { - actor->timer_0BC--; + if (this->timer_0BC != 0) { + this->timer_0BC--; } - if (actor->timer_0BE != 0) { - actor->timer_0BE--; + if (this->timer_0BE != 0) { + this->timer_0BE--; } - if (actor->timer_0C0 != 0) { - actor->timer_0C0--; + if (this->timer_0C0 != 0) { + this->timer_0C0--; } - if (actor->timer_0C2 != 0) { - actor->timer_0C2--; + if (this->timer_0C2 != 0) { + this->timer_0C2--; } - if (actor->timer_0C6 != 0) { - actor->timer_0C6--; + if (this->timer_0C6 != 0) { + this->timer_0C6--; } if (gVersusMode) { for (i = 0; i < gCamCount; i++) { - if (actor->timer_0CA[i] != 0) { + if (this->timer_0CA[i] != 0) { if (!(gControllerHold[i].button & A_BUTTON)) { - actor->timer_0CA[i]--; + this->timer_0CA[i]--; } gChargeTimers[i] = 0; } } - } else if (actor->timer_0CA[0] != 0) { + } else if (this->timer_0CA[0] != 0) { if (!(gControllerHold[gMainController].button & A_BUTTON)) { - actor->timer_0CA[0]--; + this->timer_0CA[0]--; } gChargeTimers[0] = 0; } - if (actor->timer_0C4 != 0) { - actor->timer_0C4--; + if (this->timer_0C4 != 0) { + this->timer_0C4--; } - switch (actor->obj.status) { + switch (this->obj.status) { case OBJ_INIT: - actor->obj.status = OBJ_ACTIVE; - Object_Init(actor->index, actor->obj.id); - if (actor->obj.id != OBJ_ACTOR_252) { - func_enmy_800693E8(actor); + this->obj.status = OBJ_ACTIVE; + Object_Init(this->index, this->obj.id); + if (this->obj.id != OBJ_ACTOR_252) { + Actor_Move(this); } break; case OBJ_ACTIVE: - func_enmy_800693E8(actor); - if ((actor->obj.status != OBJ_FREE) && (actor->info.action != NULL)) { - actor->info.action(&actor->obj); + Actor_Move(this); + if ((this->obj.status != OBJ_FREE) && (this->info.action != NULL)) { + this->info.action(&this->obj); } break; case OBJ_DYING: - func_enmy_800693E8(actor); - if (actor->obj.status != OBJ_FREE) { - Object_Dying(actor->index, actor->obj.id); + Actor_Move(this); + if (this->obj.status != OBJ_FREE) { + Object_Dying(this->index, this->obj.id); } break; } } -void Boss_Update(Boss* boss) { - if (boss->timer_050 != 0) { - boss->timer_050--; +void Boss_Update(Boss* this) { + if (this->timer_050 != 0) { + this->timer_050--; } - if (boss->timer_052 != 0) { - boss->timer_052--; + if (this->timer_052 != 0) { + this->timer_052--; } - if (boss->timer_054 != 0) { - boss->timer_054--; + if (this->timer_054 != 0) { + this->timer_054--; } - if (boss->timer_056 != 0) { - boss->timer_056--; + if (this->timer_056 != 0) { + this->timer_056--; } - if (boss->timer_058 != 0) { - boss->timer_058--; + if (this->timer_058 != 0) { + this->timer_058--; } - if (boss->timer_05A != 0) { - boss->timer_05A--; + if (this->timer_05A != 0) { + this->timer_05A--; } - if (boss->timer_05C != 0) { - boss->timer_05C--; + if (this->timer_05C != 0) { + this->timer_05C--; } - switch (boss->obj.status) { + switch (this->obj.status) { case OBJ_INIT: - boss->obj.status = OBJ_ACTIVE; - Object_Init(boss->index, boss->obj.id); - func_enmy_80069658(boss); + this->obj.status = OBJ_ACTIVE; + Object_Init(this->index, this->obj.id); + Boss_Move(this); break; case OBJ_ACTIVE: - func_enmy_80069658(boss); - if ((boss->obj.status != OBJ_FREE) && (boss->info.action != NULL)) { - boss->info.action(&boss->obj); + Boss_Move(this); + if ((this->obj.status != OBJ_FREE) && (this->info.action != NULL)) { + this->info.action(&this->obj); } break; case OBJ_DYING: - func_enmy_80069658(boss); - if (boss->obj.status != OBJ_FREE) { - Object_Dying(boss->index, boss->obj.id); + Boss_Move(this); + if (this->obj.status != OBJ_FREE) { + Object_Dying(this->index, this->obj.id); } break; } } -void Object_80_Update(Object_80* obj80) { - if (obj80->timer_4C != 0) { - obj80->timer_4C--; +void Object_80_Update(Object_80* this) { + if (this->timer_4C != 0) { + this->timer_4C--; } - switch (obj80->obj.status) { + switch (this->obj.status) { case OBJ_INIT: - obj80->obj.status = OBJ_ACTIVE; - Object_Init(obj80->index, obj80->obj.id); - func_enmy_800696F8(obj80); + this->obj.status = OBJ_ACTIVE; + Object_Init(this->index, this->obj.id); + Object80_Move(this); break; case OBJ_ACTIVE: - func_enmy_800696F8(obj80); - if (obj80->info.action != NULL) { - obj80->info.action(&obj80->obj); + Object80_Move(this); + if (this->info.action != NULL) { + this->info.action(&this->obj); } break; } } -void Object_4C_Update(Object_4C* obj4C) { - switch (obj4C->obj.status) { +void Sprite_Update(Sprite* this) { + switch (this->obj.status) { case OBJ_INIT: - obj4C->obj.status = OBJ_ACTIVE; - Object_Init(obj4C->index, obj4C->obj.id); - func_enmy_80069858(obj4C); + this->obj.status = OBJ_ACTIVE; + Object_Init(this->index, this->obj.id); + Sprite_Move(this); break; case OBJ_ACTIVE: - func_enmy_80069858(obj4C); - if (obj4C->info.action != NULL) { - obj4C->info.action(&obj4C->obj); + Sprite_Move(this); + if (this->info.action != NULL) { + this->info.action(&this->obj); } break; case OBJ_DYING: - func_enmy_80069858(obj4C); - Object_Dying(obj4C->index, obj4C->obj.id); + Sprite_Move(this); + Object_Dying(this->index, this->obj.id); break; } } -void Item_Update(Item* item) { - if (item->timer_48 != 0) { - item->timer_48--; +void Item_Update(Item* this) { + if (this->timer_48 != 0) { + this->timer_48--; } - if (item->timer_4A != 0) { - item->timer_4A--; + if (this->timer_4A != 0) { + this->timer_4A--; } - switch (item->obj.status) { + switch (this->obj.status) { case OBJ_INIT: - item->obj.status = OBJ_ACTIVE; - Object_Init(item->index, item->obj.id); - func_enmy_80069A10(item); + this->obj.status = OBJ_ACTIVE; + Object_Init(this->index, this->obj.id); + Item_Move(this); break; case OBJ_ACTIVE: - func_enmy_80069A10(item); - if (item->info.action != NULL) { - item->info.action(&item->obj); + Item_Move(this); + if (this->info.action != NULL) { + this->info.action(&this->obj); } break; } } -void Effect_Update(Effect* effect) { - if (effect->timer_50 != 0) { - effect->timer_50--; +void Effect_Update(Effect* this) { + if (this->timer_50 != 0) { + this->timer_50--; } - switch (effect->obj.status) { + switch (this->obj.status) { case OBJ_INIT: - effect->obj.status = OBJ_ACTIVE; - Object_Init(effect->index, effect->obj.id); + this->obj.status = OBJ_ACTIVE; + Object_Init(this->index, this->obj.id); /* fallthrough */ case OBJ_ACTIVE: - func_enmy_80069924(effect); - if ((effect->obj.status != OBJ_FREE) && (effect->info.action != NULL)) { - effect->info.action(&effect->obj); + Effect_Move(this); + if ((this->obj.status != OBJ_FREE) && (this->info.action != NULL)) { + this->info.action(&this->obj); } break; } } -void TexturedLine_Update(TexturedLine* texLine) { +void TexturedLine_Update(TexturedLine* this) { Vec3f sp44; Vec3f sp38; f32 sp34; f32 sp30; f32 sp2C; - if (texLine->timer != 0) { - texLine->timer--; + if (this->timer != 0) { + this->timer--; } - - sp34 = texLine->unk_04.x - texLine->unk_10.x; - sp30 = texLine->unk_04.y - texLine->unk_10.y; - sp2C = texLine->unk_04.z - texLine->unk_10.z; - - texLine->unk_20 = Math_Atan2F(sp34, sp2C); - texLine->unk_1C = -Math_Atan2F(sp30, sqrtf(SQ(sp34) + SQ(sp2C))); - - if (texLine->mode != 4) { - texLine->unk_24 = sqrtf(SQ(sp34) + SQ(sp30) + SQ(sp2C)); + sp34 = this->unk_04.x - this->unk_10.x; + sp30 = this->unk_04.y - this->unk_10.y; + sp2C = this->unk_04.z - this->unk_10.z; + this->unk_20 = Math_Atan2F(sp34, sp2C); + this->unk_1C = -Math_Atan2F(sp30, sqrtf(SQ(sp34) + SQ(sp2C))); + if (this->mode != 4) { + this->unk_24 = sqrtf(SQ(sp34) + SQ(sp30) + SQ(sp2C)); } if (gGameState == GSTATE_PLAY) { - if (((texLine->mode == 1) || (texLine->mode == 101) || (texLine->mode == 50)) && + if (((this->mode == 1) || (this->mode == 101) || (this->mode == 50)) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) && (gPlayer[0].unk_1F4 == 0)) { - Matrix_RotateX(gCalcMatrix, -texLine->unk_1C, 0); - Matrix_RotateY(gCalcMatrix, -texLine->unk_20, 1); - sp44.x = gPlayer[gPlayerNum].pos.x - texLine->unk_04.x; - sp44.y = gPlayer[gPlayerNum].pos.y - texLine->unk_04.y; - sp44.z = gPlayer[gPlayerNum].unk_138 - texLine->unk_04.z; + Matrix_RotateX(gCalcMatrix, -this->unk_1C, 0); + Matrix_RotateY(gCalcMatrix, -this->unk_20, 1); + sp44.x = gPlayer[gPlayerNum].pos.x - this->unk_04.x; + sp44.y = gPlayer[gPlayerNum].pos.y - this->unk_04.y; + sp44.z = gPlayer[gPlayerNum].unk_138 - this->unk_04.z; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); - sp38.x += texLine->unk_04.x; - sp38.y += texLine->unk_04.y; - sp38.z += texLine->unk_04.z; - if ((fabsf(sp38.x - texLine->unk_04.x) < 30.0f) && (fabsf(sp38.y - texLine->unk_04.y) < 30.0f) && - (sp38.z < texLine->unk_04.z) && ((texLine->unk_04.z - texLine->unk_24) < sp38.z)) { + sp38.x += this->unk_04.x; + sp38.y += this->unk_04.y; + sp38.z += this->unk_04.z; + if ((fabsf(sp38.x - this->unk_04.x) < 30.0f) && (fabsf(sp38.y - this->unk_04.y) < 30.0f) && + (sp38.z < this->unk_04.z) && ((this->unk_04.z - this->unk_24) < sp38.z)) { if (gCurrentLevel == LEVEL_AQUAS) { Player_ApplyDamage(&gPlayer[0], 0, 30); } else { Player_ApplyDamage(&gPlayer[0], 0, 20); } - if (texLine->mode < 100) { - texLine->mode = 0; + if (this->mode < 100) { + this->mode = 0; } } } - if (((texLine->unk_04.z + D_ctx_80177D20) > 1000.0f) && (gLevelMode != LEVELMODE_ALL_RANGE)) { - texLine->mode = 0; + if (((this->unk_04.z + D_ctx_80177D20) > 1000.0f) && (gLevelMode != LEVELMODE_ALL_RANGE)) { + this->mode = 0; } - if (((texLine->mode == 3) || (texLine->mode == 50)) && (texLine->timer == 0)) { - texLine->mode = 0; + if (((this->mode == 3) || (this->mode == 50)) && (this->timer == 0)) { + this->mode = 0; } } } @@ -2854,13 +2853,13 @@ void TexturedLine_UpdateAll(void) { } } -void Object_UpdateAll(void) { +void Object_Update(void) { s32 i; s32 pad; Object_58* obj58; Actor* actor; Boss* boss; - Object_4C* obj4C; + Sprite* sprite; Object_80* obj80; Item* item; Effect* effect; @@ -2885,7 +2884,7 @@ void Object_UpdateAll(void) { } else if (gVersusMode) { for (i = 0, obj58 = gObjects58; i < 200; i++, obj58++) { if ((obj58->obj.status != OBJ_FREE) && (obj58->obj.id == OBJ_80_146)) { - if (i & 1) { + if ((i % 2) != 0) { obj58->obj.rot.y += 0.5f; } else { obj58->obj.rot.y -= 0.5f; @@ -2893,10 +2892,10 @@ void Object_UpdateAll(void) { } } } - for (i = 0, obj4C = gObjects4C; i < ARRAY_COUNT(gObjects4C); i++, obj4C++) { - if (obj4C->obj.status != OBJ_FREE) { - obj4C->index = i; - Object_4C_Update(obj4C); + for (i = 0, sprite = gSprites; i < ARRAY_COUNT(gSprites); i++, sprite++) { + if (sprite->obj.status != OBJ_FREE) { + sprite->index = i; + Sprite_Update(sprite); } } for (i = 0, boss = gBosses; i < ARRAY_COUNT(gBosses); i++, boss++) { diff --git a/src/engine/fox_enmy2.c b/src/engine/fox_enmy2.c index e8f103f3..793e9e87 100644 --- a/src/engine/fox_enmy2.c +++ b/src/engine/fox_enmy2.c @@ -22,8 +22,8 @@ #include "assets/ast_zoness.h" s32 D_enmy2_800CFF80[4] = { 0, 0, 0, 0 }; -s32 D_enmy2_800CFF90 = 0; -s32 D_enmy2_80161690; +s32 gCallVoiceParam = 0; +s32 gCallTimer; void ActorEvent_SetMessage(u16* msg, s32 character) { PRINTF("Enm->obj.pos.y + tmp_xyz.y=<%10.3f>\n"); @@ -69,10 +69,10 @@ void func_enmy2_8006A900(f32 xPos, f32 yPos, f32 zPos, f32 arg3) { } } -void Actor237_Update(Actor* this) { +void Actor237_Update(Actor237* this) { } -void Actor237_Draw(Actor* this) { +void Actor237_Draw(Actor237* this) { } void Ovj54_8006A984(Effect* effect, f32 xPos, f32 yPos, f32 zPos) { @@ -103,7 +103,7 @@ void Obj54_8006AA3C(f32 xPos, f32 yPos, f32 zPos) { } } -void Obj54_Update(Object_80* this) { +void Obj54_Update(Object80_54* this) { Vec3f sp24; Vec3f sp18; @@ -120,18 +120,18 @@ void Obj54_Update(Object_80* this) { } } -bool Actor201_8006ABA4(Actor* this) { +bool Actor201_8006ABA4(Actor201* this) { if ((fabsf(this->obj.pos.x - gPlayer[0].pos.x) < 700.0f) && (fabsf(this->obj.pos.y - gPlayer[0].pos.y) < 700.0f)) { return true; } return false; } -void Actor201_Update(Actor* this) { +void Actor201_Update(Actor201* this) { f32 sp2C; if (Actor201_8006ABA4(this) && (this->timer_0BC == 0)) { - func_effect_8007F11C(OBJ_EFFECT_353, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, D_ctx_80177828); + func_effect_8007F11C(OBJ_EFFECT_353, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, gEnemyShotSpeed); this->timer_0BC = 20; } sp2C = this->obj.pos.z + D_ctx_80177D20; @@ -141,7 +141,7 @@ void Actor201_Update(Actor* this) { sqrtf(SQ(gPlayer[0].camEye.z - sp2C) + SQ(gPlayer[0].camEye.x - this->obj.pos.x)))); } -void Actor202_Update(Actor* this) { +void Actor202_Update(Actor202* this) { bool sp34; this->gravity = 1.5f; @@ -157,9 +157,9 @@ void Actor202_Update(Actor* this) { this->iwork[1] = true; } - if (!(gGameFrameCount & 0x1F)) { + if (((gGameFrameCount % 32) == 0)) { func_effect_8007F11C(OBJ_EFFECT_353, this->obj.pos.x, this->obj.pos.y + 180.0f, this->obj.pos.z, - D_ctx_80177828); + gEnemyShotSpeed); } switch (this->state) { @@ -228,7 +228,7 @@ void Actor202_Update(Actor* this) { } } -void Actor194_Update(Actor* this) { +void Actor194_Update(Actor194* this) { } static s16 D_800CFF94[16] = { @@ -240,7 +240,7 @@ static f32 D_800CFFC4[16] = { }; static Gfx* D_800D0004[3] = { D_ENMY_SPACE_4000170, D_ENMY_SPACE_40084D0, D_ENMY_SPACE_400A630 }; -void Actor194_Init(Actor* this) { +void Actor194_Init(Actor194* this) { Vec3f sp34; s32 temp_hi; @@ -267,7 +267,7 @@ void Actor194_Init(Actor* this) { this->vel.y = sp34.y; this->vel.z = sp34.z; - if ((this->timer_0BC == 0) && !(gGameFrameCount & 3)) { + 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], @@ -289,7 +289,7 @@ void Actor194_Init(Actor* this) { } } -void Actor194_8006B46C(Actor* this, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, u8 arg7, f32 arg8, +void Actor194_8006B46C(Actor194* this, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, u8 arg7, f32 arg8, s32 arg9) { Vec3f sp34 = { 0.0f, 0.0f, 0.0f }; @@ -328,7 +328,7 @@ void Actor194_8006B46C(Actor* this, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } -void Actor194_Draw(Actor* this) { +void Actor194_Draw(Actor194* this) { s16 var_s0; s16 temp_hi; @@ -337,11 +337,11 @@ void Actor194_Draw(Actor* this) { 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], - D_800CFFB4[var_s0], D_800CFFC4[var_s0], this->timer_0C6 & 1); + D_800CFFB4[var_s0], D_800CFFC4[var_s0], this->timer_0C6 % 2U); } } -void Obj42_Update(Object_80* this) { +void Obj42_Update(Object80_42* this) { this->obj.pos.x += this->vel.x; this->obj.pos.y += this->vel.y; this->obj.pos.z += this->vel.z; @@ -394,7 +394,7 @@ void func_enmy2_8006BB1C(f32 xPos, f32 yPos, f32 zPos) { } } -void Actor196_Update(Actor* this) { +void Actor196_Update(Actor196* this) { Vec3f sp44; switch (this->state) { @@ -445,7 +445,8 @@ void Actor196_Update(Actor* this) { case 3: if (this->timer_0BC == 1) { - func_effect_8007F11C(OBJ_EFFECT_353, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, D_ctx_80177828); + func_effect_8007F11C(OBJ_EFFECT_353, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, + gEnemyShotSpeed); } if (this->vel.y < 12.0f) { Math_SmoothStepToF(&this->obj.rot.x, 180.0f, 0.1f, 7.0f, 0.01f); @@ -468,11 +469,11 @@ void Actor196_Update(Actor* this) { break; } - if ((this->obj.pos.y <= (gGroundLevel + 10.0f)) && !(gGameFrameCount & 7)) { + if ((this->obj.pos.y <= (gGroundLevel + 10.0f)) && ((gGameFrameCount % 8) == 0)) { func_enmy2_8006BB1C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z); } - if (!(gGameFrameCount & 7)) { + if (((gGameFrameCount % 8) == 0)) { func_enmy2_8006A900(RAND_FLOAT_CENTERED(50.0f) + this->obj.pos.x, this->obj.pos.y + 10.0f, RAND_FLOAT_CENTERED(50.0f) + this->obj.pos.z, 0.5f); } @@ -481,7 +482,7 @@ void Actor196_Update(Actor* this) { func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0.0f, this->vel.y, 0.0f, 3.0f, 5); Object_Kill(&this->obj, this->sfxSource); this->itemDrop = DROP_SILVER_RING; - func_enmy_80066254(this); + Actor_Despawn(this); } this->unk_0D0 = 0; } @@ -496,7 +497,7 @@ void func_enmy2_8006BF7C(f32 xPos, f32 yPos, f32 zPos) { } static Vec3f D_800D0030 = { 0.0f, -10.0f, 0.0f }; // could be in-function -void Actor189_Update(Actor* this) { +void Actor189_Update(Actor189* this) { f32 sp4C; f32 sp48; f32 sp44; @@ -513,7 +514,7 @@ void Actor189_Update(Actor* this) { this->obj.rot.y += this->fwork[1]; this->obj.rot.z += this->fwork[2]; - if (((this->unk_04A & 1) == 1) && !(this->timer_0BC & 3)) { + if (((this->unk_04A % 2U) == 1) && ((this->timer_0BC & 3) == 0)) { func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->scale); } @@ -604,7 +605,7 @@ void Actor189_Update(Actor* this) { this->obj.rot.y += this->fwork[1]; this->obj.rot.z += this->fwork[2]; - if ((this->iwork[0] == 1) && !(gGameFrameCount & 7)) { + if ((this->iwork[0] == 1) && ((gGameFrameCount % 8) == 0)) { func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 2.0f); } @@ -755,7 +756,7 @@ void Actor189_Update(Actor* this) { Object_Kill(&this->obj, this->sfxSource); } } else if (this->state >= 10) { - if (!(this->timer_0BC & 3)) { + if ((this->timer_0BC & 3) == 0) { func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->scale); } if (((this->timer_0BC == 0) || (func_enmy_8006351C(this->index, &this->obj.pos, &D_800D0030, 1) != 0) || @@ -767,7 +768,7 @@ void Actor189_Update(Actor* this) { func_effect_8007A6F0(&this->obj.pos, 0x2903A008); } } else { - if ((this->state == 3) && !(this->timer_0BC & 7)) { + if ((this->state == 3) && ((this->timer_0BC % 8) == 0)) { func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1.5f); } if ((func_enmy_8006351C(this->index, &this->obj.pos, &D_800D0030, 1) != 0) || @@ -803,7 +804,7 @@ void Actor189_Update(Actor* this) { Object_Kill(&this->obj, this->sfxSource); } } else { - if (this->timer_0BC & 1) { + if ((this->timer_0BC % 2) != 0) { func_effect_8007D24C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1.0f); } if ((gLevelType == LEVELTYPE_SPACE) && (this->timer_0BC == 0)) { @@ -866,119 +867,119 @@ void func_enmy2_8006D0F4(Actor* actor) { } } -void Obj39_Update(Object_80* this) { +void Obj39_Update(Object80_39* this) { this->obj.rot.z += 1.0f; } static UnkStruct_D003C D_800D003C[108] = { - { D_ENMY_PLANET_40068F0, D_edata_800CBE8C, 1.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - { D_ENMY_PLANET_4006E90, D_edata_800CBE8C, 1.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - { NULL, D_edata_800CBE8C, 1.0f, 20000.0f, 3000.0f, 1, 0, 2, 0, 0.0f, 0 }, - { D_ENMY_PLANET_4009800, D_edata_800CBE8C, 1.5f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, - { D_ENMY_PLANET_40073C0, D_edata_800CBE8C, 1.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - { D_ENMY_PLANET_4007AF0, D_edata_800CBE8C, 1.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - { NULL, D_edata_800CBE8C, 1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, - { D_CO_6011F90, D_edata_800CBE8C, 1.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 0.0f, 1 }, - { D_ENMY_PLANET_4000710, D_edata_800CBE8C, 1.0f, 100.0f, 3000.0f, 2, 0, 1, 1, 1.0f, 1 }, - { NULL, D_edata_800CBE8C, 1.5f, 100.0f, 3000.0f, 1, 0, 6, 0, 1.0f, 1 }, - { D_ENMY_SPACE_400BD20, D_edata_800CBEC4, 2.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - { D_ENMY_SPACE_4001310, D_edata_800CBE8C, 1.5f, 100.0f, 3000.0f, 1, 0, 6, 0, 1.0f, 1 }, - { D_ENMY_SPACE_400B390, D_edata_800CBE8C, 2.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - { D_ME_6018C00, D_edata_800CBE8C, 2.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - { D_ME_601F2A0, D_edata_800CBEFC, 7.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - { D_ENMY_SPACE_400AAE0, D_edata_800CBE8C, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - { D_ENMY_SPACE_4000650, D_edata_800CBE8C, 1.5f, 100.0f, 3000.0f, 1, 0, 6, 0, 1.0f, 1 }, - { D_A6_6016190, D_A6_60282A0, -2.0f, 2100.0f, 3000.0f, 0, 0, 7, 0, 0.0f, 5 }, - { D_SX_6023500, D_edata_800CBEC4, 2.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - { D_SX_6022DF0, D_edata_800CBE8C, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - { NULL, D_edata_800CBE8C, 1.0f, 100.0f, 3000.0f, 2, 1, 1, 0, 0.0f, 1 }, - { NULL, D_edata_800CBEC4, 2.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 0.0f, 1 }, - { NULL, D_edata_800CBE8C, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 0.0f, 1 }, - { D_ENMY_SPACE_4008FA0, D_edata_800CBE8C, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - { D_SX_60285F0, D_SX_603298C, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - { D_SX_600AF70, D_SX_6032904, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - { D_SX_6023E30, D_SX_6032970, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - { NULL, D_SX_603285C, 2.5f, 100.0f, 3000.0f, 2, 0, 0, 0, 1.0f, 1 }, - { D_SX_6001CE0, D_SX_6032938, 3.0f, 100.0f, 3000.0f, 2, 0, 0, 0, 1.0f, 1 }, - { D_SX_6000840, D_SX_6032954, 1.0f, 100.0f, 3000.0f, 2, 1, 0, 0, 1.0f, 1 }, - { D_A6_6012A40, D_A6_6028254, -2.0f, 2100.0f, 3001.0f, 0, 0, 7, 0, 0.0f, 2 }, - { NULL, D_A6_60280E0, -2.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 3 }, - { D_SX_6009950, D_SX_6032878, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - { NULL, D_edata_800CBEC4, 2.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, - { D_SX_600B2B0, D_SX_6032894, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - { D_SX_600A2E0, D_SX_60328B0, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - { NULL, D_edata_800CBEFC, 2.0f, 200.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - { D_SX_600B830, D_edata_800CBE8C, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - { NULL, D_SX_603238C, 1.0f, 500.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, - { D_SX_6020D20, D_SX_60328CC, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - { NULL, D_edata_800CBF34, 1.0f, 100.0f, 3001.0f, 2, 0, 0, 0, 0.0f, 1 }, - { D_SY_60097E0, D_SY_6034478, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - { D_SY_601D730, D_SY_603450C, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - { NULL, D_edata_800CBE8C, 1.0f, 20000.0f, 3000.0f, 1, 0, 2, 0, 0.0f, 0 }, - { D_SY_60102C0, D_SY_6034588, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - { D_ME_6017B60, D_edata_800CBEC4, -1.0f, 300.0f, 3001.0f, 0, 0, 0, 0, 1.0f, 1 }, - { D_ZO_6004D00, D_edata_800CBEC4, 1.0f, 100.0f, 3000.0f, 1, 0, 4, 0, 1.0f, 1 }, - { D_ME_601A880, D_edata_800CBE8C, -1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, - { NULL, D_SY_603405C, 0.3f, 100.0f, 3000.0f, 0, 0, 1, 0, 1.0f, 1 }, - { NULL, D_SY_603405C, 0.3f, 100.0f, 3000.0f, 0, 0, 1, 0, 1.0f, 1 }, - { NULL, D_SY_603405C, 0.3f, 100.0f, 3000.0f, 0, 0, 1, 0, 1.0f, 1 }, - { D_SY_6015D60, D_SY_6034124, 2.0f, 100.0f, 3000.0f, 0, 0, 1, 0, 1.0f, 1 }, - { NULL, D_ZO_602C1A0, -1.0f, 1000.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, - { D_SX_600B540, D_SX_60328E8, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - { D_ENMY_SPACE_4000EC0, D_edata_800CBE8C, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - { D_ENMY_SPACE_4008D50, D_edata_800CBE8C, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - { NULL, D_edata_800CBF34, -1.0f, 2000.0f, 3000.0f, 0, 0, 3, 0, 0.0f, 1 }, - { D_SY_60102C0, D_edata_800CBF34, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - { D_SY_601F3D0, D_edata_800CBF34, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - { D_SY_6022B10, D_edata_800CBF34, 2.0f, 100.0f, 3000.0f, 0, 0, 1, 0, 0.0f, 1 }, - { D_SY_60209F0, D_edata_800CBF34, 2.0f, 100.0f, 3000.0f, 0, 0, 1, 0, 0.0f, 1 }, - { D_ME_6019430, D_edata_800CBEC4, 2.5f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, - { D_ME_6018960, D_edata_800CBE8C, 2.5f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, - { D_ME_6009F50, D_edata_800CBF34, -1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, - { NULL, D_edata_800CBEC4, 3.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, - { D_ME_600C2A0, D_edata_800CBEC4, -1.0f, 100.0f, 8000.0f, 1, 0, 0, 0, 0.0f, 1 }, - { D_ME_600BD40, D_edata_800CBE8C, -1.0f, 100.0f, 8000.0f, 1, 0, 0, 0, 0.0f, 1 }, - { NULL, D_ME_602F604, 3.0f, 100.0f, 3000.0f, 2, 0, 1, 0, 1.0f, 1 }, - { D_SY_60205D0, D_SY_603445C, 3.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, - { D_SY_60036A0, D_SY_6034664, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - { D_SY_601AD70, D_edata_800CBF34, 4.0f, 100.0f, 3000.0f, 0, 0, 1, 0, 0.0f, 1 }, - { D_arwing_3007650, D_edata_800CBF34, 1.0f, 100.0f, 3000.0f, 2, 0, 5, 0, 0.0f, 1 }, - { D_SY_60034D0, D_SY_60347D4, 3.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, - { D_SY_6005360, D_SY_6034770, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - { D_SY_600F6C0, D_SY_60347F0, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - { D_SY_601B610, D_edata_800CBF34, -1.0f, 10000.0f, 3001.0f, 0, 0, 1, 0, 0.0f, 1 }, - { D_SY_601C6A0, D_edata_800CBF34, -1.0f, 10000.0f, 3001.0f, 0, 0, 1, 0, 0.0f, 1 }, - { D_SY_60188D0, D_SY_603486C, 3.0f, 100.0f, 3001.0f, 0, 0, 1, 0, 0.0f, 1 }, - { NULL, D_edata_800CBEA8, 1.0f, 100.0f, 3000.0f, 2, 0, 0, 0, 1.0f, 0 }, - { NULL, D_ZO_602C294, 1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 1.0f, 1 }, - { NULL, D_VE1_601B474, -1.0f, 100.0f, 3000.0f, 2, 0, 0, 0, 0.0f, 1 }, - { NULL, D_edata_800CBF34, -1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, - { NULL, D_edata_800CBE8C, 2.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - { NULL, D_AQ_6030B4C, 1.0f, 100.0f, 3000.0f, 2, 0, 0, 0, 60.0f, 1 }, - { D_VE1_9012180, D_VE1_601B43C, -1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, - { NULL, D_edata_800CBE8C, 1.0f, 20000.0f, 3000.0f, 1, 0, 2, 0, 0.0f, 0 }, - { NULL, D_edata_800CBE8C, 1.0f, 20000.0f, 3000.0f, 1, 0, 2, 0, 0.0f, 0 }, - { D_VE1_900EFC0, D_edata_800CBF34, 1.0f, 100.0f, 3000.0f, 1, 1, 0, 0, 0.0f, 1 }, - { NULL, D_AQ_6030B30, 1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, - { NULL, D_AQ_6030B14_f32, 1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, - { D_MA_601C520, D_MA_60368FC, 1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, - { D_MA_600AF40, D_MA_60368E0, -1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, - { D_WZ_7000C40, D_edata_800CC0D4, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - { D_WZ_70010E0, D_edata_800CC0F0, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - { D_WZ_7000E80, D_edata_800CC054, 2.5f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, - { D_WZ_70008F0, D_edata_800CBE8C, -1.0f, 100.0f, 8000.0f, 1, 0, 0, 0, 0.0f, 0 }, - { D_WZ_7000280, D_edata_800CC070, -1.0f, 1000.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 0 }, - { D_ME_600AC70, D_edata_800CBE8C, -1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, - { D_MA_601A2B0, D_MA_60364C0, 1.0f, 100.0f, 3000.0f, 1, 1, 0, 0, 0.0f, 1 }, - { D_VE1_6002500, D_VE1_601B944, -1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, - { D_VE1_60043F0, D_edata_800CBF34, -1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, - { D_VE1_6004310, D_edata_800CBF34, -1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, - { D_TR_6002740, D_TR_6009D18, -1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, - { NULL, D_edata_800CBF34, -1.0f, 500.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 0 }, - { NULL, D_edata_800CBF34, -1.0f, 500.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 0 }, - { NULL, D_edata_800CBEC4, 1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 1.0f, 1 }, - { NULL, D_edata_800CBE8C, 1.0f, 100.0f, 3000.0f, 0, 0, 6, 0, 0.0f, 0 }, - { D_MA_6002890, D_MA_60368E0, -1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, + /* 0 */ { D_ENMY_PLANET_40068F0, gDefaultCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 1 */ { D_ENMY_PLANET_4006E90, gDefaultCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 2 */ { NULL, gDefaultCubeHitbox100, 1.0f, 20000.0f, 3000.0f, 1, 0, 2, 0, 0.0f, 0 }, + /* 3 */ { D_ENMY_PLANET_4009800, gDefaultCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, + /* 4 */ { D_ENMY_PLANET_40073C0, gDefaultCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 5 */ { D_ENMY_PLANET_4007AF0, gDefaultCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 6 */ { NULL, gDefaultCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, + /* 7 */ { D_CO_6011F90, gDefaultCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 0.0f, 1 }, + /* 8 */ { D_ENMY_PLANET_4000710, gDefaultCubeHitbox100, 1.0f, 100.0f, 3000.0f, 2, 0, 1, 1, 1.0f, 1 }, + /* 9 */ { NULL, gDefaultCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 6, 0, 1.0f, 1 }, + /* 10 */ { D_ENMY_SPACE_400BD20, gDefaultCubeHitbox200, 2.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 11 */ { D_ENMY_SPACE_4001310, gDefaultCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 6, 0, 1.0f, 1 }, + /* 12 */ { D_ENMY_SPACE_400B390, gDefaultCubeHitbox100, 2.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 13 */ { D_ME_6018C00, gDefaultCubeHitbox100, 2.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 14 */ { D_ME_601F2A0, gDefaultCubeHitbox400, 7.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 15 */ { D_ENMY_SPACE_400AAE0, gDefaultCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 16 */ { D_ENMY_SPACE_4000650, gDefaultCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 6, 0, 1.0f, 1 }, + /* 17 */ { D_A6_6016190, D_A6_60282A0, -2.0f, 2100.0f, 3000.0f, 0, 0, 7, 0, 0.0f, 5 }, + /* 18 */ { D_SX_6023500, gDefaultCubeHitbox200, 2.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 19 */ { D_SX_6022DF0, gDefaultCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 20 */ { NULL, gDefaultCubeHitbox100, 1.0f, 100.0f, 3000.0f, 2, 1, 1, 0, 0.0f, 1 }, + /* 21 */ { NULL, gDefaultCubeHitbox200, 2.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 0.0f, 1 }, + /* 22 */ { NULL, gDefaultCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 0.0f, 1 }, + /* 23 */ { D_ENMY_SPACE_4008FA0, gDefaultCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 24 */ { D_SX_60285F0, D_SX_603298C, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* 25 */ { D_SX_600AF70, D_SX_6032904, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* 26 */ { D_SX_6023E30, D_SX_6032970, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* 27 */ { NULL, D_SX_603285C, 2.5f, 100.0f, 3000.0f, 2, 0, 0, 0, 1.0f, 1 }, + /* 28 */ { D_SX_6001CE0, D_SX_6032938, 3.0f, 100.0f, 3000.0f, 2, 0, 0, 0, 1.0f, 1 }, + /* 29 */ { D_SX_6000840, D_SX_6032954, 1.0f, 100.0f, 3000.0f, 2, 1, 0, 0, 1.0f, 1 }, + /* 30 */ { D_A6_6012A40, D_A6_6028254, -2.0f, 2100.0f, 3001.0f, 0, 0, 7, 0, 0.0f, 2 }, + /* 31 */ { NULL, D_A6_60280E0, -2.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 3 }, + /* 32 */ { D_SX_6009950, D_SX_6032878, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* 33 */ { NULL, gDefaultCubeHitbox200, 2.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, + /* 34 */ { D_SX_600B2B0, D_SX_6032894, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* 35 */ { D_SX_600A2E0, D_SX_60328B0, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* 36 */ { NULL, gDefaultCubeHitbox400, 2.0f, 200.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 37 */ { D_SX_600B830, gDefaultCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 38 */ { NULL, D_SX_603238C, 1.0f, 500.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, + /* 39 */ { D_SX_6020D20, D_SX_60328CC, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* 40 */ { NULL, gHitboxNone, 1.0f, 100.0f, 3001.0f, 2, 0, 0, 0, 0.0f, 1 }, + /* 41 */ { D_SY_60097E0, D_SY_6034478, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* 42 */ { D_SY_601D730, D_SY_603450C, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* 43 */ { NULL, gDefaultCubeHitbox100, 1.0f, 20000.0f, 3000.0f, 1, 0, 2, 0, 0.0f, 0 }, + /* 44 */ { D_SY_60102C0, D_SY_6034588, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* 45 */ { D_ME_6017B60, gDefaultCubeHitbox200, -1.0f, 300.0f, 3001.0f, 0, 0, 0, 0, 1.0f, 1 }, + /* 46 */ { D_ZO_6004D00, gDefaultCubeHitbox200, 1.0f, 100.0f, 3000.0f, 1, 0, 4, 0, 1.0f, 1 }, + /* 47 */ { D_ME_601A880, gDefaultCubeHitbox100, -1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, + /* 48 */ { NULL, D_SY_603405C, 0.3f, 100.0f, 3000.0f, 0, 0, 1, 0, 1.0f, 1 }, + /* 49 */ { NULL, D_SY_603405C, 0.3f, 100.0f, 3000.0f, 0, 0, 1, 0, 1.0f, 1 }, + /* 50 */ { NULL, D_SY_603405C, 0.3f, 100.0f, 3000.0f, 0, 0, 1, 0, 1.0f, 1 }, + /* 51 */ { D_SY_6015D60, D_SY_6034124, 2.0f, 100.0f, 3000.0f, 0, 0, 1, 0, 1.0f, 1 }, + /* 52 */ { NULL, D_ZO_602C1A0, -1.0f, 1000.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* 53 */ { D_SX_600B540, D_SX_60328E8, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* 54 */ { D_ENMY_SPACE_4000EC0, gDefaultCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 55 */ { D_ENMY_SPACE_4008D50, gDefaultCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 56 */ { NULL, gHitboxNone, -1.0f, 2000.0f, 3000.0f, 0, 0, 3, 0, 0.0f, 1 }, + /* 57 */ { D_SY_60102C0, gHitboxNone, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* 58 */ { D_SY_601F3D0, gHitboxNone, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* 59 */ { D_SY_6022B10, gHitboxNone, 2.0f, 100.0f, 3000.0f, 0, 0, 1, 0, 0.0f, 1 }, + /* 60 */ { D_SY_60209F0, gHitboxNone, 2.0f, 100.0f, 3000.0f, 0, 0, 1, 0, 0.0f, 1 }, + /* 61 */ { D_ME_6019430, gDefaultCubeHitbox200, 2.5f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, + /* 62 */ { D_ME_6018960, gDefaultCubeHitbox100, 2.5f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, + /* 63 */ { D_ME_6009F50, gHitboxNone, -1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, + /* 64 */ { NULL, gDefaultCubeHitbox200, 3.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, + /* 65 */ { D_ME_600C2A0, gDefaultCubeHitbox200, -1.0f, 100.0f, 8000.0f, 1, 0, 0, 0, 0.0f, 1 }, + /* 66 */ { D_ME_600BD40, gDefaultCubeHitbox100, -1.0f, 100.0f, 8000.0f, 1, 0, 0, 0, 0.0f, 1 }, + /* 67 */ { NULL, D_ME_602F604, 3.0f, 100.0f, 3000.0f, 2, 0, 1, 0, 1.0f, 1 }, + /* 68 */ { D_SY_60205D0, D_SY_603445C, 3.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, + /* 69 */ { D_SY_60036A0, D_SY_6034664, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* 70 */ { D_SY_601AD70, gHitboxNone, 4.0f, 100.0f, 3000.0f, 0, 0, 1, 0, 0.0f, 1 }, + /* 71 */ { D_arwing_3007650, gHitboxNone, 1.0f, 100.0f, 3000.0f, 2, 0, 5, 0, 0.0f, 1 }, + /* 72 */ { D_SY_60034D0, D_SY_60347D4, 3.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, + /* 73 */ { D_SY_6005360, D_SY_6034770, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* 74 */ { D_SY_600F6C0, D_SY_60347F0, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* 75 */ { D_SY_601B610, gHitboxNone, -1.0f, 10000.0f, 3001.0f, 0, 0, 1, 0, 0.0f, 1 }, + /* 76 */ { D_SY_601C6A0, gHitboxNone, -1.0f, 10000.0f, 3001.0f, 0, 0, 1, 0, 0.0f, 1 }, + /* 77 */ { D_SY_60188D0, D_SY_603486C, 3.0f, 100.0f, 3001.0f, 0, 0, 1, 0, 0.0f, 1 }, + /* 78 */ { NULL, gDefaultCubeHitbox150, 1.0f, 100.0f, 3000.0f, 2, 0, 0, 0, 1.0f, 0 }, + /* 79 */ { NULL, D_ZO_602C294, 1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 1.0f, 1 }, + /* 80 */ { NULL, D_VE1_601B474, -1.0f, 100.0f, 3000.0f, 2, 0, 0, 0, 0.0f, 1 }, + /* 81 */ { NULL, gHitboxNone, -1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* 82 */ { NULL, gDefaultCubeHitbox100, 2.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 83 */ { NULL, D_AQ_6030B4C, 1.0f, 100.0f, 3000.0f, 2, 0, 0, 0, 60.0f, 1 }, + /* 84 */ { D_VE1_9012180, D_VE1_601B43C, -1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* 85 */ { NULL, gDefaultCubeHitbox100, 1.0f, 20000.0f, 3000.0f, 1, 0, 2, 0, 0.0f, 0 }, + /* 86 */ { NULL, gDefaultCubeHitbox100, 1.0f, 20000.0f, 3000.0f, 1, 0, 2, 0, 0.0f, 0 }, + /* 87 */ { D_VE1_900EFC0, gHitboxNone, 1.0f, 100.0f, 3000.0f, 1, 1, 0, 0, 0.0f, 1 }, + /* 88 */ { NULL, D_AQ_6030B30, 1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, + /* 89 */ { NULL, D_AQ_6030B14_f32, 1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, + /* 90 */ { D_MA_601C520, D_MA_60368FC, 1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, + /* 91 */ { D_MA_600AF40, D_MA_60368E0, -1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, + /* 92 */ { D_WZ_7000C40, gWarpZoneEvent92Hitbox, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* 93 */ { D_WZ_70010E0, gWarpZoneEvent93Hitbox, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* 94 */ { D_WZ_7000E80, gWarpZoneEvent94Hitbox, 2.5f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, + /* 95 */ { D_WZ_70008F0, gDefaultCubeHitbox100, -1.0f, 100.0f, 8000.0f, 1, 0, 0, 0, 0.0f, 0 }, + /* 96 */ { D_WZ_7000280, gWarpZoneEvent96Hitbox, -1.0f, 1000.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 0 }, + /* 97 */ { D_ME_600AC70, gDefaultCubeHitbox100, -1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, + /* 98 */ { D_MA_601A2B0, D_MA_60364C0, 1.0f, 100.0f, 3000.0f, 1, 1, 0, 0, 0.0f, 1 }, + /* 99 */ { D_VE1_6002500, D_VE1_601B944, -1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* 100 */ { D_VE1_60043F0, gHitboxNone, -1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* 101 */ { D_VE1_6004310, gHitboxNone, -1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* 102 */ { D_TR_6002740, D_TR_6009D18, -1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* 103 */ { NULL, gHitboxNone, -1.0f, 500.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* 104 */ { NULL, gHitboxNone, -1.0f, 500.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* 105 */ { NULL, gDefaultCubeHitbox200, 1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 1.0f, 1 }, + /* 106 */ { NULL, gDefaultCubeHitbox100, 1.0f, 100.0f, 3000.0f, 0, 0, 6, 0, 0.0f, 0 }, + /* 107 */ { D_MA_6002890, D_MA_60368E0, -1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, }; static u8 D_800D0DBC[6][4] = { // could be in-function @@ -986,7 +987,7 @@ static u8 D_800D0DBC[6][4] = { { 80, 255, 80, 255 }, { 255, 80, 80, 255 }, { 255, 255, 80, 255 }, }; -void ActorEvent_ProcessScript(Actor* this) { +void ActorEvent_ProcessScript(ActorEvent* this) { u16** levelScripts; u16* actorScript; u16* msg; @@ -1075,7 +1076,7 @@ void ActorEvent_ProcessScript(Actor* this) { if ((this->unk_0B4 >= EINFO_200) && (this->unk_0B4 < EINFO_300)) { this->unk_046 = 100; - this->info.hitbox = D_edata_800CBEC4; + this->info.hitbox = gDefaultCubeHitbox200; this->info.unk_1C = 1.0f; for (i = 0; i < 2; i++) { @@ -1181,10 +1182,10 @@ void ActorEvent_ProcessScript(Actor* this) { ActorEvent_ProcessScript(this); break; - case EV_OPC(EVOP_SET_IWORK_12): + case EV_OPC(EVOP_SET_TEAM_ID): this->iwork[12] = actorScript[this->aiIndex + 1]; - if (this->iwork[12] < 4) { + if (this->iwork[12] <= TEAM_ID_PEPPY) { D_enmy2_800CFF80[this->iwork[12]] = this->index; } @@ -1212,16 +1213,16 @@ void ActorEvent_ProcessScript(Actor* this) { break; case EV_OPC(EVOP_SET_ACTION): - if (actorScript[this->aiIndex + 1] == EVACT_14) { - this->state = EVSTATE_10; + if (actorScript[this->aiIndex + 1] == EVACT_ME_AS_OPEN) { + this->state = EVSTATE_ME_AS_OPEN; this->fwork[11] = 0.0f; this->aiIndex += 2; break; } - if (actorScript[this->aiIndex + 1] == EVACT_15) { - this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_edata_800CBEC4); - this->state = EVSTATE_11; + if (actorScript[this->aiIndex + 1] == EVACT_ME_AS_CLOSE) { + this->info.hitbox = SEGMENTED_TO_VIRTUAL(gDefaultCubeHitbox200); + this->state = EVSTATE_ME_AS_CLOSE; this->aiIndex += 2; break; } @@ -1262,18 +1263,18 @@ void ActorEvent_ProcessScript(Actor* this) { break; case EV_OPC(EVOP_SET_GROUND): - if ((D_ctx_80161A88 == 2) && (actorScript[this->aiIndex + 1] != 2)) { + if ((gGroundType == GROUNDTYPE_WATER) && (actorScript[this->aiIndex + 1] != 2)) { Audio_KillSfxBySourceAndId(gPlayer[0].sfxSource, 0x1100000B); } - D_ctx_80161A88 = actorScript[this->aiIndex + 1]; + gGroundType = actorScript[this->aiIndex + 1]; this->aiIndex += 2; ActorEvent_ProcessScript(this); this->obj.status = OBJ_FREE; break; case EV_OPC(EVOP_SET_CALL): - D_enmy2_800CFF90 = actorScript[this->aiIndex] & 0x1FF; - D_enmy2_80161690 = actorScript[this->aiIndex + 1]; + gCallVoiceParam = actorScript[this->aiIndex] & 0x1FF; + gCallTimer = actorScript[this->aiIndex + 1]; this->aiIndex += 2; ActorEvent_ProcessScript(this); break; @@ -1370,16 +1371,16 @@ void ActorEvent_ProcessScript(Actor* this) { this->aiIndex += 2; break; - case EV_OPC(EVOP_SET_IWORK_1_TO_IWORK_12): - this->state = EVSTATE_1; + case EV_OPC(EVOP_SET_TARGET): + this->state = EVSTATE_WAIT; this->iwork[1] = D_enmy2_800CFF80[actorScript[this->aiIndex] & 0x1FF]; this->fwork[17] = actorScript[this->aiIndex + 1]; this->timer_0BC = 0; this->aiIndex += 2; break; - case EV_OPC(EVOP_SET_STATE_13): - this->state = EVSTATE_13; + case EV_OPC(EVOP_CHASE_TARGET): + this->state = EVSTATE_CHASE_TARGET; this->timer_0BC = actorScript[this->aiIndex + 1]; this->fwork[24] = actorScript[this->aiIndex] & 0x1FF; this->aiIndex += 2; @@ -1421,8 +1422,8 @@ void ActorEvent_ProcessScript(Actor* this) { ActorEvent_ProcessScript(this); break; - case EV_OPC(EVOP_SET_STATE_1): - this->state = EVSTATE_1; + case EV_OPC(EVOP_SET_WAIT): + this->state = EVSTATE_WAIT; this->timer_0BC = actorScript[this->aiIndex + 1]; this->aiIndex += 2; break; @@ -1432,7 +1433,7 @@ void ActorEvent_ProcessScript(Actor* this) { this->fwork[1] = this->fwork[0]; this->iwork[5] = EV_ZMODE_MASK(actorScript[this->aiIndex]); this->timer_0BC = actorScript[this->aiIndex + 1]; - this->state = EVSTATE_1; + this->state = EVSTATE_WAIT; this->aiIndex += 2; break; @@ -1446,7 +1447,7 @@ void ActorEvent_ProcessScript(Actor* this) { this->fwork[1] = actorScript[this->aiIndex] & 0x7F; this->iwork[5] = EV_ZMODE_MASK(actorScript[this->aiIndex]); this->timer_0BC = actorScript[this->aiIndex + 1]; - this->state = EVSTATE_1; + this->state = EVSTATE_WAIT; this->aiIndex += 2; break; @@ -1553,7 +1554,7 @@ void ActorEvent_ProcessScript(Actor* this) { } } -void ActorEvent_UpdateTexLines(Actor* this) { +void ActorEvent_UpdateTexLines(ActorEvent* this) { if ((this->iwork[7] != 0) && (gTexturedLines[this->iwork[8]].mode != 0)) { gTexturedLines[this->iwork[8]].unk_10.x = this->obj.pos.x; gTexturedLines[this->iwork[8]].unk_10.y = this->obj.pos.y; @@ -1736,51 +1737,50 @@ void ActorEvent_8006F1EC(f32 xPos, f32 yPos, f32 zPos, f32 arg3) { } } -void ActorEvent_8006F254(Actor* actor) { +void ActorEvent_8006F254(ActorEvent* this) { Vec3f sp54; Vec3f sp48; - Matrix_RotateY(gCalcMatrix, actor->vwork[29].y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, actor->vwork[29].x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, (actor->vwork[29].z + actor->unk_0F4.z) * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, actor->unk_0F4.y * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, actor->unk_0F4.x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, this->vwork[29].y * M_DTOR, 0); + Matrix_RotateX(gCalcMatrix, this->vwork[29].x * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, (this->vwork[29].z + this->unk_0F4.z) * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, this->unk_0F4.y * M_DTOR, 1); + Matrix_RotateX(gCalcMatrix, this->unk_0F4.x * M_DTOR, 1); sp54.x = 0.0f; sp54.y = 0.0f; - sp54.z = D_ctx_80177828; + sp54.z = gEnemyShotSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48); - func_effect_8007F04C(OBJ_EFFECT_353, actor->obj.pos.x + sp48.x, actor->obj.pos.y + sp48.y, - actor->obj.pos.z + sp48.z, actor->obj.rot.x, actor->obj.rot.y, actor->obj.rot.z, - actor->vwork[29].x, actor->vwork[29].y, actor->vwork[29].z + actor->unk_0F4.z, sp48.x, sp48.y, - sp48.z, 1.0f); + func_effect_8007F04C(OBJ_EFFECT_353, this->obj.pos.x + sp48.x, this->obj.pos.y + sp48.y, this->obj.pos.z + sp48.z, + this->obj.rot.x, this->obj.rot.y, this->obj.rot.z, this->vwork[29].x, this->vwork[29].y, + this->vwork[29].z + this->unk_0F4.z, sp48.x, sp48.y, sp48.z, 1.0f); } -void ActorEvent_ProcessActions(Actor* this) { +void ActorEvent_ProcessActions(ActorEvent* this) { s32 var_v1; Vec3f sp78; Vec3f sp6C; - Object_4C* obj4C; + Sprite* sprite; if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) && (this->unk_0B4 != EINFO_52) && (this->unk_0B4 != EINFO_103) && (this->unk_0B4 != EINFO_104) && (this->unk_0B4 != EINFO_48) && (this->unk_0B4 != EINFO_49) && (this->unk_0B4 != EINFO_50)) { switch (this->unk_048) { - case EVACT_0: + case EVACT_NONE: break; case EVACT_1: ActorEvent_8006F254(this); - this->unk_048 = EVACT_0; + this->unk_048 = EVACT_NONE; break; case EVACT_2: if (this->obj.pos.z < (gPlayer[0].unk_138 - 600.0f)) { func_effect_8007F11C(OBJ_EFFECT_353, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, - D_ctx_80177828); + gEnemyShotSpeed); } - this->unk_048 = EVACT_0; + this->unk_048 = EVACT_NONE; break; case EVACT_3: @@ -1796,14 +1796,14 @@ void ActorEvent_ProcessActions(Actor* this) { this->timer_0C2 = 2; this->timer_04C--; if (this->timer_04C <= 0) { - this->unk_048 = EVACT_0; + this->unk_048 = EVACT_NONE; } } break; case EVACT_4: ActorEvent_8006EB64(this->obj.pos.x, this->obj.pos.y - 20.0f, this->obj.pos.z); - this->unk_048 = EVACT_0; + this->unk_048 = EVACT_NONE; break; case EVACT_5: @@ -1815,29 +1815,29 @@ void ActorEvent_ProcessActions(Actor* this) { sp78.x = 0.0f; sp78.y = 0.0f; - sp78.z = D_ctx_80177828; + sp78.z = gEnemyShotSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp78, &sp6C); func_effect_8007F04C(OBJ_EFFECT_355, this->obj.pos.x + sp6C.x, this->obj.pos.y + sp6C.y, this->obj.pos.z + sp6C.z, this->obj.rot.x, this->obj.rot.y, this->obj.rot.z, this->vwork[29].x, this->vwork[29].y, this->vwork[29].z + this->unk_0F4.z, sp6C.x, sp6C.y, sp6C.z, 1.0f); - this->unk_048 = EVACT_0; + this->unk_048 = EVACT_NONE; break; case EVACT_6: if (this->obj.pos.z < (gPlayer[0].unk_138 - 600.0f)) { func_effect_8007F11C(OBJ_EFFECT_355, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, - D_ctx_80177828); + gEnemyShotSpeed); } - this->unk_048 = EVACT_0; + this->unk_048 = EVACT_NONE; break; case EVACT_7: if (this->obj.pos.z < (gPlayer[0].unk_138 - 600.0f)) { func_effect_8007F11C(OBJ_EFFECT_356, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 60.0f); } - this->unk_048 = EVACT_0; + this->unk_048 = EVACT_NONE; break; case EVACT_8: @@ -1845,10 +1845,11 @@ void ActorEvent_ProcessActions(Actor* this) { sp6C.y = gPlayer[0].pos.y; gPlayer[0].pos.x += RAND_FLOAT_CENTERED(300.0f); gPlayer[0].pos.y += RAND_FLOAT_CENTERED(300.0f); - func_effect_8007F11C(OBJ_EFFECT_353, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, D_ctx_80177828); + func_effect_8007F11C(OBJ_EFFECT_353, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, + gEnemyShotSpeed); gPlayer[0].pos.x = sp6C.x; gPlayer[0].pos.y = sp6C.y; - this->unk_048 = EVACT_0; + this->unk_048 = EVACT_NONE; break; case EVACT_9: @@ -1872,13 +1873,13 @@ void ActorEvent_ProcessActions(Actor* this) { case EVACT_11: func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, this->vel.z, this->scale * 3.0f, 15); - func_enmy_80066254(this); + Actor_Despawn(this); Object_Kill(&this->obj, this->sfxSource); func_effect_8007A6F0(&this->obj.pos, 0x2903B009); break; - case EVACT_12: - func_enmy_80066254(this); + case EVACT_DESPAWN: + Actor_Despawn(this); Object_Kill(&this->obj, this->sfxSource); break; @@ -1893,40 +1894,40 @@ void ActorEvent_ProcessActions(Actor* this) { ActorEvent_8006EC60(this->obj.pos.x, this->obj.pos.y - 50.0f, this->obj.pos.z); } if (this->timer_0BE == 0) { - this->unk_048 = EVACT_0; + this->unk_048 = EVACT_NONE; } break; case EVACT_16: func_effect_8007F11C(OBJ_EFFECT_353, this->obj.pos.x + 190.0f, this->obj.pos.y + 90.0f, - this->obj.pos.z + 220.0f, D_ctx_80177828); + this->obj.pos.z + 220.0f, gEnemyShotSpeed); func_effect_8007F11C(OBJ_EFFECT_353, this->obj.pos.x - 190.0f, this->obj.pos.y + 90.0f, - this->obj.pos.z + 220.0f, D_ctx_80177828); - this->unk_048 = EVACT_0; + this->obj.pos.z + 220.0f, gEnemyShotSpeed); + this->unk_048 = EVACT_NONE; break; case EVACT_17: if (this->obj.pos.z < (gPlayer[0].camEye.z - 600.0f)) { func_effect_8007F20C(OBJ_EFFECT_353, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, - D_ctx_80177828); + gEnemyShotSpeed); } - this->unk_048 = EVACT_0; + this->unk_048 = EVACT_NONE; break; - case EVACT_18: - for (var_v1 = 0, obj4C = gObjects4C; var_v1 < 40; var_v1++, obj4C++) { + case EVACT_GFOX_COVER_FIRE: + for (var_v1 = 0, sprite = gSprites; var_v1 < 40; var_v1++, sprite++) { - if ((obj4C->obj.status == OBJ_ACTIVE) && (obj4C->obj.id == OBJ_4C_175)) { + if ((sprite->obj.status == OBJ_ACTIVE) && (sprite->obj.id == OBJ_SPRITE_GFOX_TARGET)) { f32 sp64; f32 sp60; f32 sp5C; f32 sp58; f32 sp54; - obj4C->obj.status = OBJ_FREE; - sp64 = obj4C->obj.pos.x - this->obj.pos.x; - sp60 = obj4C->obj.pos.y - this->obj.pos.y; - sp5C = obj4C->obj.pos.z - this->obj.pos.z; + sprite->obj.status = OBJ_FREE; + sp64 = sprite->obj.pos.x - this->obj.pos.x; + sp60 = sprite->obj.pos.y - this->obj.pos.y; + sp5C = sprite->obj.pos.z - this->obj.pos.z; sp54 = Math_Atan2F(sp64, sp5C); sp54 = Math_RadToDeg(sp54); sp58 = -Math_Atan2F(sp60, sqrtf(SQ(sp64) + SQ(sp5C))); @@ -1943,18 +1944,18 @@ void ActorEvent_ProcessActions(Actor* this) { } } - this->unk_048 = EVACT_0; + this->unk_048 = EVACT_NONE; break; case EVACT_19: func_effect_80083D2C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 40.0f); - this->unk_048 = EVACT_0; + this->unk_048 = EVACT_NONE; break; } } } -void ActorEvent_8006FE28(Actor* this) { +void ActorEvent_8006FE28(ActorEvent* this) { if ((fabsf(this->obj.pos.x - gPlayer[0].pos.x) < 100.0f) && (fabsf(this->obj.pos.y - gPlayer[0].pos.y) < 100.0f) && (fabsf(this->obj.pos.z - gPlayer[0].unk_138) < 50.0f)) { func_enmy_80067A40(); @@ -1963,7 +1964,7 @@ void ActorEvent_8006FE28(Actor* this) { } } -void ActorEvent_8006FEEC(Actor* this) { +void ActorEvent_8006FEEC(ActorEvent* this) { s32 i; if ((this->unk_0D0 != 0) && (this->health != 0)) { @@ -1977,7 +1978,7 @@ void ActorEvent_8006FEEC(Actor* this) { RAND_FLOAT(10.0f), 41, this->scale, 200, i); } this->itemDrop = DROP_NONE; - func_enmy_80066254(this); + Actor_Despawn(this); Object_Kill(&this->obj, this->sfxSource); func_effect_8007A6F0(&this->obj.pos, 0x29018036); func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 4.0f); @@ -1987,9 +1988,9 @@ void ActorEvent_8006FEEC(Actor* this) { } } -bool ActorEvent_800700A4(Actor* this) { - if ((this->state != EVSTATE_TEAM_RETREAT) && (this->iwork[12] > 0) && (this->iwork[12] < 4) && - (gTeamShields[this->iwork[12]] <= 0)) { +bool ActorEvent_800700A4(ActorEvent* this) { + if ((this->state != EVSTATE_TEAM_RETREAT) && (this->iwork[12] >= TEAM_ID_FALCO) && + (this->iwork[12] <= TEAM_ID_PEPPY) && (gTeamShields[this->iwork[12]] <= 0)) { this->state = EVSTATE_TEAM_RETREAT; this->iwork[2] = 0; this->fwork[10] = 360.0f; @@ -1997,13 +1998,13 @@ bool ActorEvent_800700A4(Actor* this) { gTeamShields[this->iwork[12]] = 1; switch (this->iwork[12]) { - case 1: + case TEAM_ID_FALCO: Radio_PlayMessage(gMsg_ID_20220, RCID_FALCO); break; - case 2: + case TEAM_ID_SLIPPY: Radio_PlayMessage(gMsg_ID_20222, RCID_SLIPPY); break; - case 3: + case TEAM_ID_PEPPY: Radio_PlayMessage(gMsg_ID_20221, RCID_PEPPY); break; } @@ -2016,7 +2017,7 @@ bool ActorEvent_800700A4(Actor* this) { return false; } -void ActorEvent_800701E0(Actor* this) { +void ActorEvent_800701E0(ActorEvent* this) { Vec3f sp3C; f32 var_fv1; f32 temp_fv1; @@ -2034,11 +2035,11 @@ void ActorEvent_800701E0(Actor* this) { if ((this->unk_0D0 != 0) && (((this->unk_0B4 == EINFO_64) && (this->unk_0D2 == 2)) || (this->unk_0B4 != EINFO_64))) { - if (this->iwork[12] >= 4) { + if (this->iwork[12] >= TEAM_ID_KATT) { this->damage = 0; } - if ((this->iwork[12] > 0) && (this->iwork[12] < 4)) { + if ((this->iwork[12] >= TEAM_ID_FALCO) && (this->iwork[12] <= TEAM_ID_PEPPY)) { gTeamShields[this->iwork[12]] -= this->damage; } else if ((this->unk_0B4 == EINFO_83) && ((this->damage == 30) || (this->damage == 31))) { this->health = 0; @@ -2174,7 +2175,7 @@ void ActorEvent_800701E0(Actor* this) { if (this->unk_0D4 == 1) { switch (this->iwork[12]) { - case 1: + case TEAM_ID_FALCO: if (this->unk_0D0 == 3) { ActorEvent_SetMessage(gMsg_ID_20210, RCID_FALCO); } else { @@ -2182,7 +2183,7 @@ void ActorEvent_800701E0(Actor* this) { } break; - case 3: + case TEAM_ID_PEPPY: if (this->unk_0D0 == 3) { ActorEvent_SetMessage(gMsg_ID_20200, RCID_PEPPY); } else { @@ -2190,7 +2191,7 @@ void ActorEvent_800701E0(Actor* this) { } break; - case 2: + case TEAM_ID_SLIPPY: if (this->unk_0D0 == 3) { ActorEvent_SetMessage(gMsg_ID_20190, RCID_SLIPPY); } else { @@ -2198,11 +2199,11 @@ void ActorEvent_800701E0(Actor* this) { } break; - case 4: + case TEAM_ID_KATT: ActorEvent_SetMessage(gMsg_ID_20084, RCID_KATT); break; - case 5: + case TEAM_ID_BILL: ActorEvent_SetMessage(gMsg_ID_20085, RCID_BILL); break; } @@ -2233,7 +2234,7 @@ void ActorEvent_800701E0(Actor* this) { } } -void ActorEvent_80070BA8(Actor* this) { +void ActorEvent_80070BA8(ActorEvent* this) { if (this->unk_0D0 != 0) { this->unk_0D0 = 0; if ((this->unk_0B4 != EINFO_17) || ((this->unk_0B4 == EINFO_17) && (this->unk_0D2 == 0))) { @@ -2253,7 +2254,7 @@ void ActorEvent_80070BA8(Actor* this) { } } -void ActorEvent_80070CEC(Actor* this) { +void ActorEvent_80070CEC(ActorEvent* this) { if (this->iwork[3] < 200) { this->aiIndex = this->iwork[3] * 2; this->iwork[0] = 0; @@ -2268,13 +2269,13 @@ void ActorEvent_80070CEC(Actor* this) { } } -void ActorEvent_ProcessTriggers(Actor* this) { +void ActorEvent_ProcessTriggers(ActorEvent* this) { s32 i; s32 var_v1 = 0; s32 var_v1_4; Actor* otherActor; - for (i = 1; i < 4; i++) { + for (i = TEAM_ID_FALCO; i <= TEAM_ID_PEPPY; i++) { if (gTeamShields[i] > 0) { var_v1++; } @@ -2323,114 +2324,114 @@ void ActorEvent_ProcessTriggers(Actor* this) { break; case EVC_FALCO_ACTIVE: - if (gTeamShields[1] > 0) { + if (gTeamShields[TEAM_ID_FALCO] > 0) { ActorEvent_80070CEC(this); } break; case EVC_PEPPY_ACTIVE: - if (gTeamShields[3] > 0) { + if (gTeamShields[TEAM_ID_PEPPY] > 0) { ActorEvent_80070CEC(this); } break; case EVC_SLIPPY_ACTIVE: - if (gTeamShields[2] > 0) { + if (gTeamShields[TEAM_ID_SLIPPY] > 0) { ActorEvent_80070CEC(this); } break; - case EVC_9: + 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); } break; - case EVC_10: + 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); } break; - case EVC_11: + 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); } break; - case EVC_12: + 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); } break; - case EVC_13: + 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); } break; - case EVC_14: + 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); } break; - case EVC_15: + 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); } break; - case EVC_16: + 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); } break; - case EVC_17: + 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); } break; - case EVC_18: + 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); } break; - case EVC_19: + 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); } break; - case EVC_20: + 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); } break; - case EVC_21: + 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); } break; - case EVC_22: + 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); } break; - case EVC_23: + 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); } break; - case EVC_24: + 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); } @@ -2466,31 +2467,31 @@ void ActorEvent_ProcessTriggers(Actor* this) { } break; - case EVC_30: + case EVC_UNK270_5PLUS: if (gPlayer[0].unk_270 >= 5) { ActorEvent_80070CEC(this); } break; - case EVC_31: + case EVC_UNK270_NONZERO: if (gPlayer[0].unk_270 != 0) { ActorEvent_80070CEC(this); } break; - case EVC_32: + case EVC_UNK270_ZERO: if (gPlayer[0].unk_270 == 0) { ActorEvent_80070CEC(this); } break; - case EVC_33: + case EVC_UNK250_GREATER_168: if (gPlayer[0].unk_250 >= 16.8f) { ActorEvent_80070CEC(this); } break; - case EVC_34: + case EVC_UNK250_LESS_84: if (gPlayer[0].unk_250 <= 8.4f) { ActorEvent_80070CEC(this); } @@ -2520,7 +2521,7 @@ void ActorEvent_ProcessTriggers(Actor* this) { } break; - case EVC_39: + case EVC_SHOT_CLOSE_150: for (i = 0; i < ARRAY_COUNT(gPlayerShots); i++) { if ((gPlayerShots[i].obj.status == 1) && (fabsf(this->obj.pos.x - gPlayerShots[i].obj.pos.x) < 150.0f) && @@ -2532,7 +2533,7 @@ void ActorEvent_ProcessTriggers(Actor* this) { } break; - case EVC_40: + case EVC_SHOT_CLOSE_300: for (i = 0; i < ARRAY_COUNT(gPlayerShots); i++) { if ((gPlayerShots[i].obj.status == 1) && (fabsf(this->obj.pos.x - gPlayerShots[i].obj.pos.x) < 300.0f) && @@ -2571,13 +2572,13 @@ void ActorEvent_ProcessTriggers(Actor* this) { } break; - case EVC_44: + case EVC_TOOK_DAMAGE: if (this->unk_0D0 != 0) { ActorEvent_80070CEC(this); } break; - case EVC_45: + case EVC_PASSED_ALL_RINGS: var_v1_4 = 7; switch (gCurrentLevel) { case LEVEL_CORNERIA: @@ -2590,7 +2591,8 @@ void ActorEvent_ProcessTriggers(Actor* this) { break; } - if (!((gCurrentLevel == LEVEL_CORNERIA) && (gTeamShields[1] <= 0)) && (D_ctx_80177E80 >= var_v1_4)) { + if (!((gCurrentLevel == LEVEL_CORNERIA) && (gTeamShields[TEAM_ID_FALCO] <= 0)) && + (gRingPassCount >= var_v1_4)) { ActorEvent_80070CEC(this); } break; @@ -2607,8 +2609,8 @@ void ActorEvent_ProcessTriggers(Actor* this) { case EVC_PRESS_CRIGHT: if (gControllerPress[gMainController].button & R_CBUTTONS) { func_8001AF40(0); - D_enmy2_800CFF90 = 0; - D_enmy2_80161690 = 0; + gCallVoiceParam = 0; + gCallTimer = 0; ActorEvent_80070CEC(this); } break; @@ -2709,8 +2711,8 @@ void ActorEvent_ProcessTriggers(Actor* this) { } break; - case EVC_64: - if (D_enmy_80161684 != 0) { + case EVC_MISSED_SEARCHLIGHT: + if (gMissedZoSearchlight) { ActorEvent_80070CEC(this); } break; @@ -2776,7 +2778,7 @@ static Vec3f D_800D1194[21] = { { 453.0f, 420.0f, 67.0f }, }; -void ActorEvent_80071DC0(Actor* this) { +void ActorEvent_80071DC0(ActorEvent* this) { s32 rInd; Vec3f sp38; @@ -2799,17 +2801,17 @@ void ActorEvent_80071DC0(Actor* this) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_800D1194[rInd], &sp38); } - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { func_effect_8007C120(this->obj.pos.x + sp38.x, this->obj.pos.y + sp38.y, this->obj.pos.z + sp38.z, this->vel.x, this->vel.y, this->vel.z, 0.3f, 20); } - if (!(gGameFrameCount & 7)) { + if (((gGameFrameCount % 8) == 0)) { func_effect_8007BFFC(this->obj.pos.x + sp38.x, this->obj.pos.y + sp38.y, this->obj.pos.z + sp38.z, this->vel.x, this->vel.y, this->vel.z, 10.0f, 9); } - if (!(gGameFrameCount & 0xF)) { + if (((gGameFrameCount % 16) == 0)) { AUDIO_PLAY_SFX(0x2903B009, this->sfxSource, 4); } @@ -2818,12 +2820,12 @@ void ActorEvent_80071DC0(Actor* this) { this->obj.rot.x += 0.2f; this->obj.rot.z += 0.3f; - if (!(gGameFrameCount & 7) && (Rand_ZeroOne() < 0.5f)) { + if (((gGameFrameCount % 8) == 0) && (Rand_ZeroOne() < 0.5f)) { this->timer_0C6 = 4; } } -void ActorEvent_800720E8(Actor* this) { +void ActorEvent_800720E8(ActorEvent* this) { switch (this->unk_046) { case 0: if (this->unk_0D0 != 0) { @@ -2899,10 +2901,10 @@ void ActorEvent_8007240C(f32 xPos, f32 yPos, f32 zPos, f32 yRot) { } } -void ActorEvent_80072474(Actor* this) { +void ActorEvent_80072474(ActorEvent* this) { f32 var_fv1; - if (this->unk_048 != EVACT_0) { + if (this->unk_048 != EVACT_NONE) { switch (this->unk_048) { case EVACT_1: this->fwork[16] = 45.0f; @@ -2917,7 +2919,7 @@ void ActorEvent_80072474(Actor* this) { this->iwork[15] = 0; break; } - this->unk_048 = EVACT_0; + this->unk_048 = EVACT_NONE; } if (this->iwork[15] != 0) { @@ -2932,7 +2934,7 @@ void ActorEvent_80072474(Actor* this) { } static Vec3f D_800D1290 = { 0.0f, 837.00006f, 0.0f }; // could be in-function -void ActorEvent_Update(Actor* this) { +void ActorEvent_Update(ActorEvent* this) { s32 spFC; f32 var_fv0; s32 var_s0; @@ -2944,7 +2946,7 @@ void ActorEvent_Update(Actor* this) { f32 spDC = 0.0f; f32 spD8 = 0.0f; f32 spD4 = 0.0f; - s32 pad; + s32 index; f32 spCC; f32 spC8; f32 spC4; @@ -2960,7 +2962,7 @@ void ActorEvent_Update(Actor* this) { if (this->state == EVSTATE_1000) { this->obj.rot.y += this->fwork[15]; this->obj.rot.x += this->fwork[16]; - if (!(gGameFrameCount & 0xF)) { + if (((gGameFrameCount % 16) == 0)) { func_effect_8007C120(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, this->vel.z, 0.3f, 10); } @@ -3006,15 +3008,15 @@ void ActorEvent_Update(Actor* this) { } if ((this->unk_0B4 == EINFO_27) && (this->timer_0C2 != 0)) { - this->state = EVSTATE_0; + this->state = EVSTATE_READY; } switch (this->state) { - case EVSTATE_0: + case EVSTATE_READY: ActorEvent_ProcessScript(this); break; - case EVSTATE_1: + case EVSTATE_WAIT: if (this->timer_0BC == 0) { ActorEvent_ProcessScript(this); } @@ -3064,7 +3066,7 @@ void ActorEvent_Update(Actor* this) { Math_SmoothStepToAngle(&this->obj.rot.y, spE0, 0.2f, this->fwork[24], 0.001f); Math_SmoothStepToAngle(&this->fwork[15], spE4, 0.2f, this->fwork[24], 0.001f); - if (!(this->timer_0BC & 0x1F) && (spFC == 0)) { + if (((this->timer_0BC % 32) == 0) && (spFC == 0)) { Matrix_RotateY(gCalcMatrix, this->vwork[29].y * M_DTOR, 0); Matrix_RotateX(gCalcMatrix, this->vwork[29].x * M_DTOR, 1); Matrix_RotateZ(gCalcMatrix, (this->vwork[29].z + this->unk_0F4.z) * M_DTOR, 1); @@ -3079,7 +3081,7 @@ void ActorEvent_Update(Actor* this) { spB8.x = 0.0f; spB8.y = 0.0f; - spB8.z = D_ctx_80177828; + spB8.z = gEnemyShotSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &spB8, &spAC); @@ -3138,12 +3140,12 @@ void ActorEvent_Update(Actor* this) { } break; - case EVSTATE_13: + case EVSTATE_CHASE_TARGET: spDC = SIN_DEG((this->index * 45) + gGameFrameCount) * this->fwork[17]; spD8 = COS_DEG((this->index * 45) + (gGameFrameCount * 2)) * this->fwork[17]; - pad = this->iwork[1]; - pad = gActors[pad].iwork[12]; - D_enmy_Timer_80161670[pad] = 5; + index = this->iwork[1]; + index = gActors[index].iwork[12]; + D_enmy_Timer_80161670[index] = 5; /* fallthrough */ case EVSTATE_8: case EVSTATE_9: @@ -3213,7 +3215,7 @@ void ActorEvent_Update(Actor* this) { } break; - case EVSTATE_10: + case EVSTATE_ME_AS_OPEN: var_s0 = 0; if (Math_SmoothStepToAngle(&this->obj.rot.x, 0.0f, 0.3f, 10.0f, 1.0f) == 0.0f) { var_s0++; @@ -3233,7 +3235,7 @@ void ActorEvent_Update(Actor* this) { } break; - case EVSTATE_11: + case EVSTATE_ME_AS_CLOSE: if (Math_SmoothStepToF(&this->fwork[15], 0.0f, 0.3f, 10.0f, 1.0f) == 0.0f) { ActorEvent_ProcessScript(this); } @@ -3410,7 +3412,7 @@ void ActorEvent_Update(Actor* this) { case EINFO_94: case EINFO_95: case EINFO_96: - if (!(gGameFrameCount & 7)) { + if (((gGameFrameCount % 8) == 0)) { this->fwork[18] = RAND_FLOAT(255.0f); this->fwork[19] = RAND_FLOAT(255.0f); this->fwork[20] = RAND_FLOAT(255.0f); @@ -3426,7 +3428,7 @@ void ActorEvent_Update(Actor* this) { if (Math_SmoothStepToF(&this->obj.pos.y, spEC, 0.5f, 7.0f, 0.0f) >= 0.0f) { spF0 = 350.0f; - if (!(gGameFrameCount & 3)) { + if (((gGameFrameCount % 4) == 0)) { ActorEvent_8007240C(this->obj.pos.x, spEC, this->obj.pos.z, this->obj.rot.y); AUDIO_PLAY_SFX(0x19800017, this->sfxSource, 4); } @@ -3555,7 +3557,7 @@ void ActorEvent_Update(Actor* this) { break; } - if ((fabsf(this->fwork[0]) > 10.0f) && !(gGameFrameCount & 1)) { + if ((fabsf(this->fwork[0]) > 10.0f) && ((gGameFrameCount % 2) == 0)) { effect = func_effect_8007783C(OBJ_EFFECT_394); if (effect != NULL) { Matrix_RotateZ(gCalcMatrix, this->unk_0F4.z * M_DTOR, 0); @@ -3586,7 +3588,7 @@ void ActorEvent_Update(Actor* this) { } } - if (!(gGameFrameCount & 3)) { + if (((gGameFrameCount % 4) == 0)) { effect = func_effect_8007783C(OBJ_EFFECT_394); if (effect != NULL) { effect->unk_78 = effect->unk_7A = 11; @@ -3644,7 +3646,7 @@ void ActorEvent_Update(Actor* this) { this->obj.pos.y += 80.0f; this->obj.pos.z += 40.0f; - func_enmy_80066254(this); + Actor_Despawn(this); this->obj.pos.y = spD8; this->obj.pos.z = spD4; } @@ -3658,7 +3660,7 @@ void ActorEvent_Update(Actor* this) { if (this->unk_0B6 >= 49) { this->unk_0B6 = 49; } - if (gGameFrameCount & 1) { + if ((gGameFrameCount % 2) != 0) { Aquas_801AC8A8(RAND_FLOAT_CENTERED(100.0f) + this->obj.pos.x, RAND_FLOAT(50.0f) + this->obj.pos.y, RAND_FLOAT_CENTERED(100.0f) + this->obj.pos.z, 1.0f, 0); @@ -3751,13 +3753,13 @@ bool ActorEvent_OverrideLimbDraw2(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* return false; } -void ActorEvent_80074E3C(Actor* this) { +void ActorEvent_80074E3C(ActorEvent* this) { Vec3f sp30[10]; Animation_GetFrameData(&D_SX_6013820, 0, sp30); sp30[6].y += this->fwork[15]; - sp30[5].z += this->fwork[16] + ((this->timer_0BE >> 2) & 1); - sp30[4].z -= this->fwork[16] + ((this->timer_0BE >> 2) & 1); + sp30[5].z += this->fwork[16] + (s32) ((this->timer_0BE >> 2) % 2U); + sp30[4].z -= this->fwork[16] + (s32) ((this->timer_0BE >> 2) % 2U); Animation_DrawSkeleton(1, D_SX_601390C, sp30, ActorEvent_OverrideLimbDraw2, NULL, this, &gIdentityMatrix); } @@ -3770,14 +3772,14 @@ bool ActorEvent_OverrideLimbDraw3(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* return false; } -s32 Obj111_Draw(Object_80* this) { +s32 Obj111_Draw(Object80_111* this) { RCP_SetupDL(&gMasterDisp, 0x3C); gSPDisplayList(gMasterDisp++, D_SY_601AD70); RCP_SetupDL(&gMasterDisp, 0x40); return 0; } -void ActorEvent_Draw(Actor* this) { +void ActorEvent_Draw(ActorEvent* this) { Vec3f sp114[31]; f32 sp40; s16 temp_s0; @@ -3786,7 +3788,8 @@ void ActorEvent_Draw(Actor* this) { if (this->timer_0C6 && (this->unk_0B4 != EINFO_90) && (this->unk_0B4 != EINFO_68) && (this->unk_0B4 != EINFO_72)) { if ((this->unk_0B4 != EINFO_13) && (this->unk_0B4 != EINFO_14) && (this->unk_0B4 != EINFO_61) && (this->unk_0B4 != EINFO_62) && (this->unk_0B4 != EINFO_83) && (this->unk_0B4 != EINFO_98) && - (this->scale > 0.5f) && (this->timer_0C6 >= 9) && !(this->timer_0C6 & 3) && (D_ctx_80177854 != 100)) { + (this->scale > 0.5f) && (this->timer_0C6 >= 9) && ((this->timer_0C6 & 3) == 0) && + (gPlayState != PLAY_PAUSE)) { func_effect_8007C120(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, this->vel.z, this->scale * 0.07f, 3); } @@ -3812,7 +3815,7 @@ void ActorEvent_Draw(Actor* this) { RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } else if ((this->unk_0B4 == EINFO_82) || (this->unk_0B4 == EINFO_90) || ((this->unk_0B4 == EINFO_6) && (gCurrentLevel == LEVEL_SOLAR))) { - if (!(this->timer_0C6 & 1)) { + if ((this->timer_0C6 % 2) == 0) { RCP_SetupDL(&gMasterDisp, 0x39); } else { RCP_SetupDL(&gMasterDisp, 0x3D); @@ -3945,7 +3948,7 @@ void ActorEvent_Draw(Actor* this) { case EINFO_27: if (this->timer_0C2 != 0) { - if (!(this->timer_0C2 & 3) && (D_ctx_80177854 != 100)) { + if (((this->timer_0C2 & 3) == 0) && (gPlayState != PLAY_PAUSE)) { func_effect_8007D0E0(RAND_FLOAT_CENTERED(200.0f) + this->obj.pos.x, RAND_FLOAT_CENTERED(200.0f) + this->obj.pos.y, RAND_FLOAT_CENTERED(200.0f) + this->obj.pos.z, @@ -4102,14 +4105,13 @@ void ActorEvent_Draw(Actor* this) { break; } - if ((D_display_80161410 > 0) && ((this->iwork[12] > 0) && (this->iwork[12] < 6))) { + if ((gReflectY > 0) && ((this->iwork[12] >= TEAM_ID_FALCO) && (this->iwork[12] < TEAM_ID_MAX))) { Vec3f sp58 = { 0.0f, 0.0f, 0.0f }; - if ((this->iwork[12] == 4) || (this->iwork[12] == 5)) { - Matrix_MultVec3f(gGfxMatrix, &sp58, &D_ctx_80177E98[this->iwork[12] + 4]); - return; + if ((this->iwork[12] == TEAM_ID_KATT) || (this->iwork[12] == TEAM_ID_BILL)) { + Matrix_MultVec3f(gGfxMatrix, &sp58, &gTeamArrowsViewPos[this->iwork[12] + 4]); } else { - Matrix_MultVec3f(gGfxMatrix, &sp58, &D_ctx_80177E98[this->iwork[12]]); + Matrix_MultVec3f(gGfxMatrix, &sp58, &gTeamArrowsViewPos[this->iwork[12]]); } } break; @@ -4140,7 +4142,7 @@ void func_enmy2_800763A4(Actor* actor) { if (actor->timer_0BE == 1) { Object_Kill(&actor->obj, actor->sfxSource); - func_enmy_80066254(actor); + Actor_Despawn(actor); if (gLevelMode == LEVELMODE_ALL_RANGE) { D_ctx_80177F20[actor->index + 1] = actor->obj.pos.x; @@ -4156,7 +4158,7 @@ void func_enmy2_800763A4(Actor* actor) { switch (actor->timer_04C) { case 0: case 1: - if (actor->index & 1) { + if ((actor->index % 2) != 0) { actor->obj.rot.z -= 8.0f; } else { actor->obj.rot.z += 8.0f; @@ -4179,7 +4181,7 @@ void func_enmy2_800763A4(Actor* actor) { break; } - if (((actor->timer_0BC & 3) == 1) && (actor->unk_0B4 != EINFO_13) && (actor->unk_0B4 != EINFO_61)) { + if (((actor->timer_0BC % 4U) == 1) && (actor->unk_0B4 != EINFO_13) && (actor->unk_0B4 != EINFO_61)) { func_effect_8007D24C(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 2.2f); } @@ -4212,7 +4214,8 @@ void func_enmy2_800763A4(Actor* actor) { if ((sp60 != 0) || (actor->obj.pos.y < (gGroundLevel + 30.0f))) { if ((Rand_ZeroOne() < 0.5f) && (actor->timer_04C < 3) && (gLevelType == LEVELTYPE_PLANET) && - (sp60 != 999) && (D_ctx_80161A88 != 2) && ((actor->vel.z < -20.0f) || (actor->vel.z > 0.0f))) { + (sp60 != 999) && (gGroundType != GROUNDTYPE_WATER) && + ((actor->vel.z < -20.0f) || (actor->vel.z > 0.0f))) { if (gCurrentLevel == LEVEL_FORTUNA) { func_enmy2_8006BF7C(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z - actor->vel.z); func_enmy_80062C38(actor->obj.pos.x, actor->obj.pos.z); @@ -4249,7 +4252,7 @@ void func_enmy2_800763A4(Actor* actor) { } else { if ((actor->obj.pos.y < (gGroundLevel + 30.0f)) && (gLevelType == LEVELTYPE_PLANET)) { actor->vel.z = 0.0f; - if (D_ctx_80161A88 == 2) { + if (gGroundType == GROUNDTYPE_WATER) { func_effect_8007D9DC(actor->obj.pos.x, gGroundLevel + 2.0f, actor->obj.pos.z, 3.0f, 20.0f, 0); func_effect_8007D9DC(actor->obj.pos.x, gGroundLevel + 2.0f, actor->obj.pos.z, 3.0f, 20.0f, @@ -4355,15 +4358,15 @@ void func_enmy2_800763A4(Actor* actor) { } } -void ActorEvent_Dying(Actor* actor) { - if ((actor->unk_0B4 == EINFO_48) || (actor->unk_0B4 == EINFO_49) || (actor->unk_0B4 == EINFO_50)) { - SectorY_Actor204_Update(actor); +void ActorEvent_Dying(ActorEvent* this) { + if ((this->unk_0B4 == EINFO_48) || (this->unk_0B4 == EINFO_49) || (this->unk_0B4 == EINFO_50)) { + SectorY_Actor204_Update(this); } else { - func_enmy2_800763A4(actor); + func_enmy2_800763A4(this); } } -void Actor234_Update(Actor* this) { +void Actor234_Update(Actor234* this) { Vec3f sp24; Math_Vec3fFromAngles(&sp24, this->obj.rot.x, this->obj.rot.y, 50.0f); @@ -4372,6 +4375,6 @@ void Actor234_Update(Actor* this) { this->vel.z = sp24.z; } -void Actor234_Draw(Actor* this) { +void Actor234_Draw(Actor234* this) { func_demo_800515C4(); } diff --git a/src/engine/fox_game.c b/src/engine/fox_game.c index a02b7da9..815d567f 100644 --- a/src/engine/fox_game.c +++ b/src/engine/fox_game.c @@ -8,7 +8,7 @@ f32 D_game_80161A14; s32 gPlayerInactive[4]; s32 D_game_80161A28; u8 D_game_80161A2C; -u16 D_game_80161A2E; +u16 gNextLevelStage; u16 gNextLevel; u16 gNextGameState; u16 D_game_80161A34; @@ -19,7 +19,7 @@ f32 D_game_80161A3C; f32 D_game_80161A40; f32 D_game_80161A44; -s32 D_game_800D2860[4] = { true, true, true, true }; +s32 gShowCrosshairs[4] = { true, true, true, true }; s32 D_game_800D2870 = 0; static s32 sVsCameraULx[] = { 0, SCREEN_WIDTH / 2, 0, SCREEN_WIDTH / 2 }; static s32 sVsCameraLRx[] = { SCREEN_WIDTH / 2 - 1, SCREEN_WIDTH - 1, SCREEN_WIDTH / 2 - 1, SCREEN_WIDTH - 1 }; @@ -54,7 +54,7 @@ void Game_Initialize(void) { Rand_Init(); Rand_SetSeed(1, 29000, 9876); gGameState = GSTATE_BOOT; - D_Timer_8017783C = 0; + gNextGameStateTimer = 0; gBgColor = 0; gBlurAlpha = 255; D_game_80161A3C = 45.0f; @@ -77,11 +77,11 @@ void Game_SetGameState(void) { switch (gNextGameState) { case GSTATE_PLAY: gCurrentLevel = gNextLevel; - func_play_800A5844(); - D_ctx_80177854 = 0; - D_ctx_8017827C = D_game_80161A2E; - D_game_80161A2E = 0; - if ((D_ctx_8017827C != 0) && (gCurrentLevel != LEVEL_VENOM_ANDROSS)) { + Play_Setup(); + gPlayState = PLAY_STANDBY; + gLevelStage = gNextLevelStage; + gNextLevelStage = 0; + if ((gLevelStage != 0) && (gCurrentLevel != LEVEL_VENOM_ANDROSS)) { D_ctx_8017782C = 0; } break; @@ -95,25 +95,25 @@ void Game_SetGameState(void) { Memory_FreeAll(); func_play_800A6148(); gGameState = gNextGameState; - D_Timer_8017783C = 3; - D_360_8015F924 = 0; + gNextGameStateTimer = 3; + gAllRangeCheckpoint = 0; gNextGameState = GSTATE_NONE; gOverlayStage = 0; gFillScreenColor = gBgColor = 0; D_ctx_80177D20 = 0.0f; - if ((gCurrentLevel == LEVEL_VENOM_2) && (D_ctx_8017827C == 2)) { + if ((gCurrentLevel == LEVEL_VENOM_2) && (gLevelStage == 2)) { gFillScreenColor = gBgColor = 0xFFFF; // 248, 248, 248 - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; } else { - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; Audio_FadeOutAll(1); } - D_ctx_80178340 = 255; - D_ctx_80178380[0] = 0; + gFillScreenAlpha = 255; + gPlayerFillScreenAlphas[0] = 0; gRadioState = 0; D_ctx_80178428 = 0.0f; gBlurAlpha = 255; - gDrawMode = DRAWMODE_0; + gDrawMode = DRAW_NONE; Audio_ClearVoice(); Audio_SetBaseSfxReverb(0); } @@ -241,15 +241,15 @@ void func_game_800A1FB0(Gfx** arg0, u8 arg1, u8 arg2) { gSPViewport((*arg0)++, gViewport++); } -void func_game_800A24DC(s32 arg0) { +void Game_Draw(s32 playerNum) { switch (gDrawMode) { - case DRAWMODE_0: + case DRAW_NONE: break; - case DRAWMODE_1: + case DRAW_TITLE: func_bg_8003DAF0(); OvlMenu_CallFunction(104, NULL); break; - case DRAWMODE_2: + case DRAW_OPTION: func_bg_8003DAF0(); OvlMenu_CallFunction(108, NULL); break; @@ -257,24 +257,24 @@ void func_game_800A24DC(s32 arg0) { func_bg_8003DAF0(); OvlMenu_CallFunction(106, NULL); break; - case DRAWMODE_4: - gPlayerNum = arg0; - func_display_80057D00(); + case DRAW_PLAY: + gPlayerNum = playerNum; + Play_Draw(); break; - case DRAWMODE_5: + case DRAW_UNK_MAP: func_bg_8003DAF0(); OvlMenu_CallFunction(110, NULL); break; - case DRAWMODE_6: + case DRAW_UNK_VS: func_versus_800C2190(); break; - case DRAWMODE_7: - gPlayerNum = arg0; + case DRAW_UNK_7: + gPlayerNum = playerNum; func_800A3CA0(); break; - case DRAWMODE_8: + case DRAW_ENDING: func_bg_8003DAF0(); - gPlayerNum = arg0; + gPlayerNum = playerNum; Ending_8018AAC4(); break; } @@ -308,7 +308,7 @@ void func_game_800A25DC(void) { gOverlaySetup = OVL_SETUP_GAME_OVER; gOverlayStage = 0; break; - case GSTATE_CREDITS: + case GSTATE_ENDING: gOverlaySetup = OVL_SETUP_CREDITS; break; } @@ -328,18 +328,18 @@ void Game_Update(void) { func_game_800A1C14(&gUnkDisp1); func_game_800A25DC(); if (func_game_800A1B6C() != true) { - Lib_Perspective(&gUnkDisp1); + Lib_InitPerspective(&gUnkDisp1); func_game_800A1FB0(&gUnkDisp1, gCamCount, 0); - if (D_Timer_8017783C != 0) { - D_Timer_8017783C--; + if (gNextGameStateTimer != 0) { + gNextGameStateTimer--; } switch (gGameState) { case GSTATE_BOOT: - D_Timer_8017783C = 2; + gNextGameStateTimer = 2; gGameState++; break; case GSTATE_BOOT_WAIT: - if (D_Timer_8017783C == 0) { + if (gNextGameStateTimer == 0) { gGameState++; } break; @@ -384,10 +384,10 @@ void Game_Update(void) { gCamCount = 1; gLifeCount[0] = 2; D_ctx_80177D20 = 0.0f; - D_hud_8016170C = gCsFrameCount = D_ctx_80177830 = D_ctx_80177838 = D_ctx_80177840 = D_versus_80178754 = - gVersusMode = D_ctx_80177AE0 = D_ctx_80178410 = D_ctx_80177B40 = D_ctx_80177854 = - gOptionMenuStatus = gDrawMode = gShowBossHealth = D_game_80161A2C = gBgColor = D_ctx_80178340 = - 0; + D_hud_8016170C = gCsFrameCount = D_ctx_80177830 = gLevelStatusScreenTimer = gLevelClearScreenTimer = + D_versus_80178754 = gVersusMode = D_ctx_80177AE0 = D_ctx_80178410 = D_ctx_80177B40 = gPlayState = + gOptionMenuStatus = gDrawMode = gShowBossHealth = D_game_80161A2C = gBgColor = + gFillScreenAlpha = 0; gNextGameState = D_ctx_80177C94 = D_ctx_80177CAC = D_ctx_80177CB4 = D_ctx_80177CBC = D_ctx_80177CC4 = D_ctx_80177C9C = D_ctx_80177CA4 = D_play_80161A5C = D_game_80161A34 = 0; for (i = 0; i < 4; i++) { @@ -400,8 +400,8 @@ void Game_Update(void) { D_ctx_80177858[i] = 3; D_ctx_80177870[i] = 0; - D_game_800D2860[i] = true; - D_ctx_80178380[i] = 0; + gShowCrosshairs[i] = true; + gPlayerFillScreenAlphas[i] = 0; } gVersusStage = 0; D_ctx_801778A4 = 3; @@ -456,31 +456,31 @@ void Game_Update(void) { func_versus_800C20B0(); break; case GSTATE_PLAY: - func_play_800B86CC(); + Play_Main(); break; case GSTATE_GAME_OVER: OvlMenu_CallFunction(109, NULL); break; - case GSTATE_CREDITS: - gDrawMode = DRAWMODE_8; + case GSTATE_ENDING: + gDrawMode = DRAW_ENDING; Ending_8018A96C(); break; default: break; } - func_game_800A24DC(0); + Game_Draw(0); if (gCamCount == 2) { func_game_800A1FB0(&gMasterDisp, gCamCount, 1); - func_game_800A24DC(1); + Game_Draw(1); gDPPipeSync(gMasterDisp++); gDPSetScissor(gMasterDisp++, G_SC_NON_INTERLACE, 8, 8, SCREEN_WIDTH - 8, SCREEN_HEIGHT - 8); - } else if ((gCamCount == 4) && (gDrawMode != DRAWMODE_0)) { + } else if ((gCamCount == 4) && (gDrawMode != DRAW_NONE)) { func_game_800A1FB0(&gMasterDisp, gCamCount, 3); - func_game_800A24DC(3); + Game_Draw(3); func_game_800A1FB0(&gMasterDisp, gCamCount, 2); - func_game_800A24DC(2); + Game_Draw(2); func_game_800A1FB0(&gMasterDisp, gCamCount, 1); - func_game_800A24DC(1); + Game_Draw(1); gDPPipeSync(gMasterDisp++); gDPSetScissor(gMasterDisp++, G_SC_NON_INTERLACE, 8, 8, SCREEN_WIDTH - 8, SCREEN_HEIGHT - 8); gDPSetColorDither(gMasterDisp++, G_CD_NOISE); @@ -504,9 +504,9 @@ void Game_Update(void) { } spBB = 0; if (gCamCount == 1) { - Graphics_FillRectangle(&gMasterDisp, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, D_ctx_80178390[0], - D_ctx_801783A0[0], D_ctx_801783B0[0], D_ctx_80178380[0]); - if ((gDrawMode == DRAWMODE_4) || (gDrawMode == DRAWMODE_8)) { + Graphics_FillRectangle(&gMasterDisp, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, gPlayerFillScreenReds[0], + gPlayerFillScreenGreens[0], gPlayerFillScreenBlues[0], gPlayerFillScreenAlphas[0]); + if ((gDrawMode == DRAW_PLAY) || (gDrawMode == DRAW_ENDING)) { func_radio_800BB5D0(); if (D_game_80161A2C != 0) { func_hud_8008FA84(); @@ -519,26 +519,26 @@ void Game_Update(void) { if (gPlayer[i].timer_224 != 0) { Graphics_FillRectangle(&gMasterDisp, sVsCameraULx[i], sVsCameraULy[i], sVsCameraLRx[i], - sVsCameraLRy[i], D_ctx_80178348, D_ctx_80178350, D_ctx_80178354, - D_ctx_80178340); + sVsCameraLRy[i], gFillScreenRed, gFillScreenGreen, gFillScreenBlue, + gFillScreenAlpha); spBB = 1; } else { Graphics_FillRectangle(&gMasterDisp, sVsCameraULx[i], sVsCameraULy[i], sVsCameraLRx[i], - sVsCameraLRy[i], D_ctx_80178390[i], D_ctx_801783A0[i], D_ctx_801783B0[i], - D_ctx_80178380[i]); + sVsCameraLRy[i], gPlayerFillScreenReds[i], gPlayerFillScreenGreens[i], + gPlayerFillScreenBlues[i], gPlayerFillScreenAlphas[i]); } } } func_bg_80040CDC(); func_hud_8008865C(); - func_360_8002E548(); + AllRange_UpdateCountdown(); if ((gGameState == GSTATE_PLAY) && gVersusMode) { func_versus_800C1ED4(); } func_fade_80084688(0, D_ctx_80177C50); if (spBB == 0) { - Graphics_FillRectangle(&gMasterDisp, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, D_ctx_80178348, - D_ctx_80178350, D_ctx_80178354, D_ctx_80178340); + Graphics_FillRectangle(&gMasterDisp, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, gFillScreenRed, + gFillScreenGreen, gFillScreenBlue, gFillScreenAlpha); } func_80016A50(); } diff --git a/src/engine/fox_hud.c b/src/engine/fox_hud.c index 178bc597..d4bc0b31 100644 --- a/src/engine/fox_hud.c +++ b/src/engine/fox_hud.c @@ -1,5 +1,5 @@ #include "sf64math.h" - +#include "prevent_bss_reordering.h" typedef struct { /* 0x00 */ u8* unk_00; /* 0x04 */ s32 width; @@ -464,7 +464,8 @@ void func_hud_80086110(f32 arg0, f32 arg1, s32 arg2) { func_hud_800856C0((8.0f * temp) + arg0, arg1 + 2.0f, temp, 1.0f, arg2 / 255.0f); } - if ((arg2 <= 0) && (arg2 != -2) && ((D_ctx_80177854 == 100) || (D_ctx_80177830 == 1) || (D_ctx_80177838 != 0))) { + if ((arg2 <= 0) && (arg2 != -2) && + ((gPlayState == PLAY_PAUSE) || (D_ctx_80177830 == 1) || (gLevelStatusScreenTimer != 0))) { RCP_SetupDL(&gMasterDisp, 0x4C); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); if ((arg2 == 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7)) { @@ -669,7 +670,7 @@ void func_hud_80086664(f32 x, f32 y) { y2 + i, 1.0f, 1.0f); } - if ((D_ctx_80177CA0 == 0) && (D_360_8015F924 == 0) && (gCurrentLevel != LEVEL_VENOM_ANDROSS) && + if ((D_ctx_80177CA0 == 0) && (gAllRangeCheckpoint == 0) && (gCurrentLevel != LEVEL_VENOM_ANDROSS) && (gCurrentLevel != LEVEL_TRAINING)) { func_hud_80087788(); func_hud_80084B94(0); @@ -723,11 +724,11 @@ void func_hud_80086CC8(void) { f32 sp18; f32 temp; - if ((D_ctx_80177854 != 100) && (D_ctx_80177838 != 0)) { - D_ctx_80177838 -= 1; + if ((gPlayState != PLAY_PAUSE) && (gLevelStatusScreenTimer != 0)) { + gLevelStatusScreenTimer -= 1; } - if (D_ctx_80177838 == 1) { + if (gLevelStatusScreenTimer == 1) { D_80161718 = 30; D_8016171C = 0; } @@ -735,7 +736,7 @@ void func_hud_80086CC8(void) { temp = 108.0f; sp18 = 81.0f; - if (D_ctx_80177838 != 0) { + if (gLevelStatusScreenTimer != 0) { func_hud_80086C08(temp - 4.5f - 32.0f, sp18 - 24.0f - 4.0f, 7.4f, 3.9f); if (gCurrentLevel != LEVEL_TRAINING) { @@ -756,11 +757,11 @@ void func_hud_80086DCC(void) { f32 x; f32 y; - if ((D_ctx_80177854 != 100) && (D_ctx_80177840)) { - D_ctx_80177840--; + if ((gPlayState != PLAY_PAUSE) && (gLevelClearScreenTimer)) { + gLevelClearScreenTimer--; } - boolTemp = D_ctx_80177930; + boolTemp = gNextPlanetPath; if ((gCurrentLevel == LEVEL_TITANIA) || (gCurrentLevel == LEVEL_BOLSE) || (gCurrentLevel == LEVEL_VENOM_1) || (gCurrentLevel == LEVEL_VENOM_2) || (gCurrentLevel == LEVEL_AREA_6) || (gCurrentLevel == LEVEL_AQUAS) || @@ -771,55 +772,57 @@ void func_hud_80086DCC(void) { temp = 0; if (gCurrentLevel == LEVEL_AQUAS) { - if (D_ctx_80177840 <= 100) { + if (gLevelClearScreenTimer <= 100) { temp = 5; } - if (D_ctx_80177840 <= 96) { + if (gLevelClearScreenTimer <= 96) { temp = 5; } - if (D_ctx_80177840 <= 92) { + if (gLevelClearScreenTimer <= 92) { temp = 4; } - if (D_ctx_80177840 <= 87) { + if (gLevelClearScreenTimer <= 87) { temp = 3; } - if (D_ctx_80177840 <= 82) { + if (gLevelClearScreenTimer <= 82) { temp = 2; } - if (D_ctx_80177840 <= 77) { + if (gLevelClearScreenTimer <= 77) { temp = 1; } - if (D_ctx_80177840 == 0) { + if (gLevelClearScreenTimer == 0) { temp = 0; } - if ((D_ctx_80177840 == 92) || (D_ctx_80177840 == 87) || (D_ctx_80177840 == 82) || (D_ctx_80177840 == 77)) { + if ((gLevelClearScreenTimer == 92) || (gLevelClearScreenTimer == 87) || (gLevelClearScreenTimer == 82) || + (gLevelClearScreenTimer == 77)) { AUDIO_PLAY_SFX(0x49008031U, gDefaultSfxSource, 4U); } } else { - if (D_ctx_80177840 <= 100) { + if (gLevelClearScreenTimer <= 100) { temp = 5; } - if (D_ctx_80177840 <= 90) { + if (gLevelClearScreenTimer <= 90) { temp = 5; } - if (D_ctx_80177840 <= 80) { + if (gLevelClearScreenTimer <= 80) { temp = 4; } - if (D_ctx_80177840 <= 72) { + if (gLevelClearScreenTimer <= 72) { temp = 3; } - if (D_ctx_80177840 <= 64) { + if (gLevelClearScreenTimer <= 64) { temp = 2; } - if (D_ctx_80177840 <= 56) { + if (gLevelClearScreenTimer <= 56) { temp = 1; } - if (D_ctx_80177840 == 0) { + if (gLevelClearScreenTimer == 0) { temp = 0; } - if ((D_ctx_80177840 == 80) || (D_ctx_80177840 == 72) || (D_ctx_80177840 == 64) || (D_ctx_80177840 == 56)) { + if ((gLevelClearScreenTimer == 80) || (gLevelClearScreenTimer == 72) || (gLevelClearScreenTimer == 64) || + (gLevelClearScreenTimer == 56)) { if (!boolTemp) { AUDIO_PLAY_SFX(0x49008034U, gDefaultSfxSource, 4U); } else { @@ -1054,7 +1057,7 @@ void func_hud_80087B5C(void) { D_801617C0[0] = 0; } - if ((D_ctx_80177854 != 100) && (D_ctx_80177830 == 1) && (!D_801617E8[0])) { + if ((gPlayState != PLAY_PAUSE) && (D_ctx_80177830 == 1) && (!D_801617E8[0])) { switch (D_801617C0[0]) { case 0: D_801617C0[5] = gHitCount; @@ -1077,9 +1080,9 @@ void func_hud_80087B5C(void) { break; case 1: - if (((gTeamShields[1] > 0) && (gTeamShields[1] < 255)) && - ((gTeamShields[2] > 0) && (gTeamShields[2] < 255)) && - ((gTeamShields[3] > 0) && (gTeamShields[3] < 255))) { + 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); } D_801617C0[0] = 2; @@ -1105,7 +1108,7 @@ void func_hud_80087B5C(void) { } if (D_801617C0[4] > 0) { - for (i = 1, temp = 0; i < 4; i++) { + for (i = TEAM_ID_FALCO, temp = 0; i <= TEAM_ID_PEPPY; i++) { if (gTeamShields[i] > 0) { if (D_801617C0[4] >= 4) { gTeamShields[i] += 4; @@ -1150,7 +1153,7 @@ void func_hud_80087B5C(void) { D_801617E8[0] = 10; D_801617C0[0]++; } else { - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { AUDIO_PLAY_SFX(0x4900C024U, gDefaultSfxSource, 4U); D_801617C0[3]++; } @@ -1237,7 +1240,7 @@ void func_hud_80087B5C(void) { func_hud_800869A0(x4 + 4.0f, y4 + 3.0f, D_801617C0[2], 1.00f, 1, 9999); - if (!(D_801617C0[6] & 1)) { + if ((D_801617C0[6] % 2) == 0) { func_hud_80087530(232.0f, 90.0f, D_801617C0[3]); } @@ -1397,7 +1400,7 @@ void func_hud_80088970(void) { D_80161838[0]++; - if (D_ctx_80177854 != 100) { + if (gPlayState != PLAY_PAUSE) { D_80161838[0] = 0; D_80161838[1] = 0; // clang-format off @@ -1407,12 +1410,12 @@ void func_hud_80088970(void) { } if (D_80161810[0] >= 2) { - D_ctx_801779BC = 0; + gPauseEnabled = 0; } player = &gPlayer[gPlayerNum]; - if ((D_ctx_80177854 == 100) && !D_ctx_80177838 && !gVersusMode) { + if ((gPlayState == PLAY_PAUSE) && !gLevelStatusScreenTimer && !gVersusMode) { switch (D_80161810[0]) { case 0: D_80161838[0] = 0; @@ -1445,12 +1448,12 @@ void func_hud_80088970(void) { case 2: gPlayer[0].state_1C8 = PLAYERSTATE_1C8_0; - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0; - D_ctx_80178358 = 255; - D_ctx_8017835C = 32; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; + gFillScreenAlphaTarget = 255; + gFillScreenAlphaStep = 32; - D_ctx_80178340 += 32; - if (D_ctx_80178340 < 255) { + gFillScreenAlpha += 32; + if (gFillScreenAlpha < 255) { break; } @@ -1462,7 +1465,7 @@ void func_hud_80088970(void) { func_play_800A6148(); gShowBossHealth = false; - D_ctx_80178340 = 255; + gFillScreenAlpha = 255; if (gLifeCount[gPlayerNum] == 0) { D_80161810[0] = 3; @@ -1476,22 +1479,22 @@ void func_hud_80088970(void) { case 3: Graphics_FillRectangle(&gMasterDisp, 0, 0, 319, 239, 0, 0, 0, 255); - D_ctx_80178358 = 0; + gFillScreenAlphaTarget = 0; - if ((D_ctx_80178340 -= 32) <= 0) { - D_ctx_80178340 = 0; + if ((gFillScreenAlpha -= 32) <= 0) { + gFillScreenAlpha = 0; } if (gCurrentLevel == LEVEL_TRAINING) { gGameState = GSTATE_MENU; - D_Timer_8017783C = 2; + gNextGameStateTimer = 2; gOptionMenuStatus = OPTION_WAIT; - gDrawMode = DRAWMODE_0; + gDrawMode = DRAW_NONE; D_game_80161A34 = 7; D_ctx_80178410 = 0; break; } else { - if (D_ctx_80178340 == 0) { + if (gFillScreenAlpha == 0) { if (gLevelType == LEVELTYPE_PLANET) { if (D_80161838[1] == 0) { func_8001D520(); @@ -1528,13 +1531,13 @@ void func_hud_80088970(void) { break; } - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0; - D_ctx_80178358 = 255; - D_ctx_8017835C = 32; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; + gFillScreenAlphaTarget = 255; + gFillScreenAlphaStep = 32; - D_ctx_80178340 += 32; - if (D_ctx_80178340 > 255) { - D_ctx_80178340 = 255; + gFillScreenAlpha += 32; + if (gFillScreenAlpha > 255) { + gFillScreenAlpha = 255; }; if (D_80161838[0] < 160) { break; @@ -1544,21 +1547,21 @@ void func_hud_80088970(void) { Graphics_FillRectangle(&gMasterDisp, 0, 0, 319, 239, 0, 0, 0, 255); for (i = 0; i < 6; i++) { - if (D_ctx_80177C38[i] == -1) { + if (gPrevPlanetTeamShields[i] == -1) { gSavedTeamShields[i] = 0; } else { - gSavedTeamShields[i] = D_ctx_80177C38[i]; + gSavedTeamShields[i] = gPrevPlanetTeamShields[i]; } - D_ctx_80177CD0[i] = D_ctx_80177CF0[i]; + gStarWolfTeamAlive[i] = gSavedStarWolfTeamAlive[i]; } - if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (D_360_8015F924 != 0)) { + if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gAllRangeCheckpoint != 0)) { D_ctx_80177CA4 = D_play_80161A5C; } D_ctx_80177CB0 = 0.0f; - D_360_8015F924 = 0; - D_play_80161A50 = 0; + gAllRangeCheckpoint = 0; + gSavedZoSearchlightStatus = false; gSavedHitCount = D_ctx_80177CA0 = 0; @@ -1566,22 +1569,22 @@ void func_hud_80088970(void) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_6; gScreenFlashTimer = 0; gPlayer[0].timer_1F8 = 0; - D_ctx_80178340 = D_ctx_80178358 = 255; + gFillScreenAlpha = gFillScreenAlphaTarget = 255; D_ctx_8017837C = 7; - gDrawMode = DRAWMODE_4; - D_ctx_80177854 = 2; + gDrawMode = DRAW_PLAY; + gPlayState = PLAY_UPDATE; break; case 10: func_8001D638(0); - gDrawMode = DRAWMODE_4; - D_ctx_80177854 = 2; + gDrawMode = DRAW_PLAY; + gPlayState = PLAY_UPDATE; break; } } - if ((D_80161810[3] == 0) && (D_ctx_80177854 == 100) && !gVersusMode && (D_ctx_80177838 == 0)) { + if ((D_80161810[3] == 0) && (gPlayState == PLAY_PAUSE) && !gVersusMode && (gLevelStatusScreenTimer == 0)) { switch (D_80161810[0]) { case 0: case 1: @@ -1970,7 +1973,7 @@ void func_hud_8008A240(void) { continue; } - if (gGameFrameCount & 0x3F) { + if ((gGameFrameCount % 64) != 0) { gRadarMarks[i].unk_02 = 999; } } @@ -2011,7 +2014,7 @@ s32 func_hud_8008A4DC(void) { return 0; } - if (D_ctx_80177838) { + if (gLevelStatusScreenTimer) { D_800D1E10 = 60.0f; } else { Math_SmoothStepToF(&D_800D1E10, 0.0f, 0.3f, 10.0f, 0.1f); @@ -2243,31 +2246,31 @@ void func_hud_8008AD94(void) { void func_hud_8008B044(void) { switch (D_80161798) { case 0: - if (D_enmy2_80161690 == 0) { + if (gCallTimer == 0) { return; } AUDIO_PLAY_SFX(0x49002018, gDefaultSfxSource, 4); - if (D_enmy2_800CFF90 != 0) { + if (gCallVoiceParam != 0) { func_8001AF40(1); } D_80161794 = 0; D_80161798 = 1; case 1: - if (D_enmy2_80161690 != 0) { + if (gCallTimer != 0) { D_80161790++; if (D_80161790 >= 7) { - if (D_80161794 & 1) { + if ((D_80161794 % 2) != 0) { AUDIO_PLAY_SFX(0x49002018, gDefaultSfxSource, 4); } D_80161790 = 0; D_80161794++; } - D_enmy2_80161690--; + gCallTimer--; } else { - D_enmy2_800CFF90 = 0; + gCallVoiceParam = 0; D_80161790 = 0; D_80161798 = 0; Audio_KillSfxById(0x49002018); @@ -2299,10 +2302,10 @@ void func_hud_8008B1B0(void) { } void func_hud_8008B2A4(void) { - if (D_ctx_80177854 != 100) { + if (gPlayState != PLAY_PAUSE) { func_hud_8008B044(); } - if (D_enmy2_80161690 != 0) { + if (gCallTimer != 0) { func_hud_8008B1B0(); } } @@ -2567,7 +2570,7 @@ void func_hud_8008BAE4(void) { } void func_hud_8008BC80(void) { - if (D_ctx_80177854 != 100) { + if (gPlayState != PLAY_PAUSE) { func_hud_8008B9E8(); func_hud_8008BAE4(); } @@ -2690,22 +2693,22 @@ void func_hud_8008C104(u16* texture, u16* arg1) { Texture_Mottle(dst, src, 2); } -void func_hud_8008C390(f32 arg0, f32 arg1, f32 arg2, s32 arg3) { +void func_hud_8008C390(f32 xPos, f32 yPos, f32 scale, s32 number) { void* D_800D1EC0[] = { D_5000000, D_5000080, D_5000100, D_5000180, D_5000200, D_5000280, D_5000300, D_5000380, D_5000400, D_5000480, }; s32 i; for (i = 10; i != 1; i /= 10) { - if ((arg0 > 0.0f) && (arg1 > 0.0f)) { - TextureRect_8bIA(&gMasterDisp, D_800D1EC0[arg3 / i], 16, 8, arg0, arg1, arg2, arg2); + if ((xPos > 0.0f) && (yPos > 0.0f)) { + TextureRect_8bIA(&gMasterDisp, D_800D1EC0[number / i], 16, 8, xPos, yPos, scale, scale); } - arg0 += 9.0f * arg2; - arg3 %= i; + xPos += 9.0f * scale; + number %= i; } - if ((arg0 > 0.0f) && (arg1 > 0.0f)) { - TextureRect_8bIA(&gMasterDisp, D_800D1EC0[arg3 / i], 16, 8, arg0, arg1, arg2, arg2); + if ((xPos > 0.0f) && (yPos > 0.0f)) { + TextureRect_8bIA(&gMasterDisp, D_800D1EC0[number / i], 16, 8, xPos, yPos, scale, scale); } } @@ -2738,7 +2741,7 @@ void func_hud_8008C6F4(s32 idx, s32 arg1) { Matrix_Push(&gGfxMatrix); - if (gPlayer[0].unk_238) { + if (gPlayer[0].cockpitView) { Matrix_RotateZ(gGfxMatrix, M_DTOR * gPlayer[0].unk_034, 1); } @@ -2766,12 +2769,12 @@ void func_hud_8008C6F4(s32 idx, s32 arg1) { void func_hud_8008CA44(void) { s32 D_800D2048[] = { - 0x80, 0x40, 0x20, 0x10, 0x0A, 0x09, 0x06, 0x05, 0x08, 0x04, 0x02, 0x01, + 0x80, 0x40, 0x20, 0x10, 8 | 2, 8 | 1, 4 | 2, 4 | 1, 8, 4, 2, 1, }; s32 i; s32 j; - if ((gPlayer[gPlayerNum].flags_228 != 0) && (gPlayer[gPlayerNum].timer_210 == 0) && (D_ctx_80177854 != 100)) { + if ((gPlayer[gPlayerNum].flags_228 != 0) && (gPlayer[gPlayerNum].timer_210 == 0) && (gPlayState != PLAY_PAUSE)) { j = gPlayer[gPlayerNum].flags_228; for (i = 0; i < 12; i++) { @@ -3066,7 +3069,7 @@ void func_hud_8008DE68(void) { f32 temp7; f32 var_fv0; - if ((gShowBossHealth == 1) && (gTeamShields[2] > 0)) { + if ((gShowBossHealth == 1) && (gTeamShields[TEAM_ID_SLIPPY] > 0)) { if ((gBossHealthBar >= 0) && (D_801616BC == -1.0f)) { AUDIO_PLAY_SFX(0x4900C028, gDefaultSfxSource, 4); D_801616BC = 255.0f; @@ -3129,63 +3132,63 @@ void func_hud_8008DE68(void) { } } -void func_hud_8008E2C8(f32 arg0, f32 arg1, s32* arg2, f32 arg3) { +void func_hud_8008E2C8(f32 xPos, f32 yPos, s32* countdown, f32 scale) { f32 var_fs0 = 0.0f; s32 var_s2 = 0; s32 i; - arg0 -= (arg3 - 1.0f) * 34.0f; - arg1 -= (arg3 - 1.0f) * 4.0f; + xPos -= (scale - 1.0f) * 34.0f; + yPos -= (scale - 1.0f) * 4.0f; for (i = 0; i != 5; i++) { if ((i == 0) || (i == 2)) { - var_s2 = arg2[i / 2] % 60; + var_s2 = countdown[i / 2] % 60; } if (i == 4) { - var_s2 = arg2[i / 2] % 100; + var_s2 = countdown[i / 2] % 100; } - if (i & 1) { + if ((i % 2) != 0) { RCP_SetupDL_78(); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_4bCI(&gMasterDisp, D_1011E80, D_1011EC0, 16, 8, (var_fs0 * arg3) + arg0, arg1, arg3, arg3); + TextureRect_4bCI(&gMasterDisp, D_1011E80, D_1011EC0, 16, 8, (var_fs0 * scale) + xPos, yPos, scale, scale); } else { RCP_SetupDL_76(); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); - func_hud_8008C390((var_fs0 * arg3) + arg0, arg1, arg3, var_s2); + func_hud_8008C390((var_fs0 * scale) + xPos, yPos, scale, var_s2); var_fs0 += 9.0f; } var_fs0 += 9.0f; } } -void func_hud_8008E51C(s32* arg0, f32 arg1) { +void func_hud_8008E51C(s32* countdown, f32 scale) { //! FAKE: if (1) {} - if (D_ctx_80177854 != 100) { - arg0[2] -= 3; - if (arg0[2] >= 3) { + if (gPlayState != PLAY_PAUSE) { + countdown[2] -= 3; + if (countdown[2] >= 3) { } else { - arg0[2] = 99; - arg0[1]--; - if (arg0[1] >= 0) { + countdown[2] = 99; + countdown[1]--; + if (countdown[1] >= 0) { } else { - arg0[1] = 59; - arg0[0]--; - if (arg0[0] >= 0) { + countdown[1] = 59; + countdown[0]--; + if (countdown[0] >= 0) { } else { - arg0[0] = 0; - arg0[1] = 0; - arg0[2] = 0; + countdown[0] = 0; + countdown[1] = 0; + countdown[2] = 0; } } } } - if (D_ctx_80177854 != 100) { - func_hud_8008E2C8(176.0f, 22.0f, arg0, arg1); + if (gPlayState != PLAY_PAUSE) { + func_hud_8008E2C8(176.0f, 22.0f, countdown, scale); } } @@ -3278,7 +3281,7 @@ void func_hud_8008E620(f32 arg0, f32 arg1) { gMedalStatus = ret; } - if (gMedalFlashTimer & 1) { + if ((gMedalFlashTimer % 2) != 0) { r = 255; g = 255; b = 255; @@ -3504,7 +3507,7 @@ void func_hud_8008F94C(void) { } void func_hud_8008F96C(void) { - if (D_ctx_80177854 != 100) { + if (gPlayState != PLAY_PAUSE) { func_hud_8008E5E8(); } @@ -3627,7 +3630,7 @@ void func_hud_8008FA84(void) { } } - if ((D_hud_80161704 != 0) && (D_ctx_80177854 != 100)) { + if ((D_hud_80161704 != 0) && (gPlayState != PLAY_PAUSE)) { D_hud_80161708 += 16; if (D_hud_80161708 >= D_hud_80161704) { D_hud_80161708 = D_hud_80161704; @@ -3693,7 +3696,7 @@ void func_hud_8008FFF0(Boss* boss, s32 arg1) { boss->obj.pos.z + D_800D21C8[i].z, 0.0f, 0.0f, 0.0f, 0.3f * temp, 20); } - if (!(gGameFrameCount & 7)) { + if (((gGameFrameCount % 8) == 0)) { func_effect_8007BFFC(boss->obj.pos.x + D_800D21C8[i].x, boss->obj.pos.y + D_800D21C8[i].y, boss->obj.pos.z + D_800D21C8[i].z, 0.0f, 0.0f, 0.0f, 7.0f * temp, 10); } @@ -3828,7 +3831,7 @@ void func_hud_800907C4(Boss* boss) { } break; } - func_hud_8008FFF0(boss, D_360_8015F928); + func_hud_8008FFF0(boss, gAllRangeEventTimer); } bool func_hud_8009092C(Actor* actor) { @@ -4160,11 +4163,7 @@ bool func_hud_800915FC(Actor* actor) { Math_Vec3fFromAngles(&vec, 0.0f, actor->unk_0F4.y, 650.0f + actor->fwork[9] * 10.0f); - while (true) { - if (gLevelMode != LEVELMODE_ALL_RANGE) { - break; - } - + if (gLevelMode == LEVELMODE_ALL_RANGE) { for (i = 0, obj58 = &gObjects58[0]; i < 200; i++, obj58++) { if (obj58->obj.status != OBJ_ACTIVE) { continue; @@ -4182,7 +4181,6 @@ bool func_hud_800915FC(Actor* actor) { ret = true; } } - break; } if (ret) { @@ -4433,15 +4431,15 @@ void func_hud_800922F4(Actor* actor) { s32 temp; if ((gTeamShields[actor->aiType] < 64) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7)) { - temp = 7; + temp = 8 - 1; if (gTeamShields[actor->aiType] > 16) { - temp = 15; + temp = 16 - 1; } if (gTeamShields[actor->aiType] > 32) { - temp = 31; + temp = 32 - 1; } if (gTeamShields[actor->aiType] > 48) { - temp = 63; + temp = 64 - 1; } if (!(gGameFrameCount & temp)) { @@ -4658,18 +4656,18 @@ bool func_hud_800927A0(Actor* actor) { } void ActorTeamBoss_Init(Actor* actor) { - s32 D_800D22A8[] = { 1, 2, 3 }; + s32 D_800D22A8[] = { TEAM_ID_FALCO, TEAM_ID_SLIPPY, TEAM_ID_PEPPY }; if (gCurrentLevel != LEVEL_TITANIA) { actor->fwork[1] = 40.0f; actor->fwork[3] = 1.2f; - actor->aiType = (D_hud_800D1970 & 3) + 1; + actor->aiType = (D_hud_800D1970 % 4U) + 1; D_hud_800D1970++; } else { actor->state = 7; actor->aiType = AI360_SLIPPY; actor->iwork[5] = 0; - gTeamShields[2] = 255; + gTeamShields[TEAM_ID_SLIPPY] = 255; } actor->iwork[12] = D_800D22A8[actor->aiType - 1]; @@ -4681,7 +4679,7 @@ void ActorTeamBoss_Init(Actor* actor) { AUDIO_PLAY_SFX(0x3100000CU, actor->sfxSource, 4U); - if (((D_hud_800D1970 & 3) == AI360_SLIPPY) && (gCurrentLevel == LEVEL_SECTOR_X)) { + if (((s32) (D_hud_800D1970 % 4U) == AI360_SLIPPY) && (gCurrentLevel == LEVEL_SECTOR_X)) { Object_Kill(&actor->obj, actor->sfxSource); } @@ -4690,23 +4688,23 @@ void ActorTeamBoss_Init(Actor* actor) { } } -void ActorTeamBoss_Update(Actor* actor) { +void ActorTeamBoss_Update(ActorTeamBoss* this) { f32 var_fv1; - actor->health = gTeamShields[actor->aiType]; + this->health = gTeamShields[this->aiType]; - switch (actor->unk_048) { + switch (this->unk_048) { case 0: - func_hud_800914FC(actor); - func_hud_80091864(actor); - func_hud_80091B90(actor); - func_hud_80091DF4(actor); + func_hud_800914FC(this); + func_hud_80091864(this); + func_hud_80091B90(this); + func_hud_80091DF4(this); - if (actor->unk_0D0 != 0) { - func_hud_80091F00(actor); + if (this->unk_0D0 != 0) { + func_hud_80091F00(this); } - if (actor->state == 3) { + if (this->state == 3) { break; } @@ -4728,44 +4726,44 @@ void ActorTeamBoss_Update(Actor* actor) { break; } - if ((actor->iwork[10] != 0) && (gLevelMode == LEVELMODE_ALL_RANGE) && (actor->iwork[9] == 0) && + if ((this->iwork[10] != 0) && (gLevelMode == LEVELMODE_ALL_RANGE) && (this->iwork[9] == 0) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7)) { - actor->unk_048 = 2; - actor->unk_04A = 0; + this->unk_048 = 2; + this->unk_04A = 0; } if ((gLevelMode == LEVELMODE_ALL_RANGE) && - (fabsf(actor->obj.pos.x > var_fv1) || fabsf(actor->obj.pos.z > var_fv1)) && + (fabsf(this->obj.pos.x > var_fv1) || fabsf(this->obj.pos.z > var_fv1)) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7)) { - actor->unk_048 = 2; - actor->unk_04A = 1; + this->unk_048 = 2; + this->unk_04A = 1; } break; case 1: - if (func_hud_800924E0(actor) != 0) { - actor->unk_048 = 0; - actor->iwork[9] = RAND_INT(30.0f) + 90; + if (func_hud_800924E0(this) != 0) { + this->unk_048 = 0; + this->iwork[9] = RAND_INT(30.0f) + 90; } break; case 2: - if (func_hud_800927A0(actor) != 0) { - actor->unk_04A = 0; - actor->unk_048 = actor->unk_04A; - actor->iwork[9] = RAND_INT(30.0f) + 90; + if (func_hud_800927A0(this) != 0) { + this->unk_04A = 0; + this->unk_048 = this->unk_04A; + this->iwork[9] = RAND_INT(30.0f) + 90; } break; } - func_hud_80091CF8(actor); - func_hud_800922F4(actor); - func_hud_80092244(actor); + func_hud_80091CF8(this); + func_hud_800922F4(this); + func_hud_80092244(this); - if (actor->iwork[9] != 0) { - actor->iwork[9]--; + if (this->iwork[9] != 0) { + this->iwork[9]--; } - actor->iwork[10] = 0; + this->iwork[10] = 0; } void func_hud_80093164(Actor* actor) { @@ -4928,9 +4926,9 @@ void func_hud_800935E8(Player* player) { player->unk_208 = 0; player->unk_0D0 = 0.0f; - D_ctx_80178340 = 255; - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0; - D_ctx_80178358 = 0; + gFillScreenAlpha = 255; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; + gFillScreenAlphaTarget = 0; player->camEye.x = gCsCamEyeX = -3061.2f; player->camEye.y = gCsCamEyeY = 1745.9f; @@ -5047,17 +5045,17 @@ void func_hud_800935E8(Player* player) { if (gCsFrameCount >= 50) { // clang-format off - if (D_ctx_80178340 == 255) { player->unk_1D0 = 2; } + if (gFillScreenAlpha == 255) { player->unk_1D0 = 2; } // clang-format on - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255; - D_ctx_80178358 = 255; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; + gFillScreenAlphaTarget = 255; Math_SmoothStepToF(&D_ctx_80177A48[7], 16.0f, 0.04f, 0.05f, 0.0f); - D_ctx_8017835C = D_ctx_80177A48[7]; + gFillScreenAlphaStep = D_ctx_80177A48[7]; } break; case 2: - D_ctx_80178380[0] = 0; + gPlayerFillScreenAlphas[0] = 0; D_ctx_80177A10[0] = gLight1R; D_ctx_80177A10[1] = gLight1G; @@ -5091,16 +5089,16 @@ void func_hud_800935E8(Player* player) { player->pos.x = -50.0f; player->pos.y = 1200.0f; - D_ctx_80178358 = 0; + gFillScreenAlphaTarget = 0; Aquas_801BDF14(); AUDIO_PLAY_BGM(SEQ_ID_INTRO_45); case 3: - D_ctx_8017835C = 16; + gFillScreenAlphaStep = 16; - if (player->timer_1F8 > 774) { + if (player->timer_1F8 >= 775) { if (D_ctx_80177A48[4] >= 200.0f) { Math_SmoothStepToF(&D_ctx_80177A48[4], -200.0f, 1.00f, 4.0f, 4.0f); } else { @@ -5133,7 +5131,7 @@ void func_hud_800935E8(Player* player) { D_ctx_80177A10[9] = 40; } - if (player->timer_1F8 <= 774) { + if (player->timer_1F8 < 775) { D_ctx_80177A48[0] = 0.0f; temp2 = 0.0f; @@ -5189,13 +5187,13 @@ void func_hud_800935E8(Player* player) { if (player->timer_1F8 < 736) { player->unk_1D0 = 4; D_ctx_80177AC8 = 1; - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255; - D_ctx_80178358 = 255; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; + gFillScreenAlphaTarget = 255; } break; case 4: - if (D_ctx_80178340 == 255) { + if (gFillScreenAlpha == 255) { player->unk_1D0 = 5; } break; @@ -5226,7 +5224,7 @@ void func_hud_800935E8(Player* player) { player->timer_1F8 = 1000; D_ctx_80177AC8 = 0; - D_ctx_80178358 = 0; + gFillScreenAlphaTarget = 0; Object_Kill(&actor->obj, actor->sfxSource); @@ -5259,7 +5257,7 @@ void func_hud_800935E8(Player* player) { } if (player->timer_1F8 <= 900) { - D_ctx_80177838 = 50; + gLevelStatusScreenTimer = 50; player->state_1C8 = PLAYERSTATE_1C8_3; player->unk_1D0 = 0; @@ -5615,9 +5613,9 @@ void func_hud_80095604(Player* player) { case 1: if (gCsFrameCount > 240) { - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255; - D_ctx_80178358 = 255; - D_ctx_8017835C = 16; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; + gFillScreenAlphaTarget = 255; + gFillScreenAlphaStep = 16; if (gCsFrameCount == 280) { player->unk_1D0 = 10; } @@ -5794,11 +5792,11 @@ void func_hud_80095604(Player* player) { D_ctx_80177A48[0] = 1.0f; case 11: - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255; - D_ctx_80178358 = 0; - D_ctx_8017835C = 8; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; + gFillScreenAlphaTarget = 0; + gFillScreenAlphaStep = 8; - if (D_ctx_80178340 == 0) { + if (gFillScreenAlpha == 0) { player->unk_1D0 = 12; } @@ -5854,11 +5852,11 @@ void func_hud_80095604(Player* player) { gCsCamEyeZ = dest.z; if (gCsFrameCount >= 1360) { - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0; - D_ctx_80178358 = 255; - D_ctx_8017835C = 16; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; + gFillScreenAlphaTarget = 255; + gFillScreenAlphaStep = 16; - if (D_ctx_80178340 == 255) { + if (gFillScreenAlpha == 255) { D_play_800D3180[LEVEL_AQUAS] = Play_CheckMedalStatus(150) + 1; player->state_1C8 = PLAYERSTATE_1C8_6; player->timer_1F8 = 0; @@ -5887,7 +5885,7 @@ void func_hud_80095604(Player* player) { break; case 440: - D_ctx_80177840 = 100; + gLevelClearScreenTimer = 100; break; case 520: @@ -5895,31 +5893,31 @@ void func_hud_80095604(Player* player) { break; case 600: - shield = gTeamShields[3]; - gTeamShields[3] = 1; + shield = gTeamShields[TEAM_ID_PEPPY]; + gTeamShields[TEAM_ID_PEPPY] = 1; Radio_PlayMessage(gMsg_ID_15210, RCID_PEPPY); - gTeamShields[3] = shield; + gTeamShields[TEAM_ID_PEPPY] = shield; break; case 680: - shield = gTeamShields[2]; - gTeamShields[2] = 1; + shield = gTeamShields[TEAM_ID_SLIPPY]; + gTeamShields[TEAM_ID_SLIPPY] = 1; Radio_PlayMessage(gMsg_ID_15220, RCID_SLIPPY); - gTeamShields[2] = shield; + gTeamShields[TEAM_ID_SLIPPY] = shield; break; case 760: - shield = gTeamShields[1]; - gTeamShields[1] = 1; + shield = gTeamShields[TEAM_ID_FALCO]; + gTeamShields[TEAM_ID_FALCO] = 1; Radio_PlayMessage(gMsg_ID_15230, RCID_FALCO); - gTeamShields[1] = shield; + gTeamShields[TEAM_ID_FALCO] = shield; break; case 840: - shield = gTeamShields[2]; - gTeamShields[2] = 1; + shield = gTeamShields[TEAM_ID_SLIPPY]; + gTeamShields[TEAM_ID_SLIPPY] = 1; Radio_PlayMessage(gMsg_ID_15240, RCID_SLIPPY); - gTeamShields[2] = shield; + gTeamShields[TEAM_ID_SLIPPY] = shield; break; case 1000: @@ -5993,7 +5991,7 @@ void func_hud_80096A74(Player* player) { D_ctx_80177A48[0] = 0.2f; gCsFrameCount = 0; player->unk_1D0 = 1; - D_ctx_80178340 = D_ctx_80178358 = 255; + gFillScreenAlpha = gFillScreenAlphaTarget = 255; player->camEye.x = gCsCamEyeX = 0.0f; player->camEye.y = gCsCamEyeY = player->pos.y + D_ctx_80177A48[1]; @@ -6012,9 +6010,9 @@ void func_hud_80096A74(Player* player) { break; } - if ((gCsFrameCount >= 40) && (D_ctx_80178340 != 0)) { - D_ctx_80178358 = 0; - D_ctx_8017835C = 8; + if ((gCsFrameCount >= 40) && (gFillScreenAlpha != 0)) { + gFillScreenAlphaTarget = 0; + gFillScreenAlphaStep = 8; } if (gCsFrameCount < 140) { @@ -6082,7 +6080,7 @@ void func_hud_80096A74(Player* player) { if (gCsFrameCount == 300) { D_ctx_80177CE8 = 0; - D_ctx_80177838 = 50; + gLevelStatusScreenTimer = 50; player->state_1C8 = PLAYERSTATE_1C8_3; player->unk_0D0 = D_play_80161A54; player->unk_1D0 = 0; diff --git a/src/engine/fox_message.c b/src/engine/fox_message.c index 3bb859c3..1860b29d 100644 --- a/src/engine/fox_message.c +++ b/src/engine/fox_message.c @@ -51,7 +51,7 @@ s32 Message_GetCharCount(u16* msgPtr) { } void Message_DisplayChar(Gfx** gfxPtr, u16 msgChar, s32 xpos, s32 ypos) { - gDPLoadTextureBlock_4b((*gfxPtr)++, gTextCharTextures[msgChar >> 2], G_IM_FMT_CI, 16, 13, msgChar & 3, + gDPLoadTextureBlock_4b((*gfxPtr)++, gTextCharTextures[msgChar >> 2], G_IM_FMT_CI, 16, 13, msgChar % 4U, 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)++, xpos << 2, ypos << 2, (xpos + 13) << 2, (ypos + 13) << 2, G_TX_RENDERTILE, 64, 0, diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index ded040cf..57a59e0f 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -1,3 +1,4 @@ +#include "prevent_bss_reordering.h" #include "global.h" #include "fox_map.h" #include "assets/ast_corneria.h" @@ -35,7 +36,7 @@ u8 D_800D2F6C[20] = { PLANET_METEO, PLANET_KATINA, PLANET_BOLSE, PLANET_SECTOR_Z, SAVE_SLOT_VENOM_2, }; -u8 D_play_80161A50; +u8 gSavedZoSearchlightStatus; f32 D_play_80161A54; s32 D_play_80161A58; s32 D_play_80161A5C; @@ -47,7 +48,8 @@ EnvSettings* sEnvSettings; #define MEM_ARRAY_ALLOCATE(arr, count) ((arr) = Memory_Allocate((count) * sizeof(*(arr)))) bool Play_CheckMedalStatus(u16 hitCount) { - if ((gTeamShields[2] > 0) && (gTeamShields[3] > 0) && (gTeamShields[1] > 0) && (gHitCount >= hitCount)) { + if ((gTeamShields[TEAM_ID_SLIPPY] > 0) && (gTeamShields[TEAM_ID_PEPPY] > 0) && (gTeamShields[TEAM_ID_FALCO] > 0) && + (gHitCount >= hitCount)) { return true; } else { return false; @@ -85,7 +87,7 @@ void func_play_800A3FEC(void) { D_ctx_801782FC++; switch (gCurrentLevel) { case LEVEL_SOLAR: - if (gGameFrameCount & 1) { + if ((gGameFrameCount % 2) != 0) { spB4 = SEGMENTED_TO_VIRTUAL(D_SO_6001C50); } else { spB4 = SEGMENTED_TO_VIRTUAL(D_SO_6004500); @@ -98,7 +100,7 @@ void func_play_800A3FEC(void) { sp84 = 0.5f; break; case LEVEL_ZONESS: - if (gGameFrameCount & 1) { + if ((gGameFrameCount % 2) != 0) { spB4 = SEGMENTED_TO_VIRTUAL(D_ZO_6009ED0); } else { spB4 = SEGMENTED_TO_VIRTUAL(D_ZO_600C780); @@ -151,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->unk_238 == 1) && (gLevelMode == LEVELMODE_ON_RAILS))) { + if ((gLevelType == LEVELTYPE_PLANET) || ((player->cockpitView == 1) && (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; @@ -166,24 +168,24 @@ void func_play_800A46A0(Player* player) { s32 var_v1; f32 sp40; - if ((player->unk_238 == 0) || (gLevelMode == LEVELMODE_ALL_RANGE)) { + if ((player->cockpitView == 0) || (gLevelMode == LEVELMODE_ALL_RANGE)) { if (player->wings.rightState <= WINGSTATE_BROKEN) { - if (!(gGameFrameCount & 1) && (D_ctx_80177D70[player->num] != 0)) { + 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, player->hit1.z, 1.0f); } - if (!(gGameFrameCount & 1) && (Rand_ZeroOne() < 0.5f) && !gVersusMode) { + if (((gGameFrameCount % 2U) == 0) && (Rand_ZeroOne() < 0.5f) && !gVersusMode) { func_effect_8007C484(RAND_FLOAT_CENTERED(5.0f) + player->hit1.x, RAND_FLOAT(5.0f) + player->hit1.y, player->hit1.z, player->vel.x, player->vel.y, player->vel.z, RAND_FLOAT(0.02f) + 0.02f, player->num + 1); } } if (player->wings.leftState <= WINGSTATE_BROKEN) { - if (!(gGameFrameCount & 1) && (D_ctx_80177D88[player->num] != 0)) { + if (((gGameFrameCount % 2U) == 0) && (D_ctx_80177D88[player->num] != 0)) { func_effect_8007D10C(RAND_FLOAT_CENTERED(10.0f) + player->hit2.x, RAND_FLOAT(5.0f) + player->hit2.y, player->hit2.z, 1.0f); } - if (!(gGameFrameCount & 1) && (Rand_ZeroOne() < 0.5f) && !gVersusMode) { + if (((gGameFrameCount % 2U) == 0) && (Rand_ZeroOne() < 0.5f) && !gVersusMode) { func_effect_8007C484(RAND_FLOAT_CENTERED(5.0f) + player->hit2.x, RAND_FLOAT(5.0f) + player->hit2.y, player->hit2.z, player->vel.x, player->vel.y, player->vel.z, RAND_FLOAT(0.02f) + 0.02f, player->num + 1); @@ -193,25 +195,25 @@ void func_play_800A46A0(Player* player) { var_v1 = 7; if (player->shields < 64) { if (player->shields > 16) { - var_v1 = 0xF; + var_v1 = 16 - 1; } if (player->shields > 32) { - var_v1 = 0x1F; + var_v1 = 32 - 1; } if (player->shields > 48) { - var_v1 = 0x3F; + var_v1 = 64 - 1; } - if ((player->unk_238 == 0) || (gLevelMode == LEVELMODE_ALL_RANGE)) { + if ((player->cockpitView == 0) || (gLevelMode == LEVELMODE_ALL_RANGE)) { sp40 = 0.0f; if (player->form == FORM_LANDMASTER) { sp40 = 30.0f; } - if (!(gGameFrameCount & var_v1)) { + if ((gGameFrameCount & var_v1) == 0) { func_effect_8007D10C(player->pos.x + RAND_FLOAT_CENTERED(10.0f), player->pos.y + sp40 + RAND_FLOAT(10.0f), player->unk_138 + RAND_FLOAT_CENTERED(10.0f), 2.2f); } - if (!(gGameFrameCount & (var_v1 >> 2)) && (Rand_ZeroOne() < 0.5f)) { + if (((gGameFrameCount & (var_v1 >> 2)) == 0) && (Rand_ZeroOne() < 0.5f)) { func_effect_8007C484(player->pos.x + RAND_FLOAT_CENTERED(30.0f), player->pos.y + sp40 + RAND_FLOAT(10.0f), player->unk_138 + RAND_FLOAT_CENTERED(30.0f), player->vel.x, player->vel.y, @@ -220,7 +222,7 @@ void func_play_800A46A0(Player* player) { player->timer_224 = 2; } } - } else if (!(gGameFrameCount & (var_v1 >> 2)) && (Rand_ZeroOne() < 0.5f) && (player->timer_224 == 0)) { + } else if (((gGameFrameCount & (var_v1 >> 2)) == 0) && (Rand_ZeroOne() < 0.5f) && (player->timer_224 == 0)) { player->timer_224 = 2; } } @@ -232,7 +234,7 @@ void func_play_800A4C40(Player* player) { Vec3f sp3C; Vec3f sp30; - if (D_ctx_80161A88 == 2) { + if (gGroundType == GROUNDTYPE_WATER) { Matrix_Translate(gCalcMatrix, player->pos.x, player->pos.y, player->unk_138, 0); Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, 1); Matrix_RotateX(gCalcMatrix, -((player->unk_0E4 + player->unk_4D8) * M_DTOR), 1); @@ -240,12 +242,12 @@ void func_play_800A4C40(Player* player) { Matrix_MultVec3f(gCalcMatrix, &sp54, &sp3C); Matrix_MultVec3f(gCalcMatrix, &sp48, &sp30); if (player->pos.y < (gGroundLevel + 100.0f)) { - if ((sp3C.y < gGroundLevel + 80.0f) && !(gGameFrameCount & 1)) { + if ((sp3C.y < gGroundLevel + 80.0f) && ((gGameFrameCount % 2) == 0)) { if (D_play_80161A64) {} func_effect_8007ACE0(sp3C.x, gGroundLevel, sp3C.z, 0.1f, 2.0f, player->unk_0E8 + player->unk_114 + 20.0f); } - if ((sp30.y < gGroundLevel + 80.0f) && !(gGameFrameCount & 1)) { + if ((sp30.y < gGroundLevel + 80.0f) && ((gGameFrameCount % 2) == 0)) { func_effect_8007ACE0(sp30.x, gGroundLevel, sp30.z, 0.1f, 2.0f, player->unk_0E8 + player->unk_114 - 20.0f); } @@ -282,46 +284,46 @@ void func_play_800A4F7C(void) { switch (gVersusStage) { case VS_STAGE_CORNERIA: - D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(D_versus_302DE3C); + gLevelObjects = SEGMENTED_TO_VIRTUAL(D_versus_302DE3C); break; case VS_STAGE_KATINA: - D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(D_versus_302E0E4); + gLevelObjects = SEGMENTED_TO_VIRTUAL(D_versus_302E0E4); break; case VS_STAGE_SECTOR_Z: if (D_ctx_801778AC == 2) { - D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(D_versus_302E378); + gLevelObjects = SEGMENTED_TO_VIRTUAL(D_versus_302E378); } else { - D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(D_versus_302E170); + gLevelObjects = SEGMENTED_TO_VIRTUAL(D_versus_302E170); } break; } for (i = 0, j = 0; i < 199; j++) { - if (D_ctx_80178310[j].id <= OBJ_INVALID) { + if (gLevelObjects[j].id <= OBJ_INVALID) { break; } - if (D_ctx_80178310[j].id == OBJ_80_147) { + if (gLevelObjects[j].id == OBJ_80_147) { Object_58_Initialize(&gObjects58[i]); gObjects58[i].obj.status = OBJ_ACTIVE; - gObjects58[i].obj.id = D_ctx_80178310[j].id; - gObjects58[i].obj.pos.x = D_ctx_80178310[j].xPos; - gObjects58[i].obj.pos.z = D_ctx_80178310[j].zPos1; - gObjects58[i].obj.pos.y = D_ctx_80178310[j].yPos; + gObjects58[i].obj.id = gLevelObjects[j].id; + gObjects58[i].obj.pos.x = gLevelObjects[j].xPos; + gObjects58[i].obj.pos.z = gLevelObjects[j].zPos1; + gObjects58[i].obj.pos.y = gLevelObjects[j].yPos; Object_SetInfo(&gObjects58[i].info, gObjects58[i].obj.id); i++; } } for (i = 5, j = 0; i < 199; j++) { - if (D_ctx_80178310[j].id <= OBJ_INVALID) { + if (gLevelObjects[j].id <= OBJ_INVALID) { break; } - if (D_ctx_80178310[j].id != OBJ_80_147) { + if (gLevelObjects[j].id != OBJ_80_147) { Object_58_Initialize(&gObjects58[i]); gObjects58[i].obj.status = OBJ_ACTIVE; - gObjects58[i].obj.id = D_ctx_80178310[j].id; - gObjects58[i].obj.pos.x = D_ctx_80178310[j].xPos; - gObjects58[i].obj.pos.z = D_ctx_80178310[j].zPos1; - gObjects58[i].obj.pos.y = D_ctx_80178310[j].yPos; - gObjects58[i].obj.rot.y = D_ctx_80178310[j].rot.y; + gObjects58[i].obj.id = gLevelObjects[j].id; + gObjects58[i].obj.pos.x = gLevelObjects[j].xPos; + gObjects58[i].obj.pos.z = gLevelObjects[j].zPos1; + gObjects58[i].obj.pos.y = gLevelObjects[j].yPos; + gObjects58[i].obj.rot.y = gLevelObjects[j].rot.y; Object_SetInfo(&gObjects58[i].info, gObjects58[i].obj.id); i++; } @@ -332,25 +334,25 @@ void func_play_800A5330(void) { } void func_play_800A5338(void) { - Object_4C* obj4C; + Sprite* sprite; Object_58* obj58; s32 i; s32 j; - D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(D_CO_603B074); + gLevelObjects = SEGMENTED_TO_VIRTUAL(D_CO_603B074); for (j = 0, obj58 = gObjects58; j < 200; j++) { - if (D_ctx_80178310[j].id <= OBJ_INVALID) { + if (gLevelObjects[j].id <= OBJ_INVALID) { break; } - if (D_ctx_80178310[j].id < OBJ_4C_161) { + if (gLevelObjects[j].id < OBJ_SPRITE_CO_POLE) { Object_58_Initialize(obj58); obj58->obj.status = OBJ_ACTIVE; - obj58->obj.id = D_ctx_80178310[j].id; - obj58->obj.pos.x = D_ctx_80178310[j].xPos; - obj58->obj.pos.z = D_ctx_80178310[j].zPos1; - obj58->obj.pos.y = D_ctx_80178310[j].yPos; - obj58->obj.rot.y = D_ctx_80178310[j].rot.y; + obj58->obj.id = gLevelObjects[j].id; + obj58->obj.pos.x = gLevelObjects[j].xPos; + obj58->obj.pos.z = gLevelObjects[j].zPos1; + obj58->obj.pos.y = gLevelObjects[j].yPos; + obj58->obj.rot.y = gLevelObjects[j].rot.y; Object_SetInfo(&obj58->info, obj58->obj.id); if (obj58->obj.id == OBJ_80_1) { obj58->info.dList = D_CO_6020760; @@ -359,19 +361,19 @@ void func_play_800A5338(void) { } } - for (j = 0, obj4C = gObjects4C; j < ARRAY_COUNT(gObjects4C); j++) { - if (D_ctx_80178310[j].id <= OBJ_INVALID) { + for (j = 0, sprite = gSprites; j < ARRAY_COUNT(gSprites); j++) { + if (gLevelObjects[j].id <= OBJ_INVALID) { break; } - if (D_ctx_80178310[j].id == OBJ_4C_162) { - Object_4C_Initialize(obj4C); - obj4C->obj.status = OBJ_INIT; - obj4C->obj.id = D_ctx_80178310[j].id; - obj4C->obj.pos.x = D_ctx_80178310[j].xPos; - obj4C->obj.pos.z = D_ctx_80178310[j].zPos1; - obj4C->obj.pos.y = D_ctx_80178310[j].yPos; - Object_SetInfo(&obj4C->info, obj4C->obj.id); - obj4C++; + if (gLevelObjects[j].id == OBJ_SPRITE_CO_TREE) { + Sprite_Initialize(sprite); + sprite->obj.status = OBJ_INIT; + sprite->obj.id = gLevelObjects[j].id; + sprite->obj.pos.x = gLevelObjects[j].xPos; + sprite->obj.pos.z = gLevelObjects[j].zPos1; + sprite->obj.pos.y = gLevelObjects[j].yPos; + Object_SetInfo(&sprite->info, sprite->obj.id); + sprite++; } } i = 0; // fake? @@ -389,20 +391,20 @@ void func_play_800A55B0(void) { s32 i; s32 j; - D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(D_SY_6030B14); + gLevelObjects = SEGMENTED_TO_VIRTUAL(D_SY_6030B14); for (j = 0, obj58 = gObjects58; j < 200; j++) { - if (D_ctx_80178310[j].id <= OBJ_INVALID) { + if (gLevelObjects[j].id <= OBJ_INVALID) { break; } - if (D_ctx_80178310[j].id < OBJ_4C_161) { + if (gLevelObjects[j].id < OBJ_SPRITE_CO_POLE) { Object_58_Initialize(obj58); obj58->obj.status = OBJ_ACTIVE; - obj58->obj.id = D_ctx_80178310[j].id; - obj58->obj.pos.x = D_ctx_80178310[j].xPos; - obj58->obj.pos.z = D_ctx_80178310[j].zPos1; - obj58->obj.pos.y = D_ctx_80178310[j].yPos; - obj58->obj.rot.y = D_ctx_80178310[j].rot.y; + obj58->obj.id = gLevelObjects[j].id; + obj58->obj.pos.x = gLevelObjects[j].xPos; + obj58->obj.pos.z = gLevelObjects[j].zPos1; + obj58->obj.pos.y = gLevelObjects[j].yPos; + obj58->obj.rot.y = gLevelObjects[j].rot.y; Object_SetInfo(&obj58->info, obj58->obj.id); obj58++; } @@ -445,19 +447,19 @@ void func_play_800A57E0(void) { Object_SetInfo(&gBosses[i].info, gBosses[i].obj.id); } -void func_play_800A5844(void) { +void Play_Setup(void) { s32 i; D_ctx_80178410 = 0; - D_ctx_8017827C = 0; - D_enmy_80161684 = 0; - D_play_80161A50 = 0; + gLevelStage = 0; + gMissedZoSearchlight = false; + gSavedZoSearchlightStatus = false; gOverlayStage = 0; - D_360_8015F924 = D_ctx_80177CA0 = 0; + gAllRangeCheckpoint = D_ctx_80177CA0 = 0; D_ctx_80177CB0 = 0.0f; - gSavedHitCount = gCsFrameCount = D_ctx_80177838 = D_ctx_80177840 = gRadioState = 0; + gSavedHitCount = gCsFrameCount = gLevelStatusScreenTimer = gLevelClearScreenTimer = gRadioState = 0; D_ctx_8017782C = 1; - if (((gCurrentLevel == LEVEL_VENOM_2) && (D_game_80161A2E == 2)) || (gCurrentLevel == LEVEL_VENOM_ANDROSS)) { + if (((gCurrentLevel == LEVEL_VENOM_2) && (gNextLevelStage == 2)) || (gCurrentLevel == LEVEL_VENOM_ANDROSS)) { return; } for (i = 1; i < 4; i++) { @@ -629,8 +631,8 @@ void func_play_800A6148(void) { Object_Kill(&gObjects80[i].obj, gObjects80[i].sfxSource); Object_80_Initialize(&gObjects80[i]); } - for (i = 0; i < ARRAY_COUNT(gObjects4C); i++) { - Object_4C_Initialize(&gObjects4C[i]); + for (i = 0; i < ARRAY_COUNT(gSprites); i++) { + Sprite_Initialize(&gSprites[i]); } for (i = 0; i < ARRAY_COUNT(gActors); i++) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); @@ -653,11 +655,11 @@ void func_play_800A6148(void) { PlayerShot_Initialize(&gPlayerShots[i]); } D_ctx_801782B8 = D_ctx_801782BC = D_ctx_801782C0 = D_ctx_801782D0 = gBossActive = D_ctx_8017828C = D_ctx_8017812C = - D_ctx_80177E70 = D_ctx_80177E78 = D_ctx_80177E80 = 0; + D_ctx_80177E70 = D_ctx_80177E78 = gRingPassCount = 0; D_ctx_80177F10.x = D_ctx_80177F10.y = D_ctx_80177F10.z = D_ctx_80177E88.x = D_ctx_80177E88.y = D_ctx_80177E88.z = 0.0f; - for (i = 0; i < ARRAY_COUNT(D_ctx_80177E98); i++) { - D_ctx_80177E98[i].x = D_ctx_80177E98[i].y = D_ctx_80177E98[i].z = 100.0f; + 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; @@ -667,31 +669,31 @@ void func_play_800A6148(void) { } } -void func_play_800A6590(void) { - if (D_ctx_80178340 != D_ctx_80178358) { - if (D_ctx_80178340 < D_ctx_80178358) { - D_ctx_80178340 += D_ctx_8017835C; - if (D_ctx_80178340 >= D_ctx_80178358) { - D_ctx_80178340 = D_ctx_80178358; +void Play_UpdateFillScreen(void) { + if (gFillScreenAlpha != gFillScreenAlphaTarget) { + if (gFillScreenAlpha < gFillScreenAlphaTarget) { + gFillScreenAlpha += gFillScreenAlphaStep; + if (gFillScreenAlpha >= gFillScreenAlphaTarget) { + gFillScreenAlpha = gFillScreenAlphaTarget; } } else { - D_ctx_80178340 -= D_ctx_8017835C; - if (D_ctx_80178358 >= D_ctx_80178340) { - D_ctx_80178340 = D_ctx_80178358; + gFillScreenAlpha -= gFillScreenAlphaStep; + if (gFillScreenAlphaTarget >= gFillScreenAlpha) { + gFillScreenAlpha = gFillScreenAlphaTarget; } } } - D_ctx_8017835C = 16; + gFillScreenAlphaStep = 16; Math_SmoothStepToF(&D_ctx_8017836C, 0.0f, 1.0f, 0.04f, 0.001f); if (gScreenFlashTimer != 0) { gScreenFlashTimer--; if (gScreenFlashTimer & 2) { - D_ctx_80178348 = 255; - D_ctx_80178350 = 255; - D_ctx_80178354 = 255; - D_ctx_80178340 = 254; + gFillScreenRed = 255; + gFillScreenGreen = 255; + gFillScreenBlue = 255; + gFillScreenAlpha = 254; } else { - D_ctx_80178340 = 0; + gFillScreenAlpha = 0; } } } @@ -786,8 +788,8 @@ void Player_DamageWings(Player* player, s32 side, s32 damage) { func_effect_8007D0E0(player->hit1.x, player->hit1.y, player->hit1.z, 2.0f); D_ctx_80177D70[player->num] = 50; func_play_800A5FA0(player->sfxSource, 0x0900A02C, player->num); - if (D_360_8015F90C == 0) { - D_360_8015F90C = 1000; + if (gAllRangeWingRepairTimer == 0) { + gAllRangeWingRepairTimer = 1000; } } } @@ -801,8 +803,8 @@ void Player_DamageWings(Player* player, s32 side, s32 damage) { func_effect_8007D0E0(player->hit2.x, player->hit2.y, player->hit2.z, 2.0f); D_ctx_80177D88[player->num] = 50; func_play_800A5FA0(player->sfxSource, 0x0900A02C, player->num); - if (D_360_8015F90C == 0) { - D_360_8015F90C = 1000; + if (gAllRangeWingRepairTimer == 0) { + gAllRangeWingRepairTimer = 1000; } } } @@ -1570,7 +1572,7 @@ void func_play_800A8BA4(Player* player) { Actor* actor; // B4 f32 padB0; // B0 Boss* boss; // AC - Object_4C* obj4C; // A8 + Sprite* sprite; // A8 s32 pad; // A4 Object_80* obj80; // A0 Player* opponent; // 9C @@ -1594,7 +1596,7 @@ void func_play_800A8BA4(Player* player) { } } else if (player->form == FORM_ARWING) { if ((player->hit1.y < (gGroundLevel + 13.0f)) && (player->state_1C8 != PLAYERSTATE_1C8_4)) { - if (D_ctx_80161A88 == 2) { + if (gGroundType == GROUNDTYPE_WATER) { player->unk_1F4 = 7; player->unk_0E4 = (player->unk_0D0 + player->unk_110) * 0.5f; } else { @@ -1607,7 +1609,7 @@ void func_play_800A8BA4(Player* player) { } } if ((player->hit2.y < (gGroundLevel + 13.0f)) && (player->state_1C8 != PLAYERSTATE_1C8_4)) { - if (D_ctx_80161A88 == 2) { + if (gGroundType == GROUNDTYPE_WATER) { player->unk_1F4 = 7; player->unk_0E4 = (player->unk_0D0 + player->unk_110) * 0.5f; } else { @@ -1924,15 +1926,15 @@ void func_play_800A8BA4(Player* player) { actor->obj.rot.y, actor->obj.rot.z, actor->vwork[29].x, actor->vwork[29].y, actor->vwork[29].z + actor->unk_0F4.z); if (temp_v0 != 0) { - if ((temp_v0 < 0) && (actor->unk_0B4 == 38)) { + if ((temp_v0 < 0) && (actor->unk_0B4 == EINFO_38)) { actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SX_6032328); - if (D_ctx_80177E80 >= 0) { + if (gRingPassCount >= 0) { actor->unk_046 = 2; - D_ctx_80177E80++; - if (D_ctx_80177E80 == 3) { + gRingPassCount++; + if (gRingPassCount == 3) { Radio_PlayMessage(gMsg_ID_5504, RCID_FALCO); } - AUDIO_PLAY_SFX(D_enmy_800CFF54[D_ctx_80177E80], gPlayer[0].sfxSource, 0); + AUDIO_PLAY_SFX(D_enmy_800CFF54[gRingPassCount], gPlayer[0].sfxSource, 0); AUDIO_PLAY_SFX(0x49008025, gDefaultSfxSource, 4); } } else if (temp_v0 < 0) { @@ -1994,19 +1996,20 @@ void func_play_800A8BA4(Player* player) { } } } - for (i = 0, obj4C = gObjects4C; i < ARRAY_COUNT(gObjects4C); i++, obj4C++) { - if (obj4C->obj.status == OBJ_ACTIVE) { - if ((player->unk_138 - 200.0f) < obj4C->obj.pos.z) { - temp_v0 = func_play_800A7974(player, obj4C->info.hitbox, &sp98, obj4C->obj.pos.x, obj4C->obj.pos.y, - obj4C->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f); + for (i = 0, sprite = gSprites; i < ARRAY_COUNT(gSprites); i++, sprite++) { + if (sprite->obj.status == OBJ_ACTIVE) { + if ((player->unk_138 - 200.0f) < sprite->obj.pos.z) { + temp_v0 = + func_play_800A7974(player, sprite->info.hitbox, &sp98, sprite->obj.pos.x, sprite->obj.pos.y, + sprite->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f); if (temp_v0 != 0) { - if ((obj4C->obj.id == OBJ_4C_163) || (obj4C->obj.id == OBJ_4C_161) || - (obj4C->obj.id == OBJ_4C_169) || (obj4C->obj.id == OBJ_4C_162)) { - obj4C->unk_46 = 1; + if ((sprite->obj.id == OBJ_SPRITE_FO_POLE) || (sprite->obj.id == OBJ_SPRITE_CO_POLE) || + (sprite->obj.id == OBJ_SPRITE_TI_CACTUS) || (sprite->obj.id == OBJ_SPRITE_CO_TREE)) { + sprite->unk_46 = 1; player->unk_1F4 = 6; player->unk_21C = 0; } else { - Player_ApplyDamage(player, temp_v0, obj4C->info.damage); + Player_ApplyDamage(player, temp_v0, sprite->info.damage); } } } @@ -2390,7 +2393,7 @@ void func_play_800AB334(void) { break; case LEVEL_METEO: case LEVEL_SECTOR_X: - if (D_ctx_8017827C == 1) { + if (gLevelStage == 1) { gFogRed = 178; gFogGreen = 190; gFogBlue = 90; @@ -2416,7 +2419,7 @@ void func_play_800AB334(void) { break; case LEVEL_TITANIA: Titania_80188F30(); - gTeamShields[2] = -2; + gTeamShields[TEAM_ID_SLIPPY] = -2; break; case LEVEL_MACBETH: Macbeth_80199920(); @@ -2526,7 +2529,7 @@ void func_play_800ABA08(void) { func_play_800A6148(); } -void func_play_800ABAB4(void) { +void Play_Init(void) { s32 i; D_play_80161A54 = 40.0f; @@ -2535,11 +2538,11 @@ void func_play_800ABAB4(void) { } if (gExpertMode) { - D_ctx_80177828 = 200; + gEnemyShotSpeed = 200; } else { - D_ctx_80177828 = 100; + gEnemyShotSpeed = 100; } - D_ctx_801779BC = 0; + gPauseEnabled = 0; D_80137E78 = 2; D_ctx_80177C70 = 0; D_display_800CA234 = NULL; @@ -2547,7 +2550,8 @@ void func_play_800ABAB4(void) { Audio_KillSfxById(0x11403076); Audio_KillSfxById(0x49000014); Memory_FreeAll(); - D_ctx_80177C78 = D_ctx_80177C8C = gShowBossHealth = D_360_8015F908 = D_360_8015F90C = D_360_8015F910 = 0; + D_ctx_80177C78 = D_ctx_80177C8C = gShowBossHealth = gStarWolfMsgTimer = gAllRangeWingRepairTimer = + gAllRangeWingRepairSent = 0; D_display_800CA220 = 0; D_ctx_80177830 = 0; if (gCurrentLevel != LEVEL_VERSUS) { @@ -2559,7 +2563,7 @@ void func_play_800ABAB4(void) { D_display_800CA230 = D_800D2F58 = 0.0f; gLevelMode = LEVELMODE_ON_RAILS; D_ctx_80177CE8 = D_bg_8015F968 = 0.0f; - D_hud_800D1970 = gVersusMode = D_ctx_80178300 = D_ctx_80177E84 = 0; + D_hud_800D1970 = gVersusMode = D_ctx_80178300 = gChangeTo360 = 0; if (gCurrentLevel >= LEVEL_FORTUNA) { gLevelMode = LEVELMODE_ALL_RANGE; if (gCurrentLevel == LEVEL_VERSUS) { @@ -2567,32 +2571,32 @@ void func_play_800ABAB4(void) { func_play_800AB964(); } } - if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (D_ctx_8017827C == 1)) { + if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gLevelStage == 1)) { gLevelMode = LEVELMODE_ALL_RANGE; } D_ctx_80177E7C = 0; func_play_800A594C(); - gDropHitCountItem = D_ctx_8017796C = D_Timer_80177B44 = D_ctx_80177B4C = D_360_8015F928 = D_360_8015F940 = - gBossActive = gGameFrameCount = gCameraShake = D_ctx_801782FC = gBossFrameCount = D_enmy2_80161690 = - D_360_8015F900 = D_ctx_80177930 = 0; + gDropHitCountItem = D_ctx_8017796C = D_Timer_80177B44 = D_ctx_80177B4C = gAllRangeEventTimer = gAllRangeFrameCount = + gBossActive = gGameFrameCount = gCameraShake = D_ctx_801782FC = gBossFrameCount = gCallTimer = + gAllRangeSupplyTimer = gNextPlanetPath = 0; if (gCurrentLevel == LEVEL_SECTOR_X) { - D_ctx_80177930 = 1; + gNextPlanetPath = 1; } D_ctx_80177CC0 = -25000.0f; D_ctx_80177950 = 1.0f; - if ((gCurrentLevel == LEVEL_VENOM_2) && (D_ctx_8017827C == 2)) { - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255; + if ((gCurrentLevel == LEVEL_VENOM_2) && (gLevelStage == 2)) { + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; } else { - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; } gScreenFlashTimer = D_ctx_80178360 = D_ctx_80178364 = D_ctx_80178368 = D_hud_80161704 = D_hud_80161708 = - D_ctx_80178340 = D_ctx_80177C50 = D_360_8015F93C = D_ctx_80177B6C = 0; + gFillScreenAlpha = D_ctx_80177C50 = gShowAllRangeCountdown = D_ctx_80177B6C = 0; gCsFrameCount = 0; - D_ctx_80178340 = D_ctx_80178358 = 255; + gFillScreenAlpha = gFillScreenAlphaTarget = 255; - D_ctx_8017835C = 16; + gFillScreenAlphaStep = 16; D_ctx_8017836C = 0.0f; D_bg_8015F960 = 0.0f; gGroundLevel = 0.0f; @@ -2623,14 +2627,14 @@ void func_play_800ABAB4(void) { if (gCurrentLevel == LEVEL_VERSUS) { gCamCount = 4; } - for (i = 1; i < 6; i++) { + for (i = TEAM_ID_FALCO; i < TEAM_ID_MAX; i++) { gTeamShields[i] = gSavedTeamShields[i]; } MEM_ARRAY_ALLOCATE(gPlayer, gCamCount); func_play_800AB2AC(); for (i = 0; i < gCamCount; i++) { gPlayer[i].state_1C8 = PLAYERSTATE_1C8_1; - D_ctx_80178380[i] = D_ctx_801783C0[i] = 0; + gPlayerFillScreenAlphas[i] = D_ctx_801783C0[i] = 0; D_Timer_80177BD0[i] = 0; D_ctx_80177C30[i] = 0; } @@ -2664,13 +2668,13 @@ void func_play_800ABAB4(void) { break; case LEVEL_VENOM_2: Venom2_80196968(); - if (D_ctx_8017827C == 0) { + if (gLevelStage == 0) { func_360_8002F180(); } break; case LEVEL_VENOM_ANDROSS: - if (D_ctx_8017827C == 1) { - if (D_360_8015F924 == 0) { + if (gLevelStage == 1) { + if (gAllRangeCheckpoint == 0) { Andross_801878A8(); } else { Andross_801961AC(); @@ -2976,8 +2980,8 @@ bool func_play_800AD1F4(Player* player) { } if ((!(gInputHold->button & R_TRIG) || !(gInputHold->button & Z_TRIG) || (player->form != FORM_ARWING) || (player->state_1C8 != PLAYERSTATE_1C8_3)) && - !(gGameFrameCount & 3) && func_play_800AD118(player->num)) { - if (gChargeTimers[player->num] >= 21) { + ((gGameFrameCount % 4) == 0) && func_play_800AD118(player->num)) { + if (gChargeTimers[player->num] > 20) { for (i = 0; i < 13; i++) { if (gPlayerShots[i].obj.status == 0) { if (player->form == FORM_ARWING) { @@ -3085,7 +3089,7 @@ void func_play_800AD7F0(Player* player) { } if (player->timer_244 != 0) { player->timer_244--; - if ((gShootButton[player->num] & gInputHold->button) && !(player->timer_244 & 3)) { + if ((gShootButton[player->num] & gInputHold->button) && ((player->timer_244 & 3) == 0)) { func_play_800ACABC(player); } } @@ -3433,10 +3437,10 @@ void func_play_800AE4A4(Player* player) { } player->pos.z += player->vel.z; if (player->unk_0A0 - 100.0f < player->pos.y) { - player->flags_228 = 8; + player->flags_228 = PFLAG_228_3; } if (player->pos.y < -(player->unk_0A0 - 100.0f)) { - player->flags_228 = 4; + player->flags_228 = PFLAG_228_2; } func_play_800AE278(player); player->unk_138 = player->pos.z; @@ -3482,8 +3486,8 @@ void func_play_800AECAC(Player* player) { player->unk_018 = 0.05f; player->unk_014 = 0.05f; } else { - player->unk_238 = player->unk_198; - if (player->unk_238 != 0) { + player->cockpitView = player->savedCockpitView; + if (player->cockpitView != 0) { player->unk_014 = 0.0f; } } @@ -3542,7 +3546,7 @@ void func_play_800AF07C(Player* player) { Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 5.0f, 0.01f); - if (player->unk_238 != 0) { + if (player->cockpitView != 0) { Matrix_RotateZ(gCalcMatrix, player->unk_12C * M_DTOR, 0); sp68.z = 0.0f; @@ -3668,16 +3672,16 @@ void func_play_800AF07C(Player* player) { } if (player->pos.x > (player->unk_0AC + (player->unk_09C - 100.0f))) { - player->flags_228 = 1; + player->flags_228 = PFLAG_228_0; } if (player->pos.x < (player->unk_0AC - (player->unk_09C - 100.0f))) { - player->flags_228 = 2; + player->flags_228 = PFLAG_228_1; } if (player->pos.y > (player->unk_0B0 + (player->unk_0A0 - 100.0f))) { - player->flags_228 = 8; + player->flags_228 = PFLAG_228_3; } if (player->pos.y < (player->unk_0B0 - (player->unk_0A0 - 100.0f))) { - player->flags_228 = 4; + player->flags_228 = PFLAG_228_2; } player->pos.x += player->vel.x; @@ -3898,13 +3902,13 @@ void func_play_800B0194(Player* player) { Math_SmoothStepToF(&player->unk_164, sp74 * 0.3f, 0.1f, 10.0f, 0.00001f); Math_SmoothStepToF(&player->unk_168, -sp74 * 0.3f, 0.1f, 10.0f, 0.00001f); } else { - if (((gGameFrameCount & 0xF) == 0) && (Rand_ZeroOne() < 0.5f)) { + if (((gGameFrameCount % 16U) == 0) && (Rand_ZeroOne() < 0.5f)) { player->unk_17C = RAND_FLOAT_CENTERED(100.0f); } - if (((gGameFrameCount & 0xF) == 3) && (Rand_ZeroOne() < 0.5f)) { + if (((gGameFrameCount % 16U) == 3) && (Rand_ZeroOne() < 0.5f)) { player->unk_174 = RAND_RANGE(-10.0f, 40.0f); } - if (((gGameFrameCount & 0xF) == 10) && (Rand_ZeroOne() < 0.5f)) { + if (((gGameFrameCount % 16U) == 10) && (Rand_ZeroOne() < 0.5f)) { player->unk_178 = RAND_RANGE(-10.0f, 40.0f); } Math_SmoothStepToF(&player->unk_15C, player->unk_17C, 0.15f, 10.0f, 0.00001f); @@ -4058,7 +4062,7 @@ f32 D_800D3154[4] = { 45.0f, -135.0f, 135.0f, -45.0f }; void func_play_800B0F50(Player* playerx) { s32 j; Vec3f* sp38; - ObjectInit* sp34; + ObjectInit* objInit; s32 i; s16 sp2E; Player* player = playerx; // fake? @@ -4152,7 +4156,7 @@ void func_play_800B0F50(Player* playerx) { break; } if (gCurrentLevel != LEVEL_CORNERIA) { - D_ctx_80161A8C = 0; + gSavedGroundType = GROUNDTYPE_GRASS; } gGoldRingCount[0] = D_ctx_80161A94[0]; do { @@ -4165,7 +4169,7 @@ void func_play_800B0F50(Player* playerx) { gGoldRingCount[0] = 0; } gHitCount = gSavedHitCount; - if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) || ((gCurrentLevel == LEVEL_VENOM_2) && (D_ctx_8017827C == 2))) { + if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) || ((gCurrentLevel == LEVEL_VENOM_2) && (gLevelStage == 2))) { if (D_ctx_80177C9C != 0) { player->shields = D_ctx_80177C9C - 1; gGoldRingCount[0] = D_ctx_80177C94; @@ -4184,9 +4188,9 @@ void func_play_800B0F50(Player* playerx) { D_hud_80161720[2] = 0.0f; gDisplayedHitCount = gHitCount; D_hud_80161730 = 0; - D_enmy_80161684 = D_play_80161A50; + gMissedZoSearchlight = gSavedZoSearchlightStatus; D_ctx_80177DC8 = D_ctx_80177CA0; - D_ctx_80161A88 = D_ctx_80161A8C; + gGroundType = gSavedGroundType; D_ctx_80177D20 = player->unk_144 = D_ctx_80177CB0; player->pos.z = player->unk_138 = -player->unk_144; if ((D_ctx_80177CA0 > 0) && (gLevelMode == LEVELMODE_ON_RAILS)) { @@ -4253,7 +4257,7 @@ void func_play_800B0F50(Player* playerx) { player->pos.y = 670.0f; player->unk_0A0 = 730.0f; player->unk_204 = 2; - if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (D_ctx_8017827C == 1)) { + if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gLevelStage == 1)) { player->pos.x = -7910.0f; player->pos.y = 300.0f; @@ -4273,12 +4277,12 @@ void func_play_800B0F50(Player* playerx) { D_ctx_80177A48[j] = 0.0f; } D_ctx_8017782C = 0; - D_360_8015F924 = 0; + gAllRangeCheckpoint = 0; switch (gCurrentLevel) { case LEVEL_CORNERIA: player->state_1C8 = PLAYERSTATE_1C8_2; player->unk_204 = 1; - D_ctx_80161A88 = D_ctx_80161A8C = 2; + gGroundType = gSavedGroundType = GROUNDTYPE_WATER; func_play_800A3FB0(); break; case LEVEL_BOLSE: @@ -4305,8 +4309,8 @@ void func_play_800B0F50(Player* playerx) { break; } } else { - if (!gVersusMode && !((gCurrentLevel == LEVEL_VENOM_2) && (D_ctx_8017827C == 2))) { - D_ctx_80177838 = 80; + if (!gVersusMode && !((gCurrentLevel == LEVEL_VENOM_2) && (gLevelStage == 2))) { + gLevelStatusScreenTimer = 80; } if (gCurrentLevel == LEVEL_BOLSE) { @@ -4318,9 +4322,9 @@ void func_play_800B0F50(Player* playerx) { D_ctx_80177D20 = player->unk_144 = 3932.0f; D_ctx_80177DC8 = 40; - D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(D_enmy_800CFDA0[gCurrentLevel]); - for (sp34 = D_ctx_80178310, i = 0; i < D_ctx_80177DC8; i++, sp34++) { - Object_Load(sp34, 4000.0f, -4000.0f, 4000.0f, -4000.0f); + gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]); + for (objInit = gLevelObjects, i = 0; i < D_ctx_80177DC8; i++, objInit++) { + Object_Load(objInit, 4000.0f, -4000.0f, 4000.0f, -4000.0f); } Macbeth_801ACFBC(); } @@ -4364,20 +4368,20 @@ void func_play_800B0F50(Player* playerx) { break; } } else if (!gVersusMode && (gBgmSeqId != SEQ_ID_NONE) && - ((gLevelMode != LEVELMODE_ALL_RANGE) || (D_360_8015F924 == 0))) { + ((gLevelMode != LEVELMODE_ALL_RANGE) || (gAllRangeCheckpoint == 0))) { AUDIO_PLAY_BGM(gBgmSeqId); } - D_ctx_80177840 = gBossHealthBar = D_ctx_80177850 = 0; + gLevelClearScreenTimer = gBossHealthBar = D_ctx_80177850 = 0; if ((gCurrentLevel == LEVEL_TRAINING)) { D_ctx_80177824 = 1; } if (D_ctx_80177824 && !gVersusMode) { - for (j = 1; j < 6; j++) { - gTeamShields[j] = gSavedTeamShields[j] = D_ctx_80177C38[j] = D_ctx_801778F0[j] = 255; + for (j = TEAM_ID_FALCO; j < TEAM_ID_MAX; j++) { + gTeamShields[j] = gSavedTeamShields[j] = gPrevPlanetTeamShields[j] = gPrevPlanetSavedTeamShields[j] = 255; } for (j = 0; j < 6; j++) { - D_ctx_80177CD0[j] = D_ctx_80177CF0[j] = 1; + gStarWolfTeamAlive[j] = gSavedStarWolfTeamAlive[j] = 1; } gLaserStrength[gPlayerNum] = LASERS_SINGLE; gGoldRingCount[0] = D_ctx_80161A94[0] = gTotalHits = 0; @@ -4419,7 +4423,7 @@ void func_play_800B0F50(Player* playerx) { if (gLaserStrength[gPlayerNum] > LASERS_SINGLE) { player->wings.unk_14 = -10.0f; } - D_ctx_801779BC = 0; + gPauseEnabled = 0; } void func_play_800B2130(Player* player) { @@ -4604,8 +4608,8 @@ void func_play_800B2574(Player* player) { (D_Timer_80177A88[gPlayerNum] != 0)) { player->unk_4DC = 1; if (gLevelMode == LEVELMODE_ON_RAILS) { - player->unk_198 = player->unk_238; - player->unk_238 = 0; + player->savedCockpitView = player->cockpitView; + player->cockpitView = 0; } player->unk_014 = player->unk_018 = 0.0f; if (player->unk_4D8 > 340.0f) { @@ -4617,8 +4621,8 @@ void func_play_800B2574(Player* player) { if (player->timer_27C != 0) { player->timer_27C--; player->unk_2B4 = true; - if (D_ctx_80177E80 > 0) { - Math_SmoothStepToF(&D_ctx_801779A8[player->num], D_ctx_80177E80 * 10.0f, 1.0f, 5.0f, 0.0f); + if (gRingPassCount > 0) { + Math_SmoothStepToF(&D_ctx_801779A8[player->num], gRingPassCount * 10.0f, 1.0f, 5.0f, 0.0f); } player->unk_110 += 0.3f; Math_SmoothStepToF(&player->unk_08C, -130.0f, 0.2f, 10.0f, 0.0f); @@ -4627,7 +4631,7 @@ void func_play_800B2574(Player* player) { if (player->unk_258 > 50.0f) { player->unk_258 = 50.0f; } - if (!(gGameFrameCount & 1) && (gBlurAlpha > 64)) { + if (((gGameFrameCount % 2) == 0) && (gBlurAlpha > 64)) { if (1) {} gBlurAlpha--; } @@ -4894,11 +4898,11 @@ void func_play_800B3314(Player* player) { Math_SmoothStepToF(&player->unk_110, 30.0f, 0.5f, 5.0f, 0.0f); player->unk_0D4 = -0.4f; Math_SmoothStepToF(&D_ctx_801779A8[player->num], 30.0f, 1.0f, 10.0f, 0.0f); - if ((gCamCount == 1) && !(gGameFrameCount & 1)) { + if ((gCamCount == 1) && ((gGameFrameCount % 2) == 0)) { func_effect_8007BC7C(RAND_FLOAT_CENTERED(20.0f) + player->pos.x, player->unk_068 + 10.0f, player->unk_138 - 10.0f, RAND_FLOAT(2.0f) + 4.0f); } - } else if ((gCamCount == 1) && !(gGameFrameCount & 3) && (player->unk_1DC == 0)) { + } else if ((gCamCount == 1) && ((gGameFrameCount % 4) == 0) && (player->unk_1DC == 0)) { if ((player->unk_16C > 0.2f) && (player->timer_220 == 0)) { func_effect_8007BC7C(RAND_FLOAT_CENTERED(10.0f) + (player->pos.x - 57.0f), player->unk_068 + 10.0f, player->unk_138 - 10.0f, RAND_FLOAT(2.0f) + 3.0f); @@ -4973,15 +4977,15 @@ void func_play_800B39E0(Player* player) { } player->unk_200 = player->timer_224 & 1; if (player->timer_224 != 0) { - D_ctx_8017835C = 8; + gFillScreenAlphaStep = 8; } if (player->timer_224 == 19) { - D_ctx_80178340 = 128; - D_ctx_80178348 = 255; - D_ctx_80178350 = D_ctx_80178354 = 0; + gFillScreenAlpha = 128; + gFillScreenRed = 255; + gFillScreenGreen = gFillScreenBlue = 0; } if (player->timer_278 != 0) { - if (!(player->timer_278 & 7)) { + if ((player->timer_278 % 8) == 0) { if (player->timer_278 & 8) { D_ctx_80177DB8[gPlayerNum]++; } else { @@ -5066,13 +5070,13 @@ void func_play_800B415C(Player* player) { if (player->shields < 128) { if (player->shields > 80) { - var_v0 = 0x3F; + var_v0 = 64 - 1; } else if (player->shields > 40) { - var_v0 = 0x1F; + var_v0 = 32 - 1; } else { - var_v0 = 0xF; + var_v0 = 16 - 1; } - if (!(gGameFrameCount & var_v0)) { + if ((gGameFrameCount & var_v0) == 0) { func_enmy_80060F30(player->sfxSource, 0x49001026, player->num); } } @@ -5133,7 +5137,7 @@ void func_play_800B42B0(Player* player) { player->vel.x *= 0.2f; player->vel.y = 5.0f; player->unk_0E4 = player->unk_0E8 = 0.0f; - player->unk_238 = 0; + player->cockpitView = 0; player->timer_1F8 = 20; if (gLevelType == LEVELTYPE_SPACE) { player->timer_1F8 = 40; @@ -5236,7 +5240,8 @@ void func_play_800B46F8(Player* player) { if (D_ctx_8017796C > 960) { D_ctx_8017796C = 0; if (1) {} - if ((player->shields < 64) && ((gTeamShields[1] > 0) || (gTeamShields[3] > 0) || (gTeamShields[2] > 0))) { + if ((player->shields < 64) && ((gTeamShields[TEAM_ID_FALCO] > 0) || (gTeamShields[TEAM_ID_PEPPY] > 0) || + (gTeamShields[TEAM_ID_SLIPPY] > 0))) { do { do { teamId = RAND_INT(2.9f) + 1; @@ -5271,7 +5276,7 @@ void func_play_800B46F8(Player* player) { } // lots of fakery -void func_play_800B48BC(Player* player) { +void Player_Update1(Player* player) { f32 sp1CC; f32 sp1C8; s32 sp1C4; @@ -5297,7 +5302,7 @@ void func_play_800B48BC(Player* player) { } if (D_Timer_80177BD0[player->num] != 0) { D_Timer_80177BD0[player->num]--; - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { *D_ctx_80177984 = 1; } } @@ -5328,16 +5333,16 @@ void func_play_800B48BC(Player* player) { case PLAYERSTATE_1C8_0: player->unk_234 = 0; D_game_80161A2C = 0; - D_ctx_801779BC = 0; + gPauseEnabled = 0; break; case PLAYERSTATE_1C8_1: func_play_800B0F50(player); - D_ctx_80178358 = 0; - D_ctx_801779BC = 0; + gFillScreenAlphaTarget = 0; + gPauseEnabled = 0; break; case PLAYERSTATE_1C8_2: D_game_80161A2C = 0; - D_ctx_801779BC = 0; + gPauseEnabled = 0; player->wings.unk_2C = 1; func_demo_8004A52C(player); break; @@ -5349,7 +5354,7 @@ void func_play_800B48BC(Player* player) { if ((!gVersusMode || (D_ctx_80177E7C != 0)) && (player->unk_4DC == 0) && (gInputPress->button & U_CBUTTONS) && ((player->form == FORM_ARWING) || (gVersusMode && (player->form == FORM_LANDMASTER)))) { - if (player->unk_238 = 1 - player->unk_238) { + if (player->cockpitView = 1 - player->cockpitView) { AUDIO_PLAY_SFX(0x4900002C, gDefaultSfxSource, 4); } else { AUDIO_PLAY_SFX(0x4900002D, gDefaultSfxSource, 4); @@ -5392,7 +5397,7 @@ void func_play_800B48BC(Player* player) { } else { gInputPress->stick_x = gInputPress->stick_y = 0; D_ctx_80177844 = 0; - D_ctx_801779BC = 0; + gPauseEnabled = 0; } break; case LEVELMODE_UNK_2: @@ -5425,28 +5430,28 @@ void func_play_800B48BC(Player* player) { } break; case PLAYERSTATE_1C8_7: - player->unk_238 = 0; - D_ctx_801779BC = 0; + player->cockpitView = 0; + gPauseEnabled = 0; func_play_800B40AC(player); func_demo_8004C930(player); func_play_800A4C40(player); D_game_80161A2C = gChargeTimers[player->num] = 0; break; case PLAYERSTATE_1C8_8: - D_ctx_801779BC = 0; + gPauseEnabled = 0; func_play_800B40AC(player); func_demo_80049C0C(player); D_game_80161A2C = 0; break; case PLAYERSTATE_1C8_9: - D_ctx_801779BC = 0; + gPauseEnabled = 0; func_play_800B40AC(player); func_demo_8004AAF4(player); func_play_800B2130(player); - gChargeTimers[player->num] = player->unk_238 = D_game_80161A2C = 0; + gChargeTimers[player->num] = player->cockpitView = D_game_80161A2C = 0; break; case PLAYERSTATE_1C8_10: - D_ctx_801779BC = 0; + gPauseEnabled = 0; func_360_8002E700(player); D_game_80161A2C = 0; break; @@ -5478,7 +5483,7 @@ void func_play_800B48BC(Player* player) { case PLAYERSTATE_1C8_6: D_game_80161A2C = 0; if (!gVersusMode) { - D_ctx_801779BC = 0; + gPauseEnabled = 0; } player->unk_234 = 0; player->vel.z = player->vel.x = player->vel.y = player->unk_0D8.x = player->unk_0D8.y = 0.0f; @@ -5496,14 +5501,14 @@ void func_play_800B48BC(Player* player) { player->state_1C8 = PLAYERSTATE_1C8_13; player->timer_1F8 = 200; } else { - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0; - D_ctx_80178358 = 255; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; + gFillScreenAlphaTarget = 255; } - if (D_ctx_80178340 == 255) { + if (gFillScreenAlpha == 255) { func_play_800A6148(); D_ctx_80177D20 = gPlayer[0].unk_144 = 0.0f; - D_ctx_80178380[0] = 0; - D_360_8015F93C = gRadioState = 0; + gPlayerFillScreenAlphas[0] = 0; + gShowAllRangeCountdown = gRadioState = 0; Audio_ClearVoice(); Audio_SetBaseSfxReverb(0); D_ctx_80161A94[0] = gGoldRingCount[0]; @@ -5517,33 +5522,33 @@ void func_play_800B48BC(Player* player) { } if (D_ctx_8017837C != 4) { if (D_ctx_8017837C != 7) { - gDrawMode = DRAWMODE_0; + gDrawMode = DRAW_NONE; } else if (gCurrentLevel == LEVEL_TRAINING) { gGameState = GSTATE_MENU; - D_Timer_8017783C = 2; + gNextGameStateTimer = 2; gOptionMenuStatus = OPTION_WAIT; - gDrawMode = DRAWMODE_0; + gDrawMode = DRAW_NONE; D_game_80161A34 = 7; D_ctx_80178410 = 0; } else { if ((gCurrentLevel == LEVEL_SECTOR_X) || (gCurrentLevel == LEVEL_METEO)) { - D_ctx_8017827C = 0; + gLevelStage = 0; } if (gLifeCount[gPlayerNum] < 0) { gNextGameState = GSTATE_GAME_OVER; D_ctx_80161A94[0] = 0; } else { - D_ctx_80177854 = 1; + gPlayState = PLAY_INIT; } gBombCount[gPlayerNum] = 3; gLaserStrength[gPlayerNum] = LASERS_SINGLE; D_ctx_80178488 = true; - gDrawMode = DRAWMODE_0; + gDrawMode = DRAW_NONE; } } else { gNextGameState = GSTATE_MAP; D_game_80161A34 = 7; - gDrawMode = DRAWMODE_0; + gDrawMode = DRAW_NONE; } if (1) {} } @@ -5774,7 +5779,7 @@ void func_play_800B63BC(Player* player, s32 arg1) { Matrix_RotateX(gCalcMatrix, player->unk_134 * 0.2f * M_DTOR, 1); sp74.x = 0.0f; sp74.y = 0.0f; - if (player->unk_238 != 0) { + if (player->cockpitView != 0) { sp74.z = 1000.0f - player->unk_08C; } else { sp74.z = 300.0f - player->unk_08C; @@ -5846,7 +5851,7 @@ void func_play_800B6848(Player* player, s32 arg1) { Matrix_RotateY(gCalcMatrix, (player->unk_114 + (player->unk_134 * 0.2f)) * M_DTOR, 1); Matrix_RotateX(gCalcMatrix, player->unk_134 * 0.2f * M_DTOR, 1); sp54.x = 0.0f; - if (player->unk_238 != 0) { + if (player->cockpitView) { sp54.y = 150.0f; sp54.z = 500.0f - player->unk_08C; } else { @@ -5854,7 +5859,7 @@ void func_play_800B6848(Player* player, s32 arg1) { sp54.z = 250.0f - player->unk_08C; } Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48); - if (player->unk_238 != 0) { + if (player->cockpitView) { Math_SmoothStepToF(&player->unk_02C, -player->unk_17C * 3.0f + 30.0f, 0.2f, 8.0f, 0.001f); } else { Math_SmoothStepToF(&player->unk_02C, -player->unk_17C * 3.0f, 0.2f, 8.0f, 0.001f); @@ -5981,13 +5986,13 @@ void func_play_800B7184(Player* player, s32 arg1) { } } -void func_play_800B71E4(Player* player) { +void Player_Update2(Player* player) { switch (player->state_1C8) { case PLAYERSTATE_1C8_3: switch (gLevelMode) { case LEVELMODE_ON_RAILS: if (player->form == FORM_ARWING) { - if (player->unk_238 == 0) { + if (player->cockpitView == 0) { func_play_800B56BC(player); } else { func_play_800B5D30(player, 0); @@ -6116,7 +6121,7 @@ void func_play_800B73E0(Player* player) { gLight2z = sp38.z; } -void func_play_800B79B0(void) { +void Play_UpdateLevel(void) { s32 var_v0_2; s32 sp40; f32 sp3C; @@ -6146,17 +6151,17 @@ void func_play_800B79B0(void) { } break; case LEVEL_VENOM_2: - if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7) && (D_ctx_8017827C == 2)) { + if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7) && (gLevelStage == 2)) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_7; gPlayer[0].unk_1D0 = 0; gPlayer[0].unk_234 = 1; gPlayer[0].pos.z = 15000.0f; func_play_800B7184(gPlayer, 1); - D_ctx_80178340 = 255; - D_ctx_8017835C = 255; - D_ctx_80178358 = 255; + gFillScreenAlpha = 255; + gFillScreenAlphaStep = 255; + gFillScreenAlphaTarget = 255; - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; } break; case LEVEL_VENOM_ANDROSS: @@ -6175,7 +6180,7 @@ void func_play_800B79B0(void) { Texture_Scroll(D_102FF08, 8, 8, 1); /* fallthrough */ case LEVEL_SECTOR_X: - if (D_ctx_8017827C == 1) { + if (gLevelStage == 1) { gBlurAlpha = 128; if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) { Math_SmoothStepToF(&D_bg_8015F960, 0.0f, 1.0f, 1.0f, 0.0f); @@ -6183,19 +6188,19 @@ void func_play_800B79B0(void) { Math_SmoothStepToF(&D_bg_8015F960, 128.0f, 1.0f, 1.0f, 0.0f); } } - if ((gCurrentLevel == LEVEL_SECTOR_X) && (D_ctx_8017827C == 0) && (D_ctx_80177E80 == 4)) { - D_ctx_80177E80++; + if ((gCurrentLevel == LEVEL_SECTOR_X) && (gLevelStage == 0) && (gRingPassCount == 4)) { + gRingPassCount++; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_8; gPlayer[0].unk_1D0 = 0; gOverlayStage = 1; AUDIO_PLAY_SFX(0x1900602A, gDefaultSfxSource, 0); - D_ctx_80177930 = 2; + gNextPlanetPath = 2; D_play_800D3180[gCurrentLevel] = 1; } break; case LEVEL_CORNERIA: func_hud_8008C104(D_CO_603EB38, D_CO_6028A60); - if (gGameFrameCount & 1) { + if ((gGameFrameCount % 2) != 0) { Texture_Scroll(D_CO_600CBD8, 64, 32, 3); } break; @@ -6214,25 +6219,25 @@ void func_play_800B79B0(void) { Texture_Mottle(D_SO_601E1E8, D_SO_6020F60, 3); if (gPlayer[0].pos.y > 600.0f) { - var_v0_2 = 7; + var_v0_2 = 8 - 1; sp3A = 5; } else if (gPlayer[0].pos.y > 500.0f) { - var_v0_2 = 7; + var_v0_2 = 8 - 1; sp3A = 4; } else if (gPlayer[0].pos.y > 400.0f) { - var_v0_2 = 3; + var_v0_2 = 4 - 1; sp3A = 3; } else if (gPlayer[0].pos.y > 300.0f) { - var_v0_2 = 3; + var_v0_2 = 4 - 1; sp3A = 2; } else if (gPlayer[0].pos.y > 200.0f) { - var_v0_2 = 1; + var_v0_2 = 2 - 1; sp3A = 1; } else if (gPlayer[0].pos.y > 100.0f) { - var_v0_2 = 0; + var_v0_2 = 1 - 1; sp3A = 0; } else { - var_v0_2 = 0; + var_v0_2 = 1 - 1; #ifdef AVOID_UB sp3A = 0; #endif @@ -6253,7 +6258,7 @@ void func_play_800B79B0(void) { } var_a0 = MIN(gPlayer[0].shields, 255); func_8001D1C8(var_a0, sp3A); - if (!(gGameFrameCount & 7) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7)) { + if (((gGameFrameCount % 8) == 0) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7)) { Solar_8019E8B8(RAND_FLOAT_CENTERED(6000.0f), -80.0f, gPlayer[0].unk_138 + (RAND_FLOAT(2000.0f) + -6000.0f), RAND_FLOAT(10.0f) + 20.0f); // check @@ -6296,11 +6301,11 @@ void func_play_800B79B0(void) { } } -void func_play_800B832C(void) { +void Play_Update(void) { s32 i; - func_play_800A6590(); - for (i = 1; i < 4; i++) { + Play_UpdateFillScreen(); + for (i = TEAM_ID_FALCO; i <= TEAM_ID_PEPPY; i++) { if (gTeamDamage[i] > 0) { gTeamDamage[i] -= 2; gTeamShields[i] -= 2; @@ -6311,14 +6316,14 @@ void func_play_800B832C(void) { } for (i = 0; i < gCamCount; i++) { gPlayer[i].num = gPlayerNum = i; - func_play_800B48BC(&gPlayer[i]); + Player_Update1(&gPlayer[i]); } - Object_UpdateAll(); - func_beam_8003D9B8(); + Object_Update(); + PlayerShot_Update(); BonusText_Update(); for (i = 0; i < gCamCount; i++) { gPlayer[i].num = gPlayerNum = i; - func_play_800B71E4(&gPlayer[i]); + Player_Update2(&gPlayer[i]); } gCameraShakeY = 0.0f; if (gCameraShake != 0) { @@ -6331,7 +6336,7 @@ void func_play_800B832C(void) { } gCameraShakeY = var_fv1 * SIN_DEG(gGameFrameCount * 70.0f); } - func_play_800B79B0(); + Play_UpdateLevel(); } u8 D_800D317C = 255; @@ -6359,7 +6364,7 @@ void func_play_800B86A4(f32* arg0) { *arg0 += D_ctx_80177D20 + 15000.0f; } -void func_play_800B86CC(void) { +void Play_Main(void) { s32 pad1; s32 pad2; s32 pad3; @@ -6378,8 +6383,8 @@ void func_play_800B86CC(void) { break; } Math_SmoothStepToF(&D_game_80161A3C, sp34, 0.1f, 5.0f, 0.0f); - if (D_ctx_80177E84 != 0) { - D_ctx_80177E84 = 0; + if (gChangeTo360) { + gChangeTo360 = false; gLevelMode = LEVELMODE_ALL_RANGE; if (gCurrentLevel != LEVEL_VENOM_ANDROSS) { MEM_ARRAY_ALLOCATE(gObjects58, 200); @@ -6403,31 +6408,31 @@ void func_play_800B86CC(void) { gPlayer[0].camAt.z += 15000.0f; gPlayer[0].unk_144 = gPlayer[0].unk_140 = D_ctx_80177D08 = D_ctx_80177D20 = 0.0f; } - if (D_ctx_80177854 != 100) { + if (gPlayState != PLAY_PAUSE) { (void) "play_time = %d\n"; gGameFrameCount++; } - switch (D_ctx_80177854) { - case 0: - if (D_Timer_8017783C == 0) { - D_ctx_80177854 = 1; + switch (gPlayState) { + case PLAY_STANDBY: + if (gNextGameStateTimer == 0) { + gPlayState = PLAY_INIT; } break; - case 1: - func_play_800ABAB4(); + case PLAY_INIT: + Play_Init(); D_800D2F5C = gVolumeSettings[0]; D_800D2F60 = gVolumeSettings[1]; D_800D2F64 = gVolumeSettings[2]; - D_ctx_80177854 = 2; + gPlayState = PLAY_UPDATE; break; - case 2: - if (!((D_ctx_80177838 == 0) && (D_ctx_80177840 == 0))) { - D_ctx_801779BC = 0; + case PLAY_UPDATE: + if ((gLevelStatusScreenTimer != 0) || (gLevelClearScreenTimer != 0)) { + gPauseEnabled = false; } else { - D_ctx_801779BC = 1; + gPauseEnabled = true; } - gDrawMode = DRAWMODE_4; - func_play_800B832C(); + gDrawMode = DRAW_PLAY; + Play_Update(); if ((gControllerPress[gMainController].button & START_BUTTON) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2) && gSaveFile.save.data.planet[D_800D2F6C[gCurrentLevel]].normalClear) { @@ -6438,28 +6443,28 @@ void func_play_800B86CC(void) { Audio_KillSfxBySource(gPlayer[i].sfxSource); func_8001CA24(i); } - D_ctx_80177854 = 1; + gPlayState = PLAY_INIT; gDrawMode = gVersusMode = 0; gCamCount = 1; gBgColor = 0; - gCsFrameCount = D_ctx_80177840 = D_ctx_80177838 = gRadioState = 0; + gCsFrameCount = gLevelClearScreenTimer = gLevelStatusScreenTimer = gRadioState = 0; D_ctx_8017782C = 0; } if (gVersusMode) { func_versus_800C1E9C(); } - if ((gControllerPress[gMainController].button & START_BUTTON) && (D_ctx_801779BC != 0)) { + if ((gControllerPress[gMainController].button & START_BUTTON) && gPauseEnabled) { func_8001D638(1); - D_ctx_80177854 = 100; + gPlayState = PLAY_PAUSE; D_ctx_80177868 = 4; D_ctx_80178484 = 100000; } break; - case 100: + case PLAY_PAUSE: if (!gVersusMode) { if ((gControllerPress[gMainController].button & R_TRIG) && (gPlayer[0].form != FORM_BLUE_MARINE) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_0)) { - if (D_game_800D2860[0] = 1 - D_game_800D2860[0]) { + if (gShowCrosshairs[0] = 1 - gShowCrosshairs[0]) { AUDIO_PLAY_SFX(0x49000019, gDefaultSfxSource, 4); } else { AUDIO_PLAY_SFX(0x4900101A, gDefaultSfxSource, 4); @@ -6468,7 +6473,7 @@ void func_play_800B86CC(void) { } else { for (i = 0; i < 4; i++) { if ((gControllerPress[i].button & R_TRIG) && (gPlayer[i].form != FORM_ON_FOOT)) { - if (D_game_800D2860[i] = 1 - D_game_800D2860[i]) { + if (gShowCrosshairs[i] = 1 - gShowCrosshairs[i]) { func_enmy_80060F30(gPlayer[i].sfxSource, 0x49000019, i); } else { func_enmy_80060F30(gPlayer[i].sfxSource, 0x4900101A, i); @@ -6477,12 +6482,12 @@ void func_play_800B86CC(void) { } } if ((D_ctx_80177868 == 4) && (gControllerPress[gMainController].button & START_BUTTON) && - (D_ctx_801779BC != 0)) { + (gPauseEnabled != 0)) { func_8001D638(0); - D_ctx_80177854 = 2; - gDrawMode = DRAWMODE_4; + gPlayState = PLAY_UPDATE; + gDrawMode = DRAW_PLAY; } - D_ctx_801779BC = 1; + gPauseEnabled = 1; break; } } diff --git a/src/engine/fox_radio.c b/src/engine/fox_radio.c index de4b97ae..841e97ae 100644 --- a/src/engine/fox_radio.c +++ b/src/engine/fox_radio.c @@ -4,6 +4,7 @@ * Description: Starfox Radio Handler */ +#include "prevent_bss_reordering.h" #include "global.h" #include "assets/ast_allies.h" #include "assets/ast_corneria.h" @@ -76,13 +77,13 @@ void Radio_PlayMessage(u16* msg, RadioCharacterId character) { if (gGameState == GSTATE_PLAY) { if ((character == RCID_FALCO) || (character == RCID_SLIPPY) || (character == RCID_PEPPY)) { if (character == RCID_FALCO) { - var_v1 = 1; + var_v1 = TEAM_ID_FALCO; } if (character == RCID_SLIPPY) { - var_v1 = 2; + var_v1 = TEAM_ID_SLIPPY; } if (character == RCID_PEPPY) { - var_v1 = 3; + var_v1 = TEAM_ID_PEPPY; } if ((gTeamShields[var_v1] <= 0) && (gTeamShields[var_v1] != -2)) { return; @@ -123,7 +124,7 @@ void Radio_PlayMessage(u16* msg, RadioCharacterId character) { switch (gGameState) { case GSTATE_TITLE: - case GSTATE_CREDITS: + case GSTATE_ENDING: D_radio_8017872C = 176; D_radio_80178728 = 85; D_radio_80178730 = 80.0f; @@ -147,7 +148,7 @@ void Radio_PlayMessage(u16* msg, RadioCharacterId character) { Audio_PlayVoice(D_ctx_801782E8); } -s32 D_radio_80178744; +s32 sRadioUseRedBox; void func_radio_800BAAE8(void) { static f32 D_800D4A74 = -1.0f; @@ -158,19 +159,19 @@ void func_radio_800BAAE8(void) { f32 temp_fa0; s32 j; - D_radio_80178744 = 0; + sRadioUseRedBox = 0; mirror = false; switch (D_ctx_801782A4) { case RCID_FOX_RED: - D_radio_80178744 = 1; + sRadioUseRedBox = 1; /* fallthrough */ case RCID_FOX: sp44 = D_10050E0; break; case RCID_FOX_RED_OPEN: - D_radio_80178744 = 1; + sRadioUseRedBox = 1; /* fallthrough */ case RCID_FOX_OPEN: sp44 = D_1006000; @@ -182,37 +183,37 @@ void func_radio_800BAAE8(void) { sp44 = D_1007E40; break; case RCID_FALCO_RED: - D_radio_80178744 = 1; + sRadioUseRedBox = 1; /* fallthrough */ case RCID_FALCO: sp44 = D_10032A0; break; case RCID_FALCO_RED_OPEN: - D_radio_80178744 = 1; + sRadioUseRedBox = 1; /* fallthrough */ case RCID_FALCO_OPEN: sp44 = D_10041C0; break; case RCID_SLIPPY_RED: - D_radio_80178744 = 1; + sRadioUseRedBox = 1; /* fallthrough */ case RCID_SLIPPY: sp44 = D_100D900; break; case RCID_SLIPPY_RED_OPEN: - D_radio_80178744 = 1; + sRadioUseRedBox = 1; /* fallthrough */ case RCID_SLIPPY_OPEN: sp44 = D_100E820; break; case RCID_PEPPY_RED: - D_radio_80178744 = 1; + sRadioUseRedBox = 1; /* fallthrough */ case RCID_PEPPY: sp44 = D_100BAC0; break; case RCID_PEPPY_RED_OPEN: - D_radio_80178744 = 1; + sRadioUseRedBox = 1; /* fallthrough */ case RCID_PEPPY_OPEN: sp44 = D_100C9E0; @@ -320,14 +321,14 @@ void func_radio_800BAAE8(void) { sp44 = D_MA_6011B40; break; case RCID_ROB64_RED: - D_radio_80178744 = 1; + sRadioUseRedBox = 1; /* fallthrough */ case RCID_ROB64: case RCID_ROB64_2: sp44 = D_1009C80; break; case RCID_ROB64_RED_OPEN: - D_radio_80178744 = 1; + sRadioUseRedBox = 1; /* fallthrough */ case RCID_ROB64_OPEN: case RCID_ROB64_2_OPEN: @@ -345,7 +346,7 @@ void func_radio_800BAAE8(void) { if ((gGameState == GSTATE_PLAY) && (gCurrentLevel == LEVEL_AREA_6)) { sp44 = D_A6_6000B60; } - D_radio_80178744 = 1; + sRadioUseRedBox = 1; break; case RCID_ANDROSS_RED_OPEN: case RCID_ANDROSS_OPEN: @@ -353,7 +354,7 @@ void func_radio_800BAAE8(void) { if ((gGameState == GSTATE_PLAY) && (gCurrentLevel == LEVEL_AREA_6)) { sp44 = D_A6_6001A80; } - D_radio_80178744 = 1; + sRadioUseRedBox = 1; break; case RCID_JAMES: sp44 = D_D005C30; @@ -403,12 +404,12 @@ void func_radio_800BAAE8(void) { sp44 = D_1008D60; break; case GSTATE_TITLE: - case GSTATE_CREDITS: + case GSTATE_ENDING: sp44 = gTitleRadioStatic; break; } if (((s32) D_ctx_80177D68 == RCID_ANDROSS) || ((s32) D_ctx_80177D68 == RCID_ANDROSS_RED)) { - D_radio_80178744 = 1; + sRadioUseRedBox = 1; } break; } @@ -463,7 +464,7 @@ void func_radio_800BB388(void) { RCP_SetupDL(&gMasterDisp, 0x55); switch (gGameState) { case GSTATE_TITLE: - case GSTATE_CREDITS: + case GSTATE_ENDING: sp38 = D_TITLE_601D750; sp34 = D_TITLE_601DB50; break; @@ -472,7 +473,7 @@ void func_radio_800BB388(void) { sp34 = D_1013570; break; } - if (D_radio_80178744 == 1) { + if (sRadioUseRedBox == 1) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 25, 25, 170); } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 60, 60, 255, 170); @@ -496,7 +497,7 @@ void func_radio_800BB5D0(void) { u32 temp_v0; s32 fakeTemp; - if ((D_ctx_80177854 == 100) && (gGameState != GSTATE_CREDITS)) { + if ((gPlayState == PLAY_PAUSE) && (gGameState != GSTATE_ENDING)) { return; } @@ -529,7 +530,7 @@ void func_radio_800BB5D0(void) { D_Timer_801782AC = 10; } D_ctx_801782A4 = 2; - if (gGameFrameCount & 1) { + if ((gGameFrameCount & 1) != 0) { D_ctx_801782A4 = 3; } break; @@ -540,7 +541,7 @@ void func_radio_800BB5D0(void) { D_Timer_801782AC = 10; } D_ctx_801782A4 = 2; - if (gGameFrameCount & 1) { + if ((gGameFrameCount & 1) != 0) { D_ctx_801782A4 = 3; } break; @@ -554,7 +555,7 @@ void func_radio_800BB5D0(void) { } else { D_Timer_801782AC = (2 * temp_v0) + 16; } - if ((gGameState == GSTATE_TITLE) || (gGameState == GSTATE_CREDITS)) { + if ((gGameState == GSTATE_TITLE) || (gGameState == GSTATE_ENDING)) { D_Timer_801782AC = temp_v0 * 2; } } @@ -639,7 +640,7 @@ void func_radio_800BB5D0(void) { case 6: if (D_Timer_801782AC == 0) { - if (gGameState == GSTATE_CREDITS) { + if (gGameState == GSTATE_ENDING) { Audio_ClearVoice(); } else { Audio_PlayVoice(0); @@ -647,7 +648,7 @@ void func_radio_800BB5D0(void) { gRadioState++; } D_ctx_801782A4 = 2; - if (gGameFrameCount & 1) { + if ((gGameFrameCount & 1) != 0) { D_ctx_801782A4 = 3; } D_ctx_80177D50 -= 0.26f; @@ -664,7 +665,7 @@ void func_radio_800BB5D0(void) { gRadioState = 0; } D_ctx_801782A4 = 2; - if (gGameFrameCount & 1) { + if ((gGameFrameCount & 1) != 0) { D_ctx_801782A4 = 3; } break; @@ -687,13 +688,13 @@ void func_radio_800BB5D0(void) { if (((temp_ft0 == RCID_FALCO) || (temp_ft0 == RCID_SLIPPY)) || (temp_ft0 == RCID_PEPPY)) { if (temp_ft0 == RCID_FALCO) { - var_v1 = 1; + var_v1 = TEAM_ID_FALCO; } if (temp_ft0 == RCID_SLIPPY) { - var_v1 = 2; + var_v1 = TEAM_ID_SLIPPY; } if (temp_ft0 == RCID_PEPPY) { - var_v1 = 3; + 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)) { @@ -764,7 +765,7 @@ void func_radio_800BB5D0(void) { } void func_radio_800BC040(void) { - if (D_ctx_80177854 != 100) { + if (gPlayState != PLAY_PAUSE) { if (D_Timer_801782AC > 0) { D_Timer_801782AC--; } @@ -800,7 +801,7 @@ void func_radio_800BC040(void) { D_ctx_801782A4 = 2; - if (gGameFrameCount & 1) { + if ((gGameFrameCount & 1) != 0) { D_ctx_801782A4 = 3; } break; @@ -846,7 +847,7 @@ void func_radio_800BC040(void) { D_ctx_801782A4 = 2; - if (gGameFrameCount & 1) { + if ((gGameFrameCount & 1) != 0) { D_ctx_801782A4 = 3; } @@ -864,7 +865,7 @@ void func_radio_800BC040(void) { D_Timer_801782AC = 5; } D_ctx_801782A4 = 2; - if (gGameFrameCount & 1) { + if ((gGameFrameCount & 1) != 0) { D_ctx_801782A4 = 3; } break; diff --git a/src/engine/fox_rcp.c b/src/engine/fox_rcp.c index d59a1c5f..69e90d1e 100644 --- a/src/engine/fox_rcp.c +++ b/src/engine/fox_rcp.c @@ -1,5 +1,4 @@ #include "global.h" - #include "fox_rcp_setup.c" u8 D_80178580[0x190]; diff --git a/src/engine/fox_std_lib.c b/src/engine/fox_std_lib.c index 15d5ff62..1cc1d824 100644 --- a/src/engine/fox_std_lib.c +++ b/src/engine/fox_std_lib.c @@ -1132,7 +1132,7 @@ void Graphics_DisplaySmallText(s32 xPos, s32 yPos, f32 xScale, f32 yScale, char* xPosCurrent += 6.0f * xScale; break; default: - if (var_t0 > 29) { + if (var_t0 >= 30) { xPosCurrent += 9.0f * xScale; } else { xPosCurrent += 8.0f * xScale; @@ -1163,7 +1163,7 @@ s32 Graphics_GetSmallTextWidth(char* text) { xPos += 6.0f; break; default: - if (charIndex > 29) { + if (charIndex >= 30) { xPos += 9.0f; } else { xPos += 8.0f; diff --git a/src/engine/fox_tank.c b/src/engine/fox_tank.c index 4eb0b069..b5c9cfbc 100644 --- a/src/engine/fox_tank.c +++ b/src/engine/fox_tank.c @@ -178,11 +178,11 @@ void func_tank_80043B18(Player* player) { if (gCurrentLevel == LEVEL_MACBETH) { func_tank_80043AA0(player->pos.x + sp3C.x, player->pos.y + sp3C.y, player->unk_138 + sp3C.z, 0.2f); } else { - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { Titania_80189120(player->pos.x + sp3C.x, player->pos.y + sp3C.y, player->unk_138 + sp3C.z, player->unk_0E8 + sp38, 1.3f); } - if (!(gGameFrameCount & 3)) { + if (((gGameFrameCount % 4) == 0)) { func_effect_8007A900(player->pos.x + sp3C.x, player->pos.y + sp3C.y + 20.0f, player->unk_138 + sp3C.z, 2.0f, 255, 15, 0); } @@ -193,15 +193,15 @@ void func_tank_80043B18(Player* player) { sp48.x = 36.0f; Matrix_MultVec3f(gCalcMatrix, &sp48, &sp3C); if (gCurrentLevel == LEVEL_MACBETH) { - if (gGameFrameCount & 1) { + if ((gGameFrameCount % 2) != 0) { func_tank_80043AA0(player->pos.x + sp3C.x, player->pos.y + sp3C.y, player->unk_138 + sp3C.z, 0.2f); } } else { - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { Titania_80189120(player->pos.x + sp3C.x, player->pos.y + sp3C.y, player->unk_138 + sp3C.z, player->unk_0E8 + sp38, 1.0f); } - if (!(gGameFrameCount & 3) && (player->unk_0D0 >= 5.0f)) { + if (((gGameFrameCount % 4) == 0) && (player->unk_0D0 >= 5.0f)) { func_effect_8007A900(player->pos.x + sp3C.x, player->pos.y + sp3C.y + 20.0f, player->unk_138 + sp3C.z, 2.0f, 255, 15, 0); } @@ -211,15 +211,15 @@ void func_tank_80043B18(Player* player) { sp48.x = -36.0f; Matrix_MultVec3f(gCalcMatrix, &sp48, &sp3C); if (gCurrentLevel == LEVEL_MACBETH) { - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { func_tank_80043AA0(player->pos.x + sp3C.x, player->pos.y + sp3C.y, player->unk_138 + sp3C.z, 0.2f); } } else { - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { Titania_80189120(player->pos.x + sp3C.x, player->pos.y + sp3C.y, player->unk_138 + sp3C.z, player->unk_0E8 + sp38, 1.0f); } - if (!(gGameFrameCount & 3) && (player->unk_0D0 >= 5.0f)) { + if (((gGameFrameCount % 4) == 0) && (player->unk_0D0 >= 5.0f)) { func_effect_8007A900(player->pos.x + sp3C.x, player->pos.y + sp3C.y + 20.0f, player->unk_138 + sp3C.z, 2.0f, 255, 15, 0); } @@ -449,10 +449,10 @@ void func_tank_80044868(Player* player) { } player->pos.x += player->vel.x; if ((player->unk_0AC + (player->unk_09C - 100.0f)) < player->pos.x) { - player->flags_228 = 1; + player->flags_228 = PFLAG_228_0; } if (player->pos.x < (player->unk_0AC - (player->unk_09C - 100.0f))) { - player->flags_228 = 2; + player->flags_228 = PFLAG_228_1; } if (player->unk_09C + player->unk_0AC < player->pos.x) { player->pos.x = player->unk_09C + player->unk_0AC; @@ -672,13 +672,13 @@ void func_tank_80045678(Player* player) { player->unk_0D4 = 0.0f; Math_SmoothStepToF(&player->vel.y, 0.0f, 0.1f, 2.0f, 0); } - if ((gCamCount == 1) && !(gGameFrameCount & 1)) { + if ((gCamCount == 1) && ((gGameFrameCount % 2) == 0)) { func_effect_8007A900(RAND_FLOAT_CENTERED(20.0f) + player->pos.x, player->unk_068 + 10.0f, player->unk_138 - 10.0f, RAND_FLOAT(2.0f) + 3.5f, 255, 16, 1); } } else { D_800C9F3C = 0; - if ((gCamCount == 1) && !(gGameFrameCount & 3) && (player->unk_1DC == 0)) { + if ((gCamCount == 1) && ((gGameFrameCount % 4) == 0) && (player->unk_1DC == 0)) { if ((player->unk_16C > 0.2f) && (player->timer_220 == 0)) { func_effect_8007A900(RAND_FLOAT_CENTERED(10.0f) + (player->pos.x - 57.0f), player->unk_068 + 10.0f, player->unk_138 - 10.0f, RAND_FLOAT(1.0f) + 1.5f, 255, 15, 0); @@ -1328,7 +1328,7 @@ void func_tank_800481F4(Player* player) { s32 temp_v0; Actor* actor; Boss* boss; - Object_4C* obj4C; + Sprite* sprite; Object_80* obj80; s32 sp98; s32 pad2; @@ -1472,21 +1472,22 @@ void func_tank_800481F4(Player* player) { } } } - for (i = 0, obj4C = gObjects4C; i < ARRAY_COUNT(gObjects4C); i++, obj4C++) { - if (obj4C->obj.status == OBJ_ACTIVE) { - if ((player->unk_138 - 200.0f) < obj4C->obj.pos.z) { - temp_v0 = func_play_800A7974(player, obj4C->info.hitbox, &sp98, obj4C->obj.pos.x, obj4C->obj.pos.y, - obj4C->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f); + for (i = 0, sprite = gSprites; i < ARRAY_COUNT(gSprites); i++, sprite++) { + if (sprite->obj.status == OBJ_ACTIVE) { + if ((player->unk_138 - 200.0f) < sprite->obj.pos.z) { + temp_v0 = + func_play_800A7974(player, sprite->info.hitbox, &sp98, sprite->obj.pos.x, sprite->obj.pos.y, + sprite->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f); if (temp_v0 != 0) { - if ((obj4C->obj.id == OBJ_4C_163) || (obj4C->obj.id == OBJ_4C_161) || - (obj4C->obj.id == OBJ_4C_162)) { - obj4C->unk_46 = 1; + if ((sprite->obj.id == OBJ_SPRITE_FO_POLE) || (sprite->obj.id == OBJ_SPRITE_CO_POLE) || + (sprite->obj.id == OBJ_SPRITE_CO_TREE)) { + sprite->unk_46 = 1; player->unk_1F4 = 6; player->unk_21C = 0; - } else if (obj4C->obj.id == OBJ_4C_169) { - obj4C->unk_46 = 1; + } else if (sprite->obj.id == OBJ_SPRITE_TI_CACTUS) { + sprite->unk_46 = 1; } else { - Player_ApplyDamage(player, temp_v0, obj4C->info.damage); + Player_ApplyDamage(player, temp_v0, sprite->info.damage); } } } diff --git a/src/engine/fox_versus.c b/src/engine/fox_versus.c index 94e5daee..7ebdc3d6 100644 --- a/src/engine/fox_versus.c +++ b/src/engine/fox_versus.c @@ -1,3 +1,4 @@ +#include "prevent_bss_reordering.h" #include "global.h" #include "fox_option.h" #include "assets/ast_vs_menu.h" @@ -59,24 +60,24 @@ void func_versus_800BC760(void) { } gGameState = GSTATE_INIT; - D_Timer_8017783C = 2; + gNextGameStateTimer = 2; gCamCount = GSTATE_INIT; - D_ctx_80177854 = 0; - gDrawMode = DRAWMODE_0; + gPlayState = PLAY_STANDBY; + gDrawMode = DRAW_NONE; D_ctx_80177AE0 = 0; gOptionMenuStatus = OPTION_WAIT; D_ctx_80177B40 = 0; gBgColor = 0; - D_ctx_80178380[0] = 0; - D_ctx_80178380[1] = 0; - D_ctx_80178380[2] = 0; - D_ctx_80178380[3] = 0; + gPlayerFillScreenAlphas[0] = 0; + gPlayerFillScreenAlphas[1] = 0; + gPlayerFillScreenAlphas[2] = 0; + gPlayerFillScreenAlphas[3] = 0; gOverlayStage = 0; gRadioState = 0; gVersusMode = 0; - D_ctx_80178358 = 0; - D_ctx_80178340 = 255; - D_ctx_80177824 = GSTATE_INIT; + gFillScreenAlphaTarget = 0; + gFillScreenAlpha = 255; + D_ctx_80177824 = 1; } void func_versus_800BC88C(f32 xPos, f32 yPos, f32 scale) { @@ -1065,7 +1066,7 @@ s32 func_versus_800C04DC(f32 xPos, f32 scale, s32 arg2) { f32 x; f32 y; - if ((D_ctx_801778AC == 2) && (D_800D4A98 & 32) && (D_801787A8 != 99)) { + if ((D_ctx_801778AC == 2) && (D_800D4A98 & 0x20) && (D_801787A8 != 99)) { x = 118.0f; y = 110.0f; @@ -1372,9 +1373,9 @@ void func_versus_800C1368(void) { D_800D4A90 = 0; D_800D4A98 = 0; D_800D4A9C = D_800D4AA0 = 0; - D_ctx_80178340 = 255; - D_ctx_8017835C = 0; - D_ctx_80178358 = 0; + gFillScreenAlpha = 255; + gFillScreenAlphaStep = 0; + gFillScreenAlphaTarget = 0; for (i = 0; i < 4; i++) { D_ctx_80177C30[i] = 0; @@ -1465,7 +1466,7 @@ void func_versus_800C16D0(void) { void func_versus_800C1700(void) { func_versus_800BC760(); gGameState = GSTATE_MENU; - D_Timer_8017783C = 2; + gNextGameStateTimer = 2; gOptionMenuStatus = OPTION_WAIT; D_game_800D2870 = 1; gBgColor = 0; @@ -1667,8 +1668,8 @@ bool func_versus_800C176C(void) { case 11: D_80178830 += 16; if (D_80178830 > 480) { - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0; - D_ctx_80178340 = D_ctx_80178358 = 255; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; + gFillScreenAlpha = gFillScreenAlphaTarget = 255; gBgColor = 0; func_versus_800C16D0(); } @@ -1680,7 +1681,7 @@ bool func_versus_800C176C(void) { if (D_80178830 > 176) { gCamCount = 1; } - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; gBgColor = 0; if (D_80178830 > 224) { func_versus_800C1700(); @@ -1695,7 +1696,7 @@ bool func_versus_800C176C(void) { gCamCount = 1; } - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; gBgColor = 0; if (D_80178830 > 224) { @@ -1723,14 +1724,14 @@ bool func_versus_800C176C(void) { } if (D_versus_80178754 >= 5) { - D_ctx_801779BC = 0; + gPauseEnabled = 0; } return false; } s32 func_versus_800C1E9C(void) { - if (D_ctx_80177854 != 100) { + if (gPlayState != PLAY_PAUSE) { func_versus_800C176C(); } return 0; @@ -1766,7 +1767,7 @@ void func_versus_800C1ED4(void) { break; } case 4: - if ((D_ctx_801778AC != 2) || (!(D_800D4A98 & 32))) { + if ((D_ctx_801778AC != 2) || (!(D_800D4A98 & 0x20))) { if (D_801787A8 < 4) { func_versus_800C075C(); } @@ -1807,7 +1808,7 @@ void func_versus_800C1ED4(void) { void func_versus_800C20B0(void) { switch (gOptionMenuStatus) { case 0: - if (D_Timer_8017783C == 0) { + if (gNextGameStateTimer == 0) { gOptionMenuStatus = OPTION_SETUP; D_ctx_80178410 = 0; } @@ -1818,8 +1819,8 @@ void func_versus_800C20B0(void) { break; case 2: - gDrawMode = DRAWMODE_0; - func_play_800A5844(); + gDrawMode = DRAW_NONE; + Play_Setup(); if (gVersusStage == VS_STAGE_SECTOR_Z) { gOverlayStage = 1; @@ -1827,8 +1828,8 @@ void func_versus_800C20B0(void) { gCurrentLevel = LEVEL_VERSUS; gGameState = GSTATE_PLAY; - D_Timer_8017783C = 2; - D_ctx_80177854 = 0; + gNextGameStateTimer = 2; + gPlayState = PLAY_STANDBY; D_versus_80178758 = 0; break; } @@ -1897,7 +1898,7 @@ void func_versus_800C2244(Actor* actor) { y = actor->fwork[5] - actor->obj.pos.y; z = actor->fwork[6] - actor->obj.pos.z; - if (!((gGameFrameCount + actor->index) & 7)) { + if (((gGameFrameCount + actor->index) % 8) == 0) { actor->fwork[19] = Math_RadToDeg((Math_Atan2F(x, z))); z = sqrtf(SQ(x) + SQ(z)); actor->fwork[20] = Math_RadToDeg((Math_Atan2F(y, z))); diff --git a/src/mods/sfxjukebox.c b/src/mods/sfxjukebox.c index 05d34dd6..7182cc35 100644 --- a/src/mods/sfxjukebox.c +++ b/src/mods/sfxjukebox.c @@ -95,7 +95,7 @@ void Option_ExpertSoundUpdate(void) { if (gControllerPress[gMainController].button & B_BUTTON) { if (!D_menu_801B9320) { AUDIO_PLAY_BGM(SEQ_ID_MENU); - gDrawMode = DRAWMODE_0; + gDrawMode = DRAW_NONE; D_menu_801B9124 = 1000; D_menu_801B912C = 0; D_menu_801B9244 = 1; diff --git a/src/overlays/ovl_ending/fox_end1.c b/src/overlays/ovl_ending/fox_end1.c index 29175edb..a2018888 100644 --- a/src/overlays/ovl_ending/fox_end1.c +++ b/src/overlays/ovl_ending/fox_end1.c @@ -318,7 +318,7 @@ void Ending_80188030(s32 arg0) { } } - if (((gCsFrameCount >= 150) && (gCsFrameCount < 171)) || ((gCsFrameCount >= 280) && (gCsFrameCount < 301)) || + if (((gCsFrameCount >= 150) && (gCsFrameCount < 171)) || ((gCsFrameCount >= 280) && (gCsFrameCount <= 300)) || ((gCsFrameCount >= 340) && (gCsFrameCount < 361))) { Math_SmoothStepToF(&D_ending_80196FA0[2][0].x, 40.0f, 0.2f, 1000.0f, 0.1f); Math_SmoothStepToF(&D_ending_80196FA0[2][0].y, 10.0f, 0.2f, 1000.0f, 0.1f); @@ -404,13 +404,13 @@ void Ending_8018845C(void); #endif s32 Ending_80188634(void) { - if (D_enmy2_80161690 != 0) { + if (gCallTimer != 0) { if ((D_ending_80196F90 % 14) == 0) { AUDIO_PLAY_SFX(0x49002018, gDefaultSfxSource, 4); } D_ending_80196F90++; - D_enmy2_80161690--; - if (D_enmy2_80161690 == 0) { + gCallTimer--; + if (gCallTimer == 0) { Audio_KillSfxById(0x49002018); } } else { @@ -422,7 +422,7 @@ s32 Ending_80188634(void) { void Ending_801886F4(void) { f32 temp = 142.0f; - if (D_enmy2_80161690 == 0) { + if (gCallTimer == 0) { return; } @@ -559,7 +559,7 @@ void Ending_80188DB4(void) { } } - D_enmy2_80161690 = 0; + gCallTimer = 0; D_ending_80196F94 = 0; D_ending_80196F98 = 0; D_ending_80198580 = 0.0f; @@ -594,7 +594,7 @@ void Ending_80189108(void) { } if ((D_ending_80196D08[4].unk_38 == 0) && (gCsFrameCount == 180)) { - D_enmy2_80161690 = 120; + gCallTimer = 120; gRadioState = 0; } @@ -604,7 +604,7 @@ void Ending_80189108(void) { gCsFrameCount = 0; Audio_KillSfxById(0x49002018); D_ending_80196F90 = 0; - D_enmy2_80161690 = 0; + gCallTimer = 0; } temp_a0 = (u32) (D_ending_80196D08[4].unk_34 * D_ending_80196D08[4].unk_30) % @@ -637,7 +637,7 @@ void Ending_80189108(void) { Radio_PlayMessage(gMsg_ID_21060, RCID_FOX); break; case 80: - D_ctx_80178358 = 255; + gFillScreenAlphaTarget = 255; break; } @@ -659,7 +659,7 @@ void Ending_80189108(void) { D_ending_80196F98--; } - if ((D_enmy2_80161690 == 0) && (D_ending_80196F94 != 0)) { + if ((gCallTimer == 0) && (D_ending_80196F94 != 0)) { if (D_ending_80198260[1][1] == 0) { D_ending_80196FA0[1][1].x -= 2.4f; D_ending_80196FA0[1][1].z -= 12.0f; @@ -675,7 +675,7 @@ void Ending_80189108(void) { } } - if ((D_enmy2_80161690 == 0) && (D_ending_80196F98 != 0)) { + if ((gCallTimer == 0) && (D_ending_80196F98 != 0)) { if (D_ending_80198260[2][0] == 0) { Math_SmoothStepToF(&D_ending_80196FA0[2][0].y, -10.0f, 0.4f, 100.0f, 0.1f); if (D_ending_80196FA0[2][0].y <= -10.0f) { @@ -699,22 +699,22 @@ void Ending_80189108(void) { } if (D_ending_80196D08[4].unk_38 != 2) { - if ((D_enmy2_80161690 != 0) && (D_enmy2_80161690 < 121)) { + if ((gCallTimer != 0) && (gCallTimer < 121)) { Math_SmoothStepToF(&D_ending_80196FA0[1][0].x, -50.0f, 0.2f, 1000.0f, 0.01f); Math_SmoothStepToF(&D_ending_80196FA0[1][0].z, 18.0f, 0.2f, 1000.0f, 0.01f); } - if ((D_enmy2_80161690 != 0) && (D_enmy2_80161690 < 116)) { + if ((gCallTimer != 0) && (gCallTimer < 116)) { Math_SmoothStepToF(&D_ending_80196FA0[3][0].x, 20.0f, 0.2f, 1000.0f, 0.01f); } - if ((D_enmy2_80161690 != 0) && (D_enmy2_80161690 < 111)) { + if ((gCallTimer != 0) && (gCallTimer < 111)) { Math_SmoothStepToF(&D_ending_80196FA0[2][0].x, 20.0f, 0.2f, 1000.0f, 0.01f); Math_SmoothStepToF(&D_ending_80196FA0[2][0].y, 20.0f, 0.2f, 1000.0f, 0.01f); } - if ((D_ending_80196F94 == 0) && (D_enmy2_80161690 == 0)) { + if ((D_ending_80196F94 == 0) && (gCallTimer == 0)) { Math_SmoothStepToF(&D_ending_80196FA0[1][0].x, 0.0f, 0.2f, 1000.0f, 0.01f); Math_SmoothStepToF(&D_ending_80196FA0[1][0].z, 0.0f, 0.2f, 1000.0f, 0.01f); } - if ((D_ending_80196F98 == 0) && (D_enmy2_80161690 == 0)) { + if ((D_ending_80196F98 == 0) && (gCallTimer == 0)) { Math_SmoothStepToF(&D_ending_80196FA0[3][0].x, 0.0f, 0.2f, 1000.0f, 0.01f); Math_SmoothStepToF(&D_ending_80196FA0[2][0].x, 0.0f, 0.2f, 1000.0f, 0.01f); Math_SmoothStepToF(&D_ending_80196FA0[2][0].y, 0.0f, 0.2f, 1000.0f, 0.01f); @@ -928,7 +928,7 @@ void Ending_8018A570(void) { /* fallthrough */ case 1: Ending_80187D3C(0); - D_ctx_80178358 = 0; + gFillScreenAlphaTarget = 0; D_ending_8019858C = 0; D_ending_80196F8C = 2; gCsFrameCount = 0; @@ -939,7 +939,7 @@ void Ending_8018A570(void) { case 3: Ending_80187D3C(1); - D_ctx_80178358 = 0; + gFillScreenAlphaTarget = 0; D_ending_8019858C = 0; D_ending_80196F8C = 4; gCsFrameCount = 0; @@ -952,7 +952,7 @@ void Ending_8018A570(void) { case 5: Ending_80188394(); - D_ctx_80178358 = 0; + gFillScreenAlphaTarget = 0; D_ending_8019858C = 0; D_ending_80196F8C = 6; gCsFrameCount = 0; @@ -965,7 +965,7 @@ void Ending_8018A570(void) { case 7: Ending_80188DB4(); - D_ctx_80178358 = 0; + gFillScreenAlphaTarget = 0; D_ending_8019858C = 0; D_ending_80196F8C = 8; gCsFrameCount = 0; @@ -975,7 +975,7 @@ void Ending_8018A570(void) { break; case 9: - D_ctx_80178358 = 0; + gFillScreenAlphaTarget = 0; gCsFrameCount = 0; D_ending_80196D00 = 7; break; @@ -1013,20 +1013,20 @@ void Ending_8018A828(void) { } void Ending_8018A8FC(void) { - if (D_ctx_80178340 != D_ctx_80178358) { - if (D_ctx_80178340 < D_ctx_80178358) { - D_ctx_80178340 += D_ctx_8017835C; - if (D_ctx_80178340 >= D_ctx_80178358) { - D_ctx_80178340 = D_ctx_80178358; + if (gFillScreenAlpha != gFillScreenAlphaTarget) { + if (gFillScreenAlpha < gFillScreenAlphaTarget) { + gFillScreenAlpha += gFillScreenAlphaStep; + if (gFillScreenAlpha >= gFillScreenAlphaTarget) { + gFillScreenAlpha = gFillScreenAlphaTarget; } } else { - D_ctx_80178340 -= D_ctx_8017835C; - if (D_ctx_80178340 <= D_ctx_80178358) { - D_ctx_80178340 = D_ctx_80178358; + gFillScreenAlpha -= gFillScreenAlphaStep; + if (gFillScreenAlpha <= gFillScreenAlphaTarget) { + gFillScreenAlpha = gFillScreenAlphaTarget; } } } - D_ctx_8017835C = 16; + gFillScreenAlphaStep = 16; } void Ending_8018A96C(void) { @@ -1574,7 +1574,7 @@ bool Ending_8018BCB0(void) { switch (gCsFrameCount) { case 0: - D_ctx_80178358 = 0; + gFillScreenAlphaTarget = 0; Ending_8018B860(); break; @@ -1703,11 +1703,11 @@ bool Ending_8018BCB0(void) { } if ((gCsFrameCount == 760) || (gCsFrameCount == 994)) { - D_ctx_80178358 = 255; + gFillScreenAlphaTarget = 255; } if (gCsFrameCount == 780) { - D_ctx_80178358 = 0; + gFillScreenAlphaTarget = 0; } return sp5C; diff --git a/src/overlays/ovl_ending/fox_end2.c b/src/overlays/ovl_ending/fox_end2.c index 44f6f4c2..8856d2eb 100644 --- a/src/overlays/ovl_ending/fox_end2.c +++ b/src/overlays/ovl_ending/fox_end2.c @@ -91,12 +91,12 @@ void Ending_8018D2C8(u32 arg0, AssetInfo* asset) { alpha = (asset->unk_0C + asset->unk_10 - arg0 - 1) * 255 / asset->fogFar; } - D_ctx_80178348 = asset->primRed; - D_ctx_80178350 = asset->primGreen; - D_ctx_80178354 = asset->primBlue; + gFillScreenRed = asset->primRed; + gFillScreenGreen = asset->primGreen; + gFillScreenBlue = asset->primBlue; - D_ctx_80178340 = D_ctx_80178358 = alpha; - D_ctx_8017835C = 0; + gFillScreenAlpha = gFillScreenAlphaTarget = alpha; + gFillScreenAlphaStep = 0; } void Ending_8018D398(u32 arg0, AssetInfo* asset) { @@ -110,7 +110,8 @@ void Ending_8018D398(u32 arg0, AssetInfo* asset) { alpha = (asset->unk_0C + asset->unk_10 - arg0) * 255 / asset->fogFar; } - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = D_ctx_80178340 = D_ctx_80178358 = D_ctx_8017835C = 0; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = gFillScreenAlphaTarget = + gFillScreenAlphaStep = 0; Graphics_FillRectangle(&gMasterDisp, 8, 8, SCREEN_WIDTH - 8, SCREEN_HEIGHT - 8, asset->primRed, asset->primGreen, asset->primBlue, alpha); @@ -142,12 +143,12 @@ void Ending_8018D638(u32 arg0, AssetInfo* asset) { alpha = (asset->unk_0C + asset->fogFar - arg0) * 255 / asset->fogFar; } - D_ctx_80178348 = asset->primRed; - D_ctx_80178350 = asset->primGreen; - D_ctx_80178354 = asset->primBlue; + gFillScreenRed = asset->primRed; + gFillScreenGreen = asset->primGreen; + gFillScreenBlue = asset->primBlue; - D_ctx_80178340 = D_ctx_80178358 = alpha; - D_ctx_8017835C = 0; + gFillScreenAlpha = gFillScreenAlphaTarget = alpha; + gFillScreenAlphaStep = 0; RCP_SetupDL(&gMasterDisp, 0x53); @@ -775,9 +776,9 @@ void Ending_80190CF0(u32 arg0, AssetInfo* asset) { void Ending_80191234(s32 arg0, s32 arg1) { D_game_80161A34 = 8; gGameState = GSTATE_MENU; - D_Timer_8017783C = 2; + gNextGameStateTimer = 2; gOptionMenuStatus = OPTION_WAIT; - gDrawMode = DRAWMODE_0; + gDrawMode = DRAW_NONE; gBgColor = 0; D_ctx_80178410 = 0; gControllerLock = 10; diff --git a/src/overlays/ovl_i1/fox_co.c b/src/overlays/ovl_i1/fox_co.c index f4630394..3c68f98c 100644 --- a/src/overlays/ovl_i1/fox_co.c +++ b/src/overlays/ovl_i1/fox_co.c @@ -22,16 +22,16 @@ void Corneria_8018753C(Object_80* obj80) { gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); } -void Corneria_801875A4(Object_4C* obj4C) { +void Corneria_801875A4(Sprite* sprite) { f32 sp1C; f32 sp18; f32 var_f; - if (!(gGameFrameCount & 3)) { + if (((gGameFrameCount % 4) == 0)) { sp1C = RAND_FLOAT_CENTERED(10.0f); sp18 = RAND_FLOAT_CENTERED(10.0f); var_f = RAND_FLOAT(0.5f) + 1.0f; - func_effect_8007C85C(obj4C->obj.pos.x + sp1C, obj4C->obj.pos.y + sp18, obj4C->obj.pos.z, 4.0f * var_f); + func_effect_8007C85C(sprite->obj.pos.x + sp1C, sprite->obj.pos.y + sp18, sprite->obj.pos.z, 4.0f * var_f); } } @@ -95,7 +95,7 @@ void Corneria_80187838(s32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg4) { } } -void Corneria_Boss292_Init(Boss* boss) { +void Corneria_Boss292_Init(Boss292* this) { s32 i; gBossFrameCount = 0; @@ -106,7 +106,7 @@ void Corneria_Boss292_Init(Boss* boss) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); } - Object_Kill(&boss->obj, boss->sfxSource); + Object_Kill(&this->obj, this->sfxSource); return; } @@ -139,7 +139,7 @@ f32 Corneria_80187A88(s32 arg0) { } void Corneria_80187AC8(Boss* boss) { - Object_4C* obj4C; + Sprite* sprite; s32 var_v0; s32 var_s1; s32 var_s1_2; @@ -305,37 +305,37 @@ void Corneria_80187AC8(Boss* boss) { if (!(D_edisplay_801615D0.y < 0.0f)) { - obj4C = gObjects4C; - for (var_s1 = 0; var_s1 < 40; var_s1++, obj4C++) { - if ((obj4C->obj.status == OBJ_ACTIVE) && (obj4C->obj.id == OBJ_4C_162)) { - if ((fabsf(obj4C->obj.pos.x - D_i1_8019B6D8[20]) < 90.0f) && - (fabsf(obj4C->obj.pos.z - D_i1_8019B6D8[32]) < 90.0f)) { - obj4C->unk_46 = 1; + sprite = gSprites; + for (var_s1 = 0; var_s1 < 40; var_s1++, sprite++) { + if ((sprite->obj.status == OBJ_ACTIVE) && (sprite->obj.id == OBJ_SPRITE_CO_TREE)) { + if ((fabsf(sprite->obj.pos.x - D_i1_8019B6D8[20]) < 90.0f) && + (fabsf(sprite->obj.pos.z - D_i1_8019B6D8[32]) < 90.0f)) { + sprite->unk_46 = 1; break; - } else if ((fabsf(obj4C->obj.pos.x - D_i1_8019B6D8[23]) < 90.0f) && - (fabsf(obj4C->obj.pos.z - D_i1_8019B6D8[35]) < 90.0f)) { - obj4C->unk_46 = 1; + } else if ((fabsf(sprite->obj.pos.x - D_i1_8019B6D8[23]) < 90.0f) && + (fabsf(sprite->obj.pos.z - D_i1_8019B6D8[35]) < 90.0f)) { + sprite->unk_46 = 1; break; } } } - if ((boss->swork[1] == 1000) && !(gGameFrameCount & 3)) { + if ((boss->swork[1] == 1000) && ((gGameFrameCount % 4) == 0)) { func_effect_8007BFFC(D_i1_8019B6D8[3], D_i1_8019B6D8[4], D_i1_8019B6D8[5], (D_i1_8019B6D8[3] - boss->obj.pos.x) * 0.1f, 0.0f, (D_i1_8019B6D8[5] - boss->obj.pos.z) * 0.1f, 1.5f, 5); } - if ((boss->swork[2] == 1000) && !(gGameFrameCount & 3)) { + if ((boss->swork[2] == 1000) && ((gGameFrameCount % 4) == 0)) { func_effect_8007BFFC(D_i1_8019B6D8[9], D_i1_8019B6D8[10], D_i1_8019B6D8[11], (D_i1_8019B6D8[9] - boss->obj.pos.x) * 0.1f, 0.0f, (D_i1_8019B6D8[11] - boss->obj.pos.z) * 0.1f, 1.5f, 5); } - if ((boss->swork[3] == 1000) && !(gGameFrameCount & 3)) { + if ((boss->swork[3] == 1000) && ((gGameFrameCount % 4) == 0)) { func_effect_8007BFFC(D_i1_8019B6D8[12], D_i1_8019B6D8[13], D_i1_8019B6D8[14], 0.0f, 20.0f, 0.0f, 2.0f, 5); } - if ((boss->swork[4] == 1000) && !(gGameFrameCount & 3)) { + if ((boss->swork[4] == 1000) && ((gGameFrameCount % 4) == 0)) { func_effect_8007BFFC(D_i1_8019B6D8[56], D_i1_8019B6D8[57], D_i1_8019B6D8[58], 0.0f, 10.0f, 0.0f, 2.0f, 5); } - if ((boss->swork[7] == 1000) && !(gGameFrameCount & 3)) { + if ((boss->swork[7] == 1000) && ((gGameFrameCount % 4) == 0)) { func_effect_8007BFFC(D_i1_8019B6D8[59], D_i1_8019B6D8[60], D_i1_8019B6D8[61], 0.0f, 10.0f, 0.0f, 2.0f, 5); } } @@ -431,7 +431,7 @@ void Corneria_80188A18(Boss* boss) { break; } - if ((gBossFrameCount >= 1001) && (Rand_ZeroOne() < 0.3f)) { + if ((gBossFrameCount > 1000) && (Rand_ZeroOne() < 0.3f)) { if (Rand_ZeroOne() < 0.5f) { func_360_8002E4F8(gMsg_ID_2263, RCID_BOSS_CORNERIA); } else { @@ -439,7 +439,7 @@ void Corneria_80188A18(Boss* boss) { } } } - if ((gBossFrameCount >= 801) && !(gBossFrameCount & 0x1FF)) { + if ((gBossFrameCount > 800) && ((gBossFrameCount % 512) == 0)) { if (D_ctx_80177B6C < 2) { Radio_PlayMessage(gMsg_ID_20237, RCID_PEPPY); } else if (D_edisplay_801615D0.z > 0.0f) { @@ -488,7 +488,8 @@ void Corneria_80188D50(Boss* boss) { boss->swork[36]++; D_i1_801997E0 = 20; AUDIO_PLAY_SFX(0x49008025, gDefaultSfxSource, 4); - if ((gTeamShields[1] > 0) || (gTeamShields[2] > 0) || (gTeamShields[3] > 0)) { + if ((gTeamShields[TEAM_ID_FALCO] > 0) || (gTeamShields[TEAM_ID_SLIPPY] > 0) || + (gTeamShields[TEAM_ID_PEPPY] > 0)) { do { do { temp_ft3 = RAND_INT(2.9f) + 1; @@ -585,9 +586,9 @@ void Corneria_80189058(Boss* boss) { Corneria_80188D50(boss); if (D_edisplay_801615D0.z > 0.0f) { if (D_edisplay_801615D0.x > 0.0f) { - gPlayer[0].flags_228 = 0x10; + gPlayer[0].flags_228 = PFLAG_228_4; } else { - gPlayer[0].flags_228 = 0x20; + gPlayer[0].flags_228 = PFLAG_228_5; } } @@ -763,7 +764,7 @@ void Corneria_80189058(Boss* boss) { D_i1_8019B6D8[19] = D_i1_8019B6D8[67] = gPlayer[0].unk_138; boss->unk_04C += 4; - if (boss->unk_04C >= 101) { + if (boss->unk_04C > 100) { boss->unk_04C = 0; } Animation_GetFrameData(&D_CO_602BC18, boss->unk_04C, sp84); @@ -784,7 +785,7 @@ void Corneria_80189058(Boss* boss) { D_i1_8019B6D8[19] = gPlayer[0].unk_138; boss->unk_04C += 4; - if (boss->unk_04C >= 101) { + if (boss->unk_04C > 100) { boss->unk_04C = 0; } Animation_GetFrameData(&D_CO_602BC18, boss->unk_04C, sp84); @@ -795,7 +796,7 @@ void Corneria_80189058(Boss* boss) { case 6: boss->unk_05E = 0; D_ctx_8017812C = 1; - if (!(gGameFrameCount & 7)) { + if (((gGameFrameCount % 8) == 0)) { D_i1_8019B6D8[17] = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(2000.0f); D_i1_8019B6D8[18] = gPlayer[0].pos.y; D_i1_8019B6D8[19] = gPlayer[0].unk_138 + RAND_FLOAT_CENTERED(2000.0f); @@ -807,11 +808,11 @@ void Corneria_80189058(Boss* boss) { boss->obj.rot.z = 60.0f; Corneria_80188C7C(boss); - if ((gGameFrameCount & 0x1FF) == 0) { + if ((gGameFrameCount % 512U) == 0) { Radio_PlayMessage(gMsg_ID_2275, RCID_BOSS_CORNERIA); } - if ((gGameFrameCount & 0x1FF) == 0x100) { + if ((gGameFrameCount % 512U) == 256) { Radio_PlayMessage(gMsg_ID_2220, RCID_BOSS_CORNERIA); } } @@ -822,10 +823,10 @@ void Corneria_80189058(Boss* boss) { boss->obj.rot.z = -60.0f; Corneria_80188C7C(boss); - if ((gGameFrameCount & 0x1FF) == 0) { + if ((gGameFrameCount % 512U) == 0) { Radio_PlayMessage(gMsg_ID_2275, RCID_BOSS_CORNERIA); } - if ((gGameFrameCount & 0x1FF) == 0x100) { + if ((gGameFrameCount % 512U) == 256) { Radio_PlayMessage(gMsg_ID_2220, RCID_BOSS_CORNERIA); } } @@ -844,7 +845,7 @@ void Corneria_80189058(Boss* boss) { } boss->unk_068 = SIN_DEG(boss->obj.rot.z) * 30.0f; - if (!(gGameFrameCount & 0xF)) { + if (((gGameFrameCount % 16) == 0)) { boss->unk_04C = RAND_INT(100.0f); } Animation_GetFrameData(&D_CO_602BC18, boss->unk_04C, sp84); @@ -885,7 +886,7 @@ void Corneria_80189058(Boss* boss) { } } if (boss->timer_050 < 50) { - boss->dmgPart = boss->timer_050 & 7; + boss->dmgPart = boss->timer_050 % 8U; switch (boss->dmgPart) { case 1: @@ -1005,7 +1006,7 @@ bool Corneria_8018A434(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* rot->x += D_i1_8019B6D8[16]; break; } - if ((boss->swork[limbIndex] & 1) || (boss->timer_05C & 1)) { + if (((boss->swork[limbIndex] % 2) != 0) || ((boss->timer_05C % 2) != 0)) { RCP_SetupDL_64(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 64, 64, 255, 255); } @@ -1144,7 +1145,7 @@ void Corneria_8018ACE0(Actor* actor) { } } } - if ((actor->health < 11) && !(gGameFrameCount & 3)) { + if ((actor->health < 11) && ((gGameFrameCount % 4) == 0)) { func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(100.0f), actor->obj.pos.y + 200.0f + RAND_FLOAT_CENTERED(100.0f), actor->obj.pos.z + 50.0f + RAND_FLOAT(50.0f), 3.0f); @@ -1345,7 +1346,7 @@ void Corneria_8018B58C(Actor* actor) { switch (actor->state) { case 100: - if (!(actor->timer_0BC & 3)) { + if ((actor->timer_0BC & 3) == 0) { func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(100.0f), actor->obj.pos.y + 200.0f + RAND_FLOAT_CENTERED(100.0f), @@ -1382,7 +1383,7 @@ void Corneria_8018B58C(Actor* actor) { } break; case 101: - if ((actor->timer_0BE != 0) && !(gGameFrameCount & 1)) { + if ((actor->timer_0BE != 0) && ((gGameFrameCount % 2) == 0)) { func_effect_8007797C(actor->obj.pos.x, actor->obj.pos.y + 150.0f, actor->obj.pos.z, 0.0f, 10.0f, 0.0f, 3.0f); } @@ -1472,43 +1473,43 @@ void Corneria_8018BDD4(Boss* boss, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 a boss->obj.rot.y, arg5, arg6, objId); } -void Corneria_Boss293_Init(Boss* boss) { +void Corneria_Boss293_Init(Boss293* this) { s32 i; s16 temp_s1; gBossActive = 1; gBossFrameCount = 0; - boss->unk_05E = 1; - boss->timer_050 = 354; - boss->health = 601; - boss->fwork[18] = -D_play_80161A54 - 10.0f; + this->unk_05E = 1; + this->timer_050 = 354; + this->health = 601; + this->fwork[18] = -D_play_80161A54 - 10.0f; if (fabsf(gPlayer[0].unk_0AC) < 1.0f) { - boss->timer_05A = 30000; - boss->obj.pos.z = (gPlayer[0].camEye.z - D_ctx_80177D20) - 2000.0f; - AUDIO_PLAY_SFX(0x31038018, boss->sfxSource, 4); + this->timer_05A = 30000; + this->obj.pos.z = (gPlayer[0].camEye.z - D_ctx_80177D20) - 2000.0f; + AUDIO_PLAY_SFX(0x31038018, this->sfxSource, 4); D_i1_8019B6D0 = 0; } else { D_i1_8019B6D0 = 1; - boss->obj.rot.y = 180.0f; - boss->fwork[6] = 800.0f; - boss->obj.pos.z = gPlayer[0].unk_138 + 2000.0f; - boss->fwork[7] = boss->obj.pos.x; - boss->fwork[5] = 30.0f; - AUDIO_PLAY_SFX(0x31038018, boss->sfxSource, 4); - boss->swork[10] = 3; - boss->swork[8] = 3; + this->obj.rot.y = 180.0f; + this->fwork[6] = 800.0f; + this->obj.pos.z = gPlayer[0].unk_138 + 2000.0f; + this->fwork[7] = this->obj.pos.x; + this->fwork[5] = 30.0f; + AUDIO_PLAY_SFX(0x31038018, this->sfxSource, 4); + this->swork[10] = 3; + this->swork[8] = 3; } - temp_s1 = boss->timer_05A; + temp_s1 = this->timer_05A; // Bosses OBJ_BOSS_294 to OBJ_BOSS_296 for (i = 1; i < 4; i++) { Boss_Initialize(&gBosses[i]); gBosses[i].obj.status = OBJ_INIT; gBosses[i].obj.id = i + 293; - gBosses[i].obj.pos.x = boss->obj.pos.x; - gBosses[i].obj.pos.y = boss->obj.pos.y; - gBosses[i].obj.pos.z = boss->obj.pos.z; + gBosses[i].obj.pos.x = this->obj.pos.x; + gBosses[i].obj.pos.y = this->obj.pos.y; + gBosses[i].obj.pos.z = this->obj.pos.z; gBosses[i].health = 200; gBosses[i].unk_05E = 1; gBosses[i].timer_05A = temp_s1; @@ -1588,7 +1589,7 @@ void Corneria_8018C19C(Boss* boss) { boss->vel.y = sp6C.y; boss->vel.z = sp6C.z - D_ctx_80177D08; boss->fwork[16] = 4.0f; - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { Matrix_MultVec3f(gCalcMatrix, &D_i1_80199914[0], &sp84[6]); Matrix_MultVec3f(gCalcMatrix, &D_i1_80199914[1], &sp84[7]); Matrix_MultVec3f(gCalcMatrix, &D_i1_8019992C, &sp84[8]); @@ -1600,7 +1601,7 @@ void Corneria_8018C19C(Boss* boss) { 10.0f); } } else { - if ((gBossFrameCount >= 381) && (gBossFrameCount < 430)) { + if ((gBossFrameCount > 380) && (gBossFrameCount < 430)) { D_ctx_80178540 = 5; D_ctx_80178570 = 20; D_ctx_80178574 = 20; @@ -1621,7 +1622,7 @@ void Corneria_8018C19C(Boss* boss) { for (i = 0; var_v1 >= 60; i++, var_v1 -= 60) {} for (var_v0 = 0, var_v1 = 13; var_v0 < i; var_v0++, var_v1++) { - if ((gGameFrameCount & 0xF) == (var_v0 & 0xF)) { + if ((gGameFrameCount % 16U) == (var_v0 % 16U)) { Matrix_MultVec3f(gCalcMatrix, &D_i1_8019995C[var_v0], &sp84[var_v1]); func_effect_8007D0E0(sp84[var_v1].x + boss->obj.pos.x, sp84[var_v1].y + boss->obj.pos.y, sp84[var_v1].z + boss->obj.pos.z, boss->fwork[17]); @@ -1669,7 +1670,7 @@ void Corneria_8018C19C(Boss* boss) { boss->fwork[15] = 0.5f; } } - if ((gBosses[1].state != 0) && !(gGameFrameCount & 0xF)) { + if ((gBosses[1].state != 0) && ((gGameFrameCount % 16) == 0)) { Matrix_MultVec3f(gCalcMatrix, &D_i1_80199908, &sp84[5]); func_effect_8007D0E0(gBosses[0].obj.pos.x + sp84[5].x, gBosses[0].obj.pos.y + sp84[5].y, gBosses[0].obj.pos.z + sp84[5].z, 5.0f); @@ -1677,24 +1678,24 @@ void Corneria_8018C19C(Boss* boss) { if (gBosses[2].state != 0) { gBosses[3].unk_05E = 1; if (gBosses[3].state != 0) { - if (!(gGameFrameCount & 7)) { + if (((gGameFrameCount % 8) == 0)) { Matrix_MultVec3f(gCalcMatrix, &D_i1_80199950, &sp84[11]); func_effect_8007D0E0(gBosses[0].obj.pos.x + sp84[11].x, gBosses[0].obj.pos.y + sp84[11].y, gBosses[0].obj.pos.z + sp84[11].z, 7.0f); } - } else if (!(gGameFrameCount & 0xF)) { + } else if (((gGameFrameCount % 16) == 0)) { Matrix_MultVec3f(gCalcMatrix, &D_i1_80199938, &sp84[9]); func_effect_8007D0E0(gBosses[0].obj.pos.x + sp84[9].x, gBosses[0].obj.pos.y + sp84[9].y, gBosses[0].obj.pos.z + sp84[9].z, 5.0f); } } - if ((gBosses[3].state != 0) && (gBosses[2].state == 0) && !(gGameFrameCount & 0xF)) { + if ((gBosses[3].state != 0) && (gBosses[2].state == 0) && ((gGameFrameCount % 16) == 0)) { Matrix_MultVec3f(gCalcMatrix, &D_i1_80199944, &sp84[10]); func_effect_8007D0E0(gBosses[0].obj.pos.x + sp84[10].x, gBosses[0].obj.pos.y + sp84[10].y, gBosses[0].obj.pos.z + sp84[10].z, 5.0f); } - if (((boss->state == 1) || (boss->state == 2)) && !(gGameFrameCount & 7)) { + if (((boss->state == 1) || (boss->state == 2)) && ((gGameFrameCount % 8) == 0)) { Matrix_MultVec3f(gCalcMatrix, &D_i1_80199914[0], &sp84[6]); Matrix_MultVec3f(gCalcMatrix, &D_i1_80199914[1], &sp84[7]); Matrix_MultVec3f(gCalcMatrix, &D_i1_8019992C, &sp84[8]); @@ -1863,7 +1864,7 @@ void Corneria_8018C19C(Boss* boss) { boss->swork[6]++; boss->swork[6] &= 1; } - if (!(gGameFrameCount & 7)) { + if (((gGameFrameCount % 8) == 0)) { if (fabsf(boss->obj.pos.z - gPlayer[0].unk_138) > 700.0f) { Matrix_MultVec3f(gCalcMatrix, &D_i1_801998F0[0], &sp84[3]); @@ -1927,7 +1928,7 @@ void Corneria_8018C19C(Boss* boss) { break; case 8: D_ctx_801779A8[0] = 20.0f; - if (!(gGameFrameCount & 0x1F)) { + if (((gGameFrameCount % 32) == 0)) { for (i = 0; i < 10; i++) { func_effect_80079618(RAND_FLOAT_CENTERED(300.0f) + boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 1.0f); @@ -1950,7 +1951,7 @@ void Corneria_8018C19C(Boss* boss) { func_boss_80042EC0(boss); boss->fwork[17] = 10.0f; boss->vel.y *= 1.5f; - D_ctx_80177930 = 1; + gNextPlanetPath = 1; if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_5)) { func_boss_8004319C(gPlayer, boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z); @@ -1976,7 +1977,7 @@ void Corneria_8018C19C(Boss* boss) { } break; case 9: - if (!(gGameFrameCount & 0xF)) { + if (((gGameFrameCount % 16) == 0)) { for (i = 0; i < 10; i++) { func_effect_80079618(RAND_FLOAT_CENTERED(300.0f) + boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 1.0f); @@ -1999,7 +2000,7 @@ void Corneria_8018C19C(Boss* boss) { } break; case 10: - if (!(gGameFrameCount & 7)) { + if (((gGameFrameCount % 8) == 0)) { for (i = 0; i < 10; i++) { func_effect_80079618(RAND_FLOAT_CENTERED(300.0f) + boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 1.0f); @@ -2116,11 +2117,11 @@ void Corneria_8018DDAC(Boss* boss) { Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, 0); gBosses[0].fwork[15] += 0.5f; - if (!(gGameFrameCount & 7) && (Rand_ZeroOne() < 0.5f)) { + if (((gGameFrameCount % 8) == 0) && (Rand_ZeroOne() < 0.5f)) { boss->timer_05C = 4; } - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { Matrix_MultVec3f(gCalcMatrix, &D_i1_80199A6C, &sp4C); func_effect_8007C120(boss->obj.pos.x + sp4C.x, boss->obj.pos.y + sp4C.y, boss->obj.pos.z + sp4C.z, boss->vel.x, boss->vel.y, boss->vel.z, 0.2f, 10); @@ -2208,11 +2209,11 @@ void Corneria_8018E290(Boss* boss) { Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, 0); gBosses[0].fwork[15] += 0.5f; - if (!(gGameFrameCount & 7) && (Rand_ZeroOne() < 0.5f)) { + if (((gGameFrameCount % 8) == 0) && (Rand_ZeroOne() < 0.5f)) { boss->timer_05C = 4; } - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { Matrix_MultVec3f(gCalcMatrix, &D_i1_80199A84, &sp4C); func_effect_8007C120(boss->obj.pos.x + sp4C.x, boss->obj.pos.y + sp4C.y, boss->obj.pos.z + sp4C.z, boss->vel.x, boss->vel.y, boss->vel.z, 0.2f, 10); @@ -2302,10 +2303,10 @@ void Corneria_8018E76C(Boss* boss) { case 1: Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, 0); gBosses[0].fwork[15] += 0.5f; - if (!(gGameFrameCount & 7) && (Rand_ZeroOne() < 0.5f)) { + if (((gGameFrameCount % 8) == 0) && (Rand_ZeroOne() < 0.5f)) { boss->timer_05C = 4; } - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { Matrix_MultVec3f(gCalcMatrix, &D_i1_80199A9C, &sp4C); func_effect_8007C120(boss->obj.pos.x + sp4C.x, boss->obj.pos.y + sp4C.y, boss->obj.pos.z + sp4C.z, boss->vel.x, boss->vel.y, boss->vel.z, 0.2f, 10); @@ -2431,13 +2432,13 @@ bool Corneria_8018F1C8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* switch (limbIndex) { case 1: rot->y -= obj80->vel.x; - if (obj80->timer_4C & 1) { + if ((obj80->timer_4C % 2) != 0) { RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } break; case 2: rot->y += obj80->vel.y; - if (obj80->timer_4C & 1) { + if ((obj80->timer_4C % 2) != 0) { RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } break; @@ -2462,7 +2463,7 @@ void Corneria_8018F3BC(Object_80* obj80, f32 arg1) { obj80->obj.rot.y *= -1.0f; } obj80->obj.pos.y = 0.0f; - obj80->obj.id = 1; + obj80->obj.id = OBJ_80_1; obj80->unk_60 = 60.0f; Object_SetInfo(&obj80->info, obj80->obj.id); obj80->obj.pos.z = -2000.0f; @@ -2472,7 +2473,7 @@ void Corneria_8018F3BC(Object_80* obj80, f32 arg1) { void Corneria_8018F4A4(void) { s32 i; - if (!(gGameFrameCount & 0xF) && !(gPlayer[0].unk_1D0 < 4)) { + if (((gGameFrameCount % 16) == 0) && !(gPlayer[0].unk_1D0 < 4)) { for (i = 0; i < 50; i++) { if (gObjects80[i].obj.status == OBJ_FREE) { Corneria_8018F3BC(&gObjects80[i], 4000.0f); @@ -2510,7 +2511,7 @@ void Corneria_8018F55C(Effect* effect) { void Corneria_8018F678(void) { s32 i; - if (!(gGameFrameCount & 0x1F) && gPlayer[0].pos.x == 0.0f) { + if (((gGameFrameCount % 32) == 0) && gPlayer[0].pos.x == 0.0f) { for (i = 0; i < ARRAY_COUNT(gEffects); i++) { if (gEffects[i].obj.status == OBJ_FREE) { @@ -2665,14 +2666,14 @@ void Corneria_8018F880(Player* player) { player->camAt.z = gCsCamAtZ = player->unk_138 + 300.0f; D_ctx_80177A48[0] = 0; D_ctx_80177A48[1] = D_ctx_80177A48[2] = 0; - D_ctx_80178358 = 255; - D_ctx_80178340 = 255; - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255; + gFillScreenAlphaTarget = 255; + gFillScreenAlpha = 255; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; break; case 1: if (player->timer_1F8 < 550) { - D_ctx_80178358 = 0; - D_ctx_8017835C = 3; + gFillScreenAlphaTarget = 0; + gFillScreenAlphaStep = 3; Math_SmoothStepToF(&D_ctx_80177A48[0], 0.01f, 1.0f, 0.0005f, 0.0f); } gCsCamEyeX = player->pos.x - 150.0f; @@ -2699,13 +2700,13 @@ void Corneria_8018F880(Player* player) { if (player->timer_1F8 == 120) { AUDIO_PLAY_SFX(0x09000013, player->sfxSource, 0); } - if ((player->timer_1F8 < 190) && (player->timer_1F8 >= 151)) { + if ((player->timer_1F8 < 190) && (player->timer_1F8 > 150)) { Math_SmoothStepToF(&player->wings.unk_24, 2.0f, 0.2f, 0.5f, 0.0f); } if (player->timer_1F8 < 150) { player->unk_204 = 0; } - if ((player->timer_1F8 < 120) && !(player->timer_1F8 & 0xF)) { + if ((player->timer_1F8 < 120) && ((player->timer_1F8 % 16) == 0)) { D_ctx_80177A48[1] = RAND_FLOAT_CENTERED(60.0f); D_ctx_80177A48[2] = RAND_FLOAT_CENTERED(60.0f); } @@ -2875,13 +2876,13 @@ void Corneria_8018F880(Player* player) { if (player->timer_1F8 == 40) { actor2->fwork[29] = 5.0f; } - if ((player->timer_1F8 >= 71) && (player->timer_1F8 < 80)) { + if ((player->timer_1F8 > 70) && (player->timer_1F8 < 80)) { actor0->iwork[11] = 2; } - if ((player->timer_1F8 >= 51) && (player->timer_1F8 < 60)) { + if ((player->timer_1F8 > 50) && (player->timer_1F8 < 60)) { actor1->iwork[11] = 2; } - if ((player->timer_1F8 >= 31) && (player->timer_1F8 < 40)) { + if ((player->timer_1F8 > 30) && (player->timer_1F8 < 40)) { actor2->iwork[11] = 2; } if (player->timer_1F8 == 70) { @@ -2914,17 +2915,17 @@ void Corneria_8018F880(Player* player) { D_ctx_80177A48[0] = 0.03f; player->unk_190 = 2.0f; if (player->timer_1F8 == 0) { - D_ctx_80178358 = 255; - D_ctx_8017835C = 48; - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255; + gFillScreenAlphaTarget = 255; + gFillScreenAlphaStep = 48; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; } - if (D_ctx_80178340 == 255) { + if (gFillScreenAlpha == 255) { AUDIO_PLAY_BGM(gBgmSeqId); Object_Kill(&actor0->obj, actor0->sfxSource); Object_Kill(&actor1->obj, actor1->sfxSource); Object_Kill(&actor2->obj, actor2->sfxSource); - D_ctx_80177838 = 80; + gLevelStatusScreenTimer = 80; player->pos.y = 350.0f; player->camEye.x = player->pos.x; player->camEye.y = (player->pos.y * player->unk_148) + 50.0f; @@ -2935,9 +2936,10 @@ void Corneria_8018F880(Player* player) { player->camAt.y = (player->pos.y * player->unk_148) + 20.0f; player->camAt.z = player->unk_138; D_ctx_80177950 = 1.0f; - D_ctx_80178380[0] = D_ctx_80178380[1] = D_ctx_80178380[2] = D_ctx_80178380[3] = 0; + gPlayerFillScreenAlphas[0] = gPlayerFillScreenAlphas[1] = gPlayerFillScreenAlphas[2] = + gPlayerFillScreenAlphas[3] = 0; D_ctx_80178488 = 1; - D_ctx_80178358 = 0; + gFillScreenAlphaTarget = 0; player->timer_1F8 = 15; } break; @@ -3103,7 +3105,7 @@ void Corneria_80191160(Player* player) { } break; case 3: - if ((gCsFrameCount >= 701) && (gCsFrameCount < 1000)) { + if ((gCsFrameCount > 700) && (gCsFrameCount < 1000)) { func_demo_8004AA84(); } Math_SmoothStepToAngle(&player->unk_0E4, 20.0f, 0.1f, 0.5f, 0); @@ -3131,10 +3133,10 @@ void Corneria_80191160(Player* player) { Math_SmoothStepToF(&player->camAt.z, player->pos.z + sp58.z, D_ctx_80177A48[3], 500.0f, 0.0f); D_ctx_80177A48[5] += D_ctx_80177A48[4]; - if ((gCsFrameCount >= 401) && (gCsFrameCount < 1000)) { + if ((gCsFrameCount > 400) && (gCsFrameCount < 1000)) { Math_SmoothStepToF(&D_ctx_80177A48[4], 0.5f, 1.0f, 0.003f, 0); } - if (gCsFrameCount >= 1101) { + if (gCsFrameCount > 1100) { Math_SmoothStepToF(&D_ctx_80177A48[4], 0.0f, 1.0f, 0.003f, 0); } if (gCsFrameCount == 1270) { @@ -3160,10 +3162,10 @@ void Corneria_80191160(Player* player) { Audio_FadeOutAll(50); } if (gCsFrameCount > 1300) { - D_ctx_80178358 = 255; - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0; - D_ctx_8017835C = 8; - if (D_ctx_80178340 == 255) { + gFillScreenAlphaTarget = 255; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; + gFillScreenAlphaStep = 8; + if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_6; player->timer_1F8 = 0; D_ctx_8017837C = 4; @@ -3184,17 +3186,17 @@ void Corneria_80191160(Player* player) { AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); break; case 330: - D_ctx_80177840 = 100; + gLevelClearScreenTimer = 100; break; case 470: func_play_800A6148(); - if (gTeamShields[1] > 0) { + if (gTeamShields[TEAM_ID_FALCO] > 0) { Corneria_80190F74(&gActors[0], 0); } - if (gTeamShields[2] > 0) { + if (gTeamShields[TEAM_ID_SLIPPY] > 0) { Corneria_80190F74(&gActors[1], 1); } - if (gTeamShields[3] > 0) { + if (gTeamShields[TEAM_ID_PEPPY] > 0) { Corneria_80190F74(&gActors[2], 2); } break; @@ -3202,28 +3204,28 @@ void Corneria_80191160(Player* player) { Radio_PlayMessage(gMsg_ID_2335, RCID_FOX); break; case 550: - if ((gTeamShields[2] == -1) || (gTeamShields[2] == 0)) { + if ((gTeamShields[TEAM_ID_SLIPPY] == -1) || (gTeamShields[TEAM_ID_SLIPPY] == 0)) { Radio_PlayMessage(gMsg_ID_20333, RCID_ROB64); } else { Radio_PlayMessage(gMsg_ID_2300, RCID_SLIPPY); } break; case 682: - if ((gTeamShields[3] == -1) || (gTeamShields[3] == 0)) { + if ((gTeamShields[TEAM_ID_PEPPY] == -1) || (gTeamShields[TEAM_ID_PEPPY] == 0)) { Radio_PlayMessage(gMsg_ID_20332, RCID_ROB64); } else { Radio_PlayMessage(gMsg_ID_2310, RCID_PEPPY); } break; case 816: - if ((gTeamShields[1] == -1) || (gTeamShields[1] == 0)) { + if ((gTeamShields[TEAM_ID_FALCO] == -1) || (gTeamShields[TEAM_ID_FALCO] == 0)) { Radio_PlayMessage(gMsg_ID_20331, RCID_ROB64); } else { Radio_PlayMessage(gMsg_ID_2320, RCID_FALCO); } break; case 1150: - if (gTeamShields[1] > 0) { + if (gTeamShields[TEAM_ID_FALCO] > 0) { gActors[0].state = 1; gActors[0].fwork[9] = 2.0f; gActors[0].timer_0BC = 50; @@ -3232,7 +3234,7 @@ void Corneria_80191160(Player* player) { } break; case 1190: - if (gTeamShields[2] > 0) { + if (gTeamShields[TEAM_ID_SLIPPY] > 0) { gActors[1].state = 1; gActors[1].fwork[9] = 2.0f; gActors[1].timer_0BC = 50; @@ -3241,7 +3243,7 @@ void Corneria_80191160(Player* player) { } break; case 1230: - if (gTeamShields[3] > 0) { + if (gTeamShields[TEAM_ID_PEPPY] > 0) { gActors[2].state = 1; gActors[2].fwork[9] = 2.0f; gActors[2].timer_0BC = 50; diff --git a/src/overlays/ovl_i1/fox_tr.c b/src/overlays/ovl_i1/fox_tr.c index 4f9c4ae8..c78f8b56 100644 --- a/src/overlays/ovl_i1/fox_tr.c +++ b/src/overlays/ovl_i1/fox_tr.c @@ -8,58 +8,58 @@ #include "assets/ast_training.h" void Training_801988E0(void) { - if (D_ctx_80177E80 != 0) { + if (gRingPassCount != 0) { RCP_SetupDL(&gMasterDisp, 0x53); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - func_hud_800869A0(250.0f, 50.0f, D_ctx_80177E80, 1.0f, 0, 999); + func_hud_800869A0(250.0f, 50.0f, gRingPassCount, 1.0f, 0, 999); } } -void Training_ItemRing_Update(Item* item) { +void Training_ItemRing_Update(ItemTrainingRing* this) { f32 var_fv0; - switch (item->state) { + switch (this->state) { case 0: - item->obj.rot.z += 1.0f; - Math_SmoothStepToF(&item->scale, 1.0f, 1.0f, 0.05f, 0.0f); - if ((item->unk_44 == 0) && (gPlayer[0].unk_4DC == 0)) { - if (item->obj.rot.y == 0.0f) { + this->obj.rot.z += 1.0f; + Math_SmoothStepToF(&this->scale, 1.0f, 1.0f, 0.05f, 0.0f); + if ((this->unk_44 == 0) && (gPlayer[0].unk_4DC == 0)) { + if (this->obj.rot.y == 0.0f) { var_fv0 = 550.0f; } else { var_fv0 = 1000.0f; } - if (item->obj.pos.z > (gPlayer[0].unk_138 + var_fv0)) { - item->unk_44 = 1; + if (this->obj.pos.z > (gPlayer[0].unk_138 + var_fv0)) { + this->unk_44 = 1; PRINTF("♪:リング未通過音\n"); // Ring not passed sound AUDIO_PLAY_SFX(0x4900402F, gDefaultSfxSource, 4); - D_ctx_80177E80 = 0; + gRingPassCount = 0; } } - if (item->collected) { - item->state = 1; - item->timer_48 = 50; - item->info.unk_10 = 10000.0f; + if (this->collected) { + this->state = 1; + this->timer_48 = 50; + this->info.unk_10 = 10000.0f; PRINTF("♪:リング通過音\n"); // Ring passing sound AUDIO_PLAY_SFX(0x49008025, gDefaultSfxSource, 4); - D_ctx_80177E80++; - if ((item->obj.rot.x != 0.0f) && (D_ctx_80177E80 >= 100)) { + gRingPassCount++; + if ((this->obj.rot.x != 0.0f) && (gRingPassCount >= 100)) { Radio_PlayMessage(gMsg_ID_20330, RCID_ROB64); } } break; case 1: - item->obj.pos.x += ((gPlayer[item->playerNum].pos.x - item->obj.pos.x) * 0.05f); - item->obj.pos.y += ((gPlayer[item->playerNum].pos.y - item->obj.pos.y) * 0.05f); - if (gPlayer[0].unk_238 != 0) { - item->obj.pos.z += ((gPlayer[item->playerNum].unk_138 - 300.0f) - item->obj.pos.z) * 0.05f; + this->obj.pos.x += ((gPlayer[this->playerNum].pos.x - this->obj.pos.x) * 0.05f); + this->obj.pos.y += ((gPlayer[this->playerNum].pos.y - this->obj.pos.y) * 0.05f); + if (gPlayer[0].cockpitView != 0) { + this->obj.pos.z += ((gPlayer[this->playerNum].unk_138 - 300.0f) - this->obj.pos.z) * 0.05f; } else { - item->obj.pos.z += ((gPlayer[item->playerNum].unk_138 - item->obj.pos.z) * 0.05f); + this->obj.pos.z += ((gPlayer[this->playerNum].unk_138 - this->obj.pos.z) * 0.05f); } - item->obj.rot.z += 22.0f; - Math_SmoothStepToAngle(&item->obj.rot.y, Math_RadToDeg(-gPlayer[item->playerNum].unk_058), 0.2f, 10.0f, + this->obj.rot.z += 22.0f; + Math_SmoothStepToAngle(&this->obj.rot.y, Math_RadToDeg(-gPlayer[this->playerNum].unk_058), 0.2f, 10.0f, 0.0f); - if (item->timer_48 == 0) { - Object_Kill(&item->obj, item->sfxSource); + if (this->timer_48 == 0) { + Object_Kill(&this->obj, this->sfxSource); } break; } diff --git a/src/overlays/ovl_i1/fox_tr360.c b/src/overlays/ovl_i1/fox_tr360.c index 3c1d7b0d..542cbc24 100644 --- a/src/overlays/ovl_i1/fox_tr360.c +++ b/src/overlays/ovl_i1/fox_tr360.c @@ -11,20 +11,20 @@ void Training_80198C50(void) { Object_58* obj58; s32 i; - D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(D_TR_6008EF8); + gLevelObjects = SEGMENTED_TO_VIRTUAL(D_TR_6008EF8); Rand_SetSeed(1, 29000, 9876); obj58 = gObjects58; for (i = 0; i < 1000; i++) { - if (D_ctx_80178310[i].id >= 0) { - if (D_ctx_80178310[i].id <= 160) { + if (gLevelObjects[i].id >= 0) { + if (gLevelObjects[i].id <= 160) { Object_58_Initialize(obj58); obj58->obj.status = OBJ_ACTIVE; - obj58->obj.id = D_ctx_80178310[i].id; - obj58->obj.pos.x = D_ctx_80178310[i].xPos; - obj58->obj.pos.z = -D_ctx_80178310[i].zPos1; - obj58->obj.pos.y = D_ctx_80178310[i].yPos - RAND_FLOAT_SEEDED(300.0f); - obj58->obj.rot.y = D_ctx_80178310[i].rot.y; + obj58->obj.id = gLevelObjects[i].id; + obj58->obj.pos.x = gLevelObjects[i].xPos; + obj58->obj.pos.z = -gLevelObjects[i].zPos1; + obj58->obj.pos.y = gLevelObjects[i].yPos - RAND_FLOAT_SEEDED(300.0f); + obj58->obj.rot.y = gLevelObjects[i].rot.y; Object_SetInfo(&obj58->info, obj58->obj.id); obj58++; } @@ -105,7 +105,7 @@ void Training_80199024(Actor* actor) { sp54.y = actor->fwork[5] - actor->obj.pos.y; sp54.x = actor->fwork[6] - actor->obj.pos.z; - if (!((actor->index + gGameFrameCount) & 7)) { + if (((actor->index + gGameFrameCount) % 8) == 0) { actor->fwork[19] = Math_RadToDeg(Math_Atan2F(sp54.z, sp54.x)); actor->fwork[20] = Math_RadToDeg(Math_Atan2F(sp54.y, sqrtf(SQ(sp54.z) + SQ(sp54.x)))); } @@ -184,7 +184,7 @@ void Training_8019949C(void) { var_v1 = 0; } - if (!(gGameFrameCount & 3) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3)) { + if (((gGameFrameCount % 4) == 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3)) { sp44.x = 0.0f; sp44.y = 0.0f; sp44.z = -15000.0f; @@ -229,16 +229,16 @@ void Training_8019949C(void) { Radio_PlayMessage(D_i1_8019AE50[D_ctx_80177C8C].msg, RCID_TR); D_ctx_80177C78 = D_i1_8019AE50[D_ctx_80177C8C].unk; } else { - D_enmy2_80161690 = 80; + gCallTimer = 80; D_ctx_80177C78 = 320; } D_ctx_80177C8C++; } - if ((D_enmy2_80161690 != 0) && (gControllerPress[gMainController].button & R_CBUTTONS)) { + if ((gCallTimer != 0) && (gControllerPress[gMainController].button & R_CBUTTONS)) { func_8001AF40(0); - D_enmy2_800CFF90 = 0; - D_enmy2_80161690 = 0; + gCallVoiceParam = 0; + gCallTimer = 0; // This is ROB 64. Keep up the good work. Radio_PlayMessage(gMsg_ID_20329, RCID_ROB64); } diff --git a/src/overlays/ovl_i1/fox_ve1.c b/src/overlays/ovl_i1/fox_ve1.c index 99db8795..ea0d0f6a 100644 --- a/src/overlays/ovl_i1/fox_ve1.c +++ b/src/overlays/ovl_i1/fox_ve1.c @@ -251,7 +251,7 @@ f32 Venom1_801920F0(f32* arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32* arg5 return temp; } -void Venom1_801922DC(Object_4C* this) { +void Venom1_BossTrigger1_Update(Ve1BossTrigger1* this) { Boss* boss = &gBosses[0]; s32 i; @@ -266,7 +266,7 @@ void Venom1_801922DC(Object_4C* this) { } } -void Venom1_80192358(Object_4C* this) { +void Venom1_BossTrigger2_Update(Ve1BossTrigger2* this) { Boss* boss = &gBosses[0]; s32 i; @@ -281,30 +281,30 @@ void Venom1_80192358(Object_4C* this) { } } -void Venom1_801923C0(Object_4C* obj4C) { +void Venom1_BossTrigger3_Update(Ve1BossTrigger3* this) { Boss* boss = &gBosses[0]; s32 i; for (i = 0; i < 4; i++, boss++) { if ((boss->obj.status != OBJ_FREE) && (boss->obj.id == OBJ_BOSS_319)) { - if (boss->obj.pos.z <= obj4C->obj.pos.z) { - D_i1_8019C0BC = (s32) obj4C->obj.rot.x + 1; - obj4C->obj.status = OBJ_FREE; + if (boss->obj.pos.z <= this->obj.pos.z) { + D_i1_8019C0BC = (s32) this->obj.rot.x + 1; + this->obj.status = OBJ_FREE; } break; } } } -void Venom1_8019243C(Object_4C* obj4C) { +void Venom1_BossTrigger4_Update(Ve1BossTrigger4* this) { Boss* boss = &gBosses[0]; s32 i; for (i = 0; i < 4; i++, boss++) { if ((boss->obj.status != OBJ_FREE) && (boss->obj.id == OBJ_BOSS_319)) { - if (boss->obj.pos.z <= obj4C->obj.pos.z) { + if (boss->obj.pos.z <= this->obj.pos.z) { D_i1_8019C0C0 = 1; - obj4C->obj.status = OBJ_FREE; + this->obj.status = OBJ_FREE; } break; } @@ -366,11 +366,11 @@ void Venom1_80192518(Actor* actor) { if (((actor->obj.pos.z + 1100.0f - obj80->obj.pos.z) < 2200.0f) && ((actor->obj.pos.z + 1100.0f - obj80->obj.pos.z) > 0.0f)) { switch (obj80->obj.id) { - case 128: - case 130: + case OBJ_80_128: + case OBJ_80_130: break; - case 129: + case OBJ_80_129: var_ft5 = 600.0f; break; } @@ -433,7 +433,7 @@ void Venom1_80192518(Actor* actor) { effect->unk_60.z = -effect->unk_60.z; } - if (actor->iwork[0] & 1) { + if ((actor->iwork[0] % 2) != 0) { effect->vel.y = -effect->vel.y; } } @@ -734,7 +734,7 @@ void Venom1_80192EB0(Actor* actor) { if (Rand_ZeroOne() < 0.5f) { effect->unk_60.z = -effect->unk_60.z; } - if (actor->iwork[0] & 1) { + if ((actor->iwork[0] % 2) != 0) { effect->vel.y = -effect->vel.y; } } @@ -802,12 +802,12 @@ void Venom1_801934D0(Actor* actor) { } void Venom1_80193540(Object_80* obj80) { - if (((gPlayer[0].unk_138 - obj80->obj.pos.z) <= 3500.0f) && !(gGameFrameCount & 3)) { + if (((gPlayer[0].unk_138 - obj80->obj.pos.z) <= 3500.0f) && ((gGameFrameCount % 4) == 0)) { func_effect_8007C120(obj80->obj.pos.x, obj80->obj.pos.y, obj80->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.2f, 10); } } -void Venom1_Boss319_Init(Boss* boss) { +void Venom1_Boss319_Init(Boss319* this) { s32 i; s32 var_v0; s32 j; @@ -817,17 +817,17 @@ void Venom1_Boss319_Init(Boss* boss) { D_i1_8019C0BC = 0; D_i1_8019C0C0 = 0; gBossActive = 1; - boss->unk_05E = 1; - boss->fwork[2] = D_i1_8019A04C[boss->swork[13]][0]; - boss->fwork[14] = D_i1_8019A04C[boss->swork[13]][1]; - boss->health = 100; - boss->fwork[9] = 1.0f; + this->unk_05E = 1; + this->fwork[2] = D_i1_8019A04C[this->swork[13]][0]; + this->fwork[14] = D_i1_8019A04C[this->swork[13]][1]; + this->health = 100; + this->fwork[9] = 1.0f; - boss->swork[22] = boss->swork[21] = 0; + this->swork[22] = this->swork[21] = 0; - boss->fwork[13] = boss->fwork[12] = boss->fwork[6] = D_i1_8019AE00[boss->swork[21]].unk_0; - boss->fwork[17] = boss->obj.rot.y; - boss->obj.rot.y = 0.0f; + this->fwork[13] = this->fwork[12] = this->fwork[6] = D_i1_8019AE00[this->swork[21]].unk_0; + this->fwork[17] = this->obj.rot.y; + this->obj.rot.y = 0.0f; for (i = 0; i < ARRAY_COUNTU(D_i1_8019B838); i++) { D_i1_8019B838[i].unk_00 = D_i1_8019A820[i].unk_02; @@ -845,7 +845,7 @@ void Venom1_Boss319_Init(Boss* boss) { D_i1_8019B838[i].unk_74 = D_i1_8019B838[i].unk_78 = 0.0f; D_i1_8019B838[i].unk_7C = 0; } - boss->fwork[11] = 1.0f; + this->fwork[11] = 1.0f; for (i = 0; i < 33U; i++) { D_i1_8019B7F0[i] = 0; } @@ -853,8 +853,8 @@ void Venom1_Boss319_Init(Boss* boss) { for (i = 0; i < ARRAY_COUNTU(D_i1_8019B838); i++) { var_v0 += D_i1_8019A820[i].unk_02; } - boss->swork[29] = boss->swork[30] = var_v0 + 100; - Animation_GetFrameData(D_i1_8019ACD4[boss->swork[5]], 0, boss->vwork); + this->swork[29] = this->swork[30] = var_v0 + 100; + Animation_GetFrameData(D_i1_8019ACD4[this->swork[5]], 0, this->vwork); AUDIO_PLAY_BGM(SEQ_ID_VE_BOSS | SEQ_FLAG); } @@ -1021,7 +1021,7 @@ void Venom1_80193D64(s32 limbIndex, Vec3f* rot, void* thisx) { switch (limbIndex) { case 7: - if (this->swork[11] & 1) { + if ((this->swork[11] % 2) != 0) { Matrix_MultVec3f(gCalcMatrix, &D_i1_8019AD5C, (Vec3f*) &this->fwork[3]); this->swork[11] &= ~1; } @@ -1055,7 +1055,7 @@ void Venom1_80193D64(s32 limbIndex, Vec3f* rot, void* thisx) { Matrix_RotateY(gGfxMatrix, var_s7->unk_30[var_s4].y * M_DTOR, 1); Matrix_RotateX(gGfxMatrix, var_s7->unk_30[var_s4].x * M_DTOR, 1); Matrix_RotateZ(gGfxMatrix, var_s7->unk_30[var_s4].z * M_DTOR, 1); - if ((s32) var_s7->unk_30[var_s4].z & 1) { + if (((s32) var_s7->unk_30[var_s4].z % 2) != 0) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 96, 96, 255, 255); @@ -1111,12 +1111,12 @@ void Venom1_80194398(Boss* boss) { if (boss->swork[31] == 0) { switch (boss->swork[32]) { case 901: - if ((gTeamShields[2] > 0) && (gRadioState == 0)) { + if ((gTeamShields[TEAM_ID_SLIPPY] > 0) && (gRadioState == 0)) { Radio_PlayMessage(gMsg_ID_4092, RCID_SLIPPY); } break; case 1001: - if (gTeamShields[2] > 0) { + if (gTeamShields[TEAM_ID_SLIPPY] > 0) { gShowBossHealth = 1; gBossHealthBar = 255; boss->swork[32] = 0; @@ -1594,7 +1594,7 @@ void Venom1_80194398(Boss* boss) { case 0: case 1: for (spF4 = 0; spF4 < 33U; spF4++) { - if (!(gGameFrameCount & 3) && (D_i1_8019B7F0[spF4] != 0)) { + if (((gGameFrameCount % 4) == 0) && (D_i1_8019B7F0[spF4] != 0)) { is4 = D_i1_8019A500[spF4]; if ((D_i1_8019B838[is4].unk_00 > 0) && ((is4 != 14) || (boss->state != 0))) { D_i1_8019B838[is4].unk_00 -= 2; @@ -1614,7 +1614,7 @@ void Venom1_80194398(Boss* boss) { } break; case 2: - if (!(gGameFrameCount & 3) && (boss->timer_05A == 0)) { + if (((gGameFrameCount % 4) == 0) && (boss->timer_05A == 0)) { for (spF4 = 0; spF4 < 33U; spF4++) { if ((D_i1_8019A500[spF4] == 15) && (D_i1_8019B7F0[spF4] != 0)) { AUDIO_PLAY_SFX(0x31034064, boss->sfxSource, 4); @@ -1889,15 +1889,15 @@ void Venom1_80194398(Boss* boss) { spF8.y = boss->obj.pos.y + boss->fwork[4]; spF8.z = boss->obj.pos.z + boss->fwork[5]; func_effect_8007BFFC(spF8.x, spF8.y, spF8.z, 0, 0, 0, 25.0f, 5); - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255; - D_ctx_80178340 = D_ctx_80178358 = 255; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; + gFillScreenAlpha = gFillScreenAlphaTarget = 255; break; case 59: - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255; - D_ctx_80178340 = D_ctx_80178358 = 128; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; + gFillScreenAlpha = gFillScreenAlphaTarget = 128; break; case 58: - D_ctx_80178340 = D_ctx_80178358 = 0; + gFillScreenAlpha = gFillScreenAlphaTarget = 0; break; case 50: boss->swork[25] = 1; @@ -1913,16 +1913,16 @@ void Venom1_80194398(Boss* boss) { boss->swork[28] = 9; AUDIO_PLAY_SFX(0x29405084, boss->sfxSource, 4); boss->swork[26] = 1; - boss->info.hitbox = D_edata_800CBF34; + boss->info.hitbox = gHitboxNone; boss->unk_05E = 0; func_effect_8007A568(boss->obj.pos.x, boss->obj.pos.y + 10.0f, boss->obj.pos.z, 40.0f); gCameraShake = 40; break; case 12: - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255; - D_ctx_80178340 = 0; - D_ctx_80178358 = 255; - D_ctx_8017835C = 5; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; + gFillScreenAlpha = 0; + gFillScreenAlphaTarget = 255; + gFillScreenAlphaStep = 5; boss->obj.status = OBJ_DYING; boss->timer_052 = 80; break; @@ -2332,15 +2332,15 @@ void Venom1_80198310(Boss* boss) { void Venom1_80198414(void) { s32 i; - for (i = 1; i < ARRAY_COUNT(gTeamShields); i++) { - D_ctx_80177C38[i] = gSavedTeamShields[i]; - D_ctx_801778F0[i] = gSavedTeamShields[i]; + for (i = TEAM_ID_FALCO; i < ARRAY_COUNT(gTeamShields); i++) { + gPrevPlanetTeamShields[i] = gSavedTeamShields[i]; + gPrevPlanetSavedTeamShields[i] = gSavedTeamShields[i]; gSavedTeamShields[i] = gTeamShields[i]; } gBgColor = 0xFFFF; // 248, 248, 248 gNextGameState = GSTATE_PLAY; gNextLevel = LEVEL_VENOM_2; - D_game_80161A2E = 2; + gNextLevelStage = 2; D_ctx_80177C94 = gGoldRingCount[0]; D_ctx_80177C9C = gPlayer[0].shields + 1; D_ctx_80177CA4 = gHitCount; diff --git a/src/overlays/ovl_i2/fox_me.c b/src/overlays/ovl_i2/fox_me.c index dfafcf8c..fac23f0b 100644 --- a/src/overlays/ovl_i2/fox_me.c +++ b/src/overlays/ovl_i2/fox_me.c @@ -91,7 +91,7 @@ void Meteo_80187650(Actor* actor) { actor->unk_048 = 995; } - if ((actor->timer_0BC & 3) == 1) { + if ((actor->timer_0BC % 4U) == 1) { func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 6.0f); } @@ -133,7 +133,7 @@ void Meteo_801877C4(Actor* actor) { actor->obj.pos.y = actor->fwork[1] + sp44.y; if (actor->unk_0D0 != 0) { - func_enmy_80066254(actor); + Actor_Despawn(actor); func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); Object_Kill(&actor->obj, actor->sfxSource); func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z, 5.0f); @@ -143,7 +143,7 @@ void Meteo_801877C4(Actor* actor) { if (actor->timer_0BC == 0) { actor->timer_0BC = 40; if (actor->obj.pos.z < (gPlayer[0].unk_138 - 1000.0f)) { - func_effect_8007F11C(0x161, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 120.0f); + func_effect_8007F11C(OBJ_EFFECT_353, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 120.0f); } } } @@ -156,7 +156,7 @@ void Meteo_8018795C(Actor* actor) { actor->obj.rot.x += 3.3f; if (actor->unk_0D0 != 0) { - func_enmy_80066254(actor); + Actor_Despawn(actor); func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); Object_Kill(&actor->obj, actor->sfxSource); func_effect_8007D0E0(actor->obj.pos.x - actor->vel.x, actor->obj.pos.y, actor->obj.pos.z - actor->vel.z, 8.0f); @@ -164,9 +164,9 @@ void Meteo_8018795C(Actor* actor) { 0.0f, 0.0f, 0.0f, 4.0f, 10); } - if (!(gGameFrameCount & 7)) { + if (((gGameFrameCount % 8) == 0)) { Math_Vec3fFromAngles(&vec, actor->obj.rot.x, actor->obj.rot.y, 100.0f); - func_effect_8007F04C(0x161, actor->obj.pos.x + (vec.x * 3.0f), actor->obj.pos.y + (vec.y * 3.0f), + func_effect_8007F04C(OBJ_EFFECT_353, actor->obj.pos.x + (vec.x * 3.0f), actor->obj.pos.y + (vec.y * 3.0f), actor->obj.pos.z + (vec.z * 3.0f), actor->obj.rot.x, actor->obj.rot.y, actor->obj.rot.z, 0.0f, 0.0f, 0.0f, vec.x, vec.y, vec.z, 1.0f); } @@ -187,7 +187,7 @@ void Meteo_80187B08(Actor* actor) { actor->unk_048 = 995; } - if (!(actor->timer_0BC & 3)) { + if ((actor->timer_0BC & 3) == 0) { func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 6.0f); } @@ -470,7 +470,7 @@ void Meteo_80188344(Boss* boss) { void Meteo_801887D0(Boss* boss) { s32 i; - if (boss->timer_054 & 1) { + if ((boss->timer_054 % 2) != 0) { RCP_SetupDL_27(); gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 255, 0, 255); } @@ -487,7 +487,7 @@ void Meteo_801887D0(Boss* boss) { Matrix_RotateZ(gGfxMatrix, M_DTOR * 90.0f * i, 1); Matrix_Translate(gGfxMatrix, 0.0f, 156.0f, 930.0f, 1); - if (gGameFrameCount & 1) { + if ((gGameFrameCount % 2) != 0) { Matrix_Scale(gGfxMatrix, 6.0f, 9.0f, 5.0f, 1); } else { Matrix_Scale(gGfxMatrix, 4.0f, 7.0f, 5.0f, 1); @@ -501,37 +501,37 @@ void Meteo_801887D0(Boss* boss) { } } -void Meteo_Boss297_Init(Boss* boss) { +void Meteo_Boss297_Init(Boss297* this) { s32 i; AUDIO_PLAY_BGM(D_boss_800C9E90[gCurrentLevel]); gBossActive = 1; - boss->swork[2] = 40; - boss->swork[3] = 40; - boss->swork[4] = 40; - boss->swork[5] = 40; - boss->swork[7] = 180; - boss->swork[8] = 180; - boss->swork[6] = 150; - boss->fwork[0] = -10.0f; - boss->fwork[9] = -3000.0f; - boss->fwork[15] = 8.0f; + this->swork[2] = 40; + this->swork[3] = 40; + this->swork[4] = 40; + this->swork[5] = 40; + this->swork[7] = 180; + this->swork[8] = 180; + this->swork[6] = 150; + this->fwork[0] = -10.0f; + this->fwork[9] = -3000.0f; + this->fwork[15] = 8.0f; - i = boss->unk_044 = 1; + i = this->unk_044 = 1; Boss_Initialize(&gBosses[i]); gBosses[i].obj.status = OBJ_INIT; gBosses[i].obj.id = OBJ_BOSS_298; - gBosses[i].obj.pos.x = boss->obj.pos.x; - gBosses[i].obj.pos.y = boss->obj.pos.y; - gBosses[i].obj.pos.z = boss->obj.pos.z; + gBosses[i].obj.pos.x = this->obj.pos.x; + gBosses[i].obj.pos.y = this->obj.pos.y; + gBosses[i].obj.pos.z = this->obj.pos.z; Object_SetInfo(&gBosses[i].info, gBosses[i].obj.id); Radio_PlayMessage(gMsg_ID_3300, RCID_BOSS_METEO); - AUDIO_PLAY_SFX(0x3102505AU, boss->sfxSource, 4U); + AUDIO_PLAY_SFX(0x3102505AU, this->sfxSource, 4U); } void Meteo_80188B84(Effect* effect, f32 x, f32 y, f32 z, f32 xRot, f32 yRot, f32 arg6, f32 arg7) { @@ -663,7 +663,7 @@ void Meteo_80188FAC(Effect* effect) { effect->vel.y = dest.y; effect->vel.z = dest.z; - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { Meteo_80188F2C(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, effect->obj.rot.x, effect->obj.rot.y, effect->obj.rot.z, 5.0f); } @@ -760,7 +760,7 @@ void Meteo_801892F0(Boss* boss, s32 arg1) { } void Meteo_80189624(void) { - if (gGameFrameCount & 1) { + if ((gGameFrameCount % 2) != 0) { D_ctx_801784B8 = D_ctx_801784C4 = 0.0f; D_ctx_801784BC = D_ctx_801784C8 = 5.0f; D_ctx_801784C0 = D_ctx_801784CC = 0.0f; @@ -792,7 +792,7 @@ void Meteo_8018978C(Boss* boss) { Matrix_RotateX(gCalcMatrix, boss->obj.rot.x * M_DTOR, 1); Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, 1); - if (gGameFrameCount & 16) { + if (gGameFrameCount & 0x10) { boss->swork[19] += 32; if (boss->swork[19] > 128) { boss->swork[19] = 128; @@ -804,16 +804,16 @@ void Meteo_8018978C(Boss* boss) { } } - if (!(gGameFrameCount & 0x38)) { - boss->fwork[3] = D_i2_80195534[gGameFrameCount & 7]; - boss->fwork[4] = D_i2_80195534[gGameFrameCount & 7]; - boss->fwork[5] = D_i2_80195534[gGameFrameCount & 7]; - boss->fwork[6] = D_i2_80195534[gGameFrameCount & 7]; + if ((gGameFrameCount & 0x38) == 0) { + boss->fwork[3] = D_i2_80195534[gGameFrameCount % 8U]; + boss->fwork[4] = D_i2_80195534[gGameFrameCount % 8U]; + boss->fwork[5] = D_i2_80195534[gGameFrameCount % 8U]; + boss->fwork[6] = D_i2_80195534[gGameFrameCount % 8U]; } - if (!((gGameFrameCount + 20) & 0x38)) { - boss->fwork[7] = D_i2_80195534[(gGameFrameCount + 20) & 7]; - boss->fwork[8] = D_i2_80195534[(gGameFrameCount + 20) & 7]; + if (((gGameFrameCount + 20) & 0x38) == 0) { + boss->fwork[7] = D_i2_80195534[(gGameFrameCount + 20) % 8U]; + boss->fwork[8] = D_i2_80195534[(gGameFrameCount + 20) % 8U]; } if (boss->swork[9] != 0) { @@ -1261,20 +1261,20 @@ void Meteo_8018978C(Boss* boss) { Math_SmoothStepToF(&boss->fwork[0x15], 4.0f, 1.0f, 0.1f, 0.0f); if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_6) { - D_ctx_80178348 = D_ctx_80178340 = D_ctx_80178350 = D_ctx_80178354 = 0; + gFillScreenRed = gFillScreenAlpha = gFillScreenGreen = gFillScreenBlue = 0; if ((boss->timer_050 == 10) || (boss->timer_050 == 30) || (boss->timer_050 == 50) || (boss->timer_050 == 70)) { - D_ctx_80178340 = 150; - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255; + gFillScreenAlpha = 150; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; Meteo_80187E38(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z + 1300.0f, boss->fwork[12] + boss->obj.rot.z); boss->fwork[12] = RAND_FLOAT(360.0f); } if ((boss->timer_050 == 13) || (boss->timer_050 == 33) || (boss->timer_050 == 53) || (boss->timer_050 == 73)) { - D_ctx_80178340 = 150; - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255; + gFillScreenAlpha = 150; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; } if (boss->timer_050 == 0) { boss->state = 7; @@ -1327,7 +1327,7 @@ void Meteo_8018978C(Boss* boss) { if (gCsFrameCount == 400) { AUDIO_PLAY_BGM(SEQ_ID_BOSS_RESUME | SEQ_FLAG); - if (gTeamShields[1] > 0) { + if (gTeamShields[TEAM_ID_FALCO] > 0) { Radio_PlayMessage(gMsg_ID_3345, RCID_BOSS_METEO); } else { Radio_PlayMessage(gMsg_ID_3350, RCID_BOSS_METEO); @@ -1347,7 +1347,7 @@ void Meteo_8018978C(Boss* boss) { } if (boss->swork[0] < 10) { boss->swork[0] += 2; - if (boss->swork[0] >= 11) { + if (boss->swork[0] > 10) { boss->swork[0] = 10; } } @@ -1405,7 +1405,7 @@ void Meteo_8018978C(Boss* boss) { boss->timer_050 = 70; boss->fwork[15] = 8.0f; AUDIO_PLAY_SFX(0x11015034U, boss->sfxSource, 4U); - } else if ((boss->timer_050 & 1) == 1) { + } else if ((boss->timer_050 % 2U) == 1) { Meteo_80188088(boss); } break; @@ -1418,17 +1418,17 @@ void Meteo_8018978C(Boss* boss) { Radio_PlayMessage(gMsg_ID_3360, RCID_FOX); } - if (!(gGameFrameCount & 7) && (Rand_ZeroOne() < 0.5f)) { + if (((gGameFrameCount % 8) == 0) && (Rand_ZeroOne() < 0.5f)) { boss->timer_05C = 4; } Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_i2_80195430[RAND_INT(19.9f)], &dest); - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { func_effect_8007C120(boss->obj.pos.x + dest.x, boss->obj.pos.y + dest.y, boss->obj.pos.z + dest.z, boss->vel.x, boss->vel.y, boss->vel.z, 0.3f, 20); } - if (!(gGameFrameCount & 3)) { + if (((gGameFrameCount % 4) == 0)) { func_effect_8007BFFC(boss->obj.pos.x + dest.x, boss->obj.pos.y + dest.y, boss->obj.pos.z + dest.z, boss->vel.x, boss->vel.y, boss->vel.z, 10.0f, 10); } @@ -1501,7 +1501,7 @@ void Meteo_8018978C(Boss* boss) { void Meteo_8018B7C4(s32 arg0) { f32 effect = arg0 * 0.83333f; - if (gGameFrameCount & 1) { + if ((gGameFrameCount % 2) != 0) { effect *= 1.1f; } @@ -1603,7 +1603,7 @@ void Meteo_8018BACC(Boss* boss) { if (boss->swork[2 + i] != 0) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, boss->swork[19], 255); - if (boss->swork[9 + i] & 1) { + if ((boss->swork[9 + i] % 2) != 0) { gDPSetPrimColor(gMasterDisp++, 0, 0, 80, 0, 0, 255); } @@ -1676,7 +1676,7 @@ void Meteo_8018BACC(Boss* boss) { Matrix_SetGfxMtx(&gMasterDisp); Matrix_Push(&gGfxMatrix); - if (gGameFrameCount & 1) { + if ((gGameFrameCount % 2) != 0) { Matrix_Scale(gGfxMatrix, var_fs1 * 2.5f, var_fs1 * 2.5f, var_fs1 * 2.5f, 1); } else { Matrix_Scale(gGfxMatrix, var_fs1 * 3.0f, var_fs1 * 3.0f, var_fs1 * 3.0f, 1); @@ -1687,7 +1687,7 @@ void Meteo_8018BACC(Boss* boss) { Matrix_Pop(&gGfxMatrix); Matrix_RotateX(gGfxMatrix, -M_PI / 6, 1); - if (gGameFrameCount & 1) { + if ((gGameFrameCount % 2) != 0) { Matrix_RotateY(gGfxMatrix, M_PI, 1); } Matrix_Scale(gGfxMatrix, 2.0f, 2.0f * var_fs1, 2.0f, 1); @@ -1703,7 +1703,7 @@ void Meteo_8018BACC(Boss* boss) { gDPSetPrimColor(gMasterDisp++, 0, 0, 160, 255, 160, 255); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 1300.0f, 1); - if (gGameFrameCount & 1) { + if ((gGameFrameCount % 2) != 0) { Matrix_Scale(gGfxMatrix, var_fs1 * 0.8f, var_fs1 * 0.8f, var_fs1 * 0.8f, 1); } else { Matrix_Scale(gGfxMatrix, var_fs1, var_fs1, var_fs1, 1); @@ -1728,7 +1728,7 @@ void Meteo_8018BACC(Boss* boss) { Matrix_Translate(gGfxMatrix, 700.0f, 0.0f, -(1235.0f - ((var_fs0 - 1.0f) * 89.2f)), 1); - if (gGameFrameCount & 1) { + if ((gGameFrameCount % 2) != 0) { Matrix_Scale(gGfxMatrix, var_fs0, var_fs0, var_fs0, 1); } else { Matrix_Scale(gGfxMatrix, var_fs0 * 1.1f, var_fs0 * 1.1f, var_fs0 * 1.1f, 1); @@ -1740,7 +1740,7 @@ void Meteo_8018BACC(Boss* boss) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, -700.0f, 0.0f, -(1235.0f - ((var_fs0 - 1.0f) * 89.2f)), 1); - if (gGameFrameCount & 1) { + if ((gGameFrameCount % 2) != 0) { Matrix_Scale(gGfxMatrix, var_fs0, var_fs0, var_fs0, 1); } else { Matrix_Scale(gGfxMatrix, var_fs0 * 1.1f, var_fs0 * 1.1f, var_fs0 * 1.1f, 1); @@ -1893,7 +1893,7 @@ void Meteo_8018CD8C(Player* player) { Vec3f sp58; Vec3f sp4C; - D_ctx_8017835C = 4; + gFillScreenAlphaStep = 4; PRINTF("Demo_Time %d\n"); @@ -1901,13 +1901,13 @@ void Meteo_8018CD8C(Player* player) { case 0: gCsFrameCount = 0; - if (gTeamShields[1] > 0) { + if (gTeamShields[TEAM_ID_FALCO] > 0) { Meteo_8018C77C(actor0, 0); } - if (gTeamShields[2] > 0) { + if (gTeamShields[TEAM_ID_SLIPPY] > 0) { Meteo_8018C77C(actor1, 1); } - if (gTeamShields[3] > 0) { + if (gTeamShields[TEAM_ID_PEPPY] > 0) { Meteo_8018C77C(actor2, 2); } @@ -2065,7 +2065,7 @@ void Meteo_8018CD8C(Player* player) { if (player->timer_1F8 == 0) { AUDIO_PLAY_BGM(gBgmSeqId); - D_ctx_80177838 = 80; + gLevelStatusScreenTimer = 80; player->state_1C8 = PLAYERSTATE_1C8_3; player->unk_1D0 = 0; player->timer_1F8 = 0; @@ -2088,13 +2088,13 @@ void Meteo_8018CD8C(Player* player) { switch (gCsFrameCount) { case 500: - if ((gTeamShields[2] > 0) && (gTeamShields[3] > 0)) { + if ((gTeamShields[TEAM_ID_SLIPPY] > 0) && (gTeamShields[TEAM_ID_PEPPY] > 0)) { Radio_PlayMessage(gMsg_ID_3005, RCID_SLIPPY); } break; case 600: - if ((gTeamShields[2] > 0) && (gTeamShields[3] > 0)) { + if ((gTeamShields[TEAM_ID_SLIPPY] > 0) && (gTeamShields[TEAM_ID_PEPPY] > 0)) { Radio_PlayMessage(gMsg_ID_3010, RCID_PEPPY); } break; @@ -2156,7 +2156,7 @@ void Meteo_8018DCE4(Effect* effect) { Matrix_RotateX(gGfxMatrix, effect->obj.rot.x * M_DTOR, 1); Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2 * 3.0f, 1); - if (gGameFrameCount & 1) { + if ((gGameFrameCount % 2) != 0) { Matrix_RotateZ(gGfxMatrix, M_PI, 1); } @@ -2323,10 +2323,10 @@ void Meteo_8018E084(Player* player) { } if (gCsFrameCount > 1465) { - D_ctx_80178358 = 255; - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0; - D_ctx_8017835C = 8; - if (D_ctx_80178340 == 255) { + gFillScreenAlphaTarget = 255; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; + gFillScreenAlphaStep = 8; + if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_6; player->timer_1F8 = 0; D_ctx_8017837C = 4; @@ -2347,20 +2347,20 @@ void Meteo_8018E084(Player* player) { Object_Kill(&gActors[1].obj, gActors[1].sfxSource); Object_Kill(&gActors[2].obj, gActors[2].sfxSource); - if (gTeamShields[1] > 0) { + if (gTeamShields[TEAM_ID_FALCO] > 0) { Meteo_8018DF08(&gActors[0], 0); } - if (gTeamShields[2] > 0) { + if (gTeamShields[TEAM_ID_SLIPPY] > 0) { Meteo_8018DF08(&gActors[1], 1); } - if (gTeamShields[3] > 0) { + if (gTeamShields[TEAM_ID_PEPPY] > 0) { Meteo_8018DF08(&gActors[2], 2); } Meteo_8018DF08(&gActors[3], 3); break; case 370: - D_ctx_80177840 = 100; + gLevelClearScreenTimer = 100; break; case 450: @@ -2368,7 +2368,7 @@ void Meteo_8018E084(Player* player) { break; case 538: - switch (gTeamShields[2]) { + switch (gTeamShields[TEAM_ID_SLIPPY]) { case -1: Radio_PlayMessage(gMsg_ID_20333, RCID_ROB64); break; @@ -2382,7 +2382,7 @@ void Meteo_8018E084(Player* player) { break; case 685: - switch (gTeamShields[3]) { + switch (gTeamShields[TEAM_ID_PEPPY]) { case -1: Radio_PlayMessage(gMsg_ID_20332, RCID_ROB64); break; @@ -2396,7 +2396,7 @@ void Meteo_8018E084(Player* player) { break; case 831: - switch (gTeamShields[1]) { + switch (gTeamShields[TEAM_ID_FALCO]) { case -1: Radio_PlayMessage(gMsg_ID_20331, RCID_ROB64); break; diff --git a/src/overlays/ovl_i2/fox_sx.c b/src/overlays/ovl_i2/fox_sx.c index 9f2f680c..37dafd80 100644 --- a/src/overlays/ovl_i2/fox_sx.c +++ b/src/overlays/ovl_i2/fox_sx.c @@ -89,7 +89,7 @@ void SectorX_8018F330(Actor* actor) { break; } - if (!(gGameFrameCount & 3) && (Rand_ZeroOne() < 0.2f)) { + if (((gGameFrameCount % 4) == 0) && (Rand_ZeroOne() < 0.2f)) { SectorX_8018F1DC(actor); } @@ -101,7 +101,7 @@ void SectorX_8018F330(Actor* actor) { Radio_PlayMessage(gMsg_ID_4111, RCID_SLIPPY); func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); gBosses[0].swork[6] = 0; - gTeamShields[2] = -2; + gTeamShields[TEAM_ID_SLIPPY] = -2; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_0; actor->timer_0BC = 200; actor->iwork[14] = 3; @@ -120,7 +120,7 @@ void SectorX_8018F330(Actor* actor) { actor->obj.rot.x += 5.5f; actor->obj.rot.y += 5.0f; - if (!(gGameFrameCount & 7)) { + if (((gGameFrameCount % 8) == 0)) { func_effect_8007D10C(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 1.5f); } @@ -133,7 +133,7 @@ void SectorX_8018F330(Actor* actor) { Math_SmoothStepToF(&gPlayer[0].camEye.y, actor->obj.pos.y, actor->fwork[1], 20.0f, 0.0f); if (actor->timer_0BC == 0) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_3; - if (gPlayer[0].unk_238 != 0) { + if (gPlayer[0].cockpitView != 0) { func_play_800B5D30(&gPlayer[0], 1); } D_game_80161A44 = 12800.0f; @@ -473,7 +473,7 @@ void SectorX_80190078(Boss* boss) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); func_boss_80042EC0(boss); - boss->info.hitbox = D_edata_800CBF34; + boss->info.hitbox = gHitboxNone; } boss->timer_054 = 20; @@ -526,7 +526,7 @@ void SectorX_80190078(Boss* boss) { if (fabsf(Math_SmoothStepToF(&boss->fwork[16], 0.0f, 0.1f, 10.0f, 0)) < 8.0f) { Math_SmoothStepToF(&boss->fwork[14], 0.0f, 0.2f, 10.0f, 0); - if (!(boss->timer_050 & 7)) { + if ((boss->timer_050 % 8) == 0) { func_effect_8007C120(boss->obj.pos.x + 312.0f, boss->obj.pos.y, boss->obj.pos.z - 173.0f, boss->vel.x, boss->vel.y, boss->vel.z, 0.2f, 8); } @@ -534,7 +534,7 @@ void SectorX_80190078(Boss* boss) { if (fabsf(Math_SmoothStepToF(&boss->fwork[19], 0.0f, 0.1f, 10.0f, 0)) < 8.0f) { Math_SmoothStepToF(&boss->fwork[17], 0.0f, 0.2f, 10.0f, 0); - if (!(boss->timer_050 & 7)) { + if ((boss->timer_050 % 8) == 0) { func_effect_8007C120(boss->obj.pos.x - 312.0f, boss->obj.pos.y, boss->obj.pos.z - 173.0f, boss->vel.x, boss->vel.y, boss->vel.z, 0.2f, 8); } @@ -632,7 +632,7 @@ void SectorX_80190078(Boss* boss) { boss->fwork[3] = gPlayer[0].pos.x; boss->fwork[2] = gPlayer[0].pos.y; - if (boss->unk_04C >= 61) { + if (boss->unk_04C > 60) { boss->fwork[1] = -1000.0f; Math_SmoothStepToF(&boss->fwork[42], 100.0f, 1.0f, 20.0f, 0); boss->fwork[44] = 10.0f; @@ -943,7 +943,7 @@ void SectorX_80190078(Boss* boss) { Math_SmoothStepToF(&boss->fwork[0], 1.0f, 1.0f, 0.05f, 0); boss->unk_04C++; - if (!(boss->unk_04C & 15)) { + if ((boss->unk_04C % 16) == 0) { AUDIO_PLAY_SFX(0x2902401C, boss->sfxSource, 4); } @@ -951,7 +951,7 @@ void SectorX_80190078(Boss* boss) { boss->unk_04C = 0; boss->fwork[0] = 0.0f; - if ((gBossFrameCount < 2200) || (gTeamShields[2] <= 0)) { + if ((gBossFrameCount < 2200) || (gTeamShields[TEAM_ID_SLIPPY] <= 0)) { if (boss->health > 150) { boss->state = 8; } else { @@ -982,13 +982,13 @@ void SectorX_80190078(Boss* boss) { } else if (boss->timer_050 > 200) { boss->fwork[3] = -1000.0f; boss->fwork[1] = -2500.0f; - if (!(gGameFrameCount & 15)) { + if ((gGameFrameCount % 16) == 0) { AUDIO_PLAY_SFX(0x2902401C, boss->sfxSource, 4); } } else if (boss->timer_050 > 100) { boss->fwork[3] = 0; boss->fwork[1] = -500.0f; - if (!(gGameFrameCount & 0xF)) { + if (((gGameFrameCount % 16) == 0)) { AUDIO_PLAY_SFX(0x2902401C, boss->sfxSource, 4); } } else { @@ -1011,7 +1011,7 @@ void SectorX_80190078(Boss* boss) { boss->obj.rot.y = 0.0f; boss->unk_04C = 0; boss->fwork[0] = 0.0f; - if ((gBossFrameCount < 2200) || (gTeamShields[2] <= 0)) { + if ((gBossFrameCount < 2200) || (gTeamShields[TEAM_ID_SLIPPY] <= 0)) { boss->state = 9; } else { boss->state = 85; @@ -1038,17 +1038,17 @@ void SectorX_80190078(Boss* boss) { boss->unk_04C = Animation_GetFrameCount(&D_SX_601C690); } - if (!(boss->timer_050 & 3)) { + if ((boss->timer_050 & 3) == 0) { func_effect_8007D2C8(RAND_FLOAT_CENTERED(500.0f) + boss->obj.pos.x, RAND_FLOAT_CENTERED(500.0f) + boss->obj.pos.y, boss->obj.pos.z + 100.0f, RAND_FLOAT(5.0f) + 5.0f); } - if ((!(gGameFrameCount & 7)) && (Rand_ZeroOne() < 0.5f)) { + if ((((gGameFrameCount % 8) == 0)) && (Rand_ZeroOne() < 0.5f)) { boss->timer_05C = 4; } - if (!(boss->timer_050 & 3)) { + if ((boss->timer_050 & 3) == 0) { func_effect_8007C120(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, boss->vel.x, boss->vel.y, boss->vel.z, 0.3f, 10); } @@ -1076,7 +1076,7 @@ void SectorX_80190078(Boss* boss) { gPlayer[0].unk_234 = 1; } Object_Kill(&boss->obj, boss->sfxSource); - D_ctx_80177930 = boss->swork[6]; + gNextPlanetPath = boss->swork[6]; } break; @@ -1094,9 +1094,9 @@ void SectorX_80190078(Boss* boss) { if (boss->swork[1] > 50) { boss->swork[1] = 0; } - func_effect_8007F11C(377, boss->fwork[20] + boss->obj.pos.x, boss->fwork[21] + boss->obj.pos.y, + func_effect_8007F11C(OBJ_EFFECT_377, boss->fwork[20] + boss->obj.pos.x, boss->fwork[21] + boss->obj.pos.y, boss->fwork[22] + boss->obj.pos.z, 100.0f); - func_effect_8007F11C(377, boss->fwork[23] + boss->obj.pos.x, boss->fwork[24] + boss->obj.pos.y, + func_effect_8007F11C(OBJ_EFFECT_377, boss->fwork[23] + boss->obj.pos.x, boss->fwork[24] + boss->obj.pos.y, boss->fwork[25] + boss->obj.pos.z, 100.0f); } } else { @@ -1153,7 +1153,7 @@ bool SectorX_80192AF0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* *dList = NULL; } - if (!(boss->timer_05C & 1)) { + if ((boss->timer_05C % 2) == 0) { RCP_SetupDL(&gMasterDisp, 0x1D); } else { RCP_SetupDL(&gMasterDisp, 0x1B); @@ -1164,7 +1164,7 @@ bool SectorX_80192AF0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* case 1: rot->x += boss->fwork[4] + boss->fwork[5]; rot->z += boss->fwork[6] + boss->fwork[7]; - if (boss->timer_054 & 1) { + if ((boss->timer_054 % 2) != 0) { RCP_SetupDL_27(); gDPSetPrimColor(gMasterDisp++, 0, 0, 64, 64, 255, 255); } @@ -1189,7 +1189,7 @@ bool SectorX_80192AF0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* gSPDisplayList(gMasterDisp++, *dList); if (boss->swork[4] == 0) { RCP_SetupDL(&gMasterDisp, 0x29); - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); } else { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); @@ -1353,7 +1353,7 @@ void SectorX_80193434(Boss* boss) { if (fwork > 50.0f) { fwork = 50.0f; } - if (gGameFrameCount & 1) { + if ((gGameFrameCount % 2) != 0) { fwork *= 1.2f; } Matrix_Push(&gGfxMatrix); @@ -1369,7 +1369,7 @@ void SectorX_80193434(Boss* boss) { if (fwork > 50.0f) { fwork = 50.0f; } - if (gGameFrameCount & 1) { + if ((gGameFrameCount % 2) != 0) { fwork *= 1.2f; } Matrix_Push(&gGfxMatrix); @@ -1389,7 +1389,7 @@ void SectorX_80193434(Boss* boss) { if (fwork > 4.0f) { fwork = 4.0f; } - if (gGameFrameCount & 1) { + if ((gGameFrameCount % 2) != 0) { fwork *= 1.2f; } Matrix_Push(&gGfxMatrix); @@ -1471,11 +1471,11 @@ void SectorX_80193A30(Player* player) { player->camAt.z = gCsCamAtZ = -1000.0f; player->unk_034 = -5.0f; player->unk_0D0 = 0.0f; - D_ctx_80178340 = 255; + gFillScreenAlpha = 255; /* fallthrough */ case 1: if (gCsFrameCount < 3) { - D_ctx_80178340 = 255; + gFillScreenAlpha = 255; } D_ctx_80177A48[0] = 0.5f; gCsCamAtX = gActors[5].obj.pos.x; @@ -1531,7 +1531,7 @@ void SectorX_80193A30(Player* player) { break; case 3: - if (gCsFrameCount >= 201) { + if (gCsFrameCount > 200) { gCsCamAtX = player->pos.x; gCsCamAtY = player->pos.y; gCsCamAtZ = player->pos.z; @@ -1544,23 +1544,23 @@ void SectorX_80193A30(Player* player) { switch (gCsFrameCount) { case 195: - if (gTeamShields[1] > 0) { + if (gTeamShields[TEAM_ID_FALCO] > 0) { SectorX_801938D8(&gActors[0], 0); } break; case 213: - if (gTeamShields[2] > 0) { + if (gTeamShields[TEAM_ID_SLIPPY] > 0) { SectorX_801938D8(&gActors[1], 1); } break; case 229: - if (gTeamShields[3] > 0) { + if (gTeamShields[TEAM_ID_PEPPY] > 0) { SectorX_801938D8(&gActors[2], 2); } break; } - if (gCsFrameCount >= 301) { + if (gCsFrameCount > 300) { player->unk_1D0 += 1; player->timer_1F8 = 40; D_ctx_80177A48[0] = 0.0f; @@ -1591,7 +1591,7 @@ void SectorX_80193A30(Player* player) { if (player->timer_1F8 == 0) { player->unk_0D0 = D_play_80161A54; AUDIO_PLAY_BGM(gBgmSeqId); - D_ctx_80177838 = 80; + gLevelStatusScreenTimer = 80; player->state_1C8 = PLAYERSTATE_1C8_3; player->unk_1D0 = player->timer_1F8 = player->timer_1FC = 0; player->camEye.y = player->pos.y * player->unk_148 + 50.0f; @@ -1707,9 +1707,9 @@ void SectorX_80194728(Player* player) { func_play_800A6148(); case 1: - if (gCsFrameCount >= 991) { + if (gCsFrameCount > 990) { Math_SmoothStepToF(D_ctx_80177A48 + 3, 0.0f, 0.1f, 0.01f, 0.0f); - } else if (gCsFrameCount >= 121) { + } else if (gCsFrameCount > 120) { Math_SmoothStepToF(D_ctx_80177A48 + 3, -0.5f, 0.1f, 0.02f, 0.0f); Math_SmoothStepToF(D_ctx_80177A48 + 4, 300.0f, 0.1f, 2.0f, 0.0f); Math_SmoothStepToF(D_ctx_80177A48 + 5, -50.0f, 0.1f, 1.0f, 0.0f); @@ -1750,10 +1750,10 @@ void SectorX_80194728(Player* player) { Audio_FadeOutAll(10); } - if (gCsFrameCount >= 1196) { - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0; - D_ctx_80178358 = 255; - if (D_ctx_80178340 == 255) { + if (gCsFrameCount > 1195) { + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; + gFillScreenAlphaTarget = 255; + if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_6; D_ctx_8017837C = 4; player->timer_1F8 = 0; @@ -1774,13 +1774,13 @@ void SectorX_80194728(Player* player) { break; case 100: - if (gTeamShields[1] > 0) { + if (gTeamShields[TEAM_ID_FALCO] > 0) { SectorX_801944D4(&gActors[1], 0); } - if (gTeamShields[2] > 0) { + if (gTeamShields[TEAM_ID_SLIPPY] > 0) { SectorX_801944D4(&gActors[2], 1); } - if (gTeamShields[3] > 0) { + if (gTeamShields[TEAM_ID_PEPPY] > 0) { SectorX_801944D4(&gActors[3], 2); } break; @@ -1790,7 +1790,7 @@ void SectorX_80194728(Player* player) { break; case 60: - D_ctx_80177840 = 100; + gLevelClearScreenTimer = 100; break; case 910: @@ -1825,14 +1825,14 @@ void SectorX_80194728(Player* player) { player->unk_190 = 5.0f; break; } - if (gTeamShields[2] != -2) { + if (gTeamShields[TEAM_ID_SLIPPY] != -2) { switch (gCsFrameCount) { case 140: Radio_PlayMessage(gMsg_ID_20010, RCID_FOX); break; case 228: - switch (gTeamShields[2]) { + switch (gTeamShields[TEAM_ID_SLIPPY]) { case -1: Radio_PlayMessage(gMsg_ID_20339, RCID_ROB64); break; @@ -1848,7 +1848,7 @@ void SectorX_80194728(Player* player) { break; case 375: - switch (gTeamShields[3]) { + switch (gTeamShields[TEAM_ID_PEPPY]) { case -1: Radio_PlayMessage(gMsg_ID_20338, RCID_ROB64); break; @@ -1865,7 +1865,7 @@ void SectorX_80194728(Player* player) { case 521: func_demo_80048AC0(1); - switch (gTeamShields[1]) { + switch (gTeamShields[TEAM_ID_FALCO]) { case -1: Radio_PlayMessage(gMsg_ID_20337, RCID_ROB64); break; @@ -1891,7 +1891,7 @@ void SectorX_80194728(Player* player) { break; case 423: - switch (gTeamShields[3]) { + switch (gTeamShields[TEAM_ID_PEPPY]) { case -1: Radio_PlayMessage(gMsg_ID_20338, RCID_ROB64); break; @@ -1908,7 +1908,7 @@ void SectorX_80194728(Player* player) { case 569: func_demo_80048AC0(1); - switch (gTeamShields[1]) { + switch (gTeamShields[TEAM_ID_FALCO]) { case -1: Radio_PlayMessage(gMsg_ID_20337, RCID_ROB64); break; diff --git a/src/overlays/ovl_i3/fox_a6.c b/src/overlays/ovl_i3/fox_a6.c index 77f9685f..b0f8a42a 100644 --- a/src/overlays/ovl_i3/fox_a6.c +++ b/src/overlays/ovl_i3/fox_a6.c @@ -496,40 +496,40 @@ void Area6_80187704(void) { } } -void Area6_BossA6_Init(Boss* bossA6) { +void Area6_BossA6_Init(BossA6* this) { Hitbox* hitbox; s32 i; gBossActive = 1; D_game_80161A44 = 25000.0f; gBossFrameCount = 0; - bossA6->health = 780; - bossA6->fwork[A6_FWK_2] = bossA6->fwork[A6_FWK_34] = 2.0f; - bossA6->fwork[A6_FWK_35] = 1.2f; - bossA6->swork[A6_SWK_25] = 3; - bossA6->swork[A6_SWK_15 + 0] = bossA6->swork[A6_SWK_15 + 1] = bossA6->swork[A6_SWK_15 + 2] = 40; - bossA6->swork[A6_SWK_18 + 0] = bossA6->swork[A6_SWK_18 + 1] = bossA6->swork[A6_SWK_18 + 2] = 3; + this->health = 780; + this->fwork[A6_FWK_2] = this->fwork[A6_FWK_34] = 2.0f; + this->fwork[A6_FWK_35] = 1.2f; + this->swork[A6_SWK_25] = 3; + this->swork[A6_SWK_15 + 0] = this->swork[A6_SWK_15 + 1] = this->swork[A6_SWK_15 + 2] = 40; + this->swork[A6_SWK_18 + 0] = this->swork[A6_SWK_18 + 1] = this->swork[A6_SWK_18 + 2] = 3; for (i = 0; i < A6_BSS_MAX; i++) { D_i3_801C2250[i] = 0; } D_i3_801C22F0.unk_24 = D_i3_801C22F0.unk_28[0] = D_i3_801C22F0.unk_28[2] = D_i3_801C22F0.unk_28[1] = 255.0f; D_i3_801C22F0.unk_34 = 0.0f; - bossA6->swork[A6_SWK_27 + 0] = bossA6->swork[A6_SWK_27 + 1] = bossA6->swork[A6_SWK_27 + 2] = 0; - bossA6->swork[A6_SWK_22] = 32; - bossA6->swork[A6_SWK_23] = 32; - bossA6->swork[A6_SWK_24] = 255; - bossA6->fwork[A6_FWK_29] = 255.0f; + this->swork[A6_SWK_27 + 0] = this->swork[A6_SWK_27 + 1] = this->swork[A6_SWK_27 + 2] = 0; + this->swork[A6_SWK_22] = 32; + this->swork[A6_SWK_23] = 32; + this->swork[A6_SWK_24] = 255; + this->fwork[A6_FWK_29] = 255.0f; - bossA6->fwork[A6_FWK_3] = -1700.0f; - bossA6->fwork[A6_FWK_5] = 30.0f; - bossA6->fwork[A6_FWK_32] = 1.0f; - bossA6->timer_050 = 500; - A6_HIT_1(bossA6, 0)->z.size = A6_HIT_1(bossA6, 1)->z.size = A6_HIT_1(bossA6, 2)->z.size = 195.0f; - A6_HIT_1(bossA6, 0)->y.size = A6_HIT_1(bossA6, 1)->y.size = A6_HIT_1(bossA6, 2)->y.size = 147.0f; - A6_HIT_1(bossA6, 0)->x.size = A6_HIT_1(bossA6, 1)->x.size = A6_HIT_1(bossA6, 2)->x.size = 153.0f; + this->fwork[A6_FWK_3] = -1700.0f; + this->fwork[A6_FWK_5] = 30.0f; + this->fwork[A6_FWK_32] = 1.0f; + this->timer_050 = 500; + A6_HIT_1(this, 0)->z.size = A6_HIT_1(this, 1)->z.size = A6_HIT_1(this, 2)->z.size = 195.0f; + A6_HIT_1(this, 0)->y.size = A6_HIT_1(this, 1)->y.size = A6_HIT_1(this, 2)->y.size = 147.0f; + A6_HIT_1(this, 0)->x.size = A6_HIT_1(this, 1)->x.size = A6_HIT_1(this, 2)->x.size = 153.0f; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 40); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 40); - AUDIO_PLAY_SFX(0x11002050, bossA6->sfxSource, 4); + AUDIO_PLAY_SFX(0x11002050, this->sfxSource, 4); } #ifdef NON_MATCHING @@ -553,7 +553,7 @@ void Area6_80187944(Boss* bossA6) { Vec3f spA4[3]; Vec3f sp98; Vec3f sp8C; - Effect* temp_s0_3; + Effect* effect; gBossFrameCount++; if ((bossA6->state < 6) || ((bossA6->state >= 8) && (bossA6->state < 12))) { @@ -632,7 +632,7 @@ void Area6_80187944(Boss* bossA6) { Math_SmoothStepToF(&D_i3_801C22F0.b[i], D_i3_801BECB0[var_s0][2], 1.0f, 10.0f, 0); } if ((bossA6->swork[A6_SWK_15 + 0] == 0) && (bossA6->swork[A6_SWK_15 + 1] == 0) && - (bossA6->swork[A6_SWK_15 + 2] == 0) && (bossA6->fwork[A6_FWK_0] != 0) && !(gGameFrameCount & 1)) { + (bossA6->swork[A6_SWK_15 + 2] == 0) && (bossA6->fwork[A6_FWK_0] != 0) && ((gGameFrameCount % 2) == 0)) { func_effect_8007C120(bossA6->obj.pos.x, bossA6->obj.pos.y, bossA6->obj.pos.z + 200.0f, bossA6->vel.x, bossA6->vel.y, bossA6->vel.z, 0.3f, 1); } @@ -655,18 +655,18 @@ void Area6_80187944(Boss* bossA6) { Math_SmoothStepToAngle(&bossA6->fwork[A6_FWK_9], bossA6->fwork[A6_FWK_32], 0.05f, 0.02f, 0.00001f); Math_SmoothStepToAngle(&bossA6->obj.rot.z, bossA6->fwork[A6_FWK_8], 0.05f, bossA6->fwork[A6_FWK_9], 0.00001f); if (bossA6->swork[A6_SWK_25] >= 2) { - if (!(gGameFrameCount & 0x3F) && (Rand_ZeroOne() < 0.5f)) { + if (((gGameFrameCount % 64) == 0) && (Rand_ZeroOne() < 0.5f)) { bossA6->fwork[A6_FWK_6] = RAND_FLOAT_CENTERED(500.0f) + gPlayer[0].camEye.x; } - if (!(gGameFrameCount & 0x3F) && (Rand_ZeroOne() < 0.5f)) { + if (((gGameFrameCount % 64) == 0) && (Rand_ZeroOne() < 0.5f)) { bossA6->fwork[A6_FWK_7] = RAND_FLOAT_CENTERED(500.0f) + gPlayer[0].camEye.y; } } else { - if (!(gGameFrameCount & 0x1F) && (Rand_ZeroOne() < 0.7f)) { + if (((gGameFrameCount % 32) == 0) && (Rand_ZeroOne() < 0.7f)) { bossA6->fwork[A6_FWK_6] = RAND_FLOAT_CENTERED(1000.0f) + gPlayer[0].camEye.x; bossA6->fwork[A6_FWK_30] = 0.0f; } - if (!(gGameFrameCount & 0x1F) && (Rand_ZeroOne() < 0.7f)) { + if (((gGameFrameCount % 32) == 0) && (Rand_ZeroOne() < 0.7f)) { bossA6->fwork[A6_FWK_7] = RAND_FLOAT_CENTERED(1000.0f) + gPlayer[0].camEye.y; bossA6->fwork[A6_FWK_31] = 0.0f; } @@ -710,7 +710,7 @@ void Area6_80187944(Boss* bossA6) { if (bossA6->timer_05C == 0) { bossA6->timer_05C = 15; } - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { Matrix_MultVec3f(gCalcMatrix, &D_i3_801BED04, &spC8[0]); Matrix_MultVec3f(gCalcMatrix, &D_i3_801BED10, &spC8[1]); Matrix_MultVec3f(gCalcMatrix, &D_i3_801BED1C, &spC8[2]); @@ -725,12 +725,12 @@ void Area6_80187944(Boss* bossA6) { bossA6->obj.pos.z + spC8[i].z, 10.0f); } } - if (!(gGameFrameCount & 0x1F)) { + if (((gGameFrameCount % 32) == 0)) { func_effect_8007C120(bossA6->obj.pos.x, bossA6->obj.pos.y, bossA6->obj.pos.z + 300.0f, bossA6->vel.x, bossA6->vel.y, bossA6->vel.z, 0.5f, 70); } } - if (!(gGameFrameCount & 0xF)) { + if (((gGameFrameCount % 16) == 0)) { dz_114 = fabsf(bossA6->fwork[A6_FWK_3] / -1700.0f); if (dz_114 < 1.0f) { dz_114 = 1.0f; @@ -843,16 +843,16 @@ void Area6_80187944(Boss* bossA6) { case 2: Math_SmoothStepToF(D_ctx_801779A8, 10.0f, 1.0f, 5.0f, 0.0f); if (bossA6->timer_050 == 10) { - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255; - D_ctx_80178340 = D_ctx_80178358 = 255; - D_ctx_80178358 = 0; - D_ctx_8017835C = 25; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; + gFillScreenAlpha = gFillScreenAlphaTarget = 255; + gFillScreenAlphaTarget = 0; + gFillScreenAlphaStep = 25; gCameraShake = 50; } if (bossA6->timer_050 == 0) { if (D_i3_801C2250[A6_BSS_8] == 0) { D_i3_801C2250[A6_BSS_8] = 1; - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = D_ctx_80178340 = 0; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 0; } Math_SmoothStepToF(&D_i3_801C22F0.unk_24, 255.0f, 0.1f, 10.0f, 0.0f); Math_SmoothStepToF(&bossA6->fwork[A6_FWK_34], 1.0f, 0.1f, 0.1f, 0.0f); @@ -964,7 +964,7 @@ void Area6_80187944(Boss* bossA6) { D_i3_801C2250[A6_BSS_30]++; D_i3_801C2250[A6_BSS_30] &= 1; } - if (!(gGameFrameCount & 0x3F)) { + if (((gGameFrameCount % 64) == 0)) { bossA6->fwork[A6_FWK_8] = RAND_FLOAT(360.0f); bossA6->fwork[A6_FWK_9] = 0.0f; } @@ -1011,11 +1011,11 @@ void Area6_80187944(Boss* bossA6) { } if (D_i3_801C2250[A6_BSS_33] == 15) { if (D_i3_801C2250[A6_BSS_32] == 0) { - if (gTeamShields[1] > 0) { + if (gTeamShields[TEAM_ID_FALCO] > 0) { Radio_PlayMessage(gMsg_ID_20315, RCID_FALCO); - } else if (gTeamShields[2] > 0) { + } else if (gTeamShields[TEAM_ID_SLIPPY] > 0) { Radio_PlayMessage(gMsg_ID_20316, RCID_SLIPPY); - } else if (gTeamShields[3] > 0) { + } else if (gTeamShields[TEAM_ID_PEPPY] > 0) { Radio_PlayMessage(gMsg_ID_20317, RCID_PEPPY); } } @@ -1032,7 +1032,7 @@ void Area6_80187944(Boss* bossA6) { Math_SmoothStepToF(&D_i3_801C22F0.unk_28[0], D_i3_801BF454[var_s0][0], 0.5f, 100.0f, 0.00001f); Math_SmoothStepToF(&D_i3_801C22F0.unk_28[2], D_i3_801BF454[var_s0][1], 0.5f, 100.0f, 0.00001f); Math_SmoothStepToF(&D_i3_801C22F0.unk_28[1], D_i3_801BF454[var_s0][2], 0.5f, 100.0f, 0.00001f); - if (!(gGameFrameCount & 0xF)) { + if (((gGameFrameCount % 16) == 0)) { D_i3_801C2250[A6_BSS_9]++; D_i3_801C2250[A6_BSS_9] &= 3; } @@ -1042,26 +1042,26 @@ void Area6_80187944(Boss* bossA6) { } break; case 7: - temp_s0_3 = &gEffects[bossA6->swork[A6_SWK_39]]; + effect = &gEffects[bossA6->swork[A6_SWK_39]]; Math_SmoothStepToF(&D_i3_801C22F0.unk_28[0], 255.0f, 1.0f, 100.0f, 0.00001f); Math_SmoothStepToF(&D_i3_801C22F0.unk_28[2], 255.0f, 1.0f, 100.0f, 0.00001f); Math_SmoothStepToF(&D_i3_801C22F0.unk_28[1], 255.0f, 1.0f, 100.0f, 0.00001f); if (bossA6->fwork[A6_FWK_0] < 10.0f) { - temp_s0_3->unk_60.y = 5.0f - ((10.0f - bossA6->fwork[A6_FWK_0]) * 0.3f); - temp_s0_3->unk_60.x = 5.0f - ((10.0f - bossA6->fwork[A6_FWK_0]) * 0.3f); + effect->unk_60.y = 5.0f - ((10.0f - bossA6->fwork[A6_FWK_0]) * 0.3f); + effect->unk_60.x = 5.0f - ((10.0f - bossA6->fwork[A6_FWK_0]) * 0.3f); } if (bossA6->fwork[A6_FWK_0] < 1.0f) { - Math_SmoothStepToF(&temp_s0_3->unk_60.x, 0.0f, 0.1f, 1.0f, 0.00001f); - Math_SmoothStepToF(&temp_s0_3->unk_60.y, 0.0f, 0.1f, 1.0f, 0.00001f); - Math_SmoothStepToF(&temp_s0_3->unk_60.z, 0.0f, 1.0f, 2.0f, 0.00001f); - if (temp_s0_3->unk_60.z < 0.2f) { + Math_SmoothStepToF(&effect->unk_60.x, 0.0f, 0.1f, 1.0f, 0.00001f); + Math_SmoothStepToF(&effect->unk_60.y, 0.0f, 0.1f, 1.0f, 0.00001f); + Math_SmoothStepToF(&effect->unk_60.z, 0.0f, 1.0f, 2.0f, 0.00001f); + if (effect->unk_60.z < 0.2f) { D_i3_801C2250[A6_BSS_0] = 2; bossA6->swork[A6_SWK_37] = 1; bossA6->timer_050 = 20; D_i3_801C22F0.unk_28[0] = D_i3_801C22F0.unk_28[2] = D_i3_801C22F0.unk_28[1] = 255.0f; bossA6->state = 1; D_i3_801C2250[A6_BSS_27] = 0; - Object_Kill(&temp_s0_3->obj, temp_s0_3->sfxSource); + Object_Kill(&effect->obj, effect->sfxSource); } } break; @@ -1162,7 +1162,7 @@ void Area6_80187944(Boss* bossA6) { Area6_8018A464(bossA6, 1); Area6_8018A464(bossA6, 2); for (i = 0; i < 5; i++) { - if (!(gGameFrameCount & 3)) { + if (((gGameFrameCount % 4) == 0)) { D_i3_801BF280[i] = RAND_FLOAT_CENTERED(10.0f); D_i3_801BF2B0[i] = RAND_FLOAT_CENTERED(10.0f); D_i3_801BF2E0[i] = RAND_FLOAT_CENTERED(10.0f); @@ -1321,7 +1321,7 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { D_i3_801BEE00[0].y = 20.0f; } D_i3_801BF3C4[0] = D_i3_801BEE00[0].y; - } else if (!(bossA6->swork[A6_SWK_6] & 3)) { + } else if ((bossA6->swork[A6_SWK_6] & 3) == 0) { D_i3_801BF3C4[i] = D_i3_801BEE00[i].y; D_i3_801BEE00[i].y = D_i3_801BF3C4[i - 1]; // temp_ft2; @@ -1336,7 +1336,7 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { D_i3_801BEE00[0].x = RAND_FLOAT_CENTERED(30.0f); } D_i3_801BF334[0] = D_i3_801BEE00[0].x; - } else if (!(bossA6->swork[A6_SWK_9] & 7)) { + } else if ((bossA6->swork[A6_SWK_9] % 8) == 0) { D_i3_801BF334[i] = D_i3_801BEE00[i].x; D_i3_801BEE00[i].x = D_i3_801BF334[i - 1]; // temp_ft2; @@ -1367,7 +1367,7 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { D_i3_801BEF80[0].y = 20.0f; } D_i3_801BF3F4[0] = D_i3_801BEF80[0].y; - } else if (!(bossA6->swork[A6_SWK_7] & 3)) { + } else if ((bossA6->swork[A6_SWK_7] & 3) == 0) { D_i3_801BF3F4[i] = D_i3_801BEF80[i].y; D_i3_801BEF80[i].y = D_i3_801BF3F4[i - 1]; } @@ -1381,7 +1381,7 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { D_i3_801BEF80[0].x = RAND_FLOAT_CENTERED(30.0f); } D_i3_801BF364[0] = D_i3_801BEF80[0].x; - } else if (!(bossA6->swork[A6_SWK_10] & 7)) { + } else if ((bossA6->swork[A6_SWK_10] % 8) == 0) { D_i3_801BF364[i] = D_i3_801BEF80[i].x; D_i3_801BEF80[i].x = D_i3_801BF364[i - 1]; } @@ -1411,7 +1411,7 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { D_i3_801BF100[0].y = 20.0f; } D_i3_801BF424[0] = D_i3_801BF100[0].y; - } else if (!(bossA6->swork[A6_SWK_8] & 3)) { + } else if ((bossA6->swork[A6_SWK_8] & 3) == 0) { D_i3_801BF424[i] = D_i3_801BF100[i].y; D_i3_801BF100[i].y = D_i3_801BF424[i - 1]; // temp_ft2; @@ -1426,7 +1426,7 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { D_i3_801BF100[0].x = RAND_RANGE(-12.0f, 18.0f); } D_i3_801BF394[0] = D_i3_801BF100[0].x; - } else if (!(bossA6->swork[A6_SWK_11] & 7)) { + } else if ((bossA6->swork[A6_SWK_11] % 8) == 0) { D_i3_801BF394[i] = D_i3_801BF100[i].x; D_i3_801BF100[i].x = D_i3_801BF394[i - 1]; // temp_ft2; @@ -1451,7 +1451,7 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { if (bossA6->swork[A6_SWK_25] < 2) { var_fs0 = 0.7f; } - if (!(gGameFrameCount & 31) && (Rand_ZeroOne() < var_fs0) && (D_i3_801C2250[A6_BSS_5] == 0) && + if (((gGameFrameCount % 32) == 0) && (Rand_ZeroOne() < var_fs0) && (D_i3_801C2250[A6_BSS_5] == 0) && (bossA6->swork[A6_SWK_33 + arg1] != 0)) { if ((Rand_ZeroOne() < 0.2f) || (bossA6->swork[A6_SWK_25] < 2)) { if (bossA6->swork[A6_SWK_18] == 0) { @@ -1476,7 +1476,7 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { } } else { for (i = 0; i < 3; i++) { - if ((i == (gGameFrameCount & 15)) && (bossA6->swork[A6_SWK_18 + i] == 0)) { + if ((i == (gGameFrameCount % 16U)) && (bossA6->swork[A6_SWK_18 + i] == 0)) { bossA6->swork[A6_SWK_12 + i] = 15; bossA6->swork[A6_SWK_18 + i] = 1; i = 3; @@ -1731,7 +1731,7 @@ void Area6_8018C0D0(f32* arg0, f32 arg1, Vec3f* arg2, f32 arg3, s32 arg4) { f32 spAC; f32 var_fs3 = 5.0f; - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { spAC = 0.0f; } else { spAC = 180.0f; @@ -1834,8 +1834,8 @@ void Area6_8018C54C(Boss* bossA6) { if (bossA6->unk_3F8 >= 1.0f) { for (i = 0; i < 3; i++) { if ((bossA6->swork[A6_SWK_33 + i] == 0) && (bossA6->state != 3) && - (D_i3_801C2250[A6_BSS_2_0 + i] == 0) && !(gGameFrameCount & 3) && - (bossA6->swork[A6_SWK_27 + i] != 0) && (D_ctx_80177854 != 100)) { + (D_i3_801C2250[A6_BSS_2_0 + i] == 0) && ((gGameFrameCount % 4) == 0) && + (bossA6->swork[A6_SWK_27 + i] != 0) && (gPlayState != 100)) { Matrix_RotateY(gCalcMatrix, bossA6->obj.rot.y * M_DTOR, 0); Matrix_RotateX(gCalcMatrix, bossA6->obj.rot.x * M_DTOR, 1); Matrix_RotateZ(gCalcMatrix, bossA6->obj.rot.z * M_DTOR, 1); @@ -2208,13 +2208,13 @@ void Area6_8018DF74(Player* player) { player->pos.y = 350.0f; player->pos.z = 16000.0f; player->unk_0D0 = 30.0f; - if (gTeamShields[1] > 0) { + if (gTeamShields[TEAM_ID_FALCO] > 0) { Area6_8018D804(&gActors[3], 0); } - if (gTeamShields[2] > 0) { + if (gTeamShields[TEAM_ID_SLIPPY] > 0) { Area6_8018D804(&gActors[4], 1); } - if (gTeamShields[3] > 0) { + if (gTeamShields[TEAM_ID_PEPPY] > 0) { Area6_8018D804(&gActors[5], 2); } gActors[0].fwork[0] = 20.0f; @@ -2284,7 +2284,7 @@ void Area6_8018DF74(Player* player) { } if (gCsFrameCount == 540) { D_ctx_80178488 = 1; - D_ctx_80177838 = 50; + gLevelStatusScreenTimer = 50; player->pos.x = 0.0f; player->pos.z = 0.0f; player->pos.y = 350.0f; @@ -2311,17 +2311,17 @@ void Area6_8018DF74(Player* player) { Area6_8018D920(&sp5C); break; case 176: - if (gTeamShields[1] > 0) { + if (gTeamShields[TEAM_ID_FALCO] > 0) { Area6_8018D920(&gActors[3].obj.pos); } break; case 187: - if (gTeamShields[2] > 0) { + if (gTeamShields[TEAM_ID_SLIPPY] > 0) { Area6_8018D920(&gActors[4].obj.pos); } break; case 198: - if (gTeamShields[3] > 0) { + if (gTeamShields[TEAM_ID_PEPPY] > 0) { Area6_8018D920(&gActors[5].obj.pos); } break; @@ -2514,19 +2514,19 @@ void Area6_8018ED78(Player* player) { actor4->fwork[4] = 0.5f; } if (gCsFrameCount >= 200) { - if (D_ctx_80178340 == 255) { + if (gFillScreenAlpha == 255) { player->unk_1D0 = 2; func_play_800A6148(); } else { - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255; - D_ctx_80178358 = 255; - D_ctx_8017835C = 16; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; + gFillScreenAlphaTarget = 255; + gFillScreenAlphaStep = 16; } } else if ((gCsFrameCount == 131) || (gCsFrameCount == 134) || (gCsFrameCount == 137)) { - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255; - D_ctx_80178340 = 192; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; + gFillScreenAlpha = 192; } else { - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = D_ctx_80178340 = 0; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 0; } if ((gCsFrameCount == 146) || (gCsFrameCount == 150)) { AUDIO_PLAY_SFX(0x2940F026, gActors[5].sfxSource, 4); @@ -2579,9 +2579,9 @@ void Area6_8018ED78(Player* player) { player->camAt.y = gCsCamAtY = 0.0f; player->camAt.z = gCsCamAtZ = player->pos.z + 50.0f + D_ctx_80177D20; } - if (D_ctx_80178340 != 0) { - D_ctx_80178358 = 0; - D_ctx_8017835C = 4; + if (gFillScreenAlpha != 0) { + gFillScreenAlphaTarget = 0; + gFillScreenAlphaStep = 4; } else { player->unk_1D0 = 3; } @@ -2636,19 +2636,19 @@ void Area6_8018ED78(Player* player) { AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); } if (gCsFrameCount >= 1090) { - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0; - D_ctx_80178358 = 255; - D_ctx_8017835C = 8; - if (D_ctx_80178340 == 255) { + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; + gFillScreenAlphaTarget = 255; + gFillScreenAlphaStep = 8; + if (gFillScreenAlpha == 255) { D_play_800D3180[LEVEL_AREA_6] = Play_CheckMedalStatus(300) + 1; - for (i = 1; i < 6; i++) { - D_ctx_80177C38[i] = gTeamShields[i]; - D_ctx_801778F0[i] = gSavedTeamShields[i]; + for (i = TEAM_ID_FALCO; i < TEAM_ID_MAX; i++) { + gPrevPlanetTeamShields[i] = gTeamShields[i]; + gPrevPlanetSavedTeamShields[i] = gSavedTeamShields[i]; gSavedTeamShields[i] = gTeamShields[i]; } - for (i = 1; i < 4; i++) { - if (D_ctx_80177C38[i] == 0) { - D_ctx_80177C38[i] = 255; + for (i = TEAM_ID_FALCO; i <= TEAM_ID_PEPPY; i++) { + if (gPrevPlanetTeamShields[i] == 0) { + gPrevPlanetTeamShields[i] = 255; } } D_ctx_80161A94[0] = gGoldRingCount[0]; @@ -2671,7 +2671,7 @@ void Area6_8018ED78(Player* player) { AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); break; case 550: - D_ctx_80177840 = 100; + gLevelClearScreenTimer = 100; break; case 700: D_ctx_80177830 = 1; diff --git a/src/overlays/ovl_i3/fox_aq.c b/src/overlays/ovl_i3/fox_aq.c index 6566f9ef..a6077f16 100644 --- a/src/overlays/ovl_i3/fox_aq.c +++ b/src/overlays/ovl_i3/fox_aq.c @@ -7,6 +7,7 @@ #include "global.h" #include "assets/ast_blue_marine.h" #include "assets/ast_aquas.h" +// #include "prevent_bss_reordering2.h" const char D_i3_801C1A30[] = "プレイヤーのすべてをクリア \n"; // Clear of all players const char D_i3_801C1A50[] = "i %d\n"; @@ -205,7 +206,7 @@ s32 D_i3_801C4450; s32 D_i3_801C4454; f32 D_i3_801C4458; f32 D_i3_801C445C; - +#include "prevent_bss_reordering.h" f32 D_i3_801BFB60 = 0.0f; s32 D_i3_801BFB64[11] = { 0, 30, 27, 24, 21, 18, 15, 12, 9, 6, 3, @@ -435,8 +436,7 @@ void Aquas_801A9824(void) { s32* var_v0_2; s32* var_v0_3; - gTeamShields[1] = gTeamShields[2] = gTeamShields[3] = 255; - + gTeamShields[TEAM_ID_FALCO] = gTeamShields[TEAM_ID_SLIPPY] = gTeamShields[TEAM_ID_PEPPY] = 255; for (i = 0; i < ARRAY_COUNT(D_i3_801C4190); i++) { D_i3_801C4190[i] = 0; } @@ -1004,16 +1004,16 @@ void Aquas_801AACF8(Player* player) { } if (player->pos.x > (player->unk_0AC + (player->unk_09C - 100.0f))) { - player->flags_228 = 1; + player->flags_228 = PFLAG_228_0; } if (player->pos.x < (player->unk_0AC - (player->unk_09C - 100.0f))) { - player->flags_228 = 2; + player->flags_228 = PFLAG_228_1; } if (player->pos.y > (player->unk_0B0 + (player->unk_0A0 - 100.0f))) { - player->flags_228 = 8; + player->flags_228 = PFLAG_228_3; } if (player->pos.y <= (gGroundLevel + 100)) { - player->flags_228 = 4; + player->flags_228 = PFLAG_228_2; } if (D_i3_801C4190[6] != 0) { @@ -1046,7 +1046,7 @@ void Aquas_801AACF8(Player* player) { player->unk_138 + RAND_FLOAT_CENTERED(10.0f) + (sp80.z * -1.0f), 0.4f, 1); } else { player->unk_178 -= 10.0f; - if (!(gGameFrameCount & 7)) { + if (((gGameFrameCount % 8) == 0)) { Aquas_801AC8A8(player->pos.x + RAND_FLOAT_CENTERED(10.0f) + sp80.x, player->pos.y + RAND_FLOAT_CENTERED(10.0f) + sp80.y, player->unk_138 + RAND_FLOAT_CENTERED(20.0f) + sp80.z, 0.4f, 0); @@ -1096,7 +1096,7 @@ void Aquas_801ABA40(PlayerShot* shot) { } else { Math_SmoothStepToF(&shot->unk_48, 50.0f, 0.2f, 10.0f, 0.00001f); shot->obj.rot.z += shot->unk_48; - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { func_beam_80035DEC(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z); } @@ -1141,7 +1141,7 @@ void Aquas_801ABA40(PlayerShot* shot) { if (shot->unk_54 == 0) { shot->unk_54 = -30.0f; } - if (!(gGameFrameCount & 3)) { + if (((gGameFrameCount % 4) == 0)) { Math_SmoothStepToF(&shot->unk_54, D_i3_801C4458, 0.1f, 50.0f, 0.0001f); } @@ -1460,8 +1460,7 @@ void Aquas_801ACE50(Player* player) { if (player->unk_258 > 50.0f) { player->unk_258 = 50.0f; } - - if (!(gGameFrameCount & 1) && (gBlurAlpha > 64)) { + if (((gGameFrameCount % 2) == 0) && (gBlurAlpha > 64)) { gBlurAlpha -= 1; } } else { @@ -1728,7 +1727,7 @@ void Aquas_801AD6C0(Actor* actor) { if (actor->iwork[1] <= 0) { actor->itemDrop = DROP_NONE; actor->unk_0D4 = 2; - func_enmy_80066254(actor); + Actor_Despawn(actor); Object_Kill(&actor->obj, actor->sfxSource); } actor->timer_0BC = 4; @@ -1816,7 +1815,7 @@ void Aquas_801AE168(Actor* actor) { } Aquas_801ADF7C(D_i3_801C27C0->pos.x, D_i3_801C27C0->pos.y, D_i3_801C27C0->pos.z, xRot, yRot, - D_i3_801C27C0->rot.z, D_i3_801BFB90[i], actor->timer_0C6 & 1, actor->scale, i); + D_i3_801C27C0->rot.z, D_i3_801BFB90[i], actor->timer_0C6 % 2U, actor->scale, i); } } @@ -1908,7 +1907,7 @@ void Aquas_801AE3D8(Actor* actor) { break; case 1: - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { func_effect_8007C120(actor->obj.pos.x, actor->fwork[0] + actor->obj.pos.y, actor->obj.pos.z, actor->vel.x, actor->vel.y, actor->vel.z, 0.1f, 10); func_effect_8007C120(actor->obj.pos.x, actor->obj.pos.y + (actor->fwork[0] * -1.0f), @@ -1979,7 +1978,7 @@ void Aquas_801AEB44(Actor* actor) { Vtx* var_t5; Vtx* temp_v1_2; - if ((actor->timer_0C6 != 0) && (actor->state == 0) && (D_ctx_80177854 != 100)) { + if ((actor->timer_0C6 != 0) && (actor->state == 0) && (gPlayState != PLAY_PAUSE)) { actor->iwork[1]++; actor->iwork[1] %= 8; } @@ -2028,7 +2027,7 @@ void Aquas_801AEB44(Actor* actor) { RCP_SetupDL(&gMasterDisp, 0x20); } else if (gBosses[0].swork[AQ_SWK_0] == 1) { RCP_SetupDL(&gMasterDisp, 4); - } else if (!(actor->timer_0C6 & 1)) { + } else if ((actor->timer_0C6 % 2) == 0) { RCP_SetupDL(&gMasterDisp, 0x1D); } else { RCP_SetupDL(&gMasterDisp, 0x16); @@ -2040,7 +2039,7 @@ void Aquas_801AEB44(Actor* actor) { gDPLoadTLUT_pal256(gMasterDisp++, D_AQ_6008FC8); gDPLoadTextureBlock(gMasterDisp++, D_AQ_6008EC8, G_IM_FMT_CI, G_IM_SIZ_8b, 16, 16, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 4, 4, G_TX_NOLOD, G_TX_NOLOD); - gSPVertex(gMasterDisp++, D_i3_801C3A88[actor->iwork[0]][gSysFrameCount & 1], 14, 0); + gSPVertex(gMasterDisp++, D_i3_801C3A88[actor->iwork[0]][gSysFrameCount % 2], 14, 0); gSP1Triangle(gMasterDisp++, 0, 1, 2, 0); gSP1Triangle(gMasterDisp++, 3, 1, 0, 0); gSP1Triangle(gMasterDisp++, 4, 5, 0, 0); @@ -2061,9 +2060,9 @@ void Aquas_801AEB44(Actor* actor) { gSP1Triangle(gMasterDisp++, 7, 6, 13, 0); gSP1Triangle(gMasterDisp++, 13, 12, 7, 0); gSP1Triangle(gMasterDisp++, 10, 7, 12, 0); - gSPVertex(gMasterDisp++, &D_i3_801C3A88[actor->iwork[0]][gSysFrameCount & 1][1], 3, 0); - gSPVertex(gMasterDisp++, &D_i3_801C3A88[actor->iwork[0]][gSysFrameCount & 1][9], 2, 3); - gSPVertex(gMasterDisp++, &D_i3_801C3A88[actor->iwork[0]][gSysFrameCount & 1][12], 8, 5); + gSPVertex(gMasterDisp++, &D_i3_801C3A88[actor->iwork[0]][gSysFrameCount % 2][1], 3, 0); + gSPVertex(gMasterDisp++, &D_i3_801C3A88[actor->iwork[0]][gSysFrameCount % 2][9], 2, 3); + gSPVertex(gMasterDisp++, &D_i3_801C3A88[actor->iwork[0]][gSysFrameCount % 2][12], 8, 5); gSP1Triangle(gMasterDisp++, 0, 2, 7, 0); gSP1Triangle(gMasterDisp++, 7, 2, 8, 0); gSP1Triangle(gMasterDisp++, 6, 8, 2, 0); @@ -2079,7 +2078,7 @@ void Aquas_801AEB44(Actor* actor) { gDPLoadTLUT_pal256(gMasterDisp++, D_AQ_6019338); gDPLoadTextureBlock(gMasterDisp++, D_AQ_6019238, G_IM_FMT_CI, G_IM_SIZ_8b, 16, 16, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 4, 4, G_TX_NOLOD, G_TX_NOLOD); - gSPVertex(gMasterDisp++, &D_i3_801C3A88[actor->iwork[0]][gSysFrameCount & 1][20], 8, 0); + gSPVertex(gMasterDisp++, &D_i3_801C3A88[actor->iwork[0]][gSysFrameCount % 2][20], 8, 0); gSP1Triangle(gMasterDisp++, 0, 1, 2, 0); gSP1Triangle(gMasterDisp++, 2, 3, 0, 0); gSP1Triangle(gMasterDisp++, 4, 5, 6, 0); @@ -2259,7 +2258,7 @@ void Aquas_801AFA5C(Actor* actor) { Math_SmoothStepToF(&actor->fwork[2], 1.0f, 0.1f, 0.2f, 0.0001f); Math_SmoothStepToF(&actor->vel.y, -10.0f, 0.1f, 1.0f, 0.001f); Math_SmoothStepToAngle(&actor->obj.rot.x, 80.0f, 0.1f, 1.0f, 0.001f); - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { Aquas_801AC8A8(actor->obj.pos.x + RAND_FLOAT_CENTERED(300.0f), actor->obj.pos.y + RAND_FLOAT_CENTERED(200.0f), actor->obj.pos.z, 4.0f, 2); } @@ -2271,7 +2270,7 @@ void Aquas_801AFA5C(Actor* actor) { } else { Math_SmoothStepToF(&actor->fwork[6], 30.0f, 0.1f, 12.0f, 0.1f); sp70 = RAND_FLOAT(30.0f); - if (!(gGameFrameCount & 3)) { + if (((gGameFrameCount % 4) == 0)) { for (i = 0; i < 36; i += 2) { sp6C = __sinf(sp70 + (i * 10.0f * M_DTOR)) * actor->fwork[6] * 10.0f; sp68 = __cosf(sp70 + (i * 10.0f * M_DTOR)) * actor->fwork[6] * 10.0f; @@ -2330,8 +2329,7 @@ void Aquas_801B099C(Actor* actor) { Matrix_RotateZ(gGfxMatrix, (actor->obj.rot.z + actor->fwork[5]) * M_DTOR, 1); Matrix_Scale(gGfxMatrix, actor->fwork[0], actor->fwork[1], actor->fwork[2], 1); Matrix_SetGfxMtx(&gMasterDisp); - - if (!(actor->timer_0C6 & 1)) { + if ((actor->timer_0C6 % 2) == 0) { RCP_SetupDL(&gMasterDisp, 0x39); } else { RCP_SetupDL(&gMasterDisp, 0x3D); @@ -2409,7 +2407,7 @@ void Aquas_801B0B60(Actor* actor) { if (Rand_ZeroOne() < 0.1) { actor->itemDrop = DROP_SILVER_RING_10p; actor->unk_0D4 = 2; - func_enmy_80066254(actor); + Actor_Despawn(actor); } Object_Kill(&actor->obj, actor->sfxSource); func_effect_800815DC(); @@ -2417,8 +2415,7 @@ void Aquas_801B0B60(Actor* actor) { func_effect_8007A6F0(&actor->obj.pos, 0x29018049); break; } - - if (!(gGameFrameCount & 0xF)) { + if (((gGameFrameCount % 16) == 0)) { Aquas_801AC8A8(actor->obj.pos.x + RAND_FLOAT_CENTERED(10.0f), actor->obj.pos.y + RAND_FLOAT_CENTERED(10.0f), actor->obj.pos.z + RAND_FLOAT_CENTERED(10.0f), 2.0f, 1); } @@ -2469,22 +2466,21 @@ void Aquas_801B1008(Boss* bossAQ, s32 timer) { } // OBJ_BOSS_AQ init -void Aquas_BossAq_Init(Boss* bossAQ) { +void Aquas_BossAq_Init(BossAQ* this) { s32 i; Actor* actor; gBossActive = 1; gBossFrameCount = 0; - bossAQ->health = 150; - + this->health = 150; for (i = 0, actor = gActors; i < 2; actor++) { if (actor->obj.status == OBJ_FREE) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; actor->obj.id = OBJ_ACTOR_256; - actor->obj.pos.x = bossAQ->obj.pos.x + D_i3_801C0098[i].x; - actor->obj.pos.y = bossAQ->obj.pos.y + D_i3_801C0098[i].y; - actor->obj.pos.z = bossAQ->obj.pos.z + D_i3_801C0098[i].z; + actor->obj.pos.x = this->obj.pos.x + D_i3_801C0098[i].x; + actor->obj.pos.y = this->obj.pos.y + D_i3_801C0098[i].y; + actor->obj.pos.z = this->obj.pos.z + D_i3_801C0098[i].z; actor->iwork[0] = i; i++; Object_SetInfo(&actor->info, actor->obj.id); @@ -2498,23 +2494,23 @@ void Aquas_BossAq_Init(Boss* bossAQ) { D_i3_801C42A0[13] = 6; D_i3_801C42A0[14] = 11; - bossAQ->fwork[AQ_FWK_1] = 10.0f; + this->fwork[AQ_FWK_1] = 10.0f; D_i3_801C4308[79] = D_i3_801C4308[10] = D_i3_801C4308[80] = D_i3_801C4308[11] = 0.0f; D_i3_801C4308[58] = D_i3_801C4308[65] = D_i3_801C4308[72] = 1.0f; - bossAQ->fwork[AQ_FWK_8] = bossAQ->fwork[AQ_FWK_9] = bossAQ->fwork[AQ_FWK_10] = 1.0f; - bossAQ->swork[AQ_SWK_14] = bossAQ->swork[AQ_SWK_15] = bossAQ->swork[AQ_SWK_16] = 255; - bossAQ->swork[AQ_SWK_17] = 10; + this->fwork[AQ_FWK_8] = this->fwork[AQ_FWK_9] = this->fwork[AQ_FWK_10] = 1.0f; + this->swork[AQ_SWK_14] = this->swork[AQ_SWK_15] = this->swork[AQ_SWK_16] = 255; + this->swork[AQ_SWK_17] = 10; D_i3_801C42A0[1] = D_i3_801C42A0[2] = D_i3_801C42A0[4] = D_i3_801C42A0[5] = (D_i3_801C42A0[6] = D_i3_801C42A0[7] = 0) ^ 0; // fake for (i = 0; i < AQ_LIMB_MAX; i++) { sBossAQlimbTimers[i] = 0; } - bossAQ->obj.pos.y += 400.0f; - bossAQ->info.hitbox[119] = 1028.0f; - bossAQ->info.hitbox[169] = 800.0f; - bossAQ->swork[AQ_SWK_8] = bossAQ->swork[AQ_SWK_9] = 2; - AUDIO_PLAY_SFX(0x3140904D, bossAQ->sfxSource, 4); + this->obj.pos.y += 400.0f; + this->info.hitbox[119] = 1028.0f; + this->info.hitbox[169] = 800.0f; + this->swork[AQ_SWK_8] = this->swork[AQ_SWK_9] = 2; + AUDIO_PLAY_SFX(0x3140904D, this->sfxSource, 4); } // OBJ_BOSS_AQ action @@ -2691,14 +2687,14 @@ void Aquas_801B134C(Boss* bossAQ) { D_ctx_801779A8[0] = 20.0f; if (gCameraShake == 0) { - D_ctx_80178340 = D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = D_ctx_80178358 = 255; + gFillScreenAlpha = gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlphaTarget = 255; - D_ctx_80178358 = 0; - D_ctx_8017835C = 25; + gFillScreenAlphaTarget = 0; + gFillScreenAlphaStep = 25; gCameraShake = 20 + RAND_FLOAT(20); } if (gCameraShake == 29) { - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = D_ctx_80178340 = 0; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 0; } Math_SmoothStepToF(&D_i3_801C41B8[25], D_bg_8015F970, 1.0f, 100, 0.f); Math_SmoothStepToF(&D_i3_801C41B8[26], 128.0f, 1.0f, 100, 0.f); @@ -2712,7 +2708,7 @@ void Aquas_801B134C(Boss* bossAQ) { D_i3_801C42A0[1] = D_i3_801C42A0[2] = D_i3_801C42A0[4] = D_i3_801C42A0[5] = D_i3_801C42A0[6] = D_i3_801C42A0[7] = 50; } - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { func_effect_8007C120(bossAQ->obj.pos.x + RAND_FLOAT_CENTERED(1200.0f), bossAQ->obj.pos.y + 400.0f + RAND_FLOAT_CENTERED(400.0f), bossAQ->obj.pos.z + 1000.0f + RAND_FLOAT_CENTERED(800.0f), bossAQ->vel.x, @@ -2736,7 +2732,7 @@ void Aquas_801B134C(Boss* bossAQ) { for (i3 = 0; i3 < AQ_LIMB_MAX; i3++) { sBossAQlimbTimers[i3] = 100; } - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = D_ctx_80178340 = 0; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 0; bossAQ->state = 17; } break; @@ -2756,7 +2752,7 @@ void Aquas_801B134C(Boss* bossAQ) { Math_SmoothStepToF(&bossAQ->fwork[AQ_FWK_8], 0.1f, 0.1f, 1.0f, 0.0f); Math_SmoothStepToF(&bossAQ->fwork[AQ_FWK_9], 0.1f, 0.1f, 1.0f, 0.0f); Math_SmoothStepToF(&bossAQ->fwork[AQ_FWK_10], 0.1f, 0.1f, 1.0f, 0.0f); - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { func_effect_8007C120(bossAQ->obj.pos.x + RAND_FLOAT_CENTERED(1200.0f), bossAQ->obj.pos.y + 400.0f + RAND_FLOAT_CENTERED(400.0f), bossAQ->obj.pos.z + 1000.0f + RAND_FLOAT_CENTERED(800.0f), bossAQ->vel.x, @@ -3337,7 +3333,7 @@ bool Aquas_801B42AC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th if (sBossAQlimbTimers[limbIndex] >= 1000) { *dList = NULL; - } else if ((sBossAQlimbTimers[limbIndex] != 0) && (D_ctx_80177854 != 100)) { + } else if ((sBossAQlimbTimers[limbIndex] != 0) && (gPlayState != PLAY_PAUSE)) { sBossAQlimbTimers[limbIndex]--; } @@ -3346,7 +3342,7 @@ bool Aquas_801B42AC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th if ((D_i3_801C42A0[0] != 255) && (limbIndex != 27)) { RCP_SetupDL(&gMasterDisp, 0x3A); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, D_i3_801C42A0[0]); - } else if (!(sBossAQlimbTimers[limbIndex] & 1)) { + } else if ((sBossAQlimbTimers[limbIndex] % 2) == 0) { RCP_SetupDL(&gMasterDisp, 0x39); } else { sp50 = true; @@ -3604,7 +3600,7 @@ Vec3f D_i3_801C0250 = { 0.0f, 0.0f, 0.0f }; bool Aquas_801B4DDC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { Actor* this = (Actor*) thisx; - if (!(this->timer_0C6 & 1)) { + if ((this->timer_0C6 % 2) == 0) { RCP_SetupDL(&gMasterDisp, 0x39); if ((limbIndex > 0) && (limbIndex < 5)) { RCP_SetupDL(&gMasterDisp, 0x3C); @@ -3712,7 +3708,7 @@ void Aquas_801B50E8(Actor* actor) { Aquas_801A9728(actor, 50.0f, 10.0f, 8); actor->state = 3; actor->vel.y = 30.0f; - } else if (!(gGameFrameCount & 0xF)) { + } else if (((gGameFrameCount % 16) == 0)) { func_effect_8007B8F8(actor->obj.pos.x, gGroundLevel + 30.0f, actor->obj.pos.z, 10.0f); } break; @@ -3736,7 +3732,7 @@ void Aquas_801B50E8(Actor* actor) { if ((actor->fwork[0] - 1.0f) <= actor->obj.pos.y) { actor->state = 5; } - if (!(gGameFrameCount & 7)) { + if (((gGameFrameCount % 8) == 0)) { Aquas_801AC8A8(actor->obj.pos.x + RAND_FLOAT_CENTERED(100.0f), actor->obj.pos.y + RAND_FLOAT_CENTERED(100.0f), actor->obj.pos.z + RAND_FLOAT_CENTERED(100.0f), 1.0f, 1); @@ -3772,7 +3768,7 @@ void Aquas_801B50E8(Actor* actor) { case 6: Math_SmoothStepToAngle(&actor->obj.rot.x, actor->fwork[3], 1.0f, 5.0f, 0); Math_SmoothStepToAngle(&actor->obj.rot.y, actor->fwork[2], 1.0f, 5.0f, 0); - if (!(gGameFrameCount & 3)) { + if (((gGameFrameCount % 4) == 0)) { Aquas_801AC8A8(actor->obj.pos.x + RAND_FLOAT_CENTERED(100.0f), actor->obj.pos.y + RAND_FLOAT_CENTERED(100.0f), actor->obj.pos.z + RAND_FLOAT_CENTERED(100.0f), 1.0f, 1); @@ -3786,7 +3782,7 @@ void Aquas_801B50E8(Actor* actor) { func_effect_8007BC7C(actor->vwork[i].x, actor->vwork[i].y, actor->vwork[i].z + 100.0f, 6.0f); } actor->itemDrop = DROP_NONE; - func_enmy_80066254(actor); + Actor_Despawn(actor); func_effect_800815DC(); Object_Kill(&actor->obj, actor->sfxSource); func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 6.0f); @@ -3842,7 +3838,7 @@ bool Aquas_801B5C18(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th Vec3f sp4C = { 0.0f, 0.0f, 0.0f }; Actor* this = (Actor*) thisx; - if (!(this->timer_0C6 & 1)) { + if ((this->timer_0C6 % 2) == 0) { RCP_SetupDL(&gMasterDisp, 0x39); } else if ((limbIndex < 7) || (limbIndex >= 9)) { RCP_SetupDL(&gMasterDisp, 0x3D); @@ -4005,13 +4001,12 @@ void Aquas_801B638C(Actor* actor) { func_effect_80081A8C(actor->obj.pos.x + RAND_FLOAT(i * 15.0f), actor->obj.pos.y + RAND_FLOAT(i * 3.0f), actor->obj.pos.z + RAND_FLOAT(i * 5.0f), 1.0f + RAND_FLOAT(1.0f), 7); } - actor->itemDrop = DROP_SILVER_RING_50p; if (actor->iwork[16] != 0) { actor->itemDrop = DROP_GOLD_RING_1; } - func_enmy_80066254(actor); + Actor_Despawn(actor); Object_Kill(&actor->obj, actor->sfxSource); AUDIO_PLAY_SFX(0x1903001D, actor->sfxSource, 4); func_effect_8007A6F0(&actor->obj.pos, 0x29038090); @@ -4068,7 +4063,7 @@ void Aquas_801B638C(Actor* actor) { Object_Kill(&actor->obj, actor->sfxSource); } } else { - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { for (i = 0, var_v0 = gActors; i < 60; i++, var_v0++) { if ((var_v0->obj.status == OBJ_ACTIVE) && (var_v0->obj.id == OBJ_ACTOR_261) && (var_v0->state == 1) && @@ -4180,7 +4175,7 @@ void Aquas_801B6FF8(Actor* actor) { if (actor->health == -100) { actor->itemDrop = DROP_SILVER_RING_50p; - func_enmy_80066254(actor); + Actor_Despawn(actor); for (i = 0; i < 15; i++) { Aquas_801A9448(&actor->vwork[i], &actor->vwork[15 + i], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(5.0f), RAND_FLOAT_CENTERED(10.0f), 51, actor->scale, 200, i); @@ -4247,8 +4242,7 @@ void Aquas_801B6FF8(Actor* actor) { actor->vel.z = sp90.z; break; } - - if (!(gGameFrameCount & 3)) { + if (((gGameFrameCount % 4) == 0)) { for (i = 0; i < 3; i++) { func_effect_80081A8C(actor->obj.pos.x + RAND_FLOAT_CENTERED(70.0f), actor->obj.pos.y + RAND_FLOAT_CENTERED(70.0f), @@ -4365,7 +4359,7 @@ void Aquas_801B7A24(Actor* actor) { Vec3f sp30[30]; RCP_SetupDL(&gMasterDisp, 0x39); - if (actor->timer_0C6 & 1) { + if ((actor->timer_0C6 % 2) != 0) { RCP_SetupDL(&gMasterDisp, 0x3D); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } @@ -4432,10 +4426,8 @@ void Aquas_801B7C78(Actor* actor) { func_effect_800815DC(); func_effect_8007D0E0(actor->vwork[7].x, actor->vwork[7].y, actor->vwork[7].z, 5.0f); - actor->itemDrop = DROP_SILVER_RING_25p; - - func_enmy_80066254(actor); + Actor_Despawn(actor); Object_Kill(&actor->obj, actor->sfxSource); func_effect_8007A6F0(&actor->obj.pos, 0x29038090); } @@ -4458,8 +4450,7 @@ void Aquas_801B7C78(Actor* actor) { Math_SmoothStepToF(&actor->fwork[5], 159.0f, 0.1f, 10.0f, 0); Math_SmoothStepToF(&actor->fwork[6], 255.0f, 0.1f, 10.0f, 0); } - - if (((actor->state < 5) || (actor->state == 7)) && (actor->health != 0) && !(gGameFrameCount & 0xF)) { + if (((actor->state < 5) || (actor->state == 7)) && (actor->health != 0) && ((gGameFrameCount % 16) == 0)) { func_effect_8007B8F8(actor->vwork[22].x, gGroundLevel, actor->vwork[22].z, 5.0f); } @@ -4493,8 +4484,7 @@ void Aquas_801B7C78(Actor* actor) { actor->state = 2; } } - - if (!(gGameFrameCount & 3)) { + if (((gGameFrameCount % 4) == 0)) { Aquas_801AC8A8(actor->vwork[7].x + RAND_FLOAT_CENTERED(120.0f), actor->vwork[7].y + RAND_FLOAT_CENTERED(50.0f), actor->vwork[7].z + 100.0f + RAND_FLOAT_CENTERED(100.0f), 1.0f, 0); @@ -4648,8 +4638,7 @@ void Aquas_801B7C78(Actor* actor) { } Math_SmoothStepToAngle(&actor->obj.rot.x, 30.0f, 0.1f, 10.0f, 0); - - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { Aquas_801AC8A8(actor->vwork[7].x + RAND_FLOAT_CENTERED(120.0f), actor->vwork[7].y + RAND_FLOAT_CENTERED(50.0f), actor->vwork[7].z + RAND_FLOAT_CENTERED(100.0f), 2.0f, 0); @@ -4701,11 +4690,10 @@ void Aquas_801B7C78(Actor* actor) { } bool Aquas_801B8C50(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { - Actor* this = (Actor*) thisx; + Actor* this = thisx; RCP_SetupDL(&gMasterDisp, 0x3A); - - if (this->timer_0C6 & 1) { + if ((this->timer_0C6 % 2) != 0) { RCP_SetupDL(&gMasterDisp, 0x22); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } @@ -4839,7 +4827,7 @@ void Aquas_801B91A4(Actor* actor) { if ((actor->health == 0) && (actor->state > 0)) { actor->itemDrop = DROP_NONE; - func_enmy_80066254(actor); + Actor_Despawn(actor); for (i = 0; i < 5; i++) { func_effect_80081A8C(actor->obj.pos.x + RAND_FLOAT(i * 15.0f), actor->obj.pos.y + RAND_FLOAT(i * 3.0f), @@ -4916,11 +4904,11 @@ void Aquas_801B91A4(Actor* actor) { i = 0; if (actor->iwork[1] != 0) { - if (!(actor->unk_0B6 & 7)) { + if ((actor->unk_0B6 % 8) == 0) { i = 1; } } else { - if (!(actor->unk_0B6 & 1)) { + if ((actor->unk_0B6 % 2) == 0) { i = 1; } } @@ -4936,7 +4924,7 @@ void Aquas_801B91A4(Actor* actor) { spC4.x = spC4.y = 0.0f; spC4.z = 70.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &spC4, &spAC); - func_effect_8007F04C(353, actor->vwork[26].x + RAND_FLOAT_CENTERED(200.0f), + func_effect_8007F04C(OBJ_EFFECT_353, actor->vwork[26].x + RAND_FLOAT_CENTERED(200.0f), actor->vwork[26].y + RAND_FLOAT_CENTERED(200.0f), actor->vwork[26].z, spf98, sp94, 0.0f, 0.0f, 0.0f, 0.0f, spAC.x, spAC.y, spAC.z, 1.0f); } @@ -4964,7 +4952,7 @@ void Aquas_801B91A4(Actor* actor) { if (actor->unk_0B6 >= 37) { actor->obj.rot.y += 20.0f; actor->fwork[2] += 20.0f; - if (!(gGameFrameCount & 3)) { + if (((gGameFrameCount % 4) == 0)) { Matrix_RotateY(gCalcMatrix, actor->fwork[2] * M_DTOR, 0); Matrix_RotateX(gCalcMatrix, actor->vwork[27].x * M_DTOR, 1); Matrix_RotateZ(gCalcMatrix, actor->vwork[27].z * M_DTOR, 1); @@ -4972,7 +4960,7 @@ void Aquas_801B91A4(Actor* actor) { actor->vwork[11].y + RAND_FLOAT_CENTERED(50.0f), actor->vwork[11].z + RAND_FLOAT_CENTERED(100.0f), 2.0f, 0); Matrix_MultVec3fNoTranslate(gCalcMatrix, &spDC, &spD0); - func_effect_8007F04C(353, actor->vwork[26].x + spD0.x, actor->vwork[26].y + spD0.y, + func_effect_8007F04C(OBJ_EFFECT_353, actor->vwork[26].x + spD0.x, actor->vwork[26].y + spD0.y, actor->vwork[26].z + spD0.z, actor->vwork[27].x, actor->fwork[2], actor->vwork[27].z, 0.0f, 0.0f, 0.0f, spD0.x, spD0.y, spD0.z, 1.0f); } @@ -5053,8 +5041,7 @@ void Aquas_801B9DB0(s32 limbIndex, Vec3f* rot, void* thisx) { Matrix_MultVec3f(gCalcMatrix, &sp34, &this->vwork[11]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[24]); Matrix_Push(&gCalcMatrix); - - switch (gGameFrameCount & 3) { + switch (gGameFrameCount % 4U) { case 0: break; case 1: @@ -5085,7 +5072,7 @@ void Aquas_801BA108(Actor* actor) { Vec3f sp40[30]; RCP_SetupDL(&gMasterDisp, 0x1D); - if (actor->timer_0C6 & 1) { + if ((actor->timer_0C6 % 2) != 0) { RCP_SetupDL(&gMasterDisp, 0x1E); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } else if (actor->state == 2) { @@ -5159,13 +5146,13 @@ void Aquas_801BA57C(Actor* actor) { actor->scale = 1.0f; actor->gravity = 0.3f; actor->health = 10; - actor->fwork[2] = RAND_FLOAT_CENTERED((actor->index & 7) + 3.0f); + actor->fwork[2] = RAND_FLOAT_CENTERED((s32) (actor->index % 8U) + 3.0f); } else { actor->info.bonus = 0; actor->scale = 0.5f; actor->gravity = 0.1f; actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_AQ_603151C); - actor->fwork[2] = RAND_FLOAT_CENTERED((actor->index & 3) + 1.0f); + actor->fwork[2] = RAND_FLOAT_CENTERED((s32) (actor->index % 4U) + 1.0f); } actor->fwork[1] = RAND_FLOAT(50.0f); } @@ -5174,13 +5161,13 @@ void Aquas_801BA57C(Actor* actor) { void Aquas_801BA6A4(Actor* actor) { s32 i; s32 var_s2; - Actor* var_s0; + Actor* actor265; switch (actor->state) { case 0: if (actor->iwork[1] == 0) { actor->obj.rot.z += actor->fwork[2]; - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { Aquas_801AC8A8(actor->obj.pos.x + RAND_FLOAT_CENTERED(120.0f), actor->obj.pos.y + RAND_FLOAT_CENTERED(50.0f), actor->obj.pos.z + RAND_FLOAT_CENTERED(100.0f), 2.0f, 0); @@ -5205,8 +5192,7 @@ void Aquas_801BA6A4(Actor* actor) { case 1: if (actor->iwork[1] == 0) { actor->obj.rot.z += actor->fwork[2]; - - if (!(gGameFrameCount & 3)) { + if (((gGameFrameCount % 4) == 0)) { Aquas_801AC8A8(actor->obj.pos.x + RAND_FLOAT_CENTERED(70.0f), actor->obj.pos.y + RAND_FLOAT_CENTERED(50.0f), actor->obj.pos.z + RAND_FLOAT_CENTERED(50.0f), 1.0f, 0); @@ -5237,30 +5223,27 @@ void Aquas_801BA6A4(Actor* actor) { actor->health -= actor->damage; if (actor->health <= 0) { actor->health = actor->itemDrop = 0; - func_enmy_80066254(actor); + Actor_Despawn(actor); if (actor->state == 0) { - for (i = 0, var_s2 = 0, var_s0 = gActors; i < 60 && var_s2 < 4; i++, var_s0++) { - if (var_s0->obj.status == OBJ_FREE) { - Actor_Initialize(var_s0); - var_s0->obj.status = OBJ_INIT; - var_s0->obj.id = OBJ_ACTOR_265; + for (i = 0, var_s2 = 0, actor265 = gActors; i < 60 && var_s2 < 4; i++, actor265++) { + if (actor265->obj.status == OBJ_FREE) { + Actor_Initialize(actor265); + actor265->obj.status = OBJ_INIT; + actor265->obj.id = OBJ_ACTOR_265; + actor265->obj.pos.x = actor->obj.pos.x; + actor265->obj.pos.y = actor->obj.pos.y + 20.0f; + actor265->obj.pos.z = actor->obj.pos.z; + actor265->vel.x = RAND_FLOAT_CENTERED(50.0f); + actor265->vel.y = RAND_FLOAT(5.0f); + actor265->vel.z = RAND_FLOAT_CENTERED(50.0f); + actor265->state = 1; - var_s0->obj.pos.x = actor->obj.pos.x; - var_s0->obj.pos.y = actor->obj.pos.y + 20.0f; - var_s0->obj.pos.z = actor->obj.pos.z; - - var_s0->vel.x = RAND_FLOAT_CENTERED(50.0f); - var_s0->vel.y = RAND_FLOAT(5.0f); - var_s0->vel.z = RAND_FLOAT_CENTERED(50.0f); - - var_s0->state = 1; - - Object_SetInfo(&var_s0->info, var_s0->obj.id); + Object_SetInfo(&actor265->info, actor265->obj.id); var_s2++; } } if (i >= 60) { - var_s0->obj.status = OBJ_FREE; + actor265->obj.status = OBJ_FREE; } } else { for (i = 0; i < 4; i++) { @@ -5386,12 +5369,12 @@ void Aquas_801BB26C(Actor* actor) { s32 sp60; Vec3f sp54; Vec3f sp48; - Actor* sp44; - Actor* sp40; + Actor* actor267; + Actor* actor267_2; actor->fwork[1] = RAND_FLOAT(100.0f); actor->timer_0BC = RAND_INT(50.0f); - actor->iwork[3] = RAND_INT(10.0f) & 1; + actor->iwork[3] = RAND_INT(10.0f) % 2U; actor->fwork[11] = actor->fwork[14] = actor->fwork[17] = actor->fwork[12] = actor->fwork[15] = actor->fwork[18] = actor->fwork[13] = actor->fwork[16] = actor->fwork[19] = 1.0f; actor->fwork[2] = 213.0f; @@ -5428,22 +5411,21 @@ void Aquas_801BB26C(Actor* actor) { sp54.z = 0.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48); - - for (sp64 = 0, sp44 = gActors; sp64 < 60; sp64++, sp44++) { - if (sp44->obj.status == OBJ_FREE) { - Actor_Initialize(sp44); - sp44->obj.status = OBJ_INIT; - sp44->obj.id = OBJ_ACTOR_267; - sp44->obj.pos.x = actor->obj.pos.x + sp48.x; - sp44->obj.pos.y = actor->obj.pos.y + sp48.y; - sp44->obj.pos.z = actor->obj.pos.z; - sp44->iwork[0] = actor->index + 1; - sp44->iwork[2] = 1; - sp44->iwork[13] = actor->iwork[13]; - sp44->iwork[18] = actor->iwork[18]; - sp44->iwork[19] = actor->iwork[19]; + for (sp64 = 0, actor267 = gActors; sp64 < 60; sp64++, actor267++) { + if (actor267->obj.status == OBJ_FREE) { + Actor_Initialize(actor267); + actor267->obj.status = OBJ_INIT; + actor267->obj.id = OBJ_ACTOR_267; + actor267->obj.pos.x = actor->obj.pos.x + sp48.x; + actor267->obj.pos.y = actor->obj.pos.y + sp48.y; + actor267->obj.pos.z = actor->obj.pos.z; + actor267->iwork[0] = actor->index + 1; + actor267->iwork[2] = 1; + actor267->iwork[13] = actor->iwork[13]; + actor267->iwork[18] = actor->iwork[18]; + actor267->iwork[19] = actor->iwork[19]; actor->iwork[0] = sp64 + 1; - Object_SetInfo(&sp44->info, sp44->obj.id); + Object_SetInfo(&actor267->info, actor267->obj.id); break; } } @@ -5455,24 +5437,23 @@ void Aquas_801BB26C(Actor* actor) { sp54.z = 0.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48); - - for (sp60 = 0, sp40 = gActors; sp60 < 60; sp60++, sp40++) { - if (sp40->obj.status == OBJ_FREE) { - Actor_Initialize(sp40); - sp40->obj.status = OBJ_INIT; - sp40->obj.id = OBJ_ACTOR_267; - sp40->obj.pos.x = actor->obj.pos.x + sp48.x; - sp40->obj.pos.y = actor->obj.pos.y + sp48.y; - sp40->obj.pos.z = actor->obj.pos.z; - sp40->iwork[0] = actor->index + 1; - sp40->iwork[1] = sp44->index + 1; - sp40->iwork[2] = 2; - sp40->iwork[13] = actor->iwork[13]; - sp40->iwork[18] = actor->iwork[18]; - sp40->iwork[19] = actor->iwork[19]; - sp44->iwork[1] = sp60 + 1; + for (sp60 = 0, actor267_2 = gActors; sp60 < 60; sp60++, actor267_2++) { + if (actor267_2->obj.status == OBJ_FREE) { + Actor_Initialize(actor267_2); + actor267_2->obj.status = OBJ_INIT; + actor267_2->obj.id = OBJ_ACTOR_267; + actor267_2->obj.pos.x = actor->obj.pos.x + sp48.x; + actor267_2->obj.pos.y = actor->obj.pos.y + sp48.y; + actor267_2->obj.pos.z = actor->obj.pos.z; + actor267_2->iwork[0] = actor->index + 1; + actor267_2->iwork[1] = actor267->index + 1; + actor267_2->iwork[2] = 2; + actor267_2->iwork[13] = actor->iwork[13]; + actor267_2->iwork[18] = actor->iwork[18]; + actor267_2->iwork[19] = actor->iwork[19]; + actor267->iwork[1] = sp60 + 1; actor->iwork[1] = sp60 + 1; - Object_SetInfo(&sp40->info, sp40->obj.id); + Object_SetInfo(&actor267_2->info, actor267_2->obj.id); break; } } @@ -5497,7 +5478,7 @@ void Aquas_801BB79C(Actor* actor) { Vec3f sp74; Actor* sp70; Actor* sp6C; - Object_80* sp68; + Object_80* actor122; if (actor->timer_0C0 == 0) { switch (actor->iwork[18]) { @@ -5505,7 +5486,7 @@ void Aquas_801BB79C(Actor* actor) { case 2: i = actor->iwork[19] + (actor->iwork[2] * 2); actor->vel.x = D_i3_801C04A0[i]; - if (!(gGameFrameCount & 3)) { + if (((gGameFrameCount % 4) == 0)) { if (fabsf(actor->fwork[22] - actor->obj.pos.x) >= 100.0f) { if (actor->iwork[20] == 0) { actor->iwork[19]++; @@ -5513,9 +5494,10 @@ void Aquas_801BB79C(Actor* actor) { actor->iwork[20] = 50; } } else { - for (i = 0, sp68 = gObjects80; i < 50; i++, sp68++) { - if ((sp68->obj.status == OBJ_ACTIVE) && (sp68->obj.id == OBJ_80_122) && - func_enmy_80062DBC(&actor->obj.pos, sp68->info.hitbox, &sp68->obj, 0.0f, 0.0f, 0.0f) && + for (i = 0, actor122 = gObjects80; i < 50; i++, actor122++) { + if ((actor122->obj.status == OBJ_ACTIVE) && (actor122->obj.id == OBJ_80_122) && + func_enmy_80062DBC(&actor->obj.pos, actor122->info.hitbox, &actor122->obj, 0.0f, 0.0f, + 0.0f) && (actor->iwork[20] == 0)) { actor->iwork[20] = 50; actor->iwork[19]++; @@ -5530,7 +5512,7 @@ void Aquas_801BB79C(Actor* actor) { case 4: i = actor->iwork[19] + (actor->iwork[2] * 2); actor->vel.y = D_i3_801C04A0[i]; - if (!(gGameFrameCount & 3)) { + if (((gGameFrameCount % 4) == 0)) { if (fabsf(actor->fwork[23] - actor->obj.pos.y) >= 100.0f) { if (actor->iwork[20] == 0) { actor->iwork[19]++; @@ -5538,9 +5520,10 @@ void Aquas_801BB79C(Actor* actor) { actor->iwork[20] = 50; } } else { - for (i = 0, sp68 = gObjects80; i < 50; i++, sp68++) { - if ((sp68->obj.status == OBJ_ACTIVE) && (sp68->obj.id == OBJ_80_122) && - (func_enmy_80062DBC(&actor->obj.pos, sp68->info.hitbox, &sp68->obj, 0.0f, 0.0f, 0.0f) || + for (i = 0, actor122 = gObjects80; i < 50; i++, actor122++) { + if ((actor122->obj.status == OBJ_ACTIVE) && (actor122->obj.id == OBJ_80_122) && + (func_enmy_80062DBC(&actor->obj.pos, actor122->info.hitbox, &actor122->obj, 0.0f, 0.0f, + 0.0f) || (actor->obj.pos.y < (gGroundLevel + 30.0f))) && (actor->iwork[20] == 0)) { actor->iwork[20] = 50; @@ -5578,8 +5561,7 @@ void Aquas_801BB79C(Actor* actor) { sp70->timer_0C6 = actor->timer_0C6; } } - - if (!(gGameFrameCount & 7)) { + if (((gGameFrameCount % 8) == 0)) { func_effect_8007A6F0(&sp70->obj.pos, 0x3100208E); } @@ -5613,8 +5595,7 @@ void Aquas_801BB79C(Actor* actor) { sp6C->timer_0C6 = actor->timer_0C6; } } - - if (!(gGameFrameCount & 3)) { + if (((gGameFrameCount % 4) == 0)) { func_effect_8007A6F0(&sp6C->obj.pos, 0x3100208E); } @@ -5649,16 +5630,14 @@ void Aquas_801BB79C(Actor* actor) { sp70->timer_0C6 = actor->timer_0C6; } } - - if (!(gGameFrameCount & 0xF)) { + if (((gGameFrameCount % 16) == 0)) { func_effect_8007A6F0(&sp70->obj.pos, 0x3100208E); } Aquas_801A92EC(actor, sp70->obj.pos.x, sp70->obj.pos.y, sp70->obj.pos.z, actor->iwork[13] + 2, i); } } - - if (!(gGameFrameCount & 3)) { + if (((gGameFrameCount % 4) == 0)) { func_effect_8007C120(actor->obj.pos.x + RAND_FLOAT_CENTERED(100.0f), actor->obj.pos.y + RAND_FLOAT_CENTERED(100.0f), actor->obj.pos.z + RAND_FLOAT_CENTERED(50.0f), actor->vel.x, actor->vel.y, actor->vel.z, @@ -5794,8 +5773,7 @@ bool Aquas_801BC530(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th Actor* this = (Actor*) thisx; RCP_SetupDL(&gMasterDisp, 0x29); - - if (!(this->timer_0C6 & 1)) { + if ((this->timer_0C6 % 2) == 0) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 191, 255, 223, (s32) this->fwork[1]); } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255); @@ -5879,7 +5857,7 @@ void Aquas_801BC9A0(Actor* actor) { s32 i; Vec3f spA4; Vec3f sp98; - Actor* var_s0; + Actor* actor269; switch (actor->state) { case 0: @@ -5939,30 +5917,29 @@ void Aquas_801BC9A0(Actor* actor) { } for (i = 0; i < 2; i++) { - for (j = 0, var_s0 = gActors; j < 60; j++, var_s0++) { - if (var_s0->obj.status == OBJ_FREE) { - Actor_Initialize(var_s0); - var_s0->obj.status = OBJ_INIT; - var_s0->obj.id = OBJ_ACTOR_269; - var_s0->obj.pos.x = actor->vwork[i].x; - var_s0->obj.pos.y = actor->vwork[i].y; - var_s0->obj.pos.z = actor->vwork[i].z; - var_s0->iwork[0] = i + 1; - Object_SetInfo(&var_s0->info, var_s0->obj.id); - + for (j = 0, actor269 = gActors; j < 60; j++, actor269++) { + if (actor269->obj.status == OBJ_FREE) { + Actor_Initialize(actor269); + actor269->obj.status = OBJ_INIT; + actor269->obj.id = OBJ_ACTOR_269; + actor269->obj.pos.x = actor->vwork[i].x; + actor269->obj.pos.y = actor->vwork[i].y; + actor269->obj.pos.z = actor->vwork[i].z; + actor269->iwork[0] = i + 1; + Object_SetInfo(&actor269->info, actor269->obj.id); if (i == 0) { - var_s0->fwork[0] = RAND_FLOAT(360.0f); - Matrix_RotateY(gCalcMatrix, var_s0->fwork[0] * M_DTOR, 0); + actor269->fwork[0] = RAND_FLOAT(360.0f); + Matrix_RotateY(gCalcMatrix, actor269->fwork[0] * M_DTOR, 0); spA4.x = spA4.y = spA4.z = 5.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &spA4, &sp98); - var_s0->vel.x = sp98.x; - var_s0->vel.z = sp98.z; - var_s0->gravity = 0.4f; - var_s0->state = 5; - var_s0->info.hitbox = SEGMENTED_TO_VIRTUAL(D_AQ_6030D3C); + actor269->vel.x = sp98.x; + actor269->vel.z = sp98.z; + actor269->gravity = 0.4f; + actor269->state = 5; + actor269->info.hitbox = SEGMENTED_TO_VIRTUAL(D_AQ_6030D3C); } else { - var_s0->state = 2; - var_s0->info.hitbox = SEGMENTED_TO_VIRTUAL(D_AQ_6030D58); + actor269->state = 2; + actor269->info.hitbox = SEGMENTED_TO_VIRTUAL(D_AQ_6030D58); } break; } @@ -5996,7 +5973,7 @@ void Aquas_801BC9A0(Actor* actor) { actor->obj.pos.y = actor->vwork[4].y; actor->obj.pos.z = actor->vwork[4].z; actor->itemDrop = D_i3_801C04C4[actor->iwork[1]]; - func_enmy_80066254(actor); + Actor_Despawn(actor); Object_Kill(&actor->obj, actor->sfxSource); func_effect_8007A6F0(&actor->obj.pos, 0x19021078); } @@ -6005,8 +5982,7 @@ void Aquas_801BC9A0(Actor* actor) { case 5: Math_SmoothStepToAngle(&actor->obj.rot.y, actor->fwork[0], 0.1f, 10.0f, 0.0001f); Math_SmoothStepToAngle(&actor->obj.rot.x, 90.0f, 0.1f, 1.0f, 0.0001f); - - if (!(gGameFrameCount & 1) && (actor->iwork[2] == 0)) { + if (((gGameFrameCount % 2) == 0) && (actor->iwork[2] == 0)) { Aquas_801AC8A8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f), actor->obj.pos.y + RAND_RANGE(-45.0f, 105.0f), actor->obj.pos.z + RAND_FLOAT_CENTERED(200.0f), 6.0f, 2); @@ -6084,8 +6060,7 @@ void Aquas_801BD3B0(Actor* actor, f32 x, f32 y, f32 z) { Math_SmoothStepToAngle(&actor->obj.rot.y, actor->fwork[6], 0.1f, 100.0f, 0.00001f); Math_SmoothStepToAngle(&actor->obj.rot.x, actor->fwork[7], 0.1f, 100.0f, 0.00001f); - - if (!(gGameFrameCount & 3)) { + if (((gGameFrameCount % 4) == 0)) { actor->fwork[6] = Math_RadToDeg(Math_Atan2F(x, z)); temp = sqrtf(SQ(x) + SQ(z)); actor->fwork[7] = Math_RadToDeg(-Math_Atan2F(y, temp)); @@ -6114,7 +6089,7 @@ void Aquas_801BD54C(Actor* actor) { f32 sp5C; f32 sp58; f32 sp54; - Actor* var_s0; + Actor* actor268; if (actor->state == 2) { var_fs0 = (actor->iwork[3] != 0) ? 2800.0f : 9000.0f; @@ -6141,26 +6116,27 @@ void Aquas_801BD54C(Actor* actor) { case 1: sp64 = actor->index; for (sp68 = 0; sp68 < 15; sp68++) { - for (sp6C = 0, var_s0 = gActors; sp6C < 60; sp6C++, var_s0++) { - if (var_s0->obj.status == OBJ_FREE) { - Actor_Initialize(var_s0); - var_s0->obj.status = OBJ_INIT; - var_s0->obj.id = OBJ_ACTOR_268; - var_s0->iwork[4] = sp64; - var_s0->iwork[0] = sp68 + 1; - var_s0->iwork[3] = actor->iwork[3]; + for (sp6C = 0, actor268 = gActors; sp6C < 60; sp6C++, actor268++) { + if (actor268->obj.status == OBJ_FREE) { + Actor_Initialize(actor268); + actor268->obj.status = OBJ_INIT; + actor268->obj.id = OBJ_ACTOR_268; + actor268->iwork[4] = sp64; + actor268->iwork[0] = sp68 + 1; + actor268->iwork[3] = actor->iwork[3]; sp64 = sp6C; var_fs0 = 100.0f; if (Rand_ZeroOne() < 0.5f) { var_fs0 = -100.0f; } - var_s0->obj.pos.x = actor->obj.pos.x + ((sp68 & 7) * var_fs0) + RAND_FLOAT(50.0f); - var_s0->obj.pos.y = actor->obj.pos.y + ((sp68 & 7) * (var_fs0 / 2.0f)) + RAND_FLOAT(30.0f); - var_s0->obj.pos.z = actor->obj.pos.z + (sp68 * 20.0f) + RAND_FLOAT(-18.0f); - var_s0->unk_0B6 = RAND_FLOAT(20.0f); - var_s0->fwork[5] = actor->fwork[5]; - var_s0->state = 2; - Object_SetInfo(&var_s0->info, var_s0->obj.id); + actor268->obj.pos.x = actor->obj.pos.x + ((s32) (sp68 % 8U) * var_fs0) + RAND_FLOAT(50.0f); + actor268->obj.pos.y = + actor->obj.pos.y + ((s32) (sp68 % 8U) * (var_fs0 / 2.0f)) + RAND_FLOAT(30.0f); + actor268->obj.pos.z = actor->obj.pos.z + (sp68 * 20.0f) + RAND_FLOAT(-18.0f); + actor268->unk_0B6 = RAND_FLOAT(20.0f); + actor268->fwork[5] = actor->fwork[5]; + actor268->state = 2; + Object_SetInfo(&actor268->info, actor268->obj.id); break; } } @@ -6210,12 +6186,12 @@ void Aquas_801BD54C(Actor* actor) { actor->iwork[2] = 1; } } else if (D_i3_801C4190[5] == 0) { - var_s0 = &gActors[actor->iwork[4]]; - if ((actor->iwork[0] - 1 == var_s0->iwork[0]) && (var_s0->obj.status != OBJ_FREE) && - (var_s0->obj.id == OBJ_ACTOR_268)) { - sp5C = var_s0->obj.pos.x + (actor->fwork[1] / 2.0f) - actor->obj.pos.x; - sp58 = var_s0->obj.pos.y + (actor->fwork[2] / 2.0f) - actor->obj.pos.y; - sp54 = var_s0->obj.pos.z - actor->obj.pos.z; + actor268 = &gActors[actor->iwork[4]]; + if ((actor->iwork[0] - 1 == actor268->iwork[0]) && (actor268->obj.status != OBJ_FREE) && + (actor268->obj.id == OBJ_ACTOR_268)) { + sp5C = actor268->obj.pos.x + (actor->fwork[1] / 2.0f) - actor->obj.pos.x; + sp58 = actor268->obj.pos.y + (actor->fwork[2] / 2.0f) - actor->obj.pos.y; + sp54 = actor268->obj.pos.z - actor->obj.pos.z; } else { actor->iwork[0]--; sp5C = gPlayer[0].pos.x + actor->fwork[1] - actor->obj.pos.x; @@ -6233,8 +6209,9 @@ void Aquas_801BD54C(Actor* actor) { var_fs0 = -50.0f; } - sp5C = D_i3_801C41B8[21] + ((sp68 & 7) * var_fs0) + RAND_FLOAT(50.0f) - actor->obj.pos.x; - sp58 = D_i3_801C41B8[22] + ((sp68 & 7) * (var_fs0 / 2.0f)) + RAND_FLOAT(50.0f) - actor->obj.pos.y; + sp5C = D_i3_801C41B8[21] + ((s32) (sp68 % 8U) * var_fs0) + RAND_FLOAT(50.0f) - actor->obj.pos.x; + sp58 = D_i3_801C41B8[22] + ((s32) (sp68 % 8U) * (var_fs0 / 2.0f)) + RAND_FLOAT(50.0f) - + actor->obj.pos.y; sp54 = D_i3_801C41B8[23] + RAND_FLOAT(50.0f) - actor->obj.pos.z; actor->iwork[2] = 1; } @@ -6321,25 +6298,23 @@ f32 D_i3_801C0828[51] = { }; void Aquas_801BDF14(void) { - Actor* var_s0 = &gActors[1]; + Actor* actor = &gActors[1]; s32 i; - for (i = 0; i < 50; i++, var_s0++) { - Actor_Initialize(var_s0); - var_s0->obj.status = OBJ_INIT; - var_s0->obj.id = OBJ_ACTOR_195; - - var_s0->obj.pos.x = D_i3_801C0504[i].x; - var_s0->obj.pos.y = D_i3_801C0504[i].y; - var_s0->obj.pos.z = D_i3_801C0504[i].z; - - var_s0->unk_0F4.y = D_i3_801C075C[i]; - var_s0->unk_0B6 = 41; - var_s0->iwork[0] = RAND_INT(20.0f); - var_s0->iwork[2] = i; - var_s0->timer_0BC = 231; - var_s0->fwork[0] = 4.5f; - Object_SetInfo(&var_s0->info, var_s0->obj.id); + for (i = 0; i < 50; i++, actor++) { + Actor_Initialize(actor); + actor->obj.status = OBJ_INIT; + actor->obj.id = OBJ_ACTOR_195; + actor->obj.pos.x = D_i3_801C0504[i].x; + actor->obj.pos.y = D_i3_801C0504[i].y; + actor->obj.pos.z = D_i3_801C0504[i].z; + actor->unk_0F4.y = D_i3_801C075C[i]; + actor->unk_0B6 = 41; + actor->iwork[0] = RAND_INT(20.0f); + actor->iwork[2] = i; + actor->timer_0BC = 231; + actor->fwork[0] = 4.5f; + Object_SetInfo(&actor->info, actor->obj.id); } } @@ -6402,7 +6377,8 @@ void Aquas_801BE274(Actor* actor, f32 yRot, f32 xRot) { sp40.z = 80.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp40, &sp58); - func_effect_8007F04C(355, sp64.x, sp64.y, sp64.z, xRot, yRot, 0.0f, 0.0f, 0.0f, 0.0f, sp58.x, sp58.y, sp58.z, 1.0f); + func_effect_8007F04C(OBJ_EFFECT_355, sp64.x, sp64.y, sp64.z, xRot, yRot, 0.0f, 0.0f, 0.0f, 0.0f, sp58.x, sp58.y, + sp58.z, 1.0f); } // OBJ_ACTOR_270 action @@ -6446,7 +6422,7 @@ void Aquas_801BE3F8(Actor* actor) { if ((actor->unk_0B6 == 18) && (actor->health != 0)) { actor->unk_0B6 = 17; if ((fabsf(actor->obj.pos.z - gPlayer[0].unk_138) > 1000.0f) && (actor->timer_0BC < 20) && - !(actor->timer_0BC & 3)) { + ((actor->timer_0BC & 3) == 0)) { sp68 = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(200.0f) - actor->obj.pos.x; sp64 = gPlayer[0].pos.y + RAND_FLOAT_CENTERED(200.0f) - actor->obj.pos.y; sp60 = gPlayer[0].unk_138 - actor->obj.pos.z; @@ -6477,8 +6453,7 @@ void Aquas_801BE3F8(Actor* actor) { actor->health -= actor->damage; if (actor->health <= 0) { actor->health = actor->itemDrop = 0; - - func_enmy_80066254(actor); + Actor_Despawn(actor); for (i = 0; i < 10; i++) { Aquas_801AC8A8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f), diff --git a/src/overlays/ovl_i3/fox_so.c b/src/overlays/ovl_i3/fox_so.c index f1f1ba0b..8fb740ad 100644 --- a/src/overlays/ovl_i3/fox_so.c +++ b/src/overlays/ovl_i3/fox_so.c @@ -454,7 +454,7 @@ void Solar_8019F20C(Actor* actor) { actor->itemDrop = DROP_SILVER_STAR; } } - func_enmy_80066254(actor); + Actor_Despawn(actor); for (i = 0; i < 3; i++) { func_effect_800794CC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 0.3f); } @@ -468,7 +468,7 @@ void Solar_8019F20C(Actor* actor) { } actor->obj.rot.y = RAD_TO_DEG(-gPlayer[0].unk_058); actor->obj.rot.x = RAD_TO_DEG(gPlayer[0].unk_05C); - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { actor->unk_0B6++; if (actor->unk_0B6 >= 3) { actor->unk_0B6 = 0; @@ -487,7 +487,7 @@ void Solar_8019F7AC(Actor* actor) { gSPDisplayList(gMasterDisp++, D_SO_6017370); break; case OBJ_ACTOR_276: - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { RCP_SetupDL(&gMasterDisp, 0x29); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255); } @@ -684,7 +684,7 @@ void Solar_801A0120(Effect* effect) { sp3C.z = -effect->scale1; Matrix_MultVec3f(gCalcMatrix, &sp3C, &effect->obj.pos); effect->unk_60.x += 5.0f; - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { effect->unk_4C++; if (effect->unk_4C > 2) { effect->unk_4C = 0; @@ -711,7 +711,7 @@ void Solar_801A0120(Effect* effect) { } else { sp54 = -50.0f; } - if (effect->index & 1) { + if ((effect->index % 2) != 0) { sp58 = 100.0f; } else { sp58 = -100.0f; @@ -777,7 +777,7 @@ void Solar_801A0120(Effect* effect) { effect->unk_48 = 0; } if ((sp48 != effect->unk_48) && (effect->unk_48 != 0)) { - if (effect->index & 1) { + if ((effect->index % 2) != 0) { sp58 = 100.0f; } else { sp58 = -100.0f; @@ -985,8 +985,8 @@ void Solar_801A10F4(Player* player) { player->unk_034 = 0.0f; player->unk_0D0 = 0.0f; - D_ctx_80178340 = 255; - D_ctx_80178358 = 0; + gFillScreenAlpha = 255; + gFillScreenAlphaTarget = 0; Solar_801A0DF8(-750.0f, -2600.0f, 300.0f, 2, 1.0f); AUDIO_PLAY_SFX(0x3140807E, player->sfxSource, 0); break; @@ -1008,16 +1008,16 @@ void Solar_801A10F4(Player* player) { Object_Kill(&gActors[6].obj, gActors[6].sfxSource); } if (gCsFrameCount < 3) { - D_ctx_80178340 = 255; + gFillScreenAlpha = 255; } if (gCsFrameCount == 370) { - D_ctx_80178358 = 255; - D_ctx_80178348 = 255; - D_ctx_80178350 = 255; - D_ctx_80178354 = 255; - D_ctx_8017835C = 8; + gFillScreenAlphaTarget = 255; + gFillScreenRed = 255; + gFillScreenGreen = 255; + gFillScreenBlue = 255; + gFillScreenAlphaStep = 8; } - if (!(gGameFrameCount & 7)) { + if (((gGameFrameCount % 8) == 0)) { Solar_8019E8B8(RAND_FLOAT_CENTERED(6000.0f), RAND_FLOAT_CENTERED(5.0f) - 90.0f, RAND_FLOAT(2000.0f) - 6000.0f + D_ctx_80177D20, RAND_FLOAT(20.0f) + 20.0f); } @@ -1057,8 +1057,8 @@ void Solar_801A10F4(Player* player) { break; case 2: D_ctx_80177CE8 += 60.0f; - D_ctx_80178358 = 0; - D_ctx_8017835C = 8; + gFillScreenAlphaTarget = 0; + gFillScreenAlphaStep = 8; Math_SmoothStepToF(D_ctx_80177A48, 0.02f, 1.0f, 0.0000003f, 0.0f); if (gCsFrameCount == 525) { Radio_PlayMessage(gMsg_ID_10010, RCID_FOX); @@ -1078,7 +1078,7 @@ void Solar_801A10F4(Player* player) { break; case 3: D_ctx_80177CE8 += 60.0f; - if (!(gGameFrameCount & 3)) { + if (((gGameFrameCount % 4) == 0)) { Solar_8019E8B8(RAND_FLOAT_CENTERED(6000.0f), -400.0f - ((player->camEye.y - 1380.0f) * 0.3f), RAND_FLOAT_CENTERED(2000.0f) + 500.0f + D_ctx_80177D20, RAND_FLOAT(20.0f) + 20.0f); } @@ -1105,16 +1105,16 @@ void Solar_801A10F4(Player* player) { D_ctx_801779A8[gMainController] = 60.0f; player->unk_190 = 2.0f; if (player->timer_1F8 == 0) { - D_ctx_80178358 = 255; - D_ctx_8017835C = 24; - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255; + gFillScreenAlphaTarget = 255; + gFillScreenAlphaStep = 24; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; } - if (D_ctx_80178340 == 255) { + if (gFillScreenAlpha == 255) { AUDIO_PLAY_BGM(SEQ_ID_SOLAR | SEQ_FLAG); player->pos.z = 0.0f; player->unk_0D0 = D_play_80161A54; func_play_800A6148(); - D_ctx_80177838 = 50; + gLevelStatusScreenTimer = 50; player->state_1C8 = PLAYERSTATE_1C8_3; player->unk_1D0 = 0; player->pos.y = 350.0f; @@ -1131,7 +1131,7 @@ void Solar_801A10F4(Player* player) { func_8001D1C8(0xFF, 3); AUDIO_PLAY_SFX(0x4100C023, gDefaultSfxSource, 4); D_ctx_80178488 = 1; - D_ctx_80178358 = 0; + gFillScreenAlphaTarget = 0; player->timer_1F8 = 15; gPlayer[0].shields = 255; } @@ -1273,7 +1273,7 @@ void Solar_801A1F80(Boss* bossSO) { Solar_801A239C(bossSO); bossSO->fwork[SO_FWK_0] = 0.01f; } - if ((gBossFrameCount == 100) && (gTeamShields[3] != 0)) { + if ((gBossFrameCount == 100) && (gTeamShields[TEAM_ID_PEPPY] != 0)) { Radio_PlayMessage(gMsg_ID_10300, RCID_PEPPY); } } @@ -1573,13 +1573,13 @@ void Solar_801A3128(Boss* bossSO) { D_80137E84[gMainController] = 1; D_Timer_80177BD0[gMainController] = 70; D_i3_801C2740[2]++; - if (D_i3_801C2740[2] & 1) { + if ((D_i3_801C2740[2] % 2) != 0) { if (D_i3_801C2740[2] & 2) { - if (gTeamShields[3] > 0) { + if (gTeamShields[TEAM_ID_PEPPY] > 0) { Radio_PlayMessage(gMsg_ID_20317, RCID_PEPPY); } } else { - if (gTeamShields[1] > 0) { + if (gTeamShields[TEAM_ID_FALCO] > 0) { Radio_PlayMessage(gMsg_ID_20271, RCID_FALCO); } } @@ -1598,7 +1598,7 @@ void Solar_801A3128(Boss* bossSO) { if (bossSO->swork[SO_SWK_11] == 150) { Solar_801A239C(bossSO); bossSO->fwork[SO_FWK_0] = 0.01f; - if ((Rand_ZeroOne() >= 0.4f) && (gTeamShields[3] > 0) && (bossSO->swork[SO_SWK_2] != 0) && + if ((Rand_ZeroOne() >= 0.4f) && (gTeamShields[TEAM_ID_PEPPY] > 0) && (bossSO->swork[SO_SWK_2] != 0) && (bossSO->swork[SO_SWK_3] != 0)) { Radio_PlayMessage(gMsg_ID_10320, RCID_PEPPY); } @@ -1702,7 +1702,7 @@ void Solar_801A3510(Boss* bossSO) { if (bossSO->timer_050 != 0) { bossSO->unk_04C = 65; } - if ((bossSO->unk_04C == 65) && !(gGameFrameCount & 1)) { + if ((bossSO->unk_04C == 65) && ((gGameFrameCount % 2) == 0)) { Solar_8019FFC0(bossSO, bossSO->fwork[SO_FWK_4], bossSO->fwork[SO_FWK_5] - 100.0f, bossSO->fwork[SO_FWK_6] + 600.0f, (bossSO->timer_050 * 0.2f) + 4.0f, 0); Solar_801A1EB0(bossSO, bossSO->fwork[SO_FWK_4], 25.0f, bossSO->fwork[SO_FWK_5] - 100.0f, @@ -1725,7 +1725,7 @@ void Solar_801A3510(Boss* bossSO) { if (bossSO->timer_050 != 0) { bossSO->unk_04C = 66; } - if ((bossSO->unk_04C == 66) && !(gGameFrameCount & 1)) { + if ((bossSO->unk_04C == 66) && ((gGameFrameCount % 2) == 0)) { Solar_8019FFC0(bossSO, bossSO->fwork[SO_FWK_4] + 125.0f, bossSO->fwork[SO_FWK_5] - 100.0f, bossSO->fwork[SO_FWK_6] + 600.0f, (bossSO->timer_050 * 0.2f) + 4.0f, 1); Solar_8019FFC0(bossSO, bossSO->fwork[SO_FWK_4] - 125.0f, bossSO->fwork[SO_FWK_5] - 100.0f, @@ -1802,12 +1802,12 @@ void Solar_801A3C4C(Boss* bossSO) { bossSO->state = 0; bossSO->swork[SO_SWK_1] = 1; bossSO->fwork[SO_FWK_0] = 0.01f; - bossSO->info.hitbox = SEGMENTED_TO_VIRTUAL(D_edata_800CBF34); + bossSO->info.hitbox = SEGMENTED_TO_VIRTUAL(gHitboxNone); bossSO->timer_058 = 20000; D_ctx_8017796C = -1; - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = D_ctx_80178340 = 255; - D_ctx_80178358 = 0; - D_ctx_8017835C = 255; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 255; + gFillScreenAlphaTarget = 0; + gFillScreenAlphaStep = 255; gCsFrameCount = 0; D_80137E84[gMainController] = 1; D_Timer_80177BD0[gMainController] = 10; @@ -1881,12 +1881,12 @@ void Solar_801A4214(Boss* bossSO) { 80.0f, 40.0f, 8); D_i3_801C2768[3] = 6.0f; D_i3_801C2768[2] = 100.0f; - D_ctx_80178340 = 255; - D_ctx_80178348 = 255; - D_ctx_80178350 = 255; - D_ctx_80178354 = 255; - D_ctx_80178358 = 0; - D_ctx_8017835C = 4; + gFillScreenAlpha = 255; + gFillScreenRed = 255; + gFillScreenGreen = 255; + gFillScreenBlue = 255; + gFillScreenAlphaTarget = 0; + gFillScreenAlphaStep = 4; func_boss_80042EC0(bossSO); bossSO->swork[SO_SWK_4]++; Math_SmoothStepToF(&bossSO->obj.pos.y, 180.0f, 0.1f, 10.0f, 0.1f); @@ -1981,14 +1981,14 @@ void Solar_801A48B8(Boss* bossSO) { } } } - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = D_ctx_80178340 = 255; - D_ctx_80178358 = 0; - D_ctx_8017835C = 64; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 255; + gFillScreenAlphaTarget = 0; + gFillScreenAlphaStep = 64; bossSO->swork[SO_SWK_0] = 6; bossSO->swork[SO_SWK_1] = 6; bossSO->unk_04C = 0; bossSO->fwork[SO_FWK_0] = 0.01f; - if (((bossSO->swork[SO_SWK_2] > 0) || (bossSO->swork[SO_SWK_3] > 0)) && (gTeamShields[2] > 0)) { + if (((bossSO->swork[SO_SWK_2] > 0) || (bossSO->swork[SO_SWK_3] > 0)) && (gTeamShields[TEAM_ID_SLIPPY] > 0)) { Radio_PlayMessage(gMsg_ID_7086, RCID_SLIPPY); } } @@ -2235,7 +2235,7 @@ void Solar_801A56B8(Boss* bossSO) { if (bossSO->timer_050 != 0) { bossSO->unk_04C = 65; } - if ((bossSO->unk_04C == 65) && !(gGameFrameCount & 3)) { + if ((bossSO->unk_04C == 65) && ((gGameFrameCount % 4) == 0)) { Solar_8019FFC0(bossSO, bossSO->fwork[SO_FWK_4] + 125.0f, bossSO->fwork[SO_FWK_5] - 100.0f, bossSO->fwork[SO_FWK_6] + 600.0f, ((f32) bossSO->timer_050 * 0.2f) + 4.0f, 1); Solar_8019FFC0(bossSO, bossSO->fwork[SO_FWK_4] - 125.0f, bossSO->fwork[SO_FWK_5] - 100.0f, @@ -2297,13 +2297,13 @@ void Solar_801A5B3C(Boss* bossSO) { if (bossSO->swork[SO_SWK_10] != 0) { bossSO->swork[SO_SWK_10]--; } - if ((gBossFrameCount == 200) && (gTeamShields[1] != 0)) { + if ((gBossFrameCount == 200) && (gTeamShields[TEAM_ID_FALCO] != 0)) { Radio_PlayMessage(gMsg_ID_10310, RCID_FALCO); } - if ((gBossFrameCount == 300) && (gTeamShields[2] != 0)) { + if ((gBossFrameCount == 300) && (gTeamShields[TEAM_ID_SLIPPY] != 0)) { Radio_PlayMessage(gMsg_ID_4092, RCID_SLIPPY); } - if ((gBossFrameCount == 450) && (gTeamShields[3] != 0)) { + if ((gBossFrameCount == 450) && (gTeamShields[TEAM_ID_PEPPY] != 0)) { Radio_PlayMessage(gMsg_ID_10320, RCID_PEPPY); } if (bossSO->health != 0) { @@ -2338,7 +2338,7 @@ void Solar_801A5B3C(Boss* bossSO) { bossSO->info.hitbox[39] = bossSO->fwork[SO_FWK_26] - bossSO->obj.pos.y; bossSO->info.hitbox[41] = bossSO->fwork[SO_FWK_25] - bossSO->obj.pos.x; } - if (!(gGameFrameCount & 7) && (bossSO->fwork[SO_FWK_3] < 4800.0f)) { + if (((gGameFrameCount % 8) == 0) && (bossSO->fwork[SO_FWK_3] < 4800.0f)) { if (func_play_800A73E4(&sp1C0, &sp1B8, bossSO->obj.pos.x, bossSO->obj.pos.y - 160.0f, bossSO->obj.pos.z)) { Solar_801A1EB0(bossSO, bossSO->obj.pos.x, 50.0f, sp1C0 - 170.0f, bossSO->obj.pos.z + 100.0f); } @@ -2351,8 +2351,8 @@ void Solar_801A5B3C(Boss* bossSO) { Solar_801A1EB0(bossSO, bossSO->fwork[SO_FWK_13], 50.0f, sp1C0 - 150.0f, bossSO->fwork[SO_FWK_15] + 150.0f); } } - if ((!(gGameFrameCount & 3) || (bossSO->fwork[SO_FWK_31] != 0.0f)) && - ((bossSO->swork[SO_SWK_0] != 7) || !(gGameFrameCount & 1))) { + if ((((gGameFrameCount % 4) == 0) || (bossSO->fwork[SO_FWK_31] != 0.0f)) && + ((bossSO->swork[SO_SWK_0] != 7) || ((gGameFrameCount % 2) == 0))) { if ((bossSO->swork[SO_SWK_2] == 0) && ((bossSO->health > 0) || (bossSO->state < 2))) { Solar_8019FF44(bossSO, bossSO->fwork[SO_FWK_10], bossSO->fwork[SO_FWK_11], bossSO->fwork[SO_FWK_12], bossSO->fwork[SO_FWK_31] - 20.0f, -1.0f); @@ -2511,7 +2511,7 @@ bool Solar_801A68A8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th if (this->swork[SO_SWK_4] != 0) { *dList = NULL; } else if (this->swork[SO_SWK_10] != 0) { - if (this->swork[SO_SWK_10] & 1) { + if ((this->swork[SO_SWK_10] % 2) != 0) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 32, 32, 128, 255); rot->z += 3.0f; } else { @@ -2525,8 +2525,8 @@ bool Solar_801A68A8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th if (this->swork[SO_SWK_2] == 0) { *dList = NULL; } - if ((this->swork[SO_SWK_8] & 1) != 0) { - if ((this->swork[SO_SWK_8] & 1) != 0) { + if ((this->swork[SO_SWK_8] % 2U) != 0) { + if ((this->swork[SO_SWK_8] % 2U) != 0) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 32, 32, 128, 255); rot->y += 3.0f; } else { @@ -2540,8 +2540,8 @@ bool Solar_801A68A8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th if (this->swork[SO_SWK_3] == 0) { *dList = NULL; } - if ((this->swork[SO_SWK_9] & 1) != 0) { - if ((this->swork[SO_SWK_9] & 1) != 0) { + if ((this->swork[SO_SWK_9] % 2U) != 0) { + if ((this->swork[SO_SWK_9] % 2U) != 0) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 32, 32, 128, 255); rot->y += 3.0f; } else { @@ -2776,13 +2776,13 @@ void Solar_801A7750(void) { Rand_SetSeed(1, 29100, 9786); for (i = 0; i < 3; i++, actor++) { - if ((i == 0) && (gTeamShields[3] <= 0.0f)) { + if ((i == 0) && (gTeamShields[TEAM_ID_PEPPY] <= 0.0f)) { continue; } - if ((i == 1) && (gTeamShields[2] <= 0.0f)) { + if ((i == 1) && (gTeamShields[TEAM_ID_SLIPPY] <= 0.0f)) { continue; } - if ((i == 2) && (gTeamShields[1] <= 0.0f)) { + if ((i == 2) && (gTeamShields[TEAM_ID_FALCO] <= 0.0f)) { continue; } @@ -2866,8 +2866,8 @@ void Solar_801A7930(Player* player) { player->unk_0EC += 1.0f; } if (gCsFrameCount >= 230) { - D_ctx_80178358 = 255; - D_ctx_80178348 = D_ctx_80178354 = D_ctx_80178350 = 255; + gFillScreenAlphaTarget = 255; + gFillScreenRed = gFillScreenBlue = gFillScreenGreen = 255; } if (gCsFrameCount == 230) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); @@ -2878,7 +2878,7 @@ void Solar_801A7930(Player* player) { func_play_800A6148(); func_8001CA24(0); Audio_KillSfxBySource(player->sfxSource); - D_ctx_80178340 = 250; + gFillScreenAlpha = 250; player->timer_1F8 = 20; player->unk_0D0 = 0.0f; player->unk_0E4 = 0.0f; @@ -2914,10 +2914,10 @@ void Solar_801A7930(Player* player) { break; case 3: D_ctx_80177CE8 += 60.0f; - D_ctx_80178358 = 0; - D_ctx_8017835C = 4; + gFillScreenAlphaTarget = 0; + gFillScreenAlphaStep = 4; if (D_ctx_801782F8) { - player->wings.unk_30 = (gGameFrameCount & 1) * 5.0f; + player->wings.unk_30 = (s32) (gGameFrameCount % 2U) * 5.0f; } switch (gCsFrameCount) { case 450: @@ -2974,8 +2974,8 @@ void Solar_801A7930(Player* player) { break; case 4: D_ctx_80177CE8 += 60.0f; - D_ctx_80178358 = 0; - D_ctx_8017835C = 4; + gFillScreenAlphaTarget = 0; + gFillScreenAlphaStep = 4; D_ctx_80177A48[1] += D_ctx_80177A48[2] * 0.8f; Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, 0); sp60.x = 0.0f; @@ -3012,10 +3012,10 @@ void Solar_801A7930(Player* player) { func_play_800A6148(); } if (gCsFrameCount > 1530) { - D_ctx_80178358 = 255; - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0; - D_ctx_8017835C = 8; - if (D_ctx_80178340 == 255) { + gFillScreenAlphaTarget = 255; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; + gFillScreenAlphaStep = 8; + if (gFillScreenAlpha == 255) { func_8001CA24(0); Audio_FadeOutAll(10); player->state_1C8 = PLAYERSTATE_1C8_6; @@ -3028,13 +3028,13 @@ void Solar_801A7930(Player* player) { } switch (gCsFrameCount) { case 440: - D_ctx_80177840 = 100; + gLevelClearScreenTimer = 100; break; case 640: Radio_PlayMessage(gMsg_ID_20010, RCID_FOX); break; case 728: - switch (gTeamShields[2]) { + switch (gTeamShields[TEAM_ID_SLIPPY]) { case 0: Radio_PlayMessage(gMsg_ID_20345, RCID_ROB64); break; @@ -3047,7 +3047,7 @@ void Solar_801A7930(Player* player) { } break; case 875: - switch (gTeamShields[3]) { + switch (gTeamShields[TEAM_ID_PEPPY]) { case 0: Radio_PlayMessage(gMsg_ID_20344, RCID_ROB64); break; @@ -3060,7 +3060,7 @@ void Solar_801A7930(Player* player) { } break; case 1021: - switch (gTeamShields[1]) { + switch (gTeamShields[TEAM_ID_FALCO]) { case 0: Radio_PlayMessage(gMsg_ID_20343, RCID_ROB64); break; @@ -3083,7 +3083,7 @@ void Solar_801A7930(Player* player) { player->unk_190 = player->unk_194 = 5.0f; break; case 1400: - if (gTeamShields[3] > 0) { + if (gTeamShields[TEAM_ID_PEPPY] > 0) { gActors[0].state = 2; } break; @@ -3092,12 +3092,12 @@ void Solar_801A7930(Player* player) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); break; case 1420: - if (gTeamShields[2] > 0) { + if (gTeamShields[TEAM_ID_SLIPPY] > 0) { gActors[1].state = 2; } break; case 1440: - if (gTeamShields[1] > 0) { + if (gTeamShields[TEAM_ID_FALCO] > 0) { gActors[2].state = 2; } break; @@ -3138,7 +3138,7 @@ void Solar_801A8BE8(Actor* actor) { case 4: break; case 1: - if ((actor->unk_0B6 != 0) && ((((actor->index & 7) * 10) + 1030) < gCsFrameCount)) { + if ((actor->unk_0B6 != 0) && ((((s32) (actor->index % 8U) * 10) + 1030) < gCsFrameCount)) { actor->state = 4; } break; diff --git a/src/overlays/ovl_i3/fox_zo.c b/src/overlays/ovl_i3/fox_zo.c index ae468da8..64135e95 100644 --- a/src/overlays/ovl_i3/fox_zo.c +++ b/src/overlays/ovl_i3/fox_zo.c @@ -670,7 +670,7 @@ void Zoness_801904CC(Actor* actor) { RAND_FLOAT(10.0f), 41, actor->scale, 200, i); } actor->itemDrop = DROP_NONE; - func_enmy_80066254(actor); + Actor_Despawn(actor); Object_Kill(&actor->obj, actor->sfxSource); func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 4.0f); func_effect_8007A6F0(&actor->obj.pos, 0x29018036); @@ -701,7 +701,7 @@ void Zoness_80190790(Actor* actor) { Vec3f sp44; Vec3f sp38; s32 i; - Actor* sp30; + Actor* otherActor; actor->unk_04E++; if (actor->unk_04E >= 200) { @@ -712,14 +712,15 @@ void Zoness_80190790(Actor* actor) { actor->unk_0F4.x = -actor->vel.y * 2.5f; actor->fwork[1] += 5.0f; actor->unk_0F4.z = SIN_DEG(actor->fwork[1]) * 30.0f; - for (i = 0, sp30 = gActors; i < 60; i++, sp30++) { - if ((sp30->obj.status == OBJ_ACTIVE) && (sp30->obj.id == OBJ_ACTOR_239) && - (sp30->iwork[0] == actor->iwork[0])) { - temp1 = Math_RadToDeg(Math_Atan2F(sp30->obj.pos.x - actor->obj.pos.x, sp30->obj.pos.z - actor->obj.pos.z)); + for (i = 0, otherActor = gActors; i < 60; i++, otherActor++) { + if ((otherActor->obj.status == OBJ_ACTIVE) && (otherActor->obj.id == OBJ_ACTOR_239) && + (otherActor->iwork[0] == actor->iwork[0])) { + temp1 = Math_RadToDeg( + Math_Atan2F(otherActor->obj.pos.x - actor->obj.pos.x, otherActor->obj.pos.z - actor->obj.pos.z)); Math_SmoothStepToAngle(&actor->unk_0F4.y, temp1, 0.2f, 3.0f, 0.0f); - if ((fabsf(actor->obj.pos.x - sp30->obj.pos.x) < 500.0f) && - (fabsf(actor->obj.pos.z - sp30->obj.pos.z) < 500.0f)) { - sp30->obj.status = OBJ_FREE; + if ((fabsf(actor->obj.pos.x - otherActor->obj.pos.x) < 500.0f) && + (fabsf(actor->obj.pos.z - otherActor->obj.pos.z) < 500.0f)) { + otherActor->obj.status = OBJ_FREE; actor->iwork[0]++; } break; @@ -807,8 +808,8 @@ void Zoness_80190D0C(Actor* actor) { var_s2->y.offset = temp_s0->pos.y - actor->obj.pos.y; var_s2->x.offset = temp_s0->pos.x - actor->obj.pos.x; Zoness_80190B4C(temp_s0->pos.x, temp_s0->pos.y, temp_s0->pos.z, temp_s0->rot.x, temp_s0->rot.y, temp_s0->rot.z, - D_i3_801BF594[i], actor->timer_0C6 & 1); - if (D_ctx_80177854 != 100) { + D_i3_801BF594[i], actor->timer_0C6 % 2U); + if (gPlayState != PLAY_PAUSE) { Math_SmoothStepToF(&temp_s0->pos.y, actor->fwork[2], 1.0f, 10.0f, 0.0f); } } @@ -911,7 +912,7 @@ void Zoness_80191010(Actor* actor) { RAND_FLOAT(10.0f), 42, actor->scale, 200, i); } actor->itemDrop = DROP_SILVER_RING_25p; - func_enmy_80066254(actor); + Actor_Despawn(actor); func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 3.0f); AUDIO_PLAY_SFX(0x2903A008, actor->sfxSource, 4); Object_Kill(&actor->obj, actor->sfxSource); @@ -941,26 +942,26 @@ void Zoness_801914C4(Actor* actor) { void Zoness_801915A4(Actor* actor) { s32 i; - Actor* var_a2; + Actor* actor241; actor->health = 50; actor->fwork[0] = actor->obj.pos.z - 10000.0f; - for (i = 0, var_a2 = gActors; i < 60; i++, var_a2++) { - if (var_a2->obj.status == OBJ_FREE) { - Actor_Initialize(var_a2); - var_a2->obj.status = OBJ_INIT; - var_a2->obj.id = OBJ_ACTOR_241; - var_a2->obj.pos.x = actor->obj.pos.x; - var_a2->obj.pos.y = actor->obj.pos.y; - var_a2->obj.pos.z = actor->obj.pos.z; - var_a2->iwork[0] = actor->index + 1; - Object_SetInfo(&var_a2->info, var_a2->obj.id); + for (i = 0, actor241 = gActors; i < 60; i++, actor241++) { + if (actor241->obj.status == OBJ_FREE) { + Actor_Initialize(actor241); + actor241->obj.status = OBJ_INIT; + actor241->obj.id = OBJ_ACTOR_241; + actor241->obj.pos.x = actor->obj.pos.x; + actor241->obj.pos.y = actor->obj.pos.y; + actor241->obj.pos.z = actor->obj.pos.z; + actor241->iwork[0] = actor->index + 1; + Object_SetInfo(&actor241->info, actor241->obj.id); actor->iwork[0] = i; break; } } if (i >= 60) { - var_a2->obj.status = OBJ_FREE; + actor241->obj.status = OBJ_FREE; } } @@ -972,7 +973,7 @@ void Zoness_80191680(Actor* actor) { f32 sp54; Vec3f sp48; Vec3f sp3C; - Actor* sp38; + Actor* otherActor; if (actor->obj.pos.z < actor->fwork[0]) { actor->state = 1; @@ -984,7 +985,7 @@ void Zoness_80191680(Actor* actor) { AUDIO_PLAY_SFX(0x29033037, actor->sfxSource, 4); if (actor->health <= 0) { actor->health = actor->itemDrop = 0; - func_enmy_80066254(actor); + Actor_Despawn(actor); actor->state = 1; AUDIO_PLAY_SFX(0x29018036, actor->sfxSource, 4); } @@ -1004,8 +1005,8 @@ void Zoness_80191680(Actor* actor) { sp60 = actor->fwork[2] - actor->obj.pos.y; sp5C = actor->fwork[3] - actor->obj.pos.z; sp54 = Math_RadToDeg(Math_Atan2F(sp64, sp5C)); - sp38 = &gActors[actor->iwork[0]]; - if ((actor->state != 0) || (sp38->obj.status == OBJ_FREE)) { + otherActor = &gActors[actor->iwork[0]]; + if ((actor->state != 0) || (otherActor->obj.status == OBJ_FREE)) { actor->timer_0CA[0] = 0; actor->info.unk_1C = 0.0f; sp54 += 180.0f; @@ -1033,19 +1034,19 @@ void Zoness_80191680(Actor* actor) { actor->vel.x = sp3C.x; actor->vel.y = sp3C.y; actor->vel.z = sp3C.z - 20.0f; - if (sp38->iwork[0] == (actor->index + 1)) { + if (otherActor->iwork[0] == (actor->index + 1)) { if (actor->state == 0) { - sp38->obj.pos.x = actor->obj.pos.x; - sp38->obj.pos.y = actor->obj.pos.y - 50.0f; - sp38->obj.pos.z = actor->obj.pos.z; - actor->fwork[4] = sp38->obj.pos.x; - actor->fwork[5] = sp38->obj.pos.y; - actor->fwork[6] = sp38->obj.pos.z; - if (!(gGameFrameCount & 0xF) && (fabsf(gPlayer[0].pos.x - actor->obj.pos.x) < 100.0f)) { + otherActor->obj.pos.x = actor->obj.pos.x; + otherActor->obj.pos.y = actor->obj.pos.y - 50.0f; + otherActor->obj.pos.z = actor->obj.pos.z; + actor->fwork[4] = otherActor->obj.pos.x; + actor->fwork[5] = otherActor->obj.pos.y; + actor->fwork[6] = otherActor->obj.pos.z; + if (((gGameFrameCount % 16) == 0) && (fabsf(gPlayer[0].pos.x - actor->obj.pos.x) < 100.0f)) { func_effect_80081BEC(actor->fwork[4], actor->fwork[5], actor->fwork[6], 1.0f, 0); } } else { - sp38->vel.y -= 1.0f; + otherActor->vel.y -= 1.0f; } } } @@ -1075,7 +1076,7 @@ void Zoness_80191BC4(Actor* actor) { } actor->fwork[0] += 10.0f; Zoness_8018FF50(actor); - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { func_effect_8007C484(RAND_FLOAT_CENTERED(50.0f) + actor->obj.pos.x, RAND_FLOAT_CENTERED(50.0f) + actor->obj.pos.y, RAND_FLOAT_CENTERED(50.0f) + actor->obj.pos.z, actor->vel.x, actor->vel.y, actor->vel.z, @@ -1190,7 +1191,7 @@ void Zoness_80192094(Actor* actor) { } break; case 2: - if (actor->iwork[1] >= 21) { + if (actor->iwork[1] > 20) { actor->iwork[0] = 0; actor->state = 3; actor->vel.y = 50.0f; @@ -1239,7 +1240,7 @@ void Zoness_80192094(Actor* actor) { RAND_FLOAT(20.0f), 44, actor->scale, 200, i); } actor->itemDrop = DROP_BOMB; - func_enmy_80066254(actor); + Actor_Despawn(actor); Object_Kill(&actor->obj, actor->sfxSource); func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f); break; @@ -1340,7 +1341,7 @@ void Zoness_80192834(Actor* actor) { RAND_FLOAT(10.0f), 43, actor->scale, 200, i); } actor->itemDrop = DROP_NONE; - func_enmy_80066254(actor); + Actor_Despawn(actor); Object_Kill(&actor->obj, actor->sfxSource); func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 3.0f); func_effect_8007A6F0(&actor->obj.pos, 0x29018036); @@ -1457,7 +1458,7 @@ void Zoness_80192E64(Actor* actor) { RAND_FLOAT(20.0f), 59, actor->scale, 200, i); } actor->itemDrop = DROP_BOMB_33p; - func_enmy_80066254(actor); + Actor_Despawn(actor); Object_Kill(&actor->obj, actor->sfxSource); func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f); break; @@ -1494,12 +1495,12 @@ f32 D_i3_801BF608[6] = { -45.0f, 0.0f, -45.0f, 0.0f, -45.0f, 0.0f, }; -void Zoness_BossZo_Init(Boss* bossZO) { +void Zoness_BossZo_Init(BossZO* this) { s32 i; gBossActive = 1; gBossFrameCount = 0; - bossZO->vel.z = -40.0f; + this->vel.z = -40.0f; for (i = 0; i < ZO_LIMB_MAX; i++) { sZoLimbTimers[i] = 0; } @@ -1513,17 +1514,17 @@ void Zoness_BossZo_Init(Boss* bossZO) { sZoFwork[ZO_BSF_106_X] = sZoFwork[ZO_BSF_93_X] = sZoFwork[ZO_BSF_96_X] = sZoFwork[ZO_BSF_29_X] = sZoFwork[ZO_BSF_109_X] = sZoFwork[ZO_BSF_43_X] = sZoFwork[ZO_BSF_102_X] = sZoFwork[ZO_BSF_37_X] = sZoFwork[ZO_BSF_46_X] = sZoFwork[ZO_BSF_68_X] = sZoFwork[ZO_BSF_40_X] = sZoFwork[ZO_BSF_65_X] = - sZoFwork[ZO_BSF_55_X] = bossZO->obj.pos.x; + sZoFwork[ZO_BSF_55_X] = this->obj.pos.x; sZoFwork[ZO_BSF_32_Y] = sZoFwork[ZO_BSF_99_Y] = sZoFwork[ZO_BSF_60_Y] = sZoFwork[ZO_BSF_52_Y] = sZoFwork[ZO_BSF_106_Y] = sZoFwork[ZO_BSF_93_Y] = sZoFwork[ZO_BSF_96_Y] = sZoFwork[ZO_BSF_29_Y] = sZoFwork[ZO_BSF_109_Y] = sZoFwork[ZO_BSF_43_Y] = sZoFwork[ZO_BSF_102_Y] = sZoFwork[ZO_BSF_37_Y] = sZoFwork[ZO_BSF_46_Y] = sZoFwork[ZO_BSF_68_Y] = sZoFwork[ZO_BSF_40_Y] = sZoFwork[ZO_BSF_65_Y] = - sZoFwork[ZO_BSF_55_Y] = bossZO->obj.pos.y; + sZoFwork[ZO_BSF_55_Y] = this->obj.pos.y; sZoFwork[ZO_BSF_32_Z] = sZoFwork[ZO_BSF_99_Z] = sZoFwork[ZO_BSF_60_Z] = sZoFwork[ZO_BSF_52_Z] = sZoFwork[ZO_BSF_106_Z] = sZoFwork[ZO_BSF_93_Z] = sZoFwork[ZO_BSF_96_Z] = sZoFwork[ZO_BSF_29_Z] = sZoFwork[ZO_BSF_109_Z] = sZoFwork[ZO_BSF_43_Z] = sZoFwork[ZO_BSF_102_Z] = sZoFwork[ZO_BSF_37_Z] = sZoFwork[ZO_BSF_46_Z] = sZoFwork[ZO_BSF_68_Z] = sZoFwork[ZO_BSF_40_Z] = sZoFwork[ZO_BSF_65_Z] = - sZoFwork[ZO_BSF_55_Z] = bossZO->obj.pos.z; + sZoFwork[ZO_BSF_55_Z] = this->obj.pos.z; sZoSwork[ZO_BSS_8] = 40; sZoSwork[ZO_BSS_9] = 40; @@ -1531,9 +1532,9 @@ void Zoness_BossZo_Init(Boss* bossZO) { sZoSwork[ZO_BSS_11] = 20; sZoSwork[ZO_BSS_12] = 20; sZoSwork[ZO_BSS_13] = 61; - bossZO->health = 300; - bossZO->obj.pos.y = -1800.0f; - bossZO->obj.rot.y = 180.0f; + this->health = 300; + this->obj.pos.y = -1800.0f; + this->obj.rot.y = 180.0f; sZoFwork[ZO_BSF_28] = -2600.0f; sZoFwork[ZO_BSF_1] = -130.0f; @@ -1545,30 +1546,30 @@ void Zoness_BossZo_Init(Boss* bossZO) { sZoSwork[ZO_BSS_43] = 255; sZoSwork[ZO_BSS_44] = 255; sZoFwork[ZO_BSF_25] = 0.0f; - bossZO->timer_050 = 200; - bossZO->timer_052 = 280; + this->timer_050 = 200; + this->timer_052 = 280; sZoSwork[ZO_BSS_37] = 255; for (i = 0; i < 2; i++) { Actor_Initialize(&gActors[i]); gActors[i].obj.status = OBJ_INIT; gActors[i].obj.id = OBJ_ACTOR_248 + i; - gActors[i].obj.pos.x = bossZO->obj.pos.x; - gActors[i].obj.pos.y = bossZO->obj.pos.y; - gActors[i].obj.pos.z = bossZO->obj.pos.z; + gActors[i].obj.pos.x = this->obj.pos.x; + gActors[i].obj.pos.y = this->obj.pos.y; + gActors[i].obj.pos.z = this->obj.pos.z; Object_SetInfo(&gActors[i].info, gActors[i].obj.id); } SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 40); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 40); - ZO_HIT_3(bossZO)->b.z.offset = ZO_HIT_4(bossZO)->b.z.offset = -561.6f; - ZO_HIT_8(bossZO, 0)->z.offset = ZO_HIT_8(bossZO, 1)->z.offset = -213.2f; - ZO_HIT_10(bossZO, 0)->z.offset = ZO_HIT_10(bossZO, 1)->z.offset = -351.0f; - ZO_HIT_12(bossZO)->z.offset = -883.99994f; - ZO_HIT_12(bossZO)->z.size = 244.4f; - ZO_HIT_12(bossZO)->y.offset = 863.19995f; - ZO_HIT_12(bossZO)->y.size = 171.59999f; - ZO_HIT_12(bossZO)->x.offset = 0.f; - ZO_HIT_12(bossZO)->x.size = 93.6f; + ZO_HIT_3(this)->b.z.offset = ZO_HIT_4(this)->b.z.offset = -561.6f; + ZO_HIT_8(this, 0)->z.offset = ZO_HIT_8(this, 1)->z.offset = -213.2f; + ZO_HIT_10(this, 0)->z.offset = ZO_HIT_10(this, 1)->z.offset = -351.0f; + ZO_HIT_12(this)->z.offset = -883.99994f; + ZO_HIT_12(this)->z.size = 244.4f; + ZO_HIT_12(this)->y.offset = 863.19995f; + ZO_HIT_12(this)->y.size = 171.59999f; + ZO_HIT_12(this)->x.offset = 0.f; + ZO_HIT_12(this)->x.size = 93.6f; } void Zoness_80193628(Object* obj, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6) { @@ -1718,7 +1719,7 @@ bool Zoness_80193D08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* t if (sZoSwork[ZO_BSS_37] != 255) { RCP_SetupDL_46(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, sZoSwork[ZO_BSS_37], sZoSwork[ZO_BSS_37]); - } else if (!(sZoLimbTimers[limbIndex] & 1)) { + } else if ((sZoLimbTimers[limbIndex] % 2) == 0) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } else { RCP_SetupDL_27(); @@ -2042,7 +2043,7 @@ void Zoness_80194A84(Boss* bossZO) { Math_SmoothStepToF(&bossZO->obj.pos.z, gPlayer[0].camEye.z - D_ctx_80177D20 + sZoFwork[ZO_BSF_28], 0.1f, sZoFwork[ZO_BSF_27], 0.00001f); } - if (!(gGameFrameCount & 3)) { + if (((gGameFrameCount % 4) == 0)) { if ((bossZO->obj.rot.y <= 90.0f) || (bossZO->obj.rot.y >= 270.0f)) { sZoSwork[ZO_BSS_43] = bossZO->obj.rot.y; if (sZoSwork[ZO_BSS_43] > 270) { @@ -2110,7 +2111,7 @@ void Zoness_80194A84(Boss* bossZO) { } switch (bossZO->state) { case 0: - if ((!(gGameFrameCount & 7) || (bossZO->timer_050 == 43)) && (bossZO->swork[ZO_SWK_13] == 0) && + if ((((gGameFrameCount % 8) == 0) || (bossZO->timer_050 == 43)) && (bossZO->swork[ZO_SWK_13] == 0) && ((bossZO->swork[ZO_SWK_12] < 7) || (bossZO->timer_050 == 43))) { D_ctx_801779A8[0] = 20.0f; if (func_play_800A73E4(&sp134, &sp130, sZoFwork[ZO_BSF_43_X], sZoFwork[ZO_BSF_43_Y] - 300.0f, @@ -2160,7 +2161,7 @@ void Zoness_80194A84(Boss* bossZO) { Zoness_8019962C(bossZO, 0.0f); Math_SmoothStepToF(&sZoFwork[ZO_BSF_1], sZoFwork[ZO_BSF_74], 0.1f, 2.0f, 0.00001f); Math_SmoothStepToF(&sZoFwork[ZO_BSF_11], sZoFwork[ZO_BSF_75], 0.1f, 2.0f, 0.00001f); - if ((bossZO->timer_050 == 0) && !(gGameFrameCount & 3)) { + if ((bossZO->timer_050 == 0) && ((gGameFrameCount % 4) == 0)) { if (sZoSwork[ZO_BSS_9] != 0) { Zoness_80193908(sZoFwork[ZO_BSF_29_X], sZoFwork[ZO_BSF_29_Y], sZoFwork[ZO_BSF_29_Z], bossZO->obj.rot.y); @@ -2347,7 +2348,7 @@ void Zoness_80194A84(Boss* bossZO) { break; case 4: if (bossZO->swork[ZO_SWK_15] == 0) { - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = D_ctx_80178340 = 0; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 0; } Math_SmoothStepToAngle(&bossZO->obj.rot.z, bossZO->fwork[ZO_FWK_9], 0.1f, 100.0f, 0.00001f); Math_SmoothStepToAngle(&bossZO->fwork[ZO_FWK_9], 0.0f, 0.1f, 100.0f, 0.00001f); @@ -2452,16 +2453,16 @@ void Zoness_80194A84(Boss* bossZO) { case 6: D_ctx_801779A8[0] = 20.0f; if (gCameraShake == 0) { - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255; - D_ctx_80178340 = D_ctx_80178358 = 255; - D_ctx_80178358 = 0; - D_ctx_8017835C = 25; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; + gFillScreenAlpha = gFillScreenAlphaTarget = 255; + gFillScreenAlphaTarget = 0; + gFillScreenAlphaStep = 25; gCameraShake = (s32) (RAND_FLOAT(20.0f) + 20.0f); } if (gCameraShake == 29) { - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = D_ctx_80178340 = 0; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 0; } - if (!(gGameFrameCount & 3)) { + if (((gGameFrameCount % 4) == 0)) { spE4.x = RAND_FLOAT_CENTERED(300.0f) + bossZO->obj.pos.x; spE4.y = RAND_FLOAT_CENTERED(200.0f) + (bossZO->obj.pos.y + 600.0f); spE4.z = bossZO->obj.pos.z - 50.0f; @@ -2476,7 +2477,7 @@ void Zoness_80194A84(Boss* bossZO) { } bossZO->vel.x = 0.0f; Math_SmoothStepToF(&bossZO->obj.pos.x, 0.0f, 0.1f, 5.0f, 0.00001f); - if (!(gGameFrameCount & 7) && (Rand_ZeroOne() < 0.5f)) { + if (((gGameFrameCount % 8) == 0) && (Rand_ZeroOne() < 0.5f)) { sZoLimbTimers[ZO_LIMB_36] = 15; sZoLimbTimers[ZO_LIMB_25] = 15; } @@ -2509,14 +2510,14 @@ void Zoness_80194A84(Boss* bossZO) { } bossZO->timer_050 = 70; sZoSwork[ZO_BSS_5] = 0; - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = D_ctx_80178340 = 0; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 0; func_boss_80042EC0(bossZO); bossZO->state = 7; } break; case 7: D_ctx_801779A8[0] = 20.0f; - if (!(gGameFrameCount & 7) && + if (((gGameFrameCount % 8) == 0) && (func_play_800A73E4(&sp134, &sp130, bossZO->obj.pos.x, -300.0f, bossZO->obj.pos.z) != 0)) { func_effect_8008377C(RAND_FLOAT_CENTERED(500.0f) + bossZO->obj.pos.x, sp134 - 300.0f, RAND_FLOAT_CENTERED(3000.0f) + bossZO->obj.pos.z, 5.0f, 2.0f); @@ -2600,7 +2601,7 @@ void Zoness_80194A84(Boss* bossZO) { spE4.z = gPlayer[0].unk_138 - bossZO->obj.pos.z; Math_SmoothStepToAngle(&sZoFwork[ZO_BSF_14], Math_RadToDeg(Math_Atan2F(spE4.x, spE4.z)), 0.5f, 100.0f, 0.001f); Math_SmoothStepToAngle(&sZoFwork[ZO_BSF_0], sZoFwork[ZO_BSF_76], 0.2f, 4.0f, 0.0001f); - if ((!(gGameFrameCount & 0x3F) || (sZoSwork[ZO_BSS_22] != 0)) && + if ((((gGameFrameCount % 64) == 0) || (sZoSwork[ZO_BSS_22] != 0)) && ((Rand_ZeroOne() < 0.5f) || (sZoSwork[ZO_BSS_22] != 0)) && (sZoSwork[ZO_BSS_23] == 0)) { sZoSwork[ZO_BSS_23] = D_i3_801BF5F0[sZoSwork[ZO_BSS_22]]; sZoFwork[ZO_BSF_76] = D_i3_801BF608[sZoSwork[ZO_BSS_22]]; @@ -2707,7 +2708,7 @@ void Zoness_80194A84(Boss* bossZO) { } if ((sZoSwork[ZO_BSS_13] < 2) && (sZoLimbTimers[ZO_LIMB_5] != LIMB_DESTROYED)) { D_ctx_801779A8[0] = 20.0f; - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { func_effect_8007D0E0(sZoFwork[ZO_BSF_52_X] + RAND_FLOAT_CENTERED(200.0f), sZoFwork[ZO_BSF_52_Y] + RAND_FLOAT_CENTERED(200.0f), sZoFwork[ZO_BSF_52_Z] + RAND_FLOAT_CENTERED(100.0f), 5.0f); @@ -2875,10 +2876,10 @@ void Zoness_80194A84(Boss* bossZO) { if (sZoSwork[ZO_BSS_11] <= 0) { sZoSwork[ZO_BSS_11] = 0; gCameraShake = 30; - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255; - D_ctx_80178340 = D_ctx_80178358 = 255; - D_ctx_80178358 = 0; - D_ctx_8017835C = 25; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; + gFillScreenAlpha = gFillScreenAlphaTarget = 255; + gFillScreenAlphaTarget = 0; + gFillScreenAlphaStep = 25; bossZO->swork[ZO_SWK_15] = 3; spD8.x = sZoFwork[ZO_BSF_106_X]; spD8.y = sZoFwork[ZO_BSF_106_Y]; @@ -2901,10 +2902,10 @@ void Zoness_80194A84(Boss* bossZO) { if (sZoSwork[ZO_BSS_12] <= 0) { sZoSwork[ZO_BSS_12] = 0; gCameraShake = 30; - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255; - D_ctx_80178340 = D_ctx_80178358 = 255; - D_ctx_80178358 = 0; - D_ctx_8017835C = 25; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; + gFillScreenAlpha = gFillScreenAlphaTarget = 255; + gFillScreenAlphaTarget = 0; + gFillScreenAlphaStep = 25; bossZO->swork[ZO_SWK_15] = 3; spCC.x = sZoFwork[ZO_BSF_109_X]; spCC.y = sZoFwork[ZO_BSF_109_Y]; @@ -3168,7 +3169,7 @@ void Zoness_80198BE8(Boss* bossZO, s32 arg1) { } sZoSwork[ZO_BSS_2 + arg1] = 2; sZoSwork[ZO_BSS_41 + arg1]++; - if (sZoSwork[ZO_BSS_41 + arg1] >= 11) { + if (sZoSwork[ZO_BSS_41 + arg1] > 10) { sZoSwork[ZO_BSS_41 + arg1] = 0; sZoSwork[ZO_BSS_39 + arg1] = 30; if (arg1 == 1) { @@ -3220,13 +3221,13 @@ void Zoness_80198ECC(Boss* bossZO) { } void Zoness_80198F3C(Boss* bossZO, s32 arg1, s32 arg2) { - if ((!(gGameFrameCount & 7) && (Rand_ZeroOne() < 0.5f))) { + if ((((gGameFrameCount % 8) == 0) && (Rand_ZeroOne() < 0.5f))) { sZoLimbTimers[ZO_LIMB_7 + 4 * arg1] = sZoLimbTimers[ZO_LIMB_21 + 2 * arg1] = sZoLimbTimers[ZO_LIMB_22 + 2 * arg1] = 15; } func_effect_8007D0E0(sZoFwork[ZO_BSF_0 + arg2] + RAND_FLOAT_CENTERED(400.0f), sZoFwork[ZO_BSF_1 + arg2] + RAND_RANGE(-160.0f, 640.0f), sZoFwork[ZO_BSF_2 + arg2], 7.0f); - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { func_effect_8007C120(sZoFwork[ZO_BSF_0 + arg2], sZoFwork[ZO_BSF_1 + arg2], sZoFwork[ZO_BSF_2 + arg2], bossZO->vel.x, bossZO->vel.y, bossZO->vel.z, 0.2f, 10); } @@ -3360,7 +3361,7 @@ void Zoness_8019969C(Actor* actor) { actor->itemDrop = DROP_BOMB; actor->unk_0D4 = 2; actor->obj.pos.z -= 100.0f; - func_enmy_80066254(actor); + Actor_Despawn(actor); Object_Kill(&actor->obj, actor->sfxSource); func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); } @@ -3461,7 +3462,7 @@ void Zoness_80199A28(Actor* actor) { func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y + 100.0f, actor->obj.pos.z, 7.0f); actor->unk_0D4 = 2; actor->obj.pos.y += 200.0f; - func_enmy_80066254(actor); + Actor_Despawn(actor); Object_Kill(&actor->obj, actor->sfxSource); func_effect_8007A6F0(&actor->obj.pos, 0x1903400F); } else { @@ -3478,7 +3479,7 @@ void Zoness_80199A28(Actor* actor) { actor->itemDrop = DROP_SILVER_RING_50p; actor->unk_0D4 = 2; actor->obj.pos.y += 200.0f; - func_enmy_80066254(actor); + Actor_Despawn(actor); Object_Kill(&actor->obj, actor->sfxSource); } } @@ -3718,7 +3719,7 @@ void Zoness_8019A5D4(Actor* actor) { } actor->unk_0D0 = 0; } - if (!(gGameFrameCount & 7) && (actor->state != 0) && (actor->iwork[0] < 8) && + if (((gGameFrameCount % 8) == 0) && (actor->state != 0) && (actor->iwork[0] < 8) && (func_play_800A73E4(&sp44, &sp40, actor->obj.pos.x, actor->obj.pos.y - 100.0f, actor->obj.pos.z) != 0)) { func_effect_8008377C(actor->obj.pos.x, sp44, actor->obj.pos.z, 0.0f, 0.7f); actor->iwork[0]++; @@ -3987,7 +3988,7 @@ void Zoness_8019B854(Actor* actor) { actor->obj.pos.y += 100.0f; if (D_i3_801BF824[actor->iwork[0]] < 1000) { actor->itemDrop = D_i3_801BF824[actor->iwork[0]]; - func_enmy_80066254(actor); + Actor_Despawn(actor); } else { if (D_i3_801BF824[actor->iwork[0]] == 1000) { for (i = 0, j = 0; i < 10; i++, j++) { @@ -4000,11 +4001,11 @@ void Zoness_8019B854(Actor* actor) { sp9C.x = RAND_FLOAT_CENTERED(10.0f); sp9C.y = RAND_FLOAT_CENTERED(10.0f); sp9C.z = 50.0f; - func_effect_8007EE68(353, &spB4, &spA8, &spA8, &sp9C, 1.0f); + func_effect_8007EE68(OBJ_EFFECT_353, &spB4, &spA8, &spA8, &sp9C, 1.0f); } } actor->itemDrop = DROP_NONE; - func_enmy_80066254(actor); + Actor_Despawn(actor); } Object_Kill(&actor->obj, actor->sfxSource); func_effect_8007A6F0(&actor->obj.pos, 0x1903901C); @@ -4093,12 +4094,12 @@ void Zoness_8019BE48(Actor* actor) { actor->timer_0C6 = 15; actor->health -= actor->damage; if (actor->health <= 0) { - if (D_enmy_80161684 == 0) { + if (!gMissedZoSearchlight) { BonusText_Display(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 200.0f, 2); gHitCount += 2; } actor->health = actor->itemDrop = 0; - func_enmy_80066254(actor); + Actor_Despawn(actor); actor->state++; } } @@ -4312,9 +4313,9 @@ void Zoness_8019CBEC(Actor* actor) { actor->timer_0C2 = 30000; switch (actor->state) { case 0: - actor->fwork[5] = D_i3_801BF8CC[gGameFrameCount & 1]; - if (D_enmy_80161684 != 0) { - actor->fwork[5] = D_i3_801BF8C4[gGameFrameCount & 1]; + actor->fwork[5] = D_i3_801BF8CC[gGameFrameCount % 2U]; + if (gMissedZoSearchlight) { + actor->fwork[5] = D_i3_801BF8C4[gGameFrameCount % 2U]; actor->iwork[1] = 1; } actor->state++; @@ -4326,7 +4327,7 @@ void Zoness_8019CBEC(Actor* actor) { } else { Math_SmoothStepToAngle(&actor->fwork[4], actor->fwork[5], 0.1f, actor->fwork[6], 0.0001f); } - if ((D_enmy_80161684 != 0) && (actor->iwork[1] == 0)) { + if (gMissedZoSearchlight && (actor->iwork[1] == 0)) { if (actor->fwork[5] < 300.0f) { actor->fwork[5] = D_i3_801BF8C4[0]; } else { @@ -4374,14 +4375,14 @@ void Zoness_8019CE58(Actor* actor) { Matrix_RotateZ(gGfxMatrix, (actor->fwork[4] + actor->obj.rot.z) * M_DTOR, 1); Matrix_Scale(gGfxMatrix, actor->fwork[1], actor->fwork[2], actor->fwork[3], 1); Matrix_SetGfxMtx(&gMasterDisp); - if (D_enmy_80161684 != 0) { + if (gMissedZoSearchlight) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 191, 43, 255); gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 255); } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 255, 255, 127, 255); } - } else if (D_enmy_80161684 != 0) { + } else if (gMissedZoSearchlight) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 191, 43, 50); gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 255); } else { @@ -4391,7 +4392,7 @@ void Zoness_8019CE58(Actor* actor) { gSPDisplayList(gMasterDisp++, D_ZO_60181E0); } -void Zoness_Actor247_Init(Actor* actor) { +void Zoness_Actor247_Init(Actor247* this) { s32 i; for (i = 0; i < 60; i++) { @@ -4399,14 +4400,14 @@ void Zoness_Actor247_Init(Actor* actor) { Actor_Initialize(&gActors[i]); gActors[i].obj.status = OBJ_ACTIVE; gActors[i].obj.id = OBJ_ACTOR_247; - gActors[i].obj.pos.x = actor->obj.pos.x; - gActors[i].obj.pos.y = actor->obj.pos.y - 60.0f; + gActors[i].obj.pos.x = this->obj.pos.x; + gActors[i].obj.pos.y = this->obj.pos.y - 60.0f; gActors[i].fwork[2] = gActors[i].obj.pos.y; - gActors[i].obj.pos.z = actor->obj.pos.z; + gActors[i].obj.pos.z = this->obj.pos.z; gActors[i].state = 1; - actor->unk_046 = i + 1; + this->unk_046 = i + 1; Object_SetInfo(&gActors[i].info, gActors[i].obj.id); gActors[i].info.hitbox = SEGMENTED_TO_VIRTUAL(D_ZO_602C028); break; @@ -4415,7 +4416,7 @@ void Zoness_Actor247_Init(Actor* actor) { } void Zoness_8019D15C(Actor* actor) { - Actor* temp_v0; + Actor* otherActor; if (actor->state == 0) { if (actor->unk_0D0 != 0) { @@ -4433,10 +4434,10 @@ void Zoness_8019D15C(Actor* actor) { } } if (actor->unk_046 != 0) { - temp_v0 = &gActors[actor->unk_046 - 1]; - temp_v0->obj.pos.y += actor->fwork[1] * 0.3f; - if (temp_v0->obj.pos.y > actor->fwork[2] + 370.0f) { - temp_v0->obj.pos.y = actor->fwork[2] + 370.0f; + otherActor = &gActors[actor->unk_046 - 1]; + otherActor->obj.pos.y += actor->fwork[1] * 0.3f; + if (otherActor->obj.pos.y > actor->fwork[2] + 370.0f) { + otherActor->obj.pos.y = actor->fwork[2] + 370.0f; } } actor->fwork[0] += actor->fwork[1]; @@ -4514,7 +4515,7 @@ void Zoness_8019D428(Player* player) { gControllerHold[gMainController].button = sp2C; if (gCsFrameCount >= 270) { AUDIO_PLAY_BGM(SEQ_ID_ZONESS | SEQ_FLAG); - D_ctx_80177838 = 80; + gLevelStatusScreenTimer = 80; player->state_1C8 = PLAYERSTATE_1C8_3; player->unk_1D0 = 0; player->timer_1F8 = 0; @@ -4586,15 +4587,15 @@ void Zoness_8019D76C(Player* player) { player->unk_0EC += 30.0f; } if (gCsFrameCount >= 140) { - D_ctx_80178358 = 255; - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255; + gFillScreenAlphaTarget = 255; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; } if (gCsFrameCount == 160) { player->unk_1D0++; func_play_800A6148(); func_8001CA24(0); Audio_KillSfxBySource(player->sfxSource); - D_ctx_80178340 = 250; + gFillScreenAlpha = 250; player->timer_1F8 = 20; player->wings.unk_2C = 1; player->unk_0D0 = 0.0f; @@ -4617,7 +4618,7 @@ void Zoness_8019D76C(Player* player) { Solar_801A7750(); D_ctx_80177A48[1] = 0.0f; D_ctx_80177A48[2] = 0.0f; - if (D_enmy_80161684 == 0) { + if (!gMissedZoSearchlight) { D_ctx_80177A48[1] = 330.0f; player->camEye.x = 1350.0f; player->camAt.x = gCsCamAtX = 1450.0f; @@ -4641,8 +4642,8 @@ void Zoness_8019D76C(Player* player) { break; case 3: D_ctx_80177CE8 += 60.0f; - D_ctx_80178358 = 0; - D_ctx_8017835C = 4; + gFillScreenAlphaTarget = 0; + gFillScreenAlphaStep = 4; D_ctx_80177A48[1] += D_ctx_80177A48[2]; Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, 0); sp58.x = 0.0f; @@ -4662,12 +4663,12 @@ void Zoness_8019D76C(Player* player) { gCsCamAtY = player->pos.y; gCsCamAtZ = player->pos.z + D_ctx_80177D20; } - if (gCsFrameCount >= 1181) { + if (gCsFrameCount > 1180) { player->unk_0D0 += 2.0f; player->unk_0E4 += 0.1f; Math_SmoothStepToF(&D_ctx_80177A48[2], 0.0f, 1.0f, 0.001f, 0); player->unk_190 = 2.0f; - if (D_enmy_80161684 == 0) { + if (!gMissedZoSearchlight) { Math_SmoothStepToF(&D_ctx_80177A48[0], 1.0f, 1.0f, 0.025f, 0.0f); } } else { @@ -4677,11 +4678,11 @@ void Zoness_8019D76C(Player* player) { if (gCsFrameCount == 1300) { func_play_800A6148(); } - if (gCsFrameCount >= 1271) { - D_ctx_80178358 = 255; - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0; - D_ctx_8017835C = 8; - if (D_ctx_80178340 == 255) { + if (gCsFrameCount > 1270) { + gFillScreenAlphaTarget = 255; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; + gFillScreenAlphaStep = 8; + if (gFillScreenAlpha == 255) { func_8001CA24(0); Audio_FadeOutAll(10); player->state_1C8 = PLAYERSTATE_1C8_6; @@ -4695,16 +4696,16 @@ void Zoness_8019D76C(Player* player) { (void) "Demo_Time %d\n"; switch (gCsFrameCount) { case 320: - if (D_enmy_80161684 == 0) { - D_ctx_80177930 = 1; + if (!gMissedZoSearchlight) { + gNextPlanetPath = 1; } - D_ctx_80177840 = 100; + gLevelClearScreenTimer = 100; break; case 380: Radio_PlayMessage(gMsg_ID_20010, RCID_FOX); break; case 468: - switch (gTeamShields[2]) { + switch (gTeamShields[TEAM_ID_SLIPPY]) { case 0: Radio_PlayMessage(gMsg_ID_20345, RCID_ROB64); break; @@ -4717,7 +4718,7 @@ void Zoness_8019D76C(Player* player) { } break; case 603: - switch (gTeamShields[3]) { + switch (gTeamShields[TEAM_ID_PEPPY]) { case 0: Radio_PlayMessage(gMsg_ID_20344, RCID_ROB64); break; @@ -4725,7 +4726,7 @@ void Zoness_8019D76C(Player* player) { Radio_PlayMessage(gMsg_ID_20338, RCID_ROB64); break; default: - if (D_enmy_80161684 == 0) { + if (!gMissedZoSearchlight) { func_demo_80048AC0(3); } else { Radio_PlayMessage(gMsg_ID_6100, RCID_PEPPY); @@ -4734,7 +4735,7 @@ void Zoness_8019D76C(Player* player) { } break; case 738: - switch (gTeamShields[1]) { + switch (gTeamShields[TEAM_ID_FALCO]) { case 0: Radio_PlayMessage(gMsg_ID_20343, RCID_ROB64); break; @@ -4761,17 +4762,17 @@ void Zoness_8019D76C(Player* player) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); break; case 1120: - if (gTeamShields[3] > 0) { + if (gTeamShields[TEAM_ID_PEPPY] > 0) { gActors[0].state = 2; } break; case 1140: - if (gTeamShields[2] > 0) { + if (gTeamShields[TEAM_ID_SLIPPY] > 0) { gActors[1].state = 2; } break; case 1160: - if (gTeamShields[1] > 0) { + if (gTeamShields[TEAM_ID_FALCO] > 0) { gActors[2].state = 2; } break; @@ -4821,7 +4822,7 @@ void Zoness_8019E5F0(Actor* actor) { case 10: break; case 1: - if ((actor->unk_0B6 != 0) && ((((actor->index & 7) * 10) + 1030) < gCsFrameCount)) { + if ((actor->unk_0B6 != 0) && ((((s32) (actor->index % 8U) * 10) + 1030) < gCsFrameCount)) { actor->state = 4; } break; diff --git a/src/overlays/ovl_i4/fox_bo.c b/src/overlays/ovl_i4/fox_bo.c index 30a74efd..74c03277 100644 --- a/src/overlays/ovl_i4/fox_bo.c +++ b/src/overlays/ovl_i4/fox_bo.c @@ -94,7 +94,7 @@ void Bolse_8018BD60(Actor* actor) { f32 D_i4_8019EEC4[4] = { 8000.0f, -8000.0f, 8000.0f, -8000.0f }; f32 D_i4_8019EED4[4] = { 8000.0f, 8000.0f, -8000.0f, -8000.0f }; - if (D_360_8015F924 == 0) { + if (gAllRangeCheckpoint == 0) { actor->unk_04E++; if (actor->unk_04E >= 4) { actor->unk_04E = 0; @@ -207,29 +207,29 @@ void Bolse_8018C158(Actor* actor) { switch (actor->state) { case 0: D_360_800C9B4C = 500000; - D_360_8015F928 = 0; - D_360_8015F908 = 0; + gAllRangeEventTimer = 0; + gStarWolfMsgTimer = 0; actor->state = 2; - if (D_360_8015F924 == 0) { + if (gAllRangeCheckpoint == 0) { gBosses[0].fwork[1] = 0.3f; D_BO_801A03DC = 6; } else { - D_360_8015F924 = 1; + gAllRangeCheckpoint = 1; gHitCount = gSavedHitCount; gBosses[1].state = 2; - D_360_8015F928 = 3000; + gAllRangeEventTimer = 3000; actor->iwork[1] = gHitCount; } for (i = 0; i < 6; i++) { - D_ctx_80177CD0[i] = D_ctx_80177CF0[i]; + gStarWolfTeamAlive[i] = gSavedStarWolfTeamAlive[i]; } case 2: Bolse_8018BD60(actor); - switch (D_360_8015F928) { + switch (gAllRangeEventTimer) { case 300: Radio_PlayMessage(gMsg_ID_11020, RCID_PEPPY); break; @@ -253,7 +253,7 @@ void Bolse_8018C158(Actor* actor) { break; } - if ((D_i4_801A0530 < 9600) && (D_i4_801A0530 & 1024)) { + if ((D_i4_801A0530 < 9600) && (D_i4_801A0530 & 0x400)) { Bolse_8018BEF8(actor, 8); } @@ -296,13 +296,14 @@ void Bolse_8018C158(Actor* actor) { for (i = 10; i < 30; i++) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); } - } else if ((D_360_8015F924 == 1) && (((gHitCount - actor->iwork[1]) >= 5) || (D_i4_801A0530 == 4000))) { - D_360_8015F924 = 2; + } else if ((gAllRangeCheckpoint == 1) && + (((gHitCount - actor->iwork[1]) >= 5) || (D_i4_801A0530 == 4000))) { + gAllRangeCheckpoint = 2; actor->iwork[1] = gHitCount; - if ((D_ctx_80177CD0[0] != 0) || (D_ctx_80177CD0[1] != 0) || (D_ctx_80177CD0[2] != 0) || - (D_ctx_80177CD0[3] != 0)) { - D_360_800C9B4C = D_360_8015F928 + 120; - D_360_8015F908 = 1000; + if ((gStarWolfTeamAlive[0] != 0) || (gStarWolfTeamAlive[1] != 0) || (gStarWolfTeamAlive[2] != 0) || + (gStarWolfTeamAlive[3] != 0)) { + D_360_800C9B4C = gAllRangeEventTimer + 120; + gStarWolfMsgTimer = 1000; } } break; @@ -311,7 +312,7 @@ void Bolse_8018C158(Actor* actor) { D_bg_800C9C34 = 0; for (i = 0; i < 4; i++) { - if (D_ctx_80177CD0[i] != 0) { + if (gStarWolfTeamAlive[i] != 0) { actorPtr = &gActors[i + 4]; break; } @@ -331,14 +332,14 @@ void Bolse_8018C158(Actor* actor) { Math_SmoothStepToF(&player->camAt.z, actorPtr->obj.pos.z, 1.0f, 20000.0f, 0.0f); Math_SmoothStepToF(&player->unk_034, 0.0f, 0.1f, 0.2f, 0); - if ((gControllerPress->button & START_BUTTON) || ((D_360_800C9B4C + 300) == D_360_8015F928)) { + if ((gControllerPress->button & START_BUTTON) || ((D_360_800C9B4C + 300) == gAllRangeEventTimer)) { actor->state = 2; player->state_1C8 = PLAYERSTATE_1C8_3; func_play_800B7184(player, 1); player->unk_014 = 0.0f; D_hud_80161708 = 0; } - D_ctx_801779BC = 0; + gPauseEnabled = 0; break; case 10: @@ -368,19 +369,19 @@ void Bolse_8018C158(Actor* actor) { if (actor->timer_0BC == 130) { Radio_PlayMessage(gMsg_ID_11060, RCID_FALCO); - D_360_8015F924 = 1; + gAllRangeCheckpoint = 1; gSavedHitCount = gHitCount; - for (i = 1; i < 4; i++) { + for (i = TEAM_ID_FALCO; i <= TEAM_ID_PEPPY; i++) { gSavedTeamShields[i] = gTeamShields[i]; } } - if (!(actor->timer_0BC & 7)) { + if ((actor->timer_0BC % 8) == 0) { Bolse_8018BEF8(actor, 15); } if (!actor->timer_0BC) { - D_360_8015F928 = 3000; + gAllRangeEventTimer = 3000; actor->state = 2; player->state_1C8 = PLAYERSTATE_1C8_3; func_play_800B7184(player, 1); @@ -402,29 +403,29 @@ void Bolse_8018C158(Actor* actor) { break; } - if (D_360_8015F908 != 0) { - D_360_8015F908--; - switch (D_360_8015F908) { + if (gStarWolfMsgTimer != 0) { + gStarWolfMsgTimer--; + switch (gStarWolfMsgTimer) { case 860: - if (D_ctx_80177CD0[0] != 0) { + if (gStarWolfTeamAlive[0] != 0) { Radio_PlayMessage(gMsg_ID_11100, RCID_WOLF); } break; case 760: - if (D_ctx_80177CD0[1] != 0) { + if (gStarWolfTeamAlive[1] != 0) { Radio_PlayMessage(gMsg_ID_11110, RCID_LEON); } break; case 660: - if (D_ctx_80177CD0[2] != 0) { + if (gStarWolfTeamAlive[2] != 0) { Radio_PlayMessage(gMsg_ID_11120, RCID_PIGMA); } break; case 550: - if (D_ctx_80177CD0[3] != 0) { + if (gStarWolfTeamAlive[3] != 0) { Radio_PlayMessage(gMsg_ID_11130, RCID_ANDREW); } break; @@ -443,7 +444,7 @@ void Bolse_8018C158(Actor* actor) { s32 Bolse_8018CC60(Actor* actor) { Vec3f sp1C; - if (D_360_8015F924 == 0) { + if (gAllRangeCheckpoint == 0) { actor->obj.pos.x = sp1C.x = actor->fwork[10]; actor->obj.pos.y = sp1C.y = actor->fwork[11]; actor->obj.pos.z = sp1C.z = actor->fwork[12]; @@ -529,7 +530,7 @@ s32 Bolse_8018CE5C(Actor* actor) { return 0; } - if (!((actor->index + gGameFrameCount) & 3)) { + if (((actor->index + gGameFrameCount) & 3) == 0) { x = actor->fwork[0] - actor->obj.pos.x + RAND_FLOAT_CENTERED(100.0f); y = actor->fwork[1] - (actor->obj.pos.y + 180.0f) + RAND_FLOAT_CENTERED(100.0f); z = actor->fwork[2] - actor->obj.pos.z; @@ -593,7 +594,7 @@ void Bolse_8018D124(Actor* actor) { src.y = 0.0f; src.x = 0.0f; - src.z = D_ctx_80177828; + src.z = gEnemyShotSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); func_effect_8007F04C(OBJ_EFFECT_353, actor->obj.pos.x + dest.x, actor->obj.pos.y + 180.0f + dest.y, @@ -623,7 +624,7 @@ bool Bolse_8018D278(Actor* actor) { actor->itemDrop = DROP_SILVER_RING; - func_enmy_80066254(actor); + Actor_Despawn(actor); Object_Kill(&actor->obj, actor->sfxSource); actor->info.bonus = 0; @@ -732,7 +733,7 @@ bool Bolse_8018D584(Actor* actor) { } void Bolse_8018D7F0(Actor* actor) { - if (D_360_8015F924 != 0) { + if (gAllRangeCheckpoint != 0) { actor->state = 1; } @@ -753,11 +754,11 @@ bool Bolse_8018D874(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th Actor* actor = (Actor*) this; RCP_SetupDL(&gMasterDisp, 0x1D); - if (((limbIndex == 1) || (limbIndex == 2)) && (actor->timer_0C6 & 1)) { + if (((limbIndex == 1) || (limbIndex == 2)) && ((actor->timer_0C6 % 2) != 0)) { RCP_SetupDL(&gMasterDisp, 0x29); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 64, 64, 255); } - if (((limbIndex == 1) || (limbIndex == 2)) && ((actor->health >= 100) || (D_360_8015F924 != 0))) { + if (((limbIndex == 1) || (limbIndex == 2)) && ((actor->health >= 100) || (gAllRangeCheckpoint != 0))) { *dList = NULL; } @@ -990,7 +991,7 @@ void Bolse_8018E870(Boss* boss) { gSPDisplayList(gMasterDisp++, D_BO_6002020); } - if (gGameFrameCount & 1) { + if ((gGameFrameCount % 2) != 0) { alpha = 128; } else { alpha = 30; @@ -1157,13 +1158,13 @@ void Bolse_8018EF6C(Player* player) { player->unk_0D0 = 30.0f; - if (gTeamShields[1] > 0) { + if (gTeamShields[TEAM_ID_FALCO] > 0) { Bolse_8018EAEC(&gActors[0], 0); } - if (gTeamShields[2] > 0) { + if (gTeamShields[TEAM_ID_SLIPPY] > 0) { Bolse_8018EAEC(&gActors[1], 1); } - if (gTeamShields[3] > 0) { + if (gTeamShields[TEAM_ID_PEPPY] > 0) { Bolse_8018EAEC(&gActors[2], 2); } @@ -1186,11 +1187,11 @@ void Bolse_8018EF6C(Player* player) { player->unk_204 = 1; D_ctx_80177A48[0] = 1.0f; - D_ctx_80178340 = D_ctx_80178358 = 255; + gFillScreenAlpha = gFillScreenAlphaTarget = 255; break; case 1: - D_ctx_80178358 = 0; + gFillScreenAlphaTarget = 0; gCsCamAtX = 0.0f; gCsCamAtY = player->pos.y; gCsCamAtZ = player->pos.z; @@ -1198,7 +1199,7 @@ void Bolse_8018EF6C(Player* player) { sp60 = SIN_DEG(D_ctx_80177A48[2]) * 10.0f; player->unk_0EC = SIN_DEG(D_ctx_80177A48[2]) * -60.0f; - if (!(gCsFrameCount & 7) && (Rand_ZeroOne() < 0.5f)) { + if (((gCsFrameCount % 8) == 0) && (Rand_ZeroOne() < 0.5f)) { Bolse_8018ED44(); } @@ -1306,7 +1307,7 @@ void Bolse_8018EF6C(Player* player) { actor->timer_0BC = 80; } AUDIO_PLAY_BGM(gBgmSeqId); - D_ctx_80177838 = 80; + gLevelStatusScreenTimer = 80; } break; } @@ -1425,13 +1426,13 @@ void Bolse_8018F94C(Player* player) { player->unk_114 = 0.0f; player->unk_0D0 = 40.0f; - if (gTeamShields[1] > 0) { + if (gTeamShields[TEAM_ID_FALCO] > 0) { Bolse_8018F83C(&gActors[0], 0); } - if (gTeamShields[2] > 0) { + if (gTeamShields[TEAM_ID_SLIPPY] > 0) { Bolse_8018F83C(&gActors[1], 1); } - if (gTeamShields[3] > 0) { + if (gTeamShields[TEAM_ID_PEPPY] > 0) { Bolse_8018F83C(&gActors[2], 2); } @@ -1444,7 +1445,7 @@ void Bolse_8018F94C(Player* player) { gCsCamAtX = gPlayer[0].pos.x; gCsCamAtY = gPlayer[0].pos.y; gCsCamAtZ = gPlayer[0].pos.z; - D_ctx_80178340 = D_ctx_80178358 = 255; + gFillScreenAlpha = gFillScreenAlphaTarget = 255; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); gCsFrameCount = 0; @@ -1457,7 +1458,7 @@ void Bolse_8018F94C(Player* player) { break; case 5: - D_ctx_80178340 = D_ctx_80178358 = 0; + gFillScreenAlpha = gFillScreenAlphaTarget = 0; player->unk_1D0 = 10; case 10: @@ -1468,12 +1469,12 @@ void Bolse_8018F94C(Player* player) { actor50->obj.pos.y -= 5; if (gCsFrameCount < 92) { - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2U) == 0)) { func_effect_8007C484(actor50->obj.pos.x + RAND_FLOAT_CENTERED(1000.0f), actor50->obj.pos.y + 100.0f, actor50->obj.pos.z + RAND_FLOAT_CENTERED(1000.0f), 0.0f, 0.0f, 0.0f, RAND_FLOAT(0.4f) + 0.4f, 0.0f); } - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2U) == 0)) { //! FAKE: do { } while (0); @@ -1531,7 +1532,7 @@ void Bolse_8018F94C(Player* player) { case 235: player->unk_204 = 1; - D_ctx_80177840 = 100; + gLevelClearScreenTimer = 100; break; case 240: @@ -1621,9 +1622,9 @@ void Bolse_8018F94C(Player* player) { } if (player->timer_1F8 == 0) { - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0; - D_ctx_80178358 = 255; - if (D_ctx_80178340 == 255) { + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; + gFillScreenAlphaTarget = 255; + if (gFillScreenAlpha == 255) { D_ctx_80161A94[0] = gGoldRingCount[0]; gNextGameState = GSTATE_PLAY; gNextLevel = LEVEL_VENOM_1; @@ -1631,15 +1632,15 @@ void Bolse_8018F94C(Player* player) { Audio_KillSfxBySource(player->sfxSource); D_play_800D3180[LEVEL_BOLSE] = Play_CheckMedalStatus(150) + 1; - for (i = 1; i < 6; i++) { - D_ctx_80177C38[i] = gTeamShields[i]; - D_ctx_801778F0[i] = gSavedTeamShields[i]; + for (i = TEAM_ID_FALCO; i < TEAM_ID_MAX; i++) { + gPrevPlanetTeamShields[i] = gTeamShields[i]; + gPrevPlanetSavedTeamShields[i] = gSavedTeamShields[i]; gSavedTeamShields[i] = gTeamShields[i]; } - for (i = 1; i < 4; i++) { - if (D_ctx_80177C38[i] == 0) { - D_ctx_80177C38[i] = 255; + for (i = TEAM_ID_FALCO; i <= TEAM_ID_PEPPY; i++) { + if (gPrevPlanetTeamShields[i] == 0) { + gPrevPlanetTeamShields[i] = 255; } } func_hud_80088564(); @@ -1664,12 +1665,12 @@ void Bolse_8018F94C(Player* player) { if (actor50->unk_046 != 0) { Math_SmoothStepToF(&actor50->fwork[20], 3.0f, 0.03f, 0.01f, 0); - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2U) == 0)) { func_effect_8007C484( RAND_FLOAT_CENTERED(5000.0f) + actor50->obj.pos.x, RAND_FLOAT_CENTERED(5000.0f) + actor50->obj.pos.y, RAND_FLOAT_CENTERED(5000.0f) + actor50->obj.pos.z, 0.0f, 0.0f, 0.0f, RAND_FLOAT(0.8f) + 0.8f, 0); } - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2U) == 0)) { func_effect_8007BFFC( RAND_FLOAT_CENTERED(5000.0f) + actor50->obj.pos.x, RAND_FLOAT_CENTERED(5000.0f) + actor50->obj.pos.y, RAND_FLOAT_CENTERED(5000.0f) + actor50->obj.pos.z, 0.0f, 0.0f, 0.0f, RAND_FLOAT(10.0f) + 20.0f, 5); @@ -1854,7 +1855,7 @@ void Bolse_801912FC(Boss* boss) { Vec3f src; Vec3f dest; - if (gGameFrameCount & 24) { + if (gGameFrameCount & 0x18) { Math_SmoothStepToF(&D_i4_8019EEC0, 0.0f, 1.0f, 30.0f, 0); } else { Math_SmoothStepToF(&D_i4_8019EEC0, 255.0f, 1.0f, 30.0f, 0); @@ -1862,7 +1863,7 @@ void Bolse_801912FC(Boss* boss) { switch (boss->state) { case 0: - if (D_360_8015F924 == 2) { + if (gAllRangeCheckpoint == 2) { boss->state = 1; } boss->dmgType = DMG_NONE; @@ -1937,7 +1938,7 @@ void Bolse_801912FC(Boss* boss) { for (i = 0; i < 8; i++) { if (boss->swork[i + 24] != 0) { boss->swork[i + 24]--; - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { func_effect_8007797C(boss->vwork[i].x, boss->vwork[i].y, boss->vwork[i].z, boss->vwork[i].x * 0.2f, 0.0f, boss->vwork[i].z * 0.2f, 5.0f); } @@ -1945,7 +1946,7 @@ void Bolse_801912FC(Boss* boss) { if (boss->swork[i] <= 0) { boss->info.hitbox[i * 6 + 4] = -200.0f; - if (!((gGameFrameCount + i) & 7)) { + if (((gGameFrameCount + i) % 8) == 0) { Bolse_80190EE4(boss->vwork[i].x, boss->vwork[i].y, boss->vwork[i].z, RAND_FLOAT_CENTERED(30.0f), boss->obj.rot.y + D_i4_8019F09C[i] + RAND_FLOAT_CENTERED(30.0f)); boss->swork[i + 12] = 1003; @@ -1993,7 +1994,7 @@ bool Bolse_801918E4(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th case 14: case 15: case 16: - if (boss->swork[3 + limbIndex] & 1) { + if ((boss->swork[3 + limbIndex] % 2) != 0) { RCP_SetupDL(&gMasterDisp, 0x29); if (boss->swork[3 + limbIndex] > 1000) { gDPSetPrimColor(gMasterDisp++, 0, 0, 64, 64, 255, 255); @@ -2068,7 +2069,7 @@ void Bolse_80191BAC(Boss* boss) { } if (D_ctx_8017812C == 0) { - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { D_ctx_8017836C = 0.0f; } else { D_ctx_8017836C = 0.5f; @@ -2088,7 +2089,7 @@ void Bolse_80191DB0(Boss* boss) { Matrix_Scale(gGfxMatrix, boss->unk_3F8, boss->unk_3F8, boss->unk_3F8, 1); alpha = boss->fwork[0]; if (alpha != 0) { - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { alpha *= 1.7f; } RCP_SetupDL(&gMasterDisp, 0x29); @@ -2105,40 +2106,40 @@ void Bolse_80191ED8(void) { Boss* boss; Object_58* obj58; - D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(D_enmy_800CFDA0[gCurrentLevel]); + gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]); for (obj58 = gObjects58, i = 0; i < 1000; i++) { - if (D_ctx_80178310[i].id < 0) { + if (gLevelObjects[i].id < 0) { break; } - if (D_ctx_80178310[i].id < 161) { + if (gLevelObjects[i].id < 161) { Object_58_Initialize(obj58); obj58->obj.status = OBJ_ACTIVE; - obj58->obj.id = D_ctx_80178310[i].id; - obj58->sfxSource[0] = obj58->obj.pos.x = D_ctx_80178310[i].xPos; - obj58->sfxSource[1] = obj58->obj.pos.y = D_ctx_80178310[i].yPos; - obj58->sfxSource[2] = obj58->obj.pos.z = -D_ctx_80178310[i].zPos1; - obj58->unk_54 = obj58->obj.rot.y = D_ctx_80178310[i].rot.y; + obj58->obj.id = gLevelObjects[i].id; + obj58->sfxSource[0] = obj58->obj.pos.x = gLevelObjects[i].xPos; + obj58->sfxSource[1] = obj58->obj.pos.y = gLevelObjects[i].yPos; + obj58->sfxSource[2] = obj58->obj.pos.z = -gLevelObjects[i].zPos1; + obj58->unk_54 = obj58->obj.rot.y = gLevelObjects[i].rot.y; Object_SetInfo(&obj58->info, obj58->obj.id); obj58++; } } for (actor = &gActors[30], i = 0; i < 1000; i++) { - if (D_ctx_80178310[i].id < 0) { + if (gLevelObjects[i].id < 0) { break; } - if ((D_ctx_80178310[i].id >= OBJ_ACTOR_176) && (D_ctx_80178310[i].id <= OBJ_ACTOR_SUPPLIES)) { + if ((gLevelObjects[i].id >= OBJ_ACTOR_176) && (gLevelObjects[i].id <= OBJ_ACTOR_SUPPLIES)) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = D_ctx_80178310[i].id; - if ((actor->obj.id == OBJ_ACTOR_271) && (D_360_8015F924 == 0)) { + actor->obj.id = gLevelObjects[i].id; + if ((actor->obj.id == OBJ_ACTOR_271) && (gAllRangeCheckpoint == 0)) { AUDIO_PLAY_SFX(0x11000028U, actor->sfxSource, 0U); } - actor->fwork[10] = actor->obj.pos.x = D_ctx_80178310[i].xPos; - actor->fwork[11] = actor->obj.pos.y = D_ctx_80178310[i].yPos; - actor->fwork[12] = actor->obj.pos.z = -D_ctx_80178310[i].zPos1; - actor->fwork[13] = actor->obj.rot.y = D_ctx_80178310[i].rot.y; + actor->fwork[10] = actor->obj.pos.x = gLevelObjects[i].xPos; + actor->fwork[11] = actor->obj.pos.y = gLevelObjects[i].yPos; + actor->fwork[12] = actor->obj.pos.z = -gLevelObjects[i].zPos1; + actor->fwork[13] = actor->obj.rot.y = gLevelObjects[i].rot.y; Object_SetInfo(&actor->info, actor->obj.id); actor++; } @@ -2184,7 +2185,7 @@ void Bolse_80192264(void) { if (gBosses[1].obj.status == OBJ_ACTIVE) { RCP_SetupDL(&gMasterDisp, 0x22); - if (gGameFrameCount & 1) { + if ((gGameFrameCount % 2) != 0) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 128, 160, 255); } else { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 192, 224, 255); diff --git a/src/overlays/ovl_i4/fox_fo.c b/src/overlays/ovl_i4/fox_fo.c index 69ed460f..bef5f0cb 100644 --- a/src/overlays/ovl_i4/fox_fo.c +++ b/src/overlays/ovl_i4/fox_fo.c @@ -20,7 +20,7 @@ void Fortuna_801875F0(Actor* actor) { } if ((counter < 10) && (actor->timer_0C0 == 0)) { - if (D_360_8015F928 < (D_360_800C9B4C - 500)) { + if (gAllRangeEventTimer < (D_360_800C9B4C - 500)) { actor->timer_0C0 = 40; actor->unk_04E++; @@ -107,70 +107,70 @@ void Fortuna_80187960(Actor* actor) { s32 pad[2]; if ((player->state_1C8 == PLAYERSTATE_1C8_4) || (player->state_1C8 == PLAYERSTATE_1C8_6)) { - D_360_8015F928 = 20000; + gAllRangeEventTimer = 20000; return; } - if (D_360_8015F928 == 50) { + if (gAllRangeEventTimer == 50) { Radio_PlayMessage(gMsg_ID_9000, RCID_FOX); } - if ((D_360_8015F928 + 400) == (0, D_360_800C9B4C)) { + if ((gAllRangeEventTimer + 400) == (0, D_360_800C9B4C)) { Radio_PlayMessage(gMsg_ID_9010, RCID_SLIPPY); } - if ((D_360_8015F928 + 240) == (0, D_360_800C9B4C)) { + if ((gAllRangeEventTimer + 240) == (0, D_360_800C9B4C)) { Radio_PlayMessage(gMsg_ID_9375, RCID_ROB64); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); } - if ((D_360_8015F928 + 100) == (0, D_360_800C9B4C)) { + if ((gAllRangeEventTimer + 100) == (0, D_360_800C9B4C)) { Radio_PlayMessage(gMsg_ID_9380, RCID_FOX); } - if (D_360_8015F928 == 7160) { + if (gAllRangeEventTimer == 7160) { Radio_PlayMessage(gMsg_ID_9385, RCID_FOX); } - if (D_360_8015F928 == 7000) { + if (gAllRangeEventTimer == 7000) { AUDIO_PLAY_SFX(0x11030016U, gBosses[0].sfxSource, 4U); func_360_8002EE34(); Radio_PlayMessage(gMsg_ID_9390, RCID_ROB64); - D_360_8015F944 = 1.0f; - D_360_8015F93C = 1; - D_360_8015F930[0] = 1; - D_360_8015F930[1] = PLAYERSTATE_1C8_4; - D_360_8015F930[2] = 99; + gAllRangeCountdownScale = 1.0f; + gShowAllRangeCountdown = 1; + gAllRangeCountdown[0] = 1; + gAllRangeCountdown[1] = 4; + gAllRangeCountdown[2] = 99; } - if (D_360_8015F928 == 8036) { + if (gAllRangeEventTimer == 8036) { Radio_PlayMessage(gMsg_ID_9395, RCID_ROB64); } - if (D_360_8015F928 == 8540) { + if (gAllRangeEventTimer == 8540) { Radio_PlayMessage(gMsg_ID_9400, RCID_ROB64); Audio_PlaySequence(SEQ_PLAYER_BGM, SEQ_ID_FORTUNA | SEQ_FLAG, 0, 0); gActors[1].aiIndex = gActors[2].aiIndex = gActors[3].aiIndex = gActors[4].aiIndex = gActors[5].aiIndex = gActors[6].aiIndex = gActors[7].aiIndex = -1; } - if ((D_360_800C9B4C < D_360_8015F928) && (D_360_8015F928 < 9970) && (D_ctx_80177CD0[0] == 0) && - (D_ctx_80177CD0[1] == 0) && (D_ctx_80177CD0[2] == 0) && (D_ctx_80177CD0[3] == 0)) { - D_360_8015F928 = 9970; + if ((D_360_800C9B4C < gAllRangeEventTimer) && (gAllRangeEventTimer < 9970) && (gStarWolfTeamAlive[0] == 0) && + (gStarWolfTeamAlive[1] == 0) && (gStarWolfTeamAlive[2] == 0) && (gStarWolfTeamAlive[3] == 0)) { + gAllRangeEventTimer = 9970; } - if (D_360_8015F928 == 9056) { - if ((D_ctx_80177CD0[0] != 0) || (D_ctx_80177CD0[1] != 0) || (D_ctx_80177CD0[2] != 0) || - ((D_ctx_80177CD0[3] != 0))) { + if (gAllRangeEventTimer == 9056) { + if ((gStarWolfTeamAlive[0] != 0) || (gStarWolfTeamAlive[1] != 0) || (gStarWolfTeamAlive[2] != 0) || + ((gStarWolfTeamAlive[3] != 0))) { Radio_PlayMessage(gMsg_ID_9405, RCID_ROB64); } else { - D_360_8015F928 = 9995; + gAllRangeEventTimer = 9995; } } - if (D_360_8015F928 == 9206) { - D_360_8015F93C = 0; + if (gAllRangeEventTimer == 9206) { + gShowAllRangeCountdown = 0; actor->state = 5; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_0; actor->iwork[0] = 0; @@ -181,13 +181,13 @@ void Fortuna_80187960(Actor* actor) { } } - if ((D_360_8015F928 == 10000) && ((D_ctx_80177CD0[0] != 0) || (D_ctx_80177CD0[1] != 0) || - (D_ctx_80177CD0[2] != 0) || (D_ctx_80177CD0[3] != 0))) { + if ((gAllRangeEventTimer == 10000) && ((gStarWolfTeamAlive[0] != 0) || (gStarWolfTeamAlive[1] != 0) || + (gStarWolfTeamAlive[2] != 0) || (gStarWolfTeamAlive[3] != 0))) { Radio_PlayMessage(gMsg_ID_9420, RCID_FOX); } - if (D_360_8015F928 == 10100) { - D_360_8015F93C = 0; + if (gAllRangeEventTimer == 10100) { + gShowAllRangeCountdown = 0; actor->iwork[0] = 0; actor->state = 6; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_7; @@ -200,10 +200,10 @@ void Fortuna_80187960(Actor* actor) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); } - if ((D_ctx_80177CD0[0] == 0) && (D_ctx_80177CD0[1] == 0) && (D_ctx_80177CD0[2] == 0) && - (D_ctx_80177CD0[3] == 0)) { + if ((gStarWolfTeamAlive[0] == 0) && (gStarWolfTeamAlive[1] == 0) && (gStarWolfTeamAlive[2] == 0) && + (gStarWolfTeamAlive[3] == 0)) { Radio_PlayMessage(gMsg_ID_9411, RCID_FOX); - D_ctx_80177930 = 1; + gNextPlanetPath = 1; gPlayer[0].timer_1F8 = 50; player->unk_190 = 5.0f; player->unk_194 = 5.0f; @@ -211,7 +211,7 @@ void Fortuna_80187960(Actor* actor) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 30); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 30); } else { - D_ctx_80177930 = 0; + gNextPlanetPath = 0; gPlayer[0].timer_1F8 = 30; } } @@ -220,19 +220,19 @@ void Fortuna_80187960(Actor* actor) { case 0: D_360_800C9B4C = 2880; for (i = 0; i < 6; i++) { - D_ctx_80177CF0[i] = 1; - D_ctx_80177CD0[i] = 1; + gSavedStarWolfTeamAlive[i] = 1; + gStarWolfTeamAlive[i] = 1; } - D_360_8015F928 = 0; - D_360_8015F908 = 0; + gAllRangeEventTimer = 0; + gStarWolfMsgTimer = 0; if (player->state_1C8 == PLAYERSTATE_1C8_3) { actor->state = 2; player->pos.x = 0.0f; player->pos.z = 8000.0f; player->pos.y = 670.0f; - D_360_8015F928 = 200; - if (D_360_8015F924 != 0) { - D_360_8015F928 = D_360_800C9B4C - 1; + gAllRangeEventTimer = 200; + if (gAllRangeCheckpoint != 0) { + gAllRangeEventTimer = D_360_800C9B4C - 1; gHitCount = gSavedHitCount; } } else { @@ -264,7 +264,7 @@ void Fortuna_80187960(Actor* actor) { player->state_1C8 = PLAYERSTATE_1C8_3; player->unk_014 = 0.0001f; AUDIO_PLAY_BGM(gBgmSeqId); - D_ctx_80177838 = 80; + gLevelStatusScreenTimer = 80; } }; break; @@ -281,29 +281,29 @@ void Fortuna_80187960(Actor* actor) { Math_SmoothStepToF(&player->camAt.y, actor4->obj.pos.y, 1.0f, 20000.0f, 0.0f); Math_SmoothStepToF(&player->camAt.z, actor4->obj.pos.z, 1.0f, 20000.0f, 0.0f); Math_SmoothStepToF(&player->unk_034, 0.0f, 1.0f, 1000.0f, 0.0f); - if (D_360_8015F928 == (D_360_800C9B4C + 2)) { - D_360_8015F908 = 883; - D_360_8015F924 = 1; + if (gAllRangeEventTimer == (D_360_800C9B4C + 2)) { + gStarWolfMsgTimer = 883; + gAllRangeCheckpoint = 1; gSavedHitCount = gHitCount; - for (i = 1; i < 4; i++) { + for (i = TEAM_ID_FALCO; i <= TEAM_ID_PEPPY; i++) { gSavedTeamShields[i] = gTeamShields[i]; }; } - if ((gControllerPress->button & START_BUTTON) || (D_360_8015F928 == (D_360_800C9B4C + 440))) { + if ((gControllerPress->button & START_BUTTON) || (gAllRangeEventTimer == (D_360_800C9B4C + 440))) { actor->state = 2; player->state_1C8 = PLAYERSTATE_1C8_3; func_play_800B7184(player, 1); player->unk_014 = 0.0f; D_hud_80161708 = 0; } - D_ctx_801779BC = 0; + gPauseEnabled = 0; break; case 5: - D_360_8015F928 = 9207; + gAllRangeEventTimer = 9207; actor->iwork[0] += 1; actor->fwork[0] += 10.0f; player->camEye.x = 300.0f; @@ -314,21 +314,21 @@ void Fortuna_80187960(Actor* actor) { player->camAt.z = -15000.0f; player->unk_034 = 0.0f; - if ((actor->iwork[0] == 50) && (D_ctx_80177CD0[0] != 0)) { + if ((actor->iwork[0] == 50) && (gStarWolfTeamAlive[0] != 0)) { if (gRadioState == 0) { Radio_PlayMessage(gMsg_ID_9431, RCID_WOLF); } Fortuna_80187884(&gActors[4], player->camEye.x - 200.0f, player->camEye.y, player->camEye.z, 160.0f); } - if ((actor->iwork[0] == 70) && (D_ctx_80177CD0[1] != 0)) { + if ((actor->iwork[0] == 70) && (gStarWolfTeamAlive[1] != 0)) { if (gRadioState == 0) { Radio_PlayMessage(gMsg_ID_9432, RCID_LEON); } Fortuna_80187884(&gActors[5], player->camEye.x, player->camEye.y + 50.0f, player->camEye.z, 160.0f); } - if ((actor->iwork[0] == 90) && (D_ctx_80177CD0[2] != 0)) { + if ((actor->iwork[0] == 90) && (gStarWolfTeamAlive[2] != 0)) { if (gRadioState == 0) { Radio_PlayMessage(gMsg_ID_9433, RCID_PIGMA); } @@ -336,7 +336,7 @@ void Fortuna_80187960(Actor* actor) { 160.0f); } - if ((actor->iwork[0] == 110) && (D_ctx_80177CD0[3] != 0)) { + if ((actor->iwork[0] == 110) && (gStarWolfTeamAlive[3] != 0)) { if (gRadioState == 0) { Radio_PlayMessage(gMsg_ID_9434, RCID_ANDREW); } @@ -356,14 +356,14 @@ void Fortuna_80187960(Actor* actor) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); } - D_360_8015F93C = 1; - D_360_8015F928 = 9970; + gShowAllRangeCountdown = 1; + gAllRangeEventTimer = 9970; } break; case 6: actor->iwork[0] += 1; - if (D_ctx_80177930 == 0) { + if (gNextPlanetPath == 0) { actor1->aiIndex = AI360_FOX; actor1->state = 2; actor2->aiIndex = AI360_FOX; @@ -398,24 +398,24 @@ void Fortuna_80187960(Actor* actor) { break; } - if (D_360_8015F908 != 0) { - D_360_8015F908--; - switch (D_360_8015F908) { + if (gStarWolfMsgTimer != 0) { + gStarWolfMsgTimer--; + switch (gStarWolfMsgTimer) { case 860: - if (D_ctx_80177CD0[0] != 0) { + if (gStarWolfTeamAlive[0] != 0) { Radio_PlayMessage(gMsg_ID_9250, RCID_WOLF); } break; case 760: - if (D_ctx_80177CD0[1] != 0) { + if (gStarWolfTeamAlive[1] != 0) { Radio_PlayMessage(gMsg_ID_9260, RCID_LEON); } break; case 660: - if (D_ctx_80177CD0[2] != 0) { - if (gTeamShields[3] > 0) { + if (gStarWolfTeamAlive[2] != 0) { + if (gTeamShields[TEAM_ID_PEPPY] > 0) { Radio_PlayMessage(gMsg_ID_9275, RCID_PIGMA); } else { Radio_PlayMessage(gMsg_ID_9270, RCID_PIGMA); @@ -424,7 +424,7 @@ void Fortuna_80187960(Actor* actor) { break; case 540: - if (D_ctx_80177CD0[3] != 0) { + if (gStarWolfTeamAlive[3] != 0) { Radio_PlayMessage(gMsg_ID_9280, RCID_ANDREW); } break; @@ -485,7 +485,7 @@ void Fortuna_80188AD0(Actor* actor) { func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y + 180.0f, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, 5.0f, 10); actor->itemDrop = DROP_SILVER_RING; actor->obj.pos.y += 230.0f; - func_enmy_80066254(actor); + Actor_Despawn(actor); actor->obj.pos.y -= 230.0f; } @@ -645,7 +645,7 @@ void Fortuna_8018927C(Player* player) { Math_SmoothStepToF(&player->unk_12C, 0.0f, 0.1f, 15.0f, 0.0f); Math_SmoothStepToF(&player->unk_034, 0.0f, 0.1f, 3.0f, 0.0f); Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 20.0f, 0.0f); - if (D_ctx_80177930 == 0) { + if (gNextPlanetPath == 0) { if (player->pos.y < 700.0f) { Math_SmoothStepToF(&player->pos.y, 700.0f, 0.1f, 10.0f, 0.0f); } @@ -684,9 +684,9 @@ void Fortuna_8018927C(Player* player) { player->camAt.z = player->unk_138; if (player->timer_1F8 < 80) { - D_ctx_80178358 = 255; - D_ctx_8017835C = 10; - D_ctx_80178350 = D_ctx_80178348 = D_ctx_80178354 = 0; + gFillScreenAlphaTarget = 255; + gFillScreenAlphaStep = 10; + gFillScreenGreen = gFillScreenRed = gFillScreenBlue = 0; if (player->timer_1F8 == 0) { player->timer_1F8 = 0; player->unk_1D0 = 1; @@ -695,7 +695,7 @@ void Fortuna_8018927C(Player* player) { break; case 0: - if (D_ctx_80177930 == 0) { + if (gNextPlanetPath == 0) { Math_SmoothStepToF(&player->unk_0E8, 40.0f, 0.1f, 2.5f, 0.0f); Math_SmoothStepToF(&player->unk_0EC, 60.0f, 0.2f, 5.0f, 0.0f); Math_SmoothStepToF(&player->unk_0E4, 0.0f, 0.1f, 2.5f, 0.0f); @@ -712,7 +712,7 @@ void Fortuna_8018927C(Player* player) { } if (player->timer_1F8 == 0) { - if (D_ctx_80177930 != 0) { + if (gNextPlanetPath != 0) { player->timer_1F8 = 150; player->unk_1D0 = -1; player->pos.x = 0.0f; @@ -755,32 +755,32 @@ void Fortuna_8018927C(Player* player) { func_8001CA24(0); Audio_KillSfxBySource(player->sfxSource); player->unk_234 = 0; - D_ctx_80178340 = 255; - D_ctx_80178358 = 255; - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0; - D_ctx_8017835C = 0; + gFillScreenAlpha = 255; + gFillScreenAlphaTarget = 255; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; + gFillScreenAlphaStep = 0; } break; case 2: - if (!(D_ctx_80177930) && (player->timer_1F8) > 830) { - D_ctx_80178358 = 0; - D_ctx_8017835C = 8; + if (!(gNextPlanetPath) && (player->timer_1F8) > 830) { + gFillScreenAlphaTarget = 0; + gFillScreenAlphaStep = 8; } if (player->timer_1F8 == 810) { Audio_KillSfxBySource(gBosses[0].sfxSource); } if (player->timer_1F8 == 830) { - D_ctx_80178358 = 255; - D_ctx_8017835C = 2; - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255; + gFillScreenAlphaTarget = 255; + gFillScreenAlphaStep = 2; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; } gBosses[0].swork[0] = 1; - if ((func_hud_80090200(&gBosses[0]) == 2) || (D_ctx_80177930 != 0)) { + if ((func_hud_80090200(&gBosses[0]) == 2) || (gNextPlanetPath != 0)) { func_play_800A6148(); - if (D_ctx_80177930 == 0) { + if (gNextPlanetPath == 0) { player->unk_1D0 = 10; } else { player->unk_1D0 = 20; @@ -803,7 +803,7 @@ void Fortuna_8018927C(Player* player) { D_ctx_801784D4 = D_ctx_801784C8 = D_ctx_801784C8 = D_ctx_801784FC = D_ctx_801784C8 = 58.0f; D_ctx_801784D8 = D_ctx_801784CC = D_ctx_801784CC = D_ctx_80178500 = D_ctx_801784CC = 13.0f; - if (D_ctx_80177930 == 0) { + if (gNextPlanetPath == 0) { player->pos.x = 0.0f; player->pos.y = 0.0f; player->unk_0E4 = 0.0f; @@ -829,7 +829,7 @@ void Fortuna_8018927C(Player* player) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 100); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 100); func_8001C8B8(0); - if (D_ctx_80177930 == 0) { + if (gNextPlanetPath == 0) { Fortuna_801890EC(actor0, 3); } } @@ -837,8 +837,8 @@ void Fortuna_8018927C(Player* player) { case 10: player->unk_234 = 1; - D_ctx_80178358 = 0; - D_ctx_8017835C = 4; + gFillScreenAlphaTarget = 0; + gFillScreenAlphaStep = 4; player->camEye.x = 400.0f; player->camEye.y = 0; player->camEye.z = 0.0f; @@ -848,13 +848,13 @@ void Fortuna_8018927C(Player* player) { if (gCsFrameCount == 100) { player->unk_0D0 = 30.0f; - if (gTeamShields[1] > 0) { + if (gTeamShields[TEAM_ID_FALCO] > 0) { Fortuna_801890EC(actor3, 0); } - if (gTeamShields[2] > 0) { + if (gTeamShields[TEAM_ID_SLIPPY] > 0) { Fortuna_801890EC(actor1, 1); } - if (gTeamShields[3] > 0) { + if (gTeamShields[TEAM_ID_PEPPY] > 0) { Fortuna_801890EC(actor2, 2); } } @@ -871,7 +871,7 @@ void Fortuna_8018927C(Player* player) { } if (gCsFrameCount == 200) { - if (D_ctx_80177930 == 0) { + if (gNextPlanetPath == 0) { AUDIO_PLAY_BGM(SEQ_ID_BAD_END); } else { AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); @@ -879,7 +879,7 @@ void Fortuna_8018927C(Player* player) { } if (gCsFrameCount == 420) { - D_ctx_80177840 = 100; + gLevelClearScreenTimer = 100; } break; @@ -919,10 +919,10 @@ void Fortuna_8018927C(Player* player) { Radio_PlayMessage(gMsg_ID_20010, RCID_FOX); } - if (D_ctx_80177930 == 0) { + if (gNextPlanetPath == 0) { switch (gCsFrameCount) { case 588: - switch (gTeamShields[2]) { + switch (gTeamShields[TEAM_ID_SLIPPY]) { case -1: Radio_PlayMessage(gMsg_ID_20339, RCID_ROB64); break; @@ -936,7 +936,7 @@ void Fortuna_8018927C(Player* player) { break; case 735: - switch (gTeamShields[3]) { + switch (gTeamShields[TEAM_ID_PEPPY]) { case -1: Radio_PlayMessage(gMsg_ID_20338, RCID_ROB64); break; @@ -950,7 +950,7 @@ void Fortuna_8018927C(Player* player) { break; case 881: - switch (gTeamShields[1]) { + switch (gTeamShields[TEAM_ID_FALCO]) { case -1: Radio_PlayMessage(gMsg_ID_20337, RCID_ROB64); break; @@ -966,7 +966,7 @@ void Fortuna_8018927C(Player* player) { } else { switch (gCsFrameCount) { case 588: - switch (gTeamShields[2]) { + switch (gTeamShields[TEAM_ID_SLIPPY]) { case -1: Radio_PlayMessage(gMsg_ID_20339, RCID_ROB64); break; @@ -980,7 +980,7 @@ void Fortuna_8018927C(Player* player) { break; case 735: - switch (gTeamShields[3]) { + switch (gTeamShields[TEAM_ID_PEPPY]) { case -1: Radio_PlayMessage(gMsg_ID_20338, RCID_ROB64); break; @@ -994,7 +994,7 @@ void Fortuna_8018927C(Player* player) { break; case 881: - switch (gTeamShields[1]) { + switch (gTeamShields[TEAM_ID_FALCO]) { case -1: Radio_PlayMessage(gMsg_ID_20337, RCID_ROB64); break; @@ -1039,7 +1039,7 @@ void Fortuna_8018927C(Player* player) { D_ctx_80177A48[4] *= 1.19f; player->unk_190 = 2.0f; - if (gTeamShields[1] > 0) { + if (gTeamShields[TEAM_ID_FALCO] > 0) { if (player->timer_1F8 == 980) { AUDIO_PLAY_SFX(0x09000002U, actor3->sfxSource, 0U); actor3->vel.y = 1.0f; @@ -1053,7 +1053,7 @@ void Fortuna_8018927C(Player* player) { } } - if ((gTeamShields[3] > 0) && (player->timer_1F8 == 960)) { + if ((gTeamShields[TEAM_ID_PEPPY] > 0) && (player->timer_1F8 == 960)) { AUDIO_PLAY_SFX(0x09000002U, actor2->sfxSource, 0U); actor2->vel.y = 1.0f; actor2->fwork[29] = 5.0f; @@ -1066,7 +1066,7 @@ void Fortuna_8018927C(Player* player) { actor2->iwork[11] = 2; } - if (gTeamShields[2] > 0) { + if (gTeamShields[TEAM_ID_SLIPPY] > 0) { if (player->timer_1F8 == 940) { AUDIO_PLAY_SFX(0x09000002U, actor1->sfxSource, 0U); actor1->vel.y = 1.0f; @@ -1099,28 +1099,28 @@ void Fortuna_8018927C(Player* player) { D_ctx_8017837C = 4; Audio_FadeOutAll(10); for (i = 0; i < 6; i++) { - D_ctx_80177CF0[i] = D_ctx_80177CD0[i]; + gSavedStarWolfTeamAlive[i] = gStarWolfTeamAlive[i]; } D_play_800D3180[LEVEL_FORTUNA] = Play_CheckMedalStatus(50) + 1; } break; case 20: - if (gTeamShields[1] > 0) { + if (gTeamShields[TEAM_ID_FALCO] > 0) { Fortuna_801890EC(actor3, 0); actor3->obj.pos.x = (player->pos.x - 100.0f) - 400.0f; actor3->obj.pos.y = player->pos.y + 400.0f; actor3->obj.pos.z = player->unk_138 - 150.0f; actor3->obj.rot.z = 90.0f; } - if (gTeamShields[2] > 0) { + if (gTeamShields[TEAM_ID_SLIPPY] > 0) { Fortuna_801890EC(actor1, 1); actor1->obj.pos.x = player->pos.x + 100.0f + 400.0f; actor1->obj.pos.y = player->pos.y + 400.0f; actor1->obj.pos.z = player->unk_138 - 150.0f; actor1->obj.rot.z = -90.0f; } - if (gTeamShields[3] > 0) { + if (gTeamShields[TEAM_ID_PEPPY] > 0) { Fortuna_801890EC(actor2, 2); actor2->obj.pos.x = player->pos.x; actor2->obj.pos.y = player->pos.y + 100.0f + 400.0f; @@ -1149,9 +1149,9 @@ void Fortuna_8018927C(Player* player) { break; } - if (D_ctx_80178340 != 0) { - D_ctx_80178358 = 0; - D_ctx_8017835C = 1; + if (gFillScreenAlpha != 0) { + gFillScreenAlphaTarget = 0; + gFillScreenAlphaStep = 1; } if (gCsFrameCount == 140) { @@ -1195,7 +1195,7 @@ void Fortuna_8018927C(Player* player) { AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); break; case 450: - D_ctx_80177840 = 100; + gLevelClearScreenTimer = 100; break; } src.x = 0.0f; @@ -1231,7 +1231,7 @@ void Fortuna_8018927C(Player* player) { switch (gCsFrameCount) { case 618: - switch (gTeamShields[2]) { + switch (gTeamShields[TEAM_ID_SLIPPY]) { case -1: Radio_PlayMessage(gMsg_ID_20339, RCID_ROB64); break; @@ -1245,7 +1245,7 @@ void Fortuna_8018927C(Player* player) { break; case 765: - switch (gTeamShields[3]) { + switch (gTeamShields[TEAM_ID_PEPPY]) { case -1: Radio_PlayMessage(gMsg_ID_20338, RCID_ROB64); break; @@ -1259,7 +1259,7 @@ void Fortuna_8018927C(Player* player) { break; case 911: - switch (gTeamShields[1]) { + switch (gTeamShields[TEAM_ID_FALCO]) { case -1: Radio_PlayMessage(gMsg_ID_20337, RCID_ROB64); break; @@ -1277,7 +1277,7 @@ void Fortuna_8018927C(Player* player) { break; case 1240: - if (gTeamShields[1] > 0) { + if (gTeamShields[TEAM_ID_FALCO] > 0) { AUDIO_PLAY_SFX(0x09000002U, actor3->sfxSource, 0U); actor3->fwork[29] = 5.0f; actor3->iwork[11] = 2; @@ -1285,7 +1285,7 @@ void Fortuna_8018927C(Player* player) { break; case 1260: - if (gTeamShields[2] > 0) { + if (gTeamShields[TEAM_ID_SLIPPY] > 0) { AUDIO_PLAY_SFX(0x09000002U, actor1->sfxSource, 0U); actor1->fwork[29] = 5.0f; actor1->iwork[11] = 2; @@ -1293,7 +1293,7 @@ void Fortuna_8018927C(Player* player) { break; case 1280: - if (gTeamShields[3] > 0) { + if (gTeamShields[TEAM_ID_PEPPY] > 0) { AUDIO_PLAY_SFX(0x09000002U, actor2->sfxSource, 0U); actor2->fwork[29] = 5.0f; actor2->iwork[11] = 2; @@ -1314,9 +1314,9 @@ void Fortuna_8018927C(Player* player) { } if ((gCsFrameCount >= 1400)) { - D_ctx_80178358 = 255; - D_ctx_8017835C = 16; - if (D_ctx_80178340 == 255) { + gFillScreenAlphaTarget = 255; + gFillScreenAlphaStep = 16; + if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_6; player->timer_1F8 = 0; D_ctx_8017837C = 4; @@ -1324,7 +1324,7 @@ void Fortuna_8018927C(Player* player) { // clang-format off for (i = 0; i < 6; i++) { \ - D_ctx_80177CF0[i] = D_ctx_80177CD0[i]; + gSavedStarWolfTeamAlive[i] = gStarWolfTeamAlive[i]; } // clang-format on @@ -1436,58 +1436,58 @@ void Fortuna_8018927C(Player* player) { void Fortuna_8018BA2C(void) { s32 i; Actor* actor; - Object_4C* obj4C; + Sprite* sprite; Object_58* obj58; Boss* boss = &gBosses[0]; - D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(D_enmy_800CFDA0[gCurrentLevel]); + gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]); for (obj58 = &gObjects58[0], i = 0; i < 1000; i++) { - if (D_ctx_80178310[i].id < 0) { + if (gLevelObjects[i].id < 0) { break; } - if (D_ctx_80178310[i].id < 161) { + if (gLevelObjects[i].id < 161) { Object_58_Initialize(obj58); obj58->obj.status = OBJ_ACTIVE; - obj58->obj.id = D_ctx_80178310[i].id; - obj58->obj.pos.x = D_ctx_80178310[i].xPos; - obj58->obj.pos.z = D_ctx_80178310[i].zPos1; - obj58->obj.pos.y = D_ctx_80178310[i].yPos; - obj58->obj.rot.y = D_ctx_80178310[i].rot.y; + obj58->obj.id = gLevelObjects[i].id; + obj58->obj.pos.x = gLevelObjects[i].xPos; + obj58->obj.pos.z = gLevelObjects[i].zPos1; + obj58->obj.pos.y = gLevelObjects[i].yPos; + obj58->obj.rot.y = gLevelObjects[i].rot.y; Object_SetInfo(&obj58->info, obj58->obj.id); obj58++; } } for (actor = &gActors[20], i = 0; i < 1000; i++) { - if (D_ctx_80178310[i].id < 0) { + if (gLevelObjects[i].id < 0) { break; } - if ((D_ctx_80178310[i].id >= 176) && (D_ctx_80178310[i].id < 292)) { + if ((gLevelObjects[i].id >= OBJ_ACTOR_176) && (gLevelObjects[i].id < OBJ_BOSS_292)) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = D_ctx_80178310[i].id; - actor->obj.pos.x = D_ctx_80178310[i].xPos; - actor->obj.pos.z = D_ctx_80178310[i].zPos1; - actor->obj.pos.y = D_ctx_80178310[i].yPos; + actor->obj.id = gLevelObjects[i].id; + actor->obj.pos.x = gLevelObjects[i].xPos; + actor->obj.pos.z = gLevelObjects[i].zPos1; + actor->obj.pos.y = gLevelObjects[i].yPos; Object_SetInfo(&actor->info, actor->obj.id); actor++; } } - for (obj4C = &gObjects4C[0], i = 0; i < 1000; i++) { - if (D_ctx_80178310[i].id < 0) { + for (sprite = &gSprites[0], i = 0; i < 1000; i++) { + if (gLevelObjects[i].id < 0) { break; } - if (D_ctx_80178310[i].id == 163) { - Object_4C_Initialize(obj4C); - obj4C->obj.status = OBJ_INIT; - obj4C->obj.id = D_ctx_80178310[i].id; - obj4C->obj.pos.x = D_ctx_80178310[i].xPos; - obj4C->obj.pos.z = D_ctx_80178310[i].zPos1; - obj4C->obj.pos.y = D_ctx_80178310[i].yPos; - Object_SetInfo(&obj4C->info, obj4C->obj.id); - obj4C++; + if (gLevelObjects[i].id == 163) { + Sprite_Initialize(sprite); + sprite->obj.status = OBJ_INIT; + sprite->obj.id = gLevelObjects[i].id; + sprite->obj.pos.x = gLevelObjects[i].xPos; + sprite->obj.pos.z = gLevelObjects[i].zPos1; + sprite->obj.pos.y = gLevelObjects[i].yPos; + Object_SetInfo(&sprite->info, sprite->obj.id); + sprite++; } } Boss_Initialize(boss); diff --git a/src/overlays/ovl_i4/fox_ka.c b/src/overlays/ovl_i4/fox_ka.c index 4e34208b..40d196c0 100644 --- a/src/overlays/ovl_i4/fox_ka.c +++ b/src/overlays/ovl_i4/fox_ka.c @@ -194,7 +194,7 @@ void Katina_80192E20(Player* player) { Vec3f dest; Actor* actor; - D_360_8015F928 = 0; + gAllRangeEventTimer = 0; if (player->unk_1D0 != 0) { Katina_801981F8(&gActors[4]); @@ -274,11 +274,11 @@ void Katina_80192E20(Player* player) { player->state_1C8 = PLAYERSTATE_1C8_3; player->unk_014 = 0.0001f; AUDIO_PLAY_BGM(gBgmSeqId); - D_ctx_80177838 = 80; + gLevelStatusScreenTimer = 80; for (actor = &gActors[1], i = 1; i < 4; i += 1, actor++) { actor->timer_0BC = 0; } - D_360_8015F928 = -610; + gAllRangeEventTimer = -610; } break; } @@ -419,15 +419,15 @@ void Katina_80193B1C(Boss* boss) { } } -void Katina_Boss316_Init(Boss* boss) { - boss->swork[10] = 100; - boss->swork[11] = 100; - boss->swork[12] = 100; - boss->swork[13] = 100; - boss->swork[14] = 400; - boss->fwork[9] = 850.0f; - boss->fwork[4] = 850.0f; - boss->vwork[0].y = 1000.0f; +void Katina_Boss316_Init(Boss316* this) { + this->swork[10] = 100; + this->swork[11] = 100; + this->swork[12] = 100; + this->swork[13] = 100; + this->swork[14] = 400; + this->fwork[9] = 850.0f; + this->fwork[4] = 850.0f; + this->vwork[0].y = 1000.0f; } void Katina_80193CE4(Boss* boss, s32 idx) { @@ -534,7 +534,7 @@ void Katina_80193EF0(Boss* boss) { } if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) { - if (!(gGameFrameCount & 15)) { + if ((gGameFrameCount % 16) == 0) { for (i = 0; i < 4; i++) { if ((boss->swork[10 + i] <= 0) && (Rand_ZeroOne() < 0.2f)) { func_effect_8007BFFC((boss->vwork[1 + i].x * 1.3f) + boss->obj.pos.x, @@ -654,7 +654,7 @@ void Katina_801946C4(Boss* boss) { switch (boss->state) { case 0: - if (((gHitCount >= 10) || (D_360_8015F928 > 3840))) { + if (((gHitCount >= 10) || (gAllRangeEventTimer > 3840))) { if ((D_edisplay_801615D0.y < 0.0f)) { boss->state = 1; boss->vwork[0].y = 2000.0f; @@ -690,9 +690,9 @@ void Katina_801946C4(Boss* boss) { boss->obj.pos.z = 4500.0f; boss->timer_050 = 500; boss->fwork[10] = 60.0f; - D_360_8015F924 = 1; + gAllRangeCheckpoint = 1; gSavedHitCount = gHitCount; - for (i = 1; i < 4; i++) { + for (i = TEAM_ID_FALCO; i <= TEAM_ID_PEPPY; i++) { gSavedTeamShields[i] = gTeamShields[i]; } SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 10); @@ -768,7 +768,7 @@ void Katina_801946C4(Boss* boss) { AUDIO_PLAY_BGM(SEQ_ID_KA_BOSS | SEQ_FLAG); } - if ((boss->timer_050 == 0) && !(boss->timer_052 & 15)) { + if ((boss->timer_050 == 0) && ((boss->timer_052 % 16) == 0)) { Katina_801945FC(boss); } @@ -822,7 +822,7 @@ void Katina_801946C4(Boss* boss) { case 7: Math_SmoothStepToF(&boss->fwork[10], 0.0f, 0.1f, 0.5f, 0.0f); - if ((boss->timer_050 < 200) && !(boss->timer_050 & 15)) { + if ((boss->timer_050 < 200) && ((boss->timer_050 % 16) == 0)) { Katina_801945FC(boss); } @@ -850,11 +850,11 @@ void Katina_801946C4(Boss* boss) { boss->state = 11; boss->timer_050 = 100; Radio_PlayMessage(gMsg_ID_18050, RCID_BILL); - D_360_8015F944 = 1.0f; - D_360_8015F93C = 1; - D_360_8015F930[0] = 1; - D_360_8015F930[1] = 1; - D_360_8015F930[2] = 30; + gAllRangeCountdownScale = 1.0f; + gShowAllRangeCountdown = 1; + gAllRangeCountdown[0] = 1; + gAllRangeCountdown[1] = 1; + gAllRangeCountdown[2] = 30; } break; @@ -877,7 +877,7 @@ void Katina_801946C4(Boss* boss) { Math_SmoothStepToF(&boss->fwork[10], 5.0f, 0.1f, 0.5f, 0.0f); if (boss->timer_050 == 0 && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3 || gPlayer[0].state_1C8 == PLAYERSTATE_1C8_5)) { - D_360_8015F93C = 0; + gShowAllRangeCountdown = 0; boss->timer_050 = 1000; boss->state = 15; boss->obj.rot.y = 0.0f; @@ -989,7 +989,7 @@ void Katina_801946C4(Boss* boss) { } if ((boss->timer_052 == 700) || (boss->timer_052 == 697)) { - i = gGameFrameCount & 63; + i = gGameFrameCount % 64U; Object_Kill(&gEffects[i].obj, gEffects[i].sfxSource); func_effect_8007B344(boss->obj.pos.x, boss->obj.pos.y - 600.0f, boss->obj.pos.z, 90.0f, 0); AUDIO_PLAY_SFX(0x1140B045U, boss->sfxSource, 0); @@ -1033,11 +1033,11 @@ void Katina_801946C4(Boss* boss) { Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 100.0f, 1.0f, 100.0f, 0.0f); Math_SmoothStepToF(&gPlayer[0].camAt.y, 525.0f, 0.3f, 50.0f, 0.0f); if (boss->timer_050 == 0) { - D_ctx_80178358 = 255; - D_ctx_80178348 = 255; - D_ctx_80178350 = 255; - D_ctx_80178354 = 255; - if (D_ctx_80178340 == 255) { + gFillScreenAlphaTarget = 255; + gFillScreenRed = 255; + gFillScreenGreen = 255; + gFillScreenBlue = 255; + if (gFillScreenAlpha == 255) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_7; gPlayer[0].unk_1D0 = 2; gPlayer[0].unk_234 = 1; @@ -1060,13 +1060,13 @@ void Katina_801946C4(Boss* boss) { break; case 20: - D_360_8015F93C = 0; + gShowAllRangeCountdown = 0; Math_SmoothStepToF(&boss->fwork[10], 0.0f, 0.1f, 3.0f, 0.0f); if ((boss->timer_050 == 0) && (((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3)) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_5))) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_7; gPlayer[0].unk_1D0 = 0; - D_ctx_80177930 = 1; + gNextPlanetPath = 1; boss->obj.pos.z = 0.0f; boss->health = -1; boss->fwork[10] = 0.0f; @@ -1090,7 +1090,7 @@ void Katina_801946C4(Boss* boss) { AUDIO_PLAY_SFX(0x19408047U, boss->sfxSource, 0); } - if (boss->timer_050 >= 821) { + if (boss->timer_050 > 820) { boss->obj.rot.x += 0.075f; boss->gravity = 0.1f; if (boss->vel.y < -10.0f) { @@ -1112,7 +1112,7 @@ void Katina_801946C4(Boss* boss) { boss->obj.pos.z + 600.0f + RAND_FLOAT(1000.0f), 0.0f, 20.0f, 0.0f, RAND_FLOAT(20.0f) + 15.0f); } - if ((gGameFrameCount & 1) || (boss->timer_050 >= 851)) { + if (((gGameFrameCount % 2) != 0) || (boss->timer_050 > 850)) { src.x = RAND_FLOAT_CENTERED(4000.0f); src.y = RAND_FLOAT_CENTERED(600.0f) + -300.0f; src.z = RAND_FLOAT_CENTERED(4000.0f); @@ -1201,7 +1201,7 @@ bool Katina_801965A8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* d switch (limbIndex) { case 1: rot->y += boss->fwork[0]; - if (boss->swork[0] & 1) { + if ((boss->swork[0] % 2) != 0) { RCP_SetupDL(&gMasterDisp, 30); } @@ -1214,7 +1214,7 @@ bool Katina_801965A8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* d case 2: rot->y += boss->fwork[1]; - if (boss->swork[1] & 1) { + if ((boss->swork[1] % 2) != 0) { RCP_SetupDL(&gMasterDisp, 30); } @@ -1227,7 +1227,7 @@ bool Katina_801965A8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* d case 3: rot->y += boss->fwork[2]; - if (boss->swork[2] & 1) { + if ((boss->swork[2] % 2) != 0) { RCP_SetupDL(&gMasterDisp, 30); } @@ -1240,7 +1240,7 @@ bool Katina_801965A8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* d case 4: rot->y -= boss->fwork[3]; - if (boss->swork[3] & 1) { + if ((boss->swork[3] % 2) != 0) { RCP_SetupDL(&gMasterDisp, 30); } @@ -1253,7 +1253,7 @@ bool Katina_801965A8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* d case 9: pos->x -= boss->fwork[4]; - if (boss->swork[4] & 1) { + if ((boss->swork[4] % 2) != 0) { RCP_SetupDL(&gMasterDisp, 30); } @@ -1366,14 +1366,14 @@ void Katina_80197024(void) { Rand_SetSeed(1, 29100, 9786); - if (D_ctx_80177930 != 0) { + if (gNextPlanetPath != 0) { target = 19; } else { target = 2; } for (i = 0; i <= target; i++, actor++) { - if ((D_i4_8019F2F0[i] >= D_360_8015F921) && ((i >= 3) || (gTeamShields[i + 1] > 0))) { + if ((D_i4_8019F2F0[i] >= gKaAllyKillCount) && ((i >= 3) || (gTeamShields[i + 1] > 0))) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; actor->obj.id = OBJ_ACTOR_195; @@ -1431,15 +1431,15 @@ void Katina_80197290(Player* player) { } } player->unk_1D0 += 1; - if (gTeamShields[1] > 0) { + if (gTeamShields[TEAM_ID_FALCO] > 0) { Katina_80196E30(&gActors[1], 0); } - if (gTeamShields[2] > 0) { + if (gTeamShields[TEAM_ID_SLIPPY] > 0) { Katina_80196E30(&gActors[2], 1); } - if (gTeamShields[3] > 0) { + if (gTeamShields[TEAM_ID_PEPPY] > 0) { Katina_80196E30(&gActors[3], 2); } break; @@ -1473,8 +1473,8 @@ void Katina_80197290(Player* player) { } if (gCsFrameCount >= 225) { - D_ctx_80178358 = 255; - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255; + gFillScreenAlphaTarget = 255; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; } if (gCsFrameCount == 250) { @@ -1498,7 +1498,7 @@ void Katina_80197290(Player* player) { player->pos.z = 150.0f; player->unk_1D0 = 3; func_8001C8B8(0); - if (D_ctx_80177930 != 0) { + if (gNextPlanetPath != 0) { AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); } else { AUDIO_PLAY_BGM(SEQ_ID_BAD_END); @@ -1513,8 +1513,8 @@ void Katina_80197290(Player* player) { break; case 3: - D_ctx_80178358 = 0; - D_ctx_8017835C = 2; + gFillScreenAlphaTarget = 0; + gFillScreenAlphaStep = 2; D_ctx_80177A48[1] -= D_ctx_80177A48[2]; Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, 0); src.x = -1000.0f; @@ -1527,7 +1527,7 @@ void Katina_80197290(Player* player) { gCsCamAtX = 0.0f; gCsCamAtY = 3500.0f; gCsCamAtZ = player->pos.z + 500; - if (gCsFrameCount >= 1011) { + if (gCsFrameCount > 1010) { player->unk_0D0 += 2.0f; player->unk_0E4 += 0.1f; Math_SmoothStepToF(&D_ctx_80177A48[2], 0.0f, 1.0f, 0.001f, 0); @@ -1544,11 +1544,11 @@ void Katina_80197290(Player* player) { Audio_FadeOutAll(50); } - if (gCsFrameCount >= 1101) { - D_ctx_80178358 = 255; - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0; - D_ctx_8017835C = 8; - if (D_ctx_80178340 == 255) { + if (gCsFrameCount > 1100) { + gFillScreenAlphaTarget = 255; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; + gFillScreenAlphaStep = 8; + if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_6; player->timer_1F8 = 0; D_ctx_8017837C = 4; @@ -1557,7 +1557,7 @@ void Katina_80197290(Player* player) { } switch (gCsFrameCount) { case 190: - D_ctx_80177840 = 100; + gLevelClearScreenTimer = 100; break; case 350: @@ -1586,8 +1586,8 @@ void Katina_80197290(Player* player) { break; case 570: - if (D_ctx_80177930 != 0) { - if (D_360_8015F921 == 0) { + if (gNextPlanetPath != 0) { + if (gKaAllyKillCount == 0) { Radio_PlayMessage(gMsg_ID_18100, RCID_BILL); } else { Radio_PlayMessage(gMsg_ID_18090, RCID_BILL); @@ -1598,8 +1598,8 @@ void Katina_80197290(Player* player) { break; case 700: - if (D_ctx_80177930 != 0) { - if (D_360_8015F921 == 0) { + if (gNextPlanetPath != 0) { + if (gKaAllyKillCount == 0) { Radio_PlayMessage(gMsg_ID_18105, RCID_FOX); } else { Radio_PlayMessage(gMsg_ID_18095, RCID_FOX); @@ -1613,15 +1613,15 @@ void Katina_80197290(Player* player) { case 100: Katina_80196F40(&gActors[1], 0); - if (gTeamShields[1] > 0) { + if (gTeamShields[TEAM_ID_FALCO] > 0) { Katina_80196F40(&gActors[2], 1); } - if (gTeamShields[2] > 0) { + if (gTeamShields[TEAM_ID_SLIPPY] > 0) { Katina_80196F40(&gActors[3], 2); } - if (gTeamShields[3] > 0) { + if (gTeamShields[TEAM_ID_PEPPY] > 0) { Katina_80196F40(&gActors[4], 3); } player->unk_1D0 += 1; @@ -1676,7 +1676,7 @@ void Katina_80197F10(Actor* actor) { Math_SmoothStepToF(&actor->obj.pos.y, actor->vwork[0].y, 0.02f, 2.0f, 0.0001f); Math_SmoothStepToF(&actor->obj.pos.z, actor->vwork[0].z, 0.02f, 2.0f, 0.0001f); Math_SmoothStepToF(&actor->unk_0F4.z, 0.0f, 0.02f, 0.2f, 0.0001f); - if ((actor->unk_0B6 != 0) && ((((actor->index & 7) * 10) + 800) < gCsFrameCount)) { + if ((actor->unk_0B6 != 0) && ((((s32) (actor->index % 8U) * 10) + 800) < gCsFrameCount)) { actor->state = 4; } break; @@ -1807,18 +1807,18 @@ void Katina_80198594(Actor* actor) { case 0: D_game_80161A44 = 30000.0f; D_i4_801A0540 = 0; - D_360_8015F920 = D_360_8015F921 = 0; + gKaKilledAlly = gKaAllyKillCount = 0; actor->state = 2; - if (D_360_8015F924 != 0) { + if (gAllRangeCheckpoint != 0) { gHitCount = gSavedHitCount; gBosses[1].state = 6; gBosses[1].obj.pos.x = 0.0f; gBosses[1].obj.pos.z = 0.0f; gBosses[1].obj.pos.y = 2000.0f; AUDIO_PLAY_SFX(0x11037025U, gBosses[1].sfxSource, 0); - D_360_8015F928 = 20000; + gAllRangeEventTimer = 20000; gBosses[1].swork[16] = 5760; - D_360_8015F920 = 1; + gKaKilledAlly = 1; AUDIO_PLAY_BGM(SEQ_ID_KA_BOSS | SEQ_FLAG); } @@ -1841,7 +1841,7 @@ void Katina_80198594(Actor* actor) { } if (gBosses[1].state < 15) { - switch (D_360_8015F928) { + switch (gAllRangeEventTimer) { case -500: Radio_PlayMessage(gMsg_ID_18005, RCID_BILL); break; @@ -1860,10 +1860,11 @@ void Katina_80198594(Actor* actor) { } if (gBosses[1].state == 12) { - if (!(D_360_8015F928 & 255) && (Rand_ZeroOne() < 0.5f)) { + if (((gAllRangeEventTimer % 256) == 0) && (Rand_ZeroOne() < 0.5f)) { func_360_8002E4F8(gMsg_ID_18060, RCID_BILL); } - } else if ((D_360_8015F928 > 500) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) && !(D_360_8015F928 & 511)) { + } else if ((gAllRangeEventTimer > 500) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) && + ((gAllRangeEventTimer % 512) == 0)) { switch (RAND_INT(3.99f)) { case 0: func_360_8002E4F8(gMsg_ID_18020, RCID_BILL); @@ -1990,7 +1991,7 @@ void Katina_80198AA0(Actor* actor) { actor->iwork[4] += 1; actor->iwork[5] = 1; - if (!((actor->index + gGameFrameCount) & 11) && (Rand_ZeroOne() < 0.1f) && + if ((((actor->index + gGameFrameCount) & 0xB) == 0) && (Rand_ZeroOne() < 0.1f) && (func_360_80031900(actor) != 0) && (gActors[0].state == 2)) { actor->iwork[0] = 1; } @@ -2047,7 +2048,7 @@ void Katina_80198AA0(Actor* actor) { xRand = actor->fwork[4] - actor->obj.pos.x; yRand = actor->fwork[5] - actor->obj.pos.y; zRand = actor->fwork[6] - actor->obj.pos.z; - if ((!((actor->index + gGameFrameCount) & 7))) { + if (((actor->index + gGameFrameCount) % 8) == 0) { actor->fwork[19] = Math_RadToDeg(Math_Atan2F(xRand, zRand)); xAngle = sqrtf(SQ(xRand) + SQ(zRand)); actor->fwork[20] = Math_RadToDeg(Math_Atan2F(yRand, xAngle)); @@ -2128,7 +2129,7 @@ void Katina_801995B4(Actor* actor) { Vec3f D_i4_8019F4A8 = { 0.0f, 0.0f, 0.0f }; Vec3f pad[30]; - if (!((actor->index + gSysFrameCount) & 7)) { + if (((actor->index + gSysFrameCount) % 8) == 0) { actor->iwork[23] = 1; if ((fabsf(actor->obj.pos.x - gPlayer[0].camEye.x) < 4500.0f) && (fabsf(actor->obj.pos.z - gPlayer[0].camEye.z) < 4500.0f)) { @@ -2149,7 +2150,7 @@ void Katina_801995B4(Actor* actor) { } else { RCP_SetupDL(&gMasterDisp, 29); } - if (!(actor->timer_0C6 & 1)) { + if ((actor->timer_0C6 % 2) == 0) { gSPFogPosition(gMasterDisp++, gFogNear, 1005); } switch (actor->unk_0B6) { diff --git a/src/overlays/ovl_i4/fox_sz.c b/src/overlays/ovl_i4/fox_sz.c index 1b5cb5bb..cb16de15 100644 --- a/src/overlays/ovl_i4/fox_sz.c +++ b/src/overlays/ovl_i4/fox_sz.c @@ -59,7 +59,7 @@ void SectorZ_80199900(Actor* actor, s32 arg1) { } if ((D_i4_801A0560 == 3) && (D_play_800D3180[LEVEL_ZONESS] != 0)) { - D_360_800C9B4C = D_360_8015F928 + 110; + D_360_800C9B4C = gAllRangeEventTimer + 110; } } } @@ -251,7 +251,7 @@ void SectorZ_8019A1D0(void) { } void SectorZ_8019A2F4(Actor* actor) { - if (D_360_8015F928 == D_360_800C9B4C) { + if (gAllRangeEventTimer == D_360_800C9B4C) { SectorZ_8019A1D0(); gCsFrameCount = 0; actor->timer_0BC = 400; @@ -278,7 +278,7 @@ void SectorZ_8019A3E8(Actor* actor) { Vec3f sp34; Actor* actorPtr; - if (D_360_8015F928 >= 0) { + if (gAllRangeEventTimer >= 0) { if (gTeamShields[AI360_FALCO] > 0) { if (gActors[AI360_FALCO].iwork[2] == AI360_FOX) { if (gActors[AI360_10].obj.status == 2) { @@ -334,12 +334,12 @@ void SectorZ_8019A3E8(Actor* actor) { } } - if (D_360_8015F928 == 100) { + if (gAllRangeEventTimer == 100) { Radio_PlayMessage(gMsg_ID_16030, RCID_FALCO); } if (((actor->timer_0C0 == 0) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_0)) && - ((D_360_8015F928 < 200) || ((D_360_8015F928 > 4000) && (D_360_8015F928 < 4200)))) { + ((gAllRangeEventTimer < 200) || ((gAllRangeEventTimer > 4000) && (gAllRangeEventTimer < 4200)))) { actor->timer_0C0 = 5; actorPtr = &gActors[13]; sp40.x = 0.0f; @@ -363,7 +363,7 @@ void SectorZ_8019A3E8(Actor* actor) { actorPtr->aiType = i + AI360_10 + 3; actorPtr->aiIndex = -1; - if (D_360_8015F928 >= 0) { + if (gAllRangeEventTimer >= 0) { if (((i + 13) == 23) || ((i + 13) == 24)) { actorPtr->aiIndex = AI360_SLIPPY; actorPtr->state = 2; @@ -393,7 +393,7 @@ void SectorZ_8019A3E8(Actor* actor) { } } - switch (D_360_8015F928) { + switch (gAllRangeEventTimer) { case 5850: Radio_PlayMessage(gMsg_ID_16110, RCID_ROB64); break; @@ -441,8 +441,8 @@ void SectorZ_8019A3E8(Actor* actor) { gPlayer[0].camAt.z = gActors[10].obj.pos.z; actor->timer_0BC = 10000; - D_ctx_80178340 = D_ctx_80178358 = 255; - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0; + gFillScreenAlpha = gFillScreenAlphaTarget = 255; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; AUDIO_PLAY_BGM(SEQ_ID_SZ_BOSS | SEQ_FLAG); break; } @@ -458,7 +458,7 @@ bool SectorZ_8019AA9C(Player* player) { player->state_1C8 = PLAYERSTATE_1C8_10; player->unk_1D0 = 0; gActors[0].state = 20; - D_360_8015F928--; + gAllRangeEventTimer--; return true; } } @@ -477,13 +477,13 @@ void SectorZ_8019AB8C(Actor* actor) { switch ((s32) actor->state) { case 0: D_i4_801A0564 = D_i4_801A0560 = 0; - D_360_8015F914 = 63.0f; - D_360_8015F918 = 255.0f; - D_360_8015F91C = 158.0f; + gSzMissileR = 63.0f; + gSzMissileG = 255.0f; + gSzMissileB = 158.0f; D_game_80161A44 = 30000.0f; - D_360_8015F928 = 0; + gAllRangeEventTimer = 0; actor->state = 2; - if (D_360_8015F924 != 0) { + if (gAllRangeCheckpoint != 0) { gHitCount = gSavedHitCount; } D_360_800C9B4C = 1000000; @@ -511,7 +511,7 @@ void SectorZ_8019AB8C(Actor* actor) { break; case 20: - D_360_8015F928--; + gAllRangeEventTimer--; break; case 3: @@ -577,7 +577,7 @@ void SectorZ_8019AB8C(Actor* actor) { break; case 10: - D_ctx_80178340 = D_ctx_80178358 = 0; + gFillScreenAlpha = gFillScreenAlphaTarget = 0; switch (actor->timer_0BC) { case 9800: AUDIO_PLAY_SFX(0x09000002U, gActors[10].sfxSource, 0U); @@ -638,14 +638,14 @@ void SectorZ_8019AB8C(Actor* actor) { break; } - if (!(gGameFrameCount & 24)) { - Math_SmoothStepToF(&D_360_8015F914, 63.0f, 1.0f, 9.450001f, 0); - Math_SmoothStepToF(&D_360_8015F918, 255.0f, 1.0f, 35.25f, 0); - Math_SmoothStepToF(&D_360_8015F91C, 158.0f, 1.0f, 21.6f, 0); + if (!(gGameFrameCount & 0x18)) { + Math_SmoothStepToF(&gSzMissileR, 63.0f, 1.0f, 9.450001f, 0); + Math_SmoothStepToF(&gSzMissileG, 255.0f, 1.0f, 35.25f, 0); + Math_SmoothStepToF(&gSzMissileB, 158.0f, 1.0f, 21.6f, 0); } else { - Math_SmoothStepToF(&D_360_8015F914, 0.0f, 1.0f, 3.15f, 0); - Math_SmoothStepToF(&D_360_8015F918, 20.0f, 1.0f, 11.75f, 0); - Math_SmoothStepToF(&D_360_8015F91C, 14.0f, 1.0f, 7.2000003f, 0); + Math_SmoothStepToF(&gSzMissileR, 0.0f, 1.0f, 3.15f, 0); + Math_SmoothStepToF(&gSzMissileG, 20.0f, 1.0f, 11.75f, 0); + Math_SmoothStepToF(&gSzMissileB, 14.0f, 1.0f, 7.2000003f, 0); } } @@ -751,7 +751,7 @@ void SectorZ_8019B888(void) { s32 i; Actor* actor; - for (i = 0, actor = &gActors[0]; i < 4; i++, actor++) { + for (i = 0, actor = &gActors[0]; i <= TEAM_ID_PEPPY; i++, actor++) { if ((i <= 0) || (gTeamShields[i] > 0)) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; @@ -769,7 +769,7 @@ void SectorZ_8019B888(void) { actor->health = 255; actor->iwork[11] = 1; AUDIO_PLAY_SFX(0x3100000CU, actor->sfxSource, 4U); - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_edata_800CC01C); + actor->info.hitbox = SEGMENTED_TO_VIRTUAL(gTeamHitbox); actor->info.unk_16 = 0; actor->info.unk_1C = 0.0f; } @@ -784,7 +784,7 @@ void SectorZ_8019BA64(Player* player) { Vec3f sp68; Actor* actor = gActors; - D_360_8015F928 = 0; + gAllRangeEventTimer = 0; switch (player->unk_1D0) { case 0: @@ -811,7 +811,7 @@ void SectorZ_8019BA64(Player* player) { case 1: if (gCsFrameCount < 7) { - D_ctx_80178340 = 255; + gFillScreenAlpha = 255; } gCsCamAtX -= 10.0f; @@ -828,12 +828,12 @@ void SectorZ_8019BA64(Player* player) { gCsCamAtX = 0.0f; gCsCamAtY = 0.0f; gCsCamAtZ = 0.0f; - D_ctx_80178340 = 255; + gFillScreenAlpha = 255; } break; case 2: - D_ctx_80178340 = 0; + gFillScreenAlpha = 0; player->unk_034 += 0.05f; for (i = 30; i < 34; i++) { @@ -865,7 +865,7 @@ void SectorZ_8019BA64(Player* player) { player->camAt.z = gCsCamAtZ = actor->obj.pos.z; D_ctx_80177A48[0] = 0.0f; - D_ctx_80178340 = 255; + gFillScreenAlpha = 255; for (i = 0; i < 4; i++) { Object_Kill(&gActors[i + 30].obj, gActors[i + 30].sfxSource); @@ -880,7 +880,7 @@ void SectorZ_8019BA64(Player* player) { break; case 3: - D_ctx_80178340 = 0; + gFillScreenAlpha = 0; gCsCamEyeX = -1250.0f; gCsCamEyeY = -395.0f; @@ -933,7 +933,7 @@ void SectorZ_8019BA64(Player* player) { player->state_1C8 = PLAYERSTATE_1C8_3; player->unk_01C = player->unk_018 = player->unk_014 = 0.f; AUDIO_PLAY_BGM(gBgmSeqId); - D_ctx_80177838 = 50; + gLevelStatusScreenTimer = 50; } break; } @@ -971,19 +971,19 @@ void SectorZ_8019BA64(Player* player) { break; case 700: - if (gTeamShields[2] > 0) { + if (gTeamShields[TEAM_ID_SLIPPY] > 0) { SectorZ_8019B75C(&gActors[30], 0); } break; case 720: - if (gTeamShields[1] > 0) { + if (gTeamShields[TEAM_ID_FALCO] > 0) { SectorZ_8019B75C(&gActors[31], 1); } break; case 740: - if (gTeamShields[3] > 0) { + if (gTeamShields[TEAM_ID_PEPPY] > 0) { SectorZ_8019B75C(&gActors[32], 2); } break; @@ -1182,8 +1182,8 @@ void SectorZ_8019C85C(Player* player) { player->unk_0D0 = 0.0f; player->unk_034 = 0.0f; - D_ctx_80178358 = 255; - D_ctx_80178340 = D_ctx_80178358; + gFillScreenAlphaTarget = 255; + gFillScreenAlpha = gFillScreenAlphaTarget; for (i = 0; i < ARRAY_COUNT(gActors); i++) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); @@ -1192,8 +1192,8 @@ void SectorZ_8019C85C(Player* player) { break; case 1: - D_ctx_80178358 = 0; - D_ctx_80178340 = 0; + gFillScreenAlphaTarget = 0; + gFillScreenAlpha = 0; Math_SmoothStepToAngle(&boss0->unk_078.x, 20.0f, 0.03f, boss0->fwork[1], 0.0f); Math_SmoothStepToAngle(&boss0->unk_078.y, 180.0f, 0.03f, boss0->fwork[2], 0.0f); @@ -1208,8 +1208,8 @@ void SectorZ_8019C85C(Player* player) { } if ((gCsFrameCount == 210) && gGreatFoxIntact) { - D_ctx_80177840 = 100; - D_ctx_80177930 = 1; + gLevelClearScreenTimer = 100; + gNextPlanetPath = 1; } if ((gCsFrameCount == 230) && (D_i4_801A0564 != 0)) { @@ -1226,8 +1226,8 @@ void SectorZ_8019C85C(Player* player) { break; case 2: - D_ctx_80178358 = 0; - D_ctx_80178340 = 0; + gFillScreenAlphaTarget = 0; + gFillScreenAlpha = 0; if (player->timer_1F8 == 0) { if (!gGreatFoxIntact) { @@ -1263,22 +1263,22 @@ void SectorZ_8019C85C(Player* player) { gCsCamAtY = player->pos.y; gCsCamAtZ = player->pos.z; - if (gTeamShields[1] > 0) { + if (gTeamShields[TEAM_ID_FALCO] > 0) { SectorZ_8019C574(actor1, 0); } - if (gTeamShields[2] > 0) { + if (gTeamShields[TEAM_ID_SLIPPY] > 0) { SectorZ_8019C574(actor3, 1); } - if (gTeamShields[3] > 0) { + if (gTeamShields[TEAM_ID_PEPPY] > 0) { SectorZ_8019C574(actor2, 2); } SectorZ_8019C574(actor0, 3); - D_ctx_80178340 = D_ctx_80178358 = 255; + gFillScreenAlpha = gFillScreenAlphaTarget = 255; } break; case 10: - D_ctx_80178340 = D_ctx_80178358 = 0; + gFillScreenAlpha = gFillScreenAlphaTarget = 0; gCsCamAtX = player->pos.x; gCsCamAtY = player->pos.y; gCsCamAtZ = player->pos.z; @@ -1346,10 +1346,10 @@ void SectorZ_8019C85C(Player* player) { } if (gCsFrameCount > 2710) { - D_ctx_80178358 = 255; - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0; - D_ctx_8017835C = 8; - if (D_ctx_80178340 == 255) { + gFillScreenAlphaTarget = 255; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; + gFillScreenAlphaStep = 8; + if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_6; player->timer_1F8 = 0; D_ctx_8017837C = 4; @@ -1366,7 +1366,7 @@ void SectorZ_8019C85C(Player* player) { break; case 1847: - switch (gTeamShields[1]) { + switch (gTeamShields[TEAM_ID_FALCO]) { case -1: Radio_PlayMessage(gMsg_ID_20337, RCID_ROB64); break; @@ -1382,7 +1382,7 @@ void SectorZ_8019C85C(Player* player) { break; case 1984: - switch (gTeamShields[3]) { + switch (gTeamShields[TEAM_ID_PEPPY]) { case -1: Radio_PlayMessage(gMsg_ID_20338, RCID_ROB64); break; @@ -1398,7 +1398,7 @@ void SectorZ_8019C85C(Player* player) { break; case 2130: - switch (gTeamShields[2]) { + switch (gTeamShields[TEAM_ID_SLIPPY]) { case -1: Radio_PlayMessage(gMsg_ID_20339, RCID_ROB64); break; @@ -1422,7 +1422,7 @@ void SectorZ_8019C85C(Player* player) { break; case 1847: - switch (gTeamShields[1]) { + switch (gTeamShields[TEAM_ID_FALCO]) { case -1: Radio_PlayMessage(gMsg_ID_20337, RCID_ROB64); break; @@ -1438,7 +1438,7 @@ void SectorZ_8019C85C(Player* player) { break; case 1984: - switch (gTeamShields[3]) { + switch (gTeamShields[TEAM_ID_PEPPY]) { case -1: Radio_PlayMessage(gMsg_ID_20338, RCID_ROB64); break; @@ -1454,7 +1454,7 @@ void SectorZ_8019C85C(Player* player) { break; case 2130: - switch (gTeamShields[2]) { + switch (gTeamShields[TEAM_ID_SLIPPY]) { case -1: Radio_PlayMessage(gMsg_ID_20339, RCID_ROB64); break; @@ -1485,16 +1485,16 @@ void SectorZ_8019C85C(Player* player) { case 1370: if (gGreatFoxIntact) { - D_ctx_80177930 = 1; + gNextPlanetPath = 1; } else { AUDIO_PLAY_BGM(SEQ_ID_BAD_END); - D_ctx_80177930 = 0; + gNextPlanetPath = 0; } break; case 1560: if (!gGreatFoxIntact) { - D_ctx_80177840 = 100; + gLevelClearScreenTimer = 100; } break; @@ -1615,7 +1615,7 @@ void SectorZ_8019DD20(Actor* actor) { if (actor->unk_0B6 == 24) { switch (gCsFrameCount) { case 290: - if (gTeamShields[1] > 0) { + if (gTeamShields[TEAM_ID_FALCO] > 0) { Radio_PlayMessage(gMsg_ID_16150, RCID_KATT); } break; @@ -1639,7 +1639,7 @@ void SectorZ_8019DD20(Actor* actor) { Math_SmoothStepToF(&actor->unk_0F4.z, 500.0f, 0.1f, 20.0f, 0.0f); Math_SmoothStepToF(&actor->fwork[0], 40.0f, 0.1f, 3.0f, 0.0f); - if ((gCsFrameCount < 460) && !(gCsFrameCount & 3)) { + if ((gCsFrameCount < 460) && ((gCsFrameCount & 3) == 0)) { Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1); Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, 1); @@ -1684,7 +1684,7 @@ void SectorZ_8019E234(Actor* actor) { AUDIO_PLAY_SFX(0x2903300EU, actor->sfxSource, 4U); if (actor->health <= 0) { func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, 5.0f, 10); - func_enmy_80066254(actor); + Actor_Despawn(actor); BonusText_Display(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 2); gHitCount += 3; D_ctx_80177850 = 15; @@ -1795,40 +1795,40 @@ void SectorZ_8019EA68(void) { Object_58* obj58; Boss* boss = &gBosses[0]; - D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(D_enmy_800CFDA0[gCurrentLevel]); + gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]); Rand_SetSeed(1, 29000, 9876); for (obj58 = gObjects58, i = 0; i < 1000; i++) { - if (D_ctx_80178310[i].id < 0) { + if (gLevelObjects[i].id < 0) { break; } - if (D_ctx_80178310[i].id < 161) { + if (gLevelObjects[i].id < 161) { Object_58_Initialize(obj58); obj58->obj.status = OBJ_ACTIVE; - obj58->obj.id = D_ctx_80178310[i].id; - obj58->obj.pos.x = D_ctx_80178310[i].xPos; - obj58->obj.pos.y = D_ctx_80178310[i].yPos; - obj58->obj.pos.z = -D_ctx_80178310[i].zPos1; - obj58->obj.rot.y = D_ctx_80178310[i].rot.y; + obj58->obj.id = gLevelObjects[i].id; + obj58->obj.pos.x = gLevelObjects[i].xPos; + obj58->obj.pos.y = gLevelObjects[i].yPos; + obj58->obj.pos.z = -gLevelObjects[i].zPos1; + obj58->obj.rot.y = gLevelObjects[i].rot.y; Object_SetInfo(&obj58->info, obj58->obj.id); obj58++; } } for (j = 50, actor = &gActors[j], i = 0; i < 1000; i++) { - if (D_ctx_80178310[i].id < 0) { + if (gLevelObjects[i].id < 0) { break; } - if ((D_ctx_80178310[i].id >= 176) && (D_ctx_80178310[i].id < 292)) { + if ((gLevelObjects[i].id >= OBJ_ACTOR_176) && (gLevelObjects[i].id < OBJ_BOSS_292)) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = D_ctx_80178310[i].id; - actor->obj.pos.x = D_ctx_80178310[i].xPos; - actor->obj.pos.y = D_ctx_80178310[i].yPos; - actor->obj.pos.z = -D_ctx_80178310[i].zPos1; + actor->obj.id = gLevelObjects[i].id; + actor->obj.pos.x = gLevelObjects[i].xPos; + actor->obj.pos.y = gLevelObjects[i].yPos; + actor->obj.pos.z = -gLevelObjects[i].zPos1; actor->health = 24; actor->unk_0F4.x = RAND_FLOAT_CENTERED(4.0f); actor->unk_0F4.y = RAND_FLOAT_CENTERED(4.0f); diff --git a/src/overlays/ovl_i5/fox_ma.c b/src/overlays/ovl_i5/fox_ma.c index 825d5091..097b308d 100644 --- a/src/overlays/ovl_i5/fox_ma.c +++ b/src/overlays/ovl_i5/fox_ma.c @@ -4,13 +4,12 @@ * Description: Level: Macbeth */ -#include "prevent_bss_reordering.h" +// #include "prevent_bss_reordering.h" #include "global.h" #include "assets/ast_macbeth.h" #include "assets/ast_landmaster.h" #include "assets/ast_enmy_planet.h" // #include "prevent_bss_reordering2.h" -// #include "prevent_bss_reordering.h" void Macbeth_801AD624(f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, s16, s16, f32); bool Macbeth_801A0308(Actor*, f32, f32, u8); @@ -29,7 +28,7 @@ void Macbeth_801ACF6C(void); f32 D_MA_801BE250[40]; s16 D_MA_801BE2F0[9]; - +// #include "prevent_bss_reordering.h" char D_i5_801BE308[8]; s16 D_i5_801BE310; u8 D_i5_801BE312; @@ -613,69 +612,70 @@ void Macbeth_8019AF34(Actor* actor) { } void Macbeth_8019B580(Actor* actor, s32* arg1) { - if (*arg1 < 11) { - if ((gGameFrameCount & 0x1F) == 0) { - func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[21], - actor->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f), - actor->obj.pos.z - 420.0f + RAND_FLOAT(50.0f), 10.0f); - } else if ((gGameFrameCount & 0x1F) == 8) { - func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[25], - actor->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f), - actor->obj.pos.z + RAND_FLOAT(50.0f), 10.0f); - } else if ((gGameFrameCount & 0x1F) == 16) { - func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[23], - actor->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f), - (actor->obj.pos.z + 320.0f) + RAND_FLOAT(50.0f), 10.0f); - } else if ((gGameFrameCount & 0x1F) == 24) { - func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[25], - actor->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f), - actor->obj.pos.z + RAND_FLOAT(50.0f), 10.0f); - } - if (((gGameFrameCount & 3) & 0xFFFF) == 0) { - func_effect_8007C120(actor->obj.pos.x + actor->fwork[25], actor->obj.pos.y + 350.0f, actor->obj.pos.z, - actor->vel.x, actor->vel.y, actor->vel.z, 0.2f, 10); - } + if (*arg1 > 10) { + return; + } + if ((gGameFrameCount % 32U) == 0) { + func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[21], + actor->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f), + actor->obj.pos.z - 420.0f + RAND_FLOAT(50.0f), 10.0f); + } else if ((gGameFrameCount % 32U) == 8) { + func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[25], + actor->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f), + actor->obj.pos.z + RAND_FLOAT(50.0f), 10.0f); + } else if ((gGameFrameCount % 32U) == 16) { + func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[23], + actor->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f), + (actor->obj.pos.z + 320.0f) + RAND_FLOAT(50.0f), 10.0f); + } else if ((gGameFrameCount % 32U) == 24) { + func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[25], + actor->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f), + actor->obj.pos.z + RAND_FLOAT(50.0f), 10.0f); + } + if ((u16) (gGameFrameCount % 4U) == 0) { // fake? + func_effect_8007C120(actor->obj.pos.x + actor->fwork[25], actor->obj.pos.y + 350.0f, actor->obj.pos.z, + actor->vel.x, actor->vel.y, actor->vel.z, 0.2f, 10); } } void Macbeth_8019B8B0(Actor* actor) { - if ((gGameFrameCount & 3) == 0) { + if ((gGameFrameCount % 4U) == 0) { func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[21], actor->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f), actor->obj.pos.z - 420.0f + RAND_FLOAT(50.0f), 20.0f); - } else if ((gGameFrameCount & 3) == 1) { + } else if ((gGameFrameCount % 4U) == 1) { func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[25], actor->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f), RAND_FLOAT(50.0f) + actor->obj.pos.z, 20.0f); - } else if ((gGameFrameCount & 3) == 2) { + } else if ((gGameFrameCount % 4U) == 2) { func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[23], actor->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f), RAND_FLOAT(50.0f) + (actor->obj.pos.z + 420.0f), 20.0f); - } else if ((gGameFrameCount & 3) == 3) { + } else if ((gGameFrameCount % 4U) == 3) { func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[25], actor->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f), RAND_FLOAT(50.0f) + actor->obj.pos.z, 20.0f); } - if ((gGameFrameCount & 3) == 0) { + if ((gGameFrameCount % 4U) == 0) { func_effect_8007C120(actor->obj.pos.x + actor->fwork[25], actor->obj.pos.y + 350.0f, actor->obj.pos.z, actor->vel.x, actor->vel.y, actor->vel.z, 0.2f, 20); } } void Macbeth_8019BBEC(Actor* actor) { - if ((actor->timer_0BC & 0xF) == 0) { + if ((actor->timer_0BC % 16U) == 0) { func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[21], RAND_FLOAT_CENTERED(100.0f) + (actor->obj.pos.y + 100.0f), RAND_FLOAT(50.0f) + (actor->obj.pos.z - 400.0f), 3.0f); - } else if ((actor->timer_0BC & 0xF) == 4) { + } else if ((actor->timer_0BC % 16U) == 4) { func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[25], RAND_FLOAT_CENTERED(100.0f) + (actor->obj.pos.y + 100.0f), RAND_FLOAT(50.0f) + actor->obj.pos.z, 3.0f); - } else if ((actor->timer_0BC & 0xF) == 8) { + } else if ((actor->timer_0BC % 16U) == 8) { func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[23], RAND_FLOAT_CENTERED(100.0f) + (actor->obj.pos.y + 100.0f), RAND_FLOAT(50.0f) + (actor->obj.pos.z + 450.0f), 3.0f); - } else if ((actor->timer_0BC & 0xF) == 12) { + } else if ((actor->timer_0BC % 16U) == 12) { func_effect_8007C120(actor->obj.pos.x + actor->fwork[25], actor->obj.pos.y + 100.0f, actor->obj.pos.z, actor->vel.x, actor->vel.y, actor->vel.z, 0.15f, 10); } @@ -854,9 +854,9 @@ void Macbeth_8019C778(Actor* actor) { break; case 5: if (actor->timer_0BC == 198) { - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = D_ctx_80178340 = 255; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 255; } else if (actor->timer_0BC == 197) { - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = D_ctx_80178340 = 0; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 0; } if (((actor->timer_0BC < 150) || (actor->timer_0BC > 170)) && (actor->timer_0BC > 80)) { Macbeth_8019B8B0(actor); @@ -874,7 +874,7 @@ void Macbeth_8019C778(Actor* actor) { if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_7; gPlayer[0].unk_1D0 = 0; - D_ctx_80177930 = 0; + gNextPlanetPath = 0; } actor->state++; Audio_KillSfxBySourceAndId(gPlayer[0].sfxSource, 0x1100000A); @@ -900,7 +900,7 @@ void Macbeth_8019C778(Actor* actor) { } D_i5_801BE320[22] = 0; } - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { actor->fwork[3] = 15.0f; } else { actor->fwork[3] = -15.0f; @@ -1422,13 +1422,13 @@ void Macbeth_8019EE68(Actor* actor) { if (actor->iwork[5] < D_MA_801BE2F0[3]) { D_MA_801BE2F0[3] = actor->iwork[5]; } - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = D_ctx_80178340 = 255; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 255; gCameraShake = 35; if ((gPlayer[0].unk_138 - actor->obj.pos.z > -200.0f) && (gPlayer[0].unk_138 - actor->obj.pos.z < 200.0f) && (gPlayer[0].pos.y - actor->obj.pos.y > -300.0f) && (gPlayer[0].pos.y - actor->obj.pos.y < 300.0f) && (gPlayer[0].pos.x - actor->obj.pos.x > -800.0f) && (gPlayer[0].pos.x - actor->obj.pos.x < 800.0f)) { - D_ctx_80178348 = D_ctx_80178340 = 255; - D_ctx_80178350 = D_ctx_80178354 = 0; + gFillScreenRed = gFillScreenAlpha = 255; + gFillScreenGreen = gFillScreenBlue = 0; Player_ApplyDamage(&gPlayer[0], 0, 60); } Macbeth_801A015C(actor); @@ -1995,7 +1995,7 @@ bool Macbeth_801A0EB8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* gSPSetGeometryMode(gMasterDisp++, G_TEXTURE_GEN); } if ((limbIndex == 5) || (limbIndex == 9)) { - if (actor->iwork[7] & 1) { + if ((actor->iwork[7] % 2) != 0) { RCP_SetupDL_27(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } @@ -2065,7 +2065,7 @@ void Macbeth_801A12C4(Actor* actor) { switch (actor->obj.id) { case OBJ_ACTOR_212: if (actor->iwork[13] == 0) { - if (actor->iwork[7] & 1) { + if ((actor->iwork[7] % 2) != 0) { RCP_SetupDL_27(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } @@ -2083,7 +2083,7 @@ void Macbeth_801A12C4(Actor* actor) { Matrix_Translate(gGfxMatrix, 0.0f, 205.0f, 0.0f, 1); Matrix_RotateZ(gGfxMatrix, actor->fwork[4] * M_DTOR, 1); Matrix_SetGfxMtx(&gMasterDisp); - if (actor->iwork[7] & 1) { + if ((actor->iwork[7] % 2) != 0) { RCP_SetupDL_27(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } @@ -2101,7 +2101,7 @@ void Macbeth_801A12C4(Actor* actor) { if (actor->iwork[17] != 2) { Matrix_Translate(gGfxMatrix, 0.0f, 5.0f, 0.0f, 1); Matrix_SetGfxMtx(&gMasterDisp); - if (actor->iwork[8] & 1) { + if ((actor->iwork[8] % 2) != 0) { RCP_SetupDL_27(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } @@ -2116,7 +2116,7 @@ void Macbeth_801A12C4(Actor* actor) { if (actor->iwork[17] != 2) { Matrix_Translate(gGfxMatrix, 0.0f, -15.0f, 0.0f, 1); Matrix_SetGfxMtx(&gMasterDisp); - if (actor->iwork[8] & 1) { + if ((actor->iwork[8] % 2) != 0) { RCP_SetupDL_27(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } @@ -2140,7 +2140,7 @@ void Macbeth_801A12C4(Actor* actor) { Matrix_Translate(gGfxMatrix, 0.0f, -5.0f, 0.0f, 1); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL(&gMasterDisp, 0x39); - if (actor->iwork[7] & 1) { + if ((actor->iwork[7] % 2) != 0) { RCP_SetupDL_27(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } @@ -2153,7 +2153,7 @@ void Macbeth_801A12C4(Actor* actor) { break; case OBJ_ACTOR_208: if (actor->iwork[13] < 2) { - if (actor->iwork[7] & 1) { + if ((actor->iwork[7] % 2) != 0) { RCP_SetupDL_27(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } @@ -2231,7 +2231,7 @@ void Macbeth_801A12C4(Actor* actor) { Matrix_RotateY(gGfxMatrix, actor->fwork[26] * M_DTOR, 1); Matrix_RotateX(gGfxMatrix, actor->fwork[29] * M_DTOR, 1); Matrix_SetGfxMtx(&gMasterDisp); - if (actor->iwork[7] & 1) { + if ((actor->iwork[7] % 2) != 0) { RCP_SetupDL_27(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } @@ -2256,7 +2256,7 @@ void Macbeth_801A12C4(Actor* actor) { Matrix_RotateY(gGfxMatrix, actor->fwork[26] * M_DTOR, 1); Matrix_RotateX(gGfxMatrix, actor->fwork[29] * M_DTOR, 1); Matrix_SetGfxMtx(&gMasterDisp); - if (actor->iwork[9] & 1) { + if ((actor->iwork[9] % 2) != 0) { RCP_SetupDL_27(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } @@ -3013,16 +3013,16 @@ void Macbeth_801A4B24(Actor* actor) { actor->unk_0D0 = 0; D_MA_801BE2F0[5] = 1; - D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(D_enmy_800CFDA0[gCurrentLevel]); + gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]); - for (i = D_ctx_80177DC8 - 5, objInit = &D_ctx_80178310[i]; i < D_ctx_80177DC8 + 50; i++, objInit++) { + for (i = D_ctx_80177DC8 - 5, objInit = &gLevelObjects[i]; i < D_ctx_80177DC8 + 50; i++, objInit++) { Object_Load(objInit, 40000.0f, -2000.0f, 40000.0f, -2000.0f); } D_ctx_80177DC8 = i; D_ctx_8017796C = -1; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_7; gPlayer[0].unk_1D0 = 0; - D_ctx_80177930 = 1; + gNextPlanetPath = 1; actor->timer_0BC = 5; actor->state = 6; Audio_KillSfxBySourceAndId(gPlayer[0].sfxSource, 0x1100000A); @@ -3185,7 +3185,7 @@ void Macbeth_801A57D0(Effect* effect) { if (effect->obj.pos.y < gGroundLevel) { Macbeth_801ADCEC(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 999.9f, -10.0f, 5.0f); Object_Kill(&effect->obj, effect->sfxSource); - if (D_ctx_80161A88 != 2) { + if (gGroundType != GROUNDTYPE_WATER) { effect->obj.pos.y = gGroundLevel; } } @@ -3350,7 +3350,7 @@ void Macbeth_801A6144(Actor* actor) { void Macbeth_801A6540(Actor* actor) { RCP_SetupDL(&gMasterDisp, 0x39); - if (actor->timer_0C6 & 1) { + if ((actor->timer_0C6 % 2) != 0) { RCP_SetupDL(&gMasterDisp, 0x3A); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } @@ -3367,7 +3367,7 @@ void Macbeth_801A65E0(Object_80* obj80) { void Macbeth_801A6608(Object_80* obj80) { if ((gPlayer[0].unk_138 - obj80->obj.pos.z) < obj80->vel.z) { - if (D_ctx_80177854 != 100) { + if (gPlayState != PLAY_PAUSE) { Math_SmoothStepToF(&obj80->vel.x, 30, 0.5f, 30.0f, 0.0f); if (obj80->vel.x < 31.0f) { obj80->vel.x = 255.0f; @@ -3754,7 +3754,7 @@ void Macbeth_801A7D98(Actor* actor) { D_i5_801BE320[29] = 250; D_i5_801BE320[9] = 200; D_i5_801BE320[10] = 250; - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_edata_800CBF34); + actor->info.hitbox = SEGMENTED_TO_VIRTUAL(gHitboxNone); D_i5_801BE320[14] = 0; D_i5_801BE320[15] = 0; gBossFrameCount = 0; @@ -3968,7 +3968,7 @@ void Macbeth_801A7E7C(Actor* actor) { AUDIO_PLAY_SFX(0x2902405E, actor->sfxSource, 4); } } else { - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_edata_800CBF34); + actor->info.hitbox = SEGMENTED_TO_VIRTUAL(gHitboxNone); if ((gPlayer[0].pos.y + 1200.0f) < actor->obj.pos.y) { actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_603677C); D_i5_801BE320[3] = 0; @@ -4012,7 +4012,7 @@ void Macbeth_801A7E7C(Actor* actor) { break; case 8: Macbeth_8019A198(actor); - if (!(gGameFrameCount & 0xF)) { + if (((gGameFrameCount % 16) == 0)) { AUDIO_PLAY_SFX(0x29036099, actor->sfxSource, 4); } Macbeth_801A74C4(actor); @@ -4043,7 +4043,7 @@ void Macbeth_801A7E7C(Actor* actor) { if (D_i5_801BE320[29] <= 0) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = D_ctx_80178340 = 255; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 255; AUDIO_PLAY_SFX(0x2940D09A, actor->sfxSource, 4); Radio_PlayMessage(gMsg_ID_17450, RCID_BOSS_MACBETH); func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f); @@ -4068,7 +4068,7 @@ void Macbeth_801A7E7C(Actor* actor) { } } } - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { actor->obj.pos.x += D_i5_801BE368[12]; actor->obj.pos.y += D_i5_801BE368[13]; } else { @@ -4083,7 +4083,7 @@ void Macbeth_801A7E7C(Actor* actor) { } Math_SmoothStepToAngle(&actor->obj.rot.x, 0.0f, 0.1f, 20.0f, 0.01f); Math_SmoothStepToAngle(&actor->obj.rot.y, 0.0f, 0.1f, 20.0f, 0.01f); - if (!(gGameFrameCount & 0x1F)) { + if (((gGameFrameCount % 32) == 0)) { D_i5_801BE320[6] = 0; D_i5_801BE320[8] = 0; D_i5_801BE320[5] = 0; @@ -4117,7 +4117,7 @@ void Macbeth_801A7E7C(Actor* actor) { 1.0f); actor->obj.rot.x += 10.0f; actor->obj.rot.z += 10.0f; - if (!(gGameFrameCount & 7)) { + if (((gGameFrameCount % 8) == 0)) { func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f); func_effect_8007C688(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 5.0f, 8); } @@ -4181,7 +4181,7 @@ void Macbeth_801A7E7C(Actor* actor) { } } } - if (!(gGameFrameCount & 0x1F)) { + if (((gGameFrameCount % 32) == 0)) { D_i5_801BE320[6] = 0; D_i5_801BE320[8] = 0; D_i5_801BE320[5] = 0; @@ -4367,7 +4367,7 @@ void Macbeth_801A7E7C(Actor* actor) { AUDIO_PLAY_SFX(0x19006035, actor->sfxSource, 4); actor->sfxSource[0] = actor->obj.pos.x; } - if (!(gGameFrameCount & 1) && (D_i5_801BE320[15] == 0)) { + if (((gGameFrameCount % 2) == 0) && (D_i5_801BE320[15] == 0)) { actor->vwork[6].x = actor->vwork[2].x + 80.0f; actor->vwork[6].y = 0.0f; actor->vwork[6].z = gPlayer[0].unk_138 + 50.0f; @@ -4470,7 +4470,7 @@ void Macbeth_801A7E7C(Actor* actor) { if (actor->unk_0D0 != 0) { gPlayer[0].shields = 0; } - if (!(gGameFrameCount & 0xF)) { + if (((gGameFrameCount % 16) == 0)) { func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f); } D_i5_801BE368[9] = gPlayer[0].pos.x; @@ -4761,7 +4761,7 @@ bool Macbeth_801ABC14(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* switch (limbIndex) { case 14: - if (actor->iwork[7] & 1) { + if ((actor->iwork[7] % 2) != 0) { RCP_SetupDL(&gMasterDisp, 0x1C); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } @@ -4776,7 +4776,7 @@ bool Macbeth_801ABC14(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* case 18: case 19: case 20: - if (actor->iwork[8] & 1) { + if ((actor->iwork[8] % 2) != 0) { RCP_SetupDL(&gMasterDisp, 0x1C); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } @@ -4788,7 +4788,7 @@ bool Macbeth_801ABC14(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* break; } - if (actor->iwork[9] & 1) { + if ((actor->iwork[9] % 2) != 0) { RCP_SetupDL(&gMasterDisp, 0x1C); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } @@ -4901,7 +4901,7 @@ void Macbeth_801AC754(Player* player) { f32 sp4C; f32 sp48; f32 sp44; - ObjectInit* var_s0; + ObjectInit* objInit; s32 i; f32 zeroVar = 0.0f; @@ -4913,19 +4913,19 @@ void Macbeth_801AC754(Player* player) { switch (player->unk_1D0) { case 0: - var_s0 = D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(D_MA_6035678); + objInit = gLevelObjects = SEGMENTED_TO_VIRTUAL(D_MA_6035678); - for (i = 0; var_s0->id != OBJ_INVALID; i++, var_s0++) { - Object_Load(var_s0, 4000.0f, -4000.0f, 4000.0f, -4000.0f); + for (i = 0; objInit->id != OBJ_INVALID; i++, objInit++) { + Object_Load(objInit, 4000.0f, -4000.0f, 4000.0f, -4000.0f); } - var_s0 = D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(D_enmy_800CFDA0[gCurrentLevel]); + objInit = gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]); - for (i = 0; i < 40; i++, var_s0++) { - Object_Load(var_s0, 4000.0f, -4000.0f, 4000.0f, -4000.0f); + for (i = 0; i < 40; i++, objInit++) { + Object_Load(objInit, 4000.0f, -4000.0f, 4000.0f, -4000.0f); } - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = D_ctx_80178340 = 255; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 255; player->unk_144 -= 800.0f; player->unk_1D0 = 1; D_i5_801BE24C = 8.0f; @@ -4945,18 +4945,18 @@ void Macbeth_801AC754(Player* player) { player->camAt.z = gCsCamAtZ = -800.0f; player->unk_240 = 1; player->unk_1D0 = 2; - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255; - D_ctx_80178340 = 255; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; + gFillScreenAlpha = 255; Macbeth_801ACF6C(); /* fallthrough */ case 2: if (gCsFrameCount < 30) { - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255; - D_ctx_80178340 = 255; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; + gFillScreenAlpha = 255; } - if ((gCsFrameCount < 60) && !(gCsFrameCount & 0xF)) { + if ((gCsFrameCount < 60) && ((gCsFrameCount % 16U) == 0)) { Macbeth_801ACF6C(); - } else if ((gCsFrameCount < 100) && !(gCsFrameCount & 0x1F)) { + } else if ((gCsFrameCount < 100) && ((gCsFrameCount % 32) == 0)) { Macbeth_801ACF6C(); } if (gCsFrameCount > 50) { @@ -4989,7 +4989,7 @@ void Macbeth_801AC754(Player* player) { break; case 3: AUDIO_PLAY_BGM(SEQ_ID_MACBETH | SEQ_FLAG); - D_ctx_80177838 = 50; + gLevelStatusScreenTimer = 50; player->state_1C8 = PLAYERSTATE_1C8_3; player->unk_1D0 = player->timer_1F8 = player->timer_1FC = player->unk_240 = 0; player->unk_0D4 = 3.0f; @@ -5054,18 +5054,18 @@ void Macbeth_801ACF6C(void) { } void Macbeth_801ACFBC(void) { - ObjectInit* var_s0; + ObjectInit* objInit; - for (var_s0 = D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(D_MA_60357CC); var_s0->id != OBJ_INVALID; var_s0++) { - Object_Load(var_s0, 4000.0f, -4000.0f, 4000.0f, -4000.0f); + for (objInit = gLevelObjects = SEGMENTED_TO_VIRTUAL(D_MA_60357CC); objInit->id != OBJ_INVALID; objInit++) { + Object_Load(objInit, 4000.0f, -4000.0f, 4000.0f, -4000.0f); } } void Macbeth_801AD080(void) { - ObjectInit* var_s0; + ObjectInit* objInit; - for (var_s0 = D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(D_MA_6035920); var_s0->id != OBJ_INVALID; var_s0++) { - Object_Load(var_s0, 4000.0f, -4000.0f, 4000.0f, -4000.0f); + for (objInit = gLevelObjects = SEGMENTED_TO_VIRTUAL(D_MA_6035920); objInit->id != OBJ_INVALID; objInit++) { + Object_Load(objInit, 4000.0f, -4000.0f, 4000.0f, -4000.0f); } } @@ -5087,7 +5087,7 @@ void Macbeth_801AD144(PlayerShot* playerShot) { for (i = 0; i < 60; i++, actor++) { if ((actor->obj.status == OBJ_ACTIVE) && (actor->timer_0C2 == 0) && (actor->obj.id >= OBJ_ACTOR_205) && (actor->obj.id <= OBJ_ACTOR_213)) { - temp_s6 = gGameFrameCount & 7; + temp_s6 = gGameFrameCount % 8U; var_s1 = &actor->info.hitbox[0]; temp_ft3 = var_s1[0]; var_s1++; @@ -5337,7 +5337,7 @@ void Macbeth_801ADD68(Actor* actor) { actor->state = 1; } if (actor->obj.pos.y < (gGroundLevel + 800.0f)) { - if (actor->iwork[0] >= 11) { + if (actor->iwork[0] > 10) { actor->iwork[0] -= 10; } else if (actor->iwork[0] > 0) { actor->iwork[0] -= 1; @@ -5345,7 +5345,7 @@ void Macbeth_801ADD68(Actor* actor) { } break; case 1: - if (actor->iwork[0] >= 11) { + if (actor->iwork[0] > 10) { actor->iwork[0] -= 10; } else if (actor->iwork[0] > 0) { actor->iwork[0] -= 1; @@ -5396,7 +5396,7 @@ void Macbeth_801AE2C0(Actor* actor) { gDPSetEnvColor(gMasterDisp++, 0, 0, 0, actor->iwork[0]); } else { RCP_SetupDL(&gMasterDisp, 0x17); - if (actor->iwork[7] & 1) { + if ((actor->iwork[7] % 2) != 0) { RCP_SetupDL_27(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } @@ -5576,7 +5576,7 @@ void Macbeth_801AEC04(Actor* actor) { actor->fwork[2] += 0.1f; } - if (!(gGameFrameCount & 0xF)) { + if (((gGameFrameCount % 16) == 0)) { func_effect_8007C120(actor->obj.pos.x - 35.0f, actor->obj.pos.y + 15.0f, actor->obj.pos.z, -3.0f, 0.0f, 0.0f, 0.1f, 20); func_effect_8007C120(actor->obj.pos.x + 35.0f, actor->obj.pos.y + 15.0f, actor->obj.pos.z, 3.0f, 0.0f, @@ -5586,7 +5586,7 @@ void Macbeth_801AEC04(Actor* actor) { default: break; } - if (gGameFrameCount & 1) { + if ((gGameFrameCount % 2) != 0) { actor->fwork[1] = 255.0f; } else { actor->fwork[1] = 32.0f; @@ -5768,7 +5768,7 @@ void Macbeth_801AF70C(f32 xPos, f32 yPos, f32 zPos, f32 arg3) { effect->unk_60.x = RAND_FLOAT_CENTERED(30.0f); effect->unk_60.y = RAND_FLOAT_CENTERED(30.0f); effect->unk_60.z = RAND_FLOAT_CENTERED(30.0f); - effect->unk_44 = i & 3; + effect->unk_44 = i % 4U; Object_SetInfo(&effect->info, effect->obj.id); } } @@ -5860,8 +5860,8 @@ void Macbeth_801AF8F4(Player* player) { player->pos.y = -3.0f; player->pos.z = player->unk_138 = -111130.0f; player->unk_144 = D_ctx_80177D20 = 115930.0f; - player->flags_228 = 0x10; - D_enmy_80161680 = 330; + player->flags_228 = PFLAG_228_4; + gLastPathChange = OBJ_ITEM_PATH_TURN_RIGHT; D_i5_801BA1DC = 0.0f; gActors[D_i5_801BE314].obj.pos.x = -431.0f; gActors[D_i5_801BE314].obj.pos.y = 0.0f; @@ -5940,9 +5940,9 @@ void Macbeth_801AF8F4(Player* player) { break; case 4: if (gCsFrameCount == 403) { - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255; - D_ctx_80178358 = 255; - D_ctx_8017835C = 20; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; + gFillScreenAlphaTarget = 255; + gFillScreenAlphaStep = 20; } if (gCsFrameCount == 416) { player->unk_1D0++; @@ -5965,8 +5965,8 @@ void Macbeth_801AF8F4(Player* player) { player->unk_0B8 = 10014.0f; player->timer_210 = 1000; player->unk_0B4 = 0.0f; - D_ctx_80178358 = 0; - D_ctx_8017835C = 127; + gFillScreenAlphaTarget = 0; + gFillScreenAlphaStep = 127; } break; case 5: @@ -5994,7 +5994,7 @@ void Macbeth_801AF8F4(Player* player) { gActors[D_i5_801BE314].vel.y, 0.0f, 0.2f, 10); } else { player->vel.z = 0.0f; - if (!(gGameFrameCount & 0xF)) { + if (((gGameFrameCount % 16) == 0)) { gFogRed -= 1; gFogGreen -= 1; gFogBlue -= 2; @@ -6050,14 +6050,14 @@ void Macbeth_801AF8F4(Player* player) { case 6: Math_SmoothStepToF(&D_ctx_80177A48[4], -60.0f, 1.0f, 0.5f, 0.0f); Math_SmoothStepToF(&D_ctx_80177A48[5], 240.0f, 1.0f, 2.0f, 0.0f); - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { func_effect_8007797C(11000.0f, 200.0f, -139000.0f, D_ctx_80177A48[4], 4.0f, D_ctx_80177A48[5], 20.0f); } if (gCsFrameCount == 710) { - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = D_ctx_80178340 = 255; - D_ctx_80178358 = 0; - D_ctx_8017835C = 128; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 255; + gFillScreenAlphaTarget = 0; + gFillScreenAlphaStep = 128; func_effect_8007D9DC(gActors[D_i5_801BE314].obj.pos.x + 1000.0f, gActors[D_i5_801BE314].obj.pos.y + 20.0f, -138500.0f, 100.0f, 1000.0f, 0); func_effect_8007A568(gActors[D_i5_801BE314].obj.pos.x + 200.0f, @@ -6075,22 +6075,22 @@ void Macbeth_801AF8F4(Player* player) { gActors[D_i5_801BE314].obj.pos.y + 500.0f + RAND_FLOAT_CENTERED(700.0f), gActors[D_i5_801BE314].obj.pos.z + 3000.0f + RAND_FLOAT_CENTERED(700.0f), 30.0f); } - if ((gCsFrameCount > 710) && !(gGameFrameCount & 7)) { + if ((gCsFrameCount > 710) && ((gGameFrameCount % 8) == 0)) { func_effect_8007D0E0(gActors[D_i5_801BE314].obj.pos.x + 500.0f + RAND_FLOAT_CENTERED(700.0f), gActors[D_i5_801BE314].obj.pos.y + 500.0f + RAND_FLOAT_CENTERED(700.0f), gActors[D_i5_801BE314].obj.pos.z + 3000.0f + RAND_FLOAT_CENTERED(700.0f), 30.0f); } - if ((gCsFrameCount > 725) && !(gGameFrameCount & 7)) { + if ((gCsFrameCount > 725) && ((gGameFrameCount % 8) == 0)) { func_effect_8007D0E0(gActors[D_i5_801BE314].obj.pos.x - 1500.0f + RAND_FLOAT_CENTERED(700.0f), gActors[D_i5_801BE314].obj.pos.y + 1000.0f + RAND_FLOAT_CENTERED(700.0f), gActors[D_i5_801BE314].obj.pos.z + 1700.0f + RAND_FLOAT_CENTERED(700.0f), 30.0f); } - if ((gCsFrameCount > 740) && !(gGameFrameCount & 7)) { + if ((gCsFrameCount > 740) && ((gGameFrameCount % 8) == 0)) { func_effect_8007D0E0(gActors[D_i5_801BE314].obj.pos.x - 3500.0f + RAND_FLOAT_CENTERED(700.0f), gActors[D_i5_801BE314].obj.pos.y + 600.0f + RAND_FLOAT_CENTERED(700.0f), gActors[D_i5_801BE314].obj.pos.z + 1200.0f + RAND_FLOAT_CENTERED(700.0f), 30.0f); } - if ((gCsFrameCount > 755) && !(gGameFrameCount & 7)) { + if ((gCsFrameCount > 755) && ((gGameFrameCount % 8) == 0)) { func_effect_8007D0E0(gActors[D_i5_801BE314].obj.pos.x - 3000.0f + RAND_FLOAT_CENTERED(700.0f), gActors[D_i5_801BE314].obj.pos.y + 400.0f + RAND_FLOAT_CENTERED(700.0f), gActors[D_i5_801BE314].obj.pos.z + 1300.0f + RAND_FLOAT_CENTERED(700.0f), 30.0f); @@ -6178,9 +6178,9 @@ void Macbeth_801AF8F4(Player* player) { if (gCsFrameCount == 880) { D_80137E84[0] = 1; D_Timer_80177BD0[0] = 10; - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255; - D_ctx_80178358 = 255; - D_ctx_8017835C = 20; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; + gFillScreenAlphaTarget = 255; + gFillScreenAlphaStep = 20; AUDIO_PLAY_SFX(0x2940F026, gActors[D_i5_801BE314].sfxSource, 4); gBossActive = D_ctx_80178488 = 0; } @@ -6190,9 +6190,9 @@ void Macbeth_801AF8F4(Player* player) { player->pos.z = player->unk_138 = -(D_ctx_80177D20 + 210.0f); player->pos.x = player->unk_0AC; func_effect_8007A568(player->pos.x - 1800.0f, -50.0f, player->pos.z + 5000.0f, 40.0f); - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = D_ctx_80178340 = 255; - D_ctx_80178358 = 0; - D_ctx_8017835C = 8; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 255; + gFillScreenAlphaTarget = 0; + gFillScreenAlphaStep = 8; D_ctx_80177A48[0] = 0.0f; player->unk_234 = 1; player->camAt.x = gCsCamAtX = player->camEye.x = gCsCamEyeX = player->pos.x; @@ -6200,7 +6200,7 @@ void Macbeth_801AF8F4(Player* player) { player->camEye.y = gCsCamEyeY = player->pos.y + 30.0f; player->camEye.z = gCsCamEyeZ = (player->unk_138 + D_ctx_80177D20) - 300.0f; player->camAt.z = gCsCamAtZ = player->unk_138 + D_ctx_80177D20; - player->unk_198 = player->timer_210 = 0; + player->savedCockpitView = player->timer_210 = 0; player->unk_190 = player->unk_194 = player->unk_188 = player->unk_18C = player->unk_118 = player->unk_114 = player->unk_4D8 = player->unk_034 = player->unk_174 = player->unk_178 = player->unk_17C = player->unk_180 = player->unk_184 = player->wings.unk_04 = player->unk_170 = @@ -6219,7 +6219,7 @@ void Macbeth_801AF8F4(Player* player) { } break; case 7: - if (!(gGameFrameCount & 3)) { + if (((gGameFrameCount % 4) == 0)) { func_effect_8007D0E0(player->pos.x - 1750.0f + RAND_FLOAT_CENTERED(700.0f), 10.0f, player->pos.z + 5000.0f + RAND_FLOAT_CENTERED(700.0f), 5.0f); func_effect_8007C85C(player->pos.x - 1800.0f + RAND_FLOAT_CENTERED(40.0f), -100.0f, @@ -6278,7 +6278,7 @@ void Macbeth_801AF8F4(Player* player) { switch (gCsFrameCount) { case 973: - D_ctx_80177840 = 100; + gLevelClearScreenTimer = 100; break; case 340: Radio_PlayMessage(gMsg_ID_17471, RCID_BOSS_MACBETH); @@ -6303,12 +6303,12 @@ void Macbeth_801AF8F4(Player* player) { Radio_PlayMessage(gMsg_ID_20010, RCID_FOX); break; case 1060: - if (gTeamShields[2] > 0) { + if (gTeamShields[TEAM_ID_SLIPPY] > 0) { Macbeth_801AF27C(&gActors[5], 0); } break; case 1130: - switch (gTeamShields[2]) { + switch (gTeamShields[TEAM_ID_SLIPPY]) { case 0: Radio_PlayMessage(gMsg_ID_20345, RCID_ROB64); break; @@ -6321,7 +6321,7 @@ void Macbeth_801AF8F4(Player* player) { } break; case 1240: - if (gTeamShields[3] > 0) { + if (gTeamShields[TEAM_ID_PEPPY] > 0) { Macbeth_801AF27C(&gActors[6], 1); } break; @@ -6329,7 +6329,7 @@ void Macbeth_801AF8F4(Player* player) { D_i5_801BA888 = 220.0f; break; case 1350: - switch (gTeamShields[3]) { + switch (gTeamShields[TEAM_ID_PEPPY]) { case 0: Radio_PlayMessage(gMsg_ID_20344, RCID_ROB64); break; @@ -6355,12 +6355,12 @@ void Macbeth_801AF8F4(Player* player) { } break; case 1640: - if (gTeamShields[1] > 0) { + if (gTeamShields[TEAM_ID_FALCO] > 0) { Macbeth_801AF27C(&gActors[7], 2); } break; case 1660: - switch (gTeamShields[1]) { + switch (gTeamShields[TEAM_ID_FALCO]) { case 0: Radio_PlayMessage(gMsg_ID_20340, RCID_ROB64); break; @@ -6384,7 +6384,7 @@ void Macbeth_801AF8F4(Player* player) { break; case 1960: Macbeth_801AF27C(&gActors[3], 3); - gActors[3].info.hitbox = SEGMENTED_TO_VIRTUAL(D_edata_800CBF34); + gActors[3].info.hitbox = SEGMENTED_TO_VIRTUAL(gHitboxNone); break; case 2017: D_ctx_80177830 = 0; @@ -6433,9 +6433,9 @@ void Macbeth_801AF8F4(Player* player) { player->camEye.y += gCameraShakeY * 10.0f; } if (gCsFrameCount > 2500) { - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0; - D_ctx_80178358 = 255; - if (D_ctx_80178340 == 255) { + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; + gFillScreenAlphaTarget = 255; + if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_6; D_ctx_8017837C = 4; func_play_800A6148(); @@ -6701,8 +6701,8 @@ void Macbeth_801B38E0(void) { } for (i = 0; i < 40; i++) { - gObjects4C[i].obj.status = OBJ_FREE; - Object_4C_Initialize(&gObjects4C[i]); + gSprites[i].obj.status = OBJ_FREE; + Sprite_Initialize(&gSprites[i]); } for (i = 0; i < 60; i++) { @@ -6731,12 +6731,12 @@ void Macbeth_801B38E0(void) { } D_ctx_801782B8 = D_ctx_801782BC = D_ctx_801782C0 = D_ctx_801782D0 = gBossActive = D_ctx_8017828C = D_ctx_8017812C = - D_ctx_80177E70 = D_ctx_80177E78 = D_ctx_80177E80 = 0; + D_ctx_80177E70 = D_ctx_80177E78 = gRingPassCount = 0; D_ctx_80177F10.x = D_ctx_80177F10.y = D_ctx_80177F10.z = D_ctx_80177E88.x = D_ctx_80177E88.y = D_ctx_80177E88.z = 0.0f; for (i = 0; i < 10; i++) { - D_ctx_80177E98[i].x = D_ctx_80177E98[i].y = D_ctx_80177E98[i].z = 100.0f; + gTeamArrowsViewPos[i].x = gTeamArrowsViewPos[i].y = gTeamArrowsViewPos[i].z = 100.0f; } for (i = 0; i < 2; i++) { @@ -6761,10 +6761,10 @@ void Macbeth_801B3D04(Player* player) { D_i5_801BA894[2] = D_i5_801BA894[4]; D_i5_801BA894[1] = D_i5_801BA894[4]; D_i5_801BA894[0] = D_i5_801BA894[4]; - D_ctx_80178348 = 255; - D_ctx_80178350 = 255; - D_ctx_80178354 = 255; - D_ctx_80178340 = D_ctx_80178358 = D_ctx_80177A10[9] = 0; + gFillScreenRed = 255; + gFillScreenGreen = 255; + gFillScreenBlue = 255; + gFillScreenAlpha = gFillScreenAlphaTarget = D_ctx_80177A10[9] = 0; D_ctx_80177A48[0] = 0.0f; player->unk_1D0++; /* fallthrough */ @@ -6784,16 +6784,16 @@ void Macbeth_801B3D04(Player* player) { gCsCamAtX = player->pos.x; gCsCamAtY = player->pos.y + 30.0f; gCsCamAtZ = player->pos.z + player->unk_144; - D_ctx_80178348 = 255; - D_ctx_80178350 = 255; - D_ctx_80178354 = 255; + gFillScreenRed = 255; + gFillScreenGreen = 255; + gFillScreenBlue = 255; if (D_ctx_80177A10[9] >= 248) { D_ctx_80177A10[9] = 255; } else { D_ctx_80177A10[9] += 8; } - D_ctx_80178340 = D_ctx_80178358 = D_ctx_80177A10[9]; - if (gCsFrameCount >= 41) { + gFillScreenAlpha = gFillScreenAlphaTarget = D_ctx_80177A10[9]; + if (gCsFrameCount > 40) { D_ctx_80177A10[9] = 255; player->camEye.x = gCsCamEyeX = 0.0f; player->camEye.y = gCsCamEyeY = 21.182106f; @@ -6824,11 +6824,11 @@ void Macbeth_801B3D04(Player* player) { D_i5_801BE240 = 2.0f; D_i5_801BE244 = 2.0f; D_i5_801BE248 = 2.0f; - if (gCsFrameCount >= 86) { - D_ctx_80178358 = D_ctx_80178340 = D_ctx_80177A10[9]; + if (gCsFrameCount > 85) { + gFillScreenAlphaTarget = gFillScreenAlpha = D_ctx_80177A10[9]; D_ctx_80177A10[9] -= 10; if (D_ctx_80177A10[9] < 11) { - D_ctx_80178358 = D_ctx_80178340 = 0; + gFillScreenAlphaTarget = gFillScreenAlpha = 0; player->unk_1D0 = 10; } } @@ -6890,18 +6890,18 @@ void Macbeth_801B3D04(Player* player) { AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); break; case 100: - D_ctx_80177840 = 100; + gLevelClearScreenTimer = 100; break; case 160: Radio_PlayMessage(gMsg_ID_20010, RCID_FOX); break; case 230: - if (gTeamShields[2] > 0.0f) { + if (gTeamShields[TEAM_ID_SLIPPY] > 0.0f) { Macbeth_801B3554(&gActors[0], 0); } break; case 260: - switch (gTeamShields[2]) { + switch (gTeamShields[TEAM_ID_SLIPPY]) { case 0: Radio_PlayMessage(gMsg_ID_20345, RCID_ROB64); break; @@ -6914,12 +6914,12 @@ void Macbeth_801B3D04(Player* player) { } break; case 380: - if (gTeamShields[3] > 0.0f) { + if (gTeamShields[TEAM_ID_PEPPY] > 0.0f) { Macbeth_801B3554(&gActors[1], 1); } break; case 410: - switch (gTeamShields[3]) { + switch (gTeamShields[TEAM_ID_PEPPY]) { case 0: Radio_PlayMessage(gMsg_ID_20344, RCID_ROB64); break; @@ -6932,12 +6932,12 @@ void Macbeth_801B3D04(Player* player) { } break; case 530: - if (gTeamShields[1] > 0.0f) { + if (gTeamShields[TEAM_ID_FALCO] > 0.0f) { Macbeth_801B3554(&gActors[2], 2); } break; case 560: - switch (gTeamShields[1]) { + switch (gTeamShields[TEAM_ID_FALCO]) { case 0: Radio_PlayMessage(gMsg_ID_20340, RCID_ROB64); break; @@ -6994,7 +6994,7 @@ void Macbeth_801B3D04(Player* player) { Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_ctx_80177A48[0], D_i5_801BE248, 0.0f); player->camAt.y += zeroVar; - if ((gCsFrameCount >= 850) && !(gGameFrameCount & 0xF)) { + if ((gCsFrameCount >= 850) && ((gGameFrameCount % 16) == 0)) { Macbeth_801ACF6C(); } if (gCsFrameCount == 1220) { @@ -7002,9 +7002,9 @@ void Macbeth_801B3D04(Player* player) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 60); } if (gCsFrameCount > 1280) { - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0; - D_ctx_80178358 = 255; - if (D_ctx_80178340 == 255) { + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; + gFillScreenAlphaTarget = 255; + if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_6; D_ctx_8017837C = 4; func_play_800A6148(); diff --git a/src/overlays/ovl_i5/fox_ti.c b/src/overlays/ovl_i5/fox_ti.c index 350a3ce5..ac4f312c 100644 --- a/src/overlays/ovl_i5/fox_ti.c +++ b/src/overlays/ovl_i5/fox_ti.c @@ -213,9 +213,9 @@ void Titania_80189380(Actor* actor) { sp5C.y = 0.0f; sp5C.z = 70.0f; - func_effect_8007EE68(0x161, &sp80, &sp74, &sp68, &sp5C, 1.0f); + func_effect_8007EE68(OBJ_EFFECT_353, &sp80, &sp74, &sp68, &sp5C, 1.0f); sp80.y += 20.0f; - func_effect_8007EE68(0x161, &sp80, &sp74, &sp68, &sp5C, 1.0f); + func_effect_8007EE68(OBJ_EFFECT_353, &sp80, &sp74, &sp68, &sp5C, 1.0f); } static Vec3f D_i5_801B752C = { -50.0f, 0.0f, -20.0f }; @@ -284,7 +284,7 @@ void Titania_801895B8(Actor* actor) { Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); Matrix_Push(&gCalcMatrix); - if (!(actor->iwork[2] & 1) && ((actor->obj.pos.z + D_ctx_80177D20) > -3800.0f)) { + if (((actor->iwork[2] % 2) == 0) && ((actor->obj.pos.z + D_ctx_80177D20) > -3800.0f)) { Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1); Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, 1); Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_i5_801B752C, &sp48); @@ -314,7 +314,7 @@ void Titania_801895B8(Actor* actor) { } else { actor->itemDrop = DROP_NONE; } - func_enmy_80066254(actor); + Actor_Despawn(actor); actor->info.bonus = 0; func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z, 8.0f); func_effect_8007C120(actor->obj.pos.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z, actor->vel.x, actor->vel.y, @@ -366,7 +366,7 @@ void Titania_80189CC8(Actor* actor) { AUDIO_PLAY_SFX(0x2903A008, actor->sfxSource, 4); actor->timer_0CA[0] = actor->itemDrop = 0; actor->info.unk_1C = 0.0f; - func_enmy_80066254(actor); + Actor_Despawn(actor); actor->info.bonus = 0; actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_TI_6006924); func_effect_8007D0E0(actor->fwork[0], actor->fwork[1], actor->fwork[2], 2.0f); @@ -416,12 +416,13 @@ void Titania_80189CC8(Actor* actor) { sp40.z = 0.0f; if ((actor->timer_0BC < 15) && ((actor->timer_0BC % 7) == 0)) { - func_effect_8007EE68(0x161, (Vec3f*) &actor->fwork[0], &sp40, &actor->obj.rot, &D_i5_801B755C, 1.0f); + func_effect_8007EE68(OBJ_EFFECT_353, (Vec3f*) &actor->fwork[0], &sp40, &actor->obj.rot, &D_i5_801B755C, + 1.0f); if (actor->timer_0BC == 0) { actor->timer_0BC = 90; } } - } else if (!(gGameFrameCount & 7) && (Rand_ZeroOne() < 0.5f)) { + } else if (((gGameFrameCount % 8) == 0) && (Rand_ZeroOne() < 0.5f)) { AUDIO_PLAY_SFX(0x11000027, actor->sfxSource, 4); func_effect_8007C120(actor->fwork[0], actor->fwork[1], actor->fwork[2], 0.0f, 0.0f, 0.0f, 0.1f, 7); actor->timer_0C6 = 4; @@ -517,7 +518,7 @@ void Titania_8018A544(Actor* actor) { Titania_8018A474(actor); actor->itemDrop = DROP_NONE; } - func_enmy_80066254(actor); + Actor_Despawn(actor); actor->info.bonus = 0; } Object_Kill(&actor->obj, actor->sfxSource); @@ -634,7 +635,7 @@ void Titania_8018AB44(Actor* actor) { case 2: actor->itemDrop = DROP_NONE; - func_enmy_80066254(actor); + Actor_Despawn(actor); actor->info.bonus = 0; func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y + 10.0f, actor->obj.pos.z, 6.0f); func_effect_8007A6F0(&actor->obj.pos, 0x2903B009); @@ -783,7 +784,7 @@ void Titania_8018B268(Actor* actor) { actor->health -= actor->damage; if (actor->health <= 0) { actor->health = actor->itemDrop = 0; - func_enmy_80066254(actor); + Actor_Despawn(actor); actor->info.bonus = 0; } } @@ -997,7 +998,7 @@ void Titania_8018B9D0(Actor* actor) { actor->fwork[2] = sp48; if (actor->vel.y <= 0.0f) { actor->itemDrop = DROP_NONE; - func_enmy_80066254(actor); + Actor_Despawn(actor); func_effect_8007A6F0(&actor->obj.pos, 0x2903B009); func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f); Object_Kill(&actor->obj, actor->sfxSource); @@ -1316,7 +1317,7 @@ void Titania_8018C8A8(Actor* actor) { BonusText_Display(actor->obj.pos.x, actor->obj.pos.y, actor->fwork[27] + actor->obj.pos.z, 3); gHitCount += 3; actor->health = actor->itemDrop = 0; - func_enmy_80066254(actor); + Actor_Despawn(actor); actor->info.bonus = 0; actor->timer_0BC = 20; actor->unk_0B6 = 0; @@ -1557,7 +1558,7 @@ void Titania_8018C8A8(Actor* actor) { AUDIO_PLAY_SFX(0x19030003, actor->sfxSource, 4); } - if (!(actor->timer_0BC & 7)) { + if ((actor->timer_0BC % 8) == 0) { Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1); Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, 1); @@ -1666,9 +1667,9 @@ void Titania_8018C8A8(Actor* actor) { break; case 4: - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = D_ctx_80178340 = 255; - D_ctx_80178358 = 0; - D_ctx_8017835C = 64; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 255; + gFillScreenAlphaTarget = 0; + gFillScreenAlphaStep = 64; break; case 5: @@ -1691,7 +1692,7 @@ void Titania_8018C8A8(Actor* actor) { void Titania_8018E2D8(Actor* actor) { f32 sp34; - if (actor->iwork[6] & 1) { + if ((actor->iwork[6] % 2) != 0) { RCP_SetupDL(&gMasterDisp, 0x1F); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 127, 0, 0, 255); gDPSetEnvColor(gMasterDisp++, 255, 255, 255, 255); @@ -1748,7 +1749,7 @@ void Titania_8018E3CC(Actor* actor) { void Titania_8018E54C(Actor* actor) { actor->iwork[1]++; - if ((actor->iwork[0] == (uintptr_t) NULL) && !(actor->iwork[1] & 3)) { + if ((actor->iwork[0] == (uintptr_t) NULL) && ((actor->iwork[1] & 3) == 0)) { func_effect_8007C120(actor->fwork[0], actor->fwork[1], actor->fwork[2], 0.0f, 0.0f, 0.0f, 0.0625f, 10); } } @@ -1887,7 +1888,7 @@ void Titania_8018E5F8(Actor* actor) { gHitCount += 2; actor->timer_0CA[0] = actor->health = actor->itemDrop = 0; actor->info.unk_1C = 0.0f; - func_enmy_80066254(actor); + Actor_Despawn(actor); actor->info.bonus = 0; ((Actor*) actor->iwork[4])->iwork[0] = 0; actor->iwork[5] = 0; @@ -1979,7 +1980,7 @@ void Titania_8018E5F8(Actor* actor) { void Titania_8018EF14(Actor* actor) { gSPDisplayList(gMasterDisp++, D_TI1_7008930); - if (!(actor->timer_0C6 & 1)) { + if ((actor->timer_0C6 % 2) == 0) { RCP_SetupDL(&gMasterDisp, 0x22); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 220, 220, 220, 255); } else { @@ -1989,22 +1990,22 @@ void Titania_8018EF14(Actor* actor) { gSPDisplayList(gMasterDisp++, D_TI1_7009510); } -void Titania_8018EFF0(Object_4C* obj4C) { +void Titania_8018EFF0(Sprite* sprite) { f32 sp24; f32 sp20; - Ground_801B6E20(obj4C->obj.pos.x, obj4C->obj.pos.z + D_ctx_80177D20, &sp20, &sp24, &sp20); - obj4C->obj.pos.y = sp24; + Ground_801B6E20(sprite->obj.pos.x, sprite->obj.pos.z + D_ctx_80177D20, &sp20, &sp24, &sp20); + sprite->obj.pos.y = sp24; } -void Titania_8018F038(Object_4C* obj4C) { - obj4C->obj.rot.y = - Math_Atan2F(gPlayer[0].camEye.x - obj4C->obj.pos.x, gPlayer[0].camEye.z - (obj4C->obj.pos.z + D_ctx_80177D20)) * - M_RTOD; - if (obj4C->unk_46 != 0) { - func_effect_8007D074(obj4C->obj.pos.x, obj4C->obj.pos.y + 96.0f, obj4C->obj.pos.z, 4.0f); - obj4C->obj.status = OBJ_FREE; - func_effect_8007A6F0(&obj4C->obj.pos, 0x1903400F); +void Titania_Cactus_Update(Sprite* sprite) { + sprite->obj.rot.y = Math_Atan2F(gPlayer[0].camEye.x - sprite->obj.pos.x, + gPlayer[0].camEye.z - (sprite->obj.pos.z + D_ctx_80177D20)) * + M_RTOD; + if (sprite->unk_46 != 0) { + func_effect_8007D074(sprite->obj.pos.x, sprite->obj.pos.y + 96.0f, sprite->obj.pos.z, 4.0f); + sprite->obj.status = OBJ_FREE; + func_effect_8007A6F0(&sprite->obj.pos, 0x1903400F); } } @@ -2179,33 +2180,33 @@ void Titania_8018F8B8(Object_80* obj80) { } } -void Titania_Boss306_Init(Boss* boss) { +void Titania_Boss306_Init(Boss306* this) { s32 pad[2]; f32* sp1C; s32 i; s32* var_a1_2; UnkStruct_i5_801BBF00* var_v1; - if (boss->swork[0] < 4) { - boss->swork[0]++; - gOverlayStage = boss->swork[0]; - boss->timer_050 = 1; + if (this->swork[0] < 4) { + this->swork[0]++; + gOverlayStage = this->swork[0]; + this->timer_050 = 1; } - if (boss->timer_050 != 0) { - boss->obj.status = OBJ_INIT; + if (this->timer_050 != 0) { + this->obj.status = OBJ_INIT; return; } gBossActive = 1; - boss->fwork[2] = 1.0f; - boss->fwork[4] = 730.0f; + this->fwork[2] = 1.0f; + this->fwork[4] = 730.0f; for (i = 0; i < ARRAY_COUNT(D_i5_801BD668); i++) { D_i5_801BD668[i] = 0; D_i5_801BD6B0[i] = 0.0f; } - boss->fwork[49] = boss->obj.rot.y; - boss->obj.rot.y = 0.0f; + this->fwork[49] = this->obj.rot.y; + this->obj.rot.y = 0.0f; var_v1 = D_i5_801BBF00; for (i = 0; i < ARRAY_COUNTU(D_i5_801BBF00); i++, var_v1++) { var_v1->unk_26 = 0; @@ -2218,11 +2219,11 @@ void Titania_Boss306_Init(Boss* boss) { D_i5_801BCDC8[i].x = D_i5_801BCDC8[i].y = D_i5_801BCDC8[i].z = 0.0f; D_i5_801BC978[i].x = D_i5_801BC978[i].y = D_i5_801BC978[i].z = 0.0f; } - boss->swork[9] = 50; - boss->swork[10] = 50; - boss->swork[11] = 50; - boss->swork[12] = 50; - boss->swork[21] = 100; + this->swork[9] = 50; + this->swork[10] = 50; + this->swork[11] = 50; + this->swork[12] = 50; + this->swork[21] = 100; sp1C = D_i5_801BBEF4 = Memory_Allocate(76 * sizeof(f32)); var_a1_2 = D_i5_801BBEF0 = Memory_Allocate(50 * sizeof(s32)); for (i = 0; i < 50; i++, var_a1_2++) { @@ -2266,7 +2267,7 @@ bool Titania_8018FC70(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* case 3: case 7: RCP_SetupDL(&gMasterDisp, 0x1E); - if (D_i5_801BBEF0[30] & 1) { + if ((D_i5_801BBEF0[30] % 2) != 0) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); @@ -2280,7 +2281,7 @@ bool Titania_8018FC70(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* case 10: case 11: RCP_SetupDL(&gMasterDisp, 0x3D); - if (D_i5_801BBEF0[30] & 1) { + if ((D_i5_801BBEF0[30] % 2) != 0) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); @@ -2536,13 +2537,13 @@ bool Titania_801903A0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* } } if (D_i5_801BBEF0[25] == 1) { - sp20 = D_i5_801BBEF0[33] & 1; + sp20 = D_i5_801BBEF0[33] % 2U; if (D_i5_801BBEF0[33] != 0) { sp24 = (D_i5_801BBEF0[33] / 15.0f) * D_i5_801BBEF0[37]; rot->z += SIN_DEG((D_i5_801BBEF0[33] / (f32) D_i5_801BBEF0[35]) * 360.0f) * sp24; } } else { - sp20 = D_i5_801BBEF0[34] & 1; + sp20 = D_i5_801BBEF0[34] % 2U; if (D_i5_801BBEF0[34] != 0) { sp24 = (D_i5_801BBEF0[34] / 15.0f) * D_i5_801BBEF0[38]; rot->z += SIN_DEG((D_i5_801BBEF0[34] / (f32) D_i5_801BBEF0[36]) * 360.0f) * sp24; @@ -2558,7 +2559,7 @@ bool Titania_801903A0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* case 1: case 2: RCP_SetupDL(&gMasterDisp, 0x1E); - if (sp20 & 1) { + if ((sp20 % 2) != 0) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); @@ -2572,7 +2573,7 @@ bool Titania_801903A0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* case 5: case 6: RCP_SetupDL(&gMasterDisp, 0x3D); - if (sp20 & 1) { + if ((sp20 % 2) != 0) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); @@ -3314,7 +3315,7 @@ void Titania_80192118(Boss* boss) { } break; } - D_i5_801BBEF4[51] = SIN_DEG((((boss->swork[38] & 0x7F) * 360.0f) / 128)) * 40.0f; + D_i5_801BBEF4[51] = SIN_DEG((((s32) (boss->swork[38] % 128U) * 360.0f) / 128)) * 40.0f; switch (D_i5_801BBEF0[28]) { case 0: @@ -3442,7 +3443,7 @@ void Titania_80192118(Boss* boss) { D_i5_801BBEF4[57] = temp_ft2; D_i5_801BBEF4[58] = temp_ft4; } - if (!(boss->swork[38] & 3)) { + if ((boss->swork[38] & 3) == 0) { func_effect_8007A900(temp_ft2, boss->obj.pos.y, temp_ft4, 10.0f, 192, 16, 0); } } @@ -3473,7 +3474,7 @@ void Titania_80192118(Boss* boss) { D_i5_801BBEF4[59] = temp_ft2; D_i5_801BBEF4[60] = temp_ft4; } - if (!(boss->swork[38] & 3)) { + if ((boss->swork[38] & 3) == 0) { func_effect_8007A900(temp_ft2, boss->obj.pos.y, temp_ft4, 10.0f, 192, 16, 0); } } @@ -3504,7 +3505,7 @@ void Titania_80192118(Boss* boss) { D_i5_801BBEF4[61] = temp_ft2; D_i5_801BBEF4[62] = temp_ft4; } - if (!(boss->swork[38] & 3)) { + if ((boss->swork[38] & 3) == 0) { func_effect_8007A900(temp_ft2, boss->obj.pos.y, temp_ft4, 10.0f, 192, 16, 0); } } @@ -4429,10 +4430,10 @@ void Titania_80193DF0(Boss* boss) { boss->swork[32] = 0; } if (D_i5_801BBEF0[26] != 0) { - D_ctx_80178348 = 255; - D_ctx_80178350 = 255; - D_ctx_80178354 = 255; - D_ctx_80178340 = (D_i5_801BBEF0[26] * 255.0f) / 3.0f; + gFillScreenRed = 255; + gFillScreenGreen = 255; + gFillScreenBlue = 255; + gFillScreenAlpha = (D_i5_801BBEF0[26] * 255.0f) / 3.0f; } if ((boss->unk_04C >= 54) && (boss->unk_04C < 120)) { boss->fwork[46] += 0.04f; @@ -4601,7 +4602,7 @@ void Titania_80193DF0(Boss* boss) { } } - if ((pad != 4) && gTeamShields[3] > 0) { + if ((pad != 4) && gTeamShields[TEAM_ID_PEPPY] > 0) { Radio_PlayMessage(gMsg_ID_4095, RCID_PEPPY); } boss->swork[37] &= ~2; @@ -4609,7 +4610,7 @@ void Titania_80193DF0(Boss* boss) { break; case 9: if (boss->swork[37] & 1) { - if ((boss->swork[29] != 0) && gTeamShields[1] > 0) { + if ((boss->swork[29] != 0) && gTeamShields[TEAM_ID_FALCO] > 0) { Radio_PlayMessage(gMsg_ID_4099, RCID_FALCO); } boss->swork[37] &= ~1; @@ -4742,7 +4743,7 @@ void Titania_80197A94(Boss* boss) { boss->swork[39]--; } if (boss->swork[28] == 2) { - if (gTeamShields[3] > 0) { + if (gTeamShields[TEAM_ID_PEPPY] > 0) { Radio_PlayMessage(gMsg_ID_4091, RCID_PEPPY); } D_i5_801BBEF0[42] = 1; @@ -4799,14 +4800,14 @@ void Titania_80197A94(Boss* boss) { Radio_PlayMessage(gMsg_ID_20266, RCID_FOX); break; case 80: - gTeamShields[2] = 1; + gTeamShields[TEAM_ID_SLIPPY] = 1; Radio_PlayMessage(gMsg_ID_4112, RCID_SLIPPY); - gTeamShields[2] = -2; + gTeamShields[TEAM_ID_SLIPPY] = -2; break; case 240: - gTeamShields[2] = 1; + gTeamShields[TEAM_ID_SLIPPY] = 1; Radio_PlayMessage(gMsg_ID_4093, RCID_SLIPPY); - gTeamShields[2] = -2; + gTeamShields[TEAM_ID_SLIPPY] = -2; break; } @@ -4819,9 +4820,9 @@ void Titania_80197A94(Boss* boss) { break; case 2: if (boss->swork[31] == 11) { - gTeamShields[2] = 1; + gTeamShields[TEAM_ID_SLIPPY] = 1; Radio_PlayMessage(gMsg_ID_4111, RCID_SLIPPY); - gTeamShields[2] = -2; + gTeamShields[TEAM_ID_SLIPPY] = -2; } break; case 3: @@ -4829,7 +4830,7 @@ void Titania_80197A94(Boss* boss) { case 1: break; case 50: - if (gTeamShields[1] > 0) { + if (gTeamShields[TEAM_ID_FALCO] > 0) { Radio_PlayMessage(gMsg_ID_4094, RCID_FALCO); } default: @@ -4841,13 +4842,13 @@ void Titania_80197A94(Boss* boss) { if (D_i5_801BBEF0[42] == 0) { switch (boss->swork[4]) { case 1: - if (gTeamShields[3] > 0) { + if (gTeamShields[TEAM_ID_PEPPY] > 0) { Radio_PlayMessage(gMsg_ID_4095, RCID_PEPPY); } D_i5_801BBEF0[42] = 1; break; case 3: - if ((D_i5_801BBEF0[8] == 0) && (gTeamShields[1] > 0)) { + if ((D_i5_801BBEF0[8] == 0) && (gTeamShields[TEAM_ID_FALCO] > 0)) { Radio_PlayMessage(gMsg_ID_4097, RCID_FALCO); } D_i5_801BBEF0[42] = 1; @@ -4857,12 +4858,12 @@ void Titania_80197A94(Boss* boss) { } if (boss->swork[4] >= 4 && !(D_i5_801BBEF0[46] & 1)) { - if ((gTeamShields[1] > 0) && (D_i5_801BBEF0[8] == 0) && (gRadioState == 0) && + if ((gTeamShields[TEAM_ID_FALCO] > 0) && (D_i5_801BBEF0[8] == 0) && (gRadioState == 0) && (boss->swork[10] >= 2)) { - gTeamShields[2] = 1; + gTeamShields[TEAM_ID_SLIPPY] = 1; Radio_PlayMessage(gMsg_ID_4098, RCID_SLIPPY); - gTeamShields[2] = -2; - D_i5_801BBEF0[46] = (s32) (D_i5_801BBEF0[46] | 1); + gTeamShields[TEAM_ID_SLIPPY] = -2; + D_i5_801BBEF0[46] |= 1; } D_i5_801BBEF0[42] = 1; } @@ -4872,12 +4873,12 @@ void Titania_80197A94(Boss* boss) { D_i5_801BBEF0[43]++; switch (D_i5_801BBEF0[43]) { case 1: - gTeamShields[2] = 1; + gTeamShields[TEAM_ID_SLIPPY] = 1; Radio_PlayMessage(gMsg_ID_20190, RCID_SLIPPY); - gTeamShields[2] = -2; + gTeamShields[TEAM_ID_SLIPPY] = -2; break; case 80: - if (gTeamShields[1] > 0) { + if (gTeamShields[TEAM_ID_FALCO] > 0) { Radio_PlayMessage(gMsg_ID_4096, RCID_FALCO); } boss->swork[37] &= ~4; @@ -4892,7 +4893,7 @@ void Titania_80197A94(Boss* boss) { if ((boss->state != 5) && ((boss->state != 4) || (boss->swork[31] <= 100)) && (D_i5_801BBEF0[8] == 0)) { Math_SmoothStepToF(&D_i5_801BBEF4[74], D_i5_801BBEF4[75], 0.5f, 0.04f, 0.01f); if (D_i5_801BBEF4[74] == D_i5_801BBEF4[74]) { - if (boss->swork[38] & 1) { + if ((boss->swork[38] % 2) != 0) { D_i5_801BBEF4[75] = 0.7f; D_i5_801BBEF4[74] = D_i5_801BBEF4[75]; } else { @@ -4901,7 +4902,7 @@ void Titania_80197A94(Boss* boss) { } } - if ((D_i5_801BBEF0[49] >= 25) && !((D_i5_801BBEF0[49] - 25) & 1)) { + if ((D_i5_801BBEF0[49] >= 25) && (((D_i5_801BBEF0[49] - 25) % 2) == 0)) { D_i5_801BBEF4[74] = RAND_FLOAT(0.4f) + 0.9f; D_i5_801BBEF4[75] = 0.6f; } @@ -5106,7 +5107,7 @@ void Titania_801982A8(Boss* boss) { temp_fs2 = boss->fwork[42] / 700.0f; Matrix_RotateY(gGfxMatrix, (boss->fwork[21] - 90.0f) * M_DTOR, 1); Matrix_RotateX(gGfxMatrix, (boss->fwork[22] - 180.0f) * M_DTOR, 1); - Matrix_RotateZ(gGfxMatrix, (boss->fwork[20] - ((boss->swork[38] & 7) * 43.0f)) * M_DTOR, 1); + Matrix_RotateZ(gGfxMatrix, (boss->fwork[20] - ((s32) (boss->swork[38] % 8U) * 43.0f)) * M_DTOR, 1); Matrix_Push(&gGfxMatrix); Matrix_Scale(gGfxMatrix, half * sp120, half * sp120, temp_fs2, 1); Matrix_SetGfxMtx(&gMasterDisp); diff --git a/src/overlays/ovl_i5/fox_ti_cs.c b/src/overlays/ovl_i5/fox_ti_cs.c index 86803564..203a9b20 100644 --- a/src/overlays/ovl_i5/fox_ti_cs.c +++ b/src/overlays/ovl_i5/fox_ti_cs.c @@ -54,11 +54,11 @@ void Titania_8018769C(Player* player) { Titania_80187530(&gActors[3]); - if (gTeamShields[1] > 0) { + if (gTeamShields[TEAM_ID_FALCO] > 0) { Titania_801875D0(&gActors[10], 0); } - if (gTeamShields[3] > 0) { + if (gTeamShields[TEAM_ID_PEPPY] > 0) { Titania_801875D0(&gActors[11], 1); } @@ -219,7 +219,7 @@ void Titania_8018769C(Player* player) { Math_SmoothStepToF(&player->unk_0F0, SIN_DEG(gGameFrameCount * 5.0f) * 10.0f, 0.1f, 100.0f, 0.0f); if (gCsFrameCount == 580) { - D_ctx_80177838 = 50; + gLevelStatusScreenTimer = 50; player->state_1C8 = PLAYERSTATE_1C8_3; player->unk_1D0 = player->timer_1F8 = player->timer_1FC = player->unk_240 = 0; player->unk_0D4 = 3.0f; @@ -306,10 +306,10 @@ void Titania_801882CC(Player* player) { Titania_80188108(&gActors[0], 0); - if (gTeamShields[1] > 0) { + if (gTeamShields[TEAM_ID_FALCO] > 0) { Titania_80188108(&gActors[1], 1); } - if (gTeamShields[3] > 0) { + if (gTeamShields[TEAM_ID_PEPPY] > 0) { Titania_80188108(&gActors[2], 2); } @@ -356,7 +356,7 @@ void Titania_801882CC(Player* player) { func_play_800A8BA4(player); func_play_800ADF58(player); - if (!(gGameFrameCount & 3)) { + if (((gGameFrameCount % 4) == 0)) { f32 x; f32 y; f32 z; @@ -426,7 +426,7 @@ void Titania_801882CC(Player* player) { break; case 80: - D_ctx_80177840 = 100; + gLevelClearScreenTimer = 100; break; case 160: @@ -438,7 +438,7 @@ void Titania_801882CC(Player* player) { break; case 380: - switch (gTeamShields[1]) { + switch (gTeamShields[TEAM_ID_FALCO]) { case -1: Radio_PlayMessage(gMsg_ID_20331, RCID_ROB64); break; @@ -455,7 +455,7 @@ void Titania_801882CC(Player* player) { break; case 525: - switch (gTeamShields[3]) { + switch (gTeamShields[TEAM_ID_PEPPY]) { case -1: Radio_PlayMessage(gMsg_ID_20332, RCID_ROB64); break; @@ -518,10 +518,10 @@ void Titania_801882CC(Player* player) { } if (gCsFrameCount > 1440) { - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0; - D_ctx_80178358 = 255; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; + gFillScreenAlphaTarget = 255; - if (D_ctx_80178340 == 255) { + if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_6; D_ctx_8017837C = 4; func_play_800A6148(); diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index 3291131b..5829a8d5 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -94,22 +94,22 @@ void Andross_801878A8() { Object_58* obj58; s32 i; - D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(&D_ANDROSS_C0356CC); + gLevelObjects = SEGMENTED_TO_VIRTUAL(&D_ANDROSS_C0356CC); for (obj58 = gObjects58, i = 0; i < 1000; i++) { - if (D_ctx_80178310[i].id < 0) { + if (gLevelObjects[i].id < 0) { break; } - if (D_ctx_80178310[i].id <= OBJ_80_160) { + if (gLevelObjects[i].id <= OBJ_80_160) { Object_58_Initialize(obj58); obj58->obj.status = OBJ_ACTIVE; - obj58->obj.id = D_ctx_80178310[i].id; - obj58->obj.pos.x = D_ctx_80178310[i].xPos; - obj58->obj.pos.z = -D_ctx_80178310[i].zPos1; - obj58->obj.pos.z += D_ctx_80178310[i].zPos2; - obj58->obj.pos.y = D_ctx_80178310[i].yPos; - obj58->obj.rot.y = D_ctx_80178310[i].rot.y; + obj58->obj.id = gLevelObjects[i].id; + obj58->obj.pos.x = gLevelObjects[i].xPos; + obj58->obj.pos.z = -gLevelObjects[i].zPos1; + obj58->obj.pos.z += gLevelObjects[i].zPos2; + obj58->obj.pos.y = gLevelObjects[i].yPos; + obj58->obj.rot.y = gLevelObjects[i].rot.y; Object_SetInfo(&obj58->info, obj58->obj.id); if (obj58->obj.id == OBJ_80_131) { obj58->info.hitbox = SEGMENTED_TO_VIRTUAL(&D_ANDROSS_C038CCC); @@ -119,36 +119,36 @@ void Andross_801878A8() { } for (actor = &gActors[1], i = 0; i < 1000; i++) { - if (D_ctx_80178310[i].id < 0) { + if (gLevelObjects[i].id < 0) { break; } - if ((D_ctx_80178310[i].id <= OBJ_ACTOR_SUPPLIES) && (D_ctx_80178310[i].id >= OBJ_ACTOR_176)) { + if ((gLevelObjects[i].id <= OBJ_ACTOR_SUPPLIES) && (gLevelObjects[i].id >= OBJ_ACTOR_176)) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; - actor->obj.id = D_ctx_80178310[i].id; - actor->obj.pos.x = D_ctx_80178310[i].xPos; - actor->obj.pos.z = -D_ctx_80178310[i].zPos1; - actor->obj.pos.z += D_ctx_80178310[i].zPos2; - actor->obj.pos.y = D_ctx_80178310[i].yPos; - actor->obj.rot.y = D_ctx_80178310[i].rot.y; + actor->obj.id = gLevelObjects[i].id; + actor->obj.pos.x = gLevelObjects[i].xPos; + actor->obj.pos.z = -gLevelObjects[i].zPos1; + actor->obj.pos.z += gLevelObjects[i].zPos2; + actor->obj.pos.y = gLevelObjects[i].yPos; + actor->obj.rot.y = gLevelObjects[i].rot.y; Object_SetInfo(&actor->info, actor->obj.id); actor++; } } for (item = gItems, i = 0; i < 1000; i++) { - if (D_ctx_80178310[i].id < 0) { + if (gLevelObjects[i].id < 0) { break; } - if ((D_ctx_80178310[i].id <= OBJ_ITEM_TRAINING_RING) && (D_ctx_80178310[i].id >= OBJ_ITEM_LASERS)) { + if ((gLevelObjects[i].id <= OBJ_ITEM_TRAINING_RING) && (gLevelObjects[i].id >= OBJ_ITEM_LASERS)) { Item_Initialize(item); item->obj.status = OBJ_ACTIVE; - item->obj.id = D_ctx_80178310[i].id; - item->obj.pos.x = D_ctx_80178310[i].xPos; - item->obj.pos.z = -D_ctx_80178310[i].zPos1; - item->obj.pos.z += D_ctx_80178310[i].zPos2; - item->obj.pos.y = D_ctx_80178310[i].yPos; + item->obj.id = gLevelObjects[i].id; + item->obj.pos.x = gLevelObjects[i].xPos; + item->obj.pos.z = -gLevelObjects[i].zPos1; + item->obj.pos.z += gLevelObjects[i].zPos2; + item->obj.pos.y = gLevelObjects[i].yPos; Object_SetInfo(&item->info, item->obj.id); item++; } @@ -163,33 +163,33 @@ void Andross_80187C5C(void) { switch (RAND_INT(2.9f)) { case 0: - D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(&D_ANDROSS_C036310); + gLevelObjects = SEGMENTED_TO_VIRTUAL(&D_ANDROSS_C036310); break; case 1: - D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(&D_ANDROSS_C036B6C); + gLevelObjects = SEGMENTED_TO_VIRTUAL(&D_ANDROSS_C036B6C); break; default: case 2: - D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(&D_ANDROSS_C03733C); + gLevelObjects = SEGMENTED_TO_VIRTUAL(&D_ANDROSS_C03733C); break; } for (obj58 = gObjects58, i = 0; i < 1000; i++) { - if (D_ctx_80178310[i].id < 0) { + if (gLevelObjects[i].id < 0) { break; } - if (D_ctx_80178310[i].id <= OBJ_80_160) { + if (gLevelObjects[i].id <= OBJ_80_160) { Object_58_Initialize(obj58); obj58->obj.status = OBJ_ACTIVE; - obj58->obj.id = D_ctx_80178310[i].id; - obj58->obj.pos.x = D_ctx_80178310[i].xPos; - obj58->obj.pos.z = -D_ctx_80178310[i].zPos1; - obj58->obj.pos.z += D_ctx_80178310[i].zPos2; - obj58->obj.pos.y = D_ctx_80178310[i].yPos; - obj58->obj.rot.y = D_ctx_80178310[i].rot.y; + obj58->obj.id = gLevelObjects[i].id; + obj58->obj.pos.x = gLevelObjects[i].xPos; + obj58->obj.pos.z = -gLevelObjects[i].zPos1; + obj58->obj.pos.z += gLevelObjects[i].zPos2; + obj58->obj.pos.y = gLevelObjects[i].yPos; + obj58->obj.rot.y = gLevelObjects[i].rot.y; if (obj58->obj.id == OBJ_80_147) { - obj58->unk_40 = D_ctx_80178310[i].rot.z; + obj58->unk_40 = gLevelObjects[i].rot.z; } Object_SetInfo(&obj58->info, obj58->obj.id); if (obj58->obj.id == OBJ_80_131) { @@ -200,36 +200,36 @@ void Andross_80187C5C(void) { } for (actor = &gActors[1], i = 0; i < 1000; i++) { - if (D_ctx_80178310[i].id < 0) { + if (gLevelObjects[i].id < 0) { break; } - if ((D_ctx_80178310[i].id <= OBJ_ACTOR_SUPPLIES) && (D_ctx_80178310[i].id >= OBJ_ACTOR_176)) { + if ((gLevelObjects[i].id <= OBJ_ACTOR_SUPPLIES) && (gLevelObjects[i].id >= OBJ_ACTOR_176)) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; - actor->obj.id = D_ctx_80178310[i].id; - actor->obj.pos.x = D_ctx_80178310[i].xPos; - actor->obj.pos.z = -D_ctx_80178310[i].zPos1; - actor->obj.pos.z += D_ctx_80178310[i].zPos2; - actor->obj.pos.y = D_ctx_80178310[i].yPos; - actor->obj.rot.y = D_ctx_80178310[i].rot.y; + actor->obj.id = gLevelObjects[i].id; + actor->obj.pos.x = gLevelObjects[i].xPos; + actor->obj.pos.z = -gLevelObjects[i].zPos1; + actor->obj.pos.z += gLevelObjects[i].zPos2; + actor->obj.pos.y = gLevelObjects[i].yPos; + actor->obj.rot.y = gLevelObjects[i].rot.y; Object_SetInfo(&actor->info, actor->obj.id); actor++; } } for (item = gItems, i = 0; i < 1000; i++) { - if (D_ctx_80178310[i].id < 0) { + if (gLevelObjects[i].id < 0) { break; } - if ((D_ctx_80178310[i].id <= OBJ_ITEM_TRAINING_RING) && (D_ctx_80178310[i].id >= OBJ_ITEM_LASERS)) { + if ((gLevelObjects[i].id <= OBJ_ITEM_TRAINING_RING) && (gLevelObjects[i].id >= OBJ_ITEM_LASERS)) { Item_Initialize(item); item->obj.status = OBJ_ACTIVE; - item->obj.id = D_ctx_80178310[i].id; - item->obj.pos.x = D_ctx_80178310[i].xPos; - item->obj.pos.z = -D_ctx_80178310[i].zPos1; - item->obj.pos.z += D_ctx_80178310[i].zPos2; - item->obj.pos.y = D_ctx_80178310[i].yPos; + item->obj.id = gLevelObjects[i].id; + item->obj.pos.x = gLevelObjects[i].xPos; + item->obj.pos.z = -gLevelObjects[i].zPos1; + item->obj.pos.z += gLevelObjects[i].zPos2; + item->obj.pos.y = gLevelObjects[i].yPos; Object_SetInfo(&item->info, item->obj.id); item++; } @@ -263,7 +263,7 @@ void Andross_801880E4(Actor* actor) { if ((fabsf(xDisplacement) < 300.0f) && (fabsf(yDisplacement) < 300.0f) && (fabsf(zDisplacement) < 300.0f)) { actor->unk_04E++; } - if (!(gGameFrameCount & 0x1F)) { + if (((gGameFrameCount % 32) == 0)) { actor->iwork[11] = 1; actor->fwork[1] = 47.0f; if ((fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 1000.0f) && @@ -381,7 +381,7 @@ void Andross_801888F4(Actor* actor) { s32 i; actor->obj.rot.z -= 8.0f; - if ((actor->timer_0BC & 1) == 1) { + if ((actor->timer_0BC % 2U) == 1) { func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 5.0f); } if ((actor->timer_0BC == 0) || (actor->unk_0D0 != 0)) { @@ -495,7 +495,7 @@ void Andross_80188CB8(Boss* boss) { if (boss->swork[7] != 0) { boss->swork[7]--; - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { Andross_8018887C(RAND_FLOAT_CENTERED(100.0f) + boss->obj.pos.x, RAND_FLOAT_CENTERED(300.0f) + (boss->obj.pos.y - 250.0f), RAND_FLOAT_CENTERED(100.0f) + boss->obj.pos.z, RAND_FLOAT_CENTERED(50.0f), @@ -542,7 +542,7 @@ void Andross_80189098(Boss* boss) { actor->obj.pos.y = 0.0f; actor->obj.pos.z = boss->obj.pos.z; Object_SetInfo(&actor->info, actor->obj.id); - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(&D_edata_800CBEA8); + actor->info.hitbox = SEGMENTED_TO_VIRTUAL(&gDefaultCubeHitbox150); actor++; @@ -556,7 +556,7 @@ void Andross_80189098(Boss* boss) { actor->obj.pos.y = 0.0f; actor->obj.pos.z = boss->obj.pos.z; Object_SetInfo(&actor->info, actor->obj.id); - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(&D_edata_800CBEA8); + actor->info.hitbox = SEGMENTED_TO_VIRTUAL(&gDefaultCubeHitbox150); gActors[0].state = 2; } @@ -603,7 +603,7 @@ void Andross_8018933C(Actor* actor) { void Andross_801893B8(Actor* actor) { - if (D_360_8015F924 == 0) { + if (gAllRangeCheckpoint == 0) { actor->unk_04E++; switch (actor->unk_04E) { case 200: @@ -640,7 +640,7 @@ void Andross_80189470(Actor* actor) { Audio_KillSfxById(0x11403076); Audio_SetBaseSfxReverb(0); gCurrentLevel = LEVEL_VENOM_2; - D_ctx_8017827C = 1; + gLevelStage = 1; D_play_800D2F68 = 1; player->state_1C8 = PLAYERSTATE_1C8_7; player->unk_1D0 = 3; @@ -664,8 +664,8 @@ void Andross_80189470(Actor* actor) { Andross_80193710(); D_ctx_8017782C = 1; func_play_800A594C(); - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0; - D_ctx_80178340 = D_ctx_80178358 = 255; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; + gFillScreenAlpha = gFillScreenAlphaTarget = 255; player->timer_1F8 = 2; gCsFrameCount = 0; D_ctx_80177A48[1] = 0.0f; @@ -833,15 +833,15 @@ void Andross_80189B70(Boss* boss) { } break; case 11: - boss->info.hitbox = SEGMENTED_TO_VIRTUAL(&D_edata_800CBF34); + boss->info.hitbox = SEGMENTED_TO_VIRTUAL(&gHitboxNone); if (boss->timer_050 < 120) { - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255; - D_ctx_80178358 = 80; - D_ctx_8017835C = 1; - gPlayer[0].timer_224 = gGameFrameCount & 7; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; + gFillScreenAlphaTarget = 80; + gFillScreenAlphaStep = 1; + gPlayer[0].timer_224 = gGameFrameCount % 8U; gPlayer[0].timer_220 = 3; Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 40.0f, 1.0f, 3.0f, 0.0f); - if (!(gGameFrameCount & 0x1F) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3)) { + if (((gGameFrameCount % 32) == 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3)) { Player_ApplyDamage(&gPlayer[0], 3, 10); } } @@ -854,15 +854,15 @@ void Andross_80189B70(Boss* boss) { boss->fwork[13] = 1.0f; boss->fwork[19] = 23.0f; boss->fwork[1] = 0.0f; - gPlayer[0].unk_238 = 1; + gPlayer[0].cockpitView = 1; Math_SmoothStepToF(&D_display_800CA230, 0.15f, 0.2f, 0.004f, 0.0f); if (boss->timer_050 == 120) { AUDIO_PLAY_SFX(0x1940306E, boss->sfxSource, 4); } if (boss->timer_050 == 0) { gPlayer[0].unk_0D0 = D_play_80161A54; - gPlayer[0].unk_238 = 0; - D_ctx_80178358 = 0; + gPlayer[0].cockpitView = 0; + gFillScreenAlphaTarget = 0; boss->timer_05A = 50; if (boss->swork[4] != 0) { boss->state = 1; @@ -882,7 +882,7 @@ void Andross_80189B70(Boss* boss) { boss->fwork[5] = gPlayer[0].unk_138; break; case 12: - boss->info.hitbox = SEGMENTED_TO_VIRTUAL(&D_edata_800CBF34); + boss->info.hitbox = SEGMENTED_TO_VIRTUAL(&gHitboxNone); boss->fwork[1] = 0; boss->fwork[24] = 0.2f; boss->fwork[22] = 0.0f; @@ -903,7 +903,7 @@ void Andross_80189B70(Boss* boss) { } break; case 13: - boss->info.hitbox = SEGMENTED_TO_VIRTUAL(&D_edata_800CBF34); + boss->info.hitbox = SEGMENTED_TO_VIRTUAL(&gHitboxNone); boss->fwork[24] = 0.0f; boss->fwork[22] = 255.0f; if (250.0f < boss->fwork[22]) { @@ -924,7 +924,7 @@ void Andross_80189B70(Boss* boss) { Matrix_MultVec3f(gCalcMatrix, &vec, &sp64); func_effect_8007797C(boss->obj.pos.x + sp64.x, boss->obj.pos.y + sp64.y, boss->obj.pos.z + sp64.z, 0.0f, 0.0f, 0.0f, RAND_FLOAT(5.0f) + 7.0f); - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { func_effect_8007C484(RAND_FLOAT_CENTERED(600.0f) + boss->obj.pos.x, RAND_FLOAT(100.0f) + (boss->obj.pos.y + 100.0f), boss->obj.pos.z, 0.0f, 0.0f, 0.0f, RAND_FLOAT(0.3f) + 0.5f, 0); @@ -968,11 +968,11 @@ void Andross_80189B70(Boss* boss) { gCsFrameCount++; gCameraShake = 10; if (gCsFrameCount < 200) { - D_ctx_80178380[0] += 4; - if (D_ctx_80178380[0] >= 255) { - D_ctx_80178380[0] = 255; + gPlayerFillScreenAlphas[0] += 4; + if (gPlayerFillScreenAlphas[0] >= 255) { + gPlayerFillScreenAlphas[0] = 255; } - D_ctx_80178390[0] = D_ctx_801783A0[0] = D_ctx_801783B0[0] = 255; + gPlayerFillScreenReds[0] = gPlayerFillScreenGreens[0] = gPlayerFillScreenBlues[0] = 255; Math_SmoothStepToF(&D_display_800CA230, 0.15f, 0.2f, 0.004f, 0.0f); Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 70.0f, 1.0f, 4.0f, 0.0f); } @@ -987,7 +987,7 @@ void Andross_80189B70(Boss* boss) { break; case 500: Radio_PlayMessage(gMsg_ID_19350, RCID_FOX); - D_360_8015F924 = 1; + gAllRangeCheckpoint = 1; break; case 600: D_ctx_80177AB0 = 5; @@ -1042,7 +1042,7 @@ void Andross_80189B70(Boss* boss) { } boss->obj.pos.y = 10000.0f; - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) && !(gGameFrameCount & 3)) { + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) && ((gGameFrameCount % 4) == 0)) { Matrix_RotateY(gCalcMatrix, (gPlayer[0].unk_114 + gPlayer[0].unk_0E8) * M_DTOR, 0U); vec.x = RAND_FLOAT_CENTERED(800.0f); vec.y = 600.0f; @@ -1176,7 +1176,7 @@ bool Andross_8018B47C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* Matrix_RotateY(gGfxMatrix, -boss->fwork[14] * 1.5f * M_DTOR, 1); } Matrix_SetGfxMtx(&gMasterDisp); - if ((boss->swork[3] & 1) && (boss->fwork[21] >= 254.0f)) { + if (((boss->swork[3] % 2) != 0) && (boss->fwork[21] >= 254.0f)) { RCP_SetupDL(&gMasterDisp, 0x1B); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } @@ -1555,26 +1555,26 @@ void Andross_8018D0D8(Boss* boss) { } } -void Andross_Boss320_Init(Boss* boss) { +void Andross_Boss320_Init(Boss320* this) { Audio_SetBaseSfxReverb(0x18); D_i6_801A7F5C = D_i6_801A7F64 = D_i6_801A7F6C = D_i6_801A7F74 = D_i6_801A7F7C = D_i6_801A8430 = 0.0f; D_bg_800C9C30 = 0.0f; - boss->health = 100; - boss->fwork[18] = 1.0f; - boss->fwork[17] = 1.0f; + this->health = 100; + this->fwork[18] = 1.0f; + this->fwork[17] = 1.0f; gLight1R = 255; gLight1G = 80; gLight1B = 20; gAmbientR = 1; gAmbientG = 0; gAmbientB = 20; - boss->timer_058 = 10; - boss->swork[4] = boss->swork[5] = 200; - boss->swork[6] = 100; + this->timer_058 = 10; + this->swork[4] = this->swork[5] = 200; + this->swork[6] = 100; gBossActive = 1; D_ctx_80177AB0 = 1; - boss->info.hitbox[16] = 200.0f; - boss->info.hitbox[22] = 200.0f; + this->info.hitbox[16] = 200.0f; + this->info.hitbox[22] = 200.0f; Audio_PlaySequence(SEQ_PLAYER_BGM, SEQ_ID_AND_BOSS | SEQ_FLAG, 0, 0); } @@ -1610,7 +1610,7 @@ void Andross_8018D2B0(Boss* boss) { AUDIO_PLAY_SFX(0x19403070, boss->sfxSource, 4); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); - if (D_ctx_8017827C == 0) { + if (gLevelStage == 0) { boss->state = 30; } else { boss->state = 32; @@ -2140,7 +2140,7 @@ void Andross_8018DBF0(Boss* boss) { if (boss->unk_04C > 45) { Math_SmoothStepToF(&boss->fwork[20], 1.0f, 1.0f, 0.2f, 0.01f); Math_SmoothStepToF(&boss->fwork[21], 1.0f, 0.5f, 0.15f, 0.01f); - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { gAmbientR = 200; gAmbientG = 90; gAmbientB = 255; @@ -2267,7 +2267,7 @@ void Andross_8018DBF0(Boss* boss) { if (boss->unk_04C == 15) { AUDIO_PLAY_SFX(0x29022088, boss->sfxSource, 4); } - if ((boss->unk_04C > 35) && (boss->unk_04C < 150) && !(boss->unk_04C & 0x1F)) { + if ((boss->unk_04C > 35) && (boss->unk_04C < 150) && ((boss->unk_04C % 32) == 0)) { AUDIO_PLAY_SFX(0x29022089, boss->sfxSource, 4); if (player->state_1C8 == PLAYERSTATE_1C8_11) { D_Timer_80177BD0[0] = 10; @@ -2366,7 +2366,7 @@ void Andross_8018DBF0(Boss* boss) { Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 50.0f, 1.0f, 1.8f, 0.0f); boss->timer_056 = 50; - if ((boss->timer_050 > 70) && (boss->timer_050 < 1000) && !(gGameFrameCount & 3)) { + if ((boss->timer_050 > 70) && (boss->timer_050 < 1000) && ((gGameFrameCount % 4) == 0)) { Andross_8018C734(gPlayer[0].camEye.x + RAND_FLOAT_CENTERED(3000.0f), gPlayer[0].camEye.y + RAND_FLOAT_CENTERED(3000.0f), gPlayer[0].camEye.z - D_ctx_80177D20, RAND_INT(7.9)); @@ -2533,7 +2533,7 @@ void Andross_8018DBF0(Boss* boss) { } limbCount = Animation_GetFrameData(&D_ANDROSS_C017050, boss->unk_04C, spD0); Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, boss->fwork[9], 100.0f, 0.0f); - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { func_effect_8007C484(boss->obj.pos.x + RAND_FLOAT_CENTERED(1000.0f), boss->obj.pos.y + RAND_FLOAT_CENTERED(1000.0f), boss->obj.pos.z, 0.0f, 0.0f, boss->vel.z, RAND_FLOAT(0.2f) + 0.2f, 0); @@ -2638,7 +2638,7 @@ void Andross_8018DBF0(Boss* boss) { Math_SmoothStepToF(&boss->fwork[4], 30.0f, 1.0f, 3.0f, 0); boss->fwork[0] = 0.0f; boss->fwork[3] = 0.0f; - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { func_effect_8007C484(boss->obj.pos.x + RAND_FLOAT_CENTERED(1000.0f), boss->obj.pos.y + RAND_FLOAT_CENTERED(1000.0f), boss->obj.pos.z, 0.0f, 0.0f, boss->vel.z, RAND_FLOAT(0.2f) + 0.2f, 0); @@ -2664,7 +2664,7 @@ void Andross_8018DBF0(Boss* boss) { } limbCount = Animation_GetFrameData(&D_ANDROSS_C017050, boss->unk_04C, spD0); Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, boss->fwork[9], 100.0f, 0.0f); - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { func_effect_8007C484(boss->obj.pos.x + RAND_FLOAT_CENTERED(1000.0f), boss->obj.pos.y + RAND_FLOAT_CENTERED(1000.0f), boss->obj.pos.z, 0.0f, 0.0f, boss->vel.z, RAND_FLOAT(0.2f) + 0.2f, 0); @@ -2825,18 +2825,18 @@ bool Andross_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* if (((limbIndex >= 23) && (limbIndex <= 32)) || (limbIndex == 50)) { if (boss->swork[5] < 0) { *dList = NULL; - } else if (boss->swork[3] & 1) { + } else if ((boss->swork[3] % 2) != 0) { RCP_SetupDL(&gMasterDisp, 0x1B); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } } else if (boss->swork[4] < 0) { *dList = NULL; - } else if (boss->swork[2] & 1) { + } else if ((boss->swork[2] % 2) != 0) { RCP_SetupDL(&gMasterDisp, 0x1B); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } } - } else if (!(boss->timer_05C & 1)) { + } else if ((boss->timer_05C % 2) == 0) { RCP_SetupDL(&gMasterDisp, 0x1D); } else { RCP_SetupDL(&gMasterDisp, 0x1B); @@ -2855,7 +2855,7 @@ bool Andross_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* case 3: rot->z -= boss->vwork[4].x; rot->y -= boss->vwork[4].y; - if (boss->swork[0] & 1) { + if ((boss->swork[0] % 2) != 0) { RCP_SetupDL(&gMasterDisp, 0x1B); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } @@ -2868,7 +2868,7 @@ bool Andross_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* case 4: rot->z -= boss->vwork[5].x; rot->y -= boss->vwork[5].y; - if (boss->swork[1] & 1) { + if ((boss->swork[1] % 2) != 0) { RCP_SetupDL(&gMasterDisp, 0x1B); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } @@ -2955,7 +2955,7 @@ bool Andross_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, *dList); RCP_SetupDL(&gMasterDisp, 0x29); - switch (gGameFrameCount & 3) { + switch (gGameFrameCount % 4U) { case 0: gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); break; @@ -2994,7 +2994,7 @@ bool Andross_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, *dList); RCP_SetupDL(&gMasterDisp, 0x29); - switch (gGameFrameCount & 3) { + switch (gGameFrameCount % 4U) { case 0: gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); break; @@ -3144,7 +3144,7 @@ void Andross_801928C8(Boss* boss) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 192); gDPSetEnvColor(gMasterDisp++, 255, 0, 128, 192); Matrix_Scale(gGfxMatrix, boss->fwork[21] * 7.0f, boss->fwork[21] * 7.0f, boss->fwork[21] * 7.0f, 1); - if (gGameFrameCount & 1) { + if ((gGameFrameCount % 2) != 0) { Matrix_Scale(gGfxMatrix, 1.1f, 1.1f, 1.1f, 1); } Matrix_SetGfxMtx(&gMasterDisp); @@ -3154,7 +3154,7 @@ void Andross_801928C8(Boss* boss) { Matrix_Scale(gGfxMatrix, boss->fwork[20] * 10.0f, boss->fwork[20] * 10.0f, boss->fwork[20] * 10.0f, 1); Matrix_RotateZ(gGfxMatrix, boss->fwork[19] * M_DTOR, 1); RCP_SetupDL(&gMasterDisp, 0x40); - if (gGameFrameCount & 1) { + if ((gGameFrameCount % 2) != 0) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 128); } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 30); @@ -3261,7 +3261,7 @@ void Andross_80193244(Actor* actor) { scale = 2.5f; alpha = 16; - if (gGameFrameCount & 1) { + if ((gGameFrameCount % 2) != 0) { alpha = 64; scale *= 1.2f; } @@ -3355,39 +3355,39 @@ void Andross_80193710(void) { Boss* boss; s32 i; - D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(D_enmy_800CFDA0[gCurrentLevel]); + gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]); for (obj58 = gObjects58, i = 0; i < 1000; i++) { - if (D_ctx_80178310[i].id < 0) { + if (gLevelObjects[i].id < 0) { break; } - if (D_ctx_80178310[i].id <= OBJ_80_160) { + if (gLevelObjects[i].id <= OBJ_80_160) { Object_58_Initialize(obj58); obj58->obj.status = OBJ_ACTIVE; - obj58->obj.id = D_ctx_80178310[i].id; - obj58->sfxSource[0] = obj58->obj.pos.x = D_ctx_80178310[i].xPos; - obj58->sfxSource[1] = obj58->obj.pos.y = D_ctx_80178310[i].yPos; - obj58->sfxSource[2] = obj58->obj.pos.z = -D_ctx_80178310[i].zPos1; - obj58->unk_54 = obj58->obj.rot.y = D_ctx_80178310[i].rot.y; + obj58->obj.id = gLevelObjects[i].id; + obj58->sfxSource[0] = obj58->obj.pos.x = gLevelObjects[i].xPos; + obj58->sfxSource[1] = obj58->obj.pos.y = gLevelObjects[i].yPos; + obj58->sfxSource[2] = obj58->obj.pos.z = -gLevelObjects[i].zPos1; + obj58->unk_54 = obj58->obj.rot.y = gLevelObjects[i].rot.y; Object_SetInfo(&obj58->info, obj58->obj.id); obj58++; } } for (actor = &gActors[30], i = 0; i < 1000; i++) { - if (D_ctx_80178310[i].id < 0) { + if (gLevelObjects[i].id < 0) { break; } - if ((D_ctx_80178310[i].id >= OBJ_ACTOR_176) && (D_ctx_80178310[i].id <= OBJ_ACTOR_SUPPLIES)) { + if ((gLevelObjects[i].id >= OBJ_ACTOR_176) && (gLevelObjects[i].id <= OBJ_ACTOR_SUPPLIES)) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = D_ctx_80178310[i].id; - actor->fwork[10] = actor->obj.pos.x = D_ctx_80178310[i].xPos; - actor->fwork[11] = actor->obj.pos.y = D_ctx_80178310[i].yPos; - actor->fwork[12] = actor->obj.pos.z = -D_ctx_80178310[i].zPos1; - actor->fwork[13] = actor->obj.rot.y = D_ctx_80178310[i].rot.y; + actor->obj.id = gLevelObjects[i].id; + actor->fwork[10] = actor->obj.pos.x = gLevelObjects[i].xPos; + actor->fwork[11] = actor->obj.pos.y = gLevelObjects[i].yPos; + actor->fwork[12] = actor->obj.pos.z = -gLevelObjects[i].zPos1; + actor->fwork[13] = actor->obj.rot.y = gLevelObjects[i].rot.y; Object_SetInfo(&actor->info, actor->obj.id); actor++; } @@ -3631,7 +3631,7 @@ void Andross_80193C4C(Player* player) { D_play_800D2F68 = 0; gBlurAlpha = 255; gCurrentLevel = LEVEL_VENOM_2; - D_ctx_8017827C = 1; + gLevelStage = 1; gLevelMode = LEVELMODE_ALL_RANGE; player->unk_1D0 = 3; player->unk_144 = D_ctx_80177D20 = 0.0f; @@ -3653,8 +3653,8 @@ void Andross_80193C4C(Player* player) { Andross_80193710(); D_ctx_8017782C = 1; func_play_800A594C(); - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0; - D_ctx_80178340 = D_ctx_80178358 = 255; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; + gFillScreenAlpha = gFillScreenAlphaTarget = 255; player->timer_1F8 = 2; gCsFrameCount = 0; D_ctx_80177A48[1] = 0.0f; @@ -3663,11 +3663,11 @@ void Andross_80193C4C(Player* player) { break; case 3: if (player->timer_1F8 == 0) { - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0; - D_ctx_80178340 = D_ctx_80178358 = 0; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; + gFillScreenAlpha = gFillScreenAlphaTarget = 0; } else { - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0; - D_ctx_80178340 = D_ctx_80178358 = 255; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; + gFillScreenAlpha = gFillScreenAlphaTarget = 255; } if ((gCsFrameCount == 20) && (D_play_800D2F68 != 0)) { @@ -3715,7 +3715,7 @@ void Andross_80193C4C(Player* player) { D_i6_801A7F50 = gAmbientG; D_i6_801A7F54 = gAmbientB; D_ctx_801784D4 = -50.0f; - D_ctx_80177930 = 1; + gNextPlanetPath = 1; for (i = 0; i < 200; i++) { gObjects58[i].obj.status = OBJ_FREE; } @@ -3747,7 +3747,7 @@ void Andross_80193C4C(Player* player) { gCsCamAtX = gActors[10].obj.pos.x; gCsCamAtY = gActors[10].obj.pos.y + 50.0f; gCsCamAtZ = gActors[10].obj.pos.z; - if (!(gGameFrameCount & 3) && (gCsFrameCount < 215)) { + if (((gGameFrameCount % 4) == 0) && (gCsFrameCount < 215)) { func_effect_8007797C(boss->obj.pos.x + RAND_FLOAT_CENTERED(350.0f), boss->obj.pos.y + 500.0f, boss->obj.pos.z + RAND_FLOAT_CENTERED(350.0f), RAND_FLOAT_CENTERED(10.0f), 60.0f, RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT(5.5f) + 15.5f); @@ -3761,13 +3761,13 @@ void Andross_80193C4C(Player* player) { Math_SmoothStepToF(&D_ctx_80177A48[2], 10000.0f, 0.05f, 20.0f, 0.0f); if (gCsFrameCount == 220) { Andross_80193AE4(0); - if (gTeamShields[1] > 0) { + if (gTeamShields[TEAM_ID_FALCO] > 0) { Andross_80193AE4(1); } - if (gTeamShields[2] > 0) { + if (gTeamShields[TEAM_ID_SLIPPY] > 0) { Andross_80193AE4(2); } - if (gTeamShields[3] > 0) { + if (gTeamShields[TEAM_ID_PEPPY] > 0) { Andross_80193AE4(3); } } @@ -3797,18 +3797,18 @@ void Andross_80193C4C(Player* player) { gActors[10].obj.pos.y = 14500.0f; gActors[10].unk_0F4.z = 70.0f; gActors[10].unk_0F4.x = gActors[10].unk_0F4.y = 0.0f; - D_ctx_80178340 = D_ctx_80178358 = 255; - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0; + gFillScreenAlpha = gFillScreenAlphaTarget = 255; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; player->timer_1F8 = 3; D_ctx_80178410 = 500; } if (gCsFrameCount == 250) { - D_ctx_80177840 = 100; + gLevelClearScreenTimer = 100; } break; case 5: if (player->timer_1F8 == 1) { - D_ctx_80178340 = D_ctx_80178358 = 0; + gFillScreenAlpha = gFillScreenAlphaTarget = 0; } if (D_play_800D2F68 != 0) { if (gCsFrameCount >= 1000) { @@ -3818,7 +3818,7 @@ void Andross_80193C4C(Player* player) { } else { gCsCamEyeZ = gActors[10].obj.pos.z - 20.0f; } - if ((gCsFrameCount >= 920) && (gTeamShields[3] > 0)) { + if ((gCsFrameCount >= 920) && (gTeamShields[TEAM_ID_PEPPY] > 0)) { if (gCsFrameCount == 920) { player->timer_1F8 = 25; } @@ -3894,7 +3894,7 @@ void Andross_80193C4C(Player* player) { Radio_PlayMessage(gMsg_ID_19430, RCID_PEPPY); break; case 900: - if (gTeamShields[3] > 0) { + if (gTeamShields[TEAM_ID_PEPPY] > 0) { Radio_PlayMessage(gMsg_ID_19440, RCID_FOX); } break; @@ -3909,7 +3909,7 @@ void Andross_80193C4C(Player* player) { D_ctx_80178288[109] += 1.0f; D_ctx_80178290[109] += 0.5f; temp_v0_2 = RAND_INT(100.0f); - D_ctx_80178298[109] = FILL_COLOR(D_bg_800C9C3C[temp_v0_2 & 0xF]); + D_ctx_80178298[109] = FILL_COLOR(D_bg_800C9C3C[temp_v0_2 % 16U]); } } else { switch (gCsFrameCount) { @@ -3935,11 +3935,11 @@ void Andross_80193C4C(Player* player) { Audio_FadeOutAll(40); } if (gCsFrameCount > 1400) { - D_ctx_8017835C = 4; - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0; - D_ctx_80178358 = 255; - if (D_ctx_80178340 == 255) { - gNextGameState = GSTATE_CREDITS; + gFillScreenAlphaStep = 4; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; + gFillScreenAlphaTarget = 255; + if (gFillScreenAlpha == 255) { + gNextGameState = GSTATE_ENDING; D_ending_80196D00 = 0; D_play_800D3180[LEVEL_VENOM_ANDROSS] = Play_CheckMedalStatus(200) + 1; Audio_SetAudioSpec(0, 0x1B); @@ -3947,9 +3947,9 @@ void Andross_80193C4C(Player* player) { } break; case 100: - D_ctx_80178380[0] -= 4; - if (D_ctx_80178380[0] > 255) { - D_ctx_80178380[0] = 0; + gPlayerFillScreenAlphas[0] -= 4; + if (gPlayerFillScreenAlphas[0] > 255) { + gPlayerFillScreenAlphas[0] = 0; } Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, 0); Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), 1); diff --git a/src/overlays/ovl_i6/fox_sy.c b/src/overlays/ovl_i6/fox_sy.c index 3f188069..c8e10be3 100644 --- a/src/overlays/ovl_i6/fox_sy.c +++ b/src/overlays/ovl_i6/fox_sy.c @@ -51,46 +51,46 @@ void SectorY_80197C64(Effect* effect) { void SectorY_80197CB8(Object_80* obj80) { } -void SectorY_Boss314_Init(Boss* boss) { - boss->fwork[9] = 0.0f; - boss->swork[33] = 5500; - boss->timer_050 = 10; - boss->timer_058 = 0; +void SectorY_Boss314_Init(Boss314* this) { + this->fwork[9] = 0.0f; + this->swork[33] = 5500; + this->timer_050 = 10; + this->timer_058 = 0; D_ctx_80177A10[8] = 0; - if (boss->index == 0) { - boss->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_60342A0); - boss->health = 150; + if (this->index == 0) { + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_60342A0); + this->health = 150; - boss->swork[28] = 5; - boss->fwork[43] = 3.5f; - boss->fwork[45] = 40.0f; + this->swork[28] = 5; + this->fwork[43] = 3.5f; + this->fwork[45] = 40.0f; if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_9) { - boss->obj.pos.z = -28900.0f; + this->obj.pos.z = -28900.0f; gObjects58[0].obj.pos.z = -30000.0f; } - boss->unk_078.y = 0.0f; - SectorY_8019AEC0(boss); + this->unk_078.y = 0.0f; + SectorY_8019AEC0(this); } else { - boss->fwork[34] = 2.8f; - boss->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_6034304); - boss->health = 100; - boss->swork[28] = 0; - boss->swork[25] = 1; - boss->fwork[45] = 35.0f; + this->fwork[34] = 2.8f; + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_6034304); + this->health = 100; + this->swork[28] = 0; + this->swork[25] = 1; + this->fwork[45] = 35.0f; - if (boss->index == 1) { - boss->unk_078.y = 15.0f; + if (this->index == 1) { + this->unk_078.y = 15.0f; } else { - boss->unk_078.y = 345.0f; + this->unk_078.y = 345.0f; } - boss->vel.x = SIN_DEG(boss->unk_078.y) * boss->fwork[45] * 0.2f; - boss->vel.z = COS_DEG(boss->unk_078.y) * boss->fwork[45] * 0.2f; - SectorY_80198244(boss); - boss->timer_056 = 250; + this->vel.x = SIN_DEG(this->unk_078.y) * this->fwork[45] * 0.2f; + this->vel.z = COS_DEG(this->unk_078.y) * this->fwork[45] * 0.2f; + SectorY_80198244(this); + this->timer_056 = 250; } if (gLevelMode == LEVELMODE_ON_RAILS) { @@ -100,7 +100,7 @@ void SectorY_Boss314_Init(Boss* boss) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); } - Object_Kill(&boss->obj, boss->sfxSource); + Object_Kill(&this->obj, this->sfxSource); } } @@ -325,7 +325,7 @@ void SectorY_80198ABC(Boss* boss) { switch (D_ctx_80177A10[8]) { case 0: - if (gTeamShields[1] > 0) { + if (gTeamShields[TEAM_ID_FALCO] > 0) { func_360_8002E4F8(gMsg_ID_14200, RCID_FALCO); } break; @@ -337,14 +337,15 @@ void SectorY_80198ABC(Boss* boss) { break; case 2: - if ((gTeamShields[2] > 0) && (gBosses[1].obj.status != OBJ_FREE) && (gBosses[2].obj.status != OBJ_FREE)) { + if ((gTeamShields[TEAM_ID_SLIPPY] > 0) && (gBosses[1].obj.status != OBJ_FREE) && + (gBosses[2].obj.status != OBJ_FREE)) { func_360_8002E4F8(gMsg_ID_14220, RCID_SLIPPY); } break; } - D_ctx_80177A10[8] += (gGameFrameCount & 1) + 1; - D_ctx_80177A10[8] &= 3; + D_ctx_80177A10[8] += (gGameFrameCount % 2U) + 1; + D_ctx_80177A10[8] %= 4U; } void SectorY_80198CE4(Boss* boss) { @@ -414,7 +415,7 @@ void SectorY_80198F5C(Boss* boss) { boss->unk_04C = 0; boss->swork[36] = 0; boss->swork[21] = 9; - boss->info.hitbox = SEGMENTED_TO_VIRTUAL(D_edata_800CBF34); + boss->info.hitbox = SEGMENTED_TO_VIRTUAL(gHitboxNone); if (boss->index == 0) { boss->timer_058 = 20000; @@ -559,7 +560,7 @@ void SectorY_80199438(Boss* boss) { Math_SmoothStepToF(&gPlayer[0].camAt.y, gCsCamAtY, D_ctx_80177A48[0], 20000.0f, 0); Math_SmoothStepToF(&gPlayer[0].camAt.z, gCsCamAtZ, D_ctx_80177A48[0], 20000.0f, 0); } - if (!(gGameFrameCount & 3) && (boss->swork[36] == 0)) { + if (((gGameFrameCount % 4) == 0) && (boss->swork[36] == 0)) { func_effect_8007C120(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, boss->vel.x, boss->vel.y, boss->vel.z, 0.1f, 5); } @@ -601,7 +602,7 @@ void SectorY_80199438(Boss* boss) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_3; func_play_800B63BC(&gPlayer[0], 1); gPlayer[0].unk_014 = 0.0f; - if (gTeamShields[3] > 0) { + if (gTeamShields[TEAM_ID_PEPPY] > 0) { func_360_8002E4F8(gMsg_ID_14230, RCID_PEPPY); } } @@ -1012,7 +1013,7 @@ void SectorY_8019AEEC(Boss* boss) { if (boss->timer_056 > 55) { Math_SmoothStepToF(&boss->vel.z, 80.0f, 0.1f, 2.0f, 0.5f); Math_SmoothStepToF(&gActors[59].vel.z, 80.0f, 0.1f, 2.0f, 0.5f); - if (!(gGameFrameCount & 1)) { + if (((gGameFrameCount % 2) == 0)) { func_effect_8007C120(boss->obj.pos.x, boss->obj.pos.y - 150.0f, boss->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.1f, 5); } @@ -1233,24 +1234,24 @@ void SectorY_8019C194(Boss* boss, f32 zSpeed, f32 xSpeed) { switch (D_ctx_80177A10[8]) { case 0: - if (gTeamShields[1] > 0) { + if (gTeamShields[TEAM_ID_FALCO] > 0) { func_360_8002E4F8(gMsg_ID_14200, RCID_FALCO); } break; case 1: - if (gTeamShields[3] > 0) { + if (gTeamShields[TEAM_ID_PEPPY] > 0) { func_360_8002E4F8(gMsg_ID_14210, RCID_PEPPY); } break; case 2: - if ((gTeamShields[2] > 0) && (gBosses[1].obj.status != OBJ_FREE) && + if ((gTeamShields[TEAM_ID_SLIPPY] > 0) && (gBosses[1].obj.status != OBJ_FREE) && (gBosses[2].obj.status != OBJ_FREE)) { func_360_8002E4F8(gMsg_ID_14220, RCID_SLIPPY); } break; } - D_ctx_80177A10[8] += (gGameFrameCount & 1) + 1; - D_ctx_80177A10[8] &= 3; + D_ctx_80177A10[8] += (gGameFrameCount % 2U) + 1; + D_ctx_80177A10[8] %= 4U; } if ((xSpeed > 800.0f) || (zSpeed > 300.0f)) { @@ -1590,7 +1591,7 @@ void SectorY_8019C888(Boss* boss) { } } } - if ((gBossFrameCount == 250) && (gTeamShields[2] != 0) && (boss->swork[34] == 0)) { + if ((gBossFrameCount == 250) && (gTeamShields[TEAM_ID_SLIPPY] != 0) && (boss->swork[34] == 0)) { Radio_PlayMessage(gMsg_ID_2225, RCID_SLIPPY); } if ((gBossFrameCount == 620) && (boss->swork[34] == 0)) { @@ -1607,7 +1608,7 @@ void SectorY_8019C888(Boss* boss) { boss->swork[30]++; if (boss->swork[30] > 300 && ((ABS(D_edisplay_801615D0.z) + ABS(D_edisplay_801615D0.x)) < 3500.0f) && (gRadioState == 0)) { - if (gTeamShields[3] > 0) { + if (gTeamShields[TEAM_ID_PEPPY] > 0) { Radio_PlayMessage(gMsg_ID_2282, RCID_PEPPY); } boss->swork[30] = 150; @@ -1615,14 +1616,15 @@ void SectorY_8019C888(Boss* boss) { if (boss->swork[30] > 100) { - if ((((ABS(D_edisplay_801615D0.z) + ABS(D_edisplay_801615D0.x)) < 500.0f) && gTeamShields[1] > 0)) { + if ((((ABS(D_edisplay_801615D0.z) + ABS(D_edisplay_801615D0.x)) < 500.0f) && + gTeamShields[TEAM_ID_FALCO] > 0)) { Radio_PlayMessage(gMsg_ID_2233, RCID_FALCO); } } if (D_edisplay_801615D0.x > 0.0f) { - gPlayer[0].flags_228 = 0x10; + gPlayer[0].flags_228 = PFLAG_228_4; } else { - gPlayer[0].flags_228 = 0x20; + gPlayer[0].flags_228 = PFLAG_228_5; } } else { @@ -1635,7 +1637,7 @@ bool SectorY_8019DC4C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* Boss* boss = (Boss*) data; Vec3f sp10 = { 0.0f, 0.0f, 0.0f }; - if (!(boss->timer_05C & 1)) { + if ((boss->timer_05C % 2) == 0) { if (boss->index == 1) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 100, 100, 255, 255); } else { @@ -1678,7 +1680,7 @@ bool SectorY_8019DE10(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* if (boss->index != 0) { return SectorY_8019DC4C(limbIndex, dList, pos, rot, boss); } - if (boss->timer_05C & 1) { + if ((boss->timer_05C % 2) != 0) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 32, 32, 255, 255); } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); @@ -1697,7 +1699,7 @@ bool SectorY_8019DE10(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* case 4: if (boss->swork[25] == 0) { *dList = D_SY_6013600; - if (boss->swork[24] & 1) { + if ((boss->swork[24] % 2) != 0) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 255, 0, 255); } } else { @@ -1791,7 +1793,7 @@ void SectorY_8019E2C4(Boss* boss) { f32 sp8C; f32 sp88; - if ((boss->index != 0) || (boss->swork[24] & 1) || (boss->timer_05C & 1)) { + if ((boss->index != 0) || ((boss->swork[24] % 2) != 0) || ((boss->timer_05C % 2) != 0)) { RCP_SetupDL_30(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } else { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); @@ -1912,8 +1914,9 @@ void SectorY_8019EB80(void) { Rand_SetSeed(1, 29100, 9786); for (i = 0; i <= (var_s1); i++, actor++) { - if (((i == 0) && (gTeamShields[3] <= 0.0f)) || ((i == 1) && (gTeamShields[2] <= 0.0f)) || - ((i == 2) && (gTeamShields[1] <= 0.0f))) { + if (((i == 0) && (gTeamShields[TEAM_ID_PEPPY] <= 0.0f)) || + ((i == 1) && (gTeamShields[TEAM_ID_SLIPPY] <= 0.0f)) || + ((i == 2) && (gTeamShields[TEAM_ID_FALCO] <= 0.0f))) { continue; } Actor_Initialize(actor); @@ -2018,8 +2021,8 @@ void SectorY_8019EE60(Player* player) { } if (gCsFrameCount >= 180) { - D_ctx_80178358 = 255; - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255; + gFillScreenAlphaTarget = 255; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; } if (gCsFrameCount == 230) { D_ctx_80177A48[0] = 1.0f; @@ -2027,7 +2030,7 @@ void SectorY_8019EE60(Player* player) { func_play_800A6148(); func_8001CA24(0); Audio_KillSfxBySource(player->sfxSource); - D_ctx_80178340 = 250; + gFillScreenAlpha = 250; player->timer_1F8 = 50; player->unk_0D0 = 0.0f; player->unk_0E4 = 0.0f; @@ -2065,9 +2068,9 @@ void SectorY_8019EE60(Player* player) { if ((gCsFrameCount < 720) && (D_ctx_801782F8 != 0)) { player->wings.unk_30 = (f32) (gGameFrameCount & 2) * 5.0f; } - D_ctx_80178358 = 0; - D_ctx_8017835C = 4; - if (D_ctx_80178340 == 0) { + gFillScreenAlphaTarget = 0; + gFillScreenAlphaStep = 4; + if (gFillScreenAlpha == 0) { player->unk_204 = 1; } @@ -2114,10 +2117,10 @@ void SectorY_8019EE60(Player* player) { Math_SmoothStepToF(&D_ctx_80177A48[2], 0.01f, 1.0f, 0.0016f, 0); } if (gCsFrameCount > 1530) { - D_ctx_80178358 = 255; - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0; - D_ctx_8017835C = 8; - if (D_ctx_80178340 == 255) { + gFillScreenAlphaTarget = 255; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; + gFillScreenAlphaStep = 8; + if (gFillScreenAlpha == 255) { Audio_FadeOutAll(10); player->state_1C8 = PLAYERSTATE_1C8_6; player->timer_1F8 = 0; @@ -2130,9 +2133,9 @@ void SectorY_8019EE60(Player* player) { switch (gCsFrameCount) { case 520: if (gHitCount >= 100) { - D_ctx_80177930 = 1; + gNextPlanetPath = 1; } - D_ctx_80177840 = 100; + gLevelClearScreenTimer = 100; break; case 580: if (gHitCount >= 100) { @@ -2142,7 +2145,7 @@ void SectorY_8019EE60(Player* player) { } break; case 725: - switch (gTeamShields[2]) { + switch (gTeamShields[TEAM_ID_SLIPPY]) { case 0: Radio_PlayMessage(gMsg_ID_20345, RCID_ROB64); break; @@ -2160,7 +2163,7 @@ void SectorY_8019EE60(Player* player) { break; case 872: - switch (gTeamShields[3]) { + switch (gTeamShields[TEAM_ID_PEPPY]) { case 0: Radio_PlayMessage(gMsg_ID_20344, RCID_ROB64); break; @@ -2177,7 +2180,7 @@ void SectorY_8019EE60(Player* player) { } break; case 1018: - switch (gTeamShields[1]) { + switch (gTeamShields[TEAM_ID_FALCO]) { case 0: Radio_PlayMessage(gMsg_ID_20340, RCID_ROB64); break; @@ -2207,17 +2210,17 @@ void SectorY_8019EE60(Player* player) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); break; case 1380: - if (gTeamShields[3] > 0) { + if (gTeamShields[TEAM_ID_PEPPY] > 0) { gActors[0].state = 2; } break; case 1400: - if (gTeamShields[2] > 0) { + if (gTeamShields[TEAM_ID_SLIPPY] > 0) { gActors[1].state = 2; } break; case 1420: - if (gTeamShields[1] > 0) { + if (gTeamShields[TEAM_ID_FALCO] > 0) { gActors[2].state = 2; } break; @@ -2260,7 +2263,7 @@ void SectorY_8019FF00(Actor* actor) { Math_SmoothStepToF(&actor->obj.pos.y, actor->vwork[0].y, 0.02f, 2.0f, 0.0001f); Math_SmoothStepToF(&actor->obj.pos.z, actor->vwork[0].z, 0.02f, 2.0f, 0.0001f); Math_SmoothStepToF(&actor->unk_0F4.z, 0.0f, 0.02f, 0.2f, 0.0001f); - if ((actor->unk_0B6 != 0) && ((((actor->index & 7) * 10) + 1030) < gCsFrameCount)) { + if ((actor->unk_0B6 != 0) && ((((s32) (actor->index % 8U) * 10) + 1030) < gCsFrameCount)) { actor->state = 4; } break; @@ -2514,10 +2517,10 @@ void SectorY_801A0AC0(Player* player) { /* fallthrough */ case 1: if (gCsFrameCount < 3) { - D_ctx_80178340 = 255; + gFillScreenAlpha = 255; } - if ((gGameFrameCount & 0xC) && !(gGameFrameCount & 3)) { + if ((gGameFrameCount & 0xC) && ((gGameFrameCount % 4) == 0)) { spB0 = (((gGameFrameCount & 0xC) >> 2) + 4); for (i = 10; i < ARRAY_COUNT(gActors); i++) { if (gActors[i].obj.status == OBJ_FREE) { @@ -2526,8 +2529,8 @@ void SectorY_801A0AC0(Player* player) { } } } - if (!(gGameFrameCount & 3)) { - spB0 = ((gGameFrameCount & 0xF) >> 2) + 4; + if (((gGameFrameCount % 4) == 0)) { + spB0 = ((s32) (gGameFrameCount % 16U) >> 2) + 4; if (spB0 == 4) { if (gCsFrameCount < 140) { spB0 = 11; @@ -2576,7 +2579,7 @@ void SectorY_801A0AC0(Player* player) { Math_SmoothStepToAngle(&gActors[6].obj.rot.z, 180.0f, 1.0f, 0.5f, 1.0f); Math_SmoothStepToAngle(&gActors[7].obj.rot.z, 181.0f, 1.0f, 0.5f, 1.0f); } else { - if (!(gGameFrameCount & 0xF) && (gCsFrameCount >= 105) && (gCsFrameCount <= 140)) { + if (((gGameFrameCount % 16) == 0) && (gCsFrameCount >= 105) && (gCsFrameCount <= 140)) { for (i = 10; i < ARRAY_COUNT(gActors); i++) { if (gActors[i].obj.status == OBJ_FREE) { @@ -2608,7 +2611,7 @@ void SectorY_801A0AC0(Player* player) { } } - if (!(gGameFrameCount & 1) && (gCsFrameCount >= 110)) { + if (((gGameFrameCount % 2) == 0) && (gCsFrameCount >= 110)) { Matrix_RotateY(gCalcMatrix, gActors[8].obj.rot.y * M_DTOR, 0); Matrix_RotateX(gCalcMatrix, gActors[8].obj.rot.x * M_DTOR, 1); Matrix_RotateZ(gCalcMatrix, gActors[8].obj.rot.z * M_DTOR, 1); @@ -2626,12 +2629,13 @@ void SectorY_801A0AC0(Player* player) { if (gGameFrameCount & 0x14) { for (i = 12; i < ARRAY_COUNT(gActors); i++) { if (gActors[i].obj.status == OBJ_FREE) { - SectorY_801A0A08(&gActors[i], gActors[8].obj.pos.x + 1000.0f, - (gActors[8].obj.pos.y + 2000.0f + (((gGameFrameCount & 3) - 2) * 2000.0f)) + - RAND_FLOAT_CENTERED(4000.0f), - (gActors[8].obj.pos.z + 4000.0f + (((gGameFrameCount & 3) - 2) * 3000.0f)) + - RAND_FLOAT_CENTERED(7000.0f), - RAND_FLOAT(10.0f)); + SectorY_801A0A08( + &gActors[i], gActors[8].obj.pos.x + 1000.0f, + (gActors[8].obj.pos.y + 2000.0f + ((s32) ((gGameFrameCount % 4U) - 2) * 2000.0f)) + + RAND_FLOAT_CENTERED(4000.0f), + (gActors[8].obj.pos.z + 4000.0f + ((s32) ((gGameFrameCount % 4U) - 2) * 3000.0f)) + + RAND_FLOAT_CENTERED(7000.0f), + RAND_FLOAT(10.0f)); break; } } @@ -2640,10 +2644,10 @@ void SectorY_801A0AC0(Player* player) { gActors[9].scale += 32.0f; if (gCsFrameCount >= 245) { gActors[9].fwork[4] += 8; - D_ctx_80178348 = 255; - D_ctx_80178350 = 255; - D_ctx_80178354 = 255; - D_ctx_80178358 = 255; + gFillScreenRed = 255; + gFillScreenGreen = 255; + gFillScreenBlue = 255; + gFillScreenAlphaTarget = 255; } else { gActors[9].fwork[4] = 0.5f; } @@ -2723,11 +2727,11 @@ void SectorY_801A0AC0(Player* player) { case 260: gActors[9].fwork[4] = gActors[9].scale = 1000; gActors[9].obj.pos.x = -8300.0f; - D_ctx_80178348 = 255; - D_ctx_80178350 = 255; - D_ctx_80178354 = 255; - D_ctx_80178340 = 255; - D_ctx_80178358 = 0; + gFillScreenRed = 255; + gFillScreenGreen = 255; + gFillScreenBlue = 255; + gFillScreenAlpha = 255; + gFillScreenAlphaTarget = 0; Object_Kill(&gActors[8].obj, gActors[8].sfxSource); player->unk_1D0++; player->camEye.x = gCsCamEyeX = 0.0f; @@ -2759,10 +2763,10 @@ void SectorY_801A0AC0(Player* player) { break; case 2: if (gCsFrameCount < 300) { - D_ctx_80178348 = 255; - D_ctx_80178350 = 255; - D_ctx_80178354 = 255; - D_ctx_80178340 = 255; + gFillScreenRed = 255; + gFillScreenGreen = 255; + gFillScreenBlue = 255; + gFillScreenAlpha = 255; D_ctx_801784D4 = -58.0f; } if (gCsFrameCount >= 300) { @@ -3176,7 +3180,7 @@ void SectorY_801A0AC0(Player* player) { player->pos.z = player->unk_138 = 0.0f; player->unk_0D0 = D_play_80161A54; AUDIO_PLAY_BGM(SEQ_ID_SECTOR_Y | SEQ_FLAG); - D_ctx_80177838 = 100; + gLevelStatusScreenTimer = 100; player->state_1C8 = PLAYERSTATE_1C8_3; player->unk_1D0 = 0; player->timer_1F8 = 0; @@ -3249,7 +3253,7 @@ void SectorY_801A3B50(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel } } -void SectorY_Actor204_Update(Actor* actor) { +void SectorY_Actor204_Update(Actor204* this) { f32 sp1E4; f32 sp1E0; s32 i; @@ -3263,191 +3267,191 @@ void SectorY_Actor204_Update(Actor* actor) { s32 pad; sp4C = 30; - actor->iwork[14] = actor->unk_0B4 - 48; - actor->info.drawType = 2; - if (actor->iwork[18] != 0) { - actor->iwork[18]--; + this->iwork[14] = this->unk_0B4 - 48; + this->info.drawType = 2; + if (this->iwork[18] != 0) { + this->iwork[18]--; } - if ((actor->unk_048 != 0) && (actor->unk_046 != 3)) { - switch (actor->unk_048) { + if ((this->unk_048 != 0) && (this->unk_046 != 3)) { + switch (this->unk_048) { case 1: - actor->unk_046 = 1; - actor->timer_0BE = 50; - actor->iwork[19] = 0; + this->unk_046 = 1; + this->timer_0BE = 50; + this->iwork[19] = 0; break; case 2: - actor->unk_046 = 1; - actor->timer_0BE = 20; - actor->iwork[19] = 0; + this->unk_046 = 1; + this->timer_0BE = 20; + this->iwork[19] = 0; break; case 3: - actor->unk_046 = 2; - actor->unk_0B6 = 0; + this->unk_046 = 2; + this->unk_0B6 = 0; break; case 4: - actor->unk_046 = 0; - actor->unk_0B6 = 0; + this->unk_046 = 0; + this->unk_0B6 = 0; break; case 8: - actor->unk_046 = 1; - actor->timer_0BE = 50; - actor->iwork[19] = 1; + this->unk_046 = 1; + this->timer_0BE = 50; + this->iwork[19] = 1; break; case 9: - actor->unk_046 = 1; - actor->timer_0BE = 20; - actor->iwork[19] = 1; + this->unk_046 = 1; + this->timer_0BE = 20; + this->iwork[19] = 1; break; case 10: - actor->unk_046 = 1; - actor->timer_0BE = 50; - actor->iwork[19] = -1; + this->unk_046 = 1; + this->timer_0BE = 50; + this->iwork[19] = -1; break; case 11: - actor->unk_046 = 1; - actor->timer_0BE = 20; - actor->iwork[19] = -1; + this->unk_046 = 1; + this->timer_0BE = 20; + this->iwork[19] = -1; break; case 6: - actor->unk_046 = 4; - actor->unk_0B6 = 0; + this->unk_046 = 4; + this->unk_0B6 = 0; break; case 5: - actor->unk_046 = 5; - actor->unk_0B6 = Animation_GetFrameCount(&D_SY_602B778) - 1; + this->unk_046 = 5; + this->unk_0B6 = Animation_GetFrameCount(&D_SY_602B778) - 1; break; case 7: - actor->unk_046 = 6; - actor->unk_0B6 = Animation_GetFrameCount(&D_SY_602B778) - 1; + this->unk_046 = 6; + this->unk_0B6 = Animation_GetFrameCount(&D_SY_602B778) - 1; break; } - actor->unk_048 = 0; - actor->fwork[15] = 0.0f; + this->unk_048 = 0; + this->fwork[15] = 0.0f; } - switch (actor->unk_046) { + switch (this->unk_046) { case 0: - i = actor->iwork[17]; + i = this->iwork[17]; if (i != 0) { if (i == 1) { - actor->unk_0B6 = Animation_GetFrameCount(&D_SY_60265B4) - 1; - sp4C = Animation_GetFrameData(&D_SY_60265B4, actor->unk_0B6, sp68); + this->unk_0B6 = Animation_GetFrameCount(&D_SY_60265B4) - 1; + sp4C = Animation_GetFrameData(&D_SY_60265B4, this->unk_0B6, sp68); } else if (i == 2) { - actor->unk_0B6 = Animation_GetFrameCount(&D_SY_602B8DC) - 1; - sp4C = Animation_GetFrameData(&D_SY_602B8DC, actor->unk_0B6, sp68); + this->unk_0B6 = Animation_GetFrameCount(&D_SY_602B8DC) - 1; + sp4C = Animation_GetFrameData(&D_SY_602B8DC, this->unk_0B6, sp68); } } else { - actor->unk_0B6 = Animation_GetFrameCount(&D_SY_602CEB4); - sp4C = Animation_GetFrameData(&D_SY_602CEB4, actor->unk_0B6, sp68); + this->unk_0B6 = Animation_GetFrameCount(&D_SY_602CEB4); + sp4C = Animation_GetFrameData(&D_SY_602CEB4, this->unk_0B6, sp68); } break; case 1: - i = actor->iwork[17]; + i = this->iwork[17]; if (i != 0) { if (i == 1) { - actor->unk_0B6 = Animation_GetFrameCount(&D_SY_60265B4) - 1; - sp4C = Animation_GetFrameData(&D_SY_60265B4, actor->unk_0B6, sp68); + this->unk_0B6 = Animation_GetFrameCount(&D_SY_60265B4) - 1; + sp4C = Animation_GetFrameData(&D_SY_60265B4, this->unk_0B6, sp68); } else if (i == 2) { - actor->unk_0B6 = Animation_GetFrameCount(&D_SY_602B8DC) - 1; - sp4C = Animation_GetFrameData(&D_SY_602B8DC, actor->unk_0B6, sp68); + this->unk_0B6 = Animation_GetFrameCount(&D_SY_602B8DC) - 1; + sp4C = Animation_GetFrameData(&D_SY_602B8DC, this->unk_0B6, sp68); } } else { - actor->unk_0B6 = Animation_GetFrameCount(&D_SY_602A2CC) - 1; - sp4C = Animation_GetFrameData(&D_SY_602A2CC, actor->unk_0B6, sp68); + this->unk_0B6 = Animation_GetFrameCount(&D_SY_602A2CC) - 1; + sp4C = Animation_GetFrameData(&D_SY_602A2CC, this->unk_0B6, sp68); } - if (actor->timer_0BE == 15) { - actor->timer_0C4 = 4; - actor->fwork[19] = 30.0f; - if (actor->iwork[19] < 0) { - ActorEvent_8006F254(actor); + if (this->timer_0BE == 15) { + this->timer_0C4 = 4; + this->fwork[19] = 30.0f; + if (this->iwork[19] < 0) { + ActorEvent_8006F254(this); } else { sp1E4 = gPlayer[0].pos.x; sp1E0 = gPlayer[0].pos.y; - if (actor->iwork[19] != 0) { + if (this->iwork[19] != 0) { gPlayer[0].pos.x += RAND_FLOAT_CENTERED(300.0f); gPlayer[0].pos.y += RAND_FLOAT_CENTERED(300.0f); } - func_effect_8007F11C(0x162, actor->fwork[16], actor->fwork[17], actor->fwork[18], 100.0f); + func_effect_8007F11C(OBJ_EFFECT_354, this->fwork[16], this->fwork[17], this->fwork[18], 100.0f); gPlayer[0].pos.x = sp1E4; gPlayer[0].pos.y = sp1E0; - AUDIO_PLAY_SFX(0x2900306B, actor->sfxSource, 4); + AUDIO_PLAY_SFX(0x2900306B, this->sfxSource, 4); } - actor->unk_048 = 0; + this->unk_048 = 0; } - if (actor->timer_0BE == 0) { - actor->unk_0B6 = 0; - actor->unk_046 = 0; - actor->fwork[15] = 0.0f; + if (this->timer_0BE == 0) { + this->unk_0B6 = 0; + this->unk_046 = 0; + this->fwork[15] = 0.0f; } break; case 2: - if (actor->unk_0B6 < (Animation_GetFrameCount(&D_SY_6029B48) - 1)) { - actor->unk_0B6++; + if (this->unk_0B6 < (Animation_GetFrameCount(&D_SY_6029B48) - 1)) { + this->unk_0B6++; } - sp4C = Animation_GetFrameData(&D_SY_6029B48, actor->unk_0B6, sp68); + sp4C = Animation_GetFrameData(&D_SY_6029B48, this->unk_0B6, sp68); break; case 4: - actor->unk_0B6++; - if (actor->unk_0B6 >= (Animation_GetFrameCount(&D_SY_602B778) - 1)) { - actor->unk_046 = 0; - actor->iwork[17] = 0; - actor->fwork[15] = 0.0f; + this->unk_0B6++; + if (this->unk_0B6 >= (Animation_GetFrameCount(&D_SY_602B778) - 1)) { + this->unk_046 = 0; + this->iwork[17] = 0; + this->fwork[15] = 0.0f; } - sp4C = Animation_GetFrameData(&D_SY_602B778, actor->unk_0B6, sp68); + sp4C = Animation_GetFrameData(&D_SY_602B778, this->unk_0B6, sp68); break; case 5: case 6: - actor->unk_0B6 -= 1; - if (actor->unk_0B6 < 8) { - actor->fwork[15] = 0.1f; - if (actor->unk_046 == 5) { - actor->iwork[17] = 1; + this->unk_0B6 -= 1; + if (this->unk_0B6 < 8) { + this->fwork[15] = 0.1f; + if (this->unk_046 == 5) { + this->iwork[17] = 1; } else { - actor->iwork[17] = 2; + this->iwork[17] = 2; } - actor->unk_046 = 0; + this->unk_046 = 0; } - sp4C = Animation_GetFrameData(&D_SY_602B778, actor->unk_0B6, sp68); + sp4C = Animation_GetFrameData(&D_SY_602B778, this->unk_0B6, sp68); break; case 3: - actor->unk_0B6++; - if (actor->unk_0B6 >= Animation_GetFrameCount(&D_SY_6003348)) { - actor->unk_0B6 = Animation_GetFrameCount(&D_SY_6003348) - 1; + this->unk_0B6++; + if (this->unk_0B6 >= Animation_GetFrameCount(&D_SY_6003348)) { + this->unk_0B6 = Animation_GetFrameCount(&D_SY_6003348) - 1; } - sp4C = Animation_GetFrameData(&D_SY_6003348, actor->unk_0B6, sp68); - if ((actor->timer_0BE % 4U) == 0) { - func_effect_8007D2C8(RAND_FLOAT_CENTERED(150.0f) + actor->obj.pos.x, - RAND_FLOAT_CENTERED(150.0f) + actor->obj.pos.y, actor->obj.pos.z + 30.0f, 4.0f); + sp4C = Animation_GetFrameData(&D_SY_6003348, this->unk_0B6, sp68); + if ((this->timer_0BE % 4U) == 0) { + func_effect_8007D2C8(RAND_FLOAT_CENTERED(150.0f) + this->obj.pos.x, + RAND_FLOAT_CENTERED(150.0f) + this->obj.pos.y, this->obj.pos.z + 30.0f, 4.0f); } - if (actor->timer_0BE == 5U) { - func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, actor->vel.x, actor->vel.y, - actor->vel.z, 8.0f, 10); - func_effect_8007B344(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 8.0f, 5); - AUDIO_PLAY_SFX(0x2903A060, actor->sfxSource, 4); + if (this->timer_0BE == 5U) { + func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, + this->vel.z, 8.0f, 10); + func_effect_8007B344(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 8.0f, 5); + AUDIO_PLAY_SFX(0x2903A060, this->sfxSource, 4); } - if (actor->timer_0BE == 0) { - Object_Kill(&actor->obj, actor->sfxSource); - func_enmy_80066254(actor); + if (this->timer_0BE == 0) { + Object_Kill(&this->obj, this->sfxSource); + Actor_Despawn(this); for (i = 10; i < 24; i++) { - SectorY_801A3B50(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, RAND_FLOAT_CENTERED(50.0f), - RAND_FLOAT_CENTERED(50.0f), actor->vel.z + RAND_FLOAT_CENTERED(50.0f), i); + SectorY_801A3B50(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, RAND_FLOAT_CENTERED(50.0f), + RAND_FLOAT_CENTERED(50.0f), this->vel.z + RAND_FLOAT_CENTERED(50.0f), i); } } break; } - if ((actor->unk_046 == 1) || (actor->unk_046 == 2)) { - Matrix_RotateZ(gCalcMatrix, -actor->vwork[29].z * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -actor->vwork[29].x * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -actor->vwork[29].y * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, -actor->obj.rot.z * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, -actor->obj.rot.x * M_DTOR, 1); - if (actor->iwork[17] == 0) { - Matrix_RotateY(gCalcMatrix, -actor->obj.rot.y * M_DTOR, 1); + if ((this->unk_046 == 1) || (this->unk_046 == 2)) { + Matrix_RotateZ(gCalcMatrix, -this->vwork[29].z * M_DTOR, 0); + Matrix_RotateX(gCalcMatrix, -this->vwork[29].x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, -this->vwork[29].y * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, -this->obj.rot.z * M_DTOR, 1); + Matrix_RotateX(gCalcMatrix, -this->obj.rot.x * M_DTOR, 1); + if (this->iwork[17] == 0) { + Matrix_RotateY(gCalcMatrix, -this->obj.rot.y * M_DTOR, 1); } - sp5C.x = gPlayer[0].pos.x - actor->obj.pos.x; - sp5C.y = gPlayer[0].pos.y - actor->obj.pos.y; - sp5C.z = gPlayer[0].pos.z - actor->obj.pos.z; + sp5C.x = gPlayer[0].pos.x - this->obj.pos.x; + sp5C.y = gPlayer[0].pos.y - this->obj.pos.y; + sp5C.z = gPlayer[0].pos.z - this->obj.pos.z; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp5C, &sp50); sp1D4 = Math_RadToDeg(Math_Atan2F(sp50.x, sp50.z)); sp1D8 = Math_RadToDeg(-Math_Atan2F(sp50.y, sqrtf(SQ(sp50.x) + SQ(sp50.z)))); @@ -3457,9 +3461,9 @@ void SectorY_Actor204_Update(Actor* actor) { if ((sp1D8 < 270.0f) && (sp1D8 > 180.0f)) { sp1D8 = 270.0f; } - if (actor->iwork[17] != 0) { - Math_SmoothStepToAngle(&actor->obj.rot.y, sp1D4, 0.1f, 2.0f, 0.0f); - sp1D0 = sp1D4 - actor->obj.rot.y; + if (this->iwork[17] != 0) { + Math_SmoothStepToAngle(&this->obj.rot.y, sp1D4, 0.1f, 2.0f, 0.0f); + sp1D0 = sp1D4 - this->obj.rot.y; sp1D4 = 0.0f; } else { if ((sp1D4 > 90.0f) && (sp1D4 < 180.0f)) { @@ -3468,73 +3472,73 @@ void SectorY_Actor204_Update(Actor* actor) { if ((sp1D4 < 270.0f) && (sp1D4 > 180.0f)) { sp1D4 = 270.0f; } - sp1D0 = sp1D4 - actor->fwork[0x15]; + sp1D0 = sp1D4 - this->fwork[0x15]; } } else { sp1D0 = sp1D8 = sp1D4 = 0.0f; } - Math_SmoothStepToAngle(&actor->fwork[0x15], sp1D4, 0.1f, 2.0f, 0.0f); - Math_SmoothStepToAngle(&actor->fwork[20], sp1D8, 0.1f, 2.0f, 0.0f); + Math_SmoothStepToAngle(&this->fwork[0x15], sp1D4, 0.1f, 2.0f, 0.0f); + Math_SmoothStepToAngle(&this->fwork[20], sp1D8, 0.1f, 2.0f, 0.0f); if (sp1D0 < 0.0f) { sp1D0 += 360.0f; } - Math_SmoothStepToAngle(&actor->fwork[28], sp1D0, 0.2f, 5.0f, 0.0f); - Math_SmoothStepToAngle(&actor->fwork[29], sp1D8, 0.2f, 5.0f, 0.0f); - Math_SmoothStepToVec3fArray(sp68, actor->vwork, 1, sp4C, actor->fwork[15], 100.0f, 0.0f); + Math_SmoothStepToAngle(&this->fwork[28], sp1D0, 0.2f, 5.0f, 0.0f); + Math_SmoothStepToAngle(&this->fwork[29], sp1D8, 0.2f, 5.0f, 0.0f); + Math_SmoothStepToVec3fArray(sp68, this->vwork, 1, sp4C, this->fwork[15], 100.0f, 0.0f); - if ((actor->unk_046 == 6) || (actor->unk_046 == 5)) { - Math_SmoothStepToF(&actor->fwork[15], 0.3f, 1.0f, 0.05f, 0.0f); + if ((this->unk_046 == 6) || (this->unk_046 == 5)) { + Math_SmoothStepToF(&this->fwork[15], 0.3f, 1.0f, 0.05f, 0.0f); } else { - Math_SmoothStepToF(&actor->fwork[15], 0.2f, 1.0f, 0.015f, 0.0f); + Math_SmoothStepToF(&this->fwork[15], 0.2f, 1.0f, 0.015f, 0.0f); } - Math_SmoothStepToF(&actor->fwork[19], 0.0f, 0.2f, 10.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[19], 0.0f, 0.2f, 10.0f, 0.0f); - if (actor->iwork[17] != 0) { - Math_SmoothStepToF(&actor->fwork[27], 1.5f, 1.0f, 0.2f, 0.0f); + if (this->iwork[17] != 0) { + Math_SmoothStepToF(&this->fwork[27], 1.5f, 1.0f, 0.2f, 0.0f); } else { - Math_SmoothStepToF(&actor->fwork[27], 0.0f, 1.0f, 0.05f, 0.0f); + Math_SmoothStepToF(&this->fwork[27], 0.0f, 1.0f, 0.05f, 0.0f); } - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_603405C); - if (actor->unk_046 == 1) { - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_603421C); + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_603405C); + if (this->unk_046 == 1) { + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_603421C); } - i = actor->iwork[17]; + i = this->iwork[17]; if (i != 0) { if (i == 1) { - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_6034124); + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_6034124); } else if (i == 2) { - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_60341A8); + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_60341A8); } } - if (actor->unk_046 == 2) { - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_60340C0); + if (this->unk_046 == 2) { + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_60340C0); } - if ((actor->unk_0D0 != 0) && (actor->unk_046 != 3)) { + if ((this->unk_0D0 != 0) && (this->unk_046 != 3)) { - if (actor->unk_0D0 == 2) { - actor->unk_0D2 = 1; + if (this->unk_0D0 == 2) { + this->unk_0D2 = 1; } - actor->unk_0D0 = 0; - if (actor->unk_0D2 == 0) { - actor->iwork[18] = 15; - AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); + this->unk_0D0 = 0; + if (this->unk_0D2 == 0) { + this->iwork[18] = 15; + AUDIO_PLAY_SFX(0x29121007, this->sfxSource, 4); } else { - AUDIO_PLAY_SFX(0x2903300E, actor->sfxSource, 4); - actor->timer_0C6 = 15; - func_effect_8007C120(actor->unk_0D8.x, actor->unk_0D8.y, actor->unk_0D8.z, actor->vel.x, actor->vel.y, - actor->vel.z, 0.1f, 10); - actor->health -= actor->damage; + AUDIO_PLAY_SFX(0x2903300E, this->sfxSource, 4); + this->timer_0C6 = 15; + func_effect_8007C120(this->unk_0D8.x, this->unk_0D8.y, this->unk_0D8.z, this->vel.x, this->vel.y, + this->vel.z, 0.1f, 10); + this->health -= this->damage; - if (actor->health <= 0) { - actor->unk_046 = 3; - actor->unk_048 = 0; - actor->unk_0B6 = 0; - actor->timer_0BE = 50; - actor->fwork[15] = 0.0f; + if (this->health <= 0) { + this->unk_046 = 3; + this->unk_048 = 0; + this->unk_0B6 = 0; + this->timer_0BE = 50; + this->fwork[15] = 0.0f; } } } @@ -3548,14 +3552,14 @@ bool SectorY_801A4A18(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* Actor* actor = (Actor*) data; if (limbIndex == 4) { - if (!(actor->iwork[18] & 1)) { + if ((actor->iwork[18] % 2) == 0) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, D_i6_801A6B28[actor->iwork[14]], D_i6_801A6B34[actor->iwork[14]], D_i6_801A6B40[actor->iwork[14]], 255); } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 255, 0, 255); } } else { - if (!(actor->timer_0C6 & 1)) { + if ((actor->timer_0C6 % 2) == 0) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, D_i6_801A6B28[actor->iwork[14]], D_i6_801A6B34[actor->iwork[14]], D_i6_801A6B40[actor->iwork[14]], 255); } else { @@ -3598,20 +3602,20 @@ static f32 D_i6_801A6B64[5] = { 0.3f, 0.7f, 1.3f, 0.7f, 0.3f, }; -void SectorY_Actor204_Draw(Actor* actor) { +void SectorY_Actor204_Draw(Actor204* this) { f32 scale; RCP_SetupDL_30(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); - Animation_DrawSkeleton(2, D_SY_602D140, actor->vwork, SectorY_801A4A18, SectorY_801A4C34, actor, gCalcMatrix); + Animation_DrawSkeleton(2, D_SY_602D140, this->vwork, SectorY_801A4A18, SectorY_801A4C34, this, gCalcMatrix); - if (actor->timer_0C4 != 0) { - scale = D_i6_801A6B64[actor->timer_0C4]; + if (this->timer_0C4 != 0) { + scale = D_i6_801A6B64[this->timer_0C4]; RCP_SetupDL_49(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 255, 48, 0, 255); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, actor->fwork[16], actor->fwork[17], actor->fwork[18] + D_ctx_80177D20, 1); + Matrix_Translate(gGfxMatrix, this->fwork[16], this->fwork[17], this->fwork[18] + D_ctx_80177D20, 1); Matrix_Scale(gGfxMatrix, scale, scale, scale, 1); Matrix_SetGfxMtx(&gMasterDisp); @@ -3627,7 +3631,7 @@ void SectorY_801A4E44(Object_80* obj80) { AUDIO_PLAY_SFX(0x1900404F, obj80->sfxSource, 4); obj80->state++; } - if (!(gGameFrameCount & 3)) { + if (((gGameFrameCount % 4) == 0)) { Matrix_RotateY(gCalcMatrix, obj80->obj.rot.y * M_DTOR, 0); Matrix_RotateX(gCalcMatrix, obj80->obj.rot.x * M_DTOR, 1); Matrix_RotateZ(gCalcMatrix, obj80->obj.rot.z * M_DTOR, 1); @@ -3666,7 +3670,7 @@ void SectorY_801A52B8(Object_80* obj80) { AUDIO_PLAY_SFX(0x1900404F, obj80->sfxSource, 4); obj80->state++; } - if (!(gGameFrameCount & 3)) { + if (((gGameFrameCount % 4) == 0)) { Matrix_RotateY(gCalcMatrix, obj80->obj.rot.y * M_DTOR, 0); Matrix_RotateX(gCalcMatrix, obj80->obj.rot.x * M_DTOR, 1); Matrix_RotateZ(gCalcMatrix, obj80->obj.rot.z * M_DTOR, 1); diff --git a/src/overlays/ovl_i6/fox_turret.c b/src/overlays/ovl_i6/fox_turret.c index 48b6bfab..232915b2 100644 --- a/src/overlays/ovl_i6/fox_turret.c +++ b/src/overlays/ovl_i6/fox_turret.c @@ -146,7 +146,7 @@ void Turret_801A5AD4(Player* player) { if (player->unk_1BC == 0) { gControllerLock = 0; player->unk_1B0++; - D_ctx_80177838 = 50; + gLevelStatusScreenTimer = 50; } } sp2C = (f32) gControllerPress[player->num].stick_x; @@ -189,16 +189,16 @@ void Turret_801A5AD4(Player* player) { player->flags_228 = 0; if (player->unk_008 > 20.0f) { - player->flags_228 |= 1; + player->flags_228 |= PFLAG_228_0; } if (player->unk_008 < -20.0f) { - player->flags_228 |= 2; + player->flags_228 |= PFLAG_228_1; } if (player->unk_00C > 20.0f) { - player->flags_228 |= 8; + player->flags_228 |= PFLAG_228_3; } if (player->unk_00C < -20.0f) { - player->flags_228 |= 4; + player->flags_228 |= PFLAG_228_2; } if (gControllerPress[player->num].button & B_BUTTON) { player->unk_008 = player->unk_00C = 0.0f; diff --git a/src/overlays/ovl_i6/fox_ve2.c b/src/overlays/ovl_i6/fox_ve2.c index e5ce7c06..0f4349eb 100644 --- a/src/overlays/ovl_i6/fox_ve2.c +++ b/src/overlays/ovl_i6/fox_ve2.c @@ -39,12 +39,12 @@ void Venom2_80196314(Actor* actor) { switch (actor->state) { case 0: - D_360_8015F928 = 0; - D_360_8015F908 = 0; + gAllRangeEventTimer = 0; + gStarWolfMsgTimer = 0; for (i = 0; i < 6; i++) { - D_ctx_80177CF0[i] = 1; - D_ctx_80177CD0[i] = 1; + gSavedStarWolfTeamAlive[i] = 1; + gStarWolfTeamAlive[i] = 1; } if (player->state_1C8 == PLAYERSTATE_1C8_3) { @@ -53,10 +53,10 @@ void Venom2_80196314(Actor* actor) { player->pos.z = 8000.0f; player->pos.y = 670.0f; D_360_800C9B4C = 120; - D_360_8015F908 = 1000; + gStarWolfMsgTimer = 1000; } else { D_360_800C9B4C = 320; - D_360_8015F908 = 1200; + gStarWolfMsgTimer = 1200; actor->state = 1; player->pos.x = 0.0f; player->pos.z = 16000.0f; @@ -72,7 +72,7 @@ void Venom2_80196314(Actor* actor) { otherActor->unk_0F4.x = 340.0f; } - D_ctx_80178340 = D_ctx_80178358 = 255; + gFillScreenAlpha = gFillScreenAlphaTarget = 255; } func_play_800B63BC(player, 1); /* fallthrough */ @@ -86,16 +86,16 @@ void Venom2_80196314(Actor* actor) { actor->state = 2; player->state_1C8 = PLAYERSTATE_1C8_3; player->unk_014 = 0.0001f; - D_ctx_80177838 = 80; + gLevelStatusScreenTimer = 80; } } - if (D_360_8015F928 == 80) { + if (gAllRangeEventTimer == 80) { Radio_PlayMessage(gMsg_ID_19010, RCID_FOX); } break; case 2: Venom2_801962F4(actor); - if (((D_360_800C9B4C + 100) < D_360_8015F928) && (gActors[4].obj.status == OBJ_FREE) && + if (((D_360_800C9B4C + 100) < gAllRangeEventTimer) && (gActors[4].obj.status == OBJ_FREE) && (gActors[5].obj.status == OBJ_FREE) && (gActors[6].obj.status == OBJ_FREE) && (gActors[7].obj.status == OBJ_FREE) && (actor->timer_0BE == 0)) { actor->timer_0BE = 80; @@ -103,8 +103,8 @@ void Venom2_80196314(Actor* actor) { if ((actor->timer_0BE == 1) && (player->state_1C8 != PLAYERSTATE_1C8_7)) { for (i = 1; i < ARRAY_COUNT(gTeamShields); i++) { - D_ctx_80177C38[i] = gSavedTeamShields[i]; - D_ctx_801778F0[i] = gSavedTeamShields[i]; + gPrevPlanetTeamShields[i] = gSavedTeamShields[i]; + gPrevPlanetSavedTeamShields[i] = gSavedTeamShields[i]; gSavedTeamShields[i] = gTeamShields[i]; } @@ -121,8 +121,8 @@ void Venom2_80196314(Actor* actor) { } break; case 3: - D_ctx_801779BC = 0; - if (D_360_8015F908 < 600) { + gPauseEnabled = 0; + if (gStarWolfMsgTimer < 600) { player->camEye.x += actor4->vel.x * 0.23f; player->camEye.y += actor4->vel.y * 0.23f; player->camEye.z += actor4->vel.z * 0.23f; @@ -131,7 +131,7 @@ void Venom2_80196314(Actor* actor) { Math_SmoothStepToF(&player->camAt.y, actor4->obj.pos.y, 1.0f, 20000.0f, 0.0f); Math_SmoothStepToF(&player->camAt.z, actor4->obj.pos.z, 1.0f, 20000.0f, 0.0f); Math_SmoothStepToF(&player->unk_034, 0, 0.1f, 0.2f, 0.0f); - if ((gControllerPress->button & START_BUTTON) || (D_360_8015F928 == (D_360_800C9B4C + 300))) { + if ((gControllerPress->button & START_BUTTON) || (gAllRangeEventTimer == (D_360_800C9B4C + 300))) { actor->state = 2; player->state_1C8 = PLAYERSTATE_1C8_3; func_play_800B7184(player, 1); @@ -140,10 +140,10 @@ void Venom2_80196314(Actor* actor) { } break; } - if (D_360_8015F908 != 0) { - D_360_8015F908--; + if (gStarWolfMsgTimer != 0) { + gStarWolfMsgTimer--; - switch (D_360_8015F908) { + switch (gStarWolfMsgTimer) { case 860: Radio_PlayMessage(gMsg_ID_19200, RCID_WOLF); break; @@ -172,21 +172,21 @@ void Venom2_80196968(void) { Object_58* obj58; s32 i; - D_ctx_80178310 = SEGMENTED_TO_VIRTUAL(D_enmy_800CFDA0[gCurrentLevel]); + gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]); for (obj58 = gObjects58, i = 0; i < 1000; i++) { - if (D_ctx_80178310[i].id < 0) { + if (gLevelObjects[i].id < 0) { break; } - if (D_ctx_80178310[i].id <= OBJ_80_160) { + if (gLevelObjects[i].id <= OBJ_80_160) { Object_58_Initialize(obj58); obj58->obj.status = OBJ_ACTIVE; - obj58->obj.id = D_ctx_80178310[i].id; - obj58->sfxSource[0] = obj58->obj.pos.x = D_ctx_80178310[i].xPos; - obj58->sfxSource[1] = obj58->obj.pos.y = D_ctx_80178310[i].yPos; - obj58->sfxSource[2] = obj58->obj.pos.z = -D_ctx_80178310[i].zPos1; - obj58->unk_54 = obj58->obj.rot.y = D_ctx_80178310[i].rot.y; + obj58->obj.id = gLevelObjects[i].id; + obj58->sfxSource[0] = obj58->obj.pos.x = gLevelObjects[i].xPos; + obj58->sfxSource[1] = obj58->obj.pos.y = gLevelObjects[i].yPos; + obj58->sfxSource[2] = obj58->obj.pos.z = -gLevelObjects[i].zPos1; + obj58->unk_54 = obj58->obj.rot.y = gLevelObjects[i].rot.y; Object_SetInfo(&obj58->info, obj58->obj.id); @@ -195,18 +195,18 @@ void Venom2_80196968(void) { } for (actor = &gActors[30], i = 0; i < 1000; i++) { - if (D_ctx_80178310[i].id < 0) { + if (gLevelObjects[i].id < 0) { break; } - if ((D_ctx_80178310[i].id >= OBJ_ACTOR_176) && (D_ctx_80178310[i].id <= OBJ_ACTOR_SUPPLIES)) { + if ((gLevelObjects[i].id >= OBJ_ACTOR_176) && (gLevelObjects[i].id <= OBJ_ACTOR_SUPPLIES)) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = D_ctx_80178310[i].id; - actor->fwork[10] = actor->obj.pos.x = D_ctx_80178310[i].xPos; - actor->fwork[11] = actor->obj.pos.y = D_ctx_80178310[i].yPos; - actor->fwork[12] = actor->obj.pos.z = -D_ctx_80178310[i].zPos1; - actor->fwork[13] = actor->obj.rot.y = D_ctx_80178310[i].rot.y; + actor->obj.id = gLevelObjects[i].id; + actor->fwork[10] = actor->obj.pos.x = gLevelObjects[i].xPos; + actor->fwork[11] = actor->obj.pos.y = gLevelObjects[i].yPos; + actor->fwork[12] = actor->obj.pos.z = -gLevelObjects[i].zPos1; + actor->fwork[13] = actor->obj.rot.y = gLevelObjects[i].rot.y; Object_SetInfo(&actor->info, actor->obj.id); actor++; } @@ -224,8 +224,8 @@ void Venom2_80196BF8(Player* player) { f32 temp_fv0; if (gCsFrameCount > 50) { - D_ctx_8017835C = 3; - D_ctx_80178358 = 0; + gFillScreenAlphaStep = 3; + gFillScreenAlphaTarget = 0; } Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, 0); Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), 1); @@ -316,7 +316,7 @@ void Venom2_80196D88(Player* player) { D_ctx_80177A48[5] = sp58.x; D_ctx_80177A48[6] = sp58.z; } - if (D_ctx_8017827C == 2) { + if (gLevelStage == 2) { player->timer_1FC = 240; } else { player->timer_1FC = 180; @@ -325,10 +325,10 @@ void Venom2_80196D88(Player* player) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 60); /* fallthrough */ case 1: - if (D_ctx_8017827C == 2) { - D_ctx_8017835C = 2; - D_ctx_80178358 = 0; - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 255; + if (gLevelStage == 2) { + gFillScreenAlphaStep = 2; + gFillScreenAlphaTarget = 0; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; } Math_SmoothStepToF(&D_ctx_80177A48[1], 0.8f, 1.0f, 0.05f, 0.0f); Math_SmoothStepToF(&player->unk_12C, 0.0f, 0.1f, 15.0f, 0.0f); @@ -402,21 +402,21 @@ void Venom2_80196D88(Player* player) { player->unk_190 = 5.0f; } if (gCsFrameCount > 110) { - D_ctx_80178358 = 255; - D_ctx_8017835C = 8; - D_ctx_80178348 = D_ctx_80178350 = D_ctx_80178354 = 0; - if (D_ctx_80178340 == 255) { + gFillScreenAlphaTarget = 255; + gFillScreenAlphaStep = 8; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; + if (gFillScreenAlpha == 255) { for (i = 1; i < ARRAY_COUNT(gTeamShields); i++) { - D_ctx_80177C38[i] = gSavedTeamShields[i]; - D_ctx_801778F0[i] = gSavedTeamShields[i]; + gPrevPlanetTeamShields[i] = gSavedTeamShields[i]; + gPrevPlanetSavedTeamShields[i] = gSavedTeamShields[i]; gSavedTeamShields[i] = gTeamShields[i]; } gNextGameState = GSTATE_PLAY; gNextLevel = LEVEL_VENOM_ANDROSS; if (D_play_800D3180[gCurrentLevel] != 0) { - D_game_80161A2E = 1; + gNextLevelStage = 1; } func_8001CA24(0); Audio_KillSfxBySource(player->sfxSource); @@ -436,7 +436,8 @@ void Venom2_80196D88(Player* player) { AUDIO_PLAY_BGM(SEQ_ID_TO_ANDROSS | SEQ_FLAG); } if (player->timer_1FC == 1) { - if ((gTeamShields[2] > 0) || (gTeamShields[1] > 0) || (gTeamShields[3] > 0)) { + if ((gTeamShields[TEAM_ID_SLIPPY] > 0) || (gTeamShields[TEAM_ID_FALCO] > 0) || + (gTeamShields[TEAM_ID_PEPPY] > 0)) { Radio_PlayMessage(gMsg_ID_8230, RCID_FALCO); Radio_PlayMessage(gMsg_ID_8220, RCID_PEPPY); Radio_PlayMessage(gMsg_ID_8240, RCID_SLIPPY); diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index d9f4114f..e2df3bb7 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -5,7 +5,7 @@ */ #include "mods.h" -#include "prevent_bss_reordering.h" +// #include "prevent_bss_reordering.h" #include "global.h" #include "fox_map.h" #include "fox_option.h" @@ -1091,7 +1091,7 @@ Gfx D_menu_801B6548[] = { gsSPEndDisplayList(), }; -void* D_menu_801B68B0[] = { +u8* D_menu_801B68B0[] = { D_menu_801C6C10, D_menu_801C9010, D_menu_801CB410, D_menu_801BB810, D_menu_801C4810, D_menu_801C0010, D_menu_801BDC10, D_menu_801C2410, D_menu_801B9410, }; @@ -1206,16 +1206,16 @@ void Map_8019E800(void) { Memory_FreeAll(); func_play_800A5D6C(); D_ctx_80178410 = 0; - gNextGameState = 4; + gNextGameState = GSTATE_MAP; D_game_80161A34 = 5; D_ctx_80177868 = 2; - gDrawMode = DRAWMODE_0; + gDrawMode = DRAW_NONE; } void Map_8019E85C(void) { switch (D_ctx_80177868) { case 0: - if (D_Timer_8017783C == 0) { + if (gNextGameStateTimer == 0) { D_ctx_80177868 = 1; } break; @@ -1245,13 +1245,13 @@ void Map_8019E8D0(void) { switch (D_ctx_80177B40) { case 0: - if (D_Timer_8017783C == 0) { + if (gNextGameStateTimer == 0) { D_ctx_80177B40 = 1; } break; case 1: - gDrawMode = DRAWMODE_0; + gDrawMode = DRAW_NONE; Map_8019E99C(); break; @@ -1336,10 +1336,10 @@ void Map_8019E99C(void) { D_menu_801CD960 = 0; - D_ctx_80178340 = 255; - D_ctx_80178348 = 0; - D_ctx_80178350 = 0; - D_ctx_80178354 = 0; + gFillScreenAlpha = 255; + gFillScreenRed = 0; + gFillScreenGreen = 0; + gFillScreenBlue = 0; D_ctx_80177D20 = 0.0f; D_menu_801CF018 = 0; @@ -1438,19 +1438,19 @@ void Map_8019F164(void) { gLifeCount[gPlayerNum] = 99; } - for (i = 0; i < 6; i++) { - D_ctx_80177C38[i] = gTeamShields[i]; - D_ctx_801778F0[i] = gSavedTeamShields[i]; + for (i = 0; i < TEAM_ID_MAX; i++) { + gPrevPlanetTeamShields[i] = gTeamShields[i]; + gPrevPlanetSavedTeamShields[i] = gSavedTeamShields[i]; gSavedTeamShields[i] = gTeamShields[i]; } - for (i = 1; i < 4; i++) { - if (D_ctx_80177C38[i] == 0) { - D_ctx_80177C38[i] = 255; + for (i = TEAM_ID_FALCO; i <= TEAM_ID_PEPPY; i++) { + if (gPrevPlanetTeamShields[i] == 0) { + gPrevPlanetTeamShields[i] = 255; } } - D_menu_801CD93C = D_ctx_80177930; + D_menu_801CD93C = gNextPlanetPath; sCurrentPlanetId = Map_GetPlanetId(gCurrentLevel); @@ -1565,15 +1565,15 @@ void Map_8019F600(void) { gTotalHits = 0; gHitCount = 0; - gTeamShields[1] = 255; - gTeamShields[2] = 255; - gTeamShields[3] = 255; + gTeamShields[TEAM_ID_FALCO] = 255; + gTeamShields[TEAM_ID_SLIPPY] = 255; + gTeamShields[TEAM_ID_PEPPY] = 255; gSavedTeamShields[1] = 255; gSavedTeamShields[2] = 255; gSavedTeamShields[3] = 255; - D_ctx_80177C38[1] = 255; - D_ctx_80177C38[2] = 255; - D_ctx_80177C38[3] = 255; + gPrevPlanetTeamShields[1] = 255; + gPrevPlanetTeamShields[2] = 255; + gPrevPlanetTeamShields[3] = 255; D_ctx_80177C58[1] = 255; D_ctx_80177C58[2] = 255; D_ctx_80177C58[3] = 255; @@ -1769,7 +1769,7 @@ bool Map_8019FD1C(LevelId levelId, s32 arg1) { break; case LEVEL_VENOM_ANDROSS: - if (D_ctx_8017827C == 0) { + if (gLevelStage == 0) { planetSaveSlot = SAVE_SLOT_VENOM_1; } else { planetSaveSlot = SAVE_SLOT_VENOM_2; @@ -1955,18 +1955,17 @@ void Map_801A01A8(void) { } if (D_menu_801CEEC8 == 0) { - Map_801A07E8((u8*) D_menu_801B68B0[8], (u8*) SEGMENTED_TO_VIRTUAL(D_menu_801B68D4[8]), &(D_menu_801CD818[8])); + Map_801A07E8(D_menu_801B68B0[8], SEGMENTED_TO_VIRTUAL(D_menu_801B68D4[8]), &D_menu_801CD818[8]); D_menu_801CEEC8 = 5; } else { D_menu_801CEEC8--; } - Map_801A07E8((u8*) D_menu_801B68B0[D_menu_801CEEC4 * 2], - (u8*) SEGMENTED_TO_VIRTUAL(D_menu_801B68D4[D_menu_801CEEC4 * 2]), - &(D_menu_801CD818[D_menu_801CEEC4 * 2])); - Map_801A07E8((u8*) D_menu_801B68B0[(D_menu_801CEEC4 * 2) + 1], - (u8*) SEGMENTED_TO_VIRTUAL(D_menu_801B68D4[(D_menu_801CEEC4 * 2) + 1]), - &(D_menu_801CD818[(D_menu_801CEEC4 * 2) + 1])); + Map_801A07E8(D_menu_801B68B0[D_menu_801CEEC4 * 2], SEGMENTED_TO_VIRTUAL(D_menu_801B68D4[D_menu_801CEEC4 * 2]), + &D_menu_801CD818[D_menu_801CEEC4 * 2]); + Map_801A07E8(D_menu_801B68B0[(D_menu_801CEEC4 * 2) + 1], + SEGMENTED_TO_VIRTUAL(D_menu_801B68D4[(D_menu_801CEEC4 * 2) + 1]), + &D_menu_801CD818[(D_menu_801CEEC4 * 2) + 1]); D_menu_801CEEC4++; if (D_menu_801CEEC4 > 3) { D_menu_801CEEC4 = 0; @@ -2082,7 +2081,7 @@ void Map_801A0954(void) { break; } - if (D_ctx_80178340 != 0) { + if (gFillScreenAlpha != 0) { break; } @@ -2447,10 +2446,10 @@ void Map_801A1C14(void) { } D_ctx_80178410 = 0; - D_ctx_80178348 = 255; - D_ctx_80178350 = 255; - D_ctx_80178354 = 255; - D_ctx_80178340 = 0; + gFillScreenRed = 255; + gFillScreenGreen = 255; + gFillScreenBlue = 255; + gFillScreenAlpha = 0; D_menu_801CEB3C = 0.0f; D_menu_801CEB38 = 255; @@ -2461,7 +2460,7 @@ void Map_801A1C14(void) { case 1: if (D_menu_801CD95C == 0) { if (sCurrentPlanetId == PLANET_CORNERIA) { - D_ctx_80178340 = 0; + gFillScreenAlpha = 0; D_menu_801CD948 = 10; AUDIO_PLAY_SFX(0x0940A00BU, gDefaultSfxSource, 4U); } else { @@ -2470,7 +2469,7 @@ void Map_801A1C14(void) { } } else { if (sCurrentPlanetId == PLANET_CORNERIA) { - D_ctx_80178340 ^= 0xFF; + gFillScreenAlpha ^= 0xFF; if (D_menu_801CD95C == 2) { D_menu_801CEB34 = 0; } @@ -2728,10 +2727,10 @@ void Map_801A2674(void) { } void Map_801A281C(void) { - D_ctx_80178348 = 0; - D_ctx_80178350 = 0; - D_ctx_80178354 = 0; - D_ctx_80178340 = 255; + gFillScreenRed = 0; + gFillScreenGreen = 0; + gFillScreenBlue = 0; + gFillScreenAlpha = 255; D_menu_801CD988 = 5; D_menu_801CEED8 = 0; @@ -2800,19 +2799,19 @@ void Map_801A2B8C(void) { break; case 100: - if (D_ctx_80178340 != 0) { - D_ctx_80178340 -= 64; - if (D_ctx_80178340 < 0) { - D_ctx_80178340 = 0; + if (gFillScreenAlpha != 0) { + gFillScreenAlpha -= 64; + if (gFillScreenAlpha < 0) { + gFillScreenAlpha = 0; } } else { D_menu_801CD9C0 = 30; if ((D_menu_801CD98C == 1) || (D_menu_801CD980 == 1)) { - D_ctx_80178348 = 255; - D_ctx_80178350 = 255; - D_ctx_80178354 = 255; - D_ctx_80178340 = 0; + gFillScreenRed = 255; + gFillScreenGreen = 255; + gFillScreenBlue = 255; + gFillScreenAlpha = 0; D_menu_801CD984 = 0; D_menu_801CD94C = 10; break; @@ -2827,27 +2826,27 @@ void Map_801A2B8C(void) { break; } - if ((D_menu_801CD984 == 255) && (D_ctx_80178340 == 0)) { + if ((D_menu_801CD984 == 255) && (gFillScreenAlpha == 0)) { D_menu_801CD980 = 0; D_menu_801CD9C0 = 30; D_menu_801CD94C = 20; } else if (D_menu_801CD988 != 0) { - D_ctx_80178340 ^= 255; + gFillScreenAlpha ^= 255; D_menu_801CD988--; } else { D_menu_801CD988 = 0; - if (D_ctx_80178340 != 0) { - D_ctx_80178340 -= 21; - if (D_ctx_80178340 < 0) { - D_ctx_80178340 = 0; + if (gFillScreenAlpha != 0) { + gFillScreenAlpha -= 21; + if (gFillScreenAlpha < 0) { + gFillScreenAlpha = 0; } } D_menu_801CD984 += 8; if (D_menu_801CD984 > 255) { - D_ctx_80178340 = 0; + gFillScreenAlpha = 0; D_menu_801CD984 = 255; } } @@ -3061,10 +3060,10 @@ void Map_801A36A8(void) { switch (D_menu_801CD948) { case 0: - D_ctx_80178348 = 0; - D_ctx_80178350 = 0; - D_ctx_80178354 = 0; - D_ctx_80178340 = 255; + gFillScreenRed = 0; + gFillScreenGreen = 0; + gFillScreenBlue = 0; + gFillScreenAlpha = 255; for (i = 0; i < 8; i++) { D_menu_801CF020[i] = D_menu_801B69D4[i]; @@ -3087,10 +3086,10 @@ void Map_801A36A8(void) { case 10: temp = Math_SmoothStepToF(&D_menu_801CEA9C, 0.0f, 1.0f, 100.0f, 1.0f); - D_ctx_80178340 = D_menu_801CEA9C; + gFillScreenAlpha = D_menu_801CEA9C; if (temp == 0.0f) { - D_ctx_80178340 = 0; + gFillScreenAlpha = 0; D_menu_801CD9C0 = 0; D_menu_801CD948 = 20; } @@ -3120,16 +3119,16 @@ void Map_801A36A8(void) { break; case 3: - D_ctx_80178340 += 32; - if (D_ctx_80178340 > 255) { - D_ctx_80178340 = 255; + gFillScreenAlpha += 32; + if (gFillScreenAlpha > 255) { + gFillScreenAlpha = 255; D_menu_801CD948++; } break; case 4: gGameState = GSTATE_MENU; - D_Timer_8017783C = 2; + gNextGameStateTimer = 2; gOptionMenuStatus = OPTION_WAIT; gDrawMode = 0; D_ctx_80178410 = 0; @@ -3516,7 +3515,7 @@ void Map_801A4AE8(void) { Map_801A4D0C(var_a0); if (D_menu_801CEFDC == 0) { - for (i = 0; i < 6; i++) { + for (i = 0; i < TEAM_ID_MAX; i++) { D_ctx_80177C58[i] = gTeamShields[i]; } D_menu_801CEFC8 = 0; @@ -3607,8 +3606,8 @@ void Map_801A4F8C(void) { D_ctx_80178410 = 0; gGameState = GSTATE_GAME_OVER; D_ctx_80177868 = 0; - D_Timer_8017783C = 2; - gDrawMode = DRAWMODE_0; + gNextGameStateTimer = 2; + gDrawMode = DRAW_NONE; } void Map_801A4FC4(void) { @@ -3621,12 +3620,12 @@ void Map_801A4FC4(void) { for (i = 0; i < 6; i++) { gSavedTeamShields[i] = D_ctx_80177C58[i]; gTeamShields[i] = D_ctx_80177C58[i]; - D_ctx_80177C38[i] = D_ctx_80177C58[i]; + gPrevPlanetTeamShields[i] = D_ctx_80177C58[i]; } - for (i = 1; i < 4; i++) { - if (D_ctx_80177C38[i] == 0) { - D_ctx_80177C38[i] = 255; + for (i = TEAM_ID_FALCO; i <= TEAM_ID_PEPPY; i++) { + if (gPrevPlanetTeamShields[i] == 0) { + gPrevPlanetTeamShields[i] = 255; } } @@ -4273,12 +4272,12 @@ void Map_801A659C(void) { void Map_801A6628(void) { gGameState = GSTATE_PLAY; - D_Timer_8017783C = 2; - D_ctx_80177854 = 0; - gDrawMode = DRAWMODE_0; + gNextGameStateTimer = 2; + gPlayState = PLAY_STANDBY; + gDrawMode = DRAW_NONE; gHitCount = 0; - func_play_800A5844(); + Play_Setup(); D_ctx_80177CA0 = 0; D_ctx_80177CB0 = 0.0f; @@ -4350,16 +4349,16 @@ void Map_801A68E4(void) { void Map_801A6A24(void) { switch (D_menu_801CD960) { case 0: - if (D_ctx_80178340 != 0) { - D_ctx_80178340 -= 5; + if (gFillScreenAlpha != 0) { + gFillScreenAlpha -= 5; } else { D_menu_801CD960 = 255; } break; case 1: - if (D_ctx_80178340 != 255) { - D_ctx_80178340 += 15; + if (gFillScreenAlpha != 255) { + gFillScreenAlpha += 15; } else { D_menu_801CD960 = 255; } @@ -6570,7 +6569,7 @@ void Map_801AD11C(void) { D_menu_801CD944 = 6; D_menu_801CD94C = 0; } else { - for (i = 0; i < 6; i++) { + for (i = 0; i < TEAM_ID_MAX; i++) { D_ctx_80177C58[i] = gTeamShields[i]; } Map_801A659C(); diff --git a/src/overlays/ovl_menu/fox_option.c b/src/overlays/ovl_menu/fox_option.c index 2fb6801a..c7218244 100644 --- a/src/overlays/ovl_menu/fox_option.c +++ b/src/overlays/ovl_menu/fox_option.c @@ -5,6 +5,7 @@ */ #include "mods.h" +#include "prevent_bss_reordering.h" #include "global.h" #include "fox_option.h" #include "assets/ast_font.h" @@ -396,10 +397,10 @@ void Option_Setup(void) { } D_menu_801B91C8 = enableExpertModes; - D_ctx_80178348 = 0; - D_ctx_80178350 = 0; - D_ctx_80178354 = 0; - D_ctx_80178340 = 0; + gFillScreenRed = 0; + gFillScreenGreen = 0; + gFillScreenBlue = 0; + gFillScreenAlpha = 0; gBlurAlpha = 255; @@ -547,19 +548,19 @@ void Option_Init(void) { switch (gOptionMenuStatus) { case OPTION_WAIT: - if (D_Timer_8017783C == 0) { + if (gNextGameStateTimer == 0) { gOptionMenuStatus = OPTION_SETUP; Audio_SetAudioSpec(0, 23); } break; case OPTION_SETUP: - gDrawMode = DRAWMODE_0; + gDrawMode = DRAW_NONE; Option_Setup(); break; case OPTION_UPDATE: - gDrawMode = DRAWMODE_2; + gDrawMode = DRAW_OPTION; Option_UpdateEntry(); break; } @@ -691,7 +692,7 @@ void Option_InitEntry(void) { switch (D_menu_801B9124) { case OPTION_MAP: - gDrawMode = DRAWMODE_0; + gDrawMode = DRAW_NONE; break; case OPTION_POINT_MATCH: @@ -769,39 +770,39 @@ void Option_80192738(void) { } void Option_MapUpdate(void) { - if (D_ctx_80178340 == 255) { + if (gFillScreenAlpha == 255) { D_ctx_80178410 = 0; D_menu_801B9124 = 100; gGameState = GSTATE_MAP; - D_Timer_8017783C = 2; + gNextGameStateTimer = 2; D_ctx_80177B40 = 0; - gDrawMode = DRAWMODE_0; + gDrawMode = DRAW_NONE; gControllerLock = 3; } else { - D_ctx_80178340 += 32; - if (D_ctx_80178340 > 255) { - D_ctx_80178340 = 255; + gFillScreenAlpha += 32; + if (gFillScreenAlpha > 255) { + gFillScreenAlpha = 255; } } } void Option_TrainingUpdate(void) { - if (D_ctx_80178340 == 255) { + if (gFillScreenAlpha == 255) { gCurrentLevel = LEVEL_TRAINING; gGameState = GSTATE_PLAY; - D_Timer_8017783C = 2; - D_ctx_80177854 = 0; - gDrawMode = DRAWMODE_0; - func_play_800A5844(); + gNextGameStateTimer = 2; + gPlayState = PLAY_STANDBY; + gDrawMode = DRAW_NONE; + Play_Setup(); D_ctx_80177CA0 = 0; D_ctx_80177CB0 = 0.0f; D_ctx_8017782C = 1; gControllerLock = 3; Audio_SetAudioSpec(0, 28); } else { - D_ctx_80178340 += 32; - if (D_ctx_80178340 > 255) { - D_ctx_80178340 = 255; + gFillScreenAlpha += 32; + if (gFillScreenAlpha > 255) { + gFillScreenAlpha = 255; } } } @@ -1042,10 +1043,10 @@ void Option_MainMenuUpdate(void) { } else { D_ctx_80178410 = 0; gGameState = GSTATE_TITLE; - D_Timer_8017783C = 2; + gNextGameStateTimer = 2; D_ctx_80177AE0 = 0; D_menu_801B827C = 1; - gDrawMode = DRAWMODE_0; + gDrawMode = DRAW_NONE; D_menu_801B8280 = 0; D_menu_801B8284 = 0; gControllerLock = 3; @@ -1195,7 +1196,7 @@ void Option_VersusUpdate(void) { AUDIO_PLAY_SFX(0x49000021, gDefaultSfxSource, 4); D_menu_801B912C = 0; D_menu_801B9124 = 1000; - gDrawMode = DRAWMODE_0; + gDrawMode = DRAW_NONE; D_menu_801B9244 = 1; } break; @@ -1377,7 +1378,7 @@ void Option_SoundUpdate(void) { if (gControllerPress[gMainController].button & A_BUTTON) { AUDIO_PLAY_SFX(0x49000003, gDefaultSfxSource, 4); - D_menu_801B9288 = (D_menu_801B9288 + 1) & 3; + D_menu_801B9288 = (D_menu_801B9288 + 1) % 4U; } if (gControllerPress[gMainController].button & B_BUTTON) { @@ -1387,7 +1388,7 @@ void Option_SoundUpdate(void) { Audio_PlaySoundTest(D_menu_801B9284); } Save_Write(); - gDrawMode = DRAWMODE_0; + gDrawMode = DRAW_NONE; D_menu_801B9124 = 1000; D_menu_801B912C = 0; D_menu_801B9244 = 1; @@ -1665,7 +1666,7 @@ void Option_ExpertSoundUpdate(void) { if (!D_menu_801B9320) { AUDIO_PLAY_SFX(0x49000021, gDefaultSfxSource, 4); AUDIO_PLAY_BGM(SEQ_ID_MENU); - gDrawMode = DRAWMODE_0; + gDrawMode = DRAW_NONE; D_menu_801B9124 = 1000; D_menu_801B912C = 0; D_menu_801B9244 = 1; @@ -1761,7 +1762,7 @@ void Option_ExpertSoundDraw(void) { } } - Lib_Ortho(&gMasterDisp); + Lib_InitOrtho(&gMasterDisp); RCP_SetupDL(&gMasterDisp, 5); @@ -1787,7 +1788,7 @@ void Option_ExpertSoundDraw(void) { } Matrix_Pop(&gGfxMatrix); - Lib_Perspective(&gMasterDisp); + Lib_InitPerspective(&gMasterDisp); } void Option_DataInit(void) { @@ -1821,7 +1822,7 @@ void Option_DataUpdate(void) { if (D_menu_801B9330[D_menu_801B91C0]) { break; } - gDrawMode = DRAWMODE_0; + gDrawMode = DRAW_NONE; D_menu_801B9124 = 1000; D_menu_801B912C = 0; D_menu_801B9244 = 1; @@ -2053,7 +2054,7 @@ void Option_RankingUpdate(void) { if (gControllerPress[gMainController].button & B_BUTTON) { AUDIO_PLAY_SFX(0x49000021, gDefaultSfxSource, 4); - gDrawMode = DRAWMODE_0; + gDrawMode = DRAW_NONE; D_menu_801B9124 = 1000; D_menu_801B912C = 0; D_menu_801B9244 = 1; @@ -2443,7 +2444,7 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) { Matrix_LookAt(gGfxMatrix, 0.0f, 0.0f, 100.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1); Matrix_SetGfxMtx(&gMasterDisp); - Lib_Ortho(&gMasterDisp); + Lib_InitOrtho(&gMasterDisp); spFC = gSaveFile.save.data.unk_4A[arg0]; for (x = D_menu_801AF134, i = 0; i < arg2; i++, x += D_menu_801AF138) { @@ -2580,7 +2581,7 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) { D_menu_801AF130 += 0.1f; - Lib_Perspective(&gMasterDisp); + Lib_InitPerspective(&gMasterDisp); } static f32 D_menu_801AF13C = 0.7f; @@ -2974,9 +2975,9 @@ void Option_8019A214(void) { void Option_8019A298(void) { if (D_menu_801B91EC == 0.0f) { gGameState = GSTATE_VS_INIT; - D_Timer_8017783C = 2; + gNextGameStateTimer = 2; gOptionMenuStatus = OPTION_WAIT; - gDrawMode = DRAWMODE_0; + gDrawMode = DRAW_NONE; } } @@ -3447,7 +3448,7 @@ void Option_8019B7D4(void) { void Option_8019B8A0(s32 arg0) { D_menu_801B9124 = arg0; - gDrawMode = DRAWMODE_0; + gDrawMode = DRAW_NONE; D_menu_801B912C = 0; D_menu_801B91B4 = 0; } @@ -3469,7 +3470,7 @@ void Option_DrawMenuLabel(void) { void Option_DrawMenuCard(MenuContext_38 arg0) { RCP_SetupDL(&gMasterDisp, 0x11); - Lib_Ortho(&gMasterDisp); + Lib_InitOrtho(&gMasterDisp); Matrix_Push(&gGfxMatrix); @@ -3483,7 +3484,7 @@ void Option_DrawMenuCard(MenuContext_38 arg0) { Matrix_Pop(&gGfxMatrix); - Lib_Perspective(&gMasterDisp); + Lib_InitPerspective(&gMasterDisp); } void Option_DrawMenuArwing(ArwingPosition arg0) { @@ -3572,7 +3573,7 @@ void Option_8019BF34(void) { void Option_8019C04C(void) { RCP_SetupDL(&gMasterDisp, 0x24); - Lib_Ortho(&gMasterDisp); + Lib_InitOrtho(&gMasterDisp); Matrix_Push(&gGfxMatrix); @@ -3585,7 +3586,7 @@ void Option_8019C04C(void) { Matrix_Pop(&gGfxMatrix); - Lib_Perspective(&gMasterDisp); + Lib_InitPerspective(&gMasterDisp); } void Option_DrawCardLabel(OptionTexture arg0) { @@ -3899,7 +3900,7 @@ void Option_8019CAE0(void) { case 3: if (D_menu_801B917C == 0) { gBlurAlpha = 255; - gDrawMode = DRAWMODE_0; + gDrawMode = DRAW_NONE; D_menu_801B912C = 0; D_menu_801B9124 = 300; } @@ -4330,7 +4331,7 @@ void Option_8019DE74(void) { U_CBUTTONS)) { // START, A, B, C-UP, C-LEFT, C-DOWN AUDIO_PLAY_SFX(0x49000003, gDefaultSfxSource, 4); - gDrawMode = DRAWMODE_0; + gDrawMode = DRAW_NONE; D_menu_801B912C = 0; if (D_game_80161A34 == 5) { @@ -4359,10 +4360,10 @@ void Option_InvoiceUpdate(void) { case 0: D_ctx_80178410 = 0; gBgColor = 0; - D_ctx_80178348 = 0; - D_ctx_80178350 = 0; - D_ctx_80178354 = 0; - D_ctx_80178340 = 0; + gFillScreenRed = 0; + gFillScreenGreen = 0; + gFillScreenBlue = 0; + gFillScreenAlpha = 0; D_menu_801B9090 = 0; D_menu_801B9178 = 30; D_menu_801B912C++; @@ -4396,7 +4397,7 @@ void Option_InvoiceUpdate(void) { if (D_menu_801B9178 == 0) { D_ctx_80178410 = 0; gGameState = GSTATE_INIT; - gDrawMode = DRAWMODE_0; + gDrawMode = DRAW_NONE; *gLifeCount = 2; gTotalHits = 0; } diff --git a/src/overlays/ovl_menu/fox_title.c b/src/overlays/ovl_menu/fox_title.c index 156708de..182912e5 100644 --- a/src/overlays/ovl_menu/fox_title.c +++ b/src/overlays/ovl_menu/fox_title.c @@ -3,7 +3,7 @@ * System: Title * Description: Starfox Title Handler */ -#include "prevent_bss_reordering.h" +// #include "prevent_bss_reordering.h" #include "global.h" #include "fox_title.h" #include "assets/ast_title.h" @@ -173,10 +173,10 @@ void Title_801875E0(void) { gMainController = Title_80187ABC(); - D_ctx_80178348 = 0; - D_ctx_80178350 = 0; - D_ctx_80178354 = 0; - D_ctx_80178340 = 0; + gFillScreenRed = 0; + gFillScreenGreen = 0; + gFillScreenBlue = 0; + gFillScreenAlpha = 0; gFogRed = 0; gFogGreen = 0; @@ -218,19 +218,19 @@ void Title_801875E0(void) { void Title_80187754(void) { switch (D_ctx_80177AE0) { case 0: - if (D_Timer_8017783C == 0) { - gDrawMode = DRAWMODE_0; + if (gNextGameStateTimer == 0) { + gDrawMode = DRAW_NONE; D_ctx_80177AE0 = 1; } break; case 1: - gDrawMode = DRAWMODE_0; + gDrawMode = DRAW_NONE; Title_801875E0(); break; case 2: - gDrawMode = DRAWMODE_1; + gDrawMode = DRAW_TITLE; Title_801877F0(); break; } @@ -334,10 +334,10 @@ void Title_801878D8(void) { } if (D_menu_801B8284 != 0) { - D_ctx_80178340 = 0; - D_ctx_80178348 = 0; - D_ctx_80178350 = 0; - D_ctx_80178354 = 0; + gFillScreenAlpha = 0; + gFillScreenRed = 0; + gFillScreenGreen = 0; + gFillScreenBlue = 0; func_fade_80084688(2, D_menu_801B8284); } } @@ -378,7 +378,7 @@ void Title_80187B00(void) { D_ctx_80178410 = 0; gRadioState = 0; D_menu_801B82C0 = 0; - gDrawMode = DRAWMODE_0; + gDrawMode = DRAW_NONE; Audio_SetAudioSpec(0, 0x16); D_menu_801B82C4 = 1; } @@ -389,7 +389,7 @@ void Title_80187B00(void) { break; } - if ((D_menu_801B82A8 == 0) && ((gGameFrameCount & 7) == 7) && (D_menu_801B8288 < 10)) { + if ((D_menu_801B82A8 == 0) && ((gGameFrameCount % 8U) == 7) && (D_menu_801B8288 < 10)) { D_menu_801B8288++; } } @@ -536,10 +536,10 @@ void Title_801881FC(void) { D_menu_801B9060 = 242.0f; D_menu_801B9064 = 100.0f; - D_ctx_80178340 = 0; - D_ctx_80178348 = 0; - D_ctx_80178350 = 0; - D_ctx_80178354 = 0; + gFillScreenAlpha = 0; + gFillScreenRed = 0; + gFillScreenGreen = 0; + gFillScreenBlue = 0; D_menu_801B86A8 = 0.0f; D_menu_801B86AC = 0.0f; @@ -861,7 +861,7 @@ void Title_801888E8(void) { D_menu_801B82C0 = 0; - gDrawMode = DRAWMODE_0; + gDrawMode = DRAW_NONE; D_menu_801B82C4 = 7; } @@ -923,10 +923,10 @@ void Title_801894E8(void) { } D_menu_801B869C = 255; - D_ctx_80178340 = 255; - D_ctx_80178348 = 0; - D_ctx_80178350 = 0; - D_ctx_80178354 = 0; + gFillScreenAlpha = 255; + gFillScreenRed = 0; + gFillScreenGreen = 0; + gFillScreenBlue = 0; D_menu_801B9070 = 110.0f; D_menu_801B9074 = 70.0f; @@ -1011,8 +1011,8 @@ void Title_8018994C(void) { break; case 100: - if (D_ctx_80178340 != 0) { - D_ctx_80178340 -= 5; + if (gFillScreenAlpha != 0) { + gFillScreenAlpha -= 5; } else { D_menu_801B82A8 = 19; D_menu_801B82C0 = 1; @@ -1045,7 +1045,7 @@ void Title_8018994C(void) { D_menu_801B82D0 = 0.02f; D_menu_801B82C0++; D_menu_801B7BD8 = 1; - D_ctx_80178340 = 0; + gFillScreenAlpha = 0; } } } @@ -1167,20 +1167,20 @@ void Title_8018994C(void) { } if (D_menu_801B82B4 == 750) { - D_ctx_80178340 = 0; - D_ctx_80178348 = 0; - D_ctx_80178350 = 0; - D_ctx_80178354 = 0; + gFillScreenAlpha = 0; + gFillScreenRed = 0; + gFillScreenGreen = 0; + gFillScreenBlue = 0; D_menu_801B869C = 1; } - if (D_ctx_80178340 == 255) { + if (gFillScreenAlpha == 255) { Audio_KillSfxBySourceAndId(D_menu_801B8658.unk_24, 0x11030010); Audio_KillSfxBySourceAndId(D_menu_801B8658.unk_24, 0x31024059); D_menu_801B82C0 = 0; - gDrawMode = DRAWMODE_0; + gDrawMode = DRAW_NONE; D_menu_801B82C4 = 2; } @@ -1211,10 +1211,10 @@ void Title_8018A338(void) { D_menu_801B869C = 255; - D_ctx_80178340 = 255; - D_ctx_80178348 = 0; - D_ctx_80178350 = 0; - D_ctx_80178354 = 0; + gFillScreenAlpha = 255; + gFillScreenRed = 0; + gFillScreenGreen = 0; + gFillScreenBlue = 0; D_menu_801B8344 = 0; D_menu_801B8334 = 0; @@ -1379,7 +1379,7 @@ void Title_8018A644(void) { D_menu_801B82C0 = 0; - gDrawMode = DRAWMODE_0; + gDrawMode = DRAW_NONE; D_menu_801B82C4 = 3; } @@ -1410,9 +1410,9 @@ void Title_8018A990(void) { { 255.0f, 255.0f, 155.0f }, }; - if ((gGameFrameCount & 7) == 7) { + if ((gGameFrameCount % 8U) == 7) { if (D_menu_801B8338 != 0) { - D_menu_801B8334 = (D_menu_801B8334 + 1) & 3; + D_menu_801B8334 = (D_menu_801B8334 + 1) % 4U; D_menu_801B8328 = D_menu_801ADF54[D_menu_801B8334].unk_0; D_menu_801B832C = D_menu_801ADF54[D_menu_801B8334].unk_4; D_menu_801B8330 = D_menu_801ADF54[D_menu_801B8334].unk_8; @@ -1424,7 +1424,7 @@ void Title_8018A990(void) { D_menu_801B8338 ^= 1; } - if (gGameFrameCount & 1) { + if ((gGameFrameCount % 2) != 0) { D_menu_801B86CC += 30.0f; if (D_menu_801B86CC > 90.0f) { D_menu_801B86CC = -90.0f; @@ -1455,10 +1455,10 @@ void Title_8018ABC0(void) { D_menu_801B869C = 255; - D_ctx_80178340 = 0; - D_ctx_80178348 = 0; - D_ctx_80178350 = 0; - D_ctx_80178354 = 0; + gFillScreenAlpha = 0; + gFillScreenRed = 0; + gFillScreenGreen = 0; + gFillScreenBlue = 0; gLight1R = 101; gLight1G = 106; gLight1B = 92; @@ -1512,11 +1512,11 @@ void Title_8018ACEC(void) { D_menu_801B869C = 1; } - if (D_ctx_80178340 == 255) { + if (gFillScreenAlpha == 255) { Audio_KillSfxBySourceAndId(D_menu_801B8658.unk_24, 0x11030010); Audio_KillSfxBySourceAndId(D_menu_801B8658.unk_24, 0x31024059); - gDrawMode = DRAWMODE_0; + gDrawMode = DRAW_NONE; D_menu_801B82C0 = 0; D_menu_801B82C4 = 4; @@ -1570,10 +1570,10 @@ void Title_8018B058(void) { D_menu_801B869C = 255; - D_ctx_80178340 = 0; - D_ctx_80178348 = 255; - D_ctx_80178350 = 255; - D_ctx_80178354 = 255; + gFillScreenAlpha = 0; + gFillScreenRed = 255; + gFillScreenGreen = 255; + gFillScreenBlue = 255; D_ctx_80178410 = 0; D_menu_801B8334 = 0; @@ -1795,15 +1795,15 @@ void Title_8018B5C4(void) { gLight1B = D_menu_801B82F4; } - if ((D_menu_801B82B4 > 60) && (D_ctx_80178340 < 255)) { - D_ctx_80178340++; + if ((D_menu_801B82B4 > 60) && (gFillScreenAlpha < 255)) { + gFillScreenAlpha++; } - if (D_ctx_80178340 == 128) { + if (gFillScreenAlpha == 128) { D_menu_801B82A8 = 7; D_menu_801B84E8[3].unk_3C = 0; D_menu_801B84E8[3].unk_40 = 0; - D_ctx_80178340 = 255; + gFillScreenAlpha = 255; D_menu_801B82C0++; } @@ -1831,7 +1831,7 @@ void Title_8018B5C4(void) { D_menu_801B82A8 = 4; - D_ctx_80178340 = 0; + gFillScreenAlpha = 0; for (i = 0; i < 4; i++) { D_menu_801B84E8[i].unk_3C = 1; @@ -1924,10 +1924,10 @@ void Title_8018C1C0(void) { D_menu_801B869C = 255; - D_ctx_80178340 = 0; - D_ctx_80178348 = 0; - D_ctx_80178350 = 0; - D_ctx_80178354 = 0; + gFillScreenAlpha = 0; + gFillScreenRed = 0; + gFillScreenGreen = 0; + gFillScreenBlue = 0; D_menu_801B8688.pos.x = 130.0f; D_menu_801B8688.pos.y = -30.0f; @@ -2078,7 +2078,7 @@ void Title_8018C644(void) { D_menu_801B869C = 1; } - if (D_ctx_80178340 == 255) { + if (gFillScreenAlpha == 255) { Audio_KillSfxBySourceAndId(D_menu_801B8658.unk_24, 0x11030010); Audio_KillSfxBySourceAndId(D_menu_801B8658.unk_24, 0x31024059); D_menu_801B82C0++; @@ -2088,7 +2088,7 @@ void Title_8018C644(void) { break; case 2: - D_ctx_80178340 = 0; + gFillScreenAlpha = 0; D_ctx_80178410 = 0; D_menu_801B86A0 = 0; D_menu_801B82A8 = 20; @@ -2100,7 +2100,7 @@ void Title_8018C644(void) { break; } D_menu_801B82C0 = 0; - gDrawMode = DRAWMODE_0; + gDrawMode = DRAW_NONE; D_menu_801B82C4 = 0; Audio_SetAudioSpec(0, 23); break; @@ -2306,7 +2306,7 @@ void Title_8018D510(s32 arg0) { var_fv0 = D_menu_801B84E8[arg0].unk_44; - if (gGameFrameCount & 1) { + if ((gGameFrameCount % 2) != 0) { var_fv0 += var_fv1; } @@ -2967,7 +2967,7 @@ static s32 D_menu_801AE528[] = { void Title_8018FF74(void) { if (D_menu_801B7BD8 != 0) { - if ((D_menu_801B7BB8 > -870.0f) && (D_menu_801B7BB8 < 900.0f) && (D_ctx_80178340 > 0)) { + if ((D_menu_801B7BB8 > -870.0f) && (D_menu_801B7BB8 < 900.0f) && (gFillScreenAlpha > 0)) { if ((D_menu_801B7BB8 < 0.0f) && (D_menu_801B7BD0 < 255)) { D_menu_801B7BD0 += 2; } @@ -2997,8 +2997,8 @@ void Title_8018FF74(void) { void Title_80190144(void) { s32 i; - if (D_ctx_80178340 > 0) { - D_ctx_80178340 -= 4; + if (gFillScreenAlpha > 0) { + gFillScreenAlpha -= 4; } D_ctx_801783D0 = D_menu_801B7BB8; @@ -3006,17 +3006,17 @@ void Title_80190144(void) { if (D_ctx_801783D0 < 950.0f) { if (D_ctx_801783D0 > -900.0f) { - D_ctx_80178340 += 8; - if (D_ctx_80178340 > 60) { - D_ctx_80178340 = 60; + gFillScreenAlpha += 8; + if (gFillScreenAlpha > 60) { + gFillScreenAlpha = 60; } - D_ctx_80178348 = 208; - D_ctx_80178350 = 208; - D_ctx_80178354 = 208; + gFillScreenRed = 208; + gFillScreenGreen = 208; + gFillScreenBlue = 208; } } - if (D_ctx_80178340 > 0) { + if (gFillScreenAlpha > 0) { RCP_SetupDL(&gMasterDisp, 0x3E); gDPSetAlphaDither(gMasterDisp++, G_AD_NOISE); @@ -3053,13 +3053,13 @@ void Title_801903B8(void) { gDPSetAlphaDither(gMasterDisp++, G_AD_NOISE); gDPSetColorDither(gMasterDisp++, G_CD_NOISE); - if (D_ctx_80178340 > 0) { + if (gFillScreenAlpha > 0) { temp_fs3 = D_ctx_801783D0 * -0.03f; temp_fs4 = D_ctx_801783D4 * 0.03f; var_fs1 = 1.0f; - if (D_ctx_80178340 < 10) { - var_fs1 = D_ctx_80178340 / 10.0f; + if (gFillScreenAlpha < 10) { + var_fs1 = gFillScreenAlpha / 10.0f; } var_fs1 *= 0.5f; @@ -3218,7 +3218,7 @@ void Title_80190EA4(void) { D_ctx_80178410 = 0; gRadioState = 0; D_menu_801B82C0 = 0; - gDrawMode = DRAWMODE_0; + gDrawMode = DRAW_NONE; D_menu_801B82C4 = 0; gControllerLock = 30; D_menu_801B8284 = 0; @@ -3248,9 +3248,9 @@ void Title_80190FD0(void) { D_menu_801B8284 += 18; } else { gGameState = GSTATE_MENU; - D_Timer_8017783C = 2; + gNextGameStateTimer = 2; gOptionMenuStatus = OPTION_WAIT; - gDrawMode = DRAWMODE_0; + gDrawMode = DRAW_NONE; D_ctx_80178410 = 0; D_menu_801B8280 = 0; D_menu_801B8284 = 0; @@ -3294,17 +3294,17 @@ void Title_8019111C(void) { void Title_801912A0(void) { switch (D_menu_801B869C) { case 0: - D_ctx_80178340 -= 4; - if (D_ctx_80178340 < 0) { - D_ctx_80178340 = 0; + gFillScreenAlpha -= 4; + if (gFillScreenAlpha < 0) { + gFillScreenAlpha = 0; D_menu_801B869C = 255; } break; case 1: - D_ctx_80178340 += 15; - if (D_ctx_80178340 > 255) { - D_ctx_80178340 = 255; + gFillScreenAlpha += 15; + if (gFillScreenAlpha > 255) { + gFillScreenAlpha = 255; D_menu_801B869C = 255; } break; diff --git a/src/sys/sys_lib.c b/src/sys/sys_lib.c index ffb3cb91..a4f8e1b5 100644 --- a/src/sys/sys_lib.c +++ b/src/sys/sys_lib.c @@ -81,7 +81,7 @@ void Lib_QuickSort(u8* first, u32 length, u32 size, CompareFunc cFunc) { } } -void Lib_Perspective(Gfx** dList) { +void Lib_InitPerspective(Gfx** dList) { u16 norm; guPerspective(gGfxMtx, &norm, D_game_80161A3C, (f32) SCREEN_WIDTH / SCREEN_HEIGHT, D_game_80161A40, D_game_80161A44, @@ -93,7 +93,7 @@ void Lib_Perspective(Gfx** dList) { Matrix_Copy(gGfxMatrix, &gIdentityMatrix); } -void Lib_Ortho(Gfx** dList) { +void Lib_InitOrtho(Gfx** dList) { guOrtho(gGfxMtx, -160.0f, 160.0f, -120.0f, 120.0f, D_game_80161A40, D_game_80161A44, 1.0f); gSPMatrix((*dList)++, 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); diff --git a/src/sys/sys_math.c b/src/sys/sys_math.c index 5e9c8591..a4ff84d9 100644 --- a/src/sys/sys_math.c +++ b/src/sys/sys_math.c @@ -1,4 +1,5 @@ #include "sys.h" +#include "prevent_bss_reordering.h" s32 sSeededRandSeed3; s32 sRandSeed1; diff --git a/tools/Torch b/tools/Torch index ad667b70..d84559b0 160000 --- a/tools/Torch +++ b/tools/Torch @@ -1 +1 @@ -Subproject commit ad667b705dad3476a1ae803f23588c55baab2ee4 +Subproject commit d84559b0fbe2f44598fb1323494f7acd1bd82e03 From aca27d7cdead24297d6b1fd42d3b2768c5f85bf1 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Mon, 8 Apr 2024 19:43:10 -0300 Subject: [PATCH 013/151] fix robot vertices --- assets/yaml/us/ast_allies.yaml | 3 +++ tools/Torch | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/assets/yaml/us/ast_allies.yaml b/assets/yaml/us/ast_allies.yaml index 4b68f3d9..d30fbd17 100644 --- a/assets/yaml/us/ast_allies.yaml +++ b/assets/yaml/us/ast_allies.yaml @@ -101,6 +101,9 @@ D_D00B870: D_D00B880: { type: GFX, offset: 0xD00B880, symbol: D_D00B880 } +ast_allies_seg13_vtx_BB70: + { type: VTX, count: 144, offset: 0xD00BB70, symbol: ast_allies_seg13_vtx_BB70 } + D_D00C470: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0xD00C470, symbol: D_D00C470 } diff --git a/tools/Torch b/tools/Torch index d84559b0..b1d39534 160000 --- a/tools/Torch +++ b/tools/Torch @@ -1 +1 @@ -Subproject commit d84559b0fbe2f44598fb1323494f7acd1bd82e03 +Subproject commit b1d39534f3ee1f04601cdadffbc8a96bcbf0b4a6 From bb9b0eb24ce618de96ac8680358005234cadc25a Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Mon, 8 Apr 2024 20:50:40 -0300 Subject: [PATCH 014/151] fix robot vtx (this time for real) --- assets/yaml/us/ast_sector_x.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/assets/yaml/us/ast_sector_x.yaml b/assets/yaml/us/ast_sector_x.yaml index 0fcc5178..97cd69c7 100644 --- a/assets/yaml/us/ast_sector_x.yaml +++ b/assets/yaml/us/ast_sector_x.yaml @@ -58,6 +58,9 @@ D_SX_60028C0: D_SX_6002AC0: { type: GFX, offset: 0x6002AC0, symbol: D_SX_6002AC0 } +ast_sector_x_seg6_vtx_2E88: + { type: VTX, count: 134, offset: 0x6002E88, symbol: ast_sector_x_seg6_vtx_2E88 } + D_SX_60036E8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60036E8, symbol: D_SX_60036E8 } From f63251d512bfe94d9c73e2397ffba694b27ffb70 Mon Sep 17 00:00:00 2001 From: inspectredc <78732756+inspectredc@users.noreply.github.com> Date: Tue, 9 Apr 2024 05:08:20 +0100 Subject: [PATCH 015/151] Match Aquas_801AFA5C (#205) --- src/overlays/ovl_i3/fox_aq.c | 34 +++++++++++----------------------- 1 file changed, 11 insertions(+), 23 deletions(-) diff --git a/src/overlays/ovl_i3/fox_aq.c b/src/overlays/ovl_i3/fox_aq.c index a6077f16..ec3fd551 100644 --- a/src/overlays/ovl_i3/fox_aq.c +++ b/src/overlays/ovl_i3/fox_aq.c @@ -220,20 +220,14 @@ f32 D_i3_801BFBB0[3] = { 20.0f, 10.0f, 15.0f }; f32 D_i3_801BFBBC[3] = { 8.0f, 27.0f, 42.0f }; f32 D_i3_801BFBC8[3] = { 15.0f, 6.0f, 7.0f }; f32 D_i3_801BFBD4[3] = { 358.0f, 12.0f, 352.0f }; -f32 D_i3_801BFBE0[3][4] = { - { 1.3f, 0.1f, 1.0f, 777.0f }, - { 0.7f, 0.5f, 5.0f, 777.0f }, - { 1.0f, 0.2f, 2.0f, 777.0f }, +f32 D_i3_801BFBE0[12] = { + 1.3f, 0.1f, 1.0f, 777.0f, 0.7f, 0.5f, 5.0f, 777.0f, 1.0f, 0.2f, 2.0f, 777.0f, }; -f32 D_i3_801BFC10[3][4] = { - { 0.6f, 0.1f, 1.0f, 777.0f }, - { 1.5f, 0.5f, 5.0f, 777.0f }, - { 1.0f, 0.2f, 2.0f, 777.0f }, +f32 D_i3_801BFC10[12] = { + 0.6f, 0.1f, 1.0f, 777.0f, 1.5f, 0.5f, 5.0f, 777.0f, 1.0f, 0.2f, 2.0f, 777.0f, }; -f32 D_i3_801BFC40[3][4] = { - { 1.3f, 0.1f, 1.0f, 777.0f }, - { 0.7f, 0.5f, 5.0f, 777.0f }, - { 1.0f, 0.2f, 2.0f, 777.0f }, +f32 D_i3_801BFC40[12] = { + 1.3f, 0.1f, 1.0f, 777.0f, 0.7f, 0.5f, 5.0f, 777.0f, 1.0f, 0.2f, 2.0f, 777.0f, }; s32 D_i3_801BFC70[3] = { 18, 22, 45 }; f32 D_i3_801BFC7C[3] = { 20.0f, 10.0f, 0.0f }; @@ -2097,9 +2091,7 @@ void Aquas_801AF9FC(Actor* actor) { actor->obj.rot.x = D_i3_801BFBBC[temp] + D_i3_801C4308[10]; } -#ifdef NON_MATCHING -// saved register use at start of case 3 -// https://decomp.me/scratch/gNkkb +// OBJ_ACTOR_257 action void Aquas_801AFA5C(Actor* actor) { s32 i; f32 sp70; @@ -2182,12 +2174,12 @@ void Aquas_801AFA5C(Actor* actor) { } break; case 3: - i = actor->iwork[2]; - Math_SmoothStepToF(&actor->fwork[0], D_i3_801BFBE0[i][0], D_i3_801BFBE0[i][1], D_i3_801BFBE0[i][2], + i = actor->iwork[2] * 4; + Math_SmoothStepToF(&actor->fwork[0], D_i3_801BFBE0[i], D_i3_801BFBE0[i + 1], D_i3_801BFBE0[i + 2], 0.00001f); - Math_SmoothStepToF(&actor->fwork[1], D_i3_801BFC10[i][0], D_i3_801BFC10[i][1], D_i3_801BFC10[i][2], + Math_SmoothStepToF(&actor->fwork[1], D_i3_801BFC10[i], D_i3_801BFC10[i + 1], D_i3_801BFC10[i + 2], 0.00001f); - Math_SmoothStepToF(&actor->fwork[2], D_i3_801BFC40[i][0], D_i3_801BFC40[i][1], D_i3_801BFC40[i][2], + Math_SmoothStepToF(&actor->fwork[2], D_i3_801BFC40[i], D_i3_801BFC40[i + 1], D_i3_801BFC40[i + 2], 0.00001f); actor->iwork[1]++; i = actor->iwork[3] - 1; @@ -2317,10 +2309,6 @@ void Aquas_801AFA5C(Actor* actor) { actor->fwork[5] = SIN_DEG(actor->timer_0BE * 20.0f) * Aquas_801A958C(actor->timer_0BE, 20.0f); } } -#else -// OBJ_ACTOR_257 action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/fox_aq/Aquas_801AFA5C.s") -#endif // OBJ_ACTOR_257 draw void Aquas_801B099C(Actor* actor) { From eeea74e45492014e48d2d3f93dca7904f5a30176 Mon Sep 17 00:00:00 2001 From: inspectredc <78732756+inspectredc@users.noreply.github.com> Date: Wed, 10 Apr 2024 13:22:43 +0100 Subject: [PATCH 016/151] Match Zoness_80194A84 (#206) --- src/overlays/ovl_i3/fox_zo.c | 99 ++++++++++++++++-------------------- 1 file changed, 43 insertions(+), 56 deletions(-) diff --git a/src/overlays/ovl_i3/fox_zo.c b/src/overlays/ovl_i3/fox_zo.c index 64135e95..fb386789 100644 --- a/src/overlays/ovl_i3/fox_zo.c +++ b/src/overlays/ovl_i3/fox_zo.c @@ -1995,12 +1995,7 @@ f32 D_i3_801BF6C4[2] = { 330.0f, 30.0f }; f32 D_i3_801BF6CC[2] = { 250.0f, -250.0f }; f32 D_i3_801BF6D4[2] = { 330.0f, 30.0f }; -#ifdef NON_MATCHING -// loop iterator problems with noted loops -// float ordering in the boss health bar calculation -// incorrect loading of sZoLimbTimers -// compiler stack too large -// https://decomp.me/scratch/jNmle +// OBJ_BOSS_ZO action void Zoness_80194A84(Boss* bossZO) { f32 sp134; s32 sp130; @@ -2018,8 +2013,8 @@ void Zoness_80194A84(Boss* bossZO) { f32 sp100; f32 spFC; s32 dmgType; - s32 pad1; - s32 pad2; + f32 padF4; + s32 j; Vec3f spE4; Vec3f spD8; Vec3f spCC; @@ -2043,7 +2038,7 @@ void Zoness_80194A84(Boss* bossZO) { Math_SmoothStepToF(&bossZO->obj.pos.z, gPlayer[0].camEye.z - D_ctx_80177D20 + sZoFwork[ZO_BSF_28], 0.1f, sZoFwork[ZO_BSF_27], 0.00001f); } - if (((gGameFrameCount % 4) == 0)) { + if ((gGameFrameCount % 4U) == 0) { if ((bossZO->obj.rot.y <= 90.0f) || (bossZO->obj.rot.y >= 270.0f)) { sZoSwork[ZO_BSS_43] = bossZO->obj.rot.y; if (sZoSwork[ZO_BSS_43] > 270) { @@ -2113,7 +2108,7 @@ void Zoness_80194A84(Boss* bossZO) { case 0: if ((((gGameFrameCount % 8) == 0) || (bossZO->timer_050 == 43)) && (bossZO->swork[ZO_SWK_13] == 0) && ((bossZO->swork[ZO_SWK_12] < 7) || (bossZO->timer_050 == 43))) { - D_ctx_801779A8[0] = 20.0f; + D_ctx_801779A8[0] = 20; if (func_play_800A73E4(&sp134, &sp130, sZoFwork[ZO_BSF_43_X], sZoFwork[ZO_BSF_43_Y] - 300.0f, sZoFwork[ZO_BSF_43_Z])) { sp100 = 1.5f; @@ -2138,7 +2133,7 @@ void Zoness_80194A84(Boss* bossZO) { } } if ((bossZO->timer_050 < 43) && (bossZO->timer_050 >= 31)) { - D_ctx_801779A8[0] = 20.0f; + D_ctx_801779A8[0] = 20; } Math_SmoothStepToF(&bossZO->fwork[ZO_FWK_4], 1.0f, 0.1f, 10.0f, 0.0f); if (bossZO->timer_050 == 0) { @@ -2276,12 +2271,11 @@ void Zoness_80194A84(Boss* bossZO) { } bossZO->fwork[ZO_FWK_5] += 4.0f; bossZO->vel.x = COS_DEG(bossZO->fwork[ZO_FWK_5]) * 40.0f; - Math_SmoothStepToAngle( - &bossZO->fwork[ZO_FWK_7], - Math_RadToDeg(Math_Atan2F(bossZO->fwork[ZO_FWK_6] - bossZO->obj.pos.x, - gPlayer[0].camEye.z - D_ctx_80177D20 + - D_i3_801BF6BC[bossZO->swork[ZO_SWK_1]] - bossZO->obj.pos.z)), - 0.1f, 100.0f, 0.001f); + padF4 = Math_Atan2F(bossZO->fwork[ZO_FWK_6] - bossZO->obj.pos.x, + gPlayer[0].camEye.z - D_ctx_80177D20 + D_i3_801BF6BC[bossZO->swork[ZO_SWK_1]] - + bossZO->obj.pos.z); + padF4 = Math_RadToDeg(padF4); + Math_SmoothStepToAngle(&bossZO->fwork[ZO_FWK_7], padF4, 0.1f, 100.0f, 0.001f); Matrix_RotateY(gCalcMatrix, bossZO->fwork[ZO_FWK_7] * M_DTOR, 0); spE4.x = spE4.y = 0.0f; spE4.z = 20.0f; @@ -2306,8 +2300,10 @@ void Zoness_80194A84(Boss* bossZO) { spE4.y = gPlayer[0].pos.y - sZoFwork[ZO_BSF_93_Y]; spE4.z = gPlayer[0].unk_138 - sZoFwork[ZO_BSF_93_Z]; Matrix_MultVec3f(gCalcMatrix, &spE4, &spC0); - sp10C = Math_RadToDeg(Math_Atan2F(spC0.x, spC0.z)); - sp110 = Math_RadToDeg(-Math_Atan2F(spC0.y, sqrtf(SQ(spC0.x) + SQ(spC0.z)))); + sp10C = Math_Atan2F(spC0.x, spC0.z); + sp10C = Math_RadToDeg(sp10C); + sp110 = Math_Atan2F(spC0.y, sqrtf(SQ(spC0.x) + SQ(spC0.z))); + sp110 = Math_RadToDeg(-sp110); if ((sp10C > 40.0f) && (sp10C < 180.0f)) { sp10C = 40.0f; } @@ -2324,8 +2320,10 @@ void Zoness_80194A84(Boss* bossZO) { spE4.y = gPlayer[0].pos.y - sZoFwork[ZO_BSF_96_Y]; spE4.z = gPlayer[0].unk_138 - sZoFwork[ZO_BSF_96_Z]; Matrix_MultVec3f(gCalcMatrix, &spE4, &spB4); - sp104 = Math_RadToDeg(Math_Atan2F(spB4.x, spB4.z)); - sp108 = Math_RadToDeg(-Math_Atan2F(spB4.y, sqrtf(SQ(spB4.x) + SQ(spB4.z)))); + sp104 = Math_Atan2F(spB4.x, spB4.z); + sp104 = Math_RadToDeg(sp104); + sp108 = Math_Atan2F(spB4.y, sqrtf(SQ(spB4.x) + SQ(spB4.z))); + sp108 = Math_RadToDeg(-sp108); if ((sp104 > 40.0f) && (sp104 < 180.0f)) { sp104 = 40.0f; } @@ -2451,7 +2449,7 @@ void Zoness_80194A84(Boss* bossZO) { } break; case 6: - D_ctx_801779A8[0] = 20.0f; + D_ctx_801779A8[0] = 20; if (gCameraShake == 0) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; gFillScreenAlpha = gFillScreenAlphaTarget = 255; @@ -2462,7 +2460,7 @@ void Zoness_80194A84(Boss* bossZO) { if (gCameraShake == 29) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 0; } - if (((gGameFrameCount % 4) == 0)) { + if ((gGameFrameCount % 4U) == 0) { spE4.x = RAND_FLOAT_CENTERED(300.0f) + bossZO->obj.pos.x; spE4.y = RAND_FLOAT_CENTERED(200.0f) + (bossZO->obj.pos.y + 600.0f); spE4.z = bossZO->obj.pos.z - 50.0f; @@ -2516,7 +2514,7 @@ void Zoness_80194A84(Boss* bossZO) { } break; case 7: - D_ctx_801779A8[0] = 20.0f; + D_ctx_801779A8[0] = 20; if (((gGameFrameCount % 8) == 0) && (func_play_800A73E4(&sp134, &sp130, bossZO->obj.pos.x, -300.0f, bossZO->obj.pos.z) != 0)) { func_effect_8008377C(RAND_FLOAT_CENTERED(500.0f) + bossZO->obj.pos.x, sp134 - 300.0f, @@ -2587,7 +2585,6 @@ void Zoness_80194A84(Boss* bossZO) { sZoFwork[ZO_BSF_15] = sZoFwork[ZO_BSF_16] = 0.0f; sZoSwork[ZO_BSS_18] = 0; - sZoFwork[ZO_BSF_16]; for (i = 0; i < 2; i++) { Zoness_80199394(bossZO, i); } @@ -2629,14 +2626,18 @@ void Zoness_80194A84(Boss* bossZO) { spE4.y = gPlayer[0].pos.y - (bossZO->obj.pos.y + spD8.y); spE4.z = gPlayer[0].unk_138 - (bossZO->obj.pos.z + spD8.z); Matrix_MultVec3f(gCalcMatrix, &spE4, &spD8); - sp11C = Math_RadToDeg(Math_Atan2F(spD8.x, spD8.z)); - sp120 = Math_RadToDeg(-Math_Atan2F(spD8.y, sqrtf(SQ(spD8.x) + SQ(spD8.z)))); + sp11C = Math_Atan2F(spD8.x, spD8.z); + sp11C = Math_RadToDeg(sp11C); + sp120 = Math_Atan2F(spD8.y, sqrtf(SQ(spD8.x) + SQ(spD8.z))); + sp120 = Math_RadToDeg(-sp120); spE4.x = gPlayer[0].pos.x - (bossZO->obj.pos.x + spCC.x); spE4.y = gPlayer[0].pos.y - (bossZO->obj.pos.y + spCC.y); spE4.z = gPlayer[0].unk_138 - (bossZO->obj.pos.z + spCC.z); Matrix_MultVec3f(gCalcMatrix, &spE4, &spCC); - sp114 = Math_RadToDeg(Math_Atan2F(spCC.x, spCC.z)); - sp118 = Math_RadToDeg(-Math_Atan2F(spCC.y, sqrtf(SQ(spCC.x) + SQ(spCC.z)))); + sp114 = Math_Atan2F(spCC.x, spCC.z); + sp114 = Math_RadToDeg(sp114); + sp118 = Math_Atan2F(spCC.y, sqrtf(SQ(spCC.x) + SQ(spCC.z))); + sp118 = Math_RadToDeg(-sp118); Math_SmoothStepToAngle(&sZoFwork[ZO_BSF_15], sp11C, 0.2f, 2.0f, 0.0f); Math_SmoothStepToAngle(&sZoFwork[ZO_BSF_5], sp120, 0.2f, 2.0f, 0.0f); Math_SmoothStepToAngle(&sZoFwork[ZO_BSF_16], sp114, 0.2f, 2.0f, 0.0f); @@ -2667,6 +2668,7 @@ void Zoness_80194A84(Boss* bossZO) { if ((func_play_800A73E4(&sp134, &sp130, sZoFwork[ZO_BSF_43_X], sZoFwork[ZO_BSF_43_Y] - 100.0f, sZoFwork[ZO_BSF_43_Z]) != 0) && (sZoSwork[ZO_BSS_45] == 0)) { + if (gPlayer) {} func_effect_8008377C(sZoFwork[ZO_BSF_43_X], sp134, sZoFwork[ZO_BSF_43_Z] + 30.0f, 0.0f, 2.0f); sZoSwork[ZO_BSS_45]++; } @@ -2707,7 +2709,7 @@ void Zoness_80194A84(Boss* bossZO) { } } if ((sZoSwork[ZO_BSS_13] < 2) && (sZoLimbTimers[ZO_LIMB_5] != LIMB_DESTROYED)) { - D_ctx_801779A8[0] = 20.0f; + D_ctx_801779A8[0] = 20; if (((gGameFrameCount % 2) == 0)) { func_effect_8007D0E0(sZoFwork[ZO_BSF_52_X] + RAND_FLOAT_CENTERED(200.0f), sZoFwork[ZO_BSF_52_Y] + RAND_FLOAT_CENTERED(200.0f), @@ -2753,7 +2755,6 @@ void Zoness_80194A84(Boss* bossZO) { sZoSwork[ZO_BSS_49] = 60; sZoSwork[ZO_BSS_8] -= bossZO->damage; if (sZoSwork[ZO_BSS_8] <= 0) { - sZoSwork[ZO_BSS_49] = sZoSwork[ZO_BSS_8] = 0; bossZO->swork[ZO_SWK_5] = 30; } @@ -2766,8 +2767,7 @@ void Zoness_80194A84(Boss* bossZO) { sZoSwork[ZO_BSS_50] = 50; sZoSwork[ZO_BSS_9] -= bossZO->damage; if (sZoSwork[ZO_BSS_9] <= 0) { - sZoSwork[ZO_BSS_9] = 0; - sZoSwork[ZO_BSS_50] = 0; + sZoSwork[ZO_BSS_50] = sZoSwork[ZO_BSS_9] = 0; spD8.x = sZoFwork[ZO_BSF_29_X]; spD8.y = sZoFwork[ZO_BSF_29_Y]; spD8.z = sZoFwork[ZO_BSF_29_Z]; @@ -2782,8 +2782,7 @@ void Zoness_80194A84(Boss* bossZO) { sZoSwork[ZO_BSS_51] = 50; sZoSwork[ZO_BSS_10] -= bossZO->damage; if (sZoSwork[ZO_BSS_10] <= 0) { - sZoSwork[ZO_BSS_10] = 0; - sZoSwork[ZO_BSS_51] = 0; + sZoSwork[ZO_BSS_51] = sZoSwork[ZO_BSS_10] = 0; spD8.x = sZoFwork[ZO_BSF_32_X]; spD8.y = sZoFwork[ZO_BSF_32_Y]; spD8.z = sZoFwork[ZO_BSF_32_Z]; @@ -2798,8 +2797,7 @@ void Zoness_80194A84(Boss* bossZO) { sZoSwork[ZO_BSS_50] = 50; sZoSwork[ZO_BSS_9] -= bossZO->damage; if (sZoSwork[ZO_BSS_9] <= 0) { - sZoSwork[ZO_BSS_9] = 0; - sZoSwork[ZO_BSS_50] = 0; + sZoSwork[ZO_BSS_50] = sZoSwork[ZO_BSS_9] = 0; spD8.x = sZoFwork[ZO_BSF_29_X]; spD8.y = sZoFwork[ZO_BSF_29_Y]; spD8.z = sZoFwork[ZO_BSF_29_Z]; @@ -2812,8 +2810,7 @@ void Zoness_80194A84(Boss* bossZO) { sZoSwork[ZO_BSS_51] = 50; sZoSwork[ZO_BSS_10] -= bossZO->damage; if (sZoSwork[ZO_BSS_10] <= 0) { - sZoSwork[ZO_BSS_10] = 0; - sZoSwork[ZO_BSS_51] = 0; + sZoSwork[ZO_BSS_51] = sZoSwork[ZO_BSS_10] = 0; spD8.x = sZoFwork[ZO_BSF_32_X]; spD8.y = sZoFwork[ZO_BSF_32_Y]; spD8.z = sZoFwork[ZO_BSF_32_Z]; @@ -2970,9 +2967,9 @@ void Zoness_80194A84(Boss* bossZO) { sZoLimbTimers[sp124]--; } } - for (sp124 = 0; sp124 < 6; sp124++) { // may be using pointer iterators - if (sZoSwork[ZO_BSS_49 + sp124] != 0) { - sZoSwork[ZO_BSS_49 + sp124]--; + for (i = ZO_BSS_49, sp124 = 0; sp124 < 6; sp124++, i++) { + if (sZoSwork[i] != 0) { + sZoSwork[i]--; } } if (bossZO->state < 4) { @@ -3036,8 +3033,8 @@ void Zoness_80194A84(Boss* bossZO) { gBossHealthBar = bossZO->health / 300.0f * 64.0f; gBossHealthBar += (s32) ((sZoSwork[ZO_BSS_11] / 20.0f) * 64.0f); gBossHealthBar += (s32) ((sZoSwork[ZO_BSS_12] / 20.0f) * 64.0f); - gBossHealthBar += (s32) ((sZoSwork[ZO_BSS_9] / 40.0f) * 16.0f); - gBossHealthBar += (s32) ((sZoSwork[ZO_BSS_10] / 40.0f) * 16.0f); + gBossHealthBar += (s32) ((sZoSwork[ZO_BSS_9] / (20.0f * 2)) * 16.0f); + gBossHealthBar += (s32) ((sZoSwork[ZO_BSS_10] / (20.0f * 2)) * 16.0f); gBossHealthBar += (s32) ((sZoSwork[ZO_BSS_13] / 61.0f) * 31.0f); } ZO_HIT_0(bossZO)->z.offset = sZoFwork[ZO_BSF_43_Z] - bossZO->obj.pos.z; @@ -3057,20 +3054,10 @@ void Zoness_80194A84(Boss* bossZO) { } } - for (sp124 = 0; sp124 < 6; sp124++) { // may be using pointer iterators - sZoFwork[ZO_BSF_112 + sp124] = - SIN_DEG(sZoSwork[ZO_BSS_49 + sp124] * 50.0f) * Zoness_80193CC8(sZoSwork[ZO_BSS_49 + sp124]); + for (j = ZO_BSF_112, i = ZO_BSS_49, sp124 = 0; sp124 < 6; sp124++, i++, j++) { + sZoFwork[j] = SIN_DEG(sZoSwork[i] * 50.0f) * Zoness_80193CC8(sZoSwork[i]); } } -#else -Vec3f D_i3_801BF6DC = { 615.0f, 532.0f, -80.0f }; -Vec3f D_i3_801BF6E8 = { -615.0f, 532.0f, -80.0f }; -Vec3f D_i3_801BF6F4 = { 0.0f, 0.0f, 0.0f }; -Vec3f D_i3_801BF700 = { 0.0f, 0.0f, 0.0f }; -Vec3f D_i3_801BF70C = { 0.0f, 0.0f, 40.0f }; -// OBJ_BOSS_ZO action -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/fox_zo/Zoness_80194A84.s") -#endif void Zoness_801986FC(Boss* bossZO, s32 arg1, f32 xOff, f32 yOff, f32 zOff, f32 yRot) { Actor* newActor; From 001b3e0aa7b86a92c086c5e03cd9209609cf2a19 Mon Sep 17 00:00:00 2001 From: inspectredc <78732756+inspectredc@users.noreply.github.com> Date: Wed, 10 Apr 2024 23:20:03 +0100 Subject: [PATCH 017/151] Match Ending_80187860 (#207) --- src/overlays/ovl_ending/fox_end1.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/overlays/ovl_ending/fox_end1.c b/src/overlays/ovl_ending/fox_end1.c index a2018888..2b681e9c 100644 --- a/src/overlays/ovl_ending/fox_end1.c +++ b/src/overlays/ovl_ending/fox_end1.c @@ -116,25 +116,29 @@ void Ending_801876A4(void) { } } -#ifdef NON_MATCHING -// regswaps before the matrix translates https://decomp.me/scratch/nweXT void Ending_80187860(s32 arg0, s32 arg1) { Vec3f sp88[50]; s32 i; s32 sp80; Animation* sp70[4] = { &D_TITLE_60246F8, &D_TITLE_60338DC, &D_TITLE_6036278, &D_TITLE_603531C }; + s32 pad; for (i = arg0; i < D_ending_80196F88; i++) { Matrix_Push(&gGfxMatrix); RCP_SetupDL(&gMasterDisp, D_ending_80196D08[i].setupDL); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, D_ending_80196D08[i].prim.r, D_ending_80196D08[i].prim.g, D_ending_80196D08[i].prim.b, D_ending_80196D08[i].prim.a); - if ((i == 1) || (i == 2)) { - Matrix_Translate(gGfxMatrix, D_ending_80196D08[i].pos.x, D_ending_80196D08[i].pos.y - 10.0f, - D_ending_80196D08[i].pos.z, 1); - } else { - Matrix_Translate(gGfxMatrix, D_ending_80196D08[i].pos.x, D_ending_80196D08[i].pos.y, - D_ending_80196D08[i].pos.z, 1); + switch (i) { + case 1: + case 2: + if (1) {} + Matrix_Translate(gGfxMatrix, D_ending_80196D08[i].pos.x, D_ending_80196D08[i].pos.y - 10.0f, + D_ending_80196D08[i].pos.z, 1); + break; + default: + Matrix_Translate(gGfxMatrix, D_ending_80196D08[i].pos.x, D_ending_80196D08[i].pos.y, + D_ending_80196D08[i].pos.z, 1); + break; } Matrix_Scale(gGfxMatrix, D_ending_80196D08[i].scale.x, D_ending_80196D08[i].scale.y, D_ending_80196D08[i].scale.z, 1); @@ -169,11 +173,6 @@ void Ending_80187860(s32 arg0, s32 arg1) { Matrix_Pop(&gGfxMatrix); } } -#else -Animation* D_ending_80192820[4] = { &D_TITLE_60246F8, &D_TITLE_60338DC, &D_TITLE_6036278, &D_TITLE_603531C }; -void Ending_80187860(s32, s32); -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_ending/fox_end1/Ending_80187860.s") -#endif void Ending_80187D3C(s32 arg0) { s32 i; From 4362338efb414bd2b98d09809c1bf65b90cd8355 Mon Sep 17 00:00:00 2001 From: inspectredc <78732756+inspectredc@users.noreply.github.com> Date: Thu, 11 Apr 2024 13:39:53 +0100 Subject: [PATCH 018/151] Match Area6_80187944 (#209) * Match Area6_80187944 * actually commit all changes * Area6_80187944 * merge * AUDIO_PLAY_BGM * team ids --------- Co-authored-by: Alejandro Javier Asenjo Nitti --- src/overlays/ovl_i3/fox_a6.c | 177 ++++++++++++++++++++++++++--------- 1 file changed, 133 insertions(+), 44 deletions(-) diff --git a/src/overlays/ovl_i3/fox_a6.c b/src/overlays/ovl_i3/fox_a6.c index b0f8a42a..8a040fff 100644 --- a/src/overlays/ovl_i3/fox_a6.c +++ b/src/overlays/ovl_i3/fox_a6.c @@ -429,11 +429,8 @@ f32 D_i3_801BF3F4[12] = { f32 D_i3_801BF424[12] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, }; -f32 D_i3_801BF454[4][4] = { - { 255.0f, 0.0f, 0.0f, 0.0f }, - { 255.0f, 255.0f, 0.0f, 0.0f }, - { 0.0f, 255.0f, 255.0f, 0.0f }, - { 144.0f, 255.0f, 144.0f, 0.0f }, +f32 D_i3_801BF454[16] = { + 255.0f, 0.0f, 0.0f, 0.0f, 255.0f, 255.0f, 0.0f, 0.0f, 0.0f, 255.0f, 255.0f, 0.0f, 144.0f, 255.0f, 144.0f, 0.0f, }; f32 D_i3_801BF494[12] = { -90.0f, 30.0f, 26.0f, 22.0f, 18.0f, 11.0f, 8.0f, 5.0f, 3.0f, 2.0f, 1.0f, 0.0f, @@ -532,9 +529,6 @@ void Area6_BossA6_Init(BossA6* this) { AUDIO_PLAY_SFX(0x11002050, this->sfxSource, 4); } -#ifdef NON_MATCHING -// var_s0 = D_i3_801C2250[A6_BSS_9]; is using the wrong variable, but unclear what correct one is. -// https://decomp.me/scratch/P3kGr void Area6_80187944(Boss* bossA6) { s32 i; s32 pad; @@ -549,13 +543,13 @@ void Area6_80187944(Boss* bossA6) { f32 yaw_10C; f32 temp2; f32 sp104; - Vec3f spC8[5]; - Vec3f spA4[3]; + Vec3f spC8[8]; Vec3f sp98; Vec3f sp8C; Effect* effect; gBossFrameCount++; + if ((bossA6->state < 6) || ((bossA6->state >= 8) && (bossA6->state < 12))) { bossA6->obj.rot.y = RAD_TO_DEG(Math_Atan2F(gPlayer[0].camEye.x - bossA6->obj.pos.x, gPlayer[0].camEye.z - (bossA6->obj.pos.z + D_ctx_80177D20))); @@ -564,9 +558,11 @@ void Area6_80187944(Boss* bossA6) { sqrtf(SQ(gPlayer[0].camEye.z - (bossA6->obj.pos.z + D_ctx_80177D20)) + SQ(gPlayer[0].camEye.x - bossA6->obj.pos.x)))); } + Matrix_RotateY(gCalcMatrix, bossA6->obj.rot.y * M_DTOR, 0); Matrix_RotateX(gCalcMatrix, bossA6->obj.rot.x * M_DTOR, 1); Matrix_RotateZ(gCalcMatrix, bossA6->obj.rot.z * M_DTOR, 1); + if ((bossA6->dmgType != DMG_NONE) && (bossA6->health > 0)) { bossA6->dmgType = DMG_NONE; if (bossA6->fwork[A6_FWK_0] > 5.0f) { @@ -579,27 +575,37 @@ void Area6_80187944(Boss* bossA6) { } else { AUDIO_PLAY_SFX(0x29034003, bossA6->sfxSource, 4); } + if (bossA6->health <= 0) { bossA6->health = 0; func_boss_80042EC0(bossA6); Radio_PlayMessage(gMsg_ID_15252, RCID_SLIPPY); + D_ctx_8017796C = -1; + D_bg_8015F984 = (D_ctx_80177D20 * 0.00004f) + 0.5f; + AUDIO_PLAY_SFX(0x2940D09A, bossA6->sfxSource, 4); + gShowBossHealth = 0; + SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 40); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 40); + bossA6->fwork[A6_FWK_5] = 5.0f; bossA6->fwork[A6_FWK_3] = -20000.0f; bossA6->fwork[A6_FWK_1] = 170.0f; bossA6->vel.z = -20.0f; - Matrix_MultVec3f(gCalcMatrix, &D_i3_801BECE0, &spA4[0]); - Matrix_MultVec3f(gCalcMatrix, &D_i3_801BECEC, &spA4[1]); - Matrix_MultVec3f(gCalcMatrix, &D_i3_801BECF8, &spA4[2]); + + Matrix_MultVec3f(gCalcMatrix, &D_i3_801BECE0, &spC8[0]); + Matrix_MultVec3f(gCalcMatrix, &D_i3_801BECEC, &spC8[1]); + Matrix_MultVec3f(gCalcMatrix, &D_i3_801BECF8, &spC8[2]); + for (i = 0; i < 3; i++) { - func_effect_8007D0E0(spA4[i].x + bossA6->obj.pos.x, spA4[i].y + bossA6->obj.pos.y, - spA4[i].z + bossA6->obj.pos.z, 10.0f); + func_effect_8007D0E0(spC8[i].x + bossA6->obj.pos.x, spC8[i].y + bossA6->obj.pos.y, + spC8[i].z + bossA6->obj.pos.z, 10.0f); } + bossA6->timer_052 = 170; D_i3_801C2250[A6_BSS_2_0] = D_i3_801C2250[A6_BSS_2_1] = D_i3_801C2250[A6_BSS_2_2] = @@ -610,11 +616,13 @@ void Area6_80187944(Boss* bossA6) { AUDIO_PLAY_SFX(0x3143402E, bossA6->sfxSource, 4); } } + if (((bossA6->dmgPart == 4) || (bossA6->dmgPart == 5) || (bossA6->dmgPart == 6)) && (bossA6->swork[A6_SWK_25] != 0)) { Area6_8018B9BC(bossA6); } } + if ((bossA6->dmgPart == 1) || (bossA6->dmgPart == 2) || (bossA6->dmgPart == 3)) { Area6_8018A2C4(bossA6); } @@ -622,6 +630,7 @@ void Area6_80187944(Boss* bossA6) { AUDIO_PLAY_SFX(0x29121007, bossA6->sfxSource, 4); } } + for (i = 0; i < 3; i++) { var_s0 = (bossA6->swork[A6_SWK_15 + i] / 10) - 1; if (var_s0 < 0) { @@ -631,15 +640,18 @@ void Area6_80187944(Boss* bossA6) { Math_SmoothStepToF(&D_i3_801C22F0.g[i], D_i3_801BECB0[var_s0][1], 1.0f, 10.0f, 0); Math_SmoothStepToF(&D_i3_801C22F0.b[i], D_i3_801BECB0[var_s0][2], 1.0f, 10.0f, 0); } + if ((bossA6->swork[A6_SWK_15 + 0] == 0) && (bossA6->swork[A6_SWK_15 + 1] == 0) && - (bossA6->swork[A6_SWK_15 + 2] == 0) && (bossA6->fwork[A6_FWK_0] != 0) && ((gGameFrameCount % 2) == 0)) { + (bossA6->swork[A6_SWK_15 + 2] == 0) && (bossA6->fwork[A6_FWK_0] != 0) && !(gGameFrameCount % 2U)) { func_effect_8007C120(bossA6->obj.pos.x, bossA6->obj.pos.y, bossA6->obj.pos.z + 200.0f, bossA6->vel.x, bossA6->vel.y, bossA6->vel.z, 0.3f, 1); } + sp120 = 0.5f; if (gBosses[0].swork[A6_SWK_25] == 1) { sp120 = 2.0f; } + if (D_i3_801C2250[A6_BSS_10] != 0) { D_i3_801C22F0.unk_34 += sp120; if (D_i3_801C22F0.unk_34 > 360.0f) { @@ -651,27 +663,29 @@ void Area6_80187944(Boss* bossA6) { D_i3_801C22F0.unk_34 += 360.0f; } } + if ((bossA6->state >= 3) && (bossA6->state < 5) && (bossA6->fwork[A6_FWK_28] == 0.0f)) { Math_SmoothStepToAngle(&bossA6->fwork[A6_FWK_9], bossA6->fwork[A6_FWK_32], 0.05f, 0.02f, 0.00001f); Math_SmoothStepToAngle(&bossA6->obj.rot.z, bossA6->fwork[A6_FWK_8], 0.05f, bossA6->fwork[A6_FWK_9], 0.00001f); if (bossA6->swork[A6_SWK_25] >= 2) { - if (((gGameFrameCount % 64) == 0) && (Rand_ZeroOne() < 0.5f)) { + if (!(gGameFrameCount % 64U) && (Rand_ZeroOne() < 0.5f)) { bossA6->fwork[A6_FWK_6] = RAND_FLOAT_CENTERED(500.0f) + gPlayer[0].camEye.x; } - if (((gGameFrameCount % 64) == 0) && (Rand_ZeroOne() < 0.5f)) { + if (!(gGameFrameCount % 64U) && (Rand_ZeroOne() < 0.5f)) { bossA6->fwork[A6_FWK_7] = RAND_FLOAT_CENTERED(500.0f) + gPlayer[0].camEye.y; } } else { - if (((gGameFrameCount % 32) == 0) && (Rand_ZeroOne() < 0.7f)) { + if (!(gGameFrameCount % 32U) && (Rand_ZeroOne() < 0.7f)) { bossA6->fwork[A6_FWK_6] = RAND_FLOAT_CENTERED(1000.0f) + gPlayer[0].camEye.x; bossA6->fwork[A6_FWK_30] = 0.0f; } - if (((gGameFrameCount % 32) == 0) && (Rand_ZeroOne() < 0.7f)) { + if (!(gGameFrameCount % 32U) && (Rand_ZeroOne() < 0.7f)) { bossA6->fwork[A6_FWK_7] = RAND_FLOAT_CENTERED(1000.0f) + gPlayer[0].camEye.y; bossA6->fwork[A6_FWK_31] = 0.0f; } } } + if (bossA6->state != 0) { Math_SmoothStepToF(&bossA6->fwork[A6_FWK_4], bossA6->fwork[A6_FWK_5], 0.1f, 2.0f, 0.00001f); Math_SmoothStepToF(&bossA6->obj.pos.z, gPlayer[0].camEye.z - D_ctx_80177D20 + bossA6->fwork[A6_FWK_3], 0.1f, @@ -689,6 +703,7 @@ void Area6_80187944(Boss* bossA6) { Math_SmoothStepToAngle(&bossA6->fwork[A6_FWK_0], bossA6->fwork[A6_FWK_1], 0.2f, bossA6->fwork[A6_FWK_2], 0.00001f); } + Math_SmoothStepToF(&bossA6->fwork[A6_FWK_10 + 0], bossA6->fwork[A6_FWK_13 + 0], 0.1f, bossA6->fwork[A6_FWK_16 + 0], 0.0001f); Math_SmoothStepToF(&bossA6->fwork[A6_FWK_10 + 1], bossA6->fwork[A6_FWK_13 + 1], 0.1f, bossA6->fwork[A6_FWK_16 + 1], @@ -698,39 +713,46 @@ void Area6_80187944(Boss* bossA6) { Math_SmoothStepToF(&bossA6->fwork[A6_FWK_19 + 0], bossA6->fwork[A6_FWK_22 + 0], 0.1f, 10.0f, 0.00001f); Math_SmoothStepToF(&bossA6->fwork[A6_FWK_19 + 1], bossA6->fwork[A6_FWK_22 + 1], 0.1f, 10.0f, 0.00001f); Math_SmoothStepToF(&bossA6->fwork[A6_FWK_19 + 2], bossA6->fwork[A6_FWK_22 + 2], 0.1f, 10.0f, 0.00001f); + if (bossA6->state > 10) { bossA6->obj.rot.z += bossA6->fwork[A6_FWK_28]; bossA6->obj.rot.z = Math_ModF(bossA6->obj.rot.z, 360.0f); + Math_SmoothStepToF(&bossA6->fwork[A6_FWK_28], 5.0f, 0.1f, 0.2f, 0.0001f); + for (i = 0; i < 10; i++) { func_effect_80079618(bossA6->obj.pos.x + RAND_FLOAT_CENTERED(500.0f), bossA6->obj.pos.y + RAND_FLOAT_CENTERED(500.0f), bossA6->obj.pos.z + RAND_FLOAT_CENTERED(100.0f), RAND_FLOAT(4.0f) + 1.0f); } + if (bossA6->timer_05C == 0) { bossA6->timer_05C = 15; } if (((gGameFrameCount % 2) == 0)) { - Matrix_MultVec3f(gCalcMatrix, &D_i3_801BED04, &spC8[0]); - Matrix_MultVec3f(gCalcMatrix, &D_i3_801BED10, &spC8[1]); - Matrix_MultVec3f(gCalcMatrix, &D_i3_801BED1C, &spC8[2]); - Matrix_MultVec3f(gCalcMatrix, &D_i3_801BED28, &spC8[3]); - Matrix_MultVec3f(gCalcMatrix, &D_i3_801BED34, &spC8[4]); - for (i = 0; i < 5; i++) { + Matrix_MultVec3f(gCalcMatrix, &D_i3_801BED04, &spC8[3]); + Matrix_MultVec3f(gCalcMatrix, &D_i3_801BED10, &spC8[4]); + Matrix_MultVec3f(gCalcMatrix, &D_i3_801BED1C, &spC8[5]); + Matrix_MultVec3f(gCalcMatrix, &D_i3_801BED28, &spC8[6]); + Matrix_MultVec3f(gCalcMatrix, &D_i3_801BED34, &spC8[7]); + + for (i = 3; i < 8; i++) { var_s0 = RAND_FLOAT_CENTERED(300.0f); - if (i == 0) { + if (i == 3) { var_s0 = RAND_FLOAT_CENTERED(100.0f); } func_effect_8007D0E0(bossA6->obj.pos.x + var_s0 + spC8[i].x, bossA6->obj.pos.y + var_s0 + spC8[i].y, bossA6->obj.pos.z + spC8[i].z, 10.0f); } } - if (((gGameFrameCount % 32) == 0)) { + + if (!(gGameFrameCount % 32U)) { func_effect_8007C120(bossA6->obj.pos.x, bossA6->obj.pos.y, bossA6->obj.pos.z + 300.0f, bossA6->vel.x, bossA6->vel.y, bossA6->vel.z, 0.5f, 70); } } - if (((gGameFrameCount % 16) == 0)) { + + if (!(gGameFrameCount % 16U)) { dz_114 = fabsf(bossA6->fwork[A6_FWK_3] / -1700.0f); if (dz_114 < 1.0f) { dz_114 = 1.0f; @@ -738,6 +760,7 @@ void Area6_80187944(Boss* bossA6) { if (dz_114 > 3.0f) { dz_114 = 3.0f; } + for (i = 0; i < 3; i++) { sp120 = dz_114; if (bossA6->swork[A6_SWK_18 + i] != 0) { @@ -748,6 +771,7 @@ void Area6_80187944(Boss* bossA6) { A6_HIT_1_2(bossA6, i)->x.size = 153.0f * sp120; } } + switch (bossA6->state) { case 0: bossA6->info.hitbox[0] = 0; @@ -755,29 +779,43 @@ void Area6_80187944(Boss* bossA6) { dx_11C = gPlayer[0].pos.x - bossA6->obj.pos.x; dy_118 = gPlayer[0].pos.y - bossA6->obj.pos.y; dz_114 = gPlayer[0].pos.z - 700.0f - bossA6->obj.pos.z; + sp104 = 10.0f; + if ((bossA6->timer_050 != 0) && (bossA6->timer_050 < 200)) { dx_11C = gPlayer[0].camEye.x - bossA6->obj.pos.x; dy_118 = gPlayer[0].camEye.y - bossA6->obj.pos.y; dz_114 = gPlayer[0].camEye.z - D_ctx_80177D20 + bossA6->fwork[A6_FWK_3] - bossA6->obj.pos.z; sp104 = 100.0f; } - yaw_10C = Math_RadToDeg(Math_Atan2F(dx_11C, dz_114)); - pitch_110 = Math_RadToDeg(-Math_Atan2F(dy_118, sqrtf(SQ(dx_11C) + SQ(dz_114)))); + + yaw_10C = Math_Atan2F(dx_11C, dz_114); + yaw_10C = Math_RadToDeg(yaw_10C); + + pitch_110 = Math_Atan2F(dy_118, sqrtf(SQ(dx_11C) + SQ(dz_114))); + pitch_110 = Math_RadToDeg(-pitch_110); + Math_SmoothStepToAngle(&bossA6->unk_078.y, yaw_10C, 1.0f, sp104, 0.00001f); Math_SmoothStepToAngle(&bossA6->unk_078.x, pitch_110, 1.0f, sp104, 0.00001f); Matrix_RotateY(gCalcMatrix, bossA6->unk_078.y * M_DTOR, 0); Matrix_RotateX(gCalcMatrix, bossA6->unk_078.x * M_DTOR, 1); + sp98.x = sp98.y = 0.0f; sp98.z = 30.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp98, &sp8C); + bossA6->vel.x = sp8C.x; bossA6->vel.y = sp8C.y; + sp98.x = sp98.y = 0.0f; sp98.z = 60.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp98, &sp8C); + bossA6->vel.z = sp8C.z; bossA6->fwork[A6_FWK_33] += 30.0f; + if (bossA6->timer_050 == 0) { Math_SmoothStepToF(&D_i3_801C22F0.unk_24, 0.0f, 0.1f, 1.0f, 0); if (D_i3_801C22F0.unk_24 < 1.0f) { @@ -797,10 +835,12 @@ void Area6_80187944(Boss* bossA6) { } } break; + case 1: Math_SmoothStepToF(D_ctx_801779A8, 10.0f, 1.0f, 5.0f, 0.0f); bossA6->info.hitbox[0] = 0; Math_SmoothStepToAngle(&bossA6->obj.rot.z, 0.0f, 1.0f, 10.0f, 0.0001f); + if (bossA6->obj.rot.z < 1.0f) { if (D_i3_801C2250[A6_BSS_27] == 0) { AUDIO_PLAY_SFX(0x39408091, bossA6->sfxSource, 4); @@ -810,18 +850,21 @@ void Area6_80187944(Boss* bossA6) { Math_SmoothStepToF(&D_i3_801C22F0.unk_24, 0.0f, 0.1f, 5.0f, 0.0f); Math_SmoothStepToF(&bossA6->fwork[A6_FWK_34], 2.0f, 0.1f, 0.1f, 0.0f); Math_SmoothStepToF(&bossA6->fwork[A6_FWK_35], 1.2f, 0.1f, 0.1f, 0.0f); + if (D_i3_801C22F0.unk_24 < 1.0f) { bossA6->fwork[A6_FWK_6] = RAND_FLOAT_CENTERED(1000.0f) + gPlayer[0].camEye.x; bossA6->fwork[A6_FWK_7] = RAND_FLOAT_CENTERED(1000.0f) + gPlayer[0].camEye.y; bossA6->fwork[A6_FWK_3] = -3700.0f + RAND_FLOAT_CENTERED(3000.0f); bossA6->fwork[A6_FWK_34] = 2.0f; bossA6->fwork[A6_FWK_35] = 1.2f; + if ((bossA6->swork[A6_SWK_37] == 0) && (bossA6->swork[A6_SWK_33 + 0] == 0) && (bossA6->swork[A6_SWK_33 + 1] == 0) && (bossA6->swork[A6_SWK_33 + 2] == 0) && (bossA6->swork[A6_SWK_27 + 0] == 0) && (bossA6->swork[A6_SWK_27 + 1] == 0) && (bossA6->swork[A6_SWK_27 + 2] == 0)) { bossA6->swork[A6_SWK_37] = 1; } + if (bossA6->swork[A6_SWK_37] != 0) { bossA6->swork[A6_SWK_18 + 0] = bossA6->swork[A6_SWK_18 + 1] = bossA6->swork[A6_SWK_18 + 2] = 3; bossA6->fwork[A6_FWK_3] = -1700.0f; @@ -840,6 +883,7 @@ void Area6_80187944(Boss* bossA6) { } } break; + case 2: Math_SmoothStepToF(D_ctx_801779A8, 10.0f, 1.0f, 5.0f, 0.0f); if (bossA6->timer_050 == 10) { @@ -849,18 +893,22 @@ void Area6_80187944(Boss* bossA6) { gFillScreenAlphaStep = 25; gCameraShake = 50; } + if (bossA6->timer_050 == 0) { if (D_i3_801C2250[A6_BSS_8] == 0) { D_i3_801C2250[A6_BSS_8] = 1; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 0; } + Math_SmoothStepToF(&D_i3_801C22F0.unk_24, 255.0f, 0.1f, 10.0f, 0.0f); Math_SmoothStepToF(&bossA6->fwork[A6_FWK_34], 1.0f, 0.1f, 0.1f, 0.0f); Math_SmoothStepToF(&bossA6->fwork[A6_FWK_35], 1.0f, 0.1f, 0.1f, 0.0f); + if (D_i3_801C22F0.unk_24 > 254.0f) { D_i3_801C22F0.unk_24 = 255.0f; bossA6->info.hitbox[0] = 10; bossA6->fwork[A6_FWK_34] = bossA6->fwork[A6_FWK_35] = 1.0f; + switch (bossA6->swork[A6_SWK_38]) { case 0: bossA6->timer_050 = 100; @@ -869,9 +917,11 @@ void Area6_80187944(Boss* bossA6) { bossA6->timer_050 = 1399; break; } + bossA6->swork[A6_SWK_38] = 0; D_i3_801C2250[A6_BSS_28] = 1; bossA6->state = 4; + if (bossA6->swork[A6_SWK_37] != 0) { bossA6->timer_050 = 30; bossA6->swork[A6_SWK_37] = 0; @@ -881,6 +931,7 @@ void Area6_80187944(Boss* bossA6) { } bossA6->state = 3; } + if (D_i3_801C2250[A6_BSS_6] != 0) { if (D_i3_801C2250[A6_BSS_0] != 2) { D_i3_801C2250[A6_BSS_0] = 1; @@ -888,6 +939,7 @@ void Area6_80187944(Boss* bossA6) { D_i3_801C2250[A6_BSS_0] = 0; } } + if ((D_i3_801C2250[A6_BSS_6] == 0) || (D_i3_801C2250[A6_BSS_0] == 0)) { bossA6->fwork[A6_FWK_1] = 90.0f; bossA6->fwork[A6_FWK_2] = 2.0f; @@ -898,6 +950,7 @@ void Area6_80187944(Boss* bossA6) { } } break; + case 3: if (bossA6->timer_050 == 1) { Audio_KillSfxBySource(bossA6->sfxSource); @@ -906,6 +959,7 @@ void Area6_80187944(Boss* bossA6) { D_i3_801C2250[A6_BSS_7] = 1; } } + if (D_i3_801C2250[A6_BSS_0] != 0) { if (bossA6->swork[A6_SWK_25] == 1) { bossA6->timer_052 = 30; @@ -945,6 +999,7 @@ void Area6_80187944(Boss* bossA6) { } } break; + case 4: if (bossA6->timer_050 == 1400) { bossA6->swork[A6_SWK_15 + 0] = bossA6->swork[A6_SWK_15 + 1] = bossA6->swork[A6_SWK_15 + 2] = 40; @@ -956,7 +1011,9 @@ void Area6_80187944(Boss* bossA6) { AUDIO_PLAY_SFX(0x39404068, bossA6->sfxSource, 4); } } + Math_SmoothStepToF(&bossA6->fwork[A6_FWK_29], 255.0f, 1.0f, 10.0f, 0.0001f); + if ((bossA6->swork[A6_SWK_36] == 2) && (bossA6->fwork[A6_FWK_0] == 0.0f) && (D_i3_801C2250[A6_BSS_30] == 0)) { Radio_PlayMessage(gMsg_ID_7083, RCID_PEPPY); @@ -964,10 +1021,12 @@ void Area6_80187944(Boss* bossA6) { D_i3_801C2250[A6_BSS_30]++; D_i3_801C2250[A6_BSS_30] &= 1; } - if (((gGameFrameCount % 64) == 0)) { + + if (!(gGameFrameCount % 64U)) { bossA6->fwork[A6_FWK_8] = RAND_FLOAT(360.0f); bossA6->fwork[A6_FWK_9] = 0.0f; } + if ((bossA6->timer_050 == 0) || ((bossA6->swork[A6_SWK_33 + 0] == 0) && (bossA6->swork[A6_SWK_33 + 1] == 0) && (bossA6->swork[A6_SWK_33 + 2] == 0) && (bossA6->swork[A6_SWK_27 + 0] == 0) && @@ -981,10 +1040,15 @@ void Area6_80187944(Boss* bossA6) { bossA6->timer_050 = 30; bossA6->fwork[A6_FWK_8] = bossA6->fwork[A6_FWK_9] = 0; bossA6->fwork[A6_FWK_2] = 2.0f; + AUDIO_PLAY_SFX(0x31404066, bossA6->sfxSource, 4); + bossA6->info.hitbox = SEGMENTED_TO_VIRTUAL(D_A6_6028578); + D_i3_801C2250[A6_BSS_7] = bossA6->swork[A6_SWK_37] = 0; + bossA6->state = 3; + if (D_i3_801C2250[A6_BSS_6] == 0) { AUDIO_PLAY_BGM(SEQ_ID_A6_BOSS | SEQ_FLAG); } @@ -1000,15 +1064,18 @@ void Area6_80187944(Boss* bossA6) { D_i3_801C2250[A6_BSS_34] = 1; } break; + case 5: if (bossA6->timer_050 == 1) { Area6_80187704(); AUDIO_PLAY_SFX(0x39033093, bossA6->sfxSource, 4); D_i3_801C2250[A6_BSS_33] = 120; } + if (D_i3_801C2250[A6_BSS_33] != 0) { D_i3_801C2250[A6_BSS_33]--; } + if (D_i3_801C2250[A6_BSS_33] == 15) { if (D_i3_801C2250[A6_BSS_32] == 0) { if (gTeamShields[TEAM_ID_FALCO] > 0) { @@ -1023,15 +1090,16 @@ void Area6_80187944(Boss* bossA6) { D_i3_801C2250[A6_BSS_32] &= 1; } break; + case 6: bossA6->obj.pos.z -= bossA6->fwork[A6_FWK_37]; + Math_SmoothStepToF(&bossA6->fwork[A6_FWK_37], 0.0f, 1.0f, 10.0f, 0.00001f); Math_SmoothStepToF(&bossA6->fwork[A6_FWK_3], -6000.0f, 10.0f, 100.0f, 0.00001f); - var_s0 = D_i3_801C2250[A6_BSS_9]; - // sp68 = &D_i3_801BF454[]; - Math_SmoothStepToF(&D_i3_801C22F0.unk_28[0], D_i3_801BF454[var_s0][0], 0.5f, 100.0f, 0.00001f); - Math_SmoothStepToF(&D_i3_801C22F0.unk_28[2], D_i3_801BF454[var_s0][1], 0.5f, 100.0f, 0.00001f); - Math_SmoothStepToF(&D_i3_801C22F0.unk_28[1], D_i3_801BF454[var_s0][2], 0.5f, 100.0f, 0.00001f); + var_s0 = D_i3_801C2250[A6_BSS_9] * 4; + Math_SmoothStepToF(&D_i3_801C22F0.unk_28[0], D_i3_801BF454[var_s0], 0.5f, 100.0f, 0.00001f); + Math_SmoothStepToF(&D_i3_801C22F0.unk_28[2], D_i3_801BF454[var_s0 + 1], 0.5f, 100.0f, 0.00001f); + Math_SmoothStepToF(&D_i3_801C22F0.unk_28[1], D_i3_801BF454[var_s0 + 2], 0.5f, 100.0f, 0.00001f); if (((gGameFrameCount % 16) == 0)) { D_i3_801C2250[A6_BSS_9]++; D_i3_801C2250[A6_BSS_9] &= 3; @@ -1041,15 +1109,19 @@ void Area6_80187944(Boss* bossA6) { bossA6->state = 7; } break; + case 7: effect = &gEffects[bossA6->swork[A6_SWK_39]]; + Math_SmoothStepToF(&D_i3_801C22F0.unk_28[0], 255.0f, 1.0f, 100.0f, 0.00001f); Math_SmoothStepToF(&D_i3_801C22F0.unk_28[2], 255.0f, 1.0f, 100.0f, 0.00001f); Math_SmoothStepToF(&D_i3_801C22F0.unk_28[1], 255.0f, 1.0f, 100.0f, 0.00001f); + if (bossA6->fwork[A6_FWK_0] < 10.0f) { effect->unk_60.y = 5.0f - ((10.0f - bossA6->fwork[A6_FWK_0]) * 0.3f); effect->unk_60.x = 5.0f - ((10.0f - bossA6->fwork[A6_FWK_0]) * 0.3f); } + if (bossA6->fwork[A6_FWK_0] < 1.0f) { Math_SmoothStepToF(&effect->unk_60.x, 0.0f, 0.1f, 1.0f, 0.00001f); Math_SmoothStepToF(&effect->unk_60.y, 0.0f, 0.1f, 1.0f, 0.00001f); @@ -1065,6 +1137,7 @@ void Area6_80187944(Boss* bossA6) { } } break; + case 8: if (bossA6->timer_052 == 0) { D_i3_801C2250[A6_BSS_24] = 0; @@ -1074,6 +1147,7 @@ void Area6_80187944(Boss* bossA6) { AUDIO_PLAY_SFX(0x11002050, bossA6->sfxSource, 4); } break; + case 9: if (bossA6->timer_052 == 0) { Audio_KillSfxBySource(bossA6->sfxSource); @@ -1088,25 +1162,32 @@ void Area6_80187944(Boss* bossA6) { } if (bossA6->timer_054 == 0) { bossA6->timer_054 = 10; + if (D_i3_801C2250[A6_BSS_34] == 0) { bossA6->timer_054 = 30; } + sp128 = 6; if (bossA6->swork[A6_SWK_25] == 2) { sp128 = 12; } + for (var_s0 = 0; var_s0 < sp128; var_s0++) { Matrix_RotateZ(gCalcMatrix, (360.0f / sp128) * M_DTOR, 1); sp98.x = 0.0f; sp98.y = 400.0f; sp98.z = 0.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp98, &sp8C); - yaw_10C = Math_RadToDeg(Math_Atan2F(sp8C.x, sp8C.z)); - pitch_110 = Math_RadToDeg(-Math_Atan2F(sp8C.y, sqrtf(SQ(sp8C.x) + SQ(sp8C.z)))); + yaw_10C = Math_Atan2F(sp8C.x, sp8C.z); + yaw_10C = Math_RadToDeg(yaw_10C); + pitch_110 = Math_Atan2F(sp8C.y, sqrtf(SQ(sp8C.x) + SQ(sp8C.z))); + pitch_110 = Math_RadToDeg(-pitch_110); + spf124 = D_i3_801C2250[A6_BSS_12_0 + var_s0] - 1; if (spf124 < 0) { spf124 = 0; } + if ((gActors[spf124].obj.status == OBJ_FREE) || (gActors[spf124].obj.id != OBJ_ACTOR_191) || (D_i3_801C2250[A6_BSS_24] == 0)) { D_i3_801C2250[A6_BSS_12_0 + var_s0] = 0; @@ -1123,12 +1204,14 @@ void Area6_80187944(Boss* bossA6) { } } break; + case 10: if (D_i3_801C2250[A6_BSS_34] == 0) { bossA6->obj.rot.z += bossA6->fwork[A6_FWK_28]; bossA6->obj.rot.z = Math_ModF(bossA6->obj.rot.z, 360.0f); Math_SmoothStepToF(&bossA6->fwork[A6_FWK_28], 0.0f, 0.1f, 0.5f, 0.0001f); } + if (bossA6->fwork[A6_FWK_28] <= 0.1f) { if (D_i3_801C2250[A6_BSS_34] == 0) { bossA6->fwork[A6_FWK_28] = 0.0f; @@ -1141,6 +1224,7 @@ void Area6_80187944(Boss* bossA6) { bossA6->state = 1; } break; + case 11: if ((bossA6->timer_052 == 160) && ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_5))) { @@ -1158,11 +1242,13 @@ void Area6_80187944(Boss* bossA6) { } break; } + Area6_8018A464(bossA6, 0); Area6_8018A464(bossA6, 1); Area6_8018A464(bossA6, 2); + for (i = 0; i < 5; i++) { - if (((gGameFrameCount % 4) == 0)) { + if (!(gGameFrameCount % 4U)) { D_i3_801BF280[i] = RAND_FLOAT_CENTERED(10.0f); D_i3_801BF2B0[i] = RAND_FLOAT_CENTERED(10.0f); D_i3_801BF2E0[i] = RAND_FLOAT_CENTERED(10.0f); @@ -1171,6 +1257,7 @@ void Area6_80187944(Boss* bossA6) { Math_SmoothStepToF(&D_i3_801BF220[i], D_i3_801BF2B0[i], 1.0f, 5.0f, 0.001f); Math_SmoothStepToF(&D_i3_801BF250[i], D_i3_801BF2E0[i], 1.0f, 5.0f, 0.001f); } + A6_HIT_4(bossA6, 0)->z.offset = bossA6->vwork[A6_VWK_4].z; A6_HIT_4(bossA6, 0)->y.offset = bossA6->vwork[A6_VWK_4].y; A6_HIT_4(bossA6, 0)->x.offset = bossA6->vwork[A6_VWK_4].x; @@ -1180,6 +1267,7 @@ void Area6_80187944(Boss* bossA6) { A6_HIT_4(bossA6, 2)->z.offset = bossA6->vwork[A6_VWK_6].z; A6_HIT_4(bossA6, 2)->y.offset = bossA6->vwork[A6_VWK_6].y; A6_HIT_4(bossA6, 2)->x.offset = bossA6->vwork[A6_VWK_6].x; + if (gBossFrameCount == 600) { Radio_PlayMessage(gMsg_ID_2225, RCID_SLIPPY); } @@ -1189,11 +1277,13 @@ void Area6_80187944(Boss* bossA6) { if (gBossFrameCount > 756) { gBossHealthBar = (bossA6->health / 780.0f) * 255.0f; } + for (i = 0; i < 15; i++) { if (bossA6->swork[A6_SWK_0 + i] != 0) { bossA6->swork[A6_SWK_0 + i]--; } } + if (bossA6->fwork[A6_FWK_0] > 20.0f) { for (i = 0; i < 3; i++) { if (bossA6->swork[A6_SWK_0 + i] == 0) { @@ -1201,6 +1291,7 @@ void Area6_80187944(Boss* bossA6) { } } } + if (D_i3_801C2250[A6_BSS_5] != 0) { D_i3_801C2250[A6_BSS_5]--; } @@ -1208,10 +1299,6 @@ void Area6_80187944(Boss* bossA6) { D_i3_801C2250[A6_BSS_25]--; } } -#else -void Area6_80187944(Boss* bossA6); -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/fox_a6/Area6_80187944.s") -#endif void Area6_8018A1B0(Boss* bossA6, s32 arg1) { switch (D_i3_801C2250[A6_BSS_2_0 + arg1]) { @@ -1219,6 +1306,7 @@ void Area6_8018A1B0(Boss* bossA6, s32 arg1) { bossA6->swork[A6_SWK_27 + arg1] = 12; D_i3_801C2250[A6_BSS_2_0 + arg1] = 1; break; + case 1: bossA6->fwork[A6_FWK_13 + arg1] = 120.0f; if (((bossA6->swork[A6_SWK_33 + arg1] == 0) && (D_i3_801C2250[A6_BSS_6] != 0) && @@ -1229,6 +1317,7 @@ void Area6_8018A1B0(Boss* bossA6, s32 arg1) { } else { bossA6->fwork[A6_FWK_16 + arg1] = 60.0f; } + if (bossA6->fwork[A6_FWK_10 + arg1] >= 119.0f) { bossA6->fwork[A6_FWK_10 + arg1] = 120.0f; bossA6->swork[A6_SWK_33 + arg1] = 30; From c532f31e2490d345d3c497bf93c5779485a79930 Mon Sep 17 00:00:00 2001 From: petrie911 <69443847+petrie911@users.noreply.github.com> Date: Thu, 11 Apr 2024 11:55:32 -0500 Subject: [PATCH 019/151] Script and hitbox docs, update torch (#210) * script2 * more docs and such * torch update --- include/context.h | 8 +- include/functions.h | 2 +- include/macros.h | 1 + include/sf64event.h | 81 +++++++-- include/sf64object.h | 6 +- include/sf64player.h | 4 +- include/sf64thread.h | 6 +- include/variables.h | 2 +- linker_scripts/us/symbol_addrs.txt | 2 +- linker_scripts/us/symbol_addrs_engine.txt | 6 +- linker_scripts/us/symbol_addrs_nlib_vars.txt | 6 +- src/engine/fox_beam.c | 27 +-- src/engine/fox_bg.c | 31 ++-- src/engine/fox_context.c | 8 +- src/engine/fox_demo.c | 2 +- src/engine/fox_display.c | 49 +++-- src/engine/fox_edisplay.c | 4 +- src/engine/fox_effect.c | 8 +- src/engine/fox_enmy.c | 16 +- src/engine/fox_enmy2.c | 13 +- src/engine/fox_game.c | 68 ++++--- src/engine/fox_hud.c | 62 ++++--- src/engine/fox_play.c | 182 +++++++++---------- src/engine/fox_radio.c | 12 +- src/engine/fox_reset.c | 38 ++-- src/engine/fox_std_lib.c | 102 +++++------ src/engine/fox_tank.c | 18 +- src/engine/fox_versus.c | 2 +- src/overlays/ovl_ending/fox_end2.c | 19 +- src/overlays/ovl_i1/fox_co.c | 4 +- src/overlays/ovl_i1/fox_ve1.c | 4 +- src/overlays/ovl_i2/fox_me.c | 2 +- src/overlays/ovl_i3/fox_aq.c | 2 +- src/overlays/ovl_i3/fox_so.c | 34 ++-- src/overlays/ovl_i3/fox_zo.c | 4 +- src/overlays/ovl_i5/fox_ma.c | 26 +-- src/overlays/ovl_i5/fox_ti.c | 14 +- src/overlays/ovl_i6/fox_andross.c | 6 +- src/overlays/ovl_i6/fox_sy.c | 10 +- src/overlays/ovl_menu/fox_map.c | 12 +- src/overlays/ovl_menu/fox_option.c | 33 ++-- src/overlays/ovl_menu/fox_title.c | 33 ++-- src/sys/sys_fault.c | 16 +- src/sys/sys_joybus.c | 22 +-- src/sys/sys_lib.c | 8 +- src/sys/sys_main.c | 72 ++++---- tools/Torch | 2 +- 47 files changed, 586 insertions(+), 503 deletions(-) diff --git a/include/context.h b/include/context.h index 8b00a24b..e161f955 100644 --- a/include/context.h +++ b/include/context.h @@ -12,7 +12,7 @@ extern s32 D_ctx_80177824; // some sort of flag extern s32 D_ctx_8017782C; // some sort of flag. all range related? extern GameState gGameState; extern s32 gNextGameStateTimer; // next game state timer? -extern s32 D_ctx_80177844; // timer for vs item spawn +extern s32 gVsItemSpawnTimer; // timer for vs item spawn extern OptionState gOptionMenuStatus; extern s32 gPlayState; // pause-related state extern s32 D_ctx_80177868; // some sort of state. pause-related? @@ -75,7 +75,7 @@ extern UNK_TYPE F_80177D80; extern UNK_TYPE F_80177DE8; extern s32 gGameFrameCount; extern s32 D_ctx_80177DC8; -extern s32 D_ctx_80177E70; +extern s32 gPrevEventActorIndex; extern s32 D_ctx_80177E78; extern s32 gRingPassCount; extern Vec3f D_ctx_80177E88; @@ -267,7 +267,7 @@ extern f32 D_ctx_80177958[4]; extern s32 D_ctx_8017796C; extern OSContPad* gInputHold; extern OSContPad* gInputPress; -extern u8* D_ctx_80177984; +extern u8* gControllerRumble; extern s32 D_ctx_80177990[4]; extern f32 D_ctx_801779A8[4]; extern u8 gPauseEnabled; @@ -288,7 +288,7 @@ extern u8 D_ctx_80177B4C; extern u8 D_ctx_80177B6C; extern u8 gGreatFoxIntact; extern u8 D_ctx_80177BAC; -extern u16 D_Timer_80177BD0[4]; +extern u16 gControllerRumbleTimers[4]; extern u16 D_ctx_80177C30[4]; extern s32 D_ctx_80177C50; extern s32 D_ctx_80177C70; diff --git a/include/functions.h b/include/functions.h index c2e31d14..7b4224b0 100644 --- a/include/functions.h +++ b/include/functions.h @@ -477,7 +477,7 @@ void func_play_800B6BFC(Player*, s32 ); void func_play_800B6F50(f32, f32, f32, f32, f32, f32); void func_play_800B7184(Player*, s32); void func_play_800B73E0(Player*); -void func_play_800B852C(ObjectId , Item*); +void Play_SpawnVsItem(ObjectId , Item*); void Play_Main(void); void func_play_800A668C(f32 xPos, f32 yPos, f32 zPos); void func_play_800AD7F0(Player* player); diff --git a/include/macros.h b/include/macros.h index e1e1e906..30a1ae1e 100644 --- a/include/macros.h +++ b/include/macros.h @@ -5,6 +5,7 @@ #define SCREEN_WIDTH 320 #define SCREEN_HEIGHT 240 +#define SCREEN_MARGIN 8 #define RAND_FLOAT(max) (Rand_ZeroOne()*(max)) #define RAND_INT(max) ((s32)(Rand_ZeroOne()*(max))) diff --git a/include/sf64event.h b/include/sf64event.h index baded134..3e68d542 100644 --- a/include/sf64event.h +++ b/include/sf64event.h @@ -1,6 +1,63 @@ #ifndef SF64_EVENT #define SF64_EVENT +#define evaLoopCount(actor) (actor)->iwork[0] +#define evaTargetActorIndex(actor) (actor)->iwork[1] +#define evaTrigCondition(actor) (actor)->iwork[2] +#define evaTrigCmdIndex(actor) (actor)->iwork[3] +#define EvaIwork4(actor) (actor)->iwork[4] +#define evaMoveModeZ(actor) (actor)->iwork[5] +#define evaRotateFlag(actor) (actor)->iwork[6] +#define evaTexLineFlag(actor) (actor)->iwork[7] +#define evaTexLineIndex(actor) (actor)->iwork[8] +#define EvaIwork9(actor) (actor)->iwork[9] +#define EvaIwork10(actor) (actor)->iwork[10] +#define EvaIwork11(actor) (actor)->iwork[11] +#define EvaIwork12(actor) (actor)->iwork[12] +#define EvaIwork13(actor) (actor)->iwork[13] +#define EvaIwork14(actor) (actor)->iwork[14] +#define EvaIwork15(actor) (actor)->iwork[15] +#define EvaIwork16(actor) (actor)->iwork[16] +#define EvaIwork17(actor) (actor)->iwork[17] +#define EvaIwork18(actor) (actor)->iwork[18] +#define EvaIwork19(actor) (actor)->iwork[19] +#define evaTrigCondition0(actor) (actor)->iwork[20] +#define evaTrigCondition1(actor) (actor)->iwork[21] +#define evaTrigCondition2(actor) (actor)->iwork[22] +#define evaTrigCondition3(actor) (actor)->iwork[23] +#define evaTrigCondition4(actor) (actor)->iwork[24] + +#define EvaFwork0(actor) (actor)->fwork[0] +#define EvaFwork1(actor) (actor)->fwork[1] +#define EvaFwork2(actor) (actor)->fwork[2] +#define EvaFwork3(actor) (actor)->fwork[3] +#define EvaFwork4(actor) (actor)->fwork[4] +#define EvaFwork5(actor) (actor)->fwork[5] +#define EvaFwork6(actor) (actor)->fwork[6] +#define EvaFwork7(actor) (actor)->fwork[7] +#define EvaFwork8(actor) (actor)->fwork[8] +#define EvaFwork9(actor) (actor)->fwork[9] +#define EvaFwork10(actor) (actor)->fwork[10] +#define EvaFwork11(actor) (actor)->fwork[11] +#define EvaFwork12(actor) (actor)->fwork[12] +#define EvaFwork13(actor) (actor)->fwork[13] +#define EvaFwork14(actor) (actor)->fwork[14] +#define EvaFwork15(actor) (actor)->fwork[15] +#define EvaFwork16(actor) (actor)->fwork[16] +#define evaTargetSpread(actor) (actor)->fwork[17] +#define EvaFwork18(actor) (actor)->fwork[18] +#define EvaFwork19(actor) (actor)->fwork[19] +#define EvaFwork20(actor) (actor)->fwork[20] +#define EvaFwork21(actor) (actor)->fwork[21] +#define EvaFwork22(actor) (actor)->fwork[22] +#define EvaFwork23(actor) (actor)->fwork[23] +#define evaTargetTurnRate(actor) (actor)->fwork[24] +#define EvaFwork25(actor) (actor)->fwork[25] +#define EvaFwork26(actor) (actor)->fwork[26] +#define EvaFwork27(actor) (actor)->fwork[27] +#define EvaFwork28(actor) (actor)->fwork[28] +#define EvaFwork29(actor) (actor)->fwork[29] + #define EV_OPC(opcode) (((opcode) & 0x7F) << 9) #define EV_OPC_MASK(cmd) ((cmd) & (0x7F << 9)) #define EVENT_CMD(opcode, arg1, arg2) (EV_OPC(opcode) | ((s16) (arg1) & 0x1FF)), (arg2) @@ -20,6 +77,7 @@ #define EVENT_SET_ROTATE() EVENT_CMD(EVOP_SET_ROTATE, 0, 0) #define EVENT_STOP_ROTATE() EVENT_CMD(EVOP_STOP_ROTATE, 0, 0) #define EVENT_SET_TRIGGER(cond, cmd) EVENT_CMD(EVOP_SET_TRIGGER, cmd, cond) +#define EVENT_SET_Z_TRIGGER(z, cmd) EVENT_SET_TRIGGER(EVC_CLOSE_Z + (s32)((z) / 10), cmd) #define EVENT_CLEAR_TRIGGER(cmd) EVENT_SET_TRIGGER(EVC_NONE, cmd) #define EVENT_LOOP(count, cmd) EVENT_CMD(EVOP_LOOP, cmd, count) #define EVENT_GOTO(cmd) EVENT_LOOP(0, cmd) @@ -33,16 +91,16 @@ #define EVENT_PLAY_SFX(sfx) EVENT_CMD(EVOP_PLAY_SFX, 0, sfx) #define EVENT_STOP_SFX(sfx) EVENT_CMD(EVOP_STOP_SFX, 0, sfx) #define EVENT_SET_CALL(duration, voiceParam) EVENT_CMD(EVOP_SET_CALL, voiceParam, duration) -#define EVENT_ROT_PLUS_X(rot, rotVel) EVENT_CMD(EVOP_ROT_PLUS_X, rotVel * 10, rot) -#define EVENT_ROT_MINUS_X(rot, rotVel) EVENT_CMD(EVOP_ROT_MINUS_X, rotVel * 10, rot) -#define EVENT_ROT_PLUS_Y(rot, rotVel) EVENT_CMD(EVOP_ROT_PLUS_Y, rotVel * 10, rot) -#define EVENT_ROT_MINUS_Y(rot, rotVel) EVENT_CMD(EVOP_ROT_MINUS_Y, rotVel * 10, rot) -#define EVENT_ROT_PLUS_Z(rot, rotVel) EVENT_CMD(EVOP_ROT_PLUS_Z, rotVel * 10, rot) -#define EVENT_ROT_MINUS_Z(rot, rotVel) EVENT_CMD(EVOP_ROT_MINUS_Z, rotVel * 10, rot) -#define EVENT_F4_PLUS_X(rot, rotVel) EVENT_CMD(EVOP_F4_PLUS_X, rotVel * 10, rot) -#define EVENT_F4_MINUS_X(rot, rotVel) EVENT_CMD(EVOP_F4_MINUS_X, rotVel * 10, rot) -#define EVENT_F4_PLUS_Y(rot, rotVel) EVENT_CMD(EVOP_F4_PLUS_Y, rotVel * 10, rot) -#define EVENT_F4_MINUS_Y(rot, rotVel) EVENT_CMD(EVOP_F4_MINUS_Y, rotVel * 10, rot) +#define EVENT_ROT_PLUS_X(rot, rotVel) EVENT_CMD(EVOP_ROT_PLUS_X, (rotVel) * 10, rot) +#define EVENT_ROT_MINUS_X(rot, rotVel) EVENT_CMD(EVOP_ROT_MINUS_X, (rotVel) * 10, rot) +#define EVENT_ROT_PLUS_Y(rot, rotVel) EVENT_CMD(EVOP_ROT_PLUS_Y, (rotVel) * 10, rot) +#define EVENT_ROT_MINUS_Y(rot, rotVel) EVENT_CMD(EVOP_ROT_MINUS_Y, (rotVel) * 10, rot) +#define EVENT_ROT_PLUS_Z(rot, rotVel) EVENT_CMD(EVOP_ROT_PLUS_Z, (rotVel) * 10, rot) +#define EVENT_ROT_MINUS_Z(rot, rotVel) EVENT_CMD(EVOP_ROT_MINUS_Z, (rotVel) * 10, rot) +#define EVENT_F4_PLUS_X(rot, rotVel) EVENT_CMD(EVOP_F4_PLUS_X, (rotVel) * 10, rot) +#define EVENT_F4_MINUS_X(rot, rotVel) EVENT_CMD(EVOP_F4_MINUS_X, (rotVel) * 10, rot) +#define EVENT_F4_PLUS_Y(rot, rotVel) EVENT_CMD(EVOP_F4_PLUS_Y, (rotVel) * 10, rot) +#define EVENT_F4_MINUS_Y(rot, rotVel) EVENT_CMD(EVOP_F4_MINUS_Y, (rotVel) * 10, rot) #define EVENT_SET_BASE_ZVEL(zvel) EVENT_CMD(EVOP_SET_BASE_ZVEL, 0, zvel) #define EVENT_SET_TEAM_ID(teamId) EVENT_CMD(EVOP_SET_TEAM_ID, 0, teamId) #define EVENT_DAMAGE_TEAM(teamId, damage) EVENT_CMD(EVOP_DAMAGE_TEAM, damage, teamId) @@ -176,7 +234,7 @@ typedef enum EventCondition { /* 67 */ EVC_EXPERT_MODE, /* 68 */ EVC_68, /* 69 */ EVC_69, - /* 100 */ EVC_100=100, + /* 100 */ EVC_CLOSE_Z=100, } EventCondition; typedef enum EventState { @@ -334,6 +392,7 @@ typedef enum EventActorInfo { /* 107 */ EINFO_107, /* 200 */ EINFO_200 = 200, /* 300 */ EINFO_300 = 300, + /* 4095*/ EINFO_FFF = 4095, } EventActorInfo; typedef enum EventSfx { diff --git a/include/sf64object.h b/include/sf64object.h index 80134ba2..b840aac4 100644 --- a/include/sf64object.h +++ b/include/sf64object.h @@ -4,9 +4,9 @@ #include "libultra/ultra64.h" #include "sf64math.h" -#define HITBOX_TYPE_2 200000.0f -#define HITBOX_TYPE_3 300000.0f -#define HITBOX_TYPE_4 400000.0f +#define HITBOX_ROTATED 200000.0f +#define HITBOX_SHADOW 300000.0f +#define HITBOX_WHOOSH 400000.0f typedef struct { /* 0x0 */ f32 offset; diff --git a/include/sf64player.h b/include/sf64player.h index 31523e2a..a18044ea 100644 --- a/include/sf64player.h +++ b/include/sf64player.h @@ -271,11 +271,11 @@ typedef struct Player { /* 0x220 */ s32 timer_220; /* 0x224 */ s32 timer_224; /* 0x228 */ s32 flags_228; - /* 0x22C */ s32 unk_22C; + /* 0x22C */ s32 whooshTimer; /* 0x230 */ s32 unk_230; /* 0x234 */ s32 unk_234; /* 0x238 */ s32 cockpitView; - /* 0x23C */ s32 unk_23C; + /* 0x23C */ s32 shadowing; /* 0x240 */ s32 unk_240; /* 0x244 */ s32 timer_244; /* 0x248 */ f32 unk_248; diff --git a/include/sf64thread.h b/include/sf64thread.h index 9c37be1b..9c43bc72 100644 --- a/include/sf64thread.h +++ b/include/sf64thread.h @@ -103,7 +103,7 @@ extern OSContPad gControllerHold[4]; extern OSContPad gControllerPress[4]; extern u8 gControllerPlugged[4]; extern u32 gControllerLock; -extern u8 gControllerRumble[4]; +extern u8 gControllerRumbleEnabled[4]; extern OSContPad sNextController[4]; // extern OSContPad sPrevController[4]; // extern OSContStatus sControllerStatus[4]; // @@ -167,11 +167,11 @@ extern Lightsn* gLight; extern FrameBuffer* gFrameBuffer; extern u16* gTextureRender; -extern u8 D_80137E78; +extern u8 gVIsPerFrame; extern u32 gSysFrameCount; extern u8 gStartNMI; extern u8 gStopTasks; -extern u8 D_80137E84[4]; +extern u8 gControllerRumbleFlags[4]; extern u16 gFillScreenColor; extern u16 gFillScreen; diff --git a/include/variables.h b/include/variables.h index c56749bb..cd42ca3b 100644 --- a/include/variables.h +++ b/include/variables.h @@ -78,7 +78,7 @@ extern ObjectInit* gLevelObjectInits[]; extern u32 D_enmy_800CFF54[9]; // fox_enmy2 -extern s32 D_enmy2_800CFF80[4]; +extern s32 gTeamEventActorIndex[4]; extern s32 gCallVoiceParam; // fox_hud diff --git a/linker_scripts/us/symbol_addrs.txt b/linker_scripts/us/symbol_addrs.txt index d69e11a9..4864e8d4 100644 --- a/linker_scripts/us/symbol_addrs.txt +++ b/linker_scripts/us/symbol_addrs.txt @@ -60,7 +60,7 @@ D_800C45E0 = 0x800C45E0; D_edisplay_801615D0 = 0x801615D0;//size:0xC D_edisplay_801615E0 = 0x801615E0;//size:0xC -D_enmy2_800CFF80 = 0x800CFF80;//size:0x10 +gTeamEventActorIndex = 0x800CFF80;//size:0x10 D_display_80161578 = 0x80161578;//size:0x30 D_display_800CA23C = 0x800CA23C;//size:0x18 diff --git a/linker_scripts/us/symbol_addrs_engine.txt b/linker_scripts/us/symbol_addrs_engine.txt index 26376749..e5638aa8 100644 --- a/linker_scripts/us/symbol_addrs_engine.txt +++ b/linker_scripts/us/symbol_addrs_engine.txt @@ -516,7 +516,7 @@ D_ctx_80177B50 = 0x80177B50; D_ctx_80177B70 = 0x80177B70; D_ctx_80177B90 = 0x80177B90; D_ctx_80177BB0 = 0x80177BB0; -D_Timer_80177BD0 = 0x80177BD0; +gControllerRumbleTimers = 0x80177BD0; D_ctx_80177BD8 = 0x80177BD8; D_ctx_80177C30 = 0x80177C30; D_ctx_80177C50 = 0x80177C50; @@ -550,7 +550,7 @@ D_ctx_80177D88 = 0x80177D88; gBombCount = 0x80177DA0; gGameFrameCount = 0x80177DB0; D_ctx_80177DC8 = 0x80177DC8; -D_ctx_80177E70 = 0x80177E70; +gPrevEventActorIndex = 0x80177E70; D_ctx_80177E78 = 0x80177E78; gRingPassCount = 0x80177E80; D_ctx_80177E88 = 0x80177E88; // size:0xC @@ -763,7 +763,7 @@ Player_Update2 = 0x800B71E4; func_play_800B73E0 = 0x800B73E0; Play_UpdateLevel = 0x800B79B0; Play_Update = 0x800B832C; -func_play_800B852C = 0x800B852C; +Play_SpawnVsItem = 0x800B852C; func_play_800B86A4 = 0x800B86A4; Play_Main = 0x800B86CC; diff --git a/linker_scripts/us/symbol_addrs_nlib_vars.txt b/linker_scripts/us/symbol_addrs_nlib_vars.txt index 41d531c8..7df28f31 100644 --- a/linker_scripts/us/symbol_addrs_nlib_vars.txt +++ b/linker_scripts/us/symbol_addrs_nlib_vars.txt @@ -11,7 +11,7 @@ gControllerHold = 0x800DD880; // size:0x18 gControllerPress = 0x800DD898; // size:0x18 gControllerPlugged = 0x800DD8B0; // size:0x4 gControllerLock = 0x800DD8B4; // size:0x4 -gControllerRumble = 0x800DD8B8; // size:0x4 +gControllerRumbleEnabled = 0x800DD8B8; // size:0x4 D_800DD8BC = 0x800DD8BC; // ignore:true sNextController = 0x800DD8C0; // size:0x18 sPrevController = 0x800DD8D8; // size:0x18 @@ -75,11 +75,11 @@ gUnkDisp2 = 0x80137E68; gLight = 0x80137E6C; gFrameBuffer = 0x80137E70; gTextureRender = 0x80137E74; -D_80137E78 = 0x80137E78; +gVIsPerFrame = 0x80137E78; gSysFrameCount = 0x80137E7C; gStartNMI = 0x80137E80; gStopTasks = 0x80137E81; -D_80137E84 = 0x80137E84; // size:0x4 +gControllerRumbleFlags = 0x80137E84; // size:0x4 gFillScreenColor = 0x80137E88; gFillScreen = 0x80137E8A; diff --git a/src/engine/fox_beam.c b/src/engine/fox_beam.c index b81d1fd2..62cc5f77 100644 --- a/src/engine/fox_beam.c +++ b/src/engine/fox_beam.c @@ -266,10 +266,10 @@ s32 func_beam_80036874(PlayerShot* shot, f32* hitboxData, Object* obj) { boxRotZ = 0.0f; boxRotY = 0.0f; boxRotX = 0.0f; - if (hitboxData[0] >= HITBOX_TYPE_3) { + if (hitboxData[0] >= HITBOX_SHADOW) { return 0; } - if (hitboxData[0] == HITBOX_TYPE_2) { + if (hitboxData[0] == HITBOX_ROTATED) { rotateBox = 1.0f; boxRotX = hitboxData[1]; boxRotY = hitboxData[2]; @@ -378,7 +378,7 @@ s32 func_beam_80036F88(PlayerShot* shot, Actor* actor) { shotPy = shot->obj.pos.y; shotPz = shot->obj.pos.z; } else { - if (hitboxData[0] == HITBOX_TYPE_2) { + if (hitboxData[0] == HITBOX_ROTATED) { Matrix_RotateZ(gCalcMatrix, -hitboxData[3] * M_DTOR, 0); Matrix_RotateX(gCalcMatrix, -hitboxData[1] * M_DTOR, 1); Matrix_RotateY(gCalcMatrix, -hitboxData[2] * M_DTOR, 1); @@ -665,7 +665,8 @@ void func_beam_80037CF4(PlayerShot* shot, Actor* actor, s32 hitIndex) { break; } } else if ((shot->playerNum >= 100) && (gCurrentLevel == LEVEL_SECTOR_X)) { - if ((gActors[shot->playerNum - 100].obj.id == 200) && (gActors[shot->playerNum - 100].iwork[12] == 5)) { + if ((gActors[shot->playerNum - 100].obj.id == OBJ_ACTOR_EVENT) && + (gActors[shot->playerNum - 100].iwork[12] == TEAM_ID_BILL)) { actor->damage = 30; } } @@ -685,9 +686,9 @@ void func_beam_80037CF4(PlayerShot* shot, Actor* actor, s32 hitIndex) { actor->unk_0D8.y = shot->obj.pos.y; actor->unk_0D8.z = shot->obj.pos.z; if (((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0D2 == 0) && - ((actor->unk_0B4 == 48) || (actor->unk_0B4 == 49) || (actor->unk_0B4 == 50))) || + ((actor->unk_0B4 == EINFO_48) || (actor->unk_0B4 == EINFO_49) || (actor->unk_0B4 == EINFO_50))) || ((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->fwork[23] > 1.0f)) || - ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0D2 == 0) && (actor->unk_0B4 == 67)) || + ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0D2 == 0) && (actor->unk_0B4 == EINFO_67)) || ((actor->obj.id == OBJ_ACTOR_261) && (shot->obj.id != PLAYERSHOT_8) && ((actor->state < 3) || (actor->state >= 5))) || ((actor->obj.id == OBJ_ACTOR_260) && (shot->obj.id != PLAYERSHOT_8) && (actor->timer_0BC != 0))) { @@ -764,13 +765,13 @@ void func_beam_80038140(PlayerShot* shot) { } break; case OBJ_ACTOR_EVENT: - if (actor->unk_0B4 == 42) { + if (actor->unk_0B4 == EINFO_42) { if (func_beam_8003774C(shot, ACTOR_EVENT_ID, &actor->obj)) { actor->unk_0D0 = 1; actor->unk_0D2 = shot->playerNum; return; } - } else if (actor->unk_0B4 == 63) { + } else if (actor->unk_0B4 == EINFO_63) { test.x = fabsf(actor->obj.pos.x - shot->obj.pos.x); test.y = fabsf(actor->obj.pos.y - shot->obj.pos.y); test.z = fabsf(actor->obj.pos.z - shot->obj.pos.z); @@ -1109,9 +1110,9 @@ void func_beam_80039210(PlayerShot* shot) { } else { var_a1 = 0; if ((gCurrentLevel != LEVEL_KATINA) && (shot->playerNum >= 104) && (shot->playerNum != 108)) { - if (gActors[shot->playerNum - 100].obj.id != 200) { + if (gActors[shot->playerNum - 100].obj.id != OBJ_ACTOR_EVENT) { var_a1 = 1; - } else if (gActors[shot->playerNum - 100].iwork[12] == 5) { + } else if (gActors[shot->playerNum - 100].iwork[12] == TEAM_ID_BILL) { var_a1 = 2; } } else if (gCurrentLevel == LEVEL_KATINA) { @@ -1771,7 +1772,7 @@ void func_beam_8003C008(PlayerShot* shot) { count = *hitboxData++; if (count != 0) { for (j = 0; j < count; j++, hitboxData += 6) { - if (hitboxData[0] == HITBOX_TYPE_2) { + if (hitboxData[0] == HITBOX_ROTATED) { Matrix_RotateZ(gCalcMatrix, -hitboxData[3] * M_DTOR, 0); Matrix_RotateX(gCalcMatrix, -hitboxData[1] * M_DTOR, 1); Matrix_RotateY(gCalcMatrix, -hitboxData[2] * M_DTOR, 1); @@ -1888,8 +1889,8 @@ void func_beam_8003C4D0(PlayerShot* shot, s32 damage) { if ((actor->obj.id == OBJ_ACTOR_193) || (actor->obj.id == OBJ_ACTOR_186) || (actor->obj.id == OBJ_ACTOR_190) || (actor->obj.id == OBJ_ACTOR_202) || (actor->obj.id == OBJ_ACTOR_201) || (actor->obj.id == OBJ_ACTOR_187) || - ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0B4 == 78)) || - ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0B4 == 38)) || + ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0B4 == EINFO_78)) || + ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0B4 == EINFO_38)) || (actor->obj.id == OBJ_ACTOR_196)) { actor->unk_0D0 = 2; actor->unk_0D2 = 0; diff --git a/src/engine/fox_bg.c b/src/engine/fox_bg.c index 03e7f34b..e40fcb1b 100644 --- a/src/engine/fox_bg.c +++ b/src/engine/fox_bg.c @@ -117,17 +117,17 @@ void func_bg_8003DAF0(void) { gDPSetRenderMode(gMasterDisp++, G_RM_OPA_SURF, G_RM_OPA_SURF2); var_s2 = D_ctx_80178410; if (var_s2 != 0) { - 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; spf64 = D_ctx_80178424; @@ -144,17 +144,18 @@ void func_bg_8003DAF0(void) { 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 >= 1.25f * SCREEN_WIDTH) { + var_fv1 -= 1.5f * SCREEN_WIDTH; } - var_fv1 -= 160.0f; - if (var_fa0 >= 300.0f) { - var_fa0 -= 360.0f; - } - var_fa0 -= 120.0f; + var_fv1 -= SCREEN_WIDTH / 2.0f; - temp_ft2 = (sp70 * var_fv1) + (spf6C * var_fa0) + 160.0f; - temp_ft0 = (-spf6C * var_fv1) + (sp70 * var_fa0) + 120.0f; + if (var_fa0 >= 1.25f * SCREEN_HEIGHT) { + var_fa0 -= 1.5f * SCREEN_HEIGHT; + } + var_fa0 -= SCREEN_HEIGHT / 2.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) && (temp_ft0 > 0) && (temp_ft0 < SCREEN_HEIGHT)) { gDPPipeSync(gMasterDisp++); gDPSetFillColor(gMasterDisp++, *sp58); diff --git a/src/engine/fox_context.c b/src/engine/fox_context.c index 939f3ff5..06f607d1 100644 --- a/src/engine/fox_context.c +++ b/src/engine/fox_context.c @@ -10,7 +10,7 @@ s32 D_ctx_80177824; // some sort of flag s32 D_ctx_8017782C; // some sort of flag. all range related? GameState gGameState; s32 gNextGameStateTimer; // next game state timer? -s32 D_ctx_80177844; // timer for vs item spawn +s32 gVsItemSpawnTimer; // timer for vs item spawn OptionState gOptionMenuStatus; s32 gPlayState; // pause-related state s32 D_ctx_80177868; // some sort of state. pause-related? @@ -73,7 +73,7 @@ UNK_TYPE F_80177D80; UNK_TYPE F_80177DE8; s32 gGameFrameCount; s32 D_ctx_80177DC8; -s32 D_ctx_80177E70; +s32 gPrevEventActorIndex; s32 D_ctx_80177E78; s32 gRingPassCount; Vec3f D_ctx_80177E88; @@ -286,7 +286,7 @@ f32 D_ctx_80177958[4]; s32 D_ctx_8017796C; OSContPad* gInputHold; OSContPad* gInputPress; -u8* D_ctx_80177984; +u8* gControllerRumble; s32 D_ctx_80177990[4]; f32 D_ctx_801779A8[4]; u8 gPauseEnabled; @@ -307,7 +307,7 @@ u8 D_ctx_80177B4C; u8 D_ctx_80177B6C; u8 gGreatFoxIntact; u8 D_ctx_80177BAC; -u16 D_Timer_80177BD0[4]; +u16 gControllerRumbleTimers[4]; u16 D_ctx_80177C30[4]; s32 D_ctx_80177C50; s32 D_ctx_80177C70; diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index 2314c5c2..fcd01d5e 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -1894,7 +1894,7 @@ void func_demo_8004E3D8(Player* player) { player->unk_280 = 0; if ((gGameFrameCount % 2) != 0) { - D_80137E84[gPlayerNum] = 1; + gControllerRumbleFlags[gPlayerNum] = 1; } switch (player->form) { diff --git a/src/engine/fox_display.c b/src/engine/fox_display.c index 81981513..576b22fa 100644 --- a/src/engine/fox_display.c +++ b/src/engine/fox_display.c @@ -16,9 +16,9 @@ f32 D_display_801615A8[4]; f32 D_display_801615B8[4]; s32 D_display_800CA220 = 0; -u8 D_display_800CA224[] = { 0, 0, 0, 0 }; // -s32 D_display_800CA228 = 0; // -s32 D_display_800CA22C = 0; // +u8 sPlayersVisible[] = { 0, 0, 0, 0 }; // +s32 D_display_800CA228 = 0; // +s32 D_display_800CA22C = 0; // f32 D_display_800CA230 = 0.0f; Actor* D_display_800CA234 = NULL; s32 D_display_Timer_800CA238 = 0; @@ -318,8 +318,8 @@ Gfx* D_display_800CA27C[] = { D_arwing_3001C90, D_arwing_3016CC0, D_arwing_3005A f32 D_display_800CA28C = 2.0f; f32 D_display_800CA290 = 13.0f; f32 D_display_800CA294 = -10.0f; -f32 D_display_800CA298[] = { 0.0f, 0.0f, 0.0f, 0.0f }; -f32 D_display_800CA2A8 = 0.0f; +f32 sCrosshairScales[] = { 0.0f, 0.0f, 0.0f, 0.0f }; +f32 sPlayerShadowing = 0.0f; void func_display_80052B80(Player* player) { Matrix_Push(&gGfxMatrix); @@ -652,22 +652,22 @@ void func_display_80053C38(Player* player, s32 arg1) { } void func_display_80053F7C(Player* player) { - Vec3f* pad; + Vec3f* translate; s32 i; if ((gPlayerNum == player->num) && ((player->form == FORM_ARWING) || (player->form == FORM_LANDMASTER)) && (player->unk_234 != 0) && (((gGameState == GSTATE_PLAY) && (player->state_1C8 == PLAYERSTATE_1C8_3)) || (gGameState == GSTATE_MENU))) { for (i = 0; i < 2; i++) { - pad = &D_display_801613E0[i]; + translate = &D_display_801613E0[i]; Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, pad->x, pad->y, pad->z, 1); + Matrix_Translate(gGfxMatrix, translate->x, translate->y, translate->z, 1); if (gChargeTimers[player->num] >= 20) { RCP_SetupDL(&gMasterDisp, 0x3F); if (i == 1) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 255); - Math_SmoothStepToF(&D_display_800CA298[player->num], 2.0f, 1.0f, 0.4f, 0.0f); + Math_SmoothStepToF(&sCrosshairScales[player->num], 2.0f, 1.0f, 0.4f, 0.0f); } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255); gDPSetEnvColor(gMasterDisp++, 255, 255, 0, 255); @@ -676,8 +676,8 @@ void func_display_80053F7C(Player* player) { RCP_SetupDL_36(); } if (i == 1) { - Matrix_Scale(gGfxMatrix, D_display_800CA298[player->num], D_display_800CA298[player->num], 1.0f, 1); - Math_SmoothStepToF(&D_display_800CA298[player->num], 1.0f, 1.0f, 0.2f, 0.0f); + Matrix_Scale(gGfxMatrix, sCrosshairScales[player->num], sCrosshairScales[player->num], 1.0f, 1); + Math_SmoothStepToF(&sCrosshairScales[player->num], 1.0f, 1.0f, 0.2f, 0.0f); } Matrix_Scale(gGfxMatrix, 4.0f, 4.0f, 4.0f, 1); Matrix_SetGfxMtx(&gMasterDisp); @@ -705,16 +705,16 @@ void func_display_80054280(Player* player, s32 arg1) { } void func_display_80054300(Player* player) { - Math_SmoothStepToF(&D_display_800CA2A8, player->unk_23C, 1.0f, 10.0f, 0.0f); + Math_SmoothStepToF(&sPlayerShadowing, player->shadowing, 1.0f, 10.0f, 0.0f); RCP_SetupDL(&gMasterDisp, 0x42); - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, (s32) D_display_800CA2A8); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, (s32) sPlayerShadowing); if (player->unk_068 > 30.0f) { gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); } if ((gGroundType == GROUNDTYPE_WATER) && (player->unk_068 < 10.0f)) { - player->unk_23C = 90; + player->shadowing = 90; } else { - player->unk_23C = 180; + player->shadowing = 180; } switch (player->form) { case FORM_ARWING: @@ -1166,14 +1166,14 @@ bool func_display_800563B4(s32 index, s32 arg1) { if (fabsf(sp20.x) < (fabsf(sp20.z * 0.5f) + 500.0f)) { if (fabsf(sp20.y) < (fabsf(sp20.z * 0.5f) + 500.0f)) { if (arg1 == 0) { - D_display_800CA224[index] = 1; + sPlayersVisible[index] = 1; } return true; } } } if (arg1 == 0) { - D_display_800CA224[index] = 0; + sPlayersVisible[index] = 0; } return false; } @@ -1303,12 +1303,7 @@ Gfx* D_display_800CA354[] = { f32 D_display_800CA380 = 0.0f; f32 D_display_800CA384 = 0.0f; f32 D_display_800CA388 = -300.0f; -f32 D_display_800CA38C[] = { - 0.0f, - -300.0f, - -150.0f, - -50.0f, -}; +f32 D_display_800CA38C[] = { 0.0f, -300.0f, -150.0f, -50.0f }; void func_display_80056E2C(Player* player) { f32 sp34; @@ -1648,7 +1643,7 @@ void Play_Draw(void) { Matrix_Push(&gGfxMatrix); Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, 1); for (i = 0, opponent = gPlayer; i < gCamCount; i++, opponent++) { - if (D_display_800CA224[i] != 0) { + if (sPlayersVisible[i] != 0) { func_display_80055B58(opponent); func_display_80056230(opponent); } @@ -1670,7 +1665,7 @@ void Play_Draw(void) { } gReflectY = 1; for (i = 0, opponent = gPlayer; i < gCamCount; i++, opponent++) { - if (D_display_800CA224[i] != 0) { + if (sPlayersVisible[i] != 0) { func_display_80056E2C(opponent); func_display_80055B58(opponent); func_display_80056230(opponent); @@ -1691,7 +1686,7 @@ void Play_Draw(void) { func_display_80053B18(); } for (i = 0, opponent = gPlayer; i < gCamCount; i++, opponent++) { - if (D_display_800CA224[i] != 0) { + if (sPlayersVisible[i] != 0) { if (gShowCrosshairs[i]) { func_display_80053F7C(opponent); } @@ -1712,6 +1707,6 @@ void Play_Draw(void) { } Matrix_Pop(&gGfxMatrix); func_display_80051B30(); - D_display_800CA224[gPlayerNum] = 0; + sPlayersVisible[gPlayerNum] = 0; Matrix_Pop(&gGfxMatrix); } diff --git a/src/engine/fox_edisplay.c b/src/engine/fox_edisplay.c index 9a60f9f9..29d1506b 100644 --- a/src/engine/fox_edisplay.c +++ b/src/engine/fox_edisplay.c @@ -638,13 +638,13 @@ void func_edisplay_8005BAB4(ObjectId objId, s32 index) { case OBJ_ACTOR_TEAM_BOSS: case OBJ_ACTOR_EVENT: switch (gActors[index].unk_0B4) { - case 3: + case EINFO_3: Matrix_Scale(gGfxMatrix, 2.3f, 0.0f, 2.3f, 1); Matrix_RotateX(gGfxMatrix, M_PI / 2, 1); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_102A010); break; - case 81: + case EINFO_81: RCP_SetupDL(&gMasterDisp, 0x30); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 255); diff --git a/src/engine/fox_effect.c b/src/engine/fox_effect.c index 6aca85e3..5be131bd 100644 --- a/src/engine/fox_effect.c +++ b/src/engine/fox_effect.c @@ -2817,10 +2817,10 @@ bool func_effect_8007FD84(Effect* effect) { s32 i; Actor* actor; - for (i = 1; i < ARRAY_COUNT(D_enmy2_800CFF80); i++) { - actor = &gActors[D_enmy2_800CFF80[i]]; + for (i = 1; i < ARRAY_COUNT(gTeamEventActorIndex); i++) { + actor = &gActors[gTeamEventActorIndex[i]]; if (actor->obj.status == OBJ_ACTIVE) { - if ((actor->iwork[12] > 0) && (actor->iwork[12] < 6) && + if ((actor->iwork[12] >= TEAM_ID_FALCO) && (actor->iwork[12] <= TEAM_ID_BILL) && (fabsf(actor->obj.pos.z - effect->obj.pos.z) < 100.0f) && (fabsf(actor->obj.pos.x - effect->obj.pos.x) < 100.0f) && (fabsf(actor->obj.pos.y - effect->obj.pos.y) < 100.0f)) { @@ -3394,7 +3394,7 @@ void func_effect_8008165C(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scal effect->obj.pos.z = zPos; AUDIO_PLAY_SFX(0x2940F026, effect->sfxSource, 4); - D_Timer_80177BD0[0] = 60; + gControllerRumbleTimers[0] = 60; break; } } diff --git a/src/engine/fox_enmy.c b/src/engine/fox_enmy.c index d5d7a43a..3f31b401 100644 --- a/src/engine/fox_enmy.c +++ b/src/engine/fox_enmy.c @@ -384,14 +384,14 @@ void func_enmy_80061F0C(Actor* actor, ObjectInit* objInit, s32 index) { actor->unk_0F4.z = objInit->rot.z; actor->obj.id = OBJ_ACTOR_EVENT; actor->timer_0C2 = 10; - actor->unk_0B4 = 4095; + actor->unk_0B4 = EINFO_FFF; actor->aiType = objInit->id - ACTOR_EVENT_ID; Object_SetInfo(&actor->info, actor->obj.id); actor->info.unk_10 = 3000.0f; actor->fwork[25] = 20000.0f; - actor->iwork[1] = D_ctx_80177E70; - actor->iwork[10] = gActors[D_ctx_80177E70].aiType; + actor->iwork[1] = gPrevEventActorIndex; + actor->iwork[10] = gActors[gPrevEventActorIndex].aiType; actor->fwork[22] = D_play_80161A54; Matrix_RotateZ(gCalcMatrix, -D_ctx_80177E88.z * M_DTOR, 0); Matrix_RotateX(gCalcMatrix, -D_ctx_80177E88.x * M_DTOR, 1); @@ -401,7 +401,7 @@ void func_enmy_80061F0C(Actor* actor, ObjectInit* objInit, s32 index) { sp24.z = actor->obj.pos.z - D_ctx_80177F10.z; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp24, &actor->vwork[28]); actor->iwork[9] = D_ctx_80177E78; - D_ctx_80177E70 = index; + gPrevEventActorIndex = index; Actor_Update(actor); } @@ -666,10 +666,10 @@ bool func_enmy_80062DBC(Vec3f* pos, f32* hitboxData, Object* obj, f32 xRot, f32 for (i = 0; i < count; i++, hitboxData += 6) { rotate = 0.0f; hitRot.x = hitRot.y = hitRot.z = 0.0f; - if (*hitboxData >= HITBOX_TYPE_3) { + if (*hitboxData >= HITBOX_SHADOW) { return false; } - if (*hitboxData == HITBOX_TYPE_2) { + if (*hitboxData == HITBOX_ROTATED) { rotate = 1.0f; hitRot.x = hitboxData[1]; hitRot.y = hitboxData[2]; @@ -2493,7 +2493,7 @@ void Actor_Move(Actor* actor) { f32 var_fv0 = 4000.0f; if ((actor->obj.id == OBJ_ACTOR_236) || (gCurrentLevel == LEVEL_MACBETH) || - ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0B4 == 56))) { + ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0B4 == EINFO_56))) { var_fv0 = 8000.0f; } else if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_8) { var_fv0 = 100000.0f; @@ -2515,7 +2515,7 @@ void Actor_Move(Actor* actor) { D_ctx_80176550[actor->unk_046] = 0; break; case OBJ_ACTOR_EVENT: - if ((actor->unk_0B4 >= 200) && (actor->unk_0B4 < 300)) { + if ((actor->unk_0B4 >= EINFO_200) && (actor->unk_0B4 < EINFO_300)) { D_ctx_80176550[actor->unk_046] = 0; } else if ((actor->unk_0B4 == EINFO_38) && (actor->unk_046 != 2)) { gRingPassCount = -1; diff --git a/src/engine/fox_enmy2.c b/src/engine/fox_enmy2.c index 793e9e87..c47ceaca 100644 --- a/src/engine/fox_enmy2.c +++ b/src/engine/fox_enmy2.c @@ -21,7 +21,7 @@ #include "assets/ast_ve1_boss.h" #include "assets/ast_zoness.h" -s32 D_enmy2_800CFF80[4] = { 0, 0, 0, 0 }; +s32 gTeamEventActorIndex[4] = { 0, 0, 0, 0 }; s32 gCallVoiceParam = 0; s32 gCallTimer; @@ -1186,7 +1186,7 @@ void ActorEvent_ProcessScript(ActorEvent* this) { this->iwork[12] = actorScript[this->aiIndex + 1]; if (this->iwork[12] <= TEAM_ID_PEPPY) { - D_enmy2_800CFF80[this->iwork[12]] = this->index; + gTeamEventActorIndex[this->iwork[12]] = this->index; } this->aiIndex += 2; @@ -1373,7 +1373,7 @@ void ActorEvent_ProcessScript(ActorEvent* this) { case EV_OPC(EVOP_SET_TARGET): this->state = EVSTATE_WAIT; - this->iwork[1] = D_enmy2_800CFF80[actorScript[this->aiIndex] & 0x1FF]; + this->iwork[1] = gTeamEventActorIndex[actorScript[this->aiIndex] & 0x1FF]; this->fwork[17] = actorScript[this->aiIndex + 1]; this->timer_0BC = 0; this->aiIndex += 2; @@ -1646,7 +1646,8 @@ void func_enmy2_8006ECBC(PlayerShotId objId, PlayerShot* shot, s32 unk0E4, f32 x } else { AUDIO_PLAY_SFX(0x29002002, shot->sfxSource, 4); } - } else if ((unk0E4 < 60) && (gActors[unk0E4].obj.id == OBJ_ACTOR_EVENT) && (gActors[unk0E4].iwork[12] > 0)) { + } else if ((unk0E4 < 60) && (gActors[unk0E4].obj.id == OBJ_ACTOR_EVENT) && + (gActors[unk0E4].iwork[12] >= TEAM_ID_FALCO)) { AUDIO_PLAY_SFX(0x2900000D, shot->sfxSource, 4); } else if (unk0E4 + 100 == 200) { shot->playerNum = 100; @@ -2281,8 +2282,8 @@ void ActorEvent_ProcessTriggers(ActorEvent* this) { } } - if (this->iwork[2] >= 100) { - if (fabsf(this->obj.pos.z - gPlayer[0].unk_138) <= ((this->iwork[2] - 100) * 100.0f)) { + 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); } return; diff --git a/src/engine/fox_game.c b/src/engine/fox_game.c index 815d567f..0346696a 100644 --- a/src/engine/fox_game.c +++ b/src/engine/fox_game.c @@ -141,28 +141,31 @@ bool func_game_800A1B6C(void) { return false; } -void func_game_800A1C14(Gfx** arg0) { - gSPDisplayList((*arg0)++, gRcpInitDL); - gDPSetScissor((*arg0)++, G_SC_NON_INTERLACE, 8, 8, SCREEN_WIDTH - 8, SCREEN_HEIGHT - 8); - gDPSetDepthImage((*arg0)++, &gZBuffer); - gDPSetColorImage((*arg0)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, &gZBuffer); - gDPSetFillColor((*arg0)++, FILL_COLOR(GPACK_ZDZ(G_MAXFBZ, 0))); - gDPFillRectangle((*arg0)++, 8, 8, SCREEN_WIDTH - 8 - 1, SCREEN_HEIGHT - 8 - 1); - gDPSetColorImage((*arg0)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, gFrameBuffer); +void func_game_800A1C14(Gfx** dList) { + gSPDisplayList((*dList)++, gRcpInitDL); + gDPSetScissor((*dList)++, G_SC_NON_INTERLACE, SCREEN_MARGIN, SCREEN_MARGIN, SCREEN_WIDTH - SCREEN_MARGIN, + SCREEN_HEIGHT - SCREEN_MARGIN); + gDPSetDepthImage((*dList)++, &gZBuffer); + gDPSetColorImage((*dList)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, &gZBuffer); + gDPSetFillColor((*dList)++, FILL_COLOR(GPACK_ZDZ(G_MAXFBZ, 0))); + gDPFillRectangle((*dList)++, SCREEN_MARGIN, SCREEN_MARGIN, SCREEN_WIDTH - SCREEN_MARGIN - 1, + SCREEN_HEIGHT - SCREEN_MARGIN - 1); + gDPSetColorImage((*dList)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, gFrameBuffer); if (gBlurAlpha < 255) { - gDPPipeSync((*arg0)++); - gDPSetCycleType((*arg0)++, G_CYC_1CYCLE); - gDPSetCombineMode((*arg0)++, G_CC_PRIMITIVE, G_CC_PRIMITIVE); - gDPSetRenderMode((*arg0)++, G_RM_XLU_SURF, G_RM_XLU_SURF2); - gDPSetPrimColor((*arg0)++, 0x00, 0x00, RGBA16_RED(gBgColor) * 8, RGBA16_GRN(gBgColor) * 8, + gDPPipeSync((*dList)++); + gDPSetCycleType((*dList)++, G_CYC_1CYCLE); + gDPSetCombineMode((*dList)++, G_CC_PRIMITIVE, G_CC_PRIMITIVE); + gDPSetRenderMode((*dList)++, G_RM_XLU_SURF, G_RM_XLU_SURF2); + gDPSetPrimColor((*dList)++, 0x00, 0x00, RGBA16_RED(gBgColor) * 8, RGBA16_GRN(gBgColor) * 8, RGBA16_BLU(gBgColor) * 8, gBlurAlpha); } else { - gDPSetFillColor((*arg0)++, FILL_COLOR(gBgColor | 1)); + gDPSetFillColor((*dList)++, FILL_COLOR(gBgColor | 1)); } - gDPFillRectangle((*arg0)++, 8, 8, SCREEN_WIDTH - 8 - 1, SCREEN_HEIGHT - 8); - gDPPipeSync((*arg0)++); - gDPSetColorDither((*arg0)++, G_CD_MAGICSQ); + gDPFillRectangle((*dList)++, SCREEN_MARGIN, SCREEN_MARGIN, SCREEN_WIDTH - SCREEN_MARGIN - 1, + SCREEN_HEIGHT - SCREEN_MARGIN); + gDPPipeSync((*dList)++); + gDPSetColorDither((*dList)++, G_CD_MAGICSQ); } void func_game_800A1E68(Gfx** arg0) { @@ -194,7 +197,8 @@ void func_game_800A1FB0(Gfx** arg0, u8 arg1, u8 arg2) { gViewport->vp.vtrans[1] = SCREEN_HEIGHT * (2.0f - D_game_80161A14) * 2; gViewport->vp.vtrans[2] = G_MAXZ / 2; gViewport->vp.vtrans[3] = 0; - gDPSetScissor((*arg0)++, G_SC_NON_INTERLACE, 8, 8, SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2); + gDPSetScissor((*arg0)++, G_SC_NON_INTERLACE, SCREEN_MARGIN, SCREEN_MARGIN, SCREEN_WIDTH / 2, + SCREEN_HEIGHT / 2); break; case 1: gViewport->vp.vscale[0] = SCREEN_WIDTH * (D_game_80161A14 - 1.0f) * 2; @@ -205,7 +209,8 @@ void func_game_800A1FB0(Gfx** arg0, u8 arg1, u8 arg2) { gViewport->vp.vtrans[1] = SCREEN_HEIGHT * (2.0f - D_game_80161A14) * 2; gViewport->vp.vtrans[2] = G_MAXZ / 2; gViewport->vp.vtrans[3] = 0; - gDPSetScissor((*arg0)++, G_SC_NON_INTERLACE, SCREEN_WIDTH / 2, 8, SCREEN_WIDTH - 8, SCREEN_HEIGHT / 2); + gDPSetScissor((*arg0)++, G_SC_NON_INTERLACE, SCREEN_WIDTH / 2, SCREEN_MARGIN, + SCREEN_WIDTH - SCREEN_MARGIN, SCREEN_HEIGHT / 2); break; case 2: gViewport->vp.vscale[0] = SCREEN_WIDTH * (D_game_80161A14 - 1.0f) * 2; @@ -216,7 +221,8 @@ void func_game_800A1FB0(Gfx** arg0, u8 arg1, u8 arg2) { gViewport->vp.vtrans[1] = SCREEN_HEIGHT * D_game_80161A14 * 2; gViewport->vp.vtrans[2] = G_MAXZ / 2; gViewport->vp.vtrans[3] = 0; - gDPSetScissor((*arg0)++, G_SC_NON_INTERLACE, 8, SCREEN_HEIGHT / 2, SCREEN_WIDTH / 2, SCREEN_HEIGHT - 8); + gDPSetScissor((*arg0)++, G_SC_NON_INTERLACE, SCREEN_MARGIN, SCREEN_HEIGHT / 2, SCREEN_WIDTH / 2, + SCREEN_HEIGHT - SCREEN_MARGIN); break; case 3: gViewport->vp.vscale[0] = SCREEN_WIDTH * (D_game_80161A14 - 1.0f) * 2; @@ -227,8 +233,8 @@ void func_game_800A1FB0(Gfx** arg0, u8 arg1, u8 arg2) { gViewport->vp.vtrans[1] = SCREEN_HEIGHT * D_game_80161A14 * 2; gViewport->vp.vtrans[2] = G_MAXZ / 2; gViewport->vp.vtrans[3] = 0; - gDPSetScissor((*arg0)++, G_SC_NON_INTERLACE, SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2, SCREEN_WIDTH - 8, - SCREEN_HEIGHT - 8); + gDPSetScissor((*arg0)++, G_SC_NON_INTERLACE, SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2, + SCREEN_WIDTH - SCREEN_MARGIN, SCREEN_HEIGHT - SCREEN_MARGIN); break; default: func_game_800A1F44(); @@ -473,7 +479,8 @@ void Game_Update(void) { func_game_800A1FB0(&gMasterDisp, gCamCount, 1); Game_Draw(1); gDPPipeSync(gMasterDisp++); - gDPSetScissor(gMasterDisp++, G_SC_NON_INTERLACE, 8, 8, SCREEN_WIDTH - 8, SCREEN_HEIGHT - 8); + gDPSetScissor(gMasterDisp++, G_SC_NON_INTERLACE, SCREEN_MARGIN, SCREEN_MARGIN, SCREEN_WIDTH - SCREEN_MARGIN, + SCREEN_HEIGHT - SCREEN_MARGIN); } else if ((gCamCount == 4) && (gDrawMode != DRAW_NONE)) { func_game_800A1FB0(&gMasterDisp, gCamCount, 3); Game_Draw(3); @@ -482,23 +489,28 @@ void Game_Update(void) { func_game_800A1FB0(&gMasterDisp, gCamCount, 1); Game_Draw(1); gDPPipeSync(gMasterDisp++); - gDPSetScissor(gMasterDisp++, G_SC_NON_INTERLACE, 8, 8, SCREEN_WIDTH - 8, SCREEN_HEIGHT - 8); + gDPSetScissor(gMasterDisp++, G_SC_NON_INTERLACE, SCREEN_MARGIN, SCREEN_MARGIN, SCREEN_WIDTH - SCREEN_MARGIN, + SCREEN_HEIGHT - SCREEN_MARGIN); gDPSetColorDither(gMasterDisp++, G_CD_NOISE); gDPSetAlphaDither(gMasterDisp++, G_AD_NOISE); 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); - gDPFillRectangle(gMasterDisp++, SCREEN_WIDTH / 2 - 3, 8, SCREEN_WIDTH / 2 + 2, SCREEN_HEIGHT - 8); - gDPFillRectangle(gMasterDisp++, 8, SCREEN_HEIGHT / 2 - 3, SCREEN_WIDTH - 8, SCREEN_HEIGHT / 2 + 2); + 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); } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x0, 100, 100, 255, 255); } - gDPFillRectangle(gMasterDisp++, SCREEN_WIDTH / 2 - 2, 8, SCREEN_WIDTH / 2 + 1, SCREEN_HEIGHT - 8); - gDPFillRectangle(gMasterDisp++, 8, SCREEN_HEIGHT / 2 - 2, SCREEN_WIDTH - 8, SCREEN_HEIGHT / 2 + 1); + gDPFillRectangle(gMasterDisp++, SCREEN_WIDTH / 2 - 1 - 1, SCREEN_MARGIN, SCREEN_WIDTH / 2 + 1, + SCREEN_HEIGHT - SCREEN_MARGIN); + gDPFillRectangle(gMasterDisp++, SCREEN_MARGIN, SCREEN_HEIGHT / 2 - 1 - 1, SCREEN_WIDTH - SCREEN_MARGIN, + SCREEN_HEIGHT / 2 + 1); func_hud_8008CB8C(); } diff --git a/src/engine/fox_hud.c b/src/engine/fox_hud.c index d4bc0b31..69c10c92 100644 --- a/src/engine/fox_hud.c +++ b/src/engine/fox_hud.c @@ -1028,7 +1028,8 @@ void func_hud_80087788(void) { TextureRect_16bRGBA(&gMasterDisp, D_800D1D18[j + 1] + (44 * 20 * i), 44, 20, x[j][0], y[j][0] + (f32) (20 * i), 1.0f, 1.0f); } - TextureRect_16bRGBA(&gMasterDisp, D_800D1D18[j + 1] + (44 * 40), 44, 4, x[j][0], y[j][0] + 40.0f, 1.0f, 1.0f); + TextureRect_16bRGBA(&gMasterDisp, D_800D1D18[j + 1] + (44 * 20 * 2), 44, 4, x[j][0], y[j][0] + 40.0f, 1.0f, + 1.0f); func_hud_80086110(x[j][2], y[j][2], shield); } @@ -1477,7 +1478,7 @@ void func_hud_80088970(void) { D_80161838[0] = 0; case 3: - Graphics_FillRectangle(&gMasterDisp, 0, 0, 319, 239, 0, 0, 0, 255); + Graphics_FillRectangle(&gMasterDisp, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, 0, 0, 0, 255); gFillScreenAlphaTarget = 0; @@ -1526,7 +1527,7 @@ void func_hud_80088970(void) { break; case 4: - Graphics_FillRectangle(&gMasterDisp, 0, 0, 319, 239, 0, 0, 0, 255); + Graphics_FillRectangle(&gMasterDisp, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, 0, 0, 0, 255); if (D_80161838[0] < 140) { break; } @@ -1544,7 +1545,7 @@ void func_hud_80088970(void) { } case 5: - Graphics_FillRectangle(&gMasterDisp, 0, 0, 319, 239, 0, 0, 0, 255); + Graphics_FillRectangle(&gMasterDisp, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, 0, 0, 0, 255); for (i = 0; i < 6; i++) { if (gPrevPlanetTeamShields[i] == -1) { @@ -2646,51 +2647,52 @@ void func_hud_8008BD00(u8* texturePtr, s32 xPos, s32 yPos, u8 arg3) { } } -void func_hud_8008C104(u16* texture, u16* arg1) { - u16 *temp, *dst; - u16 src[1024]; - f32 temp1; +void func_hud_8008C104(u16* srcTexture, u16* dstTexture) { + u16 *src, *dst; + u16 buffer[1024]; + f32 rowPhase; f32 angle; s32 j; s32 i; s32 width = 32; s32 height = 32; - s32 temp3; - s32 temp2; + s32 halfHeight; + s32 offset; - temp = SEGMENTED_TO_VIRTUAL(texture); - dst = SEGMENTED_TO_VIRTUAL(arg1); + src = SEGMENTED_TO_VIRTUAL(srcTexture); + dst = SEGMENTED_TO_VIRTUAL(dstTexture); - Texture_Scroll(texture, width, height, 1); + Texture_Scroll(srcTexture, width, height, 1); - temp3 = height / 2; + halfHeight = height / 2; - temp1 = 0.0f; + rowPhase = 0.0f; - i = temp3 - 1; + i = halfHeight - 1; while (1) { - if ((temp1 += 90.0f / temp3) > 90.0f) { + if ((rowPhase += 90.0f / halfHeight) > 90.0f) { break; } - angle = (height / 2) * COS_DEG(temp1); - temp2 = angle; + angle = (height / 2) * COS_DEG(rowPhase); + offset = angle; - if (temp2 >= height) { - temp2 = 0; + if (offset >= height) { + offset = 0; } for (j = 0; j < width; j++) { - src[(i * width) + j] = temp[(temp2 * width) + j]; + buffer[(i * width) + j] = src[(offset * width) + j]; } for (j = 0; j < width; j++) { - src[(((temp3 - i) + (temp3 - 1)) * width) + j] = temp[(((temp3 - temp2) + (temp3 - 1)) * width) + j]; + buffer[(((halfHeight - i) + (halfHeight - 1)) * width) + j] = + src[(((halfHeight - offset) + (halfHeight - 1)) * width) + j]; } i--; } - Texture_Mottle(dst, src, 2); + Texture_Mottle(dst, buffer, 2); } void func_hud_8008C390(f32 xPos, f32 yPos, f32 scale, s32 number) { @@ -2722,10 +2724,10 @@ void func_hud_8008C5C8(f32 arg0, f32 arg1, f32 arg2, s32 arg3) { s32 i; for (i = 0; i < 2; i++) { - TextureRect_16bRGBA(&gMasterDisp, D_800D1EE8[arg3] + (880 * i), 44, 20, arg0, (20 * i * arg2) + arg1, arg2, + TextureRect_16bRGBA(&gMasterDisp, D_800D1EE8[arg3] + (44 * 20 * i), 44, 20, arg0, (20 * i * arg2) + arg1, arg2, arg2); } - TextureRect_16bRGBA(&gMasterDisp, D_800D1EE8[arg3] + 1760, 44, 4, arg0, (40.0f * arg2) + arg1, arg2, arg2); + TextureRect_16bRGBA(&gMasterDisp, D_800D1EE8[arg3] + 44 * 20 * 2, 44, 4, arg0, (40.0f * arg2) + arg1, arg2, arg2); } void func_hud_8008C6F4(s32 idx, s32 arg1) { @@ -2874,10 +2876,10 @@ void func_hud_8008CFB8(f32 arg0, f32 arg1, f32 arg2, f32 arg3) { s32 i; for (i = 0; i < 3; i++) { - TextureRect_8bIA(&gMasterDisp, D_versus_3000BC0 + 2 * ((640 * i) / 2), 80, 8, arg0, (8 * i * arg3) + arg1, arg2, - arg3); + TextureRect_8bIA(&gMasterDisp, D_versus_3000BC0 + 2 * ((80 * 8 * i) / 2), 80, 8, arg0, (8 * i * arg3) + arg1, + arg2, arg3); } - TextureRect_8bIA(&gMasterDisp, D_versus_3000BC0 + 2 * ((640 * i) / 2), 80, 2, arg0, (8 * i * arg3) + arg1, arg2, + TextureRect_8bIA(&gMasterDisp, D_versus_3000BC0 + 2 * ((80 * 8 * i) / 2), 80, 2, arg0, (8 * i * arg3) + arg1, arg2, arg3); } @@ -6067,7 +6069,7 @@ void func_hud_80096A74(Player* player) { func_play_800B2574(player); - D_80137E84[0] = 0; + gControllerRumbleFlags[0] = 0; gControllerHold[player->num].button = button; gCsCamEyeX = player->pos.x; diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index 57a59e0f..a46b0a58 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -497,7 +497,7 @@ void func_play_800A594C(void) { } if (D_ctx_8017782C == 0) { if (gCurrentLevel == LEVEL_SOLAR) { - func_8001D1C8(0xFF, 1); + func_8001D1C8(255, 1); AUDIO_PLAY_SFX(0x4100C023, gDefaultSfxSource, 4); Audio_KillSfxBySourceAndId(gPlayer[0].sfxSource, 0x3140807E); } @@ -655,7 +655,7 @@ void func_play_800A6148(void) { PlayerShot_Initialize(&gPlayerShots[i]); } D_ctx_801782B8 = D_ctx_801782BC = D_ctx_801782C0 = D_ctx_801782D0 = gBossActive = D_ctx_8017828C = D_ctx_8017812C = - D_ctx_80177E70 = D_ctx_80177E78 = gRingPassCount = 0; + gPrevEventActorIndex = D_ctx_80177E78 = gRingPassCount = 0; D_ctx_80177F10.x = D_ctx_80177F10.y = D_ctx_80177F10.z = D_ctx_80177E88.x = D_ctx_80177E88.y = D_ctx_80177E88.z = 0.0f; for (i = 0; i < ARRAY_COUNT(gTeamArrowsViewPos); i++) { @@ -1085,7 +1085,7 @@ s32 func_play_800A7974(Player* player, f32* hitboxData, s32* index, f32 xPos, f3 hitboxData++; for (i = 0; i < count; i++, hitboxData += 6) { spA0 = 0; - if (*hitboxData == HITBOX_TYPE_2) { + if (*hitboxData == HITBOX_ROTATED) { Matrix_RotateZ(gCalcMatrix, -hitboxData[3] * M_DTOR, 0); Matrix_RotateX(gCalcMatrix, -hitboxData[1] * M_DTOR, 1); Matrix_RotateY(gCalcMatrix, -hitboxData[2] * M_DTOR, 1); @@ -1095,7 +1095,7 @@ s32 func_play_800A7974(Player* player, f32* hitboxData, s32* index, f32 xPos, f3 hitboxData += 4; spA0 = 1; } else { - if (*hitboxData >= HITBOX_TYPE_3) { + if (*hitboxData >= HITBOX_SHADOW) { hitboxData++; } Matrix_RotateZ(gCalcMatrix, -zRot * M_DTOR, 0); @@ -1122,15 +1122,15 @@ s32 func_play_800A7974(Player* player, f32* hitboxData, s32* index, f32 xPos, f3 } if (func_play_800A78C4((Hitbox*) hitboxData, xPos, yPos, zPos, var_fv0, var_fv1, var_fa0)) { *index = i + 1; - if (hitboxData[-1] == HITBOX_TYPE_3) { + if (hitboxData[-1] == HITBOX_SHADOW) { return -1; } - if (hitboxData[-1] == HITBOX_TYPE_4) { + if (hitboxData[-1] == HITBOX_WHOOSH) { return -2; } return 3; } - if (hitboxData[-1] < HITBOX_TYPE_3) { + if (hitboxData[-1] < HITBOX_SHADOW) { if ((yRot == 0.0f) && (zRot == 0.0f) && (xRot == 0.0f) && (spA0 == 0)) { var_fv0 = player->hit4.x; var_fv1 = player->hit4.y; @@ -1658,12 +1658,12 @@ void func_play_800A8BA4(Player* player) { obj58->obj.pos.y, obj58->obj.pos.z, obj58->obj.rot.x, obj58->obj.rot.y, obj58->obj.rot.z, 0.0f, 0.0f, 0.0f); if ((temp_v0 != 0) && (temp_v0 < 0)) { - if (player->unk_22C == 0) { + if (player->whooshTimer == 0) { func_effect_8007A6F0(&obj58->obj.pos, 0x19000001); } - player->unk_22C += 2; - if (player->unk_22C >= 4) { - player->unk_22C = 4; + player->whooshTimer += 2; + if (player->whooshTimer >= 4) { + player->whooshTimer = 4; } } } @@ -1673,12 +1673,12 @@ void func_play_800A8BA4(Player* player) { obj58->obj.rot.y, obj58->obj.rot.z, 0.0f, 0.0f, 0.0f); if (temp_v0 != 0) { if (temp_v0 < 0) { - if (player->unk_22C == 0) { + if (player->whooshTimer == 0) { func_effect_8007A6F0(&obj58->obj.pos, 0x19000001); } - player->unk_22C += 2; - if (player->unk_22C >= 4) { - player->unk_22C = 4; + player->whooshTimer += 2; + if (player->whooshTimer >= 4) { + player->whooshTimer = 4; } } else if ((player->form == FORM_LANDMASTER) || (player->form == FORM_ON_FOOT)) { func_play_800A729C(player, temp_v0, obj58->obj.pos.x, obj58->obj.pos.z); @@ -1764,22 +1764,22 @@ void func_play_800A8BA4(Player* player) { D_ctx_80178570 = 20; D_ctx_80178574 = 20; D_ctx_80178578 = 20; - player->unk_23C = 80; + player->shadowing = 80; } - if (player->unk_22C == 0) { + if (player->whooshTimer == 0) { AUDIO_PLAY_SFX(0x19000001, obj80->sfxSource, 0); } - player->unk_22C += 2; - if (player->unk_22C >= 4) { - player->unk_22C = 4; + player->whooshTimer += 2; + if (player->whooshTimer >= 4) { + player->whooshTimer = 4; } } else if (obj80->obj.id == OBJ_80_54) { - if (player->unk_22C == 0) { + if (player->whooshTimer == 0) { AUDIO_PLAY_SFX(0x19832019, obj80->sfxSource, 0); } - player->unk_22C += 2; - if (player->unk_22C >= 4) { - player->unk_22C = 4; + player->whooshTimer += 2; + if (player->whooshTimer >= 4) { + player->whooshTimer = 4; } } else { Player_ApplyDamage(player, temp_v0, obj80->info.damage); @@ -1870,12 +1870,12 @@ void func_play_800A8BA4(Player* player) { 0.0f, 0.0f, 0.0f); if (temp_v0 != 0) { if (temp_v0 < 0) { - if (player->unk_22C == 0) { + if (player->whooshTimer == 0) { AUDIO_PLAY_SFX(0x19000001, boss->sfxSource, 0); } - player->unk_22C += 2; - if (player->unk_22C >= 4) { - player->unk_22C = 4; + player->whooshTimer += 2; + if (player->whooshTimer >= 4) { + player->whooshTimer = 4; } } else { if ((boss->obj.id == OBJ_BOSS_320) && (boss->timer_056 != 0) && (sp98 == 5)) { @@ -1905,7 +1905,7 @@ void func_play_800A8BA4(Player* player) { Player_ApplyDamage(player, temp_v0, actor->info.damage); } } else if (actor->obj.id == OBJ_ACTOR_EVENT) { - if (actor->unk_0B4 == 42) { + if (actor->unk_0B4 == EINFO_42) { temp_v0 = func_play_800A8304(player, ACTOR_EVENT_ID, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, actor->obj.rot.x, actor->obj.rot.y, actor->obj.rot.z); @@ -1938,12 +1938,12 @@ void func_play_800A8BA4(Player* player) { AUDIO_PLAY_SFX(0x49008025, gDefaultSfxSource, 4); } } else if (temp_v0 < 0) { - if (player->unk_22C == 0) { + if (player->whooshTimer == 0) { AUDIO_PLAY_SFX(0x19000001, actor->sfxSource, 0); } - player->unk_22C += 2; - if (player->unk_22C >= 4) { - player->unk_22C = 4; + player->whooshTimer += 2; + if (player->whooshTimer >= 4) { + player->whooshTimer = 4; } } else { Player_ApplyDamage(player, temp_v0, actor->info.damage); @@ -1971,12 +1971,12 @@ void func_play_800A8BA4(Player* player) { 0.0f, 0.0f, 0.0f); if (temp_v0 != 0) { if (temp_v0 < 0) { - if (player->unk_22C == 0) { + if (player->whooshTimer == 0) { AUDIO_PLAY_SFX(0x19000001, actor->sfxSource, 0); } - player->unk_22C += 2; - if (player->unk_22C >= 4) { - player->unk_22C = 4; + player->whooshTimer += 2; + if (player->whooshTimer >= 4) { + player->whooshTimer = 4; } } else { actor->unk_0D0 = 3; @@ -2297,11 +2297,11 @@ void func_play_800AA800(Player* player) { } hitboxData++; for (i = 0; i < count; i++, hitboxData += 6) { - if (*hitboxData >= HITBOX_TYPE_3) { + if (*hitboxData >= HITBOX_SHADOW) { break; } - if (*hitboxData == HITBOX_TYPE_2) { + if (*hitboxData == HITBOX_ROTATED) { sp100 = hitboxData[1]; spFC = hitboxData[2]; spF8 = hitboxData[3]; @@ -2412,7 +2412,7 @@ void func_play_800AB334(void) { 0.0f; break; case LEVEL_AQUAS: - D_80137E78 = 3; + gVIsPerFrame = 3; D_bg_8015F970 = 1600.0f; D_AQ_801C4188 = 128.0f; Aquas_801A9824(); @@ -2534,7 +2534,7 @@ void Play_Init(void) { D_play_80161A54 = 40.0f; for (i = 0; i < 4; i++) { - gControllerRumble[i] = 0; + gControllerRumbleEnabled[i] = 0; } if (gExpertMode) { @@ -2543,7 +2543,7 @@ void Play_Init(void) { gEnemyShotSpeed = 100; } gPauseEnabled = 0; - D_80137E78 = 2; + gVIsPerFrame = 2; D_ctx_80177C70 = 0; D_display_800CA234 = NULL; D_display_Timer_800CA238 = 0; @@ -2635,7 +2635,7 @@ void Play_Init(void) { for (i = 0; i < gCamCount; i++) { gPlayer[i].state_1C8 = PLAYERSTATE_1C8_1; gPlayerFillScreenAlphas[i] = D_ctx_801783C0[i] = 0; - D_Timer_80177BD0[i] = 0; + gControllerRumbleTimers[i] = 0; D_ctx_80177C30[i] = 0; } if (gLevelMode == LEVELMODE_ALL_RANGE) { @@ -3013,7 +3013,7 @@ bool func_play_800AD1F4(Player* player) { func_play_800AC650(player, &gPlayerShots[14 - player->num], PLAYERSHOT_8, 70.0f); } func_enmy_80060F30(player->sfxSource, 0x09007029, player->num); - D_Timer_80177BD0[player->num] = 5; + gControllerRumbleTimers[player->num] = 5; return true; } break; @@ -3031,7 +3031,7 @@ bool func_play_800AD1F4(Player* player) { } func_enmy_80060F30(player->sfxSource, 0x09007029, player->num); gChargeTimers[player->num] = 0; - D_Timer_80177BD0[player->num] = 5; + gControllerRumbleTimers[player->num] = 5; return true; } } @@ -4996,7 +4996,7 @@ void func_play_800B39E0(Player* player) { } if (player->unk_1F4 > 0) { if (player->unk_1F4 > 3) { - *D_ctx_80177984 = 1; + *gControllerRumble = 1; } player->unk_1F4--; if (player->form == FORM_ARWING) { @@ -5287,23 +5287,23 @@ void Player_Update1(Player* player) { if (gVersusMode) { gInputHold = &gControllerHold[player->num]; gInputPress = &gControllerPress[player->num]; - D_ctx_80177984 = &D_80137E84[player->num]; + gControllerRumble = &gControllerRumbleFlags[player->num]; } else { gInputHold = &gControllerHold[gMainController]; gInputPress = &gControllerPress[gMainController]; - D_ctx_80177984 = &D_80137E84[gMainController]; + gControllerRumble = &gControllerRumbleFlags[gMainController]; } D_ctx_80177990[player->num] += (s32) D_ctx_801779A8[player->num]; Math_SmoothStepToF(&D_ctx_801779A8[player->num], 0.0f, 1.0f, 1.5f, 0.0f); if (D_ctx_80177990[player->num] >= 100) { D_ctx_80177990[player->num] -= 100; - *D_ctx_80177984 = 1; + *gControllerRumble = 1; } - if (D_Timer_80177BD0[player->num] != 0) { - D_Timer_80177BD0[player->num]--; + if (gControllerRumbleTimers[player->num] != 0) { + gControllerRumbleTimers[player->num]--; if (((gGameFrameCount % 2) == 0)) { - *D_ctx_80177984 = 1; + *gControllerRumble = 1; } } if (player->state_1C8 >= PLAYERSTATE_1C8_2) { @@ -5325,9 +5325,9 @@ void Player_Update1(Player* player) { Math_SmoothStepToVec3fArray(sp58, player->jointTable, 1, sp1C4, 0.1f, 1.3f, 0.0f); } player->sfx.bank = player->sfx.roll = 0; - sp1C4 = player->unk_22C; + sp1C4 = player->whooshTimer; if (sp1C4 != 0) { - player->unk_22C--; + player->whooshTimer--; } switch (player->state_1C8) { case PLAYERSTATE_1C8_0: @@ -5396,7 +5396,7 @@ void Player_Update1(Player* player) { } } else { gInputPress->stick_x = gInputPress->stick_y = 0; - D_ctx_80177844 = 0; + gVsItemSpawnTimer = 0; gPauseEnabled = 0; } break; @@ -6122,11 +6122,11 @@ void func_play_800B73E0(Player* player) { } void Play_UpdateLevel(void) { - s32 var_v0_2; + s32 cycleMask; s32 sp40; f32 sp3C; - u8 var_a0; - u8 sp3A; + u8 shields; + u8 heightParam; switch (gCurrentLevel) { case LEVEL_TRAINING: @@ -6136,18 +6136,18 @@ void Play_UpdateLevel(void) { break; case LEVEL_VERSUS: func_versus_800C26C8(); - D_ctx_80177844++; - if ((D_ctx_80177844 == 200) && (gLaserStrength[0] == LASERS_SINGLE) && + gVsItemSpawnTimer++; + if ((gVsItemSpawnTimer == 200) && (gLaserStrength[0] == LASERS_SINGLE) && (gLaserStrength[1] == LASERS_SINGLE) && (gLaserStrength[2] == LASERS_SINGLE) && (gLaserStrength[3] == LASERS_SINGLE)) { - func_play_800B852C(OBJ_ITEM_LASERS, &gItems[0]); + Play_SpawnVsItem(OBJ_ITEM_LASERS, &gItems[0]); } - if ((D_ctx_80177844 == 400) && (gBombCount[0] == 0) && (gBombCount[1] == 0) && (gBombCount[2] == 0) && + if ((gVsItemSpawnTimer == 400) && (gBombCount[0] == 0) && (gBombCount[1] == 0) && (gBombCount[2] == 0) && (gBombCount[3] == 0)) { - func_play_800B852C(OBJ_ITEM_BOMB, &gItems[1]); + Play_SpawnVsItem(OBJ_ITEM_BOMB, &gItems[1]); } - if (D_ctx_80177844 == 500) { - D_ctx_80177844 = 0; + if (gVsItemSpawnTimer == 500) { + gVsItemSpawnTimer = 0; } break; case LEVEL_VENOM_2: @@ -6219,31 +6219,31 @@ void Play_UpdateLevel(void) { Texture_Mottle(D_SO_601E1E8, D_SO_6020F60, 3); if (gPlayer[0].pos.y > 600.0f) { - var_v0_2 = 8 - 1; - sp3A = 5; + cycleMask = 8 - 1; + heightParam = 5; } else if (gPlayer[0].pos.y > 500.0f) { - var_v0_2 = 8 - 1; - sp3A = 4; + cycleMask = 8 - 1; + heightParam = 4; } else if (gPlayer[0].pos.y > 400.0f) { - var_v0_2 = 4 - 1; - sp3A = 3; + cycleMask = 4 - 1; + heightParam = 3; } else if (gPlayer[0].pos.y > 300.0f) { - var_v0_2 = 4 - 1; - sp3A = 2; + cycleMask = 4 - 1; + heightParam = 2; } else if (gPlayer[0].pos.y > 200.0f) { - var_v0_2 = 2 - 1; - sp3A = 1; + cycleMask = 2 - 1; + heightParam = 1; } else if (gPlayer[0].pos.y > 100.0f) { - var_v0_2 = 1 - 1; - sp3A = 0; + cycleMask = 1 - 1; + heightParam = 0; } else { - var_v0_2 = 1 - 1; + cycleMask = 1 - 1; #ifdef AVOID_UB - sp3A = 0; + heightParam = 0; #endif } - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) && !(gGameFrameCount & var_v0_2)) { + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) && ((gGameFrameCount & cycleMask) == 0)) { gPlayer[0].shields--; if (gPlayer[0].shields <= 0) { gPlayer[0].shields = 0; @@ -6256,8 +6256,8 @@ void Play_UpdateLevel(void) { } } } - var_a0 = MIN(gPlayer[0].shields, 255); - func_8001D1C8(var_a0, sp3A); + shields = MIN(gPlayer[0].shields, 255); + func_8001D1C8(shields, heightParam); if (((gGameFrameCount % 8) == 0) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7)) { Solar_8019E8B8(RAND_FLOAT_CENTERED(6000.0f), -80.0f, gPlayer[0].unk_138 + (RAND_FLOAT(2000.0f) + -6000.0f), @@ -6339,21 +6339,21 @@ void Play_Update(void) { Play_UpdateLevel(); } -u8 D_800D317C = 255; +u8 sVsItemSpawnIndex = -1; -void func_play_800B852C(ObjectId objId, Item* item) { - u8 sp1F = (u8) RAND_FLOAT(5.0f); +void Play_SpawnVsItem(ObjectId objId, Item* item) { + u8 spawnIndex = (u8) RAND_FLOAT(5.0f); - if (D_800D317C == sp1F) { - D_ctx_80177844 -= 1; + if (sVsItemSpawnIndex == spawnIndex) { + gVsItemSpawnTimer -= 1; } else { - D_800D317C = sp1F; + sVsItemSpawnIndex = spawnIndex; if (item->obj.status == OBJ_FREE) { Item_Initialize(item); item->obj.status = OBJ_INIT; - item->obj.pos.x = gObjects58[sp1F].obj.pos.x; - item->obj.pos.y = gObjects58[sp1F].obj.pos.y; - item->obj.pos.z = gObjects58[sp1F].obj.pos.z; + item->obj.pos.x = gObjects58[spawnIndex].obj.pos.x; + item->obj.pos.y = gObjects58[spawnIndex].obj.pos.y; + item->obj.pos.z = gObjects58[spawnIndex].obj.pos.z; item->obj.id = objId; Object_SetInfo(&item->info, item->obj.id); } diff --git a/src/engine/fox_radio.c b/src/engine/fox_radio.c index 841e97ae..bd2d8ee9 100644 --- a/src/engine/fox_radio.c +++ b/src/engine/fox_radio.c @@ -426,20 +426,20 @@ void func_radio_800BAAE8(void) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); if (mirror) { - for (i = 0, j = 0; i < 2; i++, j += 880) { + for (i = 0, j = 0; i < 2; i++, j += 44 * 20) { TextureRect_16bRGBA_MirX(&gMasterDisp, &sp44[j], 44, 20, D_radio_8017873C, D_radio_80178740 + 20.0f + sp38 + (i * 20.0f * D_ctx_80177D38), 1.0f, D_ctx_80177D38); } - TextureRect_16bRGBA_MirX(&gMasterDisp, &sp44[2 * 880], 44, 4, D_radio_8017873C, + TextureRect_16bRGBA_MirX(&gMasterDisp, &sp44[44 * 20 * 2], 44, 4, D_radio_8017873C, D_radio_80178740 + 20.0f + sp38 + (40.0f * D_ctx_80177D38), 1.0f, D_ctx_80177D38); } else { - for (i = 0, j = 0; i < 2; i++, j += 880) { + for (i = 0, j = 0; i < 2; i++, j += 44 * 20) { TextureRect_16bRGBA(&gMasterDisp, &sp44[j], 44, 20, D_radio_8017873C, D_radio_80178740 + 20.0f + sp38 + (i * 20.0f * D_ctx_80177D38), 1.0f, D_ctx_80177D38); } - TextureRect_16bRGBA(&gMasterDisp, &sp44[2 * 880], 44, 4, D_radio_8017873C, + TextureRect_16bRGBA(&gMasterDisp, &sp44[44 * 20 * 2], 44, 4, D_radio_8017873C, D_radio_80178740 + 20.0f + sp38 + (40.0f * D_ctx_80177D38), 1.0f, D_ctx_80177D38); } } @@ -550,7 +550,7 @@ void func_radio_800BB5D0(void) { if (D_Timer_801782AC == 0) { gRadioState++; temp_v0 = Message_GetWidth(D_ctx_80178308); - if (D_80137E78 == 3) { + if (gVIsPerFrame == 3) { D_Timer_801782AC = temp_v0 + 16; } else { D_Timer_801782AC = (2 * temp_v0) + 16; @@ -595,7 +595,7 @@ void func_radio_800BB5D0(void) { D_ctx_801782A4 = (s32) D_ctx_80177D68 + 1; } - if (!D_80137E78) {} + if (!gVIsPerFrame) {} if (1) { fakeTemp = 0; diff --git a/src/engine/fox_reset.c b/src/engine/fox_reset.c index b7224c5d..f5a9ab35 100644 --- a/src/engine/fox_reset.c +++ b/src/engine/fox_reset.c @@ -1,7 +1,7 @@ #include "global.h" void Graphics_NMIWipe(void) { - static s16 D_800D4A80 = 0; + static s16 sWipeBarLength = 0; s32 i; gViewport->vp.vscale[0] = SCREEN_WIDTH * 2; @@ -14,24 +14,32 @@ void Graphics_NMIWipe(void) { gViewport->vp.vtrans[3] = 0; gSPViewport(gMasterDisp++, gViewport); gDPPipeSync(gMasterDisp++); - gDPSetScissor(gMasterDisp++, G_SC_NON_INTERLACE, 8, 8, SCREEN_WIDTH - 8, SCREEN_HEIGHT - 8); + gDPSetScissor(gMasterDisp++, G_SC_NON_INTERLACE, SCREEN_MARGIN, SCREEN_MARGIN, SCREEN_WIDTH - SCREEN_MARGIN, + SCREEN_HEIGHT - SCREEN_MARGIN); - Graphics_FillRectangle(&gMasterDisp, 8, 8, MIN(304, D_800D4A80) + 8, 64, 0, 0, 0, 255); - Graphics_FillRectangle(&gMasterDisp, SCREEN_WIDTH - 8 - MIN(304, D_800D4A80), 64, SCREEN_WIDTH - 8, 120, 0, 0, 0, - 255); - Graphics_FillRectangle(&gMasterDisp, 8, 120, MIN(304, D_800D4A80) + 8, 176, 0, 0, 0, 255); - Graphics_FillRectangle(&gMasterDisp, SCREEN_WIDTH - 8 - MIN(304, D_800D4A80), 176, SCREEN_WIDTH - 8, 232, 0, 0, 0, - 255); - if (D_800D4A80 == 0) { + Graphics_FillRectangle(&gMasterDisp, SCREEN_MARGIN, SCREEN_MARGIN, + MIN(SCREEN_WIDTH - 2 * SCREEN_MARGIN, sWipeBarLength) + SCREEN_MARGIN, + SCREEN_HEIGHT / 4 + SCREEN_MARGIN / 2, 0, 0, 0, 255); + Graphics_FillRectangle(&gMasterDisp, + SCREEN_WIDTH - SCREEN_MARGIN - MIN(SCREEN_WIDTH - 2 * SCREEN_MARGIN, sWipeBarLength), + SCREEN_HEIGHT / 4 + SCREEN_MARGIN / 2, SCREEN_WIDTH - 8, SCREEN_HEIGHT / 2, 0, 0, 0, 255); + Graphics_FillRectangle(&gMasterDisp, SCREEN_MARGIN, SCREEN_HEIGHT / 2, + MIN(SCREEN_WIDTH - 2 * SCREEN_MARGIN, sWipeBarLength) + SCREEN_MARGIN, + 3 * SCREEN_HEIGHT / 4 - SCREEN_MARGIN / 2, 0, 0, 0, 255); + Graphics_FillRectangle(&gMasterDisp, + SCREEN_WIDTH - SCREEN_MARGIN - MIN(SCREEN_WIDTH - 2 * SCREEN_MARGIN, sWipeBarLength), + 3 * SCREEN_HEIGHT / 4 - SCREEN_MARGIN / 2, SCREEN_WIDTH - SCREEN_MARGIN, + SCREEN_HEIGHT - SCREEN_MARGIN, 0, 0, 0, 255); + if (sWipeBarLength == 0) { AudioThread_PreNMIReset(); } - D_800D4A80 += 45; - if (D_800D4A80 >= 485) { - osViBlack(1); - gStopTasks = 1; + sWipeBarLength += SCREEN_WIDTH / 7; + if (sWipeBarLength >= SCREEN_WIDTH * 85 / 8 / 7) { // Why 85 / 8 == 3400 / 320 == 10.625? Has to do with NMI timing? + osViBlack(true); + gStopTasks = true; } for (i = 0; i < MAXCONTROLLERS; i++) { - gControllerRumble[i] = 0; - D_80137E84[i] = 0; + gControllerRumbleEnabled[i] = 0; + gControllerRumbleFlags[i] = 0; } } diff --git a/src/engine/fox_std_lib.c b/src/engine/fox_std_lib.c index 1cc1d824..262d6138 100644 --- a/src/engine/fox_std_lib.c +++ b/src/engine/fox_std_lib.c @@ -26,100 +26,100 @@ s32 Graphics_Printf(const char* fmt, ...) { } void Texture_Scroll(u16* texture, s32 width, s32 height, u8 mode) { - u16* temp_t0 = SEGMENTED_TO_VIRTUAL(texture); - u16 temp_a3; - s32 var_a0; - s32 var_t4; + u16* pixel = SEGMENTED_TO_VIRTUAL(texture); + u16 tempPxl; + s32 u; + s32 v; switch (mode) { case 0: - for (var_a0 = 0; var_a0 < width; var_a0++) { - temp_a3 = temp_t0[var_a0]; - for (var_t4 = 1; var_t4 < height; var_t4++) { - temp_t0[(var_t4 - 1) * width + var_a0] = temp_t0[(var_t4) *width + var_a0]; + for (u = 0; u < width; u++) { + tempPxl = pixel[u]; + for (v = 1; v < height; v++) { + pixel[(v - 1) * width + u] = pixel[(v) *width + u]; } - temp_t0[(height - 1) * width + var_a0] = temp_a3; + pixel[(height - 1) * width + u] = tempPxl; } break; case 1: - for (var_a0 = 0; var_a0 < width; var_a0++) { - temp_a3 = temp_t0[(height - 1) * width + var_a0]; - for (var_t4 = height - 2; var_t4 >= 0; var_t4--) { - temp_t0[(var_t4 + 1) * width + var_a0] = temp_t0[(var_t4) *width + var_a0]; + for (u = 0; u < width; u++) { + tempPxl = pixel[(height - 1) * width + u]; + for (v = height - 2; v >= 0; v--) { + pixel[(v + 1) * width + u] = pixel[(v) *width + u]; } - temp_t0[var_a0] = temp_a3; + pixel[u] = tempPxl; } break; case 2: - for (var_t4 = 0; var_t4 < height; var_t4++) { - temp_a3 = temp_t0[var_t4 * width + width - 1]; - for (var_a0 = width - 2; var_a0 >= 0; var_a0--) { - temp_t0[var_t4 * width + var_a0 + 1] = temp_t0[var_t4 * width + var_a0]; + for (v = 0; v < height; v++) { + tempPxl = pixel[v * width + width - 1]; + for (u = width - 2; u >= 0; u--) { + pixel[v * width + u + 1] = pixel[v * width + u]; } - temp_t0[var_t4 * width] = temp_a3; + pixel[v * width] = tempPxl; } break; case 3: - for (var_t4 = 0; var_t4 < height; var_t4++) { - temp_a3 = temp_t0[var_t4 * width]; - for (var_a0 = 1; var_a0 < width; var_a0++) { - temp_t0[var_t4 * width + var_a0 - 1] = temp_t0[var_t4 * width + var_a0]; + for (v = 0; v < height; v++) { + tempPxl = pixel[v * width]; + for (u = 1; u < width; u++) { + pixel[v * width + u - 1] = pixel[v * width + u]; } - temp_t0[var_t4 * width + width - 1] = temp_a3; + pixel[v * width + width - 1] = tempPxl; } break; } } void Texture_Mottle(u16* dst, u16* src, u8 mode) { - s32 var_v1; - s32 var_s3; - u8* var_s0_2; - u8* var_s4_2; - s32 temp_ft3; + s32 u; + s32 v; + u8* dst8; + u8* src8; + s32 offset; dst = SEGMENTED_TO_VIRTUAL(dst); src = SEGMENTED_TO_VIRTUAL(src); switch (mode) { case 2: - for (var_s3 = 0; var_s3 < 32 * 32; var_s3 += 32) { - temp_ft3 = 3.0f * __sinf((s32) (((var_s3 / 32) + (gGameFrameCount / 4)) % 32U) * (2 * M_PI / 32)); - for (var_v1 = 0; var_v1 < 32; var_v1++) { - dst[var_s3 + (temp_ft3 + var_v1) % 32U] = src[var_s3 + var_v1]; + for (v = 0; v < 32 * 32; v += 32) { + offset = 3.0f * __sinf((s32) (((v / 32) + (gGameFrameCount / 4)) % 32U) * (2 * M_PI / 32)); + for (u = 0; u < 32; u++) { + dst[v + (offset + u) % 32U] = src[v + u]; } } break; case 3: - for (var_s3 = 0; var_s3 < 22 * 64; var_s3 += 64) { - temp_ft3 = __sinf((s32) (((var_s3 / 64) + (gGameFrameCount / 4)) % 32U) * (2 * M_PI / 8)); - for (var_v1 = 0; var_v1 < 64; var_v1++) { - dst[var_s3 + (temp_ft3 + var_v1) % 64U] = src[var_s3 + var_v1]; + for (v = 0; v < 22 * 64; v += 64) { // should be 32 * 64? + offset = __sinf((s32) (((v / 64) + (gGameFrameCount / 4)) % 32U) * (2 * M_PI / 8)); + for (u = 0; u < 64; u++) { + dst[v + (offset + u) % 64U] = src[v + u]; } } break; case 1: - for (var_s3 = 0; var_s3 < 16 * 16; var_s3 += 16) { - temp_ft3 = 2.0f * __sinf((s32) (((var_s3 / 16) + (gGameFrameCount / 2)) % 16U) * (2 * M_PI / 16)); - for (var_v1 = 0; var_v1 < 16; var_v1++) { - dst[var_s3 + (temp_ft3 + var_v1) % 16U] = src[var_s3 + var_v1]; + for (v = 0; v < 16 * 16; v += 16) { + offset = 2.0f * __sinf((s32) (((v / 16) + (gGameFrameCount / 2)) % 16U) * (2 * M_PI / 16)); + for (u = 0; u < 16; u++) { + dst[v + (offset + u) % 16U] = src[v + u]; } } break; case 0: - for (var_s3 = 0; var_s3 < 32 * 32; var_s3 += 32) { - temp_ft3 = 2.0f * __sinf((s32) (((var_s3 / 32) + (gGameFrameCount / 2)) % 32U) * (2 * M_PI / 32)); - for (var_v1 = 0; var_v1 < 32; var_v1++) { - dst[var_s3 + (temp_ft3 + var_v1) % 32U] = src[var_s3 + var_v1]; + for (v = 0; v < 32 * 32; v += 32) { + offset = 2.0f * __sinf((s32) (((v / 32) + (gGameFrameCount / 2)) % 32U) * (2 * M_PI / 32)); + for (u = 0; u < 32; u++) { + dst[v + (offset + u) % 32U] = src[v + u]; } } break; case 5: - var_s0_2 = (u8*) dst; - var_s4_2 = (u8*) src; - for (var_s3 = 0; var_s3 < 64 * 64; var_s3 += 64) { - temp_ft3 = 4.0f * __sinf((s32) (((var_s3 / 64) + (gGameFrameCount / 4)) % 32U) * (2 * M_PI / 32)); - for (var_v1 = 0; var_v1 < 64; var_v1++) { - var_s0_2[var_s3 + (temp_ft3 + var_v1) % 64U] = var_s4_2[var_s3 + var_v1]; + dst8 = (u8*) dst; + src8 = (u8*) src; + for (v = 0; v < 64 * 64; v += 64) { + offset = 4.0f * __sinf((s32) (((v / 64) + (gGameFrameCount / 4)) % 32U) * (2 * M_PI / 32)); + for (u = 0; u < 64; u++) { + dst8[v + (offset + u) % 64U] = src8[v + u]; } } } diff --git a/src/engine/fox_tank.c b/src/engine/fox_tank.c index b5c9cfbc..73872a9d 100644 --- a/src/engine/fox_tank.c +++ b/src/engine/fox_tank.c @@ -996,7 +996,7 @@ s32 func_tank_80046E40(Player* player, f32* hitboxData, s32* index, f32 xPos, f3 if (spB4 != 0) { for (i = 0; i < spB4; i++, hitboxData += 6) { spA0 = 0; - if (hitboxData[0] == HITBOX_TYPE_2) { + if (hitboxData[0] == HITBOX_ROTATED) { Matrix_RotateZ(gCalcMatrix, -hitboxData[3] * M_DTOR, 0); Matrix_RotateX(gCalcMatrix, -hitboxData[1] * M_DTOR, 1); Matrix_RotateY(gCalcMatrix, -hitboxData[2] * M_DTOR, 1); @@ -1006,7 +1006,7 @@ s32 func_tank_80046E40(Player* player, f32* hitboxData, s32* index, f32 xPos, f3 hitboxData += 4; spA0 = 1.0f; } else { - if (hitboxData[0] == HITBOX_TYPE_3) { + if (hitboxData[0] == HITBOX_SHADOW) { hitboxData++; } Matrix_RotateZ(gCalcMatrix, -zRot * M_DTOR, 0); @@ -1067,13 +1067,13 @@ s32 func_tank_80046E40(Player* player, f32* hitboxData, s32* index, f32 xPos, f3 } if (func_play_800A78C4((Hitbox*) hitboxData, xPos, yPos, zPos, var_fv0, var_fv1, var_fa0)) { *index = i + 1; - if (hitboxData[-1] == HITBOX_TYPE_3) { + if (hitboxData[-1] == HITBOX_SHADOW) { return -1; } else { return 3; } } - if (hitboxData[-1] == HITBOX_TYPE_3) { + if (hitboxData[-1] == HITBOX_SHADOW) { return 0; } if ((yRot == 0.0f) && (zRot == 0.0f) && (xRot == 0.0f) && (spA0 == 0)) { @@ -1358,13 +1358,13 @@ void func_tank_800481F4(Player* player) { D_ctx_80178570 = 20; D_ctx_80178574 = 20; D_ctx_80178578 = 20; - player->unk_23C = 80; - if (player->unk_22C == 0) { + player->shadowing = 80; + if (player->whooshTimer == 0) { AUDIO_PLAY_SFX(0x19000001, player->sfxSource, 0); } - player->unk_22C += 2; - if (player->unk_22C >= 4) { - player->unk_22C = 4; + player->whooshTimer += 2; + if (player->whooshTimer >= 4) { + player->whooshTimer = 4; } } else if (temp_v0 == -2) { AUDIO_PLAY_SFX(0x19000001, player->sfxSource, 0); diff --git a/src/engine/fox_versus.c b/src/engine/fox_versus.c index 7ebdc3d6..4c13e2e3 100644 --- a/src/engine/fox_versus.c +++ b/src/engine/fox_versus.c @@ -88,7 +88,7 @@ void func_versus_800BC8D8(f32 xPos, f32 yPos, f32 scale) { s32 i; for (i = 0; i < 2; i++) { - TextureRect_8bCI(&gMasterDisp, D_versus_300A470 + (i * 152 * 8), D_versus_300B218, 152, 8, xPos, + TextureRect_8bCI(&gMasterDisp, D_versus_300A470 + (152 * 8 * i), D_versus_300B218, 152, 8, xPos, yPos + (8 * i * scale), scale, scale); } diff --git a/src/overlays/ovl_ending/fox_end2.c b/src/overlays/ovl_ending/fox_end2.c index 8856d2eb..b0ee19ff 100644 --- a/src/overlays/ovl_ending/fox_end2.c +++ b/src/overlays/ovl_ending/fox_end2.c @@ -44,16 +44,17 @@ void Ending_8018CE20(u32 arg0) { RCP_SetupDL(&gMasterDisp, 0x53); gDPSetTextureFilter(gMasterDisp++, G_TF_POINT); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, alpha); - TextureRect_8bIA(&gMasterDisp, D_ending_80192E74[i].unk_00, 192, 5, 64.0f, 105.0f, 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, D_ending_80192E74[i].unk_00 + 960 * 1, 192, 5, 64.0f, 110.0f, + TextureRect_8bIA(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 0, 192, 5, 64.0f, 105.0f, 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, D_ending_80192E74[i].unk_00 + 960 * 2, 192, 5, 64.0f, 115.0f, + TextureRect_8bIA(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 1, 192, 5, 64.0f, 110.0f, 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, D_ending_80192E74[i].unk_00 + 960 * 3, 192, 5, 64.0f, 120.0f, + TextureRect_8bIA(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 2, 192, 5, 64.0f, 115.0f, 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, D_ending_80192E74[i].unk_00 + 960 * 4, 192, 5, 64.0f, 125.0f, + TextureRect_8bIA(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 3, 192, 5, 64.0f, 120.0f, 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, D_ending_80192E74[i].unk_00 + 960 * 5, 192, 5, 64.0f, 130.0f, + TextureRect_8bIA(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 4, 192, 5, 64.0f, 125.0f, + 1.0f, 1.0f); + TextureRect_8bIA(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 5, 192, 5, 64.0f, 130.0f, 1.0f, 1.0f); } else { xPos = (320 - Graphics_GetSmallTextWidth(D_ending_80192E74[i].unk_00)) / 2; @@ -71,7 +72,7 @@ void Ending_8018CE20(u32 arg0) { void Ending_8018D250(u32 arg0, AssetInfo* asset) { gOverlayStage = asset->unk_08; - D_80137E78 = asset->unk_70; + gVIsPerFrame = asset->unk_70; D_ctx_80178410 = asset->unk_14; } @@ -113,8 +114,8 @@ void Ending_8018D398(u32 arg0, AssetInfo* asset) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = gFillScreenAlphaTarget = gFillScreenAlphaStep = 0; - Graphics_FillRectangle(&gMasterDisp, 8, 8, SCREEN_WIDTH - 8, SCREEN_HEIGHT - 8, asset->primRed, asset->primGreen, - asset->primBlue, alpha); + Graphics_FillRectangle(&gMasterDisp, SCREEN_MARGIN, SCREEN_MARGIN, SCREEN_WIDTH - SCREEN_MARGIN, + SCREEN_HEIGHT - SCREEN_MARGIN, asset->primRed, asset->primGreen, asset->primBlue, alpha); } void Ending_8018D4BC(s32 arg0, AssetInfo* asset) { diff --git a/src/overlays/ovl_i1/fox_co.c b/src/overlays/ovl_i1/fox_co.c index 3c68f98c..d4dc0c4d 100644 --- a/src/overlays/ovl_i1/fox_co.c +++ b/src/overlays/ovl_i1/fox_co.c @@ -1368,7 +1368,7 @@ void Corneria_8018B58C(Actor* actor) { if ((fabsf(actor->obj.pos.z - gPlayer[0].unk_138) < 500.0f) && (fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 200.0f) && (fabsf(actor->obj.pos.y - gPlayer[0].pos.y) < 200.0f)) { - *D_Timer_80177BD0 = 25; + *gControllerRumbleTimers = 25; } BonusText_Display(actor->obj.pos.x, actor->obj.pos.y + 250.0f, actor->obj.pos.z, 5); gHitCount += 6; @@ -1606,7 +1606,7 @@ void Corneria_8018C19C(Boss* boss) { D_ctx_80178570 = 20; D_ctx_80178574 = 20; D_ctx_80178578 = 20; - gPlayer[0].unk_23C = 100; + gPlayer[0].shadowing = 100; } Matrix_MultVec3f(gCalcMatrix, &D_i1_801998CC, &sp84[0]); Matrix_MultVec3f(gCalcMatrix, &D_i1_801998D8, &sp84[1]); diff --git a/src/overlays/ovl_i1/fox_ve1.c b/src/overlays/ovl_i1/fox_ve1.c index ea0d0f6a..99ab3f4e 100644 --- a/src/overlays/ovl_i1/fox_ve1.c +++ b/src/overlays/ovl_i1/fox_ve1.c @@ -626,7 +626,7 @@ void Venom1_80192CD4(Actor* actor) { } if (actor->iwork[1] > 0) { - D_80137E84[0] = 1; + gControllerRumbleFlags[0] = 1; actor->iwork[1] -= 1; } @@ -1134,7 +1134,7 @@ void Venom1_80194398(Boss* boss) { boss->swork[10]--; } if (boss->swork[28] > 0) { - D_80137E84[0] = 1; + gControllerRumbleFlags[0] = 1; boss->swork[28]--; } if (boss->swork[16] > 0) { diff --git a/src/overlays/ovl_i2/fox_me.c b/src/overlays/ovl_i2/fox_me.c index fac23f0b..375a9f00 100644 --- a/src/overlays/ovl_i2/fox_me.c +++ b/src/overlays/ovl_i2/fox_me.c @@ -1444,7 +1444,7 @@ void Meteo_8018978C(Boss* boss) { if (boss->timer_050 == 20) { func_effect_8007A568(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 80.0f); AUDIO_PLAY_SFX(0x2940F026U, boss->sfxSource, 4U); - D_Timer_80177BD0[0] = 60; + gControllerRumbleTimers[0] = 60; for (i = 0; i < ARRAY_COUNT(gActors); i++) { if (gActors[i].obj.id == OBJ_ACTOR_TEAM_BOSS) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); diff --git a/src/overlays/ovl_i3/fox_aq.c b/src/overlays/ovl_i3/fox_aq.c index ec3fd551..ecb173f5 100644 --- a/src/overlays/ovl_i3/fox_aq.c +++ b/src/overlays/ovl_i3/fox_aq.c @@ -1247,7 +1247,7 @@ void Aquas_801AC274(Player* player) { for (i = 0, actor = gActors; i < 60; i++, actor++) { if ((actor->obj.status == OBJ_ACTIVE) && (actor->obj.id != OBJ_ACTOR_189)) { var_v1 = 1; - if (actor->info.hitbox[1] == HITBOX_TYPE_2) { + if (actor->info.hitbox[1] == HITBOX_ROTATED) { var_v1 = 5; } diff --git a/src/overlays/ovl_i3/fox_so.c b/src/overlays/ovl_i3/fox_so.c index 8fb740ad..82b5913a 100644 --- a/src/overlays/ovl_i3/fox_so.c +++ b/src/overlays/ovl_i3/fox_so.c @@ -1128,7 +1128,7 @@ void Solar_801A10F4(Player* player) { player->camAt.z = player->unk_138; D_ctx_80177950 = 1.0f; - func_8001D1C8(0xFF, 3); + func_8001D1C8(255, 3); AUDIO_PLAY_SFX(0x4100C023, gDefaultSfxSource, 4); D_ctx_80178488 = 1; gFillScreenAlphaTarget = 0; @@ -1479,8 +1479,8 @@ void Solar_801A2C98(Boss* bossSO) { Math_SmoothStepToAngle(&bossSO->obj.rot.y, 181.0f, 1.0f, 3.0f, 1.0f); if (bossSO->unk_04C == 50) { Solar_801A0CEC(&gActors[10], bossSO->obj.pos.x, bossSO->obj.pos.z + 1000.0f, 20.0f, 1); - D_80137E84[gMainController] = 1; - D_Timer_80177BD0[gMainController] = 70; + gControllerRumbleFlags[gMainController] = 1; + gControllerRumbleTimers[gMainController] = 70; } if (bossSO->unk_04C == 60) { for (i = 0; i < 4; i++) { @@ -1570,8 +1570,8 @@ void Solar_801A3128(Boss* bossSO) { } else { if (bossSO->swork[SO_SWK_11] == 80) { Solar_801A0CEC(&gActors[9], bossSO->obj.pos.x, bossSO->obj.pos.z + 850.0f, 20.0f, 1); - D_80137E84[gMainController] = 1; - D_Timer_80177BD0[gMainController] = 70; + gControllerRumbleFlags[gMainController] = 1; + gControllerRumbleTimers[gMainController] = 70; D_i3_801C2740[2]++; if ((D_i3_801C2740[2] % 2) != 0) { if (D_i3_801C2740[2] & 2) { @@ -1672,8 +1672,8 @@ void Solar_801A3510(Boss* bossSO) { } if (bossSO->unk_04C == 60) { Solar_801A0D90(bossSO->obj.pos.x, bossSO->obj.pos.z + 1600.0f, 80.0f, 2); - D_80137E84[gMainController] = 1; - D_Timer_80177BD0[gMainController] = 100; + gControllerRumbleFlags[gMainController] = 1; + gControllerRumbleTimers[gMainController] = 100; } break; case 5: @@ -1809,8 +1809,8 @@ void Solar_801A3C4C(Boss* bossSO) { gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 255; gCsFrameCount = 0; - D_80137E84[gMainController] = 1; - D_Timer_80177BD0[gMainController] = 10; + gControllerRumbleFlags[gMainController] = 1; + gControllerRumbleTimers[gMainController] = 10; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); Audio_KillSfxById(0x4100C023); @@ -1966,8 +1966,8 @@ void Solar_801A48B8(Boss* bossSO) { s32 i; AUDIO_PLAY_SFX(0x29434075, bossSO->sfxSource, 4); - D_80137E84[gMainController] = 1; - D_Timer_80177BD0[gMainController] = 10; + gControllerRumbleFlags[gMainController] = 1; + gControllerRumbleTimers[gMainController] = 10; if (bossSO->swork[SO_SWK_0] != 6) { bossSO->swork[SO_SWK_5] = bossSO->swork[SO_SWK_0]; bossSO->swork[SO_SWK_6] = bossSO->swork[SO_SWK_1]; @@ -2086,8 +2086,8 @@ void Solar_801A4EF8(Boss* bossSO) { } if (bossSO->swork[SO_SWK_11] == 30) { Solar_801A0CEC(&gActors[10], bossSO->obj.pos.x, bossSO->obj.pos.z + 1000.0f, 20.0f, 1); - D_80137E84[gMainController] = 1; - D_Timer_80177BD0[gMainController] = 70; + gControllerRumbleFlags[gMainController] = 1; + gControllerRumbleTimers[gMainController] = 70; for (i = 0; i < 4; i++) { Solar_8019F038(bossSO->obj.pos.x + 100.0f, 100.0f, bossSO->obj.pos.z + 1100.0f, D_i3_801BF8F0[i].x + RAND_FLOAT_CENTERED(2.0f), @@ -2116,8 +2116,8 @@ void Solar_801A4EF8(Boss* bossSO) { case 2: bossSO->unk_04C = 0; if (bossSO->swork[SO_SWK_11] == 300) { - D_80137E84[gMainController] = 1; - D_Timer_80177BD0[gMainController] = 170; + gControllerRumbleFlags[gMainController] = 1; + gControllerRumbleTimers[gMainController] = 170; gCameraShake = 130; } if (bossSO->swork[SO_SWK_11] == 200) { @@ -2140,8 +2140,8 @@ void Solar_801A4EF8(Boss* bossSO) { } if (bossSO->swork[SO_SWK_11] == 50) { Solar_801A0CEC(&gActors[10], bossSO->obj.pos.x, bossSO->obj.pos.z + 1000.0f, 80.0f, 2); - D_80137E84[gMainController] = 1; - D_Timer_80177BD0[gMainController] = 100; + gControllerRumbleFlags[gMainController] = 1; + gControllerRumbleTimers[gMainController] = 100; gCameraShake = 10; } if (bossSO->obj.pos.y < -1500.0f) { diff --git a/src/overlays/ovl_i3/fox_zo.c b/src/overlays/ovl_i3/fox_zo.c index fb386789..96c553fa 100644 --- a/src/overlays/ovl_i3/fox_zo.c +++ b/src/overlays/ovl_i3/fox_zo.c @@ -14,12 +14,12 @@ // { { -397.8f, 130.0f }, { 1284.3999f, 262.59998f }, { 0.0f, 80.6f } }, // { { -223.59999f, 197.59999f }, { 904.8f, 145.59999f }, { 0.0f, 140.4f } }, // { -// HITBOX_TYPE_2, +// HITBOX_ROTATED, // { 40.0f, 0.0f, 0.0f }, // { { -561.6f, 119.6f }, { 600.6f, 319.8f }, { 338.0f, 104.0f } }, // }, // { -// HITBOX_TYPE_2, +// HITBOX_ROTATED, // { 40.0f, 0.0f, 0.0f }, // { { -561.6f, 119.6f }, { 600.6f, 319.8f }, { -338.0f, 104.0f } }, // }, diff --git a/src/overlays/ovl_i5/fox_ma.c b/src/overlays/ovl_i5/fox_ma.c index 097b308d..47623e64 100644 --- a/src/overlays/ovl_i5/fox_ma.c +++ b/src/overlays/ovl_i5/fox_ma.c @@ -2450,8 +2450,8 @@ void Macbeth_801A2DD8(Object_80* obj80) { break; case 1: func_effect_8007A6F0(&obj80->obj.pos, 0x2903B009); - D_80137E84[gMainController] = 1; - D_Timer_80177BD0[gMainController] = 15; + gControllerRumbleFlags[gMainController] = 1; + gControllerRumbleTimers[gMainController] = 15; for (i = 0; i < 6; i++) { func_effect_8007D2C8(obj80->obj.pos.x + D_i5_801BE6A0[i].x, obj80->obj.pos.y + D_i5_801BE6A0[i].y, obj80->obj.pos.z + D_i5_801BE6A0[i].z, 18.0f); @@ -4501,8 +4501,8 @@ void Macbeth_801A7E7C(Actor* actor) { RAND_FLOAT(7.0f) + 7.0f, 2.0f, RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT_CENTERED(10.0f), (s32) (RAND_FLOAT(50.0f) + 70.0f), 11, 1.0f); - D_80137E84[gMainController] = 1; - D_Timer_80177BD0[gMainController] = 15; + gControllerRumbleFlags[gMainController] = 1; + gControllerRumbleTimers[gMainController] = 15; AUDIO_PLAY_SFX(0x2940C00A, actor->sfxSource, 4); actor->state = 21; } @@ -5205,8 +5205,8 @@ void Macbeth_801AD6F0(Actor* actor) { func_beam_800365E4(actor->obj.pos.x, 3.0f, actor->obj.pos.z, actor->obj.pos.x, actor->obj.pos.z, 0.0f, 0.0f, 90.0f, 5.0f, 0, 0); } - D_80137E84[gMainController] = 1; - D_Timer_80177BD0[gMainController] = 10; + gControllerRumbleFlags[gMainController] = 1; + gControllerRumbleTimers[gMainController] = 10; } break; case 1: @@ -5326,8 +5326,8 @@ void Macbeth_801ADD68(Actor* actor) { if ((func_enmy_8006351C(actor->index, &actor->obj.pos, &sp3C, 1) != 0) || (actor->obj.pos.y < (gGroundLevel + 200.0f))) { AUDIO_PLAY_SFX(0x19032064, actor->sfxSource, 4); - D_80137E84[gMainController] = 1; - D_Timer_80177BD0[gMainController] = 5; + gControllerRumbleFlags[gMainController] = 1; + gControllerRumbleTimers[gMainController] = 5; actor->vel.x = 0.0f; actor->vel.y = 0.0f; actor->vel.z = 0.0f; @@ -6040,8 +6040,8 @@ void Macbeth_801AF8F4(Player* player) { player->timer_210 = 10000; D_ctx_80177A48[0] = 1.0f; D_i5_801BA1DC = 0.0f; - D_80137E84[0] = 1; - D_Timer_80177BD0[0] = 10; + gControllerRumbleFlags[0] = 1; + gControllerRumbleTimers[0] = 10; gCameraShake = 10; D_ctx_80177A48[4] = -70.0f; D_ctx_80177A48[5] = 280.0f; @@ -6176,8 +6176,8 @@ void Macbeth_801AF8F4(Player* player) { } } if (gCsFrameCount == 880) { - D_80137E84[0] = 1; - D_Timer_80177BD0[0] = 10; + gControllerRumbleFlags[0] = 1; + gControllerRumbleTimers[0] = 10; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; gFillScreenAlphaTarget = 255; gFillScreenAlphaStep = 20; @@ -6731,7 +6731,7 @@ void Macbeth_801B38E0(void) { } D_ctx_801782B8 = D_ctx_801782BC = D_ctx_801782C0 = D_ctx_801782D0 = gBossActive = D_ctx_8017828C = D_ctx_8017812C = - D_ctx_80177E70 = D_ctx_80177E78 = gRingPassCount = 0; + gPrevEventActorIndex = D_ctx_80177E78 = gRingPassCount = 0; D_ctx_80177F10.x = D_ctx_80177F10.y = D_ctx_80177F10.z = D_ctx_80177E88.x = D_ctx_80177E88.y = D_ctx_80177E88.z = 0.0f; diff --git a/src/overlays/ovl_i5/fox_ti.c b/src/overlays/ovl_i5/fox_ti.c index ac4f312c..61b9ef58 100644 --- a/src/overlays/ovl_i5/fox_ti.c +++ b/src/overlays/ovl_i5/fox_ti.c @@ -1291,7 +1291,7 @@ void Titania_8018C8A8(Actor* actor) { if (actor->iwork[4] > 0) { actor->iwork[4]--; } else if ((gPlayer[0].unk_1D4 != 0) && (actor->iwork[3] > 0)) { - D_80137E84[0] = 1; + gControllerRumbleFlags[0] = 1; actor->iwork[3]--; } @@ -1596,7 +1596,7 @@ void Titania_8018C8A8(Actor* actor) { } AUDIO_PLAY_SFX(0x2940C00A, actor->sfxSource, 4); gCameraShake = 20; - D_Timer_80177BD0[0] = 16; + gControllerRumbleTimers[0] = 16; Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1); Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, 1); @@ -1856,7 +1856,7 @@ void Titania_8018E5F8(Actor* actor) { if (actor->iwork[7] > 0) { actor->iwork[7]--; } else if ((gPlayer[0].unk_1D4 != 0) && (actor->iwork[8] > 0)) { - D_80137E84[0] = 1; + gControllerRumbleFlags[0] = 1; actor->iwork[8]--; } break; @@ -2103,7 +2103,7 @@ void Titania_8018F4D8(Object_80* obj80) { if (obj80->obj.rot.x >= 90.0f) { obj80->obj.rot.x = 90.0f; obj80->state++; - D_Timer_80177BD0[0] = 7; + gControllerRumbleTimers[0] = 7; gCameraShake = 12; Titania_8018F134(obj80); AUDIO_PLAY_SFX(0x19130003, obj80->sfxSource, 4); @@ -2113,7 +2113,7 @@ void Titania_8018F4D8(Object_80* obj80) { obj80->obj.rot.z += obj80->vel.x; if (obj80->obj.rot.z >= 90.0f) { obj80->obj.rot.z = 90.0f; - D_Timer_80177BD0[0] = 7; + gControllerRumbleTimers[0] = 7; gCameraShake = 12; Titania_8018F134(obj80); AUDIO_PLAY_SFX(0x19130003, obj80->sfxSource, 4); @@ -2124,7 +2124,7 @@ void Titania_8018F4D8(Object_80* obj80) { obj80->obj.rot.z -= obj80->vel.x; if (obj80->obj.rot.z <= -90.0f) { obj80->obj.rot.z = -90.0f; - D_Timer_80177BD0[0] = 7; + gControllerRumbleTimers[0] = 7; gCameraShake = 12; Titania_8018F134(obj80); AUDIO_PLAY_SFX(0x19130003, obj80->sfxSource, 4); @@ -4739,7 +4739,7 @@ void Titania_80197A94(Boss* boss) { boss->dmgType = DMG_NONE; } if ((gPlayer[0].unk_1D4 != 0) && (boss->swork[39] > 0)) { - D_80137E84[0] = 1; + gControllerRumbleFlags[0] = 1; boss->swork[39]--; } if (boss->swork[28] == 2) { diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index 5829a8d5..632260b3 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -2270,7 +2270,7 @@ void Andross_8018DBF0(Boss* boss) { if ((boss->unk_04C > 35) && (boss->unk_04C < 150) && ((boss->unk_04C % 32) == 0)) { AUDIO_PLAY_SFX(0x29022089, boss->sfxSource, 4); if (player->state_1C8 == PLAYERSTATE_1C8_11) { - D_Timer_80177BD0[0] = 10; + gControllerRumbleTimers[0] = 10; } } if ((boss->unk_04C == 20) && (player->state_1C8 == PLAYERSTATE_1C8_11)) { @@ -2334,7 +2334,7 @@ void Andross_8018DBF0(Boss* boss) { player->timer_1F8 = 60; player->timer_498 = 50; boss->swork[8] = 0; - D_Timer_80177BD0[0] = 30; + gControllerRumbleTimers[0] = 30; if (player->wings.rightState == 2) { gRightWingHealth[0] = 0; player->wings.rightState = 1; @@ -3678,7 +3678,7 @@ void Andross_80193C4C(Player* player) { AUDIO_PLAY_SFX(0x2940F026, boss->sfxSource, 4); gCameraShake = 30; gOverlayStage = 1; - D_Timer_80177BD0[0] = 30; + gControllerRumbleTimers[0] = 30; } if (gCsFrameCount > 40) { for (i = 0; i < 3; i++) { diff --git a/src/overlays/ovl_i6/fox_sy.c b/src/overlays/ovl_i6/fox_sy.c index c8e10be3..1e851173 100644 --- a/src/overlays/ovl_i6/fox_sy.c +++ b/src/overlays/ovl_i6/fox_sy.c @@ -539,8 +539,8 @@ void SectorY_80199438(Boss* boss) { } if (boss->timer_058 == 50) { AUDIO_PLAY_SFX(0x2903A060, boss->sfxSource, 4); - D_80137E84[gMainController] = 1; - D_Timer_80177BD0[gMainController] = 20; + gControllerRumbleFlags[gMainController] = 1; + gControllerRumbleTimers[gMainController] = 20; D_ctx_80177850 = 15; boss->swork[36]++; func_effect_8007BFFC(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, boss->vel.x, boss->vel.y, @@ -1587,7 +1587,7 @@ void SectorY_8019C888(Boss* boss) { if (gBossFrameCount == 250) { for (i = 59; i >= 0; i--) { if (gActors[i].obj.status == OBJ_ACTIVE) { - D_enmy2_800CFF80[gActors[i].iwork[12]] = i; + gTeamEventActorIndex[gActors[i].iwork[12]] = i; } } } @@ -3098,8 +3098,8 @@ void SectorY_801A0AC0(Player* player) { player->unk_194 = 10.0f; player->unk_190 = 10.0f; AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); - D_80137E84[gMainController] = 1; - D_Timer_80177BD0[gMainController] = 5; + gControllerRumbleFlags[gMainController] = 1; + gControllerRumbleTimers[gMainController] = 5; break; case 500: case 510: diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index e2df3bb7..0c57aaff 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -1268,7 +1268,7 @@ void Map_8019E99C(void) { Audio_SetAudioSpec(0, 0x118); - D_80137E78 = 2; + gVIsPerFrame = 2; gGameFrameCount = 0; Title_80188010(); @@ -2195,7 +2195,7 @@ void Map_801A0D14(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, D_menu_801CD9E4); for (i = 0; i < 13; i++) { - TextureRect_16bRGBA(&gMasterDisp, D_menu_801B6954[D_menu_801CD9F0 + 1] + (i * 96 * 4), 96, 4, 109.0f, + TextureRect_16bRGBA(&gMasterDisp, D_menu_801B6954[D_menu_801CD9F0 + 1] + (96 * 4 * i), 96, 4, 109.0f, 24.0f + (i * 4.0f), 1.0f, 1.0f); } @@ -2378,9 +2378,9 @@ void Map_801A19A8(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, (s32) D_menu_801CEA9C); for (i = 0; i < 4; i++) { - TextureRect_8bIA(&gMasterDisp, D_MAP_600D590 + (i * 168 * 4), 168, 4, 72.0f, 104.0f + (4.0f * i), 1.0f, 1.0f); + TextureRect_8bIA(&gMasterDisp, D_MAP_600D590 + (168 * 4 * i), 168, 4, 72.0f, 104.0f + (4.0f * i), 1.0f, 1.0f); } - TextureRect_8bIA(&gMasterDisp, D_MAP_600D590 + (168 * 16), 168, 3, 72.0f, 104.0f + 16.0f, 1.0f, 1.0f); + TextureRect_8bIA(&gMasterDisp, D_MAP_600D590 + (168 * 4 * 4), 168, 3, 72.0f, 104.0f + 16.0f, 1.0f, 1.0f); } void Map_801A1AE8(void) { @@ -5964,10 +5964,10 @@ void Map_801AB978(s32 arg0) { yPos = 77.0f; for (i = 0; i < 12; i++) { - TextureRect_16bRGBA(&gMasterDisp, D_MAP_6044820 + (i * 92 * 4), 92, 4, xPos, yPos + (i * 4.0f), + TextureRect_16bRGBA(&gMasterDisp, D_MAP_6044820 + (92 * 4 * i), 92, 4, xPos, yPos + (i * 4.0f), 1.0f, 1.0f); } - TextureRect_16bRGBA(&gMasterDisp, D_MAP_6044820 + (92 * 12 * 4), 92, 3, xPos, yPos + 48.0f, 1.0f, 1.0f); + TextureRect_16bRGBA(&gMasterDisp, D_MAP_6044820 + (92 * 4 * 12), 92, 3, xPos, yPos + 48.0f, 1.0f, 1.0f); if (arg0 == 21) { TextureRect_16bRGBA(&gMasterDisp, D_MAP_6046CD0, 32, 34, xPos + 47.0, yPos, 1.0f, 1.0f); diff --git a/src/overlays/ovl_menu/fox_option.c b/src/overlays/ovl_menu/fox_option.c index c7218244..25c9d7e8 100644 --- a/src/overlays/ovl_menu/fox_option.c +++ b/src/overlays/ovl_menu/fox_option.c @@ -365,7 +365,7 @@ void Option_Setup(void) { bool playedExpertMode; s32 i; - D_80137E78 = 2; + gVIsPerFrame = 2; sOptionCardList[0].unk_00.unk_08 = D_OPT_8003B50; sOptionCardList[0].unk_00.unk_10 = 72; @@ -1853,7 +1853,7 @@ void Option_DataUpdate(void) { if (D_ctx_80177990[gMainController] >= 100) { D_ctx_80177990[gMainController] -= 100; - D_80137E84[gMainController] = 1; + gControllerRumbleFlags[gMainController] = 1; } if (temp_fv0 == 0.0f) { @@ -1947,11 +1947,11 @@ void Option_DataDraw(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); for (i = 0; i < 2; i++) { - TextureRect_8bIA(&gMasterDisp, D_OPT_80084B0 + (i * 176 * 4), 176, 4, D_menu_801AF094[0], + TextureRect_8bIA(&gMasterDisp, D_OPT_80084B0 + (176 * 4 * i), 176, 4, D_menu_801AF094[0], D_menu_801AF0AC[0] + (4.0f * i), 1.0f, 1.0f); } - TextureRect_8bIA(&gMasterDisp, D_OPT_80084B0 + 1408, 176, 5, D_menu_801AF094[0], D_menu_801AF0AC[0] + 8.0f, 1.0f, - 1.0f); + TextureRect_8bIA(&gMasterDisp, D_OPT_80084B0 + 176 * 4 * 2, 176, 5, D_menu_801AF094[0], D_menu_801AF0AC[0] + 8.0f, + 1.0f, 1.0f); if (D_menu_801B91CC < 2) { TextureRect_8bIA_MirX(&gMasterDisp, D_OPT_800E130, 8, 8, D_menu_801AF084[D_menu_801B91C0], 140.0f, 1.0f, 1.0f); @@ -1991,8 +1991,8 @@ void Option_DataDraw(void) { TextureRect_8bIA(&gMasterDisp, D_OPT_8008DA0 + (160 * 2 * i), 160, 2, D_menu_801AF094[3], D_menu_801AF0AC[3] + (2.0f * i), 1.0f, 1.0f); } - TextureRect_8bIA(&gMasterDisp, D_OPT_8008DA0 + 2880, 160, 1, D_menu_801AF094[3], D_menu_801AF0AC[3] + 18.0f, - 1.0f, 1.0f); + TextureRect_8bIA(&gMasterDisp, D_OPT_8008DA0 + 160 * 2 * 9, 160, 1, D_menu_801AF094[3], + D_menu_801AF0AC[3] + 18.0f, 1.0f, 1.0f); break; case 1: @@ -2003,8 +2003,8 @@ void Option_DataDraw(void) { TextureRect_8bIA(&gMasterDisp, D_OPT_8009CE0 + (160 * 2 * i), 160, 2, D_menu_801AF094[4], D_menu_801AF0AC[4] + (2.0f * i), 1.0f, 1.0f); } - TextureRect_8bIA(&gMasterDisp, D_OPT_8009CE0 + 6400, 160, 1, D_menu_801AF094[4], D_menu_801AF0AC[4] + 40.0f, - 1.0f, 1.0f); + TextureRect_8bIA(&gMasterDisp, D_OPT_8009CE0 + 160 * 2 * 20, 160, 1, D_menu_801AF094[4], + D_menu_801AF0AC[4] + 40.0f, 1.0f, 1.0f); break; case 3: @@ -2835,13 +2835,14 @@ void Option_80199820(s32 arg0) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); for (i = 0; i < 2; i++) { - TextureRect_16bRGBA(&gMasterDisp, D_menu_801AF20C[arg0] + (44 * i * 20), 44, 20, + TextureRect_16bRGBA(&gMasterDisp, D_menu_801AF20C[arg0] + (44 * 20 * i), 44, 20, D_menu_801AF148[arg0] + D_menu_801AF1B4, D_menu_801AF158[arg0] + D_menu_801AF1B8 + (i * 20.0f * 0.7f), 0.7f, 0.7f); } - TextureRect_16bRGBA(&gMasterDisp, D_menu_801AF20C[arg0] + 1760, 44, 4, D_menu_801AF148[arg0] + D_menu_801AF1B4, - D_menu_801AF158[arg0] + D_menu_801AF1B8 + 28.0f, 0.7f, 0.7f); + TextureRect_16bRGBA(&gMasterDisp, D_menu_801AF20C[arg0] + 44 * 20 * 2, 44, 4, + D_menu_801AF148[arg0] + D_menu_801AF1B4, D_menu_801AF158[arg0] + D_menu_801AF1B8 + 28.0f, 0.7f, + 0.7f); var_a2 = 24; if (arg0 == 0) { @@ -4412,7 +4413,7 @@ void Option_InvoiceDraw(void) { static f32 D_menu_801AF3F0[8] = { 24.0f, 57.0f, 92.0f, 162.0f, 163.0f, 171.0f, 103.0f, 131.0f }; static s32 D_menu_801AF410 = 0; - Graphics_FillRectangle(&gMasterDisp, 25, 18, 295, 222, 255, 255, 255, 255); + Graphics_FillRectangle(&gMasterDisp, 25, 18, SCREEN_WIDTH - 25, SCREEN_HEIGHT - 18, 255, 255, 255, 255); RCP_SetupDL(&gMasterDisp, 0x4E); @@ -4421,7 +4422,7 @@ void Option_InvoiceDraw(void) { TextureRect_4bCI(&gMasterDisp, D_OPT_8000000, D_OPT_8000680, 128, 16, D_menu_801AF3D0[0], D_menu_801AF3F0[0], 1.0f, 1.0f); - TextureRect_4bCI(&gMasterDisp, D_OPT_8000000 + 1024, D_OPT_8000680, 128, 10, D_menu_801AF3D0[0], + TextureRect_4bCI(&gMasterDisp, D_OPT_8000000 + 128 * 16 / 2, D_OPT_8000680, 128, 10, D_menu_801AF3D0[0], D_menu_801AF3F0[0] + 16.0f, 1.0f, 1.0f); for (i = 0; i < 2; i++) { @@ -4429,7 +4430,7 @@ void Option_InvoiceDraw(void) { D_menu_801AF3F0[1] + (16 * i), 1.0f, 1.0f); } - TextureRect_4bCI(&gMasterDisp, D_OPT_80006A0 + 256 * 16, D_OPT_80017A0, 256, 2, D_menu_801AF3D0[1], + TextureRect_4bCI(&gMasterDisp, D_OPT_80006A0 + 256 * 32 / 2, D_OPT_80017A0, 256, 2, D_menu_801AF3D0[1], D_menu_801AF3F0[1] + 32.0f, 1.0f, 1.0f); for (i = 0; i < 4; i++) { @@ -4437,7 +4438,7 @@ void Option_InvoiceDraw(void) { D_menu_801AF3F0[2] + (16 * i), 1.0f, 1.0f); } - TextureRect_4bCI(&gMasterDisp, D_OPT_80017C0 + 8192, D_OPT_80038C0, 256, 2, D_menu_801AF3D0[2], + TextureRect_4bCI(&gMasterDisp, D_OPT_80017C0 + 256 * 16 * 4 / 2, D_OPT_80038C0, 256, 2, D_menu_801AF3D0[2], D_menu_801AF3F0[2] + 64.0f, 1.0f, 1.0f); RCP_SetupDL(&gMasterDisp, 0x4C); diff --git a/src/overlays/ovl_menu/fox_title.c b/src/overlays/ovl_menu/fox_title.c index 182912e5..9b4fc259 100644 --- a/src/overlays/ovl_menu/fox_title.c +++ b/src/overlays/ovl_menu/fox_title.c @@ -162,7 +162,7 @@ u16* D_menu_801ADA30[5] = { }; void Title_801875E0(void) { - D_80137E78 = 2; + gVIsPerFrame = 2; gGameFrameCount = 0; @@ -2819,7 +2819,7 @@ void Title_8018F680(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); for (i = 0; i < 30; i++) { - TextureRect_16bRGBA(&gMasterDisp, gTitleStarfoxLogo + (i * 472), 236, 2, D_menu_801B9054, + TextureRect_16bRGBA(&gMasterDisp, gTitleStarfoxLogo + (236 * 2 * i), 236, 2, D_menu_801B9054, D_menu_801B9058 + (i * 2.0f), 1.0f, 1.0f); } } @@ -2874,7 +2874,7 @@ void Title_8018F8E4(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, (s32) D_menu_801B7BC8, (s32) D_menu_801B7BC8, 255); for (i = 0; i < 6; i++) { - TextureRect_8bIA(&gMasterDisp, gTitleNoController + (704 * i), 176, 4, D_menu_801AE474, + TextureRect_8bIA(&gMasterDisp, gTitleNoController + (176 * 4 * i), 176, 4, D_menu_801AE474, D_menu_801AE478 + (i * 4.0f), 1.0f, 1.0f); } } else { @@ -2882,10 +2882,10 @@ void Title_8018F8E4(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, (s32) D_menu_801B7BC8, (s32) D_menu_801B7BC8, 255); for (i = 0; i < 2; i++) { - TextureRect_8bIA(&gMasterDisp, gTitlePressStart + (i * 720), 120, 6, 101.0f, temp2 + (i * 6.0f), 1.0f, - 1.0f); + TextureRect_8bIA(&gMasterDisp, gTitlePressStart + (120 * 6 * i), 120, 6, 101.0f, temp2 + (i * 6.0f), + 1.0f, 1.0f); } - TextureRect_8bIA(&gMasterDisp, gTitlePressStart + 1440, 120, 1, 101.0f, temp2 + 12, 1.0f, 1.0f); + TextureRect_8bIA(&gMasterDisp, gTitlePressStart + 120 * 6 * 2, 120, 1, 101.0f, temp2 + 12, 1.0f, 1.0f); } } } @@ -2897,8 +2897,8 @@ void Title_8018FC14(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); for (i = 0; i < 2; i++) { - TextureRect_8bIA(&gMasterDisp, gTitleNintendoCopyright + (i * 720), 120, 6, 102.0f, 209.0f + (i * 6.0f), 1.0f, - 1.0f); + TextureRect_8bIA(&gMasterDisp, gTitleNintendoCopyright + (120 * 6 * i), 120, 6, 102.0f, 209.0f + (i * 6.0f), + 1.0f, 1.0f); } } @@ -2929,17 +2929,18 @@ void Title_8018FD08(void) { case 2: for (i = 0; i < 3; i++) { - TextureRect_8bIA(&gMasterDisp, gTitleFalcoCard + (704 * i), 176, 4, temp_fs2, temp + (i * 4), 1.0f, + TextureRect_8bIA(&gMasterDisp, gTitleFalcoCard + (176 * 4 * i), 176, 4, temp_fs2, temp + (i * 4), 1.0f, 1.0f); } - TextureRect_8bIA(&gMasterDisp, gTitleFalcoCard + 2112, 176, 1, temp_fs2, temp + 12.0f, 1.0f, 1.0f); + TextureRect_8bIA(&gMasterDisp, gTitleFalcoCard + 176 * 4 * 3, 176, 1, temp_fs2, temp + 12.0f, 1.0f, 1.0f); break; case 3: for (i = 0; i < 3; i++) { - TextureRect_8bIA(&gMasterDisp, gTitleFoxCard + (i * 704), 176, 4, temp_fs2, temp + (i * 4), 1.0f, 1.0f); + TextureRect_8bIA(&gMasterDisp, gTitleFoxCard + (176 * 4 * i), 176, 4, temp_fs2, temp + (i * 4), 1.0f, + 1.0f); } - TextureRect_8bIA(&gMasterDisp, gTitleFoxCard + 2112, 176, 1, temp_fs2, temp + 12, 1.0f, 1.0f); + TextureRect_8bIA(&gMasterDisp, gTitleFoxCard + 176 * 4 * 3, 176, 1, temp_fs2, temp + 12, 1.0f, 1.0f); break; } } @@ -3107,10 +3108,10 @@ void Title_801906A0(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, (s32) D_menu_801B7BDC); for (i = 0; i < 5; i++) { - TextureRect_16bRGBA(&gMasterDisp, gTitleNintendo64Logo + (2048 * i), 128, 16, D_menu_801B9070, + TextureRect_16bRGBA(&gMasterDisp, gTitleNintendo64Logo + (128 * 16 * i), 128, 16, D_menu_801B9070, D_menu_801B9074 + (16 * i * D_menu_801B907C), D_menu_801B9078, D_menu_801B907C); } - TextureRect_16bRGBA(&gMasterDisp, gTitleNintendo64Logo + (2048 * 5), 128, 8, D_menu_801B9070, + TextureRect_16bRGBA(&gMasterDisp, gTitleNintendo64Logo + (128 * 16 * 5), 128, 8, D_menu_801B9070, (80.0f * D_menu_801B907C) + D_menu_801B9074, D_menu_801B9078, D_menu_801B907C); case -1: @@ -3181,10 +3182,10 @@ void Title_80190C9C(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); for (i = 0; i < 4; i++) { - TextureRect_8bIA(&gMasterDisp, gTitleArwingCard + (672 * i), 112, 6, D_menu_801AE564, + TextureRect_8bIA(&gMasterDisp, gTitleArwingCard + (112 * 6 * i), 112, 6, D_menu_801AE564, D_menu_801AE568 + (6.0f * i), 1.0f, 1.0f); } - TextureRect_8bIA(&gMasterDisp, gTitleArwingCard + (112 * 24), 112, 2, D_menu_801AE564, + TextureRect_8bIA(&gMasterDisp, gTitleArwingCard + (112 * 6 * 4), 112, 2, D_menu_801AE564, D_menu_801AE568 + (6.0f * 4), 1.0f, 1.0f); } } diff --git a/src/sys/sys_fault.c b/src/sys/sys_fault.c index 14a322e2..9eb0cd9b 100644 --- a/src/sys/sys_fault.c +++ b/src/sys/sys_fault.c @@ -199,21 +199,21 @@ void func_80007910(OSThread* thread) { func_800077F8(210, 210, 28, &context->fp28.f.f_even); func_800077F8(30, 220, 30, &context->fp30.f.f_even); osWritebackDCacheAll(); - osViBlack(0); - osViRepeatLine(0); + osViBlack(false); + osViRepeatLine(false); osViSwapBuffer(gFaultMgr.fb); } OSThread* func_80007CEC(void) { - OSThread* var_v1; + OSThread* queue; - var_v1 = __osGetActiveQueue(); + queue = __osGetActiveQueue(); - while (var_v1->priority != -1) { - if ((var_v1->priority > 0) && (var_v1->priority < 0x7F) && (var_v1->flags & 3)) { - return var_v1; + while (queue->priority != -1) { + if ((queue->priority > 0) && (queue->priority < 0x7F) && (queue->flags & 3)) { + return queue; } - var_v1 = var_v1->tlnext; + queue = queue->tlnext; } return NULL; } diff --git a/src/sys/sys_joybus.c b/src/sys/sys_joybus.c index fb6ad5ac..ea64bb6a 100644 --- a/src/sys/sys_joybus.c +++ b/src/sys/sys_joybus.c @@ -4,7 +4,7 @@ OSContPad gControllerHold[4]; OSContPad gControllerPress[4]; u8 gControllerPlugged[4]; u32 gControllerLock; -u8 gControllerRumble[4]; +u8 gControllerRumbleEnabled[4]; OSContPad sNextController[4]; // OSContPad sPrevController[4]; // OSContStatus sControllerStatus[4]; // @@ -55,7 +55,7 @@ void Controller_Init(void) { osContInit(&gSerialEventQueue, &sp1F, sControllerStatus); for (i = 0; i < 4; i++) { gControllerPlugged[i] = (sp1F >> i) & 1; - gControllerRumble[i] = 0; + gControllerRumbleEnabled[i] = 0; } } @@ -120,30 +120,30 @@ void Controller_Rumble(void) { for (i = 0; i < 4; i++) { if ((gControllerPlugged[i] != 0) && (sControllerStatus[i].errno == 0)) { if (sControllerStatus[i].status & 1) { - if (gControllerRumble[i] == 0) { + if (gControllerRumbleEnabled[i] == 0) { if (osMotorInit(&gSerialEventQueue, &sControllerMotor[i], i)) { - gControllerRumble[i] = 0; + gControllerRumbleEnabled[i] = 0; } else { - gControllerRumble[i] = 1; + gControllerRumbleEnabled[i] = 1; } } - if (gControllerRumble[i] == 1) { - if (D_80137E84[i] != 0) { + if (gControllerRumbleEnabled[i] == 1) { + if (gControllerRumbleFlags[i] != 0) { if (osMotorStart(&sControllerMotor[i])) { - gControllerRumble[i] = 0; + gControllerRumbleEnabled[i] = 0; } } else { if (osMotorStop(&sControllerMotor[i])) { - gControllerRumble[i] = 0; + gControllerRumbleEnabled[i] = 0; } } } } else { - gControllerRumble[i] = 0; + gControllerRumbleEnabled[i] = 0; } } } for (i = 0; i < 4; i++) { - D_80137E84[i] = 0; + gControllerRumbleFlags[i] = 0; } } diff --git a/src/sys/sys_lib.c b/src/sys/sys_lib.c index a4f8e1b5..25e9b218 100644 --- a/src/sys/sys_lib.c +++ b/src/sys/sys_lib.c @@ -124,20 +124,20 @@ void Lib_FillScreen(u8 setFill) { if (setFill == true) { if (gFillScreen == false) { if (gFillScreenColor == 1) { - osViBlack(1); + osViBlack(true); } else { for (i = 0; i < 3 * SCREEN_WIDTH; i++) { gFillBuffer[i] = gFillScreenColor; } osWritebackDCacheAll(); osViSwapBuffer(&gFillBuffer[SCREEN_WIDTH]); - osViRepeatLine(1); + osViRepeatLine(true); } gFillScreen = true; } } else if (gFillScreen == true) { - osViRepeatLine(0); - osViBlack(0); + osViRepeatLine(false); + osViBlack(false); gFillScreen = false; } } diff --git a/src/sys/sys_main.c b/src/sys/sys_main.c index da8e19bd..7ba1f708 100644 --- a/src/sys/sys_main.c +++ b/src/sys/sys_main.c @@ -53,11 +53,11 @@ Lightsn* gLight; FrameBuffer* gFrameBuffer; u16* gTextureRender; -u8 D_80137E78; +u8 gVIsPerFrame; u32 gSysFrameCount; u8 gStartNMI; u8 gStopTasks; -u8 D_80137E84[4]; +u8 gControllerRumbleFlags[4]; u16 gFillScreenColor; u16 gFillScreen; @@ -78,7 +78,7 @@ u8 gSerialThreadStack[0x1000]; // 800E0FB0 void Main_Initialize(void) { u8 i; - D_80137E78 = 0; + gVIsPerFrame = 0; gSysFrameCount = 0; gStartNMI = false; gStopTasks = false; @@ -230,8 +230,8 @@ void Timer_ThreadEntry(void* arg0) { void Graphics_ThreadEntry(void* arg0) { u8 i; - u8 var_v1; - u8 var_v2; + u8 visPerFrame; + u8 validVIsPerFrame; Game_Initialize(); osSendMesg(&gSerialThreadMsgQueue, (OSMesg) SI_READ_CONTROLLER, OS_MESG_PRI_NORMAL); @@ -277,9 +277,9 @@ void Graphics_ThreadEntry(void* arg0) { } func_80007FE4(&gFrameBuffers[(gSysFrameCount - 1) % 3], SCREEN_WIDTH, 16); - var_v1 = MIN(D_80137E78, 4); - var_v2 = MAX(var_v1, gGfxVImsgQueue.validCount + 1); - for (i = 0; i < var_v2; i += 1) { // Can't be ++ + visPerFrame = MIN(gVIsPerFrame, 4); + validVIsPerFrame = MAX(visPerFrame, gGfxVImsgQueue.validCount + 1); + for (i = 0; i < validVIsPerFrame; i += 1) { // Can't be ++ osRecvMesg(&gGfxVImsgQueue, NULL, OS_MESG_BLOCK); } @@ -343,58 +343,58 @@ void Main_HandleRSP(void) { void Main_GetNewTasks(void) { u8 i; - SPTask** var_a0; - SPTask** var_a1; - SPTask** var_s0_2; - SPTask** var_s1_2; - OSMesg sp40; - SPTask* sp3C; + SPTask** audioTask; + SPTask** gfxTask; + SPTask** newAudioTask; + SPTask** newGfxTask; + OSMesg spTaskMsg; + SPTask* newTask; - var_s0_2 = sNewAudioTasks; - var_s1_2 = sNewGfxTasks; + newAudioTask = sNewAudioTasks; + newGfxTask = sNewGfxTasks; for (i = 0; i < ARRAY_COUNT(sNewAudioTasks); i += 1) { - *(var_s0_2++) = NULL; + *(newAudioTask++) = NULL; } for (i = 0; i < ARRAY_COUNT(sNewGfxTasks); i += 1) { - *(var_s1_2++) = NULL; + *(newGfxTask++) = NULL; } - var_s0_2 = sNewAudioTasks; - var_s1_2 = sNewGfxTasks; - while (osRecvMesg(&gTaskMsgQueue, &sp40, OS_MESG_NOBLOCK) != MSG_QUEUE_EMPTY) { - sp3C = (SPTask*) sp40; - sp3C->state = SPTASK_STATE_NOT_STARTED; + newAudioTask = sNewAudioTasks; + newGfxTask = sNewGfxTasks; + while (osRecvMesg(&gTaskMsgQueue, &spTaskMsg, OS_MESG_NOBLOCK) != MSG_QUEUE_EMPTY) { + newTask = (SPTask*) spTaskMsg; + newTask->state = SPTASK_STATE_NOT_STARTED; - switch (sp3C->task.t.type) { + switch (newTask->task.t.type) { case M_AUDTASK: - *(var_s0_2++) = sp3C; + *(newAudioTask++) = newTask; break; case M_GFXTASK: - *(var_s1_2++) = sp3C; + *(newGfxTask++) = newTask; break; } } - var_s0_2 = sNewAudioTasks; - var_s1_2 = sNewGfxTasks; - var_a0 = sAudioTasks; - var_a1 = sGfxTasks; + newAudioTask = sNewAudioTasks; + newGfxTask = sNewGfxTasks; + audioTask = sAudioTasks; + gfxTask = sGfxTasks; - for (i = 0; i < ARRAY_COUNT(sAudioTasks); i += 1, var_a0++) { - if (*var_a0 == NULL) { + for (i = 0; i < ARRAY_COUNT(sAudioTasks); i += 1, audioTask++) { + if (*audioTask == NULL) { break; } } for (i; i < ARRAY_COUNT(sAudioTasks); i += 1) { - *(var_a0++) = *(var_s0_2++); + *(audioTask++) = *(newAudioTask++); } - for (i = 0; i < ARRAY_COUNT(sGfxTasks); i += 1, var_a1++) { - if (*var_a1 == NULL) { + for (i = 0; i < ARRAY_COUNT(sGfxTasks); i += 1, gfxTask++) { + if (*gfxTask == NULL) { break; } } for (i; i < ARRAY_COUNT(sGfxTasks); i += 1) { - *(var_a1++) = *(var_s1_2++); + *(gfxTask++) = *(newGfxTask++); } } diff --git a/tools/Torch b/tools/Torch index b1d39534..8dda6f54 160000 --- a/tools/Torch +++ b/tools/Torch @@ -1 +1 @@ -Subproject commit b1d39534f3ee1f04601cdadffbc8a96bcbf0b4a6 +Subproject commit 8dda6f54595cf3b04a08ef13b7c799961f533b6e From 8ad92b4b3b6761248971b50f97f576a77de7cc47 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Fri, 12 Apr 2024 14:08:38 -0300 Subject: [PATCH 020/151] fix texture --- assets/yaml/us/ast_map.yaml | 5 +---- src/engine/fox_std_lib.c | 5 +++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/assets/yaml/us/ast_map.yaml b/assets/yaml/us/ast_map.yaml index 9ca02a06..65807934 100644 --- a/assets/yaml/us/ast_map.yaml +++ b/assets/yaml/us/ast_map.yaml @@ -368,10 +368,7 @@ D_MAP_6047E70: { type: GFX, offset: 0x6047E70, symbol: D_MAP_6047E70 } D_MAP_6047F80: - { type: TEXTURE, format: IA8, offset: 0x06047F80, width: 64, height: 32, ctype: u8, symbol: D_MAP_6047F80 } - -D_MAP_6048780: - { type: TEXTURE, format: IA8, offset: 0x06048780, width: 64, height: 32, ctype: u8, symbol: D_MAP_6048780 } + { type: TEXTURE, format: IA8, offset: 0x06047F80, width: 64, height: 64, ctype: u8, symbol: D_MAP_6047F80 } D_MAP_6048F80: { type: TEXTURE, format: IA8, offset: 0x06048F80, width: 64, height: 64, ctype: u8, symbol: D_MAP_6048F80 } diff --git a/src/engine/fox_std_lib.c b/src/engine/fox_std_lib.c index 262d6138..d4a08d11 100644 --- a/src/engine/fox_std_lib.c +++ b/src/engine/fox_std_lib.c @@ -89,6 +89,7 @@ void Texture_Mottle(u16* dst, u16* src, u8 mode) { } } break; + case 3: for (v = 0; v < 22 * 64; v += 64) { // should be 32 * 64? offset = __sinf((s32) (((v / 64) + (gGameFrameCount / 4)) % 32U) * (2 * M_PI / 8)); @@ -97,6 +98,7 @@ void Texture_Mottle(u16* dst, u16* src, u8 mode) { } } break; + case 1: for (v = 0; v < 16 * 16; v += 16) { offset = 2.0f * __sinf((s32) (((v / 16) + (gGameFrameCount / 2)) % 16U) * (2 * M_PI / 16)); @@ -105,6 +107,7 @@ void Texture_Mottle(u16* dst, u16* src, u8 mode) { } } break; + case 0: for (v = 0; v < 32 * 32; v += 32) { offset = 2.0f * __sinf((s32) (((v / 32) + (gGameFrameCount / 2)) % 32U) * (2 * M_PI / 32)); @@ -113,6 +116,7 @@ void Texture_Mottle(u16* dst, u16* src, u8 mode) { } } break; + case 5: dst8 = (u8*) dst; src8 = (u8*) src; @@ -122,6 +126,7 @@ void Texture_Mottle(u16* dst, u16* src, u8 mode) { dst8[v + (offset + u) % 64U] = src8[v + u]; } } + break; } } From 9c004a09164ec4d8451b4c40fd21231333b8bad0 Mon Sep 17 00:00:00 2001 From: Lywx Date: Sat, 13 Apr 2024 06:51:46 -0600 Subject: [PATCH 021/151] Fixed wrong tluts and bump torch (#211) --- assets/yaml/us/ast_font.yaml | 18 ++++---- assets/yaml/us/ast_option.yaml | 6 +-- assets/yaml/us/ast_title.yaml | 80 ++++++++++++++++----------------- assets/yaml/us/ast_venom_1.yaml | 2 +- tools/Torch | 2 +- 5 files changed, 54 insertions(+), 54 deletions(-) diff --git a/assets/yaml/us/ast_font.yaml b/assets/yaml/us/ast_font.yaml index eca27483..76f1a96d 100644 --- a/assets/yaml/us/ast_font.yaml +++ b/assets/yaml/us/ast_font.yaml @@ -188,35 +188,35 @@ D_5007FE0: # A (large) D_5008020: { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5008020, symbol: D_5008020 } - + # B (large) D_5008110: { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5008110, symbol: D_5008110 } - + # C (large) D_5008200: { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5008200, symbol: D_5008200 } - + # D (large) D_50082F0: { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x50082F0, symbol: D_50082F0 } - + # E (large) D_50083E0: { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x50083E0, symbol: D_50083E0 } - + # F (large) D_50084D0: { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x50084D0, symbol: D_50084D0 } - + # G (large) D_50085C0: { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x50085C0, symbol: D_50085C0 } - + # H (large) D_50086B0: { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x50086B0, symbol: D_50086B0 } - + # I (large) D_50087A0: { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x50087A0, symbol: D_50087A0 } @@ -415,7 +415,7 @@ D_500B600: # Wrench Texture D_500B768: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 32, offset: 0x0500B768, symbol: D_500B768, tlut: 0x0D000160 } + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 32, offset: 0x0500B768, tlut: 0x0500B868, symbol: D_500B768 } # Wrench TLUT D_500B868: diff --git a/assets/yaml/us/ast_option.yaml b/assets/yaml/us/ast_option.yaml index 1f142000..55643835 100644 --- a/assets/yaml/us/ast_option.yaml +++ b/assets/yaml/us/ast_option.yaml @@ -44,7 +44,7 @@ D_OPT_8003950: D_OPT_80039A8: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x80039A8, symbol: D_OPT_80039A8 } -# +# D_OPT_80039D0: { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x80039D0 , symbol: D_OPT_80039D0, tlut: 0x8003A50 } @@ -91,7 +91,7 @@ D_OPT_80046B0: D_OPT_8004930: { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 10, offset: 0x8004930, symbol: D_OPT_8004930 } -D_OPT_8004C50: +D_OPT_8004C50: { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 12, offset: 0x8004C50, symbol: D_OPT_8004C50 } # Option VS Cards @@ -211,7 +211,7 @@ D_OPT_80141B0: # Speaker D_OPT_80143B0: - { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x80143B0, symbol: D_OPT_80143B0, tlut: D_OPT_80147B0 } + { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x80143B0, symbol: D_OPT_80143B0, tlut: 0x80147B0 } D_OPT_80147B0: { type: TEXTURE, ctype: u16, format: TLUT, colors: 32, offset: 0x80147B0, symbol: D_OPT_80147B0 } diff --git a/assets/yaml/us/ast_title.yaml b/assets/yaml/us/ast_title.yaml index a6e8be51..1312d94c 100644 --- a/assets/yaml/us/ast_title.yaml +++ b/assets/yaml/us/ast_title.yaml @@ -98,65 +98,65 @@ D_TITLE_601CCD0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: D_TITLE_601CED0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x601CED0, symbol: D_TITLE_601CED0 } D_TITLE_601CF50: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x601CF50, symbol: D_TITLE_601CF50 } - + D_TITLE_601D750: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x601D750, tlut: 0x601DB50, symbol: D_TITLE_601D750 } - + D_TITLE_601DB50: { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x601DB50, symbol: D_TITLE_601DB50 } - + D_TITLE_601E424: { type: SF64:ANIM, offset: 0x601E424, symbol: D_TITLE_601E424 } - + D_TITLE_601E430: { type: GFX, offset: 0x601E430, symbol: D_TITLE_601E430 } - + D_TITLE_601E720: { type: GFX, offset: 0x601E720, symbol: D_TITLE_601E720 } - + D_TITLE_601EA00: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x601EA00, symbol: D_TITLE_601EA00 } - + D_TITLE_601F200: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x601F200, symbol: D_TITLE_601F200 } - + D_TITLE_601F400: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x601F400, symbol: D_TITLE_601F400 } - + D_TITLE_601F8E0: { type: SF64:ANIM, offset: 0x601F8E0, symbol: D_TITLE_601F8E0 } - + D_TITLE_6020058: { type: SF64:ANIM, offset: 0x6020058, symbol: D_TITLE_6020058 } - + D_TITLE_60214F8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x60214F8, symbol: D_TITLE_60214F8 } - + D_TITLE_6021D10: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6021D10, symbol: D_TITLE_6021D10 } - + D_TITLE_6021F10: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6021F10, symbol: D_TITLE_6021F10 } - + D_TITLE_6022B40: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6022B40, symbol: D_TITLE_6022B40 } - + D_TITLE_6023340: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6023340, symbol: D_TITLE_6023340 } - + D_TITLE_6023B40: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6023B40, symbol: D_TITLE_6023B40 } - + D_TITLE_6024340: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6024340, symbol: D_TITLE_6024340 } - + D_TITLE_60246F8: { type: SF64:ANIM, offset: 0x60246F8, symbol: D_TITLE_60246F8 } - + D_TITLE_60257A8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x60257A8, symbol: D_TITLE_60257A8 } - + D_TITLE_60259A8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x60259A8, symbol: D_TITLE_60259A8 } - + D_TITLE_6025BA8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6025BA8, symbol: D_TITLE_6025BA8 } - + D_TITLE_6025DA8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6025DA8, symbol: D_TITLE_6025DA8 } - + D_TITLE_6025FA8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6025FA8, symbol: D_TITLE_6025FA8 } - + D_TITLE_6026D28: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6026D28, symbol: D_TITLE_6026D28 } - + D_TITLE_6026F28: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6026F28, symbol: D_TITLE_6026F28 } - + D_TITLE_6028508: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6028508, symbol: D_TITLE_6028508 } - + D_TITLE_6028708: { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x6028708, symbol: D_TITLE_6028708 } - + D_TITLE_6028788: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6028788, symbol: D_TITLE_6028788 } - + D_TITLE_6028988: { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x6028988, symbol: D_TITLE_6028988 } - + D_TITLE_6028A08: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6028A08, symbol: D_TITLE_6028A08 } D_TITLE_6028C08: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6028C08, symbol: D_TITLE_6028C08 } @@ -168,25 +168,25 @@ D_TITLE_602A710: { type: SF64:ANIM, offset: 0x602A710, symbol: D_TITLE_602A710 } D_TITLE_602A720: { type: GFX, offset: 0x602A720, symbol: D_TITLE_602A720 } D_TITLE_602A8C0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x602A8C0, symbol: D_TITLE_602A8C0 } - + D_TITLE_602B8C0: { type: GFX, offset: 0x602B8C0, symbol: D_TITLE_602B8C0 } - + D_TITLE_602D930: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x602D930, symbol: D_TITLE_602D930 } - + D_TITLE_602DB30: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x602DB30, symbol: D_TITLE_602DB30 } - + D_TITLE_602DD30: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x602DD30, symbol: D_TITLE_602DD30 } - + D_TITLE_602DF30: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x602DF30, symbol: D_TITLE_602DF30 } - + D_TITLE_602E380: { type: GFX, offset: 0x602E380, symbol: D_TITLE_602E380 } - + D_TITLE_602E550: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x602E550, symbol: D_TITLE_602E550 } - + D_TITLE_602F8E0: { type: SF64:ANIM, offset: 0x602F8E0, symbol: D_TITLE_602F8E0 } - + D_TITLE_602FBAC: {type: SF64:SKELETON, offset: 0x602FBAC, symbol: D_TITLE_602FBAC} - + D_TITLE_60305C0: { type: SF64:ANIM, offset: 0x60305C0, symbol: D_TITLE_60305C0 } D_TITLE_603088C: {type: SF64:SKELETON, offset: 0x603088C, symbol: D_TITLE_603088C} diff --git a/assets/yaml/us/ast_venom_1.yaml b/assets/yaml/us/ast_venom_1.yaml index f1080732..7f63b7fa 100644 --- a/assets/yaml/us/ast_venom_1.yaml +++ b/assets/yaml/us/ast_venom_1.yaml @@ -60,7 +60,7 @@ D_VE1_60043F0: { type: GFX, offset: 0x60043F0, symbol: D_VE1_60043F0 } D_VE1_60044D0: - { type: TEXTURE, format: CI8, width: 16, height: 16, offset: 0x60044D0, tlut: 0x60048D0, ctype: u8, symbol: D_VE1_60044D0 } + { type: TEXTURE, format: CI8, width: 16, height: 16, offset: 0x60044D0, tlut: 0x60045D0, ctype: u8, symbol: D_VE1_60044D0 } D_VE1_60045D0: { type: TEXTURE, format: TLUT, colors: 144, offset: 0x60045D0, ctype: u16, symbol: D_VE1_60045D0 } diff --git a/tools/Torch b/tools/Torch index 8dda6f54..c82b4a84 160000 --- a/tools/Torch +++ b/tools/Torch @@ -1 +1 @@ -Subproject commit 8dda6f54595cf3b04a08ef13b7c799961f533b6e +Subproject commit c82b4a8423eb41202dc61378aa50f0052140c132 From 1b5884a7b5d1fb43deb32dcefcdd1714ad159a85 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Sun, 14 Apr 2024 20:23:31 -0300 Subject: [PATCH 022/151] fix for new version of spimdisasm --- linker_scripts/us/undefined_syms.ld | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linker_scripts/us/undefined_syms.ld b/linker_scripts/us/undefined_syms.ld index 49ed279b..d5cfddc5 100644 --- a/linker_scripts/us/undefined_syms.ld +++ b/linker_scripts/us/undefined_syms.ld @@ -39,3 +39,6 @@ D_A4000000 = 0xA4000000; D_A5000508 = 0xA5000508; D_A5000510 = 0xA5000510; +D_01000100 = 0x01000100; +D_01010100 = 0x01010100; + From 3efafe60e3b68e9ece1b02a9ef72ce7083d7da3b Mon Sep 17 00:00:00 2001 From: Alejandro Asenjo Nitti <96613413+sonicdcer@users.noreply.github.com> Date: Mon, 15 Apr 2024 12:28:16 -0300 Subject: [PATCH 023/151] Bump and fix new version of splat (#214) * try * progress * update splat to the new version * retry * crunch64 * bump spimdisasm version --- linker_scripts/us/symbol_addrs.txt | 1 + linker_scripts/us/undefined_syms.ld | 1 - tools/requirements-python.txt | 5 +++-- tools/splat | 2 +- yamls/us/main.yaml | 3 ++- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/linker_scripts/us/symbol_addrs.txt b/linker_scripts/us/symbol_addrs.txt index 4864e8d4..46b95202 100644 --- a/linker_scripts/us/symbol_addrs.txt +++ b/linker_scripts/us/symbol_addrs.txt @@ -164,3 +164,4 @@ D_ovl_i4_8019FE74 = 0x8019FE74; // force_migration:True segment:ovl_i4 D_ovl_i4_8019FEFC = 0x8019FEFC; // force_migration:True segment:ovl_i4 D_i6_801A7560 = 0x801A7560; // force_migration:True segment:ovl_i6 D_i6_801A792C = 0x801A792C; // force_migration:True segment:ovl_i6 + diff --git a/linker_scripts/us/undefined_syms.ld b/linker_scripts/us/undefined_syms.ld index d5cfddc5..fbea8a22 100644 --- a/linker_scripts/us/undefined_syms.ld +++ b/linker_scripts/us/undefined_syms.ld @@ -41,4 +41,3 @@ D_A5000510 = 0xA5000510; D_01000100 = 0x01000100; D_01010100 = 0x01010100; - diff --git a/tools/requirements-python.txt b/tools/requirements-python.txt index 2c17d75f..89c031b8 100644 --- a/tools/requirements-python.txt +++ b/tools/requirements-python.txt @@ -1,4 +1,4 @@ -spimdisasm==1.20.0 +spimdisasm==1.24.2 rabbitizer==1.7.0 PyYAML pylibyaml @@ -9,4 +9,5 @@ pygfxd n64img>=0.1.4 GitPython colour -requests \ No newline at end of file +requests +crunch64 \ No newline at end of file diff --git a/tools/splat b/tools/splat index 0b0bfa6c..6bc689f2 160000 --- a/tools/splat +++ b/tools/splat @@ -1 +1 @@ -Subproject commit 0b0bfa6c99e3c757517d1630fcdb8b7dd34d9792 +Subproject commit 6bc689f21dc3597799294942858ae914fadb6da9 diff --git a/yamls/us/main.yaml b/yamls/us/main.yaml index cea5ffe8..98f9b483 100644 --- a/yamls/us/main.yaml +++ b/yamls/us/main.yaml @@ -6,6 +6,7 @@ - {start: 0x40, type: textbin, name: ipl3} - {start: 0x1000, type: asm, vram: 0x80000400, name: entry} + - name: main type: code start: 0x1050 @@ -274,7 +275,7 @@ - [0xCA3D0, .rodata, libultra/rmon/rmonmisc] - [0xCA400, .rodata, libultra/rmon/rmonregs] - [0xCA480, .rodata, libultra/rmon/rmonbrk] - - [0xCA650, rodata, libultra/rmon/rmonrcp] + - [0xCA650, .rodata, libultra/rmon/rmonmain] # DATA - game engine - [0xCA690, .data, engine/fox_360] From 1ee676279710594486d656cc0af40e605b74a24b Mon Sep 17 00:00:00 2001 From: Alejandro Asenjo Nitti <96613413+sonicdcer@users.noreply.github.com> Date: Mon, 15 Apr 2024 20:15:45 -0300 Subject: [PATCH 024/151] Initial GCC Support (#212) * first try * progress * progress * gcc compiling, rom not booting yet * format * restore word compiler * comment * fix * fix * fix addresses for new splat * progress * splat * we don't need these anymore * gcc build seems stable now --- Makefile | 99 ++++++++++++++++++++-- include/libc/math.h | 2 + src/audio/audio_heap.c | 6 +- src/audio/note_data.c | 2 +- src/audio/wave_samples.c | 13 +-- src/libultra/gcc_fix/sqrtf.c.inc | 130 +++++++++++++++++++++++++++++ src/libultra/gu/sqrtf.c | 4 + src/overlays/ovl_menu/fox_option.c | 8 ++ src/sys/sys_fault.c | 4 + 9 files changed, 252 insertions(+), 16 deletions(-) create mode 100644 src/libultra/gcc_fix/sqrtf.c.inc diff --git a/Makefile b/Makefile index b0149d18..3ca55deb 100644 --- a/Makefile +++ b/Makefile @@ -25,6 +25,8 @@ CC_CHECK_COMP ?= gcc OBJDUMP_BUILD ?= 0 # Number of threads to compress with N_THREADS ?= $(shell nproc) +# If COMPILER is GCC, compile with GCC instead of IDO. +COMPILER ?= ido # Whether to colorize build messages COLOR ?= 1 # Whether to hide commands or not @@ -63,6 +65,57 @@ LD_SCRIPT := linker_scripts/$(VERSION)/$(TARGET).ld #### Setup #### +# If gcc is used, define the NON_MATCHING flag respectively so the files that +# are safe to be used can avoid using GLOBAL_ASM which doesn't work with gcc. +ifeq ($(COMPILER),gcc) + $(warning WARNING: GCC support is experimental. Use at your own risk.) + CFLAGS += -DCOMPILER_GCC + NON_MATCHING := 1 +endif + +# Detect compiler and set variables appropriately. +ifeq ($(COMPILER),gcc) + CC := $(MIPS_BINUTILS_PREFIX)gcc +else +ifeq ($(COMPILER),ido) + CC := tools/ido_recomp/$(DETECTED_OS)/7.1/cc + CC_OLD := tools/ido_recomp/$(DETECTED_OS)/5.3/cc +else +$(error Unsupported compiler. Please use either ido or gcc as the COMPILER variable.) +endif +endif + +# ditch g3, we aren't using that in GCC +ifeq ($(COMPILER),gcc) + OPTFLAGS := -Os +else + OPTFLAGS := -O2 -g3 +endif + +ifeq ($(COMPILER),gcc) + CFLAGS += -G 0 -ffast-math -fno-unsafe-math-optimizations -march=vr4300 -mfix4300 -mabi=32 -mno-abicalls -mdivide-breaks -fno-zero-initialized-in-bss -fno-toplevel-reorder -ffreestanding -fno-common -fno-merge-constants -mno-explicit-relocs -mno-split-addresses $(CHECK_WARNINGS) -funsigned-char + MIPS_VERSION := -mips3 +else + # we support Microsoft extensions such as anonymous structs, which the compiler does support but warns for their usage. Surpress the warnings with -woff. + CFLAGS += -G 0 -non_shared -fullwarn -verbose -Xcpluscomm $(IINC) -nostdinc -Wab,-r4300_mul -woff 649,838,712,516 + MIPS_VERSION := -mips2 +endif + +ifeq ($(COMPILER),ido) + # Have CC_CHECK pretend to be a MIPS compiler + MIPS_BUILTIN_DEFS := -D_MIPS_ISA_MIPS2=2 -D_MIPS_ISA=_MIPS_ISA_MIPS2 -D_ABIO32=1 -D_MIPS_SIM=_ABIO32 -D_MIPS_SZINT=32 -D_MIPS_SZLONG=32 -D_MIPS_SZPTR=32 + CC_CHECK = gcc -fno-builtin -fsyntax-only -funsigned-char -std=gnu90 -D_LANGUAGE_C -DNON_MATCHING $(MIPS_BUILTIN_DEFS) $(IINC) $(CHECK_WARNINGS) + ifeq ($(shell getconf LONG_BIT), 32) + # Work around memory allocation bug in QEMU + export QEMU_GUEST_BASE := 1 + else + # Ensure that gcc (warning check) treats the code as 32-bit + CC_CHECK += -m32 + endif +else + CC_CHECK = @: +endif + BUILD_DEFINES ?= ifeq ($(VERSION),us) @@ -73,7 +126,7 @@ endif ifeq ($(NON_MATCHING),1) BUILD_DEFINES += -DNON_MATCHING -DAVOID_UB - COMPARE := 0 + CPPFLAGS += -DNON_MATCHING -DAVOID_UB endif MAKE = make @@ -190,10 +243,6 @@ else CC_CHECK := @: endif - -CFLAGS += -G 0 -non_shared -Xcpluscomm -nostdinc -Wab,-r4300_mul - -WARNINGS := -fullwarn -verbose -woff 624,649,838,712,516,513,596,564,594,709 ASFLAGS := -march=vr4300 -32 -G0 COMMON_DEFINES := -D_MIPS_SZLONG=32 GBI_DEFINES := -DF3DEX_GBI @@ -202,8 +251,6 @@ AS_DEFINES := -DMIPSEB -D_LANGUAGE_ASSEMBLY -D_ULTRA64 C_DEFINES := -DLANGUAGE_C -D_LANGUAGE_C -DBUILD_VERSION=VERSION_H ${RELEASE_DEFINES} ENDIAN := -EB -OPTFLAGS := -O2 -g3 -MIPS_VERSION := -mips2 ICONV_FLAGS := --from-code=UTF-8 --to-code=EUC-JP # Use relocations and abi fpr names in the dump @@ -247,6 +294,9 @@ DEP_FILES := $(O_FILES:.o=.d) \ # create build directories $(shell mkdir -p $(BUILD_DIR)/linker_scripts/$(VERSION) $(BUILD_DIR)/linker_scripts/$(VERSION)/auto $(foreach dir,$(SRC_DIRS) $(ASM_DIRS) $(BIN_DIRS),$(BUILD_DIR)/$(dir))) +ifeq ($(COMPILER),ido) +CFLAGS += -G 0 -non_shared -Xcpluscomm -nostdinc -Wab,-r4300_mul +WARNINGS := -fullwarn -verbose -woff 624,649,838,712,516,513,596,564,594,709 # directory flags build/src/libultra/gu/%.o: OPTFLAGS := -O3 -g0 @@ -281,8 +331,41 @@ build/src/libultra/gu/mtxutil.o: CC := $(IDO) build/src/libultra/gu/cosf.o: CC := $(IDO) build/src/libultra/libc/xprintf.o: CC := $(IDO) build/src/libultra/libc/xldtob.o: CC := $(IDO) +else +# directory flags +build/src/libultra/gu/%.o: OPTFLAGS := -Os +build/src/libultra/io/%.o: OPTFLAGS := -Os +build/src/libultra/os/%.o: OPTFLAGS := -Os +build/src/libultra/rmon/%.o: OPTFLAGS := -Os +build/src/libultra/debug/%.o: OPTFLAGS := -Os +build/src/libultra/host/%.o: OPTFLAGS := -Os +build/src/audio/audio_load.o: OPTFLAGS := -Os # Crashes with -O2 and -O3 +build/src/audio/%.o: OPTFLAGS := -O2 -g -#build/src/%.o: CC := $(ASM_PROC) $(ASM_PROC_FLAGS) $(IDO) -- $(AS) $(ASFLAGS) -- +# per-file flags +build/src/libc_sprintf.o: OPTFLAGS := -Os +build/src/libc_math64.o: OPTFLAGS := -Os + +build/src/libultra/libc/ldiv.o: OPTFLAGS := -Os +build/src/libultra/libc/string.o: OPTFLAGS := -Os +build/src/libultra/libc/xlitob.o: OPTFLAGS := -Os +build/src/libultra/libc/xldtob.o: OPTFLAGS := -Os +build/src/libultra/libc/xprintf.o: OPTFLAGS := -Os +build/src/libultra/libc/ll.o: OPTFLAGS := -Os +build/src/libultra/libc/ll.o: MIPS_VERSION := -mips3 + +# cc & asm-processor +build/src/libultra/gu/sqrtf.o: OPTFLAGS := -Os +build/src/libultra/gu/sinf.o: OPTFLAGS := -Os +build/src/libultra/gu/lookat.o: OPTFLAGS := -Os +build/src/libultra/gu/ortho.o: OPTFLAGS := -Os +build/src/libultra/libc/ll.o: OPTFLAGS := -Os +build/src/libultra/gu/perspective.o: OPTFLAGS := -Os +build/src/libultra/gu/mtxutil.o: OPTFLAGS := -Os +build/src/libultra/gu/cosf.o: OPTFLAGS := -Os +build/src/libultra/libc/xprintf.o: OPTFLAGS := -Os +build/src/libultra/libc/xldtob.o: OPTFLAGS := -Os +endif all: uncompressed diff --git a/include/libc/math.h b/include/libc/math.h index 0e63d99b..4eb99a73 100644 --- a/include/libc/math.h +++ b/include/libc/math.h @@ -41,7 +41,9 @@ double fabs(double f); #endif float sqrtf(float f); +#if defined(__sgi) #pragma intrinsic(sqrtf) +#endif double sqrt(double d); #pragma intrinsic(sqrt) diff --git a/src/audio/audio_heap.c b/src/audio/audio_heap.c index 69c5e6ca..2f59b183 100644 --- a/src/audio/audio_heap.c +++ b/src/audio/audio_heap.c @@ -765,6 +765,7 @@ u8* AudioHeap_AllocPermanent(s32 tableType, s32 id, u32 size) { ramAddr = AudioHeap_Alloc(&gPermanentPool.pool, size); gPermanentPool.entry[index].ramAddr = ramAddr; + if (ramAddr == NULL) { return NULL; } @@ -772,7 +773,10 @@ u8* AudioHeap_AllocPermanent(s32 tableType, s32 id, u32 size) { gPermanentPool.entry[index].tableType = tableType; gPermanentPool.entry[index].id = id; gPermanentPool.entry[index].size = size; - // return temp; + +#ifdef AVOID_UB + return ramAddr; +#endif } void* AudioHeap_AllocTemporarySampleCache(s32 size, s32 fontId, s32 sampleAddr, s8 medium) { diff --git a/src/audio/note_data.c b/src/audio/note_data.c index 79225a4b..20fd3353 100644 --- a/src/audio/note_data.c +++ b/src/audio/note_data.c @@ -280,7 +280,7 @@ u16 gHaasEffectDelaySizes[64] = { }; // clang-format off -s16 D_800DD200[] = { +ALIGNED(16) s16 D_800DD200[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/src/audio/wave_samples.c b/src/audio/wave_samples.c index b21d31be..60406673 100644 --- a/src/audio/wave_samples.c +++ b/src/audio/wave_samples.c @@ -1,7 +1,7 @@ #include "sys.h" // clang-format off -s16 gSawtoothWaveSample[] = { +ALIGNED(16) s16 gSawtoothWaveSample[] = { // Frequency of 1 0, 1023, 2047, 3071, 4095, 5119, 6143, 7167, 8191, 9215, 10239, 11263, 12287, 13311, 14335, 15359, @@ -43,7 +43,7 @@ s16 gSawtoothWaveSample[] = { 0, 8191, 16383, 24575, -32767, -24575, -16383, -8191, }; -s16 gTriangleWaveSample[] = { +ALIGNED(16) s16 gTriangleWaveSample[] = { // Frequency of 1 0, 2047, 4095, 6143, 8191, 10239, 12287, 14335, 16383, 18431, 20479, 22527, 24575, 26623, 28671, 30719, @@ -85,7 +85,7 @@ s16 gTriangleWaveSample[] = { 0, 16383, 32767, 16383, 0, -16383, -32767, -16383, }; -s16 gSineWaveSample[] = { +ALIGNED(16) s16 gSineWaveSample[] = { // Frequency of 1 0, 3211, 6392, 9511, 12539, 15446, 18204, 20787, 23169, 25329, 27244, 28897, 30272, 31356, 32137, 32609, @@ -127,7 +127,7 @@ s16 gSineWaveSample[] = { 0, 23169, 32767, 23169, 0, -23169, -32767, -23169, }; -s16 gSquareWaveSample[] = { +ALIGNED(16) s16 gSquareWaveSample[] = { // Frequency of 1 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -169,7 +169,7 @@ s16 gSquareWaveSample[] = { 0, 0, 32767, 32767, 0, 0, -32767, -32767, }; -s16 gWhiteNoiseSample[] = { +ALIGNED(16) s16 gWhiteNoiseSample[] = { // Frequency of 1 0, -25689, -25791, 27803, -27568, -21030, 22174, 6298, 27071, -18531, 28649, 2284, 3380, 6890, -12682, -21114, @@ -212,7 +212,7 @@ s16 gWhiteNoiseSample[] = { }; // Sine White Noise? -s16 gUnkSample[] = { +ALIGNED(16) s16 gUnkSample[] = { // Frequency of 1 0, 16316, 20148, 20257, 27209, -32657, 29264, 27259, -29394, -21494, -26410, 30770, 30033, 29130, 20206, 14129, @@ -255,6 +255,7 @@ s16 gUnkSample[] = { }; // clang-format on +ALIGNED(16) s16* gWaveSamples[] = { gSawtoothWaveSample, gTriangleWaveSample, gSineWaveSample, gSquareWaveSample, gWhiteNoiseSample, gUnkSample, }; diff --git a/src/libultra/gcc_fix/sqrtf.c.inc b/src/libultra/gcc_fix/sqrtf.c.inc new file mode 100644 index 00000000..b1dbee47 --- /dev/null +++ b/src/libultra/gcc_fix/sqrtf.c.inc @@ -0,0 +1,130 @@ +/* --------------------------------------------------------------------------------*/ +/* Depending on the toolchain used, an appropriate precompiled libgcc library */ +/* may not exist and cannot be linked against. Until we have a better work around, */ +/* necessary gcc functions are hosted here in order to properly compile. */ +/* This file is NOT a part of the original game and only exists to help gcc work. */ +/* --------------------------------------------------------------------------------*/ + +asm(" \n\ + .set push \n\ + .set noat \n\ + .set noreorder \n\ + .set gp=64 \n\ + \n\ +.global sqrtf \n\ +sqrtf: \n\ + jr $ra \n\ + sqrt.s $f0, $f12 \n\ + nop \n\ + nop \n\ + \n"); + +asm(" \n\ + .set push \n\ + .set noat \n\ + .set noreorder \n\ + .set gp=64 \n\ + \n\ +.global __umoddi3 \n\ +__umoddi3: \n\ + .type __umoddi3, @function \n\ + .ent __umoddi3 \n\ + sw $a0, ($sp) \n\ + sw $a1, 4($sp) \n\ + sw $a2, 8($sp) \n\ + sw $a3, 0xc($sp) \n\ + ld $t7, 8($sp) \n\ + ld $t6, ($sp) \n\ + ddivu $zero, $t6, $t7 \n\ + bnez $t7, 1f \n\ + nop \n\ + break 7 \n\ +1: \n\ + mfhi $v0 \n\ + dsll32 $v1, $v0, 0 \n\ + dsra32 $v1, $v1, 0 \n\ + jr $ra \n\ + dsra32 $v0, $v0, 0 \n\ + .end __umoddi3 \n\ + .size __umoddi3, . - __umoddi3 \n\ + \n\ +.global __udivdi3 \n\ +__udivdi3: \n\ + .type __udivdi3, @function \n\ + .ent __udivdi3 \n\ + sw $a0, ($sp) \n\ + sw $a1, 4($sp) \n\ + sw $a2, 8($sp) \n\ + sw $a3, 0xc($sp) \n\ + ld $t7, 8($sp) \n\ + ld $t6, ($sp) \n\ + ddivu $zero, $t6, $t7 \n\ + bnez $t7, 1f \n\ + nop \n\ + break 7 \n\ +1: \n\ + mflo $v0 \n\ + dsll32 $v1, $v0, 0 \n\ + dsra32 $v1, $v1, 0 \n\ + jr $ra \n\ + dsra32 $v0, $v0, 0 \n\ + .end __udivdi3 \n\ + .size __udivdi3, . - __udivdi3 \n\ + \n\ +.global __moddi3 \n\ +__moddi3: \n\ + .type __moddi3, @function \n\ + .ent __moddi3 \n\ + sw $a0, ($sp) \n\ + sw $a1, 4($sp) \n\ + sw $a2, 8($sp) \n\ + sw $a3, 0xc($sp) \n\ + ld $t7, 8($sp) \n\ + ld $t6, ($sp) \n\ + ddivu $zero, $t6, $t7 \n\ + bnez $t7, 1f \n\ + nop \n\ + break 7 \n\ +1: \n\ + mfhi $v0 \n\ + dsll32 $v1, $v0, 0 \n\ + dsra32 $v1, $v1, 0 \n\ + jr $ra \n\ + dsra32 $v0, $v0, 0 \n\ + .end __moddi3 \n\ + .size __moddi3, . - __moddi3 \n\ + \n\ +.global __divdi3 \n\ +__divdi3: \n\ + .type __divdi3, @function \n\ + .ent __divdi3 \n\ + sw $a0, ($sp) \n\ + sw $a1, 4($sp) \n\ + sw $a2, 8($sp) \n\ + sw $a3, 0xc($sp) \n\ + ld $t7, 8($sp) \n\ + ld $t6, ($sp) \n\ + ddiv $zero, $t6, $t7 \n\ + nop \n\ + bnez $t7, 1f \n\ + nop \n\ + break 7 \n\ +1: \n\ + daddiu $at, $zero, -1 \n\ + bne $t7, $at, 2f \n\ + daddiu $at, $zero, 1 \n\ + dsll32 $at, $at, 0x1f \n\ + bne $t6, $at, 2f \n\ + nop \n\ + break 6 \n\ +2: \n\ + mflo $v0 \n\ + dsll32 $v1, $v0, 0 \n\ + dsra32 $v1, $v1, 0 \n\ + jr $ra \n\ + dsra32 $v0, $v0, 0 \n\ + .end __divdi3 \n\ + .size __divdi3, . - __divdi3 \n\ + \n\ + .set pop \n\ + \n"); diff --git a/src/libultra/gu/sqrtf.c b/src/libultra/gu/sqrtf.c index 57df68b3..d8221c18 100644 --- a/src/libultra/gu/sqrtf.c +++ b/src/libultra/gu/sqrtf.c @@ -1,6 +1,10 @@ #include "PR/ultratypes.h" #include "libc/math.h" +#ifdef COMPILER_GCC +#include "src/libultra/gcc_fix/sqrtf.c.inc" +#endif + f32 guSqrtf(f32 value) { return sqrtf(value); } diff --git a/src/overlays/ovl_menu/fox_option.c b/src/overlays/ovl_menu/fox_option.c index 25c9d7e8..3536c47f 100644 --- a/src/overlays/ovl_menu/fox_option.c +++ b/src/overlays/ovl_menu/fox_option.c @@ -365,6 +365,14 @@ void Option_Setup(void) { bool playedExpertMode; s32 i; +#if MODS_LEVEL_SELECT == 1 + for (i = 0; i < PLANET_MAX; i++) { + gSaveFile.save.data.planet[i].expertClear = 1; + gSaveFile.save.data.planet[i].normalClear = 1; + gSaveFile.save.data.planet[i].played = 1; + } + Save_Write(); +#endif gVIsPerFrame = 2; sOptionCardList[0].unk_00.unk_08 = D_OPT_8003B50; diff --git a/src/sys/sys_fault.c b/src/sys/sys_fault.c index 9eb0cd9b..864a3be7 100644 --- a/src/sys/sys_fault.c +++ b/src/sys/sys_fault.c @@ -241,6 +241,8 @@ void Fault_ThreadEntry(void* arg0) { func_8000762C(300, 10, "-"); gControllerPlugged[0] = 1; + +#if 1 // Turn this off for instant crash debugger (no button combination needed) while (var_s5 == 0) { osSendMesg(&gSerialThreadMsgQueue, (OSMesg) SI_READ_CONTROLLER, OS_MESG_PRI_NORMAL); osRecvMesg(&gControllerMsgQueue, NULL, OS_MESG_BLOCK); @@ -312,6 +314,8 @@ void Fault_ThreadEntry(void* arg0) { var_s0 = 0; } } +#endif + func_80007910(sp40); while (1) { ; From 0e54a134335f924ac7d1b8de7ccfb97bf37abff0 Mon Sep 17 00:00:00 2001 From: petrie911 <69443847+petrie911@users.noreply.github.com> Date: Mon, 15 Apr 2024 18:38:19 -0500 Subject: [PATCH 025/151] Docs relating to fox_360. Also a UB fix in audio_load. (#215) * docs * format * format plz --- include/context.h | 2 +- include/functions.h | 61 +- include/global.h | 22 + include/sf64math.h | 71 ++- include/sf64player.h | 37 +- include/structs.h | 4 +- include/sys.h | 2 +- linker_scripts/us/symbol_addrs_engine.txt | 18 +- src/audio/audio_load.c | 3 + src/engine/fox_360.c | 739 +++++++++++----------- src/engine/fox_A48A0.c | 9 +- src/engine/fox_beam.c | 274 ++++---- src/engine/fox_bg.c | 288 ++++----- src/engine/fox_boss.c | 2 +- src/engine/fox_context.c | 2 +- src/engine/fox_demo.c | 415 ++++++------ src/engine/fox_display.c | 477 +++++++------- src/engine/fox_edata.c | 4 +- src/engine/fox_edata_info.c | 8 +- src/engine/fox_edisplay.c | 416 ++++++------ src/engine/fox_effect.c | 215 +++---- src/engine/fox_enmy.c | 206 +++--- src/engine/fox_enmy2.c | 197 +++--- src/engine/fox_fade.c | 6 +- src/engine/fox_game.c | 21 +- src/engine/fox_hud.c | 401 ++++++------ src/engine/fox_play.c | 670 ++++++++++---------- src/engine/fox_radio.c | 6 +- src/engine/fox_std_lib.c | 36 +- src/engine/fox_tank.c | 68 +- src/engine/fox_versus.c | 27 +- src/overlays/ovl_ending/fox_end1.c | 145 ++--- src/overlays/ovl_ending/fox_end2.c | 316 +++++---- src/overlays/ovl_i1/fox_co.c | 183 +++--- src/overlays/ovl_i1/fox_tr.c | 2 +- src/overlays/ovl_i1/fox_tr360.c | 10 +- src/overlays/ovl_i1/fox_ve1.c | 64 +- src/overlays/ovl_i2/fox_me.c | 250 ++++---- src/overlays/ovl_i2/fox_sx.c | 208 +++--- src/overlays/ovl_i3/fox_a6.c | 226 +++---- src/overlays/ovl_i3/fox_aq.c | 311 ++++----- src/overlays/ovl_i3/fox_so.c | 212 +++---- src/overlays/ovl_i3/fox_zo.c | 296 ++++----- src/overlays/ovl_i4/fox_bo.c | 152 ++--- src/overlays/ovl_i4/fox_fo.c | 158 ++--- src/overlays/ovl_i4/fox_i4.c | 18 +- src/overlays/ovl_i4/fox_ka.c | 253 ++++---- src/overlays/ovl_i4/fox_sz.c | 184 +++--- src/overlays/ovl_i5/fox_ground.c | 8 +- src/overlays/ovl_i5/fox_ma.c | 382 +++++------ src/overlays/ovl_i5/fox_ti.c | 315 ++++----- src/overlays/ovl_i5/fox_ti_cs.c | 70 +- src/overlays/ovl_i6/fox_andross.c | 381 +++++------ src/overlays/ovl_i6/fox_sy.c | 346 +++++----- src/overlays/ovl_i6/fox_turret.c | 98 +-- src/overlays/ovl_i6/fox_ve2.c | 66 +- src/overlays/ovl_menu/fox_i_menu.c | 16 +- src/overlays/ovl_menu/fox_map.c | 290 ++++----- src/overlays/ovl_menu/fox_option.c | 89 +-- src/overlays/ovl_menu/fox_title.c | 169 ++--- src/sys/sys_matrix.c | 24 +- 61 files changed, 5071 insertions(+), 4878 deletions(-) diff --git a/include/context.h b/include/context.h index e161f955..f41dbb56 100644 --- a/include/context.h +++ b/include/context.h @@ -151,7 +151,7 @@ extern f32 D_ctx_80178470[3]; extern f32 gCameraShakeY; extern s32 gCameraShake; extern s32 D_ctx_80178484; -extern bool D_ctx_80178488; +extern bool gLoadLevelObjects; extern UNK_TYPE F_8017848C; extern UNK_TYPE F_80178490; extern s32 D_ctx_80178494; diff --git a/include/functions.h b/include/functions.h index 7b4224b0..1ea682f5 100644 --- a/include/functions.h +++ b/include/functions.h @@ -8,26 +8,26 @@ #include "sf64mesg.h" // fox_360 -void func_360_8002ED60(Player*); -void func_360_8002E3E0(Actor*); +void AllRange_FortunaIntro(Player*); +void AllRange_GetStarWolfHits(Actor*); void AllRange_UpdateCountdown(void); -void func_360_8002E5E0(Boss*); -void func_360_8002E604(Boss*); -void func_360_8002E628(Boss*); -void func_360_8002E64C(Boss*); -void func_360_8002E670(Actor*); -void func_360_8002E694(Actor*); -void func_360_8002E6B8(Actor*); -void func_360_8002E6DC(Actor*); -bool func_360_8002E4F8(u16*, RadioCharacterId); -void func_360_8002E700(Player*); -void func_360_8002EE34(void); -void func_360_8002EE64(Actor* actor); +void Boss309_Update(Boss*); +void Boss309_Draw(Boss*); +void Boss310_Update(Boss*); +void Boss310_Draw(Boss*); +void Actor271_Update(Actor*); +void Actor271_Draw(Actor*); +void Actor272_Update(Actor*); +void Actor272_Draw(Actor*); +bool AllRange_PlayMessage(u16*, RadioCharacterId); +void AllRange_GreatFoxRepair(Player*); +void AllRange_ClearRadio(void); +void func_360_8002EE64(Actor* this); void func_360_8002F180(void); -void func_360_8002F5F4(u16* msg, RadioCharacterId character); +void ActorAllRange_PlayMessage(u16* msg, RadioCharacterId character); void func_360_8002F69C(Actor*); void func_360_8002FC00(Actor*); -void func_360_8003088C(Actor*); +void ActorAllRange_ApplyDamage(Actor*); bool func_360_80031900(Actor*); void ActorAllRange_Update(Actor* this); void ActorAllRange_Draw(Actor* this); @@ -73,16 +73,16 @@ void func_tank_80047504(Player* player); void func_tank_80046358(Player*); // fox_demo -void func_demo_8004D440(Player*); +void Cutscene_KillPlayer(Player*); void func_demo_80048AC0(s32 teamId); -void func_demo_80049C0C(Player*); -void func_demo_8004A52C(Player*); +void Cutscene_EnterWarpZone(Player*); +void Cutscene_LevelStart(Player*); void func_demo_8004AA84(void); -void func_demo_8004AAF4(Player*); -void func_demo_8004C930(Player*); -void func_demo_8004CCC0(Player*); -void func_demo_8004D440(Player* player); -void func_demo_8004E3D8(Player*); +void Cutscene_AllRangeMode(Player*); +void Cutscene_LevelComplete(Player*); +void Cutscene_UTurn(Player*); +void Cutscene_KillPlayer(Player* player); +void Cutscene_PlayerDown(Player*); void func_demo_8004F8AC(Actor*); void func_demo_8004FEC0(Actor*); void func_demo_800515C4(void); @@ -159,10 +159,10 @@ void Object_Load(ObjectInit* , f32 , f32 , f32 , f32 ); void func_enmy_80062568(void); void func_enmy_80062B60(f32 xPos, f32 zPos, s32 state, f32 scale); void func_enmy_80062C38(f32, f32); -bool func_enmy_80062DBC(Vec3f* pos, f32* hitboxData, Object* obj, f32 xRot, f32 yRot, f32 zRot); -bool func_enmy_800631A8(Vec3f*, f32*, Vec3f*); -bool func_enmy_8006326C(Vec3f* , Vec3f* , ObjectId , Object* ); -s32 func_enmy_8006351C(s32 , Vec3f* , Vec3f* , s32 ); +bool Object_CheckHitboxCollision(Vec3f* pos, f32* hitboxData, Object* obj, f32 xRot, f32 yRot, f32 zRot); +bool Object_CheckSingleHitbox(Vec3f*, f32*, Vec3f*); +bool Object_CheckPolyCollision(Vec3f* , Vec3f* , ObjectId , Object* ); +s32 Object_CheckCollision(s32 , Vec3f* , Vec3f* , s32 ); void func_enmy_800652CC(Object_80*); void func_enmy_800654E4(Object*); void func_enmy_800656D4(Actor*); @@ -433,10 +433,11 @@ void func_hud_80096A74(Player* player); // fox_97F80 void func_col1_80098860(PlaneF* plane, Vec3f* point, Vec3f* normal); s32 func_col1_800988B4(Vec3f* vec, PlaneF* plane); -bool func_col1_800998FC(Vec3f*, Vec3f*, Vec3f*, s32, Vec3f*, f32*); +bool func_col1_800998FC(Vec3f* objPos, Vec3f* colliderPos, Vec3f* objVel, s32 colId, Vec3f* hitPosOut, + f32* hitAnglesOut); // fox_A4290 -bool func_col2_800A3690(Vec3f*, Vec3f*, s32, Vec3f*); +bool func_col2_800A3690(Vec3f* objPos, Vec3f* colliderPos, s32 colId, Vec3f* hitDataOut); // fox_A48A0 void func_800A3CA0(void); diff --git a/include/global.h b/include/global.h index 9811992c..a17e6200 100644 --- a/include/global.h +++ b/include/global.h @@ -3,6 +3,26 @@ #include "sys.h" +typedef enum OverlayCalls { + /* 90 */ OVLCALL_FO_CS_COMPLETE = 90, + /* 91 */ OVLCALL_BOSS309_UPDATE, + /* 92 */ OVLCALL_BOSS309_DRAW, + /* 93 */ OVLCALL_BOSS310_UPDATE, + /* 94 */ OVLCALL_BOSS310_DRAW, + /* 95 */ OVLCALL_ACTOR271_UPDATE, + /* 96 */ OVLCALL_ACTOR271_DRAW, + /* 97 */ OVLCALL_ACTOR272_UPDATE, + /* 98 */ OVLCALL_ACTOR272_DRAW, + /* 103 */ OVLCALL_TITLE_UPDATE = 103, + /* 104 */ OVLCALL_TITLE_DRAW, + /* 105 */ OVLCALL_MAP_UPDATE, + /* 106 */ OVLCALL_MAP_DRAW, + /* 107 */ OVLCALL_OPTION_UPDATE, + /* 108 */ OVLCALL_OPTION_DRAW, + /* 109 */ OVLCALL_GAME_OVER_UPDATE, + /* 110 */ OVLCALL_UNKMAP_DRAW, +} OverlayCalls; + #include "sf64audio_external.h" #include "functions.h" #include "variables.h" @@ -22,4 +42,6 @@ #include "i6.h" #include "assets/ast_common.h" + + #endif // GLOBAL_H diff --git a/include/sf64math.h b/include/sf64math.h index 939d0736..7fe5a7c2 100644 --- a/include/sf64math.h +++ b/include/sf64math.h @@ -3,6 +3,9 @@ #include "libultra/ultra64.h" +#define MTXF_NEW 0 +#define MTXF_APPLY 1 + typedef struct { /* 0x0 */ f32 x; /* 0x4 */ f32 y; @@ -71,24 +74,66 @@ s32 Math_PursueVec3f(Vec3f *pos, Vec3f *target, Vec3f *rot, f32 stepSize, f32 sc void Math_Vec3fFromAngles(Vec3f *step, f32 xRot, f32 yRot, f32 stepsize); f32 Math_RadToDeg(f32 rAngle); -void Matrix_Copy(Matrix*, Matrix*); +// Copies src Matrix into dst +void Matrix_Copy(Matrix* dst, Matrix* src); + +// Makes a copy of the stack's current matrix and puts it on the top of the stack void Matrix_Push(Matrix** mtxStack); + +// Removes the top matrix of the stack void Matrix_Pop(Matrix** mtxStack); -void Matrix_Mult(Matrix*, Matrix*, u8); -void Matrix_Translate(Matrix*, f32, f32, f32, u8); + +// Copies tf into mtx (MTXF_NEW) or applies it to mtx (MTXF_APPLY) +void Matrix_Mult(Matrix* mtx, Matrix* tf, u8 mode); + +// Creates a translation matrix in mtx (MTXF_NEW) or applies one to mtx (MTXF_APPLY) +void Matrix_Translate(Matrix* mtx, f32 x, f32 y, f32 z, u8 mode); + +// Creates a scale matrix in mtx (MTXF_NEW) or applies one to mtx (MTXF_APPLY) void Matrix_Scale(Matrix* mtx, f32 xScale, f32 yScale, f32 zScale, u8 mode); -void Matrix_RotateX(Matrix*, f32, u8); -void Matrix_RotateY(Matrix*, f32, u8); -void Matrix_RotateZ(Matrix*, f32, u8); -void Matrix_RotateAxis(Matrix*, f32, f32, f32, f32, u8); -void Matrix_ToMtx(Mtx *dest); -void Matrix_FromMtx(Mtx *src, Matrix *dest); + +// Creates rotation matrix about the X axis in mtx (MTXF_NEW) or applies one to mtx (MTXF_APPLY) +void Matrix_RotateX(Matrix* mtx, f32 angle, u8 mode); + +// Creates rotation matrix about the Y axis in mtx (MTXF_NEW) or applies one to mtx (MTXF_APPLY) +void Matrix_RotateY(Matrix* mtx, f32 angle, u8 mode); + +// Creates rotation matrix about the Z axis in mtx (MTXF_NEW) or applies one to mtx (MTXF_APPLY) +void Matrix_RotateZ(Matrix* mtx, f32 angle, u8 mode); + +// Creates rotation matrix about a given vector axis in mtx (MTXF_NEW) or applies one to mtx (MTXF_APPLY). +// The vector specifying the axis does not need to be a unit vector. +void Matrix_RotateAxis(Matrix* mtx, f32 angle, f32 axisX, f32 axisY, f32 axisZ, u8 mode); + +// Converts the current Gfx matrix to a Mtx +void Matrix_ToMtx(Mtx* dest); + +// Converts the Mtx src to a Matrix, putting the result in dest +void Matrix_FromMtx(Mtx* src, Matrix* dest); + +// Applies the transform matrix mtx to the vector src, putting the result in dest void Matrix_MultVec3f(Matrix* mtx, Vec3f* src, Vec3f* dest); + +// Applies the linear part of the transformation matrix mtx to the vector src, ignoring any translation that mtx might +// have. Puts the result in dest. void Matrix_MultVec3fNoTranslate(Matrix* mtx, Vec3f* src, Vec3f* dest); -void Matrix_GetYRPAngles(Matrix*, Vec3f*); -void Matrix_GetXYZAngles(Matrix*, Vec3f*); -void Matrix_LookAt(Matrix*, f32, f32, f32, f32, f32, f32, f32, f32, f32, u8); -void Matrix_SetGfxMtx(Gfx**); + +// Expresses the rotational part of the transform mtx as Tait-Bryan angles, in the yaw-pitch-roll (intrinsic YXZ) +// convention used in worldspace calculations +void Matrix_GetYRPAngles(Matrix* mtx, Vec3f* rot); + +// Expresses the rotational part of the transform mtx as Tait-Bryan angles, in the extrinsic XYZ convention used in +// modelspace calculations +void Matrix_GetXYZAngles(Matrix* mtx, Vec3f* rot); + +// Creates a look-at matrix from Eye, At, and Up in mtx (MTXF_NEW) or applies one to mtx (MTXF_APPLY). +// A look-at matrix is a rotation-translation matrix that maps y to Up, z to (At - Eye), and translates to Eye +void Matrix_LookAt(Matrix* mtx, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp, + u8 mode); + +// Converts the current Gfx matrix to a Mtx and sets it to the display list +void Matrix_SetGfxMtx(Gfx** gfx); + f32 Math_FAtanF(f32); f32 Math_FAtan2F(f32, f32); diff --git a/include/sf64player.h b/include/sf64player.h index a18044ea..9504ab37 100644 --- a/include/sf64player.h +++ b/include/sf64player.h @@ -57,20 +57,20 @@ typedef enum LevelMode { } LevelMode; typedef enum PlayerState1C8 { - /* 0 */ PLAYERSTATE_1C8_0, - /* 1 */ PLAYERSTATE_1C8_1, - /* 2 */ PLAYERSTATE_1C8_2, - /* 3 */ PLAYERSTATE_1C8_3, - /* 4 */ PLAYERSTATE_1C8_4, - /* 5 */ PLAYERSTATE_1C8_5, - /* 6 */ PLAYERSTATE_1C8_6, - /* 7 */ PLAYERSTATE_1C8_7, - /* 8 */ PLAYERSTATE_1C8_8, - /* 9 */ PLAYERSTATE_1C8_9, - /* 10 */ PLAYERSTATE_1C8_10, - /* 11 */ PLAYERSTATE_1C8_11, + /* 0 */ PLAYERSTATE_1C8_STANDBY, + /* 1 */ PLAYERSTATE_1C8_INIT, + /* 2 */ PLAYERSTATE_1C8_LEVEL_INTRO, + /* 3 */ PLAYERSTATE_1C8_ACTIVE, + /* 4 */ PLAYERSTATE_1C8_DOWN, + /* 5 */ PLAYERSTATE_1C8_U_TURN, + /* 6 */ PLAYERSTATE_1C8_NEXT, + /* 7 */ PLAYERSTATE_1C8_LEVEL_COMPLETE, + /* 8 */ PLAYERSTATE_1C8_ENTER_WARP_ZONE, + /* 9 */ PLAYERSTATE_1C8_START_360, + /* 10 */ PLAYERSTATE_1C8_GFOX_REPAIR, + /* 11 */ PLAYERSTATE_1C8_ANDROSS_MOUTH, /* 12 */ PLAYERSTATE_1C8_12, - /* 13 */ PLAYERSTATE_1C8_13, + /* 13 */ PLAYERSTATE_1C8_VS_STANDBY, } PlayerState1C8; typedef enum { @@ -127,7 +127,7 @@ typedef struct { /* 0x20 */ f32 unk_20; /* 0x24 */ f32 unk_24; /* 0x28 */ f32 unk_28; - /* 0x2C */ u8 unk_2C; + /* 0x2C */ u8 modelId; /* 0x30 */ f32 unk_30; /* 0x34 */ f32 unk_34; /* 0x38 */ f32 unk_38; @@ -159,12 +159,11 @@ typedef struct Player { /* 0x028 */ f32 unk_028; /* 0x02C */ f32 unk_02C; /* 0x030 */ f32 unk_030; - /* 0x034 */ f32 unk_034; + /* 0x034 */ f32 camRoll; /* 0x038 */ char pad38[8]; - /* 0x040 */ Vec3f camEye; - /* 0x04C */ Vec3f camAt; - /* 0x058 */ f32 unk_058; - /* 0x05C */ f32 unk_05C; + /* 0x040 */ CameraPoint cam; + /* 0x058 */ f32 camYaw; + /* 0x05C */ f32 camPitch; /* 0x05C */ f32 unk_060; /* 0x064 */ f32 unk_064; /* 0x068 */ f32 unk_068; diff --git a/include/structs.h b/include/structs.h index 332d943c..7bd35c8c 100644 --- a/include/structs.h +++ b/include/structs.h @@ -5,8 +5,8 @@ #include "sf64math.h" typedef struct { - /* 0x00 */ u8 unk_00; - /* 0x02 */ u16 unk_02; + /* 0x00 */ u8 status; + /* 0x02 */ u16 type; /* 0x04 */ Vec3f pos; /* 0x10 */ f32 unk_10; /* 0x14 */ char pad14[0x14]; diff --git a/include/sys.h b/include/sys.h index e9a403ff..da2c0952 100644 --- a/include/sys.h +++ b/include/sys.h @@ -47,7 +47,7 @@ extern f32 D_game_80161A10; extern f32 D_game_80161A14; extern s32 gPlayerInactive[4]; extern s32 D_game_80161A28; -extern u8 D_game_80161A2C; +extern u8 gShowHud; extern u16 gNextLevelStage; extern u16 gNextLevel; extern u16 gNextGameState; diff --git a/linker_scripts/us/symbol_addrs_engine.txt b/linker_scripts/us/symbol_addrs_engine.txt index e5638aa8..65389bdc 100644 --- a/linker_scripts/us/symbol_addrs_engine.txt +++ b/linker_scripts/us/symbol_addrs_engine.txt @@ -276,14 +276,14 @@ func_enmy_80061E48 = 0x80061E48; func_enmy_80061F0C = 0x80061F0C; Object_Load = 0x80062180; func_enmy_80062568 = 0x80062568; -func_enmy_80062664 = 0x80062664; +Object_LoadFromInit = 0x80062664; func_enmy_80062B60 = 0x80062B60; func_enmy_80062C38 = 0x80062C38; func_enmy_80062D04 = 0x80062D04; -func_enmy_80062DBC = 0x80062DBC; -func_enmy_800631A8 = 0x800631A8; -func_enmy_8006326C = 0x8006326C; -func_enmy_8006351C = 0x8006351C; +Object_CheckHitboxCollision = 0x80062DBC; +Object_CheckSingleHitbox = 0x800631A8; +Object_CheckPolyCollision = 0x8006326C; +Object_CheckCollision = 0x8006351C; func_enmy_80063CAC = 0x80063CAC; func_enmy_80063D58 = 0x80063D58; func_enmy_80063E5C = 0x80063E5C; @@ -355,7 +355,7 @@ D_game_80161A10 = 0x80161A10; D_game_80161A14 = 0x80161A14; gPlayerInactive = 0x80161A18; //size:0x10 D_game_80161A28 = 0x80161A28; -D_game_80161A2C = 0x80161A2C; +gShowHud = 0x80161A2C; gNextLevelStage = 0x80161A2E; gNextLevel = 0x80161A30; gNextGameState = 0x80161A32; @@ -621,7 +621,7 @@ D_ctx_80178444 = 0x80178444; D_ctx_80178448 = 0x80178448; gCameraShakeY = 0x8017847C; gCameraShake = 0x80178480; -D_ctx_80178488 = 0x80178488; +gLoadLevelObjects = 0x80178488; D_ctx_801784A4 = 0x801784A4; D_ctx_801784AC = 0x801784AC; D_ctx_801784B8 = 0x801784B8; @@ -750,7 +750,7 @@ func_play_800B41EC = 0x800B41EC; func_play_800B42B0 = 0x800B42B0; func_play_800B44C4 = 0x800B44C4; func_play_800B46F8 = 0x800B46F8; -Player_Update1 = 0x800B48BC; +Player_Update = 0x800B48BC; func_play_800B56BC = 0x800B56BC; func_play_800B5D30 = 0x800B5D30; func_play_800B5FBC = 0x800B5FBC; @@ -759,7 +759,7 @@ func_play_800B6848 = 0x800B6848; func_play_800B6BFC = 0x800B6BFC; func_play_800B6F50 = 0x800B6F50; func_play_800B7184 = 0x800B7184; -Player_Update2 = 0x800B71E4; +Player_UpdateCamera = 0x800B71E4; func_play_800B73E0 = 0x800B73E0; Play_UpdateLevel = 0x800B79B0; Play_Update = 0x800B832C; diff --git a/src/audio/audio_load.c b/src/audio/audio_load.c index 9a87a93b..bc85f192 100644 --- a/src/audio/audio_load.c +++ b/src/audio/audio_load.c @@ -1276,6 +1276,9 @@ s32 AudioLoad_RelocateFontAndPreloadSamples(s32 fontId, u32 fontDataAddr, Sample break; } sample = gUsedSamples[i]; +#ifdef AVOID_UB + sampleRamAddr = NULL; +#endif //! Bug: Those are assignments, not equality checks. switch (isAsync) { case 0: diff --git a/src/engine/fox_360.c b/src/engine/fox_360.c index dfffbaed..48b437a9 100644 --- a/src/engine/fox_360.c +++ b/src/engine/fox_360.c @@ -9,6 +9,29 @@ #include "assets/ast_enmy_planet.h" #include "assets/ast_sector_z.h" +typedef enum ActorAllRangeState { + STATE360_0, + STATE360_1, + STATE360_2, + STATE360_3, + STATE360_4, + STATE360_5, + STATE360_6, + STATE360_7, + STATE360_8, + STATE360_9, + STATE360_10, + STATE360_11, + STATE360_12, + STATE360_13, + STATE360_14, + STATE360_15, + STATE360_16, + STATE360_17, + STATE360_18, + STATE360_19, +} ActorAllRangeState; + /* static */ Vec3f D_360_800C9A90 = { 0.0f, -10.0f, 0.0f }; /* static */ Vec3f D_360_800C9A9C[4] = { { 0.0f, 20000.0f, 0.0f }, @@ -52,7 +75,7 @@ s32 gShowAllRangeCountdown; s32 gAllRangeFrameCount; f32 gAllRangeCountdownScale; -void func_360_8002E3E0(Actor* actor) { +void AllRange_GetStarWolfHits(Actor* actor) { s32 hits = 0; (void) "time=%d\n"; @@ -88,8 +111,8 @@ void func_360_8002E3E0(Actor* actor) { D_ctx_80177850 = 15; } -bool func_360_8002E4F8(u16* msg, RadioCharacterId rcid) { - if ((gRadioState == 0) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_0)) { +bool AllRange_PlayMessage(u16* msg, RadioCharacterId rcid) { + if ((gRadioState == 0) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_STANDBY)) { Radio_PlayMessage(msg, rcid); return true; } else { @@ -108,39 +131,39 @@ void AllRange_UpdateCountdown(void) { } } -void func_360_8002E5E0(Boss* boss) { - OvlI4_CallFunction(91, boss); +void Boss309_Update(Boss* boss) { + OvlI4_CallFunction(OVLCALL_BOSS309_UPDATE, boss); } -void func_360_8002E604(Boss* boss) { - OvlI4_CallFunction(92, boss); +void Boss309_Draw(Boss* boss) { + OvlI4_CallFunction(OVLCALL_BOSS309_DRAW, boss); } -void func_360_8002E628(Boss* boss) { - OvlI4_CallFunction(93, boss); +void Boss310_Update(Boss* boss) { + OvlI4_CallFunction(OVLCALL_BOSS310_UPDATE, boss); } -void func_360_8002E64C(Boss* boss) { - OvlI4_CallFunction(94, boss); +void Boss310_Draw(Boss* boss) { + OvlI4_CallFunction(OVLCALL_BOSS310_DRAW, boss); } -void func_360_8002E670(Actor* actor) { - OvlI4_CallFunction(95, actor); +void Actor271_Update(Actor* actor) { + OvlI4_CallFunction(OVLCALL_ACTOR271_UPDATE, actor); } -void func_360_8002E694(Actor* actor) { - OvlI4_CallFunction(96, actor); +void Actor271_Draw(Actor* actor) { + OvlI4_CallFunction(OVLCALL_ACTOR271_DRAW, actor); } -void func_360_8002E6B8(Actor* actor) { - OvlI4_CallFunction(97, actor); +void Actor272_Update(Actor* actor) { + OvlI4_CallFunction(OVLCALL_ACTOR272_UPDATE, actor); } -void func_360_8002E6DC(Actor* actor) { - OvlI4_CallFunction(98, actor); +void Actor272_Draw(Actor* actor) { + OvlI4_CallFunction(OVLCALL_ACTOR272_DRAW, actor); } -void func_360_8002E700(Player* player) { +void AllRange_GreatFoxRepair(Player* player) { Vec3f sp6C; Vec3f sp60; @@ -149,7 +172,7 @@ void func_360_8002E700(Player* player) { 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->unk_130 = player->unk_034 = player->unk_110 = player->unk_08C = player->unk_0D8.x = + 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; gCsCamEyeY = 337.0f; @@ -169,7 +192,7 @@ void func_360_8002E700(Player* player) { player->pos.z = 0.0f; gCsCamAtZ = 0.0f; D_ctx_80177A48[0] = 1.0f; - player->wings.unk_2C = 1; + player->wings.modelId = 1; player->unk_1D0++; break; case 1: @@ -222,8 +245,8 @@ void func_360_8002E700(Player* player) { gCsCamEyeX -= 1.0f; player->unk_0E4 += 0.4f; if (gCsFrameCount >= 130) { - player->state_1C8 = PLAYERSTATE_1C8_3; - player->wings.unk_2C = 0; + player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; + player->wings.modelId = 0; player->unk_014 = 0; player->unk_018 = 0; player->unk_01C = 0; @@ -236,8 +259,8 @@ void func_360_8002E700(Player* player) { gCsCamAtZ = player->pos.z; Math_SmoothStepToF(&player->unk_0EC, 0.0f, 0.1f, 2.0f, 0); Math_SmoothStepToF(&player->unk_12C, 0.0f, 0.1f, 3.0f, 0); - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + player->unk_114 + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), 1); + Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + player->unk_114 + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), MTXF_APPLY); sp6C.x = 0.0f; sp6C.y = 0.0f; sp6C.z = player->unk_0D0; @@ -250,15 +273,15 @@ void func_360_8002E700(Player* player) { player->pos.z += player->vel.z; player->unk_138 = player->pos.z; player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; - Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0); } -void func_360_8002ED60(Player* player) { +void AllRange_FortunaIntro(Player* player) { Vec3f sp24; Math_Vec3fFromAngles(&sp24, 0.0f, player->unk_114 + 180.0f, 40.0f); @@ -269,19 +292,19 @@ void func_360_8002ED60(Player* player) { player->pos.y += player->vel.y; player->pos.z += player->vel.z; player->unk_138 = player->pos.z; - player->camEye.x = -200.0f; - player->camEye.y = 500.0f; - player->camEye.z = 7000.0f; - player->camAt.x = player->pos.x; - player->camAt.y = player->pos.y; - player->camAt.z = player->pos.z; + player->cam.eye.x = -200.0f; + player->cam.eye.y = 500.0f; + player->cam.eye.z = 7000.0f; + player->cam.at.x = player->pos.x; + player->cam.at.y = player->pos.y; + player->cam.at.z = player->pos.z; } -void func_360_8002EE34(void) { +void AllRange_ClearRadio(void) { sStarWolfKillTimer = gRadioState = gActors[1].iwork[1] = gActors[2].iwork[1] = gActors[3].iwork[1] = 0; } -void func_360_8002EE64(Actor* actor) { +void func_360_8002EE64(Actor* this) { s32 i; s32 colId; Object_58* obj58; @@ -299,29 +322,29 @@ void func_360_8002EE64(Actor* actor) { s32 pad1; s32 pad2; - actor->fwork[25] = actor->fwork[26] = actor->fwork[28] = actor->fwork[27] = 0.0f; - if ((actor->unk_0C9 != 0) && (gLevelMode == LEVELMODE_ALL_RANGE) && (gLevelType == LEVELTYPE_PLANET)) { + this->fwork[25] = this->fwork[26] = this->fwork[28] = this->fwork[27] = 0.0f; + if ((this->unk_0C9 != 0) && (gLevelMode == LEVELMODE_ALL_RANGE) && (gLevelType == LEVELTYPE_PLANET)) { for (i = 0, obj58 = gObjects58; i < 200; i++, obj58++) { if ((obj58->obj.status == OBJ_ACTIVE) && ((obj58->obj.id == OBJ_80_150) || (obj58->obj.id == OBJ_80_149) || (obj58->obj.id == OBJ_80_148) || (obj58->obj.id == OBJ_80_1) || (obj58->obj.id == OBJ_80_3)) && - (fabsf(obj58->obj.pos.x - actor->obj.pos.x) < 2500.0f) && - (fabsf(obj58->obj.pos.z - actor->obj.pos.z) < 2500.0f)) { + (fabsf(obj58->obj.pos.x - this->obj.pos.x) < 2500.0f) && + (fabsf(obj58->obj.pos.z - this->obj.pos.z) < 2500.0f)) { temp1.x = obj58->obj.pos.x; temp1.y = obj58->obj.pos.y; temp1.z = obj58->obj.pos.z; temp4 = obj58->obj.rot.y; - Matrix_RotateY(gCalcMatrix, -temp4 * M_DTOR, 0); - spE4.x = actor->obj.pos.x - temp1.x; + Matrix_RotateY(gCalcMatrix, -temp4 * M_DTOR, MTXF_NEW); + spE4.x = this->obj.pos.x - temp1.x; spE4.y = 0.0f; - spE4.z = actor->obj.pos.z - temp1.z; + spE4.z = this->obj.pos.z - temp1.z; Matrix_MultVec3fNoTranslate(gCalcMatrix, &spE4, &spD8); spC0.x = temp1.x; spC0.y = temp1.y; spCC.x = spD8.x + temp1.x; - spC0.z = temp1.z; // fake? + spC0.z = temp1.z; // fake? weird ordering spCC.y = spD8.y + temp1.y; spCC.z = spD8.z + temp1.z; if ((obj58->obj.id == OBJ_80_149) || (obj58->obj.id == OBJ_80_150)) { @@ -331,10 +354,10 @@ void func_360_8002EE64(Actor* actor) { colId = COL1_6; } if (func_col1_800998FC(&spCC, &spC0, &sp94, colId, &spA8, spA0) > 0) { - actor->fwork[25] = spA8.y; - actor->fwork[26] = spA0[0]; - actor->fwork[28] = spA0[1]; - actor->fwork[27] = DEG_TO_RAD(temp4); + this->fwork[25] = spA8.y; + this->fwork[26] = spA0[0]; + this->fwork[28] = spA0[1]; + this->fwork[27] = DEG_TO_RAD(temp4); } } else { colId = COL2_0; @@ -342,10 +365,10 @@ void func_360_8002EE64(Actor* actor) { colId = COL2_3; } if (func_col2_800A3690(&spCC, &spC0, colId, &spB4)) { - actor->fwork[25] = spB4.y; - actor->fwork[26] = spB4.x; - actor->fwork[28] = spB4.z; - actor->fwork[27] = DEG_TO_RAD(temp4); + this->fwork[25] = spB4.y; + this->fwork[26] = spB4.x; + this->fwork[28] = spB4.z; + this->fwork[27] = DEG_TO_RAD(temp4); } } } @@ -436,17 +459,18 @@ void func_360_8002F3E0(void) { } } -void func_360_8002F5F4(u16* msg, RadioCharacterId character) { - if ((D_ctx_80178300 == 0) && (gActors[0].state == 2) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_0)) { +void ActorAllRange_PlayMessage(u16* msg, RadioCharacterId character) { + if ((D_ctx_80178300 == 0) && (gActors[0].state == STATE360_2) && + (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_STANDBY)) { Radio_PlayMessage(msg, character); } } -void func_360_8002F64C(u16* msg, RadioCharacterId character) { +void ActorAllRange_StarWolfDefeatMesg(u16* msg, RadioCharacterId character) { if ((gStarWolfTeamAlive[0] + gStarWolfTeamAlive[1] + gStarWolfTeamAlive[2] + gStarWolfTeamAlive[3]) == 0) { gRadioState = 0; } - func_360_8002F5F4(msg, character); + ActorAllRange_PlayMessage(msg, character); } void func_360_8002F69C(Actor* actor) { @@ -468,22 +492,22 @@ void func_360_8002F69C(Actor* actor) { if (gAllRangeEventTimer == D_360_800C9B4C) { func_360_8002F3E0(); actor->state = 3; - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_0; + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_STANDBY; if ((gCurrentLevel == LEVEL_VENOM_2) || (gCurrentLevel == LEVEL_BOLSE)) { - gPlayer[0].unk_034 = 20.0f; + gPlayer[0].camRoll = 20.0f; } AUDIO_PLAY_BGM(SEQ_ID_STAR_WOLF | SEQ_FLAG); - func_360_8002EE34(); + AllRange_ClearRadio(); if ((gCurrentLevel == LEVEL_FORTUNA) || (gCurrentLevel == LEVEL_VENOM_2)) { - gPlayer[0].camEye.x = 4500.0f; + gPlayer[0].cam.eye.x = 4500.0f; } else if (gCurrentLevel == LEVEL_BOLSE) { - gPlayer[0].camEye.x = 5500.0f; + gPlayer[0].cam.eye.x = 5500.0f; } - gPlayer[0].camEye.y = 2500.0f; - gPlayer[0].camEye.z = 5000.0f; - gPlayer[0].camAt.x = gActors[4].obj.pos.x; - gPlayer[0].camAt.y = gActors[4].obj.pos.y; - gPlayer[0].camAt.z = gActors[4].obj.pos.z; + gPlayer[0].cam.eye.y = 2500.0f; + gPlayer[0].cam.eye.z = 5000.0f; + gPlayer[0].cam.at.x = gActors[4].obj.pos.x; + gPlayer[0].cam.at.y = gActors[4].obj.pos.y; + gPlayer[0].cam.at.z = gActors[4].obj.pos.z; } if (gAllRangeEventTimer > D_360_800C9B4C) { if (gStarWolfMsgTimer == 0) { @@ -491,7 +515,7 @@ void func_360_8002F69C(Actor* actor) { for (i = 1, otherActor = &gActors[1]; i < 8; i++, otherActor++) { 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 == 3) && + if ((gActors[otherActor->aiIndex].state == STATE360_3) && (gActors[otherActor->aiIndex].aiType < AI360_KATT)) { gActors[otherActor->aiIndex].iwork[2] = AI360_FOX; gActors[otherActor->aiIndex].state = 2; @@ -503,13 +527,13 @@ void func_360_8002F69C(Actor* actor) { if (gActors[otherActor->aiIndex].iwork[3] == 0) { switch (gActors[otherActor->aiIndex].aiType) { case AI360_FALCO: - func_360_8002F5F4(gMsg_ID_9160, RCID_FALCO); + ActorAllRange_PlayMessage(gMsg_ID_9160, RCID_FALCO); break; case AI360_SLIPPY: - func_360_8002F5F4(gMsg_ID_9170, RCID_SLIPPY); + ActorAllRange_PlayMessage(gMsg_ID_9170, RCID_SLIPPY); break; case AI360_PEPPY: - func_360_8002F5F4(gMsg_ID_9180, RCID_PEPPY); + ActorAllRange_PlayMessage(gMsg_ID_9180, RCID_PEPPY); break; } gActors[otherActor->aiIndex].iwork[3] = 200; @@ -517,11 +541,11 @@ void func_360_8002F69C(Actor* actor) { } if (otherActor->aiType == AI360_WOLF) { if (gCurrentLevel != LEVEL_VENOM_2) { - otherActor->state = 3; + otherActor->state = STATE360_3; otherActor->unk_04E = 300; } } else { - otherActor->state = 3; + otherActor->state = STATE360_3; otherActor->aiIndex = -1; } } @@ -591,13 +615,13 @@ void func_360_8002FC00(Actor* actor) { } switch (gActors[otherActor->aiIndex].aiType) { case AI360_FALCO: - func_360_8002F5F4(gMsg_ID_9160, RCID_FALCO); + ActorAllRange_PlayMessage(gMsg_ID_9160, RCID_FALCO); break; case AI360_SLIPPY: - func_360_8002F5F4(gMsg_ID_9170, RCID_SLIPPY); + ActorAllRange_PlayMessage(gMsg_ID_9170, RCID_SLIPPY); break; case AI360_PEPPY: - func_360_8002F5F4(gMsg_ID_9180, RCID_PEPPY); + ActorAllRange_PlayMessage(gMsg_ID_9180, RCID_PEPPY); break; } gActors[otherActor->aiIndex].iwork[3] = 200; @@ -620,8 +644,8 @@ bool func_360_8002FE74(void) { return false; } -void func_360_8002FEF0(Actor* actor) { - Actor* newActor; +void ActorAllRange_SpawnSupplies(Actor* this) { + Actor* supplies; s32 i; if ((gCallTimer != 0) && (gControllerPress[gMainController].button & R_CBUTTONS)) { @@ -634,30 +658,30 @@ void func_360_8002FEF0(Actor* actor) { if (gAllRangeSupplyTimer != 0) { gAllRangeSupplyTimer--; if (gAllRangeSupplyTimer == 0) { - for (i = 20, newActor = &gActors[20]; i < 60; i++, newActor++) { - if (newActor->obj.status == OBJ_FREE) { - Actor_Initialize(newActor); - newActor->obj.status = OBJ_INIT; - newActor->obj.id = OBJ_ACTOR_SUPPLIES; + for (i = 20, supplies = &gActors[20]; i < 60; i++, supplies++) { + if (supplies->obj.status == OBJ_FREE) { + Actor_Initialize(supplies); + supplies->obj.status = OBJ_INIT; + supplies->obj.id = OBJ_ACTOR_SUPPLIES; if (gCurrentLevel == LEVEL_SECTOR_Z) { - newActor->obj.pos.x = 200.0f; - newActor->obj.pos.y = -500.0f; - newActor->obj.pos.z = 0.0f; - AUDIO_PLAY_SFX(0x09000002, newActor->sfxSource, 0); - newActor->timer_0C2 = 50; + supplies->obj.pos.x = 200.0f; + supplies->obj.pos.y = -500.0f; + supplies->obj.pos.z = 0.0f; + AUDIO_PLAY_SFX(0x09000002, supplies->sfxSource, 0); + supplies->timer_0C2 = 50; } else { - newActor->obj.pos.x = 0.0f; - newActor->obj.pos.y = 3000.0f; - newActor->obj.pos.z = 5000.0f; - newActor->timer_0C2 = 50; + supplies->obj.pos.x = 0.0f; + supplies->obj.pos.y = 3000.0f; + supplies->obj.pos.z = 5000.0f; + supplies->timer_0C2 = 50; } - Object_SetInfo(&newActor->info, newActor->obj.id); + Object_SetInfo(&supplies->info, supplies->obj.id); break; } } } } - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) && !gAllRangeWingRepairSent) { + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && !gAllRangeWingRepairSent) { if (gAllRangeWingRepairTimer != 0) { gAllRangeWingRepairTimer--; } @@ -668,30 +692,30 @@ void func_360_8002FEF0(Actor* actor) { } } -void func_360_8003010C(Actor* actor) { - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_4) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_6)) { - Object_Kill(&actor->obj, actor->sfxSource); +void ActorAllRange_UpdateEvents(Actor* this) { + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_DOWN) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_NEXT)) { + Object_Kill(&this->obj, this->sfxSource); return; } gAllRangeEventTimer++; switch (gCurrentLevel) { case LEVEL_FORTUNA: - Fortuna_80187960(actor); + Fortuna_80187960(this); break; case LEVEL_KATINA: - Katina_80198594(actor); + Katina_80198594(this); break; case LEVEL_BOLSE: - Bolse_8018C158(actor); + Bolse_8018C158(this); break; case LEVEL_SECTOR_Z: - SectorZ_8019AB8C(actor); + SectorZ_8019AB8C(this); break; case LEVEL_VENOM_2: - Venom2_80196314(actor); + Venom2_80196314(this); break; } - func_360_8002FEF0(actor); + ActorAllRange_SpawnSupplies(this); } s32 func_360_800301F4(Actor* actor) { @@ -748,7 +772,7 @@ s32 func_360_8003049C(Actor* actor) { Boss* boss = &gBosses[0]; s32 pad[4]; - if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2) { + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) { return 0; } if ((gLevelType == LEVELTYPE_SPACE) && (gCurrentLevel != LEVEL_BOLSE)) { @@ -790,67 +814,67 @@ s32 func_360_8003049C(Actor* actor) { return 0; } -void func_360_8003088C(Actor* actor) { +void ActorAllRange_ApplyDamage(Actor* this) { s32 var_a1; Vec3f sp48; Vec3f sp3C; - if (actor->unk_0D0 != 0) { - if (actor->aiType == AI360_GREAT_FOX) { - actor->unk_0D0 = 0; + if (this->unk_0D0 != 0) { + if (this->aiType == AI360_GREAT_FOX) { + this->unk_0D0 = 0; } - if ((actor->unk_0D0 >= 2) && (actor->aiType >= AI360_WOLF) && (actor->aiType < AI360_KATT)) { - actor->damage = 10; - actor->timer_0C2 = 10; + if ((this->unk_0D0 >= 2) && (this->aiType >= AI360_WOLF) && (this->aiType < AI360_KATT)) { + this->damage = 10; + this->timer_0C2 = 10; } - if (((actor->aiType <= AI360_PEPPY) || (actor->aiType == AI360_BILL) || (actor->aiType == AI360_KATT)) && - (actor->unk_0D0 == 2)) { - actor->unk_0D0 = 0; + if (((this->aiType <= AI360_PEPPY) || (this->aiType == AI360_BILL) || (this->aiType == AI360_KATT)) && + (this->unk_0D0 == 2)) { + this->unk_0D0 = 0; } - if ((actor->unk_0D0 == 2) && (actor->fwork[22] > 0.0f)) { - actor->unk_0D0 = 0; + if ((this->unk_0D0 == 2) && (this->fwork[22] > 0.0f)) { + this->unk_0D0 = 0; } - if (actor->fwork[23] > 1.0f) { - actor->unk_0D0 = 0; + if (this->fwork[23] > 1.0f) { + this->unk_0D0 = 0; } - if (actor->unk_0D0 != 0) { + if (this->unk_0D0 != 0) { var_a1 = false; - if ((actor->unk_0B6 == 3) || + if ((this->unk_0B6 == 3) || ((gCurrentLevel == LEVEL_BOLSE) && (gBosses[1].obj.status != OBJ_FREE) && - (actor->aiType >= AI360_WOLF)) || - ((gCurrentLevel == LEVEL_VENOM_2) && (actor->aiType >= AI360_WOLF) && (actor->aiType < AI360_10) && - (actor->unk_0D0 == 2))) { - actor->damage = 0; + (this->aiType >= AI360_WOLF)) || + ((gCurrentLevel == LEVEL_VENOM_2) && (this->aiType >= AI360_WOLF) && (this->aiType < AI360_10) && + (this->unk_0D0 == 2))) { + this->damage = 0; var_a1 = true; if (gCurrentLevel == LEVEL_BOLSE) { - actor->unk_0D4 = 0; + this->unk_0D4 = 0; } } - if (actor->aiType >= AI360_WOLF) { - if (((actor->unk_0D0 != 3) || (actor->aiType != AI360_WOLF)) && - ((actor->aiType != AI360_MISSILE) || (actor->unk_0D0 != 2))) { - actor->health -= actor->damage; + if (this->aiType >= AI360_WOLF) { + if (((this->unk_0D0 != 3) || (this->aiType != AI360_WOLF)) && + ((this->aiType != AI360_MISSILE) || (this->unk_0D0 != 2))) { + this->health -= this->damage; } - } else if ((actor->aiType <= AI360_PEPPY) && (actor->state != 6)) { - if (actor->aiType == AI360_FALCO) { - gTeamDamage[actor->aiType] = actor->damage; + } else if ((this->aiType <= AI360_PEPPY) && (this->state != 6)) { + if (this->aiType == AI360_FALCO) { + gTeamDamage[this->aiType] = this->damage; } else { - gTeamDamage[actor->aiType] = actor->damage * 2; + gTeamDamage[this->aiType] = this->damage * 2; } } - if (actor->health <= 0) { - actor->health = 0; - if (actor->aiType == AI360_MISSILE) { - SectorZ_80199900(actor, 1); - if (actor->unk_0D4 == 1) { + if (this->health <= 0) { + this->health = 0; + if (this->aiType == AI360_MISSILE) { + SectorZ_80199900(this, 1); + if (this->unk_0D4 == 1) { if (gActors[8].obj.status == OBJ_ACTIVE) { Radio_PlayMessage(gMsg_ID_16140, RCID_KATT); } - BonusText_Display(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10); + BonusText_Display(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 10); gHitCount += 11; D_ctx_80177850 = 15; } else { - switch (actor->unk_0D4) { + switch (this->unk_0D4) { case 102: Radio_PlayMessage(gMsg_ID_16170, RCID_FALCO); break; @@ -867,100 +891,100 @@ void func_360_8003088C(Actor* actor) { } return; } - actor->timer_0C6 = 50; - actor->iwork[8] = 20; - actor->obj.status = OBJ_DYING; - actor->fwork[23] = 0.0f; - func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 4.0f); - AUDIO_PLAY_SFX(0x2903700B, actor->sfxSource, 4); - actor->timer_0C2 = 10; - actor->timer_0BE = 0; - actor->timer_04C = RAND_INT(2.9f); + this->timer_0C6 = 50; + this->iwork[8] = 20; + this->obj.status = OBJ_DYING; + this->fwork[23] = 0.0f; + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 4.0f); + AUDIO_PLAY_SFX(0x2903700B, this->sfxSource, 4); + this->timer_0C2 = 10; + this->timer_0BE = 0; + this->timer_04C = RAND_INT(2.9f); switch (RAND_INT(4.0f)) { case 0: - actor->timer_0BC = 0; + this->timer_0BC = 0; break; case 1: - actor->timer_0BC = 50; + this->timer_0BC = 50; break; case 2: - actor->timer_0BC = 200; + this->timer_0BC = 200; break; case 3: - actor->timer_0BC = 300; + this->timer_0BC = 300; break; } if (gCurrentLevel == LEVEL_VENOM_ANDROSS) { - actor->timer_0BC = 70; + this->timer_0BC = 70; } if ((gLevelType == LEVELTYPE_SPACE) && (gCurrentLevel != LEVEL_BOLSE)) { if (Rand_ZeroOne() < 0.5f) { - actor->timer_0BC = 10; + this->timer_0BC = 10; } else { - actor->timer_0BC = RAND_INT(50.0f); + this->timer_0BC = RAND_INT(50.0f); } } - if ((actor->aiType >= AI360_WOLF) && (actor->aiType < AI360_KATT)) { - actor->timer_0BC = RAND_INT(40.0f) + 60.0f; + if ((this->aiType >= AI360_WOLF) && (this->aiType < AI360_KATT)) { + this->timer_0BC = RAND_INT(40.0f) + 60.0f; } - if (actor->damage >= 20) { - actor->timer_0BC = 0; + if (this->damage >= 20) { + this->timer_0BC = 0; } - if ((gCurrentLevel == LEVEL_KATINA) && (actor->unk_0B6 == 1) && (actor->unk_0D4 == 1)) { + if ((gCurrentLevel == LEVEL_KATINA) && (this->unk_0B6 == 1) && (this->unk_0D4 == 1)) { if (gKaAllyKillCount < 2) { - func_360_8002F5F4(gMsg_ID_18018, RCID_BILL); + ActorAllRange_PlayMessage(gMsg_ID_18018, RCID_BILL); } gKaAllyKillCount++; } - switch (actor->aiType) { + switch (this->aiType) { case AI360_WOLF: gStarWolfTeamAlive[0] = 0; if (gCurrentLevel == LEVEL_VENOM_2) { - func_360_8002F64C(gMsg_ID_19458, RCID_WOLF); + ActorAllRange_StarWolfDefeatMesg(gMsg_ID_19458, RCID_WOLF); } else { - func_360_8002F64C(gMsg_ID_9365, RCID_WOLF); + ActorAllRange_StarWolfDefeatMesg(gMsg_ID_9365, RCID_WOLF); } break; case AI360_LEON: gStarWolfTeamAlive[1] = 0; if (gCurrentLevel == LEVEL_VENOM_2) { - func_360_8002F64C(gMsg_ID_19459, RCID_LEON); + ActorAllRange_StarWolfDefeatMesg(gMsg_ID_19459, RCID_LEON); } else { - func_360_8002F64C(gMsg_ID_9366, RCID_LEON); + ActorAllRange_StarWolfDefeatMesg(gMsg_ID_9366, RCID_LEON); } break; case AI360_PIGMA: gStarWolfTeamAlive[2] = 0; if (gCurrentLevel == LEVEL_VENOM_2) { - func_360_8002F64C(gMsg_ID_19460, RCID_PIGMA); + ActorAllRange_StarWolfDefeatMesg(gMsg_ID_19460, RCID_PIGMA); } else { - func_360_8002F64C(gMsg_ID_9367, RCID_PIGMA); + ActorAllRange_StarWolfDefeatMesg(gMsg_ID_9367, RCID_PIGMA); } break; case AI360_ANDREW: gStarWolfTeamAlive[3] = 0; if (gCurrentLevel == LEVEL_VENOM_2) { - func_360_8002F64C(gMsg_ID_19461, RCID_ANDREW); + ActorAllRange_StarWolfDefeatMesg(gMsg_ID_19461, RCID_ANDREW); } else { - func_360_8002F64C(gMsg_ID_9368, RCID_ANDREW); + ActorAllRange_StarWolfDefeatMesg(gMsg_ID_9368, RCID_ANDREW); } break; } - if ((actor->aiType >= AI360_WOLF) && (actor->aiType <= AI360_ANDREW)) { + if ((this->aiType >= AI360_WOLF) && (this->aiType <= AI360_ANDREW)) { sStarWolfKillTimer = 150; } - switch (actor->unk_0D4) { + switch (this->unk_0D4) { case 1: - if (actor->aiType >= AI360_10) { - switch (actor->iwork[2]) { + if (this->aiType >= AI360_10) { + switch (this->iwork[2]) { case AI360_FALCO: - func_360_8002F5F4(gMsg_ID_20170, RCID_FALCO); + ActorAllRange_PlayMessage(gMsg_ID_20170, RCID_FALCO); break; case AI360_SLIPPY: - func_360_8002F5F4(gMsg_ID_20150, RCID_SLIPPY); + ActorAllRange_PlayMessage(gMsg_ID_20150, RCID_SLIPPY); break; case AI360_PEPPY: - func_360_8002F5F4(gMsg_ID_20160, RCID_PEPPY); + ActorAllRange_PlayMessage(gMsg_ID_20160, RCID_PEPPY); break; } } @@ -968,10 +992,10 @@ void func_360_8003088C(Actor* actor) { case 102: case 103: case 104: - if ((actor->aiType >= AI360_WOLF) && (actor->aiType < AI360_KATT)) { + if ((this->aiType >= AI360_WOLF) && (this->aiType < AI360_KATT)) { if ((gStarWolfTeamAlive[0] + gStarWolfTeamAlive[1] + gStarWolfTeamAlive[2] + gStarWolfTeamAlive[3]) == 0) { - switch (actor->unk_0D4) { + switch (this->unk_0D4) { case 102: Radio_PlayMessage(gMsg_ID_9438, RCID_FALCO); break; @@ -983,146 +1007,146 @@ void func_360_8003088C(Actor* actor) { break; } } else { - gActors[actor->unk_0D4 - 101].iwork[1] = 80; + gActors[this->unk_0D4 - 101].iwork[1] = 80; } } else { - gActors[actor->unk_0D4 - 101].iwork[1] = 80; + gActors[this->unk_0D4 - 101].iwork[1] = 80; } break; } } else { if (var_a1) { - AUDIO_PLAY_SFX(0x29001062, actor->sfxSource, 4); - actor->iwork[7] = 3; - actor->iwork[18] = 5; - actor->iwork[8] = 15; + AUDIO_PLAY_SFX(0x29001062, this->sfxSource, 4); + this->iwork[7] = 3; + this->iwork[18] = 5; + this->iwork[8] = 15; if (Rand_ZeroOne() < 0.5f) { - actor->fwork[8] = 0.0f; - actor->fwork[7] = 360.0f; + this->fwork[8] = 0.0f; + this->fwork[7] = 360.0f; } else { - actor->fwork[7] = 0.0f; - actor->fwork[8] = 359.999f; + this->fwork[7] = 0.0f; + this->fwork[8] = 359.999f; } } else { - actor->timer_0C6 = 20; - actor->iwork[8] = 20; + this->timer_0C6 = 20; + this->iwork[8] = 20; } - if (actor->aiType == AI360_MISSILE) { - AUDIO_PLAY_SFX(0x29034003, actor->sfxSource, 4); - } else if (actor->iwork[7] == 0) { - AUDIO_PLAY_SFX(0x2903300E, actor->sfxSource, 4); + if (this->aiType == AI360_MISSILE) { + AUDIO_PLAY_SFX(0x29034003, this->sfxSource, 4); + } else if (this->iwork[7] == 0) { + AUDIO_PLAY_SFX(0x2903300E, this->sfxSource, 4); } - func_effect_8007D10C(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 1.5f); - if (actor->aiType < AI360_GREAT_FOX) { - Matrix_RotateY(gCalcMatrix, actor->unk_0F4.y * M_DTOR, 0); + func_effect_8007D10C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1.5f); + if (this->aiType < AI360_GREAT_FOX) { + Matrix_RotateY(gCalcMatrix, this->unk_0F4.y * M_DTOR, MTXF_NEW); sp48.x = 30.0f; if (Rand_ZeroOne() < 0.5f) { sp48.x = -30.0f; } sp48.y = RAND_FLOAT_CENTERED(30.0f); sp48.z = 0.0f; - if (actor->iwork[7] != 0) { + if (this->iwork[7] != 0) { sp48.x *= 1.5f; sp48.y = 30.0f; - if ((actor->obj.pos.y > 100.0f) && (Rand_ZeroOne() < 0.5f)) { + if ((this->obj.pos.y > 100.0f) && (Rand_ZeroOne() < 0.5f)) { sp48.y = -30.0f; } } Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp48, &sp3C); - actor->fwork[13] = sp3C.x; - actor->fwork[14] = sp3C.y; - actor->fwork[12] = sp3C.z; + this->fwork[13] = sp3C.x; + this->fwork[14] = sp3C.y; + this->fwork[12] = sp3C.z; } if ((gRadioState == 0) && (gActors[0].obj.status == OBJ_ACTIVE)) { - if (actor->unk_0D0 == 3) { - switch (actor->aiType) { + if (this->unk_0D0 == 3) { + switch (this->aiType) { case AI360_FALCO: - func_360_8002F5F4(gMsg_ID_20210, RCID_FALCO); + ActorAllRange_PlayMessage(gMsg_ID_20210, RCID_FALCO); break; case AI360_PEPPY: - func_360_8002F5F4(gMsg_ID_20200, RCID_PEPPY); + ActorAllRange_PlayMessage(gMsg_ID_20200, RCID_PEPPY); break; case AI360_SLIPPY: - func_360_8002F5F4(gMsg_ID_20190, RCID_SLIPPY); + ActorAllRange_PlayMessage(gMsg_ID_20190, RCID_SLIPPY); break; case AI360_KATT: - func_360_8002F5F4(gMsg_ID_20084, RCID_KATT); + ActorAllRange_PlayMessage(gMsg_ID_20084, RCID_KATT); break; } - } else if (actor->unk_0D4 < 105) { - if (actor->aiType >= AI360_WOLF) { - if (actor->unk_0D4 == 1) { - if ((gCurrentLevel == LEVEL_KATINA) && (actor->unk_0B6 == 1) && (gKaKilledAlly == 0)) { + } else if (this->unk_0D4 < 105) { + if (this->aiType >= AI360_WOLF) { + if (this->unk_0D4 == 1) { + if ((gCurrentLevel == LEVEL_KATINA) && (this->unk_0B6 == 1) && (gKaKilledAlly == 0)) { gKaKilledAlly = 1; Radio_PlayMessage(gMsg_ID_18015, RCID_BILL); - } else if (actor->aiType == AI360_KATT) { - func_360_8002F5F4(gMsg_ID_20084, RCID_KATT); - } else if (actor->aiType == AI360_BILL) { - func_360_8002F5F4(gMsg_ID_20085, RCID_BILL); + } else if (this->aiType == AI360_KATT) { + ActorAllRange_PlayMessage(gMsg_ID_20084, RCID_KATT); + } else if (this->aiType == AI360_BILL) { + ActorAllRange_PlayMessage(gMsg_ID_20085, RCID_BILL); } else if (gCurrentLevel == LEVEL_VENOM_2) { - switch (actor->aiType) { + switch (this->aiType) { case AI360_WOLF: - func_360_8002F5F4(gMsg_ID_19454, RCID_WOLF); + ActorAllRange_PlayMessage(gMsg_ID_19454, RCID_WOLF); break; case AI360_LEON: - func_360_8002F5F4(gMsg_ID_19455, RCID_LEON); + ActorAllRange_PlayMessage(gMsg_ID_19455, RCID_LEON); break; case AI360_PIGMA: - func_360_8002F5F4(gMsg_ID_19456, RCID_PIGMA); + ActorAllRange_PlayMessage(gMsg_ID_19456, RCID_PIGMA); break; case AI360_ANDREW: - func_360_8002F5F4(gMsg_ID_19457, RCID_ANDREW); + ActorAllRange_PlayMessage(gMsg_ID_19457, RCID_ANDREW); break; } } } - } else if (actor->unk_0D4 == 1) { - switch (actor->aiType) { + } else if (this->unk_0D4 == 1) { + switch (this->aiType) { case AI360_FALCO: - func_360_8002F5F4(gMsg_ID_20060, RCID_FALCO); + ActorAllRange_PlayMessage(gMsg_ID_20060, RCID_FALCO); break; case AI360_PEPPY: - func_360_8002F5F4(gMsg_ID_20070, RCID_PEPPY); + ActorAllRange_PlayMessage(gMsg_ID_20070, RCID_PEPPY); break; case AI360_SLIPPY: - func_360_8002F5F4(gMsg_ID_20080, RCID_SLIPPY); + ActorAllRange_PlayMessage(gMsg_ID_20080, RCID_SLIPPY); break; } } - } else if ((actor->aiType <= AI360_PEPPY) && (actor->iwork[6] != 0) && - (actor->iwork[2] != AI360_FOX)) { - switch (actor->aiType) { + } else if ((this->aiType <= AI360_PEPPY) && (this->iwork[6] != 0) && + (this->iwork[2] != AI360_FOX)) { + switch (this->aiType) { case AI360_FALCO: if (gTeamShields[TEAM_ID_FALCO] >= 90) { - func_360_8002F5F4(gMsg_ID_9130, RCID_FALCO); + ActorAllRange_PlayMessage(gMsg_ID_9130, RCID_FALCO); } else { Radio_PlayMessage(gMsg_ID_9151, RCID_FALCO); } - if ((D_display_800CA234 == NULL) || (gTeamShields[actor->aiType] <= 50)) { - D_display_800CA234 = actor; + if ((D_display_800CA234 == NULL) || (gTeamShields[this->aiType] <= 50)) { + D_display_800CA234 = this; D_display_Timer_800CA238 = 320; } break; case AI360_SLIPPY: if (gTeamShields[TEAM_ID_SLIPPY] >= 90) { - func_360_8002F5F4(gMsg_ID_9140, RCID_SLIPPY); + ActorAllRange_PlayMessage(gMsg_ID_9140, RCID_SLIPPY); } else { Radio_PlayMessage(gMsg_ID_9152, RCID_SLIPPY); } - if ((D_display_800CA234 == NULL) || (gTeamShields[actor->aiType] <= 50)) { - D_display_800CA234 = actor; + if ((D_display_800CA234 == NULL) || (gTeamShields[this->aiType] <= 50)) { + D_display_800CA234 = this; D_display_Timer_800CA238 = 320; } break; case AI360_PEPPY: if (gTeamShields[TEAM_ID_PEPPY] >= 90) { - func_360_8002F5F4(gMsg_ID_9150, RCID_PEPPY); + ActorAllRange_PlayMessage(gMsg_ID_9150, RCID_PEPPY); } else { Radio_PlayMessage(gMsg_ID_9153, RCID_PEPPY); } - if ((D_display_800CA234 == NULL) || (gTeamShields[actor->aiType] <= 50)) { - D_display_800CA234 = actor; + if ((D_display_800CA234 == NULL) || (gTeamShields[this->aiType] <= 50)) { + D_display_800CA234 = this; D_display_Timer_800CA238 = 320; } break; @@ -1130,13 +1154,13 @@ void func_360_8003088C(Actor* actor) { } } } - actor->unk_0D0 = 0; + this->unk_0D0 = 0; } } } -void func_360_80031858(Actor* actor) { - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) && (actor->iwork[24] != 0) && +void ActorAllRange_CheckPlayerNearby(Actor* actor) { + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (actor->iwork[24] != 0) && (fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 1000.0f) && (fabsf(actor->obj.pos.y - gPlayer[0].pos.y) < 1000.0f) && (fabsf(actor->obj.pos.z - gPlayer[0].unk_138) < 1000.0f)) { @@ -1150,7 +1174,7 @@ bool func_360_80031900(Actor* actor) { Vec3f sp24; Vec3f sp18; - Matrix_RotateY(gCalcMatrix, -actor->obj.rot.y * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, -actor->obj.rot.y * M_DTOR, MTXF_NEW); sp24.x = actor->fwork[4] - actor->obj.pos.x; sp24.y = 0.0f; sp24.z = actor->fwork[6] - actor->obj.pos.z; @@ -1197,7 +1221,7 @@ void ActorAllRange_Update(Actor* this) { if (this->aiType == AI360_EVENT_HANDLER) { this->timer_0C2 = 10; this->info.unk_1C = 0.0f; - func_360_8003010C(this); + ActorAllRange_UpdateEvents(this); return; } if ((this->iwork[17] != 0) && (this->iwork[16] == 0) && (this->aiType >= AI360_WOLF)) { @@ -1281,7 +1305,7 @@ void ActorAllRange_Update(Actor* this) { this->iwork[11] = 1; } if (this->aiType < AI360_10) { - func_360_80031858(this); + ActorAllRange_CheckPlayerNearby(this); if (this->iwork[10] == 200) { switch (this->aiType) { case AI360_WOLF: @@ -1353,7 +1377,7 @@ void ActorAllRange_Update(Actor* this) { this->timer_0C2 = 10000; } switch (this->state) { - case 6: + case STATE360_6: this->timer_0C2 = 10000; this->iwork[11] = 2; this->fwork[1] = 45.0f; @@ -1379,12 +1403,12 @@ void ActorAllRange_Update(Actor* this) { } sp104 = 2; break; - case 5: + case STATE360_5: SectorZ_Missile_Update(this); sp104 = 1; break; - case 0: - if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_9) { + case STATE360_0: + if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_START_360) { this->fwork[0] = this->fwork[1] = 40.0f; if (gActors[0].state == 5) { Math_SmoothStepToF(&this->unk_0F4.x, 30.0f, 0.1f, 0.5f, 0.0f); @@ -1409,7 +1433,7 @@ void ActorAllRange_Update(Actor* this) { Math_SmoothStepToAngle(&this->obj.rot.z, 0.0f, 0.03f, 0.5f, 0.0f); } break; - case 1: + case STATE360_1: this->fwork[1] = 40.0f; if ((this->timer_0BC < 35) && (gCurrentLevel == LEVEL_FORTUNA)) { Math_SmoothStepToF(&this->unk_0F4.x, 15.0f, 0.1f, 1.0f, 0.0f); @@ -1421,7 +1445,7 @@ void ActorAllRange_Update(Actor* this) { } } break; - case 2: + case STATE360_2: sp104 = 1; spF8 = 800.0f; spF4 = 1500.0f; @@ -1448,12 +1472,12 @@ 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)) || - ((gCurrentLevel == LEVEL_BOLSE) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_0))) { + ((gCurrentLevel == LEVEL_BOLSE) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY))) { this->state = 3; this->unk_04E = 300; this->timer_0BC = 160; if (this->aiType == AI360_WOLF) { - func_360_8002F5F4(gMsg_ID_9369, RCID_WOLF); + ActorAllRange_PlayMessage(gMsg_ID_9369, RCID_WOLF); } break; } else if ((this->iwork[4] > 200) && (gPlayer[0].timer_224 != 0)) { @@ -1526,8 +1550,8 @@ void ActorAllRange_Update(Actor* this) { this->fwork[1] = gActors[this->aiIndex].fwork[0] - 5.0f; } else { this->fwork[1] = gPlayer[0].unk_0D0 - 5.0f; - if ((gCurrentLevel == LEVEL_VENOM_2) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_5) && - (gPlayer[0].unk_4D8 > 100.0f)) { + if ((gCurrentLevel == LEVEL_VENOM_2) && + (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN) && (gPlayer[0].unk_4D8 > 100.0f)) { this->iwork[16] = 8; } } @@ -1540,27 +1564,28 @@ void ActorAllRange_Update(Actor* this) { this->iwork[4]++; this->iwork[5] = 1; if (!((this->index + gGameFrameCount) & sp10F) && (Rand_ZeroOne() < spF0) && - func_360_80031900(this) && ((gActors[0].state == 2) || (gCurrentLevel == LEVEL_TRAINING))) { + func_360_80031900(this) && + ((gActors[0].state == STATE360_2) || (gCurrentLevel == LEVEL_TRAINING))) { if ((this->aiIndex == AI360_FOX) && (gCurrentLevel != LEVEL_TRAINING)) { if ((this->iwork[4] > 250) && (gCurrentLevel != LEVEL_VENOM_ANDROSS)) { if ((Rand_ZeroOne() < 0.5f) || (gCurrentLevel == LEVEL_VENOM_2)) { this->iwork[4] = 0; switch (this->aiType) { case AI360_WOLF: - func_360_8002E4F8(gMsg_ID_19450, RCID_WOLF); + AllRange_PlayMessage(gMsg_ID_19450, RCID_WOLF); break; case AI360_LEON: - func_360_8002E4F8(gMsg_ID_19451, RCID_LEON); + AllRange_PlayMessage(gMsg_ID_19451, RCID_LEON); break; case AI360_PIGMA: - func_360_8002E4F8(gMsg_ID_19452, RCID_PIGMA); + AllRange_PlayMessage(gMsg_ID_19452, RCID_PIGMA); break; case AI360_ANDREW: - func_360_8002E4F8(gMsg_ID_19453, RCID_ANDREW); + AllRange_PlayMessage(gMsg_ID_19453, RCID_ANDREW); break; } } else { - func_360_8002E4F8(gMsg_ID_2233, RCID_FALCO); + AllRange_PlayMessage(gMsg_ID_2233, RCID_FALCO); } } this->iwork[0] = 1; @@ -1576,11 +1601,11 @@ void ActorAllRange_Update(Actor* this) { switch (this->aiIndex) { case AI360_FALCO: if ((gCurrentLevel == LEVEL_VENOM_2) && (Rand_ZeroOne() < 0.5f)) { - func_360_8002F5F4(gMsg_ID_19462, RCID_FALCO); + ActorAllRange_PlayMessage(gMsg_ID_19462, RCID_FALCO); } else if ((gActors[this->aiIndex].iwork[6] >= 3) && (Rand_ZeroOne() < 0.5f)) { - func_360_8002F5F4(gMsg_ID_20310, RCID_FALCO); + ActorAllRange_PlayMessage(gMsg_ID_20310, RCID_FALCO); } else { - func_360_8002F5F4(gMsg_ID_9100, RCID_FALCO); + ActorAllRange_PlayMessage(gMsg_ID_9100, RCID_FALCO); } gActors[this->aiIndex].iwork[2] = this->aiType; if ((D_display_800CA234 == NULL) || (gTeamShields[this->aiIndex] <= 50)) { @@ -1590,11 +1615,11 @@ void ActorAllRange_Update(Actor* this) { break; case AI360_SLIPPY: if ((gCurrentLevel == LEVEL_VENOM_2) && (Rand_ZeroOne() < 0.5f)) { - func_360_8002F5F4(gMsg_ID_19463, RCID_SLIPPY); + ActorAllRange_PlayMessage(gMsg_ID_19463, RCID_SLIPPY); } else if ((gActors[this->aiIndex].iwork[6] >= 3) && (Rand_ZeroOne() < 0.5f)) { - func_360_8002F5F4(gMsg_ID_20311, RCID_SLIPPY); + ActorAllRange_PlayMessage(gMsg_ID_20311, RCID_SLIPPY); } else { - func_360_8002F5F4(gMsg_ID_9110, RCID_SLIPPY); + ActorAllRange_PlayMessage(gMsg_ID_9110, RCID_SLIPPY); } gActors[this->aiIndex].iwork[2] = this->aiType; if ((D_display_800CA234 == NULL) || (gTeamShields[this->aiIndex] <= 50)) { @@ -1604,11 +1629,11 @@ void ActorAllRange_Update(Actor* this) { break; case AI360_PEPPY: if ((gCurrentLevel == LEVEL_VENOM_2) && (Rand_ZeroOne() < 0.5f)) { - func_360_8002F5F4(gMsg_ID_19464, RCID_PEPPY); + ActorAllRange_PlayMessage(gMsg_ID_19464, RCID_PEPPY); } else if ((gActors[this->aiIndex].iwork[6] >= 3) && (Rand_ZeroOne() < 0.5f)) { - func_360_8002F5F4(gMsg_ID_20312, RCID_PEPPY); + ActorAllRange_PlayMessage(gMsg_ID_20312, RCID_PEPPY); } else { - func_360_8002F5F4(gMsg_ID_9120, RCID_PEPPY); + ActorAllRange_PlayMessage(gMsg_ID_9120, RCID_PEPPY); } gActors[this->aiIndex].iwork[2] = this->aiType; if ((D_display_800CA234 == NULL) || (gTeamShields[this->aiIndex] <= 50)) { @@ -1618,22 +1643,22 @@ void ActorAllRange_Update(Actor* this) { break; case AI360_WOLF: if (gStarWolfTeamAlive[0] != 0) { - func_360_8002F5F4(gMsg_ID_9330, RCID_WOLF); + ActorAllRange_PlayMessage(gMsg_ID_9330, RCID_WOLF); } break; case AI360_LEON: if (gStarWolfTeamAlive[1] != 0) { - func_360_8002F5F4(gMsg_ID_9340, RCID_LEON); + ActorAllRange_PlayMessage(gMsg_ID_9340, RCID_LEON); } break; case AI360_PIGMA: if (gStarWolfTeamAlive[2] != 0) { - func_360_8002F5F4(gMsg_ID_9350, RCID_PIGMA); + ActorAllRange_PlayMessage(gMsg_ID_9350, RCID_PIGMA); } break; case AI360_ANDREW: if (gStarWolfTeamAlive[3] != 0) { - func_360_8002F5F4(gMsg_ID_9360, RCID_ANDREW); + ActorAllRange_PlayMessage(gMsg_ID_9360, RCID_ANDREW); } break; } @@ -1641,25 +1666,25 @@ void ActorAllRange_Update(Actor* this) { switch (this->aiType) { case AI360_FALCO: if ((gCurrentLevel == LEVEL_FORTUNA) && (Rand_ZeroOne() < 0.5f)) { - func_360_8002F5F4(gMsg_ID_9211, RCID_FALCO); + ActorAllRange_PlayMessage(gMsg_ID_9211, RCID_FALCO); } else { - func_360_8002F5F4(gMsg_ID_9190, RCID_FALCO); + ActorAllRange_PlayMessage(gMsg_ID_9190, RCID_FALCO); } gActors[this->aiIndex].iwork[2] = AI360_FALCO; break; case AI360_SLIPPY: if ((gCurrentLevel == LEVEL_FORTUNA) && (Rand_ZeroOne() < 0.5f)) { - func_360_8002F5F4(gMsg_ID_9212, RCID_SLIPPY); + ActorAllRange_PlayMessage(gMsg_ID_9212, RCID_SLIPPY); } else { - func_360_8002F5F4(gMsg_ID_9200, RCID_SLIPPY); + ActorAllRange_PlayMessage(gMsg_ID_9200, RCID_SLIPPY); } gActors[this->aiIndex].iwork[2] = AI360_SLIPPY; break; case AI360_PEPPY: if ((gCurrentLevel == LEVEL_FORTUNA) && (Rand_ZeroOne() < 0.5f)) { - func_360_8002F5F4(gMsg_ID_9213, RCID_PEPPY); + ActorAllRange_PlayMessage(gMsg_ID_9213, RCID_PEPPY); } else { - func_360_8002F5F4(gMsg_ID_9210, RCID_PEPPY); + ActorAllRange_PlayMessage(gMsg_ID_9210, RCID_PEPPY); } gActors[this->aiIndex].iwork[2] = AI360_PEPPY; break; @@ -1667,56 +1692,56 @@ void ActorAllRange_Update(Actor* this) { if (gCurrentLevel != LEVEL_VENOM_2) { if (this->iwork[6] == 0) { this->iwork[6] = 1; - func_360_8002F5F4(gMsg_ID_9289, RCID_WOLF); + ActorAllRange_PlayMessage(gMsg_ID_9289, RCID_WOLF); } else if (this->iwork[4] > 150) { if (Rand_ZeroOne() < 0.5f) { this->iwork[4] = 0; - func_360_8002F5F4(gMsg_ID_9290, RCID_WOLF); + ActorAllRange_PlayMessage(gMsg_ID_9290, RCID_WOLF); } else { - func_360_8002F5F4(gMsg_ID_2233, RCID_FALCO); + ActorAllRange_PlayMessage(gMsg_ID_2233, RCID_FALCO); } } else { - func_360_8002F5F4(gMsg_ID_9322, RCID_WOLF); + ActorAllRange_PlayMessage(gMsg_ID_9322, RCID_WOLF); } } break; case AI360_LEON: if (gCurrentLevel == LEVEL_VENOM_2) { if ((Rand_ZeroOne() < 0.5f) && (this->aiIndex == AI360_FALCO)) { - func_360_8002F5F4(gMsg_ID_9323, RCID_LEON); + ActorAllRange_PlayMessage(gMsg_ID_9323, RCID_LEON); } else { - func_360_8002F5F4(gMsg_ID_19451, RCID_LEON); + ActorAllRange_PlayMessage(gMsg_ID_19451, RCID_LEON); } } else if ((Rand_ZeroOne() < 0.5f) && (this->aiIndex == AI360_FALCO)) { - func_360_8002F5F4(gMsg_ID_9323, RCID_LEON); + ActorAllRange_PlayMessage(gMsg_ID_9323, RCID_LEON); } else { - func_360_8002F5F4(gMsg_ID_9300, RCID_LEON); + ActorAllRange_PlayMessage(gMsg_ID_9300, RCID_LEON); } break; case AI360_PIGMA: if (gCurrentLevel == LEVEL_VENOM_2) { if ((Rand_ZeroOne() < 0.5f) && (this->aiIndex == AI360_PEPPY)) { - func_360_8002F5F4(gMsg_ID_9324, RCID_PIGMA); + ActorAllRange_PlayMessage(gMsg_ID_9324, RCID_PIGMA); } else { - func_360_8002F5F4(gMsg_ID_19452, RCID_PIGMA); + ActorAllRange_PlayMessage(gMsg_ID_19452, RCID_PIGMA); } } else if ((Rand_ZeroOne() < 0.5f) && (this->aiIndex == AI360_PEPPY)) { - func_360_8002F5F4(gMsg_ID_9324, RCID_PIGMA); + ActorAllRange_PlayMessage(gMsg_ID_9324, RCID_PIGMA); } else { - func_360_8002F5F4(gMsg_ID_9310, RCID_PIGMA); + ActorAllRange_PlayMessage(gMsg_ID_9310, RCID_PIGMA); } break; case AI360_ANDREW: if (gCurrentLevel == LEVEL_VENOM_2) { if ((Rand_ZeroOne() < 0.5f) && (this->aiIndex == AI360_SLIPPY)) { - func_360_8002F5F4(gMsg_ID_9325, RCID_ANDREW); + ActorAllRange_PlayMessage(gMsg_ID_9325, RCID_ANDREW); } else { - func_360_8002F5F4(gMsg_ID_19453, RCID_ANDREW); + ActorAllRange_PlayMessage(gMsg_ID_19453, RCID_ANDREW); } } else if ((Rand_ZeroOne() < 0.5f) && (this->aiIndex == AI360_SLIPPY)) { - func_360_8002F5F4(gMsg_ID_9325, RCID_ANDREW); + ActorAllRange_PlayMessage(gMsg_ID_9325, RCID_ANDREW); } else { - func_360_8002F5F4(gMsg_ID_9320, RCID_ANDREW); + ActorAllRange_PlayMessage(gMsg_ID_9320, RCID_ANDREW); } break; } @@ -1736,7 +1761,7 @@ void ActorAllRange_Update(Actor* this) { } } break; - case 3: + case STATE360_3: sp104 = 1; if (this->timer_0BC == 0) { if ((this->aiType < AI360_10) || (gCurrentLevel == LEVEL_BOLSE)) { @@ -1778,7 +1803,7 @@ void ActorAllRange_Update(Actor* this) { spE0 = 0.0f; } spDC = RAND_FLOAT_CENTERED(10000.0f); - if ((gCurrentLevel == LEVEL_KATINA) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_0)) { + if ((gCurrentLevel == LEVEL_KATINA) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY)) { spE4 = RAND_FLOAT_CENTERED(5000.0f); spDC = RAND_FLOAT_CENTERED(5000.0f); } @@ -1809,7 +1834,7 @@ void ActorAllRange_Update(Actor* this) { } } break; - case 7: + case STATE360_7: this->fwork[1] = 40.0f; Math_SmoothStepToF(&this->unk_0F4.x, 360.0f, 0.1f, 5.0f, 0.0001f); Math_SmoothStepToAngle(&this->obj.rot.z, 0.0f, 0.1f, 3.0f, 0.01f); @@ -1817,7 +1842,7 @@ void ActorAllRange_Update(Actor* this) { this->state = 3; } break; - case 8: + case STATE360_8: this->fwork[1] = 40.0f; if ((this->index % 2) != 0) { Math_SmoothStepToAngle(&this->obj.rot.z, 355.0f, 0.1f, 3.0f, 0.01f); @@ -1849,7 +1874,7 @@ void ActorAllRange_Update(Actor* this) { break; } break; - case 9: + case STATE360_9: this->fwork[1] = 40.0f; if (Math_SmoothStepToAngle(&this->unk_0F4.y, this->fwork[19], 0.5f, 5.0f, 0.0f) < 0.0f) { spD0 = 70.0f; @@ -1861,7 +1886,7 @@ void ActorAllRange_Update(Actor* this) { this->state = 3; } break; - case 10: + case STATE360_10: sp104 = 1; if (this->timer_0BC == 0) { this->state = 3; @@ -1945,9 +1970,9 @@ void ActorAllRange_Update(Actor* this) { Math_SmoothStepToAngle(&this->obj.rot.z, this->fwork[7], 0.2f, 100.0f, 0.01f); if ((this->aiType == AI360_KATT) && ((gGameFrameCount % 2) == 0)) { if ((this->fwork[7] > 10.0f) && (this->fwork[7] < 350.0f)) { - Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); spA8.x = 0.0f; spA8.y = 70.0f; @@ -1991,9 +2016,9 @@ void ActorAllRange_Update(Actor* this) { sp90.z = spB4 * sp90.z; if ((gCurrentLevel == LEVEL_VENOM_2) && (this->aiType >= AI360_WOLF)) { - Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); spA8.y = 0.0f; spA8.z = 0.0f; if (Rand_ZeroOne() < 0.8f) { @@ -2018,16 +2043,16 @@ void ActorAllRange_Update(Actor* this) { this->obj.rot.y, this->obj.rot.z); } } - func_360_8003088C(this); + ActorAllRange_ApplyDamage(this); radarMark = &gRadarMarks[this->index]; - radarMark->unk_00 = 1; + radarMark->status = 1; if (this->aiType == AI360_MISSILE) { - radarMark->unk_02 = 100; + radarMark->type = 100; } else { - radarMark->unk_02 = this->aiType; + radarMark->type = this->aiType; } if (gCurrentLevel == LEVEL_TRAINING) { - radarMark->unk_02 = 4; + radarMark->type = 4; } radarMark->pos.x = this->obj.pos.x; radarMark->pos.y = this->obj.pos.y; @@ -2035,19 +2060,19 @@ void ActorAllRange_Update(Actor* this) { radarMark->unk_10 = this->unk_0F4.y + 180.0f; if (this->iwork[1] != 0) { this->iwork[1]--; - if ((this->iwork[1] == 0) && (gActors[0].state == 2) && (gRadioState == 0)) { + if ((this->iwork[1] == 0) && (gActors[0].state == STATE360_2) && (gRadioState == 0)) { switch (this->aiType) { case AI360_FALCO: - func_360_8002F5F4(gMsg_ID_9220, RCID_FALCO); + ActorAllRange_PlayMessage(gMsg_ID_9220, RCID_FALCO); break; case AI360_SLIPPY: - func_360_8002F5F4(gMsg_ID_9230, RCID_SLIPPY); + ActorAllRange_PlayMessage(gMsg_ID_9230, RCID_SLIPPY); break; case AI360_PEPPY: if ((Rand_ZeroOne() < 0.1f) && (gCurrentLevel == LEVEL_KATINA)) { - func_360_8002F5F4(gMsg_ID_18150, RCID_PEPPY); + ActorAllRange_PlayMessage(gMsg_ID_18150, RCID_PEPPY); } else { - func_360_8002F5F4(gMsg_ID_9240, RCID_PEPPY); + ActorAllRange_PlayMessage(gMsg_ID_9240, RCID_PEPPY); } break; } @@ -2064,7 +2089,7 @@ void ActorAllRange_Update(Actor* this) { sp90.x = this->vel.x; sp90.y = this->vel.y; sp90.z = this->vel.z; - temp_v0_27 = func_enmy_8006351C(this->index, &this->obj.pos, &sp90, var_a3); + temp_v0_27 = Object_CheckCollision(this->index, &this->obj.pos, &sp90, var_a3); if (temp_v0_27 != 0) { this->obj.pos.x -= this->vel.x; this->obj.pos.y -= this->vel.y; @@ -2079,7 +2104,7 @@ void ActorAllRange_Update(Actor* this) { this->unk_0D0 = 1; this->damage = 10; this->health = 0; - func_360_8003088C(this); + ActorAllRange_ApplyDamage(this); } } } @@ -2110,9 +2135,9 @@ void func_360_80034E64(Actor* actor) { if (gCurrentLevel == LEVEL_VENOM_2) { sp24 *= 1.5f; } - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -30.0f, 1); - Matrix_Scale(gGfxMatrix, sp24, sp24 * 0.5f, sp24, 1); - Matrix_RotateY(gGfxMatrix, gGameFrameCount * 3.0f * M_DTOR, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -30.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, sp24, sp24 * 0.5f, sp24, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, gGameFrameCount * 3.0f * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL(&gMasterDisp, 0x29); if (gCurrentLevel == LEVEL_KATINA) { @@ -2133,16 +2158,16 @@ void func_360_80035098(Actor* actor) { if (actor->fwork[23] > 1.0f) { Matrix_Push(&gGfxMatrix); sp2C = actor->fwork[23]; - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -30.0f, 1); - Matrix_RotateZ(gGfxMatrix, -actor->obj.rot.z * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, -actor->obj.rot.x * M_DTOR, 1); - Matrix_RotateY(gGfxMatrix, M_DTOR * -actor->obj.rot.y - gPlayer[0].unk_058, 1); - Matrix_RotateX(gGfxMatrix, gPlayer[0].unk_05C, 1); - Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 20.0f * actor->iwork[15] * M_DTOR, 1); + 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_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_RotateX(gGfxMatrix, M_PI, 1); + Matrix_RotateX(gGfxMatrix, M_PI, MTXF_APPLY); } - Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, 1); + 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); @@ -2152,7 +2177,7 @@ void func_360_80035098(Actor* actor) { } } -bool func_360_800352E0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { +bool ActorAllRange_MissileOverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { Actor* this = thisx; if ((this->timer_0C6 % 2) != 0) { @@ -2182,9 +2207,9 @@ void ActorAllRange_Draw(ActorAllRange* this) { if ((this->iwork[8] != 0) && (this->aiType < AI360_GREAT_FOX)) { pad2 = SIN_DEG(this->iwork[8] * 400.0f); sp38 = this->iwork[8] * pad2; - Matrix_RotateY(gGfxMatrix, M_DTOR * sp38, 1); - Matrix_RotateX(gGfxMatrix, M_DTOR * sp38, 1); - Matrix_RotateZ(gGfxMatrix, M_DTOR * sp38, 1); + Matrix_RotateY(gGfxMatrix, M_DTOR * sp38, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_DTOR * sp38, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, M_DTOR * sp38, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); } if ((this->timer_0C6 % 2) == 0) { @@ -2208,18 +2233,18 @@ void ActorAllRange_Draw(ActorAllRange* this) { if (gCurrentLevel == LEVEL_VENOM_2) { gSPDisplayList(gMasterDisp++, D_STAR_WOLF_F0103D0); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 30.0f, 0.0f, -60.0f, 1); + Matrix_Translate(gGfxMatrix, 30.0f, 0.0f, -60.0f, MTXF_APPLY); func_edisplay_8005B1E8(this, 2); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, -30.0f, 0.0f, -60.0f, 1); + Matrix_Translate(gGfxMatrix, -30.0f, 0.0f, -60.0f, MTXF_APPLY); func_edisplay_8005B1E8(this, 2); Matrix_Pop(&gGfxMatrix); func_360_80035098(this); func_360_80034E64(this); } else { gSPDisplayList(gMasterDisp++, D_STAR_WOLF_F00F200); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY); if (gCurrentLevel == LEVEL_BOLSE) { func_edisplay_8005B1E8(this, 3); } else { @@ -2242,18 +2267,19 @@ void ActorAllRange_Draw(ActorAllRange* this) { break; case AI360_MISSILE: Animation_GetFrameData(&D_SZ_6006D64, 0, sp7C); - Animation_DrawSkeleton(3, D_SZ_6006E50, sp7C, func_360_800352E0, NULL, this, gCalcMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -400.0f, 1); - Matrix_Scale(gGfxMatrix, this->fwork[29], this->fwork[29], this->fwork[29], 1); + Animation_DrawSkeleton(3, D_SZ_6006E50, sp7C, ActorAllRange_MissileOverrideLimbDraw, NULL, 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); break; default: if (gCurrentLevel == LEVEL_FORTUNA) { - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 60.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 60.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_FO_6006BE0); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -100.0f, 1); - Matrix_Scale(gGfxMatrix, 1.5f, 1.5f, 1.5f, 1); + 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); } else if (gCurrentLevel == LEVEL_KATINA) { switch (this->unk_0B6) { @@ -2262,38 +2288,39 @@ void ActorAllRange_Draw(ActorAllRange* this) { break; case 1: gSPDisplayList(gMasterDisp++, D_KA_600E050); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY); func_edisplay_8005B1E8(this, 0); break; case 3: gSPDisplayList(gMasterDisp++, D_KA_6001530); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 30.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 30.0f, MTXF_APPLY); func_360_80034E64(this); break; } } else if (gCurrentLevel == LEVEL_SECTOR_Z) { - gSPDisplayList(gMasterDisp++, D_SZ_6004FE0) Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, 1); + gSPDisplayList(gMasterDisp++, D_SZ_6004FE0); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY); func_edisplay_8005B1E8(this, 2); } else if (gCurrentLevel == LEVEL_BOLSE) { gSPDisplayList(gMasterDisp++, D_BO_6008770) Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY); func_edisplay_8005B1E8(this, 2); Matrix_Pop(&gGfxMatrix); func_360_80034E64(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, 1); + Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 10.0f, MTXF_APPLY); Animation_DrawSkeleton(0, D_VE2_600C2AC, this->vwork, NULL, NULL, this, &gIdentityMatrix); } else if (gCurrentLevel == LEVEL_VERSUS) { gSPDisplayList(gMasterDisp++, D_versus_3015740); } else if (gCurrentLevel == LEVEL_TRAINING) { if (this->aiIndex == AI360_FOX) { gSPDisplayList(gMasterDisp++, D_STAR_WOLF_F00F200); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY); func_edisplay_8005B1E8(this, 3); } else { gSPDisplayList(gMasterDisp++, D_ENMY_PLANET_40068F0); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY); func_edisplay_8005B1E8(this, 2); } } diff --git a/src/engine/fox_A48A0.c b/src/engine/fox_A48A0.c index 0f9adc10..01036834 100644 --- a/src/engine/fox_A48A0.c +++ b/src/engine/fox_A48A0.c @@ -2,10 +2,11 @@ void func_800A3CA0(void) { Matrix_Push(&gGfxMatrix); - Matrix_LookAt(gGfxMatrix, gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ, 0.0f, 1.0f, 0.0f, 1); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -200.0f, 1); - Matrix_RotateY(gGfxMatrix, gControllerPress[gPlayerNum].stick_x * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, gControllerPress[gPlayerNum].stick_y * M_DTOR, 1); + Matrix_LookAt(gGfxMatrix, gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ, 0.0f, 1.0f, 0.0f, + MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -200.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, gControllerPress[gPlayerNum].stick_x * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, gControllerPress[gPlayerNum].stick_y * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL_23(); Matrix_Pop(&gGfxMatrix); diff --git a/src/engine/fox_beam.c b/src/engine/fox_beam.c index 62cc5f77..c1471e6a 100644 --- a/src/engine/fox_beam.c +++ b/src/engine/fox_beam.c @@ -281,12 +281,12 @@ s32 func_beam_80036874(PlayerShot* shot, f32* hitboxData, Object* obj) { shotPy = shot->obj.pos.y; shotPz = shot->obj.pos.z; } else { - Matrix_RotateZ(gCalcMatrix, -boxRotZ * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -boxRotX * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -boxRotY * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, -obj->rot.z * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, -obj->rot.x * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -obj->rot.y * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, -boxRotZ * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -boxRotX * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -boxRotY * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -obj->rot.z * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, -obj->rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -obj->rot.y * M_DTOR, MTXF_APPLY); spAC.x = shot->obj.pos.x - obj->pos.x; spAC.y = shot->obj.pos.y - obj->pos.y; spAC.z = shot->obj.pos.z - obj->pos.z; @@ -379,24 +379,24 @@ s32 func_beam_80036F88(PlayerShot* shot, Actor* actor) { shotPz = shot->obj.pos.z; } else { if (hitboxData[0] == HITBOX_ROTATED) { - Matrix_RotateZ(gCalcMatrix, -hitboxData[3] * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -hitboxData[1] * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -hitboxData[2] * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, -actor->obj.rot.z * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, -actor->obj.rot.x * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -actor->obj.rot.y * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, -hitboxData[3] * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -hitboxData[1] * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -hitboxData[2] * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -actor->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, -actor->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -actor->obj.rot.y * M_DTOR, MTXF_APPLY); hitboxData += 4; } else { - Matrix_RotateZ(gCalcMatrix, -actor->obj.rot.z * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -actor->obj.rot.x * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -actor->obj.rot.y * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, -actor->obj.rot.z * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -actor->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -actor->obj.rot.y * M_DTOR, MTXF_APPLY); } 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)) { - Matrix_RotateZ(gCalcMatrix, -(actor->vwork[29].z + actor->unk_0F4.z) * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, -actor->vwork[29].x * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -actor->vwork[29].y * M_DTOR, 1); + 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); } sp7C.x = shot->obj.pos.x - actor->obj.pos.x; sp7C.y = shot->obj.pos.y - actor->obj.pos.y; @@ -427,8 +427,8 @@ bool func_beam_80037438(PlayerShot* shot, Actor* actor) { if (((s32) hitboxData[0] != 0) && (sqrtf(SQ(temp_fv1) + SQ(temp_fa0)) <= 500.0f)) { if (shot->playerNum < 4) { - temp_fv1 = actor->obj.pos.x - gPlayer[0].camEye.x; - temp_fa0 = actor->obj.pos.z + D_ctx_80177D20 - gPlayer[0].camEye.z; + temp_fv1 = actor->obj.pos.x - gPlayer[0].cam.eye.x; + temp_fa0 = actor->obj.pos.z + D_ctx_80177D20 - gPlayer[0].cam.eye.z; var_fa1 = (sqrtf(SQ(temp_fv1) + SQ(temp_fa0)) / 50.0f) + 20.0f + 10.0f; if (var_fa1 > 200.0f) { var_fa1 = 200.0f; @@ -486,7 +486,7 @@ bool func_beam_8003774C(PlayerShot* shot, ObjectId objId, Object* obj) { // undefined behavior: if this check fails, the function returns no value if (((fabsf(sp7C.x) < 1100.0f) && (fabsf(sp7C.z) < 1100.0f) && (shot->obj.pos.y < 900.0f)) || (objId == OBJ_BOSS_313) || (objId == ACTOR_EVENT_ID) || (objId == OBJ_80_39)) { - Matrix_RotateY(gCalcMatrix, -obj->rot.y * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, -obj->rot.y * M_DTOR, MTXF_NEW); sp7C.x = shot->obj.pos.x - obj->pos.x; sp7C.y = shot->obj.pos.y - obj->pos.y; sp7C.z = shot->obj.pos.z - obj->pos.z; @@ -614,7 +614,7 @@ bool func_beam_8003774C(PlayerShot* shot, ObjectId objId, Object* obj) { func_beam_80036318(shot); func_effect_8007A6F0(&shot->obj.pos, 0x29121007); if (gCurrentLevel == LEVEL_METEO) { - Matrix_RotateY(gCalcMatrix, obj->rot.y * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, obj->rot.y * M_DTOR, MTXF_NEW); sp7C.x = sp4C.x - obj->pos.x; sp7C.y = sp4C.y - obj->pos.y; sp7C.z = sp4C.z - obj->pos.z; @@ -701,8 +701,8 @@ void func_beam_80037CF4(PlayerShot* shot, Actor* actor, s32 hitIndex) { shot->unk_64 = 25; shot->obj.rot.y += 90.0f; shot->obj.rot.x = RAND_FLOAT(360.0f); - Matrix_RotateY(gCalcMatrix, shot->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, shot->obj.rot.x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, shot->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, shot->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); shot->vel.x = sp38.x; shot->vel.y = sp38.y; @@ -839,15 +839,15 @@ void func_beam_80038140(PlayerShot* shot) { } test.z = test.x; if ((i != shot->playerNum) && - ((player->state_1C8 == PLAYERSTATE_1C8_3) || (player->state_1C8 == PLAYERSTATE_1C8_4)) && + ((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (player->state_1C8 == PLAYERSTATE_1C8_DOWN)) && (fabsf(player->unk_138 - shot->obj.pos.z) < test.z) && (fabsf(player->pos.x - shot->obj.pos.x) < test.x) && (fabsf(player->pos.y - shot->obj.pos.y) < test.y)) { if (player->unk_280 >= 100) { shot->obj.rot.y = player->unk_0E8 + player->unk_114 + 180.0f + 90.0f; shot->obj.rot.x = RAND_FLOAT(360.0f); - Matrix_RotateY(gCalcMatrix, shot->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, shot->obj.rot.x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, shot->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, shot->obj.rot.x * M_DTOR, MTXF_APPLY); sp88.x = sp88.y = 0.0f; sp88.z = -133.33333f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp88, &sp7C); @@ -1031,7 +1031,7 @@ void func_beam_80038F34(PlayerShot* shot) { Vec3f sp4C = { 0.0f, 0.0f, 0.0f }; s32 sp48 = 0; - Matrix_Translate(gGfxMatrix, shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + D_ctx_80177D20, 1); + Matrix_Translate(gGfxMatrix, shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + D_ctx_80177D20, MTXF_APPLY); Matrix_MultVec3f(gGfxMatrix, &sp4C, &D_beam_8015F950); if ((D_beam_8015F950.z < 0.0f) && (D_beam_8015F950.z > -10000.0f)) { if (fabsf(D_beam_8015F950.x) < (fabsf(D_beam_8015F950.z * 0.5f) + 500.0f)) { @@ -1046,11 +1046,11 @@ void func_beam_80038F34(PlayerShot* shot) { return; } } else { - shot->obj.rot.y = -gPlayer[gPlayerNum].unk_058; - Matrix_RotateY(gGfxMatrix, shot->obj.rot.y, 1); - Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, 1); + shot->obj.rot.y = -gPlayer[gPlayerNum].camYaw; + Matrix_RotateY(gGfxMatrix, shot->obj.rot.y, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, MTXF_APPLY); if (shot->obj.id == PLAYERSHOT_7) { - Matrix_Scale(gGfxMatrix, 0.2f, 0.2f, 0.2f, 1); + Matrix_Scale(gGfxMatrix, 0.2f, 0.2f, 0.2f, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL_40(); @@ -1062,7 +1062,7 @@ void func_beam_80038F34(PlayerShot* shot) { gSPDisplayList(gMasterDisp++, D_1025800); break; case 2: - Matrix_Scale(gGfxMatrix, 1.5f, 0.7f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 1.5f, 0.7f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1025800); break; @@ -1081,7 +1081,8 @@ void func_beam_80039210(PlayerShot* shot) { if (gCamCount < 4) { RCP_SetupDL_21(); sp70 = 9.0f; - if ((shot->unk_58 == 0) || ((gCurrentLevel == LEVEL_METEO) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2))) { + if ((shot->unk_58 == 0) || + ((gCurrentLevel == LEVEL_METEO) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO))) { var_fv0 = 4.0f; var_fv1 = 20.0f; } else { @@ -1099,12 +1100,12 @@ void func_beam_80039210(PlayerShot* shot) { if (gCurrentLevel == LEVEL_AQUAS) { sp70 = 4.0f; } - Matrix_Scale(gGfxMatrix, var_fv0, var_fv0, var_fv1, 1); - Matrix_RotateY(gGfxMatrix, M_PI, 1); - Matrix_Translate(gGfxMatrix, sp70, 0.f, 0.0f, 1); + Matrix_Scale(gGfxMatrix, var_fv0, var_fv0, var_fv1, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sp70, 0.f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, sp6C); - Matrix_Translate(gGfxMatrix, -(2.0f * sp70), 0.0f, 0.f, 1); + Matrix_Translate(gGfxMatrix, -(2.0f * sp70), 0.0f, 0.f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, sp6C); } else { @@ -1116,7 +1117,7 @@ void func_beam_80039210(PlayerShot* shot) { var_a1 = 2; } } else if (gCurrentLevel == LEVEL_KATINA) { - if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2) { + if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO) { if (shot->playerNum >= 104) { if (gActors[shot->playerNum - 100].unk_0B6 == 0) { var_a1 = 1; @@ -1131,40 +1132,40 @@ void func_beam_80039210(PlayerShot* shot) { } switch (var_a1) { case 0: - Matrix_Scale(gGfxMatrix, var_fv0, var_fv0, var_fv1, 1); - Matrix_RotateY(gGfxMatrix, M_PI, 1); + Matrix_Scale(gGfxMatrix, var_fv0, var_fv0, var_fv1, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_101AED0); break; case 1: - Matrix_Translate(gGfxMatrix, 0.0f, 0.f, 150.0f, 1); - Matrix_Scale(gGfxMatrix, 0.7f, 0.7f, 1.5f, 1); - Matrix_RotateY(gGfxMatrix, M_PI, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.f, 150.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.7f, 0.7f, 1.5f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_101ABD0); break; case 2: - Matrix_Scale(gGfxMatrix, var_fv0, var_fv0, var_fv1, 1); - Matrix_RotateY(gGfxMatrix, M_PI, 1); - Matrix_Translate(gGfxMatrix, 25.0f, 0.0f, 0.f, 1); + Matrix_Scale(gGfxMatrix, var_fv0, var_fv0, var_fv1, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 25.0f, 0.0f, 0.f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_101AED0); sp6C = D_101AED0; - Matrix_Translate(gGfxMatrix, -50.0f, 0.0f, 0.f, 1); + Matrix_Translate(gGfxMatrix, -50.0f, 0.0f, 0.f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, sp6C); break; case 3: Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 50.0f, 0.0f, 150.0f, 1); - Matrix_Scale(gGfxMatrix, 0.7f, 0.7f, 1.5f, 1); - Matrix_RotateY(gGfxMatrix, M_PI, 1); + Matrix_Translate(gGfxMatrix, 50.0f, 0.0f, 150.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.7f, 0.7f, 1.5f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_101ABD0); Matrix_Pop(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, -50.0f, 0.0f, 150.0f, 1); - Matrix_Scale(gGfxMatrix, 0.7f, 0.7f, 1.5f, 1); - Matrix_RotateY(gGfxMatrix, M_PI, 1); + Matrix_Translate(gGfxMatrix, -50.0f, 0.0f, 150.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.7f, 0.7f, 1.5f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_101ABD0); break; @@ -1186,14 +1187,14 @@ void func_beam_80039210(PlayerShot* shot) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 32, 32, 255, 255); break; } - Matrix_Scale(gGfxMatrix, 6.0f, 4.0f, 10.0f, 1); - Matrix_RotateY(gGfxMatrix, M_PI, 1); + Matrix_Scale(gGfxMatrix, 6.0f, 4.0f, 10.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if (gLaserStrength[shot->playerNum] != LASERS_SINGLE) { - Matrix_Translate(gGfxMatrix, 6.0f, 0.0f, 0.0f, 1); + Matrix_Translate(gGfxMatrix, 6.0f, 0.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_versus_302D120); - Matrix_Translate(gGfxMatrix, -12.0f, 0.0f, 0.0f, 1); + Matrix_Translate(gGfxMatrix, -12.0f, 0.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_versus_302D120); } else { @@ -1212,7 +1213,7 @@ void func_beam_80039A50(PlayerShot* shot) { f32 var_fv1; s32 sp104 = 0; - Matrix_Translate(gGfxMatrix, shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + D_ctx_80177D20, 1); + Matrix_Translate(gGfxMatrix, shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + D_ctx_80177D20, MTXF_APPLY); Matrix_MultVec3f(gGfxMatrix, &sp11C, &D_beam_8015F950); if ((D_beam_8015F950.z < 0.0f) && (D_beam_8015F950.z > -10000.0f)) { var_fv1 = fabsf(D_beam_8015F950.x); // probably fake. The use of temps was likely different @@ -1228,20 +1229,20 @@ void func_beam_80039A50(PlayerShot* shot) { } } else { if ((shot->obj.id == PLAYERSHOT_5) || (shot->obj.id == PLAYERSHOT_6) || (shot->obj.id == PLAYERSHOT_7)) { - shot->obj.rot.y = RAD_TO_DEG(-gPlayer[gPlayerNum].unk_058); - shot->obj.rot.x = RAD_TO_DEG(gPlayer[gPlayerNum].unk_05C); + shot->obj.rot.y = RAD_TO_DEG(-gPlayer[gPlayerNum].camYaw); + shot->obj.rot.x = RAD_TO_DEG(gPlayer[gPlayerNum].camPitch); } if (shot->obj.id != PLAYERSHOT_2) { - Matrix_RotateY(gGfxMatrix, shot->obj.rot.y * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, shot->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gGfxMatrix, shot->obj.rot.z * M_DTOR, 1); + Matrix_RotateY(gGfxMatrix, shot->obj.rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, shot->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, shot->obj.rot.z * M_DTOR, MTXF_APPLY); if ((shot->obj.id == PLAYERSHOT_3) && (shot->unk_5C == 0)) { - Matrix_RotateZ(gGfxMatrix, shot->unk_34 * M_DTOR, 1); - Matrix_RotateY(gGfxMatrix, shot->unk_30 * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, shot->unk_2C * M_DTOR, 1); + Matrix_RotateZ(gGfxMatrix, shot->unk_34 * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, shot->unk_30 * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, shot->unk_2C * M_DTOR, MTXF_APPLY); } } - Matrix_Translate(gGfxMatrix, 0.f, 0.f, D_800C9BD8[shot->obj.id], 1); + Matrix_Translate(gGfxMatrix, 0.f, 0.f, D_800C9BD8[shot->obj.id], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); switch (shot->obj.id) { case PLAYERSHOT_0: @@ -1254,14 +1255,15 @@ void func_beam_80039A50(PlayerShot* shot) { gSPDisplayList(gMasterDisp++, D_10231A0); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + D_ctx_80177D20, 1); - Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].unk_058, 1); - Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].unk_05C, 1); - Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 40.0f * M_DTOR, 1); + Matrix_Translate(gGfxMatrix, shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + D_ctx_80177D20, + MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].camPitch, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 40.0f * M_DTOR, MTXF_APPLY); if (((gGameFrameCount % 2) == 0)) { - Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.7f, 1); + Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.7f, MTXF_APPLY); } else { - Matrix_Scale(gGfxMatrix, 1.2f, 1.2f, 1.2f, 1); + Matrix_Scale(gGfxMatrix, 1.2f, 1.2f, 1.2f, MTXF_APPLY); } RCP_SetupDL(&gMasterDisp, 0x31); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); @@ -1286,7 +1288,7 @@ void func_beam_80039A50(PlayerShot* shot) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); } else { - Matrix_Scale(gGfxMatrix, shot->unk_44, shot->unk_44, shot->unk_44, 1); + Matrix_Scale(gGfxMatrix, shot->unk_44, shot->unk_44, shot->unk_44, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if (gVersusMode) { RCP_SetupDL_49(); @@ -1321,17 +1323,17 @@ void func_beam_80039A50(PlayerShot* shot) { D_800C9C08[shot->playerNum], 255); RCP_SetupDL(&gMasterDisp, 0x31); if (gLaserStrength[shot->playerNum] != LASERS_SINGLE) { - Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 48.0f * M_DTOR, 1); + Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 48.0f * M_DTOR, MTXF_APPLY); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.f, 50.0f, 0.0f, 1); - Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 70.0f * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, 1); + Matrix_Translate(gGfxMatrix, 0.f, 50.0f, 0.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 70.0f * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_versus_301AD60); Matrix_Pop(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, -50.0f, 0.0f, 1); - Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 70.0f * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, -50.0f, 0.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 70.0f * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_versus_301AD60); } else { @@ -1340,9 +1342,9 @@ void func_beam_80039A50(PlayerShot* shot) { } else { var_fv1 = 0.0f; } - Matrix_RotateY(gGfxMatrix, var_fv1, 1); - Matrix_RotateZ(gGfxMatrix, 30.0f * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, 1); + Matrix_RotateY(gGfxMatrix, var_fv1, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, 30.0f * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_versus_301AD60); } @@ -1352,9 +1354,9 @@ void func_beam_80039A50(PlayerShot* shot) { } else { var_fv1 = 0.0f; } - Matrix_RotateY(gGfxMatrix, var_fv1, 1); - Matrix_RotateZ(gGfxMatrix, 30.0f * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, 1.0f, 0.65f, 1.0f, 1); + Matrix_RotateY(gGfxMatrix, var_fv1, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, 30.0f * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 1.0f, 0.65f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL_68(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); @@ -1365,20 +1367,20 @@ void func_beam_80039A50(PlayerShot* shot) { break; case PLAYERSHOT_6: case PLAYERSHOT_7: - Matrix_Scale(gGfxMatrix, shot->unk_44, shot->unk_44, shot->unk_44, 1); + Matrix_Scale(gGfxMatrix, shot->unk_44, shot->unk_44, shot->unk_44, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL(&gMasterDisp, 0x31); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, D_800C9C00[shot->playerNum], D_800C9C04[shot->playerNum], D_800C9C08[shot->playerNum], 255); if (gLaserStrength[shot->playerNum] != LASERS_SINGLE) { - Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 48.0f * M_DTOR, 1); + Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 48.0f * M_DTOR, MTXF_APPLY); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.f, 40.0f, 0.0f, 1); + Matrix_Translate(gGfxMatrix, 0.f, 40.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_versus_301AEF0); Matrix_Pop(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.f, -40.0f, 0.0f, 1); + Matrix_Translate(gGfxMatrix, 0.f, -40.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_versus_301AEF0); } else { @@ -1386,15 +1388,16 @@ void func_beam_80039A50(PlayerShot* shot) { } break; case PLAYERSHOT_8: - Matrix_RotateY(gGfxMatrix, M_PI, 1); + Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if (gCurrentLevel == LEVEL_AQUAS) { RCP_SetupDL(&gMasterDisp, 0x3C); gSPDisplayList(gMasterDisp++, D_AQ_600DB80); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, shot->obj.pos.x, gGroundLevel, shot->obj.pos.z + D_ctx_80177D20, 1); - Matrix_Scale(gGfxMatrix, shot->unk_2C, shot->unk_30, shot->unk_34, 1); + Matrix_Translate(gGfxMatrix, shot->obj.pos.x, gGroundLevel, shot->obj.pos.z + D_ctx_80177D20, + MTXF_APPLY); + Matrix_Scale(gGfxMatrix, shot->unk_2C, shot->unk_30, shot->unk_34, MTXF_APPLY); RCP_SetupDL(&gMasterDisp, 0x31); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 32, 32, 0, shot->unk_58); gDPSetEnvColor(gMasterDisp++, 32, 16, 16, shot->unk_58); @@ -1405,11 +1408,11 @@ void func_beam_80039A50(PlayerShot* shot) { Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + D_ctx_80177D20, - 1); - Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].unk_058, 1); - Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].unk_05C, 1); + MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].camPitch, MTXF_APPLY); Matrix_Push(&gGfxMatrix); - Matrix_Scale(gGfxMatrix, 20.0f, 20.0f, 20.0f, 1); + Matrix_Scale(gGfxMatrix, 20.0f, 20.0f, 20.0f, MTXF_APPLY); RCP_SetupDL(&gMasterDisp, 0x31); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); if (gVersusMode) { @@ -1430,17 +1433,17 @@ void func_beam_80039A50(PlayerShot* shot) { } else { gDPSetEnvColor(gMasterDisp++, 0, 255, 0, 255); } - Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 53.0f * M_DTOR, 1); + Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 53.0f * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_101C2E0); - Matrix_RotateZ(gGfxMatrix, gGameFrameCount * -53.0f * 2.0f * M_DTOR, 1); + Matrix_RotateZ(gGfxMatrix, gGameFrameCount * -53.0f * 2.0f * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_101C2E0); Matrix_Pop(&gGfxMatrix); if (((gGameFrameCount % 2) == 0)) { - Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.7f, 1); + Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.7f, MTXF_APPLY); } else { - Matrix_Scale(gGfxMatrix, 1.3f, 1.3f, 1.3f, 1); + Matrix_Scale(gGfxMatrix, 1.3f, 1.3f, 1.3f, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); @@ -1450,13 +1453,14 @@ void func_beam_80039A50(PlayerShot* shot) { gSPDisplayList(gMasterDisp++, D_10231A0); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + D_ctx_80177D20, 1); - Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].unk_058, 1); - Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].unk_05C, 1); + Matrix_Translate(gGfxMatrix, shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + D_ctx_80177D20, + MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].camPitch, MTXF_APPLY); if (((gGameFrameCount % 2) == 0)) { - Matrix_Scale(gGfxMatrix, 1.2f, 1.2f, 1.2f, 1); + Matrix_Scale(gGfxMatrix, 1.2f, 1.2f, 1.2f, MTXF_APPLY); } else { - Matrix_Scale(gGfxMatrix, 1.5f, 1.5f, 1.5f, 1); + Matrix_Scale(gGfxMatrix, 1.5f, 1.5f, 1.5f, MTXF_APPLY); } RCP_SetupDL(&gMasterDisp, 0x31); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255); @@ -1466,8 +1470,8 @@ void func_beam_80039A50(PlayerShot* shot) { } break; case PLAYERSHOT_9: - Matrix_RotateY(gGfxMatrix, M_PI, 1); - Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 20.0f, 1); + Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 20.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL_40(); gSPDisplayList(gMasterDisp++, D_GREAT_FOX_E00DFB0); @@ -1501,10 +1505,10 @@ void func_beam_8003B00C(PlayerShot* shot, Player* player) { Vec3f sp38; switch (shot->unk_5C) { case 0: - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), 1); - Matrix_RotateZ(gCalcMatrix, -((player->unk_0F8 + player->unk_0F0) * M_DTOR), 1); - Matrix_Translate(gCalcMatrix, player->unk_084, player->unk_080, 0.0f, 1); + Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -((player->unk_0F8 + player->unk_0F0) * M_DTOR), MTXF_APPLY); + Matrix_Translate(gCalcMatrix, player->unk_084, player->unk_080, 0.0f, MTXF_APPLY); sp5C.x = 0.0f; sp5C.y = 0.0f; sp5C.z = player->unk_0D0 + 200.0f; @@ -1605,9 +1609,9 @@ void func_beam_8003B55C(PlayerShot* shot, s32 index) { if ((gCamCount != 4) && (gCurrentLevel != LEVEL_AQUAS)) { if ((shot->playerNum == 0) && (gLaserStrength[0] != LASERS_SINGLE) && (gPlayer[0].form != FORM_LANDMASTER)) { - Matrix_RotateY(gCalcMatrix, shot->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, shot->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, shot->obj.rot.z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, shot->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, shot->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, shot->obj.rot.z * M_DTOR, MTXF_APPLY); sp44.y = sp44.z = 0.0f; sp44.x = 40.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); @@ -1708,8 +1712,8 @@ bool func_beam_8003BB4C(PlayerShot* shot) { } if (gVersusMode) { for (i = 0, player = gPlayer; i < gCamCount; i++, player++) { - if ((player->state_1C8 == PLAYERSTATE_1C8_3) && (player->unk_4DC == 0) && (player->form != FORM_ON_FOOT) && - (i != shot->playerNum) && (D_ctx_80177B00[i][shot->playerNum] == 0) && + if ((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (player->unk_4DC == 0) && + (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) && (fabsf(shot->obj.pos.z - player->unk_138) <= var_fa0)) { @@ -1773,17 +1777,17 @@ void func_beam_8003C008(PlayerShot* shot) { if (count != 0) { for (j = 0; j < count; j++, hitboxData += 6) { if (hitboxData[0] == HITBOX_ROTATED) { - Matrix_RotateZ(gCalcMatrix, -hitboxData[3] * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -hitboxData[1] * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -hitboxData[2] * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, -boss->obj.rot.z * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, -boss->obj.rot.x * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -boss->obj.rot.y * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, -hitboxData[3] * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -hitboxData[1] * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -hitboxData[2] * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -boss->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, -boss->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -boss->obj.rot.y * M_DTOR, MTXF_APPLY); hitboxData += 4; } else { - Matrix_RotateZ(gCalcMatrix, -boss->obj.rot.z * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -boss->obj.rot.x * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -boss->obj.rot.y * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, -boss->obj.rot.z * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -boss->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -boss->obj.rot.y * M_DTOR, MTXF_APPLY); } if ((j == var_s6) && (hitboxData[1] > -100.0f) && (hitboxData[3] > -100.0f)) { sp8C.x = shot->obj.pos.x - boss->obj.pos.x; @@ -1961,7 +1965,7 @@ void func_beam_8003C4D0(PlayerShot* shot, s32 damage) { } if (gVersusMode) { for (i = 0, player = gPlayer; i < gCamCount; i++, player++) { - if ((i != shot->playerNum) && (player->state_1C8 == PLAYERSTATE_1C8_3) && (player->unk_1F4 == 0)) { + if ((i != shot->playerNum) && (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (player->unk_1F4 == 0)) { sp68 = player->pos.x - shot->obj.pos.x; sp64 = player->pos.y - shot->obj.pos.y; sp60 = player->unk_138 - shot->obj.pos.z; @@ -2026,8 +2030,8 @@ void func_beam_8003CC08(PlayerShot* shot) { shot->obj.rot.y += 1.0f; Math_SmoothStepToF(&shot->unk_44, shot->unk_48, 0.05f, 1.5f, 0.001f); if ((shot->unk_64 > 0) && (shot->unk_64 < 30)) { - if (!gVersusMode && - ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_5))) { + if (!gVersusMode && ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || + (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN))) { test.x = gPlayer[0].pos.x - shot->obj.pos.x; test.y = gPlayer[0].pos.y - shot->obj.pos.y; test.z = gPlayer[0].unk_138 - shot->obj.pos.z; @@ -2091,7 +2095,7 @@ void func_beam_8003CF90(PlayerShot* shot) { } } for (i = 0, player = gPlayer; i < gCamCount; i++, player++) { - if (((player->state_1C8 == PLAYERSTATE_1C8_3) || (player->state_1C8 == PLAYERSTATE_1C8_5)) && + if (((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (player->state_1C8 == PLAYERSTATE_1C8_U_TURN)) && (D_ctx_80177B00[i][shot->playerNum] != 0)) { var_a3 = 1; D_ctx_80177B00[i][shot->playerNum] = 2; @@ -2141,8 +2145,8 @@ void func_beam_8003CF90(PlayerShot* shot) { shot->obj.rot.y = shot->unk_30; shot->obj.rot.x = shot->unk_2C; - Matrix_RotateY(gCalcMatrix, shot->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, shot->obj.rot.x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, shot->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, shot->obj.rot.x * M_DTOR, MTXF_APPLY); sp44.x = sp44.y = 0.0f; sp44.z = -(shot->unk_54 + 40.0f); Matrix_MultVec3f(gCalcMatrix, &sp44, &sp38); @@ -2253,7 +2257,7 @@ void func_beam_8003D854(PlayerShot* shot) { break; case PLAYERSHOT_0: case PLAYERSHOT_1: - if ((shot->unk_58 == 0) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2)) { + if ((shot->unk_58 == 0) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO)) { var_s5 = 4; } else { var_s5 = 3; diff --git a/src/engine/fox_bg.c b/src/engine/fox_bg.c index e40fcb1b..dc7dc243 100644 --- a/src/engine/fox_bg.c +++ b/src/engine/fox_bg.c @@ -262,7 +262,7 @@ void func_bg_8003E1E8(void) { sp11C = gCurrentLevel; Matrix_Push(&gGfxMatrix); if (D_ctx_80177C70 == 2) { - Matrix_Scale(gGfxMatrix, 1.2f, 1.2f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 1.2f, 1.2f, 1.0f, MTXF_APPLY); } switch (var_s0) { case LEVELTYPE_PLANET: @@ -272,14 +272,14 @@ void func_bg_8003E1E8(void) { case LEVEL_KATINA: case LEVEL_VENOM_2: case LEVEL_VERSUS: - sp134 = (gPlayer[gPlayerNum].unk_05C * -6000.0f) - (gPlayer[gPlayerNum].camEye.y * 0.4f); - sp13C = Math_ModF(Math_RadToDeg(gPlayer[gPlayerNum].unk_058) * (-7280.0f / 360.0f) * 5.0f, 7280.0f); - Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].unk_034 * M_DTOR, 1); - Matrix_Translate(gGfxMatrix, sp13C, -2000.0f + sp134, -6000.0f, 1); + sp134 = (gPlayer[gPlayerNum].camPitch * -6000.0f) - (gPlayer[gPlayerNum].cam.eye.y * 0.4f); + sp13C = Math_ModF(Math_RadToDeg(gPlayer[gPlayerNum].camYaw) * (-7280.0f / 360.0f) * 5.0f, 7280.0f); + Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sp13C, -2000.0f + sp134, -6000.0f, MTXF_APPLY); if (gCurrentLevel == LEVEL_FORTUNA) { - Matrix_Translate(gGfxMatrix, 0.0f, -2000.0f, 0, 1); + Matrix_Translate(gGfxMatrix, 0.0f, -2000.0f, 0, MTXF_APPLY); } else if (gCurrentLevel == LEVEL_KATINA) { - Matrix_Translate(gGfxMatrix, 0.0f, -2500.0f, 0, 1); + Matrix_Translate(gGfxMatrix, 0.0f, -2500.0f, 0, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); switch (gCurrentLevel) { @@ -302,7 +302,7 @@ void func_bg_8003E1E8(void) { gSPDisplayList(gMasterDisp++, D_VE2_600F670); break; } - Matrix_Translate(gGfxMatrix, 7280.0f, 0.0f, 0.0f, 1); + Matrix_Translate(gGfxMatrix, 7280.0f, 0.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); switch (gCurrentLevel) { case LEVEL_VERSUS: @@ -327,10 +327,10 @@ void func_bg_8003E1E8(void) { break; case LEVEL_CORNERIA: case LEVEL_VENOM_1: - sp134 = (gPlayer[gPlayerNum].unk_05C * -6000.0f) - (gPlayer[gPlayerNum].camEye.y * 0.6f); - sp13C = Math_ModF(Math_RadToDeg(gPlayer[gPlayerNum].unk_058) * (-7280.0f / 360.0f) * 5.0f, 7280.0f); - Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].unk_034 * M_DTOR, 1); - Matrix_Translate(gGfxMatrix, sp13C, -2000.0f + sp134, -6000.0f, 1); + sp134 = (gPlayer[gPlayerNum].camPitch * -6000.0f) - (gPlayer[gPlayerNum].cam.eye.y * 0.6f); + sp13C = Math_ModF(Math_RadToDeg(gPlayer[gPlayerNum].camYaw) * (-7280.0f / 360.0f) * 5.0f, 7280.0f); + Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sp13C, -2000.0f + sp134, -6000.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); switch (gCurrentLevel) { case LEVEL_CORNERIA: @@ -340,7 +340,7 @@ void func_bg_8003E1E8(void) { gSPDisplayList(gMasterDisp++, D_VE1_60046F0); break; } - Matrix_Translate(gGfxMatrix, 7280.0f, 0.0f, 0.0f, 1); + Matrix_Translate(gGfxMatrix, 7280.0f, 0.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); switch (gCurrentLevel) { case LEVEL_CORNERIA: @@ -354,8 +354,8 @@ void func_bg_8003E1E8(void) { case LEVEL_VENOM_ANDROSS: if (D_ctx_80177AB0 != 6) { if ((D_ctx_80177AB0 == 2) || (D_ctx_80177AB0 == 7)) { - Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].unk_034 * M_DTOR, 1); - Matrix_Translate(gGfxMatrix, 0.0f, -4000.0f, -7000.0f, 1); + Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, -4000.0f, -7000.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_VE2_600F670); } else if ((D_ctx_80177AB0 == 3) || (D_ctx_80177AB0 == 4)) { @@ -372,15 +372,15 @@ void func_bg_8003E1E8(void) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, (s32) D_bg_80161394, (s32) D_bg_80161394, (s32) D_bg_800C9C30); - sp134 = (gPlayer[gPlayerNum].unk_05C * -6000.0f) - (gPlayer[gPlayerNum].camEye.y * 0.4f); - sp13C = Math_ModF(Math_RadToDeg(gPlayer[gPlayerNum].unk_058) * (-7280.0f / 360.0f) * 5.0f, + sp134 = (gPlayer[gPlayerNum].camPitch * -6000.0f) - (gPlayer[gPlayerNum].cam.eye.y * 0.4f); + sp13C = Math_ModF(Math_RadToDeg(gPlayer[gPlayerNum].camYaw) * (-7280.0f / 360.0f) * 5.0f, 7280.0f); - Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].unk_034 * M_DTOR, 1); - Matrix_Translate(gGfxMatrix, sp13C, -2000.0f + sp134, -6000.0f, 1); - Matrix_Translate(gGfxMatrix, 0.0f, -2500.0f, 0.0f, 1); + Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sp13C, -2000.0f + sp134, -6000.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, -2500.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_VE2_60038E0); - Matrix_Translate(gGfxMatrix, 7280.0f, 0.0f, 0.0f, 1); + Matrix_Translate(gGfxMatrix, 7280.0f, 0.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_VE2_60038E0); } else { @@ -391,18 +391,19 @@ void func_bg_8003E1E8(void) { } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 255, 128, (s32) D_bg_800C9C30); } - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -290.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -290.0f, MTXF_APPLY); Matrix_Push(&gGfxMatrix); - Matrix_Scale(gGfxMatrix, 11.0f, 11.0f, 1.0f, 1); - Matrix_RotateZ(gGfxMatrix, (gPlayer[0].unk_034 + (gGameFrameCount * 1.5f)) * M_DTOR, 1); + Matrix_Scale(gGfxMatrix, 11.0f, 11.0f, 1.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, (gPlayer[0].camRoll + (gGameFrameCount * 1.5f)) * M_DTOR, + MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ANDROSS_C039208); Matrix_Pop(&gGfxMatrix); if (D_ctx_80177AB0 != 5) { Matrix_Push(&gGfxMatrix); - Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 1.0f, 1); - Matrix_RotateZ(gGfxMatrix, (gPlayer[0].unk_034 + (gGameFrameCount * -1.3f)) * M_DTOR, - 1); + Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 1.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, (gPlayer[0].camRoll + (gGameFrameCount * -1.3f)) * M_DTOR, + MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ANDROSS_C039208); Matrix_Pop(&gGfxMatrix); @@ -411,17 +412,17 @@ void func_bg_8003E1E8(void) { } break; case LEVEL_AQUAS: - if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2) { - sp13C = ((Math_RadToDeg(gPlayer[gPlayerNum].unk_058) - gPlayer[gPlayerNum].unk_114)); - sp134 = (gPlayer[gPlayerNum].unk_05C * -7000.0f) - (gPlayer[gPlayerNum].camEye.y * 0.6f); + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) { + sp13C = ((Math_RadToDeg(gPlayer[gPlayerNum].camYaw) - gPlayer[gPlayerNum].unk_114)); + sp134 = (gPlayer[gPlayerNum].camPitch * -7000.0f) - (gPlayer[gPlayerNum].cam.eye.y * 0.6f); sp13C = Math_ModF(sp13C * -40.44444f * 2.0f, 7280.0f); // close to 7280.0f / 180.0f RCP_SetupDL_17(); - Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].unk_034 * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, 1.5f, 1.0f, 1.0f, 1); + Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 1.5f, 1.0f, 1.0f, MTXF_APPLY); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, sp13C, sp134, -7000.0f, 1); + Matrix_Translate(gGfxMatrix, sp13C, sp134, -7000.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2) { + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) { gSPDisplayList(gMasterDisp++, D_AQ_601AFF0); } else { gSPDisplayList(gMasterDisp++, D_AQ_601C080); @@ -432,9 +433,9 @@ void func_bg_8003E1E8(void) { } else { sp13C = -1.0f; } - Matrix_Translate(gGfxMatrix, 7280.0f * sp13C, 0.0f, 0.0f, 1); + Matrix_Translate(gGfxMatrix, 7280.0f * sp13C, 0.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2) { + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) { gSPDisplayList(gMasterDisp++, D_AQ_601AFF0); } else { @@ -447,29 +448,29 @@ void func_bg_8003E1E8(void) { case LEVEL_ZONESS: case LEVEL_MACBETH: case LEVEL_TITANIA: - sp12C = Math_RadToDeg(gPlayer[gPlayerNum].unk_058) - gPlayer[gPlayerNum].unk_114; - sp134 = (gPlayer[gPlayerNum].unk_05C * -7000.0f) - (gPlayer[gPlayerNum].camEye.y * 0.6f); + sp12C = Math_RadToDeg(gPlayer[gPlayerNum].camYaw) - gPlayer[gPlayerNum].unk_114; + sp134 = (gPlayer[gPlayerNum].camPitch * -7000.0f) - (gPlayer[gPlayerNum].cam.eye.y * 0.6f); sp13C = sp12C * -40.44444f * 2.0f; // close to 7280.0f / 180.0f - if ((gCurrentLevel == LEVEL_TITANIA) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2) && + if ((gCurrentLevel == LEVEL_TITANIA) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && (gPlayer[0].unk_1D0 < 3)) { - D_bg_8015F968 += __sinf(gPlayer[0].unk_058) * 20.0f; + D_bg_8015F968 += __sinf(gPlayer[0].camYaw) * 20.0f; sp13C += D_bg_8015F968; } - if ((gCurrentLevel == LEVEL_SOLAR) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2) && - (gPlayer[0].unk_1D0 >= 2) && (gPlayer[0].camEye.z <= -1900.0f)) { - D_bg_8015F968 = __sinf(gPlayer[0].unk_05C) * 7000.0f; + if ((gCurrentLevel == LEVEL_SOLAR) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && + (gPlayer[0].unk_1D0 >= 2) && (gPlayer[0].cam.eye.z <= -1900.0f)) { + D_bg_8015F968 = __sinf(gPlayer[0].camPitch) * 7000.0f; sp134 -= fabsf(D_bg_8015F968); } sp13C = Math_ModF(sp13C, 7280.0f); RCP_SetupDL_17(); - Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].unk_034 * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, 1.5f, 1.0f, 1.0f, 1); + Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 1.5f, 1.0f, 1.0f, MTXF_APPLY); if ((gCurrentLevel == LEVEL_TITANIA) || (gCurrentLevel == LEVEL_ZONESS)) { - Matrix_Translate(gGfxMatrix, sp13C, -3000.0f + sp134, -7000.0f, 1); + Matrix_Translate(gGfxMatrix, sp13C, -3000.0f + sp134, -7000.0f, MTXF_APPLY); } else if (gCurrentLevel == LEVEL_SOLAR) { - Matrix_Translate(gGfxMatrix, sp13C, -3500.0f + sp134, -7000.0f, 1); + Matrix_Translate(gGfxMatrix, sp13C, -3500.0f + sp134, -7000.0f, MTXF_APPLY); } else if (gCurrentLevel == LEVEL_MACBETH) { - Matrix_Translate(gGfxMatrix, sp13C, -4000.0f + sp134, -7000.0f, 1); + Matrix_Translate(gGfxMatrix, sp13C, -4000.0f + sp134, -7000.0f, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); if (gCurrentLevel == LEVEL_TITANIA) { @@ -486,7 +487,7 @@ void func_bg_8003E1E8(void) { } else { sp13C = -1.0f; } - Matrix_Translate(gGfxMatrix, 7280.0f * sp13C, 0.0f, 0.0f, 1); + Matrix_Translate(gGfxMatrix, 7280.0f * sp13C, 0.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if (gCurrentLevel == LEVEL_TITANIA) { gSPDisplayList(gMasterDisp++, D_TI_6000A80); @@ -501,10 +502,10 @@ void func_bg_8003E1E8(void) { } break; case LEVELTYPE_SPACE: - if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_8) { + if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_ENTER_WARP_ZONE) { Matrix_Push(&gGfxMatrix); - sp12C = Math_RadToDeg(gPlayer[0].unk_058); - sp130 = Math_RadToDeg(gPlayer[0].unk_05C); + sp12C = Math_RadToDeg(gPlayer[0].camYaw); + sp130 = Math_RadToDeg(gPlayer[0].camPitch); if (((sp12C < 45.0f) || (sp12C > 315.0f)) && ((sp130 < 40.0f) || (sp130 > 325.0f))) { RCP_SetupDL_36(); sp138 = D_ctx_80178420; @@ -525,7 +526,7 @@ void func_bg_8003E1E8(void) { sp138 = Math_ModF(sp138 - 34.5f, 480.0f); sp134 = Math_ModF(sp134 + 19.0f, 360.0f); } else if (sp11C == LEVEL_BOLSE) { - if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7) || (gPlayer[0].unk_1D0 < 10)) { + if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) || (gPlayer[0].unk_1D0 < 10)) { sp134 = Math_ModF(sp134 + 360.0f - 100.0f, 360.0f); } } else { @@ -538,41 +539,43 @@ void func_bg_8003E1E8(void) { if ((sp130 > 180.0f) && (sp134 > 280.0f)) { sp134 = -(360.0f - sp134); } - Matrix_RotateZ(gGfxMatrix, D_ctx_80178428, 1); + Matrix_RotateZ(gGfxMatrix, D_ctx_80178428, MTXF_APPLY); switch (sp11C) { case LEVEL_WARP_ZONE: if ((s32) D_bg_8015F960 != 0) { RCP_SetupDL_62(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) D_bg_8015F960); - Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, 1); - Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.0f, 1); + Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.0f, MTXF_APPLY); Matrix_Push(&gGfxMatrix); - Matrix_RotateZ(gGfxMatrix, -(f32) gGameFrameCount * 10.0f * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, 1.07f, 0.93f, 1.0f, 1); - Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 10.0f * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, 1.07f, 0.93f, 1.0f, 1); + Matrix_RotateZ(gGfxMatrix, -(f32) gGameFrameCount * 10.0f * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 1.07f, 0.93f, 1.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 10.0f * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 1.07f, 0.93f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_WZ_7001540); Matrix_Pop(&gGfxMatrix); } break; case LEVEL_METEO: - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) && (gCsFrameCount > 260)) { - Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f) - 30.0f, -290.0f, 1); - Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 1.0f, 1); + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) && (gCsFrameCount > 260)) { + Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f) - 30.0f, -290.0f, + MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ME_600DDF0); } else if (D_ctx_80177D20 > 185668.0f) { - Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f) - 130.0f, -290.0f, 1); - Matrix_Scale(gGfxMatrix, 0.4f, 0.4f, 1.0f, 1); + Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f) - 130.0f, -290.0f, + MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.4f, 0.4f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ME_600DDF0); } break; case LEVEL_SECTOR_X: if (gOverlayStage == 0) { - Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, 1); - Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 1.0f, 1); + Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL_62(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 192); @@ -580,8 +583,8 @@ void func_bg_8003E1E8(void) { } break; case LEVEL_TRAINING: - Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, 1); - Matrix_Scale(gGfxMatrix, 0.2f, 0.2f, 1.0f, 1); + Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.2f, 0.2f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL_62(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); @@ -593,15 +596,15 @@ void func_bg_8003E1E8(void) { if (sp128 > 3.5f) { sp128 = 3.5f; } - if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) { + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) { sp128 = D_bg_8015F984; if (sp128 > 3.5f) { sp128 = 3.5f; } } sp128 = sp128; - Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, 1); - Matrix_Scale(gGfxMatrix, sp128 * 0.75, sp128 * 0.75f, 1.0f, 1); + Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, sp128 * 0.75, sp128 * 0.75f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_A6_601BB40); break; @@ -610,31 +613,31 @@ void func_bg_8003E1E8(void) { if ((gCsFrameCount > 400) && (gNextPlanetPath == 0)) { sp128 = 0.75f; } - Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, 1); - Matrix_Scale(gGfxMatrix, sp128, sp128, sp128, 1); + Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, sp128, sp128, sp128, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_FO_600B4B0); break; case LEVEL_BOLSE: sp128 = 1.0f; - if ((gCsFrameCount > 500) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7)) { + if ((gCsFrameCount > 500) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { sp128 = 1.3f; } - Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, 1); - Matrix_Scale(gGfxMatrix, sp128, sp128, sp128, 1); + Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, sp128, sp128, sp128, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_BO_600D190); break; case LEVEL_SECTOR_Z: - Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, 1); - Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, 1); - Matrix_RotateX(gGfxMatrix, M_PI / 2, 1); + Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_SZ_6002F80); break; case LEVEL_SECTOR_Y: - Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, 1); - Matrix_Scale(gGfxMatrix, 0.4f, 0.4f, 1.0f, 1); + Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.4f, 0.4f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL_62(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 192); @@ -657,9 +660,10 @@ void func_bg_8003E1E8(void) { *sp50 = RAND_FLOAT_SEEDED(480.0f) - 80.0f; *sp4C = RAND_FLOAT_SEEDED(360.0f) - 60.0f; Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, (*sp50 - 160.0f) * 10.0f, (*sp4C - 120.0f) * 10.0f, -5000.0f, 1); - Matrix_RotateZ(gGfxMatrix, sp48, 1); - Matrix_Scale(gGfxMatrix, 10.0f, 1.0f, -D_ctx_80178414, 1); + Matrix_Translate(gGfxMatrix, (*sp50 - 160.0f) * 10.0f, (*sp4C - 120.0f) * 10.0f, -5000.0f, + MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, sp48, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 10.0f, 1.0f, -D_ctx_80178414, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_edisplay_800CFD80); Matrix_Pop(&gGfxMatrix); @@ -689,21 +693,21 @@ void func_bg_80040450(void) { if (gPlayerFillScreenAlphas[gPlayerNum] > 300) { gPlayerFillScreenAlphas[gPlayerNum] = 0; } - if (((gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2)) || - (((gPlayer[gPlayerNum].state_1C8 == PLAYERSTATE_1C8_5) || (gLevelMode == LEVELMODE_ALL_RANGE) || - (gPlayer[gPlayerNum].state_1C8 == PLAYERSTATE_1C8_7)) && + if (((gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO)) || + (((gPlayer[gPlayerNum].state_1C8 == PLAYERSTATE_1C8_U_TURN) || (gLevelMode == LEVELMODE_ALL_RANGE) || + (gPlayer[gPlayerNum].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) && (gLevelType == LEVELTYPE_PLANET) && (gCurrentLevel != LEVEL_TITANIA) && (gCurrentLevel != LEVEL_AQUAS))) { gPlayerFillScreenReds[gPlayerNum] = 128; gPlayerFillScreenGreens[gPlayerNum] = 128; gPlayerFillScreenBlues[gPlayerNum] = 128; - sp44 = Math_RadToDeg(gPlayer[gPlayerNum].unk_058); - var_fa0 = Math_RadToDeg(gPlayer[gPlayerNum].unk_05C); + sp44 = Math_RadToDeg(gPlayer[gPlayerNum].camYaw); + var_fa0 = Math_RadToDeg(gPlayer[gPlayerNum].camPitch); if (var_fa0 > 180.0f) { var_fa0 -= 360.0f; } sp44 -= 135.0f; D_ctx_801783D0 = -sp44 * 3.2f; - D_ctx_801783D4 = ((-var_fa0 * 3.2f) + 130.0f) - ((gPlayer[gPlayerNum].camEye.y - 350.0f) * 0.015f); + D_ctx_801783D4 = ((-var_fa0 * 3.2f) + 130.0f) - ((gPlayer[gPlayerNum].cam.eye.y - 350.0f) * 0.015f); if (gCurrentLevel == LEVEL_KATINA) { D_ctx_801783D4 -= 80.0f; } @@ -720,8 +724,8 @@ void func_bg_80040450(void) { } if (gPlayerFillScreenAlphas[gPlayerNum] != 0) { Matrix_Push(&gGfxMatrix); - Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].unk_034 * M_DTOR, 1); - Matrix_Translate(gGfxMatrix, D_ctx_801783D0, D_ctx_801783D4, -200.0f, 1); + Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, D_ctx_801783D0, D_ctx_801783D4, -200.0f, MTXF_APPLY); RCP_SetupDL_62(); var_s1 = D_bg_800C9D94; var_s2 = D_bg_800C9DE4; @@ -735,7 +739,7 @@ void func_bg_80040450(void) { } for (i = 0; i < 5; i++, var_s1++, var_s2++, var_s3++, var_s4++) { Matrix_Push(&gGfxMatrix); - Matrix_Scale(gGfxMatrix, *var_s4, *var_s4, *var_s4, 1); + Matrix_Scale(gGfxMatrix, *var_s4, *var_s4, *var_s4, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, var_s1->r, var_s1->g, var_s1->b, *var_s2); gSPDisplayList(gMasterDisp++, *var_s3); @@ -767,8 +771,8 @@ void func_bg_80040954(void) { } var_fs2 *= D_bg_800C9E5C[gLevelType]; Matrix_Push(&gGfxMatrix); - Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].unk_034 * M_DTOR, 1); - Matrix_Translate(gGfxMatrix, D_ctx_801783D0, D_ctx_801783D4, -200.0f, 1); + Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, D_ctx_801783D0, D_ctx_801783D4, -200.0f, MTXF_APPLY); RCP_SetupDL_62(); temp_fs0 = D_ctx_801783D0 * -0.03f; temp_fs1 = D_ctx_801783D4 * 0.03f; @@ -786,10 +790,10 @@ void func_bg_80040954(void) { } for (i = 5; i < 13; i++, var_s1++, var_s4++, var_s5++, var_s6++, var_s7++) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, *var_s7 * temp_fs0, *var_s7 * -temp_fs1, 0.0f, 1); - Matrix_Scale(gGfxMatrix, *var_s6, *var_s6, *var_s6, 1); + Matrix_Translate(gGfxMatrix, *var_s7 * temp_fs0, *var_s7 * -temp_fs1, 0.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, *var_s6, *var_s6, *var_s6, MTXF_APPLY); if (((i == 5) || (i == 11)) && (gCurrentLevel != LEVEL_KATINA)) { - Matrix_RotateX(gGfxMatrix, M_PI / 2, 1); + Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); var_fv0 = *var_s4; @@ -814,7 +818,7 @@ void func_bg_80040CE4(void) { u16* sp1C4; Gfx* sp1C0; - if ((gCurrentLevel != LEVEL_VENOM_2) && ((gPlayer[0].camEye.y > 4000.0f) || (D_ctx_80177A98 == 0))) { + if ((gCurrentLevel != LEVEL_VENOM_2) && ((gPlayer[0].cam.eye.y > 4000.0f) || (D_ctx_80177A98 == 0))) { return; } if ((gCurrentLevel == LEVEL_BOLSE) && (D_bg_800C9C34 != 0)) { @@ -842,10 +846,10 @@ void func_bg_80040CE4(void) { sp1B4.x = 0; sp1B4.y = 0; sp1B4.z = -5500.0f; - Matrix_RotateY(gCalcMatrix, -gPlayer[gPlayerNum].unk_058, 0); + Matrix_RotateY(gCalcMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_NEW); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp1B4, &sp1A8); - temp_fv1 = gPlayer[gPlayerNum].camEye.x + sp1A8.x; - temp_fa0 = gPlayer[gPlayerNum].camEye.z + sp1A8.z; + temp_fv1 = gPlayer[gPlayerNum].cam.eye.x + sp1A8.x; + temp_fa0 = gPlayer[gPlayerNum].cam.eye.z + sp1A8.z; if (temp_fv1 > 6000.0f) { gPlayer[gPlayerNum].unk_0AC = 12000.0f; } @@ -872,9 +876,9 @@ void func_bg_80040CE4(void) { } } Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, gPlayer[gPlayerNum].unk_0AC, -3.0f + gCameraShakeY, sp1D4, 1); + Matrix_Translate(gGfxMatrix, gPlayer[gPlayerNum].unk_0AC, -3.0f + gCameraShakeY, sp1D4, MTXF_APPLY); if (D_ctx_80177C70 == 2) { - Matrix_Scale(gGfxMatrix, 1.2f, 1.2f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 1.2f, 1.2f, 1.0f, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); switch (gCurrentLevel) { @@ -907,13 +911,13 @@ void func_bg_80040CE4(void) { break; } Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -3000.0f, 1); - Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.5f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -3000.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_601B640); Matrix_Pop(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 3000.0f, 1); - Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.5f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 3000.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_601B640); } else { @@ -921,7 +925,7 @@ void func_bg_80040CE4(void) { gBgColor = 0x845; // 8, 8, 32 for (i = 0; i < 4; i++) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_bg_800C9E64[i], 0.0f, D_bg_800C9E74[i], 1); + Matrix_Translate(gGfxMatrix, D_bg_800C9E64[i], 0.0f, D_bg_800C9E74[i], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_601EAA0); Matrix_Pop(&gGfxMatrix); @@ -953,14 +957,14 @@ void func_bg_80040CE4(void) { gDPSetupTile(gMasterDisp++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32, temp_fv0, temp_s0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -3000.0f, 1); - Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.5f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -3000.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, sp1C0); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 3000.0f, 1); - Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.5f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 3000.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, sp1C0); Matrix_Pop(&gGfxMatrix); @@ -972,23 +976,23 @@ void func_bg_80040CE4(void) { D_ctx_80177CE8 -= 290.0f; } Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -3000.0f + D_ctx_80177CE8, 1); - Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.5f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -3000.0f + D_ctx_80177CE8, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_TR_6005880); Matrix_Pop(&gGfxMatrix); if (1) {} Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 3000.0f + D_ctx_80177CE8, 1); - Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.5f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 3000.0f + D_ctx_80177CE8, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_TR_6005880); Matrix_Pop(&gGfxMatrix); } else { for (i = 0; i < 4; i++) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_bg_800C9E64[i], 0.0f, D_bg_800C9E74[i], 1); - Matrix_Scale(gGfxMatrix, 1.5f, 1.0f, 1.0f, 1); + Matrix_Translate(gGfxMatrix, D_bg_800C9E64[i], 0.0f, D_bg_800C9E74[i], MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 1.5f, 1.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_TR_6005880); Matrix_Pop(&gGfxMatrix); @@ -1010,14 +1014,14 @@ void func_bg_80040CE4(void) { G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -3000.0f, 1); - Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.5f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -3000.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, sp1C0); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 3000.0f, 1); - Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.5f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 3000.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, sp1C0); Matrix_Pop(&gGfxMatrix); @@ -1035,22 +1039,22 @@ void func_bg_80040CE4(void) { } else { RCP_SetupDL(&gMasterDisp, 0x25); } - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2) && (gPlayer[0].unk_1D0 < 2)) { + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && (gPlayer[0].unk_1D0 < 2)) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); - } else if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) { + } else if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, D_bg_8015F974, D_bg_8015F978, D_bg_8015F97C, D_bg_8015F980); } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) D_AQ_801C4188); } Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, D_bg_8015F970, -3000.0f, 1); - Matrix_Scale(gGfxMatrix, 2.0f, 1.0f, 0.5f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, D_bg_8015F970, -3000.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 2.0f, 1.0f, 0.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_AQ_602AC40); Matrix_Pop(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, D_bg_8015F970, 3000.0f, 1); - Matrix_Scale(gGfxMatrix, 2.0f, 1.0f, 0.5f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, D_bg_8015F970, 3000.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 2.0f, 1.0f, 0.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_AQ_602AC40); } @@ -1066,7 +1070,7 @@ void func_bg_80040CE4(void) { } for (i = 0; i < 4; i++) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_bg_800C9E64[i], 0.0f, D_bg_800C9E74[i], 1); + Matrix_Translate(gGfxMatrix, D_bg_800C9E64[i], 0.0f, D_bg_800C9E74[i], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if (gCurrentLevel == LEVEL_FORTUNA) { gSPDisplayList(gMasterDisp++, D_FO_6001360); @@ -1088,7 +1092,7 @@ void func_bg_80040CE4(void) { } for (i = 0; i < 4; i++) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_bg_800C9E64[i], 0.0f, D_bg_800C9E74[i], 1); + Matrix_Translate(gGfxMatrix, D_bg_800C9E64[i], 0.0f, D_bg_800C9E74[i], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if (gVersusStage == VS_STAGE_CORNERIA) { gSPDisplayList(gMasterDisp++, D_versus_3018800); @@ -1100,8 +1104,8 @@ void func_bg_80040CE4(void) { break; case LEVEL_SOLAR: RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -2000.0f, 1); - Matrix_Scale(gGfxMatrix, 3.0f, 2.0f, 3.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -2000.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 3.0f, 2.0f, 3.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if ((gGameFrameCount % 2) != 0) { gSPDisplayList(gMasterDisp++, D_SO_60005B0); @@ -1111,8 +1115,8 @@ void func_bg_80040CE4(void) { break; case LEVEL_ZONESS: RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -1500.0f, 1); - Matrix_Scale(gGfxMatrix, 3.0f, 2.0f, 3.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -1500.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 3.0f, 2.0f, 3.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if ((gGameFrameCount % 2) != 0) { gSPDisplayList(gMasterDisp++, D_ZO_6008830); @@ -1128,15 +1132,15 @@ void func_bg_80042D38(void) { f32 xEye; f32 zEye; - if (!gPlayer[gPlayerNum].camEye.x) {} - if (!gPlayer[gPlayerNum].camEye.y) {} // all sorts of fake + if (!gPlayer[gPlayerNum].cam.eye.x) {} + if (!gPlayer[gPlayerNum].cam.eye.y) {} // all sorts of fake Matrix_Push(&gGfxMatrix); - xEye = gPlayer[gPlayerNum].camEye.x; + xEye = gPlayer[gPlayerNum].cam.eye.x; if (0) {} - zEye = gPlayer[gPlayerNum].camEye.z; - Matrix_Translate(gGfxMatrix, xEye, 2.0f + gCameraShakeY, zEye, 1); - Matrix_Scale(gGfxMatrix, 1.5f, 1.0f, 1.0f, 1); + zEye = gPlayer[gPlayerNum].cam.eye.z; + Matrix_Translate(gGfxMatrix, xEye, 2.0f + gCameraShakeY, zEye, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 1.5f, 1.0f, 1.0f, MTXF_APPLY); RCP_SetupDL_37(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 125); Matrix_SetGfxMtx(&gMasterDisp); diff --git a/src/engine/fox_boss.c b/src/engine/fox_boss.c index 9ba48bab..7244529d 100644 --- a/src/engine/fox_boss.c +++ b/src/engine/fox_boss.c @@ -108,7 +108,7 @@ void func_boss_8004319C(Player* player, f32 arg1, f32 arg2, f32 arg3) { D_ctx_80178440 = arg1; D_ctx_80178444 = arg2; - player->state_1C8 = PLAYERSTATE_1C8_7; + player->state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; player->unk_1D0 = 10; player->timer_1F8 = 50; player->timer_1FC = 50; diff --git a/src/engine/fox_context.c b/src/engine/fox_context.c index 06f607d1..c42f9adf 100644 --- a/src/engine/fox_context.c +++ b/src/engine/fox_context.c @@ -164,7 +164,7 @@ f32 D_ctx_80178470[3]; f32 gCameraShakeY; s32 gCameraShake; s32 D_ctx_80178484; -bool D_ctx_80178488; +bool gLoadLevelObjects; UNK_TYPE F_8017848C; UNK_TYPE F_80178490; s32 D_ctx_80178494; diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index fcd01d5e..0d8e55ff 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -183,7 +183,7 @@ void func_demo_80048CC4(Actor* actor, s32 arg1) { } } -void func_demo_80048E40(Player* player) { +void Cutscene_WarpZoneComplete(Player* player) { Vec3f sp5C; Vec3f sp50; s32 pad[2]; @@ -198,7 +198,7 @@ void func_demo_80048E40(Player* player) { Math_SmoothStepToF(&player->unk_0E8, 0.0f, 0.1f, 3.0f, 0.0f); Math_SmoothStepToF(&player->unk_0EC, 0.0f, 0.1f, 3.0f, 0.0f); Math_SmoothStepToF(&player->unk_08C, 0.0f, 0.1f, 3.0f, 0.0f); - Math_SmoothStepToF(&player->unk_034, 0.0f, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f); Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 20.0f, 0.0f); Math_SmoothStepToF(&player->unk_110, 0.0f, 0.1f, 3.0f, 0.0f); @@ -210,7 +210,7 @@ void func_demo_80048E40(Player* player) { D_ctx_80177A48[0] = 0.0f; D_ctx_80177A48[1] = 0.0f; D_ctx_80177A48[2] = 0.0f; - player->wings.unk_2C = 1; + player->wings.modelId = 1; gCsFrameCount = 0; /* fallthrough */ case 1: @@ -218,8 +218,8 @@ void func_demo_80048E40(Player* player) { Math_SmoothStepToF(&D_ctx_80177A48[2], 1.2f, 0.1f, 0.01f, 0.0f); Math_SmoothStepToF(&D_ctx_80177A48[0], 0.1f, 0.1f, 0.002f, 0.0f); Math_SmoothStepToF(&player->unk_0D0, 0.0f, 1.0f, 0.5f, 0.0f); - Matrix_RotateX(gCalcMatrix, -5.0f * M_DTOR, 0); - Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, 1); + Matrix_RotateX(gCalcMatrix, -5.0f * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, MTXF_APPLY); sp5C.x = 0.0f; sp5C.y = 0.0f; sp5C.z = 300.0f; @@ -288,7 +288,7 @@ void func_demo_80048E40(Player* player) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; gFillScreenAlphaStep = 8; if (gFillScreenAlpha == 255) { - player->state_1C8 = PLAYERSTATE_1C8_6; + player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; D_ctx_8017837C = 4; if (gCurrentLevel == LEVEL_METEO) { @@ -308,14 +308,14 @@ void func_demo_80048E40(Player* player) { break; } - Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0); - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -((player->unk_0E4 + player->unk_4D8) * M_DTOR), 1); + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0); + Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); sp5C.x = 0.0f; sp5C.y = 0.0f; @@ -369,8 +369,8 @@ void func_demo_80049630(Actor* actor) { } break; } - Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -(actor->unk_0F4.x * M_DTOR), 1); + Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(actor->unk_0F4.x * M_DTOR), MTXF_APPLY); sp3C.x = 0.0f; sp3C.y = 0.0f; @@ -445,7 +445,7 @@ void func_demo_80049B44(void) { } } -void func_demo_80049C0C(Player* player) { +void Cutscene_EnterWarpZone(Player* player) { s32 var_v0; s32 pad[4]; @@ -468,10 +468,10 @@ void func_demo_80049C0C(Player* player) { Math_SmoothStepToF(&player->unk_0E8, 0.0f, 0.1f, 5.0f, 0.0f); Math_SmoothStepToF(&player->pos.x, 0.0f, 0.1f, 50.0f, 0.0f); Math_SmoothStepToF(&player->pos.y, 0.0f, 0.1f, 50.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.x, 0.0f, 0.1f, 50.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.y, 0.0f, 0.1f, 50.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.x, 0.0f, 0.1f, 50.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.y, 0.0f, 0.1f, 50.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.x, 0.0f, 0.1f, 50.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.y, 0.0f, 0.1f, 50.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.x, 0.0f, 0.1f, 50.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.y, 0.0f, 0.1f, 50.0f, 0.0f); Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 20.0f, 0.0f); switch (player->unk_1D0) { @@ -480,7 +480,7 @@ void func_demo_80049C0C(Player* player) { D_ctx_80178414 = 100.0f; player->unk_1D0 = 1; D_ctx_80178410 = 1; - D_ctx_80178488 = 0; + gLoadLevelObjects = 0; player->vel.x = 0.0f; player->vel.y = 0.0f; player->vel.z = -500.0f; @@ -502,7 +502,7 @@ void func_demo_80049C0C(Player* player) { case 1: Math_SmoothStepToF(&D_ctx_801779A8[player->num], 100.0f, 1.0f, 4.0f, 0.0f); - Math_SmoothStepToF(&player->unk_034, 0.0f, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f); D_ctx_80178414 *= 1.05f; if (player->timer_1F8 == 0) { player->unk_1D0 = 2; @@ -568,7 +568,7 @@ void func_demo_80049C0C(Player* player) { case 4: Math_SmoothStepToF(&D_ctx_801779A8[player->num], 100.0f, 1.0f, 3.0f, 0.0f); - player->unk_034 -= 0.5f; + player->camRoll -= 0.5f; if (player->timer_1F8 == 0) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; gFillScreenAlphaTarget = 255; @@ -579,7 +579,7 @@ void func_demo_80049C0C(Player* player) { player->timer_1F8 = 10; player->unk_08C = -10000.0f; player->unk_0AC = player->unk_0B8 = player->unk_0B0 = player->unk_0BC = player->pos.x = - player->pos.y = player->pos.z = player->unk_130 = player->unk_034 = player->unk_138 = + player->pos.y = player->pos.z = player->unk_130 = player->camRoll = player->unk_138 = player->vel.z = player->unk_144 = D_ctx_80177D20 = player->unk_144 = D_ctx_80177CB0 = D_ctx_80177D20 = 0.0f; @@ -623,14 +623,14 @@ void func_demo_80049C0C(Player* player) { if (player->timer_1F8 == 0) { D_bg_8015F960 = 0.0f; D_ctx_80178414 = 0.0f; - player->state_1C8 = PLAYERSTATE_1C8_3; + player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_014 = 0.0f; player->unk_018 = 0.0f; D_ctx_801782B8 = 0; - D_ctx_80178488 = 1; + gLoadLevelObjects = 1; } - Math_SmoothStepToF(&player->camEye.y, (player->pos.y * player->unk_148) + 50.0f, 0.2f, 15.0f, 0.01f); - Math_SmoothStepToF(&player->camAt.y, (player->pos.y * player->unk_14C) + 20.0f, 0.2f, 15.0f, 0.01f); + Math_SmoothStepToF(&player->cam.eye.y, (player->pos.y * player->unk_148) + 50.0f, 0.2f, 15.0f, 0.01f); + Math_SmoothStepToF(&player->cam.at.y, (player->pos.y * player->unk_14C) + 20.0f, 0.2f, 15.0f, 0.01f); break; default: @@ -638,7 +638,7 @@ void func_demo_80049C0C(Player* player) { } } -void func_demo_8004A52C(Player* player) { +void Cutscene_LevelStart(Player* player) { gCsFrameCount += 1; if (gLevelMode == LEVELMODE_ON_RAILS) { switch (gCurrentLevel) { @@ -694,7 +694,7 @@ void func_demo_8004A52C(Player* player) { } switch (gCurrentLevel) { case LEVEL_FORTUNA: - func_360_8002ED60(player); + AllRange_FortunaIntro(player); func_play_800AA800(player); break; @@ -748,8 +748,8 @@ void func_demo_8004A888(Effect* effect) { Vec3f sp2C; Vec3f sp20; - Matrix_RotateY(gCalcMatrix, (gPlayer[0].unk_0E8 + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -(gPlayer[0].unk_0E4 * M_DTOR), 1); + Matrix_RotateY(gCalcMatrix, (gPlayer[0].unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(gPlayer[0].unk_0E4 * M_DTOR), MTXF_APPLY); Effect_Initialize(effect); effect->obj.status = OBJ_INIT; @@ -795,7 +795,7 @@ void func_demo_8004AA84(void) { } } -void func_demo_8004AAF4(Player* player) { +void Cutscene_AllRangeMode(Player* player) { s32 pad; Vec3f sp70; Vec3f sp64; @@ -832,7 +832,7 @@ void func_demo_8004AAF4(Player* player) { Math_SmoothStepToF(&player->unk_0E8, 0.0f, 0.1f, 5.0f, 0.0f); Math_SmoothStepToF(&player->unk_0EC, 0.0f, 0.1f, 1.0f, 0.0f); Math_SmoothStepToF(&player->unk_12C, 0.0f, 0.1f, 5.0f, 0.0f); - Math_SmoothStepToF(&player->unk_034, 0.0f, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f); Math_SmoothStepToF(&player->unk_110, 0.0f, 0.1f, 3.0f, 0.0f); Math_SmoothStepToF(&player->unk_08C, 0.0f, 0.1f, 3.0f, 0.0f); @@ -843,7 +843,7 @@ void func_demo_8004AAF4(Player* player) { D_ctx_80177A48[1] = 0.0f; D_ctx_80177A48[2] = 60.0f; D_ctx_80177A48[3] = 0.0f; - player->wings.unk_2C = 1; + player->wings.modelId = 1; player->unk_1D0++; gCsFrameCount = 0; /* fallthrough */ @@ -873,7 +873,7 @@ void func_demo_8004AAF4(Player* player) { } if (D_ctx_80177A48[1] > 350.0f) { - player->state_1C8 = PLAYERSTATE_1C8_3; + player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_014 = 0.0f; player->unk_018 = 0.1f; player->unk_194 = 10.0f; @@ -898,8 +898,8 @@ void func_demo_8004AAF4(Player* player) { } } - Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, D_ctx_80177A48[2] * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, D_ctx_80177A48[2] * M_DTOR, MTXF_APPLY); sp70.x = 0.0f; sp70.y = 0.0f; @@ -911,17 +911,17 @@ void func_demo_8004AAF4(Player* player) { sp64.x *= -1.0f; } Math_SmoothStepToF(&D_ctx_80177A48[0], 0.1f, 1.0f, 0.005f, 0.0f); - Math_SmoothStepToF(&player->camEye.x, player->pos.x + sp64.x, D_ctx_80177A48[0], 500.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.y, player->pos.y + sp64.y, D_ctx_80177A48[0], 500.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.z, player->unk_138 + D_ctx_80177D20 + sp64.z, D_ctx_80177A48[0], 500.0f, + Math_SmoothStepToF(&player->cam.eye.x, player->pos.x + sp64.x, D_ctx_80177A48[0], 500.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.y, player->pos.y + sp64.y, D_ctx_80177A48[0], 500.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.z, player->unk_138 + D_ctx_80177D20 + sp64.z, D_ctx_80177A48[0], 500.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.x, player->pos.x, D_ctx_80177A48[0], 500.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.y, player->pos.y, D_ctx_80177A48[0], 500.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.z, player->unk_138 + D_ctx_80177D20, D_ctx_80177A48[0], 500.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.x, player->pos.x, D_ctx_80177A48[0], 500.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.y, player->pos.y, D_ctx_80177A48[0], 500.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.z, player->unk_138 + D_ctx_80177D20, D_ctx_80177A48[0], 500.0f, 0.0f); break; } - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), 1); + Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), MTXF_APPLY); sp70.x = 0.0f; sp70.y = 0.0f; @@ -936,8 +936,8 @@ void func_demo_8004AAF4(Player* player) { player->pos.y += player->vel.y; player->pos.z += player->vel.z; player->unk_138 = player->pos.z + player->unk_08C; - player->camAt.z += player->vel.z; - player->camEye.z += player->vel.z; + player->cam.at.z += player->vel.z; + player->cam.eye.z += player->vel.z; player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; player->unk_088 += 10.0f; @@ -948,7 +948,7 @@ void func_demo_8004AAF4(Player* player) { func_play_800AA800(player); } -void func_demo_8004B368(Player* player) { +void Cutscene_CoComplete2(Player* player) { s32 pad[5]; Vec3f sp78; Vec3f sp6C; @@ -959,7 +959,7 @@ void func_demo_8004B368(Player* player) { player->flags_228 = 0; - Math_SmoothStepToF(&player->unk_034, 0.0f, 0.1f, 5.0f, 0.01f); + Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 5.0f, 0.01f); switch (player->unk_1D0) { case 10: @@ -972,19 +972,19 @@ void func_demo_8004B368(Player* player) { player->unk_130 = 0.0f; player->unk_12C = 0.0f; player->unk_110 = 0.0f; - player->wings.unk_2C = 1; + player->wings.modelId = 1; player->unk_0D0 = 40.0f; /* fallthrough */ case 11: D_ctx_80177A48[0] = 0.0f; Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 1.0f, 5.0f, 0.0f); - player->camAt.x += (D_ctx_80178440 - player->camAt.x) * 0.01f; - player->camAt.y += (D_ctx_80178444 - player->camAt.y) * 0.01f; - player->camAt.z += (D_ctx_80178448 - player->camAt.z) * 0.01f; - player->camEye.x += ((player->camAt.x + (500.0f * player->unk_004)) - player->camEye.x) * 0.01f; - player->camEye.y += ((player->camAt.y + 500.0f) - player->camEye.y) * 0.01f; - player->camEye.z += ((D_ctx_80178448 + (2000.0f * D_ctx_80177950)) - player->camEye.z) * 0.01f; + player->cam.at.x += (D_ctx_80178440 - player->cam.at.x) * 0.01f; + player->cam.at.y += (D_ctx_80178444 - player->cam.at.y) * 0.01f; + player->cam.at.z += (D_ctx_80178448 - player->cam.at.z) * 0.01f; + player->cam.eye.x += ((player->cam.at.x + (500.0f * player->unk_004)) - player->cam.eye.x) * 0.01f; + player->cam.eye.y += ((player->cam.at.y + 500.0f) - player->cam.eye.y) * 0.01f; + player->cam.eye.z += ((D_ctx_80178448 + (2000.0f * D_ctx_80177950)) - player->cam.eye.z) * 0.01f; if (player->timer_1FC > 25) { D_ctx_80177A48[2] += 1.5f * player->unk_004; @@ -1004,25 +1004,25 @@ void func_demo_8004B368(Player* player) { Math_SmoothStepToF(&player->unk_0E8, 0.0f, 0.1f, 3.0f, 0.1f); } else { Math_SmoothStepToF(&player->unk_0E8, 180.0f, 0.1f, 3.0f, 0.1f); - Math_SmoothStepToF(&player->pos.x, player->camEye.x, 1.0f, 30.0f, 0.0f); + Math_SmoothStepToF(&player->pos.x, player->cam.eye.x, 1.0f, 30.0f, 0.0f); D_ctx_80177A48[2] = 0.0f; } player->pos.x += D_ctx_80177A48[2]; Math_SmoothStepToF(&player->unk_0E4, 0.0f, 0.1f, 3.0f, 0.1f); - Math_SmoothStepToF(&player->pos.y, player->camEye.y + 5.0f, 0.1f, 1.0f, 0.0f); + Math_SmoothStepToF(&player->pos.y, player->cam.eye.y + 5.0f, 0.1f, 1.0f, 0.0f); if (player->timer_1F8 == 0) { player->unk_1D0 = 0; player->timer_1F8 = 120; player->timer_1FC = 20; D_ctx_80177A48[0] = 0.001f; - gCsCamEyeX = player->camEye.x; - gCsCamEyeY = player->camEye.y; - gCsCamEyeZ = player->camEye.z; - gCsCamAtX = player->camAt.x; - gCsCamAtY = player->camAt.y; - gCsCamAtZ = player->camAt.z; + gCsCamEyeX = player->cam.eye.x; + gCsCamEyeY = player->cam.eye.y; + gCsCamEyeZ = player->cam.eye.z; + gCsCamAtX = player->cam.at.x; + gCsCamAtY = player->cam.at.y; + gCsCamAtZ = player->cam.at.z; } break; @@ -1037,9 +1037,9 @@ void func_demo_8004B368(Player* player) { Math_SmoothStepToF(&D_ctx_80177A48[0], 0.05f, 0.1f, 0.0005f, 0.0f); } - Math_SmoothStepToF(&player->pos.x, player->camEye.x, 0.1f, 10.0f, 0.0f); - gCsCamEyeY += ((player->camAt.y + 500.0f) - player->camEye.y) * 0.01f; - player->camEye.y = gCsCamEyeY; + Math_SmoothStepToF(&player->pos.x, player->cam.eye.x, 0.1f, 10.0f, 0.0f); + gCsCamEyeY += ((player->cam.at.y + 500.0f) - player->cam.eye.y) * 0.01f; + player->cam.eye.y = gCsCamEyeY; var_fa1 = player->unk_004 * 190.0f; if ((D_ctx_80177950 > 0.0f) && (player->unk_004 > 0.0f)) { @@ -1059,7 +1059,7 @@ void func_demo_8004B368(Player* player) { } player->vel.y = 0.0f; - Math_SmoothStepToF(&player->pos.y, player->camEye.y + 5.0f, 0.1f, 4.0f, 0.0f); + Math_SmoothStepToF(&player->pos.y, player->cam.eye.y + 5.0f, 0.1f, 4.0f, 0.0f); if (player->timer_1F8 < 40) { Math_SmoothStepToF(&player->unk_0EC, player->unk_004 * 180.0f, 0.1f, 1.5f, 0.0f); @@ -1088,9 +1088,9 @@ void func_demo_8004B368(Player* player) { Math_SmoothStepToF(&gCsCamAtX, player->pos.x, D_ctx_80177A48[0], 50000.0f, 0.0f); Math_SmoothStepToF(&gCsCamAtY, player->pos.y, D_ctx_80177A48[0], 50000.0f, 0.0f); Math_SmoothStepToF(&gCsCamAtZ, player->unk_138 + D_ctx_80177D20 + 30.0f, D_ctx_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->pos.y, player->camEye.y + 5.0f, 0.1f, 4.0f, 0.0f); + Math_SmoothStepToF(&player->pos.y, player->cam.eye.y + 5.0f, 0.1f, 4.0f, 0.0f); Math_SmoothStepToF(&player->unk_0E4, 20.0f, 0.1f, 0.2f, 0.01f); - Math_SmoothStepToF(&player->pos.x, player->camEye.x, 0.1f, 2.0f, 0.0f); + Math_SmoothStepToF(&player->pos.x, player->cam.eye.x, 0.1f, 2.0f, 0.0f); if (player->timer_1F8 <= 110) { Math_SmoothStepToF(&player->unk_0EC, player->unk_004 * 360.0f, 0.1f, 2.5f, 0.0f); @@ -1114,9 +1114,9 @@ void func_demo_8004B368(Player* player) { case 2: player->pos.y += 5.0f; - Matrix_RotateY(gCalcMatrix, ((player->unk_0E8 + 180.0f) + D_ctx_80178418) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), 1); - Matrix_RotateZ(gCalcMatrix, -((player->unk_0F8 + player->unk_0F0) * M_DTOR), 1); + Matrix_RotateY(gCalcMatrix, ((player->unk_0E8 + 180.0f) + D_ctx_80178418) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -((player->unk_0F8 + player->unk_0F0) * M_DTOR), MTXF_APPLY); sp78.x = 0; sp78.y = 70.0f; @@ -1172,9 +1172,9 @@ void func_demo_8004B368(Player* player) { gGroundType = GROUNDTYPE_GRASS; } - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), 1); - Matrix_RotateZ(gCalcMatrix, -((player->unk_0F8 + player->unk_0F0) * M_DTOR), 1); + Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -((player->unk_0F8 + player->unk_0F0) * M_DTOR), MTXF_APPLY); if ((D_ctx_80178418 > 70.0f) && (D_ctx_80178418 < 280.0f)) { func_demo_8004AA84(); @@ -1286,7 +1286,7 @@ void func_demo_8004B368(Player* player) { gCsCamAtZ += D_ctx_80177A48[9]; player->unk_234 = 0; if (player->timer_1F8 == 0) { - player->state_1C8 = PLAYERSTATE_1C8_6; + player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; D_ctx_8017837C = 4; Audio_FadeOutAll(10); @@ -1313,8 +1313,8 @@ void func_demo_8004B368(Player* player) { break; } - Matrix_RotateY(gCalcMatrix, ((player->unk_114 + player->unk_0E8) + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4) * M_DTOR), 1); + Matrix_RotateY(gCalcMatrix, ((player->unk_114 + player->unk_0E8) + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4) * M_DTOR), MTXF_APPLY); sp60.x = 0.0f; sp60.y = 0.0f; @@ -1333,12 +1333,12 @@ void func_demo_8004B368(Player* player) { player->unk_0F8 = player->unk_0EC; player->unk_138 = player->pos.z; - Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0.f); - Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0.f); - Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0.f); + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0.f); + Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0.f); + Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0.f); player->unk_088 += 10.0f; player->unk_080 = (-SIN_DEG(player->unk_088)) * 0.3f; @@ -1346,11 +1346,11 @@ void func_demo_8004B368(Player* player) { player->unk_0F0 = SIN_DEG(player->unk_0F4); } -void func_demo_8004C90C(Player* player) { - OvlI4_CallFunction(90, player); +void Cutscene_FortunaComplete(Player* player) { + OvlI4_CallFunction(OVLCALL_FO_CS_COMPLETE, player); } -void func_demo_8004C930(Player* player) { +void Cutscene_LevelComplete(Player* player) { s32 sp24; s32 sp20; s32 btn; @@ -1365,12 +1365,12 @@ void func_demo_8004C930(Player* player) { if (gLevelStage == 0) { SectorX_80194728(player); } else { - func_demo_80048E40(player); + Cutscene_WarpZoneComplete(player); } } else if (gCurrentLevel == LEVEL_AREA_6) { Area6_8018ED78(player); } else if (gCurrentLevel == LEVEL_FORTUNA) { - func_demo_8004C90C(player); + Cutscene_FortunaComplete(player); func_play_800AA800(player); } else if (gCurrentLevel == LEVEL_BOLSE) { Bolse_8018F94C(player); @@ -1396,7 +1396,7 @@ void func_demo_8004C930(Player* player) { if (gLevelStage == 0) { Meteo_8018E084(player); } else { - func_demo_80048E40(player); + Cutscene_WarpZoneComplete(player); } } else if ((gCurrentLevel == LEVEL_CORNERIA) && (gLevelMode == LEVELMODE_ALL_RANGE)) { Corneria_80191160(player); @@ -1405,7 +1405,7 @@ void func_demo_8004C930(Player* player) { if (gCsFrameCount == 170) { AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); } - func_demo_8004B368(player); + Cutscene_CoComplete2(player); func_play_800AA800(player); } func_play_800B2130(player); @@ -1441,7 +1441,7 @@ void func_demo_8004C930(Player* player) { } } -void func_demo_8004CCC0(Player* player) { +void Cutscene_UTurn(Player* player) { Vec3f sp58; PosRot sp50; @@ -1449,7 +1449,7 @@ void func_demo_8004CCC0(Player* player) { Math_SmoothStepToF(&player->unk_0EC, 0.0f, 0.1f, 5.0f, 0.0f); Math_SmoothStepToF(&player->unk_0E8, 0.0f, 0.1f, 5.0f, 0.0f); Math_SmoothStepToF(&player->unk_0E4, 0.0f, 0.1f, 5.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.y, player->pos.y - 20.0f, 0.2f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.y, player->pos.y - 20.0f, 0.2f, 100.0f, 0.0f); sp50.rot.z = player->unk_0D0; sp58.x = Math_RadToDeg(Math_Atan2F(player->pos.x, player->unk_138)); @@ -1483,8 +1483,8 @@ void func_demo_8004CCC0(Player* player) { player->timer_1F8 = 80; } } - player->camEye.x += player->vel.x * 0.2f; - player->camEye.z += player->vel.z * 0.2f; + player->cam.eye.x += player->vel.x * 0.2f; + player->cam.eye.z += player->vel.z * 0.2f; Math_SmoothStepToF(&player->unk_12C, 0.0f, 0.1f, 15.0f, 0.0f); break; @@ -1535,12 +1535,12 @@ void func_demo_8004CCC0(Player* player) { Math_SmoothStepToF(&player->wings.unk_10, sp58.z, 0.3f, 100.0f, 0.0f); player->unk_190 = 2.0f; - player->camEye.x += player->vel.x * 0.1f; - player->camEye.z += player->vel.z * 0.1f; + player->cam.eye.x += player->vel.x * 0.1f; + player->cam.eye.z += player->vel.z * 0.1f; if (player->unk_19C != 0) { - player->camEye.x += player->vel.z * 0.2f; - player->camEye.z += player->vel.x * 0.2f; + player->cam.eye.x += player->vel.z * 0.2f; + player->cam.eye.z += player->vel.x * 0.2f; } if (player->unk_19C == 0) { @@ -1556,18 +1556,18 @@ void func_demo_8004CCC0(Player* player) { } if (player->timer_1F8 == 0) { - player->state_1C8 = PLAYERSTATE_1C8_3; + player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_014 = 0.0f; player->unk_018 = 0.0f; } break; } player->pos.y += player->unk_004; - player->camAt.y += player->unk_004; + player->cam.at.y += player->unk_004; player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), 1); + Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); sp50.rot.x = 0.0f; sp50.rot.y = 0.0f; @@ -1597,7 +1597,7 @@ void func_demo_8004CCC0(Player* player) { void func_demo_8004D3C8(s32 arg0) { } -void func_demo_8004D3D4(Player* player, ObjectId itemId, Item* item) { +void Cutscene_DropVsItem(Player* player, ObjectId itemId, Item* item) { Item_Initialize(item); item->obj.status = OBJ_INIT; item->obj.pos.x = player->pos.x; @@ -1607,13 +1607,13 @@ void func_demo_8004D3D4(Player* player, ObjectId itemId, Item* item) { Object_SetInfo(&item->info, item->obj.id); } -void func_demo_8004D440(Player* player) { +void Cutscene_KillPlayer(Player* player) { s32 teamId; func_8001CA24(player->num); Audio_KillSfxBySourceAndId(player->sfxSource, 0x0900C010U); func_play_800A5FA0(player->sfxSource, 0x0903F004U, player->num); - player->state_1C8 = PLAYERSTATE_1C8_6; + player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 70; player->timer_224 = 20; D_ctx_8017837C = 7; @@ -1665,11 +1665,11 @@ void func_demo_8004D440(Player* player) { } if (gBombCount[gPlayerNum] != 0) { gBombCount[gPlayerNum] = 0; - func_demo_8004D3D4(player, OBJ_ITEM_BOMB, &gItems[1]); + Cutscene_DropVsItem(player, OBJ_ITEM_BOMB, &gItems[1]); } if (gLaserStrength[gPlayerNum] != 0) { gLaserStrength[gPlayerNum] = 0; - func_demo_8004D3D4(player, OBJ_ITEM_LASERS, &gItems[0]); + Cutscene_DropVsItem(player, OBJ_ITEM_LASERS, &gItems[0]); } } } @@ -1683,7 +1683,7 @@ void func_demo_8004D738(Player* player) { } else { func_effect_8007BFFC(player->pos.x, player->pos.y, player->unk_138, 0.0f, 0.0f, 0.0f, 3.0f, 10); } - func_demo_8004D440(player); + Cutscene_KillPlayer(player); } void func_demo_8004D828(Player* player) { @@ -1769,10 +1769,10 @@ void func_demo_8004D828(Player* player) { func_effect_8007D0E0(player->pos.x, player->pos.y, player->unk_138, 5.0f); func_effect_8007BFFC(player->pos.x, player->pos.y, player->unk_138, player->vel.x, 0.0f, player->vel.z, 5.0f, 20); - func_demo_8004D440(player); + Cutscene_KillPlayer(player); } - Math_SmoothStepToF(&player->unk_034, 0.0f, 0.05f, 5.0f, 0.00001f); - Matrix_RotateY(gCalcMatrix, (player->unk_114 + (player->unk_134 * 0.2f)) * M_DTOR, 0); + Math_SmoothStepToF(&player->camRoll, 0.0f, 0.05f, 5.0f, 0.00001f); + Matrix_RotateY(gCalcMatrix, (player->unk_114 + (player->unk_134 * 0.2f)) * M_DTOR, MTXF_NEW); Math_SmoothStepToF(&player->unk_000, 700.0f, 0.05f, 10.0f, 0.00001f); src.x = player->unk_004 * (player->unk_000 * 0.7f); @@ -1781,19 +1781,19 @@ void func_demo_8004D828(Player* player) { Matrix_MultVec3f(gCalcMatrix, &src, &dest); - player->camEye.x = player->pos.x + dest.x; - player->camEye.z = player->pos.z + dest.z; + player->cam.eye.x = player->pos.x + dest.x; + player->cam.eye.z = player->pos.z + dest.z; - player->camAt.x = player->pos.x; - player->camAt.z = player->pos.z; + player->cam.at.x = player->pos.x; + player->cam.at.z = player->pos.z; if ((gLevelType == LEVELTYPE_PLANET) || (gCurrentLevel == LEVEL_BOLSE)) { - player->camEye.y = (player->pos.y * player->unk_148) + dest.y; - player->camEye.y -= player->unk_02C - 50.0f; - player->camAt.y = ((player->pos.y * player->unk_14C) + 20.0f) + (player->unk_060 * 5.0f); + player->cam.eye.y = (player->pos.y * player->unk_148) + dest.y; + player->cam.eye.y -= player->unk_02C - 50.0f; + player->cam.at.y = ((player->pos.y * player->unk_14C) + 20.0f) + (player->unk_060 * 5.0f); } else { - player->camEye.y = player->pos.y + dest.y; - player->camAt.y = player->pos.y; + player->cam.eye.y = player->pos.y + dest.y; + player->cam.at.y = player->pos.y; } if (gVersusMode != 0) { @@ -1874,13 +1874,13 @@ void func_demo_8004DEF8(Player* player) { func_play_800A69F8(4, player->pos.x, player->pos.y, player->unk_138); } } - func_demo_8004D440(player); + Cutscene_KillPlayer(player); } - player->unk_034 -= 3.0f; + player->camRoll -= 3.0f; if (player->unk_1D0 != 0) { - player->unk_034 += 10.0f; + player->camRoll += 10.0f; } if ((gGroundType == GROUNDTYPE_WATER) && (player->pos.y <= player->unk_0A4)) { @@ -1889,7 +1889,7 @@ void func_demo_8004DEF8(Player* player) { } } -void func_demo_8004E3D8(Player* player) { +void Cutscene_PlayerDown(Player* player) { player->flags_228 = 0; player->unk_280 = 0; @@ -2007,7 +2007,7 @@ void func_demo_8004E4D4(Actor* actor) { case 30: actor->fwork[3] += D_demo_800CA098[actor->index]; - Matrix_RotateY(gCalcMatrix, actor->fwork[3] * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, actor->fwork[3] * M_DTOR, MTXF_NEW); sp54.x = 0.0f; sp54.y = D_demo_800CA0A4[actor->index]; @@ -2038,8 +2038,8 @@ void func_demo_8004E4D4(Actor* actor) { Math_SmoothStepToF(&actor->obj.rot.z, 0.0f, 0.1f, 0.5f, 0.0f); break; } - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); sp54.x = 0.0f; sp54.y = 0.0f; @@ -2131,9 +2131,9 @@ void func_demo_8004EBD0(Actor* actor) { } actor->fwork[6] += 1.0f; - Matrix_RotateY(gCalcMatrix, (gPlayer[0].unk_0E8 + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -(gPlayer[0].unk_0E4 * M_DTOR), 1); - Matrix_RotateZ(gCalcMatrix, -((gPlayer[0].unk_0F8 + gPlayer[0].unk_0F0) * M_DTOR), 1); + Matrix_RotateY(gCalcMatrix, (gPlayer[0].unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(gPlayer[0].unk_0E4 * M_DTOR), MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -((gPlayer[0].unk_0F8 + gPlayer[0].unk_0F0) * M_DTOR), MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; src.z = actor->fwork[6] * actor->fwork[6]; @@ -2167,7 +2167,7 @@ void func_demo_8004F05C(Actor* actor) { case LEVEL_BOLSE: switch (actor->unk_0B6) { case 0: - if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2) { + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) { actor->unk_0F4.z += actor->unk_0F4.y; actor->vel.x = SIN_DEG(actor->unk_0F4.z) * 10.0f; actor->obj.rot.z = SIN_DEG(actor->unk_0F4.z) * 40.0f; @@ -2268,7 +2268,7 @@ void func_demo_8004F05C(Actor* actor) { case 0: actor->obj.rot.z = actor->unk_0F4.z; if (actor->unk_0B6 == 10) { - actor->obj.pos.z = gPlayer[0].camEye.z + 12000.0f; + actor->obj.pos.z = gPlayer[0].cam.eye.z + 12000.0f; } break; @@ -2348,7 +2348,7 @@ void func_demo_8004F8AC(Actor* actor) { } switch (gPlayer[0].state_1C8) { - case PLAYERSTATE_1C8_7: + case PLAYERSTATE_1C8_LEVEL_COMPLETE: switch (gCurrentLevel) { case LEVEL_SECTOR_Y: if (gPlayer[0].unk_1D0 >= 3) { @@ -2469,15 +2469,15 @@ void func_demo_8004F8AC(Actor* actor) { } break; - case PLAYERSTATE_1C8_2: + case PLAYERSTATE_1C8_LEVEL_INTRO: func_demo_8004F05C(actor); break; - case PLAYERSTATE_1C8_8: + case PLAYERSTATE_1C8_ENTER_WARP_ZONE: func_demo_8004F798(actor); break; - case PLAYERSTATE_1C8_0: + case PLAYERSTATE_1C8_STANDBY: if (gCurrentLevel == LEVEL_SECTOR_Y) { SectorY_8019FF00(actor); } @@ -2501,15 +2501,16 @@ void func_demo_8004FCB8(Actor* actor, s32 arg1) { RCP_SetupDL_49(); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 16, 16, 240, 255); - angle = Math_Atan2F(gPlayer[0].camEye.x - gPlayer[0].camAt.x, gPlayer[0].camEye.z - gPlayer[0].camAt.z); + angle = Math_Atan2F(gPlayer[0].cam.eye.x - gPlayer[0].cam.at.x, gPlayer[0].cam.eye.z - gPlayer[0].cam.at.z); for (i = arg1; i < (arg1 + 4); i++) { Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, D_demo_800CA110[i].x + actor->obj.pos.x, - D_demo_800CA110[i].y + actor->obj.pos.y, D_demo_800CA110[i].z + actor->obj.pos.z, 1); - Matrix_RotateY(gGfxMatrix, angle, 1); - Matrix_Scale(gGfxMatrix, scale, scale, scale, 1); + D_demo_800CA110[i].y + actor->obj.pos.y, D_demo_800CA110[i].z + actor->obj.pos.z, + MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, angle, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); } @@ -2561,7 +2562,7 @@ void func_demo_8004FEC0(Actor* actor) { case 10: RCP_SetupDL_40(); - Matrix_Scale(gGfxMatrix, 60.0f, 60.0f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 60.0f, 60.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ME_6020810); break; @@ -2569,9 +2570,9 @@ void func_demo_8004FEC0(Actor* actor) { case 11: RCP_SetupDL_64_2(); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - Matrix_Scale(gGfxMatrix, 60.0f, 60.0f, 1.0f, 1); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 10.0f, 1); - Matrix_Scale(gGfxMatrix, actor->scale, actor->scale, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 60.0f, 60.0f, 1.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 10.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, actor->scale, actor->scale, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL_49(); @@ -2599,13 +2600,13 @@ void func_demo_8004FEC0(Actor* actor) { case 26: gSPDisplayList(gMasterDisp++, D_SZ_6004FE0); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY); func_edisplay_8005B1E8(actor, 2); break; case 28: gSPDisplayList(gMasterDisp++, D_ENMY_SPACE_400AAE0); - Matrix_Translate(gGfxMatrix, 0.f, 0.f, -60.0f, 1); + Matrix_Translate(gGfxMatrix, 0.f, 0.f, -60.0f, MTXF_APPLY); func_edisplay_8005B1E8(actor, 2); break; @@ -2621,30 +2622,31 @@ void func_demo_8004FEC0(Actor* actor) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, RAND_FLOAT_CENTERED_SEEDED(3000.0f) * actor->fwork[20], RAND_FLOAT_CENTERED_SEEDED(3000.0f) * actor->fwork[20], - RAND_FLOAT_CENTERED_SEEDED(3000.0f) * actor->fwork[20], 1); - Matrix_RotateY(gGfxMatrix, 2.0f * RAND_FLOAT_SEEDED(M_PI), 1); - Matrix_RotateZ(gGfxMatrix, (2.0f * gGameFrameCount) * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, 2.0f * RAND_FLOAT_SEEDED(M_PI), 1); + RAND_FLOAT_CENTERED_SEEDED(3000.0f) * actor->fwork[20], MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, 2.0f * RAND_FLOAT_SEEDED(M_PI), MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, (2.0f * gGameFrameCount) * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, 2.0f * RAND_FLOAT_SEEDED(M_PI), MTXF_APPLY); switch ((s32) (sp2D0 % 4U)) { case 0: - Matrix_Scale(gGfxMatrix, 1.0f, 0.3f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 1.0f, 0.3f, 1.0f, MTXF_APPLY); break; case 1: - Matrix_Scale(gGfxMatrix, 0.3f, 1.0f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 0.3f, 1.0f, 1.0f, MTXF_APPLY); break; case 2: - Matrix_Scale(gGfxMatrix, 1.0f, 0.5f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 1.0f, 0.5f, 1.0f, MTXF_APPLY); break; case 3: - Matrix_Scale(gGfxMatrix, 0.5f, 1.0f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 0.5f, 1.0f, 1.0f, MTXF_APPLY); break; } - Matrix_Scale(gGfxMatrix, RAND_FLOAT_SEEDED(8.0f) + 8.0f, RAND_FLOAT_SEEDED(8.0f) + 8.0f, 10.0f, 1); + Matrix_Scale(gGfxMatrix, RAND_FLOAT_SEEDED(8.0f) + 8.0f, RAND_FLOAT_SEEDED(8.0f) + 8.0f, 10.0f, + MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1021E20); Matrix_Pop(&gGfxMatrix); @@ -2653,19 +2655,19 @@ void func_demo_8004FEC0(Actor* actor) { break; } - if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2) { + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) { Matrix_Push(&gGfxMatrix); - Matrix_RotateX(gGfxMatrix, 20.0f * M_DTOR, 1); - Matrix_RotateY(gGfxMatrix, (gGameFrameCount * 0.5f) * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, 1); + Matrix_RotateX(gGfxMatrix, 20.0f * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, (gGameFrameCount * 0.5f) * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, MTXF_APPLY); } else { - Matrix_RotateX(gGfxMatrix, -10.0f * M_DTOR, 1); - Matrix_RotateY(gGfxMatrix, (gGameFrameCount * 0.3f) * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, 4.0f, 4.0f, 4.0f, 1); + Matrix_RotateX(gGfxMatrix, -10.0f * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, (gGameFrameCount * 0.3f) * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 4.0f, 4.0f, 4.0f, MTXF_APPLY); Matrix_Push(&gGfxMatrix); } - Matrix_Translate(gGfxMatrix, 0.f, -590.0f, 0.f, 1); + Matrix_Translate(gGfxMatrix, 0.f, -590.0f, 0.f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -2707,10 +2709,10 @@ void func_demo_8004FEC0(Actor* actor) { gDPSetPrimColor(gMasterDisp++, 0, 0, (s32) D_800CA210, (s32) D_800CA214, (s32) D_800CA218, 128); - if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2) { - Matrix_Scale(gGfxMatrix, 1.02f, 1.02f, 1.02f, 1); + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) { + Matrix_Scale(gGfxMatrix, 1.02f, 1.02f, 1.02f, MTXF_APPLY); } else { - Matrix_Scale(gGfxMatrix, 0.97f, 0.97f, 0.97f, 1); + Matrix_Scale(gGfxMatrix, 0.97f, 0.97f, 0.97f, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); @@ -2722,15 +2724,15 @@ void func_demo_8004FEC0(Actor* actor) { Matrix_Pop(&gGfxMatrix); Matrix_Pop(&gGfxMatrix); - if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) { - Matrix_Scale(gGfxMatrix, 0.075f, 0.075f, 0.075f, 1); + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) { + Matrix_Scale(gGfxMatrix, 0.075f, 0.075f, 0.075f, MTXF_APPLY); break; } break; case 31: RCP_SetupDL_21(); - Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 2.0f, 1); + Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 2.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_101ABD0); break; @@ -2740,12 +2742,12 @@ void func_demo_8004FEC0(Actor* actor) { break; case 33: - if ((actor->index == 3) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7)) { + if ((actor->index == 3) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { gSPDisplayList(gMasterDisp++, D_D00B880); } else { gSPDisplayList(gMasterDisp++, D_KA_600E050); } - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY); func_edisplay_8005B1E8(actor, 0); break; @@ -2754,7 +2756,7 @@ void func_demo_8004FEC0(Actor* actor) { break; case 35: - Matrix_Scale(gGfxMatrix, 0.125f, 0.125f, 0.125f, 1); + Matrix_Scale(gGfxMatrix, 0.125f, 0.125f, 0.125f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); /* fallthrough */ case 39: @@ -2763,7 +2765,7 @@ void func_demo_8004FEC0(Actor* actor) { break; case 36: - Matrix_Scale(gGfxMatrix, actor->scale, actor->scale, actor->scale, 1); + Matrix_Scale(gGfxMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_SY_601D730); func_demo_8004FCB8(actor, 0); @@ -2773,7 +2775,7 @@ void func_demo_8004FEC0(Actor* actor) { RCP_SetupDL_49(); gDPSetPrimColor(gMasterDisp++, 0, 0, actor->iwork[0], actor->iwork[1], actor->iwork[2], actor->iwork[3]); gDPSetEnvColor(gMasterDisp++, actor->iwork[4], actor->iwork[5], actor->iwork[6], actor->iwork[7]); - Matrix_Scale(gGfxMatrix, actor->scale, actor->fwork[4], 1.0f, 1); + Matrix_Scale(gGfxMatrix, actor->scale, actor->fwork[4], 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); break; @@ -2789,20 +2791,20 @@ void func_demo_8004FEC0(Actor* actor) { RCP_SetupDL_49(); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 255, 32, 32, 255); - Matrix_Translate(gGfxMatrix, 10.0f, -5.0f, -40.0f, 1); - Matrix_RotateY(gGfxMatrix, (-actor->obj.rot.y) * M_DTOR, 1); + Matrix_Translate(gGfxMatrix, 10.0f, -5.0f, -40.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, (-actor->obj.rot.y) * M_DTOR, MTXF_APPLY); Graphics_SetScaleMtx(1.0f); - Matrix_Scale(gGfxMatrix, actor->fwork[0], actor->fwork[0], actor->fwork[0], 1); + Matrix_Scale(gGfxMatrix, actor->fwork[0], actor->fwork[0], actor->fwork[0], MTXF_APPLY); - camX = gPlayer[0].camEye.x - actor->obj.pos.x; - camY = gPlayer[0].camEye.y - actor->obj.pos.y; - camZ = gPlayer[0].camEye.z - (actor->obj.pos.z + D_ctx_80177D20); + camX = gPlayer[0].cam.eye.x - actor->obj.pos.x; + camY = gPlayer[0].cam.eye.y - actor->obj.pos.y; + camZ = gPlayer[0].cam.eye.z - (actor->obj.pos.z + D_ctx_80177D20); y = -Math_Atan2F(camX, camZ); x = Math_Atan2F(camY, sqrtf(SQ(camZ) + SQ(camX))); - Matrix_RotateY(gGfxMatrix, -y, 1); - Matrix_RotateX(gGfxMatrix, -x, 1); + Matrix_RotateY(gGfxMatrix, -y, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -x, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); @@ -2815,7 +2817,7 @@ void func_demo_8004FEC0(Actor* actor) { gDPSetEnvColor(gMasterDisp++, 255, 48, 0, 255); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_RotateY(gCalcMatrix, (actor->obj.rot.y - 90.0f) * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, (actor->obj.rot.y - 90.0f) * M_DTOR, MTXF_NEW); sp2B8.x = 210.0f; sp2B8.y = 0.0f; @@ -2823,18 +2825,18 @@ void func_demo_8004FEC0(Actor* actor) { Matrix_MultVec3fNoTranslate(gCalcMatrix, (Vec3f*) (&sp2B8), &sp2AC); Matrix_Translate(gGfxMatrix, actor->obj.pos.x + sp2AC.x, actor->obj.pos.y + sp2AC.y, - actor->obj.pos.z + sp2AC.z, 1); - Matrix_Scale(gGfxMatrix, actor->fwork[6], actor->fwork[6], actor->fwork[6], 1); + actor->obj.pos.z + sp2AC.z, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, actor->fwork[6], actor->fwork[6], actor->fwork[6], MTXF_APPLY); - camX = gPlayer[0].camEye.x - actor->obj.pos.x; - camY = gPlayer[0].camEye.y - actor->obj.pos.y; - camZ = gPlayer[0].camEye.z - (actor->obj.pos.z + D_ctx_80177D20); + camX = gPlayer[0].cam.eye.x - actor->obj.pos.x; + camY = gPlayer[0].cam.eye.y - actor->obj.pos.y; + camZ = gPlayer[0].cam.eye.z - (actor->obj.pos.z + D_ctx_80177D20); y = -Math_Atan2F(camX, camZ); x = Math_Atan2F(camY, sqrtf(SQ(camZ) + SQ(camX))); - Matrix_RotateY(gGfxMatrix, -y, 1); - Matrix_RotateX(gGfxMatrix, -x, 1); + Matrix_RotateY(gGfxMatrix, -y, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -x, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); @@ -2862,8 +2864,9 @@ void func_demo_8004FEC0(Actor* actor) { Matrix_RotateY( gGfxMatrix, - Math_Atan2F(gPlayer[0].camEye.x - gPlayer[0].camAt.x, gPlayer[0].camEye.z - gPlayer[0].camAt.z), 1); - Matrix_Scale(gGfxMatrix, actor->fwork[0], actor->fwork[0], actor->fwork[0], 1); + Math_Atan2F(gPlayer[0].cam.eye.x - gPlayer[0].cam.at.x, gPlayer[0].cam.eye.z - gPlayer[0].cam.at.z), + MTXF_APPLY); + Matrix_Scale(gGfxMatrix, actor->fwork[0], actor->fwork[0], actor->fwork[0], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); @@ -2882,7 +2885,7 @@ void func_demo_8004FEC0(Actor* actor) { break; case 45: - Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, 1); + Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_AQ_600EEF0); break; @@ -2927,7 +2930,7 @@ void func_demo_800515C4(void) { } if ((gCurrentLevel != LEVEL_AQUAS) && - ((gCurrentLevel != LEVEL_SECTOR_Z) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7))) { + ((gCurrentLevel != LEVEL_SECTOR_Z) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE))) { RCP_SetupDL_49(); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); for (i = 0, var_s6_2 = D_demo_800CA0BC; i < 4; i++, var_s6_2++) { @@ -2945,8 +2948,8 @@ void func_demo_800515C4(void) { gDPSetEnvColor(gMasterDisp++, 32, 32, 255, 128); } Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, var_s6_2->x, var_s6_2->y, var_s6_2->z, 1); - Matrix_Scale(gGfxMatrix, sp9C[i], sp9C[i], 1.0f, 1); + Matrix_Translate(gGfxMatrix, var_s6_2->x, var_s6_2->y, var_s6_2->z, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, sp9C[i], sp9C[i], 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, var_fp); Matrix_Pop(&gGfxMatrix); @@ -2958,15 +2961,15 @@ void func_demo_800515C4(void) { for (i = 0, var_s6_2 = D_demo_800CA0EC; i < 3; i++, var_s6_2++) { sp9C[i] = D_demo_800CA190[gGameFrameCount % 2U]; Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, var_s6_2->x, var_s6_2->y, var_s6_2->z, 1); - Matrix_Scale(gGfxMatrix, sp9C[i], sp9C[i], 1.0f, 1); + Matrix_Translate(gGfxMatrix, var_s6_2->x, var_s6_2->y, var_s6_2->z, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, sp9C[i], sp9C[i], 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, var_fp); for (j = 0; j < 4; j++) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, D_demo_800CA1B4[2 * j], 1); - Matrix_Scale(gGfxMatrix, D_demo_800CA1D4[2 * j], D_demo_800CA1D4[2 * j], 1.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, D_demo_800CA1B4[2 * j], MTXF_APPLY); + Matrix_Scale(gGfxMatrix, D_demo_800CA1D4[2 * j], D_demo_800CA1D4[2 * j], 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, var_fp); Matrix_Pop(&gGfxMatrix); @@ -2977,9 +2980,9 @@ void func_demo_800515C4(void) { if ((gCurrentLevel == LEVEL_METEO) && (gPlayer[0].timer_1FC != 0)) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 128); gDPSetEnvColor(gMasterDisp++, 255, 255, 32, 128); - Matrix_Translate(gGfxMatrix, D_ctx_80177A48[3] * (-74.0f), -232.0f, 1190.0f, 1); + Matrix_Translate(gGfxMatrix, D_ctx_80177A48[3] * (-74.0f), -232.0f, 1190.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_demo_800CA198[gPlayer[0].timer_1FC], D_demo_800CA198[gPlayer[0].timer_1FC], 1.0f, - 1); + MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, var_fp); } diff --git a/src/engine/fox_display.c b/src/engine/fox_display.c index 576b22fa..0e1e55d1 100644 --- a/src/engine/fox_display.c +++ b/src/engine/fox_display.c @@ -17,7 +17,7 @@ f32 D_display_801615B8[4]; s32 D_display_800CA220 = 0; u8 sPlayersVisible[] = { 0, 0, 0, 0 }; // -s32 D_display_800CA228 = 0; // +s32 sDrawCockpit = 0; // s32 D_display_800CA22C = 0; // f32 D_display_800CA230 = 0.0f; Actor* D_display_800CA234 = NULL; @@ -35,7 +35,7 @@ void func_display_80051B30(void) { if ((gPlayState == PLAY_PAUSE) || (D_display_800CA234 == NULL)) { return; } - if ((D_display_800CA234->obj.status != OBJ_ACTIVE) || (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_3)) { + if ((D_display_800CA234->obj.status != OBJ_ACTIVE) || (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_ACTIVE)) { D_display_800CA234 = NULL; D_display_Timer_800CA238 = 0; return; @@ -48,11 +48,11 @@ void func_display_80051B30(void) { } } if (!(D_display_Timer_800CA238 & 4)) { - Matrix_RotateY(gCalcMatrix, gPlayer[0].unk_058, 0); - Matrix_RotateX(gCalcMatrix, gPlayer[0].unk_05C, 1); - sp68.x = D_display_800CA234->obj.pos.x - gPlayer[0].camEye.x; - sp68.y = D_display_800CA234->obj.pos.y - gPlayer[0].camEye.y; - sp68.z = D_display_800CA234->obj.pos.z + D_ctx_80177D20 - gPlayer[0].camEye.z; + 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; Matrix_MultVec3f(gCalcMatrix, &sp68, &sp5C); sp7C = 0; if ((sp5C.z < 0.0f) && (sp5C.z > -12000.0f) && (fabsf(sp5C.x) < fabsf(sp5C.z * 0.4f))) { @@ -80,26 +80,26 @@ void func_display_80051B30(void) { sp74 = -M_PI / 2; } Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, sp78, 0.0f, -50.0f, 1); - Matrix_RotateZ(gGfxMatrix, sp74, 1); - Matrix_Scale(gGfxMatrix, 0.03f, 0.03f, 0.03f, 1); + Matrix_Translate(gGfxMatrix, sp78, 0.0f, -50.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, sp74, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.03f, 0.03f, 0.03f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1023700); Matrix_Pop(&gGfxMatrix); break; case 1: Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 20.0f, 0.0f, -50.0f, 1); - Matrix_RotateZ(gGfxMatrix, -M_PI / 2, 1); - Matrix_Scale(gGfxMatrix, 0.03f, 0.03f, 0.03f, 1); + Matrix_Translate(gGfxMatrix, 20.0f, 0.0f, -50.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, -M_PI / 2, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.03f, 0.03f, 0.03f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1023700); Matrix_Pop(&gGfxMatrix); sp78 = -20.0f; Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, -20.0f, 0.0f, -50.0f, 1); - Matrix_RotateZ(gGfxMatrix, M_PI / 2, 1); - Matrix_Scale(gGfxMatrix, 0.03f, 0.03f, 0.03f, 1); + Matrix_Translate(gGfxMatrix, -20.0f, 0.0f, -50.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, M_PI / 2, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.03f, 0.03f, 0.03f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1023700); Matrix_Pop(&gGfxMatrix); @@ -232,11 +232,11 @@ void func_display_8005250C(s32 limbIndex, Vec3f* rot, void* data) { void func_display_80052584(Player* player) { Matrix_Push(&gGfxMatrix); Matrix_Copy(gGfxMatrix, &gIdentityMatrix); - if ((player->state_1C8 == PLAYERSTATE_1C8_3) && (player->timer_1F8 != 0)) { + if ((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (player->timer_1F8 != 0)) { Matrix_Translate(gGfxMatrix, D_display_801613B0[player->num].x, D_display_801613B0[player->num].y, - D_display_801613B0[player->num].z, 1); + D_display_801613B0[player->num].z, MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_display_800CA23C[player->timer_1F8 - 1], D_display_800CA23C[player->timer_1F8 - 1], - D_display_800CA23C[player->timer_1F8 - 1], 1); + D_display_800CA23C[player->timer_1F8 - 1], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL_40(); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); @@ -247,8 +247,8 @@ void func_display_80052584(Player* player) { void func_display_800526B8(Player* player) { Matrix_Push(&gGfxMatrix); - Matrix_Scale(gCalcMatrix, 0.5f, 0.5f, 0.5f, 1); - Matrix_Translate(gCalcMatrix, 0.0f, 35.0f, 0.0f, 1); + Matrix_Scale(gCalcMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY); + Matrix_Translate(gCalcMatrix, 0.0f, 35.0f, 0.0f, MTXF_APPLY); switch (player->num) { case 0: Animation_DrawSkeleton(5, D_versus_301D258, player->jointTable, func_display_800520FC, @@ -284,9 +284,9 @@ void func_display_80052884(Player* player) { gSPDisplayList(gMasterDisp++, D_versus_300FB80); } Matrix_MultVec3f(gGfxMatrix, &sp40, &D_display_80161518[player->num]); - Matrix_Translate(gGfxMatrix, 0.0f, 51.0f, -10.0f, 1); - Matrix_RotateY(gGfxMatrix, -player->unk_180 * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, player->unk_17C * M_DTOR, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 51.0f, -10.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, -player->unk_180 * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, player->unk_17C * M_DTOR, MTXF_APPLY); if (gPlayerNum == player->num) { sp64 = 0.0f; if (gChargeTimers[player->num] >= 20) { @@ -323,18 +323,18 @@ f32 sPlayerShadowing = 0.0f; void func_display_80052B80(Player* player) { Matrix_Push(&gGfxMatrix); - if ((player->state_1C8 == PLAYERSTATE_1C8_3) && (player->unk_1A0 != 0)) { + if ((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (player->unk_1A0 != 0)) { Matrix_Translate(gGfxMatrix, D_display_80161548[player->num].x, D_display_80161548[player->num].y, - D_display_80161548[player->num].z, 1); + D_display_80161548[player->num].z, MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_display_800CA248[player->unk_1A0 - 1], D_display_800CA248[player->unk_1A0 - 1], - D_display_800CA248[player->unk_1A0 - 1], 1); + D_display_800CA248[player->unk_1A0 - 1], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if (gVersusMode) { RCP_SetupDL_40(); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_versus_301FD20); } else { - Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, 1); + Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL(&gMasterDisp, 0x43); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); @@ -367,12 +367,12 @@ void func_display_80052D48(Player* player) { sp2C *= 1.1f; } Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 20.0f, 30.0f, -10.0f, 1); + Matrix_Translate(gGfxMatrix, 20.0f, 30.0f, -10.0f, MTXF_APPLY); if (!gVersusMode) { - Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].unk_058, 1); + Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY); } - Matrix_Scale(gGfxMatrix, sp2C, sp2C, sp2C, 1); - Matrix_Translate(gGfxMatrix, 0.0f, -30.0f, 0.0f, 1); + Matrix_Scale(gGfxMatrix, sp2C, sp2C, sp2C, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, -30.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if (!gVersusMode) { gSPDisplayList(gMasterDisp++, D_landmaster_30066B0); @@ -390,12 +390,12 @@ void func_display_80052D48(Player* player) { sp2C *= 1.1f; } Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, -20.0f, 30.0f, -10.0f, 1); + Matrix_Translate(gGfxMatrix, -20.0f, 30.0f, -10.0f, MTXF_APPLY); if (!gVersusMode) { - Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].unk_058, 1); + Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY); } - Matrix_Scale(gGfxMatrix, sp2C, sp2C, sp2C, 1); - Matrix_Translate(gGfxMatrix, 0.0f, -30.0f, 0.0f, 1); + Matrix_Scale(gGfxMatrix, sp2C, sp2C, sp2C, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, -30.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if (!gVersusMode) { gSPDisplayList(gMasterDisp++, D_landmaster_30066B0); @@ -520,7 +520,7 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, void func_display_80053658(WingInfo* wings) { Vec3f sp68[30]; - s32 sp64; + s32 modelId; Matrix_Push(&gGfxMatrix); wings->unk_18 = 0.0f; @@ -539,32 +539,32 @@ void func_display_80053658(WingInfo* wings) { Animation_DrawSkeleton(1, D_arwing_3016610, sp68, func_display_800531A4, NULL, wings, &gIdentityMatrix); } D_display_800CA22C = 0; - sp64 = wings->unk_2C; + modelId = wings->modelId; if (D_display_800CA220 != 0) { - sp64 = 1; + modelId = 1; } - if (sp64 != 0) { + if (modelId != 0) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, 6.4f, -16.5f, 1); - Matrix_RotateY(gGfxMatrix, wings->unk_34 * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, wings->unk_30 * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, 1.0f / 70.925f, 1.0f / 70.925f, 1.0f / 70.925f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 6.4f, -16.5f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, wings->unk_34 * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, wings->unk_30 * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 1.0f / 70.925f, 1.0f / 70.925f, 1.0f / 70.925f, MTXF_APPLY); if (gGameState == GSTATE_ENDING) { - Matrix_Scale(gGfxMatrix, 0.95f, 0.95f, 0.95f, 1); + Matrix_Scale(gGfxMatrix, 0.95f, 0.95f, 0.95f, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); if (gExpertMode) { - gSPDisplayList(gMasterDisp++, D_display_800CA27C[sp64 - 1]); + gSPDisplayList(gMasterDisp++, D_display_800CA27C[modelId - 1]); } else { - gSPDisplayList(gMasterDisp++, D_display_800CA26C[sp64 - 1]); + gSPDisplayList(gMasterDisp++, D_display_800CA26C[modelId - 1]); } Matrix_Pop(&gGfxMatrix); } - Matrix_Translate(gGfxMatrix, 0.0f, 17.2f, -25.8f, 1); - Matrix_RotateX(gGfxMatrix, wings->unk_38 * M_DTOR, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 17.2f, -25.8f, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, wings->unk_38 * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL_64_2(); - if ((gGameState == GSTATE_PLAY) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2) && + if ((gGameState == GSTATE_PLAY) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && (gCurrentLevel == LEVEL_CORNERIA)) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 120); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); @@ -588,8 +588,8 @@ void func_display_80053B00(f32 arg0, f32 arg1, UNK_TYPE arg2, UNK_TYPE arg3) { void func_display_80053B18(void) { Matrix_Push(&gGfxMatrix); Matrix_Copy(gGfxMatrix, &D_display_80161418[0]); - Matrix_Translate(gGfxMatrix, 0.0f, D_display_800CA290, D_display_800CA294, 1); - Matrix_Scale(gGfxMatrix, D_display_800CA28C, D_display_800CA28C, D_display_800CA28C, 1); + Matrix_Translate(gGfxMatrix, 0.0f, D_display_800CA290, D_display_800CA294, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, D_display_800CA28C, D_display_800CA28C, D_display_800CA28C, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL_64_2(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 120); @@ -616,12 +616,12 @@ void func_display_80053C38(Player* player, s32 arg1) { Matrix_MultVec3f(gGfxMatrix, &sp4C, &D_display_801613E0[1]); } if ((player->cockpitView != 0) && (gLevelMode == LEVELMODE_ON_RAILS) && - (fabsf(player->unk_138 + D_ctx_80177D20 - player->camEye.z) < 10.0f)) { + (fabsf(player->unk_138 + D_ctx_80177D20 - player->cam.eye.z) < 10.0f)) { if (arg1 == 0) { - D_display_800CA228 = 1; + sDrawCockpit = 1; Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, -8.0f, 5.0f, 1); - Matrix_RotateY(gGfxMatrix, M_PI, 1); + Matrix_Translate(gGfxMatrix, 0.0f, -8.0f, 5.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_arwing_30131F0); Matrix_Pop(&gGfxMatrix); @@ -657,11 +657,12 @@ void func_display_80053F7C(Player* player) { if ((gPlayerNum == player->num) && ((player->form == FORM_ARWING) || (player->form == FORM_LANDMASTER)) && (player->unk_234 != 0) && - (((gGameState == GSTATE_PLAY) && (player->state_1C8 == PLAYERSTATE_1C8_3)) || (gGameState == GSTATE_MENU))) { + (((gGameState == GSTATE_PLAY) && (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE)) || + (gGameState == GSTATE_MENU))) { for (i = 0; i < 2; i++) { translate = &D_display_801613E0[i]; Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, translate->x, translate->y, translate->z, 1); + Matrix_Translate(gGfxMatrix, translate->x, translate->y, translate->z, MTXF_APPLY); if (gChargeTimers[player->num] >= 20) { RCP_SetupDL(&gMasterDisp, 0x3F); if (i == 1) { @@ -676,10 +677,11 @@ void func_display_80053F7C(Player* player) { RCP_SetupDL_36(); } if (i == 1) { - Matrix_Scale(gGfxMatrix, sCrosshairScales[player->num], sCrosshairScales[player->num], 1.0f, 1); + Matrix_Scale(gGfxMatrix, sCrosshairScales[player->num], sCrosshairScales[player->num], 1.0f, + MTXF_APPLY); Math_SmoothStepToF(&sCrosshairScales[player->num], 1.0f, 1.0f, 0.2f, 0.0f); } - Matrix_Scale(gGfxMatrix, 4.0f, 4.0f, 4.0f, 1); + Matrix_Scale(gGfxMatrix, 4.0f, 4.0f, 4.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024F60); Matrix_Pop(&gGfxMatrix); @@ -719,15 +721,15 @@ void func_display_80054300(Player* player) { switch (player->form) { case FORM_ARWING: fake_label: - Matrix_Scale(gGfxMatrix, 2.5049999f, 1.5f, 2.5049999f, 1); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 30.0f, 1); + Matrix_Scale(gGfxMatrix, 2.5049999f, 1.5f, 2.5049999f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 30.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1032780); break; case FORM_LANDMASTER: Matrix_Push(&gGfxMatrix); - Matrix_Scale(gGfxMatrix, 1.17f, 1.17f, 1.17f, 1); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 20.0f, 1); + Matrix_Scale(gGfxMatrix, 1.17f, 1.17f, 1.17f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 20.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if (gCurrentLevel == LEVEL_MACBETH) { RCP_SetupDL(&gMasterDisp, 0x41); @@ -743,8 +745,8 @@ void func_display_80054300(Player* player) { break; case FORM_ON_FOOT: Matrix_Push(&gGfxMatrix); - Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, 1); - Matrix_RotateX(gGfxMatrix, M_PI / 2, 1); + Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_102A8A0); @@ -779,20 +781,20 @@ void func_display_8005478C(Player* player) { RCP_SetupDL_64(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 100); Matrix_Push(&gGfxMatrix); - Matrix_RotateZ(gGfxMatrix, player->unk_0F8 * M_DTOR, 1); + Matrix_RotateZ(gGfxMatrix, player->unk_0F8 * M_DTOR, MTXF_APPLY); if (player->form == FORM_LANDMASTER) { if (player->unk_194 <= 0.0f) { Matrix_Pop(&gGfxMatrix); return; } - Matrix_Scale(gGfxMatrix, player->unk_194, player->unk_194, 1.0f, 1); + Matrix_Scale(gGfxMatrix, player->unk_194, player->unk_194, 1.0f, MTXF_APPLY); } else { - Matrix_Scale(gGfxMatrix, player->unk_194, player->unk_194, 1.0f, 1); + Matrix_Scale(gGfxMatrix, player->unk_194, player->unk_194, 1.0f, MTXF_APPLY); } if ((gGameFrameCount % 2) != 0) { - Matrix_Scale(gGfxMatrix, 0.9f, 0.63f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 0.9f, 0.63f, 1.0f, MTXF_APPLY); } else { - Matrix_Scale(gGfxMatrix, 0.80999994f, 0.567f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 0.80999994f, 0.567f, 1.0f, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); func_display_8005465C(gLevelType); @@ -805,11 +807,11 @@ void func_display_80054914(Player* player) { Vec3f sp34; if (player->unk_280 != 0) { - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + player->unk_134 + 180.0f) * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + player->unk_134 + 180.0f) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_134 + player->unk_4D8) * M_DTOR), - 1); - Matrix_RotateZ(gCalcMatrix, -((player->unk_0F8 + player->unk_0F0 + player->unk_134) * M_DTOR), 1); - Matrix_Translate(gCalcMatrix, player->unk_084, player->unk_080, 0.0f, 1); + MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -((player->unk_0F8 + player->unk_0F0 + player->unk_134) * M_DTOR), MTXF_APPLY); + Matrix_Translate(gCalcMatrix, player->unk_084, player->unk_080, 0.0f, MTXF_APPLY); sp40.x = 0.0f; sp40.y = 0.0f; sp40.z = -30.0f; @@ -820,17 +822,17 @@ void func_display_80054914(Player* player) { } Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, player->pos.x + sp34.x, player->pos.y + sp34.y, - player->unk_138 + player->unk_144 + sp34.z, 1); - Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].unk_058, 1); - Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].unk_05C, 1); - Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 20.0f * sp4C * M_DTOR, 1); + player->unk_138 + player->unk_144 + sp34.z, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].camPitch, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 20.0f * sp4C * M_DTOR, MTXF_APPLY); if (player->form == FORM_ARWING) { - Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, 1); + Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, MTXF_APPLY); } else { - Matrix_Scale(gGfxMatrix, 1.2f, 1.2f, 1.2f, 1); + Matrix_Scale(gGfxMatrix, 1.2f, 1.2f, 1.2f, MTXF_APPLY); } if (player->unk_1F0 < 0) { - Matrix_RotateX(gGfxMatrix, M_PI, 1); + Matrix_RotateX(gGfxMatrix, M_PI, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL(&gMasterDisp, 0x43); @@ -845,8 +847,8 @@ void func_display_80054CA4(Player* player) { if (D_ctx_80177AB8[player->num] > 1.0f) { Matrix_Push(&gGfxMatrix); Matrix_Copy(gGfxMatrix, &D_display_80161418[player->num]); - Matrix_Translate(gGfxMatrix, 0.0f, -5.0f, 10.0f, 1); - Matrix_Scale(gGfxMatrix, 2.5f, 1.6f, 2.5f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, -5.0f, 10.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 2.5f, 1.6f, 2.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL(&gMasterDisp, 0x44); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 255, 255, (s32) D_ctx_80177AB8[player->num]); @@ -878,13 +880,13 @@ void func_display_80054E80(Player* player) { } Matrix_Push(&gGfxMatrix); sp80 = gChargeTimers[player->num] / 20.0f; - Matrix_Translate(gGfxMatrix, sp94.x, sp94.y, sp94.z, 0); - Matrix_Scale(gGfxMatrix, sp80, sp80, 1.0f, 1); + 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)) { - Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 3.0f, 1); + Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 3.0f, MTXF_APPLY); } else { - Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 10.0f, 1); + Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 10.0f, MTXF_APPLY); } RCP_SetupDL(&gMasterDisp, 0x31); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 128); @@ -906,21 +908,21 @@ void func_display_80054E80(Player* player) { } else { gDPSetEnvColor(gMasterDisp++, 0, 255, 0, 128); } - Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 53.0f * M_DTOR, 1); + Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 53.0f * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_101C2E0); - Matrix_RotateZ(gGfxMatrix, gGameFrameCount * -53.0f * 2.0f * M_DTOR, 1); + Matrix_RotateZ(gGfxMatrix, gGameFrameCount * -53.0f * 2.0f * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_101C2E0); Matrix_Pop(&gGfxMatrix); if ((player->cockpitView != 0) && (gLevelMode == LEVELMODE_ON_RAILS)) { - Matrix_Scale(gGfxMatrix, 0.3f, 0.3f, 0.3f, 1); + Matrix_Scale(gGfxMatrix, 0.3f, 0.3f, 0.3f, MTXF_APPLY); } - Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 1.0f, MTXF_APPLY); if (((gGameFrameCount % 2) == 0)) { - Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.0f, MTXF_APPLY); } else { - Matrix_Scale(gGfxMatrix, 1.3f, 1.3f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 1.3f, 1.3f, 1.0f, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); @@ -944,8 +946,8 @@ void func_display_80054E80(Player* player) { Matrix_MultVec3f(gCalcMatrix, &spC4, &sp94); } Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, sp94.x, sp94.y, sp94.z, 0); - Matrix_Scale(gGfxMatrix, D_ctx_80177AA0[player->num], D_ctx_80177AA0[player->num], 1.0f, 1); + Matrix_Translate(gGfxMatrix, sp94.x, sp94.y, sp94.z, MTXF_NEW); + Matrix_Scale(gGfxMatrix, D_ctx_80177AA0[player->num], D_ctx_80177AA0[player->num], 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); Matrix_Pop(&gGfxMatrix); @@ -962,14 +964,14 @@ void func_display_80054E80(Player* player) { Matrix_MultVec3f(gCalcMatrix, &spAC, &sp94); Matrix_MultVec3f(gCalcMatrix, &spA0, &sp88); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, sp94.x, sp94.y, sp94.z, 0); - Matrix_Scale(gGfxMatrix, D_ctx_80177AA0[player->num], D_ctx_80177AA0[player->num], 1.0f, 1); + Matrix_Translate(gGfxMatrix, sp94.x, sp94.y, sp94.z, MTXF_NEW); + Matrix_Scale(gGfxMatrix, D_ctx_80177AA0[player->num], D_ctx_80177AA0[player->num], 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, sp88.x, sp88.y, sp88.z, 0); - Matrix_Scale(gGfxMatrix, D_ctx_80177AA0[player->num], D_ctx_80177AA0[player->num], 1.0f, 1); + Matrix_Translate(gGfxMatrix, sp88.x, sp88.y, sp88.z, MTXF_NEW); + Matrix_Scale(gGfxMatrix, D_ctx_80177AA0[player->num], D_ctx_80177AA0[player->num], 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); Matrix_Pop(&gGfxMatrix); @@ -987,10 +989,10 @@ void func_display_80055788(Player* player) { Matrix_Push(&gGfxMatrix); sp54 = gChargeTimers[player->num] / 20.0f; Matrix_Translate(gGfxMatrix, D_display_80161548[player->num].x, D_display_80161548[player->num].y, - D_display_80161548[player->num].z, 0); - Matrix_Scale(gGfxMatrix, sp54, sp54, 1.0f, 1); + D_display_80161548[player->num].z, MTXF_NEW); + Matrix_Scale(gGfxMatrix, sp54, sp54, 1.0f, MTXF_APPLY); Matrix_Push(&gGfxMatrix); - Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 10.0f, 1); + Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 10.0f, MTXF_APPLY); RCP_SetupDL(&gMasterDisp, 0x31); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 128); if (gVersusMode) { @@ -1011,18 +1013,18 @@ void func_display_80055788(Player* player) { } else { gDPSetEnvColor(gMasterDisp++, 0, 255, 0, 128); } - Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 53.0f * M_DTOR, 1); + Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 53.0f * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_101C2E0); - Matrix_RotateZ(gGfxMatrix, gGameFrameCount * -53.0f * 2.0f * M_DTOR, 1); + Matrix_RotateZ(gGfxMatrix, gGameFrameCount * -53.0f * 2.0f * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_101C2E0); Matrix_Pop(&gGfxMatrix); - Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 1.0f, MTXF_APPLY); if (((gGameFrameCount % 2) == 0)) { - Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.0f, MTXF_APPLY); } else { - Matrix_Scale(gGfxMatrix, 1.3f, 1.3f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 1.3f, 1.3f, 1.0f, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); @@ -1036,14 +1038,17 @@ void func_display_80055B58(Player* player) { f32 var_fv0; s32 pad[3]; - if ((player->unk_234 != 0) && (player->state_1C8 != PLAYERSTATE_1C8_4)) { + if ((player->unk_234 != 0) && (player->state_1C8 != PLAYERSTATE_1C8_DOWN)) { switch (player->form) { case FORM_ARWING: - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + player->unk_134 + 180.0f) * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + player->unk_134 + 180.0f) * M_DTOR, + MTXF_NEW); Matrix_RotateX(gCalcMatrix, - -((player->unk_120 + player->unk_0E4 + player->unk_134 + player->unk_4D8) * M_DTOR), 1); - Matrix_RotateZ(gCalcMatrix, -((player->unk_0F8 + player->unk_0F0 + player->unk_134) * M_DTOR), 1); - Matrix_Translate(gCalcMatrix, player->unk_084, player->unk_080, 0.0f, 1); + -((player->unk_120 + player->unk_0E4 + player->unk_134 + player->unk_4D8) * M_DTOR), + MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -((player->unk_0F8 + player->unk_0F0 + player->unk_134) * M_DTOR), + MTXF_APPLY); + Matrix_Translate(gCalcMatrix, player->unk_084, player->unk_080, 0.0f, MTXF_APPLY); var_fv0 = player->unk_194 * 30.0f; if (var_fv0 > 30.0f) { var_fv0 = 30.0f; @@ -1056,9 +1061,9 @@ void func_display_80055B58(Player* player) { Matrix_MultVec3f(gCalcMatrix, &sp4C, &sp40); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, player->pos.x + sp40.x, player->pos.y + sp40.y, - player->unk_138 + player->unk_144 + sp40.z, 1); - Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].unk_058, 1); - Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].unk_05C, 1); + player->unk_138 + player->unk_144 + sp40.z, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].camPitch, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); func_display_8005478C(player); Matrix_Pop(&gGfxMatrix); @@ -1070,7 +1075,7 @@ void func_display_80055B58(Player* player) { func_display_80052D48(player); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, D_display_80161518[player->num].x, D_display_80161518[player->num].y, - D_display_80161518[player->num].z, 0); + D_display_80161518[player->num].z, MTXF_NEW); Matrix_SetGfxMtx(&gMasterDisp); func_display_8005478C(player); Matrix_Pop(&gGfxMatrix); @@ -1107,7 +1112,7 @@ void func_display_80055E98(Player* player) { } var_fs0 = var_fs0 * 0.25f; sp50 = player->unk_0E4 * 0.25f; - if (player->state_1C8 == PLAYERSTATE_1C8_7) { + if (player->state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) { var_fs0 = 0.0f; sp50 = 0.0f; } @@ -1115,26 +1120,26 @@ void func_display_80055E98(Player* player) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 100); if (player->wings.leftState == WINGSTATE_INTACT) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, sp5C, sp58, -100.0f, 1); - Matrix_RotateX(gGfxMatrix, M_DTOR * sp50, 1); - Matrix_RotateY(gGfxMatrix, -(M_DTOR * var_fs0), 1); - Matrix_Scale(gGfxMatrix, player->unk_25C, 1.0f, 50.0f, 1); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -17.5f, 1); - Matrix_RotateX(gGfxMatrix, M_PI / 2, 1); - Matrix_RotateY(gGfxMatrix, M_DTOR * sp54, 1); + Matrix_Translate(gGfxMatrix, sp5C, sp58, -100.0f, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_DTOR * sp50, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, -(M_DTOR * var_fs0), MTXF_APPLY); + Matrix_Scale(gGfxMatrix, player->unk_25C, 1.0f, 50.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -17.5f, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_DTOR * sp54, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_102A8A0); Matrix_Pop(&gGfxMatrix); } if (player->wings.rightState == WINGSTATE_INTACT) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, -sp5C, sp58, -100.0f, 1); - Matrix_RotateX(gGfxMatrix, M_DTOR * sp50, 1); - Matrix_RotateY(gGfxMatrix, -(M_DTOR * var_fs0), 1); - Matrix_Scale(gGfxMatrix, player->unk_25C, 1.0f, 50.0f, 1); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -17.5f, 1); - Matrix_RotateX(gGfxMatrix, M_PI / 2, 1); - Matrix_RotateY(gGfxMatrix, M_DTOR * sp54, 1); + Matrix_Translate(gGfxMatrix, -sp5C, sp58, -100.0f, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_DTOR * sp50, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, -(M_DTOR * var_fs0), MTXF_APPLY); + Matrix_Scale(gGfxMatrix, player->unk_25C, 1.0f, 50.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -17.5f, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_DTOR * sp54, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_102A8A0); Matrix_Pop(&gGfxMatrix); @@ -1146,11 +1151,11 @@ void func_display_80056230(Player* player) { if ((player->unk_234 != 0) && (player->form == FORM_ARWING) && (gCurrentLevel != LEVEL_VENOM_ANDROSS) && (gCurrentLevel != LEVEL_TRAINING) && (gLevelType == LEVELTYPE_PLANET)) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, player->pos.x, player->pos.y, player->unk_138 + player->unk_144, 1); - Matrix_RotateY(gGfxMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), 1); - Matrix_RotateZ(gGfxMatrix, -((player->unk_0F8 + player->unk_0F0 + player->unk_134) * M_DTOR), 1); - Matrix_Translate(gGfxMatrix, player->unk_084, player->unk_080, 0.0f, 1); + Matrix_Translate(gGfxMatrix, player->pos.x, player->pos.y, player->unk_138 + player->unk_144, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, -((player->unk_0F8 + player->unk_0F0 + player->unk_134) * M_DTOR), MTXF_APPLY); + Matrix_Translate(gGfxMatrix, player->unk_084, player->unk_080, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); func_display_80055E98(player); Matrix_Pop(&gGfxMatrix); @@ -1188,10 +1193,10 @@ void func_display_800564C0(Player* player, s32 arg1) { Matrix_Push(&gGfxMatrix); if (player->form == FORM_LANDMASTER) { if (player->unk_1D4 != 0) { - Matrix_Translate(gGfxMatrix, 0.0f, gCameraShakeY, 0.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, gCameraShakeY, 0.0f, MTXF_APPLY); } Matrix_Translate(gGfxMatrix, player->pos.x, player->pos.y + player->unk_18C + 30.0f, - player->unk_138 + player->unk_144, 1); + player->unk_138 + player->unk_144, MTXF_APPLY); if (gVersusMode) { for (i = 0; i < gCamCount; i++) { if (D_ctx_80177B00[player->num][i] != 0) { @@ -1210,18 +1215,18 @@ void func_display_800564C0(Player* player, s32 arg1) { Matrix_Pop(&gGfxMatrix); return; } - Matrix_RotateX(gGfxMatrix, (player->unk_0E4 + player->unk_134) * M_DTOR, 1); - Matrix_RotateZ(gGfxMatrix, (player->unk_0EC + player->unk_0F0 + player->unk_134) * M_DTOR, 1); - Matrix_RotateY(gGfxMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, 1); + Matrix_RotateX(gGfxMatrix, (player->unk_0E4 + player->unk_134) * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, (player->unk_0EC + player->unk_0F0 + player->unk_134) * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_APPLY); if (gVersusMode) { - Matrix_RotateX(gGfxMatrix, player->unk_000 * M_DTOR, 1); + Matrix_RotateX(gGfxMatrix, player->unk_000 * M_DTOR, MTXF_APPLY); } - Matrix_RotateZ(gGfxMatrix, (-player->unk_12C - player->unk_130) * M_DTOR, 1); - Matrix_Translate(gGfxMatrix, player->unk_084, player->unk_080 - 30.0f, 0.0f, 1); + Matrix_RotateZ(gGfxMatrix, (-player->unk_12C - player->unk_130) * M_DTOR, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, player->unk_084, player->unk_080 - 30.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); } else if (player->form == FORM_ON_FOOT) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, player->pos.x, player->pos.y, player->unk_138 + player->unk_144, 1); + Matrix_Translate(gGfxMatrix, player->pos.x, player->pos.y, player->unk_138 + player->unk_144, MTXF_APPLY); if (!func_display_800563B4(player->num, arg1)) { Matrix_Pop(&gGfxMatrix); Matrix_Pop(&gGfxMatrix); @@ -1229,13 +1234,14 @@ void func_display_800564C0(Player* player, s32 arg1) { } Matrix_Pop(&gGfxMatrix); Matrix_Translate(gCalcMatrix, player->pos.x, player->pos.y + gCameraShakeY, - player->unk_138 + player->unk_144, 0); - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + player->unk_134 + 180.0f) * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_134) * M_DTOR), 1); - Matrix_RotateZ(gCalcMatrix, -((player->unk_0F8 + player->unk_0F0 + player->unk_134) * M_DTOR), 1); - Matrix_Translate(gCalcMatrix, player->unk_084, player->unk_080, 0.0f, 1); + player->unk_138 + player->unk_144, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + player->unk_134 + 180.0f) * M_DTOR, + MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_134) * M_DTOR), MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -((player->unk_0F8 + player->unk_0F0 + player->unk_134) * M_DTOR), MTXF_APPLY); + Matrix_Translate(gCalcMatrix, player->unk_084, player->unk_080, 0.0f, MTXF_APPLY); } else { - Matrix_Translate(gGfxMatrix, player->pos.x, player->pos.y, player->unk_138 + player->unk_144, 1); + Matrix_Translate(gGfxMatrix, player->pos.x, player->pos.y, player->unk_138 + player->unk_144, MTXF_APPLY); if (gVersusMode) { for (i = 0; i < gCamCount; i++) { if (D_ctx_80177B00[player->num][i] != 0) { @@ -1254,11 +1260,13 @@ void func_display_800564C0(Player* player, s32 arg1) { Matrix_Pop(&gGfxMatrix); return; } - Matrix_RotateY(gGfxMatrix, (player->unk_114 + player->unk_0E8 + player->unk_134 + 180.0f) * M_DTOR, 1); + Matrix_RotateY(gGfxMatrix, (player->unk_114 + player->unk_0E8 + player->unk_134 + 180.0f) * M_DTOR, + MTXF_APPLY); Matrix_RotateX(gGfxMatrix, - -((player->unk_120 + player->unk_0E4 + player->unk_4D8 + player->unk_134) * M_DTOR), 1); - Matrix_RotateZ(gGfxMatrix, -((player->unk_0F8 + player->unk_0F0 + player->unk_134) * M_DTOR), 1); - Matrix_Translate(gGfxMatrix, player->unk_084, player->unk_080, 0.0f, 1); + -((player->unk_120 + player->unk_0E4 + player->unk_4D8 + player->unk_134) * M_DTOR), + MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, -((player->unk_0F8 + player->unk_0F0 + player->unk_134) * M_DTOR), MTXF_APPLY); + Matrix_Translate(gGfxMatrix, player->unk_084, player->unk_080, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); } switch (player->unk_200) { @@ -1319,33 +1327,35 @@ void func_display_80056E2C(Player* player) { Matrix_Push(&gGfxMatrix); if (gLevelMode == LEVELMODE_ALL_RANGE) { if (player->form == FORM_ON_FOOT) { - Matrix_Translate(gGfxMatrix, player->unk_064, player->unk_068 + 2.0f, player->unk_06C, 1); + Matrix_Translate(gGfxMatrix, player->unk_064, player->unk_068 + 2.0f, player->unk_06C, MTXF_APPLY); } else { - Matrix_Translate(gGfxMatrix, player->unk_064, player->unk_068 + 2.0f, player->unk_06C, 1); + Matrix_Translate(gGfxMatrix, player->unk_064, player->unk_068 + 2.0f, player->unk_06C, MTXF_APPLY); } } else { - Matrix_Translate(gGfxMatrix, player->unk_064, player->unk_068 + 2.0f, player->unk_06C + player->unk_144, 1); + Matrix_Translate(gGfxMatrix, player->unk_064, player->unk_068 + 2.0f, player->unk_06C + player->unk_144, + MTXF_APPLY); } - Matrix_RotateY(gGfxMatrix, player->unk_070, 1); - Matrix_RotateX(gGfxMatrix, player->unk_248, 1); - Matrix_RotateZ(gGfxMatrix, player->unk_24C, 1); - Matrix_Scale(gGfxMatrix, 0.8f + sp34, 0.0f, 0.8f + sp30, 1); + Matrix_RotateY(gGfxMatrix, player->unk_070, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, player->unk_248, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, player->unk_24C, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.8f + sp34, 0.0f, 0.8f + sp30, MTXF_APPLY); if ((player->form == FORM_ARWING) || (player->form == FORM_BLUE_MARINE) || (player->form == FORM_ON_FOOT)) { sp2C = player->unk_0F8 + player->unk_0F0 + player->unk_134; if (((sp2C > 70.0f) && (sp2C < 110.0f)) || ((sp2C < -70.0f) && (sp2C > -110.0f))) { sp2C = 70.0f; } - Matrix_RotateY(gGfxMatrix, -player->unk_070, 1); - Matrix_RotateY(gGfxMatrix, (player->unk_114 + player->unk_0E8 + player->unk_134) * M_DTOR, 1); + Matrix_RotateY(gGfxMatrix, -player->unk_070, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, (player->unk_114 + player->unk_0E8 + player->unk_134) * M_DTOR, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, - -((player->unk_120 + player->unk_0E4 + player->unk_4D8 + player->unk_134) * M_DTOR), 1); - Matrix_RotateZ(gGfxMatrix, M_DTOR * sp2C, 1); + -((player->unk_120 + player->unk_0E4 + player->unk_4D8 + player->unk_134) * M_DTOR), + MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, M_DTOR * sp2C, MTXF_APPLY); } else { - Matrix_RotateY(gGfxMatrix, player->unk_114 * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, (player->unk_0E4 + player->unk_4D8 + player->unk_134) * M_DTOR, 1); - Matrix_RotateZ(gGfxMatrix, (player->unk_0EC + player->unk_0F0 + player->unk_134) * M_DTOR, 1); - Matrix_RotateY(gGfxMatrix, player->unk_0E8 * M_DTOR, 1); - Matrix_RotateZ(gGfxMatrix, (-player->unk_12C - player->unk_130) * M_DTOR, 1); + Matrix_RotateY(gGfxMatrix, player->unk_114 * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, (player->unk_0E4 + player->unk_4D8 + player->unk_134) * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, (player->unk_0EC + player->unk_0F0 + player->unk_134) * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, player->unk_0E8 * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, (-player->unk_12C - player->unk_130) * M_DTOR, MTXF_APPLY); } func_display_80054300(player); Matrix_Pop(&gGfxMatrix); @@ -1368,12 +1378,12 @@ void func_display_80057248(void) { } Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, gTeamArrowsViewPos[i].x, gTeamArrowsViewPos[i].y, gTeamArrowsViewPos[i].z, - 1); - Matrix_Scale(gGfxMatrix, var_fs0 * 0.25f, var_fs0 * 0.25f, 1.0f, 1); + MTXF_APPLY); + Matrix_Scale(gGfxMatrix, var_fs0 * 0.25f, var_fs0 * 0.25f, 1.0f, MTXF_APPLY); if ((i == 0) && (gCurrentLevel == LEVEL_SECTOR_Z)) { - Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 1.0f, MTXF_APPLY); } - Matrix_Translate(gGfxMatrix, 0.0f, 150.0f, 0.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 150.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetTextureFilter(gMasterDisp++, G_TF_POINT); if ((i == 0) && (gCurrentLevel == LEVEL_SECTOR_Z)) { @@ -1408,14 +1418,14 @@ void func_display_80057504(void) { } Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, D_display_80161578[i].x, D_display_80161578[i].y, D_display_80161578[i].z, - 1); + MTXF_APPLY); if ((gPlayState != PLAY_PAUSE) && (i == gPlayerNum)) { Math_SmoothStepToF(&D_display_801615A8[i], 0.0f, 0.5f, 20.0f, 0); Math_SmoothStepToF(&D_display_801615B8[i], 1.0, 0.5f, 0.2f, 0); } var_fs0 *= D_display_801615B8[i]; - Matrix_Scale(gGfxMatrix, var_fs0 * 1.5f, var_fs0 * 1.5f, 1.0f, 1); - Matrix_RotateZ(gGfxMatrix, D_display_801615A8[i] * M_DTOR, 1); + Matrix_Scale(gGfxMatrix, var_fs0 * 1.5f, var_fs0 * 1.5f, 1.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, D_display_801615A8[i] * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL(&gMasterDisp, 0x43); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); @@ -1462,24 +1472,24 @@ void func_display_800578C4(Player* player) { case 0: Math_SmoothStepToAngle(&player->wings.unk_30, 0.0f, 0.2f, 3.0f, 0.0f); Math_SmoothStepToAngle(&player->wings.unk_34, 0.0f, 0.2f, 3.0f, 0.0f); - gPlayerCamEye.x = player->camEye.x; - gPlayerCamEye.y = player->camEye.y; - gPlayerCamEye.z = player->camEye.z; - gPlayerCamAt.x = player->camAt.x; - gPlayerCamAt.y = player->camAt.y; - gPlayerCamAt.z = player->camAt.z; + gPlayerCamEye.x = player->cam.eye.x; + gPlayerCamEye.y = player->cam.eye.y; + gPlayerCamEye.z = player->cam.eye.z; + gPlayerCamAt.x = player->cam.at.x; + gPlayerCamAt.y = player->cam.at.y; + gPlayerCamAt.z = player->cam.at.z; break; case 1: case 2: case 3: - sp38 = Math_RadToDeg(player->unk_05C) + player->unk_0E4; + sp38 = Math_RadToDeg(player->camPitch) + player->unk_0E4; if (sp38 > 360.0f) { sp38 -= 360.0f; } if (sp38 < 0.0f) { sp38 += 360.0f; } - sp3C = (Math_RadToDeg(player->unk_058) + 180.0f) - player->unk_0E8; + sp3C = (Math_RadToDeg(player->camYaw) + 180.0f) - player->unk_0E8; if (sp3C > 360.0f) { sp3C -= 360.0f; } @@ -1493,8 +1503,8 @@ void func_display_800578C4(Player* player) { Math_SmoothStepToF(&D_display_800CA384, gControllerPress->stick_x * 3.0f, 0.1f, 5.0f, 0.0f); Math_SmoothStepToF(&D_display_800CA388, D_display_800CA38C[D_display_800CA220], 0.1f, 10.0f, 0.0f); sp4C.z = D_display_800CA388; - Matrix_RotateX(gCalcMatrix, (player->unk_0E8 + D_display_800CA380) * M_DTOR, 0); - Matrix_RotateY(gCalcMatrix, (player->unk_0E4 + D_display_800CA384) * M_DTOR, 1); + Matrix_RotateX(gCalcMatrix, (player->unk_0E8 + D_display_800CA380) * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, (player->unk_0E4 + D_display_800CA384) * M_DTOR, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &sp4C, &sp40); gPlayerCamEye.x = player->pos.x + sp40.x; gPlayerCamEye.y = player->pos.y + sp40.y + 20.0f; @@ -1515,40 +1525,40 @@ void Play_Draw(void) { Player* opponent; Player* player = &gPlayer[gPlayerNum]; - D_display_800CA228 = 0; + sDrawCockpit = 0; if (gHitCount > 511) { gHitCount = 511; } Matrix_Push(&gGfxMatrix); - if ((gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3)) { + if ((gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { Math_SmoothStepToF(&D_display_800CA230, 0.01f, 0.2f, 0.002f, 0.0f); } else { Math_SmoothStepToF(&D_display_800CA230, 0.0f, 0.2f, 0.002f, 0.0f); } - Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 10.0f * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, 1.0f + D_display_800CA230, 1.0f - D_display_800CA230, 1.0f, 1); - Matrix_RotateZ(gGfxMatrix, -(f32) gGameFrameCount * 10.0f * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, 1.0f + D_display_800CA230, 1.0f - D_display_800CA230, 1.0f, 1); + Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 10.0f * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 1.0f + D_display_800CA230, 1.0f - D_display_800CA230, 1.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, -(f32) gGameFrameCount * 10.0f * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 1.0f + D_display_800CA230, 1.0f - D_display_800CA230, 1.0f, MTXF_APPLY); Matrix_Push(&gGfxMatrix); func_play_800B73E0(player); Lights_SetOneLight(&gMasterDisp, gLight1x, gLight1y, gLight1z, gLight1R, gLight1G, gLight1B, gAmbientR, gAmbientG, gAmbientB); if (gLevelMode == LEVELMODE_ON_RAILS) { - Matrix_RotateY(gCalcMatrix, player->unk_114 * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, player->unk_120 * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, player->unk_114 * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, player->unk_120 * M_DTOR, MTXF_APPLY); - tempVec.x = player->camEye.x - player->pos.x; - tempVec.y = player->camEye.y - player->pos.y; - tempVec.z = player->camEye.z - (player->unk_138 + player->unk_144); + tempVec.x = player->cam.eye.x - player->pos.x; + tempVec.y = player->cam.eye.y - player->pos.y; + tempVec.z = player->cam.eye.z - (player->unk_138 + player->unk_144); Matrix_MultVec3f(gCalcMatrix, &tempVec, &gPlayerCamEye); gPlayerCamEye.x += player->pos.x; gPlayerCamEye.y += player->pos.y; gPlayerCamEye.z += player->unk_138 + player->unk_144; - tempVec.x = player->camAt.x - player->pos.x; - tempVec.y = player->camAt.y - player->pos.y; - tempVec.z = player->camAt.z - (player->unk_138 + player->unk_144); + tempVec.x = player->cam.at.x - player->pos.x; + tempVec.y = player->cam.at.y - player->pos.y; + tempVec.z = player->cam.at.z - (player->unk_138 + player->unk_144); Matrix_MultVec3f(gCalcMatrix, &tempVec, &gPlayerCamAt); gPlayerCamAt.x += player->pos.x; gPlayerCamAt.y += player->pos.y; @@ -1557,28 +1567,28 @@ void Play_Draw(void) { if ((player->cockpitView != 0) && (player->unk_110 > 5.0f)) { gPlayerCamAt.x += SIN_DEG(gGameFrameCount * 150.0f) * player->unk_110 * 0.2f; } - } else if (player->state_1C8 == PLAYERSTATE_1C8_7) { + } else if (player->state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) { func_display_800578C4(player); } else { - gPlayerCamEye.x = player->camEye.x; - gPlayerCamEye.y = player->camEye.y; - gPlayerCamEye.z = player->camEye.z; - gPlayerCamAt.x = player->camAt.x; - gPlayerCamAt.y = player->camAt.y; - gPlayerCamAt.z = player->camAt.z; + gPlayerCamEye.x = player->cam.eye.x; + gPlayerCamEye.y = player->cam.eye.y; + gPlayerCamEye.z = player->cam.eye.z; + gPlayerCamAt.x = player->cam.at.x; + gPlayerCamAt.y = player->cam.at.y; + gPlayerCamAt.z = player->cam.at.z; } - player->unk_058 = -Math_Atan2F(gPlayerCamEye.x - gPlayerCamAt.x, gPlayerCamEye.z - gPlayerCamAt.z); - player->unk_05C = -Math_Atan2F(gPlayerCamEye.y - gPlayerCamAt.y, - sqrtf(SQ(gPlayerCamEye.z - gPlayerCamAt.z) + SQ(gPlayerCamEye.x - gPlayerCamAt.x))); - Matrix_RotateY(gCalcMatrix, -player->unk_058, 0); - Matrix_RotateX(gCalcMatrix, player->unk_05C, 1); - Matrix_RotateZ(gCalcMatrix, -player->unk_034 * M_DTOR, 1); + player->camYaw = -Math_Atan2F(gPlayerCamEye.x - gPlayerCamAt.x, gPlayerCamEye.z - gPlayerCamAt.z); + player->camPitch = -Math_Atan2F(gPlayerCamEye.y - gPlayerCamAt.y, + sqrtf(SQ(gPlayerCamEye.z - gPlayerCamAt.z) + SQ(gPlayerCamEye.x - gPlayerCamAt.x))); + Matrix_RotateY(gCalcMatrix, -player->camYaw, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, player->camPitch, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -player->camRoll * M_DTOR, MTXF_APPLY); tempVec.x = 0.0f; tempVec.y = 100.0f; tempVec.z = 0.0f; Matrix_MultVec3f(gCalcMatrix, &tempVec, &playerCamUp); if (D_ctx_80178410 != 0) { - D_ctx_80178428 = DEG_TO_RAD(gPlayer[0].unk_034); + D_ctx_80178428 = DEG_TO_RAD(gPlayer[0].camRoll); func_play_800B6F50(gPlayerCamEye.x, gPlayerCamEye.y, gPlayerCamEye.z, gPlayerCamAt.x, gPlayerCamAt.y, gPlayerCamAt.z); func_bg_8003DAF0(); @@ -1587,12 +1597,12 @@ void Play_Draw(void) { func_bg_80040450(); Matrix_Push(&gGfxMatrix); Matrix_LookAt(gGfxMatrix, gPlayerCamEye.x, gPlayerCamEye.y, gPlayerCamEye.z, gPlayerCamAt.x, gPlayerCamAt.y, - gPlayerCamAt.z, playerCamUp.x, playerCamUp.y, playerCamUp.z, 1); + gPlayerCamAt.z, playerCamUp.x, playerCamUp.y, playerCamUp.z, MTXF_APPLY); if ((gLevelType == LEVELTYPE_PLANET) || (gCurrentLevel == LEVEL_BOLSE)) { if ((gCurrentLevel == LEVEL_TITANIA) && - ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2) || (gPlayer[0].unk_19C != 0))) { + ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO) || (gPlayer[0].unk_19C != 0))) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, gCameraShakeY, 0.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, gCameraShakeY, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); Ground_801B58AC(&gMasterDisp, D_ctx_80177CC8); D_ctx_80177CC8 = 0.0f; @@ -1612,11 +1622,11 @@ void Play_Draw(void) { func_display_800564C0(opponent, 0); func_display_80057814(opponent); } - if ((gGroundType == GROUNDTYPE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2)) { + if ((gGroundType == GROUNDTYPE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) { Lights_SetOneLight(&gMasterDisp, gLight2x, -1 * gLight2y, gLight2z, gLight2R, gLight2G, gLight2B, gAmbientR, gAmbientG, gAmbientB); Matrix_Push(&gGfxMatrix); - Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, MTXF_APPLY); for (i = 0, opponent = gPlayer; i < gCamCount; i++, opponent++) { opponentPos.x = opponent->pos.x; opponentPos.y = opponent->pos.y; @@ -1631,17 +1641,17 @@ void Play_Draw(void) { TexturedLine_Draw(); gReflectY = 1; PlayerShot_Draw(); - if ((gGroundType == GROUNDTYPE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2)) { + if ((gGroundType == GROUNDTYPE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) { Matrix_Push(&gGfxMatrix); - Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, MTXF_APPLY); gReflectY = -1; PlayerShot_Draw(); Matrix_Pop(&gGfxMatrix); } gReflectY = -1; - if ((gGroundType == GROUNDTYPE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2)) { + if ((gGroundType == GROUNDTYPE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) { Matrix_Push(&gGfxMatrix); - Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, MTXF_APPLY); for (i = 0, opponent = gPlayer; i < gCamCount; i++, opponent++) { if (sPlayersVisible[i] != 0) { func_display_80055B58(opponent); @@ -1660,7 +1670,8 @@ void Play_Draw(void) { } if ((gCurrentLevel != LEVEL_AQUAS) && (((gCurrentLevel != LEVEL_CORNERIA) && (gCurrentLevel != LEVEL_VENOM_ANDROSS)) || - ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2)))) { + ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) && + (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)))) { Effect_Draw(0); } gReflectY = 1; @@ -1671,18 +1682,19 @@ void Play_Draw(void) { func_display_80056230(opponent); } } - if ((gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3)) { + if ((gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { Aquas_801AA20C(); } if (((gCurrentLevel == LEVEL_CORNERIA) || (gCurrentLevel == LEVEL_VENOM_ANDROSS)) && - ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2))) { + ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) || + (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO))) { Effect_Draw(0); } BonusText_DrawAll(); Matrix_Pop(&gGfxMatrix); func_display_80057248(); func_display_80057504(); - if (D_display_800CA228 != 0) { + if (sDrawCockpit != 0) { func_display_80053B18(); } for (i = 0, opponent = gPlayer; i < gCamCount; i++, opponent++) { @@ -1697,11 +1709,12 @@ void Play_Draw(void) { } } } - if ((gLevelMode == LEVELMODE_UNK_2) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3)) { + if ((gLevelMode == LEVELMODE_UNK_2) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { Turret_801A6164(gPlayer); } func_bg_80040954(); - if ((gCamCount != 1) && ((player->state_1C8 == PLAYERSTATE_1C8_3) || (player->state_1C8 == PLAYERSTATE_1C8_5))) { + if ((gCamCount != 1) && + ((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (player->state_1C8 == PLAYERSTATE_1C8_U_TURN))) { func_hud_8008FA84(); func_hud_8008CA44(); } diff --git a/src/engine/fox_edata.c b/src/engine/fox_edata.c index ef1ff097..c5e08d6a 100644 --- a/src/engine/fox_edata.c +++ b/src/engine/fox_edata.c @@ -6,7 +6,7 @@ f32* D_edata_800CF964[] = { NULL }; void func_edata_800594F0(Object_80* obj80) { RCP_SetupDL_57(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); - Matrix_RotateY(gGfxMatrix, M_PI, 1); + Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_VE1_6007D90); RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); @@ -14,7 +14,7 @@ void func_edata_800594F0(Object_80* obj80) { void func_edata_800595D0(Object_80* obj80) { RCP_SetupDL_57(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); - Matrix_RotateY(gGfxMatrix, M_PI, 1); + Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_VE1_6007CF0); RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); diff --git a/src/engine/fox_edata_info.c b/src/engine/fox_edata_info.c index fffa8a53..6d684587 100644 --- a/src/engine/fox_edata_info.c +++ b/src/engine/fox_edata_info.c @@ -364,8 +364,8 @@ ObjectInfo D_edata_800CC124[0x190] = { /* OBJ_ACTOR_268 */ {(void*) Aquas_801BDE6C, 1, (ObjectFunc) Aquas_801BD54C, D_AQ_6031570, 10000.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ACTOR_269 */ {(void*) Aquas_801BD264, 1, (ObjectFunc) Aquas_801BC9A0, D_AQ_6030D20, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_270 */ {(void*) Aquas_801BEB1C, 1, (ObjectFunc) Aquas_801BE3F8, D_AQ_60314C8, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_271 */ {(void*) func_360_8002E694, 2, (ObjectFunc) func_360_8002E670, D_BO_6011B24, 0.0f, 0, 0, 39, 0, 730.0f, 1 }, - /* OBJ_ACTOR_272 */ {(void*) func_360_8002E6DC, 1, (ObjectFunc) func_360_8002E6B8, D_BO_6011BF4, 0.0f, 0, 0, 39, 0, 150.0f, 1 }, + /* OBJ_ACTOR_271 */ {(void*) Actor271_Draw, 2, (ObjectFunc) Actor271_Update, D_BO_6011B24, 0.0f, 0, 0, 39, 0, 730.0f, 1 }, + /* OBJ_ACTOR_272 */ {(void*) Actor272_Draw, 1, (ObjectFunc) Actor272_Update, D_BO_6011BF4, 0.0f, 0, 0, 39, 0, 150.0f, 1 }, /* OBJ_ACTOR_273 */ {(void*) Fortuna_80188FE4, 2, (ObjectFunc) Fortuna_80188AD0, D_FO_600FF30, 0.0f, 0, 0, 39, 0, 220.0f, 1 }, /* OBJ_ACTOR_274 */ {(void*) SectorZ_8019E3A8, 1, (ObjectFunc) SectorZ_8019E234, gDefaultCubeHitbox200, 0.0f, 0, 0, 39, 0, 1.0f, 0 }, /* OBJ_ACTOR_275 */ {(void*) Solar_8019F7AC, 1, (ObjectFunc) Solar_8019F20C, gDefaultCubeHitbox100, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, @@ -402,8 +402,8 @@ ObjectInfo D_edata_800CC124[0x190] = { /* OBJ_BOSS_306 */ {(void*) Titania_801982A8, 1, (ObjectFunc) Titania_80197A94,D_TI_801B83A8, 1000.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_ZO */ {(void*) Zoness_801949DC, 2, (ObjectFunc) Zoness_80194A84, D_ZO_602C044, 1000.0f, 0, 0, 40, 0, 1.0f, 10 }, /* OBJ_BOSS_308 */ {(void*) func_hud_8008FE78, 1, (ObjectFunc) func_hud_800907C4, D_FO_600FFE0, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, - /* OBJ_BOSS_309 */ {(void*) func_360_8002E604, 1, (ObjectFunc) func_360_8002E5E0, gHitboxNone, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, - /* OBJ_BOSS_310 */ {(void*) func_360_8002E64C, 1, (ObjectFunc) func_360_8002E628, gHitboxNone, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, + /* OBJ_BOSS_309 */ {(void*) Boss309_Draw, 1, (ObjectFunc) Boss309_Update, gHitboxNone, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, + /* OBJ_BOSS_310 */ {(void*) Boss310_Draw, 1, (ObjectFunc) Boss310_Update, gHitboxNone, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_311 */ {(void*) Bolse_80191AFC, 2, (ObjectFunc) Bolse_801912FC, D_BO_6011C80, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_312 */ {(void*) Venom2_80196288, 2, (ObjectFunc) Venom2_80196210, D_VE2_60166F4, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_313 */ {(void*) SectorZ_8019E98C, 1, (ObjectFunc) SectorZ_8019E454, D_SZ_6009388, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, diff --git a/src/engine/fox_edisplay.c b/src/engine/fox_edisplay.c index 29d1506b..4e8f6a9c 100644 --- a/src/engine/fox_edisplay.c +++ b/src/engine/fox_edisplay.c @@ -31,10 +31,10 @@ WingInfo D_edisplay_80161630; char D_edisplay_800CF970[] = "$Id: fox_edisplay.c,v 1.196 1997/05/08 08:31:50 morita Exp $"; void func_edisplay_800596C0(void) { - Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 13.0f * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, 1.02f, 0.98f, 1.0f, 1); - Matrix_RotateZ(gGfxMatrix, -(f32) gGameFrameCount * 13.0f * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, 1.02f, 0.98f, 1.0f, 1); + Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 13.0f * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 1.02f, 0.98f, 1.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, -(f32) gGameFrameCount * 13.0f * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 1.02f, 0.98f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); } @@ -46,7 +46,7 @@ void func_edisplay_800597C0(s32 arg0) { } void Graphics_SetScaleMtx(f32 scale) { - Matrix_Scale(gGfxMatrix, scale, scale, scale, 1); + Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); } @@ -92,7 +92,7 @@ void Actor202_Draw(Actor202* this) { Vec3f sp30[30]; f32 temp = D_edisplay_800CF9B0[this->unk_0B6] - 114.0f; - Matrix_Translate(gGfxMatrix, 0.f, -temp, 0.0f, 1); + Matrix_Translate(gGfxMatrix, 0.f, -temp, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); Animation_GetFrameData(&D_ME_601E8C4, this->unk_0B6, sp30); Animation_DrawSkeleton(1, D_ME_601E9D0, sp30, NULL, func_edisplay_800599A4, &this->index, &gIdentityMatrix); @@ -135,33 +135,33 @@ void FogShadow_Draw(FogShadow* this) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 180); switch (this->unk_45) { case OBJ_80_0: - Matrix_Scale(gGfxMatrix, 2.0f, 1.0f, 0.7f, 1); + Matrix_Scale(gGfxMatrix, 2.0f, 1.0f, 0.7f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_6034B90); break; case OBJ_80_21: - Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.7f, 1); + Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.7f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_6034B90); break; case OBJ_80_6: case OBJ_80_7: - Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 10.55f, 1); + Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 10.55f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_Gfx_800DAC20); break; case OBJ_80_56: - Matrix_Scale(gGfxMatrix, 1.6f, 1.0f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 1.6f, 1.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_6034B90); break; case OBJ_80_20: - Matrix_Scale(gGfxMatrix, 1.2f, 1.0f, 1.3f, 1); + Matrix_Scale(gGfxMatrix, 1.2f, 1.0f, 1.3f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_6034B90); break; case OBJ_80_22: - Matrix_Scale(gGfxMatrix, 2.2f, 1.0f, 1.4f, 1); + Matrix_Scale(gGfxMatrix, 2.2f, 1.0f, 1.4f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_6034B90); break; @@ -170,7 +170,7 @@ void FogShadow_Draw(FogShadow* this) { } void func_edisplay_80059F68(Object_80* obj80) { - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -95.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -95.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_602DA20); } @@ -181,7 +181,7 @@ void func_edisplay_80059FDC(Object_80* obj80) { void func_edisplay_8005A010(Sprite* sprite) { if (sprite->unk_48 == 0) { - Matrix_RotateY(gGfxMatrix, M_PI / 2, 1); + Matrix_RotateY(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_60361F0); } @@ -239,14 +239,14 @@ Gfx* D_edisplay_800CFC7C[] = { D_ZO_601B570, D_ZO_601B710, D_ZO_60209B0, D_ZO_60 void Actor189_Draw(Actor189* this) { switch (this->state) { case 0: - Matrix_Translate(gGfxMatrix, 18.0f, 15.0f, -15.0f, 1); - Matrix_RotateY(gGfxMatrix, M_PI, 1); + Matrix_Translate(gGfxMatrix, 18.0f, 15.0f, -15.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_arwing_3016660); break; case 1: - Matrix_Translate(gGfxMatrix, -18.0f, 15.0f, -15.0f, 1); - Matrix_RotateY(gGfxMatrix, M_PI, 1); + Matrix_Translate(gGfxMatrix, -18.0f, 15.0f, -15.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_arwing_3015D80); break; @@ -439,13 +439,13 @@ void func_edisplay_8005ADAC(Actor* actor) { sp5C *= 1.111f; } Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, 1); - Matrix_Scale(gGfxMatrix, sp5C, sp5C * 0.7f, sp5C, 1); - Matrix_RotateZ(gGfxMatrix, -actor->obj.rot.z * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, -actor->obj.rot.x * M_DTOR, 1); - Matrix_RotateY(gGfxMatrix, -actor->obj.rot.y * M_DTOR, 1); - Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].unk_058, 1); - Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].unk_05C, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, sp5C, sp5C * 0.7f, sp5C, 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, -actor->obj.rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].camPitch, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); func_display_8005465C(gLevelType); Matrix_Pop(&gGfxMatrix); @@ -459,20 +459,20 @@ void func_edisplay_8005ADAC(Actor* actor) { RCP_SetupDL_64_2(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 100); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 70.0f, -10.0f, -100.0f, 1); - Matrix_Scale(gGfxMatrix, sp5C, 1.0f, 50.0f, 1); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -17.5f, 1); - Matrix_RotateX(gGfxMatrix, M_PI / 2, 1); - Matrix_RotateY(gGfxMatrix, M_DTOR * sp54, 1); + Matrix_Translate(gGfxMatrix, 70.0f, -10.0f, -100.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, sp5C, 1.0f, 50.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -17.5f, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_DTOR * sp54, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_102A8A0); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, -70.0f, -10.0f, -100.0f, 1); - Matrix_Scale(gGfxMatrix, sp5C, 1.0f, 50.0f, 1); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -17.5f, 1); - Matrix_RotateX(gGfxMatrix, M_PI / 2, 1); - Matrix_RotateY(gGfxMatrix, M_DTOR * sp54, 1); + Matrix_Translate(gGfxMatrix, -70.0f, -10.0f, -100.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, sp5C, 1.0f, 50.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -17.5f, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_DTOR * sp54, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_102A8A0); Matrix_Pop(&gGfxMatrix); @@ -495,11 +495,11 @@ void func_edisplay_8005B1E8(Actor* actor, s32 levelType) { scale *= 1.2f; } Matrix_Push(&gGfxMatrix); - Matrix_Scale(gGfxMatrix, scale, scale, scale, 1); - Matrix_RotateZ(gGfxMatrix, -actor->obj.rot.z * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, -actor->obj.rot.x * M_DTOR, 1); - Matrix_RotateY(gGfxMatrix, -actor->obj.rot.y * M_DTOR, 1); - Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].unk_058, 1); + Matrix_Scale(gGfxMatrix, scale, scale, scale, 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, -actor->obj.rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); func_display_8005465C(levelType); Matrix_Pop(&gGfxMatrix); @@ -512,15 +512,15 @@ void func_edisplay_8005B388(Actor* actor) { Matrix_MultVec3f(gGfxMatrix, &sp3C, &sp30); if ((((fabsf(sp30.z) < 3000.0f) && (fabsf(sp30.x) < 3000.0f) && (gBossActive == 0)) || - (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_0) || (gCurrentLevel == LEVEL_VENOM_ANDROSS) || - (gCurrentLevel == LEVEL_VENOM_2) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7)) && + (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) || (gCurrentLevel == LEVEL_VENOM_ANDROSS) || + (gCurrentLevel == LEVEL_VENOM_2) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) && (gCurrentLevel != LEVEL_MACBETH) && (gCurrentLevel != LEVEL_TITANIA)) { if (actor->obj.id == OBJ_ACTOR_195) { - if (((gCurrentLevel == LEVEL_VENOM_2) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) && + if (((gCurrentLevel == LEVEL_VENOM_2) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) && (actor->index == 10)) || - ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) && (gPlayer[0].unk_1D0 >= 100) && + ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) && (gPlayer[0].unk_1D0 >= 100) && (gCurrentLevel == LEVEL_KATINA) && (actor->index == 1)) || - ((gCurrentLevel == LEVEL_SECTOR_Y) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_0) && + ((gCurrentLevel == LEVEL_SECTOR_Y) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) && (actor->state == 5))) { D_edisplay_80161630.rightState = gPlayer[0].wings.rightState; D_edisplay_80161630.leftState = gPlayer[0].wings.leftState; @@ -537,7 +537,7 @@ void func_edisplay_8005B388(Actor* actor) { D_edisplay_80161630.unk_14 = D_edisplay_80161630.unk_18 = D_edisplay_80161630.unk_1C = D_edisplay_80161630.unk_20 = D_edisplay_80161630.unk_38 = D_edisplay_80161630.unk_24 = 0.0f; D_edisplay_80161630.unk_28 = actor->fwork[17]; - D_edisplay_80161630.unk_2C = actor->iwork[14]; + D_edisplay_80161630.modelId = actor->iwork[14]; D_edisplay_80161630.unk_30 = actor->fwork[20]; D_edisplay_80161630.unk_34 = actor->fwork[19]; if (gLevelType == LEVELTYPE_SPACE) { @@ -556,14 +556,14 @@ void func_edisplay_8005B388(Actor* actor) { } void func_edisplay_8005B6A4(Actor* actor) { - Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ME_6024B60); } void func_edisplay_8005B71C(Actor* actor) { RCP_SetupDL_29(actor->unk_046, gFogGreen, gFogBlue, gFogAlpha, actor->unk_048, gFogFar); - Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, 1); + Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ME_6018C00); } @@ -592,14 +592,14 @@ void func_edisplay_8005B848(Actor* actor) { if ((gGameFrameCount % 2) != 0) { scale = 1.7f; } - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY); actor->iwork[11] = 1; - Matrix_Scale(gGfxMatrix, scale, scale, scale, 1); + Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY); func_edisplay_8005B1E8(actor, 2); } void func_edisplay_8005B9A4(Actor* actor) { - Matrix_Translate(gGfxMatrix, 0.0f, -124.0f, 0.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, -124.0f, 0.0f, MTXF_APPLY); Animation_GetFrameData(&D_CO_6029528, actor->unk_0B6, actor->vwork); Animation_DrawSkeleton(1, D_CO_6029674, actor->vwork, NULL, NULL, actor, &gIdentityMatrix); } @@ -627,8 +627,8 @@ void func_edisplay_8005BAB4(ObjectId objId, s32 index) { switch (objId) { case OBJ_EFFECT_374: if (gEffects[index].state == 0) { - Matrix_Scale(gGfxMatrix, 1.2f, 0.0f, 1.2f, 1); - Matrix_RotateX(gGfxMatrix, M_PI / 2, 1); + Matrix_Scale(gGfxMatrix, 1.2f, 0.0f, 1.2f, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_102A8A0); } @@ -639,8 +639,8 @@ void func_edisplay_8005BAB4(ObjectId objId, s32 index) { case OBJ_ACTOR_EVENT: switch (gActors[index].unk_0B4) { case EINFO_3: - Matrix_Scale(gGfxMatrix, 2.3f, 0.0f, 2.3f, 1); - Matrix_RotateX(gGfxMatrix, M_PI / 2, 1); + Matrix_Scale(gGfxMatrix, 2.3f, 0.0f, 2.3f, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_102A010); break; @@ -649,17 +649,17 @@ void func_edisplay_8005BAB4(ObjectId objId, s32 index) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 255); temp_fv0 = gActors[index].fwork[15] * 3.0f; - Matrix_Scale(gGfxMatrix, temp_fv0, temp_fv0, temp_fv0, 1); - Matrix_RotateX(gGfxMatrix, -M_PI / 2, 1); + Matrix_Scale(gGfxMatrix, temp_fv0, temp_fv0, temp_fv0, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); break; default: temp1 = D_edisplay_800CFCCC[gGameFrameCount % 8U]; temp2 = D_edisplay_800CFCCC[(gGameFrameCount + 4) % 8U]; - Matrix_Scale(gGfxMatrix, 1.4f + temp1, 0.0f, 1.4f + temp2, 1); - Matrix_RotateY(gGfxMatrix, M_PI, 1); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 30.0f, 1); + Matrix_Scale(gGfxMatrix, 1.4f + temp1, 0.0f, 1.4f + temp2, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 30.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_1032780); @@ -670,11 +670,11 @@ void func_edisplay_8005BAB4(ObjectId objId, s32 index) { gSPDisplayList(gMasterDisp++, D_CO_6034B90); break; case OBJ_BOSS_316: - if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_0) { + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) { RCP_SetupDL(&gMasterDisp, 0x40); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 200); } - Matrix_RotateX(gGfxMatrix, M_PI / 2, 1); + Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Graphics_SetScaleMtx(150.0f); gSPDisplayList(gMasterDisp++, D_102A8A0); break; @@ -703,7 +703,7 @@ void func_edisplay_8005BAB4(ObjectId objId, s32 index) { break; case OBJ_ACTOR_192: gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 150); - Matrix_Scale(gGfxMatrix, 0.4f, 0.4f, gActors[index].scale, 1); + Matrix_Scale(gGfxMatrix, 0.4f, 0.4f, gActors[index].scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_6034B90); break; @@ -713,10 +713,10 @@ void func_edisplay_8005BAB4(ObjectId objId, s32 index) { gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 0); - Matrix_RotateX(gGfxMatrix, gActors[index].fwork[0], 1); - Matrix_RotateZ(gGfxMatrix, gActors[index].fwork[2], 1); - Matrix_Scale(gGfxMatrix, gActors[index].scale, 1.0f, gActors[index].scale, 1); - Matrix_RotateX(gGfxMatrix, -M_PI / 2, 1); + Matrix_RotateX(gGfxMatrix, gActors[index].fwork[0], MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, gActors[index].fwork[2], MTXF_APPLY); + Matrix_Scale(gGfxMatrix, gActors[index].scale, 1.0f, gActors[index].scale, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); break; @@ -725,12 +725,12 @@ void func_edisplay_8005BAB4(ObjectId objId, s32 index) { gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 0); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 120.0f, 1); - Matrix_RotateX(gGfxMatrix, gActors[index].fwork[1] * M_DTOR, 1); - Matrix_RotateZ(gGfxMatrix, gActors[index].fwork[2] * M_DTOR, 1); - Matrix_RotateY(gGfxMatrix, gActors[index].obj.rot.y * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, 6.0f, 1.0f, 7.5f, 1); - Matrix_RotateX(gGfxMatrix, -M_PI / 2, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 120.0f, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, gActors[index].fwork[1] * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, gActors[index].fwork[2] * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, gActors[index].obj.rot.y * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 6.0f, 1.0f, 7.5f, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); break; @@ -738,11 +738,11 @@ void func_edisplay_8005BAB4(ObjectId objId, s32 index) { RCP_SetupDL(&gMasterDisp, 0x45); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 0); - Matrix_RotateX(gGfxMatrix, gActors[index].fwork[1], 1); - Matrix_RotateZ(gGfxMatrix, gActors[index].fwork[2], 1); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 0.0f, 1); - Matrix_Scale(gGfxMatrix, 1.2f, 1.0f, 1.2f, 1); - Matrix_RotateX(gGfxMatrix, -M_PI / 2, 1); + Matrix_RotateX(gGfxMatrix, gActors[index].fwork[1], MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, gActors[index].fwork[2], MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 0.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 1.2f, 1.0f, 1.2f, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); break; @@ -750,7 +750,7 @@ void func_edisplay_8005BAB4(ObjectId objId, s32 index) { RCP_SetupDL_48(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 255); - Matrix_Scale(gGfxMatrix, 4.0f, 4.0f, 4.0f, 1); + Matrix_Scale(gGfxMatrix, 4.0f, 4.0f, 4.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); break; @@ -767,7 +767,7 @@ void ItemCheckpoint_Draw(ItemCheckpoint* this) { Matrix_Push(&gGfxMatrix); RCP_SetupDL(&gMasterDisp, 0x40); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255); - Matrix_Scale(gGfxMatrix, 3.2f, 3.2f, 3.2f, 1); + Matrix_Scale(gGfxMatrix, 3.2f, 3.2f, 3.2f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetTextureFilter(gMasterDisp++, G_TF_POINT); gSPDisplayList(gMasterDisp++, D_1023C80); @@ -777,13 +777,13 @@ void ItemCheckpoint_Draw(ItemCheckpoint* this) { RCP_SetupDL(&gMasterDisp, 0x1D); gSPTexture(gMasterDisp++, 2000, 2000, 0, G_TX_RENDERTILE, G_ON); gSPSetGeometryMode(gMasterDisp++, G_TEXTURE_GEN); - Matrix_RotateZ(gGfxMatrix, this->unk_58 * M_DTOR, 1); + Matrix_RotateZ(gGfxMatrix, this->unk_58 * M_DTOR, MTXF_APPLY); for (i = 0; i < 8; i++) { Matrix_Push(&gGfxMatrix); - Matrix_RotateZ(gGfxMatrix, i * 45.0f * M_DTOR, 1); - Matrix_Translate(gGfxMatrix, 2.0f * this->scale, 0.0f, 0.0f, 1); - Matrix_RotateZ(gGfxMatrix, (gGameFrameCount + (i * 110.0f)) * M_DTOR * 7.2f * this->unk_54, 1); + Matrix_RotateZ(gGfxMatrix, i * 45.0f * M_DTOR, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 2.0f * this->scale, 0.0f, 0.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, (gGameFrameCount + (i * 110.0f)) * M_DTOR * 7.2f * this->unk_54, MTXF_APPLY); Graphics_SetScaleMtx(2.0f * this->unk_50); gSPDisplayList(gMasterDisp++, D_101CAE0); Matrix_Pop(&gGfxMatrix); @@ -850,8 +850,8 @@ void ItemLasers_Draw(ItemLasers* this) { void ItemMeteoWarp_Draw(ItemMeteoWarp* this) { s32 i; - this->obj.rot.y = (Math_Atan2F(gPlayer[gPlayerNum].camEye.x - this->obj.pos.x, - gPlayer[gPlayerNum].camEye.z - (this->obj.pos.z + D_ctx_80177D20)) * + this->obj.rot.y = (Math_Atan2F(gPlayer[gPlayerNum].cam.eye.x - this->obj.pos.x, + gPlayer[gPlayerNum].cam.eye.z - (this->obj.pos.z + D_ctx_80177D20)) * 180.0f) / M_PI; if (this->state != 0) { @@ -863,8 +863,8 @@ void ItemMeteoWarp_Draw(ItemMeteoWarp* this) { gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK | G_LIGHTING); for (i = 0; i < 7; i++) { Matrix_Push(&gGfxMatrix); - Matrix_RotateZ(gGfxMatrix, (i * 360.0f / 7.0f) * M_DTOR, 1); - Matrix_Translate(gGfxMatrix, 0.0f, this->scale, 0.0f, 1); + Matrix_RotateZ(gGfxMatrix, (i * 360.0f / 7.0f) * M_DTOR, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, this->scale, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_102FE80); Matrix_Pop(&gGfxMatrix); @@ -874,68 +874,68 @@ void ItemMeteoWarp_Draw(ItemMeteoWarp* this) { void func_edisplay_8005D008(Object* obj, s32 drawType) { if (drawType == 2) { - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, D_ctx_80177D20, 1); - Matrix_Translate(gCalcMatrix, obj->pos.x, obj->pos.y, obj->pos.z, 0); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, D_ctx_80177D20, MTXF_APPLY); + Matrix_Translate(gCalcMatrix, obj->pos.x, obj->pos.y, obj->pos.z, MTXF_NEW); Matrix_Push(&gGfxMatrix); - Matrix_Mult(gGfxMatrix, gCalcMatrix, 1); + Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_Copy(&D_edisplay_801615F0, gGfxMatrix); Matrix_Pop(&gGfxMatrix); - Matrix_RotateY(gCalcMatrix, obj->rot.y * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, obj->rot.x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, obj->rot.z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, obj->rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, obj->rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, obj->rot.z * M_DTOR, MTXF_APPLY); } else { - Matrix_Translate(gGfxMatrix, obj->pos.x, obj->pos.y, obj->pos.z + D_ctx_80177D20, 1); + Matrix_Translate(gGfxMatrix, obj->pos.x, obj->pos.y, obj->pos.z + D_ctx_80177D20, MTXF_APPLY); Matrix_Copy(&D_edisplay_801615F0, gGfxMatrix); - Matrix_RotateY(gGfxMatrix, obj->rot.y * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, obj->rot.x * M_DTOR, 1); - Matrix_RotateZ(gGfxMatrix, obj->rot.z * M_DTOR, 1); + Matrix_RotateY(gGfxMatrix, obj->rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, obj->rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, obj->rot.z * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); } } void func_edisplay_8005D1F0(Object* obj, s32 drawType) { if (drawType == 2) { - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, D_ctx_80177D20, 1); - Matrix_Translate(gCalcMatrix, obj->pos.x, obj->pos.y, obj->pos.z, 0); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, D_ctx_80177D20, MTXF_APPLY); + Matrix_Translate(gCalcMatrix, obj->pos.x, obj->pos.y, obj->pos.z, MTXF_NEW); Matrix_Push(&gGfxMatrix); - Matrix_Mult(gGfxMatrix, gCalcMatrix, 1); + Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_Copy(&D_edisplay_801615F0, gGfxMatrix); Matrix_Pop(&gGfxMatrix); - Matrix_RotateY(gCalcMatrix, obj->rot.y * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, obj->rot.x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, obj->rot.z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, obj->rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, obj->rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, obj->rot.z * M_DTOR, MTXF_APPLY); } else { - Matrix_Translate(gGfxMatrix, obj->pos.x, obj->pos.y, obj->pos.z + D_ctx_80177D20, 1); + Matrix_Translate(gGfxMatrix, obj->pos.x, obj->pos.y, obj->pos.z + D_ctx_80177D20, MTXF_APPLY); Matrix_Copy(&D_edisplay_801615F0, gGfxMatrix); - Matrix_RotateY(gGfxMatrix, obj->rot.y * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, obj->rot.x * M_DTOR, 1); - Matrix_RotateZ(gGfxMatrix, obj->rot.z * M_DTOR, 1); + Matrix_RotateY(gGfxMatrix, obj->rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, obj->rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, obj->rot.z * M_DTOR, MTXF_APPLY); } } void func_edisplay_8005D3CC(Object* obj, f32 xRot, f32 yRot, f32 zRot, s32 drawType) { if (drawType == 2) { - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, D_ctx_80177D20, 1); - Matrix_Translate(gCalcMatrix, obj->pos.x, obj->pos.y, obj->pos.z, 0); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, D_ctx_80177D20, MTXF_APPLY); + Matrix_Translate(gCalcMatrix, obj->pos.x, obj->pos.y, obj->pos.z, MTXF_NEW); Matrix_Push(&gGfxMatrix); - Matrix_Mult(gGfxMatrix, gCalcMatrix, 1); + Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_Copy(&D_edisplay_801615F0, gGfxMatrix); Matrix_Pop(&gGfxMatrix); - Matrix_RotateY(gCalcMatrix, M_DTOR * yRot, 1); - Matrix_RotateX(gCalcMatrix, M_DTOR * xRot, 1); - Matrix_RotateZ(gCalcMatrix, M_DTOR * zRot, 1); - Matrix_RotateY(gCalcMatrix, obj->rot.y * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, obj->rot.x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, obj->rot.z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, M_DTOR * yRot, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, M_DTOR * xRot, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, M_DTOR * zRot, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, obj->rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, obj->rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, obj->rot.z * M_DTOR, MTXF_APPLY); } else { - Matrix_Translate(gGfxMatrix, obj->pos.x, obj->pos.y, obj->pos.z + D_ctx_80177D20, 1); + Matrix_Translate(gGfxMatrix, obj->pos.x, obj->pos.y, obj->pos.z + D_ctx_80177D20, MTXF_APPLY); Matrix_Copy(&D_edisplay_801615F0, gGfxMatrix); - Matrix_RotateY(gGfxMatrix, M_DTOR * yRot, 1); - Matrix_RotateX(gGfxMatrix, M_DTOR * xRot, 1); - Matrix_RotateZ(gGfxMatrix, M_DTOR * zRot, 1); - Matrix_RotateY(gGfxMatrix, obj->rot.y * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, obj->rot.x * M_DTOR, 1); - Matrix_RotateZ(gGfxMatrix, obj->rot.z * M_DTOR, 1); + 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_RotateY(gGfxMatrix, obj->rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, obj->rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, obj->rot.z * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); } } @@ -1047,10 +1047,10 @@ void Actor_DrawAllRange(Actor* this) { D_edisplay_801615EC = 0; if (this->info.drawType == 2) { - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, D_ctx_80177D20, 1); - Matrix_Translate(gCalcMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, D_ctx_80177D20, MTXF_APPLY); + Matrix_Translate(gCalcMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, MTXF_NEW); Matrix_Push(&gGfxMatrix); - Matrix_Mult(gGfxMatrix, gCalcMatrix, 1); + Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_MultVec3f(gGfxMatrix, &sp50, &D_edisplay_801615E0); Matrix_Pop(&gGfxMatrix); var_fv0 = 0.0f; @@ -1062,12 +1062,12 @@ void Actor_DrawAllRange(Actor* this) { if ((var_fv0 > D_edisplay_801615E0.z) && (D_edisplay_801615E0.z > var_fv1)) { if (fabsf(D_edisplay_801615E0.x) < (fabsf(D_edisplay_801615E0.z * 0.5f) + 500.0f)) { if (fabsf(D_edisplay_801615E0.y) < (fabsf(D_edisplay_801615E0.z * 0.5f) + 500.0f)) { - Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); this->info.draw(&this->obj); D_edisplay_801615EC = 1; - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) && (this->obj.id == OBJ_ACTOR_ALLRANGE) && + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (this->obj.id == OBJ_ACTOR_ALLRANGE) && (this->aiType == AI360_MISSILE)) { gTeamArrowsViewPos[0] = D_edisplay_801615E0; } @@ -1075,9 +1075,10 @@ void Actor_DrawAllRange(Actor* this) { } } } else { - Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1); + Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, MTXF_APPLY); Matrix_MultVec3f(gGfxMatrix, &sp50, &D_edisplay_801615E0); - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_0) || + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) || + (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) || ((this->obj.id == OBJ_ACTOR_ALLRANGE) && (this->aiType >= AI360_GREAT_FOX)) || ((this->obj.id == OBJ_ACTOR_195) && (this->info.bonus != 0))) { var_ft5 = var_fv0 = 3000.0f; @@ -1093,13 +1094,13 @@ void Actor_DrawAllRange(Actor* this) { if (fabsf(D_edisplay_801615E0.x) < (fabsf(D_edisplay_801615E0.z * var_fa1) + var_ft5)) { if (fabsf(D_edisplay_801615E0.y) < (fabsf(D_edisplay_801615E0.z * var_fa1) + var_ft5)) { if (this->info.draw != NULL) { - Matrix_RotateY(gGfxMatrix, this->obj.rot.y * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, this->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gGfxMatrix, this->obj.rot.z * M_DTOR, 1); + Matrix_RotateY(gGfxMatrix, this->obj.rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); this->info.draw(&this->obj); D_edisplay_801615EC = 1; - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) && + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (((this->obj.id == OBJ_ACTOR_ALLRANGE) && ((this->aiType <= AI360_PEPPY) || (this->aiType == AI360_KATT) || (this->aiType == AI360_BILL))) || @@ -1218,9 +1219,9 @@ void Effect_DrawAllRange(Effect* this) { if (this->info.unk_14 == -1) { Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y + gCameraShakeY, this->obj.pos.z + D_ctx_80177D20, - 1); + MTXF_APPLY); } else { - Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + D_ctx_80177D20, 1); + Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + D_ctx_80177D20, MTXF_APPLY); } Matrix_MultVec3f(gGfxMatrix, &sp4C, &sp40); if ((gCurrentLevel == LEVEL_SECTOR_Z) || (gCurrentLevel == LEVEL_BOLSE)) { @@ -1232,9 +1233,9 @@ void Effect_DrawAllRange(Effect* this) { if (fabsf(sp40.x) < (fabsf(sp40.z * 0.5f) + 500.0f)) { if (fabsf(sp40.y) < (fabsf(sp40.z * 0.5f) + 500.0f)) { if (this->info.draw != NULL) { - Matrix_RotateY(gGfxMatrix, this->obj.rot.y * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, this->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gGfxMatrix, this->obj.rot.z * M_DTOR, 1); + Matrix_RotateY(gGfxMatrix, this->obj.rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); this->info.draw(&this->obj); } @@ -1253,16 +1254,16 @@ void Item_Draw(Item* this, s32 arg1) { Vec3f sp38; u8 var_v0; - Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + D_ctx_80177D20, 1); + Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + D_ctx_80177D20, MTXF_APPLY); Matrix_MultVec3f(gGfxMatrix, &sp44, &sp38); var_v0 = 0; if ((sp38.z < 0.0f) && (sp38.z > -12000.0f)) { if (fabsf(sp38.x) < (fabsf(sp38.z * 0.5f) + 500.0f)) { if (fabsf(sp38.y) < (fabsf(sp38.z * 0.5f) + 500.0f)) { if (this->info.draw != NULL) { - Matrix_RotateY(gGfxMatrix, this->obj.rot.y * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, this->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gGfxMatrix, this->obj.rot.z * M_DTOR, 1); + Matrix_RotateY(gGfxMatrix, this->obj.rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if (this->info.drawType == 0) { gSPDisplayList(gMasterDisp++, this->info.dList); @@ -1282,19 +1283,19 @@ void Item_Draw(Item* this, s32 arg1) { } void func_edisplay_8005EA24(Actor* actor) { - Matrix_Translate(gGfxMatrix, actor->obj.pos.x, actor->fwork[25] + 3.0f, actor->obj.pos.z, 1); + 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], 1); - Matrix_RotateX(gGfxMatrix, actor->fwork[26], 1); - Matrix_RotateZ(gGfxMatrix, actor->fwork[28], 1); - Matrix_RotateY(gGfxMatrix, -actor->fwork[27], 1); + Matrix_RotateY(gGfxMatrix, actor->fwork[27], MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, actor->fwork[26], MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, actor->fwork[28], MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, -actor->fwork[27], MTXF_APPLY); } - Matrix_Scale(gGfxMatrix, 1.4f, 0.0f, 1.4f, 1); - Matrix_RotateY(gGfxMatrix, (actor->obj.rot.y + 180.0f) * M_DTOR, 1); - Matrix_RotateZ(gGfxMatrix, actor->obj.rot.z * M_DTOR, 1); + Matrix_Scale(gGfxMatrix, 1.4f, 0.0f, 1.4f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, (actor->obj.rot.y + 180.0f) * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, actor->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if (actor->aiType <= AI360_PEPPY) { - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 30.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 30.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1032780); } else if (gCurrentLevel == LEVEL_KATINA) { @@ -1321,29 +1322,29 @@ void func_edisplay_8005ECD8(s32 index, Object* obj) { switch (obj->id) { case OBJ_ACTOR_230: Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundLevel + 2.0f + gActors[index].fwork[1], - obj->pos.z + D_ctx_80177D20, 1); + obj->pos.z + D_ctx_80177D20, MTXF_APPLY); break; case OBJ_ACTOR_229: case OBJ_ACTOR_231: Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundLevel + 2.0f + gActors[index].fwork[0], - obj->pos.z + D_ctx_80177D20, 1); + obj->pos.z + D_ctx_80177D20, MTXF_APPLY); break; case OBJ_BOSS_316: - Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundLevel + 2.0f + gCameraShakeY, obj->pos.z, 1); + Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundLevel + 2.0f + gCameraShakeY, obj->pos.z, MTXF_APPLY); break; default: - Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundLevel + 2.0f, obj->pos.z + D_ctx_80177D20, 1); + Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundLevel + 2.0f, obj->pos.z + D_ctx_80177D20, MTXF_APPLY); break; } if ((D_ctx_801784AC != 4) || (obj->id == OBJ_ACTOR_EVENT) || (obj->id == OBJ_ACTOR_195) || (obj->id == OBJ_ACTOR_TEAM_BOSS)) { - Matrix_Scale(gGfxMatrix, 1.0f, 0.0f, 1.0f, 1); - Matrix_RotateY(gGfxMatrix, obj->rot.y * M_DTOR, 1); + Matrix_Scale(gGfxMatrix, 1.0f, 0.0f, 1.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, obj->rot.y * M_DTOR, MTXF_APPLY); } if ((obj->id < OBJ_BOSS_292) && (obj->id != OBJ_ACTOR_230) && (obj->id != OBJ_ACTOR_229) && (obj->id != OBJ_ACTOR_231)) { - Matrix_RotateX(gGfxMatrix, obj->rot.x * M_DTOR, 1); - Matrix_RotateZ(gGfxMatrix, obj->rot.z * M_DTOR, 1); + Matrix_RotateX(gGfxMatrix, obj->rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, obj->rot.z * M_DTOR, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); func_edisplay_8005BAB4(obj->id, index); @@ -1378,8 +1379,8 @@ void func_edisplay_8005F0E8(f32* sfxSrc, Vec3f* pos) { if (gCamCount != 1) { sfxSrc[0] = sfxSrc[1] = sfxSrc[2] = 0.0f; } else { - Matrix_RotateY(gCalcMatrix, gPlayer[0].unk_058, 0); - Matrix_RotateX(gCalcMatrix, gPlayer[0].unk_05C, 1); + Matrix_RotateY(gCalcMatrix, gPlayer[0].camYaw, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, gPlayer[0].camPitch, MTXF_APPLY); sp2C.x = pos->x - gPlayerCamEye.x; sp2C.y = pos->y - gPlayerCamEye.y; sp2C.z = pos->z + D_ctx_80177D20 - gPlayerCamEye.z; @@ -1440,9 +1441,9 @@ void Object_58_Draw(Object_58* this) { sp38 = 0.9f; } if ((gLevelType == LEVELTYPE_PLANET) || (gCurrentLevel == LEVEL_BOLSE)) { - Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y + gCameraShakeY, this->obj.pos.z, 1); + Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y + gCameraShakeY, this->obj.pos.z, MTXF_APPLY); } else { - Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1); + Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, MTXF_APPLY); } Matrix_MultVec3f(gGfxMatrix, &sp54, &sp48); if ((sp48.z < sp44) && (sp40 < sp48.z)) { @@ -1450,15 +1451,15 @@ void Object_58_Draw(Object_58* this) { if (fabsf(sp48.x) < (fabsf(sp48.z * sp38) + sp3C)) { func_edisplay_8005F670(&this->obj.pos); if (this->obj.id == OBJ_80_131) { - Matrix_RotateY(gGfxMatrix, this->obj.rot.y * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, this->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gGfxMatrix, this->obj.rot.z * M_DTOR, 1); - Matrix_RotateY(gGfxMatrix, M_PI / 2, 1); - Matrix_Translate(gGfxMatrix, -551.0f, 0.0f, 0.0f, 1); + Matrix_RotateY(gGfxMatrix, this->obj.rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_PI / 2, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, -551.0f, 0.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_VE2_6007650); } else { - Matrix_RotateY(gGfxMatrix, this->obj.rot.y * M_DTOR, 1); + Matrix_RotateY(gGfxMatrix, this->obj.rot.y * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, this->info.dList); } @@ -1485,7 +1486,7 @@ void func_edisplay_8005F670(Vec3f* arg0) { sp9C.y = arg0->y - D_ctx_80178374; sp9C.z = arg0->z - D_ctx_80178378; temp_fv0 = (VEC3F_MAG(&sp9C)); - if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2) { + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) { var_fs0 = 700.0f / temp_fv0; } else { var_fs0 = 200.0f / temp_fv0; @@ -1499,10 +1500,10 @@ void func_edisplay_8005F670(Vec3f* arg0) { sp94 = Math_Atan2F(sp9C.x, sp9C.z); sp98 = -Math_Atan2F(sp9C.y, sqrtf(SQ(sp9C.x) + SQ(sp9C.z))); Matrix_Push(&gCalcMatrix); - Matrix_RotateZ(gCalcMatrix, gPlayer[gPlayerNum].unk_034 * D_ctx_80177950 * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -gPlayer[gPlayerNum].unk_05C, 1); - Matrix_RotateY(gCalcMatrix, gPlayer[gPlayerNum].unk_058 + sp94, 1); - Matrix_RotateX(gCalcMatrix, sp98, 1); + Matrix_RotateZ(gCalcMatrix, gPlayer[gPlayerNum].camRoll * D_ctx_80177950 * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -gPlayer[gPlayerNum].camPitch, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, gPlayer[gPlayerNum].camYaw + sp94, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, sp98, MTXF_APPLY); sp6C.x = 0.0f; sp6C.y = 0.0f; sp6C.z = -100.0f; @@ -1520,11 +1521,11 @@ bool func_edisplay_8005F9DC(Vec3f* arg0) { Vec3f sp2C; Vec3f sp20; - Matrix_RotateY(gCalcMatrix, gPlayer[gPlayerNum].unk_058, 0); - Matrix_RotateX(gCalcMatrix, gPlayer[gPlayerNum].unk_05C, 1); - sp2C.x = arg0->x - gPlayer[gPlayerNum].camEye.x; - sp2C.y = arg0->y - gPlayer[gPlayerNum].camEye.y; - sp2C.z = arg0->z - gPlayer[gPlayerNum].camEye.z; + Matrix_RotateY(gCalcMatrix, gPlayer[gPlayerNum].camYaw, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, gPlayer[gPlayerNum].camPitch, MTXF_APPLY); + sp2C.x = arg0->x - gPlayer[gPlayerNum].cam.eye.x; + sp2C.y = arg0->y - gPlayer[gPlayerNum].cam.eye.y; + sp2C.z = arg0->z - gPlayer[gPlayerNum].cam.eye.z; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp2C, &sp20); if ((sp20.z < 1000.0f) && (sp20.z > -13000.0f)) { if (fabsf(sp20.x) < (fabsf(sp20.z * 0.4f) + 2000.0f)) { @@ -1633,8 +1634,8 @@ void Object_DrawAll(s32 arg0) { case LEVELMODE_ON_RAILS: case LEVELMODE_UNK_2: Matrix_Push(&gGfxMatrix); - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) || - (gCurrentLevel == LEVEL_AQUAS)) { + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) || + (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) || (gCurrentLevel == LEVEL_AQUAS)) { func_edisplay_8005F670(&actor->obj.pos); } func_edisplay_800597C0(arg0); @@ -1685,8 +1686,8 @@ void Effect_DrawAll(s32 arg0) { for (i = 0, effect = gEffects; i < ARRAY_COUNT(gEffects); i++, effect++) { if (effect->obj.status >= OBJ_ACTIVE) { if (effect->info.unk_14 == 1) { - effect->obj.rot.y = RAD_TO_DEG(-gPlayer[gPlayerNum].unk_058); - effect->obj.rot.x = RAD_TO_DEG(gPlayer[gPlayerNum].unk_05C); + effect->obj.rot.y = RAD_TO_DEG(-gPlayer[gPlayerNum].camYaw); + effect->obj.rot.x = RAD_TO_DEG(gPlayer[gPlayerNum].camPitch); } if (gLevelMode == LEVELMODE_ALL_RANGE) { Matrix_Push(&gGfxMatrix); @@ -1723,12 +1724,12 @@ void Effect_DrawAll(s32 arg0) { void Object_Draw(s32 arg0) { gReflectY = 1; Object_DrawAll(1); - if ((gGroundType == GROUNDTYPE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2)) { + if ((gGroundType == GROUNDTYPE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) { gReflectY = -1; Lights_SetOneLight(&gMasterDisp, gLight1x, -1 * gLight1y, gLight1z, gLight1R, gLight1G, gLight1B, gAmbientR, gAmbientG, gAmbientB); Matrix_Push(&gGfxMatrix); - Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, MTXF_APPLY); Object_DrawAll(-1); Matrix_Pop(&gGfxMatrix); Lights_SetOneLight(&gMasterDisp, gLight1x, gLight1y, gLight1z, gLight1R, gLight1G, gLight1B, gAmbientR, @@ -1740,10 +1741,10 @@ void Effect_Draw(u8 arg0) { if (arg0 == 0) { gReflectY = 1; Effect_DrawAll(1); - } else if ((gGroundType == GROUNDTYPE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2)) { + } else if ((gGroundType == GROUNDTYPE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) { gReflectY = -1; Matrix_Push(&gGfxMatrix); - Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, MTXF_APPLY); Effect_DrawAll(-1); Matrix_Pop(&gGfxMatrix); } @@ -1778,26 +1779,27 @@ void TexturedLine_Draw(void) { if (gTexturedLines[i].mode != 0) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, texLine->unk_04.x, texLine->unk_04.y, texLine->unk_04.z + D_ctx_80177D20, 1); - Matrix_RotateY(gGfxMatrix, texLine->unk_20, 1); - Matrix_RotateX(gGfxMatrix, texLine->unk_1C, 1); - Matrix_RotateZ(gGfxMatrix, texLine->unk_20, 1); - Matrix_Scale(gGfxMatrix, texLine->unk_28, texLine->unk_28, texLine->unk_24, 1); + Matrix_Translate(gGfxMatrix, texLine->unk_04.x, texLine->unk_04.y, texLine->unk_04.z + D_ctx_80177D20, + MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, texLine->unk_20, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, texLine->unk_1C, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, texLine->unk_20, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, texLine->unk_28, texLine->unk_28, texLine->unk_24, MTXF_APPLY); if ((gCurrentLevel == LEVEL_AQUAS) || (gCurrentLevel == LEVEL_VENOM_ANDROSS)) { s32 alpha = ((gGameFrameCount % 2) != 0) ? 180 : 50; gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, alpha); if (gCurrentLevel == LEVEL_AQUAS) { - Matrix_Scale(gGfxMatrix, 0.01f, 0.3f, 0.0025f, 1); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -200.0f, 1); - Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 5.0f * M_DTOR, 1); + Matrix_Scale(gGfxMatrix, 0.01f, 0.3f, 0.0025f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -200.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 5.0f * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_AQ_60119A0); } else if (gCurrentLevel == LEVEL_VENOM_ANDROSS) { - Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.0025f, 1); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -200.0f, 1); - Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 25.0f * M_DTOR, 1); + Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.0025f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -200.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 25.0f * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ANDROSS_C017440); } @@ -1826,11 +1828,11 @@ void TexturedLine_DrawPath(s32 index) { } gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, texLine->unk_2C, texLine->unk_2D, texLine->unk_2E, texLine->unk_2F); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, texLine->unk_04.x, texLine->unk_04.y, texLine->unk_04.z, 1); - Matrix_RotateY(gGfxMatrix, texLine->unk_20, 1); - Matrix_RotateX(gGfxMatrix, texLine->unk_1C, 1); - Matrix_RotateZ(gGfxMatrix, texLine->unk_1C, 1); - Matrix_Scale(gGfxMatrix, texLine->unk_28, 1.0f, texLine->unk_24, 1); + Matrix_Translate(gGfxMatrix, texLine->unk_04.x, texLine->unk_04.y, texLine->unk_04.z, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, texLine->unk_20, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, texLine->unk_1C, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, texLine->unk_1C, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, texLine->unk_28, 1.0f, texLine->unk_24, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_edisplay_800CFD80); diff --git a/src/engine/fox_effect.c b/src/engine/fox_effect.c index 5be131bd..16c0687e 100644 --- a/src/engine/fox_effect.c +++ b/src/engine/fox_effect.c @@ -53,7 +53,7 @@ void BonusText_Update(void) { if (gLevelMode == LEVELMODE_ON_RAILS) { bonus->pos.z -= D_ctx_80177D08; - } else if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) { + } else if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) { bonus->pos.x += gPlayer[0].vel.x; bonus->pos.z += gPlayer[0].vel.z; } @@ -83,16 +83,16 @@ void BonusText_Draw(BonusText* bonus) { f32 sp50; if (bonus->timer <= 45) { - Matrix_Translate(gGfxMatrix, bonus->pos.x, bonus->pos.y, bonus->pos.z + D_ctx_80177D20, 1); + Matrix_Translate(gGfxMatrix, bonus->pos.x, bonus->pos.y, bonus->pos.z + D_ctx_80177D20, MTXF_APPLY); Matrix_MultVec3f(gGfxMatrix, &sp60, &sp54); if ((fabsf(sp54.x) < 20000.0f) && (fabsf(sp54.y) < 20000.0f)) { if ((sp54.z < 0.0f) && (sp54.z > -20000.0f)) { sp50 = (VEC3F_MAG(&sp54)) * 0.0015f * 0.2f; - Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].unk_058, 1); - Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].unk_05C, 1); - Matrix_Scale(gGfxMatrix, sp50, sp50, 1.0f, 1); - Matrix_Translate(gGfxMatrix, 0.0f, bonus->unk_10, 0.0f, 1); + Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].camPitch, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, sp50, sp50, 1.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, bonus->unk_10, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if (bonus->hits <= 10) { @@ -206,8 +206,8 @@ void func_effect_80077A7C(Effect* effect) { RCP_SetupDL_49(); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_44); gDPSetEnvColor(gMasterDisp++, 255, 255, 255, effect->unk_44); - Matrix_Scale(gGfxMatrix, effect->scale1, effect->scale2, 1.0f, 1); - Matrix_Translate(gGfxMatrix, 0.0f, 20.0f, 0.0f, 1); + Matrix_Scale(gGfxMatrix, effect->scale1, effect->scale2, 1.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, 20.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ZO_6024220); RCP_SetupDL(&gMasterDisp, 0x40); @@ -220,7 +220,7 @@ void func_effect_80077B84(Effect* effect) { Graphics_SetScaleMtx(effect->scale2); if ((effect->scale1 == 71.0f) || - ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) && (gCurrentLevel == LEVEL_CORNERIA))) { + ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) && (gCurrentLevel == LEVEL_CORNERIA))) { RCP_SetupDL(&gMasterDisp, 0x26); } else { RCP_SetupDL(&gMasterDisp, 0x43); @@ -349,14 +349,14 @@ void func_effect_800780F8(Effect* effect) { for (i = 0; i < 10; i++) { if ((i >= effect->unk_48) && (i < effect->unk_46)) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, -60.0f, 0.0f, 1); - Matrix_Scale(gGfxMatrix, 0.8f, 3.0f, 1.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, -60.0f, 0.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.8f, 3.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_102F5E0); Matrix_Pop(&gGfxMatrix); } - Matrix_Translate(gGfxMatrix, 0.0f, -120.0f, 0.0f, 1); - Matrix_RotateZ(gGfxMatrix, D_800D1534[effect->unk_4C][i] * M_DTOR, 1); + Matrix_Translate(gGfxMatrix, 0.0f, -120.0f, 0.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, D_800D1534[effect->unk_4C][i] * M_DTOR, MTXF_APPLY); } } @@ -375,7 +375,7 @@ void func_effect_80078438(Effect* effect) { void func_effect_800784B4(Effect* effect) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_46); Graphics_SetScaleMtx(effect->scale2); - Matrix_RotateX(gGfxMatrix, M_PI / 2, 1); + Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_BG_PLANET_200D750); } @@ -400,9 +400,9 @@ void func_effect_80078604(Effect* effect) { void func_effect_8007868C(Effect* effect) { RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, 1); + Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY); if (effect->unk_44 >= 2) { - Matrix_RotateX(gGfxMatrix, M_PI / 2, 1); + Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1029780); @@ -412,8 +412,8 @@ void func_effect_8007868C(Effect* effect) { void func_effect_8007879C(Effect* effect) { RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - Matrix_Scale(gGfxMatrix, effect->scale2 * 0.6f, 1.0f, effect->scale2 * 3.5f, 1); - Matrix_RotateX(gGfxMatrix, M_PI / 2, 1); + Matrix_Scale(gGfxMatrix, effect->scale2 * 0.6f, 1.0f, effect->scale2 * 3.5f, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1029780); RCP_SetupDL(&gMasterDisp, 0x40); @@ -594,8 +594,8 @@ void func_effect_8007905C(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scal yAng = Math_Atan2F(sp3C.x - xPos, sp3C.z - zPos); sp38 = sqrtf(SQ(sp3C.x - xPos) + SQ(sp3C.z - zPos)); xAng = -Math_Atan2F(sp3C.y - yPos, sp38); - Matrix_RotateY(gCalcMatrix, yAng, 0); - Matrix_RotateX(gCalcMatrix, xAng, 1); + Matrix_RotateY(gCalcMatrix, yAng, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, xAng, MTXF_APPLY); sp54.x = RAND_FLOAT_CENTERED(50.0f); sp54.y = RAND_FLOAT_CENTERED(50.0f); sp54.z = RAND_FLOAT(10.0f) + 150.0f; @@ -683,7 +683,8 @@ void func_effect_8007968C(Effect* effect) { effect->vel.y -= 0.5f; } - if ((gCurrentLevel == LEVEL_BOLSE) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) && (gCsFrameCount > 175)) { + if ((gCurrentLevel == LEVEL_BOLSE) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) && + (gCsFrameCount > 175)) { effect->vel.x *= 0.95f; effect->vel.y *= 0.95f; effect->vel.z *= 0.95f; @@ -710,7 +711,7 @@ bool func_effect_800798C4(s32 arg0, Gfx** arg1, Vec3f* arg2, Vec3f* arg3, void* void func_effect_800798F0(Effect* effect) { Vec3f frameJointTable[50]; - if ((gCurrentLevel == LEVEL_BOLSE) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7)) { + if ((gCurrentLevel == LEVEL_BOLSE) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { func_edisplay_8005F670(&effect->obj.pos); } @@ -840,16 +841,16 @@ void func_effect_800798F0(Effect* effect) { case 1: switch ((s32) (effect->index % 4U)) { case 0: - Matrix_Scale(gGfxMatrix, 1.0f, 0.3f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 1.0f, 0.3f, 1.0f, MTXF_APPLY); break; case 1: - Matrix_Scale(gGfxMatrix, 0.3f, 1.0f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 0.3f, 1.0f, 1.0f, MTXF_APPLY); break; case 2: - Matrix_Scale(gGfxMatrix, 1.0f, 0.5f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 1.0f, 0.5f, 1.0f, MTXF_APPLY); break; case 3: - Matrix_Scale(gGfxMatrix, 0.5f, 1.0f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 0.5f, 1.0f, 1.0f, MTXF_APPLY); break; } Matrix_SetGfxMtx(&gMasterDisp); @@ -900,7 +901,7 @@ void func_effect_8007A28C(Effect* effect) { void func_effect_8007A3C0(Effect* effect) { if (gReflectY > 0) { - Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, 1); + Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL_64_2(); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_44); @@ -1046,7 +1047,7 @@ void func_effect_8007AA60(Effect* effect) { RCP_SetupDL(&gMasterDisp, 0x44); gDPSetPrimColor(gMasterDisp++, 0, 0, 31, 10, 00, effect->unk_44); gDPSetEnvColor(gMasterDisp++, 141, 73, 5, 0); - Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, 1.0f, 1); + Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_800D178C[effect->unk_4C]); effect->unk_4C = effect->unk_48; @@ -1467,11 +1468,11 @@ void func_effect_8007BC7C(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { } void func_effect_8007BCE8(Effect* effect) { - if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) { - effect->obj.rot.x = RAD_TO_DEG(gPlayer[0].unk_05C); - effect->obj.rot.y = RAD_TO_DEG(-gPlayer[0].unk_058); + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) { + effect->obj.rot.x = RAD_TO_DEG(gPlayer[0].camPitch); + effect->obj.rot.y = RAD_TO_DEG(-gPlayer[0].camYaw); } - if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_6) { + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_NEXT) { effect->unk_46 = 2; effect->vel.y -= 0.13f; } @@ -1699,7 +1700,7 @@ void func_effect_8007C6FC(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scal if (Rand_ZeroOne() < 0.5f) { effect->unk_48 = -effect->unk_48; } - if ((gCurrentLevel == LEVEL_FORTUNA) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_6)) { + if ((gCurrentLevel == LEVEL_FORTUNA) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_NEXT)) { effect->unk_4A = 180; } else { effect->unk_4A = 255; @@ -1736,7 +1737,7 @@ void func_effect_8007C8C4(Effect* effect) { s32 var_v0; var_v0 = 0; - if ((gCurrentLevel == LEVEL_FORTUNA) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_6)) { + if ((gCurrentLevel == LEVEL_FORTUNA) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_NEXT)) { var_v0 = 3; } @@ -1780,7 +1781,7 @@ void func_effect_8007CAF0(Effect* effect) { gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 0, effect->unk_4A); gSPDisplayList(gMasterDisp++, D_102A010); } else { - Matrix_Scale(gGfxMatrix, 1.5f, 1.5f, 1.5f, 1); + Matrix_Scale(gGfxMatrix, 1.5f, 1.5f, 1.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_4A); gSPDisplayList(gMasterDisp++, D_BG_PLANET_20031B0); @@ -1964,7 +1965,7 @@ void func_effect_8007D2C8(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { void func_effect_8007D2F4(Effect* effect) { if (gLevelType == LEVELTYPE_PLANET) { - if ((gCurrentLevel == LEVEL_KATINA) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7)) { + if ((gCurrentLevel == LEVEL_KATINA) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { effect->vel.y += 0.1f; if (effect->timer_50 == 0) { effect->unk_4C++; @@ -1977,7 +1978,7 @@ void func_effect_8007D2F4(Effect* effect) { } } } else { - if ((gCurrentLevel == LEVEL_MACBETH) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) && + if ((gCurrentLevel == LEVEL_MACBETH) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) && (effect->vel.x != 0)) { Math_SmoothStepToF(&effect->vel.x, -1.0f, 1.0f, 1.0f, 0.0f); Math_SmoothStepToF(&effect->vel.z, 4.0f, 1.0f, 1.0f, 0.0f); @@ -2053,14 +2054,14 @@ void func_effect_8007D55C(Effect* effect) { gDPSetPrimColor(gMasterDisp++, 0, 0, D_800D184C[effect->unk_4C][0], D_800D184C[effect->unk_4C][1], D_800D184C[effect->unk_4C][2], D_800D184C[effect->unk_4C][3]); scale = D_800D17F8[effect->unk_4C] - 0.5f; - Matrix_Scale(gGfxMatrix, scale, scale, 1.0f, 1); + Matrix_Scale(gGfxMatrix, scale, scale, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_800D17A4[effect->unk_4C]); return; } gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 100, effect->unk_44); if (effect->unk_4C == 0) { - Matrix_Scale(gGfxMatrix, 2.5f, 2.5f, 2.5f, 1); + Matrix_Scale(gGfxMatrix, 2.5f, 2.5f, 2.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_800D18A0[effect->unk_4C]); return; @@ -2173,7 +2174,7 @@ void func_effect_8007DB70(Effect* effect) { switch (effect->state) { case 0: effect->vel.y -= 0.5f; - if ((effect->timer_50 == 0) && ((func_enmy_8006351C(1000, &effect->obj.pos, &sp54, 1) != 0) || + if ((effect->timer_50 == 0) && ((Object_CheckCollision(1000, &effect->obj.pos, &sp54, 1) != 0) || (effect->obj.pos.y < (gGroundLevel + 10.0f)))) { effect->vel.y = 0.0f; if (effect->obj.pos.y < (gGroundLevel + 10.0f)) { @@ -2228,7 +2229,7 @@ void func_effect_8007DED4(Effect* effect) { break; case 1: - Matrix_Scale(gGfxMatrix, effect->scale1, effect->scale2, 2.5f, 1); + Matrix_Scale(gGfxMatrix, effect->scale1, effect->scale2, 2.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL_40(); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); @@ -2380,8 +2381,8 @@ void func_effect_8007E6B8(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPo temp_ft4 = sqrtf(SQ(gPlayer[0].pos.x - xPos) + SQ(gPlayer[0].unk_138 - zPos)); sp54 = -Math_Atan2F(gPlayer[0].pos.y - yPos, temp_ft4); - Matrix_RotateY(gCalcMatrix, sp50, 0); - Matrix_RotateX(gCalcMatrix, sp54, 1); + Matrix_RotateY(gCalcMatrix, sp50, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, sp54, MTXF_APPLY); sp40.x = 0.0f; sp40.y = 0.0f; @@ -2433,12 +2434,12 @@ void func_effect_8007E93C(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPo effect->obj.pos.z = zPos; Object_SetInfo(&effect->info, effect->obj.id); - sp50 = Math_Atan2F(gPlayer[0].camEye.x - xPos, gPlayer[0].camEye.z - zPos); - temp_ft4 = sqrtf(SQ(gPlayer[0].camEye.x - xPos) + SQ(gPlayer[0].camEye.z - zPos)); - sp54 = -Math_Atan2F(gPlayer[0].camEye.y - yPos, temp_ft4); + sp50 = Math_Atan2F(gPlayer[0].cam.eye.x - xPos, gPlayer[0].cam.eye.z - zPos); + temp_ft4 = sqrtf(SQ(gPlayer[0].cam.eye.x - xPos) + SQ(gPlayer[0].cam.eye.z - zPos)); + sp54 = -Math_Atan2F(gPlayer[0].cam.eye.y - yPos, temp_ft4); - Matrix_RotateY(gCalcMatrix, sp50, 0); - Matrix_RotateX(gCalcMatrix, sp54, 1); + Matrix_RotateY(gCalcMatrix, sp50, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, sp54, MTXF_APPLY); sp40.x = 0.0f; sp40.y = 0.0f; @@ -2547,12 +2548,12 @@ void func_effect_8007EE68(ObjectId objId, Vec3f* pos, Vec3f* rot, Vec3f* arg3, V s32 i; Vec3f sp68; - Matrix_RotateY(gCalcMatrix, arg3->y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, arg3->x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, arg3->z * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, arg3->y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, arg3->x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, arg3->z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, arg4, &sp68); for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { @@ -2596,7 +2597,7 @@ void func_effect_8007F11C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 spee void func_effect_8007F20C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 speed) { s32 i; - if ((fabsf(zPos - gPlayer[0].camEye.z) > 300.0f) || (fabsf(xPos - gPlayer[0].camEye.x) > 300.0f)) { + if ((fabsf(zPos - gPlayer[0].cam.eye.z) > 300.0f) || (fabsf(xPos - gPlayer[0].cam.eye.x) > 300.0f)) { for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { Matrix_Push(&gCalcMatrix); @@ -2864,8 +2865,8 @@ void func_effect_8007FE88(Effect* effect) { if ((gPlayer[0].unk_280 != 0) || (gPlayer[0].timer_27C != 0)) { effect->obj.rot.y = 90.0f; effect->obj.rot.x = RAND_FLOAT(360.0f); - Matrix_RotateY(gCalcMatrix, effect->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, effect->obj.rot.x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, effect->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, effect->obj.rot.x * M_DTOR, MTXF_APPLY); srcVelocity.x = 0.0f; srcVelocity.y = 0.0f; srcVelocity.z = 100.0f; @@ -2911,7 +2912,7 @@ void func_effect_8007FE88(Effect* effect) { velocity.z = effect->vel.z; if (gCurrentLevel != LEVEL_MACBETH) { - if (func_enmy_8006351C(1000, &effect->obj.pos, &velocity, 2) != 0) { + if (Object_CheckCollision(1000, &effect->obj.pos, &velocity, 2) != 0) { func_effect_8007D10C(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 2.0f); Object_Kill(&effect->obj, effect->sfxSource); } @@ -2963,8 +2964,8 @@ void func_effect_8008040C(Effect* effect) { yRot = Math_Atan2F(gPlayer[0].pos.x - effect->obj.pos.x, gPlayer[0].unk_138 - effect->obj.pos.z); temp = sqrtf(SQ(gPlayer[0].pos.x - effect->obj.pos.x) + SQ(gPlayer[0].unk_138 - effect->obj.pos.z)); xRot = -Math_Atan2F(gPlayer[0].pos.y - effect->obj.pos.y, temp); - Matrix_RotateY(gCalcMatrix, yRot, 0); - Matrix_RotateX(gCalcMatrix, xRot, 1); + Matrix_RotateY(gCalcMatrix, yRot, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, xRot, MTXF_APPLY); srcVelocity.y = 0.0f; srcVelocity.x = 0.0f; srcVelocity.z = 100.0f; @@ -2997,8 +2998,8 @@ void func_effect_8008040C(Effect* effect) { if ((gPlayer[0].unk_280 != 0) || (gPlayer[0].timer_27C != 0)) { effect->obj.rot.y = 90.0f; effect->obj.rot.x = RAND_FLOAT(360.0f); - Matrix_RotateY(gCalcMatrix, effect->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, effect->obj.rot.x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, effect->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, effect->obj.rot.x * M_DTOR, MTXF_APPLY); srcVelocity.y = 0.0f; srcVelocity.x = 0.0f; srcVelocity.z = 100.0f; @@ -3041,7 +3042,7 @@ void func_effect_8008040C(Effect* effect) { sp3C.y = effect->vel.y; sp3C.z = effect->vel.z; - if (func_enmy_8006351C(1000, &effect->obj.pos, &sp3C, 2) != 0) { + if (Object_CheckCollision(1000, &effect->obj.pos, &sp3C, 2) != 0) { func_effect_8007D10C(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 2.0f); Object_Kill(&effect->obj, effect->sfxSource); } @@ -3058,7 +3059,7 @@ void func_effect_8008092C(Effect* effect) { RCP_SetupDL(&gMasterDisp, 0x31); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 255); - Matrix_Scale(gGfxMatrix, 4.0f, 2.0f, 4.0f, 1); + Matrix_Scale(gGfxMatrix, 4.0f, 2.0f, 4.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ZO_6018AF0); break; @@ -3067,8 +3068,8 @@ void func_effect_8008092C(Effect* effect) { RCP_SetupDL(&gMasterDisp, 0x31); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 255); - Matrix_RotateZ(gGfxMatrix, 30.0f * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, 3.0f, 1.5f, 3.0f, 1); + Matrix_RotateZ(gGfxMatrix, 30.0f * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 3.0f, 1.5f, 3.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); break; @@ -3186,7 +3187,7 @@ void func_effect_80080D04(Effect* effect) { case 10: RCP_SetupDL(&gMasterDisp, 0x41); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_48); - Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, effect->scale2, 1); + Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, effect->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_TI_A000000); RCP_SetupDL(&gMasterDisp, 0x40); @@ -3238,19 +3239,19 @@ void func_effect_80080D04(Effect* effect) { case 16: Graphics_SetScaleMtx(effect->scale2); gDPSetPrimColor(gMasterDisp++, 0, 0, 96, 96, 255, 255); - Matrix_Translate(gGfxMatrix, 34.14f, 0.0f, 0.0f, 1); + Matrix_Translate(gGfxMatrix, 34.14f, 0.0f, 0.0f, MTXF_APPLY); Matrix_Push(&gGfxMatrix); - Matrix_Scale(gGfxMatrix, 0.25f, 1.0f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 0.25f, 1.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_102F5E0); Matrix_Pop(&gGfxMatrix); for (i = 0; i < 7; i++) { - Matrix_Translate(gGfxMatrix, 0.0f, 10.0f, 0.0f, 1); - Matrix_RotateZ(gGfxMatrix, M_PI / 4, 1); - Matrix_Translate(gGfxMatrix, 1.0f, 20.0f, 0.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 10.0f, 0.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, M_PI / 4, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 1.0f, 20.0f, 0.0f, MTXF_APPLY); Matrix_Push(&gGfxMatrix); - Matrix_Scale(gGfxMatrix, 0.25f, 1.0f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 0.25f, 1.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_102F5E0); Matrix_Pop(&gGfxMatrix); @@ -3277,13 +3278,13 @@ void func_effect_80080D04(Effect* effect) { for (i = 0; i < 10; i++) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, -60.0f, 0.0f, 1); - Matrix_Scale(gGfxMatrix, 0.8f, 3.0f, 1.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, -60.0f, 0.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.8f, 3.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_102F5E0); Matrix_Pop(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, -120.0f, 0.0f, 1); - Matrix_RotateZ(gGfxMatrix, D_800D1534[D_800D18E4][i] * M_DTOR, 1); + Matrix_Translate(gGfxMatrix, 0.0f, -120.0f, 0.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, D_800D1534[D_800D18E4][i] * M_DTOR, MTXF_APPLY); } break; @@ -3498,7 +3499,7 @@ void func_effect_80081C5C(Effect* effect) { effect->vel.z, RAND_FLOAT(0.05f) + 0.05f, 0); } - if (func_enmy_8006351C(effect->index, &effect->obj.pos, &velocity, 1) != 0) { + if (Object_CheckCollision(effect->index, &effect->obj.pos, &velocity, 1) != 0) { func_effect_8007B344(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 3.0f, 7); Object_Kill(&effect->obj, effect->sfxSource); } @@ -3525,7 +3526,7 @@ void func_effect_80081C5C(Effect* effect) { Math_SmoothStepToF(&effect->scale2, 0.5f, 0.01f, 0.02f, 0.0f); } - if (func_enmy_8006351C(effect->index, &effect->obj.pos, &velocity, 1) != 0) { + if (Object_CheckCollision(effect->index, &effect->obj.pos, &velocity, 1) != 0) { Object_Kill(&effect->obj, effect->sfxSource); func_effect_8007D0E0(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 1.0f); } @@ -3563,7 +3564,7 @@ void func_effect_80081C5C(Effect* effect) { (RAND_FLOAT_CENTERED(effect->scale2) * 50.0f) + effect->obj.pos.z, effect->vel.x, effect->vel.y, effect->vel.z, RAND_FLOAT(0.03f) + 0.05f, 10); } - if (func_enmy_8006351C(effect->index, &effect->obj.pos, &velocity, 1) != 0) { + if (Object_CheckCollision(effect->index, &effect->obj.pos, &velocity, 1) != 0) { func_effect_8007B344(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 3.0f, 7); Object_Kill(&effect->obj, effect->sfxSource); } @@ -3653,8 +3654,8 @@ void func_effect_80081C5C(Effect* effect) { case 8: Math_SmoothStepToF(D_ctx_801779A8, 30.0f, 1.0f, 5.0f, 0.0f); - Matrix_RotateY(gCalcMatrix, gBosses[0].obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, gBosses[0].obj.rot.x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, gBosses[0].obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, gBosses[0].obj.rot.x * M_DTOR, MTXF_APPLY); velocity.y = 0.0f; velocity.x = 0; @@ -3723,8 +3724,8 @@ void func_effect_80081C5C(Effect* effect) { yRotDeg = Math_RadToDeg(Math_Atan2F(posXDiff, posZDiff)); xRotDeg = Math_RadToDeg(-Math_Atan2F(posYDiff, sqrtf(SQ(posXDiff) + SQ(posZDiff)))); - Matrix_RotateY(gCalcMatrix, M_DTOR * yRotDeg, 0); - Matrix_RotateX(gCalcMatrix, M_DTOR * xRotDeg, 1); + Matrix_RotateY(gCalcMatrix, M_DTOR * yRotDeg, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, M_DTOR * xRotDeg, MTXF_APPLY); velocity.x = velocity.y = 0.0f; velocity.z = 20.0f; @@ -3764,13 +3765,13 @@ void func_effect_80081C5C(Effect* effect) { } if ((((gGameFrameCount % 16) == 0)) && (effect->timer_50 == 0)) { D_800D18EC = - RAD_TO_DEG(Math_Atan2F(gPlayer[0].camEye.x - gBosses[0].obj.pos.x, - gPlayer[0].camEye.z - (gBosses[0].obj.pos.z + D_ctx_80177D20))); + RAD_TO_DEG(Math_Atan2F(gPlayer[0].cam.eye.x - gBosses[0].obj.pos.x, + gPlayer[0].cam.eye.z - (gBosses[0].obj.pos.z + D_ctx_80177D20))); D_800D18E8 = RAD_TO_DEG( - -Math_Atan2F(gPlayer[0].camEye.y - gBosses[0].obj.pos.y, - sqrtf(SQ(gPlayer[0].camEye.z - (gBosses[0].obj.pos.z + D_ctx_80177D20)) + - SQ(gPlayer[0].camEye.x - gBosses[0].obj.pos.x)))); + -Math_Atan2F(gPlayer[0].cam.eye.y - gBosses[0].obj.pos.y, + sqrtf(SQ(gPlayer[0].cam.eye.z - (gBosses[0].obj.pos.z + D_ctx_80177D20)) + + SQ(gPlayer[0].cam.eye.x - gBosses[0].obj.pos.x)))); } if (gBosses[0].timer_050 == 0) { gBosses[0].swork[39] = effect->index; @@ -3792,8 +3793,8 @@ void func_effect_80081C5C(Effect* effect) { effect->obj.rot.y = gBosses[0].obj.rot.y; effect->obj.rot.z += 30.0f; - Matrix_RotateY(gCalcMatrix, gBosses[0].obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, gBosses[0].obj.rot.x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, gBosses[0].obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, gBosses[0].obj.rot.x * M_DTOR, MTXF_APPLY); velocity.x = velocity.y = 0.0f; velocity.z = 250.0f; @@ -3864,7 +3865,7 @@ void func_effect_80082F78(Effect* effect) { switch (effect->state) { case 0: RCP_SetupDL(&gMasterDisp, 0x31); - Matrix_Scale(gGfxMatrix, 0.7f, 0.7f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 0.7f, 0.7f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 32, 32, 255, 255); @@ -3880,7 +3881,7 @@ void func_effect_80082F78(Effect* effect) { case 2: RCP_SetupDL(&gMasterDisp, 0x31); - Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, 1); + Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 32, 32, 255, 255); @@ -3924,7 +3925,7 @@ void func_effect_80082F78(Effect* effect) { case 8: RCP_SetupDL(&gMasterDisp, 0x31); - Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, 1); + Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 255, 0, 128, 255); @@ -3933,7 +3934,7 @@ void func_effect_80082F78(Effect* effect) { case 9: RCP_SetupDL(&gMasterDisp, 0x31); - Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, 1); + Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->scale1); gDPSetEnvColor(gMasterDisp++, 255, 255, 128, 255); @@ -3945,7 +3946,7 @@ void func_effect_80082F78(Effect* effect) { Texture_Scroll(D_A6_6012840, 16, 16, 0); } RCP_SetupDL(&gMasterDisp, 0x35); - Matrix_Scale(gGfxMatrix, effect->unk_60.x, effect->unk_60.y, effect->unk_60.z, 1); + Matrix_Scale(gGfxMatrix, effect->unk_60.x, effect->unk_60.y, effect->unk_60.z, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_A6_6012550); @@ -4050,15 +4051,15 @@ void func_effect_800837EC(Effect* effect) { break; } - effect->obj.rot.y = RAD_TO_DEG(Math_Atan2F(gPlayer[0].camEye.x - effect->obj.pos.x, - gPlayer[0].camEye.z - (effect->obj.pos.z + D_ctx_80177D20))); + effect->obj.rot.y = RAD_TO_DEG(Math_Atan2F(gPlayer[0].cam.eye.x - effect->obj.pos.x, + gPlayer[0].cam.eye.z - (effect->obj.pos.z + D_ctx_80177D20))); } void func_effect_80083B8C(Effect* effect) { RCP_SetupDL_49(); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_44); gDPSetEnvColor(gMasterDisp++, 36, 45, 28, 255); - Matrix_Scale(gGfxMatrix, effect->unk_60.x, effect->scale2 * effect->unk_60.y, effect->scale2, 1); + Matrix_Scale(gGfxMatrix, effect->unk_60.x, effect->scale2 * effect->unk_60.y, effect->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ZO_601BAD0); RCP_SetupDL(&gMasterDisp, 0x40); @@ -4120,8 +4121,8 @@ void func_effect_80083D2C(f32 xPos, f32 yPos, f32 zPos, f32 srcZ) { yRot = Math_Atan2F(x, z); xRot = -Math_Atan2F(y, sqrtf(SQ(x) + SQ(z))); - Matrix_RotateY(gCalcMatrix, yRot, 0); - Matrix_RotateX(gCalcMatrix, xRot, 1); + Matrix_RotateY(gCalcMatrix, yRot, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, xRot, MTXF_APPLY); src.x = src.y = 0.0f; src.z = srcZ; @@ -4152,12 +4153,12 @@ void func_effect_80083FA8(Effect* effect) { return; } - effect->obj.rot.y = RAD_TO_DEG(-gPlayer[0].unk_058); - effect->obj.rot.x = RAD_TO_DEG(gPlayer[0].unk_05C); + effect->obj.rot.y = RAD_TO_DEG(-gPlayer[0].camYaw); + effect->obj.rot.x = RAD_TO_DEG(gPlayer[0].camPitch); effect->obj.rot.z += 20.0f; - Matrix_RotateZ(gCalcMatrix, effect->unk_60.z * M_DTOR, 0); - Matrix_RotateZ(gCalcMatrix, effect->unk_46 * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, effect->unk_60.z * M_DTOR, MTXF_NEW); + Matrix_RotateZ(gCalcMatrix, effect->unk_46 * M_DTOR, MTXF_APPLY); src.x = 0.0f; src.y = effect->scale1; @@ -4196,14 +4197,14 @@ void func_effect_80084194(Effect* effect) { if (gCurrentLevel != LEVEL_AQUAS) { RCP_SetupDL(&gMasterDisp, 0x31); - Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, 1); + Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); tmp = effect->unk_44 * 4; gDPSetEnvColor(gMasterDisp++, D_800D18F0[tmp + 0], D_800D18F0[tmp + 1], D_800D18F0[tmp + 2], 255); } else { RCP_SetupDL(&gMasterDisp, 0x31); - Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, 1); + Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, D_800D1950[effect->unk_44]); gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 255); diff --git a/src/engine/fox_enmy.c b/src/engine/fox_enmy.c index 3f31b401..ba0c56ad 100644 --- a/src/engine/fox_enmy.c +++ b/src/engine/fox_enmy.c @@ -94,13 +94,13 @@ bool func_enmy_80060FE4(Vec3f* arg0, f32 arg1) { Vec3f sp2C; Vec3f sp20; - if ((gLevelMode != LEVELMODE_ALL_RANGE) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2)) { + if ((gLevelMode != LEVELMODE_ALL_RANGE) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) { return true; } - Matrix_RotateY(gCalcMatrix, gPlayer[gPlayerNum].unk_058, 0); - sp2C.x = arg0->x - gPlayer[gPlayerNum].camEye.x; + Matrix_RotateY(gCalcMatrix, gPlayer[gPlayerNum].camYaw, MTXF_NEW); + sp2C.x = arg0->x - gPlayer[gPlayerNum].cam.eye.x; sp2C.y = 0.0f; - sp2C.z = arg0->z - gPlayer[gPlayerNum].camEye.z; + sp2C.z = arg0->z - gPlayer[gPlayerNum].cam.eye.z; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp2C, &sp20); if ((sp20.z < 1000.0f) && (arg1 < sp20.z) && (fabsf(sp20.x) < (fabsf(sp20.z * 0.5f) + 2000.0f))) { @@ -116,13 +116,13 @@ bool func_enmy_80061148(Vec3f* arg0, f32 arg1) { if (gLevelMode != LEVELMODE_ALL_RANGE) { return true; } - if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) { + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) { return func_enmy_80060FE4(arg0, arg1); } - Matrix_RotateY(gCalcMatrix, gPlayer[gPlayerNum].unk_058, 0); - sp2C.x = arg0->x - gPlayer[gPlayerNum].camEye.x; + Matrix_RotateY(gCalcMatrix, gPlayer[gPlayerNum].camYaw, MTXF_NEW); + sp2C.x = arg0->x - gPlayer[gPlayerNum].cam.eye.x; sp2C.y = 0.0f; - sp2C.z = arg0->z - gPlayer[gPlayerNum].camEye.z; + sp2C.z = arg0->z - gPlayer[gPlayerNum].cam.eye.z; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp2C, &sp20); if ((sp20.z < 0.0f) && (arg1 < sp20.z) && (fabsf(sp20.x) < (fabsf(sp20.z * 0.5f) + 500.0f))) { @@ -393,9 +393,9 @@ void func_enmy_80061F0C(Actor* actor, ObjectInit* objInit, s32 index) { actor->iwork[1] = gPrevEventActorIndex; actor->iwork[10] = gActors[gPrevEventActorIndex].aiType; actor->fwork[22] = D_play_80161A54; - Matrix_RotateZ(gCalcMatrix, -D_ctx_80177E88.z * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -D_ctx_80177E88.x * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -D_ctx_80177E88.y * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, -D_ctx_80177E88.z * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -D_ctx_80177E88.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -D_ctx_80177E88.y * M_DTOR, MTXF_APPLY); sp24.x = actor->obj.pos.x - D_ctx_80177F10.x; sp24.y = actor->obj.pos.y - D_ctx_80177F10.y; sp24.z = actor->obj.pos.z - D_ctx_80177F10.z; @@ -517,7 +517,7 @@ void func_enmy_80062568(void) { } } -void func_enmy_80062664(void) { +void Object_LoadFromInit(void) { ObjectInit* objInit; f32 xMax; f32 xMin; @@ -650,7 +650,7 @@ void func_enmy_80062D04(f32 xPos, f32 yPos) { } } -bool func_enmy_80062DBC(Vec3f* pos, f32* hitboxData, Object* obj, f32 xRot, f32 yRot, f32 zRot) { +bool Object_CheckHitboxCollision(Vec3f* pos, f32* hitboxData, Object* obj, f32 xRot, f32 yRot, f32 zRot) { s32 i; Vec3f hitRot; Vec3f hitPos; @@ -681,16 +681,16 @@ bool func_enmy_80062DBC(Vec3f* pos, f32* hitboxData, Object* obj, f32 xRot, f32 hitPos.y = pos->y; hitPos.z = pos->z; } else { - Matrix_RotateZ(gCalcMatrix, -hitRot.z * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -hitRot.x * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -hitRot.y * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, -obj->rot.z * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, -obj->rot.x * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -obj->rot.y * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, -hitRot.z * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -hitRot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -hitRot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -obj->rot.z * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, -obj->rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -obj->rot.y * M_DTOR, MTXF_APPLY); if ((xRot != 0.0f) || (yRot != 0.0f) || (zRot != 0.0f)) { - Matrix_RotateZ(gCalcMatrix, -zRot * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, -xRot * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -yRot * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, -zRot * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, -xRot * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -yRot * M_DTOR, MTXF_APPLY); } sp80.x = pos->x - obj->pos.x; sp80.y = pos->y - obj->pos.y; @@ -711,40 +711,40 @@ bool func_enmy_80062DBC(Vec3f* pos, f32* hitboxData, Object* obj, f32 xRot, f32 return false; } -bool func_enmy_800631A8(Vec3f* posD, f32* hitboxData, Vec3f* posA) { +bool Object_CheckSingleHitbox(Vec3f* checkPos, f32* hitboxData, Vec3f* hitboxPos) { if ((s32) hitboxData[0] != 0) { - if ((fabsf(hitboxData[1] + posA->z - posD->z) < (hitboxData[2] + 20.0f)) && - (fabsf(hitboxData[5] + posA->x - posD->x) < (hitboxData[6] + 20.0f)) && - (fabsf(hitboxData[3] + posA->y - posD->y) < (hitboxData[4] + 20.0f))) { + if ((fabsf(hitboxData[1] + hitboxPos->z - checkPos->z) < (hitboxData[2] + 20.0f)) && + (fabsf(hitboxData[5] + hitboxPos->x - checkPos->x) < (hitboxData[6] + 20.0f)) && + (fabsf(hitboxData[3] + hitboxPos->y - checkPos->y) < (hitboxData[4] + 20.0f))) { return true; } } return false; } -bool func_enmy_8006326C(Vec3f* arg0, Vec3f* arg1, ObjectId objId, Object* obj) { +bool Object_CheckPolyCollision(Vec3f* pos, Vec3f* vel, ObjectId objId, Object* obj) { Vec3f sp74; Vec3f sp68; - Vec3f sp5C; - Vec3f sp50; + Vec3f relPos; + Vec3f objPos; Vec3f sp44; s32 colId; s32 pad1[2]; f32 sp30[2]; s32 pad2; - sp74.x = arg0->x - obj->pos.x; - sp74.z = arg0->z - obj->pos.z; + sp74.x = pos->x - obj->pos.x; + sp74.z = pos->z - obj->pos.z; if (((fabsf(sp74.x) < 1100.0f) && (fabsf(sp74.z) < 1100.0f)) || (objId == OBJ_ACTOR_180)) { - sp74.y = arg0->y - obj->pos.y; - Matrix_RotateY(gCalcMatrix, -obj->rot.y * M_DTOR, 0); + sp74.y = pos->y - obj->pos.y; + Matrix_RotateY(gCalcMatrix, -obj->rot.y * M_DTOR, MTXF_NEW); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp74, &sp68); - sp5C.x = obj->pos.x + sp68.x; - sp5C.y = obj->pos.y + sp68.y; - sp5C.z = obj->pos.z + sp68.z; - sp50.x = obj->pos.x; - sp50.y = obj->pos.y; - sp50.z = obj->pos.z; + relPos.x = obj->pos.x + sp68.x; + relPos.y = obj->pos.y + sp68.y; + relPos.z = obj->pos.z + sp68.z; + objPos.x = obj->pos.x; + objPos.y = obj->pos.y; + objPos.z = obj->pos.z; if ((objId == OBJ_ACTOR_180) || (objId == OBJ_80_149) || (objId == OBJ_80_150) || (objId == OBJ_BOSS_308) || (objId == OBJ_BOSS_313) || (objId == OBJ_BOSS_312) || (objId == OBJ_BOSS_309) || (objId == OBJ_80_39)) { colId = COL1_0; @@ -764,7 +764,7 @@ bool func_enmy_8006326C(Vec3f* arg0, Vec3f* arg1, ObjectId objId, Object* obj) { } else if (objId == OBJ_BOSS_313) { colId = COL1_8; } - if (func_col1_800998FC(&sp5C, &sp50, arg1, colId, &sp44, sp30) > 0) { + if (func_col1_800998FC(&relPos, &objPos, vel, colId, &sp44, sp30) > 0) { return true; } } else { @@ -786,7 +786,7 @@ bool func_enmy_8006326C(Vec3f* arg0, Vec3f* arg1, ObjectId objId, Object* obj) { } else if ((objId == OBJ_80_4) || (objId == OBJ_80_5)) { colId = COL2_1; } - if (func_col2_800A3690(&sp5C, &sp50, colId, &sp44)) { + if (func_col2_800A3690(&relPos, &objPos, colId, &sp44)) { return true; } } @@ -794,7 +794,7 @@ bool func_enmy_8006326C(Vec3f* arg0, Vec3f* arg1, ObjectId objId, Object* obj) { return false; } -s32 func_enmy_8006351C(s32 index, Vec3f* pos, Vec3f* arg2, s32 arg3) { +s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) { Object_58* obj58; Object_80* obj80; Sprite* sprite; @@ -810,12 +810,12 @@ s32 func_enmy_8006351C(s32 index, Vec3f* pos, Vec3f* arg2, s32 arg3) { if ((obj58->obj.id == OBJ_80_1) || (obj58->obj.id == OBJ_80_3) || (obj58->obj.id == OBJ_80_117) || (obj58->obj.id == OBJ_80_141) || (obj58->obj.id == OBJ_80_150) || (obj58->obj.id == OBJ_80_149) || (obj58->obj.id == OBJ_80_148) || (obj58->obj.id == OBJ_80_140)) { - if (func_enmy_8006326C(pos, arg2, obj58->obj.id, &obj58->obj)) { + if (Object_CheckPolyCollision(pos, vel, obj58->obj.id, &obj58->obj)) { return 999; } } else if ((fabsf(pos->x - obj58->obj.pos.x) < 2000.0f) && (fabsf(pos->z - obj58->obj.pos.z) < 2000.0f)) { - if (func_enmy_80062DBC(pos, obj58->info.hitbox, &obj58->obj, 0.0f, 0.0f, 0.0f)) { + if (Object_CheckHitboxCollision(pos, obj58->info.hitbox, &obj58->obj, 0.0f, 0.0f, 0.0f)) { return 2; } } @@ -827,11 +827,11 @@ s32 func_enmy_8006351C(s32 index, Vec3f* pos, Vec3f* arg2, s32 arg3) { if (obj80->obj.status == OBJ_ACTIVE) { if ((obj80->obj.id == OBJ_80_1) || (obj80->obj.id == OBJ_80_4) || (obj80->obj.id == OBJ_80_5) || (obj80->obj.id == OBJ_80_2) || (obj80->obj.id == OBJ_80_39) || (obj80->obj.id == OBJ_80_3)) { - if (func_enmy_8006326C(pos, arg2, obj80->obj.id, &obj80->obj)) { + if (Object_CheckPolyCollision(pos, vel, obj80->obj.id, &obj80->obj)) { return 2; } } else if ((fabsf(pos->x - obj80->obj.pos.x) < 2000.0f) && (fabsf(pos->z - obj80->obj.pos.z) < 2000.0f)) { - if (func_enmy_80062DBC(pos, obj80->info.hitbox, &obj80->obj, 0.0f, 0.0f, 0.0f)) { + if (Object_CheckHitboxCollision(pos, obj80->info.hitbox, &obj80->obj, 0.0f, 0.0f, 0.0f)) { return i + 10; } } @@ -841,7 +841,7 @@ s32 func_enmy_8006351C(s32 index, Vec3f* pos, Vec3f* arg2, s32 arg3) { for (i = 0; i < ARRAY_COUNT(gSprites); i++, sprite++) { if ((sprite->obj.status == OBJ_ACTIVE) && (fabsf(pos->x - sprite->obj.pos.x) < 500.0f) && (fabsf(pos->z - sprite->obj.pos.z) < 500.0f) && - func_enmy_800631A8(pos, sprite->info.hitbox, &sprite->obj.pos)) { + Object_CheckSingleHitbox(pos, sprite->info.hitbox, &sprite->obj.pos)) { if ((sprite->obj.id == OBJ_SPRITE_FO_POLE) || (sprite->obj.id == OBJ_SPRITE_CO_TREE) || (sprite->obj.id == OBJ_SPRITE_CO_TREE)) { sprite->unk_46 = 1; @@ -849,14 +849,14 @@ s32 func_enmy_8006351C(s32 index, Vec3f* pos, Vec3f* arg2, s32 arg3) { return 0; } } - if ((arg3 == 0) || (arg3 == 2) || (arg3 == 3)) { - if (arg3 != 2) { + if ((mode == 0) || (mode == 2) || (mode == 3)) { + if (mode != 2) { boss = gBosses; for (i = 0; i < ARRAY_COUNT(gBosses); i++, boss++) { if (boss->obj.status == OBJ_ACTIVE) { if ((boss->obj.id == OBJ_BOSS_308) || (boss->obj.id == OBJ_BOSS_312) || (boss->obj.id == OBJ_BOSS_313) || (boss->obj.id == OBJ_BOSS_309)) { - if (func_enmy_8006326C(pos, arg2, boss->obj.id, &boss->obj)) { + if (Object_CheckPolyCollision(pos, vel, boss->obj.id, &boss->obj)) { return 2; } } else if (boss->obj.id == OBJ_BOSS_310) { @@ -878,7 +878,7 @@ s32 func_enmy_8006351C(s32 index, Vec3f* pos, Vec3f* arg2, s32 arg3) { } if ((fabsf(pos->x - boss->obj.pos.x) < 2000.0f) && (fabsf(pos->z - boss->obj.pos.z) < 2000.0f)) { - if (func_enmy_80062DBC(pos, boss->info.hitbox, &boss->obj, 0.0f, 0.0f, 0.0f)) { + if (Object_CheckHitboxCollision(pos, boss->info.hitbox, &boss->obj, 0.0f, 0.0f, 0.0f)) { return 2; } } @@ -892,12 +892,12 @@ s32 func_enmy_8006351C(s32 index, Vec3f* pos, Vec3f* arg2, s32 arg3) { (fabsf(pos->z - actor->obj.pos.z) < 1500.0f) && (index != i) && (actor->info.unk_16 != 2) && !((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->aiType <= AI360_PEPPY)) && (actor->timer_0C2 == 0)) { if (actor->obj.id == OBJ_ACTOR_180) { - if (func_enmy_8006326C(pos, arg2, actor->obj.id, &actor->obj)) { + if (Object_CheckPolyCollision(pos, vel, actor->obj.id, &actor->obj)) { return 2; } } else if (actor->scale < 0.0f) { - if (func_enmy_80062DBC(pos, actor->info.hitbox, &actor->obj, actor->vwork[29].x, actor->vwork[29].y, - actor->vwork[29].z + actor->unk_0F4.z)) { + if (Object_CheckHitboxCollision(pos, actor->info.hitbox, &actor->obj, actor->vwork[29].x, + actor->vwork[29].y, actor->vwork[29].z + actor->unk_0F4.z)) { actor->unk_0D0 = 1; actor->damage = 10; actor->unk_0D2 = -1; @@ -906,8 +906,8 @@ s32 func_enmy_8006351C(s32 index, Vec3f* pos, Vec3f* arg2, s32 arg3) { actor->unk_0D8.z = pos->z; return 2; } - } else if ((arg3 != 2) && (arg3 != 3)) { - if (func_enmy_800631A8(pos, actor->info.hitbox, &actor->obj.pos)) { + } else if ((mode != 2) && (mode != 3)) { + if (Object_CheckSingleHitbox(pos, actor->info.hitbox, &actor->obj.pos)) { actor->unk_0D0 = 1; actor->damage = 10; actor->unk_0D2 = -1; @@ -1579,8 +1579,8 @@ void func_enmy_800656D4(Actor* actor) { sp8C.x = actor->vel.x; sp8C.y = actor->vel.y; sp8C.z = actor->vel.z; - if ((func_enmy_8006351C(actor->index, &actor->obj.pos, &sp8C, 1) != 0) || (actor->unk_0D0 != 0) || - (actor->obj.pos.y < (gGroundLevel + 10.0f)) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7)) { + if ((Object_CheckCollision(actor->index, &actor->obj.pos, &sp8C, 1) != 0) || (actor->unk_0D0 != 0) || + (actor->obj.pos.y < (gGroundLevel + 10.0f)) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 3.0f); Object_Kill(&actor->obj, actor->sfxSource); if (actor->unk_0D0 != 0) { @@ -1603,7 +1603,7 @@ void func_enmy_800656D4(Actor* actor) { if (fabsf(actor->obj.pos.z - gPlayer[0].unk_138) < 100.0f) { actor->iwork[10] = 1; } - if (gPlayer[0].camEye.z < (actor->obj.pos.z + D_ctx_80177D20)) { + if (gPlayer[0].cam.eye.z < (actor->obj.pos.z + D_ctx_80177D20)) { Object_Kill(&actor->obj, actor->sfxSource); } } @@ -1673,7 +1673,7 @@ void Actor_Despawn(Actor* actor) { } if (actor->obj.id == OBJ_ACTOR_ALLRANGE) { if ((actor->aiType >= AI360_WOLF) && (actor->aiType < AI360_KATT)) { - func_360_8002E3E0(actor); + AllRange_GetStarWolfHits(actor); } } } @@ -1818,8 +1818,8 @@ void func_enmy_80066A8C(Object_80* obj80) { sp64.x = 120.0f; } for (yf = 0.0f; yf < 680.0f; yf += 100.0f) { - Matrix_RotateY(gCalcMatrix, obj80->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, obj80->obj.rot.x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, obj80->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, obj80->obj.rot.x * M_DTOR, MTXF_APPLY); sp64.y = yf; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp64, &sp58); func_effect_8007D0E0(obj80->obj.pos.x + sp58.x, obj80->obj.pos.y + sp58.y, obj80->obj.pos.z + sp58.z, 4.0f); @@ -1836,7 +1836,7 @@ void func_enmy_80066C00(Object_80* obj80) { if (obj80->obj.rot.y > 90.0f) { sp64.x = 100.0f; } - Matrix_RotateY(gCalcMatrix, obj80->obj.rot.y * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, obj80->obj.rot.y * M_DTOR, MTXF_NEW); for (zf = -180.0f; zf <= 0.0f; zf += 30.0f) { sp64.z = zf; @@ -1879,7 +1879,7 @@ void Sprite167_Update(Sprite167* this) { void func_enmy_80066EA8(Object_80* obj80) { obj80->obj.rot.y = 0.0f; - if (gPlayer[0].camEye.x < obj80->obj.pos.x) { + if (gPlayer[0].cam.eye.x < obj80->obj.pos.x) { obj80->obj.rot.y = 271.0f; } } @@ -1890,7 +1890,7 @@ void func_enmy_80066EE4(Sprite* sprite) { void func_enmy_80066EF0(Item* item) { f32 var_fa1; - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_0)) { + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY)) { Object_Kill(&item->obj, item->sfxSource); } if ((gLevelMode == LEVELMODE_ON_RAILS) && (gLastPathChange == 0)) { @@ -1944,7 +1944,7 @@ void func_enmy_800671D0(Item* item) { var_v0 = 7; } if (!(var_v0 & gGameFrameCount)) { - Matrix_RotateY(gCalcMatrix, gGameFrameCount * 23.0f * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, gGameFrameCount * 23.0f * M_DTOR, MTXF_NEW); sp40.x = 50.0f; sp40.y = RAND_FLOAT_CENTERED(120.0f); sp40.z = 0.0f; @@ -2025,8 +2025,8 @@ void ActorSupplies_Update(ActorSupplies* this) { Object_Kill(&this->obj, this->sfxSource); } } - gRadarMarks[63].unk_00 = 1; - gRadarMarks[63].unk_02 = 103; + gRadarMarks[63].status = 1; + gRadarMarks[63].type = 103; gRadarMarks[63].pos.x = this->obj.pos.x; gRadarMarks[63].pos.y = this->obj.pos.y; gRadarMarks[63].pos.z = this->obj.pos.z; @@ -2039,9 +2039,9 @@ void ActorSupplies_Draw(Actor* actor) { Lights_SetOneLight(&gMasterDisp, -60, -60, 60, 150, 150, 150, 20, 20, 20); for (i = 0; i < 6; i++) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_enmy_800CFEC4[i].x, D_enmy_800CFEC4[i].y, D_enmy_800CFEC4[i].z, 1); - Matrix_RotateY(gGfxMatrix, D_enmy_800CFF0C[i].y * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, D_enmy_800CFF0C[i].x * M_DTOR, 1); + Matrix_Translate(gGfxMatrix, D_enmy_800CFEC4[i].x, D_enmy_800CFEC4[i].y, D_enmy_800CFEC4[i].z, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, D_enmy_800CFF0C[i].y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, D_enmy_800CFF0C[i].x * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_10177C0); Matrix_Pop(&gGfxMatrix); @@ -2206,14 +2206,14 @@ void ItemSupplyRing_Update(Item* this) { this->obj.pos.z += (gPlayer[this->playerNum].unk_138 - this->obj.pos.z) * 0.5f; } this->obj.rot.z += 22.0f; - Math_SmoothStepToAngle(&this->obj.rot.y, Math_RadToDeg(-gPlayer[this->playerNum].unk_058), 0.2f, 10.0f, + Math_SmoothStepToAngle(&this->obj.rot.y, Math_RadToDeg(-gPlayer[this->playerNum].camYaw), 0.2f, 10.0f, 0.0f); if (this->timer_48 == 0) { Object_Kill(&this->obj, this->sfxSource); } if (this->scale > 0.3f) { - Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, 0); - Matrix_RotateZ(gCalcMatrix, gGameFrameCount * 37.0f * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateZ(gCalcMatrix, gGameFrameCount * 37.0f * M_DTOR, MTXF_APPLY); sp4C.x = 0.0f; sp4C.y = this->scale * 100.0f; sp4C.z = 0.0f; @@ -2277,7 +2277,7 @@ void ItemMeteoWarp_Update(ItemMeteoWarp* this) { } gRingPassCount++; if (gRingPassCount >= 7) { - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_8; + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ENTER_WARP_ZONE; gPlayer[0].unk_1D0 = 0; AUDIO_PLAY_SFX(0x1900602A, gDefaultSfxSource, 0); gNextPlanetPath = 2; @@ -2345,14 +2345,14 @@ void ItemRingCheck_Update(Item* item) { void ItemPathChange_Update(Item* this) { gLastPathChange = this->obj.id; - if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_3) { + if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_ACTIVE) { Object_Kill(&this->obj, this->sfxSource); } else if (((gCurrentLevel == LEVEL_METEO) || (gCurrentLevel == LEVEL_SECTOR_X)) && (gLevelStage == 1)) { - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_7; + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].unk_1D0 = 0; Object_Kill(&this->obj, this->sfxSource); } else if (gCurrentLevel == LEVEL_TRAINING) { - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_9; + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_START_360; gPlayer[0].unk_1D0 = 0; Object_Kill(&this->obj, this->sfxSource); } else if (this->state == 0) { @@ -2418,10 +2418,10 @@ void ItemPathChange_Update(Item* this) { } void Sprite_UpdateDoodad(Sprite* this) { - this->obj.rot.y = - (Math_Atan2F(gPlayer[0].camEye.x - this->obj.pos.x, gPlayer[0].camEye.z - (this->obj.pos.z + D_ctx_80177D20)) * - 180.0f) / - M_PI; + this->obj.rot.y = (Math_Atan2F(gPlayer[0].cam.eye.x - this->obj.pos.x, + gPlayer[0].cam.eye.z - (this->obj.pos.z + D_ctx_80177D20)) * + 180.0f) / + M_PI; if (this->unk_46 != 0) { this->obj.status = OBJ_FREE; func_effect_8007A6F0(&this->obj.pos, 0x1903400F); @@ -2495,10 +2495,10 @@ void Actor_Move(Actor* actor) { if ((actor->obj.id == OBJ_ACTOR_236) || (gCurrentLevel == LEVEL_MACBETH) || ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0B4 == EINFO_56))) { var_fv0 = 8000.0f; - } else if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_8) { + } else if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ENTER_WARP_ZONE) { var_fv0 = 100000.0f; } - if (((gPlayer[0].camEye.z + actor->info.unk_10) < (actor->obj.pos.z + D_ctx_80177D20)) || + if (((gPlayer[0].cam.eye.z + actor->info.unk_10) < (actor->obj.pos.z + D_ctx_80177D20)) || ((actor->obj.pos.z + D_ctx_80177D20) < -15000.0f) || (actor->obj.pos.y < (gPlayer[0].unk_0B0 - var_fv0)) || ((gPlayer[0].unk_0B0 + var_fv0) < actor->obj.pos.y) || ((gPlayer[0].unk_0AC + var_fv0) < actor->obj.pos.x) || @@ -2534,20 +2534,20 @@ void Boss_Move(Boss* boss) { boss->obj.pos.y += boss->vel.y; boss->obj.pos.z += boss->vel.z; boss->vel.y -= boss->gravity; - if ((D_ctx_80161AB8 != 0) && ((boss->obj.pos.z + D_ctx_80177D20) > (boss->info.unk_10 - gPlayer[0].camEye.z))) { - if (gPlayer[0].camEye.z) {} // fake + if ((D_ctx_80161AB8 != 0) && ((boss->obj.pos.z + D_ctx_80177D20) > (boss->info.unk_10 - gPlayer[0].cam.eye.z))) { + if (gPlayer[0].cam.eye.z) {} // fake Object_Kill(&boss->obj, boss->sfxSource); } } void Object80_Move(Object_80* obj80) { - if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2) { + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) { obj80->obj.pos.z += obj80->unk_60; if (obj80->info.unk_10 < obj80->obj.pos.z) { Object_Kill(&obj80->obj, obj80->sfxSource); } } else if ((gLevelMode == LEVELMODE_ON_RAILS) && (gBossActive != 2)) { - f32 temp_fv0 = fabsf(obj80->obj.pos.x - gPlayer[0].camEye.x); + f32 temp_fv0 = fabsf(obj80->obj.pos.x - gPlayer[0].cam.eye.x); f32 var_fa0 = 500.0f; if ((obj80->obj.id == OBJ_80_6) || (obj80->obj.id == OBJ_80_7)) { @@ -2557,7 +2557,7 @@ void Object80_Move(Object_80* obj80) { if ((fabsf(gPlayer[0].unk_114) > 1.0f) || (gCurrentLevel == LEVEL_MACBETH)) { temp_fv0 = 0.0f; } - temp_fv0 -= gPlayer[0].camEye.z; + temp_fv0 -= gPlayer[0].cam.eye.z; if ((obj80->info.unk_10 - temp_fv0) < (obj80->obj.pos.z + D_ctx_80177D20)) { Object_Kill(&obj80->obj, obj80->sfxSource); } @@ -2566,7 +2566,7 @@ void Object80_Move(Object_80* obj80) { void Sprite_Move(Sprite* sprite) { if (D_ctx_80161AB8 != 0) { - f32 temp_fv0 = fabsf(sprite->obj.pos.x - gPlayer[0].camEye.x); + f32 temp_fv0 = fabsf(sprite->obj.pos.x - gPlayer[0].cam.eye.x); f32 var_fa0 = 500.0f; if (((sprite->obj.id == OBJ_SPRITE_FOG_SHADOW) && @@ -2575,7 +2575,7 @@ void Sprite_Move(Sprite* sprite) { var_fa0 = 1000.0f; } temp_fv0 = ((temp_fv0 - var_fa0) < 0.0f) ? 0.0f * 1.7f : (temp_fv0 - var_fa0) * 1.7f; - temp_fv0 -= gPlayer[0].camEye.z; + temp_fv0 -= gPlayer[0].cam.eye.z; if ((sprite->info.unk_10 - temp_fv0) < (sprite->obj.pos.z + D_ctx_80177D20)) { sprite->obj.status = OBJ_FREE; } @@ -2587,10 +2587,10 @@ void Effect_Move(Effect* effect) { effect->obj.pos.y += effect->vel.y; effect->obj.pos.z += effect->vel.z; if (D_ctx_80161AB8 != 0) { - if ((gPlayer[0].camEye.z + effect->info.unk_10) < (effect->obj.pos.z + D_ctx_80177D20)) { + if ((gPlayer[0].cam.eye.z + effect->info.unk_10) < (effect->obj.pos.z + D_ctx_80177D20)) { Object_Kill(&effect->obj, effect->sfxSource); - } else if ((fabsf(effect->obj.pos.y - gPlayer[0].camEye.y) > 25000.0f) || - (fabsf(effect->obj.pos.x - gPlayer[0].camEye.x) > 25000.0f)) { + } else if ((fabsf(effect->obj.pos.y - gPlayer[0].cam.eye.y) > 25000.0f) || + (fabsf(effect->obj.pos.x - gPlayer[0].cam.eye.x) > 25000.0f)) { Object_Kill(&effect->obj, effect->sfxSource); } } @@ -2598,7 +2598,7 @@ void Effect_Move(Effect* effect) { void Item_Move(Item* item) { if (D_ctx_80161AB8 != 0) { - f32 temp = (0.0f - gPlayer[0].camEye.z); + f32 temp = (0.0f - gPlayer[0].cam.eye.z); if ((item->info.unk_10 - temp) < (item->obj.pos.z + D_ctx_80177D20)) { Object_Kill(&item->obj, item->sfxSource); @@ -2811,9 +2811,9 @@ void TexturedLine_Update(TexturedLine* this) { if (gGameState == GSTATE_PLAY) { if (((this->mode == 1) || (this->mode == 101) || (this->mode == 50)) && - (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) && (gPlayer[0].unk_1F4 == 0)) { - Matrix_RotateX(gCalcMatrix, -this->unk_1C, 0); - Matrix_RotateY(gCalcMatrix, -this->unk_20, 1); + (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (gPlayer[0].unk_1F4 == 0)) { + Matrix_RotateX(gCalcMatrix, -this->unk_1C, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, -this->unk_20, MTXF_APPLY); sp44.x = gPlayer[gPlayerNum].pos.x - this->unk_04.x; sp44.y = gPlayer[gPlayerNum].pos.y - this->unk_04.y; sp44.z = gPlayer[gPlayerNum].unk_138 - this->unk_04.z; @@ -2866,14 +2866,14 @@ void Object_Update(void) { D_ctx_80161AB8 = 0; if ((gLevelMode == LEVELMODE_ON_RAILS) && - ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_1) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) || - (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_4) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_8) || - (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_9) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_6))) { + ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_INIT) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || + (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_DOWN) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ENTER_WARP_ZONE) || + (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_START_360) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_NEXT))) { D_ctx_80161AB8 = 1; } if (gLevelMode != LEVELMODE_ALL_RANGE) { - if ((D_ctx_80178488 != 0) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2)) { - func_enmy_80062664(); + if ((gLoadLevelObjects != 0) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) { + Object_LoadFromInit(); } for (i = 0, obj80 = gObjects80; i < ARRAY_COUNT(gObjects80); i++, obj80++) { if (obj80->obj.status != OBJ_FREE) { diff --git a/src/engine/fox_enmy2.c b/src/engine/fox_enmy2.c index c47ceaca..64ffb490 100644 --- a/src/engine/fox_enmy2.c +++ b/src/engine/fox_enmy2.c @@ -109,7 +109,7 @@ void Obj54_Update(Object80_54* this) { Texture_Scroll(D_CO_60038F8, 32, 32, 1); if ((gGameFrameCount % 4) == 0) { - Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); sp18.x = RAND_FLOAT_CENTERED(700.0f); sp18.y = RAND_FLOAT(50.0f); @@ -135,10 +135,10 @@ void Actor201_Update(Actor201* this) { this->timer_0BC = 20; } sp2C = this->obj.pos.z + D_ctx_80177D20; - this->obj.rot.y = Math_RadToDeg(Math_Atan2F(gPlayer[0].camEye.x - this->obj.pos.x, gPlayer[0].camEye.z - sp2C)); - this->obj.rot.x = - -Math_RadToDeg(Math_Atan2F(gPlayer[0].camEye.y - this->obj.pos.y, - sqrtf(SQ(gPlayer[0].camEye.z - sp2C) + SQ(gPlayer[0].camEye.x - this->obj.pos.x)))); + this->obj.rot.y = Math_RadToDeg(Math_Atan2F(gPlayer[0].cam.eye.x - this->obj.pos.x, gPlayer[0].cam.eye.z - sp2C)); + this->obj.rot.x = -Math_RadToDeg( + Math_Atan2F(gPlayer[0].cam.eye.y - this->obj.pos.y, + sqrtf(SQ(gPlayer[0].cam.eye.z - sp2C) + SQ(gPlayer[0].cam.eye.x - this->obj.pos.x)))); } void Actor202_Update(Actor202* this) { @@ -294,15 +294,15 @@ void Actor194_8006B46C(Actor194* this, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f Vec3f sp34 = { 0.0f, 0.0f, 0.0f }; Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, arg1, arg2, arg3 + D_ctx_80177D20, 1); + Matrix_Translate(gGfxMatrix, arg1, arg2, arg3 + D_ctx_80177D20, MTXF_APPLY); if (arg7 != 1) { - Matrix_RotateY(gGfxMatrix, M_DTOR * arg5, 1); - Matrix_RotateX(gGfxMatrix, M_DTOR * arg4, 1); - Matrix_RotateZ(gGfxMatrix, M_DTOR * arg6, 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_Scale(gGfxMatrix, arg8, arg8, 1.0f, 1); + Matrix_Scale(gGfxMatrix, arg8, arg8, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if (arg7 != 1) { @@ -623,7 +623,7 @@ void Actor189_Update(Actor189* this) { case 52: case 53: case 55: - if (((this->timer_0BC == 0) || (func_enmy_8006351C(this->index, &this->obj.pos, &D_800D0030, 1) != 0) || + if (((this->timer_0BC == 0) || (Object_CheckCollision(this->index, &this->obj.pos, &D_800D0030, 1) != 0) || (this->obj.pos.y < (gGroundLevel + 10.0f))) && (this->timer_0BE == 0)) { func_effect_8007B8F8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 50.0f, this->scale * 10.0f); @@ -634,7 +634,7 @@ void Actor189_Update(Actor189* this) { case 56: Math_SmoothStepToF(&this->scale, 0.0f, 0.1f, 2.0f, 0.0001f); - if (((this->timer_0BC == 0) || (func_enmy_8006351C(this->index, &this->obj.pos, &D_800D0030, 1) != 0) || + if (((this->timer_0BC == 0) || (Object_CheckCollision(this->index, &this->obj.pos, &D_800D0030, 1) != 0) || (this->obj.pos.y < (gGroundLevel + 10.0f))) && (this->timer_0BE == 0)) { func_effect_8007B8F8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 50.0f, this->scale * 10.0f); @@ -655,7 +655,7 @@ void Actor189_Update(Actor189* this) { this->obj.rot.y += this->fwork[1]; this->obj.rot.z += this->fwork[2]; - if (((this->timer_0BC == 0) || (func_enmy_8006351C(this->index, &this->obj.pos, &D_800D0030, 1) != 0) || + if (((this->timer_0BC == 0) || (Object_CheckCollision(this->index, &this->obj.pos, &D_800D0030, 1) != 0) || (this->obj.pos.y < (gGroundLevel + 10.0f))) && (this->timer_0BE == 0)) { func_effect_8007B8F8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 50.0f, this->scale * 10.0f); @@ -665,7 +665,7 @@ void Actor189_Update(Actor189* this) { break; case 54: - if (((this->timer_0BC == 0) || (func_enmy_8006351C(this->index, &this->obj.pos, &D_800D0030, 1) != 0) || + if (((this->timer_0BC == 0) || (Object_CheckCollision(this->index, &this->obj.pos, &D_800D0030, 1) != 0) || (this->obj.pos.y < (gGroundLevel + 10.0f))) && (this->timer_0BE == 0)) { func_effect_8007B8F8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 70.0f, this->scale * 20.0f); @@ -683,7 +683,7 @@ void Actor189_Update(Actor189* this) { this->obj.rot.x += this->fwork[0]; this->obj.rot.y += this->fwork[1]; this->obj.rot.z += this->fwork[2]; - if (func_enmy_8006351C(this->index, &this->obj.pos, &D_tank_800C9F2C, 1) != 0) { + if (Object_CheckCollision(this->index, &this->obj.pos, &D_tank_800C9F2C, 1) != 0) { this->vel.x *= -0.7f; } if (this->obj.pos.y < gGroundLevel) { @@ -696,7 +696,7 @@ void Actor189_Update(Actor189* this) { this->obj.rot.y += this->fwork[1]; this->obj.rot.z += this->fwork[2]; - if (func_enmy_8006351C(this->index, &this->obj.pos, &D_tank_800C9F2C, 1) != 0) { + if (Object_CheckCollision(this->index, &this->obj.pos, &D_tank_800C9F2C, 1) != 0) { this->vel.x *= -0.7f; } @@ -731,12 +731,14 @@ void Actor189_Update(Actor189* this) { this->obj.rot.z += this->fwork[12]; if (this->state == 70) { - if ((this->timer_0BC == 0) || (func_enmy_8006351C(this->index, &this->obj.pos, &D_800D0030, 1) != 0) || + if ((this->timer_0BC == 0) || + (Object_CheckCollision(this->index, &this->obj.pos, &D_800D0030, 1) != 0) || (this->obj.pos.y < (gGroundLevel + 10.0f))) { Object_Kill(&this->obj, this->sfxSource); } } else if (this->state == 39) { - if (((this->timer_0BC == 0) || (func_enmy_8006351C(this->index, &this->obj.pos, &D_800D0030, 1) != 0) || + if (((this->timer_0BC == 0) || + (Object_CheckCollision(this->index, &this->obj.pos, &D_800D0030, 1) != 0) || (this->obj.pos.y < (gGroundLevel + 10.0f))) && (this->timer_0BE == 0)) { func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 10.0f); @@ -745,7 +747,7 @@ void Actor189_Update(Actor189* this) { } } else if (((this->state >= 41) && (this->state < 45)) || (this->state == 59)) { if (((this->timer_0BC == 0) || - (func_enmy_8006351C(this->index, &this->obj.pos, &D_800D0030, 1) != 0)) && + (Object_CheckCollision(this->index, &this->obj.pos, &D_800D0030, 1) != 0)) && (this->timer_0BE == 0)) { func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 2.0f * this->scale); Object_Kill(&this->obj, this->sfxSource); @@ -759,7 +761,8 @@ void Actor189_Update(Actor189* this) { if ((this->timer_0BC & 3) == 0) { func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->scale); } - if (((this->timer_0BC == 0) || (func_enmy_8006351C(this->index, &this->obj.pos, &D_800D0030, 1) != 0) || + if (((this->timer_0BC == 0) || + (Object_CheckCollision(this->index, &this->obj.pos, &D_800D0030, 1) != 0) || (this->obj.pos.y < (gGroundLevel + 10.0f))) && (this->timer_0BE == 0)) { func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, @@ -771,7 +774,7 @@ void Actor189_Update(Actor189* this) { if ((this->state == 3) && ((this->timer_0BC % 8) == 0)) { func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1.5f); } - if ((func_enmy_8006351C(this->index, &this->obj.pos, &D_800D0030, 1) != 0) || + if ((Object_CheckCollision(this->index, &this->obj.pos, &D_800D0030, 1) != 0) || (this->obj.pos.y < (gGroundLevel + 10.0f))) { if (gLevelType == LEVELTYPE_SPACE) { func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 2.0f); @@ -838,7 +841,7 @@ void func_enmy2_8006D0F4(Actor* actor) { hitboxData = D_edata_800CF964[gObjects80[i].obj.id]; count = *hitboxData; if (count != 0) { - Matrix_RotateY(gCalcMatrix, -gObjects80[i].obj.rot.y * M_DTOR, 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; @@ -1108,7 +1111,7 @@ void ActorEvent_ProcessScript(ActorEvent* this) { this->unk_0C9 = 1; } - if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) { + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) { if (this->unk_0B4 == EINFO_86) { Audio_PlayFanfare(SEQ_ID_KATT, 20, 10, 10); } @@ -1255,7 +1258,7 @@ void ActorEvent_ProcessScript(ActorEvent* this) { case EV_OPC(EVOP_PLAY_MSG): msg = Message_PtrFromId(actorScript[this->aiIndex + 1]); - if ((msg != NULL) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3)) { + if ((msg != NULL) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { Radio_PlayMessage(msg, actorScript[this->aiIndex] & 0x1FF); } this->aiIndex += 2; @@ -1742,11 +1745,11 @@ void ActorEvent_8006F254(ActorEvent* this) { Vec3f sp54; Vec3f sp48; - Matrix_RotateY(gCalcMatrix, this->vwork[29].y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, this->vwork[29].x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, (this->vwork[29].z + this->unk_0F4.z) * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, this->unk_0F4.y * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, this->unk_0F4.x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, this->vwork[29].y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->vwork[29].x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, (this->vwork[29].z + this->unk_0F4.z) * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, this->unk_0F4.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, this->unk_0F4.x * M_DTOR, MTXF_APPLY); sp54.x = 0.0f; sp54.y = 0.0f; @@ -1764,9 +1767,9 @@ void ActorEvent_ProcessActions(ActorEvent* this) { Vec3f sp6C; Sprite* sprite; - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) && (this->unk_0B4 != EINFO_52) && (this->unk_0B4 != EINFO_103) && - (this->unk_0B4 != EINFO_104) && (this->unk_0B4 != EINFO_48) && (this->unk_0B4 != EINFO_49) && - (this->unk_0B4 != EINFO_50)) { + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (this->unk_0B4 != EINFO_52) && + (this->unk_0B4 != EINFO_103) && (this->unk_0B4 != EINFO_104) && (this->unk_0B4 != EINFO_48) && + (this->unk_0B4 != EINFO_49) && (this->unk_0B4 != EINFO_50)) { switch (this->unk_048) { case EVACT_NONE: break; @@ -1808,11 +1811,11 @@ void ActorEvent_ProcessActions(ActorEvent* this) { break; case EVACT_5: - Matrix_RotateY(gCalcMatrix, this->vwork[29].y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, this->vwork[29].x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, (this->vwork[29].z + this->unk_0F4.z) * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, this->unk_0F4.y * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, this->unk_0F4.x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, this->vwork[29].y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->vwork[29].x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, (this->vwork[29].z + this->unk_0F4.z) * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, this->unk_0F4.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, this->unk_0F4.x * M_DTOR, MTXF_APPLY); sp78.x = 0.0f; sp78.y = 0.0f; @@ -1908,7 +1911,7 @@ void ActorEvent_ProcessActions(ActorEvent* this) { break; case EVACT_17: - if (this->obj.pos.z < (gPlayer[0].camEye.z - 600.0f)) { + if (this->obj.pos.z < (gPlayer[0].cam.eye.z - 600.0f)) { func_effect_8007F20C(OBJ_EFFECT_353, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, gEnemyShotSpeed); } @@ -1933,8 +1936,8 @@ void ActorEvent_ProcessActions(ActorEvent* this) { sp54 = Math_RadToDeg(sp54); sp58 = -Math_Atan2F(sp60, sqrtf(SQ(sp64) + SQ(sp5C))); sp58 = Math_RadToDeg(sp58); - Matrix_RotateY(gCalcMatrix, M_DTOR * sp54, 0); - Matrix_RotateX(gCalcMatrix, M_DTOR * sp58, 1); + Matrix_RotateY(gCalcMatrix, M_DTOR * sp54, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, M_DTOR * sp58, MTXF_APPLY); sp6C.x = 0.0f; sp6C.y = 0.0f; sp6C.z = 50.0f; @@ -2218,7 +2221,7 @@ void ActorEvent_800701E0(ActorEvent* this) { sp3C.y = this->vel.y; sp3C.z = this->vel.z; - if ((func_enmy_8006351C(this->index, &this->obj.pos, &sp3C, 0) != 0) || + if ((Object_CheckCollision(this->index, &this->obj.pos, &sp3C, 0) != 0) || (this->obj.pos.y < (gGroundLevel + 20.0f))) { this->obj.status = OBJ_DYING; this->obj.pos.z -= this->vel.z; @@ -2783,9 +2786,9 @@ void ActorEvent_80071DC0(ActorEvent* this) { s32 rInd; Vec3f sp38; - Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); if (this->unk_0B4 == EINFO_30) { rInd = RAND_FLOAT(ARRAY_COUNT(D_800D1074) - 1.1f); // off by 1 error? @@ -2872,7 +2875,7 @@ void ActorEvent_800722EC(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yRot) Vec3f sp20; Effect_Initialize(effect); - Matrix_RotateY(gCalcMatrix, M_DTOR * yRot, 0); + Matrix_RotateY(gCalcMatrix, M_DTOR * yRot, MTXF_NEW); sp2C.x = 0.0f; sp2C.y = 0.0f; sp2C.z = 20.0f; @@ -2955,7 +2958,7 @@ void ActorEvent_Update(ActorEvent* this) { Vec3f spAC; Vec3f spA0; - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) || (D_ctx_8017828C != 0)) { + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) || (D_ctx_8017828C != 0)) { Object_Kill(&this->obj, this->sfxSource); return; } @@ -3032,14 +3035,14 @@ void ActorEvent_Update(ActorEvent* this) { spE8 = this->obj.pos.z; if ((this->unk_0B4 == EINFO_33) || (this->unk_0B4 == EINFO_68)) { - Matrix_RotateZ(gCalcMatrix, -(this->vwork[29].z + this->unk_0F4.z) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -this->vwork[29].x * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -this->vwork[29].y * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, -(this->vwork[29].z + this->unk_0F4.z) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -this->vwork[29].x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -this->vwork[29].y * M_DTOR, MTXF_APPLY); if ((this->state == EVSTATE_14) || (this->state == EVSTATE_15)) { - spB8.x = gPlayer[0].camEye.x - spF0; - spB8.y = gPlayer[0].camEye.y - (spEC + 25.0f); - spB8.z = (gPlayer[0].camEye.z * 15.0f) - spE8; + spB8.x = gPlayer[0].cam.eye.x - spF0; + spB8.y = gPlayer[0].cam.eye.y - (spEC + 25.0f); + spB8.z = (gPlayer[0].cam.eye.z * 15.0f) - spE8; } else { spB8.x = gPlayer[0].pos.x - spF0; spB8.y = gPlayer[0].pos.y - (spEC + 25.0f); @@ -3068,17 +3071,17 @@ void ActorEvent_Update(ActorEvent* this) { Math_SmoothStepToAngle(&this->fwork[15], spE4, 0.2f, this->fwork[24], 0.001f); if (((this->timer_0BC % 32) == 0) && (spFC == 0)) { - Matrix_RotateY(gCalcMatrix, this->vwork[29].y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, this->vwork[29].x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, (this->vwork[29].z + this->unk_0F4.z) * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, this->vwork[29].y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->vwork[29].x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, (this->vwork[29].z + this->unk_0F4.z) * M_DTOR, MTXF_APPLY); spB8.x = 0.0f; spB8.y = 25.0f; spB8.z = 0.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &spB8, &spA0); - Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, this->fwork[15] * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, this->fwork[15] * M_DTOR, MTXF_APPLY); spB8.x = 0.0f; spB8.y = 0.0f; @@ -3101,9 +3104,9 @@ void ActorEvent_Update(ActorEvent* this) { } } else { if ((this->state == EVSTATE_14) || (this->state == EVSTATE_15)) { - spCC = gPlayer[0].camEye.x; - spC8 = gPlayer[0].camEye.y; - spC4 = gPlayer[0].camEye.z; + spCC = gPlayer[0].cam.eye.x; + spC8 = gPlayer[0].cam.eye.y; + spC4 = gPlayer[0].cam.eye.z; } else { spCC = gPlayer[0].pos.x; spC8 = gPlayer[0].pos.y; @@ -3256,9 +3259,9 @@ void ActorEvent_Update(ActorEvent* this) { if (gActors[this->iwork[9]].obj.status != OBJ_ACTIVE) { this->iwork[13] = 0; } else { - Matrix_RotateY(gCalcMatrix, gActors[this->iwork[9]].obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, gActors[this->iwork[9]].obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, gActors[this->iwork[9]].obj.rot.z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, gActors[this->iwork[9]].obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, gActors[this->iwork[9]].obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, gActors[this->iwork[9]].obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_MultVec3fNoTranslate(gCalcMatrix, &this->vwork[28], &spAC); this->obj.pos.x = gActors[this->iwork[9]].obj.pos.x + spAC.x; this->obj.pos.y = gActors[this->iwork[9]].obj.pos.y + spAC.y; @@ -3340,9 +3343,9 @@ void ActorEvent_Update(ActorEvent* this) { } Math_SmoothStepToAngle(&this->obj.rot.z, this->fwork[23], 0.2f, 100.0f, 0.0001f); - Matrix_RotateZ(gCalcMatrix, (this->vwork[29].z + this->unk_0F4.z) * M_DTOR, 0); - Matrix_RotateY(gCalcMatrix, this->unk_0F4.y * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, this->unk_0F4.x * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, (this->vwork[29].z + this->unk_0F4.z) * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, this->unk_0F4.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, this->unk_0F4.x * M_DTOR, MTXF_APPLY); spB8.x = 0.0f; spB8.y = 0.0f; @@ -3368,7 +3371,7 @@ void ActorEvent_Update(ActorEvent* this) { this->vel.z -= D_ctx_80177D08; } - if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_8) { + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ENTER_WARP_ZONE) { this->vel.z = 100.0f; } @@ -3522,7 +3525,7 @@ void ActorEvent_Update(ActorEvent* this) { break; case 0: - Matrix_RotateZ(gCalcMatrix, this->unk_0F4.z * M_DTOR, 0); + Matrix_RotateZ(gCalcMatrix, this->unk_0F4.z * M_DTOR, MTXF_NEW); Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_800D1290, &sp90); if ((this->obj.pos.y + sp90.y) > -30.0f) { @@ -3543,7 +3546,7 @@ void ActorEvent_Update(ActorEvent* this) { sp84.z = 0.0f; effect->unk_44 = 10; effect->scale2 = 1.0f; - Matrix_RotateY(gCalcMatrix, (RAND_FLOAT(180.0f) + 180.0f) * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, (RAND_FLOAT(180.0f) + 180.0f) * M_DTOR, MTXF_NEW); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp84, &sp78); effect->vel.x = sp78.x; effect->vel.y = sp78.y; @@ -3561,7 +3564,7 @@ void ActorEvent_Update(ActorEvent* this) { if ((fabsf(this->fwork[0]) > 10.0f) && ((gGameFrameCount % 2) == 0)) { effect = func_effect_8007783C(OBJ_EFFECT_394); if (effect != NULL) { - Matrix_RotateZ(gCalcMatrix, this->unk_0F4.z * M_DTOR, 0); + Matrix_RotateZ(gCalcMatrix, this->unk_0F4.z * M_DTOR, MTXF_NEW); Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_800D1290, &sp90); effect->unk_78 = effect->unk_7A = 11; @@ -3736,11 +3739,11 @@ bool ActorEvent_OverrideLimbDraw2(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* var_s1 = 1.0f / 70.925f; } - Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, 1); - Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, 1); - Matrix_Mult(gGfxMatrix, gCalcMatrix, 1); + Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, MTXF_APPLY); + Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if (*dList != NULL) { @@ -3800,9 +3803,9 @@ void ActorEvent_Draw(ActorEvent* this) { (this->unk_0B4 != EINFO_13) && (this->unk_0B4 != EINFO_72) && (this->unk_0B4 != EINFO_28) && (this->scale > 0.5f)) { sp40 = SIN_DEG(this->timer_0C6 * 400.0f) * this->timer_0C6; - Matrix_RotateY(gGfxMatrix, M_DTOR * sp40, 1); - Matrix_RotateX(gGfxMatrix, M_DTOR * sp40, 1); - Matrix_RotateZ(gGfxMatrix, M_DTOR * sp40, 1); + Matrix_RotateY(gGfxMatrix, M_DTOR * sp40, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_DTOR * sp40, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, M_DTOR * sp40, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); } } @@ -3901,7 +3904,7 @@ void ActorEvent_Draw(ActorEvent* this) { break; case EINFO_9: - Matrix_Translate(gGfxMatrix, 0.0f, -30.0f, 0.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, -30.0f, 0.0f, MTXF_APPLY); Animation_GetFrameData(&D_ENMY_PLANET_40001A4, this->unk_0B6, sp114); Animation_DrawSkeleton(1, D_ENMY_PLANET_4000270, sp114, NULL, NULL, this, &gIdentityMatrix); break; @@ -3909,8 +3912,8 @@ void ActorEvent_Draw(ActorEvent* this) { case EINFO_18: if (this->fwork[0] > 0.1f) { this->iwork[11] = 1; - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -30.0f, 1); - Matrix_Scale(gGfxMatrix, 2.5f, 2.5f, 2.5f, 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); } break; @@ -3918,8 +3921,8 @@ void ActorEvent_Draw(ActorEvent* this) { case EINFO_19: if (this->fwork[0] > 0.1f) { this->iwork[11] = 1; - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -30.0f, 1); - Matrix_Scale(gGfxMatrix, 2.5f, 2.5f, 2.5f, 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); } break; @@ -3933,7 +3936,7 @@ void ActorEvent_Draw(ActorEvent* this) { gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_A6_6018BF0); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -30.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -30.0f, MTXF_APPLY); this->iwork[11] = 1; func_edisplay_8005B1E8(this, 2); break; @@ -3942,7 +3945,7 @@ void ActorEvent_Draw(ActorEvent* this) { gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_A6_6019730); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -30.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -30.0f, MTXF_APPLY); this->iwork[11] = 1; func_edisplay_8005B1E8(this, 2); break; @@ -3964,15 +3967,15 @@ void ActorEvent_Draw(ActorEvent* this) { break; case EINFO_31: - Matrix_RotateX(gGfxMatrix, M_PI / 2, 1); + Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_A6_600E0C0); break; case EINFO_33: Animation_GetFrameData(&D_ENMY_SPACE_400A30C, this->unk_0B6, sp114); - Matrix_RotateY(gGfxMatrix, M_PI, 1); - Matrix_Scale(gGfxMatrix, 1.5f, 1.5f, 1.5f, 1); + Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 1.5f, 1.5f, 1.5f, MTXF_APPLY); Animation_DrawSkeleton(1, D_ENMY_SPACE_400A398, sp114, ActorEvent_OverrideLimbDraw1, NULL, this, &gIdentityMatrix); Math_SmoothStepToF(&this->fwork[16], 0.0f, 0.3f, 2.0f, 0.0001f); @@ -3998,22 +4001,22 @@ void ActorEvent_Draw(ActorEvent* this) { Animation_GetFrameData(&D_ZO_601F874, this->unk_0B6, sp114); sp114[2].z -= this->fwork[15]; gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - Matrix_Scale(gGfxMatrix, 2.6f, 2.6f, 2.6f, 1); + Matrix_Scale(gGfxMatrix, 2.6f, 2.6f, 2.6f, MTXF_APPLY); Animation_DrawSkeleton(1, D_ZO_601F920, sp114, NULL, NULL, this, &gIdentityMatrix); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); break; case EINFO_64: Matrix_Push(&gGfxMatrix); - Matrix_RotateX(gGfxMatrix, this->unk_0F4.x * M_DTOR, 1); - Matrix_RotateY(gGfxMatrix, this->unk_0F4.y * M_DTOR, 1); + Matrix_RotateX(gGfxMatrix, this->unk_0F4.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, this->unk_0F4.y * M_DTOR, MTXF_APPLY); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, this->fwork[15], 0.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, this->fwork[15], 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ME_600CAA0); Matrix_Pop(&gGfxMatrix); gSPDisplayList(gMasterDisp++, D_ME_600C130); - Matrix_Translate(gGfxMatrix, 0.0f, -this->fwork[15], 0.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, -this->fwork[15], 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ME_600C740); Matrix_Pop(&gGfxMatrix); @@ -4037,14 +4040,14 @@ void ActorEvent_Draw(ActorEvent* this) { break; case EINFO_80: - Matrix_Scale(gGfxMatrix, 0.6f, 0.6f, 0.6f, 1); + Matrix_Scale(gGfxMatrix, 0.6f, 0.6f, 0.6f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_VE1_9011200); break; case EINFO_81: if (this->fwork[15] > 0.001f) { - Matrix_Scale(gGfxMatrix, this->fwork[15], this->fwork[15], this->fwork[15], 1); + Matrix_Scale(gGfxMatrix, this->fwork[15], this->fwork[15], this->fwork[15], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); Texture_BlendRGBA16(this->fwork[16], 16 * 11, D_VE1_9003890, D_VE1_9003DF0, D_VE1_9003330); gSPDisplayList(gMasterDisp++, D_VE1_9002CF0); @@ -4058,7 +4061,7 @@ void ActorEvent_Draw(ActorEvent* this) { break; case EINFO_83: - Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 3.0f, 1); + Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 3.0f, MTXF_APPLY); Animation_GetFrameData(&D_AQ_602201C, this->unk_0B6, sp114); Animation_DrawSkeleton(1, D_AQ_60220E8, sp114, NULL, NULL, this, &gIdentityMatrix); break; @@ -4211,7 +4214,7 @@ void func_enmy2_800763A4(Actor* actor) { sp4C.y = actor->vel.y; sp4C.z = actor->vel.z; - sp60 = func_enmy_8006351C(actor->index, &actor->obj.pos, &sp4C, 0); + sp60 = Object_CheckCollision(actor->index, &actor->obj.pos, &sp4C, 0); if ((sp60 != 0) || (actor->obj.pos.y < (gGroundLevel + 30.0f))) { if ((Rand_ZeroOne() < 0.5f) && (actor->timer_04C < 3) && (gLevelType == LEVELTYPE_PLANET) && diff --git a/src/engine/fox_fade.c b/src/engine/fox_fade.c index 8bb57049..91272082 100644 --- a/src/engine/fox_fade.c +++ b/src/engine/fox_fade.c @@ -15,12 +15,12 @@ void func_fade_80084488(s32 arg0) { RCP_SetupDL_12(); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -150.0f, 0); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -150.0f, MTXF_NEW); for (var_s1 = 0; var_s1 < MIN(360, arg0 * 15); var_s1 += 15) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, MIN((arg0 - (var_s1 / 15)) * 15, 255)); Matrix_Push(&gGfxMatrix); - Matrix_RotateZ(gGfxMatrix, var_s1 * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, 0.53f, 1.0f, 1.0f, 1); + Matrix_RotateZ(gGfxMatrix, var_s1 * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.53f, 1.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_Gfx_800D9688); Matrix_Pop(&gGfxMatrix); diff --git a/src/engine/fox_game.c b/src/engine/fox_game.c index 0346696a..8e818cdc 100644 --- a/src/engine/fox_game.c +++ b/src/engine/fox_game.c @@ -7,7 +7,7 @@ f32 D_game_80161A10; f32 D_game_80161A14; s32 gPlayerInactive[4]; s32 D_game_80161A28; -u8 D_game_80161A2C; +u8 gShowHud; u16 gNextLevelStage; u16 gNextLevel; u16 gNextGameState; @@ -253,15 +253,15 @@ void Game_Draw(s32 playerNum) { break; case DRAW_TITLE: func_bg_8003DAF0(); - OvlMenu_CallFunction(104, NULL); + OvlMenu_CallFunction(OVLCALL_TITLE_DRAW, NULL); break; case DRAW_OPTION: func_bg_8003DAF0(); - OvlMenu_CallFunction(108, NULL); + OvlMenu_CallFunction(OVLCALL_OPTION_DRAW, NULL); break; case DRAW_MAP: func_bg_8003DAF0(); - OvlMenu_CallFunction(106, NULL); + OvlMenu_CallFunction(OVLCALL_MAP_DRAW, NULL); break; case DRAW_PLAY: gPlayerNum = playerNum; @@ -269,7 +269,7 @@ void Game_Draw(s32 playerNum) { break; case DRAW_UNK_MAP: func_bg_8003DAF0(); - OvlMenu_CallFunction(110, NULL); + OvlMenu_CallFunction(OVLCALL_UNKMAP_DRAW, NULL); break; case DRAW_UNK_VS: func_versus_800C2190(); @@ -392,8 +392,7 @@ void Game_Update(void) { D_ctx_80177D20 = 0.0f; D_hud_8016170C = gCsFrameCount = D_ctx_80177830 = gLevelStatusScreenTimer = gLevelClearScreenTimer = D_versus_80178754 = gVersusMode = D_ctx_80177AE0 = D_ctx_80178410 = D_ctx_80177B40 = gPlayState = - gOptionMenuStatus = gDrawMode = gShowBossHealth = D_game_80161A2C = gBgColor = - gFillScreenAlpha = 0; + gOptionMenuStatus = gDrawMode = gShowBossHealth = gShowHud = gBgColor = gFillScreenAlpha = 0; gNextGameState = D_ctx_80177C94 = D_ctx_80177CAC = D_ctx_80177CB4 = D_ctx_80177CBC = D_ctx_80177CC4 = D_ctx_80177C9C = D_ctx_80177CA4 = D_play_80161A5C = D_game_80161A34 = 0; for (i = 0; i < 4; i++) { @@ -450,10 +449,10 @@ void Game_Update(void) { func_8001D8A8(2, gVolumeSettings[2]); break; case GSTATE_TITLE: - OvlMenu_CallFunction(103, NULL); + OvlMenu_CallFunction(OVLCALL_TITLE_UPDATE, NULL); break; case GSTATE_MENU: - OvlMenu_CallFunction(107, NULL); + OvlMenu_CallFunction(OVLCALL_OPTION_UPDATE, NULL); break; case GSTATE_MAP: Map_8019E8D0(); @@ -465,7 +464,7 @@ void Game_Update(void) { Play_Main(); break; case GSTATE_GAME_OVER: - OvlMenu_CallFunction(109, NULL); + OvlMenu_CallFunction(OVLCALL_GAME_OVER_UPDATE, NULL); break; case GSTATE_ENDING: gDrawMode = DRAW_ENDING; @@ -520,7 +519,7 @@ void Game_Update(void) { gPlayerFillScreenGreens[0], gPlayerFillScreenBlues[0], gPlayerFillScreenAlphas[0]); if ((gDrawMode == DRAW_PLAY) || (gDrawMode == DRAW_ENDING)) { func_radio_800BB5D0(); - if (D_game_80161A2C != 0) { + if (gShowHud != 0) { func_hud_8008FA84(); func_hud_8008CA44(); } diff --git a/src/engine/fox_hud.c b/src/engine/fox_hud.c index 69c10c92..717c642b 100644 --- a/src/engine/fox_hud.c +++ b/src/engine/fox_hud.c @@ -198,15 +198,15 @@ void func_hud_80084B94(s32 arg0) { RCP_SetupDL(&gMasterDisp, 0x24); if (arg0 == 0) { for (i = 1; i < 4; i++) { - if (((gTeamShields[i] != 0) || (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7)) && (gTeamShields[i] <= 0) && - (gTeamShields[i] != -2)) { + if (((gTeamShields[i] != 0) || (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) && + (gTeamShields[i] <= 0) && (gTeamShields[i] != -2)) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_800D1A70[i - 1].x, D_800D1A70[i - 1].y, D_800D1A70[i - 1].z, 1); - Matrix_Scale(gGfxMatrix, 0.68f, 0.68f, 1.0f, 1); - Matrix_RotateZ(gGfxMatrix, M_PI / 4, 1); + Matrix_Translate(gGfxMatrix, D_800D1A70[i - 1].x, D_800D1A70[i - 1].y, D_800D1A70[i - 1].z, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.68f, 0.68f, 1.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, M_PI / 4, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_500B600); - Matrix_RotateZ(gGfxMatrix, 3 * M_PI / 2, 1); + Matrix_RotateZ(gGfxMatrix, 3 * M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_500B600); Matrix_Pop(&gGfxMatrix); @@ -214,12 +214,12 @@ void func_hud_80084B94(s32 arg0) { } } else { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, -234.0f, -167.0f, -600.0f, 1); - Matrix_RotateZ(gGfxMatrix, M_PI / 4, 1); - Matrix_Scale(gGfxMatrix, 0.68f, 0.68f, 1.0f, 1); + Matrix_Translate(gGfxMatrix, -234.0f, -167.0f, -600.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, M_PI / 4, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.68f, 0.68f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_500B600); - Matrix_RotateZ(gGfxMatrix, 3 * M_PI / 2, 1); + Matrix_RotateZ(gGfxMatrix, 3 * M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_500B600); Matrix_Pop(&gGfxMatrix); @@ -366,8 +366,8 @@ void func_hud_80085944(void) { scale += 0.06f; } - Matrix_Translate(gGfxMatrix, x, y, -100.0f, 0); - Matrix_Scale(gGfxMatrix, scale, scale, scale, 1); + Matrix_Translate(gGfxMatrix, x, y, -100.0f, MTXF_NEW); + Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 180, 180, 0, 50); gSPDisplayList(gMasterDisp++, D_1012110); @@ -387,9 +387,9 @@ void func_hud_80085944(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_800D1AC4[i + 1], D_800D1AD8[i + 1], -100.0f, 0); - Matrix_RotateZ(gGfxMatrix, M_DTOR * D_801618B0[0], 1); - Matrix_Scale(gGfxMatrix, D_801618B0[i + 2], D_801618B0[i + 2], D_801618B0[i + 2], 1); + Matrix_Translate(gGfxMatrix, D_800D1AC4[i + 1], D_800D1AD8[i + 1], -100.0f, MTXF_NEW); + Matrix_RotateZ(gGfxMatrix, M_DTOR * D_801618B0[0], MTXF_APPLY); + Matrix_Scale(gGfxMatrix, D_801618B0[i + 2], D_801618B0[i + 2], D_801618B0[i + 2], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_101C2E0); @@ -415,8 +415,8 @@ void func_hud_80085944(void) { scale += 0.06f; } - Matrix_Translate(gGfxMatrix, x, y, -100.0f, 0); - Matrix_Scale(gGfxMatrix, scale, scale, scale, 1); + Matrix_Translate(gGfxMatrix, x, y, -100.0f, MTXF_NEW); + Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if (D_80161860[i + 1] == 2) { @@ -468,7 +468,7 @@ void func_hud_80086110(f32 arg0, f32 arg1, s32 arg2) { ((gPlayState == PLAY_PAUSE) || (D_ctx_80177830 == 1) || (gLevelStatusScreenTimer != 0))) { RCP_SetupDL(&gMasterDisp, 0x4C); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); - if ((arg2 == 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7)) { + if ((arg2 == 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { Graphics_DisplaySmallText(arg0 + (8.0f * temp) + 4.0f, arg1 + 2.0f, 1.0f, 1.0f, " OK "); } else { Graphics_DisplaySmallText(arg0 + (8.0f * temp) + 4.0f, arg1 + 2.0f, 1.0f, 1.0f, "DOWN"); @@ -1371,8 +1371,8 @@ void func_hud_80088784(s32 arg0) { RCP_SetupDL(&gMasterDisp, 0x24); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, D_800D1DC8[arg0]); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 3.9f, -3.3f, -100.0f, 0); - Matrix_Scale(gGfxMatrix, 0.37f, 0.37f, 0.37f, 1); + Matrix_Translate(gGfxMatrix, 3.9f, -3.3f, -100.0f, MTXF_NEW); + Matrix_Scale(gGfxMatrix, 0.37f, 0.37f, 0.37f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if (gLevelType == LEVELTYPE_PLANET) { @@ -1448,7 +1448,7 @@ void func_hud_80088970(void) { break; case 2: - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_0; + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_STANDBY; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; gFillScreenAlphaTarget = 255; gFillScreenAlphaStep = 32; @@ -1567,7 +1567,7 @@ void func_hud_80088970(void) { gSavedHitCount = D_ctx_80177CA0 = 0; func_8001CA24(0); - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_6; + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_NEXT; gScreenFlashTimer = 0; gPlayer[0].timer_1F8 = 0; gFillScreenAlpha = gFillScreenAlphaTarget = 255; @@ -1711,7 +1711,7 @@ void func_hud_80088970(void) { void func_hud_80089670(void) { RCP_SetupDL(&gMasterDisp, 0x3E); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - Matrix_Scale(gGfxMatrix, 18.64f, 21.04f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 18.64f, 21.04f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); } @@ -1719,7 +1719,7 @@ void func_hud_80089670(void) { void func_hud_80089710(void) { RCP_SetupDL(&gMasterDisp, 0x3E); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - Matrix_Scale(gGfxMatrix, 11.0f, 11.0f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 11.0f, 11.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); } @@ -1727,7 +1727,7 @@ void func_hud_80089710(void) { void func_hud_800897B0(void) { RCP_SetupDL(&gMasterDisp, 0x3E); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - Matrix_Scale(gGfxMatrix, 130.0f, 130.0f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 130.0f, 130.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024830); } @@ -1735,7 +1735,7 @@ void func_hud_800897B0(void) { void func_hud_80089850(void) { RCP_SetupDL(&gMasterDisp, 0x3E); gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 0, 255); - Matrix_Scale(gGfxMatrix, 125.0f, 125.0f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 125.0f, 125.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_102A8A0); } @@ -1743,7 +1743,7 @@ void func_hud_80089850(void) { void func_hud_800898F0(void) { RCP_SetupDL(&gMasterDisp, 1); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 208, 80, 255); - Matrix_Scale(gGfxMatrix, 30.0f, 30.0f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 30.0f, 30.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_SZ_6004570); } @@ -1769,7 +1769,7 @@ void func_hud_80089994(s32 arg0) { RCP_SetupDL(&gMasterDisp, 0x3E); gDPSetPrimColor(gMasterDisp++, 0, 0, D_800D1E14[arg0][0], D_800D1E14[arg0][1], D_800D1E14[arg0][2], D_800D1E14[arg0][3]); - Matrix_Scale(gGfxMatrix, var_fv1, var_fv2, 1.0f, 1); + Matrix_Scale(gGfxMatrix, var_fv1, var_fv2, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1015510); } @@ -1777,7 +1777,7 @@ void func_hud_80089994(s32 arg0) { void func_hud_80089AF4(void) { RCP_SetupDL(&gMasterDisp, 0x3E); gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 0, 255); - Matrix_Scale(gGfxMatrix, 54.0f, 54.0f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 54.0f, 54.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_STAR_WOLF_F014180); } @@ -1785,7 +1785,7 @@ void func_hud_80089AF4(void) { void func_hud_80089B94(void) { RCP_SetupDL(&gMasterDisp, 0x3E); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 92, 92, 255); - Matrix_Scale(gGfxMatrix, 54.0f, 54.0f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 54.0f, 54.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_D0098B0); } @@ -1803,7 +1803,7 @@ void func_hud_80089C38(void) { alpha *= 255.0f / 10.0f; gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, alpha); - Matrix_Scale(gGfxMatrix, 15.0f, 15.0f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 15.0f, 15.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024230); } @@ -1829,8 +1829,8 @@ void func_hud_80089D28(void) { } gDPSetPrimColor(gMasterDisp++, 0, 0, 255, gb, gb, 255); - Matrix_Translate(gGfxMatrix, 0.0f, -185.92001f, 0, 1); - Matrix_Scale(gGfxMatrix, 3.55f, 0.13f, 1.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, -185.92001f, 0, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 3.55f, 0.13f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024230); } @@ -1853,7 +1853,7 @@ void RadarMark_Draw(s32 arg0) { var_a1 = 1; } - if (gPlayer[arg0].state_1C8 == PLAYERSTATE_1C8_13) { + if (gPlayer[arg0].state_1C8 == PLAYERSTATE_1C8_VS_STANDBY) { break; } } @@ -1949,11 +1949,11 @@ void func_hud_8008A240(void) { Item* item; for (i = 0; i < gCamCount; i++) { - if (gPlayer[i].state_1C8 == PLAYERSTATE_1C8_6) { + if (gPlayer[i].state_1C8 == PLAYERSTATE_1C8_NEXT) { continue; } - gRadarMarks[i].unk_00 = 1; - gRadarMarks[i].unk_02 = i; + gRadarMarks[i].status = 1; + gRadarMarks[i].type = i; gRadarMarks[i].unk_10 = gPlayer[i].unk_114 + gPlayer[i].unk_0E8; gRadarMarks[i].pos.z = gPlayer[i].unk_138; gRadarMarks[i].pos.x = gPlayer[i].pos.x; @@ -1966,7 +1966,7 @@ void func_hud_8008A240(void) { continue; } - if (gPlayer[i].state_1C8 != PLAYERSTATE_1C8_3) { + if (gPlayer[i].state_1C8 != PLAYERSTATE_1C8_ACTIVE) { continue; } @@ -1975,15 +1975,15 @@ void func_hud_8008A240(void) { } if ((gGameFrameCount % 64) != 0) { - gRadarMarks[i].unk_02 = 999; + gRadarMarks[i].type = 999; } } if (gVersusMode == 1) { for (i = 0, item = gItems; i < 20; i++, item++) { if (item->obj.status >= OBJ_ACTIVE) { - gRadarMarks[item->index + 50].unk_00 = 1; - gRadarMarks[item->index + 50].unk_02 = 103; + gRadarMarks[item->index + 50].status = 1; + gRadarMarks[item->index + 50].type = 103; gRadarMarks[item->index + 50].pos.x = item->obj.pos.x; gRadarMarks[item->index + 50].pos.y = item->obj.pos.y; gRadarMarks[item->index + 50].pos.z = item->obj.pos.z; @@ -2124,7 +2124,7 @@ s32 func_hud_8008A4DC(void) { } Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, x1, y1, z1, 1); + Matrix_Translate(gGfxMatrix, x1, y1, z1, MTXF_APPLY); if ((gCurrentLevel == LEVEL_SECTOR_Z) && (D_hud_80161710 != 0)) { Matrix_Push(&gGfxMatrix); @@ -2134,26 +2134,26 @@ s32 func_hud_8008A4DC(void) { } for (i = 64; i >= 0; i--) { - if ((gRadarMarks[i].unk_00 == 0) || (fabsf(gRadarMarks[i].pos.x) >= (temp2 + 1000.0f)) || + if ((gRadarMarks[i].status == 0) || (fabsf(gRadarMarks[i].pos.x) >= (temp2 + 1000.0f)) || (fabsf(gRadarMarks[i].pos.z) >= (temp2 + 1000.0f))) { continue; } Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, gRadarMarks[i].pos.x * 0.008f, -gRadarMarks[i].pos.z * 0.008f, 0.0f, 1); + Matrix_Translate(gGfxMatrix, gRadarMarks[i].pos.x * 0.008f, -gRadarMarks[i].pos.z * 0.008f, 0.0f, MTXF_APPLY); - if (gRadarMarks[i].unk_02 == 103) { + if (gRadarMarks[i].type == 103) { gRadarMarks[i].unk_10 = 45.0f; } - Matrix_RotateZ(gGfxMatrix, M_DTOR * gRadarMarks[i].unk_10, 1); - Matrix_Scale(gGfxMatrix, scale, scale, 1.0f, 1); + Matrix_RotateZ(gGfxMatrix, M_DTOR * gRadarMarks[i].unk_10, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, scale, scale, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - RadarMark_Draw(gRadarMarks[i].unk_02); + RadarMark_Draw(gRadarMarks[i].type); Matrix_Pop(&gGfxMatrix); - gRadarMarks[i].unk_00 = 0; + gRadarMarks[i].status = 0; } Matrix_Pop(&gGfxMatrix); @@ -2562,8 +2562,8 @@ void func_hud_8008BAE4(void) { RCP_SetupDL(&gMasterDisp, 0xC); gDPSetPrimColor(gMasterDisp++, 0, 0, r, g, b, alpha); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, -53.9f, -38.5f, -139.4f, 1); - Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 1.0f, 1); + Matrix_Translate(gGfxMatrix, -53.9f, -38.5f, -139.4f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_800D1A40); Matrix_Pop(&gGfxMatrix); @@ -2744,22 +2744,22 @@ void func_hud_8008C6F4(s32 idx, s32 arg1) { Matrix_Push(&gGfxMatrix); if (gPlayer[0].cockpitView) { - Matrix_RotateZ(gGfxMatrix, M_DTOR * gPlayer[0].unk_034, 1); + Matrix_RotateZ(gGfxMatrix, M_DTOR * gPlayer[0].camRoll, MTXF_APPLY); } if (D_800D1F88[idx]) { - Matrix_RotateZ(gGfxMatrix, M_DTOR * D_800D1F88[idx], 1); + Matrix_RotateZ(gGfxMatrix, M_DTOR * D_800D1F88[idx], MTXF_APPLY); } if (arg1 != 0) { Matrix_Translate(gGfxMatrix, D_800D1EF8[idx] + D_800D1FE8[idx], D_800D1F28[idx] + D_800D2018[idx], - D_800D1F58[idx], 1); + D_800D1F58[idx], MTXF_APPLY); } else { - Matrix_Translate(gGfxMatrix, D_800D1EF8[idx], D_800D1F28[idx], D_800D1F58[idx], 1); + Matrix_Translate(gGfxMatrix, D_800D1EF8[idx], D_800D1F28[idx], D_800D1F58[idx], MTXF_APPLY); } - Matrix_RotateZ(gGfxMatrix, M_DTOR * D_800D1FB8[idx], 1); - Matrix_Scale(gGfxMatrix, 0.026f, 0.026f, 0.026f, 1); + Matrix_RotateZ(gGfxMatrix, M_DTOR * D_800D1FB8[idx], MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.026f, 0.026f, 0.026f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL(&gMasterDisp, 0x3E); @@ -3723,13 +3723,13 @@ s32 func_hud_80090200(Boss* boss) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); - player->camEye.x = boss->fwork[4] = boss->obj.pos.x; - player->camEye.y = boss->fwork[5] = boss->obj.pos.y + 500.0f; - player->camEye.z = boss->fwork[6] = boss->obj.pos.z + 4000.0f; + player->cam.eye.x = boss->fwork[4] = boss->obj.pos.x; + player->cam.eye.y = boss->fwork[5] = boss->obj.pos.y + 500.0f; + player->cam.eye.z = boss->fwork[6] = boss->obj.pos.z + 4000.0f; - player->camAt.x = boss->obj.pos.x; - player->camAt.y = boss->obj.pos.y; - player->camAt.z = boss->obj.pos.z; + player->cam.at.x = boss->obj.pos.x; + player->cam.at.y = boss->obj.pos.y; + player->cam.at.z = boss->obj.pos.z; boss->fwork[7] = 0.0f; boss->fwork[8] = 0.0f; @@ -3791,21 +3791,21 @@ s32 func_hud_80090200(Boss* boss) { src.y = boss->fwork[5] - boss->obj.pos.y; src.z = boss->fwork[6] - boss->obj.pos.z; - Matrix_Translate(gCalcMatrix, boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 0); - Matrix_RotateY(gCalcMatrix, M_DTOR * boss->fwork[7], 1); - Matrix_RotateX(gCalcMatrix, M_DTOR * boss->fwork[8], 1); + Matrix_Translate(gCalcMatrix, boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, M_DTOR * boss->fwork[7], MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, M_DTOR * boss->fwork[8], MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &src, &dest); - player->camEye.x = dest.x; - player->camEye.y = dest.y; - player->camEye.z = dest.z; + player->cam.eye.x = dest.x; + player->cam.eye.y = dest.y; + player->cam.eye.z = dest.z; - player->camAt.x = boss->obj.pos.x; - player->camAt.y = boss->obj.pos.x; - player->camAt.z = boss->obj.pos.x; + player->cam.at.x = boss->obj.pos.x; + player->cam.at.y = boss->obj.pos.x; + player->cam.at.z = boss->obj.pos.x; - player->camAt.x += COS_DEG(boss->timer_050 * 60.0f) * boss->fwork[9]; - player->camAt.y += SIN_DEG(boss->timer_050 * 179.0f) * boss->fwork[9]; + player->cam.at.x += COS_DEG(boss->timer_050 * 60.0f) * boss->fwork[9]; + player->cam.at.y += SIN_DEG(boss->timer_050 * 179.0f) * boss->fwork[9]; } } @@ -4147,7 +4147,7 @@ void func_hud_800914FC(Actor* actor) { actor->state = 3; } - if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) { + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) { if ((actor->state != 2) && (actor->state != 3)) { actor->iwork[4] = 1; actor->state = 2; @@ -4351,7 +4351,7 @@ bool func_hud_80091F00(Actor* actor) { AUDIO_PLAY_SFX(0x2903300E, actor->sfxSource, 4); func_effect_8007D10C(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 1.5f); - Matrix_RotateY(gCalcMatrix, actor->unk_0F4.y * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, actor->unk_0F4.y * M_DTOR, MTXF_NEW); if (Rand_ZeroOne() < 0.5f) { sp40.x = -20.0f; @@ -4421,8 +4421,8 @@ bool func_hud_80091F00(Actor* actor) { } void func_hud_80092244(Actor* actor) { - gRadarMarks[actor->index].unk_00 = 1; - gRadarMarks[actor->index].unk_02 = actor->aiType; + gRadarMarks[actor->index].status = 1; + gRadarMarks[actor->index].type = actor->aiType; gRadarMarks[actor->index].pos.x = actor->obj.pos.x; gRadarMarks[actor->index].pos.y = actor->obj.pos.y; gRadarMarks[actor->index].pos.z = actor->obj.pos.z; @@ -4432,7 +4432,7 @@ void func_hud_80092244(Actor* actor) { void func_hud_800922F4(Actor* actor) { s32 temp; - if ((gTeamShields[actor->aiType] < 64) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7)) { + if ((gTeamShields[actor->aiType] < 64) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) { temp = 8 - 1; if (gTeamShields[actor->aiType] > 16) { temp = 16 - 1; @@ -4501,8 +4501,9 @@ bool func_hud_800924E0(Actor* actor) { Math_SmoothStepToAngle(&actor->obj.rot.z, 0.0f, 0.1f, 5.0f, 0.0f); actor->obj.rot.x = actor->vwork[29].x + (360.0f - actor->fwork[19]); - Matrix_RotateY(gCalcMatrix, actor->unk_0F4.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -(M_DTOR * ((actor->unk_0F4.x + actor->vwork[29].x) + actor->fwork[19])), 1); + Matrix_RotateY(gCalcMatrix, actor->unk_0F4.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(M_DTOR * ((actor->unk_0F4.x + actor->vwork[29].x) + actor->fwork[19])), + MTXF_APPLY); src.z = actor->fwork[1]; src.y = 0.0f; @@ -4642,7 +4643,7 @@ bool func_hud_800927A0(Actor* actor) { actor->obj.pos.y += actor->fwork[28]; Matrix_RotateY(gCalcMatrix, actor->unk_0F4.y * M_DTOR, 0U); - Matrix_RotateX(gCalcMatrix, -(M_DTOR * (actor->unk_0F4.x + actor->vwork[29].x + actor->fwork[19])), 1); + Matrix_RotateX(gCalcMatrix, -(M_DTOR * (actor->unk_0F4.x + actor->vwork[29].x + actor->fwork[19])), MTXF_APPLY); src.z = actor->fwork[1]; src.y = 0.0f; @@ -4729,14 +4730,14 @@ void ActorTeamBoss_Update(ActorTeamBoss* this) { } if ((this->iwork[10] != 0) && (gLevelMode == LEVELMODE_ALL_RANGE) && (this->iwork[9] == 0) && - (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7)) { + (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) { this->unk_048 = 2; this->unk_04A = 0; } if ((gLevelMode == LEVELMODE_ALL_RANGE) && (fabsf(this->obj.pos.x > var_fv1) || fabsf(this->obj.pos.z > var_fv1)) && - (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7)) { + (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) { this->unk_048 = 2; this->unk_04A = 1; } @@ -4776,7 +4777,7 @@ void func_hud_80093164(Actor* actor) { if (actor->state == 0) { switch (actor->unk_0B6) { case 1: - if ((player->state_1C8 != PLAYERSTATE_1C8_2) || (actor->unk_0B6 != 1)) { + if ((player->state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO) || (actor->unk_0B6 != 1)) { if (gCsFrameCount > 1588) { actor->fwork[0] = 5.0f; } else { @@ -4799,8 +4800,8 @@ void func_hud_80093164(Actor* actor) { } } - Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -(actor->unk_0F4.x * M_DTOR), 1); + Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(actor->unk_0F4.x * M_DTOR), MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; src.z = actor->fwork[0]; @@ -4842,7 +4843,8 @@ void func_hud_800933D8(f32 x, f32 y, f32 z, f32 arg3) { effect->obj.pos.y = y; effect->obj.pos.z = z; - if ((player->state_1C8 == PLAYERSTATE_1C8_2) && (gCurrentLevel == LEVEL_AQUAS) && (player->unk_1D0 < 2)) { + if ((player->state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && (gCurrentLevel == LEVEL_AQUAS) && + (player->unk_1D0 < 2)) { effect->scale1 = 0.4f; effect->unk_44 = 0; effect->unk_46 = 24; @@ -4932,13 +4934,13 @@ void func_hud_800935E8(Player* player) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; gFillScreenAlphaTarget = 0; - player->camEye.x = gCsCamEyeX = -3061.2f; - player->camEye.y = gCsCamEyeY = 1745.9f; - player->camEye.z = gCsCamEyeZ = -5786.0f; + player->cam.eye.x = gCsCamEyeX = -3061.2f; + player->cam.eye.y = gCsCamEyeY = 1745.9f; + player->cam.eye.z = gCsCamEyeZ = -5786.0f; - player->camAt.x = gCsCamAtX = 300.0f; - player->camAt.y = gCsCamAtY = 2200.0f; - player->camAt.z = gCsCamAtZ = -5700.0f; + player->cam.at.x = gCsCamAtX = 300.0f; + player->cam.at.y = gCsCamAtY = 2200.0f; + player->cam.at.z = gCsCamAtZ = -5700.0f; D_801616A0.x = 5.18f; D_801616A0.y = 124.17f; @@ -4962,8 +4964,8 @@ void func_hud_800935E8(Player* player) { src.y = D_800D2320[i].y + RAND_FLOAT(12.0f); src.z = D_800D2320[i].z; - Matrix_Translate(gCalcMatrix, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 0); - Matrix_RotateY(gCalcMatrix, M_DTOR * 30.0f, 1); + Matrix_Translate(gCalcMatrix, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, M_DTOR * 30.0f, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &src, &dest); x = dest.x; @@ -4981,8 +4983,8 @@ void func_hud_800935E8(Player* player) { src.y = D_800D2320[i].y + RAND_FLOAT(12.0f); src.z = D_800D2320[i].z; - Matrix_Translate(gCalcMatrix, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 0); - Matrix_RotateY(gCalcMatrix, M_DTOR * 30.0f, 1); + Matrix_Translate(gCalcMatrix, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, M_DTOR * 30.0f, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &src, &dest); x = dest.x; @@ -5082,7 +5084,7 @@ void func_hud_800935E8(Player* player) { D_ctx_80177AB0 = 0; - player->unk_034 = 60.0f; + player->camRoll = 60.0f; player->timer_1F8 = 1000; player->unk_0E8 = 30.0f; @@ -5111,21 +5113,21 @@ void func_hud_800935E8(Player* player) { src.y = D_ctx_80177A48[3]; src.z = D_ctx_80177A48[4]; - Matrix_Translate(gCalcMatrix, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 0); - Matrix_RotateY(gCalcMatrix, M_DTOR * 30.0f, 1); + Matrix_Translate(gCalcMatrix, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, M_DTOR * 30.0f, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &src, &dest); gCsCamEyeX = dest.x; gCsCamEyeY = dest.y; gCsCamEyeZ = dest.z; - player->camAt.x = gCsCamAtX = gCsCamEyeX; - player->camAt.y = gCsCamAtY = gCsCamEyeY + 100.0f; - player->camAt.z = gCsCamAtZ = gCsCamEyeZ + 10.0f; + player->cam.at.x = gCsCamAtX = gCsCamEyeX; + player->cam.at.y = gCsCamAtY = gCsCamEyeY + 100.0f; + player->cam.at.z = gCsCamAtZ = gCsCamEyeZ + 10.0f; - player->camEye.x = gCsCamEyeX; - player->camEye.y = gCsCamEyeY; - player->camEye.z = gCsCamEyeZ; + player->cam.eye.x = gCsCamEyeX; + player->cam.eye.y = gCsCamEyeY; + player->cam.eye.z = gCsCamEyeZ; } if (player->timer_1F8 == 774) { @@ -5146,8 +5148,8 @@ void func_hud_800935E8(Player* player) { temp2 = SIN_DEG(gGameFrameCount * 70.0f) * temp; } - player->camEye.y = gCsCamEyeY + temp2; - player->camAt.y = gCsCamEyeY + 100.0f; + player->cam.eye.y = gCsCamEyeY + temp2; + player->cam.at.y = gCsCamEyeY + 100.0f; Math_SmoothStepToF(&player->unk_018, -1200.0f, 0.02f, 60.0f, 0.0f); @@ -5155,8 +5157,8 @@ void func_hud_800935E8(Player* player) { src.y = 0.0f; src.z = player->unk_018; - Matrix_Translate(gCalcMatrix, player->pos.x, player->pos.y, player->pos.z, 0); - Matrix_RotateY(gCalcMatrix, M_DTOR * 30.0f, 1); + Matrix_Translate(gCalcMatrix, player->pos.x, player->pos.y, player->pos.z, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, M_DTOR * 30.0f, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &src, &dest); player->pos.x = dest.x; @@ -5164,7 +5166,7 @@ void func_hud_800935E8(Player* player) { player->pos.z = dest.z; if (((player->timer_1F8 % 8) == 0) && (player->timer_1F8 > 740)) { - func_effect_8007D9DC(player->camEye.x, 1600.0f, player->camEye.z, 10.0f, 100.0f, 0); + func_effect_8007D9DC(player->cam.eye.x, 1600.0f, player->cam.eye.z, 10.0f, 100.0f, 0); } if ((player->unk_018 > -200.0f) && (D_ctx_80177A10[8] < 6)) { @@ -5179,9 +5181,9 @@ void func_hud_800935E8(Player* player) { if (((gGameFrameCount % 3) == 0) && (player->timer_1F8 <= 740)) { for (i = 0; i < 8; i++) { - Aquas_801AC8A8(player->camEye.x + RAND_FLOAT_CENTERED(D_800D22C4), - player->camEye.y + 260.0f + RAND_FLOAT_CENTERED(D_800D22C8), - player->camEye.z + RAND_FLOAT_CENTERED(D_800D22CC), 1.0f, 0); + Aquas_801AC8A8(player->cam.eye.x + RAND_FLOAT_CENTERED(D_800D22C4), + player->cam.eye.y + 260.0f + RAND_FLOAT_CENTERED(D_800D22C8), + player->cam.eye.z + RAND_FLOAT_CENTERED(D_800D22CC), 1.0f, 0); } } } @@ -5205,16 +5207,16 @@ void func_hud_800935E8(Player* player) { player->pos.y = 350.0f; player->pos.z = 0.0f; - player->camEye.x = player->pos.x * (600.0f / player->unk_09C); - player->camEye.y = player->pos.y * (1040.0f / player->unk_0A0); - player->camEye.y -= 50.0f; + player->cam.eye.x = player->pos.x * (600.0f / player->unk_09C); + player->cam.eye.y = player->pos.y * (1040.0f / player->unk_0A0); + player->cam.eye.y -= 50.0f; - player->camAt.x = player->pos.x * (600.0f / player->unk_09C); - player->camAt.y = player->pos.y * (1050.0f / player->unk_0A0); - player->camAt.y += player->unk_060 * 10.0f; + player->cam.at.x = player->pos.x * (600.0f / player->unk_09C); + player->cam.at.y = player->pos.y * (1050.0f / player->unk_0A0); + player->cam.at.y += player->unk_060 * 10.0f; player->pos.z += 1000.0f; - player->unk_034 = 0.0f; + player->camRoll = 0.0f; D_ctx_80177A48[0] = 0.1f; @@ -5230,8 +5232,8 @@ void func_hud_800935E8(Player* player) { Object_Kill(&actor->obj, actor->sfxSource); - player->camEye.z = gCsCamEyeZ = 800.0f; - player->camAt.z = gCsCamAtZ = 0.0f; + player->cam.eye.z = gCsCamEyeZ = 800.0f; + player->cam.at.z = gCsCamAtZ = 0.0f; case 6: player->unk_060 = SIN_DEG(player->unk_0F4 * 0.7f) * 0.5f; @@ -5261,11 +5263,11 @@ void func_hud_800935E8(Player* player) { if (player->timer_1F8 <= 900) { gLevelStatusScreenTimer = 50; - player->state_1C8 = PLAYERSTATE_1C8_3; + player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_1D0 = 0; player->timer_1F8 = 0; - D_ctx_80178488 = 1; + gLoadLevelObjects = 1; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); AUDIO_PLAY_BGM(SEQ_ID_AQUAS); @@ -5279,8 +5281,8 @@ void func_hud_800935E8(Player* player) { break; } - Matrix_RotateY(gCalcMatrix, M_DTOR * (player->unk_0E8 + player->unk_114 + 180.0f), 0); - Matrix_RotateX(gCalcMatrix, -(M_DTOR * player->unk_0E4), 1); + Matrix_RotateY(gCalcMatrix, M_DTOR * (player->unk_0E8 + player->unk_114 + 180.0f), MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(M_DTOR * player->unk_0E4), MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; @@ -5298,12 +5300,12 @@ void func_hud_800935E8(Player* player) { player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; - Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0.0f); } // unused data @@ -5316,7 +5318,7 @@ f32 D_800D24CC = 0.02f; void func_hud_80094954(Effect* effect) { Player* player = &gPlayer[0]; - if ((player->state_1C8 == PLAYERSTATE_1C8_2) && (gCurrentLevel == LEVEL_AQUAS) && (player->unk_1D0 < 2)) { + if ((player->state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && (gCurrentLevel == LEVEL_AQUAS) && (player->unk_1D0 < 2)) { switch (effect->state) { case 0: effect->unk_44 += effect->unk_46; @@ -5347,12 +5349,12 @@ void func_hud_80094954(Effect* effect) { } effect->obj.rot.z += effect->unk_48; } else { - if (player->state_1C8 == PLAYERSTATE_1C8_7) { - effect->obj.rot.x = RAD_TO_DEG(player->unk_05C); - effect->obj.rot.y = RAD_TO_DEG(-player->unk_058); + if (player->state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) { + effect->obj.rot.x = RAD_TO_DEG(player->camPitch); + effect->obj.rot.y = RAD_TO_DEG(-player->camYaw); } - if (player->state_1C8 == PLAYERSTATE_1C8_6) { + if (player->state_1C8 == PLAYERSTATE_1C8_NEXT) { effect->unk_46 = 2; if (player->unk_1D0 >= 4) { effect->vel.y -= 0.13f; @@ -5362,8 +5364,8 @@ void func_hud_80094954(Effect* effect) { effect->scale2 += 0.8f; effect->unk_4A -= effect->unk_46; - if ((effect->unk_4A < 0) || - ((player->state_1C8 == PLAYERSTATE_1C8_2) && (gCurrentLevel == LEVEL_AQUAS) && (player->unk_1D0 == 5))) { + if ((effect->unk_4A < 0) || ((player->state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && + (gCurrentLevel == LEVEL_AQUAS) && (player->unk_1D0 == 5))) { Object_Kill(&effect->obj, effect->sfxSource); } effect->obj.rot.z += effect->unk_48; @@ -5371,7 +5373,8 @@ void func_hud_80094954(Effect* effect) { } void func_hud_80094BBC(Effect* effect) { - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2) && (gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].unk_1D0 < 2)) { + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && (gCurrentLevel == LEVEL_AQUAS) && + (gPlayer[0].unk_1D0 < 2)) { RCP_SetupDL(&gMasterDisp, 0x44); gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 21, 34, effect->unk_4A); gDPSetEnvColor(gMasterDisp++, 255, 255, 251, 0); @@ -5635,8 +5638,8 @@ void func_hud_80095604(Player* player) { src.y = 300.0f; src.z = 1000.0f; - Matrix_Translate(gCalcMatrix, D_ctx_80177A48[1], D_ctx_80177A48[2], D_ctx_80177A48[3], 0); - Matrix_RotateY(gCalcMatrix, -(M_DTOR * D_ctx_80177A48[5]), 1); + Matrix_Translate(gCalcMatrix, D_ctx_80177A48[1], D_ctx_80177A48[2], D_ctx_80177A48[3], MTXF_NEW); + Matrix_RotateY(gCalcMatrix, -(M_DTOR * D_ctx_80177A48[5]), MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &src, &dest); } @@ -5646,14 +5649,14 @@ void func_hud_80095604(Player* player) { dest.z = gBosses[0].obj.pos.z + 1000.0f; } if (gCsFrameCount >= 90) { - dest.x = player->camEye.x; - dest.y = player->camEye.y; - dest.z = player->camEye.z + 200.0f - D_ctx_80177D20; + dest.x = player->cam.eye.x; + dest.y = player->cam.eye.y; + dest.z = player->cam.eye.z + 200.0f - D_ctx_80177D20; } Math_SmoothStepToAngle(&player->unk_130, 0.0f, 0.05f, 1.2f, 0.0001f); Math_SmoothStepToAngle(&player->unk_12C, 0.0f, 0.05f, 1.2f, 0.0001f); - Math_SmoothStepToF(&player->unk_034, 0.0f, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f); Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 20.0f, 0.0f); x = player->pos.x - dest.x; @@ -5684,17 +5687,17 @@ void func_hud_80095604(Player* player) { src.z = D_ctx_80177A48[9]; Matrix_Translate(gCalcMatrix, gBosses[0].obj.pos.x, gBosses[0].obj.pos.y, - gBosses[0].obj.pos.z + D_ctx_80177D20, 0); - Matrix_RotateY(gCalcMatrix, -(M_DTOR * D_ctx_80177A48[4]), 1); + gBosses[0].obj.pos.z + D_ctx_80177D20, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, -(M_DTOR * D_ctx_80177A48[4]), MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &src, &dest); Math_SmoothStepToF(&gCsCamEyeX, dest.x, 0.02f, player->unk_0D0, 0.001f); Math_SmoothStepToF(&gCsCamEyeY, dest.y, 0.02f, player->unk_0D0, 0.001f); Math_SmoothStepToF(&gCsCamEyeZ, dest.z, 0.02f, player->unk_0D0, 0.001f); - player->camEye.x = gCsCamEyeX; - player->camEye.y = gCsCamEyeY; - player->camEye.z = gCsCamEyeZ; + player->cam.eye.x = gCsCamEyeX; + player->cam.eye.y = gCsCamEyeY; + player->cam.eye.z = gCsCamEyeZ; if (gCsFrameCount < 200) { Math_SmoothStepToF(&gCsCamAtX, gBosses[0].obj.pos.x, 0.03f, 100.0f, 0.001f); @@ -5711,9 +5714,9 @@ void func_hud_80095604(Player* player) { } } - player->camAt.x = gCsCamAtX; - player->camAt.y = gCsCamAtY; - player->camAt.z = gCsCamAtZ; + player->cam.at.x = gCsCamAtX; + player->cam.at.y = gCsCamAtY; + player->cam.at.z = gCsCamAtZ; D_ctx_80177A48[0] = 0.0f; break; @@ -5779,17 +5782,17 @@ void func_hud_80095604(Player* player) { src.y = actor->fwork[2]; src.z = actor->fwork[3]; - Matrix_Translate(gCalcMatrix, player->pos.x, player->pos.y, player->unk_138 + D_ctx_80177D20, 0); - Matrix_RotateY(gCalcMatrix, -(M_DTOR * actor->unk_0F4.y), 1); + Matrix_Translate(gCalcMatrix, player->pos.x, player->pos.y, player->unk_138 + D_ctx_80177D20, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, -(M_DTOR * actor->unk_0F4.y), MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &src, &dest); - player->camAt.x = gCsCamAtX = player->pos.x; - player->camAt.y = gCsCamAtY = player->pos.y; - player->camAt.z = gCsCamAtZ = player->pos.z - 50.0f + D_ctx_80177D20; + player->cam.at.x = gCsCamAtX = player->pos.x; + player->cam.at.y = gCsCamAtY = player->pos.y; + player->cam.at.z = gCsCamAtZ = player->pos.z - 50.0f + D_ctx_80177D20; - player->camEye.x = gCsCamEyeX = dest.x; - player->camEye.y = gCsCamEyeY = dest.y; - player->camEye.z = gCsCamEyeZ = dest.z; + player->cam.eye.x = gCsCamEyeX = dest.x; + player->cam.eye.y = gCsCamEyeY = dest.y; + player->cam.eye.z = gCsCamEyeZ = dest.z; D_ctx_80177A48[0] = 1.0f; @@ -5845,8 +5848,8 @@ void func_hud_80095604(Player* player) { src.y = actor->fwork[2]; src.z = actor->fwork[3]; - Matrix_Translate(gCalcMatrix, actor->fwork[4], actor->fwork[5], actor->fwork[6], 0); - Matrix_RotateY(gCalcMatrix, -(M_DTOR * actor->unk_0F4.y), 1); + Matrix_Translate(gCalcMatrix, actor->fwork[4], actor->fwork[5], actor->fwork[6], MTXF_NEW); + Matrix_RotateY(gCalcMatrix, -(M_DTOR * actor->unk_0F4.y), MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &src, &dest); gCsCamEyeX = dest.x; @@ -5860,7 +5863,7 @@ void func_hud_80095604(Player* player) { if (gFillScreenAlpha == 255) { D_play_800D3180[LEVEL_AQUAS] = Play_CheckMedalStatus(150) + 1; - player->state_1C8 = PLAYERSTATE_1C8_6; + player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; Audio_FadeOutAll(10); D_ctx_8017837C = 4; @@ -5931,8 +5934,8 @@ void func_hud_80095604(Player* player) { break; } - Matrix_RotateY(gCalcMatrix, M_DTOR * (player->unk_0E8 + player->unk_114 + 180.0f), 0); - Matrix_RotateX(gCalcMatrix, -(M_DTOR * player->unk_0E4), 1); + Matrix_RotateY(gCalcMatrix, M_DTOR * (player->unk_0E8 + player->unk_114 + 180.0f), MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(M_DTOR * player->unk_0E4), MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; @@ -5970,12 +5973,12 @@ void func_hud_80095604(Player* player) { player->unk_178 += 20.0f; - Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0.001f); - Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0.001f); - Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0.001f); - Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0.001f); - Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0.001f); - Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0.001f); + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0.001f); + Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0.001f); + Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0.001f); + Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0.001f); + Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0.001f); + Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0.001f); } void func_hud_80096A74(Player* player) { @@ -5995,13 +5998,13 @@ void func_hud_80096A74(Player* player) { player->unk_1D0 = 1; gFillScreenAlpha = gFillScreenAlphaTarget = 255; - player->camEye.x = gCsCamEyeX = 0.0f; - player->camEye.y = gCsCamEyeY = player->pos.y + D_ctx_80177A48[1]; - player->camEye.z = gCsCamEyeZ = 0.0f; + player->cam.eye.x = gCsCamEyeX = 0.0f; + player->cam.eye.y = gCsCamEyeY = player->pos.y + D_ctx_80177A48[1]; + player->cam.eye.z = gCsCamEyeZ = 0.0f; - player->camAt.x = gCsCamAtX = 0.0f; - player->camAt.y = gCsCamAtY = 0.0f; - player->camAt.z = gCsCamAtZ = 0.0f; + player->cam.at.x = gCsCamAtX = 0.0f; + player->cam.at.y = gCsCamAtY = 0.0f; + player->cam.at.z = gCsCamAtZ = 0.0f; D_ctx_80177A48[0] = 1.0f; D_ctx_80177A48[2] = 0.0f; @@ -6022,17 +6025,17 @@ void func_hud_80096A74(Player* player) { if (gCsFrameCount > 60) { Math_SmoothStepToF(&D_ctx_80177A48[4], 3.0f, 0.05f, 1000.0f, 0.001f); } - player->unk_034 += D_ctx_80177A48[4]; - if (player->unk_034 >= 360.0f) { - player->unk_034 -= 360.0f; + player->camRoll += D_ctx_80177A48[4]; + if (player->camRoll >= 360.0f) { + player->camRoll -= 360.0f; } - if (player->unk_034 < 0.0f) { - player->unk_034 += 360.0f; + if (player->camRoll < 0.0f) { + player->camRoll += 360.0f; } } if (gCsFrameCount >= 140) { - Math_SmoothStepToAngle(&player->unk_034, 0.0f, 0.05f, 3.0f, 0.001f); + Math_SmoothStepToAngle(&player->camRoll, 0.0f, 0.05f, 3.0f, 0.001f); Math_SmoothStepToF(&D_ctx_80177A48[1], 200.0f, 0.2f, 6.0f, 0.0f); Math_SmoothStepToF(&D_ctx_80177A48[2], 200.0f, 0.2f, 6.0f, 0.0f); D_ctx_80177A48[0] = 0.2f; @@ -6057,7 +6060,7 @@ void func_hud_80096A74(Player* player) { case 2: D_ctx_80177A48[0] = 0.12f; - Math_SmoothStepToAngle(&player->unk_034, 0.0f, 0.05f, 3.0f, 0.001f); + Math_SmoothStepToAngle(&player->camRoll, 0.0f, 0.05f, 3.0f, 0.001f); Math_SmoothStepToF(&D_ctx_80177A48[1], (player->pos.y * player->unk_148 + 50.0f), 0.2f, 10.0f, 0.0f); Math_SmoothStepToF(&D_ctx_80177A48[2], 400.0f, 0.2f, 6.0f, 0.0f); Math_SmoothStepToF(&player->pos.y, 350.0f, 0.1f, 40.0f, 0.0f); @@ -6083,14 +6086,14 @@ void func_hud_80096A74(Player* player) { if (gCsFrameCount == 300) { D_ctx_80177CE8 = 0; gLevelStatusScreenTimer = 50; - player->state_1C8 = PLAYERSTATE_1C8_3; + player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_0D0 = D_play_80161A54; player->unk_1D0 = 0; player->timer_1F8 = 0; player->unk_014 = 0.0f; player->unk_018 = 0.0f; - player->unk_034 = 0.0f; - D_ctx_80178488 = 1; + player->camRoll = 0.0f; + gLoadLevelObjects = 1; } break; } @@ -6120,8 +6123,8 @@ void func_hud_80096A74(Player* player) { } } - Matrix_RotateY(gCalcMatrix, M_DTOR * (player->unk_0E8 + player->unk_114 + 180.0f), 0); - Matrix_RotateX(gCalcMatrix, -(M_DTOR * (player->unk_0E4)), 1); + Matrix_RotateY(gCalcMatrix, M_DTOR * (player->unk_0E8 + player->unk_114 + 180.0f), MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(M_DTOR * (player->unk_0E4)), MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; @@ -6140,10 +6143,10 @@ void func_hud_80096A74(Player* player) { player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; } - Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0.0f); } diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index a46b0a58..d1204be6 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -131,7 +131,7 @@ void func_play_800A3FEC(void) { *var_s1 = *var_s0 = 0.0f; } spB4[*spB0].n.ob[1] = (s16) *var_s3 + (s16) *var_s0; - Matrix_RotateZ(gCalcMatrix, *var_s3 * sp88 * M_DTOR, 0); + Matrix_RotateZ(gCalcMatrix, *var_s3 * sp88 * M_DTOR, MTXF_NEW); spC4.x = 120.0f; spC4.y = 0.0f; spC4.z = 0.0f; @@ -235,10 +235,10 @@ void func_play_800A4C40(Player* player) { Vec3f sp30; if (gGroundType == GROUNDTYPE_WATER) { - Matrix_Translate(gCalcMatrix, player->pos.x, player->pos.y, player->unk_138, 0); - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, -((player->unk_0E4 + player->unk_4D8) * M_DTOR), 1); - Matrix_RotateZ(gCalcMatrix, -(player->unk_0F8 * M_DTOR), 1); + Matrix_Translate(gCalcMatrix, player->pos.x, player->pos.y, player->unk_138, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, -((player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -(player->unk_0F8 * M_DTOR), MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &sp54, &sp3C); Matrix_MultVec3f(gCalcMatrix, &sp48, &sp30); if (player->pos.y < (gGroundLevel + 100.0f)) { @@ -861,8 +861,8 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) { func_play_800A5FA0(player->sfxSource, 0x0903A00F, player->num); } } - Matrix_RotateY(gCalcMatrix, player->unk_114 * M_DTOR, 0); - Matrix_RotateZ(gCalcMatrix, player->unk_0F8 * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, player->unk_114 * M_DTOR, MTXF_NEW); + Matrix_RotateZ(gCalcMatrix, player->unk_0F8 * M_DTOR, MTXF_APPLY); sp44.z = 0.0f; switch (player->unk_21C) { case 0: @@ -1086,26 +1086,26 @@ s32 func_play_800A7974(Player* player, f32* hitboxData, s32* index, f32 xPos, f3 for (i = 0; i < count; i++, hitboxData += 6) { spA0 = 0; if (*hitboxData == HITBOX_ROTATED) { - Matrix_RotateZ(gCalcMatrix, -hitboxData[3] * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -hitboxData[1] * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -hitboxData[2] * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, -zRot * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, -xRot * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -yRot * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, -hitboxData[3] * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -hitboxData[1] * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -hitboxData[2] * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -zRot * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, -xRot * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -yRot * M_DTOR, MTXF_APPLY); hitboxData += 4; spA0 = 1; } else { if (*hitboxData >= HITBOX_SHADOW) { hitboxData++; } - Matrix_RotateZ(gCalcMatrix, -zRot * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -xRot * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -yRot * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, -zRot * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -xRot * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -yRot * M_DTOR, MTXF_APPLY); } if (!((arg9 == 0) && (argA == 0) && (argB == 0))) { - Matrix_RotateZ(gCalcMatrix, -argB * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, -arg9 * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -argA * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, -argB * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, -arg9 * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -argA * M_DTOR, MTXF_APPLY); } if ((yRot == 0.0f) && (zRot == 0.0f) && (xRot == 0.0f) && (spA0 == 0)) { var_fv0 = player->hit3.x; @@ -1384,7 +1384,7 @@ s32 func_play_800A8304(Player* player, ObjectId objId, f32 arg2, f32 arg3, f32 a sp84.x = arg2; sp84.y = arg3; sp84.z = arg4; - Matrix_RotateY(gCalcMatrix, -arg6 * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, -arg6 * M_DTOR, MTXF_NEW); sp78.x = player->vel.x; sp78.y = player->vel.y; sp78.z = player->vel.z; @@ -1450,7 +1450,7 @@ void func_play_800A86E4(Player* player) { for (i = 0, item = gItems; i < ARRAY_COUNT(gItems); i++, item++) { if ((item->obj.status == OBJ_ACTIVE) && - ((player->state_1C8 == PLAYERSTATE_1C8_3) || (player->state_1C8 == PLAYERSTATE_1C8_5)) && + ((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (player->state_1C8 == PLAYERSTATE_1C8_U_TURN)) && (item->timer_4A == 0) && func_play_800A7974(player, item->info.hitbox, &sp6C, item->obj.pos.x, item->obj.pos.y, item->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)) { @@ -1494,7 +1494,7 @@ void func_play_800A8804(Player* playerA, Player* playerB) { void func_play_800A887C(Player* player) { Vec3f sp3C; - Matrix_Translate(gCalcMatrix, player->pos.x, player->pos.y, player->unk_138, 0); + Matrix_Translate(gCalcMatrix, player->pos.x, player->pos.y, player->unk_138, MTXF_NEW); if (player->form == FORM_LANDMASTER) { player->unk_10C = 0.0f; player->unk_104 = 0.0f; @@ -1525,8 +1525,8 @@ void func_play_800A887C(Player* player) { Matrix_MultVec3f(gCalcMatrix, &sp3C, &player->hit4); } if ((player->form == FORM_ARWING) || (player->form == FORM_BLUE_MARINE)) { - Matrix_RotateY(gCalcMatrix, (player->unk_114 + 180.0f) * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, -(player->unk_0F8 * M_DTOR), 1); + Matrix_RotateY(gCalcMatrix, (player->unk_114 + 180.0f) * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -(player->unk_0F8 * M_DTOR), MTXF_APPLY); sp3C.y = 0.0f; sp3C.z = 0.0f; if (player->wings.leftState == WINGSTATE_INTACT) { @@ -1595,7 +1595,7 @@ void func_play_800A8BA4(Player* player) { break; } } else if (player->form == FORM_ARWING) { - if ((player->hit1.y < (gGroundLevel + 13.0f)) && (player->state_1C8 != PLAYERSTATE_1C8_4)) { + if ((player->hit1.y < (gGroundLevel + 13.0f)) && (player->state_1C8 != PLAYERSTATE_1C8_DOWN)) { if (gGroundType == GROUNDTYPE_WATER) { player->unk_1F4 = 7; player->unk_0E4 = (player->unk_0D0 + player->unk_110) * 0.5f; @@ -1608,7 +1608,7 @@ void func_play_800A8BA4(Player* player) { func_effect_8007BC7C(player->hit1.x, player->hit1.y, player->hit1.z, 6.0f); } } - if ((player->hit2.y < (gGroundLevel + 13.0f)) && (player->state_1C8 != PLAYERSTATE_1C8_4)) { + if ((player->hit2.y < (gGroundLevel + 13.0f)) && (player->state_1C8 != PLAYERSTATE_1C8_DOWN)) { if (gGroundType == GROUNDTYPE_WATER) { player->unk_1F4 = 7; player->unk_0E4 = (player->unk_0D0 + player->unk_110) * 0.5f; @@ -1685,7 +1685,7 @@ void func_play_800A8BA4(Player* player) { } else { Player_ApplyDamage(player, temp_v0, obj58->info.damage); if (obj58->obj.id == OBJ_80_131) { - Matrix_RotateY(gCalcMatrix, (obj58->obj.rot.y + 180.0f) * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, (obj58->obj.rot.y + 180.0f) * M_DTOR, MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, &D_800D3040[sp98 - 1], &spBC); player->unk_0D8.x = spBC.x; player->unk_0D8.y = spBC.y; @@ -1700,10 +1700,10 @@ void func_play_800A8BA4(Player* player) { } if ((obj58->obj.id == OBJ_80_135) || (obj58->obj.id == OBJ_80_136)) { if (obj58->obj.id == OBJ_80_135) { - Matrix_RotateY(gCalcMatrix, (obj58->obj.rot.y + 180.0f) * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, (obj58->obj.rot.y + 180.0f) * M_DTOR, MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, &D_800D3088[sp98 - 1], &spBC); } else { - Matrix_RotateY(gCalcMatrix, obj58->obj.rot.y * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, obj58->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, &D_800D30B8[sp98 - 1], &spBC); } player->unk_0D8.x = spBC.x; @@ -1785,7 +1785,7 @@ void func_play_800A8BA4(Player* player) { Player_ApplyDamage(player, temp_v0, obj80->info.damage); if ((obj80->obj.id == OBJ_80_48) || (obj80->obj.id == OBJ_80_55) || (obj80->obj.id == OBJ_80_49)) { - Matrix_RotateY(gCalcMatrix, obj80->obj.rot.y * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, obj80->obj.rot.y * M_DTOR, MTXF_NEW); spC8.x = -(player->unk_0D0 + player->unk_110) * 0.7f; spC8.y = 0.0f; spC8.z = 0.0f; @@ -1807,8 +1807,8 @@ void func_play_800A8BA4(Player* player) { player->pos.x = player->unk_090.x; player->timer_498 = 5; } else if (obj80->obj.id == OBJ_80_131) { - Matrix_RotateY(gCalcMatrix, (obj80->obj.rot.y + 180.0f) * M_DTOR, 0); - Matrix_RotateZ(gCalcMatrix, -obj80->obj.rot.z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, (obj80->obj.rot.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateZ(gCalcMatrix, -obj80->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &D_800D3040[sp98 - 1], &spBC); player->unk_0D8.x = spBC.x; player->unk_0D8.y = spBC.y; @@ -2019,7 +2019,7 @@ void func_play_800A8BA4(Player* player) { func_play_800A86E4(player); if (gCamCount == 4) { for (opponent = &gPlayer[3], i = 3; i >= 0; i--, opponent--) { - if ((i != gPlayerNum) && (opponent->state_1C8 == PLAYERSTATE_1C8_3)) { + if ((i != gPlayerNum) && (opponent->state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { spC8.x = 25.0f; if (player->form == FORM_ON_FOOT) { spC8.x = 4.0f; @@ -2074,7 +2074,7 @@ void func_play_800A8BA4(Player* player) { player->unk_0D8.y = 30.0f; player->unk_0E4 = (player->unk_0D0 + player->unk_110) * 0.8f; } - if (player->state_1C8 == PLAYERSTATE_1C8_4) { + if (player->state_1C8 == PLAYERSTATE_1C8_DOWN) { player->timer_220 = 2; func_effect_8007AFD0(player->pos.x, player->unk_138, 30.0f, 0.0f, 5.0f); func_effect_8007AFD0(player->pos.x, player->unk_138, -30.0f, 0.0f, 5.0f); @@ -2201,7 +2201,7 @@ void func_play_800AA800(Player* player) { tempy = obj58->obj.pos.y; tempz = obj58->obj.pos.z; sp120 = obj58->obj.rot.y; - Matrix_RotateY(gCalcMatrix, -sp120 * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, -sp120 * M_DTOR, MTXF_NEW); spEC.x = player->pos.x - tempx; spEC.y = 0.0f; spEC.z = player->unk_138 - tempz; @@ -2251,7 +2251,7 @@ void func_play_800AA800(Player* player) { sp120 = obj80->obj.rot.y; if ((obj80->obj.id == OBJ_80_3) || (obj80->obj.id == OBJ_80_2) || (obj80->obj.id == OBJ_80_47) || (obj80->obj.id == OBJ_80_4) || (obj80->obj.id == OBJ_80_5)) { - Matrix_RotateY(gCalcMatrix, -sp120 * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, -sp120 * M_DTOR, MTXF_NEW); for (var_fs1 = var_fs0 = -50.0f; var_fs0 > -500.0f; var_fs0 -= 5.0f, var_fs1 -= 5.0f) { spEC.x = player->pos.x - tempx; spEC.y = player->pos.y + var_fs0 - tempy; @@ -2306,12 +2306,12 @@ void func_play_800AA800(Player* player) { spFC = hitboxData[2]; spF8 = hitboxData[3]; hitboxData += 4; - Matrix_RotateZ(gCalcMatrix, -spF8 * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -sp100 * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -spFC * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -sp120 * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, -spF8 * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -sp100 * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -spFC * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -sp120 * M_DTOR, MTXF_APPLY); } else { - Matrix_RotateY(gCalcMatrix, -sp120 * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, -sp120 * M_DTOR, MTXF_NEW); } hitbox = (Hitbox*) hitboxData; for (var_fs0 = var_fs1 = -50.0f; var_fs0 > -500.0f; var_fs0 -= 5.0f, var_fs1 -= 5.0f) { @@ -2557,7 +2557,7 @@ void Play_Init(void) { if (gCurrentLevel != LEVEL_VERSUS) { gOverlayStage = 0; } - D_game_80161A2C = 1; + gShowHud = 1; D_ctx_80177A98 = D_ctx_80177AB0 = 1; D_ctx_80177AC8 = D_800D2F54 = 0; D_display_800CA230 = D_800D2F58 = 0.0f; @@ -2622,7 +2622,7 @@ void Play_Init(void) { if (gCurrentLevel == LEVEL_AQUAS) { D_ctx_80177CC0 = 1000.0f; } - D_ctx_80178488 = false; + gLoadLevelObjects = false; gCamCount = 1; if (gCurrentLevel == LEVEL_VERSUS) { gCamCount = 4; @@ -2633,7 +2633,7 @@ void Play_Init(void) { MEM_ARRAY_ALLOCATE(gPlayer, gCamCount); func_play_800AB2AC(); for (i = 0; i < gCamCount; i++) { - gPlayer[i].state_1C8 = PLAYERSTATE_1C8_1; + gPlayer[i].state_1C8 = PLAYERSTATE_1C8_INIT; gPlayerFillScreenAlphas[i] = D_ctx_801783C0[i] = 0; gControllerRumbleTimers[i] = 0; D_ctx_80177C30[i] = 0; @@ -2696,10 +2696,10 @@ void func_play_800AC290(Player* player, PlayerShot* shot, f32 arg2, f32 arg3, Pl Vec3f sp2C; PlayerShot_Initialize(shot); - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), 1); - Matrix_RotateZ(gCalcMatrix, -((player->unk_0F8 + player->unk_0F0) * M_DTOR), 1); - Matrix_Translate(gCalcMatrix, player->unk_084, player->unk_080, 0.0f, 1); + Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -((player->unk_0F8 + player->unk_0F0) * M_DTOR), MTXF_APPLY); + Matrix_Translate(gCalcMatrix, player->unk_084, player->unk_080, 0.0f, MTXF_APPLY); if (gVersusMode && (shotId <= PLAYERSHOT_1)) { arg5 *= 0.5f; } @@ -2762,28 +2762,28 @@ void func_play_800AC650(Player* player, PlayerShot* shot, PlayerShotId shotId, f Vec3f sp3C; PlayerShot_Initialize(shot); - Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, 0); - Matrix_RotateZ(gCalcMatrix, (player->unk_0EC + player->unk_0F0) * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, player->unk_114 * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, (-player->unk_12C - player->unk_130) * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -player->unk_180 * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, player->unk_17C * M_DTOR, 1); + Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, MTXF_NEW); + Matrix_RotateZ(gCalcMatrix, (player->unk_0EC + player->unk_0F0) * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, player->unk_114 * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, (-player->unk_12C - player->unk_130) * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -player->unk_180 * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, player->unk_17C * M_DTOR, MTXF_APPLY); sp54.x = 0; sp54.y = 0; sp54.z = arg3; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48); - Matrix_Translate(gCalcMatrix, 0.0f, player->unk_18C + 30.0f, 0, 0); - Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, (player->unk_0EC + player->unk_0F0) * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, player->unk_114 * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, (-player->unk_12C - player->unk_130) * M_DTOR, 1); - Matrix_Translate(gCalcMatrix, 0.0f, -30.0f, 0, 1); - Matrix_Translate(gCalcMatrix, player->unk_084, player->unk_080, 0.0f, 1); - Matrix_Translate(gCalcMatrix, 0.0f, 51.0f, -4.0f, 1); - Matrix_RotateY(gCalcMatrix, -player->unk_180 * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, player->unk_17C * M_DTOR, 1); + Matrix_Translate(gCalcMatrix, 0.0f, player->unk_18C + 30.0f, 0, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, (player->unk_0EC + player->unk_0F0) * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, player->unk_114 * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, (-player->unk_12C - player->unk_130) * M_DTOR, MTXF_APPLY); + Matrix_Translate(gCalcMatrix, 0.0f, -30.0f, 0, MTXF_APPLY); + Matrix_Translate(gCalcMatrix, player->unk_084, player->unk_080, 0.0f, MTXF_APPLY); + Matrix_Translate(gCalcMatrix, 0.0f, 51.0f, -4.0f, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -player->unk_180 * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, player->unk_17C * M_DTOR, MTXF_APPLY); sp54.x = 0; sp54.y = 7; sp54.z = 0; @@ -2892,10 +2892,10 @@ void func_play_800ACDC0(Player* player, PlayerShot* shot, PlayerShotId shotId) { Vec3f sp44; PlayerShot_Initialize(shot); - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + player->unk_134 + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -((player->unk_0E4 + player->unk_134) * M_DTOR), 1); - Matrix_RotateZ(gCalcMatrix, -((player->unk_0F8 + player->unk_0F0 + player->unk_134) * M_DTOR), 1); - Matrix_RotateX(gCalcMatrix, player->unk_154 * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + player->unk_134 + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->unk_0E4 + player->unk_134) * M_DTOR), MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -((player->unk_0F8 + player->unk_0F0 + player->unk_134) * M_DTOR), MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, player->unk_154 * M_DTOR, MTXF_APPLY); sp5C.x = 0.0f; sp5C.y = 0.0f; if (shotId == PLAYERSHOT_3) { @@ -2904,12 +2904,12 @@ void func_play_800ACDC0(Player* player, PlayerShot* shot, PlayerShotId shotId) { sp5C.z = 150.0f; } Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp5C, &sp50); - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + player->unk_134 + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -((player->unk_0E4 + player->unk_134) * M_DTOR), 1); - Matrix_RotateZ(gCalcMatrix, -((player->unk_0F8 + player->unk_0F0 + player->unk_134) * M_DTOR), 1); - Matrix_Translate(gCalcMatrix, 0.0f, player->unk_080, 0, 1); - Matrix_Translate(gCalcMatrix, -10.0f, 25.0f, 0.0f, 1); - Matrix_RotateX(gCalcMatrix, player->unk_154 * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + player->unk_134 + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->unk_0E4 + player->unk_134) * M_DTOR), MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -((player->unk_0F8 + player->unk_0F0 + player->unk_134) * M_DTOR), MTXF_APPLY); + Matrix_Translate(gCalcMatrix, 0.0f, player->unk_080, 0, MTXF_APPLY); + Matrix_Translate(gCalcMatrix, -10.0f, 25.0f, 0.0f, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, player->unk_154 * M_DTOR, MTXF_APPLY); sp5C.x = 0.0f; sp5C.y = 0.0f; sp5C.z = 0; @@ -2956,8 +2956,8 @@ bool func_play_800AD118(s32 playerNum) { } if (gVersusMode) { for (i = 0; i < gCamCount; i++) { - if (((gPlayer[playerNum].state_1C8 == PLAYERSTATE_1C8_3) || - (gPlayer[playerNum].state_1C8 == PLAYERSTATE_1C8_5)) && + if (((gPlayer[playerNum].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || + (gPlayer[playerNum].state_1C8 == PLAYERSTATE_1C8_U_TURN)) && (D_ctx_80177B00[i][playerNum] != 0)) { return false; } @@ -2979,7 +2979,7 @@ bool func_play_800AD1F4(Player* player) { func_enmy_80060F30(player->sfxSource, 0x0900302D, player->num); } if ((!(gInputHold->button & R_TRIG) || !(gInputHold->button & Z_TRIG) || (player->form != FORM_ARWING) || - (player->state_1C8 != PLAYERSTATE_1C8_3)) && + (player->state_1C8 != PLAYERSTATE_1C8_ACTIVE)) && ((gGameFrameCount % 4) == 0) && func_play_800AD118(player->num)) { if (gChargeTimers[player->num] > 20) { for (i = 0; i < 13; i++) { @@ -3273,27 +3273,27 @@ void func_play_800AE278(Player* player) { if (player->pos.x > 12000.0f) { var_v0 = true; player->pos.x -= 24000.0f; - player->camEye.x -= 24000.0f; - player->camAt.x -= 24000.0f; + player->cam.eye.x -= 24000.0f; + player->cam.at.x -= 24000.0f; } if (player->pos.x < -12000.0f) { var_v0 = true; player->pos.x += 24000.0f; - player->camEye.x += 24000.0f; - player->camAt.x += 24000.0f; + player->cam.eye.x += 24000.0f; + player->cam.at.x += 24000.0f; } if (player->pos.z > 12000.0f) { var_v0 = true; player->pos.z -= 24000.0f; - player->camEye.z -= 24000.0f; - player->camAt.z -= 24000.0f; + player->cam.eye.z -= 24000.0f; + player->cam.at.z -= 24000.0f; } if (player->pos.z < -12000.0f) { var_v0 = true; player->pos.z += 24000.0f; - player->camEye.z += 24000.0f; - player->camAt.z += 24000.0f; + player->cam.eye.z += 24000.0f; + player->cam.at.z += 24000.0f; } if (var_v0) { D_ctx_80177B00[player->num][0] = D_ctx_80177B00[player->num][1] = D_ctx_80177B00[player->num][2] = @@ -3311,7 +3311,7 @@ void func_play_800AE278(Player* player) { var_fv1 = 100000.0f; } if ((var_fv1 < fabsf(player->pos.x)) || (var_fv1 < fabsf(player->pos.z))) { - player->state_1C8 = PLAYERSTATE_1C8_5; + player->state_1C8 = PLAYERSTATE_1C8_U_TURN; player->unk_19C = 0; player->unk_1D0 = 0; player->unk_000 = 0.0f; @@ -3339,7 +3339,7 @@ void func_play_800AE4A4(Player* player) { sp7C = -gInputPress->stick_x; sp78 = gInputPress->stick_y; Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 5.0f, 0.01f); - Matrix_RotateZ(gCalcMatrix, -player->unk_12C * M_DTOR, 0); + Matrix_RotateZ(gCalcMatrix, -player->unk_12C * M_DTOR, MTXF_NEW); sp4C.x = sp7C * 0.75f; sp4C.y = sp78 * 0.75f; sp4C.z = 0.0f; @@ -3406,8 +3406,8 @@ void func_play_800AE4A4(Player* player) { } Math_SmoothStepToF(&player->unk_0EC, sp7C * 0.6f * var_fv1, 0.1f, var_fv0, 0.03f); player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), 1); + Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); sp4C.x = 0.0f; sp4C.y = 0.0f; if (player->wings.rightState <= WINGSTATE_BROKEN) { @@ -3497,8 +3497,8 @@ void func_play_800AECAC(Player* player) { temp = -gInputPress->stick_x * 0.68f; Math_SmoothStepToF(&player->unk_0E8, temp, 0.1f, 2.0f, 0.0f); player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), 1); + Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); sp4C.x = 0.0f; sp4C.y = 0.0f; sp4C.z = player->unk_0D0; @@ -3547,7 +3547,7 @@ void func_play_800AF07C(Player* player) { Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 5.0f, 0.01f); if (player->cockpitView != 0) { - Matrix_RotateZ(gCalcMatrix, player->unk_12C * M_DTOR, 0); + Matrix_RotateZ(gCalcMatrix, player->unk_12C * M_DTOR, MTXF_NEW); sp68.z = 0.0f; sp68.x = stickX; @@ -3558,7 +3558,7 @@ void func_play_800AF07C(Player* player) { stickX = sp5C.x; stickY = sp5C.y; } else { - Matrix_RotateZ(gCalcMatrix, (-player->unk_12C) * M_DTOR, 0); + Matrix_RotateZ(gCalcMatrix, (-player->unk_12C) * M_DTOR, MTXF_NEW); sp68.z = 0.0f; sp68.x = stickX * 0.75f; @@ -3627,8 +3627,8 @@ void func_play_800AF07C(Player* player) { } Math_SmoothStepToF(&player->unk_0EC, (stickX * 0.6f) * var_fv1, 0.1f, var_fv0, 0.03f); - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -((player->unk_0E4 + player->unk_4D8) * M_DTOR), 1); + Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); sp68.x = 0.0f; sp68.y = 0.0f; @@ -3639,8 +3639,8 @@ void func_play_800AF07C(Player* player) { sp44.x *= 1.4f; sp44.y *= 1.4f; - Matrix_RotateY(gCalcMatrix, player->unk_114 * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, player->unk_120 * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, player->unk_114 * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, player->unk_120 * M_DTOR, MTXF_APPLY); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp5C); sp68.x = 0.0f; @@ -3774,9 +3774,9 @@ void func_play_800AF928(Player* player) { Math_SmoothStepToF(&player->unk_11C, player->unk_0E8 * var_fa0, 0.1f, var_fa1, 0.05f); player->unk_114 += player->unk_11C; player->unk_114 = Math_ModF(player->unk_114, 360.0f); - Matrix_RotateX(gCalcMatrix, player->unk_104 * M_DTOR, 0); - Matrix_RotateZ(gCalcMatrix, player->unk_10C * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, 1); + Matrix_RotateX(gCalcMatrix, player->unk_104 * M_DTOR, MTXF_NEW); + Matrix_RotateZ(gCalcMatrix, player->unk_10C * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_APPLY); sp44.x = 0.0f; sp44.y = 0.0f; sp44.z = player->unk_0D0; @@ -3872,7 +3872,7 @@ void func_play_800B0194(Player* player) { s32 sp44; s32 pad; - player->unk_034 = 0.0f; + player->camRoll = 0.0f; var_fa0 = 0.0f; if (player->pos.y > 10.0f) { var_fa0 = 20.0f; @@ -3926,9 +3926,9 @@ void func_play_800B0194(Player* player) { Math_SmoothStepToF(&player->unk_11C, -sp74 * D_ctx_80177970 * var_fv0, 0.2f, var_fa0, 0.0f); player->unk_114 += player->unk_11C; player->unk_114 = Math_ModF(player->unk_114, 360.0f); - Matrix_RotateX(gCalcMatrix, player->unk_104 * M_DTOR, 0); - Matrix_RotateZ(gCalcMatrix, player->unk_10C * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, 1); + Matrix_RotateX(gCalcMatrix, player->unk_104 * M_DTOR, MTXF_NEW); + Matrix_RotateZ(gCalcMatrix, player->unk_10C * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_APPLY); sp58.x = 0.0f; sp58.y = 0.0f; sp58.z = player->unk_0D0; @@ -4099,12 +4099,12 @@ void func_play_800B0F50(Player* playerx) { player->unk_194 = 1.0f; gRadioState = D_ctx_80177D68 = D_ctx_801782A4 = 0; D_ctx_8017853C = D_ctx_80177D50 = 0.0f; - player->camEye.z = 400.0f; + player->cam.eye.z = 400.0f; player->unk_148 = 0.77699995f; player->unk_14C = 0.77699995f; player->unk_01C = 1.0f; player->unk_068 = -1000.0f; - player->camAt.z = player->camEye.z - 1000.0f; + player->cam.at.z = player->cam.eye.z - 1000.0f; D_ctx_80177950 = 1.0f; if ((gLevelType == LEVELTYPE_SPACE) && (gCurrentLevel != LEVEL_BOLSE)) { player->unk_240 = 1; @@ -4205,8 +4205,8 @@ void func_play_800B0F50(Player* playerx) { player->pos.z -= 200.0f; player->unk_138 -= 200.0f; } - player->camEye.y = (player->pos.y * player->unk_148) + 10.0f; - player->camEye.x = player->pos.x * player->unk_148; + player->cam.eye.y = (player->pos.y * player->unk_148) + 10.0f; + player->cam.eye.x = player->pos.x * player->unk_148; gPlayerCamAt.x = gPlayerCamAt.y = gPlayerCamAt.z = gPlayerCamEye.x = gPlayerCamEye.y = gPlayerCamEye.z = 0.0f; @@ -4250,7 +4250,7 @@ void func_play_800B0F50(Player* playerx) { } func_play_800B7184(player, 1); } - player->state_1C8 = PLAYERSTATE_1C8_3; + player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_204 = gLevelType; if ((gLevelMode == LEVELMODE_ALL_RANGE) && !gVersusMode) { player->pos.z = 8000.0f; @@ -4280,7 +4280,7 @@ void func_play_800B0F50(Player* playerx) { gAllRangeCheckpoint = 0; switch (gCurrentLevel) { case LEVEL_CORNERIA: - player->state_1C8 = PLAYERSTATE_1C8_2; + player->state_1C8 = PLAYERSTATE_1C8_LEVEL_INTRO; player->unk_204 = 1; gGroundType = gSavedGroundType = GROUNDTYPE_WATER; func_play_800A3FB0(); @@ -4302,10 +4302,10 @@ void func_play_800B0F50(Player* playerx) { case LEVEL_KATINA: case LEVEL_SECTOR_Z: case LEVEL_VENOM_2: - player->state_1C8 = PLAYERSTATE_1C8_2; + player->state_1C8 = PLAYERSTATE_1C8_LEVEL_INTRO; break; case LEVEL_METEO: - player->state_1C8 = PLAYERSTATE_1C8_2; + player->state_1C8 = PLAYERSTATE_1C8_LEVEL_INTRO; break; } } else { @@ -4329,7 +4329,7 @@ void func_play_800B0F50(Player* playerx) { Macbeth_801ACFBC(); } } - if (player->state_1C8 == PLAYERSTATE_1C8_2) { + if (player->state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) { player->unk_234 = 1; switch (gCurrentLevel) { case LEVEL_CORNERIA: @@ -4404,7 +4404,7 @@ void func_play_800B0F50(Player* playerx) { player->sfx.form = player->form; func_display_80057814(player); if (!gVersusMode && (((gCurrentLevel != LEVEL_TITANIA) && (gCurrentLevel != LEVEL_SOLAR)) || gVersusMode || - (player->state_1C8 != PLAYERSTATE_1C8_2))) { + (player->state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO))) { func_8001C8B8(gPlayerNum); } if ((player->form == FORM_ARWING) && !gVersusMode) { @@ -4650,7 +4650,7 @@ void func_play_800B2574(Player* player) { } } if ((gInputHold->button & gBoostButton[player->num]) && !(gInputHold->button & gBrakeButton[player->num]) && - (player->state_1C8 != PLAYERSTATE_1C8_5) && !player->unk_2B4) { + (player->state_1C8 != PLAYERSTATE_1C8_U_TURN) && !player->unk_2B4) { if (player->unk_2BC == 0.0f) { func_play_800A5FA0(player->sfxSource, 0x09000002, player->num); player->unk_194 = 5.0f; @@ -4732,7 +4732,7 @@ void func_play_800B2C00(Player* player) { (D_Timer_80177A38[gPlayerNum] != 0)) { D_Timer_80177A00[gPlayerNum] = 0; D_Timer_80177A38[gPlayerNum] = 0; - player->state_1C8 = PLAYERSTATE_1C8_5; + player->state_1C8 = PLAYERSTATE_1C8_U_TURN; player->unk_1D0 = 0; player->unk_19C = 1; player->unk_000 = 0.0f; @@ -4744,7 +4744,7 @@ void func_play_800B2C00(Player* player) { } } if ((gInputHold->button & gBrakeButton[player->num]) && !(gInputHold->button & gBoostButton[player->num]) && - (player->state_1C8 != PLAYERSTATE_1C8_5) && !player->unk_2B4) { + (player->state_1C8 != PLAYERSTATE_1C8_U_TURN) && !player->unk_2B4) { if (player->unk_2BC == 0.0f) { func_play_800A5FA0(player->sfxSource, 0x09000003, player->num); if ((gLevelMode == LEVELMODE_ALL_RANGE) && (gInputPress->button & gBrakeButton[player->num])) { @@ -5001,7 +5001,7 @@ void func_play_800B39E0(Player* player) { player->unk_1F4--; if (player->form == FORM_ARWING) { player->unk_134 = (SIN_DEG(player->unk_1F4 * 400.0f) * player->unk_1F4) * D_800D3164[player->unk_21C]; - if (player->state_1C8 == PLAYERSTATE_1C8_3) { + if (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) { player->unk_084 = (SIN_DEG(player->unk_1F4 * 400.0f) * player->unk_1F4) * D_800D3164[player->unk_21C] * 0.8f; } @@ -5086,7 +5086,7 @@ void func_play_800B41E0(Player* player) { } void func_play_800B41EC(Player* player) { - player->state_1C8 = PLAYERSTATE_1C8_4; + player->state_1C8 = PLAYERSTATE_1C8_DOWN; if (!gVersusMode) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); @@ -5102,7 +5102,7 @@ void func_play_800B41EC(Player* player) { player->unk_1F4 = 0; player->timer_220 = 0; player->unk_134 = 0.0f; - D_game_80161A2C = 0; + gShowHud = 0; } void func_play_800B42B0(Player* player) { @@ -5235,7 +5235,7 @@ void func_play_800B44C4(Player* player) { void func_play_800B46F8(Player* player) { s32 teamId; - if ((player->state_1C8 == PLAYERSTATE_1C8_3) && (D_ctx_8017796C >= 0)) { + if ((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (D_ctx_8017796C >= 0)) { D_ctx_8017796C++; if (D_ctx_8017796C > 960) { D_ctx_8017796C = 0; @@ -5276,7 +5276,7 @@ void func_play_800B46F8(Player* player) { } // lots of fakery -void Player_Update1(Player* player) { +void Player_Update(Player* player) { f32 sp1CC; f32 sp1C8; s32 sp1C4; @@ -5306,11 +5306,11 @@ void Player_Update1(Player* player) { *gControllerRumble = 1; } } - if (player->state_1C8 >= PLAYERSTATE_1C8_2) { + if (player->state_1C8 >= PLAYERSTATE_1C8_LEVEL_INTRO) { func_play_800B39E0(player); } player->flags_228 = 0; - if ((player->state_1C8 >= PLAYERSTATE_1C8_2) && (player->form == FORM_ARWING) && !gVersusMode) { + if ((player->state_1C8 >= PLAYERSTATE_1C8_LEVEL_INTRO) && (player->form == FORM_ARWING) && !gVersusMode) { switch (player->unk_204) { case 0: sp1C4 = Animation_GetFrameData(&D_arwing_3015AF4, 0, sp58); @@ -5330,26 +5330,26 @@ void Player_Update1(Player* player) { player->whooshTimer--; } switch (player->state_1C8) { - case PLAYERSTATE_1C8_0: + case PLAYERSTATE_1C8_STANDBY: player->unk_234 = 0; - D_game_80161A2C = 0; + gShowHud = 0; gPauseEnabled = 0; break; - case PLAYERSTATE_1C8_1: + case PLAYERSTATE_1C8_INIT: func_play_800B0F50(player); gFillScreenAlphaTarget = 0; gPauseEnabled = 0; break; - case PLAYERSTATE_1C8_2: - D_game_80161A2C = 0; + case PLAYERSTATE_1C8_LEVEL_INTRO: + gShowHud = 0; gPauseEnabled = 0; - player->wings.unk_2C = 1; - func_demo_8004A52C(player); + player->wings.modelId = 1; + Cutscene_LevelStart(player); break; - case PLAYERSTATE_1C8_3: - D_game_80161A2C = 1; + case PLAYERSTATE_1C8_ACTIVE: + gShowHud = 1; func_play_800B46F8(player); - player->wings.unk_2C = 0; + player->wings.modelId = 0; D_hud_80161704 = 255; if ((!gVersusMode || (D_ctx_80177E7C != 0)) && (player->unk_4DC == 0) && (gInputPress->button & U_CBUTTONS) && @@ -5359,14 +5359,14 @@ void Player_Update1(Player* player) { } else { AUDIO_PLAY_SFX(0x4900002D, gDefaultSfxSource, 4); if (gLevelMode == LEVELMODE_ON_RAILS) { - player->unk_034 = 0.0f; + player->camRoll = 0.0f; } } player->unk_014 = 0.1f; } switch (gLevelMode) { case LEVELMODE_ON_RAILS: - D_ctx_80178488 = true; + gLoadLevelObjects = true; func_play_800B42B0(player); player->unk_234 = 1; break; @@ -5380,7 +5380,7 @@ void Player_Update1(Player* player) { sp1C4 = RAND_INT(3.9f); } while (gPlayerInactive[sp1C4]); player->unk_288 = sp1C4 + 1; - player->state_1C8 = PLAYERSTATE_1C8_13; + player->state_1C8 = PLAYERSTATE_1C8_VS_STANDBY; player->unk_1D0 = 0; func_play_800B5FBC(player, player->unk_288 - 1, 1); } else { @@ -5401,27 +5401,27 @@ void Player_Update1(Player* player) { } break; case LEVELMODE_UNK_2: - D_ctx_80178488 = true; + gLoadLevelObjects = true; Turret_801A5AD4(player); func_play_800A8BA4(player); break; } break; - case PLAYERSTATE_1C8_4: - func_demo_8004E3D8(player); + case PLAYERSTATE_1C8_DOWN: + Cutscene_PlayerDown(player); break; - case PLAYERSTATE_1C8_5: + case PLAYERSTATE_1C8_U_TURN: if (gVersusMode) { D_ctx_80177B00[player->num][0] = D_ctx_80177B00[player->num][1] = D_ctx_80177B00[player->num][2] = D_ctx_80177B00[player->num][3] = 0; } - player->wings.unk_2C = 1; + player->wings.modelId = 1; Math_SmoothStepToF(&player->wings.unk_04, 0.0f, 0.1f, 5.0f, 0); Math_SmoothStepToF(&player->wings.unk_08, 0.0f, 0.1f, 5.0f, 0); Math_SmoothStepToF(&player->wings.unk_0C, 0.0f, 0.1f, 5.0f, 0); Math_SmoothStepToF(&player->wings.unk_10, 0.0f, 0.1f, 5.0f, 0); func_play_800B40AC(player); - func_demo_8004CCC0(player); + Cutscene_UTurn(player); if (gCurrentLevel == LEVEL_KATINA) { func_play_800A8BA4(player); } else { @@ -5429,39 +5429,39 @@ void Player_Update1(Player* player) { func_play_800A86E4(player); } break; - case PLAYERSTATE_1C8_7: + case PLAYERSTATE_1C8_LEVEL_COMPLETE: player->cockpitView = 0; gPauseEnabled = 0; func_play_800B40AC(player); - func_demo_8004C930(player); + Cutscene_LevelComplete(player); func_play_800A4C40(player); - D_game_80161A2C = gChargeTimers[player->num] = 0; + gShowHud = gChargeTimers[player->num] = 0; break; - case PLAYERSTATE_1C8_8: + case PLAYERSTATE_1C8_ENTER_WARP_ZONE: gPauseEnabled = 0; func_play_800B40AC(player); - func_demo_80049C0C(player); - D_game_80161A2C = 0; + Cutscene_EnterWarpZone(player); + gShowHud = 0; break; - case PLAYERSTATE_1C8_9: + case PLAYERSTATE_1C8_START_360: gPauseEnabled = 0; func_play_800B40AC(player); - func_demo_8004AAF4(player); + Cutscene_AllRangeMode(player); func_play_800B2130(player); - gChargeTimers[player->num] = player->cockpitView = D_game_80161A2C = 0; + gChargeTimers[player->num] = player->cockpitView = gShowHud = 0; break; - case PLAYERSTATE_1C8_10: + case PLAYERSTATE_1C8_GFOX_REPAIR: gPauseEnabled = 0; - func_360_8002E700(player); - D_game_80161A2C = 0; + AllRange_GreatFoxRepair(player); + gShowHud = 0; break; - case PLAYERSTATE_1C8_11: + case PLAYERSTATE_1C8_ANDROSS_MOUTH: Andross_8018C390(player); func_play_800B40AC(player); break; case PLAYERSTATE_1C8_12: break; - case PLAYERSTATE_1C8_13: + case PLAYERSTATE_1C8_VS_STANDBY: player->unk_234 = 0; if (gPlayerInactive[player->num] == true) { func_play_800B5FBC(player, player->unk_288 - 1, 0); @@ -5480,8 +5480,8 @@ void Player_Update1(Player* player) { func_play_800B5FBC(player, player->unk_288 - 1, 0); } break; - case PLAYERSTATE_1C8_6: - D_game_80161A2C = 0; + case PLAYERSTATE_1C8_NEXT: + gShowHud = 0; if (!gVersusMode) { gPauseEnabled = 0; } @@ -5489,16 +5489,16 @@ void Player_Update1(Player* player) { player->vel.z = player->vel.x = player->vel.y = player->unk_0D8.x = player->unk_0D8.y = 0.0f; if ((gLevelMode == LEVELMODE_ALL_RANGE) && (D_ctx_8017837C == 7)) { - player->camEye.x += 1.0f; - player->camEye.z += 1.5f; + player->cam.eye.x += 1.0f; + player->cam.eye.z += 1.5f; } if ((gCurrentLevel == LEVEL_ZONESS) || (gCurrentLevel == LEVEL_SOLAR)) { - Math_SmoothStepToF(&player->camEye.y, 500.0f, 0.05f, 10.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.z, player->unk_138 + D_ctx_80177D20 + 500.0f, 0.05f, 20.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.y, 500.0f, 0.05f, 10.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.z, player->unk_138 + D_ctx_80177D20 + 500.0f, 0.05f, 20.0f, 0.0f); } if (player->timer_1F8 == 0) { if (gCamCount == 4) { - player->state_1C8 = PLAYERSTATE_1C8_13; + player->state_1C8 = PLAYERSTATE_1C8_VS_STANDBY; player->timer_1F8 = 200; } else { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; @@ -5513,42 +5513,41 @@ void Player_Update1(Player* player) { Audio_SetBaseSfxReverb(0); D_ctx_80161A94[0] = gGoldRingCount[0]; if (gCurrentLevel == LEVEL_VENOM_ANDROSS) { - if (1) {} - if (1) {} - if (1) {} - if (1) {} - if (1) {} D_ctx_80177C94 = gGoldRingCount[0]; } - if (D_ctx_8017837C != 4) { - if (D_ctx_8017837C != 7) { - gDrawMode = DRAW_NONE; - } else if (gCurrentLevel == LEVEL_TRAINING) { - gGameState = GSTATE_MENU; - gNextGameStateTimer = 2; - gOptionMenuStatus = OPTION_WAIT; - gDrawMode = DRAW_NONE; - D_game_80161A34 = 7; - D_ctx_80178410 = 0; - } else { - if ((gCurrentLevel == LEVEL_SECTOR_X) || (gCurrentLevel == LEVEL_METEO)) { - gLevelStage = 0; - } - if (gLifeCount[gPlayerNum] < 0) { - gNextGameState = GSTATE_GAME_OVER; - D_ctx_80161A94[0] = 0; + switch (D_ctx_8017837C) { + case 7: + if (gCurrentLevel == LEVEL_TRAINING) { + gGameState = GSTATE_MENU; + gNextGameStateTimer = 2; + gOptionMenuStatus = OPTION_WAIT; + gDrawMode = DRAW_NONE; + D_game_80161A34 = 7; + D_ctx_80178410 = 0; } else { - gPlayState = PLAY_INIT; + if ((gCurrentLevel == LEVEL_SECTOR_X) || (gCurrentLevel == LEVEL_METEO)) { + gLevelStage = 0; + } + if (gLifeCount[gPlayerNum] < 0) { + gNextGameState = GSTATE_GAME_OVER; + D_ctx_80161A94[0] = 0; + } else { + gPlayState = PLAY_INIT; + } + gBombCount[gPlayerNum] = 3; + gLaserStrength[gPlayerNum] = LASERS_SINGLE; + gLoadLevelObjects = true; + gDrawMode = DRAW_NONE; } - gBombCount[gPlayerNum] = 3; - gLaserStrength[gPlayerNum] = LASERS_SINGLE; - D_ctx_80178488 = true; + break; + case 4: + gNextGameState = GSTATE_MAP; + D_game_80161A34 = 7; gDrawMode = DRAW_NONE; - } - } else { - gNextGameState = GSTATE_MAP; - D_game_80161A34 = 7; - gDrawMode = DRAW_NONE; + break; + default: + gDrawMode = DRAW_NONE; + break; } if (1) {} } @@ -5572,7 +5571,7 @@ void Player_Update1(Player* player) { Math_SmoothStepToF(&player->unk_09C, sp1C8, 1.0f, 10.0f, 0.0f); if (player->form == FORM_ARWING) { Math_SmoothStepToF(&player->unk_194, player->unk_190, 0.5f, 5.0f, 0.0f); - if (player->unk_2B4 && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3)) { + if (player->unk_2B4 && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { player->unk_190 = 0.5f; } else { player->unk_190 = 1.0f; @@ -5590,14 +5589,14 @@ void func_play_800B56BC(Player* player) { f32 temp; gCsCamEyeX = (player->pos.x - player->unk_0AC) * player->unk_148; - if (((player->form == FORM_ARWING) && (player->state_1C8 == PLAYERSTATE_1C8_3)) || - (player->state_1C8 == PLAYERSTATE_1C8_5)) { + if (((player->form == FORM_ARWING) && (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE)) || + (player->state_1C8 == PLAYERSTATE_1C8_U_TURN)) { gCsCamEyeY = (player->pos.y - player->unk_0B0) * player->unk_148; } var_fv1 = gInputPress->stick_x; var_fv0 = -gInputPress->stick_y; - if ((player->state_1C8 != PLAYERSTATE_1C8_3) || (player->unk_4DC != 0)) { + if ((player->state_1C8 != PLAYERSTATE_1C8_ACTIVE) || (player->unk_4DC != 0)) { var_fv0 = 0.0f; var_fv1 = 0; } @@ -5636,24 +5635,24 @@ void func_play_800B56BC(Player* player) { if (player->unk_4DC != 0) { gCsCamEyeZ += 200.0f; gCsCamAtY = (player->pos.y - player->unk_0B0) * 0.9f; - Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, 0.1f, 8.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, 0.1f, 8.0f, 0.0f); Math_SmoothStepToF(&player->unk_018, 0.2f, 1.0f, 0.05f, 0.0f); } else { - Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, 0.2f, 20.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, 0.2f, 20.0f, 0.0f); Math_SmoothStepToF(&player->unk_018, 1.0f, 1.0f, 0.05f, 0.0f); } gCsCamAtY += player->unk_0B0 + (D_800D2F58 * 0.5f); - Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, player->unk_014, 1000.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, player->unk_018, 1000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, player->unk_014, 1000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, player->unk_018, 1000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, player->unk_014, 1000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, player->unk_014, 1000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, player->unk_018, 1000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, player->unk_014, 1000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, player->unk_018, 1000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, player->unk_014, 1000.0f, 0.0f); Math_SmoothStepToF(&player->unk_014, 1.0f, 1.0f, 0.05f, 0.0f); temp = -player->unk_0EC; if (gLevelType == LEVELTYPE_PLANET) { - Math_SmoothStepToF(&player->unk_034, temp * 0.3f, 0.1f, 1.5f, 0.0f); + Math_SmoothStepToF(&player->camRoll, temp * 0.3f, 0.1f, 1.5f, 0.0f); } else if (gLevelType == LEVELTYPE_SPACE) { - Math_SmoothStepToF(&player->unk_034, temp * 0.2f, 0.1f, 1.5f, 0.0f); + Math_SmoothStepToF(&player->camRoll, temp * 0.2f, 0.1f, 1.5f, 0.0f); } } @@ -5664,8 +5663,8 @@ void func_play_800B5D30(Player* player, s32 arg1) { s32 pad2; s32 pad3; - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + player->unk_134) * M_DTOR * 0.75f, 0); - Matrix_RotateX(gCalcMatrix, (player->unk_0E4 + player->unk_134) * M_DTOR * 0.75f, 1); + Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + player->unk_134) * M_DTOR * 0.75f, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, (player->unk_0E4 + player->unk_134) * M_DTOR * 0.75f, MTXF_APPLY); sp4C.x = 0; sp4C.y = 0; sp4C.z = -1000.0f; @@ -5676,21 +5675,21 @@ void func_play_800B5D30(Player* player, s32 arg1) { gCsCamAtX = player->pos.x + sp40.x; gCsCamAtY = player->pos.y + player->unk_080 + sp40.y; gCsCamAtZ = player->unk_138 + D_ctx_80177D20 + sp40.z; - Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, player->unk_014, 100.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, player->unk_014, 100.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, player->unk_014, 50.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, player->unk_014, 100.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, player->unk_014, 100.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, player->unk_014, 100.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, player->unk_014, 100.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, player->unk_014, 100.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, player->unk_014, 50.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, player->unk_014, 100.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, player->unk_014, 100.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, player->unk_014, 100.0f, 0.0f); Math_SmoothStepToF(&player->unk_014, 1.0f, 1.0f, 0.05f, 0); - player->unk_034 = -(player->unk_0F8 + player->unk_0F0); + player->camRoll = -(player->unk_0F8 + player->unk_0F0); if (arg1 != 0) { - player->camEye.x = gCsCamEyeX; - player->camEye.y = gCsCamEyeY; - player->camEye.z = gCsCamEyeZ; - player->camAt.x = gCsCamAtX; - player->camAt.y = gCsCamAtY; - player->camAt.z = gCsCamAtZ; + player->cam.eye.x = gCsCamEyeX; + player->cam.eye.y = gCsCamEyeY; + player->cam.eye.z = gCsCamEyeZ; + player->cam.at.x = gCsCamAtX; + player->cam.at.y = gCsCamAtY; + player->cam.at.z = gCsCamAtZ; } } @@ -5707,7 +5706,7 @@ void func_play_800B5FBC(Player* player, s32 playerNum, bool arg2) { if (((var_v0 & gGameFrameCount) == (gPlayerNum * 32)) || arg2) { for (i = 0; i < 100; i++) { playerNum = RAND_INT(3.9f); - if ((gPlayer[playerNum].state_1C8 != PLAYERSTATE_1C8_13) && !gPlayerInactive[playerNum]) { + if ((gPlayer[playerNum].state_1C8 != PLAYERSTATE_1C8_VS_STANDBY) && !gPlayerInactive[playerNum]) { break; } } @@ -5715,7 +5714,7 @@ void func_play_800B5FBC(Player* player, s32 playerNum, bool arg2) { playerNum = 0; } player->unk_288 = playerNum + 1; - Matrix_RotateY(gCalcMatrix, gPlayer[playerNum].unk_114 * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, gPlayer[playerNum].unk_114 * M_DTOR, MTXF_NEW); switch (gPlayer[playerNum].form) { case FORM_ARWING: sp58.x = 300.0f; @@ -5735,30 +5734,30 @@ void func_play_800B5FBC(Player* player, s32 playerNum, bool arg2) { } sp58.y = 0.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp58, &sp4C); - player->camEye.x = gPlayer[playerNum].pos.x + sp4C.x; - player->camEye.y = gPlayer[playerNum].pos.y + 50.0f; - player->camEye.z = gPlayer[playerNum].unk_138 + sp4C.z; + player->cam.eye.x = gPlayer[playerNum].pos.x + sp4C.x; + player->cam.eye.y = gPlayer[playerNum].pos.y + 50.0f; + player->cam.eye.z = gPlayer[playerNum].unk_138 + sp4C.z; } - player->camAt.x = gPlayer[playerNum].pos.x; - player->camAt.y = gPlayer[playerNum].pos.y; - player->camAt.z = gPlayer[playerNum].unk_138; + player->cam.at.x = gPlayer[playerNum].pos.x; + player->cam.at.y = gPlayer[playerNum].pos.y; + player->cam.at.z = gPlayer[playerNum].unk_138; switch (gPlayer[playerNum].form) { case FORM_ARWING: - player->camEye.x += gPlayer[playerNum].vel.x * 0.5f; - player->camEye.z += gPlayer[playerNum].vel.z * 0.5f; + player->cam.eye.x += gPlayer[playerNum].vel.x * 0.5f; + player->cam.eye.z += gPlayer[playerNum].vel.z * 0.5f; break; case FORM_LANDMASTER: - player->camEye.x += gPlayer[playerNum].vel.x * 0.7f; - player->camEye.z += gPlayer[playerNum].vel.z * 0.7f; + player->cam.eye.x += gPlayer[playerNum].vel.x * 0.7f; + player->cam.eye.z += gPlayer[playerNum].vel.z * 0.7f; break; case FORM_ON_FOOT: - player->camEye.x += gPlayer[playerNum].vel.x * 0.7f; - player->camEye.z += gPlayer[playerNum].vel.z * 0.7f; - player->camEye.y = gPlayer[playerNum].unk_068 + 20.0f; - player->camAt.y = gPlayer[playerNum].unk_068 + 20.0f; + player->cam.eye.x += gPlayer[playerNum].vel.x * 0.7f; + player->cam.eye.z += gPlayer[playerNum].vel.z * 0.7f; + player->cam.eye.y = gPlayer[playerNum].unk_068 + 20.0f; + player->cam.at.y = gPlayer[playerNum].unk_068 + 20.0f; break; } - Math_SmoothStepToF(&player->unk_034, 0.0f, 0.05f, 5.0f, 0.00001f); + Math_SmoothStepToF(&player->camRoll, 0.0f, 0.05f, 5.0f, 0.00001f); } void func_play_800B63BC(Player* player, s32 arg1) { @@ -5775,8 +5774,8 @@ void func_play_800B63BC(Player* player, s32 arg1) { f32 atY; f32 atZ; - Matrix_RotateY(gCalcMatrix, (player->unk_114 + (player->unk_134 * 0.2f)) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, player->unk_134 * 0.2f * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, (player->unk_114 + (player->unk_134 * 0.2f)) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, player->unk_134 * 0.2f * M_DTOR, MTXF_APPLY); sp74.x = 0.0f; sp74.y = 0.0f; if (player->cockpitView != 0) { @@ -5804,7 +5803,7 @@ void func_play_800B63BC(Player* player, s32 arg1) { var_fv0 = (player->unk_4DC != 0) ? 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_5) { + if (player->state_1C8 == PLAYERSTATE_1C8_U_TURN) { atY = player->pos.y; } atZ = player->pos.z; @@ -5817,25 +5816,25 @@ void func_play_800B63BC(Player* player, s32 arg1) { eyeZ += sp68.z; atX += sp68.x; atZ += sp68.z; - if (player->state_1C8 == PLAYERSTATE_1C8_3) { - Math_SmoothStepToF(&player->camEye.x, eyeX, player->unk_014, 30000.0f, 0); - Math_SmoothStepToF(&player->camEye.y, eyeY, player->unk_014, 30000.0f, 0); - Math_SmoothStepToF(&player->camEye.z, eyeZ, player->unk_014, 30000.0f, 0); - Math_SmoothStepToF(&player->unk_034, player->unk_0E8 * -0.3f, 0.1f, 1.0f, 0); + if (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) { + Math_SmoothStepToF(&player->cam.eye.x, eyeX, player->unk_014, 30000.0f, 0); + Math_SmoothStepToF(&player->cam.eye.y, eyeY, player->unk_014, 30000.0f, 0); + Math_SmoothStepToF(&player->cam.eye.z, eyeZ, player->unk_014, 30000.0f, 0); + Math_SmoothStepToF(&player->camRoll, player->unk_0E8 * -0.3f, 0.1f, 1.0f, 0); Math_SmoothStepToF(&player->unk_014, 0.2f, 0.1f, 0.005f, 0.0f); } - Math_SmoothStepToF(&player->camAt.x, atX, player->unk_01C, 30000.0f, 0); - Math_SmoothStepToF(&player->camAt.y, atY, player->unk_018, 30000.0f, 0); - Math_SmoothStepToF(&player->camAt.z, atZ, player->unk_01C, 30000.0f, 0); + Math_SmoothStepToF(&player->cam.at.x, atX, player->unk_01C, 30000.0f, 0); + Math_SmoothStepToF(&player->cam.at.y, atY, player->unk_018, 30000.0f, 0); + Math_SmoothStepToF(&player->cam.at.z, atZ, player->unk_01C, 30000.0f, 0); Math_SmoothStepToF(&player->unk_018, 0.2f, 0.1f, 0.005f, 0); Math_SmoothStepToF(&player->unk_01C, 1.0f, 0.1f, 0.005f, 0); if (arg1 != 0) { - player->camEye.x = eyeX; - player->camEye.y = eyeY; - player->camEye.z = eyeZ; - player->camAt.x = atX; - player->camAt.y = atY; - player->camAt.z = atZ; + player->cam.eye.x = eyeX; + player->cam.eye.y = eyeY; + player->cam.eye.z = eyeZ; + player->cam.at.x = atX; + player->cam.at.y = atY; + player->cam.at.z = atZ; } } @@ -5846,10 +5845,10 @@ void func_play_800B6848(Player* player, s32 arg1) { f32 sp40; f32 sp3C; - Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, 0); - Matrix_RotateZ(gCalcMatrix, player->unk_0EC * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, (player->unk_114 + (player->unk_134 * 0.2f)) * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, player->unk_134 * 0.2f * M_DTOR, 1); + Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, MTXF_NEW); + Matrix_RotateZ(gCalcMatrix, player->unk_0EC * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->unk_114 + (player->unk_134 * 0.2f)) * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, player->unk_134 * 0.2f * M_DTOR, MTXF_APPLY); sp54.x = 0.0f; if (player->cockpitView) { sp54.y = 150.0f; @@ -5868,9 +5867,9 @@ void func_play_800B6848(Player* player, s32 arg1) { sp40 = player->pos.y + sp48.y - (player->unk_02C * 0.6f); sp3C = player->pos.z + sp48.z; - player->camAt.x = player->pos.x + player->unk_134; - player->camAt.y = player->pos.y + 60.0f + player->unk_02C + player->unk_134; - player->camAt.z = player->pos.z; + player->cam.at.x = player->pos.x + player->unk_134; + player->cam.at.y = player->pos.y + 60.0f + player->unk_02C + player->unk_134; + player->cam.at.z = player->pos.z; Math_SmoothStepToF(&player->unk_028, 2.0f * player->unk_0E8, 0.05f, 2.0f, 0.02f); sp54.x = -player->unk_028; sp54.y = 0.0f; @@ -5878,16 +5877,16 @@ void func_play_800B6848(Player* player, s32 arg1) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48); sp44 += sp48.x; sp3C += sp48.z; - player->camAt.x += sp48.x; - player->camAt.z += sp48.z; - Math_SmoothStepToF(&player->camEye.x, sp44, 0.1f, 200.0f, 0.001f); - Math_SmoothStepToF(&player->camEye.y, sp40, 0.1f, 200.0f, 0.001f); - Math_SmoothStepToF(&player->camEye.z, sp3C, 0.1f, 200.0f, 0.001f); - Math_SmoothStepToF(&player->unk_034, player->unk_12C * -0.1f, 0.1f, 1.0f, 0.01f); + player->cam.at.x += sp48.x; + player->cam.at.z += sp48.z; + Math_SmoothStepToF(&player->cam.eye.x, sp44, 0.1f, 200.0f, 0.001f); + Math_SmoothStepToF(&player->cam.eye.y, sp40, 0.1f, 200.0f, 0.001f); + Math_SmoothStepToF(&player->cam.eye.z, sp3C, 0.1f, 200.0f, 0.001f); + Math_SmoothStepToF(&player->camRoll, player->unk_12C * -0.1f, 0.1f, 1.0f, 0.01f); if (arg1 != 0) { - player->camEye.x = sp44; - player->camEye.y = sp40; - player->camEye.z = sp3C; + player->cam.eye.x = sp44; + player->cam.eye.y = sp40; + player->cam.eye.z = sp3C; } } @@ -5896,10 +5895,10 @@ void func_play_800B6BFC(Player* player, s32 arg1) { Vec3f sp58; Vec3f sp4C; - Matrix_RotateX(gCalcMatrix, player->unk_0FC * M_DTOR, 0); - Matrix_RotateZ(gCalcMatrix, player->unk_100 * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, (player->unk_114 + (player->unk_134 * 0.02f)) * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, player->unk_134 * 0.02f * M_DTOR, 1); + Matrix_RotateX(gCalcMatrix, player->unk_0FC * M_DTOR, MTXF_NEW); + Matrix_RotateZ(gCalcMatrix, player->unk_100 * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->unk_114 + (player->unk_134 * 0.02f)) * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, player->unk_134 * 0.02f * M_DTOR, MTXF_APPLY); sp64.x = 0.0f; sp64.y = 20.0f; sp64.z = 60.0f - player->unk_08C; @@ -5910,10 +5909,10 @@ void func_play_800B6BFC(Player* player, s32 arg1) { sp4C.y = (player->unk_068 + 10.0f + sp58.y) - (player->unk_02C * 0.8f); sp4C.z = player->pos.z + sp58.z; - player->camAt.x = player->pos.x + player->unk_134 * 0.1f; - player->camAt.y = player->unk_068 + (player->pos.y - player->unk_068) * 0.4f + 18.0f + player->unk_02C * 1.5f + - player->unk_134 * 0.1f; - player->camAt.z = player->pos.z; + player->cam.at.x = player->pos.x + player->unk_134 * 0.1f; + player->cam.at.y = player->unk_068 + (player->pos.y - player->unk_068) * 0.4f + 18.0f + player->unk_02C * 1.5f + + player->unk_134 * 0.1f; + player->cam.at.z = player->pos.z; Math_SmoothStepToF(&player->unk_028, player->unk_0E8 * (player->unk_0D0 + 5.0f) * 0.04f, 0.05f, 2.0f, 0.02f); sp64.x = -player->unk_028; @@ -5922,17 +5921,17 @@ void func_play_800B6BFC(Player* player, s32 arg1) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp64, &sp58); sp4C.x += sp58.x; sp4C.z += sp58.z; - player->camAt.x += sp58.x; - player->camAt.z += sp58.z; + player->cam.at.x += sp58.x; + player->cam.at.z += sp58.z; - Math_SmoothStepToF(&player->camEye.x, sp4C.x, 0.3f, 65.0f, 0.001f); - Math_SmoothStepToF(&player->camEye.y, sp4C.y, 0.3f, 65.0f, 0.001f); - Math_SmoothStepToF(&player->camEye.z, sp4C.z, 0.3f, 65.0f, 0.001f); - Math_SmoothStepToF(&player->unk_034, player->unk_12C * -0.1f, 0.1f, 1.0f, 0.01f); + Math_SmoothStepToF(&player->cam.eye.x, sp4C.x, 0.3f, 65.0f, 0.001f); + Math_SmoothStepToF(&player->cam.eye.y, sp4C.y, 0.3f, 65.0f, 0.001f); + Math_SmoothStepToF(&player->cam.eye.z, sp4C.z, 0.3f, 65.0f, 0.001f); + Math_SmoothStepToF(&player->camRoll, player->unk_12C * -0.1f, 0.1f, 1.0f, 0.01f); if (arg1 != 0) { - player->camEye.x = sp4C.x; - player->camEye.y = sp4C.y; - player->camEye.z = sp4C.z; + player->cam.eye.x = sp4C.x; + player->cam.eye.y = sp4C.y; + player->cam.eye.z = sp4C.z; } } @@ -5955,14 +5954,15 @@ void func_play_800B6F50(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 ar } var_ft5 = 0.0f; if (gCurrentLevel == LEVEL_UNK_15) { - var_ft5 = gPlayer[0].camEye.y * 0.03f; + var_ft5 = 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; sp20 = D_ctx_80178420; D_ctx_80178420 = Math_ModF(sp34, 480.0f); D_ctx_80178424 = Math_ModF(sp30, 360.0f); - if ((gGameState == GSTATE_PLAY) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2) && (gCurrentLevel == LEVEL_METEO)) { + if ((gGameState == GSTATE_PLAY) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && + (gCurrentLevel == LEVEL_METEO)) { if (fabsf(D_ctx_80178420 - sp20) < 50.0f) { D_bg_8015F96C = 0.0f; if (fabsf(D_ctx_80178420 - sp20) > 3.0f) { @@ -5986,9 +5986,9 @@ void func_play_800B7184(Player* player, s32 arg1) { } } -void Player_Update2(Player* player) { +void Player_UpdateCamera(Player* player) { switch (player->state_1C8) { - case PLAYERSTATE_1C8_3: + case PLAYERSTATE_1C8_ACTIVE: switch (gLevelMode) { case LEVELMODE_ON_RAILS: if (player->form == FORM_ARWING) { @@ -6011,25 +6011,25 @@ void Player_Update2(Player* player) { break; } break; - case PLAYERSTATE_1C8_5: - player->unk_034 -= player->unk_034 * 0.1f; + case PLAYERSTATE_1C8_U_TURN: + player->camRoll -= player->camRoll * 0.1f; func_play_800B7184(player, 0); break; - case PLAYERSTATE_1C8_4: + case PLAYERSTATE_1C8_DOWN: if ((gLevelMode == LEVELMODE_ON_RAILS) && (player->form == FORM_ARWING)) { - player->camEye.x += (player->pos.x - player->camEye.x) * 0.1f; - player->camEye.y += (player->pos.y - player->camEye.y) * 0.1f; - player->camEye.z -= player->vel.z * 0.2f; + player->cam.eye.x += (player->pos.x - player->cam.eye.x) * 0.1f; + player->cam.eye.y += (player->pos.y - player->cam.eye.y) * 0.1f; + player->cam.eye.z -= player->vel.z * 0.2f; if (player->unk_1D0 != 0) { - player->camEye.z -= player->vel.z * 0.2f; + player->cam.eye.z -= player->vel.z * 0.2f; } - player->camAt.x += (player->pos.x - player->camAt.x) * 0.1f; - player->camAt.y += (player->pos.y - player->camAt.y) * 0.1f; - player->camAt.z = player->unk_138 + D_ctx_80177D20 - 1.0f; + player->cam.at.x += (player->pos.x - player->cam.at.x) * 0.1f; + player->cam.at.y += (player->pos.y - player->cam.at.y) * 0.1f; + player->cam.at.z = player->unk_138 + D_ctx_80177D20 - 1.0f; } break; - case PLAYERSTATE_1C8_6: - case PLAYERSTATE_1C8_7: + case PLAYERSTATE_1C8_NEXT: + case PLAYERSTATE_1C8_LEVEL_COMPLETE: break; } } @@ -6039,7 +6039,7 @@ void func_play_800B73E0(Player* player) { Vec3f sp38; f32 pad; - if ((gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_2)) { + if ((gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) { D_ctx_801784D4 = D_ctx_801784C8 = D_ctx_801784C8 = D_ctx_801784FC = D_ctx_801784C8 = 110.0f; if (gGameFrameCount & 0x20) { D_ctx_801784D4 = D_ctx_801784C8 = D_ctx_801784C8 = D_ctx_801784FC = D_ctx_801784C8 = 90.0f; @@ -6096,14 +6096,14 @@ void func_play_800B73E0(Player* player) { D_ctx_80178570 = gLight1R; D_ctx_80178574 = gLight1G; D_ctx_80178578 = gLight1B; - pad = player->unk_034; - Matrix_RotateZ(gCalcMatrix, M_DTOR * pad, 0); - Matrix_RotateX(gCalcMatrix, -player->unk_05C, 1); - Matrix_RotateY(gCalcMatrix, player->unk_058, 1); + pad = player->camRoll; + Matrix_RotateZ(gCalcMatrix, M_DTOR * pad, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -player->camPitch, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, player->camYaw, MTXF_APPLY); Matrix_Push(&gCalcMatrix); - Matrix_RotateX(gCalcMatrix, M_DTOR * D_ctx_801784B8, 1); - Matrix_RotateY(gCalcMatrix, M_DTOR * D_ctx_801784BC, 1); - Matrix_RotateZ(gCalcMatrix, M_DTOR * D_ctx_801784C0, 1); + Matrix_RotateX(gCalcMatrix, M_DTOR * D_ctx_801784B8, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, M_DTOR * D_ctx_801784BC, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, M_DTOR * D_ctx_801784C0, MTXF_APPLY); sp44.x = 0.0f; sp44.y = 0.0f; sp44.z = 100.0f; @@ -6112,9 +6112,9 @@ void func_play_800B73E0(Player* player) { gLight1y = sp38.y; gLight1z = sp38.z; Matrix_Pop(&gCalcMatrix); - Matrix_RotateX(gCalcMatrix, M_DTOR * D_ctx_801784EC, 1); - Matrix_RotateY(gCalcMatrix, M_DTOR * D_ctx_801784F0, 1); - Matrix_RotateZ(gCalcMatrix, M_DTOR * D_ctx_801784F4, 1); + Matrix_RotateX(gCalcMatrix, M_DTOR * D_ctx_801784EC, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, M_DTOR * D_ctx_801784F0, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, M_DTOR * D_ctx_801784F4, MTXF_APPLY); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); gLight2x = sp38.x; gLight2y = sp38.y; @@ -6151,8 +6151,8 @@ void Play_UpdateLevel(void) { } break; case LEVEL_VENOM_2: - if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7) && (gLevelStage == 2)) { - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_7; + if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) && (gLevelStage == 2)) { + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].unk_1D0 = 0; gPlayer[0].unk_234 = 1; gPlayer[0].pos.z = 15000.0f; @@ -6182,7 +6182,7 @@ void Play_UpdateLevel(void) { case LEVEL_SECTOR_X: if (gLevelStage == 1) { gBlurAlpha = 128; - if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) { + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) { Math_SmoothStepToF(&D_bg_8015F960, 0.0f, 1.0f, 1.0f, 0.0f); } else { Math_SmoothStepToF(&D_bg_8015F960, 128.0f, 1.0f, 1.0f, 0.0f); @@ -6190,7 +6190,7 @@ void Play_UpdateLevel(void) { } if ((gCurrentLevel == LEVEL_SECTOR_X) && (gLevelStage == 0) && (gRingPassCount == 4)) { gRingPassCount++; - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_8; + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ENTER_WARP_ZONE; gPlayer[0].unk_1D0 = 0; gOverlayStage = 1; AUDIO_PLAY_SFX(0x1900602A, gDefaultSfxSource, 0); @@ -6213,7 +6213,7 @@ void Play_UpdateLevel(void) { for (D_ctx_80177CE8; D_ctx_80177CE8 >= 10.0f; D_ctx_80177CE8 -= 10.0f) { Texture_Scroll(D_SO_6005710, 32, 32, 1); } - if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_6) { + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_NEXT) { Texture_Scroll(D_SO_6005710, 32, 32, 1); } Texture_Mottle(D_SO_601E1E8, D_SO_6020F60, 3); @@ -6243,7 +6243,7 @@ void Play_UpdateLevel(void) { #endif } - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) && ((gGameFrameCount & cycleMask) == 0)) { + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && ((gGameFrameCount & cycleMask) == 0)) { gPlayer[0].shields--; if (gPlayer[0].shields <= 0) { gPlayer[0].shields = 0; @@ -6258,7 +6258,7 @@ void Play_UpdateLevel(void) { } shields = MIN(gPlayer[0].shields, 255); func_8001D1C8(shields, heightParam); - if (((gGameFrameCount % 8) == 0) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7)) { + if (((gGameFrameCount % 8) == 0) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) { Solar_8019E8B8(RAND_FLOAT_CENTERED(6000.0f), -80.0f, gPlayer[0].unk_138 + (RAND_FLOAT(2000.0f) + -6000.0f), RAND_FLOAT(10.0f) + 20.0f); // check @@ -6273,12 +6273,12 @@ void Play_UpdateLevel(void) { for (D_ctx_80177CE8; D_ctx_80177CE8 >= 20.0f; D_ctx_80177CE8 -= 20.0f) { Texture_Scroll(D_ZO_602C2CC, 32, 32, 1); } - if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_6) { + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_NEXT) { Texture_Scroll(D_ZO_602C2CC, 32, 32, 1); } func_hud_8008C104(D_ZO_602C2CC, D_ZO_600D990); - if (func_play_800A73E4(&sp3C, &sp40, gPlayer[0].camEye.x, gPlayer[0].camEye.y, - gPlayer[0].camEye.z - D_ctx_80177D20)) { + if (func_play_800A73E4(&sp3C, &sp40, gPlayer[0].cam.eye.x, gPlayer[0].cam.eye.y, + gPlayer[0].cam.eye.z - D_ctx_80177D20)) { gLight1R = 0; gLight1G = 7; gLight1B = 10; @@ -6316,14 +6316,14 @@ void Play_Update(void) { } for (i = 0; i < gCamCount; i++) { gPlayer[i].num = gPlayerNum = i; - Player_Update1(&gPlayer[i]); + Player_Update(&gPlayer[i]); } Object_Update(); PlayerShot_Update(); BonusText_Update(); for (i = 0; i < gCamCount; i++) { gPlayer[i].num = gPlayerNum = i; - Player_Update2(&gPlayer[i]); + Player_UpdateCamera(&gPlayer[i]); } gCameraShakeY = 0.0f; if (gCameraShake != 0) { @@ -6404,8 +6404,8 @@ void Play_Main(void) { } func_play_800B86A4(&gPlayer[0].pos.z); func_play_800B86A4(&gPlayer[0].unk_138); - gPlayer[0].camEye.z += 15000.0f; - gPlayer[0].camAt.z += 15000.0f; + gPlayer[0].cam.eye.z += 15000.0f; + gPlayer[0].cam.at.z += 15000.0f; gPlayer[0].unk_144 = gPlayer[0].unk_140 = D_ctx_80177D08 = D_ctx_80177D20 = 0.0f; } if (gPlayState != PLAY_PAUSE) { @@ -6434,7 +6434,7 @@ void Play_Main(void) { gDrawMode = DRAW_PLAY; Play_Update(); if ((gControllerPress[gMainController].button & START_BUTTON) && - (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_2) && + (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && gSaveFile.save.data.planet[D_800D2F6C[gCurrentLevel]].normalClear) { Audio_ClearVoice(); Audio_SetBaseSfxReverb(0); @@ -6463,7 +6463,7 @@ void Play_Main(void) { case PLAY_PAUSE: if (!gVersusMode) { if ((gControllerPress[gMainController].button & R_TRIG) && (gPlayer[0].form != FORM_BLUE_MARINE) && - (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_0)) { + (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_STANDBY)) { if (gShowCrosshairs[0] = 1 - gShowCrosshairs[0]) { AUDIO_PLAY_SFX(0x49000019, gDefaultSfxSource, 4); } else { diff --git a/src/engine/fox_radio.c b/src/engine/fox_radio.c index bd2d8ee9..0a7938bf 100644 --- a/src/engine/fox_radio.c +++ b/src/engine/fox_radio.c @@ -744,7 +744,7 @@ void func_radio_800BB5D0(void) { } if ((gActors[var_v1].obj.status != OBJ_ACTIVE) && (gGameFrameCount & 4) && - (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) && (D_ctx_801782A4 != 2) && (D_ctx_801782A4 != 3) && + (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (D_ctx_801782A4 != 2) && (D_ctx_801782A4 != 3) && (D_ctx_801782A4 != 1000)) { RCP_SetupDL(&gMasterDisp, 0x4C); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255); @@ -881,8 +881,8 @@ void func_radio_800BC040(void) { ((s32) D_ctx_80177D68 == RCID_PEPPY)) { Matrix_Push(&gGfxMatrix); RCP_SetupDL_36(); - Matrix_Translate(gGfxMatrix, -150.0f, -115.0f, -443.0f, 1); - Matrix_Scale(gGfxMatrix, 0.068f, 0.068f, 1.0f, 1); + Matrix_Translate(gGfxMatrix, -150.0f, -115.0f, -443.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.068f, 0.068f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gPlayerNum = 0; Matrix_Pop(&gGfxMatrix); diff --git a/src/engine/fox_std_lib.c b/src/engine/fox_std_lib.c index d4a08d11..21654459 100644 --- a/src/engine/fox_std_lib.c +++ b/src/engine/fox_std_lib.c @@ -168,10 +168,10 @@ void Animation_DrawLimb(s32 mode, Limb* limb, Limb** skeleton, Vec3f* jointTable override = overrideLimbDraw(limbIndex - 1, &dList, &trans, &rot, data); } if (!override) { - Matrix_Translate(gCalcMatrix, trans.x, trans.y, trans.z, 1); - Matrix_RotateZ(gCalcMatrix, rot.z * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, rot.y * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, rot.x * M_DTOR, 1); + Matrix_Translate(gCalcMatrix, trans.x, trans.y, trans.z, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, rot.z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, rot.x * M_DTOR, MTXF_APPLY); if (dList != NULL) { if (mode >= 2) { Matrix_MultVec3f(gCalcMatrix, &origin, &pos); @@ -179,7 +179,7 @@ void Animation_DrawLimb(s32 mode, Limb* limb, Limb** skeleton, Vec3f* jointTable func_edisplay_8005F670(&pos); } } - Matrix_Mult(gGfxMatrix, gCalcMatrix, 1); + Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, dList); } @@ -231,12 +231,12 @@ void Animation_DrawSkeleton(s32 mode, Limb** skeletonSegment, Vec3f* jointTable, override = overrideLimbDraw(rootIndex - 1, &dList, &baseTrans, &baseRot, data); } if (override == 0) { - Matrix_Translate(gCalcMatrix, baseTrans.x, baseTrans.y, baseTrans.z, 1); - Matrix_RotateZ(gCalcMatrix, baseRot.z * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, baseRot.y * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, baseRot.x * M_DTOR, 1); + Matrix_Translate(gCalcMatrix, baseTrans.x, baseTrans.y, baseTrans.z, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, baseRot.z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, baseRot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, baseRot.x * M_DTOR, MTXF_APPLY); if (dList != NULL) { - Matrix_Mult(gGfxMatrix, gCalcMatrix, 1); + Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, dList); } @@ -250,7 +250,7 @@ void Animation_DrawSkeleton(s32 mode, Limb** skeletonSegment, Vec3f* jointTable, } Matrix_Pop(&gCalcMatrix); if (mode >= 2) { - Matrix_Mult(gGfxMatrix, gCalcMatrix, 1); + Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); } } @@ -366,19 +366,19 @@ void Animation_GetSkeletonBoundingBox(Limb** skeletonSegment, Animation* animati } else { var_t6 = frameData[(s16) key[1].z]; } - Matrix_RotateZ(gGfxMatrix, (((s32) var_t6 * 360.0f) / 65536.0f) * M_DTOR, 0); + Matrix_RotateZ(gGfxMatrix, (((s32) var_t6 * 360.0f) / 65536.0f) * M_DTOR, MTXF_NEW); if (frame < (s16) key[1].yLen) { var_t6 = frameData[(s16) key[1].y + frame]; } else { var_t6 = frameData[(s16) key[1].y]; } - Matrix_RotateY(gGfxMatrix, (((s32) var_t6 * 360.0f) / 65536.0f) * M_DTOR, 1); + Matrix_RotateY(gGfxMatrix, (((s32) var_t6 * 360.0f) / 65536.0f) * M_DTOR, MTXF_APPLY); if (frame < (s16) key[1].xLen) { var_t6 = frameData[(s16) key[1].x + frame]; } else { var_t6 = frameData[(s16) key[1].x]; } - Matrix_RotateX(gGfxMatrix, (((s32) var_t6 * 360.0f) / 65536.0f) * M_DTOR, 1); + Matrix_RotateX(gGfxMatrix, (((s32) var_t6 * 360.0f) / 65536.0f) * M_DTOR, MTXF_APPLY); vtxFound = false; if (limb->dList != NULL) { Animation_FindBoundingBox(limb->dList, 8192, min, max, &vtxFound, &vtxCount, &vtxList); @@ -522,8 +522,8 @@ s32 Math_PursueVec3f(Vec3f* pos, Vec3f* target, Vec3f* rot, f32 stepSize, f32 sc targetRotX = Math_RadToDeg(-Math_Atan2F(diff.y, sqrtf(SQ(diff.x) + SQ(diff.z)))); Math_SmoothStepToAngle(&rot->y, targetRotY, scaleTurn, maxTurn, 0.0f); Math_SmoothStepToAngle(&rot->x, targetRotX, scaleTurn, maxTurn, 0.0f); - Matrix_RotateY(&worldTransform, rot->y * M_DTOR, 0); - Matrix_RotateX(&worldTransform, rot->x * M_DTOR, 1); + Matrix_RotateY(&worldTransform, rot->y * M_DTOR, MTXF_NEW); + Matrix_RotateX(&worldTransform, rot->x * M_DTOR, MTXF_APPLY); localStep.z = stepSize; Matrix_MultVec3fNoTranslate(&worldTransform, &localStep, &worldStep); @@ -712,8 +712,8 @@ void Graphics_FillRectangle(Gfx** gfxPtr, s32 ulx, s32 uly, s32 lrx, s32 lry, u8 void Math_Vec3fFromAngles(Vec3f* step, f32 xRot, f32 yRot, f32 stepsize) { Vec3f sp1C; - Matrix_RotateY(gCalcMatrix, yRot * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, xRot * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, yRot * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, xRot * M_DTOR, MTXF_APPLY); sp1C.x = sp1C.y = 0.0f; sp1C.z = stepsize; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp1C, step); diff --git a/src/engine/fox_tank.c b/src/engine/fox_tank.c index 73872a9d..b5fb01ad 100644 --- a/src/engine/fox_tank.c +++ b/src/engine/fox_tank.c @@ -37,7 +37,7 @@ void func_tank_80043280(u16* text0, u16* text1, f32 zRot) { Matrix_Push(&gCalcMatrix); text0 = SEGMENTED_TO_VIRTUAL(text0); text1 = SEGMENTED_TO_VIRTUAL(text1); - Matrix_RotateZ(gCalcMatrix, M_DTOR * zRot, 0); + Matrix_RotateZ(gCalcMatrix, M_DTOR * zRot, MTXF_NEW); sp74.z = 0.0f; for (i = 0, dy = 0.0f; i < 32; i++, dy += 1.0f) { for (j = 0, dx = 0.0f; j < 32; j++, dx += 1.0f) { @@ -65,7 +65,7 @@ void func_tank_80043468(Player* player) { sp54 = ((player->pos.x - player->unk_0AC) * player->unk_148) + (player->unk_0E8 * 0.5f); sp48 = sp54 + (player->unk_0E8 * -5.0f); - sp40 = player->camEye.z - 1000.0f; + sp40 = player->cam.eye.z - 1000.0f; sp54 += player->unk_0AC; sp48 += player->unk_0AC; if (player->unk_1D4 != 0) { @@ -102,15 +102,15 @@ void func_tank_80043468(Player* player) { } } if (player->vel.y < -20.0f) { - Math_SmoothStepToF(&player->camAt.y, sp4C - 100.0f, 0.2f, player->unk_014 * 20.0f, 0.00001f); + Math_SmoothStepToF(&player->cam.at.y, sp4C - 100.0f, 0.2f, player->unk_014 * 20.0f, 0.00001f); } - Math_SmoothStepToF(&player->camEye.x, sp54, 0.1f, player->unk_014 * 20.0f, 0.00001f); - Math_SmoothStepToF(&player->camEye.y, sp50, 0.1f, player->unk_014 * 7.0f, 0.00001f); - Math_SmoothStepToF(&player->camAt.y, sp4C, 0.1f, player->unk_014 * 7.0f, 0.00001f); - Math_SmoothStepToF(&player->camAt.x, sp48, 0.1f, player->unk_014 * 20.0f, 0.00001f); - Math_SmoothStepToF(&player->camEye.z, 200.0f, 0.1f, player->unk_014 * 10.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.z, sp40, 1.0f, player->unk_014 * 10.0f, 0.0f); - Math_SmoothStepToF(&player->unk_034, player->unk_0EC * -0.4f, 0.1f, 1.0f, 0.01f); + Math_SmoothStepToF(&player->cam.eye.x, sp54, 0.1f, player->unk_014 * 20.0f, 0.00001f); + Math_SmoothStepToF(&player->cam.eye.y, sp50, 0.1f, player->unk_014 * 7.0f, 0.00001f); + Math_SmoothStepToF(&player->cam.at.y, sp4C, 0.1f, player->unk_014 * 7.0f, 0.00001f); + Math_SmoothStepToF(&player->cam.at.x, sp48, 0.1f, player->unk_014 * 20.0f, 0.00001f); + Math_SmoothStepToF(&player->cam.eye.z, 200.0f, 0.1f, player->unk_014 * 10.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.z, sp40, 1.0f, player->unk_014 * 10.0f, 0.0f); + Math_SmoothStepToF(&player->camRoll, player->unk_0EC * -0.4f, 0.1f, 1.0f, 0.01f); Math_SmoothStepToF(&player->unk_014, 1.0f, 1.0f, 0.1f, 0.0f); } @@ -155,13 +155,13 @@ void func_tank_80043B18(Player* player) { Vec3f sp3C; f32 sp38; - Matrix_Translate(gCalcMatrix, 0.0f, player->unk_18C + 30.0f, 0, 0); - Matrix_RotateY(gCalcMatrix, player->unk_114 * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, (player->unk_0EC + player->unk_0F0) * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, -player->unk_12C * M_DTOR, 1); - Matrix_Translate(gCalcMatrix, 0.0f, -30.0f, 0, 1); + Matrix_Translate(gCalcMatrix, 0.0f, player->unk_18C + 30.0f, 0, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, player->unk_114 * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, (player->unk_0EC + player->unk_0F0) * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -player->unk_12C * M_DTOR, MTXF_APPLY); + Matrix_Translate(gCalcMatrix, 0.0f, -30.0f, 0, MTXF_APPLY); sp48.y = 0.0f; sp48.z = -20.0f; sp38 = player->unk_114; @@ -247,7 +247,7 @@ void func_tank_800441C8(Player* player, f32* hitboxData, f32 xPos, f32 yPos, f32 f32 y; f32 z; - Matrix_RotateY(gCalcMatrix, -yRot * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, -yRot * M_DTOR, MTXF_NEW); count = *hitboxData++; if (count != 0) { for (i = 0; i < count; i++, hitboxData += 6) { @@ -490,7 +490,7 @@ void func_tank_80044868(Player* player) { if ((gCurrentLevel == LEVEL_TITANIA) && (gBossActive == 0)) { func_tank_80043280(D_landmaster_3005EA8, D_TI_6009BB8, gGameFrameCount * -55.0f); } - if ((gCurrentLevel == LEVEL_MACBETH) && (player->state_1C8 == PLAYERSTATE_1C8_7)) { + if ((gCurrentLevel == LEVEL_MACBETH) && (player->state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { func_tank_80043280(D_landmaster_3005EA8, *D_Tex_800DACB8, gGameFrameCount * -55.0f); } } @@ -760,7 +760,7 @@ void func_tank_800460E0(Player* player, f32* hitboxData, f32 arg2, f32 arg3, f32 s32 i; s32 count; - Matrix_RotateY(gCalcMatrix, -arg6 * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, -arg6 * M_DTOR, MTXF_NEW); count = *hitboxData++; if (count != 0) { for (i = 0; i < count; i++, hitboxData += 6) { @@ -829,7 +829,7 @@ void func_tank_8004641C(Player* player, s32 arg1, f32 arg2, f32 arg3, f32 arg4, Vec3f sp58; Vec3f sp4C; - Matrix_RotateY(gCalcMatrix, -arg6 * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, -arg6 * M_DTOR, MTXF_NEW); sp70.x = player->vel.x; sp70.y = player->vel.y; sp70.z = player->vel.z; @@ -997,26 +997,26 @@ s32 func_tank_80046E40(Player* player, f32* hitboxData, s32* index, f32 xPos, f3 for (i = 0; i < spB4; i++, hitboxData += 6) { spA0 = 0; if (hitboxData[0] == HITBOX_ROTATED) { - Matrix_RotateZ(gCalcMatrix, -hitboxData[3] * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -hitboxData[1] * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -hitboxData[2] * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, -zRot * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, -xRot * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -yRot * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, -hitboxData[3] * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -hitboxData[1] * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -hitboxData[2] * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -zRot * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, -xRot * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -yRot * M_DTOR, MTXF_APPLY); hitboxData += 4; spA0 = 1.0f; } else { if (hitboxData[0] == HITBOX_SHADOW) { hitboxData++; } - Matrix_RotateZ(gCalcMatrix, -zRot * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -xRot * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -yRot * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, -zRot * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -xRot * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -yRot * M_DTOR, MTXF_APPLY); } if ((arg9 != 0) || (argA != 0) || (argB != 0)) { - Matrix_RotateZ(gCalcMatrix, -argB * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, -arg9 * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -argA * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, -argB * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, -arg9 * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -argA * M_DTOR, MTXF_APPLY); } if ((yRot == 0.0f) && (zRot == 0.0f) && (xRot == 0.0f) && (spA0 == 0)) { var_fv0 = player->hit1.x; @@ -1294,7 +1294,7 @@ void func_tank_80047FBC(Player* player) { if (!(D_800C9F08 & 1)) { Math_SmoothStepToF(&player->unk_0EC, -((player->vel.z / 5.0f) * 4.0f), 0.4f, 8.0f, 0.01f); if (player->unk_0EC >= 3.0f) { - if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7) { + if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) { AUDIO_PLAY_SFX(0x19000065, player->sfxSource, 0); } D_800C9F08 |= 1; diff --git a/src/engine/fox_versus.c b/src/engine/fox_versus.c index 4c13e2e3..7b128683 100644 --- a/src/engine/fox_versus.c +++ b/src/engine/fox_versus.c @@ -321,7 +321,7 @@ void func_versus_800BDE44(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); for (i = 0; i < 4; i++) { - if ((gPlayer[i].state_1C8 == PLAYERSTATE_1C8_3) || (gPlayer[i].state_1C8 == PLAYERSTATE_1C8_5)) { + if ((gPlayer[i].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[i].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { if ((D_ctx_80177C30[i] != D_80178808[i]) || (D_80178810[i])) { D_80178810[i] += 4; if (D_80178810[i] > 15) { @@ -643,7 +643,7 @@ s32 func_versus_800BF17C(void) { for (i = 0, ret = 0; i < 4; i++) { D_80178850[i] = 1; - if (gPlayer[i].state_1C8 != PLAYERSTATE_1C8_13) { + if (gPlayer[i].state_1C8 != PLAYERSTATE_1C8_VS_STANDBY) { D_80178850[i] = 0; D_801787F8[i] = 150; continue; @@ -767,7 +767,7 @@ void func_versus_800BF750(void) { RCP_SetupDL(&gMasterDisp, 0x4C); for (i = 0; i < 4; i++) { - if (gPlayer[i].state_1C8 != PLAYERSTATE_1C8_3) { + if (gPlayer[i].state_1C8 != PLAYERSTATE_1C8_ACTIVE) { continue; } for (j = 0, temp = 0; j < 4; j++) { @@ -790,10 +790,10 @@ s32 func_versus_800BF9AC(void) { switch (D_ctx_801778AC) { case 0: for (i = 0, var_a3 = 0; i < 4; i++) { - if (gPlayer[i].state_1C8 != PLAYERSTATE_1C8_13) { + if (gPlayer[i].state_1C8 != PLAYERSTATE_1C8_VS_STANDBY) { D_801787A8 = i; } - if (gPlayer[i].state_1C8 == PLAYERSTATE_1C8_13) { + if (gPlayer[i].state_1C8 == PLAYERSTATE_1C8_VS_STANDBY) { var_a3 += 1; } } @@ -828,7 +828,7 @@ s32 func_versus_800BF9AC(void) { if (gPlayer[j].unk_288 >= 0) { gPlayer[j].unk_288 = i + 1; } - gPlayer[j].state_1C8 = PLAYERSTATE_1C8_13; + gPlayer[j].state_1C8 = PLAYERSTATE_1C8_VS_STANDBY; } D_ctx_80177E74 = 1; D_801787A8 = i; @@ -837,10 +837,10 @@ s32 func_versus_800BF9AC(void) { case 1: for (i = 0, var_a3 = 0; i < 4; i++) { - if (gPlayer[i].state_1C8 != PLAYERSTATE_1C8_13) { + if (gPlayer[i].state_1C8 != PLAYERSTATE_1C8_VS_STANDBY) { D_801787A8 = i; } - if (gPlayer[i].state_1C8 == PLAYERSTATE_1C8_13) { + if (gPlayer[i].state_1C8 == PLAYERSTATE_1C8_VS_STANDBY) { var_a3 += 1; } } @@ -869,7 +869,7 @@ s32 func_versus_800BF9AC(void) { if (gPlayer[j].unk_288 >= 0) { gPlayer[j].unk_288 = i + 1; } - gPlayer[j].state_1C8 = PLAYERSTATE_1C8_13; + gPlayer[j].state_1C8 = PLAYERSTATE_1C8_VS_STANDBY; } D_ctx_80177E74 = 1; break; @@ -881,7 +881,8 @@ s32 func_versus_800BF9AC(void) { if (D_ctx_801778AC == 2) { for (i = 0; i < 4; i++) { - if ((gPlayer[i].state_1C8 == PLAYERSTATE_1C8_4) || (gPlayer[i].state_1C8 == PLAYERSTATE_1C8_13)) { + if ((gPlayer[i].state_1C8 == PLAYERSTATE_1C8_DOWN) || + (gPlayer[i].state_1C8 == PLAYERSTATE_1C8_VS_STANDBY)) { D_ctx_80177C30[i] = D_80178838[i] = D_80178808[i] = D_80178810[i] = 0; D_80178820[i] += 1; } @@ -994,7 +995,7 @@ s32 func_versus_800BF9AC(void) { gPlayer[j].unk_288 = i + 1; } - gPlayer[j].state_1C8 = PLAYERSTATE_1C8_13; + gPlayer[j].state_1C8 = PLAYERSTATE_1C8_VS_STANDBY; } D_ctx_80177E74 = 1; break; @@ -1959,7 +1960,7 @@ void func_versus_800C2244(Actor* actor) { actor->vel.y = 0.0f; } - func_360_8003088C(actor); + ActorAllRange_ApplyDamage(actor); if (actor->iwork[8]) { actor->iwork[8]--; @@ -1992,7 +1993,7 @@ void func_versus_800C26C8(void) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; actor->obj.id = 197; - Matrix_RotateY(gCalcMatrix, M_DTOR * RAND_FLOAT(360.0f), 0); + Matrix_RotateY(gCalcMatrix, M_DTOR * RAND_FLOAT(360.0f), MTXF_NEW); Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); actor->obj.pos.x = dest.x; actor->obj.pos.y = dest.y; diff --git a/src/overlays/ovl_ending/fox_end1.c b/src/overlays/ovl_ending/fox_end1.c index 2b681e9c..65b193eb 100644 --- a/src/overlays/ovl_ending/fox_end1.c +++ b/src/overlays/ovl_ending/fox_end1.c @@ -104,12 +104,12 @@ void Ending_801876A4(void) { RCP_SetupDL(&gMasterDisp, 0x3E); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 240); Matrix_Translate(gGfxMatrix, D_ending_80196D08[i].pos.x, D_ending_80196D08[i].pos.y, D_ending_80196D08[i].pos.z, - 1); + MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_ending_80196D08[i].scale.x + 4.0f, D_ending_80196D08[i].scale.y + 4.0f, - D_ending_80196D08[i].scale.z + 4.0f, 1); - Matrix_RotateY(gGfxMatrix, D_ending_80196D08[i].rot.y * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, (D_ending_80196D08[i].rot.x + 5.0f) * M_DTOR, 1); - Matrix_RotateZ(gGfxMatrix, D_ending_80196D08[i].rot.z * M_DTOR, 1); + D_ending_80196D08[i].scale.z + 4.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, D_ending_80196D08[i].rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, (D_ending_80196D08[i].rot.x + 5.0f) * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, D_ending_80196D08[i].rot.z * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_TITLE_6041070); Matrix_Pop(&gGfxMatrix); @@ -133,18 +133,18 @@ void Ending_80187860(s32 arg0, s32 arg1) { case 2: if (1) {} Matrix_Translate(gGfxMatrix, D_ending_80196D08[i].pos.x, D_ending_80196D08[i].pos.y - 10.0f, - D_ending_80196D08[i].pos.z, 1); + D_ending_80196D08[i].pos.z, MTXF_APPLY); break; default: Matrix_Translate(gGfxMatrix, D_ending_80196D08[i].pos.x, D_ending_80196D08[i].pos.y, - D_ending_80196D08[i].pos.z, 1); + D_ending_80196D08[i].pos.z, MTXF_APPLY); break; } Matrix_Scale(gGfxMatrix, D_ending_80196D08[i].scale.x, D_ending_80196D08[i].scale.y, - D_ending_80196D08[i].scale.z, 1); - Matrix_RotateY(gGfxMatrix, D_ending_80196D08[i].rot.y * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, D_ending_80196D08[i].rot.x * M_DTOR, 1); - Matrix_RotateZ(gGfxMatrix, D_ending_80196D08[i].rot.z * M_DTOR, 1); + D_ending_80196D08[i].scale.z, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, D_ending_80196D08[i].rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, D_ending_80196D08[i].rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, D_ending_80196D08[i].rot.z * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if ((arg1 != 0) && (gCsFrameCount >= 394)) { switch (i) { @@ -452,11 +452,11 @@ void Ending_801888F4(void) { Matrix_Push(&gGfxMatrix); RCP_SetupDL(&gMasterDisp, D_ending_80196D08[sp29C].setupDL); Matrix_Translate(gGfxMatrix, D_ending_80196D08[sp29C].pos.x, D_ending_80196D08[sp29C].pos.y, - D_ending_80196D08[sp29C].pos.z, 1); + D_ending_80196D08[sp29C].pos.z, MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_ending_80196D08[sp29C].scale.x, D_ending_80196D08[sp29C].scale.y, - D_ending_80196D08[sp29C].scale.z, 1); - Matrix_RotateY(gGfxMatrix, D_ending_80196D08[sp29C].rot.y * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, D_ending_80196D08[sp29C].rot.x * M_DTOR, 1); + D_ending_80196D08[sp29C].scale.z, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, D_ending_80196D08[sp29C].rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, D_ending_80196D08[sp29C].rot.x * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); switch (D_ending_80196D08[sp29C].unk_38) { @@ -822,9 +822,9 @@ void Ending_8018A024(void) { src.x = src.y = 0.0f; src.z = -100.0f; - Matrix_RotateX(gCalcMatrix, D_ctx_801784D0 * M_DTOR, 0); - Matrix_RotateY(gCalcMatrix, D_ctx_801784D4 * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, D_ctx_801784D8 * M_DTOR, 1); + Matrix_RotateX(gCalcMatrix, D_ctx_801784D0 * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, D_ctx_801784D4 * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, D_ctx_801784D8 * M_DTOR, MTXF_APPLY); Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); gLight1x = dest.x; gLight1y = dest.y; @@ -868,12 +868,12 @@ void Ending_8018A2A8(void) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, D_ending_80196D08[i].prim.r, D_ending_80196D08[i].prim.g, D_ending_80196D08[i].prim.b, D_ending_80196D08[i].prim.a); Matrix_Translate(gGfxMatrix, D_ending_80196D08[i].pos.x, D_ending_80196D08[i].pos.y, D_ending_80196D08[i].pos.z, - 1); + MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_ending_80196D08[i].scale.x, D_ending_80196D08[i].scale.y, - D_ending_80196D08[i].scale.z, 1); - Matrix_RotateY(gGfxMatrix, D_ending_80196D08[i].rot.y * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, D_ending_80196D08[i].rot.x * M_DTOR, 1); - Matrix_RotateZ(gGfxMatrix, D_ending_80196D08[i].rot.z * M_DTOR, 1); + D_ending_80196D08[i].scale.z, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, D_ending_80196D08[i].rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, D_ending_80196D08[i].rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, D_ending_80196D08[i].rot.z * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if (D_ending_80196D08[i].skeleton == NULL) { @@ -1079,7 +1079,7 @@ void Ending_8018A96C(void) { void Ending_8018AAC4(void) { Matrix_Push(&gGfxMatrix); Matrix_LookAt(gGfxMatrix, gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ, 0.0f, 100.0f, 0.0f, - 0); + MTXF_NEW); switch (D_ending_80196D00) { case 1: @@ -1646,8 +1646,8 @@ bool Ending_8018BCB0(void) { break; } - Matrix_RotateY(gCalcMatrix, (gActors[i].unk_0F4.y + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -(gActors[i].unk_0F4.x * M_DTOR), 1); + Matrix_RotateY(gCalcMatrix, (gActors[i].unk_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(gActors[i].unk_0F4.x * M_DTOR), MTXF_APPLY); sp78.x = 0.0f; sp78.y = 0.0f; @@ -1735,15 +1735,15 @@ void Ending_8018C21C(void) { if (gCsFrameCount < 780) { Matrix_Push(&gGfxMatrix); RCP_SetupDL(&gMasterDisp, 0x11); - Matrix_Translate(gGfxMatrix, 0.0f, -1200.0f, -6000.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, -1200.0f, -6000.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_END_700C8B0); Matrix_Pop(&gGfxMatrix); } else { Matrix_Push(&gGfxMatrix); RCP_SetupDL(&gMasterDisp, 0x11); - Matrix_Translate(gGfxMatrix, -2000.0f, -3000.0f, 3000.0f, 1); - Matrix_RotateY(gGfxMatrix, 110.0f * M_DTOR, 1); + Matrix_Translate(gGfxMatrix, -2000.0f, -3000.0f, 3000.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, 110.0f * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_END_700C8B0); Matrix_Pop(&gGfxMatrix); @@ -1759,11 +1759,11 @@ void Ending_8018C21C(void) { if (gActors[i].state == 0) { RCP_SetupDL(&gMasterDisp, 0x17); Matrix_Translate(gGfxMatrix, gActors[i].obj.pos.x, gActors[i].obj.pos.y, gActors[i].obj.pos.z, - 1); - Matrix_Scale(gGfxMatrix, gActors[i].scale, gActors[i].scale, gActors[i].scale, 1); - Matrix_RotateY(gGfxMatrix, gActors[i].obj.rot.y * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, gActors[i].obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gGfxMatrix, gActors[i].obj.rot.z * M_DTOR, 1); + MTXF_APPLY); + Matrix_Scale(gGfxMatrix, gActors[i].scale, gActors[i].scale, gActors[i].scale, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, gActors[i].obj.rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, gActors[i].obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, gActors[i].obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if (gGreatFoxIntact) { @@ -1782,17 +1782,17 @@ void Ending_8018C21C(void) { Matrix_Push(&gGfxMatrix); scale = &sp10C[gGameFrameCount % 2]; Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, var_s1->x, var_s1->y, var_s1->z, 1); - Matrix_Scale(gGfxMatrix, scale->x, scale->y, scale->z, 1); - Matrix_RotateX(gGfxMatrix, M_PI / 2, 1); + Matrix_Translate(gGfxMatrix, var_s1->x, var_s1->y, var_s1->z, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, scale->x, scale->y, scale->z, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_END_7010970); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); scale = &spF4[gGameFrameCount % 2]; - Matrix_Translate(gGfxMatrix, var_s1->x, var_s1->y, var_s1->z - 60.0f, 1); - Matrix_Scale(gGfxMatrix, scale->x, scale->y, scale->z, 1); - Matrix_RotateX(gGfxMatrix, M_PI / 2, 1); + Matrix_Translate(gGfxMatrix, var_s1->x, var_s1->y, var_s1->z - 60.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, scale->x, scale->y, scale->z, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_END_7010970); Matrix_Pop(&gGfxMatrix); @@ -1800,11 +1800,11 @@ void Ending_8018C21C(void) { } else { RCP_SetupDL(&gMasterDisp, 0x17); Matrix_Translate(gGfxMatrix, gActors[i].obj.pos.x, gActors[i].obj.pos.y, gActors[i].obj.pos.z, - 1); - Matrix_Scale(gGfxMatrix, gActors[i].scale, gActors[i].scale, gActors[i].scale, 1); - Matrix_RotateY(gGfxMatrix, gActors[i].obj.rot.y * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, gActors[i].obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gGfxMatrix, gActors[i].obj.rot.z * M_DTOR, 1); + MTXF_APPLY); + Matrix_Scale(gGfxMatrix, gActors[i].scale, gActors[i].scale, gActors[i].scale, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, gActors[i].obj.rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, gActors[i].obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, gActors[i].obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); func_demo_800515C4(); } @@ -1812,42 +1812,45 @@ void Ending_8018C21C(void) { case 1: RCP_SetupDL(&gMasterDisp, 0x17); - Matrix_Translate(gGfxMatrix, gActors[i].obj.pos.x, gActors[i].obj.pos.y, gActors[i].obj.pos.z, 1); - Matrix_Scale(gGfxMatrix, gActors[i].scale, gActors[i].scale, gActors[i].scale, 1); - Matrix_RotateY(gGfxMatrix, gActors[i].obj.rot.y * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, gActors[i].obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gGfxMatrix, gActors[i].obj.rot.z * M_DTOR, 1); + Matrix_Translate(gGfxMatrix, gActors[i].obj.pos.x, gActors[i].obj.pos.y, gActors[i].obj.pos.z, + MTXF_APPLY); + Matrix_Scale(gGfxMatrix, gActors[i].scale, gActors[i].scale, gActors[i].scale, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, gActors[i].obj.rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, gActors[i].obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, gActors[i].obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_END_700F240); break; case 2: RCP_SetupDL(&gMasterDisp, 0x17); - Matrix_Translate(gGfxMatrix, gActors[i].obj.pos.x, gActors[i].obj.pos.y, gActors[i].obj.pos.z, 1); - Matrix_Scale(gGfxMatrix, gActors[i].scale, gActors[i].scale, gActors[i].scale, 1); - Matrix_RotateY(gGfxMatrix, gActors[i].obj.rot.y * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, gActors[i].obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gGfxMatrix, gActors[i].obj.rot.z * M_DTOR, 1); + Matrix_Translate(gGfxMatrix, gActors[i].obj.pos.x, gActors[i].obj.pos.y, gActors[i].obj.pos.z, + MTXF_APPLY); + Matrix_Scale(gGfxMatrix, gActors[i].scale, gActors[i].scale, gActors[i].scale, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, gActors[i].obj.rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, gActors[i].obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, gActors[i].obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_END_700F320); break; case 3: RCP_SetupDL(&gMasterDisp, 0x17); - Matrix_Translate(gGfxMatrix, gActors[i].obj.pos.x, gActors[i].obj.pos.y, gActors[i].obj.pos.z, 1); - Matrix_Scale(gGfxMatrix, gActors[i].scale, gActors[i].scale, gActors[i].scale, 1); - Matrix_RotateY(gGfxMatrix, gActors[i].obj.rot.y * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, gActors[i].obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gGfxMatrix, gActors[i].obj.rot.z * M_DTOR, 1); + Matrix_Translate(gGfxMatrix, gActors[i].obj.pos.x, gActors[i].obj.pos.y, gActors[i].obj.pos.z, + MTXF_APPLY); + Matrix_Scale(gGfxMatrix, gActors[i].scale, gActors[i].scale, gActors[i].scale, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, gActors[i].obj.rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, gActors[i].obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, gActors[i].obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_D00B880); Matrix_Push(&gGfxMatrix); RCP_SetupDL(&gMasterDisp, 0x31); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 64); gDPSetEnvColor(gMasterDisp++, 0, 255, 0, 64); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -66.0f, 1); - Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 1.0f, 1); - Matrix_RotateX(gGfxMatrix, M_PI / 2, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -66.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 1.0f, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_END_7010970); Matrix_Pop(&gGfxMatrix); @@ -1875,18 +1878,18 @@ void Ending_8018C21C(void) { break; } Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 70.0f, 0.0f, -100.0f, 1); - Matrix_Scale(gGfxMatrix, spE4, 1.0f, 200.0f, 1); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -17.5f, 1); - Matrix_RotateX(gGfxMatrix, M_PI / 2, 1); + Matrix_Translate(gGfxMatrix, 70.0f, 0.0f, -100.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, spE4, 1.0f, 200.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -17.5f, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_END_700C620); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, -70.0f, 0.0f, -100.0f, 1); - Matrix_Scale(gGfxMatrix, spE4, 1.0f, 200.0f, 1); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -17.5f, 1); - Matrix_RotateX(gGfxMatrix, M_PI / 2, 1); + Matrix_Translate(gGfxMatrix, -70.0f, 0.0f, -100.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, spE4, 1.0f, 200.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -17.5f, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_END_700C620); Matrix_Pop(&gGfxMatrix); diff --git a/src/overlays/ovl_ending/fox_end2.c b/src/overlays/ovl_ending/fox_end2.c index b0ee19ff..5f5532fb 100644 --- a/src/overlays/ovl_ending/fox_end2.c +++ b/src/overlays/ovl_ending/fox_end2.c @@ -122,9 +122,9 @@ void Ending_8018D4BC(s32 arg0, AssetInfo* asset) { Vec3f src; Vec3f dest; - Matrix_RotateY(gCalcMatrix, M_DTOR * D_ending_801985F0.y, 0); - Matrix_RotateX(gCalcMatrix, M_DTOR * D_ending_801985F0.x, 1); - Matrix_RotateZ(gCalcMatrix, M_DTOR * D_ending_801985F0.z, 1); + Matrix_RotateY(gCalcMatrix, M_DTOR * D_ending_801985F0.y, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, M_DTOR * D_ending_801985F0.x, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, M_DTOR * D_ending_801985F0.z, MTXF_APPLY); src.x = asset->unk_18.x; src.y = asset->unk_18.y; @@ -324,10 +324,10 @@ void Ending_8018E1B8(u32 arg0, AssetInfo* asset) { Matrix_Translate(gGfxMatrix, asset->unk_18.x + (arg0 - asset->unk_0C) * asset->unk_3C.x, asset->unk_18.y + (arg0 - asset->unk_0C) * asset->unk_3C.y, - asset->unk_18.z + (arg0 - asset->unk_0C) * asset->unk_3C.z, 1); + asset->unk_18.z + (arg0 - asset->unk_0C) * asset->unk_3C.z, MTXF_APPLY); Matrix_Scale(gGfxMatrix, asset->unk_30.x + (arg0 % 3) * 0.01f, asset->unk_30.y + (arg0 % 3) * 0.01f, - asset->unk_30.z + (arg0 % 3) * 0.01f, 1); + asset->unk_30.z + (arg0 % 3) * 0.01f, MTXF_APPLY); temp = __sinf(arg0 * 0.1f + asset->unk_70); @@ -336,27 +336,30 @@ void Ending_8018E1B8(u32 arg0, AssetInfo* asset) { Matrix_RotateY(gGfxMatrix, M_DTOR * (-D_ending_801985F0.y + asset->unk_24.y + temp * asset->unk_54.y + (arg0 - asset->unk_0C) * asset->unk_48.y), - 1); + MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_DTOR * (-D_ending_801985F0.x + asset->unk_24.x + temp * asset->unk_54.x + (arg0 - asset->unk_0C) * asset->unk_48.x), - 1); + MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, M_DTOR * (D_ending_801985F0.z + asset->unk_24.z + temp * asset->unk_54.z + (arg0 - asset->unk_0C) * asset->unk_48.z), - 1); + MTXF_APPLY); break; default: - Matrix_RotateY( - gGfxMatrix, - M_DTOR * (asset->unk_24.y + temp * asset->unk_54.y + (arg0 - asset->unk_0C) * asset->unk_48.y), 1); - Matrix_RotateX( - gGfxMatrix, - M_DTOR * (asset->unk_24.x + temp * asset->unk_54.x + (arg0 - asset->unk_0C) * asset->unk_48.x), 1); - Matrix_RotateZ( - gGfxMatrix, - M_DTOR * (asset->unk_24.z + temp * asset->unk_54.z + (arg0 - asset->unk_0C) * asset->unk_48.z), 1); + Matrix_RotateY(gGfxMatrix, + M_DTOR * + (asset->unk_24.y + temp * asset->unk_54.y + (arg0 - asset->unk_0C) * asset->unk_48.y), + MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, + M_DTOR * + (asset->unk_24.x + temp * asset->unk_54.x + (arg0 - asset->unk_0C) * asset->unk_48.x), + MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, + M_DTOR * + (asset->unk_24.z + temp * asset->unk_54.z + (arg0 - asset->unk_0C) * asset->unk_48.z), + MTXF_APPLY); break; } @@ -380,7 +383,7 @@ void Ending_8018E7B8(u32 arg0, AssetInfo* asset) { Matrix_Translate(gGfxMatrix, asset->unk_18.x + (arg0 - asset->unk_0C) * asset->unk_3C.x, asset->unk_18.y + (arg0 - asset->unk_0C) * asset->unk_3C.y, - asset->unk_18.z + (arg0 - asset->unk_0C) * asset->unk_3C.z, 1); + asset->unk_18.z + (arg0 - asset->unk_0C) * asset->unk_3C.z, MTXF_APPLY); temp = __sinf(arg0 * 0.1f + asset->unk_70); @@ -389,32 +392,35 @@ void Ending_8018E7B8(u32 arg0, AssetInfo* asset) { Matrix_RotateY(gGfxMatrix, M_DTOR * (-D_ending_801985F0.y + asset->unk_24.y + temp * asset->unk_54.y + (arg0 - asset->unk_0C) * asset->unk_48.y), - 1); + MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_DTOR * (-D_ending_801985F0.x + asset->unk_24.x + temp * asset->unk_54.x + (arg0 - asset->unk_0C) * asset->unk_48.x), - 1); + MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, M_DTOR * (D_ending_801985F0.z + asset->unk_24.z + temp * asset->unk_54.z + (arg0 - asset->unk_0C) * asset->unk_48.z), - 1); + MTXF_APPLY); break; default: - Matrix_RotateY( - gGfxMatrix, - M_DTOR * (asset->unk_24.y + temp * asset->unk_54.y + (arg0 - asset->unk_0C) * asset->unk_48.y), 1); - Matrix_RotateX( - gGfxMatrix, - M_DTOR * (asset->unk_24.x + temp * asset->unk_54.x + (arg0 - asset->unk_0C) * asset->unk_48.x), 1); - Matrix_RotateZ( - gGfxMatrix, - M_DTOR * (asset->unk_24.z + temp * asset->unk_54.z + (arg0 - asset->unk_0C) * asset->unk_48.z), 1); + Matrix_RotateY(gGfxMatrix, + M_DTOR * + (asset->unk_24.y + temp * asset->unk_54.y + (arg0 - asset->unk_0C) * asset->unk_48.y), + MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, + M_DTOR * + (asset->unk_24.x + temp * asset->unk_54.x + (arg0 - asset->unk_0C) * asset->unk_48.x), + MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, + M_DTOR * + (asset->unk_24.z + temp * asset->unk_54.z + (arg0 - asset->unk_0C) * asset->unk_48.z), + MTXF_APPLY); break; } Matrix_Scale(gGfxMatrix, asset->unk_30.x + (arg0 % 3) * 0.5f, asset->unk_30.y + (arg0 % 3) * 0.5f, - asset->unk_30.z + (arg0 % 3) * 0.5f, 1); + asset->unk_30.z + (arg0 % 3) * 0.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -434,18 +440,21 @@ void Ending_8018EDB8(u32 arg0, AssetInfo* asset) { Matrix_Translate(gGfxMatrix, asset->unk_18.x + (arg0 - asset->unk_0C) * asset->unk_3C.x, asset->unk_18.y + (arg0 - asset->unk_0C) * asset->unk_3C.y, - asset->unk_18.z + (arg0 - asset->unk_0C) * asset->unk_3C.z, 1); + asset->unk_18.z + (arg0 - asset->unk_0C) * asset->unk_3C.z, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, asset->unk_30.x, asset->unk_30.y, asset->unk_30.z, 1); + Matrix_Scale(gGfxMatrix, asset->unk_30.x, asset->unk_30.y, asset->unk_30.z, MTXF_APPLY); temp = __sinf(arg0 * 0.1f + asset->unk_70); Matrix_RotateY(gGfxMatrix, - M_DTOR * (asset->unk_24.y + temp * asset->unk_54.y + (arg0 - asset->unk_0C) * asset->unk_48.y), 1); + M_DTOR * (asset->unk_24.y + temp * asset->unk_54.y + (arg0 - asset->unk_0C) * asset->unk_48.y), + MTXF_APPLY); Matrix_RotateX(gGfxMatrix, - M_DTOR * (asset->unk_24.x + temp * asset->unk_54.x + (arg0 - asset->unk_0C) * asset->unk_48.x), 1); + M_DTOR * (asset->unk_24.x + temp * asset->unk_54.x + (arg0 - asset->unk_0C) * asset->unk_48.x), + MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, - M_DTOR * (asset->unk_24.z + temp * asset->unk_54.z + (arg0 - asset->unk_0C) * asset->unk_48.z), 1); + M_DTOR * (asset->unk_24.z + temp * asset->unk_54.z + (arg0 - asset->unk_0C) * asset->unk_48.z), + MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -467,18 +476,21 @@ void Ending_8018F2A8(u32 arg0, AssetInfo* asset) { Matrix_Translate(gGfxMatrix, asset->unk_18.x + (arg0 - asset->unk_0C) * asset->unk_3C.x, asset->unk_18.y + (arg0 - asset->unk_0C) * asset->unk_3C.y, - asset->unk_18.z + (arg0 - asset->unk_0C) * asset->unk_3C.z, 1); + asset->unk_18.z + (arg0 - asset->unk_0C) * asset->unk_3C.z, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, asset->unk_30.x, asset->unk_30.y, asset->unk_30.z, 1); + Matrix_Scale(gGfxMatrix, asset->unk_30.x, asset->unk_30.y, asset->unk_30.z, MTXF_APPLY); temp = __sinf(arg0 * 0.1f + asset->unk_70); Matrix_RotateY(gGfxMatrix, - M_DTOR * (asset->unk_24.y + temp * asset->unk_54.y + (arg0 - asset->unk_0C) * asset->unk_48.y), 1); + M_DTOR * (asset->unk_24.y + temp * asset->unk_54.y + (arg0 - asset->unk_0C) * asset->unk_48.y), + MTXF_APPLY); Matrix_RotateX(gGfxMatrix, - M_DTOR * (asset->unk_24.x + temp * asset->unk_54.x + (arg0 - asset->unk_0C) * asset->unk_48.x), 1); + M_DTOR * (asset->unk_24.x + temp * asset->unk_54.x + (arg0 - asset->unk_0C) * asset->unk_48.x), + MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, - M_DTOR * (asset->unk_24.z + temp * asset->unk_54.z + (arg0 - asset->unk_0C) * asset->unk_48.z), 1); + M_DTOR * (asset->unk_24.z + temp * asset->unk_54.z + (arg0 - asset->unk_0C) * asset->unk_48.z), + MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -503,9 +515,9 @@ void Ending_8018F64C(u32 arg0, AssetInfo* asset) { Matrix_Translate(gGfxMatrix, asset->unk_18.x + (arg0 - asset->unk_0C) * asset->unk_3C.x, asset->unk_18.y + (arg0 - asset->unk_0C) * asset->unk_3C.y, - asset->unk_18.z + (arg0 - asset->unk_0C) * asset->unk_3C.z, 1); + asset->unk_18.z + (arg0 - asset->unk_0C) * asset->unk_3C.z, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, asset->unk_30.x, asset->unk_30.y, asset->unk_30.z, 1); + Matrix_Scale(gGfxMatrix, asset->unk_30.x, asset->unk_30.y, asset->unk_30.z, MTXF_APPLY); temp = __sinf(arg0 * 0.1f + asset->unk_70); @@ -514,27 +526,30 @@ void Ending_8018F64C(u32 arg0, AssetInfo* asset) { Matrix_RotateY(gGfxMatrix, M_DTOR * (-D_ending_801985F0.y + asset->unk_24.y + temp * asset->unk_54.y + (arg0 - asset->unk_0C) * asset->unk_48.y), - 1); + MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_DTOR * (-D_ending_801985F0.x + asset->unk_24.x + temp * asset->unk_54.x + (arg0 - asset->unk_0C) * asset->unk_48.x), - 1); + MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, M_DTOR * (D_ending_801985F0.z + asset->unk_24.z + temp * asset->unk_54.z + (arg0 - asset->unk_0C) * asset->unk_48.z), - 1); + MTXF_APPLY); break; default: - Matrix_RotateY( - gGfxMatrix, - M_DTOR * (asset->unk_24.y + temp * asset->unk_54.y + (arg0 - asset->unk_0C) * asset->unk_48.y), 1); - Matrix_RotateX( - gGfxMatrix, - M_DTOR * (asset->unk_24.x + temp * asset->unk_54.x + (arg0 - asset->unk_0C) * asset->unk_48.x), 1); - Matrix_RotateZ( - gGfxMatrix, - M_DTOR * (asset->unk_24.z + temp * asset->unk_54.z + (arg0 - asset->unk_0C) * asset->unk_48.z), 1); + Matrix_RotateY(gGfxMatrix, + M_DTOR * + (asset->unk_24.y + temp * asset->unk_54.y + (arg0 - asset->unk_0C) * asset->unk_48.y), + MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, + M_DTOR * + (asset->unk_24.x + temp * asset->unk_54.x + (arg0 - asset->unk_0C) * asset->unk_48.x), + MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, + M_DTOR * + (asset->unk_24.z + temp * asset->unk_54.z + (arg0 - asset->unk_0C) * asset->unk_48.z), + MTXF_APPLY); break; } @@ -542,9 +557,10 @@ void Ending_8018F64C(u32 arg0, AssetInfo* asset) { gSPDisplayList(gMasterDisp++, D_D009A40); RCP_SetupDL(&gMasterDisp, 0x43); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, 0.8f + (arg0 % 3) * 0.01f, 0.3f + (arg0 % 3) * 0.01f, 0.8f + (arg0 % 3) * 0.01f, 1); + Matrix_Scale(gGfxMatrix, 0.8f + (arg0 % 3) * 0.01f, 0.3f + (arg0 % 3) * 0.01f, 0.8f + (arg0 % 3) * 0.01f, + MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_END_7010970); @@ -566,9 +582,9 @@ void Ending_8018FC60(u32 arg0, AssetInfo* asset) { Matrix_Translate(gGfxMatrix, asset->unk_18.x + (arg0 - asset->unk_0C) * asset->unk_3C.x, asset->unk_18.y + (arg0 - asset->unk_0C) * asset->unk_3C.y, - asset->unk_18.z + (arg0 - asset->unk_0C) * asset->unk_3C.z, 1); + asset->unk_18.z + (arg0 - asset->unk_0C) * asset->unk_3C.z, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, asset->unk_30.x, asset->unk_30.y, asset->unk_30.z, 1); + Matrix_Scale(gGfxMatrix, asset->unk_30.x, asset->unk_30.y, asset->unk_30.z, MTXF_APPLY); temp = __sinf(arg0 * 0.1f + asset->unk_70); @@ -577,27 +593,30 @@ void Ending_8018FC60(u32 arg0, AssetInfo* asset) { Matrix_RotateY(gGfxMatrix, M_DTOR * (-D_ending_801985F0.y + asset->unk_24.y + temp * asset->unk_54.y + (arg0 - asset->unk_0C) * asset->unk_48.y), - 1); + MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_DTOR * (-D_ending_801985F0.x + asset->unk_24.x + temp * asset->unk_54.x + (arg0 - asset->unk_0C) * asset->unk_48.x), - 1); + MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, M_DTOR * (D_ending_801985F0.z + asset->unk_24.z + temp * asset->unk_54.z + (arg0 - asset->unk_0C) * asset->unk_48.z), - 1); + MTXF_APPLY); break; default: - Matrix_RotateY( - gGfxMatrix, - M_DTOR * (asset->unk_24.y + temp * asset->unk_54.y + (arg0 - asset->unk_0C) * asset->unk_48.y), 1); - Matrix_RotateX( - gGfxMatrix, - M_DTOR * (asset->unk_24.x + temp * asset->unk_54.x + (arg0 - asset->unk_0C) * asset->unk_48.x), 1); - Matrix_RotateZ( - gGfxMatrix, - M_DTOR * (asset->unk_24.z + temp * asset->unk_54.z + (arg0 - asset->unk_0C) * asset->unk_48.z), 1); + Matrix_RotateY(gGfxMatrix, + M_DTOR * + (asset->unk_24.y + temp * asset->unk_54.y + (arg0 - asset->unk_0C) * asset->unk_48.y), + MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, + M_DTOR * + (asset->unk_24.x + temp * asset->unk_54.x + (arg0 - asset->unk_0C) * asset->unk_48.x), + MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, + M_DTOR * + (asset->unk_24.z + temp * asset->unk_54.z + (arg0 - asset->unk_0C) * asset->unk_48.z), + MTXF_APPLY); break; } @@ -605,9 +624,10 @@ void Ending_8018FC60(u32 arg0, AssetInfo* asset) { gSPDisplayList(gMasterDisp++, D_D00B880); RCP_SetupDL(&gMasterDisp, 0x43); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -50.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -50.0f, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, 0.5f + (arg0 % 3) * 0.01f, 0.3f + (arg0 % 3) * 0.01f, 0.5f + (arg0 % 3) * 0.01f, 1); + Matrix_Scale(gGfxMatrix, 0.5f + (arg0 % 3) * 0.01f, 0.3f + (arg0 % 3) * 0.01f, 0.5f + (arg0 % 3) * 0.01f, + MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_END_7010970); @@ -624,18 +644,21 @@ void Ending_80190274(u32 arg0, AssetInfo* asset) { Matrix_Translate(gGfxMatrix, D_ending_801985D0.x + asset->unk_18.x + (arg0 - asset->unk_0C) * asset->unk_3C.x, D_ending_801985D0.y + asset->unk_18.y + (arg0 - asset->unk_0C) * asset->unk_3C.y, - D_ending_801985D0.z + asset->unk_18.z + (arg0 - asset->unk_0C) * asset->unk_3C.z, 1); + D_ending_801985D0.z + asset->unk_18.z + (arg0 - asset->unk_0C) * asset->unk_3C.z, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, asset->unk_30.x, asset->unk_30.y, asset->unk_30.z, 1); + Matrix_Scale(gGfxMatrix, asset->unk_30.x, asset->unk_30.y, asset->unk_30.z, MTXF_APPLY); temp = __sinf(arg0 * 0.1f + asset->unk_70); Matrix_RotateY(gGfxMatrix, - M_DTOR * (asset->unk_24.y + temp * asset->unk_54.y + (arg0 - asset->unk_0C) * asset->unk_48.y), 1); + M_DTOR * (asset->unk_24.y + temp * asset->unk_54.y + (arg0 - asset->unk_0C) * asset->unk_48.y), + MTXF_APPLY); Matrix_RotateX(gGfxMatrix, - M_DTOR * (asset->unk_24.x + temp * asset->unk_54.x + (arg0 - asset->unk_0C) * asset->unk_48.x), 1); + M_DTOR * (asset->unk_24.x + temp * asset->unk_54.x + (arg0 - asset->unk_0C) * asset->unk_48.x), + MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, - M_DTOR * (asset->unk_24.z + temp * asset->unk_54.z + (arg0 - asset->unk_0C) * asset->unk_48.z), 1); + M_DTOR * (asset->unk_24.z + temp * asset->unk_54.z + (arg0 - asset->unk_0C) * asset->unk_48.z), + MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -645,12 +668,12 @@ void Ending_80190274(u32 arg0, AssetInfo* asset) { void Ending_80190648(s32 arg0, AssetInfo* asset) { RCP_SetupDL(&gMasterDisp, asset->unk_08); - Matrix_RotateY(gGfxMatrix, M_DTOR * D_ending_801985F0.y, 0); - Matrix_RotateX(gGfxMatrix, M_DTOR * D_ending_801985F0.x, 1); - Matrix_RotateZ(gGfxMatrix, M_DTOR * D_ending_801985F0.z, 1); + Matrix_RotateY(gGfxMatrix, M_DTOR * D_ending_801985F0.y, MTXF_NEW); + Matrix_RotateX(gGfxMatrix, M_DTOR * D_ending_801985F0.x, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, M_DTOR * D_ending_801985F0.z, MTXF_APPLY); - Matrix_Translate(gGfxMatrix, asset->unk_18.x, asset->unk_18.y, asset->unk_18.z, 1); - Matrix_Scale(gGfxMatrix, asset->unk_30.x, asset->unk_30.y, asset->unk_30.z, 1); + Matrix_Translate(gGfxMatrix, asset->unk_18.x, asset->unk_18.y, asset->unk_18.z, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, asset->unk_30.x, asset->unk_30.y, asset->unk_30.z, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_END_7002120); @@ -668,9 +691,9 @@ void Ending_80190778(u32 arg0, AssetInfo* asset) { Matrix_Translate(gGfxMatrix, asset->unk_18.x + (arg0 - asset->unk_0C) * asset->unk_3C.x, asset->unk_18.y - 6.0f + (arg0 - asset->unk_0C) * asset->unk_3C.y, - asset->unk_18.z + (arg0 - asset->unk_0C) * asset->unk_3C.z, 1); + asset->unk_18.z + (arg0 - asset->unk_0C) * asset->unk_3C.z, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, asset->unk_30.x, asset->unk_30.y, asset->unk_30.z, 1); + Matrix_Scale(gGfxMatrix, asset->unk_30.x, asset->unk_30.y, asset->unk_30.z, MTXF_APPLY); temp = __sinf(arg0 * 0.2f + asset->unk_70); @@ -679,31 +702,34 @@ void Ending_80190778(u32 arg0, AssetInfo* asset) { Matrix_RotateY(gGfxMatrix, M_DTOR * (-D_ending_801985F0.y + asset->unk_24.y + temp * asset->unk_54.y + (arg0 - asset->unk_0C) * asset->unk_48.y), - 1); + MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_DTOR * (-D_ending_801985F0.x + asset->unk_24.x + temp * asset->unk_54.x + (arg0 - asset->unk_0C) * asset->unk_48.x), - 1); + MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, M_DTOR * (D_ending_801985F0.z + asset->unk_24.z + temp * asset->unk_54.z + (arg0 - asset->unk_0C) * asset->unk_48.z), - 1); + MTXF_APPLY); break; default: - Matrix_RotateY( - gGfxMatrix, - M_DTOR * (asset->unk_24.y + temp * asset->unk_54.y + (arg0 - asset->unk_0C) * asset->unk_48.y), 1); - Matrix_RotateX( - gGfxMatrix, - M_DTOR * (asset->unk_24.x + temp * asset->unk_54.x + (arg0 - asset->unk_0C) * asset->unk_48.x), 1); - Matrix_RotateZ( - gGfxMatrix, - M_DTOR * (asset->unk_24.z + temp * asset->unk_54.z + (arg0 - asset->unk_0C) * asset->unk_48.z), 1); + Matrix_RotateY(gGfxMatrix, + M_DTOR * + (asset->unk_24.y + temp * asset->unk_54.y + (arg0 - asset->unk_0C) * asset->unk_48.y), + MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, + M_DTOR * + (asset->unk_24.x + temp * asset->unk_54.x + (arg0 - asset->unk_0C) * asset->unk_48.x), + MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, + M_DTOR * + (asset->unk_24.z + temp * asset->unk_54.z + (arg0 - asset->unk_0C) * asset->unk_48.z), + MTXF_APPLY); break; } - Matrix_Translate(gGfxMatrix, 0.0f, 480.0f, 0.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 480.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -735,9 +761,9 @@ void Ending_80190CF0(u32 arg0, AssetInfo* asset) { Matrix_Translate(gGfxMatrix, asset->unk_18.x + (arg0 - asset->unk_0C) * asset->unk_3C.x, asset->unk_18.y + (arg0 - asset->unk_0C) * asset->unk_3C.y, - asset->unk_18.z + (arg0 - asset->unk_0C) * asset->unk_3C.z, 1); + asset->unk_18.z + (arg0 - asset->unk_0C) * asset->unk_3C.z, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, asset->unk_30.x, asset->unk_30.y, asset->unk_30.z, 1); + Matrix_Scale(gGfxMatrix, asset->unk_30.x, asset->unk_30.y, asset->unk_30.z, MTXF_APPLY); temp = __sinf(arg0 * 0.2f + asset->unk_70); @@ -746,27 +772,30 @@ void Ending_80190CF0(u32 arg0, AssetInfo* asset) { Matrix_RotateY(gGfxMatrix, M_DTOR * (-D_ending_801985F0.y + asset->unk_24.y + temp * asset->unk_54.y + (arg0 - asset->unk_0C) * asset->unk_48.y), - 1); + MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_DTOR * (-D_ending_801985F0.x + asset->unk_24.x + temp * asset->unk_54.x + (arg0 - asset->unk_0C) * asset->unk_48.x), - 1); + MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, M_DTOR * (D_ending_801985F0.z + asset->unk_24.z + temp * asset->unk_54.z + (arg0 - asset->unk_0C) * asset->unk_48.z), - 1); + MTXF_APPLY); break; default: - Matrix_RotateY( - gGfxMatrix, - M_DTOR * (asset->unk_24.y + temp * asset->unk_54.y + (arg0 - asset->unk_0C) * asset->unk_48.y), 1); - Matrix_RotateX( - gGfxMatrix, - M_DTOR * (asset->unk_24.x + temp * asset->unk_54.x + (arg0 - asset->unk_0C) * asset->unk_48.x), 1); - Matrix_RotateZ( - gGfxMatrix, - M_DTOR * (asset->unk_24.z + temp * asset->unk_54.z + (arg0 - asset->unk_0C) * asset->unk_48.z), 1); + Matrix_RotateY(gGfxMatrix, + M_DTOR * + (asset->unk_24.y + temp * asset->unk_54.y + (arg0 - asset->unk_0C) * asset->unk_48.y), + MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, + M_DTOR * + (asset->unk_24.x + temp * asset->unk_54.x + (arg0 - asset->unk_0C) * asset->unk_48.x), + MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, + M_DTOR * + (asset->unk_24.z + temp * asset->unk_54.z + (arg0 - asset->unk_0C) * asset->unk_48.z), + MTXF_APPLY); break; } @@ -797,18 +826,21 @@ void Ending_80191294(u32 arg0, AssetInfo* asset) { Matrix_Translate(gGfxMatrix, asset->unk_18.x + (arg0 - asset->unk_0C) * asset->unk_3C.x, asset->unk_18.y + (arg0 - asset->unk_0C) * asset->unk_3C.y, - asset->unk_18.z + (arg0 - asset->unk_0C) * asset->unk_3C.z, 1); + asset->unk_18.z + (arg0 - asset->unk_0C) * asset->unk_3C.z, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, asset->unk_30.x, asset->unk_30.y, asset->unk_30.z, 1); + Matrix_Scale(gGfxMatrix, asset->unk_30.x, asset->unk_30.y, asset->unk_30.z, MTXF_APPLY); temp = __sinf(arg0 * 0.1f + asset->unk_70); Matrix_RotateY(gGfxMatrix, - M_DTOR * (asset->unk_24.y + temp * asset->unk_54.y + (arg0 - asset->unk_0C) * asset->unk_48.y), 1); + M_DTOR * (asset->unk_24.y + temp * asset->unk_54.y + (arg0 - asset->unk_0C) * asset->unk_48.y), + MTXF_APPLY); Matrix_RotateX(gGfxMatrix, - M_DTOR * (asset->unk_24.x + temp * asset->unk_54.x + (arg0 - asset->unk_0C) * asset->unk_48.x), 1); + M_DTOR * (asset->unk_24.x + temp * asset->unk_54.x + (arg0 - asset->unk_0C) * asset->unk_48.x), + MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, - M_DTOR * (asset->unk_24.z + temp * asset->unk_54.z + (arg0 - asset->unk_0C) * asset->unk_48.z), 1); + M_DTOR * (asset->unk_24.z + temp * asset->unk_54.z + (arg0 - asset->unk_0C) * asset->unk_48.z), + MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -824,9 +856,9 @@ void Ending_80191294(u32 arg0, AssetInfo* asset) { D_ending_80198590.unk_18 = D_ending_80198590.unk_1C; if ((arg0 > 520) && (arg0 < 720)) { - D_ending_80198590.unk_2C = 1; + D_ending_80198590.modelId = 1; } else { - D_ending_80198590.unk_2C = 0; + D_ending_80198590.modelId = 0; } D_ending_80198590.unk_38 = 0.0f; @@ -851,9 +883,9 @@ void Ending_80191710(u32 arg0, AssetInfo* asset) { Matrix_Translate(gGfxMatrix, asset->unk_18.x + (arg0 - asset->unk_0C) * asset->unk_3C.x, asset->unk_18.y + (arg0 - asset->unk_0C) * asset->unk_3C.y, - asset->unk_18.z + (arg0 - asset->unk_0C) * asset->unk_3C.z, 1); + asset->unk_18.z + (arg0 - asset->unk_0C) * asset->unk_3C.z, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, asset->unk_30.x, asset->unk_30.y, asset->unk_30.z, 1); + Matrix_Scale(gGfxMatrix, asset->unk_30.x, asset->unk_30.y, asset->unk_30.z, MTXF_APPLY); temp = __sinf(arg0 * 0.1f + asset->unk_70); @@ -862,27 +894,30 @@ void Ending_80191710(u32 arg0, AssetInfo* asset) { Matrix_RotateY(gGfxMatrix, M_DTOR * (-D_ending_801985F0.y + asset->unk_24.y + temp * asset->unk_54.y + (arg0 - asset->unk_0C) * asset->unk_48.y), - 1); + MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_DTOR * (-D_ending_801985F0.x + asset->unk_24.x + temp * asset->unk_54.x + (arg0 - asset->unk_0C) * asset->unk_48.x), - 1); + MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, M_DTOR * (D_ending_801985F0.z + asset->unk_24.z + temp * asset->unk_54.z + (arg0 - asset->unk_0C) * asset->unk_48.z), - 1); + MTXF_APPLY); break; default: - Matrix_RotateY( - gGfxMatrix, - M_DTOR * (asset->unk_24.y + temp * asset->unk_54.y + (arg0 - asset->unk_0C) * asset->unk_48.y), 1); - Matrix_RotateX( - gGfxMatrix, - M_DTOR * (asset->unk_24.x + temp * asset->unk_54.x + (arg0 - asset->unk_0C) * asset->unk_48.x), 1); - Matrix_RotateZ( - gGfxMatrix, - M_DTOR * (asset->unk_24.z + temp * asset->unk_54.z + (arg0 - asset->unk_0C) * asset->unk_48.z), 1); + Matrix_RotateY(gGfxMatrix, + M_DTOR * + (asset->unk_24.y + temp * asset->unk_54.y + (arg0 - asset->unk_0C) * asset->unk_48.y), + MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, + M_DTOR * + (asset->unk_24.x + temp * asset->unk_54.x + (arg0 - asset->unk_0C) * asset->unk_48.x), + MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, + M_DTOR * + (asset->unk_24.z + temp * asset->unk_54.z + (arg0 - asset->unk_0C) * asset->unk_48.z), + MTXF_APPLY); break; } @@ -907,18 +942,21 @@ void Ending_80191C7C(u32 arg0, AssetInfo* asset) { Matrix_Translate(gGfxMatrix, asset->unk_18.x + (arg0 - asset->unk_0C) * asset->unk_3C.x, asset->unk_18.y + (arg0 - asset->unk_0C) * asset->unk_3C.y, - asset->unk_18.z + (arg0 - asset->unk_0C) * asset->unk_3C.z, 1); + asset->unk_18.z + (arg0 - asset->unk_0C) * asset->unk_3C.z, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, asset->unk_30.x, asset->unk_30.y, asset->unk_30.z, 1); + Matrix_Scale(gGfxMatrix, asset->unk_30.x, asset->unk_30.y, asset->unk_30.z, MTXF_APPLY); temp = __sinf(arg0 * 0.1f + asset->unk_70); Matrix_RotateY(gGfxMatrix, - M_DTOR * (asset->unk_24.y + temp * asset->unk_54.y + (arg0 - asset->unk_0C) * asset->unk_48.y), 1); + M_DTOR * (asset->unk_24.y + temp * asset->unk_54.y + (arg0 - asset->unk_0C) * asset->unk_48.y), + MTXF_APPLY); Matrix_RotateX(gGfxMatrix, - M_DTOR * (asset->unk_24.x + temp * asset->unk_54.x + (arg0 - asset->unk_0C) * asset->unk_48.x), 1); + M_DTOR * (asset->unk_24.x + temp * asset->unk_54.x + (arg0 - asset->unk_0C) * asset->unk_48.x), + MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, - M_DTOR * (asset->unk_24.z + temp * asset->unk_54.z + (arg0 - asset->unk_0C) * asset->unk_48.z), 1); + M_DTOR * (asset->unk_24.z + temp * asset->unk_54.z + (arg0 - asset->unk_0C) * asset->unk_48.z), + MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -1013,7 +1051,7 @@ void Ending_801924EC(u32 arg0) { D_ending_801985D0.z += unkEnd54->unk_30.z; Matrix_LookAt(gGfxMatrix, D_ending_801985D0.x, D_ending_801985D0.y, D_ending_801985D0.z, - D_ending_801985E0.x, D_ending_801985E0.y, D_ending_801985E0.z, 0.0f, 1.0f, 0.0f, 1); + D_ending_801985E0.x, D_ending_801985E0.y, D_ending_801985E0.z, 0.0f, 1.0f, 0.0f, MTXF_APPLY); func_play_800B6F50(D_ending_801985D0.x, D_ending_801985D0.y, D_ending_801985D0.z, D_ending_801985E0.x, D_ending_801985E0.y, D_ending_801985E0.z); diff --git a/src/overlays/ovl_i1/fox_co.c b/src/overlays/ovl_i1/fox_co.c index d4dc0c4d..a1f5c0d5 100644 --- a/src/overlays/ovl_i1/fox_co.c +++ b/src/overlays/ovl_i1/fox_co.c @@ -100,8 +100,8 @@ void Corneria_Boss292_Init(Boss292* this) { gBossFrameCount = 0; if (gLevelMode == LEVELMODE_ON_RAILS) { - if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) { - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_9; + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) { + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_START_360; gPlayer[0].unk_1D0 = 0; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); @@ -171,8 +171,9 @@ void Corneria_80187AC8(Boss* boss) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 80); gCsFrameCount = 0; - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_5)) { - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_7; + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || + (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].unk_1D0 = gPlayer[0].timer_1F8 = 0; gPlayer[0].unk_0E8 += gPlayer[0].unk_114; if (gPlayer[0].unk_0E8 > 360.0f) { @@ -433,9 +434,9 @@ void Corneria_80188A18(Boss* boss) { if ((gBossFrameCount > 1000) && (Rand_ZeroOne() < 0.3f)) { if (Rand_ZeroOne() < 0.5f) { - func_360_8002E4F8(gMsg_ID_2263, RCID_BOSS_CORNERIA); + AllRange_PlayMessage(gMsg_ID_2263, RCID_BOSS_CORNERIA); } else { - func_360_8002E4F8(gMsg_ID_2265, RCID_BOSS_CORNERIA); + AllRange_PlayMessage(gMsg_ID_2265, RCID_BOSS_CORNERIA); } } } @@ -508,7 +509,7 @@ void Corneria_80188D50(Boss* boss) { break; } } - Matrix_RotateY(gCalcMatrix, (gPlayer[0].unk_114 + gPlayer[0].unk_0E8) * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, (gPlayer[0].unk_114 + gPlayer[0].unk_0E8) * M_DTOR, MTXF_NEW); sp48.x = 0.0f; sp48.y = 0.0f; sp48.z = -2500.0f; @@ -548,7 +549,7 @@ void Corneria_80189058(Boss* boss) { Vec3f sp6C = { 0.0f, 0.0f, -30.0f }; f32 sp5C; - if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_9) { + if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_START_360) { if (boss->swork[33] == 0) { boss->swork[33]++; gBossActive = 2; @@ -576,8 +577,8 @@ void Corneria_80189058(Boss* boss) { gBossFrameCount = 0; } gBossFrameCount++; - gRadarMarks[59].unk_00 = 1; - gRadarMarks[59].unk_02 = 102; + gRadarMarks[59].status = 1; + gRadarMarks[59].type = 102; gRadarMarks[59].pos.x = boss->obj.pos.x; gRadarMarks[59].pos.y = boss->obj.pos.y; gRadarMarks[59].pos.z = boss->obj.pos.z; @@ -1084,7 +1085,7 @@ void Corneria_8018A730(s32 limbIndex, Vec3f* rot, void* data) { } void Corneria_8018AA74(Boss* boss) { - Matrix_Translate(gCalcMatrix, 0.0f, 700.0f, 0.0f, 1); + Matrix_Translate(gCalcMatrix, 0.0f, 700.0f, 0.0f, MTXF_APPLY); Animation_DrawSkeleton(2, D_CO_602BE64, boss->vwork, Corneria_8018A434, Corneria_8018A730, boss, gCalcMatrix); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); @@ -1115,7 +1116,7 @@ s32 Corneria_8018AB64(Actor* actor) { sp7C.x = sp60[i] + actor->obj.pos.x; sp7C.y = actor->obj.pos.y; sp7C.z = sp50[i] + actor->obj.pos.z; - temp_v0 = func_enmy_8006351C(actor->index, &sp7C, &sp70, 1); + temp_v0 = Object_CheckCollision(actor->index, &sp7C, &sp70, 1); if ((temp_v0 != 0) && (temp_v0 >= 10)) { if ((gObjects80[temp_v0 - 10].obj.status == OBJ_ACTIVE) && (gObjects80[temp_v0 - 10].obj.id == OBJ_80_40)) { return temp_v0 - 9; @@ -1235,7 +1236,7 @@ void Corneria_8018B15C(Actor* actor) { temp_cos = COS_DEG(actor->obj.rot.y); actor->vel.z = actor->fwork[0] * temp_cos; - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); switch (actor->state) { case 3: @@ -1485,7 +1486,7 @@ void Corneria_Boss293_Init(Boss293* this) { this->fwork[18] = -D_play_80161A54 - 10.0f; if (fabsf(gPlayer[0].unk_0AC) < 1.0f) { this->timer_05A = 30000; - this->obj.pos.z = (gPlayer[0].camEye.z - D_ctx_80177D20) - 2000.0f; + this->obj.pos.z = (gPlayer[0].cam.eye.z - D_ctx_80177D20) - 2000.0f; AUDIO_PLAY_SFX(0x31038018, this->sfxSource, 4); D_i1_8019B6D0 = 0; } else { @@ -1570,9 +1571,9 @@ void Corneria_8018C19C(Boss* boss) { f32* temp_a1; gBossFrameCount++; - Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, boss->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, boss->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, MTXF_APPLY); if (D_i1_8019B6D0 == 0) { if (boss->obj.pos.x > 6000.0f) { Object_Kill(&boss->obj, boss->sfxSource); @@ -1651,7 +1652,7 @@ void Corneria_8018C19C(Boss* boss) { } boss->vel.z = boss->fwork[18]; if (boss->state > 0) { - boss->fwork[3] = (gPlayer[0].camEye.z - D_ctx_80177D20) - 2500.0f; + boss->fwork[3] = (gPlayer[0].cam.eye.z - D_ctx_80177D20) - 2500.0f; } if (boss->state != 7) { Math_SmoothStepToF(&boss->fwork[4], boss->fwork[5], 0.1f, 2.0f, 0.00001f); @@ -1728,7 +1729,7 @@ void Corneria_8018C19C(Boss* boss) { boss->fwork[13] = 180.0f; boss->fwork[12] = 1.5f; boss->fwork[6] = 800.0f; - boss->fwork[3] = gPlayer[0].camEye.z - D_ctx_80177D20 - 2500.0f; + boss->fwork[3] = gPlayer[0].cam.eye.z - D_ctx_80177D20 - 2500.0f; boss->fwork[18] = -D_play_80161A54; AUDIO_PLAY_BGM(SEQ_ID_CO_BOSS_2 | SEQ_FLAG); boss->timer_050 = 40; @@ -1836,7 +1837,7 @@ void Corneria_8018C19C(Boss* boss) { } break; case 7: - boss->fwork[3] = (gPlayer[0].camEye.z - D_ctx_80177D20) - 4000.0f; + boss->fwork[3] = (gPlayer[0].cam.eye.z - D_ctx_80177D20) - 4000.0f; Math_SmoothStepToF(&boss->obj.pos.z, boss->fwork[3], 0.1f, 15.0f, 0.00001f); if (boss->timer_058 == 0) { @@ -1952,8 +1953,8 @@ void Corneria_8018C19C(Boss* boss) { boss->fwork[17] = 10.0f; boss->vel.y *= 1.5f; gNextPlanetPath = 1; - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) || - (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_5)) { + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || + (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { func_boss_8004319C(gPlayer, boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z); } boss->health--; @@ -2104,9 +2105,9 @@ void Corneria_8018DDAC(Boss* boss) { boss->obj.rot.x = gBosses[0].obj.rot.x; boss->obj.rot.y = gBosses[0].obj.rot.y; boss->obj.rot.z = gBosses[0].obj.rot.z; - Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, boss->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, boss->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &D_i1_80199A78, &sp40); boss->obj.pos.x = gBosses[0].obj.pos.x + sp40.x; boss->obj.pos.y = gBosses[0].obj.pos.y + sp40.y; @@ -2114,7 +2115,7 @@ void Corneria_8018DDAC(Boss* boss) { boss->fwork[2] = gBosses[0].fwork[2]; break; case 1: - Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, 0); + Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, MTXF_NEW); gBosses[0].fwork[15] += 0.5f; if (((gGameFrameCount % 8) == 0) && (Rand_ZeroOne() < 0.5f)) { @@ -2196,9 +2197,9 @@ void Corneria_8018E290(Boss* boss) { boss->obj.rot.x = gBosses[0].obj.rot.x; boss->obj.rot.y = gBosses[0].obj.rot.y; boss->obj.rot.z = gBosses[0].obj.rot.z; - Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, boss->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, boss->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &D_i1_80199A90, &sp40); boss->obj.pos.x = gBosses[0].obj.pos.x + sp40.x; boss->obj.pos.y = gBosses[0].obj.pos.y + sp40.y; @@ -2206,7 +2207,7 @@ void Corneria_8018E290(Boss* boss) { boss->fwork[0] = gBosses[0].fwork[0]; break; case 1: - Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, 0); + Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, MTXF_NEW); gBosses[0].fwork[15] += 0.5f; if (((gGameFrameCount % 8) == 0) && (Rand_ZeroOne() < 0.5f)) { @@ -2291,9 +2292,9 @@ void Corneria_8018E76C(Boss* boss) { boss->obj.rot.x = gBosses[0].obj.rot.x; boss->obj.rot.y = gBosses[0].obj.rot.y; boss->obj.rot.z = gBosses[0].obj.rot.z; - Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, boss->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, boss->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &D_i1_80199AA8, &sp40); boss->obj.pos.x = gBosses[0].obj.pos.x + sp40.x; boss->obj.pos.y = gBosses[0].obj.pos.y + sp40.y; @@ -2301,7 +2302,7 @@ void Corneria_8018E76C(Boss* boss) { boss->fwork[1] = gBosses[0].fwork[1]; break; case 1: - Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, 0); + Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, MTXF_NEW); gBosses[0].fwork[15] += 0.5f; if (((gGameFrameCount % 8) == 0) && (Rand_ZeroOne() < 0.5f)) { boss->timer_05C = 4; @@ -2355,7 +2356,7 @@ bool Corneria_8018ED1C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* void Corneria_8018ED78(Boss* boss) { - Matrix_Translate(gGfxMatrix, -D_i1_80199A78.x, -D_i1_80199A78.y, 0.0f, 1); + Matrix_Translate(gGfxMatrix, -D_i1_80199A78.x, -D_i1_80199A78.y, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); Animation_GetFrameData(&D_CO_602D400, 0, boss->vwork); Animation_DrawSkeleton(1, D_CO_602D5AC, boss->vwork, Corneria_8018ED1C, NULL, &boss->index, &gIdentityMatrix); @@ -2373,7 +2374,7 @@ bool Corneria_8018EE2C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* void Corneria_8018EE84(Boss* boss) { - Matrix_Translate(gGfxMatrix, -D_i1_80199A90.x, -D_i1_80199A90.y, 0.0f, 1); + Matrix_Translate(gGfxMatrix, -D_i1_80199A90.x, -D_i1_80199A90.y, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); Animation_GetFrameData(&D_CO_602D400, 0, boss->vwork); Animation_DrawSkeleton(1, D_CO_602D5AC, boss->vwork, Corneria_8018EE2C, NULL, &boss->index, &gIdentityMatrix); @@ -2391,7 +2392,7 @@ bool Corneria_8018EF38(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* void Corneria_8018EF90(Boss* boss) { - Matrix_Translate(gGfxMatrix, -D_i1_80199AA8.x, -D_i1_80199AA8.y, 0.0f, 1); + Matrix_Translate(gGfxMatrix, -D_i1_80199AA8.x, -D_i1_80199AA8.y, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); Animation_GetFrameData(&D_CO_602D400, 0, boss->vwork); Animation_DrawSkeleton(1, D_CO_602D5AC, boss->vwork, Corneria_8018EF38, NULL, &boss->index, &gIdentityMatrix); @@ -2494,8 +2495,8 @@ void Corneria_8018F55C(Effect* effect) { Effect_Initialize(effect); effect->obj.status = OBJ_INIT; - effect->obj.pos.x = gPlayer[0].camEye.x + RAND_FLOAT_CENTERED(500.0f); - effect->obj.pos.y = gPlayer[0].camEye.y + RAND_RANGE(-280.0f, 70.0f); + effect->obj.pos.x = gPlayer[0].cam.eye.x + RAND_FLOAT_CENTERED(500.0f); + effect->obj.pos.y = gPlayer[0].cam.eye.y + RAND_RANGE(-280.0f, 70.0f); effect->obj.id = OBJ_EFFECT_352; effect->timer_50 = 80; effect->unk_46 = 144; @@ -2584,8 +2585,8 @@ void Corneria_8018F880(Player* player) { } } - sp2C = -Math_Atan2F(player->camEye.x - sp3C, player->camEye.z - sp34); - sp30 = -Math_Atan2F(player->camEye.y - sp38, sqrtf(SQ(player->camEye.z - sp34) + SQ(player->camEye.x - sp3C))); + sp2C = -Math_Atan2F(player->cam.eye.x - sp3C, player->cam.eye.z - sp34); + sp30 = -Math_Atan2F(player->cam.eye.y - sp38, sqrtf(SQ(player->cam.eye.z - sp34) + SQ(player->cam.eye.x - sp3C))); sp44 = Math_RadToDeg(sp2C) - D_ctx_80177A48[4]; sp40 = Math_RadToDeg(sp30) - D_ctx_80177A48[5]; if (sp44 > 180.0f) { @@ -2632,7 +2633,7 @@ void Corneria_8018F880(Player* player) { D_ctx_80177A48[5] = Math_RadToDeg(sp30); player->flags_228 = 0; D_ctx_80177950 = -1.0f; - if ((Math_RadToDeg(gPlayer[0].unk_058) < 90.0f) || (Math_RadToDeg(gPlayer[0].unk_058) > 270.0f)) { + if ((Math_RadToDeg(gPlayer[0].camYaw) < 90.0f) || (Math_RadToDeg(gPlayer[0].camYaw) > 270.0f)) { D_ctx_80177950 = 1.0f; } player->vel.z = 0.0f; @@ -2658,12 +2659,12 @@ void Corneria_8018F880(Player* player) { actor0->iwork[14] = 2; actor1->iwork[14] = 3; actor2->iwork[14] = 4; - player->camEye.x = gCsCamEyeX = player->pos.x - 400.0f; - gPlayer[0].camEye.y = gCsCamEyeY = player->pos.y + 600.0f; - player->camEye.z = gCsCamEyeZ = player->unk_138 + 2000.0f; - player->camAt.x = gCsCamAtX = player->pos.x; - player->camAt.y = gCsCamAtY = player->pos.y; - player->camAt.z = gCsCamAtZ = player->unk_138 + 300.0f; + player->cam.eye.x = gCsCamEyeX = player->pos.x - 400.0f; + gPlayer[0].cam.eye.y = gCsCamEyeY = player->pos.y + 600.0f; + player->cam.eye.z = gCsCamEyeZ = player->unk_138 + 2000.0f; + player->cam.at.x = gCsCamAtX = player->pos.x; + player->cam.at.y = gCsCamAtY = player->pos.y; + player->cam.at.z = gCsCamAtZ = player->unk_138 + 300.0f; D_ctx_80177A48[0] = 0; D_ctx_80177A48[1] = D_ctx_80177A48[2] = 0; gFillScreenAlphaTarget = 255; @@ -2927,18 +2928,18 @@ void Corneria_8018F880(Player* player) { gLevelStatusScreenTimer = 80; player->pos.y = 350.0f; - player->camEye.x = player->pos.x; - player->camEye.y = (player->pos.y * player->unk_148) + 50.0f; - player->camEye.z = 30.0f; - player->state_1C8 = PLAYERSTATE_1C8_3; + player->cam.eye.x = player->pos.x; + player->cam.eye.y = (player->pos.y * player->unk_148) + 50.0f; + player->cam.eye.z = 30.0f; + player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_1D0 = 0; - player->camAt.x = player->pos.x; - player->camAt.y = (player->pos.y * player->unk_148) + 20.0f; - player->camAt.z = player->unk_138; + player->cam.at.x = player->pos.x; + player->cam.at.y = (player->pos.y * player->unk_148) + 20.0f; + player->cam.at.z = player->unk_138; D_ctx_80177950 = 1.0f; gPlayerFillScreenAlphas[0] = gPlayerFillScreenAlphas[1] = gPlayerFillScreenAlphas[2] = gPlayerFillScreenAlphas[3] = 0; - D_ctx_80178488 = 1; + gLoadLevelObjects = 1; gFillScreenAlphaTarget = 0; player->timer_1F8 = 15; } @@ -2946,18 +2947,18 @@ void Corneria_8018F880(Player* player) { case 10: break; } - Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_ctx_80177A48[0], 20000.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.y, player->unk_080 + gCsCamEyeY, D_ctx_80177A48[0], 20000.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_ctx_80177A48[0], 20000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_ctx_80177A48[0], 20000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.y, gCsCamAtY - player->unk_080, D_ctx_80177A48[0], 20000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_ctx_80177A48[0], 20000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 20000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.y, player->unk_080 + gCsCamEyeY, D_ctx_80177A48[0], 20000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 20000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 20000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY - player->unk_080, D_ctx_80177A48[0], 20000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 20000.0f, 0.0f); Math_SmoothStepToF(&player->wings.unk_04, D_ctx_80177A48[1], 0.2f, 1.0f, 0.0f); Math_SmoothStepToF(&player->wings.unk_0C, D_ctx_80177A48[2], 0.2f, 1.0f, 0.0f); player->wings.unk_08 = player->wings.unk_04; player->wings.unk_10 = player->wings.unk_0C; - player->camEye.y -= 3.0f; - player->camAt.y -= 3.0f; + player->cam.eye.y -= 3.0f; + player->cam.at.y -= 3.0f; player->pos.y -= 3.0f; actor0->vwork[20].y -= 3.0f; actor0->obj.pos.y -= 3.0f; @@ -2988,7 +2989,7 @@ void Corneria_80190F74(Actor* actor, s32 arg1) { Vec3f sp38; Player* player = &gPlayer[0]; - Matrix_RotateY(gCalcMatrix, player->unk_0E8 * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, player->unk_0E8 * M_DTOR, MTXF_NEW); sp5C.x = D_i1_80199AE4[arg1]; sp5C.y = D_i1_80199AF0[arg1]; sp5C.z = D_i1_80199AFC[arg1]; @@ -3030,12 +3031,12 @@ void Corneria_80191160(Player* player) { player->wings.unk_04 = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = 0.0f; Math_SmoothStepToF(&player->unk_130, 0.0f, 0.1f, 15.0f, 0.0f); Math_SmoothStepToF(&player->unk_12C, 0.0f, 0.1f, 15.0f, 0.0f); - Math_SmoothStepToF(&player->unk_034, 0.0f, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f); Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 20.0f, 0.0f); Math_SmoothStepToF(&player->unk_110, 0.0f, 0.1f, 3.0f, 0.0f); if (player->unk_1D0 >= 3) { - player->camEye.y += 3.0f; - player->camAt.y += 3.0f; + player->cam.eye.y += 3.0f; + player->cam.at.y += 3.0f; player->pos.y += 3.0f; gActors[0].obj.pos.y += 3.0f; gActors[1].obj.pos.y += 3.0f; @@ -3047,8 +3048,8 @@ void Corneria_80191160(Player* player) { switch (player->unk_1D0) { case 0: Audio_StopSfxByBankAndSource(1, player->sfxSource); - sp54 = player->camEye.x - D_i1_8019B6D8[62]; - sp4C = player->camEye.z - D_i1_8019B6D8[64]; + sp54 = player->cam.eye.x - D_i1_8019B6D8[62]; + sp4C = player->cam.eye.z - D_i1_8019B6D8[64]; D_ctx_80177A48[0] = Math_RadToDeg(Math_Atan2F(sp54, sp4C)); D_ctx_80177A48[1] = sqrtf(SQ(sp54) + SQ(sp4C)); @@ -3066,17 +3067,17 @@ void Corneria_80191160(Player* player) { } else { D_ctx_80177A48[0] -= 0.5f; } - Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[0] * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[0] * M_DTOR, MTXF_NEW); sp64.x = 0.0f; sp64.y = 0.0f; sp64.z = D_ctx_80177A48[1]; Matrix_MultVec3f(gCalcMatrix, &sp64, &sp58); - Math_SmoothStepToF(&player->camEye.x, D_i1_8019B6D8[62] + sp58.x, 0.05f, 500.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.y, D_i1_8019B6D8[63] + 100.0f, 0.05f, 500.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.z, D_i1_8019B6D8[64] + sp58.z, 0.05f, 500.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.x, D_i1_8019B6D8[62], 0.05f, 500.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.y, D_i1_8019B6D8[63], 0.05f, 500.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.z, D_i1_8019B6D8[64], 0.05f, 500.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.x, D_i1_8019B6D8[62] + sp58.x, 0.05f, 500.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.y, D_i1_8019B6D8[63] + 100.0f, 0.05f, 500.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.z, D_i1_8019B6D8[64] + sp58.z, 0.05f, 500.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.x, D_i1_8019B6D8[62], 0.05f, 500.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.y, D_i1_8019B6D8[63], 0.05f, 500.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.z, D_i1_8019B6D8[64], 0.05f, 500.0f, 0.0f); temp_fa0 = player->pos.x - D_i1_8019B6D8[62]; temp_fa1 = player->pos.z - D_i1_8019B6D8[64]; if (gCsFrameCount < 30) { @@ -3095,9 +3096,9 @@ void Corneria_80191160(Player* player) { Math_SmoothStepToAngle(&player->unk_0E4, 20.0f, 0.1f, 0.5f, 0.0001f); Math_SmoothStepToAngle(&player->unk_0EC, 0.0f, 0.1f, 1.0f, 0.0001f); Math_SmoothStepToF(&D_ctx_80177A48[2], 0.05f, 1.0f, 0.005f, 0.0001f); - Math_SmoothStepToF(&player->camAt.x, player->pos.x, D_ctx_80177A48[2], 500.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.y, player->pos.y, D_ctx_80177A48[2], 500.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.z, player->pos.z, D_ctx_80177A48[2], 500.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.x, player->pos.x, D_ctx_80177A48[2], 500.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.y, player->pos.y, D_ctx_80177A48[2], 500.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.z, player->pos.z, D_ctx_80177A48[2], 500.0f, 0.0f); if (gCsFrameCount == 350) { player->unk_1D0++; D_ctx_80177A48[2] = 0.0f; @@ -3113,24 +3114,24 @@ void Corneria_80191160(Player* player) { Math_SmoothStepToF(&player->unk_0D0, 0.0f, 0.1f, 2.0f, 0.0f); Math_SmoothStepToF(&D_ctx_80177A48[2], 0.1f, 1.0f, 0.002f, 0); Math_SmoothStepToF(&D_ctx_80177A48[3], 0.1f, 1.0f, 0.002f, 0); - Matrix_RotateY(gCalcMatrix, player->unk_0E8 * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, player->unk_0E8 * M_DTOR, MTXF_NEW); Matrix_Push(&gCalcMatrix); - Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[5] * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[5] * M_DTOR, MTXF_APPLY); sp64.x = 0.0f; sp64.y = -200.0f; sp64.z = 800.0f; Matrix_MultVec3f(gCalcMatrix, &sp64, &sp58); - Math_SmoothStepToF(&player->camEye.x, player->pos.x + sp58.x, D_ctx_80177A48[2], 500.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.y, player->pos.y + sp58.y, D_ctx_80177A48[2], 500.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.z, player->pos.z + sp58.z, D_ctx_80177A48[2], 500.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.x, player->pos.x + sp58.x, D_ctx_80177A48[2], 500.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.y, player->pos.y + sp58.y, D_ctx_80177A48[2], 500.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.z, player->pos.z + sp58.z, D_ctx_80177A48[2], 500.0f, 0.0f); Matrix_Pop(&gCalcMatrix); sp64.x = 0.0f; sp64.y = 0; sp64.z = 150.0f; Matrix_MultVec3f(gCalcMatrix, &sp64, &sp58); - Math_SmoothStepToF(&player->camAt.x, player->pos.x + sp58.x, D_ctx_80177A48[3], 500.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.y, player->pos.y + sp58.y, D_ctx_80177A48[3], 500.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.z, player->pos.z + sp58.z, D_ctx_80177A48[3], 500.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.x, player->pos.x + sp58.x, D_ctx_80177A48[3], 500.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.y, player->pos.y + sp58.y, D_ctx_80177A48[3], 500.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.z, player->pos.z + sp58.z, D_ctx_80177A48[3], 500.0f, 0.0f); D_ctx_80177A48[5] += D_ctx_80177A48[4]; if ((gCsFrameCount > 400) && (gCsFrameCount < 1000)) { @@ -3166,7 +3167,7 @@ void Corneria_80191160(Player* player) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; gFillScreenAlphaStep = 8; if (gFillScreenAlpha == 255) { - player->state_1C8 = PLAYERSTATE_1C8_6; + player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; D_ctx_8017837C = 4; D_play_800D3180[gCurrentLevel] = Play_CheckMedalStatus(150) + 1; @@ -3252,8 +3253,8 @@ void Corneria_80191160(Player* player) { } break; } - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -((player->unk_0E4 + player->unk_4D8) * M_DTOR), 1); + Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); sp64.x = 0.0f; sp64.y = 0.0f; sp64.z = player->unk_0D0 + player->unk_110; diff --git a/src/overlays/ovl_i1/fox_tr.c b/src/overlays/ovl_i1/fox_tr.c index c78f8b56..f53c398b 100644 --- a/src/overlays/ovl_i1/fox_tr.c +++ b/src/overlays/ovl_i1/fox_tr.c @@ -56,7 +56,7 @@ void Training_ItemRing_Update(ItemTrainingRing* this) { this->obj.pos.z += ((gPlayer[this->playerNum].unk_138 - this->obj.pos.z) * 0.05f); } this->obj.rot.z += 22.0f; - Math_SmoothStepToAngle(&this->obj.rot.y, Math_RadToDeg(-gPlayer[this->playerNum].unk_058), 0.2f, 10.0f, + Math_SmoothStepToAngle(&this->obj.rot.y, Math_RadToDeg(-gPlayer[this->playerNum].camYaw), 0.2f, 10.0f, 0.0f); if (this->timer_48 == 0) { Object_Kill(&this->obj, this->sfxSource); diff --git a/src/overlays/ovl_i1/fox_tr360.c b/src/overlays/ovl_i1/fox_tr360.c index 542cbc24..b543564b 100644 --- a/src/overlays/ovl_i1/fox_tr360.c +++ b/src/overlays/ovl_i1/fox_tr360.c @@ -147,10 +147,10 @@ void Training_80199024(Actor* actor) { actor->obj.pos.y = gGroundLevel + 40.0f; actor->vel.y = 0.0f; } - func_360_8003088C(actor); + ActorAllRange_ApplyDamage(actor); radarMark = &gRadarMarks[actor->index]; - radarMark->unk_00 = 1; - radarMark->unk_02 = actor->aiType; + radarMark->status = 1; + radarMark->type = actor->aiType; radarMark->pos.x = actor->obj.pos.x; radarMark->pos.y = actor->obj.pos.y; radarMark->pos.z = actor->obj.pos.z; @@ -184,7 +184,7 @@ void Training_8019949C(void) { var_v1 = 0; } - if (((gGameFrameCount % 4) == 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3)) { + if (((gGameFrameCount % 4) == 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { sp44.x = 0.0f; sp44.y = 0.0f; sp44.z = -15000.0f; @@ -193,7 +193,7 @@ void Training_8019949C(void) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; actor->obj.id = OBJ_ACTOR_ALLRANGE; - Matrix_RotateY(gCalcMatrix, gGameFrameCount * 6.0f * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, gGameFrameCount * 6.0f * M_DTOR, MTXF_NEW); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); actor->obj.pos.x = sp38.x; actor->obj.pos.y = 2000.0f; diff --git a/src/overlays/ovl_i1/fox_ve1.c b/src/overlays/ovl_i1/fox_ve1.c index 99ab3f4e..f24a407a 100644 --- a/src/overlays/ovl_i1/fox_ve1.c +++ b/src/overlays/ovl_i1/fox_ve1.c @@ -345,9 +345,9 @@ void Venom1_80192518(Actor* actor) { } if ((actor->state == 1) || (actor->state == 2) || (actor->state == 3)) { - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, MTXF_APPLY); } switch (actor->state) { @@ -474,8 +474,8 @@ void Venom1_80192AA4(Actor* actor) { Vec3f dest; f32 y; - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); if ((actor->obj.rot.y <= 30.0f) || (actor->obj.rot.y >= 330.0f)) { for (D_i1_80199FFC.x = -80.0f; D_i1_80199FFC.x <= 80.0f; D_i1_80199FFC.x += 40.0f) { @@ -488,8 +488,8 @@ void Venom1_80192AA4(Actor* actor) { src.x = 80.0f; } for (y = 0.0f; y <= 450.0f; y += 50.0f) { - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); src.y = y; Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); } @@ -662,7 +662,7 @@ void Venom1_80192CD4(Actor* actor) { } void Venom1_80192E2C(Actor* actor) { - Matrix_Scale(gGfxMatrix, 1.0f, 0.5f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 1.0f, 0.5f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_VE1_901DA50); } @@ -679,9 +679,9 @@ void Venom1_80192EB0(Actor* actor) { s32 i; f32 var_ft4; - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, MTXF_APPLY); switch (actor->state) { case 0: @@ -797,7 +797,7 @@ void Venom1_801933DC(Actor* actor) { } void Venom1_801934D0(Actor* actor) { - Matrix_Translate(gGfxMatrix, 0.0f, -488.0f, 0.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, -488.0f, 0.0f, MTXF_APPLY); Animation_DrawSkeleton(0, D_VE1_900D164, actor->vwork, NULL, NULL, actor, &gIdentityMatrix); } @@ -881,11 +881,11 @@ bool Venom1_801937F4(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* t override = false; for (i = 0; i < 18; i++) { if (limbIndex == D_i1_8019A748[i].limb) { - Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, 1); - Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, 1); - Matrix_Mult(gGfxMatrix, gCalcMatrix, 1); + Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, MTXF_APPLY); + Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if (!(D_i1_8019B838[D_i1_8019A748[i].index].unk_7C & 1)) { if (D_i1_8019B838[D_i1_8019A748[i].index].unk_00 > 0) { @@ -1050,17 +1050,17 @@ void Venom1_80193D64(s32 limbIndex, Vec3f* rot, void* thisx) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, D_i1_8019A544[temp2 + var_s4].x + var_s7->unk_0C[var_s4].x, D_i1_8019A544[temp2 + var_s4].y + var_s7->unk_0C[var_s4].y, - D_i1_8019A544[temp2 + var_s4].z + var_s7->unk_0C[var_s4].z, 1); + D_i1_8019A544[temp2 + var_s4].z + var_s7->unk_0C[var_s4].z, MTXF_APPLY); Graphics_SetScaleMtx(2.0f); - Matrix_RotateY(gGfxMatrix, var_s7->unk_30[var_s4].y * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, var_s7->unk_30[var_s4].x * M_DTOR, 1); - Matrix_RotateZ(gGfxMatrix, var_s7->unk_30[var_s4].z * M_DTOR, 1); + Matrix_RotateY(gGfxMatrix, var_s7->unk_30[var_s4].y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, var_s7->unk_30[var_s4].x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, var_s7->unk_30[var_s4].z * M_DTOR, MTXF_APPLY); if (((s32) var_s7->unk_30[var_s4].z % 2) != 0) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 96, 96, 255, 255); } - Matrix_Scale(gGfxMatrix, 4.0f, 4.0f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 4.0f, 4.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_VE1_900DF20); Matrix_Pop(&gGfxMatrix); @@ -1232,7 +1232,7 @@ void Venom1_80194398(Boss* boss) { break; } } - Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, MTXF_NEW); for (spF4 = 0; spF4 < ARRAY_COUNTU(D_i1_8019B838); spF4++) { if (D_i1_8019B838[spF4].unk_74 < D_i1_8019B838[spF4].unk_78) { @@ -1402,7 +1402,7 @@ void Venom1_80194398(Boss* boss) { actor->fwork[1] = 5.0f + RAND_FLOAT_CENTERED(1.0f); actor->fwork[2] = 5.0f + RAND_FLOAT_CENTERED(1.0f); } else { - Matrix_RotateY(gCalcMatrix, RAND_FLOAT(2.0f) * M_PI, 0); + Matrix_RotateY(gCalcMatrix, RAND_FLOAT(2.0f) * M_PI, MTXF_NEW); sp104.x = 15.0f + RAND_FLOAT(10.0f); sp104.z = 0.0f; sp104.y = 0.0f; @@ -1436,7 +1436,7 @@ void Venom1_80194398(Boss* boss) { actor->fwork[1] = 5.0f + RAND_FLOAT_CENTERED(1.0f); actor->fwork[2] = 5.0f + RAND_FLOAT_CENTERED(1.0f); } else { - Matrix_RotateY(gCalcMatrix, RAND_FLOAT(2.0f) * M_PI, 0); + Matrix_RotateY(gCalcMatrix, RAND_FLOAT(2.0f) * M_PI, MTXF_NEW); sp104.x = RAND_FLOAT(10.0f) + 15.0f; sp104.z = 0.0f; sp104.y = 0.0f; @@ -2322,9 +2322,9 @@ void Venom1_80198310(Boss* boss) { RCP_SetupDL(&gMasterDisp, 0x41); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 0); - Matrix_Translate(gGfxMatrix, 0.0f, -5.0f + gCameraShakeY, 0.0f, 1); - Matrix_Scale(gGfxMatrix, 10.0f, 0.0f, 8.0f, 1); - Matrix_RotateX(gGfxMatrix, -90.0f * M_DTOR, 1); + Matrix_Translate(gGfxMatrix, 0.0f, -5.0f + gCameraShakeY, 0.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 10.0f, 0.0f, 8.0f, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -90.0f * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); } @@ -2354,7 +2354,7 @@ void Venom1_80198414(void) { void Venom1_80198594(Boss* boss) { boss->obj.pos.z = gPlayer[0].pos.z; - if ((boss->timer_052 <= 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3)) { + if ((boss->timer_052 <= 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { Venom1_80198414(); } } @@ -2386,9 +2386,9 @@ void Venom1_8019864C(PlayerShot* playerShot) { if (count != 0) { for (j = 0; j < count; j++, hitboxData += 6) { if (hitboxData[1] > -100.0f) { - Matrix_RotateZ(gCalcMatrix, -boss->obj.rot.z * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -boss->obj.rot.x * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -boss->obj.rot.y * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, -boss->obj.rot.z * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -boss->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -boss->obj.rot.y * M_DTOR, MTXF_APPLY); sp88.x = playerShot->obj.pos.x - boss->obj.pos.x; sp88.y = playerShot->obj.pos.y - boss->obj.pos.y; diff --git a/src/overlays/ovl_i2/fox_me.c b/src/overlays/ovl_i2/fox_me.c index 375a9f00..b3624136 100644 --- a/src/overlays/ovl_i2/fox_me.c +++ b/src/overlays/ovl_i2/fox_me.c @@ -68,7 +68,7 @@ void Meteo_8018756C(Actor* actor) { vec.y = actor->vel.y; vec.z = actor->vel.z; - if ((func_enmy_8006351C(actor->index, &actor->obj.pos, &vec, 0) != 0) || + if ((Object_CheckCollision(actor->index, &actor->obj.pos, &vec, 0) != 0) || (actor->obj.pos.y < (gGroundLevel + 20.0f))) { actor->obj.status = OBJ_DYING; } @@ -105,7 +105,7 @@ void Meteo_80187650(Actor* actor) { vec.x = actor->vel.x; vec.y = actor->vel.y; vec.z = actor->vel.z; - if ((func_enmy_8006351C(actor->index, &actor->obj.pos, &vec, 0) != 0) || + if ((Object_CheckCollision(actor->index, &actor->obj.pos, &vec, 0) != 0) || (actor->obj.pos.y < (gGroundLevel + 20.0f))) { func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f); actor->obj.status = OBJ_DYING; @@ -121,7 +121,7 @@ void Meteo_801877C4(Actor* actor) { actor->obj.rot.z += 1.0f; - Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, 0); + Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, MTXF_NEW); sp38.x = 0.0f; sp38.y = -1100.0f; @@ -412,7 +412,7 @@ void Meteo_80188344(Boss* boss) { boss->swork[0] = 0; - Matrix_RotateZ(gCalcMatrix, (boss->obj.rot.z - 45.0f) * M_DTOR, 0); + Matrix_RotateZ(gCalcMatrix, (boss->obj.rot.z - 45.0f) * M_DTOR, MTXF_NEW); src.x = 0.0f; src.y = 156.0f; @@ -475,7 +475,7 @@ void Meteo_801887D0(Boss* boss) { gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 255, 0, 255); } - Matrix_RotateZ(gGfxMatrix, (M_PI / 4), 1); + Matrix_RotateZ(gGfxMatrix, (M_PI / 4), MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ME_60240B0); RCP_SetupDL_64(); @@ -484,16 +484,16 @@ void Meteo_801887D0(Boss* boss) { if (boss->swork[0] != 0) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, boss->swork[0]); Matrix_Push(&gGfxMatrix); - Matrix_RotateZ(gGfxMatrix, M_DTOR * 90.0f * i, 1); - Matrix_Translate(gGfxMatrix, 0.0f, 156.0f, 930.0f, 1); + Matrix_RotateZ(gGfxMatrix, M_DTOR * 90.0f * i, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, 156.0f, 930.0f, MTXF_APPLY); if ((gGameFrameCount % 2) != 0) { - Matrix_Scale(gGfxMatrix, 6.0f, 9.0f, 5.0f, 1); + Matrix_Scale(gGfxMatrix, 6.0f, 9.0f, 5.0f, MTXF_APPLY); } else { - Matrix_Scale(gGfxMatrix, 4.0f, 7.0f, 5.0f, 1); + Matrix_Scale(gGfxMatrix, 4.0f, 7.0f, 5.0f, MTXF_APPLY); } - Matrix_RotateZ(gGfxMatrix, 1.5707964f, 1); // (M_PI / 2) does not match + Matrix_RotateZ(gGfxMatrix, 1.5707964f, MTXF_APPLY); // (M_PI / 2) does not match Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ME_60263F0); Matrix_Pop(&gGfxMatrix); @@ -590,8 +590,8 @@ void Meteo_80188CAC(Effect* effect) { effect->scale2 = 1.0f; effect->unk_60.z += 20.0f; - Matrix_RotateZ(gCalcMatrix, effect->unk_60.z * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, effect->obj.rot.x * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, effect->unk_60.z * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, effect->obj.rot.x * M_DTOR, MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; @@ -650,8 +650,8 @@ void Meteo_80188FAC(Effect* effect) { effect->obj.rot.x = 10.0f; effect->obj.rot.z += 20.0f; - Matrix_RotateZ(gCalcMatrix, effect->obj.rot.z * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, effect->obj.rot.x * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, effect->obj.rot.z * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, effect->obj.rot.x * M_DTOR, MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; @@ -677,7 +677,7 @@ void Meteo_80188FAC(Effect* effect) { } void Meteo_80189114(Effect* effect) { - if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) { + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) { Object_Kill(&effect->obj, effect->sfxSource); } @@ -742,10 +742,10 @@ void Meteo_801892F0(Boss* boss, s32 arg1) { } if (arg1 < 4) { - Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, boss->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, M_DTOR * 90.0f * arg1, 1); + Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, boss->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, M_DTOR * 90.0f * arg1, MTXF_APPLY); src.x = 0.0f; src.y = 200.0f; @@ -788,9 +788,9 @@ void Meteo_8018978C(Boss* boss) { gBossFrameCount++; - Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, boss->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, boss->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, MTXF_APPLY); if (gGameFrameCount & 0x10) { boss->swork[19] += 32; @@ -930,9 +930,9 @@ void Meteo_8018978C(Boss* boss) { boss->vel.x = 0.0f; boss->vel.y = 0.0f; - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) || - (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_5)) { - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_7; + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || + (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].unk_1D0 = 0; gCsFrameCount = 0; } @@ -1260,7 +1260,7 @@ void Meteo_8018978C(Boss* boss) { boss->obj.rot.z = boss->obj.rot.z + ((0.0f - boss->obj.rot.z) * 0.02f); Math_SmoothStepToF(&boss->fwork[0x15], 4.0f, 1.0f, 0.1f, 0.0f); - if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_6) { + if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_NEXT) { gFillScreenRed = gFillScreenAlpha = gFillScreenGreen = gFillScreenBlue = 0; if ((boss->timer_050 == 10) || (boss->timer_050 == 30) || (boss->timer_050 == 50) || @@ -1509,15 +1509,15 @@ void Meteo_8018B7C4(s32 arg0) { RCP_SetupDL_64(); Matrix_Push(&gGfxMatrix); - Matrix_Scale(gGfxMatrix, 10.0f * effect, 10.0f * effect, 10.0f * effect, 1); + Matrix_Scale(gGfxMatrix, 10.0f * effect, 10.0f * effect, 10.0f * effect, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 70); gSPDisplayList(gMasterDisp++, D_102ED50); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 20.0f, 1); - Matrix_Scale(gGfxMatrix, 9.0f * effect, 9.0f * effect, 9.0f * effect, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 20.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 9.0f * effect, 9.0f * effect, 9.0f * effect, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 60); @@ -1525,8 +1525,8 @@ void Meteo_8018B7C4(s32 arg0) { Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 35.0f, 1); - Matrix_Scale(gGfxMatrix, 7.5f * effect, 7.5f * effect, 7.5f * effect, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 35.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 7.5f * effect, 7.5f * effect, 7.5f * effect, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 50); @@ -1534,8 +1534,8 @@ void Meteo_8018B7C4(s32 arg0) { Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 40.0f, 1); - Matrix_Scale(gGfxMatrix, 5.0f * effect, 5.0f * effect, 5.0f * effect, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 40.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 5.0f * effect, 5.0f * effect, 5.0f * effect, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 40); @@ -1560,38 +1560,38 @@ void Meteo_8018BACC(Boss* boss) { Matrix_Push(&gGfxMatrix); switch (i) { case 0: - Matrix_Translate(gGfxMatrix, 746.0f, 741.0f, 680.0f, 1); + Matrix_Translate(gGfxMatrix, 746.0f, 741.0f, 680.0f, MTXF_APPLY); break; case 1: - Matrix_Translate(gGfxMatrix, -746.0f, 741.0f, 680.0f, 1); + Matrix_Translate(gGfxMatrix, -746.0f, 741.0f, 680.0f, MTXF_APPLY); break; case 2: - Matrix_Translate(gGfxMatrix, -746.0f, -741.0f, 680.0f, 1); + Matrix_Translate(gGfxMatrix, -746.0f, -741.0f, 680.0f, MTXF_APPLY); break; case 3: - Matrix_Translate(gGfxMatrix, 746.0f, -741.0f, 680.0f, 1); + Matrix_Translate(gGfxMatrix, 746.0f, -741.0f, 680.0f, MTXF_APPLY); break; case 4: - Matrix_Translate(gGfxMatrix, 1283.0f, 0.0f, -340.0f, 1); + Matrix_Translate(gGfxMatrix, 1283.0f, 0.0f, -340.0f, MTXF_APPLY); break; case 5: - Matrix_Translate(gGfxMatrix, -1283.0f, 0.0f, -340.0f, 1); + Matrix_Translate(gGfxMatrix, -1283.0f, 0.0f, -340.0f, MTXF_APPLY); break; } if (i < 4) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 32, 32, 128); - Matrix_Scale(gGfxMatrix, var_fs1, var_fs1, var_fs1, 1); + Matrix_Scale(gGfxMatrix, var_fs1, var_fs1, var_fs1, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_102ED50); } else { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 128); - Matrix_Scale(gGfxMatrix, var_fs1 * 6.0f, var_fs1 * 6.0f, var_fs1 * 6.0f, 1); + Matrix_Scale(gGfxMatrix, var_fs1 * 6.0f, var_fs1 * 6.0f, var_fs1 * 6.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_102ED50); } @@ -1610,25 +1610,25 @@ void Meteo_8018BACC(Boss* boss) { Matrix_Push(&gGfxMatrix); if (i == 4) { - Matrix_Translate(gGfxMatrix, 0.0f, 0, 300.0f, 1); - Matrix_RotateZ(gGfxMatrix, M_PI / 4, 1); - Matrix_Scale(gGfxMatrix, boss->fwork[21], boss->fwork[21], 1.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0, 300.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, M_PI / 4, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, boss->fwork[21], boss->fwork[21], 1.0f, MTXF_APPLY); } if (i == 5) { - Matrix_Translate(gGfxMatrix, 0.0f, 330.0f, -1022.0f, 1); - Matrix_Scale(gGfxMatrix, boss->fwork[22] * 3.2f, 2.0f * boss->fwork[22], 1.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 330.0f, -1022.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, boss->fwork[22] * 3.2f, 2.0f * boss->fwork[22], 1.0f, MTXF_APPLY); } if (i == 6) { - Matrix_Translate(gGfxMatrix, 0.0f, -330.0f, -1022.0f, 1); - Matrix_Scale(gGfxMatrix, boss->fwork[23] * 3.2f, 2.0f * boss->fwork[23], 1.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, -330.0f, -1022.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, boss->fwork[23] * 3.2f, 2.0f * boss->fwork[23], 1.0f, MTXF_APPLY); } if (i < 4) { - Matrix_RotateZ(gGfxMatrix, M_DTOR * 90.0f * i, 1); - Matrix_Translate(gGfxMatrix, 0.0f, 200.0f, 500.0f, 1); - Matrix_Scale(gGfxMatrix, boss->fwork[17 + i], boss->fwork[17 + i], 1.0f, 1); + Matrix_RotateZ(gGfxMatrix, M_DTOR * 90.0f * i, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, 200.0f, 500.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, boss->fwork[17 + i], boss->fwork[17 + i], 1.0f, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); @@ -1653,23 +1653,23 @@ void Meteo_8018BACC(Boss* boss) { Matrix_Push(&gGfxMatrix); switch (i) { case 0: - Matrix_Translate(gGfxMatrix, 746.0f, 741.0f, 680.0f, 1); - Matrix_RotateZ(gGfxMatrix, -M_PI / 4, 1); + Matrix_Translate(gGfxMatrix, 746.0f, 741.0f, 680.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, -M_PI / 4, MTXF_APPLY); break; case 1: - Matrix_Translate(gGfxMatrix, -746.0f, 741.0f, 680.0f, 1); - Matrix_RotateZ(gGfxMatrix, M_PI / 4, 1); + Matrix_Translate(gGfxMatrix, -746.0f, 741.0f, 680.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, M_PI / 4, MTXF_APPLY); break; case 2: - Matrix_Translate(gGfxMatrix, -746.0f, -741.0f, 680.0f, 1); - Matrix_RotateZ(gGfxMatrix, 3 * M_PI / 4, 1); + Matrix_Translate(gGfxMatrix, -746.0f, -741.0f, 680.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, 3 * M_PI / 4, MTXF_APPLY); break; case 3: - Matrix_Translate(gGfxMatrix, 746.0f, -741.0f, 680.0f, 1); - Matrix_RotateZ(gGfxMatrix, -3 * M_PI / 4, 1); + Matrix_Translate(gGfxMatrix, 746.0f, -741.0f, 680.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, -3 * M_PI / 4, MTXF_APPLY); break; } @@ -1677,21 +1677,21 @@ void Meteo_8018BACC(Boss* boss) { Matrix_Push(&gGfxMatrix); if ((gGameFrameCount % 2) != 0) { - Matrix_Scale(gGfxMatrix, var_fs1 * 2.5f, var_fs1 * 2.5f, var_fs1 * 2.5f, 1); + Matrix_Scale(gGfxMatrix, var_fs1 * 2.5f, var_fs1 * 2.5f, var_fs1 * 2.5f, MTXF_APPLY); } else { - Matrix_Scale(gGfxMatrix, var_fs1 * 3.0f, var_fs1 * 3.0f, var_fs1 * 3.0f, 1); + Matrix_Scale(gGfxMatrix, var_fs1 * 3.0f, var_fs1 * 3.0f, var_fs1 * 3.0f, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_102ED50); Matrix_Pop(&gGfxMatrix); - Matrix_RotateX(gGfxMatrix, -M_PI / 6, 1); + Matrix_RotateX(gGfxMatrix, -M_PI / 6, MTXF_APPLY); if ((gGameFrameCount % 2) != 0) { - Matrix_RotateY(gGfxMatrix, M_PI, 1); + Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); } - Matrix_Scale(gGfxMatrix, 2.0f, 2.0f * var_fs1, 2.0f, 1); - Matrix_Translate(gGfxMatrix, 0.0f, -20.0f, 0.0f, 1); + Matrix_Scale(gGfxMatrix, 2.0f, 2.0f * var_fs1, 2.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, -20.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_102F5E0); Matrix_Pop(&gGfxMatrix); @@ -1702,11 +1702,11 @@ void Meteo_8018BACC(Boss* boss) { var_fs1 = boss->fwork[11] - 15.0f; gDPSetPrimColor(gMasterDisp++, 0, 0, 160, 255, 160, 255); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 1300.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 1300.0f, MTXF_APPLY); if ((gGameFrameCount % 2) != 0) { - Matrix_Scale(gGfxMatrix, var_fs1 * 0.8f, var_fs1 * 0.8f, var_fs1 * 0.8f, 1); + Matrix_Scale(gGfxMatrix, var_fs1 * 0.8f, var_fs1 * 0.8f, var_fs1 * 0.8f, MTXF_APPLY); } else { - Matrix_Scale(gGfxMatrix, var_fs1, var_fs1, var_fs1, 1); + Matrix_Scale(gGfxMatrix, var_fs1, var_fs1, var_fs1, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_102ED50); @@ -1726,24 +1726,24 @@ void Meteo_8018BACC(Boss* boss) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, D_i2_80195554[i]); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 700.0f, 0.0f, -(1235.0f - ((var_fs0 - 1.0f) * 89.2f)), 1); + Matrix_Translate(gGfxMatrix, 700.0f, 0.0f, -(1235.0f - ((var_fs0 - 1.0f) * 89.2f)), MTXF_APPLY); if ((gGameFrameCount % 2) != 0) { - Matrix_Scale(gGfxMatrix, var_fs0, var_fs0, var_fs0, 1); + Matrix_Scale(gGfxMatrix, var_fs0, var_fs0, var_fs0, MTXF_APPLY); } else { - Matrix_Scale(gGfxMatrix, var_fs0 * 1.1f, var_fs0 * 1.1f, var_fs0 * 1.1f, 1); + Matrix_Scale(gGfxMatrix, var_fs0 * 1.1f, var_fs0 * 1.1f, var_fs0 * 1.1f, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ME_6023810); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, -700.0f, 0.0f, -(1235.0f - ((var_fs0 - 1.0f) * 89.2f)), 1); + Matrix_Translate(gGfxMatrix, -700.0f, 0.0f, -(1235.0f - ((var_fs0 - 1.0f) * 89.2f)), MTXF_APPLY); if ((gGameFrameCount % 2) != 0) { - Matrix_Scale(gGfxMatrix, var_fs0, var_fs0, var_fs0, 1); + Matrix_Scale(gGfxMatrix, var_fs0, var_fs0, var_fs0, MTXF_APPLY); } else { - Matrix_Scale(gGfxMatrix, var_fs0 * 1.1f, var_fs0 * 1.1f, var_fs0 * 1.1f, 1); + Matrix_Scale(gGfxMatrix, var_fs0 * 1.1f, var_fs0 * 1.1f, var_fs0 * 1.1f, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); @@ -1755,7 +1755,7 @@ void Meteo_8018BACC(Boss* boss) { if (boss->swork[0] > 0) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, 650.0f, 600.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 650.0f, 600.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); Meteo_8018B7C4(boss->swork[0] - 1); Matrix_Pop(&gGfxMatrix); @@ -1763,7 +1763,7 @@ void Meteo_8018BACC(Boss* boss) { if (boss->swork[1] > 0) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, -650.0f, 600.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, -650.0f, 600.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); Meteo_8018B7C4(boss->swork[1] - 1); Matrix_Pop(&gGfxMatrix); @@ -1922,13 +1922,13 @@ void Meteo_8018CD8C(Player* player) { D_ctx_80177A48[2] = -13000.0f; D_ctx_80177A48[4] = -22000.0f; - player->camEye.x = gCsCamEyeX = player->pos.x + 100.0f; - player->camEye.y = gCsCamEyeY = player->pos.y; - player->camEye.z = gCsCamEyeZ = D_ctx_80177A48[1] + player->unk_138; + player->cam.eye.x = gCsCamEyeX = player->pos.x + 100.0f; + player->cam.eye.y = gCsCamEyeY = player->pos.y; + player->cam.eye.z = gCsCamEyeZ = D_ctx_80177A48[1] + player->unk_138; - player->camAt.x = gCsCamAtX = D_ctx_80177A48[2] + player->pos.x; - player->camAt.y = gCsCamAtY = player->pos.y; - player->camAt.z = gCsCamAtZ = D_ctx_80177A48[4] + player->unk_138; + player->cam.at.x = gCsCamAtX = D_ctx_80177A48[2] + player->pos.x; + player->cam.at.y = gCsCamAtY = player->pos.y; + player->cam.at.z = gCsCamAtZ = D_ctx_80177A48[4] + player->unk_138; player->unk_1D0 = 1; @@ -2013,7 +2013,7 @@ void Meteo_8018CD8C(Player* player) { } if (gCsFrameCount > 660) { - player->wings.unk_2C = 0; + player->wings.modelId = 0; } if (gCsFrameCount == 340) { @@ -2034,8 +2034,8 @@ void Meteo_8018CD8C(Player* player) { x = sqrtf((x * x) + (z * z)); sp68 = Math_RadToDeg(-Math_Atan2F(y, x)); - Matrix_RotateY(gCalcMatrix, M_DTOR * sp64, 0); - Matrix_RotateX(gCalcMatrix, M_DTOR * sp68, 1); + Matrix_RotateY(gCalcMatrix, M_DTOR * sp64, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, M_DTOR * sp68, MTXF_APPLY); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp58, &sp4C); func_enmy2_8006EFA0(100, actor3->obj.pos.x + (D_ctx_80177A48[3] * 74.0f) + (sp4C.x * 0.6f), @@ -2066,22 +2066,22 @@ void Meteo_8018CD8C(Player* player) { if (player->timer_1F8 == 0) { AUDIO_PLAY_BGM(gBgmSeqId); gLevelStatusScreenTimer = 80; - player->state_1C8 = PLAYERSTATE_1C8_3; + player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_1D0 = 0; player->timer_1F8 = 0; player->timer_1FC = 0; - player->camEye.x = player->pos.x; - player->camEye.y = (player->pos.y * player->unk_148) + 50.0f; - player->camEye.z = 400.0f; - player->camAt.x = player->pos.x; - player->camAt.y = (player->pos.y * player->unk_148) + 20.0f; - player->camAt.z = player->unk_138; + player->cam.eye.x = player->pos.x; + player->cam.eye.y = (player->pos.y * player->unk_148) + 50.0f; + player->cam.eye.z = 400.0f; + player->cam.at.x = player->pos.x; + player->cam.at.y = (player->pos.y * player->unk_148) + 20.0f; + player->cam.at.z = player->unk_138; for (i = 0; i < 4; i++) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); } - D_ctx_80178488 = 1; + gLoadLevelObjects = 1; break; } } @@ -2104,12 +2104,12 @@ void Meteo_8018CD8C(Player* player) { break; } - Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_ctx_80177A48[0], 20000.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_ctx_80177A48[0], 20000.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_ctx_80177A48[0], 20000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_ctx_80177A48[0], 20000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_ctx_80177A48[0], 20000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_ctx_80177A48[0], 20000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 20000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 20000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 20000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 20000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 20000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 20000.0f, 0.0f); } void Meteo_8018D9EC(Actor* actor) { @@ -2142,9 +2142,9 @@ void Meteo_8018DB6C(Actor* actor) { void Meteo_8018DBEC(Effect* effect) { if (effect->state == 1) { - Matrix_RotateX(gGfxMatrix, effect->obj.rot.x * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, 1); - Matrix_RotateZ(gGfxMatrix, M_PI / 2, 1); + Matrix_RotateX(gGfxMatrix, effect->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_44); gSPDisplayList(gMasterDisp++, D_ME_60263F0); @@ -2153,14 +2153,14 @@ void Meteo_8018DBEC(Effect* effect) { void Meteo_8018DCE4(Effect* effect) { if (effect->state != 0) { - Matrix_RotateX(gGfxMatrix, effect->obj.rot.x * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2 * 3.0f, 1); + Matrix_RotateX(gGfxMatrix, effect->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2 * 3.0f, MTXF_APPLY); if ((gGameFrameCount % 2) != 0) { - Matrix_RotateZ(gGfxMatrix, M_PI, 1); + Matrix_RotateZ(gGfxMatrix, M_PI, MTXF_APPLY); } - Matrix_RotateX(gGfxMatrix, -M_PI / 2, 1); + Matrix_RotateX(gGfxMatrix, -M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 160, 255, 160, effect->unk_44); gSPDisplayList(gMasterDisp++, D_102F5E0); @@ -2168,8 +2168,8 @@ void Meteo_8018DCE4(Effect* effect) { } void Meteo_8018DE14(Effect* effect) { - Matrix_RotateX(gGfxMatrix, effect->obj.rot.x * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, 1); + Matrix_RotateX(gGfxMatrix, effect->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_44); @@ -2217,7 +2217,7 @@ void Meteo_8018E084(Player* player) { Math_SmoothStepToF(&player->unk_0E8, 0.0f, 0.1f, 3.0f, 0.0f); Math_SmoothStepToF(&player->unk_0EC, 0.0f, 0.1f, 3.0f, 0.0f); Math_SmoothStepToF(&player->unk_08C, 0.0f, 0.1f, 3.0f, 0.0f); - Math_SmoothStepToF(&player->unk_034, 0.0f, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f); Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 20.0f, 0.0f); Math_SmoothStepToF(&player->unk_110, 0.0f, 0.1f, 3.0f, 0.0f); @@ -2230,12 +2230,12 @@ void Meteo_8018E084(Player* player) { D_ctx_80177A48[1] = 0.0f; D_ctx_80177A48[2] = 0.0f; - player->wings.unk_2C = 1; + player->wings.modelId = 1; gCsFrameCount = 0; case 1: - Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, MTXF_NEW); src.x = 0.0f; src.y = 0.0f; src.z = D_ctx_80177A48[2] + 2000.0f; @@ -2300,8 +2300,8 @@ void Meteo_8018E084(Player* player) { Math_SmoothStepToF(D_ctx_80177A48, 0.1f, 0.1f, 0.002f, 0.0f); - Matrix_RotateX(gCalcMatrix, D_ctx_80177A48[4] * M_DTOR, 0); - Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, 1); + Matrix_RotateX(gCalcMatrix, D_ctx_80177A48[4] * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; @@ -2327,7 +2327,7 @@ void Meteo_8018E084(Player* player) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; gFillScreenAlphaStep = 8; if (gFillScreenAlpha == 255) { - player->state_1C8 = PLAYERSTATE_1C8_6; + player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; D_ctx_8017837C = 4; D_play_800D3180[LEVEL_METEO] = Play_CheckMedalStatus(0xC8) + 1; @@ -2437,21 +2437,21 @@ void Meteo_8018E084(Player* player) { case 1400: gActors[3].state = 1; - gActors[3].obj.pos.x = player->camEye.x - 700.0f; - gActors[3].obj.pos.y = player->camEye.y; - gActors[3].obj.pos.z = player->camEye.z - D_ctx_80177D20 + 1000.0f; + gActors[3].obj.pos.x = player->cam.eye.x - 700.0f; + gActors[3].obj.pos.y = player->cam.eye.y; + gActors[3].obj.pos.z = player->cam.eye.z - D_ctx_80177D20 + 1000.0f; break; } - Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0); - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -((player->unk_0E4 + player->unk_4D8) * M_DTOR), 1); + Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; diff --git a/src/overlays/ovl_i2/fox_sx.c b/src/overlays/ovl_i2/fox_sx.c index 37dafd80..d3904498 100644 --- a/src/overlays/ovl_i2/fox_sx.c +++ b/src/overlays/ovl_i2/fox_sx.c @@ -26,9 +26,9 @@ void SectorX_8018F030(void) { actor->obj.id = OBJ_ACTOR_SLIPPY_SX; actor->unk_0B6 = 1; actor->obj.rot.y = 180.0f; - actor->obj.pos.x = gPlayer[0].camEye.x - 300.0f; - actor->obj.pos.y = gPlayer[0].camEye.y + 200.0f; - actor->obj.pos.z = gPlayer[0].camEye.z - D_ctx_80177D20 + 300.0f; + actor->obj.pos.x = gPlayer[0].cam.eye.x - 300.0f; + actor->obj.pos.y = gPlayer[0].cam.eye.y + 200.0f; + actor->obj.pos.z = gPlayer[0].cam.eye.z - D_ctx_80177D20 + 300.0f; actor->iwork[11] = 1; actor->aiType = AI360_SLIPPY; Object_SetInfo(&actor->info, actor->obj.id); @@ -45,8 +45,8 @@ void SectorX_8018F124(void) { actor->obj.status = OBJ_INIT; actor->obj.id = OBJ_ACTOR_SLIPPY_SX; actor->unk_0B6 = -1; - actor->obj.pos.x = gPlayer[0].camEye.x + 3000.0f; - actor->obj.pos.y = gPlayer[0].camEye.y - 3000.0f; + actor->obj.pos.x = gPlayer[0].cam.eye.x + 3000.0f; + actor->obj.pos.y = gPlayer[0].cam.eye.y - 3000.0f; actor->obj.pos.z = gPlayer[0].pos.z + 30000.0f; Object_SetInfo(&actor->info, actor->obj.id); actor->info.unk_10 = 100000.0f; @@ -59,8 +59,8 @@ void SectorX_8018F1DC(Actor* actor) { src.x = 0.0f; src.y = 0.0f; src.z = 100.0f; - Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, actor->unk_0F4.x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, actor->unk_0F4.x * M_DTOR, MTXF_APPLY); Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); func_enmy2_8006EEFC(actor->index, actor->obj.pos.x + (dest.x * 1.5), actor->obj.pos.y + (dest.y * 1.5), actor->obj.pos.z + (dest.z * 1.5), dest.x, dest.y, dest.z, actor->unk_0F4.x, @@ -102,7 +102,7 @@ void SectorX_8018F330(Actor* actor) { func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); gBosses[0].swork[6] = 0; gTeamShields[TEAM_ID_SLIPPY] = -2; - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_0; + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_STANDBY; actor->timer_0BC = 200; actor->iwork[14] = 3; actor->fwork[0] = 0.0f; @@ -126,13 +126,13 @@ void SectorX_8018F330(Actor* actor) { Math_SmoothStepToF(&actor->fwork[0], 0.5f, 1.0f, 0.01f, 0); Math_SmoothStepToF(&actor->fwork[1], 0.1f, 1.0f, 0.01f, 0); - Math_SmoothStepToF(&gPlayer[0].camAt.x, actor->obj.pos.x, actor->fwork[0], 100.0f, 0.0f); - Math_SmoothStepToF(&gPlayer[0].camAt.y, actor->obj.pos.y, actor->fwork[0], 100.0f, 0.0f); - Math_SmoothStepToF(&gPlayer[0].camAt.z, actor->obj.pos.z + D_ctx_80177D20, actor->fwork[0], 100.0f, 0.0f); - Math_SmoothStepToF(&gPlayer[0].camEye.x, actor->obj.pos.x - 30.0f, actor->fwork[1], 20.0f, 0.0f); - Math_SmoothStepToF(&gPlayer[0].camEye.y, actor->obj.pos.y, actor->fwork[1], 20.0f, 0.0f); + Math_SmoothStepToF(&gPlayer[0].cam.at.x, actor->obj.pos.x, actor->fwork[0], 100.0f, 0.0f); + Math_SmoothStepToF(&gPlayer[0].cam.at.y, actor->obj.pos.y, actor->fwork[0], 100.0f, 0.0f); + Math_SmoothStepToF(&gPlayer[0].cam.at.z, actor->obj.pos.z + D_ctx_80177D20, actor->fwork[0], 100.0f, 0.0f); + Math_SmoothStepToF(&gPlayer[0].cam.eye.x, actor->obj.pos.x - 30.0f, actor->fwork[1], 20.0f, 0.0f); + Math_SmoothStepToF(&gPlayer[0].cam.eye.y, actor->obj.pos.y, actor->fwork[1], 20.0f, 0.0f); if (actor->timer_0BC == 0) { - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_3; + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ACTIVE; if (gPlayer[0].cockpitView != 0) { func_play_800B5D30(&gPlayer[0], 1); } @@ -164,11 +164,11 @@ void SectorX_8018F884(Actor* actor) { break; case -1: - actor->obj.rot.y = RAD_TO_DEG(-gPlayer[gPlayerNum].unk_058); - actor->obj.rot.x = RAD_TO_DEG(gPlayer[gPlayerNum].unk_05C); + actor->obj.rot.y = RAD_TO_DEG(-gPlayer[gPlayerNum].camYaw); + actor->obj.rot.x = RAD_TO_DEG(gPlayer[gPlayerNum].camPitch); RCP_SetupDL(&gMasterDisp, 0x40); gDPSetPrimColor(gMasterDisp++, 0, 0, 220, 70, 30, 255); - Matrix_Scale(gGfxMatrix, 70.0f, 70.0f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 70.0f, 70.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_SX_60010C0); @@ -200,8 +200,8 @@ void SectorX_8018FA04(f32 x, f32 y, f32 z) { xRot = Math_Atan2F(gPlayer[0].pos.x - x, gPlayer[0].unk_138 - z); pad = sqrtf(SQ(gPlayer[0].pos.x - x) + SQ(gPlayer[0].unk_138 - z)); yRot = -Math_Atan2F(gPlayer[0].pos.y - y, pad); - Matrix_RotateY(gCalcMatrix, xRot, 0); - Matrix_RotateX(gCalcMatrix, yRot, 1); + Matrix_RotateY(gCalcMatrix, xRot, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, yRot, MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; src.z = 60.0f; @@ -227,15 +227,15 @@ void SectorX_8018FBBC(Vec3f* pos) { if ((actor->obj.status >= OBJ_ACTIVE) && (fabsf(pos->x - actor->obj.pos.x) < 2500.0f) && (fabsf(pos->z - actor->obj.pos.z) < 2500.0f) && (actor->state != 1000) && (actor->timer_0C2 == 0) && (actor->scale < 0.0f) && - func_enmy_80062DBC(pos, actor->info.hitbox, &actor->obj, actor->vwork[29].x, actor->vwork[29].y, - actor->vwork[29].z + actor->unk_0F4.z)) { + Object_CheckHitboxCollision(pos, actor->info.hitbox, &actor->obj, actor->vwork[29].x, actor->vwork[29].y, + actor->vwork[29].z + actor->unk_0F4.z)) { func_play_800A6028(actor->sfxSource, 0x09000004); actor->state = 1000; xRot = Math_Atan2F(actor->obj.pos.x - pos->x, actor->obj.pos.z - pos->z); yRot = -Math_Atan2F(actor->obj.pos.y - pos->y, sqrtf(SQ(actor->obj.pos.x - pos->x) + SQ(actor->obj.pos.z - pos->z))); - Matrix_RotateY(gCalcMatrix, xRot, 0); - Matrix_RotateX(gCalcMatrix, yRot, 1); + Matrix_RotateY(gCalcMatrix, xRot, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, yRot, MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; src.z = 20.0f; @@ -486,7 +486,7 @@ void SectorX_80190078(Boss* boss) { } } - if (((boss->state != 8) && (boss->state != 20)) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_3)) { + if (((boss->state != 8) && (boss->state != 20)) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_ACTIVE)) { boss->state = 8; boss->fwork[0] = 0.0f; Audio_KillSfxBySourceAndId(D_i2_80195D88, 0x31032061); @@ -885,7 +885,7 @@ void SectorX_80190078(Boss* boss) { boss->unk_04C++; if (boss->unk_04C >= Animation_GetFrameCount(&D_SX_60123BC)) { boss->unk_04C = Animation_GetFrameCount(&D_SX_60123BC) - 1; - if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_0) { + if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_STANDBY) { boss->unk_04C = 0; boss->state = 10; boss->fwork[0] = 0.0f; @@ -1070,8 +1070,8 @@ void SectorX_80190078(Boss* boss) { } if (boss->timer_050 == 120) { - if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_6) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_4)) { - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_7; + if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_NEXT) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_DOWN)) { + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].unk_1D0 = 0; gPlayer[0].unk_234 = 1; } @@ -1174,17 +1174,17 @@ bool SectorX_80192AF0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* *dList = NULL; } - Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, 1); - Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, 1); + Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, MTXF_APPLY); if (*dList != NULL) { Matrix_Push(&gGfxMatrix); Matrix_Push(&gCalcMatrix); Matrix_MultVec3f(gCalcMatrix, &sp64, &sp58); func_edisplay_8005F670(&sp58); - Matrix_Mult(gGfxMatrix, gCalcMatrix, 1); + Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, *dList); if (boss->swork[4] == 0) { @@ -1195,21 +1195,21 @@ bool SectorX_80192AF0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); } Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_i2_80195644.x, D_i2_80195644.y, D_i2_80195644.z, (u8) 1); - Matrix_RotateZ(gGfxMatrix, D_i2_80195650.z * M_DTOR, 1); - Matrix_RotateY(gGfxMatrix, D_i2_80195650.y * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, D_i2_80195650.x * M_DTOR, 1); - Matrix_RotateZ(gGfxMatrix, 2.0f * gGameFrameCount * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, boss->fwork[45], boss->fwork[45], boss->fwork[45], 1); + Matrix_Translate(gGfxMatrix, D_i2_80195644.x, D_i2_80195644.y, D_i2_80195644.z, (u8) MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, D_i2_80195650.z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, D_i2_80195650.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, D_i2_80195650.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, 2.0f * gGameFrameCount * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, boss->fwork[45], boss->fwork[45], boss->fwork[45], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_SX_6009C30); Matrix_Pop(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_i2_8019565C.x, D_i2_8019565C.y, D_i2_8019565C.z, (u8) 1); - Matrix_RotateZ(gGfxMatrix, D_i2_80195668.z * M_DTOR, 1); - Matrix_RotateY(gGfxMatrix, D_i2_80195668.y * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, D_i2_80195668.x * M_DTOR, 1); - Matrix_RotateZ(gGfxMatrix, 2.0f * -gGameFrameCount * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, boss->fwork[45], boss->fwork[45], boss->fwork[45], 1); + Matrix_Translate(gGfxMatrix, D_i2_8019565C.x, D_i2_8019565C.y, D_i2_8019565C.z, (u8) MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, D_i2_80195668.z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, D_i2_80195668.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, D_i2_80195668.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, 2.0f * -gGameFrameCount * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, boss->fwork[45], boss->fwork[45], boss->fwork[45], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_SX_6009C30); } @@ -1357,8 +1357,8 @@ void SectorX_80193434(Boss* boss) { fwork *= 1.2f; } Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, boss->fwork[35], boss->fwork[36], boss->fwork[37], 1); - Matrix_Scale(gGfxMatrix, fwork, fwork, fwork, 1); + Matrix_Translate(gGfxMatrix, boss->fwork[35], boss->fwork[36], boss->fwork[37], MTXF_APPLY); + Matrix_Scale(gGfxMatrix, fwork, fwork, fwork, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_102ED50); Matrix_Pop(&gGfxMatrix); @@ -1373,8 +1373,8 @@ void SectorX_80193434(Boss* boss) { fwork *= 1.2f; } Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, boss->fwork[38], boss->fwork[39], boss->fwork[40], 1); - Matrix_Scale(gGfxMatrix, fwork, fwork, fwork, 1); + Matrix_Translate(gGfxMatrix, boss->fwork[38], boss->fwork[39], boss->fwork[40], MTXF_APPLY); + Matrix_Scale(gGfxMatrix, fwork, fwork, fwork, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_102ED50); Matrix_Pop(&gGfxMatrix); @@ -1393,14 +1393,14 @@ void SectorX_80193434(Boss* boss) { fwork *= 1.2f; } Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, boss->fwork[20], boss->fwork[21], boss->fwork[22], 1); - Matrix_Scale(gGfxMatrix, fwork, fwork, fwork, 1); + Matrix_Translate(gGfxMatrix, boss->fwork[20], boss->fwork[21], boss->fwork[22], MTXF_APPLY); + Matrix_Scale(gGfxMatrix, fwork, fwork, fwork, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_SX_600F8A0); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, boss->fwork[23], boss->fwork[24], boss->fwork[25], 1); - Matrix_Scale(gGfxMatrix, fwork, fwork, fwork, 1); + Matrix_Translate(gGfxMatrix, boss->fwork[23], boss->fwork[24], boss->fwork[25], MTXF_APPLY); + Matrix_Scale(gGfxMatrix, fwork, fwork, fwork, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_SX_600F8A0); Matrix_Pop(&gGfxMatrix); @@ -1429,9 +1429,9 @@ void SectorX_801938D8(Actor* actor, s32 arg1) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; actor->obj.id = OBJ_ACTOR_195; - actor->obj.pos.x = gPlayer[0].camEye.x + D_i2_801956EC[arg1].x; - actor->obj.pos.y = gPlayer[0].camEye.y + D_i2_801956EC[arg1].y; - actor->obj.pos.z = gPlayer[0].camEye.z + D_i2_801956EC[arg1].z; + actor->obj.pos.x = gPlayer[0].cam.eye.x + D_i2_801956EC[arg1].x; + actor->obj.pos.y = gPlayer[0].cam.eye.y + D_i2_801956EC[arg1].y; + actor->obj.pos.z = gPlayer[0].cam.eye.z + D_i2_801956EC[arg1].z; actor->state = 1; actor->iwork[11] = 1; actor->vel.z = -30.0f; @@ -1463,13 +1463,13 @@ void SectorX_80193A30(Player* player) { SectorX_80193800(&gActors[5 + i], i); } player->unk_1D0 = 1; - player->camEye.x = gCsCamEyeX = 100.0f; - player->camEye.y = gCsCamEyeY = 0.0f; - player->camEye.z = gCsCamEyeZ = -200.0f; - player->camAt.x = gCsCamAtX = 0.0f; - player->camAt.y = gCsCamAtY = 0.0f; - player->camAt.z = gCsCamAtZ = -1000.0f; - player->unk_034 = -5.0f; + player->cam.eye.x = gCsCamEyeX = 100.0f; + player->cam.eye.y = gCsCamEyeY = 0.0f; + player->cam.eye.z = gCsCamEyeZ = -200.0f; + player->cam.at.x = gCsCamAtX = 0.0f; + player->cam.at.y = gCsCamAtY = 0.0f; + player->cam.at.z = gCsCamAtZ = -1000.0f; + player->camRoll = -5.0f; player->unk_0D0 = 0.0f; gFillScreenAlpha = 255; /* fallthrough */ @@ -1480,19 +1480,19 @@ void SectorX_80193A30(Player* player) { D_ctx_80177A48[0] = 0.5f; gCsCamAtX = gActors[5].obj.pos.x; gCsCamAtZ = gActors[5].obj.pos.z; - player->unk_034 -= 0.1f; + player->camRoll -= 0.1f; if (gCsFrameCount == 140) { x = gActors[5].obj.pos.x; - y = gActors[5].obj.pos.y - (player->camEye.y + 50.0f); - z = gActors[5].obj.pos.z - (player->camEye.z + 20.0f); + y = gActors[5].obj.pos.y - (player->cam.eye.y + 50.0f); + z = gActors[5].obj.pos.z - (player->cam.eye.z + 20.0f); xzDeg = Math_RadToDeg(Math_Atan2F(x, z)); xyzDeg = Math_RadToDeg(-Math_Atan2F(y, sqrtf(SQ(x) + SQ(z)))); - Matrix_RotateY(gCalcMatrix, M_DTOR * xzDeg, 0); - Matrix_RotateX(gCalcMatrix, M_DTOR * xyzDeg, 1); + Matrix_RotateY(gCalcMatrix, M_DTOR * xzDeg, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, M_DTOR * xyzDeg, MTXF_APPLY); src.y = src.x = 0.0f; src.z = 100.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - func_enmy2_8006EEFC(100, 0.0f, player->camEye.y + 50.0f, player->camEye.z + 20.0f, dest.x, dest.y, + func_enmy2_8006EEFC(100, 0.0f, player->cam.eye.y + 50.0f, player->cam.eye.z + 20.0f, dest.x, dest.y, dest.z, xyzDeg, xzDeg, 0.0f); } if (gCsFrameCount == 143) { @@ -1514,9 +1514,9 @@ void SectorX_80193A30(Player* player) { case 2: if (gCsFrameCount == 170) { player->pos.x = 0.0f; - player->pos.y = player->camEye.y + 50.0f; + player->pos.y = player->cam.eye.y + 50.0f; player->unk_1D0 += 1; - player->pos.z = player->camEye.z + 20.0f; + player->pos.z = player->cam.eye.z + 20.0f; player->unk_194 = 10.0f; player->unk_190 = 10.0f; player->unk_0D0 = 30.0f; @@ -1538,7 +1538,7 @@ void SectorX_80193A30(Player* player) { Math_SmoothStepToF(D_ctx_80177A48, 0.1f, 1.0f, 0.01f, 0); } - Math_SmoothStepToF(&player->unk_034, 0.0f, 0.5f, 0.07f, 0); + Math_SmoothStepToF(&player->camRoll, 0.0f, 0.5f, 0.07f, 0); Math_SmoothStepToF(&player->unk_0EC, 0.0f, 0.2f, 2.0f, 0); Math_SmoothStepToF(&player->unk_0E4, 20.0f, 0.1f, 1.0f, 0); @@ -1567,9 +1567,9 @@ void SectorX_80193A30(Player* player) { gActors[0].obj.pos.z -= player->pos.z; gActors[1].obj.pos.z -= player->pos.z; gActors[2].obj.pos.z -= player->pos.z; - player->camEye.z -= player->pos.z; + player->cam.eye.z -= player->pos.z; gCsCamEyeZ -= player->pos.z; - player->camAt.z -= player->pos.z; + player->cam.at.z -= player->pos.z; gCsCamAtZ -= player->pos.z; player->pos.z = 0.0f; player->unk_0D0 = 0.0f; @@ -1577,7 +1577,7 @@ void SectorX_80193A30(Player* player) { break; case 4: - Math_SmoothStepToF(&player->unk_034, 0.0f, 0.2f, 0.5f, 0); + Math_SmoothStepToF(&player->camRoll, 0.0f, 0.2f, 0.5f, 0); Math_SmoothStepToF(&player->pos.y, 350.0f, 0.1f, 15.0f, 0); Math_SmoothStepToF(&player->unk_0E4, 0.0f, 0.1f, 2.0f, 0); gCsCamEyeX = player->pos.x; @@ -1592,28 +1592,28 @@ void SectorX_80193A30(Player* player) { player->unk_0D0 = D_play_80161A54; AUDIO_PLAY_BGM(gBgmSeqId); gLevelStatusScreenTimer = 80; - player->state_1C8 = PLAYERSTATE_1C8_3; + player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_1D0 = player->timer_1F8 = player->timer_1FC = 0; - player->camEye.y = player->pos.y * player->unk_148 + 50.0f; - player->camEye.z = 400.0f; - player->camAt.y = player->pos.y * player->unk_148 + 20.0f; - player->camAt.z = player->unk_138; - player->camAt.x = player->camEye.x = player->pos.x; - D_ctx_80178488 = 1; + player->cam.eye.y = player->pos.y * player->unk_148 + 50.0f; + player->cam.eye.z = 400.0f; + player->cam.at.y = player->pos.y * player->unk_148 + 20.0f; + player->cam.at.z = player->unk_138; + player->cam.at.x = player->cam.eye.x = player->pos.x; + gLoadLevelObjects = 1; for (i = 0; i < 3; i++) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); } } break; } - Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_ctx_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_ctx_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_ctx_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_ctx_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_ctx_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_ctx_80177A48[0], 20000.0f, 0); - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), 1); + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 20000.0f, 0); + Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; src.z = player->unk_0D0; @@ -1634,7 +1634,7 @@ void SectorX_801944D4(Actor* actor, s32 arg1) { Vec3f destB; Player* player = &gPlayer[0]; - Matrix_RotateY(gCalcMatrix, player->unk_0E8 * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, player->unk_0E8 * M_DTOR, MTXF_NEW); srcA.x = D_i2_80195710[arg1]; srcA.y = D_i2_80195720[arg1]; srcA.z = D_i2_80195730[arg1]; @@ -1684,7 +1684,7 @@ void SectorX_80194728(Player* player) { Math_SmoothStepToF(&player->unk_0E8, 0.0f, 0.1f, 3.0f, 0.0f); Math_SmoothStepToF(&player->unk_0EC, 0.0f, 0.1f, 3.0f, 0.0f); Math_SmoothStepToF(&player->unk_08C, 0.0f, 0.1f, 3.0f, 0.0f); - Math_SmoothStepToF(&player->unk_034, 0.0f, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f); Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 20.0f, 0.0f); Math_SmoothStepToF(&player->unk_110, 0.0f, 0.1f, 3.0f, 0.0f); @@ -1703,7 +1703,7 @@ void SectorX_80194728(Player* player) { D_ctx_80177A48[2] = 100.0f; D_ctx_80177A48[4] = 100.0f; D_ctx_80177A48[5] = 0.0f; - player->wings.unk_2C = 1; + player->wings.modelId = 1; func_play_800A6148(); case 1: @@ -1718,26 +1718,26 @@ void SectorX_80194728(Player* player) { Math_SmoothStepToF(&player->unk_0D0, 0.0f, 0.1f, 2.0f, 0.0f); Math_SmoothStepToF(D_ctx_80177A48, 0.1f, 1.0f, 0.002f, 0.0f); Math_SmoothStepToF(D_ctx_80177A48 + 1, 0.1f, 1.0f, 0.002f, 0.0f); - Matrix_RotateY(gCalcMatrix, player->unk_0E8 * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, player->unk_0E8 * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, MTXF_APPLY); Matrix_Push(&gCalcMatrix); - Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[2] * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[2] * M_DTOR, MTXF_APPLY); sp54.x = 0.0f; sp54.y = 30.0f; sp54.z = D_ctx_80177A48[4]; Matrix_MultVec3f(gCalcMatrix, &sp54, &sp48); - Math_SmoothStepToF(&player->camEye.x, player->pos.x + sp48.x, D_ctx_80177A48[0], 500.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.y, player->pos.y + sp48.y, D_ctx_80177A48[0], 500.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.z, player->unk_138 + D_ctx_80177D20 + sp48.z, D_ctx_80177A48[0], 500.0f, + Math_SmoothStepToF(&player->cam.eye.x, player->pos.x + sp48.x, D_ctx_80177A48[0], 500.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.y, player->pos.y + sp48.y, D_ctx_80177A48[0], 500.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.z, player->unk_138 + D_ctx_80177D20 + sp48.z, D_ctx_80177A48[0], 500.0f, 0.0f); Matrix_Pop(&gCalcMatrix); sp54.x = 0.0f; sp54.y = 0; sp54.z = D_ctx_80177A48[5]; Matrix_MultVec3f(gCalcMatrix, &sp54, &sp48); - Math_SmoothStepToF(&player->camAt.x, player->pos.x + sp48.x, D_ctx_80177A48[1], 500.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.y, player->pos.y + sp48.y, D_ctx_80177A48[1], 500.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.z, player->unk_138 + D_ctx_80177D20 + sp48.z, D_ctx_80177A48[1], 500.0f, + Math_SmoothStepToF(&player->cam.at.x, player->pos.x + sp48.x, D_ctx_80177A48[1], 500.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.y, player->pos.y + sp48.y, D_ctx_80177A48[1], 500.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.z, player->unk_138 + D_ctx_80177D20 + sp48.z, D_ctx_80177A48[1], 500.0f, 0.0f); break; case 2: @@ -1754,7 +1754,7 @@ void SectorX_80194728(Player* player) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; gFillScreenAlphaTarget = 255; if (gFillScreenAlpha == 255) { - player->state_1C8 = PLAYERSTATE_1C8_6; + player->state_1C8 = PLAYERSTATE_1C8_NEXT; D_ctx_8017837C = 4; player->timer_1F8 = 0; func_play_800A6148(); @@ -1924,8 +1924,8 @@ void SectorX_80194728(Player* player) { break; } } - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -((player->unk_0E4 + player->unk_4D8) * M_DTOR), 1); + Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); sp54.x = 0.0f; sp54.y = 0.0f; sp54.z = player->unk_0D0 + player->unk_110; diff --git a/src/overlays/ovl_i3/fox_a6.c b/src/overlays/ovl_i3/fox_a6.c index 8a040fff..552dae57 100644 --- a/src/overlays/ovl_i3/fox_a6.c +++ b/src/overlays/ovl_i3/fox_a6.c @@ -551,17 +551,17 @@ void Area6_80187944(Boss* bossA6) { gBossFrameCount++; if ((bossA6->state < 6) || ((bossA6->state >= 8) && (bossA6->state < 12))) { - bossA6->obj.rot.y = RAD_TO_DEG(Math_Atan2F(gPlayer[0].camEye.x - bossA6->obj.pos.x, - gPlayer[0].camEye.z - (bossA6->obj.pos.z + D_ctx_80177D20))); + bossA6->obj.rot.y = RAD_TO_DEG(Math_Atan2F(gPlayer[0].cam.eye.x - bossA6->obj.pos.x, + gPlayer[0].cam.eye.z - (bossA6->obj.pos.z + D_ctx_80177D20))); bossA6->obj.rot.x = - RAD_TO_DEG(-Math_Atan2F(gPlayer[0].camEye.y - bossA6->obj.pos.y, - sqrtf(SQ(gPlayer[0].camEye.z - (bossA6->obj.pos.z + D_ctx_80177D20)) + - SQ(gPlayer[0].camEye.x - bossA6->obj.pos.x)))); + RAD_TO_DEG(-Math_Atan2F(gPlayer[0].cam.eye.y - bossA6->obj.pos.y, + sqrtf(SQ(gPlayer[0].cam.eye.z - (bossA6->obj.pos.z + D_ctx_80177D20)) + + SQ(gPlayer[0].cam.eye.x - bossA6->obj.pos.x)))); } - Matrix_RotateY(gCalcMatrix, bossA6->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, bossA6->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, bossA6->obj.rot.z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, bossA6->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, bossA6->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, bossA6->obj.rot.z * M_DTOR, MTXF_APPLY); if ((bossA6->dmgType != DMG_NONE) && (bossA6->health > 0)) { bossA6->dmgType = DMG_NONE; @@ -669,18 +669,18 @@ void Area6_80187944(Boss* bossA6) { Math_SmoothStepToAngle(&bossA6->obj.rot.z, bossA6->fwork[A6_FWK_8], 0.05f, bossA6->fwork[A6_FWK_9], 0.00001f); if (bossA6->swork[A6_SWK_25] >= 2) { if (!(gGameFrameCount % 64U) && (Rand_ZeroOne() < 0.5f)) { - bossA6->fwork[A6_FWK_6] = RAND_FLOAT_CENTERED(500.0f) + gPlayer[0].camEye.x; + bossA6->fwork[A6_FWK_6] = RAND_FLOAT_CENTERED(500.0f) + gPlayer[0].cam.eye.x; } if (!(gGameFrameCount % 64U) && (Rand_ZeroOne() < 0.5f)) { - bossA6->fwork[A6_FWK_7] = RAND_FLOAT_CENTERED(500.0f) + gPlayer[0].camEye.y; + bossA6->fwork[A6_FWK_7] = RAND_FLOAT_CENTERED(500.0f) + gPlayer[0].cam.eye.y; } } else { if (!(gGameFrameCount % 32U) && (Rand_ZeroOne() < 0.7f)) { - bossA6->fwork[A6_FWK_6] = RAND_FLOAT_CENTERED(1000.0f) + gPlayer[0].camEye.x; + bossA6->fwork[A6_FWK_6] = RAND_FLOAT_CENTERED(1000.0f) + gPlayer[0].cam.eye.x; bossA6->fwork[A6_FWK_30] = 0.0f; } if (!(gGameFrameCount % 32U) && (Rand_ZeroOne() < 0.7f)) { - bossA6->fwork[A6_FWK_7] = RAND_FLOAT_CENTERED(1000.0f) + gPlayer[0].camEye.y; + bossA6->fwork[A6_FWK_7] = RAND_FLOAT_CENTERED(1000.0f) + gPlayer[0].cam.eye.y; bossA6->fwork[A6_FWK_31] = 0.0f; } } @@ -688,7 +688,7 @@ void Area6_80187944(Boss* bossA6) { if (bossA6->state != 0) { Math_SmoothStepToF(&bossA6->fwork[A6_FWK_4], bossA6->fwork[A6_FWK_5], 0.1f, 2.0f, 0.00001f); - Math_SmoothStepToF(&bossA6->obj.pos.z, gPlayer[0].camEye.z - D_ctx_80177D20 + bossA6->fwork[A6_FWK_3], 0.1f, + Math_SmoothStepToF(&bossA6->obj.pos.z, gPlayer[0].cam.eye.z - D_ctx_80177D20 + bossA6->fwork[A6_FWK_3], 0.1f, bossA6->fwork[A6_FWK_4], 0.00001f); if (bossA6->state < 5) { sp120 = 2.0f; @@ -783,9 +783,9 @@ void Area6_80187944(Boss* bossA6) { sp104 = 10.0f; if ((bossA6->timer_050 != 0) && (bossA6->timer_050 < 200)) { - dx_11C = gPlayer[0].camEye.x - bossA6->obj.pos.x; - dy_118 = gPlayer[0].camEye.y - bossA6->obj.pos.y; - dz_114 = gPlayer[0].camEye.z - D_ctx_80177D20 + bossA6->fwork[A6_FWK_3] - bossA6->obj.pos.z; + dx_11C = gPlayer[0].cam.eye.x - bossA6->obj.pos.x; + dy_118 = gPlayer[0].cam.eye.y - bossA6->obj.pos.y; + dz_114 = gPlayer[0].cam.eye.z - D_ctx_80177D20 + bossA6->fwork[A6_FWK_3] - bossA6->obj.pos.z; sp104 = 100.0f; } @@ -797,8 +797,8 @@ void Area6_80187944(Boss* bossA6) { Math_SmoothStepToAngle(&bossA6->unk_078.y, yaw_10C, 1.0f, sp104, 0.00001f); Math_SmoothStepToAngle(&bossA6->unk_078.x, pitch_110, 1.0f, sp104, 0.00001f); - Matrix_RotateY(gCalcMatrix, bossA6->unk_078.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, bossA6->unk_078.x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, bossA6->unk_078.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, bossA6->unk_078.x * M_DTOR, MTXF_APPLY); sp98.x = sp98.y = 0.0f; sp98.z = 30.0f; @@ -823,9 +823,9 @@ void Area6_80187944(Boss* bossA6) { Audio_KillSfxBySource(bossA6->sfxSource); AUDIO_PLAY_SFX(0x19004051, bossA6->sfxSource, 4); bossA6->timer_050 = 20; - bossA6->obj.pos.z = gPlayer[0].camEye.z - D_ctx_80177D20 + bossA6->fwork[A6_FWK_3]; - bossA6->fwork[A6_FWK_6] = bossA6->obj.pos.x = gPlayer[0].camEye.x; - bossA6->fwork[A6_FWK_7] = bossA6->obj.pos.y = gPlayer[0].camEye.y; + bossA6->obj.pos.z = gPlayer[0].cam.eye.z - D_ctx_80177D20 + bossA6->fwork[A6_FWK_3]; + bossA6->fwork[A6_FWK_6] = bossA6->obj.pos.x = gPlayer[0].cam.eye.x; + bossA6->fwork[A6_FWK_7] = bossA6->obj.pos.y = gPlayer[0].cam.eye.y; bossA6->state = 2; bossA6->vel.x = 0.0f; bossA6->vel.y = 0.0f; @@ -852,8 +852,8 @@ void Area6_80187944(Boss* bossA6) { Math_SmoothStepToF(&bossA6->fwork[A6_FWK_35], 1.2f, 0.1f, 0.1f, 0.0f); if (D_i3_801C22F0.unk_24 < 1.0f) { - bossA6->fwork[A6_FWK_6] = RAND_FLOAT_CENTERED(1000.0f) + gPlayer[0].camEye.x; - bossA6->fwork[A6_FWK_7] = RAND_FLOAT_CENTERED(1000.0f) + gPlayer[0].camEye.y; + bossA6->fwork[A6_FWK_6] = RAND_FLOAT_CENTERED(1000.0f) + gPlayer[0].cam.eye.x; + bossA6->fwork[A6_FWK_7] = RAND_FLOAT_CENTERED(1000.0f) + gPlayer[0].cam.eye.y; bossA6->fwork[A6_FWK_3] = -3700.0f + RAND_FLOAT_CENTERED(3000.0f); bossA6->fwork[A6_FWK_34] = 2.0f; bossA6->fwork[A6_FWK_35] = 1.2f; @@ -871,9 +871,9 @@ void Area6_80187944(Boss* bossA6) { if ((bossA6->swork[A6_SWK_25] != 1) && (D_i3_801C2250[A6_BSS_0] != 2)) { bossA6->fwork[A6_FWK_3] = RAND_FLOAT_CENTERED(1000.0f) + -3700.0f; } - bossA6->obj.pos.z = gPlayer[0].camEye.z - D_ctx_80177D20 + bossA6->fwork[A6_FWK_3]; - bossA6->fwork[A6_FWK_6] = bossA6->obj.pos.x = gPlayer[0].camEye.x; - bossA6->fwork[A6_FWK_7] = bossA6->obj.pos.y = gPlayer[0].camEye.y; + bossA6->obj.pos.z = gPlayer[0].cam.eye.z - D_ctx_80177D20 + bossA6->fwork[A6_FWK_3]; + bossA6->fwork[A6_FWK_6] = bossA6->obj.pos.x = gPlayer[0].cam.eye.x; + bossA6->fwork[A6_FWK_7] = bossA6->obj.pos.y = gPlayer[0].cam.eye.y; } D_i3_801C22F0.unk_24 = 0.0f; bossA6->timer_050 = 50; @@ -1173,7 +1173,7 @@ void Area6_80187944(Boss* bossA6) { } for (var_s0 = 0; var_s0 < sp128; var_s0++) { - Matrix_RotateZ(gCalcMatrix, (360.0f / sp128) * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, (360.0f / sp128) * M_DTOR, MTXF_APPLY); sp98.x = 0.0f; sp98.y = 400.0f; sp98.z = 0.0f; @@ -1226,9 +1226,9 @@ void Area6_80187944(Boss* bossA6) { break; case 11: - if ((bossA6->timer_052 == 160) && - ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_5))) { - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_7; + if ((bossA6->timer_052 == 160) && ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || + (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN))) { + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].unk_1D0 = 0; } if (bossA6->timer_052 < 50) { @@ -1781,22 +1781,22 @@ void Area6_8018BCD4(Vec3f* arg0, f32 arg1, f32 arg2, Vec3f* arg3, s32 arg4, f32 Matrix_Push(&gGfxMatrix); Matrix_Push(&gCalcMatrix); Matrix_Copy(gCalcMatrix, &gIdentityMatrix); - Matrix_RotateZ(gCalcMatrix, M_DTOR * arg1, 1); - Matrix_Translate(gCalcMatrix, 0.0f, 100.0f, -223.0f, 1); - Matrix_RotateX(gCalcMatrix, M_DTOR * arg2, 1); + Matrix_RotateZ(gCalcMatrix, M_DTOR * arg1, MTXF_APPLY); + Matrix_Translate(gCalcMatrix, 0.0f, 100.0f, -223.0f, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, M_DTOR * arg2, MTXF_APPLY); for (i = 0; i < arg6; i++) { Matrix_Push(&gGfxMatrix); Matrix_Push(&gCalcMatrix); if (i == 11) { - Matrix_Scale(gCalcMatrix, 1.5f, 1.5f, 1.5f, 1); - Matrix_Mult(gGfxMatrix, gCalcMatrix, 1); + Matrix_Scale(gCalcMatrix, 1.5f, 1.5f, 1.5f, MTXF_APPLY); + Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_A6_600F1F0); Matrix_MultVec3f(gCalcMatrix, &sp90, arg3); } else { - Matrix_Scale(gCalcMatrix, 2.0f, 2.0f, 2.0f, 1); - Matrix_Mult(gGfxMatrix, gCalcMatrix, 1); + Matrix_Scale(gCalcMatrix, 2.0f, 2.0f, 2.0f, MTXF_APPLY); + Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_A6_6015EE0); @@ -1806,9 +1806,9 @@ void Area6_8018BCD4(Vec3f* arg0, f32 arg1, f32 arg2, Vec3f* arg3, s32 arg4, f32 } Matrix_Pop(&gGfxMatrix); Matrix_Pop(&gCalcMatrix); - Matrix_RotateY(gCalcMatrix, arg0[i].y * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, arg0[i].x * M_DTOR, 1); - Matrix_Translate(gCalcMatrix, 0.0f, 0.0f, arg5, 1); + Matrix_RotateY(gCalcMatrix, arg0[i].y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, arg0[i].x * M_DTOR, MTXF_APPLY); + Matrix_Translate(gCalcMatrix, 0.0f, 0.0f, arg5, MTXF_APPLY); } Matrix_Pop(&gGfxMatrix); } @@ -1830,19 +1830,19 @@ void Area6_8018C0D0(f32* arg0, f32 arg1, Vec3f* arg2, f32 arg3, s32 arg4) { Matrix_Push(&gCalcMatrix); Matrix_Copy(gCalcMatrix, &gIdentityMatrix); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - Matrix_RotateZ(gCalcMatrix, (D_i3_801C22F0.unk_34 + arg1) * M_DTOR, 1); - Matrix_Translate(gCalcMatrix, 0.0f, -360.0f, 120.0f, 1); - Matrix_RotateX(gCalcMatrix, -(90.0f - arg3) * M_DTOR, 1); - Matrix_Scale(gCalcMatrix, 0.7f, 0.7f, 0.7f, 1); + Matrix_RotateZ(gCalcMatrix, (D_i3_801C22F0.unk_34 + arg1) * M_DTOR, MTXF_APPLY); + Matrix_Translate(gCalcMatrix, 0.0f, -360.0f, 120.0f, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, -(90.0f - arg3) * M_DTOR, MTXF_APPLY); + Matrix_Scale(gCalcMatrix, 0.7f, 0.7f, 0.7f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); for (i = 0; i < 5; i++) { Matrix_Push(&gGfxMatrix); Matrix_Push(&gCalcMatrix); if (i == 4) { - Matrix_RotateX(gCalcMatrix, 80.0f * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, (90.0f - arg3) * M_DTOR, 1); - Matrix_Scale(gCalcMatrix, var_fs3, var_fs3, 1.0f, 1); - Matrix_Mult(gGfxMatrix, gCalcMatrix, 1); + Matrix_RotateX(gCalcMatrix, 80.0f * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, (90.0f - arg3) * M_DTOR, MTXF_APPLY); + Matrix_Scale(gCalcMatrix, var_fs3, var_fs3, 1.0f, MTXF_APPLY); + Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL(&gMasterDisp, 0x31); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, (s32) D_i3_801C22F0.r[arg4], (s32) D_i3_801C22F0.g[arg4], @@ -1853,18 +1853,18 @@ void Area6_8018C0D0(f32* arg0, f32 arg1, Vec3f* arg2, f32 arg3, s32 arg4) { } else { RCP_SetupDL(&gMasterDisp, 0x2F); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 64, 64, 192); - Matrix_Translate(gCalcMatrix, 0.0f, -60.0f, 0.0f, 1); - Matrix_Scale(gCalcMatrix, 2.0f, 3.0f, 1.0f, 1); - Matrix_RotateY(gCalcMatrix, M_DTOR * spAC, 1); - Matrix_Mult(gGfxMatrix, gCalcMatrix, 1); + Matrix_Translate(gCalcMatrix, 0.0f, -60.0f, 0.0f, MTXF_APPLY); + Matrix_Scale(gCalcMatrix, 2.0f, 3.0f, 1.0f, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, M_DTOR * spAC, MTXF_APPLY); + Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_102F5E0); } Matrix_Pop(&gCalcMatrix); Matrix_Pop(&gGfxMatrix); - Matrix_Translate(gCalcMatrix, 0.0f, -120.0f, 0.0f, 1); - Matrix_RotateX(gCalcMatrix, -20.0f * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, arg0[i] * M_DTOR, 1); + Matrix_Translate(gCalcMatrix, 0.0f, -120.0f, 0.0f, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, -20.0f * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, arg0[i] * M_DTOR, MTXF_APPLY); } Matrix_Pop(&gCalcMatrix); Matrix_Pop(&gGfxMatrix); @@ -1882,8 +1882,8 @@ void Area6_8018C54C(Boss* bossA6) { RCP_SetupDL(&gMasterDisp, 0x31); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) D_i3_801C22F0.unk_24); gDPSetEnvColor(gMasterDisp++, 255, 255, 0, 255); - Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 10.0f, 1); - Matrix_RotateZ(gGfxMatrix, bossA6->fwork[A6_FWK_33] * M_DTOR, 1); + Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 10.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, bossA6->fwork[A6_FWK_33] * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_101C2E0); } else if (D_i3_801C22F0.unk_24 != 0.0f) { @@ -1899,14 +1899,14 @@ void Area6_8018C54C(Boss* bossA6) { spAC.x = 0.0f; } spAC.y = spAC.z = 0.0f; - Matrix_RotateZ(gCalcMatrix, gGameFrameCount * 6.0f * M_DTOR, 0); + Matrix_RotateZ(gCalcMatrix, gGameFrameCount * 6.0f * M_DTOR, MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, &spAC, &spB8); - Matrix_Translate(gGfxMatrix, spB8.x, spB8.y, 0.0f, 1); - Matrix_Scale(gGfxMatrix, bossA6->unk_3F8, bossA6->unk_3F8, bossA6->unk_3F8, 1); - Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 10.0f * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, bossA6->fwork[A6_FWK_34], bossA6->fwork[A6_FWK_35], 1.0f, 1); - Matrix_RotateZ(gGfxMatrix, -(f32) gGameFrameCount * 10.0f * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, bossA6->fwork[A6_FWK_34], bossA6->fwork[A6_FWK_35], 1.0f, 1); + Matrix_Translate(gGfxMatrix, spB8.x, spB8.y, 0.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, bossA6->unk_3F8, bossA6->unk_3F8, bossA6->unk_3F8, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 10.0f * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, bossA6->fwork[A6_FWK_34], bossA6->fwork[A6_FWK_35], 1.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, -(f32) gGameFrameCount * 10.0f * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, bossA6->fwork[A6_FWK_34], bossA6->fwork[A6_FWK_35], 1.0f, MTXF_APPLY); } else { RCP_SetupDL(&gMasterDisp, 0x1B); if (bossA6->timer_05C & 1) { @@ -1925,9 +1925,9 @@ void Area6_8018C54C(Boss* bossA6) { if ((bossA6->swork[A6_SWK_33 + i] == 0) && (bossA6->state != 3) && (D_i3_801C2250[A6_BSS_2_0 + i] == 0) && ((gGameFrameCount % 4) == 0) && (bossA6->swork[A6_SWK_27 + i] != 0) && (gPlayState != 100)) { - Matrix_RotateY(gCalcMatrix, bossA6->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, bossA6->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, bossA6->obj.rot.z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, bossA6->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, bossA6->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, bossA6->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &bossA6->vwork[A6_VWK_1] + i, &spC4); func_effect_8007D0E0(bossA6->obj.pos.x + spC4.x, bossA6->obj.pos.y + spC4.y, bossA6->obj.pos.z + spC4.z, 20.0f); @@ -2037,8 +2037,8 @@ void Area6_8018C54C(Boss* bossA6) { } Matrix_Push(&gGfxMatrix); RCP_SetupDL(&gMasterDisp, 0x47); - Matrix_Translate(gGfxMatrix, 0.0f, 2.0f, 70.0f, 1); - Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.7f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 2.0f, 70.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.7f, MTXF_APPLY); if (bossA6->timer_05C & 1) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } else { @@ -2055,10 +2055,10 @@ void Area6_8018C54C(Boss* bossA6) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, bossA6->swork[A6_SWK_22], bossA6->swork[A6_SWK_23], bossA6->swork[A6_SWK_24], (s32) bossA6->fwork[A6_FWK_29]); } - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 74.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 74.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_A6_6011910); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 74.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 74.0f, MTXF_APPLY); } } @@ -2174,8 +2174,8 @@ void Area6_8018D920(Vec3f* arg0) { Vec3f sp50; Vec3f sp44; - Matrix_RotateY(gCalcMatrix, M_DTOR * sp60, 0); - Matrix_RotateX(gCalcMatrix, M_DTOR * sp5C, 1); + Matrix_RotateY(gCalcMatrix, M_DTOR * sp60, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, M_DTOR * sp5C, MTXF_APPLY); sp50.x = 0.0f; sp50.y = 0.0f; sp50.z = 100.0f; @@ -2259,8 +2259,8 @@ void Area6_8018DA58(Actor* actor) { case 90: break; } - Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -(actor->unk_0F4.x * M_DTOR), 1); + Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(actor->unk_0F4.x * M_DTOR), MTXF_APPLY); sp5C.x = 0.0f; sp5C.y = 0.0f; sp5C.z = actor->fwork[0]; @@ -2321,8 +2321,8 @@ void Area6_8018DF74(Player* player) { sp74.x = 0.0f; sp74.y = 0.0f; sp74.z = D_ctx_80177A48[5]; - Matrix_Translate(gCalcMatrix, 0.0f, 350.0f, D_ctx_80177A48[6], 0); - Matrix_RotateY(gCalcMatrix, -(D_ctx_80177A48[4] * M_DTOR), 1); + Matrix_Translate(gCalcMatrix, 0.0f, 350.0f, D_ctx_80177A48[6], MTXF_NEW); + Matrix_RotateY(gCalcMatrix, -(D_ctx_80177A48[4] * M_DTOR), MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &sp74, &sp68); gCsCamEyeX = sp68.x; gCsCamEyeY = sp68.y; @@ -2372,7 +2372,7 @@ void Area6_8018DF74(Player* player) { player->unk_0D0 = player->pos.z = 0.0f; } if (gCsFrameCount == 540) { - D_ctx_80178488 = 1; + gLoadLevelObjects = 1; gLevelStatusScreenTimer = 50; player->pos.x = 0.0f; player->pos.z = 0.0f; @@ -2382,7 +2382,7 @@ void Area6_8018DF74(Player* player) { player->timer_1F8 = 0; AUDIO_PLAY_BGM(SEQ_ID_AREA_6 | SEQ_FLAG); - player->state_1C8 = PLAYERSTATE_1C8_3; + player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; } break; } @@ -2448,9 +2448,9 @@ void Area6_8018DF74(Player* player) { func_play_800A6148(); break; } - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + player->unk_114 + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), 1); - if (player->state_1C8 != PLAYERSTATE_1C8_3) { + Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + player->unk_114 + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), MTXF_APPLY); + if (player->state_1C8 != PLAYERSTATE_1C8_ACTIVE) { sp74.x = 0.0f; sp74.y = 0.0f; sp74.z = player->unk_0D0; @@ -2464,12 +2464,12 @@ void Area6_8018DF74(Player* player) { player->unk_138 = player->pos.z; } player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; - Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0.001f); - Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0.001f); - Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0.001f); - Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_ctx_80177A48[1], 50000.0f, 0.001f); - Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_ctx_80177A48[1], 50000.0f, 0.001f); - Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_ctx_80177A48[1], 50000.0f, 0.001f); + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0.001f); + Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0.001f); + Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0.001f); + Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[1], 50000.0f, 0.001f); + Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[1], 50000.0f, 0.001f); + Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[1], 50000.0f, 0.001f); } void Area6_8018EA88(Actor* actor) { @@ -2552,7 +2552,7 @@ void Area6_8018ED78(Player* player) { case 0: gCsFrameCount = 0; player->unk_1D0 = 1; - player->wings.unk_2C = 1; + player->wings.modelId = 1; player->unk_194 = 5.0f; player->unk_190 = 2.0f; player->unk_0D0 = 60.0f; @@ -2562,7 +2562,7 @@ void Area6_8018ED78(Player* player) { case 1: Math_SmoothStepToAngle(&player->unk_130, 0.0f, 0.05f, 1.2f, 0.0001f); Math_SmoothStepToAngle(&player->unk_12C, 0.0f, 0.05f, 1.2f, 0.0001f); - Math_SmoothStepToF(&player->unk_034, 0.0f, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f); Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 20.0f, 0.0f); if (gCsFrameCount < 60) { spf90.x = -100.0f; @@ -2588,9 +2588,9 @@ void Area6_8018ED78(Player* player) { Math_SmoothStepToF(&gCsCamEyeX, gBosses[0].obj.pos.x, 0.05f, 1000.0f, 0.001f); Math_SmoothStepToF(&gCsCamEyeY, gBosses[0].obj.pos.y, 0.05f, 1000.0f, 0.001f); Math_SmoothStepToF(&gCsCamEyeZ, gBosses[0].obj.pos.z + D_ctx_80177D20, 0.05f, 10.0f, 0.0001f); - player->camEye.x = gCsCamEyeX; - player->camEye.y = gCsCamEyeY; - player->camEye.z = gCsCamEyeZ; + player->cam.eye.x = gCsCamEyeX; + player->cam.eye.y = gCsCamEyeY; + player->cam.eye.z = gCsCamEyeZ; gCsCamAtX = gBosses[0].obj.pos.x; gCsCamAtY = gBosses[0].obj.pos.y; @@ -2654,7 +2654,7 @@ void Area6_8018ED78(Player* player) { player->pos.y = 200.0f; player->pos.z = 1000.0f; player->unk_08C = player->unk_0EC = player->unk_0E8 = player->unk_0E4 = player->unk_0D0 = - player->unk_110 = player->unk_034 = player->unk_12C = player->unk_130 = player->unk_4D8 = 0.0f; + player->unk_110 = player->camRoll = player->unk_12C = player->unk_130 = player->unk_4D8 = 0.0f; D_bg_8015F984 = (D_ctx_80177D20 * 0.00004f) + 0.5f; Area6_8018EC38(&gActors[1], 0); @@ -2664,9 +2664,9 @@ void Area6_8018ED78(Player* player) { D_ctx_80177A48[5] = 300.0f; D_ctx_80177A48[4] = 0.0f; D_ctx_80177A48[9] = 50.0f; - player->camAt.x = gCsCamAtX = player->pos.x; - player->camAt.y = gCsCamAtY = 0.0f; - player->camAt.z = gCsCamAtZ = player->pos.z + 50.0f + D_ctx_80177D20; + player->cam.at.x = gCsCamAtX = player->pos.x; + player->cam.at.y = gCsCamAtY = 0.0f; + player->cam.at.z = gCsCamAtZ = player->pos.z + 50.0f + D_ctx_80177D20; } if (gFillScreenAlpha != 0) { gFillScreenAlphaTarget = 0; @@ -2704,19 +2704,19 @@ void Area6_8018ED78(Player* player) { Math_SmoothStepToF(&D_ctx_80177A48[5], 0.0f, 0.1f, 1000.0f, 0.001f); D_bg_8015F984 -= 0.005f; gCsCamAtX += 2.0f; - player->camAt.x = gCsCamAtX = player->pos.x; - player->camAt.y = gCsCamAtY = 0.0f; - player->camAt.z = gCsCamAtZ = D_ctx_80177A48[9] + player->pos.z + D_ctx_80177D20; + player->cam.at.x = gCsCamAtX = player->pos.x; + player->cam.at.y = gCsCamAtY = 0.0f; + player->cam.at.z = gCsCamAtZ = D_ctx_80177A48[9] + player->pos.z + D_ctx_80177D20; } sp78.x = 0.0f; sp78.y = 0.0f; sp78.z = D_ctx_80177A48[5]; - Matrix_Translate(gCalcMatrix, D_ctx_80177A48[1], 0.0f, D_ctx_80177A48[3] + D_ctx_80177D20, 0); - Matrix_RotateY(gCalcMatrix, -(D_ctx_80177A48[4] * M_DTOR), 1); + Matrix_Translate(gCalcMatrix, D_ctx_80177A48[1], 0.0f, D_ctx_80177A48[3] + D_ctx_80177D20, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, -(D_ctx_80177A48[4] * M_DTOR), MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &sp78, &sp6C); - player->camEye.x = gCsCamEyeX = sp6C.x; - player->camEye.y = gCsCamEyeY = sp6C.y; - player->camEye.z = gCsCamEyeZ = sp6C.z; + player->cam.eye.x = gCsCamEyeX = sp6C.x; + player->cam.eye.y = gCsCamEyeY = sp6C.y; + player->cam.eye.z = gCsCamEyeZ = sp6C.z; if (gCsFrameCount == 1076) { Object_Kill(&gActors[0].obj, gActors[0].sfxSource); @@ -2796,8 +2796,8 @@ void Area6_8018ED78(Player* player) { if (gCsFrameCount >= 1076) { Math_SmoothStepToF(&player->unk_0D0, 50.0f, 0.1f, 1000.0f, 0.001f); } - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + player->unk_114 + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), 1); + Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + player->unk_114 + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), MTXF_APPLY); sp78.x = 0.0f; sp78.y = 0.0f; sp78.z = player->unk_0D0; @@ -2810,10 +2810,10 @@ void Area6_8018ED78(Player* player) { player->pos.z += player->vel.z; player->unk_138 = player->pos.z; player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; - Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0.0001f); - Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0.0001f); - Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0.0001f); - Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0.0001f); - Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0.0001f); - Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0.0001f); + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0.0001f); + Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0.0001f); + Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0.0001f); + Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0.0001f); + Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0.0001f); + Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0.0001f); } diff --git a/src/overlays/ovl_i3/fox_aq.c b/src/overlays/ovl_i3/fox_aq.c index ecb173f5..eaaa47e1 100644 --- a/src/overlays/ovl_i3/fox_aq.c +++ b/src/overlays/ovl_i3/fox_aq.c @@ -394,18 +394,18 @@ f32 Aquas_801A958C(s32 arg0, f32 arg1) { } void Aquas_801A95C8(void) { - Math_SmoothStepToF(&gPlayer[0].camEye.x, gCsCamEyeX, 0.1f, 50.0f, 0.0001f); - Math_SmoothStepToF(&gPlayer[0].camEye.y, gCsCamEyeY, 0.1f, 50.0f, 0.0001f); - Math_SmoothStepToF(&gPlayer[0].camEye.z, gCsCamEyeZ, 0.1f, 50.0f, 0.0001f); + Math_SmoothStepToF(&gPlayer[0].cam.eye.x, gCsCamEyeX, 0.1f, 50.0f, 0.0001f); + Math_SmoothStepToF(&gPlayer[0].cam.eye.y, gCsCamEyeY, 0.1f, 50.0f, 0.0001f); + Math_SmoothStepToF(&gPlayer[0].cam.eye.z, gCsCamEyeZ, 0.1f, 50.0f, 0.0001f); - Math_SmoothStepToF(&gPlayer[0].camAt.x, gCsCamAtX, 0.1f, 50.0f, 0.0001f); - Math_SmoothStepToF(&gPlayer[0].camAt.y, gCsCamAtY, 0.1f, 50.0f, 0.0001f); - Math_SmoothStepToF(&gPlayer[0].camAt.z, gCsCamAtZ, 0.1f, 50.0f, 0.0001f); + Math_SmoothStepToF(&gPlayer[0].cam.at.x, gCsCamAtX, 0.1f, 50.0f, 0.0001f); + Math_SmoothStepToF(&gPlayer[0].cam.at.y, gCsCamAtY, 0.1f, 50.0f, 0.0001f); + Math_SmoothStepToF(&gPlayer[0].cam.at.z, gCsCamAtZ, 0.1f, 50.0f, 0.0001f); } void Aquas_801A96DC(Actor* actor) { - actor->obj.rot.y = RAD_TO_DEG(-gPlayer[0].unk_058); - actor->obj.rot.x = RAD_TO_DEG(gPlayer[0].unk_05C); + actor->obj.rot.y = RAD_TO_DEG(-gPlayer[0].camYaw); + actor->obj.rot.x = RAD_TO_DEG(gPlayer[0].camPitch); } void Aquas_801A9728(Actor* actor, f32 radius, f32 scale, s32 spread) { @@ -577,8 +577,8 @@ void Aquas_801A9ED0(Player* player) { Vec3f sp64; f32* tempy; - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, MTXF_APPLY); sp70.x = 0.0f; sp70.y = 0.0f; @@ -648,12 +648,12 @@ void Aquas_801AA20C(void) { } Matrix_Translate(gGfxMatrix, D_i3_801C41B8[0] + var_fs1, D_i3_801C41B8[1] + var_fs2, - D_i3_801C41B8[2] + gPlayer[0].unk_144, 1); - Matrix_Scale(gGfxMatrix, D_i3_801C41B8[5], D_i3_801C41B8[5], D_i3_801C41B8[5], 1); + D_i3_801C41B8[2] + gPlayer[0].unk_144, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, D_i3_801C41B8[5], D_i3_801C41B8[5], D_i3_801C41B8[5], MTXF_APPLY); for (i = 0; i < 4; i++) { - Matrix_RotateZ(gGfxMatrix, M_PI / 2, 1); - Matrix_Translate(gGfxMatrix, var_fs1, var_fs2, 0.0f, 1); + Matrix_RotateZ(gGfxMatrix, M_PI / 2, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, var_fs1, var_fs2, 0.0f, MTXF_APPLY); Matrix_Push(&gGfxMatrix); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_blue_marine_3000470); @@ -661,8 +661,9 @@ void Aquas_801AA20C(void) { } } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); - Matrix_Translate(gGfxMatrix, D_i3_801C41B8[0], D_i3_801C41B8[1], D_i3_801C41B8[2] + gPlayer[0].unk_144, 1); - Matrix_Scale(gGfxMatrix, D_i3_801C41B8[5], D_i3_801C41B8[5], D_i3_801C41B8[5], 1); + Matrix_Translate(gGfxMatrix, D_i3_801C41B8[0], D_i3_801C41B8[1], D_i3_801C41B8[2] + gPlayer[0].unk_144, + MTXF_APPLY); + Matrix_Scale(gGfxMatrix, D_i3_801C41B8[5], D_i3_801C41B8[5], D_i3_801C41B8[5], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_blue_marine_3000130); } @@ -787,7 +788,7 @@ void Aquas_801AA8E8(Player* player) { f32 var_fv1 = -gInputPress->stick_y; f32 temp; - if (player->state_1C8 != PLAYERSTATE_1C8_3) { + if (player->state_1C8 != PLAYERSTATE_1C8_ACTIVE) { var_fv0 = var_fv1 = 0.0f; } @@ -821,19 +822,19 @@ void Aquas_801AA8E8(Player* player) { gCsCamEyeZ = 240.0f; gCsCamAtZ = player->unk_138 + (D_ctx_80177D20 - 1.0f); - Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, player->unk_014, 1000.0f, 0); - Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, player->unk_014, 1000.0f, 0); - Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, 0.2f, 30.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, player->unk_014, 1000.0f, 0); + Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, player->unk_014, 1000.0f, 0); + Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, 0.2f, 30.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, player->unk_014, 1000.0f, 0); - Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, player->unk_014, 1000.0f, 0); - Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, player->unk_014, 1000.0f, 0); + Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, player->unk_014, 1000.0f, 0); + Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, player->unk_014, 1000.0f, 0); + Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, player->unk_014, 1000.0f, 0); Math_SmoothStepToF(&player->unk_014, 1.0f, 1.0f, 0.05f, 0.0f); temp = -player->unk_0EC; - Math_SmoothStepToF(&player->unk_034, temp * 0.3f, 0.1f, 1.5f, 0.0f); + Math_SmoothStepToF(&player->camRoll, temp * 0.3f, 0.1f, 1.5f, 0.0f); } void Aquas_801AACF8(Player* player) { @@ -950,8 +951,8 @@ void Aquas_801AACF8(Player* player) { player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), 1); + Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); sp8C.x = sp8C.y = 0.0f; sp8C.z = player->unk_0D0; @@ -961,8 +962,8 @@ void Aquas_801AACF8(Player* player) { sp68.x *= 1.4f; sp68.y *= 1.4f; - Matrix_RotateY(gCalcMatrix, player->unk_114 * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, player->unk_120 * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, player->unk_114 * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, player->unk_120 * M_DTOR, MTXF_APPLY); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp68, &sp80); @@ -1028,8 +1029,8 @@ void Aquas_801AACF8(Player* player) { player->unk_0F0 = SIN_DEG(player->unk_0F4) * 1.5f; if (player->pos.y < (D_ctx_80177CC0 + 50.0f)) { - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + player->unk_114) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + player->unk_114) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, MTXF_APPLY); sp8C.x = sp8C.y = 0.0f; sp8C.z = 70.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp8C, &sp80); @@ -1053,7 +1054,7 @@ void Aquas_801AB9B0(Player* player) { func_effect_8007D0E0(player->pos.x, player->pos.y, player->unk_138, 6.0f); func_effect_8007B344(player->pos.x, player->pos.y, player->unk_138, 3.0f, 5); func_effect_8007BFFC(player->pos.x, player->pos.y, player->unk_138, 0.0f, 0.0f, 0.0f, 3.0f, 80); - func_demo_8004D440(player); + Cutscene_KillPlayer(player); } void Aquas_801ABA40(PlayerShot* shot) { @@ -1069,9 +1070,9 @@ void Aquas_801ABA40(PlayerShot* shot) { D_i3_801C41B8[22] = shot->obj.pos.y; D_i3_801C41B8[23] = shot->obj.pos.z; - if ((fabsf(shot->obj.pos.z - (gPlayer[0].camEye.z - D_ctx_80177D20)) > 10000.0f) || - (fabsf(shot->obj.pos.y - gPlayer[0].camEye.y) > 1500.0f) || - ((fabsf(shot->obj.pos.x - gPlayer[0].camEye.x) > 4000.0f) && (shot->unk_5C != 0))) { + if ((fabsf(shot->obj.pos.z - (gPlayer[0].cam.eye.z - D_ctx_80177D20)) > 10000.0f) || + (fabsf(shot->obj.pos.y - gPlayer[0].cam.eye.y) > 1500.0f) || + ((fabsf(shot->obj.pos.x - gPlayer[0].cam.eye.x) > 4000.0f) && (shot->unk_5C != 0))) { shot->unk_64 = 0; } @@ -1139,8 +1140,8 @@ void Aquas_801ABA40(PlayerShot* shot) { Math_SmoothStepToF(&shot->unk_54, D_i3_801C4458, 0.1f, 50.0f, 0.0001f); } - Matrix_RotateY(gCalcMatrix, shot->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, shot->obj.rot.x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, shot->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, shot->obj.rot.x * M_DTOR, MTXF_APPLY); sp60.x = sp60.y = 0.0f; sp60.z = shot->unk_54; Matrix_MultVec3f(gCalcMatrix, &sp60, &sp54); @@ -1220,8 +1221,8 @@ void Aquas_801AC274(Player* player) { D_i3_801C4190[5] = D_i3_801C4190[3] = 0; } - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + player->unk_114) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + player->unk_114) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, MTXF_APPLY); sp68.x = 0.0f; sp68.y = 0.0f; @@ -1363,8 +1364,8 @@ void Aquas_801AC918(Effect* effect) { } effect->scale1 += 33.0f; temp_fs0 = COS_DEG(effect->scale1) * 1.5f; - effect->vel.x = __cosf(gPlayer[0].unk_058) * temp_fs0; - effect->vel.z = __sinf(gPlayer[0].unk_058) * temp_fs0; + effect->vel.x = __cosf(gPlayer[0].camYaw) * temp_fs0; + effect->vel.z = __sinf(gPlayer[0].camYaw) * temp_fs0; break; case 1: @@ -1389,38 +1390,38 @@ void Aquas_801AC918(Effect* effect) { } effect->scale1 += 55.0f; temp_fs0 = COS_DEG(effect->scale1) * 2.5f; - effect->vel.x = __cosf(gPlayer[0].unk_058) * temp_fs0; - effect->vel.z = __sinf(gPlayer[0].unk_058) * temp_fs0; + effect->vel.x = __cosf(gPlayer[0].camYaw) * temp_fs0; + effect->vel.z = __sinf(gPlayer[0].camYaw) * temp_fs0; break; } } void Aquas_801ACBB4(Player* player) { - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -40.0f, 1); - Matrix_RotateY(gGfxMatrix, M_PI, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -40.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_blue_marine_3000C70); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, -4.5f, 1.2f, 1); - Matrix_RotateZ(gGfxMatrix, player->unk_178 * M_DTOR, 1); + Matrix_Translate(gGfxMatrix, 0.0f, -4.5f, 1.2f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, player->unk_178 * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_blue_marine_3006DE0); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, 2.0f, 40.0f, 1); - Matrix_RotateY(gGfxMatrix, -player->unk_180 * M_DTOR, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 2.0f, 40.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, -player->unk_180 * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_blue_marine_3006C70); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, -19.0f, -3.6f, 1.2f, 1); - Matrix_RotateX(gGfxMatrix, player->unk_17C * M_DTOR, 1); + Matrix_Translate(gGfxMatrix, -19.0f, -3.6f, 1.2f, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, player->unk_17C * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_blue_marine_3000AF0); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 19.0f, -3.6f, 1.2f, 1); - Matrix_RotateX(gGfxMatrix, player->unk_17C * M_DTOR, 1); + Matrix_Translate(gGfxMatrix, 19.0f, -3.6f, 1.2f, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, player->unk_17C * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_blue_marine_3006AF0); Matrix_Pop(&gGfxMatrix); @@ -1437,8 +1438,8 @@ void Aquas_801ACE50(Player* player) { if (player->timer_27C != 0) { player->timer_27C--; player->unk_110 += 0.3f; - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + player->unk_114) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + player->unk_114) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, MTXF_APPLY); sp54.x = sp54.y = 0.0f; sp54.z = 70.0f; @@ -1474,7 +1475,7 @@ void Aquas_801ACE50(Player* player) { } if ((gBoostButton[player->num] & gInputHold->button) && (player->unk_230 == 0) && - (player->state_1C8 != PLAYERSTATE_1C8_5) && (player->unk_2B4 == 0)) { + (player->state_1C8 != PLAYERSTATE_1C8_U_TURN) && (player->unk_2B4 == 0)) { if (player->unk_2BC == 0) { AUDIO_PLAY_SFX(0x9004030, player->sfxSource, 4); } @@ -1514,7 +1515,7 @@ void Aquas_801ACE50(Player* player) { void Aquas_801AD328(Player* player) { player->sfx.brake = 0; if ((gBrakeButton[player->num] & gInputHold->button) && (player->unk_230 == 0) && - (player->state_1C8 != PLAYERSTATE_1C8_5) && (player->unk_2B4 == 0)) { + (player->state_1C8 != PLAYERSTATE_1C8_U_TURN) && (player->unk_2B4 == 0)) { if (player->unk_2BC == 0) { AUDIO_PLAY_SFX(0x9004031, player->sfxSource, 4); } @@ -1688,8 +1689,8 @@ void Aquas_801AD6C0(Actor* actor) { Math_SmoothStepToAngle(&actor->unk_0F4.y, sp68, 1.0f, 5.0f, 0.001f); Math_SmoothStepToAngle(&actor->unk_0F4.x, sp6C, 1.0f, 5.0f, 0.001f); - Matrix_RotateY(gCalcMatrix, actor->unk_0F4.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, actor->unk_0F4.x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, actor->unk_0F4.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, actor->unk_0F4.x * M_DTOR, MTXF_APPLY); sp5C.x = 0.0f; sp5C.y = 0.0f; @@ -1742,11 +1743,11 @@ void Aquas_801AD6C0(Actor* actor) { void Aquas_801ADF7C(f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 zRot, u8 type, s32 flag, f32 scale, s32 index) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, xPos, yPos, zPos + D_ctx_80177D20, 1); + Matrix_Translate(gGfxMatrix, xPos, yPos, zPos + D_ctx_80177D20, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, M_DTOR * yRot, 1); - Matrix_RotateX(gGfxMatrix, M_DTOR * xRot, 1); - Matrix_RotateZ(gGfxMatrix, M_DTOR * zRot, 1); + Matrix_RotateY(gGfxMatrix, M_DTOR * yRot, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_DTOR * xRot, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, M_DTOR * zRot, MTXF_APPLY); Graphics_SetScaleMtx(scale); @@ -1800,12 +1801,12 @@ void Aquas_801AE168(Actor* actor) { yRot = D_i3_801C27C0->rot.y; if (i >= 2) { - yRot = RAD_TO_DEG(Math_Atan2F(gPlayer[0].camEye.x - D_i3_801C27C0->pos.x, - gPlayer[0].camEye.z - (D_i3_801C27C0->pos.z + D_ctx_80177D20))); - xz = sqrtf(((gPlayer[0].camEye.z - (D_i3_801C27C0->pos.z + D_ctx_80177D20)) * - (gPlayer[0].camEye.z - (D_i3_801C27C0->pos.z + D_ctx_80177D20))) + - ((gPlayer[0].camEye.x - D_i3_801C27C0->pos.x) * (gPlayer[0].camEye.x - D_i3_801C27C0->pos.x))); - xRot = RAD_TO_DEG(-Math_Atan2F(gPlayer[0].camEye.y - D_i3_801C27C0->pos.y, xz)); + yRot = RAD_TO_DEG(Math_Atan2F(gPlayer[0].cam.eye.x - D_i3_801C27C0->pos.x, + gPlayer[0].cam.eye.z - (D_i3_801C27C0->pos.z + D_ctx_80177D20))); + xz = sqrtf(((gPlayer[0].cam.eye.z - (D_i3_801C27C0->pos.z + D_ctx_80177D20)) * + (gPlayer[0].cam.eye.z - (D_i3_801C27C0->pos.z + D_ctx_80177D20))) + + ((gPlayer[0].cam.eye.x - D_i3_801C27C0->pos.x) * (gPlayer[0].cam.eye.x - D_i3_801C27C0->pos.x))); + xRot = RAD_TO_DEG(-Math_Atan2F(gPlayer[0].cam.eye.y - D_i3_801C27C0->pos.y, xz)); } Aquas_801ADF7C(D_i3_801C27C0->pos.x, D_i3_801C27C0->pos.y, D_i3_801C27C0->pos.z, xRot, yRot, @@ -2016,7 +2017,7 @@ void Aquas_801AEB44(Actor* actor) { } Matrix_Scale(gGfxMatrix, actor->fwork[1] - 0.25f + ((1.5f - actor->scale) * 0.5f), actor->scale, actor->fwork[1], - 1); + MTXF_APPLY); if (actor->state != 0) { RCP_SetupDL(&gMasterDisp, 0x20); } else if (gBosses[0].swork[AQ_SWK_0] == 1) { @@ -2210,9 +2211,9 @@ void Aquas_801AFA5C(Actor* actor) { actor->iwork[3] = i + 1; sp48->iwork[0] = actor->iwork[0]; sp48->iwork[2] = actor->index + 1; - Matrix_RotateY(gCalcMatrix, sp48->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, sp48->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, sp48->obj.rot.z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, sp48->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, sp48->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, sp48->obj.rot.z * M_DTOR, MTXF_APPLY); sp58.x = sp58.y = 0.0f; sp58.z = 60.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp58, &sp4C); @@ -2312,10 +2313,10 @@ void Aquas_801AFA5C(Actor* actor) { // OBJ_ACTOR_257 draw void Aquas_801B099C(Actor* actor) { - Matrix_RotateY(gGfxMatrix, (actor->obj.rot.x + actor->fwork[3]) * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, (actor->obj.rot.y + actor->fwork[4]) * M_DTOR, 1); - Matrix_RotateZ(gGfxMatrix, (actor->obj.rot.z + actor->fwork[5]) * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, actor->fwork[0], actor->fwork[1], actor->fwork[2], 1); + Matrix_RotateY(gGfxMatrix, (actor->obj.rot.x + actor->fwork[3]) * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, (actor->obj.rot.y + actor->fwork[4]) * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, (actor->obj.rot.z + actor->fwork[5]) * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, actor->fwork[0], actor->fwork[1], actor->fwork[2], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if ((actor->timer_0C6 % 2) == 0) { RCP_SetupDL(&gMasterDisp, 0x39); @@ -2349,8 +2350,8 @@ void Aquas_801B0B60(Actor* actor) { switch (actor->state) { case 0: if (actor->timer_0BC == 0) { - Matrix_RotateY(gCalcMatrix, actor->fwork[2] * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, actor->fwork[1] * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, actor->fwork[2] * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, actor->fwork[1] * M_DTOR, MTXF_APPLY); sp44.x = sp44.y = 0.0f; sp44.z = 50.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); @@ -2367,8 +2368,8 @@ void Aquas_801B0B60(Actor* actor) { case 1: if (actor->timer_0BE == 0) { - Matrix_RotateY(gCalcMatrix, actor->fwork[4] * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, actor->fwork[3] * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, actor->fwork[4] * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, actor->fwork[3] * M_DTOR, MTXF_APPLY); sp44.x = sp44.y = 0.0f; sp44.z = 30.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); @@ -2939,9 +2940,9 @@ void Aquas_801B134C(Boss* bossAQ) { func_boss_80042EC0(bossAQ); Radio_PlayMessage(gMsg_ID_15252, RCID_SLIPPY); D_ctx_8017796C = -1; - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) || - (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_5)) { - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_7; + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || + (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].unk_1D0 = 0; } D_i3_801C4190[1] = 0; @@ -3459,16 +3460,16 @@ bool Aquas_801B42AC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th } if (sp5C > 0.0f) { - Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, 1); - Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, 1); + Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, MTXF_APPLY); if (*dList != NULL) { Matrix_MultVec3f(gCalcMatrix, &sp6C, &sp60); func_edisplay_8005F670(&sp60); - Matrix_Mult(gGfxMatrix, gCalcMatrix, 1); + Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_Push(&gGfxMatrix); - Matrix_Scale(gGfxMatrix, sp5C, sp58, sp54, 1); + Matrix_Scale(gGfxMatrix, sp5C, sp58, sp54, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, *dList); Matrix_Pop(&gGfxMatrix); @@ -3646,7 +3647,7 @@ void Aquas_801B4E94(s32 limbIndex, Vec3f* rot, void* thisx) { void Aquas_801B504C(Actor* actor) { Vec3f sp30[30]; - Matrix_Scale(gCalcMatrix, actor->scale, actor->scale, actor->scale, 1); + Matrix_Scale(gCalcMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY); Animation_GetFrameData(&D_AQ_6005954, actor->unk_0B6, sp30); Animation_DrawSkeleton(3, D_AQ_6005A80, sp30, Aquas_801B4DDC, Aquas_801B4E94, actor, gCalcMatrix); } @@ -3740,8 +3741,8 @@ void Aquas_801B50E8(Actor* actor) { sp88.z = gPlayer[0].unk_138 - actor->obj.pos.z; actor->fwork[2] = Math_RadToDeg(Math_Atan2F(sp88.x, sp88.z)); actor->fwork[3] = Math_RadToDeg(-Math_Atan2F(sp88.y, sqrtf(SQ(sp88.x) + SQ(sp88.z)))); - Matrix_RotateY(gCalcMatrix, actor->fwork[2] * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, actor->fwork[3] * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, actor->fwork[2] * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, actor->fwork[3] * M_DTOR, MTXF_APPLY); sp7C.x = sp7C.y = 0.0f; sp7C.z = 40.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp7C, &sp70); @@ -3849,16 +3850,16 @@ bool Aquas_801B5C18(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th } if (sp6C != 1.0f) { - Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, 1); - Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, 1); + Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, MTXF_APPLY); if (*dList != NULL) { Matrix_MultVec3f(gCalcMatrix, &sp4C, &sp58); func_edisplay_8005F670(&sp58); - Matrix_Mult(gGfxMatrix, gCalcMatrix, 1); + Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_Push(&gGfxMatrix); - Matrix_Scale(gGfxMatrix, sp6C, sp68, sp64, 1); + Matrix_Scale(gGfxMatrix, sp6C, sp68, sp64, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, *dList); Matrix_Pop(&gGfxMatrix); @@ -3934,14 +3935,14 @@ void Aquas_801B619C(Actor* actor) { Matrix_Push(&gCalcMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Scale(gCalcMatrix, actor->scale, actor->scale, actor->scale, 1); + Matrix_Scale(gCalcMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY); Animation_GetFrameData(&D_AQ_6002628, actor->unk_0B6, sp40); Animation_DrawSkeleton(3, D_AQ_6002874, sp40, Aquas_801B5C18, Aquas_801B5F68, actor, gCalcMatrix); Matrix_Pop(&gGfxMatrix); Matrix_Pop(&gCalcMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, actor->fwork[8], actor->fwork[9], actor->fwork[10], 1); - Matrix_Scale(gGfxMatrix, actor->fwork[5], actor->fwork[6], actor->fwork[7], 1); + Matrix_Translate(gGfxMatrix, actor->fwork[8], actor->fwork[9], actor->fwork[10], MTXF_APPLY); + Matrix_Scale(gGfxMatrix, actor->fwork[5], actor->fwork[6], actor->fwork[7], MTXF_APPLY); RCP_SetupDL(&gMasterDisp, 0x31); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) actor->iwork[12]); gDPSetEnvColor(gMasterDisp++, 127, 127, 0, (s32) actor->iwork[12]); @@ -4030,7 +4031,7 @@ void Aquas_801B638C(Actor* actor) { actor->vwork[9 + i].y = actor->obj.rot.y; actor->vwork[9 + i].z = actor->obj.rot.z; } - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); sp8C.x = sp8C.y = 0.0f; sp8C.z = -1400.0f; if (actor->iwork[14] != 0) { @@ -4085,8 +4086,8 @@ void Aquas_801B638C(Actor* actor) { } Math_SmoothStepToAngle(&actor->obj.rot.x, temp_fscc, 0.1f, 100.0f, 0.001f); - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); sp8C.x = sp8C.y = 0.0f; sp8C.z = 10.0f; @@ -4210,8 +4211,8 @@ void Aquas_801B6FF8(Actor* actor) { temp_dz = 20.0f; } Math_SmoothStepToAngle(&actor->obj.rot.z, temp_dz, 0.1f, 1.0f, 0.f); - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); sp9C.x = sp9C.y = 0.0f; sp9C.z = 10.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp9C, &sp90); @@ -4220,8 +4221,8 @@ void Aquas_801B6FF8(Actor* actor) { actor->vel.z = sp90.z - 20.0f; break; case 1: - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); sp9C.y = sp9C.x = 0.0f; sp9C.z = 19.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp9C, &sp90); @@ -4443,8 +4444,8 @@ void Aquas_801B7C78(Actor* actor) { } Math_SmoothStepToF(&actor->fwork[1], actor->fwork[2], 0.1f, 2.0f, 0.00001f); - Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].camEye.z - D_ctx_80177D20 + actor->fwork[3], 0.1f, actor->fwork[1], - 0.00001); + Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].cam.eye.z - D_ctx_80177D20 + actor->fwork[3], 0.1f, + actor->fwork[1], 0.00001); if ((actor->state == 1) && (fabsf(actor->fwork[7] - actor->obj.pos.z) >= 10000.0f)) { actor->timer_0C0 = 20; @@ -4522,7 +4523,7 @@ void Aquas_801B7C78(Actor* actor) { } } - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); if ((actor->unk_0B6 < 21) && (actor->state == 4) && (actor->iwork[3] != 0)) { j = actor->iwork[3] - 1; @@ -4535,8 +4536,8 @@ void Aquas_801B7C78(Actor* actor) { temp_fs2 = Math_RadToDeg(Math_Atan2F(spAC, temp_dz)); temp1 = Math_RadToDeg(-Math_Atan2F(temp_dy, sqrtf(SQ(spAC) + SQ(temp_dz)))); - Matrix_RotateY(gCalcMatrix, M_DTOR * temp_fs2, 0); - Matrix_RotateX(gCalcMatrix, M_DTOR * temp1, 1); + Matrix_RotateY(gCalcMatrix, M_DTOR * temp_fs2, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, M_DTOR * temp1, MTXF_APPLY); sp90.x = sp90.y = 0.0f; sp90.z = 30.0f; @@ -4569,8 +4570,8 @@ void Aquas_801B7C78(Actor* actor) { temp_fs2 = Math_RadToDeg(Math_Atan2F(spAC, temp_dz)); temp1 = Math_RadToDeg(-Math_Atan2F(temp_dy, sqrtf(SQ(spAC) + SQ(temp_dz)))); - Matrix_RotateY(gCalcMatrix, M_DTOR * temp_fs2, 0); - Matrix_RotateX(gCalcMatrix, M_DTOR * temp1, 1); + Matrix_RotateY(gCalcMatrix, M_DTOR * temp_fs2, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, M_DTOR * temp1, MTXF_APPLY); sp90.x = sp90.y = 0.0f; sp90.z = 50.0f; @@ -4604,8 +4605,8 @@ void Aquas_801B7C78(Actor* actor) { temp_dy = gPlayer[0].pos.y - 50.0f - actor->obj.pos.y; temp_dz = gPlayer[0].unk_138 - actor->obj.pos.z; temp1 = Math_RadToDeg(-Math_Atan2F(temp_dy, sqrtf(SQ(spAC) + SQ(temp_dz)))); - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, M_DTOR * temp1, 1); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, M_DTOR * temp1, MTXF_APPLY); sp90.x = sp90.y = 0.0f; sp90.z = 40.0f; @@ -4792,7 +4793,7 @@ void Aquas_801B90DC(Actor* actor) { } else { Animation_GetFrameData(&D_AQ_6024F80, actor->unk_0B6, sp30); } - Matrix_Translate(gCalcMatrix, 0.0f, -150.0f, 100.0f, 1); + Matrix_Translate(gCalcMatrix, 0.0f, -150.0f, 100.0f, MTXF_APPLY); Animation_DrawSkeleton(3, D_AQ_602512C, sp30, Aquas_801B8C50, Aquas_801B8D7C, actor, gCalcMatrix); } @@ -4810,8 +4811,8 @@ void Aquas_801B91A4(Actor* actor) { f32 spf98; f32 sp94; - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); if ((actor->health == 0) && (actor->state > 0)) { actor->itemDrop = DROP_NONE; @@ -4907,8 +4908,8 @@ void Aquas_801B91A4(Actor* actor) { spf9C = gPlayer[0].unk_138 + RAND_FLOAT_CENTERED(200.0f) - actor->vwork[26].z; sp94 = Math_RadToDeg(Math_Atan2F(spfA4, spf9C)); spf98 = Math_RadToDeg(-Math_Atan2F(spA0, sqrtf(SQ(spfA4) + SQ(spf9C)))); - Matrix_RotateY(gCalcMatrix, M_DTOR * sp94, 0); - Matrix_RotateX(gCalcMatrix, M_DTOR * spf98, 1); + Matrix_RotateY(gCalcMatrix, M_DTOR * sp94, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, M_DTOR * spf98, MTXF_APPLY); spC4.x = spC4.y = 0.0f; spC4.z = 70.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &spC4, &spAC); @@ -4941,9 +4942,9 @@ void Aquas_801B91A4(Actor* actor) { actor->obj.rot.y += 20.0f; actor->fwork[2] += 20.0f; if (((gGameFrameCount % 4) == 0)) { - Matrix_RotateY(gCalcMatrix, actor->fwork[2] * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, actor->vwork[27].x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, actor->vwork[27].z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, actor->fwork[2] * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, actor->vwork[27].x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, actor->vwork[27].z * M_DTOR, MTXF_APPLY); Aquas_801AC8A8(actor->vwork[11].x + RAND_FLOAT_CENTERED(120.0f), actor->vwork[11].y + RAND_FLOAT_CENTERED(50.0f), actor->vwork[11].z + RAND_FLOAT_CENTERED(100.0f), 2.0f, 0); @@ -5033,13 +5034,13 @@ void Aquas_801B9DB0(s32 limbIndex, Vec3f* rot, void* thisx) { case 0: break; case 1: - Matrix_RotateX(gCalcMatrix, M_PI / 2, 1); + Matrix_RotateX(gCalcMatrix, M_PI / 2, MTXF_APPLY); break; case 2: - Matrix_RotateX(gCalcMatrix, M_PI, 1); + Matrix_RotateX(gCalcMatrix, M_PI, MTXF_APPLY); break; case 3: - Matrix_RotateX(gCalcMatrix, 3 * M_PI / 2, 1); + Matrix_RotateX(gCalcMatrix, 3 * M_PI / 2, MTXF_APPLY); break; } @@ -5068,10 +5069,10 @@ void Aquas_801BA108(Actor* actor) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 95, 31, 255); } - Matrix_Scale(gCalcMatrix, actor->scale, actor->scale, actor->scale, 1); + Matrix_Scale(gCalcMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY); if (actor->state == 1) { - Matrix_RotateX(gCalcMatrix, (actor->obj.rot.x + 90.0f) * M_DTOR, 1); + Matrix_RotateX(gCalcMatrix, (actor->obj.rot.x + 90.0f) * M_DTOR, MTXF_APPLY); } Animation_GetFrameData(&D_AQ_6000AE4, actor->unk_0B6, sp40); @@ -5250,7 +5251,7 @@ void Aquas_801BA6A4(Actor* actor) { // OBJ_ACTOR_265 draw void Aquas_801BAD7C(Actor* actor) { - Matrix_Scale(gGfxMatrix, actor->scale, actor->scale, actor->scale, 1); + Matrix_Scale(gGfxMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_AQ_6014FD0); } @@ -5392,7 +5393,7 @@ void Aquas_801BB26C(Actor* actor) { } actor->iwork[13] = D_i3_801C4450 * 3; - Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, 0); + Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, MTXF_NEW); sp54.x = 0.0f; sp54.y = actor->obj.rot.x * 10.0f; @@ -5418,7 +5419,7 @@ void Aquas_801BB26C(Actor* actor) { } } - Matrix_RotateZ(gCalcMatrix, (actor->obj.rot.z + 90.0f) * M_DTOR, 0); + Matrix_RotateZ(gCalcMatrix, (actor->obj.rot.z + 90.0f) * M_DTOR, MTXF_NEW); sp54.x = 0.0f; sp54.y = actor->obj.rot.x * 10.0f; @@ -5484,8 +5485,8 @@ void Aquas_801BB79C(Actor* actor) { } else { for (i = 0, actor122 = gObjects80; i < 50; i++, actor122++) { if ((actor122->obj.status == OBJ_ACTIVE) && (actor122->obj.id == OBJ_80_122) && - func_enmy_80062DBC(&actor->obj.pos, actor122->info.hitbox, &actor122->obj, 0.0f, 0.0f, - 0.0f) && + Object_CheckHitboxCollision(&actor->obj.pos, actor122->info.hitbox, &actor122->obj, + 0.0f, 0.0f, 0.0f) && (actor->iwork[20] == 0)) { actor->iwork[20] = 50; actor->iwork[19]++; @@ -5510,8 +5511,8 @@ void Aquas_801BB79C(Actor* actor) { } else { for (i = 0, actor122 = gObjects80; i < 50; i++, actor122++) { if ((actor122->obj.status == OBJ_ACTIVE) && (actor122->obj.id == OBJ_80_122) && - (func_enmy_80062DBC(&actor->obj.pos, actor122->info.hitbox, &actor122->obj, 0.0f, 0.0f, - 0.0f) || + (Object_CheckHitboxCollision(&actor->obj.pos, actor122->info.hitbox, &actor122->obj, + 0.0f, 0.0f, 0.0f) || (actor->obj.pos.y < (gGroundLevel + 30.0f))) && (actor->iwork[20] == 0)) { actor->iwork[20] = 50; @@ -5556,7 +5557,7 @@ void Aquas_801BB79C(Actor* actor) { Aquas_801A92EC(actor, sp70->obj.pos.x, sp70->obj.pos.y, sp70->obj.pos.z, actor->iwork[13], i); if ((actor->fwork[21] > 200.0f) && (actor->iwork[17] != 0)) { - Matrix_RotateZ(gCalcMatrix, actor->fwork[20] * M_DTOR, 0); + Matrix_RotateZ(gCalcMatrix, actor->fwork[20] * M_DTOR, MTXF_NEW); sp80.x = 0.0f; sp80.y = actor->fwork[21]; sp80.z = 0.0f; @@ -5590,7 +5591,7 @@ void Aquas_801BB79C(Actor* actor) { Aquas_801A92EC(actor, sp6C->obj.pos.x, sp6C->obj.pos.y, sp6C->obj.pos.z, actor->iwork[13] + 1, i); if ((actor->fwork[21] > 200.0f) && (actor->iwork[17] != 0)) { - Matrix_RotateZ(gCalcMatrix, (actor->fwork[20] + 90.0f) * M_DTOR, 0); + Matrix_RotateZ(gCalcMatrix, (actor->fwork[20] + 90.0f) * M_DTOR, MTXF_NEW); sp80.x = 0.0f; sp80.y = actor->fwork[21]; sp80.z = 0.0f; @@ -5802,18 +5803,18 @@ bool Aquas_801BC530(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th } if (sp54 > 0.0f) { - Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, 1); + Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, MTXF_APPLY); if (*dList != NULL) { Matrix_MultVec3f(gCalcMatrix, &sp64, &sp58); func_edisplay_8005F670(&sp58); - Matrix_Mult(gGfxMatrix, gCalcMatrix, 1); + Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_Push(&gGfxMatrix); - Matrix_Scale(gGfxMatrix, sp54, sp50, sp4C, 1); + Matrix_Scale(gGfxMatrix, sp54, sp50, sp4C, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, *dList); Matrix_Pop(&gGfxMatrix); @@ -5917,7 +5918,7 @@ void Aquas_801BC9A0(Actor* actor) { Object_SetInfo(&actor269->info, actor269->obj.id); if (i == 0) { actor269->fwork[0] = RAND_FLOAT(360.0f); - Matrix_RotateY(gCalcMatrix, actor269->fwork[0] * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, actor269->fwork[0] * M_DTOR, MTXF_NEW); spA4.x = spA4.y = spA4.z = 5.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &spA4, &sp98); actor269->vel.x = sp98.x; @@ -6052,8 +6053,8 @@ void Aquas_801BD3B0(Actor* actor, f32 x, f32 y, f32 z) { actor->fwork[6] = Math_RadToDeg(Math_Atan2F(x, z)); temp = sqrtf(SQ(x) + SQ(z)); actor->fwork[7] = Math_RadToDeg(-Math_Atan2F(y, temp)); - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); Math_SmoothStepToF(&actor->fwork[4], 5.0f, 0.1f, 10.0f, 0); sp38.z = actor->fwork[4]; if (actor->iwork[2] != 0) { @@ -6141,7 +6142,7 @@ void Aquas_801BD54C(Actor* actor) { actor->timer_0BC = 0; } else { Math_SmoothStepToF(&actor->fwork[3], D_i3_801C04F4[actor->iwork[1]], 0.1f, 30.0f, 0.0001f); - Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].camEye.z - D_ctx_80177D20 - actor->fwork[3], 0.1f, + Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].cam.eye.z - D_ctx_80177D20 - actor->fwork[3], 0.1f, 30.0f, 0.00001f); } @@ -6327,7 +6328,7 @@ void Aquas_801BE034(Actor* actor) { void Aquas_801BE0F0(Actor* actor) { RCP_SetupDL(&gMasterDisp, 0x3D); - Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, 1); + Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 255, 255, 255); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); Matrix_SetGfxMtx(&gMasterDisp); @@ -6338,7 +6339,7 @@ void Aquas_801BE0F0(Actor* actor) { // OBJ_80_126 draw void Aquas_801BE1FC(Object_80* obj80) { - Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, 1); + Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_AQ_600EEF0); } @@ -6349,8 +6350,8 @@ void Aquas_801BE274(Actor* actor, f32 yRot, f32 xRot) { Vec3f sp4C = { 0.0f, 0.0f, 0.0f }; Vec3f sp40; - Matrix_RotateY(gCalcMatrix, 0.017453292f * yRot, 0); - Matrix_RotateX(gCalcMatrix, 0.017453292f * xRot, 1); + Matrix_RotateY(gCalcMatrix, 0.017453292f * yRot, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, 0.017453292f * xRot, MTXF_APPLY); sp40.x = sp40.y = 0.0f; sp40.z = 50.0f; @@ -6478,8 +6479,8 @@ void Aquas_801BEB1C(Actor* actor) { if (actor->health != 0) { RCP_SetupDL(&gMasterDisp, 0x37); - Matrix_Scale(gGfxMatrix, actor->fwork[0], actor->fwork[1], actor->fwork[2], 1); - Matrix_Translate(gGfxMatrix, 0.0f, -8.0f, 51.0f, 1); + Matrix_Scale(gGfxMatrix, actor->fwork[0], actor->fwork[1], actor->fwork[2], MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, -8.0f, 51.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_AQ_6002C10); } diff --git a/src/overlays/ovl_i3/fox_so.c b/src/overlays/ovl_i3/fox_so.c index 82b5913a..477f83e5 100644 --- a/src/overlays/ovl_i3/fox_so.c +++ b/src/overlays/ovl_i3/fox_so.c @@ -466,8 +466,8 @@ void Solar_8019F20C(Actor* actor) { } break; } - actor->obj.rot.y = RAD_TO_DEG(-gPlayer[0].unk_058); - actor->obj.rot.x = RAD_TO_DEG(gPlayer[0].unk_05C); + actor->obj.rot.y = RAD_TO_DEG(-gPlayer[0].camYaw); + actor->obj.rot.x = RAD_TO_DEG(gPlayer[0].camPitch); if (((gGameFrameCount % 2) == 0)) { actor->unk_0B6++; if (actor->unk_0B6 >= 3) { @@ -479,8 +479,8 @@ void Solar_8019F20C(Actor* actor) { void Solar_8019F7AC(Actor* actor) { if (actor->state != 0) { Matrix_Push(&gGfxMatrix); - Matrix_RotateY(gGfxMatrix, actor->unk_0F4.y * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, actor->unk_0F4.x * M_DTOR, 1); + Matrix_RotateY(gGfxMatrix, actor->unk_0F4.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, actor->unk_0F4.x * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); switch (actor->obj.id) { case OBJ_ACTOR_275: @@ -544,7 +544,7 @@ void Solar_8019FAA4(Boss* bossSO, Effect* effect, f32 xPos, f32 yPos, f32 zPos, if (gBossHealthBar != 0) { if (gBosses[0].fwork[SO_FWK_31] > 0.0f) { if (gBosses[0].swork[SO_SWK_0] != 7) { - Matrix_RotateY(gCalcMatrix, gBosses[0].obj.rot.y * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, gBosses[0].obj.rot.y * M_DTOR, MTXF_NEW); sp44.y = 0.0f; sp44.z = 0.0f; sp44.x = gBosses[0].fwork[SO_FWK_31] * 5.0f; @@ -552,9 +552,9 @@ void Solar_8019FAA4(Boss* bossSO, Effect* effect, f32 xPos, f32 yPos, f32 zPos, effect->vel.x = sp38.x * hVelMod; effect->vel.z = gPlayer[0].vel.z + (sp38.z * hVelMod); } else { - Matrix_RotateZ(gCalcMatrix, bossSO->obj.rot.z * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, gBosses[0].obj.rot.x * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, gBosses[0].unk_078.y * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, bossSO->obj.rot.z * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, gBosses[0].obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, gBosses[0].unk_078.y * M_DTOR, MTXF_APPLY); sp44.x = effect->obj.pos.x - bossSO->obj.pos.x; sp44.y = effect->obj.pos.y - bossSO->obj.pos.y; sp44.z = effect->obj.pos.z - bossSO->obj.pos.z; @@ -676,9 +676,9 @@ void Solar_801A0120(Effect* effect) { switch (effect->state) { case 0: - Matrix_Translate(gCalcMatrix, effect->vel.x, effect->vel.y, effect->vel.z, 0); - Matrix_RotateY(gCalcMatrix, effect->unk_60.y * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, effect->unk_60.x * M_DTOR, 1); + Matrix_Translate(gCalcMatrix, effect->vel.x, effect->vel.y, effect->vel.z, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, effect->unk_60.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, effect->unk_60.x * M_DTOR, MTXF_APPLY); sp3C.x = 0.0f; sp3C.y = 0.0f; sp3C.z = -effect->scale1; @@ -690,7 +690,7 @@ void Solar_801A0120(Effect* effect) { effect->unk_4C = 0; } } - if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7) { + if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) { func_effect_8007A774(&gPlayer[0], effect, effect->scale2 * 12.0f); } if (effect->unk_60.x > 190.0f) { @@ -757,7 +757,7 @@ void Solar_801A0120(Effect* effect) { effect->vel.z = gPlayer[0].vel.z; Math_SmoothStepToF(&effect->vel.y, -65.0f, 2.0f, 1.0f, 0.5f); } - if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7) { + if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) { func_effect_8007A774(&gPlayer[0], effect, effect->scale2 * 12.0f); } if (effect->obj.pos.y < -20.0f) { @@ -798,7 +798,7 @@ void Solar_801A0120(Effect* effect) { effect->vel.x = SIN_DEG(effect->unk_60.z) * (effect->unk_60.x * 10.0f); effect->vel.y = COS_DEG(effect->unk_60.z) * (effect->unk_60.x * 10.0f); effect->vel.z = gPlayer[0].vel.z + 15.0f; - if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7) { + if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) { func_effect_8007A774(&gPlayer[0], effect, effect->scale2 * 18.0f); if ((effect->unk_4C == 0) && ((effect->scale2 >= 9.8f) || (effect->scale2 <= 4.4f))) { AUDIO_PLAY_SFX(0x31033078, effect->sfxSource, 4); @@ -822,7 +822,7 @@ void Solar_801A0120(Effect* effect) { effect->vel.x = SIN_DEG(effect->unk_60.z) * sp50 * 50.0f; effect->vel.y = COS_DEG(effect->unk_60.z) * sp50 * 50.0f; effect->vel.z = gPlayer[0].vel.z + 80.0f; - if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7) { + if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) { func_effect_8007A774(&gPlayer[0], effect, effect->scale2 * 18.0f); if ((effect->unk_4C == 0) && ((effect->scale2 >= 9.8f) || (effect->scale2 <= 4.4f))) { AUDIO_PLAY_SFX(0x31033078, effect->sfxSource, 4); @@ -969,20 +969,20 @@ void Solar_801A10F4(Player* player) { gCsFrameCount = 0; Rand_SetSeed(1, 29100, 9786); player->unk_1D0 = 1; - player->camEye.x = -2000.0f; + player->cam.eye.x = -2000.0f; gCsCamEyeX = -2800.0f; - player->camEye.y = gCsCamEyeY = 120.0f; - player->camEye.z = -1800.0f; + player->cam.eye.y = gCsCamEyeY = 120.0f; + player->cam.eye.z = -1800.0f; gCsCamEyeZ = -2800.0f; - player->camAt.x = gCsCamAtX = -1000.0f; - player->camAt.y = 1400.0f; + player->cam.at.x = gCsCamAtX = -1000.0f; + player->cam.at.y = 1400.0f; gCsCamAtY = 400.0f; - player->camAt.z = gCsCamAtZ = -2300.0f; + player->cam.at.z = gCsCamAtZ = -2300.0f; D_ctx_80177A48[0] = 0.0045f; - player->unk_034 = 0.0f; + player->camRoll = 0.0f; player->unk_0D0 = 0.0f; gFillScreenAlpha = 255; @@ -1029,17 +1029,17 @@ void Solar_801A10F4(Player* player) { } if (gCsFrameCount == 410) { player->unk_1D0++; - player->camEye.x = 200.0f; + player->cam.eye.x = 200.0f; gCsCamEyeX = 800.0f; - player->camEye.y = 140.0f; + player->cam.eye.y = 140.0f; gCsCamEyeY = player->pos.y + 200.0f; - player->camEye.z = gCsCamEyeZ = 400.0f; + player->cam.eye.z = gCsCamEyeZ = 400.0f; - player->camAt.x = 400.0f; + player->cam.at.x = 400.0f; gCsCamAtX = 200.0f; - player->camAt.y = 140.0f; + player->cam.at.y = 140.0f; gCsCamAtY = 1200.0f; - player->camAt.z = -500.0f; + player->cam.at.z = -500.0f; player->pos.y = 1200.0f; player->pos.z = -2500.0f; @@ -1067,7 +1067,7 @@ void Solar_801A10F4(Player* player) { Object_Kill(&gActors[5].obj, gActors[5].sfxSource); Solar_801A0DF8(30.0f, -1500.0f, 160.0f, 3, 2.0f); } - if (player->camEye.z <= -2465.0f) { + if (player->cam.eye.z <= -2465.0f) { player->unk_1D0++; gCsCamEyeY = player->pos.y + 180.0f; gCsCamAtX = 0.0f; @@ -1079,7 +1079,7 @@ void Solar_801A10F4(Player* player) { case 3: D_ctx_80177CE8 += 60.0f; if (((gGameFrameCount % 4) == 0)) { - Solar_8019E8B8(RAND_FLOAT_CENTERED(6000.0f), -400.0f - ((player->camEye.y - 1380.0f) * 0.3f), + Solar_8019E8B8(RAND_FLOAT_CENTERED(6000.0f), -400.0f - ((player->cam.eye.y - 1380.0f) * 0.3f), RAND_FLOAT_CENTERED(2000.0f) + 500.0f + D_ctx_80177D20, RAND_FLOAT(20.0f) + 20.0f); } if (gCsFrameCount == 615) { @@ -1115,22 +1115,22 @@ void Solar_801A10F4(Player* player) { player->unk_0D0 = D_play_80161A54; func_play_800A6148(); gLevelStatusScreenTimer = 50; - player->state_1C8 = PLAYERSTATE_1C8_3; + player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_1D0 = 0; player->pos.y = 350.0f; - player->camEye.x = player->pos.x; - player->camEye.y = 50.0f + player->pos.y * player->unk_148; - player->camEye.z = 30.0f; + player->cam.eye.x = player->pos.x; + player->cam.eye.y = 50.0f + player->pos.y * player->unk_148; + player->cam.eye.z = 30.0f; - player->camAt.x = player->pos.x; - player->camAt.y = 20.0f + player->pos.y * player->unk_148; - player->camAt.z = player->unk_138; + player->cam.at.x = player->pos.x; + player->cam.at.y = 20.0f + player->pos.y * player->unk_148; + player->cam.at.z = player->unk_138; D_ctx_80177950 = 1.0f; func_8001D1C8(255, 3); AUDIO_PLAY_SFX(0x4100C023, gDefaultSfxSource, 4); - D_ctx_80178488 = 1; + gLoadLevelObjects = 1; gFillScreenAlphaTarget = 0; player->timer_1F8 = 15; gPlayer[0].shields = 255; @@ -1140,14 +1140,14 @@ void Solar_801A10F4(Player* player) { D_ctx_80177CE8 += 60.0f; break; } - Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_ctx_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_ctx_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_ctx_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_ctx_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_ctx_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_ctx_80177A48[0], 20000.0f, 0); - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), 1); + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 20000.0f, 0); + Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), MTXF_APPLY); sp50.x = 0.f; sp50.y = 0.0f; sp50.z = player->unk_0D0; @@ -1366,8 +1366,8 @@ void Solar_801A23F4(Boss* bossSO) { bossSO->fwork[SO_FWK_3] = 2600.0f; Math_SmoothStepToAngle(&bossSO->obj.rot.y, 0.0f, 1.0f, 1.5f, 1.0f); if (bossSO->unk_04C == 65) { - Matrix_RotateX(gCalcMatrix, D_i3_801C2768[0] * M_DTOR, 0); - Matrix_RotateY(gCalcMatrix, D_i3_801C2768[1] * M_DTOR, 1); + Matrix_RotateX(gCalcMatrix, D_i3_801C2768[0] * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, D_i3_801C2768[1] * M_DTOR, MTXF_APPLY); sp40.x = 0.0f; sp40.y = -200.0f; sp40.z = 1100.0f; @@ -1815,8 +1815,8 @@ void Solar_801A3C4C(Boss* bossSO) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); Audio_KillSfxById(0x4100C023); AUDIO_PLAY_SFX(0x2940D09A, bossSO->sfxSource, 4); - if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) { - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_7; + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) { + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].timer_1F8 = 0; gPlayer[0].unk_1D0 = gPlayer[0].timer_1F8; gPlayer[0].unk_0E8 += gPlayer[0].unk_114; @@ -1848,8 +1848,8 @@ void Solar_801A4214(Boss* bossSO) { bossSO->unk_04C = 38; bossSO->fwork[SO_FWK_0] = 0.05f; } - Matrix_RotateX(gCalcMatrix, bossSO->fwork[SO_FWK_1] * M_DTOR, 0); - Matrix_RotateY(gCalcMatrix, -bossSO->fwork[SO_FWK_2] * M_DTOR, 1); + Matrix_RotateX(gCalcMatrix, bossSO->fwork[SO_FWK_1] * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, -bossSO->fwork[SO_FWK_2] * M_DTOR, MTXF_APPLY); sp50.x = 0.0f; sp50.y = 200.0f; sp50.z = 1100.0f; @@ -2318,7 +2318,7 @@ void Solar_801A5B3C(Boss* bossSO) { bossSO->info.hitbox[13] = bossSO->fwork[SO_FWK_24] - bossSO->obj.pos.z; bossSO->info.hitbox[15] = bossSO->fwork[SO_FWK_23] - bossSO->obj.pos.y; bossSO->info.hitbox[17] = bossSO->fwork[SO_FWK_22] - bossSO->obj.pos.x; - Matrix_RotateY(gCalcMatrix, -bossSO->obj.rot.y * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, -bossSO->obj.rot.y * M_DTOR, MTXF_NEW); sp44.x = bossSO->fwork[SO_FWK_28] - bossSO->obj.pos.x; sp44.y = bossSO->fwork[SO_FWK_29] - bossSO->obj.pos.y; sp44.z = bossSO->fwork[SO_FWK_30] - bossSO->obj.pos.z; @@ -2441,12 +2441,12 @@ void Solar_801A5B3C(Boss* bossSO) { sp1BC = Animation_GetFrameData(&D_SO_6009D30, bossSO->unk_04C, sp50); break; } - Matrix_RotateZ(gCalcMatrix, -bossSO->vwork[SO_VWK_29].z * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -bossSO->vwork[SO_VWK_29].x * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -bossSO->vwork[SO_VWK_29].y * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, -bossSO->obj.rot.z * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, -bossSO->obj.rot.x * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -bossSO->obj.rot.y * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, -bossSO->vwork[SO_VWK_29].z * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -bossSO->vwork[SO_VWK_29].x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -bossSO->vwork[SO_VWK_29].y * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -bossSO->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, -bossSO->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -bossSO->obj.rot.y * M_DTOR, MTXF_APPLY); if ((bossSO->health > 0) && (bossSO->swork[SO_SWK_0] == 1)) { sp44.x = gPlayer[0].pos.x - bossSO->obj.pos.x; sp44.y = gPlayer[0].pos.y - bossSO->obj.pos.y; @@ -2704,7 +2704,7 @@ void Solar_801A71B8(Boss* bossSO) { -89.0f, -90.0f, -88.0f, -36.0f, -73.0f, -95.0f, -91.0f, -83.0f, -91.0f, }; - Matrix_Scale(gCalcMatrix, bossSO->unk_3F8, bossSO->unk_3F8, bossSO->unk_3F8, 1); + Matrix_Scale(gCalcMatrix, bossSO->unk_3F8, bossSO->unk_3F8, bossSO->unk_3F8, MTXF_APPLY); if (gBossActive != 0) { Animation_DrawSkeleton(2, D_SO_600E470, bossSO->vwork, Solar_801A68A8, Solar_801A6BDC, bossSO, gCalcMatrix); } @@ -2715,18 +2715,18 @@ void Solar_801A71B8(Boss* bossSO) { Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, bossSO->obj.pos.x, bossSO->obj.pos.y, bossSO->obj.pos.z - 500.0f + D_ctx_80177D20, - 1); - Matrix_Scale(gGfxMatrix, D_i3_801C2768[3], D_i3_801C2768[2], 1.0f, 1); + MTXF_APPLY); + Matrix_Scale(gGfxMatrix, D_i3_801C2768[3], D_i3_801C2768[2], 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); for (i = 0; i < 9; i++) { Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, bossSO->obj.pos.x + spE8[i].x, bossSO->obj.pos.y + spE8[i].y, - bossSO->obj.pos.z + D_ctx_80177D20 + spE8[i].z, 1); - Matrix_RotateY(gGfxMatrix, spC4[i] * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, spA0[i] * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, D_i3_801C2768[4 + i], 100.0f, 1.0f, 1); + bossSO->obj.pos.z + D_ctx_80177D20 + spE8[i].z, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, spC4[i] * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, spA0[i] * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, D_i3_801C2768[4 + i], 100.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); } @@ -2735,23 +2735,23 @@ void Solar_801A71B8(Boss* bossSO) { Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, bossSO->obj.pos.x, bossSO->obj.pos.y + 230.0f, - bossSO->obj.pos.z - 300.0f + D_ctx_80177D20, 1); - Matrix_RotateX(gGfxMatrix, M_DTOR * 5.0f, 1); - Matrix_Scale(gGfxMatrix, D_i3_801C2768[13], 1.0f, D_i3_801C2768[13], 1); + bossSO->obj.pos.z - 300.0f + D_ctx_80177D20, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_DTOR * 5.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, D_i3_801C2768[13], 1.0f, D_i3_801C2768[13], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_BG_PLANET_20112C0); - Matrix_Scale(gGfxMatrix, 0.6f, 1.0f, 0.6f, 1); + Matrix_Scale(gGfxMatrix, 0.6f, 1.0f, 0.6f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_BG_PLANET_20112C0); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, bossSO->obj.pos.x, bossSO->obj.pos.y + 270.0f, - (bossSO->obj.pos.z - 300.0f) + D_ctx_80177D20, 1); - Matrix_RotateX(gGfxMatrix, -3.0f * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, D_i3_801C2768[13], 1.0f, D_i3_801C2768[13], 1); + (bossSO->obj.pos.z - 300.0f) + D_ctx_80177D20, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -3.0f * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, D_i3_801C2768[13], 1.0f, D_i3_801C2768[13], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_BG_PLANET_20112C0); - Matrix_Scale(gGfxMatrix, 0.6f, 1.0f, 0.6f, 1); + Matrix_Scale(gGfxMatrix, 0.6f, 1.0f, 0.6f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_BG_PLANET_20112C0); } @@ -2813,18 +2813,18 @@ void Solar_801A7930(Player* player) { switch (player->unk_1D0) { case 0: gCsFrameCount = 0; - player->unk_034 = player->unk_4D8 = 0.0f; + player->camRoll = player->unk_4D8 = 0.0f; player->unk_0D0 = 40.0f; player->wings.unk_04 = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = player->unk_130 = player->unk_12C = player->unk_110 = 0.0f; player->unk_234 = 1; - gCsCamEyeX = player->camEye.x; - gCsCamEyeY = player->camEye.y; - gCsCamEyeZ = player->camEye.z; - gCsCamAtX = player->camAt.x; - gCsCamAtY = player->camAt.y; - gCsCamAtZ = player->camAt.z; + gCsCamEyeX = player->cam.eye.x; + gCsCamEyeY = player->cam.eye.y; + gCsCamEyeZ = player->cam.eye.z; + gCsCamAtX = player->cam.at.x; + gCsCamAtY = player->cam.at.y; + gCsCamAtZ = player->cam.at.z; for (i = 10; i < 60; i++) { if (gActors[i].unk_0B6 == 0) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); @@ -2893,20 +2893,20 @@ void Solar_801A7930(Player* player) { player->pos.y = 200.0f; player->pos.z = -(D_ctx_80177D20 - 500.0f); player->unk_1D0++; - player->wings.unk_2C = 1; + player->wings.modelId = 1; func_8001C8B8(0); AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); D_ctx_80177A98 = 1; func_play_800A6148(); D_ctx_80177A48[1] = 0.0f; D_ctx_80177A48[2] = 0.0f; - player->camEye.x = 0.0f; - player->camEye.y = player->pos.y + 80.0f; - player->camEye.z = player->pos.z + D_ctx_80177D20 - 4000.0f; + player->cam.eye.x = 0.0f; + player->cam.eye.y = player->pos.y + 80.0f; + player->cam.eye.z = player->pos.z + D_ctx_80177D20 - 4000.0f; gCsCamEyeZ = player->pos.z + D_ctx_80177D20 - 4900.0f; - player->camAt.x = gCsCamAtX = 0.0f; - player->camAt.y = gCsCamAtY = 200.0f; - player->camAt.z = gCsCamAtZ = player->pos.z + D_ctx_80177D20; + player->cam.at.x = gCsCamAtX = 0.0f; + player->cam.at.y = gCsCamAtY = 200.0f; + player->cam.at.z = gCsCamAtZ = player->pos.z + D_ctx_80177D20; D_ctx_80177A48[0] = 0.0f; Object_Kill(&gActors[4].obj, gActors[4].sfxSource); Object_Kill(&gActors[5].obj, gActors[5].sfxSource); @@ -2964,20 +2964,20 @@ void Solar_801A7930(Player* player) { } Math_SmoothStepToF(&player->pos.z, -(D_ctx_80177D20 + 4350.0f), 1.0f, 20.0f, 0.0001f); if (gCsFrameCount >= 620) { - Math_SmoothStepToF(&player->camEye.x, 0.0f, 1.0f, 10.0f, 0); - Math_SmoothStepToF(&player->camEye.y, player->pos.y + 52.0f, 1.0f, 16.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.z, (player->pos.z + D_ctx_80177D20) - 50.0f, 1.0f, 21.5f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.x, 0.0f, 1.0f, 10.0f, 0); + Math_SmoothStepToF(&player->cam.eye.y, player->pos.y + 52.0f, 1.0f, 16.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.z, (player->pos.z + D_ctx_80177D20) - 50.0f, 1.0f, 21.5f, 0.0f); } - player->camAt.x = gCsCamAtX = player->pos.x; - player->camAt.y = gCsCamAtY = player->pos.y; - player->camAt.z = gCsCamAtZ = player->pos.z + D_ctx_80177D20; + player->cam.at.x = gCsCamAtX = player->pos.x; + player->cam.at.y = gCsCamAtY = player->pos.y; + player->cam.at.z = gCsCamAtZ = player->pos.z + D_ctx_80177D20; break; case 4: D_ctx_80177CE8 += 60.0f; gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 4; D_ctx_80177A48[1] += D_ctx_80177A48[2] * 0.8f; - Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, MTXF_NEW); sp60.x = 0.0f; sp60.y = 0.0f; sp60.z = -700.0f; @@ -3018,7 +3018,7 @@ void Solar_801A7930(Player* player) { if (gFillScreenAlpha == 255) { func_8001CA24(0); Audio_FadeOutAll(10); - player->state_1C8 = PLAYERSTATE_1C8_6; + player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; D_ctx_8017837C = 4; D_play_800D3180[LEVEL_SOLAR] = Play_CheckMedalStatus(100) + 1; @@ -3102,8 +3102,8 @@ void Solar_801A7930(Player* player) { } break; } - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4) * M_DTOR), 1); + Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4) * M_DTOR), MTXF_APPLY); sp60.x = 0.0f; sp60.y = 0.0f; sp60.z = player->unk_0D0; @@ -3118,12 +3118,12 @@ void Solar_801A7930(Player* player) { player->unk_138 = player->pos.z; player->unk_0F8 = player->unk_0EC; - Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0.0f); player->unk_088 += 10.0f; player->unk_080 = -SIN_DEG(player->unk_088) * 0.3f; player->unk_0F4 += 8.0f; @@ -3153,8 +3153,8 @@ void Solar_801A8BE8(Actor* actor) { actor->unk_0F4.x += 0.2f; break; } - Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -(actor->unk_0F4.x * M_DTOR), 1); + Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(actor->unk_0F4.x * M_DTOR), MTXF_APPLY); sp3C.x = 0.0f; sp3C.y = 0.0f; sp3C.z = actor->fwork[0]; diff --git a/src/overlays/ovl_i3/fox_zo.c b/src/overlays/ovl_i3/fox_zo.c index 96c553fa..4049c3fd 100644 --- a/src/overlays/ovl_i3/fox_zo.c +++ b/src/overlays/ovl_i3/fox_zo.c @@ -538,11 +538,11 @@ void Zoness_8018FF50(Actor* actor) { f32 temp; (void) " Enm->hitNO %d\n"; // Unclear where this goes. hitNO can't be info.bonus. Damage related? - actor->obj.rot.y = RAD_TO_DEG( - Math_Atan2F(gPlayer[0].camEye.x - actor->obj.pos.x, gPlayer[0].camEye.z - (actor->obj.pos.z + D_ctx_80177D20))); - temp = sqrtf(SQ(gPlayer[0].camEye.z - (actor->obj.pos.z + D_ctx_80177D20)) + - SQ(gPlayer[0].camEye.x - actor->obj.pos.x)); - actor->obj.rot.x = RAD_TO_DEG(-Math_Atan2F(gPlayer[0].camEye.y - actor->obj.pos.y, temp)); + actor->obj.rot.y = RAD_TO_DEG(Math_Atan2F(gPlayer[0].cam.eye.x - actor->obj.pos.x, + gPlayer[0].cam.eye.z - (actor->obj.pos.z + D_ctx_80177D20))); + temp = sqrtf(SQ(gPlayer[0].cam.eye.z - (actor->obj.pos.z + D_ctx_80177D20)) + + SQ(gPlayer[0].cam.eye.x - actor->obj.pos.x)); + actor->obj.rot.x = RAD_TO_DEG(-Math_Atan2F(gPlayer[0].cam.eye.y - actor->obj.pos.y, temp)); } void Zoness_80190028(Actor* actor, Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32 arg6, f32 scale, s32 arg8, @@ -640,7 +640,7 @@ void Zoness_80190204(s32 limbIndex, Vec3f* rot, void* thisx) { void Zoness_80190430(Actor* actor) { Vec3f sp30[30]; - Matrix_Scale(gCalcMatrix, actor->scale, actor->scale, actor->scale, 1); + Matrix_Scale(gCalcMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY); Animation_GetFrameData(&D_ZO_600E5EC, actor->unk_0B6, sp30); Animation_DrawSkeleton(3, D_ZO_600E7D8, sp30, Zoness_8019019C, Zoness_80190204, actor, gCalcMatrix); } @@ -653,9 +653,9 @@ void Zoness_801904CC(Actor* actor) { switch (actor->state) { case 0: actor->health = 20; - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, MTXF_APPLY); spA4.x = spA4.y = 0.0f; spA4.z = actor->fwork[10]; Matrix_MultVec3f(gCalcMatrix, &spA4, &sp98); @@ -726,7 +726,7 @@ void Zoness_80190790(Actor* actor) { break; } } - Matrix_RotateY(gCalcMatrix, actor->unk_0F4.y * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, actor->unk_0F4.y * M_DTOR, MTXF_NEW); sp44.x = 0.f; sp44.y = 0.f; sp44.z = 20.0f; @@ -773,11 +773,11 @@ Gfx* D_i3_801BF5A8[3] = { D_ZO_60012A0, D_ZO_60239E0, D_ZO_6023730 }; void Zoness_80190B4C(f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 zRot, u8 arg6, s32 arg7) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, xPos, yPos, zPos + D_ctx_80177D20, 1); - Matrix_RotateY(gGfxMatrix, M_DTOR * yRot, 1); - Matrix_RotateX(gGfxMatrix, M_DTOR * xRot, 1); - Matrix_RotateZ(gGfxMatrix, M_DTOR * zRot, 1); - Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, 1); + Matrix_Translate(gGfxMatrix, xPos, yPos, zPos + D_ctx_80177D20, 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, 2.0f, 2.0f, 2.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); if (arg7 != 0) { @@ -861,8 +861,8 @@ void Zoness_80191010(Actor* actor) { actor->state++; break; case 1: - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); sp8C.x = 0.0f; sp8C.y = 0.0f; sp8C.z = (actor->fwork[3] * 10.0f) + 30.0f; @@ -933,7 +933,7 @@ void Zoness_80191010(Actor* actor) { void Zoness_801914C4(Actor* actor) { Vec3f sp38[20]; - Matrix_Scale(gCalcMatrix, actor->scale, actor->scale, actor->scale, 1); + Matrix_Scale(gCalcMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); Animation_GetFrameData(&D_ZO_601AA48, actor->unk_0B6, sp38); Animation_DrawSkeleton(3, D_ZO_601AB14, sp38, NULL, Zoness_80190F28, actor, gCalcMatrix); @@ -1026,8 +1026,8 @@ void Zoness_80191680(Actor* actor) { sp5C = 30.0f; } Math_SmoothStepToAngle(&actor->obj.rot.z, sp5C, 0.2f, 4.0f, 0.0f); - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); sp48.x = sp48.y = 0.0f; sp48.z = 30.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp48, &sp3C); @@ -1087,8 +1087,8 @@ void Zoness_80191BC4(Actor* actor) { void Zoness_80191DB0(Actor* actor) { RCP_SetupDL_40(); gSPDisplayList(gMasterDisp++, D_ZO_6019EB0); - Matrix_RotateY(gGfxMatrix, actor->fwork[0] * 0.7f * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, actor->fwork[0] * M_DTOR, 1); + Matrix_RotateY(gGfxMatrix, actor->fwork[0] * 0.7f * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, actor->fwork[0] * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ZO_6023D50); } @@ -1130,7 +1130,7 @@ void Zoness_80191E94(s32 limbIndex, Vec3f* rot, void* thisx) { void Zoness_80191FFC(Actor* actor) { Vec3f sp30[20]; - Matrix_Scale(gCalcMatrix, actor->scale, actor->scale, actor->scale, 1); + Matrix_Scale(gCalcMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY); Animation_GetFrameData(&D_ZO_60195EC, actor->unk_0B6, sp30); Animation_DrawSkeleton(3, D_ZO_6019738, sp30, NULL, Zoness_80191E94, actor, gCalcMatrix); } @@ -1201,9 +1201,9 @@ void Zoness_80192094(Actor* actor) { } } else { Math_SmoothStepToF(&actor->vel.z, -40.0f, 0.1f, 1.0f, 0.00001f); - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, actor->fwork[2] * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, actor->fwork[2] * M_DTOR, MTXF_APPLY); sp70.x = 0.0f; sp70.y = actor->fwork[3]; sp70.z = 0.0f; @@ -1295,8 +1295,8 @@ void Zoness_80192834(Actor* actor) { switch (actor->state) { case 0: - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, 5.497787f, 1); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, 5.497787f, MTXF_APPLY); sp84.y = 0.0f; sp84.x = 0.0f; sp84.z = (actor->obj.rot.x * 10.0f) + 15.0f; @@ -1430,7 +1430,7 @@ void Zoness_80192E64(Actor* actor) { if (actor->timer_0BC == 0) { actor->unk_0B6++; if (actor->unk_0B6 == 5) { - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); sp80.x = 0.0f; sp80.y = 0.0f; sp80.z = 50.0f; @@ -1576,11 +1576,11 @@ void Zoness_80193628(Object* obj, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 ar Vec3f sp54 = { 0.0f, 0.0f, 40.0f }; Vec3f sp48; - Matrix_RotateY(gCalcMatrix, obj->rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, obj->rot.x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, obj->rot.z * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, M_DTOR * arg5, 1); - Matrix_RotateX(gCalcMatrix, M_DTOR * arg4, 1); + Matrix_RotateY(gCalcMatrix, obj->rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, obj->rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, obj->rot.z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, M_DTOR * arg5, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, M_DTOR * arg4, MTXF_APPLY); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48); func_effect_8007F04C(OBJ_EFFECT_353, arg1 + sp48.x + arg6, arg2 + sp48.y, arg3 + sp48.z, arg4, arg5, 0.0f, obj->rot.x, obj->rot.y, obj->rot.z, sp48.x + arg6, sp48.y, sp48.z, 1.0f); @@ -1591,7 +1591,7 @@ void Zoness_801937D8(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yRot) { Vec3f sp20; Effect_Initialize(effect); - Matrix_RotateY(gCalcMatrix, M_DTOR * yRot, 0); + Matrix_RotateY(gCalcMatrix, M_DTOR * yRot, MTXF_NEW); sp2C.x = 0.0f; sp2C.y = 0.0f; sp2C.z = 10.0f; @@ -1629,7 +1629,7 @@ void Zoness_80193970(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yRot, s32 Vec3f sp20; Effect_Initialize(effect); - Matrix_RotateY(gCalcMatrix, M_DTOR * yRot, 0); + Matrix_RotateY(gCalcMatrix, M_DTOR * yRot, MTXF_NEW); sp2C.x = 0.0f; sp2C.y = 0.0f; sp2C.z = 20.0f; @@ -1985,8 +1985,8 @@ void Zoness_80194394(s32 limbIndex, Vec3f* rot, void* thisx) { } void Zoness_801949DC(Boss* bossZO) { - Matrix_Translate(gCalcMatrix, 0.0f, bossZO->fwork[ZO_FWK_3], 0.0f, 1); - Matrix_Scale(gCalcMatrix, 2.6f, 2.6f, 2.6f, 1); + Matrix_Translate(gCalcMatrix, 0.0f, bossZO->fwork[ZO_FWK_3], 0.0f, MTXF_APPLY); + Matrix_Scale(gCalcMatrix, 2.6f, 2.6f, 2.6f, MTXF_APPLY); Animation_DrawSkeleton(3, D_ZO_6019E18, bossZO->vwork, Zoness_80193D08, Zoness_80194394, bossZO, gCalcMatrix); } @@ -2035,7 +2035,7 @@ void Zoness_80194A84(Boss* bossZO) { } if (sZoSwork[ZO_BSS_24] == 0) { Math_SmoothStepToF(&sZoFwork[ZO_BSF_27], sZoFwork[ZO_BSF_26], 0.1f, 2.0f, 0.00001f); - Math_SmoothStepToF(&bossZO->obj.pos.z, gPlayer[0].camEye.z - D_ctx_80177D20 + sZoFwork[ZO_BSF_28], 0.1f, + Math_SmoothStepToF(&bossZO->obj.pos.z, gPlayer[0].cam.eye.z - D_ctx_80177D20 + sZoFwork[ZO_BSF_28], 0.1f, sZoFwork[ZO_BSF_27], 0.00001f); } if ((gGameFrameCount % 4U) == 0) { @@ -2272,11 +2272,11 @@ void Zoness_80194A84(Boss* bossZO) { bossZO->fwork[ZO_FWK_5] += 4.0f; bossZO->vel.x = COS_DEG(bossZO->fwork[ZO_FWK_5]) * 40.0f; padF4 = Math_Atan2F(bossZO->fwork[ZO_FWK_6] - bossZO->obj.pos.x, - gPlayer[0].camEye.z - D_ctx_80177D20 + D_i3_801BF6BC[bossZO->swork[ZO_SWK_1]] - + gPlayer[0].cam.eye.z - D_ctx_80177D20 + D_i3_801BF6BC[bossZO->swork[ZO_SWK_1]] - bossZO->obj.pos.z); padF4 = Math_RadToDeg(padF4); Math_SmoothStepToAngle(&bossZO->fwork[ZO_FWK_7], padF4, 0.1f, 100.0f, 0.001f); - Matrix_RotateY(gCalcMatrix, bossZO->fwork[ZO_FWK_7] * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, bossZO->fwork[ZO_FWK_7] * M_DTOR, MTXF_NEW); spE4.x = spE4.y = 0.0f; spE4.z = 20.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &spE4, &spCC); @@ -2294,8 +2294,8 @@ void Zoness_80194A84(Boss* bossZO) { 0.00001f); Math_SmoothStepToAngle(&bossZO->obj.rot.y, D_i3_801BF6D4[var_s0], 0.1f, bossZO->fwork[ZO_FWK_8], 0.00001f); - Matrix_RotateX(gCalcMatrix, -bossZO->obj.rot.x * M_DTOR, 0); - Matrix_RotateY(gCalcMatrix, -bossZO->obj.rot.y * M_DTOR, 1); + Matrix_RotateX(gCalcMatrix, -bossZO->obj.rot.x * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, -bossZO->obj.rot.y * M_DTOR, MTXF_APPLY); spE4.x = gPlayer[0].pos.x - sZoFwork[ZO_BSF_93_X]; spE4.y = gPlayer[0].pos.y - sZoFwork[ZO_BSF_93_Y]; spE4.z = gPlayer[0].unk_138 - sZoFwork[ZO_BSF_93_Z]; @@ -2492,9 +2492,10 @@ void Zoness_80194A84(Boss* bossZO) { sZoFwork[ZO_BSF_23] = 10.0f; gShowBossHealth = 0; func_effect_8007A568(bossZO->obj.pos.x, bossZO->obj.pos.y, bossZO->obj.pos.z, 80.0f); - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_5)) { + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || + (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { gCsFrameCount = 0; - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_7; + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].unk_1D0 = gPlayer[0].timer_1F8 = 0; gPlayer[0].unk_0E8 += gPlayer[0].unk_114; if (gPlayer[0].unk_0E8 > 360.0f) { @@ -2614,14 +2615,14 @@ void Zoness_80194A84(Boss* bossZO) { spE4.z = gPlayer[0].unk_138 - sZoFwork[ZO_BSF_65_Z]; Math_SmoothStepToAngle(&sZoFwork[ZO_BSF_19], Math_RadToDeg(Math_Atan2F(spE4.x, spE4.z)), 0.1f, 5.0f, 0.0f); if ((bossZO->state >= 3) && (bossZO->state < 6)) { - Matrix_RotateY(gCalcMatrix, bossZO->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, bossZO->obj.rot.x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, bossZO->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, bossZO->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &spA8, &spD8); Matrix_MultVec3f(gCalcMatrix, &sp9C, &spCC); sp78 = spD8; sp6C = spCC; - Matrix_RotateX(gCalcMatrix, -bossZO->obj.rot.x * M_DTOR, 0); - Matrix_RotateY(gCalcMatrix, -bossZO->obj.rot.y * M_DTOR, 1); + Matrix_RotateX(gCalcMatrix, -bossZO->obj.rot.x * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, -bossZO->obj.rot.y * M_DTOR, MTXF_APPLY); spE4.x = gPlayer[0].pos.x - (bossZO->obj.pos.x + spD8.x); spE4.y = gPlayer[0].pos.y - (bossZO->obj.pos.y + spD8.y); spE4.z = gPlayer[0].unk_138 - (bossZO->obj.pos.z + spD8.z); @@ -3085,10 +3086,10 @@ void Zoness_801986FC(Boss* bossZO, s32 arg1, f32 xOff, f32 yOff, f32 zOff, f32 y newActor->obj.pos.z = bossZO->obj.pos.z + zOff; newActor->health = 10; - Matrix_RotateY(gCalcMatrix, bossZO->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, bossZO->obj.rot.x * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, sZoFwork[ZO_BSF_15 + arg1] * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, M_DTOR * yRot, 1); + Matrix_RotateY(gCalcMatrix, bossZO->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, bossZO->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, sZoFwork[ZO_BSF_15 + arg1] * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, M_DTOR * yRot, MTXF_APPLY); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp60, &sp54); newActor->vel.x = sp54.x; newActor->vel.y = sp54.y; @@ -3130,8 +3131,8 @@ void Zoness_801989FC(Boss* bossZO) { newActor->timer_0BC = 300; newActor->health = 10; - Matrix_RotateY(gCalcMatrix, bossZO->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, bossZO->obj.rot.x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, bossZO->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, bossZO->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp70, &sp64); newActor->vel.x = sp64.x; newActor->vel.z = bossZO->vel.z + sp64.z; @@ -3175,11 +3176,11 @@ void Zoness_80198BE8(Boss* bossZO, s32 arg1) { effect->obj.pos.x = sZoFwork[ZO_BSF_93_X + 3 * arg1]; effect->obj.pos.y = sZoFwork[ZO_BSF_93_Y + 3 * arg1]; effect->obj.pos.z = sZoFwork[ZO_BSF_93_Z + 3 * arg1]; - Matrix_RotateY(gCalcMatrix, sZoFwork[ZO_BSF_8 + 2 * arg1] * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, sZoFwork[ZO_BSF_7 + 2 * arg1] * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, bossZO->obj.rot.y * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, bossZO->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, bossZO->obj.rot.z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, sZoFwork[ZO_BSF_8 + 2 * arg1] * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, sZoFwork[ZO_BSF_7 + 2 * arg1] * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, bossZO->obj.rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, bossZO->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, bossZO->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp3C, &sp30); effect->vel.x = sp30.x; effect->vel.y = sp30.y; @@ -3361,7 +3362,7 @@ void Zoness_8019969C(Actor* actor) { void Zoness_8019983C(Actor* actor) { RCP_SetupDL(&gMasterDisp, 70); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - Matrix_Scale(gGfxMatrix, 2.6f, 2.6f, 2.6f, 1); + Matrix_Scale(gGfxMatrix, 2.6f, 2.6f, 2.6f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ZO_6017950); } @@ -3472,7 +3473,7 @@ void Zoness_80199A28(Actor* actor) { } void Zoness_80199E24(Actor* actor) { - Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, 1); + Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ZO_6025E60); } @@ -3552,14 +3553,14 @@ void Zoness_8019A1FC(Actor* actor) { s32 var_s0; s32 var_s1; - Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, 1); + Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL_57(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gSPDisplayList(gMasterDisp++, D_ZO_601C590); RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); if (((actor->state == 1) && (gBosses[0].timer_052 != 0)) || (actor->state == 0)) { - Matrix_RotateY(gGfxMatrix, gGameFrameCount * M_DTOR, 1); + Matrix_RotateY(gGfxMatrix, gGameFrameCount * M_DTOR, MTXF_APPLY); } var_fv0 = sZoFwork[ZO_BSF_60_Y] + -1.0f * actor->fwork[0] - actor->obj.pos.y; @@ -3573,10 +3574,10 @@ void Zoness_8019A1FC(Actor* actor) { var_s1 = 1; } for (var_s0 = 0; var_s0 < var_s1; var_s0++) { - Matrix_Translate(gGfxMatrix, 0.0f, 30.0f, 0.0f, 1); - Matrix_RotateY(gGfxMatrix, 1.5707964f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 30.0f, 0.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, 1.5707964f, MTXF_APPLY); Matrix_Push(&gGfxMatrix); - Matrix_Scale(gGfxMatrix, 0.75f, 0.75f, 0.75f, 1); + Matrix_Scale(gGfxMatrix, 0.75f, 0.75f, 0.75f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ZO_6018660); Matrix_Pop(&gGfxMatrix); @@ -3594,8 +3595,8 @@ void Zoness_8019A4E0(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 arg4) { sp3C = Math_Atan2F(sp4C, sp44); sp40 = -Math_Atan2F(sp48, sqrtf(SQ(sp4C) + SQ(sp44))); - Matrix_RotateY(gCalcMatrix, sp3C, 0); - Matrix_RotateX(gCalcMatrix, sp40, 1); + Matrix_RotateY(gCalcMatrix, sp3C, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, sp40, MTXF_APPLY); sp30.x = 0.0f; sp30.y = 0.0f; sp30.z = arg4; @@ -3678,7 +3679,8 @@ void Zoness_8019A5D4(Actor* actor) { 30.0f); actor->vel.z -= D_ctx_80177D08; } - if (func_enmy_80062DBC(&actor->obj.pos, gBosses[0].info.hitbox, &gBosses[0].obj, 0.0f, 0.0f, 0.0f) != 0) { + if (Object_CheckHitboxCollision(&actor->obj.pos, gBosses[0].info.hitbox, &gBosses[0].obj, 0.0f, 0.0f, + 0.0f) != 0) { actor->fwork[6] = 50.0f; AUDIO_PLAY_SFX(0x19030003, actor->sfxSource, 4); } @@ -3753,22 +3755,22 @@ void Zoness_8019ACCC(Actor* actor) { if (var_s4 < 0) { var_s4 = 0; } - Matrix_Translate(gGfxMatrix, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + D_ctx_80177D20, 1); - Matrix_RotateY(gGfxMatrix, temp_fs4, 1); - Matrix_RotateX(gGfxMatrix, temp_fs0_2, 1); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 0.0f, 1); + Matrix_Translate(gGfxMatrix, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + D_ctx_80177D20, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, temp_fs4, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, temp_fs0_2, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 0.0f, MTXF_APPLY); sp94 = (180.0f / var_s4) + 1.0f; for (i = 0; i < var_s4; i++) { temp_fs1_2 = SIN_DEG(i * sp94) * actor->fwork[5]; temp_fs0_4 = COS_DEG(i * sp94) * actor->fwork[5] * -0.25f; - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, actor->fwork[1], 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, actor->fwork[1], MTXF_APPLY); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, temp_fs1_2, 0.0f, 1); - Matrix_RotateX(gGfxMatrix, M_DTOR * temp_fs0_4, 1); + Matrix_Translate(gGfxMatrix, 0.0f, temp_fs1_2, 0.0f, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_DTOR * temp_fs0_4, MTXF_APPLY); Matrix_Push(&gGfxMatrix); - Matrix_RotateZ(gGfxMatrix, M_DTOR * var_fs5, 1); - Matrix_RotateX(gGfxMatrix, 1.5707964f, 1); - Matrix_Scale(gGfxMatrix, 1.5f, 1.5f, 1.5f, 1); + Matrix_RotateZ(gGfxMatrix, M_DTOR * var_fs5, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, 1.5707964f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 1.5f, 1.5f, 1.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ZO_6018660); Matrix_Pop(&gGfxMatrix); @@ -3778,17 +3780,17 @@ void Zoness_8019ACCC(Actor* actor) { } Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + D_ctx_80177D20, 1); - Matrix_RotateY(gGfxMatrix, actor->obj.rot.y * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, actor->obj.rot.x * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, 2.6f, 2.6f, 2.6f, 1); + Matrix_Translate(gGfxMatrix, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + D_ctx_80177D20, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, actor->obj.rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 2.6f, 2.6f, 2.6f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL(&gMasterDisp, 70); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); gSPDisplayList(gMasterDisp++, D_ZO_6004380); - Matrix_RotateY(gGfxMatrix, sZoFwork[ZO_BSF_19] * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, actor->fwork[2] * M_DTOR, 1); - Matrix_RotateZ(gGfxMatrix, actor->fwork[3] * M_DTOR, 1); + Matrix_RotateY(gGfxMatrix, sZoFwork[ZO_BSF_19] * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, actor->fwork[2] * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, actor->fwork[3] * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL_55(); gSPDisplayList(gMasterDisp++, D_ZO_601BCC0); @@ -3820,7 +3822,7 @@ void Zoness_8019B1F0(Actor* actor) { actor->obj.pos.y = 120.0f; actor->scale = -1.0f; - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); sp78.x = sp78.y = 0.0f; sp78.z = actor->obj.rot.z; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp78, &sp6C); @@ -3884,7 +3886,7 @@ void Zoness_8019B548(Actor* actor) { Vec3f sp58; Actor* otherActor; - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); switch (actor->state) { case 0: for (i = 1; i < 3; i++) { @@ -4146,11 +4148,11 @@ void Zoness_8019C200(Actor* actor) { } else { actor->fwork[0] = 30.0f; } - Matrix_RotateZ(gCalcMatrix, actor->fwork[0] * M_DTOR, 0); + Matrix_RotateZ(gCalcMatrix, actor->fwork[0] * M_DTOR, MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, &D_i3_801BF8AC, &sp2C); actor->fwork[1] = sp2C.x; actor->fwork[2] = actor->fwork[3] + sp2C.y; - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, &D_i3_801BF8B8, &sp2C); for (i = 0, newActor = gActors; i < 60; i++, newActor++) { if (newActor->obj.status == OBJ_FREE) { @@ -4185,14 +4187,14 @@ void Zoness_8019C454(Actor* actor) { } if (1) {} } - Matrix_RotateZ(gCalcMatrix, actor->fwork[0] * M_DTOR, 0); + Matrix_RotateZ(gCalcMatrix, actor->fwork[0] * M_DTOR, MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, &D_i3_801BF8AC, &sp34); actor->fwork[1] = sp34.x; actor->fwork[2] = actor->fwork[3] + sp34.y; otherActor = &gActors[actor->iwork[3]]; switch (actor->state) { case 0: - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, &D_i3_801BF8B8, &sp34); if ((otherActor->obj.status != OBJ_FREE) && (otherActor->obj.id == OBJ_ACTOR_251)) { otherActor->obj.pos.x = actor->obj.pos.x + sp34.x; @@ -4247,29 +4249,29 @@ void Zoness_8019C83C(Actor* actor) { s32 var_s1; Matrix_Push(&gGfxMatrix); - Matrix_RotateZ(gGfxMatrix, actor->fwork[0] * M_DTOR, 1); + Matrix_RotateZ(gGfxMatrix, actor->fwork[0] * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ZO_601A340); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, -320.0f, 0.0f, 1); - Matrix_Scale(gGfxMatrix, 1.0f, 1.3, 1.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, -320.0f, 0.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 1.0f, 1.3, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ZO_6013330); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_RotateZ(gGfxMatrix, 1.5707964f, 1); - Matrix_Translate(gGfxMatrix, -110.0f, 0.0f, 0.0f, 1); + Matrix_RotateZ(gGfxMatrix, 1.5707964f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, -110.0f, 0.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ZO_601D680); Matrix_Pop(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, actor->fwork[1], actor->fwork[2], 0.0f, 1); - Matrix_RotateY(gGfxMatrix, actor->fwork[4] * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, 0.75f, 0.75f, 0.75f, 1); + Matrix_Translate(gGfxMatrix, actor->fwork[1], actor->fwork[2], 0.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, actor->fwork[4] * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.75f, 0.75f, 0.75f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ZO_601C590); RCP_SetupDL_57(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); - Matrix_RotateY(gGfxMatrix, gGameFrameCount * M_DTOR, 1); + Matrix_RotateY(gGfxMatrix, gGameFrameCount * M_DTOR, MTXF_APPLY); var_fv1 = (fabsf(actor->fwork[3]) * 1.3f) + 50.0f; for (var_s1 = 0; var_fv1 > 0.0f; var_s1++) { @@ -4283,10 +4285,10 @@ void Zoness_8019C83C(Actor* actor) { var_s1 = 1; } for (i = 0; i < var_s1; i++) { - Matrix_Translate(gGfxMatrix, 0.0f, 9.3f, 0.0f, 1); - Matrix_RotateY(gGfxMatrix, 1.5707964f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 9.3f, 0.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, 1.5707964f, MTXF_APPLY); Matrix_Push(&gGfxMatrix); - Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, 1); + Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ZO_6018660); Matrix_Pop(&gGfxMatrix); @@ -4358,9 +4360,9 @@ void Zoness_8019CE58(Actor* actor) { RCP_SetupDL(&gMasterDisp, 72); if (actor->iwork[0] != 0) { - Matrix_Translate(gGfxMatrix, 0.0f, actor->fwork[0], 0.0f, 1); - Matrix_RotateZ(gGfxMatrix, (actor->fwork[4] + actor->obj.rot.z) * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, actor->fwork[1], actor->fwork[2], actor->fwork[3], 1); + Matrix_Translate(gGfxMatrix, 0.0f, actor->fwork[0], 0.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, (actor->fwork[4] + actor->obj.rot.z) * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, actor->fwork[1], actor->fwork[2], actor->fwork[3], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if (gMissedZoSearchlight) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 191, 43, 255); @@ -4475,19 +4477,19 @@ void Zoness_8019D428(Player* player) { case 0: gCsFrameCount = 0; player->pos.z += 10000.0f; - player->camEye.x = gCsCamEyeX = player->pos.x; - player->camEye.y = gCsCamEyeY = (player->pos.y * player->unk_148) + 50.0f; - player->camEye.z = gCsCamEyeZ = 400.0f; - player->camAt.x = gCsCamAtX = player->pos.x; - player->camAt.y = gCsCamAtY = (player->pos.y * player->unk_148) + 20.0f - 230.0f; - player->camAt.z = gCsCamAtZ = 0.0f; + player->cam.eye.x = gCsCamEyeX = player->pos.x; + player->cam.eye.y = gCsCamEyeY = (player->pos.y * player->unk_148) + 50.0f; + player->cam.eye.z = gCsCamEyeZ = 400.0f; + player->cam.at.x = gCsCamAtX = player->pos.x; + player->cam.at.y = gCsCamAtY = (player->pos.y * player->unk_148) + 20.0f - 230.0f; + player->cam.at.z = gCsCamAtZ = 0.0f; player->unk_1D0 = 1; /* fallthrough */ case 1: Math_SmoothStepToF(&player->pos.z, 0.0f, 0.1f, 48.0f, 0); - Math_SmoothStepToF(&player->camAt.y, (player->pos.y * player->unk_148) + 20.0f, 0.1f, 1.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.y, (player->pos.y * player->unk_148) + 20.0f, 0.1f, 1.0f, 0.0f); if (gCsFrameCount >= 230) { - Math_SmoothStepToF(&player->camAt.z, player->unk_138, 0.2f, 20000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.z, player->unk_138, 0.2f, 20000.0f, 0.0f); } sp2C = gControllerHold[gMainController].button; gControllerHold[gMainController].button = gBoostButton[gMainController]; @@ -4503,11 +4505,11 @@ void Zoness_8019D428(Player* player) { if (gCsFrameCount >= 270) { AUDIO_PLAY_BGM(SEQ_ID_ZONESS | SEQ_FLAG); gLevelStatusScreenTimer = 80; - player->state_1C8 = PLAYERSTATE_1C8_3; + player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_1D0 = 0; player->timer_1F8 = 0; player->timer_1FC = 0; - D_ctx_80178488 = 1; + gLoadLevelObjects = 1; } break; } @@ -4529,17 +4531,17 @@ void Zoness_8019D76C(Player* player) { case 10: gCsFrameCount = 0; player->unk_4D8 = 0.0f; - player->unk_034 = 0.0f; + player->camRoll = 0.0f; player->unk_0D0 = 40.0f; player->unk_234 = 1; player->wings.unk_04 = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = player->unk_130 = player->unk_12C = player->unk_110 = 0.0f; - gCsCamEyeX = player->camEye.x; - gCsCamEyeY = player->camEye.y; - gCsCamEyeZ = player->camEye.z; - gCsCamAtX = player->camAt.x; - gCsCamAtY = player->camAt.y; - gCsCamAtZ = player->camAt.z; + gCsCamEyeX = player->cam.eye.x; + gCsCamEyeY = player->cam.eye.y; + gCsCamEyeZ = player->cam.eye.z; + gCsCamAtX = player->cam.at.x; + gCsCamAtY = player->cam.at.y; + gCsCamAtZ = player->cam.at.z; for (i = 10; i < 60; i++) { if (gActors[i].unk_0B6 == 0) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); @@ -4584,7 +4586,7 @@ void Zoness_8019D76C(Player* player) { Audio_KillSfxBySource(player->sfxSource); gFillScreenAlpha = 250; player->timer_1F8 = 20; - player->wings.unk_2C = 1; + player->wings.modelId = 1; player->unk_0D0 = 0.0f; player->unk_0E4 = 0.0f; player->unk_0E8 = 0.0f; @@ -4607,23 +4609,23 @@ void Zoness_8019D76C(Player* player) { D_ctx_80177A48[2] = 0.0f; if (!gMissedZoSearchlight) { D_ctx_80177A48[1] = 330.0f; - player->camEye.x = 1350.0f; - player->camAt.x = gCsCamAtX = 1450.0f; + player->cam.eye.x = 1350.0f; + player->cam.at.x = gCsCamAtX = 1450.0f; D_ctx_80177A48[3] = 800.0f; D_ctx_80177A48[4] = -0.15f; D_ctx_80177A48[5] = -250.0f; - player->camEye.z = player->pos.z + D_ctx_80177D20 - 1780.0f; + player->cam.eye.z = player->pos.z + D_ctx_80177D20 - 1780.0f; } else { - player->camEye.x = -1500.0f; - player->camAt.x = gCsCamAtX = -1500.0f; + player->cam.eye.x = -1500.0f; + player->cam.at.x = gCsCamAtX = -1500.0f; D_ctx_80177A48[3] = -800.0f; D_ctx_80177A48[4] = 0.2f; D_ctx_80177A48[5] = 250.0f; - player->camEye.z = player->pos.z + D_ctx_80177D20 - 2000.0f; + player->cam.eye.z = player->pos.z + D_ctx_80177D20 - 2000.0f; } - player->camEye.y = 200.0f; - player->camAt.y = gCsCamAtY = player->pos.y; - player->camAt.z = gCsCamAtZ = player->pos.z + D_ctx_80177D20; + player->cam.eye.y = 200.0f; + player->cam.at.y = gCsCamAtY = player->pos.y; + player->cam.at.z = gCsCamAtZ = player->pos.z + D_ctx_80177D20; D_ctx_80177A48[0] = 0.0f; } break; @@ -4632,7 +4634,7 @@ void Zoness_8019D76C(Player* player) { gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 4; D_ctx_80177A48[1] += D_ctx_80177A48[2]; - Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, MTXF_NEW); sp58.x = 0.0f; sp58.y = 0.0f; sp58.z = D_ctx_80177A48[3]; @@ -4672,7 +4674,7 @@ void Zoness_8019D76C(Player* player) { if (gFillScreenAlpha == 255) { func_8001CA24(0); Audio_FadeOutAll(10); - player->state_1C8 = PLAYERSTATE_1C8_6; + player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; D_ctx_8017837C = 4; D_play_800D3180[LEVEL_ZONESS] = Play_CheckMedalStatus(250) + 1; @@ -4770,8 +4772,8 @@ void Zoness_8019D76C(Player* player) { player->unk_25C = 0.6f; } } - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4) * M_DTOR), 1); + Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4) * M_DTOR), MTXF_APPLY); sp58.x = 0.0f; sp58.y = 0.0f; sp58.z = player->unk_0D0; @@ -4783,12 +4785,12 @@ void Zoness_8019D76C(Player* player) { player->pos.y += player->vel.y; player->unk_138 = player->pos.z += player->vel.z; player->unk_0F8 = player->unk_0EC; - Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0.0f); player->unk_088 += 10.0f; player->unk_080 = -SIN_DEG(player->unk_088) * 0.3f; player->unk_0F4 += 8.0f; @@ -4828,8 +4830,8 @@ void Zoness_8019E5F0(Actor* actor) { } break; } - Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -(actor->unk_0F4.x * M_DTOR), 1); + Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(actor->unk_0F4.x * M_DTOR), MTXF_APPLY); sp34.x = 0.0f; sp34.y = 0.0f; sp34.z = actor->fwork[0]; diff --git a/src/overlays/ovl_i4/fox_bo.c b/src/overlays/ovl_i4/fox_bo.c index 74c03277..d22fc9cf 100644 --- a/src/overlays/ovl_i4/fox_bo.c +++ b/src/overlays/ovl_i4/fox_bo.c @@ -260,13 +260,14 @@ void Bolse_8018C158(Actor* actor) { if (gBosses[2].state == 10) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_5)) { - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_7; + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || + (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].timer_1F8 = 30; gPlayer[0].unk_1D0 = 0; gPlayer[0].unk_000 = 0.0f; } - func_360_8002EE34(); + AllRange_ClearRadio(); actor->state = 6; AUDIO_PLAY_SFX(0x31009063U, actor->sfxSource, 0U); AUDIO_PLAY_SFX(0x2940D09AU, actor->sfxSource, 4U); @@ -284,15 +285,15 @@ void Bolse_8018C158(Actor* actor) { actor->iwork[1] = gHitCount; actor->state = 10; actor->timer_0BC = 150; - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_0; + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_STANDBY; AUDIO_PLAY_BGM(SEQ_ID_BO_BOSS | SEQ_FLAG); - func_360_8002EE34(); - gPlayer[0].camEye.x = 400.0f; - gPlayer[0].camEye.y = 50.0f; - gPlayer[0].camEye.z = 3000.0f; - gPlayer[0].camAt.x = 0.0f; - gPlayer[0].camAt.y = 0.0f; - gPlayer[0].camAt.z = 0.0f; + AllRange_ClearRadio(); + gPlayer[0].cam.eye.x = 400.0f; + gPlayer[0].cam.eye.y = 50.0f; + gPlayer[0].cam.eye.z = 3000.0f; + gPlayer[0].cam.at.x = 0.0f; + gPlayer[0].cam.at.y = 0.0f; + gPlayer[0].cam.at.z = 0.0f; for (i = 10; i < 30; i++) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); } @@ -318,23 +319,23 @@ void Bolse_8018C158(Actor* actor) { } if (i == 3) { actor->state = 2; - player->state_1C8 = PLAYERSTATE_1C8_3; + player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; return; } } - player->camEye.x += actorPtr->vel.x * 0.23f; - player->camEye.y += actorPtr->vel.y * 0.23f; - player->camEye.z += actorPtr->vel.z * 0.23f; + player->cam.eye.x += actorPtr->vel.x * 0.23f; + player->cam.eye.y += actorPtr->vel.y * 0.23f; + player->cam.eye.z += actorPtr->vel.z * 0.23f; - Math_SmoothStepToF(&player->camAt.x, actorPtr->obj.pos.x, 1.0f, 20000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.y, actorPtr->obj.pos.y, 1.0f, 20000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.z, actorPtr->obj.pos.z, 1.0f, 20000.0f, 0.0f); - Math_SmoothStepToF(&player->unk_034, 0.0f, 0.1f, 0.2f, 0); + Math_SmoothStepToF(&player->cam.at.x, actorPtr->obj.pos.x, 1.0f, 20000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.y, actorPtr->obj.pos.y, 1.0f, 20000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.z, actorPtr->obj.pos.z, 1.0f, 20000.0f, 0.0f); + Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 0.2f, 0); if ((gControllerPress->button & START_BUTTON) || ((D_360_800C9B4C + 300) == gAllRangeEventTimer)) { actor->state = 2; - player->state_1C8 = PLAYERSTATE_1C8_3; + player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; func_play_800B7184(player, 1); player->unk_014 = 0.0f; D_hud_80161708 = 0; @@ -359,13 +360,13 @@ void Bolse_8018C158(Actor* actor) { gBosses[0].obj.rot.y = gBosses[0].fwork[1]; - player->camEye.x -= 6.0f; - player->camEye.z -= 12.0f; - player->camAt.y += 8.0f; + player->cam.eye.x -= 6.0f; + player->cam.eye.z -= 12.0f; + player->cam.at.y += 8.0f; - gPlayer[0].camEye.y += 2.0f; + gPlayer[0].cam.eye.y += 2.0f; - Math_SmoothStepToF(&player->unk_034, 0.0f, 1.0f, 1000.0f, 0); + Math_SmoothStepToF(&player->camRoll, 0.0f, 1.0f, 1000.0f, 0); if (actor->timer_0BC == 130) { Radio_PlayMessage(gMsg_ID_11060, RCID_FALCO); @@ -383,7 +384,7 @@ void Bolse_8018C158(Actor* actor) { if (!actor->timer_0BC) { gAllRangeEventTimer = 3000; actor->state = 2; - player->state_1C8 = PLAYERSTATE_1C8_3; + player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; func_play_800B7184(player, 1); player->unk_014 = 0.0f; Audio_KillSfxBySource(gBosses[1].sfxSource); @@ -589,8 +590,8 @@ void Bolse_8018D124(Actor* actor) { Vec3f src; Vec3f dest; - Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + actor->obj.rot.y) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -actor->unk_0F4.x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + actor->obj.rot.y) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -actor->unk_0F4.x * M_DTOR, MTXF_APPLY); src.y = 0.0f; src.x = 0.0f; @@ -636,7 +637,7 @@ bool Bolse_8018D278(Actor* actor) { void Bolse_8018D394(Actor* actor) { Bolse_8018CC60(actor); - if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_0) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7)) { + if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_STANDBY) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) { Bolse_8018CCE8(actor); Bolse_8018CE5C(actor); if (Bolse_8018D008(actor)) { @@ -658,7 +659,7 @@ bool Bolse_8018D414(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th } void Bolse_8018D454(Actor* actor) { - Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, 1); + Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, MTXF_APPLY); Animation_GetFrameData(&D_BO_600F2E0, 0, actor->vwork); Animation_DrawSkeleton(1, D_BO_600F36C, actor->vwork, Bolse_8018D414, NULL, actor, &gIdentityMatrix); actor->iwork[0] = 1; @@ -839,14 +840,14 @@ s32 Bolse_8018E05C(Boss* boss, s32 index) { var_fs0 = D_i4_801A0488[index].unk_04; Matrix_Push(&gGfxMatrix); - Matrix_RotateX(gCalcMatrix, -temp_fs1 * M_DTOR, 0); + Matrix_RotateX(gCalcMatrix, -temp_fs1 * M_DTOR, MTXF_NEW); var_fs0 += boss->obj.rot.y; if (var_fs0 >= 360.0f) { var_fs0 -= 360.0f; } - Matrix_RotateY(gCalcMatrix, (-var_fs0) * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, (-var_fs0) * M_DTOR, MTXF_APPLY); src.x = gPlayer[0].pos.x - (boss->obj.pos.x + temp_fs2); src.y = gPlayer[0].pos.y - (boss->obj.pos.y + 580.0f); @@ -978,14 +979,14 @@ void Bolse_8018E710(Boss* boss) { } boss->fwork[0] += 2.0f; - Matrix_RotateY(&D_BO_8019EE80, gBosses[0].obj.rot.y * M_DTOR, 0); + Matrix_RotateY(&D_BO_8019EE80, gBosses[0].obj.rot.y * M_DTOR, MTXF_NEW); } void Bolse_8018E870(Boss* boss) { s32 i; s32 alpha; - Matrix_Scale(gGfxMatrix, boss->unk_3F8, boss->unk_3F8, boss->unk_3F8, 1); + Matrix_Scale(gGfxMatrix, boss->unk_3F8, boss->unk_3F8, boss->unk_3F8, MTXF_APPLY); if (boss->vwork[30].y >= 0.0f) { gSPDisplayList(gMasterDisp++, D_BO_6002020); @@ -1005,12 +1006,13 @@ void Bolse_8018E870(Boss* boss) { RCP_SetupDL(&gMasterDisp, 0x31); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, alpha); gDPSetEnvColor(gMasterDisp++, 255, 56, 56, alpha); - Matrix_Translate(gGfxMatrix, D_i4_801A0488[i].unk_0C, D_i4_801A0488[i].unk_10, D_i4_801A0488[i].unk_14, 1); - Matrix_RotateY(gGfxMatrix, D_i4_801A0488[i].unk_04 * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, D_i4_801A0488[i].unk_00 * M_DTOR, 1); - Matrix_RotateZ(gGfxMatrix, M_PI / 2, 1); - Matrix_Translate(gGfxMatrix, 1.0f, 1.0f, D_i4_801A0488[i].unk_08 * 200.0f, 1); - Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, D_i4_801A0488[i].unk_08, 1); + Matrix_Translate(gGfxMatrix, D_i4_801A0488[i].unk_0C, D_i4_801A0488[i].unk_10, D_i4_801A0488[i].unk_14, + MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, D_i4_801A0488[i].unk_04 * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, D_i4_801A0488[i].unk_00 * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, M_PI / 2, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 1.0f, 1.0f, D_i4_801A0488[i].unk_08 * 200.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, D_i4_801A0488[i].unk_08, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_BO_600BF30); Matrix_Pop(&gGfxMatrix); @@ -1295,7 +1297,7 @@ void Bolse_8018EF6C(Player* player) { } if (gCsFrameCount == 270) { - player->state_1C8 = PLAYERSTATE_1C8_3; + player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_0D0 = D_play_80161A54; player->unk_014 = 0.0001f; @@ -1312,8 +1314,8 @@ void Bolse_8018EF6C(Player* player) { break; } - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), 1); + Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), MTXF_APPLY); sp54.x = 0.0f; sp54.y = 0; @@ -1332,12 +1334,12 @@ void Bolse_8018EF6C(Player* player) { player->unk_138 = player->pos.z; player->unk_0F8 = (player->unk_0EC + player->unk_12C) + player->unk_130; - Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0); } void Bolse_8018F83C(Actor* actor, s32 arg1) { @@ -1451,7 +1453,7 @@ void Bolse_8018F94C(Player* player) { gCsFrameCount = 0; gGroundLevel = -10000.0f; player->unk_240 = 1; - player->wings.unk_2C = 1; + player->wings.modelId = 1; AUDIO_PLAY_SFX(0x31009063U, actor50->sfxSource, 0U); func_8001C8B8(0); } @@ -1570,8 +1572,8 @@ void Bolse_8018F94C(Player* player) { Math_SmoothStepToF(&player->unk_0D0, 0.0f, 0.1f, 1.5f, 0.0f); Math_SmoothStepToF(D_ctx_80177A48, 0.2f, 1.0f, 0.001f, 0.0f); - Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[5] * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, 0, 1); + Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[5] * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, 0, MTXF_APPLY); sp74.x = 0.0f; sp74.y = 0.0f; @@ -1685,8 +1687,8 @@ void Bolse_8018F94C(Player* player) { gLight1G = D_i4_801A03D4; gLight1B = D_i4_801A03D8; - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), 1); + Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); sp74.x = 0.0f; sp74.y = 0.0f; @@ -1708,7 +1710,7 @@ void Bolse_8018F94C(Player* player) { if (player->unk_1D0 < 10) { Math_SmoothStepToF(&player->unk_130, 0.0f, 0.1f, 15.0f, 0.0f); Math_SmoothStepToF(&player->unk_12C, 0.0f, 0.1f, 15.0f, 0.0f); - Math_SmoothStepToF(&player->unk_034, 0.0f, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f); Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 20.0f, 0.0f); @@ -1718,16 +1720,16 @@ void Bolse_8018F94C(Player* player) { func_play_800B7184(player, 0); - player->camEye.x += player->vel.x * 0.1f; - player->camEye.y += player->vel.y * 0.1f; - player->camEye.z += player->vel.z * 0.1f; + player->cam.eye.x += player->vel.x * 0.1f; + player->cam.eye.y += player->vel.y * 0.1f; + player->cam.eye.z += player->vel.z * 0.1f; } else { - Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000, 0); - Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000, 0); - Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000, 0); - Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_ctx_80177A48[0], 50000, 0); - Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_ctx_80177A48[0], 50000, 0); - Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_ctx_80177A48[0], 50000, 0); + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000, 0); + Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000, 0); + Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000, 0); + Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 50000, 0); + Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 50000, 0); + Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000, 0); } player->unk_088 += 10.0f; player->unk_080 = -SIN_DEG(player->unk_088) * 0.3f; @@ -1748,8 +1750,8 @@ void Bolse_80190D98(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 effect->obj.rot.x = xRot; effect->obj.rot.y = yRot; effect->scale2 = 1.0f; - Matrix_RotateY(gCalcMatrix, M_DTOR * yRot, 0); - Matrix_RotateX(gCalcMatrix, M_DTOR * xRot, 1); + Matrix_RotateY(gCalcMatrix, M_DTOR * yRot, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, M_DTOR * xRot, MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; src.z = 200.0f; @@ -1831,7 +1833,7 @@ void Bolse_80191180(Effect* effect) { switch (effect->state) { case 0: gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 192); - Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, effect->scale2, 1); + Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, effect->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_BO_6006910); break; @@ -1840,7 +1842,7 @@ void Bolse_80191180(Effect* effect) { RCP_SetupDL(&gMasterDisp, 0x43); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_44); gDPSetEnvColor(gMasterDisp++, 0, 128, 255, effect->unk_44); - Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, 1); + Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); RCP_SetupDL(&gMasterDisp, 0x40); @@ -1933,7 +1935,7 @@ void Bolse_801912FC(Boss* boss) { } } - Matrix_RotateY(gCalcMatrix, -boss->obj.rot.y * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, -boss->obj.rot.y * M_DTOR, MTXF_NEW); for (i = 0; i < 8; i++) { if (boss->swork[i + 24] != 0) { @@ -2086,7 +2088,7 @@ void Bolse_80191BAC(Boss* boss) { void Bolse_80191DB0(Boss* boss) { s32 alpha; - Matrix_Scale(gGfxMatrix, boss->unk_3F8, boss->unk_3F8, boss->unk_3F8, 1); + Matrix_Scale(gGfxMatrix, boss->unk_3F8, boss->unk_3F8, boss->unk_3F8, MTXF_APPLY); alpha = boss->fwork[0]; if (alpha != 0) { if (((gGameFrameCount % 2) == 0)) { @@ -2094,7 +2096,7 @@ void Bolse_80191DB0(Boss* boss) { } RCP_SetupDL(&gMasterDisp, 0x29); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, alpha); - Matrix_Scale(gGfxMatrix, 1.2f, 0.55f, 1.2f, 1); + Matrix_Scale(gGfxMatrix, 1.2f, 0.55f, 1.2f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_BO_600C4E0); } @@ -2196,15 +2198,15 @@ void Bolse_80192264(void) { Matrix_Push(&gGfxMatrix); Rand_SetSeed(1, 29100, 9786); - Matrix_Translate(gGfxMatrix, 0.0f, gCameraShakeY, 0.0f, 1); - Matrix_RotateY(gGfxMatrix, gBosses[0].obj.rot.y * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, 5.0f, 1.0f, 5.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, gCameraShakeY, 0.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, gBosses[0].obj.rot.y * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 5.0f, 1.0f, 5.0f, MTXF_APPLY); for (z = -3200.0f; z <= 3200.0f; z += 800.0f) { for (x = -3200.0f; x <= 3200.0f; x += 800.0f) { rnd = Rand_ZeroOneSeeded(); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, x, 0.0f, z, 1); + Matrix_Translate(gGfxMatrix, x, 0.0f, z, MTXF_APPLY); Matrix_MultVec3f(gGfxMatrix, &spDC, &spD0); if ((spD0.z < 3000.0f) && (spD0.z > -13000.0f) && (fabsf(spD0.x) < (fabsf(spD0.z * 0.7f) + 3000.0f)) && (fabsf(spD0.y) < (fabsf(spD0.z * 0.5f) + 2000.0f))) { diff --git a/src/overlays/ovl_i4/fox_fo.c b/src/overlays/ovl_i4/fox_fo.c index bef5f0cb..dbcebf83 100644 --- a/src/overlays/ovl_i4/fox_fo.c +++ b/src/overlays/ovl_i4/fox_fo.c @@ -106,7 +106,7 @@ void Fortuna_80187960(Actor* actor) { Actor* actor19 = &gActors[19]; s32 pad[2]; - if ((player->state_1C8 == PLAYERSTATE_1C8_4) || (player->state_1C8 == PLAYERSTATE_1C8_6)) { + if ((player->state_1C8 == PLAYERSTATE_1C8_DOWN) || (player->state_1C8 == PLAYERSTATE_1C8_NEXT)) { gAllRangeEventTimer = 20000; return; } @@ -135,7 +135,7 @@ void Fortuna_80187960(Actor* actor) { if (gAllRangeEventTimer == 7000) { AUDIO_PLAY_SFX(0x11030016U, gBosses[0].sfxSource, 4U); - func_360_8002EE34(); + AllRange_ClearRadio(); Radio_PlayMessage(gMsg_ID_9390, RCID_ROB64); gAllRangeCountdownScale = 1.0f; gShowAllRangeCountdown = 1; @@ -172,10 +172,10 @@ void Fortuna_80187960(Actor* actor) { if (gAllRangeEventTimer == 9206) { gShowAllRangeCountdown = 0; actor->state = 5; - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_0; + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_STANDBY; actor->iwork[0] = 0; actor->fwork[0] = 0.0f; - func_360_8002EE34(); + AllRange_ClearRadio(); for (i = 4; i < 8; i++) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); } @@ -190,11 +190,11 @@ void Fortuna_80187960(Actor* actor) { gShowAllRangeCountdown = 0; actor->iwork[0] = 0; actor->state = 6; - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_7; + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].unk_1D0 = 0; gPlayer[0].unk_000 = 0.0f; - func_360_8002EE34(); + AllRange_ClearRadio(); for (i = 4; i < 8; i++) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); @@ -225,7 +225,7 @@ void Fortuna_80187960(Actor* actor) { } gAllRangeEventTimer = 0; gStarWolfMsgTimer = 0; - if (player->state_1C8 == PLAYERSTATE_1C8_3) { + if (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) { actor->state = 2; player->pos.x = 0.0f; player->pos.z = 8000.0f; @@ -261,7 +261,7 @@ void Fortuna_80187960(Actor* actor) { if (gCsFrameCount == 264) { actorPtr->state = 2; actor->state = 2; - player->state_1C8 = PLAYERSTATE_1C8_3; + player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_014 = 0.0001f; AUDIO_PLAY_BGM(gBgmSeqId); gLevelStatusScreenTimer = 80; @@ -274,13 +274,13 @@ void Fortuna_80187960(Actor* actor) { break; case 3: - player->camEye.x += actor4->vel.x * 0.23f; - player->camEye.y += actor4->vel.y * 0.23f; - player->camEye.z += actor4->vel.z * 0.23f; - Math_SmoothStepToF(&player->camAt.x, actor4->obj.pos.x, 1.0f, 20000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.y, actor4->obj.pos.y, 1.0f, 20000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.z, actor4->obj.pos.z, 1.0f, 20000.0f, 0.0f); - Math_SmoothStepToF(&player->unk_034, 0.0f, 1.0f, 1000.0f, 0.0f); + player->cam.eye.x += actor4->vel.x * 0.23f; + player->cam.eye.y += actor4->vel.y * 0.23f; + player->cam.eye.z += actor4->vel.z * 0.23f; + Math_SmoothStepToF(&player->cam.at.x, actor4->obj.pos.x, 1.0f, 20000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.y, actor4->obj.pos.y, 1.0f, 20000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.z, actor4->obj.pos.z, 1.0f, 20000.0f, 0.0f); + Math_SmoothStepToF(&player->camRoll, 0.0f, 1.0f, 1000.0f, 0.0f); if (gAllRangeEventTimer == (D_360_800C9B4C + 2)) { gStarWolfMsgTimer = 883; gAllRangeCheckpoint = 1; @@ -294,7 +294,7 @@ void Fortuna_80187960(Actor* actor) { if ((gControllerPress->button & START_BUTTON) || (gAllRangeEventTimer == (D_360_800C9B4C + 440))) { actor->state = 2; - player->state_1C8 = PLAYERSTATE_1C8_3; + player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; func_play_800B7184(player, 1); player->unk_014 = 0.0f; D_hud_80161708 = 0; @@ -306,33 +306,33 @@ void Fortuna_80187960(Actor* actor) { gAllRangeEventTimer = 9207; actor->iwork[0] += 1; actor->fwork[0] += 10.0f; - player->camEye.x = 300.0f; - player->camEye.y = 300.0f; - player->camEye.z = -1000.0f; - player->camAt.x = actor->fwork[0] + 300.0f; - player->camAt.y = actor->fwork[0] + 500.0f; - player->camAt.z = -15000.0f; - player->unk_034 = 0.0f; + player->cam.eye.x = 300.0f; + player->cam.eye.y = 300.0f; + player->cam.eye.z = -1000.0f; + player->cam.at.x = actor->fwork[0] + 300.0f; + player->cam.at.y = actor->fwork[0] + 500.0f; + player->cam.at.z = -15000.0f; + player->camRoll = 0.0f; if ((actor->iwork[0] == 50) && (gStarWolfTeamAlive[0] != 0)) { if (gRadioState == 0) { Radio_PlayMessage(gMsg_ID_9431, RCID_WOLF); } - Fortuna_80187884(&gActors[4], player->camEye.x - 200.0f, player->camEye.y, player->camEye.z, 160.0f); + Fortuna_80187884(&gActors[4], player->cam.eye.x - 200.0f, player->cam.eye.y, player->cam.eye.z, 160.0f); } if ((actor->iwork[0] == 70) && (gStarWolfTeamAlive[1] != 0)) { if (gRadioState == 0) { Radio_PlayMessage(gMsg_ID_9432, RCID_LEON); } - Fortuna_80187884(&gActors[5], player->camEye.x, player->camEye.y + 50.0f, player->camEye.z, 160.0f); + Fortuna_80187884(&gActors[5], player->cam.eye.x, player->cam.eye.y + 50.0f, player->cam.eye.z, 160.0f); } if ((actor->iwork[0] == 90) && (gStarWolfTeamAlive[2] != 0)) { if (gRadioState == 0) { Radio_PlayMessage(gMsg_ID_9433, RCID_PIGMA); } - Fortuna_80187884(gActors + 6, player->camEye.x - 200.0f, player->camEye.y + 200.0f, player->camEye.z, + Fortuna_80187884(gActors + 6, player->cam.eye.x - 200.0f, player->cam.eye.y + 200.0f, player->cam.eye.z, 160.0f); } @@ -340,12 +340,12 @@ void Fortuna_80187960(Actor* actor) { if (gRadioState == 0) { Radio_PlayMessage(gMsg_ID_9434, RCID_ANDREW); } - Fortuna_80187884(gActors + 7, player->camEye.x - 300.0f, player->camEye.y, player->camEye.z, 160.0f); + Fortuna_80187884(gActors + 7, player->cam.eye.x - 300.0f, player->cam.eye.y, player->cam.eye.z, 160.0f); } if (actor->iwork[0] == 250) { actor->state = 2; - player->state_1C8 = PLAYERSTATE_1C8_3; + player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; func_play_800B7184(player, 1); @@ -374,9 +374,9 @@ void Fortuna_80187960(Actor* actor) { Vec3f sp50 = { 0.0f, 0.0f, -10000 }; Actor_Initialize(actor19); - Matrix_Translate(gCalcMatrix, player->pos.x, player->pos.y, player->unk_138, 0); - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + player->unk_114) * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, 1); + Matrix_Translate(gCalcMatrix, player->pos.x, player->pos.y, player->unk_138, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + player->unk_114) * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &sp50, &actor19->obj.pos); actor19->obj.status = OBJ_ACTIVE; @@ -643,7 +643,7 @@ void Fortuna_8018927C(Player* player) { if ((player->unk_1D0 < 10) && (player->unk_1D0 >= 0)) { Math_SmoothStepToF(&player->unk_130, 0.0f, 0.1f, 15.0f, 0.0f); Math_SmoothStepToF(&player->unk_12C, 0.0f, 0.1f, 15.0f, 0.0f); - Math_SmoothStepToF(&player->unk_034, 0.0f, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f); Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 20.0f, 0.0f); if (gNextPlanetPath == 0) { if (player->pos.y < 700.0f) { @@ -653,9 +653,9 @@ void Fortuna_8018927C(Player* player) { Math_SmoothStepToF(&player->pos.y, 500.0f, 0.1f, 5.0f, 0.0f); } func_play_800B7184(player, 0); - player->camEye.x += player->vel.x * 0.1f; - player->camEye.y += player->vel.y * 0.1f; - player->camEye.z += player->vel.z * 0.1f; + player->cam.eye.x += player->vel.x * 0.1f; + player->cam.eye.y += player->vel.y * 0.1f; + player->cam.eye.z += player->vel.z * 0.1f; } player->wings.unk_04 = 0.0f; @@ -667,7 +667,7 @@ void Fortuna_8018927C(Player* player) { switch (player->unk_1D0) { case -1: - player->wings.unk_2C = 1; + player->wings.modelId = 1; player->unk_0E8 = 0.0f; player->unk_0D0 = 30.0f; player->unk_114 = 180.0f; @@ -676,12 +676,12 @@ void Fortuna_8018927C(Player* player) { player->unk_12C = 0.0f; player->unk_130 = 0.0f; player->unk_4D8 = 0.0f; - player->camEye.x = -200.0f; - player->camEye.y = 100.0f; - player->camEye.z = -1500.0f; - player->camAt.x = player->pos.x; - player->camAt.y = player->pos.y; - player->camAt.z = player->unk_138; + player->cam.eye.x = -200.0f; + player->cam.eye.y = 100.0f; + player->cam.eye.z = -1500.0f; + player->cam.at.x = player->pos.x; + player->cam.at.y = player->pos.y; + player->cam.at.z = player->unk_138; if (player->timer_1F8 < 80) { gFillScreenAlphaTarget = 255; @@ -701,7 +701,7 @@ void Fortuna_8018927C(Player* player) { Math_SmoothStepToF(&player->unk_0E4, 0.0f, 0.1f, 2.5f, 0.0f); } else { player->unk_190 = 2.0f; - player->camEye.y += 3.0f; + player->cam.eye.y += 3.0f; Math_SmoothStepToF(&player->unk_0EC, Math_SmoothStepToF(&player->unk_114, Math_RadToDeg(Math_Atan2F(player->pos.x, player->unk_138)), 0.1f, @@ -818,13 +818,13 @@ void Fortuna_8018927C(Player* player) { player->unk_0EC = 0.0f; player->unk_114 = 0.0f; player->unk_0D0 = 0.0f; - player->camAt.y = 16.0f; + player->cam.at.y = 16.0f; player->pos.y = -100.0f; player->unk_0E8 = 180.0f; } player->pos.z = -10000.0f; gCsFrameCount = 0; - player->wings.unk_2C = 1; + player->wings.modelId = 1; player->unk_204 = 1; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 100); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 100); @@ -839,12 +839,12 @@ void Fortuna_8018927C(Player* player) { player->unk_234 = 1; gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 4; - player->camEye.x = 400.0f; - player->camEye.y = 0; - player->camEye.z = 0.0f; - player->camAt.x = actor0->obj.pos.x; - player->camAt.y = actor0->obj.pos.y; - player->camAt.z = actor0->obj.pos.z; + player->cam.eye.x = 400.0f; + player->cam.eye.y = 0; + player->cam.eye.z = 0.0f; + player->cam.at.x = actor0->obj.pos.x; + player->cam.at.y = actor0->obj.pos.y; + player->cam.at.z = actor0->obj.pos.z; if (gCsFrameCount == 100) { player->unk_0D0 = 30.0f; @@ -885,8 +885,8 @@ void Fortuna_8018927C(Player* player) { case 11: D_ctx_80177A48[1] += D_ctx_80177A48[3]; - Matrix_RotateX(gCalcMatrix, -0.17453292f, 0); - Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, 1); + Matrix_RotateX(gCalcMatrix, -0.17453292f, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, MTXF_APPLY); src.x = 0; src.y = 0.0f; src.z = D_ctx_80177A48[2]; @@ -900,13 +900,13 @@ void Fortuna_8018927C(Player* player) { Math_SmoothStepToF(D_ctx_80177A48, 0.05f, 1.0f, 0.001f, 0); - Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_ctx_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_ctx_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_ctx_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_ctx_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_ctx_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_ctx_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 20000.0f, 0); Math_SmoothStepToF(&player->unk_0D0, 0.0f, 0.05f, 2.0f, 0); @@ -1094,7 +1094,7 @@ void Fortuna_8018927C(Player* player) { } if (gCsFrameCount == 1382) { - player->state_1C8 = PLAYERSTATE_1C8_6; + player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; D_ctx_8017837C = 4; Audio_FadeOutAll(10); @@ -1201,16 +1201,16 @@ void Fortuna_8018927C(Player* player) { src.x = 0.0f; src.y = D_ctx_80177A48[7]; src.z = D_ctx_80177A48[5]; - Matrix_Translate(gCalcMatrix, player->pos.x, 0.0f, player->pos.z + D_ctx_80177D20, 0); - Matrix_RotateY(gCalcMatrix, -(D_ctx_80177A48[4] * M_DTOR), 1); + Matrix_Translate(gCalcMatrix, player->pos.x, 0.0f, player->pos.z + D_ctx_80177D20, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, -(D_ctx_80177A48[4] * M_DTOR), MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &src, &dest); - player->camEye.x = gCsCamEyeX = dest.x; - player->camEye.y = gCsCamEyeY = dest.y; - player->camEye.z = gCsCamEyeZ = dest.z; + player->cam.eye.x = gCsCamEyeX = dest.x; + player->cam.eye.y = gCsCamEyeY = dest.y; + player->cam.eye.z = gCsCamEyeZ = dest.z; Math_SmoothStepToF(&gCsCamAtY, 0.0f, 0.005f, 1000.0f, 0.0001f); - player->camAt.x = player->pos.x; - player->camAt.y = gCsCamAtY; - player->camAt.z = player->pos.z + D_ctx_80177D20; + player->cam.at.x = player->pos.x; + player->cam.at.y = gCsCamAtY; + player->cam.at.z = player->pos.z + D_ctx_80177D20; break; case 22: @@ -1317,7 +1317,7 @@ void Fortuna_8018927C(Player* player) { gFillScreenAlphaTarget = 255; gFillScreenAlphaStep = 16; if (gFillScreenAlpha == 255) { - player->state_1C8 = PLAYERSTATE_1C8_6; + player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; D_ctx_8017837C = 4; Audio_FadeOutAll(10); @@ -1374,12 +1374,12 @@ void Fortuna_8018927C(Player* player) { src.x = 0.0f; src.y = D_ctx_80177A48[7]; src.z = D_ctx_80177A48[5]; - Matrix_Translate(gCalcMatrix, player->pos.x, 0.0f, player->pos.z + D_ctx_80177D20, 0); - Matrix_RotateY(gCalcMatrix, -(D_ctx_80177A48[4] * M_DTOR), 1); + Matrix_Translate(gCalcMatrix, player->pos.x, 0.0f, player->pos.z + D_ctx_80177D20, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, -(D_ctx_80177A48[4] * M_DTOR), MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &src, &dest); - player->camEye.x = gCsCamEyeX = dest.x; - player->camEye.y = gCsCamEyeY = dest.y; - player->camEye.z = gCsCamEyeZ = dest.z; + player->cam.eye.x = gCsCamEyeX = dest.x; + player->cam.eye.y = gCsCamEyeY = dest.y; + player->cam.eye.z = gCsCamEyeZ = dest.z; } if (gCsFrameCount >= 1240) { @@ -1397,9 +1397,9 @@ void Fortuna_8018927C(Player* player) { } Math_SmoothStepToF(&gCsCamAtY, player->pos.y, 0.005f, 1000.0f, 0.0001f); - player->camAt.x = gCsCamAtX = player->pos.x; - player->camAt.y = gCsCamAtY; - player->camAt.z = gCsCamAtZ = player->pos.z - D_ctx_80177A48[6] + D_ctx_80177D20; + player->cam.at.x = gCsCamAtX = player->pos.x; + player->cam.at.y = gCsCamAtY; + player->cam.at.z = gCsCamAtZ = player->pos.z - D_ctx_80177A48[6] + D_ctx_80177D20; break; } @@ -1414,8 +1414,8 @@ void Fortuna_8018927C(Player* player) { } } - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), 1); + Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; diff --git a/src/overlays/ovl_i4/fox_i4.c b/src/overlays/ovl_i4/fox_i4.c index ea2a4991..cbcd6dd6 100644 --- a/src/overlays/ovl_i4/fox_i4.c +++ b/src/overlays/ovl_i4/fox_i4.c @@ -15,31 +15,31 @@ s32 D_i4_8019EDD0 = 0; void OvlI4_CallFunction(u32 arg0, void* arg1) { switch (arg0) { - case 90: + case OVLCALL_FO_CS_COMPLETE: Fortuna_8018927C(arg1); break; - case 91: + case OVLCALL_BOSS309_UPDATE: Bolse_8018E710(arg1); break; - case 92: + case OVLCALL_BOSS309_DRAW: Bolse_8018E870(arg1); break; - case 93: + case OVLCALL_BOSS310_UPDATE: Bolse_80191BAC(arg1); break; - case 94: + case OVLCALL_BOSS310_DRAW: Bolse_80191DB0(arg1); break; - case 95: + case OVLCALL_ACTOR271_UPDATE: Bolse_8018D7F0(arg1); break; - case 96: + case OVLCALL_ACTOR271_DRAW: Bolse_8018D960(arg1); break; - case 97: + case OVLCALL_ACTOR272_UPDATE: Bolse_8018D394(arg1); break; - case 98: + case OVLCALL_ACTOR272_DRAW: Bolse_8018D454(arg1); default: PRINTF("i4 指定外!\n"); // Not specified! diff --git a/src/overlays/ovl_i4/fox_ka.c b/src/overlays/ovl_i4/fox_ka.c index 40d196c0..02c74d23 100644 --- a/src/overlays/ovl_i4/fox_ka.c +++ b/src/overlays/ovl_i4/fox_ka.c @@ -73,8 +73,8 @@ void Katina_801927E0(Effect* effect, f32 x, f32 y, f32 z, f32 x2, f32 y2, f32 z2 xRot = Math_Atan2F(x2 - x, z2 - z); distXZ = sqrtf(SQ(x2 - x) + SQ(z2 - z)); yRot = -Math_Atan2F(y2 - y, distXZ); - Matrix_RotateY(gCalcMatrix, xRot, 0); - Matrix_RotateX(gCalcMatrix, yRot, 1); + Matrix_RotateY(gCalcMatrix, xRot, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, yRot, MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; src.z = 30.0f; @@ -119,7 +119,7 @@ void Katina_80192A68(Effect* effect) { gDPSetPrimColor(gMasterDisp++, 0, 0, 48, 48, 255, effect->unk_44); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, effect->unk_44); - Matrix_Scale(gGfxMatrix, 0.4f, 0.4f, 0.4f, 1); + Matrix_Scale(gGfxMatrix, 0.4f, 0.4f, 0.4f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); @@ -165,7 +165,7 @@ void Katina_80192C8C(void) { s32 i; Vec3f dest; - Matrix_RotateY(gCalcMatrix, -0.7853982f, 0); + Matrix_RotateY(gCalcMatrix, -0.7853982f, MTXF_NEW); for (i = 0; i < 3; i++, actor++) { if (actor->obj.status == OBJ_FREE) { @@ -263,15 +263,15 @@ void Katina_80192E20(Player* player) { break; case 13: - player->camAt.x = gCsCamAtX = player->pos.x; - player->camAt.y = gCsCamAtY = player->pos.y; - player->camAt.z = gCsCamAtZ = player->pos.z; - player->camEye.x = gCsCamEyeX = 100.0f; - player->camEye.z = gCsCamEyeZ = 7000.0f; + player->cam.at.x = gCsCamAtX = player->pos.x; + player->cam.at.y = gCsCamAtY = player->pos.y; + player->cam.at.z = gCsCamAtZ = player->pos.z; + player->cam.eye.x = gCsCamEyeX = 100.0f; + player->cam.eye.z = gCsCamEyeZ = 7000.0f; if (gCsFrameCount == 240) { Object_Kill(&gActors[4].obj, gActors[4].sfxSource); Object_Kill(&gActors[6].obj, gActors[6].sfxSource); - player->state_1C8 = PLAYERSTATE_1C8_3; + player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_014 = 0.0001f; AUDIO_PLAY_BGM(gBgmSeqId); gLevelStatusScreenTimer = 80; @@ -295,8 +295,8 @@ void Katina_80192E20(Player* player) { case 25: case 40: actor = &gActors[5]; - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); func_enmy2_8006EEFC(5, actor->obj.pos.x + (dest.x * 1.5), actor->obj.pos.y + (dest.y * 1.5), actor->obj.pos.z + (dest.z * 1.5), dest.x, dest.y, dest.z, actor->obj.rot.x, @@ -307,8 +307,8 @@ void Katina_80192E20(Player* player) { case 41: case 44: actor = &gActors[6]; - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); func_enmy2_8006EEFC(6, actor->obj.pos.x + (dest.x * 1.5), actor->obj.pos.y + (dest.y * 1.5), actor->obj.pos.z + (dest.z * 1.5), dest.x, dest.y, dest.z, actor->obj.rot.x, @@ -328,8 +328,8 @@ void Katina_80192E20(Player* player) { Object_Kill(&gActors[5].obj, gActors[5].sfxSource); break; } - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + player->unk_114 + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), 1); + Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + player->unk_114 + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), MTXF_APPLY); src.x = 0; src.y = 0.0f; src.z = player->unk_0D0; @@ -342,12 +342,12 @@ void Katina_80192E20(Player* player) { player->pos.z += player->vel.z; player->unk_138 = player->pos.z; player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; - Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0.0f); } void Katina_80193718(Boss* boss) { @@ -376,7 +376,7 @@ void Katina_80193718(Boss* boss) { src.y = 0.0f; src.z = 500.0f; for (posX = 50.0f, i = 0; posX < 600.0f; i++) { - Matrix_RotateY(gCalcMatrix, i * 13.0f * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, i * 13.0f * M_DTOR, MTXF_NEW); Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); if (dest.z > 0.0f) { func_effect_8007953C(dest.x, posX, dest.z, 1.3f); @@ -408,7 +408,7 @@ void Katina_80193718(Boss* boss) { void Katina_80193B1C(Boss* boss) { gSPFogPosition(gMasterDisp++, gFogNear, 1002); - Matrix_Translate(gGfxMatrix, 0.0f, 20.0f, 0.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 20.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if (boss->state == 0) { gSPDisplayList(gMasterDisp++, D_KA_600BAF0); @@ -466,7 +466,7 @@ void Katina_80193EF0(Boss* boss) { if (boss->dmgType != DMG_NONE) { boss->dmgType = DMG_NONE; - if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_0) { + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) { return; } @@ -512,7 +512,7 @@ void Katina_80193EF0(Boss* boss) { src.z = 50.0f; for (i = 0; i < 130; i++, y += 5.0f, src.z += 1.4f) { - Matrix_RotateY(gCalcMatrix, i * 35.0f * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, i * 35.0f * M_DTOR, MTXF_NEW); Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); func_effect_800794CC(boss->obj.pos.x + dest.x, boss->obj.pos.y - 1200.0f + y, boss->obj.pos.z + dest.z, 1.6f); @@ -533,7 +533,7 @@ void Katina_80193EF0(Boss* boss) { } } - if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) { + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) { if ((gGameFrameCount % 16) == 0) { for (i = 0; i < 4; i++) { if ((boss->swork[10 + i] <= 0) && (Rand_ZeroOne() < 0.2f)) { @@ -675,17 +675,17 @@ void Katina_801946C4(Boss* boss) { break; case 1: - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_5)) { + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { if (boss->obj.pos.z < 4500.0f) { boss->state++; - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_0; - gPlayer[0].camEye.x = -900.0f; - gPlayer[0].camEye.y = 100.0f; - gPlayer[0].camEye.z = 1400.0f; - gPlayer[0].camAt.x = -730.0f; - gPlayer[0].camAt.y = 130.0f; - gPlayer[0].camAt.z = 1160.0f; - gPlayer[0].unk_034 = 0.0f; + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_STANDBY; + gPlayer[0].cam.eye.x = -900.0f; + gPlayer[0].cam.eye.y = 100.0f; + gPlayer[0].cam.eye.z = 1400.0f; + gPlayer[0].cam.at.x = -730.0f; + gPlayer[0].cam.at.y = 130.0f; + gPlayer[0].cam.at.z = 1160.0f; + gPlayer[0].camRoll = 0.0f; boss->obj.pos.x = -4500.0f; boss->obj.pos.z = 4500.0f; boss->timer_050 = 500; @@ -702,7 +702,7 @@ void Katina_801946C4(Boss* boss) { break; case 2: - gPlayer[0].camAt.y += 0.2f; + gPlayer[0].cam.at.y += 0.2f; Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 30.0f, 1.0f, 1.65f, 0.0f); if (boss->timer_050 == 460) { D_i4_801A0548 = 10.0f; @@ -717,12 +717,12 @@ void Katina_801946C4(Boss* boss) { gLight1B = D_i4_801A0554; if (boss->timer_050 == 170) { boss->state++; - gPlayer[0].camEye.x = -2500.0f; - gPlayer[0].camEye.y = 250.0f; - gPlayer[0].camEye.z = 2500.0f; - gPlayer[0].camAt.x = 0.0f; - gPlayer[0].camAt.y = 1000.0f; - gPlayer[0].camAt.z = 0.0f; + gPlayer[0].cam.eye.x = -2500.0f; + gPlayer[0].cam.eye.y = 250.0f; + gPlayer[0].cam.eye.z = 2500.0f; + gPlayer[0].cam.at.x = 0.0f; + gPlayer[0].cam.at.y = 1000.0f; + gPlayer[0].cam.at.z = 0.0f; boss->unk_05E = 0; boss->obj.pos.x = -500.0f; boss->obj.pos.z = 500.0f; @@ -775,8 +775,8 @@ void Katina_801946C4(Boss* boss) { if (boss->timer_052 == 0) { AUDIO_PLAY_SFX(0x19032040U, boss->sfxSource, 0); boss->state++; - if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_0) { - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_3; + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) { + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ACTIVE; func_play_800B7184(&gPlayer[0], 1); } gPlayer[0].unk_014 = 0.0f; @@ -876,7 +876,7 @@ void Katina_801946C4(Boss* boss) { boss->vwork[0].z = 0.0f; Math_SmoothStepToF(&boss->fwork[10], 5.0f, 0.1f, 0.5f, 0.0f); if (boss->timer_050 == 0 && - (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3 || gPlayer[0].state_1C8 == PLAYERSTATE_1C8_5)) { + (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE || gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { gShowAllRangeCountdown = 0; boss->timer_050 = 1000; boss->state = 15; @@ -890,14 +890,14 @@ void Katina_801946C4(Boss* boss) { boss->fwork[10] = 0.0f; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_0; - gPlayer[0].unk_034 = 0.0f; - gPlayer[0].camEye.x = boss->obj.pos.x; - gPlayer[0].camEye.y = 600.0f; - gPlayer[0].camEye.z = boss->obj.pos.z + 5000.0f; - gPlayer[0].camAt.x = boss->obj.pos.x; - gPlayer[0].camAt.y = boss->obj.pos.y - 500.0f; - gPlayer[0].camAt.z = boss->obj.pos.z; + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_STANDBY; + gPlayer[0].camRoll = 0.0f; + gPlayer[0].cam.eye.x = boss->obj.pos.x; + gPlayer[0].cam.eye.y = 600.0f; + gPlayer[0].cam.eye.z = boss->obj.pos.z + 5000.0f; + gPlayer[0].cam.at.x = boss->obj.pos.x; + gPlayer[0].cam.at.y = boss->obj.pos.y - 500.0f; + gPlayer[0].cam.at.z = boss->obj.pos.z; } break; @@ -911,7 +911,7 @@ void Katina_801946C4(Boss* boss) { } if (boss->timer_050 == 500) { - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_7; + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].unk_1D0 = 100; gPlayer[0].unk_234 = 0; gCsFrameCount = 5000; @@ -919,22 +919,22 @@ void Katina_801946C4(Boss* boss) { Math_SmoothStepToF(&boss->obj.pos.y, 3000.0f, 0.02f, 0.5f, 0.0f); Math_SmoothStepToF(&boss->obj.rot.x, 180.0f, 0.02f, 0.3f, 0.0f); Math_SmoothStepToF(&boss->fwork[13], 180.0f, 0.02f, 0.2f, 0.0f); - Math_SmoothStepToF(&gPlayer[0].camEye.z, boss->obj.pos.z + 8000.0f, 0.05f, 3.0f, 0.0f); - Math_SmoothStepToF(&gPlayer[0].camEye.y, boss->obj.pos.y - 1000.0f, 0.05f, 2.0f, 0.0f); - gPlayer[0].camAt.y = boss->obj.pos.y - 500.0f; + Math_SmoothStepToF(&gPlayer[0].cam.eye.z, boss->obj.pos.z + 8000.0f, 0.05f, 3.0f, 0.0f); + Math_SmoothStepToF(&gPlayer[0].cam.eye.y, boss->obj.pos.y - 1000.0f, 0.05f, 2.0f, 0.0f); + gPlayer[0].cam.at.y = boss->obj.pos.y - 500.0f; boss->unk_05E = 0; if (boss->timer_050 == 260) { boss->obj.pos.y = 3000.0f; boss->obj.rot.y = 0.0f; boss->obj.rot.x = 180.0f; boss->fwork[13] = 15.0f; - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_0; - gPlayer[0].camEye.x = boss->obj.pos.x; - gPlayer[0].camEye.y = 600.0f; - gPlayer[0].camEye.z = boss->obj.pos.z - 1500.0f; - gPlayer[0].camAt.x = boss->obj.pos.x; - gPlayer[0].camAt.y = boss->obj.pos.y - 300.0f; - gPlayer[0].camAt.z = boss->obj.pos.z; + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_STANDBY; + gPlayer[0].cam.eye.x = boss->obj.pos.x; + gPlayer[0].cam.eye.y = 600.0f; + gPlayer[0].cam.eye.z = boss->obj.pos.z - 1500.0f; + gPlayer[0].cam.at.x = boss->obj.pos.x; + gPlayer[0].cam.at.y = boss->obj.pos.y - 300.0f; + gPlayer[0].cam.at.z = boss->obj.pos.z; boss->state = 16; boss->timer_050 = 130; boss->timer_052 = 1000; @@ -951,7 +951,7 @@ void Katina_801946C4(Boss* boss) { case 16: Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 30.0f, 1.0f, 1.6f, 0.0f); - Math_SmoothStepToF(&gPlayer[0].camEye.z, 0.0f, 0.05f, 5.0f, 0.0f); + Math_SmoothStepToF(&gPlayer[0].cam.eye.z, 0.0f, 0.05f, 5.0f, 0.0f); boss->fwork[13] += 0.1f; Math_SmoothStepToF(&D_ctx_801784D4, 200.0f, 1.0f, 0.5f, 0.0f); scale = 0.5f; @@ -979,7 +979,7 @@ void Katina_801946C4(Boss* boss) { gLight1B = D_i4_801A0554; for (i = 0; i < rot_count; i++) { - Matrix_RotateY(gCalcMatrix, RAND_FLOAT(2.0f) * M_PI, 0); + Matrix_RotateY(gCalcMatrix, RAND_FLOAT(2.0f) * M_PI, MTXF_NEW); src.x = 0.0f; src.y = 0.0f; src.z = RAND_FLOAT(400.0f) + 300.0f; @@ -1002,12 +1002,12 @@ void Katina_801946C4(Boss* boss) { Object_Kill(&gEffects[i].obj, gEffects[i].sfxSource); } } - gPlayer[0].camEye.x = boss->obj.pos.x; - gPlayer[0].camEye.y = 300.0f; - gPlayer[0].camEye.z = boss->obj.pos.z + 2000.0f; - gPlayer[0].camAt.x = boss->obj.pos.x; - gPlayer[0].camAt.y = 1500.0f; - gPlayer[0].camAt.z = boss->obj.pos.z; + gPlayer[0].cam.eye.x = boss->obj.pos.x; + gPlayer[0].cam.eye.y = 300.0f; + gPlayer[0].cam.eye.z = boss->obj.pos.z + 2000.0f; + gPlayer[0].cam.at.x = boss->obj.pos.x; + gPlayer[0].cam.at.y = 1500.0f; + gPlayer[0].cam.at.z = boss->obj.pos.z; D_ctx_801784D4 = 60.0f; gLight1R = 100; gLight1G = 70; @@ -1019,7 +1019,7 @@ void Katina_801946C4(Boss* boss) { case 17: boss->fwork[13] += 0.1f; - Math_SmoothStepToF(&gPlayer[0].camAt.y, 525.0f, 0.3f, 50.0f, 0.0f); + Math_SmoothStepToF(&gPlayer[0].cam.at.y, 525.0f, 0.3f, 50.0f, 0.0f); Math_SmoothStepToF(&boss->fwork[15], 8.0f, 1.0f, 2.0f, 0.0f); if (boss->timer_050 == 1) { gBosses[0].state = 1; @@ -1031,14 +1031,14 @@ void Katina_801946C4(Boss* boss) { case 18: Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 100.0f, 1.0f, 100.0f, 0.0f); - Math_SmoothStepToF(&gPlayer[0].camAt.y, 525.0f, 0.3f, 50.0f, 0.0f); + Math_SmoothStepToF(&gPlayer[0].cam.at.y, 525.0f, 0.3f, 50.0f, 0.0f); if (boss->timer_050 == 0) { gFillScreenAlphaTarget = 255; gFillScreenRed = 255; gFillScreenGreen = 255; gFillScreenBlue = 255; if (gFillScreenAlpha == 255) { - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_7; + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].unk_1D0 = 2; gPlayer[0].unk_234 = 1; gCsFrameCount = 200; @@ -1062,9 +1062,9 @@ void Katina_801946C4(Boss* boss) { case 20: gShowAllRangeCountdown = 0; Math_SmoothStepToF(&boss->fwork[10], 0.0f, 0.1f, 3.0f, 0.0f); - if ((boss->timer_050 == 0) && - (((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3)) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_5))) { - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_7; + if ((boss->timer_050 == 0) && (((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) || + (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN))) { + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].unk_1D0 = 0; gNextPlanetPath = 1; boss->obj.pos.z = 0.0f; @@ -1083,8 +1083,8 @@ void Katina_801946C4(Boss* boss) { break; case 21: - Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, boss->obj.rot.x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, boss->obj.rot.x * M_DTOR, MTXF_APPLY); boss->obj.pos.z += boss->unk_078.z; if (boss->timer_050 == 820) { AUDIO_PLAY_SFX(0x19408047U, boss->sfxSource, 0); @@ -1125,7 +1125,7 @@ void Katina_801946C4(Boss* boss) { if (boss->state != 0) { angle = 360.0f; for (i = 0; i < 4; i++) { - Matrix_RotateY(gCalcMatrix, (boss->obj.rot.y + angle) * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, (boss->obj.rot.y + angle) * M_DTOR, MTXF_NEW); src.x = 0.0f; src.y = -550.0f; src.z = 850.0f; @@ -1142,8 +1142,8 @@ void Katina_801946C4(Boss* boss) { if (boss->obj.rot.y < 0.0f) { boss->obj.rot.y += 360.0f; } - gRadarMarks[64].unk_00 = 1; - gRadarMarks[64].unk_02 = 101; + gRadarMarks[64].status = 1; + gRadarMarks[64].type = 101; gRadarMarks[64].pos.x = boss->obj.pos.x; gRadarMarks[64].pos.y = boss->obj.pos.y; gRadarMarks[64].pos.z = boss->obj.pos.z; @@ -1285,7 +1285,7 @@ void Katina_801968F4(Boss* boss) { gSPFogPosition(gMasterDisp++, gFogNear, 1006); } - Matrix_RotateY(gGfxMatrix, boss->fwork[13] * M_DTOR, 1); + Matrix_RotateY(gGfxMatrix, boss->fwork[13] * M_DTOR, MTXF_APPLY); Animation_GetFrameData(&D_KA_60105D8, 0, jointTable); Animation_DrawSkeleton(1, D_KA_6010744, jointTable, Katina_801965A8, NULL, boss, &gIdentityMatrix); @@ -1295,18 +1295,19 @@ void Katina_801968F4(Boss* boss) { Matrix_Push(&gGfxMatrix); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 0, 255, 255, 255); - Matrix_Translate(gGfxMatrix, 0.0f, 500.0f, 0.0f, 1); - Matrix_Scale(gGfxMatrix, boss->fwork[14], boss->fwork[14], boss->fwork[14], 1); - Matrix_RotateX(gGfxMatrix, -90 * M_DTOR, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 500.0f, 0.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, boss->fwork[14], boss->fwork[14], boss->fwork[14], MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -90 * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 64); gDPSetEnvColor(gMasterDisp++, 0, 255, 255, 64); - Matrix_Translate(gGfxMatrix, 0.0f, 500.0f, 0.0f, 1); - Matrix_Scale(gGfxMatrix, boss->fwork[14] * 3.0f, boss->fwork[14] * 3.0f, boss->fwork[14] * 3.0f, 1); - Matrix_RotateX(gGfxMatrix, -90 * M_DTOR, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 500.0f, 0.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, boss->fwork[14] * 3.0f, boss->fwork[14] * 3.0f, boss->fwork[14] * 3.0f, + MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -90 * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); Matrix_Pop(&gGfxMatrix); @@ -1315,8 +1316,8 @@ void Katina_801968F4(Boss* boss) { if (boss->fwork[15] > 0.0f) { RCP_SetupDL(&gMasterDisp, 41); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 128); - Matrix_RotateX(gGfxMatrix, M_PI, 1); - Matrix_Scale(gGfxMatrix, 0.3f, boss->fwork[15], 0.3f, 1); + Matrix_RotateX(gGfxMatrix, M_PI, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.3f, boss->fwork[15], 0.3f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_KA_600BFB0); } @@ -1416,7 +1417,7 @@ void Katina_80197290(Player* player) { player->pos.x = boss->obj.pos.x; player->pos.y = 800.0f; player->pos.z = boss->obj.pos.z; - player->unk_114 = player->unk_120 = player->unk_0E4 = player->unk_034 = player->unk_4D8 = 0.0f; + player->unk_114 = player->unk_120 = player->unk_0E4 = player->camRoll = player->unk_4D8 = 0.0f; player->unk_0E8 = 120.0f; player->unk_0D0 = 40.0f; gCsCamEyeX = boss->obj.pos.x + 5000.0f; @@ -1516,7 +1517,7 @@ void Katina_80197290(Player* player) { gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 2; D_ctx_80177A48[1] -= D_ctx_80177A48[2]; - Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, MTXF_NEW); src.x = -1000.0f; src.y = 0.0f; src.z = 0.0f; @@ -1549,7 +1550,7 @@ void Katina_80197290(Player* player) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; gFillScreenAlphaStep = 8; if (gFillScreenAlpha == 255) { - player->state_1C8 = PLAYERSTATE_1C8_6; + player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; D_ctx_8017837C = 4; D_play_800D3180[LEVEL_KATINA] = Play_CheckMedalStatus(150) + 1; @@ -1638,8 +1639,8 @@ void Katina_80197290(Player* player) { gActors[4].unk_0F4.x += 0.08f; break; } - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4) * M_DTOR), 1); + Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4) * M_DTOR), MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; src.z = player->unk_0D0; @@ -1653,12 +1654,12 @@ void Katina_80197290(Player* player) { player->unk_0F8 = player->unk_0EC; player->unk_138 = player->pos.z; if (player->unk_1D0 < 100) { - Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0); } player->unk_088 += 10.0f; player->unk_080 = -SIN_DEG(player->unk_088) * 0.3f; @@ -1703,8 +1704,8 @@ void Katina_80197F10(Actor* actor) { actor->fwork[1] -= 0.5f; break; } - Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -(actor->unk_0F4.x * M_DTOR), 1); + Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(actor->unk_0F4.x * M_DTOR), MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; src.z = actor->fwork[0]; @@ -1724,7 +1725,7 @@ void Katina_801981F8(Actor* actor) { Vec3f dest; s32 pad; - if (actor->timer_0C0 == 0 && (i = 0, (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_0))) { + if (actor->timer_0C0 == 0 && (i = 0, (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_STANDBY))) { actor->timer_0C0 = 2; src.x = 0.0f; src.y = 0.0f; @@ -1741,7 +1742,7 @@ void Katina_801981F8(Actor* actor) { if ((actor_it->unk_0B6 != 0) || (gBosses[1].state == 0)) { actor_it->obj.status = OBJ_ACTIVE; actor_it->obj.id = OBJ_ACTOR_ALLRANGE; - Matrix_RotateY(gCalcMatrix, actor->unk_04E * 18.0f * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, actor->unk_04E * 18.0f * M_DTOR, MTXF_NEW); Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); actor_it->obj.pos.x = dest.x; actor_it->obj.pos.y = RAND_FLOAT(1000.0f) + 300.0f; @@ -1861,25 +1862,25 @@ void Katina_80198594(Actor* actor) { if (gBosses[1].state == 12) { if (((gAllRangeEventTimer % 256) == 0) && (Rand_ZeroOne() < 0.5f)) { - func_360_8002E4F8(gMsg_ID_18060, RCID_BILL); + AllRange_PlayMessage(gMsg_ID_18060, RCID_BILL); } - } else if ((gAllRangeEventTimer > 500) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) && + } else if ((gAllRangeEventTimer > 500) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && ((gAllRangeEventTimer % 512) == 0)) { switch (RAND_INT(3.99f)) { case 0: - func_360_8002E4F8(gMsg_ID_18020, RCID_BILL); + AllRange_PlayMessage(gMsg_ID_18020, RCID_BILL); break; case 1: - func_360_8002E4F8(gMsg_ID_18021, RCID_BILL); + AllRange_PlayMessage(gMsg_ID_18021, RCID_BILL); break; case 2: - func_360_8002E4F8(gMsg_ID_18022, RCID_BILL); + AllRange_PlayMessage(gMsg_ID_18022, RCID_BILL); break; case 3: - func_360_8002E4F8(gMsg_ID_18025, RCID_FALCO); + AllRange_PlayMessage(gMsg_ID_18025, RCID_FALCO); break; } } @@ -1992,7 +1993,7 @@ void Katina_80198AA0(Actor* actor) { actor->iwork[5] = 1; if ((((actor->index + gGameFrameCount) & 0xB) == 0) && (Rand_ZeroOne() < 0.1f) && - (func_360_80031900(actor) != 0) && (gActors[0].state == 2)) { + func_360_80031900(actor) && (gActors[0].state == 2)) { actor->iwork[0] = 1; } } else { @@ -2000,7 +2001,7 @@ void Katina_80198AA0(Actor* actor) { } if ((actor->aiIndex >= AI360_FALCO) && - ((gActors[actor->aiIndex].obj.status == 3) || (gActors[actor->aiIndex].state == 6) || + ((gActors[actor->aiIndex].obj.status == OBJ_DYING) || (gActors[actor->aiIndex].state == 6) || gActors[actor->aiIndex].obj.status == OBJ_FREE)) { actor->state = 3; } @@ -2014,7 +2015,7 @@ void Katina_80198AA0(Actor* actor) { actor->fwork[3] = 1.2f; actor->fwork[1] = 40.0f; yRand = RAND_FLOAT(1000.0f); - if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_0) { + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) { xRand = RAND_FLOAT_CENTERED(5000.0f); zRand = RAND_FLOAT_CENTERED(5000.0f); } else { @@ -2110,10 +2111,10 @@ void Katina_80198AA0(Actor* actor) { (-xSin * 200.0f * 0.5f), (yCos * (xCos * 200.0f * 0.5f)), actor->obj.rot.x, actor->obj.rot.y, actor->obj.rot.z); } - func_360_8003088C(actor); + ActorAllRange_ApplyDamage(actor); radarMark = &gRadarMarks[actor->index]; - radarMark->unk_00 = 1; - radarMark->unk_02 = actor->aiType; + radarMark->status = 1; + radarMark->type = actor->aiType; radarMark->pos.x = actor->obj.pos.x; radarMark->pos.y = actor->obj.pos.y; radarMark->pos.z = actor->obj.pos.z; @@ -2131,17 +2132,17 @@ void Katina_801995B4(Actor* actor) { if (((actor->index + gSysFrameCount) % 8) == 0) { actor->iwork[23] = 1; - if ((fabsf(actor->obj.pos.x - gPlayer[0].camEye.x) < 4500.0f) && - (fabsf(actor->obj.pos.z - gPlayer[0].camEye.z) < 4500.0f)) { + if ((fabsf(actor->obj.pos.x - gPlayer[0].cam.eye.x) < 4500.0f) && + (fabsf(actor->obj.pos.z - gPlayer[0].cam.eye.z) < 4500.0f)) { actor->iwork[23] = 0; } } if ((actor->iwork[8] != 0) && (actor->aiType < AI360_GREAT_FOX)) { angle = SIN_DEG(actor->iwork[8] * 400.0f) * actor->iwork[8]; - Matrix_RotateY(gGfxMatrix, M_DTOR * angle, 1); - Matrix_RotateX(gGfxMatrix, M_DTOR * angle, 1); - Matrix_RotateZ(gGfxMatrix, M_DTOR * angle, 1); + Matrix_RotateY(gGfxMatrix, M_DTOR * angle, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_DTOR * angle, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, M_DTOR * angle, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); } if (actor->iwork[23] != 0) { @@ -2164,7 +2165,7 @@ void Katina_801995B4(Actor* actor) { case 1: gSPDisplayList(gMasterDisp++, D_KA_600E050); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY); func_edisplay_8005B1E8(actor, 0); break; } diff --git a/src/overlays/ovl_i4/fox_sz.c b/src/overlays/ovl_i4/fox_sz.c index cb16de15..0b63075c 100644 --- a/src/overlays/ovl_i4/fox_sz.c +++ b/src/overlays/ovl_i4/fox_sz.c @@ -46,9 +46,9 @@ void SectorZ_80199900(Actor* actor, s32 arg1) { if (arg1 != 0) { D_i4_801A0560++; if ((D_i4_801A0560 >= 6) && - ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_5))) { + ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN))) { gCsFrameCount = 0; - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_7; + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].unk_1D0 = 1000; gActors[0].state = 6; gPlayer[0].timer_1F8 = 30; @@ -157,8 +157,8 @@ void SectorZ_Missile_Update(Actor* this) { SectorZ_80199900(this, 0); gCameraShake = 25; gBosses[0].dmgType = DMG_UNK_100; - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_5)) { - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_7; + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].unk_1D0 = 0; gActors[0].state = -31072; return; @@ -166,11 +166,11 @@ void SectorZ_Missile_Update(Actor* this) { } if (((fabsf(this->fwork[MISSILE_TARGET_Z] - this->obj.pos.z) < 2000.0f) && - (((gPlayer[0].camEye.z < 0.0f) || (D_edisplay_801615D0.y < 0.0f)) || - (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_10))) && - (((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_10)) || - (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_5))) { - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_7; + (((gPlayer[0].cam.eye.z < 0.0f) || (D_edisplay_801615D0.y < 0.0f)) || + (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_GFOX_REPAIR))) && + (((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_GFOX_REPAIR)) || + (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN))) { + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].unk_1D0 = 100; gActors[0].state = -31072; } @@ -256,18 +256,18 @@ void SectorZ_8019A2F4(Actor* actor) { gCsFrameCount = 0; actor->timer_0BC = 400; actor->state = 3; - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_0; + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_STANDBY; Audio_PlayFanfare(SEQ_ID_KATT, 20, 10, 10); - func_360_8002EE34(); + AllRange_ClearRadio(); - gPlayer[0].camEye.x = 250.0f; - gPlayer[0].camEye.y = 2500.0f; - gPlayer[0].camEye.z = 25000.0f; + gPlayer[0].cam.eye.x = 250.0f; + gPlayer[0].cam.eye.y = 2500.0f; + gPlayer[0].cam.eye.z = 25000.0f; - gPlayer[0].camAt.x = gActors[8].obj.pos.x; - gPlayer[0].camAt.y = gActors[8].obj.pos.y; - gPlayer[0].camAt.z = gActors[8].obj.pos.z; + gPlayer[0].cam.at.x = gActors[8].obj.pos.x; + gPlayer[0].cam.at.y = gActors[8].obj.pos.y; + gPlayer[0].cam.at.z = gActors[8].obj.pos.z; D_i4_801A0564 = 1; } } @@ -338,7 +338,7 @@ void SectorZ_8019A3E8(Actor* actor) { Radio_PlayMessage(gMsg_ID_16030, RCID_FALCO); } - if (((actor->timer_0C0 == 0) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_0)) && + if (((actor->timer_0C0 == 0) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_STANDBY)) && ((gAllRangeEventTimer < 200) || ((gAllRangeEventTimer > 4000) && (gAllRangeEventTimer < 4200)))) { actor->timer_0C0 = 5; actorPtr = &gActors[13]; @@ -351,7 +351,7 @@ void SectorZ_8019A3E8(Actor* actor) { Actor_Initialize(actorPtr); actorPtr->obj.status = OBJ_ACTIVE; actorPtr->obj.id = OBJ_ACTOR_ALLRANGE; - Matrix_RotateY(gCalcMatrix, (actor->unk_04E * 18.0f) * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, (actor->unk_04E * 18.0f) * M_DTOR, MTXF_NEW); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp40, &sp34); actorPtr->obj.pos.x = sp34.x; @@ -427,18 +427,18 @@ void SectorZ_8019A3E8(Actor* actor) { SectorZ_8019A0F8(&gActors[15], 2); SectorZ_8019A0F8(&gActors[16], 3); - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_0; + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_STANDBY; actor->state = 10; actor->fwork[10] = 0.0f; - gPlayer[0].unk_034 = 15.0f; + gPlayer[0].camRoll = 15.0f; - gPlayer[0].camEye.x = gActors[10].obj.pos.x - 25000.0f; - gPlayer[0].camEye.y = gActors[10].obj.pos.y; - gPlayer[0].camEye.z = gActors[10].obj.pos.z; + gPlayer[0].cam.eye.x = gActors[10].obj.pos.x - 25000.0f; + gPlayer[0].cam.eye.y = gActors[10].obj.pos.y; + gPlayer[0].cam.eye.z = gActors[10].obj.pos.z; - gPlayer[0].camAt.x = gActors[10].obj.pos.x; - gPlayer[0].camAt.y = gActors[10].obj.pos.y; - gPlayer[0].camAt.z = gActors[10].obj.pos.z; + gPlayer[0].cam.at.x = gActors[10].obj.pos.x; + gPlayer[0].cam.at.y = gActors[10].obj.pos.y; + gPlayer[0].cam.at.z = gActors[10].obj.pos.z; actor->timer_0BC = 10000; gFillScreenAlpha = gFillScreenAlphaTarget = 255; @@ -452,10 +452,10 @@ void SectorZ_8019A3E8(Actor* actor) { } bool SectorZ_8019AA9C(Player* player) { - if (player->state_1C8 == PLAYERSTATE_1C8_3) { + if (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) { if ((player->unk_114 > 30.0f) && (player->unk_114 < 150.0f) && (fabsf(player->pos.x - 1270.0f) < 450.0f) && (fabsf(player->pos.y - 265.0f) < 100.0f) && (fabsf(player->unk_138) < 172.0f)) { - player->state_1C8 = PLAYERSTATE_1C8_10; + player->state_1C8 = PLAYERSTATE_1C8_GFOX_REPAIR; player->unk_1D0 = 0; gActors[0].state = 20; gAllRangeEventTimer--; @@ -520,14 +520,14 @@ void SectorZ_8019AB8C(Actor* actor) { if (gCsFrameCount == 3) { func_effect_80078E50(actor8->obj.pos.x, actor8->obj.pos.y, actor8->obj.pos.z, 30.0f); } - player->camEye.x += actor8->vel.x * 0.23f; - player->camEye.y += actor8->vel.y * 0.23f; - player->camEye.z += actor8->vel.z * 0.23f; + player->cam.eye.x += actor8->vel.x * 0.23f; + player->cam.eye.y += actor8->vel.y * 0.23f; + player->cam.eye.z += actor8->vel.z * 0.23f; - Math_SmoothStepToF(&player->camAt.x, actor8->obj.pos.x, 1.0f, 20000.0f, 0); - Math_SmoothStepToF(&player->camAt.y, actor8->obj.pos.y, 1.0f, 20000.0f, 0); - Math_SmoothStepToF(&player->camAt.z, actor8->obj.pos.z, 1.0f, 20000.0f, 0); - Math_SmoothStepToF(&player->unk_034, 0, 1.0f, 1000.0f, 0); + Math_SmoothStepToF(&player->cam.at.x, actor8->obj.pos.x, 1.0f, 20000.0f, 0); + Math_SmoothStepToF(&player->cam.at.y, actor8->obj.pos.y, 1.0f, 20000.0f, 0); + Math_SmoothStepToF(&player->cam.at.z, actor8->obj.pos.z, 1.0f, 20000.0f, 0); + Math_SmoothStepToF(&player->camRoll, 0, 1.0f, 1000.0f, 0); switch (actor->timer_0BC) { case 370: @@ -556,7 +556,7 @@ void SectorZ_8019AB8C(Actor* actor) { if (actor->timer_0BC == 70) { actor->state = 2; - player->state_1C8 = PLAYERSTATE_1C8_3; + player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; func_play_800B7184(player, 1); player->unk_014 = 0.0f; } @@ -605,31 +605,31 @@ void SectorZ_8019AB8C(Actor* actor) { break; } - Math_SmoothStepToF(&player->camAt.x, gActors[10].obj.pos.x, 0.2, 500.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.y, gActors[10].obj.pos.y, 0.2, 500.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.z, gActors[10].obj.pos.z, 0.2, 500.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.x, gActors[10].obj.pos.x, 0.2, 500.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.y, gActors[10].obj.pos.y, 0.2, 500.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.z, gActors[10].obj.pos.z, 0.2, 500.0f, 0.0f); if (actor->timer_0BC < 9800) { Math_SmoothStepToF(&gActors[10].fwork[1], 80.0f, 0.1, 10.0f, 0); Math_SmoothStepToF(&gActors[10].fwork[29], 3.0f, 0.1, 1.0f, 0); } else { Math_SmoothStepToF(&actor->fwork[10], 700.0f, 1, 5.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.x, gActors[10].obj.pos.x - 300.0f, 0.07f, actor->fwork[10], 0); - Math_SmoothStepToF(&player->camEye.y, gActors[10].obj.pos.y, 0.07f, actor->fwork[10], 0); - Math_SmoothStepToF(&player->camEye.z, gActors[10].obj.pos.z + 500.0f, 0.05f, 50.0f, 0); + Math_SmoothStepToF(&player->cam.eye.x, gActors[10].obj.pos.x - 300.0f, 0.07f, actor->fwork[10], 0); + Math_SmoothStepToF(&player->cam.eye.y, gActors[10].obj.pos.y, 0.07f, actor->fwork[10], 0); + Math_SmoothStepToF(&player->cam.eye.z, gActors[10].obj.pos.z + 500.0f, 0.05f, 50.0f, 0); Math_SmoothStepToF(&gActors[10].fwork[29], 2.0f, 0.1f, 1.0f, 0); } if (actor->timer_0BC < 9680) { actor->state = 2; - player->state_1C8 = PLAYERSTATE_1C8_3; + player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; func_play_800B7184(player, 1); player->unk_014 = 0.0f; gActors[10].fwork[1] = 25.0f; gActors[10].fwork[29] = 5.0f; gActors[10].obj.pos.z = 35000.0f; gActors[10].iwork[9] = 0; - gPlayer[0].unk_034 = 0.0f; + gPlayer[0].camRoll = 0.0f; actor->timer_0BE = 550; } break; @@ -701,9 +701,9 @@ void SectorZ_8019B630(Actor* actor, s32 index) { actor->obj.status = OBJ_ACTIVE; actor->obj.id = OBJ_ACTOR_195; - actor->obj.pos.x = gPlayer[0].camEye.x + D_i4_8019F57C[index].x; - actor->obj.pos.y = gPlayer[0].camEye.y + D_i4_8019F57C[index].y; - actor->obj.pos.z = gPlayer[0].camEye.z + D_i4_8019F57C[index].z; + actor->obj.pos.x = gPlayer[0].cam.eye.x + D_i4_8019F57C[index].x; + actor->obj.pos.y = gPlayer[0].cam.eye.y + D_i4_8019F57C[index].y; + actor->obj.pos.z = gPlayer[0].cam.eye.z + D_i4_8019F57C[index].z; actor->vel.z = -30.0f; actor->vel.y = -10.0f; @@ -805,7 +805,7 @@ void SectorZ_8019BA64(Player* player) { player->unk_234 = 0; player->unk_0D0 = 0.0f; - player->unk_034 = -20.0f; + player->camRoll = -20.0f; D_game_80161A44 = 30000.0f; @@ -834,7 +834,7 @@ void SectorZ_8019BA64(Player* player) { case 2: gFillScreenAlpha = 0; - player->unk_034 += 0.05f; + player->camRoll += 0.05f; for (i = 30; i < 34; i++) { Math_SmoothStepToF(&gActors[i].vel.x, -5.0f, 0.1f, 0.1, 0.0f); @@ -854,15 +854,15 @@ void SectorZ_8019BA64(Player* player) { actor->obj.pos.y = 0.0f; actor->obj.pos.x = 0.0f; - player->unk_034 = 0.0f; + player->camRoll = 0.0f; - player->camEye.x = gCsCamEyeX = actor->obj.pos.x - 2800.0f; - player->camEye.y = gCsCamEyeY = actor->obj.pos.y + 1400.0f; - player->camEye.z = gCsCamEyeZ = actor->obj.pos.z + 700.0f; + player->cam.eye.x = gCsCamEyeX = actor->obj.pos.x - 2800.0f; + player->cam.eye.y = gCsCamEyeY = actor->obj.pos.y + 1400.0f; + player->cam.eye.z = gCsCamEyeZ = actor->obj.pos.z + 700.0f; - player->camAt.x = gCsCamAtX = actor->obj.pos.x - 1000.0f; - player->camAt.y = gCsCamAtY = actor->obj.pos.y; - player->camAt.z = gCsCamAtZ = actor->obj.pos.z; + player->cam.at.x = gCsCamAtX = actor->obj.pos.x - 1000.0f; + player->cam.at.y = gCsCamAtY = actor->obj.pos.y; + player->cam.at.z = gCsCamAtZ = actor->obj.pos.z; D_ctx_80177A48[0] = 0.0f; gFillScreenAlpha = 255; @@ -930,7 +930,7 @@ void SectorZ_8019BA64(Player* player) { if (gCsFrameCount == 820) { Audio_KillSfxById(0x49000014U); - player->state_1C8 = PLAYERSTATE_1C8_3; + player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_01C = player->unk_018 = player->unk_014 = 0.f; AUDIO_PLAY_BGM(gBgmSeqId); gLevelStatusScreenTimer = 50; @@ -998,8 +998,8 @@ void SectorZ_8019BA64(Player* player) { break; } - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + player->unk_114 + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), 1); + Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + player->unk_114 + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), MTXF_APPLY); sp74.x = 0.0f; sp74.y = 0.0f; @@ -1018,12 +1018,12 @@ void SectorZ_8019BA64(Player* player) { player->unk_138 = player->pos.z; player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; - Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0); } f32 D_i4_8019F61C[] = { -300.0f, 350.0f, -50.0f, 800.0f }; @@ -1156,7 +1156,7 @@ void SectorZ_8019C85C(Player* player) { player->unk_234 = 0; player->unk_0D0 = 0.0f; - player->unk_034 = 0.0f; + player->camRoll = 0.0f; if (boss0->state != 0) { player->unk_1D0 = 0; @@ -1180,7 +1180,7 @@ void SectorZ_8019C85C(Player* player) { player->timer_1F8 = 550; player->unk_0D0 = 0.0f; - player->unk_034 = 0.0f; + player->camRoll = 0.0f; gFillScreenAlphaTarget = 255; gFillScreenAlpha = gFillScreenAlphaTarget; @@ -1297,7 +1297,7 @@ void SectorZ_8019C85C(Player* player) { break; case 11: - Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, MTXF_NEW); D_ctx_80177A48[1] += D_ctx_80177A48[2] * var_fv1; src.x = -800.0f * var_fv1; @@ -1350,7 +1350,7 @@ void SectorZ_8019C85C(Player* player) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; gFillScreenAlphaStep = 8; if (gFillScreenAlpha == 255) { - player->state_1C8 = PLAYERSTATE_1C8_6; + player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; D_ctx_8017837C = 4; D_play_800D3180[LEVEL_SECTOR_Z] = Play_CheckMedalStatus(100) + 1; @@ -1524,8 +1524,8 @@ void SectorZ_8019C85C(Player* player) { break; } - Matrix_RotateY(gCalcMatrix, ((player->unk_114 + player->unk_0E8) + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -(((player->unk_120 + player->unk_0E4) + player->unk_4D8) * M_DTOR), 1); + Matrix_RotateY(gCalcMatrix, ((player->unk_114 + player->unk_0E8) + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(((player->unk_120 + player->unk_0E4) + player->unk_4D8) * M_DTOR), MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; @@ -1546,7 +1546,7 @@ void SectorZ_8019C85C(Player* player) { Math_SmoothStepToF(&player->unk_130, 0.0f, 0.1f, 15.0f, 0.0f); Math_SmoothStepToF(&player->unk_12C, 0.0f, 0.1f, 15.0f, 0.0f); - Math_SmoothStepToF(&player->unk_034, 0.0f, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f); Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 20.0f, 0.0f); if (player->unk_1D0 >= 1000) { @@ -1554,16 +1554,16 @@ void SectorZ_8019C85C(Player* player) { Math_SmoothStepToF(&player->pos.y, 700.0f, 0.1f, 10.0f, 0.0f); } func_play_800B7184(player, 0); - player->camEye.x += player->vel.x * 0.1f; - player->camEye.y += player->vel.y * 0.1f; - player->camEye.z += player->vel.z * 0.1f; + player->cam.eye.x += player->vel.x * 0.1f; + player->cam.eye.y += player->vel.y * 0.1f; + player->cam.eye.z += player->vel.z * 0.1f; } else { - Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0.0f); } player->unk_088 += 10.0f; @@ -1640,9 +1640,9 @@ void SectorZ_8019DD20(Actor* actor) { Math_SmoothStepToF(&actor->fwork[0], 40.0f, 0.1f, 3.0f, 0.0f); if ((gCsFrameCount < 460) && ((gCsFrameCount & 3) == 0)) { - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, MTXF_APPLY); src.x = 0.0f; src.y = 70.0f; src.z = -70.0f; @@ -1653,8 +1653,8 @@ void SectorZ_8019DD20(Actor* actor) { } } - Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -(actor->unk_0F4.x * M_DTOR), 1); + Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(actor->unk_0F4.x * M_DTOR), MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; @@ -1752,8 +1752,8 @@ void SectorZ_8019E454(Boss* boss) { } } - Matrix_RotateY(gCalcMatrix, (boss->unk_078.y + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -(boss->unk_078.x * M_DTOR), 1); + Matrix_RotateY(gCalcMatrix, (boss->unk_078.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(boss->unk_078.x * M_DTOR), MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; @@ -1770,9 +1770,9 @@ void SectorZ_8019E454(Boss* boss) { boss->obj.rot.z = -boss->unk_078.z; if (!gGreatFoxIntact) { - Matrix_RotateY(gCalcMatrix, (boss->obj.rot.y - 270.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, boss->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, (boss->obj.rot.y - 270.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, boss->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_i4_8019F64C[RAND_INT(11.99f)], &dest); func_effect_8007C484(boss->obj.pos.x + dest.x, boss->obj.pos.y + dest.y, boss->obj.pos.z + dest.z, boss->vel.x, boss->vel.y, boss->vel.z, RAND_FLOAT(0.1f) + 0.15f, 0); diff --git a/src/overlays/ovl_i5/fox_ground.c b/src/overlays/ovl_i5/fox_ground.c index cc5b9007..5d3665dc 100644 --- a/src/overlays/ovl_i5/fox_ground.c +++ b/src/overlays/ovl_i5/fox_ground.c @@ -346,7 +346,7 @@ void Ground_801B5244(s32 arg0, s32 arg1) { gSP1Triangle(D_i5_801C5C00++, (iv1 << 1), (iv1 << 1) + 3, (iv1 << 1) + 2, 0); } } - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, D_i5_801C24B8[sp5C] * -220.0f, 0); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, D_i5_801C24B8[sp5C] * -220.0f, MTXF_NEW); Matrix_ToMtx(&D_i5_801C5C18[sp60]); gSPMatrix(D_i5_801C5C00++, &D_i5_801C5C18[sp60], G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPEndDisplayList(D_i5_801C5C00++); @@ -373,7 +373,7 @@ void Ground_801B58AC(Gfx** dList, f32 arg1) { G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD); gDPLoadTileTexture((*dList)++, D_TI_6001BA8, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32); gSPMatrix((*dList)++, &gIdentityMtx, G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); - Matrix_Translate(gGfxMatrix, D_i5_801C62D8.x, D_i5_801C62D8.y, D_i5_801C62D8.z + D_i5_801C5C10, 0); + Matrix_Translate(gGfxMatrix, D_i5_801C62D8.x, D_i5_801C62D8.y, D_i5_801C62D8.z + D_i5_801C5C10, MTXF_NEW); Matrix_ToMtx(gGfxMtx); gSPMatrix((*dList)++, gGfxMtx++, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList((*dList)++, D_i5_801BA950); @@ -415,7 +415,7 @@ void Ground_801B58AC(Gfx** dList, f32 arg1) { D_i5_801C24B8[(D_i5_801C5C08 + 29) % 28] * -220.0f; D_i5_801BE748[(D_i5_801C5C04 + 27) % 27][i][1].v.ob[2] = 0; - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, D_i5_801C24B8[D_i5_801C5C08] * -220.0f, 0); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, D_i5_801C24B8[D_i5_801C5C08] * -220.0f, MTXF_NEW); Matrix_ToMtx(&D_i5_801C5C18[D_i5_801C5C04]); } Ground_801B5FE0(D_i5_801C5C08, D_i5_801C5C04, 1); @@ -563,7 +563,7 @@ void Ground_801B68A8(Gfx** dlist, s32 arg1, s32 arg2) { gDPSetupTile((*dlist)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32, 0, 0, G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD); gDPLoadTileTexture((*dlist)++, D_TI_6001BA8, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32); - Matrix_Translate(gGfxMatrix, D_i5_801C62D8.x, D_i5_801C62D8.y, D_i5_801C62D8.z + D_i5_801C5C10, 0); + Matrix_Translate(gGfxMatrix, D_i5_801C62D8.x, D_i5_801C62D8.y, D_i5_801C62D8.z + D_i5_801C5C10, MTXF_NEW); Matrix_ToMtx(gGfxMtx); gSPMatrix((*dlist)++, gGfxMtx++, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW); diff --git a/src/overlays/ovl_i5/fox_ma.c b/src/overlays/ovl_i5/fox_ma.c index 47623e64..ebd3da28 100644 --- a/src/overlays/ovl_i5/fox_ma.c +++ b/src/overlays/ovl_i5/fox_ma.c @@ -274,7 +274,7 @@ void Macbeth_80199A40(u8* arg0, u8* arg1, f32 arg2) { Matrix_Push(&gCalcMatrix); arg0 = SEGMENTED_TO_VIRTUAL(arg0); arg1 = SEGMENTED_TO_VIRTUAL(arg1); - Matrix_RotateZ(gCalcMatrix, M_DTOR * arg2, 0); + Matrix_RotateZ(gCalcMatrix, M_DTOR * arg2, MTXF_NEW); sp74.z = 0.0f; for (i = 0, var_fs4 = 0.0f; i < 32; i++, var_fs4++) { for (j = 0, var_fs0 = 0.0f; j < 32; j++, var_fs0++) { @@ -498,7 +498,7 @@ void Macbeth_8019A2F4(Actor* actor) { break; } } - if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7) { + if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) { if (var_fa1 < (gPlayer[0].unk_138 - actor->obj.pos.z - (D_i5_801BA1E4 * 1416 - 1416))) { Math_SmoothStepToF(&D_i5_801BA1DC, -6.0f, 0.1f, 0.2f, 0.01f); } @@ -785,7 +785,7 @@ void Macbeth_8019C778(Actor* actor) { case 0: D_i5_801BE320[25] = 1; if ((D_i5_801BE320[9] <= 0) && (D_i5_801BE320[10] <= 0) && (D_i5_801BE320[17] != 0) && - (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7)) { + (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) { D_i5_801BE320[30] = 0; actor->timer_0BC = 150; actor->timer_0BE = 200; @@ -871,8 +871,8 @@ void Macbeth_8019C778(Actor* actor) { } if (actor->timer_0BC == 100) { Object_Kill(&actor->obj, actor->sfxSource); - if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) { - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_7; + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) { + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].unk_1D0 = 0; gNextPlanetPath = 0; } @@ -911,7 +911,7 @@ void Macbeth_8019C778(Actor* actor) { D_i5_801BE320[23] = 0; actor->state = 4; } - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) && (gCsFrameCount > 630)) { + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) && (gCsFrameCount > 630)) { Object_Kill(&actor->obj, actor->sfxSource); } } @@ -1494,9 +1494,9 @@ void Macbeth_8019F164(Actor* actor) { } } if ((actor->iwork[4] == 0) || (sp44 != 0)) { - Matrix_RotateZ(gCalcMatrix, -actor->obj.rot.z * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -(actor->obj.rot.x + actor->fwork[29]) * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -(actor->obj.rot.y + actor->fwork[26]) * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, -actor->obj.rot.z * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(actor->obj.rot.x + actor->fwork[29]) * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -(actor->obj.rot.y + actor->fwork[26]) * M_DTOR, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &sp6C, &sp84); sp78.x = sp84.x - D_i5_801BA708.x; sp78.y = sp84.y - D_i5_801BA708.y; @@ -1521,9 +1521,9 @@ void Macbeth_8019F164(Actor* actor) { } Math_SmoothStepToAngle(&actor->fwork[2], actor->fwork[4], 0.2f, 5.0f, 0.01f); Math_SmoothStepToAngle(&actor->fwork[1], actor->fwork[3], 0.2f, 5.0f, 0.01f); - Matrix_RotateY(gCalcMatrix, (actor->obj.rot.y + actor->fwork[26]) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, (actor->obj.rot.x + actor->fwork[29]) * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, (actor->obj.rot.y + actor->fwork[26]) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, (actor->obj.rot.x + actor->fwork[29]) * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &D_i5_801BA708, &sp84); sp60.x = sp84.x + actor->obj.pos.x + actor->fwork[25]; sp60.y = sp84.y + actor->obj.pos.y + actor->fwork[8] + 25.0f; @@ -2034,7 +2034,7 @@ void Macbeth_801A12C4(Actor* actor) { Vec3f spD0[50]; s32 id; - if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) { + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) { if (((gPlayer[0].unk_138 - actor->obj.pos.z) > 7000.0f) || ((gPlayer[0].unk_138 - actor->obj.pos.z) < -1000.0f)) { return; @@ -2047,9 +2047,9 @@ void Macbeth_801A12C4(Actor* actor) { } Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, actor->fwork[25], actor->fwork[8] + 25.0f, 0.0f, 1); - Matrix_RotateY(gGfxMatrix, actor->fwork[26] * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, actor->fwork[29] * M_DTOR, 1); + Matrix_Translate(gGfxMatrix, actor->fwork[25], actor->fwork[8] + 25.0f, 0.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, actor->fwork[26] * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, actor->fwork[29] * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if ((actor->obj.id != OBJ_ACTOR_206) && (actor->obj.id != OBJ_ACTOR_205)) { @@ -2057,7 +2057,7 @@ void Macbeth_801A12C4(Actor* actor) { gSPDisplayList(gMasterDisp++, D_MA_6027BF0); gSPDisplayList(gMasterDisp++, D_MA_601BE90); } else { - Matrix_Scale(gGfxMatrix, actor->scale, actor->scale, actor->scale, 1); + Matrix_Scale(gGfxMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY); Animation_GetFrameData(&D_MA_602EA0C, 0, spD0); Animation_DrawSkeleton(1, D_MA_602EBB8, spD0, Macbeth_801A0A74, NULL, actor, &gIdentityMatrix); } @@ -2080,8 +2080,8 @@ void Macbeth_801A12C4(Actor* actor) { if (actor->iwork[13] == 0) { Animation_GetFrameData(&D_MA_6027A04, 0, spD0); Animation_DrawSkeleton(1, D_MA_6027AF0, spD0, Macbeth_801A0B00, NULL, actor, &gIdentityMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, 205.0f, 0.0f, 1); - Matrix_RotateZ(gGfxMatrix, actor->fwork[4] * M_DTOR, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 205.0f, 0.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, actor->fwork[4] * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if ((actor->iwork[7] % 2) != 0) { RCP_SetupDL_27(); @@ -2099,7 +2099,7 @@ void Macbeth_801A12C4(Actor* actor) { break; case OBJ_ACTOR_209: if (actor->iwork[17] != 2) { - Matrix_Translate(gGfxMatrix, 0.0f, 5.0f, 0.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 5.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if ((actor->iwork[8] % 2) != 0) { RCP_SetupDL_27(); @@ -2114,7 +2114,7 @@ void Macbeth_801A12C4(Actor* actor) { break; case OBJ_ACTOR_211: if (actor->iwork[17] != 2) { - Matrix_Translate(gGfxMatrix, 0.0f, -15.0f, 0.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, -15.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if ((actor->iwork[8] % 2) != 0) { RCP_SetupDL_27(); @@ -2137,7 +2137,7 @@ void Macbeth_801A12C4(Actor* actor) { break; case OBJ_ACTOR_213: if (actor->iwork[13] < 2) { - Matrix_Translate(gGfxMatrix, 0.0f, -5.0f, 0.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, -5.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL(&gMasterDisp, 0x39); if ((actor->iwork[7] % 2) != 0) { @@ -2161,11 +2161,11 @@ void Macbeth_801A12C4(Actor* actor) { actor->iwork[7]--; } if (actor->iwork[13] == 0) { - Matrix_Translate(gGfxMatrix, 0.0f, -5.0f, 0.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, -5.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_MA_60269E0); } else { - Matrix_Translate(gGfxMatrix, 0.0f, -5.0f, 0.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, -5.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_MA_6017720); } @@ -2177,7 +2177,7 @@ void Macbeth_801A12C4(Actor* actor) { Animation_DrawSkeleton(1, D_MA_601EBBC, spD0, Macbeth_801AC5AC, NULL, actor, &gIdentityMatrix); break; case OBJ_ACTOR_205: - Matrix_Translate(gGfxMatrix, actor->fwork[3], 0.0f, 0.0f, 1); + Matrix_Translate(gGfxMatrix, actor->fwork[3], 0.0f, 0.0f, MTXF_APPLY); if (D_i5_801BE320[21] == 0) { Animation_GetFrameData(&D_MA_6010220, 0, spD0); } else if (D_i5_801BE320[21] == 1) { @@ -2186,7 +2186,7 @@ void Macbeth_801A12C4(Actor* actor) { Animation_GetFrameData(&D_MA_6010144, D_i5_801BE320[22], spD0); } Animation_DrawSkeleton(1, D_MA_601042C, spD0, Macbeth_801A0EB8, Macbeth_801A1268, actor, &gIdentityMatrix); - if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) { + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) { RCP_SetupDL(&gMasterDisp, 0x1D); gSPClearGeometryMode(gMasterDisp++, G_TEXTURE_GEN); gSPDisplayList(gMasterDisp++, D_MA_6003370); @@ -2195,11 +2195,11 @@ void Macbeth_801A12C4(Actor* actor) { } Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, actor->fwork[21], actor->fwork[6] + 65.0f, -420.0f, 1); - Matrix_RotateY(gGfxMatrix, actor->fwork[22] * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, actor->fwork[27] * M_DTOR, 1); + Matrix_Translate(gGfxMatrix, actor->fwork[21], actor->fwork[6] + 65.0f, -420.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, actor->fwork[22] * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, actor->fwork[27] * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - Matrix_Scale(gGfxMatrix, actor->scale, actor->scale, actor->scale, 1); + Matrix_Scale(gGfxMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY); if ((gPlayer[0].unk_138 - actor->obj.pos.z) > 3000.0f) { gSPDisplayList(gMasterDisp++, D_MA_6027D40); } else if (actor->vel.z > -2.0f) { @@ -2209,10 +2209,10 @@ void Macbeth_801A12C4(Actor* actor) { } Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, actor->fwork[23], actor->fwork[7] + 65.0f, 420.0f, 1); - Matrix_RotateY(gGfxMatrix, actor->fwork[24] * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, actor->fwork[28] * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, actor->scale, actor->scale, actor->scale, 1); + Matrix_Translate(gGfxMatrix, actor->fwork[23], actor->fwork[7] + 65.0f, 420.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, actor->fwork[24] * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, actor->fwork[28] * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL(&gMasterDisp, 0x1D); if ((gPlayer[0].unk_138 - actor->obj.pos.z) > 3000.0f) { @@ -2227,9 +2227,9 @@ void Macbeth_801A12C4(Actor* actor) { if ((id == OBJ_ACTOR_209) || (id == OBJ_ACTOR_211)) { if (actor->iwork[13] != 2) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, actor->fwork[21], actor->fwork[6] + 10.0f, -420.0f, 1); - Matrix_RotateY(gGfxMatrix, actor->fwork[26] * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, actor->fwork[29] * M_DTOR, 1); + Matrix_Translate(gGfxMatrix, actor->fwork[21], actor->fwork[6] + 10.0f, -420.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, actor->fwork[26] * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, actor->fwork[29] * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if ((actor->iwork[7] % 2) != 0) { RCP_SetupDL_27(); @@ -2252,9 +2252,9 @@ void Macbeth_801A12C4(Actor* actor) { } if (actor->iwork[21] != 2) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, actor->fwork[23], actor->fwork[7] + 10.0f, 420.0f, 1); - Matrix_RotateY(gGfxMatrix, actor->fwork[26] * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, actor->fwork[29] * M_DTOR, 1); + Matrix_Translate(gGfxMatrix, actor->fwork[23], actor->fwork[7] + 10.0f, 420.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, actor->fwork[26] * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, actor->fwork[29] * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if ((actor->iwork[9] % 2) != 0) { RCP_SetupDL_27(); @@ -2285,14 +2285,16 @@ void Macbeth_801A23AC(Object_80* obj80) { switch (obj80->obj.id) { case OBJ_80_94: case OBJ_80_97: - if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7) && ((gPlayer[0].unk_138 - obj80->obj.pos.z) < -2500.0f)) { + if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) && + ((gPlayer[0].unk_138 - obj80->obj.pos.z) < -2500.0f)) { Object_Kill(&obj80->obj, obj80->sfxSource); } gSPDisplayList(gMasterDisp++, D_MA_6026860); break; case OBJ_80_95: case OBJ_80_98: - if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7) && ((gPlayer[0].unk_138 - obj80->obj.pos.z) < -2500.0f)) { + if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) && + ((gPlayer[0].unk_138 - obj80->obj.pos.z) < -2500.0f)) { Object_Kill(&obj80->obj, obj80->sfxSource); } gSPDisplayList(gMasterDisp++, D_MA_602FBF0); @@ -2324,17 +2326,17 @@ void Macbeth_801A23AC(Object_80* obj80) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 255, 48, 0, 255); Matrix_Translate(gGfxMatrix, D_i5_801BE688[0].x, D_i5_801BE688[0].y + 50.0f, - D_i5_801BE688[0].z + 100.0f, 1); - Matrix_RotateX(gCalcMatrix, (D_PI / 2), 1); - Matrix_Scale(gGfxMatrix, obj80->vel.z, obj80->vel.z / 2, obj80->vel.z, 1); + D_i5_801BE688[0].z + 100.0f, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, (D_PI / 2), MTXF_APPLY); + Matrix_Scale(gGfxMatrix, obj80->vel.z, obj80->vel.z / 2, obj80->vel.z, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, D_i5_801BE688[1].x, D_i5_801BE688[1].y + 50.0f, - D_i5_801BE688[1].z + 100.0f, 1); - Matrix_RotateX(gCalcMatrix, (D_PI / 2), 1); - Matrix_Scale(gGfxMatrix, obj80->vel.z, obj80->vel.z / 2, obj80->vel.z, 1); + D_i5_801BE688[1].z + 100.0f, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, (D_PI / 2), MTXF_APPLY); + Matrix_Scale(gGfxMatrix, obj80->vel.z, obj80->vel.z / 2, obj80->vel.z, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); RCP_SetupDL(&gMasterDisp, 0x1D); @@ -2345,9 +2347,9 @@ void Macbeth_801A23AC(Object_80* obj80) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 255, 48, 0, 255); Matrix_Translate(gGfxMatrix, D_i5_801BE688[1].x - 50.0f, D_i5_801BE688[1].y + 50.0f, - D_i5_801BE688[1].z + 50.0f, 1); - Matrix_RotateX(gCalcMatrix, (D_PI / 2), 1); - Matrix_Scale(gGfxMatrix, obj80->vel.z, obj80->vel.z / 2, obj80->vel.z, 1); + D_i5_801BE688[1].z + 50.0f, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, (D_PI / 2), MTXF_APPLY); + Matrix_Scale(gGfxMatrix, obj80->vel.z, obj80->vel.z / 2, obj80->vel.z, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); RCP_SetupDL(&gMasterDisp, 0x1D); @@ -2355,14 +2357,14 @@ void Macbeth_801A23AC(Object_80* obj80) { } if (D_MA_801BE2F0[5] != 0) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -1800.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -1800.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_MA_601C170); Matrix_Pop(&gGfxMatrix); } else { Matrix_Push(&gGfxMatrix); - Matrix_RotateY(gGfxMatrix, -(D_PI / 18), 1); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -1800.0f, 1); + Matrix_RotateY(gGfxMatrix, -(D_PI / 18), MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -1800.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_MA_601C170); Matrix_Pop(&gGfxMatrix); @@ -2388,7 +2390,7 @@ void Macbeth_801A2A78(Object_80* obj80) { } void Macbeth_801A2B24(Object_80* obj80) { - if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) { + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) { Object_Kill(&obj80->obj, obj80->sfxSource); } RCP_SetupDL(&gMasterDisp, 0x39); @@ -2834,8 +2836,8 @@ void Macbeth_801A43BC(Actor* actor) { Matrix_Pop(&gGfxMatrix); RCP_SetupDL(&gMasterDisp, 0x1D); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, actor->fwork[2] + 204.0f, 0.0f, 1); - Matrix_RotateY(gGfxMatrix, actor->fwork[1] * M_DTOR, 1); + Matrix_Translate(gGfxMatrix, 0.0f, actor->fwork[2] + 204.0f, 0.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, actor->fwork[1] * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_MA_602FFC0); Matrix_Pop(&gGfxMatrix); @@ -2843,8 +2845,8 @@ void Macbeth_801A43BC(Actor* actor) { gDPSetTextureFilter(gMasterDisp++, G_TF_POINT); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, actor->fwork[0], 0, 0, 255); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, actor->fwork[2] + 204.0f, 0.0f, 1); - Matrix_RotateY(gGfxMatrix, actor->fwork[1] * M_DTOR, 1); + Matrix_Translate(gGfxMatrix, 0.0f, actor->fwork[2] + 204.0f, 0.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, actor->fwork[1] * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_MA_602F380); gDPSetTextureFilter(gMasterDisp++, G_TF_BILERP); @@ -2940,7 +2942,7 @@ void Macbeth_801A49B8(Actor* actor) { void Macbeth_801A4A64(Actor* actor) { if (actor->state < 2) { if (actor->scale != 1.0f) { - Matrix_Scale(gGfxMatrix, actor->scale, actor->scale, actor->scale, 1); + Matrix_Scale(gGfxMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); } gSPDisplayList(gMasterDisp++, D_MA_601A2B0); @@ -3020,7 +3022,7 @@ void Macbeth_801A4B24(Actor* actor) { } D_ctx_80177DC8 = i; D_ctx_8017796C = -1; - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_7; + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].unk_1D0 = 0; gNextPlanetPath = 1; actor->timer_0BC = 5; @@ -3121,7 +3123,7 @@ s32 Macbeth_801A55D4(s32 arg0, Vec3f* arg1, Vec3f* arg2, s32 arg3) { for (i = 0; i < ARRAY_COUNT(gObjects80); i++, obj80++) { if ((obj80->obj.status == OBJ_ACTIVE) && (obj80->obj.id != OBJ_80_68) && (fabsf(arg1->x - obj80->obj.pos.x) < 2000.0f) && (fabsf(arg1->z - obj80->obj.pos.z) < 2000.0f) && - (func_enmy_80062DBC(arg1, obj80->info.hitbox, &obj80->obj, 0.0f, 0.0f, 0.0f) != 0)) { + (Object_CheckHitboxCollision(arg1, obj80->info.hitbox, &obj80->obj, 0.0f, 0.0f, 0.0f) != 0)) { return i + 10; } } @@ -3130,7 +3132,7 @@ s32 Macbeth_801A55D4(s32 arg0, Vec3f* arg1, Vec3f* arg2, s32 arg3) { for (i = 0; i < ARRAY_COUNT(gActors); i++, actor++) { if ((actor->obj.status >= OBJ_ACTIVE) && (fabsf(arg1->x - actor->obj.pos.x) < 1000.0f) && (fabsf(arg1->z - actor->obj.pos.z) < 1500.0f) && (arg0 != i) && (actor->info.unk_16 != 2) && - (actor->timer_0C2 == 0) && (func_enmy_800631A8(arg1, actor->info.hitbox, &actor->obj.pos) != 0)) { + (actor->timer_0C2 == 0) && (Object_CheckSingleHitbox(arg1, actor->info.hitbox, &actor->obj.pos) != 0)) { actor->unk_0D0 = 1; actor->unk_0D2 = -1; actor->unk_0D8.x = arg1->x; @@ -3861,7 +3863,7 @@ void Macbeth_801A7E7C(Actor* actor) { Macbeth_801A6C78(actor); Macbeth_801A6984(actor); Macbeth_801A7CAC(actor); - if ((D_i5_801BE320[16] != 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3)) { + if ((D_i5_801BE320[16] != 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { var_v1 = 0xFF; if (D_i5_801BE320[18] == 2) { var_v1 = 3; @@ -4314,7 +4316,7 @@ void Macbeth_801A7E7C(Actor* actor) { if (actor->timer_0BC == 98) { AUDIO_PLAY_SFX(0x19022069, actor->sfxSource, 4); } - Matrix_RotateY(gCalcMatrix, RAND_FLOAT(2.0f) * (M_DTOR * 180.0f), 0); + Matrix_RotateY(gCalcMatrix, RAND_FLOAT(2.0f) * (M_DTOR * 180.0f), MTXF_NEW); sp360.x = 0.0f; sp360.y = RAND_FLOAT(100.0f); sp360.z = RAND_FLOAT(200.0f) + 100.0f; @@ -4379,16 +4381,16 @@ void Macbeth_801A7E7C(Actor* actor) { sp348.x = actor->vwork[6].x - actor->vwork[2].x; sp348.y = actor->vwork[6].y - actor->vwork[2].y + 25.0f; sp348.z = actor->vwork[6].z - actor->vwork[2].z; - Matrix_RotateZ(gCalcMatrix, -actor->vwork[3].z * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -actor->vwork[3].x * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -actor->vwork[3].y * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, -actor->vwork[3].z * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -actor->vwork[3].x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -actor->vwork[3].y * M_DTOR, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &sp348, &sp354); D_i5_801BE368[14] = Math_RadToDeg(Math_Atan2F(sp354.x, sp354.z)); temp = sqrtf(SQ(sp354.x) + SQ(sp354.z)); D_i5_801BE368[13] = Math_RadToDeg(-Math_Atan2F(sp354.y, temp)); - Matrix_RotateY(gCalcMatrix, actor->vwork[3].y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, actor->vwork[3].x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, actor->vwork[3].z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, actor->vwork[3].y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, actor->vwork[3].x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, actor->vwork[3].z * M_DTOR, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &D_i5_801BA744, &sp354); sp348.x = actor->vwork[2].x + sp354.x; sp348.y = actor->vwork[2].y + sp354.y + 25.0f; @@ -4403,16 +4405,16 @@ void Macbeth_801A7E7C(Actor* actor) { sp348.x = actor->vwork[7].x - actor->vwork[4].x; sp348.y = actor->vwork[7].y - actor->vwork[4].y + 25.0f; sp348.z = actor->vwork[7].z - actor->vwork[4].z; - Matrix_RotateZ(gCalcMatrix, -actor->vwork[5].z * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -actor->vwork[5].x * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -actor->vwork[5].y * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, -actor->vwork[5].z * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -actor->vwork[5].x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -actor->vwork[5].y * M_DTOR, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &sp348, &sp354); D_i5_801BE368[14] = Math_RadToDeg(Math_Atan2F(sp354.x, sp354.z)); temp = sqrtf(SQ(sp354.x) + SQ(sp354.z)); D_i5_801BE368[13] = Math_RadToDeg(-Math_Atan2F(sp354.y, temp)); - Matrix_RotateY(gCalcMatrix, actor->vwork[5].y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, actor->vwork[5].x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, actor->vwork[5].z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, actor->vwork[5].y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, actor->vwork[5].x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, actor->vwork[5].z * M_DTOR, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &D_i5_801BA744, &sp354); sp348.x = actor->vwork[4].x + sp354.x; sp348.y = actor->vwork[4].y + sp354.y + 25.0f; @@ -4584,7 +4586,7 @@ void Macbeth_801A7E7C(Actor* actor) { actor->state = 8; } } - if ((D_i5_801BE320[16] != 0) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_7)) { + if ((D_i5_801BE320[16] != 0) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) { if (gBossFrameCount == 0) { Radio_PlayMessage(gMsg_ID_2225, RCID_SLIPPY); } else if (gBossFrameCount > 155) { @@ -4633,7 +4635,7 @@ void Macbeth_801A7E7C(Actor* actor) { D_i5_801BE368[21] = 160.0f; D_i5_801BE368[22] = 16.0f; } - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_7) && (actor->state < 20)) { + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) && (actor->state < 20)) { D_i5_801BE320[3] = 0; D_i5_801BE320[2] = 1; D_i5_801BE320[31] = 30; @@ -4745,9 +4747,9 @@ bool Macbeth_801ABC14(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* gDPSetEnvColor(gMasterDisp++, 16, 32, 255, 255); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); Matrix_Push(&gCalcMatrix); - Matrix_Mult(gGfxMatrix, gCalcMatrix, 1); + Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_Push(&gGfxMatrix); - Matrix_Scale(gGfxMatrix, D_i5_801BE368[31], D_i5_801BE368[30], D_i5_801BE368[31], 1); + Matrix_Scale(gGfxMatrix, D_i5_801BE368[31], D_i5_801BE368[30], D_i5_801BE368[31], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, *dList); Matrix_Pop(&gGfxMatrix); @@ -4816,7 +4818,7 @@ void Macbeth_801AC1C0(s32 limbIndex, Vec3f* rot, void* data) { } void Macbeth_801AC294(Actor* actor) { - if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) { + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) { if (((gPlayer[0].unk_138 - actor->obj.pos.z) > 7000.0f) || ((gPlayer[0].unk_138 - actor->obj.pos.z) < -1000.0f)) { return; @@ -4829,9 +4831,9 @@ void Macbeth_801AC294(Actor* actor) { } if (D_i5_801BE320[2] == 0) { - Matrix_Translate(gCalcMatrix, actor->fwork[25], 0.0f, 0.0f, 1); - Matrix_RotateY(gCalcMatrix, actor->fwork[26] * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, actor->fwork[29] * M_DTOR, 1); + Matrix_Translate(gCalcMatrix, actor->fwork[25], 0.0f, 0.0f, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, actor->fwork[26] * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, actor->fwork[29] * M_DTOR, MTXF_APPLY); Animation_GetFrameData(&D_MA_601EA28, D_i5_801BE320[3], D_i5_801BE430); } Animation_DrawSkeleton(3, D_MA_600D1E4, D_i5_801BE430, Macbeth_801ABC14, Macbeth_801AC1C0, actor, gCalcMatrix); @@ -4937,12 +4939,12 @@ void Macbeth_801AC754(Player* player) { player->pos.x = 0.0f; player->pos.y = -3.0f; player->vel.z = -15.0f; - player->camEye.x = gCsCamEyeX = -518.0f; - player->camEye.y = gCsCamEyeY = 3882.5f; - player->camEye.z = gCsCamEyeZ = 200.0f; - player->camAt.x = gCsCamAtX = -910.0f; - player->camAt.y = gCsCamAtY = 42.0f; - player->camAt.z = gCsCamAtZ = -800.0f; + player->cam.eye.x = gCsCamEyeX = -518.0f; + player->cam.eye.y = gCsCamEyeY = 3882.5f; + player->cam.eye.z = gCsCamEyeZ = 200.0f; + player->cam.at.x = gCsCamAtX = -910.0f; + player->cam.at.y = gCsCamAtY = 42.0f; + player->cam.at.z = gCsCamAtZ = -800.0f; player->unk_240 = 1; player->unk_1D0 = 2; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; @@ -4990,7 +4992,7 @@ void Macbeth_801AC754(Player* player) { case 3: AUDIO_PLAY_BGM(SEQ_ID_MACBETH | SEQ_FLAG); gLevelStatusScreenTimer = 50; - player->state_1C8 = PLAYERSTATE_1C8_3; + player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_1D0 = player->timer_1F8 = player->timer_1FC = player->unk_240 = 0; player->unk_0D4 = 3.0f; player->unk_014 = 0.0f; @@ -5005,12 +5007,12 @@ void Macbeth_801AC754(Player* player) { break; } player->unk_138 = player->pos.z += player->vel.z; - Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_ctx_80177A48[0], sp4C, 0); - Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_ctx_80177A48[1], sp48, 0); - Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_ctx_80177A48[2], sp44, 0); - Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_ctx_80177A48[0], sp4C, 0); - Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_ctx_80177A48[1], sp48, 0); - Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_ctx_80177A48[2], sp44, 0); + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], sp4C, 0); + Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[1], sp48, 0); + Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[2], sp44, 0); + Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], sp4C, 0); + Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[1], sp48, 0); + Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[2], sp44, 0); player->unk_0A0 = 0.0f; player->unk_0F4 += player->vel.z * 5.0f; player->unk_0F0 = SIN_DEG(player->unk_0F4) * 0.7f; @@ -5026,8 +5028,8 @@ void Macbeth_801AC754(Player* player) { void Macbeth_801ACE40(Effect* effect) { Effect_Initialize(effect); effect->obj.status = OBJ_INIT; - effect->obj.pos.x = gPlayer[0].camEye.x + RAND_FLOAT_CENTERED(600.0f); - effect->obj.pos.y = gPlayer[0].camEye.y - 1000.0f; + effect->obj.pos.x = gPlayer[0].cam.eye.x + RAND_FLOAT_CENTERED(600.0f); + effect->obj.pos.y = gPlayer[0].cam.eye.y - 1000.0f; effect->obj.pos.z = gPlayer[0].unk_138 - 2000.0f; effect->obj.id = OBJ_EFFECT_352; effect->timer_50 = 80; @@ -5094,17 +5096,17 @@ void Macbeth_801AD144(PlayerShot* playerShot) { if (temp_ft3 != 0) { for (j = 0; j < temp_ft3; j++, var_s1 += 6) { if (var_s1[0] == 200000.0f) { - Matrix_RotateZ(gCalcMatrix, -var_s1[3] * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -var_s1[1] * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -var_s1[2] * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, -actor->obj.rot.z * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, -actor->obj.rot.x * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -actor->obj.rot.y * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, -var_s1[3] * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -var_s1[1] * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -var_s1[2] * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -actor->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, -actor->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -actor->obj.rot.y * M_DTOR, MTXF_APPLY); var_s1 += 4; } else { - Matrix_RotateZ(gCalcMatrix, -actor->obj.rot.z * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -actor->obj.rot.x * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -actor->obj.rot.y * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, -actor->obj.rot.z * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -actor->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -actor->obj.rot.y * M_DTOR, MTXF_APPLY); } if ((j == temp_s6) && (var_s1[1] > -100.0f) && (var_s1[3] > -100.0f)) { sp8C.x = playerShot->obj.pos.x - actor->obj.pos.x; @@ -5184,7 +5186,7 @@ void Macbeth_801AD6F0(Actor* actor) { switch (actor->state) { case 0: if ((actor->timer_0BC == 0) && - ((actor->vel.y -= 0.5f, (func_enmy_8006351C(actor->index, &actor->obj.pos, &sp4C, 1) != 0)) || + ((actor->vel.y -= 0.5f, (Object_CheckCollision(actor->index, &actor->obj.pos, &sp4C, 1) != 0)) || (actor->obj.pos.y < (gGroundLevel + 10.0f)) || (actor->iwork[0] != 0))) { actor->vel.x = 0.0f; actor->vel.y = 0.0f; @@ -5239,7 +5241,7 @@ void Macbeth_801ADAC8(Actor* actor) { RCP_SetupDL(&gMasterDisp, 0x40); break; case 1: - Matrix_Scale(gGfxMatrix, actor->fwork[0], actor->scale, 2.5f, 1); + Matrix_Scale(gGfxMatrix, actor->fwork[0], actor->scale, 2.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL_40(); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); @@ -5323,7 +5325,7 @@ void Macbeth_801ADD68(Actor* actor) { } } } - if ((func_enmy_8006351C(actor->index, &actor->obj.pos, &sp3C, 1) != 0) || + if ((Object_CheckCollision(actor->index, &actor->obj.pos, &sp3C, 1) != 0) || (actor->obj.pos.y < (gGroundLevel + 200.0f))) { AUDIO_PLAY_SFX(0x19032064, actor->sfxSource, 4); gControllerRumbleFlags[gMainController] = 1; @@ -5387,11 +5389,11 @@ void Macbeth_801AE2C0(Actor* actor) { RCP_SetupDL(&gMasterDisp, 0x43); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, actor->iwork[0]); gDPSetEnvColor(gMasterDisp++, 255, 48, 0, actor->iwork[0]); - Matrix_Scale(gGfxMatrix, 1.0f, actor->fwork[2], 1.0f, 1); + Matrix_Scale(gGfxMatrix, 1.0f, actor->fwork[2], 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_MA_6013060); RCP_SetupDL(&gMasterDisp, 0x43); - Matrix_Scale(gGfxMatrix, 1.0f, actor->fwork[2], 1.0f, 1); + Matrix_Scale(gGfxMatrix, 1.0f, actor->fwork[2], 1.0f, MTXF_APPLY); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 53, 53, 53, 255 - actor->iwork[0]); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, actor->iwork[0]); } else { @@ -5463,8 +5465,8 @@ void Macbeth_801AE694(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 arg4, f3 sp48 = Math_Atan2F(arg4 - xPos, arg6 - zPos); sp44 = sqrtf(SQ(arg4 - xPos) + SQ(arg6 - zPos)); sp4C = -Math_Atan2F(arg5 - yPos, sp44); - Matrix_RotateY(gCalcMatrix, sp48, 0); - Matrix_RotateX(gCalcMatrix, sp4C, 1); + Matrix_RotateY(gCalcMatrix, sp48, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, sp4C, MTXF_APPLY); sp38.x = 0.0f; sp38.y = 0.0f; sp38.z = 30.0f; @@ -5540,7 +5542,7 @@ void Macbeth_801AEAA0(Effect* effect) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, effect->unk_44); gDPSetEnvColor(gMasterDisp++, 0, 128, 255, effect->unk_44); } - Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, 1); + Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); RCP_SetupDL(&gMasterDisp, 0x40); @@ -5606,9 +5608,9 @@ void Macbeth_801AEC04(Actor* actor) { void Macbeth_801AEEFC(Actor* actor) { gSPDisplayList(gMasterDisp++, D_MA_6015510); - Matrix_Scale(gGfxMatrix, actor->fwork[0], actor->fwork[2], 1.0f, 1); + Matrix_Scale(gGfxMatrix, actor->fwork[0], actor->fwork[2], 1.0f, MTXF_APPLY); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, -10.0f, 0.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, -10.0f, 0.0f, MTXF_APPLY); RCP_SetupDL(&gMasterDisp, 0x43); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 111, 175, 64, actor->fwork[1]); gDPSetEnvColor(gMasterDisp++, 255, 255, 208, actor->fwork[1]); @@ -5797,7 +5799,7 @@ void Macbeth_801AF8F4(Player* player) { switch (player->unk_1D0) { case 0: gCsFrameCount = 0; - D_ctx_80178488 = 1; + gLoadLevelObjects = 1; player->unk_234 = 0; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 30); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 30); @@ -5810,17 +5812,17 @@ void Macbeth_801AF8F4(Player* player) { if (player->shields <= 0) { player->shields = 1; } - player->camEye.x = gCsCamEyeX = gActors[D_i5_801BE318].obj.pos.x - 250.0f; - player->camEye.y = gCsCamEyeY = gActors[D_i5_801BE318].obj.pos.y + 150.0f; - player->camEye.z = gCsCamEyeZ = gActors[D_i5_801BE318].obj.pos.z + D_ctx_80177D20 + 500.0f; - player->camAt.x = gCsCamAtX = gActors[D_i5_801BE318].obj.pos.x; - player->camAt.y = gCsCamAtY = gActors[D_i5_801BE318].obj.pos.y + 200.0f; - player->camAt.z = gCsCamAtZ = gActors[D_i5_801BE318].obj.pos.z + D_ctx_80177D20; + player->cam.eye.x = gCsCamEyeX = gActors[D_i5_801BE318].obj.pos.x - 250.0f; + player->cam.eye.y = gCsCamEyeY = gActors[D_i5_801BE318].obj.pos.y + 150.0f; + player->cam.eye.z = gCsCamEyeZ = gActors[D_i5_801BE318].obj.pos.z + D_ctx_80177D20 + 500.0f; + player->cam.at.x = gCsCamAtX = gActors[D_i5_801BE318].obj.pos.x; + player->cam.at.y = gCsCamAtY = gActors[D_i5_801BE318].obj.pos.y + 200.0f; + player->cam.at.z = gCsCamAtZ = gActors[D_i5_801BE318].obj.pos.z + D_ctx_80177D20; player->pos.x = 500.0f; player->pos.y = -3.0f; D_i5_801BA1DC = 0.0f; player->unk_4D8 = 0.0f; - player->unk_034 = 0.0f; + player->camRoll = 0.0f; player->unk_110 = 0.0f; player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = player->unk_130 = player->unk_12C = 0.0f; @@ -5849,12 +5851,12 @@ void Macbeth_801AF8F4(Player* player) { gCsCamAtX = -250.0f; gCsCamAtY = 10.0f; gCsCamAtZ = -3210.0f; - player->camEye.x = -250.0f; - player->camEye.y = 50.0f; - player->camEye.z = 1580.0f; - player->camAt.x = -250.0f; - player->camAt.y = 10.0f; - player->camAt.z = -3210.0f; + player->cam.eye.x = -250.0f; + player->cam.eye.y = 50.0f; + player->cam.eye.z = 1580.0f; + player->cam.at.x = -250.0f; + player->cam.at.y = 10.0f; + player->cam.at.z = -3210.0f; D_i5_801BE312 = 1; player->pos.x = 500.0f; player->pos.y = -3.0f; @@ -5925,12 +5927,12 @@ void Macbeth_801AF8F4(Player* player) { D_ctx_801779E4 = 0.0f; D_ctx_801779F4 = 0.0f; player->timer_210 = 0; - player->camEye.x = gCsCamEyeX = 2750.0f; - player->camEye.y = gCsCamEyeY = 50.0f; - player->camEye.z = gCsCamEyeZ = -620.0f; - player->camAt.x = gCsCamAtX = -650.0f; - player->camAt.y = gCsCamAtY = 30.0f; - player->camAt.z = gCsCamAtZ = 1900.0f; + player->cam.eye.x = gCsCamEyeX = 2750.0f; + player->cam.eye.y = gCsCamEyeY = 50.0f; + player->cam.eye.z = gCsCamEyeZ = -620.0f; + player->cam.at.x = gCsCamAtX = -650.0f; + player->cam.at.y = gCsCamAtY = 30.0f; + player->cam.at.z = gCsCamAtZ = 1900.0f; player->unk_114 = 0.0f; D_i5_801BA1DC = -100.0f; Audio_KillSfxById(0x31078085); @@ -5955,12 +5957,12 @@ void Macbeth_801AF8F4(Player* player) { D_ctx_80177A48[6] = 0.5f; D_ctx_80177A48[7] = 1560.0f; D_ctx_80177A48[8] = 2400.0f; - player->camAt.x = gCsCamAtX = gActors[D_i5_801BE314].obj.pos.x; - player->camAt.z = gCsCamAtZ = (gActors[D_i5_801BE314].obj.pos.z + D_ctx_80177D20) - 2000.0f; - player->camEye.y = gCsCamEyeY = 50.0f; - player->camAt.y = gCsCamAtY = 10.0f; - player->camEye.x = gCsCamEyeX = D_ctx_80177A48[7] + gCsCamAtX; - player->camEye.z = gCsCamEyeZ = D_ctx_80177A48[8] + gCsCamAtZ; + player->cam.at.x = gCsCamAtX = gActors[D_i5_801BE314].obj.pos.x; + player->cam.at.z = gCsCamAtZ = (gActors[D_i5_801BE314].obj.pos.z + D_ctx_80177D20) - 2000.0f; + player->cam.eye.y = gCsCamEyeY = 50.0f; + player->cam.at.y = gCsCamAtY = 10.0f; + player->cam.eye.x = gCsCamEyeX = D_ctx_80177A48[7] + gCsCamAtX; + player->cam.eye.z = gCsCamEyeZ = D_ctx_80177A48[8] + gCsCamAtZ; player->unk_118 = -30.0f; player->unk_0B8 = 10014.0f; player->timer_210 = 1000; @@ -6182,7 +6184,7 @@ void Macbeth_801AF8F4(Player* player) { gFillScreenAlphaTarget = 255; gFillScreenAlphaStep = 20; AUDIO_PLAY_SFX(0x2940F026, gActors[D_i5_801BE314].sfxSource, 4); - gBossActive = D_ctx_80178488 = 0; + gBossActive = gLoadLevelObjects = 0; } if (gCsFrameCount == 940) { player->unk_1D0++; @@ -6195,14 +6197,14 @@ void Macbeth_801AF8F4(Player* player) { gFillScreenAlphaStep = 8; D_ctx_80177A48[0] = 0.0f; player->unk_234 = 1; - player->camAt.x = gCsCamAtX = player->camEye.x = gCsCamEyeX = player->pos.x; - player->camAt.y = gCsCamAtY = player->pos.y + 70.0f; - player->camEye.y = gCsCamEyeY = player->pos.y + 30.0f; - player->camEye.z = gCsCamEyeZ = (player->unk_138 + D_ctx_80177D20) - 300.0f; - player->camAt.z = gCsCamAtZ = player->unk_138 + D_ctx_80177D20; + player->cam.at.x = gCsCamAtX = player->cam.eye.x = gCsCamEyeX = player->pos.x; + player->cam.at.y = gCsCamAtY = player->pos.y + 70.0f; + player->cam.eye.y = gCsCamEyeY = player->pos.y + 30.0f; + player->cam.eye.z = gCsCamEyeZ = (player->unk_138 + D_ctx_80177D20) - 300.0f; + player->cam.at.z = gCsCamAtZ = player->unk_138 + D_ctx_80177D20; player->savedCockpitView = player->timer_210 = 0; player->unk_190 = player->unk_194 = player->unk_188 = player->unk_18C = player->unk_118 = - player->unk_114 = player->unk_4D8 = player->unk_034 = player->unk_174 = player->unk_178 = + player->unk_114 = player->unk_4D8 = player->camRoll = player->unk_174 = player->unk_178 = player->unk_17C = player->unk_180 = player->unk_184 = player->wings.unk_04 = player->unk_170 = player->unk_16C = player->unk_0F0 = player->unk_080 = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = player->unk_130 = player->unk_12C = @@ -6229,7 +6231,7 @@ void Macbeth_801AF8F4(Player* player) { if ((gCsFrameCount >= 1059) && (gCsFrameCount < 2120)) { Math_SmoothStepToF(&D_ctx_80177A48[0], 1.0f, 1.0f, 0.005f, 0.0f); Math_SmoothStepToF(&D_ctx_80177A48[3], 1080.0f, 0.1f, D_ctx_80177A48[0] * 1.2f, 0.0f); - Matrix_RotateY(gCalcMatrix, -D_ctx_80177A48[3] * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, -D_ctx_80177A48[3] * M_DTOR, MTXF_NEW); spE4.x = 0.0f; spE4.y = 0.0f; spE4.z = -300.0f; @@ -6270,7 +6272,7 @@ void Macbeth_801AF8F4(Player* player) { Math_SmoothStepToF(&gCsCamAtZ, gActors[3].obj.pos.z + D_ctx_80177D20 - 300.0f, 0.1f, 20.0f, 0.0f); Math_SmoothStepToF(&gCsCamAtY, gActors[3].obj.pos.y + 100.0f, 0.1f, 10.0f, 0.0f); } else { - player->camAt.z = gCsCamAtZ = player->unk_138 + D_ctx_80177D20; + player->cam.at.z = gCsCamAtZ = player->unk_138 + D_ctx_80177D20; } Math_SmoothStepToF(&player->pos.y, 260.0f, 0.1f, D_ctx_80177A48[7], 0.0f); break; @@ -6422,21 +6424,21 @@ void Macbeth_801AF8F4(Player* player) { } else { Math_SmoothStepToF(&player->unk_114, 0.0f, 0.03f, 0.5f, 0.0001f); } - Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_ctx_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_ctx_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_ctx_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_ctx_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_ctx_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_ctx_80177A48[0], 20000.0f, 0); - player->camAt.y += zeroVar; + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 20000.0f, 0); + player->cam.at.y += zeroVar; if (player->unk_1D0 >= 6) { - player->camEye.y += gCameraShakeY * 10.0f; + player->cam.eye.y += gCameraShakeY * 10.0f; } if (gCsFrameCount > 2500) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; gFillScreenAlphaTarget = 255; if (gFillScreenAlpha == 255) { - player->state_1C8 = PLAYERSTATE_1C8_6; + player->state_1C8 = PLAYERSTATE_1C8_NEXT; D_ctx_8017837C = 4; func_play_800A6148(); Audio_FadeOutAll(10); @@ -6461,7 +6463,7 @@ void Macbeth_801B28BC(Actor* actor) { switch (actor->state) { case 10: actor->fwork[3] += D_i5_801BA864; - Matrix_RotateY(gCalcMatrix, actor->fwork[3] * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, actor->fwork[3] * M_DTOR, MTXF_NEW); sp5C.x = 0.0f; sp5C.y = D_i5_801BA884; sp5C.z = D_i5_801BA894[4]; @@ -6507,9 +6509,9 @@ void Macbeth_801B28BC(Actor* actor) { Math_SmoothStepToF(&actor->fwork[9], 22.0f, 0.05f, 0.2f, 0.0f); if (actor->obj.rot.x <= -115.0f) { Math_SmoothStepToF(&actor->obj.rot.z, 800.0f, 0.1f, 18.0f, 0.0f); - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, MTXF_APPLY); sp5C.x = 0.0f; sp5C.y = 70.0f; sp5C.z = -70.0f; @@ -6544,9 +6546,9 @@ void Macbeth_801B28BC(Actor* actor) { actor->fwork[29] = 3.0f; Math_SmoothStepToF(&actor->obj.rot.z, 405.0f, 0.1f, 10.0f, 0.0f); if (actor->timer_0BC == 0) { - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, MTXF_APPLY); sp5C.x = 0.0f; sp5C.y = 70.0f; sp5C.z = -70.0f; @@ -6570,7 +6572,7 @@ void Macbeth_801B28BC(Actor* actor) { break; case 30: actor->fwork[3] += D_i5_801BA854[actor->index]; - Matrix_RotateY(gCalcMatrix, actor->fwork[3] * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, actor->fwork[3] * M_DTOR, MTXF_NEW); sp5C.x = 0.0f; sp5C.y = D_i5_801BA874[actor->index]; sp5C.z = D_i5_801BA894[actor->index]; @@ -6601,8 +6603,8 @@ void Macbeth_801B28BC(Actor* actor) { Math_SmoothStepToF(&actor->obj.rot.z, 0.0f, 0.1f, 0.5f, 0.0f); break; } - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); sp5C.x = 0.0f; sp5C.y = 0.0f; sp5C.z = actor->fwork[9]; @@ -6686,7 +6688,7 @@ void Macbeth_801B38E0(void) { s16 j; for (i = 0; i < 65; i++) { - gRadarMarks[i].unk_00 = 0; + gRadarMarks[i].status = 0; } for (i = 0; i < 100; i++) { @@ -6755,7 +6757,7 @@ void Macbeth_801B3D04(Player* player) { gCsCamEyeZ = player->pos.z + player->unk_144 + 50.0f; switch (player->unk_1D0) { case 0: - gCsFrameCount = gBossActive = D_ctx_80178488 = 1; + gCsFrameCount = gBossActive = gLoadLevelObjects = 1; D_i5_801BA894[4] = 80.0f; D_i5_801BA894[3] = D_i5_801BA894[4]; D_i5_801BA894[2] = D_i5_801BA894[4]; @@ -6795,12 +6797,12 @@ void Macbeth_801B3D04(Player* player) { gFillScreenAlpha = gFillScreenAlphaTarget = D_ctx_80177A10[9]; if (gCsFrameCount > 40) { D_ctx_80177A10[9] = 255; - player->camEye.x = gCsCamEyeX = 0.0f; - player->camEye.y = gCsCamEyeY = 21.182106f; - player->camEye.z = gCsCamEyeZ = -112.08748f; - player->camAt.x = gCsCamAtX = 0.0f; - player->camAt.y = gCsCamAtY = 22.873417f; - player->camAt.z = gCsCamAtZ = -283.55914f; + player->cam.eye.x = gCsCamEyeX = 0.0f; + player->cam.eye.y = gCsCamEyeY = 21.182106f; + player->cam.eye.z = gCsCamEyeZ = -112.08748f; + player->cam.at.x = gCsCamAtX = 0.0f; + player->cam.at.y = gCsCamAtY = 22.873417f; + player->cam.at.z = gCsCamAtZ = -283.55914f; player->unk_1D0++; player->pos.x = 0.0f; player->pos.y = -3.0f; @@ -6983,16 +6985,16 @@ void Macbeth_801B3D04(Player* player) { break; case 1200: Macbeth_801B3554(&gActors[3], 3); - D_ctx_80178488 = 0; + gLoadLevelObjects = 0; break; } - Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_ctx_80177A48[0], D_i5_801BE240, 0.0f); - Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_ctx_80177A48[0], D_i5_801BE244, 0.0f); - Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_ctx_80177A48[0], D_i5_801BE248, 0.0f); - Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_ctx_80177A48[0], D_i5_801BE240, 0.0f); - Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_ctx_80177A48[0], D_i5_801BE244, 0.0f); - Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_ctx_80177A48[0], D_i5_801BE248, 0.0f); - player->camAt.y += zeroVar; + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], D_i5_801BE240, 0.0f); + Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], D_i5_801BE244, 0.0f); + Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], D_i5_801BE248, 0.0f); + Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], D_i5_801BE240, 0.0f); + Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], D_i5_801BE244, 0.0f); + Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], D_i5_801BE248, 0.0f); + player->cam.at.y += zeroVar; if ((gCsFrameCount >= 850) && ((gGameFrameCount % 16) == 0)) { Macbeth_801ACF6C(); @@ -7005,7 +7007,7 @@ void Macbeth_801B3D04(Player* player) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; gFillScreenAlphaTarget = 255; if (gFillScreenAlpha == 255) { - player->state_1C8 = PLAYERSTATE_1C8_6; + player->state_1C8 = PLAYERSTATE_1C8_NEXT; D_ctx_8017837C = 4; func_play_800A6148(); Audio_FadeOutAll(10); diff --git a/src/overlays/ovl_i5/fox_ti.c b/src/overlays/ovl_i5/fox_ti.c index 61b9ef58..9f1786e4 100644 --- a/src/overlays/ovl_i5/fox_ti.c +++ b/src/overlays/ovl_i5/fox_ti.c @@ -93,8 +93,8 @@ void Titania_80188F60(Effect* effect) { } void Titania_80188FA8(Effect* effect) { - Matrix_Scale(gGfxMatrix, effect->scale2 * 0.5f, effect->scale2, effect->scale2, 1); - Matrix_RotateX(gGfxMatrix, -(M_DTOR * 90), 1); + Matrix_Scale(gGfxMatrix, effect->scale2 * 0.5f, effect->scale2, effect->scale2, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -(M_DTOR * 90), MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, effect->unk_44); @@ -185,15 +185,15 @@ void Titania_80189380(Actor* actor) { sp44.y = gPlayer[0].pos.y - actor->obj.pos.y; sp44.z = gPlayer[0].pos.z - actor->obj.pos.z; - Matrix_RotateZ(gCalcMatrix, -actor->obj.rot.z * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -actor->obj.rot.x * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -actor->obj.rot.y * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, -actor->obj.rot.z * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -actor->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -actor->obj.rot.y * M_DTOR, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &sp44, &sp8C); - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &sp50, &sp8C); @@ -281,12 +281,12 @@ void Titania_801895B8(Actor* actor) { actor->obj.rot.z -= 2.0f; } - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_Push(&gCalcMatrix); if (((actor->iwork[2] % 2) == 0) && ((actor->obj.pos.z + D_ctx_80177D20) > -3800.0f)) { - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, 1); + Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_i5_801B752C, &sp48); Titania_80189120(actor->obj.pos.x + sp48.x, actor->obj.pos.y + sp48.y, actor->obj.pos.z + sp48.z, actor->obj.pos.y, 1.3f); @@ -338,9 +338,9 @@ void Titania_80189B80(Actor* actor) { Ground_801B6E20(actor->obj.pos.x, actor->obj.pos.z + D_ctx_80177D20, &sp2C, &actor->obj.pos.y, &sp2C); actor->health = 10; actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_TI_60068F0); - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &D_i5_801B7544, (Vec3f*) &actor->fwork[0]); actor->fwork[0] += actor->obj.pos.x; actor->fwork[1] += actor->obj.pos.y; @@ -377,9 +377,9 @@ void Titania_80189CC8(Actor* actor) { sp4C.x = gPlayer[0].pos.x - actor->obj.pos.x; sp4C.y = (gPlayer[0].pos.y + 30.0f) - actor->obj.pos.y; sp4C.z = gPlayer[0].pos.z - actor->obj.pos.z; - Matrix_RotateZ(gCalcMatrix, -actor->obj.rot.z * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -actor->obj.rot.x * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -actor->obj.rot.y * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, -actor->obj.rot.z * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -actor->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -actor->obj.rot.y * M_DTOR, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &sp4C, &sp64); sp58.x = sp64.x - D_i5_801B7550.x; sp58.y = sp64.y - D_i5_801B7550.y; @@ -405,9 +405,9 @@ void Titania_80189CC8(Actor* actor) { } } - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &D_i5_801B7550, &sp64); @@ -431,9 +431,9 @@ void Titania_80189CC8(Actor* actor) { void Titania_8018A1C0(Actor* actor) { gSPDisplayList(gMasterDisp++, D_TI1_700C4B0); - Matrix_Translate(gGfxMatrix, 0.0f, -50.0f, 178.0f, 1); - Matrix_RotateY(gGfxMatrix, actor->fwork[4] * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, actor->fwork[3] * M_DTOR, 1); + Matrix_Translate(gGfxMatrix, 0.0f, -50.0f, 178.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, actor->fwork[4] * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, actor->fwork[3] * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if (actor->health != 0) { gSPDisplayList(gMasterDisp++, D_TI1_700B9C0); @@ -598,7 +598,7 @@ void Titania_8018A544(Actor* actor) { void Titania_8018AABC(Actor* actor) { if (actor->scale != 1.0f) { - Matrix_Scale(gGfxMatrix, actor->scale, actor->scale, actor->scale, 1); + Matrix_Scale(gGfxMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); } gSPDisplayList(gMasterDisp++, D_TI1_700E3F0); @@ -680,7 +680,7 @@ void Titania_8018ADC4(Actor* actor) { actor->obj.pos.y = sp58; - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_i5_801B75AC, &sp68[0]); Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_i5_801B75B8, &sp68[1]); @@ -723,11 +723,11 @@ bool Titania_8018AFD4(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* bool Titania_8018AFF0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { if ((limbIndex == 2) || (limbIndex == 3) || (limbIndex == 4)) { - Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, 1); - Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, 1); - Matrix_Mult(gGfxMatrix, gCalcMatrix, 1); + Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, MTXF_APPLY); + Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL(&gMasterDisp, 0x21); gSPDisplayList(gMasterDisp++, *dList); @@ -799,7 +799,7 @@ void Titania_8018B268(Actor* actor) { break; case 1: - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); if ((actor->unk_0B6 >= 26) && (actor->unk_0B6 <= 53) && (sp3C != NULL)) { if (actor->unk_0B6 == 26) { sp3C->unk_046 = 2; @@ -886,7 +886,7 @@ void Titania_8018B720(Actor* actor) { s32 i; Vec3f sp70; - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); var_s1 = SEGMENTED_TO_VIRTUAL(D_i5_801BDA30); @@ -1054,7 +1054,7 @@ void Titania_8018BE84(Actor* actor) { RCP_SetupDL(&gMasterDisp, 0x1E); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); - Matrix_Scale(gGfxMatrix, 1.5f, 1.5f, 1.5f, 1); + Matrix_Scale(gGfxMatrix, 1.5f, 1.5f, 1.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_TI1_7009D60); RCP_SetupDL(&gMasterDisp, 0x22); @@ -1116,12 +1116,12 @@ bool Titania_8018C134(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* for (i = 0; i < 9; i++) { if (limbIndex == D_i5_801B7630[i * 2]) { if (!(D_i5_801BD738[sp50][i].unk_18 & 1)) { - Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, 1); + Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, MTXF_APPLY); sp58 = true; - Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, 1); - Matrix_Mult(gGfxMatrix, gCalcMatrix, 1); + Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, MTXF_APPLY); + Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if ((limbIndex == 13) && (actor->iwork[5] & 2) && (actor->iwork[6] == 0)) { RCP_SetupDL(&gMasterDisp, 0x1E); @@ -1383,9 +1383,9 @@ void Titania_8018C8A8(Actor* actor) { actor->state = 2; } actor->fwork[15] = 0.0f; - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 0); - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, 1); + Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, (Vec3f*) &actor->fwork[12], &sp8C); actor->fwork[12] = sp8C.x; actor->fwork[13] = sp8C.y; @@ -1467,7 +1467,7 @@ void Titania_8018C8A8(Actor* actor) { actor->unk_0B6 = 0; } if ((actor->fwork[4] > 0.0f) || (actor->fwork[7] > 0.0f)) { - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, &D_i5_801B766C, &sp158); actor->obj.pos.x += sp158.x; actor->obj.pos.z += sp158.z; @@ -1539,9 +1539,9 @@ void Titania_8018C8A8(Actor* actor) { &gIdentityMatrix); actor->vwork[0].y = temp_fs0; if (actor->unk_0B6 == 21) { - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, (Vec3f*) &actor->fwork[12], &sp158); func_effect_8007A900(actor->obj.pos.x + sp158.x, actor->obj.pos.y + sp158.y, actor->obj.pos.z + sp158.z, @@ -1559,9 +1559,9 @@ void Titania_8018C8A8(Actor* actor) { } if ((actor->timer_0BC % 8) == 0) { - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, (Vec3f*) &actor->fwork[12], &sp158); func_effect_8007D2C8(actor->obj.pos.x + sp158.x, actor->obj.pos.y + sp158.y, actor->obj.pos.z + sp158.z, 1.5f); @@ -1597,9 +1597,9 @@ void Titania_8018C8A8(Actor* actor) { AUDIO_PLAY_SFX(0x2940C00A, actor->sfxSource, 4); gCameraShake = 20; gControllerRumbleTimers[0] = 16; - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, MTXF_APPLY); func_effect_8007D2C8(actor->obj.pos.x, actor->fwork[27] + actor->obj.pos.y, actor->obj.pos.z, 15.0f); var_s1 = D_i5_801BD738[actor->iwork[0]]; @@ -1731,7 +1731,7 @@ void Titania_8018E3CC(Actor* actor) { actor->iwork[0] = (uintptr_t) actorPtr; actorPtr->fwork[6] = D_i5_801B7518[0]; actorPtr->obj.rot.x = (D_i5_801B7518[0] + D_i5_801B7518[1]) * 0.5f; - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, &D_i5_801B7678, &sp34); actorPtr->obj.pos.x = actor->fwork[0] = actor->obj.pos.x + sp34.x; actorPtr->obj.pos.y = actor->fwork[1] = actor->obj.pos.y + sp34.y; @@ -1862,8 +1862,8 @@ void Titania_8018E5F8(Actor* actor) { break; } if ((actor->state == 0) || (actor->state == 1)) { - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); sp90.x = 0.0f; sp90.y = 39.0f; sp90.z = 115.0f; @@ -1999,8 +1999,8 @@ void Titania_8018EFF0(Sprite* sprite) { } void Titania_Cactus_Update(Sprite* sprite) { - sprite->obj.rot.y = Math_Atan2F(gPlayer[0].camEye.x - sprite->obj.pos.x, - gPlayer[0].camEye.z - (sprite->obj.pos.z + D_ctx_80177D20)) * + sprite->obj.rot.y = Math_Atan2F(gPlayer[0].cam.eye.x - sprite->obj.pos.x, + gPlayer[0].cam.eye.z - (sprite->obj.pos.z + D_ctx_80177D20)) * M_RTOD; if (sprite->unk_46 != 0) { func_effect_8007D074(sprite->obj.pos.x, sprite->obj.pos.y + 96.0f, sprite->obj.pos.z, 4.0f); @@ -2040,8 +2040,8 @@ void Titania_8018F134(Object_80* obj80) { switch (obj80->unk_44) { case 0: - Matrix_RotateY(gCalcMatrix, obj80->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, obj80->obj.rot.x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, obj80->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, obj80->obj.rot.x * M_DTOR, MTXF_APPLY); if ((obj80->obj.rot.y <= 30.0f) || (obj80->obj.rot.y >= 330.0f)) { for (*j = -80.0f; *j <= 80.0f; *j += 40.0f) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_i5_801B7690, &sp70); @@ -2056,8 +2056,8 @@ void Titania_8018F134(Object_80* obj80) { } for (i = 0.0f; i <= 450.0f; i += 50.0f) { - Matrix_RotateY(gCalcMatrix, obj80->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, obj80->obj.rot.x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, obj80->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, obj80->obj.rot.x * M_DTOR, MTXF_APPLY); sp7C.y = i; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp7C, &sp70); func_effect_8007A900(obj80->obj.pos.x + sp70.x, obj80->obj.pos.y + sp70.y, @@ -2066,7 +2066,7 @@ void Titania_8018F134(Object_80* obj80) { } break; case 1: - Matrix_RotateZ(gCalcMatrix, obj80->obj.rot.z * M_DTOR, 0); + Matrix_RotateZ(gCalcMatrix, obj80->obj.rot.z * M_DTOR, MTXF_NEW); sp7C.z = 0.0f; sp7C.x = 0.0f; for (i = 0.0f; i <= 450.0f; i += 50.0f) { @@ -2164,10 +2164,10 @@ void Titania_8018F8B8(Object_80* obj80) { case 2: if (obj80->obj.rot.z != 0.0f) { if (obj80->obj.rot.z > 0.0f) { - Matrix_Translate(gGfxMatrix, 75.0f, 0.0f, 0.0f, 1); + Matrix_Translate(gGfxMatrix, 75.0f, 0.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); } else { - Matrix_Translate(gGfxMatrix, -75.0f, 0.0f, 0.0f, 1); + Matrix_Translate(gGfxMatrix, -75.0f, 0.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); } } @@ -2246,8 +2246,8 @@ bool Titania_8018FC70(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* } switch (limbIndex) { case 0: - Matrix_Translate(gCalcMatrix, D_i5_801BBEF4[36], D_i5_801BBEF4[37], D_i5_801BBEF4[38], 1); - Matrix_RotateY(gCalcMatrix, D_i5_801BBEF4[64] * M_DTOR, 1); + Matrix_Translate(gCalcMatrix, D_i5_801BBEF4[36], D_i5_801BBEF4[37], D_i5_801BBEF4[38], MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, D_i5_801BBEF4[64] * M_DTOR, MTXF_APPLY); break; case 1: case 2: @@ -2255,11 +2255,11 @@ bool Titania_8018FC70(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* rot->z += D_i5_801BBEF4[66]; break; } - Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, 1); - Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, 1); - Matrix_Mult(gGfxMatrix, gCalcMatrix, 1); + Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, MTXF_APPLY); + Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); switch (limbIndex) { case 1: @@ -2501,17 +2501,17 @@ void Titania_8019002C(s32 limbIndex, Vec3f* rot, void* data) { } if (limbIndex == 7) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 180.0f, 36.0f, 0.0f, 1); - Matrix_RotateX(gGfxMatrix, -(M_DTOR * 90.0f), 1); - Matrix_RotateZ(gGfxMatrix, -(M_DTOR * 90.0f), 1); + Matrix_Translate(gGfxMatrix, 180.0f, 36.0f, 0.0f, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -(M_DTOR * 90.0f), MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, -(M_DTOR * 90.0f), MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ENMY_PLANET_40018A0); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -47.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -47.0f, MTXF_APPLY); Matrix_GetYRPAngles(gGfxMatrix, &sp64); - Matrix_RotateZ(gGfxMatrix, -sp64.z * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, -sp64.x * M_DTOR, 1); - Matrix_RotateY(gGfxMatrix, -sp64.y * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, D_i5_801BBEF4[74], D_i5_801BBEF4[74], 1.0f, 1); + Matrix_RotateZ(gGfxMatrix, -sp64.z * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -sp64.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, -sp64.y * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, D_i5_801BBEF4[74], D_i5_801BBEF4[74], 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL(&gMasterDisp, 0x48); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); @@ -2529,11 +2529,11 @@ bool Titania_801903A0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* if (limbIndex == 0) { if (D_i5_801BBEF0[25] == 1) { - Matrix_Translate(gCalcMatrix, D_i5_801BBEF4[39], D_i5_801BBEF4[40], D_i5_801BBEF4[41], 1); - Matrix_RotateY(gCalcMatrix, D_i5_801BBEF4[54] * M_DTOR, 1); + Matrix_Translate(gCalcMatrix, D_i5_801BBEF4[39], D_i5_801BBEF4[40], D_i5_801BBEF4[41], MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, D_i5_801BBEF4[54] * M_DTOR, MTXF_APPLY); } else { - Matrix_Translate(gCalcMatrix, D_i5_801BBEF4[42], D_i5_801BBEF4[43], D_i5_801BBEF4[44], 1); - Matrix_RotateY(gCalcMatrix, D_i5_801BBEF4[56] * M_DTOR, 1); + Matrix_Translate(gCalcMatrix, D_i5_801BBEF4[42], D_i5_801BBEF4[43], D_i5_801BBEF4[44], MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, D_i5_801BBEF4[56] * M_DTOR, MTXF_APPLY); } } if (D_i5_801BBEF0[25] == 1) { @@ -2549,11 +2549,11 @@ bool Titania_801903A0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* rot->z += SIN_DEG((D_i5_801BBEF0[34] / (f32) D_i5_801BBEF0[36]) * 360.0f) * sp24; } } - Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, 1); - Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, 1); - Matrix_Mult(gGfxMatrix, gCalcMatrix, 1); + Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, MTXF_APPLY); + Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); switch (limbIndex) { case 1: @@ -2733,8 +2733,8 @@ bool Titania_80190A08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* break; case 2: if (sp88 == 0) { - Matrix_RotateZ(gCalcMatrix, sp9C * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, sp9C * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, sp9C * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, sp9C * M_DTOR, MTXF_APPLY); } break; case 3: @@ -2745,11 +2745,11 @@ bool Titania_80190A08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* break; } } - Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, 1); + Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, MTXF_APPLY); if (sp88 != 0) { - Matrix_RotateZ(gCalcMatrix, D_i5_801BBF00[i].unk_20 * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, D_i5_801BBF00[i].unk_1C * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, D_i5_801BBF00[i].unk_18 * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, D_i5_801BBF00[i].unk_20 * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, D_i5_801BBF00[i].unk_1C * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, D_i5_801BBF00[i].unk_18 * M_DTOR, MTXF_APPLY); } else { rot->z += D_i5_801BBF00[i].unk_20; rot->y += D_i5_801BBF00[i].unk_1C; @@ -2757,9 +2757,9 @@ bool Titania_80190A08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* } if (sp88 != 0) { Matrix_Push(&gCalcMatrix); - Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, MTXF_APPLY); Matrix_GetYRPAngles(gCalcMatrix, &sp8C); Matrix_MultVec3f(gCalcMatrix, &D_tank_800C9F2C, &sp7C); @@ -2781,9 +2781,9 @@ bool Titania_80190A08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* } Matrix_Pop(&gCalcMatrix); - Matrix_RotateZ(gCalcMatrix, -(spCC.z * M_DTOR), 1); - Matrix_RotateX(gCalcMatrix, -(spCC.x * M_DTOR), 1); - Matrix_RotateY(gCalcMatrix, -(spCC.y * M_DTOR), 1); + Matrix_RotateZ(gCalcMatrix, -(spCC.z * M_DTOR), MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, -(spCC.x * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -(spCC.y * M_DTOR), MTXF_APPLY); switch (limbIndex) { case 55: if (D_i5_801BBEF0[15] == 1) { @@ -2843,13 +2843,13 @@ bool Titania_80190A08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* Math_SmoothStepToAngle(&sp8C.z, D_i5_801BBEF4[16], boss->fwork[38], 360.0f, 0.01f); break; } - Matrix_RotateY(gCalcMatrix, (sp8C.y + sp9C) * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, (sp8C.z + sp9C) * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, sp8C.x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, (sp8C.y + sp9C) * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, (sp8C.z + sp9C) * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, sp8C.x * M_DTOR, MTXF_APPLY); } else { - Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, MTXF_APPLY); } sp6C = 0; if ((limbIndex == 51) || (limbIndex == 66)) { @@ -2857,7 +2857,7 @@ bool Titania_80190A08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* sp68 = 1.1f - (fabsf(__sinf(((f32) D_i5_801BBEF0[0] / D_i5_801BBEF0[1]) * 360.0f * M_DTOR))) * D_i5_801BBEF4[0]; Matrix_Push(&gCalcMatrix); - Matrix_Scale(gCalcMatrix, sp68, sp68, sp68, 1); + Matrix_Scale(gCalcMatrix, sp68, sp68, sp68, MTXF_APPLY); sp6C = 1; } } @@ -2865,17 +2865,17 @@ bool Titania_80190A08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* switch (spA8) { case 1: Matrix_Push(&gCalcMatrix); - Matrix_Translate(gCalcMatrix, spC0.x, spC0.y, spC0.z, 1); + Matrix_Translate(gCalcMatrix, spC0.x, spC0.y, spC0.z, MTXF_APPLY); break; case 4: Matrix_Push(&gCalcMatrix); - Matrix_Translate(gCalcMatrix, 40.0f, 0.0f, 0.0f, 1); - Matrix_RotateZ(gCalcMatrix, padB4.z * M_DTOR, 1); - Matrix_Translate(gCalcMatrix, -40.0f, 0.0f, 0.0f, 1); + Matrix_Translate(gCalcMatrix, 40.0f, 0.0f, 0.0f, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, padB4.z * M_DTOR, MTXF_APPLY); + Matrix_Translate(gCalcMatrix, -40.0f, 0.0f, 0.0f, MTXF_APPLY); break; } } - Matrix_Mult(gGfxMatrix, gCalcMatrix, 1); + Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); sp58 = 0; switch (D_i5_801B7770[i][1]) { @@ -3015,17 +3015,17 @@ void Titania_80191AE8(s32 limbIndex, Vec3f* rot, void* data) { case 55: if (D_i5_801BBEF0[8] == 0) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 180.0f, 36.0f, 0.0f, 1); - Matrix_RotateX(gGfxMatrix, -(M_DTOR * 90.0f), 1); - Matrix_RotateZ(gGfxMatrix, -(M_DTOR * 90.0f), 1); + Matrix_Translate(gGfxMatrix, 180.0f, 36.0f, 0.0f, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -(M_DTOR * 90.0f), MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, -(M_DTOR * 90.0f), MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ENMY_PLANET_40018A0); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -47.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -47.0f, MTXF_APPLY); Matrix_GetYRPAngles(gGfxMatrix, &sp78); - Matrix_RotateZ(gGfxMatrix, -sp78.z * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, -sp78.x * M_DTOR, 1); - Matrix_RotateY(gGfxMatrix, -sp78.y * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, D_i5_801BBEF4[74], D_i5_801BBEF4[74], 1.0f, 1); + Matrix_RotateZ(gGfxMatrix, -sp78.z * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -sp78.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, -sp78.y * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, D_i5_801BBEF4[74], D_i5_801BBEF4[74], 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL(&gMasterDisp, 0x48); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); @@ -3661,7 +3661,7 @@ void Titania_80193DF0(Boss* boss) { Vec3f sp90; Vec3f sp84; - Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, MTXF_NEW); for (i = 0; i < ARRAY_COUNTU(D_i5_801BBF00); i++) { if (D_i5_801BBF00[i].unk_26 & 0x10) { @@ -3699,7 +3699,7 @@ void Titania_80193DF0(Boss* boss) { actor->obj.rot.y = boss->obj.rot.y + D_i5_801BBF00[i].unk_00.rot.y; actor->obj.rot.z = boss->obj.rot.z + D_i5_801BBF00[i].unk_00.rot.z; Matrix_Push(&gCalcMatrix); - Matrix_RotateY(gCalcMatrix, 0.0f, 0); + Matrix_RotateY(gCalcMatrix, 0.0f, MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, &D_i5_801B8D18, &spC8); Matrix_Pop(&gCalcMatrix); actor->vel.x = spC8.x; @@ -3716,7 +3716,7 @@ void Titania_80193DF0(Boss* boss) { actor->obj.rot.y = boss->obj.rot.y + D_i5_801BBF00[i].unk_00.rot.y; actor->obj.rot.z = boss->obj.rot.z + D_i5_801BBF00[i].unk_00.rot.z; Matrix_Push(&gCalcMatrix); - Matrix_RotateY(gCalcMatrix, RAND_FLOAT(360.0f) * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, RAND_FLOAT(360.0f) * M_DTOR, MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, &D_i5_801B8D0C, &spC8); Matrix_Pop(&gCalcMatrix); actor->vel.x = spC8.x; @@ -4059,7 +4059,7 @@ void Titania_80193DF0(Boss* boss) { boss->swork[28]++; break; case 10: - Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, MTXF_NEW); spA4 = 0; for (i = 0; i < 33; i++) { actor = D_i5_801B8198[i].actor; @@ -4662,7 +4662,7 @@ void Titania_80193DF0(Boss* boss) { if ((boss->fwork[15] <= 0.0f) && (boss->fwork[9] > 0.0f)) { effect = func_effect_8007783C(OBJ_EFFECT_394); if (effect != NULL) { - Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, (Vec3f*) &boss->fwork[8], &spC8); effect->obj.status = OBJ_ACTIVE; effect->unk_78 = effect->unk_7A = 0; @@ -4679,7 +4679,7 @@ void Titania_80193DF0(Boss* boss) { if ((boss->fwork[12] <= 0.0f) && (boss->fwork[6] > 0.0f)) { effect = func_effect_8007783C(OBJ_EFFECT_394); if (effect != NULL) { - Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, (Vec3f*) &boss->fwork[5], &spC8); effect->obj.status = OBJ_ACTIVE; effect->unk_78 = effect->unk_7A = 0; @@ -5004,8 +5004,8 @@ void Titania_801982A8(Boss* boss) { RCP_SetupDL(&gMasterDisp, 0x45); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 0); - Matrix_RotateX(gGfxMatrix, -1.5707964f, 1); - Matrix_Scale(gGfxMatrix, boss->fwork[47] * 10.0f, boss->fwork[47] * 10.0f, 1.0f, 1); + Matrix_RotateX(gGfxMatrix, -1.5707964f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, boss->fwork[47] * 10.0f, boss->fwork[47] * 10.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); Matrix_Pop(&gGfxMatrix); @@ -5021,8 +5021,8 @@ void Titania_801982A8(Boss* boss) { RCP_SetupDL(&gMasterDisp, 0x45); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 0); - Matrix_RotateX(gGfxMatrix, -1.5707964f, 1); - Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 1.0f, 1); + Matrix_RotateX(gGfxMatrix, -1.5707964f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); Matrix_Pop(&gGfxMatrix); @@ -5031,7 +5031,7 @@ void Titania_801982A8(Boss* boss) { if (boss->state == 11) { if (boss->swork[24] != 0) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, boss->fwork[17], boss->fwork[18], boss->fwork[19] + 50.0f, 1); + Matrix_Translate(gGfxMatrix, boss->fwork[17], boss->fwork[18], boss->fwork[19] + 50.0f, MTXF_APPLY); RCP_SetupDL_14(); for (i = 0; i < 3; i++) { sp120 = (boss->fwork[43] + i) / 3.0f; @@ -5042,8 +5042,8 @@ void Titania_801982A8(Boss* boss) { (s32) ((temp_fv0 * 155.0f) + 100.0f)); for (j = 0; j < 360; j += 45) { Matrix_Push(&gGfxMatrix); - Matrix_RotateZ(gGfxMatrix, (j + boss->fwork[43] * 360.0f) * M_DTOR, 1); - Matrix_Translate(gGfxMatrix, temp_fs2, 0.0f, 0.0f, 1); + Matrix_RotateZ(gGfxMatrix, (j + boss->fwork[43] * 360.0f) * M_DTOR, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, temp_fs2, 0.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_Gfx_800D94D0); Matrix_Pop(&gGfxMatrix); @@ -5051,22 +5051,22 @@ void Titania_801982A8(Boss* boss) { } Matrix_Pop(&gGfxMatrix); } - Matrix_Translate(gGfxMatrix, boss->fwork[17], boss->fwork[18], boss->fwork[19], 1); + Matrix_Translate(gGfxMatrix, boss->fwork[17], boss->fwork[18], boss->fwork[19], MTXF_APPLY); if (D_i5_801BBEF0[7] != 0) { Matrix_Push(&gGfxMatrix); sp120 = D_i5_801BBEF0[7] * 16.0f; RCP_SetupDL(&gMasterDisp, 0x40); - Matrix_RotateX(gGfxMatrix, 1.5707964f, 1); + Matrix_RotateX(gGfxMatrix, 1.5707964f, MTXF_APPLY); Matrix_Push(&gGfxMatrix); - Matrix_Scale(gGfxMatrix, sp120, 1.0f, sp120, 1); + Matrix_Scale(gGfxMatrix, sp120, 1.0f, sp120, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 120, 255, 220, D_i5_801BBEF0[7] * 50); gSPDisplayList(gMasterDisp++, D_BG_PLANET_20112C0); Matrix_Pop(&gGfxMatrix); if (D_i5_801BBEF0[7] > 0) { sp120 = (D_i5_801BBEF0[7] - 1) * 24.0f; - Matrix_Scale(gGfxMatrix, sp120, 1.0f, sp120, 1); + Matrix_Scale(gGfxMatrix, sp120, 1.0f, sp120, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 120, 255, 220, D_i5_801BBEF0[7] * 50); gSPDisplayList(gMasterDisp++, D_BG_PLANET_20112C0); @@ -5077,10 +5077,11 @@ void Titania_801982A8(Boss* boss) { if (D_i5_801BBEF0[16] > 0) { temp = D_i5_801BBEF0[16] - 1; Matrix_Push(&gGfxMatrix); - Matrix_RotateY(gGfxMatrix, (boss->fwork[21] - 90.0f) * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, (boss->fwork[22] - 180.0f) * M_DTOR, 1); - Matrix_RotateZ(gGfxMatrix, (boss->fwork[20] + ((boss->unk_04C - 15) * 15.6f)) * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, D_i5_801B8D5C[temp], D_i5_801B8D5C[temp], D_i5_801B8D5C[temp + 25], 1); + Matrix_RotateY(gGfxMatrix, (boss->fwork[21] - 90.0f) * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, (boss->fwork[22] - 180.0f) * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, (boss->fwork[20] + ((boss->unk_04C - 15) * 15.6f)) * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, D_i5_801B8D5C[temp], D_i5_801B8D5C[temp], D_i5_801B8D5C[temp + 25], + MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL(&gMasterDisp, 0x31); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 178); @@ -5090,10 +5091,11 @@ void Titania_801982A8(Boss* boss) { } if (D_i5_801BBEF0[17] > 0) { Matrix_Push(&gGfxMatrix); - Matrix_RotateY(gGfxMatrix, (boss->fwork[21] - 90.0f) * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, (boss->fwork[22] - 180.0f) * M_DTOR, 1); - Matrix_RotateZ(gGfxMatrix, (boss->fwork[20] + ((boss->unk_04C - 15) * 15.6f)) * M_DTOR * 3.0f, 1); - Matrix_Scale(gGfxMatrix, 4.0f, 4.0f, 4.0f, 1); + Matrix_RotateY(gGfxMatrix, (boss->fwork[21] - 90.0f) * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, (boss->fwork[22] - 180.0f) * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, (boss->fwork[20] + ((boss->unk_04C - 15) * 15.6f)) * M_DTOR * 3.0f, + MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 4.0f, 4.0f, 4.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL(&gMasterDisp, 0x31); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) ((D_i5_801BBEF0[17] * 89.0f) / 3.0f)); @@ -5105,26 +5107,27 @@ void Titania_801982A8(Boss* boss) { if (boss->swork[25] != 0) { sp120 = boss->fwork[41] / 40.0f; temp_fs2 = boss->fwork[42] / 700.0f; - Matrix_RotateY(gGfxMatrix, (boss->fwork[21] - 90.0f) * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, (boss->fwork[22] - 180.0f) * M_DTOR, 1); - Matrix_RotateZ(gGfxMatrix, (boss->fwork[20] - ((s32) (boss->swork[38] % 8U) * 43.0f)) * M_DTOR, 1); + Matrix_RotateY(gGfxMatrix, (boss->fwork[21] - 90.0f) * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, (boss->fwork[22] - 180.0f) * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, (boss->fwork[20] - ((s32) (boss->swork[38] % 8U) * 43.0f)) * M_DTOR, + MTXF_APPLY); Matrix_Push(&gGfxMatrix); - Matrix_Scale(gGfxMatrix, half * sp120, half * sp120, temp_fs2, 1); + Matrix_Scale(gGfxMatrix, half * sp120, half * sp120, temp_fs2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL(&gMasterDisp, 0x48); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 178); gDPSetEnvColor(gMasterDisp++, 0, 128, 60, 0); gSPDisplayList(gMasterDisp++, D_TI_8000D90); Matrix_Pop(&gGfxMatrix); - Matrix_Scale(gGfxMatrix, sp120, sp120, temp_fs2, 1); + Matrix_Scale(gGfxMatrix, sp120, sp120, temp_fs2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPPipeSync(gMasterDisp++); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 64); gDPSetEnvColor(gMasterDisp++, 0, 128, 110, 0); gSPDisplayList(gMasterDisp++, D_TI_8000D90); - Matrix_RotateY(gCalcMatrix, (boss->fwork[21] - 90.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, (boss->fwork[22] - 180.0f) * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, (boss->fwork[20] + boss->fwork[42]) * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, (boss->fwork[21] - 90.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, (boss->fwork[22] - 180.0f) * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, (boss->fwork[20] + boss->fwork[42]) * M_DTOR, MTXF_APPLY); temp_fs0 = boss->obj.pos.x + boss->fwork[17]; temp_fs1 = boss->obj.pos.y + boss->fwork[18]; temp_fs2 = boss->obj.pos.z + boss->fwork[19]; @@ -5187,7 +5190,7 @@ void Titania_801990DC(Boss* boss) { actor->state = 40; actor->unk_046 = D_i5_801B7770[i][5]; actor->unk_048 = D_i5_801B7770[i][1]; - Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, &D_i5_801BBF00[i].unk_00.pos, &sp60); actor->obj.pos.x = boss->obj.pos.x + sp60.x; actor->obj.pos.y = boss->obj.pos.y + sp60.y; @@ -5204,7 +5207,7 @@ void Titania_801990DC(Boss* boss) { actor->fwork[0] = ((Rand_ZeroOne() < 0.5f) ? -1 : 1) * (RAND_FLOAT(5.0f) + 5.0f); actor->fwork[1] = ((Rand_ZeroOne() < 0.5f) ? -1 : 1) * (RAND_FLOAT(5.0f) + 5.0f); Matrix_Push(&gCalcMatrix); - Matrix_RotateY(gCalcMatrix, RAND_FLOAT(360.0f) * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, RAND_FLOAT(360.0f) * M_DTOR, MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, &D_i5_801B8E44, &sp60); Matrix_Pop(&gCalcMatrix); actor->vel.x = sp60.x; @@ -5285,9 +5288,9 @@ void Titania_801990DC(Boss* boss) { } break; } - if ((boss->timer_050 == 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3)) { + if ((boss->timer_050 == 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { Object_Kill(&boss->obj, boss->sfxSource); - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_7; + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].unk_1D0 = 0; } } diff --git a/src/overlays/ovl_i5/fox_ti_cs.c b/src/overlays/ovl_i5/fox_ti_cs.c index 203a9b20..56b74c9c 100644 --- a/src/overlays/ovl_i5/fox_ti_cs.c +++ b/src/overlays/ovl_i5/fox_ti_cs.c @@ -66,13 +66,13 @@ void Titania_8018769C(Player* player) { player->pos.y = actor->obj.pos.y - 530.0f; player->pos.z = actor->obj.pos.z; - player->camEye.x = gCsCamEyeX = 5000.0f; - player->camEye.y = gCsCamEyeY = 1000.0f; - player->camEye.z = gCsCamEyeZ = -5000.0f; + player->cam.eye.x = gCsCamEyeX = 5000.0f; + player->cam.eye.y = gCsCamEyeY = 1000.0f; + player->cam.eye.z = gCsCamEyeZ = -5000.0f; - player->camAt.x = gCsCamAtX = player->pos.x; - player->camAt.y = gCsCamAtY = player->pos.y; - player->camAt.z = gCsCamAtZ = player->pos.z; + player->cam.at.x = gCsCamAtX = player->pos.x; + player->cam.at.y = gCsCamAtY = player->pos.y; + player->cam.at.z = gCsCamAtZ = player->pos.z; player->unk_240 = 1; player->unk_1D0 = 1; @@ -141,9 +141,9 @@ void Titania_8018769C(Player* player) { player->pos.y = 2000.0f; player->vel.z = 0.0f; - player->camAt.x = gCsCamAtX = player->pos.x; - player->camAt.y = gCsCamAtY = player->pos.y; - player->camAt.z = gCsCamAtZ = player->pos.z; + player->cam.at.x = gCsCamAtX = player->pos.x; + player->cam.at.y = gCsCamAtY = player->pos.y; + player->cam.at.z = gCsCamAtZ = player->pos.z; gPlayer[0].unk_19C = 1; @@ -158,7 +158,7 @@ void Titania_8018769C(Player* player) { *D_ctx_80177A10 = 0; - Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[2] * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[2] * M_DTOR, MTXF_NEW); sp54.x = 0.0f; sp54.y = 30.0f; @@ -168,18 +168,18 @@ void Titania_8018769C(Player* player) { gCsCamEyeX = sp48.x; - player->camEye.x = sp48.x; + player->cam.eye.x = sp48.x; gCsCamEyeY = sp48.y; - player->camEye.y = sp48.y; - player->camEye.z = gCsCamEyeZ = player->pos.z + player->unk_144 + sp48.z; + player->cam.eye.y = sp48.y; + player->cam.eye.z = gCsCamEyeZ = player->pos.z + player->unk_144 + sp48.z; } break; case 3: Math_SmoothStepToF(&D_ctx_80177A48[2], 0.0f, 0.1f, 4.0f, 0.0f); - Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[2] * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[2] * M_DTOR, MTXF_NEW); sp54.x = 0.0f; sp54.y = 30.0f; @@ -192,9 +192,9 @@ void Titania_8018769C(Player* player) { gCsCamEyeZ = player->pos.z + player->unk_144 + sp48.z; gCsCamAtX = player->pos.x; - player->camAt.x = gCsCamAtX; - player->camAt.y = gCsCamAtY = player->pos.y; - player->camAt.z = gCsCamAtZ = player->pos.z + player->unk_144; + player->cam.at.x = gCsCamAtX; + player->cam.at.y = gCsCamAtY = player->pos.y; + player->cam.at.z = gCsCamAtZ = player->pos.z + player->unk_144; Math_SmoothStepToF(&player->pos.y, D_ctx_80177A48[1], 0.1f, 50.0f, 0.0f); @@ -220,7 +220,7 @@ void Titania_8018769C(Player* player) { if (gCsFrameCount == 580) { gLevelStatusScreenTimer = 50; - player->state_1C8 = PLAYERSTATE_1C8_3; + player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_1D0 = player->timer_1F8 = player->timer_1FC = player->unk_240 = 0; player->unk_0D4 = 3.0f; player->unk_014 = 0.0f; @@ -239,12 +239,12 @@ void Titania_8018769C(Player* player) { player->pos.z += player->vel.z; player->unk_138 = player->pos.z; - Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_ctx_80177A48[0], sp64, 0.00f); - Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_ctx_80177A48[0], sp64, 0.00f); - Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_ctx_80177A48[0], sp64, 0.00f); - Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_ctx_80177A48[0], sp64, 0.00f); - Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_ctx_80177A48[0], sp64, 0.00f); - Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_ctx_80177A48[0], sp64, 0.00f); + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], sp64, 0.00f); + Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], sp64, 0.00f); + Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], sp64, 0.00f); + Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], sp64, 0.00f); + Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], sp64, 0.00f); + Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], sp64, 0.00f); } void Titania_80188108(Actor* actor, s32 arg1) { @@ -291,7 +291,7 @@ void Titania_801882CC(Player* player) { switch (player->unk_1D0) { case 0: - gCsFrameCount = gBossActive = D_ctx_80178488 = 0; + gCsFrameCount = gBossActive = gLoadLevelObjects = 0; func_play_800A6148(); @@ -328,8 +328,8 @@ void Titania_801882CC(Player* player) { D_ctx_80177A48[2] = D_ctx_80177A48[1] + D_ctx_80177A48[2]; - Matrix_RotateX(gCalcMatrix, -10.0f * M_DTOR, 0); - Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[2] * M_DTOR, 1); + Matrix_RotateX(gCalcMatrix, -10.0f * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[2] * M_DTOR, MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; @@ -503,14 +503,14 @@ void Titania_801882CC(Player* player) { break; } - Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_ctx_80177A48[0], 20000.0f, 0.00f); - Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_ctx_80177A48[0], 20000.0f, 0.00f); - Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_ctx_80177A48[0], 20000.0f, 0.00f); - Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_ctx_80177A48[0], 20000.0f, 0.00f); - Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_ctx_80177A48[0], 20000.0f, 0.00f); - Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_ctx_80177A48[0], 20000.0f, 0.00f); + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 20000.0f, 0.00f); + Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 20000.0f, 0.00f); + Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 20000.0f, 0.00f); + Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 20000.0f, 0.00f); + Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 20000.0f, 0.00f); + Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 20000.0f, 0.00f); - player->camAt.y += camAtY; + player->cam.at.y += camAtY; if (gCsFrameCount == 1380) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 60); @@ -522,7 +522,7 @@ void Titania_801882CC(Player* player) { gFillScreenAlphaTarget = 255; if (gFillScreenAlpha == 255) { - player->state_1C8 = PLAYERSTATE_1C8_6; + player->state_1C8 = PLAYERSTATE_1C8_NEXT; D_ctx_8017837C = 4; func_play_800A6148(); Audio_FadeOutAll(10); diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index 632260b3..f9e6e368 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -7,6 +7,7 @@ #include "assets/ast_bg_planet.h" #include "prevent_bss_reordering.h" #include "prevent_bss_reordering2.h" + f32 D_i6_801A7F5C; f32 D_i6_801A7F64; f32 D_i6_801A7F6C; @@ -289,8 +290,8 @@ void Andross_801880E4(Actor* actor) { actor->obj.rot.y = actor->unk_0F4.y; actor->obj.rot.x = -actor->unk_0F4.x; - Matrix_RotateY(gCalcMatrix, actor->unk_0F4.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -actor->unk_0F4.x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, actor->unk_0F4.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -actor->unk_0F4.x * M_DTOR, MTXF_APPLY); sp48.x = 0; sp48.y = 0; sp48.z = actor->fwork[0]; @@ -330,19 +331,19 @@ void Andross_80188528(Actor* actor) { } else if (actor->timer_0BC == 0) { Object_Kill(&actor->obj, actor->sfxSource); } - actor->obj.rot.y = RAD_TO_DEG(-gPlayer[0].unk_058); - actor->obj.rot.x = RAD_TO_DEG(gPlayer[0].unk_05C); + actor->obj.rot.y = RAD_TO_DEG(-gPlayer[0].camYaw); + actor->obj.rot.x = RAD_TO_DEG(gPlayer[0].camPitch); actor->unk_0F4.z += actor->fwork[0]; } void Andross_80188660(Actor* actor) { RCP_SetupDL(&gMasterDisp, 0x3D); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); - Matrix_RotateZ(gGfxMatrix, actor->unk_0F4.z * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, 1.1f, 0.9f, 1.0f, 1); - Matrix_RotateZ(gGfxMatrix, -actor->unk_0F4.z * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, 1.1f, 0.9f, 1.0f, 1); - Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 1.0f, 1); + Matrix_RotateZ(gGfxMatrix, actor->unk_0F4.z * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 1.1f, 0.9f, 1.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, -actor->unk_0F4.z * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 1.1f, 0.9f, 1.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_VE2_6009300); } @@ -425,7 +426,7 @@ void Andross_80188A4C(Boss* boss) { gScreenFlashTimer = 8; AUDIO_PLAY_SFX(0x2940D09AU, boss->sfxSource, 4); func_boss_80042EC0(boss); - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_0; + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_STANDBY; boss->state = 20; boss->swork[1] = 1000; boss->swork[2] = 1000; @@ -503,7 +504,7 @@ void Andross_80188CB8(Boss* boss) { } } boss->fwork[14] += boss->fwork[15]; - Matrix_RotateY(gCalcMatrix, -gPlayer[0].unk_058, 0); + Matrix_RotateY(gCalcMatrix, -gPlayer[0].camYaw, MTXF_NEW); sp50.x = boss->vel.z * 0.25f; sp50.y = 0.0f; sp50.z = boss->vel.x * 0.25f; @@ -574,17 +575,17 @@ void Andross_80189214(void) { gLevelMode = LEVELMODE_ON_RAILS; player->unk_204 = 0; gPlayer[0].pos.x = 0.0f; - player->camEye.z = 400.0f; - player->camAt.z = player->camEye.z - 1000.0f; + player->cam.eye.z = 400.0f; + player->cam.at.z = player->cam.eye.z - 1000.0f; player->unk_148 = player->unk_14C = 0.74f; - player->camEye.y = player->pos.y * player->unk_14C + 10.0f; - player->camEye.x = player->pos.x * player->unk_148; + player->cam.eye.y = player->pos.y * player->unk_14C + 10.0f; + player->cam.eye.x = player->pos.x * player->unk_148; D_ctx_80177DC8 = 0; // FAKE if (1) {} PRINTF("FO_Game_Sw %d\n"); - player->camAt.x = 0.0f; - player->camAt.y = 0.0f; + player->cam.at.x = 0.0f; + player->cam.at.y = 0.0f; player->unk_114 = 0.0f; player->unk_144 = 0.0f; D_ctx_80177D20 = 0.0f; @@ -626,7 +627,7 @@ void Andross_80189470(Actor* actor) { s32 i; Player* player = &gPlayer[0]; - if ((D_ctx_80177AB0 != 7) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) && + if ((D_ctx_80177AB0 != 7) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 9000.0f) && (fabsf(actor->obj.pos.z - gPlayer[0].unk_138) < 9000.0f)) { D_ctx_80177AB0 = 7; @@ -635,25 +636,25 @@ void Andross_80189470(Actor* actor) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 20); } - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) && (fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 500.0f) && + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 500.0f) && (fabsf(actor->obj.pos.z - gPlayer[0].unk_138) < 500.0f)) { Audio_KillSfxById(0x11403076); Audio_SetBaseSfxReverb(0); gCurrentLevel = LEVEL_VENOM_2; gLevelStage = 1; D_play_800D2F68 = 1; - player->state_1C8 = PLAYERSTATE_1C8_7; + player->state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; player->unk_1D0 = 3; player->unk_144 = D_ctx_80177D20 = 0.0f; D_ctx_80177AB0 = D_ctx_80177A98 = 1; - player->camEye.x = 1200.0f; - player->camEye.z = 1200.0f; - player->camEye.y = 1800.0f; + player->cam.eye.x = 1200.0f; + player->cam.eye.z = 1200.0f; + player->cam.eye.y = 1800.0f; gCsCamAtX = 0.0f; gCsCamAtY = 620.0f; gCsCamAtZ = 0.0f; player->unk_234 = 0; - player->unk_034 = 0.0f; + player->camRoll = 0.0f; D_ctx_80177A48[0] = 1.0f; func_play_800A6148(); @@ -680,12 +681,12 @@ void Andross_80189724(Actor* actor) { if ((fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 2000.0f) && (fabsf(actor->obj.pos.z - gPlayer[0].unk_138) < 2000.0f)) { - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); vec.x = 0.0f; vec.y = 0.0f; vec.z = -30.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &vec, &vel); - Matrix_RotateZ(gCalcMatrix, 2.0f * RAND_FLOAT(M_PI), 1); + Matrix_RotateZ(gCalcMatrix, 2.0f * RAND_FLOAT(M_PI), MTXF_APPLY); vec.x = RAND_FLOAT(300.0f); vec.y = 0.0f; vec.z = 0.0f; @@ -701,7 +702,7 @@ void Andross_80189724(Actor* actor) { } if ((fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 500.0f) && (fabsf(actor->obj.pos.z - gPlayer[0].unk_138) < 500.0f)) { - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3 || gPlayer[0].state_1C8 == PLAYERSTATE_1C8_5)) { + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE || gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { gPlayer[0].shields = 0; gRightWingHealth[0] = gLeftWingHealth[0] = 0; Player_ApplyDamage(&gPlayer[0], 1, 60); @@ -711,7 +712,7 @@ void Andross_80189724(Actor* actor) { } } if (actor->timer_0BC == 1) { - func_demo_8004D440(&gPlayer[0]); + Cutscene_KillPlayer(&gPlayer[0]); } } @@ -805,14 +806,14 @@ void Andross_80189B70(Boss* boss) { boss->fwork[19] = -26.0f; boss->swork[5] = 100; if (boss->timer_050 == 0) { - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_9; + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_START_360; gPlayer[0].unk_1D0 = 0; boss->state = 1; gPlayer[0].unk_240 = 1; } break; case 1: - if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_9) && (boss->timer_050 == 0)) { + if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_START_360) && (boss->timer_050 == 0)) { boss->fwork[2] = 1.6f; boss->timer_050 = RAND_INT(1.0f) * 50.0f + 50; boss->fwork[3] = RAND_FLOAT_CENTERED(10000.0f); @@ -841,7 +842,7 @@ void Andross_80189B70(Boss* boss) { gPlayer[0].timer_224 = gGameFrameCount % 8U; gPlayer[0].timer_220 = 3; Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 40.0f, 1.0f, 3.0f, 0.0f); - if (((gGameFrameCount % 32) == 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3)) { + if (((gGameFrameCount % 32) == 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { Player_ApplyDamage(&gPlayer[0], 3, 10); } } @@ -889,7 +890,7 @@ void Andross_80189B70(Boss* boss) { if ((boss->fwork[22] < 1.0f) && (boss->timer_050 == 0)) { xDisplacement = boss->fwork[3] - boss->obj.pos.x; zDisplacement = boss->fwork[5] - boss->obj.pos.z; - Matrix_RotateY(gCalcMatrix, Math_Atan2F(xDisplacement, zDisplacement), 0); + Matrix_RotateY(gCalcMatrix, Math_Atan2F(xDisplacement, zDisplacement), MTXF_NEW); vec.x = 0.0f; vec.y = 0.0f; vec.z = 4000.0f; @@ -917,7 +918,7 @@ void Andross_80189B70(Boss* boss) { boss->obj.rot.z += 0.2f; boss->obj.rot.x += 0.1f; boss->obj.pos.y -= 3.0f; - Matrix_RotateY(gCalcMatrix, -gPlayer[0].unk_058, 0U); + Matrix_RotateY(gCalcMatrix, -gPlayer[0].camYaw, 0U); vec.x = RAND_FLOAT_CENTERED(700.0f); vec.y = RAND_FLOAT_CENTERED(300.0f); vec.z = 500.0f; @@ -935,13 +936,13 @@ void Andross_80189B70(Boss* boss) { Matrix_MultVec3f(gCalcMatrix, &vec, &sp64); Math_SmoothStepToF(&D_ctx_80177A48[0], 100.0f, 1.0f, 2.0f, 0.0f); Math_SmoothStepToF(&D_ctx_80177A48[1], 100.0f, 1.0f, 10.0f, 0.0f); - Math_SmoothStepToF(&gPlayer[0].camEye.x, boss->obj.pos.x + sp64.x, 0.02f, D_ctx_80177A48[0], 0.0f); - Math_SmoothStepToF(&gPlayer[0].camEye.y, boss->obj.pos.y + sp64.y, 0.02f, D_ctx_80177A48[0], 0.0f); - Math_SmoothStepToF(&gPlayer[0].camEye.z, boss->obj.pos.z + sp64.z, 0.02f, D_ctx_80177A48[0], 0.0f); - Math_SmoothStepToF(&gPlayer[0].camAt.x, boss->obj.pos.x, 0.05f, D_ctx_80177A48[1], 0.0f); - Math_SmoothStepToF(&gPlayer[0].camAt.y, boss->obj.pos.y, 0.05f, D_ctx_80177A48[1], 0.0f); - Math_SmoothStepToF(&gPlayer[0].camAt.z, boss->obj.pos.z, 0.05f, D_ctx_80177A48[1], 0.0f); - Math_SmoothStepToF(&gPlayer[0].unk_034, 0.0f, 0.5f, 0.5f, 0.0f); + Math_SmoothStepToF(&gPlayer[0].cam.eye.x, boss->obj.pos.x + sp64.x, 0.02f, D_ctx_80177A48[0], 0.0f); + Math_SmoothStepToF(&gPlayer[0].cam.eye.y, boss->obj.pos.y + sp64.y, 0.02f, D_ctx_80177A48[0], 0.0f); + Math_SmoothStepToF(&gPlayer[0].cam.eye.z, boss->obj.pos.z + sp64.z, 0.02f, D_ctx_80177A48[0], 0.0f); + Math_SmoothStepToF(&gPlayer[0].cam.at.x, boss->obj.pos.x, 0.05f, D_ctx_80177A48[1], 0.0f); + Math_SmoothStepToF(&gPlayer[0].cam.at.y, boss->obj.pos.y, 0.05f, D_ctx_80177A48[1], 0.0f); + Math_SmoothStepToF(&gPlayer[0].cam.at.z, boss->obj.pos.z, 0.05f, D_ctx_80177A48[1], 0.0f); + Math_SmoothStepToF(&gPlayer[0].camRoll, 0.0f, 0.5f, 0.5f, 0.0f); if (gCsFrameCount == 50) { Radio_PlayMessage(gMsg_ID_19335, RCID_ANDROSS_RED); @@ -1007,8 +1008,8 @@ void Andross_80189B70(Boss* boss) { gPlayer[0].unk_110 = gPlayer[0].unk_4D8 = gPlayer[0].unk_0E8 = gPlayer[0].unk_0E4 = gPlayer[0].unk_0EC = 0.0f; gPlayer[0].unk_12C = 150.0f; - gPlayer[0].unk_034 = -90.0f; - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_7; + gPlayer[0].camRoll = -90.0f; + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].unk_1D0 = 100; gPlayer[0].timer_1F8 = 240; gPlayer[0].unk_234 = 1; @@ -1042,7 +1043,7 @@ void Andross_80189B70(Boss* boss) { } boss->obj.pos.y = 10000.0f; - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) && ((gGameFrameCount % 4) == 0)) { + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && ((gGameFrameCount % 4) == 0)) { Matrix_RotateY(gCalcMatrix, (gPlayer[0].unk_114 + gPlayer[0].unk_0E8) * M_DTOR, 0U); vec.x = RAND_FLOAT_CENTERED(800.0f); vec.y = 600.0f; @@ -1050,13 +1051,13 @@ void Andross_80189B70(Boss* boss) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &vec, &sp64); Andross_80189B00(gPlayer[0].pos.x + sp64.x, sp64.y, gPlayer[0].unk_138 + sp64.z, 1.2f); } - if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_0) { - Matrix_RotateY(gCalcMatrix, -gPlayer[0].unk_058, 0); + if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_STANDBY) { + Matrix_RotateY(gCalcMatrix, -gPlayer[0].camYaw, MTXF_NEW); vec.x = 0.0f; vec.y = 0.0f; vec.z = -50.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &vec, &sp58); - Matrix_RotateZ(gCalcMatrix, 2.0f * RAND_FLOAT(M_PI), 1); + Matrix_RotateZ(gCalcMatrix, 2.0f * RAND_FLOAT(M_PI), MTXF_APPLY); vec.x = RAND_FLOAT(50.0f) + 120.0f; vec.y = 0.0f; vec.z = 0.0f; @@ -1073,8 +1074,8 @@ void Andross_80189B70(Boss* boss) { sp98 = 1; if (!(gGameFrameCount & frameCountMask)) { for (i = 0; i < sp98; i++) { - func_effect_8007797C(gPlayer[0].camEye.x + sp64.x, gPlayer[0].camEye.y + sp64.y, - gPlayer[0].camEye.z + sp64.z, sp58.x, sp58.y, sp58.z, + func_effect_8007797C(gPlayer[0].cam.eye.x + sp64.x, gPlayer[0].cam.eye.y + sp64.y, + gPlayer[0].cam.eye.z + sp64.z, sp58.x, sp58.y, sp58.z, RAND_FLOAT(2.5f) + 2.5f); } } @@ -1090,9 +1091,9 @@ void Andross_80189B70(Boss* boss) { 0.1f, boss->fwork[2], 0.0f); Math_SmoothStepToAngle(&boss->unk_078.y, yaw, 0.1f, boss->fwork[2], 0.0f); if (boss->swork[4] != 0) { - Math_SmoothStepToAngle(&boss->obj.rot.y, Math_RadToDeg(-gPlayer[0].unk_058), 0.3f, 5.0f, 0.0f); + Math_SmoothStepToAngle(&boss->obj.rot.y, Math_RadToDeg(-gPlayer[0].camYaw), 0.3f, 5.0f, 0.0f); } else if (boss->timer_054 == 0) { - Math_SmoothStepToAngle(&boss->obj.rot.y, Math_RadToDeg(-gPlayer[0].unk_058), 0.3f, 1.5f, 0.0f); + Math_SmoothStepToAngle(&boss->obj.rot.y, Math_RadToDeg(-gPlayer[0].camYaw), 0.3f, 1.5f, 0.0f); } Math_SmoothStepToF(&boss->fwork[0], boss->fwork[1], 0.2f, 1.0f, 0.00001f); Matrix_RotateY(gCalcMatrix, boss->unk_078.y * M_DTOR, 0U); @@ -1105,8 +1106,8 @@ void Andross_80189B70(Boss* boss) { boss->vel.y = sp64.y; boss->vel.z = sp64.z - D_ctx_80177D08; if (boss->state < 20) { - gRadarMarks[59].unk_00 = 1; - gRadarMarks[59].unk_02 = 102; + gRadarMarks[59].status = 1; + gRadarMarks[59].type = 102; gRadarMarks[59].pos.x = boss->obj.pos.x; gRadarMarks[59].pos.y = boss->obj.pos.y; gRadarMarks[59].pos.z = boss->obj.pos.z; @@ -1158,22 +1159,23 @@ bool Andross_8018B47C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return false; } if ((limbIndex == 1) || (limbIndex == 2)) { - Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, 1); - Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, 1); + Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, MTXF_APPLY); if (*dList != NULL) { Matrix_Push(&gGfxMatrix); Matrix_Push(&gCalcMatrix); - Matrix_Mult(gGfxMatrix, gCalcMatrix, 1); + Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); if (limbIndex == 1) { - Matrix_RotateY(gGfxMatrix, -boss->fwork[14] * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, boss->fwork[16] + 1.0f, 1.0f, 1.0f - boss->fwork[16], 1); - Matrix_RotateY(gGfxMatrix, boss->fwork[14] * M_DTOR, 1); + Matrix_RotateY(gGfxMatrix, -boss->fwork[14] * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, boss->fwork[16] + 1.0f, 1.0f, 1.0f - boss->fwork[16], MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, boss->fwork[14] * M_DTOR, MTXF_APPLY); } else { - Matrix_RotateY(gGfxMatrix, boss->fwork[14] * 1.5f * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, 2.0f * boss->fwork[16] + 1.0f, 1.0f, 1.0f - 2.0f * boss->fwork[16], 1); - Matrix_RotateY(gGfxMatrix, -boss->fwork[14] * 1.5f * M_DTOR, 1); + Matrix_RotateY(gGfxMatrix, boss->fwork[14] * 1.5f * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 2.0f * boss->fwork[16] + 1.0f, 1.0f, 1.0f - 2.0f * boss->fwork[16], + MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, -boss->fwork[14] * 1.5f * M_DTOR, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); if (((boss->swork[3] % 2) != 0) && (boss->fwork[21] >= 254.0f)) { @@ -1199,11 +1201,11 @@ void Andross_8018B8C0(Boss* boss) { Vec3f spA0; if (boss->state != 21) { - Matrix_RotateZ(gGfxMatrix, -(f32) gGameFrameCount * 20.0f * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, boss->fwork[23] + 1.0f, 1.0f - boss->fwork[23], 1.0f, 1); - Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 20.0f * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, boss->fwork[23] + 1.0f, 1.0f - boss->fwork[23], 1.0f, 1); - Matrix_Scale(gGfxMatrix, boss->unk_3F8, boss->unk_3F8, boss->unk_3F8, 1); + Matrix_RotateZ(gGfxMatrix, -(f32) gGameFrameCount * 20.0f * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, boss->fwork[23] + 1.0f, 1.0f - boss->fwork[23], 1.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 20.0f * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, boss->fwork[23] + 1.0f, 1.0f - boss->fwork[23], 1.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, boss->unk_3F8, boss->unk_3F8, boss->unk_3F8, MTXF_APPLY); Animation_DrawSkeleton(0, D_VE2_600C0A4, boss->vwork, Andross_8018B47C, NULL, boss, &gIdentityMatrix); if (boss->fwork[21] >= 254) { RCP_SetupDL(&gMasterDisp, 0x36); @@ -1213,8 +1215,8 @@ void Andross_8018B8C0(Boss* boss) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 64, 64, (s32) boss->fwork[21]); } gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - Matrix_Translate(gGfxMatrix, 0.0f, -16.0f, 0.0f, 1); - Matrix_Scale(gGfxMatrix, 0.3f, 0.6f, 0.3f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, -16.0f, 0.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.3f, 0.6f, 0.3f, MTXF_APPLY); for (i = 0; i < 30; i++) { Matrix_Push(&gGfxMatrix); @@ -1223,16 +1225,16 @@ void Andross_8018B8C0(Boss* boss) { spAC.y = 0.0f; spAC.z = i * 0.8f; Matrix_MultVec3f(gCalcMatrix, &spAC, &spA0); - Matrix_Translate(gGfxMatrix, spA0.x, 10.0f, spA0.z, 1); - Matrix_RotateY(gGfxMatrix, M_DTOR * -boss->obj.rot.y - gPlayer[0].unk_058, 1); + Matrix_Translate(gGfxMatrix, spA0.x, 10.0f, spA0.z, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_DTOR * -boss->obj.rot.y - gPlayer[0].camYaw, MTXF_APPLY); for (j = 0; j < 10; j++) { - Matrix_Translate(gGfxMatrix, 0.0f, -10.0f, 0.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, -10.0f, 0.0f, MTXF_APPLY); temp = SIN_DEG((s32) boss->fwork[19] * (i * 10 + j) + (gGameFrameCount * 5)) * boss->fwork[10]; - Matrix_RotateZ(gGfxMatrix, (boss->fwork[18] + temp) * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, boss->fwork[17] * M_DTOR, 1); + Matrix_RotateZ(gGfxMatrix, (boss->fwork[18] + temp) * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, boss->fwork[17] * M_DTOR, MTXF_APPLY); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, -5.0f, 0.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, -5.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if (j == 9) { gSPDisplayList(gMasterDisp++, D_VE2_600C2D0); @@ -1299,12 +1301,12 @@ void Andross_8018C390(Player* player) { Math_SmoothStepToF(&player->pos.y, gBosses[0].obj.pos.y - 150.0f, 0.5f, 30.0f, 0); Math_SmoothStepToF(&player->pos.z, gBosses[0].obj.pos.z - 100.0f, 0.5f, 60.0f, 0); D_ctx_80177D20 = player->unk_144 = -player->pos.z; - Math_SmoothStepToF(&player->camEye.z, 2000.0f, 0.05f, 20.0f, 0); - Math_SmoothStepToF(&player->camEye.x, 0.0f, 0.05f, 10.0f, 0); - Math_SmoothStepToF(&player->camEye.y, 0.0f, 0.05f, 10.0f, 0); - Math_SmoothStepToF(&player->camAt.x, 0.0f, 0.05f, 10.0f, 0); - Math_SmoothStepToF(&player->camAt.y, 0.0f, 0.05f, 10.0f, 0); - Math_SmoothStepToF(&player->camAt.z, 100.0f, 0.05f, 10.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.z, 2000.0f, 0.05f, 20.0f, 0); + Math_SmoothStepToF(&player->cam.eye.x, 0.0f, 0.05f, 10.0f, 0); + Math_SmoothStepToF(&player->cam.eye.y, 0.0f, 0.05f, 10.0f, 0); + Math_SmoothStepToF(&player->cam.at.x, 0.0f, 0.05f, 10.0f, 0); + Math_SmoothStepToF(&player->cam.at.y, 0.0f, 0.05f, 10.0f, 0); + Math_SmoothStepToF(&player->cam.at.z, 100.0f, 0.05f, 10.0f, 0.0f); break; case 1: player->unk_0E4 += 15.0f; @@ -1316,14 +1318,14 @@ void Andross_8018C390(Player* player) { if (player->unk_0E8 > 180.0f) { player->unk_0E8 -= 360.0f; } - Math_SmoothStepToF(&player->camEye.z, 400.0f, 0.05f, 20.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.z, 400.0f, 0.05f, 20.0f, 0.0f); if (player->timer_1F8 != 0) { if (gControllerPress[gMainController].button != 0) { player->timer_1F8--; } } if (player->timer_1F8 == 0) { - player->state_1C8 = PLAYERSTATE_1C8_3; + player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_014 = 0.0f; player->unk_018 = 0.0f; } @@ -1455,8 +1457,8 @@ void Andross_8018CAD4(Effect* effect) { yaw = Math_Atan2F(sp3C - effectXpos, sp34 - effectZpos); sp40 = sqrtf(SQ(sp3C - effectXpos) + SQ(sp34 - effectZpos)); pitch = -Math_Atan2F(sp38 - effectYpos, sp40); - Matrix_RotateY(gCalcMatrix, yaw, 0); - Matrix_RotateX(gCalcMatrix, pitch, 1); + Matrix_RotateY(gCalcMatrix, yaw, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, pitch, MTXF_APPLY); vec.x = 0.0f; vec.y = 0.0f; vec.z = 30.0f; @@ -1533,13 +1535,13 @@ void Andross_8018CF98(Effect* effect) { if (effect->state == 10) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, effect->unk_44); - Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, 1); + Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_BG_PLANET_2010A30); } else { RCP_SetupDL(&gMasterDisp, 0x1D); if (effect->unk_4C < 8) { - Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, 1); + Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); } gSPDisplayList(gMasterDisp++, D_i6_801A6790[effect->unk_4C]); @@ -1548,7 +1550,7 @@ void Andross_8018CF98(Effect* effect) { } void Andross_8018D0D8(Boss* boss) { - if ((gPlayer[0].timer_498 == 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) && + if ((gPlayer[0].timer_498 == 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (fabsf(boss->vwork[10].x - gPlayer[0].pos.x) < 700.0f) && (fabsf(boss->vwork[10].y - gPlayer[0].pos.y) < 700.0f)) { Player_ApplyDamage(&gPlayer[0], 0, 40); @@ -1599,7 +1601,7 @@ void Andross_8018D2B0(Boss* boss) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); boss->state = 31; boss->timer_050 = 200; - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_7; + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].unk_1D0 = 0; } else if (boss->health < 50) { AUDIO_PLAY_SFX(0x2943500F, boss->sfxSource, 4); @@ -1911,7 +1913,7 @@ void Andross_8018DBF0(Boss* boss) { Math_SmoothStepToF(&D_i6_801A8430, gAmbientB, 1.0f, 2.0f, 0.0f); } Math_SmoothStepToF(&D_bg_800C9C30, 32.0f, 1.0f, 0.5f, 0.0f); - Math_SmoothStepToF(&player->unk_034, 0.0f, 0.2f, 3.0f, 0); + Math_SmoothStepToF(&player->camRoll, 0.0f, 0.2f, 3.0f, 0); boss->fwork[8] = 0.1f; Math_SmoothStepToF(&boss->fwork[7], 200.0f, 1.0f, 10.0f, 0); if (boss->timer_052 == 0) { @@ -2269,11 +2271,11 @@ void Andross_8018DBF0(Boss* boss) { } if ((boss->unk_04C > 35) && (boss->unk_04C < 150) && ((boss->unk_04C % 32) == 0)) { AUDIO_PLAY_SFX(0x29022089, boss->sfxSource, 4); - if (player->state_1C8 == PLAYERSTATE_1C8_11) { + if (player->state_1C8 == PLAYERSTATE_1C8_ANDROSS_MOUTH) { gControllerRumbleTimers[0] = 10; } } - if ((boss->unk_04C == 20) && (player->state_1C8 == PLAYERSTATE_1C8_11)) { + if ((boss->unk_04C == 20) && (player->state_1C8 == PLAYERSTATE_1C8_ANDROSS_MOUTH)) { player->unk_234 = 0; for (i = 0; i < ARRAY_COUNT(gEffects); i++) { if (gEffects[i].obj.id == OBJ_EFFECT_396) { @@ -2328,7 +2330,7 @@ void Andross_8018DBF0(Boss* boss) { if (boss->unk_04C == 10) { AUDIO_PLAY_SFX(0x3140208A, boss->sfxSource, 4); } - if ((boss->unk_04C == 13) && (player->state_1C8 == PLAYERSTATE_1C8_11)) { + if ((boss->unk_04C == 13) && (player->state_1C8 == PLAYERSTATE_1C8_ANDROSS_MOUTH)) { player->unk_234 = 1; player->unk_1D0 = 1; player->timer_1F8 = 60; @@ -2367,9 +2369,9 @@ void Andross_8018DBF0(Boss* boss) { boss->timer_056 = 50; if ((boss->timer_050 > 70) && (boss->timer_050 < 1000) && ((gGameFrameCount % 4) == 0)) { - Andross_8018C734(gPlayer[0].camEye.x + RAND_FLOAT_CENTERED(3000.0f), - gPlayer[0].camEye.y + RAND_FLOAT_CENTERED(3000.0f), - gPlayer[0].camEye.z - D_ctx_80177D20, RAND_INT(7.9)); + Andross_8018C734(gPlayer[0].cam.eye.x + RAND_FLOAT_CENTERED(3000.0f), + gPlayer[0].cam.eye.y + RAND_FLOAT_CENTERED(3000.0f), + gPlayer[0].cam.eye.z - D_ctx_80177D20, RAND_INT(7.9)); } if (boss->timer_050 > 0) { playerShot = gPlayerShots; @@ -2415,8 +2417,8 @@ void Andross_8018DBF0(Boss* boss) { boss->swork[8] = 1; boss->fwork[9] = 0.2f; boss->unk_04C = 0; - if (player->state_1C8 == PLAYERSTATE_1C8_3) { - player->state_1C8 = PLAYERSTATE_1C8_11; + if (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) { + player->state_1C8 = PLAYERSTATE_1C8_ANDROSS_MOUTH; player->unk_1D0 = 0; } break; @@ -2944,14 +2946,14 @@ bool Andross_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* pos->x -= boss->fwork[11]; pos->y += boss->fwork[12]; pos->z += boss->fwork[13]; - Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, 1); - Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, 1); + Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, MTXF_APPLY); if (*dList != NULL) { Matrix_Push(&gGfxMatrix); Matrix_Push(&gCalcMatrix); - Matrix_Mult(gGfxMatrix, gCalcMatrix, 1); + Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, *dList); RCP_SetupDL(&gMasterDisp, 0x29); @@ -2969,10 +2971,10 @@ bool Andross_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); break; } - Matrix_Translate(gGfxMatrix, D_i6_801A67DC.x, D_i6_801A67DC.y, D_i6_801A67DC.z, 1); - Matrix_RotateZ(gGfxMatrix, D_i6_801A67F0 * M_DTOR, 1); - Matrix_RotateY(gGfxMatrix, D_i6_801A67EC * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, D_i6_801A67E8 * M_DTOR, 1); + Matrix_Translate(gGfxMatrix, D_i6_801A67DC.x, D_i6_801A67DC.y, D_i6_801A67DC.z, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, D_i6_801A67F0 * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, D_i6_801A67EC * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, D_i6_801A67E8 * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ANDROSS_C022520); Matrix_Pop(&gGfxMatrix); @@ -2983,14 +2985,14 @@ bool Andross_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* pos->x -= boss->fwork[11]; pos->y += boss->fwork[12]; pos->z -= boss->fwork[13]; - Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, 1); - Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, 1); + Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, MTXF_APPLY); if (*dList != NULL) { Matrix_Push(&gGfxMatrix); Matrix_Push(&gCalcMatrix); - Matrix_Mult(gGfxMatrix, gCalcMatrix, 1); + Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, *dList); RCP_SetupDL(&gMasterDisp, 0x29); @@ -3008,10 +3010,10 @@ bool Andross_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); break; } - Matrix_Translate(gGfxMatrix, D_i6_801A67C4.x, D_i6_801A67C4.y, D_i6_801A67C4.z, 1); - Matrix_RotateZ(gGfxMatrix, D_i6_801A67D8 * M_DTOR, 1); - Matrix_RotateY(gGfxMatrix, D_i6_801A67D4 * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, D_i6_801A67D0 * M_DTOR, 1); + Matrix_Translate(gGfxMatrix, D_i6_801A67C4.x, D_i6_801A67C4.y, D_i6_801A67C4.z, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, D_i6_801A67D8 * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, D_i6_801A67D4 * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, D_i6_801A67D0 * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ANDROSS_C022520); Matrix_Pop(&gGfxMatrix); @@ -3022,16 +3024,16 @@ bool Andross_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* break; } - Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, 1); - Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, 1); + Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, MTXF_APPLY); Matrix_Push(&gCalcMatrix); - Matrix_Scale(gCalcMatrix, scale, scale, scale, 1); + Matrix_Scale(gCalcMatrix, scale, scale, scale, MTXF_APPLY); if (*dList != NULL) { Matrix_MultVec3f(gCalcMatrix, &sp94, &sp88); func_edisplay_8005F670(&sp88); - Matrix_Mult(gGfxMatrix, gCalcMatrix, 1); + Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, *dList); } @@ -3131,28 +3133,31 @@ void Andross_801928C8(Boss* boss) { Lights_SetOneLight(&gMasterDisp, gLight1x, gLight1y, gLight1z, D_i6_801A7F5C, D_i6_801A7F64, D_i6_801A7F6C, D_i6_801A7F74, D_i6_801A7F7C, D_i6_801A8430); } - Matrix_Scale(gCalcMatrix, 10.0f, 10.0f, 10.0f, 1); + Matrix_Scale(gCalcMatrix, 10.0f, 10.0f, 10.0f, MTXF_APPLY); Animation_DrawSkeleton(2, D_ANDROSS_C01CC3C, D_i6_801A7F80, Andross_801917F0, Andross_801924B4, boss, gCalcMatrix); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); if (boss->fwork[20] > 0.05f) { - Matrix_Translate(gGfxMatrix, boss->vwork[10].x, boss->vwork[10].y, boss->vwork[10].z + D_ctx_80177D20, 1); + Matrix_Translate(gGfxMatrix, boss->vwork[10].x, boss->vwork[10].y, boss->vwork[10].z + D_ctx_80177D20, + MTXF_APPLY); if (boss->fwork[21] > 0.05f) { Matrix_Push(&gGfxMatrix); RCP_SetupDL(&gMasterDisp, 0x43); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 192); gDPSetEnvColor(gMasterDisp++, 255, 0, 128, 192); - Matrix_Scale(gGfxMatrix, boss->fwork[21] * 7.0f, boss->fwork[21] * 7.0f, boss->fwork[21] * 7.0f, 1); + Matrix_Scale(gGfxMatrix, boss->fwork[21] * 7.0f, boss->fwork[21] * 7.0f, boss->fwork[21] * 7.0f, + MTXF_APPLY); if ((gGameFrameCount % 2) != 0) { - Matrix_Scale(gGfxMatrix, 1.1f, 1.1f, 1.1f, 1); + Matrix_Scale(gGfxMatrix, 1.1f, 1.1f, 1.1f, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); Matrix_Pop(&gGfxMatrix); } - Matrix_Scale(gGfxMatrix, boss->fwork[20] * 10.0f, boss->fwork[20] * 10.0f, boss->fwork[20] * 10.0f, 1); - Matrix_RotateZ(gGfxMatrix, boss->fwork[19] * M_DTOR, 1); + Matrix_Scale(gGfxMatrix, boss->fwork[20] * 10.0f, boss->fwork[20] * 10.0f, boss->fwork[20] * 10.0f, + MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, boss->fwork[19] * M_DTOR, MTXF_APPLY); RCP_SetupDL(&gMasterDisp, 0x40); if ((gGameFrameCount % 2) != 0) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 128); @@ -3160,26 +3165,26 @@ void Andross_801928C8(Boss* boss) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 30); } Matrix_Push(&gGfxMatrix); - Matrix_RotateZ(gGfxMatrix, 0.0f, 1); - Matrix_RotateX(gGfxMatrix, 15.0f * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, 0.3f, 1.0f, 1.0f, 1); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 200.0f, 1); + Matrix_RotateZ(gGfxMatrix, 0.0f, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, 15.0f * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.3f, 1.0f, 1.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 200.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ANDROSS_C017440); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_RotateZ(gGfxMatrix, 120.0f * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, 15.0f * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, 0.3f, 1.0f, 1.0f, 1); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 200.0f, 1); + Matrix_RotateZ(gGfxMatrix, 120.0f * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, 15.0f * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.3f, 1.0f, 1.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 200.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ANDROSS_C017440); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_RotateZ(gGfxMatrix, 240.0f * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, 15.0f * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, 0.3f, 1.0f, 1.0f, 1); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 200.0f, 1); + Matrix_RotateZ(gGfxMatrix, 240.0f * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, 15.0f * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.3f, 1.0f, 1.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 200.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ANDROSS_C017440); Matrix_Pop(&gGfxMatrix); @@ -3230,7 +3235,7 @@ void Andross_80192E94(Actor* actor) { /* fallthrough */ case 2: actor->obj.rot.z = actor->unk_0F4.z + D_Andross_801A7F68; - Matrix_RotateZ(gCalcMatrix, M_DTOR * D_Andross_801A7F68, 0); + Matrix_RotateZ(gCalcMatrix, M_DTOR * D_Andross_801A7F68, MTXF_NEW); Matrix_MultVec3fNoTranslate(gCalcMatrix, actor->vwork, &actor->obj.pos); actor->obj.pos.y += 300.0f; break; @@ -3265,8 +3270,8 @@ void Andross_80193244(Actor* actor) { alpha = 64; scale *= 1.2f; } - Matrix_Scale(gGfxMatrix, scale, scale, scale, 1); - Matrix_RotateX(gGfxMatrix, M_PI / 2, 1); + Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL(&gMasterDisp, 0x43); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, alpha); @@ -3407,7 +3412,7 @@ void Andross_801939A0(s32 actorIndex) { actor->obj.status = OBJ_ACTIVE; actor->obj.id = OBJ_ACTOR_195; actor->obj.pos.x = 0.0f; - actor->obj.pos.y = gPlayer[0].camAt.y; + actor->obj.pos.y = gPlayer[0].cam.at.y; actor->obj.pos.z = 0.0f; actor->iwork[11] = 1; actor->unk_0F4.x = 90.0f; @@ -3484,7 +3489,7 @@ void Andross_80193C4C(Player* player) { switch (player->unk_1D0) { case 0: gCsFrameCount = 0; - player->wings.unk_2C = 1; + player->wings.modelId = 1; D_ctx_80177A48[0] = 0.0f; if (player->unk_4D8 > 180.0f) { player->unk_4D8 -= 360.0f; @@ -3499,8 +3504,8 @@ void Andross_80193C4C(Player* player) { Math_SmoothStepToF(&player->unk_0E8, 0.0f, 0.1f, 10.0f, 0.0f); Math_SmoothStepToF(&player->vel.x, 0.0f, 1.0f, 3.0f, 0.0f); Math_SmoothStepToF(&player->vel.y, 0.0f, 1.0f, 3.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.x, player->pos.x, 0.1f, 15.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.y, player->pos.y + 30.0f, 0.1f, 15.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.x, player->pos.x, 0.1f, 15.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.y, player->pos.y + 30.0f, 0.1f, 15.0f, 0.0f); if (player->timer_1F8 == 0) { player->pos.y += SIN_DEG(player->unk_0E4) * 15.0f; Math_SmoothStepToF(&player->unk_0E4, 180.0f, 0.1f, 5.0f, 0.0f); @@ -3509,7 +3514,7 @@ void Andross_80193C4C(Player* player) { Math_SmoothStepToF(&player->unk_08C, 0.0f, 1.0f, 5.0f, 0.0f); Math_SmoothStepToF(&player->unk_0E4, 0.0f, 0.1f, 10.0f, 0.0f); } - player->camEye.z += player->vel.z * 0.5f; + player->cam.eye.z += player->vel.z * 0.5f; switch (gCsFrameCount) { case 80: func_effect_8007A568(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 40.0f); @@ -3539,7 +3544,7 @@ void Andross_80193C4C(Player* player) { gCsCamAtX = gBosses[0].obj.pos.x; gCsCamAtY = gBosses[0].obj.pos.y; gCsCamAtZ = gBosses[0].obj.pos.z + D_ctx_80177D20; - Math_SmoothStepToF(&player->unk_034, 0.0f, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f); break; case 2: player->unk_190 = D_ctx_80177A48[8]; @@ -3569,20 +3574,20 @@ void Andross_80193C4C(Player* player) { Math_SmoothStepToF(&D_ctx_80177A48[3], 200.0f, 0.1f, 5.0f, 0.0f); D_ctx_80177A48[4] += 4.5f; D_ctx_80177AB0 = 2; - Matrix_RotateZ(gCalcMatrix, 2.0f * RAND_FLOAT(M_PI), 0); + Matrix_RotateZ(gCalcMatrix, 2.0f * RAND_FLOAT(M_PI), MTXF_NEW); sp74.x = RAND_FLOAT(50.0f) + 120.0f; sp74.y = 0.0f; sp74.z = 0.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp74, &sp68); } Math_SmoothStepToF(&D_ctx_80177A48[5], 3.0f, 1.0f, 0.05f, 0.0f); - player->camEye.z += player->vel.z * D_ctx_80177A48[2]; + player->cam.eye.z += player->vel.z * D_ctx_80177A48[2]; if (gCsFrameCount > 230) { player->unk_08C -= 7.0f; } if (gCsFrameCount > 230) { Math_SmoothStepToF(&D_ctx_80177A48[7], 3.0f, 1.0f, 0.1f, 0.0f); - player->unk_034 -= D_ctx_80177A48[7]; + player->camRoll -= D_ctx_80177A48[7]; } for (i = 0; i < sp90; i++) { @@ -3591,8 +3596,8 @@ void Andross_80193C4C(Player* player) { RAND_FLOAT(2.5f) + 2.5f); } - Math_SmoothStepToF(&player->camEye.x, D_ctx_80177A48[1] + player->pos.x, 0.1f, 15.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.y, player->pos.y + 30.0f, 0.1f, 15.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.x, D_ctx_80177A48[1] + player->pos.x, 0.1f, 15.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.y, player->pos.y + 30.0f, 0.1f, 15.0f, 0.0f); Math_SmoothStepToF(&player->unk_0EC, -180.0f, 0.02f, D_ctx_80177A48[6], 0.0f); Math_SmoothStepToF(&D_ctx_80177A48[6], 3.0f, 1.0f, 0.05f, 0.0f); gCsCamAtX = player->pos.x; @@ -3603,7 +3608,7 @@ void Andross_80193C4C(Player* player) { if (player->unk_25C > 0.6f) { player->unk_25C = 0.6f; } - Math_SmoothStepToF(&player->unk_034, 3.0f, 0.5f, 0.1f, 0.0f); + Math_SmoothStepToF(&player->camRoll, 3.0f, 0.5f, 0.1f, 0.0f); Math_SmoothStepToF(D_ctx_801779A8, 70.0f, 1.0f, 2.0f, 0.0f); } @@ -3619,7 +3624,7 @@ void Andross_80193C4C(Player* player) { case 25: for (i = 0; i < 12; i++) { Andross_80193668(&gObjects80[i], player->pos.x, player->pos.y, - (player->camEye.z - D_ctx_80177D20) + (2195.0f * i), i); + (player->cam.eye.z - D_ctx_80177D20) + (2195.0f * i), i); } break; case 150: @@ -3636,13 +3641,13 @@ void Andross_80193C4C(Player* player) { player->unk_1D0 = 3; player->unk_144 = D_ctx_80177D20 = 0.0f; D_ctx_80177AB0 = D_ctx_80177A98 = 1; - player->camEye.x = 1200.0f; - player->camEye.z = 1200.0f; - player->camEye.y = 1800.0f; + player->cam.eye.x = 1200.0f; + player->cam.eye.z = 1200.0f; + player->cam.eye.y = 1800.0f; gCsCamAtX = 0.0f; gCsCamAtY = 620.0f; gCsCamAtZ = 0.0f; - player->unk_034 = 0.0f; + player->camRoll = 0.0f; player->unk_234 = 0; D_ctx_80177A48[0] = 1.0f; func_play_800A6148(); @@ -3689,9 +3694,9 @@ void Andross_80193C4C(Player* player) { Math_SmoothStepToF(&gCsCamAtY, gActors[10].obj.pos.y, 1.0f, D_ctx_80177A48[1], 0.0f); Math_SmoothStepToF(&D_ctx_80177A48[1], 1000.0f, 1.0f, 5.0f, 0.0f); } else { - Math_SmoothStepToF(&player->camEye.z, 1640.0f, 0.05f, 50.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.y, 110.0f, 0.05f, 50.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.x, 0.0f, 0.05f, 50.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.z, 1640.0f, 0.05f, 50.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.y, 110.0f, 0.05f, 50.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.x, 0.0f, 0.05f, 50.0f, 0.0f); Math_SmoothStepToF(&gCsCamAtY, 630.0f, 0.05f, 50.0f, 0.0f); } @@ -3722,7 +3727,7 @@ void Andross_80193C4C(Player* player) { } break; case 4: - player->unk_034 += D_ctx_80177A48[3]; + player->camRoll += D_ctx_80177A48[3]; if (gCsFrameCount > 190) { Math_SmoothStepToF(&D_ctx_80177A48[3], 0.3f, 0.05f, 0.02f, 0.0f); } @@ -3741,9 +3746,9 @@ void Andross_80193C4C(Player* player) { gAmbientG = D_i6_801A7F50; gAmbientB = D_i6_801A7F54; Math_SmoothStepToF(&D_ctx_80177A48[1], -5000.0f, 0.05f, 15.0f, 0.0f); - player->camEye.x = gActors[10].obj.pos.x + 50.0f; - player->camEye.y = gActors[10].obj.pos.y + D_ctx_80177A48[1]; - player->camEye.z = gActors[10].obj.pos.z; + player->cam.eye.x = gActors[10].obj.pos.x + 50.0f; + player->cam.eye.y = gActors[10].obj.pos.y + D_ctx_80177A48[1]; + player->cam.eye.z = gActors[10].obj.pos.z; gCsCamAtX = gActors[10].obj.pos.x; gCsCamAtY = gActors[10].obj.pos.y + 50.0f; gCsCamAtZ = gActors[10].obj.pos.z; @@ -3785,13 +3790,13 @@ void Andross_80193C4C(Player* player) { D_ctx_80177A48[2] = 0.0f; D_ctx_80177A48[3] = 0.0f; D_ctx_80177A48[4] = 0.0f; - player->camEye.x = gCsCamEyeX = 100.0f; - player->camEye.y = gCsCamEyeY = 14800.0f; - player->camEye.z = gCsCamEyeZ = -1500.0f; + player->cam.eye.x = gCsCamEyeX = 100.0f; + player->cam.eye.y = gCsCamEyeY = 14800.0f; + player->cam.eye.z = gCsCamEyeZ = -1500.0f; gCsCamAtX = 0.0f; gCsCamAtY = 15000.0f; gCsCamAtZ = 0; - player->unk_034 = 0.0f; + player->camRoll = 0.0f; gActors[10].state = 101; gActors[10].fwork[0] = 0.0f; gActors[10].obj.pos.y = 14500.0f; @@ -3864,20 +3869,20 @@ void Andross_80193C4C(Player* player) { } D_ctx_80177A48[0] = 0.01f; Math_SmoothStepToF(&D_ctx_80177A48[1], 10.0f, 1.0f, 0.1f, 0.0f); - Math_SmoothStepToF(&player->camEye.x, gActors[10].obj.pos.x - 50.0f, D_ctx_80177A48[0], + Math_SmoothStepToF(&player->cam.eye.x, gActors[10].obj.pos.x - 50.0f, D_ctx_80177A48[0], D_ctx_80177A48[1], 0); - Math_SmoothStepToF(&player->camEye.y, gActors[10].obj.pos.y + 10.0f, D_ctx_80177A48[0], + Math_SmoothStepToF(&player->cam.eye.y, gActors[10].obj.pos.y + 10.0f, D_ctx_80177A48[0], D_ctx_80177A48[1], 0); - Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_ctx_80177A48[0], D_ctx_80177A48[1], 0); + Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], D_ctx_80177A48[1], 0); gCsCamAtY = SIN_DEG(gGameFrameCount * 5.5f) + 15000.0f; } else { gCsCamEyeX -= 1.0f; gCsCamEyeY += 0.3f; gCsCamEyeZ += 4.0f; gCsCamAtY = (SIN_DEG(gGameFrameCount * 1.5f) * 10.0f) + 15000.0f; - Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0); } if (D_play_800D2F68 != 0) { switch (gCsFrameCount) { @@ -3951,8 +3956,8 @@ void Andross_80193C4C(Player* player) { if (gPlayerFillScreenAlphas[0] > 255) { gPlayerFillScreenAlphas[0] = 0; } - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), 1); + Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); sp74.x = 0.0f; sp74.y = 0.0f; sp74.z = player->unk_0D0; @@ -3961,7 +3966,7 @@ void Andross_80193C4C(Player* player) { player->vel.z = sp68.z; player->vel.y = sp68.y; if (player->timer_1F8 == 0) { - player->state_1C8 = PLAYERSTATE_1C8_3; + player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_014 = 0.2f; player->unk_018 = 0.0f; player->unk_01C = 0.05f; @@ -3980,11 +3985,11 @@ void Andross_80193C4C(Player* player) { gCsCamEyeX = player->pos.x + sp68.x; gCsCamEyeY = player->pos.y + sp68.y; gCsCamEyeZ = player->pos.z + sp68.z; - Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0); Math_SmoothStepToF(&player->unk_12C, 0.0f, 0.1f, 0.7f, 0.0f); - Math_SmoothStepToF(&player->unk_034, 0.0f, 0.1f, 0.4f, 0.0f); + Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 0.4f, 0.0f); break; } player->pos.x += player->vel.x; @@ -3994,9 +3999,9 @@ void Andross_80193C4C(Player* player) { player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; Math_SmoothStepToF(&player->unk_130, 0.0f, 0.1f, 15.0f, 0.0f); Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 20.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0); + Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0); } void Andross_80195E44(Actor* actor) { diff --git a/src/overlays/ovl_i6/fox_sy.c b/src/overlays/ovl_i6/fox_sy.c index 1e851173..bc8a8b05 100644 --- a/src/overlays/ovl_i6/fox_sy.c +++ b/src/overlays/ovl_i6/fox_sy.c @@ -66,7 +66,7 @@ void SectorY_Boss314_Init(Boss314* this) { this->fwork[43] = 3.5f; this->fwork[45] = 40.0f; - if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_9) { + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_START_360) { this->obj.pos.z = -28900.0f; gObjects58[0].obj.pos.z = -30000.0f; } @@ -94,8 +94,8 @@ void SectorY_Boss314_Init(Boss314* this) { } if (gLevelMode == LEVELMODE_ON_RAILS) { - if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) { - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_9; + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) { + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_START_360; gPlayer[0].unk_1D0 = 0; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); @@ -265,7 +265,7 @@ void SectorY_801983E4(Boss* boss) { } else { SectorY_80199D64(boss); } - } else if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_5) { + } else if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_U_TURN) { Math_SmoothStepToAngle(&boss->unk_078.x, 181.0f, 0.1f, 6.0f, 0.1f); boss->swork[21] = 3; boss->fwork[11] = SIN_DEG(boss->unk_078.y) * (boss->fwork[45] + 10.0f); @@ -326,20 +326,20 @@ void SectorY_80198ABC(Boss* boss) { switch (D_ctx_80177A10[8]) { case 0: if (gTeamShields[TEAM_ID_FALCO] > 0) { - func_360_8002E4F8(gMsg_ID_14200, RCID_FALCO); + AllRange_PlayMessage(gMsg_ID_14200, RCID_FALCO); } break; case 1: if ((gBosses[1].obj.status == OBJ_FREE) && (gBosses[2].obj.status == OBJ_FREE)) { - func_360_8002E4F8(gMsg_ID_14320, RCID_BOSS_SECTORY); + AllRange_PlayMessage(gMsg_ID_14320, RCID_BOSS_SECTORY); } break; case 2: if ((gTeamShields[TEAM_ID_SLIPPY] > 0) && (gBosses[1].obj.status != OBJ_FREE) && (gBosses[2].obj.status != OBJ_FREE)) { - func_360_8002E4F8(gMsg_ID_14220, RCID_SLIPPY); + AllRange_PlayMessage(gMsg_ID_14220, RCID_SLIPPY); } break; } @@ -420,9 +420,9 @@ void SectorY_80198F5C(Boss* boss) { if (boss->index == 0) { boss->timer_058 = 20000; boss->vel.x = boss->vel.y = boss->vel.z = 0.0f; - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_5)) { + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { gCsFrameCount = 0; - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_7; + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].timer_1F8 = 0; gPlayer[0].unk_1D0 = gPlayer[0].timer_1F8; gPlayer[0].unk_0E8 += gPlayer[0].unk_114; @@ -457,14 +457,14 @@ void SectorY_80198F5C(Boss* boss) { boss->vel.y = 0.0f; boss->vel.x = 0.0f; - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_3) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_5)) { + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { boss->timer_058 = 100; - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_0; + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_STANDBY; gCsFrameCount = 0; - xDisplacement = gPlayer[0].camEye.x - boss->obj.pos.x; - zDisplacement = gPlayer[0].camEye.z - boss->obj.pos.z; + xDisplacement = gPlayer[0].cam.eye.x - boss->obj.pos.x; + zDisplacement = gPlayer[0].cam.eye.z - boss->obj.pos.z; D_ctx_80177A48[8] = Math_RadToDeg(Math_Atan2F(xDisplacement, zDisplacement)); - Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[8] * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[8] * M_DTOR, MTXF_NEW); vec.x = 0.0f; vec.y = 0.0f; vec.z = 900.0f; @@ -491,7 +491,7 @@ void SectorY_80198F5C(Boss* boss) { AUDIO_PLAY_SFX(0x2943500F, boss->sfxSource, 4); } if ((gBosses[1].obj.status == OBJ_FREE) && (gBosses[2].obj.status == OBJ_FREE)) { - func_360_8002E4F8(gMsg_ID_14350, RCID_BOSS_SECTORY); + AllRange_PlayMessage(gMsg_ID_14350, RCID_BOSS_SECTORY); } } } @@ -517,7 +517,7 @@ void SectorY_80199438(Boss* boss) { } } else { D_ctx_80177A48[8] += D_ctx_80177A48[9]; - Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[8] * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[8] * M_DTOR, MTXF_NEW); vec.x = 0.0f; vec.y = 0.0f; vec.z = 900.0f; @@ -553,12 +553,12 @@ void SectorY_80199438(Boss* boss) { } } } - Math_SmoothStepToF(&gPlayer[0].camEye.x, gCsCamEyeX, D_ctx_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&gPlayer[0].camEye.y, gCsCamEyeY, D_ctx_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&gPlayer[0].camEye.z, gCsCamEyeZ, D_ctx_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&gPlayer[0].camAt.x, gCsCamAtX, D_ctx_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&gPlayer[0].camAt.y, gCsCamAtY, D_ctx_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&gPlayer[0].camAt.z, gCsCamAtZ, D_ctx_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&gPlayer[0].cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&gPlayer[0].cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&gPlayer[0].cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&gPlayer[0].cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&gPlayer[0].cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&gPlayer[0].cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 20000.0f, 0); } if (((gGameFrameCount % 4) == 0) && (boss->swork[36] == 0)) { func_effect_8007C120(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, boss->vel.x, boss->vel.y, @@ -599,11 +599,11 @@ void SectorY_80199438(Boss* boss) { gObjects58[0].info.dList = D_SY_601F3D0; gObjects58[0].info.drawType = 0; } else { - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_3; + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ACTIVE; func_play_800B63BC(&gPlayer[0], 1); gPlayer[0].unk_014 = 0.0f; if (gTeamShields[TEAM_ID_PEPPY] > 0) { - func_360_8002E4F8(gMsg_ID_14230, RCID_PEPPY); + AllRange_PlayMessage(gMsg_ID_14230, RCID_PEPPY); } } } @@ -796,9 +796,9 @@ void SectorY_8019A66C(Boss* boss) { AUDIO_PLAY_SFX(0x2902306C, boss->sfxSource, 4); boss->fwork[34] = 4.5f; if (Rand_ZeroOne() > 0.5f) { - func_360_8002E4F8(gMsg_ID_14330, 160); + AllRange_PlayMessage(gMsg_ID_14330, RCID_BOSS_SECTORY); } else { - func_360_8002E4F8(gMsg_ID_14320, 160); + AllRange_PlayMessage(gMsg_ID_14320, RCID_BOSS_SECTORY); } } if (boss->timer_056 <= 60) { @@ -816,12 +816,11 @@ void SectorY_8019A66C(Boss* boss) { } void SectorY_8019A82C(Boss* boss) { - boss->swork[20] = 9; boss->fwork[9] = 0.0f; boss->timer_050 = RAND_INT(150.0f) + 340; boss->timer_056 = 0; - func_360_8002E4F8(gMsg_ID_14340, 160); + AllRange_PlayMessage(gMsg_ID_14340, RCID_BOSS_SECTORY); } void SectorY_8019A898(Boss* boss) { @@ -860,7 +859,7 @@ void SectorY_8019AA08(Boss* boss) { return; } if ((gBosses[1].obj.status == OBJ_FREE) && (gBosses[2].obj.status == OBJ_FREE)) { - func_360_8002E4F8(gMsg_ID_14330, RCID_BOSS_SECTORY); + AllRange_PlayMessage(gMsg_ID_14330, RCID_BOSS_SECTORY); } if (Rand_ZeroOne() >= 0.5f) { @@ -918,8 +917,8 @@ void SectorY_8019AAF0(Boss* boss) { var_ft5 = ABS(boss->fwork[18] - boss->obj.pos.x) + ABS(boss->fwork[20] - boss->obj.pos.z); xAngle = -Math_Atan2F(boss->fwork[19] - boss->obj.pos.y, var_ft5); - Matrix_RotateY(gCalcMatrix, yAngle, 0); - Matrix_RotateX(gCalcMatrix, xAngle, 1); + Matrix_RotateY(gCalcMatrix, yAngle, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, xAngle, MTXF_APPLY); vec.x = 0.0f; vec.y = 0.0f; vec.z = boss->fwork[9]; @@ -967,13 +966,13 @@ void SectorY_8019AEEC(Boss* boss) { if (boss->unk_04A == 1) { Audio_PlaySequence(SEQ_PLAYER_BGM, SEQ_ID_BOSS_RESUME | SEQ_FLAG, 0, 0); boss->unk_04A++; - gPlayer[0].camEye.x = 0.0f; - gPlayer[0].camEye.y = 200.0f; - gPlayer[0].camEye.z = -20000.0f; - gPlayer[0].camAt.x = 0.0f; - gPlayer[0].camAt.y = 300.0f; - gPlayer[0].camAt.z = boss->obj.pos.z; - gPlayer[0].unk_034 = 0.0f; + gPlayer[0].cam.eye.x = 0.0f; + gPlayer[0].cam.eye.y = 200.0f; + gPlayer[0].cam.eye.z = -20000.0f; + gPlayer[0].cam.at.x = 0.0f; + gPlayer[0].cam.at.y = 300.0f; + gPlayer[0].cam.at.z = boss->obj.pos.z; + gPlayer[0].camRoll = 0.0f; Radio_PlayMessage(gMsg_ID_14300, RCID_BOSS_SECTORY); SectorY_801A0510(&gActors[59], 7); gActors[59].obj.pos.y = boss->obj.pos.y - 202.0f; @@ -986,8 +985,8 @@ void SectorY_8019AEEC(Boss* boss) { } Math_SmoothStepToF(&boss->obj.pos.y, 365.0f, 0.1f, 5.0f, 0.1f); Math_SmoothStepToF(&gActors[59].obj.pos.y, 153.0f, 0.1f, 5.0f, 0.1f); - Math_SmoothStepToF(&gPlayer[0].camEye.z, -28300.0f, 1.0f, 100.0f, 1.0f); - if (gPlayer[0].camEye.z == -28300.0f) { + Math_SmoothStepToF(&gPlayer[0].cam.eye.z, -28300.0f, 1.0f, 100.0f, 1.0f); + if (gPlayer[0].cam.eye.z == -28300.0f) { Math_SmoothStepToF(&boss->fwork[46], 128.0f, 1.0f, 16.0f, 1.0f); gBossHealthBar = boss->health * 1.7f; } @@ -998,9 +997,9 @@ void SectorY_8019AEEC(Boss* boss) { } } } else { - gPlayer[0].camAt.z = boss->obj.pos.z; - Math_SmoothStepToF(&gPlayer[0].camEye.z, -29000.0f, 1.0f, 5.0f, 1.0f); - Math_SmoothStepToF(&gPlayer[0].camEye.x, 2000.0f, 1.0f, 8.0f, 1.0f); + gPlayer[0].cam.at.z = boss->obj.pos.z; + Math_SmoothStepToF(&gPlayer[0].cam.eye.z, -29000.0f, 1.0f, 5.0f, 1.0f); + Math_SmoothStepToF(&gPlayer[0].cam.eye.x, 2000.0f, 1.0f, 8.0f, 1.0f); Math_SmoothStepToF(&boss->fwork[46], 0.0f, 1.0f, 16.0f, 1.0f); if (boss->timer_050 == 0) { boss->swork[21] = 0; @@ -1043,7 +1042,7 @@ void SectorY_8019AEEC(Boss* boss) { gObjects58[0].obj.pos.z = -20000.0f; boss->fwork[43] = 0.0f; boss->vel.y = 0.0f; - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_3; + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ACTIVE; func_play_800B63BC(&gPlayer[0], 1); gPlayer[0].unk_014 = 0.0f; boss->swork[34]++; @@ -1235,18 +1234,18 @@ void SectorY_8019C194(Boss* boss, f32 zSpeed, f32 xSpeed) { switch (D_ctx_80177A10[8]) { case 0: if (gTeamShields[TEAM_ID_FALCO] > 0) { - func_360_8002E4F8(gMsg_ID_14200, RCID_FALCO); + AllRange_PlayMessage(gMsg_ID_14200, RCID_FALCO); } break; case 1: if (gTeamShields[TEAM_ID_PEPPY] > 0) { - func_360_8002E4F8(gMsg_ID_14210, RCID_PEPPY); + AllRange_PlayMessage(gMsg_ID_14210, RCID_PEPPY); } break; case 2: if ((gTeamShields[TEAM_ID_SLIPPY] > 0) && (gBosses[1].obj.status != OBJ_FREE) && (gBosses[2].obj.status != OBJ_FREE)) { - func_360_8002E4F8(gMsg_ID_14220, RCID_SLIPPY); + AllRange_PlayMessage(gMsg_ID_14220, RCID_SLIPPY); } break; } @@ -1343,7 +1342,7 @@ void SectorY_8019C888(Boss* boss) { Vec3f sp4C; s32 pad; - if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_9) { + if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_START_360) { if (boss->swork[34] == 1) { if (boss->health > 0) { gObjects58[0].obj.pos.z += 20.0f; @@ -1440,12 +1439,12 @@ void SectorY_8019C888(Boss* boss) { boss->obj.rot.x = boss->unk_078.x; boss->obj.rot.y = boss->unk_078.y; boss->obj.rot.z = boss->unk_078.z; - Matrix_RotateZ(gCalcMatrix, -boss->vwork[29].z * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -boss->vwork[29].x * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -boss->vwork[29].y * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, -boss->obj.rot.z * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, -boss->obj.rot.x * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -boss->obj.rot.y * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, -boss->vwork[29].z * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -boss->vwork[29].x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -boss->vwork[29].y * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -boss->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, -boss->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -boss->obj.rot.y * M_DTOR, MTXF_APPLY); if ((boss->health > 0) && (boss->swork[20] < 10)) { sp58.x = boss->fwork[18] - boss->obj.pos.x; sp58.y = boss->fwork[19] - boss->obj.pos.y; @@ -1469,8 +1468,8 @@ void SectorY_8019C888(Boss* boss) { Math_SmoothStepToAngle(&boss->fwork[6], sp1E4, 0.2f, 4.0f, 0.1f); Math_SmoothStepToAngle(&boss->fwork[5], sp1E8, 0.2f, 4.0f, 0.1f); - Matrix_RotateX(gCalcMatrix, -boss->fwork[5] * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -boss->fwork[6] * M_DTOR, 1); + Matrix_RotateX(gCalcMatrix, -boss->fwork[5] * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -boss->fwork[6] * M_DTOR, MTXF_APPLY); sp58.x = boss->fwork[18] - boss->obj.pos.x; sp58.y = (boss->fwork[19] - boss->obj.pos.y) + 20.0f; sp58.z = boss->fwork[20] - boss->obj.pos.z; @@ -1515,8 +1514,8 @@ void SectorY_8019C888(Boss* boss) { Math_SmoothStepToAngle(&boss->fwork[15], sp1D8, 0.2f, 4.0f, 0.1f); Math_SmoothStepToAngle(&boss->fwork[14], sp1D4, 0.2f, 4.0f, 0.1f); - Matrix_RotateX(gCalcMatrix, -boss->fwork[14] * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -boss->fwork[15] * M_DTOR, 1); + Matrix_RotateX(gCalcMatrix, -boss->fwork[14] * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -boss->fwork[15] * M_DTOR, MTXF_APPLY); sp58.x = boss->fwork[18] - boss->obj.pos.x; sp58.y = (boss->fwork[19] - boss->obj.pos.y) + (COS_DEG(boss->obj.rot.z) * 40.0f); sp58.z = (boss->fwork[20] - boss->obj.pos.z) - (COS_DEG(boss->obj.rot.y) * 60.0f); @@ -1568,16 +1567,16 @@ void SectorY_8019C888(Boss* boss) { if (boss->index == 0) { radarMark = &gRadarMarks[boss->index + 1]; - radarMark->unk_00 = 1; - radarMark->unk_02 = 102; + radarMark->status = 1; + radarMark->type = 102; radarMark->pos.x = boss->obj.pos.x; radarMark->pos.y = boss->obj.pos.y; radarMark->pos.z = boss->obj.pos.z; radarMark->unk_10 = boss->unk_078.y + 180.0f; } else { radarMark = &gRadarMarks[boss->index + 4]; - radarMark->unk_00 = 1; - radarMark->unk_02 = 10; + radarMark->status = 1; + radarMark->type = 10; radarMark->pos.x = boss->obj.pos.x; radarMark->pos.y = boss->obj.pos.y; radarMark->pos.z = boss->obj.pos.z; @@ -1807,8 +1806,8 @@ void SectorY_8019E2C4(Boss* boss) { gDPSetEnvColor(gMasterDisp++, 255, 48, 0, 255); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, boss->fwork[1], boss->fwork[2], boss->fwork[3], 1); - Matrix_Scale(gGfxMatrix, sp9C, sp9C, sp9C, 1); + Matrix_Translate(gGfxMatrix, boss->fwork[1], boss->fwork[2], boss->fwork[3], MTXF_APPLY); + Matrix_Scale(gGfxMatrix, sp9C, sp9C, sp9C, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); } @@ -1818,18 +1817,18 @@ void SectorY_8019E2C4(Boss* boss) { gDPSetEnvColor(gMasterDisp++, 32, 255, 32, 255); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, boss->fwork[31], boss->fwork[32], boss->fwork[33], 1); - Matrix_Scale(gGfxMatrix, boss->fwork[34], boss->fwork[34], boss->fwork[34], 1); - Matrix_RotateX(gGfxMatrix, -boss->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gGfxMatrix, -boss->obj.rot.z * M_DTOR, 1); - sp98 = gPlayer[0].camEye.x - boss->obj.pos.x; - sp94 = gPlayer[0].camEye.y - boss->obj.pos.y; - sp90 = gPlayer[0].camEye.z - (boss->obj.pos.z + D_ctx_80177D20); + Matrix_Translate(gGfxMatrix, boss->fwork[31], boss->fwork[32], boss->fwork[33], MTXF_APPLY); + Matrix_Scale(gGfxMatrix, boss->fwork[34], boss->fwork[34], boss->fwork[34], MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -boss->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, -boss->obj.rot.z * M_DTOR, MTXF_APPLY); + sp98 = gPlayer[0].cam.eye.x - boss->obj.pos.x; + sp94 = gPlayer[0].cam.eye.y - boss->obj.pos.y; + sp90 = gPlayer[0].cam.eye.z - (boss->obj.pos.z + D_ctx_80177D20); sp8C = -Math_Atan2F(sp98, sp90); sp9C = sqrtf(SQ(sp90) + SQ(sp98)); sp88 = Math_Atan2F(sp94, sp9C); - Matrix_RotateY(gGfxMatrix, -sp8C, 1); - Matrix_RotateX(gGfxMatrix, -sp88, 1); + Matrix_RotateY(gGfxMatrix, -sp8C, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -sp88, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); } @@ -1840,11 +1839,11 @@ void SectorY_8019E2C4(Boss* boss) { gDPSetEnvColor(gMasterDisp++, 32, 255, 32, 255); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, boss->fwork[35], boss->fwork[36], boss->fwork[37], 1); - Matrix_RotateY(gGfxMatrix, boss->obj.rot.y * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, boss->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gGfxMatrix, boss->obj.rot.z * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, boss->fwork[41] * 2.0f, boss->fwork[41], boss->fwork[41] * 2.0f, 1); + Matrix_Translate(gGfxMatrix, boss->fwork[35], boss->fwork[36], boss->fwork[37], MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, boss->obj.rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, boss->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, boss->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, boss->fwork[41] * 2.0f, boss->fwork[41], boss->fwork[41] * 2.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); } @@ -1854,11 +1853,11 @@ void SectorY_8019E2C4(Boss* boss) { gDPSetEnvColor(gMasterDisp++, 32, 255, 32, 255); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, boss->fwork[38], boss->fwork[39], boss->fwork[40], 1); - Matrix_RotateY(gGfxMatrix, boss->obj.rot.y * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, boss->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gGfxMatrix, boss->obj.rot.z * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, boss->fwork[42] * 2.0f, boss->fwork[42], boss->fwork[42] * 2.0f, 1); + Matrix_Translate(gGfxMatrix, boss->fwork[38], boss->fwork[39], boss->fwork[40], MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, boss->obj.rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, boss->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, boss->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, boss->fwork[42] * 2.0f, boss->fwork[42], boss->fwork[42] * 2.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); } @@ -1869,9 +1868,9 @@ void SectorY_8019E2C4(Boss* boss) { gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 0); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, boss->obj.pos.x, 157.0f, boss->obj.pos.z, 1); - Matrix_RotateX(gGfxMatrix, M_PI / 2, 1); - Matrix_Scale(gGfxMatrix, boss->fwork[43], boss->fwork[43], boss->fwork[43], 1); + Matrix_Translate(gGfxMatrix, boss->obj.pos.x, 157.0f, boss->obj.pos.z, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, boss->fwork[43], boss->fwork[43], boss->fwork[43], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); } @@ -1882,11 +1881,12 @@ void SectorY_8019E2C4(Boss* boss) { gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 0); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, boss->obj.pos.x + 10.0f, boss->obj.pos.y + 70.0f, boss->obj.pos.z + 60.0f, 1); - Matrix_Scale(gGfxMatrix, 0.4f, 0.2f, 0.2f, 1); + Matrix_Translate(gGfxMatrix, boss->obj.pos.x + 10.0f, boss->obj.pos.y + 70.0f, boss->obj.pos.z + 60.0f, + MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.4f, 0.2f, 0.2f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); - Matrix_Translate(gGfxMatrix, -46.0f, 0, 0, 1); + Matrix_Translate(gGfxMatrix, -46.0f, 0, 0, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); } @@ -1958,15 +1958,15 @@ void SectorY_8019EE60(Player* player) { case 0: gCsFrameCount = 0; player->unk_4D8 = 0.0f; - player->unk_034 = 0.0f; + player->camRoll = 0.0f; player->unk_0D0 = 40.0f; player->unk_110 = 0.0f; player->wings.unk_04 = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = player->unk_130 = player->unk_12C = 0.0f; player->unk_234 = 1; D_ctx_80177A48[8] = Math_RadToDeg( - Math_Atan2F(gPlayer[0].camEye.x - boss->obj.pos.x, gPlayer[0].camEye.z - boss->obj.pos.z)); - Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[8] * M_DTOR, 0); + Math_Atan2F(gPlayer[0].cam.eye.x - boss->obj.pos.x, gPlayer[0].cam.eye.z - boss->obj.pos.z)); + Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[8] * M_DTOR, MTXF_NEW); sp60.x = 0.0f; sp60.y = 0.0f; sp60.z = 1400.0f; @@ -2004,7 +2004,7 @@ void SectorY_8019EE60(Player* player) { Math_SmoothStepToAngle(&player->unk_0EC, -temp_ft1, 0.1f, 5.0f, 0.0001f); if (gCsFrameCount < 180) { D_ctx_80177A48[8] += D_ctx_80177A48[9]; - Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[8] * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[8] * M_DTOR, MTXF_NEW); sp60.x = 0.0f; sp60.y = 0.0f; sp60.z = 1400.0f; @@ -2061,7 +2061,7 @@ void SectorY_8019EE60(Player* player) { D_ctx_80177A48[7] = 25.0f; D_ctx_80177A48[8] = 500.0f; D_ctx_80177A48[9] = 3600.0f; - player->wings.unk_2C = 1; + player->wings.modelId = 1; } break; case 3: @@ -2081,7 +2081,7 @@ void SectorY_8019EE60(Player* player) { AUDIO_PLAY_SFX(0x09000013, player->sfxSource, 0); } D_ctx_80177A48[1] += D_ctx_80177A48[2]; - Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, MTXF_NEW); sp60.y = 0.0f; sp60.z = 0.0f; sp60.x = D_ctx_80177A48[8]; @@ -2122,7 +2122,7 @@ void SectorY_8019EE60(Player* player) { gFillScreenAlphaStep = 8; if (gFillScreenAlpha == 255) { Audio_FadeOutAll(10); - player->state_1C8 = PLAYERSTATE_1C8_6; + player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; D_ctx_8017837C = 4; D_play_800D3180[LEVEL_SECTOR_Y] = Play_CheckMedalStatus(150) + 1; @@ -2225,8 +2225,8 @@ void SectorY_8019EE60(Player* player) { } break; } - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4) * M_DTOR), 1); + Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4) * M_DTOR), MTXF_APPLY); sp60.x = 0.0f; sp60.y = 0.0f; sp60.z = player->unk_0D0; @@ -2239,12 +2239,12 @@ void SectorY_8019EE60(Player* player) { player->pos.z += player->vel.z; player->unk_138 = player->pos.z; player->unk_0F8 = player->unk_0EC; - Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0.0f); player->unk_088 += 10.0f; player->unk_080 = -SIN_DEG(player->unk_088) * 0.3f; player->unk_0F4 += 8.0f; @@ -2333,8 +2333,8 @@ void SectorY_8019FF00(Actor* actor) { break; } if (actor->state != 6) { - Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -(actor->unk_0F4.x * M_DTOR), 1); + Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(actor->unk_0F4.x * M_DTOR), MTXF_APPLY); sp4C.x = 0.0f; sp4C.y = 0.0f; sp4C.z = actor->fwork[0]; @@ -2440,16 +2440,16 @@ void SectorY_801A07FC(Actor* actor0, Actor* actor1) { sp3C.x = -40.0f; sp3C.y = 0.0f; sp3C.z = 80.0f; - Matrix_RotateY(gCalcMatrix, actor0->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, actor0->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, actor0->obj.rot.z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, actor0->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, actor0->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, actor0->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &sp3C, &sp30); actor1->obj.pos.x = actor0->obj.pos.x + sp30.x; actor1->obj.pos.y = actor0->obj.pos.y + sp30.y; actor1->obj.pos.z = actor0->obj.pos.z + sp30.z; Object_SetInfo(&actor1->info, actor1->obj.id); - Matrix_RotateY(gCalcMatrix, actor0->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, actor0->obj.rot.x * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, actor0->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, actor0->obj.rot.x * M_DTOR, MTXF_APPLY); sp3C.x = 0.0f; sp3C.y = 0.0f; sp3C.z = 160.0f; @@ -2498,15 +2498,15 @@ void SectorY_801A0AC0(Player* player) { SectorY_801A0510(&gActors[i + 5], i); } player->unk_1D0 = 1; - player->camEye.x = gCsCamEyeX = -2000.0f; - player->camEye.y = gCsCamEyeY = 0.0f; - player->camEye.z = gCsCamEyeZ = -1700.0f; - player->camAt.x = gCsCamAtX = gActors[8].obj.pos.x; - player->camAt.y = gCsCamAtY = gActors[8].obj.pos.y; - player->camAt.z = gCsCamAtZ = gActors[8].obj.pos.z; + player->cam.eye.x = gCsCamEyeX = -2000.0f; + player->cam.eye.y = gCsCamEyeY = 0.0f; + player->cam.eye.z = gCsCamEyeZ = -1700.0f; + player->cam.at.x = gCsCamAtX = gActors[8].obj.pos.x; + player->cam.at.y = gCsCamAtY = gActors[8].obj.pos.y; + player->cam.at.z = gCsCamAtZ = gActors[8].obj.pos.z; D_ctx_80177A48[0] = 0.0f; player->pos.y = 5000.0f; - player->unk_034 = 0.0f; + player->camRoll = 0.0f; player->unk_0D0 = 0.0f; gActors[5].fwork[2] = gActors[6].fwork[2] = gActors[7].fwork[2] = 0.2f; gActors[5].obj.rot.z = 30.0f; @@ -2545,8 +2545,8 @@ void SectorY_801A0AC0(Player* player) { sp8C = gActors[spB0].obj.pos.z - sp80; sp84 = Math_RadToDeg(Math_Atan2F(sp94, sp8C)); sp88 = Math_RadToDeg(-Math_Atan2F(sp90, sqrtf(SQ(sp94) + SQ(sp8C)))); - Matrix_RotateY(gCalcMatrix, M_DTOR * sp84, 0); - Matrix_RotateX(gCalcMatrix, M_DTOR * sp88, 1); + Matrix_RotateY(gCalcMatrix, M_DTOR * sp84, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, M_DTOR * sp88, MTXF_APPLY); spA4.x = 0.0f; spA4.y = 0.0f; spA4.z = 100.0f; @@ -2612,9 +2612,9 @@ void SectorY_801A0AC0(Player* player) { } if (((gGameFrameCount % 2) == 0) && (gCsFrameCount >= 110)) { - Matrix_RotateY(gCalcMatrix, gActors[8].obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, gActors[8].obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, gActors[8].obj.rot.z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, gActors[8].obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, gActors[8].obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, gActors[8].obj.rot.z * M_DTOR, MTXF_APPLY); spA4.x = RAND_FLOAT_CENTERED(100.0f) + 1500.0f; spA4.y = RAND_FLOAT_CENTERED(500.0f) + -500.0f; spA4.z = RAND_FLOAT_CENTERED(5000.0f) + 170.0f; @@ -2660,8 +2660,8 @@ void SectorY_801A0AC0(Player* player) { sp8C = -1000.0f - gActors[8].obj.pos.z; sp84 = Math_RadToDeg(Math_Atan2F(sp94, sp8C)); sp88 = Math_RadToDeg(-Math_Atan2F(sp90, sqrtf(SQ(sp94) + SQ(sp8C)))); - Matrix_RotateY(gCalcMatrix, M_DTOR * sp84, 0); - Matrix_RotateX(gCalcMatrix, M_DTOR * sp88, 1); + Matrix_RotateY(gCalcMatrix, M_DTOR * sp84, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, M_DTOR * sp88, MTXF_APPLY); spA4.x = 0.0f; spA4.y = 0.0f; spA4.z = 100.0f; @@ -2734,12 +2734,12 @@ void SectorY_801A0AC0(Player* player) { gFillScreenAlphaTarget = 0; Object_Kill(&gActors[8].obj, gActors[8].sfxSource); player->unk_1D0++; - player->camEye.x = gCsCamEyeX = 0.0f; - player->camEye.y = gCsCamEyeY = 0.0f; - player->camEye.z = gCsCamEyeZ = 0.0f; - player->camAt.x = gCsCamAtX = -5600.0f; - player->camAt.y = gCsCamAtY = 0.0f; - player->camAt.z = gCsCamAtZ = 0.0f; + player->cam.eye.x = gCsCamEyeX = 0.0f; + player->cam.eye.y = gCsCamEyeY = 0.0f; + player->cam.eye.z = gCsCamEyeZ = 0.0f; + player->cam.at.x = gCsCamAtX = -5600.0f; + player->cam.at.y = gCsCamAtY = 0.0f; + player->cam.at.z = gCsCamAtZ = 0.0f; gActors[5].obj.pos.x = -4800.0f; gActors[5].obj.pos.y = 0.0f; gActors[5].obj.pos.z = 0.0f; @@ -2774,15 +2774,15 @@ void SectorY_801A0AC0(Player* player) { Math_SmoothStepToF(&D_ctx_80177A48[2], 2.0f, 0.1f, 0.05f, 0); Math_SmoothStepToF(&D_ctx_80177A48[3], 100.0f, 1.0f, 1.0f, 0); Math_SmoothStepToF(&D_ctx_80177A48[4], 400.0f, 1.0f, 10.0f, 0); - gCsCamAtX = player->camAt.x = gActors[5].obj.pos.x; - Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, 0); + gCsCamAtX = player->cam.at.x = gActors[5].obj.pos.x; + Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, MTXF_NEW); spA4.x = D_ctx_80177A48[4] + 400.0f; spA4.y = 0.0f; spA4.z = 0.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &spA4, &sp98); - player->camEye.x = gCsCamEyeX = sp98.x; - player->camEye.y = gCsCamEyeY = D_ctx_80177A48[3] + sp98.y; - player->camEye.z = gCsCamEyeZ = sp98.z; + player->cam.eye.x = gCsCamEyeX = sp98.x; + player->cam.eye.y = gCsCamEyeY = D_ctx_80177A48[3] + sp98.y; + player->cam.eye.z = gCsCamEyeZ = sp98.z; } if (gCsFrameCount == 280) { gActors[5].iwork[4] = gActors[6].iwork[4] = gActors[7].iwork[4] = 1; @@ -2921,16 +2921,16 @@ void SectorY_801A0AC0(Player* player) { Math_SmoothStepToF(&D_ctx_80177A48[3], 100.0f, 1.0f, 1.0f, 0); Math_SmoothStepToF(&D_ctx_80177A48[4], 400.0f, 1.0f, 10.0f, 0); if (gCsFrameCount <= 410) { - gCsCamAtX = player->camAt.x = gActors[5].obj.pos.x; + gCsCamAtX = player->cam.at.x = gActors[5].obj.pos.x; } - Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, 0); + Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, MTXF_NEW); spA4.x = D_ctx_80177A48[4] + 400.0f; spA4.y = 0.0f; spA4.z = 0.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &spA4, &sp98); - player->camEye.x = gCsCamEyeX = sp98.x; - player->camEye.y = gCsCamEyeY = D_ctx_80177A48[3] + sp98.y; - player->camEye.z = gCsCamEyeZ = sp98.z; + player->cam.eye.x = gCsCamEyeX = sp98.x; + player->cam.eye.y = gCsCamEyeY = D_ctx_80177A48[3] + sp98.y; + player->cam.eye.z = gCsCamEyeZ = sp98.z; } if (gCsFrameCount >= 390) { if (gActors[6].iwork[4] != 0) { @@ -3031,7 +3031,7 @@ void SectorY_801A0AC0(Player* player) { if ((gActors[5].iwork[4] == 6) && (gCsFrameCount == 550)) { Object_Kill(&gActors[10].obj, gActors[10].sfxSource); - D_ctx_80178488 = 1; + gLoadLevelObjects = 1; } if (gCsFrameCount >= 530) { Math_SmoothStepToF(&gActors[5].vel.z, -40.0f, 1.0f, 1.0f, 1.0f); @@ -3181,7 +3181,7 @@ void SectorY_801A0AC0(Player* player) { player->unk_0D0 = D_play_80161A54; AUDIO_PLAY_BGM(SEQ_ID_SECTOR_Y | SEQ_FLAG); gLevelStatusScreenTimer = 100; - player->state_1C8 = PLAYERSTATE_1C8_3; + player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_1D0 = 0; player->timer_1F8 = 0; player->timer_1FC = 0; @@ -3191,28 +3191,28 @@ void SectorY_801A0AC0(Player* player) { gCsCamAtX = player->pos.x; gCsCamAtY = (player->pos.y * player->unk_148) + 20.0f; gCsCamAtZ = player->unk_138; - player->camEye.x = player->pos.x; - player->camEye.y = player->pos.y * player->unk_148; - player->camEye.y += 50.0f; - player->camEye.z = 400.0f; - player->camAt.x = player->pos.x; - player->camAt.y = player->pos.y * player->unk_148; - player->camAt.y += 20.0f; - player->camAt.z = player->unk_138 - 41.0f; + player->cam.eye.x = player->pos.x; + player->cam.eye.y = player->pos.y * player->unk_148; + player->cam.eye.y += 50.0f; + player->cam.eye.z = 400.0f; + player->cam.at.x = player->pos.x; + player->cam.at.y = player->pos.y * player->unk_148; + player->cam.at.y += 20.0f; + player->cam.at.z = player->unk_138 - 41.0f; for (i = 0; i < 11; i++) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); } } break; } - Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_ctx_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_ctx_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_ctx_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_ctx_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_ctx_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_ctx_80177A48[0], 20000.0f, 0); - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), 1); + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 20000.0f, 0); + Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), MTXF_APPLY); spA4.x = 0.0f; spA4.y = 0.0f; spA4.z = player->unk_0D0; @@ -3441,13 +3441,13 @@ void SectorY_Actor204_Update(Actor204* this) { break; } if ((this->unk_046 == 1) || (this->unk_046 == 2)) { - Matrix_RotateZ(gCalcMatrix, -this->vwork[29].z * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -this->vwork[29].x * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, -this->vwork[29].y * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, -this->obj.rot.z * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, -this->obj.rot.x * M_DTOR, 1); + Matrix_RotateZ(gCalcMatrix, -this->vwork[29].z * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -this->vwork[29].x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -this->vwork[29].y * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -this->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, -this->obj.rot.x * M_DTOR, MTXF_APPLY); if (this->iwork[17] == 0) { - Matrix_RotateY(gCalcMatrix, -this->obj.rot.y * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, -this->obj.rot.y * M_DTOR, MTXF_APPLY); } sp5C.x = gPlayer[0].pos.x - this->obj.pos.x; sp5C.y = gPlayer[0].pos.y - this->obj.pos.y; @@ -3615,8 +3615,8 @@ void SectorY_Actor204_Draw(Actor204* this) { gDPSetEnvColor(gMasterDisp++, 255, 48, 0, 255); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, this->fwork[16], this->fwork[17], this->fwork[18] + D_ctx_80177D20, 1); - Matrix_Scale(gGfxMatrix, scale, scale, scale, 1); + Matrix_Translate(gGfxMatrix, this->fwork[16], this->fwork[17], this->fwork[18] + D_ctx_80177D20, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); @@ -3632,9 +3632,9 @@ void SectorY_801A4E44(Object_80* obj80) { obj80->state++; } if (((gGameFrameCount % 4) == 0)) { - Matrix_RotateY(gCalcMatrix, obj80->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, obj80->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, obj80->obj.rot.z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, obj80->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, obj80->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, obj80->obj.rot.z * M_DTOR, MTXF_APPLY); sp3C.x = RAND_FLOAT_CENTERED(100.0f) + 500.0f; sp3C.y = RAND_FLOAT_CENTERED(900.0f) + -150.0f; sp3C.z = 90.0f - RAND_FLOAT(50.0f); @@ -3671,9 +3671,9 @@ void SectorY_801A52B8(Object_80* obj80) { obj80->state++; } if (((gGameFrameCount % 4) == 0)) { - Matrix_RotateY(gCalcMatrix, obj80->obj.rot.y * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, obj80->obj.rot.x * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, obj80->obj.rot.z * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, obj80->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, obj80->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, obj80->obj.rot.z * M_DTOR, MTXF_APPLY); sp44.x = RAND_FLOAT_CENTERED(100.0f) + -800.0f; sp44.y = RAND_FLOAT_CENTERED(300.0f) + -100.0f; sp44.z = RAND_FLOAT_CENTERED(5000.0f) + 500.0f; diff --git a/src/overlays/ovl_i6/fox_turret.c b/src/overlays/ovl_i6/fox_turret.c index 232915b2..9842cf8d 100644 --- a/src/overlays/ovl_i6/fox_turret.c +++ b/src/overlays/ovl_i6/fox_turret.c @@ -6,22 +6,22 @@ void Turret_801A5560(Player* player, PlayerShot* shot, f32 xOffset, f32 yOffset, Vec3f sp34; PlayerShot_Initialize(shot); - Matrix_RotateY(gCalcMatrix, player->unk_000 * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, player->unk_004 * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, player->unk_0EC * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, player->unk_180 * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, player->unk_17C * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, player->unk_000 * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, player->unk_004 * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, player->unk_0EC * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, player->unk_180 * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, player->unk_17C * M_DTOR, MTXF_APPLY); sp4C.x = xOffset; sp4C.y = yOffset; sp4C.z = zOffset; Matrix_MultVec3f(gCalcMatrix, &sp4C, &sp34); - Matrix_RotateY(gCalcMatrix, player->unk_000 * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, player->unk_004 * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, player->unk_0EC * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, player->unk_180 * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, player->unk_17C * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, player->unk_0E8 * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, player->unk_000 * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, player->unk_004 * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, player->unk_0EC * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, player->unk_180 * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, player->unk_17C * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, player->unk_0E8 * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, MTXF_APPLY); sp4C.x = sp4C.y = 0.0f; sp4C.z = speed; Matrix_MultVec3f(gCalcMatrix, &sp4C, &sp40); @@ -215,21 +215,21 @@ void Turret_801A5FC0(Player* player) { sp3C.x = 0.0f; sp3C.y = 0.0f; sp3C.z = 100.0f; - Matrix_RotateY(gCalcMatrix, (player->unk_000 + (player->unk_134 * 0.3f)) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, (player->unk_004 + (player->unk_134 * 0.3f)) * M_DTOR, 1); - Matrix_RotateZ(gCalcMatrix, player->unk_0EC * M_DTOR, 1); - Matrix_RotateY(gCalcMatrix, player->unk_180 * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, player->unk_17C * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, (player->unk_000 + (player->unk_134 * 0.3f)) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, (player->unk_004 + (player->unk_134 * 0.3f)) * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, player->unk_0EC * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, player->unk_180 * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, player->unk_17C * M_DTOR, MTXF_APPLY); // unclear what values are being multiplied by 0.0f - Matrix_RotateY(gCalcMatrix, (0.0f * player->unk_000) * M_DTOR, 1); - Matrix_RotateX(gCalcMatrix, (0.0f * player->unk_004) * M_DTOR, 1); + Matrix_RotateY(gCalcMatrix, (0.0f * player->unk_000) * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, (0.0f * player->unk_004) * M_DTOR, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &sp3C, &sp30); - player->camAt.x = player->pos.x + sp30.x; - player->camAt.y = player->pos.y + sp30.y; - player->camAt.z = player->pos.z + D_ctx_80177D20 + sp30.z; - player->camEye.x = player->pos.x; - player->camEye.y = player->pos.y; - player->camEye.z = player->pos.z + D_ctx_80177D20; + player->cam.at.x = player->pos.x + sp30.x; + player->cam.at.y = player->pos.y + sp30.y; + player->cam.at.z = player->pos.z + D_ctx_80177D20 + sp30.z; + player->cam.eye.x = player->pos.x; + player->cam.eye.y = player->pos.y; + player->cam.eye.z = player->pos.z + D_ctx_80177D20; } void Turret_801A6164(Player* player) { @@ -244,15 +244,15 @@ void Turret_801A6164(Player* player) { Matrix_Push(&gGfxMatrix); RCP_SetupDL_36(); - Matrix_Translate(gGfxMatrix, 0.0f, -100.0f, 0.0f, 1); - Matrix_RotateY(gGfxMatrix, player->unk_0E8 * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, -player->unk_0E4 * M_DTOR, 1); + Matrix_Translate(gGfxMatrix, 0.0f, -100.0f, 0.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, player->unk_0E8 * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -player->unk_0E4 * M_DTOR, MTXF_APPLY); if (player->unk_1B0 < 2) { - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -5000.0f + (player->unk_1BC * 25), 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -5000.0f + (player->unk_1BC * 25), MTXF_APPLY); } else { - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -5000.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -5000.0f, MTXF_APPLY); } - Matrix_Scale(gGfxMatrix, 12.0f, 12.0f, 1.0f, 1); + Matrix_Scale(gGfxMatrix, 12.0f, 12.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); Matrix_Pop(&gGfxMatrix); RCP_SetupDL_27(); @@ -262,36 +262,36 @@ void Turret_801A6164(Player* player) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); } Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, -100.0f, -100.0f, -200.0f + player->unk_1BC, 1); - Matrix_RotateY(gGfxMatrix, player->unk_0E8 * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, -player->unk_0E4 * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 1.0f, 1); + Matrix_Translate(gGfxMatrix, -100.0f, -100.0f, -200.0f + player->unk_1BC, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, player->unk_0E8 * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -player->unk_0E4 * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 100.0f, -100.0f, -200.0f + player->unk_1BC, 1); - Matrix_RotateY(gGfxMatrix, player->unk_0E8 * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, -player->unk_0E4 * M_DTOR, 1); - Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 1.0f, 1); + Matrix_Translate(gGfxMatrix, 100.0f, -100.0f, -200.0f + player->unk_1BC, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, player->unk_0E8 * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -player->unk_0E4 * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); Matrix_Pop(&gGfxMatrix); if ((player->unk_1BC > 20) && (player->unk_1B0 >= 2)) { RCP_SetupDL_64(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 128); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, -100.0f, -100.0f, -200.0f + player->unk_1BC, 1); - Matrix_RotateY(gGfxMatrix, player->unk_0E8 * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, -player->unk_0E4 * M_DTOR, 1); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -188.0f, 1); - Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, 1); + Matrix_Translate(gGfxMatrix, -100.0f, -100.0f, -200.0f + player->unk_1BC, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, player->unk_0E8 * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -player->unk_0E4 * M_DTOR, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -188.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 100.0f, -100.0f, -200.0f + player->unk_1BC, 1); - Matrix_RotateY(gGfxMatrix, player->unk_0E8 * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, -player->unk_0E4 * M_DTOR, 1); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -188.0f, 1); - Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, 1); + Matrix_Translate(gGfxMatrix, 100.0f, -100.0f, -200.0f + player->unk_1BC, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, player->unk_0E8 * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -player->unk_0E4 * M_DTOR, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -188.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); Matrix_Pop(&gGfxMatrix); } diff --git a/src/overlays/ovl_i6/fox_ve2.c b/src/overlays/ovl_i6/fox_ve2.c index 0f4349eb..06822e6d 100644 --- a/src/overlays/ovl_i6/fox_ve2.c +++ b/src/overlays/ovl_i6/fox_ve2.c @@ -47,7 +47,7 @@ void Venom2_80196314(Actor* actor) { gStarWolfTeamAlive[i] = 1; } - if (player->state_1C8 == PLAYERSTATE_1C8_3) { + if (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) { actor->state = 2; player->pos.x = 0.0f; player->pos.z = 8000.0f; @@ -84,7 +84,7 @@ void Venom2_80196314(Actor* actor) { if (actor->timer_0BC == 0) { otherActor->state = 2; actor->state = 2; - player->state_1C8 = PLAYERSTATE_1C8_3; + player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_014 = 0.0001f; gLevelStatusScreenTimer = 80; } @@ -100,7 +100,7 @@ void Venom2_80196314(Actor* actor) { (gActors[7].obj.status == OBJ_FREE) && (actor->timer_0BE == 0)) { actor->timer_0BE = 80; } - if ((actor->timer_0BE == 1) && (player->state_1C8 != PLAYERSTATE_1C8_7)) { + if ((actor->timer_0BE == 1) && (player->state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) { for (i = 1; i < ARRAY_COUNT(gTeamShields); i++) { gPrevPlanetTeamShields[i] = gSavedTeamShields[i]; @@ -108,7 +108,7 @@ void Venom2_80196314(Actor* actor) { gSavedTeamShields[i] = gTeamShields[i]; } - player->state_1C8 = PLAYERSTATE_1C8_7; + player->state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; player->unk_1D0 = 0; D_play_800D3180[gCurrentLevel] = 2; D_ctx_80177C94 = gGoldRingCount[0]; @@ -123,17 +123,17 @@ void Venom2_80196314(Actor* actor) { case 3: gPauseEnabled = 0; if (gStarWolfMsgTimer < 600) { - player->camEye.x += actor4->vel.x * 0.23f; - player->camEye.y += actor4->vel.y * 0.23f; - player->camEye.z += actor4->vel.z * 0.23f; + player->cam.eye.x += actor4->vel.x * 0.23f; + player->cam.eye.y += actor4->vel.y * 0.23f; + player->cam.eye.z += actor4->vel.z * 0.23f; } - Math_SmoothStepToF(&player->camAt.x, actor4->obj.pos.x, 1.0f, 20000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.y, actor4->obj.pos.y, 1.0f, 20000.0f, 0.0f); - Math_SmoothStepToF(&player->camAt.z, actor4->obj.pos.z, 1.0f, 20000.0f, 0.0f); - Math_SmoothStepToF(&player->unk_034, 0, 0.1f, 0.2f, 0.0f); + Math_SmoothStepToF(&player->cam.at.x, actor4->obj.pos.x, 1.0f, 20000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.y, actor4->obj.pos.y, 1.0f, 20000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.z, actor4->obj.pos.z, 1.0f, 20000.0f, 0.0f); + Math_SmoothStepToF(&player->camRoll, 0, 0.1f, 0.2f, 0.0f); if ((gControllerPress->button & START_BUTTON) || (gAllRangeEventTimer == (D_360_800C9B4C + 300))) { actor->state = 2; - player->state_1C8 = PLAYERSTATE_1C8_3; + player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; func_play_800B7184(player, 1); player->unk_014 = 0.0f; D_hud_80161708 = 0; @@ -227,8 +227,8 @@ void Venom2_80196BF8(Player* player) { gFillScreenAlphaStep = 3; gFillScreenAlphaTarget = 0; } - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), 1); + Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); vec.x = 0.0f; vec.y = 0.0f; vec.z = player->unk_0D0 + player->unk_110; @@ -242,12 +242,12 @@ void Venom2_80196BF8(Player* player) { player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; player->unk_138 = player->pos.z; - player->camEye.x = 50.0f; - player->camEye.y = 1800.0f; - player->camEye.z = 9000.0f; - player->camAt.x = player->pos.x; - player->camAt.y = player->pos.y; - player->camAt.z = player->pos.z; + player->cam.eye.x = 50.0f; + player->cam.eye.y = 1800.0f; + player->cam.eye.z = 9000.0f; + player->cam.at.x = player->pos.x; + player->cam.at.y = player->pos.y; + player->cam.at.z = player->pos.z; } void Venom2_80196D88(Player* player) { @@ -300,7 +300,7 @@ void Venom2_80196D88(Player* player) { case 0: player->unk_1D0++; player->wings.unk_04 = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = 0.0f; - player->wings.unk_2C = 1; + player->wings.modelId = 1; D_ctx_80177A48[0] = 0.0f; D_ctx_80177A48[1] = 0.1f; D_ctx_80177A48[3] = 0.0f; @@ -311,7 +311,7 @@ void Venom2_80196D88(Player* player) { sp64.x = 0.0f; sp64.y = 0.0f; sp64.z = 5000.0f; - Matrix_RotateY(gCalcMatrix, player->unk_114, 0); + Matrix_RotateY(gCalcMatrix, player->unk_114, MTXF_NEW); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp64, &sp58); D_ctx_80177A48[5] = sp58.x; D_ctx_80177A48[6] = sp58.z; @@ -347,8 +347,8 @@ void Venom2_80196D88(Player* player) { pad80 = Math_SmoothStepToAngle(&player->unk_114, sp84, 0.1f, D_ctx_80177A48[4], 0.0f) * 20.0f; Math_SmoothStepToF(&player->unk_0EC, pad80, 0.1f, 3.0f, 0.0f); Math_SmoothStepToF(&D_ctx_80177A48[4], 3.0f, 1.0f, 0.1f, 0.0f); - Matrix_RotateX(gCalcMatrix, -(D_PI / 9), 0); - Matrix_RotateY(gCalcMatrix, (D_ctx_80177A48[3] + player->unk_114) * M_DTOR, 1); + Matrix_RotateX(gCalcMatrix, -(D_PI / 9), MTXF_NEW); + Matrix_RotateY(gCalcMatrix, (D_ctx_80177A48[3] + player->unk_114) * M_DTOR, MTXF_APPLY); D_ctx_80177A48[3] += 1.0f; sp64.x = 0.0f; sp64.y = 0.0f; @@ -358,7 +358,7 @@ void Venom2_80196D88(Player* player) { gCsCamEyeY = player->pos.y + sp58.y; gCsCamEyeZ = player->pos.z + sp58.z; Math_SmoothStepToF(D_ctx_80177A48, 0.5f, 1.0f, 0.01f, 0.0f); - Math_SmoothStepToF(&player->unk_034, 0.0f, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f); if ((player->timer_1F8 == 0) && (fabsf(sp94) < 50.0f) && (fabsf(sp8C) < 50.0f)) { player->unk_1D0++; D_ctx_80177A48[2] = 0.75f; @@ -448,8 +448,8 @@ void Venom2_80196D88(Player* player) { gCsCamAtX = player->pos.x; gCsCamAtY = player->pos.y; gCsCamAtZ = player->unk_138; - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, 0); - Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), 1); + Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); sp64.x = 0.0f; sp64.y = 0.0f; sp64.z = player->unk_0D0 + player->unk_110; @@ -464,12 +464,12 @@ void Venom2_80196D88(Player* player) { player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; Math_SmoothStepToF(&player->unk_130, 0.0f, 0.1f, 15.0f, 0.0f); Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 5.0f, 0.0f); - Math_SmoothStepToF(&player->camEye.x, gCsCamEyeX, D_ctx_80177A48[0], 100.0f, 0); - Math_SmoothStepToF(&player->camEye.y, gCsCamEyeY, D_ctx_80177A48[0], 100.0f, 0); - Math_SmoothStepToF(&player->camEye.z, gCsCamEyeZ, D_ctx_80177A48[0], 100.0f, 0); - Math_SmoothStepToF(&player->camAt.x, gCsCamAtX, D_ctx_80177A48[1], 100.0f, 0); - Math_SmoothStepToF(&player->camAt.y, gCsCamAtY, D_ctx_80177A48[1], 100.0f, 0); - Math_SmoothStepToF(&player->camAt.z, gCsCamAtZ, D_ctx_80177A48[1], 100.0f, 0); + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 100.0f, 0); + Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 100.0f, 0); + Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 100.0f, 0); + Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[1], 100.0f, 0); + Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[1], 100.0f, 0); + Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[1], 100.0f, 0); player->unk_088 += 10.0f; player->unk_080 = -SIN_DEG(player->unk_088) * 0.3f; player->unk_0F4 += 8.0f; diff --git a/src/overlays/ovl_menu/fox_i_menu.c b/src/overlays/ovl_menu/fox_i_menu.c index 4f1b3ba3..3525f6e4 100644 --- a/src/overlays/ovl_menu/fox_i_menu.c +++ b/src/overlays/ovl_menu/fox_i_menu.c @@ -14,35 +14,35 @@ s32 D_menu_801AD9F0 = 0; void OvlMenu_CallFunction(u32 mode, void* ptr) { switch (mode) { - case 103: + case OVLCALL_TITLE_UPDATE: Title_80187754(); break; - case 104: + case OVLCALL_TITLE_DRAW: Title_801878D8(); break; - case 105: + case OVLCALL_MAP_UPDATE: Map_8019E8D0(); break; - case 106: + case OVLCALL_MAP_DRAW: Map_801A01A8(); break; - case 107: + case OVLCALL_OPTION_UPDATE: Option_Init(); break; - case 108: + case OVLCALL_OPTION_DRAW: Option_DrawEntry(); break; - case 109: + case OVLCALL_GAME_OVER_UPDATE: Map_8019E85C(); break; - case 110: + case OVLCALL_UNKMAP_DRAW: Map_8019E8C8(); default: diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index 0c57aaff..f94c7875 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -1883,8 +1883,8 @@ void Map_801A01A8(void) { Matrix_Push(&gGfxMatrix); Matrix_LookAt(gGfxMatrix, D_menu_801CD9F4, D_menu_801CD9F8, D_menu_801CD9FC, D_menu_801CDA00, D_menu_801CDA04, - D_menu_801CDA08, D_menu_801CDA20, D_menu_801CDA24, D_menu_801CDA28, 1); - Matrix_Translate(gGfxMatrix, D_menu_801CEA58, D_menu_801CEA5C, D_menu_801CEA60, 1); + D_menu_801CDA08, D_menu_801CDA20, D_menu_801CDA24, D_menu_801CDA28, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, D_menu_801CEA58, D_menu_801CEA5C, D_menu_801CEA60, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if (D_menu_801CD974 && D_menu_801CD944 != 0) { @@ -2218,8 +2218,8 @@ void Map_801A116C(void) { src.y = 0.0f; src.z = 100.0f; - Matrix_RotateY(gCalcMatrix, M_DTOR * 22.0f, 0); - Matrix_RotateX(gCalcMatrix, M_DTOR * -70.0f, 1); + Matrix_RotateY(gCalcMatrix, M_DTOR * 22.0f, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, M_DTOR * -70.0f, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &src, &dest); if (D_menu_801CD948 >= 2) { @@ -2246,19 +2246,19 @@ void Map_801A116C(void) { if ((D_menu_801CD948 < 2) || (D_menu_801CD9E8 != 0)) { Matrix_Push(&gGfxMatrix); - Matrix_LookAt(gGfxMatrix, 0.0f, 0.0f, 430.0f, 0.0f, 180.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1); + Matrix_LookAt(gGfxMatrix, 0.0f, 0.0f, 430.0f, 0.0f, 180.0f, 0.0f, 0.0f, 1.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); Lights_SetOneLight(&gMasterDisp, dest.x, dest.y, dest.z, colR, colG, colB, 0, 0, 0); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, -60.0f, 293.0f, -360.0f, 1); - Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 3.0f, 1); + Matrix_Translate(gGfxMatrix, -60.0f, 293.0f, -360.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 3.0f, MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, M_DTOR * -15.0f, 1); - Matrix_RotateX(gGfxMatrix, M_DTOR * D_menu_801B6970, 1); - Matrix_RotateY(gGfxMatrix, M_DTOR * -90.0f, 1); + Matrix_RotateZ(gGfxMatrix, M_DTOR * -15.0f, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_DTOR * D_menu_801B6970, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_DTOR * -90.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -2269,7 +2269,7 @@ void Map_801A116C(void) { // clang-format on wings.unk_14 = 0.0f; - wings.unk_2C = 1; + wings.modelId = 1; wings.unk_30 = 0.0f; wings.unk_34 = 0.0f; wings.unk_38 = 0.0f; @@ -3416,17 +3416,17 @@ void Map_801A4650(void) { Matrix_Push(&gGfxMatrix); - Matrix_LookAt(gGfxMatrix, 0.0f, 0.0f, 500.0f, 0.0f, 0.0f, -500.0f, 0.0f, 1.0f, 0.0f, 1); + Matrix_LookAt(gGfxMatrix, 0.0f, 0.0f, 500.0f, 0.0f, 0.0f, -500.0f, 0.0f, 1.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); for (i = 0; i < 8; i++) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_menu_801CF020[i], D_menu_801CF040[i], D_menu_801CF060[i], 1); - Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801CF0A8[i], 1); - Matrix_RotateX(gGfxMatrix, M_DTOR * D_menu_801CF088[i], 1); - Matrix_Scale(gGfxMatrix, D_menu_801CF080, D_menu_801CF080, D_menu_801CF080, 1); + Matrix_Translate(gGfxMatrix, D_menu_801CF020[i], D_menu_801CF040[i], D_menu_801CF060[i], MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801CF0A8[i], MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_DTOR * D_menu_801CF088[i], MTXF_APPLY); + Matrix_Scale(gGfxMatrix, D_menu_801CF080, D_menu_801CF080, D_menu_801CF080, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -3911,7 +3911,7 @@ void Map_801A5C90(void) { Matrix_Push(&gGfxMatrix); - Matrix_LookAt(gGfxMatrix, 0.0f, 0.0f, 100.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1); + Matrix_LookAt(gGfxMatrix, 0.0f, 0.0f, 100.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -3919,8 +3919,8 @@ void Map_801A5C90(void) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 45.0f, 32.0f, 0.01f, 1); - Matrix_Scale(gGfxMatrix, scale, scale, scale, 1); + Matrix_Translate(gGfxMatrix, 45.0f, 32.0f, 0.01f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -4296,10 +4296,10 @@ void Map_801A6694(void) { for (planetId = 0; planetId < PLANET_MAX; planetId++) { Matrix_Push(&gGfxMatrix); - Matrix_RotateY(gGfxMatrix, M_DTOR * sPlanets[planetId].longitude, 1); - Matrix_Translate(gGfxMatrix, sPlanets[planetId].orbit.radius, sPlanets[planetId].orbit.incl, 0.0f, 1); + Matrix_RotateY(gGfxMatrix, M_DTOR * sPlanets[planetId].longitude, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sPlanets[planetId].orbit.radius, sPlanets[planetId].orbit.incl, 0.0f, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, M_DTOR * -sPlanets[planetId].longitude, 1); + Matrix_RotateY(gGfxMatrix, M_DTOR * -sPlanets[planetId].longitude, MTXF_APPLY); Map_801AD048(); @@ -4318,9 +4318,9 @@ void Map_801A6694(void) { Matrix_Push(&gGfxMatrix); Matrix_LookAt(gGfxMatrix, D_menu_801CD9F4, D_menu_801CD9F8, D_menu_801CD9FC, D_menu_801CDA00, D_menu_801CDA04, - D_menu_801CDA08, D_menu_801CDA20, D_menu_801CDA24, D_menu_801CDA28, 1); - Matrix_Translate(gGfxMatrix, D_menu_801CEA58, D_menu_801CEA5C, D_menu_801CEA60, 1); - Matrix_Mult(gGfxMatrix, &D_menu_801CDA60[planetId], 1); + D_menu_801CDA08, D_menu_801CDA20, D_menu_801CDA24, D_menu_801CDA28, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, D_menu_801CEA58, D_menu_801CEA5C, D_menu_801CEA60, MTXF_APPLY); + Matrix_Mult(gGfxMatrix, &D_menu_801CDA60[planetId], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -4513,21 +4513,21 @@ void Map_801A6EC0(PlanetId planetId) { Matrix_Push(&gGfxMatrix); - Matrix_Mult(gGfxMatrix, &D_menu_801CDA60[planetId], 1); + Matrix_Mult(gGfxMatrix, &D_menu_801CDA60[planetId], MTXF_APPLY); if (sPlanets[planetId].anim == PL_ANIM_ROTATE_Y) { if (planetId == PLANET_BOLSE) { - Matrix_RotateX(gGfxMatrix, M_DTOR * D_menu_801AFFF8, 1); - Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801AFFF4, 1); + Matrix_RotateX(gGfxMatrix, M_DTOR * D_menu_801AFFF8, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801AFFF4, MTXF_APPLY); } else { - Matrix_RotateX(gGfxMatrix, M_DTOR * D_menu_801B0000, 1); - Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801AFFFC, 1); + Matrix_RotateX(gGfxMatrix, M_DTOR * D_menu_801B0000, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801AFFFC, MTXF_APPLY); } } - Matrix_RotateZ(gGfxMatrix, M_DTOR * (sPlanets[planetId].orbit.tilt), 1); + Matrix_RotateZ(gGfxMatrix, M_DTOR * (sPlanets[planetId].orbit.tilt), MTXF_APPLY); - Matrix_Scale(gGfxMatrix, sPlanets[planetId].scale, sPlanets[planetId].scale, sPlanets[planetId].scale, 1); + Matrix_Scale(gGfxMatrix, sPlanets[planetId].scale, sPlanets[planetId].scale, sPlanets[planetId].scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -4543,8 +4543,8 @@ void Map_801A6EC0(PlanetId planetId) { src.y = 0.0f; src.z = 100.0f; - Matrix_RotateY(gCalcMatrix, M_DTOR * (-D_menu_801CDA10 - y1), 0); - Matrix_RotateX(gCalcMatrix, M_DTOR * (-D_menu_801CDA0C - x1), 1); + Matrix_RotateY(gCalcMatrix, M_DTOR * (-D_menu_801CDA10 - y1), MTXF_NEW); + Matrix_RotateX(gCalcMatrix, M_DTOR * (-D_menu_801CDA0C - x1), MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &src, &dst); @@ -4627,8 +4627,8 @@ void Map_801A74F4(PlanetId planetId) { Matrix_Push(&gGfxMatrix); Matrix_Copy(gGfxMatrix, &D_menu_801CDE20[planetId]); - Matrix_RotateZ(gGfxMatrix, M_DTOR * D_menu_801B6A74, 1); - Matrix_Scale(gGfxMatrix, 0.8f, 0.8f, 0.8f, 1); + Matrix_RotateZ(gGfxMatrix, M_DTOR * D_menu_801B6A74, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.8f, 0.8f, 0.8f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -4673,11 +4673,11 @@ void Map_801A77B0(PlanetId planetId) { Matrix_Copy(gGfxMatrix, &D_menu_801CDE20[planetId]); if ((planetId == 10) || (planetId == 7) || (planetId == 8)) { - Matrix_RotateY(gGfxMatrix, M_DTOR * 180.0f, 1); + Matrix_RotateY(gGfxMatrix, M_DTOR * 180.0f, MTXF_APPLY); } - Matrix_RotateZ(gGfxMatrix, M_DTOR * sPlanets[planetId].orbit.tilt, 1); - Matrix_Scale(gGfxMatrix, 1.6f, 1.6f, 1.6f, 1); + Matrix_RotateZ(gGfxMatrix, M_DTOR * sPlanets[planetId].orbit.tilt, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 1.6f, 1.6f, 1.6f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -4696,10 +4696,10 @@ void Map_801A791C(PlanetId planetId) { Matrix_Copy(gGfxMatrix, &D_menu_801CDE20[planetId]); - Matrix_RotateZ(gGfxMatrix, M_DTOR * -sPlanets[planetId].orbit.tilt, 1); - Matrix_RotateX(gGfxMatrix, M_DTOR * 20.0f, 1); + Matrix_RotateZ(gGfxMatrix, M_DTOR * -sPlanets[planetId].orbit.tilt, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_DTOR * 20.0f, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 3.0f, 1); + Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 3.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -4717,9 +4717,9 @@ void Map_801A7A84(PlanetId planetId) { Matrix_Push(&gGfxMatrix); Matrix_Copy(gGfxMatrix, &D_menu_801CDE20[planetId]); - Matrix_RotateZ(gGfxMatrix, M_DTOR * -sPlanets[planetId].orbit.tilt, 1); - Matrix_RotateX(gGfxMatrix, M_DTOR * 20.0f, 1); - Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 3.0f, 1); + Matrix_RotateZ(gGfxMatrix, M_DTOR * -sPlanets[planetId].orbit.tilt, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_DTOR * 20.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 3.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -4743,8 +4743,8 @@ void Map_801A7BEC(f32* zAngle, f32 next, f32 scale) { Matrix_Push(&gGfxMatrix); Matrix_Copy(gGfxMatrix, &D_menu_801CDE20[PLANET_VENOM]); - Matrix_RotateZ(gGfxMatrix, M_DTOR * (*zAngle), 1); - Matrix_Scale(gGfxMatrix, scale, scale, scale, 1); + Matrix_RotateZ(gGfxMatrix, M_DTOR * (*zAngle), MTXF_APPLY); + Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -4768,16 +4768,16 @@ void Map_801A7D3C(PlanetId planetId) { Matrix_Push(&gGfxMatrix); - Matrix_Mult(gGfxMatrix, &D_menu_801CDA60[planetId], 1); - Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801CEAF8[planetId], 1); - Matrix_Translate(gGfxMatrix, D_menu_801AFFB8[planetId], 0.0f, 0.0f, 1); - Matrix_RotateY(gGfxMatrix, M_DTOR * -D_menu_801CEAF8[planetId], 1); + Matrix_Mult(gGfxMatrix, &D_menu_801CDA60[planetId], MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801CEAF8[planetId], MTXF_APPLY); + Matrix_Translate(gGfxMatrix, D_menu_801AFFB8[planetId], 0.0f, 0.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_DTOR * -D_menu_801CEAF8[planetId], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); Matrix_Copy(&D_menu_801CE5A0[planetId], gGfxMatrix); - Matrix_RotateZ(gGfxMatrix, M_DTOR * D_menu_801CEAB8[planetId], 1); - Matrix_Scale(gGfxMatrix, scale, scale, scale, 1); + Matrix_RotateZ(gGfxMatrix, M_DTOR * D_menu_801CEAB8[planetId], MTXF_APPLY); + Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY); Matrix_MultVec3f(gGfxMatrix, &src, &dest); D_menu_801CEA18[planetId] = dest.z; @@ -4849,7 +4849,7 @@ void Map_801A809C(PlanetId planetId) { Matrix_Push(&gGfxMatrix); Matrix_Copy(gGfxMatrix, &D_menu_801CE1E0[planetId]); - Matrix_Translate(gGfxMatrix, 0.0f, -30.0f, 0.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, -30.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -4881,11 +4881,11 @@ void Map_801A809C(PlanetId planetId) { Matrix_Push(&gGfxMatrix); Matrix_Copy(gGfxMatrix, &D_menu_801CE5A0[planetId]); - Matrix_Translate(gGfxMatrix, 0.0f, -30.0f, 0.0f, 1); - Matrix_RotateZ(gGfxMatrix, M_DTOR * (i * -45.0f), 1); - Matrix_Translate(gGfxMatrix, 0.0f, D_menu_801CD99C, 0.0f, 1); - Matrix_RotateZ(gGfxMatrix, M_DTOR * (D_menu_801B6A78), 1); - Matrix_Scale(gGfxMatrix, scale, scale, scale, 1); + Matrix_Translate(gGfxMatrix, 0.0f, -30.0f, 0.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, M_DTOR * (i * -45.0f), MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, D_menu_801CD99C, 0.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, M_DTOR * (D_menu_801B6A78), MTXF_APPLY); + Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -4909,8 +4909,8 @@ void Map_801A809C(PlanetId planetId) { Matrix_Push(&gGfxMatrix); Matrix_Copy(gGfxMatrix, &D_menu_801CE5A0[planetId]); - Matrix_Translate(gGfxMatrix, 0.0f, -30.0f, 0.0f, 1); - Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 3.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, -30.0f, 0.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 3.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -4947,8 +4947,8 @@ void Map_801A809C(PlanetId planetId) { Matrix_Push(&gGfxMatrix); Matrix_Copy(gGfxMatrix, &D_menu_801CE5A0[planetId]); - Matrix_Translate(gGfxMatrix, 0.0f, -30.0f, 0.0f, 1); - Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 3.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, -30.0f, 0.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 3.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -5003,9 +5003,9 @@ void Map_801A8738(void) { Matrix_Push(&gGfxMatrix); Matrix_Copy(gGfxMatrix, &D_menu_801CDE20[PLANET_CORNERIA]); - Matrix_RotateZ(gGfxMatrix, M_DTOR * -50.0f, 1); - Matrix_Translate(gGfxMatrix, 0.0f, 25.0f, 0.0f, 1); - Matrix_Scale(gGfxMatrix, D_menu_801CEB3C, D_menu_801CEB3C, D_menu_801CEB3C, 1); + Matrix_RotateZ(gGfxMatrix, M_DTOR * -50.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, 25.0f, 0.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, D_menu_801CEB3C, D_menu_801CEB3C, D_menu_801CEB3C, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -5087,10 +5087,11 @@ void Map_801A89BC(PlanetId planetId, s32 arg1) { Matrix_Push(&gGfxMatrix); - Matrix_Mult(gGfxMatrix, &D_menu_801CDA60[planetId], 1); - Matrix_RotateZ(gGfxMatrix, M_DTOR * D_menu_801CEDB0[arg1][i], 1); - Matrix_Translate(gGfxMatrix, 0.0f, D_menu_801CED38[arg1][i], 0.0f, 1); - Matrix_Scale(gGfxMatrix, D_menu_801CEC48[arg1][i], D_menu_801CEC48[arg1][i], D_menu_801CEC48[arg1][i], 1); + Matrix_Mult(gGfxMatrix, &D_menu_801CDA60[planetId], MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, M_DTOR * D_menu_801CEDB0[arg1][i], MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, D_menu_801CED38[arg1][i], 0.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, D_menu_801CEC48[arg1][i], D_menu_801CEC48[arg1][i], D_menu_801CEC48[arg1][i], + MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -5119,10 +5120,10 @@ void Map_801A8F40(void) { Matrix_Push(&gGfxMatrix); - Matrix_Mult(gGfxMatrix, &D_menu_801CDA60[sCurrentPlanetId], 1); - Matrix_Translate(gGfxMatrix, 0.0f, D_menu_801CEAA8, 0.0f, 1); - Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801B6A7C, 1); - Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 3.0f, 1); + Matrix_Mult(gGfxMatrix, &D_menu_801CDA60[sCurrentPlanetId], MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, D_menu_801CEAA8, 0.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801B6A7C, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 3.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -5191,14 +5192,14 @@ void Map_801A9224(void) { for (i = 0; i < 42; i++) { Matrix_Push(&gGfxMatrix); - Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801AFA38[i].angle, 1); - Matrix_Translate(gGfxMatrix, D_menu_801AFA38[i].x, D_menu_801AFA38[i].y, 0.0f, 1); - Matrix_RotateY(gGfxMatrix, M_DTOR * -D_menu_801AFA38[i].angle, 1); + Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801AFA38[i].angle, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, D_menu_801AFA38[i].x, D_menu_801AFA38[i].y, 0.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_DTOR * -D_menu_801AFA38[i].angle, MTXF_APPLY); Map_801AD048(); Matrix_Scale(gGfxMatrix, D_menu_801AFA38[i].scale, D_menu_801AFA38[i].scale, D_menu_801AFA38[i].scale, - 1); + MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -5247,14 +5248,15 @@ void Map_801A9448(void) { for (i = 0; i < 4; i++) { Matrix_Push(&gGfxMatrix); - Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801AFCD8[i].angle, 1); - Matrix_Translate(gGfxMatrix, D_menu_801AFCD8[i].x, D_menu_801AFCD8[i].y, 0.0f, 1); - Matrix_RotateY(gGfxMatrix, M_DTOR * -(D_menu_801AFCD8[i].angle), 1); + Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801AFCD8[i].angle, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, D_menu_801AFCD8[i].x, D_menu_801AFCD8[i].y, 0.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_DTOR * -(D_menu_801AFCD8[i].angle), MTXF_APPLY); Map_801AD048(); - Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801B6A80, 1); - Matrix_Scale(gGfxMatrix, D_menu_801AFCD8[i].scale, D_menu_801AFCD8[i].scale, D_menu_801AFCD8[i].scale, 1); + Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801B6A80, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, D_menu_801AFCD8[i].scale, D_menu_801AFCD8[i].scale, D_menu_801AFCD8[i].scale, + MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -5271,8 +5273,8 @@ void Map_801A9448(void) { dest.y = 0.0f; dest.z = 100.0f; - Matrix_RotateY(gCalcMatrix, M_DTOR * (-D_menu_801CDA10 - y1), 0); - Matrix_RotateX(gCalcMatrix, M_DTOR * (-D_menu_801CDA0C - x1), 1); + Matrix_RotateY(gCalcMatrix, M_DTOR * (-D_menu_801CDA10 - y1), MTXF_NEW); + Matrix_RotateX(gCalcMatrix, M_DTOR * (-D_menu_801CDA0C - x1), MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &dest, &src); Lights_SetOneLight(&gMasterDisp, src.x, src.y, src.z, 80, 80, 60, 0, 0, 0); @@ -5288,8 +5290,8 @@ void Map_801A9814(void) { if (D_menu_801B8280 != 0) { Matrix_Push(&gGfxMatrix); Matrix_LookAt(gGfxMatrix, D_menu_801CD9F4, D_menu_801CD9F8, D_menu_801CD9FC, D_menu_801CDA00, D_menu_801CDA04, - D_menu_801CDA08, D_menu_801CDA20, D_menu_801CDA24, D_menu_801CDA28, 1); - Matrix_Translate(gGfxMatrix, D_menu_801CEA58, D_menu_801CEA5C, D_menu_801CEA60, 1); + D_menu_801CDA08, D_menu_801CDA20, D_menu_801CDA24, D_menu_801CDA28, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, D_menu_801CEA58, D_menu_801CEA5C, D_menu_801CEA60, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); func_fade_80084688(2, D_menu_801B8284); Matrix_Pop(&gGfxMatrix); @@ -5486,7 +5488,7 @@ void Map_801A9FD4(s32 arg0) { Matrix_Push(&gGfxMatrix); - Matrix_LookAt(gGfxMatrix, 0.0f, 0.0f, 100.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1); + Matrix_LookAt(gGfxMatrix, 0.0f, 0.0f, 100.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -5606,9 +5608,9 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { gDPSetEnvColor(gMasterDisp++, 31, 0, 0, 0); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, x, y, 0.0f, 1); - Matrix_RotateZ(gGfxMatrix, M_DTOR * (sPlanets[planetId].orbit.tilt), 1); - Matrix_Scale(gGfxMatrix, 0.11f, 0.11f, 0.11f, 1); + Matrix_Translate(gGfxMatrix, x, y, 0.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, M_DTOR * (sPlanets[planetId].orbit.tilt), MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.11f, 0.11f, 0.11f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_menu_801B68F8[sPlanets[planetId].id]); @@ -5616,7 +5618,7 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 128); gDPSetEnvColor(gMasterDisp++, 31, 0, 0, 0); - Matrix_Scale(gGfxMatrix, 0.8f, 0.8f, 0.8f, 1); + Matrix_Scale(gGfxMatrix, 0.8f, 0.8f, 0.8f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_menu_801B68F8[sPlanets[planetId].id]); @@ -5633,15 +5635,15 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, x - 0.4f, y + 0.9f, 0.0f, 1); - Matrix_RotateZ(gGfxMatrix, M_DTOR * sPlanets[planetId].orbit.tilt, 1); - Matrix_Scale(gGfxMatrix, 0.1f, 0.1f, 0.1f, 1); + Matrix_Translate(gGfxMatrix, x - 0.4f, y + 0.9f, 0.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, M_DTOR * sPlanets[planetId].orbit.tilt, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.1f, 0.1f, 0.1f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_menu_801B68F8[sPlanets[planetId].id]); - Matrix_Translate(gGfxMatrix, 18.0f, -20.0f, 0.0f, 1); + Matrix_Translate(gGfxMatrix, 18.0f, -20.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -5660,9 +5662,9 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, x, y, 0.0f, 1); - Matrix_RotateZ(gGfxMatrix, M_DTOR * sPlanets[planetId].orbit.tilt, 1); - Matrix_Scale(gGfxMatrix, 0.09f, 0.09f, 0.09f, 1); + Matrix_Translate(gGfxMatrix, x, y, 0.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, M_DTOR * sPlanets[planetId].orbit.tilt, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.09f, 0.09f, 0.09f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -5680,11 +5682,11 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, x, y, 0.0f, 1); - Matrix_RotateX(gGfxMatrix, M_DTOR * 20.0f, 1); - Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801AFFF4, 1); - Matrix_RotateZ(gGfxMatrix, M_DTOR * sPlanets[planetId].orbit.tilt, 1); - Matrix_Scale(gGfxMatrix, 0.004f, 0.004f, 0.004f, 1); + Matrix_Translate(gGfxMatrix, x, y, 0.0f, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_DTOR * 20.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801AFFF4, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, M_DTOR * sPlanets[planetId].orbit.tilt, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.004f, 0.004f, 0.004f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -5702,11 +5704,11 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, x, y, 0.0f, 1); - Matrix_RotateX(gGfxMatrix, M_DTOR * 20.0f, 1); - Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801AFFFC, 1); - Matrix_RotateZ(gGfxMatrix, M_DTOR * sPlanets[planetId].orbit.tilt, 1); - Matrix_Scale(gGfxMatrix, 0.003f, 0.003f, 0.003f, 1); + Matrix_Translate(gGfxMatrix, x, y, 0.0f, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_DTOR * 20.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801AFFFC, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, M_DTOR * sPlanets[planetId].orbit.tilt, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.003f, 0.003f, 0.003f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -5724,9 +5726,9 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, x, y, 0.0f, 1); - Matrix_RotateZ(gGfxMatrix, M_DTOR * sPlanets[planetId].orbit.tilt, 1); - Matrix_Scale(gGfxMatrix, 0.1f, 0.1f, 0.1f, 1); + Matrix_Translate(gGfxMatrix, x, y, 0.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, M_DTOR * sPlanets[planetId].orbit.tilt, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.1f, 0.1f, 0.1f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -5742,7 +5744,7 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { } gSPDisplayList(gMasterDisp++, D_menu_801B4A40); } - Matrix_Scale(gGfxMatrix, 1.6f, 1.6f, 1.6f, 1); + Matrix_Scale(gGfxMatrix, 1.6f, 1.6f, 1.6f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_MAP_605C230); } @@ -5766,8 +5768,8 @@ void Map_801AB17C(f32 x, f32 y, f32 z) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, x - xPos, y + yPos, z, 1); - Matrix_Scale(gGfxMatrix, scale, scale, scale, 1); + Matrix_Translate(gGfxMatrix, x - xPos, y + yPos, z, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_MAP_601D1F0); @@ -6016,7 +6018,7 @@ void Map_801ABCDC(s32 arg0, s32 alpha) { Matrix_Push(&gGfxMatrix); - Matrix_LookAt(gGfxMatrix, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -400.0f, 0.0f, 1.0f, 0.0f, 1); + Matrix_LookAt(gGfxMatrix, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -400.0f, 0.0f, 1.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -6027,9 +6029,9 @@ void Map_801ABCDC(s32 arg0, s32 alpha) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_menu_801B6B24[arg0], -35.0f, -400.0f, 1); - Matrix_RotateZ(gGfxMatrix, M_DTOR * -40.0f, 1); - Matrix_Scale(gGfxMatrix, 0.3f, 0.3f, 1.0f, 1); + Matrix_Translate(gGfxMatrix, D_menu_801B6B24[arg0], -35.0f, -400.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, M_DTOR * -40.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.3f, 0.3f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -6038,9 +6040,9 @@ void Map_801ABCDC(s32 arg0, s32 alpha) { Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_menu_801B6B24[arg0], -35.0f, -400.0f, 1); - Matrix_RotateZ(gGfxMatrix, M_DTOR * 40.0f, 1); - Matrix_Scale(gGfxMatrix, 0.3f, 0.3f, 1.0f, 1); + Matrix_Translate(gGfxMatrix, D_menu_801B6B24[arg0], -35.0f, -400.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, M_DTOR * 40.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.3f, 0.3f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -6053,7 +6055,7 @@ void Map_801ABCDC(s32 arg0, s32 alpha) { void Map_801ABF1C(void) { Matrix_Push(&gGfxMatrix); { - Matrix_LookAt(gGfxMatrix, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -400.0f, 0.0f, 1.0f, 0.0f, 1); + Matrix_LookAt(gGfxMatrix, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -400.0f, 0.0f, 1.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -6061,12 +6063,12 @@ void Map_801ABF1C(void) { Matrix_Push(&gGfxMatrix); { - Matrix_Translate(gGfxMatrix, D_menu_801CEA88, D_menu_801CEA8C, D_menu_801CEA90, 1); - Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801CEA94, 1); + Matrix_Translate(gGfxMatrix, D_menu_801CEA88, D_menu_801CEA8C, D_menu_801CEA90, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801CEA94, MTXF_APPLY); Map_801AD048(); - Matrix_Scale(gGfxMatrix, D_menu_801CEA78, D_menu_801CEA7C, 1.0f, 1); + Matrix_Scale(gGfxMatrix, D_menu_801CEA78, D_menu_801CEA7C, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -6085,12 +6087,12 @@ void Map_801ABF1C(void) { Matrix_Push(&gGfxMatrix); { - Matrix_Translate(gGfxMatrix, D_menu_801CEA88, D_menu_801CEA8C - 1.5f, D_menu_801CEA90, 1); - Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801CEA94, 1); + Matrix_Translate(gGfxMatrix, D_menu_801CEA88, D_menu_801CEA8C - 1.5f, D_menu_801CEA90, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801CEA94, MTXF_APPLY); Map_801AD048(); - Matrix_Scale(gGfxMatrix, D_menu_801CEA80, D_menu_801CEA84, 3.3f, 1); + Matrix_Scale(gGfxMatrix, D_menu_801CEA80, D_menu_801CEA84, 3.3f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -6219,13 +6221,13 @@ void Map_801AC530(s32 index) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_menu_801CEEB0.x, D_menu_801CEEB0.y, D_menu_801CEEB0.z, 1); + Matrix_Translate(gGfxMatrix, D_menu_801CEEB0.x, D_menu_801CEEB0.y, D_menu_801CEEB0.z, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, gTexturedLines[index].unk_20, 1); - Matrix_RotateX(gGfxMatrix, M_DTOR * -90.0f, 1); - Matrix_RotateX(gGfxMatrix, gTexturedLines[index].unk_1C, 1); + Matrix_RotateY(gGfxMatrix, gTexturedLines[index].unk_20, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_DTOR * -90.0f, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, gTexturedLines[index].unk_1C, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, 0.8f, 0.8f, 0.8f, 1); + Matrix_Scale(gGfxMatrix, 0.8f, 0.8f, 0.8f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -6242,8 +6244,8 @@ void Map_801AC530(s32 index) { src.y = 0.0f; src.z = 10.0f; - Matrix_RotateY(gCalcMatrix, M_DTOR * (-D_menu_801CDA10 - y1), 0); - Matrix_RotateX(gCalcMatrix, M_DTOR * (-D_menu_801CDA0C - x1), 1); + Matrix_RotateY(gCalcMatrix, M_DTOR * (-D_menu_801CDA10 - y1), MTXF_NEW); + Matrix_RotateX(gCalcMatrix, M_DTOR * (-D_menu_801CDA0C - x1), MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &src, &dest); dirX = dest.x; @@ -6280,12 +6282,12 @@ void Map_801AC80C(PathType pathType) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_menu_801CEEB0.x, D_menu_801CEEB0.y, D_menu_801CEEB0.z, 1); + Matrix_Translate(gGfxMatrix, D_menu_801CEEB0.x, D_menu_801CEEB0.y, D_menu_801CEEB0.z, MTXF_APPLY); Map_801AD048(); - Matrix_RotateZ(gGfxMatrix, M_DTOR * D_menu_801B6B30, 1); - Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 10.0f, 1); + Matrix_RotateZ(gGfxMatrix, M_DTOR * D_menu_801B6B30, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 10.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -6543,8 +6545,8 @@ void Map_801AD048(void) { sqrtf(SQ(D_menu_801CD9F4 - D_menu_801CDA00) + SQ(D_menu_801CD9FC - D_menu_801CDA08))); f32 temp = -Math_Atan2F(D_menu_801CD9F4 - D_menu_801CDA00, D_menu_801CD9FC - D_menu_801CDA08); - Matrix_RotateY(gGfxMatrix, -temp, 1); - Matrix_RotateX(gGfxMatrix, -sp1C, 1); + Matrix_RotateY(gGfxMatrix, -temp, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -sp1C, MTXF_APPLY); } void Map_801AD11C(void) { @@ -6700,9 +6702,9 @@ void Map_801AD718(f32 arg0, f32 arg1, f32 arg2, f32* arg3, f32* arg4, f32* arg5, sp20.y = 0.0f; sp20.z = arg6; - Matrix_Translate(gCalcMatrix, arg0, arg1, arg2, 0); - Matrix_RotateY(gCalcMatrix, M_DTOR * arg8, 1); - Matrix_RotateX(gCalcMatrix, M_DTOR * arg7, 1); + Matrix_Translate(gCalcMatrix, arg0, arg1, arg2, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, M_DTOR * arg8, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, M_DTOR * arg7, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &sp20, &sp2C); *arg3 = sp2C.x; diff --git a/src/overlays/ovl_menu/fox_option.c b/src/overlays/ovl_menu/fox_option.c index 3536c47f..44989908 100644 --- a/src/overlays/ovl_menu/fox_option.c +++ b/src/overlays/ovl_menu/fox_option.c @@ -1775,7 +1775,7 @@ void Option_ExpertSoundDraw(void) { RCP_SetupDL(&gMasterDisp, 5); Matrix_Push(&gGfxMatrix); - Matrix_LookAt(gGfxMatrix, 0.0f, 0.0f, 100.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1); + Matrix_LookAt(gGfxMatrix, 0.0f, 0.0f, 100.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); for (var_fs0 = D_menu_801AF004, i = 0; i < 32; i++, var_fs0 += D_menu_801AF010) { @@ -1786,8 +1786,8 @@ void Option_ExpertSoundDraw(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, (s32) r, (s32) g, (s32) b, 255); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, var_fs0, D_menu_801AF078[spectrumAnalizerMode], D_menu_801AF008, 1); - Matrix_Scale(gGfxMatrix, D_menu_801AF00C, D_menu_801B9298[i], 1.0f, 1); + Matrix_Translate(gGfxMatrix, var_fs0, D_menu_801AF078[spectrumAnalizerMode], D_menu_801AF008, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, D_menu_801AF00C, D_menu_801B9298[i], 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_menu_801AF06C[spectrumAnalizerMode]); @@ -2230,8 +2230,8 @@ void Option_80197914(void) { for (i = 0, vec1 = D_menu_801AF100, vec2 = D_menu_801AF118; i < 2; i++, vec1++, vec2++) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, vec1->x, vec1->y, -500.0f, 1); - Matrix_Scale(gGfxMatrix, vec2->x, vec2->y, 1.0f, 1); + Matrix_Translate(gGfxMatrix, vec1->x, vec1->y, -500.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, vec2->x, vec2->y, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_menu_801AEF30); Matrix_Pop(&gGfxMatrix); @@ -2449,7 +2449,7 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) { s32 pad[2]; Matrix_Push(&gGfxMatrix); - Matrix_LookAt(gGfxMatrix, 0.0f, 0.0f, 100.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1); + Matrix_LookAt(gGfxMatrix, 0.0f, 0.0f, 100.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); Lib_InitOrtho(&gMasterDisp); @@ -2466,15 +2466,15 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) { gDPSetEnvColor(gMasterDisp++, 31, 0, 0, 0); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, x, y, 0.0f, 1); - Matrix_RotateZ(gGfxMatrix, M_DTOR * D_menu_801AF130, 1); - Matrix_Scale(gGfxMatrix, 0.3f, 0.3f, 0.3f, 1); + Matrix_Translate(gGfxMatrix, x, y, 0.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, M_DTOR * D_menu_801AF130, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.3f, 0.3f, 0.3f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_menu_801AEE6C[planet]); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 128); gDPSetEnvColor(gMasterDisp++, 31, 0, 0, 0); - Matrix_Scale(gGfxMatrix, 0.8f, 0.8f, 0.8f, 1); + Matrix_Scale(gGfxMatrix, 0.8f, 0.8f, 0.8f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_menu_801AEE6C[planet]); Matrix_Pop(&gGfxMatrix); @@ -2486,13 +2486,13 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, x - 1.0f, y + 4.0f, 0.0f, 1); - Matrix_Scale(gGfxMatrix, 0.3f, 0.3f, 0.3f, 1); + Matrix_Translate(gGfxMatrix, x - 1.0f, y + 4.0f, 0.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.3f, 0.3f, 0.3f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_menu_801AEE6C[planet]); - Matrix_Translate(gGfxMatrix, 18.0f, -20.0f, 0.0f, 1); + Matrix_Translate(gGfxMatrix, 18.0f, -20.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_menu_801AEE6C[planet]); @@ -2508,8 +2508,8 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 144); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, x, y, 0.0f, 1); - Matrix_Scale(gGfxMatrix, 0.3f, 0.3f, 0.3f, 1); + Matrix_Translate(gGfxMatrix, x, y, 0.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.3f, 0.3f, 0.3f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_menu_801AEE6C[planet]); @@ -2522,9 +2522,9 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) { Lights_SetOneLight(&gMasterDisp, 0, 0, 100, 100, 100, 70, 100, 100, 100); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, x, y, 0.0f, 1); - Matrix_RotateX(gGfxMatrix, M_DTOR * 20.0f, 1); - Matrix_Scale(gGfxMatrix, 0.01f, 0.01f, 0.01f, 1); + Matrix_Translate(gGfxMatrix, x, y, 0.0f, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_DTOR * 20.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.01f, 0.01f, 0.01f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_menu_801AEE6C[planet]); @@ -2537,9 +2537,9 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) { Lights_SetOneLight(&gMasterDisp, 0, 0, 100, 100, 100, 70, 100, 100, 100); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, x, y, 0.0f, 1); - Matrix_RotateX(gGfxMatrix, M_DTOR * 20.0f, 1); - Matrix_Scale(gGfxMatrix, 0.01f, 0.01f, 0.01f, 1); + Matrix_Translate(gGfxMatrix, x, y, 0.0f, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_DTOR * 20.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.01f, 0.01f, 0.01f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_menu_801AEE6C[planet]); @@ -2553,8 +2553,8 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, x, y, 0.0f, 1); - Matrix_Scale(gGfxMatrix, 0.3f, 0.3f, 0.3f, 1); + Matrix_Translate(gGfxMatrix, x, y, 0.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.3f, 0.3f, 0.3f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_menu_801AEE6C[planet]); @@ -2568,7 +2568,7 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_menu_801B4A40); } - Matrix_Scale(gGfxMatrix, 1.6f, 1.6f, 1.6f, 1); + Matrix_Scale(gGfxMatrix, 1.6f, 1.6f, 1.6f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_MAP_605C230); @@ -2599,8 +2599,8 @@ static f32 D_menu_801AF144 = 2.7f; void Option_80199198(f32 arg0, f32 arg1, f32 arg2) { RCP_SetupDL(&gMasterDisp, 0x35); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, arg0 - D_menu_801AF140, arg1 + D_menu_801AF144, arg2, 1); - Matrix_Scale(gGfxMatrix, D_menu_801AF13C, D_menu_801AF13C, D_menu_801AF13C, 1); + Matrix_Translate(gGfxMatrix, arg0 - D_menu_801AF140, arg1 + D_menu_801AF144, arg2, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, D_menu_801AF13C, D_menu_801AF13C, D_menu_801AF13C, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_MAP_601D1F0); Matrix_Pop(&gGfxMatrix); @@ -3483,9 +3483,9 @@ void Option_DrawMenuCard(MenuContext_38 arg0) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, arg0.unk_00, arg0.unk_04, arg0.unk_08, 1); - Matrix_Scale(gGfxMatrix, arg0.unk_0C, arg0.unk_10, 1.0f, 1); - Matrix_RotateX(gGfxMatrix, M_DTOR * 90.0f, 1); + Matrix_Translate(gGfxMatrix, arg0.unk_00, arg0.unk_04, arg0.unk_08, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, arg0.unk_0C, arg0.unk_10, 1.0f, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_DTOR * 90.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -3515,11 +3515,11 @@ void Option_8019BC44(f32 x, f32 y, f32 arg2, f32 arg3, f32 arg4, f32 arg5) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, x, y, arg2, 1); + Matrix_Translate(gGfxMatrix, x, y, arg2, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, arg5, arg5, arg5, 1); - Matrix_RotateZ(gGfxMatrix, M_DTOR * arg4, 1); - Matrix_RotateY(gGfxMatrix, M_DTOR * arg3, 1); + Matrix_Scale(gGfxMatrix, arg5, arg5, arg5, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, M_DTOR * arg4, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_DTOR * arg3, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -3532,7 +3532,8 @@ void Option_8019BC44(f32 x, f32 y, f32 arg2, f32 arg3, f32 arg4, f32 arg5) { void Option_8019BDF0(void) { Matrix_Push(&gGfxMatrix); - Matrix_LookAt(gGfxMatrix, gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ, 0.0f, 1.0f, 0.0f, 1); + Matrix_LookAt(gGfxMatrix, gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ, 0.0f, 1.0f, 0.0f, + MTXF_APPLY); } void Option_8019BE7C(f32 arg0, f32 arg1, f32 arg2, f32* arg3, f32* arg4, f32* arg5) { @@ -3543,8 +3544,8 @@ void Option_8019BE7C(f32 arg0, f32 arg1, f32 arg2, f32* arg3, f32* arg4, f32* ar sp18.y = 0.0f; sp18.z = arg2; - Matrix_RotateY(gCalcMatrix, M_DTOR * arg1, 0); - Matrix_RotateX(gCalcMatrix, M_DTOR * arg0, 1); + Matrix_RotateY(gCalcMatrix, M_DTOR * arg1, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, M_DTOR * arg0, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &sp18, &sp24); *arg3 = sp24.x; @@ -3586,8 +3587,8 @@ void Option_8019C04C(void) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_menu_801B9204, D_menu_801B9208, 0.0f, 1); - Matrix_Scale(gGfxMatrix, D_menu_801B920C, D_menu_801B9210, 1.0f, 1); + Matrix_Translate(gGfxMatrix, D_menu_801B9204, D_menu_801B9208, 0.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, D_menu_801B920C, D_menu_801B9210, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -4116,7 +4117,7 @@ void Option_8019D118(void) { Matrix_Push(&gGfxMatrix); - Matrix_LookAt(gGfxMatrix, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -100.0f, 0.0f, 1.0f, 0.0f, 1); + Matrix_LookAt(gGfxMatrix, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -100.0f, 0.0f, 1.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -4269,13 +4270,13 @@ void Option_8019DB20(s32 character, f32 x, f32 y, f32 z, f32 scale, f32 xAngle, Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, x, y, z, 1); + Matrix_Translate(gGfxMatrix, x, y, z, MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, M_DTOR * zAngle, 1); - Matrix_RotateX(gGfxMatrix, M_DTOR * xAngle, 1); - Matrix_RotateY(gGfxMatrix, M_DTOR * yAngle, 1); + Matrix_RotateZ(gGfxMatrix, M_DTOR * zAngle, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_DTOR * xAngle, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_DTOR * yAngle, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, scale, scale, scale, 1); + Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); diff --git a/src/overlays/ovl_menu/fox_title.c b/src/overlays/ovl_menu/fox_title.c index 9b4fc259..f40bb2f3 100644 --- a/src/overlays/ovl_menu/fox_title.c +++ b/src/overlays/ovl_menu/fox_title.c @@ -2243,14 +2243,14 @@ void Title_8018D2B8(s32 arg0) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, D_menu_801B84E8[arg0].unk_00.x, D_menu_801B84E8[arg0].unk_00.y, - D_menu_801B84E8[arg0].unk_00.z, 1); + D_menu_801B84E8[arg0].unk_00.z, MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_menu_801B84E8[arg0].unk_0C, D_menu_801B84E8[arg0].unk_0C, D_menu_801B84E8[arg0].unk_0C, - 1); + MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, D_menu_801B84E8[arg0].unk_20 * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, D_menu_801B84E8[arg0].unk_18 * M_DTOR, 1); - Matrix_RotateY(gGfxMatrix, D_menu_801B84E8[arg0].unk_1C * M_DTOR, 1); + Matrix_RotateZ(gGfxMatrix, D_menu_801B84E8[arg0].unk_20 * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, D_menu_801B84E8[arg0].unk_18 * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, D_menu_801B84E8[arg0].unk_1C * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -2259,7 +2259,7 @@ void Title_8018D2B8(s32 arg0) { wings.unk_10 = wings.unk_28 = 0.0f; wings.unk_14 = D_menu_801B84E8[arg0].unk_28; - wings.unk_2C = D_menu_801B84E8[arg0].unk_34; + wings.modelId = D_menu_801B84E8[arg0].unk_34; wings.unk_30 = D_menu_801B84E8[arg0].unk_2C; wings.unk_34 = D_menu_801B84E8[arg0].unk_30; wings.unk_38 = D_menu_801B84E8[arg0].unk_24; @@ -2311,19 +2311,19 @@ void Title_8018D510(s32 arg0) { } Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, var_fa0, 1); - Matrix_Scale(gGfxMatrix, var_fv0, var_fv0 * 0.7f, var_fv0, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, var_fa0, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, var_fv0, var_fv0 * 0.7f, var_fv0, MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, -D_menu_801B84E8[arg0].unk_20 * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, -D_menu_801B84E8[arg0].unk_18 * M_DTOR, 1); - Matrix_RotateY(gGfxMatrix, -D_menu_801B84E8[arg0].unk_1C * M_DTOR, 1); + Matrix_RotateZ(gGfxMatrix, -D_menu_801B84E8[arg0].unk_20 * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -D_menu_801B84E8[arg0].unk_18 * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, -D_menu_801B84E8[arg0].unk_1C * M_DTOR, MTXF_APPLY); sp3C = -Math_Atan2F(gCsCamEyeX - D_menu_801B84E8[arg0].unk_00.x, gCsCamEyeZ - D_menu_801B84E8[arg0].unk_00.z); temp = sqrtf(SQ(gCsCamEyeZ - D_menu_801B84E8[arg0].unk_00.z) + SQ(gCsCamEyeX - D_menu_801B84E8[arg0].unk_00.x)); sp40 = Math_Atan2F(gCsCamEyeY - D_menu_801B84E8[arg0].unk_00.y, temp); - Matrix_RotateY(gGfxMatrix, -sp3C, 1); - Matrix_RotateX(gGfxMatrix, -sp40, 1); + Matrix_RotateY(gGfxMatrix, -sp3C, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -sp40, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); @@ -2390,15 +2390,15 @@ void Title_8018D80C(s32 arg0) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_menu_801B7D40[i], D_menu_801B7DE0[i], D_menu_801B7E80[i], 1); - Matrix_Scale(gGfxMatrix, D_menu_801B7FC0[i], D_menu_801B7FC0[i], D_menu_801B7FC0[i], 1); + Matrix_Translate(gGfxMatrix, D_menu_801B7D40[i], D_menu_801B7DE0[i], D_menu_801B7E80[i], MTXF_APPLY); + Matrix_Scale(gGfxMatrix, D_menu_801B7FC0[i], D_menu_801B7FC0[i], D_menu_801B7FC0[i], MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, -D_menu_801B84E8[arg0].unk_20 * M_DTOR, 1); - Matrix_RotateX(gGfxMatrix, -D_menu_801B84E8[arg0].unk_18 * M_DTOR, 1); - Matrix_RotateY(gGfxMatrix, -D_menu_801B84E8[arg0].unk_1C * M_DTOR, 1); + Matrix_RotateZ(gGfxMatrix, -D_menu_801B84E8[arg0].unk_20 * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -D_menu_801B84E8[arg0].unk_18 * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, -D_menu_801B84E8[arg0].unk_1C * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, -sp6C, 1); - Matrix_RotateX(gGfxMatrix, -sp70, 1); + Matrix_RotateY(gGfxMatrix, -sp6C, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -sp70, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -2412,9 +2412,9 @@ void Title_8018DDB8(s32 arg0) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, (D_menu_801B9050 - D_menu_801B84E8[arg0].unk_00.y * 2.05f) + (D_menu_801B9048 - 84.0f) * 1.99f, - 0.0f, 1); - Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 1.0f, 1); - Matrix_RotateY(gGfxMatrix, M_PI, 1); + 0.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 1.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL_64(); @@ -2437,10 +2437,10 @@ void Title_8018DF0C(f32 arg0) { } Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_menu_801B8688.pos.x, D_menu_801B8688.pos.y, D_menu_801B8688.pos.z, 1); - Matrix_RotateY(gGfxMatrix, M_DTOR * sp30, 1); - Matrix_RotateX(gGfxMatrix, M_DTOR * sp34, 1); - Matrix_Scale(gGfxMatrix, D_menu_801B8688.scale, D_menu_801B8688.scale, D_menu_801B8688.scale, 1); + Matrix_Translate(gGfxMatrix, D_menu_801B8688.pos.x, D_menu_801B8688.pos.y, D_menu_801B8688.pos.z, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_DTOR * sp30, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_DTOR * sp34, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, D_menu_801B8688.scale, D_menu_801B8688.scale, D_menu_801B8688.scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_TITLE_6037CF0); @@ -2454,13 +2454,13 @@ void Title_8018E058(void) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_menu_801B8658.pos.x, D_menu_801B8658.pos.y, D_menu_801B8658.pos.z, 1); + Matrix_Translate(gGfxMatrix, D_menu_801B8658.pos.x, D_menu_801B8658.pos.y, D_menu_801B8658.pos.z, MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, M_DTOR * D_menu_801B8658.angleZ, 1); - Matrix_RotateX(gGfxMatrix, M_DTOR * D_menu_801B8658.angleX, 1); - Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801B8658.angleY, 1); + Matrix_RotateZ(gGfxMatrix, M_DTOR * D_menu_801B8658.angleZ, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_DTOR * D_menu_801B8658.angleX, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801B8658.angleY, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, D_menu_801B8658.scale, D_menu_801B8658.scale, D_menu_801B8658.scale, 1); + Matrix_Scale(gGfxMatrix, D_menu_801B8658.scale, D_menu_801B8658.scale, D_menu_801B8658.scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL(&gMasterDisp, 0x17); @@ -2531,10 +2531,10 @@ void Title_8018E200(void) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 5.0f, 1); - Matrix_RotateZ(gGfxMatrix, D_menu_801B7C20[i] * M_DTOR, 1); - Matrix_Translate(gGfxMatrix, 0.0f, D_menu_801B7BF8[i], 0.0f, 1); - Matrix_Scale(gGfxMatrix, scale, scale, scale, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 5.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, D_menu_801B7C20[i] * M_DTOR, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, D_menu_801B7BF8[i], 0.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -2559,8 +2559,8 @@ void Title_8018E67C(s32 arg0) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, D_menu_801B8350[arg0].unk_00.x, D_menu_801B8350[arg0].unk_00.y, - D_menu_801B8350[arg0].unk_00.z + D_menu_801B84D0, 1); - Matrix_Scale(gGfxMatrix, D_menu_801B84D4, D_menu_801B84D4, D_menu_801B84D4, 1); + D_menu_801B8350[arg0].unk_00.z + D_menu_801B84D0, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, D_menu_801B84D4, D_menu_801B84D4, D_menu_801B84D4, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if (arg0 == 2) { @@ -2582,10 +2582,10 @@ void Title_8018E67C(s32 arg0) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, D_menu_801B8350[arg0].unk_00.x - 5.0f, 5.0f, - D_menu_801B8350[arg0].unk_00.z + 10.0f + D_menu_801B84D0, 1); + D_menu_801B8350[arg0].unk_00.z + 10.0f + D_menu_801B84D0, MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_menu_801B8350[arg0].unk_10, D_menu_801B8350[arg0].unk_10, D_menu_801B8350[arg0].unk_10, - 1); + MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -2621,13 +2621,13 @@ void Title_8018EA78(s32 arg0) { Matrix_Push(&gGfxMatrix); - Matrix_RotateX(gGfxMatrix, D_menu_801B8350[arg0].unk_48 * M_DTOR, 1); - Matrix_RotateY(gGfxMatrix, D_menu_801B8350[arg0].unk_4C * M_DTOR, 1); - Matrix_RotateZ(gGfxMatrix, D_menu_801B8350[arg0].unk_50 * M_DTOR, 1); + Matrix_RotateX(gGfxMatrix, D_menu_801B8350[arg0].unk_48 * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, D_menu_801B8350[arg0].unk_4C * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, D_menu_801B8350[arg0].unk_50 * M_DTOR, MTXF_APPLY); Matrix_Translate(gGfxMatrix, D_menu_801B8350[arg0].unk_00.x, D_menu_801B8350[arg0].unk_00.y, - D_menu_801B8350[arg0].unk_00.z, 1); - Matrix_Scale(gGfxMatrix, D_menu_801B84D4, D_menu_801B84D4, D_menu_801B84D4, 1); + D_menu_801B8350[arg0].unk_00.z, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, D_menu_801B84D4, D_menu_801B84D4, D_menu_801B84D4, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -2793,18 +2793,18 @@ void Title_8018F438(void) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, (3079.2002f * sp54) - D_menu_801B82C8, 1); - Matrix_Scale(gGfxMatrix, 0.6f, 0.6f, 0.6f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, (3079.2002f * sp54) - D_menu_801B82C8, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.6f, 0.6f, 0.6f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_TITLE_602E380); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -6836.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -6836.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_TITLE_602E380); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -6836.0f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -6836.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_TITLE_602E380); @@ -2827,9 +2827,9 @@ void Title_8018F680(void) { void Title_8018F77C(void) { RCP_SetupDL(&gMasterDisp, 0x35); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_menu_801B905C, D_menu_801B9060, D_menu_801B9064, 1); - Matrix_Scale(gGfxMatrix, D_menu_801B9068, D_menu_801B906C, 1.0f, 1); - Matrix_RotateX(gGfxMatrix, M_DTOR * 90, 1); + Matrix_Translate(gGfxMatrix, D_menu_801B905C, D_menu_801B9060, D_menu_801B9064, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, D_menu_801B9068, D_menu_801B906C, 1.0f, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_DTOR * 90, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_TITLE_60148D0); Matrix_Pop(&gGfxMatrix); @@ -3024,12 +3024,12 @@ void Title_80190144(void) { gDPSetColorDither(gMasterDisp++, G_CD_NOISE); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_ctx_801783D0, D_ctx_801783D4, -200.0f, 1); + Matrix_Translate(gGfxMatrix, D_ctx_801783D0, D_ctx_801783D4, -200.0f, MTXF_APPLY); for (i = 0; i < 4; i++) { Matrix_Push(&gGfxMatrix); Matrix_Scale(gGfxMatrix, D_menu_801AE4EC[i] * 0.5f, D_menu_801AE4EC[i] * 0.5f, D_menu_801AE4EC[i] * 0.5f, - 1); + MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, D_menu_801AE51C[i], D_menu_801AE528[i]); @@ -3066,13 +3066,14 @@ void Title_801903B8(void) { var_fs1 *= 0.5f; Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_ctx_801783D0, D_ctx_801783D4, -200.0f, 1); + Matrix_Translate(gGfxMatrix, D_ctx_801783D0, D_ctx_801783D4, -200.0f, MTXF_APPLY); for (i = 4; i < 12; i++) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_menu_801AE4BC[i] * temp_fs3, -D_menu_801AE4BC[i] * temp_fs4, 0.0f, 1); + Matrix_Translate(gGfxMatrix, D_menu_801AE4BC[i] * temp_fs3, -D_menu_801AE4BC[i] * temp_fs4, 0.0f, + MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_menu_801AE4EC[i] * 0.5f, D_menu_801AE4EC[i] * 0.5f, D_menu_801AE4EC[i] * 0.5f, - 1); + MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -3125,8 +3126,8 @@ void Title_80190950(void) { RCP_SetupDL(&gMasterDisp, 0x17); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, D_menu_801B9048, D_menu_801B904C, 1); - Matrix_Scale(gGfxMatrix, 0.4f, 0.4f, 0.4f, 1); + Matrix_Translate(gGfxMatrix, 0.0f, D_menu_801B9048, D_menu_801B904C, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.4f, 0.4f, 0.4f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_TITLE_6018D40); @@ -3139,8 +3140,8 @@ void Title_80190950(void) { } void Title_80190A98(void) { - Matrix_Translate(gGfxMatrix, 401.0f, -249.0f, -22.0f, 1); - Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 1.0f, 1); + Matrix_Translate(gGfxMatrix, 401.0f, -249.0f, -22.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_TITLE_602A720); } @@ -3151,8 +3152,8 @@ void Title_80190B30(s32 arg0) { RCP_SetupDL(&gMasterDisp, 0x17); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_menu_801B84E8[arg0].unk_00.x, -12.8f, D_menu_801B9044, 1); - Matrix_Scale(gGfxMatrix, 0.8f, 0.8f, 0.8f, 1); + Matrix_Translate(gGfxMatrix, D_menu_801B84E8[arg0].unk_00.x, -12.8f, D_menu_801B9044, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.8f, 0.8f, 0.8f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_TITLE_601C7C0); @@ -3344,9 +3345,9 @@ void Title_80191320(s32 arg0, f32* arg1, f32* arg2, f32* arg3, f32* arg4, f32* a sp48.y = 0.0f; sp48.z = arg9; - Matrix_Translate(gCalcMatrix, *var_v0, *var_v1, *var_t0, 0); - Matrix_RotateY(gCalcMatrix, M_DTOR * arg8, 1); - Matrix_RotateX(gCalcMatrix, M_DTOR * arg7, 1); + Matrix_Translate(gCalcMatrix, *var_v0, *var_v1, *var_t0, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, M_DTOR * arg8, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, M_DTOR * arg7, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &sp48, &sp54); *sp44 = sp54.x; @@ -3357,8 +3358,8 @@ void Title_80191320(s32 arg0, f32* arg1, f32* arg2, f32* arg3, f32* arg4, f32* a sp48.y = 1.0f; sp48.z = 0.0f; - Matrix_RotateY(gCalcMatrix, M_DTOR * arg8, 0); - Matrix_RotateX(gCalcMatrix, M_DTOR * arg7, 1); + Matrix_RotateY(gCalcMatrix, M_DTOR * arg8, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, M_DTOR * arg7, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &sp48, &sp54); D_menu_801B829C = sp54.x; @@ -3375,10 +3376,10 @@ void Title_801914AC(f32 arg0, f32 arg1, f32 arg2, f32* arg3, f32* arg4, f32* arg sp38.y = 0.0f; sp38.z = argA; - Matrix_Translate(gCalcMatrix, arg0, arg1, arg2, 0); + Matrix_Translate(gCalcMatrix, arg0, arg1, arg2, MTXF_NEW); - Matrix_RotateY(gCalcMatrix, M_DTOR * argC, 1); - Matrix_RotateX(gCalcMatrix, M_DTOR * argB, 1); + Matrix_RotateY(gCalcMatrix, M_DTOR * argC, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, M_DTOR * argB, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &sp38, &sp44); @@ -3390,9 +3391,9 @@ void Title_801914AC(f32 arg0, f32 arg1, f32 arg2, f32* arg3, f32* arg4, f32* arg sp38.y = 0.0f; sp38.z = arg6; - Matrix_Translate(gCalcMatrix, arg0, arg1, arg2, 0); - Matrix_RotateY(gCalcMatrix, M_DTOR * argC, 1); - Matrix_RotateX(gCalcMatrix, M_DTOR * argB, 1); + Matrix_Translate(gCalcMatrix, arg0, arg1, arg2, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, M_DTOR * argC, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, M_DTOR * argB, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &sp38, &sp44); *arg3 = sp44.x; @@ -3403,8 +3404,8 @@ void Title_801914AC(f32 arg0, f32 arg1, f32 arg2, f32* arg3, f32* arg4, f32* arg sp38.y = 1.0f; sp38.z = 0.0f; - Matrix_RotateY(gCalcMatrix, M_DTOR * argC, 0); - Matrix_RotateX(gCalcMatrix, M_DTOR * argB, 1); + Matrix_RotateY(gCalcMatrix, M_DTOR * argC, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, M_DTOR * argB, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &sp38, &sp44); D_menu_801B829C = sp44.x; @@ -3424,10 +3425,10 @@ void Title_80191674(f32 arg0, f32 arg1, f32 arg2, f32* arg3, f32* arg4, f32* arg Title_80191798(&sp34, &sp30); - Matrix_RotateX(gCalcMatrix, M_DTOR * -sp34, 0); - Matrix_RotateY(gCalcMatrix, M_DTOR * -sp30, 1); - Matrix_RotateY(gCalcMatrix, M_DTOR * arg1, 1); - Matrix_RotateX(gCalcMatrix, M_DTOR * arg0, 1); + Matrix_RotateX(gCalcMatrix, M_DTOR * -sp34, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, M_DTOR * -sp30, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, M_DTOR * arg1, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, M_DTOR * arg0, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &sp18, &sp24); @@ -3453,8 +3454,8 @@ void Title_80191844(f32 arg0, f32 arg1) { sp18.y = 1.0f; sp18.z = 0.0f; - Matrix_RotateY(gCalcMatrix, M_DTOR * arg1, 0); - Matrix_RotateX(gCalcMatrix, M_DTOR * arg0, 1); + Matrix_RotateY(gCalcMatrix, M_DTOR * arg1, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, M_DTOR * arg0, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &sp18, &sp24); @@ -3466,8 +3467,8 @@ void Title_80191844(f32 arg0, f32 arg1) { void Title_801918FC(void) { Matrix_Push(&gGfxMatrix); Matrix_LookAt(gGfxMatrix, gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ, D_menu_801B829C, - D_menu_801B82A0, D_menu_801B82A4, 1); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 0.0f, 1); + D_menu_801B82A0, D_menu_801B82A4, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); } diff --git a/src/sys/sys_matrix.c b/src/sys/sys_matrix.c index f50cfb64..6de74e22 100644 --- a/src/sys/sys_matrix.c +++ b/src/sys/sys_matrix.c @@ -50,7 +50,7 @@ void Matrix_Pop(Matrix** mtxStack) { *mtxStack -= 1; } -// Copies tf into mtx (MTXMODE_NEW) or applies it to mtx (MTXMODE_APPLY) +// Copies tf into mtx (MTXF_NEW) or applies it to mtx (MTXF_APPLY) void Matrix_Mult(Matrix* mtx, Matrix* tf, u8 mode) { f32 rx; f32 ry; @@ -102,7 +102,7 @@ void Matrix_Mult(Matrix* mtx, Matrix* tf, u8 mode) { } } -// Creates a translation matrix in mtx (MTXMODE_NEW) or applies one to mtx (MTXMODE_APPLY) +// Creates a translation matrix in mtx (MTXF_NEW) or applies one to mtx (MTXF_APPLY) void Matrix_Translate(Matrix* mtx, f32 x, f32 y, f32 z, u8 mode) { f32 rx; f32 ry; @@ -125,7 +125,7 @@ void Matrix_Translate(Matrix* mtx, f32 x, f32 y, f32 z, u8 mode) { } } -// Creates a scale matrix in mtx (MTXMODE_NEW) or applies one to mtx (MTXMODE_APPLY) +// Creates a scale matrix in mtx (MTXF_NEW) or applies one to mtx (MTXF_APPLY) void Matrix_Scale(Matrix* mtx, f32 xScale, f32 yScale, f32 zScale, u8 mode) { f32 rx; f32 ry; @@ -150,7 +150,7 @@ void Matrix_Scale(Matrix* mtx, f32 xScale, f32 yScale, f32 zScale, u8 mode) { } } -// Creates rotation matrix about the X axis in mtx (MTXMODE_NEW) or applies one to mtx (MTXMODE_APPLY) +// Creates rotation matrix about the X axis in mtx (MTXF_NEW) or applies one to mtx (MTXF_APPLY) void Matrix_RotateX(Matrix* mtx, f32 angle, u8 mode) { f32 cs; f32 sn; @@ -178,7 +178,7 @@ void Matrix_RotateX(Matrix* mtx, f32 angle, u8 mode) { } } -// Creates rotation matrix about the Y axis in mtx (MTXMODE_NEW) or applies one to mtx (MTXMODE_APPLY) +// Creates rotation matrix about the Y axis in mtx (MTXF_NEW) or applies one to mtx (MTXF_APPLY) void Matrix_RotateY(Matrix* mtx, f32 angle, u8 mode) { f32 cs; f32 sn; @@ -206,7 +206,7 @@ void Matrix_RotateY(Matrix* mtx, f32 angle, u8 mode) { } } -// Creates rotation matrix about the Z axis in mtx (MTXMODE_NEW) or applies one to mtx (MTXMODE_APPLY) +// Creates rotation matrix about the Z axis in mtx (MTXF_NEW) or applies one to mtx (MTXF_APPLY) void Matrix_RotateZ(Matrix* mtx, f32 angle, u8 mode) { f32 cs; f32 sn; @@ -234,7 +234,7 @@ void Matrix_RotateZ(Matrix* mtx, f32 angle, u8 mode) { } } -// Creates rotation matrix about a given vector axis in mtx (MTXMODE_NEW) or applies one to mtx (MTXMODE_APPLY). +// Creates rotation matrix about a given vector axis in mtx (MTXF_NEW) or applies one to mtx (MTXF_APPLY). // The vector specifying the axis does not need to be a unit vector. void Matrix_RotateAxis(Matrix* mtx, f32 angle, f32 axisX, f32 axisY, f32 axisZ, u8 mode) { f32 rx; @@ -458,8 +458,8 @@ void Matrix_GetYRPAngles(Matrix* mtx, Vec3f* rot) { xHatP.z -= originP.z; rot->y = Math_Atan2F(zHatP.x, zHatP.z); rot->x = -Math_Atan2F(zHatP.y, sqrtf(SQ(zHatP.x) + SQ(zHatP.z))); - Matrix_RotateX(&invYP, -rot->x, 0); - Matrix_RotateY(&invYP, -rot->y, 1); + Matrix_RotateX(&invYP, -rot->x, MTXF_NEW); + Matrix_RotateY(&invYP, -rot->y, MTXF_APPLY); Matrix_MultVec3fNoTranslate(&invYP, &xHatP, &xHat); rot->x *= M_RTOD; rot->y *= M_RTOD; @@ -488,15 +488,15 @@ void Matrix_GetXYZAngles(Matrix* mtx, Vec3f* rot) { yHatP.z -= originP.z; rot->z = Math_Atan2F(xHatP.y, xHatP.x); rot->y = -Math_Atan2F(xHatP.z, sqrtf(SQ(xHatP.x) + SQ(xHatP.y))); - Matrix_RotateY(&invYZ, -rot->y, 0); - Matrix_RotateZ(&invYZ, -rot->z, 1); + Matrix_RotateY(&invYZ, -rot->y, MTXF_NEW); + Matrix_RotateZ(&invYZ, -rot->z, MTXF_APPLY); Matrix_MultVec3fNoTranslate(&invYZ, &yHatP, &yHat); rot->x = Math_Atan2F(yHat.z, yHat.y) * M_RTOD; rot->y *= M_RTOD; rot->z *= M_RTOD; } -// Creates a look-at matrix from Eye, At, and Up in mtx (MTXMODE_NEW) or applies one to mtx (MTXMODE_APPLY). +// Creates a look-at matrix from Eye, At, and Up in mtx (MTXF_NEW) or applies one to mtx (MTXF_APPLY). // A look-at matrix is a rotation-translation matrix that maps y to Up, z to (At - Eye), and translates to Eye void Matrix_LookAt(Matrix* mtx, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp, u8 mode) { From d27a276cb25f400b0475c8ea8061d9e1eec6006d Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Mon, 15 Apr 2024 20:55:24 -0300 Subject: [PATCH 026/151] correction --- Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 3ca55deb..9e609098 100644 --- a/Makefile +++ b/Makefile @@ -351,7 +351,7 @@ build/src/libultra/libc/string.o: OPTFLAGS := -Os build/src/libultra/libc/xlitob.o: OPTFLAGS := -Os build/src/libultra/libc/xldtob.o: OPTFLAGS := -Os build/src/libultra/libc/xprintf.o: OPTFLAGS := -Os -build/src/libultra/libc/ll.o: OPTFLAGS := -Os +build/src/libultra/libc/ll.o: OPTFLAGS := -O2 build/src/libultra/libc/ll.o: MIPS_VERSION := -mips3 # cc & asm-processor @@ -359,7 +359,6 @@ build/src/libultra/gu/sqrtf.o: OPTFLAGS := -Os build/src/libultra/gu/sinf.o: OPTFLAGS := -Os build/src/libultra/gu/lookat.o: OPTFLAGS := -Os build/src/libultra/gu/ortho.o: OPTFLAGS := -Os -build/src/libultra/libc/ll.o: OPTFLAGS := -Os build/src/libultra/gu/perspective.o: OPTFLAGS := -Os build/src/libultra/gu/mtxutil.o: OPTFLAGS := -Os build/src/libultra/gu/cosf.o: OPTFLAGS := -Os From aa97afffb4c44ff3173ef2b431918345290abd65 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Tue, 16 Apr 2024 00:14:12 -0300 Subject: [PATCH 027/151] fix GCC UB with audio (finally) --- Makefile | 2 +- include/sf64audio_provisional.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9e609098..9fa39d99 100644 --- a/Makefile +++ b/Makefile @@ -339,7 +339,7 @@ build/src/libultra/os/%.o: OPTFLAGS := -Os build/src/libultra/rmon/%.o: OPTFLAGS := -Os build/src/libultra/debug/%.o: OPTFLAGS := -Os build/src/libultra/host/%.o: OPTFLAGS := -Os -build/src/audio/audio_load.o: OPTFLAGS := -Os # Crashes with -O2 and -O3 +build/src/audio/audio_load.o: OPTFLAGS := -O2 build/src/audio/%.o: OPTFLAGS := -O2 -g # per-file flags diff --git a/include/sf64audio_provisional.h b/include/sf64audio_provisional.h index 48d96686..cd9e95ed 100644 --- a/include/sf64audio_provisional.h +++ b/include/sf64audio_provisional.h @@ -793,7 +793,11 @@ typedef struct { /* 0x02 */ s16 unkMediumParam; /* 0x04 */ u32 romAddr; /* 0x08 */ char pad[0x8]; + #ifdef AVOID_UB + /* 0x10 */ AudioTableEntry entries[]; // (dynamic size) + #else /* 0x10 */ AudioTableEntry entries[1]; // (dynamic size) + #endif } AudioTable; // size >= 0x20 typedef struct SampleDma { From 7969da8a9db22964d4f33c6061d39839c225a53c Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Tue, 16 Apr 2024 00:40:12 -0300 Subject: [PATCH 028/151] fix offset comment --- include/sf64dma.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sf64dma.h b/include/sf64dma.h index 541ab4db..f17af54d 100644 --- a/include/sf64dma.h +++ b/include/sf64dma.h @@ -86,7 +86,7 @@ typedef struct { typedef struct { /* 0x0 */ void* vRomAddress; - /* 0x8 */ SegmentOffset pRom; + /* 0x4 */ SegmentOffset pRom; /* 0xC */ s32 compFlag; } DmaEntry; // size = 0x10; From 1272524325c5e0bbd33be3296d34c6cdad3e4c92 Mon Sep 17 00:00:00 2001 From: Alejandro Asenjo Nitti <96613413+sonicdcer@users.noreply.github.com> Date: Sat, 20 Apr 2024 16:18:09 -0300 Subject: [PATCH 029/151] MOD: FPS COUNTER (#216) * progress * working * move to Play_Draw * remove mods.h include from fox_hud * fix name * __floatundisf needed by GCC * Improve level select * __floatundisf in yaml for GCC * jump directly to level loading in Map_LevelSelect * comments * fix level select * AVOID_UB in audio * stable flags * fix UB in AudioHeap_DiscardSampleCaches co-authored-by: @petrie911 * fox_map fix * move frame counter a few pixels to the right * format * add measurement correction for overclocked N64s --- Makefile | 22 ++++++++----- include/mods.h | 12 ++++++- src/audio/audio_general.c | 11 ++++++- src/audio/audio_heap.c | 7 +++-- src/engine/fox_display.c | 8 +++++ src/libultra/gcc_fix/__floatundisf.c | 27 ++++++++++++++++ src/libultra/libc/ll.c | 8 +++++ src/mods/fpscounter.c | 47 ++++++++++++++++++++++++++++ src/mods/levelselect.c | 26 +++++++++++---- src/overlays/ovl_menu/fox_map.c | 4 +-- yamls/us/main.yaml | 3 ++ 11 files changed, 155 insertions(+), 20 deletions(-) create mode 100644 src/libultra/gcc_fix/__floatundisf.c create mode 100644 src/mods/fpscounter.c diff --git a/Makefile b/Makefile index 9fa39d99..a0f181f7 100644 --- a/Makefile +++ b/Makefile @@ -87,7 +87,7 @@ endif # ditch g3, we aren't using that in GCC ifeq ($(COMPILER),gcc) - OPTFLAGS := -Os + OPTFLAGS := -Ofast else OPTFLAGS := -O2 -g3 endif @@ -339,12 +339,18 @@ build/src/libultra/os/%.o: OPTFLAGS := -Os build/src/libultra/rmon/%.o: OPTFLAGS := -Os build/src/libultra/debug/%.o: OPTFLAGS := -Os build/src/libultra/host/%.o: OPTFLAGS := -Os -build/src/audio/audio_load.o: OPTFLAGS := -O2 -build/src/audio/%.o: OPTFLAGS := -O2 -g # per-file flags -build/src/libc_sprintf.o: OPTFLAGS := -Os -build/src/libc_math64.o: OPTFLAGS := -Os +build/src/audio/audio_load.o: OPTFLAGS := -Os +build/src/audio/audio_heap.o: OPTFLAGS := -Os +build/src/audio/audio_effects.o: OPTFLAGS := -Os +build/src/audio/audio_general.o: OPTFLAGS := -Os +build/src/audio/audio_playback.o: OPTFLAGS := -Os +build/src/audio/audio_seqplayer.o: OPTFLAGS := -Os +build/src/audio/audio_thread.o: OPTFLAGS := -Os + +build/src/libc_sprintf.o: OPTFLAGS := -Ofast +build/src/libc_math64.o: OPTFLAGS := -Ofast build/src/libultra/libc/ldiv.o: OPTFLAGS := -Os build/src/libultra/libc/string.o: OPTFLAGS := -Os @@ -355,10 +361,10 @@ build/src/libultra/libc/ll.o: OPTFLAGS := -O2 build/src/libultra/libc/ll.o: MIPS_VERSION := -mips3 # cc & asm-processor -build/src/libultra/gu/sqrtf.o: OPTFLAGS := -Os -build/src/libultra/gu/sinf.o: OPTFLAGS := -Os +build/src/libultra/gu/sqrtf.o: OPTFLAGS := -Ofast +build/src/libultra/gu/sinf.o: OPTFLAGS := -Ofast build/src/libultra/gu/lookat.o: OPTFLAGS := -Os -build/src/libultra/gu/ortho.o: OPTFLAGS := -Os +build/src/libultra/gu/ortho.o: OPTFLAGS := -Os build/src/libultra/gu/perspective.o: OPTFLAGS := -Os build/src/libultra/gu/mtxutil.o: OPTFLAGS := -Os build/src/libultra/gu/cosf.o: OPTFLAGS := -Os diff --git a/include/mods.h b/include/mods.h index 6930f516..fd93b357 100644 --- a/include/mods.h +++ b/include/mods.h @@ -8,17 +8,27 @@ */ #define MODS_LEVEL_SELECT 0 - /** * Sound Effects Jukebox: * Ability to play sound effects inside the expert sound menu */ #define MODS_SFX_JUKEBOX 0 +/** + * FPS Counter: + * Press L to toggle FPS Display +*/ +#define MODS_FPS_COUNTER 0 + + /* ************************* */ #if MODS_LEVEL_SELECT == 1 void Map_LevelSelect(void); #endif +#if MODS_FPS_COUNTER == 1 +static void Play_RenderFps(void); +#endif + #endif diff --git a/src/audio/audio_general.c b/src/audio/audio_general.c index ff1247ba..1bea0140 100644 --- a/src/audio/audio_general.c +++ b/src/audio/audio_general.c @@ -688,7 +688,6 @@ void Audio_SetSfxProperties(u8 bankId, u8 entryIndex, u8 channelId) { sSfxChannelState[channelId].pan = pan; } } - f32 Audio_UpdateDopplerShift(f32* srcPos, f32* srcVel, f32 soundSpeed, f32* curDopplerShift) { f32 xVel; f32 zVel; @@ -704,6 +703,12 @@ f32 Audio_UpdateDopplerShift(f32* srcPos, f32* srcVel, f32 soundSpeed, f32* curD f32 targetDopplerShift; s32 pad; +#ifdef AVOID_UB + if ((srcPos == NULL) || (srcVel == NULL) || (curDopplerShift == NULL)) { + return 0.0f; + } +#endif + xPos = srcPos[0]; zPos = srcPos[2]; xVel = srcVel[0]; @@ -2215,7 +2220,11 @@ void Audio_UpdateBlueMarineNoise(u8 playerId) { void Audio_UpdatePlayerFreqMod(void) { u8 playerId; +#ifdef AVOID_UB + for (playerId = 0; playerId < gCamCount; playerId++) { +#else for (playerId = 0; playerId < 4; playerId++) { +#endif switch (sPlayerNoise[playerId].form) { case FORM_ARWING: Audio_UpdateArwingNoise(playerId); diff --git a/src/audio/audio_heap.c b/src/audio/audio_heap.c index 2f59b183..df30ca33 100644 --- a/src/audio/audio_heap.c +++ b/src/audio/audio_heap.c @@ -973,7 +973,7 @@ SampleCacheEntry* AudioHeap_AllocPersistentSampleCacheEntry(u32 size) { void AudioHeap_DiscardSampleCaches(void) { s32 fontId; s32 i; - s32 numFonts; + s32 numFonts = gSoundFontTable->numEntries; s32 pad; s32 sampleBankId2; s32 sampleBankId1; @@ -983,7 +983,10 @@ void AudioHeap_DiscardSampleCaches(void) { Instrument* instrument; SampleCacheEntry* entry; - numFonts = gSoundFontTable->numEntries; +#ifdef AVOID_UB + entry = gPersistentSampleCache.entries; +#endif + for (fontId = 0; fontId < numFonts; fontId++) { sampleBankId1 = gSoundFontList[fontId].sampleBankId1; sampleBankId2 = gSoundFontList[fontId].sampleBankId2; diff --git a/src/engine/fox_display.c b/src/engine/fox_display.c index 0e1e55d1..4385cd18 100644 --- a/src/engine/fox_display.c +++ b/src/engine/fox_display.c @@ -1,3 +1,4 @@ +#include "mods.h" #include "global.h" #include "assets/ast_arwing.h" #include "assets/ast_allies.h" @@ -1722,4 +1723,11 @@ void Play_Draw(void) { func_display_80051B30(); sPlayersVisible[gPlayerNum] = 0; Matrix_Pop(&gGfxMatrix); +#if MODS_FPS_COUNTER == 1 + Play_RenderFps(); +#endif } + +#if MODS_FPS_COUNTER == 1 +#include "../mods/fpscounter.c" +#endif diff --git a/src/libultra/gcc_fix/__floatundisf.c b/src/libultra/gcc_fix/__floatundisf.c new file mode 100644 index 00000000..b69a6103 --- /dev/null +++ b/src/libultra/gcc_fix/__floatundisf.c @@ -0,0 +1,27 @@ +#ifdef COMPILER_GCC + +typedef union DoubleFloatUnion { + double d; + long long int ll; + unsigned long long ull; +} DoubleFloatUnion; + +/** + * Gets float32 from uint64_t. + * + * https://gcc.gnu.org/onlinedocs/gccint/the-gcc-low-level-runtime-library/routines-for-floating-point-emulation.html#c.__floatundisf + */ +float __floatundisf(unsigned long long i) { + register DoubleFloatUnion dull; + register float ret; + + dull.ull = i; + __asm__("cvt.s.l %0, %1" : "=f"(ret) : "f"(dull.d)); + if ((long) i < 0) { + // cvt.s.l assumes signed input, adjust output + ret += 4294967296.0f; // 2^32 + } + + return ret; +} +#endif diff --git a/src/libultra/libc/ll.c b/src/libultra/libc/ll.c index a3cee6d7..6f64e972 100644 --- a/src/libultra/libc/ll.c +++ b/src/libultra/libc/ll.c @@ -1,3 +1,4 @@ +#include "mods.h" long long __ull_rshift(unsigned long long left, unsigned long long right) { return left >> right; @@ -44,3 +45,10 @@ long long __ll_mod(long long left, long long right) { long long __ll_rshift(long long left, long long right) { return left >> right; } + +// IDO FIX +#if MODS_FPS_COUNTER == 1 +float __ull_to_f(unsigned long long u) { + return u; +} +#endif diff --git a/src/mods/fpscounter.c b/src/mods/fpscounter.c new file mode 100644 index 00000000..2be76dff --- /dev/null +++ b/src/mods/fpscounter.c @@ -0,0 +1,47 @@ +#include "global.h" + +// SDK states that 1 cycle takes about 21.33 nanoseconds +#if 1 +#define SECONDS_PER_CYCLE 0.00000002133f +#else +// Use this macro if your N64 CPU is overclocked to 125 Mhz (x2 Multiplier) +#define SECONDS_PER_CYCLE 0.000000016f +#endif + +#define FPS_COUNTER_X_POS 14 +#define FPS_COUNTER_Y_POS 9 + +static OSTime gLastOSTime = 0; +static float gFrameTime = 0.0f; +static u16 gFrames = 0; +static u16 gFPS = 0; +static u8 gRenderFPS = false; + +static void CalculateFrameTimeFromOSTime(OSTime diff) { + gFrameTime += diff * SECONDS_PER_CYCLE; + gFrames++; +} + +static void Play_RenderFps(void) { + // Toggle rendering framerate with the L button. + if (gControllerPress[0].button & L_TRIG) { + gRenderFPS ^= 1; + } + if (gRenderFPS) { + OSTime newTime = osGetTime(); + CalculateFrameTimeFromOSTime(newTime - gLastOSTime); + // If frame time is longer or equal to a second, update FPS counter. + if (gFrameTime >= 1.0f) { + gFPS = gFrames; + gFrames = 0; + gFrameTime -= 1.0f; + } + + /* Draw */ + RCP_SetupDL(&gMasterDisp, 0x53); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); + Graphics_DisplaySmallText(FPS_COUNTER_X_POS, FPS_COUNTER_Y_POS, 1.0f, 1.0f, "FPS:"); + Graphics_DisplaySmallNumber(FPS_COUNTER_X_POS + 35, FPS_COUNTER_Y_POS, gFPS); + gLastOSTime = newTime; + } +} diff --git a/src/mods/levelselect.c b/src/mods/levelselect.c index 55718f5e..5c5f8da6 100644 --- a/src/mods/levelselect.c +++ b/src/mods/levelselect.c @@ -3,13 +3,18 @@ extern PlanetId sPlanetList[15]; extern PlanetId sCurrentPlanetId; +extern s32 D_menu_801B8280; +extern s32 D_menu_801CD968; + +void Map_801A61B4(LevelId level); void Map_801A6368(void); void Map_801A914C(void); +void Map_801A6628(void); void Map_LevelSelect(void) { static char* sLevelSelectPlanetNames[] = { - "CORNERIA", "METEO", "TITANIA", "SECTOR X", "AQUAS", "BOLSE", "VENOM", "FORTUNA", - "AREA 6", "MACBETH", "SECTOR Z", "ZONESS", "KATINA", "SECTOR Y", "SOLAR", + "METEO", "AREA 6", "BOLSE", "SECTOR Z", "SECTOR X", "SECTOR Y", "KATINA", "MACBETH", + "ZONESS", "CORNERIA", "TITANIA", "AQUAS", "FORTUNA", "VENOM", "SOLAR", }; if (gControllerPress[0].button & L_JPAD) { @@ -33,10 +38,19 @@ void Map_LevelSelect(void) { } /* Draw */ + if ((sCurrentPlanetId >= 0) && (sCurrentPlanetId < PLANET_MAX)) { + RCP_SetupDL(&gMasterDisp, 0x53); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); - RCP_SetupDL(&gMasterDisp, 0x53); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); + Graphics_DisplaySmallText(20, 200, 1.0f, 1.0f, "PLANET:"); + Graphics_DisplaySmallText(80, 200, 1.0f, 1.0f, sLevelSelectPlanetNames[sCurrentPlanetId]); + } - Graphics_DisplaySmallText(20, 200, 1.0f, 1.0f, "PLANET:"); - Graphics_DisplaySmallText(80, 200, 1.0f, 1.0f, sLevelSelectPlanetNames[gCurrentPlanet]); + // Bypass briefing + if (gControllerPress[0].button & A_BUTTON) { + Map_801A61B4(gCurrentLevel); + D_menu_801B8280 = 0; + D_menu_801CD968 = 0; + Map_801A6628(); + } } diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index f94c7875..4e6a22bc 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -2539,7 +2539,7 @@ void Map_801A1C14(void) { D_menu_801CD964 = 1; D_menu_801CD96C = 1; // clang-format off - for (i = 0; i < 15; i++) {D_menu_801CD900[i] = 0;} + for (i = 0; i < 15; i++) { D_menu_801CD900[i] = 0; } // clang-format on D_menu_801CD970 = 0; @@ -2557,7 +2557,7 @@ void Map_801A1C14(void) { } bool Map_801A2304(void) { - s32 ret = false; + bool ret = false; f32 sp28; f32 sp24; f32 sp20; diff --git a/yamls/us/main.yaml b/yamls/us/main.yaml index 98f9b483..c80f1b94 100644 --- a/yamls/us/main.yaml +++ b/yamls/us/main.yaml @@ -47,6 +47,9 @@ - [0x206B0, c, libc_math64] - [0x20A60, hasm, libc_math64_fp] + # GCC + - [auto, c, libultra/gcc_fix/__floatundisf] + # Libultra - [0x20BC0, c, libultra/io/controller] - [0x20F80, c, libultra/io/contreaddata] From b3929bea72dfeb0a19feb5d024306af4831cc7bd Mon Sep 17 00:00:00 2001 From: petrie911 <69443847+petrie911@users.noreply.github.com> Date: Sat, 20 Apr 2024 14:18:31 -0500 Subject: [PATCH 030/151] 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 --- include/context.h | 14 +- include/functions.h | 25 +- include/gfx.h | 34 +- include/sf64event.h | 1 + include/sf64mesg.h | 7 +- include/sf64player.h | 2 +- include/sf64thread.h | 28 +- include/sys.h | 6 +- include/variables.h | 4 +- linker_scripts/us/symbol_addrs_engine.txt | 36 +- sfxIds.txt | 399 ++++++++++++++++++++++ src/audio/audio_general.c | 4 - src/audio/audio_load.c | 5 - src/engine/fox_360.c | 131 +++---- src/engine/fox_beam.c | 4 +- src/engine/fox_bg.c | 28 +- src/engine/fox_context.c | 14 +- src/engine/fox_demo.c | 92 ++--- src/engine/fox_display.c | 48 +-- src/engine/fox_edata_info.c | 2 +- src/engine/fox_edisplay.c | 36 +- src/engine/fox_effect.c | 6 +- src/engine/fox_enmy.c | 20 +- src/engine/fox_enmy2.c | 286 ++++++++-------- src/engine/fox_game.c | 22 +- src/engine/fox_hud.c | 61 ++-- src/engine/fox_message.c | 38 +-- src/engine/fox_play.c | 123 ++++--- src/engine/fox_radio.c | 66 ++-- src/engine/fox_save.c | 4 +- src/engine/fox_std_lib.c | 56 +-- src/engine/fox_versus.c | 26 +- src/overlays/ovl_ending/fox_end1.c | 8 +- src/overlays/ovl_ending/fox_end2.c | 4 +- src/overlays/ovl_i1/fox_co.c | 24 +- src/overlays/ovl_i1/fox_i1.c | 2 +- src/overlays/ovl_i1/fox_tr.c | 6 +- src/overlays/ovl_i2/fox_i2.c | 2 +- src/overlays/ovl_i2/fox_me.c | 86 ++--- src/overlays/ovl_i2/fox_sx.c | 10 +- src/overlays/ovl_i3/fox_a6.c | 8 +- src/overlays/ovl_i3/fox_aq.c | 22 +- src/overlays/ovl_i3/fox_i3.c | 2 +- src/overlays/ovl_i3/fox_so.c | 8 +- src/overlays/ovl_i3/fox_zo.c | 6 +- src/overlays/ovl_i4/fox_bo.c | 52 +-- src/overlays/ovl_i4/fox_fo.c | 40 +-- src/overlays/ovl_i4/fox_i4.c | 40 +-- src/overlays/ovl_i4/fox_ka.c | 66 ++-- src/overlays/ovl_i4/fox_sz.c | 66 ++-- src/overlays/ovl_i5/fox_ma.c | 12 +- src/overlays/ovl_i5/fox_ti_cs.c | 22 +- src/overlays/ovl_i6/fox_andross.c | 26 +- src/overlays/ovl_i6/fox_sy.c | 10 +- src/overlays/ovl_menu/fox_map.c | 52 +-- src/overlays/ovl_menu/fox_option.c | 4 +- src/overlays/ovl_menu/fox_title.c | 10 +- src/sys/sys_lib.c | 6 +- tools/Torch | 2 +- 59 files changed, 1307 insertions(+), 917 deletions(-) create mode 100644 sfxIds.txt diff --git a/include/context.h b/include/context.h index f41dbb56..8c15ef63 100644 --- a/include/context.h +++ b/include/context.h @@ -238,13 +238,13 @@ extern PlayerShot gPlayerShots[16]; extern TexturedLine gTexturedLines[100]; extern RadarMark gRadarMarks[65]; extern BonusText gBonusText[10]; -extern s32 D_ctx_80176550[2]; -extern f32 D_ctx_80176558[2][100]; -extern f32 D_ctx_80176878[2][100]; -extern f32 D_ctx_80176B98[2][100]; -extern f32 D_ctx_80176EB8[2][100]; -extern f32 D_ctx_801771D8[2][100]; -extern f32 D_ctx_80177500[2][100]; +extern s32 gActor194Status[2]; +extern f32 gActor194xPos[2][100]; +extern f32 gActor194yPos[2][100]; +extern f32 gActor194zPos[2][100]; +extern f32 gActor194xRot[2][100]; +extern f32 gActor194yRot[2][100]; +extern f32 gActor194zRot[2][100]; extern u16 gEnemyShotSpeed; // enemy shot speed? extern u8 D_ctx_80177830; // show level complete status overlay extern s32 gLevelStatusScreenTimer; // level clear related diff --git a/include/functions.h b/include/functions.h index 1ea682f5..939370b7 100644 --- a/include/functions.h +++ b/include/functions.h @@ -23,7 +23,7 @@ bool AllRange_PlayMessage(u16*, RadioCharacterId); void AllRange_GreatFoxRepair(Player*); void AllRange_ClearRadio(void); void func_360_8002EE64(Actor* this); -void func_360_8002F180(void); +void ActorAllRange_SpawnTeam(void); void ActorAllRange_PlayMessage(u16* msg, RadioCharacterId character); void func_360_8002F69C(Actor*); void func_360_8002FC00(Actor*); @@ -83,13 +83,13 @@ void Cutscene_LevelComplete(Player*); void Cutscene_UTurn(Player*); void Cutscene_KillPlayer(Player* player); void Cutscene_PlayerDown(Player*); -void func_demo_8004F8AC(Actor*); -void func_demo_8004FEC0(Actor*); -void func_demo_800515C4(void); +void Actor195_Update(Actor*); +void Actor195_Draw(Actor*); +void Cutscene_DrawGreatFox(void); // fox_display void func_display_80053658(WingInfo*); -void func_display_8005465C(s32); +void Play_DrawEngineGlow(s32); void func_display_80057814(Player*); void Play_Draw(void); @@ -113,8 +113,8 @@ void FogShadow_Draw(Sprite*); void func_edisplay_80059F68(Object_80*); void func_edisplay_80059FDC(Object_80*); void Actor189_Draw(Actor*); -void func_edisplay_8005ADAC(Actor*); -void func_edisplay_8005B1E8(Actor*, s32); +void Actor_DrawEngineAndContrails(Actor*); +void Actor_DrawEngineGlow(Actor*, s32); void func_edisplay_8005B388(Actor*); void func_edisplay_8005B6A4(Actor*); void func_edisplay_8005B71C(Actor*); @@ -154,7 +154,7 @@ void Effect_Initialize(Effect*); void func_enmy_80061B68(void); void func_enmy_80061CD0(void); void func_enmy_80061E48(Actor* , f32 , f32 , f32 ); -void func_enmy_80061F0C(Actor* , ObjectInit* , s32 ); +void ActorEvent_Load(Actor* , ObjectInit* , s32 ); void Object_Load(ObjectInit* , f32 , f32 , f32 , f32 ); void func_enmy_80062568(void); void func_enmy_80062B60(f32 xPos, f32 zPos, s32 state, f32 scale); @@ -226,9 +226,9 @@ void Actor189_Update(Actor*); void Obj39_Update(Object_80*); void func_enmy2_8006ECBC(PlayerShotId, PlayerShot*, s32, f32, f32, f32, f32, f32, f32, f32, f32, f32); void func_enmy2_8006EEFC(s32, f32, f32, f32, f32, f32, f32, f32, f32, f32); -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); -void ActorEvent_8006F0D8(f32 xPos, f32 yPos, f32 zPos, f32 arg3); +void ActorEvent_8006F0D8(f32 xPos, f32 yPos, f32 zPos, f32 scale1); void ActorEvent_8006F254(Actor*); void ActorEvent_Update(Actor*); s32 Obj111_Draw(Object_80*); @@ -273,7 +273,6 @@ void func_effect_8007953C(f32 xPos, f32 yPos, f32 zPos, f32 scale2); void func_effect_800795AC(f32 xPos, f32 yPos, f32 zPos, f32 scale2); void func_effect_80079618(f32 xPos, f32 yPos, f32 zPos, f32 scale2); void func_effect_8007968C(Effect*); -bool func_effect_800798C4(s32 , Gfx** , Vec3f* , Vec3f* , void* ); //OverrideLimbDraw void func_effect_800798F0(Effect* ); void func_effect_8007A28C(Effect* ); void func_effect_8007A3C0(Effect* ); @@ -454,7 +453,7 @@ void func_play_800A5D6C(void); void func_play_800A5EBC(void); void func_play_800A5FA0(f32* , u32 , s32 ); void func_play_800A6070(f32* , u32 ); -void func_play_800A6148(void); +void Play_ClearObjectData(void); void func_play_800A69F8(s32 , f32 , f32 , f32 ); void Player_ApplyDamage(Player* player, s32 direction, s32 damage); bool func_play_800A73E4(f32* , s32* , f32 xPos, f32 yPos, f32 zPos); @@ -505,8 +504,6 @@ void OvlMenu_CallFunction(u32, void*); void Map_8019E8D0(void); void Venom1_80198414(void); -// s32 Venom1_801937F4(s32, Gfx**, Vec3f*, Vec3f*, void*); -// void Venom1_80193D64(s32, Vec3f*, void*); void Ending_8018A96C(void); void Ending_8018AAC4(void); diff --git a/include/gfx.h b/include/gfx.h index 5702f65f..38a54724 100644 --- a/include/gfx.h +++ b/include/gfx.h @@ -118,23 +118,23 @@ s32 Animation_GetFrameCount(Animation *animationSegment); void Animation_FindBoundingBox(Gfx* dList, s32 len, Vec3f *min, Vec3f *max, s32 *vtxFound, s32 *vtxCount, Vtx* *vtxList); void Animation_GetDListBoundingBox(Gfx *dList, s32 len, Vec3f *min, Vec3f *max); void Animation_GetSkeletonBoundingBox(Limb** skeletonSegment, Animation *animationSegment, s32 frame, Vec3f *min, Vec3f* max); -void TextureRect_4bCI(Gfx **gfxPtr, void* texture, void* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_4bCI_Flip(Gfx **gfxPtr, void* texture, void* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_4bCI_MirX(Gfx **gfxPtr, void* texture, void* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_4bCI_MirY(Gfx **gfxPtr, void* texture, void* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_8bCI(Gfx **gfxPtr, void* texture, void* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_16bRGBA(Gfx **gfxPtr, void* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_16bRGBA_MirX(Gfx **gfxPtr, void* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_8bIA(Gfx **gfxPtr, void* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_8bIA_FilpMirX(Gfx **gfxPtr, void* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_8bIA_FilpMirY(Gfx **gfxPtr, void* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_8bIA_MirX(Gfx **gfxPtr, void* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_8bIA_MirY(Gfx **gfxPtr, void* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_16bIA(Gfx **gfxPtr, void* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_16bIA_MirX(Gfx **gfxPtr, void* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_16bIA_MirY(Gfx **gfxPtr, void* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_16bIA_MirXY(Gfx **gfxPtr, void* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_32bRGBA(Gfx **gfxPtr, void* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void TextureRect_4bCI(Gfx **gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void TextureRect_4bCI_Flip(Gfx **gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void TextureRect_4bCI_MirX(Gfx **gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void TextureRect_4bCI_MirY(Gfx **gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void TextureRect_8bCI(Gfx **gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void TextureRect_16bRGBA(Gfx **gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void TextureRect_16bRGBA_MirX(Gfx **gfxPtr, u16* 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); +void TextureRect_8bIA_FilpMirX(Gfx **gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void TextureRect_8bIA_FilpMirY(Gfx **gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void TextureRect_8bIA_MirX(Gfx **gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void TextureRect_8bIA_MirY(Gfx **gfxPtr, u8* 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); +void TextureRect_16bIA_MirX(Gfx **gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void TextureRect_16bIA_MirY(Gfx **gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void TextureRect_16bIA_MirXY(Gfx **gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void TextureRect_32bRGBA(Gfx **gfxPtr, u32* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); void Graphics_FillRectangle(Gfx **gfxPtr, s32 ulx, s32 uly, s32 lrx, s32 lry, u8 r, u8 g, u8 b, u8 a); u16* Graphics_SetupTextureRender(Gfx **gfxPtr, u8 width, u8 height); void Graphics_DisplayHUDNumber(s32 xPos, s32 yPos, s32 number); diff --git a/include/sf64event.h b/include/sf64event.h index 3e68d542..1516f3f8 100644 --- a/include/sf64event.h +++ b/include/sf64event.h @@ -106,6 +106,7 @@ #define EVENT_DAMAGE_TEAM(teamId, damage) EVENT_CMD(EVOP_DAMAGE_TEAM, damage, teamId) #define EVENT_SET_TARGET(teamId, spread) EVENT_CMD(EVOP_SET_TARGET, teamId, spread) #define EVENT_CHASE_TARGET(duration, turnRate) EVENT_CMD(EVOP_CHASE_TARGET, duration, turnRate) +#define EVENT_SET_WAIT(duration) EVENT_CMD(EVOP_SET_WAIT, 0, duration) typedef enum EventModeZ { EMZ_REST, diff --git a/include/sf64mesg.h b/include/sf64mesg.h index 924ba659..db1369bf 100644 --- a/include/sf64mesg.h +++ b/include/sf64mesg.h @@ -21,10 +21,10 @@ bool Message_IsPrintingChar(u16* msgPtr, s32 charPos); typedef enum RadioCharacterId { RCID_FOX = 0, RCID_FOX_OPEN, - RCID_FOX_RED = 5, - RCID_FOX_RED_OPEN, RCID_STATIC = 2, RCID_STATIC_FLIP, + RCID_FOX_RED = 5, + RCID_FOX_RED_OPEN, RCID_FALCO = 10, RCID_FALCO_OPEN, RCID_FALCO_RED = 15, @@ -97,6 +97,7 @@ typedef enum RadioCharacterId { RCID_TR_OPEN, RCID_FOX_EXPERT = 400, RCID_FOX_EXPERT_OPEN, + RCID_1000 = 1000, } RadioCharacterId; void Radio_PlayMessage(u16*, enum RadioCharacterId); @@ -119,7 +120,7 @@ typedef enum { MSGCHAR_SPC, MSGCHAR_QSP, MSGCHAR_HSP, - MSGCHAR_NPF, + MSGCHAR_NXT, MSGCHAR_CLF, MSGCHAR_CUP, MSGCHAR_CRT, diff --git a/include/sf64player.h b/include/sf64player.h index 9504ab37..f00437c3 100644 --- a/include/sf64player.h +++ b/include/sf64player.h @@ -311,7 +311,7 @@ typedef struct Player { /* 0x498 */ s32 timer_498; /* 0x49C */ WingInfo wings; /* 0x4D8 */ f32 unk_4D8; - /* 0x4DC */ s32 unk_4DC; + /* 0x4DC */ s32 somersault; } Player; // size = 0x4E0 diff --git a/include/sf64thread.h b/include/sf64thread.h index 9c43bc72..e56936dd 100644 --- a/include/sf64thread.h +++ b/include/sf64thread.h @@ -85,7 +85,7 @@ void Timer_SetValue(s32* address, s32 value); void Timer_CompleteTask(TimerTask*); void Timer_Wait(u64); -void Fault_ThreadEntry(void*); +void Fault_ThreadEntry(OSMesg); void func_80007FE4(FrameBuffer*, u16, u16); void Fault_Init(void); @@ -127,32 +127,32 @@ extern OSMesgQueue gPiMgrCmdQueue; // 800E2010 extern OSMesg sPiMgrCmdBuff[50]; // 800E2028 extern OSMesgQueue gDmaMsgQueue; -extern void* sDmaMsgBuff[1]; +extern OSMesg sDmaMsgBuff[1]; extern OSIoMesg gDmaIOMsg; extern OSMesgQueue gSerialEventQueue; -extern void* sSerialEventBuff[1]; +extern OSMesg sSerialEventBuff[1]; extern OSMesgQueue gMainThreadMsgQueue; -extern void* sMainThreadMsgBuff[32]; +extern OSMesg sMainThreadMsgBuff[32]; extern OSMesgQueue gTaskMsgQueue; -extern void* sTaskMsgBuff[16]; +extern OSMesg sTaskMsgBuff[16]; extern OSMesgQueue gAudioVImsgQueue; -extern void* sAudioVImsgBuff[1]; +extern OSMesg sAudioVImsgBuff[1]; extern OSMesgQueue gAudioTaskMsgQueue; -extern void* sAudioTaskMsgBuff[1]; +extern OSMesg sAudioTaskMsgBuff[1]; extern OSMesgQueue gGfxVImsgQueue; -extern void* sGfxVImsgBuff[4]; +extern OSMesg sGfxVImsgBuff[4]; extern OSMesgQueue gGfxTaskMsgQueue; -extern void* sGfxTaskMsgBuff[2]; +extern OSMesg sGfxTaskMsgBuff[2]; extern OSMesgQueue gSerialThreadMsgQueue; -extern void* sSerialThreadMsgBuff[8]; +extern OSMesg sSerialThreadMsgBuff[8]; extern OSMesgQueue gControllerMsgQueue; -extern void* sControllerMsgBuff[1]; +extern OSMesg sControllerMsgBuff[1]; extern OSMesgQueue gSaveMsgQueue; -extern void* sSaveMsgBuff[1]; +extern OSMesg sSaveMsgBuff[1]; extern OSMesgQueue gTimerTaskMsgQueue; -extern void* sTimerTaskMsgBuff[16]; +extern OSMesg sTimerTaskMsgBuff[16]; extern OSMesgQueue gTimerWaitMsgQueue; -extern void* sTimerWaitMsgBuff[1]; +extern OSMesg sTimerWaitMsgBuff[1]; extern GfxPool gGfxPools[2]; // 800E23B0 diff --git a/include/sys.h b/include/sys.h index da2c0952..04b1d522 100644 --- a/include/sys.h +++ b/include/sys.h @@ -55,8 +55,8 @@ extern u16 D_game_80161A34; extern u16 gBgColor; extern u8 gBlurAlpha; extern u8 D_game_80161A39; -extern f32 D_game_80161A3C; -extern f32 D_game_80161A40; -extern f32 D_game_80161A44; +extern f32 gFovY; +extern f32 gProjectNear; +extern f32 gProjectFar; #endif diff --git a/include/variables.h b/include/variables.h index cd42ca3b..62aade6d 100644 --- a/include/variables.h +++ b/include/variables.h @@ -22,8 +22,8 @@ extern Vec3f D_tank_800C9F2C; // fox_display extern s32 D_display_800CA220; extern f32 D_display_800CA230; -extern Actor* D_display_800CA234; -extern s32 D_display_Timer_800CA238; +extern Actor* gTeamHelpActor; +extern s32 gTeamHelpTimer; // fox_edata extern f32 gActor241Hitbox[]; diff --git a/linker_scripts/us/symbol_addrs_engine.txt b/linker_scripts/us/symbol_addrs_engine.txt index 65389bdc..01774f52 100644 --- a/linker_scripts/us/symbol_addrs_engine.txt +++ b/linker_scripts/us/symbol_addrs_engine.txt @@ -1,5 +1,5 @@ //fox_display -D_display_Timer_800CA238 = 0x800CA238; +gTeamHelpTimer = 0x800CA238; //fox_std_lib sSmallChars = 0x800D2660;//type:asciz size:42 @@ -187,8 +187,8 @@ func_edisplay_8005A010 = 0x8005A010; func_edisplay_8005A07C = 0x8005A07C; func_edisplay_8005A088 = 0x8005A088; Actor189_Draw = 0x8005A094; -func_edisplay_8005ADAC = 0x8005ADAC; -func_edisplay_8005B1E8 = 0x8005B1E8; +Actor_DrawEngineAndContrails = 0x8005ADAC; +Actor_DrawEngineGlow = 0x8005B1E8; func_edisplay_8005B388 = 0x8005B388; func_edisplay_8005B6A4 = 0x8005B6A4; func_edisplay_8005B71C = 0x8005B71C; @@ -216,8 +216,8 @@ Boss_Draw = 0x8005E1B8; Effect_DrawOnRails = 0x8005E454; Effect_DrawAllRange = 0x8005E538; Item_Draw = 0x8005E7B8; -func_edisplay_8005EA24 = 0x8005EA24; -func_edisplay_8005ECD8 = 0x8005ECD8; +ActorAllRange_DrawShadow = 0x8005EA24; +Object_DrawShadow = 0x8005ECD8; Object_ClampSfxSource = 0x8005F030; func_edisplay_8005F0E8 = 0x8005F0E8; func_edisplay_8005F1EC = 0x8005F1EC; @@ -273,7 +273,7 @@ func_enmy_80061A4C = 0x80061A4C; func_enmy_80061B68 = 0x80061B68; func_enmy_80061CD0 = 0x80061CD0; func_enmy_80061E48 = 0x80061E48; -func_enmy_80061F0C = 0x80061F0C; +ActorEvent_Load = 0x80061F0C; Object_Load = 0x80062180; func_enmy_80062568 = 0x80062568; Object_LoadFromInit = 0x80062664; @@ -363,9 +363,9 @@ D_game_80161A34 = 0x80161A34; gBgColor = 0x80161A36; gBlurAlpha = 0x80161A38; D_game_80161A39 = 0x80161A39; -D_game_80161A3C = 0x80161A3C; -D_game_80161A40 = 0x80161A40; -D_game_80161A44 = 0x80161A44; +gFovY = 0x80161A3C; +gProjectNear = 0x80161A40; +gProjectFar = 0x80161A44; gShowCrosshairs = 0x800D2860; D_game_800D2870 = 0x800D2870; sVsCameraULx = 0x800D2874; @@ -431,14 +431,14 @@ gPlayerShots = 0x80174050; //size:0x700 gTexturedLines = 0x80174750; //size:0x12C0 gRadarMarks = 0x80175A10; //size:0xA28 gBonusText = 0x80176438; //size:0x118 -D_ctx_80176550 = 0x80176550; -D_ctx_80176558 = 0x80176558; -D_ctx_80176878 = 0x80176878; -D_ctx_80176B98 = 0x80176B98; -D_ctx_80176EB8 = 0x80176EB8; -D_ctx_801771D8 = 0x801771D8; +gActor194Status = 0x80176550; +gActor194xPos = 0x80176558; +gActor194yPos = 0x80176878; +gActor194zPos = 0x80176B98; +gActor194xRot = 0x80176EB8; +gActor194yRot = 0x801771D8; gOverlaySetup = 0x801774F8; -D_ctx_80177500 = 0x80177500; +gActor194zRot = 0x80177500; gOverlayStage = 0x80177820; D_ctx_80177824 = 0x80177824; gEnemyShotSpeed = 0x80177828; @@ -689,7 +689,7 @@ func_play_800A6070 = 0x800A6070; BonusText_Initialize = 0x800A60B8; TexturedLine_Initialize = 0x800A60E8; RadarMark_Initialize = 0x800A6118; -func_play_800A6148 = 0x800A6148; +Play_ClearObjectData = 0x800A6148; Play_UpdateFillScreen = 0x800A6590; func_play_800A668C = 0x800A668C; func_play_800A670C = 0x800A670C; @@ -709,7 +709,7 @@ func_play_800A887C = 0x800A887C; func_play_800A8BA4 = 0x800A8BA4; func_play_800AA800 = 0x800AA800; func_play_800AB2AC = 0x800AB2AC; -func_play_800AB304 = 0x800AB304; +Player_Initialize = 0x800AB304; func_play_800AB334 = 0x800AB334; func_play_800AB964 = 0x800AB964; func_play_800ABA08 = 0x800ABA08; diff --git a/sfxIds.txt b/sfxIds.txt new file mode 100644 index 00000000..7ef3cb71 --- /dev/null +++ b/sfxIds.txt @@ -0,0 +1,399 @@ +0x09000000 +0x09400000 +0x09001001 +0x09000002 +0x09004002 +0x09000003 +0x09000004 +0x0903F004 +0x0100F005 +0x0100F006 +0x09000007 +0x01008008 +0x0901A009 +0x0903A00A +0x0901A00B +0x0940A00B +0x0940800C +0x0903900E +0x0903A00F +0x0900C010 +0x09007011 +0x09000012 +0x09000013 +0x09002013 +0x09000014 +0x09008015 +0x01008016 +0x09000017 +0x0140001C +0x0100001D +0x0100001E +0x0100001F +0x0100F020 +0x09400021 +0x0100F022 +0x09008023 +0x01004024 +0x01000025 +0x01038026 +0x09400027 +0x09404028 +0x09007029 +0x0900802A +0x0940802A +0x0940802B +0x0900A02C +0x0900302D +0x0903502E +0x0900402F +0x09004030 +0x09004031 +0x09000032 + +0x11000000 +0x19000001 +0x19030003 +0x19031003 +0x19130003 +0x19030004 +0x19122005 +0x19020006 +0x19030006 +0x19400007 +0x19020008 +0x19033008 +0x1100000A +0x1100000B +0x1100000C +0x1900000D +0x1903000D +0x1900000E +0x1903000E +0x1903400F +0x11030010 +0x11000011 +0x19003012 +0x19004013 +0x19000014 +0x19500015 +0x11030016 +0x11404016 +0x19800017 +0x19832019 +0x1983201A +0x1900001B +0x1903901C +0x1903001D +0x1903001E +0x1903001F +0x19000020 +0x19003021 +0x11033022 +0x11003023 +0x19000024 +0x11037025 +0x19000026 +0x11000027 +0x11000028 +0x19000029 +0x1900602A +0x1900302B +0x1100802C +0x1900002D +0x1900002E +0x1902102F +0x19003030 +0x19402031 +0x19000032 +0x19000033 +0x11015034 +0x19006035 +0x19030036 +0x19030037 +0x19404038 +0x19404139 +0x1940423A +0x1940433B +0x1940443C +0x1940453D +0x1940463E +0x1903203F +0x19032040 +0x19032041 +0x19034041 +0x19034042 +0x11034043 +0x19406044 +0x1140B045 +0x11038046 +0x19408047 +0x19401048 +0x11032049 +0x1913204A +0x1100004C +0x1100204C +0x1900404D +0x1900404F +0x11002050 +0x19004051 +0x11002052 +0x19035053 +0x19036053 +0x19035054 +0x19036054 +0x11000055 +0x19032056 +0x19030057 +0x19033058 +0x19030059 +0x1903005A +0x1903205B +0x1903205C +0x1940405D +0x1940205E +0x1903205F +0x19020060 +0x19020061 +0x19001062 +0x11001063 +0x19032064 +0x19000065 +0x19034066 +0x19022067 +0x19023068 +0x19022069 +0x1940306A +0x1940306B +0x1940306C +0x1940306D +0x1940306E +0x1940306F +0x19403070 +0x11403071 +0x19038072 +0x11030073 +0x11034074 +0x11032075 +0x11403076 +0x19400077 +0x19021078 +0x11407079 +0x1950107A +0x1940807B +0x1940307C +0x1903407D +0x1903807E +0x1903807F +0x19038080 +0x11032081 +0x19031082 +0x19031083 +0x11020084 + +0x29000000 +0x29002002 +0x29024003 +0x29034003 +0x29121007 +0x2903A008 +0x2903B009 +0x2940C00A +0x2903700B +0x2900000D +0x2903300E +0x2900300F +0x2943500F +0x29022019 +0x2940201A +0x2903101B +0x2903201B +0x2902401C +0x2903401C +0x2900201D +0x2902201F +0x29023020 +0x29034021 +0x2903A021 +0x29433022 +0x29400023 +0x29034024 +0x29402024 +0x2902F026 +0x2940F026 +0x2940C027 +0x29000028 +0x29406029 +0x2900502A +0x2940702B +0x2940802C +0x2940902D +0x29003031 +0x29403031 +0x29503032 +0x29038033 +0x29018036 +0x29033037 +0x2903203B +0x2940983C +0x2900403D +0x2900803F +0x29034041 +0x29034045 +0x2902A046 +0x29022048 +0x29018049 +0x2903404B +0x2903604C +0x2940604C +0x2940804E +0x2940A04F +0x29036050 +0x29409051 +0x29400052 +0x29408054 +0x29408055 +0x29038058 +0x2902405E +0x2903305F +0x2903A060 +0x29001062 +0x29033064 +0x29034065 +0x2900306A +0x2900306B +0x2902306C +0x2902306D +0x2901306E +0x2903A06F +0x29000071 +0x29000072 +0x29432073 +0x29433074 +0x29434075 +0x29432077 +0x2902107D +0x29032080 +0x29033081 +0x29034082 +0x29405084 +0x29022086 +0x29022088 +0x29022089 +0x2900308C +0x2900208D +0x2903408F +0x29038090 +0x2940B096 +0x29030098 +0x29036099 +0x2940D09A + +0x31004005 +0x31004006 +0x3100000C +0x31000011 +0x31000012 +0x31000013 +0x31000014 +0x31000015 +0x31000016 +0x31000017 +0x31038018 +0x3100001E +0x31000025 +0x31034025 +0x3140402E +0x3143402E +0x3143102F +0x39435830 +0x31012039 +0x3100203A +0x3100503E +0x31000040 +0x31030043 +0x31000047 +0x3140904D +0x31016056 +0x31037057 +0x31024059 +0x3102505A +0x3103605B +0x3102705C +0x3102405D +0x31032061 +0x3103A061 +0x31009063 +0x31034064 +0x31404066 +0x31404067 +0x39404068 +0x31008069 +0x39439076 +0x31033078 +0x39033079 +0x3140807E +0x31030083 +0x31078085 +0x31022087 +0x3140208A +0x3103108B +0x3100208E +0x39408091 +0x39408092 +0x39033093 +0x31405094 +0x31408095 +0x31408097 +0x3103109B + +0x4900F000 +0x49000002 +0x49000003 +0x49002004 +0x49002005 +0x49002006 +0x49004007 +0x49000008 +0x49000009 +0x4900100A +0x4900000C +0x4900200D +0x4900200E +0x4900400F +0x49008010 +0x49008011 +0x41007012 +0x49003013 +0x49000014 +0x49008015 +0x49002016 +0x49000017 +0x49002018 +0x49000019 +0x4900101A +0x4900001B +0x4900001C +0x4900101D +0x4100001E +0x4900001F +0x49000020 +0x49000021 +0x49000022 +0x4100C023 +0x4900C024 +0x49008025 +0x49001026 +0x49008027 +0x4900C028 +0x4900C02A +0x4900002C +0x4900002D +0x4900402E +0x4900402F +0x49008030 +0x49008031 +0x49000032 +0x49000033 +0x49008034 +0x4900D036 diff --git a/src/audio/audio_general.c b/src/audio/audio_general.c index 1bea0140..0c10d4f9 100644 --- a/src/audio/audio_general.c +++ b/src/audio/audio_general.c @@ -964,7 +964,6 @@ void Audio_ProcessSeqCmd(u32 seqCmd) { val = seqCmd & 0xFF; ioPort = ((seqCmd & 0xFF0000) >> 0x10); // may be misnamed AUDIOCMD_SEQPLAYER_SET_IO(seqPlayId, ioPort, val); - // AudioThread_QueueCmdS8(((seqPlayId & 0xFF) << 0x10) | 0x46000000 | (temp3 << 8), temp4); break; case SEQCMD_OP_SET_CHANNEL_IO: val = seqCmd & 0xFF; @@ -973,8 +972,6 @@ void Audio_ProcessSeqCmd(u32 seqCmd) { ioPort = (seqCmd & 0xFF0000) >> 0x10; if (!(sActiveSequences[seqPlayId].channelPortMask & (1 << channel))) { AUDIOCMD_CHANNEL_SET_IO(seqPlayId, (u32) channel, ioPort, val); - // AudioThread_QueueCmdS8(((seqPlayId & 0xFF) << 0x10) | 0x06000000 | ((temp_a2_5 & 0xFF) << 8) | temp3, - // temp4); } break; case SEQCMD_OP_SET_CHANNEL_IO_DISABLE_MASK: @@ -1012,7 +1009,6 @@ void Audio_ProcessSeqCmd(u32 seqCmd) { switch (subOp) { case SEQCMD_SUB_OP_GLOBAL_SET_SOUND_MODE: AUDIOCMD_GLOBAL_SET_SOUND_MODE(sSoundModeList[val]); - // AudioThread_QueueCmdS32(0xF0000000, sSoundModeList[temp11]); break; case SEQCMD_SUB_OP_GLOBAL_DISABLE_NEW_SEQUENCES: sStartSeqDisabled = val & 1; diff --git a/src/audio/audio_load.c b/src/audio/audio_load.c index bc85f192..72b07400 100644 --- a/src/audio/audio_load.c +++ b/src/audio/audio_load.c @@ -29,10 +29,8 @@ s32 PAD_80146D88[2]; AudioSlowLoadBuffer gSlowLoads; s32 AudioLoad_DiscardFont(s32 fontId); - void AudioLoad_SyncInitSeqPlayerInternal(s32 playerIdx, s32 seqId, s32 arg2); void* AudioLoad_SyncLoadSeq(s32 seqId); -void* AudioLoad_SyncLoadSampleBank(u32 sampleBankId, s32* outMedium); void* AudioLoad_SyncLoadFont(s32 fontId); void* AudioLoad_SyncLoad(u32 tableType, u32 id, s32* didAllocate); s32 AudioLoad_GetLoadTableIndex(s32 tableType, u32 entryId); @@ -44,9 +42,7 @@ s32 AudioLoad_Dma(OSIoMesg* mesg, u32 priority, s32 direction, u32 devAddr, void OSMesgQueue* retQueue, s32 medium, const char* dmaType); s32 func_8000FC7C(u32 unkMediumParam, u32* addrPtr); void func_8000FC8C(s32 unkParam2, u32 addr, u8* ramAddr, u32 size); -void AudioLoad_SyncLoadSimple(u32 tableType, u32 id); void* AudioLoad_AsyncLoadInner(s32 tableType, s32 id, s32 nChunks, s32 retData, OSMesgQueue* retQueue); - Sample* AudioLoad_GetFontSample(s32 fontId, s32 instId); void AudioLoad_ProcessSlowLoads(s32 resetStatus); void AudioLoad_DmaSlowCopy(AudioSlowLoad* slowLoad, s32 size); @@ -60,7 +56,6 @@ void AudioLoad_AsyncDmaUnkMedium(u32 devAddr, u8* ramAddr, u32 size, s32 unkMedi void AudioLoad_RelocateSample(TunedSample* tSample, u32 fontDataAddr, SampleBankRelocInfo* relocInfo); s32 AudioLoad_RelocateFontAndPreloadSamples(s32 fontId, u32 fontDataAddr, SampleBankRelocInfo* relocData, s32 isAsync); s32 AudioLoad_ProcessSamplePreloads(s32 resetStatus); -s32 AudioLoad_GetSamplesForFont(s32 fontId, Sample** sampleSet); void AudioLoad_DecreaseSampleDmaTtls(void) { SampleDma* dma; diff --git a/src/engine/fox_360.c b/src/engine/fox_360.c index 48b437a9..85cc6d41 100644 --- a/src/engine/fox_360.c +++ b/src/engine/fox_360.c @@ -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; diff --git a/src/engine/fox_beam.c b/src/engine/fox_beam.c index c1471e6a..b25f6324 100644 --- a/src/engine/fox_beam.c +++ b/src/engine/fox_beam.c @@ -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) && diff --git a/src/engine/fox_bg.c b/src/engine/fox_bg.c index dc7dc243..4bdfc422 100644 --- a/src/engine/fox_bg.c +++ b/src/engine/fox_bg.c @@ -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); diff --git a/src/engine/fox_context.c b/src/engine/fox_context.c index c42f9adf..a9871807 100644 --- a/src/engine/fox_context.c +++ b/src/engine/fox_context.c @@ -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 diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index 0d8e55ff..1e71237d 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -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; diff --git a/src/engine/fox_display.c b/src/engine/fox_display.c index 4385cd18..c029cef5 100644 --- a/src/engine/fox_display.c +++ b/src/engine/fox_display.c @@ -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) { diff --git a/src/engine/fox_edata_info.c b/src/engine/fox_edata_info.c index 6d684587..ea714c4c 100644 --- a/src/engine/fox_edata_info.c +++ b/src/engine/fox_edata_info.c @@ -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 }, diff --git a/src/engine/fox_edisplay.c b/src/engine/fox_edisplay.c index 4e8f6a9c..e2671bbe 100644 --- a/src/engine/fox_edisplay.c +++ b/src/engine/fox_edisplay.c @@ -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); } } diff --git a/src/engine/fox_effect.c b/src/engine/fox_effect.c index 16c0687e..616d3fbc 100644 --- a/src/engine/fox_effect.c +++ b/src/engine/fox_effect.c @@ -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; } diff --git a/src/engine/fox_enmy.c b/src/engine/fox_enmy.c index ba0c56ad..a1fbbd06 100644 --- a/src/engine/fox_enmy.c +++ b/src/engine/fox_enmy.c @@ -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; } diff --git a/src/engine/fox_enmy2.c b/src/engine/fox_enmy2.c index 64ffb490..8d49352e 100644 --- a/src/engine/fox_enmy2.c +++ b/src/engine/fox_enmy2.c @@ -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(); } diff --git a/src/engine/fox_game.c b/src/engine/fox_game.c index 8e818cdc..d0265358 100644 --- a/src/engine/fox_game.c +++ b/src/engine/fox_game.c @@ -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); diff --git a/src/engine/fox_hud.c b/src/engine/fox_hud.c index 717c642b..a66e103f 100644 --- a/src/engine/fox_hud.c +++ b/src/engine/fox_hud.c @@ -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; diff --git a/src/engine/fox_message.c b/src/engine/fox_message.c index 1860b29d..e7cca64a 100644 --- a/src/engine/fox_message.c +++ b/src/engine/fox_message.c @@ -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; diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index d1204be6..eacb4b2a 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -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); diff --git a/src/engine/fox_radio.c b/src/engine/fox_radio.c index 0a7938bf..307cf658 100644 --- a/src/engine/fox_radio.c +++ b/src/engine/fox_radio.c @@ -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; diff --git a/src/engine/fox_save.c b/src/engine/fox_save.c index beb3357e..82e06584 100644 --- a/src/engine/fox_save.c +++ b/src/engine/fox_save.c @@ -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); diff --git a/src/engine/fox_std_lib.c b/src/engine/fox_std_lib.c index 21654459..e3f89e81 100644 --- a/src/engine/fox_std_lib.c +++ b/src/engine/fox_std_lib.c @@ -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; diff --git a/src/engine/fox_versus.c b/src/engine/fox_versus.c index 7b128683..c9814cdc 100644 --- a/src/engine/fox_versus.c +++ b/src/engine/fox_versus.c @@ -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; } diff --git a/src/overlays/ovl_ending/fox_end1.c b/src/overlays/ovl_ending/fox_end1.c index 65b193eb..bdd9c787 100644 --- a/src/overlays/ovl_ending/fox_end1.c +++ b/src/overlays/ovl_ending/fox_end1.c @@ -1500,7 +1500,7 @@ void Ending_8018B860(void) { gAmbientG = sp1C[1]; gAmbientB = sp1C[2]; - func_play_800A6148(); + Play_ClearObjectData(); Ending_8018B3E8(&gActors[0], 0); Ending_8018B52C(&gActors[1], 0); @@ -1547,7 +1547,7 @@ void Ending_8018BAD0(void) { gAmbientG = sp1C[1]; gAmbientB = sp1C[2]; - func_play_800A6148(); + Play_ClearObjectData(); Ending_8018B3E8(&gActors[0], 1); Ending_8018B624(&gActors[1]); @@ -1583,7 +1583,7 @@ bool Ending_8018BCB0(void) { case 1010: sp5C = true; - func_play_800A6148(); + Play_ClearObjectData(); break; } @@ -1806,7 +1806,7 @@ void Ending_8018C21C(void) { Matrix_RotateX(gGfxMatrix, gActors[i].obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, gActors[i].obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - func_demo_800515C4(); + Cutscene_DrawGreatFox(); } break; diff --git a/src/overlays/ovl_ending/fox_end2.c b/src/overlays/ovl_ending/fox_end2.c index 5f5532fb..71ed3037 100644 --- a/src/overlays/ovl_ending/fox_end2.c +++ b/src/overlays/ovl_ending/fox_end2.c @@ -496,7 +496,7 @@ void Ending_8018F2A8(u32 arg0, AssetInfo* asset) { gCurrentLevel = LEVEL_UNK_M1; - func_demo_800515C4(); + Cutscene_DrawGreatFox(); } void Ending_8018F64C(u32 arg0, AssetInfo* asset) { @@ -745,7 +745,7 @@ void Ending_80190CF0(u32 arg0, AssetInfo* asset) { } if (arg0 == asset->unk_0C) { - AUDIO_PLAY_SFX(0x1940306EU, gDefaultSfxSource, 4U); + AUDIO_PLAY_SFX(0x1940306E, gDefaultSfxSource, 4); } RCP_SetupDL(&gMasterDisp, asset->unk_08); diff --git a/src/overlays/ovl_i1/fox_co.c b/src/overlays/ovl_i1/fox_co.c index a1f5c0d5..83dbc589 100644 --- a/src/overlays/ovl_i1/fox_co.c +++ b/src/overlays/ovl_i1/fox_co.c @@ -347,9 +347,7 @@ ObjectId Corneria_80188750(Boss* boss) { if (boss->swork[35] >= 5) { boss->swork[35] = 0; return OBJ_ACTOR_191; - } - - if (func_hud_8008AC54(0) < 4) { + } else if (func_hud_8008AC54(0) < 4) { return OBJ_ACTOR_190; } else { return 0; @@ -939,9 +937,9 @@ void Corneria_80189058(Boss* boss) { boss->swork[31] = 0; } if ((boss->state != 0) && ((boss->unk_04C == 0) || (boss->unk_04C == 52))) { - AUDIO_PLAY_SFX(0x29022019U, boss->sfxSource, 4); + AUDIO_PLAY_SFX(0x29022019, boss->sfxSource, 4); } - if ((gPlayer[0].unk_4DC != 0) && (boss->state != 0)) { + if (gPlayer[0].somersault && (boss->state != 0)) { boss->state = 0; boss->swork[31] = 1; boss->timer_050 = 100; @@ -2737,7 +2735,7 @@ void Corneria_8018F880(Player* player) { actor0->obj.pos.y = player->pos.y + 80.0f; actor0->obj.pos.z += 100.0f; } - if ((D_ctx_801782F8 != 0) && (gGameFrameCount & 2)) { + if (D_ctx_801782F8 && (gGameFrameCount & 2)) { player->wings.unk_30 = 5.0f; } break; @@ -2747,14 +2745,14 @@ void Corneria_8018F880(Player* player) { D_ctx_80177A48[0] = 0.0f; player->timer_1F8 = 190; } - if ((D_ctx_801782F8 != 0) && (gGameFrameCount & 2)) { + if (D_ctx_801782F8 && (gGameFrameCount & 2)) { player->wings.unk_30 = 5.0f; } gCsCamEyeY = player->pos.y + 10.0f; gCsCamAtY = player->pos.y + 10.0f; break; case 4: - if ((D_ctx_801782F8 != 0) && (gGameFrameCount & 2)) { + if (D_ctx_801782F8 && (gGameFrameCount & 2)) { player->wings.unk_30 = 5.0f; } Math_SmoothStepToF(&D_ctx_80177A48[0], 0.1f, 1.0f, 0.001f, 0.0f); @@ -2775,7 +2773,7 @@ void Corneria_8018F880(Player* player) { Math_SmoothStepToF(&actor0->fwork[19], 50.0f, 0.1f, 3.0f, 0.01f); } actor0->fwork[20] = 0.0f; - if ((D_ctx_801782F8 != 0) && (gGameFrameCount & 2)) { + if (D_ctx_801782F8 && (gGameFrameCount & 2)) { actor0->fwork[20] = 5.0f; } break; @@ -2815,7 +2813,7 @@ void Corneria_8018F880(Player* player) { Radio_PlayMessage(gMsg_ID_2030, RCID_PEPPY); } actor2->fwork[20] = 0.0f; - if ((D_ctx_801782F8 != 0) && (gGameFrameCount & 2)) { + if (D_ctx_801782F8 && (gGameFrameCount & 2)) { actor2->fwork[20] = 5.0f; } break; @@ -2842,7 +2840,7 @@ void Corneria_8018F880(Player* player) { Math_SmoothStepToF(&actor1->fwork[19], -20.0f, 0.1f, 3.0f, 0.01f); } actor1->fwork[20] = 0.0f; - if ((D_ctx_801782F8 != 0) && (gGameFrameCount & 2)) { + if (D_ctx_801782F8 && (gGameFrameCount & 2)) { actor1->fwork[20] = 5.0f; } break; @@ -2865,7 +2863,7 @@ void Corneria_8018F880(Player* player) { Radio_PlayMessage(gMsg_ID_2050, RCID_FOX); } player->wings.unk_30 = 0.0f; - if ((D_ctx_801782F8 != 0) && (gGameFrameCount & 2)) { + if (D_ctx_801782F8 && (gGameFrameCount & 2)) { player->wings.unk_30 = 5.0f; } if (player->timer_1F8 == 80) { @@ -3190,7 +3188,7 @@ void Corneria_80191160(Player* player) { gLevelClearScreenTimer = 100; break; case 470: - func_play_800A6148(); + Play_ClearObjectData(); if (gTeamShields[TEAM_ID_FALCO] > 0) { Corneria_80190F74(&gActors[0], 0); } diff --git a/src/overlays/ovl_i1/fox_i1.c b/src/overlays/ovl_i1/fox_i1.c index a2239359..75b14f47 100644 --- a/src/overlays/ovl_i1/fox_i1.c +++ b/src/overlays/ovl_i1/fox_i1.c @@ -4,5 +4,5 @@ static s32 D_i1_801997D0 = 0; s32 D_i1_8019B6C0; -void OvlI1_CallFunction(s32 arg0, void* arg1) { +void OvlI1_CallFunction(s32 mode, void* ptr) { } diff --git a/src/overlays/ovl_i1/fox_tr.c b/src/overlays/ovl_i1/fox_tr.c index f53c398b..1b186852 100644 --- a/src/overlays/ovl_i1/fox_tr.c +++ b/src/overlays/ovl_i1/fox_tr.c @@ -22,7 +22,7 @@ void Training_ItemRing_Update(ItemTrainingRing* this) { case 0: this->obj.rot.z += 1.0f; Math_SmoothStepToF(&this->scale, 1.0f, 1.0f, 0.05f, 0.0f); - if ((this->unk_44 == 0) && (gPlayer[0].unk_4DC == 0)) { + if ((this->unk_44 == 0) && !gPlayer[0].somersault) { if (this->obj.rot.y == 0.0f) { var_fv0 = 550.0f; } else { @@ -50,8 +50,8 @@ void Training_ItemRing_Update(ItemTrainingRing* this) { case 1: this->obj.pos.x += ((gPlayer[this->playerNum].pos.x - this->obj.pos.x) * 0.05f); this->obj.pos.y += ((gPlayer[this->playerNum].pos.y - this->obj.pos.y) * 0.05f); - if (gPlayer[0].cockpitView != 0) { - this->obj.pos.z += ((gPlayer[this->playerNum].unk_138 - 300.0f) - this->obj.pos.z) * 0.05f; + if (gPlayer[0].cockpitView) { + this->obj.pos.z += (gPlayer[this->playerNum].unk_138 - 300.0f - this->obj.pos.z) * 0.05f; } else { this->obj.pos.z += ((gPlayer[this->playerNum].unk_138 - this->obj.pos.z) * 0.05f); } diff --git a/src/overlays/ovl_i2/fox_i2.c b/src/overlays/ovl_i2/fox_i2.c index b502ddab..88933949 100644 --- a/src/overlays/ovl_i2/fox_i2.c +++ b/src/overlays/ovl_i2/fox_i2.c @@ -4,5 +4,5 @@ UNK_TYPE D_i2_80195D70; s32 D_i2_80195420 = 0; -void OvlI2_CallFunction(s32 arg0, void* arg1) { +void OvlI2_CallFunction(s32 mode, void* ptr) { } diff --git a/src/overlays/ovl_i2/fox_me.c b/src/overlays/ovl_i2/fox_me.c index b3624136..be3b5c55 100644 --- a/src/overlays/ovl_i2/fox_me.c +++ b/src/overlays/ovl_i2/fox_me.c @@ -200,10 +200,10 @@ void Meteo_80187B08(Actor* actor) { } } -void Meteo_80187C68(Actor* actor, f32 x, f32 y, f32 z, f32 arg4, f32 xRot, f32 yRot, s32 timerBC, s32 arg8, s32 id) { +void Meteo_80187C68(Actor* actor, f32 x, f32 y, f32 z, f32 arg4, f32 xRot, f32 yRot, s32 timerBC, s32 arg8, s32 objId) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = (u16) id; + actor->obj.id = objId; actor->obj.pos.x = x; actor->obj.pos.y = y; @@ -219,12 +219,12 @@ void Meteo_80187C68(Actor* actor, f32 x, f32 y, f32 z, f32 arg4, f32 xRot, f32 y Object_SetInfo(&actor->info, actor->obj.id); } -void Meteo_80187D08(f32 x, f32 y, f32 z, f32 arg3, f32 xRot, f32 yRot, s32 arg6, s32 arg7, s32 id) { +void Meteo_80187D08(f32 x, f32 y, f32 z, f32 arg3, f32 xRot, f32 yRot, s32 arg6, s32 arg7, s32 objId) { s32 i; for (i = 0; i < ARRAY_COUNT(gActors); i++) { if (gActors[i].obj.status == OBJ_FREE) { - Meteo_80187C68(&gActors[i], x, y, z, arg3, xRot, yRot, arg6, arg7, id); + Meteo_80187C68(&gActors[i], x, y, z, arg3, xRot, yRot, arg6, arg7, objId); return; } } @@ -256,7 +256,7 @@ void Meteo_80187E38(f32 x, f32 y, f32 z, f32 arg3) { for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { Meteo_80187D98(&gEffects[i], x, y, z, arg3, 0); - AUDIO_PLAY_SFX(0x31037057U, gEffects[i].sfxSource, 4U); + AUDIO_PLAY_SFX(0x31037057, gEffects[i].sfxSource, 4); break; } } @@ -304,7 +304,7 @@ void Meteo_80188088(Boss* boss) { for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { Meteo_80187FF8(&gEffects[i], boss->obj.pos.x + 700.0f, boss->obj.pos.y, boss->obj.pos.z + 1235.0f); - AUDIO_PLAY_SFX(0x19006035U, gEffects[i].sfxSource, 4U); + AUDIO_PLAY_SFX(0x19006035, gEffects[i].sfxSource, 4); break; } } @@ -349,7 +349,7 @@ void Meteo_80188298(f32 x, f32 y, f32 z, f32 zRot) { for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { Meteo_801881A8(&gEffects[i], x, y, z, zRot, -1); - AUDIO_PLAY_SFX(0x3102705CU, gEffects[i].sfxSource, 4); + AUDIO_PLAY_SFX(0x3102705C, gEffects[i].sfxSource, 4); break; } } @@ -447,7 +447,7 @@ void Meteo_80188344(Boss* boss) { boss->info.unk_10 = 1000.0f; Audio_KillSfxBySourceAndId(boss->sfxSource, 0x3103605B); - AUDIO_PLAY_SFX(0x3102405DU, boss->sfxSource, 4U); + AUDIO_PLAY_SFX(0x3102405D, boss->sfxSource, 4); } break; @@ -531,7 +531,7 @@ void Meteo_Boss297_Init(Boss297* this) { Object_SetInfo(&gBosses[i].info, gBosses[i].obj.id); Radio_PlayMessage(gMsg_ID_3300, RCID_BOSS_METEO); - AUDIO_PLAY_SFX(0x3102505AU, this->sfxSource, 4U); + AUDIO_PLAY_SFX(0x3102505A, this->sfxSource, 4); } void Meteo_80188B84(Effect* effect, f32 x, f32 y, f32 z, f32 xRot, f32 yRot, f32 arg6, f32 arg7) { @@ -847,27 +847,27 @@ void Meteo_8018978C(Boss* boss) { if (boss->swork[0] > 5) { boss->swork[0]--; if (boss->swork[0] == 5) { - Audio_KillSfxBySourceAndId(boss->sfxSource, 0x3102505AU); + Audio_KillSfxBySourceAndId(boss->sfxSource, 0x3102505A); } } if (boss->swork[1] > 5) { boss->swork[1] = boss->swork[1] - 1; if (boss->swork[1] == 5) { - Audio_KillSfxBySourceAndId(boss->sfxSource, 0x3102505AU); + Audio_KillSfxBySourceAndId(boss->sfxSource, 0x3102505A); } } if (boss->dmgType != 0) { boss->dmgType = 0; if ((boss->dmgPart != 7) && (boss->dmgPart >= 5) && (boss->dmgPart != 5)) { - AUDIO_PLAY_SFX(0x29121007U, boss->sfxSource, 4U); + AUDIO_PLAY_SFX(0x29121007, boss->sfxSource, 4); } if ((boss->state >= 2) && (boss->state < 20)) { if ((boss->dmgPart < 5) && (boss[0].fwork[17 + boss->dmgPart] > 0.5f)) { if (boss[0].swork[boss->dmgPart + 2] != 0) { - AUDIO_PLAY_SFX(0x29034003U, boss->sfxSource, 4U); + AUDIO_PLAY_SFX(0x29034003, boss->sfxSource, 4); boss[0].swork[9 + boss->dmgPart] = 20; boss[0].swork[2 + boss->dmgPart] -= boss->damage; @@ -887,14 +887,14 @@ void Meteo_8018978C(Boss* boss) { } } } else { - AUDIO_PLAY_SFX(0x29121007U, boss->sfxSource, 4U); + AUDIO_PLAY_SFX(0x29121007, boss->sfxSource, 4); } } if (boss->state >= 9) { if (boss->dmgPart == 5) { if ((boss->swork[7] != 0) && (boss->fwork[22] > 0.8f)) { - AUDIO_PLAY_SFX(0x2943500FU, boss->sfxSource, 4U); + AUDIO_PLAY_SFX(0x2943500F, boss->sfxSource, 4); boss->swork[14] = 20; boss->swork[7] -= boss->damage; if (boss->swork[7] <= 0) { @@ -902,13 +902,13 @@ void Meteo_8018978C(Boss* boss) { Meteo_801892F0(boss, boss->dmgPart); } } else { - AUDIO_PLAY_SFX(0x29121007U, boss->sfxSource, 4U); + AUDIO_PLAY_SFX(0x29121007, boss->sfxSource, 4); } } if (boss->dmgPart == 7) { if ((boss->swork[8] != 0) && (boss->fwork[23] > 0.8f)) { - AUDIO_PLAY_SFX(0x2943500FU, boss->sfxSource, 4U); + AUDIO_PLAY_SFX(0x2943500F, boss->sfxSource, 4); boss->swork[15] = 20; boss->swork[8] -= boss->damage; if (boss->swork[8] <= 0) { @@ -916,7 +916,7 @@ void Meteo_8018978C(Boss* boss) { Meteo_801892F0(boss, boss->dmgPart); } } else { - AUDIO_PLAY_SFX(0x29121007U, boss->sfxSource, 4U); + AUDIO_PLAY_SFX(0x29121007, boss->sfxSource, 4); } } @@ -939,7 +939,7 @@ void Meteo_8018978C(Boss* boss) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); - AUDIO_PLAY_SFX(0x2940D09AU, boss->sfxSource, 4U); + AUDIO_PLAY_SFX(0x2940D09A, boss->sfxSource, 4); gScreenFlashTimer = 8; } } @@ -1035,15 +1035,15 @@ void Meteo_8018978C(Boss* boss) { } if (boss->swork[18] != 0) { - s32 id; + s32 objId; if (func_hud_8008AC54(0) >= 4) { - id = 191; + objId = OBJ_ACTOR_191; } else { - id = 190; + objId = OBJ_ACTOR_190; } - AUDIO_PLAY_SFX(0x2903201BU, boss->sfxSource, 4U); + AUDIO_PLAY_SFX(0x2903201B, boss->sfxSource, 4); src.x = 0.0f; src.y = 330.0f; @@ -1053,10 +1053,10 @@ void Meteo_8018978C(Boss* boss) { if (boss->swork[18] == 1) { Meteo_80187D08(boss->obj.pos.x + dest.x, boss->obj.pos.y + dest.y, boss->obj.pos.z + dest.z, 50.0f, 270.0f, - 0.0f, 30, 0, id); + 0.0f, 30, 0, objId); } else { Meteo_80187D08(boss->obj.pos.x + dest.x, boss->obj.pos.y + dest.y, boss->obj.pos.z + dest.z, 50.0f, 0.0f, - 0.0f, 0, 0, id); + 0.0f, 0, 0, objId); } src.y = -330.0f; @@ -1065,10 +1065,10 @@ void Meteo_8018978C(Boss* boss) { if (boss->swork[18] == 1) { Meteo_80187D08(boss->obj.pos.x + dest.x, boss->obj.pos.y + dest.y, boss->obj.pos.z + dest.z, 50.0f, 90.0f, - 0.0f, 30, 0, id); + 0.0f, 30, 0, objId); } else { Meteo_80187D08(boss->obj.pos.x + dest.x, boss->obj.pos.y + dest.y, boss->obj.pos.z + dest.z, 50.0f, 0.0f, - 0.0f, 0, 0, id); + 0.0f, 0, 0, objId); } boss->swork[18] = 0; } @@ -1146,7 +1146,7 @@ void Meteo_8018978C(Boss* boss) { boss->timer_052 = 80; } else if (boss->vel.z < -50.0f) { if (boss->swork[0] == 5) { - AUDIO_PLAY_SFX(0x3102505AU, boss->sfxSource, 4U); + AUDIO_PLAY_SFX(0x3102505A, boss->sfxSource, 4); } if (boss->swork[0] < 10) { @@ -1193,7 +1193,7 @@ void Meteo_8018978C(Boss* boss) { if ((boss->timer_050 == 0) && (gBosses[boss->unk_044].state == 2)) { boss->fwork[2] = 90.0f; boss->timer_050 = D_i2_80195520[var_v0] + 45; - AUDIO_PLAY_SFX(0x19030036U, boss->sfxSource, 4U); + AUDIO_PLAY_SFX(0x19030036, boss->sfxSource, 4); } if (boss->fwork[2] > 0.0f) { @@ -1227,7 +1227,7 @@ void Meteo_8018978C(Boss* boss) { boss->obj.rot.z += ((0.0f - boss->obj.rot.z) * 0.02f); if (boss->timer_050 == 1) { - AUDIO_PLAY_SFX(0x31016056U, boss->sfxSource, 4U); + AUDIO_PLAY_SFX(0x31016056, boss->sfxSource, 4); } if (boss->timer_050 == 0) { @@ -1278,7 +1278,7 @@ void Meteo_8018978C(Boss* boss) { } if (boss->timer_050 == 0) { boss->state = 7; - AUDIO_PLAY_SFX(0x29038058U, boss->sfxSource, 4U); + AUDIO_PLAY_SFX(0x29038058, boss->sfxSource, 4); } Meteo_80189624(); } @@ -1343,7 +1343,7 @@ void Meteo_8018978C(Boss* boss) { if (boss->timer_052 != 0) { if (boss->swork[0] == 5) { - AUDIO_PLAY_SFX(0x3102505AU, boss->sfxSource, 4U); + AUDIO_PLAY_SFX(0x3102505A, boss->sfxSource, 4); } if (boss->swork[0] < 10) { boss->swork[0] += 2; @@ -1357,7 +1357,7 @@ void Meteo_8018978C(Boss* boss) { boss->state = 9; boss->timer_050 = 0; boss->fwork[15] = 8.0f; - AUDIO_PLAY_SFX(0x11015034U, boss->sfxSource, 4U); + AUDIO_PLAY_SFX(0x11015034, boss->sfxSource, 4); } } break; @@ -1404,7 +1404,7 @@ void Meteo_8018978C(Boss* boss) { boss->state = 9; boss->timer_050 = 70; boss->fwork[15] = 8.0f; - AUDIO_PLAY_SFX(0x11015034U, boss->sfxSource, 4U); + AUDIO_PLAY_SFX(0x11015034, boss->sfxSource, 4); } else if ((boss->timer_050 % 2U) == 1) { Meteo_80188088(boss); } @@ -1443,7 +1443,7 @@ void Meteo_8018978C(Boss* boss) { } if (boss->timer_050 == 20) { func_effect_8007A568(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 80.0f); - AUDIO_PLAY_SFX(0x2940F026U, boss->sfxSource, 4U); + AUDIO_PLAY_SFX(0x2940F026, boss->sfxSource, 4); gControllerRumbleTimers[0] = 60; for (i = 0; i < ARRAY_COUNT(gActors); i++) { if (gActors[i].obj.id == OBJ_ACTOR_TEAM_BOSS) { @@ -1788,12 +1788,12 @@ void Meteo_8018C77C(Actor* actor, s32 arg1) { if (actor->unk_0B6 == 0) { actor->iwork[11] = 1; - AUDIO_PLAY_SFX(0x3100000CU, actor->sfxSource, 4U); + AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); return; } - AUDIO_PLAY_SFX(0x11030010U, actor->sfxSource, 0U); - AUDIO_PLAY_SFX(0x31024059U, actor->sfxSource, 0U); + AUDIO_PLAY_SFX(0x11030010, actor->sfxSource, 0); + AUDIO_PLAY_SFX(0x31024059, actor->sfxSource, 0); } void Meteo_8018C8F4(Actor* actor1, Actor* actor2) { @@ -2196,12 +2196,12 @@ void Meteo_8018DF08(Actor* actor, s32 idx) { Object_SetInfo(&actor->info, actor->obj.id); if (idx == 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, 4U); + AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); } } @@ -2430,7 +2430,7 @@ void Meteo_8018E084(Player* player) { break; case 1390: - AUDIO_PLAY_SFX(0x09000002U, player->sfxSource, 0); + AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); player->unk_194 = 5.0f; player->unk_190 = 5.0f; break; @@ -2493,7 +2493,7 @@ void Meteo_8018ED9C(Actor* actor) { case 1: actor->state = 2; - AUDIO_PLAY_SFX(0x09000002U, actor->sfxSource, 0U); + AUDIO_PLAY_SFX(0x09000002, actor->sfxSource, 0); actor->timer_0BC = 150; actor->fwork[29] = 5.0f; diff --git a/src/overlays/ovl_i2/fox_sx.c b/src/overlays/ovl_i2/fox_sx.c index d3904498..a8397cc9 100644 --- a/src/overlays/ovl_i2/fox_sx.c +++ b/src/overlays/ovl_i2/fox_sx.c @@ -107,7 +107,7 @@ void SectorX_8018F330(Actor* actor) { actor->iwork[14] = 3; actor->fwork[0] = 0.0f; actor->fwork[1] = 0.0f; - D_game_80161A44 = 30000.0f; + gProjectFar = 30000.0f; SectorX_8018F124(); } break; @@ -133,10 +133,10 @@ void SectorX_8018F330(Actor* actor) { Math_SmoothStepToF(&gPlayer[0].cam.eye.y, actor->obj.pos.y, actor->fwork[1], 20.0f, 0.0f); if (actor->timer_0BC == 0) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ACTIVE; - if (gPlayer[0].cockpitView != 0) { + if (gPlayer[0].cockpitView) { func_play_800B5D30(&gPlayer[0], 1); } - D_game_80161A44 = 12800.0f; + gProjectFar = 12800.0f; Object_Kill(&gActors[50].obj, gActors[50].sfxSource); } break; @@ -1704,7 +1704,7 @@ void SectorX_80194728(Player* player) { D_ctx_80177A48[4] = 100.0f; D_ctx_80177A48[5] = 0.0f; player->wings.modelId = 1; - func_play_800A6148(); + Play_ClearObjectData(); case 1: if (gCsFrameCount > 990) { @@ -1757,7 +1757,7 @@ void SectorX_80194728(Player* player) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; D_ctx_8017837C = 4; player->timer_1F8 = 0; - func_play_800A6148(); + Play_ClearObjectData(); D_play_800D3180[LEVEL_SECTOR_X] = Play_CheckMedalStatus(150) + 1; } } diff --git a/src/overlays/ovl_i3/fox_a6.c b/src/overlays/ovl_i3/fox_a6.c index 552dae57..86b39cbc 100644 --- a/src/overlays/ovl_i3/fox_a6.c +++ b/src/overlays/ovl_i3/fox_a6.c @@ -498,7 +498,7 @@ void Area6_BossA6_Init(BossA6* this) { s32 i; gBossActive = 1; - D_game_80161A44 = 25000.0f; + gProjectFar = 25000.0f; gBossFrameCount = 0; this->health = 780; this->fwork[A6_FWK_2] = this->fwork[A6_FWK_34] = 2.0f; @@ -2445,7 +2445,7 @@ void Area6_8018DF74(Player* player) { gActors[3].state = 6; break; case 480: - func_play_800A6148(); + Play_ClearObjectData(); break; } Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + player->unk_114 + 180.0f) * M_DTOR, MTXF_NEW); @@ -2605,7 +2605,7 @@ void Area6_8018ED78(Player* player) { if (gCsFrameCount >= 200) { if (gFillScreenAlpha == 255) { player->unk_1D0 = 2; - func_play_800A6148(); + Play_ClearObjectData(); } else { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; gFillScreenAlphaTarget = 255; @@ -2743,7 +2743,7 @@ void Area6_8018ED78(Player* player) { D_ctx_80161A94[0] = gGoldRingCount[0]; func_8001CA24(0); Audio_KillSfxBySource(player->sfxSource); - func_play_800A6148(); + Play_ClearObjectData(); gNextGameState = GSTATE_PLAY; gNextLevel = LEVEL_VENOM_2; func_hud_80088564(); diff --git a/src/overlays/ovl_i3/fox_aq.c b/src/overlays/ovl_i3/fox_aq.c index eaaa47e1..4e98a895 100644 --- a/src/overlays/ovl_i3/fox_aq.c +++ b/src/overlays/ovl_i3/fox_aq.c @@ -924,7 +924,7 @@ void Aquas_801AACF8(Player* player) { sp58 = 0.0f; D_ctx_80177968 = 2.0f; if (D_i3_801C4190[7] == 0) { - AUDIO_PLAY_SFX(0x9404028, player->sfxSource, 0); + AUDIO_PLAY_SFX(0x09404028, player->sfxSource, 0); D_i3_801C4190[7] = 1; } } @@ -1177,7 +1177,7 @@ void Aquas_801AC09C(Player* player) { for (i = 15, shot = &gPlayerShots[15]; i < 16; i++, shot++) { if (shot->obj.status == OBJ_FREE) { func_play_800AC290(player, shot, 0.0f, 0.0f, PLAYERSHOT_8, 50.0f); - AUDIO_PLAY_SFX(0x1000025, shot->sfxSource, 0); + AUDIO_PLAY_SFX(0x01000025, shot->sfxSource, 0); D_i3_801C4190[5] = i + 1; D_i3_801C4454 = 300; D_i3_801C4458 = -100.0f; @@ -1195,9 +1195,9 @@ void Aquas_801AC18C(Player* player) { if (gPlayerShots[i].obj.status == OBJ_FREE) { func_play_800AC290(player, &gPlayerShots[i], 0.0f, -10.0f, PLAYERSHOT_0, 120.0f); if (gLaserStrength[gPlayerNum] == LASERS_SINGLE) { - AUDIO_PLAY_SFX(0x9400021, gPlayerShots[i].sfxSource, 0); + AUDIO_PLAY_SFX(0x09400021, gPlayerShots[i].sfxSource, 0); } else { - AUDIO_PLAY_SFX(0x9400027, gPlayerShots[i].sfxSource, 0); + AUDIO_PLAY_SFX(0x09400027, gPlayerShots[i].sfxSource, 0); } break; } @@ -1477,7 +1477,7 @@ void Aquas_801ACE50(Player* player) { if ((gBoostButton[player->num] & gInputHold->button) && (player->unk_230 == 0) && (player->state_1C8 != PLAYERSTATE_1C8_U_TURN) && (player->unk_2B4 == 0)) { if (player->unk_2BC == 0) { - AUDIO_PLAY_SFX(0x9004030, player->sfxSource, 4); + AUDIO_PLAY_SFX(0x09004030, player->sfxSource, 4); } player->unk_2BC += 3.0f; if (player->unk_2BC > 90.0f) { @@ -1517,7 +1517,7 @@ void Aquas_801AD328(Player* player) { if ((gBrakeButton[player->num] & gInputHold->button) && (player->unk_230 == 0) && (player->state_1C8 != PLAYERSTATE_1C8_U_TURN) && (player->unk_2B4 == 0)) { if (player->unk_2BC == 0) { - AUDIO_PLAY_SFX(0x9004031, player->sfxSource, 4); + AUDIO_PLAY_SFX(0x09004031, player->sfxSource, 4); } player->unk_2BC += 3.0f; if (player->unk_2BC > 90.0f) { @@ -2123,7 +2123,7 @@ void Aquas_801AFA5C(Actor* actor) { if ((gBosses[0].state >= 10) && (actor->health != 0) && (actor->damage == 31)) { actor->timer_0BE = 70; actor->health -= actor->damage; - AUDIO_PLAY_SFX(0x2903604CU, actor->sfxSource, 4U); + AUDIO_PLAY_SFX(0x2903604C, actor->sfxSource, 4); if (actor->timer_0C6 == 0) { actor->timer_0C6 = 70; } @@ -2191,7 +2191,7 @@ void Aquas_801AFA5C(Actor* actor) { i = -1; } if ((actor->iwork[1] == 13) && (i < 0)) { - AUDIO_PLAY_SFX(0x29022048U, actor->sfxSource, 4U); + AUDIO_PLAY_SFX(0x29022048, actor->sfxSource, 4); for (i = 0, sp48 = gActors; i < 60; i++, sp48++) { if (sp48->obj.status == OBJ_FREE) { Actor_Initialize(sp48); @@ -2242,7 +2242,7 @@ void Aquas_801AFA5C(Actor* actor) { actor->state = 5; actor->vel.y = 10.0f; actor->vel.z = 5.0f; - AUDIO_PLAY_SFX(0x1902102FU, actor->sfxSource, 4U); + AUDIO_PLAY_SFX(0x1902102F, actor->sfxSource, 4); break; case 5: if (actor->obj.pos.y > (gGroundLevel + 70.0f)) { @@ -2273,10 +2273,10 @@ void Aquas_801AFA5C(Actor* actor) { } if (actor->vel.z != 0) { actor->vel.y = actor->vel.z = 0.0f; - AUDIO_PLAY_SFX(0x19402031U, actor->sfxSource, 4U); + AUDIO_PLAY_SFX(0x19402031, actor->sfxSource, 4); } if (actor->timer_0C0 == 1) { - AUDIO_PLAY_SFX(0x19003030U, actor->sfxSource, 4U); + AUDIO_PLAY_SFX(0x19003030, actor->sfxSource, 4); } if (actor->timer_0C0 == 0) { if (actor->timer_0BE == 0) { diff --git a/src/overlays/ovl_i3/fox_i3.c b/src/overlays/ovl_i3/fox_i3.c index 6d847319..eb81c8ba 100644 --- a/src/overlays/ovl_i3/fox_i3.c +++ b/src/overlays/ovl_i3/fox_i3.c @@ -3,5 +3,5 @@ static s32 D_i3_801BECA0 = 0; static s32 D_i3_801C2240; -void OvlI3_CallFunction(s32 arg0, void* arg1) { +void OvlI3_CallFunction(s32 mode, void* ptr) { } diff --git a/src/overlays/ovl_i3/fox_so.c b/src/overlays/ovl_i3/fox_so.c index 477f83e5..f982e8ea 100644 --- a/src/overlays/ovl_i3/fox_so.c +++ b/src/overlays/ovl_i3/fox_so.c @@ -1113,7 +1113,7 @@ void Solar_801A10F4(Player* player) { AUDIO_PLAY_BGM(SEQ_ID_SOLAR | SEQ_FLAG); player->pos.z = 0.0f; player->unk_0D0 = D_play_80161A54; - func_play_800A6148(); + Play_ClearObjectData(); gLevelStatusScreenTimer = 50; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_1D0 = 0; @@ -2875,7 +2875,7 @@ void Solar_801A7930(Player* player) { } if (gCsFrameCount == 400) { player->unk_1D0++; - func_play_800A6148(); + Play_ClearObjectData(); func_8001CA24(0); Audio_KillSfxBySource(player->sfxSource); gFillScreenAlpha = 250; @@ -2897,7 +2897,7 @@ void Solar_801A7930(Player* player) { func_8001C8B8(0); AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); D_ctx_80177A98 = 1; - func_play_800A6148(); + Play_ClearObjectData(); D_ctx_80177A48[1] = 0.0f; D_ctx_80177A48[2] = 0.0f; player->cam.eye.x = 0.0f; @@ -3009,7 +3009,7 @@ void Solar_801A7930(Player* player) { Math_SmoothStepToF(&D_ctx_80177A48[0], 0.5f, 0.1f, 0.0005f, 0.0f); } if (gCsFrameCount == 1560) { - func_play_800A6148(); + Play_ClearObjectData(); } if (gCsFrameCount > 1530) { gFillScreenAlphaTarget = 255; diff --git a/src/overlays/ovl_i3/fox_zo.c b/src/overlays/ovl_i3/fox_zo.c index 4049c3fd..00eaf94d 100644 --- a/src/overlays/ovl_i3/fox_zo.c +++ b/src/overlays/ovl_i3/fox_zo.c @@ -4581,7 +4581,7 @@ void Zoness_8019D76C(Player* player) { } if (gCsFrameCount == 160) { player->unk_1D0++; - func_play_800A6148(); + Play_ClearObjectData(); func_8001CA24(0); Audio_KillSfxBySource(player->sfxSource); gFillScreenAlpha = 250; @@ -4603,7 +4603,7 @@ void Zoness_8019D76C(Player* player) { func_8001C8B8(0); AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); D_ctx_80177A98 = 1; - func_play_800A6148(); + Play_ClearObjectData(); Solar_801A7750(); D_ctx_80177A48[1] = 0.0f; D_ctx_80177A48[2] = 0.0f; @@ -4665,7 +4665,7 @@ void Zoness_8019D76C(Player* player) { Math_SmoothStepToF(&D_ctx_80177A48[0], 0.05f, 1.0f, 0.00005f, 0.0f); } if (gCsFrameCount == 1300) { - func_play_800A6148(); + Play_ClearObjectData(); } if (gCsFrameCount > 1270) { gFillScreenAlphaTarget = 255; diff --git a/src/overlays/ovl_i4/fox_bo.c b/src/overlays/ovl_i4/fox_bo.c index d22fc9cf..3e63b8f3 100644 --- a/src/overlays/ovl_i4/fox_bo.c +++ b/src/overlays/ovl_i4/fox_bo.c @@ -114,7 +114,7 @@ void Bolse_8018BD60(Actor* actor) { actorPtr->itemDrop = DROP_SILVER_RING_50p; actorPtr->aiType = i; Object_SetInfo(&actorPtr->info, actorPtr->obj.id); - AUDIO_PLAY_SFX(0x3100000CU, actorPtr->sfxSource, 4U); + AUDIO_PLAY_SFX(0x3100000C, actorPtr->sfxSource, 4); break; } } @@ -142,7 +142,7 @@ void Bolse_8018BEF8(Actor* actor, s32 arg1) { } else { actorPtr->obj.pos.x = D_i4_8019EEE4[actor->unk_04E]; actorPtr->obj.pos.y = 50.0f; - AUDIO_PLAY_SFX(0x2903305FU, actorPtr->sfxSource, 4U); + AUDIO_PLAY_SFX(0x2903305F, actorPtr->sfxSource, 4); actorPtr->timer_0BC = 5; actorPtr->timer_0C2 = 100; actorPtr->unk_0F4.x = 90.0f; @@ -184,7 +184,7 @@ void Bolse_8018BEF8(Actor* actor, s32 arg1) { } Object_SetInfo(&actorPtr->info, actorPtr->obj.id); - AUDIO_PLAY_SFX(0x3100000CU, actorPtr->sfxSource, 4U); + AUDIO_PLAY_SFX(0x3100000C, actorPtr->sfxSource, 4); actor->unk_04E++; if (actor->unk_04E >= 5) { @@ -269,8 +269,8 @@ void Bolse_8018C158(Actor* actor) { } AllRange_ClearRadio(); actor->state = 6; - AUDIO_PLAY_SFX(0x31009063U, actor->sfxSource, 0U); - AUDIO_PLAY_SFX(0x2940D09AU, actor->sfxSource, 4U); + AUDIO_PLAY_SFX(0x31009063, actor->sfxSource, 0); + AUDIO_PLAY_SFX(0x2940D09A, actor->sfxSource, 4); gScreenFlashTimer = 8; for (actorPtr = &gActors[10], i = 0; i < 20; i++, actorPtr++) { @@ -699,7 +699,7 @@ bool Bolse_8018D584(Actor* actor) { if ((actor->unk_0D2 < 2) && (actor->state == 0)) { actor->timer_0C6 = 20; actor->unk_0D0 = 0; - AUDIO_PLAY_SFX(0x29024003U, actor->sfxSource, 0U); + AUDIO_PLAY_SFX(0x29024003, actor->sfxSource, 0); actor->health += actor->damage; if (actor->health < 100) { @@ -724,8 +724,8 @@ bool Bolse_8018D584(Actor* actor) { func_effect_8007B344(actor->obj.pos.x, actor->obj.pos.y + 730.0f, actor->obj.pos.z, 10.0f, 5); actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_BO_6011BA4); - Audio_KillSfxBySourceAndId(actor->sfxSource, 0x11000028U); - AUDIO_PLAY_SFX(0x2903B009U, actor->sfxSource, 0U); + Audio_KillSfxBySourceAndId(actor->sfxSource, 0x11000028); + AUDIO_PLAY_SFX(0x2903B009, actor->sfxSource, 0); } else { func_effect_8007A6F0(&actor->obj.pos, 0x29121007); } @@ -1040,7 +1040,7 @@ void Bolse_8018EAEC(Actor* actor, s32 index) { actor->unk_0F4.y = D_i4_8019F018[index]; 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 Bolse_8018EC1C(void) { @@ -1088,7 +1088,7 @@ void Bolse_8018ED44(void) { actor->unk_0B6 = 31; actor->vel.z = 200.0f; Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(0x29002002U, actor->sfxSource, 4U); + AUDIO_PLAY_SFX(0x29002002, actor->sfxSource, 4); break; } } @@ -1112,7 +1112,7 @@ void Bolse_8018EE4C(f32 x, f32 y) { actor->obj.rot.z = RAND_FLOAT_CENTERED(120.0f); actor->unk_0F4.z = RAND_FLOAT_CENTERED(1.0f); Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(0x29002002U, actor->sfxSource, 4U); + AUDIO_PLAY_SFX(0x29002002, actor->sfxSource, 4); break; } } @@ -1242,9 +1242,9 @@ void Bolse_8018EF6C(Player* player) { break; case 127: - func_play_800A6148(); + Play_ClearObjectData(); Bolse_80191ED8(); - func_360_8002F180(); + ActorAllRange_SpawnTeam(); player->unk_1D0 = 2; @@ -1354,7 +1354,7 @@ void Bolse_8018F83C(Actor* actor, s32 arg1) { actor->vel.z = -gPlayer[0].unk_0D0; 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 Bolse_8018F94C(Player* player) { @@ -1386,10 +1386,10 @@ void Bolse_8018F94C(Player* player) { if (player->timer_1F8 == 0) { player->unk_1D0 = 1; player->timer_1F8 = 200; - AUDIO_PLAY_SFX(0x09000002U, player->sfxSource, 0U); + AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); player->unk_194 = 5.0f; player->unk_190 = 5.0f; - D_game_80161A44 = 30000.0f; + gProjectFar = 30000.0f; } break; @@ -1410,7 +1410,7 @@ void Bolse_8018F94C(Player* player) { player->timer_1F8 = 1000; func_8001CA24(0); Audio_KillSfxBySource(player->sfxSource); - func_play_800A6148(); + Play_ClearObjectData(); for (i = 0; i < 200; i++) { gObjects58[i].obj.status = OBJ_FREE; @@ -1454,7 +1454,7 @@ void Bolse_8018F94C(Player* player) { gGroundLevel = -10000.0f; player->unk_240 = 1; player->wings.modelId = 1; - AUDIO_PLAY_SFX(0x31009063U, actor50->sfxSource, 0U); + AUDIO_PLAY_SFX(0x31009063, actor50->sfxSource, 0); func_8001C8B8(0); } break; @@ -1502,7 +1502,7 @@ void Bolse_8018F94C(Player* player) { case 95: Audio_KillSfxBySource(actor50->sfxSource); - AUDIO_PLAY_SFX(0x2902F026U, gActors[0].sfxSource, 0U); + AUDIO_PLAY_SFX(0x2902F026, gActors[0].sfxSource, 0); for (i = 0; i < ARRAY_COUNT(gEffects); i++) { Object_Kill(&gEffects[i].obj, gEffects[i].sfxSource); @@ -1606,7 +1606,7 @@ void Bolse_8018F94C(Player* player) { player->timer_1F8 = 50; player->unk_194 = 5.0f; player->unk_190 = 5.0f; - AUDIO_PLAY_SFX(0x09000002U, player->sfxSource, 0U); + AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); break; } break; @@ -1760,7 +1760,7 @@ void Bolse_80190D98(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 effect->vel.y = dest.y; effect->vel.z = dest.z; effect->timer_50 = 60; - AUDIO_PLAY_SFX(0x31000013U, effect->sfxSource, 4U); + AUDIO_PLAY_SFX(0x31000013, effect->sfxSource, 4); Object_SetInfo(&effect->info, effect->obj.id); } @@ -1877,7 +1877,7 @@ void Bolse_801912FC(Boss* boss) { boss->state = 2; Radio_PlayMessage(gMsg_ID_11150, RCID_PEPPY); boss->timer_050 = 1000; - AUDIO_PLAY_SFX(0x19034041U, boss->sfxSource, 0U); + AUDIO_PLAY_SFX(0x19034041, boss->sfxSource, 0); } break; @@ -1919,7 +1919,7 @@ void Bolse_801912FC(Boss* boss) { boss->swork[boss->dmgPart] -= boss->damage; if (boss->swork[boss->dmgPart] <= 0) { boss->swork[24 + boss->dmgPart] = 30; - AUDIO_PLAY_SFX(0x2903B009U, boss->sfxSource, 4U); + AUDIO_PLAY_SFX(0x2903B009, boss->sfxSource, 4); boss->swork[36]--; if (boss->swork[36] <= 0) { boss->state = 10; @@ -1930,7 +1930,7 @@ void Bolse_801912FC(Boss* boss) { boss->obj.pos.y -= 300.0f; } else { boss->swork[12 + boss->dmgPart] = 20; - AUDIO_PLAY_SFX(0x29034003U, boss->sfxSource, 4U); + AUDIO_PLAY_SFX(0x29034003, boss->sfxSource, 4); } } } @@ -2065,7 +2065,7 @@ void Bolse_80191BAC(Boss* boss) { Math_SmoothStepToF(&gBosses[0].fwork[1], 0.0f, 1.0f, 0.01f, 0.001f); if (boss->timer_052 == 0) { boss->state = 2; - AUDIO_PLAY_SFX(0x19401048U, boss->sfxSource, 0U); + AUDIO_PLAY_SFX(0x19401048, boss->sfxSource, 0); } break; } @@ -2136,7 +2136,7 @@ void Bolse_80191ED8(void) { actor->obj.status = OBJ_INIT; actor->obj.id = gLevelObjects[i].id; if ((actor->obj.id == OBJ_ACTOR_271) && (gAllRangeCheckpoint == 0)) { - AUDIO_PLAY_SFX(0x11000028U, actor->sfxSource, 0U); + AUDIO_PLAY_SFX(0x11000028, actor->sfxSource, 0); } actor->fwork[10] = actor->obj.pos.x = gLevelObjects[i].xPos; actor->fwork[11] = actor->obj.pos.y = gLevelObjects[i].yPos; diff --git a/src/overlays/ovl_i4/fox_fo.c b/src/overlays/ovl_i4/fox_fo.c index dbcebf83..e7777490 100644 --- a/src/overlays/ovl_i4/fox_fo.c +++ b/src/overlays/ovl_i4/fox_fo.c @@ -57,7 +57,7 @@ void Fortuna_801875F0(Actor* actor) { actorPtr->unk_0C9 = actorPtr->iwork[11] = 1; actorPtr->itemDrop = DROP_SILVER_RING_50p; Object_SetInfo(&actorPtr->info, actorPtr->obj.id); - AUDIO_PLAY_SFX(0x31000011U, actorPtr->sfxSource, 4); + AUDIO_PLAY_SFX(0x31000011, actorPtr->sfxSource, 4); break; } } @@ -88,7 +88,7 @@ void Fortuna_80187884(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 arg4) { actor->iwork[11] = 1; actor->unk_0F4.x = 0.0f; Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(0x31004005U, actor->sfxSource, 4U); + AUDIO_PLAY_SFX(0x31004005, actor->sfxSource, 4); } Vec3f D_i4_8019EDF8[] = { { -300.0f, 1000.0f, 13000.0f }, { 300.0f, 700.0f, 14000.0f }, { 1000.0f, 300.0f, 0.0f } }; @@ -134,7 +134,7 @@ void Fortuna_80187960(Actor* actor) { } if (gAllRangeEventTimer == 7000) { - AUDIO_PLAY_SFX(0x11030016U, gBosses[0].sfxSource, 4U); + AUDIO_PLAY_SFX(0x11030016, gBosses[0].sfxSource, 4); AllRange_ClearRadio(); Radio_PlayMessage(gMsg_ID_9390, RCID_ROB64); gAllRangeCountdownScale = 1.0f; @@ -207,7 +207,7 @@ void Fortuna_80187960(Actor* actor) { gPlayer[0].timer_1F8 = 50; player->unk_190 = 5.0f; player->unk_194 = 5.0f; - AUDIO_PLAY_SFX(0x09000002U, player->sfxSource, 0U); + AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 30); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 30); } else { @@ -391,7 +391,7 @@ void Fortuna_80187960(Actor* actor) { } } gOverlayStage = 1; - D_game_80161A44 = 30000.0f; + gProjectFar = 30000.0f; break; default: @@ -496,7 +496,7 @@ void Fortuna_80188AD0(Actor* actor) { actor->info.unk_1C = 0.0f; actor->timer_0CA[0] = 0; actor->info.bonus = 0; - AUDIO_PLAY_SFX(0x2903B009U, actor->sfxSource, 4U); + AUDIO_PLAY_SFX(0x2903B009, actor->sfxSource, 4); } } @@ -619,14 +619,14 @@ void Fortuna_801890EC(Actor* actor, s32 arg1) { if (arg1 < 3) { actor->iwork[11] = 1; - AUDIO_PLAY_SFX(0x3100000CU, actor->sfxSource, 4U); + AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); } else { actor->obj.pos.z = -9500.0f; actor->unk_0B6 = 1; actor->vel.z = 22.0f; - AUDIO_PLAY_SFX(0x11030010U, actor->sfxSource, 0U); - AUDIO_PLAY_SFX(0x31024059U, actor->sfxSource, 0U); + AUDIO_PLAY_SFX(0x11030010, actor->sfxSource, 0); + AUDIO_PLAY_SFX(0x31024059, actor->sfxSource, 0); } } @@ -726,7 +726,7 @@ void Fortuna_8018927C(Player* player) { } player->unk_194 = 5.0f; player->unk_190 = 5.0f; - AUDIO_PLAY_SFX(0x09000002U, player->sfxSource, 0U); + AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); } break; @@ -779,7 +779,7 @@ void Fortuna_8018927C(Player* player) { gBosses[0].swork[0] = 1; if ((func_hud_80090200(&gBosses[0]) == 2) || (gNextPlanetPath != 0)) { - func_play_800A6148(); + Play_ClearObjectData(); if (gNextPlanetPath == 0) { player->unk_1D0 = 10; } else { @@ -1021,7 +1021,7 @@ void Fortuna_8018927C(Player* player) { D_ctx_80177A48[4] = 1.0f; actor2->vel.y = 0.1f; actor1->vel.y = 0.1f; - AUDIO_PLAY_SFX(0x09000002U, player->sfxSource, 0U); + AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); player->unk_194 = 5.0f; player->unk_190 = 5.0f; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); @@ -1041,7 +1041,7 @@ void Fortuna_8018927C(Player* player) { if (gTeamShields[TEAM_ID_FALCO] > 0) { if (player->timer_1F8 == 980) { - AUDIO_PLAY_SFX(0x09000002U, actor3->sfxSource, 0U); + AUDIO_PLAY_SFX(0x09000002, actor3->sfxSource, 0); actor3->vel.y = 1.0f; actor3->fwork[29] = 5.0f; } @@ -1054,7 +1054,7 @@ void Fortuna_8018927C(Player* player) { } if ((gTeamShields[TEAM_ID_PEPPY] > 0) && (player->timer_1F8 == 960)) { - AUDIO_PLAY_SFX(0x09000002U, actor2->sfxSource, 0U); + AUDIO_PLAY_SFX(0x09000002, actor2->sfxSource, 0); actor2->vel.y = 1.0f; actor2->fwork[29] = 5.0f; } @@ -1068,7 +1068,7 @@ void Fortuna_8018927C(Player* player) { if (gTeamShields[TEAM_ID_SLIPPY] > 0) { if (player->timer_1F8 == 940) { - AUDIO_PLAY_SFX(0x09000002U, actor1->sfxSource, 0U); + AUDIO_PLAY_SFX(0x09000002, actor1->sfxSource, 0); actor1->vel.y = 1.0f; actor1->fwork[29] = 5.0f; } @@ -1278,7 +1278,7 @@ void Fortuna_8018927C(Player* player) { case 1240: if (gTeamShields[TEAM_ID_FALCO] > 0) { - AUDIO_PLAY_SFX(0x09000002U, actor3->sfxSource, 0U); + AUDIO_PLAY_SFX(0x09000002, actor3->sfxSource, 0); actor3->fwork[29] = 5.0f; actor3->iwork[11] = 2; } @@ -1286,7 +1286,7 @@ void Fortuna_8018927C(Player* player) { case 1260: if (gTeamShields[TEAM_ID_SLIPPY] > 0) { - AUDIO_PLAY_SFX(0x09000002U, actor1->sfxSource, 0U); + AUDIO_PLAY_SFX(0x09000002, actor1->sfxSource, 0); actor1->fwork[29] = 5.0f; actor1->iwork[11] = 2; } @@ -1294,7 +1294,7 @@ void Fortuna_8018927C(Player* player) { case 1280: if (gTeamShields[TEAM_ID_PEPPY] > 0) { - AUDIO_PLAY_SFX(0x09000002U, actor2->sfxSource, 0U); + AUDIO_PLAY_SFX(0x09000002, actor2->sfxSource, 0); actor2->fwork[29] = 5.0f; actor2->iwork[11] = 2; } @@ -1302,7 +1302,7 @@ void Fortuna_8018927C(Player* player) { break; case 1300: - AUDIO_PLAY_SFX(0x09000002U, player->sfxSource, 0U); + AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); player->unk_190 = 2.0f; player->unk_194 = 5.0f; break; @@ -1329,7 +1329,7 @@ void Fortuna_8018927C(Player* player) { // clang-format on D_play_800D3180[LEVEL_FORTUNA] = Play_CheckMedalStatus(50) + 1; - func_play_800A6148(); + Play_ClearObjectData(); break; } } diff --git a/src/overlays/ovl_i4/fox_i4.c b/src/overlays/ovl_i4/fox_i4.c index cbcd6dd6..48f02e41 100644 --- a/src/overlays/ovl_i4/fox_i4.c +++ b/src/overlays/ovl_i4/fox_i4.c @@ -1,46 +1,46 @@ #include "global.h" -void Fortuna_8018927C(void*); -void Bolse_8018D394(void*); -void Bolse_8018D454(void*); -void Bolse_8018D7F0(void*); -void Bolse_8018D960(void*); -void Bolse_8018E710(void*); -void Bolse_8018E870(void*); -void Bolse_80191BAC(void*); -void Bolse_80191DB0(void*); +void Fortuna_8018927C(Player*); +void Bolse_8018D394(Boss*); +void Bolse_8018D454(Boss*); +void Bolse_8018D7F0(Boss*); +void Bolse_8018D960(Boss*); +void Bolse_8018E710(Actor*); +void Bolse_8018E870(Actor*); +void Bolse_80191BAC(Actor*); +void Bolse_80191DB0(Actor*); UNK_TYPE D_i4_801A03C0; s32 D_i4_8019EDD0 = 0; -void OvlI4_CallFunction(u32 arg0, void* arg1) { - switch (arg0) { +void OvlI4_CallFunction(u32 mode, void* ptr) { + switch (mode) { case OVLCALL_FO_CS_COMPLETE: - Fortuna_8018927C(arg1); + Fortuna_8018927C(ptr); break; case OVLCALL_BOSS309_UPDATE: - Bolse_8018E710(arg1); + Bolse_8018E710(ptr); break; case OVLCALL_BOSS309_DRAW: - Bolse_8018E870(arg1); + Bolse_8018E870(ptr); break; case OVLCALL_BOSS310_UPDATE: - Bolse_80191BAC(arg1); + Bolse_80191BAC(ptr); break; case OVLCALL_BOSS310_DRAW: - Bolse_80191DB0(arg1); + Bolse_80191DB0(ptr); break; case OVLCALL_ACTOR271_UPDATE: - Bolse_8018D7F0(arg1); + Bolse_8018D7F0(ptr); break; case OVLCALL_ACTOR271_DRAW: - Bolse_8018D960(arg1); + Bolse_8018D960(ptr); break; case OVLCALL_ACTOR272_UPDATE: - Bolse_8018D394(arg1); + Bolse_8018D394(ptr); break; case OVLCALL_ACTOR272_DRAW: - Bolse_8018D454(arg1); + Bolse_8018D454(ptr); default: PRINTF("i4 指定外!\n"); // Not specified! break; diff --git a/src/overlays/ovl_i4/fox_ka.c b/src/overlays/ovl_i4/fox_ka.c index 02c74d23..cfe34452 100644 --- a/src/overlays/ovl_i4/fox_ka.c +++ b/src/overlays/ovl_i4/fox_ka.c @@ -182,7 +182,7 @@ void Katina_80192C8C(void) { actor->unk_0C9 = 1; actor->iwork[11] = 1; Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(0x31000011U, actor->sfxSource, 4); + AUDIO_PLAY_SFX(0x31000011, actor->sfxSource, 4); } } } @@ -244,7 +244,7 @@ void Katina_80192E20(Player* player) { gActors[4].vel.z += 0.7f; gActors[4].obj.rot.z -= 1.0f; if (gCsFrameCount == 120) { - func_360_8002F180(); + ActorAllRange_SpawnTeam(); player->unk_1D0 = 13; player->pos.x = 0.0f; player->pos.y = 1300.0f; @@ -402,7 +402,7 @@ void Katina_80193718(Boss* boss) { } if (boss->dmgType != DMG_NONE) { boss->dmgType = DMG_NONE; - AUDIO_PLAY_SFX(0x29121007U, boss->sfxSource, 4U); + AUDIO_PLAY_SFX(0x29121007, boss->sfxSource, 4); } } @@ -517,7 +517,7 @@ void Katina_80193EF0(Boss* boss) { func_effect_800794CC(boss->obj.pos.x + dest.x, boss->obj.pos.y - 1200.0f + y, boss->obj.pos.z + dest.z, 1.6f); } - AUDIO_PLAY_SFX(0x2940D09AU, boss->sfxSource, 4U); + AUDIO_PLAY_SFX(0x2940D09A, boss->sfxSource, 4); gScreenFlashTimer = 8; boss->state = 20; boss->timer_050 = 50; @@ -591,7 +591,7 @@ void Katina_80194458(Boss* boss, Vec3f* pos, f32 arg2) { actor->timer_0C2 = 30; actor->timer_0C4 = 400; Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(0x2903305FU, actor->sfxSource, 4); + AUDIO_PLAY_SFX(0x2903305F, actor->sfxSource, 4); actor->info.action = (ObjectFunc) Katina_80198AA0; actor->info.draw = (ObjectFunc) Katina_801995B4; break; @@ -659,7 +659,7 @@ void Katina_801946C4(Boss* boss) { boss->state = 1; boss->vwork[0].y = 2000.0f; boss->unk_05E = 1; - AUDIO_PLAY_SFX(0x11000011U, boss->sfxSource, 0); + AUDIO_PLAY_SFX(0x11000011, boss->sfxSource, 0); D_i4_801A0548 = 100.0f; D_i4_801A0544 = 100.0f; D_i4_801A0550 = 70.0f; @@ -669,7 +669,7 @@ void Katina_801946C4(Boss* boss) { boss->fwork[12] = 0.4f; boss->fwork[10] = 10.0f; Radio_PlayMessage(gMsg_ID_18030, RCID_BILL); - AUDIO_PLAY_SFX(0x11037025U, boss->sfxSource, 0); + AUDIO_PLAY_SFX(0x11037025, boss->sfxSource, 0); } } break; @@ -746,7 +746,7 @@ void Katina_801946C4(Boss* boss) { if (boss->timer_050 == 0) { boss->state++; boss->timer_050 = 60; - AUDIO_PLAY_SFX(0x1903203FU, boss->sfxSource, 0); + AUDIO_PLAY_SFX(0x1903203F, boss->sfxSource, 0); boss->fwork[5] = 30.0f; boss->fwork[6] = 30.0f; boss->fwork[7] = 30.0f; @@ -759,7 +759,7 @@ void Katina_801946C4(Boss* boss) { boss->state++; boss->timer_050 = 100; boss->timer_052 = 310; - AUDIO_PLAY_SFX(0x19034042U, boss->sfxSource, 0); + AUDIO_PLAY_SFX(0x19034042, boss->sfxSource, 0); } break; @@ -773,7 +773,7 @@ void Katina_801946C4(Boss* boss) { } if (boss->timer_052 == 0) { - AUDIO_PLAY_SFX(0x19032040U, boss->sfxSource, 0); + AUDIO_PLAY_SFX(0x19032040, boss->sfxSource, 0); boss->state++; if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ACTIVE; @@ -798,7 +798,7 @@ void Katina_801946C4(Boss* boss) { case 6: if (boss->timer_052 == 1) { - AUDIO_PLAY_SFX(0x19034042U, boss->sfxSource, 0); + AUDIO_PLAY_SFX(0x19034042, boss->sfxSource, 0); } if (boss->timer_050 == 0) { @@ -810,7 +810,7 @@ void Katina_801946C4(Boss* boss) { if ((en_count < 30) || (boss->timer_056 == 0)) { boss->state = 7; boss->timer_050 = 300; - AUDIO_PLAY_SFX(0x1903203FU, boss->sfxSource, 0); + AUDIO_PLAY_SFX(0x1903203F, boss->sfxSource, 0); boss->fwork[12] = 0.0f; boss->fwork[8] = 30.0f; boss->fwork[7] = 30.0f; @@ -827,7 +827,7 @@ void Katina_801946C4(Boss* boss) { } if (boss->timer_050 == 240) { - AUDIO_PLAY_SFX(0x19034042U, boss->sfxSource, 0); + AUDIO_PLAY_SFX(0x19034042, boss->sfxSource, 0); } if (boss->timer_050 == 0) { @@ -838,15 +838,15 @@ void Katina_801946C4(Boss* boss) { boss->fwork[5] = 0.0f; boss->timer_056 = 1920; boss->timer_052 = 70; - AUDIO_PLAY_SFX(0x19032040U, boss->sfxSource, 0); + AUDIO_PLAY_SFX(0x19032040, boss->sfxSource, 0); } break; case 10: if (boss->timer_050 == 0) { boss->fwork[9] = 200.0f; - AUDIO_PLAY_SFX(0x19032041U, boss->sfxSource, 0); - Audio_KillSfxBySourceAndId(boss->sfxSource, 0x11037025U); + AUDIO_PLAY_SFX(0x19032041, boss->sfxSource, 0); + Audio_KillSfxBySourceAndId(boss->sfxSource, 0x11037025); boss->state = 11; boss->timer_050 = 100; Radio_PlayMessage(gMsg_ID_18050, RCID_BILL); @@ -860,11 +860,11 @@ void Katina_801946C4(Boss* boss) { case 11: if (boss->timer_050 == 0) { - AUDIO_PLAY_SFX(0x19034042U, boss->sfxSource, 0); + AUDIO_PLAY_SFX(0x19034042, boss->sfxSource, 0); boss->state = 12; boss->timer_050 = 1928; Radio_PlayMessage(gMsg_ID_18055, RCID_BILL); - AUDIO_PLAY_SFX(0x11034043U, boss->sfxSource, 0); + AUDIO_PLAY_SFX(0x11034043, boss->sfxSource, 0); } break; @@ -944,8 +944,8 @@ void Katina_801946C4(Boss* boss) { D_i4_801A054C = 70.0f; D_i4_801A0558 = 50.0f; D_i4_801A0554 = 50.0f; - Audio_KillSfxBySourceAndId(boss->sfxSource, 0x11034043U); - AUDIO_PLAY_SFX(0x19406044U, boss->sfxSource, 0); + Audio_KillSfxBySourceAndId(boss->sfxSource, 0x11034043); + AUDIO_PLAY_SFX(0x19406044, boss->sfxSource, 0); } break; @@ -992,7 +992,7 @@ void Katina_801946C4(Boss* boss) { i = gGameFrameCount % 64U; Object_Kill(&gEffects[i].obj, gEffects[i].sfxSource); func_effect_8007B344(boss->obj.pos.x, boss->obj.pos.y - 600.0f, boss->obj.pos.z, 90.0f, 0); - AUDIO_PLAY_SFX(0x1140B045U, boss->sfxSource, 0); + AUDIO_PLAY_SFX(0x1140B045, boss->sfxSource, 0); } if (boss->timer_052 == 690) { @@ -1025,7 +1025,7 @@ void Katina_801946C4(Boss* boss) { gBosses[0].state = 1; boss->state = 18; boss->timer_050 = 50; - AUDIO_PLAY_SFX(0x11038046U, boss->sfxSource, 0); + AUDIO_PLAY_SFX(0x11038046, boss->sfxSource, 0); } break; @@ -1050,7 +1050,7 @@ void Katina_801946C4(Boss* boss) { gPlayer[0].unk_0EC = gPlayer[0].unk_0E8 = gPlayer[0].unk_0E4 = gPlayer[0].unk_120 = gPlayer[0].unk_114; - func_play_800A6148(); + Play_ClearObjectData(); D_ctx_801784D4 = 60.0f; gLight1R = 100; gLight1G = 70; @@ -1075,7 +1075,7 @@ void Katina_801946C4(Boss* boss) { boss->obj.rot.y = 30.0f; boss->obj.pos.x = -4000.0f; boss->unk_078.z = 7.0f; - AUDIO_PLAY_SFX(0x11404016U, boss->sfxSource, 0); + AUDIO_PLAY_SFX(0x11404016, boss->sfxSource, 0); for (i = 0; i < ARRAY_COUNT(gEffects); i++) { Object_Kill(&gEffects[i].obj, gEffects[i].sfxSource); } @@ -1087,7 +1087,7 @@ void Katina_801946C4(Boss* boss) { Matrix_RotateX(gCalcMatrix, boss->obj.rot.x * M_DTOR, MTXF_APPLY); boss->obj.pos.z += boss->unk_078.z; if (boss->timer_050 == 820) { - AUDIO_PLAY_SFX(0x19408047U, boss->sfxSource, 0); + AUDIO_PLAY_SFX(0x19408047, boss->sfxSource, 0); } if (boss->timer_050 > 820) { @@ -1391,7 +1391,7 @@ void Katina_80197024(void) { } Object_SetInfo(&actor->info, actor->obj.id); actor->iwork[11] = 1; - AUDIO_PLAY_SFX(0x3100000CU, actor->sfxSource, 4); + AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); } } } @@ -1480,7 +1480,7 @@ void Katina_80197290(Player* player) { if (gCsFrameCount == 250) { player->unk_1D0 = 2; - func_play_800A6148(); + Play_ClearObjectData(); func_8001CA24(0); Audio_KillSfxBySource(&player->sfxSource[0]); player->timer_1F8 = 50; @@ -1570,7 +1570,7 @@ void Katina_80197290(Player* player) { break; case 1010: - AUDIO_PLAY_SFX(0x09000002U, &player->sfxSource[0], 0); + AUDIO_PLAY_SFX(0x09000002, &player->sfxSource[0], 0); player->unk_190 = player->unk_194 = 5.0f; break; @@ -1684,7 +1684,7 @@ void Katina_80197F10(Actor* actor) { case 2: actor->state = 3; - AUDIO_PLAY_SFX(0x09000002U, actor->sfxSource, 0); + AUDIO_PLAY_SFX(0x09000002, actor->sfxSource, 0); actor->fwork[29] = 5.0f; case 3: @@ -1797,7 +1797,7 @@ void Katina_8019848C(void) { Object_SetInfo(&actor->info, actor->obj.id); actor->info.unk_1C = 0.0f; actor->info.bonus = 0; - AUDIO_PLAY_SFX(0x3100000CU, actor->sfxSource, 4); + AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); } void Katina_80198594(Actor* actor) { @@ -1806,7 +1806,7 @@ void Katina_80198594(Actor* actor) { switch (actor->state) { case 0: - D_game_80161A44 = 30000.0f; + gProjectFar = 30000.0f; D_i4_801A0540 = 0; gKaKilledAlly = gKaAllyKillCount = 0; actor->state = 2; @@ -1816,7 +1816,7 @@ void Katina_80198594(Actor* actor) { gBosses[1].obj.pos.x = 0.0f; gBosses[1].obj.pos.z = 0.0f; gBosses[1].obj.pos.y = 2000.0f; - AUDIO_PLAY_SFX(0x11037025U, gBosses[1].sfxSource, 0); + AUDIO_PLAY_SFX(0x11037025, gBosses[1].sfxSource, 0); gAllRangeEventTimer = 20000; gBosses[1].swork[16] = 5760; gKaKilledAlly = 1; @@ -2166,7 +2166,7 @@ void Katina_801995B4(Actor* actor) { case 1: 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; } } diff --git a/src/overlays/ovl_i4/fox_sz.c b/src/overlays/ovl_i4/fox_sz.c index 0b63075c..b7ccfbbf 100644 --- a/src/overlays/ovl_i4/fox_sz.c +++ b/src/overlays/ovl_i4/fox_sz.c @@ -52,8 +52,8 @@ void SectorZ_80199900(Actor* actor, s32 arg1) { gPlayer[0].unk_1D0 = 1000; gActors[0].state = 6; gPlayer[0].timer_1F8 = 30; - AUDIO_PLAY_SFX(0x11030010U, gActors[0].sfxSource, 0U); - AUDIO_PLAY_SFX(0x31024059U, gActors[0].sfxSource, 0U); + AUDIO_PLAY_SFX(0x11030010, gActors[0].sfxSource, 0); + AUDIO_PLAY_SFX(0x31024059, gActors[0].sfxSource, 0); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); } @@ -200,7 +200,7 @@ void SectorZ_80199FCC(Actor* actor, s32 arg1) { actor->fwork[1] = 25.0f; actor->fwork[29] = 2.0f; - AUDIO_PLAY_SFX(0x3103A061U, actor->sfxSource, 4U); + AUDIO_PLAY_SFX(0x3103A061, actor->sfxSource, 4); } void SectorZ_8019A0F8(Actor* actor, s32 arg1) { @@ -247,7 +247,7 @@ void SectorZ_8019A1D0(void) { actor->info.unk_1C = 0.0f; - AUDIO_PLAY_SFX(0x31000011U, actor->sfxSource, 4U); + AUDIO_PLAY_SFX(0x31000011, actor->sfxSource, 4); } void SectorZ_8019A2F4(Actor* actor) { @@ -386,7 +386,7 @@ void SectorZ_8019A3E8(Actor* actor) { actorPtr->itemDrop = DROP_SILVER_RING_50p; actorPtr->timer_0C2 = 30; Object_SetInfo(&actorPtr->info, actorPtr->obj.id); - AUDIO_PLAY_SFX(0x31000011U, actorPtr->sfxSource, 4U); + AUDIO_PLAY_SFX(0x31000011, actorPtr->sfxSource, 4); actor->unk_04E++; break; } @@ -480,7 +480,7 @@ void SectorZ_8019AB8C(Actor* actor) { gSzMissileR = 63.0f; gSzMissileG = 255.0f; gSzMissileB = 158.0f; - D_game_80161A44 = 30000.0f; + gProjectFar = 30000.0f; gAllRangeEventTimer = 0; actor->state = 2; if (gAllRangeCheckpoint != 0) { @@ -580,7 +580,7 @@ void SectorZ_8019AB8C(Actor* actor) { gFillScreenAlpha = gFillScreenAlphaTarget = 0; switch (actor->timer_0BC) { case 9800: - AUDIO_PLAY_SFX(0x09000002U, gActors[10].sfxSource, 0U); + AUDIO_PLAY_SFX(0x09000002, gActors[10].sfxSource, 0); gActors[10].fwork[29] = 12.0f; break; @@ -688,7 +688,7 @@ void SectorZ_8019B568(void) { actor->unk_0B6 = 1; actor->vel.x = -20.0f; Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(0x11030010U, actor->sfxSource, 0U); + AUDIO_PLAY_SFX(0x11030010, actor->sfxSource, 0); } Vec3f D_i4_8019F57C[] = { { 150.0f, 150.0f, 50.0f }, { -150.0f, -150.0f, 50.0f }, { -150.0f, 150.0f, 50.0f }, { 150.0f, -150.0f, 50.0f } @@ -715,7 +715,7 @@ void SectorZ_8019B630(Actor* actor, s32 index) { actor->unk_0B6 = 26; actor->iwork[11] = 1; Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(0x31000011U, actor->sfxSource, 4U); + AUDIO_PLAY_SFX(0x31000011, actor->sfxSource, 4); } Vec3f D_i4_8019F5BC[] = { @@ -738,8 +738,8 @@ void SectorZ_8019B75C(Actor* actor, s32 arg1) { Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(0x3100000CU, actor->sfxSource, 4U); - AUDIO_PLAY_SFX(0x09000002U, actor->sfxSource, 0U); + AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); + AUDIO_PLAY_SFX(0x09000002, actor->sfxSource, 0); actor->fwork[29] = 5.0f; } @@ -768,7 +768,7 @@ void SectorZ_8019B888(void) { actor->unk_0F4.y = 270.0f; actor->health = 255; actor->iwork[11] = 1; - AUDIO_PLAY_SFX(0x3100000CU, actor->sfxSource, 4U); + AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); actor->info.hitbox = SEGMENTED_TO_VIRTUAL(gTeamHitbox); actor->info.unk_16 = 0; actor->info.unk_1C = 0.0f; @@ -807,7 +807,7 @@ void SectorZ_8019BA64(Player* player) { player->unk_0D0 = 0.0f; player->camRoll = -20.0f; - D_game_80161A44 = 30000.0f; + gProjectFar = 30000.0f; case 1: if (gCsFrameCount < 7) { @@ -929,7 +929,7 @@ void SectorZ_8019BA64(Player* player) { } if (gCsFrameCount == 820) { - Audio_KillSfxById(0x49000014U); + Audio_KillSfxById(0x49000014); player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_01C = player->unk_018 = player->unk_014 = 0.f; AUDIO_PLAY_BGM(gBgmSeqId); @@ -940,7 +940,7 @@ void SectorZ_8019BA64(Player* player) { switch (gCsFrameCount) { case 20: - AUDIO_PLAY_SFX(0x49000014U, gDefaultSfxSource, 4U); + AUDIO_PLAY_SFX(0x49000014, gDefaultSfxSource, 4); break; case 330: @@ -994,7 +994,7 @@ void SectorZ_8019BA64(Player* player) { player->unk_114 = 90.0f; player->unk_0D0 = D_play_80161A54; player->unk_234 = 1; - AUDIO_PLAY_SFX(0x09000002U, player->sfxSource, 0U); + AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); break; } @@ -1054,13 +1054,13 @@ void SectorZ_8019C574(Actor* actor, s32 index) { if (index < 3) { actor->iwork[11] = 1; - AUDIO_PLAY_SFX(0x3100000CU, actor->sfxSource, 4U); + AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); } else { actor->unk_0B6 = 1; actor->fwork[0] = 20.0f; - AUDIO_PLAY_SFX(0x11030010U, actor->sfxSource, 0U); - AUDIO_PLAY_SFX(0x31024059U, actor->sfxSource, 0U); + AUDIO_PLAY_SFX(0x11030010, actor->sfxSource, 0); + AUDIO_PLAY_SFX(0x31024059, actor->sfxSource, 0); } } @@ -1090,7 +1090,7 @@ void SectorZ_8019C70C(void) { actor->timer_0BC = 130; Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(0x3100000CU, actor->sfxSource, 4U); + AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); } void SectorZ_8019C85C(Player* player) { @@ -1118,10 +1118,10 @@ void SectorZ_8019C85C(Player* player) { if (player->timer_1F8 == 0) { player->unk_1D0 = 1001; player->timer_1F8 = 100; - AUDIO_PLAY_SFX(0x09000002U, player->sfxSource, 0U); + AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); player->unk_194 = 5.0f; player->unk_190 = 5.0f; - D_game_80161A44 = 30000.0f; + gProjectFar = 30000.0f; } break; @@ -1152,7 +1152,7 @@ void SectorZ_8019C85C(Player* player) { gCsCamAtZ = boss0->obj.pos.z; D_ctx_80177A48[0] = 1.0f; - D_game_80161A44 = 30000.0f; + gProjectFar = 30000.0f; player->unk_234 = 0; player->unk_0D0 = 0.0f; @@ -1176,7 +1176,7 @@ void SectorZ_8019C85C(Player* player) { player->unk_1D0 = 1; - D_game_80161A44 = 30000.0f; + gProjectFar = 30000.0f; player->timer_1F8 = 550; player->unk_0D0 = 0.0f; @@ -1188,7 +1188,7 @@ void SectorZ_8019C85C(Player* player) { for (i = 0; i < ARRAY_COUNT(gActors); i++) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); } - AUDIO_PLAY_SFX(0x31024059U, boss0->sfxSource, 0U); + AUDIO_PLAY_SFX(0x31024059, boss0->sfxSource, 0); break; case 1: @@ -1242,7 +1242,7 @@ void SectorZ_8019C85C(Player* player) { func_8001CA24(0U); Audio_KillSfxBySource(player->sfxSource); - func_play_800A6148(); + Play_ClearObjectData(); player->pos.x = 0.0f; player->pos.y = 0.0f; @@ -1515,7 +1515,7 @@ void SectorZ_8019C85C(Player* player) { break; case 2510: - AUDIO_PLAY_SFX(0x09000002U, player->sfxSource, 0U); + AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); player->unk_190 = player->unk_194 = 5.0f; break; @@ -1579,7 +1579,7 @@ void SectorZ_8019DD20(Actor* actor) { switch (actor->state) { case 1: actor->state = 2; - AUDIO_PLAY_SFX(0x09000002U, actor->sfxSource, 0U); + AUDIO_PLAY_SFX(0x09000002, actor->sfxSource, 0); actor->fwork[29] = 5.0f; case 2: @@ -1621,7 +1621,7 @@ void SectorZ_8019DD20(Actor* actor) { break; case 430: - AUDIO_PLAY_SFX(0x09000002U, actor->sfxSource, 0U); + AUDIO_PLAY_SFX(0x09000002, actor->sfxSource, 0); actor->fwork[29] = 8.0f; break; @@ -1681,7 +1681,7 @@ void SectorZ_8019E234(Actor* actor) { actor->timer_0C6 = 20; actor->unk_0D0 = 0; actor->health -= actor->damage; - AUDIO_PLAY_SFX(0x2903300EU, actor->sfxSource, 4U); + AUDIO_PLAY_SFX(0x2903300E, actor->sfxSource, 4); if (actor->health <= 0) { func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, 5.0f, 10); Actor_Despawn(actor); @@ -1724,7 +1724,7 @@ void SectorZ_8019E454(Boss* boss) { boss->timer_050 = 10; boss->timer_052 = 60; boss->state = 1; - AUDIO_PLAY_SFX(0x1900404FU, boss->sfxSource, 0U); + AUDIO_PLAY_SFX(0x1900404F, boss->sfxSource, 0); } if (boss->timer_050 == 1) { @@ -1785,7 +1785,7 @@ void SectorZ_8019E454(Boss* boss) { void SectorZ_8019E98C(Boss* boss) { gSPFogPosition(gMasterDisp++, gFogNear, 1005); - func_demo_800515C4(); + Cutscene_DrawGreatFox(); } void SectorZ_8019EA68(void) { @@ -1857,5 +1857,5 @@ void SectorZ_8019EA68(void) { boss->obj.id = OBJ_BOSS_313; Object_SetInfo(&boss->info, boss->obj.id); - AUDIO_PLAY_SFX(0x11030010U, boss->sfxSource, 0U); + AUDIO_PLAY_SFX(0x11030010, boss->sfxSource, 0); } diff --git a/src/overlays/ovl_i5/fox_ma.c b/src/overlays/ovl_i5/fox_ma.c index ebd3da28..50ce8b23 100644 --- a/src/overlays/ovl_i5/fox_ma.c +++ b/src/overlays/ovl_i5/fox_ma.c @@ -6188,7 +6188,7 @@ void Macbeth_801AF8F4(Player* player) { } if (gCsFrameCount == 940) { player->unk_1D0++; - func_play_800A6148(); + Play_ClearObjectData(); player->pos.z = player->unk_138 = -(D_ctx_80177D20 + 210.0f); player->pos.x = player->unk_0AC; func_effect_8007A568(player->pos.x - 1800.0f, -50.0f, player->pos.z + 5000.0f, 40.0f); @@ -6401,7 +6401,7 @@ void Macbeth_801AF8F4(Player* player) { gActors[7].state++; break; case 2160: - D_game_80161A44 = 30000.0f; + gProjectFar = 30000.0f; player->unk_240 = 1; func_8001CA24(0); AUDIO_PLAY_SFX(0x01008016, player->sfxSource, 0); @@ -6440,7 +6440,7 @@ void Macbeth_801AF8F4(Player* player) { if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; D_ctx_8017837C = 4; - func_play_800A6148(); + Play_ClearObjectData(); Audio_FadeOutAll(10); D_play_800D3180[LEVEL_MACBETH] = Play_CheckMedalStatus(150) + 1; } @@ -6742,9 +6742,9 @@ void Macbeth_801B38E0(void) { } for (i = 0; i < 2; i++) { - D_ctx_80176550[i] = 0; + gActor194Status[i] = 0; for (j = 0; j < 100; j++) { - D_ctx_80176878[i][j] = -5000.0f; + gActor194yPos[i][j] = -5000.0f; } } } @@ -7009,7 +7009,7 @@ void Macbeth_801B3D04(Player* player) { if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; D_ctx_8017837C = 4; - func_play_800A6148(); + Play_ClearObjectData(); Audio_FadeOutAll(10); D_play_800D3180[LEVEL_MACBETH] = Play_CheckMedalStatus(150) + 1; } diff --git a/src/overlays/ovl_i5/fox_ti_cs.c b/src/overlays/ovl_i5/fox_ti_cs.c index 56b74c9c..8efa8b54 100644 --- a/src/overlays/ovl_i5/fox_ti_cs.c +++ b/src/overlays/ovl_i5/fox_ti_cs.c @@ -19,7 +19,7 @@ void Titania_80187530(Actor* actor) { actor->obj.rot.y = 180.0f; Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(0x11030010U, actor->sfxSource, 0U); + AUDIO_PLAY_SFX(0x11030010, actor->sfxSource, 0); actor->unk_0B6 = 1; } @@ -35,7 +35,7 @@ void Titania_801875D0(Actor* actor, s32 arg1) { actor->obj.rot.y = 180.0f; 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 Titania_8018769C(Player* player) { @@ -94,7 +94,7 @@ void Titania_8018769C(Player* player) { if (gCsFrameCount == 430) { player->unk_1D0 = 2; player->timer_1F8 = 10; - AUDIO_PLAY_SFX(0x09000002U, player->sfxSource, 0U); + AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); } gCsCamAtX = player->pos.x; gCsCamAtY = player->pos.y; @@ -206,7 +206,7 @@ void Titania_8018769C(Player* player) { if (D_ctx_80177A10[0] == 0) { D_ctx_80177A10[0]++; - AUDIO_PLAY_SFX(0x01008016U, player->sfxSource, 0U); + AUDIO_PLAY_SFX(0x01008016, player->sfxSource, 0); } } @@ -273,11 +273,11 @@ void Titania_80188108(Actor* actor, s32 arg1) { actor->unk_0C9 = 1; actor->fwork[3] = D_i5_801B7348[arg1]; actor->state = 30; - AUDIO_PLAY_SFX(0x3100000CU, actor->sfxSource, 4U); + AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); } else { actor->unk_0B6 = 1; actor->state = 20; - AUDIO_PLAY_SFX(0x11030010U, actor->sfxSource, 0U); + AUDIO_PLAY_SFX(0x11030010, actor->sfxSource, 0); actor->fwork[9] = 20.0f; } } @@ -293,7 +293,7 @@ void Titania_801882CC(Player* player) { case 0: gCsFrameCount = gBossActive = gLoadLevelObjects = 0; - func_play_800A6148(); + Play_ClearObjectData(); player->unk_1D0 = 1; @@ -313,7 +313,7 @@ void Titania_801882CC(Player* player) { Titania_80188108(&gActors[2], 2); } - Audio_KillSfxBySourceAndId(player->sfxSource, 0x01004024U); + Audio_KillSfxBySourceAndId(player->sfxSource, 0x01004024); case 1: Math_SmoothStepToF(D_ctx_80177A48, 0.1f, 1.0f, 0.01f, 0.0f); @@ -496,10 +496,10 @@ void Titania_801882CC(Player* player) { player->vel.z = 0.0f; player->vel.y = 0.0f; Titania_80188108(&gActors[3], 3); - D_game_80161A44 = 30000.0f; + gProjectFar = 30000.0f; player->unk_240 = 1; func_8001CA24(0); - AUDIO_PLAY_SFX(0x01008016U, player->sfxSource, 0U); + AUDIO_PLAY_SFX(0x01008016, player->sfxSource, 0); break; } @@ -524,7 +524,7 @@ void Titania_801882CC(Player* player) { if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; D_ctx_8017837C = 4; - func_play_800A6148(); + Play_ClearObjectData(); Audio_FadeOutAll(10); D_play_800D3180[LEVEL_TITANIA] = Play_CheckMedalStatus(150) + 1; } diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index f9e6e368..4a46719b 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -420,11 +420,11 @@ void Andross_80188A4C(Boss* boss) { if (boss->swork[4] == 0) { boss->swork[2] = 10; boss->swork[3] = 15; - AUDIO_PLAY_SFX(0x2943500FU, boss->sfxSource, 4); + AUDIO_PLAY_SFX(0x2943500F, boss->sfxSource, 4); boss->health -= boss->damage; if ((boss->health != 0) && (boss->health <= 0)) { gScreenFlashTimer = 8; - AUDIO_PLAY_SFX(0x2940D09AU, boss->sfxSource, 4); + AUDIO_PLAY_SFX(0x2940D09A, boss->sfxSource, 4); func_boss_80042EC0(boss); gPlayer[0].state_1C8 = PLAYERSTATE_1C8_STANDBY; boss->state = 20; @@ -434,8 +434,8 @@ void Andross_80188A4C(Boss* boss) { D_ctx_80177A48[0] = 0.0f; D_ctx_80177A48[1] = 0.1f; gCsFrameCount = 0; - Audio_KillSfxBySourceAndId(boss->sfxSource, 0x11034074U); - Audio_KillSfxBySourceAndId(boss->sfxSource, 0x31408097U); + Audio_KillSfxBySourceAndId(boss->sfxSource, 0x11034074); + Audio_KillSfxBySourceAndId(boss->sfxSource, 0x31408097); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); } @@ -450,7 +450,7 @@ void Andross_80188A4C(Boss* boss) { boss->timer_050 = 50; boss->fwork[3] = gPlayer[0].pos.x; boss->fwork[5] = gPlayer[0].unk_138; - AUDIO_PLAY_SFX(0x2940B096U, boss->sfxSource, 4); + AUDIO_PLAY_SFX(0x2940B096, boss->sfxSource, 4); } } break; @@ -566,7 +566,7 @@ void Andross_80189214(void) { s32 i; Player* player = &gPlayer[0]; - func_play_800A6148(); + Play_ClearObjectData(); for (i = 0; i < 200; i++) { gObjects58[i].obj.status = OBJ_FREE; @@ -656,7 +656,7 @@ void Andross_80189470(Actor* actor) { player->unk_234 = 0; player->camRoll = 0.0f; D_ctx_80177A48[0] = 1.0f; - func_play_800A6148(); + Play_ClearObjectData(); for (i = 0; i < 200; i++) { gObjects58[i].obj.status = OBJ_FREE; @@ -771,7 +771,7 @@ void Andross_80189B70(Boss* boss) { Math_SmoothStepToF(&boss->fwork[25], 100.0f, 1.0f, 10.0f, 0); } if ((fabsf(boss->obj.pos.x - gPlayer[0].pos.x) < 300.0f) && - (fabsf((boss->obj.pos.y - 300.0f) - gPlayer[0].pos.y) < 300.0f) && + (fabsf(boss->obj.pos.y - 300.0f - gPlayer[0].pos.y) < 300.0f) && (fabsf(boss->obj.pos.z - gPlayer[0].unk_138) < 300.0f) && (boss->state < 11) && (boss->timer_05A == 0)) { boss->state = 11; boss->timer_050 = 150; @@ -855,14 +855,14 @@ void Andross_80189B70(Boss* boss) { boss->fwork[13] = 1.0f; boss->fwork[19] = 23.0f; boss->fwork[1] = 0.0f; - gPlayer[0].cockpitView = 1; + gPlayer[0].cockpitView = true; Math_SmoothStepToF(&D_display_800CA230, 0.15f, 0.2f, 0.004f, 0.0f); if (boss->timer_050 == 120) { AUDIO_PLAY_SFX(0x1940306E, boss->sfxSource, 4); } if (boss->timer_050 == 0) { gPlayer[0].unk_0D0 = D_play_80161A54; - gPlayer[0].cockpitView = 0; + gPlayer[0].cockpitView = false; gFillScreenAlphaTarget = 0; boss->timer_05A = 50; if (boss->swork[4] != 0) { @@ -998,7 +998,7 @@ void Andross_80189B70(Boss* boss) { gFogNear = 996; gFogFar = 1007; gBgColor = 0x4081; // 64, 16, 0 - D_game_80161A44 = 30000.0f; + gProjectFar = 30000.0f; gGroundLevel = -50.0f; gPlayer[0].pos.x = -25995.0f; gPlayer[0].pos.y = 300.0f; @@ -3650,7 +3650,7 @@ void Andross_80193C4C(Player* player) { player->camRoll = 0.0f; player->unk_234 = 0; D_ctx_80177A48[0] = 1.0f; - func_play_800A6148(); + Play_ClearObjectData(); gObjects58 = Memory_Allocate(200 * sizeof(Object_58)); for (i = 0; i < 200; i++) { gObjects58[i].obj.status = OBJ_FREE; @@ -3971,7 +3971,7 @@ void Andross_80193C4C(Player* player) { player->unk_018 = 0.0f; player->unk_01C = 0.05f; D_ctx_80177AB0 = 6; - D_game_80161A44 = 12800.0f; + gProjectFar = 12800.0f; } D_ctx_80177A48[0] = 1.0f; gCsCamAtX = (2.0f * SIN_DEG(gGameFrameCount * 40.0f)) + player->pos.x; diff --git a/src/overlays/ovl_i6/fox_sy.c b/src/overlays/ovl_i6/fox_sy.c index bc8a8b05..60d62f06 100644 --- a/src/overlays/ovl_i6/fox_sy.c +++ b/src/overlays/ovl_i6/fox_sy.c @@ -1212,9 +1212,9 @@ void SectorY_8019BC14(Boss* boss) { gPlayer[0].pos.y = sp48; gPlayer[0].unk_138 = gPlayer[0].pos.z = sp44; if (boss->index == 0) { - AUDIO_PLAY_SFX(0x2901306EU, boss->sfxSource, 4U); + AUDIO_PLAY_SFX(0x2901306E, boss->sfxSource, 4); } else { - AUDIO_PLAY_SFX(0x2900306BU, boss->sfxSource, 4U); + AUDIO_PLAY_SFX(0x2900306B, boss->sfxSource, 4); } } } @@ -2027,7 +2027,7 @@ void SectorY_8019EE60(Player* player) { if (gCsFrameCount == 230) { D_ctx_80177A48[0] = 1.0f; player->unk_1D0++; - func_play_800A6148(); + Play_ClearObjectData(); func_8001CA24(0); Audio_KillSfxBySource(player->sfxSource); gFillScreenAlpha = 250; @@ -2053,7 +2053,7 @@ void SectorY_8019EE60(Player* player) { gObjects58[i].obj.status = OBJ_FREE; } - func_play_800A6148(); + Play_ClearObjectData(); SectorY_8019EB80(); D_ctx_80177A48[1] = 10.0f; D_ctx_80177A48[2] = 0.5f; @@ -2065,7 +2065,7 @@ void SectorY_8019EE60(Player* player) { } break; case 3: - if ((gCsFrameCount < 720) && (D_ctx_801782F8 != 0)) { + if ((gCsFrameCount < 720) && D_ctx_801782F8) { player->wings.unk_30 = (f32) (gGameFrameCount & 2) * 5.0f; } gFillScreenAlphaTarget = 0; diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index 4e6a22bc..7c412a6c 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -2014,8 +2014,8 @@ void Map_801A0788(void) { Memory_FreeAll(); func_play_800A5D6C(); - D_ctx_80178420 = 320.0f; - D_ctx_80178424 = 240.0f; + D_ctx_80178420 = SCREEN_WIDTH; + D_ctx_80178424 = SCREEN_HEIGHT; D_ctx_8017842C = 0.0f; D_ctx_80178430 = 0.0f; } @@ -2133,7 +2133,7 @@ void Map_801A0954(void) { if (gControllerPress[gMainController].button & START_BUTTON) { AUDIO_PLAY_BGM(SEQ_ID_WORLD_MAP); - AUDIO_PLAY_SFX(0x4900001FU, gDefaultSfxSource, 4U); + AUDIO_PLAY_SFX(0x4900001F, gDefaultSfxSource, 4); for (planetId = 0; planetId < PLANET_MAX; planetId++) { if ((planetId == PLANET_SECTOR_Z) || (planetId == PLANET_SECTOR_X) || (planetId == PLANET_SECTOR_Y)) { @@ -2345,7 +2345,7 @@ void Map_801A1528(void) { } if (temp == 0.0f) { - AUDIO_PLAY_SFX(0x4900001FU, gDefaultSfxSource, 4U); + AUDIO_PLAY_SFX(0x4900001F, gDefaultSfxSource, 4); D_menu_801CD948 = 0; D_menu_801CD97C = 1; D_menu_801CD944 = 3; @@ -2354,7 +2354,7 @@ void Map_801A1528(void) { } if (gControllerPress[gMainController].button & START_BUTTON) { - AUDIO_PLAY_SFX(0x4900001FU, gDefaultSfxSource, 4U); + AUDIO_PLAY_SFX(0x4900001F, gDefaultSfxSource, 4); for (planetId = 0; planetId < PLANET_MAX; planetId++) { if ((planetId == PLANET_SECTOR_Z) || (planetId == PLANET_SECTOR_X) || (planetId == PLANET_SECTOR_Y)) { @@ -2462,9 +2462,9 @@ void Map_801A1C14(void) { if (sCurrentPlanetId == PLANET_CORNERIA) { gFillScreenAlpha = 0; D_menu_801CD948 = 10; - AUDIO_PLAY_SFX(0x0940A00BU, gDefaultSfxSource, 4U); + AUDIO_PLAY_SFX(0x0940A00B, gDefaultSfxSource, 4); } else { - AUDIO_PLAY_SFX(0x19003012U, gDefaultSfxSource, 4U); + AUDIO_PLAY_SFX(0x19003012, gDefaultSfxSource, 4); D_menu_801CD948++; } } else { @@ -2480,7 +2480,7 @@ void Map_801A1C14(void) { case 10: if (D_menu_801CEB34 == 4) { - AUDIO_PLAY_SFX(0x19003012U, gDefaultSfxSource, 4U); + AUDIO_PLAY_SFX(0x19003012, gDefaultSfxSource, 4); D_menu_801CD948 = 2; } break; @@ -2488,7 +2488,7 @@ void Map_801A1C14(void) { case 2: Map_801A2674(); if ((D_menu_801CD9FC == D_menu_801CDA50.z) && (D_menu_801CD9D8 == 0)) { - AUDIO_PLAY_SFX(0x19004013U, gDefaultSfxSource, 4U); + AUDIO_PLAY_SFX(0x19004013, gDefaultSfxSource, 4); D_menu_801CD9D8 = 1; if (sCurrentPlanetId == PLANET_CORNERIA) { D_menu_801CEB48[0] = true; @@ -2908,9 +2908,9 @@ void Map_801A2EB8(void) { if (D_menu_801CD9C4 == 30) { if (D_menu_801CD93C == 2) { - AUDIO_PLAY_SFX(0x0900802AU, gDefaultSfxSource, 4U); + AUDIO_PLAY_SFX(0x0900802A, gDefaultSfxSource, 4); } else { - AUDIO_PLAY_SFX(0x09000032U, gDefaultSfxSource, 4U); + AUDIO_PLAY_SFX(0x09000032, gDefaultSfxSource, 4); } } @@ -2978,7 +2978,7 @@ void Map_801A2EB8(void) { } if ((D_menu_801CEED8 == 4) && (D_menu_801CEEDC == 0.0f)) { - AUDIO_PLAY_SFX(0x19000026U, gDefaultSfxSource, 4U); + AUDIO_PLAY_SFX(0x19000026, gDefaultSfxSource, 4); } if ((D_menu_801CEED8 == 5) && (D_menu_801CEEDC == 0.0f)) { @@ -3136,7 +3136,7 @@ void Map_801A36A8(void) { } if (gControllerPress[gMainController].button & (A_BUTTON | START_BUTTON)) { - AUDIO_PLAY_SFX(0x49000003U, gDefaultSfxSource, 4U); + AUDIO_PLAY_SFX(0x49000003, gDefaultSfxSource, 4); D_menu_801CD948 = 3; } } @@ -3591,7 +3591,7 @@ void Map_801A4D7C(void) { if (gControllerPress[gMainController].button & A_BUTTON) { func_8001D6DC(0); - AUDIO_PLAY_SFX(0x49000003U, gDefaultSfxSource, 4U); + AUDIO_PLAY_SFX(0x49000003, gDefaultSfxSource, 4); D_menu_801CF000[D_menu_801CEFDC] = 10; if (((D_menu_801CD93C != 0) && (D_menu_801CEFDC == 2)) || ((D_menu_801CD93C == 0) && (D_menu_801CEFDC == 1))) { @@ -3943,7 +3943,7 @@ void Map_801A5E80(void) { case 1: if ((gControllerPress[gMainController].button & START_BUTTON) && !(D_menu_801CD9A8)) { - Audio_KillSfxById(0x4100001EU); + Audio_KillSfxById(0x4100001E); Audio_ClearVoice(); D_menu_801CF018 = 0; D_menu_801B8280 = 2; @@ -3992,7 +3992,7 @@ void Map_801A5E80(void) { case 4: if (D_menu_801CD9B8 == 0) { - AUDIO_PLAY_SFX(0x49002016U, gDefaultSfxSource, 4U); + AUDIO_PLAY_SFX(0x49002016, gDefaultSfxSource, 4); D_menu_801CD9B8 = 75; D_menu_801B8280++; } @@ -4923,7 +4923,7 @@ void Map_801A809C(PlanetId planetId) { D_menu_801CD998 += 8; if (D_menu_801CD998 == 8) { - AUDIO_PLAY_SFX(0x49008030U, gDefaultSfxSource, 4U); + AUDIO_PLAY_SFX(0x49008030, gDefaultSfxSource, 4); } if (D_menu_801CD998 >= 255) { @@ -5406,7 +5406,7 @@ void Map_801A9A8C(void) { } #endif - TextureRect_8bIA(&gMasterDisp, &D_5000500, 112, 19, D_menu_801B6AC0[0], D_menu_801B6AC8[0], 1.0f, 1.0f); + TextureRect_8bIA(&gMasterDisp, D_5000500, 112, 19, D_menu_801B6AC0[0], D_menu_801B6AC8[0], 1.0f, 1.0f); TextureRect_8bIA(&gMasterDisp, sp54, 16, 15, D_menu_801B6AC0[1], D_menu_801B6AC8[1], 1.0f, 1.0f); for (i = 0; i < D_menu_801AF834[sp58].height; i++) { @@ -5836,7 +5836,7 @@ void Map_801AB300(void) { D_menu_801CEA74 = 255; D_ctx_80177D50 = 1.3f; - AUDIO_PLAY_SFX(0x4100001EU, gDefaultSfxSource, 4U); + AUDIO_PLAY_SFX(0x4100001E, gDefaultSfxSource, 4); Audio_PlayVoice(Message_IdFromPtr(D_ctx_80178308)); D_Timer_801782AC = Message_GetCharCount(D_ctx_80178308) * 2; @@ -5918,7 +5918,7 @@ void Map_801AB300(void) { case 6: if (D_Timer_801782AC == 0) { - Audio_KillSfxById(0x4100001EU); + Audio_KillSfxById(0x4100001E); Audio_PlayVoice(0); D_ctx_80177D50 = 0.0f; D_menu_801CF018++; @@ -6360,7 +6360,7 @@ void Map_801AC9A0(s32 index) { switch (D_ctx_80177BD8[index]) { case 1: - AUDIO_PLAY_SFX(0x1900404DU, gDefaultSfxSource, 4U); + AUDIO_PLAY_SFX(0x1900404D, gDefaultSfxSource, 4); D_ctx_80177BD8[index] = 11; break; @@ -6368,7 +6368,7 @@ void Map_801AC9A0(s32 index) { Math_SmoothStepToF(&gTexturedLines[index].unk_24, target, 0.1f, 100.0f, 4.0f); gTexturedLines[index].unk_2F = 255; if (gTexturedLines[index].unk_24 == target) { - Audio_KillSfxById(0x1900404DU); + Audio_KillSfxById(0x1900404D); D_ctx_80177BD8[index] = 4; } break; @@ -6582,7 +6582,7 @@ void Map_801AD11C(void) { if (gControllerPress[gMainController].button & START_BUTTON) { if (D_menu_801CD944 == 3 && D_game_80161A34 == 7) { if (D_menu_801CEFD0) { - AUDIO_PLAY_SFX(0x4900100AU, gDefaultSfxSource, 4U); + AUDIO_PLAY_SFX(0x4900100A, gDefaultSfxSource, 4); } else { func_8001D6DC(1); D_menu_801CEFC4 = 1; @@ -6634,7 +6634,7 @@ void Map_801AD11C(void) { if ((D_menu_801CF014 == 1) && (var_a3 == 0) && (y == 0.0f) && (x == 0.0f)) { var_a1 = 0; var_a2 = 0; - Audio_KillSfxById(0x1100204CU); + Audio_KillSfxById(0x1100204C); D_menu_801CF014 = 0; } @@ -6681,12 +6681,12 @@ void Map_801AD11C(void) { } if (D_menu_801CF010 == 0 && var_t0 == 1) { - AUDIO_PLAY_SFX(0x1100004CU, gDefaultSfxSource, 4U); + AUDIO_PLAY_SFX(0x1100004C, gDefaultSfxSource, 4); D_menu_801CF010 = 1; } if (D_menu_801CF010 == 1 && var_t0 == 0) { - Audio_KillSfxById(0x1100004CU); + Audio_KillSfxById(0x1100004C); D_menu_801CF010 = 0; } } diff --git a/src/overlays/ovl_menu/fox_option.c b/src/overlays/ovl_menu/fox_option.c index 44989908..aeeff3fe 100644 --- a/src/overlays/ovl_menu/fox_option.c +++ b/src/overlays/ovl_menu/fox_option.c @@ -513,8 +513,8 @@ void Option_Setup(void) { Memory_FreeAll(); - D_ctx_80178420 = 320.0f; - D_ctx_80178424 = 240.0f; + D_ctx_80178420 = SCREEN_WIDTH; + D_ctx_80178424 = SCREEN_HEIGHT; func_play_800A5D6C(); diff --git a/src/overlays/ovl_menu/fox_title.c b/src/overlays/ovl_menu/fox_title.c index f40bb2f3..73c1f970 100644 --- a/src/overlays/ovl_menu/fox_title.c +++ b/src/overlays/ovl_menu/fox_title.c @@ -199,8 +199,8 @@ void Title_801875E0(void) { Memory_FreeAll(); func_play_800A5D6C(); - D_ctx_80178420 = 320.0f; - D_ctx_80178424 = 240.0f; + D_ctx_80178420 = SCREEN_WIDTH; + D_ctx_80178424 = SCREEN_HEIGHT; Title_80188010(); @@ -2467,7 +2467,7 @@ void Title_8018E058(void) { gGreatFoxIntact = true; - func_demo_800515C4(); + Cutscene_DrawGreatFox(); func_edisplay_8005F1EC(D_menu_801B8658.unk_24); Matrix_Pop(&gGfxMatrix); @@ -2867,7 +2867,7 @@ void Title_8018F8E4(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 60, 60, 255, 200); - TextureRect_8bCI(&gMasterDisp, &D_TITLE_601D750, &D_TITLE_601DB50, 32, 32, D_menu_801AE464, D_menu_801AE468, + TextureRect_8bCI(&gMasterDisp, D_TITLE_601D750, D_TITLE_601DB50, 32, 32, D_menu_801AE464, D_menu_801AE468, D_menu_801AE46C, D_menu_801AE470); RCP_SetupDL(&gMasterDisp, 0x53); @@ -2982,7 +2982,7 @@ void Title_8018FF74(void) { gDPSetColorDither(gMasterDisp++, G_CD_NOISE); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, D_menu_801B7BD0); - TextureRect_16bRGBA(&gMasterDisp, &gTitleSunBeam, 32, 32, D_menu_801B9080, D_menu_801B9084, D_menu_801B7BB0, + TextureRect_16bRGBA(&gMasterDisp, gTitleSunBeam, 32, 32, D_menu_801B9080, D_menu_801B9084, D_menu_801B7BB0, D_menu_801B7BB4); D_menu_801B9080 += 1.66f; } diff --git a/src/sys/sys_lib.c b/src/sys/sys_lib.c index 25e9b218..702c3a19 100644 --- a/src/sys/sys_lib.c +++ b/src/sys/sys_lib.c @@ -84,8 +84,7 @@ void Lib_QuickSort(u8* first, u32 length, u32 size, CompareFunc cFunc) { void Lib_InitPerspective(Gfx** dList) { u16 norm; - guPerspective(gGfxMtx, &norm, D_game_80161A3C, (f32) SCREEN_WIDTH / SCREEN_HEIGHT, D_game_80161A40, D_game_80161A44, - 1.0f); + guPerspective(gGfxMtx, &norm, gFovY, (f32) SCREEN_WIDTH / SCREEN_HEIGHT, gProjectNear, gProjectFar, 1.0f); gSPPerspNormalize((*dList)++, norm); gSPMatrix((*dList)++, 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); @@ -94,7 +93,8 @@ void Lib_InitPerspective(Gfx** dList) { } void Lib_InitOrtho(Gfx** dList) { - guOrtho(gGfxMtx, -160.0f, 160.0f, -120.0f, 120.0f, D_game_80161A40, D_game_80161A44, 1.0f); + guOrtho(gGfxMtx, -SCREEN_WIDTH / 2, SCREEN_WIDTH / 2, -SCREEN_HEIGHT / 2, SCREEN_HEIGHT / 2, gProjectNear, + gProjectFar, 1.0f); gSPMatrix((*dList)++, 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); gSPMatrix((*dList)++, gGfxMtx++, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION); diff --git a/tools/Torch b/tools/Torch index c82b4a84..0cb23400 160000 --- a/tools/Torch +++ b/tools/Torch @@ -1 +1 @@ -Subproject commit c82b4a8423eb41202dc61378aa50f0052140c132 +Subproject commit 0cb23400b0ea1e443477ca2a764e9e74877c42b8 From e3716b5d48fa523b4f0f183011502cb737007568 Mon Sep 17 00:00:00 2001 From: petrie911 <69443847+petrie911@users.noreply.github.com> Date: Sat, 20 Apr 2024 16:47:46 -0500 Subject: [PATCH 031/151] Fix out-of-bound loop UB (#218) * avoid ub * format * torch --- include/PR/controller.h | 8 +++-- include/prevent_context_reordering.h | 2 +- src/audio/audio_seqplayer.c | 7 +++- src/engine/fox_context.c | 4 +++ src/engine/fox_save.c | 4 +++ src/libultra/io/conteepread.c | 10 +++--- src/libultra/io/conteepwrite.c | 16 ++++----- src/libultra/io/contramread.c | 4 +-- src/libultra/io/contramwrite.c | 4 +-- src/libultra/io/contreaddata.c | 8 ++--- src/libultra/io/controller.c | 4 +-- src/libultra/io/pfsisplug.c | 4 +-- src/overlays/ovl_i5/fox_ti.c | 54 +++++++++++++--------------- tools/Torch | 2 +- 14 files changed, 71 insertions(+), 60 deletions(-) diff --git a/include/PR/controller.h b/include/PR/controller.h index c443a296..9c6ff9a3 100644 --- a/include/PR/controller.h +++ b/include/PR/controller.h @@ -9,10 +9,12 @@ #define CHNL_ERR(format) (((format).rxsize & CHNL_ERR_MASK) >> 4) -typedef struct -{ - /* 0x0 */ u32 ramarray[15]; +typedef union { + struct { + /* 0x00 */ u32 ramarray[15]; /* 0x3C */ u32 pifstatus; + }; + /* 0x00 */ u32 raw[16]; } OSPifRam; typedef struct diff --git a/include/prevent_context_reordering.h b/include/prevent_context_reordering.h index 2273a083..84c18cfc 100644 --- a/include/prevent_context_reordering.h +++ b/include/prevent_context_reordering.h @@ -9,7 +9,7 @@ // struct Dummy4 {int x;}; // struct Dummy5 {int x;}; // struct Dummy6 {int x;}; -struct Dummy7 {int x;}; +// struct Dummy7 {int x;}; struct Dummy8 {int x;}; struct Dummy9 {int x;}; struct Dummy10 {int x;}; diff --git a/src/audio/audio_seqplayer.c b/src/audio/audio_seqplayer.c index 7279d3ea..badce99d 100644 --- a/src/audio/audio_seqplayer.c +++ b/src/audio/audio_seqplayer.c @@ -1390,7 +1390,12 @@ void func_800168BC(void) { for (i = 0; i < 48; i++) { gSeqChannels[i].seqPlayer = NULL; gSeqChannels[i].enabled = false; - for (j = 0; j < 64; j++) { // bug: this is sizeof(gSeqLayers) instead of sizeof(gSeqChannels[i].layers) +#ifdef AVOID_UB + for (j = 0; j < ARRAY_COUNT(gSeqChannels->layers); j++) { +#else + for (j = 0; j < 64; + j++) { // bug: this is ARRAY_COUNT(gSeqLayers) instead of ARRAY_COUNT(gSeqChannels[i].layers) +#endif gSeqChannels[i].layers[j] = NULL; } } diff --git a/src/engine/fox_context.c b/src/engine/fox_context.c index a9871807..0c17bcd8 100644 --- a/src/engine/fox_context.c +++ b/src/engine/fox_context.c @@ -50,7 +50,11 @@ s32 D_ctx_80177B50[7]; s32 D_ctx_80177B70[7]; PlanetId D_ctx_80177B90[7]; s32 D_ctx_80177BB0[7]; +#ifdef AVOID_UB +s32 D_ctx_80177BD8[24]; +#else s32 D_ctx_80177BD8[22]; // overruns gPrevPlanetTeamShields? +#endif s32 gPrevPlanetTeamShields[6]; s32 D_ctx_80177C58[6]; u8 gSoundMode; diff --git a/src/engine/fox_save.c b/src/engine/fox_save.c index 82e06584..086e2d12 100644 --- a/src/engine/fox_save.c +++ b/src/engine/fox_save.c @@ -68,7 +68,11 @@ s32 Save_Read(void) { (void) "EEPROM ROM[0] 正常\n"; return 0; } +#ifdef AVOID_UB + for (i = 0; i < sizeof(SaveData); i++) { +#else for (i = 0; i <= sizeof(SaveData); i++) { // should be <, but gets overwritten immediately. +#endif gSaveFile.save.raw[i] = gSaveFile.backup.raw[i]; } gSaveFile.save.checksum = gSaveFile.backup.checksum; diff --git a/src/libultra/io/conteepread.c b/src/libultra/io/conteepread.c index 113cbba2..bc50aa99 100644 --- a/src/libultra/io/conteepread.c +++ b/src/libultra/io/conteepread.c @@ -30,8 +30,8 @@ s32 osEepromRead(OSMesgQueue* mq, u8 address, u8* buffer) { __osPackEepReadData(address); ret = __osSiRawStartDma(OS_WRITE, &__osEepPifRam); osRecvMesg(mq, NULL, OS_MESG_BLOCK); - for (i = 0; i < 0x10; i++) { - __osEepPifRam.ramarray[i] = 0xFF; + for (i = 0; i < ARRLEN(__osEepPifRam.raw); i++) { + __osEepPifRam.raw[i] = CONT_CMD_NOP; } __osEepPifRam.pifstatus = 0; ret = __osSiRawStartDma(OS_READ, &__osEepPifRam); @@ -53,13 +53,13 @@ s32 osEepromRead(OSMesgQueue* mq, u8 address, u8* buffer) { } void __osPackEepReadData(u8 address) { - u8* ptr = (u8*) &__osEepPifRam.ramarray; + u8* ptr = (u8*) __osEepPifRam.ramarray; __OSContEepromFormat eepromformat; int i; #if BUILD_VERSION < VERSION_J - for (i = 0; i < ARRLEN(__osEepPifRam.ramarray) + 1; i++) { - __osEepPifRam.ramarray[i] = CONT_CMD_NOP; + for (i = 0; i < ARRLEN(__osEepPifRam.raw); i++) { + __osEepPifRam.raw[i] = CONT_CMD_NOP; } #endif diff --git a/src/libultra/io/conteepwrite.c b/src/libultra/io/conteepwrite.c index 4698a021..eb0fb481 100644 --- a/src/libultra/io/conteepwrite.c +++ b/src/libultra/io/conteepwrite.c @@ -7,7 +7,7 @@ void __osPackEepWriteData(u8 address, u8* buffer); s32 osEepromWrite(OSMesgQueue* mq, u8 address, u8* buffer) { s32 ret = 0; int i; - u8* ptr = (u8*) &__osEepPifRam.ramarray; + u8* ptr = (u8*) __osEepPifRam.ramarray; __OSContEepromFormat eepromformat; OSContStatus sdata; @@ -31,8 +31,8 @@ s32 osEepromWrite(OSMesgQueue* mq, u8 address, u8* buffer) { ret = __osSiRawStartDma(OS_WRITE, &__osEepPifRam); osRecvMesg(mq, NULL, OS_MESG_BLOCK); - for (i = 0; i < 0x10; i++) { - __osEepPifRam.ramarray[i] = 255; + for (i = 0; i < ARRLEN(__osEepPifRam.raw); i++) { + __osEepPifRam.raw[i] = CONT_CMD_NOP; } __osEepPifRam.pifstatus = 0; @@ -51,13 +51,13 @@ s32 osEepromWrite(OSMesgQueue* mq, u8 address, u8* buffer) { } void __osPackEepWriteData(u8 address, u8* buffer) { - u8* ptr = (u8*) &__osEepPifRam.ramarray; + u8* ptr = (u8*) __osEepPifRam.ramarray; __OSContEepromFormat eepromformat; int i; #if BUILD_VERSION < VERSION_J - for (i = 0; i < ARRLEN(__osEepPifRam.ramarray) + 1; i++) { - __osEepPifRam.ramarray[i] = CONT_CMD_NOP; + for (i = 0; i < ARRLEN(__osEepPifRam.raw); i++) { + __osEepPifRam.raw[i] = CONT_CMD_NOP; } #endif __osEepPifRam.pifstatus = CONT_CMD_EXE; @@ -86,8 +86,8 @@ s32 __osEepStatus(OSMesgQueue* mq, OSContStatus* data) { u8* ptr = (u8*) __osEepPifRam.ramarray; __OSContRequesFormat requestformat; - for (i = 0; i < ARRLEN(__osEepPifRam.ramarray) + 1; i++) { - __osEepPifRam.ramarray[i] = 0; + for (i = 0; i < ARRLEN(__osEepPifRam.raw); i++) { + __osEepPifRam.raw[i] = 0; } __osEepPifRam.pifstatus = CONT_CMD_EXE; diff --git a/src/libultra/io/contramread.c b/src/libultra/io/contramread.c index 40187298..3e513f31 100644 --- a/src/libultra/io/contramread.c +++ b/src/libultra/io/contramread.c @@ -139,8 +139,8 @@ static void __osPackRamReadData(int channel, u16 address) { ptr = (u8*) __osPfsPifRam.ramarray; #if BUILD_VERSION < VERSION_I - for (i = 0; i < 16; i++) { - __osPfsPifRam.ramarray[i] = 0; + for (i = 0; i < ARRLEN(__osPfsPifRam.raw); i++) { + __osPfsPifRam.raw[i] = 0; } #endif diff --git a/src/libultra/io/contramwrite.c b/src/libultra/io/contramwrite.c index 3f8323cb..c5608d09 100644 --- a/src/libultra/io/contramwrite.c +++ b/src/libultra/io/contramwrite.c @@ -145,8 +145,8 @@ static void __osPackRamWriteData(int channel, u16 address, u8* buffer) { ptr = (u8*) __osPfsPifRam.ramarray; #if BUILD_VERSION < VERSION_I - for (i = 0; i < 16; i++) { - __osPfsPifRam.ramarray[i] = 0; + for (i = 0; i < ARRLEN(__osPfsPifRam.raw); i++) { + __osPfsPifRam.raw[i] = 0; } #endif diff --git a/src/libultra/io/contreaddata.c b/src/libultra/io/contreaddata.c index f4c1cf67..61cf6e87 100644 --- a/src/libultra/io/contreaddata.c +++ b/src/libultra/io/contreaddata.c @@ -16,8 +16,8 @@ s32 osContStartReadData(OSMesgQueue* mq) { osRecvMesg(mq, NULL, OS_MESG_BLOCK); } - for (i = 0; i <= ARRLEN(__osContPifRam.ramarray); i++) { - __osContPifRam.ramarray[i] = 0xFF; + for (i = 0; i < ARRLEN(__osPfsPifRam.raw); i++) { + __osContPifRam.raw[i] = CONT_CMD_NOP; } __osContPifRam.pifstatus = 0; @@ -52,8 +52,8 @@ static void __osPackReadData(void) { __OSContReadFormat readformat; int i; - for (i = 0; i <= ARRLEN(__osContPifRam.ramarray); i++) { - __osContPifRam.ramarray[i] = 0; + for (i = 0; i < ARRLEN(__osPfsPifRam.raw); i++) { + __osContPifRam.raw[i] = 0; } __osContPifRam.pifstatus = CONT_CMD_EXE; diff --git a/src/libultra/io/controller.c b/src/libultra/io/controller.c index 07bb0438..ac2023fa 100644 --- a/src/libultra/io/controller.c +++ b/src/libultra/io/controller.c @@ -76,8 +76,8 @@ void __osPackRequestData(u8 cmd) { __OSContRequesFormat requestHeader; s32 i; - for (i = 0; i < 16; i++) { - __osContPifRam.ramarray[i] = 0; + for (i = 0; i < ARRLEN(__osPfsPifRam.raw); i++) { + __osContPifRam.raw[i] = 0; } __osContPifRam.pifstatus = CONT_CMD_READ_BUTTON; diff --git a/src/libultra/io/pfsisplug.c b/src/libultra/io/pfsisplug.c index d4b962d3..04c0db4a 100644 --- a/src/libultra/io/pfsisplug.c +++ b/src/libultra/io/pfsisplug.c @@ -57,8 +57,8 @@ void __osPfsRequestData(u8 cmd) { __osContLastCmd = cmd; #if BUILD_VERSION < VERSION_I - for (i = 0; i < 16; i++) { - __osPfsPifRam.ramarray[i] = 0; + for (i = 0; i < ARRLEN(__osPfsPifRam.raw); i++) { + __osPfsPifRam.raw[i] = 0; } __osPfsPifRam.pifstatus = CONT_CMD_EXE; #endif diff --git a/src/overlays/ovl_i5/fox_ti.c b/src/overlays/ovl_i5/fox_ti.c index 9f1786e4..0a0e8203 100644 --- a/src/overlays/ovl_i5/fox_ti.c +++ b/src/overlays/ovl_i5/fox_ti.c @@ -40,12 +40,8 @@ s32* D_i5_801BBEF0; f32* D_i5_801BBEF4; s32* D_i5_801BBEF8; UnkStruct_i5_801BBF00 D_i5_801BBF00[67]; -Vec3f D_i5_801BC978[8]; -Vec3f D_i5_801BC9D8[8]; -Vec3f D_i5_801BCA38[76]; -Vec3f D_i5_801BCDC8[8]; -Vec3f D_i5_801BCE28[8]; -Vec3f D_i5_801BCE88[76]; +Vec3f D_i5_801BC978[92]; +Vec3f D_i5_801BCDC8[92]; Vec3f D_i5_801BD218[92]; s16 D_i5_801BD668[34]; f32 D_i5_801BD6B0[34]; @@ -3116,12 +3112,12 @@ void Titania_80192118(Boss* boss) { boss->swork[1] = 1; break; case 1: - Animation_GetFrameData(&D_TI_A0002BC, 0, D_i5_801BC978); - Animation_GetFrameData(&D_TI_A0002BC, 0, D_i5_801BCDC8); - Animation_GetFrameData(&D_TI_A0002BC, 0, D_i5_801BC9D8); - Animation_GetFrameData(&D_TI_A0002BC, 0, D_i5_801BCE28); - Animation_GetFrameData(&D_TI_A000934, 0, D_i5_801BCA38); - Animation_GetFrameData(&D_TI_A000934, 0, D_i5_801BCE88); + Animation_GetFrameData(&D_TI_A0002BC, 0, &D_i5_801BC978[0]); + Animation_GetFrameData(&D_TI_A0002BC, 0, &D_i5_801BCDC8[0]); + Animation_GetFrameData(&D_TI_A0002BC, 0, &D_i5_801BC978[8]); + Animation_GetFrameData(&D_TI_A0002BC, 0, &D_i5_801BCDC8[8]); + Animation_GetFrameData(&D_TI_A000934, 0, &D_i5_801BC978[16]); + Animation_GetFrameData(&D_TI_A000934, 0, &D_i5_801BCDC8[16]); if ((gPlayer[0].unk_138 - boss->obj.pos.z) <= 450.0f) { gPlayer[0].unk_19C = -1; gPlayer[0].unk_000 = 0.0f; @@ -3258,28 +3254,28 @@ void Titania_80192118(Boss* boss) { Math_SmoothStepToF(&boss->vel.z, gPlayer[0].vel.z, 0.7f, 1.0f, 0.01f); Math_SmoothStepToF(&boss->obj.pos.x, gPlayer[0].pos.x, 0.1f, 6.0f, 0.01f); Math_SmoothStepToF(&boss->obj.pos.z, gPlayer[0].unk_138 - 450.0f, 0.1f, 1.0f, 0.01f); - Animation_GetFrameData(&D_TI_A000D50, D_i5_801BBEF0[24] >> 1, D_i5_801BCA38); + Animation_GetFrameData(&D_TI_A000D50, D_i5_801BBEF0[24] >> 1, &D_i5_801BC978[16]); switch (D_i5_801BBEF0[39]) { case 0: - Animation_GetFrameData(&D_TI_A000858, D_i5_801BBEF0[22] >> 1, D_i5_801BC978); + Animation_GetFrameData(&D_TI_A000858, D_i5_801BBEF0[22] >> 1, &D_i5_801BC978[0]); break; case 1: - Animation_GetFrameData(&D_TI_A00047C, D_i5_801BBEF0[22] >> 1, D_i5_801BC978); + Animation_GetFrameData(&D_TI_A00047C, D_i5_801BBEF0[22] >> 1, &D_i5_801BC978[0]); break; } switch (D_i5_801BBEF0[40]) { case 0: - Animation_GetFrameData(&D_TI_A000858, D_i5_801BBEF0[23] >> 1, D_i5_801BC9D8); + Animation_GetFrameData(&D_TI_A000858, D_i5_801BBEF0[23] >> 1, &D_i5_801BC978[8]); break; case 1: - Animation_GetFrameData(&D_TI_A00047C, D_i5_801BBEF0[23] >> 1, D_i5_801BC9D8); + Animation_GetFrameData(&D_TI_A00047C, D_i5_801BBEF0[23] >> 1, &D_i5_801BC978[8]); break; } - Math_SmoothStepToVec3fArray(D_i5_801BC978, D_i5_801BCDC8, 1, 8, 0.5f, 360.0f, 0.01f); - Math_SmoothStepToVec3fArray(D_i5_801BC9D8, D_i5_801BCE28, 1, 8, 0.5f, 360.0f, 0.01f); - Math_SmoothStepToVec3fArray(D_i5_801BCA38, D_i5_801BCE88, 1, 13, 0.5f, 5.0f, 0.01f); + Math_SmoothStepToVec3fArray(&D_i5_801BC978[0], &D_i5_801BCDC8[0], 1, 8, 0.5f, 360.0f, 0.01f); + Math_SmoothStepToVec3fArray(&D_i5_801BC978[8], &D_i5_801BCDC8[8], 1, 8, 0.5f, 360.0f, 0.01f); + Math_SmoothStepToVec3fArray(&D_i5_801BC978[16], &D_i5_801BCDC8[16], 1, 13, 0.5f, 5.0f, 0.01f); D_i5_801BBEF0[24]++; D_i5_801BBEF0[22]++; D_i5_801BBEF0[23]++; @@ -3388,13 +3384,13 @@ void Titania_80192118(Boss* boss) { break; case 4: boss->vel.z = gPlayer[0].vel.z; - Animation_GetFrameData(&D_TI_8000D80, D_i5_801BBEF0[22] >> 1, D_i5_801BC978); - Animation_GetFrameData(&D_TI_8000D80, D_i5_801BBEF0[23] >> 1, D_i5_801BC9D8); - Animation_GetFrameData(&D_TI_8000708, D_i5_801BBEF0[24] >> 1, D_i5_801BCA38); + Animation_GetFrameData(&D_TI_8000D80, D_i5_801BBEF0[22] >> 1, &D_i5_801BC978[0]); + Animation_GetFrameData(&D_TI_8000D80, D_i5_801BBEF0[23] >> 1, &D_i5_801BC978[8]); + Animation_GetFrameData(&D_TI_8000708, D_i5_801BBEF0[24] >> 1, &D_i5_801BC978[16]); Math_SmoothStepToF(&boss->fwork[0], 0.5f, 0.05f, 0.05f, 0.01f); - Math_SmoothStepToVec3fArray(D_i5_801BC978, D_i5_801BCDC8, 1, 8, boss->fwork[0], 360.0f, 0.01f); - Math_SmoothStepToVec3fArray(D_i5_801BC9D8, D_i5_801BCE28, 1, 8, boss->fwork[0], 360.0f, 0.01f); - Math_SmoothStepToVec3fArray(D_i5_801BCA38, D_i5_801BCE88, 1, 13, boss->fwork[0], 360.0f, 0.01f); + Math_SmoothStepToVec3fArray(&D_i5_801BC978[0], &D_i5_801BCDC8[0], 1, 8, boss->fwork[0], 360.0f, 0.01f); + Math_SmoothStepToVec3fArray(&D_i5_801BC978[8], &D_i5_801BCDC8[8], 1, 8, boss->fwork[0], 360.0f, 0.01f); + Math_SmoothStepToVec3fArray(&D_i5_801BC978[16], &D_i5_801BCDC8[16], 1, 13, boss->fwork[0], 360.0f, 0.01f); if (boss->timer_050 <= 120) { if (D_i5_801BBEF0[22] < ((Animation_GetFrameCount(&D_TI_8000D80) * 2) - 1)) { D_i5_801BBEF0[22]++; @@ -4964,18 +4960,18 @@ void Titania_801982A8(Boss* boss) { case 4: Matrix_Push(&gGfxMatrix); D_i5_801BBEF0[25] = 0; - Animation_DrawSkeleton(0, D_TI_A000EDC, D_i5_801BCE88, Titania_8018FC70, Titania_8019002C, boss, + Animation_DrawSkeleton(0, D_TI_A000EDC, &D_i5_801BCDC8[16], Titania_8018FC70, Titania_8019002C, boss, &gIdentityMatrix); Matrix_Pop(&gGfxMatrix); D_TI_801B83A8[0] = 22.0f; Matrix_Push(&gGfxMatrix); D_i5_801BBEF0[25] = 1; - Animation_DrawSkeleton(0, D_TI_A000568, D_i5_801BCDC8, Titania_801903A0, Titania_8019081C, boss, + Animation_DrawSkeleton(0, D_TI_A000568, &D_i5_801BCDC8[0], Titania_801903A0, Titania_8019081C, boss, &gIdentityMatrix); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); D_i5_801BBEF0[25] = 2; - Animation_DrawSkeleton(0, D_TI_A000568, D_i5_801BCE28, Titania_801903A0, Titania_8019081C, boss, + Animation_DrawSkeleton(0, D_TI_A000568, &D_i5_801BCDC8[8], Titania_801903A0, Titania_8019081C, boss, &gIdentityMatrix); Matrix_Pop(&gGfxMatrix); break; diff --git a/tools/Torch b/tools/Torch index 0cb23400..a72020cc 160000 --- a/tools/Torch +++ b/tools/Torch @@ -1 +1 @@ -Subproject commit 0cb23400b0ea1e443477ca2a764e9e74877c42b8 +Subproject commit a72020cca7f1498f73d42c71e694fd114843fe73 From 95e5f4f07aa17d9ff0cc61e9a7adff26ee4129ec Mon Sep 17 00:00:00 2001 From: petrie911 <69443847+petrie911@users.noreply.github.com> Date: Sat, 20 Apr 2024 17:07:29 -0500 Subject: [PATCH 032/151] Some further docs for audio spec and planet paths (#219) * avoid ub * format * torch * more stuff --- include/context.h | 2 +- include/sf64audio_external.h | 41 ++++++ include/sf64audio_provisional.h | 4 +- linker_scripts/us/symbol_addrs_engine.txt | 2 +- src/audio/audio_context.c | 115 ++++++++++++----- src/audio/audio_effects.c | 3 +- src/audio/audio_general.c | 16 +-- src/audio/audio_heap.c | 16 +-- src/audio/audio_load.c | 4 +- src/audio/audio_thread.c | 4 +- src/engine/fox_context.c | 4 +- src/engine/fox_load.c | 6 +- src/engine/fox_play.c | 8 +- src/overlays/ovl_i6/fox_andross.c | 2 +- src/overlays/ovl_menu/fox_map.c | 148 +++++++++++----------- src/overlays/ovl_menu/fox_option.c | 4 +- src/overlays/ovl_menu/fox_title.c | 10 +- 17 files changed, 243 insertions(+), 146 deletions(-) diff --git a/include/context.h b/include/context.h index 8c15ef63..85676cf0 100644 --- a/include/context.h +++ b/include/context.h @@ -52,7 +52,7 @@ extern s32 D_ctx_80177B50[7]; extern s32 D_ctx_80177B70[7]; extern PlanetId D_ctx_80177B90[7]; extern s32 D_ctx_80177BB0[7]; -extern s32 D_ctx_80177BD8[22]; // overruns D_ctx_80177C30? +extern s32 gPlanetPathStatus[22]; // overruns D_ctx_80177C30? extern s32 gPrevPlanetTeamShields[6]; extern s32 D_ctx_80177C58[6]; extern u8 gSoundMode; diff --git a/include/sf64audio_external.h b/include/sf64audio_external.h index 23ae1fba..190f09be 100644 --- a/include/sf64audio_external.h +++ b/include/sf64audio_external.h @@ -6,6 +6,47 @@ #define AUDIO_PLAY_SFX(sfxId, srcPos, token) (Audio_PlaySfx((sfxId),(srcPos),(token),&gDefaultMod,&gDefaultMod,&gDefaultReverb)) #define AUDIO_PLAY_BGM(seqId) Audio_PlaySequence(SEQ_PLAYER_BGM, (seqId), 0, -1) +#define AUDIO_SET_SPEC(sfxLayout, spec) Audio_SetAudioSpec(0, ((sfxLayout) << 8) | (spec)) +#define AUDIO_SET_SPEC_ALT(sfxLayout, spec) Audio_SetAudioSpec((sfxLayout), ((sfxLayout) << 8) | (spec)) + +typedef enum { + /* 0 */ SFXCHAN_0, + /* 1 */ SFXCHAN_1, + /* 2 */ SFXCHAN_2, + /* 3 */ SFXCHAN_3 +} SfxChannelLayout; + +typedef enum { + /* 0 */ AUDIOSPEC_0, + /* 1 */ AUDIOSPEC_1, + /* 2 */ AUDIOSPEC_2, + /* 3 */ AUDIOSPEC_3, + /* 4 */ AUDIOSPEC_4, + /* 5 */ AUDIOSPEC_5, + /* 6 */ AUDIOSPEC_6, + /* 7 */ AUDIOSPEC_7, + /* 8 */ AUDIOSPEC_8, + /* 9 */ AUDIOSPEC_9, + /* 10 */ AUDIOSPEC_10, + /* 11 */ AUDIOSPEC_11, + /* 12 */ AUDIOSPEC_12, + /* 13 */ AUDIOSPEC_13, + /* 14 */ AUDIOSPEC_14, + /* 15 */ AUDIOSPEC_15, + /* 16 */ AUDIOSPEC_16, + /* 17 */ AUDIOSPEC_17, + /* 18 */ AUDIOSPEC_18, + /* 19 */ AUDIOSPEC_19, + /* 20 */ AUDIOSPEC_20, + /* 21 */ AUDIOSPEC_21, + /* 22 */ AUDIOSPEC_22, + /* 23 */ AUDIOSPEC_23, + /* 24 */ AUDIOSPEC_24, + /* 25 */ AUDIOSPEC_25, + /* 26 */ AUDIOSPEC_26, + /* 27 */ AUDIOSPEC_27, + /* 28 */ AUDIOSPEC_28, +} AudioSpecID; typedef enum { /* 0 */ SOUNDMODE_STEREO, diff --git a/include/sf64audio_provisional.h b/include/sf64audio_provisional.h index cd9e95ed..8cece3a1 100644 --- a/include/sf64audio_provisional.h +++ b/include/sf64audio_provisional.h @@ -593,7 +593,7 @@ typedef struct { */ typedef struct { /* 0x00 */ u32 samplingFrequency; // Target sampling rate in Hz - /* 0x04 */ u8 unk_04; + /* 0x04 */ u8 numBuffers; /* 0x05 */ u8 numNotes; /* 0x06 */ u8 numReverbs; /* 0x08 */ ReverbSettings* reverbSettings; @@ -617,7 +617,7 @@ typedef struct { * processing audio commands. This struct parameterizes that buffer. */ typedef struct { - /* 0x00 */ s16 specUnk4; + /* 0x00 */ s16 count; /* 0x02 */ u16 samplingFrequency; // Target sampling rate in Hz /* 0x04 */ u16 aiSamplingFrequency; // True sampling rate of the audio interface (AI), see `osAiSetFrequency` /* 0x06 */ s16 samplesPerFrameTarget; diff --git a/linker_scripts/us/symbol_addrs_engine.txt b/linker_scripts/us/symbol_addrs_engine.txt index 01774f52..86fb770e 100644 --- a/linker_scripts/us/symbol_addrs_engine.txt +++ b/linker_scripts/us/symbol_addrs_engine.txt @@ -517,7 +517,7 @@ D_ctx_80177B70 = 0x80177B70; D_ctx_80177B90 = 0x80177B90; D_ctx_80177BB0 = 0x80177BB0; gControllerRumbleTimers = 0x80177BD0; -D_ctx_80177BD8 = 0x80177BD8; +gPlanetPathStatus = 0x80177BD8; D_ctx_80177C30 = 0x80177C30; D_ctx_80177C50 = 0x80177C50; D_ctx_80177C58 = 0x80177C58; diff --git a/src/audio/audio_context.c b/src/audio/audio_context.c index 347238e5..80da89e0 100644 --- a/src/audio/audio_context.c +++ b/src/audio/audio_context.c @@ -144,35 +144,92 @@ static ReverbSettings D_800C76A8[] = { { 1, 0x30, 0x4FFF, 0, 0 }, }; AudioSpec gAudioSpecs[] = { - { 0x7D00, 2, 0x16, 2, D_800C74D0, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, 0x35000 }, - { 0x7D00, 2, 0x16, 2, D_800C74E0, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, 0x35000 }, - { 0x7D00, 2, 0x16, 2, D_800C74F0, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, 0x35000 }, - { 0x7D00, 2, 0x16, 2, D_800C7500, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, 0x35000 }, - { 0x7D00, 2, 0x16, 2, D_800C7510, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, 0x35000 }, - { 0x7D00, 2, 0x16, 2, D_800C7520, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, 0x35000 }, - { 0x7D00, 2, 0x16, 2, D_800C7530, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, 0x35000 }, - { 0x7D00, 2, 0x16, 2, D_800C7540, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, 0x35000 }, - { 0x7D00, 2, 0x16, 2, D_800C7550, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, 0x35000 }, - { 0x7D00, 2, 0x16, 2, D_800C7560, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, 0x35000 }, - { 0x7D00, 2, 0x16, 2, D_800C7570, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, 0x35000 }, - { 0x7D00, 2, 0x16, 2, D_800C7580, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, 0x35000 }, - { 0x7D00, 1, 0x16, 2, D_800C7590, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x2B000, 0x35000 }, - { 0x7D00, 2, 0x16, 2, D_800C75A0, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, 0x35000 }, - { 0x7D00, 2, 0x16, 2, D_800C75B0, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, 0x35000 }, - { 0x7D00, 2, 0x16, 3, D_800C75C0, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, 0x34000 }, - { 0x7D00, 2, 0x16, 2, D_800C75D8, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, 0x35000 }, - { 0x7D00, 2, 0x16, 2, D_800C75E8, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, 0x35000 }, - { 0x7D00, 2, 0x16, 2, D_800C75F8, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, 0x35000 }, - { 0x7D00, 2, 0x16, 2, D_800C7608, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, 0x35000 }, - { 0x7D00, 2, 0x16, 2, D_800C7618, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, 0x35000 }, - { 0x7D00, 2, 0x20, 2, D_800C7628, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, 0 }, - { 0x7D00, 1, 0x20, 2, D_800C7638, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, 0 }, - { 0x7D00, 1, 0x20, 2, D_800C7648, 0x7FFF, 0x1200, 0xA000, 0, 0x5B00, 0x1D00, 0, 0, 0 }, - { 0x7D00, 1, 0x16, 2, D_800C7658, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0, 0x60000 }, - { 0x7D00, 2, 0x16, 2, D_800C7668, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, 0 }, - { 0x7D00, 2, 0x16, 2, D_800C7678, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, 0 }, - { 0x7D00, 2, 0x20, 2, D_800C7688, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, 0 }, - { 0x7D00, 2, 0x16, 2, D_800C74D0, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, 0x35000 }, + /* 0 */ { 32000, 2, 22, ARRAY_COUNT(D_800C74D0), D_800C74D0, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, + 0x35000 }, + /* 1 */ + { 32000, 2, 22, ARRAY_COUNT(D_800C74E0), D_800C74E0, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, + 0x35000 }, + /* 2 */ + { 32000, 2, 22, ARRAY_COUNT(D_800C74F0), D_800C74F0, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, + 0x35000 }, + /* 3 */ + { 32000, 2, 22, ARRAY_COUNT(D_800C7500), D_800C7500, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, + 0x35000 }, + /* 4 */ + { 32000, 2, 22, ARRAY_COUNT(D_800C7510), D_800C7510, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, + 0x35000 }, + /* 5 */ + { 32000, 2, 22, ARRAY_COUNT(D_800C7520), D_800C7520, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, + 0x35000 }, + /* 6 */ + { 32000, 2, 22, ARRAY_COUNT(D_800C7530), D_800C7530, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, + 0x35000 }, + /* 7 */ + { 32000, 2, 22, ARRAY_COUNT(D_800C7540), D_800C7540, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, + 0x35000 }, + /* 8 */ + { 32000, 2, 22, ARRAY_COUNT(D_800C7550), D_800C7550, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, + 0x35000 }, + /* 9 */ + { 32000, 2, 22, ARRAY_COUNT(D_800C7560), D_800C7560, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, + 0x35000 }, + /* 10 */ + { 32000, 2, 22, ARRAY_COUNT(D_800C7570), D_800C7570, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, + 0x35000 }, + /* 11 */ + { 32000, 2, 22, ARRAY_COUNT(D_800C7580), D_800C7580, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, + 0x35000 }, + /* 12 */ + { 32000, 1, 22, ARRAY_COUNT(D_800C7590), D_800C7590, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x2B000, + 0x35000 }, + /* 13 */ + { 32000, 2, 22, ARRAY_COUNT(D_800C75A0), D_800C75A0, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, + 0x35000 }, + /* 14 */ + { 32000, 2, 22, ARRAY_COUNT(D_800C75B0), D_800C75B0, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, + 0x35000 }, + /* 15 */ + { 32000, 2, 22, ARRAY_COUNT(D_800C75C0), D_800C75C0, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, + 0x34000 }, + /* 16 */ + { 32000, 2, 22, ARRAY_COUNT(D_800C75D8), D_800C75D8, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, + 0x35000 }, + /* 17 */ + { 32000, 2, 22, ARRAY_COUNT(D_800C75E8), D_800C75E8, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, + 0x35000 }, + /* 18 */ + { 32000, 2, 22, ARRAY_COUNT(D_800C75F8), D_800C75F8, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, + 0x35000 }, + /* 19 */ + { 32000, 2, 22, ARRAY_COUNT(D_800C7608), D_800C7608, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, + 0x35000 }, + /* 20 */ + { 32000, 2, 22, ARRAY_COUNT(D_800C7618), D_800C7618, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, + 0x35000 }, + /* 21 */ + { 32000, 2, 32, ARRAY_COUNT(D_800C7628), D_800C7628, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, + 0x00000 }, + /* 22 */ + { 32000, 1, 32, ARRAY_COUNT(D_800C7638), D_800C7638, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, + 0x00000 }, + /* 23 */ + { 32000, 1, 32, ARRAY_COUNT(D_800C7648), D_800C7648, 0x7FFF, 0x1200, 0xA000, 0, 0x5B00, 0x1D00, 0, 0x00000, + 0x00000 }, + /* 24 */ + { 32000, 1, 22, ARRAY_COUNT(D_800C7658), D_800C7658, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x00000, + 0x60000 }, + /* 25 */ + { 32000, 2, 22, ARRAY_COUNT(D_800C7668), D_800C7668, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, + 0x00000 }, + /* 26 */ + { 32000, 2, 22, ARRAY_COUNT(D_800C7678), D_800C7678, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, + 0x00000 }, + /* 27 */ + { 32000, 2, 32, ARRAY_COUNT(D_800C7688), D_800C7688, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, + 0x00000 }, + /* 28 */ + { 32000, 2, 22, ARRAY_COUNT(D_800C74D0), D_800C74D0, 0x7FFF, 0x1200, 0x1100, 0, 0x5000, 0x2400, 0, 0x1B000, + 0x35000 }, }; s32 D_800C7C28 = 0x20000000; // unused? s16 gSeqTicksPerBeat = 0x30; diff --git a/src/audio/audio_effects.c b/src/audio/audio_effects.c index 652686c7..925de24e 100644 --- a/src/audio/audio_effects.c +++ b/src/audio/audio_effects.c @@ -215,8 +215,7 @@ f32 func_80013B90(AdsrState* adsr) { break; default: if (adsr->delay >= 4) { - adsr->delay = - (adsr->delay * gAudioBufferParams.ticksPerUpdate / gAudioBufferParams.specUnk4) / 4; + adsr->delay = (adsr->delay * gAudioBufferParams.ticksPerUpdate / gAudioBufferParams.count) / 4; } if (adsr->delay == 0) { adsr->delay = 1; diff --git a/src/audio/audio_general.c b/src/audio/audio_general.c index 0c10d4f9..67f061fa 100644 --- a/src/audio/audio_general.c +++ b/src/audio/audio_general.c @@ -82,7 +82,7 @@ u8 sSeqCmdWritePos = 0; u8 sSeqCmdReadPos = 0; u8 sStartSeqDisabled = 0; u8 sSoundModeList[4] = { SOUNDMODE_STEREO, SOUNDMODE_HEADSET, SOUNDMODE_SURROUND, SOUNDMODE_MONO }; -u8 sNewAudioSpecId = 0; +u8 sNewAudioSpecId = AUDIOSPEC_0; u8 D_800C5D58 = 0; s32 D_800C5D5C = 0; // unused. file split? s8 sBaseReverb = 0; @@ -751,7 +751,7 @@ void func_80017494(void) { } void func_80017550(void) { - if (sNewAudioSpecId == 12) { + if (sNewAudioSpecId == AUDIOSPEC_12) { AUDIOCMD_GLOBAL_SYNC_LOAD_SEQ_PARTS(14, 0); } } @@ -2684,7 +2684,7 @@ void Audio_PlayFanfare(u16 seqId, u8 bgmVolume, u8 bgmFadeoutTime, u8 bgmFadeinT void func_8001D520(void) { u8 i; - if (sNewAudioSpecId == 24) { + if (sNewAudioSpecId == AUDIOSPEC_24) { Audio_ClearVoice(); func_8001D6DC(0); AUDIO_PLAY_SFX(0x0903F004, gDefaultSfxSource, 4); @@ -2840,9 +2840,9 @@ void func_8001DD40(void) { u16 sp1E = 1; Audio_StartSequence(SEQ_PLAYER_VOICE, SEQ_ID_VOICE, 0xFF, 1); - if (sNewAudioSpecId == 12) { + if (sNewAudioSpecId == AUDIOSPEC_12) { sp1E = 360; - } else if (sNewAudioSpecId < 23) { + } else if (sNewAudioSpecId < AUDIOSPEC_23) { sp1E = 90; } Audio_StartSequence(SEQ_PLAYER_SFX, SEQ_ID_SFX, 0xFF, sp1E); @@ -2860,11 +2860,11 @@ void func_8001DD40(void) { } void func_8001DE1C(u8 oldSpecId) { - if (oldSpecId == 16) { - if ((sNewAudioSpecId == 22) || (sNewAudioSpecId == 23)) { + if (oldSpecId == AUDIOSPEC_16) { + if ((sNewAudioSpecId == AUDIOSPEC_22) || (sNewAudioSpecId == AUDIOSPEC_23)) { D_800C5D58 = 2; } - } else if ((oldSpecId == 28) && (sNewAudioSpecId == 23)) { + } else if ((oldSpecId == AUDIOSPEC_28) && (sNewAudioSpecId == AUDIOSPEC_23)) { D_800C5D58 = 2; } else { D_800C5D58 = 1; diff --git a/src/audio/audio_heap.c b/src/audio/audio_heap.c index df30ca33..6ae13ba7 100644 --- a/src/audio/audio_heap.c +++ b/src/audio/audio_heap.c @@ -535,7 +535,7 @@ void AudioHeap_UpdateReverbs(void) { s32 count; s32 reverbIndex; - if (gAudioBufferParams.specUnk4 == 2) { + if (gAudioBufferParams.count == 2) { count = 2; } else { count = 1; @@ -563,7 +563,7 @@ s32 AudioHeap_ResetStep(void) { s32 j; s32 sp24; - if (gAudioBufferParams.specUnk4 == 2) { + if (gAudioBufferParams.count == 2) { sp24 = 2; } else { sp24 = 1; @@ -665,12 +665,12 @@ void AudioHeap_Init(void) { gNumNotes = spec->numNotes; D_8014C1B0 = spec->unk_14; gMaxTempo = (u16) ((gAudioBufferParams.ticksPerUpdate * 2880000.0f / gSeqTicksPerBeat) / gMaxTempoTvTypeFactors); - gAudioBufferParams.specUnk4 = spec->unk_04; - gAudioBufferParams.samplesPerFrameTarget *= gAudioBufferParams.specUnk4; - gAudioBufferParams.maxAiBufferLength *= gAudioBufferParams.specUnk4; - gAudioBufferParams.minAiBufferLength *= gAudioBufferParams.specUnk4; - gAudioBufferParams.ticksPerUpdate *= gAudioBufferParams.specUnk4; - if (gAudioBufferParams.specUnk4 >= 2) { + gAudioBufferParams.count = spec->numBuffers; + gAudioBufferParams.samplesPerFrameTarget *= gAudioBufferParams.count; + gAudioBufferParams.maxAiBufferLength *= gAudioBufferParams.count; + gAudioBufferParams.minAiBufferLength *= gAudioBufferParams.count; + gAudioBufferParams.ticksPerUpdate *= gAudioBufferParams.count; + if (gAudioBufferParams.count >= 2) { gAudioBufferParams.maxAiBufferLength -= 0x10; } gMaxAudioCmds = (gNumNotes * 0x14 * gAudioBufferParams.ticksPerUpdate) + (spec->numReverbs * 0x20) + 0x1E0; diff --git a/src/audio/audio_load.c b/src/audio/audio_load.c index 72b07400..a86837e6 100644 --- a/src/audio/audio_load.c +++ b/src/audio/audio_load.c @@ -157,7 +157,7 @@ void AudioLoad_InitSampleDmaBuffers(s32 numNotes) { u8* dma; gSampleDmaBuffSize = 0x2D0; - for (i = 0; i < (3 * gNumNotes * gAudioBufferParams.specUnk4); i++) { + for (i = 0; i < (3 * gNumNotes * gAudioBufferParams.count); i++) { dma = AudioHeap_Alloc(&gMiscPool, gSampleDmaBuffSize); gSampleDmas[gSampleDmaCount].ramAddr = dma; if (dma == NULL) { @@ -876,7 +876,7 @@ void AudioLoad_Init(void) { gAiBuffers[i][j] = 0; } } - gAudioSpecId = 0; + gAudioSpecId = AUDIOSPEC_0; gResetStatus = 1; AudioHeap_ResetStep(); gSequenceTable = &gSeqTableInit; diff --git a/src/audio/audio_thread.c b/src/audio/audio_thread.c index 8d383393..e8c067b9 100644 --- a/src/audio/audio_thread.c +++ b/src/audio/audio_thread.c @@ -54,7 +54,7 @@ SPTask* AudioThread_CreateTask(void) { s32 pad30; gAudioTaskCountQ++; - if ((gAudioTaskCountQ % gAudioBufferParams.specUnk4) != 0) { + if ((gAudioTaskCountQ % gAudioBufferParams.count) != 0) { return gWaitingAudioTask; } osSendMesg(gAudioTaskStartQueue, (OSMesg) gAudioTaskCountQ, 0); @@ -142,7 +142,7 @@ SPTask* AudioThread_CreateTask(void) { gMaxAbiCmdCnt = sp50; } - if (gAudioBufferParams.specUnk4 == 1) { + if (gAudioBufferParams.count == 1) { return gAudioCurTask; } else { gWaitingAudioTask = gAudioCurTask; diff --git a/src/engine/fox_context.c b/src/engine/fox_context.c index 0c17bcd8..aaf71bc6 100644 --- a/src/engine/fox_context.c +++ b/src/engine/fox_context.c @@ -51,9 +51,9 @@ s32 D_ctx_80177B70[7]; PlanetId D_ctx_80177B90[7]; s32 D_ctx_80177BB0[7]; #ifdef AVOID_UB -s32 D_ctx_80177BD8[24]; +s32 gPlanetPathStatus[24]; #else -s32 D_ctx_80177BD8[22]; // overruns gPrevPlanetTeamShields? +s32 gPlanetPathStatus[22]; // overruns gPrevPlanetTeamShields? #endif s32 gPrevPlanetTeamShields[6]; s32 D_ctx_80177C58[6]; diff --git a/src/engine/fox_load.c b/src/engine/fox_load.c index 556a6c50..10081372 100644 --- a/src/engine/fox_load.c +++ b/src/engine/fox_load.c @@ -100,7 +100,7 @@ u8 Overlay_Load(u8 ovlSetup, u8 ovlStage) { case OVL_SETUP_TITLE: changeOvl = Overlay_Init(&sOvlmenu_Title[ovlStage]); if (changeOvl == true) { - Audio_SetAudioSpec(0, 0x16); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_22); } break; case OVL_SETUP_MENU: @@ -175,13 +175,13 @@ u8 Overlay_Load(u8 ovlSetup, u8 ovlStage) { case OVL_SETUP_VERSUS: changeOvl = Overlay_Init(&sOvli2_Versus[ovlStage]); if (changeOvl == true) { - Audio_SetAudioSpec(3, 0x310); + AUDIO_SET_SPEC_ALT(SFXCHAN_3, AUDIOSPEC_16); } break; case OVL_SETUP_LOGO: changeOvl = Overlay_Init(&sNoOvl_Logo[ovlStage]); // Logo does not load an overlay file if (changeOvl == true) { - Audio_SetAudioSpec(0, 0xE); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_14); } break; case OVL_SETUP_CREDITS: diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index eacb4b2a..5a35483e 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -2371,17 +2371,17 @@ void func_play_800AB334(void) { switch (gCurrentLevel) { case LEVEL_TRAINING: - Audio_SetAudioSpec(0, 28); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_28); D_ctx_8017796C = -1; break; case LEVEL_VENOM_1: - Audio_SetAudioSpec(0, 6); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_6); break; case LEVEL_VENOM_2: - Audio_SetAudioSpec(0, 6); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_6); break; case LEVEL_VENOM_ANDROSS: - Audio_SetAudioSpec(0, 15); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_15); Audio_SetBaseSfxReverb(0); D_ctx_8017796C = -1; break; diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index 4a46719b..a1dd4acd 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -3947,7 +3947,7 @@ void Andross_80193C4C(Player* player) { gNextGameState = GSTATE_ENDING; D_ending_80196D00 = 0; D_play_800D3180[LEVEL_VENOM_ANDROSS] = Play_CheckMedalStatus(200) + 1; - Audio_SetAudioSpec(0, 0x1B); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_27); } } break; diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index 7c412a6c..a8beb028 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -1154,7 +1154,7 @@ void Map_801A5E80(void); void Map_801A6368(void); void Map_801A61B4(LevelId level); bool Map_801A62FC(PlanetId planet); -s32 Map_801A655C(PlanetId start, PlanetId end); +s32 Map_GetPathId(PlanetId start, PlanetId end); void Map_801A6628(void); void Map_801A6694(void); void Map_801A68E4(void); @@ -1266,7 +1266,7 @@ void Map_8019E99C(void) { s32 i; s32 j; - Audio_SetAudioSpec(0, 0x118); + AUDIO_SET_SPEC(SFXCHAN_1, AUDIOSPEC_24); gVIsPerFrame = 2; gGameFrameCount = 0; @@ -1534,12 +1534,12 @@ void Map_8019F42C(void) { if (gCurrentPlanet != 0) { for (i = 0; i < gCurrentPlanet; i++) { - D_menu_801CD8E0[i] = Map_801A655C(D_ctx_80177B90[i], D_ctx_80177B90[i + 1]); + D_menu_801CD8E0[i] = Map_GetPathId(D_ctx_80177B90[i], D_ctx_80177B90[i + 1]); } } for (i = 0; i < 24; i++) { - D_ctx_80177BD8[i] = 0; + gPlanetPathStatus[i] = 0; } for (i = 0; i < 15; i++) { @@ -1550,7 +1550,7 @@ void Map_8019F42C(void) { D_menu_801CD9AC = 0; - Audio_SetAudioSpec(0, 0x19); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_25); D_menu_801CD948 = 0; D_menu_801CD94C = 0; @@ -1586,7 +1586,7 @@ void Map_8019F600(void) { D_menu_801CD970 = 0; for (i = 0; i < 24; i++) { - D_ctx_80177BD8[i] = 0; + gPlanetPathStatus[i] = 0; gTexturedLines[i].unk_24 = 0.0f; } @@ -1616,10 +1616,10 @@ void Map_8019F600(void) { D_menu_801CD9B4 = 0.01f; D_menu_801CD944 = 0; - sp18 = Map_801A655C(sCurrentPlanetId, sPlanets[sCurrentPlanetId].dest1); - temp_t4 = Map_801A655C(sCurrentPlanetId, sPlanets[sCurrentPlanetId].dest2); - D_ctx_80177BD8[sp18] = 1; - D_ctx_80177BD8[temp_t4] = 1; + sp18 = Map_GetPathId(sCurrentPlanetId, sPlanets[sCurrentPlanetId].dest1); + temp_t4 = Map_GetPathId(sCurrentPlanetId, sPlanets[sCurrentPlanetId].dest2); + gPlanetPathStatus[sp18] = 1; + gPlanetPathStatus[temp_t4] = 1; } void Map_8019F83C(void) { @@ -1628,12 +1628,12 @@ void Map_8019F83C(void) { D_menu_801CD970 = 0; for (i = 0; i < 24; i++) { - if ((D_ctx_80177BD8[i] == 4) || (D_ctx_80177BD8[i] == 5) || (D_ctx_80177BD8[i] == 1) || - (D_ctx_80177BD8[i] == 11)) { - D_ctx_80177BD8[i] = 0; + if ((gPlanetPathStatus[i] == 4) || (gPlanetPathStatus[i] == 5) || (gPlanetPathStatus[i] == 1) || + (gPlanetPathStatus[i] == 11)) { + gPlanetPathStatus[i] = 0; } - if (D_ctx_80177BD8[i] == 6) { + if (gPlanetPathStatus[i] == 6) { sPaths[i].unk_14 = 5; } @@ -1889,7 +1889,7 @@ void Map_801A01A8(void) { if (D_menu_801CD974 && D_menu_801CD944 != 0) { for (i = 0; i < 24; i++) { - if (D_ctx_80177BD8[i] == 0) { + if (gPlanetPathStatus[i] == 0) { continue; } if (sPaths[i].alpha == 0) { @@ -2698,7 +2698,7 @@ void Map_801A2674(void) { } for (i = 0; i < 24; i++) { - if (D_ctx_80177BD8[i] == 0) { + if (gPlanetPathStatus[i] == 0) { continue; } @@ -2778,13 +2778,13 @@ void Map_801A281C(void) { D_menu_801CEEE8[7].y = D_menu_801CEEE8[6].y; D_menu_801CEEE8[7].z = D_menu_801CEEE8[6].z; - D_menu_801CEECC = Map_801A655C(sCurrentPlanetId, sNextPlanetId); + D_menu_801CEECC = Map_GetPathId(sCurrentPlanetId, sNextPlanetId); if (D_menu_801CD93C == 2) { - D_ctx_80177BD8[D_menu_801CEECC] = 5; + gPlanetPathStatus[D_menu_801CEECC] = 5; sPaths[D_menu_801CEECC].unk_14 = 5; } else { - D_ctx_80177BD8[D_menu_801CEECC] = 2; + gPlanetPathStatus[D_menu_801CEECC] = 2; sPaths[D_menu_801CEECC].unk_14 = 1; } } @@ -2945,7 +2945,7 @@ void Map_801A2EB8(void) { } for (i = 0; i < 24; i++) { - if (D_ctx_80177BD8[i] == 0) { + if (gPlanetPathStatus[i] == 0) { continue; } sPaths[i].alpha += 16; @@ -2995,16 +2995,16 @@ void Map_801A2EB8(void) { D_menu_801CEED4 = -1; if (sPlanets[sNextPlanetId].dest1 != PLANET_NONE) { - temp1 = Map_801A655C(sNextPlanetId, sPlanets[sNextPlanetId].dest1); - D_ctx_80177BD8[temp1] = 1; + temp1 = Map_GetPathId(sNextPlanetId, sPlanets[sNextPlanetId].dest1); + gPlanetPathStatus[temp1] = 1; sPaths[temp1].alpha = 255; D_menu_801CEED4 = temp1; } D_menu_801CEED0 = -1; if (sPlanets[sNextPlanetId].dest2 != PLANET_NONE) { - temp2 = Map_801A655C(sNextPlanetId, sPlanets[sNextPlanetId].dest2); - D_ctx_80177BD8[temp2] = 1; + temp2 = Map_GetPathId(sNextPlanetId, sPlanets[sNextPlanetId].dest2); + gPlanetPathStatus[temp2] = 1; sPaths[temp2].alpha = 255; D_menu_801CEED0 = temp2; } @@ -3352,10 +3352,10 @@ void Map_801A4394(void) { if ((sPaths[D_menu_801CD8E0[D_menu_801CD9AC]].type == 3) || (sPaths[D_menu_801CD8E0[D_menu_801CD9AC]].type == 4)) { - D_ctx_80177BD8[D_menu_801CD8E0[D_menu_801CD9AC]] = 5; + gPlanetPathStatus[D_menu_801CD8E0[D_menu_801CD9AC]] = 5; sPaths[D_menu_801CD8E0[D_menu_801CD9AC]].unk_14 = 5; } else { - D_ctx_80177BD8[D_menu_801CD8E0[D_menu_801CD9AC]] = 2; + gPlanetPathStatus[D_menu_801CD8E0[D_menu_801CD9AC]] = 2; sPaths[D_menu_801CD8E0[D_menu_801CD9AC]].unk_14 = 0; } @@ -3366,8 +3366,8 @@ void Map_801A4394(void) { break; case 2: - if ((D_ctx_80177BD8[D_menu_801CD8E0[D_menu_801CD9AC]] == 3) || - (D_ctx_80177BD8[D_menu_801CD8E0[D_menu_801CD9AC]] == 6)) { + if ((gPlanetPathStatus[D_menu_801CD8E0[D_menu_801CD9AC]] == 3) || + (gPlanetPathStatus[D_menu_801CD8E0[D_menu_801CD9AC]] == 6)) { D_menu_801CD9AC++; D_menu_801CD94C = 1; } @@ -3633,20 +3633,20 @@ void Map_801A4FC4(void) { gBombCount[gPlayerNum] = 3; if (sPlanets[sCurrentPlanetId].dest1 != PLANET_NONE) { - temp2 = Map_801A655C(sCurrentPlanetId, sPlanets[sCurrentPlanetId].dest1); - D_ctx_80177BD8[temp2] = 0; + temp2 = Map_GetPathId(sCurrentPlanetId, sPlanets[sCurrentPlanetId].dest1); + gPlanetPathStatus[temp2] = 0; sPaths[temp2].alpha = 0; } if (sPlanets[sCurrentPlanetId].dest2 != PLANET_NONE) { - temp = Map_801A655C(sCurrentPlanetId, sPlanets[sCurrentPlanetId].dest2); - D_ctx_80177BD8[temp] = 0; + temp = Map_GetPathId(sCurrentPlanetId, sPlanets[sCurrentPlanetId].dest2); + gPlanetPathStatus[temp] = 0; sPaths[temp].alpha = 0; } if (sPlanets[sCurrentPlanetId].warp != PLANET_NONE) { - temp = Map_801A655C(sCurrentPlanetId, sPlanets[sCurrentPlanetId].warp); - D_ctx_80177BD8[temp] = 0; + temp = Map_GetPathId(sCurrentPlanetId, sPlanets[sCurrentPlanetId].warp); + gPlanetPathStatus[temp] = 0; sPaths[temp].alpha = 0; } @@ -3669,20 +3669,20 @@ void Map_801A4FC4(void) { sCurrentPlanetId = D_menu_801CD950; if (sPlanets[sCurrentPlanetId].dest1 != PLANET_NONE) { - temp2 = Map_801A655C(sCurrentPlanetId, sPlanets[sCurrentPlanetId].dest1); - D_ctx_80177BD8[temp2] = 1; + temp2 = Map_GetPathId(sCurrentPlanetId, sPlanets[sCurrentPlanetId].dest1); + gPlanetPathStatus[temp2] = 1; sPaths[temp2].alpha = 255; } if (sPlanets[sCurrentPlanetId].dest2 != PLANET_NONE) { - temp = Map_801A655C(sCurrentPlanetId, sPlanets[sCurrentPlanetId].dest2); - D_ctx_80177BD8[temp] = 1; + temp = Map_GetPathId(sCurrentPlanetId, sPlanets[sCurrentPlanetId].dest2); + gPlanetPathStatus[temp] = 1; sPaths[temp].alpha = 255; } if (sPlanets[sCurrentPlanetId].warp != PLANET_NONE) { - temp = Map_801A655C(sCurrentPlanetId, sPlanets[sCurrentPlanetId].warp); - D_ctx_80177BD8[temp] = 0; + temp = Map_GetPathId(sCurrentPlanetId, sPlanets[sCurrentPlanetId].warp); + gPlanetPathStatus[temp] = 0; sPaths[temp].alpha = 0; } @@ -3696,18 +3696,18 @@ void Map_801A53C8(void) { D_menu_801CEFD8 ^= 1; if (sPlanets[sCurrentPlanetId].dest1 != PLANET_NONE) { - temp2 = Map_801A655C(sCurrentPlanetId, sPlanets[sCurrentPlanetId].dest1); - D_ctx_80177BD8[temp2] = 0; + temp2 = Map_GetPathId(sCurrentPlanetId, sPlanets[sCurrentPlanetId].dest1); + gPlanetPathStatus[temp2] = 0; sPaths[temp2].alpha = 0; } if (sPlanets[sCurrentPlanetId].dest2 != PLANET_NONE) { - temp = Map_801A655C(sCurrentPlanetId, sPlanets[sCurrentPlanetId].dest2); - D_ctx_80177BD8[temp] = 0; + temp = Map_GetPathId(sCurrentPlanetId, sPlanets[sCurrentPlanetId].dest2); + gPlanetPathStatus[temp] = 0; sPaths[temp].alpha = 0; } - D_ctx_80177BD8[D_menu_801CEECC] = 0; + gPlanetPathStatus[D_menu_801CEECC] = 0; sPaths[D_menu_801CEECC].alpha = 0; sPaths[D_menu_801CEECC].unk_14 = 0; @@ -3728,16 +3728,16 @@ void Map_801A53C8(void) { sNextPlanetId = sPlanets[sCurrentPlanetId].dest1; } - D_menu_801CEECC = Map_801A655C(sCurrentPlanetId, sNextPlanetId); + D_menu_801CEECC = Map_GetPathId(sCurrentPlanetId, sNextPlanetId); sPaths[D_menu_801CEECC].alpha = 255; - D_ctx_80177BD8[D_menu_801CEECC] = 3; + gPlanetPathStatus[D_menu_801CEECC] = 3; sPaths[D_menu_801CEECC].unk_14 = 2; if ((sPaths[D_menu_801CEECC].type == PL_WARP_YLW) || (sPaths[D_menu_801CEECC].type == PL_WARP_RED)) { - D_ctx_80177BD8[D_menu_801CEECC] = 5; + gPlanetPathStatus[D_menu_801CEECC] = 5; sPaths[D_menu_801CEECC].unk_14 = 5; } @@ -3752,14 +3752,14 @@ void Map_801A53C8(void) { Map_801A6368(); if (sPlanets[sNextPlanetId].dest1 != PLANET_NONE) { - temp2 = Map_801A655C(sNextPlanetId, sPlanets[sNextPlanetId].dest1); - D_ctx_80177BD8[temp2] = 1; + temp2 = Map_GetPathId(sNextPlanetId, sPlanets[sNextPlanetId].dest1); + gPlanetPathStatus[temp2] = 1; sPaths[temp2].alpha = 255; } if (sPlanets[sNextPlanetId].dest2 != PLANET_NONE) { - temp = Map_801A655C(sNextPlanetId, sPlanets[sNextPlanetId].dest2); - D_ctx_80177BD8[temp] = 1; + temp = Map_GetPathId(sNextPlanetId, sPlanets[sNextPlanetId].dest2); + gPlanetPathStatus[temp] = 1; sPaths[temp].alpha = 255; } } @@ -4012,59 +4012,59 @@ void Map_801A5E80(void) { void Map_801A61B4(LevelId level) { switch (level) { case LEVEL_CORNERIA: - Audio_SetAudioSpec(0, 0); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_0); break; case LEVEL_METEO: - Audio_SetAudioSpec(0, 1); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_1); break; case LEVEL_TITANIA: - Audio_SetAudioSpec(0, 2); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_2); break; case LEVEL_AQUAS: - Audio_SetAudioSpec(0, 12); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_12); break; case LEVEL_BOLSE: - Audio_SetAudioSpec(0, 10); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_10); break; case LEVEL_KATINA: - Audio_SetAudioSpec(0, 11); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_11); break; case LEVEL_AREA_6: - Audio_SetAudioSpec(0, 5); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_5); break; case LEVEL_SECTOR_Z: - Audio_SetAudioSpec(0, 13); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_13); break; case LEVEL_FORTUNA: - Audio_SetAudioSpec(0, 8); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_8); break; case LEVEL_SECTOR_X: - Audio_SetAudioSpec(0, 3); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_3); break; case LEVEL_MACBETH: - Audio_SetAudioSpec(0, 14); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_14); break; case LEVEL_ZONESS: - Audio_SetAudioSpec(0, 4); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_4); break; case LEVEL_SECTOR_Y: - Audio_SetAudioSpec(0, 7); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_7); break; case LEVEL_SOLAR: - Audio_SetAudioSpec(0, 0x209); + AUDIO_SET_SPEC(SFXCHAN_2, AUDIOSPEC_9); default: break; @@ -4245,7 +4245,7 @@ PlanetId Map_GetPlanetId(LevelId level) { return planet; } -s32 Map_801A655C(PlanetId start, PlanetId end) { +s32 Map_GetPathId(PlanetId start, PlanetId end) { s32 i; for (i = 0; i < 24; i++) { @@ -5519,7 +5519,7 @@ void Map_801AA1CC(s32 arg0) { if (i < 6) { r = g = b = 255; if (i < arg0) { - temp = Map_801A655C(*ptr, *(ptr + 1)); + temp = Map_GetPathId(*ptr, *(ptr + 1)); switch (sPaths[temp].type) { case 0: r = 16; @@ -6358,10 +6358,10 @@ void Map_801AC9A0(s32 index) { gTexturedLines[index].unk_20 = Math_Atan2F(x, z); gTexturedLines[index].unk_1C = -Math_Atan2F(y, sqrtf(SQ(x) + SQ(z))); - switch (D_ctx_80177BD8[index]) { + switch (gPlanetPathStatus[index]) { case 1: AUDIO_PLAY_SFX(0x1900404D, gDefaultSfxSource, 4); - D_ctx_80177BD8[index] = 11; + gPlanetPathStatus[index] = 11; break; case 11: @@ -6369,7 +6369,7 @@ void Map_801AC9A0(s32 index) { gTexturedLines[index].unk_2F = 255; if (gTexturedLines[index].unk_24 == target) { Audio_KillSfxById(0x1900404D); - D_ctx_80177BD8[index] = 4; + gPlanetPathStatus[index] = 4; } break; @@ -6378,7 +6378,7 @@ void Map_801AC9A0(s32 index) { Math_SmoothStepToF(&gTexturedLines[index].unk_24, target, 0.1f, 100.0f, 1.0f); if (gTexturedLines[index].unk_24 == target) { gTexturedLines[index].unk_24 = 0.0f; - D_ctx_80177BD8[index] = 6; + gPlanetPathStatus[index] = 6; D_menu_801CEEAC = 255; } break; @@ -6391,7 +6391,7 @@ void Map_801AC9A0(s32 index) { Math_SmoothStepToF(&gTexturedLines[index].unk_24, target, temp, 100.0f, 4.0f); gTexturedLines[index].unk_2F = 255; if (gTexturedLines[index].unk_24 == target) { - D_ctx_80177BD8[index] = 3; + gPlanetPathStatus[index] = 3; } break; @@ -6402,7 +6402,7 @@ void Map_801AC9A0(s32 index) { break; } - if ((D_ctx_80177BD8[index] == 1) || (D_ctx_80177BD8[index] == 11) || (D_ctx_80177BD8[index] == 4)) { + if ((gPlanetPathStatus[index] == 1) || (gPlanetPathStatus[index] == 11) || (gPlanetPathStatus[index] == 4)) { gTexturedLines[index].unk_2C = 32; gTexturedLines[index].unk_2D = 32; gTexturedLines[index].unk_2E = 32; diff --git a/src/overlays/ovl_menu/fox_option.c b/src/overlays/ovl_menu/fox_option.c index aeeff3fe..00e95496 100644 --- a/src/overlays/ovl_menu/fox_option.c +++ b/src/overlays/ovl_menu/fox_option.c @@ -558,7 +558,7 @@ void Option_Init(void) { case OPTION_WAIT: if (gNextGameStateTimer == 0) { gOptionMenuStatus = OPTION_SETUP; - Audio_SetAudioSpec(0, 23); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_23); } break; @@ -806,7 +806,7 @@ void Option_TrainingUpdate(void) { D_ctx_80177CB0 = 0.0f; D_ctx_8017782C = 1; gControllerLock = 3; - Audio_SetAudioSpec(0, 28); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_28); } else { gFillScreenAlpha += 32; if (gFillScreenAlpha > 255) { diff --git a/src/overlays/ovl_menu/fox_title.c b/src/overlays/ovl_menu/fox_title.c index 73c1f970..72ffe63b 100644 --- a/src/overlays/ovl_menu/fox_title.c +++ b/src/overlays/ovl_menu/fox_title.c @@ -205,11 +205,11 @@ void Title_801875E0(void) { Title_80188010(); if ((gMainController == -1) || (D_menu_801B827C != 0)) { - Audio_SetAudioSpec(0, 0x17); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_23); D_menu_801B82C4 = 0; D_menu_801B827C = 0; } else { - Audio_SetAudioSpec(0, 0x16); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_22); D_menu_801B82C4 = 1; } gControllerLock = 30; @@ -379,7 +379,7 @@ void Title_80187B00(void) { gRadioState = 0; D_menu_801B82C0 = 0; gDrawMode = DRAW_NONE; - Audio_SetAudioSpec(0, 0x16); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_22); D_menu_801B82C4 = 1; } @@ -2102,7 +2102,7 @@ void Title_8018C644(void) { D_menu_801B82C0 = 0; gDrawMode = DRAW_NONE; D_menu_801B82C4 = 0; - Audio_SetAudioSpec(0, 23); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_23); break; } @@ -3216,7 +3216,7 @@ void Title_80190EA4(void) { if (D_menu_801B8284 < 120) { D_menu_801B8284 += 18; } else { - Audio_SetAudioSpec(0, 0x17); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_23); D_ctx_80178410 = 0; gRadioState = 0; D_menu_801B82C0 = 0; From 4f95948de5858df7d099c6930732951e9820aaa7 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Sun, 21 Apr 2024 15:54:51 -0300 Subject: [PATCH 033/151] Fix level select --- src/mods/levelselect.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/mods/levelselect.c b/src/mods/levelselect.c index 5c5f8da6..d09d5170 100644 --- a/src/mods/levelselect.c +++ b/src/mods/levelselect.c @@ -12,27 +12,28 @@ void Map_801A914C(void); void Map_801A6628(void); void Map_LevelSelect(void) { + static planetIndex = 0; static char* sLevelSelectPlanetNames[] = { "METEO", "AREA 6", "BOLSE", "SECTOR Z", "SECTOR X", "SECTOR Y", "KATINA", "MACBETH", "ZONESS", "CORNERIA", "TITANIA", "AQUAS", "FORTUNA", "VENOM", "SOLAR", }; if (gControllerPress[0].button & L_JPAD) { - gCurrentPlanet--; - if (gCurrentPlanet < 0) { - gCurrentPlanet = 14; + planetIndex--; + if (planetIndex < 0) { + planetIndex = 14; } - sCurrentPlanetId = sPlanetList[gCurrentPlanet]; + sCurrentPlanetId = sPlanetList[planetIndex]; Map_801A6368(); Map_801A914C(); } if (gControllerPress[0].button & R_JPAD) { - gCurrentPlanet++; - if (gCurrentPlanet > 14) { - gCurrentPlanet = 0; + planetIndex++; + if (planetIndex > 14) { + planetIndex = 0; } - sCurrentPlanetId = sPlanetList[gCurrentPlanet]; + sCurrentPlanetId = sPlanetList[planetIndex]; Map_801A6368(); Map_801A914C(); } From e1785c35dd78011c2f15c36db71618e956c0fa59 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Sun, 21 Apr 2024 16:01:38 -0300 Subject: [PATCH 034/151] fix warning --- src/mods/levelselect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mods/levelselect.c b/src/mods/levelselect.c index d09d5170..d9c8a0ad 100644 --- a/src/mods/levelselect.c +++ b/src/mods/levelselect.c @@ -12,7 +12,7 @@ void Map_801A914C(void); void Map_801A6628(void); void Map_LevelSelect(void) { - static planetIndex = 0; + static PlanetId planetIndex = 0; static char* sLevelSelectPlanetNames[] = { "METEO", "AREA 6", "BOLSE", "SECTOR Z", "SECTOR X", "SECTOR Y", "KATINA", "MACBETH", "ZONESS", "CORNERIA", "TITANIA", "AQUAS", "FORTUNA", "VENOM", "SOLAR", From 31b2a56251a23c5d58b102a38e5f3fb3229da753 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Sun, 21 Apr 2024 16:04:34 -0300 Subject: [PATCH 035/151] get rid of fixed size in gPlanetPathStatus --- include/context.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/context.h b/include/context.h index 85676cf0..c9acd625 100644 --- a/include/context.h +++ b/include/context.h @@ -52,7 +52,7 @@ extern s32 D_ctx_80177B50[7]; extern s32 D_ctx_80177B70[7]; extern PlanetId D_ctx_80177B90[7]; extern s32 D_ctx_80177BB0[7]; -extern s32 gPlanetPathStatus[22]; // overruns D_ctx_80177C30? +extern s32 gPlanetPathStatus[]; // overruns D_ctx_80177C30? extern s32 gPrevPlanetTeamShields[6]; extern s32 D_ctx_80177C58[6]; extern u8 gSoundMode; From 043177b5fc5fc3f144df791176b4bc8dba578355 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Sun, 21 Apr 2024 18:31:57 -0300 Subject: [PATCH 036/151] -Os --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index a0f181f7..4a3b4813 100644 --- a/Makefile +++ b/Makefile @@ -87,7 +87,7 @@ endif # ditch g3, we aren't using that in GCC ifeq ($(COMPILER),gcc) - OPTFLAGS := -Ofast + OPTFLAGS := -Os else OPTFLAGS := -O2 -g3 endif @@ -349,8 +349,8 @@ build/src/audio/audio_playback.o: OPTFLAGS := -Os build/src/audio/audio_seqplayer.o: OPTFLAGS := -Os build/src/audio/audio_thread.o: OPTFLAGS := -Os -build/src/libc_sprintf.o: OPTFLAGS := -Ofast -build/src/libc_math64.o: OPTFLAGS := -Ofast +build/src/libc_sprintf.o: OPTFLAGS := -Os +build/src/libc_math64.o: OPTFLAGS := -Os build/src/libultra/libc/ldiv.o: OPTFLAGS := -Os build/src/libultra/libc/string.o: OPTFLAGS := -Os @@ -361,8 +361,8 @@ build/src/libultra/libc/ll.o: OPTFLAGS := -O2 build/src/libultra/libc/ll.o: MIPS_VERSION := -mips3 # cc & asm-processor -build/src/libultra/gu/sqrtf.o: OPTFLAGS := -Ofast -build/src/libultra/gu/sinf.o: OPTFLAGS := -Ofast +build/src/libultra/gu/sqrtf.o: OPTFLAGS := -Os +build/src/libultra/gu/sinf.o: OPTFLAGS := -Os build/src/libultra/gu/lookat.o: OPTFLAGS := -Os build/src/libultra/gu/ortho.o: OPTFLAGS := -Os build/src/libultra/gu/perspective.o: OPTFLAGS := -Os From 6bdfd2845feff128cebe9b5c71e683425f8e3a68 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Sun, 21 Apr 2024 19:32:53 -0300 Subject: [PATCH 037/151] remove duplicated GFLAGS --- Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 4a3b4813..41aaebe9 100644 --- a/Makefile +++ b/Makefile @@ -99,6 +99,7 @@ else # we support Microsoft extensions such as anonymous structs, which the compiler does support but warns for their usage. Surpress the warnings with -woff. CFLAGS += -G 0 -non_shared -fullwarn -verbose -Xcpluscomm $(IINC) -nostdinc -Wab,-r4300_mul -woff 649,838,712,516 MIPS_VERSION := -mips2 + WARNINGS := -fullwarn -verbose -woff 624,649,838,712,516,513,596,564,594,709 endif ifeq ($(COMPILER),ido) @@ -295,8 +296,6 @@ DEP_FILES := $(O_FILES:.o=.d) \ $(shell mkdir -p $(BUILD_DIR)/linker_scripts/$(VERSION) $(BUILD_DIR)/linker_scripts/$(VERSION)/auto $(foreach dir,$(SRC_DIRS) $(ASM_DIRS) $(BIN_DIRS),$(BUILD_DIR)/$(dir))) ifeq ($(COMPILER),ido) -CFLAGS += -G 0 -non_shared -Xcpluscomm -nostdinc -Wab,-r4300_mul -WARNINGS := -fullwarn -verbose -woff 624,649,838,712,516,513,596,564,594,709 # directory flags build/src/libultra/gu/%.o: OPTFLAGS := -O3 -g0 From 81291a0c443a8e671f9b77726bb8d6c9f0e9e674 Mon Sep 17 00:00:00 2001 From: petrie911 <69443847+petrie911@users.noreply.github.com> Date: Mon, 22 Apr 2024 21:51:20 -0500 Subject: [PATCH 038/151] More docs and renames, fox_bg now mostly figured out (#220) * lights fix * names * remove header * so many names * format --- assets/yaml/us/ast_7_ti_1.yaml | 1 - assets/yaml/us/ast_7_ti_2.yaml | 1 - assets/yaml/us/ast_8_ti.yaml | 1 - assets/yaml/us/ast_9_ti.yaml | 1 - assets/yaml/us/ast_A_ti.yaml | 1 - assets/yaml/us/ast_allies.yaml | 1 - assets/yaml/us/ast_andross.yaml | 1 - assets/yaml/us/ast_aquas.yaml | 1 - assets/yaml/us/ast_area_6.yaml | 1 - assets/yaml/us/ast_arwing.yaml | 1 - assets/yaml/us/ast_bg_planet.yaml | 1 - assets/yaml/us/ast_bg_space.yaml | 1 - assets/yaml/us/ast_blue_marine.yaml | 1 - assets/yaml/us/ast_bolse.yaml | 1 - assets/yaml/us/ast_common.yaml | 1 - assets/yaml/us/ast_corneria.yaml | 1 - assets/yaml/us/ast_ending.yaml | 1 - assets/yaml/us/ast_ending_award_back.yaml | 1 - assets/yaml/us/ast_ending_award_front.yaml | 1 - assets/yaml/us/ast_ending_expert.yaml | 1 - assets/yaml/us/ast_enmy_planet.yaml | 1 - assets/yaml/us/ast_enmy_space.yaml | 1 - assets/yaml/us/ast_font.yaml | 1 - assets/yaml/us/ast_font_3d.yaml | 1 - assets/yaml/us/ast_fortuna.yaml | 1 - assets/yaml/us/ast_great_fox.yaml | 1 - assets/yaml/us/ast_katina.yaml | 1 - assets/yaml/us/ast_landmaster.yaml | 1 - assets/yaml/us/ast_logo.yml | 1 - assets/yaml/us/ast_macbeth.yaml | 1 - assets/yaml/us/ast_map.yaml | 1 - assets/yaml/us/ast_meteo.yaml | 1 - assets/yaml/us/ast_option.yaml | 1 - assets/yaml/us/ast_sector_x.yaml | 1 - assets/yaml/us/ast_sector_y.yaml | 1 - assets/yaml/us/ast_sector_z.yaml | 1 - assets/yaml/us/ast_solar.yaml | 1 - assets/yaml/us/ast_star_wolf.yaml | 1 - assets/yaml/us/ast_titania.yaml | 1 - assets/yaml/us/ast_title.yaml | 1 - assets/yaml/us/ast_training.yaml | 1 - assets/yaml/us/ast_ve1_boss.yaml | 1 - assets/yaml/us/ast_venom_1.yaml | 1 - assets/yaml/us/ast_venom_2.yaml | 1 - assets/yaml/us/ast_versus.yaml | 1 - assets/yaml/us/ast_vs_menu.yaml | 1 - assets/yaml/us/ast_warp_zone.yaml | 1 - assets/yaml/us/ast_zoness.yaml | 1 - include/context.h | 88 +- include/fox_option.h | 8 +- include/functions.h | 71 +- include/global.h | 1 - include/i1.h | 19 +- include/i2.h | 9 +- include/i3.h | 15 +- include/i4.h | 17 +- include/i5.h | 35 +- include/i6.h | 21 +- include/prevent_context_reordering.h | 10 +- include/sf64audio_external.h | 10 +- include/sf64dma.h | 35 +- include/sf64level.h | 60 +- include/sf64math.h | 5 + include/sf64object.h | 739 ++++++++-------- include/sf64player.h | 8 +- include/structs.h | 76 -- include/sys.h | 17 +- include/variables.h | 27 +- linker_scripts/us/symbol_addrs.txt | 2 +- linker_scripts/us/symbol_addrs_EBFBE0.txt | 2 +- linker_scripts/us/symbol_addrs_audio.txt | 4 +- linker_scripts/us/symbol_addrs_engine.txt | 120 +-- linker_scripts/us/symbol_addrs_overlays.txt | 2 +- src/audio/audio_general.c | 4 +- src/engine/fox_360.c | 70 +- src/engine/fox_A4290_colheaders.c | 1 - src/engine/fox_beam.c | 268 +++--- src/engine/fox_bg.c | 471 +++++----- src/engine/fox_context.c | 112 +-- src/engine/fox_demo.c | 170 ++-- src/engine/fox_display.c | 38 +- src/engine/fox_edata.c | 4 +- src/engine/fox_edata_info.c | 458 +++++----- src/engine/fox_edisplay.c | 118 +-- src/engine/fox_effect.c | 72 +- src/engine/fox_enmy.c | 376 ++++---- src/engine/fox_enmy2.c | 234 ++--- src/engine/fox_game.c | 255 +++--- src/engine/fox_hud.c | 98 +- src/engine/fox_load.c | 180 ++-- src/engine/fox_load_inits.c | 56 +- src/engine/fox_play.c | 934 ++++++++++---------- src/engine/fox_std_lib.c | 2 +- src/engine/fox_tank.c | 192 ++-- src/engine/fox_versus.c | 52 +- src/mods/sfxjukebox.c | 10 +- src/overlays/ovl_ending/fox_end1.c | 16 +- src/overlays/ovl_ending/fox_end2.c | 18 +- src/overlays/ovl_i1/fox_co.c | 170 ++-- src/overlays/ovl_i1/fox_tr360.c | 64 +- src/overlays/ovl_i1/fox_ve1.c | 58 +- src/overlays/ovl_i2/fox_me.c | 16 +- src/overlays/ovl_i2/fox_sx.c | 18 +- src/overlays/ovl_i3/fox_a6.c | 10 +- src/overlays/ovl_i3/fox_aq.c | 168 ++-- src/overlays/ovl_i3/fox_so.c | 18 +- src/overlays/ovl_i3/fox_zo.c | 20 +- src/overlays/ovl_i4/fox_bo.c | 143 ++- src/overlays/ovl_i4/fox_fo.c | 58 +- src/overlays/ovl_i4/fox_i4.c | 4 +- src/overlays/ovl_i4/fox_ka.c | 22 +- src/overlays/ovl_i4/fox_sz.c | 42 +- src/overlays/ovl_i5/fox_ma.c | 601 +++++++------ src/overlays/ovl_i5/fox_ti.c | 144 +-- src/overlays/ovl_i5/fox_ti_cs.c | 16 +- src/overlays/ovl_i6/fox_andross.c | 278 +++--- src/overlays/ovl_i6/fox_sy.c | 92 +- src/overlays/ovl_i6/fox_turret.c | 2 +- src/overlays/ovl_i6/fox_ve2.c | 42 +- src/overlays/ovl_menu/fox_i_menu.c | 20 +- src/overlays/ovl_menu/fox_map.c | 80 +- src/overlays/ovl_menu/fox_option.c | 102 +-- src/overlays/ovl_menu/fox_title.c | 60 +- src/overlays/ovl_menu/fox_title.h | 2 +- tools/comptool.py | 4 +- 125 files changed, 3929 insertions(+), 3983 deletions(-) delete mode 100644 include/structs.h diff --git a/assets/yaml/us/ast_7_ti_1.yaml b/assets/yaml/us/ast_7_ti_1.yaml index b99ca779..011b4ff0 100644 --- a/assets/yaml/us/ast_7_ti_1.yaml +++ b/assets/yaml/us/ast_7_ti_1.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' D_AST_7_TI_1_7000000: { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 28, offset: 0x07000000, symbol: D_AST_7_TI_1_7000000, tlut: 0x07001108 } diff --git a/assets/yaml/us/ast_7_ti_2.yaml b/assets/yaml/us/ast_7_ti_2.yaml index 1ee91f1b..8d2238e2 100644 --- a/assets/yaml/us/ast_7_ti_2.yaml +++ b/assets/yaml/us/ast_7_ti_2.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' D_TI2_7003EE8: { type: SF64:ANIM, offset: 0x7003EE8, symbol: D_TI2_7003EE8 } diff --git a/assets/yaml/us/ast_8_ti.yaml b/assets/yaml/us/ast_8_ti.yaml index 973cf1d5..cbf2016a 100644 --- a/assets/yaml/us/ast_8_ti.yaml +++ b/assets/yaml/us/ast_8_ti.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' D_TI_8000708: { type: SF64:ANIM, offset: 0x8000708, symbol: D_TI_8000708 } diff --git a/assets/yaml/us/ast_9_ti.yaml b/assets/yaml/us/ast_9_ti.yaml index 9c0e0710..913cf7cb 100644 --- a/assets/yaml/us/ast_9_ti.yaml +++ b/assets/yaml/us/ast_9_ti.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' D_TI_9004288: { type: SF64:ANIM, offset: 0x9004288, symbol: D_TI_9004288 } diff --git a/assets/yaml/us/ast_A_ti.yaml b/assets/yaml/us/ast_A_ti.yaml index 42e5ae85..e4fcb1ab 100644 --- a/assets/yaml/us/ast_A_ti.yaml +++ b/assets/yaml/us/ast_A_ti.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' D_TI_A000000: {type: GFX, offset: 0xA000000, symbol: D_TI_A000000} diff --git a/assets/yaml/us/ast_allies.yaml b/assets/yaml/us/ast_allies.yaml index d30fbd17..3f9594f5 100644 --- a/assets/yaml/us/ast_allies.yaml +++ b/assets/yaml/us/ast_allies.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' D_D000000: { type: GFX, offset: 0xD000000, symbol: D_D000000 } diff --git a/assets/yaml/us/ast_andross.yaml b/assets/yaml/us/ast_andross.yaml index 002f2646..01c7f267 100644 --- a/assets/yaml/us/ast_andross.yaml +++ b/assets/yaml/us/ast_andross.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' - '#include "sf64level.h"' - '#include "sf64event.h"' - '#include "sf64player.h"' diff --git a/assets/yaml/us/ast_aquas.yaml b/assets/yaml/us/ast_aquas.yaml index df2aec6c..e72f5b0c 100644 --- a/assets/yaml/us/ast_aquas.yaml +++ b/assets/yaml/us/ast_aquas.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' - '#include "sf64level.h"' - '#include "sf64event.h"' - '#include "sf64player.h"' diff --git a/assets/yaml/us/ast_area_6.yaml b/assets/yaml/us/ast_area_6.yaml index 474696ce..097776ca 100644 --- a/assets/yaml/us/ast_area_6.yaml +++ b/assets/yaml/us/ast_area_6.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' - '#include "sf64level.h"' - '#include "sf64event.h"' - '#include "sf64player.h"' diff --git a/assets/yaml/us/ast_arwing.yaml b/assets/yaml/us/ast_arwing.yaml index 1c9a823a..43443489 100644 --- a/assets/yaml/us/ast_arwing.yaml +++ b/assets/yaml/us/ast_arwing.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' D_arwing_3000000: { type: TEXTURE, format: CI4, offset: 0x3000000, width: 16, height: 16, ctype: u8, tlut: 0x3000080, symbol: D_arwing_3000000 } diff --git a/assets/yaml/us/ast_bg_planet.yaml b/assets/yaml/us/ast_bg_planet.yaml index 2f664cad..69ee7ae3 100644 --- a/assets/yaml/us/ast_bg_planet.yaml +++ b/assets/yaml/us/ast_bg_planet.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' D_BG_PLANET_2000000: { type: GFX, offset: 0x2000000, symbol: D_BG_PLANET_2000000 } diff --git a/assets/yaml/us/ast_bg_space.yaml b/assets/yaml/us/ast_bg_space.yaml index 430121a2..32f1e5c8 100644 --- a/assets/yaml/us/ast_bg_space.yaml +++ b/assets/yaml/us/ast_bg_space.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' D_BG_SPACE_2000000: { type: GFX, offset: 0x2000000, symbol: D_BG_SPACE_2000000 } diff --git a/assets/yaml/us/ast_blue_marine.yaml b/assets/yaml/us/ast_blue_marine.yaml index 8c6adb12..8889e909 100644 --- a/assets/yaml/us/ast_blue_marine.yaml +++ b/assets/yaml/us/ast_blue_marine.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' D_blue_marine_3000000: { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x3000000, symbol: D_blue_marine_3000000, tlut: 0x3000080 } diff --git a/assets/yaml/us/ast_bolse.yaml b/assets/yaml/us/ast_bolse.yaml index a5c8ff17..9a00e883 100644 --- a/assets/yaml/us/ast_bolse.yaml +++ b/assets/yaml/us/ast_bolse.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' - '#include "sf64level.h"' - '#include "sf64event.h"' - '#include "sf64player.h"' diff --git a/assets/yaml/us/ast_common.yaml b/assets/yaml/us/ast_common.yaml index e3ab6d29..5717aba9 100644 --- a/assets/yaml/us/ast_common.yaml +++ b/assets/yaml/us/ast_common.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' D_1000000: { type: TEXTURE, format: IA8, width: 64, height: 10, ctype: u8, offset: 0x1000000, symbol: D_1000000 } diff --git a/assets/yaml/us/ast_corneria.yaml b/assets/yaml/us/ast_corneria.yaml index abfe041b..e63d263b 100644 --- a/assets/yaml/us/ast_corneria.yaml +++ b/assets/yaml/us/ast_corneria.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' - '#include "sf64level.h"' - '#include "sf64event.h"' - '#include "sf64player.h"' diff --git a/assets/yaml/us/ast_ending.yaml b/assets/yaml/us/ast_ending.yaml index 502506d7..4bd1b0b2 100644 --- a/assets/yaml/us/ast_ending.yaml +++ b/assets/yaml/us/ast_ending.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' D_END_7000000: { type: GFX, offset: 0x7000000, symbol: D_END_7000000} diff --git a/assets/yaml/us/ast_ending_award_back.yaml b/assets/yaml/us/ast_ending_award_back.yaml index 2fd23278..4cc3746f 100644 --- a/assets/yaml/us/ast_ending_award_back.yaml +++ b/assets/yaml/us/ast_ending_award_back.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' ending_award_back: { type: TEXTURE, ctype: u16, format: RGBA16, width: 316, height: 270, offset: 0x8000000, symbol: gEndingAwardBack } diff --git a/assets/yaml/us/ast_ending_award_front.yaml b/assets/yaml/us/ast_ending_award_front.yaml index 0f8ac3ef..81908bf9 100644 --- a/assets/yaml/us/ast_ending_award_front.yaml +++ b/assets/yaml/us/ast_ending_award_front.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' ending_award_front: { type: TEXTURE, ctype: u16, format: RGBA16, width: 316, height: 240, offset: 0x8000000, symbol: gEndingAwardFront } \ No newline at end of file diff --git a/assets/yaml/us/ast_ending_expert.yaml b/assets/yaml/us/ast_ending_expert.yaml index f0458247..7963c318 100644 --- a/assets/yaml/us/ast_ending_expert.yaml +++ b/assets/yaml/us/ast_ending_expert.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' ending_expert_reward: { type: TEXTURE, ctype: u16, format: RGBA16, width: 316, height: 240, offset: 0x8000000, symbol: gEndingExpertReward } diff --git a/assets/yaml/us/ast_enmy_planet.yaml b/assets/yaml/us/ast_enmy_planet.yaml index 83bb6e1e..9ea49f50 100644 --- a/assets/yaml/us/ast_enmy_planet.yaml +++ b/assets/yaml/us/ast_enmy_planet.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' # Seems unused D_ENMY_PLANET_4000290: diff --git a/assets/yaml/us/ast_enmy_space.yaml b/assets/yaml/us/ast_enmy_space.yaml index 3ea12588..9bfb991f 100644 --- a/assets/yaml/us/ast_enmy_space.yaml +++ b/assets/yaml/us/ast_enmy_space.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' D_ENMY_SPACE_4000080: { type: SF64:ANIM, offset: 0x4000080, symbol: D_ENMY_SPACE_4000080 } diff --git a/assets/yaml/us/ast_font.yaml b/assets/yaml/us/ast_font.yaml index 76f1a96d..a3ba59cf 100644 --- a/assets/yaml/us/ast_font.yaml +++ b/assets/yaml/us/ast_font.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' # 0 (small) D_5000000: diff --git a/assets/yaml/us/ast_font_3d.yaml b/assets/yaml/us/ast_font_3d.yaml index a498f6fc..745d6518 100644 --- a/assets/yaml/us/ast_font_3d.yaml +++ b/assets/yaml/us/ast_font_3d.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' D_FONT3D_9000000: { type: GFX, offset: 0x9000000, symbol: D_FONT3D_9000000 } diff --git a/assets/yaml/us/ast_fortuna.yaml b/assets/yaml/us/ast_fortuna.yaml index e782ea7c..3c19cbff 100644 --- a/assets/yaml/us/ast_fortuna.yaml +++ b/assets/yaml/us/ast_fortuna.yaml @@ -11,7 +11,6 @@ - '#include "sf64event.h"' - '#include "sf64player.h"' - '#include "sf64audio_external.h"' - - '#include "structs.h"' # Fortuna # Former Defense Post diff --git a/assets/yaml/us/ast_great_fox.yaml b/assets/yaml/us/ast_great_fox.yaml index 039941a6..03ad5207 100644 --- a/assets/yaml/us/ast_great_fox.yaml +++ b/assets/yaml/us/ast_great_fox.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' # Great Fox Model D_GREAT_FOX_E000000: diff --git a/assets/yaml/us/ast_katina.yaml b/assets/yaml/us/ast_katina.yaml index 74660f94..ff3851d5 100644 --- a/assets/yaml/us/ast_katina.yaml +++ b/assets/yaml/us/ast_katina.yaml @@ -11,7 +11,6 @@ - '#include "sf64event.h"' - '#include "sf64player.h"' - '#include "sf64audio_external.h"' - - '#include "structs.h"' # Katina # Frontline Base diff --git a/assets/yaml/us/ast_landmaster.yaml b/assets/yaml/us/ast_landmaster.yaml index 7d078761..ff5ebaa7 100644 --- a/assets/yaml/us/ast_landmaster.yaml +++ b/assets/yaml/us/ast_landmaster.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' D_landmaster_3000000: { type: TEXTURE, format: CI4, offset: 0x3000000, width: 16, height: 16, ctype: u8, tlut: 0x3000080, symbol: D_landmaster_3000000 } diff --git a/assets/yaml/us/ast_logo.yml b/assets/yaml/us/ast_logo.yml index bbe5d5c7..7cfee369 100644 --- a/assets/yaml/us/ast_logo.yml +++ b/assets/yaml/us/ast_logo.yml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' nintendo_logo: type: TEXTURE diff --git a/assets/yaml/us/ast_macbeth.yaml b/assets/yaml/us/ast_macbeth.yaml index c95f7f61..3bef80ff 100644 --- a/assets/yaml/us/ast_macbeth.yaml +++ b/assets/yaml/us/ast_macbeth.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' - '#include "sf64level.h"' - '#include "sf64event.h"' - '#include "sf64player.h"' diff --git a/assets/yaml/us/ast_map.yaml b/assets/yaml/us/ast_map.yaml index 65807934..44747cae 100644 --- a/assets/yaml/us/ast_map.yaml +++ b/assets/yaml/us/ast_map.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' # Restart Game (Game Over) D_MAP_6000000: diff --git a/assets/yaml/us/ast_meteo.yaml b/assets/yaml/us/ast_meteo.yaml index 190ed367..f5f2e485 100644 --- a/assets/yaml/us/ast_meteo.yaml +++ b/assets/yaml/us/ast_meteo.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' - '#include "sf64level.h"' - '#include "sf64event.h"' - '#include "sf64player.h"' diff --git a/assets/yaml/us/ast_option.yaml b/assets/yaml/us/ast_option.yaml index 55643835..b3f3637a 100644 --- a/assets/yaml/us/ast_option.yaml +++ b/assets/yaml/us/ast_option.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' # Invoice D_OPT_8000000: diff --git a/assets/yaml/us/ast_sector_x.yaml b/assets/yaml/us/ast_sector_x.yaml index 97cd69c7..ee45e5d0 100644 --- a/assets/yaml/us/ast_sector_x.yaml +++ b/assets/yaml/us/ast_sector_x.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' - '#include "sf64level.h"' - '#include "sf64event.h"' - '#include "sf64player.h"' diff --git a/assets/yaml/us/ast_sector_y.yaml b/assets/yaml/us/ast_sector_y.yaml index 22420b11..e4929929 100644 --- a/assets/yaml/us/ast_sector_y.yaml +++ b/assets/yaml/us/ast_sector_y.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' - '#include "sf64level.h"' - '#include "sf64event.h"' - '#include "sf64player.h"' diff --git a/assets/yaml/us/ast_sector_z.yaml b/assets/yaml/us/ast_sector_z.yaml index 9021db0a..3abdb8cd 100644 --- a/assets/yaml/us/ast_sector_z.yaml +++ b/assets/yaml/us/ast_sector_z.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' - '#include "sf64level.h"' - '#include "sf64event.h"' - '#include "sf64player.h"' diff --git a/assets/yaml/us/ast_solar.yaml b/assets/yaml/us/ast_solar.yaml index 1a1f05e8..328f9724 100644 --- a/assets/yaml/us/ast_solar.yaml +++ b/assets/yaml/us/ast_solar.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' - '#include "sf64level.h"' - '#include "sf64event.h"' - '#include "sf64player.h"' diff --git a/assets/yaml/us/ast_star_wolf.yaml b/assets/yaml/us/ast_star_wolf.yaml index 9d9ffc77..3bdb8ae4 100644 --- a/assets/yaml/us/ast_star_wolf.yaml +++ b/assets/yaml/us/ast_star_wolf.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' D_STAR_WOLF_F000000: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x0F000000, symbol: D_STAR_WOLF_F000000 } diff --git a/assets/yaml/us/ast_titania.yaml b/assets/yaml/us/ast_titania.yaml index 129571c0..8973854c 100644 --- a/assets/yaml/us/ast_titania.yaml +++ b/assets/yaml/us/ast_titania.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' - '#include "sf64level.h"' - '#include "sf64event.h"' - '#include "sf64player.h"' diff --git a/assets/yaml/us/ast_title.yaml b/assets/yaml/us/ast_title.yaml index 1312d94c..a369b62e 100644 --- a/assets/yaml/us/ast_title.yaml +++ b/assets/yaml/us/ast_title.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' starfox_logo: { type: TEXTURE, ctype: u16, format: RGBA16, width: 236, height: 60, offset: 0x6000000, symbol: gTitleStarfoxLogo } diff --git a/assets/yaml/us/ast_training.yaml b/assets/yaml/us/ast_training.yaml index 501c80c6..bf9795eb 100644 --- a/assets/yaml/us/ast_training.yaml +++ b/assets/yaml/us/ast_training.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' - '#include "sf64level.h"' - '#include "sf64event.h"' - '#include "sf64player.h"' diff --git a/assets/yaml/us/ast_ve1_boss.yaml b/assets/yaml/us/ast_ve1_boss.yaml index 6a5f2c07..14a29c08 100644 --- a/assets/yaml/us/ast_ve1_boss.yaml +++ b/assets/yaml/us/ast_ve1_boss.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' D_VE1_9000000: {type: GFX, offset: 0x9000000, symbol: D_VE1_9000000} diff --git a/assets/yaml/us/ast_venom_1.yaml b/assets/yaml/us/ast_venom_1.yaml index 7f63b7fa..ea462404 100644 --- a/assets/yaml/us/ast_venom_1.yaml +++ b/assets/yaml/us/ast_venom_1.yaml @@ -11,7 +11,6 @@ - '#include "sf64event.h"' - '#include "sf64player.h"' - '#include "sf64audio_external.h"' - - '#include "structs.h"' - '#include "sf64mesg.h"' D_VE1_6000000: diff --git a/assets/yaml/us/ast_venom_2.yaml b/assets/yaml/us/ast_venom_2.yaml index d3f3e6b0..c7aa4b27 100644 --- a/assets/yaml/us/ast_venom_2.yaml +++ b/assets/yaml/us/ast_venom_2.yaml @@ -11,7 +11,6 @@ - '#include "sf64event.h"' - '#include "sf64player.h"' - '#include "sf64audio_external.h"' - - '#include "structs.h"' D_VE2_6000000: { type: TEXTURE, format: IA8, width: 96, height: 28, offset: 0x6000000, ctype: u8, symbol: D_VE2_6000000 } diff --git a/assets/yaml/us/ast_versus.yaml b/assets/yaml/us/ast_versus.yaml index 8d9bb09b..199cd473 100644 --- a/assets/yaml/us/ast_versus.yaml +++ b/assets/yaml/us/ast_versus.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' - '#include "sf64level.h"' - '#include "sf64event.h"' - '#include "sf64player.h"' diff --git a/assets/yaml/us/ast_vs_menu.yaml b/assets/yaml/us/ast_vs_menu.yaml index e1fd57bf..28cd189e 100644 --- a/assets/yaml/us/ast_vs_menu.yaml +++ b/assets/yaml/us/ast_vs_menu.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' D_VS_MENU_7000000: { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 13, offset: 0x7000000, symbol: D_VS_MENU_7000000} diff --git a/assets/yaml/us/ast_warp_zone.yaml b/assets/yaml/us/ast_warp_zone.yaml index 9460bb05..67dc362d 100644 --- a/assets/yaml/us/ast_warp_zone.yaml +++ b/assets/yaml/us/ast_warp_zone.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' D_WZ_7000000: { type: GFX, offset: 0x7000000, symbol: D_WZ_7000000 } diff --git a/assets/yaml/us/ast_zoness.yaml b/assets/yaml/us/ast_zoness.yaml index 8696c932..7cc4e5c7 100644 --- a/assets/yaml/us/ast_zoness.yaml +++ b/assets/yaml/us/ast_zoness.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' - '#include "sf64level.h"' - '#include "sf64event.h"' - '#include "sf64player.h"' diff --git a/include/context.h b/include/context.h index c9acd625..69b40f0b 100644 --- a/include/context.h +++ b/include/context.h @@ -6,8 +6,8 @@ #include "sf64object.h" #include "sf64player.h" -extern s32 gOverlaySetup; -extern s32 gOverlayStage; +extern s32 gSceneId; +extern s32 gSceneSetup; extern s32 D_ctx_80177824; // some sort of flag extern s32 D_ctx_8017782C; // some sort of flag. all range related? extern GameState gGameState; @@ -22,10 +22,10 @@ extern s32 gPlayerNum; extern s32 gCamCount; extern s32 gTeamShields[6]; extern s32 gSavedTeamShields[6]; -extern UNK_TYPE gPrevPlanetSavedTeamShields[6]; +extern s32 gPrevPlanetSavedTeamShields[6]; extern s32 gTeamDamage[6]; extern u8 gNextPlanetPath; // next planet path -extern f32 gGroundLevel; +extern f32 gGroundHeight; extern f32 D_ctx_80177950; extern f32 D_ctx_80177968; extern f32 D_ctx_80177970; @@ -43,11 +43,11 @@ extern f32 D_ctx_80177A48[10]; extern s32 gCsFrameCount; extern u8 D_ctx_80177A98; extern u8 D_ctx_80177AB0; -extern u8 D_ctx_80177AC8; +extern u8 gAqDrawMode; extern s32 D_ctx_80177AE0; extern s32 gMainController; extern s32 D_ctx_80177B40; -extern PlanetId gCurrentPlanet; // D_ctx_80177B48 // Arrow pointer? +extern PlanetId gMissionNumber; // D_ctx_80177B48 // Arrow pointer? extern s32 D_ctx_80177B50[7]; extern s32 D_ctx_80177B70[7]; extern PlanetId D_ctx_80177B90[7]; @@ -55,7 +55,7 @@ extern s32 D_ctx_80177BB0[7]; extern s32 gPlanetPathStatus[]; // overruns D_ctx_80177C30? extern s32 gPrevPlanetTeamShields[6]; extern s32 D_ctx_80177C58[6]; -extern u8 gSoundMode; +extern u8 gOptionSoundMode; extern s32 gVolumeSettings[3]; extern u16 gBgmSeqId; extern u8 gLevelType; @@ -83,7 +83,7 @@ extern Vec3f D_ctx_80177F10; extern UNK_TYPE F_80178020; extern s32 D_ctx_8017812C; extern LevelId gCurrentLevel; -extern s32 gLevelStage; +extern s32 gLevelPhase; extern s32 gBossActive; extern s32 D_ctx_8017828C; extern s32 D_ctx_80178294; @@ -112,31 +112,31 @@ extern s32 gFillScreenGreen; // green something extern s32 gFillScreenBlue; // blue something extern s32 gFillScreenAlphaTarget; // alpha target extern s32 gFillScreenAlphaStep; // alpha step -extern s32 D_ctx_80178360; // 2 lights second color -extern s32 D_ctx_80178364; -extern s32 D_ctx_80178368; -extern f32 D_ctx_8017836C; // 2 lights second color brightness -extern f32 D_ctx_80178370; // Vec3f? -extern f32 D_ctx_80178374; -extern f32 D_ctx_80178378; -extern s32 D_ctx_8017837C; -extern u32 gPlayerFillScreenAlphas[4]; // player alphas -extern s32 gPlayerFillScreenReds[4]; // player reds -extern s32 gPlayerFillScreenGreens[4]; // player greens -extern s32 gPlayerFillScreenBlues[4]; // player blues +extern s32 gLight3R; // 2 lights second color +extern s32 gLight3G; +extern s32 gLight3B; +extern f32 gLight3Brightness; // 2 lights second color brightness +extern f32 gLight3x; // Vec3f? +extern f32 gLight3y; +extern f32 gLight3z; +extern s32 gFadeoutType; +extern u32 gPlayerGlareAlphas[4]; // player alphas +extern s32 gPlayerGlareReds[4]; // player reds +extern s32 gPlayerGlareGreens[4]; // player greens +extern s32 gPlayerGlareBlues[4]; // player blues extern s32 D_ctx_801783C0[4]; -extern f32 D_ctx_801783D0; // something x translate -extern f32 D_ctx_801783D4; // something y translate +extern f32 gSunViewX; // something x translate +extern f32 gSunViewY; // something y translate extern s32 gFogNear; //near extern s32 gFogFar; //far extern UNK_TYPE F_801783E0[12]; -extern s32 D_ctx_80178410; -extern f32 D_ctx_80178414; +extern s32 gStarCount; +extern f32 gStarWarpDistortion; extern f32 D_ctx_80178418; extern UNK_TYPE F_8017841C; -extern f32 D_ctx_80178420; -extern f32 D_ctx_80178424; -extern f32 D_ctx_80178428; +extern f32 gStarfieldX; +extern f32 gStarfieldY; +extern f32 gStarfieldRoll; extern f32 D_ctx_8017842C; extern f32 D_ctx_80178430; extern UNK_TYPE F_80178434; @@ -228,7 +228,7 @@ extern s16 gLifeCount[4]; extern LaserStrength gLaserStrength[4]; extern s32 D_ctx_80161AB8; extern UNK_TYPE F_80161AC0[16]; -extern Object_80 gObjects80[50]; +extern Scenery gScenery[50]; extern Sprite gSprites[40]; extern Actor gActors[60]; extern Boss gBosses[4]; @@ -246,13 +246,13 @@ extern f32 gActor194xRot[2][100]; extern f32 gActor194yRot[2][100]; extern f32 gActor194zRot[2][100]; extern u16 gEnemyShotSpeed; // enemy shot speed? -extern u8 D_ctx_80177830; // show level complete status overlay -extern s32 gLevelStatusScreenTimer; // level clear related +extern u8 gShowLevelClearStatusScreen; // show level complete status overlay +extern s32 gLevelStartStatusScreenTimer; // level clear related extern s32 gLevelClearScreenTimer; // timer for mission accomplished scrren extern s32 gBossHealthBar; extern s32 D_ctx_80177850; // bonus text related. set to 15 but never read extern s32 D_ctx_80177858[4]; -extern s32 D_ctx_80177870[4]; +extern s32 gPlayerForms[4]; extern s32 gHandicap[4]; extern VsStage gVersusStage; extern s32 D_ctx_801778A4; @@ -279,15 +279,15 @@ extern s32 D_Timer_80177A38[4]; extern s32 D_Timer_80177A70[4]; extern s32 D_Timer_80177A88[4]; extern f32 D_ctx_80177AA0[4]; -extern f32 D_ctx_80177AB8[4]; -extern s32 D_ctx_80177AD0[4]; -extern s32 D_ctx_80177AE8[4]; -extern s32 D_ctx_80177B00[4][4]; -extern u8 D_Timer_80177B44; -extern u8 D_ctx_80177B4C; -extern u8 D_ctx_80177B6C; -extern u8 gGreatFoxIntact; -extern u8 D_ctx_80177BAC; +extern f32 gShieldAlpha[4]; +extern s32 gHasShield[4]; +extern s32 gShieldTimer[4]; +extern s32 gVsLockOnTimers[4][4]; +extern u8 gStartAndrossFightTimer; +extern u8 gSoShieldsEmpty; +extern u8 gCoUturnCount; +extern u8 gGreatFoxIntact; +extern u8 gTiStartLandmaster; extern u16 gControllerRumbleTimers[4]; extern u16 D_ctx_80177C30[4]; extern s32 D_ctx_80177C50; @@ -321,11 +321,11 @@ extern f32 D_ctx_80178028[65]; extern f32 D_ctx_80178130[65]; extern u8 D_ctx_80178238[65]; extern Player* gPlayer; -extern f32* D_ctx_80178288; -extern f32* D_ctx_80178290; -extern u32* D_ctx_80178298; +extern f32* gStarOffsetsX; +extern f32* gStarOffsetsY; +extern u32* gStarFillColors; extern UNK_TYPE F_801782A0; -extern Object_58* gObjects58; +extern Scenery360* gScenery360; extern UNK_TYPE F_801782B0; extern s32 D_ctx_801782B8; extern s32 D_ctx_801782BC; diff --git a/include/fox_option.h b/include/fox_option.h index 5078e561..cefc10c5 100644 --- a/include/fox_option.h +++ b/include/fox_option.h @@ -57,7 +57,7 @@ typedef struct { } UnkStruct_D_menu_801B9250; typedef enum OptionId { - OPTION_MAIN = 1000, + OPTION_MAIN_MENU = 1000, OPTION_VERSUS_STAGE = 2000, OPTION_MAP = 0, OPTION_TRAINING = 1, @@ -81,7 +81,7 @@ extern u8* D_menu_801B68B0[]; extern u8* D_menu_801B68D4[]; extern s32 D_menu_801B8220[]; // total hits ranking? see Option_80197DE4 -extern s32 D_menu_801B827C; +extern s32 D_menu_801B827C; // engine extern s32 D_menu_801B8280; extern s32 D_menu_801B8284; extern s32 D_menu_801B8288; @@ -97,7 +97,7 @@ extern u8 D_menu_801C6C10[96 * 96]; extern u8 D_menu_801C9010[96 * 96]; extern u8 D_menu_801CB410[96 * 96]; -void Title_801877F0(void); +void Title_UpdateEntry(void); s32 Title_80187ABC(void); void Title_80187B00(void); void Title_80187E28(void); @@ -219,7 +219,7 @@ void Option_8019DF64(void); void Option_InvoiceUpdate(void); void Option_InvoiceDraw(void); -void Map_8019E8D0(void); +void Map_Main(void); void Map_801A07E8(u8*, u8*, f32*); void Map_801AD7EC(s32, s32, s32); void Map_801A9FD4(s32); diff --git a/include/functions.h b/include/functions.h index 939370b7..94669d15 100644 --- a/include/functions.h +++ b/include/functions.h @@ -2,7 +2,6 @@ #define FUNCTIONS_H #include "sys.h" -#include "structs.h" #include "sf64object.h" #include "sf64player.h" #include "sf64mesg.h" @@ -42,13 +41,13 @@ void PlayerShot_Update(void); void PlayerShot_Draw(void); // fox_bg -void func_bg_8003DAF0(void); -void func_bg_8003DE68(s32, s32); -void func_bg_8003E1E8(void); -void func_bg_80040450(void); -void func_bg_80040954(void); +void Background_DrawStarfield(void); +void Background_DrawPartialStarfield(s32, s32); +void Background_DrawBackdrop(void); +void Background_DrawSun(void); +void Background_DrawLensFlare(void); void func_bg_80040CDC(void); -void func_bg_80040CE4(void); +void Background_DrawGround(void); void func_bg_80042D38(void); // fox_boss @@ -94,8 +93,8 @@ void func_display_80057814(Player*); void Play_Draw(void); // fox_edata -void func_edata_800594F0(Object_80*); -void func_edata_800595D0(Object_80*); +void func_edata_800594F0(Scenery*); +void func_edata_800595D0(Scenery*); void func_edisplay_800596C0(void); void func_edata_800596B0(Actor*); @@ -104,14 +103,14 @@ void Graphics_SetScaleMtx(f32); void Sprite168_Draw(Sprite*); void Actor201_Draw(Actor*); void Actor202_Draw(Actor*); -void Obj39_Draw(Object_80*); -void func_edisplay_80059B20(Object_80*); -void Obj42_Draw(Object_80*); +void Obj39_Draw(Scenery*); +void func_edisplay_80059B20(Scenery*); +void Obj42_Draw(Scenery*); void Actor196_Draw(Actor*); void Sprite167_Draw(Sprite*); void FogShadow_Draw(Sprite*); -void func_edisplay_80059F68(Object_80*); -void func_edisplay_80059FDC(Object_80*); +void func_edisplay_80059F68(Scenery*); +void func_edisplay_80059FDC(Scenery*); void Actor189_Draw(Actor*); void Actor_DrawEngineAndContrails(Actor*); void Actor_DrawEngineGlow(Actor*, s32); @@ -133,7 +132,7 @@ void Object_ClampSfxSource(f32*); void func_edisplay_8005F0E8(f32*, Vec3f*); void func_edisplay_8005F1EC(f32*); void func_edisplay_8005F290(f32*, Vec3f*); -void func_edisplay_8005F670(Vec3f*); +void Display_SetSecondLight(Vec3f*); bool func_edisplay_8005F9DC(Vec3f*); // fox_enmy @@ -145,7 +144,7 @@ void func_enmy_80060F30(f32* , u32 , s32 ); void Object_Kill(Object*, f32*); bool func_enmy_80060FE4(Vec3f*, f32); void Object_SetInfo(ObjectInfo* info, u32 objId); -void Object_80_Initialize(Object_80*); +void Scenery_Initialize(Scenery*); void Sprite_Initialize(Sprite*); void Actor_Initialize(Actor*); void Boss_Initialize(Boss*); @@ -163,7 +162,7 @@ bool Object_CheckHitboxCollision(Vec3f* pos, f32* hitboxData, Object* obj, f32 x bool Object_CheckSingleHitbox(Vec3f*, f32*, Vec3f*); bool Object_CheckPolyCollision(Vec3f* , Vec3f* , ObjectId , Object* ); s32 Object_CheckCollision(s32 , Vec3f* , Vec3f* , s32 ); -void func_enmy_800652CC(Object_80*); +void func_enmy_800652CC(Scenery*); void func_enmy_800654E4(Object*); void func_enmy_800656D4(Actor*); void func_enmy_800660F0(Actor*); @@ -172,10 +171,10 @@ void func_enmy_8006654C(Actor*); void func_enmy_8006684C(Actor*); void func_enmy_800669A0(Actor*); void func_enmy_80066A80(Actor*); -void func_enmy_80066C00(Object_80*); -void func_enmy_80066D5C(Object_80*); +void func_enmy_80066C00(Scenery*); +void func_enmy_80066D5C(Scenery*); void Sprite167_Update(Sprite*); -void func_enmy_80066EA8(Object_80*); +void func_enmy_80066EA8(Scenery*); void func_enmy_80066EF0(Item*); void func_enmy_800671D0(Item*); void func_enmy_800674B4(f32, f32, f32, f32, f32, f32, f32, f32); @@ -198,12 +197,12 @@ void Object_Dying(s32, ObjectId); void Effect_Move(Effect*); void Actor_Move(Actor*); void Boss_Move(Boss*); -void Object80_Move(Object_80*); +void Scenery_Move(Scenery*); void Sprite_Move(Sprite*); void Item_Move(Item*); void Actor_Update(Actor*); void Boss_Update(Boss*); -void Object_80_Update(Object_80*); +void Scenery_Update(Scenery*); void Sprite_Update(Sprite*); void Item_Update(Item*); void Effect_Update(Effect*); @@ -214,16 +213,16 @@ void Object_Update(void); //fox_enmy2 void Actor237_Update(Actor*); void Actor237_Draw(Actor*); -void Obj54_Update(Object_80*); +void Obj54_Update(Scenery*); void Actor201_Update(Actor*); void Actor202_Update(Actor*); void Actor194_Update(Actor*); void Actor194_Init(Actor*); void Actor194_Draw(Actor*); -void Obj42_Update(Object_80*); +void Obj42_Update(Scenery*); void Actor196_Update(Actor*); void Actor189_Update(Actor*); -void Obj39_Update(Object_80*); +void Obj39_Update(Scenery*); void func_enmy2_8006ECBC(PlayerShotId, PlayerShot*, s32, f32, f32, f32, f32, f32, f32, f32, f32, f32); void func_enmy2_8006EEFC(s32, f32, f32, f32, f32, f32, f32, f32, f32, f32); void func_enmy2_8006EFA0(s32 unk0E4, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 xRot, f32 yRot, @@ -231,7 +230,7 @@ void func_enmy2_8006EFA0(s32 unk0E4, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 void ActorEvent_8006F0D8(f32 xPos, f32 yPos, f32 zPos, f32 scale1); void ActorEvent_8006F254(Actor*); void ActorEvent_Update(Actor*); -s32 Obj111_Draw(Object_80*); +s32 Obj111_Draw(Scenery*); void ActorEvent_Draw(Actor*); void func_enmy2_800763A4(Actor*); void ActorEvent_Dying(Actor*); @@ -419,11 +418,11 @@ bool func_hud_800924E0(Actor*); void ActorTeamBoss_Init(Actor*); void ActorTeamBoss_Update(Actor* this); void func_hud_80093164(Actor*); -void func_hud_800935E8(Player*); +void HUD_AquasStart(Player*); void func_hud_800953A0(Actor*, s32); void func_hud_8009546C(Actor*, s32); void func_hud_80095538(Actor*, s32); -void func_hud_80095604(Player*); +void HUD_AquasComplete(Player*); void func_hud_80094954(Effect*); void func_hud_80094BBC(Effect*); void func_hud_80094D20(f32, f32); @@ -446,10 +445,10 @@ bool Play_CheckMedalStatus(u16); void func_play_800A3FB0(void); s32 Play_GetMaxShields(void); void func_play_800A6028(f32*, u32); -void func_play_800AC290(Player* player, PlayerShot* shot, f32 arg2, f32 arg3, PlayerShotId shotId, f32 arg5); +void func_play_800AC290(Player* player, PlayerShot* shot, f32 arg2, f32 arg3, PlayerShotId shotId, f32 speed); void Play_Setup(void); void func_play_800A594C(void); -void func_play_800A5D6C(void); +void Play_SetupStarfield(void); void func_play_800A5EBC(void); void func_play_800A5FA0(f32* , u32 , s32 ); void func_play_800A6070(f32* , u32 ); @@ -491,22 +490,20 @@ void func_play_800A887C(Player* player); s32 func_play_800A7974(Player* player, f32* hitboxData, s32* index, f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 zRot, f32 arg9, f32 argA, f32 argB); bool func_play_800A8054(ObjectId objId, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, Vec3f* arg7, Vec3f* arg8); -void Object_58_Initialize(Object_58*); +void Scenery360_Initialize(Scenery360*); // fox_versus s32 func_versus_800C1E9C(void); void func_versus_800C1ED4(void); -void func_versus_800C20B0(void); +void Versus_StartMatch(void); void func_versus_800C2190(void); void func_versus_800C26C8(void); void OvlMenu_CallFunction(u32, void*); -void Map_8019E8D0(void); +void Map_Main(void); -void Venom1_80198414(void); - -void Ending_8018A96C(void); -void Ending_8018AAC4(void); +void Ending_Main(void); +void Ending_Draw(void); // sf_i5_5 bool Ground_801B49D0(Actor* actor); diff --git a/include/global.h b/include/global.h index a17e6200..faabf9c4 100644 --- a/include/global.h +++ b/include/global.h @@ -27,7 +27,6 @@ typedef enum OverlayCalls { #include "functions.h" #include "variables.h" #include "context.h" -#include "structs.h" #include "sf64mesg.h" #include "assets/ast_radio.h" #include "sf64object.h" diff --git a/include/i1.h b/include/i1.h index 90c56785..5316bb5d 100644 --- a/include/i1.h +++ b/include/i1.h @@ -2,7 +2,6 @@ #define I1_H #include "libc/stdbool.h" -#include "structs.h" #include "sf64object.h" #include "sf64thread.h" #include "sf64player.h" @@ -11,9 +10,9 @@ extern Gfx* D_VE1_8019A008[]; extern f32 D_VE1_8019A9B8[]; -extern void Corneria_8018F880(Player*); -extern void Corneria_80191160(Player*); -extern void Venom1_801988B8(Player*); +extern void Corneria_LevelStart(Player*); +extern void Corneria_LevelComplete1(Player*); +extern void Venom1_LevelStart(Player*); void Corneria_801875A4(Sprite*); void Corneria_80189058(Boss*); @@ -34,8 +33,8 @@ void Corneria_8018ECAC(Boss*); void Corneria_8018ED78(Boss*); void Corneria_8018EE84(Boss*); void Corneria_8018EF90(Boss*); -void Corneria_8018F044(Object_80*); -void Corneria_8018F31C(Object_80*); +void Corneria_8018F044(Scenery*); +void Corneria_8018F31C(Scenery*); void Venom1_BossTrigger1_Update(Sprite*); void Venom1_BossTrigger2_Update(Sprite*); void Venom1_BossTrigger3_Update(Sprite*); @@ -46,19 +45,19 @@ void Venom1_80192E2C(Actor*); void Venom1_80192EB0(Actor*); void Venom1_801933DC(Actor*); void Venom1_801934D0(Actor*); -void Venom1_80193540(Object_80*); +void Venom1_80193540(Scenery*); void Venom1_80194398(Boss*); void Venom1_801985E4(Boss*); void Training_ItemRing_Update(Item*); void OvlI1_CallFunction(s32, void*); -void Corneria_80187530(Object_80*); -void Corneria_8018753C(Object_80*); +void Corneria_80187530(Scenery*); +void Corneria_8018753C(Scenery*); void Corneria_Boss292_Init(Boss *); void Corneria_8018B0B4(Actor *); void Corneria_Boss293_Init(Boss *); void Corneria_8018ED78(Boss*); -void Venom1_801924A8(Object_80* ); +void Venom1_801924A8(Scenery* ); void Venom1_8019250C(Actor *); void Venom1_80192CB0(Actor *); void Venom1_80192EA4(Actor *); diff --git a/include/i2.h b/include/i2.h index c4f43be6..326cfe64 100644 --- a/include/i2.h +++ b/include/i2.h @@ -2,17 +2,16 @@ #define I2_H #include "libc/stdbool.h" -#include "structs.h" #include "sf64object.h" #include "sf64thread.h" #include "sf64player.h" #include "sf64mesg.h" -void Meteo_8018CD8C(Player*); -void Meteo_8018E084(Player*); +void Meteo_LevelStart(Player*); +void Meteo_LevelComplete(Player*); void Meteo_8018ED9C(Actor*); -void SectorX_80193A30(Player*); -void SectorX_80194728(Player*); +void SectorX_LevelStart(Player*); +void SectorX_LevelComplete(Player*); void OvlI2_CallFunction(s32, void*); void Meteo_80187B08(Actor *); diff --git a/include/i3.h b/include/i3.h index 75acfa8d..94a5c041 100644 --- a/include/i3.h +++ b/include/i3.h @@ -2,7 +2,6 @@ #define I3_H #include "libc/stdbool.h" -#include "structs.h" #include "sf64object.h" #include "sf64thread.h" #include "sf64player.h" @@ -22,8 +21,8 @@ void OvlI3_CallFunction(s32, void*); void Area6_BossA6_Init(Boss *); void Area6_80187944(Boss*); void Area6_8018C54C(Boss*); -void Area6_8018DF74(Player *player); -void Area6_8018ED78(Player*); +void Area6_LevelStart(Player *player); +void Area6_LevelComplete(Player*); void Zoness_801900FC(Vec3f*, Vec3f*, f32, f32, f32, s32, f32, s32, s32); void Zoness_80190430(Actor* actor); @@ -72,8 +71,8 @@ void Zoness_8019CE58(Actor* actor); void Zoness_Actor247_Init(Actor* this); void Zoness_8019D15C(Actor* actor); void Zoness_8019D3C4(Actor* actor); -void Zoness_8019D428(Player* player); -void Zoness_8019D76C(Player* player); +void Zoness_LevelStart(Player* player); +void Zoness_LevelComplete(Player* player); void Solar_8019E8B8(f32, f32, f32, f32); void Solar_8019E9F4(f32, f32, f32, f32, f32, f32, f32, s32); @@ -83,11 +82,11 @@ void Solar_8019F7AC(Actor*); void Solar_801A003C(Actor*); void Solar_801A0120(Effect*); void Solar_801A0AF0(Effect*); -void Solar_801A10F4(Player* player); +void Solar_LevelStart(Player* player); void Solar_801A5B3C(Boss*); void Solar_801A71B8(Boss*); void Solar_801A8BE8(Actor*); -void Solar_801A7930(Player* player); +void Solar_LevelComplete(Player* player); void Aquas_801A9824(void); void Aquas_801AA20C(void); @@ -142,7 +141,7 @@ void Aquas_801BD264(Actor*); void Aquas_801BD54C(Actor*); void Aquas_801BDE6C(Actor*); void Aquas_801BDF14(void); -void Aquas_801BE1FC(Object_80*); +void Aquas_801BE1FC(Scenery*); void Aquas_801BE3F8(Actor*); void Aquas_801BEB1C(Actor*); void Aquas_801BEC50(Boss*); diff --git a/include/i4.h b/include/i4.h index 17756715..ee344aad 100644 --- a/include/i4.h +++ b/include/i4.h @@ -2,7 +2,6 @@ #define I4_H #include "libc/stdbool.h" -#include "structs.h" #include "sf64object.h" #include "sf64thread.h" #include "sf64player.h" @@ -11,21 +10,21 @@ extern s32 D_BO_801A03DC; extern Matrix D_BO_8019EE80; -void Bolse_8018EF6C(Player*); -void Bolse_8018F94C(Player*); -void Katina_80192E20(Player*); -void Katina_80197290(Player*); +void Bolse_LevelStart(Player*); +void Bolse_LevelComplete(Player*); +void Katina_LevelStart(Player*); +void Katina_LevelComplete(Player*); void Katina_80197F10(Actor*); -void SectorZ_8019BA64(Player*); -void SectorZ_8019C85C(Player*); +void SectorZ_LevelStart(Player*); +void SectorZ_LevelComplete(Player*); void SectorZ_8019DD20(Actor*); void OvlI4_CallFunction(u32, void*); void Fortuna_80187960(Actor*); void Fortuna_8018BA2C(void); -void Bolse_8018C158(Actor*); +void Bolse_UpdateEventHandler(Actor*); void Bolse_80191ED8(void); -void Bolse_80192264(void); +void Bolse_DrawDynamicGround(void); void Katina_Boss316_Init(Boss *); void Katina_80198594(Actor*); void Katina_80198930(void); diff --git a/include/i5.h b/include/i5.h index a711acd7..c73f6513 100644 --- a/include/i5.h +++ b/include/i5.h @@ -2,7 +2,6 @@ #define I5_H #include "libc/stdbool.h" -#include "structs.h" #include "sf64object.h" #include "sf64thread.h" #include "sf64player.h" @@ -17,15 +16,15 @@ extern u8 D_MA_801BA1E8; extern f32 D_MA_801BE250[40]; extern s16 D_MA_801BE2F0[9]; -void Titania_8018769C(Player*); -void Titania_801882CC(Player*); -void Macbeth_801AC754(Player*); -void Macbeth_801AF8F4(Player*); +void Titania_LevelStart(Player*); +void Titania_LevelComplete(Player*); +void Macbeth_LevelStart(Player*); +void Macbeth_LevelComplete2(Player*); void Macbeth_801B28BC(Actor*); -void Macbeth_801B3D04(Player*); +void Macbeth_LevelComplete1(Player*); void OvlI5_CallFunction(u32 mode, void* ptr); -void Titania_8018769C(Player *); +void Titania_LevelStart(Player *); void Titania_80188F30(void); void Titania_80189B80(Actor *); void Titania_8018ADC4(Actor *); @@ -36,7 +35,7 @@ void Titania_8018E3B0(Actor *); void Titania_8018E3CC(Actor *); void Titania_8018E5E8(Actor *); void Titania_8018EFF0(Sprite *); -void Titania_8018F0D8(Object_80 *); +void Titania_8018F0D8(Scenery *); void Titania_Boss306_Init(Boss *); void Titania_801990DC(Boss *); void Macbeth_80199920(void); @@ -46,7 +45,7 @@ void Macbeth_801A4660(Actor *); void Macbeth_801A4AF8(Actor *); void Macbeth_801A5E2C(Actor *); void Macbeth_801A6134(Actor *); -void Macbeth_801A65E0(Object_80 *); +void Macbeth_801A65E0(Scenery *); void Macbeth_801A7D98(Actor *); void Macbeth_801ACFBC(void); void Macbeth_801AD080(void); @@ -81,8 +80,8 @@ void Titania_8018E5B4(Actor*); void Titania_8018E5F8(Actor*); void Titania_8018EF14(Actor*); void Titania_Cactus_Update(Sprite*); -void Titania_8018F4D8(Object_80*); -void Titania_8018F8B8(Object_80*); +void Titania_8018F4D8(Scenery*); +void Titania_8018F8B8(Scenery*); void Titania_80197A94(Boss*); void Titania_801982A8(Boss*); void Macbeth_8019C778(Actor*); @@ -92,13 +91,13 @@ void Macbeth_8019E410(Actor*); void Macbeth_8019EA60(Actor*); void Macbeth_8019EE68(Actor*); void Macbeth_8019FF9C(Actor*); -void Macbeth_801A0BD8(Object_80*); +void Macbeth_801A0BD8(Scenery*); void Macbeth_801A12C4(Actor*); -void Macbeth_801A23AC(Object_80*); -void Macbeth_801A2A78(Object_80*); -void Macbeth_801A2B24(Object_80*); -void Macbeth_801A2DD8(Object_80*); -void Macbeth_801A3240(Object_80*); +void Macbeth_801A23AC(Scenery*); +void Macbeth_801A2A78(Scenery*); +void Macbeth_801A2B24(Scenery*); +void Macbeth_801A2DD8(Scenery*); +void Macbeth_801A3240(Scenery*); void Macbeth_801A3E98(Actor*); void Macbeth_801A43BC(Actor*); void Macbeth_801A46A0(Actor*); @@ -115,7 +114,7 @@ void Macbeth_801A5FD0(Actor*); void Macbeth_801A6100(Actor*); void Macbeth_801A6144(Actor*); void Macbeth_801A6540(Actor*); -void Macbeth_801A6608(Object_80*); +void Macbeth_801A6608(Scenery*); void Macbeth_801A67C8(Actor*); void Macbeth_801A68EC(Actor*); void Macbeth_801A7E7C(Actor*); diff --git a/include/i6.h b/include/i6.h index aac0db72..c2b998bf 100644 --- a/include/i6.h +++ b/include/i6.h @@ -2,7 +2,6 @@ #define I6_H #include "libc/stdbool.h" -#include "structs.h" #include "sf64object.h" #include "sf64thread.h" #include "sf64player.h" @@ -17,9 +16,9 @@ extern f32 D_Andross_801A7F78; void Andross_80187530(Actor*); void Andross_80193C4C(Player*); void Andross_80195E44(Actor*); -void Venom2_80196BF8(Player*); -void Venom2_80196D88(Player*); -void SectorY_8019EE60(Player*); +void Venom2_LevelStart(Player*); +void Venom2_LevelComplete(Player*); +void SectorY_LevelComplete(Player*); void SectorY_8019FF00(Actor*); void SectorY_801A0AC0(Player*); @@ -57,17 +56,17 @@ void Andross_8018DBF0(Boss*); void Andross_801928C8(Boss*); void Andross_80192E94(Actor*); void Andross_80193244(Actor*); -void Andross_80193380(Object_80*); -void Andross_8019350C(Object_80*); -void Andross_8019356C(Object_80*); -void Andross_801935D4(Object_80*); +void Andross_80193380(Scenery*); +void Andross_8019350C(Scenery*); +void Andross_8019356C(Scenery*); +void Andross_801935D4(Scenery*); void Venom2_80196210(Boss*); void Venom2_80196288(Boss*); void SectorY_80197C64(Effect*); -void SectorY_80197CB8(Object_80*); +void SectorY_80197CB8(Scenery*); void SectorY_8019C888(Boss*); void SectorY_8019E2C4(Boss*); -void SectorY_801A4E44(Object_80*); -void SectorY_801A52B8(Object_80*); +void SectorY_801A4E44(Scenery*); +void SectorY_801A52B8(Scenery*); #endif diff --git a/include/prevent_context_reordering.h b/include/prevent_context_reordering.h index 84c18cfc..9da5e25d 100644 --- a/include/prevent_context_reordering.h +++ b/include/prevent_context_reordering.h @@ -5,11 +5,11 @@ // struct Dummy0 {int x;}; // struct Dummy1 {int x;}; // struct Dummy2 {int x;}; -// struct Dummy3 {int x;}; -// struct Dummy4 {int x;}; -// struct Dummy5 {int x;}; -// struct Dummy6 {int x;}; -// struct Dummy7 {int x;}; +struct Dummy3 {int x;}; +struct Dummy4 {int x;}; +struct Dummy5 {int x;}; +struct Dummy6 {int x;}; +struct Dummy7 {int x;}; struct Dummy8 {int x;}; struct Dummy9 {int x;}; struct Dummy10 {int x;}; diff --git a/include/sf64audio_external.h b/include/sf64audio_external.h index 190f09be..51e9e3e9 100644 --- a/include/sf64audio_external.h +++ b/include/sf64audio_external.h @@ -9,6 +9,12 @@ #define AUDIO_SET_SPEC(sfxLayout, spec) Audio_SetAudioSpec(0, ((sfxLayout) << 8) | (spec)) #define AUDIO_SET_SPEC_ALT(sfxLayout, spec) Audio_SetAudioSpec((sfxLayout), ((sfxLayout) << 8) | (spec)) +typedef enum AudioType { + /* 0 */ AUDIO_TYPE_MUSIC, + /* 1 */ AUDIO_TYPE_VOICE, + /* 2 */ AUDIO_TYPE_SFX, +} AudioType; + typedef enum { /* 0 */ SFXCHAN_0, /* 1 */ SFXCHAN_1, @@ -147,7 +153,7 @@ s32 Audio_GetCurrentVoice(void); s32 Audio_GetCurrentVoiceStatus(void); void func_8001AF40(u8 unkVoiceParam); u8* Audio_UpdateFrequencyAnalysis(void); -void func_8001C8B8(u8 playerId); +void Audio_StartPlayerNoise(u8 playerId); void func_8001CA24(u8 playerId); void func_8001CB80(u8 playerId, u8 arg1); void func_8001CCDC(u8 playerId, f32* sfxSource); @@ -168,7 +174,7 @@ void Audio_PlayFanfare(u16 seqId, u8 bgmVolume, u8 bgmFadeoutTime, u8 bgmFadeinT void func_8001D520(void); void func_8001D638(u8 arg0); void func_8001D6DC(u8 arg0); -void func_8001D8A8(u8 audioType, u8 volume); +void Audio_SetVolume(u8 audioType, u8 volume); void Audio_PlaySoundTest(u8 enable); void Audio_PlaySequenceDistorted(u8 seqPlayId, u16 seqId, u16 distortion, u8 fadeinTime, u8 unused); void Audio_PlaySoundTestTrack(u8 trackNumber); diff --git a/include/sf64dma.h b/include/sf64dma.h index f17af54d..64447681 100644 --- a/include/sf64dma.h +++ b/include/sf64dma.h @@ -64,8 +64,8 @@ #define SEGMENT_BSS_END(segment) (segment ## _BSS_END) #define SEGMENT_BSS_SIZE(segment) ((uintptr_t)SEGMENT_BSS_END(segment) - (uintptr_t)SEGMENT_BSS_START(segment)) -u8 Overlay_Load(u8, u8); -void Overlay_InitDma(void); +u8 Load_SceneSetup(u8 sceneId, u8 sceneSetup); +void Load_InitDmaAndMsg(void); typedef struct { /* 0x0 */ void* start; @@ -82,7 +82,7 @@ typedef struct { typedef struct { /* 0x00 */ OverlayOffsets ovl; /* 0x20 */ SegmentOffset assets[15]; -} OverlayInit; // size = 0x98 +} Scene; // size = 0x98 typedef struct { /* 0x0 */ void* vRomAddress; @@ -92,35 +92,6 @@ typedef struct { extern DmaEntry gDmaTable[]; // 178A70 -extern OverlayInit sNoOvl_Logo[1]; // sets segment 15 with no overlay -extern OverlayInit sOvlending_Ending[6]; // overlay EF0260 -extern OverlayInit sOvlmenu_Title[1]; // EBFBE0 -extern OverlayInit sOvlmenu_Option[1]; // EBFBE0 -extern OverlayInit sOvlmenu_Map[1]; // EBFBE0 -extern OverlayInit sOvlmenu_GameOver[1]; // EBFBE0 -extern OverlayInit sOvli1_Corneria[1]; // fox_i1 -extern OverlayInit sOvli2_Meteo[2]; // fox_i2 -extern OverlayInit sOvli5_Titania[6]; // E6A810 -extern OverlayInit sOvli2_SectorX[2]; // fox_i2 -extern OverlayInit sOvli4_SectorZ[1]; // i4 -extern OverlayInit sOvli3_Aquas[1]; // i3 -extern OverlayInit sOvli3_Area6[1]; // i3 -extern OverlayInit sOvli4_Fortuna[2]; // i4 -extern OverlayInit sOvli3_Unk4[1]; // i3 -extern OverlayInit sOvli6_SectorY[1]; // E9F1D0 -extern OverlayInit sOvli3_Solar[1]; // i3 -extern OverlayInit sOvli3_Zoness[1]; // i3 -extern OverlayInit sOvli1_Venom1[1]; // fox_i1 -extern OverlayInit sOvli6_Andross[1]; // E9F1D0 -extern OverlayInit sOvli6_Venom2[2]; // E9F1D0 -extern OverlayInit sOvli2_Setup20[1]; // fox_i2 -extern OverlayInit sOvli4_Bolse[1]; // i4 -extern OverlayInit sOvli4_Katina[1]; // i4 -extern OverlayInit sOvli5_Macbeth[2]; // E6A810 -extern OverlayInit sOvli1_Training[1]; // fox_i1 -extern OverlayInit sOvli2_Versus[2]; // fox_i2 -extern OverlayInit sUnused_Overlay[1]; // EFFA40 - DECLARE_SEGMENT(makerom); DECLARE_SEGMENT(main); DECLARE_SEGMENT(dma_table); diff --git a/include/sf64level.h b/include/sf64level.h index 4591fa92..24f7aaeb 100644 --- a/include/sf64level.h +++ b/include/sf64level.h @@ -1,8 +1,6 @@ #ifndef SF64_LEVEL #define SF64_LEVEL -#include "structs.h" - #define SAVE_SLOT_SOLAR 13 #define SAVE_SLOT_VENOM_1 14 #define SAVE_SLOT_VENOM_2 15 @@ -33,35 +31,35 @@ typedef struct { /* 0x40 */ s32 ambB; } EnvSettings; // size = 0x44 -typedef enum { - /* 0 */ OVL_SETUP_TITLE, - /* 1 */ OVL_SETUP_MENU, - /* 2 */ OVL_SETUP_MAP, - /* 3 */ OVL_SETUP_GAME_OVER, - /* 4 */ OVL_SETUP_CREDITS, - /* 5 */ OVL_SETUP_CORNERIA, - /* 6 */ OVL_SETUP_METEO, - /* 7 */ OVL_SETUP_TITANIA, - /* 8 */ OVL_SETUP_SECTOR_X, - /* 9 */ OVL_SETUP_AQUAS, - /* 10 */ OVL_SETUP_AREA_6, - /* 11 */ OVL_SETUP_FORTUNA, - /* 12 */ OVL_SETUP_UNK_4, - /* 13 */ OVL_SETUP_SECTOR_Y, - /* 14 */ OVL_SETUP_SOLAR, - /* 15 */ OVL_SETUP_ZONESS, - /* 16 */ OVL_SETUP_VENOM_ANDROSS, - /* 17 */ OVL_SETUP_TRAINING, - /* 18 */ OVL_SETUP_VENOM_1, - /* 19 */ OVL_SETUP_KATINA, - /* 10 */ OVL_SETUP_20, - /* 11 */ OVL_SETUP_MACBETH, - /* 12 */ OVL_SETUP_BOLSE, - /* 13 */ OVL_SETUP_SECTOR_Z, - /* 14 */ OVL_SETUP_VENOM_2, - /* 50 */ OVL_SETUP_VERSUS = 50, - /* 99 */ OVL_SETUP_LOGO = 99, -} OverlaySetups; +typedef enum SceneId { + /* 0 */ SCENE_TITLE, + /* 1 */ SCENE_MENU, + /* 2 */ SCENE_MAP, + /* 3 */ SCENE_GAME_OVER, + /* 4 */ SCENE_CREDITS, + /* 5 */ SCENE_CORNERIA, + /* 6 */ SCENE_METEO, + /* 7 */ SCENE_TITANIA, + /* 8 */ SCENE_SECTOR_X, + /* 9 */ SCENE_AQUAS, + /* 10 */ SCENE_AREA_6, + /* 11 */ SCENE_FORTUNA, + /* 12 */ SCENE_UNK_4, + /* 13 */ SCENE_SECTOR_Y, + /* 14 */ SCENE_SOLAR, + /* 15 */ SCENE_ZONESS, + /* 16 */ SCENE_VENOM_ANDROSS, + /* 17 */ SCENE_TRAINING, + /* 18 */ SCENE_VENOM_1, + /* 19 */ SCENE_KATINA, + /* 10 */ SCENE_20, + /* 11 */ SCENE_MACBETH, + /* 12 */ SCENE_BOLSE, + /* 13 */ SCENE_SECTOR_Z, + /* 14 */ SCENE_VENOM_2, + /* 50 */ SCENE_VERSUS = 50, + /* 99 */ SCENE_LOGO = 99, +} SceneId; typedef enum LevelId { /* -1 */ LEVEL_UNK_M1 = -1, diff --git a/include/sf64math.h b/include/sf64math.h index 7fe5a7c2..ec05b23c 100644 --- a/include/sf64math.h +++ b/include/sf64math.h @@ -23,6 +23,11 @@ typedef struct { /* 0x0C */ Vec3f rot; } PosRot; // size = 0x18 +typedef struct { + /* 0x00 */ Vec3f eye; + /* 0x0C */ Vec3f at; +} CameraPoint; // size = 0x18 + typedef struct { /* 0x0 */ s16 vtx[3]; } Triangle; // size = 0x6 diff --git a/include/sf64object.h b/include/sf64object.h index b840aac4..9fb29722 100644 --- a/include/sf64object.h +++ b/include/sf64object.h @@ -42,12 +42,12 @@ typedef struct { typedef enum { /* 0 */ COL1_0, // OBJ_ACTOR_180 - /* 1 */ COL1_1, // OBJ_80_39 + /* 1 */ COL1_1, // OBJ_SCENERY_39 /* 2 */ COL1_2, /* 3 */ COL1_3, // ACTOR_EVENT_ID /* 4 */ COL1_4, // OBJ_BOSS_308 - /* 5 */ COL1_5, // OBJ_80_149 - /* 6 */ COL1_6, // OBJ_80_150 + /* 5 */ COL1_5, // OBJ_SCENERY_149 + /* 6 */ COL1_6, // OBJ_SCENERY_150 /* 7 */ COL1_7, // OBJ_BOSS_309 /* 8 */ COL1_8, // OBJ_BOSS_313 /* 9 */ COL1_9, // OBJ_BOSS_312 @@ -55,24 +55,24 @@ typedef enum { typedef enum { /* 0 */ COL2_0, // default - /* 1 */ COL2_1, // OBJ_80_4, OBJ_80_5 - /* 2 */ COL2_2, // OBJ_80_2 - /* 3 */ COL2_3, // OBJ_80_3, OBJ_80_69 - /* 4 */ COL2_4, // OBJ_80_140 + /* 1 */ COL2_1, // OBJ_SCENERY_4, OBJ_SCENERY_5 + /* 2 */ COL2_2, // OBJ_SCENERY_2 + /* 3 */ COL2_3, // OBJ_SCENERY_3, OBJ_SCENERY_69 + /* 4 */ COL2_4, // OBJ_SCENERY_140 /* 5 */ COL2_5, // PLAYERSHOT_7 ? - /* 6 */ COL2_6, // OBJ_80_141 - /* 7 */ COL2_7, // OBJ_80_47 - /* 8 */ COL2_8, // OBJ_80_70 - /* 9 */ COL2_9, // OBJ_80_72 - /* 10 */ COL2_10, // OBJ_80_71 - /* 11 */ COL2_11, // OBJ_80_73 - /* 12 */ COL2_12, // OBJ_80_67 - /* 13 */ COL2_13, // OBJ_80_74 - /* 14 */ COL2_14, // OBJ_80_117 - /* 15 */ COL2_15, // OBJ_80_124 - /* 16 */ COL2_16, // OBJ_80_126 - /* 17 */ COL2_17, // OBJ_80_143 - /* 18 */ COL2_18, // OBJ_80_120 + /* 6 */ COL2_6, // OBJ_SCENERY_141 + /* 7 */ COL2_7, // OBJ_SCENERY_47 + /* 8 */ COL2_8, // OBJ_SCENERY_70 + /* 9 */ COL2_9, // OBJ_SCENERY_72 + /* 10 */ COL2_10, // OBJ_SCENERY_71 + /* 11 */ COL2_11, // OBJ_SCENERY_73 + /* 12 */ COL2_12, // OBJ_SCENERY_67 + /* 13 */ COL2_13, // OBJ_SCENERY_74 + /* 14 */ COL2_14, // OBJ_SCENERY_117 + /* 15 */ COL2_15, // OBJ_SCENERY_124 + /* 16 */ COL2_16, // OBJ_SCENERY_126 + /* 17 */ COL2_17, // OBJ_SCENERY_143 + /* 18 */ COL2_18, // OBJ_SCENERY_120 } CollisionId_2; typedef struct { @@ -85,18 +85,39 @@ typedef struct { } ObjectInit; // size = 0x14 typedef struct { - /* 0x00 */ Gfx* dList; - /* 0x04 */ f32* hitbox; - /* 0x08 */ f32 scale; - /* 0x0C */ f32 info_unk_10; + /* 0x00 */ u8 status; + /* 0x02 */ u16 type; + /* 0x04 */ Vec3f pos; /* 0x10 */ f32 unk_10; - /* 0x14 */ u8 info_unk_16; - /* 0x15 */ u8 info_unk_14; - /* 0x16 */ u8 sfx; - /* 0x17 */ u8 info_unk_19; - /* 0x18 */ f32 info_unk_1C; - /* 0x1C */ u8 bonus; -} UnkStruct_D003C; // size = 0x20 + /* 0x14 */ char pad14[0x14]; +} RadarMark; // size = 0x28 + +typedef struct { + /* 0x00 */ u8 mode; + /* 0x02 */ u16 timer; + /* 0x04 */ Vec3f unk_04; + /* 0x10 */ Vec3f unk_10; + /* 0x1C */ f32 unk_1C; + /* 0x20 */ f32 unk_20; + /* 0x24 */ f32 unk_24; + /* 0x28 */ f32 unk_28; + /* 0x2C */ u8 unk_2C; // possibly a color struct + /* 0x2D */ u8 unk_2D; + /* 0x2E */ u8 unk_2E; + /* 0x2F */ u8 unk_2F; +} TexturedLine; // size = 0x30 + +typedef struct { + /* 0x00 */ u8 hits; + /* 0x04 */ Vec3f pos; + /* 0x10 */ f32 unk_10; + /* 0x14 */ char pad14[0x4]; + /* 0x18 */ u16 timer; +} BonusText; // size = 0x1C + +#define BONUS_TEXT_FREE 0 +#define BONUS_TEXT_GREAT 100 +#define BONUS_TEXT_1UP 101 typedef enum ObjectStatus { /* 0 */ OBJ_FREE, @@ -127,8 +148,8 @@ typedef struct { /* 0x16 */ s16 unk_16; // can be 0, 1, 2 /* 0x18 */ u8 damage; /* 0x19 */ u8 unk_19; // can be 0, 1, 2 - /* 0x1C */ f32 unk_1C; // y offset of something - /* 0x20 */ u8 bonus; + /* 0x1C */ f32 unk_1C; // target lock y offset. 0.0f can't be targeted + /* 0x20 */ u8 bonus; // bonus hits when killed. 0 means no } ObjectInfo; // size = 0x24 typedef struct { @@ -138,7 +159,7 @@ typedef struct { /* 0x41 */ char unk_41[7]; /* 0x48 */ f32 sfxSource[3]; /* 0x54 */ f32 unk_54; -} Object_58; // size = 0x58 +} Scenery360; // size = 0x58 typedef struct { /* 0x00 */ Object obj; @@ -155,7 +176,7 @@ typedef struct { /* 0x64 */ Vec3f vel; /* 0x70 */ f32 sfxSource[3]; /* 0x7C */ char pad7C[4]; -} Object_80; // size = 0x80 +} Scenery; // size = 0x80 typedef struct { /* 0x00 */ Object obj; @@ -268,13 +289,13 @@ typedef struct { /* 0x0C6 */ u16 timer_0C6; /* 0x0C8 */ u8 unk_0C8; /* 0x0C9 */ u8 unk_0C9; - /* 0x0CA */ u8 timer_0CA[4]; + /* 0x0CA */ u8 lockOnTimers[4]; /* 0x0CE */ s16 health; /* 0x0D0 */ s8 unk_0D0; /* 0x0D2 */ s16 unk_0D2; /* 0x0D4 */ s16 unk_0D4; /* 0x0D6 */ u16 damage; - /* 0x0D8 */ Vec3f unk_0D8; + /* 0x0D8 */ Vec3f hitPos; /* 0x0E4 */ s16 aiType; /* 0x0E6 */ s16 aiIndex; /* 0x0E8 */ Vec3f vel; @@ -288,167 +309,167 @@ typedef struct { typedef enum ObjectId { /* -1 */ OBJ_INVALID=-1, - /* 0 */ OBJ_80_0, - /* 1 */ OBJ_80_1, - /* 2 */ OBJ_80_2, - /* 3 */ OBJ_80_3, - /* 4 */ OBJ_80_4, - /* 5 */ OBJ_80_5, - /* 6 */ OBJ_80_6, - /* 7 */ OBJ_80_7, - /* 8 */ OBJ_80_8, - /* 9 */ OBJ_80_9, - /* 10 */ OBJ_80_10, - /* 11 */ OBJ_80_11, - /* 12 */ OBJ_80_12, - /* 13 */ OBJ_80_13, - /* 14 */ OBJ_80_14, - /* 15 */ OBJ_80_15, - /* 16 */ OBJ_80_16, - /* 17 */ OBJ_80_17, - /* 18 */ OBJ_80_18, - /* 19 */ OBJ_80_19, - /* 20 */ OBJ_80_20, - /* 21 */ OBJ_80_21, - /* 22 */ OBJ_80_22, - /* 23 */ OBJ_80_23, - /* 24 */ OBJ_80_24, - /* 25 */ OBJ_80_25, - /* 26 */ OBJ_80_26, - /* 27 */ OBJ_80_27, - /* 28 */ OBJ_80_28, - /* 29 */ OBJ_80_29, - /* 30 */ OBJ_80_30, - /* 31 */ OBJ_80_31, - /* 32 */ OBJ_80_32, - /* 33 */ OBJ_80_33, - /* 34 */ OBJ_80_34, - /* 35 */ OBJ_80_35, - /* 36 */ OBJ_80_36, - /* 37 */ OBJ_80_37, - /* 38 */ OBJ_80_38, - /* 39 */ OBJ_80_39, - /* 40 */ OBJ_80_40, - /* 41 */ OBJ_80_41, - /* 42 */ OBJ_80_42, - /* 43 */ OBJ_80_43, - /* 44 */ OBJ_80_44, - /* 45 */ OBJ_80_45, - /* 46 */ OBJ_80_46, - /* 47 */ OBJ_80_47, - /* 48 */ OBJ_80_48, - /* 49 */ OBJ_80_49, - /* 50 */ OBJ_80_50, - /* 51 */ OBJ_80_51, - /* 52 */ OBJ_80_52, - /* 53 */ OBJ_80_53, - /* 54 */ OBJ_80_54, - /* 55 */ OBJ_80_55, - /* 56 */ OBJ_80_56, - /* 57 */ OBJ_80_57, - /* 58 */ OBJ_80_58, - /* 59 */ OBJ_80_59, - /* 60 */ OBJ_80_60, - /* 61 */ OBJ_80_61, - /* 62 */ OBJ_80_62, - /* 63 */ OBJ_80_63, - /* 64 */ OBJ_80_64, - /* 65 */ OBJ_80_65, - /* 66 */ OBJ_80_66, - /* 67 */ OBJ_80_67, - /* 68 */ OBJ_80_68, - /* 69 */ OBJ_80_69, - /* 70 */ OBJ_80_70, - /* 71 */ OBJ_80_71, - /* 72 */ OBJ_80_72, - /* 73 */ OBJ_80_73, - /* 74 */ OBJ_80_74, - /* 75 */ OBJ_80_75, - /* 76 */ OBJ_80_76, - /* 77 */ OBJ_80_77, - /* 78 */ OBJ_80_78, - /* 79 */ OBJ_80_79, - /* 80 */ OBJ_80_80, - /* 81 */ OBJ_80_81, - /* 82 */ OBJ_80_82, - /* 83 */ OBJ_80_83, - /* 84 */ OBJ_80_84, - /* 85 */ OBJ_80_85, - /* 86 */ OBJ_80_86, - /* 87 */ OBJ_80_87, - /* 88 */ OBJ_80_88, - /* 89 */ OBJ_80_89, - /* 90 */ OBJ_80_90, - /* 91 */ OBJ_80_91, - /* 92 */ OBJ_80_92, - /* 93 */ OBJ_80_93, - /* 94 */ OBJ_80_94, - /* 95 */ OBJ_80_95, - /* 96 */ OBJ_80_96, - /* 97 */ OBJ_80_97, - /* 98 */ OBJ_80_98, - /* 99 */ OBJ_80_99, - /* 100 */ OBJ_80_100, - /* 101 */ OBJ_80_101, - /* 102 */ OBJ_80_102, - /* 103 */ OBJ_80_103, - /* 104 */ OBJ_80_104, - /* 105 */ OBJ_80_105, - /* 106 */ OBJ_80_106, - /* 107 */ OBJ_80_107, - /* 108 */ OBJ_80_108, - /* 109 */ OBJ_80_109, - /* 110 */ OBJ_80_110, - /* 111 */ OBJ_80_111, - /* 112 */ OBJ_80_112, - /* 113 */ OBJ_80_113, - /* 114 */ OBJ_80_114, - /* 115 */ OBJ_80_115, - /* 116 */ OBJ_80_116, - /* 117 */ OBJ_80_117, - /* 118 */ OBJ_80_118, - /* 119 */ OBJ_80_119, - /* 120 */ OBJ_80_120, - /* 121 */ OBJ_80_121, - /* 122 */ OBJ_80_122, - /* 123 */ OBJ_80_123, - /* 124 */ OBJ_80_124, - /* 125 */ OBJ_80_125, - /* 126 */ OBJ_80_126, - /* 127 */ OBJ_80_127, - /* 128 */ OBJ_80_128, - /* 129 */ OBJ_80_129, - /* 130 */ OBJ_80_130, - /* 131 */ OBJ_80_131, - /* 132 */ OBJ_80_132, - /* 133 */ OBJ_80_133, - /* 134 */ OBJ_80_134, - /* 135 */ OBJ_80_135, - /* 136 */ OBJ_80_136, - /* 137 */ OBJ_80_137, - /* 138 */ OBJ_80_138, - /* 139 */ OBJ_80_139, - /* 140 */ OBJ_80_140, - /* 141 */ OBJ_80_141, - /* 142 */ OBJ_80_142, - /* 143 */ OBJ_80_143, - /* 144 */ OBJ_80_144, - /* 145 */ OBJ_80_145, - /* 146 */ OBJ_80_146, - /* 147 */ OBJ_80_147, - /* 148 */ OBJ_80_148, - /* 149 */ OBJ_80_149, - /* 150 */ OBJ_80_150, - /* 151 */ OBJ_80_151, - /* 152 */ OBJ_80_152, - /* 153 */ OBJ_80_153, - /* 154 */ OBJ_80_154, - /* 155 */ OBJ_80_155, - /* 156 */ OBJ_80_156, - /* 157 */ OBJ_80_157, - /* 158 */ OBJ_80_158, - /* 159 */ OBJ_80_159, - /* 160 */ OBJ_80_160, + /* 0 */ OBJ_SCENERY_0, + /* 1 */ OBJ_SCENERY_1, + /* 2 */ OBJ_SCENERY_2, + /* 3 */ OBJ_SCENERY_3, + /* 4 */ OBJ_SCENERY_4, + /* 5 */ OBJ_SCENERY_5, + /* 6 */ OBJ_SCENERY_6, + /* 7 */ OBJ_SCENERY_7, + /* 8 */ OBJ_SCENERY_8, + /* 9 */ OBJ_SCENERY_9, + /* 10 */ OBJ_SCENERY_10, + /* 11 */ OBJ_SCENERY_11, + /* 12 */ OBJ_SCENERY_12, + /* 13 */ OBJ_SCENERY_13, + /* 14 */ OBJ_SCENERY_14, + /* 15 */ OBJ_SCENERY_15, + /* 16 */ OBJ_SCENERY_16, + /* 17 */ OBJ_SCENERY_17, + /* 18 */ OBJ_SCENERY_18, + /* 19 */ OBJ_SCENERY_19, + /* 20 */ OBJ_SCENERY_20, + /* 21 */ OBJ_SCENERY_21, + /* 22 */ OBJ_SCENERY_22, + /* 23 */ OBJ_SCENERY_23, + /* 24 */ OBJ_SCENERY_24, + /* 25 */ OBJ_SCENERY_25, + /* 26 */ OBJ_SCENERY_26, + /* 27 */ OBJ_SCENERY_27, + /* 28 */ OBJ_SCENERY_28, + /* 29 */ OBJ_SCENERY_29, + /* 30 */ OBJ_SCENERY_30, + /* 31 */ OBJ_SCENERY_31, + /* 32 */ OBJ_SCENERY_32, + /* 33 */ OBJ_SCENERY_33, + /* 34 */ OBJ_SCENERY_34, + /* 35 */ OBJ_SCENERY_35, + /* 36 */ OBJ_SCENERY_36, + /* 37 */ OBJ_SCENERY_37, + /* 38 */ OBJ_SCENERY_38, + /* 39 */ OBJ_SCENERY_39, + /* 40 */ OBJ_SCENERY_40, + /* 41 */ OBJ_SCENERY_41, + /* 42 */ OBJ_SCENERY_42, + /* 43 */ OBJ_SCENERY_43, + /* 44 */ OBJ_SCENERY_44, + /* 45 */ OBJ_SCENERY_45, + /* 46 */ OBJ_SCENERY_46, + /* 47 */ OBJ_SCENERY_47, + /* 48 */ OBJ_SCENERY_48, + /* 49 */ OBJ_SCENERY_49, + /* 50 */ OBJ_SCENERY_50, + /* 51 */ OBJ_SCENERY_51, + /* 52 */ OBJ_SCENERY_52, + /* 53 */ OBJ_SCENERY_53, + /* 54 */ OBJ_SCENERY_54, + /* 55 */ OBJ_SCENERY_55, + /* 56 */ OBJ_SCENERY_56, + /* 57 */ OBJ_SCENERY_57, + /* 58 */ OBJ_SCENERY_58, + /* 59 */ OBJ_SCENERY_59, + /* 60 */ OBJ_SCENERY_60, + /* 61 */ OBJ_SCENERY_61, + /* 62 */ OBJ_SCENERY_62, + /* 63 */ OBJ_SCENERY_63, + /* 64 */ OBJ_SCENERY_64, + /* 65 */ OBJ_SCENERY_65, + /* 66 */ OBJ_SCENERY_66, + /* 67 */ OBJ_SCENERY_67, + /* 68 */ OBJ_SCENERY_68, + /* 69 */ OBJ_SCENERY_69, + /* 70 */ OBJ_SCENERY_70, + /* 71 */ OBJ_SCENERY_71, + /* 72 */ OBJ_SCENERY_72, + /* 73 */ OBJ_SCENERY_73, + /* 74 */ OBJ_SCENERY_74, + /* 75 */ OBJ_SCENERY_75, + /* 76 */ OBJ_SCENERY_76, + /* 77 */ OBJ_SCENERY_77, + /* 78 */ OBJ_SCENERY_78, + /* 79 */ OBJ_SCENERY_79, + /* 80 */ OBJ_SCENERY_80, + /* 81 */ OBJ_SCENERY_81, + /* 82 */ OBJ_SCENERY_82, + /* 83 */ OBJ_SCENERY_83, + /* 84 */ OBJ_SCENERY_84, + /* 85 */ OBJ_SCENERY_85, + /* 86 */ OBJ_SCENERY_86, + /* 87 */ OBJ_SCENERY_87, + /* 88 */ OBJ_SCENERY_88, + /* 89 */ OBJ_SCENERY_89, + /* 90 */ OBJ_SCENERY_90, + /* 91 */ OBJ_SCENERY_91, + /* 92 */ OBJ_SCENERY_92, + /* 93 */ OBJ_SCENERY_93, + /* 94 */ OBJ_SCENERY_94, + /* 95 */ OBJ_SCENERY_95, + /* 96 */ OBJ_SCENERY_96, + /* 97 */ OBJ_SCENERY_97, + /* 98 */ OBJ_SCENERY_98, + /* 99 */ OBJ_SCENERY_99, + /* 100 */ OBJ_SCENERY_100, + /* 101 */ OBJ_SCENERY_101, + /* 102 */ OBJ_SCENERY_102, + /* 103 */ OBJ_SCENERY_103, + /* 104 */ OBJ_SCENERY_104, + /* 105 */ OBJ_SCENERY_105, + /* 106 */ OBJ_SCENERY_106, + /* 107 */ OBJ_SCENERY_107, + /* 108 */ OBJ_SCENERY_108, + /* 109 */ OBJ_SCENERY_109, + /* 110 */ OBJ_SCENERY_110, + /* 111 */ OBJ_SCENERY_111, + /* 112 */ OBJ_SCENERY_112, + /* 113 */ OBJ_SCENERY_113, + /* 114 */ OBJ_SCENERY_114, + /* 115 */ OBJ_SCENERY_115, + /* 116 */ OBJ_SCENERY_116, + /* 117 */ OBJ_SCENERY_117, + /* 118 */ OBJ_SCENERY_118, + /* 119 */ OBJ_SCENERY_119, + /* 120 */ OBJ_SCENERY_120, + /* 121 */ OBJ_SCENERY_121, + /* 122 */ OBJ_SCENERY_122, + /* 123 */ OBJ_SCENERY_123, + /* 124 */ OBJ_SCENERY_124, + /* 125 */ OBJ_SCENERY_125, + /* 126 */ OBJ_SCENERY_126, + /* 127 */ OBJ_SCENERY_127, + /* 128 */ OBJ_SCENERY_128, + /* 129 */ OBJ_SCENERY_129, + /* 130 */ OBJ_SCENERY_130, + /* 131 */ OBJ_SCENERY_131, + /* 132 */ OBJ_SCENERY_132, + /* 133 */ OBJ_SCENERY_133, + /* 134 */ OBJ_SCENERY_134, + /* 135 */ OBJ_SCENERY_135, + /* 136 */ OBJ_SCENERY_136, + /* 137 */ OBJ_SCENERY_137, + /* 138 */ OBJ_SCENERY_138, + /* 139 */ OBJ_SCENERY_139, + /* 140 */ OBJ_SCENERY_140, + /* 141 */ OBJ_SCENERY_141, + /* 142 */ OBJ_SCENERY_142, + /* 143 */ OBJ_SCENERY_143, + /* 144 */ OBJ_SCENERY_144, + /* 145 */ OBJ_SCENERY_145, + /* 146 */ OBJ_SCENERY_146, + /* 147 */ OBJ_SCENERY_147, + /* 148 */ OBJ_SCENERY_148, + /* 149 */ OBJ_SCENERY_149, + /* 150 */ OBJ_SCENERY_150, + /* 151 */ OBJ_SCENERY_151, + /* 152 */ OBJ_SCENERY_152, + /* 153 */ OBJ_SCENERY_153, + /* 154 */ OBJ_SCENERY_154, + /* 155 */ OBJ_SCENERY_155, + /* 156 */ OBJ_SCENERY_156, + /* 157 */ OBJ_SCENERY_157, + /* 158 */ OBJ_SCENERY_158, + /* 159 */ OBJ_SCENERY_159, + /* 160 */ OBJ_SCENERY_160, /* 161 */ OBJ_SPRITE_CO_POLE, /* 162 */ OBJ_SPRITE_CO_TREE, /* 163 */ OBJ_SPRITE_FO_POLE, @@ -903,167 +924,167 @@ typedef enum { /* 50 */ LN_VWK_MAX, } BossLNvwork; -typedef Object_80 Object80_0; -typedef Object_80 Object80_1; -typedef Object_80 Object80_2; -typedef Object_80 Object80_3; -typedef Object_80 Object80_4; -typedef Object_80 Object80_5; -typedef Object_80 Object80_6; -typedef Object_80 Object80_7; -typedef Object_80 Object80_8; -typedef Object_80 Object80_9; -typedef Object_80 Object80_10; -typedef Object_80 Object80_11; -typedef Object_80 Object80_12; -typedef Object_80 Object80_13; -typedef Object_80 Object80_14; -typedef Object_80 Object80_15; -typedef Object_80 Object80_16; -typedef Object_80 Object80_17; -typedef Object_80 Object80_18; -typedef Object_80 Object80_19; -typedef Object_80 Object80_20; -typedef Object_80 Object80_21; -typedef Object_80 Object80_22; -typedef Object_80 Object80_23; -typedef Object_80 Object80_24; -typedef Object_80 Object80_25; -typedef Object_80 Object80_26; -typedef Object_80 Object80_27; -typedef Object_80 Object80_28; -typedef Object_80 Object80_29; -typedef Object_80 Object80_30; -typedef Object_80 Object80_31; -typedef Object_80 Object80_32; -typedef Object_80 Object80_33; -typedef Object_80 Object80_34; -typedef Object_80 Object80_35; -typedef Object_80 Object80_36; -typedef Object_80 Object80_37; -typedef Object_80 Object80_38; -typedef Object_80 Object80_39; -typedef Object_80 Object80_40; -typedef Object_80 Object80_41; -typedef Object_80 Object80_42; -typedef Object_80 Object80_43; -typedef Object_80 Object80_44; -typedef Object_80 Object80_45; -typedef Object_80 Object80_46; -typedef Object_80 Object80_47; -typedef Object_80 Object80_48; -typedef Object_80 Object80_49; -typedef Object_80 Object80_50; -typedef Object_80 Object80_51; -typedef Object_80 Object80_52; -typedef Object_80 Object80_53; -typedef Object_80 Object80_54; -typedef Object_80 Object80_55; -typedef Object_80 Object80_56; -typedef Object_80 Object80_57; -typedef Object_80 Object80_58; -typedef Object_80 Object80_59; -typedef Object_80 Object80_60; -typedef Object_80 Object80_61; -typedef Object_80 Object80_62; -typedef Object_80 Object80_63; -typedef Object_80 Object80_64; -typedef Object_80 Object80_65; -typedef Object_80 Object80_66; -typedef Object_80 Object80_67; -typedef Object_80 Object80_68; -typedef Object_80 Object80_69; -typedef Object_80 Object80_70; -typedef Object_80 Object80_71; -typedef Object_80 Object80_72; -typedef Object_80 Object80_73; -typedef Object_80 Object80_74; -typedef Object_80 Object80_75; -typedef Object_80 Object80_76; -typedef Object_80 Object80_77; -typedef Object_80 Object80_78; -typedef Object_80 Object80_79; -typedef Object_80 Object80_80; -typedef Object_80 Object80_81; -typedef Object_80 Object80_82; -typedef Object_80 Object80_83; -typedef Object_80 Object80_84; -typedef Object_80 Object80_85; -typedef Object_80 Object80_86; -typedef Object_80 Object80_87; -typedef Object_80 Object80_88; -typedef Object_80 Object80_89; -typedef Object_80 Object80_90; -typedef Object_80 Object80_91; -typedef Object_80 Object80_92; -typedef Object_80 Object80_93; -typedef Object_80 Object80_94; -typedef Object_80 Object80_95; -typedef Object_80 Object80_96; -typedef Object_80 Object80_97; -typedef Object_80 Object80_98; -typedef Object_80 Object80_99; -typedef Object_80 Object80_100; -typedef Object_80 Object80_101; -typedef Object_80 Object80_102; -typedef Object_80 Object80_103; -typedef Object_80 Object80_104; -typedef Object_80 Object80_105; -typedef Object_80 Object80_106; -typedef Object_80 Object80_107; -typedef Object_80 Object80_108; -typedef Object_80 Object80_109; -typedef Object_80 Object80_110; -typedef Object_80 Object80_111; -typedef Object_80 Object80_112; -typedef Object_80 Object80_113; -typedef Object_80 Object80_114; -typedef Object_80 Object80_115; -typedef Object_80 Object80_116; -typedef Object_80 Object80_117; -typedef Object_80 Object80_118; -typedef Object_80 Object80_119; -typedef Object_80 Object80_120; -typedef Object_80 Object80_121; -typedef Object_80 Object80_122; -typedef Object_80 Object80_123; -typedef Object_80 Object80_124; -typedef Object_80 Object80_125; -typedef Object_80 Object80_126; -typedef Object_80 Object80_127; -typedef Object_80 Object80_128; -typedef Object_80 Object80_129; -typedef Object_80 Object80_130; -typedef Object_80 Object80_131; -typedef Object_80 Object80_132; -typedef Object_80 Object80_133; -typedef Object_80 Object80_134; -typedef Object_80 Object80_135; -typedef Object_80 Object80_136; -typedef Object_80 Object80_137; -typedef Object_80 Object80_138; -typedef Object_80 Object80_139; -typedef Object_80 Object80_140; -typedef Object_80 Object80_141; -typedef Object_80 Object80_142; -typedef Object_80 Object80_143; -typedef Object_80 Object80_144; -typedef Object_80 Object80_145; -typedef Object_80 Object80_146; -typedef Object_80 Object80_147; -typedef Object_80 Object80_148; -typedef Object_80 Object80_149; -typedef Object_80 Object80_150; -typedef Object_80 Object80_151; -typedef Object_80 Object80_152; -typedef Object_80 Object80_153; -typedef Object_80 Object80_154; -typedef Object_80 Object80_155; -typedef Object_80 Object80_156; -typedef Object_80 Object80_157; -typedef Object_80 Object80_158; -typedef Object_80 Object80_159; -typedef Object_80 Object80_160; +typedef Scenery Scenery_0; +typedef Scenery Scenery_1; +typedef Scenery Scenery_2; +typedef Scenery Scenery_3; +typedef Scenery Scenery_4; +typedef Scenery Scenery_5; +typedef Scenery Scenery_6; +typedef Scenery Scenery_7; +typedef Scenery Scenery_8; +typedef Scenery Scenery_9; +typedef Scenery Scenery_10; +typedef Scenery Scenery_11; +typedef Scenery Scenery_12; +typedef Scenery Scenery_13; +typedef Scenery Scenery_14; +typedef Scenery Scenery_15; +typedef Scenery Scenery_16; +typedef Scenery Scenery_17; +typedef Scenery Scenery_18; +typedef Scenery Scenery_19; +typedef Scenery Scenery_20; +typedef Scenery Scenery_21; +typedef Scenery Scenery_22; +typedef Scenery Scenery_23; +typedef Scenery Scenery_24; +typedef Scenery Scenery_25; +typedef Scenery Scenery_26; +typedef Scenery Scenery_27; +typedef Scenery Scenery_28; +typedef Scenery Scenery_29; +typedef Scenery Scenery_30; +typedef Scenery Scenery_31; +typedef Scenery Scenery_32; +typedef Scenery Scenery_33; +typedef Scenery Scenery_34; +typedef Scenery Scenery_35; +typedef Scenery Scenery_36; +typedef Scenery Scenery_37; +typedef Scenery Scenery_38; +typedef Scenery Scenery_39; +typedef Scenery Scenery_40; +typedef Scenery Scenery_41; +typedef Scenery Scenery_42; +typedef Scenery Scenery_43; +typedef Scenery Scenery_44; +typedef Scenery Scenery_45; +typedef Scenery Scenery_46; +typedef Scenery Scenery_47; +typedef Scenery Scenery_48; +typedef Scenery Scenery_49; +typedef Scenery Scenery_50; +typedef Scenery Scenery_51; +typedef Scenery Scenery_52; +typedef Scenery Scenery_53; +typedef Scenery Scenery_54; +typedef Scenery Scenery_55; +typedef Scenery Scenery_56; +typedef Scenery Scenery_57; +typedef Scenery Scenery_58; +typedef Scenery Scenery_59; +typedef Scenery Scenery_60; +typedef Scenery Scenery_61; +typedef Scenery Scenery_62; +typedef Scenery Scenery_63; +typedef Scenery Scenery_64; +typedef Scenery Scenery_65; +typedef Scenery Scenery_66; +typedef Scenery Scenery_67; +typedef Scenery Scenery_68; +typedef Scenery Scenery_69; +typedef Scenery Scenery_70; +typedef Scenery Scenery_71; +typedef Scenery Scenery_72; +typedef Scenery Scenery_73; +typedef Scenery Scenery_74; +typedef Scenery Scenery_75; +typedef Scenery Scenery_76; +typedef Scenery Scenery_77; +typedef Scenery Scenery_78; +typedef Scenery Scenery_79; +typedef Scenery Scenery_80; +typedef Scenery Scenery_81; +typedef Scenery Scenery_82; +typedef Scenery Scenery_83; +typedef Scenery Scenery_84; +typedef Scenery Scenery_85; +typedef Scenery Scenery_86; +typedef Scenery Scenery_87; +typedef Scenery Scenery_88; +typedef Scenery Scenery_89; +typedef Scenery Scenery_90; +typedef Scenery Scenery_91; +typedef Scenery Scenery_92; +typedef Scenery Scenery_93; +typedef Scenery Scenery_94; +typedef Scenery Scenery_95; +typedef Scenery Scenery_96; +typedef Scenery Scenery_97; +typedef Scenery Scenery_98; +typedef Scenery Scenery_99; +typedef Scenery Scenery_100; +typedef Scenery Scenery_101; +typedef Scenery Scenery_102; +typedef Scenery Scenery_103; +typedef Scenery Scenery_104; +typedef Scenery Scenery_105; +typedef Scenery Scenery_106; +typedef Scenery Scenery_107; +typedef Scenery Scenery_108; +typedef Scenery Scenery_109; +typedef Scenery Scenery_110; +typedef Scenery Scenery_111; +typedef Scenery Scenery_112; +typedef Scenery Scenery_113; +typedef Scenery Scenery_114; +typedef Scenery Scenery_115; +typedef Scenery Scenery_116; +typedef Scenery Scenery_117; +typedef Scenery Scenery_118; +typedef Scenery Scenery_119; +typedef Scenery Scenery_120; +typedef Scenery Scenery_121; +typedef Scenery Scenery_122; +typedef Scenery Scenery_123; +typedef Scenery Scenery_124; +typedef Scenery Scenery_125; +typedef Scenery Scenery_126; +typedef Scenery Scenery_127; +typedef Scenery Scenery_128; +typedef Scenery Scenery_129; +typedef Scenery Scenery_130; +typedef Scenery Scenery_131; +typedef Scenery Scenery_132; +typedef Scenery Scenery_133; +typedef Scenery Scenery_134; +typedef Scenery Scenery_135; +typedef Scenery Scenery_136; +typedef Scenery Scenery_137; +typedef Scenery Scenery_138; +typedef Scenery Scenery_139; +typedef Scenery Scenery_140; +typedef Scenery Scenery_141; +typedef Scenery Scenery_142; +typedef Scenery Scenery_143; +typedef Scenery Scenery_144; +typedef Scenery Scenery_145; +typedef Scenery Scenery_146; +typedef Scenery Scenery_147; +typedef Scenery Scenery_148; +typedef Scenery Scenery_149; +typedef Scenery Scenery_150; +typedef Scenery Scenery_151; +typedef Scenery Scenery_152; +typedef Scenery Scenery_153; +typedef Scenery Scenery_154; +typedef Scenery Scenery_155; +typedef Scenery Scenery_156; +typedef Scenery Scenery_157; +typedef Scenery Scenery_158; +typedef Scenery Scenery_159; +typedef Scenery Scenery_160; typedef Sprite CoPole; typedef Sprite CoTree; typedef Sprite FoPole; diff --git a/include/sf64player.h b/include/sf64player.h index f00437c3..05ea3de9 100644 --- a/include/sf64player.h +++ b/include/sf64player.h @@ -77,7 +77,7 @@ typedef enum { /* 0 */ PLAYERSHOT_0, // single laser? /* 1 */ PLAYERSHOT_1, // twin laser? /* 2 */ PLAYERSHOT_2, - /* 3 */ PLAYERSHOT_3, // bomb? + /* 3 */ PLAYERSHOT_BOMB, // bomb? /* 4 */ PLAYERSHOT_4, /* 5 */ PLAYERSHOT_5, // landmaster shot /* 6 */ PLAYERSHOT_6, // on-foot shot @@ -295,9 +295,9 @@ typedef struct Player { /* 0x284 */ s32 unk_284; /* 0x288 */ s32 unk_288; /* 0x28C */ char pad28C[0x28]; - /* 0x2B4 */ bool unk_2B4; - /* 0x2B8 */ bool unk_2B8; - /* 0x2BC */ f32 unk_2BC; + /* 0x2B4 */ bool boostCooldown; + /* 0x2B8 */ bool boostActive; + /* 0x2BC */ f32 boostMeter; /* 0x2C0 */ f32 unk_2C0; /* 0x2C4 */ s32 unk_2C4; /* 0x2C8 */ Vec3f hit2; diff --git a/include/structs.h b/include/structs.h deleted file mode 100644 index 7bd35c8c..00000000 --- a/include/structs.h +++ /dev/null @@ -1,76 +0,0 @@ -#ifndef STRUCTS_H -#define STRUCTS_H - -#include "libultra/ultra64.h" -#include "sf64math.h" - -typedef struct { - /* 0x00 */ u8 status; - /* 0x02 */ u16 type; - /* 0x04 */ Vec3f pos; - /* 0x10 */ f32 unk_10; - /* 0x14 */ char pad14[0x14]; -} RadarMark; // size = 0x28 - -typedef struct { - /* 0x00 */ u8 mode; - /* 0x02 */ u16 timer; - /* 0x04 */ Vec3f unk_04; - /* 0x10 */ Vec3f unk_10; - /* 0x1C */ f32 unk_1C; - /* 0x20 */ f32 unk_20; - /* 0x24 */ f32 unk_24; - /* 0x28 */ f32 unk_28; - /* 0x2C */ u8 unk_2C; // possibly a color struct - /* 0x2D */ u8 unk_2D; - /* 0x2E */ u8 unk_2E; - /* 0x2F */ u8 unk_2F; -} TexturedLine; // size = 0x30 - -typedef struct { - /* 0x00 */ u8 hits; - /* 0x04 */ Vec3f pos; - /* 0x10 */ f32 unk_10; - /* 0x14 */ char pad14[0x4]; - /* 0x18 */ u16 timer; -} BonusText; // size = 0x1C - -#define BONUS_TEXT_FREE 0 -#define BONUS_TEXT_GREAT 100 -#define BONUS_TEXT_1UP 101 - -typedef struct { - /* 0x00 */ Vec3f eye; - /* 0x0C */ Vec3f at; -} CameraPoint; // size = 0x18 - -typedef struct { - /* 0x00 */ f32 unk_00; - /* 0x04 */ f32 unk_04; - /* 0x08 */ f32 unk_08; - /* 0x0C */ f32 unk_0C; - /* 0x10 */ s16 unk_10; -} UnkStruct_D_i5_801B8E50; //size = 0x14 - -typedef struct { - /* 0x00 */ f32 unk_00; - /* 0x04 */ s16 unk_04; - /* 0x08 */ f32 unk_08; - /* 0x0C */ f32 unk_0C; - /* 0x10 */ s16 unk_10; -} UnkStruct_D_i5_801BA1EC; //size = 0x14 - -typedef enum OptionState { - OPTION_WAIT, - OPTION_SETUP, - OPTION_UPDATE -} OptionState; - -typedef enum OptionSoundMode { - OPTIONSOUND_STEREO, - OPTIONSOUND_MONO, - OPTIONSOUND_HEADSET, - OPTIONSOUND_MAX, -} OptionSoundMode; - -#endif diff --git a/include/sys.h b/include/sys.h index 04b1d522..4f39b97f 100644 --- a/include/sys.h +++ b/include/sys.h @@ -48,15 +48,28 @@ extern f32 D_game_80161A14; extern s32 gPlayerInactive[4]; extern s32 D_game_80161A28; extern u8 gShowHud; -extern u16 gNextLevelStage; +extern u16 gNextLevelPhase; extern u16 gNextLevel; extern u16 gNextGameState; extern u16 D_game_80161A34; extern u16 gBgColor; extern u8 gBlurAlpha; -extern u8 D_game_80161A39; +extern u8 gGameStandby; extern f32 gFovY; extern f32 gProjectNear; extern f32 gProjectFar; +typedef enum OptionState { + OPTION_WAIT, + OPTION_SETUP, + OPTION_UPDATE +} OptionState; + +typedef enum OptionSoundMode { + OPTIONSOUND_STEREO, + OPTIONSOUND_MONO, + OPTIONSOUND_HEADSET, + OPTIONSOUND_MAX, +} OptionSoundMode; + #endif diff --git a/include/variables.h b/include/variables.h index 62aade6d..5fbe0197 100644 --- a/include/variables.h +++ b/include/variables.h @@ -2,7 +2,6 @@ #define VARIABLES_H #include "sys.h" -#include "structs.h" #include "sf64level.h" #include "sf64object.h" #include "sf64player.h" @@ -11,7 +10,7 @@ extern s32 D_360_800C9B4C; // fox_bg -extern u16 D_bg_800C9C3C[16]; +extern u16 gStarColors[16]; // fox_boss extern s32 D_boss_800C9E90[]; @@ -27,21 +26,21 @@ extern s32 gTeamHelpTimer; // fox_edata extern f32 gActor241Hitbox[]; -extern f32 gDefaultCubeHitbox100[]; -extern f32 gDefaultCubeHitbox150[]; -extern f32 gDefaultCubeHitbox200[]; -extern f32 gDefaultCubeHitbox300[]; -extern f32 gDefaultCubeHitbox400[]; +extern f32 gCubeHitbox100[]; +extern f32 gCubeHitbox150[]; +extern f32 gCubeHitbox200[]; +extern f32 gCubeHitbox300[]; +extern f32 gCubeHitbox400[]; extern f32 gItemRingCheckHitbox[]; -extern f32 gHitboxNone[]; +extern f32 gNoHitbox[]; extern f32 gItemCheckpointHitbox[]; extern f32 gItemSupplyRingHitbox[]; extern f32 gMeteoWarpHitbox[]; -extern f32 D_edata_800CBF8C[]; +extern f32 gItemPathChangeHitbox[]; extern f32 gItemLasersHitbox[]; extern f32 gItemBombHitbox[]; extern f32 gActor190_191Hitbox[]; -extern f32 gActor194HItbox[]; +extern f32 gActor194Hitbox[]; extern f32 gTeamHitbox[]; extern f32 gActorAllRangeHItbox[]; extern f32 gWarpZoneEvent94Hitbox[]; @@ -89,7 +88,7 @@ extern CollisionHeader D_800D2B38[]; extern CollisionHeader2 D_800D2CA0[]; // fox_play -extern u8 D_play_800D2F68; +extern u8 gVenomHardClear; extern u8 D_play_800D3180[30]; // fox_radio @@ -114,9 +113,9 @@ extern s32 gAllRangeFrameCount; extern f32 gAllRangeCountdownScale; // fox_bg -extern f32 D_bg_800C9C30; -extern u16 D_bg_800C9C34; -extern f32 D_bg_8015F960; +extern f32 gAndrossUnkAlpha; +extern u16 gBolseDynamicGround; +extern f32 gWarpZoneBgAlpha; extern u8 D_bg_8015F964; extern f32 D_bg_8015F968; extern f32 D_bg_8015F96C; diff --git a/linker_scripts/us/symbol_addrs.txt b/linker_scripts/us/symbol_addrs.txt index 46b95202..b629a9f5 100644 --- a/linker_scripts/us/symbol_addrs.txt +++ b/linker_scripts/us/symbol_addrs.txt @@ -128,7 +128,7 @@ Save_Checksum = 0x800C2FB0; Save_Write = 0x800C3084; Save_Read = 0x800C3194; -sUnused_Overlay = 0x800CBD3C; +sOvlUnused_Unk = 0x800CBD3C; // hardcoded address used in sys_rdram D_A0300000 = 0xA0300000; diff --git a/linker_scripts/us/symbol_addrs_EBFBE0.txt b/linker_scripts/us/symbol_addrs_EBFBE0.txt index 2cc6611a..4fe5c3c2 100644 --- a/linker_scripts/us/symbol_addrs_EBFBE0.txt +++ b/linker_scripts/us/symbol_addrs_EBFBE0.txt @@ -7,7 +7,7 @@ sOptionCardList = 0x801AE638; // type:OptionEntry segment:ovl_menu size:0x240 D_menu_801AE99C = 0x801AE99C; // force_migration:True segment:ovl_menu sTimeTrialMinuteTextures = 0x801AF28C; // force_migration:True segment:ovl_menu sPlanetList = 0x801AF7E8;// segment:ovl_menu -spectrumAnalizerMode = 0x801B9318;// segment:ovl_menu +spectrumAnalyzerMode = 0x801B9318;// segment:ovl_menu D_menu_801AE998 = 0x801AE998; //size:4 segment:ovl_menu sPaths = 0x801AFD18; // segment:ovl_menu D_menu_801B6E50 = 0x801B6E50; // force_migration:True segment:ovl_menu diff --git a/linker_scripts/us/symbol_addrs_audio.txt b/linker_scripts/us/symbol_addrs_audio.txt index 865e8cb1..bf9f7536 100644 --- a/linker_scripts/us/symbol_addrs_audio.txt +++ b/linker_scripts/us/symbol_addrs_audio.txt @@ -467,7 +467,7 @@ Audio_ResetVoicesAndPlayers = 0x8001BC48; Audio_ProcessPlaylist = 0x8001BD0C; func_8001BFC0 = 0x8001BFC0; Audio_UpdateFrequencyAnalysis = 0x8001C3EC; -func_8001C8B8 = 0x8001C8B8; +Audio_StartPlayerNoise = 0x8001C8B8; func_8001CA24 = 0x8001CA24; func_8001CB80 = 0x8001CB80; func_8001CCDC = 0x8001CCDC; @@ -490,7 +490,7 @@ func_8001D520 = 0x8001D520; func_8001D638 = 0x8001D638; func_8001D6DC = 0x8001D6DC; func_8001D780 = 0x8001D780; -func_8001D8A8 = 0x8001D8A8; +Audio_SetVolume = 0x8001D8A8; Audio_PlaySoundTest = 0x8001D8F4; Audio_PlaySequenceDistorted = 0x8001D9E0; Audio_PlaySoundTestTrack = 0x8001DA90; diff --git a/linker_scripts/us/symbol_addrs_engine.txt b/linker_scripts/us/symbol_addrs_engine.txt index 86fb770e..2d93d445 100644 --- a/linker_scripts/us/symbol_addrs_engine.txt +++ b/linker_scripts/us/symbol_addrs_engine.txt @@ -150,10 +150,10 @@ Message_DisplayScrollingText = 0x800C2D3C; Message_IsPrintingChar = 0x800C2F30; // fox_bg -D_bg_800C9DBC = 0x800C9DBC;//size:39 -D_bg_800C9D94 = 0x800C9D94;//size:39 -D_bg_800C9CC4 = 0x800C9CC4; -D_bg_800C9CF8 = 0x800C9CF8; +sKaSunColors = 0x800C9DBC;//size:39 +sSunColors = 0x800C9D94;//size:39 +sSunShifts = 0x800C9CC4; +sKaSunShifts = 0x800C9CF8; // fox_boss func_boss_8004319C = 0x8004319C; @@ -208,7 +208,7 @@ ItemMeteoWarp_Draw = 0x8005CDA8; func_edisplay_8005D008 = 0x8005D008; func_edisplay_8005D1F0 = 0x8005D1F0; func_edisplay_8005D3CC = 0x8005D3CC; -Object_80_Draw = 0x8005D654; +Scenery_Draw = 0x8005D654; Sprite_Draw = 0x8005D8B8; Actor_DrawOnRails = 0x8005D954; Actor_DrawAllRange = 0x8005DBC0; @@ -222,8 +222,8 @@ Object_ClampSfxSource = 0x8005F030; func_edisplay_8005F0E8 = 0x8005F0E8; func_edisplay_8005F1EC = 0x8005F1EC; func_edisplay_8005F290 = 0x8005F290; -Object_58_Draw = 0x8005F2F4; -func_edisplay_8005F670 = 0x8005F670; +Scenery360_Draw = 0x8005F2F4; +Display_SetSecondLight = 0x8005F670; func_edisplay_8005F9DC = 0x8005F9DC; Object_DrawAll = 0x8005FB70; Effect_DrawAll = 0x8006046C; @@ -257,13 +257,13 @@ Object_Kill = 0x80060FBC; func_enmy_80060FE4 = 0x80060FE4; func_enmy_80061148 = 0x80061148; Object_SetInfo = 0x800612B8; -Object_80_Initialize = 0x80061364; +Scenery_Initialize = 0x80061364; Sprite_Initialize = 0x80061394; Actor_Initialize = 0x800613C4; Boss_Initialize = 0x80061404; Item_Initialize = 0x80061444; Effect_Initialize = 0x80061474; -Object_80_Load = 0x800614B4; +Scenery_Load = 0x800614B4; Sprite_Load = 0x800615A0; Actor_Load = 0x8006168C; Boss_Load = 0x80061778; @@ -333,13 +333,13 @@ Sprite_UpdateDoodad = 0x80068FE0; Object_Dying = 0x800690D0; Actor_Move = 0x800693E8; Boss_Move = 0x80069658; -Object80_Move = 0x800696F8; +Scenery_Move = 0x800696F8; Sprite_Move = 0x80069858; Effect_Move = 0x80069924; Item_Move = 0x80069A10; Actor_Update = 0x80069AAC; Boss_Update = 0x80069CBC; -Object_80_Update = 0x80069DF4; +Scenery_Update = 0x80069DF4; Sprite_Update = 0x80069E88; Item_Update = 0x80069F30; Effect_Update = 0x80069FD4; @@ -356,13 +356,13 @@ D_game_80161A14 = 0x80161A14; gPlayerInactive = 0x80161A18; //size:0x10 D_game_80161A28 = 0x80161A28; gShowHud = 0x80161A2C; -gNextLevelStage = 0x80161A2E; +gNextLevelPhase = 0x80161A2E; gNextLevel = 0x80161A30; gNextGameState = 0x80161A32; D_game_80161A34 = 0x80161A34; gBgColor = 0x80161A36; gBlurAlpha = 0x80161A38; -D_game_80161A39 = 0x80161A39; +gGameStandby = 0x80161A39; gFovY = 0x80161A3C; gProjectNear = 0x80161A40; gProjectFar = 0x80161A44; @@ -372,17 +372,17 @@ sVsCameraULx = 0x800D2874; sVsCameraLRx = 0x800D2884; sVsCameraULy = 0x800D2894; sVsCameraLRy = 0x800D28A4; -sOverlaySetups = 0x800D28B4; +sLevelSceneIds = 0x800D28B4; Game_Initialize = 0x800A18B0; Game_SetGameState = 0x800A1980; -func_game_800A1B6C = 0x800A1B6C; -func_game_800A1C14 = 0x800A1C14; -func_game_800A1E68 = 0x800A1E68; -func_game_800A1F44 = 0x800A1F44; -func_game_800A1FB0 = 0x800A1FB0; +Game_ChangeScene = 0x800A1B6C; +Game_InitMasterDL = 0x800A1C14; +Game_InitStandbyDL = 0x800A1E68; +Game_InitFullViewport = 0x800A1F44; +Game_InitViewport = 0x800A1FB0; Game_Draw = 0x800A24DC; -func_game_800A25DC = 0x800A25DC; +Game_SetScene = 0x800A25DC; Game_Update = 0x800A26C0; func_game_800A3608 = 0x800A3608; @@ -404,7 +404,7 @@ gScreenFlashTimer = 0x80161A60; gDropHitCountItem = 0x80161A62; D_play_80161A64 = 0x80161A64; sEnvSettings = 0x80161A68; -D_play_800D2F68 = 0x800D2F68; //type:u8 +gVenomHardClear = 0x800D2F68; //type:u8 // fox_context D_ctx_80161A70 = 0x80161A70; @@ -421,7 +421,7 @@ gSavedHitCount = 0x80161A9C; gLifeCount = 0x80161AA0; gLaserStrength = 0x80161AA8;//size:0x10 D_ctx_80161AB8 = 0x80161AB8; -gObjects80 = 0x80161B00; //size:0x1900 +gScenery = 0x80161B00; //size:0x1900 gSprites = 0x80163400; //size:0xBE0 gActors = 0x80163FE0; //size:0xB130 gBosses = 0x8016F110; //size:0x1020 @@ -437,15 +437,15 @@ gActor194yPos = 0x80176878; gActor194zPos = 0x80176B98; gActor194xRot = 0x80176EB8; gActor194yRot = 0x801771D8; -gOverlaySetup = 0x801774F8; +gSceneId = 0x801774F8; gActor194zRot = 0x80177500; -gOverlayStage = 0x80177820; +gSceneSetup = 0x80177820; D_ctx_80177824 = 0x80177824; gEnemyShotSpeed = 0x80177828; D_ctx_8017782C = 0x8017782C; -D_ctx_80177830 = 0x80177830; +gShowLevelClearStatusScreen = 0x80177830; gGameState = 0x80177834; -gLevelStatusScreenTimer = 0x80177838; +gLevelStartStatusScreenTimer = 0x80177838; gNextGameStateTimer = 0x8017783C; gLevelClearScreenTimer = 0x80177840; gOptionMenuStatus = 0x8017784C; //type:OptionState @@ -454,7 +454,7 @@ D_ctx_80177850 = 0x80177850; gPlayState = 0x80177854; D_ctx_80177858 = 0x80177858; D_ctx_80177868 = 0x80177868; -D_ctx_80177870 = 0x80177870; +gPlayerForms = 0x80177870; gLevelMode = 0x80177880; gHandicap = 0x80177888; gDrawMode = 0x80177898; @@ -474,7 +474,7 @@ gTeamDamage = 0x80177910; gBrakeButton = 0x80177928; gNextPlanetPath = 0x80177930; gShootButton = 0x80177938; -gGroundLevel = 0x80177940; +gGroundHeight = 0x80177940; gBombButton = 0x80177948; D_ctx_80177950 = 0x80177950; D_ctx_80177958 = 0x80177958; @@ -502,16 +502,16 @@ D_Timer_80177A88 = 0x80177A88;//size:0x10 D_ctx_80177A98 = 0x80177A98; D_ctx_80177AA0 = 0x80177AA0; D_ctx_80177AB0 = 0x80177AB0; -D_ctx_80177AB8 = 0x80177AB8; -D_ctx_80177AC8 = 0x80177AC8; -D_ctx_80177AD0 = 0x80177AD0; +gShieldAlpha = 0x80177AB8; +gAqDrawMode = 0x80177AC8; +gHasShield = 0x80177AD0; D_ctx_80177AE0 = 0x80177AE0; -D_ctx_80177AE8 = 0x80177AE8; +gShieldTimer = 0x80177AE8; gMainController = 0x80177AF8; -D_ctx_80177B00 = 0x80177B00; +gVsLockOnTimers = 0x80177B00; D_ctx_80177B40 = 0x80177B40; -D_Timer_80177B44 = 0x80177B44; -gCurrentPlanet = 0x80177B48; +gStartAndrossFightTimer = 0x80177B44; +gMissionNumber = 0x80177B48; D_ctx_80177B50 = 0x80177B50; D_ctx_80177B70 = 0x80177B70; D_ctx_80177B90 = 0x80177B90; @@ -521,7 +521,7 @@ gPlanetPathStatus = 0x80177BD8; D_ctx_80177C30 = 0x80177C30; D_ctx_80177C50 = 0x80177C50; D_ctx_80177C58 = 0x80177C58; -gSoundMode = 0x80177C74; +gOptionSoundMode = 0x80177C74; gVolumeSettings = 0x80177C80; gBgmSeqId = 0x80177C90; D_ctx_80177C94 = 0x80177C94; @@ -562,17 +562,17 @@ D_ctx_8017812C = 0x8017812C; D_ctx_80178130 = 0x80178130; //size:0xF4 gCurrentLevel = 0x80178234; D_ctx_80178238 = 0x80178238;//size:0x3D type:u8 -gLevelStage = 0x8017827C; +gLevelPhase = 0x8017827C; gPlayer = 0x80178280; gBossActive = 0x80178284; -D_ctx_80178288 = 0x80178288; +gStarOffsetsX = 0x80178288; D_ctx_8017828C = 0x8017828C; -D_ctx_80178290 = 0x80178290; +gStarOffsetsY = 0x80178290; D_ctx_80178294 = 0x80178294; -D_ctx_80178298 = 0x80178298; +gStarFillColors = 0x80178298; gRadioState = 0x8017829C; D_ctx_801782A4 = 0x801782A4; -gObjects58 = 0x801782A8; +gScenery360 = 0x801782A8; D_Timer_801782AC = 0x801782AC; D_Timer_801782B4 = 0x801782B4; D_ctx_801782B8 = 0x801782B8; @@ -597,23 +597,23 @@ gFillScreenGreen = 0x80178350; gFillScreenBlue = 0x80178354; gFillScreenAlphaTarget = 0x80178358; gFillScreenAlphaStep = 0x8017835C; -D_ctx_80178360 = 0x80178360; -D_ctx_80178364 = 0x80178364; -D_ctx_80178368 = 0x80178368; -D_ctx_8017836C = 0x8017836C; -D_ctx_80178370 = 0x80178370; -gPlayerFillScreenAlphas = 0x80178380; -gPlayerFillScreenReds = 0x80178390; -gPlayerFillScreenGreens = 0x801783A0; -gPlayerFillScreenBlues = 0x801783B0; -D_ctx_801783D0 = 0x801783D0; -D_ctx_801783D4 = 0x801783D4; +gLight3R = 0x80178360; +gLight3G = 0x80178364; +gLight3B = 0x80178368; +gLight3Brightness = 0x8017836C; +gLight3x = 0x80178370; +gPlayerGlareAlphas = 0x80178380; +gPlayerGlareReds = 0x80178390; +gPlayerGlareGreens = 0x801783A0; +gPlayerGlareBlues = 0x801783B0; +gSunViewX = 0x801783D0; +gSunViewY = 0x801783D4; gFogNear = 0x801783D8; gFogFar = 0x801783DC; -D_ctx_80178410 = 0x80178410; -D_ctx_80178420 = 0x80178420; -D_ctx_80178424 = 0x80178424; -D_ctx_80178428 = 0x80178428; +gStarCount = 0x80178410; +gStarfieldX = 0x80178420; +gStarfieldY = 0x80178424; +gStarfieldRoll = 0x80178428; D_ctx_8017842C = 0x8017842C; D_ctx_80178430 = 0x80178430; D_ctx_80178440 = 0x80178440; @@ -673,7 +673,7 @@ func_play_800A3FEC = 0x800A3FEC; func_play_800A4460 = 0x800A4460; func_play_800A46A0 = 0x800A46A0; func_play_800A4C40 = 0x800A4C40; -Object_58_Initialize = 0x800A4F4C; +Scenery360_Initialize = 0x800A4F4C; func_play_800A4F7C = 0x800A4F7C; func_play_800A5330 = 0x800A5330; func_play_800A5338 = 0x800A5338; @@ -681,7 +681,7 @@ func_play_800A55B0 = 0x800A55B0; func_play_800A57E0 = 0x800A57E0; Play_Setup = 0x800A5844; func_play_800A594C = 0x800A594C; -func_play_800A5D6C = 0x800A5D6C; +Play_SetupStarfield = 0x800A5D6C; func_play_800A5EBC = 0x800A5EBC; func_play_800A5FA0 = 0x800A5FA0; func_play_800A6028 = 0x800A6028; @@ -743,7 +743,7 @@ func_play_800B2C00 = 0x800B2C00; func_play_800B3010 = 0x800B3010; func_play_800B3314 = 0x800B3314; func_play_800B39E0 = 0x800B39E0; -func_play_800B40AC = 0x800B40AC; +Player_UpdateShields = 0x800B40AC; func_play_800B415C = 0x800B415C; func_play_800B41E0 = 0x800B41E0; func_play_800B41EC = 0x800B41EC; @@ -768,7 +768,7 @@ func_play_800B86A4 = 0x800B86A4; Play_Main = 0x800B86CC; D_tank_800C9F2C = 0x800C9F2C; -gHitboxNone = 0x800CBF34; +gNoHitbox = 0x800CBF34; D_bg_8015F970 = 0x8015F970; D_bg_8015F984 = 0x8015F984; D_ctx_8017796C = 0x8017796C; diff --git a/linker_scripts/us/symbol_addrs_overlays.txt b/linker_scripts/us/symbol_addrs_overlays.txt index bbf1054b..ed319ef1 100644 --- a/linker_scripts/us/symbol_addrs_overlays.txt +++ b/linker_scripts/us/symbol_addrs_overlays.txt @@ -89,7 +89,7 @@ Zoness_8019B1F0 = 0x8019B1F0;//segment:ovl_i3 Zoness_8019B810 = 0x8019B810;//segment:ovl_i3 Zoness_8019C200 = 0x8019C200;//segment:ovl_i3 Zoness_Actor247_Init = 0x8019D060;//segment:ovl_i3 -Solar_801A7930 = 0x801A7930;//segment:ovl_i3 +Solar_LevelComplete = 0x801A7930;//segment:ovl_i3 Aquas_801A9448 = 0x801A9448;//segment:ovl_i3 Aquas_801A94EC = 0x801A94EC;//segment:ovl_i3 Aquas_801A958C = 0x801A958C;//segment:ovl_i3 diff --git a/src/audio/audio_general.c b/src/audio/audio_general.c index 67f061fa..04ee7736 100644 --- a/src/audio/audio_general.c +++ b/src/audio/audio_general.c @@ -2451,7 +2451,7 @@ u8* Audio_UpdateFrequencyAnalysis(void) { return D_8014A958; } -void func_8001C8B8(u8 playerId) { +void Audio_StartPlayerNoise(u8 playerId) { u32 sfxId = 0x00000000; sPlayerNoise[playerId].form = gPlayer[playerId].sfx.form; @@ -2743,7 +2743,7 @@ void func_8001D780(u8 audioType) { } } -void func_8001D8A8(u8 audioType, u8 volume) { +void Audio_SetVolume(u8 audioType, u8 volume) { if (volume > 99) { volume = 99; } diff --git a/src/engine/fox_360.c b/src/engine/fox_360.c index 85cc6d41..566ab856 100644 --- a/src/engine/fox_360.c +++ b/src/engine/fox_360.c @@ -170,8 +170,8 @@ void AllRange_GreatFoxRepair(Player* player) { gCsFrameCount++; switch (player->unk_1D0) { case 0: - player->unk_1F4 = player->timer_498 = player->damage = player->unk_280 = player->unk_2BC = player->unk_2B4 = - player->somersault = gCsFrameCount = 0; + player->unk_1F4 = player->timer_498 = player->damage = player->unk_280 = player->boostMeter = + player->boostCooldown = player->somersault = gCsFrameCount = 0; player->unk_130 = player->camRoll = player->unk_110 = player->unk_08C = player->unk_0D8.x = player->unk_0D8.y = player->unk_0D8.z = player->unk_134 = player->unk_4D8 = 0.0f; gCsCamEyeX = 1673.0f; @@ -307,7 +307,7 @@ void AllRange_ClearRadio(void) { void func_360_8002EE64(Actor* this) { s32 i; s32 colId; - Object_58* obj58; + Scenery360* scenery360; Vec3f temp1; f32 temp4; f32 temp5; @@ -324,16 +324,17 @@ void func_360_8002EE64(Actor* this) { this->fwork[25] = this->fwork[26] = this->fwork[28] = this->fwork[27] = 0.0f; if ((this->unk_0C9 != 0) && (gLevelMode == LEVELMODE_ALL_RANGE) && (gLevelType == LEVELTYPE_PLANET)) { - for (i = 0, obj58 = gObjects58; i < 200; i++, obj58++) { - if ((obj58->obj.status == OBJ_ACTIVE) && - ((obj58->obj.id == OBJ_80_150) || (obj58->obj.id == OBJ_80_149) || (obj58->obj.id == OBJ_80_148) || - (obj58->obj.id == OBJ_80_1) || (obj58->obj.id == OBJ_80_3)) && - (fabsf(obj58->obj.pos.x - this->obj.pos.x) < 2500.0f) && - (fabsf(obj58->obj.pos.z - this->obj.pos.z) < 2500.0f)) { - temp1.x = obj58->obj.pos.x; - temp1.y = obj58->obj.pos.y; - temp1.z = obj58->obj.pos.z; - temp4 = obj58->obj.rot.y; + for (i = 0, scenery360 = gScenery360; i < 200; i++, scenery360++) { + if ((scenery360->obj.status == OBJ_ACTIVE) && + ((scenery360->obj.id == OBJ_SCENERY_150) || (scenery360->obj.id == OBJ_SCENERY_149) || + (scenery360->obj.id == OBJ_SCENERY_148) || (scenery360->obj.id == OBJ_SCENERY_1) || + (scenery360->obj.id == OBJ_SCENERY_3)) && + (fabsf(scenery360->obj.pos.x - this->obj.pos.x) < 2500.0f) && + (fabsf(scenery360->obj.pos.z - this->obj.pos.z) < 2500.0f)) { + temp1.x = scenery360->obj.pos.x; + temp1.y = scenery360->obj.pos.y; + temp1.z = scenery360->obj.pos.z; + temp4 = scenery360->obj.rot.y; Matrix_RotateY(gCalcMatrix, -temp4 * M_DTOR, MTXF_NEW); spE4.x = this->obj.pos.x - temp1.x; @@ -347,8 +348,8 @@ void func_360_8002EE64(Actor* this) { spC0.z = temp1.z; // fake? weird ordering spCC.y = spD8.y + temp1.y; spCC.z = spD8.z + temp1.z; - if ((obj58->obj.id == OBJ_80_149) || (obj58->obj.id == OBJ_80_150)) { - if (obj58->obj.id == OBJ_80_149) { + if ((scenery360->obj.id == OBJ_SCENERY_149) || (scenery360->obj.id == OBJ_SCENERY_150)) { + if (scenery360->obj.id == OBJ_SCENERY_149) { colId = COL1_5; } else { colId = COL1_6; @@ -361,7 +362,7 @@ void func_360_8002EE64(Actor* this) { } } else { colId = COL2_0; - if (obj58->obj.id == OBJ_80_3) { + if (scenery360->obj.id == OBJ_SCENERY_3) { colId = COL2_3; } if (func_col2_800A3690(&spCC, &spC0, colId, &spB4)) { @@ -706,7 +707,7 @@ void ActorAllRange_UpdateEvents(Actor* this) { Katina_80198594(this); break; case LEVEL_BOLSE: - Bolse_8018C158(this); + Bolse_UpdateEventHandler(this); break; case LEVEL_SECTOR_Z: SectorZ_8019AB8C(this); @@ -734,11 +735,11 @@ s32 func_360_800301F4(Actor* actor) { temp_ft4 = actor->fwork[9] * 10.0f + (sp1C * 650.0f); temp_ft5 = actor->fwork[9] * 10.0f + (sp18 * 650.0f); for (i = 0; i < 200; i++) { - if ((gObjects58[i].obj.status == OBJ_ACTIVE) && - (fabsf(gObjects58[i].obj.pos.x - (actor->obj.pos.x + temp_ft4)) < 1000.0f) && - (fabsf(gObjects58[i].obj.pos.z - (actor->obj.pos.z + temp_ft5)) < 1000.0f)) { - if (fabsf(gObjects58[i].obj.pos.y - actor->obj.pos.y) < 1000.0f) { - if (gObjects58[i].obj.pos.y < actor->obj.pos.y) { + if ((gScenery360[i].obj.status == OBJ_ACTIVE) && + (fabsf(gScenery360[i].obj.pos.x - (actor->obj.pos.x + temp_ft4)) < 1000.0f) && + (fabsf(gScenery360[i].obj.pos.z - (actor->obj.pos.z + temp_ft5)) < 1000.0f)) { + if (fabsf(gScenery360[i].obj.pos.y - actor->obj.pos.y) < 1000.0f) { + if (gScenery360[i].obj.pos.y < actor->obj.pos.y) { return 1; } else { return -1; @@ -761,7 +762,7 @@ s32 func_360_800301F4(Actor* actor) { } s32 func_360_8003049C(Actor* actor) { - Object_58* obj58; + Scenery360* scenery360; s32 i; f32 sp44; f32 sp40; @@ -783,10 +784,11 @@ s32 func_360_8003049C(Actor* actor) { temp_fa0 = actor->fwork[9] * 10.0f + (sp40 * 650.0f); temp_ft4 = actor->fwork[9] * 10.0f + (sp3C * 650.0f); if (gLevelMode == LEVELMODE_ALL_RANGE) { - for (i = 0, obj58 = gObjects58; i < 200; i++, obj58++) { - if ((obj58->obj.status == OBJ_ACTIVE) && - (fabsf(obj58->obj.pos.x - (actor->obj.pos.x + temp_fa0)) < 1200.0f) && - (fabsf(obj58->obj.pos.z - (actor->obj.pos.z + temp_ft4)) < 1200.0f) && (actor->obj.pos.y < 650.0f)) { + for (i = 0, scenery360 = gScenery360; i < 200; i++, scenery360++) { + if ((scenery360->obj.status == OBJ_ACTIVE) && + (fabsf(scenery360->obj.pos.x - (actor->obj.pos.x + temp_fa0)) < 1200.0f) && + (fabsf(scenery360->obj.pos.z - (actor->obj.pos.z + temp_ft4)) < 1200.0f) && + (actor->obj.pos.y < 650.0f)) { return 1; } } @@ -1245,8 +1247,8 @@ void ActorAllRange_Update(Actor* this) { this->iwork[16] = 0; } } - if ((this->timer_0CA[0] != 0) && (gCurrentLevel != LEVEL_VENOM_2) && (this->aiType < AI360_10) && - (this->timer_0CA[0] < 5) && ((gGameFrameCount % 32) == 0)) { + if ((this->lockOnTimers[0] != 0) && (gCurrentLevel != LEVEL_VENOM_2) && (this->aiType < AI360_10) && + (this->lockOnTimers[0] < 5) && ((gGameFrameCount % 32) == 0)) { this->iwork[16] = 10; } if ((this->iwork[16] != 0) && (this->state < 7)) { @@ -1940,7 +1942,7 @@ void ActorAllRange_Update(Actor* this) { if (spD8 < 0.0f) { spD8 += 360.0f; } - } else if ((this->obj.pos.y < (gGroundLevel + 50.0f)) && (spD8 > 180.0f)) { + } else if ((this->obj.pos.y < (gGroundHeight + 50.0f)) && (spD8 > 180.0f)) { spD8 = 0.0f; this->unk_0F4.x = 0.0f; } @@ -1954,7 +1956,7 @@ void ActorAllRange_Update(Actor* this) { } if ((this->fwork[7] > 0.01f) && (this->fwork[7] < 359.9f)) { if ((((gGameFrameCount + 15) % 32) == 0) && (gCurrentLevel != LEVEL_VENOM_2)) { - this->timer_0CA[0] = 0; + this->lockOnTimers[0] = 0; } } else { Math_SmoothStepToAngle(&this->obj.rot.z, spD0, 0.1f, 3.0f, 0.01f); @@ -2003,8 +2005,8 @@ void ActorAllRange_Update(Actor* this) { this->fwork[13] -= (this->fwork[13] * 0.1f); this->fwork[14] -= (this->fwork[14] * 0.1f); this->fwork[12] -= (this->fwork[12] * 0.1f); - if ((this->obj.pos.y < gGroundLevel + 40.0f) && (this->vel.y < 0.0f)) { - this->obj.pos.y = gGroundLevel + 40.0f; + if ((this->obj.pos.y < gGroundHeight + 40.0f) && (this->vel.y < 0.0f)) { + this->obj.pos.y = gGroundHeight + 40.0f; this->vel.y = 0.0f; } if (this->iwork[0] != 0) { @@ -2261,7 +2263,7 @@ void ActorAllRange_Draw(ActorAllRange* this) { Actor_DrawEngineAndContrails(this); break; case AI360_GREAT_FOX: - func_edisplay_8005F670(&this->obj.pos); + Display_SetSecondLight(&this->obj.pos); this->unk_0B6 = 1; Actor195_Draw(this); break; diff --git a/src/engine/fox_A4290_colheaders.c b/src/engine/fox_A4290_colheaders.c index f3fe3eaa..506f7e30 100644 --- a/src/engine/fox_A4290_colheaders.c +++ b/src/engine/fox_A4290_colheaders.c @@ -1,4 +1,3 @@ -#include "structs.h" #include "macros.h" #include "variables.h" #include "assets/ast_aquas.h" diff --git a/src/engine/fox_beam.c b/src/engine/fox_beam.c index b25f6324..98ba98d2 100644 --- a/src/engine/fox_beam.c +++ b/src/engine/fox_beam.c @@ -58,16 +58,16 @@ void func_beam_80035E78(PlayerShot* shot) { shot->unk_58 = 150; func_8001CE28(shot->playerNum, shot->sfxSource); gScreenFlashTimer = 4; - if (shot->obj.pos.y < (gGroundLevel + 450.0f)) { + if (shot->obj.pos.y < (gGroundHeight + 450.0f)) { gCameraShake = 15; if (gGroundType == GROUNDTYPE_WATER) { - func_effect_8007D9DC(shot->obj.pos.x, gGroundLevel + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, + func_effect_8007D9DC(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, shot->unk_48 * 3.0f, 0); - func_effect_8007D9DC(shot->obj.pos.x, gGroundLevel + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, + func_effect_8007D9DC(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, shot->unk_48 * 3.0f, 5); - func_effect_8007D9DC(shot->obj.pos.x, gGroundLevel + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, + func_effect_8007D9DC(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, shot->unk_48 * 3.0f, 10); - func_effect_8007ADF4(shot->obj.pos.x, gGroundLevel, shot->obj.pos.z, shot->unk_48 * 0.05f, + func_effect_8007ADF4(shot->obj.pos.x, gGroundHeight, shot->obj.pos.z, shot->unk_48 * 0.05f, shot->unk_48 * 0.5f); func_effect_8007A6F0(&shot->obj.pos, 0x19000014); } else { @@ -83,8 +83,8 @@ void func_beam_80035E78(PlayerShot* shot) { if (var_fv1 > 2.0f) { var_fv1 = 2.0f; } - func_effect_8007B550(shot->obj.pos.x, gGroundLevel + 6.0f, shot->obj.pos.z, shot->unk_48 * (1.5f + var_fv1), - var_fv0); + func_effect_8007B550(shot->obj.pos.x, gGroundHeight + 6.0f, shot->obj.pos.z, + shot->unk_48 * (1.5f + var_fv1), var_fv0); } if (gVersusMode) { @@ -129,21 +129,21 @@ void func_beam_80036318(PlayerShot* shot) { shot->obj.pos.z = D_ctx_80178498; // strange order on the globals shot->obj.pos.y = D_ctx_801784A0; shot->obj.pos.x = D_ctx_8017849C; - if ((shot->obj.id == PLAYERSHOT_3) || + if ((shot->obj.id == PLAYERSHOT_BOMB) || ((gCurrentLevel != LEVEL_AQUAS) && (shot->obj.id == PLAYERSHOT_8) && (shot->unk_5C != 0))) { if (shot->obj.id == PLAYERSHOT_8) { - shot->obj.id = PLAYERSHOT_3; + shot->obj.id = PLAYERSHOT_BOMB; shot->unk_5C = 0; } func_beam_80035E78(shot); } else if (shot->obj.id == PLAYERSHOT_8) { shot->unk_44 = 7.5f; for (i = 0; i < ARRAY_COUNT(gActors); i++) { - gActors[i].timer_0CA[shot->playerNum] = 0; + gActors[i].lockOnTimers[shot->playerNum] = 0; } shot->vel.x = shot->vel.y = shot->vel.z = 0.0f; if (gCurrentLevel == LEVEL_AQUAS) { - D_ctx_80178360 = D_ctx_80178364 = D_ctx_80178368 = 0; + gLight3R = gLight3G = gLight3B = 0; func_effect_8007B344(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 10.0f, 4); func_effect_8007C120(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.3f, 30); } else { @@ -303,12 +303,13 @@ s32 func_beam_80036874(PlayerShot* shot, f32* hitboxData, Object* obj) { Object_Kill(&shot->obj, shot->sfxSource); return 0; } - if ((obj->id < 176) || (obj->id >= 292)) { + if ((obj->id <= OBJ_SPRITE_GFOX_TARGET) || (obj->id >= OBJ_BOSS_292)) { func_beam_80036318(shot); } - if ((obj->id == 15) || ((obj->id == 22) && (i == 0)) || ((obj->id == 10) && (i == 0)) || - ((obj->id == 13) && (i == 0)) || ((obj->id == 12) && (i < 3)) || (obj->id == 16) || - (obj->id == 14)) { + if ((obj->id == OBJ_SCENERY_15) || ((obj->id == OBJ_SCENERY_22) && (i == 0)) || + ((obj->id == OBJ_SCENERY_10) && (i == 0)) || ((obj->id == OBJ_SCENERY_13) && (i == 0)) || + ((obj->id == OBJ_SCENERY_12) && (i < 3)) || (obj->id == OBJ_SCENERY_16) || + (obj->id == OBJ_SCENERY_14)) { if (shot->obj.pos.x - (obj->pos.x + hitbox->x.offset) < -hitbox->x.size) { if (hitbox->z.size + (obj->pos.z + hitbox->z.offset) < shot->obj.pos.z) { shot->obj.pos.z = hitbox->z.size + (obj->pos.z + hitbox->z.offset) - 5.0f; @@ -335,7 +336,7 @@ s32 func_beam_80036874(PlayerShot* shot, f32* hitboxData, Object* obj) { obj->pos.z, 0.0f, 0.0f, 0.0f, 2.0f, 1, 20); return i + 1; } - if (obj->id < 161) { + if (obj->id <= OBJ_SCENERY_160) { func_effect_8007A6F0(&shot->obj.pos, 0x29121007); } return i + 1; @@ -485,7 +486,7 @@ bool func_beam_8003774C(PlayerShot* shot, ObjectId objId, Object* obj) { sp7C.z = obj->pos.z - shot->obj.pos.z; // undefined behavior: if this check fails, the function returns no value if (((fabsf(sp7C.x) < 1100.0f) && (fabsf(sp7C.z) < 1100.0f) && (shot->obj.pos.y < 900.0f)) || - (objId == OBJ_BOSS_313) || (objId == ACTOR_EVENT_ID) || (objId == OBJ_80_39)) { + (objId == OBJ_BOSS_313) || (objId == ACTOR_EVENT_ID) || (objId == OBJ_SCENERY_39)) { Matrix_RotateY(gCalcMatrix, -obj->rot.y * M_DTOR, MTXF_NEW); sp7C.x = shot->obj.pos.x - obj->pos.x; sp7C.y = shot->obj.pos.y - obj->pos.y; @@ -506,15 +507,15 @@ bool func_beam_8003774C(PlayerShot* shot, ObjectId objId, Object* obj) { case OBJ_ACTOR_180: objId = COL1_0; break; - case OBJ_80_4: - case OBJ_80_5: + case OBJ_SCENERY_4: + case OBJ_SCENERY_5: objId = COL2_1; useCol2 = true; break; - case OBJ_80_149: + case OBJ_SCENERY_149: objId = COL1_5; break; - case OBJ_80_150: + case OBJ_SCENERY_150: objId = COL1_6; break; case OBJ_BOSS_308: @@ -532,71 +533,71 @@ bool func_beam_8003774C(PlayerShot* shot, ObjectId objId, Object* obj) { case OBJ_BOSS_313: objId = COL1_8; break; - case OBJ_80_39: + case OBJ_SCENERY_39: objId = COL1_1; break; - case OBJ_80_120: + case OBJ_SCENERY_120: objId = COL2_18; useCol2 = true; break; - case OBJ_80_143: + case OBJ_SCENERY_143: objId = COL2_17; useCol2 = true; break; - case OBJ_80_124: + case OBJ_SCENERY_124: objId = COL2_15; useCol2 = true; break; - case OBJ_80_126: + case OBJ_SCENERY_126: objId = COL2_16; useCol2 = true; break; - case OBJ_80_47: + case OBJ_SCENERY_47: objId = COL2_7; useCol2 = true; break; - case OBJ_80_2: + case OBJ_SCENERY_2: objId = COL2_2; useCol2 = true; break; - case OBJ_80_3: - case OBJ_80_69: + case OBJ_SCENERY_3: + case OBJ_SCENERY_69: objId = COL2_3; useCol2 = true; break; - case OBJ_80_140: + case OBJ_SCENERY_140: objId = COL2_4; useCol2 = true; break; - case OBJ_80_141: + case OBJ_SCENERY_141: objId = COL2_6; useCol2 = true; break; - case OBJ_80_117: + case OBJ_SCENERY_117: objId = COL2_14; useCol2 = true; break; - case OBJ_80_70: + case OBJ_SCENERY_70: objId = COL2_8; useCol2 = true; break; - case OBJ_80_72: + case OBJ_SCENERY_72: objId = COL2_9; useCol2 = true; break; - case OBJ_80_71: + case OBJ_SCENERY_71: objId = COL2_10; useCol2 = true; break; - case OBJ_80_73: + case OBJ_SCENERY_73: objId = COL2_11; useCol2 = true; break; - case OBJ_80_67: + case OBJ_SCENERY_67: objId = COL2_12; useCol2 = true; break; - case OBJ_80_74: + case OBJ_SCENERY_74: objId = COL2_13; useCol2 = true; break; @@ -678,13 +679,13 @@ void func_beam_80037CF4(PlayerShot* shot, Actor* actor, s32 hitIndex) { } else { actor->unk_0D0 = 2; actor->damage = 30; - actor->timer_0CA[shot->playerNum] = 0; + actor->lockOnTimers[shot->playerNum] = 0; } } actor->unk_0D4 = shot->playerNum + 1; - actor->unk_0D8.x = shot->obj.pos.x; - actor->unk_0D8.y = shot->obj.pos.y; - actor->unk_0D8.z = shot->obj.pos.z; + actor->hitPos.x = shot->obj.pos.x; + actor->hitPos.y = shot->obj.pos.y; + actor->hitPos.z = shot->obj.pos.z; if (((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0D2 == 0) && ((actor->unk_0B4 == EINFO_48) || (actor->unk_0B4 == EINFO_49) || (actor->unk_0B4 == EINFO_50))) || ((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->fwork[23] > 1.0f)) || @@ -695,7 +696,7 @@ void func_beam_80037CF4(PlayerShot* shot, Actor* actor, s32 hitIndex) { if ((actor->obj.id == OBJ_ACTOR_261) && (actor->state < 2)) { actor->state = 2; } - if ((shot->obj.id == PLAYERSHOT_8) || (shot->obj.id == PLAYERSHOT_3)) { + if ((shot->obj.id == PLAYERSHOT_8) || (shot->obj.id == PLAYERSHOT_BOMB)) { func_beam_80036318(shot); } else { shot->unk_64 = 25; @@ -730,9 +731,9 @@ void func_beam_80038140(PlayerShot* shot) { Vec3f sp7C; Actor* actor; Boss* boss; - Object_58* obj58; + Scenery360* scenery360; Sprite* sprite; - Object_80* obj80; + Scenery* scenery; Effect* effect; bool sp60; Player* player; @@ -898,32 +899,35 @@ void func_beam_80038140(PlayerShot* shot) { } if ((gLevelMode == LEVELMODE_ALL_RANGE) && (shot->playerNum < 110)) { - for (i = 0, obj58 = gObjects58; i < 200; i++, obj58++) { - if (obj58->obj.status == OBJ_ACTIVE) { - if ((obj58->obj.id == OBJ_80_117) || (obj58->obj.id == OBJ_80_141) || (obj58->obj.id == OBJ_80_149) || - (obj58->obj.id == OBJ_80_150) || (obj58->obj.id == OBJ_80_148) || (obj58->obj.id == OBJ_80_143) || - (obj58->obj.id == OBJ_80_160) || (obj58->obj.id == OBJ_80_1) || (obj58->obj.id == OBJ_80_3) || - (obj58->obj.id == OBJ_80_140)) { - func_beam_8003774C(shot, obj58->obj.id, &obj58->obj); + for (i = 0, scenery360 = gScenery360; i < 200; i++, scenery360++) { + if (scenery360->obj.status == OBJ_ACTIVE) { + if ((scenery360->obj.id == OBJ_SCENERY_117) || (scenery360->obj.id == OBJ_SCENERY_141) || + (scenery360->obj.id == OBJ_SCENERY_149) || (scenery360->obj.id == OBJ_SCENERY_150) || + (scenery360->obj.id == OBJ_SCENERY_148) || (scenery360->obj.id == OBJ_SCENERY_143) || + (scenery360->obj.id == OBJ_SCENERY_160) || (scenery360->obj.id == OBJ_SCENERY_1) || + (scenery360->obj.id == OBJ_SCENERY_3) || (scenery360->obj.id == OBJ_SCENERY_140)) { + func_beam_8003774C(shot, scenery360->obj.id, &scenery360->obj); } else { - func_beam_80036874(shot, obj58->info.hitbox, &obj58->obj); + func_beam_80036874(shot, scenery360->info.hitbox, &scenery360->obj); } } } } else { - for (i = 0, obj80 = gObjects80; i < 50; i++, obj80++) { - if (obj80->obj.status == OBJ_ACTIVE) { - if ((obj80->obj.id == OBJ_80_1) || (obj80->obj.id == OBJ_80_39) || (obj80->obj.id == OBJ_80_4) || - (obj80->obj.id == OBJ_80_5) || (obj80->obj.id == OBJ_80_120) || (obj80->obj.id == OBJ_80_124) || - (obj80->obj.id == OBJ_80_126) || (obj80->obj.id == OBJ_80_47) || (obj80->obj.id == OBJ_80_2) || - (obj80->obj.id == OBJ_80_3) || (obj80->obj.id == OBJ_80_67) || (obj80->obj.id == OBJ_80_74) || - (obj80->obj.id == OBJ_80_3)) { - func_beam_8003774C(shot, obj80->obj.id, &obj80->obj); + for (i = 0, scenery = gScenery; i < 50; i++, scenery++) { + if (scenery->obj.status == OBJ_ACTIVE) { + if ((scenery->obj.id == OBJ_SCENERY_1) || (scenery->obj.id == OBJ_SCENERY_39) || + (scenery->obj.id == OBJ_SCENERY_4) || (scenery->obj.id == OBJ_SCENERY_5) || + (scenery->obj.id == OBJ_SCENERY_120) || (scenery->obj.id == OBJ_SCENERY_124) || + (scenery->obj.id == OBJ_SCENERY_126) || (scenery->obj.id == OBJ_SCENERY_47) || + (scenery->obj.id == OBJ_SCENERY_2) || (scenery->obj.id == OBJ_SCENERY_3) || + (scenery->obj.id == OBJ_SCENERY_67) || (scenery->obj.id == OBJ_SCENERY_74) || + (scenery->obj.id == OBJ_SCENERY_3)) { + func_beam_8003774C(shot, scenery->obj.id, &scenery->obj); } else { - temp_v0 = func_beam_80036874(shot, obj80->info.hitbox, &obj80->obj); + temp_v0 = func_beam_80036874(shot, scenery->info.hitbox, &scenery->obj); if (temp_v0 != 0) { - obj80->dmgType = 1; - obj80->dmgPart = temp_v0 - 1; + scenery->dmgType = 1; + scenery->dmgPart = temp_v0 - 1; } } } @@ -987,7 +991,7 @@ void func_beam_80038140(PlayerShot* shot) { break; } boss->dmgType = DMG_BEAM; - if (shot->obj.id == PLAYERSHOT_3) { + if (shot->obj.id == PLAYERSHOT_BOMB) { boss->dmgType = DMG_BOMB; boss->damage = 20; } else if (shot->obj.id == PLAYERSHOT_8) { @@ -1224,7 +1228,7 @@ void func_beam_80039A50(PlayerShot* shot) { } } if (!sp104) { - if ((shot->obj.id != PLAYERSHOT_3) && (shot->unk_64 < 10) && !gVersusMode) { + if ((shot->obj.id != PLAYERSHOT_BOMB) && (shot->unk_64 < 10) && !gVersusMode) { Object_Kill(&shot->obj, shot->sfxSource); } } else { @@ -1236,7 +1240,7 @@ void func_beam_80039A50(PlayerShot* shot) { Matrix_RotateY(gGfxMatrix, shot->obj.rot.y * M_DTOR, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, shot->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, shot->obj.rot.z * M_DTOR, MTXF_APPLY); - if ((shot->obj.id == PLAYERSHOT_3) && (shot->unk_5C == 0)) { + if ((shot->obj.id == PLAYERSHOT_BOMB) && (shot->unk_5C == 0)) { Matrix_RotateZ(gGfxMatrix, shot->unk_34 * M_DTOR, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, shot->unk_30 * M_DTOR, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, shot->unk_2C * M_DTOR, MTXF_APPLY); @@ -1249,7 +1253,7 @@ void func_beam_80039A50(PlayerShot* shot) { case PLAYERSHOT_1: func_beam_80039210(shot); break; - case PLAYERSHOT_3: + case PLAYERSHOT_BOMB: if (shot->unk_5C == 0) { RCP_SetupDL(&gMasterDisp, 0x1D); gSPDisplayList(gMasterDisp++, D_10231A0); @@ -1395,7 +1399,7 @@ void func_beam_80039A50(PlayerShot* shot) { gSPDisplayList(gMasterDisp++, D_AQ_600DB80); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, shot->obj.pos.x, gGroundLevel, shot->obj.pos.z + D_ctx_80177D20, + Matrix_Translate(gGfxMatrix, shot->obj.pos.x, gGroundHeight, shot->obj.pos.z + D_ctx_80177D20, MTXF_APPLY); Matrix_Scale(gGfxMatrix, shot->unk_2C, shot->unk_30, shot->unk_34, MTXF_APPLY); RCP_SetupDL(&gMasterDisp, 0x31); @@ -1538,9 +1542,9 @@ void func_beam_8003B00C(PlayerShot* shot, Player* player) { Matrix_Push(&gCalcMatrix); func_beam_80038140(shot); Matrix_Pop(&gCalcMatrix); - if (shot->obj.pos.y < gGroundLevel) { + if (shot->obj.pos.y < gGroundHeight) { shot->unk_5C = 0; - func_beam_80036770(shot->obj.pos.x, gGroundLevel + 2.0f, shot->obj.pos.z, shot->obj.rot.y, 2.0f); + func_beam_80036770(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->obj.rot.y, 2.0f); break; } else if (shot->unk_5C == 2) { shot->unk_5C = 0; @@ -1579,9 +1583,9 @@ void func_beam_8003B00C(PlayerShot* shot, Player* player) { Object_Kill(&shot->obj, shot->sfxSource); } if (shot->unk_5C == 1) { - if (shot->obj.pos.y < gGroundLevel) { + if (shot->obj.pos.y < gGroundHeight) { func_beam_80036318(shot); - func_beam_80036770(shot->obj.pos.x, gGroundLevel + 2.0f, shot->obj.pos.z, shot->obj.rot.y, 2.0f); + func_beam_80036770(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->obj.rot.y, 2.0f); if (gCurrentLevel == LEVEL_FORTUNA) { func_effect_8007BC7C(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); func_effect_8007BC7C(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); @@ -1596,13 +1600,13 @@ void func_beam_8003B55C(PlayerShot* shot, s32 index) { Vec3f sp44; Vec3f sp38; - if ((gGroundType == GROUNDTYPE_WATER) && (shot->obj.pos.y < (gGroundLevel + 50.0f)) && (index == 0)) { - func_effect_8007ACE0(shot->obj.pos.x, gGroundLevel, shot->obj.pos.z, 0.1f, 1.5f, shot->obj.rot.y + 20.0f); - func_effect_8007ACE0(shot->obj.pos.x, gGroundLevel, shot->obj.pos.z, 0.1f, 1.5f, shot->obj.rot.y - 20.0f); + if ((gGroundType == GROUNDTYPE_WATER) && (shot->obj.pos.y < (gGroundHeight + 50.0f)) && (index == 0)) { + func_effect_8007ACE0(shot->obj.pos.x, gGroundHeight, shot->obj.pos.z, 0.1f, 1.5f, shot->obj.rot.y + 20.0f); + func_effect_8007ACE0(shot->obj.pos.x, gGroundHeight, shot->obj.pos.z, 0.1f, 1.5f, shot->obj.rot.y - 20.0f); } - if ((shot->obj.pos.y < gGroundLevel) && (D_ctx_801784AC != 4)) { + if ((shot->obj.pos.y < gGroundHeight) && (D_ctx_801784AC != 4)) { func_beam_80036318(shot); - shot->obj.pos.y = gGroundLevel + 2; + shot->obj.pos.y = gGroundHeight + 2; if (gCurrentLevel == LEVEL_BOLSE) { func_effect_8007A6F0(&shot->obj.pos, 0x29121007); } @@ -1615,14 +1619,14 @@ void func_beam_8003B55C(PlayerShot* shot, s32 index) { sp44.y = sp44.z = 0.0f; sp44.x = 40.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); - func_beam_80036770(shot->obj.pos.x + sp38.x, gGroundLevel + 2.0f, shot->obj.pos.z + sp38.z, + func_beam_80036770(shot->obj.pos.x + sp38.x, gGroundHeight + 2.0f, shot->obj.pos.z + sp38.z, shot->obj.rot.y, 2.0f); sp44.x = -40.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); - func_beam_80036770(shot->obj.pos.x + sp38.x, gGroundLevel + 2.0f, shot->obj.pos.z + sp38.z, + func_beam_80036770(shot->obj.pos.x + sp38.x, gGroundHeight + 2.0f, shot->obj.pos.z + sp38.z, shot->obj.rot.y, 2.0f); } else { - func_beam_80036770(shot->obj.pos.x, gGroundLevel + 2.0f, shot->obj.pos.z, shot->obj.rot.y, 2.0f); + func_beam_80036770(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->obj.rot.y, 2.0f); } } if (gGroundType == GROUNDTYPE_WATER) { @@ -1695,10 +1699,10 @@ bool func_beam_8003BB4C(PlayerShot* shot) { } for (i = 0, actor = gActors; i < 60; i++, actor++) { if ((actor->obj.status == OBJ_ACTIVE) && (actor->info.unk_1C != 0.0f) && - ((actor->timer_0CA[shot->playerNum] == 0) && (fabsf(shot->obj.pos.x - actor->obj.pos.x) <= var_fa0) && + ((actor->lockOnTimers[shot->playerNum] == 0) && (fabsf(shot->obj.pos.x - actor->obj.pos.x) <= var_fa0) && (fabsf(shot->obj.pos.y - (actor->obj.pos.y + actor->info.unk_1C)) <= var_fa0) && (fabsf(shot->obj.pos.z - actor->obj.pos.z) <= var_fa0))) { - actor->timer_0CA[shot->playerNum] = 20; + actor->lockOnTimers[shot->playerNum] = 20; func_enmy_80060F30(gPlayer[shot->playerNum].sfxSource, 0x49008027, shot->playerNum); for (j = 0; j < ARRAY_COUNT(gPlayerShots); j++) { if (gPlayerShots[j].obj.id == PLAYERSHOT_4) { @@ -1713,13 +1717,13 @@ 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->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) && + (player->form != FORM_ON_FOOT) && (i != shot->playerNum) && + (gVsLockOnTimers[i][shot->playerNum] == 0) && (fabsf(shot->obj.pos.x - player->pos.x) <= var_fa0) && (fabsf(shot->obj.pos.y - player->pos.y) <= var_fa0) && (fabsf(shot->obj.pos.z - player->unk_138) <= var_fa0)) { - D_ctx_80177B00[0][shot->playerNum] = D_ctx_80177B00[1][shot->playerNum] = - D_ctx_80177B00[2][shot->playerNum] = D_ctx_80177B00[3][shot->playerNum] = 0; - D_ctx_80177B00[i][shot->playerNum] = 20; + gVsLockOnTimers[0][shot->playerNum] = gVsLockOnTimers[1][shot->playerNum] = + gVsLockOnTimers[2][shot->playerNum] = gVsLockOnTimers[3][shot->playerNum] = 0; + gVsLockOnTimers[i][shot->playerNum] = 20; func_enmy_80060F30(gPlayer[shot->playerNum].sfxSource, 0x49008027, shot->playerNum); for (j = 0; j < ARRAY_COUNT(gPlayerShots); j++) { if (gPlayerShots[j].obj.id == PLAYERSHOT_4) { @@ -1737,12 +1741,12 @@ bool func_beam_8003BB4C(PlayerShot* shot) { void func_beam_8003BEF4(PlayerShot* shot) { if (gVersusMode) { - if ((shot->obj.pos.y < gGroundLevel) || func_beam_8003BB4C(shot) || + if ((shot->obj.pos.y < gGroundHeight) || func_beam_8003BB4C(shot) || !(gControllerHold[shot->playerNum].button & A_BUTTON) || (shot->unk_64 == 0)) { Object_Kill(&shot->obj, shot->sfxSource); } } else { - if ((shot->obj.pos.y < gGroundLevel) || func_beam_8003BB4C(shot) || + if ((shot->obj.pos.y < gGroundHeight) || func_beam_8003BB4C(shot) || !(gControllerHold[gMainController].button & A_BUTTON) || (shot->unk_64 == 0)) { Object_Kill(&shot->obj, shot->sfxSource); } @@ -1818,23 +1822,23 @@ void func_beam_8003C3D8(PlayerShot* shot) { static u8 D_800C9C20[4] = { 32, 32, 32, 255 }; f32 var_fv0; - D_ctx_80178370 = shot->obj.pos.x; - D_ctx_80178374 = shot->obj.pos.y; - D_ctx_80178378 = shot->obj.pos.z; + gLight3x = shot->obj.pos.x; + gLight3y = shot->obj.pos.y; + gLight3z = shot->obj.pos.z; if (gVersusMode) { - D_ctx_80178360 = D_800C9C18[shot->playerNum]; - D_ctx_80178364 = D_800C9C1C[shot->playerNum]; - D_ctx_80178368 = D_800C9C20[shot->playerNum]; + gLight3R = D_800C9C18[shot->playerNum]; + gLight3G = D_800C9C1C[shot->playerNum]; + gLight3B = D_800C9C20[shot->playerNum]; } else { - D_ctx_80178360 = 90; - D_ctx_80178364 = 90; - D_ctx_80178368 = 255; + gLight3R = 90; + gLight3G = 90; + gLight3B = 255; } var_fv0 = 0.7f; if (shot->unk_5C != 0) { var_fv0 = 1.0f; } - Math_SmoothStepToF(&D_ctx_8017836C, var_fv0, 1.0f, 0.08f, 0.001f); + Math_SmoothStepToF(&gLight3Brightness, var_fv0, 1.0f, 0.08f, 0.001f); } void func_beam_8003C4D0(PlayerShot* shot, s32 damage) { @@ -1845,20 +1849,20 @@ void func_beam_8003C4D0(PlayerShot* shot, s32 damage) { s32 pad[2]; Actor* actor; Sprite* sprite; - Object_80* obj80; + Scenery* scenery; Effect* effect; Player* player; f32 temp_fs2 = shot->unk_44 * 60.0f; - for (i = 0, obj80 = gObjects80; i < 50; i++, obj80++) { - if ((obj80->obj.status == OBJ_ACTIVE) && (obj80->obj.id == OBJ_80_56)) { - sp68 = obj80->obj.pos.x - shot->obj.pos.x; - sp64 = obj80->obj.pos.y - shot->obj.pos.y; - sp60 = obj80->obj.pos.z - shot->obj.pos.z; + for (i = 0, scenery = gScenery; i < 50; i++, scenery++) { + if ((scenery->obj.status == OBJ_ACTIVE) && (scenery->obj.id == OBJ_SCENERY_56)) { + sp68 = scenery->obj.pos.x - shot->obj.pos.x; + sp64 = scenery->obj.pos.y - shot->obj.pos.y; + sp60 = scenery->obj.pos.z - shot->obj.pos.z; if (sqrtf(SQ(sp68) + SQ(sp64) + SQ(sp60)) < temp_fs2) { - obj80->dmgType = 2; + scenery->dmgType = 2; } - obj80->dmgPart = 0; + scenery->dmgPart = 0; } } for (i = 0, sprite = gSprites; i < 40; i++, sprite++) { @@ -1886,9 +1890,9 @@ void func_beam_8003C4D0(PlayerShot* shot, s32 damage) { if ((gLevelMode == 0) && (sp60 < 0.0f)) { sp60 *= 0.6f; } - actor->unk_0D8.x = shot->obj.pos.x; - actor->unk_0D8.y = shot->obj.pos.y; - actor->unk_0D8.z = shot->obj.pos.z; + actor->hitPos.x = shot->obj.pos.x; + actor->hitPos.y = shot->obj.pos.y; + actor->hitPos.z = shot->obj.pos.z; if (sqrtf(SQ(sp68) + SQ(sp64) + SQ(sp60)) < temp_fs2) { if ((actor->obj.id == OBJ_ACTOR_193) || (actor->obj.id == OBJ_ACTOR_186) || (actor->obj.id == OBJ_ACTOR_190) || (actor->obj.id == OBJ_ACTOR_202) || @@ -1998,7 +2002,7 @@ void func_beam_8003CC08(PlayerShot* shot) { func_beam_80035E78(shot); break; } - if ((shot->obj.pos.y < gGroundLevel) && (D_ctx_801784AC != 4)) { + if ((shot->obj.pos.y < gGroundHeight) && (D_ctx_801784AC != 4)) { func_beam_80035E78(shot); break; } @@ -2070,14 +2074,14 @@ void func_beam_8003CF90(PlayerShot* shot) { Actor* actor; Player* player; - if ((shot->obj.pos.y < gGroundLevel) || (shot->unk_64 == 1)) { - if ((gGroundType == GROUNDTYPE_WATER) && (shot->obj.pos.y < gGroundLevel)) { + if ((shot->obj.pos.y < gGroundHeight) || (shot->unk_64 == 1)) { + if ((gGroundType == GROUNDTYPE_WATER) && (shot->obj.pos.y < gGroundHeight)) { shot->unk_48 = 10.0f; - func_effect_8007D9DC(shot->obj.pos.x, gGroundLevel + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, + func_effect_8007D9DC(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, shot->unk_48 * 3.0f, 0); - func_effect_8007D9DC(shot->obj.pos.x, gGroundLevel + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, + func_effect_8007D9DC(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, shot->unk_48 * 3.0f, 5); - func_effect_8007ADF4(shot->obj.pos.x, gGroundLevel, shot->obj.pos.z, shot->unk_48 * 0.05f, + func_effect_8007ADF4(shot->obj.pos.x, gGroundHeight, shot->obj.pos.z, shot->unk_48 * 0.05f, shot->unk_48 * 0.5f); func_effect_8007A6F0(&shot->obj.pos, 0x19000014); } @@ -2087,18 +2091,18 @@ void func_beam_8003CF90(PlayerShot* shot) { if (shot->unk_60 == 0) { for (i = 0, actor = gActors; i < 60; i++, actor++) { if ((actor->obj.status == OBJ_ACTIVE) && (actor->info.unk_1C != 0.0f) && - (actor->timer_0CA[shot->playerNum] != 0)) { + (actor->lockOnTimers[shot->playerNum] != 0)) { var_a3 = 1; - actor->timer_0CA[shot->playerNum] = 2; + actor->lockOnTimers[shot->playerNum] = 2; D_800C9C24 = actor->obj.pos; D_800C9C24.y += actor->info.unk_1C; } } for (i = 0, player = gPlayer; i < gCamCount; i++, player++) { if (((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (player->state_1C8 == PLAYERSTATE_1C8_U_TURN)) && - (D_ctx_80177B00[i][shot->playerNum] != 0)) { + (gVsLockOnTimers[i][shot->playerNum] != 0)) { var_a3 = 1; - D_ctx_80177B00[i][shot->playerNum] = 2; + gVsLockOnTimers[i][shot->playerNum] = 2; D_800C9C24.x = player->pos.x; if (player->form == FORM_ARWING) { D_800C9C24.y = player->pos.y; @@ -2155,13 +2159,13 @@ void func_beam_8003CF90(PlayerShot* shot) { shot->vel.z = sp38.z; } func_beam_80038140(shot); - D_ctx_80178370 = shot->obj.pos.x; - D_ctx_80178374 = shot->obj.pos.y; - D_ctx_80178378 = shot->obj.pos.z; - D_ctx_80178360 = 90; - D_ctx_80178364 = 180; - D_ctx_80178368 = 90; - Math_SmoothStepToF(&D_ctx_8017836C, 0.6f, 1.0f, 0.08f, 0.001f); + gLight3x = shot->obj.pos.x; + gLight3y = shot->obj.pos.y; + gLight3z = shot->obj.pos.z; + gLight3R = 90; + gLight3G = 180; + gLight3B = 90; + Math_SmoothStepToF(&gLight3Brightness, 0.6f, 1.0f, 0.08f, 0.001f); } } @@ -2183,7 +2187,7 @@ void func_beam_8003D54C(PlayerShot* shot, s32 index) { case PLAYERSHOT_2: func_beam_8003B00C(shot, &gPlayer[shot->playerNum]); break; - case PLAYERSHOT_3: + case PLAYERSHOT_BOMB: func_beam_8003CC08(shot); break; case PLAYERSHOT_4: @@ -2286,7 +2290,7 @@ void func_beam_8003D854(PlayerShot* shot) { void PlayerShot_Update(void) { s32 i; - for (i = 0; i < 16; i++) { + for (i = 0; i < ARRAY_COUNT(gPlayerShots); i++) { gPlayerShots[i].index = i; func_beam_8003D854(&gPlayerShots[i]); } @@ -2295,7 +2299,7 @@ void PlayerShot_Update(void) { void PlayerShot_Draw(void) { s32 i; - for (i = 0; i < 16; i++) { + for (i = 0; i < ARRAY_COUNT(gPlayerShots); i++) { gPlayerShots[i].index = i; if (gPlayerShots[i].obj.status != 0) { if (!((gReflectY < 0) && (gPlayerShots[i].obj.rot.x < -10.0f))) { diff --git a/src/engine/fox_bg.c b/src/engine/fox_bg.c index 4bdfc422..d185de70 100644 --- a/src/engine/fox_bg.c +++ b/src/engine/fox_bg.c @@ -24,142 +24,142 @@ #include "prevent_bss_reordering2.h" #include "prevent_bss_reordering3.h" -f32 D_bg_8015F960; -u8 D_bg_8015F964; -f32 D_bg_8015F968; -f32 D_bg_8015F96C; -f32 D_bg_8015F970; +f32 gWarpZoneBgAlpha; +u8 D_bg_8015F964; // related to water surfaces +f32 D_bg_8015F968; // heat shimmer effect for SO and TI? +f32 D_bg_8015F96C; // unused. some sort of starfield motion blur for meteo? +f32 D_bg_8015F970; // these next few vars seem to be related to aquas surface s32 D_bg_8015F974; s32 D_bg_8015F978; s32 D_bg_8015F97C; s32 D_bg_8015F980; -f32 D_bg_8015F984; +f32 D_bg_8015F984; // related to scale of venom in area 6 UNK_TYPE D_bg_8015F988[0x683]; // Unused? Close to being [13][0x80] -f32 D_bg_80161394; // can be static +f32 gAndrossUnkBrightness; // can be static -f32 D_bg_800C9C30 = 0.0f; -u16 D_bg_800C9C34 = 1; +f32 gAndrossUnkAlpha = 0.0f; +u16 gBolseDynamicGround = true; s32 D_bg_800C9C38 = 0; // unused? -u16 D_bg_800C9C3C[16] = { +u16 gStarColors[16] = { 0x108B, 0x108B, 0x1087, 0x1089, 0x39FF, 0x190D, 0x108B, 0x1089, 0x294B, 0x18DF, 0x294B, 0x1085, 0x39FF, 0x108B, 0x18CD, 0x108B, }; -Gfx* D_bg_800C9C5C[13] = { +Gfx* sSunDLs[13] = { D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_BG_PLANET_20112C0, D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_BG_PLANET_20112C0, D_102A8A0, }; -Gfx* D_bg_800C9C90[13] = { +Gfx* sKaSunDLs[13] = { D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, }; -f32 D_bg_800C9CC4[13] = { +f32 sSunShifts[13] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 10.0f, 13.0f, 20.0f, 35.0f, 40.0f, 50.0f, 50.0f, 70.0f, }; -f32 D_bg_800C9CF8[13] = { +f32 sKaSunShifts[13] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f, 10.0f, 16.0f, 20.0f, 30.0f, 45.0f, 60.0f, 70.0f, }; -f32 D_bg_800C9D2C[13] = { +f32 sSunScales[13] = { 0.7f, 1.0f, 1.2f, 1.4f, 1.8f, 2.0f, 0.4f, 0.6f, 0.8f, 1.7f, 0.8f, 4.0f, 2.0f, }; -f32 D_bg_800C9D60[13] = { +f32 sKaSunScales[13] = { 0.525f, 0.75f, 0.90000004f, 1.05f, 1.3499999f, 0.15f, 0.25f, 0.35f, 1.0f, 0.6f, 0.35f, 0.9f, 1.0f, }; -Color_RGB8 D_bg_800C9D94[13] = { +Color_RGB8 sSunColors[13] = { { 255, 255, 255 }, { 255, 255, 192 }, { 255, 255, 128 }, { 255, 255, 96 }, { 255, 255, 64 }, { 255, 255, 64 }, { 255, 255, 64 }, { 255, 255, 64 }, { 255, 255, 64 }, { 255, 255, 64 }, { 255, 255, 64 }, { 255, 255, 64 }, { 255, 255, 64 }, }; -Color_RGB8 D_bg_800C9DBC[13] = { +Color_RGB8 sKaSunColors[13] = { { 255, 128, 64 }, { 255, 128, 64 }, { 255, 128, 64 }, { 255, 128, 64 }, { 255, 128, 64 }, { 255, 255, 64 }, { 255, 128, 64 }, { 255, 128, 64 }, { 255, 255, 64 }, { 128, 128, 128 }, { 128, 128, 255 }, { 255, 255, 64 }, { 255, 128, 64 }, }; -s32 D_bg_800C9DE4[13] = { +s32 sSunAlphas[13] = { 255, 80, 64, 48, 32, 12, 32, 44, 32, 42, 36, 12, 38, }; -s32 D_bg_800C9E18[13] = { +s32 sKaSunAlphas[13] = { 80, 60, 40, 20, 10, 20, 30, 20, 15, 30, 20, 27, 20, }; -s32 D_bg_800C9E4C[2] = { 10, 4 }; -s32 D_bg_800C9E54[2] = { 140, 40 }; -f32 D_bg_800C9E5C[2] = { 1.2f, 0.5f }; -f32 D_bg_800C9E64[4] = { +s32 sSunGlareAlphaStep[2] = { 10, 4 }; +s32 sSunGlareMaxAlpha[2] = { 140, 40 }; +f32 sLensFlareAlphaMod[2] = { 1.2f, 0.5f }; +f32 sGroundPositions360x[4] = { 6000.0f, -6000.0f, 6000.0f, -6000.0f, }; -f32 D_bg_800C9E74[4] = { +f32 sGroundPositions360z[4] = { 6000.0f, 6000.0f, -6000.0f, -6000.0f, }; -void func_bg_8003DAF0(void) { - f32 var_fa0; - f32 var_fv1; - s16 temp_ft0; - s16 temp_ft2; +void Background_DrawStarfield(void) { + f32 by; + f32 bx; + s16 vy; + s16 vx; s32 i; - s32 var_s2; - f32 sp70; - f32 spf6C; - f32 spf68; - f32 spf64; - f32* sp60; - f32* sp5C; - u32* sp58; + s32 starCount; + f32 zCos; + f32 zSin; + f32 xField; + f32 yField; + f32* xStar; + f32* yStar; + u32* color; gDPPipeSync(gMasterDisp++); gDPSetCycleType(gMasterDisp++, G_CYC_FILL); gDPSetCombineMode(gMasterDisp++, G_CC_SHADE, G_CC_SHADE); gDPSetRenderMode(gMasterDisp++, G_RM_OPA_SURF, G_RM_OPA_SURF2); - var_s2 = D_ctx_80178410; - if (var_s2 != 0) { - if (D_ctx_80178420 >= 1.5f * SCREEN_WIDTH) { - D_ctx_80178420 -= 1.5f * SCREEN_WIDTH; + starCount = gStarCount; + if (starCount != 0) { + if (gStarfieldX >= 1.5f * SCREEN_WIDTH) { + gStarfieldX -= 1.5f * SCREEN_WIDTH; } - if (D_ctx_80178424 >= 1.5f * SCREEN_HEIGHT) { - D_ctx_80178424 -= 1.5f * SCREEN_HEIGHT; + if (gStarfieldY >= 1.5f * SCREEN_HEIGHT) { + gStarfieldY -= 1.5f * SCREEN_HEIGHT; } - if (D_ctx_80178420 < 0.0f) { - D_ctx_80178420 += 1.5f * SCREEN_WIDTH; + if (gStarfieldX < 0.0f) { + gStarfieldX += 1.5f * SCREEN_WIDTH; } - if (D_ctx_80178424 < 0.0f) { - D_ctx_80178424 += 1.5f * SCREEN_HEIGHT; + if (gStarfieldY < 0.0f) { + gStarfieldY += 1.5f * SCREEN_HEIGHT; } - spf68 = D_ctx_80178420; - spf64 = D_ctx_80178424; + xField = gStarfieldX; + yField = gStarfieldY; - sp60 = D_ctx_80178288; - sp5C = D_ctx_80178290; - sp58 = D_ctx_80178298; + xStar = gStarOffsetsX; + yStar = gStarOffsetsY; + color = gStarFillColors; if (gGameState != GSTATE_PLAY) { - var_s2 = 1000; + starCount = 1000; } - sp70 = __cosf(D_ctx_80178428); - spf6C = __sinf(D_ctx_80178428); - for (i = 0; i < var_s2; i++, sp5C++, sp60++, sp58++) { - var_fv1 = *sp60 + spf68; - var_fa0 = *sp5C + spf64; - if (var_fv1 >= 1.25f * SCREEN_WIDTH) { - var_fv1 -= 1.5f * SCREEN_WIDTH; + zCos = __cosf(gStarfieldRoll); + zSin = __sinf(gStarfieldRoll); + for (i = 0; i < starCount; i++, yStar++, xStar++, color++) { + bx = *xStar + xField; + by = *yStar + yField; + if (bx >= 1.25f * SCREEN_WIDTH) { + bx -= 1.5f * SCREEN_WIDTH; } - var_fv1 -= SCREEN_WIDTH / 2.0f; + bx -= SCREEN_WIDTH / 2.0f; - if (var_fa0 >= 1.25f * SCREEN_HEIGHT) { - var_fa0 -= 1.5f * SCREEN_HEIGHT; + if (by >= 1.25f * SCREEN_HEIGHT) { + by -= 1.5f * SCREEN_HEIGHT; } - var_fa0 -= SCREEN_HEIGHT / 2.0f; + by -= SCREEN_HEIGHT / 2.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) && (temp_ft0 > 0) && (temp_ft0 < SCREEN_HEIGHT)) { + vx = (zCos * bx) + (zSin * by) + SCREEN_WIDTH / 2.0f; + vy = (-zSin * bx) + (zCos * by) + SCREEN_HEIGHT / 2.0f; + if ((vx >= 0) && (vx < SCREEN_WIDTH) && (vy > 0) && (vy < SCREEN_HEIGHT)) { gDPPipeSync(gMasterDisp++); - gDPSetFillColor(gMasterDisp++, *sp58); - gDPFillRectangle(gMasterDisp++, temp_ft2, temp_ft0, temp_ft2, temp_ft0); + gDPSetFillColor(gMasterDisp++, *color); + gDPFillRectangle(gMasterDisp++, vx, vy, vx, vy); } } } @@ -167,15 +167,15 @@ void func_bg_8003DAF0(void) { gDPSetColorDither(gMasterDisp++, G_CD_MAGICSQ); } -void func_bg_8003DE68(s32 arg0, s32 arg1) { - f32 var_fa0; // 8C - f32 var_fv1; // 88 - s16 temp_ft0; // 84 - s16 temp_ft2; +void Background_DrawPartialStarfield(s32 yMin, s32 yMax) { + f32 by; // 8C + f32 bx; // 88 + s16 vy; // 84 + s16 vx; s32 i; // 80 s32 var_s2; // 7C - f32 sp70; // 78 - f32 spf6C; // 74 + f32 cos; // 78 + f32 sin; // 74 f32 spf68; // 70 f32 spf64; // 6C f32* sp60; // 68 @@ -187,47 +187,47 @@ 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 >= 1.5f * SCREEN_WIDTH) { - D_ctx_80178420 -= 1.5f * SCREEN_WIDTH; + if (gStarfieldX >= 1.5f * SCREEN_WIDTH) { + gStarfieldX -= 1.5f * SCREEN_WIDTH; } - if (D_ctx_80178424 >= 1.5f * SCREEN_HEIGHT) { - D_ctx_80178424 -= 1.5f * SCREEN_HEIGHT; + if (gStarfieldY >= 1.5f * SCREEN_HEIGHT) { + gStarfieldY -= 1.5f * SCREEN_HEIGHT; } - if (D_ctx_80178420 < 0.0f) { - D_ctx_80178420 += 1.5f * SCREEN_WIDTH; + if (gStarfieldX < 0.0f) { + gStarfieldX += 1.5f * SCREEN_WIDTH; } - if (D_ctx_80178424 < 0.0f) { - D_ctx_80178424 += 1.5f * SCREEN_HEIGHT; + if (gStarfieldY < 0.0f) { + gStarfieldY += 1.5f * SCREEN_HEIGHT; } - spf68 = D_ctx_80178420; - spf64 = D_ctx_80178424; + spf68 = gStarfieldX; + spf64 = gStarfieldY; - sp60 = D_ctx_80178288; - sp5C = D_ctx_80178290; - sp58 = D_ctx_80178298; + sp60 = gStarOffsetsX; + sp5C = gStarOffsetsY; + sp58 = gStarFillColors; var_s2 = 500; - sp70 = __cosf(D_ctx_80178428); - spf6C = __sinf(D_ctx_80178428); + cos = __cosf(gStarfieldRoll); + sin = __sinf(gStarfieldRoll); for (i = 0; i < var_s2; i++, sp5C++, sp60++, sp58++) { - var_fv1 = *sp60 + spf68; - var_fa0 = *sp5C + spf64; - if (var_fv1 >= SCREEN_WIDTH * 1.25f) { - var_fv1 -= 1.5f * SCREEN_WIDTH; + bx = *sp60 + spf68; + by = *sp5C + spf64; + if (bx >= SCREEN_WIDTH * 1.25f) { + bx -= 1.5f * SCREEN_WIDTH; } - var_fv1 -= SCREEN_WIDTH / 2.0f; - if (var_fa0 >= SCREEN_HEIGHT * 1.25f) { - var_fa0 -= 1.5f * SCREEN_HEIGHT; + bx -= SCREEN_WIDTH / 2.0f; + if (by >= SCREEN_HEIGHT * 1.25f) { + by -= 1.5f * SCREEN_HEIGHT; } - var_fa0 -= SCREEN_HEIGHT / 2.0f; + by -= SCREEN_HEIGHT / 2.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)) { + vx = (cos * bx) + (sin * by) + SCREEN_WIDTH / 2.0f; + vy = (-sin * bx) + (cos * by) + SCREEN_HEIGHT / 2.0f; + if ((vx >= 0) && (vx < SCREEN_WIDTH) && (yMin < vy) && (vy < yMax)) { gDPPipeSync(gMasterDisp++); gDPSetFillColor(gMasterDisp++, *sp58); - gDPFillRectangle(gMasterDisp++, temp_ft2, temp_ft0, temp_ft2, temp_ft0); + gDPFillRectangle(gMasterDisp++, vx, vy, vx, vy); } } gDPPipeSync(gMasterDisp++); @@ -237,37 +237,38 @@ void func_bg_8003DE68(s32 arg0, s32 arg1) { void func_bg_8003E1E0(void) { } -void func_bg_8003E1E8(void) { +// TODO: use SCREEN_WIDTH and _HEIGHT +void Background_DrawBackdrop(void) { f32 sp13C; f32 sp138; f32 sp134; f32 sp130; f32 sp12C; f32 sp128; - s32 sp124; - u8 var_s0; - s32 sp11C; + s32 i; + u8 levelType; + s32 levelId; if (D_ctx_80177AB0 == 0) { return; } - var_s0 = gLevelType; + levelType = gLevelType; if ((gCurrentLevel == LEVEL_VERSUS) && (gVersusStage == VS_STAGE_SECTOR_Z)) { - var_s0 = LEVELTYPE_PLANET; + levelType = LEVELTYPE_PLANET; } if (gCurrentLevel == LEVEL_TRAINING) { - var_s0 = LEVELTYPE_SPACE; + levelType = LEVELTYPE_SPACE; } - sp11C = gCurrentLevel; + levelId = gCurrentLevel; Matrix_Push(&gGfxMatrix); if (D_ctx_80177C70 == 2) { Matrix_Scale(gGfxMatrix, 1.2f, 1.2f, 1.0f, MTXF_APPLY); } - switch (var_s0) { + switch (levelType) { case LEVELTYPE_PLANET: RCP_SetupDL(&gMasterDisp, 0x11); - switch (sp11C) { + switch (levelId) { case LEVEL_FORTUNA: case LEVEL_KATINA: case LEVEL_VENOM_2: @@ -362,15 +363,15 @@ void func_bg_8003E1E8(void) { RCP_SetupDL(&gMasterDisp, 0x3E); if (D_ctx_80177AB0 == 4) { if (!(gGameFrameCount & 8)) { - Math_SmoothStepToF(&D_bg_80161394, 0.0f, 1.0f, 30.0f, 0); + Math_SmoothStepToF(&gAndrossUnkBrightness, 0.0f, 1.0f, 30.0f, 0); } else { - Math_SmoothStepToF(&D_bg_80161394, 120.0f, 1.0f, 30.0f, 0); + Math_SmoothStepToF(&gAndrossUnkBrightness, 120.0f, 1.0f, 30.0f, 0); } } else { - D_bg_80161394 = 255.0f; + gAndrossUnkBrightness = 255.0f; } - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, (s32) D_bg_80161394, (s32) D_bg_80161394, - (s32) D_bg_800C9C30); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, (s32) gAndrossUnkBrightness, + (s32) gAndrossUnkBrightness, (s32) gAndrossUnkAlpha); sp134 = (gPlayer[gPlayerNum].camPitch * -6000.0f) - (gPlayer[gPlayerNum].cam.eye.y * 0.4f); sp13C = Math_ModF(Math_RadToDeg(gPlayer[gPlayerNum].camYaw) * (-7280.0f / 360.0f) * 5.0f, @@ -389,7 +390,7 @@ void func_bg_8003E1E8(void) { if (D_ctx_80177AB0 == 5) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 64); } else { - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 255, 128, (s32) D_bg_800C9C30); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 255, 128, (s32) gAndrossUnkAlpha); } Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -290.0f, MTXF_APPLY); Matrix_Push(&gGfxMatrix); @@ -508,24 +509,24 @@ void func_bg_8003E1E8(void) { sp130 = Math_RadToDeg(gPlayer[0].camPitch); if (((sp12C < 45.0f) || (sp12C > 315.0f)) && ((sp130 < 40.0f) || (sp130 > 325.0f))) { RCP_SetupDL_36(); - sp138 = D_ctx_80178420; - sp134 = D_ctx_80178424; - if (((gCurrentLevel == LEVEL_SECTOR_X) || (gCurrentLevel == LEVEL_METEO)) && (gLevelStage == 1)) { - sp11C = LEVEL_WARP_ZONE; + sp138 = gStarfieldX; + sp134 = gStarfieldY; + if (((gCurrentLevel == LEVEL_SECTOR_X) || (gCurrentLevel == LEVEL_METEO)) && (gLevelPhase == 1)) { + levelId = LEVEL_WARP_ZONE; } - if (sp11C == LEVEL_SECTOR_X) { + if (levelId == LEVEL_SECTOR_X) { sp138 = Math_ModF(sp138 + 60.0f, 480.0f); sp134 = Math_ModF(sp134 + 360.0f - 40.0f, 360.0f); - } else if (sp11C == LEVEL_TRAINING) { + } else if (levelId == LEVEL_TRAINING) { sp138 = Math_ModF(sp138 - 30.0f, 480.0f); sp134 = Math_ModF(sp134 + 360.0f - 40.0f, 360.0f); - } else if ((sp11C == LEVEL_SECTOR_Y) && (gLevelMode == LEVELMODE_ON_RAILS)) { + } else if ((levelId == LEVEL_SECTOR_Y) && (gLevelMode == LEVELMODE_ON_RAILS)) { sp138 = Math_ModF(sp138 + 480.0f - 60.0f, 480.0f); sp134 = Math_ModF(sp134, 360.0f); - } else if (sp11C == LEVEL_FORTUNA) { + } else if (levelId == LEVEL_FORTUNA) { sp138 = Math_ModF(sp138 - 34.5f, 480.0f); sp134 = Math_ModF(sp134 + 19.0f, 360.0f); - } else if (sp11C == LEVEL_BOLSE) { + } else if (levelId == LEVEL_BOLSE) { if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) || (gPlayer[0].unk_1D0 < 10)) { sp134 = Math_ModF(sp134 + 360.0f - 100.0f, 360.0f); } @@ -539,12 +540,12 @@ void func_bg_8003E1E8(void) { if ((sp130 > 180.0f) && (sp134 > 280.0f)) { sp134 = -(360.0f - sp134); } - Matrix_RotateZ(gGfxMatrix, D_ctx_80178428, MTXF_APPLY); - switch (sp11C) { + Matrix_RotateZ(gGfxMatrix, gStarfieldRoll, MTXF_APPLY); + switch (levelId) { case LEVEL_WARP_ZONE: - if ((s32) D_bg_8015F960 != 0) { + if ((s32) gWarpZoneBgAlpha != 0) { RCP_SetupDL_62(); - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) D_bg_8015F960); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) gWarpZoneBgAlpha); Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.0f, MTXF_APPLY); Matrix_Push(&gGfxMatrix); @@ -573,7 +574,7 @@ void func_bg_8003E1E8(void) { } break; case LEVEL_SECTOR_X: - if (gOverlayStage == 0) { + if (gSceneSetup == 0) { Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -647,27 +648,27 @@ void func_bg_8003E1E8(void) { } Matrix_Pop(&gGfxMatrix); } - if (D_ctx_80178414 > 0.0f) { - f32* sp50 = D_ctx_80178288; - f32* sp4C = D_ctx_80178290; - f32 sp48; + if (gStarWarpDistortion > 0.0f) { + f32* xStar = gStarOffsetsX; + f32* yStar = gStarOffsetsY; + f32 zRot; RCP_SetupDL_14(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 128, 128, 255, 255); - sp124 = 0; - sp48 = 0.0f; - for (sp124 = 0; sp124 < 300; sp124++, sp50++, sp4C++) { - *sp50 = RAND_FLOAT_SEEDED(480.0f) - 80.0f; - *sp4C = RAND_FLOAT_SEEDED(360.0f) - 60.0f; + i = 0; + zRot = 0.0f; + for (i = 0; i < 300; i++, xStar++, yStar++) { + *xStar = RAND_FLOAT_SEEDED(480.0f) - 80.0f; + *yStar = RAND_FLOAT_SEEDED(360.0f) - 60.0f; Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, (*sp50 - 160.0f) * 10.0f, (*sp4C - 120.0f) * 10.0f, -5000.0f, + Matrix_Translate(gGfxMatrix, (*xStar - 160.0f) * 10.0f, (*yStar - 120.0f) * 10.0f, -5000.0f, MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, sp48, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, 10.0f, 1.0f, -D_ctx_80178414, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, zRot, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 10.0f, 1.0f, -gStarWarpDistortion, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_edisplay_800CFD80); Matrix_Pop(&gGfxMatrix); - sp48 += M_PI / 4; + zRot += M_PI / 4; } } break; @@ -675,13 +676,13 @@ void func_bg_8003E1E8(void) { Matrix_Pop(&gGfxMatrix); } -void func_bg_80040450(void) { - f32 sp44; - f32 var_fa0; - Color_RGB8* var_s1; - s32* var_s2; - Gfx** var_s3; - f32* var_s4; +void Background_DrawSun(void) { + f32 camYaw; + f32 camPitch; + Color_RGB8* sunColor; + s32* sunAlpha; + Gfx** sunDL; + f32* sunScale; s32 i; s32 levelType = gLevelType; @@ -689,119 +690,121 @@ void func_bg_80040450(void) { (gCurrentLevel == LEVEL_SOLAR) || (gCurrentLevel == LEVEL_TRAINING) || gVersusMode) { return; } - gPlayerFillScreenAlphas[gPlayerNum] -= D_bg_800C9E4C[levelType]; - if (gPlayerFillScreenAlphas[gPlayerNum] > 300) { - gPlayerFillScreenAlphas[gPlayerNum] = 0; + gPlayerGlareAlphas[gPlayerNum] -= sSunGlareAlphaStep[levelType]; + if (gPlayerGlareAlphas[gPlayerNum] > 300) { + gPlayerGlareAlphas[gPlayerNum] = 0; } if (((gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO)) || (((gPlayer[gPlayerNum].state_1C8 == PLAYERSTATE_1C8_U_TURN) || (gLevelMode == LEVELMODE_ALL_RANGE) || (gPlayer[gPlayerNum].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) && (gLevelType == LEVELTYPE_PLANET) && (gCurrentLevel != LEVEL_TITANIA) && (gCurrentLevel != LEVEL_AQUAS))) { - gPlayerFillScreenReds[gPlayerNum] = 128; - gPlayerFillScreenGreens[gPlayerNum] = 128; - gPlayerFillScreenBlues[gPlayerNum] = 128; - sp44 = Math_RadToDeg(gPlayer[gPlayerNum].camYaw); - var_fa0 = Math_RadToDeg(gPlayer[gPlayerNum].camPitch); - if (var_fa0 > 180.0f) { - var_fa0 -= 360.0f; + gPlayerGlareReds[gPlayerNum] = 128; + gPlayerGlareGreens[gPlayerNum] = 128; + gPlayerGlareBlues[gPlayerNum] = 128; + camYaw = Math_RadToDeg(gPlayer[gPlayerNum].camYaw); + camPitch = Math_RadToDeg(gPlayer[gPlayerNum].camPitch); + if (camPitch > 180.0f) { + camPitch -= 360.0f; } - sp44 -= 135.0f; - D_ctx_801783D0 = -sp44 * 3.2f; - D_ctx_801783D4 = ((-var_fa0 * 3.2f) + 130.0f) - ((gPlayer[gPlayerNum].cam.eye.y - 350.0f) * 0.015f); + camYaw -= 135.0f; + gSunViewX = -camYaw * 3.2f; + gSunViewY = (-camPitch * 3.2f) + 130.0f - ((gPlayer[gPlayerNum].cam.eye.y - 350.0f) * 0.015f); if (gCurrentLevel == LEVEL_KATINA) { - D_ctx_801783D4 -= 80.0f; + gSunViewY -= 80.0f; } if ((gCurrentLevel == LEVEL_ZONESS) && (gPlayer[0].unk_1D0 >= 2) && !gMissedZoSearchlight) { - D_ctx_801783D4 -= 60.0f; - D_ctx_801783D0 -= 480.0f; + gSunViewY -= 60.0f; + gSunViewX -= 480.0f; } - if ((D_ctx_801783D0 < 120.0f) && (D_ctx_801783D0 > -120.0f) && (D_ctx_801783D4 < 120.0f)) { - gPlayerFillScreenAlphas[gPlayerNum] += D_bg_800C9E4C[levelType] * 2; - if (D_bg_800C9E54[levelType] < gPlayerFillScreenAlphas[gPlayerNum]) { - gPlayerFillScreenAlphas[gPlayerNum] = D_bg_800C9E54[levelType]; + if ((gSunViewX < 120.0f) && (gSunViewX > -120.0f) && (gSunViewY < 120.0f)) { + gPlayerGlareAlphas[gPlayerNum] += sSunGlareAlphaStep[levelType] * 2; + if (sSunGlareMaxAlpha[levelType] < gPlayerGlareAlphas[gPlayerNum]) { + gPlayerGlareAlphas[gPlayerNum] = sSunGlareMaxAlpha[levelType]; } } } - if (gPlayerFillScreenAlphas[gPlayerNum] != 0) { + if (gPlayerGlareAlphas[gPlayerNum] != 0) { Matrix_Push(&gGfxMatrix); Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY); - Matrix_Translate(gGfxMatrix, D_ctx_801783D0, D_ctx_801783D4, -200.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, gSunViewX, gSunViewY, -200.0f, MTXF_APPLY); RCP_SetupDL_62(); - var_s1 = D_bg_800C9D94; - var_s2 = D_bg_800C9DE4; - var_s3 = D_bg_800C9C5C; - var_s4 = D_bg_800C9D2C; + sunColor = sSunColors; + sunAlpha = sSunAlphas; + sunDL = sSunDLs; + sunScale = sSunScales; if (gCurrentLevel == LEVEL_KATINA) { - var_s1 = D_bg_800C9DBC; - var_s2 = D_bg_800C9E18; - var_s3 = D_bg_800C9C90; - var_s4 = D_bg_800C9D60; + sunColor = sKaSunColors; + sunAlpha = sKaSunAlphas; + sunDL = sKaSunDLs; + sunScale = sKaSunScales; } - for (i = 0; i < 5; i++, var_s1++, var_s2++, var_s3++, var_s4++) { + for (i = 0; i < 5; i++, sunColor++, sunAlpha++, sunDL++, sunScale++) { Matrix_Push(&gGfxMatrix); - Matrix_Scale(gGfxMatrix, *var_s4, *var_s4, *var_s4, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, *sunScale, *sunScale, *sunScale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, var_s1->r, var_s1->g, var_s1->b, *var_s2); - gSPDisplayList(gMasterDisp++, *var_s3); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, sunColor->r, sunColor->g, sunColor->b, *sunAlpha); + gSPDisplayList(gMasterDisp++, *sunDL); Matrix_Pop(&gGfxMatrix); } Matrix_Pop(&gGfxMatrix); } } -void func_bg_80040954(void) { +void Background_DrawLensFlare(void) { s32 i; - Color_RGB8* var_s1; - s32* var_s4; - Gfx** var_s5; - f32* var_s6; - f32* var_s7; - f32 temp_fs0; - f32 temp_fs1; - f32 var_fs2; - f32 var_fv0; + Color_RGB8* lensFlareColor; + s32* lensFlareAlpha; + Gfx** lensFlareDL; + f32* lensFlareScale; + f32* lensFlareShift; + f32 lensFlareOffsetX; + f32 lensFlareOffsetY; + f32 alphaMod; + f32 alpha; if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) || (gLevelType == LEVELTYPE_SPACE) || - (gPlayerFillScreenAlphas[gPlayerNum] == 0)) { + (gPlayerGlareAlphas[gPlayerNum] == 0)) { return; } - var_fs2 = 1.0f; - if (gPlayerFillScreenAlphas[gPlayerNum] < 80) { - var_fs2 = gPlayerFillScreenAlphas[gPlayerNum] / 80.0f; + alphaMod = 1.0f; + if (gPlayerGlareAlphas[gPlayerNum] < 80) { + alphaMod = gPlayerGlareAlphas[gPlayerNum] / 80.0f; } - var_fs2 *= D_bg_800C9E5C[gLevelType]; + alphaMod *= sLensFlareAlphaMod[gLevelType]; Matrix_Push(&gGfxMatrix); Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY); - Matrix_Translate(gGfxMatrix, D_ctx_801783D0, D_ctx_801783D4, -200.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, gSunViewX, gSunViewY, -200.0f, MTXF_APPLY); RCP_SetupDL_62(); - temp_fs0 = D_ctx_801783D0 * -0.03f; - temp_fs1 = D_ctx_801783D4 * 0.03f; - var_s1 = &D_bg_800C9D94[5]; - var_s4 = &D_bg_800C9DE4[5]; - var_s5 = &D_bg_800C9C5C[5]; - var_s6 = &D_bg_800C9D2C[5]; - var_s7 = &D_bg_800C9CC4[5]; + lensFlareOffsetX = gSunViewX * -0.03f; + lensFlareOffsetY = gSunViewY * 0.03f; + lensFlareColor = &sSunColors[5]; + lensFlareAlpha = &sSunAlphas[5]; + lensFlareDL = &sSunDLs[5]; + lensFlareScale = &sSunScales[5]; + lensFlareShift = &sSunShifts[5]; if (gCurrentLevel == LEVEL_KATINA) { - var_s1 = &D_bg_800C9DBC[5]; - var_s4 = &D_bg_800C9E18[5]; - var_s5 = &D_bg_800C9C90[5]; - var_s6 = &D_bg_800C9D60[5]; - var_s7 = &D_bg_800C9CF8[5]; + lensFlareColor = &sKaSunColors[5]; + lensFlareAlpha = &sKaSunAlphas[5]; + lensFlareDL = &sKaSunDLs[5]; + lensFlareScale = &sKaSunScales[5]; + lensFlareShift = &sKaSunShifts[5]; } - for (i = 5; i < 13; i++, var_s1++, var_s4++, var_s5++, var_s6++, var_s7++) { + for (i = 5; i < 13; i++, lensFlareColor++, lensFlareAlpha++, lensFlareDL++, lensFlareScale++, lensFlareShift++) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, *var_s7 * temp_fs0, *var_s7 * -temp_fs1, 0.0f, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, *var_s6, *var_s6, *var_s6, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, *lensFlareShift * lensFlareOffsetX, *lensFlareShift * -lensFlareOffsetY, 0.0f, + MTXF_APPLY); + Matrix_Scale(gGfxMatrix, *lensFlareScale, *lensFlareScale, *lensFlareScale, MTXF_APPLY); if (((i == 5) || (i == 11)) && (gCurrentLevel != LEVEL_KATINA)) { Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); - var_fv0 = *var_s4; + alpha = *lensFlareAlpha; if (i >= 5) { - var_fv0 *= var_fs2; + alpha *= alphaMod; } - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, var_s1->r, var_s1->g, var_s1->b, (s32) var_fv0); - gSPDisplayList(gMasterDisp++, *var_s5); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, lensFlareColor->r, lensFlareColor->g, lensFlareColor->b, + (s32) alpha); + gSPDisplayList(gMasterDisp++, *lensFlareDL); Matrix_Pop(&gGfxMatrix); } Matrix_Pop(&gGfxMatrix); @@ -810,7 +813,7 @@ void func_bg_80040954(void) { void func_bg_80040CDC(void) { } -void func_bg_80040CE4(void) { +void Background_DrawGround(void) { f32 sp1D4; s32 i; u32 temp_fv0; @@ -821,8 +824,8 @@ void func_bg_80040CE4(void) { if ((gCurrentLevel != LEVEL_VENOM_2) && ((gPlayer[0].cam.eye.y > 4000.0f) || (D_ctx_80177A98 == 0))) { return; } - if ((gCurrentLevel == LEVEL_BOLSE) && (D_bg_800C9C34 != 0)) { - Bolse_80192264(); + if ((gCurrentLevel == LEVEL_BOLSE) && gBolseDynamicGround) { + Bolse_DrawDynamicGround(); return; } sp1D4 = 0.0f; @@ -890,7 +893,7 @@ void func_bg_80040CE4(void) { } if (gLevelMode == LEVELMODE_ON_RAILS) { gDPSetTextureImage(gMasterDisp++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, SEGMENTED_TO_VIRTUAL(D_CO_601B6C0)); - temp_s0 = fabsf(Math_ModF(2.0f * (D_ctx_80177CE8 * 0.2133333f), 128.0f)); + temp_s0 = fabsf(Math_ModF(2.0f * (D_ctx_80177CE8 * 0.2133333f), 128.0f)); // 0.64f / 3.0f temp_fv0 = Math_ModF((10000.0f - gPlayer[gPlayerNum].unk_0AC) * 0.32f, 128.0f); gDPSetupTile(gMasterDisp++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32, temp_fv0, temp_s0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD); @@ -925,7 +928,7 @@ void func_bg_80040CE4(void) { gBgColor = 0x845; // 8, 8, 32 for (i = 0; i < 4; i++) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_bg_800C9E64[i], 0.0f, D_bg_800C9E74[i], MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sGroundPositions360x[i], 0.0f, sGroundPositions360z[i], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_601EAA0); Matrix_Pop(&gGfxMatrix); @@ -991,7 +994,7 @@ void func_bg_80040CE4(void) { } else { for (i = 0; i < 4; i++) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_bg_800C9E64[i], 0.0f, D_bg_800C9E74[i], MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sGroundPositions360x[i], 0.0f, sGroundPositions360z[i], MTXF_APPLY); Matrix_Scale(gGfxMatrix, 1.5f, 1.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_TR_6005880); @@ -1003,7 +1006,7 @@ void func_bg_80040CE4(void) { RCP_SetupDL(&gMasterDisp, 0x14); sp1C0 = D_AQ_600AB10; gSPFogPosition(gMasterDisp++, gFogNear, gFogFar); - if ((D_bg_8015F964 == 0) && ((D_ctx_80177AC8 == 0) || (D_ctx_80177AC8 == 2))) { + if ((D_bg_8015F964 == 0) && ((gAqDrawMode == 0) || (gAqDrawMode == 2))) { gDPLoadTileTexture(gMasterDisp++, SEGMENTED_TO_VIRTUAL(D_AQ_600AB68), G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32); @@ -1026,7 +1029,7 @@ void func_bg_80040CE4(void) { gSPDisplayList(gMasterDisp++, sp1C0); Matrix_Pop(&gGfxMatrix); } - if ((D_bg_8015F964 != 0) || (D_ctx_80177AC8 == 0)) { + if ((D_bg_8015F964 != 0) || (gAqDrawMode == 0)) { gDPLoadTileTexture(gMasterDisp++, SEGMENTED_TO_VIRTUAL(D_AQ_602ACC0), G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32); gDPSetTextureImage(gMasterDisp++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, SEGMENTED_TO_VIRTUAL(D_AQ_602ACC0)); @@ -1034,7 +1037,7 @@ void func_bg_80040CE4(void) { temp_fv0 = Math_ModF((10000.0f - gPlayer[gPlayerNum].unk_0AC) * 0.32f, 128.0f); gDPSetupTile(gMasterDisp++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32, temp_fv0, temp_s0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD); - if (D_ctx_80177AC8 != 0) { + if (gAqDrawMode != 0) { RCP_SetupDL(&gMasterDisp, 0x2F); } else { RCP_SetupDL(&gMasterDisp, 0x25); @@ -1070,7 +1073,7 @@ void func_bg_80040CE4(void) { } for (i = 0; i < 4; i++) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_bg_800C9E64[i], 0.0f, D_bg_800C9E74[i], MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sGroundPositions360x[i], 0.0f, sGroundPositions360z[i], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if (gCurrentLevel == LEVEL_FORTUNA) { gSPDisplayList(gMasterDisp++, D_FO_6001360); @@ -1092,7 +1095,7 @@ void func_bg_80040CE4(void) { } for (i = 0; i < 4; i++) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_bg_800C9E64[i], 0.0f, D_bg_800C9E74[i], MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sGroundPositions360x[i], 0.0f, sGroundPositions360z[i], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if (gVersusStage == VS_STAGE_CORNERIA) { gSPDisplayList(gMasterDisp++, D_versus_3018800); diff --git a/src/engine/fox_context.c b/src/engine/fox_context.c index aaf71bc6..7434822e 100644 --- a/src/engine/fox_context.c +++ b/src/engine/fox_context.c @@ -4,8 +4,8 @@ #include "sf64object.h" #include "sf64player.h" -s32 gOverlaySetup; -s32 gOverlayStage; +s32 gSceneId; +s32 gSceneSetup; s32 D_ctx_80177824; // some sort of flag s32 D_ctx_8017782C; // some sort of flag. all range related? GameState gGameState; @@ -23,7 +23,7 @@ s32 gSavedTeamShields[6]; s32 gPrevPlanetSavedTeamShields[6]; s32 gTeamDamage[6]; u8 gNextPlanetPath; // next planet path -f32 gGroundLevel; +f32 gGroundHeight; f32 D_ctx_80177950; f32 D_ctx_80177968; f32 D_ctx_80177970; @@ -41,11 +41,11 @@ f32 D_ctx_80177A48[10]; s32 gCsFrameCount; u8 D_ctx_80177A98; u8 D_ctx_80177AB0; -u8 D_ctx_80177AC8; +u8 gAqDrawMode; s32 D_ctx_80177AE0; s32 gMainController; s32 D_ctx_80177B40; -s32 gCurrentPlanet; // D_ctx_80177B48 // Arrow pointer? +s32 gMissionNumber; // D_ctx_80177B48 // Arrow pointer? s32 D_ctx_80177B50[7]; s32 D_ctx_80177B70[7]; PlanetId D_ctx_80177B90[7]; @@ -57,7 +57,7 @@ s32 gPlanetPathStatus[22]; // overruns gPrevPlanetTeamShields? #endif s32 gPrevPlanetTeamShields[6]; s32 D_ctx_80177C58[6]; -u8 gSoundMode; +u8 gOptionSoundMode; s32 gVolumeSettings[3]; u16 gBgmSeqId; u8 gLevelType; @@ -85,7 +85,7 @@ Vec3f D_ctx_80177F10; UNK_TYPE F_80178020; s32 D_ctx_8017812C; LevelId gCurrentLevel; -s32 gLevelStage; +s32 gLevelPhase; s32 gBossActive; s32 D_ctx_8017828C; s32 D_ctx_80178294; @@ -112,29 +112,29 @@ s32 gFogRed; s32 gFogGreen; s32 gFogBlue; s32 gFogAlpha; -s32 gFillScreenAlpha; // alpha something -s32 gFillScreenRed; // red something -s32 gFillScreenGreen; // green something -s32 gFillScreenBlue; // blue something -s32 gFillScreenAlphaTarget; // alpha target -s32 gFillScreenAlphaStep; // alpha step -s32 D_ctx_80178360; // 2 lights second color -s32 D_ctx_80178364; -s32 D_ctx_80178368; -f32 D_ctx_8017836C; // 2 lights second color brightness -f32 D_ctx_80178370; // Vec3f? -f32 D_ctx_80178374; -f32 D_ctx_80178378; -s32 D_ctx_8017837C; -u32 gPlayerFillScreenAlphas[4]; // player alphas -s32 gPlayerFillScreenReds[4]; // player reds -s32 gPlayerFillScreenGreens[4]; // player greens -s32 gPlayerFillScreenBlues[4]; // player alphas -UNK_TYPE D_ctx_801783C0[4]; -f32 D_ctx_801783D0; // something x translate -f32 D_ctx_801783D4; // something y translate -s32 gFogNear; // near -s32 gFogFar; // far +s32 gFillScreenAlpha; +s32 gFillScreenRed; +s32 gFillScreenGreen; +s32 gFillScreenBlue; +s32 gFillScreenAlphaTarget; +s32 gFillScreenAlphaStep; +s32 gLight3R; // 2 lights second color +s32 gLight3G; +s32 gLight3B; +f32 gLight3Brightness; // 2 lights second color brightness +f32 gLight3x; // Vec3f? +f32 gLight3y; +f32 gLight3z; +s32 gFadeoutType; +u32 gPlayerGlareAlphas[4]; +s32 gPlayerGlareReds[4]; +s32 gPlayerGlareGreens[4]; +s32 gPlayerGlareBlues[4]; +UNK_TYPE D_ctx_801783C0[4]; // unused. player alpha targets? +f32 gSunViewX; // something x translate +f32 gSunViewY; // something y translate +s32 gFogNear; // near +s32 gFogFar; // far UNK_TYPE F_801783E0; UNK_TYPE F_801783E4; UNK_TYPE F_801783E8; @@ -147,13 +147,13 @@ UNK_TYPE F_80178400; UNK_TYPE F_80178404; UNK_TYPE F_80178408; UNK_TYPE F_8017840C; -s32 D_ctx_80178410; -f32 D_ctx_80178414; +s32 gStarCount; +f32 gStarWarpDistortion; f32 D_ctx_80178418; UNK_TYPE F_8017841C; -f32 D_ctx_80178420; -f32 D_ctx_80178424; -f32 D_ctx_80178428; +f32 gStarfieldX; +f32 gStarfieldY; +f32 gStarfieldRoll; f32 D_ctx_8017842C; f32 D_ctx_80178430; UNK_TYPE F_80178434; @@ -250,7 +250,7 @@ UNK_TYPE F_80161AD0[4]; UNK_TYPE F_80161AE0[4]; UNK_TYPE F_80161AF0[4]; UNK_TYPE P_800D31A4 = 0; -Object_80 gObjects80[50]; +Scenery gScenery[50]; Sprite gSprites[40]; Actor gActors[60]; Boss gBosses[4]; @@ -268,14 +268,14 @@ 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 -s32 gLevelStatusScreenTimer; // level clear related -s32 gLevelClearScreenTimer; // timer for mission accomplished scrren +u16 gEnemyShotSpeed; // enemy shot speed? +u8 gShowLevelClearStatusScreen; +s32 gLevelStartStatusScreenTimer; +s32 gLevelClearScreenTimer; // timer for mission accomplished scrren s32 gBossHealthBar; -s32 D_ctx_80177850; // bonus text related. set to 15 but never read -s32 D_ctx_80177858[4]; -s32 D_ctx_80177870[4]; +s32 D_ctx_80177850; // bonus text related. set to 15 but never read +s32 D_ctx_80177858[4]; // set to 3 but never used +PlayerForm gPlayerForms[4]; s32 gHandicap[4]; VsStage gVersusStage; s32 D_ctx_801778A4; @@ -286,7 +286,7 @@ u16 gBoostButton[4]; u16 gBrakeButton[4]; u16 gShootButton[4]; u16 gBombButton[4]; -f32 D_ctx_80177958[4]; +f32 D_ctx_80177958[4]; // set to 1.0f but never used s32 D_ctx_8017796C; OSContPad* gInputHold; OSContPad* gInputPress; @@ -302,15 +302,15 @@ s32 D_Timer_80177A38[4]; s32 D_Timer_80177A70[4]; s32 D_Timer_80177A88[4]; f32 D_ctx_80177AA0[4]; -f32 D_ctx_80177AB8[4]; -s32 D_ctx_80177AD0[4]; -s32 D_ctx_80177AE8[4]; -s32 D_ctx_80177B00[4][4]; -u8 D_Timer_80177B44; -u8 D_ctx_80177B4C; -u8 D_ctx_80177B6C; +f32 gShieldAlpha[4]; +s32 gHasShield[4]; +s32 gShieldTimer[4]; +s32 gVsLockOnTimers[4][4]; +u8 gStartAndrossFightTimer; +u8 gSoShieldsEmpty; +u8 gCoUturnCount; u8 gGreatFoxIntact; -u8 D_ctx_80177BAC; +u8 gTiStartLandmaster; u16 gControllerRumbleTimers[4]; u16 D_ctx_80177C30[4]; s32 D_ctx_80177C50; @@ -344,11 +344,11 @@ f32 D_ctx_80178028[65]; f32 D_ctx_80178130[65]; u8 D_ctx_80178238[65]; Player* gPlayer; -f32* D_ctx_80178288; -f32* D_ctx_80178290; -u32* D_ctx_80178298; +f32* gStarOffsetsX; +f32* gStarOffsetsY; +u32* gStarFillColors; UNK_TYPE F_801782A0; -Object_58* gObjects58; +Scenery360* gScenery360; UNK_TYPE F_801782B0; s32 D_ctx_801782B8; s32 D_ctx_801782BC; diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index 1e71237d..d9ce6a4f 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -246,11 +246,11 @@ void Cutscene_WarpZoneComplete(Player* player) { break; case 200: - D_ctx_80177830 = 1; + gShowLevelClearStatusScreen = 1; break; case 400: - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; break; case 420: @@ -290,7 +290,7 @@ void Cutscene_WarpZoneComplete(Player* player) { if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; - D_ctx_8017837C = 4; + gFadeoutType = 4; if (gCurrentLevel == LEVEL_METEO) { D_play_800D3180[LEVEL_METEO] = Play_CheckMedalStatus(200) + 1; } else { @@ -477,9 +477,9 @@ void Cutscene_EnterWarpZone(Player* player) { switch (player->unk_1D0) { case 0: player->somersault = false; - D_ctx_80178414 = 100.0f; + gStarWarpDistortion = 100.0f; player->unk_1D0 = 1; - D_ctx_80178410 = 1; + gStarCount = 1; gLoadLevelObjects = 0; player->vel.x = 0.0f; player->vel.y = 0.0f; @@ -503,7 +503,7 @@ void Cutscene_EnterWarpZone(Player* player) { case 1: Math_SmoothStepToF(&D_ctx_801779A8[player->num], 100.0f, 1.0f, 4.0f, 0.0f); Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f); - D_ctx_80178414 *= 1.05f; + gStarWarpDistortion *= 1.05f; if (player->timer_1F8 == 0) { player->unk_1D0 = 2; player->timer_1F8 = 150; @@ -515,8 +515,8 @@ void Cutscene_EnterWarpZone(Player* player) { case 2: Math_SmoothStepToF(&D_ctx_801779A8[player->num], 100.0f, 1.0f, 3.0f, 0.0f); - if (D_ctx_80178414 < 20000.0f) { - D_ctx_80178414 *= 1.01f; + if (gStarWarpDistortion < 20000.0f) { + gStarWarpDistortion *= 1.01f; } if (player->timer_1F8 <= 100) { @@ -586,7 +586,7 @@ void Cutscene_EnterWarpZone(Player* player) { player->timer_27C = gSavedHitCount = D_ctx_80177DC8 = D_ctx_80177CA0 = 0; player->unk_234 = 1; - gLevelStage = 1; + gLevelPhase = 1; D_display_800CA230 = 0.15f; AUDIO_PLAY_SFX(0x11407079, gDefaultSfxSource, 0); func_play_800AB334(); @@ -607,7 +607,7 @@ void Cutscene_EnterWarpZone(Player* player) { break; case 6: - Math_SmoothStepToF(&D_ctx_80178414, 0.0f, 0.2f, 1000.0f, 0.1f); + Math_SmoothStepToF(&gStarWarpDistortion, 0.0f, 0.2f, 1000.0f, 0.1f); Math_SmoothStepToF(&player->unk_08C, 0.0f, 0.2f, 500.0f, 0.1f); if (player->timer_1F8 < 30) { for (var_v0 = 0; var_v0 < 3; var_v0++) { @@ -616,13 +616,13 @@ void Cutscene_EnterWarpZone(Player* player) { } if (player->timer_1F8 == 30) { - D_ctx_80178410 = 300; + gStarCount = 300; AUDIO_PLAY_BGM(SEQ_ID_WARP_ZONE | SEQ_FLAG); } if (player->timer_1F8 == 0) { - D_bg_8015F960 = 0.0f; - D_ctx_80178414 = 0.0f; + gWarpZoneBgAlpha = 0.0f; + gStarWarpDistortion = 0.0f; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_014 = 0.0f; player->unk_018 = 0.0f; @@ -643,29 +643,29 @@ void Cutscene_LevelStart(Player* player) { if (gLevelMode == LEVELMODE_ON_RAILS) { switch (gCurrentLevel) { case LEVEL_CORNERIA: - Corneria_8018F880(player); + Corneria_LevelStart(player); func_play_800AA800(player); break; case LEVEL_METEO: - Meteo_8018CD8C(player); + Meteo_LevelStart(player); break; case LEVEL_SECTOR_X: - SectorX_80193A30(player); + SectorX_LevelStart(player); break; case LEVEL_TITANIA: - Titania_8018769C(player); + Titania_LevelStart(player); func_play_800AA800(player); break; case LEVEL_ZONESS: - Zoness_8019D428(player); + Zoness_LevelStart(player); break; case LEVEL_MACBETH: - Macbeth_801AC754(player); + Macbeth_LevelStart(player); break; case LEVEL_SECTOR_Y: @@ -673,51 +673,51 @@ void Cutscene_LevelStart(Player* player) { break; case LEVEL_SOLAR: - Solar_801A10F4(player); + Solar_LevelStart(player); break; case LEVEL_VENOM_1: - Venom1_801988B8(player); + Venom1_LevelStart(player); func_play_800AA800(player); break; case LEVEL_AQUAS: - func_hud_800935E8(player); + HUD_AquasStart(player); break; case LEVEL_AREA_6: - Area6_8018DF74(player); + Area6_LevelStart(player); break; } func_demo_8004990C(player); - return; - } - switch (gCurrentLevel) { - case LEVEL_FORTUNA: - AllRange_FortunaIntro(player); - func_play_800AA800(player); - break; + } else { + switch (gCurrentLevel) { + case LEVEL_FORTUNA: + AllRange_FortunaIntro(player); + func_play_800AA800(player); + break; - case LEVEL_VENOM_2: - Venom2_80196BF8(player); - func_play_800AA800(player); - break; + case LEVEL_VENOM_2: + Venom2_LevelStart(player); + func_play_800AA800(player); + break; - case LEVEL_BOLSE: - Bolse_8018EF6C(player); - func_play_800AA800(player); - break; + case LEVEL_BOLSE: + Bolse_LevelStart(player); + func_play_800AA800(player); + break; - case LEVEL_KATINA: - Katina_80192E20(player); - func_play_800AA800(player); - break; + case LEVEL_KATINA: + Katina_LevelStart(player); + func_play_800AA800(player); + break; - case LEVEL_SECTOR_Z: - SectorZ_8019BA64(player); + case LEVEL_SECTOR_Z: + SectorZ_LevelStart(player); - default: - break; + default: + break; + } } } @@ -1288,7 +1288,7 @@ void Cutscene_CoComplete2(Player* player) { if (player->timer_1F8 == 0) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; - D_ctx_8017837C = 4; + gFadeoutType = 4; Audio_FadeOutAll(10); D_play_800D3180[gCurrentLevel] = Play_CheckMedalStatus(150) + 1; } @@ -1297,11 +1297,11 @@ void Cutscene_CoComplete2(Player* player) { switch (gCsFrameCount) { case 961: - D_ctx_80177830 = 1; + gShowLevelClearStatusScreen = 1; break; case 1161: - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; break; case 1255: @@ -1359,47 +1359,47 @@ void Cutscene_LevelComplete(Player* player) { switch (player->form) { case FORM_ARWING: - if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) || ((gCurrentLevel == LEVEL_VENOM_2) && (gLevelStage == 1))) { + if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) || ((gCurrentLevel == LEVEL_VENOM_2) && (gLevelPhase == 1))) { Andross_80193C4C(player); } else if (gCurrentLevel == LEVEL_SECTOR_X) { - if (gLevelStage == 0) { - SectorX_80194728(player); + if (gLevelPhase == 0) { + SectorX_LevelComplete(player); } else { Cutscene_WarpZoneComplete(player); } } else if (gCurrentLevel == LEVEL_AREA_6) { - Area6_8018ED78(player); + Area6_LevelComplete(player); } else if (gCurrentLevel == LEVEL_FORTUNA) { Cutscene_FortunaComplete(player); func_play_800AA800(player); } else if (gCurrentLevel == LEVEL_BOLSE) { - Bolse_8018F94C(player); + Bolse_LevelComplete(player); func_play_800AA800(player); } else if (gCurrentLevel == LEVEL_SECTOR_Z) { - SectorZ_8019C85C(player); + SectorZ_LevelComplete(player); } else if (gCurrentLevel == LEVEL_KATINA) { - Katina_80197290(player); + Katina_LevelComplete(player); func_play_800AA800(player); } else if (gCurrentLevel == LEVEL_SECTOR_Y) { - SectorY_8019EE60(player); + SectorY_LevelComplete(player); func_play_800AA800(player); } else if (gCurrentLevel == LEVEL_SOLAR) { - Solar_801A7930(player); + Solar_LevelComplete(player); func_play_800AA800(player); } else if (gCurrentLevel == LEVEL_ZONESS) { - Zoness_8019D76C(player); + Zoness_LevelComplete(player); func_play_800AA800(player); } else if (gCurrentLevel == LEVEL_VENOM_2) { - Venom2_80196D88(player); + Venom2_LevelComplete(player); func_play_800AA800(player); } else if (gCurrentLevel == LEVEL_METEO) { - if (gLevelStage == 0) { - Meteo_8018E084(player); + if (gLevelPhase == 0) { + Meteo_LevelComplete(player); } else { Cutscene_WarpZoneComplete(player); } } else if ((gCurrentLevel == LEVEL_CORNERIA) && (gLevelMode == LEVELMODE_ALL_RANGE)) { - Corneria_80191160(player); + Corneria_LevelComplete1(player); func_play_800AA800(player); } else { if (gCsFrameCount == 170) { @@ -1421,11 +1421,11 @@ void Cutscene_LevelComplete(Player* player) { gInputPress->stick_x = btn; if (gCurrentLevel == LEVEL_TITANIA) { - Titania_801882CC(player); + Titania_LevelComplete(player); } else if (gNextPlanetPath != 0) { - Macbeth_801AF8F4(player); + Macbeth_LevelComplete2(player); } else { - Macbeth_801B3D04(player); + Macbeth_LevelComplete1(player); } func_tank_80046358(player); @@ -1435,7 +1435,7 @@ void Cutscene_LevelComplete(Player* player) { case FORM_BLUE_MARINE: if (gCurrentLevel == LEVEL_AQUAS) { - func_hud_80095604(player); + HUD_AquasComplete(player); } break; } @@ -1454,11 +1454,11 @@ void Cutscene_UTurn(Player* player) { sp50.rot.z = player->unk_0D0; sp58.x = Math_RadToDeg(Math_Atan2F(player->pos.x, player->unk_138)); - player->unk_2B4 = 1; - player->unk_2BC += 1.0f; + player->boostCooldown = 1; + player->boostMeter += 1.0f; - if (player->unk_2BC > 90.0f) { - player->unk_2BC = 90.0f; + if (player->boostMeter > 90.0f) { + player->boostMeter = 90.0f; } switch (player->unk_1D0) { @@ -1616,7 +1616,7 @@ void Cutscene_KillPlayer(Player* player) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 70; player->timer_224 = 20; - D_ctx_8017837C = 7; + gFadeoutType = 7; if (player->unk_1D4 != 0) { player->unk_284 = 0; @@ -1857,7 +1857,7 @@ void func_demo_8004DEF8(Player* player) { } else if ((((player->timer_220 > 0) || (player->pos.y < player->unk_0A4)) || (player->timer_1FC == 0)) && (player->timer_1F8 == 0)) { if (player->pos.y < player->unk_0A4) { - func_effect_8007C688(player->pos.x, gGroundLevel + 20.0f, player->unk_138 - (2.0f * player->vel.z), 3.0f, + func_effect_8007C688(player->pos.x, gGroundHeight + 20.0f, player->unk_138 - (2.0f * player->vel.z), 3.0f, 800); func_enmy_80062C38(player->pos.x, player->pos.z); } @@ -1884,8 +1884,8 @@ void func_demo_8004DEF8(Player* player) { } if ((gGroundType == GROUNDTYPE_WATER) && (player->pos.y <= player->unk_0A4)) { - func_effect_8007D9DC(player->pos.x, gGroundLevel + 2.0f, player->unk_138, 3.0f, 20.0f, 0); - func_effect_8007ADF4(player->pos.x, gGroundLevel, player->unk_138, 0.1f, 2.0f); + func_effect_8007D9DC(player->pos.x, gGroundHeight + 2.0f, player->unk_138, 3.0f, 20.0f, 0); + func_effect_8007ADF4(player->pos.x, gGroundHeight, player->unk_138, 0.1f, 2.0f); } } @@ -2386,7 +2386,7 @@ void Actor195_Update(Actor* actor) { break; case LEVEL_METEO: - if (gLevelStage == 0) { + if (gLevelPhase == 0) { Meteo_8018ED9C(actor); break; } @@ -2421,13 +2421,13 @@ void Actor195_Update(Actor* actor) { actor->scale = 0.0f; } - D_ctx_8017836C = actor->iwork[0] / 255.0f; - D_ctx_80178370 = gActors[0].obj.pos.x + 10.0f; - D_ctx_80178374 = gActors[0].obj.pos.y - 40.0f; - D_ctx_80178378 = gActors[0].obj.pos.z - 70.0f; - D_ctx_80178360 = 255; - D_ctx_80178364 = 255; - D_ctx_80178368 = 80; + gLight3Brightness = actor->iwork[0] / 255.0f; + gLight3x = gActors[0].obj.pos.x + 10.0f; + gLight3y = gActors[0].obj.pos.y - 40.0f; + gLight3z = gActors[0].obj.pos.z - 70.0f; + gLight3R = 255; + gLight3G = 255; + gLight3B = 80; break; } } @@ -2443,7 +2443,7 @@ void Actor195_Update(Actor* actor) { break; case LEVEL_SECTOR_X: - if (gLevelStage != 0) { + if (gLevelPhase != 0) { func_demo_80049630(actor); break; } @@ -2611,7 +2611,7 @@ void Actor195_Draw(Actor* actor) { break; case 30: - func_edisplay_8005F670(&actor->obj.pos); + Display_SetSecondLight(&actor->obj.pos); if (actor->unk_046 != 0) { RCP_SetupDL(&gMasterDisp, 0x37); diff --git a/src/engine/fox_display.c b/src/engine/fox_display.c index c029cef5..f26d9307 100644 --- a/src/engine/fox_display.c +++ b/src/engine/fox_display.c @@ -845,15 +845,15 @@ void func_display_80054914(Player* player) { } void func_display_80054CA4(Player* player) { - if (D_ctx_80177AB8[player->num] > 1.0f) { + if (gShieldAlpha[player->num] > 1.0f) { Matrix_Push(&gGfxMatrix); Matrix_Copy(gGfxMatrix, &D_display_80161418[player->num]); Matrix_Translate(gGfxMatrix, 0.0f, -5.0f, 10.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 2.5f, 1.6f, 2.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL(&gMasterDisp, 0x44); - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 255, 255, (s32) D_ctx_80177AB8[player->num]); - gDPSetEnvColor(gMasterDisp++, 255, 0, 255, (s32) D_ctx_80177AB8[player->num]); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 255, 255, (s32) gShieldAlpha[player->num]); + gDPSetEnvColor(gMasterDisp++, 255, 0, 255, (s32) gShieldAlpha[player->num]); gSPDisplayList(gMasterDisp++, D_101CD70); Matrix_Pop(&gGfxMatrix); Texture_Scroll(D_101D070, 32, 32, 3); @@ -1200,14 +1200,14 @@ void func_display_800564C0(Player* player, s32 arg1) { player->unk_138 + player->unk_144, MTXF_APPLY); if (gVersusMode) { for (i = 0; i < gCamCount; i++) { - if (D_ctx_80177B00[player->num][i] != 0) { + if (gVsLockOnTimers[player->num][i] != 0) { Matrix_MultVec3f(gGfxMatrix, &sp50, &D_display_80161578[i]); if ((i == gPlayerNum) && ((D_display_80161578[i].z > 300.0f) || (D_display_80161578[i].z < -8000.0f) || (fabsf(D_display_80161578[i].x) > (fabsf(D_display_80161578[i].z * 0.5f) + 100.0f)) || (fabsf(D_display_80161578[i].y)) > (fabsf(D_display_80161578[i].z * 0.5f) + 100.0f))) { - D_ctx_80177B00[player->num][i] = 0; + gVsLockOnTimers[player->num][i] = 0; } } } @@ -1245,14 +1245,14 @@ void func_display_800564C0(Player* player, s32 arg1) { Matrix_Translate(gGfxMatrix, player->pos.x, player->pos.y, player->unk_138 + player->unk_144, MTXF_APPLY); if (gVersusMode) { for (i = 0; i < gCamCount; i++) { - if (D_ctx_80177B00[player->num][i] != 0) { + if (gVsLockOnTimers[player->num][i] != 0) { Matrix_MultVec3f(gGfxMatrix, &sp50, &D_display_80161578[i]); if ((i == gPlayerNum) && ((D_display_80161578[i].z > 300.0f) || (D_display_80161578[i].z < -8000.0f) || (fabsf(D_display_80161578[i].x) > (fabsf(D_display_80161578[i].z * 0.5f) + 100.0f)) || (fabsf(D_display_80161578[i].y) > (fabsf(D_display_80161578[i].z * 0.5f) + 100.0f)))) { - D_ctx_80177B00[player->num][i] = 0; + gVsLockOnTimers[player->num][i] = 0; } } } @@ -1588,14 +1588,14 @@ void Play_Draw(void) { tempVec.y = 100.0f; tempVec.z = 0.0f; Matrix_MultVec3f(gCalcMatrix, &tempVec, &playerCamUp); - if (D_ctx_80178410 != 0) { - D_ctx_80178428 = DEG_TO_RAD(gPlayer[0].camRoll); + if (gStarCount != 0) { + gStarfieldRoll = DEG_TO_RAD(gPlayer[0].camRoll); func_play_800B6F50(gPlayerCamEye.x, gPlayerCamEye.y, gPlayerCamEye.z, gPlayerCamAt.x, gPlayerCamAt.y, gPlayerCamAt.z); - func_bg_8003DAF0(); + Background_DrawStarfield(); } - func_bg_8003E1E8(); - func_bg_80040450(); + Background_DrawBackdrop(); + Background_DrawSun(); Matrix_Push(&gGfxMatrix); Matrix_LookAt(gGfxMatrix, gPlayerCamEye.x, gPlayerCamEye.y, gPlayerCamEye.z, gPlayerCamAt.x, gPlayerCamAt.y, gPlayerCamAt.z, playerCamUp.x, playerCamUp.y, playerCamUp.z, MTXF_APPLY); @@ -1609,8 +1609,8 @@ void Play_Draw(void) { D_ctx_80177CC8 = 0.0f; Matrix_Pop(&gGfxMatrix); } else if (gGroundType != GROUNDTYPE_WATER) { - D_bg_8015F964 = 0; - func_bg_80040CE4(); + D_bg_8015F964 = false; + Background_DrawGround(); } } Lights_SetOneLight(&gMasterDisp, gLight2x, gLight2y, gLight2z, gLight2R, gLight2G, gLight2B, gAmbientR, gAmbientG, @@ -1619,7 +1619,7 @@ void Play_Draw(void) { opponentPos.x = opponent->pos.x; opponentPos.y = opponent->pos.y; opponentPos.z = opponent->unk_138; - func_edisplay_8005F670(&opponentPos); + Display_SetSecondLight(&opponentPos); func_display_800564C0(opponent, 0); func_display_80057814(opponent); } @@ -1664,10 +1664,10 @@ void Play_Draw(void) { if (gCurrentLevel == LEVEL_AQUAS) { Effect_Draw(0); } - if ((gGroundType == GROUNDTYPE_WATER) || (D_ctx_80177AC8 != 0)) { - D_bg_8015F964 = 1; + if ((gGroundType == GROUNDTYPE_WATER) || (gAqDrawMode != 0)) { + D_bg_8015F964 = true; Effect_Draw(1); - func_bg_80040CE4(); + Background_DrawGround(); } if ((gCurrentLevel != LEVEL_AQUAS) && (((gCurrentLevel != LEVEL_CORNERIA) && (gCurrentLevel != LEVEL_VENOM_ANDROSS)) || @@ -1713,7 +1713,7 @@ void Play_Draw(void) { if ((gLevelMode == LEVELMODE_UNK_2) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { Turret_801A6164(gPlayer); } - func_bg_80040954(); + Background_DrawLensFlare(); if ((gCamCount != 1) && ((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (player->state_1C8 == PLAYERSTATE_1C8_U_TURN))) { func_hud_8008FA84(); diff --git a/src/engine/fox_edata.c b/src/engine/fox_edata.c index c5e08d6a..3780107d 100644 --- a/src/engine/fox_edata.c +++ b/src/engine/fox_edata.c @@ -4,7 +4,7 @@ f32* D_edata_800CF964[] = { NULL }; -void func_edata_800594F0(Object_80* obj80) { +void func_edata_800594F0(Scenery* scenery) { RCP_SetupDL_57(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -12,7 +12,7 @@ void func_edata_800594F0(Object_80* obj80) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } -void func_edata_800595D0(Object_80* obj80) { +void func_edata_800595D0(Scenery* scenery) { RCP_SetupDL_57(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); diff --git a/src/engine/fox_edata_info.c b/src/engine/fox_edata_info.c index ea714c4c..0b3c7522 100644 --- a/src/engine/fox_edata_info.c +++ b/src/engine/fox_edata_info.c @@ -25,26 +25,26 @@ f32 gActor241Hitbox[] = { 1.0f, 0.0f, 50.0f, 0.0f, 25.0f, 0.0f, 25.0f, }; -f32 gDefaultCubeHitbox100[] = { +f32 gCubeHitbox100[] = { 1.0f, 0.0f, 50.0f, 0.0f, 50.0f, 0.0f, 50.0f, }; -f32 gDefaultCubeHitbox150[] = { +f32 gCubeHitbox150[] = { 1.0f, 0.0f, 75.0f, 0.0f, 75.0f, 0.0f, 75.0f, }; -f32 gDefaultCubeHitbox200[] = { +f32 gCubeHitbox200[] = { 1.0f, 0.0f, 100.0f, 0.0f, 100.0f, 0.0f, 100.0f, }; -f32 gDefaultCubeHitbox300[] = { +f32 gCubeHitbox300[] = { // unused 1.0f, 0.0f, 150.0f, 0.0f, 150.0f, 0.0f, 150.0f, }; -f32 gDefaultCubeHitbox400[] = { +f32 gCubeHitbox400[] = { 1.0f, 0.0f, 200.0f, 0.0f, 200.0f, 0.0f, 200.0f, }; f32 gItemRingCheckHitbox[] = { 1.0f, -113.0f, 61.0f, 98.0f, 100.0f, 0.0f, 219.0f, }; -f32 gHitboxNone[] = { +f32 gNoHitbox[] = { 0.0f, }; f32 gItemCheckpointHitbox[] = { @@ -56,7 +56,7 @@ f32 gItemSupplyRingHitbox[] = { f32 gMeteoWarpHitbox[] = { 1.0f, -40.0f, 100.0f, 0.0f, 100.0f, 0.0f, 100.0f, }; -f32 D_edata_800CBF8C[] = { +f32 gItemPathChangeHitbox[] = { 1.0f, 0.0f, 100.0f, 0.0f, 1200.0f, 0.0f, 1200.0f, }; f32 gItemLasersHitbox[] = { @@ -68,7 +68,7 @@ f32 gItemBombHitbox[] = { f32 gActor190_191Hitbox[] = { 1.0f, 0.0f, 40.0f, 0.0f, 40.0f, 0.0f, 40.0f, }; -f32 gActor194HItbox[] = { +f32 gActor194Hitbox[] = { 1.0f, 0.0f, 50.0f, 0.0f, 50.0f, 0.0f, 50.0f, }; f32 gTeamHitbox[] = { @@ -93,210 +93,210 @@ f32 gWarpZoneEvent93Hitbox[] = { // clang-format off ObjectInfo D_edata_800CC124[0x190] = { - /* OBJ_80_0, */ {(void*) D_CO_6015F00, 0, (ObjectFunc) NULL, D_CO_603E3E0, 800.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_80_1, */ {(void*) D_CO_602E9E0, 0, (ObjectFunc) NULL, gHitboxNone, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_2, */ {(void*) D_CO_601BEC0, 0, (ObjectFunc) NULL, gHitboxNone, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_3, */ {(void*) D_CO_602E7A0, 0, (ObjectFunc) NULL, gHitboxNone, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_4, */ {(void*) D_CO_60244A0, 0, (ObjectFunc) NULL, gHitboxNone, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_5, */ {(void*) D_CO_602E570, 0, (ObjectFunc) NULL, gHitboxNone, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_6, */ {(void*) D_CO_60132B0, 0, (ObjectFunc) NULL, D_CO_603DCA4, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_7, */ {(void*) D_CO_602E080, 0, (ObjectFunc) NULL, D_CO_603DD40, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_8, */ {(void*) D_CO_60164F0, 0, (ObjectFunc) NULL, gHitboxNone, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_9, */ {(void*) D_CO_6014500, 0, (ObjectFunc) NULL, gHitboxNone, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_10, */ {(void*) D_CO_602D5F0, 0, (ObjectFunc) NULL, D_CO_603DDF0, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_80_11, */ {(void*) D_CO_601A7D0, 0, (ObjectFunc) NULL, D_CO_603DE8C, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_80_12, */ {(void*) D_CO_6014B50, 0, (ObjectFunc) NULL, D_CO_603DEF4, 500.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_80_13, */ {(void*) D_CO_6016580, 0, (ObjectFunc) NULL, D_CO_603DF8C, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_80_14, */ {(void*) D_CO_601B560, 0, (ObjectFunc) func_enmy_80066EA8, D_CO_603DFDC, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_80_15, */ {(void*) D_CO_60361F0, 0, (ObjectFunc) func_enmy_80066EA8, D_CO_603E014, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_80_16, */ {(void*) D_CO_6018E80, 0, (ObjectFunc) func_enmy_80066EA8, D_CO_603E030, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_80_17, */ {(void*) D_CO_6035F10, 0, (ObjectFunc) func_enmy_80066EA8, D_CO_603E09C, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_80_18, */ {(void*) Corneria_8018753C, 1, (ObjectFunc) Corneria_80187530, D_CO_603E98C, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_80_19, */ {(void*) D_CO_60153B0, 0, (ObjectFunc) NULL, D_CO_603E118, 100.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_80_20, */ {(void*) D_CO_601F5A0, 0, (ObjectFunc) NULL, D_CO_603E14C, 500.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_80_21, */ {(void*) D_CO_60137B0, 0, (ObjectFunc) NULL, D_CO_603E1B4, 400.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_80_22, */ {(void*) D_CO_6006A80, 0, (ObjectFunc) NULL, D_CO_603E21C, 400.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_80_23, */ {(void*) D_CO_6016270, 0, (ObjectFunc) NULL, D_CO_603E4A0, 200.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_24, */ {(void*) D_CO_6010E00, 0, (ObjectFunc) NULL, D_CO_603E9EC, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_25, */ {(void*) D_CO_6014670, 0, (ObjectFunc) NULL, D_CO_603EA08, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_26, */ {(void*) D_CO_6010A50, 0, (ObjectFunc) NULL, D_CO_603EA74, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_27, */ {(void*) D_CO_60143E0, 0, (ObjectFunc) NULL, D_CO_603EAE0, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_28, */ {(void*) D_CO_6014A20, 0, (ObjectFunc) NULL, D_CO_603EB0C, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_29, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_60064FC, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_30, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_6006518, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_31, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_6006564, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_32, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_60065B0, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_33, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_60065FC, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_34, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_6006648, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_35, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_6006694, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_36, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_60066E0, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_37, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_600672C, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_38, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_6006778, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_39, */ {(void*) Obj39_Draw, 1, (ObjectFunc) Obj39_Update, gHitboxNone, 6000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_40, */ {(void*) func_edisplay_80059F68, 1, (ObjectFunc) func_enmy_80066D5C, D_CO_603E4A4, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_41, */ {(void*) func_edisplay_80059FDC, 1, (ObjectFunc) func_enmy_80066EA8, D_CO_603E4DC, 300.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_42, */ {(void*) Obj42_Draw, 1, (ObjectFunc) Obj42_Update, D_CO_603E514, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_43, */ {(void*) D_ZO_6024AC0, 0, (ObjectFunc) NULL, D_ZO_602B9EC, 200.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_44, */ {(void*) D_ZO_600F560, 0, (ObjectFunc) NULL, D_ZO_602BA20, 1500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_45, */ {(void*) D_ZO_600EC90, 0, (ObjectFunc) NULL, D_ZO_602BAE4, 1500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_46, */ {(void*) D_ZO_600E820, 0, (ObjectFunc) NULL, D_ZO_602BBD8, 1500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_47, */ {(void*) D_ZO_601FCB0, 0, (ObjectFunc) NULL, D_ZO_602BC54, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_48, */ {(void*) func_edata_800594F0, 1, (ObjectFunc) NULL, D_VE1_601B4E0, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_49, */ {(void*) func_edata_800595D0, 1, (ObjectFunc) NULL, D_VE1_601B4FC, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_50, */ {(void*) D_VE1_6007410, 0, (ObjectFunc) NULL, D_VE1_601B518, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_51, */ {(void*) D_VE1_6006F50, 0, (ObjectFunc) NULL, D_VE1_601B584, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_52, */ {(void*) D_VE1_6005780, 0, (ObjectFunc) Venom1_80193540, D_VE1_601B5F4, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_53, */ {(void*) D_VE1_6003610, 0, (ObjectFunc) NULL, D_VE1_601B644, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_54, */ {(void*) D_CO_6000E00, 0, (ObjectFunc) Obj54_Update, D_CO_603E0EC, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_55, */ {(void*) D_CO_6013B50, 0, (ObjectFunc) NULL, D_CO_603E88C, 1000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_80_56, */ {(void*) Corneria_8018F31C, 2, (ObjectFunc) Corneria_8018F044, D_CO_603E8A8, 1000.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_80_57, */ {(void*) Titania_8018F8B8, 1, (ObjectFunc) Titania_8018F4D8, D_TI_6006BF0, 800.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_58, */ {(void*) D_TI1_700BE00, 0, (ObjectFunc) NULL, D_TI_6006C44, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_59, */ {(void*) D_MA_6024010, 0, (ObjectFunc) NULL, D_MA_603626C, 300.0f, 0, 0, 5, 0, 0.0f, 0 }, - /* OBJ_80_60, */ {(void*) D_MA_6027180, 0, (ObjectFunc) NULL, D_MA_6036288, 400.0f, 0, 0, 5, 0, 0.0f, 0 }, - /* OBJ_80_61, */ {(void*) Macbeth_801A2A78, 1, (ObjectFunc) NULL, D_MA_60362A4, 200.0f, 0, 0, 5, 0, 0.0f, 0 }, - /* OBJ_80_62, */ {(void*) D_MA_60270E0, 0, (ObjectFunc) NULL, gHitboxNone, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_63, */ {(void*) D_MA_6013960, 0, (ObjectFunc) NULL, D_MA_6036894, 500.0f, 0, 0, 5, 0, 0.0f, 0 }, - /* OBJ_80_64, */ {(void*) D_MA_600AF40, 0, (ObjectFunc) NULL, D_MA_60368E0, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_65, */ {(void*) Macbeth_801A6608, 1, (ObjectFunc) NULL, D_MA_6036724, 400.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_66, */ {(void*) D_MA_601F1D0, 0, (ObjectFunc) NULL, D_MA_60362D8, 2500.0f, 0, 0, 5, 0, 0.0f, 0 }, - /* OBJ_80_67, */ {(void*) D_MA_60238F0, 0, (ObjectFunc) NULL, D_MA_6036328, 2000.0f, 0, 0, 5, 0, 0.0f, 0 }, - /* OBJ_80_68, */ {(void*) D_MA_601B7C0, 0, (ObjectFunc) NULL, D_MA_60362F4, 2500.0f, 0, 0, 5, 0, 0.0f, 0 }, - /* OBJ_80_69, */ {(void*) D_MA_6030500, 0, (ObjectFunc) NULL, D_MA_6036370, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_70, */ {(void*) D_MA_602DAE0, 0, (ObjectFunc) NULL, D_MA_603638C, 1900.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_71, */ {(void*) D_MA_6027900, 0, (ObjectFunc) NULL, D_MA_60363B8, 1900.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_72, */ {(void*) D_MA_602DB80, 0, (ObjectFunc) NULL, D_MA_60363E4, 1100.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_73, */ {(void*) D_MA_6030630, 0, (ObjectFunc) NULL, D_MA_6036410, 1100.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_74, */ {(void*) D_MA_602DC20, 0, (ObjectFunc) NULL, D_MA_603643C, 1000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_75, */ {(void*) D_MA_601B0D0, 0, (ObjectFunc) NULL, D_MA_6036760, 3000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_76, */ {(void*) D_MA_60075D0, 0, (ObjectFunc) NULL, gHitboxNone, 1000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_77, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, D_MA_6036344, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_78, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_79, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_80, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_81, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_82, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_83, */ {(void*) Macbeth_801A3240, 1, (ObjectFunc) Macbeth_801A2DD8, gHitboxNone, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_84, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_85, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_86, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_87, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_88, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_89, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_90, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_91, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_92, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_93, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_94, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_95, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_96, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_97, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_98, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_99, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_100 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_101 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_102 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_103 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_104 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) Macbeth_801A0BD8, D_MA_6036594, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_105 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, D_MA_6036204, 1300.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_106 */ {(void*) D_SY_60097E0, 0, (ObjectFunc) NULL, D_SY_6034478, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_80_107 */ {(void*) D_SY_601D730, 0, (ObjectFunc) NULL, D_SY_603450C, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_80_108 */ {(void*) D_SY_60102C0, 0, (ObjectFunc) NULL, D_SY_6034588, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_80_109 */ {(void*) D_SY_60036A0, 0, (ObjectFunc) SectorY_801A4E44, D_SY_6034664, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_80_110 */ {(void*) D_SY_6005360, 0, (ObjectFunc) NULL, D_SY_6034770, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_80_111 */ {(void*) Obj111_Draw, 1, (ObjectFunc) NULL, gHitboxNone, 2000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_112 */ {(void*) D_SY_600F6C0, 0, (ObjectFunc) SectorY_801A52B8, D_SY_60347F0, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_80_113 */ {(void*) D_SY_601B610, 0, (ObjectFunc) NULL, gHitboxNone, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_114 */ {(void*) D_SY_601C6A0, 0, (ObjectFunc) NULL, gHitboxNone, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_115 */ {(void*) D_SY_60188D0, 0, (ObjectFunc) NULL, D_SY_603486C, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_116 */ {(void*) D_SY_60034D0, 0, (ObjectFunc) NULL, D_SY_60347D4, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_117 */ {(void*) D_AQ_60231C0, 0, (ObjectFunc) NULL, D_AQ_6030C60, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_118 */ {(void*) D_AQ_6011EE0, 0, (ObjectFunc) NULL, D_AQ_6030C7C, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_80_119 */ {(void*) D_AQ_6015730, 0, (ObjectFunc) NULL, D_AQ_6030D74, 2000.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_80_120 */ {(void*) D_AQ_601DE60, 0, (ObjectFunc) NULL, D_AQ_6030DF8, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_121 */ {(void*) D_AQ_602B4C0, 0, (ObjectFunc) NULL, D_AQ_6030E14, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_122 */ {(void*) D_AQ_600EE10, 0, (ObjectFunc) NULL, D_AQ_6030E30_Hitbox, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_80_123 */ {(void*) D_AQ_60120F0, 0, (ObjectFunc) NULL, D_AQ_6030E4C, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_80_124 */ {(void*) D_AQ_600EEF0, 0, (ObjectFunc) NULL, gHitboxNone, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_80_125 */ {(void*) D_AQ_600BF80, 0, (ObjectFunc) NULL, D_AQ_6030E68, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_80_126 */ {(void*) Aquas_801BE1FC, 1, (ObjectFunc) NULL, gHitboxNone, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_80_127 */ {(void*) D_VE1_9005C80, 0, (ObjectFunc) Venom1_801924A8, D_VE1_601B678, 1000.0f, 0, 0, 42, 0, 0.0f, 0 }, - /* OBJ_80_128 */ {(void*) D_VE1_9003F50, 0, (ObjectFunc) NULL, D_VE1_601B6C4, 3200.0f, 0, 0, 42, 0, 0.0f, 0 }, - /* OBJ_80_129 */ {(void*) D_VE1_900F060, 0, (ObjectFunc) NULL, D_VE1_601B710, 3200.0f, 0, 0, 42, 0, 0.0f, 0 }, - /* OBJ_80_130 */ {(void*) D_VE1_900F1D0, 0, (ObjectFunc) NULL, D_VE1_601B75C, 3200.0f, 0, 0, 42, 0, 0.0f, 0 }, - /* OBJ_80_131 */ {(void*) Andross_801935D4, 1, (ObjectFunc) Andross_8019356C, D_ANDROSS_C038BD8, 500.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_80_132 */ {(void*) Andross_8019350C, 1, (ObjectFunc) Andross_80193380, D_ANDROSS_C038A48, 500.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_80_133 */ {(void*) D_TR_60030F0, 0, (ObjectFunc) NULL, D_TR_6009CC4, 1000.0f, 0, 0, 20, 0, 0.0f, 0 }, - /* OBJ_80_134 */ {(void*) D_VE2_6003000, 0, (ObjectFunc) NULL, D_ANDROSS_C038BA4, 0.0f, 0, 0, 41, 1, 0.0f, 0 }, - /* OBJ_80_135 */ {(void*) D_TI_6006890, 0, (ObjectFunc) NULL, D_ANDROSS_C038B40, 0.0f, 0, 0, 41, 1, 0.0f, 0 }, - /* OBJ_80_136 */ {(void*) D_VE2_6002990, 0, (ObjectFunc) NULL, D_ANDROSS_C038B40, 0.0f, 0, 0, 41, 1, 0.0f, 0 }, - /* OBJ_80_137 */ {(void*) D_VE2_6004170, 0, (ObjectFunc) NULL, gHitboxNone, 0.0f, 0, 0, 0, 1, 0.0f, 0 }, - /* OBJ_80_138 */ {(void*) D_versus_3017600, 0, (ObjectFunc) NULL, D_versus_302EE64, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_139 */ {(void*) D_versus_3017600, 0, (ObjectFunc) NULL, D_versus_302EE80, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_140 */ {(void*) D_versus_30173C0, 0, (ObjectFunc) NULL, gHitboxNone, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_141 */ {(void*) D_versus_30174E0, 0, (ObjectFunc) NULL, gHitboxNone, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_142 */ {(void*) D_versus_301B080, 0, (ObjectFunc) NULL, D_versus_302EE9C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_143 */ {(void*) D_versus_3016B00, 0, (ObjectFunc) NULL, D_versus_302EE00, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_144 */ {(void*) D_versus_3013780, 0, (ObjectFunc) NULL, D_versus_302ED4C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_145 */ {(void*) D_versus_3013580, 0, (ObjectFunc) NULL, D_versus_302ED98, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_146 */ {(void*) D_versus_3012ED0, 0, (ObjectFunc) NULL, D_versus_302EDB4, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_147 */ {(void*) NULL, 0, (ObjectFunc) NULL, gHitboxNone, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_148 */ {(void*) D_FO_60079B0, 0, (ObjectFunc) NULL, D_FO_600FF80, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_149 */ {(void*) D_FO_6007D80, 0, (ObjectFunc) NULL, D_FO_600FFA0, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_150 */ {(void*) D_FO_6006310, 0, (ObjectFunc) NULL, D_FO_600FFC0, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_151 */ {(void*) D_FO_60066E0, 0, (ObjectFunc) NULL, D_FO_600FEB8, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_152 */ {(void*) D_BO_600F4C0, 0, (ObjectFunc) NULL, D_BO_6011C10, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_153 */ {(void*) D_BO_600B8B0, 0, (ObjectFunc) NULL, D_BO_6011C48, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_154 */ {(void*) D_KA_600BAF0, 0, (ObjectFunc) NULL, D_KA_601115C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_155 */ {(void*) NULL, 0, (ObjectFunc) NULL, gHitboxNone, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_156 */ {(void*) SectorY_80197CB8, 1, (ObjectFunc) NULL, D_SY_6034368, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_157 */ {(void*) D_SZ_6001DA0, 0, (ObjectFunc) NULL, D_SZ_600924C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_158 */ {(void*) D_SZ_6001360, 0, (ObjectFunc) NULL, D_SZ_60092E8, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_159 */ {(void*) D_VE2_6008370, 0, (ObjectFunc) NULL, D_VE2_601668C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_160 */ {(void*) D_VE2_6010960, 0, (ObjectFunc) NULL, D_VE2_6016714, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_0, */ {(void*) D_CO_6015F00, 0, (ObjectFunc) NULL, D_CO_603E3E0, 800.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_1, */ {(void*) D_CO_602E9E0, 0, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_2, */ {(void*) D_CO_601BEC0, 0, (ObjectFunc) NULL, gNoHitbox, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_3, */ {(void*) D_CO_602E7A0, 0, (ObjectFunc) NULL, gNoHitbox, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_4, */ {(void*) D_CO_60244A0, 0, (ObjectFunc) NULL, gNoHitbox, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_5, */ {(void*) D_CO_602E570, 0, (ObjectFunc) NULL, gNoHitbox, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_6, */ {(void*) D_CO_60132B0, 0, (ObjectFunc) NULL, D_CO_603DCA4, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_7, */ {(void*) D_CO_602E080, 0, (ObjectFunc) NULL, D_CO_603DD40, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_8, */ {(void*) D_CO_60164F0, 0, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_9, */ {(void*) D_CO_6014500, 0, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_10, */ {(void*) D_CO_602D5F0, 0, (ObjectFunc) NULL, D_CO_603DDF0, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_11, */ {(void*) D_CO_601A7D0, 0, (ObjectFunc) NULL, D_CO_603DE8C, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_12, */ {(void*) D_CO_6014B50, 0, (ObjectFunc) NULL, D_CO_603DEF4, 500.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_13, */ {(void*) D_CO_6016580, 0, (ObjectFunc) NULL, D_CO_603DF8C, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_14, */ {(void*) D_CO_601B560, 0, (ObjectFunc) func_enmy_80066EA8, D_CO_603DFDC, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_15, */ {(void*) D_CO_60361F0, 0, (ObjectFunc) func_enmy_80066EA8, D_CO_603E014, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_16, */ {(void*) D_CO_6018E80, 0, (ObjectFunc) func_enmy_80066EA8, D_CO_603E030, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_17, */ {(void*) D_CO_6035F10, 0, (ObjectFunc) func_enmy_80066EA8, D_CO_603E09C, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_18, */ {(void*) Corneria_8018753C, 1, (ObjectFunc) Corneria_80187530, D_CO_603E98C, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_19, */ {(void*) D_CO_60153B0, 0, (ObjectFunc) NULL, D_CO_603E118, 100.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_20, */ {(void*) D_CO_601F5A0, 0, (ObjectFunc) NULL, D_CO_603E14C, 500.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_21, */ {(void*) D_CO_60137B0, 0, (ObjectFunc) NULL, D_CO_603E1B4, 400.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_22, */ {(void*) D_CO_6006A80, 0, (ObjectFunc) NULL, D_CO_603E21C, 400.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_23, */ {(void*) D_CO_6016270, 0, (ObjectFunc) NULL, D_CO_603E4A0, 200.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_24, */ {(void*) D_CO_6010E00, 0, (ObjectFunc) NULL, D_CO_603E9EC, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_25, */ {(void*) D_CO_6014670, 0, (ObjectFunc) NULL, D_CO_603EA08, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_26, */ {(void*) D_CO_6010A50, 0, (ObjectFunc) NULL, D_CO_603EA74, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_27, */ {(void*) D_CO_60143E0, 0, (ObjectFunc) NULL, D_CO_603EAE0, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_28, */ {(void*) D_CO_6014A20, 0, (ObjectFunc) NULL, D_CO_603EB0C, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_29, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_60064FC, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_30, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_6006518, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_31, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_6006564, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_32, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_60065B0, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_33, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_60065FC, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_34, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_6006648, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_35, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_6006694, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_36, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_60066E0, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_37, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_600672C, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_38, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_6006778, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_39, */ {(void*) Obj39_Draw, 1, (ObjectFunc) Obj39_Update, gNoHitbox, 6000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_40, */ {(void*) func_edisplay_80059F68, 1, (ObjectFunc) func_enmy_80066D5C, D_CO_603E4A4, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_41, */ {(void*) func_edisplay_80059FDC, 1, (ObjectFunc) func_enmy_80066EA8, D_CO_603E4DC, 300.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_42, */ {(void*) Obj42_Draw, 1, (ObjectFunc) Obj42_Update, D_CO_603E514, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_43, */ {(void*) D_ZO_6024AC0, 0, (ObjectFunc) NULL, D_ZO_602B9EC, 200.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_44, */ {(void*) D_ZO_600F560, 0, (ObjectFunc) NULL, D_ZO_602BA20, 1500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_45, */ {(void*) D_ZO_600EC90, 0, (ObjectFunc) NULL, D_ZO_602BAE4, 1500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_46, */ {(void*) D_ZO_600E820, 0, (ObjectFunc) NULL, D_ZO_602BBD8, 1500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_47, */ {(void*) D_ZO_601FCB0, 0, (ObjectFunc) NULL, D_ZO_602BC54, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_48, */ {(void*) func_edata_800594F0, 1, (ObjectFunc) NULL, D_VE1_601B4E0, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_49, */ {(void*) func_edata_800595D0, 1, (ObjectFunc) NULL, D_VE1_601B4FC, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_50, */ {(void*) D_VE1_6007410, 0, (ObjectFunc) NULL, D_VE1_601B518, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_51, */ {(void*) D_VE1_6006F50, 0, (ObjectFunc) NULL, D_VE1_601B584, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_52, */ {(void*) D_VE1_6005780, 0, (ObjectFunc) Venom1_80193540, D_VE1_601B5F4, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_53, */ {(void*) D_VE1_6003610, 0, (ObjectFunc) NULL, D_VE1_601B644, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_54, */ {(void*) D_CO_6000E00, 0, (ObjectFunc) Obj54_Update, D_CO_603E0EC, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_55, */ {(void*) D_CO_6013B50, 0, (ObjectFunc) NULL, D_CO_603E88C, 1000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_56, */ {(void*) Corneria_8018F31C, 2, (ObjectFunc) Corneria_8018F044, D_CO_603E8A8, 1000.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_57, */ {(void*) Titania_8018F8B8, 1, (ObjectFunc) Titania_8018F4D8, D_TI_6006BF0, 800.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_58, */ {(void*) D_TI1_700BE00, 0, (ObjectFunc) NULL, D_TI_6006C44, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_59, */ {(void*) D_MA_6024010, 0, (ObjectFunc) NULL, D_MA_603626C, 300.0f, 0, 0, 5, 0, 0.0f, 0 }, + /* OBJ_SCENERY_60, */ {(void*) D_MA_6027180, 0, (ObjectFunc) NULL, D_MA_6036288, 400.0f, 0, 0, 5, 0, 0.0f, 0 }, + /* OBJ_SCENERY_61, */ {(void*) Macbeth_801A2A78, 1, (ObjectFunc) NULL, D_MA_60362A4, 200.0f, 0, 0, 5, 0, 0.0f, 0 }, + /* OBJ_SCENERY_62, */ {(void*) D_MA_60270E0, 0, (ObjectFunc) NULL, gNoHitbox, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_63, */ {(void*) D_MA_6013960, 0, (ObjectFunc) NULL, D_MA_6036894, 500.0f, 0, 0, 5, 0, 0.0f, 0 }, + /* OBJ_SCENERY_64, */ {(void*) D_MA_600AF40, 0, (ObjectFunc) NULL, D_MA_60368E0, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_65, */ {(void*) Macbeth_801A6608, 1, (ObjectFunc) NULL, D_MA_6036724, 400.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_66, */ {(void*) D_MA_601F1D0, 0, (ObjectFunc) NULL, D_MA_60362D8, 2500.0f, 0, 0, 5, 0, 0.0f, 0 }, + /* OBJ_SCENERY_67, */ {(void*) D_MA_60238F0, 0, (ObjectFunc) NULL, D_MA_6036328, 2000.0f, 0, 0, 5, 0, 0.0f, 0 }, + /* OBJ_SCENERY_68, */ {(void*) D_MA_601B7C0, 0, (ObjectFunc) NULL, D_MA_60362F4, 2500.0f, 0, 0, 5, 0, 0.0f, 0 }, + /* OBJ_SCENERY_69, */ {(void*) D_MA_6030500, 0, (ObjectFunc) NULL, D_MA_6036370, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_70, */ {(void*) D_MA_602DAE0, 0, (ObjectFunc) NULL, D_MA_603638C, 1900.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_71, */ {(void*) D_MA_6027900, 0, (ObjectFunc) NULL, D_MA_60363B8, 1900.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_72, */ {(void*) D_MA_602DB80, 0, (ObjectFunc) NULL, D_MA_60363E4, 1100.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_73, */ {(void*) D_MA_6030630, 0, (ObjectFunc) NULL, D_MA_6036410, 1100.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_74, */ {(void*) D_MA_602DC20, 0, (ObjectFunc) NULL, D_MA_603643C, 1000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_75, */ {(void*) D_MA_601B0D0, 0, (ObjectFunc) NULL, D_MA_6036760, 3000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_76, */ {(void*) D_MA_60075D0, 0, (ObjectFunc) NULL, gNoHitbox, 1000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_77, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, D_MA_6036344, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_78, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_79, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_80, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_81, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_82, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_83, */ {(void*) Macbeth_801A3240, 1, (ObjectFunc) Macbeth_801A2DD8, gNoHitbox, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_84, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_85, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_86, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_87, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_88, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_89, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_90, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_91, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_92, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_93, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_94, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_95, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_96, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_97, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_98, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_99, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_100 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_101 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_102 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_103 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_104 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) Macbeth_801A0BD8, D_MA_6036594, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_105 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, D_MA_6036204, 1300.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_106 */ {(void*) D_SY_60097E0, 0, (ObjectFunc) NULL, D_SY_6034478, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_107 */ {(void*) D_SY_601D730, 0, (ObjectFunc) NULL, D_SY_603450C, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_108 */ {(void*) D_SY_60102C0, 0, (ObjectFunc) NULL, D_SY_6034588, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_109 */ {(void*) D_SY_60036A0, 0, (ObjectFunc) SectorY_801A4E44, D_SY_6034664, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_110 */ {(void*) D_SY_6005360, 0, (ObjectFunc) NULL, D_SY_6034770, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_111 */ {(void*) Obj111_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_112 */ {(void*) D_SY_600F6C0, 0, (ObjectFunc) SectorY_801A52B8, D_SY_60347F0, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_113 */ {(void*) D_SY_601B610, 0, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_114 */ {(void*) D_SY_601C6A0, 0, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_115 */ {(void*) D_SY_60188D0, 0, (ObjectFunc) NULL, D_SY_603486C, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_116 */ {(void*) D_SY_60034D0, 0, (ObjectFunc) NULL, D_SY_60347D4, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_117 */ {(void*) D_AQ_60231C0, 0, (ObjectFunc) NULL, D_AQ_6030C60, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_118 */ {(void*) D_AQ_6011EE0, 0, (ObjectFunc) NULL, D_AQ_6030C7C, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_119 */ {(void*) D_AQ_6015730, 0, (ObjectFunc) NULL, D_AQ_6030D74, 2000.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_120 */ {(void*) D_AQ_601DE60, 0, (ObjectFunc) NULL, D_AQ_6030DF8, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_121 */ {(void*) D_AQ_602B4C0, 0, (ObjectFunc) NULL, D_AQ_6030E14, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_122 */ {(void*) D_AQ_600EE10, 0, (ObjectFunc) NULL, D_AQ_6030E30_Hitbox, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_123 */ {(void*) D_AQ_60120F0, 0, (ObjectFunc) NULL, D_AQ_6030E4C, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_124 */ {(void*) D_AQ_600EEF0, 0, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_125 */ {(void*) D_AQ_600BF80, 0, (ObjectFunc) NULL, D_AQ_6030E68, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_126 */ {(void*) Aquas_801BE1FC, 1, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_127 */ {(void*) D_VE1_9005C80, 0, (ObjectFunc) Venom1_801924A8, D_VE1_601B678, 1000.0f, 0, 0, 42, 0, 0.0f, 0 }, + /* OBJ_SCENERY_128 */ {(void*) D_VE1_9003F50, 0, (ObjectFunc) NULL, D_VE1_601B6C4, 3200.0f, 0, 0, 42, 0, 0.0f, 0 }, + /* OBJ_SCENERY_129 */ {(void*) D_VE1_900F060, 0, (ObjectFunc) NULL, D_VE1_601B710, 3200.0f, 0, 0, 42, 0, 0.0f, 0 }, + /* OBJ_SCENERY_130 */ {(void*) D_VE1_900F1D0, 0, (ObjectFunc) NULL, D_VE1_601B75C, 3200.0f, 0, 0, 42, 0, 0.0f, 0 }, + /* OBJ_SCENERY_131 */ {(void*) Andross_801935D4, 1, (ObjectFunc) Andross_8019356C, D_ANDROSS_C038BD8, 500.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_132 */ {(void*) Andross_8019350C, 1, (ObjectFunc) Andross_80193380, D_ANDROSS_C038A48, 500.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_133 */ {(void*) D_TR_60030F0, 0, (ObjectFunc) NULL, D_TR_6009CC4, 1000.0f, 0, 0, 20, 0, 0.0f, 0 }, + /* OBJ_SCENERY_134 */ {(void*) D_VE2_6003000, 0, (ObjectFunc) NULL, D_ANDROSS_C038BA4, 0.0f, 0, 0, 41, 1, 0.0f, 0 }, + /* OBJ_SCENERY_135 */ {(void*) D_TI_6006890, 0, (ObjectFunc) NULL, D_ANDROSS_C038B40, 0.0f, 0, 0, 41, 1, 0.0f, 0 }, + /* OBJ_SCENERY_136 */ {(void*) D_VE2_6002990, 0, (ObjectFunc) NULL, D_ANDROSS_C038B40, 0.0f, 0, 0, 41, 1, 0.0f, 0 }, + /* OBJ_SCENERY_137 */ {(void*) D_VE2_6004170, 0, (ObjectFunc) NULL, gNoHitbox, 0.0f, 0, 0, 0, 1, 0.0f, 0 }, + /* OBJ_SCENERY_138 */ {(void*) D_versus_3017600, 0, (ObjectFunc) NULL, D_versus_302EE64, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_139 */ {(void*) D_versus_3017600, 0, (ObjectFunc) NULL, D_versus_302EE80, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_140 */ {(void*) D_versus_30173C0, 0, (ObjectFunc) NULL, gNoHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_141 */ {(void*) D_versus_30174E0, 0, (ObjectFunc) NULL, gNoHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_142 */ {(void*) D_versus_301B080, 0, (ObjectFunc) NULL, D_versus_302EE9C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_143 */ {(void*) D_versus_3016B00, 0, (ObjectFunc) NULL, D_versus_302EE00, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_144 */ {(void*) D_versus_3013780, 0, (ObjectFunc) NULL, D_versus_302ED4C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_145 */ {(void*) D_versus_3013580, 0, (ObjectFunc) NULL, D_versus_302ED98, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_146 */ {(void*) D_versus_3012ED0, 0, (ObjectFunc) NULL, D_versus_302EDB4, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_147 */ {(void*) NULL, 0, (ObjectFunc) NULL, gNoHitbox, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_148 */ {(void*) D_FO_60079B0, 0, (ObjectFunc) NULL, D_FO_600FF80, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_149 */ {(void*) D_FO_6007D80, 0, (ObjectFunc) NULL, D_FO_600FFA0, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_150 */ {(void*) D_FO_6006310, 0, (ObjectFunc) NULL, D_FO_600FFC0, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_151 */ {(void*) D_FO_60066E0, 0, (ObjectFunc) NULL, D_FO_600FEB8, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_152 */ {(void*) D_BO_600F4C0, 0, (ObjectFunc) NULL, D_BO_6011C10, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_153 */ {(void*) D_BO_600B8B0, 0, (ObjectFunc) NULL, D_BO_6011C48, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_154 */ {(void*) D_KA_600BAF0, 0, (ObjectFunc) NULL, D_KA_601115C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_155 */ {(void*) NULL, 0, (ObjectFunc) NULL, gNoHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_156 */ {(void*) SectorY_80197CB8, 1, (ObjectFunc) NULL, D_SY_6034368, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_157 */ {(void*) D_SZ_6001DA0, 0, (ObjectFunc) NULL, D_SZ_600924C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_158 */ {(void*) D_SZ_6001360, 0, (ObjectFunc) NULL, D_SZ_60092E8, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_159 */ {(void*) D_VE2_6008370, 0, (ObjectFunc) NULL, D_VE2_601668C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_160 */ {(void*) D_VE2_6010960, 0, (ObjectFunc) NULL, D_VE2_6016714, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SPRITE_CO_POLE */ {(void*) D_CO_602F7C0, 0, (ObjectFunc) Sprite_UpdateDoodad, D_CO_603E468, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SPRITE_CO_TREE */ {(void*) D_CO_601C9B0, 0, (ObjectFunc) Sprite_UpdateDoodad, D_CO_603E484, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SPRITE_FO_POLE */ {(void*) D_FO_600A420, 0, (ObjectFunc) Sprite_UpdateDoodad, D_FO_600FE9C, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SPRITE_FOG_SHADOW */ {(void*) FogShadow_Draw, 1, (ObjectFunc) NULL, gHitboxNone, 1800.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SPRITE_CO_RUIN1 */ {(void*) D_CO_602DCA0, 0, (ObjectFunc) NULL, gHitboxNone, -100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SPRITE_CO_RUIN2 */ {(void*) D_CO_601F500, 0, (ObjectFunc) NULL, gHitboxNone, -100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SPRITE_167 */ {(void*) Sprite167_Draw, 1, (ObjectFunc) Sprite167_Update, gHitboxNone, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SPRITE_168 */ {(void*) Sprite168_Draw, 1, (ObjectFunc) NULL, gHitboxNone, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SPRITE_FOG_SHADOW */ {(void*) FogShadow_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 1800.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SPRITE_CO_RUIN1 */ {(void*) D_CO_602DCA0, 0, (ObjectFunc) NULL, gNoHitbox, -100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SPRITE_CO_RUIN2 */ {(void*) D_CO_601F500, 0, (ObjectFunc) NULL, gNoHitbox, -100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SPRITE_167 */ {(void*) Sprite167_Draw, 1, (ObjectFunc) Sprite167_Update, gNoHitbox, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SPRITE_168 */ {(void*) Sprite168_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SPRITE_TI_CACTUS */ {(void*) D_TI_60023B0, 0, (ObjectFunc) Titania_Cactus_Update, D_TI_60068BC, 100.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SPRITE_CO_SMOKE */ {(void*) NULL, 1, (ObjectFunc) Corneria_801875A4, gHitboxNone, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SPRITE_VE1_BOSS_TRIGGER1 */ {(void*) NULL, 1, (ObjectFunc) Venom1_BossTrigger1_Update, gHitboxNone, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SPRITE_VE1_BOSS_TRIGGER2 */ {(void*) NULL, 1, (ObjectFunc) Venom1_BossTrigger2_Update, gHitboxNone, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SPRITE_VE1_BOSS_TRIGGER3 */ {(void*) NULL, 1, (ObjectFunc) Venom1_BossTrigger3_Update, gHitboxNone, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SPRITE_VE1_BOSS_TRIGGER4 */ {(void*) NULL, 1, (ObjectFunc) Venom1_BossTrigger4_Update, gHitboxNone, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SPRITE_GFOX_TARGET */ {(void*) NULL, 1, (ObjectFunc) NULL, gHitboxNone, 1000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SPRITE_CO_SMOKE */ {(void*) NULL, 1, (ObjectFunc) Corneria_801875A4, gNoHitbox, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SPRITE_VE1_BOSS_TRIGGER1 */ {(void*) NULL, 1, (ObjectFunc) Venom1_BossTrigger1_Update, gNoHitbox, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SPRITE_VE1_BOSS_TRIGGER2 */ {(void*) NULL, 1, (ObjectFunc) Venom1_BossTrigger2_Update, gNoHitbox, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SPRITE_VE1_BOSS_TRIGGER3 */ {(void*) NULL, 1, (ObjectFunc) Venom1_BossTrigger3_Update, gNoHitbox, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SPRITE_VE1_BOSS_TRIGGER4 */ {(void*) NULL, 1, (ObjectFunc) Venom1_BossTrigger4_Update, gNoHitbox, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SPRITE_GFOX_TARGET */ {(void*) NULL, 1, (ObjectFunc) NULL, gNoHitbox, 1000.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ACTOR_176 */ {(void*) Corneria_8018BAAC, 2, (ObjectFunc) Corneria_8018AED0, D_CO_603E5D0, 500.0f, 0, 0, 39, 1, 200.0f, 1 }, /* OBJ_ACTOR_177 */ {(void*) Corneria_8018BBA4, 2, (ObjectFunc) Corneria_8018B15C, D_CO_603E5D0, 500.0f, 0, 0, 39, 1, 200.0f, 1 }, /* OBJ_ACTOR_178 */ {(void*) Corneria_8018BBF8, 2, (ObjectFunc) Corneria_8018B418, D_CO_603E5D0, 500.0f, 0, 0, 39, 1, 200.0f, 1 }, /* OBJ_ACTOR_179 */ {(void*) Corneria_8018BD7C, 2, (ObjectFunc) Corneria_8018B58C, D_CO_603E604, 500.0f, 0, 0, 39, 1, 0.0f, 1 }, - /* OBJ_ACTOR_180 */ {(void*) func_edisplay_8005B6A4, 1, (ObjectFunc) func_enmy_80066A80, gHitboxNone, 1000.0f, 0, 0, 39, 0, 0.0f, 1 }, + /* OBJ_ACTOR_180 */ {(void*) func_edisplay_8005B6A4, 1, (ObjectFunc) func_enmy_80066A80, gNoHitbox, 1000.0f, 0, 0, 39, 0, 0.0f, 1 }, /* OBJ_ACTOR_181 */ {(void*) D_ME_6018C00, 0, (ObjectFunc) Meteo_8018756C, D_ME_602F6EC, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, /* OBJ_ACTOR_182 */ {(void*) func_edisplay_8005B71C, 1, (ObjectFunc) Meteo_80187650, D_ME_602F708, 100.0f, 0, 1, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_183 */ {(void*) Meteo_8018DA6C, 1, (ObjectFunc) Meteo_8018D9EC, gHitboxNone, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, - /* OBJ_ACTOR_184 */ {(void*) Meteo_8018DAEC, 1, (ObjectFunc) Meteo_8018D9EC, gHitboxNone, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, - /* OBJ_ACTOR_185 */ {(void*) Meteo_8018DB6C, 1, (ObjectFunc) Meteo_8018D9EC, gHitboxNone, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, + /* OBJ_ACTOR_183 */ {(void*) Meteo_8018DA6C, 1, (ObjectFunc) Meteo_8018D9EC, gNoHitbox, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, + /* OBJ_ACTOR_184 */ {(void*) Meteo_8018DAEC, 1, (ObjectFunc) Meteo_8018D9EC, gNoHitbox, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, + /* OBJ_ACTOR_185 */ {(void*) Meteo_8018DB6C, 1, (ObjectFunc) Meteo_8018D9EC, gNoHitbox, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, /* OBJ_ACTOR_186 */ {(void*) func_edisplay_8005B7CC, 1, (ObjectFunc) Meteo_8018795C, D_ME_602F724, 200.0f, 0, 1, 39, 0, 1.0f, 1 }, /* OBJ_ACTOR_187 */ {(void*) D_ME_6018450, 0, (ObjectFunc) Meteo_801877C4, D_ME_602F740, 200.0f, 0, 1, 39, 0, 1.0f, 1 }, /* OBJ_ACTOR_188 */ {(void*) Aquas_801BEC74, 1, (ObjectFunc) Aquas_801BEC68, D_AQ_6030BE0, 200.0f, 0, 1, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_189 */ {(void*) Actor189_Draw, 1, (ObjectFunc) Actor189_Update, gHitboxNone, 0.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_ACTOR_189 */ {(void*) Actor189_Draw, 1, (ObjectFunc) Actor189_Update, gNoHitbox, 0.0f, 0, 0, 39, 0, 0.0f, 0 }, /* OBJ_ACTOR_190 */ {(void*) func_edisplay_8005B848, 1, (ObjectFunc) func_enmy_800656D4, gActor190_191Hitbox, 100.0f, 0, 1, 39, 0, 1.0f, 0 }, /* OBJ_ACTOR_191 */ {(void*) func_edisplay_8005B848, 1, (ObjectFunc) func_enmy_800656D4, gActor190_191Hitbox, 100.0f, 0, 1, 39, 0, 1.0f, 0 }, /* 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*) Actor195_Draw, 1, (ObjectFunc) Actor195_Update, gHitboxNone, 20000.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*) Actor195_Draw, 1, (ObjectFunc) Actor195_Update, gNoHitbox, 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 }, - /* OBJ_ACTOR_199 */ {(void*) Andross_80188448, 1, (ObjectFunc) Andross_801880E4, gHitboxNone, 20000.0f, 0, 0, 39, 1, 0.0f, 0 }, - /* OBJ_ACTOR_EVENT */ {(void*) ActorEvent_Draw, 1, (ObjectFunc) ActorEvent_Update, gHitboxNone, 2000.0f, 0, 1, 39, 0, 0.0f, 1 }, + /* OBJ_ACTOR_199 */ {(void*) Andross_80188448, 1, (ObjectFunc) Andross_801880E4, gNoHitbox, 20000.0f, 0, 0, 39, 1, 0.0f, 0 }, + /* OBJ_ACTOR_EVENT */ {(void*) ActorEvent_Draw, 1, (ObjectFunc) ActorEvent_Update, gNoHitbox, 2000.0f, 0, 1, 39, 0, 0.0f, 1 }, /* OBJ_ACTOR_201 */ {(void*) Actor201_Draw, 1, (ObjectFunc) Actor201_Update, D_ME_602F684, 100.0f, 0, 1, 39, 0, 1.0f, 1 }, /* OBJ_ACTOR_202 */ {(void*) Actor202_Draw, 1, (ObjectFunc) Actor202_Update, D_ME_602F6A0, 100.0f, 0, 1, 39, 0, 180.0f, 1 }, - /* OBJ_ACTOR_SLIPPY_SX */ {(void*) SectorX_8018F884, 1, (ObjectFunc) SectorX_8018F330, gHitboxNone, 1000.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_ACTOR_SLIPPY_SX */ {(void*) SectorX_8018F884, 1, (ObjectFunc) SectorX_8018F330, gNoHitbox, 1000.0f, 0, 0, 39, 0, 0.0f, 0 }, /* OBJ_ACTOR_204 */ {(void*) SectorY_Actor204_Draw, 1, (ObjectFunc) SectorY_Actor204_Update, D_SY_603405C, 1000.0f, 0, 0, 39, 0, 1.0f, 1 }, /* OBJ_ACTOR_205 */ {(void*) Macbeth_801A12C4, 1, (ObjectFunc) Macbeth_8019C778, D_MA_60359C8, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, /* OBJ_ACTOR_206 */ {(void*) Macbeth_801A12C4, 1, (ObjectFunc) Macbeth_801AC438, D_MA_6035A48, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, @@ -317,7 +317,7 @@ ObjectInfo D_edata_800CC124[0x190] = { /* OBJ_ACTOR_221 */ {(void*) Macbeth_801AE2C0, 1, (ObjectFunc) Macbeth_801ADD68, D_MA_603694C, 300.0f, 0, 0, 40, 1, 1.0f, 0 }, /* OBJ_ACTOR_222 */ {(void*) Macbeth_801AEEFC, 1, (ObjectFunc) Macbeth_801AEC04, D_MA_6036968, 300.0f, 0, 0, 40, 1, 1.0f, 0 }, /* OBJ_ACTOR_223 */ {(void*) Macbeth_801A54E8, 1, (ObjectFunc) Macbeth_801A4B24, D_MA_60364DC, 300.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_224 */ {(void*) NULL, 1, (ObjectFunc) Titania_80189194, gHitboxNone, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_ACTOR_224 */ {(void*) NULL, 1, (ObjectFunc) Titania_80189194, gNoHitbox, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, /* OBJ_ACTOR_225 */ {(void*) D_TI1_700AB70, 0, (ObjectFunc) Titania_8018AB44, D_TI_60064AC, 50.0f, 0, 0, 39, 1, 1.0f, 0 }, /* OBJ_ACTOR_226 */ {(void*) Titania_80189AFC, 1, (ObjectFunc) Titania_801895B8, D_TI_60064C8, 300.0f, 0, 0, 39, 1, 70.0f, 1 }, /* OBJ_ACTOR_227 */ {(void*) Titania_8018E5B4, 1, (ObjectFunc) Titania_8018E54C, D_TI_60067C4, 0.0f, 0, 0, 39, 1, 0.0f, 0 }, @@ -327,22 +327,22 @@ ObjectInfo D_edata_800CC124[0x190] = { /* OBJ_ACTOR_231 */ {(void*) Titania_8018BE84, 1, (ObjectFunc) Titania_8018B9D0, D_TI_6006858, 0.0f, 0, 0, 39, 1, 0.0f, 1 }, /* OBJ_ACTOR_232 */ {(void*) Titania_8018B6AC, 1, (ObjectFunc) Titania_8018B268, D_TI_6006890, 0.0f, 0, 0, 39, 1, 20.0f, 1 }, /* OBJ_ACTOR_233 */ {(void*) Titania_8018A1C0, 1, (ObjectFunc) Titania_80189CC8, D_TI_60068F0, 200.0f, 0, 0, 39, 1, 1.0f, 1 }, - /* OBJ_ACTOR_234 */ {(void*) Actor234_Draw, 1, (ObjectFunc) Actor234_Update, gHitboxNone, 2000.0f, 0, 0, 39, 0, 0.0f, 5 }, + /* OBJ_ACTOR_234 */ {(void*) Actor234_Draw, 1, (ObjectFunc) Actor234_Update, gNoHitbox, 2000.0f, 0, 0, 39, 0, 0.0f, 5 }, /* OBJ_ACTOR_235 */ {(void*) Zoness_80190430, 2, (ObjectFunc) Zoness_801904CC, D_ZO_602C294, 1000.0f, 0, 1, 40, 0, 1.0f, 1 }, /* OBJ_ACTOR_236 */ {(void*) Zoness_80190F08, 1, (ObjectFunc) Zoness_80190A00, D_ZO_602BC58, 5000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_237 */ {(void*) Actor237_Draw, 1, (ObjectFunc) Actor237_Update, gHitboxNone, 200.0f, 0, 0, 40, 0, 0.0f, 2 }, - /* OBJ_ACTOR_238 */ {(void*) Zoness_801914C4, 2, (ObjectFunc) Zoness_80191010, gDefaultCubeHitbox100, 200.0f, 0, 1, 40, 0, 1.0f, 1 }, - /* OBJ_ACTOR_239 */ {(void*) NULL, 1, (ObjectFunc) NULL, gHitboxNone, 1000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ACTOR_240 */ {(void*) Zoness_80191B4C, 1, (ObjectFunc) Zoness_80191680, gDefaultCubeHitbox100, 1500.0f, 0, 1, 40, 0, 20.0f, 0 }, + /* OBJ_ACTOR_237 */ {(void*) Actor237_Draw, 1, (ObjectFunc) Actor237_Update, gNoHitbox, 200.0f, 0, 0, 40, 0, 0.0f, 2 }, + /* OBJ_ACTOR_238 */ {(void*) Zoness_801914C4, 2, (ObjectFunc) Zoness_80191010, gCubeHitbox100, 200.0f, 0, 1, 40, 0, 1.0f, 1 }, + /* OBJ_ACTOR_239 */ {(void*) NULL, 1, (ObjectFunc) NULL, gNoHitbox, 1000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ACTOR_240 */ {(void*) Zoness_80191B4C, 1, (ObjectFunc) Zoness_80191680, gCubeHitbox100, 1500.0f, 0, 1, 40, 0, 20.0f, 0 }, /* OBJ_ACTOR_241 */ {(void*) Zoness_80191DB0, 1, (ObjectFunc) Zoness_80191BC4, gActor241Hitbox, 1500.0f, 0, 1, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_242 */ {(void*) Zoness_80191FFC, 2, (ObjectFunc) Zoness_80192094, D_ZO_602BE3C, 500.0f, 0, 0, 40, 0, 1.0f, 0 }, - /* OBJ_ACTOR_243 */ {(void*) Zoness_80192C18, 2, (ObjectFunc) Zoness_80192834, gDefaultCubeHitbox100, 0.0f, 0, 1, 40, 0, 1.0f, 1 }, + /* OBJ_ACTOR_243 */ {(void*) Zoness_80192C18, 2, (ObjectFunc) Zoness_80192834, gCubeHitbox100, 0.0f, 0, 1, 40, 0, 1.0f, 1 }, /* OBJ_ACTOR_244 */ {(void*) Zoness_80193240, 2, (ObjectFunc) Zoness_80192E64, D_ZO_602BE58, 2000.0f, 0, 0, 40, 0, 50.0f, 0 }, - /* OBJ_ACTOR_245 */ {(void*) Zoness_8019983C, 1, (ObjectFunc) Zoness_8019969C, gDefaultCubeHitbox100, 200.0f, 0, 0, 40, 0, 1.0f, 0 }, - /* OBJ_ACTOR_246 */ {(void*) Zoness_80199E24, 1, (ObjectFunc) Zoness_80199A28, gDefaultCubeHitbox100, 2000.0f, 0, 0, 40, 0, 1.0f, 0 }, + /* OBJ_ACTOR_245 */ {(void*) Zoness_8019983C, 1, (ObjectFunc) Zoness_8019969C, gCubeHitbox100, 200.0f, 0, 0, 40, 0, 1.0f, 0 }, + /* OBJ_ACTOR_246 */ {(void*) Zoness_80199E24, 1, (ObjectFunc) Zoness_80199A28, gCubeHitbox100, 2000.0f, 0, 0, 40, 0, 1.0f, 0 }, /* OBJ_ACTOR_247 */ {(void*) Zoness_8019D3C4, 1, (ObjectFunc) Zoness_8019D15C, D_ZO_602BFC4, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_248 */ {(void*) Zoness_8019A1FC, 1, (ObjectFunc) Zoness_80199F10, gDefaultCubeHitbox150, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_249 */ {(void*) Zoness_8019ACCC, 1, (ObjectFunc) Zoness_8019A5D4, gDefaultCubeHitbox200, 5000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_248 */ {(void*) Zoness_8019A1FC, 1, (ObjectFunc) Zoness_80199F10, gCubeHitbox150, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_249 */ {(void*) Zoness_8019ACCC, 1, (ObjectFunc) Zoness_8019A5D4, gCubeHitbox200, 5000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_250 */ {(void*) Zoness_8019B7DC, 1, (ObjectFunc) Zoness_8019B548, D_ZO_602C1D4, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_251 */ {(void*) Zoness_8019BDE0, 2, (ObjectFunc) Zoness_8019B854, D_ZO_602C218, 1000.0f, 0, 0, 40, 0, 1.0f, 1 }, /* OBJ_ACTOR_252 */ {(void*) Zoness_8019C1CC, 1, (ObjectFunc) Zoness_8019BE48, D_ZO_602C234, 200.0f, 0, 0, 40, 0, 80.0f, 1 }, @@ -351,13 +351,13 @@ ObjectInfo D_edata_800CC124[0x190] = { /* OBJ_ACTOR_255 */ {(void*) Aquas_801AE168, 1, (ObjectFunc) Aquas_801AD6C0, D_AQ_6030BFC, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_256 */ {(void*) Aquas_801AEB44, 1, (ObjectFunc) Aquas_801AE3D8, D_AQ_6030C18, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_257 */ {(void*) Aquas_801B099C, 1, (ObjectFunc) Aquas_801AFA5C, D_AQ_6030C44, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_258 */ {(void*) Aquas_801B0EC0, 1, (ObjectFunc) Aquas_801B0B60, gDefaultCubeHitbox100, 200.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_258 */ {(void*) Aquas_801B0EC0, 1, (ObjectFunc) Aquas_801B0B60, gCubeHitbox100, 200.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_259 */ {(void*) Aquas_801B619C, 2, (ObjectFunc) Aquas_801B638C, D_AQ_6031398, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_260 */ {(void*) Aquas_801B90DC, 2, (ObjectFunc) Aquas_801B7C78, D_AQ_60313CC, 300.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_261 */ {(void*) Aquas_801B504C, 2, (ObjectFunc) Aquas_801B50E8, D_AQ_6031400, 300.0f, 0, 0, 40, 0, 0.0f, 1 }, /* OBJ_ACTOR_262 */ {(void*) Aquas_801B7A24, 2, (ObjectFunc) Aquas_801B6FF8, D_AQ_603144C, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_263 */ {(void*) Aquas_801BA108, 2, (ObjectFunc) Aquas_801B91A4, D_AQ_6031480, 200.0f, 0, 0, 40, 0, 0.0f, 1 }, - /* OBJ_ACTOR_264 */ {(void*) Aquas_801BA4E4, 1, (ObjectFunc) Aquas_801BA26C, gDefaultCubeHitbox100, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ACTOR_264 */ {(void*) Aquas_801BA4E4, 1, (ObjectFunc) Aquas_801BA26C, gCubeHitbox100, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ACTOR_265 */ {(void*) Aquas_801BAD7C, 1, (ObjectFunc) Aquas_801BA6A4, D_AQ_6031500, 200.0f, 0, 0, 40, 0, 0.0f, 1 }, /* OBJ_ACTOR_266 */ {(void*) Aquas_801BB204, 2, (ObjectFunc) Aquas_801BADF8, D_AQ_6031538, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ACTOR_267 */ {(void*) Aquas_801BC930, 2, (ObjectFunc) Aquas_801BB79C, D_AQ_6031554, 800.0f, 0, 0, 40, 0, 0.0f, 0 }, @@ -367,24 +367,24 @@ ObjectInfo D_edata_800CC124[0x190] = { /* OBJ_ACTOR_271 */ {(void*) Actor271_Draw, 2, (ObjectFunc) Actor271_Update, D_BO_6011B24, 0.0f, 0, 0, 39, 0, 730.0f, 1 }, /* OBJ_ACTOR_272 */ {(void*) Actor272_Draw, 1, (ObjectFunc) Actor272_Update, D_BO_6011BF4, 0.0f, 0, 0, 39, 0, 150.0f, 1 }, /* OBJ_ACTOR_273 */ {(void*) Fortuna_80188FE4, 2, (ObjectFunc) Fortuna_80188AD0, D_FO_600FF30, 0.0f, 0, 0, 39, 0, 220.0f, 1 }, - /* OBJ_ACTOR_274 */ {(void*) SectorZ_8019E3A8, 1, (ObjectFunc) SectorZ_8019E234, gDefaultCubeHitbox200, 0.0f, 0, 0, 39, 0, 1.0f, 0 }, - /* OBJ_ACTOR_275 */ {(void*) Solar_8019F7AC, 1, (ObjectFunc) Solar_8019F20C, gDefaultCubeHitbox100, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_276 */ {(void*) Solar_8019F7AC, 1, (ObjectFunc) Solar_8019F20C, gDefaultCubeHitbox100, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_277 */ {(void*) Solar_8019F7AC, 1, (ObjectFunc) Solar_8019F20C, gDefaultCubeHitbox200, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_278 */ {(void*) NULL, 1, (ObjectFunc) Solar_8019EA7C, gHitboxNone, 200.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* OBJ_ACTOR_279 */ {(void*) NULL, 1, (ObjectFunc) Solar_801A003C, gHitboxNone, 1000.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* OBJ_ACTOR_274 */ {(void*) SectorZ_8019E3A8, 1, (ObjectFunc) SectorZ_8019E234, gCubeHitbox200, 0.0f, 0, 0, 39, 0, 1.0f, 0 }, + /* OBJ_ACTOR_275 */ {(void*) Solar_8019F7AC, 1, (ObjectFunc) Solar_8019F20C, gCubeHitbox100, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_276 */ {(void*) Solar_8019F7AC, 1, (ObjectFunc) Solar_8019F20C, gCubeHitbox100, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_277 */ {(void*) Solar_8019F7AC, 1, (ObjectFunc) Solar_8019F20C, gCubeHitbox200, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_278 */ {(void*) NULL, 1, (ObjectFunc) Solar_8019EA7C, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* OBJ_ACTOR_279 */ {(void*) NULL, 1, (ObjectFunc) Solar_801A003C, gNoHitbox, 1000.0f, 0, 0, 0, 0, 0.0f, 1 }, /* OBJ_ACTOR_280 */ {(void*) D_VE1_900DD20, 0, (ObjectFunc) Venom1_80192518, D_VE1_601B7F8, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, /* OBJ_ACTOR_281 */ {(void*) Venom1_80192E2C, 1, (ObjectFunc) Venom1_80192CD4, D_VE1_601B830, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, /* OBJ_ACTOR_282 */ {(void*) D_VE1_901DA50, 0, (ObjectFunc) Venom1_80192CD4, D_VE1_601B868, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, /* OBJ_ACTOR_283 */ {(void*) D_VE1_9023AD0, 0, (ObjectFunc) Venom1_80192EB0, D_VE1_601B8A0, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, /* OBJ_ACTOR_284 */ {(void*) Venom1_801934D0, 1, (ObjectFunc) Venom1_801933DC, D_VE1_601B8D8, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_285 */ {(void*) Andross_80193244, 1, (ObjectFunc) Andross_80192E94, gDefaultCubeHitbox100, 1000.0f, 0, 0, 20, 0, 1.0f, 1 }, - /* OBJ_ACTOR_286 */ {(void*) Andross_80188660, 1, (ObjectFunc) Andross_80188528, gDefaultCubeHitbox100, 1000.0f, 0, 0, 20, 0, 0.0f, 0 }, - /* OBJ_ACTOR_287 */ {(void*) NULL, 1, (ObjectFunc) Andross_80189724, gHitboxNone, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_288 */ {(void*) NULL, 1, (ObjectFunc) Andross_801893B8, gHitboxNone, 1000.0f, 0, 0, 20, 1, 0.0f, 0 }, - /* OBJ_ACTOR_289 */ {(void*) func_edata_800596B0, 1, (ObjectFunc) Andross_80189470, gHitboxNone, 1000.0f, 0, 0, 20, 1, 0.0f, 0 }, - /* OBJ_ACTOR_290 */ {(void*) NULL, 1, (ObjectFunc) Andross_8018933C, gHitboxNone, 1000.0f, 0, 0, 20, 0, 0.0f, 0 }, - /* OBJ_ACTOR_SUPPLIES */ {(void*) ActorSupplies_Draw, 1, (ObjectFunc) ActorSupplies_Update, gDefaultCubeHitbox150, 1000.0f, 0, 0, 0, 0, 1.0f, 0 }, + /* OBJ_ACTOR_285 */ {(void*) Andross_80193244, 1, (ObjectFunc) Andross_80192E94, gCubeHitbox100, 1000.0f, 0, 0, 20, 0, 1.0f, 1 }, + /* OBJ_ACTOR_286 */ {(void*) Andross_80188660, 1, (ObjectFunc) Andross_80188528, gCubeHitbox100, 1000.0f, 0, 0, 20, 0, 0.0f, 0 }, + /* OBJ_ACTOR_287 */ {(void*) NULL, 1, (ObjectFunc) Andross_80189724, gNoHitbox, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_288 */ {(void*) NULL, 1, (ObjectFunc) Andross_801893B8, gNoHitbox, 1000.0f, 0, 0, 20, 1, 0.0f, 0 }, + /* OBJ_ACTOR_289 */ {(void*) func_edata_800596B0, 1, (ObjectFunc) Andross_80189470, gNoHitbox, 1000.0f, 0, 0, 20, 1, 0.0f, 0 }, + /* OBJ_ACTOR_290 */ {(void*) NULL, 1, (ObjectFunc) Andross_8018933C, gNoHitbox, 1000.0f, 0, 0, 20, 0, 0.0f, 0 }, + /* OBJ_ACTOR_SUPPLIES */ {(void*) ActorSupplies_Draw, 1, (ObjectFunc) ActorSupplies_Update, gCubeHitbox150, 1000.0f, 0, 0, 0, 0, 1.0f, 0 }, /* OBJ_BOSS_292 */ {(void*) Corneria_8018AA74, 2, (ObjectFunc) Corneria_80189058, D_CO_603E620, 20000.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_293 */ {(void*) Corneria_8018ECAC, 1, (ObjectFunc) Corneria_8018C19C, D_CO_603E840, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_294 */ {(void*) Corneria_8018ED78, 1, (ObjectFunc) Corneria_8018DDAC, D_CO_603E714, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, @@ -392,8 +392,8 @@ ObjectInfo D_edata_800CC124[0x190] = { /* OBJ_BOSS_296 */ {(void*) Corneria_8018EF90, 1, (ObjectFunc) Corneria_8018E76C, D_CO_603E7C4, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_297 */ {(void*) Meteo_8018BACC, 1, (ObjectFunc) Meteo_8018978C, D_ME_602F75C, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_298 */ {(void*) Meteo_801887D0, 1, (ObjectFunc) Meteo_80188344, D_ME_602FA50, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_299 */ {(void*) Boss299_Draw, 2, (ObjectFunc) Boss299_Update, gHitboxNone, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_300 */ {(void*) Boss300_Draw, 1, (ObjectFunc) Boss300_Update, gHitboxNone, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_299 */ {(void*) Boss299_Draw, 2, (ObjectFunc) Boss299_Update, gNoHitbox, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_300 */ {(void*) Boss300_Draw, 1, (ObjectFunc) Boss300_Update, gNoHitbox, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_301 */ {(void*) Aquas_801BEC5C, 1, (ObjectFunc) Aquas_801BEC50, D_AQ_6030B10, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_A6 */ {(void*) Area6_8018C54C, 1, (ObjectFunc) Area6_80187944, D_A6_6028454, 2000.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_303 */ {(void*) SectorX_80193434, 2, (ObjectFunc) SectorX_80190078, D_SX_6032550, 20000.0f, 0, 0, 20, 0, 0.0f, 10 }, @@ -402,13 +402,13 @@ ObjectInfo D_edata_800CC124[0x190] = { /* OBJ_BOSS_306 */ {(void*) Titania_801982A8, 1, (ObjectFunc) Titania_80197A94,D_TI_801B83A8, 1000.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_ZO */ {(void*) Zoness_801949DC, 2, (ObjectFunc) Zoness_80194A84, D_ZO_602C044, 1000.0f, 0, 0, 40, 0, 1.0f, 10 }, /* OBJ_BOSS_308 */ {(void*) func_hud_8008FE78, 1, (ObjectFunc) func_hud_800907C4, D_FO_600FFE0, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, - /* OBJ_BOSS_309 */ {(void*) Boss309_Draw, 1, (ObjectFunc) Boss309_Update, gHitboxNone, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, - /* OBJ_BOSS_310 */ {(void*) Boss310_Draw, 1, (ObjectFunc) Boss310_Update, gHitboxNone, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, + /* OBJ_BOSS_309 */ {(void*) Boss309_Draw, 1, (ObjectFunc) Boss309_Update, gNoHitbox, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, + /* OBJ_BOSS_310 */ {(void*) Boss310_Draw, 1, (ObjectFunc) Boss310_Update, gNoHitbox, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_311 */ {(void*) Bolse_80191AFC, 2, (ObjectFunc) Bolse_801912FC, D_BO_6011C80, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_312 */ {(void*) Venom2_80196288, 2, (ObjectFunc) Venom2_80196210, D_VE2_60166F4, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_313 */ {(void*) SectorZ_8019E98C, 1, (ObjectFunc) SectorZ_8019E454, D_SZ_6009388, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_314 */ {(void*) SectorY_8019E2C4, 2, (ObjectFunc) SectorY_8019C888, gHitboxNone, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_SO */ {(void*) Solar_801A71B8, 2, (ObjectFunc) Solar_801A5B3C, gHitboxNone, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_314 */ {(void*) SectorY_8019E2C4, 2, (ObjectFunc) SectorY_8019C888, gNoHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_SO */ {(void*) Solar_801A71B8, 2, (ObjectFunc) Solar_801A5B3C, gNoHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_316 */ {(void*) Katina_801968F4, 1, (ObjectFunc) Katina_801946C4, D_KA_6011058, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_317 */ {(void*) Katina_80193B1C, 1, (ObjectFunc) Katina_80193718, D_KA_601115C, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_AQ */ {(void*) Aquas_801B4D84, 2, (ObjectFunc) Aquas_801B134C, D_AQ_6030F74, 10000.0f, 0, 0, 40, 0, 0.0f, 10 }, @@ -421,14 +421,14 @@ ObjectInfo D_edata_800CC124[0x190] = { /* OBJ_ITEM_SILVER_STAR */ {(void*) ItemSilverStar_Draw, 1, (ObjectFunc) ItemSilverStar_Update, gItemSupplyRingHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ITEM_METEO_WARP */ {(void*) ItemMeteoWarp_Draw, 1, (ObjectFunc) ItemMeteoWarp_Update, gMeteoWarpHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ITEM_BOMB */ {(void*) ItemBomb_Draw, 1, (ObjectFunc) ItemPickup_Update, gItemBombHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ITEM_PATH_SPLIT_X */ {(void*) NULL, 1, (ObjectFunc) ItemPathChange_Update, D_edata_800CBF8C, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ITEM_PATH_TURN_LEFT */ {(void*) NULL, 1, (ObjectFunc) ItemPathChange_Update, D_edata_800CBF8C, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ITEM_PATH_TURN_RIGHT */ {(void*) NULL, 1, (ObjectFunc) ItemPathChange_Update, D_edata_800CBF8C, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ITEM_PATH_SPLIT_Y */ {(void*) NULL, 1, (ObjectFunc) ItemPathChange_Update, D_edata_800CBF8C, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ITEM_PATH_TURN_UP */ {(void*) NULL, 1, (ObjectFunc) ItemPathChange_Update, D_edata_800CBF8C, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ITEM_PATH_TURN_DOWN */ {(void*) NULL, 1, (ObjectFunc) ItemPathChange_Update, D_edata_800CBF8C, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ITEM_PATH_SPLIT_X */ {(void*) NULL, 1, (ObjectFunc) ItemPathChange_Update, gItemPathChangeHitbox, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ITEM_PATH_TURN_LEFT */ {(void*) NULL, 1, (ObjectFunc) ItemPathChange_Update, gItemPathChangeHitbox, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ITEM_PATH_TURN_RIGHT */ {(void*) NULL, 1, (ObjectFunc) ItemPathChange_Update, gItemPathChangeHitbox, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ITEM_PATH_SPLIT_Y */ {(void*) NULL, 1, (ObjectFunc) ItemPathChange_Update, gItemPathChangeHitbox, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ITEM_PATH_TURN_UP */ {(void*) NULL, 1, (ObjectFunc) ItemPathChange_Update, gItemPathChangeHitbox, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ITEM_PATH_TURN_DOWN */ {(void*) NULL, 1, (ObjectFunc) ItemPathChange_Update, gItemPathChangeHitbox, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ITEM_RING_CHECK */ {(void*) NULL, 1, (ObjectFunc) ItemRingCheck_Update, gItemRingCheckHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ITEM_1UP */ {(void*) D_1022120, 0, (ObjectFunc) Item1up_Update, gDefaultCubeHitbox100, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ITEM_1UP */ {(void*) D_1022120, 0, (ObjectFunc) Item1up_Update, gCubeHitbox100, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ITEM_GOLD_RING */ {(void*) ItemGoldRing_Draw, 1, (ObjectFunc) ItemGoldRing_Update, gItemSupplyRingHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ITEM_WING_REPAIR */ {(void*) D_arwing_3007650, 0, (ObjectFunc) ItemWingRepair_Update, gItemLasersHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ITEM_TRAINING_RING */ {(void*) gItemTrainingRingDL, 0, (ObjectFunc) Training_ItemRing_Update, D_TR_6009CFC, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, diff --git a/src/engine/fox_edisplay.c b/src/engine/fox_edisplay.c index e2671bbe..c6218e05 100644 --- a/src/engine/fox_edisplay.c +++ b/src/engine/fox_edisplay.c @@ -98,15 +98,15 @@ void Actor202_Draw(Actor202* this) { Animation_DrawSkeleton(1, D_ME_601E9D0, sp30, NULL, func_edisplay_800599A4, &this->index, &gIdentityMatrix); } -void Obj39_Draw(Object80_39* this) { +void Obj39_Draw(Scenery_39* this) { gSPDisplayList(gMasterDisp++, D_ME_601AE40); } -void func_edisplay_80059B20(Object_80* obj80) { - if (obj80->obj.id == OBJ_80_29) { +void func_edisplay_80059B20(Scenery* scenery) { + if (scenery->obj.id == OBJ_SCENERY_29) { gSPDisplayList(gMasterDisp++, D_TI1_7007350); } else { - Graphics_SetScaleMtx(D_edisplay_800CF9B0[obj80->obj.id + 2]); + Graphics_SetScaleMtx(D_edisplay_800CF9B0[scenery->obj.id + 2]); gSPDisplayList(gMasterDisp++, D_TI1_700BB10); } } @@ -114,7 +114,7 @@ void func_edisplay_80059B20(Object_80* obj80) { void func_edisplay_80059BB0(void* arg0) { } -void Obj42_Draw(Object80_42* this) { +void Obj42_Draw(Scenery_42* this) { gSPDisplayList(gMasterDisp++, D_CO_6023AC0); } @@ -134,33 +134,33 @@ void FogShadow_Draw(FogShadow* this) { RCP_SetupDL_47(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 180); switch (this->unk_45) { - case OBJ_80_0: + case OBJ_SCENERY_0: Matrix_Scale(gGfxMatrix, 2.0f, 1.0f, 0.7f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_6034B90); break; - case OBJ_80_21: + case OBJ_SCENERY_21: Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.7f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_6034B90); break; - case OBJ_80_6: - case OBJ_80_7: + case OBJ_SCENERY_6: + case OBJ_SCENERY_7: Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 10.55f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_Gfx_800DAC20); break; - case OBJ_80_56: + case OBJ_SCENERY_56: Matrix_Scale(gGfxMatrix, 1.6f, 1.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_6034B90); break; - case OBJ_80_20: + case OBJ_SCENERY_20: Matrix_Scale(gGfxMatrix, 1.2f, 1.0f, 1.3f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_6034B90); break; - case OBJ_80_22: + case OBJ_SCENERY_22: Matrix_Scale(gGfxMatrix, 2.2f, 1.0f, 1.4f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_6034B90); @@ -169,13 +169,13 @@ void FogShadow_Draw(FogShadow* this) { RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } -void func_edisplay_80059F68(Object_80* obj80) { +void func_edisplay_80059F68(Scenery* scenery) { Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -95.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_602DA20); } -void func_edisplay_80059FDC(Object_80* obj80) { +void func_edisplay_80059FDC(Scenery* scenery) { gSPDisplayList(gMasterDisp++, D_CO_6035DA0); } @@ -940,13 +940,13 @@ void func_edisplay_8005D3CC(Object* obj, f32 xRot, f32 yRot, f32 zRot, s32 drawT } } -void Object_80_Draw(Object_80* this, s32 arg1) { +void Scenery_Draw(Scenery* this, s32 arg1) { this->obj.pos.y += gCameraShakeY; func_edisplay_8005D008(&this->obj, this->info.drawType); this->obj.pos.y -= gCameraShakeY; if (this->info.drawType == 0) { - if ((this->obj.id == OBJ_80_19) || (this->obj.id == OBJ_80_55) || (this->obj.id == OBJ_80_9) || - (this->obj.id == OBJ_80_50)) { + if ((this->obj.id == OBJ_SCENERY_19) || (this->obj.id == OBJ_SCENERY_55) || (this->obj.id == OBJ_SCENERY_9) || + (this->obj.id == OBJ_SCENERY_50)) { RCP_SetupDL_57(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); if (arg1 < 0) { @@ -955,7 +955,7 @@ void Object_80_Draw(Object_80* this, s32 arg1) { gSPDisplayList(gMasterDisp++, this->info.dList); RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } else { - if (this->obj.id == OBJ_80_8) { + if (this->obj.id == OBJ_SCENERY_8) { if (arg1 < 0) { return; // weird control flow } @@ -966,7 +966,7 @@ void Object_80_Draw(Object_80* this, s32 arg1) { func_edisplay_800596C0(); } gSPDisplayList(gMasterDisp++, this->info.dList); - if (this->obj.id == OBJ_80_8) { + if (this->obj.id == OBJ_SCENERY_8) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } } @@ -1026,11 +1026,11 @@ void Actor_DrawOnRails(Actor* this) { Matrix_MultVec3f(gGfxMatrix, &sp34, &gTeamArrowsViewPos[this->aiType]); } } - if ((this->timer_0CA[0] != 0) && (gReflectY > 0)) { + if ((this->lockOnTimers[0] != 0) && (gReflectY > 0)) { sp34.y += this->info.unk_1C; Matrix_MultVec3f(gGfxMatrix, &sp34, &D_display_80161578[0]); if (D_display_80161578[0].z > -200.0f) { - this->timer_0CA[0] = 0; + this->lockOnTimers[0] = 0; } } } @@ -1113,17 +1113,17 @@ void Actor_DrawAllRange(Actor* this) { } } if (D_edisplay_801615EC == 0) { - this->timer_0CA[gPlayerNum] = 0; + this->lockOnTimers[gPlayerNum] = 0; if ((this->obj.id == OBJ_ACTOR_189) || (this->obj.id == OBJ_ACTOR_286)) { Object_Kill(&this->obj, this->sfxSource); } } for (var_v1 = 0; var_v1 < gCamCount; var_v1++) { - if (this->timer_0CA[var_v1] != 0) { + if (this->lockOnTimers[var_v1] != 0) { D_display_80161578[var_v1] = D_edisplay_801615E0; D_display_80161578[var_v1].y += this->info.unk_1C; if ((var_v1 == gPlayerNum) && (D_display_80161578[var_v1].z > -300.0f)) { - this->timer_0CA[var_v1] = 0; + this->lockOnTimers[var_v1] = 0; } } } @@ -1171,7 +1171,7 @@ void Boss_Draw(Boss* this, s32 arg1) { sp3C = 1.0f; if (this->obj.id != OBJ_BOSS_309) { if (this->obj.id != OBJ_BOSS_316) { - func_edisplay_8005F670(&this->obj.pos); + Display_SetSecondLight(&this->obj.pos); } if (this->info.drawType != 2) { Matrix_SetGfxMtx(&gMasterDisp); @@ -1187,7 +1187,7 @@ void Boss_Draw(Boss* this, s32 arg1) { D_edisplay_801615D0.y = sp3C; if (this->obj.id == OBJ_BOSS_309) { this->vwork[30] = D_edisplay_801615D0; - func_edisplay_8005F670(&this->obj.pos); + Display_SetSecondLight(&this->obj.pos); Matrix_SetGfxMtx(&gMasterDisp); this->info.draw(&this->obj); } @@ -1321,19 +1321,19 @@ void Object_DrawShadow(s32 index, Object* obj) { } else { switch (obj->id) { case OBJ_ACTOR_230: - Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundLevel + 2.0f + gActors[index].fwork[1], + Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundHeight + 2.0f + gActors[index].fwork[1], obj->pos.z + D_ctx_80177D20, MTXF_APPLY); break; case OBJ_ACTOR_229: case OBJ_ACTOR_231: - Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundLevel + 2.0f + gActors[index].fwork[0], + Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundHeight + 2.0f + gActors[index].fwork[0], obj->pos.z + D_ctx_80177D20, MTXF_APPLY); break; case OBJ_BOSS_316: - Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundLevel + 2.0f + gCameraShakeY, obj->pos.z, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundHeight + 2.0f + gCameraShakeY, obj->pos.z, MTXF_APPLY); break; default: - Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundLevel + 2.0f, obj->pos.z + D_ctx_80177D20, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundHeight + 2.0f, obj->pos.z + D_ctx_80177D20, MTXF_APPLY); break; } if ((D_ctx_801784AC != 4) || (obj->id == OBJ_ACTOR_EVENT) || (obj->id == OBJ_ACTOR_195) || @@ -1419,7 +1419,7 @@ void func_edisplay_8005F290(f32* sfxSrc, Vec3f* pos) { Object_ClampSfxSource(sfxSrc); } -void Object_58_Draw(Object_58* this) { +void Scenery360_Draw(Scenery360* this) { Vec3f sp54 = { 0.0f, 0.0f, 0.0f }; Vec3f sp48; f32 sp44 = 1000.0f; @@ -1427,14 +1427,14 @@ void Object_58_Draw(Object_58* this) { f32 sp3C = 2000.0f; f32 sp38 = 0.5f; - if (this->obj.id == OBJ_80_156) { + if (this->obj.id == OBJ_SCENERY_156) { sp44 = 4000.0f; sp40 = -13000.0f; sp3C = 4500.0f; } else if (gCurrentLevel == LEVEL_VENOM_ANDROSS) { sp40 = -20000.0f; sp38 = 0.4f; - } else if (this->obj.id == OBJ_80_143) { + } else if (this->obj.id == OBJ_SCENERY_143) { sp44 = 6000.0f; sp40 = -20000.0f; sp3C = 6000.0f; @@ -1449,8 +1449,8 @@ void Object_58_Draw(Object_58* this) { if ((sp48.z < sp44) && (sp40 < sp48.z)) { if (fabsf(sp48.y) < (fabsf(sp48.z * sp38) + sp3C)) { if (fabsf(sp48.x) < (fabsf(sp48.z * sp38) + sp3C)) { - func_edisplay_8005F670(&this->obj.pos); - if (this->obj.id == OBJ_80_131) { + Display_SetSecondLight(&this->obj.pos); + if (this->obj.id == OBJ_SCENERY_131) { Matrix_RotateY(gGfxMatrix, this->obj.rot.y * M_DTOR, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); @@ -1468,7 +1468,7 @@ void Object_58_Draw(Object_58* this) { } } -void func_edisplay_8005F670(Vec3f* pos) { +void Display_SetSecondLight(Vec3f* pos) { Vec3f sp9C; f32 sp98; f32 sp94; @@ -1481,10 +1481,10 @@ void func_edisplay_8005F670(Vec3f* pos) { f32 temp3; f32 pad; - if (D_ctx_8017836C > 0.01f) { - sp9C.x = pos->x - D_ctx_80178370; - sp9C.y = pos->y - D_ctx_80178374; - sp9C.z = pos->z - D_ctx_80178378; + if (gLight3Brightness > 0.01f) { + sp9C.x = pos->x - gLight3x; + sp9C.y = pos->y - gLight3y; + sp9C.z = pos->z - gLight3z; temp_fv0 = VEC3F_MAG(&sp9C); if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) { var_fs0 = 700.0f / temp_fv0; @@ -1509,9 +1509,9 @@ void func_edisplay_8005F670(Vec3f* pos) { sp6C.z = -100.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp6C, &sp84); Matrix_Pop(&gCalcMatrix); - temp1 = D_ctx_80178360 * D_ctx_8017836C * var_fs0; - temp2 = D_ctx_80178364 * D_ctx_8017836C * var_fs0; - temp3 = D_ctx_80178368 * D_ctx_8017836C * var_fs0; + temp1 = gLight3R * gLight3Brightness * var_fs0; + temp2 = gLight3G * gLight3Brightness * var_fs0; + temp3 = gLight3B * gLight3Brightness * var_fs0; Lights_SetTwoLights(&gMasterDisp, gLight1x, gLight1y, gLight1z, sp84.x, sp84.y, sp84.z, gLight1R, gLight1G, gLight1B, temp1, temp2, temp3, gAmbientR, gAmbientG, gAmbientB); } @@ -1544,40 +1544,40 @@ void Object_DrawAll(s32 arg0) { Actor* actor; Boss* boss; Sprite* sprite; - Object_58* obj58; + Scenery360* scenery360; Item* item; - Object_80* obj80; + Scenery* scenery; if ((gLevelMode == LEVELMODE_ALL_RANGE) && (gCurrentLevel != LEVEL_KATINA)) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); if (D_ctx_80177AB0 == 5) { gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); } - for (i = 0, obj58 = gObjects58; i < 200; i++, obj58++) { - if ((obj58->obj.status == OBJ_ACTIVE) && (obj58->obj.id != OBJ_80_147)) { + for (i = 0, scenery360 = gScenery360; i < 200; i++, scenery360++) { + if ((scenery360->obj.status == OBJ_ACTIVE) && (scenery360->obj.id != OBJ_SCENERY_147)) { if (gCurrentLevel == LEVEL_BOLSE) { - spAC.x = obj58->sfxSource[0]; - spAC.y = obj58->sfxSource[1]; - spAC.z = obj58->sfxSource[2]; - Matrix_MultVec3fNoTranslate(&D_BO_8019EE80, &spAC, &obj58->obj.pos); - obj58->obj.rot.y = obj58->unk_54 + gBosses->obj.rot.y; + spAC.x = scenery360->sfxSource[0]; + spAC.y = scenery360->sfxSource[1]; + spAC.z = scenery360->sfxSource[2]; + Matrix_MultVec3fNoTranslate(&D_BO_8019EE80, &spAC, &scenery360->obj.pos); + scenery360->obj.rot.y = scenery360->unk_54 + gBosses->obj.rot.y; } Matrix_Push(&gGfxMatrix); - Object_58_Draw(obj58); + Scenery360_Draw(scenery360); Matrix_Pop(&gGfxMatrix); } } } else { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); - for (i = 0, obj80 = gObjects80; i < ARRAY_COUNT(gObjects80); i++, obj80++) { - if (obj80->obj.status >= OBJ_ACTIVE) { + for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) { + if (scenery->obj.status >= OBJ_ACTIVE) { if (arg0 > 0) { - func_edisplay_8005F670(&obj80->obj.pos); + Display_SetSecondLight(&scenery->obj.pos); } Matrix_Push(&gGfxMatrix); - Object_80_Draw(obj80, arg0); + Scenery_Draw(scenery, arg0); Matrix_Pop(&gGfxMatrix); - func_edisplay_8005F1EC(obj80->sfxSource); + func_edisplay_8005F1EC(scenery->sfxSource); } } } @@ -1636,7 +1636,7 @@ void Object_DrawAll(s32 arg0) { Matrix_Push(&gGfxMatrix); if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) || (gCurrentLevel == LEVEL_AQUAS)) { - func_edisplay_8005F670(&actor->obj.pos); + Display_SetSecondLight(&actor->obj.pos); } func_edisplay_800597C0(arg0); Actor_DrawOnRails(actor); diff --git a/src/engine/fox_effect.c b/src/engine/fox_effect.c index 616d3fbc..c7ddbfeb 100644 --- a/src/engine/fox_effect.c +++ b/src/engine/fox_effect.c @@ -663,14 +663,14 @@ void func_effect_80079618(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { void func_effect_8007968C(Effect* effect) { if ((gCurrentLevel != LEVEL_MACBETH) || (effect->unk_44 != 7)) { - if ((effect->timer_50 == 0) || (effect->obj.pos.y < gGroundLevel)) { + if ((effect->timer_50 == 0) || (effect->obj.pos.y < gGroundHeight)) { Object_Kill(&effect->obj, effect->sfxSource); } } else { if (((gGameFrameCount % 4) == 0)) { func_effect_8007D2C8(effect->obj.pos.x, effect->obj.pos.y + 550.0f, effect->obj.pos.z, 10.0f); } - if ((effect->timer_50 == 0) || (effect->obj.pos.y < (gGroundLevel - 100.0f))) { + if ((effect->timer_50 == 0) || (effect->obj.pos.y < (gGroundHeight - 100.0f))) { Object_Kill(&effect->obj, effect->sfxSource); } } @@ -712,7 +712,7 @@ void func_effect_800798F0(Effect* effect) { Vec3f frameJointTable[50]; if ((gCurrentLevel == LEVEL_BOLSE) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { - func_edisplay_8005F670(&effect->obj.pos); + Display_SetSecondLight(&effect->obj.pos); } RCP_SetupDL(&gMasterDisp, 0x1D); @@ -1041,7 +1041,7 @@ void func_effect_8007A994(Effect* effect) { effect->unk_4A++; } -static Gfx* D_800D178C[] = { D_TI_6003440, D_TI_60034E0, D_TI_6003580, D_TI_6003620, D_TI_60036C0, D_TR_6003760 }; +static Gfx* D_800D178C[] = { D_TI_6003440, D_TI_60034E0, D_TI_6003580, D_TI_6003620, D_TI_60036C0, D_TI_6003760 }; void func_effect_8007AA60(Effect* effect) { RCP_SetupDL(&gMasterDisp, 0x44); @@ -1076,7 +1076,7 @@ void func_effect_8007AC0C(Effect* effect, f32 xPos, f32 unused_posY, f32 zPos, f effect->obj.id = OBJ_EFFECT_372; effect->obj.pos.x = xPos; - effect->obj.pos.y = gGroundLevel; + effect->obj.pos.y = gGroundHeight; effect->obj.pos.z = zPos; effect->unk_44 = 180; @@ -1106,7 +1106,7 @@ void func_effect_8007AD58(Effect* effect, f32 xPos, f32 unused_posY, f32 zPos, f effect->state = 1; effect->obj.pos.x = xPos; - effect->obj.pos.y = gGroundLevel; + effect->obj.pos.y = gGroundHeight; effect->obj.pos.z = zPos; effect->unk_44 = 180; @@ -2005,14 +2005,14 @@ void func_effect_8007D2F4(Effect* effect) { } effect->unk_44 -= 15; } - if (D_ctx_8017836C < effect->scale1) { - D_ctx_8017836C = effect->scale1; - D_ctx_80178370 = effect->obj.pos.x; - D_ctx_80178374 = effect->obj.pos.y; - D_ctx_80178378 = effect->obj.pos.z; - D_ctx_80178360 = 255; - D_ctx_80178364 = 50; - D_ctx_80178368 = 0; + if (gLight3Brightness < effect->scale1) { + gLight3Brightness = effect->scale1; + gLight3x = effect->obj.pos.x; + gLight3y = effect->obj.pos.y; + gLight3z = effect->obj.pos.z; + gLight3R = 255; + gLight3G = 50; + gLight3B = 0; } Math_SmoothStepToF(&effect->scale1, 0.0f, 1.0f, 0.05f, 0.0f); } @@ -2093,14 +2093,14 @@ void func_effect_8007D748(Effect* effect) { } effect->unk_44 -= 15; } - if (D_ctx_8017836C < effect->scale1) { - D_ctx_8017836C = effect->scale1; - D_ctx_80178370 = effect->obj.pos.x; - D_ctx_80178374 = effect->obj.pos.y; - D_ctx_80178378 = effect->obj.pos.z; - D_ctx_80178360 = 255; - D_ctx_80178364 = 50; - D_ctx_80178368 = 0; + if (gLight3Brightness < effect->scale1) { + gLight3Brightness = effect->scale1; + gLight3x = effect->obj.pos.x; + gLight3y = effect->obj.pos.y; + gLight3z = effect->obj.pos.z; + gLight3R = 255; + gLight3G = 50; + gLight3B = 0; } Math_SmoothStepToF(&effect->scale1, 0, 1.0f, 0.1f, 0.0f); } @@ -2175,10 +2175,10 @@ void func_effect_8007DB70(Effect* effect) { case 0: effect->vel.y -= 0.5f; if ((effect->timer_50 == 0) && ((Object_CheckCollision(1000, &effect->obj.pos, &sp54, 1) != 0) || - (effect->obj.pos.y < (gGroundLevel + 10.0f)))) { + (effect->obj.pos.y < (gGroundHeight + 10.0f)))) { effect->vel.y = 0.0f; - if (effect->obj.pos.y < (gGroundLevel + 10.0f)) { - effect->obj.pos.y = gGroundLevel; + if (effect->obj.pos.y < (gGroundHeight + 10.0f)) { + effect->obj.pos.y = gGroundHeight; } effect->state = 1; effect->timer_50 = 30; @@ -2189,7 +2189,7 @@ void func_effect_8007DB70(Effect* effect) { func_effect_8007D0E0(effect->obj.pos.x, effect->obj.pos.y + 30.0f, effect->obj.pos.z, 7.0f); func_effect_8007BFFC(effect->obj.pos.x, effect->obj.pos.y + 30.0f, effect->obj.pos.z, 0.0f, 0.0f, 0.0f, 4.0f, 5); - if ((effect->obj.pos.y < (gGroundLevel + 10.0f)) || (gGroundType != GROUNDTYPE_WATER)) { + if ((effect->obj.pos.y < (gGroundHeight + 10.0f)) || (gGroundType != GROUNDTYPE_WATER)) { func_beam_800365E4(effect->obj.pos.x, 3.0f, effect->obj.pos.z, effect->obj.pos.x, effect->obj.pos.z, 0.0f, 0.0f, 90.0f, 5.0f, 0, 0); break; @@ -2614,7 +2614,7 @@ void func_effect_8007F2FC(Effect* effect) { Object_Kill(&effect->obj, effect->sfxSource); } - if ((effect->obj.pos.y < gGroundLevel) && (gLevelType == LEVELTYPE_PLANET)) { + if ((effect->obj.pos.y < gGroundHeight) && (gLevelType == LEVELTYPE_PLANET)) { Object_Kill(&effect->obj, effect->sfxSource); } @@ -2720,7 +2720,7 @@ void func_effect_8007F6B0(Effect* effect) { temp = (i * 10.0f * M_DTOR) + randfloat; sin = __sinf(temp) * effect->scale2 * 8.0f; cos = __cosf(temp) * effect->scale2 * 8.0f; - yPos = gGroundLevel + 40.0f; + yPos = gGroundHeight + 40.0f; if (D_ctx_801784AC == 4) { Ground_801B6E20(effect->obj.pos.x + sin, effect->obj.pos.z + cos + D_ctx_80177D20, &x, &y, &z); @@ -2767,7 +2767,7 @@ void func_effect_8007F958(Effect* effect) { temp = (i * 72.0f * M_DTOR) + randFloat; sin = __sinf(temp) * effect->scale2 * 16.0f; cos = __cosf(temp) * effect->scale2 * 16.0f; - yPos = gGroundLevel + 10.0f; + yPos = gGroundHeight + 10.0f; if (D_ctx_801784AC == 4) { Ground_801B6E20(effect->obj.pos.x + sin, effect->obj.pos.z + cos + D_ctx_80177D20, &x, &y, &z); @@ -2808,7 +2808,7 @@ void func_effect_8007FBE0(Effect* effect) { temp = (i * 36.0f * M_DTOR) + randFloat; sin = __sinf(temp) * effect->scale2 * 16.0f; cos = __cosf(temp) * effect->scale2 * 16.0f; - yPos = gGroundLevel + 10.0f; + yPos = gGroundHeight + 10.0f; func_effect_8007BC7C(effect->obj.pos.x + sin, yPos, effect->obj.pos.z + cos, 12.0f); } } @@ -2899,10 +2899,10 @@ void func_effect_8007FE88(Effect* effect) { if (Ground_801B6AEC(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z + D_ctx_80177D20) != 0) { Object_Kill(&effect->obj, effect->sfxSource); } - } else if (effect->obj.pos.y < gGroundLevel) { + } else if (effect->obj.pos.y < gGroundHeight) { Object_Kill(&effect->obj, effect->sfxSource); if (gGroundType != GROUNDTYPE_WATER) { - effect->obj.pos.y = gGroundLevel; + effect->obj.pos.y = gGroundHeight; func_effect_8007D074(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 2.0f); } } @@ -3030,10 +3030,10 @@ void func_effect_8008040C(Effect* effect) { 0) { Object_Kill(&effect->obj, effect->sfxSource); } - } else if (effect->obj.pos.y < gGroundLevel) { + } else if (effect->obj.pos.y < gGroundHeight) { Object_Kill(&effect->obj, effect->sfxSource); if (gGroundType != GROUNDTYPE_WATER) { - effect->obj.pos.y = gGroundLevel; + effect->obj.pos.y = gGroundHeight; func_effect_8007D074(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 2.0f); } } @@ -3116,7 +3116,7 @@ void func_effect_80080ACC(Effect* effect) { effect->obj.rot.x += effect->unk_60.x; effect->obj.rot.y += effect->unk_60.y; effect->obj.rot.z += effect->unk_60.z; - if ((effect->unk_44 == 0) && (effect->obj.pos.y < gGroundLevel)) { + if ((effect->unk_44 == 0) && (effect->obj.pos.y < gGroundHeight)) { Object_Kill(&effect->obj, effect->sfxSource); } if (effect->unk_44 != 0) { @@ -3624,7 +3624,7 @@ void func_effect_80081C5C(Effect* effect) { effect->obj.rot.y += effect->unk_60.y; effect->obj.rot.z += effect->unk_60.z; effect->vel.y -= 0.5f; - if ((effect->timer_50 == 0) || (effect->obj.pos.y < gGroundLevel)) { + if ((effect->timer_50 == 0) || (effect->obj.pos.y < gGroundHeight)) { Object_Kill(&effect->obj, effect->sfxSource); } break; diff --git a/src/engine/fox_enmy.c b/src/engine/fox_enmy.c index a1fbbd06..a277bb15 100644 --- a/src/engine/fox_enmy.c +++ b/src/engine/fox_enmy.c @@ -29,7 +29,7 @@ ObjectInit* gLevelObjectInits[] = { D_FO_600EAD4, NULL, D_KA_6011044, D_BO_600FF74, D_SZ_6006EB4, D_VE2_6014D94, D_versus_302DE3C, }; static s32 D_enmy_800CFDF4[] = { - /* 0 */ OBJ_80_0, + /* 0 */ OBJ_SCENERY_0, /* 1 */ OBJ_ITEM_SILVER_RING, /* 2 */ OBJ_ITEM_SILVER_RING, /* 3 */ OBJ_ITEM_SILVER_RING, @@ -53,7 +53,7 @@ static s32 D_enmy_800CFDF4[] = { /* 21 */ OBJ_ITEM_SILVER_RING, /* 22 */ OBJ_ITEM_SILVER_RING, /* 23 */ OBJ_ITEM_WING_REPAIR, - /* 24 */ OBJ_80_0, + /* 24 */ OBJ_SCENERY_0, /* 25 */ OBJ_ITEM_SILVER_STAR, }; static f32 D_enmy_800CFE5C[] = { @@ -139,11 +139,11 @@ void Object_SetInfo(ObjectInfo* info, u32 objId) { } } -void Object_80_Initialize(Object_80* obj80) { +void Scenery_Initialize(Scenery* scenery) { s32 i; - u8* ptr = (u8*) obj80; + u8* ptr = (u8*) scenery; - for (i = 0; i < sizeof(Object_80); i++, ptr++) { + for (i = 0; i < sizeof(Scenery); i++, ptr++) { *ptr = 0; } } @@ -196,18 +196,18 @@ void Effect_Initialize(Effect* effect) { effect->scale2 = 1.0f; } -void Object_80_Load(Object_80* obj80, ObjectInit* objInit) { - Object_80_Initialize(obj80); - obj80->obj.status = OBJ_INIT; - obj80->obj.pos.z = -objInit->zPos1; - obj80->obj.pos.z += -3000.0f + objInit->zPos2; - obj80->obj.pos.x = objInit->xPos; - obj80->obj.pos.y = objInit->yPos; - obj80->obj.rot.x = objInit->rot.x; - obj80->obj.rot.y = objInit->rot.y; - obj80->obj.rot.z = objInit->rot.z; - obj80->obj.id = objInit->id; - Object_SetInfo(&obj80->info, obj80->obj.id); +void Scenery_Load(Scenery* scenery, ObjectInit* objInit) { + Scenery_Initialize(scenery); + scenery->obj.status = OBJ_INIT; + scenery->obj.pos.z = -objInit->zPos1; + scenery->obj.pos.z += -3000.0f + objInit->zPos2; + scenery->obj.pos.x = objInit->xPos; + scenery->obj.pos.y = objInit->yPos; + scenery->obj.rot.x = objInit->rot.x; + scenery->obj.rot.y = objInit->rot.y; + scenery->obj.rot.z = objInit->rot.z; + scenery->obj.id = objInit->id; + Object_SetInfo(&scenery->info, scenery->obj.id); } void Sprite_Load(Sprite* sprite, ObjectInit* objInit) { @@ -319,7 +319,7 @@ void func_enmy_80061B68(void) { x = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(2000.0f) + (5.0f * gPlayer[0].vel.x); y = 0; - while (y <= gGroundLevel) { + while (y <= gGroundHeight) { y = gPlayer[0].pos.y + RAND_FLOAT_CENTERED(2000.0f) + (5.0f * gPlayer[0].vel.y); } z = -D_ctx_80177D20 - 3000.0f; @@ -411,9 +411,9 @@ void Object_Load(ObjectInit* objInit, f32 xMax, f32 xMin, f32 yMax, f32 yMin) { if ((xMax > objInit->xPos - gPlayer[0].unk_0AC) && (objInit->xPos - gPlayer[0].unk_0AC > xMin) && (yMax > objInit->yPos - gPlayer[0].unk_0B0) && (objInit->yPos - gPlayer[0].unk_0B0 > yMin)) { if (objInit->id < OBJ_SPRITE_CO_POLE) { - for (i = 0; i < ARRAY_COUNT(gObjects80); i++) { - if (gObjects80[i].obj.status == OBJ_FREE) { - Object_80_Load(&gObjects80[i], objInit); + for (i = 0; i < ARRAY_COUNT(gScenery); i++) { + if (gScenery[i].obj.status == OBJ_FREE) { + Scenery_Load(&gScenery[i], objInit); break; } } @@ -526,13 +526,13 @@ void Object_LoadFromInit(void) { s32 i; s32 j; - if ((gCurrentLevel == LEVEL_METEO) && (gLevelStage == 1)) { + if ((gCurrentLevel == LEVEL_METEO) && (gLevelPhase == 1)) { gLevelObjects = SEGMENTED_TO_VIRTUAL(D_ME_602B148); - } else if ((gCurrentLevel == LEVEL_SECTOR_X) && (gLevelStage == 1)) { + } else if ((gCurrentLevel == LEVEL_SECTOR_X) && (gLevelPhase == 1)) { gLevelObjects = SEGMENTED_TO_VIRTUAL(D_SX_602F18C); - } else if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gLevelStage == 1)) { + } else if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gLevelPhase == 1)) { gLevelObjects = SEGMENTED_TO_VIRTUAL(D_ANDROSS_C0356A4); - } else if ((gCurrentLevel == LEVEL_VENOM_1) && (gLevelStage == 1)) { + } else if ((gCurrentLevel == LEVEL_VENOM_1) && (gLevelPhase == 1)) { gLevelObjects = SEGMENTED_TO_VIRTUAL(D_VE1_6010088); } else { gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]); @@ -595,7 +595,7 @@ void func_enmy_80062B60(f32 xPos, f32 zPos, s32 state, f32 scale) { gEffects[i].obj.status = OBJ_INIT; gEffects[i].obj.id = OBJ_EFFECT_348; gEffects[i].obj.pos.x = xPos; - gEffects[i].obj.pos.y = gGroundLevel + 3.0f; + gEffects[i].obj.pos.y = gGroundHeight + 3.0f; gEffects[i].obj.pos.z = zPos; gEffects[i].scale2 = 10.0f; gEffects[i].scale1 = scale; @@ -618,7 +618,7 @@ void func_enmy_80062C38(f32 xPos, f32 yPos) { gEffects[i].obj.status = OBJ_INIT; gEffects[i].obj.id = OBJ_EFFECT_349; gEffects[i].obj.pos.x = xPos; - gEffects[i].obj.pos.y = gGroundLevel + 3.0f; + gEffects[i].obj.pos.y = gGroundHeight + 3.0f; gEffects[i].obj.pos.z = yPos; gEffects[i].scale2 = 1.0f; gEffects[i].scale1 = 1.3f; @@ -639,7 +639,7 @@ void func_enmy_80062D04(f32 xPos, f32 yPos) { gEffects[i].obj.status = OBJ_INIT; gEffects[i].obj.id = OBJ_EFFECT_350; gEffects[i].obj.pos.x = xPos; - gEffects[i].obj.pos.y = gGroundLevel + 3.0f; + gEffects[i].obj.pos.y = gGroundHeight + 3.0f; gEffects[i].obj.pos.z = yPos; gEffects[i].scale2 = 3.0f; gEffects[i].scale1 = 2.0f; @@ -745,21 +745,22 @@ bool Object_CheckPolyCollision(Vec3f* pos, Vec3f* vel, ObjectId objId, Object* o objPos.x = obj->pos.x; objPos.y = obj->pos.y; objPos.z = obj->pos.z; - if ((objId == OBJ_ACTOR_180) || (objId == OBJ_80_149) || (objId == OBJ_80_150) || (objId == OBJ_BOSS_308) || - (objId == OBJ_BOSS_313) || (objId == OBJ_BOSS_312) || (objId == OBJ_BOSS_309) || (objId == OBJ_80_39)) { + if ((objId == OBJ_ACTOR_180) || (objId == OBJ_SCENERY_149) || (objId == OBJ_SCENERY_150) || + (objId == OBJ_BOSS_308) || (objId == OBJ_BOSS_313) || (objId == OBJ_BOSS_312) || (objId == OBJ_BOSS_309) || + (objId == OBJ_SCENERY_39)) { colId = COL1_0; if (objId == OBJ_BOSS_312) { colId = COL1_9; } - if (objId == OBJ_80_39) { + if (objId == OBJ_SCENERY_39) { colId = COL1_1; } else if (objId == OBJ_BOSS_308) { colId = COL1_4; } else if (objId == OBJ_BOSS_309) { colId = COL1_7; - } else if (objId == OBJ_80_149) { + } else if (objId == OBJ_SCENERY_149) { colId = COL1_5; - } else if (objId == OBJ_80_150) { + } else if (objId == OBJ_SCENERY_150) { colId = COL1_6; } else if (objId == OBJ_BOSS_313) { colId = COL1_8; @@ -769,21 +770,21 @@ bool Object_CheckPolyCollision(Vec3f* pos, Vec3f* vel, ObjectId objId, Object* o } } else { colId = COL2_0; - if (objId == OBJ_80_2) { + if (objId == OBJ_SCENERY_2) { colId = COL2_2; } - if (objId == OBJ_80_3) { + if (objId == OBJ_SCENERY_3) { colId = COL2_3; } - if (objId == OBJ_80_140) { + if (objId == OBJ_SCENERY_140) { colId = COL2_4; } - if (objId == OBJ_80_141) { + if (objId == OBJ_SCENERY_141) { colId = COL2_6; } - if (objId == OBJ_80_117) { + if (objId == OBJ_SCENERY_117) { colId = COL2_14; - } else if ((objId == OBJ_80_4) || (objId == OBJ_80_5)) { + } else if ((objId == OBJ_SCENERY_4) || (objId == OBJ_SCENERY_5)) { colId = COL2_1; } if (func_col2_800A3690(&relPos, &objPos, colId, &sp44)) { @@ -795,8 +796,8 @@ bool Object_CheckPolyCollision(Vec3f* pos, Vec3f* vel, ObjectId objId, Object* o } s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) { - Object_58* obj58; - Object_80* obj80; + Scenery360* scenery360; + Scenery* scenery; Sprite* sprite; Boss* boss; Actor* actor; @@ -804,34 +805,37 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) { s32 i; if ((gLevelMode == LEVELMODE_ALL_RANGE) && (gCurrentLevel != LEVEL_KATINA)) { - obj58 = gObjects58; - for (i = 0; i < 200; i++, obj58++) { - if (obj58->obj.status == OBJ_ACTIVE) { - if ((obj58->obj.id == OBJ_80_1) || (obj58->obj.id == OBJ_80_3) || (obj58->obj.id == OBJ_80_117) || - (obj58->obj.id == OBJ_80_141) || (obj58->obj.id == OBJ_80_150) || (obj58->obj.id == OBJ_80_149) || - (obj58->obj.id == OBJ_80_148) || (obj58->obj.id == OBJ_80_140)) { - if (Object_CheckPolyCollision(pos, vel, obj58->obj.id, &obj58->obj)) { + scenery360 = gScenery360; + for (i = 0; i < 200; i++, scenery360++) { + if (scenery360->obj.status == OBJ_ACTIVE) { + if ((scenery360->obj.id == OBJ_SCENERY_1) || (scenery360->obj.id == OBJ_SCENERY_3) || + (scenery360->obj.id == OBJ_SCENERY_117) || (scenery360->obj.id == OBJ_SCENERY_141) || + (scenery360->obj.id == OBJ_SCENERY_150) || (scenery360->obj.id == OBJ_SCENERY_149) || + (scenery360->obj.id == OBJ_SCENERY_148) || (scenery360->obj.id == OBJ_SCENERY_140)) { + if (Object_CheckPolyCollision(pos, vel, scenery360->obj.id, &scenery360->obj)) { return 999; } - } else if ((fabsf(pos->x - obj58->obj.pos.x) < 2000.0f) && - (fabsf(pos->z - obj58->obj.pos.z) < 2000.0f)) { - if (Object_CheckHitboxCollision(pos, obj58->info.hitbox, &obj58->obj, 0.0f, 0.0f, 0.0f)) { + } else if ((fabsf(pos->x - scenery360->obj.pos.x) < 2000.0f) && + (fabsf(pos->z - scenery360->obj.pos.z) < 2000.0f)) { + if (Object_CheckHitboxCollision(pos, scenery360->info.hitbox, &scenery360->obj, 0.0f, 0.0f, 0.0f)) { return 2; } } } } } - obj80 = gObjects80; - for (i = 0; (i < ARRAY_COUNT(gObjects80)) && (gLevelMode == LEVELMODE_ON_RAILS); i++, obj80++) { - if (obj80->obj.status == OBJ_ACTIVE) { - if ((obj80->obj.id == OBJ_80_1) || (obj80->obj.id == OBJ_80_4) || (obj80->obj.id == OBJ_80_5) || - (obj80->obj.id == OBJ_80_2) || (obj80->obj.id == OBJ_80_39) || (obj80->obj.id == OBJ_80_3)) { - if (Object_CheckPolyCollision(pos, vel, obj80->obj.id, &obj80->obj)) { + scenery = gScenery; + for (i = 0; (i < ARRAY_COUNT(gScenery)) && (gLevelMode == LEVELMODE_ON_RAILS); i++, scenery++) { + if (scenery->obj.status == OBJ_ACTIVE) { + if ((scenery->obj.id == OBJ_SCENERY_1) || (scenery->obj.id == OBJ_SCENERY_4) || + (scenery->obj.id == OBJ_SCENERY_5) || (scenery->obj.id == OBJ_SCENERY_2) || + (scenery->obj.id == OBJ_SCENERY_39) || (scenery->obj.id == OBJ_SCENERY_3)) { + if (Object_CheckPolyCollision(pos, vel, scenery->obj.id, &scenery->obj)) { return 2; } - } else if ((fabsf(pos->x - obj80->obj.pos.x) < 2000.0f) && (fabsf(pos->z - obj80->obj.pos.z) < 2000.0f)) { - if (Object_CheckHitboxCollision(pos, obj80->info.hitbox, &obj80->obj, 0.0f, 0.0f, 0.0f)) { + } else if ((fabsf(pos->x - scenery->obj.pos.x) < 2000.0f) && + (fabsf(pos->z - scenery->obj.pos.z) < 2000.0f)) { + if (Object_CheckHitboxCollision(pos, scenery->info.hitbox, &scenery->obj, 0.0f, 0.0f, 0.0f)) { return i + 10; } } @@ -901,9 +905,9 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) { actor->unk_0D0 = 1; actor->damage = 10; actor->unk_0D2 = -1; - actor->unk_0D8.x = pos->x; - actor->unk_0D8.y = pos->y; - actor->unk_0D8.z = pos->z; + actor->hitPos.x = pos->x; + actor->hitPos.y = pos->y; + actor->hitPos.z = pos->z; return 2; } } else if ((mode != 2) && (mode != 3)) { @@ -916,9 +920,9 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) { ((actor->aiType < AI360_10) || (actor->aiType >= AI360_GREAT_FOX))))) { actor->health = 0; } - actor->unk_0D8.x = pos->x; - actor->unk_0D8.y = pos->y; - actor->unk_0D8.z = pos->z; + actor->hitPos.x = pos->x; + actor->hitPos.y = pos->y; + actor->hitPos.z = pos->z; return 1; } } @@ -928,7 +932,7 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) { return 0; } -void func_enmy_80063CAC(Object_80* obj80) { +void func_enmy_80063CAC(Scenery* scenery) { s32 i; for (i = 0; i < ARRAY_COUNT(gActors); i++) { @@ -936,9 +940,9 @@ void func_enmy_80063CAC(Object_80* obj80) { Actor_Initialize(&gActors[i]); gActors[i].obj.status = OBJ_INIT; gActors[i].obj.id = OBJ_ACTOR_193; - gActors[i].obj.pos.x = obj80->obj.pos.x; - gActors[i].obj.pos.y = obj80->obj.pos.y; - gActors[i].obj.pos.z = obj80->obj.pos.z; + gActors[i].obj.pos.x = scenery->obj.pos.x; + gActors[i].obj.pos.y = scenery->obj.pos.y; + gActors[i].obj.pos.z = scenery->obj.pos.z; gActors[i].obj.rot.y = RAND_FLOAT(360.0f); Object_SetInfo(&gActors[i].info, gActors[i].obj.id); break; @@ -946,23 +950,24 @@ void func_enmy_80063CAC(Object_80* obj80) { } } -void func_enmy_80063D58(Object_80* obj80) { +void func_enmy_80063D58(Scenery* scenery) { s32 i; - obj80->obj.pos.y = gGroundLevel; + scenery->obj.pos.y = gGroundHeight; for (i = 0; i < ARRAY_COUNT(gSprites); i++) { if (gSprites[i].obj.status == OBJ_FREE) { Sprite_Initialize(&gSprites[i]); gSprites[i].obj.status = OBJ_INIT; gSprites[i].obj.id = OBJ_SPRITE_FOG_SHADOW; - gSprites[i].unk_45 = obj80->obj.id; - gSprites[i].obj.pos.x = obj80->obj.pos.x; + gSprites[i].unk_45 = scenery->obj.id; + gSprites[i].obj.pos.x = scenery->obj.pos.x; gSprites[i].obj.pos.y = 5.0f; - gSprites[i].obj.pos.z = obj80->obj.pos.z; - if ((obj80->obj.id == OBJ_80_0) || (obj80->obj.id == OBJ_80_6) || (obj80->obj.id == OBJ_80_7) || - (obj80->obj.id == OBJ_80_56) || (obj80->obj.id == OBJ_80_20) || (obj80->obj.id == OBJ_80_21) || - (obj80->obj.id == OBJ_80_22)) { - gSprites[i].obj.rot.y = obj80->obj.rot.y; + gSprites[i].obj.pos.z = scenery->obj.pos.z; + if ((scenery->obj.id == OBJ_SCENERY_0) || (scenery->obj.id == OBJ_SCENERY_6) || + (scenery->obj.id == OBJ_SCENERY_7) || (scenery->obj.id == OBJ_SCENERY_56) || + (scenery->obj.id == OBJ_SCENERY_20) || (scenery->obj.id == OBJ_SCENERY_21) || + (scenery->obj.id == OBJ_SCENERY_22)) { + gSprites[i].obj.rot.y = scenery->obj.rot.y; } else { gSprites[i].obj.rot.y = 44.9f; } @@ -972,7 +977,7 @@ void func_enmy_80063D58(Object_80* obj80) { } } -void func_enmy_80063E5C(Object_80* obj80, f32* hitboxData) { +void func_enmy_80063E5C(Scenery* scenery, f32* hitboxData) { s32 i; Item* item; @@ -981,10 +986,10 @@ void func_enmy_80063E5C(Object_80* obj80, f32* hitboxData) { Item_Initialize(&gItems[i]); item->obj.status = OBJ_INIT; item->obj.id = OBJ_ITEM_RING_CHECK; - item->obj.pos.x = obj80->obj.pos.x; - item->obj.pos.y = obj80->obj.pos.y; - item->obj.pos.z = obj80->obj.pos.z; - item->obj.rot.y = obj80->obj.rot.y; + item->obj.pos.x = scenery->obj.pos.x; + item->obj.pos.y = scenery->obj.pos.y; + item->obj.pos.z = scenery->obj.pos.z; + item->obj.rot.y = scenery->obj.rot.y; Object_SetInfo(&item->info, item->obj.id); item->info.hitbox = SEGMENTED_TO_VIRTUAL(hitboxData); break; @@ -1018,8 +1023,8 @@ void Object_Init(s32 index, ObjectId objId) { case OBJ_ACTOR_234: AUDIO_PLAY_SFX(0x11030010, gActors[index].sfxSource, 0); break; - case OBJ_80_54: - AUDIO_PLAY_SFX(0x11000000, gObjects80[index].sfxSource, 0); + case OBJ_SCENERY_54: + AUDIO_PLAY_SFX(0x11000000, gScenery[index].sfxSource, 0); break; case OBJ_ACTOR_TEAM_BOSS: ActorTeamBoss_Init(&gActors[index]); @@ -1041,35 +1046,35 @@ void Object_Init(s32 index, ObjectId objId) { gEffects[index].obj.status = OBJ_FREE; } break; - case OBJ_80_30: - func_enmy_80063E5C(&gObjects80[index], D_TI_6006940); + case OBJ_SCENERY_30: + func_enmy_80063E5C(&gScenery[index], D_TI_6006940); break; - case OBJ_80_31: - func_enmy_80063E5C(&gObjects80[index], D_TI_600695C); + case OBJ_SCENERY_31: + func_enmy_80063E5C(&gScenery[index], D_TI_600695C); break; - case OBJ_80_32: - func_enmy_80063E5C(&gObjects80[index], D_TI_6006978); + case OBJ_SCENERY_32: + func_enmy_80063E5C(&gScenery[index], D_TI_6006978); break; - case OBJ_80_33: - func_enmy_80063E5C(&gObjects80[index], D_TI_6006994); + case OBJ_SCENERY_33: + func_enmy_80063E5C(&gScenery[index], D_TI_6006994); break; - case OBJ_80_34: - func_enmy_80063E5C(&gObjects80[index], D_TI_60069B0); + case OBJ_SCENERY_34: + func_enmy_80063E5C(&gScenery[index], D_TI_60069B0); break; - case OBJ_80_35: - func_enmy_80063E5C(&gObjects80[index], D_TI_60069CC); + case OBJ_SCENERY_35: + func_enmy_80063E5C(&gScenery[index], D_TI_60069CC); break; - case OBJ_80_36: - func_enmy_80063E5C(&gObjects80[index], D_TI_60069E8); + case OBJ_SCENERY_36: + func_enmy_80063E5C(&gScenery[index], D_TI_60069E8); break; - case OBJ_80_37: - func_enmy_80063E5C(&gObjects80[index], D_TI_6006A04); + case OBJ_SCENERY_37: + func_enmy_80063E5C(&gScenery[index], D_TI_6006A04); break; - case OBJ_80_38: - func_enmy_80063E5C(&gObjects80[index], D_TI_6006A20); + case OBJ_SCENERY_38: + func_enmy_80063E5C(&gScenery[index], D_TI_6006A20); break; - case OBJ_80_23: - func_enmy_80063CAC(&gObjects80[index]); + case OBJ_SCENERY_23: + func_enmy_80063CAC(&gScenery[index]); break; case OBJ_ITEM_CHECKPOINT: if (D_ctx_80177CA0 != 0) { @@ -1098,16 +1103,16 @@ void Object_Init(s32 index, ObjectId objId) { gItems[index].obj.status = OBJ_FREE; } break; - case OBJ_80_0: - func_enmy_80063E5C(&gObjects80[index], gItemRingCheckHitbox); + case OBJ_SCENERY_0: + func_enmy_80063E5C(&gScenery[index], gItemRingCheckHitbox); /* fallthrough */ - case OBJ_80_6: - case OBJ_80_7: - case OBJ_80_20: - case OBJ_80_21: - case OBJ_80_22: - case OBJ_80_56: - func_enmy_80063D58(&gObjects80[index]); + case OBJ_SCENERY_6: + case OBJ_SCENERY_7: + case OBJ_SCENERY_20: + case OBJ_SCENERY_21: + case OBJ_SCENERY_22: + case OBJ_SCENERY_56: + func_enmy_80063D58(&gScenery[index]); break; case OBJ_ACTOR_187: gActors[index].fwork[0] = gActors[index].obj.pos.x; @@ -1217,8 +1222,8 @@ void Object_Init(s32 index, ObjectId objId) { case OBJ_ACTOR_218: Macbeth_801A6134(&gActors[index]); break; - case OBJ_80_65: - Macbeth_801A65E0(&gObjects80[index]); + case OBJ_SCENERY_65: + Macbeth_801A65E0(&gScenery[index]); break; case OBJ_ACTOR_177: case OBJ_ACTOR_178: @@ -1309,8 +1314,8 @@ void Object_Init(s32 index, ObjectId objId) { case OBJ_ACTOR_260: Aquas_801B7AF0(&gActors[index]); break; - case OBJ_80_57: - Titania_8018F0D8(&gObjects80[index]); + case OBJ_SCENERY_57: + Titania_8018F0D8(&gScenery[index]); break; case OBJ_BOSS_319: Venom1_Boss319_Init(&gBosses[index]); @@ -1337,17 +1342,17 @@ void Object_Init(s32 index, ObjectId objId) { } } -void func_enmy_800652CC(Object_80* obj80) { +void func_enmy_800652CC(Scenery* scenery) { f32 sp2C; f32 sp28; f32 sp24; - if ((D_ctx_801784AC == 4) && (obj80->state == 0)) { - Ground_801B6E20(obj80->obj.pos.x, obj80->obj.pos.z + D_ctx_80177D20, &sp2C, &sp24, &sp28); - obj80->obj.pos.y = sp24 + 3.0f; - obj80->obj.rot.x = RAD_TO_DEG(sp2C); - obj80->obj.rot.z = RAD_TO_DEG(sp28); - obj80->state++; + if ((D_ctx_801784AC == 4) && (scenery->state == 0)) { + Ground_801B6E20(scenery->obj.pos.x, scenery->obj.pos.z + D_ctx_80177D20, &sp2C, &sp24, &sp28); + scenery->obj.pos.y = sp24 + 3.0f; + scenery->obj.rot.x = RAD_TO_DEG(sp2C); + scenery->obj.rot.z = RAD_TO_DEG(sp28); + scenery->state++; } } @@ -1580,7 +1585,7 @@ void func_enmy_800656D4(Actor* actor) { sp8C.y = actor->vel.y; sp8C.z = actor->vel.z; if ((Object_CheckCollision(actor->index, &actor->obj.pos, &sp8C, 1) != 0) || (actor->unk_0D0 != 0) || - (actor->obj.pos.y < (gGroundLevel + 10.0f)) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { + (actor->obj.pos.y < (gGroundHeight + 10.0f)) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 3.0f); Object_Kill(&actor->obj, actor->sfxSource); if (actor->unk_0D0 != 0) { @@ -1705,8 +1710,8 @@ void Actor_Despawn(Actor* actor) { void func_enmy_8006654C(Actor* actor) { actor->gravity = 0.4f; - if (actor->obj.pos.y <= gGroundLevel + 130.0f) { - actor->obj.pos.y = gGroundLevel + 130.0f; + if (actor->obj.pos.y <= gGroundHeight + 130.0f) { + actor->obj.pos.y = gGroundHeight + 130.0f; actor->vel.y = 0.0f; } actor->vel.x = SIN_DEG(actor->obj.rot.y) * actor->fwork[0]; @@ -1807,62 +1812,63 @@ void func_enmy_800669A0(Actor* actor) { void func_enmy_80066A80(Actor* actor) { } -void func_enmy_80066A8C(Object_80* obj80) { +void func_enmy_80066A8C(Scenery* scenery) { Vec3f sp64; Vec3f sp58; f32 yf; sp64.z = 0.0f; sp64.x = -120.0f; - if (obj80->obj.rot.y > 90.0f) { + if (scenery->obj.rot.y > 90.0f) { sp64.x = 120.0f; } for (yf = 0.0f; yf < 680.0f; yf += 100.0f) { - Matrix_RotateY(gCalcMatrix, obj80->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, obj80->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, scenery->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, scenery->obj.rot.x * M_DTOR, MTXF_APPLY); sp64.y = yf; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp64, &sp58); - func_effect_8007D0E0(obj80->obj.pos.x + sp58.x, obj80->obj.pos.y + sp58.y, obj80->obj.pos.z + sp58.z, 4.0f); + func_effect_8007D0E0(scenery->obj.pos.x + sp58.x, scenery->obj.pos.y + sp58.y, scenery->obj.pos.z + sp58.z, + 4.0f); } } -void func_enmy_80066C00(Object_80* obj80) { +void func_enmy_80066C00(Scenery* scenery) { Vec3f sp64; Vec3f sp58; f32 zf; sp64.y = 30.0f; sp64.x = -100.0f; - if (obj80->obj.rot.y > 90.0f) { + if (scenery->obj.rot.y > 90.0f) { sp64.x = 100.0f; } - Matrix_RotateY(gCalcMatrix, obj80->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, scenery->obj.rot.y * M_DTOR, MTXF_NEW); for (zf = -180.0f; zf <= 0.0f; zf += 30.0f) { sp64.z = zf; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp64, &sp58); - func_effect_8007D0E0(obj80->obj.pos.x + sp58.x, obj80->obj.pos.y + sp58.y, obj80->obj.pos.z + sp58.z, + func_effect_8007D0E0(scenery->obj.pos.x + sp58.x, scenery->obj.pos.y + sp58.y, scenery->obj.pos.z + sp58.z, RAND_FLOAT(1.0f) + 2.0f); } } -void func_enmy_80066D5C(Object_80* obj80) { - switch (obj80->state) { +void func_enmy_80066D5C(Scenery* scenery) { + switch (scenery->state) { case 1: - func_enmy_80066C00(obj80); - obj80->state++; - AUDIO_PLAY_SFX(0x2900300F, obj80->sfxSource, 4); + func_enmy_80066C00(scenery); + scenery->state++; + AUDIO_PLAY_SFX(0x2900300F, scenery->sfxSource, 4); break; case 2: - obj80->vel.x += 0.05f; - obj80->obj.rot.x += obj80->vel.x; - if (obj80->obj.rot.x >= 90.0f) { - obj80->obj.rot.x = 90.0f; - obj80->unk_44 = 40; - func_enmy_80066A8C(obj80); - obj80->state = 0; + scenery->vel.x += 0.05f; + scenery->obj.rot.x += scenery->vel.x; + if (scenery->obj.rot.x >= 90.0f) { + scenery->obj.rot.x = 90.0f; + scenery->unk_44 = 40; + func_enmy_80066A8C(scenery); + scenery->state = 0; gCameraShake = 25; - AUDIO_PLAY_SFX(0x19130003, obj80->sfxSource, 4); + AUDIO_PLAY_SFX(0x19130003, scenery->sfxSource, 4); } break; case 0: @@ -1870,17 +1876,17 @@ void func_enmy_80066D5C(Object_80* obj80) { } } -void func_enmy_80066E80(Object_80* obj80) { +void func_enmy_80066E80(Scenery* scenery) { } void Sprite167_Update(Sprite167* this) { this->obj.rot.y += 0.2f; } -void func_enmy_80066EA8(Object_80* obj80) { - obj80->obj.rot.y = 0.0f; - if (gPlayer[0].cam.eye.x < obj80->obj.pos.x) { - obj80->obj.rot.y = 271.0f; +void func_enmy_80066EA8(Scenery* scenery) { + scenery->obj.rot.y = 0.0f; + if (gPlayer[0].cam.eye.x < scenery->obj.pos.x) { + scenery->obj.rot.y = 271.0f; } } @@ -1909,8 +1915,8 @@ void func_enmy_80066EF0(Item* item) { Math_SmoothStepToF(&item->obj.pos.y, 650.0f, 0.1f, 10.0f, 0.01f); } if (gLevelType == LEVELTYPE_PLANET) { - if (item->obj.pos.y < gGroundLevel + 70.0f) { - Math_SmoothStepToF(&item->obj.pos.y, gGroundLevel + 70.0f, 0.1f, 5.0f, 0.01f); + if (item->obj.pos.y < gGroundHeight + 70.0f) { + Math_SmoothStepToF(&item->obj.pos.y, gGroundHeight + 70.0f, 0.1f, 5.0f, 0.01f); } if ((gCurrentLevel == LEVEL_AQUAS) && (gBossActive != 0)) { item->obj.pos.z += 20.0f; @@ -2347,7 +2353,7 @@ void ItemPathChange_Update(Item* this) { gLastPathChange = this->obj.id; if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_ACTIVE) { Object_Kill(&this->obj, this->sfxSource); - } else if (((gCurrentLevel == LEVEL_METEO) || (gCurrentLevel == LEVEL_SECTOR_X)) && (gLevelStage == 1)) { + } else if (((gCurrentLevel == LEVEL_METEO) || (gCurrentLevel == LEVEL_SECTOR_X)) && (gLevelPhase == 1)) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].unk_1D0 = 0; Object_Kill(&this->obj, this->sfxSource); @@ -2540,17 +2546,17 @@ void Boss_Move(Boss* boss) { } } -void Object80_Move(Object_80* obj80) { +void Scenery_Move(Scenery* scenery) { if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) { - obj80->obj.pos.z += obj80->unk_60; - if (obj80->info.unk_10 < obj80->obj.pos.z) { - Object_Kill(&obj80->obj, obj80->sfxSource); + scenery->obj.pos.z += scenery->unk_60; + if (scenery->info.unk_10 < scenery->obj.pos.z) { + Object_Kill(&scenery->obj, scenery->sfxSource); } } else if ((gLevelMode == LEVELMODE_ON_RAILS) && (gBossActive != 2)) { - f32 temp_fv0 = fabsf(obj80->obj.pos.x - gPlayer[0].cam.eye.x); + f32 temp_fv0 = fabsf(scenery->obj.pos.x - gPlayer[0].cam.eye.x); f32 var_fa0 = 500.0f; - if ((obj80->obj.id == OBJ_80_6) || (obj80->obj.id == OBJ_80_7)) { + if ((scenery->obj.id == OBJ_SCENERY_6) || (scenery->obj.id == OBJ_SCENERY_7)) { var_fa0 = 1000.0f; } temp_fv0 = ((temp_fv0 - var_fa0) < 0.0f) ? 0.0f : (temp_fv0 - var_fa0) * 1.7f; @@ -2558,8 +2564,8 @@ void Object80_Move(Object_80* obj80) { temp_fv0 = 0.0f; } temp_fv0 -= gPlayer[0].cam.eye.z; - if ((obj80->info.unk_10 - temp_fv0) < (obj80->obj.pos.z + D_ctx_80177D20)) { - Object_Kill(&obj80->obj, obj80->sfxSource); + if ((scenery->info.unk_10 - temp_fv0) < (scenery->obj.pos.z + D_ctx_80177D20)) { + Object_Kill(&scenery->obj, scenery->sfxSource); } } } @@ -2570,8 +2576,8 @@ void Sprite_Move(Sprite* sprite) { f32 var_fa0 = 500.0f; if (((sprite->obj.id == OBJ_SPRITE_FOG_SHADOW) && - ((sprite->unk_45 == OBJ_80_6) || (sprite->unk_45 == OBJ_80_7))) || - (sprite->obj.id == OBJ_80_8)) { + ((sprite->unk_45 == OBJ_SCENERY_6) || (sprite->unk_45 == OBJ_SCENERY_7))) || + (sprite->obj.id == OBJ_SCENERY_8)) { var_fa0 = 1000.0f; } temp_fv0 = ((temp_fv0 - var_fa0) < 0.0f) ? 0.0f * 1.7f : (temp_fv0 - var_fa0) * 1.7f; @@ -2629,16 +2635,16 @@ void Actor_Update(Actor* this) { } if (gVersusMode) { for (i = 0; i < gCamCount; i++) { - if (this->timer_0CA[i] != 0) { + if (this->lockOnTimers[i] != 0) { if (!(gControllerHold[i].button & A_BUTTON)) { - this->timer_0CA[i]--; + this->lockOnTimers[i]--; } gChargeTimers[i] = 0; } } - } else if (this->timer_0CA[0] != 0) { + } else if (this->lockOnTimers[0] != 0) { if (!(gControllerHold[gMainController].button & A_BUTTON)) { - this->timer_0CA[0]--; + this->lockOnTimers[0]--; } gChargeTimers[0] = 0; } @@ -2711,7 +2717,7 @@ void Boss_Update(Boss* this) { } } -void Object_80_Update(Object_80* this) { +void Scenery_Update(Scenery* this) { if (this->timer_4C != 0) { this->timer_4C--; } @@ -2719,10 +2725,10 @@ void Object_80_Update(Object_80* this) { case OBJ_INIT: this->obj.status = OBJ_ACTIVE; Object_Init(this->index, this->obj.id); - Object80_Move(this); + Scenery_Move(this); break; case OBJ_ACTIVE: - Object80_Move(this); + Scenery_Move(this); if (this->info.action != NULL) { this->info.action(&this->obj); } @@ -2856,11 +2862,11 @@ void TexturedLine_UpdateAll(void) { void Object_Update(void) { s32 i; s32 pad; - Object_58* obj58; + Scenery360* scenery360; Actor* actor; Boss* boss; Sprite* sprite; - Object_80* obj80; + Scenery* scenery; Item* item; Effect* effect; @@ -2875,19 +2881,19 @@ void Object_Update(void) { if ((gLoadLevelObjects != 0) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) { Object_LoadFromInit(); } - for (i = 0, obj80 = gObjects80; i < ARRAY_COUNT(gObjects80); i++, obj80++) { - if (obj80->obj.status != OBJ_FREE) { - obj80->index = i; - Object_80_Update(obj80); + for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) { + if (scenery->obj.status != OBJ_FREE) { + scenery->index = i; + Scenery_Update(scenery); } } } else if (gVersusMode) { - for (i = 0, obj58 = gObjects58; i < 200; i++, obj58++) { - if ((obj58->obj.status != OBJ_FREE) && (obj58->obj.id == OBJ_80_146)) { + for (i = 0, scenery360 = gScenery360; i < 200; i++, scenery360++) { + if ((scenery360->obj.status != OBJ_FREE) && (scenery360->obj.id == OBJ_SCENERY_146)) { if ((i % 2) != 0) { - obj58->obj.rot.y += 0.5f; + scenery360->obj.rot.y += 0.5f; } else { - obj58->obj.rot.y -= 0.5f; + scenery360->obj.rot.y -= 0.5f; } } } diff --git a/src/engine/fox_enmy2.c b/src/engine/fox_enmy2.c index 8d49352e..c303222f 100644 --- a/src/engine/fox_enmy2.c +++ b/src/engine/fox_enmy2.c @@ -103,7 +103,7 @@ void Obj54_8006AA3C(f32 xPos, f32 yPos, f32 zPos) { } } -void Obj54_Update(Object80_54* this) { +void Obj54_Update(Scenery_54* this) { Vec3f sp24; Vec3f sp18; @@ -307,11 +307,11 @@ void Actor194_8006B46C(Actor194* this, f32 xTrans, f32 yTrans, f32 zTrans, f32 x if (arg7 != 1) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); - if ((arg7 == 0) && (this->timer_0CA[0] != 0)) { + if ((arg7 == 0) && (this->lockOnTimers[0] != 0)) { sp34.y += this->info.unk_1C; Matrix_MultVec3f(gGfxMatrix, &sp34, D_display_80161578); if (D_display_80161578->z > -500.0f) { - this->timer_0CA[0] = 0; + this->lockOnTimers[0] = 0; } } } else { @@ -341,7 +341,7 @@ void Actor194_Draw(Actor194* this) { } } -void Obj42_Update(Object80_42* this) { +void Obj42_Update(Scenery_42* this) { this->obj.pos.x += this->vel.x; this->obj.pos.y += this->vel.y; this->obj.pos.z += this->vel.z; @@ -350,8 +350,8 @@ void Obj42_Update(Object80_42* this) { case 0: this->vel.y -= 1.0f; - if (this->obj.pos.y < gGroundLevel + 40.0f) { - this->obj.pos.y = gGroundLevel + 40.0f; + if (this->obj.pos.y < gGroundHeight + 40.0f) { + this->obj.pos.y = gGroundHeight + 40.0f; AUDIO_PLAY_SFX(0x19130003, this->sfxSource, 0); this->state = 2; this->vel.y = 0.0f; @@ -451,8 +451,8 @@ void Actor196_Update(Actor196* this) { if (this->vel.y < 12.0f) { Math_SmoothStepToF(&this->obj.rot.x, 180.0f, 0.1f, 7.0f, 0.01f); } - if (this->obj.pos.y < (gGroundLevel + 10.0f)) { - this->obj.pos.y = gGroundLevel; + if (this->obj.pos.y < (gGroundHeight + 10.0f)) { + this->obj.pos.y = gGroundHeight; this->state = 4; this->unk_0B6 = 0; this->vel.y = 0.0f; @@ -469,7 +469,7 @@ void Actor196_Update(Actor196* this) { break; } - if ((this->obj.pos.y <= (gGroundLevel + 10.0f)) && ((gGameFrameCount % 8) == 0)) { + if ((this->obj.pos.y <= (gGroundHeight + 10.0f)) && ((gGameFrameCount % 8) == 0)) { func_enmy2_8006BB1C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z); } @@ -624,7 +624,7 @@ void Actor189_Update(Actor189* this) { case 53: case 55: if (((this->timer_0BC == 0) || (Object_CheckCollision(this->index, &this->obj.pos, &D_800D0030, 1) != 0) || - (this->obj.pos.y < (gGroundLevel + 10.0f))) && + (this->obj.pos.y < (gGroundHeight + 10.0f))) && (this->timer_0BE == 0)) { func_effect_8007B8F8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 50.0f, this->scale * 10.0f); Object_Kill(&this->obj, this->sfxSource); @@ -635,7 +635,7 @@ void Actor189_Update(Actor189* this) { case 56: Math_SmoothStepToF(&this->scale, 0.0f, 0.1f, 2.0f, 0.0001f); if (((this->timer_0BC == 0) || (Object_CheckCollision(this->index, &this->obj.pos, &D_800D0030, 1) != 0) || - (this->obj.pos.y < (gGroundLevel + 10.0f))) && + (this->obj.pos.y < (gGroundHeight + 10.0f))) && (this->timer_0BE == 0)) { func_effect_8007B8F8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 50.0f, this->scale * 10.0f); Object_Kill(&this->obj, this->sfxSource); @@ -656,7 +656,7 @@ void Actor189_Update(Actor189* this) { this->obj.rot.z += this->fwork[2]; if (((this->timer_0BC == 0) || (Object_CheckCollision(this->index, &this->obj.pos, &D_800D0030, 1) != 0) || - (this->obj.pos.y < (gGroundLevel + 10.0f))) && + (this->obj.pos.y < (gGroundHeight + 10.0f))) && (this->timer_0BE == 0)) { func_effect_8007B8F8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 50.0f, this->scale * 10.0f); Object_Kill(&this->obj, this->sfxSource); @@ -666,7 +666,7 @@ void Actor189_Update(Actor189* this) { case 54: if (((this->timer_0BC == 0) || (Object_CheckCollision(this->index, &this->obj.pos, &D_800D0030, 1) != 0) || - (this->obj.pos.y < (gGroundLevel + 10.0f))) && + (this->obj.pos.y < (gGroundHeight + 10.0f))) && (this->timer_0BE == 0)) { func_effect_8007B8F8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 70.0f, this->scale * 20.0f); func_effect_8007B8F8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 70.0f, this->scale * 20.0f); @@ -686,7 +686,7 @@ void Actor189_Update(Actor189* this) { if (Object_CheckCollision(this->index, &this->obj.pos, &D_tank_800C9F2C, 1) != 0) { this->vel.x *= -0.7f; } - if (this->obj.pos.y < gGroundLevel) { + if (this->obj.pos.y < gGroundHeight) { Object_Kill(&this->obj, this->sfxSource); } break; @@ -700,7 +700,7 @@ void Actor189_Update(Actor189* this) { this->vel.x *= -0.7f; } - if (this->obj.pos.y < gGroundLevel) { + if (this->obj.pos.y < gGroundHeight) { if (this->iwork[0] >= 3) { this->vel.y = 0.0f; this->gravity = 0.0f; @@ -710,7 +710,7 @@ void Actor189_Update(Actor189* this) { } else { this->iwork[0]++; this->vel.y = -this->vel.y * 0.7f; - this->obj.pos.y = gGroundLevel; + this->obj.pos.y = gGroundHeight; this->fwork[0] *= 0.5f; this->fwork[1] *= 0.5f; this->fwork[2] *= 0.5f; @@ -733,13 +733,13 @@ void Actor189_Update(Actor189* this) { if (this->state == 70) { if ((this->timer_0BC == 0) || (Object_CheckCollision(this->index, &this->obj.pos, &D_800D0030, 1) != 0) || - (this->obj.pos.y < (gGroundLevel + 10.0f))) { + (this->obj.pos.y < (gGroundHeight + 10.0f))) { Object_Kill(&this->obj, this->sfxSource); } } else if (this->state == 39) { if (((this->timer_0BC == 0) || (Object_CheckCollision(this->index, &this->obj.pos, &D_800D0030, 1) != 0) || - (this->obj.pos.y < (gGroundLevel + 10.0f))) && + (this->obj.pos.y < (gGroundHeight + 10.0f))) && (this->timer_0BE == 0)) { func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 10.0f); Object_Kill(&this->obj, this->sfxSource); @@ -763,7 +763,7 @@ void Actor189_Update(Actor189* this) { } if (((this->timer_0BC == 0) || (Object_CheckCollision(this->index, &this->obj.pos, &D_800D0030, 1) != 0) || - (this->obj.pos.y < (gGroundLevel + 10.0f))) && + (this->obj.pos.y < (gGroundHeight + 10.0f))) && (this->timer_0BE == 0)) { func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, this->vel.z, this->scale * 1.5f, 4); @@ -775,7 +775,7 @@ void Actor189_Update(Actor189* this) { func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1.5f); } if ((Object_CheckCollision(this->index, &this->obj.pos, &D_800D0030, 1) != 0) || - (this->obj.pos.y < (gGroundLevel + 10.0f))) { + (this->obj.pos.y < (gGroundHeight + 10.0f))) { if (gLevelType == LEVELTYPE_SPACE) { func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 2.0f); Object_Kill(&this->obj, this->sfxSource); @@ -836,28 +836,28 @@ void func_enmy2_8006D0F4(Actor* this) { D_ctx_80161A84 = 110; D_ctx_80178544 = 40; - for (i = 0; i < ARRAY_COUNT(gObjects80); i++) { - if ((gObjects80[i].obj.status == OBJ_ACTIVE) && ((gPlayer[0].unk_138 - 3000.0f) < gObjects80[i].obj.pos.z)) { - hitboxData = D_edata_800CF964[gObjects80[i].obj.id]; + for (i = 0; i < ARRAY_COUNT(gScenery); i++) { + if ((gScenery[i].obj.status == OBJ_ACTIVE) && ((gPlayer[0].unk_138 - 3000.0f) < gScenery[i].obj.pos.z)) { + hitboxData = D_edata_800CF964[gScenery[i].obj.id]; count = *hitboxData; if (count != 0) { - Matrix_RotateY(gCalcMatrix, -gObjects80[i].obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, -gScenery[i].obj.rot.y * M_DTOR, MTXF_NEW); - 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; + spA8.x = this->obj.pos.x - gScenery[i].obj.pos.x; + spA8.y = this->obj.pos.y - gScenery[i].obj.pos.y; + spA8.z = this->obj.pos.z - gScenery[i].obj.pos.z; Matrix_MultVec3fNoTranslate(gCalcMatrix, &spA8, &sp9C); - temp_fs0 = gObjects80[i].obj.pos.x + sp9C.x; - temp_fs1 = gObjects80[i].obj.pos.y + sp9C.y; - temp_fs2 = gObjects80[i].obj.pos.z + sp9C.z; + temp_fs0 = gScenery[i].obj.pos.x + sp9C.x; + temp_fs1 = gScenery[i].obj.pos.y + sp9C.y; + temp_fs2 = gScenery[i].obj.pos.z + sp9C.z; hitboxData++; for (j = 0; j < count; j++) { hitbox = (Hitbox*) hitboxData; - if (func_play_800A78C4(hitbox, gObjects80[i].obj.pos.x, gObjects80[i].obj.pos.y, - gObjects80[i].obj.pos.z, temp_fs0, temp_fs1, temp_fs2)) { + if (func_play_800A78C4(hitbox, gScenery[i].obj.pos.x, gScenery[i].obj.pos.y, gScenery[i].obj.pos.z, + temp_fs0, temp_fs1, temp_fs2)) { D_ctx_80161A7C = 10; D_ctx_80161A80 = 10; D_ctx_80161A84 = 10; @@ -870,35 +870,49 @@ void func_enmy2_8006D0F4(Actor* this) { } } -void Obj39_Update(Object80_39* this) { +void Obj39_Update(Scenery_39* this) { this->obj.rot.z += 1.0f; } +typedef struct { + /* 0x00 */ Gfx* dList; + /* 0x04 */ f32* hitbox; + /* 0x08 */ f32 scale; + /* 0x0C */ f32 info_unk_10; + /* 0x10 */ f32 unk_10; + /* 0x14 */ u8 info_unk_16; + /* 0x15 */ u8 info_unk_14; + /* 0x16 */ u8 sfx; + /* 0x17 */ u8 info_unk_19; + /* 0x18 */ f32 info_unk_1C; + /* 0x1C */ u8 bonus; +} UnkStruct_D003C; // size = 0x20 + static UnkStruct_D003C D_800D003C[108] = { - /* 0 */ { D_ENMY_PLANET_40068F0, gDefaultCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 1 */ { D_ENMY_PLANET_4006E90, gDefaultCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 2 */ { NULL, gDefaultCubeHitbox100, 1.0f, 20000.0f, 3000.0f, 1, 0, 2, 0, 0.0f, 0 }, - /* 3 */ { D_ENMY_PLANET_4009800, gDefaultCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, - /* 4 */ { D_ENMY_PLANET_40073C0, gDefaultCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 5 */ { D_ENMY_PLANET_4007AF0, gDefaultCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 6 */ { NULL, gDefaultCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, - /* 7 */ { D_CO_6011F90, gDefaultCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 0.0f, 1 }, - /* 8 */ { D_ENMY_PLANET_4000710, gDefaultCubeHitbox100, 1.0f, 100.0f, 3000.0f, 2, 0, 1, 1, 1.0f, 1 }, - /* 9 */ { NULL, gDefaultCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 6, 0, 1.0f, 1 }, - /* 10 */ { D_ENMY_SPACE_400BD20, gDefaultCubeHitbox200, 2.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 11 */ { D_ENMY_SPACE_4001310, gDefaultCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 6, 0, 1.0f, 1 }, - /* 12 */ { D_ENMY_SPACE_400B390, gDefaultCubeHitbox100, 2.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 13 */ { D_ME_6018C00, gDefaultCubeHitbox100, 2.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 14 */ { D_ME_601F2A0, gDefaultCubeHitbox400, 7.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 15 */ { D_ENMY_SPACE_400AAE0, gDefaultCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 16 */ { D_ENMY_SPACE_4000650, gDefaultCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 6, 0, 1.0f, 1 }, + /* 0 */ { D_ENMY_PLANET_40068F0, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 1 */ { D_ENMY_PLANET_4006E90, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 2 */ { NULL, gCubeHitbox100, 1.0f, 20000.0f, 3000.0f, 1, 0, 2, 0, 0.0f, 0 }, + /* 3 */ { D_ENMY_PLANET_4009800, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, + /* 4 */ { D_ENMY_PLANET_40073C0, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 5 */ { D_ENMY_PLANET_4007AF0, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 6 */ { NULL, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, + /* 7 */ { D_CO_6011F90, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 0.0f, 1 }, + /* 8 */ { D_ENMY_PLANET_4000710, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 2, 0, 1, 1, 1.0f, 1 }, + /* 9 */ { NULL, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 6, 0, 1.0f, 1 }, + /* 10 */ { D_ENMY_SPACE_400BD20, gCubeHitbox200, 2.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 11 */ { D_ENMY_SPACE_4001310, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 6, 0, 1.0f, 1 }, + /* 12 */ { D_ENMY_SPACE_400B390, gCubeHitbox100, 2.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 13 */ { D_ME_6018C00, gCubeHitbox100, 2.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 14 */ { D_ME_601F2A0, gCubeHitbox400, 7.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 15 */ { D_ENMY_SPACE_400AAE0, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 16 */ { D_ENMY_SPACE_4000650, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 6, 0, 1.0f, 1 }, /* 17 */ { D_A6_6016190, D_A6_60282A0, -2.0f, 2100.0f, 3000.0f, 0, 0, 7, 0, 0.0f, 5 }, - /* 18 */ { D_SX_6023500, gDefaultCubeHitbox200, 2.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 19 */ { D_SX_6022DF0, gDefaultCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 20 */ { NULL, gDefaultCubeHitbox100, 1.0f, 100.0f, 3000.0f, 2, 1, 1, 0, 0.0f, 1 }, - /* 21 */ { NULL, gDefaultCubeHitbox200, 2.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 0.0f, 1 }, - /* 22 */ { NULL, gDefaultCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 0.0f, 1 }, - /* 23 */ { D_ENMY_SPACE_4008FA0, gDefaultCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 18 */ { D_SX_6023500, gCubeHitbox200, 2.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 19 */ { D_SX_6022DF0, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 20 */ { NULL, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 2, 1, 1, 0, 0.0f, 1 }, + /* 21 */ { NULL, gCubeHitbox200, 2.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 0.0f, 1 }, + /* 22 */ { NULL, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 0.0f, 1 }, + /* 23 */ { D_ENMY_SPACE_4008FA0, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, /* 24 */ { D_SX_60285F0, D_SX_603298C, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, /* 25 */ { D_SX_600AF70, D_SX_6032904, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, /* 26 */ { D_SX_6023E30, D_SX_6032970, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, @@ -908,61 +922,61 @@ static UnkStruct_D003C D_800D003C[108] = { /* 30 */ { D_A6_6012A40, D_A6_6028254, -2.0f, 2100.0f, 3001.0f, 0, 0, 7, 0, 0.0f, 2 }, /* 31 */ { NULL, D_A6_60280E0, -2.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 3 }, /* 32 */ { D_SX_6009950, D_SX_6032878, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 33 */ { NULL, gDefaultCubeHitbox200, 2.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, + /* 33 */ { NULL, gCubeHitbox200, 2.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, /* 34 */ { D_SX_600B2B0, D_SX_6032894, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, /* 35 */ { D_SX_600A2E0, D_SX_60328B0, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 36 */ { NULL, gDefaultCubeHitbox400, 2.0f, 200.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 37 */ { D_SX_600B830, gDefaultCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 36 */ { NULL, gCubeHitbox400, 2.0f, 200.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 37 */ { D_SX_600B830, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, /* 38 */ { NULL, D_SX_603238C, 1.0f, 500.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, /* 39 */ { D_SX_6020D20, D_SX_60328CC, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 40 */ { NULL, gHitboxNone, 1.0f, 100.0f, 3001.0f, 2, 0, 0, 0, 0.0f, 1 }, + /* 40 */ { NULL, gNoHitbox, 1.0f, 100.0f, 3001.0f, 2, 0, 0, 0, 0.0f, 1 }, /* 41 */ { D_SY_60097E0, D_SY_6034478, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, /* 42 */ { D_SY_601D730, D_SY_603450C, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 43 */ { NULL, gDefaultCubeHitbox100, 1.0f, 20000.0f, 3000.0f, 1, 0, 2, 0, 0.0f, 0 }, + /* 43 */ { NULL, gCubeHitbox100, 1.0f, 20000.0f, 3000.0f, 1, 0, 2, 0, 0.0f, 0 }, /* 44 */ { D_SY_60102C0, D_SY_6034588, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 45 */ { D_ME_6017B60, gDefaultCubeHitbox200, -1.0f, 300.0f, 3001.0f, 0, 0, 0, 0, 1.0f, 1 }, - /* 46 */ { D_ZO_6004D00, gDefaultCubeHitbox200, 1.0f, 100.0f, 3000.0f, 1, 0, 4, 0, 1.0f, 1 }, - /* 47 */ { D_ME_601A880, gDefaultCubeHitbox100, -1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, + /* 45 */ { D_ME_6017B60, gCubeHitbox200, -1.0f, 300.0f, 3001.0f, 0, 0, 0, 0, 1.0f, 1 }, + /* 46 */ { D_ZO_6004D00, gCubeHitbox200, 1.0f, 100.0f, 3000.0f, 1, 0, 4, 0, 1.0f, 1 }, + /* 47 */ { D_ME_601A880, gCubeHitbox100, -1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, /* 48 */ { NULL, D_SY_603405C, 0.3f, 100.0f, 3000.0f, 0, 0, 1, 0, 1.0f, 1 }, /* 49 */ { NULL, D_SY_603405C, 0.3f, 100.0f, 3000.0f, 0, 0, 1, 0, 1.0f, 1 }, /* 50 */ { NULL, D_SY_603405C, 0.3f, 100.0f, 3000.0f, 0, 0, 1, 0, 1.0f, 1 }, /* 51 */ { D_SY_6015D60, D_SY_6034124, 2.0f, 100.0f, 3000.0f, 0, 0, 1, 0, 1.0f, 1 }, /* 52 */ { NULL, D_ZO_602C1A0, -1.0f, 1000.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, /* 53 */ { D_SX_600B540, D_SX_60328E8, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 54 */ { D_ENMY_SPACE_4000EC0, gDefaultCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 55 */ { D_ENMY_SPACE_4008D50, gDefaultCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 56 */ { NULL, gHitboxNone, -1.0f, 2000.0f, 3000.0f, 0, 0, 3, 0, 0.0f, 1 }, - /* 57 */ { D_SY_60102C0, gHitboxNone, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 58 */ { D_SY_601F3D0, gHitboxNone, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 59 */ { D_SY_6022B10, gHitboxNone, 2.0f, 100.0f, 3000.0f, 0, 0, 1, 0, 0.0f, 1 }, - /* 60 */ { D_SY_60209F0, gHitboxNone, 2.0f, 100.0f, 3000.0f, 0, 0, 1, 0, 0.0f, 1 }, - /* 61 */ { D_ME_6019430, gDefaultCubeHitbox200, 2.5f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, - /* 62 */ { D_ME_6018960, gDefaultCubeHitbox100, 2.5f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, - /* 63 */ { D_ME_6009F50, gHitboxNone, -1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, - /* 64 */ { NULL, gDefaultCubeHitbox200, 3.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, - /* 65 */ { D_ME_600C2A0, gDefaultCubeHitbox200, -1.0f, 100.0f, 8000.0f, 1, 0, 0, 0, 0.0f, 1 }, - /* 66 */ { D_ME_600BD40, gDefaultCubeHitbox100, -1.0f, 100.0f, 8000.0f, 1, 0, 0, 0, 0.0f, 1 }, + /* 54 */ { D_ENMY_SPACE_4000EC0, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 55 */ { D_ENMY_SPACE_4008D50, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 56 */ { NULL, gNoHitbox, -1.0f, 2000.0f, 3000.0f, 0, 0, 3, 0, 0.0f, 1 }, + /* 57 */ { D_SY_60102C0, gNoHitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* 58 */ { D_SY_601F3D0, gNoHitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* 59 */ { D_SY_6022B10, gNoHitbox, 2.0f, 100.0f, 3000.0f, 0, 0, 1, 0, 0.0f, 1 }, + /* 60 */ { D_SY_60209F0, gNoHitbox, 2.0f, 100.0f, 3000.0f, 0, 0, 1, 0, 0.0f, 1 }, + /* 61 */ { D_ME_6019430, gCubeHitbox200, 2.5f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, + /* 62 */ { D_ME_6018960, gCubeHitbox100, 2.5f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, + /* 63 */ { D_ME_6009F50, gNoHitbox, -1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, + /* 64 */ { NULL, gCubeHitbox200, 3.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, + /* 65 */ { D_ME_600C2A0, gCubeHitbox200, -1.0f, 100.0f, 8000.0f, 1, 0, 0, 0, 0.0f, 1 }, + /* 66 */ { D_ME_600BD40, gCubeHitbox100, -1.0f, 100.0f, 8000.0f, 1, 0, 0, 0, 0.0f, 1 }, /* 67 */ { NULL, D_ME_602F604, 3.0f, 100.0f, 3000.0f, 2, 0, 1, 0, 1.0f, 1 }, /* 68 */ { D_SY_60205D0, D_SY_603445C, 3.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, /* 69 */ { D_SY_60036A0, D_SY_6034664, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 70 */ { D_SY_601AD70, gHitboxNone, 4.0f, 100.0f, 3000.0f, 0, 0, 1, 0, 0.0f, 1 }, - /* 71 */ { D_arwing_3007650, gHitboxNone, 1.0f, 100.0f, 3000.0f, 2, 0, 5, 0, 0.0f, 1 }, + /* 70 */ { D_SY_601AD70, gNoHitbox, 4.0f, 100.0f, 3000.0f, 0, 0, 1, 0, 0.0f, 1 }, + /* 71 */ { D_arwing_3007650, gNoHitbox, 1.0f, 100.0f, 3000.0f, 2, 0, 5, 0, 0.0f, 1 }, /* 72 */ { D_SY_60034D0, D_SY_60347D4, 3.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, /* 73 */ { D_SY_6005360, D_SY_6034770, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, /* 74 */ { D_SY_600F6C0, D_SY_60347F0, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 75 */ { D_SY_601B610, gHitboxNone, -1.0f, 10000.0f, 3001.0f, 0, 0, 1, 0, 0.0f, 1 }, - /* 76 */ { D_SY_601C6A0, gHitboxNone, -1.0f, 10000.0f, 3001.0f, 0, 0, 1, 0, 0.0f, 1 }, + /* 75 */ { D_SY_601B610, gNoHitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, 1, 0, 0.0f, 1 }, + /* 76 */ { D_SY_601C6A0, gNoHitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, 1, 0, 0.0f, 1 }, /* 77 */ { D_SY_60188D0, D_SY_603486C, 3.0f, 100.0f, 3001.0f, 0, 0, 1, 0, 0.0f, 1 }, - /* 78 */ { NULL, gDefaultCubeHitbox150, 1.0f, 100.0f, 3000.0f, 2, 0, 0, 0, 1.0f, 0 }, + /* 78 */ { NULL, gCubeHitbox150, 1.0f, 100.0f, 3000.0f, 2, 0, 0, 0, 1.0f, 0 }, /* 79 */ { NULL, D_ZO_602C294, 1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 1.0f, 1 }, /* 80 */ { NULL, D_VE1_601B474, -1.0f, 100.0f, 3000.0f, 2, 0, 0, 0, 0.0f, 1 }, - /* 81 */ { NULL, gHitboxNone, -1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 82 */ { NULL, gDefaultCubeHitbox100, 2.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 81 */ { NULL, gNoHitbox, -1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* 82 */ { NULL, gCubeHitbox100, 2.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, /* 83 */ { NULL, D_AQ_6030B4C, 1.0f, 100.0f, 3000.0f, 2, 0, 0, 0, 60.0f, 1 }, /* 84 */ { D_VE1_9012180, D_VE1_601B43C, -1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 85 */ { NULL, gDefaultCubeHitbox100, 1.0f, 20000.0f, 3000.0f, 1, 0, 2, 0, 0.0f, 0 }, - /* 86 */ { NULL, gDefaultCubeHitbox100, 1.0f, 20000.0f, 3000.0f, 1, 0, 2, 0, 0.0f, 0 }, - /* 87 */ { D_VE1_900EFC0, gHitboxNone, 1.0f, 100.0f, 3000.0f, 1, 1, 0, 0, 0.0f, 1 }, + /* 85 */ { NULL, gCubeHitbox100, 1.0f, 20000.0f, 3000.0f, 1, 0, 2, 0, 0.0f, 0 }, + /* 86 */ { NULL, gCubeHitbox100, 1.0f, 20000.0f, 3000.0f, 1, 0, 2, 0, 0.0f, 0 }, + /* 87 */ { D_VE1_900EFC0, gNoHitbox, 1.0f, 100.0f, 3000.0f, 1, 1, 0, 0, 0.0f, 1 }, /* 88 */ { NULL, D_AQ_6030B30, 1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, /* 89 */ { NULL, D_AQ_6030B14_f32, 1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, /* 90 */ { D_MA_601C520, D_MA_60368FC, 1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, @@ -970,18 +984,18 @@ static UnkStruct_D003C D_800D003C[108] = { /* 92 */ { D_WZ_7000C40, gWarpZoneEvent92Hitbox, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, /* 93 */ { D_WZ_70010E0, gWarpZoneEvent93Hitbox, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, /* 94 */ { D_WZ_7000E80, gWarpZoneEvent94Hitbox, 2.5f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, - /* 95 */ { D_WZ_70008F0, gDefaultCubeHitbox100, -1.0f, 100.0f, 8000.0f, 1, 0, 0, 0, 0.0f, 0 }, + /* 95 */ { D_WZ_70008F0, gCubeHitbox100, -1.0f, 100.0f, 8000.0f, 1, 0, 0, 0, 0.0f, 0 }, /* 96 */ { D_WZ_7000280, gWarpZoneEvent96Hitbox, -1.0f, 1000.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 0 }, - /* 97 */ { D_ME_600AC70, gDefaultCubeHitbox100, -1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, + /* 97 */ { D_ME_600AC70, gCubeHitbox100, -1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, /* 98 */ { D_MA_601A2B0, D_MA_60364C0, 1.0f, 100.0f, 3000.0f, 1, 1, 0, 0, 0.0f, 1 }, /* 99 */ { D_VE1_6002500, D_VE1_601B944, -1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 100 */ { D_VE1_60043F0, gHitboxNone, -1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 101 */ { D_VE1_6004310, gHitboxNone, -1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* 100 */ { D_VE1_60043F0, gNoHitbox, -1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* 101 */ { D_VE1_6004310, gNoHitbox, -1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, /* 102 */ { D_TR_6002740, D_TR_6009D18, -1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 103 */ { NULL, gHitboxNone, -1.0f, 500.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* 104 */ { NULL, gHitboxNone, -1.0f, 500.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* 105 */ { NULL, gDefaultCubeHitbox200, 1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 1.0f, 1 }, - /* 106 */ { NULL, gDefaultCubeHitbox100, 1.0f, 100.0f, 3000.0f, 0, 0, 6, 0, 0.0f, 0 }, + /* 103 */ { NULL, gNoHitbox, -1.0f, 500.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* 104 */ { NULL, gNoHitbox, -1.0f, 500.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* 105 */ { NULL, gCubeHitbox200, 1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 1.0f, 1 }, + /* 106 */ { NULL, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 0, 0, 6, 0, 0.0f, 0 }, /* 107 */ { D_MA_6002890, D_MA_60368E0, -1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, }; static u8 D_800D0DBC[6][4] = { @@ -1079,7 +1093,7 @@ void ActorEvent_ProcessScript(ActorEvent* this) { if ((this->unk_0B4 >= EINFO_200) && (this->unk_0B4 < EINFO_300)) { this->unk_046 = 100; - this->info.hitbox = gDefaultCubeHitbox200; + this->info.hitbox = gCubeHitbox200; this->info.unk_1C = 1.0f; for (i = 0; i < 2; i++) { @@ -1224,7 +1238,7 @@ void ActorEvent_ProcessScript(ActorEvent* this) { } if (actorScript[this->aiIndex + 1] == EVACT_ME_AS_CLOSE) { - this->info.hitbox = SEGMENTED_TO_VIRTUAL(gDefaultCubeHitbox200); + this->info.hitbox = SEGMENTED_TO_VIRTUAL(gCubeHitbox200); this->state = EVSTATE_ME_AS_CLOSE; this->aiIndex += 2; break; @@ -2091,7 +2105,7 @@ void ActorEvent_800701E0(ActorEvent* this) { this->timer_04C = RAND_INT(2.9f); if (this->unk_0B4 == EINFO_2) { this->timer_04C = 1; - if (this->obj.pos.x < this->unk_0D8.x) { + if (this->obj.pos.x < this->hitPos.x) { func_play_800A69F8(1, this->obj.pos.x + 20.0f, this->obj.pos.y, this->obj.pos.z); this->fwork[17] = 777.0f; } else { @@ -2172,7 +2186,7 @@ void ActorEvent_800701E0(ActorEvent* this) { if (((gLevelMode == LEVELMODE_ALL_RANGE) || (gLevelMode == LEVELMODE_UNK_2)) && (this->unk_0B4 != EINFO_21) && (this->unk_0B4 != EINFO_23)) { this->fwork[13] = 20.0f; - if (this->obj.pos.x < this->unk_0D8.x) { + if (this->obj.pos.x < this->hitPos.x) { this->fwork[13] *= -1.0f; } } @@ -2222,7 +2236,7 @@ void ActorEvent_800701E0(ActorEvent* this) { sp3C.z = this->vel.z; if ((Object_CheckCollision(this->index, &this->obj.pos, &sp3C, 0) != 0) || - (this->obj.pos.y < (gGroundLevel + 20.0f))) { + (this->obj.pos.y < (gGroundHeight + 20.0f))) { this->obj.status = OBJ_DYING; this->obj.pos.z -= this->vel.z; this->unk_0D0 = 1; @@ -2243,8 +2257,8 @@ void ActorEvent_80070BA8(ActorEvent* this) { this->unk_0D0 = 0; if ((this->unk_0B4 != EINFO_17) || ((this->unk_0B4 == EINFO_17) && (this->unk_0D2 == 0))) { this->timer_0C6 = 10; - func_effect_8007C120(this->unk_0D8.x, this->unk_0D8.y, this->unk_0D8.z, this->vel.x, this->vel.y, - this->vel.z, 0.2f, 10); + func_effect_8007C120(this->hitPos.x, this->hitPos.y, this->hitPos.z, this->vel.x, this->vel.y, this->vel.z, + 0.2f, 10); this->health -= this->damage; AUDIO_PLAY_SFX(0x29033064, this->sfxSource, 4); if (this->health <= 0) { @@ -3776,7 +3790,7 @@ bool ActorEvent_OverrideLimbDraw3(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* return false; } -s32 Obj111_Draw(Object80_111* this) { +s32 Obj111_Draw(Scenery_111* this) { RCP_SetupDL(&gMasterDisp, 0x3C); gSPDisplayList(gMasterDisp++, D_SY_601AD70); RCP_SetupDL(&gMasterDisp, 0x40); @@ -4216,7 +4230,7 @@ void func_enmy2_800763A4(Actor* actor) { sp60 = Object_CheckCollision(actor->index, &actor->obj.pos, &sp4C, 0); - if ((sp60 != 0) || (actor->obj.pos.y < (gGroundLevel + 30.0f))) { + if ((sp60 != 0) || (actor->obj.pos.y < (gGroundHeight + 30.0f))) { if ((Rand_ZeroOne() < 0.5f) && (actor->timer_04C < 3) && (gLevelType == LEVELTYPE_PLANET) && (sp60 != 999) && (gGroundType != GROUNDTYPE_WATER) && ((actor->vel.z < -20.0f) || (actor->vel.z > 0.0f))) { @@ -4254,16 +4268,16 @@ void func_enmy2_800763A4(Actor* actor) { } } } else { - if ((actor->obj.pos.y < (gGroundLevel + 30.0f)) && (gLevelType == LEVELTYPE_PLANET)) { + if ((actor->obj.pos.y < (gGroundHeight + 30.0f)) && (gLevelType == LEVELTYPE_PLANET)) { actor->vel.z = 0.0f; if (gGroundType == GROUNDTYPE_WATER) { - func_effect_8007D9DC(actor->obj.pos.x, gGroundLevel + 2.0f, actor->obj.pos.z, 3.0f, 20.0f, + func_effect_8007D9DC(actor->obj.pos.x, gGroundHeight + 2.0f, actor->obj.pos.z, 3.0f, 20.0f, 0); - func_effect_8007D9DC(actor->obj.pos.x, gGroundLevel + 2.0f, actor->obj.pos.z, 3.0f, 20.0f, + func_effect_8007D9DC(actor->obj.pos.x, gGroundHeight + 2.0f, actor->obj.pos.z, 3.0f, 20.0f, 10); - func_effect_8007D9DC(actor->obj.pos.x, gGroundLevel + 2.0f, actor->obj.pos.z, 3.0f, 20.0f, + func_effect_8007D9DC(actor->obj.pos.x, gGroundHeight + 2.0f, actor->obj.pos.z, 3.0f, 20.0f, 20); - func_effect_8007ADF4(actor->obj.pos.x, gGroundLevel, actor->obj.pos.z, 0.1f, 3.0f); + func_effect_8007ADF4(actor->obj.pos.x, gGroundHeight, actor->obj.pos.z, 0.1f, 3.0f); } else { func_beam_800365E4(actor->obj.pos.x, 3.0f, actor->obj.pos.z, actor->obj.pos.x, actor->obj.pos.z, 0.0f, 0.0f, 90.0f, 6.5f, 0, 0); @@ -4271,7 +4285,7 @@ void func_enmy2_800763A4(Actor* actor) { func_effect_8007C120(actor->obj.pos.x, 20.0f, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, actor->scale * 0.05f, 30); if ((gCurrentLevel == LEVEL_FORTUNA) || (gCurrentLevel == LEVEL_VENOM_2)) { - func_effect_8007C688(actor->obj.pos.x, gGroundLevel + 30.0f, actor->obj.pos.z, 3.0f, 60); + func_effect_8007C688(actor->obj.pos.x, gGroundHeight + 30.0f, actor->obj.pos.z, 3.0f, 60); if (gCurrentLevel == LEVEL_FORTUNA) { func_enmy_80062C38(actor->obj.pos.x, actor->obj.pos.z); } diff --git a/src/engine/fox_game.c b/src/engine/fox_game.c index d0265358..389eb086 100644 --- a/src/engine/fox_game.c +++ b/src/engine/fox_game.c @@ -8,13 +8,13 @@ f32 D_game_80161A14; s32 gPlayerInactive[4]; s32 D_game_80161A28; u8 gShowHud; -u16 gNextLevelStage; +u16 gNextLevelPhase; u16 gNextLevel; u16 gNextGameState; u16 D_game_80161A34; u16 gBgColor; u8 gBlurAlpha; -u8 D_game_80161A39; +u8 gGameStandby; f32 gFovY; f32 gProjectNear; f32 gProjectFar; @@ -25,28 +25,28 @@ static s32 sVsCameraULx[] = { 0, SCREEN_WIDTH / 2, 0, SCREEN_WIDTH / 2 }; static s32 sVsCameraLRx[] = { SCREEN_WIDTH / 2 - 1, SCREEN_WIDTH - 1, SCREEN_WIDTH / 2 - 1, SCREEN_WIDTH - 1 }; static s32 sVsCameraULy[] = { 0, 0, SCREEN_HEIGHT / 2, SCREEN_HEIGHT / 2 }; static s32 sVsCameraLRy[] = { SCREEN_HEIGHT / 2 - 1, SCREEN_HEIGHT / 2 - 1, SCREEN_HEIGHT - 1, SCREEN_HEIGHT - 1 }; -static s32 sOverlaySetups[] = { - /* LEVEL_CORNERIA */ OVL_SETUP_CORNERIA, - /* LEVEL_METEO */ OVL_SETUP_METEO, - /* LEVEL_SECTOR_X */ OVL_SETUP_SECTOR_X, - /* LEVEL_AREA_6 */ OVL_SETUP_AREA_6, - /* LEVEL_UNK_4 */ OVL_SETUP_UNK_4, - /* LEVEL_SECTOR_Y */ OVL_SETUP_SECTOR_Y, - /* LEVEL_VENOM_1 */ OVL_SETUP_VENOM_1, - /* LEVEL_SOLAR */ OVL_SETUP_SOLAR, - /* LEVEL_ZONESS */ OVL_SETUP_ZONESS, - /* LEVEL_VENOM_ANDROSS */ OVL_SETUP_VENOM_ANDROSS, - /* LEVEL_TRAINING */ OVL_SETUP_TRAINING, - /* LEVEL_MACBETH */ OVL_SETUP_MACBETH, - /* LEVEL_TITANIA */ OVL_SETUP_TITANIA, - /* LEVEL_AQUAS */ OVL_SETUP_AQUAS, - /* LEVEL_FORTUNA */ OVL_SETUP_FORTUNA, - /* LEVEL_UNK_15 */ OVL_SETUP_TITLE, - /* LEVEL_KATINA */ OVL_SETUP_KATINA, - /* LEVEL_BOLSE */ OVL_SETUP_BOLSE, - /* LEVEL_SECTOR_Z */ OVL_SETUP_SECTOR_Z, - /* LEVEL_VENOM_2 */ OVL_SETUP_VENOM_2, - /* LEVEL_VERSUS */ OVL_SETUP_VERSUS, +static s32 sLevelSceneIds[] = { + /* LEVEL_CORNERIA */ SCENE_CORNERIA, + /* LEVEL_METEO */ SCENE_METEO, + /* LEVEL_SECTOR_X */ SCENE_SECTOR_X, + /* LEVEL_AREA_6 */ SCENE_AREA_6, + /* LEVEL_UNK_4 */ SCENE_UNK_4, + /* LEVEL_SECTOR_Y */ SCENE_SECTOR_Y, + /* LEVEL_VENOM_1 */ SCENE_VENOM_1, + /* LEVEL_SOLAR */ SCENE_SOLAR, + /* LEVEL_ZONESS */ SCENE_ZONESS, + /* LEVEL_VENOM_ANDROSS */ SCENE_VENOM_ANDROSS, + /* LEVEL_TRAINING */ SCENE_TRAINING, + /* LEVEL_MACBETH */ SCENE_MACBETH, + /* LEVEL_TITANIA */ SCENE_TITANIA, + /* LEVEL_AQUAS */ SCENE_AQUAS, + /* LEVEL_FORTUNA */ SCENE_FORTUNA, + /* LEVEL_UNK_15 */ SCENE_TITLE, + /* LEVEL_KATINA */ SCENE_KATINA, + /* LEVEL_BOLSE */ SCENE_BOLSE, + /* LEVEL_SECTOR_Z */ SCENE_SECTOR_Z, + /* LEVEL_VENOM_2 */ SCENE_VENOM_2, + /* LEVEL_VERSUS */ SCENE_VERSUS, }; void Game_Initialize(void) { @@ -61,10 +61,10 @@ void Game_Initialize(void) { gProjectNear = 10.0f; gProjectFar = 12800.0f; D_game_80161A10 = D_game_80161A14 = 0.0f; - gOverlaySetup = OVL_SETUP_LOGO; - gOverlayStage = 0; - Overlay_InitDma(); - D_game_80161A39 = true; + gSceneId = SCENE_LOGO; + gSceneSetup = 0; + Load_InitDmaAndMsg(); + gGameStandby = true; } void Game_SetGameState(void) { @@ -79,9 +79,9 @@ void Game_SetGameState(void) { gCurrentLevel = gNextLevel; Play_Setup(); gPlayState = PLAY_STANDBY; - gLevelStage = gNextLevelStage; - gNextLevelStage = 0; - if ((gLevelStage != 0) && (gCurrentLevel != LEVEL_VENOM_ANDROSS)) { + gLevelPhase = gNextLevelPhase; + gNextLevelPhase = 0; + if ((gLevelPhase != 0) && (gCurrentLevel != LEVEL_VENOM_ANDROSS)) { D_ctx_8017782C = 0; } break; @@ -98,10 +98,10 @@ void Game_SetGameState(void) { gNextGameStateTimer = 3; gAllRangeCheckpoint = 0; gNextGameState = GSTATE_NONE; - gOverlayStage = 0; + gSceneSetup = 0; gFillScreenColor = gBgColor = 0; D_ctx_80177D20 = 0.0f; - if ((gCurrentLevel == LEVEL_VENOM_2) && (gLevelStage == 2)) { + if ((gCurrentLevel == LEVEL_VENOM_2) && (gLevelPhase == 2)) { gFillScreenColor = gBgColor = 0xFFFF; // 248, 248, 248 gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; } else { @@ -109,30 +109,30 @@ void Game_SetGameState(void) { Audio_FadeOutAll(1); } gFillScreenAlpha = 255; - gPlayerFillScreenAlphas[0] = 0; + gPlayerGlareAlphas[0] = 0; gRadioState = 0; - D_ctx_80178428 = 0.0f; + gStarfieldRoll = 0.0f; gBlurAlpha = 255; gDrawMode = DRAW_NONE; Audio_ClearVoice(); Audio_SetBaseSfxReverb(0); } -bool func_game_800A1B6C(void) { +bool Game_ChangeScene(void) { static u8 sHoldTimer = 0; - static u8 sOverlaySelect = 99; - static u8 sCurrentOverlay = 99; - static u8 sCurrentStage = 99; + static u8 sSceneSelect = SCENE_LOGO; + static u8 sCurrentSceneId = SCENE_LOGO; + static u8 sCurrentSetup = SCENE_LOGO; - if (gOverlaySetup != sCurrentOverlay) { + if (gSceneId != sCurrentSceneId) { sHoldTimer = 2; - sCurrentOverlay = gOverlaySetup; + sCurrentSceneId = gSceneId; } if (sHoldTimer == 0) { - sOverlaySelect = sCurrentOverlay; - sCurrentStage = gOverlayStage; + sSceneSelect = sCurrentSceneId; + sCurrentSetup = gSceneSetup; } - Overlay_Load(sOverlaySelect, sCurrentStage); + Load_SceneSetup(sSceneSelect, sCurrentSetup); if (sHoldTimer) { sHoldTimer--; @@ -141,7 +141,7 @@ bool func_game_800A1B6C(void) { return false; } -void func_game_800A1C14(Gfx** dList) { +void Game_InitMasterDL(Gfx** dList) { gSPDisplayList((*dList)++, gRcpInitDL); gDPSetScissor((*dList)++, G_SC_NON_INTERLACE, SCREEN_MARGIN, SCREEN_MARGIN, SCREEN_WIDTH - SCREEN_MARGIN, SCREEN_HEIGHT - SCREEN_MARGIN); @@ -168,26 +168,26 @@ void func_game_800A1C14(Gfx** dList) { gDPSetColorDither((*dList)++, G_CD_MAGICSQ); } -void func_game_800A1E68(Gfx** arg0) { - gSPDisplayList((*arg0)++, gRcpInitDL); - gDPSetScissor((*arg0)++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT * 3); - gDPSetFillColor((*arg0)++, FILL_COLOR(0x0001)); - gDPSetColorImage((*arg0)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, gFrameBuffers[0].data); - gDPFillRectangle((*arg0)++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT * 3 - 1); - gDPPipeSync((*arg0)++); - gDPSetColorDither((*arg0)++, G_CD_MAGICSQ); +void Game_InitStandbyDL(Gfx** dList) { + gSPDisplayList((*dList)++, gRcpInitDL); + gDPSetScissor((*dList)++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT * 3); + gDPSetFillColor((*dList)++, FILL_COLOR(0x0001)); + gDPSetColorImage((*dList)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, gFrameBuffers[0].data); + gDPFillRectangle((*dList)++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT * 3 - 1); + gDPPipeSync((*dList)++); + gDPSetColorDither((*dList)++, G_CD_MAGICSQ); } -void func_game_800A1F44(void) { +void Game_InitFullViewport(void) { gViewport->vp.vscale[0] = gViewport->vp.vtrans[0] = SCREEN_WIDTH * 2; gViewport->vp.vscale[1] = gViewport->vp.vtrans[1] = SCREEN_HEIGHT * 2; gViewport->vp.vscale[2] = gViewport->vp.vtrans[2] = G_MAXZ / 2; gViewport->vp.vscale[3] = gViewport->vp.vtrans[3] = 0; } -void func_game_800A1FB0(Gfx** arg0, u8 arg1, u8 arg2) { - if ((arg1 != 1) && (arg1 == 4)) { - switch (arg2) { +void Game_InitViewport(Gfx** dList, u8 camCount, u8 camIndex) { + if ((camCount != 1) && (camCount == 4)) { + switch (camIndex) { case 0: gViewport->vp.vscale[0] = SCREEN_WIDTH * (D_game_80161A14 - 1.0f) * 2; gViewport->vp.vscale[1] = SCREEN_HEIGHT * (D_game_80161A14 - 1.0f) * 2; @@ -197,7 +197,7 @@ void func_game_800A1FB0(Gfx** arg0, u8 arg1, u8 arg2) { gViewport->vp.vtrans[1] = SCREEN_HEIGHT * (2.0f - D_game_80161A14) * 2; gViewport->vp.vtrans[2] = G_MAXZ / 2; gViewport->vp.vtrans[3] = 0; - gDPSetScissor((*arg0)++, G_SC_NON_INTERLACE, SCREEN_MARGIN, SCREEN_MARGIN, SCREEN_WIDTH / 2, + gDPSetScissor((*dList)++, G_SC_NON_INTERLACE, SCREEN_MARGIN, SCREEN_MARGIN, SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2); break; case 1: @@ -209,7 +209,7 @@ void func_game_800A1FB0(Gfx** arg0, u8 arg1, u8 arg2) { gViewport->vp.vtrans[1] = SCREEN_HEIGHT * (2.0f - D_game_80161A14) * 2; gViewport->vp.vtrans[2] = G_MAXZ / 2; gViewport->vp.vtrans[3] = 0; - gDPSetScissor((*arg0)++, G_SC_NON_INTERLACE, SCREEN_WIDTH / 2, SCREEN_MARGIN, + gDPSetScissor((*dList)++, G_SC_NON_INTERLACE, SCREEN_WIDTH / 2, SCREEN_MARGIN, SCREEN_WIDTH - SCREEN_MARGIN, SCREEN_HEIGHT / 2); break; case 2: @@ -221,7 +221,7 @@ void func_game_800A1FB0(Gfx** arg0, u8 arg1, u8 arg2) { gViewport->vp.vtrans[1] = SCREEN_HEIGHT * D_game_80161A14 * 2; gViewport->vp.vtrans[2] = G_MAXZ / 2; gViewport->vp.vtrans[3] = 0; - gDPSetScissor((*arg0)++, G_SC_NON_INTERLACE, SCREEN_MARGIN, SCREEN_HEIGHT / 2, SCREEN_WIDTH / 2, + gDPSetScissor((*dList)++, G_SC_NON_INTERLACE, SCREEN_MARGIN, SCREEN_HEIGHT / 2, SCREEN_WIDTH / 2, SCREEN_HEIGHT - SCREEN_MARGIN); break; case 3: @@ -233,18 +233,18 @@ void func_game_800A1FB0(Gfx** arg0, u8 arg1, u8 arg2) { gViewport->vp.vtrans[1] = SCREEN_HEIGHT * D_game_80161A14 * 2; gViewport->vp.vtrans[2] = G_MAXZ / 2; gViewport->vp.vtrans[3] = 0; - gDPSetScissor((*arg0)++, G_SC_NON_INTERLACE, SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2, + gDPSetScissor((*dList)++, G_SC_NON_INTERLACE, SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2, SCREEN_WIDTH - SCREEN_MARGIN, SCREEN_HEIGHT - SCREEN_MARGIN); break; default: - func_game_800A1F44(); + Game_InitFullViewport(); break; } } else { - func_game_800A1F44(); + Game_InitFullViewport(); if (1) {} } - gSPViewport((*arg0)++, gViewport++); + gSPViewport((*dList)++, gViewport++); } void Game_Draw(s32 playerNum) { @@ -252,23 +252,23 @@ void Game_Draw(s32 playerNum) { case DRAW_NONE: break; case DRAW_TITLE: - func_bg_8003DAF0(); + Background_DrawStarfield(); OvlMenu_CallFunction(OVLCALL_TITLE_DRAW, NULL); break; case DRAW_OPTION: - func_bg_8003DAF0(); + Background_DrawStarfield(); OvlMenu_CallFunction(OVLCALL_OPTION_DRAW, NULL); break; case DRAW_MAP: - func_bg_8003DAF0(); + Background_DrawStarfield(); OvlMenu_CallFunction(OVLCALL_MAP_DRAW, NULL); break; case DRAW_PLAY: gPlayerNum = playerNum; Play_Draw(); break; - case DRAW_UNK_MAP: - func_bg_8003DAF0(); + case DRAW_UNK_MAP: // likely game over + Background_DrawStarfield(); OvlMenu_CallFunction(OVLCALL_UNKMAP_DRAW, NULL); break; case DRAW_UNK_VS: @@ -279,63 +279,63 @@ void Game_Draw(s32 playerNum) { func_800A3CA0(); break; case DRAW_ENDING: - func_bg_8003DAF0(); + Background_DrawStarfield(); gPlayerNum = playerNum; - Ending_8018AAC4(); + Ending_Draw(); break; } } -void func_game_800A25DC(void) { +void Game_SetScene(void) { switch (gGameState) { case GSTATE_INIT: - gOverlaySetup = OVL_SETUP_TITLE; - gOverlayStage = 0; + gSceneId = SCENE_TITLE; + gSceneSetup = 0; break; case GSTATE_TITLE: - gOverlaySetup = OVL_SETUP_TITLE; - gOverlayStage = 0; + gSceneId = SCENE_TITLE; + gSceneSetup = 0; break; case GSTATE_MENU: - gOverlaySetup = OVL_SETUP_MENU; - gOverlayStage = 0; + gSceneId = SCENE_MENU; + gSceneSetup = 0; break; case GSTATE_MAP: - gOverlaySetup = OVL_SETUP_MAP; - gOverlayStage = 0; + gSceneId = SCENE_MAP; + gSceneSetup = 0; return; case GSTATE_VS_INIT: - gOverlaySetup = OVL_SETUP_VERSUS; + gSceneId = SCENE_VERSUS; break; case GSTATE_PLAY: - gOverlaySetup = sOverlaySetups[gCurrentLevel]; + gSceneId = sLevelSceneIds[gCurrentLevel]; break; case GSTATE_GAME_OVER: - gOverlaySetup = OVL_SETUP_GAME_OVER; - gOverlayStage = 0; + gSceneId = SCENE_GAME_OVER; + gSceneSetup = 0; break; case GSTATE_ENDING: - gOverlaySetup = OVL_SETUP_CREDITS; + gSceneId = SCENE_CREDITS; break; } } void Game_Update(void) { s32 i; - u8 spBB; - u8 var_v0_3; + u8 partialFill; + u8 soundMode; Game_SetGameState(); - if (D_game_80161A39) { - func_game_800A1E68(&gUnkDisp1); - D_game_80161A39 = false; + if (gGameStandby) { + Game_InitStandbyDL(&gUnkDisp1); + gGameStandby = false; return; } - func_game_800A1C14(&gUnkDisp1); - func_game_800A25DC(); - if (func_game_800A1B6C() != true) { + Game_InitMasterDL(&gUnkDisp1); + Game_SetScene(); + if (Game_ChangeScene() != true) { Lib_InitPerspective(&gUnkDisp1); - func_game_800A1FB0(&gUnkDisp1, gCamCount, 0); + Game_InitViewport(&gUnkDisp1, gCamCount, 0); if (gNextGameStateTimer != 0) { gNextGameStateTimer--; } @@ -378,8 +378,8 @@ void Game_Update(void) { break; case GSTATE_START: gGameState = GSTATE_INIT; - gOverlaySetup = OVL_SETUP_TITLE; - gOverlayStage = 0; + gSceneId = SCENE_TITLE; + gSceneSetup = 0; break; case GSTATE_INIT: gGameState = GSTATE_TITLE; @@ -390,9 +390,10 @@ void Game_Update(void) { gCamCount = 1; gLifeCount[0] = 2; D_ctx_80177D20 = 0.0f; - D_hud_8016170C = gCsFrameCount = D_ctx_80177830 = gLevelStatusScreenTimer = gLevelClearScreenTimer = - D_versus_80178754 = gVersusMode = D_ctx_80177AE0 = D_ctx_80178410 = D_ctx_80177B40 = gPlayState = - gOptionMenuStatus = gDrawMode = gShowBossHealth = gShowHud = gBgColor = gFillScreenAlpha = 0; + D_hud_8016170C = gCsFrameCount = gShowLevelClearStatusScreen = gLevelStartStatusScreenTimer = + gLevelClearScreenTimer = D_versus_80178754 = gVersusMode = D_ctx_80177AE0 = gStarCount = + D_ctx_80177B40 = gPlayState = gOptionMenuStatus = gDrawMode = gShowBossHealth = gShowHud = + gBgColor = gFillScreenAlpha = 0; gNextGameState = D_ctx_80177C94 = D_ctx_80177CAC = D_ctx_80177CB4 = D_ctx_80177CBC = D_ctx_80177CC4 = D_ctx_80177C9C = D_ctx_80177CA4 = D_play_80161A5C = D_game_80161A34 = 0; for (i = 0; i < 4; i++) { @@ -404,9 +405,9 @@ void Game_Update(void) { D_ctx_80177958[i] = 1.0f; D_ctx_80177858[i] = 3; - D_ctx_80177870[i] = 0; + gPlayerForms[i] = FORM_ARWING; gShowCrosshairs[i] = true; - gPlayerFillScreenAlphas[i] = 0; + gPlayerGlareAlphas[i] = 0; } gVersusStage = 0; D_ctx_801778A4 = 3; @@ -415,23 +416,23 @@ void Game_Update(void) { D_play_800D3180[i] = 0; } gExpertMode = false; - gSoundMode = gSaveFile.save.data.soundMode; - switch (gSoundMode) { + gOptionSoundMode = gSaveFile.save.data.soundMode; + switch (gOptionSoundMode) { case OPTIONSOUND_STEREO: - var_v0_3 = SOUNDMODE_STEREO; + soundMode = SOUNDMODE_STEREO; break; case OPTIONSOUND_MONO: - var_v0_3 = SOUNDMODE_MONO; + soundMode = SOUNDMODE_MONO; break; case OPTIONSOUND_HEADSET: - var_v0_3 = SOUNDMODE_HEADSET; + soundMode = SOUNDMODE_HEADSET; break; default: - gSoundMode = OPTIONSOUND_STEREO; - var_v0_3 = SOUNDMODE_STEREO; + gOptionSoundMode = OPTIONSOUND_STEREO; + soundMode = SOUNDMODE_STEREO; break; } - SEQCMD_SET_SOUND_MODE(var_v0_3); + SEQCMD_SET_SOUND_MODE(soundMode); gVolumeSettings[0] = gSaveFile.save.data.musicVolume; gVolumeSettings[1] = gSaveFile.save.data.voiceVolume; gVolumeSettings[2] = gSaveFile.save.data.sfxVolume; @@ -444,9 +445,9 @@ void Game_Update(void) { if (gVolumeSettings[2] > 99) { gVolumeSettings[2] = 99; } - func_8001D8A8(0, gVolumeSettings[0]); - func_8001D8A8(1, gVolumeSettings[1]); - func_8001D8A8(2, gVolumeSettings[2]); + Audio_SetVolume(0, gVolumeSettings[0]); + Audio_SetVolume(1, gVolumeSettings[1]); + Audio_SetVolume(2, gVolumeSettings[2]); break; case GSTATE_TITLE: OvlMenu_CallFunction(OVLCALL_TITLE_UPDATE, NULL); @@ -455,10 +456,10 @@ void Game_Update(void) { OvlMenu_CallFunction(OVLCALL_OPTION_UPDATE, NULL); break; case GSTATE_MAP: - Map_8019E8D0(); + Map_Main(); break; case GSTATE_VS_INIT: - func_versus_800C20B0(); + Versus_StartMatch(); break; case GSTATE_PLAY: Play_Main(); @@ -468,24 +469,24 @@ void Game_Update(void) { break; case GSTATE_ENDING: gDrawMode = DRAW_ENDING; - Ending_8018A96C(); + Ending_Main(); break; default: break; } Game_Draw(0); if (gCamCount == 2) { - func_game_800A1FB0(&gMasterDisp, gCamCount, 1); + Game_InitViewport(&gMasterDisp, gCamCount, 1); Game_Draw(1); gDPPipeSync(gMasterDisp++); gDPSetScissor(gMasterDisp++, G_SC_NON_INTERLACE, SCREEN_MARGIN, SCREEN_MARGIN, SCREEN_WIDTH - SCREEN_MARGIN, SCREEN_HEIGHT - SCREEN_MARGIN); } else if ((gCamCount == 4) && (gDrawMode != DRAW_NONE)) { - func_game_800A1FB0(&gMasterDisp, gCamCount, 3); + Game_InitViewport(&gMasterDisp, gCamCount, 3); Game_Draw(3); - func_game_800A1FB0(&gMasterDisp, gCamCount, 2); + Game_InitViewport(&gMasterDisp, gCamCount, 2); Game_Draw(2); - func_game_800A1FB0(&gMasterDisp, gCamCount, 1); + Game_InitViewport(&gMasterDisp, gCamCount, 1); Game_Draw(1); gDPPipeSync(gMasterDisp++); gDPSetScissor(gMasterDisp++, G_SC_NON_INTERLACE, SCREEN_MARGIN, SCREEN_MARGIN, SCREEN_WIDTH - SCREEN_MARGIN, @@ -513,13 +514,13 @@ void Game_Update(void) { func_hud_8008CB8C(); } - spBB = 0; + partialFill = false; if (gCamCount == 1) { - Graphics_FillRectangle(&gMasterDisp, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, gPlayerFillScreenReds[0], - gPlayerFillScreenGreens[0], gPlayerFillScreenBlues[0], gPlayerFillScreenAlphas[0]); + Graphics_FillRectangle(&gMasterDisp, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, gPlayerGlareReds[0], + gPlayerGlareGreens[0], gPlayerGlareBlues[0], gPlayerGlareAlphas[0]); if ((gDrawMode == DRAW_PLAY) || (gDrawMode == DRAW_ENDING)) { func_radio_800BB5D0(); - if (gShowHud != 0) { + if (gShowHud) { func_hud_8008FA84(); func_hud_8008CA44(); } @@ -532,11 +533,11 @@ void Game_Update(void) { Graphics_FillRectangle(&gMasterDisp, sVsCameraULx[i], sVsCameraULy[i], sVsCameraLRx[i], sVsCameraLRy[i], gFillScreenRed, gFillScreenGreen, gFillScreenBlue, gFillScreenAlpha); - spBB = 1; + partialFill = true; } else { Graphics_FillRectangle(&gMasterDisp, sVsCameraULx[i], sVsCameraULy[i], sVsCameraLRx[i], - sVsCameraLRy[i], gPlayerFillScreenReds[i], gPlayerFillScreenGreens[i], - gPlayerFillScreenBlues[i], gPlayerFillScreenAlphas[i]); + sVsCameraLRy[i], gPlayerGlareReds[i], gPlayerGlareGreens[i], + gPlayerGlareBlues[i], gPlayerGlareAlphas[i]); } } } @@ -547,7 +548,7 @@ void Game_Update(void) { func_versus_800C1ED4(); } func_fade_80084688(0, D_ctx_80177C50); - if (spBB == 0) { + if (!partialFill) { Graphics_FillRectangle(&gMasterDisp, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, gFillScreenRed, gFillScreenGreen, gFillScreenBlue, gFillScreenAlpha); } diff --git a/src/engine/fox_hud.c b/src/engine/fox_hud.c index a66e103f..03affb02 100644 --- a/src/engine/fox_hud.c +++ b/src/engine/fox_hud.c @@ -92,8 +92,7 @@ void func_hud_80087788(void); s16 D_hud_800D1970 = 0; -// unused -UNK_TYPE D_800D1974[14] = { 0 }; +UNK_TYPE D_800D1974[14] = { 0 }; // unused f32 D_800D19AC[] = { 255.0f, 255.0f, 255.0f, 255.0f, 255.0f }; @@ -465,7 +464,7 @@ void func_hud_80086110(f32 arg0, f32 arg1, s32 arg2) { } if ((arg2 <= 0) && (arg2 != -2) && - ((gPlayState == PLAY_PAUSE) || (D_ctx_80177830 == 1) || (gLevelStatusScreenTimer != 0))) { + ((gPlayState == PLAY_PAUSE) || (gShowLevelClearStatusScreen == 1) || (gLevelStartStatusScreenTimer != 0))) { RCP_SetupDL(&gMasterDisp, 0x4C); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); if ((arg2 == 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { @@ -723,11 +722,11 @@ void func_hud_80086CC8(void) { f32 sp18; f32 temp; - if ((gPlayState != PLAY_PAUSE) && (gLevelStatusScreenTimer != 0)) { - gLevelStatusScreenTimer -= 1; + if ((gPlayState != PLAY_PAUSE) && (gLevelStartStatusScreenTimer != 0)) { + gLevelStartStatusScreenTimer -= 1; } - if (gLevelStatusScreenTimer == 1) { + if (gLevelStartStatusScreenTimer == 1) { D_80161718 = 30; D_8016171C = 0; } @@ -735,7 +734,7 @@ void func_hud_80086CC8(void) { temp = 108.0f; sp18 = 81.0f; - if (gLevelStatusScreenTimer != 0) { + if (gLevelStartStatusScreenTimer != 0) { func_hud_80086C08(temp - 4.5f - 32.0f, sp18 - 24.0f - 4.0f, 7.4f, 3.9f); if (gCurrentLevel != LEVEL_TRAINING) { @@ -1052,12 +1051,12 @@ void func_hud_80087B5C(void) { f32 y5; f32 y6; - if (D_ctx_80177830 == 0) { + if (gShowLevelClearStatusScreen == 0) { Audio_KillSfxById(0x41007012); D_801617C0[0] = 0; } - if ((gPlayState != PLAY_PAUSE) && (D_ctx_80177830 == 1) && (!D_801617E8[0])) { + if ((gPlayState != PLAY_PAUSE) && (gShowLevelClearStatusScreen == 1) && (!D_801617E8[0])) { switch (D_801617C0[0]) { case 0: D_801617C0[5] = gHitCount; @@ -1175,7 +1174,7 @@ void func_hud_80087B5C(void) { D_801617C0[6]--; } - if (D_ctx_80177830 == 1) { + if (gShowLevelClearStatusScreen == 1) { x0 = 128.0f; y0 = 30.0f; @@ -1259,14 +1258,14 @@ void func_hud_800884E4(void) { s32 mask; s32 i; - D_ctx_80177B70[gCurrentPlanet] = gHitCount; + D_ctx_80177B70[gMissionNumber] = gHitCount; mask = 0x00FF0000; for (i = 0; i < 3; i++) { if (gTeamShields[3 - i] <= 0) { - D_ctx_80177B50[gCurrentPlanet] ^= mask; + D_ctx_80177B50[gMissionNumber] ^= mask; } else { - D_ctx_80177B50[gCurrentPlanet] |= mask; + D_ctx_80177B50[gMissionNumber] |= mask; } mask >>= 8; } @@ -1291,7 +1290,7 @@ void func_hud_80088564(void) { } if (D_play_800D3180[gCurrentLevel] == 2) { - D_ctx_80177BB0[gCurrentPlanet] = 1; + D_ctx_80177BB0[gMissionNumber] = 1; if (gExpertMode) { gSaveFile.save.data.planet[planetId].expertMedal = 1; @@ -1300,7 +1299,7 @@ void func_hud_80088564(void) { } } - gCurrentPlanet++; + gMissionNumber++; gHitCount = 0; Save_Write(); @@ -1415,7 +1414,7 @@ void func_hud_80088970(void) { player = &gPlayer[gPlayerNum]; - if ((gPlayState == PLAY_PAUSE) && !gLevelStatusScreenTimer && !gVersusMode) { + if ((gPlayState == PLAY_PAUSE) && !gLevelStartStatusScreenTimer && !gVersusMode) { switch (D_80161810[0]) { case 0: D_80161838[0] = 0; @@ -1491,7 +1490,7 @@ void func_hud_80088970(void) { gOptionMenuStatus = OPTION_WAIT; gDrawMode = DRAW_NONE; D_game_80161A34 = 7; - D_ctx_80178410 = 0; + gStarCount = 0; break; } else { if (gFillScreenAlpha == 0) { @@ -1570,7 +1569,7 @@ void func_hud_80088970(void) { gScreenFlashTimer = 0; gPlayer[0].timer_1F8 = 0; gFillScreenAlpha = gFillScreenAlphaTarget = 255; - D_ctx_8017837C = 7; + gFadeoutType = 7; gDrawMode = DRAW_PLAY; gPlayState = PLAY_UPDATE; @@ -1584,7 +1583,7 @@ void func_hud_80088970(void) { } } - if ((D_80161810[3] == 0) && (gPlayState == PLAY_PAUSE) && !gVersusMode && (gLevelStatusScreenTimer == 0)) { + if ((D_80161810[3] == 0) && (gPlayState == PLAY_PAUSE) && !gVersusMode && (gLevelStartStatusScreenTimer == 0)) { switch (D_80161810[0]) { case 0: case 1: @@ -2014,7 +2013,7 @@ s32 func_hud_8008A4DC(void) { return 0; } - if (gLevelStatusScreenTimer) { + if (gLevelStartStatusScreenTimer) { D_800D1E10 = 60.0f; } else { Math_SmoothStepToF(&D_800D1E10, 0.0f, 0.3f, 10.0f, 0.1f); @@ -2101,9 +2100,9 @@ s32 func_hud_8008A4DC(void) { break; case LEVEL_SECTOR_Y: - if ((fabsf(gObjects58[0].obj.pos.x) < temp2 + 1000.0f) && - (fabsf(gObjects58[0].obj.pos.z) < temp2 + 1000.0f)) { - temp = 150.0f + ((12500.0f + gObjects58[0].obj.pos.z) / 446.42f); + if ((fabsf(gScenery360[0].obj.pos.x) < temp2 + 1000.0f) && + (fabsf(gScenery360[0].obj.pos.z) < temp2 + 1000.0f)) { + temp = 150.0f + ((12500.0f + gScenery360[0].obj.pos.z) / 446.42f); if ((y < 150.0f) || (y > 206.0f)) { break; @@ -2851,7 +2850,7 @@ void func_hud_8008CBE4(void) { D_80161748[gPlayerNum] = i + 1; } - if ((D_80161748[gPlayerNum] == (i + 1)) && (D_80161738[gPlayerNum])) { + if ((D_80161748[gPlayerNum] == (i + 1)) && (D_80161738[gPlayerNum] != 0)) { D_80161738[gPlayerNum]--; if (D_80161738[gPlayerNum] & 4) { continue; @@ -2948,12 +2947,12 @@ void func_hud_8008D4F0(f32 arg0, f32 arg1) { D_800D211C[var_v1] = arg1; } - temp_fs0 = gPlayer[gPlayerNum].unk_2BC * (1.0f / 90.0f); + temp_fs0 = gPlayer[gPlayerNum].boostMeter * (1.0f / 90.0f); temp_fv0 = 1.0f - temp_fs0; temp2 = sp68 * temp_fs0; - if (!gPlayer[gPlayerNum].unk_2B4) { + if (!gPlayer[gPlayerNum].boostCooldown) { Math_SmoothStepToF(&D_800D19AC[var_v1], 255.0f, 0.4f, 100.0f, 0.01f); } else { Math_SmoothStepToF(&D_800D19AC[var_v1], 100.0f, 0.4f, 100.0f, 0.01f); @@ -4159,22 +4158,22 @@ bool func_hud_800915FC(Actor* actor) { f32 y; Vec3f vec; Boss* boss; - Object_58* obj58; + Scenery360* scenery360; bool ret = false; Math_Vec3fFromAngles(&vec, 0.0f, actor->unk_0F4.y, 650.0f + actor->fwork[9] * 10.0f); if (gLevelMode == LEVELMODE_ALL_RANGE) { - for (i = 0, obj58 = &gObjects58[0]; i < 200; i++, obj58++) { - if (obj58->obj.status != OBJ_ACTIVE) { + for (i = 0, scenery360 = &gScenery360[0]; i < 200; i++, scenery360++) { + if (scenery360->obj.status != OBJ_ACTIVE) { continue; } - if (fabsf(obj58->obj.pos.x - (actor->obj.pos.x + vec.x)) > 1200.0f) { + if (fabsf(scenery360->obj.pos.x - (actor->obj.pos.x + vec.x)) > 1200.0f) { continue; } - if (fabsf(obj58->obj.pos.z - (actor->obj.pos.z + vec.z)) > 1200.0f) { + if (fabsf(scenery360->obj.pos.z - (actor->obj.pos.z + vec.z)) > 1200.0f) { continue; } @@ -4229,7 +4228,8 @@ bool func_hud_80091864(Actor* actor) { sp44 += 40.0f; if (sp44 >= 360.0f) { sp44 -= 360.0f; - } else if ((actor->obj.pos.y < (gGroundLevel + 50.0f)) && (gLevelType == LEVELTYPE_PLANET) && (sp44 > 180.0f)) { + } else if ((actor->obj.pos.y < (gGroundHeight + 50.0f)) && (gLevelType == LEVELTYPE_PLANET) && + (sp44 > 180.0f)) { sp44 = 0.0f; } actor->iwork[0] = 0; @@ -4286,8 +4286,8 @@ bool func_hud_80091B90(Actor* actor) { actor->fwork[14] -= actor->fwork[14] * 0.1f; actor->fwork[12] -= actor->fwork[12] * 0.1f; - if ((actor->obj.pos.y < gGroundLevel + 40.0f) && (actor->vel.y < 0.0f) && (gLevelType == LEVELTYPE_PLANET)) { - actor->obj.pos.y = gGroundLevel + 40.0f; + if ((actor->obj.pos.y < gGroundHeight + 40.0f) && (actor->vel.y < 0.0f) && (gLevelType == LEVELTYPE_PLANET)) { + actor->obj.pos.y = gGroundHeight + 40.0f; actor->vel.y = 0.0f; } actor->vel.z -= D_ctx_80177D08; @@ -4514,8 +4514,8 @@ bool func_hud_800924E0(Actor* actor) { actor->vel.y = dest.y; actor->vel.z = dest.z; - if (actor->obj.pos.y < gGroundLevel + 50.0f) { - actor->obj.pos.y = gGroundLevel + 50.0f; + if (actor->obj.pos.y < gGroundHeight + 50.0f) { + actor->obj.pos.y = gGroundHeight + 50.0f; actor->vel.y = 0.0f; } } @@ -4888,7 +4888,7 @@ f32 D_800D22CC = 260.0f; s32 D_800D22D0 = 50; s32 D_800D22D4 = 2; -void func_hud_800935E8(Player* player) { +void HUD_AquasStart(Player* player) { Vec3f D_800D22D8[] = { { -1730.0f, 1600.0f, -6690.0f }, { -830.0f, 1600.0f, -7380.0f }, { 0.0f, 1600.0f, -7380.0f } }; @@ -4923,7 +4923,7 @@ void func_hud_800935E8(Player* player) { func_hud_80093310(); gCsFrameCount = 0; D_ctx_80177AB0 = 1; - D_ctx_80177AC8 = 1; + gAqDrawMode = 1; player->unk_234 = 0; player->unk_1D0 = 1; player->unk_208 = 0; @@ -5058,7 +5058,7 @@ void func_hud_800935E8(Player* player) { break; case 2: - gPlayerFillScreenAlphas[0] = 0; + gPlayerGlareAlphas[0] = 0; D_ctx_80177A10[0] = gLight1R; D_ctx_80177A10[1] = gLight1G; @@ -5189,7 +5189,7 @@ void func_hud_800935E8(Player* player) { if (player->timer_1F8 < 736) { player->unk_1D0 = 4; - D_ctx_80177AC8 = 1; + gAqDrawMode = 1; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; gFillScreenAlphaTarget = 255; } @@ -5226,7 +5226,7 @@ void func_hud_800935E8(Player* player) { player->timer_1F8 = 1000; - D_ctx_80177AC8 = 0; + gAqDrawMode = 0; gFillScreenAlphaTarget = 0; Object_Kill(&actor->obj, actor->sfxSource); @@ -5260,7 +5260,7 @@ void func_hud_800935E8(Player* player) { } if (player->timer_1F8 <= 900) { - gLevelStatusScreenTimer = 50; + gLevelStartStatusScreenTimer = 50; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_1D0 = 0; @@ -5580,7 +5580,7 @@ void func_hud_80095538(Actor* actor, s32 arg1) { actor->unk_0B6 = 47; Object_SetInfo(&actor->info, actor->obj.id); } -void func_hud_80095604(Player* player) { +void HUD_AquasComplete(Player* player) { s32 i; s32 j; Actor* actor; @@ -5722,7 +5722,7 @@ void func_hud_80095604(Player* player) { case 10: player->unk_234 = 1; - D_ctx_80177AC8 = 2; + gAqDrawMode = 2; player->unk_1D0 = 11; player->unk_0F8 = player->unk_0EC = player->unk_12C = player->unk_130 = 0.0f; @@ -5865,7 +5865,7 @@ void func_hud_80095604(Player* player) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; Audio_FadeOutAll(10); - D_ctx_8017837C = 4; + gFadeoutType = 4; } } @@ -5925,11 +5925,11 @@ void func_hud_80095604(Player* player) { break; case 1000: - D_ctx_80177830 = 1; + gShowLevelClearStatusScreen = 1; break; case 1200: - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; break; } @@ -6066,7 +6066,7 @@ void func_hud_80096A74(Player* player) { button = gControllerHold[player->num].button; gControllerHold[player->num].button = gBoostButton[player->num]; - player->unk_2BC = 1; + player->boostMeter = 1; player->timer_1F8 = 60; func_play_800B2574(player); @@ -6084,7 +6084,7 @@ void func_hud_80096A74(Player* player) { if (gCsFrameCount == 300) { D_ctx_80177CE8 = 0; - gLevelStatusScreenTimer = 50; + gLevelStartStatusScreenTimer = 50; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_0D0 = D_play_80161A54; player->unk_1D0 = 0; diff --git a/src/engine/fox_load.c b/src/engine/fox_load.c index 10081372..14023192 100644 --- a/src/engine/fox_load.c +++ b/src/engine/fox_load.c @@ -7,7 +7,7 @@ u8 sFillTimer = 3; #include "fox_load_inits.c" -OverlayInit sCurrentOverlay = { +Scene sCurrentScene = { NO_OVERLAY, { /* 0x1 */ NO_SEGMENT, /* 0x2 */ NO_SEGMENT, @@ -26,7 +26,7 @@ OverlayInit sCurrentOverlay = { /* 0xF */ NO_SEGMENT }, }; -void Overlay_LoadSegment(void* vRomAddress, void* dest, ptrdiff_t size) { +void Load_RomFile(void* vRomAddress, void* dest, ptrdiff_t size) { s32 i; for (i = 0; gDmaTable[i].pRom.end != NULL; i++) { @@ -36,7 +36,7 @@ void Overlay_LoadSegment(void* vRomAddress, void* dest, ptrdiff_t size) { } else { Lib_FillScreen(true); sFillTimer = 3; - D_game_80161A39 = true; + gGameStandby = true; Lib_DmaRead(gDmaTable[i].pRom.start, gFrameBuffers, SEGMENT_SIZE(gDmaTable[i].pRom)); Mio0_Decompress(gFrameBuffers, dest); } @@ -45,43 +45,43 @@ void Overlay_LoadSegment(void* vRomAddress, void* dest, ptrdiff_t size) { } } -u8 Overlay_Init(OverlayInit* ovlInit) { +u8 Load_SceneFiles(Scene* scene) { u8* ramPtr = SEGMENT_VRAM_START(ovl_i1); u8 segment; - u8 changeOvl = false; + u8 changeScene = false; - if (ovlInit->ovl.rom.start == (0, sCurrentOverlay.ovl.rom.start)) { // fake because D_800CBDD4 is probably 2D array - ramPtr = ramPtr + SEGMENT_SIZE(ovlInit->ovl.rom); - ramPtr = ramPtr + SEGMENT_SIZE(ovlInit->ovl.bss); + if (scene->ovl.rom.start == (0, sCurrentScene.ovl.rom.start)) { // fake because D_800CBDD4 is probably 2D array + ramPtr = ramPtr + SEGMENT_SIZE(scene->ovl.rom); + ramPtr = ramPtr + SEGMENT_SIZE(scene->ovl.bss); } else { - sCurrentOverlay.ovl.rom.start = ovlInit->ovl.rom.start; - sCurrentOverlay.ovl.rom.end = ramPtr; - if (ovlInit->ovl.rom.start != 0) { - changeOvl = true; - Overlay_LoadSegment(ovlInit->ovl.rom.start, ramPtr, SEGMENT_SIZE(ovlInit->ovl.rom)); - ramPtr = ramPtr + SEGMENT_SIZE(ovlInit->ovl.rom); - bzero(ovlInit->ovl.bss.start, SEGMENT_SIZE(ovlInit->ovl.bss)); - ramPtr = ramPtr + SEGMENT_SIZE(ovlInit->ovl.bss); + sCurrentScene.ovl.rom.start = scene->ovl.rom.start; + sCurrentScene.ovl.rom.end = ramPtr; + if (scene->ovl.rom.start != 0) { + changeScene = true; + Load_RomFile(scene->ovl.rom.start, ramPtr, SEGMENT_SIZE(scene->ovl.rom)); + ramPtr = ramPtr + SEGMENT_SIZE(scene->ovl.rom); + bzero(scene->ovl.bss.start, SEGMENT_SIZE(scene->ovl.bss)); + ramPtr = ramPtr + SEGMENT_SIZE(scene->ovl.bss); } } segment = 0; - while ((segment < 15) && (ovlInit->assets[segment].start == sCurrentOverlay.assets[segment].start) && - changeOvl == 0) { - if (ovlInit->assets[segment].start != 0) { + while ((segment < 15) && (scene->assets[segment].start == sCurrentScene.assets[segment].start) && + (changeScene == false)) { + if (scene->assets[segment].start != 0) { gSegments[segment + 1] = K0_TO_PHYS(ramPtr); gSPSegment(gUnkDisp1++, segment + 1, K0_TO_PHYS(ramPtr)); - ramPtr = ramPtr + SEGMENT_SIZE(ovlInit->assets[segment]); + ramPtr = ramPtr + SEGMENT_SIZE(scene->assets[segment]); } segment += 1; } for (segment; segment < 15; segment += 1) { - sCurrentOverlay.assets[segment].start = ovlInit->assets[segment].start; - sCurrentOverlay.assets[segment].end = ramPtr; - if (ovlInit->assets[segment].start != 0) { + sCurrentScene.assets[segment].start = scene->assets[segment].start; + sCurrentScene.assets[segment].end = ramPtr; + if (scene->assets[segment].start != 0) { gSegments[segment + 1] = K0_TO_PHYS(ramPtr); gSPSegment(gUnkDisp1++, segment + 1, K0_TO_PHYS(ramPtr)); - Overlay_LoadSegment(ovlInit->assets[segment].start, ramPtr, SEGMENT_SIZE(ovlInit->assets[segment])); - ramPtr = ramPtr + SEGMENT_SIZE(ovlInit->assets[segment]); + Load_RomFile(scene->assets[segment].start, ramPtr, SEGMENT_SIZE(scene->assets[segment])); + ramPtr = ramPtr + SEGMENT_SIZE(scene->assets[segment]); } } @@ -90,112 +90,112 @@ u8 Overlay_Init(OverlayInit* ovlInit) { } else if (gStartNMI == 0) { Lib_FillScreen(false); } - return changeOvl; + return changeScene; } -u8 Overlay_Load(u8 ovlSetup, u8 ovlStage) { - u8 changeOvl; +u8 Load_SceneSetup(u8 sceneId, u8 sceneSetup) { + u8 changeScene; - switch (ovlSetup) { - case OVL_SETUP_TITLE: - changeOvl = Overlay_Init(&sOvlmenu_Title[ovlStage]); - if (changeOvl == true) { + switch (sceneId) { + case SCENE_TITLE: + changeScene = Load_SceneFiles(&sOvlmenu_Title[sceneSetup]); + if (changeScene == true) { AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_22); } break; - case OVL_SETUP_MENU: - changeOvl = Overlay_Init(&sOvlmenu_Option[ovlStage]); + case SCENE_MENU: + changeScene = Load_SceneFiles(&sOvlmenu_Option[sceneSetup]); break; - case OVL_SETUP_MAP: - changeOvl = Overlay_Init(&sOvlmenu_Map[ovlStage]); + case SCENE_MAP: + changeScene = Load_SceneFiles(&sOvlmenu_Map[sceneSetup]); break; - case OVL_SETUP_GAME_OVER: - changeOvl = Overlay_Init(&sOvlmenu_GameOver[ovlStage]); + case SCENE_GAME_OVER: + changeScene = Load_SceneFiles(&sOvlmenu_GameOver[sceneSetup]); break; - case OVL_SETUP_CORNERIA: - changeOvl = Overlay_Init(&sOvli1_Corneria[ovlStage]); + case SCENE_CORNERIA: + changeScene = Load_SceneFiles(&sOvli1_Corneria[sceneSetup]); break; - case OVL_SETUP_METEO: - changeOvl = Overlay_Init(&sOvli2_Meteo[ovlStage]); + case SCENE_METEO: + changeScene = Load_SceneFiles(&sOvli2_Meteo[sceneSetup]); break; - case OVL_SETUP_TITANIA: - changeOvl = Overlay_Init(&sOvli5_Titania[ovlStage]); + case SCENE_TITANIA: + changeScene = Load_SceneFiles(&sOvli5_Titania[sceneSetup]); break; - case OVL_SETUP_SECTOR_X: - changeOvl = Overlay_Init(&sOvli2_SectorX[ovlStage]); + case SCENE_SECTOR_X: + changeScene = Load_SceneFiles(&sOvli2_SectorX[sceneSetup]); break; - case OVL_SETUP_SECTOR_Z: - changeOvl = Overlay_Init(&sOvli4_SectorZ[ovlStage]); + case SCENE_SECTOR_Z: + changeScene = Load_SceneFiles(&sOvli4_SectorZ[sceneSetup]); break; - case OVL_SETUP_AQUAS: - changeOvl = Overlay_Init(&sOvli3_Aquas[ovlStage]); + case SCENE_AQUAS: + changeScene = Load_SceneFiles(&sOvli3_Aquas[sceneSetup]); break; - case OVL_SETUP_AREA_6: - changeOvl = Overlay_Init(&sOvli3_Area6[ovlStage]); + case SCENE_AREA_6: + changeScene = Load_SceneFiles(&sOvli3_Area6[sceneSetup]); break; - case OVL_SETUP_FORTUNA: - changeOvl = Overlay_Init(&sOvli4_Fortuna[ovlStage]); + case SCENE_FORTUNA: + changeScene = Load_SceneFiles(&sOvli4_Fortuna[sceneSetup]); break; - case OVL_SETUP_UNK_4: - changeOvl = Overlay_Init(&sOvli3_Unk4[ovlStage]); + case SCENE_UNK_4: + changeScene = Load_SceneFiles(&sOvli3_Unk4[sceneSetup]); break; - case OVL_SETUP_SECTOR_Y: - changeOvl = Overlay_Init(&sOvli6_SectorY[ovlStage]); + case SCENE_SECTOR_Y: + changeScene = Load_SceneFiles(&sOvli6_SectorY[sceneSetup]); break; - case OVL_SETUP_SOLAR: - changeOvl = Overlay_Init(&sOvli3_Solar[ovlStage]); + case SCENE_SOLAR: + changeScene = Load_SceneFiles(&sOvli3_Solar[sceneSetup]); break; - case OVL_SETUP_ZONESS: - changeOvl = Overlay_Init(&sOvli3_Zoness[ovlStage]); + case SCENE_ZONESS: + changeScene = Load_SceneFiles(&sOvli3_Zoness[sceneSetup]); break; - case OVL_SETUP_VENOM_ANDROSS: - changeOvl = Overlay_Init(&sOvli6_Andross[ovlStage]); + case SCENE_VENOM_ANDROSS: + changeScene = Load_SceneFiles(&sOvli6_Andross[sceneSetup]); break; - case OVL_SETUP_TRAINING: - changeOvl = Overlay_Init(&sOvli1_Training[ovlStage]); + case SCENE_TRAINING: + changeScene = Load_SceneFiles(&sOvli1_Training[sceneSetup]); break; - case OVL_SETUP_VENOM_1: - changeOvl = Overlay_Init(&sOvli1_Venom1[ovlStage]); + case SCENE_VENOM_1: + changeScene = Load_SceneFiles(&sOvli1_Venom1[sceneSetup]); break; - case OVL_SETUP_VENOM_2: - changeOvl = Overlay_Init(&sOvli6_Venom2[ovlStage]); + case SCENE_VENOM_2: + changeScene = Load_SceneFiles(&sOvli6_Venom2[sceneSetup]); break; - case OVL_SETUP_20: - changeOvl = Overlay_Init(&sOvli2_Setup20[ovlStage]); + case SCENE_20: + changeScene = Load_SceneFiles(&sOvli2_Setup20[sceneSetup]); break; - case OVL_SETUP_BOLSE: - changeOvl = Overlay_Init(&sOvli4_Bolse[ovlStage]); + case SCENE_BOLSE: + changeScene = Load_SceneFiles(&sOvli4_Bolse[sceneSetup]); break; - case OVL_SETUP_KATINA: - changeOvl = Overlay_Init(&sOvli4_Katina[ovlStage]); + case SCENE_KATINA: + changeScene = Load_SceneFiles(&sOvli4_Katina[sceneSetup]); break; - case OVL_SETUP_MACBETH: - changeOvl = Overlay_Init(&sOvli5_Macbeth[ovlStage]); + case SCENE_MACBETH: + changeScene = Load_SceneFiles(&sOvli5_Macbeth[sceneSetup]); break; - case OVL_SETUP_VERSUS: - changeOvl = Overlay_Init(&sOvli2_Versus[ovlStage]); - if (changeOvl == true) { + case SCENE_VERSUS: + changeScene = Load_SceneFiles(&sOvli2_Versus[sceneSetup]); + if (changeScene == true) { AUDIO_SET_SPEC_ALT(SFXCHAN_3, AUDIOSPEC_16); } break; - case OVL_SETUP_LOGO: - changeOvl = Overlay_Init(&sNoOvl_Logo[ovlStage]); // Logo does not load an overlay file - if (changeOvl == true) { + case SCENE_LOGO: + changeScene = Load_SceneFiles(&sNoOvl_Logo[sceneSetup]); // Logo does not load an overlay file + if (changeScene == true) { AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_14); } break; - case OVL_SETUP_CREDITS: - changeOvl = Overlay_Init(&sOvlending_Ending[ovlStage]); + case SCENE_CREDITS: + changeScene = Load_SceneFiles(&sOvlending_Ending[sceneSetup]); break; default: (void) "DMA MODE ERROR %d\n"; - changeOvl = false; + changeScene = false; break; } - return changeOvl; + return changeScene; } -void Overlay_InitDma(void) { +void Load_InitDmaAndMsg(void) { Lib_DmaRead(SEGMENT_ROM_START(dma_table), SEGMENT_VRAM_START(dma_table), SEGMENT_ROM_SIZE(dma_table)); - Overlay_LoadSegment(SEGMENT_ROM_START(ast_radio), SEGMENT_VRAM_START(ast_radio), SEGMENT_ROM_SIZE(ast_radio)); + Load_RomFile(SEGMENT_ROM_START(ast_radio), SEGMENT_VRAM_START(ast_radio), SEGMENT_ROM_SIZE(ast_radio)); } diff --git a/src/engine/fox_load_inits.c b/src/engine/fox_load_inits.c index 621f718b..c2cedfc0 100644 --- a/src/engine/fox_load_inits.c +++ b/src/engine/fox_load_inits.c @@ -21,7 +21,7 @@ #define ROM_SEGMENT(file) \ { SEGMENT_ROM_START(file), SEGMENT_ROM_END(file) } -OverlayInit sNoOvl_Logo[1] = { +Scene sNoOvl_Logo[1] = { { NO_OVERLAY, { /* 0x1 */ NO_SEGMENT, /* 0x2 */ NO_SEGMENT, @@ -40,7 +40,7 @@ OverlayInit sNoOvl_Logo[1] = { /* 0xF */ ROM_SEGMENT(ast_logo) } }, }; -OverlayInit sOvlending_Ending[6] = { +Scene sOvlending_Ending[6] = { { OVERLAY_OFFSETS(ovl_ending), { /* 0x1 */ NO_SEGMENT, /* 0x2 */ NO_SEGMENT, @@ -139,7 +139,7 @@ OverlayInit sOvlending_Ending[6] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvlmenu_Title[1] = { +Scene sOvlmenu_Title[1] = { { OVERLAY_OFFSETS(ovl_menu), { /* 0x1 */ NO_SEGMENT, /* 0x2 */ NO_SEGMENT, @@ -158,7 +158,7 @@ OverlayInit sOvlmenu_Title[1] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvlmenu_Option[1] = { +Scene sOvlmenu_Option[1] = { { OVERLAY_OFFSETS(ovl_menu), { /* 0x1 */ NO_SEGMENT, /* 0x2 */ NO_SEGMENT, @@ -177,7 +177,7 @@ OverlayInit sOvlmenu_Option[1] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvlmenu_Map[1] = { +Scene sOvlmenu_Map[1] = { { OVERLAY_OFFSETS(ovl_menu), { /* 0x1 */ NO_SEGMENT, /* 0x2 */ NO_SEGMENT, @@ -196,7 +196,7 @@ OverlayInit sOvlmenu_Map[1] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvlmenu_GameOver[1] = { +Scene sOvlmenu_GameOver[1] = { { OVERLAY_OFFSETS(ovl_menu), { /* 0x1 */ NO_SEGMENT, /* 0x2 */ NO_SEGMENT, @@ -215,7 +215,7 @@ OverlayInit sOvlmenu_GameOver[1] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvli1_Corneria[1] = { +Scene sOvli1_Corneria[1] = { { OVERLAY_OFFSETS(ovl_i1), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_planet), @@ -234,7 +234,7 @@ OverlayInit sOvli1_Corneria[1] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvli2_Meteo[2] = { +Scene sOvli2_Meteo[2] = { { OVERLAY_OFFSETS(ovl_i2), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_space), @@ -269,7 +269,7 @@ OverlayInit sOvli2_Meteo[2] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvli5_Titania[6] = { +Scene sOvli5_Titania[6] = { { OVERLAY_OFFSETS(ovl_i5), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_planet), @@ -368,7 +368,7 @@ OverlayInit sOvli5_Titania[6] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvli2_SectorX[2] = { +Scene sOvli2_SectorX[2] = { { OVERLAY_OFFSETS(ovl_i2), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_space), @@ -403,7 +403,7 @@ OverlayInit sOvli2_SectorX[2] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvli4_SectorZ[1] = { +Scene sOvli4_SectorZ[1] = { { OVERLAY_OFFSETS(ovl_i4), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_space), @@ -422,7 +422,7 @@ OverlayInit sOvli4_SectorZ[1] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvli3_Aquas[1] = { +Scene sOvli3_Aquas[1] = { { OVERLAY_OFFSETS(ovl_i3), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_planet), @@ -441,7 +441,7 @@ OverlayInit sOvli3_Aquas[1] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvli3_Area6[1] = { +Scene sOvli3_Area6[1] = { { OVERLAY_OFFSETS(ovl_i3), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_space), @@ -460,7 +460,7 @@ OverlayInit sOvli3_Area6[1] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvli4_Fortuna[2] = { +Scene sOvli4_Fortuna[2] = { { OVERLAY_OFFSETS(ovl_i4), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_planet), @@ -495,7 +495,7 @@ OverlayInit sOvli4_Fortuna[2] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvli3_Unk4[1] = { +Scene sOvli3_Unk4[1] = { { OVERLAY_OFFSETS(ovl_i3), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_space), @@ -514,7 +514,7 @@ OverlayInit sOvli3_Unk4[1] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvli6_SectorY[1] = { +Scene sOvli6_SectorY[1] = { { OVERLAY_OFFSETS(ovl_i6), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_space), @@ -533,7 +533,7 @@ OverlayInit sOvli6_SectorY[1] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvli3_Solar[1] = { +Scene sOvli3_Solar[1] = { { OVERLAY_OFFSETS(ovl_i3), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_planet), @@ -552,7 +552,7 @@ OverlayInit sOvli3_Solar[1] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvli3_Zoness[1] = { +Scene sOvli3_Zoness[1] = { { OVERLAY_OFFSETS(ovl_i3), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_planet), @@ -571,7 +571,7 @@ OverlayInit sOvli3_Zoness[1] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvli1_Venom1[1] = { +Scene sOvli1_Venom1[1] = { { OVERLAY_OFFSETS(ovl_i1), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_planet), @@ -590,7 +590,7 @@ OverlayInit sOvli1_Venom1[1] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvli6_Andross[1] = { +Scene sOvli6_Andross[1] = { { OVERLAY_OFFSETS(ovl_i6), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_planet), @@ -609,7 +609,7 @@ OverlayInit sOvli6_Andross[1] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvli6_Venom2[2] = { +Scene sOvli6_Venom2[2] = { { OVERLAY_OFFSETS(ovl_i6), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_planet), @@ -644,7 +644,7 @@ OverlayInit sOvli6_Venom2[2] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvli2_Setup20[1] = { +Scene sOvli2_Setup20[1] = { { OVERLAY_OFFSETS(ovl_i2), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_planet), @@ -663,7 +663,7 @@ OverlayInit sOvli2_Setup20[1] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvli4_Bolse[1] = { +Scene sOvli4_Bolse[1] = { { OVERLAY_OFFSETS(ovl_i4), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_space), @@ -682,7 +682,7 @@ OverlayInit sOvli4_Bolse[1] = { /* 0xF */ ROM_SEGMENT(ast_star_wolf) } }, }; -OverlayInit sOvli4_Katina[1] = { +Scene sOvli4_Katina[1] = { { OVERLAY_OFFSETS(ovl_i4), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_planet), @@ -701,7 +701,7 @@ OverlayInit sOvli4_Katina[1] = { /* 0xF */ ROM_SEGMENT(ast_star_wolf) } }, }; -OverlayInit sOvli5_Macbeth[2] = { +Scene sOvli5_Macbeth[2] = { { OVERLAY_OFFSETS(ovl_i5), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_planet), @@ -736,7 +736,7 @@ OverlayInit sOvli5_Macbeth[2] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvli1_Training[1] = { +Scene sOvli1_Training[1] = { { OVERLAY_OFFSETS(ovl_i1), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_planet), @@ -755,7 +755,7 @@ OverlayInit sOvli1_Training[1] = { /* 0xF */ ROM_SEGMENT(ast_star_wolf) } }, }; -OverlayInit sOvli2_Versus[2] = { +Scene sOvli2_Versus[2] = { { OVERLAY_OFFSETS(ovl_i2), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_planet), @@ -790,7 +790,7 @@ OverlayInit sOvli2_Versus[2] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sUnused_Overlay[1] = { +Scene sOvlUnused_Unk[1] = { { OVERLAY_OFFSETS(ovl_unused), { /* 0x1 */ NO_SEGMENT, /* 0x2 */ NO_SEGMENT, diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index 5a35483e..8f424900 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -22,13 +22,13 @@ #include "assets/ast_area_6.h" #include "assets/ast_zoness.h" -UNK_TYPE D_800D2F50 = 0; +UNK_TYPE D_800D2F50 = 0; // unused s32 D_800D2F54 = 0; f32 D_800D2F58 = 0.0f; f32 D_800D2F5C = 0.0f; f32 D_800D2F60 = 0.0f; f32 D_800D2F64 = 0.0f; -u8 D_play_800D2F68 = false; +u8 gVenomHardClear = 0; u8 D_800D2F6C[20] = { PLANET_CORNERIA, PLANET_METEO, PLANET_SECTOR_X, PLANET_AREA_6, PLANET_AREA_6, PLANET_SECTOR_Y, SAVE_SLOT_VENOM_1, SAVE_SLOT_SOLAR, PLANET_ZONESS, SAVE_SLOT_VENOM_1, @@ -241,18 +241,18 @@ void func_play_800A4C40(Player* player) { Matrix_RotateZ(gCalcMatrix, -(player->unk_0F8 * M_DTOR), MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &sp54, &sp3C); Matrix_MultVec3f(gCalcMatrix, &sp48, &sp30); - if (player->pos.y < (gGroundLevel + 100.0f)) { - if ((sp3C.y < gGroundLevel + 80.0f) && ((gGameFrameCount % 2) == 0)) { + if (player->pos.y < (gGroundHeight + 100.0f)) { + if ((sp3C.y < gGroundHeight + 80.0f) && ((gGameFrameCount % 2) == 0)) { if (D_play_80161A64) {} - func_effect_8007ACE0(sp3C.x, gGroundLevel, sp3C.z, 0.1f, 2.0f, + func_effect_8007ACE0(sp3C.x, gGroundHeight, sp3C.z, 0.1f, 2.0f, player->unk_0E8 + player->unk_114 + 20.0f); } - if ((sp30.y < gGroundLevel + 80.0f) && ((gGameFrameCount % 2) == 0)) { - func_effect_8007ACE0(sp30.x, gGroundLevel, sp30.z, 0.1f, 2.0f, + if ((sp30.y < gGroundHeight + 80.0f) && ((gGameFrameCount % 2) == 0)) { + func_effect_8007ACE0(sp30.x, gGroundHeight, sp30.z, 0.1f, 2.0f, player->unk_0E8 + player->unk_114 - 20.0f); } } - if ((sp30.y < gGroundLevel + 80.0f) || (sp3C.y < gGroundLevel + 80.0f)) { + if ((sp30.y < gGroundHeight + 80.0f) || (sp3C.y < gGroundHeight + 80.0f)) { if (D_play_80161A64 == 0) { D_play_80161A64 = 1; AUDIO_PLAY_SFX(0x1100000B, player->sfxSource, 0); @@ -264,11 +264,11 @@ void func_play_800A4C40(Player* player) { } } -void Object_58_Initialize(Object_58* obj58) { +void Scenery360_Initialize(Scenery360* scenery360) { s32 i; - u8* ptr = (u8*) obj58; + u8* ptr = (u8*) scenery360; - for (i = 0; i < sizeof(Object_58); i++, ptr++) { + for (i = 0; i < sizeof(Scenery360); i++, ptr++) { *ptr = 0; } } @@ -301,14 +301,14 @@ void func_play_800A4F7C(void) { if (gLevelObjects[j].id <= OBJ_INVALID) { break; } - if (gLevelObjects[j].id == OBJ_80_147) { - Object_58_Initialize(&gObjects58[i]); - gObjects58[i].obj.status = OBJ_ACTIVE; - gObjects58[i].obj.id = gLevelObjects[j].id; - gObjects58[i].obj.pos.x = gLevelObjects[j].xPos; - gObjects58[i].obj.pos.z = gLevelObjects[j].zPos1; - gObjects58[i].obj.pos.y = gLevelObjects[j].yPos; - Object_SetInfo(&gObjects58[i].info, gObjects58[i].obj.id); + if (gLevelObjects[j].id == OBJ_SCENERY_147) { + Scenery360_Initialize(&gScenery360[i]); + gScenery360[i].obj.status = OBJ_ACTIVE; + gScenery360[i].obj.id = gLevelObjects[j].id; + gScenery360[i].obj.pos.x = gLevelObjects[j].xPos; + gScenery360[i].obj.pos.z = gLevelObjects[j].zPos1; + gScenery360[i].obj.pos.y = gLevelObjects[j].yPos; + Object_SetInfo(&gScenery360[i].info, gScenery360[i].obj.id); i++; } } @@ -316,15 +316,15 @@ void func_play_800A4F7C(void) { if (gLevelObjects[j].id <= OBJ_INVALID) { break; } - if (gLevelObjects[j].id != OBJ_80_147) { - Object_58_Initialize(&gObjects58[i]); - gObjects58[i].obj.status = OBJ_ACTIVE; - gObjects58[i].obj.id = gLevelObjects[j].id; - gObjects58[i].obj.pos.x = gLevelObjects[j].xPos; - gObjects58[i].obj.pos.z = gLevelObjects[j].zPos1; - gObjects58[i].obj.pos.y = gLevelObjects[j].yPos; - gObjects58[i].obj.rot.y = gLevelObjects[j].rot.y; - Object_SetInfo(&gObjects58[i].info, gObjects58[i].obj.id); + if (gLevelObjects[j].id != OBJ_SCENERY_147) { + Scenery360_Initialize(&gScenery360[i]); + gScenery360[i].obj.status = OBJ_ACTIVE; + gScenery360[i].obj.id = gLevelObjects[j].id; + gScenery360[i].obj.pos.x = gLevelObjects[j].xPos; + gScenery360[i].obj.pos.z = gLevelObjects[j].zPos1; + gScenery360[i].obj.pos.y = gLevelObjects[j].yPos; + gScenery360[i].obj.rot.y = gLevelObjects[j].rot.y; + Object_SetInfo(&gScenery360[i].info, gScenery360[i].obj.id); i++; } } @@ -335,29 +335,29 @@ void func_play_800A5330(void) { void func_play_800A5338(void) { Sprite* sprite; - Object_58* obj58; + Scenery360* scenery360; s32 i; s32 j; gLevelObjects = SEGMENTED_TO_VIRTUAL(D_CO_603B074); - for (j = 0, obj58 = gObjects58; j < 200; j++) { + for (j = 0, scenery360 = gScenery360; j < 200; j++) { if (gLevelObjects[j].id <= OBJ_INVALID) { break; } if (gLevelObjects[j].id < OBJ_SPRITE_CO_POLE) { - Object_58_Initialize(obj58); - obj58->obj.status = OBJ_ACTIVE; - obj58->obj.id = gLevelObjects[j].id; - obj58->obj.pos.x = gLevelObjects[j].xPos; - obj58->obj.pos.z = gLevelObjects[j].zPos1; - obj58->obj.pos.y = gLevelObjects[j].yPos; - obj58->obj.rot.y = gLevelObjects[j].rot.y; - Object_SetInfo(&obj58->info, obj58->obj.id); - if (obj58->obj.id == OBJ_80_1) { - obj58->info.dList = D_CO_6020760; + Scenery360_Initialize(scenery360); + scenery360->obj.status = OBJ_ACTIVE; + scenery360->obj.id = gLevelObjects[j].id; + scenery360->obj.pos.x = gLevelObjects[j].xPos; + scenery360->obj.pos.z = gLevelObjects[j].zPos1; + scenery360->obj.pos.y = gLevelObjects[j].yPos; + scenery360->obj.rot.y = gLevelObjects[j].rot.y; + Object_SetInfo(&scenery360->info, scenery360->obj.id); + if (scenery360->obj.id == OBJ_SCENERY_1) { + scenery360->info.dList = D_CO_6020760; } - obj58++; + scenery360++; } } @@ -387,26 +387,26 @@ void func_play_800A5338(void) { } void func_play_800A55B0(void) { - Object_58* obj58; + Scenery360* scenery360; s32 i; s32 j; gLevelObjects = SEGMENTED_TO_VIRTUAL(D_SY_6030B14); - for (j = 0, obj58 = gObjects58; j < 200; j++) { + for (j = 0, scenery360 = gScenery360; j < 200; j++) { if (gLevelObjects[j].id <= OBJ_INVALID) { break; } if (gLevelObjects[j].id < OBJ_SPRITE_CO_POLE) { - Object_58_Initialize(obj58); - obj58->obj.status = OBJ_ACTIVE; - obj58->obj.id = gLevelObjects[j].id; - obj58->obj.pos.x = gLevelObjects[j].xPos; - obj58->obj.pos.z = gLevelObjects[j].zPos1; - obj58->obj.pos.y = gLevelObjects[j].yPos; - obj58->obj.rot.y = gLevelObjects[j].rot.y; - Object_SetInfo(&obj58->info, obj58->obj.id); - obj58++; + Scenery360_Initialize(scenery360); + scenery360->obj.status = OBJ_ACTIVE; + scenery360->obj.id = gLevelObjects[j].id; + scenery360->obj.pos.x = gLevelObjects[j].xPos; + scenery360->obj.pos.z = gLevelObjects[j].zPos1; + scenery360->obj.pos.y = gLevelObjects[j].yPos; + scenery360->obj.rot.y = gLevelObjects[j].rot.y; + Object_SetInfo(&scenery360->info, scenery360->obj.id); + scenery360++; } } i = 0; // fake? @@ -450,16 +450,16 @@ void func_play_800A57E0(void) { void Play_Setup(void) { s32 i; - D_ctx_80178410 = 0; - gLevelStage = 0; + gStarCount = 0; + gLevelPhase = 0; gMissedZoSearchlight = false; gSavedZoSearchlightStatus = false; - gOverlayStage = 0; + gSceneSetup = 0; gAllRangeCheckpoint = D_ctx_80177CA0 = 0; D_ctx_80177CB0 = 0.0f; - gSavedHitCount = gCsFrameCount = gLevelStatusScreenTimer = gLevelClearScreenTimer = gRadioState = 0; + gSavedHitCount = gCsFrameCount = gLevelStartStatusScreenTimer = gLevelClearScreenTimer = gRadioState = 0; D_ctx_8017782C = 1; - if (((gCurrentLevel == LEVEL_VENOM_2) && (gNextLevelStage == 2)) || (gCurrentLevel == LEVEL_VENOM_ANDROSS)) { + if (((gCurrentLevel == LEVEL_VENOM_2) && (gNextLevelPhase == 2)) || (gCurrentLevel == LEVEL_VENOM_ANDROSS)) { return; } for (i = 1; i < 4; i++) { @@ -528,46 +528,46 @@ void func_play_800A594C(void) { gFovY = 45.0f; } -void func_play_800A5D6C(void) { +void Play_SetupStarfield(void) { u32 i; - MEM_ARRAY_ALLOCATE(D_ctx_80178288, 1000); - MEM_ARRAY_ALLOCATE(D_ctx_80178290, 1000); - MEM_ARRAY_ALLOCATE(D_ctx_80178298, 1000); + MEM_ARRAY_ALLOCATE(gStarOffsetsX, 1000); + MEM_ARRAY_ALLOCATE(gStarOffsetsY, 1000); + MEM_ARRAY_ALLOCATE(gStarFillColors, 1000); Rand_SetSeed(1, 29000, 9876); for (i = 0; i < 1000; i++) { - D_ctx_80178288[i] = RAND_FLOAT_SEEDED(480.0f) - 80.0f; - D_ctx_80178290[i] = RAND_FLOAT_SEEDED(360.0f) - 60.0f; - D_ctx_80178298[i] = FILL_COLOR(D_bg_800C9C3C[i % ARRAY_COUNT(D_bg_800C9C3C)]); + gStarOffsetsX[i] = RAND_FLOAT_SEEDED(480.0f) - 80.0f; + gStarOffsetsY[i] = RAND_FLOAT_SEEDED(360.0f) - 60.0f; + gStarFillColors[i] = FILL_COLOR(gStarColors[i % ARRAY_COUNT(gStarColors)]); } } void func_play_800A5EBC(void) { - func_play_800A5D6C(); - gGroundLevel = -25000.0f; - D_ctx_80178410 = 600; + Play_SetupStarfield(); + gGroundHeight = -25000.0f; + gStarCount = 600; if (gCurrentLevel == LEVEL_AREA_6) { - D_ctx_80178410 = 300; + gStarCount = 300; } if (gCurrentLevel == LEVEL_UNK_15) { - D_ctx_80178410 = 400; + gStarCount = 400; } if (gGameState != GSTATE_PLAY) { - D_ctx_80178410 = 800; + gStarCount = 800; } if (gCurrentLevel == LEVEL_FORTUNA) { - D_ctx_80178410 = 500; + gStarCount = 500; } if (gVersusMode) { - D_ctx_80178410 = 0; + gStarCount = 0; } if (gCurrentLevel == LEVEL_BOLSE) { - D_ctx_80178410 = 300; - gGroundLevel = -0.0f; + gStarCount = 300; + gGroundHeight = -0.0f; } if (gCurrentLevel == LEVEL_TRAINING) { - D_ctx_80178410 = 800; - gGroundLevel = -0.0f; + gStarCount = 800; + gGroundHeight = -0.0f; } } @@ -627,9 +627,9 @@ void Play_ClearObjectData(void) { for (i = 0; i < ARRAY_COUNT(gTexturedLines); i++) { TexturedLine_Initialize(&gTexturedLines[i]); } - for (i = 0; i < ARRAY_COUNT(gObjects80); i++) { - Object_Kill(&gObjects80[i].obj, gObjects80[i].sfxSource); - Object_80_Initialize(&gObjects80[i]); + for (i = 0; i < ARRAY_COUNT(gScenery); i++) { + Object_Kill(&gScenery[i].obj, gScenery[i].sfxSource); + Scenery_Initialize(&gScenery[i]); } for (i = 0; i < ARRAY_COUNT(gSprites); i++) { Sprite_Initialize(&gSprites[i]); @@ -684,7 +684,7 @@ void Play_UpdateFillScreen(void) { } } gFillScreenAlphaStep = 16; - Math_SmoothStepToF(&D_ctx_8017836C, 0.0f, 1.0f, 0.04f, 0.001f); + Math_SmoothStepToF(&gLight3Brightness, 0.0f, 1.0f, 0.04f, 0.001f); if (gScreenFlashTimer != 0) { gScreenFlashTimer--; if (gScreenFlashTimer & 2) { @@ -777,7 +777,7 @@ bool func_play_800A6A74(void) { } void Player_DamageWings(Player* player, s32 side, s32 damage) { - if ((player->form == FORM_ARWING) && (D_ctx_80177AB8[player->num] < 1.0f)) { + if ((player->form == FORM_ARWING) && (gShieldAlpha[player->num] < 1.0f)) { if (side == 1) { D_ctx_80177D40[player->num] = 30; if (player->wings.rightState == WINGSTATE_INTACT) { @@ -842,10 +842,10 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) { } else { player->timer_498 = 20; } - if (D_ctx_80177AD0[player->num] != 0) { + if (gHasShield[player->num]) { func_play_800A5FA0(player->sfxSource, 0x0903900E, player->num); - D_ctx_80177AE8[player->num] = 5; - D_ctx_80177AB8[player->num] = 2.0f; + gShieldTimer[player->num] = 5; + gShieldAlpha[player->num] = 2.0f; player->damage = 0; } else { if (player->shields != 0) { @@ -1209,15 +1209,15 @@ bool func_play_800A8054(ObjectId objId, f32 arg1, f32 arg2, f32 arg3, f32 arg4, case OBJ_ACTOR_180: colId = COL1_0; break; - case OBJ_80_4: - case OBJ_80_5: + case OBJ_SCENERY_4: + case OBJ_SCENERY_5: colId = COL2_1; useCol2 = true; break; - case OBJ_80_149: + case OBJ_SCENERY_149: colId = COL1_5; break; - case OBJ_80_150: + case OBJ_SCENERY_150: colId = COL1_6; break; case OBJ_BOSS_308: @@ -1235,126 +1235,126 @@ bool func_play_800A8054(ObjectId objId, f32 arg1, f32 arg2, f32 arg3, f32 arg4, case OBJ_BOSS_313: colId = COL1_8; break; - case OBJ_80_39: + case OBJ_SCENERY_39: colId = COL1_1; break; - case OBJ_80_120: + case OBJ_SCENERY_120: colId = COL2_18; useCol2 = true; break; - case OBJ_80_124: + case OBJ_SCENERY_124: colId = COL2_15; useCol2 = true; break; - case OBJ_80_126: + case OBJ_SCENERY_126: colId = COL2_16; useCol2 = true; break; - case OBJ_80_47: + case OBJ_SCENERY_47: colId = COL2_7; useCol2 = true; break; - case OBJ_80_2: + case OBJ_SCENERY_2: colId = COL2_2; useCol2 = true; break; - case OBJ_80_3: - case OBJ_80_69: + case OBJ_SCENERY_3: + case OBJ_SCENERY_69: colId = COL2_3; useCol2 = true; break; - case OBJ_80_143: + case OBJ_SCENERY_143: colId = COL2_17; useCol2 = true; break; - case OBJ_80_140: + case OBJ_SCENERY_140: colId = COL2_4; useCol2 = true; break; - case OBJ_80_141: + case OBJ_SCENERY_141: colId = COL2_6; useCol2 = true; break; - case OBJ_80_117: + case OBJ_SCENERY_117: colId = COL2_14; useCol2 = true; break; - case OBJ_80_70: + case OBJ_SCENERY_70: colId = COL2_8; useCol2 = true; break; - case OBJ_80_72: + case OBJ_SCENERY_72: colId = COL2_9; useCol2 = true; break; - case OBJ_80_71: + case OBJ_SCENERY_71: colId = COL2_10; useCol2 = true; break; - case OBJ_80_73: + case OBJ_SCENERY_73: colId = COL2_11; useCol2 = true; break; - case OBJ_80_67: + case OBJ_SCENERY_67: colId = COL2_12; useCol2 = true; break; - case OBJ_80_74: + case OBJ_SCENERY_74: colId = COL2_13; useCol2 = true; break; - case OBJ_80_118: - case OBJ_80_119: - case OBJ_80_121: - case OBJ_80_122: - case OBJ_80_123: - case OBJ_80_125: - case OBJ_80_127: - case OBJ_80_128: - case OBJ_80_129: - case OBJ_80_130: - case OBJ_80_131: - case OBJ_80_132: - case OBJ_80_133: - case OBJ_80_134: - case OBJ_80_135: - case OBJ_80_136: - case OBJ_80_137: - case OBJ_80_138: - case OBJ_80_139: - case OBJ_80_142: - case OBJ_80_144: - case OBJ_80_145: - case OBJ_80_146: - case OBJ_80_147: - case OBJ_80_148: - case OBJ_80_40: - case OBJ_80_41: - case OBJ_80_42: - case OBJ_80_43: - case OBJ_80_44: - case OBJ_80_45: - case OBJ_80_46: - case OBJ_80_48: - case OBJ_80_49: - case OBJ_80_50: - case OBJ_80_51: - case OBJ_80_52: - case OBJ_80_53: - case OBJ_80_54: - case OBJ_80_55: - case OBJ_80_56: - case OBJ_80_57: - case OBJ_80_58: - case OBJ_80_59: - case OBJ_80_60: - case OBJ_80_61: - case OBJ_80_62: - case OBJ_80_63: - case OBJ_80_64: - case OBJ_80_65: - case OBJ_80_66: - case OBJ_80_68: + case OBJ_SCENERY_118: + case OBJ_SCENERY_119: + case OBJ_SCENERY_121: + case OBJ_SCENERY_122: + case OBJ_SCENERY_123: + case OBJ_SCENERY_125: + case OBJ_SCENERY_127: + case OBJ_SCENERY_128: + case OBJ_SCENERY_129: + case OBJ_SCENERY_130: + case OBJ_SCENERY_131: + case OBJ_SCENERY_132: + case OBJ_SCENERY_133: + case OBJ_SCENERY_134: + case OBJ_SCENERY_135: + case OBJ_SCENERY_136: + case OBJ_SCENERY_137: + case OBJ_SCENERY_138: + case OBJ_SCENERY_139: + case OBJ_SCENERY_142: + case OBJ_SCENERY_144: + case OBJ_SCENERY_145: + case OBJ_SCENERY_146: + case OBJ_SCENERY_147: + case OBJ_SCENERY_148: + case OBJ_SCENERY_40: + case OBJ_SCENERY_41: + case OBJ_SCENERY_42: + case OBJ_SCENERY_43: + case OBJ_SCENERY_44: + case OBJ_SCENERY_45: + case OBJ_SCENERY_46: + case OBJ_SCENERY_48: + case OBJ_SCENERY_49: + case OBJ_SCENERY_50: + case OBJ_SCENERY_51: + case OBJ_SCENERY_52: + case OBJ_SCENERY_53: + case OBJ_SCENERY_54: + case OBJ_SCENERY_55: + case OBJ_SCENERY_56: + case OBJ_SCENERY_57: + case OBJ_SCENERY_58: + case OBJ_SCENERY_59: + case OBJ_SCENERY_60: + case OBJ_SCENERY_61: + case OBJ_SCENERY_62: + case OBJ_SCENERY_63: + case OBJ_SCENERY_64: + case OBJ_SCENERY_65: + case OBJ_SCENERY_66: + case OBJ_SCENERY_68: default: colId = COL2_0; useCol2 = true; @@ -1574,7 +1574,7 @@ void func_play_800A8BA4(Player* player) { Boss* boss; // AC Sprite* sprite; // A8 s32 pad; // A4 - Object_80* obj80; // A0 + Scenery* scenery; // A0 Player* opponent; // 9C s32 sp98; f32 sp94; @@ -1595,7 +1595,7 @@ void func_play_800A8BA4(Player* player) { break; } } else if (player->form == FORM_ARWING) { - if ((player->hit1.y < (gGroundLevel + 13.0f)) && (player->state_1C8 != PLAYERSTATE_1C8_DOWN)) { + if ((player->hit1.y < (gGroundHeight + 13.0f)) && (player->state_1C8 != PLAYERSTATE_1C8_DOWN)) { if (gGroundType == GROUNDTYPE_WATER) { player->unk_1F4 = 7; player->unk_0E4 = (player->unk_0D0 + player->unk_110) * 0.5f; @@ -1608,7 +1608,7 @@ void func_play_800A8BA4(Player* player) { func_effect_8007BC7C(player->hit1.x, player->hit1.y, player->hit1.z, 6.0f); } } - if ((player->hit2.y < (gGroundLevel + 13.0f)) && (player->state_1C8 != PLAYERSTATE_1C8_DOWN)) { + if ((player->hit2.y < (gGroundHeight + 13.0f)) && (player->state_1C8 != PLAYERSTATE_1C8_DOWN)) { if (gGroundType == GROUNDTYPE_WATER) { player->unk_1F4 = 7; player->unk_0E4 = (player->unk_0D0 + player->unk_110) * 0.5f; @@ -1627,39 +1627,41 @@ void func_play_800A8BA4(Player* player) { if ((player->timer_498 == 0) || ((gCamCount != 1) && (player->form != FORM_ARWING))) { if (gLevelMode == LEVELMODE_ALL_RANGE) { - Object_58* obj58; + Scenery360* scenery360; sp8C = 1100.0f; if ((gCurrentLevel == LEVEL_SECTOR_Y) || (gCurrentLevel == LEVEL_VENOM_ANDROSS)) { sp8C = 4000.0f; } - for (i = 0, obj58 = gObjects58; i < 200; i++, obj58++) { - if (obj58->obj.status == OBJ_ACTIVE) { - spC8.x = obj58->obj.pos.x - player->pos.x; - spC8.z = obj58->obj.pos.z - player->unk_138; + for (i = 0, scenery360 = gScenery360; i < 200; i++, scenery360++) { + if (scenery360->obj.status == OBJ_ACTIVE) { + spC8.x = scenery360->obj.pos.x - player->pos.x; + spC8.z = scenery360->obj.pos.z - player->unk_138; if (sqrtf(SQ(spC8.x) + SQ(spC8.z)) < sp8C) { - if ((obj58->obj.id == OBJ_80_117) || (obj58->obj.id == OBJ_80_143) || - (obj58->obj.id == OBJ_80_141) || (obj58->obj.id == OBJ_80_149) || - (obj58->obj.id == OBJ_80_150) || (obj58->obj.id == OBJ_80_148) || - (obj58->obj.id == OBJ_80_160) || (obj58->obj.id == OBJ_80_1) || - (obj58->obj.id == OBJ_80_3) || (obj58->obj.id == OBJ_80_140)) { - temp_v0 = func_play_800A8304(player, obj58->obj.id, obj58->obj.pos.x, obj58->obj.pos.y, - obj58->obj.pos.z, obj58->obj.rot.x, obj58->obj.rot.y, - obj58->obj.rot.z); + if ((scenery360->obj.id == OBJ_SCENERY_117) || (scenery360->obj.id == OBJ_SCENERY_143) || + (scenery360->obj.id == OBJ_SCENERY_141) || (scenery360->obj.id == OBJ_SCENERY_149) || + (scenery360->obj.id == OBJ_SCENERY_150) || (scenery360->obj.id == OBJ_SCENERY_148) || + (scenery360->obj.id == OBJ_SCENERY_160) || (scenery360->obj.id == OBJ_SCENERY_1) || + (scenery360->obj.id == OBJ_SCENERY_3) || (scenery360->obj.id == OBJ_SCENERY_140)) { + temp_v0 = + func_play_800A8304(player, scenery360->obj.id, scenery360->obj.pos.x, + scenery360->obj.pos.y, scenery360->obj.pos.z, scenery360->obj.rot.x, + scenery360->obj.rot.y, scenery360->obj.rot.z); if (temp_v0 != 0) { if ((player->form == FORM_LANDMASTER) || (player->form == FORM_ON_FOOT)) { - func_play_800A729C(player, temp_v0, obj58->obj.pos.x, obj58->obj.pos.z); + func_play_800A729C(player, temp_v0, scenery360->obj.pos.x, scenery360->obj.pos.z); } else { - Player_ApplyDamage(player, temp_v0, obj58->info.damage); + Player_ApplyDamage(player, temp_v0, scenery360->info.damage); } } if ((gCurrentLevel == LEVEL_FORTUNA) || (gCurrentLevel == LEVEL_VENOM_2)) { - temp_v0 = func_play_800A7974(player, obj58->info.hitbox, &sp98, obj58->obj.pos.x, - obj58->obj.pos.y, obj58->obj.pos.z, obj58->obj.rot.x, - obj58->obj.rot.y, obj58->obj.rot.z, 0.0f, 0.0f, 0.0f); + temp_v0 = func_play_800A7974( + player, scenery360->info.hitbox, &sp98, scenery360->obj.pos.x, + scenery360->obj.pos.y, scenery360->obj.pos.z, scenery360->obj.rot.x, + scenery360->obj.rot.y, scenery360->obj.rot.z, 0.0f, 0.0f, 0.0f); if ((temp_v0 != 0) && (temp_v0 < 0)) { if (player->whooshTimer == 0) { - func_effect_8007A6F0(&obj58->obj.pos, 0x19000001); + func_effect_8007A6F0(&scenery360->obj.pos, 0x19000001); } player->whooshTimer += 2; if (player->whooshTimer >= 4) { @@ -1668,24 +1670,26 @@ void func_play_800A8BA4(Player* player) { } } } else { - temp_v0 = func_play_800A7974(player, obj58->info.hitbox, &sp98, obj58->obj.pos.x, - obj58->obj.pos.y, obj58->obj.pos.z, obj58->obj.rot.x, - obj58->obj.rot.y, obj58->obj.rot.z, 0.0f, 0.0f, 0.0f); + temp_v0 = + func_play_800A7974(player, scenery360->info.hitbox, &sp98, scenery360->obj.pos.x, + scenery360->obj.pos.y, scenery360->obj.pos.z, scenery360->obj.rot.x, + scenery360->obj.rot.y, scenery360->obj.rot.z, 0.0f, 0.0f, 0.0f); if (temp_v0 != 0) { if (temp_v0 < 0) { if (player->whooshTimer == 0) { - func_effect_8007A6F0(&obj58->obj.pos, 0x19000001); + func_effect_8007A6F0(&scenery360->obj.pos, 0x19000001); } player->whooshTimer += 2; if (player->whooshTimer >= 4) { player->whooshTimer = 4; } } else if ((player->form == FORM_LANDMASTER) || (player->form == FORM_ON_FOOT)) { - func_play_800A729C(player, temp_v0, obj58->obj.pos.x, obj58->obj.pos.z); + func_play_800A729C(player, temp_v0, scenery360->obj.pos.x, scenery360->obj.pos.z); } else { - Player_ApplyDamage(player, temp_v0, obj58->info.damage); - if (obj58->obj.id == OBJ_80_131) { - Matrix_RotateY(gCalcMatrix, (obj58->obj.rot.y + 180.0f) * M_DTOR, MTXF_NEW); + Player_ApplyDamage(player, temp_v0, scenery360->info.damage); + if (scenery360->obj.id == OBJ_SCENERY_131) { + Matrix_RotateY(gCalcMatrix, (scenery360->obj.rot.y + 180.0f) * M_DTOR, + MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, &D_800D3040[sp98 - 1], &spBC); player->unk_0D8.x = spBC.x; player->unk_0D8.y = spBC.y; @@ -1695,15 +1699,17 @@ void func_play_800A8BA4(Player* player) { player->pos.x = player->unk_090.x; player->pos.y = player->unk_090.y; player->pos.z = player->unk_090.z; - player->unk_114 = obj58->obj.rot.y + 180.0f; + player->unk_114 = scenery360->obj.rot.y + 180.0f; player->timer_498 = 5; } - if ((obj58->obj.id == OBJ_80_135) || (obj58->obj.id == OBJ_80_136)) { - if (obj58->obj.id == OBJ_80_135) { - Matrix_RotateY(gCalcMatrix, (obj58->obj.rot.y + 180.0f) * M_DTOR, MTXF_NEW); + if ((scenery360->obj.id == OBJ_SCENERY_135) || + (scenery360->obj.id == OBJ_SCENERY_136)) { + if (scenery360->obj.id == OBJ_SCENERY_135) { + Matrix_RotateY(gCalcMatrix, (scenery360->obj.rot.y + 180.0f) * M_DTOR, + MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, &D_800D3088[sp98 - 1], &spBC); } else { - Matrix_RotateY(gCalcMatrix, obj58->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, scenery360->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, &D_800D30B8[sp98 - 1], &spBC); } player->unk_0D8.x = spBC.x; @@ -1714,10 +1720,10 @@ void func_play_800A8BA4(Player* player) { player->pos.x = player->unk_090.x; player->pos.y = player->unk_090.y; player->pos.z = player->unk_090.z; - if (obj58->obj.id == OBJ_80_135) { - player->unk_114 = obj58->obj.rot.y + 180.0f; + if (scenery360->obj.id == OBJ_SCENERY_135) { + player->unk_114 = scenery360->obj.rot.y + 180.0f; } else { - player->unk_114 = obj58->obj.rot.y; + player->unk_114 = scenery360->obj.rot.y; } player->timer_498 = 5; } @@ -1728,35 +1734,38 @@ void func_play_800A8BA4(Player* player) { } } } else { - for (i = 0, obj80 = gObjects80; i < ARRAY_COUNT(gObjects80); i++, obj80++) { - if ((obj80->obj.status == OBJ_ACTIVE) && (obj80->obj.id != OBJ_80_58) && - (obj80->obj.id != OBJ_80_105) && (obj80->obj.id != OBJ_80_59) && (obj80->obj.id != OBJ_80_60) && - (obj80->obj.id != OBJ_80_61) && (obj80->obj.id != OBJ_80_66) && (obj80->obj.id != OBJ_80_67) && - (obj80->obj.id != OBJ_80_70) && (obj80->obj.id != OBJ_80_72) && (obj80->obj.id != OBJ_80_71) && - (obj80->obj.id != OBJ_80_73) && (obj80->obj.id != OBJ_80_74) && (obj80->obj.id != OBJ_80_69) && - ((player->unk_138 - 2000.0f) < obj80->obj.pos.z)) { - if ((obj80->obj.id == OBJ_80_1) || (obj80->obj.id == OBJ_80_4) || (obj80->obj.id == OBJ_80_5) || - (obj80->obj.id == OBJ_80_47) || (obj80->obj.id == OBJ_80_117) || - (obj80->obj.id == OBJ_80_120) || (obj80->obj.id == OBJ_80_124) || - (obj80->obj.id == OBJ_80_126) || (obj80->obj.id == OBJ_80_2) || (obj80->obj.id == OBJ_80_3)) { - spC8.x = obj80->obj.pos.x - player->pos.x; - spC8.z = obj80->obj.pos.z - player->unk_138; + for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) { + if ((scenery->obj.status == OBJ_ACTIVE) && (scenery->obj.id != OBJ_SCENERY_58) && + (scenery->obj.id != OBJ_SCENERY_105) && (scenery->obj.id != OBJ_SCENERY_59) && + (scenery->obj.id != OBJ_SCENERY_60) && (scenery->obj.id != OBJ_SCENERY_61) && + (scenery->obj.id != OBJ_SCENERY_66) && (scenery->obj.id != OBJ_SCENERY_67) && + (scenery->obj.id != OBJ_SCENERY_70) && (scenery->obj.id != OBJ_SCENERY_72) && + (scenery->obj.id != OBJ_SCENERY_71) && (scenery->obj.id != OBJ_SCENERY_73) && + (scenery->obj.id != OBJ_SCENERY_74) && (scenery->obj.id != OBJ_SCENERY_69) && + ((player->unk_138 - 2000.0f) < scenery->obj.pos.z)) { + if ((scenery->obj.id == OBJ_SCENERY_1) || (scenery->obj.id == OBJ_SCENERY_4) || + (scenery->obj.id == OBJ_SCENERY_5) || (scenery->obj.id == OBJ_SCENERY_47) || + (scenery->obj.id == OBJ_SCENERY_117) || (scenery->obj.id == OBJ_SCENERY_120) || + (scenery->obj.id == OBJ_SCENERY_124) || (scenery->obj.id == OBJ_SCENERY_126) || + (scenery->obj.id == OBJ_SCENERY_2) || (scenery->obj.id == OBJ_SCENERY_3)) { + spC8.x = scenery->obj.pos.x - player->pos.x; + spC8.z = scenery->obj.pos.z - player->unk_138; if (sqrtf(SQ(spC8.x) + SQ(spC8.z)) < 1100.0f) { - temp_v0 = func_play_800A8304(player, obj80->obj.id, obj80->obj.pos.x, obj80->obj.pos.y, - obj80->obj.pos.z, obj80->obj.rot.x, obj80->obj.rot.y, - obj80->obj.rot.z); + temp_v0 = func_play_800A8304(player, scenery->obj.id, scenery->obj.pos.x, + scenery->obj.pos.y, scenery->obj.pos.z, scenery->obj.rot.x, + scenery->obj.rot.y, scenery->obj.rot.z); if (temp_v0 != 0) { - Player_ApplyDamage(player, temp_v0, obj80->info.damage); + Player_ApplyDamage(player, temp_v0, scenery->info.damage); } } } else { - padB0 = obj80->obj.rot.y; - if (obj80->info.action == (ObjectFunc) func_enmy_80066EA8) { + padB0 = scenery->obj.rot.y; + if (scenery->info.action == (ObjectFunc) func_enmy_80066EA8) { padB0 = 0.0f; } - temp_v0 = func_play_800A7974(player, obj80->info.hitbox, &sp98, obj80->obj.pos.x, - obj80->obj.pos.y, obj80->obj.pos.z, obj80->obj.rot.x, padB0, - obj80->obj.rot.z, 0.0f, 0.0f, 0.0f); + temp_v0 = func_play_800A7974(player, scenery->info.hitbox, &sp98, scenery->obj.pos.x, + scenery->obj.pos.y, scenery->obj.pos.z, scenery->obj.rot.x, padB0, + scenery->obj.rot.z, 0.0f, 0.0f, 0.0f); if (temp_v0 != 0) { if (temp_v0 < 0) { if (temp_v0 == -1) { @@ -1767,25 +1776,25 @@ void func_play_800A8BA4(Player* player) { player->shadowing = 80; } if (player->whooshTimer == 0) { - AUDIO_PLAY_SFX(0x19000001, obj80->sfxSource, 0); + AUDIO_PLAY_SFX(0x19000001, scenery->sfxSource, 0); } player->whooshTimer += 2; if (player->whooshTimer >= 4) { player->whooshTimer = 4; } - } else if (obj80->obj.id == OBJ_80_54) { + } else if (scenery->obj.id == OBJ_SCENERY_54) { if (player->whooshTimer == 0) { - AUDIO_PLAY_SFX(0x19832019, obj80->sfxSource, 0); + AUDIO_PLAY_SFX(0x19832019, scenery->sfxSource, 0); } player->whooshTimer += 2; if (player->whooshTimer >= 4) { player->whooshTimer = 4; } } else { - Player_ApplyDamage(player, temp_v0, obj80->info.damage); - if ((obj80->obj.id == OBJ_80_48) || (obj80->obj.id == OBJ_80_55) || - (obj80->obj.id == OBJ_80_49)) { - Matrix_RotateY(gCalcMatrix, obj80->obj.rot.y * M_DTOR, MTXF_NEW); + Player_ApplyDamage(player, temp_v0, scenery->info.damage); + if ((scenery->obj.id == OBJ_SCENERY_48) || (scenery->obj.id == OBJ_SCENERY_55) || + (scenery->obj.id == OBJ_SCENERY_49)) { + Matrix_RotateY(gCalcMatrix, scenery->obj.rot.y * M_DTOR, MTXF_NEW); spC8.x = -(player->unk_0D0 + player->unk_110) * 0.7f; spC8.y = 0.0f; spC8.z = 0.0f; @@ -1795,8 +1804,8 @@ void func_play_800A8BA4(Player* player) { player->unk_0D8.y = spBC.y; player->pos.x = player->unk_090.x; player->timer_498 = 5; - } else if (obj80->obj.id == OBJ_80_50) { - if (player->pos.x < obj80->obj.pos.x) { + } else if (scenery->obj.id == OBJ_SCENERY_50) { + if (player->pos.x < scenery->obj.pos.x) { player->unk_0D8.x = -30.0f; player->unk_0E8 = 45.0f; } else { @@ -1806,9 +1815,9 @@ void func_play_800A8BA4(Player* player) { player->unk_0D8.y = 0.0f; player->pos.x = player->unk_090.x; player->timer_498 = 5; - } else if (obj80->obj.id == OBJ_80_131) { - Matrix_RotateY(gCalcMatrix, (obj80->obj.rot.y + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateZ(gCalcMatrix, -obj80->obj.rot.z * M_DTOR, MTXF_APPLY); + } else if (scenery->obj.id == OBJ_SCENERY_131) { + Matrix_RotateY(gCalcMatrix, (scenery->obj.rot.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateZ(gCalcMatrix, -scenery->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &D_800D3040[sp98 - 1], &spBC); player->unk_0D8.x = spBC.x; player->unk_0D8.y = spBC.y; @@ -2109,8 +2118,8 @@ void func_play_800A8BA4(Player* player) { void func_play_800AA800(Player* player) { s32 sp144; - Object_58* obj58; - Object_80* obj80; + Scenery360* scenery360; + Scenery* scenery; s32 count; s32 colId; s32 i; @@ -2145,9 +2154,9 @@ void func_play_800AA800(Player* player) { player->unk_06C = player->unk_138 - player->pos.y; if (D_ctx_801784AC != 4) { if (gCamCount == 1) { - player->unk_068 = gGroundLevel + 3.0f; + player->unk_068 = gGroundHeight + 3.0f; } else { - player->unk_068 = gGroundLevel; + player->unk_068 = gGroundHeight; if (player->form == FORM_ON_FOOT) { player->unk_06C = player->unk_138; } @@ -2160,22 +2169,22 @@ void func_play_800AA800(Player* player) { if (gCamCount != 1) { if (player->form == FORM_ON_FOOT) { for (sp144 = 0; sp144 < 200; sp144++) { - obj58 = &gObjects58[sp144]; - if ((obj58->obj.status == OBJ_ACTIVE) && - ((obj58->obj.id == OBJ_80_143) || (obj58->obj.id == OBJ_80_140) || - (obj58->obj.id == OBJ_80_141)) && - (fabsf(obj58->obj.pos.x - player->pos.x) < 2000.0f) && - (fabsf(obj58->obj.pos.z - player->unk_138) < 2000.0f)) { - spC8.x = obj58->obj.pos.x; - spC8.y = obj58->obj.pos.y; - spC8.z = obj58->obj.pos.z; + scenery360 = &gScenery360[sp144]; + if ((scenery360->obj.status == OBJ_ACTIVE) && + ((scenery360->obj.id == OBJ_SCENERY_143) || (scenery360->obj.id == OBJ_SCENERY_140) || + (scenery360->obj.id == OBJ_SCENERY_141)) && + (fabsf(scenery360->obj.pos.x - player->pos.x) < 2000.0f) && + (fabsf(scenery360->obj.pos.z - player->unk_138) < 2000.0f)) { + spC8.x = scenery360->obj.pos.x; + spC8.y = scenery360->obj.pos.y; + spC8.z = scenery360->obj.pos.z; spD4.x = player->pos.x; - spD4.y = gGroundLevel; + spD4.y = gGroundHeight; spD4.z = player->unk_138; colId = COL2_4; - if (obj58->obj.id == OBJ_80_141) { + if (scenery360->obj.id == OBJ_SCENERY_141) { colId = COL2_6; - } else if (obj58->obj.id == OBJ_80_143) { + } else if (scenery360->obj.id == OBJ_SCENERY_143) { colId = COL2_17; } if (func_col2_800A3690(&spD4, &spC8, colId, &spBC)) { @@ -2191,16 +2200,17 @@ void func_play_800AA800(Player* player) { if ((gLevelMode == LEVELMODE_ALL_RANGE) && (gLevelType == LEVELTYPE_PLANET)) { player->unk_064 = player->pos.x; player->unk_06C = player->unk_138; - for (sp144 = 0, obj58 = gObjects58; sp144 < 200; sp144++, obj58++) { - if ((obj58->obj.status == OBJ_ACTIVE) && - ((obj58->obj.id == OBJ_80_150) || (obj58->obj.id == OBJ_80_149) || - (obj58->obj.id == OBJ_80_148) || (obj58->obj.id == OBJ_80_1) || (obj58->obj.id == OBJ_80_3)) && - (fabsf(obj58->obj.pos.x - player->pos.x) < 2500.0f) && - (fabsf(obj58->obj.pos.z - player->unk_138) < 2500.0f)) { - tempx = obj58->obj.pos.x; - tempy = obj58->obj.pos.y; - tempz = obj58->obj.pos.z; - sp120 = obj58->obj.rot.y; + for (sp144 = 0, scenery360 = gScenery360; sp144 < 200; sp144++, scenery360++) { + if ((scenery360->obj.status == OBJ_ACTIVE) && + ((scenery360->obj.id == OBJ_SCENERY_150) || (scenery360->obj.id == OBJ_SCENERY_149) || + (scenery360->obj.id == OBJ_SCENERY_148) || (scenery360->obj.id == OBJ_SCENERY_1) || + (scenery360->obj.id == OBJ_SCENERY_3)) && + (fabsf(scenery360->obj.pos.x - player->pos.x) < 2500.0f) && + (fabsf(scenery360->obj.pos.z - player->unk_138) < 2500.0f)) { + tempx = scenery360->obj.pos.x; + tempy = scenery360->obj.pos.y; + tempz = scenery360->obj.pos.z; + sp120 = scenery360->obj.rot.y; Matrix_RotateY(gCalcMatrix, -sp120 * M_DTOR, MTXF_NEW); spEC.x = player->pos.x - tempx; spEC.y = 0.0f; @@ -2213,8 +2223,8 @@ void func_play_800AA800(Player* player) { spC8.y = tempy; spC8.z = tempz; - if ((obj58->obj.id == OBJ_80_149) || (obj58->obj.id == OBJ_80_150)) { - if (obj58->obj.id == OBJ_80_149) { + if ((scenery360->obj.id == OBJ_SCENERY_149) || (scenery360->obj.id == OBJ_SCENERY_150)) { + if (scenery360->obj.id == OBJ_SCENERY_149) { colId = COL1_5; } else { colId = COL1_6; @@ -2227,7 +2237,7 @@ void func_play_800AA800(Player* player) { } } else { colId = COL2_0; - if (obj58->obj.id == OBJ_80_3) { + if (scenery360->obj.id == OBJ_SCENERY_3) { colId = COL2_3; } if (func_col2_800A3690(&spD4, &spC8, colId, &spBC)) { @@ -2240,24 +2250,25 @@ void func_play_800AA800(Player* player) { } } } - for (sp144 = 0, obj80 = gObjects80; + for (sp144 = 0, scenery = gScenery; (sp144 < 50) && (gLevelMode == LEVELMODE_ON_RAILS) && (gCurrentLevel != LEVEL_VENOM_1); - sp144++, obj80++) { - if ((obj80->obj.status == OBJ_ACTIVE) && ((player->unk_138 - 3000.0f) < obj80->obj.pos.z) && - (obj80->obj.id != OBJ_80_0) && (obj80->obj.id != OBJ_80_8)) { - tempx = obj80->obj.pos.x; - tempy = obj80->obj.pos.y; - tempz = obj80->obj.pos.z; - sp120 = obj80->obj.rot.y; - if ((obj80->obj.id == OBJ_80_3) || (obj80->obj.id == OBJ_80_2) || (obj80->obj.id == OBJ_80_47) || - (obj80->obj.id == OBJ_80_4) || (obj80->obj.id == OBJ_80_5)) { + sp144++, scenery++) { + if ((scenery->obj.status == OBJ_ACTIVE) && ((player->unk_138 - 3000.0f) < scenery->obj.pos.z) && + (scenery->obj.id != OBJ_SCENERY_0) && (scenery->obj.id != OBJ_SCENERY_8)) { + tempx = scenery->obj.pos.x; + tempy = scenery->obj.pos.y; + tempz = scenery->obj.pos.z; + sp120 = scenery->obj.rot.y; + if ((scenery->obj.id == OBJ_SCENERY_3) || (scenery->obj.id == OBJ_SCENERY_2) || + (scenery->obj.id == OBJ_SCENERY_47) || (scenery->obj.id == OBJ_SCENERY_4) || + (scenery->obj.id == OBJ_SCENERY_5)) { Matrix_RotateY(gCalcMatrix, -sp120 * M_DTOR, MTXF_NEW); for (var_fs1 = var_fs0 = -50.0f; var_fs0 > -500.0f; var_fs0 -= 5.0f, var_fs1 -= 5.0f) { spEC.x = player->pos.x - tempx; spEC.y = player->pos.y + var_fs0 - tempy; spEC.z = player->unk_138 + var_fs1 - tempz; Matrix_MultVec3fNoTranslate(gCalcMatrix, &spEC, &spE0); - if ((player->pos.y + var_fs0) <= gGroundLevel) { + if ((player->pos.y + var_fs0) <= gGroundHeight) { break; } spD4.x = spE0.x + tempx; @@ -2269,14 +2280,14 @@ void func_play_800AA800(Player* player) { colId = COL2_0; - if (obj80->obj.id == OBJ_80_47) { + if (scenery->obj.id == OBJ_SCENERY_47) { colId = COL2_7; } - if (obj80->obj.id == OBJ_80_2) { + if (scenery->obj.id == OBJ_SCENERY_2) { colId = COL2_2; - } else if (obj80->obj.id == OBJ_80_3) { + } else if (scenery->obj.id == OBJ_SCENERY_3) { colId = COL2_3; - } else if ((obj80->obj.id == OBJ_80_4) || (obj80->obj.id == OBJ_80_5)) { + } else if ((scenery->obj.id == OBJ_SCENERY_4) || (scenery->obj.id == OBJ_SCENERY_5)) { colId = COL2_1; } if (func_col2_800A3690(&spD4, &spC8, colId, &spBC)) { @@ -2289,10 +2300,10 @@ void func_play_800AA800(Player* player) { } } } else { - hitboxData = obj80->info.hitbox; + hitboxData = scenery->info.hitbox; count = *hitboxData; if (count != 0) { - if (obj80->info.action == (ObjectFunc) func_enmy_80066EA8) { + if (scenery->info.action == (ObjectFunc) func_enmy_80066EA8) { sp120 = 0.0f; } hitboxData++; @@ -2322,12 +2333,12 @@ void func_play_800AA800(Player* player) { tempx2 = spE0.x + tempx; tempy2 = spE0.y + tempy; tempz2 = spE0.z + tempz; - if (spEC.y + tempy <= gGroundLevel) { + if (spEC.y + tempy <= gGroundHeight) { break; } if (func_play_800A78C4(hitbox, tempx, tempy, tempz, tempx2, tempy2, tempz2)) { - if (gGroundLevel < player->unk_068) { + if (gGroundHeight < player->unk_068) { player->unk_068 = spEC.y + 15.0f + tempy; player->unk_06C = spEC.z + 10.0f + tempz; player->unk_248 = DEG_TO_RAD(sp100); @@ -2393,7 +2404,7 @@ void func_play_800AB334(void) { break; case LEVEL_METEO: case LEVEL_SECTOR_X: - if (gLevelStage == 1) { + if (gLevelPhase == 1) { gFogRed = 178; gFogGreen = 190; gFogBlue = 90; @@ -2434,7 +2445,7 @@ void func_play_800AB334(void) { /* fallthrough */ case LEVEL_SOLAR: D_ctx_80178294 = 1; - gGroundLevel = -20000.0f; + gGroundHeight = -20000.0f; fptr = MEM_ARRAY_ALLOCATE(D_ctx_801782CC, 17 * 17); for (i = 0; i < 17 * 17; i++, fptr++) { *fptr = 0.0f; @@ -2553,13 +2564,13 @@ void Play_Init(void) { D_ctx_80177C78 = D_ctx_80177C8C = gShowBossHealth = gStarWolfMsgTimer = gAllRangeWingRepairTimer = gAllRangeWingRepairSent = 0; D_display_800CA220 = 0; - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; if (gCurrentLevel != LEVEL_VERSUS) { - gOverlayStage = 0; + gSceneSetup = 0; } gShowHud = 1; D_ctx_80177A98 = D_ctx_80177AB0 = 1; - D_ctx_80177AC8 = D_800D2F54 = 0; + gAqDrawMode = D_800D2F54 = 0; D_display_800CA230 = D_800D2F58 = 0.0f; gLevelMode = LEVELMODE_ON_RAILS; D_ctx_80177CE8 = D_bg_8015F968 = 0.0f; @@ -2571,36 +2582,36 @@ void Play_Init(void) { func_play_800AB964(); } } - if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gLevelStage == 1)) { + if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gLevelPhase == 1)) { gLevelMode = LEVELMODE_ALL_RANGE; } D_ctx_80177E7C = 0; func_play_800A594C(); - gDropHitCountItem = D_ctx_8017796C = D_Timer_80177B44 = D_ctx_80177B4C = gAllRangeEventTimer = gAllRangeFrameCount = - gBossActive = gGameFrameCount = gCameraShake = D_ctx_801782FC = gBossFrameCount = gCallTimer = - gAllRangeSupplyTimer = gNextPlanetPath = 0; + gDropHitCountItem = D_ctx_8017796C = gStartAndrossFightTimer = gSoShieldsEmpty = gAllRangeEventTimer = + gAllRangeFrameCount = gBossActive = gGameFrameCount = gCameraShake = D_ctx_801782FC = gBossFrameCount = + gCallTimer = gAllRangeSupplyTimer = gNextPlanetPath = 0; if (gCurrentLevel == LEVEL_SECTOR_X) { gNextPlanetPath = 1; } D_ctx_80177CC0 = -25000.0f; D_ctx_80177950 = 1.0f; - if ((gCurrentLevel == LEVEL_VENOM_2) && (gLevelStage == 2)) { + if ((gCurrentLevel == LEVEL_VENOM_2) && (gLevelPhase == 2)) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; } else { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; } - gScreenFlashTimer = D_ctx_80178360 = D_ctx_80178364 = D_ctx_80178368 = D_hud_80161704 = D_hud_80161708 = - gFillScreenAlpha = D_ctx_80177C50 = gShowAllRangeCountdown = D_ctx_80177B6C = 0; + gScreenFlashTimer = gLight3R = gLight3G = gLight3B = D_hud_80161704 = D_hud_80161708 = gFillScreenAlpha = + D_ctx_80177C50 = gShowAllRangeCountdown = gCoUturnCount = 0; gCsFrameCount = 0; gFillScreenAlpha = gFillScreenAlphaTarget = 255; gFillScreenAlphaStep = 16; - D_ctx_8017836C = 0.0f; - D_bg_8015F960 = 0.0f; - gGroundLevel = 0.0f; - D_ctx_80178414 = D_ctx_80178420 = D_ctx_80178424 = D_ctx_80178428 = D_ctx_8017842C = D_ctx_80178430 = 0.0f; + gLight3Brightness = 0.0f; + gWarpZoneBgAlpha = 0.0f; + gGroundHeight = 0.0f; + gStarWarpDistortion = gStarfieldX = gStarfieldY = gStarfieldRoll = D_ctx_8017842C = D_ctx_80178430 = 0.0f; if ((gLevelType == LEVELTYPE_SPACE) || (gCurrentLevel == LEVEL_TRAINING)) { func_play_800A5EBC(); @@ -2608,7 +2619,7 @@ void Play_Init(void) { D_ctx_80177A98 = 0; } } else { - D_ctx_80178410 = 0; + gStarCount = 0; } gFogAlpha = 255; D_ctx_801784E8 = 5.0f; @@ -2634,14 +2645,14 @@ void Play_Init(void) { func_play_800AB2AC(); for (i = 0; i < gCamCount; i++) { gPlayer[i].state_1C8 = PLAYERSTATE_1C8_INIT; - gPlayerFillScreenAlphas[i] = D_ctx_801783C0[i] = 0; + gPlayerGlareAlphas[i] = D_ctx_801783C0[i] = 0; gControllerRumbleTimers[i] = 0; D_ctx_80177C30[i] = 0; } if (gLevelMode == LEVELMODE_ALL_RANGE) { - MEM_ARRAY_ALLOCATE(gObjects58, 200); + MEM_ARRAY_ALLOCATE(gScenery360, 200); for (i = 0; i < 200; i++) { - gObjects58[i].obj.status = OBJ_FREE; + gScenery360[i].obj.status = OBJ_FREE; } switch (gCurrentLevel) { case LEVEL_SECTOR_Z: @@ -2668,12 +2679,12 @@ void Play_Init(void) { break; case LEVEL_VENOM_2: Venom2_80196968(); - if (gLevelStage == 0) { + if (gLevelPhase == 0) { ActorAllRange_SpawnTeam(); } break; case LEVEL_VENOM_ANDROSS: - if (gLevelStage == 1) { + if (gLevelPhase == 1) { if (gAllRangeCheckpoint == 0) { Andross_801878A8(); } else { @@ -2690,7 +2701,7 @@ void Play_Init(void) { func_play_800AB334(); } -void func_play_800AC290(Player* player, PlayerShot* shot, f32 arg2, f32 arg3, PlayerShotId shotId, f32 arg5) { +void func_play_800AC290(Player* player, PlayerShot* shot, f32 arg2, f32 arg3, PlayerShotId shotId, f32 speed) { Vec3f sp44; Vec3f sp38; Vec3f sp2C; @@ -2701,11 +2712,11 @@ void func_play_800AC290(Player* player, PlayerShot* shot, f32 arg2, f32 arg3, Pl Matrix_RotateZ(gCalcMatrix, -((player->unk_0F8 + player->unk_0F0) * M_DTOR), MTXF_APPLY); Matrix_Translate(gCalcMatrix, player->unk_084, player->unk_080, 0.0f, MTXF_APPLY); if (gVersusMode && (shotId <= PLAYERSHOT_1)) { - arg5 *= 0.5f; + speed *= 0.5f; } sp44.x = 0.0f; sp44.y = 0.0f; - sp44.z = arg5; + sp44.z = speed; Matrix_MultVec3f(gCalcMatrix, &sp44, &sp38); sp44.x = arg2; sp44.y = -5.0f + arg3; @@ -2747,7 +2758,7 @@ void func_play_800AC290(Player* player, PlayerShot* shot, f32 arg2, f32 arg3, Pl } else { shot->unk_30 = player->unk_0E8 + player->unk_114; shot->unk_2C = player->unk_0E4 + player->unk_4D8; - if (arg5 <= 65.0f) { + if (speed <= 65.0f) { shot->unk_5C = 1; } shot->unk_64 = 30; @@ -2756,7 +2767,7 @@ void func_play_800AC290(Player* player, PlayerShot* shot, f32 arg2, f32 arg3, Pl shot->playerNum = player->num; } -void func_play_800AC650(Player* player, PlayerShot* shot, PlayerShotId shotId, f32 arg3) { +void func_play_800AC650(Player* player, PlayerShot* shot, PlayerShotId shotId, f32 speed) { Vec3f sp54; Vec3f sp48; Vec3f sp3C; @@ -2771,7 +2782,7 @@ void func_play_800AC650(Player* player, PlayerShot* shot, PlayerShotId shotId, f Matrix_RotateX(gCalcMatrix, player->unk_17C * M_DTOR, MTXF_APPLY); sp54.x = 0; sp54.y = 0; - sp54.z = arg3; + sp54.z = speed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48); Matrix_Translate(gCalcMatrix, 0.0f, player->unk_18C + 30.0f, 0, MTXF_NEW); Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, MTXF_APPLY); @@ -2806,7 +2817,7 @@ void func_play_800AC650(Player* player, PlayerShot* shot, PlayerShotId shotId, f shot->playerNum = player->num; if (shotId == PLAYERSHOT_8) { - if (arg3 <= 65.0f) { + if (speed <= 65.0f) { shot->unk_5C = 1; } shot->unk_64 = 30; @@ -2873,11 +2884,12 @@ void func_play_800ACC7C(Player* player) { gBombCount[player->num]--; } if (player->form == FORM_ARWING) { - func_play_800AC290(player, &gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1], 0.0f, 0.0f, PLAYERSHOT_3, 180.0f); + func_play_800AC290(player, &gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1], 0.0f, 0.0f, PLAYERSHOT_BOMB, + 180.0f); } else if (player->form == FORM_LANDMASTER) { - func_play_800AC650(player, &gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1], PLAYERSHOT_3, 180.0f); + func_play_800AC650(player, &gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1], PLAYERSHOT_BOMB, 180.0f); } else { - func_play_800ACDC0(player, &gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1], PLAYERSHOT_3); + func_play_800ACDC0(player, &gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1], PLAYERSHOT_BOMB); } gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1].unk_48 = 30.0f; gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1].unk_60 = 0; @@ -2898,7 +2910,7 @@ void func_play_800ACDC0(Player* player, PlayerShot* shot, PlayerShotId shotId) { Matrix_RotateX(gCalcMatrix, player->unk_154 * M_DTOR, MTXF_APPLY); sp5C.x = 0.0f; sp5C.y = 0.0f; - if (shotId == PLAYERSHOT_3) { + if (shotId == PLAYERSHOT_BOMB) { sp5C.z = 100.0f; } else { sp5C.z = 150.0f; @@ -2950,7 +2962,7 @@ bool func_play_800AD118(s32 playerNum) { s32 i; for (i = 0, actor = gActors; i < ARRAY_COUNT(gActors); i++, actor++) { - if ((actor->obj.status == OBJ_ACTIVE) && (actor->timer_0CA[playerNum] != 0)) { + if ((actor->obj.status == OBJ_ACTIVE) && (actor->lockOnTimers[playerNum] != 0)) { return false; } } @@ -2958,7 +2970,7 @@ bool func_play_800AD118(s32 playerNum) { for (i = 0; i < gCamCount; i++) { if (((gPlayer[playerNum].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[playerNum].state_1C8 == PLAYERSTATE_1C8_U_TURN)) && - (D_ctx_80177B00[i][playerNum] != 0)) { + (gVsLockOnTimers[i][playerNum] != 0)) { return false; } } @@ -3002,7 +3014,7 @@ bool func_play_800AD1F4(Player* player) { if (gInputPress->button & A_BUTTON) { for (i = 0; i < ARRAY_COUNT(gActors); i++) { - if ((gActors[i].obj.status == OBJ_ACTIVE) && (gActors[i].timer_0CA[player->num] != 0)) { + if ((gActors[i].obj.status == OBJ_ACTIVE) && (gActors[i].lockOnTimers[player->num] != 0)) { if ((gPlayerShots[14 - player->num].obj.status == 0) || (gPlayerShots[14 - player->num].obj.id != PLAYERSHOT_8) || ((gPlayerShots[14 - player->num].obj.id == PLAYERSHOT_8) && @@ -3040,13 +3052,13 @@ bool func_play_800AD1F4(Player* player) { if (gInputPress->button & B_BUTTON) { var_a2 = false; for (i = 0; i < ARRAY_COUNT(gActors); i++) { - if ((gActors[i].obj.status == OBJ_ACTIVE) && (gActors[i].timer_0CA[player->num] != 0)) { + if ((gActors[i].obj.status == OBJ_ACTIVE) && (gActors[i].lockOnTimers[player->num] != 0)) { var_a2 = true; break; } } for (i = 0; i < gCamCount; i++) { - if (D_ctx_80177B00[i][player->num] != 0) { + if (gVsLockOnTimers[i][player->num] != 0) { var_a2 = true; break; } @@ -3141,7 +3153,7 @@ void func_play_800ADA28(Player* player) { Math_SmoothStepToF(&player->wings.unk_08, -70.0f, 0.3f, 100.0f, 0.f); Math_SmoothStepToF(&player->wings.unk_0C, 70.0f, 0.3f, 100.0f, 0.f); Math_SmoothStepToF(&player->wings.unk_10, 70.0f, 0.3f, 100.0f, 0.f); - if (player->pos.y < (gGroundLevel + 70.0f)) { + if (player->pos.y < (gGroundHeight + 70.0f)) { player->pos.y += 6.0f; } } @@ -3155,7 +3167,7 @@ void func_play_800ADA28(Player* player) { Math_SmoothStepToF(&player->wings.unk_08, 70.0f, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->wings.unk_0C, -70.0f, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->wings.unk_10, -70.0f, 0.3f, 100.0f, 0.0f); - if (player->pos.y < (gGroundLevel + 70.0f)) { + if (player->pos.y < (gGroundHeight + 70.0f)) { player->pos.y += 6.0f; } } @@ -3189,7 +3201,7 @@ void func_play_800ADD98(Player* player) { Math_SmoothStepToF(&player->unk_170, 0.0f, 1.0f, 0.2f, 0.0f); Math_SmoothStepToF(&player->unk_16C, 0.0f, 1.0f, 0.2f, 0.0f); if (gInputPress->button & Z_TRIG) { - if ((player->timer_1E0 != 0) && (player->unk_12C > 0.0f) && (player->unk_2BC < 10.0f)) { + if ((player->timer_1E0 != 0) && (player->unk_12C > 0.0f) && (player->boostMeter < 10.0f)) { player->unk_1DC = 1; player->timer_1E8 = 15; player->unk_1EC = player->unk_1F0 = 20; @@ -3198,7 +3210,7 @@ void func_play_800ADD98(Player* player) { } } if (gInputPress->button & R_TRIG) { - if ((player->timer_1E4 != 0) && (player->unk_12C < 0.0f) && (player->unk_2BC < 10.0f)) { + if ((player->timer_1E4 != 0) && (player->unk_12C < 0.0f) && (player->boostMeter < 10.0f)) { player->unk_1DC = 1; player->timer_1E8 = 15; player->unk_1EC = player->unk_1F0 = -20; @@ -3296,8 +3308,8 @@ void func_play_800AE278(Player* player) { player->cam.at.z += 24000.0f; } if (var_v0) { - D_ctx_80177B00[player->num][0] = D_ctx_80177B00[player->num][1] = D_ctx_80177B00[player->num][2] = - D_ctx_80177B00[player->num][3] = 0; + gVsLockOnTimers[player->num][0] = gVsLockOnTimers[player->num][1] = gVsLockOnTimers[player->num][2] = + gVsLockOnTimers[player->num][3] = 0; } } else { var_fv1 = 12500.0f; @@ -3386,14 +3398,14 @@ void func_play_800AE4A4(Player* player) { D_ctx_80177968 = 2.3f; var_fa1 = 0.1f; temp = -sp78 * D_ctx_80177970; - if ((temp <= 0.0f) && (player->pos.y < (gGroundLevel + 50.0f))) { + if ((temp <= 0.0f) && (player->pos.y < (gGroundHeight + 50.0f))) { D_ctx_80177968 *= 2.0f; temp = 0.0f; var_fa1 = 0.2f; } Math_SmoothStepToF(&player->unk_0E4, temp, var_fa1, D_ctx_80177968, 0.03f); var_fv1 = 1.5f; - if (player->pos.y < (gGroundLevel + 70.0f)) { + if (player->pos.y < (gGroundHeight + 70.0f)) { var_fv1 = 0.8f; } if (!((gInputHold->button & R_TRIG) && (gInputHold->button & Z_TRIG)) && @@ -3456,8 +3468,8 @@ void func_play_800AECAC(Player* player) { sp58 = 60.0f; if (gVersusMode) { - D_ctx_80177B00[player->num][0] = D_ctx_80177B00[player->num][1] = D_ctx_80177B00[player->num][2] = - D_ctx_80177B00[player->num][3] = 0; + gVsLockOnTimers[player->num][0] = gVsLockOnTimers[player->num][1] = gVsLockOnTimers[player->num][2] = + gVsLockOnTimers[player->num][3] = 0; } if (player->unk_4D8 > 240.0f) { sp58 = -50.0f; @@ -3469,14 +3481,14 @@ void func_play_800AECAC(Player* player) { if (player->unk_4D8 < 180.0f) { player->pos.y += 2.0f; } - player->unk_2B4 = true; + player->boostCooldown = true; if (gLevelMode == LEVELMODE_ON_RAILS) { - player->unk_2BC += 2.0f; + player->boostMeter += 2.0f; } else { - player->unk_2BC += 1.0f; + player->boostMeter += 1.0f; } - if (player->unk_2BC > 90.0f) { - player->unk_2BC = 90.0f; + if (player->boostMeter > 90.0f) { + player->boostMeter = 90.0f; } player->unk_190 = 2; Math_SmoothStepToF(&player->unk_4D8, 360.0f, 0.1f, 5.0f, 0.001f); @@ -3603,7 +3615,7 @@ void func_play_800AF07C(Player* player) { sp84 = 0.1f; var_fa1 = -stickY * D_ctx_80177970; - if ((var_fa1 <= 0.0f) && (player->pos.y < (gGroundLevel + 50.0f))) { + if ((var_fa1 <= 0.0f) && (player->pos.y < (gGroundHeight + 50.0f))) { var_fa1 = 0.0f; sp84 = 0.2f; D_ctx_80177968 *= 2.0f; @@ -3612,7 +3624,7 @@ void func_play_800AF07C(Player* player) { Math_SmoothStepToF(&player->unk_0E4, var_fa1, sp84, D_ctx_80177968, 0.03f); var_fv1 = 1.0f; - if (player->pos.y < (gGroundLevel + 70.0f)) { + if (player->pos.y < (gGroundHeight + 70.0f)) { var_fv1 = 0.8f; } @@ -3817,8 +3829,8 @@ void func_play_800AF928(Player* player) { Math_SmoothStepToF(&player->unk_000, 0.0f, 0.1f, 5.0f, 0.00001f); } player->unk_1D4 = 0; - if (player->pos.y <= gGroundLevel - 5.0f) { - player->pos.y = gGroundLevel - 5.0f; + if (player->pos.y <= gGroundHeight - 5.0f) { + player->pos.y = gGroundHeight - 5.0f; if (player->vel.y < -20.0f) { player->unk_1F4 = 20; } @@ -4034,7 +4046,7 @@ void func_play_800B0194(Player* player) { player->unk_1D4 = 0; player->vel.y -= player->unk_0D4; player->pos.y += player->vel.y; - if (player->pos.y <= gGroundLevel) { + if (player->pos.y <= gGroundHeight) { player->unk_1D4 = 1; player->pos.y = 0.0f; player->vel.y = 0.0f; @@ -4067,7 +4079,7 @@ void func_play_800B0F50(Player* playerx) { s16 sp2E; Player* player = playerx; // fake? - D_ctx_80177BAC = 0; + gTiStartLandmaster = 0; player->shields = 255; if (gVersusMode) { switch (gHandicap[gPlayerNum]) { @@ -4089,12 +4101,12 @@ void func_play_800B0F50(Player* playerx) { gRightWingHealth[gPlayerNum] = 60; } D_Timer_80177A00[gPlayerNum] = D_Timer_80177A38[gPlayerNum] = D_Timer_80177A70[gPlayerNum] = - D_Timer_80177A88[gPlayerNum] = D_ctx_80177AE8[gPlayerNum] = D_ctx_80177AD0[gPlayerNum] = - gChargeTimers[gPlayerNum] = D_ctx_80177B00[gPlayerNum][0] = D_ctx_80177B00[gPlayerNum][1] = - D_ctx_80177B00[gPlayerNum][2] = D_ctx_80177B00[gPlayerNum][3] = 0; + D_Timer_80177A88[gPlayerNum] = gShieldTimer[gPlayerNum] = gHasShield[gPlayerNum] = gChargeTimers[gPlayerNum] = + gVsLockOnTimers[gPlayerNum][0] = gVsLockOnTimers[gPlayerNum][1] = gVsLockOnTimers[gPlayerNum][2] = + gVsLockOnTimers[gPlayerNum][3] = 0; D_ctx_80177D40[gPlayerNum] = D_ctx_80177D58[gPlayerNum] = D_ctx_80177D70[gPlayerNum] = D_ctx_80177D88[gPlayerNum] = D_ctx_80177990[gPlayerNum] = D_ctx_801779A8[gPlayerNum] = D_ctx_80177AA0[gPlayerNum] = 0.0f; - D_ctx_80177AB8[gPlayerNum] = 0.0f; + gShieldAlpha[gPlayerNum] = 0.0f; player->unk_190 = 1.0f; player->unk_194 = 1.0f; gRadioState = D_ctx_80177D68 = D_ctx_801782A4 = 0; @@ -4119,7 +4131,7 @@ void func_play_800B0F50(Player* playerx) { } else { player->unk_09C = 700.0f; player->unk_0A0 = 680.0f; - player->unk_0A4 = gGroundLevel + 40.0f; + player->unk_0A4 = gGroundHeight + 40.0f; player->unk_0A8 = 3000.0f; } player->unk_0D0 = D_play_80161A54; @@ -4148,7 +4160,7 @@ void func_play_800B0F50(Player* playerx) { player->unk_09C = 700.0f; player->unk_0D0 = 20.0f; player->unk_0A0 = 720.0f; - player->unk_0A4 = gGroundLevel + 30.0f; + player->unk_0A4 = gGroundHeight + 30.0f; break; case LEVEL_SOLAR: case LEVEL_ZONESS: @@ -4169,7 +4181,7 @@ void func_play_800B0F50(Player* playerx) { gGoldRingCount[0] = 0; } gHitCount = gSavedHitCount; - if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) || ((gCurrentLevel == LEVEL_VENOM_2) && (gLevelStage == 2))) { + if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) || ((gCurrentLevel == LEVEL_VENOM_2) && (gLevelPhase == 2))) { if (D_ctx_80177C9C != 0) { player->shields = D_ctx_80177C9C - 1; gGoldRingCount[0] = D_ctx_80177C94; @@ -4216,7 +4228,7 @@ void func_play_800B0F50(Player* playerx) { player->pos.x = D_800D3114[gPlayerNum]; player->pos.z = D_800D3124[gPlayerNum]; player->unk_114 = D_800D3154[gPlayerNum]; - player->form = D_ctx_80177870[gPlayerNum]; + player->form = gPlayerForms[gPlayerNum]; switch (player->form) { case FORM_ARWING: break; @@ -4257,7 +4269,7 @@ void func_play_800B0F50(Player* playerx) { player->pos.y = 670.0f; player->unk_0A0 = 730.0f; player->unk_204 = 2; - if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gLevelStage == 1)) { + if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gLevelPhase == 1)) { player->pos.x = -7910.0f; player->pos.y = 300.0f; @@ -4309,8 +4321,8 @@ void func_play_800B0F50(Player* playerx) { break; } } else { - if (!gVersusMode && !((gCurrentLevel == LEVEL_VENOM_2) && (gLevelStage == 2))) { - gLevelStatusScreenTimer = 80; + if (!gVersusMode && !((gCurrentLevel == LEVEL_VENOM_2) && (gLevelPhase == 2))) { + gLevelStartStatusScreenTimer = 80; } if (gCurrentLevel == LEVEL_BOLSE) { @@ -4405,7 +4417,7 @@ void func_play_800B0F50(Player* playerx) { func_display_80057814(player); if (!gVersusMode && (((gCurrentLevel != LEVEL_TITANIA) && (gCurrentLevel != LEVEL_SOLAR)) || gVersusMode || (player->state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO))) { - func_8001C8B8(gPlayerNum); + Audio_StartPlayerNoise(gPlayerNum); } if ((player->form == FORM_ARWING) && !gVersusMode) { switch (player->unk_204) { @@ -4568,8 +4580,8 @@ void func_play_800B22C0(Player* player) { } } if (gVersusMode) { - D_ctx_80177B00[player->num][0] = D_ctx_80177B00[player->num][1] = D_ctx_80177B00[player->num][2] = - D_ctx_80177B00[player->num][3] = 0; + gVsLockOnTimers[player->num][0] = gVsLockOnTimers[player->num][1] = gVsLockOnTimers[player->num][2] = + gVsLockOnTimers[player->num][3] = 0; } } } @@ -4579,9 +4591,9 @@ void func_play_800B2574(Player* player) { f32 sp28; s32 var; - if ((player->unk_2BC != 0.0f) && (gInputHold->button & gBrakeButton[player->num]) && + if ((player->boostMeter != 0.0f) && (gInputHold->button & gBrakeButton[player->num]) && (gInputHold->button & gBoostButton[player->num])) { - player->unk_2B4 = true; + player->boostCooldown = true; } if (gLevelMode == LEVELMODE_ON_RAILS) { sp28 = 3.0f; @@ -4620,7 +4632,7 @@ void func_play_800B2574(Player* player) { } if (player->timer_27C != 0) { player->timer_27C--; - player->unk_2B4 = true; + player->boostCooldown = true; if (gRingPassCount > 0) { Math_SmoothStepToF(&D_ctx_801779A8[player->num], gRingPassCount * 10.0f, 1.0f, 5.0f, 0.0f); } @@ -4644,14 +4656,14 @@ void func_play_800B2574(Player* player) { } } if (!(gInputHold->button & gBrakeButton[player->num]) && !(gInputHold->button & gBoostButton[player->num])) { - player->unk_2B4 = true; - if (player->unk_2BC == 0.0f) { - player->unk_2B4 = false; + player->boostCooldown = true; + if (player->boostMeter == 0.0f) { + player->boostCooldown = false; } } if ((gInputHold->button & gBoostButton[player->num]) && !(gInputHold->button & gBrakeButton[player->num]) && - (player->state_1C8 != PLAYERSTATE_1C8_U_TURN) && !player->unk_2B4) { - if (player->unk_2BC == 0.0f) { + (player->state_1C8 != PLAYERSTATE_1C8_U_TURN) && !player->boostCooldown) { + if (player->boostMeter == 0.0f) { func_play_800A5FA0(player->sfxSource, 0x09000002, player->num); player->unk_194 = 5.0f; player->unk_190 = 5.0f; @@ -4666,10 +4678,10 @@ void func_play_800B2574(Player* player) { Math_SmoothStepToF(&player->wings.unk_0C, 0.0f, 0.5f, 100.0f, 0.0f); Math_SmoothStepToF(&player->wings.unk_10, 0.0f, 0.5f, 100.0f, 0.0f); } - player->unk_2BC += sp28; - if (player->unk_2BC > 90.0f) { - player->unk_2BC = 90.0f; - player->unk_2B4 = true; + player->boostMeter += sp28; + if (player->boostMeter > 90.0f) { + player->boostMeter = 90.0f; + player->boostCooldown = true; } player->unk_25C += 0.04f; if (player->unk_25C > 0.6f) { @@ -4684,11 +4696,11 @@ void func_play_800B2574(Player* player) { player->sfx.boost = 1; Math_SmoothStepToF(&D_ctx_801779A8[player->num], 50.0f, 1.0f, 10.0f, 0.0f); } else { - if (player->unk_2BC > 0.0f) { - player->unk_2BC -= sp2C; - if (player->unk_2BC <= 0.0f) { - player->unk_2BC = 0.0f; - player->unk_2B4 = false; + if (player->boostMeter > 0.0f) { + player->boostMeter -= sp2C; + if (player->boostMeter <= 0.0f) { + player->boostMeter = 0.0f; + player->boostCooldown = false; } } if (player->unk_110 > 0.0f) { @@ -4740,12 +4752,12 @@ void func_play_800B2C00(Player* player) { player->unk_194 = 5.0f; player->unk_190 = 5.0f; if (gCurrentLevel == LEVEL_CORNERIA) { - D_ctx_80177B6C++; + gCoUturnCount++; } } if ((gInputHold->button & gBrakeButton[player->num]) && !(gInputHold->button & gBoostButton[player->num]) && - (player->state_1C8 != PLAYERSTATE_1C8_U_TURN) && !player->unk_2B4) { - if (player->unk_2BC == 0.0f) { + (player->state_1C8 != PLAYERSTATE_1C8_U_TURN) && !player->boostCooldown) { + if (player->boostMeter == 0.0f) { func_play_800A5FA0(player->sfxSource, 0x09000003, player->num); if ((gLevelMode == LEVELMODE_ALL_RANGE) && (gInputPress->button & gBrakeButton[player->num])) { D_Timer_80177A38[gPlayerNum] = 5; @@ -4757,10 +4769,10 @@ void func_play_800B2C00(Player* player) { Math_SmoothStepToF(&player->wings.unk_0C, 90.0f, 0.2f, 100.0f, 0.0f); Math_SmoothStepToF(&player->wings.unk_10, -90.0f, 0.2f, 100.0f, 0.0f); } - player->unk_2BC += sp30; - if (player->unk_2BC > 90.0f) { - player->unk_2B4 = true; - player->unk_2BC = 90.0f; + player->boostMeter += sp30; + if (player->boostMeter > 90.0f) { + player->boostCooldown = true; + player->boostMeter = 90.0f; } player->unk_190 = 0.3f; player->unk_110 -= 1.0f; @@ -4770,11 +4782,11 @@ void func_play_800B2C00(Player* player) { Math_SmoothStepToF(&player->unk_08C, 180.0f, 0.1f, 10.0f, 0.0f); player->sfx.brake = 1; Math_SmoothStepToF(&D_ctx_801779A8[player->num], 25.0f, 1.0f, 5.0f, 0.0f); - } else if (player->unk_2BC > 0.0f) { - player->unk_2BC -= sp34; - if (player->unk_2BC <= 0.0f) { - player->unk_2BC = 0.0f; - player->unk_2B4 = false; + } else if (player->boostMeter > 0.0f) { + player->boostMeter -= sp34; + if (player->boostMeter <= 0.0f) { + player->boostMeter = 0.0f; + player->boostCooldown = false; } if (player->unk_110 < 0.0f) { player->unk_110 += 0.5f; @@ -4789,19 +4801,19 @@ void func_play_800B2C00(Player* player) { void func_play_800B3010(Player* player) { f32 sp2C; - if (!player->unk_2B8) { - Math_SmoothStepToF(&player->unk_2BC, 0.0f, 1.0f, 1.0f, 0.0f); + if (!player->boostActive) { + Math_SmoothStepToF(&player->boostMeter, 0.0f, 1.0f, 1.0f, 0.0f); } - player->unk_2B8 = false; - if (player->unk_2BC == 0.0f) { - player->unk_2B4 = false; + player->boostActive = false; + if (player->boostMeter == 0.0f) { + player->boostCooldown = false; } else if (!(gInputHold->button & Z_TRIG) && !(gInputHold->button & R_TRIG) && !(gInputHold->button & gBoostButton[player->num]) && !(gInputHold->button & gBrakeButton[player->num])) { - player->unk_2B4 = true; + player->boostCooldown = true; } sp2C = 20.0f; - if ((gInputHold->button & gBoostButton[player->num]) && !player->unk_2B4) { - if (player->unk_2BC == 0.0f) { + if ((gInputHold->button & gBoostButton[player->num]) && !player->boostCooldown) { + if (player->boostMeter == 0.0f) { player->unk_194 = 4.0f; player->unk_190 = 4.0f; func_play_800A5FA0(player->sfxSource, 0x09000002, player->num); @@ -4809,22 +4821,22 @@ void func_play_800B3010(Player* player) { Math_SmoothStepToF(&D_ctx_801779A8[player->num], 30.0f, 1.0f, 10.0f, 0.0f); player->unk_190 = 2.0f; sp2C = 35.0f; - player->unk_2B8 = true; - Math_SmoothStepToF(&player->unk_2BC, 90.0f, 1.0f, 1.0f, 0.0f); - if (player->unk_2BC >= 90.0f) { - player->unk_2B4 = true; + player->boostActive = true; + Math_SmoothStepToF(&player->boostMeter, 90.0f, 1.0f, 1.0f, 0.0f); + if (player->boostMeter >= 90.0f) { + player->boostCooldown = true; } } - if ((gInputHold->button & gBrakeButton[player->num]) && !player->unk_2B4) { - if (player->unk_2BC == 0.0f) { + if ((gInputHold->button & gBrakeButton[player->num]) && !player->boostCooldown) { + if (player->boostMeter == 0.0f) { func_play_800A5FA0(player->sfxSource, 0x09000003, player->num); } Math_SmoothStepToF(&D_ctx_801779A8[player->num], 20.0f, 1.0f, 10.0f, 0.0f); sp2C = 5.0f; - player->unk_2B8 = true; - Math_SmoothStepToF(&player->unk_2BC, 90.0f, 1.0f, 1.0f, 0.0f); - if (player->unk_2BC >= 90.0f) { - player->unk_2B4 = true; + player->boostActive = true; + Math_SmoothStepToF(&player->boostMeter, 90.0f, 1.0f, 1.0f, 0.0f); + if (player->boostMeter >= 90.0f) { + player->boostCooldown = true; } } Math_SmoothStepToF(&player->unk_0D0, sp2C, 0.1f, 2.0f, 0.001f); @@ -4835,8 +4847,8 @@ void func_play_800B3314(Player* player) { f32 temp2; player->unk_0D4 = 3.0f; - if ((gInputHold->button & Z_TRIG) && !player->unk_2B4) { - if (player->unk_2BC == 0.0f) { + if ((gInputHold->button & Z_TRIG) && !player->boostCooldown) { + if (player->boostMeter == 0.0f) { func_play_800A5FA0(player->sfxSource, 0x09000002, player->num); } player->unk_188 = 0.0f; @@ -4845,10 +4857,10 @@ void func_play_800B3314(Player* player) { player->unk_12C = 50.0f; } Math_SmoothStepToF(&player->unk_170, 1.0f, 1.0f, 0.4f, 0.0f); - player->unk_2B8 = true; - Math_SmoothStepToF(&player->unk_2BC, 90.0f, 1.0f, 0.7f, 0.0f); - if (player->unk_2BC >= 90.0f) { - player->unk_2B4 = true; + player->boostActive = true; + Math_SmoothStepToF(&player->boostMeter, 90.0f, 1.0f, 0.7f, 0.0f); + if (player->boostMeter >= 90.0f) { + player->boostCooldown = true; } } else { if (player->unk_12C > 0.0f) { @@ -4863,8 +4875,8 @@ void func_play_800B3314(Player* player) { } } } - if ((gInputHold->button & R_TRIG) && !player->unk_2B4) { - if (player->unk_2BC == 0.0f) { + if ((gInputHold->button & R_TRIG) && !player->boostCooldown) { + if (player->boostMeter == 0.0f) { func_play_800A5FA0(player->sfxSource, 0x09000002, player->num); } player->unk_188 = 0.0f; @@ -4873,10 +4885,10 @@ void func_play_800B3314(Player* player) { player->unk_12C = -50.0f; } Math_SmoothStepToF(&player->unk_16C, 1.0f, 1.0f, 0.4f, 0.0f); - player->unk_2B8 = true; - Math_SmoothStepToF(&player->unk_2BC, 90.0f, 1.0f, 0.7f, 0.0f); - if (player->unk_2BC >= 90.0f) { - player->unk_2B4 = true; + player->boostActive = true; + Math_SmoothStepToF(&player->boostMeter, 90.0f, 1.0f, 0.7f, 0.0f); + if (player->boostMeter >= 90.0f) { + player->boostCooldown = true; } } else if (player->unk_12C < 0.0f) { player->unk_188 += 1.5f; @@ -4942,8 +4954,8 @@ void func_play_800B39E0(Player* player) { } if (gVersusMode) { for (i = 0; i < gCamCount; i++) { - if ((D_ctx_80177B00[player->num][i] != 0) && !(gControllerHold[i].button & A_BUTTON)) { - D_ctx_80177B00[player->num][i]--; + if ((gVsLockOnTimers[player->num][i] != 0) && !(gControllerHold[i].button & A_BUTTON)) { + gVsLockOnTimers[player->num][i]--; } } } @@ -4965,11 +4977,11 @@ void func_play_800B39E0(Player* player) { if (D_ctx_80177D70[player->num] != 0) { D_ctx_80177D70[player->num]--; } - if (D_ctx_80177AE8[player->num] != 0) { - D_ctx_80177AE8[player->num]--; - Math_SmoothStepToF(&D_ctx_80177AB8[player->num], 128.0f, 1.0f, 40.0f, 0.01f); + if (gShieldTimer[player->num] != 0) { + gShieldTimer[player->num]--; + Math_SmoothStepToF(&gShieldAlpha[player->num], 128.0f, 1.0f, 40.0f, 0.01f); } else { - Math_SmoothStepToF(&D_ctx_80177AB8[player->num], 0.0f, 1.0f, 10.0f, 0.01f); + Math_SmoothStepToF(&gShieldAlpha[player->num], 0.0f, 1.0f, 10.0f, 0.01f); } Math_SmoothStepToF(&D_ctx_80177AA0[player->num], 0.0f, 1.0f, 0.4f, 0.01f); if ((player->form == FORM_LANDMASTER) && (player->unk_1A0 != 0)) { @@ -5013,7 +5025,7 @@ void func_play_800B39E0(Player* player) { if ((gLevelMode != LEVELMODE_UNK_2) && ((player->unk_0D8.x != 0.f) || (player->unk_0D8.y != 0.f) || (player->unk_0D8.z != 0.f)) && ((player->unk_1A4 >= 40) || (player->unk_1A4 == 21))) { - player->unk_2B4 = true; + player->boostCooldown = true; player->unk_0E4 = 0; player->unk_0E8 = 0; Math_SmoothStepToF(&player->unk_110, 0, 1.0f, 5.0f, 0); @@ -5036,7 +5048,7 @@ void func_play_800B39E0(Player* player) { } } -void func_play_800B40AC(Player* player) { +void Player_UpdateShields(Player* player) { if (player->damage > 0) { player->damage -= 2; if (player->damage <= 0) { @@ -5066,7 +5078,7 @@ void func_play_800B40AC(Player* player) { void func_play_800B415C(Player* player) { s32 var_v0; - func_play_800B40AC(player); + Player_UpdateShields(player); if (player->shields < 128) { if (player->shields > 80) { @@ -5113,7 +5125,7 @@ void func_play_800B42B0(Player* player) { gInputPress->stick_y = 0; gInputPress->button = 0; gInputHold->button = gBoostButton[player->num]; - player->unk_2BC = 1.0f; + player->boostMeter = 1.0f; } func_play_800ADA28(player); func_play_800B2574(player); @@ -5237,7 +5249,7 @@ void func_play_800B46F8(Player* player) { if ((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (D_ctx_8017796C >= 0)) { D_ctx_8017796C++; - if (D_ctx_8017796C > 960) { + if (D_ctx_8017796C > 32 * 30) { D_ctx_8017796C = 0; if (1) {} if ((player->shields < 64) && ((gTeamShields[TEAM_ID_FALCO] > 0) || (gTeamShields[TEAM_ID_PEPPY] > 0) || @@ -5306,11 +5318,11 @@ void Player_Update(Player* player) { *gControllerRumble = 1; } } - if (player->state_1C8 >= PLAYERSTATE_1C8_LEVEL_INTRO) { + if (player->state_1C8 > PLAYERSTATE_1C8_INIT) { func_play_800B39E0(player); } player->flags_228 = 0; - if ((player->state_1C8 >= PLAYERSTATE_1C8_LEVEL_INTRO) && (player->form == FORM_ARWING) && !gVersusMode) { + if ((player->state_1C8 > PLAYERSTATE_1C8_INIT) && (player->form == FORM_ARWING) && !gVersusMode) { switch (player->unk_204) { case 0: sp1C4 = Animation_GetFrameData(&D_arwing_3015AF4, 0, sp58); @@ -5411,15 +5423,15 @@ void Player_Update(Player* player) { break; case PLAYERSTATE_1C8_U_TURN: if (gVersusMode) { - D_ctx_80177B00[player->num][0] = D_ctx_80177B00[player->num][1] = D_ctx_80177B00[player->num][2] = - D_ctx_80177B00[player->num][3] = 0; + gVsLockOnTimers[player->num][0] = gVsLockOnTimers[player->num][1] = gVsLockOnTimers[player->num][2] = + gVsLockOnTimers[player->num][3] = 0; } player->wings.modelId = 1; Math_SmoothStepToF(&player->wings.unk_04, 0.0f, 0.1f, 5.0f, 0); Math_SmoothStepToF(&player->wings.unk_08, 0.0f, 0.1f, 5.0f, 0); Math_SmoothStepToF(&player->wings.unk_0C, 0.0f, 0.1f, 5.0f, 0); Math_SmoothStepToF(&player->wings.unk_10, 0.0f, 0.1f, 5.0f, 0); - func_play_800B40AC(player); + Player_UpdateShields(player); Cutscene_UTurn(player); if (gCurrentLevel == LEVEL_KATINA) { func_play_800A8BA4(player); @@ -5431,20 +5443,20 @@ void Player_Update(Player* player) { case PLAYERSTATE_1C8_LEVEL_COMPLETE: player->cockpitView = false; gPauseEnabled = false; - func_play_800B40AC(player); + Player_UpdateShields(player); Cutscene_LevelComplete(player); func_play_800A4C40(player); gShowHud = gChargeTimers[player->num] = 0; break; case PLAYERSTATE_1C8_ENTER_WARP_ZONE: gPauseEnabled = 0; - func_play_800B40AC(player); + Player_UpdateShields(player); Cutscene_EnterWarpZone(player); gShowHud = 0; break; case PLAYERSTATE_1C8_START_360: gPauseEnabled = 0; - func_play_800B40AC(player); + Player_UpdateShields(player); Cutscene_AllRangeMode(player); func_play_800B2130(player); gChargeTimers[player->num] = player->cockpitView = gShowHud = 0; @@ -5456,7 +5468,7 @@ void Player_Update(Player* player) { break; case PLAYERSTATE_1C8_ANDROSS_MOUTH: Andross_8018C390(player); - func_play_800B40AC(player); + Player_UpdateShields(player); break; case PLAYERSTATE_1C8_12: break; @@ -5487,7 +5499,7 @@ void Player_Update(Player* player) { player->unk_234 = 0; player->vel.z = player->vel.x = player->vel.y = player->unk_0D8.x = player->unk_0D8.y = 0.0f; - if ((gLevelMode == LEVELMODE_ALL_RANGE) && (D_ctx_8017837C == 7)) { + if ((gLevelMode == LEVELMODE_ALL_RANGE) && (gFadeoutType == 7)) { player->cam.eye.x += 1.0f; player->cam.eye.z += 1.5f; } @@ -5506,7 +5518,7 @@ void Player_Update(Player* player) { if (gFillScreenAlpha == 255) { Play_ClearObjectData(); D_ctx_80177D20 = gPlayer[0].unk_144 = 0.0f; - gPlayerFillScreenAlphas[0] = 0; + gPlayerGlareAlphas[0] = 0; gShowAllRangeCountdown = gRadioState = 0; Audio_ClearVoice(); Audio_SetBaseSfxReverb(0); @@ -5514,7 +5526,7 @@ void Player_Update(Player* player) { if (gCurrentLevel == LEVEL_VENOM_ANDROSS) { D_ctx_80177C94 = gGoldRingCount[0]; } - switch (D_ctx_8017837C) { + switch (gFadeoutType) { case 7: if (gCurrentLevel == LEVEL_TRAINING) { gGameState = GSTATE_MENU; @@ -5522,10 +5534,10 @@ void Player_Update(Player* player) { gOptionMenuStatus = OPTION_WAIT; gDrawMode = DRAW_NONE; D_game_80161A34 = 7; - D_ctx_80178410 = 0; + gStarCount = 0; } else { if ((gCurrentLevel == LEVEL_SECTOR_X) || (gCurrentLevel == LEVEL_METEO)) { - gLevelStage = 0; + gLevelPhase = 0; } if (gLifeCount[gPlayerNum] < 0) { gNextGameState = GSTATE_GAME_OVER; @@ -5570,7 +5582,7 @@ void Player_Update(Player* player) { Math_SmoothStepToF(&player->unk_09C, sp1C8, 1.0f, 10.0f, 0.0f); if (player->form == FORM_ARWING) { Math_SmoothStepToF(&player->unk_194, player->unk_190, 0.5f, 5.0f, 0.0f); - if (player->unk_2B4 && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { + if (player->boostCooldown && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { player->unk_190 = 0.5f; } else { player->unk_190 = 1.0f; @@ -5602,7 +5614,7 @@ void func_play_800B56BC(Player* player) { Math_SmoothStepToF(&player->unk_030, var_fv1 * 1.6f, 0.1f, 3.0f, 0.05f); if (gLevelType == LEVELTYPE_SPACE) { Math_SmoothStepToF(&player->unk_02C, var_fv0 * 0.8f, 0.1f, 3.0f, 0.05f); - } else if (player->pos.y < (gGroundLevel + 50.0f)) { + } else if (player->pos.y < (gGroundHeight + 50.0f)) { Math_SmoothStepToF(&player->unk_02C, var_fv0 * 0.3f, 0.1f, 3.0f, 0.05f); } else { Math_SmoothStepToF(&player->unk_02C, 2.0f * var_fv0, 0.1f, 4.0f, 0.05f); @@ -5957,15 +5969,15 @@ void func_play_800B6F50(f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt) } 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, SCREEN_WIDTH * 1.5f); - D_ctx_80178424 = Math_ModF(sp30, SCREEN_HEIGHT * 1.5f); + sp20 = gStarfieldX; + gStarfieldX = Math_ModF(sp34, SCREEN_WIDTH * 1.5f); + gStarfieldY = 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) { + if (fabsf(gStarfieldX - sp20) < 50.0f) { D_bg_8015F96C = 0.0f; - if (fabsf(D_ctx_80178420 - sp20) > 3.0f) { - D_bg_8015F96C = fabsf(D_ctx_80178420 - sp20 - 3.0f) * 0.5f; + if (fabsf(gStarfieldX - sp20) > 3.0f) { + D_bg_8015F96C = fabsf(gStarfieldX - sp20 - 3.0f) * 0.5f; } } } @@ -6150,7 +6162,7 @@ void Play_UpdateLevel(void) { } break; case LEVEL_VENOM_2: - if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) && (gLevelStage == 2)) { + if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) && (gLevelPhase == 2)) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].unk_1D0 = 0; gPlayer[0].unk_234 = 1; @@ -6165,12 +6177,12 @@ void Play_UpdateLevel(void) { break; case LEVEL_VENOM_ANDROSS: Andross_8018BDD8(); - gGroundLevel = -25000.0f; + gGroundHeight = -25000.0f; gPlayer[0].unk_0A0 = 612.0f; gPlayer[0].unk_0A4 = -544.0f; - if (D_Timer_80177B44 != 0) { - D_Timer_80177B44--; - if (D_Timer_80177B44 == 0) { + if (gStartAndrossFightTimer != 0) { + gStartAndrossFightTimer--; + if (gStartAndrossFightTimer == 0) { Andross_80189214(); } } @@ -6179,19 +6191,19 @@ void Play_UpdateLevel(void) { Texture_Scroll(D_102FF08, 8, 8, 1); /* fallthrough */ case LEVEL_SECTOR_X: - if (gLevelStage == 1) { + if (gLevelPhase == 1) { gBlurAlpha = 128; if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) { - Math_SmoothStepToF(&D_bg_8015F960, 0.0f, 1.0f, 1.0f, 0.0f); + Math_SmoothStepToF(&gWarpZoneBgAlpha, 0.0f, 1.0f, 1.0f, 0.0f); } else { - Math_SmoothStepToF(&D_bg_8015F960, 128.0f, 1.0f, 1.0f, 0.0f); + Math_SmoothStepToF(&gWarpZoneBgAlpha, 128.0f, 1.0f, 1.0f, 0.0f); } } - if ((gCurrentLevel == LEVEL_SECTOR_X) && (gLevelStage == 0) && (gRingPassCount == 4)) { + if ((gCurrentLevel == LEVEL_SECTOR_X) && (gLevelPhase == 0) && (gRingPassCount == 4)) { gRingPassCount++; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ENTER_WARP_ZONE; gPlayer[0].unk_1D0 = 0; - gOverlayStage = 1; + gSceneSetup = 1; AUDIO_PLAY_SFX(0x1900602A, gDefaultSfxSource, 0); gNextPlanetPath = 2; D_play_800D3180[gCurrentLevel] = 1; @@ -6264,7 +6276,7 @@ void Play_UpdateLevel(void) { } func_hud_8008C104(D_SO_60229A4, D_SO_6010198); if (gPlayer[0].shields == 0) { - D_ctx_80177B4C = 1; + gSoShieldsEmpty = 1; } break; case LEVEL_ZONESS: @@ -6350,9 +6362,9 @@ void Play_SpawnVsItem(ObjectId objId, Item* item) { if (item->obj.status == OBJ_FREE) { Item_Initialize(item); item->obj.status = OBJ_INIT; - item->obj.pos.x = gObjects58[spawnIndex].obj.pos.x; - item->obj.pos.y = gObjects58[spawnIndex].obj.pos.y; - item->obj.pos.z = gObjects58[spawnIndex].obj.pos.z; + item->obj.pos.x = gScenery360[spawnIndex].obj.pos.x; + item->obj.pos.y = gScenery360[spawnIndex].obj.pos.y; + item->obj.pos.z = gScenery360[spawnIndex].obj.pos.z; item->obj.id = objId; Object_SetInfo(&item->info, item->obj.id); } @@ -6386,10 +6398,10 @@ void Play_Main(void) { gChangeTo360 = false; gLevelMode = LEVELMODE_ALL_RANGE; if (gCurrentLevel != LEVEL_VENOM_ANDROSS) { - MEM_ARRAY_ALLOCATE(gObjects58, 200); + MEM_ARRAY_ALLOCATE(gScenery360, 200); } for (i = 0; i < 200; i++) { - gObjects58[i].obj.status = OBJ_FREE; + gScenery360[i].obj.status = OBJ_FREE; } Play_ClearObjectData(); if (gCurrentLevel == LEVEL_CORNERIA) { @@ -6425,7 +6437,7 @@ void Play_Main(void) { gPlayState = PLAY_UPDATE; break; case PLAY_UPDATE: - if ((gLevelStatusScreenTimer != 0) || (gLevelClearScreenTimer != 0)) { + if ((gLevelStartStatusScreenTimer != 0) || (gLevelClearScreenTimer != 0)) { gPauseEnabled = false; } else { gPauseEnabled = true; @@ -6446,7 +6458,7 @@ void Play_Main(void) { gDrawMode = gVersusMode = 0; gCamCount = 1; gBgColor = 0; - gCsFrameCount = gLevelClearScreenTimer = gLevelStatusScreenTimer = gRadioState = 0; + gCsFrameCount = gLevelClearScreenTimer = gLevelStartStatusScreenTimer = gRadioState = 0; D_ctx_8017782C = 0; } if (gVersusMode) { diff --git a/src/engine/fox_std_lib.c b/src/engine/fox_std_lib.c index e3f89e81..df7a695f 100644 --- a/src/engine/fox_std_lib.c +++ b/src/engine/fox_std_lib.c @@ -176,7 +176,7 @@ void Animation_DrawLimb(s32 mode, Limb* limb, Limb** skeleton, Vec3f* jointTable if (mode >= 2) { Matrix_MultVec3f(gCalcMatrix, &origin, &pos); if (mode != 5) { - func_edisplay_8005F670(&pos); + Display_SetSecondLight(&pos); } } Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); diff --git a/src/engine/fox_tank.c b/src/engine/fox_tank.c index b5fb01ad..f69c4790 100644 --- a/src/engine/fox_tank.c +++ b/src/engine/fox_tank.c @@ -281,14 +281,14 @@ void func_tank_800441C8(Player* player, f32* hitboxData, f32 xPos, f32 yPos, f32 } void func_tank_800443DC(Player* player) { - Object_80* obj80; + Scenery* scenery; s32 i; - for (i = 0, obj80 = gObjects80; i < ARRAY_COUNT(gObjects80); i++, obj80++) { - if ((obj80->obj.status == OBJ_ACTIVE) && (obj80->obj.id == OBJ_80_58) && - ((player->unk_138 - 2000.0f) < obj80->obj.pos.z)) { - func_tank_800441C8(player, obj80->info.hitbox, obj80->obj.pos.x, obj80->obj.pos.y, obj80->obj.pos.z, - obj80->obj.rot.x, obj80->obj.rot.y, obj80->obj.rot.z); + for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) { + if ((scenery->obj.status == OBJ_ACTIVE) && (scenery->obj.id == OBJ_SCENERY_58) && + ((player->unk_138 - 2000.0f) < scenery->obj.pos.z)) { + func_tank_800441C8(player, scenery->info.hitbox, scenery->obj.pos.x, scenery->obj.pos.y, scenery->obj.pos.z, + scenery->obj.rot.x, scenery->obj.rot.y, scenery->obj.rot.z); } } } @@ -307,12 +307,12 @@ void func_tank_800444BC(Player* player) { sp30 = 0.0f; } sp40 = sp3C = 0.0f; - sp38 = gGroundLevel; + sp38 = gGroundHeight; if (D_ctx_801784AC == 4) { Ground_801B6E20(player->pos.x, player->unk_138 + player->unk_144, &sp40, &sp38, &sp3C); } if (gCurrentLevel == LEVEL_MACBETH) { - D_MA_801BE250[27] = gGroundLevel; + D_MA_801BE250[27] = gGroundHeight; D_MA_801BE250[28] = D_MA_801BE250[29] = 0.0f; D_800C9F10 = 0.0f; func_tank_80047754(player); @@ -328,10 +328,10 @@ void func_tank_800444BC(Player* player) { if (player->vel.y < -20.0f) { player->unk_1F4 = 20; } - if (D_ctx_80177BAC != 0) { - D_ctx_80177BAC = 0; + if (gTiStartLandmaster != 0) { + gTiStartLandmaster = 0; AUDIO_PLAY_BGM(SEQ_ID_TITANIA | SEQ_FLAG); - func_8001C8B8(0); + Audio_StartPlayerNoise(0); } player->pos.y = sp38 - 3.0f; @@ -508,7 +508,7 @@ void func_tank_80045130(Player* player) { Math_SmoothStepToF(&player->unk_16C, 0.0f, 1.0f, 0.2f, 0.0f); if (gInputPress->button & Z_TRIG) { player->sfx.bank = 1; - if ((player->timer_1E0 != 0) && (player->unk_12C > 0.0f) && (player->unk_2BC < 10.0f)) { + if ((player->timer_1E0 != 0) && (player->unk_12C > 0.0f) && (player->boostMeter < 10.0f)) { player->unk_1DC = 1; player->timer_1E8 = 15; player->unk_1F0 = 20; @@ -521,7 +521,7 @@ void func_tank_80045130(Player* player) { } if (gInputPress->button & R_TRIG) { player->sfx.bank = 1; - if ((player->timer_1E4 != 0) && (player->unk_12C < 0.0f) && (player->unk_2BC < 10.0f)) { + if ((player->timer_1E4 != 0) && (player->unk_12C < 0.0f) && (player->boostMeter < 10.0f)) { player->unk_1DC = 1; player->timer_1E8 = 15; player->unk_1F0 = -20; @@ -546,7 +546,7 @@ void func_tank_80045348(Player* player) { s16 sp2E = false; if (player->unk_19C >= 0) { - if ((gBoostButton[player->num] & gInputHold->button) && !player->unk_2B4) { + if ((gBoostButton[player->num] & gInputHold->button) && !player->boostCooldown) { D_800C9F14++; sp2E = true; if (D_800C9F24 == 0.0f) { @@ -569,7 +569,7 @@ void func_tank_80045348(Player* player) { } else { D_800C9F24 = 0.0f; } - if ((gBrakeButton[player->num] & gInputHold->button) && !player->unk_2B4 && !sp2E) { + if ((gBrakeButton[player->num] & gInputHold->button) && !player->boostCooldown && !sp2E) { D_800C9F14++; sp44 = 5.0f; sp40 = 100.0f; @@ -596,7 +596,7 @@ void func_tank_80045678(Player* player) { Audio_KillSfxBySourceAndId(player->sfxSource, 0x01008016); Audio_KillSfxBySourceAndId(player->sfxSource, 0x1100000A); } - if ((gInputHold->button & Z_TRIG) && !player->unk_2B4) { + if ((gInputHold->button & Z_TRIG) && !player->boostCooldown) { D_800C9F14++; if (D_800C9F20 == 0.0f) { AUDIO_PLAY_SFX(0x01004024, player->sfxSource, 0); @@ -626,7 +626,7 @@ void func_tank_80045678(Player* player) { Audio_KillSfxBySourceAndId(player->sfxSource, 0x01008016); Audio_KillSfxBySourceAndId(player->sfxSource, 0x1100000A); } - if ((gInputHold->button & R_TRIG) && !player->unk_2B4) { + if ((gInputHold->button & R_TRIG) && !player->boostCooldown) { D_800C9F14++; if (player->unk_2C0 == 0.0f) { AUDIO_PLAY_SFX(0x01004024, player->sfxSource, 0); @@ -785,14 +785,14 @@ void func_tank_800460E0(Player* player, f32* hitboxData, f32 arg2, f32 arg3, f32 } void func_tank_80046260(Player* player) { - Object_80* obj80; + Scenery* scenery; s32 i; - for (i = 0, obj80 = gObjects80; i < ARRAY_COUNT(gObjects80); i++, obj80++) { - if ((obj80->obj.status == OBJ_ACTIVE) && (obj80->obj.id == OBJ_80_58) && - ((player->unk_138 - 2000.0f) < obj80->obj.pos.z) && (obj80->obj.pos.y < player->pos.y)) { - func_tank_800460E0(player, obj80->info.hitbox, obj80->obj.pos.x, obj80->obj.pos.y, obj80->obj.pos.z, - obj80->obj.rot.x, obj80->obj.rot.y, obj80->obj.rot.z); + for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) { + if ((scenery->obj.status == OBJ_ACTIVE) && (scenery->obj.id == OBJ_SCENERY_58) && + ((player->unk_138 - 2000.0f) < scenery->obj.pos.z) && (scenery->obj.pos.y < player->pos.y)) { + func_tank_800460E0(player, scenery->info.hitbox, scenery->obj.pos.x, scenery->obj.pos.y, scenery->obj.pos.z, + scenery->obj.rot.x, scenery->obj.rot.y, scenery->obj.rot.z); } } } @@ -808,7 +808,7 @@ void func_tank_80046358(Player* player) { player->unk_064 = player->pos.x; player->unk_06C = player->unk_138 + -20.0f; - player->unk_068 = gGroundLevel + 3.0f; + player->unk_068 = gGroundHeight + 3.0f; player->unk_248 = 0.0f; player->unk_24C = 0.0f; player->unk_070 = 0.0f; @@ -844,14 +844,14 @@ void func_tank_8004641C(Player* player, s32 arg1, f32 arg2, f32 arg3, f32 arg4, if (func_play_800A8054(arg1, arg2, arg3, arg4, sp84, sp80, sp7C, &sp58, &sp4C)) { if (D_MA_801BE250[27] < arg3 + sp58.y) { D_MA_801BE250[27] = arg3 + sp58.y; - if (arg1 == OBJ_80_67) { + if (arg1 == OBJ_SCENERY_67) { player->unk_1DC = 0; D_800C9F04 = 1; } } D_MA_801BE250[28] = sp58.x; D_MA_801BE250[29] = sp58.z; - } else if ((arg1 == OBJ_80_67) && (D_MA_801BE250[27] == 0.0f) && + } else if ((arg1 == OBJ_SCENERY_67) && (D_MA_801BE250[27] == 0.0f) && func_play_800A8054(arg1, arg2 + 20.0f, arg3, arg4, sp84, sp80, sp7C, &sp58, &sp4C)) { player->unk_1DC = 9; player->timer_1E8 = 15; @@ -875,7 +875,7 @@ static f32 D_800C9F4C[5] = { 0.0f, -1.0f, 1.0f, 0.5f, -0.5f }; void func_tank_80046704(Player* player) { s32 pad[7]; s16 i; - Object_80* obj80; + Scenery* scenery; f32 temp1; f32 temp2; @@ -883,35 +883,39 @@ void func_tank_80046704(Player* player) { D_800C9F00--; } if (1) {} - for (i = 0, obj80 = gObjects80; i < ARRAY_COUNT(gObjects80); i++, obj80++) { - if ((obj80->obj.status == OBJ_ACTIVE) && ((player->unk_138 - 2000.0f) < obj80->obj.pos.z)) { - if ((obj80->obj.id == OBJ_80_69) || (obj80->obj.id == OBJ_80_70) || (obj80->obj.id == OBJ_80_71) || - (obj80->obj.id == OBJ_80_72) || (obj80->obj.id == OBJ_80_73) || (obj80->obj.id == OBJ_80_67)) { - temp1 = obj80->obj.pos.x - player->pos.x; - temp2 = obj80->obj.pos.z - player->unk_138; + for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) { + if ((scenery->obj.status == OBJ_ACTIVE) && ((player->unk_138 - 2000.0f) < scenery->obj.pos.z)) { + if ((scenery->obj.id == OBJ_SCENERY_69) || (scenery->obj.id == OBJ_SCENERY_70) || + (scenery->obj.id == OBJ_SCENERY_71) || (scenery->obj.id == OBJ_SCENERY_72) || + (scenery->obj.id == OBJ_SCENERY_73) || (scenery->obj.id == OBJ_SCENERY_67)) { + temp1 = scenery->obj.pos.x - player->pos.x; + temp2 = scenery->obj.pos.z - player->unk_138; if (sqrtf(SQ(temp1) + SQ(temp2)) < 2000.0f) { - func_tank_8004641C(player, obj80->obj.id, obj80->obj.pos.x, obj80->obj.pos.y, obj80->obj.pos.z, - obj80->obj.rot.x, obj80->obj.rot.y, obj80->obj.rot.z); + func_tank_8004641C(player, scenery->obj.id, scenery->obj.pos.x, scenery->obj.pos.y, + scenery->obj.pos.z, scenery->obj.rot.x, scenery->obj.rot.y, scenery->obj.rot.z); } - } else if (obj80->obj.id == OBJ_80_74) { - if (((player->pos.x - 820.0f) <= obj80->obj.pos.x) && (obj80->obj.pos.x <= (player->pos.x + 820.0f)) && - ((player->pos.y - 50.0f) <= obj80->obj.pos.y) && (obj80->obj.pos.y <= (player->pos.y + 50.0f)) && - (player->unk_138 <= obj80->obj.pos.z) && (obj80->obj.pos.z <= (player->unk_138 + 960.0f))) { - D_MA_801BE250[27] = obj80->obj.pos.y; + } else if (scenery->obj.id == OBJ_SCENERY_74) { + if (((player->pos.x - 820.0f) <= scenery->obj.pos.x) && + (scenery->obj.pos.x <= (player->pos.x + 820.0f)) && + ((player->pos.y - 50.0f) <= scenery->obj.pos.y) && + (scenery->obj.pos.y <= (player->pos.y + 50.0f)) && (player->unk_138 <= scenery->obj.pos.z) && + (scenery->obj.pos.z <= (player->unk_138 + 960.0f))) { + D_MA_801BE250[27] = scenery->obj.pos.y; player->unk_064 = player->pos.x; player->unk_068 = D_MA_801BE250[27] - 3.0f; } } - if ((obj80->obj.id == OBJ_80_59) || (obj80->obj.id == OBJ_80_60) || (obj80->obj.id == OBJ_80_61) || - (obj80->obj.id == OBJ_80_63) || (obj80->obj.id == OBJ_80_105) || (obj80->obj.id == OBJ_80_66) || - (obj80->obj.id == OBJ_80_67) || (obj80->obj.id == OBJ_80_68)) { + if ((scenery->obj.id == OBJ_SCENERY_59) || (scenery->obj.id == OBJ_SCENERY_60) || + (scenery->obj.id == OBJ_SCENERY_61) || (scenery->obj.id == OBJ_SCENERY_63) || + (scenery->obj.id == OBJ_SCENERY_105) || (scenery->obj.id == OBJ_SCENERY_66) || + (scenery->obj.id == OBJ_SCENERY_67) || (scenery->obj.id == OBJ_SCENERY_68)) { s32 temp_v0; s32 sp94; - temp_v0 = func_tank_80046E40(player, obj80->info.hitbox, &sp94, obj80->obj.pos.x, obj80->obj.pos.y, - obj80->obj.pos.z, obj80->obj.rot.x, obj80->obj.rot.y, obj80->obj.rot.z, - 0.0f, 0.0f, 0.0f); + temp_v0 = func_tank_80046E40(player, scenery->info.hitbox, &sp94, scenery->obj.pos.x, + scenery->obj.pos.y, scenery->obj.pos.z, scenery->obj.rot.x, + scenery->obj.rot.y, scenery->obj.rot.z, 0.0f, 0.0f, 0.0f); switch (temp_v0) { case 0: break; @@ -929,9 +933,9 @@ void func_tank_80046704(Player* player) { player->pos.x += (D_800C9F4C[temp_v0] * 5.0f); break; case 3: - if ((obj80->obj.id == OBJ_80_59) || (obj80->obj.id == OBJ_80_60) || - (obj80->obj.id == OBJ_80_63) || (obj80->obj.id == OBJ_80_66) || - (obj80->obj.id == OBJ_80_68)) { + if ((scenery->obj.id == OBJ_SCENERY_59) || (scenery->obj.id == OBJ_SCENERY_60) || + (scenery->obj.id == OBJ_SCENERY_63) || (scenery->obj.id == OBJ_SCENERY_66) || + (scenery->obj.id == OBJ_SCENERY_68)) { Player_ApplyDamage(player, temp_v0, 5); } player->unk_0D0 = -(D_800C9F00 * 1.5f); @@ -940,37 +944,37 @@ void func_tank_80046704(Player* player) { AUDIO_PLAY_SFX(0x09008015, player->sfxSource, 0); break; } - if (obj80->obj.id == OBJ_80_59) { - if (((player->pos.x - 230.0f) <= obj80->obj.pos.x) && - (obj80->obj.pos.x <= (player->pos.x + 230.0f)) && - ((80.0f <= player->pos.y - obj80->obj.pos.y)) && - ((player->pos.y - obj80->obj.pos.y) < 210.0f) && - ((player->unk_138 - 220.0f) <= obj80->obj.pos.z) && - (obj80->obj.pos.z <= (player->unk_138 + 220.0f))) { + if (scenery->obj.id == OBJ_SCENERY_59) { + if (((player->pos.x - 230.0f) <= scenery->obj.pos.x) && + (scenery->obj.pos.x <= (player->pos.x + 230.0f)) && + ((80.0f <= player->pos.y - scenery->obj.pos.y)) && + ((player->pos.y - scenery->obj.pos.y) < 210.0f) && + ((player->unk_138 - 220.0f) <= scenery->obj.pos.z) && + (scenery->obj.pos.z <= (player->unk_138 + 220.0f))) { - if (!(((player->pos.x - 210.0f) <= obj80->obj.pos.x) && - (obj80->obj.pos.x <= (player->pos.x + 210.0f))) && + if (!(((player->pos.x - 210.0f) <= scenery->obj.pos.x) && + (scenery->obj.pos.x <= (player->pos.x + 210.0f))) && (D_MA_801BE250[27] == 0.f) && (player->vel.y < 0.f)) { player->unk_1DC = 9; player->timer_1E8 = 15; - if ((player->pos.x - 200.0f) <= obj80->obj.pos.x) { + if ((player->pos.x - 200.0f) <= scenery->obj.pos.x) { player->unk_1EC = player->unk_1F0 = 20; } else { player->unk_1EC = player->unk_1F0 = -20; } } else { D_800C9F04 = 1; - D_MA_801BE250[27] = obj80->obj.pos.y + 206.0f; + D_MA_801BE250[27] = scenery->obj.pos.y + 206.0f; player->unk_1DC = 0; } } - if (((player->pos.x - 220.0f) <= obj80->obj.pos.x) && - (obj80->obj.pos.x <= (player->pos.x + 220.0f)) && - ((player->unk_138 - 220.0f) <= obj80->obj.pos.z) && - (obj80->obj.pos.z <= (player->unk_138 + 220.0f)) && (player->pos.y >= 200.0f)) { - player->unk_068 = obj80->obj.pos.y + 204.0f; + if (((player->pos.x - 220.0f) <= scenery->obj.pos.x) && + (scenery->obj.pos.x <= (player->pos.x + 220.0f)) && + ((player->unk_138 - 220.0f) <= scenery->obj.pos.z) && + (scenery->obj.pos.z <= (player->unk_138 + 220.0f)) && (player->pos.y >= 200.0f)) { + player->unk_068 = scenery->obj.pos.y + 204.0f; } - } else if ((obj80->obj.id == OBJ_80_105) && Macbeth_801A3C20(player->unk_138)) { + } else if ((scenery->obj.id == OBJ_SCENERY_105) && Macbeth_801A3C20(player->unk_138)) { if (((player->pos.x - 200.0f) < D_MA_801BE250[21]) && (D_MA_801BE250[21] < (player->pos.x + 200.0f))) { player->unk_068 = D_MA_801BE250[22] - 1.0f; @@ -1106,31 +1110,31 @@ void func_tank_80047504(Player* player) { D_800C9F14 = 0; func_tank_80045678(player); func_tank_80045348(player); - if (!player->unk_2B4) { + if (!player->boostCooldown) { if (D_800C9F14 != 0) { if (D_800C9F14 >= 2) { - player->unk_2BC += 2.0f; + player->boostMeter += 2.0f; } else { - player->unk_2BC += 1.0f; + player->boostMeter += 1.0f; } - if (player->unk_2BC > 90.0f) { - player->unk_2BC = 90.0f; - player->unk_2B4 = true; + if (player->boostMeter > 90.0f) { + player->boostMeter = 90.0f; + player->boostCooldown = true; Audio_KillSfxBySourceAndId(player->sfxSource, 0x01004024); Audio_KillSfxBySourceAndId(player->sfxSource, 0x01008016); } } else { - if (player->unk_2BC > 0.0f) { - player->unk_2B4 = true; + if (player->boostMeter > 0.0f) { + player->boostCooldown = true; Audio_KillSfxBySourceAndId(player->sfxSource, 0x01004024); Audio_KillSfxBySourceAndId(player->sfxSource, 0x01008016); } } } else { - player->unk_2BC -= 1.0f; - if (player->unk_2BC <= 0.0f) { - player->unk_2B4 = false; - player->unk_2BC = 0.0f; + player->boostMeter -= 1.0f; + if (player->boostMeter <= 0.0f) { + player->boostCooldown = false; + player->boostMeter = 0.0f; } } func_play_800B41E0(player); @@ -1144,7 +1148,7 @@ void func_tank_80047504(Player* player) { } else { player->unk_064 = player->pos.x; player->unk_06C = player->unk_138 + -10.0f; - player->unk_068 = gGroundLevel - 4.0f; + player->unk_068 = gGroundHeight - 4.0f; player->unk_248 = 0.0f; player->unk_24C = 0.0f; player->unk_070 = 0.0f; @@ -1329,7 +1333,7 @@ void func_tank_800481F4(Player* player) { Actor* actor; Boss* boss; Sprite* sprite; - Object_80* obj80; + Scenery* scenery; s32 sp98; s32 pad2; f32 var_fv1; @@ -1337,20 +1341,22 @@ void func_tank_800481F4(Player* player) { func_play_800A887C(player); func_tank_800444BC(player); if (player->timer_498 == 0) { - for (i = 0, obj80 = gObjects80; i < ARRAY_COUNT(gObjects80); i++, obj80++) { - if ((obj80->obj.status == OBJ_ACTIVE) && (obj80->obj.id != OBJ_80_58) && (obj80->obj.id != OBJ_80_105) && - (obj80->obj.id != OBJ_80_59) && (obj80->obj.id != OBJ_80_60) && (obj80->obj.id != OBJ_80_63) && - (obj80->obj.id != OBJ_80_66) && (obj80->obj.id != OBJ_80_67) && (obj80->obj.id != OBJ_80_68) && - (obj80->obj.id != OBJ_80_70) && (obj80->obj.id != OBJ_80_72) && (obj80->obj.id != OBJ_80_71) && - (obj80->obj.id != OBJ_80_73) && (obj80->obj.id != OBJ_80_74) && (obj80->obj.id != OBJ_80_69) && - ((player->unk_138 - 2000.0f) < obj80->obj.pos.z)) { - var_fv1 = obj80->obj.rot.y; - if (obj80->info.action == (ObjectFunc) func_enmy_80066EA8) { + for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) { + if ((scenery->obj.status == OBJ_ACTIVE) && (scenery->obj.id != OBJ_SCENERY_58) && + (scenery->obj.id != OBJ_SCENERY_105) && (scenery->obj.id != OBJ_SCENERY_59) && + (scenery->obj.id != OBJ_SCENERY_60) && (scenery->obj.id != OBJ_SCENERY_63) && + (scenery->obj.id != OBJ_SCENERY_66) && (scenery->obj.id != OBJ_SCENERY_67) && + (scenery->obj.id != OBJ_SCENERY_68) && (scenery->obj.id != OBJ_SCENERY_70) && + (scenery->obj.id != OBJ_SCENERY_72) && (scenery->obj.id != OBJ_SCENERY_71) && + (scenery->obj.id != OBJ_SCENERY_73) && (scenery->obj.id != OBJ_SCENERY_74) && + (scenery->obj.id != OBJ_SCENERY_69) && ((player->unk_138 - 2000.0f) < scenery->obj.pos.z)) { + var_fv1 = scenery->obj.rot.y; + if (scenery->info.action == (ObjectFunc) func_enmy_80066EA8) { var_fv1 = 0.0f; } - temp_v0 = - func_play_800A7974(player, obj80->info.hitbox, &sp98, obj80->obj.pos.x, obj80->obj.pos.y, - obj80->obj.pos.z, obj80->obj.rot.x, var_fv1, obj80->obj.rot.z, 0.0f, 0.0f, 0.0f); + temp_v0 = func_play_800A7974(player, scenery->info.hitbox, &sp98, scenery->obj.pos.x, + scenery->obj.pos.y, scenery->obj.pos.z, scenery->obj.rot.x, var_fv1, + scenery->obj.rot.z, 0.0f, 0.0f, 0.0f); if (temp_v0 != 0) { if (temp_v0 < 0) { if (temp_v0 == -1) { @@ -1370,7 +1376,7 @@ void func_tank_800481F4(Player* player) { AUDIO_PLAY_SFX(0x19000001, player->sfxSource, 0); } } else { - Player_ApplyDamage(player, temp_v0, obj80->info.damage); + Player_ApplyDamage(player, temp_v0, scenery->info.damage); } } } diff --git a/src/engine/fox_versus.c b/src/engine/fox_versus.c index c9814cdc..6340a806 100644 --- a/src/engine/fox_versus.c +++ b/src/engine/fox_versus.c @@ -68,11 +68,11 @@ void func_versus_800BC760(void) { gOptionMenuStatus = OPTION_WAIT; D_ctx_80177B40 = 0; gBgColor = 0; - gPlayerFillScreenAlphas[0] = 0; - gPlayerFillScreenAlphas[1] = 0; - gPlayerFillScreenAlphas[2] = 0; - gPlayerFillScreenAlphas[3] = 0; - gOverlayStage = 0; + gPlayerGlareAlphas[0] = 0; + gPlayerGlareAlphas[1] = 0; + gPlayerGlareAlphas[2] = 0; + gPlayerGlareAlphas[3] = 0; + gSceneSetup = 0; gRadioState = 0; gVersusMode = 0; gFillScreenAlphaTarget = 0; @@ -441,7 +441,7 @@ s32 func_versus_800BE564(void) { continue; } D_80178780[i] = 1; - D_ctx_80177870[i] = 0; + gPlayerForms[i] = FORM_ARWING; ret++; } return ret; @@ -461,16 +461,16 @@ s32 func_versus_800BE564(void) { } } - if (D_801787F8[i]) { + if (D_801787F8[i] != 0) { D_801787F8[i]--; } - if ((sUnlockLandmaster) && (D_80178780[i] == 0) && (gControllerPress[i].button & B_BUTTON)) { + if (sUnlockLandmaster && (D_80178780[i] == 0) && (gControllerPress[i].button & B_BUTTON)) { AUDIO_PLAY_SFX(0x49000003, gDefaultSfxSource, 4); D_80178780[i] = 2; } - if ((sUnlockOnFoot) && (D_80178780[i] == 0) && + 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(0x49000003, gDefaultSfxSource, 4); @@ -482,19 +482,19 @@ s32 func_versus_800BE564(void) { D_80178780[i] = 1; } - if (D_80178780[i]) { + if (D_80178780[i] != 0) { switch (D_80178780[i]) { case 1: - D_ctx_80177870[i] = 0; + gPlayerForms[i] = FORM_ARWING; break; case 2: - D_ctx_80177870[i] = 1; + gPlayerForms[i] = FORM_LANDMASTER; break; case 3: - D_ctx_80177870[i] = 3; + gPlayerForms[i] = FORM_ON_FOOT; break; default: - D_ctx_80177870[i] = 0; + gPlayerForms[i] = FORM_ARWING; break; } ret++; @@ -664,7 +664,7 @@ s32 func_versus_800BF17C(void) { } else { D_80178780[i] = 0; gPlayer[i].unk_1D0 = 0; - if ((!D_80178780[i]) && (D_801787F8[i] == 0)) { + if ((D_80178780[i] == 0) && (D_801787F8[i] == 0)) { if (sUnlockLandmaster && sUnlockOnFoot) { D_80178780[i] = RAND_INT(3.0f) + 1; } @@ -699,19 +699,19 @@ s32 func_versus_800BF17C(void) { if (D_80178780[i] != 0) { switch (D_80178780[i]) { case 1: - D_ctx_80177870[i] = 0; + gPlayerForms[i] = FORM_ARWING; break; case 2: - D_ctx_80177870[i] = 1; + gPlayerForms[i] = FORM_LANDMASTER; break; case 3: - D_ctx_80177870[i] = 3; + gPlayerForms[i] = FORM_ON_FOOT; break; default: - D_ctx_80177870[i] = 0; + gPlayerForms[i] = FORM_ARWING; break; } @@ -771,7 +771,7 @@ void func_versus_800BF750(void) { continue; } for (j = 0, temp = 0; j < 4; j++) { - if ((D_ctx_80177B00[i][j] != 0) && (gGameFrameCount & 4)) { + if ((gVsLockOnTimers[i][j] != 0) && (gGameFrameCount & 4)) { gDPSetPrimColor(gMasterDisp++, 0, 0, D_800D4C3C[j], D_800D4C4C[j], D_800D4C5C[j], 255); func_versus_800BDA54(D_800D4C1C[i] + temp * 9.0f, D_800D4C2C[i]); temp++; @@ -1806,12 +1806,12 @@ void func_versus_800C1ED4(void) { func_fade_80084688(2, var_a1); } -void func_versus_800C20B0(void) { +void Versus_StartMatch(void) { switch (gOptionMenuStatus) { case 0: if (gNextGameStateTimer == 0) { gOptionMenuStatus = OPTION_SETUP; - D_ctx_80178410 = 0; + gStarCount = 0; } break; @@ -1824,7 +1824,7 @@ void func_versus_800C20B0(void) { Play_Setup(); if (gVersusStage == VS_STAGE_SECTOR_Z) { - gOverlayStage = 1; + gSceneSetup = 1; } gCurrentLevel = LEVEL_VERSUS; @@ -1919,7 +1919,7 @@ void func_versus_800C2244(Actor* actor) { x3 += 360.0f; } - } else if (actor->obj.pos.y < gGroundLevel + 50.0f) { + } else if (actor->obj.pos.y < gGroundHeight + 50.0f) { if (x3 > 180.0f) { x3 = 0.0f; actor->unk_0F4.x = 0.0f; @@ -1955,8 +1955,8 @@ void func_versus_800C2244(Actor* actor) { actor->fwork[14] -= actor->fwork[14] * 0.1f; actor->fwork[12] -= actor->fwork[12] * 0.1f; - if ((actor->obj.pos.y < gGroundLevel + 40.0f) && (actor->vel.y < 0.0f)) { - actor->obj.pos.y = gGroundLevel + 40.0f; + if ((actor->obj.pos.y < gGroundHeight + 40.0f) && (actor->vel.y < 0.0f)) { + actor->obj.pos.y = gGroundHeight + 40.0f; actor->vel.y = 0.0f; } diff --git a/src/mods/sfxjukebox.c b/src/mods/sfxjukebox.c index 7182cc35..4f2f5773 100644 --- a/src/mods/sfxjukebox.c +++ b/src/mods/sfxjukebox.c @@ -2,7 +2,7 @@ #include "fox_map.h" #include "fox_option.h" -extern s32 spectrumAnalizerMode; +extern s32 spectrumAnalyzerMode; extern bool D_menu_801B9320; extern s32 D_menu_801B9244; extern OptionId D_menu_801B9124; @@ -108,11 +108,11 @@ void Option_ExpertSoundUpdate(void) { } } - // Spectrum Analizer mode selector + // Spectrum Analyzer mode selector if (gControllerPress[gMainController].button & R_CBUTTONS) { - spectrumAnalizerMode++; - if (spectrumAnalizerMode > 2) { - spectrumAnalizerMode = 0; + spectrumAnalyzerMode++; + if (spectrumAnalyzerMode > 2) { + spectrumAnalyzerMode = 0; } } diff --git a/src/overlays/ovl_ending/fox_end1.c b/src/overlays/ovl_ending/fox_end1.c index bdd9c787..77c42de2 100644 --- a/src/overlays/ovl_ending/fox_end1.c +++ b/src/overlays/ovl_ending/fox_end1.c @@ -942,7 +942,7 @@ void Ending_8018A570(void) { D_ending_8019858C = 0; D_ending_80196F8C = 4; gCsFrameCount = 0; - gOverlayStage = 1; + gSceneSetup = 1; break; case 4: @@ -955,7 +955,7 @@ void Ending_8018A570(void) { D_ending_8019858C = 0; D_ending_80196F8C = 6; gCsFrameCount = 0; - gOverlayStage = 4; + gSceneSetup = 4; break; case 6: @@ -1028,7 +1028,7 @@ void Ending_8018A8FC(void) { gFillScreenAlphaStep = 16; } -void Ending_8018A96C(void) { +void Ending_Main(void) { gCsFrameCount++; gGameFrameCount++; @@ -1036,7 +1036,7 @@ void Ending_8018A96C(void) { case 0: gRadioState = 0; gGameFrameCount = 0; - gOverlayStage = 0; + gSceneSetup = 0; gCsCamEyeX = gCsCamEyeY = gCsCamEyeZ = 0.0f; gCsCamAtX = gCsCamAtY = 0.0f; gCsCamAtZ = -100.0f; @@ -1056,7 +1056,7 @@ void Ending_8018A96C(void) { break; } case 4: - gOverlayStage = 2; + gSceneSetup = 2; D_ending_80196D00 = 5; break; @@ -1076,7 +1076,7 @@ void Ending_8018A96C(void) { Ending_8018ABE8(); } -void Ending_8018AAC4(void) { +void Ending_Draw(void) { Matrix_Push(&gGfxMatrix); Matrix_LookAt(gGfxMatrix, gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ, 0.0f, 100.0f, 0.0f, MTXF_NEW); @@ -1517,7 +1517,7 @@ void Ending_8018B860(void) { D_ctx_80177A10[0] = 0; D_ending_8019858C = 0; gBgColor = 0x4AE5; // 72, 88, 144 - D_ctx_80178410 = 0; + gStarCount = 0; } void Ending_8018BAD0(void) { @@ -1554,7 +1554,7 @@ void Ending_8018BAD0(void) { D_ctx_80177A10[0] = 1; D_ending_8019858C = 0; gBgColor = 0x4AE5; // 72, 88, 144 - D_ctx_80178410 = 0; + gStarCount = 0; } f32 D_ending_80192DF0[8] = { diff --git a/src/overlays/ovl_ending/fox_end2.c b/src/overlays/ovl_ending/fox_end2.c index 71ed3037..567ab4e1 100644 --- a/src/overlays/ovl_ending/fox_end2.c +++ b/src/overlays/ovl_ending/fox_end2.c @@ -31,9 +31,9 @@ void Ending_8018CE20(u32 arg0) { D_ending_80192E74[i].unk_13; } - if ((D_ending_80192E74[i].unk_11 == 0) || (D_play_800D2F68 == true)) { + if ((D_ending_80192E74[i].unk_11 == 0) || (gVenomHardClear == 1)) { if (D_ending_80192E74[i].unk_10 == 1) { - xPos = (320 - Graphics_GetLargeTextWidth(D_ending_80192E74[i].unk_00)) / 2; + xPos = (SCREEN_WIDTH - Graphics_GetLargeTextWidth(D_ending_80192E74[i].unk_00)) / 2; RCP_SetupDL(&gMasterDisp, 0x53); gDPSetTextureFilter(gMasterDisp++, G_TF_POINT); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, alpha); @@ -71,9 +71,9 @@ void Ending_8018CE20(u32 arg0) { } void Ending_8018D250(u32 arg0, AssetInfo* asset) { - gOverlayStage = asset->unk_08; + gSceneSetup = asset->unk_08; gVIsPerFrame = asset->unk_70; - D_ctx_80178410 = asset->unk_14; + gStarCount = asset->unk_14; } void Ending_8018D28C(s32 arg0, AssetInfo* asset) { @@ -157,7 +157,7 @@ void Ending_8018D638(u32 arg0, AssetInfo* asset) { if (gExpertMode != 0) { for (i = 0; i < 240; i += 4) { - if (!D_play_800D2F68) { + if (gVenomHardClear == 0) { TextureRect_16bRGBA(&gMasterDisp, gEndingNormalReward + 316 * i, 316, 4, 0.0f, i, 1.0f, 1.0f); } else { TextureRect_16bRGBA(&gMasterDisp, gEndingExpertReward + 316 * i, 316, 4, 0.0f, i, 1.0f, 1.0f); @@ -240,7 +240,7 @@ bool Ending_8018DCB4(void) { s32 unk_5E[10][7]; s32 unk40[10]; - for (i = 0; i < gCurrentPlanet + 1; i++) { + for (i = 0; i < gMissionNumber + 1; i++) { temp2 += ((D_ctx_80177B50[i] & 0x00FF0000) >> 16) & 1; temp2 += ((D_ctx_80177B50[i] & 0x0000FF00) >> 8) & 1; temp2 += (D_ctx_80177B50[i] & 0x000000FF) & 1; @@ -430,7 +430,7 @@ void Ending_8018E7B8(u32 arg0, AssetInfo* asset) { void Ending_8018EDB8(u32 arg0, AssetInfo* asset) { f32 temp; - D_ctx_80178410 = 0; + gStarCount = 0; RCP_SetupDL(&gMasterDisp, asset->unk_08); @@ -740,7 +740,7 @@ void Ending_80190CF0(u32 arg0, AssetInfo* asset) { u8 alpha = 255; f32 temp; - if (D_play_800D2F68 == true) { + if (gVenomHardClear == 1) { return; } @@ -810,7 +810,7 @@ void Ending_80191234(s32 arg0, s32 arg1) { gOptionMenuStatus = OPTION_WAIT; gDrawMode = DRAW_NONE; gBgColor = 0; - D_ctx_80178410 = 0; + gStarCount = 0; gControllerLock = 10; } diff --git a/src/overlays/ovl_i1/fox_co.c b/src/overlays/ovl_i1/fox_co.c index 83dbc589..5ff17edc 100644 --- a/src/overlays/ovl_i1/fox_co.c +++ b/src/overlays/ovl_i1/fox_co.c @@ -12,10 +12,10 @@ u8 D_i1_8019B6D0; f32 D_i1_8019B6D8[68]; -void Corneria_80187530(Object_80* obj80) { +void Corneria_80187530(Scenery* scenery) { } -void Corneria_8018753C(Object_80* obj80) { +void Corneria_8018753C(Scenery* scenery) { gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_CO_60199D0); @@ -439,7 +439,7 @@ void Corneria_80188A18(Boss* boss) { } } if ((gBossFrameCount > 800) && ((gBossFrameCount % 512) == 0)) { - if (D_ctx_80177B6C < 2) { + if (gCoUturnCount < 2) { Radio_PlayMessage(gMsg_ID_20237, RCID_PEPPY); } else if (D_edisplay_801615D0.z > 0.0f) { Radio_PlayMessage(gMsg_ID_2233, RCID_FALCO); @@ -1116,7 +1116,8 @@ s32 Corneria_8018AB64(Actor* actor) { sp7C.z = sp50[i] + actor->obj.pos.z; temp_v0 = Object_CheckCollision(actor->index, &sp7C, &sp70, 1); if ((temp_v0 != 0) && (temp_v0 >= 10)) { - if ((gObjects80[temp_v0 - 10].obj.status == OBJ_ACTIVE) && (gObjects80[temp_v0 - 10].obj.id == OBJ_80_40)) { + if ((gScenery[temp_v0 - 10].obj.status == OBJ_ACTIVE) && + (gScenery[temp_v0 - 10].obj.id == OBJ_SCENERY_40)) { return temp_v0 - 9; } } @@ -1139,7 +1140,7 @@ void Corneria_8018ACE0(Actor* actor) { Object_SetInfo(&actor->info, actor->obj.id); actor->state = 100; actor->timer_0BC = 10; - actor->timer_0CA[0] = 0; + actor->lockOnTimers[0] = 0; actor->vel.x = actor->vel.y = actor->vel.z = 0.0f; } } @@ -1186,7 +1187,7 @@ void Corneria_8018AED0(Actor* actor) { actor->fwork[1] += 20.0f; actor->fwork[0] = 0.0f; if (actor->unk_0B6 == 50) { - gObjects80[actor->iwork[0] - 1].state = 1; + gScenery[actor->iwork[0] - 1].state = 1; } if (actor->unk_0B6 >= Animation_GetFrameCount(&D_CO_602991C)) { actor->state++; @@ -1203,15 +1204,15 @@ void Corneria_8018B0B4(Actor* actor) { s32 i; for (i = 0; i < 50; i++) { - if (gObjects80[i].obj.status == OBJ_FREE) { - Object_80_Initialize(&gObjects80[i]); - gObjects80[i].obj.status = OBJ_INIT; - gObjects80[i].obj.id = OBJ_80_42; - gObjects80[i].obj.pos.x = actor->obj.pos.x; - gObjects80[i].obj.pos.y = actor->obj.pos.y; - gObjects80[i].obj.pos.z = actor->obj.pos.z; - gObjects80[i].obj.rot.y = actor->obj.rot.y; - Object_SetInfo(&gObjects80[i].info, gObjects80[i].obj.id); + if (gScenery[i].obj.status == OBJ_FREE) { + Scenery_Initialize(&gScenery[i]); + gScenery[i].obj.status = OBJ_INIT; + gScenery[i].obj.id = OBJ_SCENERY_42; + gScenery[i].obj.pos.x = actor->obj.pos.x; + gScenery[i].obj.pos.y = actor->obj.pos.y; + gScenery[i].obj.pos.z = actor->obj.pos.z; + gScenery[i].obj.rot.y = actor->obj.rot.y; + Object_SetInfo(&gScenery[i].info, gScenery[i].obj.id); actor->iwork[0] = i; return; } @@ -1222,13 +1223,13 @@ void Corneria_8018B15C(Actor* actor) { Vec3f sp60[20]; Vec3f sp54; Vec3f sp48; - Object_80* obj80; + Scenery* scenery; f32 temp_sin; f32 temp_cos; Corneria_8018ACE0(actor); - obj80 = &gObjects80[actor->iwork[0]]; + scenery = &gScenery[actor->iwork[0]]; temp_sin = SIN_DEG(actor->obj.rot.y); actor->vel.x = actor->fwork[0] * temp_sin; temp_cos = COS_DEG(actor->obj.rot.y); @@ -1265,25 +1266,25 @@ void Corneria_8018B15C(Actor* actor) { } if (actor->unk_0B6 == (Animation_GetFrameCount(&D_CO_602AA04) - actor->iwork[2])) { actor->iwork[1] = 1; - obj80->state = 1; + scenery->state = 1; sp54.x = 0.0f; sp54.y = 0.0f; sp54.z = 30.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48); - obj80->vel.x = sp48.x; - obj80->vel.y = sp48.y; - obj80->vel.z = sp48.z; + scenery->vel.x = sp48.x; + scenery->vel.y = sp48.y; + scenery->vel.z = sp48.z; AUDIO_PLAY_SFX(0x2902401C, actor->sfxSource, 4); } break; } if (actor->iwork[1] == 0) { - obj80->obj.pos.x = actor->fwork[2]; - obj80->obj.pos.y = actor->fwork[6]; - obj80->obj.pos.z = actor->fwork[10]; - obj80->obj.rot.y = actor->obj.rot.y; - obj80->vel.y = 0.0f; + scenery->obj.pos.x = actor->fwork[2]; + scenery->obj.pos.y = actor->fwork[6]; + scenery->obj.pos.z = actor->fwork[10]; + scenery->obj.rot.y = actor->obj.rot.y; + scenery->vel.y = 0.0f; } Math_SmoothStepToVec3fArray(sp60, actor->vwork, 0, Animation_GetFrameData(&D_CO_602AA04, actor->unk_0B6, sp60), @@ -1293,7 +1294,7 @@ void Corneria_8018B15C(Actor* actor) { void Corneria_8018B418(Actor* actor) { s32 pad; Vec3f sp54[20]; - Object_80* temp_v0_2; + Scenery* temp_v0_2; f32 temp_sin; f32 temp_cos; s32 pad2[4]; @@ -1322,7 +1323,7 @@ void Corneria_8018B418(Actor* actor) { } if (actor->iwork[1] == 0) { - temp_v0_2 = &gObjects80[actor->iwork[0]]; + temp_v0_2 = &gScenery[actor->iwork[0]]; temp_v0_2->obj.pos.x = actor->fwork[2]; temp_v0_2->obj.pos.y = actor->fwork[6]; temp_v0_2->obj.pos.z = actor->fwork[10]; @@ -1405,7 +1406,7 @@ void Corneria_8018BAFC(s32 limbIndex, Vec3f* rot, void* data) { actor->fwork[6] = sp1C.y; actor->fwork[10] = sp1C.z; if (actor->iwork[1] == 0) { - gObjects80[actor->iwork[0]].obj.rot.x = -rot->y; + gScenery[actor->iwork[0]].obj.rot.x = -rot->y; } } } @@ -1518,10 +1519,10 @@ void Corneria_Boss293_Init(Boss293* this) { } void Corneria_8018C0B0(Boss* boss) { - func_effect_8007D9DC(boss->obj.pos.x, gGroundLevel + 2.0f, boss->obj.pos.z, 5.0f, 100.0f, 0); - func_effect_8007D9DC(boss->obj.pos.x, gGroundLevel + 2.0f, boss->obj.pos.z, 5.0f, 100.0f, 5); - func_effect_8007D9DC(boss->obj.pos.x, gGroundLevel + 2.0f, boss->obj.pos.z, 5.0f, 100.0f, 10); - func_effect_8007ADF4(boss->obj.pos.x, gGroundLevel, boss->obj.pos.z, 1.0f, 10.0f); + func_effect_8007D9DC(boss->obj.pos.x, gGroundHeight + 2.0f, boss->obj.pos.z, 5.0f, 100.0f, 0); + func_effect_8007D9DC(boss->obj.pos.x, gGroundHeight + 2.0f, boss->obj.pos.z, 5.0f, 100.0f, 5); + func_effect_8007D9DC(boss->obj.pos.x, gGroundHeight + 2.0f, boss->obj.pos.z, 5.0f, 100.0f, 10); + func_effect_8007ADF4(boss->obj.pos.x, gGroundHeight, boss->obj.pos.z, 1.0f, 10.0f); } static Vec3f D_i1_801998CC = { 442.0f, 5.0f, 360.0f }; @@ -1987,7 +1988,7 @@ void Corneria_8018C19C(Boss* boss) { Math_SmoothStepToF(&boss->vel.z, 0.0f, 0.1f, 2.0f, 0.00001f); boss->obj.rot.z -= 2.0f; boss->gravity = 1.0f; - if (boss->obj.pos.y < (gGroundLevel + 150.0f)) { + if (boss->obj.pos.y < (gGroundHeight + 150.0f)) { gCameraShake = 100; func_effect_80081A8C(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 40.0f, 12); boss->timer_050 = 20; @@ -2126,7 +2127,7 @@ void Corneria_8018DDAC(Boss* boss) { boss->vel.x, boss->vel.y, boss->vel.z, 0.2f, 10); } - if (boss->obj.pos.y < (gGroundLevel + 150.0f)) { + if (boss->obj.pos.y < (gGroundHeight + 150.0f)) { if (boss->swork[0] == 0) { boss->vel.y = -5.0f; boss->swork[0] = 1; @@ -2218,7 +2219,7 @@ void Corneria_8018E290(Boss* boss) { boss->vel.x, boss->vel.y, boss->vel.z, 0.2f, 10); } - if (boss->obj.pos.y < (gGroundLevel + 150.0f)) { + if (boss->obj.pos.y < (gGroundHeight + 150.0f)) { if (boss->swork[0] == 0) { boss->vel.y = -5.0f; boss->swork[0] = 1; @@ -2310,7 +2311,7 @@ void Corneria_8018E76C(Boss* boss) { func_effect_8007C120(boss->obj.pos.x + sp4C.x, boss->obj.pos.y + sp4C.y, boss->obj.pos.z + sp4C.z, boss->vel.x, boss->vel.y, boss->vel.z, 0.2f, 10); } - if (boss->obj.pos.y < (gGroundLevel + 150.0f)) { + if (boss->obj.pos.y < (gGroundHeight + 150.0f)) { if (boss->swork[0] == 0) { boss->vel.y = -5.0f; boss->swork[0] = 1; @@ -2396,48 +2397,48 @@ void Corneria_8018EF90(Boss* boss) { Animation_DrawSkeleton(1, D_CO_602D5AC, boss->vwork, Corneria_8018EF38, NULL, &boss->index, &gIdentityMatrix); } -void Corneria_8018F044(Object_80* obj80) { +void Corneria_8018F044(Scenery* scenery) { - switch (obj80->state) { + switch (scenery->state) { case 0: - if (obj80->dmgType != 0) { - obj80->dmgType = 0; - if (obj80->dmgPart < 2) { - obj80->unk_44++; - obj80->timer_4C = 5; - obj80->vel.x += 2.0f; - obj80->vel.y += 2.0f; - if (obj80->unk_44 >= 3) { - obj80->state = 1; - obj80->info.hitbox = SEGMENTED_TO_VIRTUAL(&D_CO_603E924); - AUDIO_PLAY_SFX(0x1900000D, obj80->sfxSource, 0); + if (scenery->dmgType != 0) { + scenery->dmgType = 0; + if (scenery->dmgPart < 2) { + scenery->unk_44++; + scenery->timer_4C = 5; + scenery->vel.x += 2.0f; + scenery->vel.y += 2.0f; + if (scenery->unk_44 >= 3) { + scenery->state = 1; + scenery->info.hitbox = SEGMENTED_TO_VIRTUAL(&D_CO_603E924); + AUDIO_PLAY_SFX(0x1900000D, scenery->sfxSource, 0); return; } - AUDIO_PLAY_SFX(0x2903300E, obj80->sfxSource, 0); + AUDIO_PLAY_SFX(0x2903300E, scenery->sfxSource, 0); } } break; case 1: - Math_SmoothStepToF(&obj80->vel.x, 80.0f, 0.2f, 10.0f, 0.0f); - Math_SmoothStepToF(&obj80->vel.y, 80.0f, 0.2f, 10.0f, 0.0f); + Math_SmoothStepToF(&scenery->vel.x, 80.0f, 0.2f, 10.0f, 0.0f); + Math_SmoothStepToF(&scenery->vel.y, 80.0f, 0.2f, 10.0f, 0.0f); break; } } bool Corneria_8018F1C8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { - Object_80* obj80 = (Object_80*) data; + Scenery* scenery = (Scenery*) data; RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); switch (limbIndex) { case 1: - rot->y -= obj80->vel.x; - if ((obj80->timer_4C % 2) != 0) { + rot->y -= scenery->vel.x; + if ((scenery->timer_4C % 2) != 0) { RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } break; case 2: - rot->y += obj80->vel.y; - if ((obj80->timer_4C % 2) != 0) { + rot->y += scenery->vel.y; + if ((scenery->timer_4C % 2) != 0) { RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } break; @@ -2445,28 +2446,28 @@ bool Corneria_8018F1C8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return 0; } -void Corneria_8018F31C(Object_80* obj80) { +void Corneria_8018F31C(Scenery* scenery) { Vec3f sp28[10]; Animation_GetFrameData(&D_CO_602AA7C, 0, sp28); - Animation_DrawSkeleton(3, D_CO_602AB48, sp28, Corneria_8018F1C8, NULL, obj80, gCalcMatrix); + Animation_DrawSkeleton(3, D_CO_602AB48, sp28, Corneria_8018F1C8, NULL, scenery, gCalcMatrix); RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } -void Corneria_8018F3BC(Object_80* obj80, f32 arg1) { - Object_80_Initialize(obj80); - obj80->obj.status = OBJ_INIT; - obj80->obj.pos.x = RAND_FLOAT_CENTERED(1000.0f) + arg1; - obj80->obj.rot.y = RAND_FLOAT(90.0f) + 45.0f; +void Corneria_8018F3BC(Scenery* scenery, f32 arg1) { + Scenery_Initialize(scenery); + scenery->obj.status = OBJ_INIT; + scenery->obj.pos.x = RAND_FLOAT_CENTERED(1000.0f) + arg1; + scenery->obj.rot.y = RAND_FLOAT(90.0f) + 45.0f; if (arg1 > 0.0f) { - obj80->obj.rot.y *= -1.0f; + scenery->obj.rot.y *= -1.0f; } - obj80->obj.pos.y = 0.0f; - obj80->obj.id = OBJ_80_1; - obj80->unk_60 = 60.0f; - Object_SetInfo(&obj80->info, obj80->obj.id); - obj80->obj.pos.z = -2000.0f; - obj80->info.unk_10 = 15000.0f; + scenery->obj.pos.y = 0.0f; + scenery->obj.id = OBJ_SCENERY_1; + scenery->unk_60 = 60.0f; + Object_SetInfo(&scenery->info, scenery->obj.id); + scenery->obj.pos.z = -2000.0f; + scenery->info.unk_10 = 15000.0f; } void Corneria_8018F4A4(void) { @@ -2474,15 +2475,15 @@ void Corneria_8018F4A4(void) { if (((gGameFrameCount % 16) == 0) && !(gPlayer[0].unk_1D0 < 4)) { for (i = 0; i < 50; i++) { - if (gObjects80[i].obj.status == OBJ_FREE) { - Corneria_8018F3BC(&gObjects80[i], 4000.0f); + if (gScenery[i].obj.status == OBJ_FREE) { + Corneria_8018F3BC(&gScenery[i], 4000.0f); break; } } - for (i = 0; i < ARRAY_COUNT(gObjects80); i++) { - if (gObjects80[i].obj.status == OBJ_FREE) { - Corneria_8018F3BC(&gObjects80[i], -4000.0f); + for (i = 0; i < ARRAY_COUNT(gScenery); i++) { + if (gScenery[i].obj.status == OBJ_FREE) { + Corneria_8018F3BC(&gScenery[i], -4000.0f); break; } } @@ -2550,7 +2551,7 @@ void Corneria_8018F6F8(Actor* actor, s32 arg1) { AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); } -void Corneria_8018F880(Player* player) { +void Corneria_LevelStart(Player* player) { s32 i; Actor* actor0 = &gActors[0]; Actor* actor1 = &gActors[1]; @@ -2924,7 +2925,7 @@ void Corneria_8018F880(Player* player) { Object_Kill(&actor1->obj, actor1->sfxSource); Object_Kill(&actor2->obj, actor2->sfxSource); - gLevelStatusScreenTimer = 80; + gLevelStartStatusScreenTimer = 80; player->pos.y = 350.0f; player->cam.eye.x = player->pos.x; player->cam.eye.y = (player->pos.y * player->unk_148) + 50.0f; @@ -2935,8 +2936,7 @@ void Corneria_8018F880(Player* player) { player->cam.at.y = (player->pos.y * player->unk_148) + 20.0f; player->cam.at.z = player->unk_138; D_ctx_80177950 = 1.0f; - gPlayerFillScreenAlphas[0] = gPlayerFillScreenAlphas[1] = gPlayerFillScreenAlphas[2] = - gPlayerFillScreenAlphas[3] = 0; + gPlayerGlareAlphas[0] = gPlayerGlareAlphas[1] = gPlayerGlareAlphas[2] = gPlayerGlareAlphas[3] = 0; gLoadLevelObjects = 1; gFillScreenAlphaTarget = 0; player->timer_1F8 = 15; @@ -3016,7 +3016,7 @@ void Corneria_80190F74(Actor* actor, s32 arg1) { AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); } -void Corneria_80191160(Player* player) { +void Corneria_LevelComplete1(Player* player) { Vec3f sp64; Vec3f sp58; f32 sp54; @@ -3167,7 +3167,7 @@ void Corneria_80191160(Player* player) { if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; - D_ctx_8017837C = 4; + gFadeoutType = 4; D_play_800D3180[gCurrentLevel] = Play_CheckMedalStatus(150) + 1; } } @@ -3176,10 +3176,10 @@ void Corneria_80191160(Player* player) { switch (gCsFrameCount) { case 981: - D_ctx_80177830 = 1; + gShowLevelClearStatusScreen = 1; break; case 1181: - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; break; case 240: AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); diff --git a/src/overlays/ovl_i1/fox_tr360.c b/src/overlays/ovl_i1/fox_tr360.c index b543564b..0387d8e4 100644 --- a/src/overlays/ovl_i1/fox_tr360.c +++ b/src/overlays/ovl_i1/fox_tr360.c @@ -8,25 +8,25 @@ #include "assets/ast_training.h" void Training_80198C50(void) { - Object_58* obj58; + Scenery360* scenery360; s32 i; gLevelObjects = SEGMENTED_TO_VIRTUAL(D_TR_6008EF8); Rand_SetSeed(1, 29000, 9876); - obj58 = gObjects58; + scenery360 = gScenery360; for (i = 0; i < 1000; i++) { if (gLevelObjects[i].id >= 0) { if (gLevelObjects[i].id <= 160) { - Object_58_Initialize(obj58); - obj58->obj.status = OBJ_ACTIVE; - obj58->obj.id = gLevelObjects[i].id; - obj58->obj.pos.x = gLevelObjects[i].xPos; - obj58->obj.pos.z = -gLevelObjects[i].zPos1; - obj58->obj.pos.y = gLevelObjects[i].yPos - RAND_FLOAT_SEEDED(300.0f); - obj58->obj.rot.y = gLevelObjects[i].rot.y; - Object_SetInfo(&obj58->info, obj58->obj.id); - obj58++; + Scenery360_Initialize(scenery360); + scenery360->obj.status = OBJ_ACTIVE; + scenery360->obj.id = gLevelObjects[i].id; + scenery360->obj.pos.x = gLevelObjects[i].xPos; + scenery360->obj.pos.z = -gLevelObjects[i].zPos1; + scenery360->obj.pos.y = gLevelObjects[i].yPos - RAND_FLOAT_SEEDED(300.0f); + scenery360->obj.rot.y = gLevelObjects[i].rot.y; + Object_SetInfo(&scenery360->info, scenery360->obj.id); + scenery360++; } } else { break; @@ -35,38 +35,38 @@ void Training_80198C50(void) { } bool Training_80198DCC(Actor* actor, f32 x, f32 z) { - Object_58* obj58; + Scenery360* scenery360; s32 i; - for (i = 0, obj58 = gObjects58; i < 200;) { - if ((obj58->obj.status == OBJ_ACTIVE) && - (fabsf(obj58->obj.pos.x - (actor->obj.pos.x + ((x * 650.0f) + 350.0f))) < 1200.0f) && - (fabsf(obj58->obj.pos.z - (actor->obj.pos.z + ((z * 650.0f) + 350.0f))) < 1200.0f) && + for (i = 0, scenery360 = gScenery360; i < 200;) { + if ((scenery360->obj.status == OBJ_ACTIVE) && + (fabsf(scenery360->obj.pos.x - (actor->obj.pos.x + ((x * 650.0f) + 350.0f))) < 1200.0f) && + (fabsf(scenery360->obj.pos.z - (actor->obj.pos.z + ((z * 650.0f) + 350.0f))) < 1200.0f) && (actor->obj.pos.y < 650.0f)) { return true; } - obj58++; - if ((obj58->obj.status == OBJ_ACTIVE) && - (fabsf(obj58->obj.pos.x - (actor->obj.pos.x + ((x * 650.0f) + 350.0f))) < 1200.0f) && - (fabsf(obj58->obj.pos.z - (actor->obj.pos.z + ((z * 650.0f) + 350.0f))) < 1200.0f) && + scenery360++; + if ((scenery360->obj.status == OBJ_ACTIVE) && + (fabsf(scenery360->obj.pos.x - (actor->obj.pos.x + ((x * 650.0f) + 350.0f))) < 1200.0f) && + (fabsf(scenery360->obj.pos.z - (actor->obj.pos.z + ((z * 650.0f) + 350.0f))) < 1200.0f) && (actor->obj.pos.y < 650.0f)) { return true; } - obj58++; - if ((obj58->obj.status == OBJ_ACTIVE) && - (fabsf(obj58->obj.pos.x - (actor->obj.pos.x + ((x * 650.0f) + 350.0f))) < 1200.0f) && - (fabsf(obj58->obj.pos.z - (actor->obj.pos.z + ((z * 650.0f) + 350.0f))) < 1200.0f) && + scenery360++; + if ((scenery360->obj.status == OBJ_ACTIVE) && + (fabsf(scenery360->obj.pos.x - (actor->obj.pos.x + ((x * 650.0f) + 350.0f))) < 1200.0f) && + (fabsf(scenery360->obj.pos.z - (actor->obj.pos.z + ((z * 650.0f) + 350.0f))) < 1200.0f) && (actor->obj.pos.y < 650.0f)) { return true; } - obj58++; - if ((obj58->obj.status == OBJ_ACTIVE) && - (fabsf(obj58->obj.pos.x - (actor->obj.pos.x + ((x * 650.0f) + 350.0f))) < 1200.0f) && - (fabsf(obj58->obj.pos.z - (actor->obj.pos.z + ((z * 650.0f) + 350.0f))) < 1200.0f) && + scenery360++; + if ((scenery360->obj.status == OBJ_ACTIVE) && + (fabsf(scenery360->obj.pos.x - (actor->obj.pos.x + ((x * 650.0f) + 350.0f))) < 1200.0f) && + (fabsf(scenery360->obj.pos.z - (actor->obj.pos.z + ((z * 650.0f) + 350.0f))) < 1200.0f) && (actor->obj.pos.y < 650.0f)) { return true; } - obj58++; + scenery360++; i += 4; } @@ -120,7 +120,7 @@ void Training_80199024(Actor* actor) { if (var_fv0 < 0.0f) { var_fv0 += 360.0f; } - } else if ((actor->obj.pos.y < (gGroundLevel + 50.0f)) && (var_fv0 > 180.0f)) { + } else if ((actor->obj.pos.y < (gGroundHeight + 50.0f)) && (var_fv0 > 180.0f)) { var_fv0 = 0.0f; actor->unk_0F4.x = 0.0f; } @@ -143,8 +143,8 @@ void Training_80199024(Actor* actor) { actor->fwork[13] -= (actor->fwork[13] * 0.1f); actor->fwork[14] -= (actor->fwork[14] * 0.1f); actor->fwork[12] -= (actor->fwork[12] * 0.1f); - if ((actor->obj.pos.y < gGroundLevel + 40.0f) && (actor->vel.y < 0.0f)) { - actor->obj.pos.y = gGroundLevel + 40.0f; + if ((actor->obj.pos.y < gGroundHeight + 40.0f) && (actor->vel.y < 0.0f)) { + actor->obj.pos.y = gGroundHeight + 40.0f; actor->vel.y = 0.0f; } ActorAllRange_ApplyDamage(actor); diff --git a/src/overlays/ovl_i1/fox_ve1.c b/src/overlays/ovl_i1/fox_ve1.c index f24a407a..f98852e5 100644 --- a/src/overlays/ovl_i1/fox_ve1.c +++ b/src/overlays/ovl_i1/fox_ve1.c @@ -311,14 +311,14 @@ void Venom1_BossTrigger4_Update(Ve1BossTrigger4* this) { } } -void Venom1_801924A8(Object_80* obj80) { - switch (obj80->state) { +void Venom1_801924A8(Scenery* scenery) { + switch (scenery->state) { case 0: - if (gPlayer[0].pos.z < obj80->obj.pos.z) { + if (gPlayer[0].pos.z < scenery->obj.pos.z) { D_ctx_80177AB0 = 0; D_ctx_80177A98 = 0; - obj80->state++; + scenery->state++; } case 1: @@ -330,7 +330,7 @@ void Venom1_8019250C(Actor* actor) { } void Venom1_80192518(Actor* actor) { - Object_80* obj80; + Scenery* scenery; f32 var_ft4; f32 var_ft5; s32 i; @@ -359,23 +359,24 @@ void Venom1_80192518(Actor* actor) { var_ft5 = 450.0f; var_ft4 = 0.0f; - obj80 = &gObjects80[0]; + scenery = &gScenery[0]; - for (i = 0; i < 50; i++, obj80++) { - if ((obj80->obj.id == OBJ_80_128) || (obj80->obj.id == OBJ_80_129) || (obj80->obj.id == OBJ_80_130)) { - if (((actor->obj.pos.z + 1100.0f - obj80->obj.pos.z) < 2200.0f) && - ((actor->obj.pos.z + 1100.0f - obj80->obj.pos.z) > 0.0f)) { - switch (obj80->obj.id) { - case OBJ_80_128: - case OBJ_80_130: + for (i = 0; i < 50; i++, scenery++) { + if ((scenery->obj.id == OBJ_SCENERY_128) || (scenery->obj.id == OBJ_SCENERY_129) || + (scenery->obj.id == OBJ_SCENERY_130)) { + if (((actor->obj.pos.z + 1100.0f - scenery->obj.pos.z) < 2200.0f) && + ((actor->obj.pos.z + 1100.0f - scenery->obj.pos.z) > 0.0f)) { + switch (scenery->obj.id) { + case OBJ_SCENERY_128: + case OBJ_SCENERY_130: break; - case OBJ_80_129: + case OBJ_SCENERY_129: var_ft5 = 600.0f; break; } - var_ft4 = obj80->obj.pos.x; + var_ft4 = scenery->obj.pos.x; break; } } @@ -671,7 +672,7 @@ void Venom1_80192EA4(Actor* actor) { } void Venom1_80192EB0(Actor* actor) { - Object_80* obj80; + Scenery* scenery; Vec3f sp50; Vec3f sp44; f32 sp40; @@ -689,13 +690,14 @@ void Venom1_80192EB0(Actor* actor) { break; case 1: var_ft4 = 0.0f; - obj80 = gObjects80; + scenery = gScenery; - for (i = 0; i < 50; i++, obj80++) { - if (((obj80->obj.id == OBJ_80_128) || (obj80->obj.id == OBJ_80_129) || (obj80->obj.id == OBJ_80_130)) && - ((actor->obj.pos.z + 1100.0f - obj80->obj.pos.z) < 2200.0f) && - ((actor->obj.pos.z + 1100.0f - obj80->obj.pos.z) > 0.0f)) { - var_ft4 = obj80->obj.pos.y; + for (i = 0; i < 50; i++, scenery++) { + if (((scenery->obj.id == OBJ_SCENERY_128) || (scenery->obj.id == OBJ_SCENERY_129) || + (scenery->obj.id == OBJ_SCENERY_130)) && + ((actor->obj.pos.z + 1100.0f - scenery->obj.pos.z) < 2200.0f) && + ((actor->obj.pos.z + 1100.0f - scenery->obj.pos.z) > 0.0f)) { + var_ft4 = scenery->obj.pos.y; break; } } @@ -801,9 +803,9 @@ void Venom1_801934D0(Actor* actor) { Animation_DrawSkeleton(0, D_VE1_900D164, actor->vwork, NULL, NULL, actor, &gIdentityMatrix); } -void Venom1_80193540(Object_80* obj80) { - if (((gPlayer[0].unk_138 - obj80->obj.pos.z) <= 3500.0f) && ((gGameFrameCount % 4) == 0)) { - func_effect_8007C120(obj80->obj.pos.x, obj80->obj.pos.y, obj80->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.2f, 10); +void Venom1_80193540(Scenery* scenery) { + if (((gPlayer[0].unk_138 - scenery->obj.pos.z) <= 3500.0f) && ((gGameFrameCount % 4) == 0)) { + func_effect_8007C120(scenery->obj.pos.x, scenery->obj.pos.y, scenery->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.2f, 10); } } @@ -1913,7 +1915,7 @@ void Venom1_80194398(Boss* boss) { boss->swork[28] = 9; AUDIO_PLAY_SFX(0x29405084, boss->sfxSource, 4); boss->swork[26] = 1; - boss->info.hitbox = gHitboxNone; + boss->info.hitbox = gNoHitbox; boss->unk_05E = 0; func_effect_8007A568(boss->obj.pos.x, boss->obj.pos.y + 10.0f, boss->obj.pos.z, 40.0f); gCameraShake = 40; @@ -2340,7 +2342,7 @@ void Venom1_80198414(void) { gBgColor = 0xFFFF; // 248, 248, 248 gNextGameState = GSTATE_PLAY; gNextLevel = LEVEL_VENOM_2; - gNextLevelStage = 2; + gNextLevelPhase = 2; D_ctx_80177C94 = gGoldRingCount[0]; D_ctx_80177C9C = gPlayer[0].shields + 1; D_ctx_80177CA4 = gHitCount; @@ -2409,6 +2411,6 @@ void Venom1_8019864C(PlayerShot* playerShot) { } } -void Venom1_801988B8(Player* player) { +void Venom1_LevelStart(Player* player) { func_hud_80096A74(player); } diff --git a/src/overlays/ovl_i2/fox_me.c b/src/overlays/ovl_i2/fox_me.c index be3b5c55..9d917b32 100644 --- a/src/overlays/ovl_i2/fox_me.c +++ b/src/overlays/ovl_i2/fox_me.c @@ -69,7 +69,7 @@ void Meteo_8018756C(Actor* actor) { vec.z = actor->vel.z; if ((Object_CheckCollision(actor->index, &actor->obj.pos, &vec, 0) != 0) || - (actor->obj.pos.y < (gGroundLevel + 20.0f))) { + (actor->obj.pos.y < (gGroundHeight + 20.0f))) { actor->obj.status = OBJ_DYING; } Meteo_80187530(actor); @@ -106,7 +106,7 @@ void Meteo_80187650(Actor* actor) { vec.y = actor->vel.y; vec.z = actor->vel.z; if ((Object_CheckCollision(actor->index, &actor->obj.pos, &vec, 0) != 0) || - (actor->obj.pos.y < (gGroundLevel + 20.0f))) { + (actor->obj.pos.y < (gGroundHeight + 20.0f))) { func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f); actor->obj.status = OBJ_DYING; } @@ -1878,7 +1878,7 @@ void Meteo_8018CCF8(Actor* actor) { } } -void Meteo_8018CD8C(Player* player) { +void Meteo_LevelStart(Player* player) { u8 sp8F; s32 i; Actor* actor0 = &gActors[0]; @@ -2065,7 +2065,7 @@ void Meteo_8018CD8C(Player* player) { if (player->timer_1F8 == 0) { AUDIO_PLAY_BGM(gBgmSeqId); - gLevelStatusScreenTimer = 80; + gLevelStartStatusScreenTimer = 80; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_1D0 = 0; player->timer_1F8 = 0; @@ -2205,7 +2205,7 @@ void Meteo_8018DF08(Actor* actor, s32 idx) { } } -void Meteo_8018E084(Player* player) { +void Meteo_LevelComplete(Player* player) { Vec3f src; Vec3f dest; s32 pad[5]; @@ -2329,7 +2329,7 @@ void Meteo_8018E084(Player* player) { if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; - D_ctx_8017837C = 4; + gFadeoutType = 4; D_play_800D3180[LEVEL_METEO] = Play_CheckMedalStatus(0xC8) + 1; } } @@ -2410,11 +2410,11 @@ void Meteo_8018E084(Player* player) { break; case 976: - D_ctx_80177830 = 1; + gShowLevelClearStatusScreen = 1; break; case 1176: - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; break; case 1300: diff --git a/src/overlays/ovl_i2/fox_sx.c b/src/overlays/ovl_i2/fox_sx.c index a8397cc9..256d58ab 100644 --- a/src/overlays/ovl_i2/fox_sx.c +++ b/src/overlays/ovl_i2/fox_sx.c @@ -473,7 +473,7 @@ void SectorX_80190078(Boss* boss) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); func_boss_80042EC0(boss); - boss->info.hitbox = gHitboxNone; + boss->info.hitbox = gNoHitbox; } boss->timer_054 = 20; @@ -1183,7 +1183,7 @@ bool SectorX_80192AF0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* Matrix_Push(&gGfxMatrix); Matrix_Push(&gCalcMatrix); Matrix_MultVec3f(gCalcMatrix, &sp64, &sp58); - func_edisplay_8005F670(&sp58); + Display_SetSecondLight(&sp58); Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, *dList); @@ -1446,7 +1446,7 @@ void SectorX_801938D8(Actor* actor, s32 arg1) { AUDIO_PLAY_SFX(0x09000002, actor->sfxSource, 0); } -void SectorX_80193A30(Player* player) { +void SectorX_LevelStart(Player* player) { s32 i; Vec3f src; Vec3f dest; @@ -1591,7 +1591,7 @@ void SectorX_80193A30(Player* player) { if (player->timer_1F8 == 0) { player->unk_0D0 = D_play_80161A54; AUDIO_PLAY_BGM(gBgmSeqId); - gLevelStatusScreenTimer = 80; + gLevelStartStatusScreenTimer = 80; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_1D0 = player->timer_1F8 = player->timer_1FC = 0; player->cam.eye.y = player->pos.y * player->unk_148 + 50.0f; @@ -1673,7 +1673,7 @@ void SectorX_801944D4(Actor* actor, s32 arg1) { } } -void SectorX_80194728(Player* player) { +void SectorX_LevelComplete(Player* player) { Vec3f sp54; Vec3f sp48; s32 pad[5]; @@ -1755,7 +1755,7 @@ void SectorX_80194728(Player* player) { gFillScreenAlphaTarget = 255; if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; - D_ctx_8017837C = 4; + gFadeoutType = 4; player->timer_1F8 = 0; Play_ClearObjectData(); D_play_800D3180[LEVEL_SECTOR_X] = Play_CheckMedalStatus(150) + 1; @@ -1766,11 +1766,11 @@ void SectorX_80194728(Player* player) { switch (gCsFrameCount) { case 706: - D_ctx_80177830 = 1; + gShowLevelClearStatusScreen = 1; break; case 906: - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; break; case 100: @@ -1794,7 +1794,7 @@ void SectorX_80194728(Player* player) { break; case 910: - gOverlayStage = 1; + gSceneSetup = 1; break; case 920: diff --git a/src/overlays/ovl_i3/fox_a6.c b/src/overlays/ovl_i3/fox_a6.c index 86b39cbc..80b7722e 100644 --- a/src/overlays/ovl_i3/fox_a6.c +++ b/src/overlays/ovl_i3/fox_a6.c @@ -2273,7 +2273,7 @@ void Area6_8018DA58(Actor* actor) { actor->obj.rot.z = -actor->unk_0F4.z; } -void Area6_8018DF74(Player* player) { +void Area6_LevelStart(Player* player) { Vec3f sp74; Vec3f sp68; Vec3f sp5C; @@ -2373,7 +2373,7 @@ void Area6_8018DF74(Player* player) { } if (gCsFrameCount == 540) { gLoadLevelObjects = 1; - gLevelStatusScreenTimer = 50; + gLevelStartStatusScreenTimer = 50; player->pos.x = 0.0f; player->pos.z = 0.0f; player->pos.y = 350.0f; @@ -2537,7 +2537,7 @@ void Area6_8018EC38(Actor* actor, s32 arg1) { } } -void Area6_8018ED78(Player* player) { +void Area6_LevelComplete(Player* player) { s32 i; Vec3f spf90; f32 sp8C; @@ -2763,10 +2763,10 @@ void Area6_8018ED78(Player* player) { gLevelClearScreenTimer = 100; break; case 700: - D_ctx_80177830 = 1; + gShowLevelClearStatusScreen = 1; break; case 900: - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; break; case 940: Radio_PlayMessage(gMsg_ID_7093, RCID_FOX); diff --git a/src/overlays/ovl_i3/fox_aq.c b/src/overlays/ovl_i3/fox_aq.c index 4e98a895..a5531d11 100644 --- a/src/overlays/ovl_i3/fox_aq.c +++ b/src/overlays/ovl_i3/fox_aq.c @@ -417,7 +417,7 @@ void Aquas_801A9728(Actor* actor, f32 radius, f32 scale, s32 spread) { for (i = 0; i < 36; i += spread) { temp_fs1 = SIN_DEG(i * 10.0f) * radius; temp_fs0 = COS_DEG(i * 10.0f) * radius; - temp = gGroundLevel + 30.0f; + temp = gGroundHeight + 30.0f; func_effect_8007B8F8(actor->obj.pos.x + temp_fs1, temp, actor->obj.pos.z + temp_fs0, scale); } } @@ -794,7 +794,7 @@ void Aquas_801AA8E8(Player* player) { Math_SmoothStepToF(&player->unk_030, var_fv0, 0.05f, 1.0f, 0.05f); - if (player->pos.y < (gGroundLevel + 50.0f)) { + if (player->pos.y < (gGroundHeight + 50.0f)) { Math_SmoothStepToF(&player->unk_02C, var_fv1 * 0.3f, 0.05f, 1.0f, 0.05f); } else { Math_SmoothStepToF(&player->unk_02C, var_fv1, 0.05f, 2.0f, 0.05f); @@ -919,7 +919,7 @@ void Aquas_801AACF8(Player* player) { sp58 = D_i3_801C41B8[4] * 0.8f; D_ctx_80177968 = 10.0f; - if (player->pos.y < (gGroundLevel + 50.0f)) { + if (player->pos.y < (gGroundHeight + 50.0f)) { if (sp58 <= 0.0f) { sp58 = 0.0f; D_ctx_80177968 = 2.0f; @@ -1007,7 +1007,7 @@ void Aquas_801AACF8(Player* player) { if (player->pos.y > (player->unk_0B0 + (player->unk_0A0 - 100.0f))) { player->flags_228 = PFLAG_228_3; } - if (player->pos.y <= (gGroundLevel + 100)) { + if (player->pos.y <= (gGroundHeight + 100)) { player->flags_228 = PFLAG_228_2; } @@ -1076,8 +1076,8 @@ void Aquas_801ABA40(PlayerShot* shot) { shot->unk_64 = 0; } - if (shot->obj.pos.y < gGroundLevel) { - shot->obj.pos.y = gGroundLevel + 2.0f; + if (shot->obj.pos.y < gGroundHeight) { + shot->obj.pos.y = gGroundHeight + 2.0f; func_beam_800365E4(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.0f, 90.0f, 2.0f, 0, 0); func_effect_8007CF30(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 1.2f); @@ -1148,20 +1148,20 @@ void Aquas_801ABA40(PlayerShot* shot) { shot->vel.x = sp54.x; shot->vel.y = sp54.y; shot->vel.z = sp54.z; - if ((shot->obj.pos.y < (gGroundLevel + 30.0f)) && (shot->vel.y < 0.0f) && (D_i3_801C4190[3] != 0)) { + if ((shot->obj.pos.y < (gGroundHeight + 30.0f)) && (shot->vel.y < 0.0f) && (D_i3_801C4190[3] != 0)) { shot->vel.y = 0.0f; } break; } if (D_i3_801C4454 < 297) { - D_ctx_80178370 = shot->obj.pos.x; - D_ctx_80178374 = shot->obj.pos.y; - D_ctx_80178378 = shot->obj.pos.z; - D_ctx_80178360 = 255; - D_ctx_80178364 = 200; - D_ctx_80178368 = 150; - Math_SmoothStepToF(&D_ctx_8017836C, 0.8f, 1.0f, 0.08f, 0.001f); + gLight3x = shot->obj.pos.x; + gLight3y = shot->obj.pos.y; + gLight3z = shot->obj.pos.z; + gLight3R = 255; + gLight3G = 200; + gLight3B = 150; + Math_SmoothStepToF(&gLight3Brightness, 0.8f, 1.0f, 0.08f, 0.001f); } if (D_i3_801C4454 != 0) { @@ -1182,7 +1182,7 @@ void Aquas_801AC09C(Player* player) { D_i3_801C4454 = 300; D_i3_801C4458 = -100.0f; D_i3_801C445C = 0.1f; - D_ctx_8017836C = 1.0f; + gLight3Brightness = 1.0f; break; } } @@ -1296,23 +1296,23 @@ void Aquas_801AC274(Player* player) { } if (D_i3_801C4190[5] == 0) { - D_ctx_80178370 = player->pos.x; - D_ctx_80178374 = player->pos.y - 5.0f; - D_ctx_80178378 = player->unk_138 - 60.0f; + gLight3x = player->pos.x; + gLight3y = player->pos.y - 5.0f; + gLight3z = player->unk_138 - 60.0f; - D_ctx_80178360 += 4; - D_ctx_80178364 += 3; - D_ctx_80178368 += 2; - if (D_ctx_80178360 >= 255) { - D_ctx_80178360 = 255; + gLight3R += 4; + gLight3G += 3; + gLight3B += 2; + if (gLight3R >= 255) { + gLight3R = 255; } - if (D_ctx_80178364 > 200) { - D_ctx_80178364 = 200; + if (gLight3G > 200) { + gLight3G = 200; } - if (D_ctx_80178368 > 150) { - D_ctx_80178368 = 150; + if (gLight3B > 150) { + gLight3B = 150; } - Math_SmoothStepToF(&D_ctx_8017836C, 0.2f, 1.0f, 0.04f, 0.001f); + Math_SmoothStepToF(&gLight3Brightness, 0.2f, 1.0f, 0.04f, 0.001f); } } @@ -1468,21 +1468,21 @@ void Aquas_801ACE50(Player* player) { } if (!(gBrakeButton[player->num] & gInputHold->button) && !(gBoostButton[player->num] & gInputHold->button)) { - player->unk_2B4 = 1; - if (player->unk_2BC == 0.0f) { - player->unk_2B4 = 0; + player->boostCooldown = 1; + if (player->boostMeter == 0.0f) { + player->boostCooldown = 0; } } if ((gBoostButton[player->num] & gInputHold->button) && (player->unk_230 == 0) && - (player->state_1C8 != PLAYERSTATE_1C8_U_TURN) && (player->unk_2B4 == 0)) { - if (player->unk_2BC == 0) { + (player->state_1C8 != PLAYERSTATE_1C8_U_TURN) && (player->boostCooldown == 0)) { + if (player->boostMeter == 0) { AUDIO_PLAY_SFX(0x09004030, player->sfxSource, 4); } - player->unk_2BC += 3.0f; - if (player->unk_2BC > 90.0f) { - player->unk_2BC = 90.0f; - player->unk_2B4 = 1; + player->boostMeter += 3.0f; + if (player->boostMeter > 90.0f) { + player->boostMeter = 90.0f; + player->boostCooldown = 1; } player->unk_110 += 2.0f; if (player->unk_110 > 10.0f) { @@ -1494,11 +1494,11 @@ void Aquas_801ACE50(Player* player) { Math_SmoothStepToF(&D_ctx_801779A8[0], 50.0f, 1.0f, 10.0f, 0.0f); } else { D_i3_801C41B8[27] = 0.0f; - if (player->unk_2BC > 0.0f) { - player->unk_2BC -= 0.50f; - if (player->unk_2BC <= 0.0f) { - player->unk_2BC = 0.0f; - player->unk_2B4 = 0; + if (player->boostMeter > 0.0f) { + player->boostMeter -= 0.50f; + if (player->boostMeter <= 0.0f) { + player->boostMeter = 0.0f; + player->boostCooldown = 0; } } if (player->unk_110 > 0.0f) { @@ -1515,14 +1515,14 @@ void Aquas_801ACE50(Player* player) { void Aquas_801AD328(Player* player) { player->sfx.brake = 0; if ((gBrakeButton[player->num] & gInputHold->button) && (player->unk_230 == 0) && - (player->state_1C8 != PLAYERSTATE_1C8_U_TURN) && (player->unk_2B4 == 0)) { - if (player->unk_2BC == 0) { + (player->state_1C8 != PLAYERSTATE_1C8_U_TURN) && (player->boostCooldown == 0)) { + if (player->boostMeter == 0) { AUDIO_PLAY_SFX(0x09004031, player->sfxSource, 4); } - player->unk_2BC += 3.0f; - if (player->unk_2BC > 90.0f) { - player->unk_2BC = 90.0f; - player->unk_2B4 = 1; + player->boostMeter += 3.0f; + if (player->boostMeter > 90.0f) { + player->boostMeter = 90.0f; + player->boostCooldown = 1; } player->unk_110 -= 1.0f; if (player->unk_110 < -20.0f) { @@ -1533,11 +1533,11 @@ void Aquas_801AD328(Player* player) { player->sfx.brake = 1; Math_SmoothStepToF(&D_ctx_801779A8[0], 25.0f, 1.0f, 5.0f, 0.0f); } else { - if (player->unk_2BC > 0.0f) { - player->unk_2BC -= 0.5f; - if (player->unk_2BC <= 0.0f) { - player->unk_2BC = 0.0f; - player->unk_2B4 = 0; + if (player->boostMeter > 0.0f) { + player->boostMeter -= 0.5f; + if (player->boostMeter <= 0.0f) { + player->boostMeter = 0.0f; + player->boostCooldown = 0; D_i3_801C41B8[28] = 0.0f; } @@ -2245,7 +2245,7 @@ void Aquas_801AFA5C(Actor* actor) { AUDIO_PLAY_SFX(0x1902102F, actor->sfxSource, 4); break; case 5: - if (actor->obj.pos.y > (gGroundLevel + 70.0f)) { + if (actor->obj.pos.y > (gGroundHeight + 70.0f)) { Math_SmoothStepToF(&actor->fwork[0], 1.0f, 0.1f, 0.2f, 0.0001f); Math_SmoothStepToF(&actor->fwork[1], 1.0f, 0.1f, 0.2f, 0.0001f); Math_SmoothStepToF(&actor->fwork[2], 1.0f, 0.1f, 0.2f, 0.0001f); @@ -2267,7 +2267,7 @@ void Aquas_801AFA5C(Actor* actor) { for (i = 0; i < 36; i += 2) { sp6C = __sinf(sp70 + (i * 10.0f * M_DTOR)) * actor->fwork[6] * 10.0f; sp68 = __cosf(sp70 + (i * 10.0f * M_DTOR)) * actor->fwork[6] * 10.0f; - pad64 = gGroundLevel + 30.0f; + pad64 = gGroundHeight + 30.0f; func_effect_8007B8F8(actor->obj.pos.x + sp6C, pad64, actor->obj.pos.z + sp68, 20.0f); } } @@ -2288,8 +2288,8 @@ void Aquas_801AFA5C(Actor* actor) { Math_SmoothStepToF(&actor->obj.pos.y, -300.0f, 0.1f, 1.0f, 0.001f); if (actor->fwork[0] <= 0.2f) { for (i = 0; i < 5; i++) { - func_effect_8007BC7C(actor->obj.pos.x, gGroundLevel + 50.0f, actor->obj.pos.z, 20.0f); - Aquas_801AC8A8(actor->obj.pos.x + RAND_FLOAT_CENTERED(300.0f), gGroundLevel + (i * 20.0f), + func_effect_8007BC7C(actor->obj.pos.x, gGroundHeight + 50.0f, actor->obj.pos.z, 20.0f); + Aquas_801AC8A8(actor->obj.pos.x + RAND_FLOAT_CENTERED(300.0f), gGroundHeight + (i * 20.0f), actor->obj.pos.z, 5.0f, 2); } if (gBosses[0].state < 13) { @@ -2810,7 +2810,7 @@ void Aquas_801B134C(Boss* bossAQ) { for (i3 = 0; i3 < 9; i3++) { var_fs0 = SIN_DEG((27 + 2 * i3) * (10.0f + 3 * i2)) * var_fs3 * 10.0f; var_fs1 = COS_DEG((27 + 2 * i3) * (10.0f + 3 * i2)) * var_fs3 * 10.0f; - temp3 = gGroundLevel + 30.0f; + temp3 = gGroundHeight + 30.0f; func_effect_8007B8F8(bossAQ->obj.pos.x + var_fs0, temp3, bossAQ->obj.pos.z + 1000.0f + var_fs1, 20.0f); } @@ -2825,14 +2825,14 @@ void Aquas_801B134C(Boss* bossAQ) { Math_SmoothStepToF(D_ctx_801779A8, 20.0f, 1.0f, 5.0f, 0.0f); } if (bossAQ->timer_058 != 0) { - gPlayer[0].unk_2B4 = 1; + gPlayer[0].boostCooldown = 1; Math_SmoothStepToF(&D_i3_801C41B8[24], 20.0f, 0.1f, 1.0f, 0.0f); Math_SmoothStepToF(&gPlayer[0].unk_08C, 180.0f, 0.4f, 20.0f, 0.0f); } else { Math_SmoothStepToF(&D_i3_801C41B8[24], 0.0f, 0.01f, 0.1f, 0.0f); Math_SmoothStepToF(&gPlayer[0].unk_08C, 0.0f, 0.1f, 2.0f, 0.0f); if (gPlayer[0].unk_08C < 0.1f) { - gPlayer[0].unk_2B4 = 0; + gPlayer[0].boostCooldown = 0; gPlayer[0].unk_08C = D_i3_801C41B8[24] = 0.0f; bossAQ->swork[AQ_SWK_0] = 0; } @@ -3466,7 +3466,7 @@ bool Aquas_801B42AC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, MTXF_APPLY); if (*dList != NULL) { Matrix_MultVec3f(gCalcMatrix, &sp6C, &sp60); - func_edisplay_8005F670(&sp60); + Display_SetSecondLight(&sp60); Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_Push(&gGfxMatrix); Matrix_Scale(gGfxMatrix, sp5C, sp58, sp54, MTXF_APPLY); @@ -3698,7 +3698,7 @@ void Aquas_801B50E8(Actor* actor) { actor->state = 3; actor->vel.y = 30.0f; } else if (((gGameFrameCount % 16) == 0)) { - func_effect_8007B8F8(actor->obj.pos.x, gGroundLevel + 30.0f, actor->obj.pos.z, 10.0f); + func_effect_8007B8F8(actor->obj.pos.x, gGroundHeight + 30.0f, actor->obj.pos.z, 10.0f); } break; @@ -3856,7 +3856,7 @@ bool Aquas_801B5C18(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, MTXF_APPLY); if (*dList != NULL) { Matrix_MultVec3f(gCalcMatrix, &sp4C, &sp58); - func_edisplay_8005F670(&sp58); + Display_SetSecondLight(&sp58); Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_Push(&gGfxMatrix); Matrix_Scale(gGfxMatrix, sp6C, sp68, sp64, MTXF_APPLY); @@ -3907,7 +3907,7 @@ void Aquas_801B5F68(s32 limbIndex, Vec3f* rot, void* thisx) { sp30.z = 0.0f; Matrix_MultVec3f(gCalcMatrix, &sp30, &sp24); this->fwork[8] = sp24.x; - this->fwork[9] = gGroundLevel; + this->fwork[9] = gGroundHeight; this->fwork[10] = sp24.z; break; case 8: @@ -4250,9 +4250,9 @@ void Aquas_801B6FF8(Actor* actor) { actor->timer_0C6 = 15; actor->health -= actor->damage; for (i = 0; i < 10; i++) { - func_effect_80081A8C(actor->unk_0D8.x + RAND_FLOAT_CENTERED(70.0f), - actor->unk_0D8.y + RAND_FLOAT_CENTERED(70.0f), - actor->unk_0D8.z + RAND_FLOAT_CENTERED(70.0f), 1.0f, 1); + func_effect_80081A8C(actor->hitPos.x + RAND_FLOAT_CENTERED(70.0f), + actor->hitPos.y + RAND_FLOAT_CENTERED(70.0f), + actor->hitPos.z + RAND_FLOAT_CENTERED(70.0f), 1.0f, 1); } AUDIO_PLAY_SFX(0x2903408F, actor->sfxSource, 4); if (actor->health <= -100) { @@ -4440,7 +4440,7 @@ void Aquas_801B7C78(Actor* actor) { Math_SmoothStepToF(&actor->fwork[6], 255.0f, 0.1f, 10.0f, 0); } if (((actor->state < 5) || (actor->state == 7)) && (actor->health != 0) && ((gGameFrameCount % 16) == 0)) { - func_effect_8007B8F8(actor->vwork[22].x, gGroundLevel, actor->vwork[22].z, 5.0f); + func_effect_8007B8F8(actor->vwork[22].x, gGroundHeight, actor->vwork[22].z, 5.0f); } Math_SmoothStepToF(&actor->fwork[1], actor->fwork[2], 0.1f, 2.0f, 0.00001f); @@ -5165,7 +5165,7 @@ void Aquas_801BA6A4(Actor* actor) { actor->fwork[1] += 10.0f; actor->vel.x = SIN_DEG(actor->fwork[1]) * 10.0f; - if (actor->obj.pos.y < (gGroundLevel + 30.0f)) { + if (actor->obj.pos.y < (gGroundHeight + 30.0f)) { AUDIO_PLAY_SFX(0x19400007, actor->sfxSource, 4); actor->iwork[1] = 1; actor->vel.x = actor->vel.y = actor->vel.z = 0.0f; @@ -5189,7 +5189,7 @@ void Aquas_801BA6A4(Actor* actor) { Math_SmoothStepToF(&actor->vel.y, -7.0f, 0.1f, 1.0f, 0.0001f); - if (actor->obj.pos.y < (gGroundLevel + 20.0f)) { + if (actor->obj.pos.y < (gGroundHeight + 20.0f)) { actor->gravity = 0.0f; if (actor->vel.y < 0.0f) { actor->vel.y = 0.0f; @@ -5467,7 +5467,7 @@ void Aquas_801BB79C(Actor* actor) { Vec3f sp74; Actor* sp70; Actor* sp6C; - Object_80* actor122; + Scenery* actor122; if (actor->timer_0C0 == 0) { switch (actor->iwork[18]) { @@ -5483,8 +5483,8 @@ void Aquas_801BB79C(Actor* actor) { actor->iwork[20] = 50; } } else { - for (i = 0, actor122 = gObjects80; i < 50; i++, actor122++) { - if ((actor122->obj.status == OBJ_ACTIVE) && (actor122->obj.id == OBJ_80_122) && + for (i = 0, actor122 = gScenery; i < 50; i++, actor122++) { + if ((actor122->obj.status == OBJ_ACTIVE) && (actor122->obj.id == OBJ_SCENERY_122) && Object_CheckHitboxCollision(&actor->obj.pos, actor122->info.hitbox, &actor122->obj, 0.0f, 0.0f, 0.0f) && (actor->iwork[20] == 0)) { @@ -5509,11 +5509,11 @@ void Aquas_801BB79C(Actor* actor) { actor->iwork[20] = 50; } } else { - for (i = 0, actor122 = gObjects80; i < 50; i++, actor122++) { - if ((actor122->obj.status == OBJ_ACTIVE) && (actor122->obj.id == OBJ_80_122) && + for (i = 0, actor122 = gScenery; i < 50; i++, actor122++) { + if ((actor122->obj.status == OBJ_ACTIVE) && (actor122->obj.id == OBJ_SCENERY_122) && (Object_CheckHitboxCollision(&actor->obj.pos, actor122->info.hitbox, &actor122->obj, 0.0f, 0.0f, 0.0f) || - (actor->obj.pos.y < (gGroundLevel + 30.0f))) && + (actor->obj.pos.y < (gGroundHeight + 30.0f))) && (actor->iwork[20] == 0)) { actor->iwork[20] = 50; actor->iwork[19]++; @@ -5811,7 +5811,7 @@ bool Aquas_801BC530(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th if (*dList != NULL) { Matrix_MultVec3f(gCalcMatrix, &sp64, &sp58); - func_edisplay_8005F670(&sp58); + Display_SetSecondLight(&sp58); Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_Push(&gGfxMatrix); Matrix_Scale(gGfxMatrix, sp54, sp50, sp4C, MTXF_APPLY); @@ -5977,7 +5977,7 @@ void Aquas_801BC9A0(Actor* actor) { actor->obj.pos.z + RAND_FLOAT_CENTERED(200.0f), 6.0f, 2); } - if ((actor->obj.pos.y < (gGroundLevel + 30.0f)) && (actor->iwork[2] == 0)) { + if ((actor->obj.pos.y < (gGroundHeight + 30.0f)) && (actor->iwork[2] == 0)) { actor->iwork[2] = 1; actor->vel.x = actor->vel.y = actor->vel.z = actor->gravity = 0.0f; func_effect_8007A6F0(&actor->obj.pos, 0x19400007); @@ -6134,8 +6134,8 @@ void Aquas_801BD54C(Actor* actor) { break; case 2: - if (actor->obj.pos.y < gGroundLevel + 30.0f) { - actor->obj.pos.y = gGroundLevel + 30.0f; + if (actor->obj.pos.y < gGroundHeight + 30.0f) { + actor->obj.pos.y = gGroundHeight + 30.0f; } if ((actor->iwork[2] != 0) || (actor->timer_0BE != 0)) { @@ -6150,8 +6150,8 @@ void Aquas_801BD54C(Actor* actor) { actor->timer_0BC = 60; actor->fwork[1] = RAND_FLOAT_CENTERED(300.0f); actor->fwork[2] = 50.0f + RAND_FLOAT_CENTERED(100.0f); - if (actor->fwork[2] < gGroundLevel + 30.0f) { - actor->fwork[2] = gGroundLevel + 30.0f; + if (actor->fwork[2] < gGroundHeight + 30.0f) { + actor->fwork[2] = gGroundHeight + 30.0f; } actor->iwork[1]++; actor->iwork[1] &= 3; @@ -6337,8 +6337,8 @@ void Aquas_801BE0F0(Actor* actor) { gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); } -// OBJ_80_126 draw -void Aquas_801BE1FC(Object_80* obj80) { +// OBJ_SCENERY_126 draw +void Aquas_801BE1FC(Scenery* scenery) { Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_AQ_600EEF0); diff --git a/src/overlays/ovl_i3/fox_so.c b/src/overlays/ovl_i3/fox_so.c index f982e8ea..abf5560d 100644 --- a/src/overlays/ovl_i3/fox_so.c +++ b/src/overlays/ovl_i3/fox_so.c @@ -953,7 +953,7 @@ void Solar_801A0FD4(Actor* actor, s32 index) { } } -void Solar_801A10F4(Player* player) { +void Solar_LevelStart(Player* player) { s32 i; Vec3f sp50; Vec3f sp44; @@ -1051,7 +1051,7 @@ void Solar_801A10F4(Player* player) { Audio_KillSfxBySourceAndId(player->sfxSource, 0x3140807E); AUDIO_PLAY_BGM(SEQ_ID_INTRO_51); func_display_80057814(player); - func_8001C8B8(gPlayerNum); + Audio_StartPlayerNoise(gPlayerNum); D_ctx_80177A48[0] = 0.01f; } break; @@ -1114,7 +1114,7 @@ void Solar_801A10F4(Player* player) { player->pos.z = 0.0f; player->unk_0D0 = D_play_80161A54; Play_ClearObjectData(); - gLevelStatusScreenTimer = 50; + gLevelStartStatusScreenTimer = 50; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_1D0 = 0; player->pos.y = 350.0f; @@ -1802,7 +1802,7 @@ void Solar_801A3C4C(Boss* bossSO) { bossSO->state = 0; bossSO->swork[SO_SWK_1] = 1; bossSO->fwork[SO_FWK_0] = 0.01f; - bossSO->info.hitbox = SEGMENTED_TO_VIRTUAL(gHitboxNone); + bossSO->info.hitbox = SEGMENTED_TO_VIRTUAL(gNoHitbox); bossSO->timer_058 = 20000; D_ctx_8017796C = -1; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 255; @@ -2800,7 +2800,7 @@ void Solar_801A7750(void) { } } -void Solar_801A7930(Player* player) { +void Solar_LevelComplete(Player* player) { s32 i; f32 sp78; f32 sp74; @@ -2894,7 +2894,7 @@ void Solar_801A7930(Player* player) { player->pos.z = -(D_ctx_80177D20 - 500.0f); player->unk_1D0++; player->wings.modelId = 1; - func_8001C8B8(0); + Audio_StartPlayerNoise(0); AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); D_ctx_80177A98 = 1; Play_ClearObjectData(); @@ -3020,7 +3020,7 @@ void Solar_801A7930(Player* player) { Audio_FadeOutAll(10); player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; - D_ctx_8017837C = 4; + gFadeoutType = 4; D_play_800D3180[LEVEL_SOLAR] = Play_CheckMedalStatus(100) + 1; } } @@ -3073,10 +3073,10 @@ void Solar_801A7930(Player* player) { } break; case 1186: - D_ctx_80177830 = 1; + gShowLevelClearStatusScreen = 1; break; case 1386: - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; break; case 1460: AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); diff --git a/src/overlays/ovl_i3/fox_zo.c b/src/overlays/ovl_i3/fox_zo.c index 00eaf94d..bc1163af 100644 --- a/src/overlays/ovl_i3/fox_zo.c +++ b/src/overlays/ovl_i3/fox_zo.c @@ -1007,7 +1007,7 @@ void Zoness_80191680(Actor* actor) { sp54 = Math_RadToDeg(Math_Atan2F(sp64, sp5C)); otherActor = &gActors[actor->iwork[0]]; if ((actor->state != 0) || (otherActor->obj.status == OBJ_FREE)) { - actor->timer_0CA[0] = 0; + actor->lockOnTimers[0] = 0; actor->info.unk_1C = 0.0f; sp54 += 180.0f; if (sp54 > 360.0f) { @@ -4412,7 +4412,7 @@ void Zoness_8019D15C(Actor* actor) { actor->unk_0D0 = 0; if (actor->unk_0D2 < 2) { AUDIO_PLAY_SFX(0x1903001E, actor->sfxSource, 4); - if ((actor->obj.pos.y + 268.0f) < actor->unk_0D8.y) { + if ((actor->obj.pos.y + 268.0f) < actor->hitPos.y) { actor->fwork[1] = 20.0f; } else { actor->fwork[1] = -20.0f; @@ -4466,7 +4466,7 @@ void Zoness_8019D3C4(Actor* actor) { Animation_DrawSkeleton(1, D_ZO_601FC90, sp28, Zoness_8019D340, NULL, actor, &gIdentityMatrix); } -void Zoness_8019D428(Player* player) { +void Zoness_LevelStart(Player* player) { s32 sp2C; player->unk_088 += 10.0f; @@ -4494,7 +4494,7 @@ void Zoness_8019D428(Player* player) { sp2C = gControllerHold[gMainController].button; gControllerHold[gMainController].button = gBoostButton[gMainController]; player->timer_1F8 = 60; - player->unk_2BC = 1.0f; + player->boostMeter = 1.0f; func_play_800B2574(player); if (gCsFrameCount > 195) { D_ctx_801779A8[0] = 50.0f; @@ -4504,7 +4504,7 @@ void Zoness_8019D428(Player* player) { gControllerHold[gMainController].button = sp2C; if (gCsFrameCount >= 270) { AUDIO_PLAY_BGM(SEQ_ID_ZONESS | SEQ_FLAG); - gLevelStatusScreenTimer = 80; + gLevelStartStatusScreenTimer = 80; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_1D0 = 0; player->timer_1F8 = 0; @@ -4516,7 +4516,7 @@ void Zoness_8019D428(Player* player) { D_ctx_80177CE8 += 40.0f; } -void Zoness_8019D76C(Player* player) { +void Zoness_LevelComplete(Player* player) { f32 temp_fa0; f32 temp_ft5; f32 dx; @@ -4600,7 +4600,7 @@ void Zoness_8019D76C(Player* player) { player->pos.y = 200.0f; player->pos.z = -(D_ctx_80177D20 + 1500.0f); player->unk_1D0++; - func_8001C8B8(0); + Audio_StartPlayerNoise(0); AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); D_ctx_80177A98 = 1; Play_ClearObjectData(); @@ -4676,7 +4676,7 @@ void Zoness_8019D76C(Player* player) { Audio_FadeOutAll(10); player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; - D_ctx_8017837C = 4; + gFadeoutType = 4; D_play_800D3180[LEVEL_ZONESS] = Play_CheckMedalStatus(250) + 1; } } @@ -4737,10 +4737,10 @@ void Zoness_8019D76C(Player* player) { } break; case 906: - D_ctx_80177830 = 1; + gShowLevelClearStatusScreen = 1; break; case 1106: - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; break; case 1180: AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); diff --git a/src/overlays/ovl_i4/fox_bo.c b/src/overlays/ovl_i4/fox_bo.c index 3e63b8f3..dcf0f275 100644 --- a/src/overlays/ovl_i4/fox_bo.c +++ b/src/overlays/ovl_i4/fox_bo.c @@ -195,21 +195,21 @@ void Bolse_8018BEF8(Actor* actor, s32 arg1) { } } -void Bolse_8018C158(Actor* actor) { +void Bolse_UpdateEventHandler(Actor* this) { s32 i; Player* player = &gPlayer[0]; s32 pad; - Actor* actorPtr; + Actor* actor; - D_bg_800C9C34 = 1; + gBolseDynamicGround = true; D_i4_801A0530++; - switch (actor->state) { + switch (this->state) { case 0: D_360_800C9B4C = 500000; gAllRangeEventTimer = 0; gStarWolfMsgTimer = 0; - actor->state = 2; + this->state = 2; if (gAllRangeCheckpoint == 0) { gBosses[0].fwork[1] = 0.3f; @@ -219,7 +219,7 @@ void Bolse_8018C158(Actor* actor) { gHitCount = gSavedHitCount; gBosses[1].state = 2; gAllRangeEventTimer = 3000; - actor->iwork[1] = gHitCount; + this->iwork[1] = gHitCount; } for (i = 0; i < 6; i++) { @@ -227,7 +227,7 @@ void Bolse_8018C158(Actor* actor) { } case 2: - Bolse_8018BD60(actor); + Bolse_8018BD60(this); switch (gAllRangeEventTimer) { case 300: @@ -254,7 +254,7 @@ void Bolse_8018C158(Actor* actor) { } if ((D_i4_801A0530 < 9600) && (D_i4_801A0530 & 0x400)) { - Bolse_8018BEF8(actor, 8); + Bolse_8018BEF8(this, 8); } if (gBosses[2].state == 10) { @@ -268,23 +268,23 @@ void Bolse_8018C158(Actor* actor) { gPlayer[0].unk_000 = 0.0f; } AllRange_ClearRadio(); - actor->state = 6; - AUDIO_PLAY_SFX(0x31009063, actor->sfxSource, 0); - AUDIO_PLAY_SFX(0x2940D09A, actor->sfxSource, 4); + this->state = 6; + AUDIO_PLAY_SFX(0x31009063, this->sfxSource, 0); + AUDIO_PLAY_SFX(0x2940D09A, this->sfxSource, 4); gScreenFlashTimer = 8; - for (actorPtr = &gActors[10], i = 0; i < 20; i++, actorPtr++) { - if (actorPtr->obj.status == OBJ_ACTIVE) { - actorPtr->obj.status = OBJ_DYING; - actorPtr->timer_0BC = 30; + for (actor = &gActors[10], i = 0; i < 20; i++, actor++) { + if (actor->obj.status == OBJ_ACTIVE) { + actor->obj.status = OBJ_DYING; + actor->timer_0BC = 30; } } } if ((gBosses[1].state == 2) && (gBosses[1].obj.status == OBJ_ACTIVE)) { - actor->iwork[1] = gHitCount; - actor->state = 10; - actor->timer_0BC = 150; + this->iwork[1] = gHitCount; + this->state = 10; + this->timer_0BC = 150; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_STANDBY; AUDIO_PLAY_BGM(SEQ_ID_BO_BOSS | SEQ_FLAG); AllRange_ClearRadio(); @@ -297,10 +297,9 @@ void Bolse_8018C158(Actor* actor) { for (i = 10; i < 30; i++) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); } - } else if ((gAllRangeCheckpoint == 1) && - (((gHitCount - actor->iwork[1]) >= 5) || (D_i4_801A0530 == 4000))) { + } else if ((gAllRangeCheckpoint == 1) && (((gHitCount - this->iwork[1]) >= 5) || (D_i4_801A0530 == 4000))) { gAllRangeCheckpoint = 2; - actor->iwork[1] = gHitCount; + this->iwork[1] = gHitCount; if ((gStarWolfTeamAlive[0] != 0) || (gStarWolfTeamAlive[1] != 0) || (gStarWolfTeamAlive[2] != 0) || (gStarWolfTeamAlive[3] != 0)) { D_360_800C9B4C = gAllRangeEventTimer + 120; @@ -310,31 +309,31 @@ void Bolse_8018C158(Actor* actor) { break; case 3: - D_bg_800C9C34 = 0; + gBolseDynamicGround = false; for (i = 0; i < 4; i++) { if (gStarWolfTeamAlive[i] != 0) { - actorPtr = &gActors[i + 4]; + actor = &gActors[i + 4]; break; } if (i == 3) { - actor->state = 2; + this->state = 2; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; return; } } - player->cam.eye.x += actorPtr->vel.x * 0.23f; - player->cam.eye.y += actorPtr->vel.y * 0.23f; - player->cam.eye.z += actorPtr->vel.z * 0.23f; + player->cam.eye.x += actor->vel.x * 0.23f; + player->cam.eye.y += actor->vel.y * 0.23f; + player->cam.eye.z += actor->vel.z * 0.23f; - Math_SmoothStepToF(&player->cam.at.x, actorPtr->obj.pos.x, 1.0f, 20000.0f, 0.0f); - Math_SmoothStepToF(&player->cam.at.y, actorPtr->obj.pos.y, 1.0f, 20000.0f, 0.0f); - Math_SmoothStepToF(&player->cam.at.z, actorPtr->obj.pos.z, 1.0f, 20000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.x, actor->obj.pos.x, 1.0f, 20000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.y, actor->obj.pos.y, 1.0f, 20000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.z, actor->obj.pos.z, 1.0f, 20000.0f, 0.0f); Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 0.2f, 0); if ((gControllerPress->button & START_BUTTON) || ((D_360_800C9B4C + 300) == gAllRangeEventTimer)) { - actor->state = 2; + this->state = 2; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; func_play_800B7184(player, 1); player->unk_014 = 0.0f; @@ -368,7 +367,7 @@ void Bolse_8018C158(Actor* actor) { Math_SmoothStepToF(&player->camRoll, 0.0f, 1.0f, 1000.0f, 0); - if (actor->timer_0BC == 130) { + if (this->timer_0BC == 130) { Radio_PlayMessage(gMsg_ID_11060, RCID_FALCO); gAllRangeCheckpoint = 1; gSavedHitCount = gHitCount; @@ -377,18 +376,18 @@ void Bolse_8018C158(Actor* actor) { } } - if ((actor->timer_0BC % 8) == 0) { - Bolse_8018BEF8(actor, 15); + if ((this->timer_0BC % 8) == 0) { + Bolse_8018BEF8(this, 15); } - if (!actor->timer_0BC) { + if (!this->timer_0BC) { gAllRangeEventTimer = 3000; - actor->state = 2; + this->state = 2; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; func_play_800B7184(player, 1); player->unk_014 = 0.0f; Audio_KillSfxBySource(gBosses[1].sfxSource); - actor->iwork[1] = gHitCount; + this->iwork[1] = gHitCount; } break; @@ -629,7 +628,7 @@ bool Bolse_8018D278(Actor* actor) { Object_Kill(&actor->obj, actor->sfxSource); actor->info.bonus = 0; - actor->timer_0CA[0] = 0; + actor->lockOnTimers[0] = 0; actor->info.unk_1C = 0.0f; return true; @@ -744,7 +743,7 @@ void Bolse_8018D7F0(Actor* actor) { Bolse_8018D4F0(actor); Bolse_8018D584(actor); } else { - actor->timer_0CA[0] = 0; + actor->lockOnTimers[0] = 0; actor->info.bonus = 0; actor->info.unk_1C = 0.0f; } @@ -1132,7 +1131,7 @@ f32 D_i4_8019F078[] = { -30.0f, -60.0f, -90.0f }; f32 D_i4_8019F084[] = { 200.0f, 260.0f, 400.0f }; f32 D_i4_8019F090[] = { 70.0f, -80.0f, -65.0f }; -void Bolse_8018EF6C(Player* player) { +void Bolse_LevelStart(Player* player) { s32 i; f32 sp60 = 0.0f; Vec3f sp54; @@ -1150,7 +1149,7 @@ void Bolse_8018EF6C(Player* player) { gAmbientG = 15; gAmbientB = 30; - D_ctx_80178410 = 1000; + gStarCount = 1000; gCsFrameCount = 0; @@ -1269,7 +1268,7 @@ void Bolse_8018EF6C(Player* player) { gCsCamAtX = player->pos.x; gCsCamAtY = player->pos.y; gCsCamAtZ = player->pos.z; - D_ctx_80178410 = 300; + gStarCount = 300; D_ctx_80177A98 = 1; gLight1R = 200; @@ -1309,7 +1308,7 @@ void Bolse_8018EF6C(Player* player) { actor->timer_0BC = 80; } AUDIO_PLAY_BGM(gBgmSeqId); - gLevelStatusScreenTimer = 80; + gLevelStartStatusScreenTimer = 80; } break; } @@ -1357,7 +1356,7 @@ void Bolse_8018F83C(Actor* actor, s32 arg1) { AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); } -void Bolse_8018F94C(Player* player) { +void Bolse_LevelComplete(Player* player) { f32 sp8C; f32 sp88; s32 i; @@ -1413,7 +1412,7 @@ void Bolse_8018F94C(Player* player) { Play_ClearObjectData(); for (i = 0; i < 200; i++) { - gObjects58[i].obj.status = OBJ_FREE; + gScenery360[i].obj.status = OBJ_FREE; } Bolse_8018EC1C(); @@ -1439,7 +1438,7 @@ void Bolse_8018F94C(Player* player) { } D_ctx_80177A48[0] = 1.0f; - D_ctx_80178410 = 1000; + gStarCount = 1000; D_ctx_80177A98 = 0; gCsCamEyeY = 0; gCsCamEyeX = 200.0f; @@ -1451,11 +1450,11 @@ void Bolse_8018F94C(Player* player) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); gCsFrameCount = 0; - gGroundLevel = -10000.0f; + gGroundHeight = -10000.0f; player->unk_240 = 1; player->wings.modelId = 1; AUDIO_PLAY_SFX(0x31009063, actor50->sfxSource, 0); - func_8001C8B8(0); + Audio_StartPlayerNoise(0); } break; @@ -1653,11 +1652,11 @@ void Bolse_8018F94C(Player* player) { switch (gCsFrameCount) { case 400: - D_ctx_80177830 = 1; + gShowLevelClearStatusScreen = 1; break; case 600: - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; break; case 620: @@ -1813,8 +1812,8 @@ void Bolse_80191054(Effect* effect) { Object_Kill(&effect->obj, effect->sfxSource); } - if (effect->obj.pos.y < gGroundLevel + 50.0f) { - Bolse_80190FE8(effect->obj.pos.x, gGroundLevel + 50.0f, effect->obj.pos.z, 3.0f); + if (effect->obj.pos.y < gGroundHeight + 50.0f) { + Bolse_80190FE8(effect->obj.pos.x, gGroundHeight + 50.0f, effect->obj.pos.z, 3.0f); Object_Kill(&effect->obj, effect->sfxSource); } break; @@ -2072,16 +2071,16 @@ void Bolse_80191BAC(Boss* boss) { if (D_ctx_8017812C == 0) { if (((gGameFrameCount % 2) == 0)) { - D_ctx_8017836C = 0.0f; + gLight3Brightness = 0.0f; } else { - D_ctx_8017836C = 0.5f; + gLight3Brightness = 0.5f; } - D_ctx_80178370 = boss->obj.pos.x; - D_ctx_80178374 = boss->obj.pos.y; - D_ctx_80178378 = boss->obj.pos.z; - D_ctx_80178360 = 255; - D_ctx_80178364 = 128; - D_ctx_80178368 = 128; + gLight3x = boss->obj.pos.x; + gLight3y = boss->obj.pos.y; + gLight3z = boss->obj.pos.z; + gLight3R = 255; + gLight3G = 128; + gLight3B = 128; } } @@ -2106,24 +2105,24 @@ void Bolse_80191ED8(void) { s32 i; Actor* actor; Boss* boss; - Object_58* obj58; + Scenery360* scenery360; gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]); - for (obj58 = gObjects58, i = 0; i < 1000; i++) { + for (scenery360 = gScenery360, i = 0; i < 1000; i++) { if (gLevelObjects[i].id < 0) { break; } if (gLevelObjects[i].id < 161) { - Object_58_Initialize(obj58); - obj58->obj.status = OBJ_ACTIVE; - obj58->obj.id = gLevelObjects[i].id; - obj58->sfxSource[0] = obj58->obj.pos.x = gLevelObjects[i].xPos; - obj58->sfxSource[1] = obj58->obj.pos.y = gLevelObjects[i].yPos; - obj58->sfxSource[2] = obj58->obj.pos.z = -gLevelObjects[i].zPos1; - obj58->unk_54 = obj58->obj.rot.y = gLevelObjects[i].rot.y; - Object_SetInfo(&obj58->info, obj58->obj.id); - obj58++; + Scenery360_Initialize(scenery360); + scenery360->obj.status = OBJ_ACTIVE; + scenery360->obj.id = gLevelObjects[i].id; + scenery360->sfxSource[0] = scenery360->obj.pos.x = gLevelObjects[i].xPos; + scenery360->sfxSource[1] = scenery360->obj.pos.y = gLevelObjects[i].yPos; + scenery360->sfxSource[2] = scenery360->obj.pos.z = -gLevelObjects[i].zPos1; + scenery360->unk_54 = scenery360->obj.rot.y = gLevelObjects[i].rot.y; + Object_SetInfo(&scenery360->info, scenery360->obj.id); + scenery360++; } } @@ -2175,7 +2174,7 @@ void Bolse_80191ED8(void) { Object_SetInfo(&boss->info, boss->obj.id); } -void Bolse_80192264(void) { +void Bolse_DrawDynamicGround(void) { Vec3f spDC = { 0.0f, 0.0f, 0.0f }; Vec3f spD0; f32 rnd; diff --git a/src/overlays/ovl_i4/fox_fo.c b/src/overlays/ovl_i4/fox_fo.c index e7777490..301525cc 100644 --- a/src/overlays/ovl_i4/fox_fo.c +++ b/src/overlays/ovl_i4/fox_fo.c @@ -264,7 +264,7 @@ void Fortuna_80187960(Actor* actor) { player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_014 = 0.0001f; AUDIO_PLAY_BGM(gBgmSeqId); - gLevelStatusScreenTimer = 80; + gLevelStartStatusScreenTimer = 80; } }; break; @@ -390,7 +390,7 @@ void Fortuna_80187960(Actor* actor) { Object_SetInfo(&actor19->info, actor19->obj.id); } } - gOverlayStage = 1; + gSceneSetup = 1; gProjectFar = 30000.0f; break; @@ -494,7 +494,7 @@ void Fortuna_80188AD0(Actor* actor) { actor->state = 1; actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_FO_600FF64); actor->info.unk_1C = 0.0f; - actor->timer_0CA[0] = 0; + actor->lockOnTimers[0] = 0; actor->info.bonus = 0; AUDIO_PLAY_SFX(0x2903B009, actor->sfxSource, 4); } @@ -630,7 +630,7 @@ void Fortuna_801890EC(Actor* actor, s32 arg1) { } } -void Fortuna_8018927C(Player* player) { +void Fortuna_LevelComplete(Player* player) { s32 i; Vec3f src; Vec3f dest; @@ -787,11 +787,11 @@ void Fortuna_8018927C(Player* player) { } for (i = 0; i < 200; i++) { - gObjects58[i].obj.status = OBJ_FREE; + gScenery360[i].obj.status = OBJ_FREE; } func_play_800A5EBC(); - gLevelType = 1; + gLevelType = LEVELTYPE_SPACE; D_ctx_801784AC = gBgColor = gFogRed = gFogGreen = gFogBlue = 0; gLight1R = gLight2R = D_ctx_80161A70 = 86; gLight1G = gLight2G = D_ctx_80161A74 = 58; @@ -828,7 +828,7 @@ void Fortuna_8018927C(Player* player) { player->unk_204 = 1; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 100); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 100); - func_8001C8B8(0); + Audio_StartPlayerNoise(0); if (gNextPlanetPath == 0) { Fortuna_801890EC(actor0, 3); } @@ -1096,7 +1096,7 @@ void Fortuna_8018927C(Player* player) { if (gCsFrameCount == 1382) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; - D_ctx_8017837C = 4; + gFadeoutType = 4; Audio_FadeOutAll(10); for (i = 0; i < 6; i++) { gSavedStarWolfTeamAlive[i] = gStarWolfTeamAlive[i]; @@ -1273,7 +1273,7 @@ void Fortuna_8018927C(Player* player) { break; case 1080: - D_ctx_80177830 = 1; + gShowLevelClearStatusScreen = 1; break; case 1240: @@ -1298,7 +1298,7 @@ void Fortuna_8018927C(Player* player) { actor2->fwork[29] = 5.0f; actor2->iwork[11] = 2; } - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; break; case 1300: @@ -1319,7 +1319,7 @@ void Fortuna_8018927C(Player* player) { if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; - D_ctx_8017837C = 4; + gFadeoutType = 4; Audio_FadeOutAll(10); // clang-format off @@ -1406,10 +1406,10 @@ void Fortuna_8018927C(Player* player) { if (player->unk_1D0 < 20) { switch (gCsFrameCount) { case 1020: - D_ctx_80177830 = 1; + gShowLevelClearStatusScreen = 1; break; case 1220: - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; break; } } @@ -1437,30 +1437,30 @@ void Fortuna_8018BA2C(void) { s32 i; Actor* actor; Sprite* sprite; - Object_58* obj58; + Scenery360* scenery360; Boss* boss = &gBosses[0]; gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]); - for (obj58 = &gObjects58[0], i = 0; i < 1000; i++) { - if (gLevelObjects[i].id < 0) { + for (scenery360 = &gScenery360[0], i = 0; i < 1000; i++) { + if (gLevelObjects[i].id <= OBJ_INVALID) { break; } - if (gLevelObjects[i].id < 161) { - Object_58_Initialize(obj58); - obj58->obj.status = OBJ_ACTIVE; - obj58->obj.id = gLevelObjects[i].id; - obj58->obj.pos.x = gLevelObjects[i].xPos; - obj58->obj.pos.z = gLevelObjects[i].zPos1; - obj58->obj.pos.y = gLevelObjects[i].yPos; - obj58->obj.rot.y = gLevelObjects[i].rot.y; - Object_SetInfo(&obj58->info, obj58->obj.id); - obj58++; + if (gLevelObjects[i].id <= OBJ_SCENERY_160) { + Scenery360_Initialize(scenery360); + scenery360->obj.status = OBJ_ACTIVE; + scenery360->obj.id = gLevelObjects[i].id; + scenery360->obj.pos.x = gLevelObjects[i].xPos; + scenery360->obj.pos.z = gLevelObjects[i].zPos1; + scenery360->obj.pos.y = gLevelObjects[i].yPos; + scenery360->obj.rot.y = gLevelObjects[i].rot.y; + Object_SetInfo(&scenery360->info, scenery360->obj.id); + scenery360++; } } for (actor = &gActors[20], i = 0; i < 1000; i++) { - if (gLevelObjects[i].id < 0) { + if (gLevelObjects[i].id <= OBJ_INVALID) { break; } if ((gLevelObjects[i].id >= OBJ_ACTOR_176) && (gLevelObjects[i].id < OBJ_BOSS_292)) { @@ -1476,10 +1476,10 @@ void Fortuna_8018BA2C(void) { } for (sprite = &gSprites[0], i = 0; i < 1000; i++) { - if (gLevelObjects[i].id < 0) { + if (gLevelObjects[i].id <= OBJ_INVALID) { break; } - if (gLevelObjects[i].id == 163) { + if (gLevelObjects[i].id == OBJ_SPRITE_FO_POLE) { Sprite_Initialize(sprite); sprite->obj.status = OBJ_INIT; sprite->obj.id = gLevelObjects[i].id; diff --git a/src/overlays/ovl_i4/fox_i4.c b/src/overlays/ovl_i4/fox_i4.c index 48f02e41..68bbbe7d 100644 --- a/src/overlays/ovl_i4/fox_i4.c +++ b/src/overlays/ovl_i4/fox_i4.c @@ -1,6 +1,6 @@ #include "global.h" -void Fortuna_8018927C(Player*); +void Fortuna_LevelComplete(Player*); void Bolse_8018D394(Boss*); void Bolse_8018D454(Boss*); void Bolse_8018D7F0(Boss*); @@ -16,7 +16,7 @@ s32 D_i4_8019EDD0 = 0; void OvlI4_CallFunction(u32 mode, void* ptr) { switch (mode) { case OVLCALL_FO_CS_COMPLETE: - Fortuna_8018927C(ptr); + Fortuna_LevelComplete(ptr); break; case OVLCALL_BOSS309_UPDATE: Bolse_8018E710(ptr); diff --git a/src/overlays/ovl_i4/fox_ka.c b/src/overlays/ovl_i4/fox_ka.c index cfe34452..8154ae20 100644 --- a/src/overlays/ovl_i4/fox_ka.c +++ b/src/overlays/ovl_i4/fox_ka.c @@ -187,7 +187,7 @@ void Katina_80192C8C(void) { } } -void Katina_80192E20(Player* player) { +void Katina_LevelStart(Player* player) { s32 j; s32 i; Vec3f src; @@ -274,7 +274,7 @@ void Katina_80192E20(Player* player) { player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_014 = 0.0001f; AUDIO_PLAY_BGM(gBgmSeqId); - gLevelStatusScreenTimer = 80; + gLevelStartStatusScreenTimer = 80; for (actor = &gActors[1], i = 1; i < 4; i += 1, actor++) { actor->timer_0BC = 0; } @@ -1062,7 +1062,7 @@ void Katina_801946C4(Boss* boss) { case 20: gShowAllRangeCountdown = 0; Math_SmoothStepToF(&boss->fwork[10], 0.0f, 0.1f, 3.0f, 0.0f); - if ((boss->timer_050 == 0) && (((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) || + if ((boss->timer_050 == 0) && ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN))) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].unk_1D0 = 0; @@ -1396,7 +1396,7 @@ void Katina_80197024(void) { } } -void Katina_80197290(Player* player) { +void Katina_LevelComplete(Player* player) { s32 i; Boss* boss = &gBosses[1]; Vec3f src; @@ -1498,7 +1498,7 @@ void Katina_80197290(Player* player) { player->pos.y = 3500.0f; player->pos.z = 150.0f; player->unk_1D0 = 3; - func_8001C8B8(0); + Audio_StartPlayerNoise(0); if (gNextPlanetPath != 0) { AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); } else { @@ -1552,7 +1552,7 @@ void Katina_80197290(Player* player) { if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; - D_ctx_8017837C = 4; + gFadeoutType = 4; D_play_800D3180[LEVEL_KATINA] = Play_CheckMedalStatus(150) + 1; } } @@ -1562,11 +1562,11 @@ void Katina_80197290(Player* player) { break; case 350: - D_ctx_80177830 = 1; + gShowLevelClearStatusScreen = 1; break; case 550: - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; break; case 1010: @@ -2065,7 +2065,7 @@ void Katina_80198AA0(Actor* actor) { if (xAngle < 0.0f) { xAngle += 360.0f; } - } else if ((actor->obj.pos.y < (gGroundLevel + 50.0f)) && (xAngle > 180.0f)) { + } else if ((actor->obj.pos.y < (gGroundHeight + 50.0f)) && (xAngle > 180.0f)) { xAngle = 0.0f; actor->unk_0F4.x = 0.0f; } @@ -2096,8 +2096,8 @@ void Katina_80198AA0(Actor* actor) { actor->fwork[14] -= actor->fwork[14] * 0.1f; actor->fwork[12] -= actor->fwork[12] * 0.1f; - if ((actor->obj.pos.y < gGroundLevel + 40.0f) && (actor->vel.y < 0.0f)) { - actor->obj.pos.y = gGroundLevel + 40.0f; + if ((actor->obj.pos.y < gGroundHeight + 40.0f) && (actor->vel.y < 0.0f)) { + actor->obj.pos.y = gGroundHeight + 40.0f; actor->vel.y = 0.0f; } diff --git a/src/overlays/ovl_i4/fox_sz.c b/src/overlays/ovl_i4/fox_sz.c index b7ccfbbf..466a905a 100644 --- a/src/overlays/ovl_i4/fox_sz.c +++ b/src/overlays/ovl_i4/fox_sz.c @@ -777,7 +777,7 @@ void SectorZ_8019B888(void) { } } -void SectorZ_8019BA64(Player* player) { +void SectorZ_LevelStart(Player* player) { s32 i; s32 j; Vec3f sp74; @@ -933,7 +933,7 @@ void SectorZ_8019BA64(Player* player) { player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_01C = player->unk_018 = player->unk_014 = 0.f; AUDIO_PLAY_BGM(gBgmSeqId); - gLevelStatusScreenTimer = 50; + gLevelStartStatusScreenTimer = 50; } break; } @@ -1093,7 +1093,7 @@ void SectorZ_8019C70C(void) { AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); } -void SectorZ_8019C85C(Player* player) { +void SectorZ_LevelComplete(Player* player) { s32 i; Vec3f src; Vec3f dest; @@ -1291,7 +1291,7 @@ void SectorZ_8019C85C(Player* player) { D_ctx_80177A48[3] = 300.0f; for (i = 0; i < 200; i++) { - gObjects58[i].obj.status = OBJ_FREE; + gScenery360[i].obj.status = OBJ_FREE; } } break; @@ -1352,7 +1352,7 @@ void SectorZ_8019C85C(Player* player) { if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; - D_ctx_8017837C = 4; + gFadeoutType = 4; D_play_800D3180[LEVEL_SECTOR_Z] = Play_CheckMedalStatus(100) + 1; } } @@ -1476,11 +1476,11 @@ void SectorZ_8019C85C(Player* player) { break; case 2277: - D_ctx_80177830 = 1; + gShowLevelClearStatusScreen = 1; break; case 2477: - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; break; case 1370: @@ -1792,33 +1792,33 @@ void SectorZ_8019EA68(void) { s32 i; s32 j; Actor* actor; - Object_58* obj58; + Scenery360* scenery360; Boss* boss = &gBosses[0]; gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]); Rand_SetSeed(1, 29000, 9876); - for (obj58 = gObjects58, i = 0; i < 1000; i++) { - if (gLevelObjects[i].id < 0) { + for (scenery360 = gScenery360, i = 0; i < 1000; i++) { + if (gLevelObjects[i].id <= OBJ_INVALID) { break; } - if (gLevelObjects[i].id < 161) { - Object_58_Initialize(obj58); - obj58->obj.status = OBJ_ACTIVE; - obj58->obj.id = gLevelObjects[i].id; - obj58->obj.pos.x = gLevelObjects[i].xPos; - obj58->obj.pos.y = gLevelObjects[i].yPos; - obj58->obj.pos.z = -gLevelObjects[i].zPos1; - obj58->obj.rot.y = gLevelObjects[i].rot.y; - Object_SetInfo(&obj58->info, obj58->obj.id); - obj58++; + if (gLevelObjects[i].id <= OBJ_SCENERY_160) { + Scenery360_Initialize(scenery360); + scenery360->obj.status = OBJ_ACTIVE; + scenery360->obj.id = gLevelObjects[i].id; + scenery360->obj.pos.x = gLevelObjects[i].xPos; + scenery360->obj.pos.y = gLevelObjects[i].yPos; + scenery360->obj.pos.z = -gLevelObjects[i].zPos1; + scenery360->obj.rot.y = gLevelObjects[i].rot.y; + Object_SetInfo(&scenery360->info, scenery360->obj.id); + scenery360++; } } for (j = 50, actor = &gActors[j], i = 0; i < 1000; i++) { - if (gLevelObjects[i].id < 0) { + if (gLevelObjects[i].id <= OBJ_INVALID) { break; } diff --git a/src/overlays/ovl_i5/fox_ma.c b/src/overlays/ovl_i5/fox_ma.c index 50ce8b23..c3fdd879 100644 --- a/src/overlays/ovl_i5/fox_ma.c +++ b/src/overlays/ovl_i5/fox_ma.c @@ -11,6 +11,22 @@ #include "assets/ast_enmy_planet.h" // #include "prevent_bss_reordering2.h" +typedef struct { + /* 0x00 */ f32 unk_00; + /* 0x04 */ f32 unk_04; + /* 0x08 */ f32 unk_08; + /* 0x0C */ f32 unk_0C; + /* 0x10 */ s16 unk_10; +} UnkStruct_D_i5_801B8E50; // size = 0x14 + +typedef struct { + /* 0x00 */ f32 unk_00; + /* 0x04 */ s16 unk_04; + /* 0x08 */ f32 unk_08; + /* 0x0C */ f32 unk_0C; + /* 0x10 */ s16 unk_10; +} UnkStruct_D_i5_801BA1EC; // size = 0x14 + void Macbeth_801AD624(f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, s16, s16, f32); bool Macbeth_801A0308(Actor*, f32, f32, u8); void Macbeth_801AF200(f32, f32, f32, f32, f32, f32); @@ -45,130 +61,130 @@ Vec3f D_i5_801BE6E8[6]; s32 D_i5_801BE734[4]; static UnkStruct_D_i5_801B8E50 D_i5_801B8E50[156] = { - { 5174.4f, -2141.0f, 0.0f, 350.0f, OBJ_80_94 }, { 3401.4f, -1828.0f, 0.0f, 350.0f, OBJ_80_94 }, - { 1627.8999f, -1515.0f, 0.0f, 350.0f, OBJ_80_94 }, { -145.0f, -1202.0f, 0.0f, 350.0f, OBJ_80_96 }, - { -1933.0f, -1046.0f, 0.0f, 0.0f, OBJ_80_94 }, { -3733.0f, -1046.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -5533.0f, -1046.0f, 0.0f, 0.0f, OBJ_80_94 }, { -7333.0f, -1046.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -9133.0f, -1046.0f, 0.0f, 0.0f, OBJ_80_94 }, { -10933.0f, -1046.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -12733.0f, -1046.0f, 0.0f, 0.0f, OBJ_80_94 }, { -14533.0f, -1046.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -16333.0f, -1046.0f, 0.0f, 0.0f, OBJ_80_94 }, { -18133.0f, -1046.0f, 0.0f, 0.0f, OBJ_80_95 }, - { -19921.6f, -889.0f, 0.0f, 350.0f, OBJ_80_95 }, { -21656.4f, -423.0f, 0.0f, 340.0f, OBJ_80_96 }, - { -23390.7f, 40.0f, 0.0f, 350.0f, OBJ_80_96 }, { -25125.0f, 197.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -26925.0f, 197.0f, 0.0f, 0.0f, OBJ_80_96 }, { -28713.6f, 40.0f, 0.0f, 10.0f, OBJ_80_96 }, - { -30447.3f, -424.0f, 0.0f, 20.0f, OBJ_80_95 }, { -32181.3f, -889.0f, 0.0f, 10.0f, OBJ_80_95 }, - { -33971.1f, -1045.0f, 0.0f, 0.0f, OBJ_80_100 }, { -35771.1f, -1045.0f, 90.0f, 0.0f, OBJ_80_100 }, - { -37571.1f, -1045.0f, 180.0f, 0.0f, OBJ_80_100 }, { -39371.1f, -1045.0f, 270.0f, 0.0f, OBJ_80_100 }, - { -41171.1f, -1045.0f, 360.0f, 0.0f, OBJ_80_100 }, { -42971.1f, -1045.0f, 450.0f, 0.0f, OBJ_80_95 }, - { -44760.0f, -889.0f, 450.0f, 350.0f, OBJ_80_96 }, { -46547.9f, -733.0f, 450.0f, 0.0f, OBJ_80_94 }, - { -48347.5f, -733.0f, 450.0f, 0.0f, OBJ_80_95 }, { -50136.4f, -576.0f, 450.0f, 350.0f, OBJ_80_95 }, - { -51872.1f, -111.0f, 450.0f, 340.0f, OBJ_80_96 }, { -53606.4f, 352.0f, 450.0f, 350.0f, OBJ_80_96 }, - { -55395.4f, 509.0f, 450.0f, 0.0f, OBJ_80_96 }, { -57184.2f, 353.0f, 450.0f, 10.0f, OBJ_80_94 }, - { -58957.5f, 40.0f, 450.0f, 10.0f, OBJ_80_95 }, { -60746.9f, -115.0f, 450.0f, 0.0f, OBJ_80_94 }, - { -62548.2f, -114.0f, 450.0f, 0.0f, OBJ_80_101 }, { -64349.1f, -114.0f, 360.0f, 0.0f, OBJ_80_101 }, - { -66149.3f, -115.0f, 270.0f, 0.0f, OBJ_80_101 }, { -67950.3f, -115.0f, 180.0f, 0.0f, OBJ_80_101 }, - { -69751.2f, -115.0f, 90.0f, 0.0f, OBJ_80_101 }, { -71551.2f, -115.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -73351.0f, -116.0f, 0.0f, 0.0f, OBJ_80_96 }, { -75139.2f, -273.0f, 0.0f, 10.0f, OBJ_80_94 }, - { -76912.4f, -587.0f, 0.0f, 10.0f, OBJ_80_95 }, { -78702.0f, -743.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -80502.2f, -743.0f, 0.0f, 0.0f, OBJ_80_94 }, { -82302.2f, -743.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -84102.0f, -743.0f, 0.0f, 0.0f, OBJ_80_95 }, { -85890.6f, -586.0f, 0.0f, 350.0f, OBJ_80_96 }, - { -87679.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, { -89479.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -91279.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, { -93079.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -94879.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, { -96680.0f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -98480.0f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, { -100280.0f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -102079.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, { -103879.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -105679.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, { -107479.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -109279.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, { -111079.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -112879.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, { -114679.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -116479.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, { -118279.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -120079.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, { -121879.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -123679.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, { -125479.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -127279.9f, -431.0f, 0.0f, 0.0f, OBJ_80_95 }, { -129068.2f, -274.0f, 0.0f, 350.0f, OBJ_80_94 }, - { -130841.2f, 38.0f, 0.0f, 350.0f, OBJ_80_96 }, { -132630.4f, 194.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -134430.4f, 194.0f, 0.0f, 0.0f, OBJ_80_96 }, { -136219.4f, 37.0f, 0.0f, 10.0f, OBJ_80_95 }, - { -138009.0f, -119.0f, 0.0f, 0.0f, OBJ_80_96 }, { -139798.6f, -277.0f, 0.0f, 10.0f, OBJ_80_95 }, - { -141587.6f, -433.0f, 0.0f, 0.0f, OBJ_80_95 }, { -143376.3f, -276.0f, 0.0f, 350.0f, OBJ_80_94 }, - { -145149.0f, 35.0f, 0.0f, 350.0f, OBJ_80_96 }, { -146883.3f, 192.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -148683.3f, 192.0f, 0.0f, 0.0f, OBJ_80_96 }, { -150471.9f, 34.0f, 0.0f, 10.0f, OBJ_80_94 }, - { -152244.8f, -278.0f, 0.0f, 10.0f, OBJ_80_95 }, { -154034.2f, -434.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -155834.2f, -434.0f, 0.0f, 0.0f, OBJ_80_94 }, { -157634.2f, -434.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -159434.2f, -434.0f, 0.0f, 0.0f, OBJ_80_94 }, { -161234.2f, -434.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -163034.2f, -434.0f, 0.0f, 0.0f, OBJ_80_94 }, { -164834.2f, -434.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -166634.2f, -434.0f, 0.0f, 0.0f, OBJ_80_94 }, { -168435.2f, -435.0f, 0.0f, 0.0f, OBJ_80_95 }, - { -170223.8f, -278.0f, 0.0f, 350.0f, OBJ_80_94 }, { -171996.6f, 34.0f, 0.0f, 350.0f, OBJ_80_96 }, - { -173785.4f, 191.0f, 0.0f, 0.0f, OBJ_80_96 }, { -175574.2f, 33.0f, 0.0f, 10.0f, OBJ_80_95 }, - { -177364.0f, -123.0f, 0.0f, 0.0f, OBJ_80_94 }, { -179164.9f, -122.0f, 0.0f, 0.0f, OBJ_80_95 }, - { -180954.4f, 32.0f, 0.0f, 350.0f, OBJ_80_94 }, { -182727.1f, 345.0f, 0.0f, 350.0f, OBJ_80_96 }, - { -184515.8f, 501.0f, 0.0f, 0.0f, OBJ_80_96 }, { -186304.5f, 344.0f, 0.0f, 10.0f, OBJ_80_94 }, - { -188077.7f, 30.0f, 0.0f, 10.0f, OBJ_80_95 }, { -189866.6f, -125.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -191667.3f, -125.0f, 0.0f, 0.0f, OBJ_80_95 }, { -193455.9f, 31.0f, 0.0f, 350.0f, OBJ_80_96 }, - { -195245.1f, 187.0f, 0.0f, 0.0f, OBJ_80_95 }, { -197033.7f, 344.0f, 0.0f, 350.0f, OBJ_80_96 }, - { -198823.2f, 500.0f, 0.0f, 0.0f, OBJ_80_96 }, { -200612.3f, 343.0f, 0.0f, 10.0f, OBJ_80_94 }, - { -202385.6f, 30.0f, 0.0f, 10.0f, OBJ_80_95 }, { -204175.1f, -125.0f, 0.0f, 0.0f, OBJ_80_96 }, - { -205964.3f, -282.0f, 0.0f, 10.0f, OBJ_80_95 }, { -207754.0f, -440.0f, 0.0f, 0.0f, OBJ_80_95 }, - { -209542.5f, -283.0f, 0.0f, 350.0f, OBJ_80_94 }, { -211315.1f, 29.0f, 0.0f, 350.0f, OBJ_80_96 }, - { -213104.5f, 185.0f, 0.0f, 0.0f, OBJ_80_96 }, { -214893.4f, 28.0f, 0.0f, 10.0f, OBJ_80_95 }, - { -216683.2f, -128.0f, 0.0f, 0.0f, OBJ_80_95 }, { -218471.8f, 28.0f, 0.0f, 350.0f, OBJ_80_96 }, - { -220261.3f, 184.0f, 0.0f, 0.0f, OBJ_80_96 }, { -222050.1f, 27.0f, 0.0f, 10.0f, OBJ_80_95 }, - { -223839.6f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, { -225639.6f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -227439.6f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, { -229239.6f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -231039.6f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, { -232839.6f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -234639.6f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, { -236439.6f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -238239.6f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, { -240039.6f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -241839.6f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, { -243639.6f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -245439.6f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, { -247239.6f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -249039.6f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, { -250839.6f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -252639.6f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, { -254439.6f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -256240.5f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, { -258040.5f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -259840.5f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, { -261640.5f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -263440.5f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, { -265240.5f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -267040.5f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, { -268840.5f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -507035.0f, -319.0f, 0.0f, 0.0f, OBJ_80_94 }, { 0.0f, 0.0f, 0.0f, 0.0f, 0 }, + { 5174.4f, -2141.0f, 0.0f, 350.0f, OBJ_SCENERY_94 }, { 3401.4f, -1828.0f, 0.0f, 350.0f, OBJ_SCENERY_94 }, + { 1627.8999f, -1515.0f, 0.0f, 350.0f, OBJ_SCENERY_94 }, { -145.0f, -1202.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, + { -1933.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -3733.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -5533.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -7333.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -9133.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -10933.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -12733.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -14533.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -16333.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -18133.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_95 }, + { -19921.6f, -889.0f, 0.0f, 350.0f, OBJ_SCENERY_95 }, { -21656.4f, -423.0f, 0.0f, 340.0f, OBJ_SCENERY_96 }, + { -23390.7f, 40.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, { -25125.0f, 197.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -26925.0f, 197.0f, 0.0f, 0.0f, OBJ_SCENERY_96 }, { -28713.6f, 40.0f, 0.0f, 10.0f, OBJ_SCENERY_96 }, + { -30447.3f, -424.0f, 0.0f, 20.0f, OBJ_SCENERY_95 }, { -32181.3f, -889.0f, 0.0f, 10.0f, OBJ_SCENERY_95 }, + { -33971.1f, -1045.0f, 0.0f, 0.0f, OBJ_SCENERY_100 }, { -35771.1f, -1045.0f, 90.0f, 0.0f, OBJ_SCENERY_100 }, + { -37571.1f, -1045.0f, 180.0f, 0.0f, OBJ_SCENERY_100 }, { -39371.1f, -1045.0f, 270.0f, 0.0f, OBJ_SCENERY_100 }, + { -41171.1f, -1045.0f, 360.0f, 0.0f, OBJ_SCENERY_100 }, { -42971.1f, -1045.0f, 450.0f, 0.0f, OBJ_SCENERY_95 }, + { -44760.0f, -889.0f, 450.0f, 350.0f, OBJ_SCENERY_96 }, { -46547.9f, -733.0f, 450.0f, 0.0f, OBJ_SCENERY_94 }, + { -48347.5f, -733.0f, 450.0f, 0.0f, OBJ_SCENERY_95 }, { -50136.4f, -576.0f, 450.0f, 350.0f, OBJ_SCENERY_95 }, + { -51872.1f, -111.0f, 450.0f, 340.0f, OBJ_SCENERY_96 }, { -53606.4f, 352.0f, 450.0f, 350.0f, OBJ_SCENERY_96 }, + { -55395.4f, 509.0f, 450.0f, 0.0f, OBJ_SCENERY_96 }, { -57184.2f, 353.0f, 450.0f, 10.0f, OBJ_SCENERY_94 }, + { -58957.5f, 40.0f, 450.0f, 10.0f, OBJ_SCENERY_95 }, { -60746.9f, -115.0f, 450.0f, 0.0f, OBJ_SCENERY_94 }, + { -62548.2f, -114.0f, 450.0f, 0.0f, OBJ_SCENERY_101 }, { -64349.1f, -114.0f, 360.0f, 0.0f, OBJ_SCENERY_101 }, + { -66149.3f, -115.0f, 270.0f, 0.0f, OBJ_SCENERY_101 }, { -67950.3f, -115.0f, 180.0f, 0.0f, OBJ_SCENERY_101 }, + { -69751.2f, -115.0f, 90.0f, 0.0f, OBJ_SCENERY_101 }, { -71551.2f, -115.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -73351.0f, -116.0f, 0.0f, 0.0f, OBJ_SCENERY_96 }, { -75139.2f, -273.0f, 0.0f, 10.0f, OBJ_SCENERY_94 }, + { -76912.4f, -587.0f, 0.0f, 10.0f, OBJ_SCENERY_95 }, { -78702.0f, -743.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -80502.2f, -743.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -82302.2f, -743.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -84102.0f, -743.0f, 0.0f, 0.0f, OBJ_SCENERY_95 }, { -85890.6f, -586.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, + { -87679.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -89479.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -91279.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -93079.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -94879.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -96680.0f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -98480.0f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -100280.0f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -102079.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -103879.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -105679.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -107479.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -109279.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -111079.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -112879.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -114679.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -116479.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -118279.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -120079.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -121879.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -123679.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -125479.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -127279.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_95 }, { -129068.2f, -274.0f, 0.0f, 350.0f, OBJ_SCENERY_94 }, + { -130841.2f, 38.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, { -132630.4f, 194.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -134430.4f, 194.0f, 0.0f, 0.0f, OBJ_SCENERY_96 }, { -136219.4f, 37.0f, 0.0f, 10.0f, OBJ_SCENERY_95 }, + { -138009.0f, -119.0f, 0.0f, 0.0f, OBJ_SCENERY_96 }, { -139798.6f, -277.0f, 0.0f, 10.0f, OBJ_SCENERY_95 }, + { -141587.6f, -433.0f, 0.0f, 0.0f, OBJ_SCENERY_95 }, { -143376.3f, -276.0f, 0.0f, 350.0f, OBJ_SCENERY_94 }, + { -145149.0f, 35.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, { -146883.3f, 192.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -148683.3f, 192.0f, 0.0f, 0.0f, OBJ_SCENERY_96 }, { -150471.9f, 34.0f, 0.0f, 10.0f, OBJ_SCENERY_94 }, + { -152244.8f, -278.0f, 0.0f, 10.0f, OBJ_SCENERY_95 }, { -154034.2f, -434.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -155834.2f, -434.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -157634.2f, -434.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -159434.2f, -434.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -161234.2f, -434.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -163034.2f, -434.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -164834.2f, -434.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -166634.2f, -434.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -168435.2f, -435.0f, 0.0f, 0.0f, OBJ_SCENERY_95 }, + { -170223.8f, -278.0f, 0.0f, 350.0f, OBJ_SCENERY_94 }, { -171996.6f, 34.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, + { -173785.4f, 191.0f, 0.0f, 0.0f, OBJ_SCENERY_96 }, { -175574.2f, 33.0f, 0.0f, 10.0f, OBJ_SCENERY_95 }, + { -177364.0f, -123.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -179164.9f, -122.0f, 0.0f, 0.0f, OBJ_SCENERY_95 }, + { -180954.4f, 32.0f, 0.0f, 350.0f, OBJ_SCENERY_94 }, { -182727.1f, 345.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, + { -184515.8f, 501.0f, 0.0f, 0.0f, OBJ_SCENERY_96 }, { -186304.5f, 344.0f, 0.0f, 10.0f, OBJ_SCENERY_94 }, + { -188077.7f, 30.0f, 0.0f, 10.0f, OBJ_SCENERY_95 }, { -189866.6f, -125.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -191667.3f, -125.0f, 0.0f, 0.0f, OBJ_SCENERY_95 }, { -193455.9f, 31.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, + { -195245.1f, 187.0f, 0.0f, 0.0f, OBJ_SCENERY_95 }, { -197033.7f, 344.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, + { -198823.2f, 500.0f, 0.0f, 0.0f, OBJ_SCENERY_96 }, { -200612.3f, 343.0f, 0.0f, 10.0f, OBJ_SCENERY_94 }, + { -202385.6f, 30.0f, 0.0f, 10.0f, OBJ_SCENERY_95 }, { -204175.1f, -125.0f, 0.0f, 0.0f, OBJ_SCENERY_96 }, + { -205964.3f, -282.0f, 0.0f, 10.0f, OBJ_SCENERY_95 }, { -207754.0f, -440.0f, 0.0f, 0.0f, OBJ_SCENERY_95 }, + { -209542.5f, -283.0f, 0.0f, 350.0f, OBJ_SCENERY_94 }, { -211315.1f, 29.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, + { -213104.5f, 185.0f, 0.0f, 0.0f, OBJ_SCENERY_96 }, { -214893.4f, 28.0f, 0.0f, 10.0f, OBJ_SCENERY_95 }, + { -216683.2f, -128.0f, 0.0f, 0.0f, OBJ_SCENERY_95 }, { -218471.8f, 28.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, + { -220261.3f, 184.0f, 0.0f, 0.0f, OBJ_SCENERY_96 }, { -222050.1f, 27.0f, 0.0f, 10.0f, OBJ_SCENERY_95 }, + { -223839.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -225639.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -227439.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -229239.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -231039.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -232839.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -234639.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -236439.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -238239.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -240039.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -241839.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -243639.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -245439.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -247239.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -249039.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -250839.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -252639.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -254439.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -256240.5f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -258040.5f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -259840.5f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -261640.5f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -263440.5f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -265240.5f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -267040.5f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -268840.5f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -507035.0f, -319.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { 0.0f, 0.0f, 0.0f, 0.0f, 0 }, }; static UnkStruct_D_i5_801B8E50 D_i5_801B9A80[86] = { - { 5174.4f, -2141.0f, 0.0f, 350.0f, OBJ_80_94 }, { 3401.4f, -1828.0f, 0.0f, 350.0f, OBJ_80_94 }, - { 1627.8999f, -1515.0f, 0.0f, 350.0f, OBJ_80_94 }, { -145.0f, -1202.0f, 0.0f, 350.0f, OBJ_80_96 }, - { -1933.0f, -1046.0f, 0.0f, 0.0f, OBJ_80_94 }, { -3733.0f, -1046.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -5533.0f, -1046.0f, 0.0f, 0.0f, OBJ_80_94 }, { -7333.0f, -1046.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -9133.0f, -1046.0f, 0.0f, 0.0f, OBJ_80_94 }, { -10933.0f, -1046.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -12733.0f, -1046.0f, 0.0f, 0.0f, OBJ_80_94 }, { -14533.0f, -1046.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -16333.0f, -1046.0f, 0.0f, 0.0f, OBJ_80_94 }, { -18133.0f, -1046.0f, 0.0f, 0.0f, OBJ_80_95 }, - { -19921.6f, -889.0f, 0.0f, 350.0f, OBJ_80_95 }, { -21656.4f, -423.0f, 0.0f, 340.0f, OBJ_80_96 }, - { -23390.7f, 40.0f, 0.0f, 350.0f, OBJ_80_96 }, { -25125.0f, 197.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -26925.0f, 197.0f, 0.0f, 0.0f, OBJ_80_96 }, { -28713.6f, 40.0f, 0.0f, 10.0f, OBJ_80_96 }, - { -30447.3f, -424.0f, 0.0f, 20.0f, OBJ_80_95 }, { -32181.3f, -889.0f, 0.0f, 10.0f, OBJ_80_95 }, - { -33971.1f, -1045.0f, 0.0f, 0.0f, OBJ_80_100 }, { -35771.1f, -1045.0f, 90.0f, 0.0f, OBJ_80_100 }, - { -37571.1f, -1045.0f, 180.0f, 0.0f, OBJ_80_100 }, { -39371.1f, -1045.0f, 270.0f, 0.0f, OBJ_80_100 }, - { -41171.1f, -1045.0f, 360.0f, 0.0f, OBJ_80_100 }, { -42971.1f, -1045.0f, 450.0f, 0.0f, OBJ_80_95 }, - { -44760.0f, -889.0f, 450.0f, 350.0f, OBJ_80_96 }, { -46547.9f, -733.0f, 450.0f, 0.0f, OBJ_80_94 }, - { -48347.5f, -733.0f, 450.0f, 0.0f, OBJ_80_95 }, { -50136.4f, -576.0f, 450.0f, 350.0f, OBJ_80_95 }, - { -51872.1f, -111.0f, 450.0f, 340.0f, OBJ_80_96 }, { -53606.4f, 352.0f, 450.0f, 350.0f, OBJ_80_96 }, - { -55395.4f, 509.0f, 450.0f, 0.0f, OBJ_80_96 }, { -57184.2f, 353.0f, 450.0f, 10.0f, OBJ_80_94 }, - { -58957.5f, 40.0f, 450.0f, 10.0f, OBJ_80_95 }, { -60746.9f, -115.0f, 450.0f, 0.0f, OBJ_80_94 }, - { -62548.2f, -114.0f, 450.0f, 0.0f, OBJ_80_101 }, { -64349.1f, -114.0f, 360.0f, 0.0f, OBJ_80_101 }, - { -66149.3f, -115.0f, 270.0f, 0.0f, OBJ_80_101 }, { -67950.3f, -115.0f, 180.0f, 0.0f, OBJ_80_101 }, - { -69751.2f, -115.0f, 90.0f, 0.0f, OBJ_80_101 }, { -71551.2f, -115.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -73351.0f, -116.0f, 0.0f, 0.0f, OBJ_80_96 }, { -75139.2f, -273.0f, 0.0f, 10.0f, OBJ_80_94 }, - { -76912.4f, -587.0f, 0.0f, 10.0f, OBJ_80_95 }, { -78702.0f, -743.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -80502.2f, -743.0f, 0.0f, 0.0f, OBJ_80_94 }, { -82302.2f, -743.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -84102.0f, -743.0f, 0.0f, 0.0f, OBJ_80_95 }, { -85890.6f, -586.0f, 0.0f, 350.0f, OBJ_80_96 }, - { -87679.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, { -89479.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -91279.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, { -93079.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -94879.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, { -96680.0f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -98480.0f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, { -100280.0f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -102079.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, { -103879.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -105679.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, { -107479.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -109279.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, { -111079.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -112879.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, { -114679.9f, -431.0f, 0.0f, 0.0f, OBJ_80_104 }, - { -116453.5f, -118.0f, 0.0f, 350.0f, OBJ_80_98 }, { -118188.5f, 346.0f, 0.0f, 340.0f, OBJ_80_98 }, - { -119815.5f, 1105.0f, 0.0f, 330.0f, OBJ_80_97 }, { -121374.3f, 2005.0f, 0.0f, 330.0f, OBJ_80_97 }, - { -122933.3f, 2905.0f, 0.0f, 330.0f, OBJ_80_97 }, { -124491.9f, 3806.0f, 0.0f, 330.0f, OBJ_80_97 }, - { -126051.4f, 4707.0f, 0.0f, 330.0f, OBJ_80_97 }, { -127609.9f, 5607.0f, 0.0f, 330.0f, OBJ_80_97 }, - { -129168.9f, 6507.0f, 0.0f, 330.0f, OBJ_80_97 }, { -130728.1f, 7408.0f, 0.0f, 330.0f, OBJ_80_97 }, - { -132287.2f, 8308.0f, 0.0f, 330.0f, OBJ_80_97 }, { -133846.4f, 9208.0f, 0.0f, 330.0f, OBJ_80_97 }, - { -135405.4f, 10109.0f, 0.0f, 330.0f, OBJ_80_97 }, { -136964.0f, 11009.0f, 0.0f, 330.0f, OBJ_80_97 }, - { -138522.9f, 11909.0f, 0.0f, 330.0f, OBJ_80_97 }, { -140082.1f, 12810.0f, 0.0f, 330.0f, OBJ_80_97 }, - { -507035.0f, -489.0f, 0.0f, 0.0f, OBJ_80_97 }, { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f }, + { 5174.4f, -2141.0f, 0.0f, 350.0f, OBJ_SCENERY_94 }, { 3401.4f, -1828.0f, 0.0f, 350.0f, OBJ_SCENERY_94 }, + { 1627.8999f, -1515.0f, 0.0f, 350.0f, OBJ_SCENERY_94 }, { -145.0f, -1202.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, + { -1933.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -3733.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -5533.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -7333.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -9133.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -10933.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -12733.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -14533.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -16333.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -18133.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_95 }, + { -19921.6f, -889.0f, 0.0f, 350.0f, OBJ_SCENERY_95 }, { -21656.4f, -423.0f, 0.0f, 340.0f, OBJ_SCENERY_96 }, + { -23390.7f, 40.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, { -25125.0f, 197.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -26925.0f, 197.0f, 0.0f, 0.0f, OBJ_SCENERY_96 }, { -28713.6f, 40.0f, 0.0f, 10.0f, OBJ_SCENERY_96 }, + { -30447.3f, -424.0f, 0.0f, 20.0f, OBJ_SCENERY_95 }, { -32181.3f, -889.0f, 0.0f, 10.0f, OBJ_SCENERY_95 }, + { -33971.1f, -1045.0f, 0.0f, 0.0f, OBJ_SCENERY_100 }, { -35771.1f, -1045.0f, 90.0f, 0.0f, OBJ_SCENERY_100 }, + { -37571.1f, -1045.0f, 180.0f, 0.0f, OBJ_SCENERY_100 }, { -39371.1f, -1045.0f, 270.0f, 0.0f, OBJ_SCENERY_100 }, + { -41171.1f, -1045.0f, 360.0f, 0.0f, OBJ_SCENERY_100 }, { -42971.1f, -1045.0f, 450.0f, 0.0f, OBJ_SCENERY_95 }, + { -44760.0f, -889.0f, 450.0f, 350.0f, OBJ_SCENERY_96 }, { -46547.9f, -733.0f, 450.0f, 0.0f, OBJ_SCENERY_94 }, + { -48347.5f, -733.0f, 450.0f, 0.0f, OBJ_SCENERY_95 }, { -50136.4f, -576.0f, 450.0f, 350.0f, OBJ_SCENERY_95 }, + { -51872.1f, -111.0f, 450.0f, 340.0f, OBJ_SCENERY_96 }, { -53606.4f, 352.0f, 450.0f, 350.0f, OBJ_SCENERY_96 }, + { -55395.4f, 509.0f, 450.0f, 0.0f, OBJ_SCENERY_96 }, { -57184.2f, 353.0f, 450.0f, 10.0f, OBJ_SCENERY_94 }, + { -58957.5f, 40.0f, 450.0f, 10.0f, OBJ_SCENERY_95 }, { -60746.9f, -115.0f, 450.0f, 0.0f, OBJ_SCENERY_94 }, + { -62548.2f, -114.0f, 450.0f, 0.0f, OBJ_SCENERY_101 }, { -64349.1f, -114.0f, 360.0f, 0.0f, OBJ_SCENERY_101 }, + { -66149.3f, -115.0f, 270.0f, 0.0f, OBJ_SCENERY_101 }, { -67950.3f, -115.0f, 180.0f, 0.0f, OBJ_SCENERY_101 }, + { -69751.2f, -115.0f, 90.0f, 0.0f, OBJ_SCENERY_101 }, { -71551.2f, -115.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -73351.0f, -116.0f, 0.0f, 0.0f, OBJ_SCENERY_96 }, { -75139.2f, -273.0f, 0.0f, 10.0f, OBJ_SCENERY_94 }, + { -76912.4f, -587.0f, 0.0f, 10.0f, OBJ_SCENERY_95 }, { -78702.0f, -743.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -80502.2f, -743.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -82302.2f, -743.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -84102.0f, -743.0f, 0.0f, 0.0f, OBJ_SCENERY_95 }, { -85890.6f, -586.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, + { -87679.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -89479.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -91279.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -93079.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -94879.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -96680.0f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -98480.0f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -100280.0f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -102079.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -103879.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -105679.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -107479.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -109279.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -111079.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -112879.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -114679.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_104 }, + { -116453.5f, -118.0f, 0.0f, 350.0f, OBJ_SCENERY_98 }, { -118188.5f, 346.0f, 0.0f, 340.0f, OBJ_SCENERY_98 }, + { -119815.5f, 1105.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, { -121374.3f, 2005.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, + { -122933.3f, 2905.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, { -124491.9f, 3806.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, + { -126051.4f, 4707.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, { -127609.9f, 5607.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, + { -129168.9f, 6507.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, { -130728.1f, 7408.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, + { -132287.2f, 8308.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, { -133846.4f, 9208.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, + { -135405.4f, 10109.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, { -136964.0f, 11009.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, + { -138522.9f, 11909.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, { -140082.1f, 12810.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, + { -507035.0f, -489.0f, 0.0f, 0.0f, OBJ_SCENERY_97 }, { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f }, }; static UnkStruct_D_i5_801B8E50 D_i5_801BA138[8] = { @@ -1782,10 +1798,10 @@ bool Macbeth_801A0308(Actor* actor, f32 arg1, f32 arg2, u8 arg3) { if (sp28 >= 180.0f) { sp28 -= 360.0f; } - if (D_i5_801B8E50[var_a0 - 1].unk_10 == OBJ_80_104) { + if (D_i5_801B8E50[var_a0 - 1].unk_10 == OBJ_SCENERY_104) { sp38 = 0.0f; } - if (D_i5_801B8E50[var_a0].unk_10 == OBJ_80_104) { + if (D_i5_801B8E50[var_a0].unk_10 == OBJ_SCENERY_104) { sp28 = 0.0f; } actor->fwork[arg3 + 16] = var_a0; @@ -1818,10 +1834,10 @@ bool Macbeth_801A0308(Actor* actor, f32 arg1, f32 arg2, u8 arg3) { if (sp28 >= 180.0f) { sp28 -= 360.0f; } - if (D_i5_801B8E50[var_a0 - 1].unk_10 == OBJ_80_104) { + if (D_i5_801B8E50[var_a0 - 1].unk_10 == OBJ_SCENERY_104) { sp38 = 0.0f; } - if (D_i5_801B8E50[var_a0].unk_10 == OBJ_80_104) { + if (D_i5_801B8E50[var_a0].unk_10 == OBJ_SCENERY_104) { sp28 = 0.0f; } actor->fwork[arg3 + 16] = var_a0; @@ -1835,13 +1851,13 @@ bool Macbeth_801A0308(Actor* actor, f32 arg1, f32 arg2, u8 arg3) { } sp24 = 1.0f - ((sp2C - arg1) / (sp2C - sp3C)); - if ((sp4C == OBJ_80_95) || (sp4C == OBJ_80_96) || (sp4C == OBJ_80_98) || (sp4C == OBJ_80_99)) { + if ((sp4C == OBJ_SCENERY_95) || (sp4C == OBJ_SCENERY_96) || (sp4C == OBJ_SCENERY_98) || (sp4C == OBJ_SCENERY_99)) { if ((actor->iwork[5] < (s32) D_i5_801BA1E4) && (actor->iwork[5] < D_MA_801BE2F0[3])) { actor->vel.z *= 0.98f; } temp_fv0 = fabsf((sp2C - sp3C) / 3.0f); if (sp24 < 0.3333333f) { - if ((sp4C == OBJ_80_95) || (sp4C == OBJ_80_98)) { + if ((sp4C == OBJ_SCENERY_95) || (sp4C == OBJ_SCENERY_98)) { actor->fwork[19] = (((sp34 - sp44) * sp24) + sp44) - (52.160667f * (1.0f - (((sp3C - temp_fv0) - arg1) / ((sp3C - temp_fv0) - sp3C)))); } else { @@ -1849,12 +1865,12 @@ bool Macbeth_801A0308(Actor* actor, f32 arg1, f32 arg2, u8 arg3) { (52.160667f * (1.0f - (((sp3C - temp_fv0) - arg1) / ((sp3C - temp_fv0) - sp3C)))); } } else if (sp24 < 0.666666f) { - if ((sp4C == OBJ_80_95) || (sp4C == OBJ_80_98)) { + if ((sp4C == OBJ_SCENERY_95) || (sp4C == OBJ_SCENERY_98)) { actor->fwork[19] = (((sp34 - sp44) * sp24) + sp44) - 52.160667f; } else { actor->fwork[19] = ((sp34 - sp44) * sp24) + sp44 + 52.160667f; } - } else if ((sp4C == OBJ_80_95) || (sp4C == OBJ_80_98)) { + } else if ((sp4C == OBJ_SCENERY_95) || (sp4C == OBJ_SCENERY_98)) { actor->fwork[19] = (((sp34 - sp44) * sp24) + sp44) - (52.160667f * (1.0f - (1.0f - ((sp2C - arg1) / (sp2C - (sp3C - (temp_fv0 * 2))))))); } else { @@ -1862,7 +1878,7 @@ bool Macbeth_801A0308(Actor* actor, f32 arg1, f32 arg2, u8 arg3) { (52.160667f * (1.0f - (1.0f - ((sp2C - arg1) / (sp2C - (sp3C - (temp_fv0 * 2))))))); } } else { - if (sp4C == OBJ_80_104) { + if (sp4C == OBJ_SCENERY_104) { if ((actor->iwork[5] < (s32) D_i5_801BA1E4) && (actor->iwork[5] < D_MA_801BE2F0[3])) { actor->vel.z *= 0.94f; } @@ -1870,9 +1886,9 @@ bool Macbeth_801A0308(Actor* actor, f32 arg1, f32 arg2, u8 arg3) { actor->fwork[19] = ((sp34 - sp44) * sp24) + sp44; } actor->fwork[5] = ((sp30 - sp40) * sp24) + sp40; - if ((sp4C == OBJ_80_100) || (sp4C == OBJ_80_102)) { + if ((sp4C == OBJ_SCENERY_100) || (sp4C == OBJ_SCENERY_102)) { Math_SmoothStepToF(&actor->fwork[9], 3.0f, 0.05f, 1.0f, 0.001f); - } else if ((sp4C == OBJ_80_101) || (sp4C == OBJ_80_103)) { + } else if ((sp4C == OBJ_SCENERY_101) || (sp4C == OBJ_SCENERY_103)) { Math_SmoothStepToF(&actor->fwork[9], -3.0f, 0.05f, 1.0f, 0.001f); } else { Math_SmoothStepToF(&actor->fwork[9], 0.0f, 0.05f, 1.0f, 0.0f); @@ -1919,54 +1935,54 @@ bool Macbeth_801A0B20(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return false; } -void Macbeth_801A0BD8(Object_80* obj80) { - switch (obj80->state) { +void Macbeth_801A0BD8(Scenery* scenery) { + switch (scenery->state) { case 0: - obj80->vel.y = 0.0f; - obj80->vel.x = 0.0f; + scenery->vel.y = 0.0f; + scenery->vel.x = 0.0f; if (D_i5_801BE312 != 0) { - obj80->state = 1; - obj80->timer_4C = 20; + scenery->state = 1; + scenery->timer_4C = 20; } break; case 1: - if (obj80->timer_4C == 1) { + if (scenery->timer_4C == 1) { AUDIO_PLAY_SFX(0x01004024, gPlayer[0].sfxSource, 0); } - if (obj80->timer_4C <= 0) { - Math_SmoothStepToF(&obj80->vel.x, 1751.0f, 0.2f, 80.0f, 1.0f); - if (obj80->vel.x >= 1750.0) { - AUDIO_PLAY_SFX(0x1940807B, obj80->sfxSource, 0); + if (scenery->timer_4C <= 0) { + Math_SmoothStepToF(&scenery->vel.x, 1751.0f, 0.2f, 80.0f, 1.0f); + if (scenery->vel.x >= 1750.0) { + AUDIO_PLAY_SFX(0x1940807B, scenery->sfxSource, 0); Audio_KillSfxBySourceAndId(gPlayer[0].sfxSource, 0x01004024); - obj80->timer_4C = 5; - obj80->state = 2; + scenery->timer_4C = 5; + scenery->state = 2; } } break; case 2: - Math_SmoothStepToF(&obj80->vel.y, -11.0f, 0.1f, 2.5f, 0.01f); - if (obj80->vel.y <= -10.0f) { - obj80->state = 3; + Math_SmoothStepToF(&scenery->vel.y, -11.0f, 0.1f, 2.5f, 0.01f); + if (scenery->vel.y <= -10.0f) { + scenery->state = 3; } break; case 3: break; } - if (obj80->timer_4C != 0) { - obj80->vel.z = 2.0f + RAND_FLOAT(1.0f); + if (scenery->timer_4C != 0) { + scenery->vel.z = 2.0f + RAND_FLOAT(1.0f); } else { - obj80->vel.z = 1.0f + RAND_FLOAT(1.0f); + scenery->vel.z = 1.0f + RAND_FLOAT(1.0f); } } bool Macbeth_801A0DD8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { - Object_80* obj80 = (Object_80*) data; + Scenery* scenery = (Scenery*) data; if (limbIndex == 5) { - rot->y += obj80->vel.y; + rot->y += scenery->vel.y; } if ((limbIndex == 1) || (limbIndex == 2)) { - pos->z -= obj80->vel.x; + pos->z -= scenery->vel.x; } return false; } @@ -2278,49 +2294,50 @@ void Macbeth_801A12C4(Actor* actor) { } } -void Macbeth_801A23AC(Object_80* obj80) { +void Macbeth_801A23AC(Scenery* scenery) { Vec3f sp78[50]; RCP_SetupDL(&gMasterDisp, 0x39); - switch (obj80->obj.id) { - case OBJ_80_94: - case OBJ_80_97: + switch (scenery->obj.id) { + case OBJ_SCENERY_94: + case OBJ_SCENERY_97: if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) && - ((gPlayer[0].unk_138 - obj80->obj.pos.z) < -2500.0f)) { - Object_Kill(&obj80->obj, obj80->sfxSource); + ((gPlayer[0].unk_138 - scenery->obj.pos.z) < -2500.0f)) { + Object_Kill(&scenery->obj, scenery->sfxSource); } gSPDisplayList(gMasterDisp++, D_MA_6026860); break; - case OBJ_80_95: - case OBJ_80_98: + case OBJ_SCENERY_95: + case OBJ_SCENERY_98: if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) && - ((gPlayer[0].unk_138 - obj80->obj.pos.z) < -2500.0f)) { - Object_Kill(&obj80->obj, obj80->sfxSource); + ((gPlayer[0].unk_138 - scenery->obj.pos.z) < -2500.0f)) { + Object_Kill(&scenery->obj, scenery->sfxSource); } gSPDisplayList(gMasterDisp++, D_MA_602FBF0); break; - case OBJ_80_96: - case OBJ_80_99: + case OBJ_SCENERY_96: + case OBJ_SCENERY_99: gSPDisplayList(gMasterDisp++, D_MA_6022610); break; - case OBJ_80_100: - case OBJ_80_102: + case OBJ_SCENERY_100: + case OBJ_SCENERY_102: gSPDisplayList(gMasterDisp++, D_MA_60309D0); break; - case OBJ_80_101: - case OBJ_80_103: + case OBJ_SCENERY_101: + case OBJ_SCENERY_103: gSPDisplayList(gMasterDisp++, D_MA_6030750); break; - case OBJ_80_105: + case OBJ_SCENERY_105: RCP_SetupDL(&gMasterDisp, 0x1D); gSPDisplayList(gMasterDisp++, D_MA_602D380); break; - case OBJ_80_104: + case OBJ_SCENERY_104: Matrix_Push(&gGfxMatrix); Animation_GetFrameData(&D_MA_6025CA0, 0, sp78); - Animation_DrawSkeleton(1, D_MA_6025DAC, sp78, Macbeth_801A0DD8, Macbeth_801A0E2C, obj80, &gIdentityMatrix); + Animation_DrawSkeleton(1, D_MA_6025DAC, sp78, Macbeth_801A0DD8, Macbeth_801A0E2C, scenery, + &gIdentityMatrix); Matrix_Pop(&gGfxMatrix); - if ((obj80->state == 1) && (obj80->timer_4C <= 0)) { + if ((scenery->state == 1) && (scenery->timer_4C <= 0)) { Matrix_Push(&gGfxMatrix); RCP_SetupDL_49(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); @@ -2328,7 +2345,7 @@ void Macbeth_801A23AC(Object_80* obj80) { Matrix_Translate(gGfxMatrix, D_i5_801BE688[0].x, D_i5_801BE688[0].y + 50.0f, D_i5_801BE688[0].z + 100.0f, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, (D_PI / 2), MTXF_APPLY); - Matrix_Scale(gGfxMatrix, obj80->vel.z, obj80->vel.z / 2, obj80->vel.z, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, scenery->vel.z, scenery->vel.z / 2, scenery->vel.z, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); Matrix_Pop(&gGfxMatrix); @@ -2336,12 +2353,12 @@ void Macbeth_801A23AC(Object_80* obj80) { Matrix_Translate(gGfxMatrix, D_i5_801BE688[1].x, D_i5_801BE688[1].y + 50.0f, D_i5_801BE688[1].z + 100.0f, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, (D_PI / 2), MTXF_APPLY); - Matrix_Scale(gGfxMatrix, obj80->vel.z, obj80->vel.z / 2, obj80->vel.z, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, scenery->vel.z, scenery->vel.z / 2, scenery->vel.z, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); RCP_SetupDL(&gMasterDisp, 0x1D); Matrix_Pop(&gGfxMatrix); - } else if (obj80->state == 2) { + } else if (scenery->state == 2) { Matrix_Push(&gGfxMatrix); RCP_SetupDL_49(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); @@ -2349,7 +2366,7 @@ void Macbeth_801A23AC(Object_80* obj80) { Matrix_Translate(gGfxMatrix, D_i5_801BE688[1].x - 50.0f, D_i5_801BE688[1].y + 50.0f, D_i5_801BE688[1].z + 50.0f, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, (D_PI / 2), MTXF_APPLY); - Matrix_Scale(gGfxMatrix, obj80->vel.z, obj80->vel.z / 2, obj80->vel.z, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, scenery->vel.z, scenery->vel.z / 2, scenery->vel.z, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); RCP_SetupDL(&gMasterDisp, 0x1D); @@ -2370,17 +2387,17 @@ void Macbeth_801A23AC(Object_80* obj80) { Matrix_Pop(&gGfxMatrix); } break; - case OBJ_80_92: + case OBJ_SCENERY_92: gSPDisplayList(gMasterDisp++, D_MA_60014A0); break; - case OBJ_80_93: + case OBJ_SCENERY_93: gSPDisplayList(gMasterDisp++, D_MA_6001180); break; } RCP_SetupDL(&gMasterDisp, 0x1D); } -void Macbeth_801A2A78(Object_80* obj80) { +void Macbeth_801A2A78(Scenery* scenery) { RCP_SetupDL(&gMasterDisp, 0x39); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_MA_60253E0); @@ -2389,83 +2406,83 @@ void Macbeth_801A2A78(Object_80* obj80) { RCP_SetupDL(&gMasterDisp, 0x1D); } -void Macbeth_801A2B24(Object_80* obj80) { +void Macbeth_801A2B24(Scenery* scenery) { if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) { - Object_Kill(&obj80->obj, obj80->sfxSource); + Object_Kill(&scenery->obj, scenery->sfxSource); } RCP_SetupDL(&gMasterDisp, 0x39); - switch (obj80->obj.id) { - case OBJ_80_77: + switch (scenery->obj.id) { + case OBJ_SCENERY_77: gSPDisplayList(gMasterDisp++, D_MA_60066A0); break; - case OBJ_80_78: + case OBJ_SCENERY_78: gSPDisplayList(gMasterDisp++, D_MA_6007430); break; - case OBJ_80_79: + case OBJ_SCENERY_79: gSPDisplayList(gMasterDisp++, D_MA_6007360); break; - case OBJ_80_80: + case OBJ_SCENERY_80: gSPDisplayList(gMasterDisp++, D_MA_6007290); break; - case OBJ_80_81: + case OBJ_SCENERY_81: gSPDisplayList(gMasterDisp++, D_MA_60071C0); break; - case OBJ_80_82: + case OBJ_SCENERY_82: gSPDisplayList(gMasterDisp++, D_MA_6007500); break; - case OBJ_80_84: + case OBJ_SCENERY_84: gSPDisplayList(gMasterDisp++, D_MA_600AD50); break; - case OBJ_80_85: + case OBJ_SCENERY_85: gSPDisplayList(gMasterDisp++, D_MA_600AA70); break; - case OBJ_80_86: + case OBJ_SCENERY_86: gSPDisplayList(gMasterDisp++, D_MA_6003070); break; - case OBJ_80_87: + case OBJ_SCENERY_87: gSPDisplayList(gMasterDisp++, D_MA_600A7D0); break; - case OBJ_80_88: + case OBJ_SCENERY_88: gSPDisplayList(gMasterDisp++, D_MA_600A4D0); break; - case OBJ_80_89: + case OBJ_SCENERY_89: gSPDisplayList(gMasterDisp++, D_MA_600A1F0); break; - case OBJ_80_90: + case OBJ_SCENERY_90: gSPDisplayList(gMasterDisp++, D_MA_6009F10); break; - case OBJ_80_91: + case OBJ_SCENERY_91: gSPDisplayList(gMasterDisp++, D_MA_6009C50); break; } RCP_SetupDL(&gMasterDisp, 0x1D); } -void Macbeth_801A2DD8(Object_80* obj80) { +void Macbeth_801A2DD8(Scenery* scenery) { s16 i; - switch (obj80->state) { + switch (scenery->state) { case 0: - if ((D_i5_801BE312 != 0) && (gActors[D_i5_801BE314].obj.pos.z - 900.0f < obj80->obj.pos.z)) { - obj80->state = 1; + if ((D_i5_801BE312 != 0) && (gActors[D_i5_801BE314].obj.pos.z - 900.0f < scenery->obj.pos.z)) { + scenery->state = 1; } break; case 1: - func_effect_8007A6F0(&obj80->obj.pos, 0x2903B009); + func_effect_8007A6F0(&scenery->obj.pos, 0x2903B009); gControllerRumbleFlags[gMainController] = 1; gControllerRumbleTimers[gMainController] = 15; for (i = 0; i < 6; i++) { - func_effect_8007D2C8(obj80->obj.pos.x + D_i5_801BE6A0[i].x, obj80->obj.pos.y + D_i5_801BE6A0[i].y, - obj80->obj.pos.z + D_i5_801BE6A0[i].z, 18.0f); - Macbeth_801AD624(obj80->obj.pos.x + D_i5_801BE6A0[i].x, obj80->obj.pos.y + D_i5_801BE6A0[i].y, - obj80->obj.pos.z + D_i5_801BE6A0[i].z, RAND_FLOAT_CENTERED(30.0f), - RAND_FLOAT(30.0f) + 30.0f, RAND_FLOAT(-50.0f), - obj80->obj.rot.x + D_i5_801BE6A0[i + 6].x, obj80->obj.rot.y + D_i5_801BE6A0[i + 6].y, - obj80->obj.rot.z + D_i5_801BE6A0[i + 6].z, RAND_FLOAT_CENTERED(5.0f), - RAND_FLOAT_CENTERED(5.0f), RAND_FLOAT_CENTERED(5.0f), - (s32) (RAND_FLOAT(50.0f) + 70.0f), i + 12, 1.0f); + func_effect_8007D2C8(scenery->obj.pos.x + D_i5_801BE6A0[i].x, scenery->obj.pos.y + D_i5_801BE6A0[i].y, + scenery->obj.pos.z + D_i5_801BE6A0[i].z, 18.0f); + Macbeth_801AD624( + scenery->obj.pos.x + D_i5_801BE6A0[i].x, scenery->obj.pos.y + D_i5_801BE6A0[i].y, + scenery->obj.pos.z + D_i5_801BE6A0[i].z, RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT(30.0f) + 30.0f, + RAND_FLOAT(-50.0f), scenery->obj.rot.x + D_i5_801BE6A0[i + 6].x, + scenery->obj.rot.y + D_i5_801BE6A0[i + 6].y, scenery->obj.rot.z + D_i5_801BE6A0[i + 6].z, + RAND_FLOAT_CENTERED(5.0f), RAND_FLOAT_CENTERED(5.0f), RAND_FLOAT_CENTERED(5.0f), + (s32) (RAND_FLOAT(50.0f) + 70.0f), i + 12, 1.0f); } - Object_Kill(&obj80->obj, obj80->sfxSource); + Object_Kill(&scenery->obj, scenery->sfxSource); break; } } @@ -2503,13 +2520,13 @@ void Macbeth_801A30B8(s32 limbIndex, Vec3f* rot, void* data) { } } -void Macbeth_801A3240(Object_80* obj80) { +void Macbeth_801A3240(Scenery* scenery) { Vec3f sp38[50]; RCP_SetupDL(&gMasterDisp, 0x1D); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); Animation_GetFrameData(&D_MA_600C4D0, 0, sp38); - Animation_DrawSkeleton(1, D_MA_600C65C, sp38, NULL, Macbeth_801A30B8, obj80, &gIdentityMatrix); + Animation_DrawSkeleton(1, D_MA_600C65C, sp38, NULL, Macbeth_801A30B8, scenery, &gIdentityMatrix); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); } @@ -2547,15 +2564,15 @@ bool Macbeth_801A3300(Player* player, f32 arg1, f32 arg2) { if (var_v1 != D_MA_801BE250[6]) { D_MA_801BE250[7] = arg2; switch (D_i5_801B8E50[var_v1 - 1].unk_10) { - case OBJ_80_94: - case OBJ_80_100: - case OBJ_80_101: + case OBJ_SCENERY_94: + case OBJ_SCENERY_100: + case OBJ_SCENERY_101: D_MA_801BE250[8] = 0.0f; break; - case OBJ_80_95: + case OBJ_SCENERY_95: D_MA_801BE250[8] = -10.0f; break; - case OBJ_80_96: + case OBJ_SCENERY_96: D_MA_801BE250[8] = 10.0f; break; } @@ -2569,10 +2586,11 @@ bool Macbeth_801A3300(Player* player, f32 arg1, f32 arg2) { sp2C = 1.0f - ((sp30 - arg1) / (sp30 - temp_ft4)); - if ((temp_a0 == OBJ_80_95) || (temp_a0 == OBJ_80_96) || (temp_a0 == OBJ_80_98) || (temp_a0 == OBJ_80_99)) { + if ((temp_a0 == OBJ_SCENERY_95) || (temp_a0 == OBJ_SCENERY_96) || (temp_a0 == OBJ_SCENERY_98) || + (temp_a0 == OBJ_SCENERY_99)) { temp_fv0_2 = fabsf((sp30 - temp_ft4) / 3.0f); if (sp2C < 0.3333333f) { - if ((temp_a0 == OBJ_80_95) || (temp_a0 == OBJ_80_98)) { + if ((temp_a0 == OBJ_SCENERY_95) || (temp_a0 == OBJ_SCENERY_98)) { D_MA_801BE250[9] = (((sp38 - temp_fa0) * sp2C) + temp_fa0) - (52.160667f * (1.0f - (((temp_ft4 - temp_fv0_2) - arg1) / ((temp_ft4 - temp_fv0_2) - temp_ft4)))); @@ -2582,12 +2600,12 @@ bool Macbeth_801A3300(Player* player, f32 arg1, f32 arg2) { (52.160667f * (1.0f - (((temp_ft4 - temp_fv0_2) - arg1) / ((temp_ft4 - temp_fv0_2) - temp_ft4)))); } } else if (sp2C < 0.666666f) { - if ((temp_a0 == OBJ_80_95) || (temp_a0 == OBJ_80_98)) { + if ((temp_a0 == OBJ_SCENERY_95) || (temp_a0 == OBJ_SCENERY_98)) { D_MA_801BE250[9] = (((sp38 - temp_fa0) * sp2C) + temp_fa0) - 52.160667f; } else { D_MA_801BE250[9] = (((sp38 - temp_fa0) * sp2C) + temp_fa0 + 52.160667f); } - } else if ((temp_a0 == OBJ_80_95) || (temp_a0 == OBJ_80_98)) { + } else if ((temp_a0 == OBJ_SCENERY_95) || (temp_a0 == OBJ_SCENERY_98)) { D_MA_801BE250[9] = (((sp38 - temp_fa0) * sp2C) + temp_fa0) - (52.160667f * (1.0f - (1.0f - ((sp30 - arg1) / (sp30 - (temp_ft4 - (temp_fv0_2 * 2))))))); @@ -2600,9 +2618,9 @@ bool Macbeth_801A3300(Player* player, f32 arg1, f32 arg2) { D_MA_801BE250[9] = ((sp38 - temp_fa0) * sp2C) + temp_fa0; } D_MA_801BE250[2] = (((sp34 - sp40) * sp2C) + sp40); - if ((temp_a0 == 100) || (temp_a0 == OBJ_80_102)) { + if ((temp_a0 == 100) || (temp_a0 == OBJ_SCENERY_102)) { Math_SmoothStepToF(&D_MA_801BE250[3], 3.0f, 0.05f, 1.0f, 0.0f); - } else if ((temp_a0 == OBJ_80_101) || (temp_a0 == OBJ_80_103)) { + } else if ((temp_a0 == OBJ_SCENERY_101) || (temp_a0 == OBJ_SCENERY_103)) { Math_SmoothStepToF(&D_MA_801BE250[3], -3.0f, 0.05f, 1.0f, 0.0f); } else { Math_SmoothStepToF(&D_MA_801BE250[3], 0.0f, 0.05f, 1.0f, 0.0f); @@ -2646,15 +2664,15 @@ bool Macbeth_801A3790(Player* player, f32 arg1, f32 arg2) { if (var_v1 != D_MA_801BE250[16]) { D_MA_801BE250[17] = arg2; switch (D_i5_801B9A80[var_v1 - 1].unk_10) { - case OBJ_80_97: - case OBJ_80_100: - case OBJ_80_101: + case OBJ_SCENERY_97: + case OBJ_SCENERY_100: + case OBJ_SCENERY_101: D_MA_801BE250[18] = 0.0f; break; - case OBJ_80_98: + case OBJ_SCENERY_98: D_MA_801BE250[18] = -10.0f; break; - case OBJ_80_99: + case OBJ_SCENERY_99: D_MA_801BE250[18] = 10.0f; break; } @@ -2668,10 +2686,11 @@ bool Macbeth_801A3790(Player* player, f32 arg1, f32 arg2) { sp2C = 1.0f - ((sp30 - arg1) / (sp30 - temp_ft4)); - if ((temp_a0 == OBJ_80_95) || (temp_a0 == OBJ_80_96) || (temp_a0 == OBJ_80_98) || (temp_a0 == OBJ_80_99)) { + if ((temp_a0 == OBJ_SCENERY_95) || (temp_a0 == OBJ_SCENERY_96) || (temp_a0 == OBJ_SCENERY_98) || + (temp_a0 == OBJ_SCENERY_99)) { temp_fv0_2 = fabsf((sp30 - temp_ft4) / 3.0f); if (sp2C < 0.3333333f) { - if ((temp_a0 == OBJ_80_95) || (temp_a0 == OBJ_80_98)) { + if ((temp_a0 == OBJ_SCENERY_95) || (temp_a0 == OBJ_SCENERY_98)) { D_MA_801BE250[19] = (((sp38 - temp_fa0) * sp2C) + temp_fa0) - (52.160667f * (1.0f - (((temp_ft4 - temp_fv0_2) - arg1) / ((temp_ft4 - temp_fv0_2) - temp_ft4)))); @@ -2681,12 +2700,12 @@ bool Macbeth_801A3790(Player* player, f32 arg1, f32 arg2) { (52.160667f * (1.0f - (((temp_ft4 - temp_fv0_2) - arg1) / ((temp_ft4 - temp_fv0_2) - temp_ft4)))); } } else if (sp2C < 0.666666f) { - if ((temp_a0 == OBJ_80_95) || (temp_a0 == OBJ_80_98)) { + if ((temp_a0 == OBJ_SCENERY_95) || (temp_a0 == OBJ_SCENERY_98)) { D_MA_801BE250[19] = (((sp38 - temp_fa0) * sp2C) + temp_fa0) - 52.160667f; } else { D_MA_801BE250[19] = (((sp38 - temp_fa0) * sp2C) + temp_fa0 + 52.160667f); } - } else if ((temp_a0 == OBJ_80_95) || (temp_a0 == OBJ_80_98)) { + } else if ((temp_a0 == OBJ_SCENERY_95) || (temp_a0 == OBJ_SCENERY_98)) { D_MA_801BE250[19] = (((sp38 - temp_fa0) * sp2C) + temp_fa0) - (52.160667f * (1.0f - (1.0f - ((sp30 - arg1) / (sp30 - (temp_ft4 - (temp_fv0_2 * 2))))))); @@ -2699,9 +2718,9 @@ bool Macbeth_801A3790(Player* player, f32 arg1, f32 arg2) { D_MA_801BE250[19] = ((sp38 - temp_fa0) * sp2C) + temp_fa0; } D_MA_801BE250[12] = (((sp34 - sp40) * sp2C) + sp40); - if ((temp_a0 == OBJ_80_100) || (temp_a0 == OBJ_80_102)) { + if ((temp_a0 == OBJ_SCENERY_100) || (temp_a0 == OBJ_SCENERY_102)) { Math_SmoothStepToF(&D_MA_801BE250[13], 2.0f, 0.05f, 1.0f, 0.0f); - } else if ((temp_a0 == OBJ_80_101) || (temp_a0 == OBJ_80_103)) { + } else if ((temp_a0 == OBJ_SCENERY_101) || (temp_a0 == OBJ_SCENERY_103)) { Math_SmoothStepToF(&D_MA_801BE250[13], -2.0f, 0.05f, 1.0f, 0.0f); } else { Math_SmoothStepToF(&D_MA_801BE250[13], 0.0f, 0.05f, 1.0f, 0.0f); @@ -3115,15 +3134,15 @@ void Macbeth_801A54E8(Actor* actor) { } s32 Macbeth_801A55D4(s32 arg0, Vec3f* arg1, Vec3f* arg2, s32 arg3) { - Object_80* obj80; + Scenery* scenery; Actor* actor; s32 i; - obj80 = &gObjects80[0]; - for (i = 0; i < ARRAY_COUNT(gObjects80); i++, obj80++) { - if ((obj80->obj.status == OBJ_ACTIVE) && (obj80->obj.id != OBJ_80_68) && - (fabsf(arg1->x - obj80->obj.pos.x) < 2000.0f) && (fabsf(arg1->z - obj80->obj.pos.z) < 2000.0f) && - (Object_CheckHitboxCollision(arg1, obj80->info.hitbox, &obj80->obj, 0.0f, 0.0f, 0.0f) != 0)) { + scenery = &gScenery[0]; + for (i = 0; i < ARRAY_COUNT(gScenery); i++, scenery++) { + if ((scenery->obj.status == OBJ_ACTIVE) && (scenery->obj.id != OBJ_SCENERY_68) && + (fabsf(arg1->x - scenery->obj.pos.x) < 2000.0f) && (fabsf(arg1->z - scenery->obj.pos.z) < 2000.0f) && + (Object_CheckHitboxCollision(arg1, scenery->info.hitbox, &scenery->obj, 0.0f, 0.0f, 0.0f) != 0)) { return i + 10; } } @@ -3135,9 +3154,9 @@ s32 Macbeth_801A55D4(s32 arg0, Vec3f* arg1, Vec3f* arg2, s32 arg3) { (actor->timer_0C2 == 0) && (Object_CheckSingleHitbox(arg1, actor->info.hitbox, &actor->obj.pos) != 0)) { actor->unk_0D0 = 1; actor->unk_0D2 = -1; - actor->unk_0D8.x = arg1->x; - actor->unk_0D8.y = arg1->y; - actor->unk_0D8.z = arg1->z; + actor->hitPos.x = arg1->x; + actor->hitPos.y = arg1->y; + actor->hitPos.z = arg1->z; return 1; } } @@ -3184,11 +3203,11 @@ void Macbeth_801A57D0(Effect* effect) { } } - if (effect->obj.pos.y < gGroundLevel) { + if (effect->obj.pos.y < gGroundHeight) { Macbeth_801ADCEC(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 999.9f, -10.0f, 5.0f); Object_Kill(&effect->obj, effect->sfxSource); if (gGroundType != GROUNDTYPE_WATER) { - effect->obj.pos.y = gGroundLevel; + effect->obj.pos.y = gGroundHeight; } } sp38.x = effect->vel.x; @@ -3231,7 +3250,7 @@ void Macbeth_801A5B4C(Effect* effect) { } Object_Kill(&effect->obj, effect->sfxSource); } - if (effect->obj.pos.y < (gGroundLevel - 100.0f)) { + if (effect->obj.pos.y < (gGroundHeight - 100.0f)) { Object_Kill(&effect->obj, effect->sfxSource); } @@ -3360,23 +3379,23 @@ void Macbeth_801A6540(Actor* actor) { RCP_SetupDL(&gMasterDisp, 0x1D); } -void Macbeth_801A65E0(Object_80* obj80) { - obj80->vel.x = obj80->obj.pos.x; - obj80->vel.y = obj80->obj.pos.y; - obj80->vel.z = obj80->obj.rot.z; - obj80->obj.rot.z = 0.0f; +void Macbeth_801A65E0(Scenery* scenery) { + scenery->vel.x = scenery->obj.pos.x; + scenery->vel.y = scenery->obj.pos.y; + scenery->vel.z = scenery->obj.rot.z; + scenery->obj.rot.z = 0.0f; } -void Macbeth_801A6608(Object_80* obj80) { - if ((gPlayer[0].unk_138 - obj80->obj.pos.z) < obj80->vel.z) { +void Macbeth_801A6608(Scenery* scenery) { + if ((gPlayer[0].unk_138 - scenery->obj.pos.z) < scenery->vel.z) { if (gPlayState != PLAY_PAUSE) { - Math_SmoothStepToF(&obj80->vel.x, 30, 0.5f, 30.0f, 0.0f); - if (obj80->vel.x < 31.0f) { - obj80->vel.x = 255.0f; + Math_SmoothStepToF(&scenery->vel.x, 30, 0.5f, 30.0f, 0.0f); + if (scenery->vel.x < 31.0f) { + scenery->vel.x = 255.0f; } } RCP_SetupDL(&gMasterDisp, 0x22); - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, obj80->vel.x, 0, 0, 255); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, scenery->vel.x, 0, 0, 255); } gSPDisplayList(gMasterDisp++, D_MA_6010700); RCP_SetupDL(&gMasterDisp, 0x1D); @@ -3756,7 +3775,7 @@ void Macbeth_801A7D98(Actor* actor) { D_i5_801BE320[29] = 250; D_i5_801BE320[9] = 200; D_i5_801BE320[10] = 250; - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(gHitboxNone); + actor->info.hitbox = SEGMENTED_TO_VIRTUAL(gNoHitbox); D_i5_801BE320[14] = 0; D_i5_801BE320[15] = 0; gBossFrameCount = 0; @@ -3970,7 +3989,7 @@ void Macbeth_801A7E7C(Actor* actor) { AUDIO_PLAY_SFX(0x2902405E, actor->sfxSource, 4); } } else { - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(gHitboxNone); + actor->info.hitbox = SEGMENTED_TO_VIRTUAL(gNoHitbox); if ((gPlayer[0].pos.y + 1200.0f) < actor->obj.pos.y) { actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_603677C); D_i5_801BE320[3] = 0; @@ -4899,7 +4918,7 @@ void Macbeth_801AC6B4(Actor* actor) { static f32 D_i5_801BA768 = 0.0f; -void Macbeth_801AC754(Player* player) { +void Macbeth_LevelStart(Player* player) { f32 sp4C; f32 sp48; f32 sp44; @@ -4991,7 +5010,7 @@ void Macbeth_801AC754(Player* player) { break; case 3: AUDIO_PLAY_BGM(SEQ_ID_MACBETH | SEQ_FLAG); - gLevelStatusScreenTimer = 50; + gLevelStartStatusScreenTimer = 50; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_1D0 = player->timer_1F8 = player->timer_1FC = player->unk_240 = 0; player->unk_0D4 = 3.0f; @@ -5187,12 +5206,12 @@ void Macbeth_801AD6F0(Actor* actor) { case 0: if ((actor->timer_0BC == 0) && ((actor->vel.y -= 0.5f, (Object_CheckCollision(actor->index, &actor->obj.pos, &sp4C, 1) != 0)) || - (actor->obj.pos.y < (gGroundLevel + 10.0f)) || (actor->iwork[0] != 0))) { + (actor->obj.pos.y < (gGroundHeight + 10.0f)) || (actor->iwork[0] != 0))) { actor->vel.x = 0.0f; actor->vel.y = 0.0f; actor->vel.z = 0.0f; - if (actor->obj.pos.y < (gGroundLevel + 10.0f)) { - actor->obj.pos.y = gGroundLevel; + if (actor->obj.pos.y < (gGroundHeight + 10.0f)) { + actor->obj.pos.y = gGroundHeight; } actor->state = 1; actor->timer_0BC = 200; @@ -5203,7 +5222,7 @@ void Macbeth_801AD6F0(Actor* actor) { func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z, 7.0f); func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, 4.0f, 5); - if (actor->obj.pos.y < (gGroundLevel + 10.0f)) { + if (actor->obj.pos.y < (gGroundHeight + 10.0f)) { func_beam_800365E4(actor->obj.pos.x, 3.0f, actor->obj.pos.z, actor->obj.pos.x, actor->obj.pos.z, 0.0f, 0.0f, 90.0f, 5.0f, 0, 0); } @@ -5326,19 +5345,19 @@ void Macbeth_801ADD68(Actor* actor) { } } if ((Object_CheckCollision(actor->index, &actor->obj.pos, &sp3C, 1) != 0) || - (actor->obj.pos.y < (gGroundLevel + 200.0f))) { + (actor->obj.pos.y < (gGroundHeight + 200.0f))) { AUDIO_PLAY_SFX(0x19032064, actor->sfxSource, 4); gControllerRumbleFlags[gMainController] = 1; gControllerRumbleTimers[gMainController] = 5; actor->vel.x = 0.0f; actor->vel.y = 0.0f; actor->vel.z = 0.0f; - if (actor->obj.pos.y < gGroundLevel + 200.0f) { - actor->obj.pos.y = gGroundLevel + 200.0f; + if (actor->obj.pos.y < gGroundHeight + 200.0f) { + actor->obj.pos.y = gGroundHeight + 200.0f; } actor->state = 1; } - if (actor->obj.pos.y < (gGroundLevel + 800.0f)) { + if (actor->obj.pos.y < (gGroundHeight + 800.0f)) { if (actor->iwork[0] > 10) { actor->iwork[0] -= 10; } else if (actor->iwork[0] > 0) { @@ -5556,12 +5575,12 @@ void Macbeth_801AEC04(Actor* actor) { switch (actor->state) { case 0: actor->vel.y -= 0.5f; - if (actor->obj.pos.y < (gGroundLevel + 35.0f)) { + if (actor->obj.pos.y < (gGroundHeight + 35.0f)) { actor->vel.x = 0.0f; actor->vel.y = 0.0f; actor->vel.z = 0.0f; - if (actor->obj.pos.y < gGroundLevel + 35.0f) { - actor->obj.pos.y = gGroundLevel + 35.0f; + if (actor->obj.pos.y < gGroundHeight + 35.0f) { + actor->obj.pos.y = gGroundHeight + 35.0f; } actor->state = 1; actor->timer_0BC = 200; @@ -5789,7 +5808,7 @@ static f32 D_i5_801BA890 = 100.0f; // unused? static f32 D_i5_801BA894[5] = { 200.0f, 250.0f, 220.0f, 0.0f, 200.0f }; static f32 D_i5_801BA8A8[3] = { 230.0f, 220.0f, 350.0f }; // unused? -void Macbeth_801AF8F4(Player* player) { +void Macbeth_LevelComplete2(Player* player) { s32 i; s32 j; Vec3f spE4; @@ -6213,9 +6232,9 @@ void Macbeth_801AF8F4(Player* player) { D_ctx_80177A48[3] = D_ctx_80177A48[6] = D_ctx_80177A48[7] = D_ctx_80177A48[8] = 0.0f; player->unk_1D4 = 1; player->unk_1F4 = 0; - player->pos.y = gGroundLevel - 3.0f; + player->pos.y = gGroundHeight - 3.0f; player->vel.y = -3.0f; - player->unk_1DC = player->unk_2B4 = player->unk_2BC = player->unk_184 = player->unk_108 = + player->unk_1DC = player->boostCooldown = player->boostMeter = player->unk_184 = player->unk_108 = player->unk_10C = player->unk_0E8 = player->unk_0E4 = player->unk_104 = 0.0f; player->timer_1E0 = player->sfx.bank = 0; } @@ -6379,17 +6398,17 @@ void Macbeth_801AF8F4(Player* player) { break; case 1810: Object_Kill(&gActors[8].obj, gActors[8].sfxSource); - gOverlayStage = 1; + gSceneSetup = 1; break; case 1817: - D_ctx_80177830 = 1; + gShowLevelClearStatusScreen = 1; break; case 1960: Macbeth_801AF27C(&gActors[3], 3); - gActors[3].info.hitbox = SEGMENTED_TO_VIRTUAL(gHitboxNone); + gActors[3].info.hitbox = SEGMENTED_TO_VIRTUAL(gNoHitbox); break; case 2017: - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; break; case 2040: gActors[5].state++; @@ -6439,7 +6458,7 @@ void Macbeth_801AF8F4(Player* player) { gFillScreenAlphaTarget = 255; if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; - D_ctx_8017837C = 4; + gFadeoutType = 4; Play_ClearObjectData(); Audio_FadeOutAll(10); D_play_800D3180[LEVEL_MACBETH] = Play_CheckMedalStatus(150) + 1; @@ -6696,9 +6715,9 @@ void Macbeth_801B38E0(void) { } for (i = 0; i < 50; i++) { - if (gObjects80[i].obj.id <= OBJ_80_91 || gObjects80[i].obj.id >= OBJ_80_97) { - Object_Kill(&gObjects80[i].obj, gObjects80[i].sfxSource); - Object_80_Initialize(&gObjects80[i]); + if (gScenery[i].obj.id <= OBJ_SCENERY_91 || gScenery[i].obj.id >= OBJ_SCENERY_97) { + Object_Kill(&gScenery[i].obj, gScenery[i].sfxSource); + Scenery_Initialize(&gScenery[i]); } } @@ -6749,7 +6768,7 @@ void Macbeth_801B38E0(void) { } } -void Macbeth_801B3D04(Player* player) { +void Macbeth_LevelComplete1(Player* player) { f32 zeroVar = 0.0f; gCsCamEyeX = player->pos.x; @@ -6883,10 +6902,10 @@ void Macbeth_801B3D04(Player* player) { } switch (gCsFrameCount) { case 755: - D_ctx_80177830 = 1; + gShowLevelClearStatusScreen = 1; break; case 1025: - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; break; case 50: AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); @@ -6981,7 +7000,7 @@ void Macbeth_801B3D04(Player* player) { } /* fallthrough */ case 1195: - gOverlayStage = 1; + gSceneSetup = 1; break; case 1200: Macbeth_801B3554(&gActors[3], 3); @@ -7008,7 +7027,7 @@ void Macbeth_801B3D04(Player* player) { gFillScreenAlphaTarget = 255; if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; - D_ctx_8017837C = 4; + gFadeoutType = 4; Play_ClearObjectData(); Audio_FadeOutAll(10); D_play_800D3180[LEVEL_MACBETH] = Play_CheckMedalStatus(150) + 1; diff --git a/src/overlays/ovl_i5/fox_ti.c b/src/overlays/ovl_i5/fox_ti.c index 0a0e8203..7ff65057 100644 --- a/src/overlays/ovl_i5/fox_ti.c +++ b/src/overlays/ovl_i5/fox_ti.c @@ -360,7 +360,7 @@ void Titania_80189CC8(Actor* actor) { if (actor->health <= 0) { actor->health = 0; AUDIO_PLAY_SFX(0x2903A008, actor->sfxSource, 4); - actor->timer_0CA[0] = actor->itemDrop = 0; + actor->lockOnTimers[0] = actor->itemDrop = 0; actor->info.unk_1C = 0.0f; Actor_Despawn(actor); actor->info.bonus = 0; @@ -866,7 +866,7 @@ void Titania_8018B268(Actor* actor) { Animation_DrawSkeleton(0, D_TI1_700D700, actor->vwork, Titania_8018AFD4, Titania_8018B1B4, actor, &gIdentityMatrix); func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f); - actor->timer_0CA[0] = 0; + actor->lockOnTimers[0] = 0; actor->info.unk_1C = 0.0f; } } @@ -1020,7 +1020,7 @@ void Titania_8018B9D0(Actor* actor) { if (actor->unk_0D0 == 1) { AUDIO_PLAY_SFX(0x19020008, actor->sfxSource, 4); - sp44 = actor->obj.pos.x - actor->unk_0D8.x; + sp44 = actor->obj.pos.x - actor->hitPos.x; sp40 = fabsf(sp44); actor->unk_0D0 = 0; actor->state = 1; @@ -1679,7 +1679,7 @@ void Titania_8018C8A8(Actor* actor) { if (actor->health > 0) { actor->info.unk_1C = actor->fwork[27]; } else { - actor->timer_0CA[0] = 0; + actor->lockOnTimers[0] = 0; actor->info.unk_1C = 0.0f; } actor->unk_0D0 = 0; @@ -1882,7 +1882,7 @@ void Titania_8018E5F8(Actor* actor) { if (actor->health <= 0) { BonusText_Display(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + actor->fwork[27], 2); gHitCount += 2; - actor->timer_0CA[0] = actor->health = actor->itemDrop = 0; + actor->lockOnTimers[0] = actor->health = actor->itemDrop = 0; actor->info.unk_1C = 0.0f; Actor_Despawn(actor); actor->info.bonus = 0; @@ -2005,17 +2005,17 @@ void Titania_Cactus_Update(Sprite* sprite) { } } -void Titania_8018F0D8(Object_80* obj80) { +void Titania_8018F0D8(Scenery* scenery) { - if (obj80->obj.rot.x != 0.0f) { - if (obj80->obj.rot.x >= 10000.0f) { - obj80->unk_44 = 1; - obj80->obj.rot.x -= 10000.0f; + if (scenery->obj.rot.x != 0.0f) { + if (scenery->obj.rot.x >= 10000.0f) { + scenery->unk_44 = 1; + scenery->obj.rot.x -= 10000.0f; } - obj80->vel.y = obj80->obj.rot.x; - obj80->obj.rot.x = 0.0f; + scenery->vel.y = scenery->obj.rot.x; + scenery->obj.rot.x = 0.0f; } - obj80->vel.z = obj80->obj.pos.x; + scenery->vel.z = scenery->obj.pos.x; } static Vec3f D_i5_801B7690 = { 0.0f, 460.0f, 0.0f }; @@ -2028,103 +2028,103 @@ Gfx* D_TI_801B769C[39] = { D_TI2_7004400, D_TI2_7009890, D_TI_8001A80, D_TI_A001DB0, D_TI_A001EC0, D_TI_A001BE0, D_TI2_7004270, }; -void Titania_8018F134(Object_80* obj80) { +void Titania_8018F134(Scenery* scenery) { Vec3f sp7C; Vec3f sp70; f32 i; f32* j = &D_i5_801B7690.x; - switch (obj80->unk_44) { + switch (scenery->unk_44) { case 0: - Matrix_RotateY(gCalcMatrix, obj80->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, obj80->obj.rot.x * M_DTOR, MTXF_APPLY); - if ((obj80->obj.rot.y <= 30.0f) || (obj80->obj.rot.y >= 330.0f)) { + Matrix_RotateY(gCalcMatrix, scenery->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, scenery->obj.rot.x * M_DTOR, MTXF_APPLY); + if ((scenery->obj.rot.y <= 30.0f) || (scenery->obj.rot.y >= 330.0f)) { for (*j = -80.0f; *j <= 80.0f; *j += 40.0f) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_i5_801B7690, &sp70); - func_effect_8007A900(obj80->obj.pos.x + sp70.x, obj80->obj.pos.y + sp70.y, - obj80->obj.pos.z + sp70.z, 10.0f, 255, 15, 0); + func_effect_8007A900(scenery->obj.pos.x + sp70.x, scenery->obj.pos.y + sp70.y, + scenery->obj.pos.z + sp70.z, 10.0f, 255, 15, 0); } } else { sp7C.z = 0.0f; sp7C.x = -80.0f; - if (obj80->obj.rot.y > 90.0f) { + if (scenery->obj.rot.y > 90.0f) { sp7C.x = 80.0f; } for (i = 0.0f; i <= 450.0f; i += 50.0f) { - Matrix_RotateY(gCalcMatrix, obj80->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, obj80->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, scenery->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, scenery->obj.rot.x * M_DTOR, MTXF_APPLY); sp7C.y = i; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp7C, &sp70); - func_effect_8007A900(obj80->obj.pos.x + sp70.x, obj80->obj.pos.y + sp70.y, - obj80->obj.pos.z + sp70.z, 10.0f, 255, 15, 0); + func_effect_8007A900(scenery->obj.pos.x + sp70.x, scenery->obj.pos.y + sp70.y, + scenery->obj.pos.z + sp70.z, 10.0f, 255, 15, 0); } } break; case 1: - Matrix_RotateZ(gCalcMatrix, obj80->obj.rot.z * M_DTOR, MTXF_NEW); + Matrix_RotateZ(gCalcMatrix, scenery->obj.rot.z * M_DTOR, MTXF_NEW); sp7C.z = 0.0f; sp7C.x = 0.0f; for (i = 0.0f; i <= 450.0f; i += 50.0f) { sp7C.y = i; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp7C, &sp70); - func_effect_8007A900(obj80->obj.pos.x + sp70.x, obj80->obj.pos.y + sp70.y, obj80->obj.pos.z + sp70.z, - 10.0f, 255, 15, 0); + func_effect_8007A900(scenery->obj.pos.x + sp70.x, scenery->obj.pos.y + sp70.y, + scenery->obj.pos.z + sp70.z, 10.0f, 255, 15, 0); } break; } } -void Titania_8018F4D8(Object_80* obj80) { +void Titania_8018F4D8(Scenery* scenery) { f32 temp; - switch (obj80->state) { + switch (scenery->state) { case 0: - temp = gPlayer[0].pos.z - obj80->obj.pos.z; - if ((obj80->vel.y != 0.0f) && (temp < obj80->vel.y)) { - if ((obj80->unk_44 == 1) && (obj80->obj.pos.x < gPlayer[0].pos.x)) { - obj80->unk_44 = 2; + temp = gPlayer[0].pos.z - scenery->obj.pos.z; + if ((scenery->vel.y != 0.0f) && (temp < scenery->vel.y)) { + if ((scenery->unk_44 == 1) && (scenery->obj.pos.x < gPlayer[0].pos.x)) { + scenery->unk_44 = 2; } - obj80->state++; + scenery->state++; } break; case 1: - obj80->state++; + scenery->state++; /* fallthrough */ case 2: - obj80->vel.x += 0.05f; - switch (obj80->unk_44) { + scenery->vel.x += 0.05f; + switch (scenery->unk_44) { case 0: - obj80->obj.rot.x += obj80->vel.x; - if (obj80->obj.rot.x >= 90.0f) { - obj80->obj.rot.x = 90.0f; - obj80->state++; + scenery->obj.rot.x += scenery->vel.x; + if (scenery->obj.rot.x >= 90.0f) { + scenery->obj.rot.x = 90.0f; + scenery->state++; gControllerRumbleTimers[0] = 7; gCameraShake = 12; - Titania_8018F134(obj80); - AUDIO_PLAY_SFX(0x19130003, obj80->sfxSource, 4); + Titania_8018F134(scenery); + AUDIO_PLAY_SFX(0x19130003, scenery->sfxSource, 4); } break; case 1: - obj80->obj.rot.z += obj80->vel.x; - if (obj80->obj.rot.z >= 90.0f) { - obj80->obj.rot.z = 90.0f; + scenery->obj.rot.z += scenery->vel.x; + if (scenery->obj.rot.z >= 90.0f) { + scenery->obj.rot.z = 90.0f; gControllerRumbleTimers[0] = 7; gCameraShake = 12; - Titania_8018F134(obj80); - AUDIO_PLAY_SFX(0x19130003, obj80->sfxSource, 4); - obj80->state++; + Titania_8018F134(scenery); + AUDIO_PLAY_SFX(0x19130003, scenery->sfxSource, 4); + scenery->state++; } break; case 2: - obj80->obj.rot.z -= obj80->vel.x; - if (obj80->obj.rot.z <= -90.0f) { - obj80->obj.rot.z = -90.0f; + scenery->obj.rot.z -= scenery->vel.x; + if (scenery->obj.rot.z <= -90.0f) { + scenery->obj.rot.z = -90.0f; gControllerRumbleTimers[0] = 7; gCameraShake = 12; - Titania_8018F134(obj80); - AUDIO_PLAY_SFX(0x19130003, obj80->sfxSource, 4); - obj80->state++; + Titania_8018F134(scenery); + AUDIO_PLAY_SFX(0x19130003, scenery->sfxSource, 4); + scenery->state++; } break; } @@ -2132,25 +2132,25 @@ void Titania_8018F4D8(Object_80* obj80) { case 3: break; } - if (obj80->unk_44 != 0) { - if (obj80->obj.rot.z == 0.0f) { - obj80->obj.pos.x = obj80->vel.z; - obj80->info.hitbox = SEGMENTED_TO_VIRTUAL(D_TI_6006BF0); - } else if (obj80->obj.rot.z > 0.0f) { - obj80->obj.pos.x = obj80->vel.z - 75.0f; - obj80->info.hitbox = SEGMENTED_TO_VIRTUAL(D_TI_6006C28); + if (scenery->unk_44 != 0) { + if (scenery->obj.rot.z == 0.0f) { + scenery->obj.pos.x = scenery->vel.z; + scenery->info.hitbox = SEGMENTED_TO_VIRTUAL(D_TI_6006BF0); + } else if (scenery->obj.rot.z > 0.0f) { + scenery->obj.pos.x = scenery->vel.z - 75.0f; + scenery->info.hitbox = SEGMENTED_TO_VIRTUAL(D_TI_6006C28); } else { - obj80->obj.pos.x = obj80->vel.z + 75.0f; - obj80->info.hitbox = SEGMENTED_TO_VIRTUAL(D_TI_6006C0C); + scenery->obj.pos.x = scenery->vel.z + 75.0f; + scenery->info.hitbox = SEGMENTED_TO_VIRTUAL(D_TI_6006C0C); } } } -void Titania_8018F8B8(Object_80* obj80) { +void Titania_8018F8B8(Scenery* scenery) { - switch (obj80->unk_44) { + switch (scenery->unk_44) { case 0: - if (obj80->unk_44 == 0) { + if (scenery->unk_44 == 0) { gSPDisplayList(gMasterDisp++, D_TI1_7002270); } else { gSPDisplayList(gMasterDisp++, D_TI1_7000A80); @@ -2158,8 +2158,8 @@ void Titania_8018F8B8(Object_80* obj80) { break; case 1: case 2: - if (obj80->obj.rot.z != 0.0f) { - if (obj80->obj.rot.z > 0.0f) { + if (scenery->obj.rot.z != 0.0f) { + if (scenery->obj.rot.z > 0.0f) { Matrix_Translate(gGfxMatrix, 75.0f, 0.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); } else { @@ -2167,7 +2167,7 @@ void Titania_8018F8B8(Object_80* obj80) { Matrix_SetGfxMtx(&gMasterDisp); } } - if (obj80->unk_44 == 0) { + if (scenery->unk_44 == 0) { gSPDisplayList(gMasterDisp++, D_TI1_7002270); } else { gSPDisplayList(gMasterDisp++, D_TI1_7000A80); @@ -2185,7 +2185,7 @@ void Titania_Boss306_Init(Boss306* this) { if (this->swork[0] < 4) { this->swork[0]++; - gOverlayStage = this->swork[0]; + gSceneSetup = this->swork[0]; this->timer_050 = 1; } diff --git a/src/overlays/ovl_i5/fox_ti_cs.c b/src/overlays/ovl_i5/fox_ti_cs.c index 8efa8b54..0d7c3fd8 100644 --- a/src/overlays/ovl_i5/fox_ti_cs.c +++ b/src/overlays/ovl_i5/fox_ti_cs.c @@ -38,7 +38,7 @@ void Titania_801875D0(Actor* actor, s32 arg1) { AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); } -void Titania_8018769C(Player* player) { +void Titania_LevelStart(Player* player) { f32 sp64; Actor* actor = &gActors[3]; Vec3f sp54; @@ -49,7 +49,7 @@ void Titania_8018769C(Player* player) { switch (player->unk_1D0) { case 0: gCsFrameCount = 0; - D_ctx_80177BAC = 1; + gTiStartLandmaster = 1; player->unk_0D4 = 0.0f; Titania_80187530(&gActors[3]); @@ -219,7 +219,7 @@ void Titania_8018769C(Player* player) { Math_SmoothStepToF(&player->unk_0F0, SIN_DEG(gGameFrameCount * 5.0f) * 10.0f, 0.1f, 100.0f, 0.0f); if (gCsFrameCount == 580) { - gLevelStatusScreenTimer = 50; + gLevelStartStatusScreenTimer = 50; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_1D0 = player->timer_1F8 = player->timer_1FC = player->unk_240 = 0; player->unk_0D4 = 3.0f; @@ -282,7 +282,7 @@ void Titania_80188108(Actor* actor, s32 arg1) { } } -void Titania_801882CC(Player* player) { +void Titania_LevelComplete(Player* player) { f32 x; f32 camAtY = 0.0f; Vec3f src; @@ -414,11 +414,11 @@ void Titania_801882CC(Player* player) { switch (gCsFrameCount) { case 831: - D_ctx_80177830 = 1; + gShowLevelClearStatusScreen = 1; break; case 1031: - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; break; case 50: @@ -487,7 +487,7 @@ void Titania_801882CC(Player* player) { break; case 1280: - gOverlayStage = 5; + gSceneSetup = 5; break; case 1300: @@ -523,7 +523,7 @@ void Titania_801882CC(Player* player) { if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; - D_ctx_8017837C = 4; + gFadeoutType = 4; Play_ClearObjectData(); Audio_FadeOutAll(10); D_play_800D3180[LEVEL_TITANIA] = Play_CheckMedalStatus(150) + 1; diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index a1dd4acd..e3d18707 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -92,35 +92,35 @@ void Andross_801876FC(void) { void Andross_801878A8() { Actor* actor; Item* item; - Object_58* obj58; + Scenery360* scenery360; s32 i; gLevelObjects = SEGMENTED_TO_VIRTUAL(&D_ANDROSS_C0356CC); - for (obj58 = gObjects58, i = 0; i < 1000; i++) { - if (gLevelObjects[i].id < 0) { + for (scenery360 = gScenery360, i = 0; i < 1000; i++) { + if (gLevelObjects[i].id <= OBJ_INVALID) { break; } - if (gLevelObjects[i].id <= OBJ_80_160) { - Object_58_Initialize(obj58); - obj58->obj.status = OBJ_ACTIVE; - obj58->obj.id = gLevelObjects[i].id; - obj58->obj.pos.x = gLevelObjects[i].xPos; - obj58->obj.pos.z = -gLevelObjects[i].zPos1; - obj58->obj.pos.z += gLevelObjects[i].zPos2; - obj58->obj.pos.y = gLevelObjects[i].yPos; - obj58->obj.rot.y = gLevelObjects[i].rot.y; - Object_SetInfo(&obj58->info, obj58->obj.id); - if (obj58->obj.id == OBJ_80_131) { - obj58->info.hitbox = SEGMENTED_TO_VIRTUAL(&D_ANDROSS_C038CCC); + if (gLevelObjects[i].id <= OBJ_SCENERY_160) { + Scenery360_Initialize(scenery360); + scenery360->obj.status = OBJ_ACTIVE; + scenery360->obj.id = gLevelObjects[i].id; + scenery360->obj.pos.x = gLevelObjects[i].xPos; + scenery360->obj.pos.z = -gLevelObjects[i].zPos1; + scenery360->obj.pos.z += gLevelObjects[i].zPos2; + scenery360->obj.pos.y = gLevelObjects[i].yPos; + scenery360->obj.rot.y = gLevelObjects[i].rot.y; + Object_SetInfo(&scenery360->info, scenery360->obj.id); + if (scenery360->obj.id == OBJ_SCENERY_131) { + scenery360->info.hitbox = SEGMENTED_TO_VIRTUAL(&D_ANDROSS_C038CCC); } - obj58++; + scenery360++; } } for (actor = &gActors[1], i = 0; i < 1000; i++) { - if (gLevelObjects[i].id < 0) { + if (gLevelObjects[i].id <= OBJ_INVALID) { break; } @@ -139,7 +139,7 @@ void Andross_801878A8() { } for (item = gItems, i = 0; i < 1000; i++) { - if (gLevelObjects[i].id < 0) { + if (gLevelObjects[i].id <= OBJ_INVALID) { break; } if ((gLevelObjects[i].id <= OBJ_ITEM_TRAINING_RING) && (gLevelObjects[i].id >= OBJ_ITEM_LASERS)) { @@ -159,7 +159,7 @@ void Andross_801878A8() { void Andross_80187C5C(void) { Actor* actor; Item* item; - Object_58* obj58; + Scenery360* scenery360; s32 i; switch (RAND_INT(2.9f)) { @@ -175,33 +175,33 @@ void Andross_80187C5C(void) { break; } - for (obj58 = gObjects58, i = 0; i < 1000; i++) { - if (gLevelObjects[i].id < 0) { + for (scenery360 = gScenery360, i = 0; i < 1000; i++) { + if (gLevelObjects[i].id <= OBJ_INVALID) { break; } - if (gLevelObjects[i].id <= OBJ_80_160) { - Object_58_Initialize(obj58); - obj58->obj.status = OBJ_ACTIVE; - obj58->obj.id = gLevelObjects[i].id; - obj58->obj.pos.x = gLevelObjects[i].xPos; - obj58->obj.pos.z = -gLevelObjects[i].zPos1; - obj58->obj.pos.z += gLevelObjects[i].zPos2; - obj58->obj.pos.y = gLevelObjects[i].yPos; - obj58->obj.rot.y = gLevelObjects[i].rot.y; - if (obj58->obj.id == OBJ_80_147) { - obj58->unk_40 = gLevelObjects[i].rot.z; + if (gLevelObjects[i].id <= OBJ_SCENERY_160) { + Scenery360_Initialize(scenery360); + scenery360->obj.status = OBJ_ACTIVE; + scenery360->obj.id = gLevelObjects[i].id; + scenery360->obj.pos.x = gLevelObjects[i].xPos; + scenery360->obj.pos.z = -gLevelObjects[i].zPos1; + scenery360->obj.pos.z += gLevelObjects[i].zPos2; + scenery360->obj.pos.y = gLevelObjects[i].yPos; + scenery360->obj.rot.y = gLevelObjects[i].rot.y; + if (scenery360->obj.id == OBJ_SCENERY_147) { + scenery360->unk_40 = gLevelObjects[i].rot.z; } - Object_SetInfo(&obj58->info, obj58->obj.id); - if (obj58->obj.id == OBJ_80_131) { - obj58->info.hitbox = SEGMENTED_TO_VIRTUAL(&D_ANDROSS_C038CCC); + Object_SetInfo(&scenery360->info, scenery360->obj.id); + if (scenery360->obj.id == OBJ_SCENERY_131) { + scenery360->info.hitbox = SEGMENTED_TO_VIRTUAL(&D_ANDROSS_C038CCC); } - obj58++; + scenery360++; } } for (actor = &gActors[1], i = 0; i < 1000; i++) { - if (gLevelObjects[i].id < 0) { + if (gLevelObjects[i].id <= OBJ_INVALID) { break; } @@ -220,7 +220,7 @@ void Andross_80187C5C(void) { } for (item = gItems, i = 0; i < 1000; i++) { - if (gLevelObjects[i].id < 0) { + if (gLevelObjects[i].id <= OBJ_INVALID) { break; } if ((gLevelObjects[i].id <= OBJ_ITEM_TRAINING_RING) && (gLevelObjects[i].id >= OBJ_ITEM_LASERS)) { @@ -242,18 +242,18 @@ void Andross_801880E4(Actor* actor) { f32 xDisplacement; f32 yDisplacement; f32 zDisplacement; - Object_58* obj58; + Scenery360* scenery360; f32 yaw; f32 var_fv0; Vec3f sp48; Vec3f vel; f32 temp_fv1; - for (obj58 = gObjects58, i = 0; i < 200; i++, obj58++) { - if ((obj58->obj.id == OBJ_80_147) && (obj58->unk_40 == (u8) actor->unk_04E)) { - actor->fwork[3] = obj58->obj.pos.x; - actor->fwork[4] = obj58->obj.pos.y; - actor->fwork[5] = obj58->obj.pos.z; + for (scenery360 = gScenery360, i = 0; i < 200; i++, scenery360++) { + if ((scenery360->obj.id == OBJ_SCENERY_147) && (scenery360->unk_40 == (u8) actor->unk_04E)) { + actor->fwork[3] = scenery360->obj.pos.x; + actor->fwork[4] = scenery360->obj.pos.y; + actor->fwork[5] = scenery360->obj.pos.z; break; } } @@ -543,7 +543,7 @@ void Andross_80189098(Boss* boss) { actor->obj.pos.y = 0.0f; actor->obj.pos.z = boss->obj.pos.z; Object_SetInfo(&actor->info, actor->obj.id); - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(&gDefaultCubeHitbox150); + actor->info.hitbox = SEGMENTED_TO_VIRTUAL(&gCubeHitbox150); actor++; @@ -557,7 +557,7 @@ void Andross_80189098(Boss* boss) { actor->obj.pos.y = 0.0f; actor->obj.pos.z = boss->obj.pos.z; Object_SetInfo(&actor->info, actor->obj.id); - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(&gDefaultCubeHitbox150); + actor->info.hitbox = SEGMENTED_TO_VIRTUAL(&gCubeHitbox150); gActors[0].state = 2; } @@ -569,7 +569,7 @@ void Andross_80189214(void) { Play_ClearObjectData(); for (i = 0; i < 200; i++) { - gObjects58[i].obj.status = OBJ_FREE; + gScenery360[i].obj.status = OBJ_FREE; } gLevelMode = LEVELMODE_ON_RAILS; @@ -597,7 +597,7 @@ void Andross_80189214(void) { void Andross_8018933C(Actor* actor) { if ((fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 1000.0f) && (fabsf(actor->obj.pos.z - gPlayer[0].unk_138) < 1000.0f)) { - D_Timer_80177B44 = 50; + gStartAndrossFightTimer = 50; Object_Kill(&actor->obj, actor->sfxSource); } } @@ -641,8 +641,8 @@ void Andross_80189470(Actor* actor) { Audio_KillSfxById(0x11403076); Audio_SetBaseSfxReverb(0); gCurrentLevel = LEVEL_VENOM_2; - gLevelStage = 1; - D_play_800D2F68 = 1; + gLevelPhase = 1; + gVenomHardClear = 1; player->state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; player->unk_1D0 = 3; player->unk_144 = D_ctx_80177D20 = 0.0f; @@ -659,7 +659,7 @@ void Andross_80189470(Actor* actor) { Play_ClearObjectData(); for (i = 0; i < 200; i++) { - gObjects58[i].obj.status = OBJ_FREE; + gScenery360[i].obj.status = OBJ_FREE; } Andross_80193710(); @@ -763,7 +763,7 @@ void Andross_80189B70(Boss* boss) { Andross_80188A4C(boss); Andross_80188CB8(boss); boss->info.hitbox = SEGMENTED_TO_VIRTUAL(&D_ANDROSS_C038F24); - Math_SmoothStepToF(&D_bg_800C9C30, 255.0f, 1.0f, 4.0f, 0); + Math_SmoothStepToF(&gAndrossUnkAlpha, 255.0f, 1.0f, 4.0f, 0); Math_SmoothStepToF(&boss->unk_3F8, 10.0f, 0.2f, 0.2f, 0); if (!(gGameFrameCount & 0x10)) { Math_SmoothStepToF(&boss->fwork[25], 255.0f, 1.0f, 10.0f, 0); @@ -834,7 +834,7 @@ void Andross_80189B70(Boss* boss) { } break; case 11: - boss->info.hitbox = SEGMENTED_TO_VIRTUAL(&gHitboxNone); + boss->info.hitbox = SEGMENTED_TO_VIRTUAL(&gNoHitbox); if (boss->timer_050 < 120) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; gFillScreenAlphaTarget = 80; @@ -883,7 +883,7 @@ void Andross_80189B70(Boss* boss) { boss->fwork[5] = gPlayer[0].unk_138; break; case 12: - boss->info.hitbox = SEGMENTED_TO_VIRTUAL(&gHitboxNone); + boss->info.hitbox = SEGMENTED_TO_VIRTUAL(&gNoHitbox); boss->fwork[1] = 0; boss->fwork[24] = 0.2f; boss->fwork[22] = 0.0f; @@ -904,7 +904,7 @@ void Andross_80189B70(Boss* boss) { } break; case 13: - boss->info.hitbox = SEGMENTED_TO_VIRTUAL(&gHitboxNone); + boss->info.hitbox = SEGMENTED_TO_VIRTUAL(&gNoHitbox); boss->fwork[24] = 0.0f; boss->fwork[22] = 255.0f; if (250.0f < boss->fwork[22]) { @@ -969,11 +969,11 @@ void Andross_80189B70(Boss* boss) { gCsFrameCount++; gCameraShake = 10; if (gCsFrameCount < 200) { - gPlayerFillScreenAlphas[0] += 4; - if (gPlayerFillScreenAlphas[0] >= 255) { - gPlayerFillScreenAlphas[0] = 255; + gPlayerGlareAlphas[0] += 4; + if (gPlayerGlareAlphas[0] >= 255) { + gPlayerGlareAlphas[0] = 255; } - gPlayerFillScreenReds[0] = gPlayerFillScreenGreens[0] = gPlayerFillScreenBlues[0] = 255; + gPlayerGlareReds[0] = gPlayerGlareGreens[0] = gPlayerGlareBlues[0] = 255; Math_SmoothStepToF(&D_display_800CA230, 0.15f, 0.2f, 0.004f, 0.0f); Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 70.0f, 1.0f, 4.0f, 0.0f); } @@ -999,7 +999,7 @@ void Andross_80189B70(Boss* boss) { gFogFar = 1007; gBgColor = 0x4081; // 64, 16, 0 gProjectFar = 30000.0f; - gGroundLevel = -50.0f; + gGroundHeight = -50.0f; gPlayer[0].pos.x = -25995.0f; gPlayer[0].pos.y = 300.0f; gPlayer[0].pos.z = -11140.0f; @@ -1019,7 +1019,7 @@ void Andross_80189B70(Boss* boss) { Andross_80187C5C(); gPlayer[0].unk_014 = 1.0f; func_play_800B7184(gPlayer, 1); - func_8001C8B8(0); + Audio_StartPlayerNoise(0); AUDIO_PLAY_BGM(D_boss_800C9E90[gCurrentLevel]); AUDIO_PLAY_SFX(0x11403076, gDefaultSfxSource, 0); @@ -1290,7 +1290,7 @@ void Andross_8018BDD8(void) { void Andross_8018C390(Player* player) { - player->unk_2B4 = 1; + player->boostCooldown = 1; player->unk_280 = 0; switch (player->unk_1D0) { case 2: @@ -1560,7 +1560,7 @@ void Andross_8018D0D8(Boss* boss) { void Andross_Boss320_Init(Boss320* this) { Audio_SetBaseSfxReverb(0x18); D_i6_801A7F5C = D_i6_801A7F64 = D_i6_801A7F6C = D_i6_801A7F74 = D_i6_801A7F7C = D_i6_801A8430 = 0.0f; - D_bg_800C9C30 = 0.0f; + gAndrossUnkAlpha = 0.0f; this->health = 100; this->fwork[18] = 1.0f; this->fwork[17] = 1.0f; @@ -1612,7 +1612,7 @@ void Andross_8018D2B0(Boss* boss) { AUDIO_PLAY_SFX(0x19403070, boss->sfxSource, 4); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); - if (gLevelStage == 0) { + if (gLevelPhase == 0) { boss->state = 30; } else { boss->state = 32; @@ -1912,7 +1912,7 @@ void Andross_8018DBF0(Boss* boss) { Math_SmoothStepToF(&D_i6_801A7F7C, gAmbientG, 1.0f, 2.0f, 0.0f); Math_SmoothStepToF(&D_i6_801A8430, gAmbientB, 1.0f, 2.0f, 0.0f); } - Math_SmoothStepToF(&D_bg_800C9C30, 32.0f, 1.0f, 0.5f, 0.0f); + Math_SmoothStepToF(&gAndrossUnkAlpha, 32.0f, 1.0f, 0.5f, 0.0f); Math_SmoothStepToF(&player->camRoll, 0.0f, 0.2f, 3.0f, 0); boss->fwork[8] = 0.1f; Math_SmoothStepToF(&boss->fwork[7], 200.0f, 1.0f, 10.0f, 0); @@ -2381,7 +2381,7 @@ void Andross_8018DBF0(Boss* boss) { Math_SmoothStepToF(&playerShot->obj.pos.y, boss->obj.pos.y - 100.0f, 0.5f, boss->fwork[16], 0); Math_SmoothStepToF(&playerShot->vel.x, 0.0f, 0.9f, 5.0f, 0); Math_SmoothStepToF(&playerShot->vel.y, 0.0f, 0.9f, 5.0f, 0); - if ((playerShot->obj.id == PLAYERSHOT_3) && (playerShot->obj.status == 1) && + if ((playerShot->obj.id == PLAYERSHOT_BOMB) && (playerShot->obj.status == 1) && (playerShot->unk_5C == 0) && (fabsf(playerShot->obj.pos.x - boss->obj.pos.x) < 200.0f) && (fabsf(playerShot->obj.pos.y - (boss->obj.pos.y - 100.0f)) < 200.0f) && (fabsf(playerShot->obj.pos.z - (boss->obj.pos.z - 200.0f)) < 100.0f)) { @@ -2750,7 +2750,7 @@ void Andross_8018DBF0(Boss* boss) { Radio_PlayMessage(gMsg_ID_19330, RCID_ANDROSS_RED); break; } - Math_SmoothStepToF(&D_bg_800C9C30, 0.0f, 1.0f, 0.3f, 0.0f); + Math_SmoothStepToF(&gAndrossUnkAlpha, 0.0f, 1.0f, 0.3f, 0.0f); break; } if (boss->swork[4] >= 0) { @@ -3032,7 +3032,7 @@ bool Andross_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* Matrix_Scale(gCalcMatrix, scale, scale, scale, MTXF_APPLY); if (*dList != NULL) { Matrix_MultVec3f(gCalcMatrix, &sp94, &sp88); - func_edisplay_8005F670(&sp88); + Display_SetSecondLight(&sp88); Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, *dList); @@ -3280,26 +3280,26 @@ void Andross_80193244(Actor* actor) { } } -void Andross_80193380(Object_80* obj80) { +void Andross_80193380(Scenery* scenery) { - switch (obj80->state) { + switch (scenery->state) { case 0: - if (fabsf(obj80->obj.pos.z - gPlayer[0].unk_138) < 1800.0f) { - obj80->state = 1; - obj80->info.hitbox = SEGMENTED_TO_VIRTUAL(D_ANDROSS_C038AC4); + if (fabsf(scenery->obj.pos.z - gPlayer[0].unk_138) < 1800.0f) { + scenery->state = 1; + scenery->info.hitbox = SEGMENTED_TO_VIRTUAL(D_ANDROSS_C038AC4); } break; case 1: - obj80->info.hitbox[7] = -130.0f - (obj80->unk_44 * 1.6f); - obj80->info.hitbox[17] = -130.0f - (obj80->unk_44 * 1.6f); - obj80->info.hitbox[27] = -130.0f - (obj80->unk_44 * 1.6f); - obj80->unk_44 += 2; - if (obj80->unk_44 >= Animation_GetFrameCount(&D_VE2_6014658)) { - obj80->unk_44 = Animation_GetFrameCount(&D_VE2_6014658) - 1; + scenery->info.hitbox[7] = -130.0f - (scenery->unk_44 * 1.6f); + scenery->info.hitbox[17] = -130.0f - (scenery->unk_44 * 1.6f); + scenery->info.hitbox[27] = -130.0f - (scenery->unk_44 * 1.6f); + scenery->unk_44 += 2; + if (scenery->unk_44 >= Animation_GetFrameCount(&D_VE2_6014658)) { + scenery->unk_44 = Animation_GetFrameCount(&D_VE2_6014658) - 1; } break; } - obj80->obj.rot.z = D_Andross_801A7F68; + scenery->obj.rot.z = D_Andross_801A7F68; } bool Andross_801934EC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { @@ -3309,18 +3309,18 @@ bool Andross_801934EC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return false; } -void Andross_8019350C(Object_80* obj80) { +void Andross_8019350C(Scenery* scenery) { Vec3f frameTable[20]; - Animation_GetFrameData(&D_VE2_6014658, obj80->unk_44, frameTable); + Animation_GetFrameData(&D_VE2_6014658, scenery->unk_44, frameTable); Animation_DrawSkeleton(1, D_VE2_6014844, frameTable, Andross_801934EC, NULL, NULL, &gIdentityMatrix); } -void Andross_8019356C(Object_80* obj80) { - obj80->obj.rot.z = D_Andross_801A7F68; - obj80->obj.pos.z += obj80->unk_60; - if (obj80->timer_4C == 1) { - Object_Kill(&obj80->obj, obj80->sfxSource); +void Andross_8019356C(Scenery* scenery) { + scenery->obj.rot.z = D_Andross_801A7F68; + scenery->obj.pos.z += scenery->unk_60; + if (scenery->timer_4C == 1) { + Object_Kill(&scenery->obj, scenery->sfxSource); } } @@ -3331,57 +3331,57 @@ bool Andross_801935B4(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return false; } -void Andross_801935D4(Object_80* obj80) { +void Andross_801935D4(Scenery* scenery) { Vec3f frameTable[20]; - Animation_GetFrameData(&D_VE2_6014658, obj80->unk_44, frameTable); + Animation_GetFrameData(&D_VE2_6014658, scenery->unk_44, frameTable); if (gLevelMode == LEVELMODE_ALL_RANGE) { gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); } Animation_DrawSkeleton(1, D_VE2_6014844, frameTable, Andross_801935B4, NULL, NULL, &gIdentityMatrix); } -void Andross_80193668(Object_80* obj80, f32 xPos, f32 yPos, f32 zPos, s32 arg4) { - Object_80_Initialize(obj80); - obj80->obj.status = OBJ_ACTIVE; - obj80->obj.id = OBJ_80_131; - obj80->obj.pos.x = xPos; - obj80->obj.pos.y = yPos; - obj80->obj.pos.z = zPos; - obj80->unk_60 = -40.0f; - Object_SetInfo(&obj80->info, obj80->obj.id); - obj80->timer_4C = (arg4 * 50) + 100; - obj80->info.unk_10 = 100000.0f; +void Andross_80193668(Scenery* scenery, f32 xPos, f32 yPos, f32 zPos, s32 arg4) { + Scenery_Initialize(scenery); + scenery->obj.status = OBJ_ACTIVE; + scenery->obj.id = OBJ_SCENERY_131; + scenery->obj.pos.x = xPos; + scenery->obj.pos.y = yPos; + scenery->obj.pos.z = zPos; + scenery->unk_60 = -40.0f; + Object_SetInfo(&scenery->info, scenery->obj.id); + scenery->timer_4C = (arg4 * 50) + 100; + scenery->info.unk_10 = 100000.0f; } void Andross_80193710(void) { Actor* actor; - Object_58* obj58; + Scenery360* scenery360; Boss* boss; s32 i; gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]); - for (obj58 = gObjects58, i = 0; i < 1000; i++) { - if (gLevelObjects[i].id < 0) { + for (scenery360 = gScenery360, i = 0; i < 1000; i++) { + if (gLevelObjects[i].id <= OBJ_INVALID) { break; } - if (gLevelObjects[i].id <= OBJ_80_160) { - Object_58_Initialize(obj58); - obj58->obj.status = OBJ_ACTIVE; - obj58->obj.id = gLevelObjects[i].id; - obj58->sfxSource[0] = obj58->obj.pos.x = gLevelObjects[i].xPos; - obj58->sfxSource[1] = obj58->obj.pos.y = gLevelObjects[i].yPos; - obj58->sfxSource[2] = obj58->obj.pos.z = -gLevelObjects[i].zPos1; - obj58->unk_54 = obj58->obj.rot.y = gLevelObjects[i].rot.y; - Object_SetInfo(&obj58->info, obj58->obj.id); - obj58++; + if (gLevelObjects[i].id <= OBJ_SCENERY_160) { + Scenery360_Initialize(scenery360); + scenery360->obj.status = OBJ_ACTIVE; + scenery360->obj.id = gLevelObjects[i].id; + scenery360->sfxSource[0] = scenery360->obj.pos.x = gLevelObjects[i].xPos; + scenery360->sfxSource[1] = scenery360->obj.pos.y = gLevelObjects[i].yPos; + scenery360->sfxSource[2] = scenery360->obj.pos.z = -gLevelObjects[i].zPos1; + scenery360->unk_54 = scenery360->obj.rot.y = gLevelObjects[i].rot.y; + Object_SetInfo(&scenery360->info, scenery360->obj.id); + scenery360++; } } for (actor = &gActors[30], i = 0; i < 1000; i++) { - if (gLevelObjects[i].id < 0) { + if (gLevelObjects[i].id <= OBJ_INVALID) { break; } @@ -3462,8 +3462,8 @@ void Andross_80193AE4(s32 actorIndex) { } //! @bug This references a variable in another overlay, causing undefined behavior. -//! In US v1.1, that address contains the store instruction for player->vel.y = vel.y; in Venom2_80196BF8. Setting this -//! to nop is harmless, as the overlay will be unloaded next frame. +//! In US v1.1, that address contains the store instruction for player->vel.y = vel.y; in Venom2_LevelStart. Setting +//! this to nop is harmless, as the overlay will be unloaded next frame. extern s32 D_ending_80196D00; f32 D_i6_801A7F40; @@ -3623,7 +3623,7 @@ void Andross_80193C4C(Player* player) { break; case 25: for (i = 0; i < 12; i++) { - Andross_80193668(&gObjects80[i], player->pos.x, player->pos.y, + Andross_80193668(&gScenery[i], player->pos.x, player->pos.y, (player->cam.eye.z - D_ctx_80177D20) + (2195.0f * i), i); } break; @@ -3633,10 +3633,10 @@ void Andross_80193C4C(Player* player) { case 340: Audio_KillSfxBySourceAndId(player->sfxSource, 0x11403071); Audio_SetBaseSfxReverb(0); - D_play_800D2F68 = 0; + gVenomHardClear = 0; gBlurAlpha = 255; gCurrentLevel = LEVEL_VENOM_2; - gLevelStage = 1; + gLevelPhase = 1; gLevelMode = LEVELMODE_ALL_RANGE; player->unk_1D0 = 3; player->unk_144 = D_ctx_80177D20 = 0.0f; @@ -3651,9 +3651,9 @@ void Andross_80193C4C(Player* player) { player->unk_234 = 0; D_ctx_80177A48[0] = 1.0f; Play_ClearObjectData(); - gObjects58 = Memory_Allocate(200 * sizeof(Object_58)); + gScenery360 = Memory_Allocate(200 * sizeof(Scenery360)); for (i = 0; i < 200; i++) { - gObjects58[i].obj.status = OBJ_FREE; + gScenery360[i].obj.status = OBJ_FREE; } Andross_80193710(); D_ctx_8017782C = 1; @@ -3675,14 +3675,14 @@ void Andross_80193C4C(Player* player) { gFillScreenAlpha = gFillScreenAlphaTarget = 255; } - if ((gCsFrameCount == 20) && (D_play_800D2F68 != 0)) { + if ((gCsFrameCount == 20) && (gVenomHardClear != 0)) { Andross_801939A0(1); } if (gCsFrameCount == 40) { Andross_801939A0(10); AUDIO_PLAY_SFX(0x2940F026, boss->sfxSource, 4); gCameraShake = 30; - gOverlayStage = 1; + gSceneSetup = 1; gControllerRumbleTimers[0] = 30; } if (gCsFrameCount > 40) { @@ -3722,7 +3722,7 @@ void Andross_80193C4C(Player* player) { D_ctx_801784D4 = -50.0f; gNextPlanetPath = 1; for (i = 0; i < 200; i++) { - gObjects58[i].obj.status = OBJ_FREE; + gScenery360[i].obj.status = OBJ_FREE; } } break; @@ -3778,8 +3778,8 @@ void Andross_80193C4C(Player* player) { } if (gCsFrameCount == 190) { - func_play_800A5D6C(); - D_ctx_80178410 = 1000; + Play_SetupStarfield(); + gStarCount = 1000; player->unk_204 = 0; } if (gCsFrameCount == 360) { @@ -3805,7 +3805,7 @@ void Andross_80193C4C(Player* player) { gFillScreenAlpha = gFillScreenAlphaTarget = 255; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; player->timer_1F8 = 3; - D_ctx_80178410 = 500; + gStarCount = 500; } if (gCsFrameCount == 250) { gLevelClearScreenTimer = 100; @@ -3815,7 +3815,7 @@ void Andross_80193C4C(Player* player) { if (player->timer_1F8 == 1) { gFillScreenAlpha = gFillScreenAlphaTarget = 0; } - if (D_play_800D2F68 != 0) { + if (gVenomHardClear != 0) { if (gCsFrameCount >= 1000) { gCsCamAtX += D_ctx_80177A48[4] * 0.15f; gCsCamEyeZ += D_ctx_80177A48[4]; @@ -3884,7 +3884,7 @@ void Andross_80193C4C(Player* player) { Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0); Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0); } - if (D_play_800D2F68 != 0) { + if (gVenomHardClear != 0) { switch (gCsFrameCount) { case 400: Radio_PlayMessage(gMsg_ID_19400, RCID_PEPPY); @@ -3904,17 +3904,17 @@ void Andross_80193C4C(Player* player) { } break; case 1050: - D_ctx_80177830 = 1; + gShowLevelClearStatusScreen = 1; break; case 1250: - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; break; } if (gCsFrameCount > 1300) { - D_ctx_80178288[109] += 1.0f; - D_ctx_80178290[109] += 0.5f; + gStarOffsetsX[109] += 1.0f; + gStarOffsetsY[109] += 0.5f; temp_v0_2 = RAND_INT(100.0f); - D_ctx_80178298[109] = FILL_COLOR(D_bg_800C9C3C[temp_v0_2 % 16U]); + gStarFillColors[109] = FILL_COLOR(gStarColors[temp_v0_2 % 16U]); } } else { switch (gCsFrameCount) { @@ -3929,10 +3929,10 @@ void Andross_80193C4C(Player* player) { gCsFrameCount += 230; break; case 1050: - D_ctx_80177830 = 1; + gShowLevelClearStatusScreen = 1; break; case 1250: - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; break; } } @@ -3952,9 +3952,9 @@ void Andross_80193C4C(Player* player) { } break; case 100: - gPlayerFillScreenAlphas[0] -= 4; - if (gPlayerFillScreenAlphas[0] > 255) { - gPlayerFillScreenAlphas[0] = 0; + gPlayerGlareAlphas[0] -= 4; + if (gPlayerGlareAlphas[0] > 255) { + gPlayerGlareAlphas[0] = 0; } Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); diff --git a/src/overlays/ovl_i6/fox_sy.c b/src/overlays/ovl_i6/fox_sy.c index 60d62f06..882f55ef 100644 --- a/src/overlays/ovl_i6/fox_sy.c +++ b/src/overlays/ovl_i6/fox_sy.c @@ -48,7 +48,7 @@ void SectorY_80197C64(Effect* effect) { RCP_SetupDL(&gMasterDisp, 0x40); } -void SectorY_80197CB8(Object_80* obj80) { +void SectorY_80197CB8(Scenery* scenery) { } void SectorY_Boss314_Init(Boss314* this) { @@ -68,7 +68,7 @@ void SectorY_Boss314_Init(Boss314* this) { if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_START_360) { this->obj.pos.z = -28900.0f; - gObjects58[0].obj.pos.z = -30000.0f; + gScenery360[0].obj.pos.z = -30000.0f; } this->unk_078.y = 0.0f; @@ -415,7 +415,7 @@ void SectorY_80198F5C(Boss* boss) { boss->unk_04C = 0; boss->swork[36] = 0; boss->swork[21] = 9; - boss->info.hitbox = SEGMENTED_TO_VIRTUAL(gHitboxNone); + boss->info.hitbox = SEGMENTED_TO_VIRTUAL(gNoHitbox); if (boss->index == 0) { boss->timer_058 = 20000; @@ -596,8 +596,8 @@ void SectorY_80199438(Boss* boss) { Object_Kill(&gActors[D_ctx_80177A10[9]].obj, gActors[D_ctx_80177A10[9]].sfxSource); if ((gBosses[1].obj.status == OBJ_FREE) || (gBosses[2].obj.status == OBJ_FREE)) { gBosses[0].unk_04A = 1; - gObjects58[0].info.dList = D_SY_601F3D0; - gObjects58[0].info.drawType = 0; + gScenery360[0].info.dList = D_SY_601F3D0; + gScenery360[0].info.drawType = 0; } else { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ACTIVE; func_play_800B63BC(&gPlayer[0], 1); @@ -1039,7 +1039,7 @@ void SectorY_8019AEEC(Boss* boss) { boss->vel.z = 80.0f; boss->fwork[13] = 80.0f; boss->obj.pos.z = -12000.0f; - gObjects58[0].obj.pos.z = -20000.0f; + gScenery360[0].obj.pos.z = -20000.0f; boss->fwork[43] = 0.0f; boss->vel.y = 0.0f; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ACTIVE; @@ -1081,9 +1081,9 @@ bool SectorY_8019B5CC(Boss* boss) { } Math_Vec3fFromAngles(&pos, boss->unk_078.x, boss->unk_078.y, 700.0f); - if ((fabsf(gObjects58[0].obj.pos.x - (boss->obj.pos.x + pos.x)) < 2500.0f) && - (fabsf(gObjects58[0].obj.pos.z - (boss->obj.pos.z + pos.z)) < 5000.0f) && - (fabsf(gObjects58[0].obj.pos.y - (boss->obj.pos.y + pos.y)) < 1800.0f)) { + if ((fabsf(gScenery360[0].obj.pos.x - (boss->obj.pos.x + pos.x)) < 2500.0f) && + (fabsf(gScenery360[0].obj.pos.z - (boss->obj.pos.z + pos.z)) < 5000.0f) && + (fabsf(gScenery360[0].obj.pos.y - (boss->obj.pos.y + pos.y)) < 1800.0f)) { return true; } @@ -1345,9 +1345,9 @@ void SectorY_8019C888(Boss* boss) { if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_START_360) { if (boss->swork[34] == 1) { if (boss->health > 0) { - gObjects58[0].obj.pos.z += 20.0f; + gScenery360[0].obj.pos.z += 20.0f; } - if (gObjects58[0].obj.pos.z == 0.0f) { + if (gScenery360[0].obj.pos.z == 0.0f) { boss->swork[34]++; } } @@ -1944,7 +1944,7 @@ void SectorY_8019EB80(void) { } } -void SectorY_8019EE60(Player* player) { +void SectorY_LevelComplete(Player* player) { s32 i; f32 temp1; f32 temp2; @@ -2045,12 +2045,12 @@ void SectorY_8019EE60(Player* player) { player->pos.y = 3500.0f; player->pos.z = 0.0f; player->unk_1D0++; - func_8001C8B8(0); + Audio_StartPlayerNoise(0); AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); D_ctx_80177A98 = 0; for (i = 0; i < 200; i++) { - gObjects58[i].obj.status = OBJ_FREE; + gScenery360[i].obj.status = OBJ_FREE; } Play_ClearObjectData(); @@ -2124,7 +2124,7 @@ void SectorY_8019EE60(Player* player) { Audio_FadeOutAll(10); player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; - D_ctx_8017837C = 4; + gFadeoutType = 4; D_play_800D3180[LEVEL_SECTOR_Y] = Play_CheckMedalStatus(150) + 1; } } @@ -2197,10 +2197,10 @@ void SectorY_8019EE60(Player* player) { } break; case 1163: - D_ctx_80177830 = 1; + gShowLevelClearStatusScreen = 1; break; case 1363: - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; break; case 1440: AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); @@ -3180,7 +3180,7 @@ void SectorY_801A0AC0(Player* player) { player->pos.z = player->unk_138 = 0.0f; player->unk_0D0 = D_play_80161A54; AUDIO_PLAY_BGM(SEQ_ID_SECTOR_Y | SEQ_FLAG); - gLevelStatusScreenTimer = 100; + gLevelStartStatusScreenTimer = 100; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_1D0 = 0; player->timer_1F8 = 0; @@ -3529,8 +3529,8 @@ void SectorY_Actor204_Update(Actor204* this) { } else { AUDIO_PLAY_SFX(0x2903300E, this->sfxSource, 4); this->timer_0C6 = 15; - func_effect_8007C120(this->unk_0D8.x, this->unk_0D8.y, this->unk_0D8.z, this->vel.x, this->vel.y, - this->vel.z, 0.1f, 10); + func_effect_8007C120(this->hitPos.x, this->hitPos.y, this->hitPos.z, this->vel.x, this->vel.y, this->vel.z, + 0.1f, 10); this->health -= this->damage; if (this->health <= 0) { @@ -3623,68 +3623,68 @@ void SectorY_Actor204_Draw(Actor204* this) { } } -void SectorY_801A4E44(Object_80* obj80) { +void SectorY_801A4E44(Scenery* scenery) { Vec3f sp3C; Vec3f sp30; - if (obj80->state == 0) { - AUDIO_PLAY_SFX(0x1900404F, obj80->sfxSource, 4); - obj80->state++; + if (scenery->state == 0) { + AUDIO_PLAY_SFX(0x1900404F, scenery->sfxSource, 4); + scenery->state++; } if (((gGameFrameCount % 4) == 0)) { - Matrix_RotateY(gCalcMatrix, obj80->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, obj80->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, obj80->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, scenery->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, scenery->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, scenery->obj.rot.z * M_DTOR, MTXF_APPLY); sp3C.x = RAND_FLOAT_CENTERED(100.0f) + 500.0f; sp3C.y = RAND_FLOAT_CENTERED(900.0f) + -150.0f; sp3C.z = 90.0f - RAND_FLOAT(50.0f); Matrix_MultVec3f(gCalcMatrix, &sp3C, &sp30); - func_effect_8007C120(obj80->obj.pos.x + sp30.x, obj80->obj.pos.y + sp30.y, obj80->obj.pos.z + sp30.z, - obj80->unk_58, obj80->unk_5C, obj80->unk_60, 0.2f, 5); + func_effect_8007C120(scenery->obj.pos.x + sp30.x, scenery->obj.pos.y + sp30.y, scenery->obj.pos.z + sp30.z, + scenery->unk_58, scenery->unk_5C, scenery->unk_60, 0.2f, 5); sp3C.x = RAND_FLOAT_CENTERED(100.0f) + -500.0f; sp3C.y = RAND_FLOAT_CENTERED(900.0f); sp3C.z = 80.0f - RAND_FLOAT(50.0f); Matrix_MultVec3f(gCalcMatrix, &sp3C, &sp30); - func_effect_8007C120(obj80->obj.pos.x + sp30.x, obj80->obj.pos.y + sp30.y, obj80->obj.pos.z + sp30.z, - obj80->unk_58, obj80->unk_5C, obj80->unk_60, 0.2f, 5); + func_effect_8007C120(scenery->obj.pos.x + sp30.x, scenery->obj.pos.y + sp30.y, scenery->obj.pos.z + sp30.z, + scenery->unk_58, scenery->unk_5C, scenery->unk_60, 0.2f, 5); sp3C.x = RAND_FLOAT_CENTERED(100.0f) + 500.0f; sp3C.y = RAND_FLOAT_CENTERED(900.0f) + -50.0f; sp3C.z = 1900.0f - RAND_FLOAT(50.0f); Matrix_MultVec3f(gCalcMatrix, &sp3C, &sp30); - func_effect_8007C120(obj80->obj.pos.x + sp30.x, obj80->obj.pos.y + sp30.y, obj80->obj.pos.z + sp30.z, - obj80->unk_58, obj80->unk_5C, obj80->unk_60, 0.2f, 5); + func_effect_8007C120(scenery->obj.pos.x + sp30.x, scenery->obj.pos.y + sp30.y, scenery->obj.pos.z + sp30.z, + scenery->unk_58, scenery->unk_5C, scenery->unk_60, 0.2f, 5); sp3C.x = RAND_FLOAT_CENTERED(100.0f) + -1000.0f; sp3C.y = RAND_FLOAT_CENTERED(900.0f) + -250.0f; sp3C.z = 1100.0f - RAND_FLOAT(50.0f); Matrix_MultVec3f(gCalcMatrix, &sp3C, &sp30); - func_effect_8007C120(obj80->obj.pos.x + sp30.x, obj80->obj.pos.y + sp30.y, obj80->obj.pos.z + sp30.z, - obj80->unk_58, obj80->unk_5C, obj80->unk_60, 0.2f, 5); + func_effect_8007C120(scenery->obj.pos.x + sp30.x, scenery->obj.pos.y + sp30.y, scenery->obj.pos.z + sp30.z, + scenery->unk_58, scenery->unk_5C, scenery->unk_60, 0.2f, 5); } } -void SectorY_801A52B8(Object_80* obj80) { +void SectorY_801A52B8(Scenery* scenery) { Vec3f sp44; Vec3f sp38; - if (obj80->state == 0) { - AUDIO_PLAY_SFX(0x1900404F, obj80->sfxSource, 4); - obj80->state++; + if (scenery->state == 0) { + AUDIO_PLAY_SFX(0x1900404F, scenery->sfxSource, 4); + scenery->state++; } if (((gGameFrameCount % 4) == 0)) { - Matrix_RotateY(gCalcMatrix, obj80->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, obj80->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, obj80->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, scenery->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, scenery->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, scenery->obj.rot.z * M_DTOR, MTXF_APPLY); sp44.x = RAND_FLOAT_CENTERED(100.0f) + -800.0f; sp44.y = RAND_FLOAT_CENTERED(300.0f) + -100.0f; sp44.z = RAND_FLOAT_CENTERED(5000.0f) + 500.0f; Matrix_MultVec3f(gCalcMatrix, &sp44, &sp38); - func_effect_8007C120(obj80->obj.pos.x + sp38.x, obj80->obj.pos.y + sp38.y, obj80->obj.pos.z + sp38.z, - obj80->unk_58, obj80->unk_5C, obj80->unk_60, 0.3f, 5); + func_effect_8007C120(scenery->obj.pos.x + sp38.x, scenery->obj.pos.y + sp38.y, scenery->obj.pos.z + sp38.z, + scenery->unk_58, scenery->unk_5C, scenery->unk_60, 0.3f, 5); sp44.x = RAND_FLOAT_CENTERED(100.0f) + -600.0f; sp44.y = RAND_FLOAT_CENTERED(250.0f) + 300.0f; sp44.z = RAND_FLOAT_CENTERED(1500.0f) + -1650.0f; Matrix_MultVec3f(gCalcMatrix, &sp44, &sp38); - func_effect_8007C120(obj80->obj.pos.x + sp38.x, obj80->obj.pos.y + sp38.y, obj80->obj.pos.z + sp38.z, - obj80->unk_58, obj80->unk_5C, obj80->unk_60, 0.2f, 5); + func_effect_8007C120(scenery->obj.pos.x + sp38.x, scenery->obj.pos.y + sp38.y, scenery->obj.pos.z + sp38.z, + scenery->unk_58, scenery->unk_5C, scenery->unk_60, 0.2f, 5); } } diff --git a/src/overlays/ovl_i6/fox_turret.c b/src/overlays/ovl_i6/fox_turret.c index 9842cf8d..e517ea3d 100644 --- a/src/overlays/ovl_i6/fox_turret.c +++ b/src/overlays/ovl_i6/fox_turret.c @@ -146,7 +146,7 @@ void Turret_801A5AD4(Player* player) { if (player->unk_1BC == 0) { gControllerLock = 0; player->unk_1B0++; - gLevelStatusScreenTimer = 50; + gLevelStartStatusScreenTimer = 50; } } sp2C = (f32) gControllerPress[player->num].stick_x; diff --git a/src/overlays/ovl_i6/fox_ve2.c b/src/overlays/ovl_i6/fox_ve2.c index 06822e6d..72866fae 100644 --- a/src/overlays/ovl_i6/fox_ve2.c +++ b/src/overlays/ovl_i6/fox_ve2.c @@ -86,7 +86,7 @@ void Venom2_80196314(Actor* actor) { actor->state = 2; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_014 = 0.0001f; - gLevelStatusScreenTimer = 80; + gLevelStartStatusScreenTimer = 80; } } if (gAllRangeEventTimer == 80) { @@ -169,33 +169,33 @@ void Venom2_80196314(Actor* actor) { void Venom2_80196968(void) { Actor* actor; Boss* boss; - Object_58* obj58; + Scenery360* scenery360; s32 i; gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]); - for (obj58 = gObjects58, i = 0; i < 1000; i++) { - if (gLevelObjects[i].id < 0) { + for (scenery360 = gScenery360, i = 0; i < 1000; i++) { + if (gLevelObjects[i].id <= OBJ_INVALID) { break; } - if (gLevelObjects[i].id <= OBJ_80_160) { - Object_58_Initialize(obj58); - obj58->obj.status = OBJ_ACTIVE; - obj58->obj.id = gLevelObjects[i].id; - obj58->sfxSource[0] = obj58->obj.pos.x = gLevelObjects[i].xPos; - obj58->sfxSource[1] = obj58->obj.pos.y = gLevelObjects[i].yPos; - obj58->sfxSource[2] = obj58->obj.pos.z = -gLevelObjects[i].zPos1; - obj58->unk_54 = obj58->obj.rot.y = gLevelObjects[i].rot.y; + if (gLevelObjects[i].id <= OBJ_SCENERY_160) { + Scenery360_Initialize(scenery360); + scenery360->obj.status = OBJ_ACTIVE; + scenery360->obj.id = gLevelObjects[i].id; + scenery360->sfxSource[0] = scenery360->obj.pos.x = gLevelObjects[i].xPos; + scenery360->sfxSource[1] = scenery360->obj.pos.y = gLevelObjects[i].yPos; + scenery360->sfxSource[2] = scenery360->obj.pos.z = -gLevelObjects[i].zPos1; + scenery360->unk_54 = scenery360->obj.rot.y = gLevelObjects[i].rot.y; - Object_SetInfo(&obj58->info, obj58->obj.id); + Object_SetInfo(&scenery360->info, scenery360->obj.id); - obj58++; + scenery360++; } } for (actor = &gActors[30], i = 0; i < 1000; i++) { - if (gLevelObjects[i].id < 0) { + if (gLevelObjects[i].id <= OBJ_INVALID) { break; } @@ -218,7 +218,7 @@ void Venom2_80196968(void) { Object_SetInfo(&boss->info, boss->obj.id); } -void Venom2_80196BF8(Player* player) { +void Venom2_LevelStart(Player* player) { Vec3f vec; Vec3f vel; f32 temp_fv0; @@ -250,7 +250,7 @@ void Venom2_80196BF8(Player* player) { player->cam.at.z = player->pos.z; } -void Venom2_80196D88(Player* player) { +void Venom2_LevelComplete(Player* player) { s32 i; s32 pad; f32 sp94; @@ -316,7 +316,7 @@ void Venom2_80196D88(Player* player) { D_ctx_80177A48[5] = sp58.x; D_ctx_80177A48[6] = sp58.z; } - if (gLevelStage == 2) { + if (gLevelPhase == 2) { player->timer_1FC = 240; } else { player->timer_1FC = 180; @@ -325,7 +325,7 @@ void Venom2_80196D88(Player* player) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 60); /* fallthrough */ case 1: - if (gLevelStage == 2) { + if (gLevelPhase == 2) { gFillScreenAlphaStep = 2; gFillScreenAlphaTarget = 0; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; @@ -416,13 +416,13 @@ void Venom2_80196D88(Player* player) { gNextGameState = GSTATE_PLAY; gNextLevel = LEVEL_VENOM_ANDROSS; if (D_play_800D3180[gCurrentLevel] != 0) { - gNextLevelStage = 1; + gNextLevelPhase = 1; } func_8001CA24(0); Audio_KillSfxBySource(player->sfxSource); for (i = 0; i < 200; i++) { - gObjects58[i].obj.status = OBJ_FREE; + gScenery360[i].obj.status = OBJ_FREE; } } } diff --git a/src/overlays/ovl_menu/fox_i_menu.c b/src/overlays/ovl_menu/fox_i_menu.c index 3525f6e4..75b53315 100644 --- a/src/overlays/ovl_menu/fox_i_menu.c +++ b/src/overlays/ovl_menu/fox_i_menu.c @@ -1,13 +1,13 @@ #include "global.h" -void Title_80187754(void); -void Title_801878D8(void); -void Option_Init(void); +void Title_Main(void); +void Title_Draw(void); +void Option_Main(void); void Option_DrawEntry(void); void Map_8019E85C(void); void Map_8019E8C8(void); -void Map_8019E8D0(void); -void Map_801A01A8(void); +void Map_Main(void); +void Map_Draw(void); s32 D_menu_801B7BA0; s32 D_menu_801AD9F0 = 0; @@ -15,23 +15,23 @@ s32 D_menu_801AD9F0 = 0; void OvlMenu_CallFunction(u32 mode, void* ptr) { switch (mode) { case OVLCALL_TITLE_UPDATE: - Title_80187754(); + Title_Main(); break; case OVLCALL_TITLE_DRAW: - Title_801878D8(); + Title_Draw(); break; case OVLCALL_MAP_UPDATE: - Map_8019E8D0(); + Map_Main(); break; case OVLCALL_MAP_DRAW: - Map_801A01A8(); + Map_Draw(); break; case OVLCALL_OPTION_UPDATE: - Option_Init(); + Option_Main(); break; case OVLCALL_OPTION_DRAW: diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index a8beb028..3d1795ce 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -1204,8 +1204,8 @@ void Map_801AD048(void); void Map_8019E800(void) { Memory_FreeAll(); - func_play_800A5D6C(); - D_ctx_80178410 = 0; + Play_SetupStarfield(); + gStarCount = 0; gNextGameState = GSTATE_MAP; D_game_80161A34 = 5; D_ctx_80177868 = 2; @@ -1232,7 +1232,7 @@ void Map_8019E85C(void) { void Map_8019E8C8(void) { } -void Map_8019E8D0(void) { +void Map_Main(void) { if (D_menu_801CD9B8 > 0) { D_menu_801CD9B8--; } @@ -1462,7 +1462,7 @@ void Map_8019F164(void) { if (D_play_800D3180[gCurrentLevel] == 2) { D_menu_801CD98C = 1; - D_ctx_80177BB0[gCurrentPlanet] = 1; + D_ctx_80177BB0[gMissionNumber] = 1; Map_8019FD1C(gCurrentLevel, 1); } @@ -1488,7 +1488,7 @@ void Map_8019F164(void) { break; } - gCurrentPlanet++; + gMissionNumber++; Map_8019FC04(); @@ -1521,7 +1521,7 @@ void Map_8019F42C(void) { D_menu_801CD974 = 1; sCurrentPlanetId = Map_GetPlanetId(gCurrentLevel); - D_ctx_80177B70[gCurrentPlanet] = gHitCount; + D_ctx_80177B70[gMissionNumber] = gHitCount; Map_8019F910(); Map_8019FD1C(gCurrentLevel, 0); @@ -1532,8 +1532,8 @@ void Map_8019F42C(void) { D_menu_801CD8E0[i] = 0; } - if (gCurrentPlanet != 0) { - for (i = 0; i < gCurrentPlanet; i++) { + if (gMissionNumber != 0) { + for (i = 0; i < gMissionNumber; i++) { D_menu_801CD8E0[i] = Map_GetPathId(D_ctx_80177B90[i], D_ctx_80177B90[i + 1]); } } @@ -1607,7 +1607,7 @@ void Map_8019F600(void) { sPaths[i].alpha = 255; } - gCurrentPlanet = 0; + gMissionNumber = 0; gCurrentLevel = 0; sCurrentPlanetId = 9; @@ -1648,9 +1648,9 @@ void Map_8019F910(void) { for (i = 0; i < 3; i++) { if (gTeamShields[3 - i] <= 0) { - D_ctx_80177B50[gCurrentPlanet] ^= mask; + D_ctx_80177B50[gMissionNumber] ^= mask; } else { - D_ctx_80177B50[gCurrentPlanet] |= mask; + D_ctx_80177B50[gMissionNumber] |= mask; } mask >>= 8; } @@ -1684,7 +1684,7 @@ void Map_8019FA1C(void) { void Map_8019FC04(void) { s32 i; - if (gCurrentPlanet != PLANET_METEO) { + if (gMissionNumber != PLANET_METEO) { D_menu_801CEB48[1] = true; D_menu_801CEB48[2] = true; } @@ -1769,7 +1769,7 @@ bool Map_8019FD1C(LevelId levelId, s32 arg1) { break; case LEVEL_VENOM_ANDROSS: - if (gLevelStage == 0) { + if (gLevelPhase == 0) { planetSaveSlot = SAVE_SLOT_VENOM_1; } else { planetSaveSlot = SAVE_SLOT_VENOM_2; @@ -1877,7 +1877,7 @@ void Map_8019FF48(void) { #endif } -void Map_801A01A8(void) { +void Map_Draw(void) { s32 i; s32* ptr; @@ -2009,13 +2009,13 @@ s32 Map_801A05B4(void) { } void Map_801A0788(void) { - D_ctx_80178410 = 800; + gStarCount = 800; Memory_FreeAll(); - func_play_800A5D6C(); + Play_SetupStarfield(); - D_ctx_80178420 = SCREEN_WIDTH; - D_ctx_80178424 = SCREEN_HEIGHT; + gStarfieldX = SCREEN_WIDTH; + gStarfieldY = SCREEN_HEIGHT; D_ctx_8017842C = 0.0f; D_ctx_80178430 = 0.0f; } @@ -2071,7 +2071,7 @@ void Map_801A0954(void) { D_menu_801CD9E8 = 0; D_menu_801CD9E4 = 0; D_menu_801CD9EC = 0.29f; - D_ctx_80178410 = 800; + gStarCount = 800; D_menu_801CD9C0 = 5; D_menu_801CD948++; break; @@ -2179,8 +2179,8 @@ void Map_801A0D14(void) { TextureRect_8bIA(&gMasterDisp, D_MAP_6019030, 8, 16, 0.0f, D_menu_801B694C, 40.0f, 1.66f); TextureRect_8bIA_MirY(&gMasterDisp, D_MAP_6019030, 8, 16, 0.0f, D_menu_801B6950, 40.0f, 1.68f); - func_bg_8003DE68(71, 118); - func_bg_8003DE68(205, 239); + Background_DrawPartialStarfield(71, 118); + Background_DrawPartialStarfield(205, 239); RCP_SetupDL(&gMasterDisp, 0x4C); @@ -2444,7 +2444,7 @@ void Map_801A1C14(void) { for (i = 0; i < 24; i++) { sPaths[i].alpha = 0; } - D_ctx_80178410 = 0; + gStarCount = 0; gFillScreenRed = 255; gFillScreenGreen = 255; @@ -2918,7 +2918,7 @@ void Map_801A2EB8(void) { if (D_menu_801CD9C4 == 80) { sCurrentPlanetId = sNextPlanetId; - D_ctx_80177B90[gCurrentPlanet] = sCurrentPlanetId; + D_ctx_80177B90[gMissionNumber] = sCurrentPlanetId; Map_801A6368(); } @@ -3131,7 +3131,7 @@ void Map_801A36A8(void) { gNextGameStateTimer = 2; gOptionMenuStatus = OPTION_WAIT; gDrawMode = 0; - D_ctx_80178410 = 0; + gStarCount = 0; break; } @@ -3335,7 +3335,7 @@ void Map_801A4394(void) { switch (D_menu_801CD94C) { case 0: - if (gCurrentPlanet == 0) { + if (gMissionNumber == 0) { D_menu_801CD9C0 = 45; D_menu_801CD94C = 3; } else { @@ -3344,7 +3344,7 @@ void Map_801A4394(void) { break; case 1: - if (gCurrentPlanet == D_menu_801CD9AC) { + if (gMissionNumber == D_menu_801CD9AC) { D_menu_801CD94C = 3; D_menu_801CD9C0 = 45; break; @@ -3603,7 +3603,7 @@ void Map_801A4D7C(void) { } void Map_801A4F8C(void) { - D_ctx_80178410 = 0; + gStarCount = 0; gGameState = GSTATE_GAME_OVER; D_ctx_80177868 = 0; gNextGameStateTimer = 2; @@ -3656,13 +3656,13 @@ void Map_801A4FC4(void) { D_menu_801CEEA8 = 255; D_menu_801CEEAC = 255; - gTotalHits -= D_ctx_80177B70[gCurrentPlanet - 1]; - D_ctx_80177B90[gCurrentPlanet] = PLANET_NONE; - D_ctx_80177B70[gCurrentPlanet - 1] = 0; - D_ctx_80177BB0[gCurrentPlanet - 1] = 0; - D_ctx_80177B50[gCurrentPlanet - 1] = 0x00FFFFFF; + gTotalHits -= D_ctx_80177B70[gMissionNumber - 1]; + D_ctx_80177B90[gMissionNumber] = PLANET_NONE; + D_ctx_80177B70[gMissionNumber - 1] = 0; + D_ctx_80177BB0[gMissionNumber - 1] = 0; + D_ctx_80177B50[gMissionNumber - 1] = 0x00FFFFFF; gHitCount = 0; - gCurrentPlanet--; + gMissionNumber--; D_menu_801CD83C = Map_801A05B4(); @@ -3747,7 +3747,7 @@ void Map_801A53C8(void) { D_menu_801CEEAC = 255; sCurrentPlanetId = sNextPlanetId; - D_ctx_80177B90[gCurrentPlanet] = sCurrentPlanetId; + D_ctx_80177B90[gMissionNumber] = sCurrentPlanetId; Map_801A6368(); @@ -4098,7 +4098,7 @@ bool Map_801A62FC(PlanetId planet) { } #if MODS_LEVEL_SELECT == 1 - if (gCurrentPlanet == 6) { + if (gMissionNumber == 6) { return false; } #endif @@ -5401,7 +5401,7 @@ void Map_801A9A8C(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); #if MODS_LEVEL_SELECT == 1 - if (gCurrentPlanet == 6) { + if (gMissionNumber == 6) { return; } #endif @@ -5466,10 +5466,10 @@ void Map_801A9FD4(s32 arg0) { f32 temp = 16.0f; if (arg0) { - var_s3 = gCurrentPlanet; + var_s3 = gMissionNumber; } else { if ((D_game_80161A34 == 7) || (D_game_80161A34 == 8)) { - var_s3 = gCurrentPlanet; + var_s3 = gMissionNumber; } if (D_game_80161A34 == 5) { var_s3 = D_menu_801CD9AC; @@ -5571,10 +5571,10 @@ void Map_801AA434(s32 arg0, f32 x, f32 y, s32 idx) { D_ctx_80177B70[arg0]); if (D_game_80161A34 == 7) { - temp = gCurrentPlanet; + temp = gMissionNumber; } if ((D_game_80161A34 == 5) || (D_game_80161A34 == 8)) { - temp = gCurrentPlanet + 1; + temp = gMissionNumber + 1; } if (arg0 < temp) { diff --git a/src/overlays/ovl_menu/fox_option.c b/src/overlays/ovl_menu/fox_option.c index 00e95496..af8ece76 100644 --- a/src/overlays/ovl_menu/fox_option.c +++ b/src/overlays/ovl_menu/fox_option.c @@ -111,7 +111,7 @@ s32 D_menu_801B9284; s32 D_menu_801B9288; // gap UnkStruct_D_menu_801B9250 D_menu_801B9290; f32 D_menu_801B9298[32]; -s32 spectrumAnalizerMode; +s32 spectrumAnalyzerMode; s32 D_menu_801B931C; bool D_menu_801B9320; // MusicPlaying status in the expert sound options extern s32 BSS_PAD_0; @@ -431,11 +431,11 @@ void Option_Setup(void) { D_menu_801B9178 = 0; D_menu_801B917C = 0; - D_menu_801B9124 = OPTION_MAIN; + D_menu_801B9124 = OPTION_MAIN_MENU; if ((D_game_80161A34 == 5) || (D_game_80161A34 == 8)) { if (D_game_80161A34 == 8) { - D_ctx_80177B90[gCurrentPlanet] = PLANET_VENOM; + D_ctx_80177B90[gMissionNumber] = PLANET_VENOM; if (D_play_800D3180[LEVEL_VENOM_ANDROSS] == 1) { gSaveFile.save.data.planet[SAVE_SLOT_VENOM_1].played = 1; if (playedExpertMode) { @@ -445,7 +445,7 @@ void Option_Setup(void) { } Save_Write(); } else if (D_play_800D3180[LEVEL_VENOM_ANDROSS] == 2) { - D_ctx_80177BB0[gCurrentPlanet] = 1; + D_ctx_80177BB0[gMissionNumber] = 1; gSaveFile.save.data.planet[SAVE_SLOT_VENOM_2].played = 1; if (playedExpertMode) { gSaveFile.save.data.planet[SAVE_SLOT_VENOM_2].expertClear = 1; @@ -501,7 +501,7 @@ void Option_Setup(void) { D_menu_801B9124 = OPTION_VERSUS; } else { - D_menu_801B9124 = OPTION_MAIN; + D_menu_801B9124 = OPTION_MAIN_MENU; } } @@ -513,10 +513,10 @@ void Option_Setup(void) { Memory_FreeAll(); - D_ctx_80178420 = SCREEN_WIDTH; - D_ctx_80178424 = SCREEN_HEIGHT; + gStarfieldX = SCREEN_WIDTH; + gStarfieldY = SCREEN_HEIGHT; - func_play_800A5D6C(); + Play_SetupStarfield(); gCsCamEyeX = 0.0f; gCsCamEyeY = 0.0f; @@ -546,7 +546,7 @@ void Option_Setup(void) { AUDIO_PLAY_BGM(SEQ_ID_MENU); } -void Option_Init(void) { +void Option_Main(void) { if (D_menu_801B9178 > 0) { D_menu_801B9178--; } @@ -577,7 +577,7 @@ void Option_Init(void) { void Option_UpdateEntry(void) { switch (D_menu_801B9124) { - case OPTION_MAIN: + case OPTION_MAIN_MENU: Option_MainMenuUpdate(); break; @@ -640,7 +640,7 @@ void Option_UpdateEntry(void) { void Option_DrawEntry(void) { switch (D_menu_801B9124) { - case OPTION_MAIN: + case OPTION_MAIN_MENU: Option_MainMenuDraw(); break; @@ -779,7 +779,7 @@ void Option_80192738(void) { void Option_MapUpdate(void) { if (gFillScreenAlpha == 255) { - D_ctx_80178410 = 0; + gStarCount = 0; D_menu_801B9124 = 100; gGameState = GSTATE_MAP; gNextGameStateTimer = 2; @@ -821,7 +821,7 @@ void Option_801929F0(void) { D_game_800D2870 = 0; gBlurAlpha = 255; gControllerLock = 0; - D_ctx_80178410 = 800; + gStarCount = 800; D_menu_801B9248 = 0; if (D_menu_801B9244 == 0) { @@ -1049,7 +1049,7 @@ void Option_MainMenuUpdate(void) { if (D_menu_801B8284 < 120) { D_menu_801B8284 += 18; } else { - D_ctx_80178410 = 0; + gStarCount = 0; gGameState = GSTATE_TITLE; gNextGameStateTimer = 2; D_ctx_80177AE0 = 0; @@ -1098,7 +1098,7 @@ void Option_80193B04(void) { gBlurAlpha = 255; gControllerLock = 0; - D_ctx_80178410 = 800; + gStarCount = 800; if (D_menu_801B9248 == 0) { D_menu_801B91BC = 1; @@ -1300,15 +1300,15 @@ void Option_VersusDraw(void) { void Option_SoundInit(void) { s32 i; - D_ctx_80178410 = 800; + gStarCount = 800; D_menu_801B91B4 = 0; D_menu_801B91B8 = 0; D_menu_801B91BC = 1; D_menu_801B91A0 = 0; - gSoundMode = gSaveFile.save.data.soundMode; - SEQCMD_SET_SOUND_MODE(D_menu_801AE998[gSoundMode]); + gOptionSoundMode = gSaveFile.save.data.soundMode; + SEQCMD_SET_SOUND_MODE(D_menu_801AE998[gOptionSoundMode]); gVolumeSettings[0] = gSaveFile.save.data.musicVolume; gVolumeSettings[1] = gSaveFile.save.data.voiceVolume; @@ -1324,9 +1324,9 @@ void Option_SoundInit(void) { gVolumeSettings[2] = 99; } - func_8001D8A8(0, gVolumeSettings[0]); - func_8001D8A8(1, gVolumeSettings[1]); - func_8001D8A8(2, gVolumeSettings[2]); + Audio_SetVolume(0, gVolumeSettings[0]); + Audio_SetVolume(1, gVolumeSettings[1]); + Audio_SetVolume(2, gVolumeSettings[2]); D_menu_801AEB48[0].unk_18 = gVolumeSettings[0] + 146.0f; D_menu_801AEB48[1].unk_18 = gVolumeSettings[1] + 146.0f; @@ -1404,17 +1404,17 @@ void Option_SoundUpdate(void) { } void Option_80194AEC(void) { - s32 sp3C = gSoundMode; + s32 sp3C = gOptionSoundMode; s32 pad; if (Option_8019C418(&sp3C, 2, 0, 0, 20, 5, 4, gMainController, &D_menu_801B9260)) { AUDIO_PLAY_SFX(0x49000002, gDefaultSfxSource, 4); - gSoundMode = sp3C; - if (gSoundMode >= OPTIONSOUND_MAX) { - gSoundMode = OPTIONSOUND_STEREO; + gOptionSoundMode = sp3C; + if (gOptionSoundMode >= OPTIONSOUND_MAX) { + gOptionSoundMode = OPTIONSOUND_STEREO; } - gSaveFile.save.data.soundMode = gSoundMode; - SEQCMD_SET_SOUND_MODE(D_menu_801AE998[gSoundMode]); + gSaveFile.save.data.soundMode = gOptionSoundMode; + SEQCMD_SET_SOUND_MODE(D_menu_801AE998[gOptionSoundMode]); } } @@ -1445,7 +1445,7 @@ void Option_80194BD0(void) { gSaveFile.save.data.sfxVolume = var_v1; break; } - func_8001D8A8(D_menu_801B924C, var_v1); + Audio_SetVolume(D_menu_801B924C, var_v1); } } @@ -1506,7 +1506,7 @@ void Option_SoundDraw(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - switch (gSoundMode) { + switch (gOptionSoundMode) { case OPTIONSOUND_STEREO: TextureRect_8bIA(&gMasterDisp, D_OPT_800CD90, 56, 13, D_menu_801AEFA8[8], D_menu_801AEFD4[8], 1.0f, 1.0f); break; @@ -1638,13 +1638,13 @@ void Option_801952B4(void) { void Option_ExpertSoundInit(void) { s32 i; - D_ctx_80178410 = 800; + gStarCount = 800; D_menu_801B931C = 0; D_menu_801B9290.unk_0 = 0; D_menu_801B9290.unk_4 = 0; - spectrumAnalizerMode = 0; + spectrumAnalyzerMode = 0; D_menu_801B9320 = 0; // clang-format off @@ -1686,11 +1686,11 @@ void Option_ExpertSoundUpdate(void) { } } - // Spectrum Analizer mode selector + // Spectrum Analyzer mode selector if (gControllerPress[gMainController].button & R_CBUTTONS) { - spectrumAnalizerMode++; - if (spectrumAnalizerMode > 2) { - spectrumAnalizerMode = 0; + spectrumAnalyzerMode++; + if (spectrumAnalyzerMode > 2) { + spectrumAnalyzerMode = 0; } } } @@ -1753,12 +1753,12 @@ void Option_ExpertSoundDraw(void) { temp_v0_4 = Audio_UpdateFrequencyAnalysis(); var_fv1 = 60.0f; - if (spectrumAnalizerMode == 2) { + if (spectrumAnalyzerMode == 2) { var_fv1 = 30.0f; } for (i = 0; i < 32; i++) { - if (spectrumAnalizerMode == 0 || spectrumAnalizerMode == 2) { + if (spectrumAnalyzerMode == 0 || spectrumAnalyzerMode == 2) { D_menu_801B9298[i] = (var_fv1 / 255.0f) * temp_v0_4[i]; } else { D_menu_801B9298[i] = var_fv1 - ((var_fv1 / 255.0f) * temp_v0_4[i]); @@ -1786,11 +1786,11 @@ void Option_ExpertSoundDraw(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, (s32) r, (s32) g, (s32) b, 255); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, var_fs0, D_menu_801AF078[spectrumAnalizerMode], D_menu_801AF008, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, var_fs0, D_menu_801AF078[spectrumAnalyzerMode], D_menu_801AF008, MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_menu_801AF00C, D_menu_801B9298[i], 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801AF06C[spectrumAnalizerMode]); + gSPDisplayList(gMasterDisp++, D_menu_801AF06C[spectrumAnalyzerMode]); Matrix_Pop(&gGfxMatrix); } @@ -1800,7 +1800,7 @@ void Option_ExpertSoundDraw(void) { } void Option_DataInit(void) { - D_ctx_80178410 = 800; + gStarCount = 800; D_menu_801B91E4 = 255.0f; D_menu_801B9330[0] = 0; D_menu_801B9330[1] = 0; @@ -2035,7 +2035,7 @@ static s32 D_menu_801AF0E8[3] = { 0, 67, 255 }; void Option_RankingInit(void) { Title_80188010(); - D_ctx_80178410 = 800; + gStarCount = 800; D_menu_801B91D0 = 1; D_menu_801B93E4 = 0; @@ -2193,8 +2193,8 @@ void Option_8019752C(void) { TextureRect_8bIA(&gMasterDisp, D_OPT_800D170, 8, 16, 0.0f, D_menu_801AF0F8[0], 40.0f, 1.5f); TextureRect_8bIA_MirY(&gMasterDisp, D_OPT_800D170, 8, 16, 0.0f, D_menu_801AF0F8[1], 40.0f, 1.5f); - func_bg_8003DE68(0, 70); - func_bg_8003DE68(170, 239); + Background_DrawPartialStarfield(0, 70); + Background_DrawPartialStarfield(170, 239); RCP_SetupDL(&gMasterDisp, 0x53); if (D_menu_801B91D4 >= 114.0f) { @@ -2637,7 +2637,7 @@ void Option_VersusMenuInit(void) { D_menu_801B9340 = 2; D_game_80161A28 = 0; - D_ctx_80178410 = 0; + gStarCount = 0; D_menu_801B93C4 = 0; @@ -2879,7 +2879,7 @@ void Option_80199EA8(void) { void Option_VersusStageInit(void) { s32 i; - D_ctx_80178410 = 0; + gStarCount = 0; D_menu_801B933C = 0; D_menu_801B91E8 = 255.0f; D_menu_801B93D4 = D_ctx_801778A4 - 1; @@ -3835,7 +3835,7 @@ s32 Option_8019C8C4(void) { s32 var_a0 = 0; s32 temp[10]; - for (i = 0; i < gCurrentPlanet + 1; i++) { + for (i = 0; i < gMissionNumber + 1; i++) { var_v0 += ((D_ctx_80177B50[i] & 0x00FF0000) >> 16) & 1; var_v0 += ((D_ctx_80177B50[i] & 0x0000FF00) >> 8) & 1; var_v0 += (D_ctx_80177B50[i] & 0x000000FF) & 1; @@ -3925,7 +3925,7 @@ void Option_8019CBC0(void) { AUDIO_PLAY_BGM(SEQ_ID_MENU); gBlurAlpha = 208; - D_ctx_80178410 = 800; + gStarCount = 800; D_menu_801B9130 = 1; D_menu_801B9128 = 0; @@ -4148,7 +4148,7 @@ void Option_8019D624(void) { sp142[10][1] = D_menu_801B9150[1][0]; sp142[10][2] = D_menu_801B9150[2][0]; - sp122[10] = gCurrentPlanet + 1; + sp122[10] = gMissionNumber + 1; sp116[10] = gLifeCount[0]; @@ -4345,7 +4345,7 @@ void Option_8019DE74(void) { D_menu_801B912C = 0; if (D_game_80161A34 == 5) { - D_ctx_80178410 = 0; + gStarCount = 0; gGameState = GSTATE_INIT; gLifeCount[0] = 2; gTotalHits = 0; @@ -4368,7 +4368,7 @@ void Option_8019DF64(void) { void Option_InvoiceUpdate(void) { switch (D_menu_801B912C) { case 0: - D_ctx_80178410 = 0; + gStarCount = 0; gBgColor = 0; gFillScreenRed = 0; gFillScreenGreen = 0; @@ -4405,7 +4405,7 @@ void Option_InvoiceUpdate(void) { case 3: if (D_menu_801B9178 == 0) { - D_ctx_80178410 = 0; + gStarCount = 0; gGameState = GSTATE_INIT; gDrawMode = DRAW_NONE; *gLifeCount = 2; diff --git a/src/overlays/ovl_menu/fox_title.c b/src/overlays/ovl_menu/fox_title.c index 72ffe63b..d6f6897c 100644 --- a/src/overlays/ovl_menu/fox_title.c +++ b/src/overlays/ovl_menu/fox_title.c @@ -161,7 +161,7 @@ u16* D_menu_801ADA30[5] = { gMsg_ID_10, gMsg_ID_20, gMsg_ID_30, gMsg_ID_40, gMsg_ID_50, }; -void Title_801875E0(void) { +void Title_Init(void) { gVIsPerFrame = 2; gGameFrameCount = 0; @@ -198,9 +198,9 @@ void Title_801875E0(void) { Memory_FreeAll(); - func_play_800A5D6C(); - D_ctx_80178420 = SCREEN_WIDTH; - D_ctx_80178424 = SCREEN_HEIGHT; + Play_SetupStarfield(); + gStarfieldX = SCREEN_WIDTH; + gStarfieldY = SCREEN_HEIGHT; Title_80188010(); @@ -215,7 +215,7 @@ void Title_801875E0(void) { gControllerLock = 30; } -void Title_80187754(void) { +void Title_Main(void) { switch (D_ctx_80177AE0) { case 0: if (gNextGameStateTimer == 0) { @@ -226,18 +226,18 @@ void Title_80187754(void) { case 1: gDrawMode = DRAW_NONE; - Title_801875E0(); + Title_Init(); break; case 2: gDrawMode = DRAW_TITLE; - Title_801877F0(); + Title_UpdateEntry(); break; } gGameFrameCount++; } -void Title_801877F0(void) { +void Title_UpdateEntry(void) { if (D_menu_801B82A8 > 0) { D_menu_801B82A8 -= 1; } @@ -273,7 +273,7 @@ void Title_801877F0(void) { Title_80190E64(); } -void Title_801878D8(void) { +void Title_Draw(void) { switch (D_menu_801B82C4) { case 7: Title_80187CA8(); @@ -360,7 +360,7 @@ void Title_80187B00(void) { switch (D_menu_801B82C0) { case 0: D_menu_801B8288 = 0; - D_ctx_80178410 = 800; + gStarCount = 800; D_menu_801B82BC = 450; D_menu_801B82C0++; D_menu_801B82A8 = 20; @@ -375,7 +375,7 @@ void Title_80187B00(void) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 60); } } else { - D_ctx_80178410 = 0; + gStarCount = 0; gRadioState = 0; D_menu_801B82C0 = 0; gDrawMode = DRAW_NONE; @@ -509,7 +509,7 @@ void Title_801881FC(void) { D_menu_801B869C = 255; - D_ctx_80178410 = 800; + gStarCount = 800; D_menu_801B9040 = 0; D_menu_801B86C8 = 0.0f; @@ -857,7 +857,7 @@ void Title_801888E8(void) { return; } - D_ctx_80178410 = 0; + gStarCount = 0; D_menu_801B82C0 = 0; @@ -908,7 +908,7 @@ void Title_80189208(void) { void Title_801894E8(void) { s32 i; - D_ctx_80178410 = 800; + gStarCount = 800; D_menu_801B7C98 = 10; for (i = 0; i < 10; i++) { @@ -1207,7 +1207,7 @@ void Title_8018A2F8(void) { } void Title_8018A338(void) { - D_ctx_80178410 = 0; + gStarCount = 0; D_menu_801B869C = 255; @@ -1451,7 +1451,7 @@ void Title_8018A990(void) { } void Title_8018ABC0(void) { - D_ctx_80178410 = 800; + gStarCount = 800; D_menu_801B869C = 255; @@ -1574,7 +1574,7 @@ void Title_8018B058(void) { gFillScreenRed = 255; gFillScreenGreen = 255; gFillScreenBlue = 255; - D_ctx_80178410 = 0; + gStarCount = 0; D_menu_801B8334 = 0; D_menu_801B8338 = 1; @@ -1840,7 +1840,7 @@ void Title_8018B5C4(void) { D_menu_801B82B4 = 0; - D_ctx_80178410 = 800; + gStarCount = 800; D_menu_801B82C0++; } @@ -1898,7 +1898,7 @@ void Title_8018C114(void) { void Title_8018C1C0(void) { s32 i; - D_ctx_80178410 = 1; + gStarCount = 1; D_menu_801B7C98 = 10; for (i = 0; i < 10; i++) { @@ -2089,7 +2089,7 @@ void Title_8018C644(void) { case 2: gFillScreenAlpha = 0; - D_ctx_80178410 = 0; + gStarCount = 0; D_menu_801B86A0 = 0; D_menu_801B82A8 = 20; D_menu_801B82C0++; @@ -3002,11 +3002,11 @@ void Title_80190144(void) { gFillScreenAlpha -= 4; } - D_ctx_801783D0 = D_menu_801B7BB8; - D_ctx_801783D4 = D_menu_801B7BBC; + gSunViewX = D_menu_801B7BB8; + gSunViewY = D_menu_801B7BBC; - if (D_ctx_801783D0 < 950.0f) { - if (D_ctx_801783D0 > -900.0f) { + if (gSunViewX < 950.0f) { + if (gSunViewX > -900.0f) { gFillScreenAlpha += 8; if (gFillScreenAlpha > 60) { gFillScreenAlpha = 60; @@ -3024,7 +3024,7 @@ void Title_80190144(void) { gDPSetColorDither(gMasterDisp++, G_CD_NOISE); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_ctx_801783D0, D_ctx_801783D4, -200.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, gSunViewX, gSunViewY, -200.0f, MTXF_APPLY); for (i = 0; i < 4; i++) { Matrix_Push(&gGfxMatrix); @@ -3055,8 +3055,8 @@ void Title_801903B8(void) { gDPSetColorDither(gMasterDisp++, G_CD_NOISE); if (gFillScreenAlpha > 0) { - temp_fs3 = D_ctx_801783D0 * -0.03f; - temp_fs4 = D_ctx_801783D4 * 0.03f; + temp_fs3 = gSunViewX * -0.03f; + temp_fs4 = gSunViewY * 0.03f; var_fs1 = 1.0f; if (gFillScreenAlpha < 10) { @@ -3066,7 +3066,7 @@ void Title_801903B8(void) { var_fs1 *= 0.5f; Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_ctx_801783D0, D_ctx_801783D4, -200.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, gSunViewX, gSunViewY, -200.0f, MTXF_APPLY); for (i = 4; i < 12; i++) { Matrix_Push(&gGfxMatrix); @@ -3217,7 +3217,7 @@ void Title_80190EA4(void) { D_menu_801B8284 += 18; } else { AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_23); - D_ctx_80178410 = 0; + gStarCount = 0; gRadioState = 0; D_menu_801B82C0 = 0; gDrawMode = DRAW_NONE; @@ -3253,7 +3253,7 @@ void Title_80190FD0(void) { gNextGameStateTimer = 2; gOptionMenuStatus = OPTION_WAIT; gDrawMode = DRAW_NONE; - D_ctx_80178410 = 0; + gStarCount = 0; D_menu_801B8280 = 0; D_menu_801B8284 = 0; gControllerLock = 3; diff --git a/src/overlays/ovl_menu/fox_title.h b/src/overlays/ovl_menu/fox_title.h index f75cf80c..bffc2512 100644 --- a/src/overlays/ovl_menu/fox_title.h +++ b/src/overlays/ovl_menu/fox_title.h @@ -242,7 +242,7 @@ void Title_80190C9C(void); void Title_8018D2B8(s32); void Title_8018EA78(s32); void Title_801906A0(void); -void Title_801877F0(void); +void Title_UpdateEntry(void); s32 Title_80187ABC(void); void Title_80187B00(void); void Title_80187E28(void); diff --git a/tools/comptool.py b/tools/comptool.py index 16a64aad..da44ef20 100644 --- a/tools/comptool.py +++ b/tools/comptool.py @@ -8,11 +8,11 @@ import sys file_names = [ "makerom", "main", "dma_table", "audio_seq", "audio_bank", "audio_table", "ast_common", "ast_bg_space", "ast_bg_planet", - "ast_arwing", "ast_landmaster", "ast_blue_marine", "ast_vs_player", "ast_enmy_planet", "ast_enmy_space", "ast_great_fox", + "ast_arwing", "ast_landmaster", "ast_blue_marine", "ast_versus", "ast_enmy_planet", "ast_enmy_space", "ast_great_fox", "ast_star_wolf", "ast_allies", "ast_corneria", "ast_meteo", "ast_titania", "ast_7_ti_2", "ast_8_ti", "ast_9_ti", "ast_A_ti", "ast_7_ti_1", "ast_sector_x", "ast_sector_z", "ast_aquas", "ast_area_6", "ast_venom_1", "ast_venom_2", "ast_ve1_boss", "ast_bolse", "ast_fortuna", "ast_sector_y", "ast_solar", "ast_zoness", "ast_katina", "ast_macbeth", "ast_warp_zone", - "ast_title", "ast_menu", "ast_option", "ast_versus", "ast_font", "ast_font_3d", "ast_andross", "ast_logo", "ast_ending", + "ast_title", "ast_map", "ast_option", "ast_vs_menu", "ast_font", "ast_font_3d", "ast_andross", "ast_logo", "ast_ending", "ast_ending_award_front", "ast_ending_award_back", "ast_reward", "ast_training", "ast_radio", "ovl_i1", "ovl_i2", "ovl_i3", "ovl_i4", "ovl_i5", "ovl_i6", "ovl_menu", "ovl_ending", "ovl_unused" ] From a6b80a5825c4a9ae06223a3879c864589ff13cf1 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Thu, 25 Apr 2024 01:00:23 -0300 Subject: [PATCH 039/151] some spaces, corrections and TeamId Enum usages --- include/functions.h | 2 +- src/engine/fox_demo.c | 2 +- src/overlays/ovl_i2/fox_me.c | 6 +- src/overlays/ovl_i2/fox_sx.c | 15 +- src/overlays/ovl_i3/fox_so.c | 6 +- src/overlays/ovl_i3/fox_zo.c | 4 +- src/overlays/ovl_i5/fox_ma.c | 6 +- src/overlays/ovl_i6/fox_sy.c | 247 +++++++++++++++++++++++++++++--- src/overlays/ovl_menu/fox_map.c | 19 ++- 9 files changed, 253 insertions(+), 54 deletions(-) diff --git a/include/functions.h b/include/functions.h index 94669d15..21176863 100644 --- a/include/functions.h +++ b/include/functions.h @@ -73,7 +73,7 @@ void func_tank_80046358(Player*); // fox_demo void Cutscene_KillPlayer(Player*); -void func_demo_80048AC0(s32 teamId); +void func_demo_80048AC0(TeamId teamId); void Cutscene_EnterWarpZone(Player*); void Cutscene_LevelStart(Player*); void func_demo_8004AA84(void); diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index d9ce6a4f..e4035b99 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -110,7 +110,7 @@ static Animation* D_demo_800CA1F4[] = { &D_SY_60265B4, &D_SY_602B8DC, &D_SY_60034C4, &D_SY_602A2CC, &D_SY_602CEB4, &D_SY_602B778, &D_SY_601F3B8, }; -void func_demo_80048AC0(s32 teamId) { +void func_demo_80048AC0(TeamId teamId) { s32 teamShield; if (teamId == TEAM_ID_FALCO) { diff --git a/src/overlays/ovl_i2/fox_me.c b/src/overlays/ovl_i2/fox_me.c index 9d917b32..baa43a47 100644 --- a/src/overlays/ovl_i2/fox_me.c +++ b/src/overlays/ovl_i2/fox_me.c @@ -2376,7 +2376,7 @@ void Meteo_LevelComplete(Player* player) { Radio_PlayMessage(gMsg_ID_20345, RCID_ROB64); break; default: - func_demo_80048AC0(2); + func_demo_80048AC0(TEAM_ID_SLIPPY); break; } break; @@ -2390,7 +2390,7 @@ void Meteo_LevelComplete(Player* player) { Radio_PlayMessage(gMsg_ID_20344, RCID_ROB64); break; default: - func_demo_80048AC0(3); + func_demo_80048AC0(TEAM_ID_PEPPY); break; } break; @@ -2404,7 +2404,7 @@ void Meteo_LevelComplete(Player* player) { Radio_PlayMessage(gMsg_ID_20340, RCID_ROB64); break; default: - func_demo_80048AC0(1); + func_demo_80048AC0(TEAM_ID_FALCO); break; } break; diff --git a/src/overlays/ovl_i2/fox_sx.c b/src/overlays/ovl_i2/fox_sx.c index 256d58ab..8936b38b 100644 --- a/src/overlays/ovl_i2/fox_sx.c +++ b/src/overlays/ovl_i2/fox_sx.c @@ -1216,7 +1216,7 @@ bool SectorX_80192AF0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* Matrix_Pop(&gGfxMatrix); Matrix_Pop(&gCalcMatrix); } - return 1; + return true; case 34: rot->x += boss->fwork[27]; @@ -1259,7 +1259,7 @@ bool SectorX_80192AF0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* break; } - return 0; + return false; } void SectorX_80193208(s32 limbIndex, Vec3f* rot, void* data) { @@ -1740,6 +1740,7 @@ void SectorX_LevelComplete(Player* player) { Math_SmoothStepToF(&player->cam.at.z, player->unk_138 + D_ctx_80177D20 + sp48.z, D_ctx_80177A48[1], 500.0f, 0.0f); break; + case 2: player->unk_0D0 += 2.0f; if (player->timer_1F8 == 0) { @@ -1842,7 +1843,7 @@ void SectorX_LevelComplete(Player* player) { break; default: - func_demo_80048AC0(2); + func_demo_80048AC0(TEAM_ID_SLIPPY); break; } break; @@ -1858,13 +1859,13 @@ void SectorX_LevelComplete(Player* player) { break; default: - func_demo_80048AC0(3); + func_demo_80048AC0(TEAM_ID_PEPPY); break; } break; case 521: - func_demo_80048AC0(1); + func_demo_80048AC0(TEAM_ID_FALCO); switch (gTeamShields[TEAM_ID_FALCO]) { case -1: Radio_PlayMessage(gMsg_ID_20337, RCID_ROB64); @@ -1875,7 +1876,7 @@ void SectorX_LevelComplete(Player* player) { break; default: - func_demo_80048AC0(1); + func_demo_80048AC0(TEAM_ID_FALCO); break; } break; @@ -1907,7 +1908,7 @@ void SectorX_LevelComplete(Player* player) { break; case 569: - func_demo_80048AC0(1); + func_demo_80048AC0(TEAM_ID_FALCO); switch (gTeamShields[TEAM_ID_FALCO]) { case -1: Radio_PlayMessage(gMsg_ID_20337, RCID_ROB64); diff --git a/src/overlays/ovl_i3/fox_so.c b/src/overlays/ovl_i3/fox_so.c index abf5560d..506fa6a1 100644 --- a/src/overlays/ovl_i3/fox_so.c +++ b/src/overlays/ovl_i3/fox_so.c @@ -3042,7 +3042,7 @@ void Solar_LevelComplete(Player* player) { Radio_PlayMessage(gMsg_ID_20339, RCID_ROB64); break; default: - func_demo_80048AC0(2); + func_demo_80048AC0(TEAM_ID_SLIPPY); break; } break; @@ -3055,7 +3055,7 @@ void Solar_LevelComplete(Player* player) { Radio_PlayMessage(gMsg_ID_20338, RCID_ROB64); break; default: - func_demo_80048AC0(3); + func_demo_80048AC0(TEAM_ID_PEPPY); break; } break; @@ -3068,7 +3068,7 @@ void Solar_LevelComplete(Player* player) { Radio_PlayMessage(gMsg_ID_20337, RCID_ROB64); break; default: - func_demo_80048AC0(1); + func_demo_80048AC0(TEAM_ID_FALCO); break; } break; diff --git a/src/overlays/ovl_i3/fox_zo.c b/src/overlays/ovl_i3/fox_zo.c index bc1163af..41b76607 100644 --- a/src/overlays/ovl_i3/fox_zo.c +++ b/src/overlays/ovl_i3/fox_zo.c @@ -4702,7 +4702,7 @@ void Zoness_LevelComplete(Player* player) { Radio_PlayMessage(gMsg_ID_20339, RCID_ROB64); break; default: - func_demo_80048AC0(2); + func_demo_80048AC0(TEAM_ID_SLIPPY); break; } break; @@ -4716,7 +4716,7 @@ void Zoness_LevelComplete(Player* player) { break; default: if (!gMissedZoSearchlight) { - func_demo_80048AC0(3); + func_demo_80048AC0(TEAM_ID_PEPPY); } else { Radio_PlayMessage(gMsg_ID_6100, RCID_PEPPY); } diff --git a/src/overlays/ovl_i5/fox_ma.c b/src/overlays/ovl_i5/fox_ma.c index c3fdd879..cd6312e3 100644 --- a/src/overlays/ovl_i5/fox_ma.c +++ b/src/overlays/ovl_i5/fox_ma.c @@ -6930,7 +6930,7 @@ void Macbeth_LevelComplete1(Player* player) { Radio_PlayMessage(gMsg_ID_20333, RCID_ROB64); break; default: - func_demo_80048AC0(2); + func_demo_80048AC0(TEAM_ID_SLIPPY); break; } break; @@ -6948,7 +6948,7 @@ void Macbeth_LevelComplete1(Player* player) { Radio_PlayMessage(gMsg_ID_20332, RCID_ROB64); break; default: - func_demo_80048AC0(3); + func_demo_80048AC0(TEAM_ID_PEPPY); break; } break; @@ -6966,7 +6966,7 @@ void Macbeth_LevelComplete1(Player* player) { Radio_PlayMessage(gMsg_ID_20331, RCID_ROB64); break; default: - func_demo_80048AC0(1); + func_demo_80048AC0(TEAM_ID_FALCO); break; } break; diff --git a/src/overlays/ovl_i6/fox_sy.c b/src/overlays/ovl_i6/fox_sy.c index 882f55ef..4ebe5d6b 100644 --- a/src/overlays/ovl_i6/fox_sy.c +++ b/src/overlays/ovl_i6/fox_sy.c @@ -1,6 +1,8 @@ #include "global.h" #include "assets/ast_sector_y.h" +typedef void (*BossFuncs)(Boss*); + void SectorY_80198244(Boss*); void SectorY_80198ABC(Boss*); void SectorY_80199D64(Boss*); @@ -382,8 +384,8 @@ void SectorY_80198CE4(Boss* boss) { } Math_SmoothStepToF(&boss->vel.y, 0.0f, 0.1f, 0.2f, 0.1f); - yAngle -= boss->unk_078.y; + yAngle -= boss->unk_078.y; if (yAngle < 0.0f) { yAngle += 360.0f; } @@ -490,6 +492,7 @@ void SectorY_80198F5C(Boss* boss) { } else { AUDIO_PLAY_SFX(0x2943500F, boss->sfxSource, 4); } + if ((gBosses[1].obj.status == OBJ_FREE) && (gBosses[2].obj.status == OBJ_FREE)) { AllRange_PlayMessage(gMsg_ID_14350, RCID_BOSS_SECTORY); } @@ -518,12 +521,16 @@ void SectorY_80199438(Boss* boss) { } else { D_ctx_80177A48[8] += D_ctx_80177A48[9]; Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[8] * M_DTOR, MTXF_NEW); + vec.x = 0.0f; vec.y = 0.0f; vec.z = 900.0f; + Matrix_MultVec3f(gCalcMatrix, &vec, &sp68); + gCsCamEyeX = boss->obj.pos.x + sp68.x; gCsCamEyeZ = boss->obj.pos.z + sp68.z; + if ((boss->timer_058 == 40) && gBosses[1].obj.status == OBJ_FREE && gBosses[2].obj.status == OBJ_FREE) { Radio_PlayMessage(gMsg_ID_14360, RCID_BOSS_SECTORY); } @@ -560,10 +567,12 @@ void SectorY_80199438(Boss* boss) { Math_SmoothStepToF(&gPlayer[0].cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 20000.0f, 0); Math_SmoothStepToF(&gPlayer[0].cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 20000.0f, 0); } + if (((gGameFrameCount % 4) == 0) && (boss->swork[36] == 0)) { func_effect_8007C120(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, boss->vel.x, boss->vel.y, boss->vel.z, 0.1f, 5); } + if ((gCsFrameCount == 120) && (boss->swork[36] == 0) && (boss->index == 0)) { if (boss->swork[19] == 0) { func_boss_80042EC0(boss); @@ -574,6 +583,7 @@ void SectorY_80199438(Boss* boss) { Object_Kill(&gEffects[i].obj, gEffects[i].sfxSource); } } + Audio_KillSfxBySource(boss->sfxSource); gShowBossHealth = 0; func_effect_8007A568(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 40.0f); @@ -591,6 +601,7 @@ void SectorY_80199438(Boss* boss) { boss->timer_058 = 100; boss->vel.x = boss->vel.y = boss->vel.z = 0.0f; } + if (boss->timer_058 == 1) { if (boss->index != 0) { Object_Kill(&gActors[D_ctx_80177A10[9]].obj, gActors[D_ctx_80177A10[9]].sfxSource); @@ -700,7 +711,6 @@ void SectorY_80199DAC(Boss* boss) { AUDIO_PLAY_SFX(0x2902306C, boss->sfxSource, 4); } } - } else { Math_SmoothStepToF(&boss->vel.x, boss->fwork[11], 0.1f, 0.5f, 0.1f); Math_SmoothStepToF(&boss->vel.z, boss->fwork[13], 0.1f, 0.5f, 0.1f); @@ -731,6 +741,7 @@ void SectorY_80199DAC(Boss* boss) { SectorY_8019C194(boss, zSpeed, xSpeed); } } + if (boss->timer_056 == 1) { sp34 = Rand_ZeroOne(); if (sp34 >= 0.3f) { @@ -757,15 +768,16 @@ void SectorY_8019A434(Boss* boss) { } void SectorY_8019A520(Boss* boss) { - SectorY_8019B6E8(boss); if (boss->timer_052 == 0) { SectorY_8019BC14(boss); } + Math_SmoothStepToAngle(&boss->unk_078.y, 0.0f, 0.1f, 2.0f, 0.1f); Math_SmoothStepToF(&boss->vel.x, 0.0f, 0.1f, 0.2f, 0.1f); Math_SmoothStepToF(&boss->vel.z, 6.0f, 0.1f, 0.2f, 0.1f); Math_SmoothStepToF(&boss->vel.y, 0.0f, 0.1f, 0.2f, 0.1f); + if (boss->timer_056 == 0) { SectorY_8019A640(boss); } else { @@ -792,6 +804,7 @@ void SectorY_8019A66C(Boss* boss) { if (boss->timer_052 == 0) { SectorY_8019BC14(boss); } + if (boss->timer_056 == 60) { AUDIO_PLAY_SFX(0x2902306C, boss->sfxSource, 4); boss->fwork[34] = 4.5f; @@ -801,6 +814,7 @@ void SectorY_8019A66C(Boss* boss) { AllRange_PlayMessage(gMsg_ID_14320, RCID_BOSS_SECTORY); } } + if (boss->timer_056 <= 60) { boss->fwork[11] = SIN_DEG(boss->unk_078.y) * boss->fwork[45]; boss->fwork[13] = COS_DEG(boss->unk_078.y) * boss->fwork[45]; @@ -810,6 +824,7 @@ void SectorY_8019A66C(Boss* boss) { Math_SmoothStepToF(&boss->vel.x, boss->fwork[11], 0.1f, 0.5f, 0.5f); Math_SmoothStepToF(&boss->vel.y, 10.0f, 0.1f, 0.5f, 0.5f); } + if (boss->timer_056 == 0) { SectorY_80198244(boss); } @@ -834,11 +849,12 @@ void SectorY_8019A898(Boss* boss) { yAngle1 = Math_RadToDeg(Math_Atan2F(boss->fwork[18] - boss->obj.pos.x, boss->fwork[20] - boss->obj.pos.z)); yAngle2 = yAngle1 - boss->unk_078.y; - if (yAngle2 < 0.0f) { yAngle2 += 360.0f; } + boss->swork[21] = 6; + if (((yAngle2 >= 30.0f) && (yAngle2 <= 330.0f)) || ((boss->unk_04C != 0)) && (boss->unk_04C != 27)) { boss->swork[21] = 5; Math_SmoothStepToAngle(&boss->unk_078.y, yAngle1, 0.1f, 2.0f, 0.1f); @@ -849,6 +865,7 @@ void SectorY_8019A898(Boss* boss) { } else { boss->timer_056 = 0; } + if (boss->timer_050 == 0) { SectorY_8019A434(boss); } @@ -858,6 +875,7 @@ void SectorY_8019AA08(Boss* boss) { if (SectorY_8019B5CC(boss)) { return; } + if ((gBosses[1].obj.status == OBJ_FREE) && (gBosses[2].obj.status == OBJ_FREE)) { AllRange_PlayMessage(gMsg_ID_14330, RCID_BOSS_SECTORY); } @@ -890,6 +908,7 @@ void SectorY_8019AAF0(Boss* boss) { Vec3f vel; SectorY_8019BBBC(boss); + yAngle = Math_Atan2F(boss->fwork[18] - boss->obj.pos.x, boss->fwork[20] - boss->obj.pos.z); var_fv1 = 500.0f; if (boss->health != 0) { @@ -909,6 +928,7 @@ void SectorY_8019AAF0(Boss* boss) { AUDIO_PLAY_SFX(0x2902306D, boss->sfxSource, 4); } } + if (boss->unk_04C >= (boss->swork[32] - 5)) { SectorY_80198244(boss); } @@ -927,6 +947,7 @@ void SectorY_8019AAF0(Boss* boss) { boss->vel.x = vel.x; Math_SmoothStepToAngle(&boss->unk_078.y, Math_RadToDeg(yAngle), 0.1f, 6.0f, 0.1f); } + if (boss->swork[31] != 11) { if ((boss->unk_078.z <= 90.0f) || (boss->unk_078.z >= 270.0f)) { @@ -935,13 +956,17 @@ void SectorY_8019AAF0(Boss* boss) { boss->fwork[19] -= 50.0f; } } + Math_SmoothStepToF(&boss->obj.pos.y, boss->fwork[19], 0.1f, 40.0f, 0.1f); + if (D_edisplay_801615D0.z > 0.0f) { boss->swork[32] = 0; } + if (SectorY_8019B528(boss)) { SectorY_80198ABC(boss); } + if (boss->swork[20] == 10) { boss->fwork[0] = 0.25f; } @@ -960,7 +985,6 @@ void SectorY_8019AEC0(Boss* boss) { } void SectorY_8019AEEC(Boss* boss) { - if ((boss->obj.pos.y != 365.0f) && (boss->swork[21] != 1)) { if (boss->unk_04A != 0) { if (boss->unk_04A == 1) { @@ -980,16 +1004,20 @@ void SectorY_8019AEEC(Boss* boss) { gActors[59].obj.pos.z = boss->obj.pos.z - 30.0f; gActors[59].state = 6; } + if (boss->obj.pos.y == 0.0f) { AUDIO_PLAY_SFX(0x0100001D, gDefaultSfxSource, 4); } + Math_SmoothStepToF(&boss->obj.pos.y, 365.0f, 0.1f, 5.0f, 0.1f); Math_SmoothStepToF(&gActors[59].obj.pos.y, 153.0f, 0.1f, 5.0f, 0.1f); Math_SmoothStepToF(&gPlayer[0].cam.eye.z, -28300.0f, 1.0f, 100.0f, 1.0f); + if (gPlayer[0].cam.eye.z == -28300.0f) { Math_SmoothStepToF(&boss->fwork[46], 128.0f, 1.0f, 16.0f, 1.0f); gBossHealthBar = boss->health * 1.7f; } + if (boss->obj.pos.y == 365.0f) { AUDIO_PLAY_SFX(0x09002013, gDefaultSfxSource, 4); boss->timer_050 = 20; @@ -998,12 +1026,15 @@ void SectorY_8019AEEC(Boss* boss) { } } else { gPlayer[0].cam.at.z = boss->obj.pos.z; + Math_SmoothStepToF(&gPlayer[0].cam.eye.z, -29000.0f, 1.0f, 5.0f, 1.0f); Math_SmoothStepToF(&gPlayer[0].cam.eye.x, 2000.0f, 1.0f, 8.0f, 1.0f); Math_SmoothStepToF(&boss->fwork[46], 0.0f, 1.0f, 16.0f, 1.0f); + if (boss->timer_050 == 0) { boss->swork[21] = 0; } + if (boss->timer_056 == 95) { AUDIO_PLAY_SFX(0x3102505A, gActors[59].sfxSource, 4); } @@ -1079,6 +1110,7 @@ bool SectorY_8019B5CC(Boss* boss) { if (gLevelMode == LEVELMODE_ON_RAILS) { return false; } + Math_Vec3fFromAngles(&pos, boss->unk_078.x, boss->unk_078.y, 700.0f); if ((fabsf(gScenery360[0].obj.pos.x - (boss->obj.pos.x + pos.x)) < 2500.0f) && @@ -1115,6 +1147,7 @@ void SectorY_8019B6E8(Boss* boss) { boss->fwork[24] = gPlayer[0].vel.x; boss->fwork[25] = gPlayer[0].vel.y; boss->fwork[26] = gPlayer[0].vel.z; + if (var2 < var) { var = var2; boss->swork[22]++; @@ -1125,6 +1158,7 @@ void SectorY_8019B6E8(Boss* boss) { boss->fwork[25] = gActors[2].vel.y; boss->fwork[26] = gActors[2].vel.z; } + if (var3 < var) { boss->swork[22] = 3; boss->fwork[18] = gActors[3].obj.pos.x; @@ -1135,6 +1169,7 @@ void SectorY_8019B6E8(Boss* boss) { boss->fwork[26] = gActors[3].vel.z; var = var3; } + if (var4 < var) { boss->fwork[18] = gActors[4].obj.pos.x; boss->fwork[19] = gActors[4].obj.pos.y; @@ -1168,10 +1203,12 @@ void SectorY_8019BC14(Boss* boss) { boss->timer_052 = 2; return; } + if ((boss->swork[0x16] == 1) && (D_edisplay_801615D0.z > 0.0f)) { boss->timer_052 = 2; return; } + if (boss->swork[0x16] != 1) { var_fa0 = ((ABS(boss->fwork[0x12] - boss->fwork[1]) + ABS(boss->fwork[0x14] - boss->fwork[3]) + ABS(boss->fwork[0x13] - boss->fwork[2])) / @@ -1181,6 +1218,7 @@ void SectorY_8019BC14(Boss* boss) { boss->fwork[0x13] = boss->fwork[0x13] + boss->fwork[0x19] * var_fa0; boss->fwork[0x14] = boss->fwork[0x14] + boss->fwork[0x1A] * var_fa0; } + if ((fabsf(boss->fwork[3] - boss->fwork[0x14]) > 300.0f) || (fabsf(boss->fwork[1] - boss->fwork[0x12]) > 300.0f)) { sp3C = Math_RadToDeg( Math_Atan2F(boss->fwork[0x12] - boss->fwork[1] - boss->unk_078.x, boss->fwork[0x14] - boss->fwork[3])); @@ -1198,19 +1236,25 @@ void SectorY_8019BC14(Boss* boss) { if (var_fa0 < 0.0f) { var_fa0 += 360.0f; } + if (((sp38 < 41.0f) || (sp38 > 319.0f)) && ((var_fa0 < 41.0f) || (var_fa0 > 319.0f))) { boss->timer_054 = 4; boss->fwork[4] = 30.0f; + sp4C = gPlayer[0].pos.x; sp48 = gPlayer[0].pos.y; sp44 = gPlayer[0].pos.z; + gPlayer[0].pos.x = boss->fwork[0x12]; gPlayer[0].pos.y = boss->fwork[0x13]; gPlayer[0].unk_138 = gPlayer[0].pos.z = boss->fwork[0x14]; + func_effect_8007F11C(OBJ_EFFECT_354, boss->fwork[1], boss->fwork[2], boss->fwork[3], 100.0f); + gPlayer[0].pos.x = sp4C; gPlayer[0].pos.y = sp48; gPlayer[0].unk_138 = gPlayer[0].pos.z = sp44; + if (boss->index == 0) { AUDIO_PLAY_SFX(0x2901306E, boss->sfxSource, 4); } else { @@ -1218,6 +1262,7 @@ void SectorY_8019BC14(Boss* boss) { } } } + if (boss->index == 0) { boss->timer_052 = RAND_INT(20.0f) + 15; } else { @@ -1230,18 +1275,19 @@ void SectorY_8019C194(Boss* boss, f32 zSpeed, f32 xSpeed) { f32 sp28; if ((gBossFrameCount > 250) && (boss->fwork[34] == 2.8f)) { - switch (D_ctx_80177A10[8]) { case 0: if (gTeamShields[TEAM_ID_FALCO] > 0) { AllRange_PlayMessage(gMsg_ID_14200, RCID_FALCO); } break; + case 1: if (gTeamShields[TEAM_ID_PEPPY] > 0) { AllRange_PlayMessage(gMsg_ID_14210, RCID_PEPPY); } break; + case 2: if ((gTeamShields[TEAM_ID_SLIPPY] > 0) && (gBosses[1].obj.status != OBJ_FREE) && (gBosses[2].obj.status != OBJ_FREE)) { @@ -1258,14 +1304,13 @@ void SectorY_8019C194(Boss* boss, f32 zSpeed, f32 xSpeed) { if (boss->fwork[44] >= 360.0f) { boss->fwork[44] = 0.0f; } - if (boss->index == 0) { + if (boss->index == 0) { sp2C = SIN_DEG(boss->fwork[44]) * ABS(boss->vel.z * 1.5f); boss->obj.pos.x += sp2C; sp28 = SIN_DEG(boss->fwork[44]) * ABS(boss->vel.x * 1.5f); boss->obj.pos.z += sp28; - } else { sp2C = SIN_DEG(boss->fwork[44]) * ABS(boss->vel.z * 1.2f); boss->obj.pos.x += sp2C; @@ -1281,8 +1326,8 @@ void SectorY_8019C194(Boss* boss, f32 zSpeed, f32 xSpeed) { boss->obj.pos.y += SIN_DEG(boss->fwork[44]) * 10.0f; } } - if (boss->index == 0) { + if (boss->index == 0) { if (ABS(boss->vel.z) < ABS(boss->vel.x)) { sp2C = sp28; if ((boss->obj.rot.z <= 90.0f) || (boss->obj.rot.z >= 270.0f)) { @@ -1295,7 +1340,6 @@ void SectorY_8019C194(Boss* boss, f32 zSpeed, f32 xSpeed) { } } } else { - if ((boss->obj.rot.z <= 90.0f) || (boss->obj.rot.z >= 270.0f)) { if ((boss->obj.rot.y >= 135.0f) && (boss->obj.rot.y <= 225.0f)) { sp2C = -sp2C; @@ -1306,6 +1350,7 @@ void SectorY_8019C194(Boss* boss, f32 zSpeed, f32 xSpeed) { } } } + if (sp2C == 0.0f) { boss->fwork[41] = ABS(sp2C * 0.01f) + 0.8f; } @@ -1322,7 +1367,7 @@ void SectorY_8019C194(Boss* boss, f32 zSpeed, f32 xSpeed) { } } -static void (*D_i6_801A6910[12])(Boss*) = { +static BossFuncs D_i6_801A6910[] = { SectorY_80197F84, SectorY_80198238, SectorY_80198238, SectorY_801983E4, SectorY_80198CE4, SectorY_80199438, SectorY_80199DAC, SectorY_8019A520, SectorY_8019A66C, SectorY_8019A898, SectorY_8019AAF0, SectorY_8019AEEC, }; @@ -1364,6 +1409,7 @@ void SectorY_8019C888(Boss* boss) { if ((boss->fwork[34] <= 1.0f) && (boss->fwork[34] > 0.5f)) { Audio_KillSfxBySource(boss->sfxSource); } + gBossFrameCount++; boss->fwork[0] = 0.1f; @@ -1387,18 +1433,22 @@ void SectorY_8019C888(Boss* boss) { boss->unk_04C = Animation_GetFrameCount(&D_SY_602B778) - 1; sp1D0 = Animation_GetFrameData(&D_SY_602B778, boss->unk_04C, sp64); break; + case 1: boss->unk_04C = Animation_GetFrameCount(&D_SY_60265B4) - 1; sp1D0 = Animation_GetFrameData(&D_SY_60265B4, boss->unk_04C, sp64); break; + case 2: boss->unk_04C = Animation_GetFrameCount(&D_SY_6029B48) - 1; sp1D0 = Animation_GetFrameData(&D_SY_6029B48, boss->unk_04C, sp64); break; + case 3: boss->unk_04C = Animation_GetFrameCount(&D_SY_602B8DC) - 1; sp1D0 = Animation_GetFrameData(&D_SY_602B8DC, boss->unk_04C, sp64); break; + case 4: boss->unk_04C++; if (boss->unk_04C >= Animation_GetFrameCount(&D_SY_6003348)) { @@ -1406,6 +1456,7 @@ void SectorY_8019C888(Boss* boss) { } sp1D0 = Animation_GetFrameData(&D_SY_6003348, boss->unk_04C, sp64); break; + case 5: boss->unk_04C++; if (boss->unk_04C >= Animation_GetFrameCount(&D_SY_602738C)) { @@ -1413,21 +1464,25 @@ void SectorY_8019C888(Boss* boss) { } sp1D0 = Animation_GetFrameData(&D_SY_602738C, boss->unk_04C, sp64); break; + case 6: sp1D0 = Animation_GetFrameData(&D_SY_602738C, boss->unk_04C, sp64); break; + case 7: if (boss->unk_04C < (Animation_GetFrameCount(&D_SY_602645C) - 1)) { boss->unk_04C++; } sp1D0 = Animation_GetFrameData(&D_SY_602645C, boss->unk_04C, sp64); break; + case 8: if (boss->unk_04C < (Animation_GetFrameCount(&D_SY_60258A0) - 1)) { boss->unk_04C++; } sp1D0 = Animation_GetFrameData(&D_SY_60258A0, boss->unk_04C, sp64); break; + case 9: boss->unk_04C++; if (boss->unk_04C >= Animation_GetFrameCount(&D_SY_60034C4)) { @@ -1436,15 +1491,19 @@ void SectorY_8019C888(Boss* boss) { sp1D0 = Animation_GetFrameData(&D_SY_60034C4, boss->unk_04C, sp64); break; } + boss->obj.rot.x = boss->unk_078.x; boss->obj.rot.y = boss->unk_078.y; boss->obj.rot.z = boss->unk_078.z; + Matrix_RotateZ(gCalcMatrix, -boss->vwork[29].z * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -boss->vwork[29].x * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, -boss->vwork[29].y * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -boss->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, -boss->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, -boss->obj.rot.y * M_DTOR, MTXF_APPLY); + if ((boss->health > 0) && (boss->swork[20] < 10)) { sp58.x = boss->fwork[18] - boss->obj.pos.x; sp58.y = boss->fwork[19] - boss->obj.pos.y; @@ -1551,6 +1610,7 @@ void SectorY_8019C888(Boss* boss) { Math_SmoothStepToF(&boss->fwork[41], 0.0f, 0.1f, 0.05f, 0.05f); Math_SmoothStepToF(&boss->fwork[42], 0.0f, 0.1f, 0.05f, 0.05f); Math_SmoothStepToVec3fArray(sp64, boss->vwork, 1, sp1D0, boss->fwork[0], 100.0f, 0.0f); + if ((boss->dmgType != DMG_NONE) && (boss->health > 0)) { boss->dmgType = DMG_NONE; if (boss->dmgPart == 0) { @@ -1603,6 +1663,7 @@ void SectorY_8019C888(Boss* boss) { gBossHealthBar = (gBosses[1].health + gBosses[2].health) * 1.275f; } } + if (D_edisplay_801615D0.z > 0.0f) { boss->swork[30]++; if (boss->swork[30] > 300 && ((ABS(D_edisplay_801615D0.z) + ABS(D_edisplay_801615D0.x)) < 3500.0f) && @@ -1614,12 +1675,12 @@ void SectorY_8019C888(Boss* boss) { } if (boss->swork[30] > 100) { - if ((((ABS(D_edisplay_801615D0.z) + ABS(D_edisplay_801615D0.x)) < 500.0f) && gTeamShields[TEAM_ID_FALCO] > 0)) { Radio_PlayMessage(gMsg_ID_2233, RCID_FALCO); } } + if (D_edisplay_801615D0.x > 0.0f) { gPlayer[0].flags_228 = PFLAG_228_4; } else { @@ -1645,25 +1706,30 @@ bool SectorY_8019DC4C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 32, 32, 255, 255); } + switch (limbIndex) { case 2: rot->z -= boss->fwork[4]; rot->z += boss->fwork[16]; rot->y -= boss->fwork[17]; break; + case 3: rot->z -= boss->fwork[4]; rot->z += boss->fwork[14]; rot->x -= boss->fwork[15]; break; + case 4: *dList = NULL; break; + case 17: rot->x += boss->fwork[8]; rot->y -= boss->fwork[7]; *dList = D_SY_6014BD0; break; + case 18: rot->x += boss->fwork[6]; rot->y -= boss->fwork[5]; @@ -1679,22 +1745,26 @@ bool SectorY_8019DE10(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* if (boss->index != 0) { return SectorY_8019DC4C(limbIndex, dList, pos, rot, boss); } + if ((boss->timer_05C % 2) != 0) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 32, 32, 255, 255); } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); } + switch (limbIndex) { case 2: rot->z -= boss->fwork[4]; rot->z += boss->fwork[16]; rot->y -= boss->fwork[17]; break; + case 3: rot->z -= boss->fwork[4]; rot->z += boss->fwork[14]; rot->x -= boss->fwork[15]; break; + case 4: if (boss->swork[25] == 0) { *dList = D_SY_6013600; @@ -1705,11 +1775,13 @@ bool SectorY_8019DE10(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* *dList = NULL; } break; + case 17: rot->x += boss->fwork[8]; rot->y -= boss->fwork[7]; *dList = D_SY_6014BD0; break; + case 18: rot->x += boss->fwork[6]; rot->y -= boss->fwork[5]; @@ -1740,6 +1812,7 @@ void SectorY_8019E014(s32 limbIndex, Vec3f* rot, void* data) { boss->fwork[32] = sp28.y; boss->fwork[33] = sp28.z; break; + case 1: Matrix_Push(&gCalcMatrix); Matrix_MultVec3f(gCalcMatrix, &sp70, &sp28); @@ -1752,6 +1825,7 @@ void SectorY_8019E014(s32 limbIndex, Vec3f* rot, void* data) { boss->fwork[2] = sp28.y; boss->fwork[3] = sp28.z; break; + case 3: if (boss->index == 0) { Matrix_MultVec3f(gCalcMatrix, &sp4C, &sp28); @@ -1760,6 +1834,7 @@ void SectorY_8019E014(s32 limbIndex, Vec3f* rot, void* data) { boss->fwork[37] = sp28.z; } break; + case 4: if (boss->index == 0) { Matrix_MultVec3f(gCalcMatrix, &sp64, &sp28); @@ -1768,6 +1843,7 @@ void SectorY_8019E014(s32 limbIndex, Vec3f* rot, void* data) { boss->fwork[30] = sp28.z; } break; + case 6: if (boss->index == 0) { Matrix_MultVec3f(gCalcMatrix, &sp40, &sp28); @@ -1776,6 +1852,7 @@ void SectorY_8019E014(s32 limbIndex, Vec3f* rot, void* data) { boss->fwork[40] = sp28.z; } break; + default: break; } @@ -1797,6 +1874,7 @@ void SectorY_8019E2C4(Boss* boss) { } else { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } + if ((boss->health > 0) || (boss->swork[36] == 0)) { Animation_DrawSkeleton(2, D_SY_602D140, boss->vwork, SectorY_8019DE10, SectorY_8019E014, boss, gCalcMatrix); if (boss->timer_054 != 0) { @@ -1811,6 +1889,7 @@ void SectorY_8019E2C4(Boss* boss) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); } + if (boss->fwork[34] != 0.0f) { RCP_SetupDL_49(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); @@ -1832,6 +1911,7 @@ void SectorY_8019E2C4(Boss* boss) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); } + if (boss->index == 0) { if (boss->fwork[41] != 0.0f) { RCP_SetupDL_49(); @@ -1847,6 +1927,7 @@ void SectorY_8019E2C4(Boss* boss) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); } + if (boss->fwork[42] != 0.0f) { RCP_SetupDL_49(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); @@ -1862,6 +1943,7 @@ void SectorY_8019E2C4(Boss* boss) { gSPDisplayList(gMasterDisp++, D_1024AC0); } } + if (boss->fwork[43] != 0.0f) { RCP_SetupDL_49(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255); @@ -1874,6 +1956,7 @@ void SectorY_8019E2C4(Boss* boss) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); } + if (boss->fwork[46] != 0.0f) { RCP_SetupDL_49(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, (s32) boss->fwork[46], (s32) boss->fwork[46], 0, @@ -1901,11 +1984,10 @@ static Vec3f D_i6_801A69FC[10] = { }; void SectorY_8019EB80(void) { - Actor* actor; + Actor* actor = gActors; s32 i; s32 var_s1; - actor = gActors; if (gHitCount >= 100) { var_s1 = 9; } else { @@ -1931,6 +2013,7 @@ void SectorY_8019EB80(void) { actor->vwork[0].z = D_i6_801A69FC[i].z + gPlayer[0].pos.z; actor->state = 1; Object_SetInfo(&actor->info, actor->obj.id); + if (i >= 3) { actor->unk_0B6 = 35; actor->unk_0F4.z = 0.0f; @@ -1983,10 +2066,13 @@ void SectorY_LevelComplete(Player* player) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); } } + Object_Kill(&gActors[2].obj, gActors[2].sfxSource); Object_Kill(&gActors[3].obj, gActors[3].sfxSource); Object_Kill(&gActors[4].obj, gActors[4].sfxSource); + player->unk_1D0++; + D_ctx_80177A48[0] = 0.05f; if (Rand_ZeroOne() > 0.5f) { D_ctx_80177A48[9] = -1.0f; @@ -1994,6 +2080,7 @@ void SectorY_LevelComplete(Player* player) { D_ctx_80177A48[9] = 1.0f; } break; + case 1: Math_SmoothStepToF(&player->unk_0E4, 0, 0.1f, 5.0f, 0); Math_SmoothStepToF(&player->pos.y, 400.0f, 0.05f, 3.0f, 0); @@ -2002,6 +2089,7 @@ void SectorY_LevelComplete(Player* player) { temp_ft1 = Math_RadToDeg(Math_Atan2F(temp1, temp2)); temp_ft1 = Math_SmoothStepToAngle(&player->unk_0E8, temp_ft1, 0.5f, 2.0f, 0.0001f) * 30.0f; Math_SmoothStepToAngle(&player->unk_0EC, -temp_ft1, 0.1f, 5.0f, 0.0001f); + if (gCsFrameCount < 180) { D_ctx_80177A48[8] += D_ctx_80177A48[9]; Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[8] * M_DTOR, MTXF_NEW); @@ -2038,6 +2126,7 @@ void SectorY_LevelComplete(Player* player) { player->unk_0EC = 0.0f; } break; + case 2: if (player->timer_1F8 == 0) { player->unk_240 = 1; @@ -2064,10 +2153,12 @@ void SectorY_LevelComplete(Player* player) { player->wings.modelId = 1; } break; + case 3: if ((gCsFrameCount < 720) && D_ctx_801782F8) { player->wings.unk_30 = (f32) (gGameFrameCount & 2) * 5.0f; } + gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 4; if (gFillScreenAlpha == 0) { @@ -2080,6 +2171,7 @@ void SectorY_LevelComplete(Player* player) { if (gCsFrameCount == 395) { AUDIO_PLAY_SFX(0x09000013, player->sfxSource, 0); } + D_ctx_80177A48[1] += D_ctx_80177A48[2]; Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, MTXF_NEW); sp60.y = 0.0f; @@ -2087,6 +2179,7 @@ void SectorY_LevelComplete(Player* player) { sp60.x = D_ctx_80177A48[8]; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp60, &sp54); Math_SmoothStepToF(&D_ctx_80177A48[9], 3400.0f, 1.0f, 0.1f, 0.0f); + if (D_ctx_80177A48[1] >= 93.0f) { if (gCsFrameCount < 1380) { Math_SmoothStepToF(&D_ctx_80177A48[7], 300.0f, 1.0f, 0.7f, 0.0f); @@ -2094,6 +2187,7 @@ void SectorY_LevelComplete(Player* player) { D_ctx_80177A48[7] -= 5.0f; } } + if (gCsFrameCount >= 640) { Math_SmoothStepToF(&D_ctx_80177A48[6], 1.0f, 0.1f, 0.025f, 0.0f); Math_SmoothStepToF(&D_ctx_80177A48[8], 1600.0f, 1.0f, D_ctx_80177A48[6], 0.0f); @@ -2106,6 +2200,7 @@ void SectorY_LevelComplete(Player* player) { gCsCamAtX = 0.0f; gCsCamAtY = 3500.0f; gCsCamAtZ = D_ctx_80177A48[7] + player->pos.z; + if (gCsFrameCount > 1440) { player->unk_0D0 += 2.0f; player->unk_0E4 += 0.1f; @@ -2116,6 +2211,7 @@ void SectorY_LevelComplete(Player* player) { } else { Math_SmoothStepToF(&D_ctx_80177A48[2], 0.01f, 1.0f, 0.0016f, 0); } + if (gCsFrameCount > 1530) { gFillScreenAlphaTarget = 255; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; @@ -2130,6 +2226,7 @@ void SectorY_LevelComplete(Player* player) { } break; } + switch (gCsFrameCount) { case 520: if (gHitCount >= 100) { @@ -2137,6 +2234,7 @@ void SectorY_LevelComplete(Player* player) { } gLevelClearScreenTimer = 100; break; + case 580: if (gHitCount >= 100) { Radio_PlayMessage(gMsg_ID_14370, RCID_FOX); @@ -2144,19 +2242,22 @@ void SectorY_LevelComplete(Player* player) { Radio_PlayMessage(gMsg_ID_20010, RCID_FOX); } break; + case 725: switch (gTeamShields[TEAM_ID_SLIPPY]) { case 0: Radio_PlayMessage(gMsg_ID_20345, RCID_ROB64); break; + case -1: Radio_PlayMessage(gMsg_ID_20333, RCID_ROB64); break; + default: if (gHitCount >= 100) { Radio_PlayMessage(gMsg_ID_2305, RCID_SLIPPY); } else { - func_demo_80048AC0(2); + func_demo_80048AC0(TEAM_ID_SLIPPY); } break; } @@ -2167,41 +2268,49 @@ void SectorY_LevelComplete(Player* player) { case 0: Radio_PlayMessage(gMsg_ID_20344, RCID_ROB64); break; + case -1: Radio_PlayMessage(gMsg_ID_20332, RCID_ROB64); break; + default: if (gHitCount >= 100) { Radio_PlayMessage(gMsg_ID_20261, RCID_PEPPY); } else { - func_demo_80048AC0(3); + func_demo_80048AC0(TEAM_ID_PEPPY); } break; } break; + case 1018: switch (gTeamShields[TEAM_ID_FALCO]) { case 0: Radio_PlayMessage(gMsg_ID_20340, RCID_ROB64); break; + case -1: Radio_PlayMessage(gMsg_ID_20331, RCID_ROB64); break; + default: if (gHitCount >= 100) { Radio_PlayMessage(gMsg_ID_20262, RCID_FALCO); } else { - func_demo_80048AC0(1); + func_demo_80048AC0(TEAM_ID_FALCO); } break; } break; + case 1163: gShowLevelClearStatusScreen = 1; break; + case 1363: gShowLevelClearStatusScreen = 0; break; + case 1440: AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); player->unk_194 = 5.0f; @@ -2209,22 +2318,26 @@ void SectorY_LevelComplete(Player* player) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); break; + case 1380: if (gTeamShields[TEAM_ID_PEPPY] > 0) { gActors[0].state = 2; } break; + case 1400: if (gTeamShields[TEAM_ID_SLIPPY] > 0) { gActors[1].state = 2; } break; + case 1420: if (gTeamShields[TEAM_ID_FALCO] > 0) { gActors[2].state = 2; } break; } + Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4) * M_DTOR), MTXF_APPLY); sp60.x = 0.0f; @@ -2267,6 +2380,7 @@ void SectorY_8019FF00(Actor* actor) { actor->state = 4; } break; + case 2: actor->state = 3; AUDIO_PLAY_SFX(0x09000002, actor->sfxSource, 0); @@ -2277,6 +2391,7 @@ void SectorY_8019FF00(Actor* actor) { actor->fwork[0] += 2.0f; actor->unk_0F4.x += 0.1f; break; + case 5: Math_SmoothStepToF(&actor->unk_0F4.x, 0.0f, 0.1f, 5.0f, 0.0f); temp1 = actor->obj.pos.x - gBosses[actor->timer_04C].obj.pos.x; @@ -2287,6 +2402,7 @@ void SectorY_8019FF00(Actor* actor) { 30.0f, 0.1f, 5.0f, 0.0001f); break; + case 7: actor->unk_0F4.y = gPlayer[0].unk_0E8; actor->unk_0F4.z = gPlayer[0].unk_0EC; @@ -2301,6 +2417,7 @@ void SectorY_8019FF00(Actor* actor) { Math_SmoothStepToF(&actor->obj.pos.x, 230.0f, 1.0f, 13.0f, 0.0f); } break; + case 8: Math_SmoothStepToF(&actor->obj.pos.y, -100.0f, 0.1f, 1.0f, 0.0f); if (gCsFrameCount >= 535) { @@ -2316,6 +2433,7 @@ void SectorY_8019FF00(Actor* actor) { Math_SmoothStepToF(&actor->obj.pos.x, -230.0f, 1.0f, 13.0f, 0.0f); } break; + case 9: Math_SmoothStepToF(&actor->obj.pos.y, -50.0f, 0.1f, 1.0f, 0.0f); if (gCsFrameCount >= 525) { @@ -2332,6 +2450,7 @@ void SectorY_8019FF00(Actor* actor) { } break; } + if (actor->state != 6) { Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -(actor->unk_0F4.x * M_DTOR), MTXF_APPLY); @@ -2362,6 +2481,7 @@ void SectorY_801A0510(Actor* actor, s32 arg1) { actor->obj.pos.x = D_i6_801A6A74[arg1].x; actor->obj.pos.y = D_i6_801A6A74[arg1].y; actor->obj.pos.z = D_i6_801A6A74[arg1].z; + switch (arg1) { case 0: case 1: @@ -2371,6 +2491,7 @@ void SectorY_801A0510(Actor* actor, s32 arg1) { actor->obj.rot.y = 90.0f; Object_SetInfo(&actor->info, actor->obj.id); break; + case 3: actor->unk_0B6 = 36; actor->vel.z = -5.0f; @@ -2378,27 +2499,32 @@ void SectorY_801A0510(Actor* actor, s32 arg1) { actor->obj.rot.y = 180.0f; Object_SetInfo(&actor->info, actor->obj.id); break; + case 4: actor->unk_0B6 = 37; actor->obj.rot.y = 90.0f; Object_SetInfo(&actor->info, actor->obj.id); break; + case 5: case 9: actor->unk_0B6 = 39; actor->obj.rot.y = 180.0f; Object_SetInfo(&actor->info, actor->obj.id); break; + case 6: actor->unk_0B6 = 36; actor->obj.rot.y = 180.0f; actor->scale = 1.0f; Object_SetInfo(&actor->info, actor->obj.id); break; + case 7: actor->unk_0B6 = 40; Object_SetInfo(&actor->info, actor->obj.id); break; + default: break; } @@ -2520,8 +2646,8 @@ void SectorY_801A0AC0(Player* player) { gFillScreenAlpha = 255; } - if ((gGameFrameCount & 0xC) && ((gGameFrameCount % 4) == 0)) { - spB0 = (((gGameFrameCount & 0xC) >> 2) + 4); + if ((gGameFrameCount & 12) && ((gGameFrameCount % 4) == 0)) { + spB0 = (((gGameFrameCount & 12) >> 2) + 4); for (i = 10; i < ARRAY_COUNT(gActors); i++) { if (gActors[i].obj.status == OBJ_FREE) { SectorY_801A07FC(&gActors[spB0], &gActors[i]); @@ -2626,7 +2752,7 @@ void SectorY_801A0AC0(Player* player) { gActors[8].obj.pos.y - 500.0f + RAND_FLOAT_CENTERED(1000.0f), gActors[8].obj.pos.z + RAND_FLOAT_CENTERED(3000.0f), 8); } - if (gGameFrameCount & 0x14) { + if (gGameFrameCount & 20) { for (i = 12; i < ARRAY_COUNT(gActors); i++) { if (gActors[i].obj.status == OBJ_FREE) { SectorY_801A0A08( @@ -2676,7 +2802,9 @@ void SectorY_801A0AC0(Player* player) { break; } } + SectorY_801A0510(&gActors[11], 8); + gActors[11].vel.x = 80.0f; gActors[11].vel.z = -10.0f; gActors[11].fwork[2] = 0.2f; @@ -2684,18 +2812,21 @@ void SectorY_801A0AC0(Player* player) { gActors[11].obj.rot.x = 0.0f; gActors[11].obj.rot.z = 0.0f; break; + case 145: func_effect_8007BFFC(gActors[11].obj.pos.x, gActors[11].obj.pos.y, gActors[11].obj.pos.z, gActors[11].vel.x, gActors[11].vel.y, gActors[11].vel.z, 8, 10); func_effect_8007B344(gActors[11].obj.pos.x, gActors[11].obj.pos.y, gActors[11].obj.pos.z, 8, 5); AUDIO_PLAY_SFX(0x2903A060, gActors[11].sfxSource, 4); break; + case 188: gActors[5].fwork[0] = gActors[6].fwork[0] = gActors[7].fwork[0] = 3.8f; AUDIO_PLAY_SFX(0x2902306C, gActors[5].sfxSource, 4); AUDIO_PLAY_SFX(0x2902306C, gActors[6].sfxSource, 4); AUDIO_PLAY_SFX(0x2902306C, gActors[7].sfxSource, 4); break; + case 150: Object_Kill(&gActors[11].obj, gActors[11].sfxSource); for (i = 10; i < 24; i++) { @@ -2704,14 +2835,17 @@ void SectorY_801A0AC0(Player* player) { RAND_FLOAT_CENTERED(50.0f), i); } break; + case 155: gActors[7].fwork[0] = 3.8f; AUDIO_PLAY_SFX(0x2902306C, gActors[7].sfxSource, 4); break; + case 163: gActors[6].fwork[0] = 3.8f; AUDIO_PLAY_SFX(0x2902306C, gActors[6].sfxSource, 4); break; + case 240: gActors[9].iwork[0] = 255; gActors[9].iwork[1] = 255; @@ -2724,6 +2858,7 @@ void SectorY_801A0AC0(Player* player) { AUDIO_PLAY_SFX(0x2940F026, gActors[5].sfxSource, 4); D_ctx_801779A8[gMainController] = 100.0f; break; + case 260: gActors[9].fwork[4] = gActors[9].scale = 1000; gActors[9].obj.pos.x = -8300.0f; @@ -2761,6 +2896,7 @@ void SectorY_801A0AC0(Player* player) { break; } break; + case 2: if (gCsFrameCount < 300) { gFillScreenRed = 255; @@ -2887,22 +3023,27 @@ void SectorY_801A0AC0(Player* player) { gActors[7].vel.x -= 0.2f; } } + switch (gCsFrameCount) { case 340: gActors[5].fwork[0] = 1.8f; AUDIO_PLAY_SFX(0x2902306C, gActors[5].sfxSource, 4); break; + case 350: gActors[6].fwork[0] = 1.8f; AUDIO_PLAY_SFX(0x2902306C, gActors[6].sfxSource, 4); break; + case 370: gActors[6].fwork[5] = 0.0f; gActors[7].fwork[5] = 0.0f; break; + case 360: AUDIO_PLAY_BGM(SEQ_ID_INTRO_44); break; + case 389: gActors[5].iwork[4] = 1; gActors[6].vel.x = -2.0f; @@ -2914,12 +3055,14 @@ void SectorY_801A0AC0(Player* player) { break; } break; + case 3: if (gCsFrameCount < 520) { Math_SmoothStepToAngle(&D_ctx_80177A48[1], 120.0f, 0.1f, D_ctx_80177A48[2], 0); Math_SmoothStepToF(&D_ctx_80177A48[2], 2.0f, 0.1f, 0.05f, 0); Math_SmoothStepToF(&D_ctx_80177A48[3], 100.0f, 1.0f, 1.0f, 0); Math_SmoothStepToF(&D_ctx_80177A48[4], 400.0f, 1.0f, 10.0f, 0); + if (gCsFrameCount <= 410) { gCsCamAtX = player->cam.at.x = gActors[5].obj.pos.x; } @@ -2932,6 +3075,7 @@ void SectorY_801A0AC0(Player* player) { player->cam.eye.y = gCsCamEyeY = D_ctx_80177A48[3] + sp98.y; player->cam.eye.z = gCsCamEyeZ = sp98.z; } + if (gCsFrameCount >= 390) { if (gActors[6].iwork[4] != 0) { gActors[6].fwork[0] = 1.8f; @@ -2961,6 +3105,7 @@ void SectorY_801A0AC0(Player* player) { Math_SmoothStepToF(&gActors[6].vel.x, -40.0f, 1.0f, 1.0f, 1.0f); Math_SmoothStepToF(&gActors[6].vel.z, -60.0f, 1.0f, 1.0f, 1.0f); } + if (gCsFrameCount >= 400) { if (gActors[7].iwork[5] < 35) { if (gActors[7].iwork[4] == 4) { @@ -2972,9 +3117,11 @@ void SectorY_801A0AC0(Player* player) { gActors[7].iwork[5] = 0; } } + if ((gCsFrameCount >= 380) && (gCsFrameCount <= 460)) { Math_SmoothStepToAngle(&gActors[5].obj.rot.y, 30.0f, 1.0f, 0.75f, 0.0f); } + if ((gCsFrameCount > 440) && (player->unk_0E8 != 0.0f)) { Math_SmoothStepToF(&gPlayer[0].pos.y, 0.0f, 0.1f, 5.0f, 0.0f); Math_SmoothStepToAngle(&player->unk_0EC, @@ -2982,10 +3129,12 @@ void SectorY_801A0AC0(Player* player) { 5.0f, 0); Math_SmoothStepToF(&gPlayer[0].pos.x, 0.0f, 1.0f, 13.0f, 0.0f); } + if (player->unk_0E8 == 0.0f) { Math_SmoothStepToAngle(&player->unk_0EC, 0.0f, 1.0f, 0.5f, 0); Math_SmoothStepToF(&gPlayer[0].pos.x, 0.0f, 1.0f, 2.0f, 0.0f); } + if (gCsFrameCount >= 445) { Math_SmoothStepToF(&gActors[7].vel.z, -40.0f, 1.0f, 1.0f, 1.0f); Math_SmoothStepToF(&gActors[7].vel.x, -60.0f, 1.0f, 1.0f, 1.0f); @@ -3052,6 +3201,7 @@ void SectorY_801A0AC0(Player* player) { gActors[5].vel.x -= 0.25f; gActors[5].vel.z -= 2.0f; break; + case 420: player->pos.x = 4800.0f; player->pos.y = 300.0f; @@ -3059,25 +3209,30 @@ void SectorY_801A0AC0(Player* player) { player->unk_0D0 = 40.0f; player->unk_0E8 = 80.0f; player->unk_0EC = 240.0f; + for (i = 0; i < 3; i++) { SectorY_801A06A4(&gActors[i], i); } break; + case 425: gActors[5].vel.x -= 0.5f; gActors[5].vel.z -= 1.5f; Object_Kill(&gActors[10].obj, gActors[10].sfxSource); SectorY_801A07FC(&gActors[5], &gActors[10]); break; + case 435: Object_Kill(&gActors[10].obj, gActors[10].sfxSource); SectorY_801A07FC(&gActors[5], &gActors[10]); gActors[7].fwork[0] = 1.8f; AUDIO_PLAY_SFX(0x2902306C, gActors[7].sfxSource, 4); break; + case 458: gActors[7].iwork[4] = 0; break; + case 450: gActors[5].vel.x -= 0.5f; gActors[5].vel.z -= 1.5f; @@ -3085,15 +3240,18 @@ void SectorY_801A0AC0(Player* player) { SectorY_801A07FC(&gActors[5], &gActors[10]); gActors[10].timer_0BC = 180; break; + case 470: gActors[5].iwork[4] = 6; gActors[5].iwork[5] = 0; gActors[5].fwork[0] = 1.8f; break; + case 530: gActors[5].vel.x = -10.0f; gActors[5].vel.z = -10.0f; break; + case 545: player->unk_194 = 10.0f; player->unk_190 = 10.0f; @@ -3101,10 +3259,12 @@ void SectorY_801A0AC0(Player* player) { gControllerRumbleFlags[gMainController] = 1; gControllerRumbleTimers[gMainController] = 5; break; + case 500: case 510: gActors[5].fwork[0] = 1.8f; break; + case 560: D_ctx_80177A48[0] = 0.1f; gActors[5].vel.x = gActors[5].vel.z = 0.0f; @@ -3116,10 +3276,12 @@ void SectorY_801A0AC0(Player* player) { break; } break; + case 4: Math_SmoothStepToAngle(&player->unk_0EC, 0.0f, 1.0f, 0.5f, 0); Math_SmoothStepToF(&gPlayer[0].pos.x, 0.0f, 1.0f, 1.0f, 0.0f); Math_SmoothStepToF(D_ctx_80177A48, 1.0f, 0.1f, 0.05f, 0.0f); + if (gCsFrameCount < 595) { Math_SmoothStepToF(&gActors[5].obj.pos.z, -12000.0f, 1.0f, 100.0f, 1.0f); Math_SmoothStepToF(&gActors[5].obj.pos.x, 0.0f, 1.0f, 40.0f, 1.0f); @@ -3133,17 +3295,21 @@ void SectorY_801A0AC0(Player* player) { } Math_SmoothStepToF(&gActors[6].obj.pos.z, -12000.0f, 1.0f, 40.0f, 1.0f); Math_SmoothStepToF(&gActors[6].obj.pos.x, -13000.0f, 1.0f, 80.0f, 1.0f); + gCsCamAtX = player->pos.x; gCsCamAtZ = player->pos.z; + if (gCsFrameCount < 590) { gCsCamAtY = player->pos.y; } + if ((gCsFrameCount >= 590) && (gCsFrameCount < 605)) { Math_SmoothStepToF(&gCsCamEyeZ, gActors[0].obj.pos.z, 1.0f, 20.0f, 0.0f); Math_SmoothStepToF(&gCsCamEyeX, 0.0f, 1.0f, 4.0f, 0.0f); Math_SmoothStepToF(&gCsCamEyeY, (player->pos.y * player->unk_148) + 50.0f, 1.0f, 2.25f, 0.0f); Math_SmoothStepToF(&gCsCamAtY, (player->pos.y * player->unk_148) + 20.0f, 1.0f, 1.5f, 0.0f); } + if (gCsFrameCount >= 605) { Math_SmoothStepToF(&gCsCamEyeX, 0.0f, 1.0f, 3.0f, 0.0f); Math_SmoothStepToF(&gCsCamEyeY, (player->pos.y * player->unk_148) + 50.0f, 1.0f, 2.0f, 0.0f); @@ -3152,9 +3318,9 @@ void SectorY_801A0AC0(Player* player) { gCsCamAtY = (player->pos.y * player->unk_148) + 20.0f; Math_SmoothStepToF(D_ctx_80177A48, 1.0f, 0.1f, 0.1f, 0); } + switch (gCsFrameCount) { case 580: - for (i = 6; i < 10; i++) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); } @@ -3164,14 +3330,17 @@ void SectorY_801A0AC0(Player* player) { } SectorY_801A0510(&gActors[9], 9); break; + case 590: Object_Kill(&gActors[0].obj, gActors[0].sfxSource); break; + case 600: Object_Kill(&gActors[2].obj, gActors[9].sfxSource); Object_Kill(&gActors[1].obj, gActors[8].sfxSource); break; } + if (gCsFrameCount >= 609) { gActors[7].obj.pos.z = -7100.0f; gActors[8].obj.pos.z = -8100.0f; @@ -3199,6 +3368,7 @@ void SectorY_801A0AC0(Player* player) { player->cam.at.y = player->pos.y * player->unk_148; player->cam.at.y += 20.0f; player->cam.at.z = player->unk_138 - 41.0f; + for (i = 0; i < 11; i++) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); } @@ -3263,12 +3433,12 @@ void SectorY_Actor204_Update(Actor204* this) { Vec3f sp68[30]; Vec3f sp5C; Vec3f sp50; - s32 sp4C; + s32 sp4C = 30; s32 pad; - sp4C = 30; this->iwork[14] = this->unk_0B4 - 48; this->info.drawType = 2; + if (this->iwork[18] != 0) { this->iwork[18]--; } @@ -3280,47 +3450,57 @@ void SectorY_Actor204_Update(Actor204* this) { this->timer_0BE = 50; this->iwork[19] = 0; break; + case 2: this->unk_046 = 1; this->timer_0BE = 20; this->iwork[19] = 0; break; + case 3: this->unk_046 = 2; this->unk_0B6 = 0; break; + case 4: this->unk_046 = 0; this->unk_0B6 = 0; break; + case 8: this->unk_046 = 1; this->timer_0BE = 50; this->iwork[19] = 1; break; + case 9: this->unk_046 = 1; this->timer_0BE = 20; this->iwork[19] = 1; break; + case 10: this->unk_046 = 1; this->timer_0BE = 50; this->iwork[19] = -1; break; + case 11: this->unk_046 = 1; this->timer_0BE = 20; this->iwork[19] = -1; break; + case 6: this->unk_046 = 4; this->unk_0B6 = 0; break; + case 5: this->unk_046 = 5; this->unk_0B6 = Animation_GetFrameCount(&D_SY_602B778) - 1; break; + case 7: this->unk_046 = 6; this->unk_0B6 = Animation_GetFrameCount(&D_SY_602B778) - 1; @@ -3346,6 +3526,7 @@ void SectorY_Actor204_Update(Actor204* this) { sp4C = Animation_GetFrameData(&D_SY_602CEB4, this->unk_0B6, sp68); } break; + case 1: i = this->iwork[17]; if (i != 0) { @@ -3360,6 +3541,7 @@ void SectorY_Actor204_Update(Actor204* this) { this->unk_0B6 = Animation_GetFrameCount(&D_SY_602A2CC) - 1; sp4C = Animation_GetFrameData(&D_SY_602A2CC, this->unk_0B6, sp68); } + if (this->timer_0BE == 15) { this->timer_0C4 = 4; this->fwork[19] = 30.0f; @@ -3379,18 +3561,21 @@ void SectorY_Actor204_Update(Actor204* this) { } this->unk_048 = 0; } + if (this->timer_0BE == 0) { this->unk_0B6 = 0; this->unk_046 = 0; this->fwork[15] = 0.0f; } break; + case 2: if (this->unk_0B6 < (Animation_GetFrameCount(&D_SY_6029B48) - 1)) { this->unk_0B6++; } sp4C = Animation_GetFrameData(&D_SY_6029B48, this->unk_0B6, sp68); break; + case 4: this->unk_0B6++; if (this->unk_0B6 >= (Animation_GetFrameCount(&D_SY_602B778) - 1)) { @@ -3400,6 +3585,7 @@ void SectorY_Actor204_Update(Actor204* this) { } sp4C = Animation_GetFrameData(&D_SY_602B778, this->unk_0B6, sp68); break; + case 5: case 6: this->unk_0B6 -= 1; @@ -3414,22 +3600,27 @@ void SectorY_Actor204_Update(Actor204* this) { } sp4C = Animation_GetFrameData(&D_SY_602B778, this->unk_0B6, sp68); break; + case 3: this->unk_0B6++; if (this->unk_0B6 >= Animation_GetFrameCount(&D_SY_6003348)) { this->unk_0B6 = Animation_GetFrameCount(&D_SY_6003348) - 1; } + sp4C = Animation_GetFrameData(&D_SY_6003348, this->unk_0B6, sp68); + if ((this->timer_0BE % 4U) == 0) { func_effect_8007D2C8(RAND_FLOAT_CENTERED(150.0f) + this->obj.pos.x, RAND_FLOAT_CENTERED(150.0f) + this->obj.pos.y, this->obj.pos.z + 30.0f, 4.0f); } + if (this->timer_0BE == 5U) { func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, this->vel.z, 8.0f, 10); func_effect_8007B344(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 8.0f, 5); AUDIO_PLAY_SFX(0x2903A060, this->sfxSource, 4); } + if (this->timer_0BE == 0) { Object_Kill(&this->obj, this->sfxSource); Actor_Despawn(this); @@ -3440,27 +3631,34 @@ void SectorY_Actor204_Update(Actor204* this) { } break; } + if ((this->unk_046 == 1) || (this->unk_046 == 2)) { Matrix_RotateZ(gCalcMatrix, -this->vwork[29].z * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -this->vwork[29].x * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, -this->vwork[29].y * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, -this->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, -this->obj.rot.x * M_DTOR, MTXF_APPLY); + if (this->iwork[17] == 0) { Matrix_RotateY(gCalcMatrix, -this->obj.rot.y * M_DTOR, MTXF_APPLY); } + sp5C.x = gPlayer[0].pos.x - this->obj.pos.x; sp5C.y = gPlayer[0].pos.y - this->obj.pos.y; sp5C.z = gPlayer[0].pos.z - this->obj.pos.z; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp5C, &sp50); + sp1D4 = Math_RadToDeg(Math_Atan2F(sp50.x, sp50.z)); sp1D8 = Math_RadToDeg(-Math_Atan2F(sp50.y, sqrtf(SQ(sp50.x) + SQ(sp50.z)))); + if ((sp1D8 > 90.0f) && (sp1D8 < 180.0f)) { sp1D8 = 90.0f; } if ((sp1D8 < 270.0f) && (sp1D8 > 180.0f)) { sp1D8 = 270.0f; } + if (this->iwork[17] != 0) { Math_SmoothStepToAngle(&this->obj.rot.y, sp1D4, 0.1f, 2.0f, 0.0f); sp1D0 = sp1D4 - this->obj.rot.y; @@ -3500,10 +3698,12 @@ void SectorY_Actor204_Update(Actor204* this) { } else { Math_SmoothStepToF(&this->fwork[27], 0.0f, 1.0f, 0.05f, 0.0f); } + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_603405C); if (this->unk_046 == 1) { this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_603421C); } + i = this->iwork[17]; if (i != 0) { if (i == 1) { @@ -3670,6 +3870,7 @@ void SectorY_801A52B8(Scenery* scenery) { AUDIO_PLAY_SFX(0x1900404F, scenery->sfxSource, 4); scenery->state++; } + if (((gGameFrameCount % 4) == 0)) { Matrix_RotateY(gCalcMatrix, scenery->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, scenery->obj.rot.x * M_DTOR, MTXF_APPLY); diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index 3d1795ce..8e84c006 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -6106,9 +6106,6 @@ void Map_801ABF1C(void) { } void Map_801AC200(s32 index) { - // f32 z; - // f32 x; - // f32 y; Vec3f v; f32 r; f32 r2; @@ -6639,53 +6636,53 @@ void Map_801AD11C(void) { } if (gControllerHold[gMainController].button & R_TRIG) { - if (D_menu_801CDA14 - 20.0f > 2475.0f) { + if ((D_menu_801CDA14 - 20.0f) > 2475.0f) { D_menu_801CDA14 -= 20.0f; var_t0 = 1; } } if (gControllerHold[gMainController].button & Z_TRIG) { - if (D_menu_801CDA14 + 20.0f < 7695.0f) { + if ((D_menu_801CDA14 + 20.0f) < 7695.0f) { D_menu_801CDA14 += 20.0f; var_t0 = 1; } } if (gControllerHold[gMainController].button & U_CBUTTONS) { - if (D_menu_801CDA04 - 10.0f >= -1200.0f) { + if ((D_menu_801CDA04 - 10.0f) >= -1200.0f) { D_menu_801CDA04 -= 10.0f; var_t0 = 1; } } if (gControllerHold[gMainController].button & D_CBUTTONS) { - if (D_menu_801CDA04 + 10.0f <= 1200.0f) { + if ((D_menu_801CDA04 + 10.0f) <= 1200.0f) { D_menu_801CDA04 += 10.0f; var_t0 = 1; } } if (gControllerHold[gMainController].button & L_CBUTTONS) { - if (D_menu_801CDA00 + 10.0f <= 1200.0f) { + if ((D_menu_801CDA00 + 10.0f) <= 1200.0f) { D_menu_801CDA00 += 10.0f; var_t0 = 1; } } if (gControllerHold[gMainController].button & R_CBUTTONS) { - if (D_menu_801CDA00 - 10.0f >= -1200.0f) { + if ((D_menu_801CDA00 - 10.0f) >= -1200.0f) { D_menu_801CDA00 -= 10.0f; var_t0 = 1; } } - if (D_menu_801CF010 == 0 && var_t0 == 1) { + if ((D_menu_801CF010 == 0) && (var_t0 == 1)) { AUDIO_PLAY_SFX(0x1100004C, gDefaultSfxSource, 4); D_menu_801CF010 = 1; } - if (D_menu_801CF010 == 1 && var_t0 == 0) { + if ((D_menu_801CF010 == 1) && (var_t0 == 0)) { Audio_KillSfxById(0x1100004C); D_menu_801CF010 = 0; } From 0c9be776da37e754a9b9422a945bf1bc5cfd7e75 Mon Sep 17 00:00:00 2001 From: petrie911 <69443847+petrie911@users.noreply.github.com> Date: Wed, 24 Apr 2024 23:14:49 -0500 Subject: [PATCH 040/151] Cumulative docs update (#221) * lights fix * names * remove header * so many names * format * more docs * makefile --- Makefile | 1 + include/context.h | 12 +- include/prevent_context_reordering.h | 6 +- include/sf64audio_external.h | 36 +- include/sf64audio_provisional.h | 14 +- include/sf64level.h | 6 + include/sf64thread.h | 34 +- include/variables.h | 4 +- linker_scripts/us/symbol_addrs.txt | 2 +- linker_scripts/us/symbol_addrs_audio.txt | 78 ++-- linker_scripts/us/symbol_addrs_engine.txt | 10 +- linker_scripts/us/symbol_addrs_nlib_vars.txt | 24 +- src/audio/audio_general.c | 399 ++++++++++--------- src/audio/audio_load.c | 30 +- src/audio/audio_playback.c | 92 ++--- src/audio/audio_seqplayer.c | 206 +++++----- src/audio/audio_synthesis.c | 4 +- src/audio/audio_thread.c | 50 ++- src/engine/fox_360.c | 283 +++++++------ src/engine/fox_A48A0.c | 2 +- src/engine/fox_beam.c | 2 +- src/engine/fox_bg.c | 2 +- src/engine/fox_context.c | 14 +- src/engine/fox_demo.c | 12 +- src/engine/fox_edisplay.c | 4 +- src/engine/fox_enmy.c | 8 +- src/engine/fox_enmy2.c | 34 +- src/engine/fox_game.c | 4 +- src/engine/fox_hud.c | 26 +- src/engine/fox_play.c | 38 +- src/engine/fox_save.c | 8 +- src/engine/fox_versus.c | 2 +- src/libultra/io/pfsgetstatus.c | 10 +- src/mods/levelselect.c | 5 +- src/overlays/ovl_ending/fox_end2.c | 10 +- src/overlays/ovl_i1/fox_co.c | 6 +- src/overlays/ovl_i1/fox_tr360.c | 2 +- src/overlays/ovl_i1/fox_ve1.c | 2 +- src/overlays/ovl_i2/fox_me.c | 4 +- src/overlays/ovl_i2/fox_sx.c | 4 +- src/overlays/ovl_i3/fox_a6.c | 4 +- src/overlays/ovl_i3/fox_so.c | 8 +- src/overlays/ovl_i3/fox_zo.c | 10 +- src/overlays/ovl_i4/fox_bo.c | 58 +-- src/overlays/ovl_i4/fox_fo.c | 34 +- src/overlays/ovl_i4/fox_ka.c | 16 +- src/overlays/ovl_i4/fox_sz.c | 12 +- src/overlays/ovl_i5/fox_ma.c | 32 +- src/overlays/ovl_i5/fox_ti.c | 8 +- src/overlays/ovl_i5/fox_ti_cs.c | 4 +- src/overlays/ovl_i6/fox_andross.c | 18 +- src/overlays/ovl_i6/fox_sy.c | 6 +- src/overlays/ovl_i6/fox_ve2.c | 6 +- src/overlays/ovl_menu/fox_map.c | 176 ++++---- src/overlays/ovl_menu/fox_option.c | 30 +- src/overlays/ovl_menu/fox_title.c | 4 +- src/sys/sys_fault.c | 12 +- src/sys/sys_joybus.c | 14 +- src/sys/sys_lib.c | 8 +- src/sys/sys_main.c | 121 +++--- src/sys/sys_timer.c | 6 +- tools/Torch | 2 +- 62 files changed, 1051 insertions(+), 1028 deletions(-) diff --git a/Makefile b/Makefile index 41aaebe9..5938057c 100644 --- a/Makefile +++ b/Makefile @@ -378,6 +378,7 @@ toolchain: torch: @$(MAKE) -s -C tools torch + rm -f torch.hash.yml init: @$(MAKE) clean diff --git a/include/context.h b/include/context.h index 69b40f0b..cae98592 100644 --- a/include/context.h +++ b/include/context.h @@ -24,7 +24,7 @@ extern s32 gTeamShields[6]; extern s32 gSavedTeamShields[6]; extern s32 gPrevPlanetSavedTeamShields[6]; extern s32 gTeamDamage[6]; -extern u8 gNextPlanetPath; // next planet path +extern u8 gMissionStatus; // next planet path extern f32 gGroundHeight; extern f32 D_ctx_80177950; extern f32 D_ctx_80177968; @@ -47,11 +47,11 @@ extern u8 gAqDrawMode; extern s32 D_ctx_80177AE0; extern s32 gMainController; extern s32 D_ctx_80177B40; -extern PlanetId gMissionNumber; // D_ctx_80177B48 // Arrow pointer? -extern s32 D_ctx_80177B50[7]; -extern s32 D_ctx_80177B70[7]; -extern PlanetId D_ctx_80177B90[7]; -extern s32 D_ctx_80177BB0[7]; +extern s32 gMissionNumber; +extern s32 gMissionTeamStatus[7]; +extern s32 gMissionHitCount[7]; +extern PlanetId gMissionPlanet[7]; +extern s32 gMissionMedal[7]; extern s32 gPlanetPathStatus[]; // overruns D_ctx_80177C30? extern s32 gPrevPlanetTeamShields[6]; extern s32 D_ctx_80177C58[6]; diff --git a/include/prevent_context_reordering.h b/include/prevent_context_reordering.h index 9da5e25d..31026d79 100644 --- a/include/prevent_context_reordering.h +++ b/include/prevent_context_reordering.h @@ -1,12 +1,12 @@ #ifndef PREVENT_CONTEXT_REORDERING_H #define PREVENT_CONTEXT_REORDERING_H -// extern int Dummyhalf; +extern int Dummyhalf; // struct Dummy0 {int x;}; // struct Dummy1 {int x;}; // struct Dummy2 {int x;}; -struct Dummy3 {int x;}; -struct Dummy4 {int x;}; +// struct Dummy3 {int x;}; +// struct Dummy4 {int x;}; struct Dummy5 {int x;}; struct Dummy6 {int x;}; struct Dummy7 {int x;}; diff --git a/include/sf64audio_external.h b/include/sf64audio_external.h index 51e9e3e9..db903add 100644 --- a/include/sf64audio_external.h +++ b/include/sf64audio_external.h @@ -151,29 +151,29 @@ void Audio_PlayVoiceWithoutBGM(u32 msgId); void Audio_ClearVoice(void); s32 Audio_GetCurrentVoice(void); s32 Audio_GetCurrentVoiceStatus(void); -void func_8001AF40(u8 unkVoiceParam); +void Audio_SetUnkVoiceParam(u8 unkVoiceParam); u8* Audio_UpdateFrequencyAnalysis(void); void Audio_StartPlayerNoise(u8 playerId); -void func_8001CA24(u8 playerId); -void func_8001CB80(u8 playerId, u8 arg1); -void func_8001CCDC(u8 playerId, f32* sfxSource); -void func_8001CE28(u8 playerId, f32* sfxSource); -void func_8001CF60(f32* sfxSource); -void func_8001CFA8(f32 arg0); -void func_8001D034(f32* sfxSource, u32 sfxId, u8 semitones); -void func_8001D0B4(f32* sfxSource, u32 sfxId, f32 freqMod); -void func_8001D10C(f32* sfxSource, u32 sfxId); -void func_8001D15C(u8 arg0); -void func_8001D1C8(u8 arg0, u8 arg1); -void Audio_PlayEventSfx(f32* sfxSource, u16 arg1); -void Audio_StopEventSfx(f32* sfxSource, u16 arg1); -void Audio_SetBaseSfxReverb(s8 reverb); +void Audio_StopPlayerNoise(u8 playerId); +void Audio_InitBombSfx(u8 playerId, u8 type); +void Audio_PlayBombFlightSfx(u8 playerId, f32* sfxSource); +void Audio_PlayBombExplodeSfx(u8 playerId, f32* sfxSource); +void Audio_StopEngineNoise(f32* sfxSource); +void Audio_SetSfxSpeedModulation(f32 vel); +void Audio_SetTransposeAndPlaySfx(f32* sfxSource, u32 sfxId, u8 semitones); +void Audio_SetModulationAndPlaySfx(f32* sfxSource, u32 sfxId, f32 freqMod); +void Audio_PlaySfxModulated(f32* sfxSource, u32 sfxId); +void Audio_SetSfxMapModulation(u8 fMod); +void Audio_SetHeatAlarmParams(u8 shields, u8 heightParam); +void Audio_PlayEventSfx(f32* sfxSource, u16 eventSfxId); +void Audio_StopEventSfx(f32* sfxSource, u16 eventSfxId); +void Audio_SetEnvSfxReverb(s8 reverb); void Audio_SetBgmParam(s8 bgmParam); void Audio_PlaySequence(u8 seqPlayId, u16 seqId, u8 fadeinTime, u8 bgmParam); void Audio_PlayFanfare(u16 seqId, u8 bgmVolume, u8 bgmFadeoutTime, u8 bgmFadeinTime); -void func_8001D520(void); -void func_8001D638(u8 arg0); -void func_8001D6DC(u8 arg0); +void Audio_PlayDeathSequence(void); +void Audio_PlayPauseSfx(u8 active); +void Audio_PlayMapMenuSfx(u8 active); void Audio_SetVolume(u8 audioType, u8 volume); void Audio_PlaySoundTest(u8 enable); void Audio_PlaySequenceDistorted(u8 seqPlayId, u16 seqId, u16 distortion, u8 fadeinTime, u8 unused); diff --git a/include/sf64audio_provisional.h b/include/sf64audio_provisional.h index 8cece3a1..9abfc390 100644 --- a/include/sf64audio_provisional.h +++ b/include/sf64audio_provisional.h @@ -122,6 +122,12 @@ typedef enum { /* 5 */ LOAD_STATUS_PERMANENTLY_LOADED // the entry data is loaded in the permanent pool, it won't be discarded } AudioLoadStatus; +typedef enum AudioResetStatus { + AUDIORESET_READY, + AUDIORESET_WAIT, + AUDIORESET_BLOCK, +} AudioResetStatus; + typedef s32 (*DmaHandler)(OSPiHandle* handle, OSIoMesg* mb, s32 direction); struct Note; @@ -752,7 +758,7 @@ typedef struct { /* 0x14 */ u32 chunkSize; /* 0x18 */ OSMesg retMsg; /* 0x1C */ OSMesgQueue* retQueue; - /* 0x20 */ OSMesgQueue msgQueue; + /* 0x20 */ OSMesgQueue mesgQueue; /* 0x38 */ OSMesg msg; /* 0x3C */ OSIoMesg ioMesg; } AudioAsyncLoad; // size = 0x54 @@ -768,7 +774,7 @@ typedef struct { /* 0x14 */ s32 bytesRemaining; /* 0x18 */ s8* status; // write-only /* 0x1C */ Sample sample; - /* 0x2C */ OSMesgQueue msgQueue; + /* 0x2C */ OSMesgQueue mesgQueue; /* 0x44 */ OSMesg msg; /* 0x48 */ OSIoMesg ioMesg; } AudioSlowLoad; // size = 0x60 @@ -812,7 +818,7 @@ typedef struct SampleDma { typedef struct { /* 0x00 */ OSTask task; - /* 0x40 */ OSMesgQueue* msgQueue; + /* 0x40 */ OSMesgQueue* mesgQueue; /* 0x44 */ void* unk_44; // probably a message that gets unused. /* 0x48 */ char unk_48[0x8]; } AudioTask; // size = 0x50 @@ -1081,7 +1087,7 @@ void func_800168BC(void); void AudioThread_ScheduleProcessCmds(void); u32 AudioThread_GetAsyncLoadStatus(u32 *); u8* AudioThread_GetFontsForSequence(s32 seqId, u32* outNumFonts); -s32 func_8001ED34(void); +bool AudioThread_ResetComplete(void); void AudioThread_ResetAudioHeap(s32); void AudioThread_Init(void); diff --git a/include/sf64level.h b/include/sf64level.h index 24f7aaeb..f1f03a4a 100644 --- a/include/sf64level.h +++ b/include/sf64level.h @@ -12,6 +12,12 @@ typedef enum { /* 3 */ LEVELTYPE_UNK3, } LevelType; +typedef enum { + /* 0 */ MISSION_COMPLETE, + /* 1 */ MISSION_ACCOMPLISHED, + /* 2 */ MISSION_WARP, +} MissionStatus; + typedef struct { /* 0x00 */ s32 type; /* 0x04 */ s32 unk_04; diff --git a/include/sf64thread.h b/include/sf64thread.h index e56936dd..e3d20022 100644 --- a/include/sf64thread.h +++ b/include/sf64thread.h @@ -42,7 +42,7 @@ typedef struct { typedef struct { /* 0x000 */ OSThread thread; /* 0x1B0 */ char stack[0x800]; - /* 0x9B0 */ OSMesgQueue msgQueue; + /* 0x9B0 */ OSMesgQueue mesgQueue; /* 0x9C8 */ OSMesg msg; /* 0x9CC */ FrameBuffer* fb; /* 0x9D0 */ u16 width; @@ -59,7 +59,7 @@ typedef enum { typedef struct { /* 0x00 */ OSTask task; - /* 0x40 */ OSMesgQueue* msgQueue; + /* 0x40 */ OSMesgQueue* mesgQueue; /* 0x44 */ OSMesg msg; /* 0x48 */ SpTaskState state; } SPTask; // size = 0x50, 0x8 aligned @@ -126,32 +126,32 @@ extern u32 gSegments[16]; // 800E1FD0 extern OSMesgQueue gPiMgrCmdQueue; // 800E2010 extern OSMesg sPiMgrCmdBuff[50]; // 800E2028 -extern OSMesgQueue gDmaMsgQueue; +extern OSMesgQueue gDmaMesgQueue; extern OSMesg sDmaMsgBuff[1]; extern OSIoMesg gDmaIOMsg; extern OSMesgQueue gSerialEventQueue; extern OSMesg sSerialEventBuff[1]; -extern OSMesgQueue gMainThreadMsgQueue; +extern OSMesgQueue gMainThreadMesgQueue; extern OSMesg sMainThreadMsgBuff[32]; -extern OSMesgQueue gTaskMsgQueue; +extern OSMesgQueue gTaskMesgQueue; extern OSMesg sTaskMsgBuff[16]; -extern OSMesgQueue gAudioVImsgQueue; +extern OSMesgQueue gAudioVImesgQueue; extern OSMesg sAudioVImsgBuff[1]; -extern OSMesgQueue gAudioTaskMsgQueue; +extern OSMesgQueue gAudioTaskMesgQueue; extern OSMesg sAudioTaskMsgBuff[1]; -extern OSMesgQueue gGfxVImsgQueue; +extern OSMesgQueue gGfxVImesgQueue; extern OSMesg sGfxVImsgBuff[4]; -extern OSMesgQueue gGfxTaskMsgQueue; +extern OSMesgQueue gGfxTaskMesgQueue; extern OSMesg sGfxTaskMsgBuff[2]; -extern OSMesgQueue gSerialThreadMsgQueue; +extern OSMesgQueue gSerialThreadMesgQueue; extern OSMesg sSerialThreadMsgBuff[8]; -extern OSMesgQueue gControllerMsgQueue; +extern OSMesgQueue gControllerMesgQueue; extern OSMesg sControllerMsgBuff[1]; -extern OSMesgQueue gSaveMsgQueue; +extern OSMesgQueue gSaveMesgQueue; extern OSMesg sSaveMsgBuff[1]; -extern OSMesgQueue gTimerTaskMsgQueue; +extern OSMesgQueue gTimerTaskMesgQueue; extern OSMesg sTimerTaskMsgBuff[16]; -extern OSMesgQueue gTimerWaitMsgQueue; +extern OSMesgQueue gTimerWaitMesgQueue; extern OSMesg sTimerWaitMsgBuff[1]; extern GfxPool gGfxPools[2]; // 800E23B0 @@ -182,7 +182,11 @@ extern OSThread gMainThread; // 8013A040 extern u8 sMainThreadStack[0x1000]; // 8013A1F0 extern OSThread gAudioThread; //8013B1F0 -#define MSG_QUEUE_EMPTY -1 +#define MESG_QUEUE_EMPTY -1 + +#define MQ_GET_MESG(mq, mesg) (osRecvMesg((mq), (OSMesg*) (mesg), OS_MESG_NOBLOCK) != -1) +#define MQ_WAIT_FOR_MESG(mq, mesg) osRecvMesg((mq), (OSMesg*) (mesg), OS_MESG_BLOCK) +#define MQ_CLEAR_QUEUE(mq) do {s32 m1 = -1; s32 mesg; do {} while(osRecvMesg((mq), (OSMesg*) &(mesg), OS_MESG_NOBLOCK) != m1);} while(0) #define FAULT_MESG_BREAK 1 #define FAULT_MESG_FAULT 2 diff --git a/include/variables.h b/include/variables.h index 5fbe0197..aa2b6f9c 100644 --- a/include/variables.h +++ b/include/variables.h @@ -89,7 +89,7 @@ extern CollisionHeader2 D_800D2CA0[]; // fox_play extern u8 gVenomHardClear; -extern u8 D_play_800D3180[30]; +extern u8 gLeveLClearStatus[30]; // fox_radio extern s32 gCurrentMsgPri; @@ -99,7 +99,7 @@ extern s32 gAllRangeSupplyTimer; extern s32 sStarWolfKillTimer; extern s16 gStarWolfMsgTimer; extern s32 gAllRangeWingRepairTimer; -extern s32 gAllRangeWingRepairSent; +extern s32 gAllRangeSuppliesSent; extern f32 gSzMissileR; extern f32 gSzMissileG; extern f32 gSzMissileB; diff --git a/linker_scripts/us/symbol_addrs.txt b/linker_scripts/us/symbol_addrs.txt index b629a9f5..2f4d01f7 100644 --- a/linker_scripts/us/symbol_addrs.txt +++ b/linker_scripts/us/symbol_addrs.txt @@ -70,7 +70,7 @@ D_display_801613E0 = 0x801613E0;//size:0x18 D_edata_800CC124 = 0x800CC124;//type:u8 D_boss_800C9E90 = 0x800C9E90;//size:0x70 -D_play_800D3180 = 0x800D3180; // size:0x20 +gLeveLClearStatus = 0x800D3180; // size:0x20 gRcpSetupDLs = 0x800D31B0; // size:0x18C0 D_edisplay_800CFCA0 = 0x800CFCA0; diff --git a/linker_scripts/us/symbol_addrs_audio.txt b/linker_scripts/us/symbol_addrs_audio.txt index bf9f7536..c3f16723 100644 --- a/linker_scripts/us/symbol_addrs_audio.txt +++ b/linker_scripts/us/symbol_addrs_audio.txt @@ -23,10 +23,10 @@ sSeqCmdWritePos = 0x800C5D44; sSeqCmdReadPos = 0x800C5D48; sStartSeqDisabled = 0x800C5D4C; sSoundModeList = 0x800C5D50; -sNewAudioSpecId = 0x800C5D54; +sAudioSpecId = 0x800C5D54; D_800C5D58 = 0x800C5D58; -sBaseReverb = 0x800C5D60; +sEnvReverb = 0x800C5D60; sAudioSpecReverb = 0x800C5D64; sVolumeSettings = 0x800C5D68; D_800C5D6C = 0x800C5D6C; @@ -39,7 +39,7 @@ sSfxVolMod = 0x800C5E78; sPlaylistIndex = 0x800C5E7C; sPlaylistTimer = 0x800C5E80; sPlaylistCmdIndex = 0x800C5E84; -D_800C5E88 = 0x800C5E88; +sEventSfx = 0x800C5E88; sSoundTestTracks = 0x800C5EE4; sPlaylists = 0x800C5FF4; //type:u16 size:5000 @@ -47,7 +47,7 @@ D_800C7380 = 0x800C7380; D_800C7384 = 0x800C7384; D_800C7388 = 0x800C7388; D_800C738C = 0x800C738C; -D_800C7390 = 0x800C7390; +sUnkVoiceParam = 0x800C7390; D_800C7394 = 0x800C7394; D_800C7398 = 0x800C7398; D_800C7418 = 0x800C7418; @@ -67,7 +67,7 @@ gThreadCmdWritePos = 0x800C7C50; gThreadCmdReadPos = 0x800C7C54; gAudioTaskStartQueue = 0x800C7C58; gThreadCmdProcQueue = 0x800C7C5C; -gAudioUnkQueue = 0x800C7C60; +gAudioSpecQueue = 0x800C7C60; gAudioResetQueue = 0x800C7C64; gMaxAbiCmdCnt = 0x800C7C68; gWaitingAudioTask = 0x800C7C6C; @@ -106,7 +106,7 @@ D_80149AD8 = 0x80149AD8; D_80149ED8 = 0x80149ED8; D_8014A2D8 = 0x8014A2D8; D_8014A8D8 = 0x8014A8D8; -D_8014A958 = 0x8014A958; +sFreqAnalyzerBars = 0x8014A958; sSeqRequests = 0x8014A978; sNumSeqRequests = 0x8014A9A0; sAudioSeqCmds = 0x8014A9A8; @@ -115,10 +115,10 @@ sDelayedSeqCmdFlags = 0x8014B708; sDelayedSeqCmds = 0x8014B710; sSfxChannelState = 0x8014B790; sPlayerNoise = 0x8014B850; -D_8014BA10 = 0x8014BA10; -D_8014BA20 = 0x8014BA20; -D_8014BA24 = 0x8014BA24; -D_8014BA28 = 0x8014BA28; +sBombFreqMod = 0x8014BA10; +sBombType = 0x8014BA20; +sBombState = 0x8014BA24; +sBombStartFrame = 0x8014BA28; gAudioContextStart = 0x8014BA40; // size:0x10 gSynthReverbs = 0x8014BA50; // size:0x750 @@ -212,12 +212,12 @@ gAudioContextEnd = 0x80155D90;//size:0x10 sAudioTaskStartQueue = 0x80155DA0; sThreadCmdProcQueue = 0x80155DB8; -sAudioUnkQueue = 0x80155DD0; +sAudioSpecQueue = 0x80155DD0; sAudioResetQueue = 0x80155DE8; gThreadCmdBuffer = 0x80155E00; sAudioTaskStartMsg = 0x80156600; sThreadCmdProcMsg = 0x80156608; -sAudioUnkMsg = 0x80156618; +sAudioSpecMsg = 0x80156618; sAudioResetMsg = 0x8015661C; @@ -408,8 +408,8 @@ Audio_GetSfxPan = 0x80016CDC; Audio_GetSfxFreqMod = 0x80016EE4; Audio_SetSfxProperties = 0x80016FF0; Audio_UpdateDopplerShift = 0x80017360; -func_80017494 = 0x80017494; -func_80017550 = 0x80017550; +Audio_LoadInstruments = 0x80017494; +Audio_LoadAquasSequence = 0x80017550; Audio_ResetSfxChannelState = 0x80017588; Audio_StartSequence = 0x80017600; Audio_StopSequence = 0x80017760; @@ -420,12 +420,12 @@ Audio_GetActiveSeqId = 0x8001839C; Audio_SeqCmdNotQueued = 0x80018410; Audio_SeqCmdValueNotQueued = 0x80018470; Audio_ResetSequenceRequests = 0x800184D4; -func_800184EC = 0x800184EC; +Audio_DisableSetupOp = 0x800184EC; Audio_SetSequenceFade = 0x800185A0; Audio_UpdateActiveSequences = 0x800185F8; Audio_SetDelayedSeqCmd = 0x80018E9C; Audio_UpdateDelayedSeqCmds = 0x80018EE0; -func_80018FA4 = 0x80018FA4; +Audio_HandleReset = 0x80018FA4; Audio_ResetActiveSequences = 0x80019068; Audio_ResetActiveSequencesAndVolume = 0x800190E4; Audio_SetSfxBanksMute = 0x80019158; @@ -454,8 +454,8 @@ Audio_UpdateVoice = 0x8001AD44; Audio_ClearVoice = 0x8001AE58; Audio_GetCurrentVoice = 0x8001AE78; Audio_GetCurrentVoiceStatus = 0x8001AED4; -func_8001AF40 = 0x8001AF40; -func_8001AF50 = 0x8001AF50; +Audio_SetUnkVoiceParam = 0x8001AF40; +Audio_UpdateUnkVoiceParam = 0x8001AF50; Audio_ResetPlayerFreqMods = 0x8001AF9C; Audio_UpdateArwingNoise = 0x8001B014; Audio_UpdateLandmasterNoise = 0x8001B454; @@ -465,31 +465,31 @@ Audio_UpdatePlayerReverb = 0x8001BB74; Audio_UpdatePlayerNoise = 0x8001BC20; Audio_ResetVoicesAndPlayers = 0x8001BC48; Audio_ProcessPlaylist = 0x8001BD0C; -func_8001BFC0 = 0x8001BFC0; +Audio_AnalyzeFrequencies = 0x8001BFC0; Audio_UpdateFrequencyAnalysis = 0x8001C3EC; Audio_StartPlayerNoise = 0x8001C8B8; -func_8001CA24 = 0x8001CA24; -func_8001CB80 = 0x8001CB80; -func_8001CCDC = 0x8001CCDC; -func_8001CE28 = 0x8001CE28; -func_8001CEFC = 0x8001CEFC; -func_8001CF60 = 0x8001CF60; -func_8001CFA8 = 0x8001CFA8; -func_8001D034 = 0x8001D034; -func_8001D0B4 = 0x8001D0B4; -func_8001D10C = 0x8001D10C; -func_8001D15C = 0x8001D15C; -func_8001D1C8 = 0x8001D1C8; +Audio_StopPlayerNoise = 0x8001CA24; +Audio_InitBombSfx = 0x8001CB80; +Audio_PlayBombFlightSfx = 0x8001CCDC; +Audio_PlayBombExplodeSfx = 0x8001CE28; +Audio_StartEngineNoise = 0x8001CEFC; +Audio_StopEngineNoise = 0x8001CF60; +Audio_SetSfxSpeedModulation = 0x8001CFA8; +Audio_SetTransposeAndPlaySfx = 0x8001D034; +Audio_SetModulationAndPlaySfx = 0x8001D0B4; +Audio_PlaySfxModulated = 0x8001D10C; +Audio_SetSfxMapModulation = 0x8001D15C; +Audio_SetHeatAlarmParams = 0x8001D1C8; Audio_PlayEventSfx = 0x8001D2FC; Audio_StopEventSfx = 0x8001D3A0; -Audio_SetBaseSfxReverb = 0x8001D400; +Audio_SetEnvSfxReverb = 0x8001D400; Audio_SetBgmParam = 0x8001D410; Audio_PlaySequence = 0x8001D444; Audio_PlayFanfare = 0x8001D4AC; -func_8001D520 = 0x8001D520; -func_8001D638 = 0x8001D638; -func_8001D6DC = 0x8001D6DC; -func_8001D780 = 0x8001D780; +Audio_PlayDeathSequence = 0x8001D520; +Audio_PlayPauseSfx = 0x8001D638; +Audio_PlayMapMenuSfx = 0x8001D6DC; +Audio_RestoreVolumeSettings = 0x8001D780; Audio_SetVolume = 0x8001D8A8; Audio_PlaySoundTest = 0x8001D8F4; Audio_PlaySequenceDistorted = 0x8001D9E0; @@ -499,8 +499,8 @@ Audio_KillAllSfx = 0x8001DC2C; Audio_SetAudioSpec = 0x8001DC6C; Audio_PlayBgm = 0x8001DCB4; Audio_InitSounds = 0x8001DCE0; -func_8001DD40 = 0x8001DD40; -func_8001DE1C = 0x8001DE1C; +Audio_RestartSeqPlayers = 0x8001DD40; +Audio_StartReset = 0x8001DE1C; Audio_Update = 0x8001DECC; @@ -519,7 +519,7 @@ AudioThread_ResetCmdQueue = 0x8001E998; AudioThread_ProcessCmds = 0x8001E9AC; AudioThread_GetAsyncLoadStatus = 0x8001ECAC; AudioThread_GetFontsForSequence = 0x8001ED14; -func_8001ED34 = 0x8001ED34; +AudioThread_ResetComplete = 0x8001ED34; AudioThread_ResetAudioHeap = 0x8001ED8C; AudioThread_PreNMIReset = 0x8001EE00; AudioThread_Init = 0x8001EE3C; diff --git a/linker_scripts/us/symbol_addrs_engine.txt b/linker_scripts/us/symbol_addrs_engine.txt index 2d93d445..03dd42b3 100644 --- a/linker_scripts/us/symbol_addrs_engine.txt +++ b/linker_scripts/us/symbol_addrs_engine.txt @@ -472,7 +472,7 @@ gPrevPlanetSavedTeamShields = 0x801778F0;//size=0x18 gBoostButton = 0x80177908; gTeamDamage = 0x80177910; gBrakeButton = 0x80177928; -gNextPlanetPath = 0x80177930; +gMissionStatus = 0x80177930; gShootButton = 0x80177938; gGroundHeight = 0x80177940; gBombButton = 0x80177948; @@ -512,10 +512,10 @@ gVsLockOnTimers = 0x80177B00; D_ctx_80177B40 = 0x80177B40; gStartAndrossFightTimer = 0x80177B44; gMissionNumber = 0x80177B48; -D_ctx_80177B50 = 0x80177B50; -D_ctx_80177B70 = 0x80177B70; -D_ctx_80177B90 = 0x80177B90; -D_ctx_80177BB0 = 0x80177BB0; +gMissionTeamStatus = 0x80177B50; +gMissionHitCount = 0x80177B70; +gMissionPlanet = 0x80177B90; +gMissionMedal = 0x80177BB0; gControllerRumbleTimers = 0x80177BD0; gPlanetPathStatus = 0x80177BD8; D_ctx_80177C30 = 0x80177C30; diff --git a/linker_scripts/us/symbol_addrs_nlib_vars.txt b/linker_scripts/us/symbol_addrs_nlib_vars.txt index 7df28f31..4bfa4433 100644 --- a/linker_scripts/us/symbol_addrs_nlib_vars.txt +++ b/linker_scripts/us/symbol_addrs_nlib_vars.txt @@ -35,33 +35,33 @@ gSegments = 0x800E1FD0; gPiMgrCmdQueue = 0x800E2010; sPiMgrCmdBuff = 0x800E2028; -gDmaMsgQueue = 0x800E20F0; +gDmaMesgQueue = 0x800E20F0; sDmaMsgBuff = 0x800E2108; gDmaIOMsg = 0x800E2110; gSerialEventQueue = 0x800E2128; sSerialEventBuff = 0x800E2140; -gMainThreadMsgQueue = 0x800E2148; +gMainThreadMesgQueue = 0x800E2148; sMainThreadMsgBuff = 0x800E2160; -gTaskMsgQueue = 0x800E21E0; +gTaskMesgQueue = 0x800E21E0; sTaskMsgBuff = 0x800E21F8; -gAudioVImsgQueue = 0x800E2238; -gAudioTaskMsgQueue = 0x800E2258; -gGfxVImsgQueue = 0x800E2278; -gGfxTaskMsgQueue = 0x800E22A0; +gAudioVImesgQueue = 0x800E2238; +gAudioTaskMesgQueue = 0x800E2258; +gGfxVImesgQueue = 0x800E2278; +gGfxTaskMesgQueue = 0x800E22A0; sAudioVImsgBuff = 0x800E2250; sAudioTaskMsgBuff = 0x800E2270; sGfxVImsgBuff = 0x800E2290; sGfxTaskMsgBuff = 0x800E22B8; -gSerialThreadMsgQueue = 0x800E22C0; +gSerialThreadMesgQueue = 0x800E22C0; sSerialThreadMsgBuff = 0x800E22D8; -gControllerMsgQueue = 0x800E22F8; +gControllerMesgQueue = 0x800E22F8; sControllerMsgBuff = 0x800E2310; -gSaveMsgQueue = 0x800E2318; +gSaveMesgQueue = 0x800E2318; sSaveMsgBuff = 0x800E2330; -gTimerTaskMsgQueue = 0x800E2338; +gTimerTaskMesgQueue = 0x800E2338; sTimerTaskMsgBuff = 0x800E2350; -gTimerWaitMsgQueue = 0x800E2390; +gTimerWaitMesgQueue = 0x800E2390; sTimerWaitMsgBuff = 0x800E23A8; gGfxPools = 0x800E23B0; // size:0x55AA0 diff --git a/src/audio/audio_general.c b/src/audio/audio_general.c index 04ee7736..cbabdbc5 100644 --- a/src/audio/audio_general.c +++ b/src/audio/audio_general.c @@ -4,15 +4,15 @@ #include "audiothread_cmd.h" #include "audioseq_cmd.h" -void func_8001D0B4(f32* sfxSource, u32 sfxId, f32 freqMod); +void Audio_SetModulationAndPlaySfx(f32* sfxSource, u32 sfxId, f32 freqMod); s32 Audio_GetCurrentVoice(void); void Audio_PlaySequence(u8, u16, u8, u8); void Audio_PlayFanfare(u16, u8, u8, u8); void Audio_PlaySequenceDistorted(u8, u16, u16, u8, u8); -void func_8001DD40(void); -void func_8001D6DC(u8); -void func_8001DE1C(u8); +void Audio_RestartSeqPlayers(void); +void Audio_PlayMapMenuSfx(u8); +void Audio_StartReset(u8); static const char devstr1[] = "preload start (%d): "; static const char devstr2[] = "%d "; @@ -45,11 +45,11 @@ ActiveSfx sActiveSfx[5][8]; u8 sCurSfxPlayerChannelIndex; u8 sSfxBankMuted[5]; Modulation sSfxVolumeMods[5]; -f32 D_80149AD8[256]; -f32 D_80149ED8[256]; -f32 D_8014A2D8[384]; -f32 D_8014A8D8[32]; -u8 D_8014A958[32]; +f32 sAudioAnalyzerData[256]; +f32 sAnalyzerBuffer1[256]; +f32 sAnalyzerBuffer2[384]; +f32 sNewFreqAmplitudes[32]; +u8 sFreqAnalyzerBars[32]; SeqRequest sSeqRequests[4][5]; u8 sNumSeqRequests[4]; s32 sAudioSeqCmds[256]; @@ -58,10 +58,10 @@ u16 sDelayedSeqCmdFlags; DelayedSeqCmd sDelayedSeqCmds[16]; SfxChannelState sSfxChannelState[16]; PlayerNoiseModulation sPlayerNoise[4]; -f32 D_8014BA10[4]; -u8 D_8014BA20[4]; -u8 D_8014BA24[4]; -s32 D_8014BA28[4]; +f32 sBombFreqMod[4]; +u8 sBombType[4]; +u8 sBombState[4]; +s32 sBombStartFrame[4]; u8 sChannelsPerBank[5][5] = { { 3, 2, 2, 2, 2 }, { 3, 1, 2, 2, 2 }, { 3, 2, 2, 2, 3 }, { 6, 0, 2, 0, 4 }, { 0, 0, 0, 0, 0 }, @@ -82,13 +82,13 @@ u8 sSeqCmdWritePos = 0; u8 sSeqCmdReadPos = 0; u8 sStartSeqDisabled = 0; u8 sSoundModeList[4] = { SOUNDMODE_STEREO, SOUNDMODE_HEADSET, SOUNDMODE_SURROUND, SOUNDMODE_MONO }; -u8 sNewAudioSpecId = AUDIOSPEC_0; -u8 D_800C5D58 = 0; +u8 sAudioSpecId = AUDIOSPEC_0; +u8 sAudioResetStatus = AUDIORESET_READY; s32 D_800C5D5C = 0; // unused. file split? -s8 sBaseReverb = 0; +s8 sEnvReverb = 0; s8 sAudioSpecReverb = 0; u8 sVolumeSettings[3] = { 99, 99, 99 }; -u8 D_800C5D6C[29][7] = { +u8 sAudioSpecInstrumentSets[29][7] = { { 0, 3, 4, 80, 12, 21, 255 }, { 17, 18, 15, 96, 20, 22, 255 }, { 0, 3, 5, 80, 16, 255, 0 }, { 17, 18, 15, 96, 20, 22, 255 }, { 0, 3, 4, 80, 12, 21, 255 }, { 17, 18, 15, 96, 20, 22, 255 }, { 0, 3, 4, 80, 12, 21, 255 }, { 17, 18, 15, 96, 20, 22, 255 }, { 0, 3, 4, 80, 12, 21, 255 }, @@ -100,10 +100,10 @@ u8 D_800C5D6C[29][7] = { { 255, 0, 0, 0, 0, 0, 0 }, { 255, 0, 0, 0, 0, 0, 0 }, { 255, 0, 0, 0, 0, 0, 0 }, { 255, 0, 0, 0, 0, 0, 0 }, { 0, 3, 4, 80, 12, 21, 255 }, }; -s8 D_800C5E38[29] = { +s8 sAudioSpecReverbAdd[29] = { 10, 0, 25, 0, 25, 0, 10, 0, 10, 35, 0, 10, 40, 0, 25, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -u32 D_800C5E58[5] = { 20, 16, 10, 10, 20 }; +u32 sPlayerNoiseTimes[5] = { 20, 16, 10, 10, 20 }; s32 D_800C5E6C = 0; // unused. file split? u8 D_800C5E70 = 0; f32 sSfxFreqMod = 1.0f; @@ -111,7 +111,7 @@ f32 sSfxVolMod = 1.0f; // never modified u8 sPlaylistIndex = 255; s32 sPlaylistTimer = 0; u8 sPlaylistCmdIndex = 0; -u32 D_800C5E88[] = { +u32 sEventSfx[] = { 0x1903000D, 0x1903000E, 0x19500015, 0x2903A021, 0x4900000C, 0x19122005, 0x1913204A, 0x2900306A, 0x29034024, 0x2902306C, 0x19032056, 0x19030057, 0x19033058, 0x19030006, 0x29503032, 0x1903407D, 0x4900402E, 0x19038072, 0x1903807E, 0x1903807F, 0x19038080, 0x11032081, 0x19031082, @@ -508,12 +508,12 @@ PlaylistCmd sPlaylists[][100] = { }, }; -s32 D_800C737C = 0; // unused. file split? -f32 D_800C7380 = 1.0f; +s32 D_800C737C = 0; // unused. file split? +f32 D_800C7380 = 1.0f; // unused/ u32 sNextVoiceId = 0; u32 sCurrentVoiceId = 0; u8 sSetNextVoiceId = 0; -u8 D_800C7390 = 0; +u8 sUnkVoiceParam = 0; u8 sMuteBgmForVoice = 0; void func_80016A50(void) { @@ -581,7 +581,7 @@ s8 Audio_GetSfxReverb(u8 bankId, u8 entryIndex, u8 channelId) { if (scriptReverb == -1) { scriptReverb = 0; } - totalReverb = *sSfxBanks[bankId][entryIndex].reverbAdd + distReverb + scriptReverb + sBaseReverb + sAudioSpecReverb; + totalReverb = *sSfxBanks[bankId][entryIndex].reverbAdd + distReverb + scriptReverb + sEnvReverb + sAudioSpecReverb; totalReverb = MIN(127, totalReverb); return totalReverb; } @@ -688,6 +688,7 @@ void Audio_SetSfxProperties(u8 bankId, u8 entryIndex, u8 channelId) { sSfxChannelState[channelId].pan = pan; } } + f32 Audio_UpdateDopplerShift(f32* srcPos, f32* srcVel, f32 soundSpeed, f32* curDopplerShift) { f32 xVel; f32 zVel; @@ -742,25 +743,25 @@ f32 Audio_UpdateDopplerShift(f32* srcPos, f32* srcVel, f32 soundSpeed, f32* curD return newShift; } -void func_80017494(void) { +void Audio_LoadInstruments(void) { u8 i; - for (i = 0; D_800C5D6C[sNewAudioSpecId][i] != 0xFF; i++) { - AUDIOCMD_GLOBAL_SYNC_LOAD_INSTRUMENT(0, D_800C5D6C[sNewAudioSpecId][i], 0); + for (i = 0; sAudioSpecInstrumentSets[sAudioSpecId][i] != 0xFF; i++) { + AUDIOCMD_GLOBAL_SYNC_LOAD_INSTRUMENT(0, sAudioSpecInstrumentSets[sAudioSpecId][i], 0); } } -void func_80017550(void) { - if (sNewAudioSpecId == AUDIOSPEC_12) { - AUDIOCMD_GLOBAL_SYNC_LOAD_SEQ_PARTS(14, 0); +void Audio_LoadAquasSequence(void) { + if (sAudioSpecId == AUDIOSPEC_12) { + AUDIOCMD_GLOBAL_SYNC_LOAD_SEQ_PARTS(SEQ_ID_AQUAS, 0); } } void Audio_ResetSfxChannelState(void) { u8 i; - sBaseReverb = 0; - sAudioSpecReverb = D_800C5E38[sNewAudioSpecId]; + sEnvReverb = 0; + sAudioSpecReverb = sAudioSpecReverbAdd[sAudioSpecId]; for (i = 0; i < 16; i++) { sSfxChannelState[i].volMod = 1.0f; sSfxChannelState[i].freqMod = 1.0f; @@ -805,7 +806,7 @@ void Audio_ProcessSeqCmd(u32 seqCmd) { s32 priority; u8 i; // sp63 u8 specId; - u8 sp61; + u8 oldSpecId; u8 ioPort; u8 channel; u8 found; @@ -1018,12 +1019,12 @@ void Audio_ProcessSeqCmd(u32 seqCmd) { case SEQCMD_OP_RESET_AUDIO_HEAP: specId = seqCmd & 0xFF; sSfxChannelLayout = (seqCmd & 0xFF00) >> 8; - sp61 = sNewAudioSpecId; - sNewAudioSpecId = specId; + oldSpecId = sAudioSpecId; + sAudioSpecId = specId; - if (sp61 != specId) { + if (oldSpecId != specId) { AudioThread_ResetAudioHeap(specId); - func_8001DE1C(sp61); + Audio_StartReset(oldSpecId); AUDIOCMD_GLOBAL_STOP_AUDIOCMDS(); } else { @@ -1082,14 +1083,15 @@ void Audio_ResetSequenceRequests(u8 seqPlayId) { sNumSeqRequests[seqPlayId] = 0; } -void func_800184EC(u8 seqPlayId, u8 setupOpDisable) { +// unused +void Audio_DisableSetupOp(u8 seqPlayId, u8 opcode) { u8 i; for (i = 0; i < sActiveSequences[seqPlayId].setupCmdNum; i++) { u8 setupOp = ((sActiveSequences[seqPlayId].setupCmd[i] & 0xF00000) >> 20); - if (setupOp == setupOpDisable) { - sActiveSequences[seqPlayId].setupCmd[i] = 0xFF000000; + if (setupOp == opcode) { + sActiveSequences[seqPlayId].setupCmd[i] = 0xFF000000; // 0 duration volume reset on SEQ_PLAYER_BGM } } } @@ -1246,7 +1248,7 @@ void Audio_UpdateActiveSequences(void) { if (sActiveSequences[seqPlayId].setupCmdNum == 0) { continue; } - if (!Audio_SeqCmdValueNotQueued(SEQCMD_OP_MASK, SEQCMD_OP_RESET_AUDIO_HEAP << 28)) { + if (!Audio_SeqCmdValueNotQueued(SEQCMD_OP_RESET_AUDIO_HEAP << 28, SEQCMD_OP_MASK)) { sActiveSequences[seqPlayId].setupCmdNum = 0; break; } @@ -1254,9 +1256,9 @@ void Audio_UpdateActiveSequences(void) { sActiveSequences[seqPlayId].setupCmdTimer--; } else if (!gSeqPlayers[seqPlayId].enabled) { for (i = 0; i < sActiveSequences[seqPlayId].setupCmdNum; i++) { - setupOp = (sActiveSequences[seqPlayId].setupCmd[i] & 0xF00000) >> 0x14; + setupOp = (sActiveSequences[seqPlayId].setupCmd[i] & 0xF00000) >> 20; - setupSeqPlayId = (sActiveSequences[seqPlayId].setupCmd[i] & 0xF0000) >> 0x10; + setupSeqPlayId = (sActiveSequences[seqPlayId].setupCmd[i] & 0xF0000) >> 16; val2 = (sActiveSequences[seqPlayId].setupCmd[i] & 0xFF00) >> 8; val1 = sActiveSequences[seqPlayId].setupCmd[i] & 0xFF; switch (setupOp) { @@ -1321,24 +1323,24 @@ void Audio_UpdateDelayedSeqCmds(void) { } } -u8 func_80018FA4(void) { - if (D_800C5D58 != 0) { - if (D_800C5D58 == 1) { - if (func_8001ED34() == 1) { - D_800C5D58 = 0; +u8 Audio_HandleReset(void) { + if (sAudioResetStatus != AUDIORESET_READY) { + if (sAudioResetStatus == AUDIORESET_WAIT) { + if (AudioThread_ResetComplete() == true) { + sAudioResetStatus = AUDIORESET_READY; AUDIOCMD_SEQPLAYER_SET_IO(SEQ_PLAYER_SFX, 0, sSfxChannelLayout); - func_8001DD40(); + Audio_RestartSeqPlayers(); } - } else if (D_800C5D58 == 2) { - while (func_8001ED34() != 1) { + } else if (sAudioResetStatus == AUDIORESET_BLOCK) { + while (AudioThread_ResetComplete() != true) { ; } - D_800C5D58 = 0; + sAudioResetStatus = AUDIORESET_READY; AUDIOCMD_SEQPLAYER_SET_IO(SEQ_PLAYER_SFX, 0, sSfxChannelLayout); - func_8001DD40(); + Audio_RestartSeqPlayers(); } } - return D_800C5D58; + return sAudioResetStatus; } void Audio_ResetActiveSequences(void) { @@ -2008,14 +2010,14 @@ s32 Audio_GetCurrentVoiceStatus(void) { return 0; } -void func_8001AF40(u8 unkVoiceParam) { - D_800C7390 = unkVoiceParam; +void Audio_SetUnkVoiceParam(u8 unkVoiceParam) { + sUnkVoiceParam = unkVoiceParam; } -void func_8001AF50(void) { - if (D_800C7390 != 0xFF) { - AUDIOCMD_CHANNEL_SET_IO(SEQ_PLAYER_VOICE, 14, 0, D_800C7390); - D_800C7390 = 0xFF; +void Audio_UpdateUnkVoiceParam(void) { + if (sUnkVoiceParam != 0xFF) { + AUDIOCMD_CHANNEL_SET_IO(SEQ_PLAYER_VOICE, 14, 0, sUnkVoiceParam); + sUnkVoiceParam = 0xFF; } } @@ -2093,9 +2095,9 @@ void Audio_UpdateArwingNoise(u8 playerId) { sPlayerNoise[playerId].freqMod[i].value += sPlayerNoise[playerId].freqMod[i].step; if ((sPlayerNoise[playerId].freqMod[i].timer == 0) && (sPlayerNoise[playerId].freqMod[i].target != 1.0f)) { sPlayerNoise[playerId].freqMod[i].target = 1.0f; - sPlayerNoise[playerId].freqMod[i].timer = D_800C5E58[i]; + sPlayerNoise[playerId].freqMod[i].timer = sPlayerNoiseTimes[i]; sPlayerNoise[playerId].freqMod[i].step = - (1.0f - sPlayerNoise[playerId].freqMod[i].value) / D_800C5E58[i]; + (1.0f - sPlayerNoise[playerId].freqMod[i].value) / sPlayerNoiseTimes[i]; } } } @@ -2138,9 +2140,9 @@ void Audio_UpdateLandmasterNoise(u8 playerId) { sPlayerNoise[playerId].freqMod[i].value += sPlayerNoise[playerId].freqMod[i].step; if ((sPlayerNoise[playerId].freqMod[i].timer == 0) && (sPlayerNoise[playerId].freqMod[i].target != 1.0f)) { sPlayerNoise[playerId].freqMod[i].target = 1.0f; - sPlayerNoise[playerId].freqMod[i].timer = D_800C5E58[i]; + sPlayerNoise[playerId].freqMod[i].timer = sPlayerNoiseTimes[i]; sPlayerNoise[playerId].freqMod[i].step = - (1.0f - sPlayerNoise[playerId].freqMod[i].value) / D_800C5E58[i]; + (1.0f - sPlayerNoise[playerId].freqMod[i].value) / sPlayerNoiseTimes[i]; } } } @@ -2196,9 +2198,9 @@ void Audio_UpdateBlueMarineNoise(u8 playerId) { sPlayerNoise[playerId].freqMod[i].value += sPlayerNoise[playerId].freqMod[i].step; if ((sPlayerNoise[playerId].freqMod[i].timer == 0) && (sPlayerNoise[playerId].freqMod[i].target != 1.0f)) { sPlayerNoise[playerId].freqMod[i].target = 1.0f; - sPlayerNoise[playerId].freqMod[i].timer = D_800C5E58[i]; + sPlayerNoise[playerId].freqMod[i].timer = sPlayerNoiseTimes[i]; sPlayerNoise[playerId].freqMod[i].step = - (1.0f - sPlayerNoise[playerId].freqMod[i].value) / D_800C5E58[i]; + (1.0f - sPlayerNoise[playerId].freqMod[i].value) / sPlayerNoiseTimes[i]; } } } @@ -2268,8 +2270,8 @@ void Audio_ResetVoicesAndPlayers(void) { sPlayerNoise[playerId].reverbAdd = 0; sPlayerNoise[playerId].totalMod = 1.0f; sPlayerNoise[playerId].dopplerShift = 1.0f; - D_8014BA24[playerId] = 0; - D_8014BA28[playerId] = 0; + sBombState[playerId] = 0; + sBombStartFrame[playerId] = 0; } sSfxFreqMod = 1.0f; sSfxVolMod = 1.0f; @@ -2321,7 +2323,7 @@ void Audio_ProcessPlaylist(void) { } } -void func_8001BFC0(f32* buffer0, f32* buffer1, s32 length, f32* buffer2) { +void Audio_AnalyzeFrequencies(f32* buffer0, f32* buffer1, s32 length, f32* buffer2) { f32 temp_ft0; f32 var_fs0; f32* buff0fromStart; @@ -2399,14 +2401,14 @@ void func_8001BFC0(f32* buffer0, f32* buffer1, s32 length, f32* buffer2) { } u8* Audio_UpdateFrequencyAnalysis(void) { - s32 temp2; - s32 i; - s32 j; - s32 k; - s32 l; - s32 m; - s16* temp; - f32* test; + s32 fmax; + s32 i1; + s32 fmin; + s32 i2; + s32 i3; + s32 fbin; + s16* aiData; + s32 pad; static s32 sFreqBins[] = { 0, 1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 14, 16, 19, 22, 26, 31, 37, 44, 54, 68, 88, 108, 138, 163, 188, 208, 222, 234, 242, 246, @@ -2419,36 +2421,36 @@ u8* Audio_UpdateFrequencyAnalysis(void) { Audio_ProcessPlaylist(); // clang-format off - temp = gAiBuffers[gCurAiBuffIndex];\ - for(l = 0; l < 256; l++) {\ - D_80149AD8[l] = *temp++; + aiData = gAiBuffers[gCurAiBuffIndex];\ + for(i3 = 0; i3 < 256; i3++) {\ + sAudioAnalyzerData[i3] = *aiData++; } // clang-format on - func_8001BFC0(D_80149AD8, D_80149ED8, 8, D_8014A2D8); - j = 0; - for (i = 0; i < 32; i++) { - temp2 = sFreqBins[i] + 1; - for (m = j; m < temp2; m++) { - if (D_80149AD8[m] > 0.0f) { - D_8014A8D8[i] += D_80149AD8[m]; + Audio_AnalyzeFrequencies(sAudioAnalyzerData, sAnalyzerBuffer1, 8, sAnalyzerBuffer2); + fmin = 0; + for (i1 = 0; i1 < 32; i1++) { + fmax = sFreqBins[i1] + 1; + for (fbin = fmin; fbin < fmax; fbin++) { + if (sAudioAnalyzerData[fbin] > 0.0f) { + sNewFreqAmplitudes[i1] += sAudioAnalyzerData[fbin]; } else { - D_8014A8D8[i] -= D_80149AD8[m]; + sNewFreqAmplitudes[i1] -= sAudioAnalyzerData[fbin]; } } - j = m; + fmin = fbin; } - for (k = 0; k < 32; k++) { - D_8014A8D8[k] /= 8; + for (i2 = 0; i2 < 32; i2++) { + sNewFreqAmplitudes[i2] /= 8; } - for (l = 0; l < 32; l++) { - D_8014A8D8[l] = (D_8014A8D8[l] / 32768.0f) * sFreqGain; - if (D_8014A8D8[l] > 1.0f) { - D_8014A8D8[l] = 1.0f; + for (i3 = 0; i3 < 32; i3++) { + sNewFreqAmplitudes[i3] = (sNewFreqAmplitudes[i3] / 32768.0f) * sFreqGain; + if (sNewFreqAmplitudes[i3] > 1.0f) { + sNewFreqAmplitudes[i3] = 1.0f; } - sFreqAmplitudes[l] = sFreqAmplitudes[l] * 0.75f + 0.25f * D_8014A8D8[l]; - D_8014A958[l] = sFreqAmplitudes[l] * 255.0f; + sFreqAmplitudes[i3] = sFreqAmplitudes[i3] * 0.75f + 0.25f * sNewFreqAmplitudes[i3]; + sFreqAnalyzerBars[i3] = sFreqAmplitudes[i3] * 255.0f; } - return D_8014A958; + return sFreqAnalyzerBars; } void Audio_StartPlayerNoise(u8 playerId) { @@ -2479,7 +2481,7 @@ void Audio_StartPlayerNoise(u8 playerId) { } } -void func_8001CA24(u8 playerId) { +void Audio_StopPlayerNoise(u8 playerId) { u32 sfxId = 0x00000000; switch (sPlayerNoise[playerId].form) { @@ -2505,56 +2507,56 @@ void func_8001CA24(u8 playerId) { } } -void func_8001CB80(u8 playerId, u8 arg1) { - D_8014BA28[playerId] = sAudioFrameCounter; - switch (arg1) { +void Audio_InitBombSfx(u8 playerId, u8 type) { + sBombStartFrame[playerId] = sAudioFrameCounter; + switch (type) { case 1: - D_8014BA10[playerId] = 1.0f; - D_8014BA20[playerId] = 1; + sBombFreqMod[playerId] = 1.0f; + sBombType[playerId] = 1; break; case 2: - D_8014BA10[playerId] = 1.5f; - D_8014BA20[playerId] = 2; + sBombFreqMod[playerId] = 1.5f; + sBombType[playerId] = 2; break; default: case 0: - D_8014BA10[playerId] = 0.75f; - D_8014BA20[playerId] = 0; + sBombFreqMod[playerId] = 0.75f; + sBombType[playerId] = 0; break; } - if (D_8014BA24[playerId] != 1) { - Audio_PlaySfx(0x01008008, gPlayer[playerId].sfx.srcPos, playerId, &D_8014BA10[playerId], &gDefaultMod, + if (sBombState[playerId] != 1) { + Audio_PlaySfx(0x01008008, gPlayer[playerId].sfx.srcPos, playerId, &sBombFreqMod[playerId], &gDefaultMod, &sPlayerNoise[playerId].reverbAdd); - D_8014BA24[playerId] = 1; + sBombState[playerId] = 1; } } -void func_8001CCDC(u8 playerId, f32* sfxSource) { - if (D_8014BA24[playerId] != 0) { - switch (D_8014BA20[playerId]) { +void Audio_PlayBombFlightSfx(u8 playerId, f32* sfxSource) { + if (sBombState[playerId] != 0) { + switch (sBombType[playerId]) { case 1: - D_8014BA10[playerId] = 1.2f; + sBombFreqMod[playerId] = 1.2f; break; case 2: - D_8014BA10[playerId] = 1.5f; + sBombFreqMod[playerId] = 1.5f; break; default: case 0: - D_8014BA10[playerId] = 1.0f; + sBombFreqMod[playerId] = 1.0f; break; } Audio_KillSfxBySourceAndId(gPlayer[playerId].sfx.srcPos, 0x01008008); - Audio_PlaySfx(0x09001001, sfxSource, playerId, &D_8014BA10[playerId], &gDefaultMod, + Audio_PlaySfx(0x09001001, sfxSource, playerId, &sBombFreqMod[playerId], &gDefaultMod, &sPlayerNoise[playerId].reverbAdd); - D_8014BA24[playerId] = 2; + sBombState[playerId] = 2; } } -void func_8001CE28(u8 playerId, f32* sfxSource) { +void Audio_PlayBombExplodeSfx(u8 playerId, f32* sfxSource) { u32 sfxId; - if (D_8014BA24[playerId] != 0) { - switch (D_8014BA20[playerId]) { + if (sBombState[playerId] != 0) { + switch (sBombType[playerId]) { case 1: sfxId = 0x0903A00A; break; @@ -2568,35 +2570,35 @@ void func_8001CE28(u8 playerId, f32* sfxSource) { } Audio_KillSfxByTokenAndId(playerId, 0x09001001); AUDIO_PLAY_SFX(sfxId, sfxSource, playerId); - D_8014BA24[playerId] = 0; + sBombState[playerId] = 0; } } -void func_8001CEFC(f32* sfxSource) { +void Audio_StartEngineNoise(f32* sfxSource) { u32 sfxId = (gPlayer[0].sfx.levelType == LEVELTYPE_SPACE) ? 0x31000040 : 0x3100000C; AUDIO_PLAY_SFX(sfxId, sfxSource, 0); } -void func_8001CF60(f32* sfxSource) { +void Audio_StopEngineNoise(f32* sfxSource) { u32 sfxId = (gPlayer[0].sfx.levelType == LEVELTYPE_SPACE) ? 0x31000040 : 0x3100000C; Audio_KillSfxBySourceAndId(sfxSource, sfxId); } -void func_8001CFA8(f32 arg0) { - f32 var_fv0 = ABS(arg0); +void Audio_SetSfxSpeedModulation(f32 vel) { + f32 speed = ABS(vel); - if (var_fv0 < 6.0f) { - var_fv0 = 6.0f; - } else if (var_fv0 > 30.0f) { - var_fv0 = 30.0f; + if (speed < 6.0f) { + speed = 6.0f; + } else if (speed > 30.0f) { + speed = 30.0f; } - sSfxFreqMod = ((var_fv0 - 18.0f) / 24.0f) + 1.0f; + sSfxFreqMod = ((speed - 18.0f) / 24.0f) + 1.0f; } -void func_8001D034(f32* sfxSource, u32 sfxId, u8 semitones) { +void Audio_SetTransposeAndPlaySfx(f32* sfxSource, u32 sfxId, u8 semitones) { f32 semitoneMods[] = { 1.0f, 1.059f, 1.122f, 1.189f, 1.26f, 1.335f, 1.414f, 1.498f, 1.587f, 1.682f, 1.782f, 1.888f, 2.0f, }; @@ -2604,64 +2606,69 @@ void func_8001D034(f32* sfxSource, u32 sfxId, u8 semitones) { if (semitones > 12) { semitones = 12; } - func_8001D0B4(sfxSource, sfxId, semitoneMods[semitones]); + Audio_SetModulationAndPlaySfx(sfxSource, sfxId, semitoneMods[semitones]); } -void func_8001D0B4(f32* sfxSource, u32 sfxId, f32 freqMod) { +void Audio_SetModulationAndPlaySfx(f32* sfxSource, u32 sfxId, f32 freqMod) { sSfxFreqMod = freqMod; Audio_PlaySfx(sfxId, sfxSource, 0, &sSfxFreqMod, &gDefaultMod, &gDefaultReverb); } -void func_8001D10C(f32* sfxSource, u32 sfxId) { +void Audio_PlaySfxModulated(f32* sfxSource, u32 sfxId) { Audio_PlaySfx(sfxId, sfxSource, 0, &sSfxFreqMod, &sSfxVolMod, &gDefaultReverb); } -void func_8001D15C(u8 arg0) { - if (arg0 < 12) { - sSfxFreqMod = (arg0 / 11.0f) + 0.5f; +void Audio_SetSfxMapModulation(u8 fMod) { + if (fMod < 12) { + sSfxFreqMod = (fMod / 11.0f) + 0.5f; } else { sSfxFreqMod = 1.5f; } } -void func_8001D1C8(u8 arg0, u8 arg1) { - u8 temp1; - u8 temp2; +void Audio_SetHeatAlarmParams(u8 shields, u8 heightParam) { + // height param is (s32) height / 100 - 1, clamped to [0, 5] + u8 alarmVolume; + u8 heightVolume; - AUDIOCMD_CHANNEL_SET_IO(SEQ_PLAYER_SFX, 9, 2, 8 + (arg0 >> 2)); - AUDIOCMD_CHANNEL_SET_IO(SEQ_PLAYER_SFX, 10, 2, 8 + (arg0 >> 2)); - AUDIOCMD_CHANNEL_SET_IO(SEQ_PLAYER_SFX, 11, 2, 8 + (arg0 >> 2)); - AUDIOCMD_CHANNEL_SET_IO(SEQ_PLAYER_SFX, 9, 1, 19 - (arg1 * 3)); - AUDIOCMD_CHANNEL_SET_IO(SEQ_PLAYER_SFX, 10, 1, 19 - (arg1 * 3)); - AUDIOCMD_CHANNEL_SET_IO(SEQ_PLAYER_SFX, 11, 1, 19 - (arg1 * 3)); - temp1 = 68 - (arg0 >> 3); - temp2 = 80 - (arg1 * 10); - if (temp1 < temp2) { - temp1 = temp2; + // modifies tempo + AUDIOCMD_CHANNEL_SET_IO(SEQ_PLAYER_SFX, 9, 2, 8 + (shields >> 2)); + AUDIOCMD_CHANNEL_SET_IO(SEQ_PLAYER_SFX, 10, 2, 8 + (shields >> 2)); + AUDIOCMD_CHANNEL_SET_IO(SEQ_PLAYER_SFX, 11, 2, 8 + (shields >> 2)); + + // modifies frequency + AUDIOCMD_CHANNEL_SET_IO(SEQ_PLAYER_SFX, 9, 1, 19 - (heightParam * 3)); + AUDIOCMD_CHANNEL_SET_IO(SEQ_PLAYER_SFX, 10, 1, 19 - (heightParam * 3)); + AUDIOCMD_CHANNEL_SET_IO(SEQ_PLAYER_SFX, 11, 1, 19 - (heightParam * 3)); + + alarmVolume = 68 - (shields >> 3); + heightVolume = 80 - (heightParam * 10); + if (heightVolume > alarmVolume) { + alarmVolume = heightVolume; } - AUDIOCMD_CHANNEL_SET_IO(SEQ_PLAYER_SFX, 9, 3, temp1); - AUDIOCMD_CHANNEL_SET_IO(SEQ_PLAYER_SFX, 10, 3, temp1); - AUDIOCMD_CHANNEL_SET_IO(SEQ_PLAYER_SFX, 11, 3, temp1); + AUDIOCMD_CHANNEL_SET_IO(SEQ_PLAYER_SFX, 9, 3, alarmVolume); + AUDIOCMD_CHANNEL_SET_IO(SEQ_PLAYER_SFX, 10, 3, alarmVolume); + AUDIOCMD_CHANNEL_SET_IO(SEQ_PLAYER_SFX, 11, 3, alarmVolume); } -void Audio_PlayEventSfx(f32* sfxSource, u16 arg1) { - if ((D_800C5E88[arg1] & 0xF0000000) != 0x40000000) { - AUDIO_PLAY_SFX(D_800C5E88[arg1], sfxSource, 0); +void Audio_PlayEventSfx(f32* sfxSource, u16 eventSfxId) { + if ((sEventSfx[eventSfxId] & 0xF0000000) != 0x40000000) { + AUDIO_PLAY_SFX(sEventSfx[eventSfxId], sfxSource, 0); } else { - AUDIO_PLAY_SFX(D_800C5E88[arg1], gDefaultSfxSource, 0); + AUDIO_PLAY_SFX(sEventSfx[eventSfxId], gDefaultSfxSource, 0); } } -void Audio_StopEventSfx(f32* sfxSource, u16 arg1) { - if ((D_800C5E88[arg1] & 0xF0000000) != 0x40000000) { - Audio_KillSfxBySourceAndId(sfxSource, D_800C5E88[arg1]); +void Audio_StopEventSfx(f32* sfxSource, u16 eventSfxId) { + if ((sEventSfx[eventSfxId] & 0xF0000000) != 0x40000000) { + Audio_KillSfxBySourceAndId(sfxSource, sEventSfx[eventSfxId]); } else { - Audio_KillSfxBySourceAndId(gDefaultSfxSource, D_800C5E88[arg1]); + Audio_KillSfxBySourceAndId(gDefaultSfxSource, sEventSfx[eventSfxId]); } } -void Audio_SetBaseSfxReverb(s8 reverb) { - sBaseReverb = reverb; +void Audio_SetEnvSfxReverb(s8 reverb) { + sEnvReverb = reverb; } void Audio_SetBgmParam(s8 bgmParam) { @@ -2681,16 +2688,16 @@ void Audio_PlayFanfare(u16 seqId, u8 bgmVolume, u8 bgmFadeoutTime, u8 bgmFadeinT } } -void func_8001D520(void) { +void Audio_PlayDeathSequence(void) { u8 i; - if (sNewAudioSpecId == AUDIOSPEC_24) { + if (sAudioSpecId == AUDIOSPEC_24) { Audio_ClearVoice(); - func_8001D6DC(0); + Audio_PlayMapMenuSfx(0); AUDIO_PLAY_SFX(0x0903F004, gDefaultSfxSource, 4); SEQCMD_SET_SEQPLAYER_VOLUME(SEQ_PLAYER_BGM, 5, 30); SEQCMD_SETUP_RESTORE_SEQPLAYER_VOLUME(SEQ_PLAYER_FANFARE, SEQ_PLAYER_BGM, 30); - SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_FANFARE, 0, 0, 39); + SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_FANFARE, 0, 0, SEQ_ID_DEATH); } else { for (i = 0; i < 5; i++) { Audio_KillSfxByBank(i); @@ -2699,12 +2706,12 @@ void func_8001D520(void) { AUDIO_PLAY_SFX(0x0903F004, gDefaultSfxSource, 4); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 0); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 0); - SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM, 0, 0, 39); + SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM, 0, 0, SEQ_ID_DEATH); } } -void func_8001D638(u8 arg0) { - if (arg0) { +void Audio_PlayPauseSfx(u8 active) { + if (active) { AUDIO_PLAY_SFX(0x4900F000, gDefaultSfxSource, 4); AUDIOCMD_GLOBAL_MUTE(); } else { @@ -2713,8 +2720,8 @@ void func_8001D638(u8 arg0) { } } -void func_8001D6DC(u8 arg0) { - if (arg0) { +void Audio_PlayMapMenuSfx(u8 active) { + if (active) { AUDIO_PLAY_SFX(0x49000019, gDefaultSfxSource, 4); AUDIOCMD_GLOBAL_MUTE(); } else { @@ -2723,7 +2730,7 @@ void func_8001D6DC(u8 arg0) { } } -void func_8001D780(u8 audioType) { +void Audio_RestoreVolumeSettings(u8 audioType) { s8 volume = ((sVolumeSettings[audioType] * 127) / 99) % 128U; u8 i; @@ -2748,7 +2755,7 @@ void Audio_SetVolume(u8 audioType, u8 volume) { volume = 99; } sVolumeSettings[audioType] = volume; - func_8001D780(audioType); + Audio_RestoreVolumeSettings(audioType); } void Audio_PlaySoundTest(u8 enable) { @@ -2834,40 +2841,40 @@ void Audio_InitSounds(void) { Audio_StartSequence(SEQ_PLAYER_SFX, SEQ_ID_SFX, 0xFF, 10); } -void func_8001DD40(void) { +void Audio_RestartSeqPlayers(void) { s32 pad1; s32 pad2; - u16 sp1E = 1; + u16 fadeIn = 1; Audio_StartSequence(SEQ_PLAYER_VOICE, SEQ_ID_VOICE, 0xFF, 1); - if (sNewAudioSpecId == AUDIOSPEC_12) { - sp1E = 360; - } else if (sNewAudioSpecId < AUDIOSPEC_23) { - sp1E = 90; + if (sAudioSpecId == AUDIOSPEC_12) { + fadeIn = 360; + } else if (sAudioSpecId < AUDIOSPEC_23) { + fadeIn = 90; } - Audio_StartSequence(SEQ_PLAYER_SFX, SEQ_ID_SFX, 0xFF, sp1E); - func_80017494(); - func_80017550(); + Audio_StartSequence(SEQ_PLAYER_SFX, SEQ_ID_SFX, 0xFF, fadeIn); + Audio_LoadInstruments(); + Audio_LoadAquasSequence(); SEQCMD_SET_SEQPLAYER_VOLUME(SEQ_PLAYER_SFX, 0, 127); SEQCMD_SET_SEQPLAYER_VOLUME(SEQ_PLAYER_VOICE, 0, 127); AudioThread_ScheduleProcessCmds(); AUDIOCMD_GLOBAL_STOP_AUDIOCMDS(); AUDIOCMD_GLOBAL_STOP_AUDIOCMDS(); AUDIOCMD_GLOBAL_STOP_AUDIOCMDS(); - func_8001D780(0); - func_8001D780(2); - func_8001D780(1); + Audio_RestoreVolumeSettings(0); + Audio_RestoreVolumeSettings(2); + Audio_RestoreVolumeSettings(1); } -void func_8001DE1C(u8 oldSpecId) { +void Audio_StartReset(u8 oldSpecId) { if (oldSpecId == AUDIOSPEC_16) { - if ((sNewAudioSpecId == AUDIOSPEC_22) || (sNewAudioSpecId == AUDIOSPEC_23)) { - D_800C5D58 = 2; + if ((sAudioSpecId == AUDIOSPEC_22) || (sAudioSpecId == AUDIOSPEC_23)) { + sAudioResetStatus = AUDIORESET_BLOCK; } - } else if ((oldSpecId == AUDIOSPEC_28) && (sNewAudioSpecId == AUDIOSPEC_23)) { - D_800C5D58 = 2; + } else if ((oldSpecId == AUDIOSPEC_28) && (sAudioSpecId == AUDIOSPEC_23)) { + sAudioResetStatus = AUDIORESET_BLOCK; } else { - D_800C5D58 = 1; + sAudioResetStatus = AUDIORESET_WAIT; } AUDIOCMD_GLOBAL_UNMUTE(true); Audio_ResetVoicesAndPlayers(); @@ -2877,13 +2884,13 @@ void func_8001DE1C(u8 oldSpecId) { } void Audio_Update(void) { - if (func_80018FA4() == 0) { + if (Audio_HandleReset() == AUDIORESET_READY) { Audio_ProcessSfxRequests(); Audio_ProcessSeqCmds(); Audio_PlayAllSfx(); Audio_UpdatePlayerNoise(); Audio_UpdateVoice(); - func_8001AF50(); + Audio_UpdateUnkVoiceParam(); Audio_UpdateActiveSequences(); Audio_UpdateDelayedSeqCmds(); AudioThread_ScheduleProcessCmds(); diff --git a/src/audio/audio_load.c b/src/audio/audio_load.c index a86837e6..7cf8671e 100644 --- a/src/audio/audio_load.c +++ b/src/audio/audio_load.c @@ -291,7 +291,7 @@ s32 AudioLoad_SyncLoadInstrument(s32 fontId, s32 instId, s32 drumId) { void AudioLoad_AsyncLoadSampleBank(s32 sampleBankId, s32 nChunks, s32 retData, OSMesgQueue* retQueue) { if (AudioLoad_AsyncLoadInner(2, AudioLoad_GetLoadTableIndex(2, sampleBankId), nChunks, retData, retQueue) == NULL) { - osSendMesg(retQueue, NULL, 0); + osSendMesg(retQueue, NULL, OS_MESG_NOBLOCK); } } @@ -642,14 +642,14 @@ void AudioLoad_SyncDma(u32 devAddr, u8* ramAddr, u32 size, s32 medium) { break; } AudioLoad_Dma(&gSyncDmaIoMsg, 1, 0, devAddr, ramAddr, 0x400, &gSyncDmaQueue, medium, D_800C50E8); - osRecvMesg(&gSyncDmaQueue, NULL, 1); + MQ_WAIT_FOR_MESG(&gSyncDmaQueue, NULL); size -= 0x400; devAddr += 0x400; ramAddr += 0x400; } if (size != 0) { AudioLoad_Dma(&gSyncDmaIoMsg, 1, 0, devAddr, ramAddr, size, &gSyncDmaQueue, medium, D_800C50F4); - osRecvMesg(&gSyncDmaQueue, NULL, 1); + MQ_WAIT_FOR_MESG(&gSyncDmaQueue, NULL); } } @@ -737,7 +737,7 @@ void* AudioLoad_AsyncLoadInner(s32 tableType, s32 id, s32 nChunks, s32 retData, ramAddr = AudioLoad_SearchCaches(tableType, id); if (ramAddr != NULL) { loadStatus = 2; - osSendMesg(retQueue, (void*) (retData << 0x18), 0); + osSendMesg(retQueue, (void*) (retData << 0x18), OS_MESG_NOBLOCK); } else { table = AudioLoad_GetLoadTable(tableType); size = table->entries[id].size; @@ -990,7 +990,7 @@ void AudioLoad_ProcessSlowLoads(s32 resetStatus) { slowLoad = &gSlowLoads.slowLoad[i]; switch (slowLoad->state) { case 2: - osRecvMesg(&slowLoad->msgQueue, NULL, 1); + MQ_WAIT_FOR_MESG(&slowLoad->mesgQueue, NULL); if (resetStatus != 0) { slowLoad->state = 3; break; @@ -1035,8 +1035,8 @@ static char devstr47[] = "Other Type: Not Write ID.\n"; void AudioLoad_DmaSlowCopy(AudioSlowLoad* slowLoad, s32 size) { osInvalDCache(slowLoad->curRamAddr, size); - osCreateMesgQueue(&slowLoad->msgQueue, &slowLoad->msg, 1); - AudioLoad_Dma(&slowLoad->ioMesg, 0, 0, slowLoad->curDevAddr, slowLoad->curRamAddr, size, &slowLoad->msgQueue, + osCreateMesgQueue(&slowLoad->mesgQueue, &slowLoad->msg, 1); + AudioLoad_Dma(&slowLoad->ioMesg, 0, 0, slowLoad->curDevAddr, slowLoad->curRamAddr, size, &slowLoad->mesgQueue, slowLoad->medium, D_800C52F4); } @@ -1081,7 +1081,7 @@ AudioAsyncLoad* AudioLoad_StartAsyncLoad(u32 devAddr, u8* ramAddr, u32 size, s32 asyncLoad->medium = medium; asyncLoad->retMsg = retMesg; - osCreateMesgQueue(&asyncLoad->msgQueue, &asyncLoad->msg, 1); + osCreateMesgQueue(&asyncLoad->mesgQueue, &asyncLoad->msg, 1); return asyncLoad; } @@ -1114,11 +1114,11 @@ void AudioLoad_ProcessAsyncLoad(AudioAsyncLoad* asyncLoad, s32 resetStatus) { asyncLoad->delay = 0; } else { if (resetStatus != 0) { - osRecvMesg(&asyncLoad->msgQueue, NULL, 1); + MQ_WAIT_FOR_MESG(&asyncLoad->mesgQueue, NULL); asyncLoad->status = 0; return; } - if (osRecvMesg(&asyncLoad->msgQueue, NULL, 0) == -1) { + if (!MQ_GET_MESG(&asyncLoad->mesgQueue, NULL)) { return; } } @@ -1160,7 +1160,7 @@ void AudioLoad_ProcessAsyncLoad(AudioAsyncLoad* asyncLoad, s32 resetStatus) { break; } asyncLoad->status = 0; - osSendMesg(asyncLoad->retQueue, asyncLoad->retMsg, 0); + osSendMesg(asyncLoad->retQueue, asyncLoad->retMsg, OS_MESG_NOBLOCK); } else { if (asyncLoad->bytesRemaining < asyncLoad->chunkSize) { if (asyncLoad->medium == MEDIUM_UNK) { @@ -1190,9 +1190,9 @@ static char D_800C53AC[] = "BGCOPY"; void AudioLoad_AsyncDma(AudioAsyncLoad* asyncLoad, u32 size) { size = ALIGN16(size); osInvalDCache(asyncLoad->curRamAddr, size); - osCreateMesgQueue(&asyncLoad->msgQueue, &asyncLoad->msg, 1); + osCreateMesgQueue(&asyncLoad->mesgQueue, &asyncLoad->msg, 1); if (size) {} - AudioLoad_Dma(&asyncLoad->ioMesg, 0, 0, asyncLoad->curDevAddr, asyncLoad->curRamAddr, size, &asyncLoad->msgQueue, + AudioLoad_Dma(&asyncLoad->ioMesg, 0, 0, asyncLoad->curDevAddr, asyncLoad->curRamAddr, size, &asyncLoad->mesgQueue, asyncLoad->medium, D_800C53AC); } @@ -1353,11 +1353,11 @@ s32 AudioLoad_ProcessSamplePreloads(s32 resetStatus) { if (gPreloadSampleStackTop > 0) { if (resetStatus != 0) { - if (osRecvMesg(&gPreloadSampleQueue, (OSMesg) &preloadIndex, 0)) {} + if (!MQ_GET_MESG(&gPreloadSampleQueue, &preloadIndex)) {} gPreloadSampleStackTop = 0; return false; } - if (osRecvMesg(&gPreloadSampleQueue, (OSMesg) &preloadIndex, 0) == -1) { + if (!MQ_GET_MESG(&gPreloadSampleQueue, &preloadIndex)) { return false; } // "Receive %d\n" diff --git a/src/audio/audio_playback.c b/src/audio/audio_playback.c index dc533ce1..21639354 100644 --- a/src/audio/audio_playback.c +++ b/src/audio/audio_playback.c @@ -165,44 +165,44 @@ TunedSample* func_80011D10(Instrument* instrument, s32 arg1) { return sample; } -Instrument* Audio_GetInstrument(s32 arg0, s32 arg1) { - Instrument* temp_v1; +Instrument* Audio_GetInstrument(s32 fontId, s32 instId) { + Instrument* instrument; - if ((gFontLoadStatus[arg0] < 2) != 0) { - D_80155D88 = arg0 + 0x10000000; + if ((gFontLoadStatus[fontId] < 2) != 0) { + D_80155D88 = fontId + 0x10000000; return NULL; } - if (arg1 >= gSoundFontList[arg0].numInstruments) { - D_80155D88 = (arg0 << 8) + arg1 + 0x03000000; + if (instId >= gSoundFontList[fontId].numInstruments) { + D_80155D88 = (fontId << 8) + instId + 0x03000000; return NULL; } - temp_v1 = gSoundFontList[arg0].instruments[arg1]; - if (temp_v1 == NULL) { - D_80155D88 = (arg0 << 8) + arg1 + 0x01000000; - return temp_v1; + instrument = gSoundFontList[fontId].instruments[instId]; + if (instrument == NULL) { + D_80155D88 = (fontId << 8) + instId + 0x01000000; + return instrument; } - return temp_v1; + return instrument; } -Drum* Audio_GetDrum(s32 arg0, s32 arg1) { - Drum* temp; +Drum* Audio_GetDrum(s32 fontId, s32 drumId) { + Drum* drum; - if ((gFontLoadStatus[arg0] < 2) != 0) { - D_80155D88 = arg0 + 0x10000000; + if ((gFontLoadStatus[fontId] < 2) != 0) { + D_80155D88 = fontId + 0x10000000; return NULL; } - if (arg1 >= gSoundFontList[arg0].numDrums) { - D_80155D88 = (arg0 << 8) + arg1 + 0x04000000; + if (drumId >= gSoundFontList[fontId].numDrums) { + D_80155D88 = (fontId << 8) + drumId + 0x04000000; return NULL; } - if ((u32) gSoundFontList[arg0].drums < AUDIO_RELOCATED_ADDRESS_START) { + if ((u32) gSoundFontList[fontId].drums < AUDIO_RELOCATED_ADDRESS_START) { return NULL; } - temp = gSoundFontList[arg0].drums[arg1]; - if (gSoundFontList[arg0].drums[arg1] == NULL) { - D_80155D88 = (arg0 << 8) + arg1 + 0x05000000; + drum = gSoundFontList[fontId].drums[drumId]; + if (gSoundFontList[fontId].drums[drumId] == NULL) { + D_80155D88 = (fontId << 8) + drumId + 0x05000000; } - return temp; + return drum; } void func_80011EB8(Note* note) { @@ -428,35 +428,35 @@ void func_8001268C(SequenceLayer* layer) { func_80012438(layer, 7); } -s32 func_800126AC(Note* note, SequenceLayer* layer, s32 arg2) { - f32 var_fv0; - u8 var_v1 = 0; +s32 func_800126AC(Note* note, SequenceLayer* layer, s32 waveId) { + f32 freqMod; + u8 harmonicIndex = 0; - if (arg2 < 128) { - arg2 = 128; + if (waveId < 128) { + waveId = 128; } - var_fv0 = layer->freqMod; + freqMod = layer->freqMod; if ((layer->portamento.mode != 0) && (layer->portamento.extent > 0.0f)) { - var_fv0 *= layer->portamento.extent + 1.0f; + freqMod *= layer->portamento.extent + 1.0f; } - if (var_fv0 < 1.0f) { - var_fv0 = 1.0465f; - } else if (var_fv0 < 2.0f) { - var_v1 = 1; - var_fv0 = 0.52325f; - } else if (var_fv0 < 4.0f) { - var_v1 = 2; - var_fv0 = 0.26263f; + if (freqMod < 1.0f) { + freqMod = 1.0465f; + } else if (freqMod < 2.0f) { + harmonicIndex = 1; + freqMod = 0.52325f; + } else if (freqMod < 4.0f) { + harmonicIndex = 2; + freqMod = 0.26263f; } else { - var_v1 = 3; - var_fv0 = 0.13081f; + harmonicIndex = 3; + freqMod = 0.13081f; } - layer->freqMod *= var_fv0; - note->playbackState.waveId = arg2; - note->playbackState.harmonicIndex = var_v1; - note->noteSubEu.waveSampleAddr = &gWaveSamples[arg2 - 128][var_v1 * 64]; - return var_v1; + layer->freqMod *= freqMod; + note->playbackState.waveId = waveId; + note->playbackState.harmonicIndex = harmonicIndex; + note->noteSubEu.waveSampleAddr = &gWaveSamples[waveId - 128][harmonicIndex * 64]; + return harmonicIndex; } void func_800127B0(Note* note, SequenceLayer* layer) { @@ -601,7 +601,7 @@ void func_80012C40(Note* note) { } } -Note* func_80012C6C(AudioListItem* item, s32 arg1) { +Note* func_80012C6C(AudioListItem* item, s32 priority) { AudioListItem* var_v0; AudioListItem* var_v1; void* temp_a0; @@ -620,7 +620,7 @@ Note* func_80012C6C(AudioListItem* item, s32 arg1) { return NULL; } - if (((Note*) var_v1->u.value)->playbackState.priority >= arg1) { + if (((Note*) var_v1->u.value)->playbackState.priority >= priority) { return NULL; } return (Note*) var_v1->u.value; diff --git a/src/audio/audio_seqplayer.c b/src/audio/audio_seqplayer.c index badce99d..c936fbe9 100644 --- a/src/audio/audio_seqplayer.c +++ b/src/audio/audio_seqplayer.c @@ -349,25 +349,25 @@ void func_80014748(SequenceLayer* layer) { break; } switch (cmd) { /* switch 5; irregular */ - case 0xFF: /* switch 5 */ + case 0xFF: if (state->depth == 0) { func_800140D0(layer); return; } state->pc = state->stack[--state->depth]; break; - case 0xFC: /* switch 5 */ + case 0xFC: sp44 = func_800146D4(state); state->stack[state->depth] = state->pc; state->depth++; state->pc = &seqPlayer->seqData[sp44]; break; - case 0xF8: /* switch 5 */ + case 0xF8: state->remLoopIters[state->depth] = func_800146C0(state); state->stack[state->depth] = state->pc; state->depth++; break; - case 0xF7: /* switch 5 */ + case 0xF7: state->remLoopIters[state->depth - 1]--; if (state->remLoopIters[state->depth - 1] != 0) { state->pc = state->stack[state->depth - 1]; @@ -375,15 +375,15 @@ void func_80014748(SequenceLayer* layer) { state->depth--; } break; - case 0xFB: /* switch 5 */ + case 0xFB: sp44 = func_800146D4(state); state->pc = &seqPlayer->seqData[sp44]; break; - case 0xF4: /* switch 5 */ + case 0xF4: state->pc += (s8) func_800146C0(state); break; - case 0xC1: /* switch 5 */ - case 0xCA: /* switch 5 */ + case 0xC1: + case 0xCA: var_s2 = *state->pc++; if (cmd == 0xC1) { layer->velocitySquare = (f32) (var_s2 * var_s2) / 16129.0f; @@ -391,8 +391,8 @@ void func_80014748(SequenceLayer* layer) { layer->pan = var_s2; } break; - case 0xC2: /* switch 5 */ - case 0xC9: /* switch 5 */ + case 0xC2: + case 0xC9: var_s2 = *state->pc++; if (cmd == 0xC9) { layer->gateTime = var_s2; @@ -400,8 +400,8 @@ void func_80014748(SequenceLayer* layer) { layer->transposition = var_s2; } break; - case 0xC4: /* switch 5 */ - case 0xC5: /* switch 5 */ + case 0xC4: + case 0xC5: if (cmd == 0xC4) { layer->continuousNotes = 1; } else { @@ -409,11 +409,11 @@ void func_80014748(SequenceLayer* layer) { } func_8001266C(layer); break; - case 0xC3: /* switch 5 */ + case 0xC3: sp44 = func_80014704(state); layer->shortNoteDefaultDelay = sp44; break; - case 0xC6: /* switch 5 */ + case 0xC6: cmd = func_800146C0(state); if (cmd >= 127) { if (cmd == 127) { @@ -433,7 +433,7 @@ void func_80014748(SequenceLayer* layer) { } } break; - case 0xC7: /* switch 5 */ + case 0xC7: layer->portamento.mode = func_800146C0(state); cmd = func_800146C0(state) + channel->transposition + layer->transposition + seqPlayer->transposition; if (cmd > 127) { @@ -447,27 +447,27 @@ void func_80014748(SequenceLayer* layer) { layer->portamentoTime = sp44; } break; - case 0xC8: /* switch 5 */ + case 0xC8: layer->portamento.mode = 0; break; - case 0xCB: /* switch 5 */ + case 0xCB: sp44 = func_800146D4(state); layer->adsr.envelope = (EnvelopePoint*) &seqPlayer->seqData[sp44]; layer->adsr.decayIndex = func_800146C0(state); break; - case 0xCC: /* switch 5 */ + case 0xCC: layer->bit1 = 1; break; - case 0xCD: /* switch 5 */ + case 0xCD: layer->stereo.asByte = func_800146C0(state); break; - default: /* switch 5 */ + default: switch (cmd & 0xF0) { /* switch 6; irregular */ - case 0xD0: /* switch 6 */ + case 0xD0: sp44 = (u16) seqPlayer->shortNoteVelocityTable[cmd & 0xF]; layer->velocitySquare = (f32) (sp44 * sp44) / 16129.0f; break; - case 0xE0: /* switch 6 */ + case 0xE0: layer->gateTime = seqPlayer->shortNoteGateTimeTable[cmd & 0xF]; break; default: @@ -518,14 +518,14 @@ void func_80014748(SequenceLayer* layer) { cmd -= (cmd & 0xC0); } else { switch (cmd & 0xC0) { /* switch 4; irregular */ - case 0x0: /* switch 4 */ + case 0x0: sp44 = func_80014704(state); layer->lastDelay = sp44; break; - case 0x40: /* switch 4 */ + case 0x40: sp44 = layer->shortNoteDefaultDelay; break; - case 0x80: /* switch 4 */ + case 0x80: sp44 = layer->lastDelay; break; } @@ -587,19 +587,19 @@ void func_80014748(SequenceLayer* layer) { temp_fv1 = gPitchFrequencies[cmd] * tuning; temp_fa1 = gPitchFrequencies[layer->portamentoTargetNote] * tuning; portamento = &layer->portamento; - switch (portamento->mode & ~0x80) { /* switch 3 */ - case 1: /* switch 3 */ - case 3: /* switch 3 */ - case 5: /* switch 3 */ + switch (portamento->mode & ~0x80) { + case 1: + case 3: + case 5: var_v0_2 = temp_fv1; freqMod = temp_fa1; break; - case 2: /* switch 3 */ - case 4: /* switch 3 */ + case 2: + case 4: freqMod = temp_fv1; var_v0_2 = temp_fa1; break; - default: /* switch 3 */ + default: freqMod = temp_fv1; var_v0_2 = temp_fv1; break; @@ -741,7 +741,7 @@ void func_800153E8(SequenceChannel* channel) { case 0xD5: case 0xD6: break; - case 0xFF: /* switch 3 */ + case 0xFF: if (state->depth == 0) { func_8001415C(channel); goto end_loop; @@ -750,10 +750,10 @@ void func_800153E8(SequenceChannel* channel) { break; case 0xFE: goto end_loop; - case 0xFD: /* switch 3 */ + case 0xFD: channel->delay = func_80014704(state); goto end_loop; - case 0xEA: /* switch 3 */ + case 0xEA: channel->stopScript = 1; goto end_loop; case 0xFC: @@ -764,14 +764,14 @@ void func_800153E8(SequenceChannel* channel) { state->depth++; state->pc = &seqPlayer->seqData[sp52]; break; - case 0xF8: /* switch 3 */ + case 0xF8: // if (0 && state->depth >= 4) { // } state->remLoopIters[state->depth] = func_800146C0(state); state->stack[state->depth] = state->pc; state->depth++; break; - case 0xF7: /* switch 3 */ + case 0xF7: state->remLoopIters[state->depth - 1]--; if (state->remLoopIters[state->depth - 1] != 0) { state->pc = state->stack[state->depth - 1]; @@ -779,13 +779,13 @@ void func_800153E8(SequenceChannel* channel) { state->depth--; } break; - case 0xF6: /* switch 3 */ + case 0xF6: state->depth--; break; - case 0xF5: /* switch 3 */ - case 0xF9: /* switch 3 */ - case 0xFA: /* switch 3 */ - case 0xFB: /* switch 3 */ + case 0xF5: + case 0xF9: + case 0xFA: + case 0xFB: sp52 = func_800146D4(state); if (((cmd == 0xFA) && (sp4B != 0)) || ((cmd == 0xF9) && (sp4B >= 0)) || ((cmd == 0xF5) && (sp4B < 0))) { @@ -793,34 +793,34 @@ void func_800153E8(SequenceChannel* channel) { } state->pc = &seqPlayer->seqData[sp52]; break; - case 0xF2: /* switch 3 */ - case 0xF3: /* switch 3 */ - case 0xF4: /* switch 3 */ + case 0xF2: + case 0xF3: + case 0xF4: temps8 = func_800146C0(state); if (((cmd == 0xF3) && (sp4B != 0)) || ((cmd == 0xF2) && (sp4B >= 0))) { break; } state->pc = &state->pc[temps8]; break; - case 0xF1: /* switch 3 */ + case 0xF1: func_80012964(&channel->notePool); func_80012AC4(&channel->notePool, func_800146C0(state)); break; - case 0xF0: /* switch 3 */ + case 0xF0: func_80012964(&channel->notePool); break; - case 0xC2: /* switch 3 */ + case 0xC2: sp52 = func_800146D4(state); channel->dynTable = (u8(*)[2]) & seqPlayer->seqData[sp52]; break; - case 0xC5: /* switch 3 */ + case 0xC5: if (sp4B != -1) { seqData = channel->dynTable[sp4B]; sp52 = (seqData[0] << 8) + seqData[1]; channel->dynTable = (u8(*)[2]) & seqPlayer->seqData[sp52]; } break; - case 0xEB: /* switch 3 */ + case 0xEB: cmd = func_800146C0(state); sp52 = ((u16*) gSeqFontTable)[seqPlayer->seqId]; loBits = gSeqFontTable[sp52]; @@ -829,85 +829,85 @@ void func_800153E8(SequenceChannel* channel) { channel->fontId = cmd; } /* fallthrough */ - case 0xC1: /* switch 3 */ + case 0xC1: cmd = func_800146C0(state); func_80015330(channel, cmd); break; - case 0xC3: /* switch 3 */ + case 0xC3: channel->largeNotes = false; break; - case 0xC4: /* switch 3 */ + case 0xC4: channel->largeNotes = true; break; - case 0xDF: /* switch 3 */ + case 0xDF: cmd = func_800146C0(state); func_800153C4(channel, cmd); channel->changes.s.volume = 1; break; - case 0xE0: /* switch 3 */ + case 0xE0: channel->volumeMod = (s32) func_800146C0(state) * 0.0078125f; channel->changes.s.volume = 1; break; - case 0xDE: /* switch 3 */ + case 0xDE: sp52 = func_800146D4(state); channel->freqMod = (s32) sp52 / 32768.0f; channel->changes.s.freqMod = 1; break; - case 0xD3: /* switch 3 */ + case 0xD3: cmd = func_800146C0(state) + 0x80; channel->freqMod = gBendPitchOneOctaveFrequencies[cmd]; channel->changes.s.freqMod = 1; break; - case 0xEE: /* switch 3 */ + case 0xEE: cmd = func_800146C0(state) + 0x80; channel->freqMod = gBendPitchTwoSemitonesFrequencies[cmd]; channel->changes.s.freqMod = 1; break; - case 0xDD: /* switch 3 */ + case 0xDD: channel->newPan = func_800146C0(state); channel->changes.s.pan = 1; break; - case 0xDC: /* switch 3 */ + case 0xDC: channel->panChannelWeight = func_800146C0(state); channel->changes.s.pan = 1; break; - case 0xDB: /* switch 3 */ + case 0xDB: temps8 = *(state->pc++); channel->transposition = temps8; break; - case 0xDA: /* switch 3 */ + case 0xDA: sp52 = func_800146D4(state); channel->adsr.envelope = (EnvelopePoint*) &seqPlayer->seqData[sp52]; break; - case 0xD9: /* switch 3 */ + case 0xD9: channel->adsr.decayIndex = func_800146C0(state); break; - case 0xD8: /* switch 3 */ + case 0xD8: channel->vibratoDepthTarget = func_800146C0(state) * 8; channel->vibratoDepthStart = 0; channel->vibratoDepthChangeDelay = 0; break; - case 0xD7: /* switch 3 */ + case 0xD7: channel->vibratoRateStart = channel->vibratoRateTarget = func_800146C0(state) * 32; channel->vibratoRateChangeDelay = 0; break; - case 0xE2: /* switch 3 */ + case 0xE2: channel->vibratoDepthStart = func_800146C0(state) * 8; channel->vibratoDepthTarget = func_800146C0(state) * 8; channel->vibratoDepthChangeDelay = func_800146C0(state) * 0x10; break; - case 0xE1: /* switch 3 */ + case 0xE1: channel->vibratoRateStart = func_800146C0(state) * 32; channel->vibratoRateTarget = func_800146C0(state) * 32; channel->vibratoRateChangeDelay = func_800146C0(state) * 0x10; break; - case 0xE3: /* switch 3 */ + case 0xE3: channel->vibratoDelay = func_800146C0(state) * 0x10; break; - case 0xD4: /* switch 3 */ + case 0xD4: channel->targetReverbVol = func_800146C0(state); break; - case 0xC6: /* switch 3 */ + case 0xC6: cmd = func_800146C0(state); sp52 = ((u16*) gSeqFontTable)[seqPlayer->seqId]; loBits = gSeqFontTable[sp52]; @@ -916,15 +916,15 @@ void func_800153E8(SequenceChannel* channel) { channel->fontId = cmd; } break; - case 0xC7: /* switch 3 */ + case 0xC7: cmd = func_800146C0(state); sp52 = func_800146D4(state); seqData = &seqPlayer->seqData[sp52]; *seqData = (u8) sp4B + cmd; break; - case 0xC8: /* switch 3 */ - case 0xC9: /* switch 3 */ - case 0xCC: /* switch 3 */ + case 0xC8: + case 0xC9: + case 0xCC: temps8 = func_800146C0(state); if (cmd == 0xC8) { sp4B -= temps8; @@ -934,40 +934,40 @@ void func_800153E8(SequenceChannel* channel) { sp4B &= temps8; } break; - case 0xCD: /* switch 3 */ + case 0xCD: func_8001415C(seqPlayer->channels[func_800146C0(state)]); break; - case 0xCA: /* switch 3 */ + case 0xCA: channel->muteBehavior = func_800146C0(state); break; - case 0xCB: /* switch 3 */ + case 0xCB: sp52 = func_800146D4(state); pad = sp52 + sp4B; // seqData =&seqPlayer->seqData[sp4B]; sp4B = seqPlayer->seqData[pad]; break; - case 0xCE: /* switch 3 */ + case 0xCE: channel->unkC4 = func_800146D4(state); break; - case 0xCF: /* switch 3 */ + case 0xCF: sp52 = func_800146D4(state); seqData = &seqPlayer->seqData[sp52]; seqData[0] = (channel->unkC4 >> 8) & 0xFF; seqData[1] = channel->unkC4 & 0xFF; break; - case 0xD0: /* switch 3 */ + case 0xD0: channel->stereoHeadsetEffects = func_800146C0(state); break; - case 0xD1: /* switch 3 */ + case 0xD1: channel->noteAllocPolicy = func_800146C0(state); break; - case 0xD2: /* switch 3 */ + case 0xD2: channel->adsr.sustain = func_800146C0(state); break; - case 0xE5: /* switch 3 */ + case 0xE5: channel->someOtherPriority = func_800146C0(state); break; - case 0xE4: /* switch 3 */ + case 0xE4: if (sp4B != -1) { if (state->depth >= 4) { // eu_stubbed_printf_0("Audio:Track: CTBLCALL Macro Level Over Error!\n"); @@ -982,10 +982,10 @@ void func_800153E8(SequenceChannel* channel) { // } } break; - case 0xE6: /* switch 3 */ + case 0xE6: channel->bookOffset = func_800146C0(state); break; - case 0xE7: /* switch 3 */ + case 0xE7: sp52 = func_800146D4(state); seqData = &seqPlayer->seqData[sp52]; channel->muteBehavior = *seqData++; @@ -998,7 +998,7 @@ void func_800153E8(SequenceChannel* channel) { channel->someOtherPriority = *seqData++; channel->changes.s.pan = 1; break; - case 0xE8: /* switch 3 */ + case 0xE8: channel->muteBehavior = func_800146C0(state); channel->noteAllocPolicy = func_800146C0(state); channel->notePriority = func_800146C0(state); @@ -1009,7 +1009,7 @@ void func_800153E8(SequenceChannel* channel) { channel->someOtherPriority = func_800146C0(state); channel->changes.s.pan = 1; break; - case 0xEC: /* switch 3 */ + case 0xEC: channel->vibratoDepthTarget = 0; channel->vibratoDepthStart = 0; channel->vibratoDepthChangeDelay = 0; @@ -1018,58 +1018,58 @@ void func_800153E8(SequenceChannel* channel) { channel->vibratoRateChangeDelay = 0; channel->freqMod = 1.0f; break; - case 0xE9: /* switch 3 */ + case 0xE9: channel->notePriority = func_800146C0(state); break; - case 0xED: /* switch 3 */ + case 0xED: // cmd = channel->reverbIndex = func_800146C0(state); break; - case 0xEF: /* switch 3 */ + case 0xEF: func_800146D4(state); func_800146C0(state); break; } } else { loBits = cmd & 0xF; - switch (cmd & 0xF0) { /* switch 2 */ - case 0x0: /* switch 2 */ + switch (cmd & 0xF0) { + case 0x0: if (channel->layers[loBits] != NULL) { sp4B = channel->layers[loBits]->finished; } else { sp4B = -1; } break; - case 0x10: /* switch 2 */ + case 0x10: channel->seqScriptIO[loBits] = -1; if (AudioLoad_SlowLoadSample(channel->fontId, sp4B, &channel->seqScriptIO[loBits]) == -1) {} break; - case 0x70: /* switch 2 */ + case 0x70: channel->seqScriptIO[loBits] = sp4B; break; - case 0x80: /* switch 2 */ + case 0x80: sp4B = channel->seqScriptIO[loBits]; if (loBits < 4) { channel->seqScriptIO[loBits] = -1; } break; - case 0x50: /* switch 2 */ + case 0x50: sp4B -= channel->seqScriptIO[loBits]; break; - case 0x60: /* switch 2 */ + case 0x60: channel->delay = loBits; goto end_loop; - case 0x90: /* switch 2 */ + case 0x90: sp52 = func_800146D4(state); if (func_80013FC4(channel, loBits) == 0) { // if(1) {} channel->layers[loBits]->state.pc = &seqPlayer->seqData[sp52]; } break; - case 0xA0: /* switch 2 */ + case 0xA0: func_8001410C(channel, loBits); break; - case 0xB0: /* switch 2 */ + case 0xB0: if ((sp4B != -1) && (func_80013FC4(channel, loBits) != -1)) { seqData = channel->dynTable[sp4B]; sp52 = (seqData[0] << 8) + seqData[1]; @@ -1080,11 +1080,11 @@ void func_800153E8(SequenceChannel* channel) { sp52 = func_800146D4(state); func_80014440(seqPlayer, loBits, &seqPlayer->seqData[sp52]); break; - case 0x30: /* switch 2 */ + case 0x30: cmd = func_800146C0(state); seqPlayer->channels[loBits]->seqScriptIO[cmd] = sp4B; break; - case 0x40: /* switch 2 */ + case 0x40: cmd = func_800146C0(state); sp4B = seqPlayer->channels[loBits]->seqScriptIO[cmd]; break; diff --git a/src/audio/audio_synthesis.c b/src/audio/audio_synthesis.c index ebd3f6af..f7705523 100644 --- a/src/audio/audio_synthesis.c +++ b/src/audio/audio_synthesis.c @@ -1,7 +1,9 @@ #include "sys.h" #include "sf64audio_provisional.h" -s32 D_80145D40; +s32 D_80145D40; // unused + +// all of these are part of the DFT-related function f32 D_80145D48[256]; f32 D_80146148[256]; f32 D_80146548[515]; diff --git a/src/audio/audio_thread.c b/src/audio/audio_thread.c index e8c067b9..499cb668 100644 --- a/src/audio/audio_thread.c +++ b/src/audio/audio_thread.c @@ -8,19 +8,19 @@ void AudioThread_SetFadeInTimer(s32 seqPlayId, s32 fadeTime); OSMesgQueue sAudioTaskStartQueue; OSMesgQueue sThreadCmdProcQueue; -OSMesgQueue sAudioUnkQueue; +OSMesgQueue sAudioSpecQueue; OSMesgQueue sAudioResetQueue; AudioCmd gThreadCmdBuffer[256]; OSMesg sAudioTaskStartMsg[1]; OSMesg sThreadCmdProcMsg[4]; -OSMesg sAudioUnkMsg[1]; +OSMesg sAudioSpecMsg[1]; OSMesg sAudioResetMsg[1]; u8 gThreadCmdWritePos = 0; u8 gThreadCmdReadPos = 0; OSMesgQueue* gAudioTaskStartQueue = &sAudioTaskStartQueue; OSMesgQueue* gThreadCmdProcQueue = &sThreadCmdProcQueue; -OSMesgQueue* gAudioUnkQueue = &sAudioUnkQueue; +OSMesgQueue* gAudioSpecQueue = &sAudioSpecQueue; OSMesgQueue* gAudioResetQueue = &sAudioResetQueue; static const char devstr0[] = "DAC:Lost 1 Frame.\n"; @@ -57,7 +57,7 @@ SPTask* AudioThread_CreateTask(void) { if ((gAudioTaskCountQ % gAudioBufferParams.count) != 0) { return gWaitingAudioTask; } - osSendMesg(gAudioTaskStartQueue, (OSMesg) gAudioTaskCountQ, 0); + osSendMesg(gAudioTaskStartQueue, (OSMesg) gAudioTaskCountQ, OS_MESG_NOBLOCK); gAudioTaskIndexQ ^= 1; gCurAiBuffIndex++; gCurAiBuffIndex %= 3; @@ -71,7 +71,7 @@ SPTask* AudioThread_CreateTask(void) { gCurAudioFrameDmaCount = 0; AudioLoad_DecreaseSampleDmaTtls(); AudioLoad_ProcessLoads(gResetStatus); - if (osRecvMesg(gAudioUnkQueue, (OSMesg) &sp38, 0) != -1) { + if (MQ_GET_MESG(gAudioSpecQueue, &sp38)) { if (gResetStatus == 0) { gResetStatus = 5; } @@ -79,7 +79,7 @@ SPTask* AudioThread_CreateTask(void) { } if ((gResetStatus != 0) && (AudioHeap_ResetStep() == 0)) { if (gResetStatus == 0) { - osSendMesg(gAudioResetQueue, (OSMesg) (s32) gAudioSpecId, 0); + osSendMesg(gAudioResetQueue, (OSMesg) (s32) gAudioSpecId, OS_MESG_NOBLOCK); } gWaitingAudioTask = NULL; return NULL; @@ -102,7 +102,7 @@ SPTask* AudioThread_CreateTask(void) { if (gAiBuffLengths[sp4C] > gAudioBufferParams.maxAiBufferLength) { gAiBuffLengths[sp4C] = gAudioBufferParams.maxAiBufferLength; } - while (osRecvMesg(gThreadCmdProcQueue, (OSMesg) &sp34, 0) != -1) { + while (MQ_GET_MESG(gThreadCmdProcQueue, &sp34)) { AudioThread_ProcessCmds(sp34); } gCurAbiCmdBuffer = func_80009B64(gCurAbiCmdBuffer, &sp50, sp40, gAiBuffLengths[sp4C]); @@ -111,7 +111,7 @@ SPTask* AudioThread_CreateTask(void) { sp4C = gAudioTaskIndexQ; - gAudioCurTask->msgQueue = NULL; + gAudioCurTask->mesgQueue = NULL; gAudioCurTask->msg = NULL; task = &gAudioCurTask->task.t; @@ -244,7 +244,7 @@ void AudioThread_InitQueues(void) { gThreadCmdReadPos = 0; osCreateMesgQueue(gAudioTaskStartQueue, sAudioTaskStartMsg, 1); osCreateMesgQueue(gThreadCmdProcQueue, sThreadCmdProcMsg, 4); - osCreateMesgQueue(gAudioUnkQueue, sAudioUnkMsg, 1); + osCreateMesgQueue(gAudioSpecQueue, sAudioSpecMsg, 1); osCreateMesgQueue(gAudioResetQueue, sAudioResetMsg, 1); } @@ -282,7 +282,7 @@ void AudioThread_ScheduleProcessCmds(void) { D_800C7C70 = (u8) (gThreadCmdWritePos - gThreadCmdReadPos + 0x100); } msg = (((gThreadCmdReadPos & 0xFF) << 8) | (gThreadCmdWritePos & 0xFF)); - osSendMesg(gThreadCmdProcQueue, (OSMesg) msg, 0); + osSendMesg(gThreadCmdProcQueue, (OSMesg) msg, OS_MESG_NOBLOCK); gThreadCmdReadPos = gThreadCmdWritePos; } @@ -327,10 +327,10 @@ void AudioThread_ProcessCmds(u32 msg) { player->recalculateVolume = true; } break; - case AUDIOCMD_OP_SEQPLAYER_SET_TEMPO: /* switch 1 */ + case AUDIOCMD_OP_SEQPLAYER_SET_TEMPO: player->tempo = cmd->asInt * 48; break; - case AUDIOCMD_OP_SEQPLAYER_SET_TRANSPOSITION: /* switch 1 */ + case AUDIOCMD_OP_SEQPLAYER_SET_TRANSPOSITION: player->transposition = cmd->asSbyte; break; case 0x46: // AUDIOCMD_OP_SEQPLAYER_SET_IO? @@ -387,45 +387,43 @@ void AudioThread_ProcessCmds(u32 msg) { } u32 AudioThread_GetAsyncLoadStatus(u32* outData) { - u32 sp1C; + u32 loadStatus; - if (osRecvMesg(&gExternalLoadQueue, (OSMesg*) &sp1C, 0) == -1) { + if (!MQ_GET_MESG(&gExternalLoadQueue, &loadStatus)) { *outData = 0; return 0; } - *outData = sp1C & 0xFFFFFF; - return sp1C >> 0x18; + *outData = loadStatus & 0xFFFFFF; + return loadStatus >> 0x18; } u8* AudioThread_GetFontsForSequence(s32 seqId, u32* outNumFonts) { return AudioLoad_GetFontsForSequence(seqId, outNumFonts); } -s32 func_8001ED34(void) { +bool AudioThread_ResetComplete(void) { s32 pad; s32 sp18; - if (osRecvMesg(gAudioResetQueue, (OSMesg*) &sp18, 0) == -1) { - return 0; + if (!MQ_GET_MESG(gAudioResetQueue, &sp18)) { + return false; } if (sp18 != gAudioSpecId) { - return 0; + return false; } - return 1; + return true; } void AudioThread_ResetAudioHeap(s32 specId) { - // clang-format off - s32 m1 = -1;OSMesg sp28;do {} while (osRecvMesg(gAudioResetQueue, &sp28, 0) != m1); - // clang-format on + MQ_CLEAR_QUEUE(gAudioResetQueue); AudioThread_ResetCmdQueue(); - osSendMesg(gAudioUnkQueue, (OSMesg) specId, 0); + osSendMesg(gAudioSpecQueue, (OSMesg) specId, OS_MESG_NOBLOCK); } void AudioThread_PreNMIReset(void) { gResetTimer = 1; - AudioThread_ResetAudioHeap(0); + AudioThread_ResetAudioHeap(AUDIOSPEC_0); gResetStatus = 0; } diff --git a/src/engine/fox_360.c b/src/engine/fox_360.c index 566ab856..b74b9e33 100644 --- a/src/engine/fox_360.c +++ b/src/engine/fox_360.c @@ -62,7 +62,7 @@ s32 gAllRangeSupplyTimer; s32 sStarWolfKillTimer; s16 gStarWolfMsgTimer; s32 gAllRangeWingRepairTimer; -s32 gAllRangeWingRepairSent; +s32 gAllRangeSuppliesSent; f32 gSzMissileR; f32 gSzMissileG; f32 gSzMissileB; @@ -250,7 +250,7 @@ void AllRange_GreatFoxRepair(Player* player) { player->unk_014 = 0; player->unk_018 = 0; player->unk_01C = 0; - gActors[0].state = 2; + gActors[0].state = STATE360_2; } break; } @@ -402,10 +402,10 @@ void ActorAllRange_SpawnTeam(void) { } else { actor->aiIndex = D_360_800C9ADC[i]; } - actor->state = 2; + actor->state = STATE360_2; actor->unk_0F4.y = 180.0f; if (actor->aiIndex <= -1) { - actor->state = 3; + actor->state = STATE360_3; } actor->health = 50; if ((gLevelType == LEVELTYPE_PLANET) || (gCurrentLevel == LEVEL_BOLSE)) { @@ -442,7 +442,7 @@ void ActorAllRange_SpawnStarWolf(void) { actor->health = 100; actor->unk_0C9 = 1; actor->unk_0F4.y = 225.0f; - actor->state = 0; + actor->state = STATE360_0; actor->timer_0BC = 250; actor->unk_0F4.x = -20.0f; actor->iwork[11] = 1; @@ -474,8 +474,8 @@ void ActorAllRange_StarWolfDefeatMesg(u16* msg, RadioCharacterId character) { ActorAllRange_PlayMessage(msg, character); } -void func_360_8002F69C(Actor* actor) { - Actor* otherActor; +void func_360_8002F69C(Actor* this) { + Actor* actor; s32 i; if (sStarWolfKillTimer != 0) { @@ -492,7 +492,7 @@ void func_360_8002F69C(Actor* actor) { } if (gAllRangeEventTimer == D_360_800C9B4C) { ActorAllRange_SpawnStarWolf(); - actor->state = 3; + this->state = STATE360_3; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_STANDBY; if ((gCurrentLevel == LEVEL_VENOM_2) || (gCurrentLevel == LEVEL_BOLSE)) { gPlayer[0].camRoll = 20.0f; @@ -510,56 +510,53 @@ void func_360_8002F69C(Actor* actor) { gPlayer[0].cam.at.y = gActors[4].obj.pos.y; gPlayer[0].cam.at.z = gActors[4].obj.pos.z; } - if (gAllRangeEventTimer > D_360_800C9B4C) { - if (gStarWolfMsgTimer == 0) { - gAllRangeFrameCount++; - for (i = 1, otherActor = &gActors[1]; i < 8; i++, otherActor++) { - 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_ANDREW)) { - gActors[otherActor->aiIndex].iwork[2] = AI360_FOX; - gActors[otherActor->aiIndex].state = 2; - gActors[otherActor->aiIndex].aiIndex = otherActor->aiType; - if (gTeamHelpActor == &gActors[otherActor->aiIndex]) { - gTeamHelpActor = NULL; - gTeamHelpTimer = 0; - } - if (gActors[otherActor->aiIndex].iwork[3] == 0) { - switch (gActors[otherActor->aiIndex].aiType) { - case AI360_FALCO: - ActorAllRange_PlayMessage(gMsg_ID_9160, RCID_FALCO); - break; - case AI360_SLIPPY: - ActorAllRange_PlayMessage(gMsg_ID_9170, RCID_SLIPPY); - break; - case AI360_PEPPY: - ActorAllRange_PlayMessage(gMsg_ID_9180, RCID_PEPPY); - break; - } - gActors[otherActor->aiIndex].iwork[3] = 200; - } + if ((gAllRangeEventTimer > D_360_800C9B4C) && (gStarWolfMsgTimer == 0)) { + gAllRangeFrameCount++; + for (i = 1, actor = &gActors[1]; i < 8; i++, actor++) { + if ((actor->obj.status == OBJ_ACTIVE) && (actor->state == STATE360_2) && (actor->health < 70) && + (actor->timer_0C6 != 0) && (actor->unk_0D4 == 1)) { + if ((gActors[actor->aiIndex].state == STATE360_3) && (gActors[actor->aiIndex].aiType <= AI360_ANDREW)) { + gActors[actor->aiIndex].iwork[2] = AI360_FOX; + gActors[actor->aiIndex].state = STATE360_2; + gActors[actor->aiIndex].aiIndex = actor->aiType; + if (gTeamHelpActor == &gActors[actor->aiIndex]) { + gTeamHelpActor = NULL; + gTeamHelpTimer = 0; } - if (otherActor->aiType == AI360_WOLF) { - if (gCurrentLevel != LEVEL_VENOM_2) { - otherActor->state = STATE360_3; - otherActor->unk_04E = 300; + if (gActors[actor->aiIndex].iwork[3] == 0) { + switch (gActors[actor->aiIndex].aiType) { + case AI360_FALCO: + ActorAllRange_PlayMessage(gMsg_ID_9160, RCID_FALCO); + break; + case AI360_SLIPPY: + ActorAllRange_PlayMessage(gMsg_ID_9170, RCID_SLIPPY); + break; + case AI360_PEPPY: + ActorAllRange_PlayMessage(gMsg_ID_9180, RCID_PEPPY); + break; } - } else { - otherActor->state = STATE360_3; - otherActor->aiIndex = -1; + gActors[actor->aiIndex].iwork[3] = 200; } } + if (actor->aiType == AI360_WOLF) { + if (gCurrentLevel != LEVEL_VENOM_2) { + actor->state = STATE360_3; + actor->unk_04E = 300; + } + } else { + actor->state = STATE360_3; + actor->aiIndex = -1; + } } - if (gTeamShields[TEAM_ID_FALCO] <= 0) { - gActors[AI360_LEON].aiIndex = AI360_FOX; - } - if (gTeamShields[TEAM_ID_SLIPPY] <= 0) { - gActors[AI360_ANDREW].aiIndex = AI360_FOX; - } - if (gTeamShields[TEAM_ID_PEPPY] <= 0) { - gActors[AI360_PIGMA].aiIndex = AI360_FOX; - } + } + if (gTeamShields[TEAM_ID_FALCO] <= 0) { + gActors[AI360_LEON].aiIndex = AI360_FOX; + } + if (gTeamShields[TEAM_ID_SLIPPY] <= 0) { + gActors[AI360_ANDREW].aiIndex = AI360_FOX; + } + if (gTeamShields[TEAM_ID_PEPPY] <= 0) { + gActors[AI360_PIGMA].aiIndex = AI360_FOX; } } } @@ -582,7 +579,7 @@ void func_360_8002FB4C(Actor* actor) { } if (!var_a0) { actor->aiIndex = i; - actor->state = 2; + actor->state = STATE360_2; actor->iwork[2] = AI360_FOX; break; } @@ -590,31 +587,29 @@ void func_360_8002FB4C(Actor* actor) { } } -void func_360_8002FC00(Actor* actor) { - Actor* otherActor; +void func_360_8002FC00(Actor* this) { + Actor* actor; s32 i; - for (i = 0, otherActor = &gActors[10]; i < 50; i++, otherActor++) { - if ((otherActor->obj.status == OBJ_DYING) && (otherActor->aiIndex >= AI360_FALCO) && - (otherActor->aiIndex <= AI360_PEPPY)) { + for (i = 0, actor = &gActors[10]; i < 50; i++, actor++) { + if ((actor->obj.status == OBJ_DYING) && (actor->aiIndex >= AI360_FALCO) && (actor->aiIndex <= AI360_PEPPY)) { Actor* actor2; s32 j; for (j = 0, actor2 = &gActors[10]; j < 51; j++, actor2++) { - if ((actor2->obj.status == OBJ_ACTIVE) && (actor2->state == 2) && - (actor2->aiIndex == otherActor->aiIndex)) { + if ((actor2->obj.status == OBJ_ACTIVE) && (actor2->state == STATE360_2) && + (actor2->aiIndex == actor->aiIndex)) { return; } } - if (gTeamShields[otherActor->aiIndex] > 0) { - func_360_8002FB4C(&gActors[otherActor->aiIndex]); - if ((otherActor->iwork[5] != 0) && (otherActor->unk_0D4 == 1) && - (gActors[otherActor->aiIndex].iwork[3] == 0)) { - if (gTeamHelpActor == &gActors[otherActor->aiIndex]) { + if (gTeamShields[actor->aiIndex] > 0) { + func_360_8002FB4C(&gActors[actor->aiIndex]); + if ((actor->iwork[5] != 0) && (actor->unk_0D4 == 1) && (gActors[actor->aiIndex].iwork[3] == 0)) { + if (gTeamHelpActor == &gActors[actor->aiIndex]) { gTeamHelpActor = NULL; gTeamHelpTimer = 0; } - switch (gActors[otherActor->aiIndex].aiType) { + switch (gActors[actor->aiIndex].aiType) { case AI360_FALCO: ActorAllRange_PlayMessage(gMsg_ID_9160, RCID_FALCO); break; @@ -625,15 +620,15 @@ void func_360_8002FC00(Actor* actor) { ActorAllRange_PlayMessage(gMsg_ID_9180, RCID_PEPPY); break; } - gActors[otherActor->aiIndex].iwork[3] = 200; - gActors[otherActor->aiIndex].timer_0C4 = 600; + gActors[actor->aiIndex].iwork[3] = 200; + gActors[actor->aiIndex].timer_0C4 = 600; } } } } } -bool func_360_8002FE74(void) { +bool AllRange_SupplyEvent(void) { switch (gCurrentLevel) { case LEVEL_FORTUNA: return gAllRangeEventTimer == D_360_800C9B4C + 2400; @@ -650,7 +645,7 @@ void ActorAllRange_SpawnSupplies(Actor* this) { s32 i; if ((gCallTimer != 0) && (gControllerPress[gMainController].button & R_CBUTTONS)) { - func_8001AF40(0); + Audio_SetUnkVoiceParam(0); gCallVoiceParam = 0; gCallTimer = 0; Radio_PlayMessage(gMsg_ID_20230, RCID_ROB64); @@ -682,13 +677,13 @@ void ActorAllRange_SpawnSupplies(Actor* this) { } } } - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && !gAllRangeWingRepairSent) { + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && !gAllRangeSuppliesSent) { if (gAllRangeWingRepairTimer != 0) { gAllRangeWingRepairTimer--; } - if ((gPlayer[0].shields < 64) || func_360_8002FE74() || (gAllRangeWingRepairTimer == 1)) { + if ((gPlayer[0].shields < 64) || AllRange_SupplyEvent() || (gAllRangeWingRepairTimer == 1)) { gCallTimer = 60; - gAllRangeWingRepairSent = true; + gAllRangeSuppliesSent = true; } } } @@ -719,27 +714,27 @@ void ActorAllRange_UpdateEvents(Actor* this) { ActorAllRange_SpawnSupplies(this); } -s32 func_360_800301F4(Actor* actor) { +s32 func_360_800301F4(Actor* this) { Boss* boss; f32 temp_ft4; f32 temp_ft5; s32 i; - f32 sp1C; - f32 sp18; + f32 sinY; + f32 cosY; if (gLevelMode == LEVELMODE_ON_RAILS) { return 0; } - sp1C = SIN_DEG(actor->obj.rot.y); - sp18 = COS_DEG(actor->obj.rot.y); - temp_ft4 = actor->fwork[9] * 10.0f + (sp1C * 650.0f); - temp_ft5 = actor->fwork[9] * 10.0f + (sp18 * 650.0f); + sinY = SIN_DEG(this->obj.rot.y); + cosY = COS_DEG(this->obj.rot.y); + temp_ft4 = this->fwork[9] * 10.0f + (sinY * 650.0f); + temp_ft5 = this->fwork[9] * 10.0f + (cosY * 650.0f); for (i = 0; i < 200; i++) { if ((gScenery360[i].obj.status == OBJ_ACTIVE) && - (fabsf(gScenery360[i].obj.pos.x - (actor->obj.pos.x + temp_ft4)) < 1000.0f) && - (fabsf(gScenery360[i].obj.pos.z - (actor->obj.pos.z + temp_ft5)) < 1000.0f)) { - if (fabsf(gScenery360[i].obj.pos.y - actor->obj.pos.y) < 1000.0f) { - if (gScenery360[i].obj.pos.y < actor->obj.pos.y) { + (fabsf(gScenery360[i].obj.pos.x - (this->obj.pos.x + temp_ft4)) < 1000.0f) && + (fabsf(gScenery360[i].obj.pos.z - (this->obj.pos.z + temp_ft5)) < 1000.0f)) { + if (fabsf(gScenery360[i].obj.pos.y - this->obj.pos.y) < 1000.0f) { + if (gScenery360[i].obj.pos.y < this->obj.pos.y) { return 1; } else { return -1; @@ -748,10 +743,10 @@ s32 func_360_800301F4(Actor* actor) { } } boss = &gBosses[0]; - if ((gCurrentLevel == LEVEL_SECTOR_Z) && (fabsf(boss->obj.pos.x - (actor->obj.pos.x + temp_ft4)) < 2000.0f) && - (fabsf(boss->obj.pos.z - (actor->obj.pos.z + temp_ft5)) < 2000.0f)) { - if (fabsf(boss->obj.pos.y - actor->obj.pos.y) < 1500.0f) { - if (boss->obj.pos.y < actor->obj.pos.y) { + if ((gCurrentLevel == LEVEL_SECTOR_Z) && (fabsf(boss->obj.pos.x - (this->obj.pos.x + temp_ft4)) < 2000.0f) && + (fabsf(boss->obj.pos.z - (this->obj.pos.z + temp_ft5)) < 2000.0f)) { + if (fabsf(boss->obj.pos.y - this->obj.pos.y) < 1500.0f) { + if (boss->obj.pos.y < this->obj.pos.y) { return 1; } else { return -1; @@ -761,7 +756,7 @@ s32 func_360_800301F4(Actor* actor) { return 0; } -s32 func_360_8003049C(Actor* actor) { +s32 func_360_8003049C(Actor* this) { Scenery360* scenery360; s32 i; f32 sp44; @@ -777,25 +772,24 @@ s32 func_360_8003049C(Actor* actor) { return 0; } if ((gLevelType == LEVELTYPE_SPACE) && (gCurrentLevel != LEVEL_BOLSE)) { - return func_360_800301F4(actor); + return func_360_800301F4(this); } - sp40 = SIN_DEG(actor->obj.rot.y); - sp3C = COS_DEG(actor->obj.rot.y); - temp_fa0 = actor->fwork[9] * 10.0f + (sp40 * 650.0f); - temp_ft4 = actor->fwork[9] * 10.0f + (sp3C * 650.0f); + sp40 = SIN_DEG(this->obj.rot.y); + sp3C = COS_DEG(this->obj.rot.y); + temp_fa0 = this->fwork[9] * 10.0f + (sp40 * 650.0f); + temp_ft4 = this->fwork[9] * 10.0f + (sp3C * 650.0f); if (gLevelMode == LEVELMODE_ALL_RANGE) { for (i = 0, scenery360 = gScenery360; i < 200; i++, scenery360++) { if ((scenery360->obj.status == OBJ_ACTIVE) && - (fabsf(scenery360->obj.pos.x - (actor->obj.pos.x + temp_fa0)) < 1200.0f) && - (fabsf(scenery360->obj.pos.z - (actor->obj.pos.z + temp_ft4)) < 1200.0f) && - (actor->obj.pos.y < 650.0f)) { + (fabsf(scenery360->obj.pos.x - (this->obj.pos.x + temp_fa0)) < 1200.0f) && + (fabsf(scenery360->obj.pos.z - (this->obj.pos.z + temp_ft4)) < 1200.0f) && (this->obj.pos.y < 650.0f)) { return 1; } } } sp44 = 1200.0f; var_ft5 = 650.0f; - if (actor->aiType < AI360_KATT) { + if (this->aiType < AI360_KATT) { var_ft5 = 720.0f; } @@ -808,9 +802,9 @@ s32 func_360_8003049C(Actor* actor) { sp44 = 1500.0f; var_ft5 = 700.0f; } - if ((fabsf(boss->obj.pos.x - (actor->obj.pos.x + temp_fa0)) < sp44) && - (fabsf(boss->obj.pos.z - (actor->obj.pos.z + temp_ft4)) < sp44) && - (fabsf(boss->obj.pos.y - actor->obj.pos.y) < var_ft5)) { + if ((fabsf(boss->obj.pos.x - (this->obj.pos.x + temp_fa0)) < sp44) && + (fabsf(boss->obj.pos.z - (this->obj.pos.z + temp_ft4)) < sp44) && + (fabsf(boss->obj.pos.y - this->obj.pos.y) < var_ft5)) { return 1; } return 0; @@ -857,7 +851,7 @@ void ActorAllRange_ApplyDamage(Actor* this) { ((this->aiType != AI360_MISSILE) || (this->unk_0D0 != 2))) { this->health -= this->damage; } - } else if ((this->aiType <= AI360_PEPPY) && (this->state != 6)) { + } else if ((this->aiType <= AI360_PEPPY) && (this->state != STATE360_6)) { if (this->aiType == AI360_FALCO) { gTeamDamage[this->aiType] = this->damage; } else { @@ -1226,42 +1220,42 @@ void ActorAllRange_Update(Actor* this) { ActorAllRange_UpdateEvents(this); return; } - if ((this->iwork[17] != 0) && (this->iwork[16] == 0) && (this->aiType >= AI360_WOLF)) { + if ((this->iwork[17] != 0) && (this->iwork[16] == STATE360_0) && (this->aiType >= AI360_WOLF)) { switch (RAND_INT(3.9f)) { case 0: case 1: if (gCurrentLevel == LEVEL_VENOM_2) { - this->iwork[16] = 10; + this->iwork[16] = STATE360_10; } break; case 2: - this->iwork[16] = 8; + this->iwork[16] = STATE360_8; break; case 3: - this->iwork[16] = 7; + this->iwork[16] = STATE360_7; break; } this->iwork[17] = 0; if (this->iwork[18] != 0) { this->iwork[18]--; - this->iwork[16] = 0; + this->iwork[16] = STATE360_0; } } - if ((this->lockOnTimers[0] != 0) && (gCurrentLevel != LEVEL_VENOM_2) && (this->aiType < AI360_10) && - (this->lockOnTimers[0] < 5) && ((gGameFrameCount % 32) == 0)) { - this->iwork[16] = 10; + if ((this->lockOnTimers[TEAM_ID_FOX] != 0) && (gCurrentLevel != LEVEL_VENOM_2) && (this->aiType < AI360_10) && + (this->lockOnTimers[TEAM_ID_FOX] < 5) && ((gGameFrameCount % 32) == 0)) { + this->iwork[16] = STATE360_10; } - if ((this->iwork[16] != 0) && (this->state < 7)) { + if ((this->iwork[16] != STATE360_0) && (this->state < STATE360_7)) { this->state = this->iwork[16]; switch (this->state) { - case 7: - case 8: + case STATE360_7: + case STATE360_8: if (this->unk_0F4.x > 180.0f) { this->unk_0F4.x -= 360.0f; } this->unk_046 = 0; break; - case 9: + case STATE360_9: this->timer_0BC = RAND_INT(20.0f) + 30; if (Rand_ZeroOne() < 0.5f) { this->fwork[19] = this->obj.rot.y + 50.0f; @@ -1275,7 +1269,7 @@ void ActorAllRange_Update(Actor* this) { this->fwork[19] += 360.0f; } break; - case 10: + case STATE360_10: this->timer_0BC = 35; if (Rand_ZeroOne() < 0.5f) { this->fwork[7] = 360.0f; @@ -1290,7 +1284,7 @@ void ActorAllRange_Update(Actor* this) { break; } } - this->iwork[16] = 0; + this->iwork[16] = STATE360_0; spCC = spC8 = spC4 = 0.0f; if (this->iwork[7] != 0) { this->iwork[7]--; @@ -1352,8 +1346,8 @@ void ActorAllRange_Update(Actor* this) { sp104 = 0; this->iwork[5] = 0; if ((this->aiType > AI360_FOX) && (this->aiType <= AI360_PEPPY) && (gTeamShields[this->aiType] <= 0) && - (this->state != 6)) { - this->state = 6; + (this->state != STATE360_6)) { + this->state = STATE360_6; if (this->timer_0C2 < 100) { gTeamShields[this->aiType] = 1; switch (this->aiType) { @@ -1412,20 +1406,20 @@ void ActorAllRange_Update(Actor* this) { case STATE360_0: if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_START_360) { this->fwork[0] = this->fwork[1] = 40.0f; - if (gActors[0].state == 5) { + if (gActors[0].state == STATE360_5) { Math_SmoothStepToF(&this->unk_0F4.x, 30.0f, 0.1f, 0.5f, 0.0f); this->fwork[1] = 200.0f; } if (this->timer_0BC == 0) { if (this->aiType == AI360_WOLF) { - this->state = 3; + this->state = STATE360_3; if (gCurrentLevel == LEVEL_VENOM_2) { this->unk_04E = 200; } else { this->unk_04E = 200; } } else { - this->state = 2; + this->state = STATE360_2; if (this->aiType == AI360_KATT) { this->fwork[7] = 360.0f; this->fwork[8] = 0.0f; @@ -1441,9 +1435,9 @@ void ActorAllRange_Update(Actor* this) { Math_SmoothStepToF(&this->unk_0F4.x, 15.0f, 0.1f, 1.0f, 0.0f); } if (this->timer_0BC == 0) { - this->state = 3; + this->state = STATE360_3; if ((gCurrentLevel == LEVEL_BOLSE) && (this->aiIndex > -1)) { - this->state = 2; + this->state = STATE360_2; } } break; @@ -1464,7 +1458,7 @@ void ActorAllRange_Update(Actor* this) { spF0 = 0.2f; } if (this->aiIndex <= -1) { - this->state = 3; + this->state = STATE360_3; } else { if (gActors[this->aiIndex].aiType == AI360_MISSILE) { spF0 = 0.8f; @@ -1475,7 +1469,7 @@ void ActorAllRange_Update(Actor* this) { if (gCurrentLevel != LEVEL_VENOM_2) { if ((gPlayer[0].somersault && (this->iwork[4] > 10)) || ((gCurrentLevel == LEVEL_BOLSE) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY))) { - this->state = 3; + this->state = STATE360_3; this->unk_04E = 300; this->timer_0BC = 160; if (this->aiType == AI360_WOLF) { @@ -1488,7 +1482,7 @@ void ActorAllRange_Update(Actor* this) { } } if ((this->aiType >= AI360_WOLF) && (this->aiType != AI360_KATT) && - ((gCurrentLevel != LEVEL_VENOM_2) || (this->aiType != AI360_WOLF))) { + !((gCurrentLevel == LEVEL_VENOM_2) && (this->aiType == AI360_WOLF))) { spCC = SIN_DEG((this->index * 45) + gGameFrameCount) * 100.0f; spC8 = COS_DEG((this->index * 45) + (gGameFrameCount * 2)) * 100.0f; spC4 = SIN_DEG((this->index * 45) + gGameFrameCount) * 100.0f; @@ -1499,7 +1493,7 @@ void ActorAllRange_Update(Actor* this) { this->fwork[6] = gPlayer[0].unk_138 + spC4; this->fwork[1] = gPlayer[0].unk_0D0 + 10.0f; } - if ((gActors[0].state == 6) && (this->aiType <= AI360_PEPPY)) { + if ((gActors[0].state == STATE360_6) && (this->aiType <= AI360_PEPPY)) { this->fwork[3] = 3.0f; this->fwork[1] = gPlayer[0].unk_0D0 - 5.0f; this->iwork[11] = 2; @@ -1545,7 +1539,7 @@ void ActorAllRange_Update(Actor* this) { this->fwork[6] = gBosses[0].obj.pos.z; this->fwork[1] = 40.0f; } - if ((this->aiIndex > -1) && (this->aiIndex != AI360_GREAT_FOX) && (gActors[0].state != 6)) { + if ((this->aiIndex > -1) && (this->aiIndex != AI360_GREAT_FOX) && (gActors[0].state != STATE360_6)) { if (spE8 < spF8) { if (spEC < spF8) { if (this->aiIndex != AI360_FOX) { @@ -1554,7 +1548,7 @@ void ActorAllRange_Update(Actor* this) { this->fwork[1] = gPlayer[0].unk_0D0 - 5.0f; if ((gCurrentLevel == LEVEL_VENOM_2) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN) && (gPlayer[0].unk_4D8 > 100.0f)) { - this->iwork[16] = 8; + this->iwork[16] = STATE360_8; } } } @@ -1752,10 +1746,10 @@ void ActorAllRange_Update(Actor* this) { } else { this->iwork[4] = 0; } - if ((this->aiIndex >= AI360_FALCO) && - ((gActors[this->aiIndex].obj.status == OBJ_DYING) || (gActors[this->aiIndex].state == 6) || - (gActors[this->aiIndex].obj.status == OBJ_FREE))) { - this->state = 3; + if ((this->aiIndex >= AI360_FALCO) && ((gActors[this->aiIndex].obj.status == OBJ_DYING) || + (gActors[this->aiIndex].state == STATE360_6) || + (gActors[this->aiIndex].obj.status == OBJ_FREE))) { + this->state = STATE360_3; if (gCurrentLevel == LEVEL_BOLSE) { func_360_8002FB4C(this); } @@ -1783,7 +1777,7 @@ void ActorAllRange_Update(Actor* this) { this->fwork[3] = 1.0f; this->fwork[1] = 38.0f; } - if ((gCurrentLevel == LEVEL_SECTOR_Z) && (gActors[0].state == 10)) { + if ((gCurrentLevel == LEVEL_SECTOR_Z) && (gActors[0].state == STATE360_10)) { this->fwork[10] = 30.0f; } if ((gLevelType == LEVELTYPE_SPACE) && (gCurrentLevel != LEVEL_BOLSE)) { @@ -1823,7 +1817,7 @@ void ActorAllRange_Update(Actor* this) { } if ((this->aiIndex >= AI360_FALCO) && (gActors[this->aiIndex].obj.id == OBJ_ACTOR_ALLRANGE) && (gActors[this->aiIndex].timer_0C2 == 0) && (gActors[this->aiIndex].obj.status == OBJ_ACTIVE)) { - this->state = 2; + this->state = STATE360_2; this->iwork[2] = AI360_FOX; } if (this->aiIndex == AI360_FOX) { @@ -1831,7 +1825,7 @@ void ActorAllRange_Update(Actor* this) { this->unk_04E--; } if (this->unk_04E == 0) { - this->state = 2; + this->state = STATE360_2; this->iwork[2] = AI360_FOX; } } @@ -1841,7 +1835,7 @@ void ActorAllRange_Update(Actor* this) { Math_SmoothStepToF(&this->unk_0F4.x, 360.0f, 0.1f, 5.0f, 0.0001f); Math_SmoothStepToAngle(&this->obj.rot.z, 0.0f, 0.1f, 3.0f, 0.01f); if (this->unk_0F4.x > 350.0f) { - this->state = 3; + this->state = STATE360_3; } break; case STATE360_8: @@ -1871,7 +1865,7 @@ void ActorAllRange_Update(Actor* this) { break; case 1: if (this->timer_0BC == 0) { - this->state = 3; + this->state = STATE360_3; } break; } @@ -1885,13 +1879,13 @@ void ActorAllRange_Update(Actor* this) { } Math_SmoothStepToAngle(&this->obj.rot.z, spD0, 0.1f, 15.0f, 0.01f); if (this->timer_0BC == 0) { - this->state = 3; + this->state = STATE360_3; } break; case STATE360_10: sp104 = 1; if (this->timer_0BC == 0) { - this->state = 3; + this->state = STATE360_3; } if (this->timer_0BC > 20) { Math_SmoothStepToF(&this->fwork[23], 180.0f, 1.0f, 60.0f, 0.0f); @@ -1899,14 +1893,14 @@ void ActorAllRange_Update(Actor* this) { break; } if (sp104 != 0) { - s32 var_v0 = 3; + s32 var_v0 = 4 - 1; spE4 = this->fwork[4] - this->obj.pos.x; spE0 = this->fwork[5] - this->obj.pos.y; spDC = this->fwork[6] - this->obj.pos.z; if (gCurrentLevel == LEVEL_VENOM_2) { - var_v0 = 1; + var_v0 = 2 - 1; } if (!((this->index + gGameFrameCount) & var_v0)) { this->fwork[19] = Math_RadToDeg(Math_Atan2F(spE4, spDC)); @@ -1956,7 +1950,7 @@ void ActorAllRange_Update(Actor* this) { } if ((this->fwork[7] > 0.01f) && (this->fwork[7] < 359.9f)) { if ((((gGameFrameCount + 15) % 32) == 0) && (gCurrentLevel != LEVEL_VENOM_2)) { - this->lockOnTimers[0] = 0; + this->lockOnTimers[TEAM_ID_FOX] = 0; } } else { Math_SmoothStepToAngle(&this->obj.rot.z, spD0, 0.1f, 3.0f, 0.01f); @@ -1977,7 +1971,6 @@ void ActorAllRange_Update(Actor* this) { Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); spA8.x = 0.0f; spA8.y = 70.0f; - spA8.z = -70.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &spA8, &sp9C); func_effect_80078E50(this->obj.pos.x + sp9C.x, this->obj.pos.y + sp9C.y, this->obj.pos.z + sp9C.z, diff --git a/src/engine/fox_A48A0.c b/src/engine/fox_A48A0.c index 01036834..677cf218 100644 --- a/src/engine/fox_A48A0.c +++ b/src/engine/fox_A48A0.c @@ -31,7 +31,7 @@ void func_800A3E00(void) { break; case 2: if ((gControllerPress[0].button & START_BUTTON) || (gControllerPress[1].button & START_BUTTON)) { - func_8001D638(0); + Audio_PlayPauseSfx(0); D_ctx_80177868 = 3; gDrawMode = DRAW_NONE; Play_Setup(); diff --git a/src/engine/fox_beam.c b/src/engine/fox_beam.c index 98ba98d2..fb588b6e 100644 --- a/src/engine/fox_beam.c +++ b/src/engine/fox_beam.c @@ -56,7 +56,7 @@ void func_beam_80035E78(PlayerShot* shot) { shot->unk_5C = 1; shot->unk_64 = 30; shot->unk_58 = 150; - func_8001CE28(shot->playerNum, shot->sfxSource); + Audio_PlayBombExplodeSfx(shot->playerNum, shot->sfxSource); gScreenFlashTimer = 4; if (shot->obj.pos.y < (gGroundHeight + 450.0f)) { gCameraShake = 15; diff --git a/src/engine/fox_bg.c b/src/engine/fox_bg.c index d185de70..b78a0593 100644 --- a/src/engine/fox_bg.c +++ b/src/engine/fox_bg.c @@ -611,7 +611,7 @@ void Background_DrawBackdrop(void) { break; case LEVEL_FORTUNA: sp128 = 1.5f; - if ((gCsFrameCount > 400) && (gNextPlanetPath == 0)) { + if ((gCsFrameCount > 400) && (gMissionStatus == MISSION_COMPLETE)) { sp128 = 0.75f; } Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, MTXF_APPLY); diff --git a/src/engine/fox_context.c b/src/engine/fox_context.c index 7434822e..b56f03d7 100644 --- a/src/engine/fox_context.c +++ b/src/engine/fox_context.c @@ -22,7 +22,7 @@ s32 gTeamShields[6]; s32 gSavedTeamShields[6]; s32 gPrevPlanetSavedTeamShields[6]; s32 gTeamDamage[6]; -u8 gNextPlanetPath; // next planet path +u8 gMissionStatus; // next planet path f32 gGroundHeight; f32 D_ctx_80177950; f32 D_ctx_80177968; @@ -45,11 +45,11 @@ u8 gAqDrawMode; s32 D_ctx_80177AE0; s32 gMainController; s32 D_ctx_80177B40; -s32 gMissionNumber; // D_ctx_80177B48 // Arrow pointer? -s32 D_ctx_80177B50[7]; -s32 D_ctx_80177B70[7]; -PlanetId D_ctx_80177B90[7]; -s32 D_ctx_80177BB0[7]; +s32 gMissionNumber; +s32 gMissionTeamStatus[7]; +s32 gMissionHitCount[7]; +PlanetId gMissionPlanet[7]; +s32 gMissionMedal[7]; #ifdef AVOID_UB s32 gPlanetPathStatus[24]; #else @@ -93,7 +93,7 @@ s32 gRadioState; s32 D_ctx_801782A4; s32 D_Timer_801782AC; s32 D_Timer_801782B4; -u8 D_play_800D3180[30] = { +u8 gLeveLClearStatus[30] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; s32 D_ctx_801782C0; diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index e4035b99..b2a2da19 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -292,11 +292,11 @@ void Cutscene_WarpZoneComplete(Player* player) { player->timer_1F8 = 0; gFadeoutType = 4; if (gCurrentLevel == LEVEL_METEO) { - D_play_800D3180[LEVEL_METEO] = Play_CheckMedalStatus(200) + 1; + gLeveLClearStatus[LEVEL_METEO] = Play_CheckMedalStatus(200) + 1; } else { - D_play_800D3180[LEVEL_SECTOR_X] = Play_CheckMedalStatus(150) + 1; + gLeveLClearStatus[LEVEL_SECTOR_X] = Play_CheckMedalStatus(150) + 1; } - gNextPlanetPath = 2; + gMissionStatus = MISSION_WARP; } } } else { @@ -1290,7 +1290,7 @@ void Cutscene_CoComplete2(Player* player) { player->timer_1F8 = 0; gFadeoutType = 4; Audio_FadeOutAll(10); - D_play_800D3180[gCurrentLevel] = Play_CheckMedalStatus(150) + 1; + gLeveLClearStatus[gCurrentLevel] = Play_CheckMedalStatus(150) + 1; } break; } @@ -1422,7 +1422,7 @@ void Cutscene_LevelComplete(Player* player) { if (gCurrentLevel == LEVEL_TITANIA) { Titania_LevelComplete(player); - } else if (gNextPlanetPath != 0) { + } else if (gMissionStatus != MISSION_COMPLETE) { Macbeth_LevelComplete2(player); } else { Macbeth_LevelComplete1(player); @@ -1610,7 +1610,7 @@ void Cutscene_DropVsItem(Player* player, ObjectId itemId, Item* item) { void Cutscene_KillPlayer(Player* player) { s32 teamId; - func_8001CA24(player->num); + Audio_StopPlayerNoise(player->num); Audio_KillSfxBySourceAndId(player->sfxSource, 0x0900C010); func_play_800A5FA0(player->sfxSource, 0x0903F004, player->num); player->state_1C8 = PLAYERSTATE_1C8_NEXT; diff --git a/src/engine/fox_edisplay.c b/src/engine/fox_edisplay.c index c6218e05..2815176a 100644 --- a/src/engine/fox_edisplay.c +++ b/src/engine/fox_edisplay.c @@ -1026,11 +1026,11 @@ void Actor_DrawOnRails(Actor* this) { Matrix_MultVec3f(gGfxMatrix, &sp34, &gTeamArrowsViewPos[this->aiType]); } } - if ((this->lockOnTimers[0] != 0) && (gReflectY > 0)) { + if ((this->lockOnTimers[TEAM_ID_FOX] != 0) && (gReflectY > 0)) { sp34.y += this->info.unk_1C; Matrix_MultVec3f(gGfxMatrix, &sp34, &D_display_80161578[0]); if (D_display_80161578[0].z > -200.0f) { - this->lockOnTimers[0] = 0; + this->lockOnTimers[TEAM_ID_FOX] = 0; } } } diff --git a/src/engine/fox_enmy.c b/src/engine/fox_enmy.c index a277bb15..26bcc7eb 100644 --- a/src/engine/fox_enmy.c +++ b/src/engine/fox_enmy.c @@ -2286,8 +2286,8 @@ void ItemMeteoWarp_Update(ItemMeteoWarp* this) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ENTER_WARP_ZONE; gPlayer[0].unk_1D0 = 0; AUDIO_PLAY_SFX(0x1900602A, gDefaultSfxSource, 0); - gNextPlanetPath = 2; - D_play_800D3180[gCurrentLevel] = 1; + gMissionStatus = MISSION_WARP; + gLeveLClearStatus[gCurrentLevel] = 1; } } } @@ -2642,9 +2642,9 @@ void Actor_Update(Actor* this) { gChargeTimers[i] = 0; } } - } else if (this->lockOnTimers[0] != 0) { + } else if (this->lockOnTimers[TEAM_ID_FOX] != 0) { if (!(gControllerHold[gMainController].button & A_BUTTON)) { - this->lockOnTimers[0]--; + this->lockOnTimers[TEAM_ID_FOX]--; } gChargeTimers[0] = 0; } diff --git a/src/engine/fox_enmy2.c b/src/engine/fox_enmy2.c index c303222f..9980eaa5 100644 --- a/src/engine/fox_enmy2.c +++ b/src/engine/fox_enmy2.c @@ -307,11 +307,11 @@ void Actor194_8006B46C(Actor194* this, f32 xTrans, f32 yTrans, f32 zTrans, f32 x if (arg7 != 1) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); - if ((arg7 == 0) && (this->lockOnTimers[0] != 0)) { + if ((arg7 == 0) && (this->lockOnTimers[TEAM_ID_FOX] != 0)) { sp34.y += this->info.unk_1C; Matrix_MultVec3f(gGfxMatrix, &sp34, D_display_80161578); if (D_display_80161578->z > -500.0f) { - this->lockOnTimers[0] = 0; + this->lockOnTimers[TEAM_ID_FOX] = 0; } } } else { @@ -1265,7 +1265,7 @@ void ActorEvent_ProcessScript(ActorEvent* this) { break; case EV_OPC(EVOP_SET_REVERB): - Audio_SetBaseSfxReverb(actorScript[this->aiIndex + 1]); + Audio_SetEnvSfxReverb(actorScript[this->aiIndex + 1]); this->aiIndex += 2; ActorEvent_ProcessScript(this); break; @@ -2626,7 +2626,7 @@ void ActorEvent_ProcessTriggers(ActorEvent* this) { case EVC_PRESS_CRIGHT: if (gControllerPress[gMainController].button & R_CBUTTONS) { - func_8001AF40(0); + Audio_SetUnkVoiceParam(0); gCallVoiceParam = 0; gCallTimer = 0; ActorEvent_TriggerBranch(this); @@ -2640,79 +2640,79 @@ void ActorEvent_ProcessTriggers(ActorEvent* this) { break; case EVC_ME_CLEAR: - if (D_play_800D3180[LEVEL_METEO] != 0) { + if (gLeveLClearStatus[LEVEL_METEO] != 0) { ActorEvent_TriggerBranch(this); } break; case EVC_FO_CLEAR: - if (D_play_800D3180[LEVEL_FORTUNA] != 0) { + if (gLeveLClearStatus[LEVEL_FORTUNA] != 0) { ActorEvent_TriggerBranch(this); } break; case EVC_SX_CLEAR: - if (D_play_800D3180[LEVEL_SECTOR_X] != 0) { + if (gLeveLClearStatus[LEVEL_SECTOR_X] != 0) { ActorEvent_TriggerBranch(this); } break; case EVC_TI_CLEAR: - if (D_play_800D3180[LEVEL_TITANIA] != 0) { + if (gLeveLClearStatus[LEVEL_TITANIA] != 0) { ActorEvent_TriggerBranch(this); } break; case EVC_BO_CLEAR: - if (D_play_800D3180[LEVEL_BOLSE] != 0) { + if (gLeveLClearStatus[LEVEL_BOLSE] != 0) { ActorEvent_TriggerBranch(this); } break; case EVC_SY_CLEAR: - if (D_play_800D3180[LEVEL_SECTOR_Y] != 0) { + if (gLeveLClearStatus[LEVEL_SECTOR_Y] != 0) { ActorEvent_TriggerBranch(this); } break; case EVC_KA_CLEAR: - if (D_play_800D3180[LEVEL_KATINA] != 0) { + if (gLeveLClearStatus[LEVEL_KATINA] != 0) { ActorEvent_TriggerBranch(this); } break; case EVC_SO_CLEAR: - if (D_play_800D3180[LEVEL_SOLAR] != 0) { + if (gLeveLClearStatus[LEVEL_SOLAR] != 0) { ActorEvent_TriggerBranch(this); } break; case EVC_MA_CLEAR: - if (D_play_800D3180[LEVEL_MACBETH] != 0) { + if (gLeveLClearStatus[LEVEL_MACBETH] != 0) { ActorEvent_TriggerBranch(this); } break; case EVC_AQ_CLEAR: - if (D_play_800D3180[LEVEL_AQUAS] != 0) { + if (gLeveLClearStatus[LEVEL_AQUAS] != 0) { ActorEvent_TriggerBranch(this); } break; case EVC_ZO_CLEAR: - if (D_play_800D3180[LEVEL_ZONESS] != 0) { + if (gLeveLClearStatus[LEVEL_ZONESS] != 0) { ActorEvent_TriggerBranch(this); } break; case EVC_SZ_CLEAR: - if (D_play_800D3180[LEVEL_SECTOR_Z] != 0) { + if (gLeveLClearStatus[LEVEL_SECTOR_Z] != 0) { ActorEvent_TriggerBranch(this); } break; case EVC_A6_CLEAR: - if (D_play_800D3180[LEVEL_AREA_6] != 0) { + if (gLeveLClearStatus[LEVEL_AREA_6] != 0) { ActorEvent_TriggerBranch(this); } break; diff --git a/src/engine/fox_game.c b/src/engine/fox_game.c index 389eb086..20167e46 100644 --- a/src/engine/fox_game.c +++ b/src/engine/fox_game.c @@ -115,7 +115,7 @@ void Game_SetGameState(void) { gBlurAlpha = 255; gDrawMode = DRAW_NONE; Audio_ClearVoice(); - Audio_SetBaseSfxReverb(0); + Audio_SetEnvSfxReverb(0); } bool Game_ChangeScene(void) { @@ -413,7 +413,7 @@ void Game_Update(void) { D_ctx_801778A4 = 3; gBlurAlpha = 255; for (i = 0; i < 30; i++) { - D_play_800D3180[i] = 0; + gLeveLClearStatus[i] = 0; } gExpertMode = false; gOptionSoundMode = gSaveFile.save.data.soundMode; diff --git a/src/engine/fox_hud.c b/src/engine/fox_hud.c index 03affb02..96eb29fc 100644 --- a/src/engine/fox_hud.c +++ b/src/engine/fox_hud.c @@ -759,7 +759,7 @@ void func_hud_80086DCC(void) { gLevelClearScreenTimer--; } - boolTemp = gNextPlanetPath; + boolTemp = gMissionStatus; if ((gCurrentLevel == LEVEL_TITANIA) || (gCurrentLevel == LEVEL_BOLSE) || (gCurrentLevel == LEVEL_VENOM_1) || (gCurrentLevel == LEVEL_VENOM_2) || (gCurrentLevel == LEVEL_AREA_6) || (gCurrentLevel == LEVEL_AQUAS) || @@ -1258,14 +1258,14 @@ void func_hud_800884E4(void) { s32 mask; s32 i; - D_ctx_80177B70[gMissionNumber] = gHitCount; + gMissionHitCount[gMissionNumber] = gHitCount; mask = 0x00FF0000; for (i = 0; i < 3; i++) { if (gTeamShields[3 - i] <= 0) { - D_ctx_80177B50[gMissionNumber] ^= mask; + gMissionTeamStatus[gMissionNumber] ^= mask; } else { - D_ctx_80177B50[gMissionNumber] |= mask; + gMissionTeamStatus[gMissionNumber] |= mask; } mask >>= 8; } @@ -1289,8 +1289,8 @@ void func_hud_80088564(void) { gSaveFile.save.data.planet[planetId].normalClear = 1; } - if (D_play_800D3180[gCurrentLevel] == 2) { - D_ctx_80177BB0[gMissionNumber] = 1; + if (gLeveLClearStatus[gCurrentLevel] == 2) { + gMissionMedal[gMissionNumber] = 1; if (gExpertMode) { gSaveFile.save.data.planet[planetId].expertMedal = 1; @@ -1456,7 +1456,7 @@ void func_hud_80088970(void) { break; } - func_8001CA24(gPlayer[0].num); + Audio_StopPlayerNoise(gPlayer[0].num); Audio_ClearVoice(); gRadioState = 0; @@ -1496,7 +1496,7 @@ void func_hud_80088970(void) { if (gFillScreenAlpha == 0) { if (gLevelType == LEVELTYPE_PLANET) { if (D_80161838[1] == 0) { - func_8001D520(); + Audio_PlayDeathSequence(); } if (D_80161838[1] == 10) { gLifeCount[gPlayerNum]--; @@ -1509,7 +1509,7 @@ void func_hud_80088970(void) { } } else { if (D_80161838[1] == 0) { - func_8001D520(); + Audio_PlayDeathSequence(); } if (D_80161838[1] == 6) { gLifeCount[gPlayerNum]--; @@ -1564,7 +1564,7 @@ void func_hud_80088970(void) { gSavedHitCount = D_ctx_80177CA0 = 0; - func_8001CA24(0); + Audio_StopPlayerNoise(0); gPlayer[0].state_1C8 = PLAYERSTATE_1C8_NEXT; gScreenFlashTimer = 0; gPlayer[0].timer_1F8 = 0; @@ -1576,7 +1576,7 @@ void func_hud_80088970(void) { break; case 10: - func_8001D638(0); + Audio_PlayPauseSfx(0); gDrawMode = DRAW_PLAY; gPlayState = PLAY_UPDATE; break; @@ -2252,7 +2252,7 @@ void func_hud_8008B044(void) { AUDIO_PLAY_SFX(0x49002018, gDefaultSfxSource, 4); if (gCallVoiceParam != 0) { - func_8001AF40(1); + Audio_SetUnkVoiceParam(1); } D_80161794 = 0; D_80161798 = 1; @@ -5861,7 +5861,7 @@ void HUD_AquasComplete(Player* player) { gFillScreenAlphaStep = 16; if (gFillScreenAlpha == 255) { - D_play_800D3180[LEVEL_AQUAS] = Play_CheckMedalStatus(150) + 1; + gLeveLClearStatus[LEVEL_AQUAS] = Play_CheckMedalStatus(150) + 1; player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; Audio_FadeOutAll(10); diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index 8f424900..c81521e5 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -497,7 +497,7 @@ void func_play_800A594C(void) { } if (D_ctx_8017782C == 0) { if (gCurrentLevel == LEVEL_SOLAR) { - func_8001D1C8(255, 1); + Audio_SetHeatAlarmParams(255, 1); AUDIO_PLAY_SFX(0x4100C023, gDefaultSfxSource, 4); Audio_KillSfxBySourceAndId(gPlayer[0].sfxSource, 0x3140807E); } @@ -2393,7 +2393,7 @@ void func_play_800AB334(void) { break; case LEVEL_VENOM_ANDROSS: AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_15); - Audio_SetBaseSfxReverb(0); + Audio_SetEnvSfxReverb(0); D_ctx_8017796C = -1; break; } @@ -2562,7 +2562,7 @@ void Play_Init(void) { Audio_KillSfxById(0x49000014); Memory_FreeAll(); D_ctx_80177C78 = D_ctx_80177C8C = gShowBossHealth = gStarWolfMsgTimer = gAllRangeWingRepairTimer = - gAllRangeWingRepairSent = 0; + gAllRangeSuppliesSent = 0; D_display_800CA220 = 0; gShowLevelClearStatusScreen = 0; if (gCurrentLevel != LEVEL_VERSUS) { @@ -2589,10 +2589,10 @@ void Play_Init(void) { func_play_800A594C(); gDropHitCountItem = D_ctx_8017796C = gStartAndrossFightTimer = gSoShieldsEmpty = gAllRangeEventTimer = gAllRangeFrameCount = gBossActive = gGameFrameCount = gCameraShake = D_ctx_801782FC = gBossFrameCount = - gCallTimer = gAllRangeSupplyTimer = gNextPlanetPath = 0; + gCallTimer = gAllRangeSupplyTimer = gMissionStatus = 0; if (gCurrentLevel == LEVEL_SECTOR_X) { - gNextPlanetPath = 1; + gMissionStatus = MISSION_ACCOMPLISHED; } D_ctx_80177CC0 = -25000.0f; D_ctx_80177950 = 1.0f; @@ -2893,8 +2893,8 @@ void func_play_800ACC7C(Player* player) { } gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1].unk_48 = 30.0f; gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1].unk_60 = 0; - func_8001CB80(player->num, 1); - func_8001CCDC(player->num, gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1].sfxSource); + Audio_InitBombSfx(player->num, 1); + Audio_PlayBombFlightSfx(player->num, gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1].sfxSource); } } @@ -3074,8 +3074,8 @@ bool func_play_800AD1F4(Player* player) { } gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1].unk_48 = 30.0f; gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1].unk_60 = 0; - func_8001CB80(player->num, 1); - func_8001CCDC(player->num, gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1].sfxSource); + Audio_InitBombSfx(player->num, 1); + Audio_PlayBombFlightSfx(player->num, gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1].sfxSource); return true; } } @@ -4283,7 +4283,7 @@ void func_play_800B0F50(Player* playerx) { player->unk_018 = 1.0f; } if ((D_ctx_8017782C != 0) && (D_ctx_80177CA0 == 0)) { - D_play_800D3180[gCurrentLevel] = 0; + gLeveLClearStatus[gCurrentLevel] = 0; for (j = 0; j < 10; j++) { D_ctx_80177A10[j] = 0; D_ctx_80177A48[j] = 0.0f; @@ -5107,7 +5107,7 @@ void func_play_800B41EC(Player* player) { if (gCurrentLevel == LEVEL_SOLAR) { Audio_KillSfxById(0x4100C023); } - func_8001CA24(player->num); + Audio_StopPlayerNoise(player->num); func_play_800A5FA0(player->sfxSource, 0x0900C010, player->num); player->shields = 0; player->unk_1D0 = 0; @@ -5521,7 +5521,7 @@ void Player_Update(Player* player) { gPlayerGlareAlphas[0] = 0; gShowAllRangeCountdown = gRadioState = 0; Audio_ClearVoice(); - Audio_SetBaseSfxReverb(0); + Audio_SetEnvSfxReverb(0); D_ctx_80161A94[0] = gGoldRingCount[0]; if (gCurrentLevel == LEVEL_VENOM_ANDROSS) { D_ctx_80177C94 = gGoldRingCount[0]; @@ -6205,8 +6205,8 @@ void Play_UpdateLevel(void) { gPlayer[0].unk_1D0 = 0; gSceneSetup = 1; AUDIO_PLAY_SFX(0x1900602A, gDefaultSfxSource, 0); - gNextPlanetPath = 2; - D_play_800D3180[gCurrentLevel] = 1; + gMissionStatus = MISSION_WARP; + gLeveLClearStatus[gCurrentLevel] = 1; } break; case LEVEL_CORNERIA: @@ -6268,7 +6268,7 @@ void Play_UpdateLevel(void) { } } shields = MIN(gPlayer[0].shields, 255); - func_8001D1C8(shields, heightParam); + Audio_SetHeatAlarmParams(shields, heightParam); if (((gGameFrameCount % 8) == 0) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) { Solar_8019E8B8(RAND_FLOAT_CENTERED(6000.0f), -80.0f, gPlayer[0].unk_138 + (RAND_FLOAT(2000.0f) + -6000.0f), @@ -6448,11 +6448,11 @@ void Play_Main(void) { (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && gSaveFile.save.data.planet[D_800D2F6C[gCurrentLevel]].normalClear) { Audio_ClearVoice(); - Audio_SetBaseSfxReverb(0); + Audio_SetEnvSfxReverb(0); Play_ClearObjectData(); for (i = 0; i < gCamCount; i++) { Audio_KillSfxBySource(gPlayer[i].sfxSource); - func_8001CA24(i); + Audio_StopPlayerNoise(i); } gPlayState = PLAY_INIT; gDrawMode = gVersusMode = 0; @@ -6465,7 +6465,7 @@ void Play_Main(void) { func_versus_800C1E9C(); } if ((gControllerPress[gMainController].button & START_BUTTON) && gPauseEnabled) { - func_8001D638(1); + Audio_PlayPauseSfx(1); gPlayState = PLAY_PAUSE; D_ctx_80177868 = 4; D_ctx_80178484 = 100000; @@ -6494,7 +6494,7 @@ void Play_Main(void) { } if ((D_ctx_80177868 == 4) && (gControllerPress[gMainController].button & START_BUTTON) && (gPauseEnabled != 0)) { - func_8001D638(0); + Audio_PlayPauseSfx(0); gPlayState = PLAY_UPDATE; gDrawMode = DRAW_PLAY; } diff --git a/src/engine/fox_save.c b/src/engine/fox_save.c index 086e2d12..c6a88897 100644 --- a/src/engine/fox_save.c +++ b/src/engine/fox_save.c @@ -44,8 +44,8 @@ s32 Save_Write(void) { gSaveFile.save.checksum = Save_Checksum(&gSaveFile.save); gSaveFile.backup = gSaveFile.save; gSaveIOBuffer = gSaveFile; - osSendMesg(&gSerialThreadMsgQueue, (OSMesg) SI_WRITE_SAVE, OS_MESG_PRI_NORMAL); - osRecvMesg(&gSaveMsgQueue, &sp1C, OS_MESG_BLOCK); + osSendMesg(&gSerialThreadMesgQueue, (OSMesg) SI_WRITE_SAVE, OS_MESG_NOBLOCK); + MQ_WAIT_FOR_MESG(&gSaveMesgQueue, &sp1C); if (sp1C != (OSMesg) SI_SAVE_SUCCESS) { return -1; } @@ -56,8 +56,8 @@ s32 Save_Read(void) { OSMesg sp24; s32 i; - osSendMesg(&gSerialThreadMsgQueue, (OSMesg) SI_READ_SAVE, OS_MESG_PRI_NORMAL); - osRecvMesg(&gSaveMsgQueue, &sp24, OS_MESG_BLOCK); + osSendMesg(&gSerialThreadMesgQueue, (OSMesg) SI_READ_SAVE, OS_MESG_NOBLOCK); + MQ_WAIT_FOR_MESG(&gSaveMesgQueue, &sp24); if ((s32) sp24 != SI_SAVE_SUCCESS) { return -1; } diff --git a/src/engine/fox_versus.c b/src/engine/fox_versus.c index 6340a806..1ed295c9 100644 --- a/src/engine/fox_versus.c +++ b/src/engine/fox_versus.c @@ -56,7 +56,7 @@ void func_versus_800BC760(void) { for (i = 0; i < gCamCount; i++) { Audio_KillSfxBySource(gPlayer[i].sfxSource); - func_8001CA24(i); + Audio_StopPlayerNoise(i); } gGameState = GSTATE_INIT; diff --git a/src/libultra/io/pfsgetstatus.c b/src/libultra/io/pfsgetstatus.c index 8c8ab37d..a07f1874 100644 --- a/src/libultra/io/pfsgetstatus.c +++ b/src/libultra/io/pfsgetstatus.c @@ -8,11 +8,11 @@ s32 __osPfsGetStatus(OSMesgQueue* queue, int channel) { u8 pattern; OSContStatus status[4]; - __osPfsRequestData(0); - ret = __osSiRawStartDma(1, &__osPfsPifRam); - osRecvMesg(queue, &dummy, 1); - ret = __osSiRawStartDma(0, &__osPfsPifRam); - osRecvMesg(queue, &dummy, 1); + __osPfsRequestData(CONT_CMD_REQUEST_STATUS); + ret = __osSiRawStartDma(OS_WRITE, &__osPfsPifRam); + osRecvMesg(queue, &dummy, OS_MESG_BLOCK); + ret = __osSiRawStartDma(OS_READ, &__osPfsPifRam); + osRecvMesg(queue, &dummy, OS_MESG_BLOCK); __osPfsGetInitData(&pattern, status); if (status[channel].status & CONT_CARD_ON && status[channel].status & CONT_CARD_PULL) { diff --git a/src/mods/levelselect.c b/src/mods/levelselect.c index d9c8a0ad..4a51f980 100644 --- a/src/mods/levelselect.c +++ b/src/mods/levelselect.c @@ -5,6 +5,8 @@ extern PlanetId sPlanetList[15]; extern PlanetId sCurrentPlanetId; extern s32 D_menu_801B8280; extern s32 D_menu_801CD968; +extern s32 D_menu_801CD944; +extern s32 D_menu_801CD948; void Map_801A61B4(LevelId level); void Map_801A6368(void); @@ -48,7 +50,8 @@ void Map_LevelSelect(void) { } // Bypass briefing - if (gControllerPress[0].button & A_BUTTON) { + // if (gControllerPress[0].button & A_BUTTON) { + if ((D_menu_801CD944 == 2) && (D_menu_801CD948 > 0)) { Map_801A61B4(gCurrentLevel); D_menu_801B8280 = 0; D_menu_801CD968 = 0; diff --git a/src/overlays/ovl_ending/fox_end2.c b/src/overlays/ovl_ending/fox_end2.c index 567ab4e1..a97b4119 100644 --- a/src/overlays/ovl_ending/fox_end2.c +++ b/src/overlays/ovl_ending/fox_end2.c @@ -241,9 +241,9 @@ bool Ending_8018DCB4(void) { s32 unk40[10]; for (i = 0; i < gMissionNumber + 1; i++) { - temp2 += ((D_ctx_80177B50[i] & 0x00FF0000) >> 16) & 1; - temp2 += ((D_ctx_80177B50[i] & 0x0000FF00) >> 8) & 1; - temp2 += (D_ctx_80177B50[i] & 0x000000FF) & 1; + temp2 += ((gMissionTeamStatus[i] & 0x00FF0000) >> 16) & 1; + temp2 += ((gMissionTeamStatus[i] & 0x0000FF00) >> 8) & 1; + temp2 += (gMissionTeamStatus[i] & 0x000000FF) & 1; } for (i = 0; i < 10; i += 1) { @@ -502,7 +502,7 @@ void Ending_8018F2A8(u32 arg0, AssetInfo* asset) { void Ending_8018F64C(u32 arg0, AssetInfo* asset) { f32 temp; - if (D_play_800D3180[8] == 0) { + if (gLeveLClearStatus[LEVEL_ZONESS] == 0) { return; } @@ -569,7 +569,7 @@ void Ending_8018F64C(u32 arg0, AssetInfo* asset) { void Ending_8018FC60(u32 arg0, AssetInfo* asset) { f32 temp; - if (D_play_800D3180[16] == 0) { + if (gLeveLClearStatus[LEVEL_KATINA] == 0) { return; } diff --git a/src/overlays/ovl_i1/fox_co.c b/src/overlays/ovl_i1/fox_co.c index 5ff17edc..e653f380 100644 --- a/src/overlays/ovl_i1/fox_co.c +++ b/src/overlays/ovl_i1/fox_co.c @@ -1140,7 +1140,7 @@ void Corneria_8018ACE0(Actor* actor) { Object_SetInfo(&actor->info, actor->obj.id); actor->state = 100; actor->timer_0BC = 10; - actor->lockOnTimers[0] = 0; + actor->lockOnTimers[TEAM_ID_FOX] = 0; actor->vel.x = actor->vel.y = actor->vel.z = 0.0f; } } @@ -1951,7 +1951,7 @@ void Corneria_8018C19C(Boss* boss) { func_boss_80042EC0(boss); boss->fwork[17] = 10.0f; boss->vel.y *= 1.5f; - gNextPlanetPath = 1; + gMissionStatus = MISSION_ACCOMPLISHED; if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { func_boss_8004319C(gPlayer, boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z); @@ -3168,7 +3168,7 @@ void Corneria_LevelComplete1(Player* player) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; gFadeoutType = 4; - D_play_800D3180[gCurrentLevel] = Play_CheckMedalStatus(150) + 1; + gLeveLClearStatus[gCurrentLevel] = Play_CheckMedalStatus(150) + 1; } } break; diff --git a/src/overlays/ovl_i1/fox_tr360.c b/src/overlays/ovl_i1/fox_tr360.c index 0387d8e4..8dcedd49 100644 --- a/src/overlays/ovl_i1/fox_tr360.c +++ b/src/overlays/ovl_i1/fox_tr360.c @@ -236,7 +236,7 @@ void Training_8019949C(void) { } if ((gCallTimer != 0) && (gControllerPress[gMainController].button & R_CBUTTONS)) { - func_8001AF40(0); + Audio_SetUnkVoiceParam(0); gCallVoiceParam = 0; gCallTimer = 0; // This is ROB 64. Keep up the good work. diff --git a/src/overlays/ovl_i1/fox_ve1.c b/src/overlays/ovl_i1/fox_ve1.c index f98852e5..c3edfb90 100644 --- a/src/overlays/ovl_i1/fox_ve1.c +++ b/src/overlays/ovl_i1/fox_ve1.c @@ -2350,7 +2350,7 @@ void Venom1_80198414(void) { D_ctx_80177CB4 = gPlayer[0].wings.leftState; D_ctx_80177CBC = gRightWingHealth[0]; D_ctx_80177CC4 = gLeftWingHealth[0]; - func_8001CA24(0); + Audio_StopPlayerNoise(0); Audio_KillSfxBySource(gPlayer[0].sfxSource); } diff --git a/src/overlays/ovl_i2/fox_me.c b/src/overlays/ovl_i2/fox_me.c index baa43a47..2479cd07 100644 --- a/src/overlays/ovl_i2/fox_me.c +++ b/src/overlays/ovl_i2/fox_me.c @@ -395,7 +395,7 @@ void Meteo_80188344(Boss* boss) { boss->timer_054 = 5; boss->swork[0] += 32; - func_8001D034(boss->sfxSource, 0x3103605B, boss->unk_04A); + Audio_SetTransposeAndPlaySfx(boss->sfxSource, 0x3103605B, boss->unk_04A); boss->unk_04A++; if (boss->unk_04A >= 8) { @@ -2330,7 +2330,7 @@ void Meteo_LevelComplete(Player* player) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; gFadeoutType = 4; - D_play_800D3180[LEVEL_METEO] = Play_CheckMedalStatus(0xC8) + 1; + gLeveLClearStatus[LEVEL_METEO] = Play_CheckMedalStatus(200) + 1; } } } else { diff --git a/src/overlays/ovl_i2/fox_sx.c b/src/overlays/ovl_i2/fox_sx.c index 8936b38b..55e90771 100644 --- a/src/overlays/ovl_i2/fox_sx.c +++ b/src/overlays/ovl_i2/fox_sx.c @@ -1076,7 +1076,7 @@ void SectorX_80190078(Boss* boss) { gPlayer[0].unk_234 = 1; } Object_Kill(&boss->obj, boss->sfxSource); - gNextPlanetPath = boss->swork[6]; + gMissionStatus = boss->swork[6]; } break; @@ -1759,7 +1759,7 @@ void SectorX_LevelComplete(Player* player) { gFadeoutType = 4; player->timer_1F8 = 0; Play_ClearObjectData(); - D_play_800D3180[LEVEL_SECTOR_X] = Play_CheckMedalStatus(150) + 1; + gLeveLClearStatus[LEVEL_SECTOR_X] = Play_CheckMedalStatus(150) + 1; } } break; diff --git a/src/overlays/ovl_i3/fox_a6.c b/src/overlays/ovl_i3/fox_a6.c index 80b7722e..34a25827 100644 --- a/src/overlays/ovl_i3/fox_a6.c +++ b/src/overlays/ovl_i3/fox_a6.c @@ -2729,7 +2729,7 @@ void Area6_LevelComplete(Player* player) { gFillScreenAlphaTarget = 255; gFillScreenAlphaStep = 8; if (gFillScreenAlpha == 255) { - D_play_800D3180[LEVEL_AREA_6] = Play_CheckMedalStatus(300) + 1; + gLeveLClearStatus[LEVEL_AREA_6] = Play_CheckMedalStatus(300) + 1; for (i = TEAM_ID_FALCO; i < TEAM_ID_MAX; i++) { gPrevPlanetTeamShields[i] = gTeamShields[i]; gPrevPlanetSavedTeamShields[i] = gSavedTeamShields[i]; @@ -2741,7 +2741,7 @@ void Area6_LevelComplete(Player* player) { } } D_ctx_80161A94[0] = gGoldRingCount[0]; - func_8001CA24(0); + Audio_StopPlayerNoise(0); Audio_KillSfxBySource(player->sfxSource); Play_ClearObjectData(); gNextGameState = GSTATE_PLAY; diff --git a/src/overlays/ovl_i3/fox_so.c b/src/overlays/ovl_i3/fox_so.c index 506fa6a1..722c15b7 100644 --- a/src/overlays/ovl_i3/fox_so.c +++ b/src/overlays/ovl_i3/fox_so.c @@ -1128,7 +1128,7 @@ void Solar_LevelStart(Player* player) { player->cam.at.z = player->unk_138; D_ctx_80177950 = 1.0f; - func_8001D1C8(255, 3); + Audio_SetHeatAlarmParams(255, 3); AUDIO_PLAY_SFX(0x4100C023, gDefaultSfxSource, 4); gLoadLevelObjects = 1; gFillScreenAlphaTarget = 0; @@ -2876,7 +2876,7 @@ void Solar_LevelComplete(Player* player) { if (gCsFrameCount == 400) { player->unk_1D0++; Play_ClearObjectData(); - func_8001CA24(0); + Audio_StopPlayerNoise(0); Audio_KillSfxBySource(player->sfxSource); gFillScreenAlpha = 250; player->timer_1F8 = 20; @@ -3016,12 +3016,12 @@ void Solar_LevelComplete(Player* player) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; gFillScreenAlphaStep = 8; if (gFillScreenAlpha == 255) { - func_8001CA24(0); + Audio_StopPlayerNoise(0); Audio_FadeOutAll(10); player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; gFadeoutType = 4; - D_play_800D3180[LEVEL_SOLAR] = Play_CheckMedalStatus(100) + 1; + gLeveLClearStatus[LEVEL_SOLAR] = Play_CheckMedalStatus(100) + 1; } } break; diff --git a/src/overlays/ovl_i3/fox_zo.c b/src/overlays/ovl_i3/fox_zo.c index 41b76607..7513903b 100644 --- a/src/overlays/ovl_i3/fox_zo.c +++ b/src/overlays/ovl_i3/fox_zo.c @@ -1007,7 +1007,7 @@ void Zoness_80191680(Actor* actor) { sp54 = Math_RadToDeg(Math_Atan2F(sp64, sp5C)); otherActor = &gActors[actor->iwork[0]]; if ((actor->state != 0) || (otherActor->obj.status == OBJ_FREE)) { - actor->lockOnTimers[0] = 0; + actor->lockOnTimers[TEAM_ID_FOX] = 0; actor->info.unk_1C = 0.0f; sp54 += 180.0f; if (sp54 > 360.0f) { @@ -4582,7 +4582,7 @@ void Zoness_LevelComplete(Player* player) { if (gCsFrameCount == 160) { player->unk_1D0++; Play_ClearObjectData(); - func_8001CA24(0); + Audio_StopPlayerNoise(0); Audio_KillSfxBySource(player->sfxSource); gFillScreenAlpha = 250; player->timer_1F8 = 20; @@ -4672,12 +4672,12 @@ void Zoness_LevelComplete(Player* player) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; gFillScreenAlphaStep = 8; if (gFillScreenAlpha == 255) { - func_8001CA24(0); + Audio_StopPlayerNoise(0); Audio_FadeOutAll(10); player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; gFadeoutType = 4; - D_play_800D3180[LEVEL_ZONESS] = Play_CheckMedalStatus(250) + 1; + gLeveLClearStatus[LEVEL_ZONESS] = Play_CheckMedalStatus(250) + 1; } } break; @@ -4686,7 +4686,7 @@ void Zoness_LevelComplete(Player* player) { switch (gCsFrameCount) { case 320: if (!gMissedZoSearchlight) { - gNextPlanetPath = 1; + gMissionStatus = MISSION_ACCOMPLISHED; } gLevelClearScreenTimer = 100; break; diff --git a/src/overlays/ovl_i4/fox_bo.c b/src/overlays/ovl_i4/fox_bo.c index dcf0f275..984b032e 100644 --- a/src/overlays/ovl_i4/fox_bo.c +++ b/src/overlays/ovl_i4/fox_bo.c @@ -88,39 +88,39 @@ s32 D_i4_801A0530; f32 D_i4_8019EEC0 = 0.0f; -void Bolse_8018BD60(Actor* actor) { +void Bolse_8018BD60(Actor* this) { s32 i; - Actor* actorPtr; + Actor* actor; f32 D_i4_8019EEC4[4] = { 8000.0f, -8000.0f, 8000.0f, -8000.0f }; f32 D_i4_8019EED4[4] = { 8000.0f, 8000.0f, -8000.0f, -8000.0f }; if (gAllRangeCheckpoint == 0) { - actor->unk_04E++; - if (actor->unk_04E >= 4) { - actor->unk_04E = 0; + this->unk_04E++; + if (this->unk_04E >= 4) { + this->unk_04E = 0; } - for (actorPtr = gActors + 10, i = 10; i < 16; i++, actorPtr++) { - if (actorPtr->obj.status == OBJ_FREE) { - Actor_Initialize(actorPtr); - actorPtr->obj.status = OBJ_ACTIVE; - actorPtr->obj.id = OBJ_ACTOR_ALLRANGE; - actorPtr->obj.pos.x = D_i4_8019EEC4[actor->unk_04E]; - actorPtr->obj.pos.y = 1000.0f; - actorPtr->obj.pos.z = D_i4_8019EED4[actor->unk_04E]; - actorPtr->state = 1; - actorPtr->aiIndex = -1; - actorPtr->health = 24; - actorPtr->iwork[11] = 1; - actorPtr->itemDrop = DROP_SILVER_RING_50p; - actorPtr->aiType = i; - Object_SetInfo(&actorPtr->info, actorPtr->obj.id); - AUDIO_PLAY_SFX(0x3100000C, actorPtr->sfxSource, 4); + for (actor = &gActors[10], i = 10; i < 16; i++, actor++) { + if (actor->obj.status == OBJ_FREE) { + Actor_Initialize(actor); + actor->obj.status = OBJ_ACTIVE; + actor->obj.id = OBJ_ACTOR_ALLRANGE; + actor->obj.pos.x = D_i4_8019EEC4[this->unk_04E]; + actor->obj.pos.y = 1000.0f; + actor->obj.pos.z = D_i4_8019EED4[this->unk_04E]; + actor->state = 1; + actor->aiIndex = -1; + actor->health = 24; + actor->iwork[11] = 1; + actor->itemDrop = DROP_SILVER_RING_50p; + actor->aiType = i; + Object_SetInfo(&actor->info, actor->obj.id); + AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); break; } } } - func_360_8002F69C(actor); - func_360_8002FC00(actor); + func_360_8002F69C(this); + func_360_8002FC00(this); } f32 D_i4_8019EEE4[] = { -200.0f, -100.0f, -0.0f, 100.0f, 200.0f }; @@ -431,7 +431,7 @@ void Bolse_UpdateEventHandler(Actor* this) { break; case 390: - if (D_play_800D3180[LEVEL_FORTUNA] == 0) { + if (gLeveLClearStatus[LEVEL_FORTUNA] == 0) { Radio_PlayMessage(gMsg_ID_9285, RCID_FOX); } else { Radio_PlayMessage(gMsg_ID_11241, RCID_FOX); @@ -628,7 +628,7 @@ bool Bolse_8018D278(Actor* actor) { Object_Kill(&actor->obj, actor->sfxSource); actor->info.bonus = 0; - actor->lockOnTimers[0] = 0; + actor->lockOnTimers[TEAM_ID_FOX] = 0; actor->info.unk_1C = 0.0f; return true; @@ -743,7 +743,7 @@ void Bolse_8018D7F0(Actor* actor) { Bolse_8018D4F0(actor); Bolse_8018D584(actor); } else { - actor->lockOnTimers[0] = 0; + actor->lockOnTimers[TEAM_ID_FOX] = 0; actor->info.bonus = 0; actor->info.unk_1C = 0.0f; } @@ -1407,7 +1407,7 @@ void Bolse_LevelComplete(Player* player) { if (player->timer_1F8 == 0) { player->unk_1D0 = 5; player->timer_1F8 = 1000; - func_8001CA24(0); + Audio_StopPlayerNoise(0); Audio_KillSfxBySource(player->sfxSource); Play_ClearObjectData(); @@ -1629,9 +1629,9 @@ void Bolse_LevelComplete(Player* player) { D_ctx_80161A94[0] = gGoldRingCount[0]; gNextGameState = GSTATE_PLAY; gNextLevel = LEVEL_VENOM_1; - func_8001CA24(0); + Audio_StopPlayerNoise(0); Audio_KillSfxBySource(player->sfxSource); - D_play_800D3180[LEVEL_BOLSE] = Play_CheckMedalStatus(150) + 1; + gLeveLClearStatus[LEVEL_BOLSE] = Play_CheckMedalStatus(150) + 1; for (i = TEAM_ID_FALCO; i < TEAM_ID_MAX; i++) { gPrevPlanetTeamShields[i] = gTeamShields[i]; diff --git a/src/overlays/ovl_i4/fox_fo.c b/src/overlays/ovl_i4/fox_fo.c index 301525cc..7d3ba318 100644 --- a/src/overlays/ovl_i4/fox_fo.c +++ b/src/overlays/ovl_i4/fox_fo.c @@ -203,7 +203,7 @@ void Fortuna_80187960(Actor* actor) { if ((gStarWolfTeamAlive[0] == 0) && (gStarWolfTeamAlive[1] == 0) && (gStarWolfTeamAlive[2] == 0) && (gStarWolfTeamAlive[3] == 0)) { Radio_PlayMessage(gMsg_ID_9411, RCID_FOX); - gNextPlanetPath = 1; + gMissionStatus = MISSION_ACCOMPLISHED; gPlayer[0].timer_1F8 = 50; player->unk_190 = 5.0f; player->unk_194 = 5.0f; @@ -211,7 +211,7 @@ void Fortuna_80187960(Actor* actor) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 30); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 30); } else { - gNextPlanetPath = 0; + gMissionStatus = MISSION_COMPLETE; gPlayer[0].timer_1F8 = 30; } } @@ -363,7 +363,7 @@ void Fortuna_80187960(Actor* actor) { case 6: actor->iwork[0] += 1; - if (gNextPlanetPath == 0) { + if (gMissionStatus == MISSION_COMPLETE) { actor1->aiIndex = AI360_FOX; actor1->state = 2; actor2->aiIndex = AI360_FOX; @@ -494,7 +494,7 @@ void Fortuna_80188AD0(Actor* actor) { actor->state = 1; actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_FO_600FF64); actor->info.unk_1C = 0.0f; - actor->lockOnTimers[0] = 0; + actor->lockOnTimers[TEAM_ID_FOX] = 0; actor->info.bonus = 0; AUDIO_PLAY_SFX(0x2903B009, actor->sfxSource, 4); } @@ -645,7 +645,7 @@ void Fortuna_LevelComplete(Player* player) { Math_SmoothStepToF(&player->unk_12C, 0.0f, 0.1f, 15.0f, 0.0f); Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f); Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 20.0f, 0.0f); - if (gNextPlanetPath == 0) { + if (gMissionStatus == MISSION_COMPLETE) { if (player->pos.y < 700.0f) { Math_SmoothStepToF(&player->pos.y, 700.0f, 0.1f, 10.0f, 0.0f); } @@ -695,7 +695,7 @@ void Fortuna_LevelComplete(Player* player) { break; case 0: - if (gNextPlanetPath == 0) { + if (gMissionStatus == MISSION_COMPLETE) { Math_SmoothStepToF(&player->unk_0E8, 40.0f, 0.1f, 2.5f, 0.0f); Math_SmoothStepToF(&player->unk_0EC, 60.0f, 0.2f, 5.0f, 0.0f); Math_SmoothStepToF(&player->unk_0E4, 0.0f, 0.1f, 2.5f, 0.0f); @@ -712,7 +712,7 @@ void Fortuna_LevelComplete(Player* player) { } if (player->timer_1F8 == 0) { - if (gNextPlanetPath != 0) { + if (gMissionStatus != MISSION_COMPLETE) { player->timer_1F8 = 150; player->unk_1D0 = -1; player->pos.x = 0.0f; @@ -752,7 +752,7 @@ void Fortuna_LevelComplete(Player* player) { //! FAKE: if (((&dest) && (&dest)) && (&dest)) {} - func_8001CA24(0); + Audio_StopPlayerNoise(0); Audio_KillSfxBySource(player->sfxSource); player->unk_234 = 0; gFillScreenAlpha = 255; @@ -763,7 +763,7 @@ void Fortuna_LevelComplete(Player* player) { break; case 2: - if (!(gNextPlanetPath) && (player->timer_1F8) > 830) { + if (!(gMissionStatus) && (player->timer_1F8) > 830) { gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 8; } @@ -778,9 +778,9 @@ void Fortuna_LevelComplete(Player* player) { gBosses[0].swork[0] = 1; - if ((func_hud_80090200(&gBosses[0]) == 2) || (gNextPlanetPath != 0)) { + if ((func_hud_80090200(&gBosses[0]) == 2) || (gMissionStatus != MISSION_COMPLETE)) { Play_ClearObjectData(); - if (gNextPlanetPath == 0) { + if (gMissionStatus == MISSION_COMPLETE) { player->unk_1D0 = 10; } else { player->unk_1D0 = 20; @@ -803,7 +803,7 @@ void Fortuna_LevelComplete(Player* player) { D_ctx_801784D4 = D_ctx_801784C8 = D_ctx_801784C8 = D_ctx_801784FC = D_ctx_801784C8 = 58.0f; D_ctx_801784D8 = D_ctx_801784CC = D_ctx_801784CC = D_ctx_80178500 = D_ctx_801784CC = 13.0f; - if (gNextPlanetPath == 0) { + if (gMissionStatus == MISSION_COMPLETE) { player->pos.x = 0.0f; player->pos.y = 0.0f; player->unk_0E4 = 0.0f; @@ -829,7 +829,7 @@ void Fortuna_LevelComplete(Player* player) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 100); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 100); Audio_StartPlayerNoise(0); - if (gNextPlanetPath == 0) { + if (gMissionStatus == MISSION_COMPLETE) { Fortuna_801890EC(actor0, 3); } } @@ -871,7 +871,7 @@ void Fortuna_LevelComplete(Player* player) { } if (gCsFrameCount == 200) { - if (gNextPlanetPath == 0) { + if (gMissionStatus == MISSION_COMPLETE) { AUDIO_PLAY_BGM(SEQ_ID_BAD_END); } else { AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); @@ -919,7 +919,7 @@ void Fortuna_LevelComplete(Player* player) { Radio_PlayMessage(gMsg_ID_20010, RCID_FOX); } - if (gNextPlanetPath == 0) { + if (gMissionStatus == MISSION_COMPLETE) { switch (gCsFrameCount) { case 588: switch (gTeamShields[TEAM_ID_SLIPPY]) { @@ -1101,7 +1101,7 @@ void Fortuna_LevelComplete(Player* player) { for (i = 0; i < 6; i++) { gSavedStarWolfTeamAlive[i] = gStarWolfTeamAlive[i]; } - D_play_800D3180[LEVEL_FORTUNA] = Play_CheckMedalStatus(50) + 1; + gLeveLClearStatus[LEVEL_FORTUNA] = Play_CheckMedalStatus(50) + 1; } break; @@ -1328,7 +1328,7 @@ void Fortuna_LevelComplete(Player* player) { } // clang-format on - D_play_800D3180[LEVEL_FORTUNA] = Play_CheckMedalStatus(50) + 1; + gLeveLClearStatus[LEVEL_FORTUNA] = Play_CheckMedalStatus(50) + 1; Play_ClearObjectData(); break; } diff --git a/src/overlays/ovl_i4/fox_ka.c b/src/overlays/ovl_i4/fox_ka.c index 8154ae20..6e0d4094 100644 --- a/src/overlays/ovl_i4/fox_ka.c +++ b/src/overlays/ovl_i4/fox_ka.c @@ -1042,7 +1042,7 @@ void Katina_801946C4(Boss* boss) { gPlayer[0].unk_1D0 = 2; gPlayer[0].unk_234 = 1; gCsFrameCount = 200; - func_8001CA24(0); + Audio_StopPlayerNoise(0); Audio_KillSfxBySource(&gPlayer[0].sfxSource[0]); gPlayer[0].timer_1F8 = 50; gPlayer[0].unk_0D0 = 0.0f; @@ -1066,7 +1066,7 @@ void Katina_801946C4(Boss* boss) { (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN))) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].unk_1D0 = 0; - gNextPlanetPath = 1; + gMissionStatus = MISSION_ACCOMPLISHED; boss->obj.pos.z = 0.0f; boss->health = -1; boss->fwork[10] = 0.0f; @@ -1367,7 +1367,7 @@ void Katina_80197024(void) { Rand_SetSeed(1, 29100, 9786); - if (gNextPlanetPath != 0) { + if (gMissionStatus != MISSION_COMPLETE) { target = 19; } else { target = 2; @@ -1481,7 +1481,7 @@ void Katina_LevelComplete(Player* player) { if (gCsFrameCount == 250) { player->unk_1D0 = 2; Play_ClearObjectData(); - func_8001CA24(0); + Audio_StopPlayerNoise(0); Audio_KillSfxBySource(&player->sfxSource[0]); player->timer_1F8 = 50; player->unk_0D0 = 0.0f; @@ -1499,7 +1499,7 @@ void Katina_LevelComplete(Player* player) { player->pos.z = 150.0f; player->unk_1D0 = 3; Audio_StartPlayerNoise(0); - if (gNextPlanetPath != 0) { + if (gMissionStatus != MISSION_COMPLETE) { AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); } else { AUDIO_PLAY_BGM(SEQ_ID_BAD_END); @@ -1553,7 +1553,7 @@ void Katina_LevelComplete(Player* player) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; gFadeoutType = 4; - D_play_800D3180[LEVEL_KATINA] = Play_CheckMedalStatus(150) + 1; + gLeveLClearStatus[LEVEL_KATINA] = Play_CheckMedalStatus(150) + 1; } } switch (gCsFrameCount) { @@ -1587,7 +1587,7 @@ void Katina_LevelComplete(Player* player) { break; case 570: - if (gNextPlanetPath != 0) { + if (gMissionStatus != MISSION_COMPLETE) { if (gKaAllyKillCount == 0) { Radio_PlayMessage(gMsg_ID_18100, RCID_BILL); } else { @@ -1599,7 +1599,7 @@ void Katina_LevelComplete(Player* player) { break; case 700: - if (gNextPlanetPath != 0) { + if (gMissionStatus != MISSION_COMPLETE) { if (gKaAllyKillCount == 0) { Radio_PlayMessage(gMsg_ID_18105, RCID_FOX); } else { diff --git a/src/overlays/ovl_i4/fox_sz.c b/src/overlays/ovl_i4/fox_sz.c index 466a905a..e45723b5 100644 --- a/src/overlays/ovl_i4/fox_sz.c +++ b/src/overlays/ovl_i4/fox_sz.c @@ -58,7 +58,7 @@ void SectorZ_80199900(Actor* actor, s32 arg1) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); } - if ((D_i4_801A0560 == 3) && (D_play_800D3180[LEVEL_ZONESS] != 0)) { + if ((D_i4_801A0560 == 3) && (gLeveLClearStatus[LEVEL_ZONESS] != 0)) { D_360_800C9B4C = gAllRangeEventTimer + 110; } } @@ -1209,7 +1209,7 @@ void SectorZ_LevelComplete(Player* player) { if ((gCsFrameCount == 210) && gGreatFoxIntact) { gLevelClearScreenTimer = 100; - gNextPlanetPath = 1; + gMissionStatus = MISSION_ACCOMPLISHED; } if ((gCsFrameCount == 230) && (D_i4_801A0564 != 0)) { @@ -1240,7 +1240,7 @@ void SectorZ_LevelComplete(Player* player) { player->unk_1D0 = 10; player->timer_1F8 = 1000; - func_8001CA24(0U); + Audio_StopPlayerNoise(0U); Audio_KillSfxBySource(player->sfxSource); Play_ClearObjectData(); @@ -1353,7 +1353,7 @@ void SectorZ_LevelComplete(Player* player) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; gFadeoutType = 4; - D_play_800D3180[LEVEL_SECTOR_Z] = Play_CheckMedalStatus(100) + 1; + gLeveLClearStatus[LEVEL_SECTOR_Z] = Play_CheckMedalStatus(100) + 1; } } break; @@ -1485,10 +1485,10 @@ void SectorZ_LevelComplete(Player* player) { case 1370: if (gGreatFoxIntact) { - gNextPlanetPath = 1; + gMissionStatus = MISSION_ACCOMPLISHED; } else { AUDIO_PLAY_BGM(SEQ_ID_BAD_END); - gNextPlanetPath = 0; + gMissionStatus = MISSION_COMPLETE; } break; diff --git a/src/overlays/ovl_i5/fox_ma.c b/src/overlays/ovl_i5/fox_ma.c index cd6312e3..28a4e433 100644 --- a/src/overlays/ovl_i5/fox_ma.c +++ b/src/overlays/ovl_i5/fox_ma.c @@ -445,19 +445,19 @@ void Macbeth_8019A198(Actor* actor) { if ((actor->iwork[5] == D_MA_801BE2F0[3] - 1) || (actor->iwork[5] == D_i5_801BA1E4 - 1)) { if (D_i5_801BE310 != actor->iwork[5]) { if (actor->vel.z > -6.0f) { - func_8001CFA8(-6.0f); + Audio_SetSfxSpeedModulation(-6.0f); } else { - func_8001CFA8(actor->vel.z); + Audio_SetSfxSpeedModulation(actor->vel.z); } - func_8001D10C(actor->sfxSource, 0x31078085); + Audio_PlaySfxModulated(actor->sfxSource, 0x31078085); D_i5_801BE310 = actor->iwork[5]; } D_i5_801BA1E0 = actor->obj.pos.z; if (D_i5_801BE313 != 0) { if (actor->vel.z > -6.0f) { - func_8001CFA8(-6.0f); + Audio_SetSfxSpeedModulation(-6.0f); } else { - func_8001CFA8(actor->vel.z); + Audio_SetSfxSpeedModulation(actor->vel.z); } } } @@ -890,7 +890,7 @@ void Macbeth_8019C778(Actor* actor) { if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].unk_1D0 = 0; - gNextPlanetPath = 0; + gMissionStatus = MISSION_COMPLETE; } actor->state++; Audio_KillSfxBySourceAndId(gPlayer[0].sfxSource, 0x1100000A); @@ -3043,7 +3043,7 @@ void Macbeth_801A4B24(Actor* actor) { D_ctx_8017796C = -1; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].unk_1D0 = 0; - gNextPlanetPath = 1; + gMissionStatus = MISSION_ACCOMPLISHED; actor->timer_0BC = 5; actor->state = 6; Audio_KillSfxBySourceAndId(gPlayer[0].sfxSource, 0x1100000A); @@ -6363,7 +6363,7 @@ void Macbeth_LevelComplete2(Player* player) { } break; case 1420: - if (D_play_800D3180[LEVEL_ZONESS] != 0) { + if (gLeveLClearStatus[LEVEL_ZONESS] != 0) { Macbeth_801AF44C(); } break; @@ -6371,7 +6371,7 @@ void Macbeth_LevelComplete2(Player* player) { D_i5_801BA88C = 170.0f; break; case 1500: - if (D_play_800D3180[LEVEL_ZONESS] != 0) { + if (gLeveLClearStatus[LEVEL_ZONESS] != 0) { Radio_PlayMessage(gMsg_ID_17300, RCID_KATT); } break; @@ -6422,7 +6422,7 @@ void Macbeth_LevelComplete2(Player* player) { case 2160: gProjectFar = 30000.0f; player->unk_240 = 1; - func_8001CA24(0); + Audio_StopPlayerNoise(0); AUDIO_PLAY_SFX(0x01008016, player->sfxSource, 0); break; case 2310: @@ -6461,7 +6461,7 @@ void Macbeth_LevelComplete2(Player* player) { gFadeoutType = 4; Play_ClearObjectData(); Audio_FadeOutAll(10); - D_play_800D3180[LEVEL_MACBETH] = Play_CheckMedalStatus(150) + 1; + gLeveLClearStatus[LEVEL_MACBETH] = Play_CheckMedalStatus(150) + 1; } } } @@ -6971,17 +6971,17 @@ void Macbeth_LevelComplete1(Player* player) { } break; case 680: - if (D_play_800D3180[LEVEL_ZONESS] != 0) { + if (gLeveLClearStatus[LEVEL_ZONESS] != 0) { Macbeth_801B3718(); } break; case 1027: - if (D_play_800D3180[LEVEL_ZONESS] != 0) { + if (gLeveLClearStatus[LEVEL_ZONESS] != 0) { Radio_PlayMessage(gMsg_ID_17350, RCID_KATT); } break; case 1065: - if (D_play_800D3180[LEVEL_ZONESS] != 0) { + if (gLeveLClearStatus[LEVEL_ZONESS] != 0) { gActors[8].state++; } break; @@ -6995,7 +6995,7 @@ void Macbeth_LevelComplete1(Player* player) { gActors[2].state++; break; case 1158: - if (D_play_800D3180[LEVEL_ZONESS] != 0) { + if (gLeveLClearStatus[LEVEL_ZONESS] != 0) { Object_Kill(&gActors[8].obj, gActors[8].sfxSource); } /* fallthrough */ @@ -7030,7 +7030,7 @@ void Macbeth_LevelComplete1(Player* player) { gFadeoutType = 4; Play_ClearObjectData(); Audio_FadeOutAll(10); - D_play_800D3180[LEVEL_MACBETH] = Play_CheckMedalStatus(150) + 1; + gLeveLClearStatus[LEVEL_MACBETH] = Play_CheckMedalStatus(150) + 1; } } } diff --git a/src/overlays/ovl_i5/fox_ti.c b/src/overlays/ovl_i5/fox_ti.c index 7ff65057..ad546293 100644 --- a/src/overlays/ovl_i5/fox_ti.c +++ b/src/overlays/ovl_i5/fox_ti.c @@ -360,7 +360,7 @@ void Titania_80189CC8(Actor* actor) { if (actor->health <= 0) { actor->health = 0; AUDIO_PLAY_SFX(0x2903A008, actor->sfxSource, 4); - actor->lockOnTimers[0] = actor->itemDrop = 0; + actor->lockOnTimers[TEAM_ID_FOX] = actor->itemDrop = 0; actor->info.unk_1C = 0.0f; Actor_Despawn(actor); actor->info.bonus = 0; @@ -866,7 +866,7 @@ void Titania_8018B268(Actor* actor) { Animation_DrawSkeleton(0, D_TI1_700D700, actor->vwork, Titania_8018AFD4, Titania_8018B1B4, actor, &gIdentityMatrix); func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f); - actor->lockOnTimers[0] = 0; + actor->lockOnTimers[TEAM_ID_FOX] = 0; actor->info.unk_1C = 0.0f; } } @@ -1679,7 +1679,7 @@ void Titania_8018C8A8(Actor* actor) { if (actor->health > 0) { actor->info.unk_1C = actor->fwork[27]; } else { - actor->lockOnTimers[0] = 0; + actor->lockOnTimers[TEAM_ID_FOX] = 0; actor->info.unk_1C = 0.0f; } actor->unk_0D0 = 0; @@ -1882,7 +1882,7 @@ void Titania_8018E5F8(Actor* actor) { if (actor->health <= 0) { BonusText_Display(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + actor->fwork[27], 2); gHitCount += 2; - actor->lockOnTimers[0] = actor->health = actor->itemDrop = 0; + actor->lockOnTimers[TEAM_ID_FOX] = actor->health = actor->itemDrop = 0; actor->info.unk_1C = 0.0f; Actor_Despawn(actor); actor->info.bonus = 0; diff --git a/src/overlays/ovl_i5/fox_ti_cs.c b/src/overlays/ovl_i5/fox_ti_cs.c index 0d7c3fd8..c1684749 100644 --- a/src/overlays/ovl_i5/fox_ti_cs.c +++ b/src/overlays/ovl_i5/fox_ti_cs.c @@ -498,7 +498,7 @@ void Titania_LevelComplete(Player* player) { Titania_80188108(&gActors[3], 3); gProjectFar = 30000.0f; player->unk_240 = 1; - func_8001CA24(0); + Audio_StopPlayerNoise(0); AUDIO_PLAY_SFX(0x01008016, player->sfxSource, 0); break; } @@ -526,7 +526,7 @@ void Titania_LevelComplete(Player* player) { gFadeoutType = 4; Play_ClearObjectData(); Audio_FadeOutAll(10); - D_play_800D3180[LEVEL_TITANIA] = Play_CheckMedalStatus(150) + 1; + gLeveLClearStatus[LEVEL_TITANIA] = Play_CheckMedalStatus(150) + 1; } } } diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index e3d18707..a4eb3f41 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -639,7 +639,7 @@ void Andross_80189470(Actor* actor) { if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 500.0f) && (fabsf(actor->obj.pos.z - gPlayer[0].unk_138) < 500.0f)) { Audio_KillSfxById(0x11403076); - Audio_SetBaseSfxReverb(0); + Audio_SetEnvSfxReverb(0); gCurrentLevel = LEVEL_VENOM_2; gLevelPhase = 1; gVenomHardClear = 1; @@ -950,7 +950,7 @@ void Andross_80189B70(Boss* boss) { if (gCsFrameCount == 200) { gBossActive = 0; gPlayer[0].unk_0D0 = D_play_80161A54; - func_8001CA24(0); + Audio_StopPlayerNoise(0); boss->state = 21; func_effect_8007B344(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 60.0f, 5); func_effect_8007A568(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 40.0f); @@ -1029,7 +1029,7 @@ void Andross_80189B70(Boss* boss) { Radio_PlayMessage(gMsg_ID_19340, RCID_JAMES); break; case 1000: - Audio_SetBaseSfxReverb(0); + Audio_SetEnvSfxReverb(0); break; case 1300: Radio_PlayMessage(gMsg_ID_19355, RCID_JAMES); @@ -1558,7 +1558,7 @@ void Andross_8018D0D8(Boss* boss) { } void Andross_Boss320_Init(Boss320* this) { - Audio_SetBaseSfxReverb(0x18); + Audio_SetEnvSfxReverb(24); D_i6_801A7F5C = D_i6_801A7F64 = D_i6_801A7F6C = D_i6_801A7F74 = D_i6_801A7F7C = D_i6_801A8430 = 0.0f; gAndrossUnkAlpha = 0.0f; this->health = 100; @@ -2471,7 +2471,7 @@ void Andross_8018DBF0(Boss* boss) { boss->timer_050 = 30; boss->swork[9] = 20; boss->fwork[9] = 0.0f; - func_8001CE28(0, boss->sfxSource); + Audio_PlayBombExplodeSfx(0, boss->sfxSource); boss->timer_05C = 50; } break; @@ -3554,7 +3554,7 @@ void Andross_80193C4C(Player* player) { sp68.z = 0.0f; if (gCsFrameCount == 50) { AUDIO_PLAY_SFX(0x11403071, player->sfxSource, 0); - Audio_SetBaseSfxReverb(0); + Audio_SetEnvSfxReverb(0); } if (gCsFrameCount > 40) { sp90 = 1; @@ -3632,7 +3632,7 @@ void Andross_80193C4C(Player* player) { break; case 340: Audio_KillSfxBySourceAndId(player->sfxSource, 0x11403071); - Audio_SetBaseSfxReverb(0); + Audio_SetEnvSfxReverb(0); gVenomHardClear = 0; gBlurAlpha = 255; gCurrentLevel = LEVEL_VENOM_2; @@ -3720,7 +3720,7 @@ void Andross_80193C4C(Player* player) { D_i6_801A7F50 = gAmbientG; D_i6_801A7F54 = gAmbientB; D_ctx_801784D4 = -50.0f; - gNextPlanetPath = 1; + gMissionStatus = MISSION_ACCOMPLISHED; for (i = 0; i < 200; i++) { gScenery360[i].obj.status = OBJ_FREE; } @@ -3946,7 +3946,7 @@ void Andross_80193C4C(Player* player) { if (gFillScreenAlpha == 255) { gNextGameState = GSTATE_ENDING; D_ending_80196D00 = 0; - D_play_800D3180[LEVEL_VENOM_ANDROSS] = Play_CheckMedalStatus(200) + 1; + gLeveLClearStatus[LEVEL_VENOM_ANDROSS] = Play_CheckMedalStatus(200) + 1; AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_27); } } diff --git a/src/overlays/ovl_i6/fox_sy.c b/src/overlays/ovl_i6/fox_sy.c index 4ebe5d6b..dda59f43 100644 --- a/src/overlays/ovl_i6/fox_sy.c +++ b/src/overlays/ovl_i6/fox_sy.c @@ -2116,7 +2116,7 @@ void SectorY_LevelComplete(Player* player) { D_ctx_80177A48[0] = 1.0f; player->unk_1D0++; Play_ClearObjectData(); - func_8001CA24(0); + Audio_StopPlayerNoise(0); Audio_KillSfxBySource(player->sfxSource); gFillScreenAlpha = 250; player->timer_1F8 = 50; @@ -2221,7 +2221,7 @@ void SectorY_LevelComplete(Player* player) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; gFadeoutType = 4; - D_play_800D3180[LEVEL_SECTOR_Y] = Play_CheckMedalStatus(150) + 1; + gLeveLClearStatus[LEVEL_SECTOR_Y] = Play_CheckMedalStatus(150) + 1; } } break; @@ -2230,7 +2230,7 @@ void SectorY_LevelComplete(Player* player) { switch (gCsFrameCount) { case 520: if (gHitCount >= 100) { - gNextPlanetPath = 1; + gMissionStatus = MISSION_ACCOMPLISHED; } gLevelClearScreenTimer = 100; break; diff --git a/src/overlays/ovl_i6/fox_ve2.c b/src/overlays/ovl_i6/fox_ve2.c index 72866fae..26b45964 100644 --- a/src/overlays/ovl_i6/fox_ve2.c +++ b/src/overlays/ovl_i6/fox_ve2.c @@ -110,7 +110,7 @@ void Venom2_80196314(Actor* actor) { player->state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; player->unk_1D0 = 0; - D_play_800D3180[gCurrentLevel] = 2; + gLeveLClearStatus[gCurrentLevel] = 2; D_ctx_80177C94 = gGoldRingCount[0]; D_ctx_80177C9C = player->shields + 1; D_play_80161A5C = D_ctx_80177CA4 = gHitCount; @@ -415,10 +415,10 @@ void Venom2_LevelComplete(Player* player) { gNextGameState = GSTATE_PLAY; gNextLevel = LEVEL_VENOM_ANDROSS; - if (D_play_800D3180[gCurrentLevel] != 0) { + if (gLeveLClearStatus[gCurrentLevel] != 0) { gNextLevelPhase = 1; } - func_8001CA24(0); + Audio_StopPlayerNoise(0); Audio_KillSfxBySource(player->sfxSource); for (i = 0; i < 200; i++) { diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index 8e84c006..8393cfab 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -30,12 +30,12 @@ s32 D_menu_801CD840[24]; s32 D_menu_801CD8A0[15]; s32 D_menu_801CD8E0[7]; s32 D_menu_801CD900[15]; -s32 D_menu_801CD93C; +MissionStatus sPrevMissionStatus; s32 D_menu_801CD940; s32 D_menu_801CD944; // mapState s32 D_menu_801CD948; s32 D_menu_801CD94C; -s32 D_menu_801CD950; +PlanetId sPrevPlanetId; PlanetId sCurrentPlanetId; // sCurrentPlanetId PlanetId sNextPlanetId; s32 D_menu_801CD95C; @@ -1450,19 +1450,19 @@ void Map_8019F164(void) { } } - D_menu_801CD93C = gNextPlanetPath; + sPrevMissionStatus = gMissionStatus; sCurrentPlanetId = Map_GetPlanetId(gCurrentLevel); - D_menu_801CD950 = sCurrentPlanetId; + sPrevPlanetId = sCurrentPlanetId; D_menu_801CD980 = Map_8019FD1C(gCurrentLevel, 0); Map_8019FD1C(gCurrentLevel, 2); - if (D_play_800D3180[gCurrentLevel] == 2) { + if (gLeveLClearStatus[gCurrentLevel] == 2) { D_menu_801CD98C = 1; - D_ctx_80177BB0[gMissionNumber] = 1; + gMissionMedal[gMissionNumber] = 1; Map_8019FD1C(gCurrentLevel, 1); } @@ -1474,16 +1474,16 @@ void Map_8019F164(void) { Map_8019FA1C(); - switch (D_menu_801CD93C) { - case 0: + switch (sPrevMissionStatus) { + case MISSION_COMPLETE: sNextPlanetId = sPlanets[sCurrentPlanetId].dest1; break; - case 1: + case MISSION_ACCOMPLISHED: sNextPlanetId = sPlanets[sCurrentPlanetId].dest2; break; - case 2: + case MISSION_WARP: sNextPlanetId = sPlanets[sCurrentPlanetId].warp; break; } @@ -1502,7 +1502,7 @@ void Map_8019F164(void) { D_menu_801CEFD8 = 0; - if (D_menu_801CD93C != 0) { + if (sPrevMissionStatus != MISSION_COMPLETE) { D_menu_801CEFD8 = 1; } @@ -1521,7 +1521,7 @@ void Map_8019F42C(void) { D_menu_801CD974 = 1; sCurrentPlanetId = Map_GetPlanetId(gCurrentLevel); - D_ctx_80177B70[gMissionNumber] = gHitCount; + gMissionHitCount[gMissionNumber] = gHitCount; Map_8019F910(); Map_8019FD1C(gCurrentLevel, 0); @@ -1534,7 +1534,7 @@ void Map_8019F42C(void) { if (gMissionNumber != 0) { for (i = 0; i < gMissionNumber; i++) { - D_menu_801CD8E0[i] = Map_GetPathId(D_ctx_80177B90[i], D_ctx_80177B90[i + 1]); + D_menu_801CD8E0[i] = Map_GetPathId(gMissionPlanet[i], gMissionPlanet[i + 1]); } } @@ -1559,8 +1559,8 @@ void Map_8019F42C(void) { void Map_8019F600(void) { s32 i; - s32 sp18; - s32 temp_t4; + s32 path1; + s32 path2; gTotalHits = 0; gHitCount = 0; @@ -1568,58 +1568,59 @@ void Map_8019F600(void) { gTeamShields[TEAM_ID_FALCO] = 255; gTeamShields[TEAM_ID_SLIPPY] = 255; gTeamShields[TEAM_ID_PEPPY] = 255; - gSavedTeamShields[1] = 255; - gSavedTeamShields[2] = 255; - gSavedTeamShields[3] = 255; - gPrevPlanetTeamShields[1] = 255; - gPrevPlanetTeamShields[2] = 255; - gPrevPlanetTeamShields[3] = 255; - D_ctx_80177C58[1] = 255; - D_ctx_80177C58[2] = 255; - D_ctx_80177C58[3] = 255; + gSavedTeamShields[TEAM_ID_FALCO] = 255; + gSavedTeamShields[TEAM_ID_SLIPPY] = 255; + gSavedTeamShields[TEAM_ID_PEPPY] = 255; + gPrevPlanetTeamShields[TEAM_ID_FALCO] = 255; + gPrevPlanetTeamShields[TEAM_ID_SLIPPY] = 255; + gPrevPlanetTeamShields[TEAM_ID_PEPPY] = 255; + D_ctx_80177C58[TEAM_ID_FALCO] = 255; + D_ctx_80177C58[TEAM_ID_SLIPPY] = 255; + D_ctx_80177C58[TEAM_ID_PEPPY] = 255; - D_menu_801CD950 = -1; + sPrevPlanetId = PLANET_NONE; - for (i = 0; i < 15; i++) { + for (i = 0; i < ARRAY_COUNT(sPlanets); i++) { sPlanets[i].alpha = 0; } D_menu_801CD970 = 0; - for (i = 0; i < 24; i++) { + //! @bug gPlanetPathStatus is 2 shorter than sPaths + for (i = 0; i < ARRAY_COUNT(sPaths); i++) { gPlanetPathStatus[i] = 0; gTexturedLines[i].unk_24 = 0.0f; } - for (i = 0; i < 7; i++) { - D_ctx_80177BB0[i] = 0; - D_ctx_80177B70[i] = 0; - D_ctx_80177B50[i] = 0x00FFFFFF; + for (i = 0; i < ARRAY_COUNT(gMissionMedal); i++) { + gMissionMedal[i] = 0; + gMissionHitCount[i] = 0; + gMissionTeamStatus[i] = 0x00FFFFFF; } - D_ctx_80177B90[0] = PLANET_CORNERIA; - D_ctx_80177B90[1] = PLANET_NONE; - D_ctx_80177B90[2] = PLANET_NONE; - D_ctx_80177B90[3] = PLANET_NONE; - D_ctx_80177B90[4] = PLANET_NONE; - D_ctx_80177B90[5] = PLANET_NONE; - D_ctx_80177B90[6] = PLANET_VENOM; + gMissionPlanet[0] = PLANET_CORNERIA; + gMissionPlanet[1] = PLANET_NONE; + gMissionPlanet[2] = PLANET_NONE; + gMissionPlanet[3] = PLANET_NONE; + gMissionPlanet[4] = PLANET_NONE; + gMissionPlanet[5] = PLANET_NONE; + gMissionPlanet[6] = PLANET_VENOM; - for (i = 0; i < 24; i++) { + for (i = 0; i < ARRAY_COUNT(sPaths); i++) { sPaths[i].alpha = 255; } gMissionNumber = 0; - gCurrentLevel = 0; + gCurrentLevel = LEVEL_CORNERIA; - sCurrentPlanetId = 9; + sCurrentPlanetId = PLANET_CORNERIA; D_menu_801CEA9C = 0.0f; D_menu_801CD9B0 = 0.002f; D_menu_801CD9B4 = 0.01f; D_menu_801CD944 = 0; - sp18 = Map_GetPathId(sCurrentPlanetId, sPlanets[sCurrentPlanetId].dest1); - temp_t4 = Map_GetPathId(sCurrentPlanetId, sPlanets[sCurrentPlanetId].dest2); - gPlanetPathStatus[sp18] = 1; - gPlanetPathStatus[temp_t4] = 1; + path1 = Map_GetPathId(sCurrentPlanetId, sPlanets[sCurrentPlanetId].dest1); + path2 = Map_GetPathId(sCurrentPlanetId, sPlanets[sCurrentPlanetId].dest2); + gPlanetPathStatus[path1] = 1; + gPlanetPathStatus[path2] = 1; } void Map_8019F83C(void) { @@ -1648,9 +1649,9 @@ void Map_8019F910(void) { for (i = 0; i < 3; i++) { if (gTeamShields[3 - i] <= 0) { - D_ctx_80177B50[gMissionNumber] ^= mask; + gMissionTeamStatus[gMissionNumber] ^= mask; } else { - D_ctx_80177B50[gMissionNumber] |= mask; + gMissionTeamStatus[gMissionNumber] |= mask; } mask >>= 8; } @@ -1690,10 +1691,10 @@ void Map_8019FC04(void) { } for (i = 0; i < 7; i++) { - if (D_ctx_80177B90[i] == PLANET_KATINA) { + if (gMissionPlanet[i] == PLANET_KATINA) { D_menu_801CEB48[1] = false; } - if (D_ctx_80177B90[i] == PLANET_SECTOR_Y) { + if (gMissionPlanet[i] == PLANET_SECTOR_Y) { D_menu_801CEB48[2] = false; } } @@ -2780,7 +2781,7 @@ void Map_801A281C(void) { D_menu_801CEECC = Map_GetPathId(sCurrentPlanetId, sNextPlanetId); - if (D_menu_801CD93C == 2) { + if (sPrevMissionStatus == MISSION_WARP) { gPlanetPathStatus[D_menu_801CEECC] = 5; sPaths[D_menu_801CEECC].unk_14 = 5; } else { @@ -2907,7 +2908,7 @@ void Map_801A2EB8(void) { s32 temp2; if (D_menu_801CD9C4 == 30) { - if (D_menu_801CD93C == 2) { + if (sPrevMissionStatus == MISSION_WARP) { AUDIO_PLAY_SFX(0x0900802A, gDefaultSfxSource, 4); } else { AUDIO_PLAY_SFX(0x09000032, gDefaultSfxSource, 4); @@ -2918,7 +2919,7 @@ void Map_801A2EB8(void) { if (D_menu_801CD9C4 == 80) { sCurrentPlanetId = sNextPlanetId; - D_ctx_80177B90[gMissionNumber] = sCurrentPlanetId; + gMissionPlanet[gMissionNumber] = sCurrentPlanetId; Map_801A6368(); } @@ -2982,7 +2983,7 @@ void Map_801A2EB8(void) { } if ((D_menu_801CEED8 == 5) && (D_menu_801CEEDC == 0.0f)) { - if (D_menu_801CD93C != 2) { + if (sPrevMissionStatus != MISSION_WARP) { sPaths[D_menu_801CEECC].unk_14 = 2; D_menu_801CEEA0 = 0; D_menu_801CEEA4 = 100; @@ -3482,7 +3483,7 @@ void Map_801A4AE8(void) { if (D_menu_801CF000[D_menu_801CEFDC] == 0) { if (D_menu_801CEFD0 != 0) { if (gLifeCount[gPlayerNum] != 0) { - func_8001D520(); + Audio_PlayDeathSequence(); D_menu_801CD9CC = 1; D_menu_801CD9D0 = 0; D_menu_801CD9B8 = 120; @@ -3508,7 +3509,7 @@ void Map_801A4AE8(void) { D_menu_801CD9CC = 0; var_a0 = D_menu_801CEFDC; - if (D_menu_801CD93C != 0) { + if (sPrevMissionStatus != MISSION_COMPLETE) { var_a0 += 2; } @@ -3555,7 +3556,7 @@ void Map_801A4D7C(void) { if (Map_801A5770() != 0) { D_menu_801CEFE8[D_menu_801CEFDC] = 255.0f; - if (D_menu_801CD93C != 0) { + if (sPrevMissionStatus != MISSION_COMPLETE) { if (D_menu_801CEFD4 < 0) { D_menu_801CEFDC++; if (D_menu_801CEFDC >= 3) { @@ -3583,18 +3584,19 @@ void Map_801A4D7C(void) { } if (gControllerPress[gMainController].button & (B_BUTTON | START_BUTTON)) { - func_8001D6DC(0); + Audio_PlayMapMenuSfx(0); D_menu_801CEFC4 = 0; D_menu_801CD944 = 3; return; } if (gControllerPress[gMainController].button & A_BUTTON) { - func_8001D6DC(0); + Audio_PlayMapMenuSfx(0); AUDIO_PLAY_SFX(0x49000003, gDefaultSfxSource, 4); D_menu_801CF000[D_menu_801CEFDC] = 10; - if (((D_menu_801CD93C != 0) && (D_menu_801CEFDC == 2)) || ((D_menu_801CD93C == 0) && (D_menu_801CEFDC == 1))) { + if (((sPrevMissionStatus != MISSION_COMPLETE) && (D_menu_801CEFDC == 2)) || + ((sPrevMissionStatus == MISSION_COMPLETE) && (D_menu_801CEFDC == 1))) { D_menu_801CEFD0 = 1; D_menu_801CF00C = 10; } @@ -3656,17 +3658,17 @@ void Map_801A4FC4(void) { D_menu_801CEEA8 = 255; D_menu_801CEEAC = 255; - gTotalHits -= D_ctx_80177B70[gMissionNumber - 1]; - D_ctx_80177B90[gMissionNumber] = PLANET_NONE; - D_ctx_80177B70[gMissionNumber - 1] = 0; - D_ctx_80177BB0[gMissionNumber - 1] = 0; - D_ctx_80177B50[gMissionNumber - 1] = 0x00FFFFFF; + gTotalHits -= gMissionHitCount[gMissionNumber - 1]; + gMissionPlanet[gMissionNumber] = PLANET_NONE; + gMissionHitCount[gMissionNumber - 1] = 0; + gMissionMedal[gMissionNumber - 1] = 0; + gMissionTeamStatus[gMissionNumber - 1] = 0x00FFFFFF; gHitCount = 0; gMissionNumber--; D_menu_801CD83C = Map_801A05B4(); - sCurrentPlanetId = D_menu_801CD950; + sCurrentPlanetId = sPrevPlanetId; if (sPlanets[sCurrentPlanetId].dest1 != PLANET_NONE) { temp2 = Map_GetPathId(sCurrentPlanetId, sPlanets[sCurrentPlanetId].dest1); @@ -3712,11 +3714,11 @@ void Map_801A53C8(void) { sPaths[D_menu_801CEECC].alpha = 0; sPaths[D_menu_801CEECC].unk_14 = 0; - sCurrentPlanetId = D_menu_801CD950; + sCurrentPlanetId = sPrevPlanetId; if (!D_menu_801CEFD8) { sNextPlanetId = sPlanets[sCurrentPlanetId].dest1; - } else if (D_menu_801CD93C != 2) { + } else if (sPrevMissionStatus != MISSION_WARP) { if (sPlanets[sCurrentPlanetId].dest2 != PLANET_NONE) { sNextPlanetId = sPlanets[sCurrentPlanetId].dest2; } else { @@ -3747,7 +3749,7 @@ void Map_801A53C8(void) { D_menu_801CEEAC = 255; sCurrentPlanetId = sNextPlanetId; - D_ctx_80177B90[gMissionNumber] = sCurrentPlanetId; + gMissionPlanet[gMissionNumber] = sCurrentPlanetId; Map_801A6368(); @@ -3820,7 +3822,7 @@ void Map_801A5834(void) { } var_t0 = 1; - if (D_menu_801CD93C == 0) { + if (sPrevMissionStatus == MISSION_COMPLETE) { var_t0 = 0; } @@ -3850,7 +3852,7 @@ void Map_801A5834(void) { z = 24.0f; colorIndex++; - if (D_menu_801CD93C != 0) { + if (sPrevMissionStatus != MISSION_COMPLETE) { mask = 0xFFFFFFFF; if (D_menu_801CF000[colorIndex] != 0) { mask = 0x00000001; @@ -4261,7 +4263,7 @@ void Map_801A659C(void) { Audio_KillSfxById(0x1100004C); Audio_KillSfxById(0x1100204C); - if (sCurrentPlanetId != 9) { + if (sCurrentPlanetId != PLANET_CORNERIA) { AUDIO_PLAY_SFX(0x49000003, gDefaultSfxSource, 4); } @@ -4565,7 +4567,7 @@ void Map_801A6EC0(PlanetId planetId) { void Map_801A7230(PlanetId planetId) { switch (sPlanets[planetId].anim) { case PL_ANIM_STATIC: - if ((D_menu_801CD944 == 3 || planetId == sCurrentPlanetId || planetId == sNextPlanetId) && + if (((D_menu_801CD944 == 3) || (planetId == sCurrentPlanetId) || (planetId == sNextPlanetId)) && D_menu_801CD944 != 1 && D_menu_801CD944 != 7) { RCP_SetupDL(&gMasterDisp, 0x35); } else { @@ -4575,7 +4577,7 @@ void Map_801A7230(PlanetId planetId) { break; case PL_ANIM_ROTATE_Y: - if ((D_menu_801CD944 == 3 || planetId == sCurrentPlanetId || planetId == sNextPlanetId) && + if (((D_menu_801CD944 == 3) || (planetId == sCurrentPlanetId) || (planetId == sNextPlanetId)) && D_menu_801CD944 != 1 && D_menu_801CD944 != 7) { RCP_SetupDL(&gMasterDisp, 0x17); } else { @@ -5181,7 +5183,7 @@ void Map_801A9224(void) { mask = 0xFFFFFFFF; } - if ((D_menu_801CD944 == 3) || ((sCurrentPlanetId == 0) && (D_menu_801CD944 != 7))) { + if ((D_menu_801CD944 == 3) || ((sCurrentPlanetId == PLANET_METEO) && (D_menu_801CD944 != 7))) { RCP_SetupDL(&gMasterDisp, 0x35); } else { RCP_SetupDL(&gMasterDisp, 0x40); @@ -5493,9 +5495,9 @@ void Map_801A9FD4(s32 arg0) { Matrix_SetGfxMtx(&gMasterDisp); for (var_fs0 = 0.0f, var_fs1 = -41.5f, i = 0; i < var_s3; i++, var_fs0 += 24.0f + temp, var_fs1 += 13.8f) { - if (D_ctx_80177B90[i] != PLANET_NONE) { - Map_801AA434(i, 28.0f + var_fs0, 182.0f, D_ctx_80177B90[i]); - Map_801AA778(i, var_fs1, -25.4f, D_ctx_80177B90[i]); + if (gMissionPlanet[i] != PLANET_NONE) { + Map_801AA434(i, 28.0f + var_fs0, 182.0f, gMissionPlanet[i]); + Map_801AA778(i, var_fs1, -25.4f, gMissionPlanet[i]); } } @@ -5511,7 +5513,7 @@ void Map_801AA1CC(s32 arg0) { s32 temp; f32 y = 182.0f; f32 x2 = 16.0f; - PlanetId* ptr = &D_ctx_80177B90[0]; + PlanetId* ptr = &gMissionPlanet[0]; for (x = 0.0f, i = 0; i < 7; i++, x += 24.0f + x2, ptr++) { RCP_SetupDL(&gMasterDisp, 0x53); @@ -5567,8 +5569,8 @@ void Map_801AA434(s32 arg0, f32 x, f32 y, s32 idx) { Graphics_DisplaySmallText(x + 12.0f - Graphics_GetSmallTextWidth(sPlanetNames[idx]) * 0.5f, y - 8.0f, 1.0f, 1.0f, sPlanetNames[idx]); - Graphics_DisplaySmallNumber(x + 15.0f - ((func_hud_8008BCBC(D_ctx_80177B70[arg0]) - 1) * 8), y + 24.0f + 1.0f, - D_ctx_80177B70[arg0]); + Graphics_DisplaySmallNumber(x + 15.0f - ((func_hud_8008BCBC(gMissionHitCount[arg0]) - 1) * 8), y + 24.0f + 1.0f, + gMissionHitCount[arg0]); if (D_game_80161A34 == 7) { temp = gMissionNumber; @@ -5581,7 +5583,7 @@ void Map_801AA434(s32 arg0, f32 x, f32 y, s32 idx) { mask = 0x00FF0000; x2 = 0.0f; for (i = 0; i < 3; i++, x2 += 9.0f) { - if ((D_ctx_80177B50[arg0] & mask)) { + if ((gMissionTeamStatus[arg0] & mask)) { RCP_SetupDL(&gMasterDisp, 0x53); gDPSetPrimColor(gMasterDisp++, 0, 0, D_menu_801B6ADC[i], D_menu_801B6AE8[i], D_menu_801B6AF4[i], 255); Graphics_DisplaySmallText((s32) x + x2 - 1.0f, (s32) y + 24.0f + 8.0f + 2.0f, 1.0f, 1.0f, @@ -5753,7 +5755,7 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { break; } - if (D_ctx_80177BB0[arg0] != 0) { + if (gMissionMedal[arg0] != 0) { Map_801AB17C(x, y, 0.0f); } } @@ -6560,8 +6562,8 @@ void Map_801AD11C(void) { var_t0 = 0; if (gControllerPress[gMainController].button & A_BUTTON) { - if ((D_game_80161A34 == 7) && (D_menu_801CD93C != 0) && (!D_menu_801CEFD0)) { - func_8001D6DC(1); + if ((D_game_80161A34 == 7) && (sPrevMissionStatus != MISSION_COMPLETE) && (!D_menu_801CEFD0)) { + Audio_PlayMapMenuSfx(1); D_menu_801CEFC4 = 1; D_menu_801CEFD4 = 0; D_menu_801CEFDC = 0; @@ -6581,7 +6583,7 @@ void Map_801AD11C(void) { if (D_menu_801CEFD0) { AUDIO_PLAY_SFX(0x4900100A, gDefaultSfxSource, 4); } else { - func_8001D6DC(1); + Audio_PlayMapMenuSfx(1); D_menu_801CEFC4 = 1; D_menu_801CEFD4 = 0; D_menu_801CEFDC = 0; @@ -6620,11 +6622,11 @@ void Map_801AD11C(void) { if (var_a1 < var_a2) { var_a0 = var_a2; } - func_8001D15C(var_a0); + Audio_SetSfxMapModulation(var_a0); } if (D_menu_801CF014 == 0 && var_a3 == 1) { - func_8001D10C(gDefaultSfxSource, 0x1100204C); + Audio_PlaySfxModulated(gDefaultSfxSource, 0x1100204C); D_menu_801CF014 = 1; } diff --git a/src/overlays/ovl_menu/fox_option.c b/src/overlays/ovl_menu/fox_option.c index af8ece76..d2c945dd 100644 --- a/src/overlays/ovl_menu/fox_option.c +++ b/src/overlays/ovl_menu/fox_option.c @@ -435,8 +435,8 @@ void Option_Setup(void) { if ((D_game_80161A34 == 5) || (D_game_80161A34 == 8)) { if (D_game_80161A34 == 8) { - D_ctx_80177B90[gMissionNumber] = PLANET_VENOM; - if (D_play_800D3180[LEVEL_VENOM_ANDROSS] == 1) { + gMissionPlanet[gMissionNumber] = PLANET_VENOM; + if (gLeveLClearStatus[LEVEL_VENOM_ANDROSS] == 1) { gSaveFile.save.data.planet[SAVE_SLOT_VENOM_1].played = 1; if (playedExpertMode) { gSaveFile.save.data.planet[SAVE_SLOT_VENOM_1].expertClear = 1; @@ -444,8 +444,8 @@ void Option_Setup(void) { gSaveFile.save.data.planet[SAVE_SLOT_VENOM_1].normalClear = 1; } Save_Write(); - } else if (D_play_800D3180[LEVEL_VENOM_ANDROSS] == 2) { - D_ctx_80177BB0[gMissionNumber] = 1; + } else if (gLeveLClearStatus[LEVEL_VENOM_ANDROSS] == 2) { + gMissionMedal[gMissionNumber] = 1; gSaveFile.save.data.planet[SAVE_SLOT_VENOM_2].played = 1; if (playedExpertMode) { gSaveFile.save.data.planet[SAVE_SLOT_VENOM_2].expertClear = 1; @@ -3836,9 +3836,9 @@ s32 Option_8019C8C4(void) { s32 temp[10]; for (i = 0; i < gMissionNumber + 1; i++) { - var_v0 += ((D_ctx_80177B50[i] & 0x00FF0000) >> 16) & 1; - var_v0 += ((D_ctx_80177B50[i] & 0x0000FF00) >> 8) & 1; - var_v0 += (D_ctx_80177B50[i] & 0x000000FF) & 1; + var_v0 += ((gMissionTeamStatus[i] & 0x00FF0000) >> 16) & 1; + var_v0 += ((gMissionTeamStatus[i] & 0x0000FF00) >> 8) & 1; + var_v0 += (gMissionTeamStatus[i] & 0x000000FF) & 1; } for (i = 0; i < 10; i++) { @@ -4155,13 +4155,13 @@ void Option_8019D624(void) { sp10A[10] = 0; for (i = 0; i < 7; i++) { - sp10A[10] |= (D_ctx_80177BB0[i] << i); + sp10A[10] |= (gMissionMedal[i] << i); } for (j = 0; j < 7; j++) { var_s0[10][j].unk_C = 0; - var_t2 = D_ctx_80177B70[j]; + var_t2 = gMissionHitCount[j]; if (var_t2 > 255) { var_t2 = var_t2 - 256; @@ -4170,21 +4170,21 @@ void Option_8019D624(void) { var_s0[10][j].unk_0 = var_t2; - var_a0 = D_ctx_80177B90[j]; + var_a0 = gMissionPlanet[j]; - if (D_ctx_80177B90[j] == PLANET_VENOM) { + if (gMissionPlanet[j] == PLANET_VENOM) { var_a0 = SAVE_SLOT_VENOM_1; } - if (D_ctx_80177B90[j] == PLANET_SOLAR) { + if (gMissionPlanet[j] == PLANET_SOLAR) { var_a0 = SAVE_SLOT_SOLAR; } var_s0[10][j].unk_8 = var_a0; - var_s0[10][j].unk_D = ((D_ctx_80177B50[j] & 0x00FF0000) >> 16) & 1; - var_s0[10][j].unk_F = ((D_ctx_80177B50[j] & 0x0000FF00) >> 8) & 1; - var_s0[10][j].unk_E = (D_ctx_80177B50[j] & 0x000000FF) & 1; + var_s0[10][j].unk_D = ((gMissionTeamStatus[j] & 0x00FF0000) >> 16) & 1; + var_s0[10][j].unk_F = ((gMissionTeamStatus[j] & 0x0000FF00) >> 8) & 1; + var_s0[10][j].unk_E = (gMissionTeamStatus[j] & 0x000000FF) & 1; } for (i = 0; i < 10; i++) { diff --git a/src/overlays/ovl_menu/fox_title.c b/src/overlays/ovl_menu/fox_title.c index d6f6897c..21d2077d 100644 --- a/src/overlays/ovl_menu/fox_title.c +++ b/src/overlays/ovl_menu/fox_title.c @@ -1651,7 +1651,7 @@ void Title_8018B5C4(void) { D_menu_801B7BEC = 0; Title_8018B058(); - Audio_SetBaseSfxReverb(0x68); + Audio_SetEnvSfxReverb(104); D_menu_801B82A8 = 30; @@ -1861,7 +1861,7 @@ void Title_8018B5C4(void) { D_menu_801B86AC); if (D_menu_801B82B4 > 8) { - Audio_SetBaseSfxReverb(0); + Audio_SetEnvSfxReverb(0); D_menu_801B82C0 = 0; D_menu_801B82C4 = 5; } diff --git a/src/sys/sys_fault.c b/src/sys/sys_fault.c index 864a3be7..04dc5ea4 100644 --- a/src/sys/sys_fault.c +++ b/src/sys/sys_fault.c @@ -230,12 +230,12 @@ void Fault_ThreadEntry(void* arg0) { var_s0 = 0; var_s2 = 0; - osSetEventMesg(OS_EVENT_CPU_BREAK, &gFaultMgr.msgQueue, (OSMesg) FAULT_MESG_BREAK); - osSetEventMesg(OS_EVENT_FAULT, &gFaultMgr.msgQueue, (OSMesg) FAULT_MESG_FAULT); + osSetEventMesg(OS_EVENT_CPU_BREAK, &gFaultMgr.mesgQueue, (OSMesg) FAULT_MESG_BREAK); + osSetEventMesg(OS_EVENT_FAULT, &gFaultMgr.mesgQueue, (OSMesg) FAULT_MESG_FAULT); sp40 = NULL; while (sp40 == NULL) { - osRecvMesg(&gFaultMgr.msgQueue, &sp44, OS_MESG_BLOCK); + MQ_WAIT_FOR_MESG(&gFaultMgr.mesgQueue, &sp44); sp40 = func_80007CEC(); } @@ -244,8 +244,8 @@ void Fault_ThreadEntry(void* arg0) { #if 1 // Turn this off for instant crash debugger (no button combination needed) while (var_s5 == 0) { - osSendMesg(&gSerialThreadMsgQueue, (OSMesg) SI_READ_CONTROLLER, OS_MESG_PRI_NORMAL); - osRecvMesg(&gControllerMsgQueue, NULL, OS_MESG_BLOCK); + osSendMesg(&gSerialThreadMesgQueue, (OSMesg) SI_READ_CONTROLLER, OS_MESG_NOBLOCK); + MQ_WAIT_FOR_MESG(&gControllerMesgQueue, NULL); Controller_UpdateInput(); switch (var_s0) { case 0: @@ -332,7 +332,7 @@ void Fault_Init(void) { gFaultMgr.fb = (FrameBuffer*) (PHYS_TO_K0(osMemSize) - sizeof(FrameBuffer)); gFaultMgr.width = SCREEN_WIDTH; gFaultMgr.height = SCREEN_HEIGHT; - osCreateMesgQueue(&gFaultMgr.msgQueue, &gFaultMgr.msg, 1); + osCreateMesgQueue(&gFaultMgr.mesgQueue, &gFaultMgr.msg, 1); osCreateThread(&gFaultMgr.thread, THREAD_ID_FAULT, Fault_ThreadEntry, 0, gFaultMgr.stack + sizeof(gFaultMgr.stack), 127); osStartThread(&gFaultMgr.thread); diff --git a/src/sys/sys_joybus.c b/src/sys/sys_joybus.c index ea64bb6a..cbdbf1ce 100644 --- a/src/sys/sys_joybus.c +++ b/src/sys/sys_joybus.c @@ -88,33 +88,33 @@ void Controller_ReadData(void) { } } else { osContStartReadData(&gSerialEventQueue); - osRecvMesg(&gSerialEventQueue, NULL, OS_MESG_BLOCK); + MQ_WAIT_FOR_MESG(&gSerialEventQueue, NULL); osContGetReadData(sNextController); } - osSendMesg(&gControllerMsgQueue, (OSMesg) SI_CONT_READ_DONE, OS_MESG_PRI_NORMAL); + osSendMesg(&gControllerMesgQueue, (OSMesg) SI_CONT_READ_DONE, OS_MESG_NOBLOCK); } void Save_ReadData(void) { if ((gStartNMI == 0) && (Save_ReadEeprom(&gSaveIOBuffer) == 0)) { - osSendMesg(&gSaveMsgQueue, (OSMesg) SI_SAVE_SUCCESS, OS_MESG_PRI_NORMAL); + osSendMesg(&gSaveMesgQueue, (OSMesg) SI_SAVE_SUCCESS, OS_MESG_NOBLOCK); return; } - osSendMesg(&gSaveMsgQueue, (OSMesg) SI_SAVE_FAILED, OS_MESG_PRI_NORMAL); + osSendMesg(&gSaveMesgQueue, (OSMesg) SI_SAVE_FAILED, OS_MESG_NOBLOCK); } void Save_WriteData(void) { if ((gStartNMI == 0) && (Save_WriteEeprom(&gSaveIOBuffer) == 0)) { - osSendMesg(&gSaveMsgQueue, (OSMesg) SI_SAVE_SUCCESS, OS_MESG_PRI_NORMAL); + osSendMesg(&gSaveMesgQueue, (OSMesg) SI_SAVE_SUCCESS, OS_MESG_NOBLOCK); return; } - osSendMesg(&gSaveMsgQueue, (OSMesg) SI_SAVE_FAILED, OS_MESG_PRI_NORMAL); + osSendMesg(&gSaveMesgQueue, (OSMesg) SI_SAVE_FAILED, OS_MESG_NOBLOCK); } void Controller_Rumble(void) { s32 i; osContStartQuery(&gSerialEventQueue); - osRecvMesg(&gSerialEventQueue, NULL, OS_MESG_BLOCK); + MQ_WAIT_FOR_MESG(&gSerialEventQueue, NULL); osContGetQuery(sControllerStatus); for (i = 0; i < 4; i++) { diff --git a/src/sys/sys_lib.c b/src/sys/sys_lib.c index 702c3a19..9360abc0 100644 --- a/src/sys/sys_lib.c +++ b/src/sys/sys_lib.c @@ -105,15 +105,15 @@ void Lib_DmaRead(void* src, void* dst, ptrdiff_t size) { osInvalICache(dst, size); osInvalDCache(dst, size); while (size > 0x100) { - osPiStartDma(&gDmaIOMsg, 0, 0, (uintptr_t) src, dst, 0x100, &gDmaMsgQueue); + osPiStartDma(&gDmaIOMsg, 0, 0, (uintptr_t) src, dst, 0x100, &gDmaMesgQueue); size -= 0x100; src = (void*) ((uintptr_t) src + 0x100); dst = (void*) ((uintptr_t) dst + 0x100); - osRecvMesg(&gDmaMsgQueue, NULL, OS_MESG_BLOCK); + MQ_WAIT_FOR_MESG(&gDmaMesgQueue, NULL); } if (size != 0) { - osPiStartDma(&gDmaIOMsg, 0, 0, (uintptr_t) src, dst, size, &gDmaMsgQueue); - osRecvMesg(&gDmaMsgQueue, NULL, OS_MESG_BLOCK); + osPiStartDma(&gDmaIOMsg, 0, 0, (uintptr_t) src, dst, size, &gDmaMesgQueue); + MQ_WAIT_FOR_MESG(&gDmaMesgQueue, NULL); } } diff --git a/src/sys/sys_main.c b/src/sys/sys_main.c index 7ba1f708..1d16f407 100644 --- a/src/sys/sys_main.c +++ b/src/sys/sys_main.c @@ -12,32 +12,32 @@ u32 gSegments[16]; // 800E1FD0 OSMesgQueue gPiMgrCmdQueue; // 800E2010 OSMesg sPiMgrCmdBuff[50]; // 800E2028 -OSMesgQueue gDmaMsgQueue; +OSMesgQueue gDmaMesgQueue; void* sDmaMsgBuff[1]; OSIoMesg gDmaIOMsg; OSMesgQueue gSerialEventQueue; void* sSerialEventBuff[1]; -OSMesgQueue gMainThreadMsgQueue; +OSMesgQueue gMainThreadMesgQueue; void* sMainThreadMsgBuff[32]; -OSMesgQueue gTaskMsgQueue; +OSMesgQueue gTaskMesgQueue; void* sTaskMsgBuff[16]; -OSMesgQueue gAudioVImsgQueue; +OSMesgQueue gAudioVImesgQueue; void* sAudioVImsgBuff[1]; -OSMesgQueue gAudioTaskMsgQueue; +OSMesgQueue gAudioTaskMesgQueue; void* sAudioTaskMsgBuff[1]; -OSMesgQueue gGfxVImsgQueue; +OSMesgQueue gGfxVImesgQueue; void* sGfxVImsgBuff[4]; -OSMesgQueue gGfxTaskMsgQueue; +OSMesgQueue gGfxTaskMesgQueue; void* sGfxTaskMsgBuff[2]; -OSMesgQueue gSerialThreadMsgQueue; +OSMesgQueue gSerialThreadMesgQueue; void* sSerialThreadMsgBuff[8]; -OSMesgQueue gControllerMsgQueue; +OSMesgQueue gControllerMesgQueue; void* sControllerMsgBuff[1]; -OSMesgQueue gSaveMsgQueue; +OSMesgQueue gSaveMesgQueue; void* sSaveMsgBuff[1]; -OSMesgQueue gTimerTaskMsgQueue; +OSMesgQueue gTimerTaskMesgQueue; void* sTimerTaskMsgBuff[16]; -OSMesgQueue gTimerWaitMsgQueue; +OSMesgQueue gTimerWaitMesgQueue; void* sTimerWaitMsgBuff[1]; GfxPool gGfxPools[2]; @@ -107,28 +107,28 @@ void Audio_ThreadEntry(void* arg0) { Audio_InitSounds(); task = AudioThread_CreateTask(); if (task != NULL) { - task->msgQueue = &gAudioTaskMsgQueue; + task->mesgQueue = &gAudioTaskMesgQueue; task->msg = (OSMesg) TASK_MESG_1; osWritebackDCacheAll(); - osSendMesg(&gTaskMsgQueue, task, OS_MESG_PRI_NORMAL); + osSendMesg(&gTaskMesgQueue, task, OS_MESG_NOBLOCK); } while (1) { task = AudioThread_CreateTask(); if (task != NULL) { - task->msgQueue = &gAudioTaskMsgQueue; + task->mesgQueue = &gAudioTaskMesgQueue; task->msg = (OSMesg) TASK_MESG_1; osWritebackDCacheAll(); } - osRecvMesg(&gAudioTaskMsgQueue, NULL, OS_MESG_NOBLOCK); + MQ_GET_MESG(&gAudioTaskMesgQueue, NULL); if (task != NULL) { - osSendMesg(&gTaskMsgQueue, task, OS_MESG_PRI_NORMAL); + osSendMesg(&gTaskMesgQueue, task, OS_MESG_NOBLOCK); } - osRecvMesg(&gAudioVImsgQueue, NULL, OS_MESG_BLOCK); + MQ_WAIT_FOR_MESG(&gAudioVImesgQueue, NULL); } } void Graphics_SetTask(void) { - gGfxTask->msgQueue = &gGfxTaskMsgQueue; + gGfxTask->mesgQueue = &gGfxTaskMesgQueue; gGfxTask->msg = (OSMesg) TASK_MESG_2; gGfxTask->task.t.type = M_GFXTASK; gGfxTask->task.t.flags = 0; @@ -147,7 +147,7 @@ void Graphics_SetTask(void) { gGfxTask->task.t.yield_data_ptr = (u64*) &gOSYieldData; gGfxTask->task.t.yield_data_size = OS_YIELD_DATA_SIZE; osWritebackDCacheAll(); - osSendMesg(&gTaskMsgQueue, gGfxTask, OS_MESG_PRI_NORMAL); + osSendMesg(&gTaskMesgQueue, gGfxTask, OS_MESG_NOBLOCK); } void Graphics_InitializeTask(u32 frameCount) { @@ -200,7 +200,7 @@ void SerialInterface_ThreadEntry(void* arg0) { Controller_Init(); while (1) { - osRecvMesg(&gSerialThreadMsgQueue, &sp34, OS_MESG_BLOCK); + MQ_WAIT_FOR_MESG(&gSerialThreadMesgQueue, &sp34); switch ((s32) sp34) { case SI_READ_CONTROLLER: @@ -223,7 +223,7 @@ void Timer_ThreadEntry(void* arg0) { void* sp24; while (1) { - osRecvMesg(&gTimerTaskMsgQueue, &sp24, OS_MESG_BLOCK); + MQ_WAIT_FOR_MESG(&gTimerTaskMesgQueue, &sp24); Timer_CompleteTask(sp24); } } @@ -234,7 +234,7 @@ void Graphics_ThreadEntry(void* arg0) { u8 validVIsPerFrame; Game_Initialize(); - osSendMesg(&gSerialThreadMsgQueue, (OSMesg) SI_READ_CONTROLLER, OS_MESG_PRI_NORMAL); + osSendMesg(&gSerialThreadMesgQueue, (OSMesg) SI_READ_CONTROLLER, OS_MESG_NOBLOCK); Graphics_InitializeTask(gSysFrameCount); { gSPSegment(gUnkDisp1++, 0, 0); @@ -250,10 +250,10 @@ void Graphics_ThreadEntry(void* arg0) { while (1) { gSysFrameCount++; Graphics_InitializeTask(gSysFrameCount); - osRecvMesg(&gControllerMsgQueue, NULL, OS_MESG_BLOCK); - osSendMesg(&gSerialThreadMsgQueue, (OSMesg) SI_RUMBLE, OS_MESG_PRI_NORMAL); + MQ_WAIT_FOR_MESG(&gControllerMesgQueue, NULL); + osSendMesg(&gSerialThreadMesgQueue, (OSMesg) SI_RUMBLE, OS_MESG_NOBLOCK); Controller_UpdateInput(); - osSendMesg(&gSerialThreadMsgQueue, (OSMesg) SI_READ_CONTROLLER, OS_MESG_PRI_NORMAL); + osSendMesg(&gSerialThreadMesgQueue, (OSMesg) SI_READ_CONTROLLER, OS_MESG_NOBLOCK); if (gControllerPress[3].button & U_JPAD) { Main_SetVIMode(); } @@ -270,7 +270,7 @@ void Graphics_ThreadEntry(void* arg0) { gDPFullSync(gMasterDisp++); gSPEndDisplayList(gMasterDisp++); } - osRecvMesg(&gGfxTaskMsgQueue, NULL, OS_MESG_BLOCK); + MQ_WAIT_FOR_MESG(&gGfxTaskMesgQueue, NULL); Graphics_SetTask(); if (gFillScreen == 0) { osViSwapBuffer(&gFrameBuffers[(gSysFrameCount - 1) % 3]); @@ -278,9 +278,9 @@ void Graphics_ThreadEntry(void* arg0) { func_80007FE4(&gFrameBuffers[(gSysFrameCount - 1) % 3], SCREEN_WIDTH, 16); visPerFrame = MIN(gVIsPerFrame, 4); - validVIsPerFrame = MAX(visPerFrame, gGfxVImsgQueue.validCount + 1); + validVIsPerFrame = MAX(visPerFrame, gGfxVImesgQueue.validCount + 1); for (i = 0; i < validVIsPerFrame; i += 1) { // Can't be ++ - osRecvMesg(&gGfxVImsgQueue, NULL, OS_MESG_BLOCK); + MQ_WAIT_FOR_MESG(&gGfxVImesgQueue, NULL); } Audio_Update(); @@ -288,38 +288,39 @@ void Graphics_ThreadEntry(void* arg0) { } void Main_InitMesgQueues(void) { - osCreateMesgQueue(&gDmaMsgQueue, sDmaMsgBuff, ARRAY_COUNT(sDmaMsgBuff)); - osCreateMesgQueue(&gTaskMsgQueue, sTaskMsgBuff, ARRAY_COUNT(sTaskMsgBuff)); - osCreateMesgQueue(&gAudioVImsgQueue, sAudioVImsgBuff, ARRAY_COUNT(sAudioVImsgBuff)); - osCreateMesgQueue(&gAudioTaskMsgQueue, sAudioTaskMsgBuff, ARRAY_COUNT(sAudioTaskMsgBuff)); - osCreateMesgQueue(&gGfxVImsgQueue, sGfxVImsgBuff, ARRAY_COUNT(sGfxVImsgBuff)); - osCreateMesgQueue(&gGfxTaskMsgQueue, sGfxTaskMsgBuff, ARRAY_COUNT(sGfxTaskMsgBuff)); + osCreateMesgQueue(&gDmaMesgQueue, sDmaMsgBuff, ARRAY_COUNT(sDmaMsgBuff)); + osCreateMesgQueue(&gTaskMesgQueue, sTaskMsgBuff, ARRAY_COUNT(sTaskMsgBuff)); + osCreateMesgQueue(&gAudioVImesgQueue, sAudioVImsgBuff, ARRAY_COUNT(sAudioVImsgBuff)); + osCreateMesgQueue(&gAudioTaskMesgQueue, sAudioTaskMsgBuff, ARRAY_COUNT(sAudioTaskMsgBuff)); + osCreateMesgQueue(&gGfxVImesgQueue, sGfxVImsgBuff, ARRAY_COUNT(sGfxVImsgBuff)); + osCreateMesgQueue(&gGfxTaskMesgQueue, sGfxTaskMsgBuff, ARRAY_COUNT(sGfxTaskMsgBuff)); osCreateMesgQueue(&gSerialEventQueue, sSerialEventBuff, ARRAY_COUNT(sSerialEventBuff)); osSetEventMesg(OS_EVENT_SI, &gSerialEventQueue, NULL); - osCreateMesgQueue(&gMainThreadMsgQueue, sMainThreadMsgBuff, ARRAY_COUNT(sMainThreadMsgBuff)); - osViSetEvent(&gMainThreadMsgQueue, (OSMesg) EVENT_MESG_VI, 1); - osSetEventMesg(OS_EVENT_SP, &gMainThreadMsgQueue, (OSMesg) EVENT_MESG_SP); - osSetEventMesg(OS_EVENT_DP, &gMainThreadMsgQueue, (OSMesg) EVENT_MESG_DP); - osSetEventMesg(OS_EVENT_PRENMI, &gMainThreadMsgQueue, (OSMesg) EVENT_MESG_PRENMI); - osCreateMesgQueue(&gTimerTaskMsgQueue, sTimerTaskMsgBuff, ARRAY_COUNT(sTimerTaskMsgBuff)); - osCreateMesgQueue(&gTimerWaitMsgQueue, sTimerWaitMsgBuff, ARRAY_COUNT(sTimerWaitMsgBuff)); - osCreateMesgQueue(&gSerialThreadMsgQueue, sSerialThreadMsgBuff, ARRAY_COUNT(sSerialThreadMsgBuff)); - osCreateMesgQueue(&gControllerMsgQueue, sControllerMsgBuff, ARRAY_COUNT(sControllerMsgBuff)); - osCreateMesgQueue(&gSaveMsgQueue, sSaveMsgBuff, ARRAY_COUNT(sSaveMsgBuff)); + osCreateMesgQueue(&gMainThreadMesgQueue, sMainThreadMsgBuff, ARRAY_COUNT(sMainThreadMsgBuff)); + osViSetEvent(&gMainThreadMesgQueue, (OSMesg) EVENT_MESG_VI, 1); + osSetEventMesg(OS_EVENT_SP, &gMainThreadMesgQueue, (OSMesg) EVENT_MESG_SP); + osSetEventMesg(OS_EVENT_DP, &gMainThreadMesgQueue, (OSMesg) EVENT_MESG_DP); + osSetEventMesg(OS_EVENT_PRENMI, &gMainThreadMesgQueue, (OSMesg) EVENT_MESG_PRENMI); + osCreateMesgQueue(&gTimerTaskMesgQueue, sTimerTaskMsgBuff, ARRAY_COUNT(sTimerTaskMsgBuff)); + osCreateMesgQueue(&gTimerWaitMesgQueue, sTimerWaitMsgBuff, ARRAY_COUNT(sTimerWaitMsgBuff)); + osCreateMesgQueue(&gSerialThreadMesgQueue, sSerialThreadMsgBuff, ARRAY_COUNT(sSerialThreadMsgBuff)); + osCreateMesgQueue(&gControllerMesgQueue, sControllerMsgBuff, ARRAY_COUNT(sControllerMsgBuff)); + osCreateMesgQueue(&gSaveMesgQueue, sSaveMsgBuff, ARRAY_COUNT(sSaveMsgBuff)); } void Main_HandleRDP(void) { - SPTask** var_v1 = sGfxTasks; + SPTask** task = sGfxTasks; u8 i; - if ((*var_v1)->msgQueue != NULL) { - osSendMesg((*var_v1)->msgQueue, (*var_v1)->msg, OS_MESG_PRI_NORMAL); + if ((*task)->mesgQueue != NULL) { + osSendMesg((*task)->mesgQueue, (*task)->msg, OS_MESG_NOBLOCK); } - (*var_v1)->state = SPTASK_STATE_FINISHED_DP; - for (i = 0; i < ARRAY_COUNT(sGfxTasks) - 1; i += 1, var_v1++) { - *var_v1 = *(var_v1 + 1); + (*task)->state = SPTASK_STATE_FINISHED_DP; + + for (i = 0; i < ARRAY_COUNT(sGfxTasks) - 1; i += 1, task++) { + *task = *(task + 1); } - *var_v1 = NULL; + *task = NULL; } void Main_HandleRSP(void) { @@ -333,8 +334,8 @@ void Main_HandleRSP(void) { } else { task->state = SPTASK_STATE_FINISHED; if (task->task.t.type == M_AUDTASK) { - if (task->msgQueue != NULL) { - osSendMesg(task->msgQueue, task->msg, OS_MESG_PRI_NORMAL); + if (task->mesgQueue != NULL) { + osSendMesg(task->mesgQueue, task->msg, OS_MESG_NOBLOCK); } sAudioTasks[0] = NULL; } @@ -361,7 +362,7 @@ void Main_GetNewTasks(void) { newAudioTask = sNewAudioTasks; newGfxTask = sNewGfxTasks; - while (osRecvMesg(&gTaskMsgQueue, &spTaskMsg, OS_MESG_NOBLOCK) != MSG_QUEUE_EMPTY) { + while (MQ_GET_MESG(&gTaskMesgQueue, &spTaskMsg)) { newTask = (SPTask*) spTaskMsg; newTask->state = SPTASK_STATE_NOT_STARTED; @@ -421,7 +422,7 @@ void Main_StartNextTask(void) { } void Main_ThreadEntry(void* arg0) { - OSMesg ogMsg; + OSMesg osMesg; u8 mesg; osCreateThread(&gAudioThread, THREAD_ID_AUDIO, Audio_ThreadEntry, arg0, @@ -440,13 +441,13 @@ void Main_ThreadEntry(void* arg0) { Main_InitMesgQueues(); while (true) { - osRecvMesg(&gMainThreadMsgQueue, &ogMsg, OS_MESG_BLOCK); - mesg = (u32) ogMsg; + MQ_WAIT_FOR_MESG(&gMainThreadMesgQueue, &osMesg); + mesg = (u32) osMesg; switch (mesg) { case EVENT_MESG_VI: - osSendMesg(&gAudioVImsgQueue, (OSMesg) EVENT_MESG_VI, OS_MESG_PRI_NORMAL); - osSendMesg(&gGfxVImsgQueue, (OSMesg) EVENT_MESG_VI, OS_MESG_PRI_NORMAL); + osSendMesg(&gAudioVImesgQueue, (OSMesg) EVENT_MESG_VI, OS_MESG_NOBLOCK); + osSendMesg(&gGfxVImesgQueue, (OSMesg) EVENT_MESG_VI, OS_MESG_NOBLOCK); Main_GetNewTasks(); break; case EVENT_MESG_SP: diff --git a/src/sys/sys_timer.c b/src/sys/sys_timer.c index 6e33932e..c3ffaa17 100644 --- a/src/sys/sys_timer.c +++ b/src/sys/sys_timer.c @@ -23,7 +23,7 @@ s32 Timer_CreateTask(u64 time, TimerAction action, s32* address, s32 value) { task->action = action; task->address = address; task->value = value; - return osSetTimer(&task->timer, time, 0, &gTimerTaskMsgQueue, task); + return osSetTimer(&task->timer, time, 0, &gTimerTaskMesgQueue, task); } void Timer_Increment(s32* address, s32 value) { @@ -45,6 +45,6 @@ void Timer_Wait(u64 time) { OSTimer timer; OSMesg dummy; - osSetTimer(&timer, time, 0, &gTimerWaitMsgQueue, NULL); - osRecvMesg(&gTimerWaitMsgQueue, &dummy, OS_MESG_BLOCK); + osSetTimer(&timer, time, 0, &gTimerWaitMesgQueue, NULL); + MQ_WAIT_FOR_MESG(&gTimerWaitMesgQueue, &dummy); } diff --git a/tools/Torch b/tools/Torch index a72020cc..df54367b 160000 --- a/tools/Torch +++ b/tools/Torch @@ -1 +1 @@ -Subproject commit a72020cca7f1498f73d42c71e694fd114843fe73 +Subproject commit df54367b676f44d2b925e681ae05eef665f7c45f From 7c2ce8a678056461858c20fd4dc39e1d01e3f5ce Mon Sep 17 00:00:00 2001 From: Alejandro Asenjo Nitti <96613413+sonicdcer@users.noreply.github.com> Date: Thu, 25 Apr 2024 16:08:40 -0300 Subject: [PATCH 041/151] DOCS: ast_text (ex ast_font) (#223) * progress of docs * caiman here, no problems * Emergency manouvers! * complete * rename ast_font to ast_text --- .vscode/settings.json | 2 +- .../yaml/us/{ast_font.yaml => ast_text.yaml} | 436 +++++++++--------- include/sf64dma.h | 2 +- src/dmatable.c | 2 +- src/engine/fox_hud.c | 70 +-- src/engine/fox_load_inits.c | 84 ++-- src/engine/fox_std_lib.c | 35 +- src/engine/fox_versus.c | 16 +- src/overlays/ovl_ending/fox_end2.c | 8 +- src/overlays/ovl_ending/fox_end2_data.c | 4 +- src/overlays/ovl_menu/fox_map.c | 37 +- src/overlays/ovl_menu/fox_option.c | 11 +- src/overlays/ovl_menu/fox_title.c | 8 +- yamls/us/assets.yaml | 4 +- 14 files changed, 364 insertions(+), 355 deletions(-) rename assets/yaml/us/{ast_font.yaml => ast_text.yaml} (55%) diff --git a/.vscode/settings.json b/.vscode/settings.json index c7749127..bbad84ff 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -89,7 +89,7 @@ "tuple": "c", "type_traits": "c", "ast_allies.h": "c", - "ast_font.h": "c", + "ast_text.h": "c", "fox_std_lib_assets.h": "c", "fox_versus_assets.h": "c", "guint.h": "c", diff --git a/assets/yaml/us/ast_font.yaml b/assets/yaml/us/ast_text.yaml similarity index 55% rename from assets/yaml/us/ast_font.yaml rename to assets/yaml/us/ast_text.yaml index a3ba59cf..6cdf8a6d 100644 --- a/assets/yaml/us/ast_font.yaml +++ b/assets/yaml/us/ast_text.yaml @@ -3,419 +3,419 @@ - [0x05, 0xCD2410] header: code: - - '#include "assets/ast_font.h"' + - '#include "assets/ast_text.h"' header: - '#include "gfx.h"' - '#include "sf64object.h"' # 0 (small) -D_5000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 8, offset: 0x5000000, symbol: D_5000000 } +aSmallText_0: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 8, offset: 0x5000000, symbol: aSmallText_0 } # 1 (small) -D_5000080: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 8, offset: 0x5000080, symbol: D_5000080 } +aSmallText_1: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 8, offset: 0x5000080, symbol: aSmallText_1 } # 2 (small) -D_5000100: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 8, offset: 0x5000100, symbol: D_5000100 } +aSmallText_2: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 8, offset: 0x5000100, symbol: aSmallText_2 } # 3 (small) -D_5000180: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 8, offset: 0x5000180, symbol: D_5000180 } +aSmallText_3: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 8, offset: 0x5000180, symbol: aSmallText_3 } # 4 (small) -D_5000200: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 8, offset: 0x5000200, symbol: D_5000200 } +aSmallText_4: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 8, offset: 0x5000200, symbol: aSmallText_4 } # 5 (small) -D_5000280: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 8, offset: 0x5000280, symbol: D_5000280 } +aSmallText_5: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 8, offset: 0x5000280, symbol: aSmallText_5 } # 6 (small) -D_5000300: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 8, offset: 0x5000300, symbol: D_5000300 } +aSmallText_6: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 8, offset: 0x5000300, symbol: aSmallText_6 } # 7 (small) -D_5000380: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 8, offset: 0x5000380, symbol: D_5000380 } +aSmallText_7: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 8, offset: 0x5000380, symbol: aSmallText_7 } # 8 (small) -D_5000400: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 8, offset: 0x5000400, symbol: D_5000400 } +aSmallText_8: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 8, offset: 0x5000400, symbol: aSmallText_8 } # 9 (small) -D_5000480: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 8, offset: 0x5000480, symbol: D_5000480 } +aSmallText_9: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 8, offset: 0x5000480, symbol: aSmallText_9 } # Mission No. -D_5000500: - { type: TEXTURE, ctype: u8, format: IA8, width: 112, height: 19, offset: 0x5000500, symbol: D_5000500 } +aTextMissionNo: + { type: TEXTURE, ctype: u8, format: IA8, width: 112, height: 19, offset: 0x5000500, symbol: aTextMissionNo } # Training -D_5000D50: - { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 12, offset: 0x5000D50, symbol: D_5000D50 } +aTextTraining: + { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 12, offset: 0x5000D50, symbol: aTextTraining } # Enemies Down -D_5001110: - { type: TEXTURE, ctype: u8, format: IA8, width: 64, height: 25, offset: 0x5001110, symbol: D_5001110 } +aTextEnemiesDown: + { type: TEXTURE, ctype: u8, format: IA8, width: 64, height: 25, offset: 0x5001110, symbol: aTextEnemiesDown } # Accumulated Total -D_5001750: - { type: TEXTURE, ctype: u8, format: IA8, width: 128, height: 10, offset: 0x5001750, symbol: D_5001750 } +aTextAccumTotal: + { type: TEXTURE, ctype: u8, format: IA8, width: 128, height: 10, offset: 0x5001750, symbol: aTextAccumTotal } # Status of Team -D_5001C50: - { type: TEXTURE, ctype: u8, format: IA8, width: 120, height: 12, offset: 0x5001C50, symbol: D_5001C50 } +aTextStatusOfTeam: + { type: TEXTURE, ctype: u8, format: IA8, width: 120, height: 12, offset: 0x5001C50, symbol: aTextStatusOfTeam } # End -D_50021F0: - { type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 8, offset: 0x50021F0, symbol: D_50021F0 } +aTextEnd: + { type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 8, offset: 0x50021F0, symbol: aTextEnd } # ACCOM -D_50022F0: - { type: TEXTURE, ctype: u8, format: IA8, width: 120, height: 23, offset: 0x50022F0, symbol: D_50022F0 } +aTextACCOM: + { type: TEXTURE, ctype: u8, format: IA8, width: 120, height: 23, offset: 0x50022F0, symbol: aTextACCOM } # PLISHED -D_5002DC0: - { type: TEXTURE, ctype: u8, format: IA8, width: 136, height: 23, offset: 0x5002DC0, symbol: D_5002DC0 } +aTextPLISHED: + { type: TEXTURE, ctype: u8, format: IA8, width: 136, height: 23, offset: 0x5002DC0, symbol: aTextPLISHED } # MISSION -D_5003A00: - { type: TEXTURE, ctype: u8, format: IA8, width: 128, height: 23, offset: 0x5003A00, symbol: D_5003A00 } +aTextMISSION: + { type: TEXTURE, ctype: u8, format: IA8, width: 128, height: 23, offset: 0x5003A00, symbol: aTextMISSION } # COMP -D_5004580: - { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 23, offset: 0x5004580, symbol: D_5004580 } +aTextCOMP: + { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 23, offset: 0x5004580, symbol: aTextCOMP } # LETE -D_5004E20: - { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 21, offset: 0x5004E20, symbol: D_5004E20 } +aTextLETE: + { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 21, offset: 0x5004E20, symbol: aTextLETE } # THE END -D_50054B0: - { type: TEXTURE, ctype: u8, format: IA8, width: 192, height: 30, offset: 0x50054B0, symbol: D_50054B0 } +aText_THE_END: + { type: TEXTURE, ctype: u8, format: IA8, width: 192, height: 30, offset: 0x50054B0, symbol: aText_THE_END } # Falco -D_5006B30: - { type: TEXTURE, ctype: u8, format: IA8, width: 48, height: 8, offset: 0x5006B30, symbol: D_5006B30 } +aTextFalco: + { type: TEXTURE, ctype: u8, format: IA8, width: 48, height: 8, offset: 0x5006B30, symbol: aTextFalco } # Peppy -D_5006CB0: - { type: TEXTURE, ctype: u8, format: IA8, width: 48, height: 10, offset: 0x5006CB0, symbol: D_5006CB0 } +aTextPeppy: + { type: TEXTURE, ctype: u8, format: IA8, width: 48, height: 10, offset: 0x5006CB0, symbol: aTextPeppy } # Slippy -D_5006E90: - { type: TEXTURE, ctype: u8, format: IA8, width: 56, height: 10, offset: 0x5006E90, symbol: D_5006E90 } +aTextSlippy: + { type: TEXTURE, ctype: u8, format: IA8, width: 56, height: 10, offset: 0x5006E90, symbol: aTextSlippy } # A (small) -D_50070C0: - { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x50070C0, symbol: D_50070C0 } +aSmallText_A: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x50070C0, symbol: aSmallText_A } # B (small) -D_5007100: - { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5007100, symbol: D_5007100 } +aSmallText_B: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5007100, symbol: aSmallText_B } # ! (small) -D_5007140: - { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5007140, symbol: D_5007140 } +aSmallTextExclamMark: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5007140, symbol: aSmallTextExclamMark } # C (small) -D_5007180: - { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5007180, symbol: D_5007180 } +aSmallText_C: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5007180, symbol: aSmallText_C } # D (small) -D_50071C0: - { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x50071C0, symbol: D_50071C0 } +aSmallText_D: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x50071C0, symbol: aSmallText_D } # E (small) -D_5007200: - { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5007200, symbol: D_5007200 } +aSmallText_E: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5007200, symbol: aSmallText_E } -# 1 (large) -D_5007240: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5007240, symbol: D_5007240 } +# 1 (large) Used in the ending: 1997 +sLargeText_1997_1: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5007240, symbol: sLargeText_1997_1 } -# 7 (large) -D_5007330: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5007330, symbol: D_5007330 } +# 7 (large) Used in the ending: 1997 +sLargeText_1997_7: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5007330, symbol: sLargeText_1997_7 } -# 9 (large) -D_5007420: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5007420, symbol: D_5007420 } +# 9 (large) Used in the ending: 1997 +sLargeText_1997_9: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5007420, symbol: sLargeText_1997_9 } # F (small) -D_5007510: - { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5007510, symbol: D_5007510 } +aSmallText_F: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5007510, symbol: aSmallText_F } # G (small) -D_5007550: - { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5007550, symbol: D_5007550 } +aSmallText_G: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5007550, symbol: aSmallText_G } # H (small) -D_5007590: - { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5007590, symbol: D_5007590 } +aSmallText_H: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5007590, symbol: aSmallText_H } # I (small) -D_50075D0: - { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x50075D0, symbol: D_50075D0 } +aSmallText_I: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x50075D0, symbol: aSmallText_I } # J (small) -D_5007610: - { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5007610, symbol: D_5007610 } +aSmallText_J: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5007610, symbol: aSmallText_J } # K (small) -D_5007650: - { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5007650, symbol: D_5007650 } +aSmallText_K: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5007650, symbol: aSmallText_K } -# 完 (Japanese letter meaning COMPLETE) -D_5007690: - { type: TEXTURE, ctype: u8, format: IA8, width: 48, height: 47, offset: 0x5007690, symbol: D_5007690 } +# 完 (Japanese kanji meaning COMPLETE) +aTextKanjiCOMPLETE: + { type: TEXTURE, ctype: u8, format: IA8, width: 48, height: 47, offset: 0x5007690, symbol: aTextKanjiCOMPLETE } # L (small) -D_5007F60: - { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5007F60, symbol: D_5007F60 } +aSmallText_L: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5007F60, symbol: aSmallText_L } # M (small) -D_5007FA0: - { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5007FA0, symbol: D_5007FA0 } +aSmallText_M: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5007FA0, symbol: aSmallText_M } # N (small) -D_5007FE0: - { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5007FE0, symbol: D_5007FE0 } +aSmallText_N: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5007FE0, symbol: aSmallText_N } # A (large) -D_5008020: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5008020, symbol: D_5008020 } +aLargeText_A: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5008020, symbol: aLargeText_A } # B (large) -D_5008110: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5008110, symbol: D_5008110 } +aLargeText_B: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5008110, symbol: aLargeText_B } # C (large) -D_5008200: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5008200, symbol: D_5008200 } +aLargeText_C: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5008200, symbol: aLargeText_C } # D (large) -D_50082F0: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x50082F0, symbol: D_50082F0 } +aLargeText_D: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x50082F0, symbol: aLargeText_D } # E (large) -D_50083E0: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x50083E0, symbol: D_50083E0 } +aLargeText_E: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x50083E0, symbol: aLargeText_E } # F (large) -D_50084D0: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x50084D0, symbol: D_50084D0 } +aLargeText_F: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x50084D0, symbol: aLargeText_F } # G (large) -D_50085C0: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x50085C0, symbol: D_50085C0 } +aLargeText_G: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x50085C0, symbol: aLargeText_G } # H (large) -D_50086B0: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x50086B0, symbol: D_50086B0 } +aLargeText_H: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x50086B0, symbol: aLargeText_H } # I (large) -D_50087A0: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x50087A0, symbol: D_50087A0 } +aLargeText_I: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x50087A0, symbol: aLargeText_I } # J (large) -D_5008890: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5008890, symbol: D_5008890 } +aLargeText_J: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5008890, symbol: aLargeText_J } # K (large) -D_5008980: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5008980, symbol: D_5008980 } +aLargeText_K: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5008980, symbol: aLargeText_K } # L (large) -D_5008A70: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5008A70, symbol: D_5008A70 } +aLargeText_L: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5008A70, symbol: aLargeText_L } # M (large) -D_5008B60: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5008B60, symbol: D_5008B60 } +aLargeText_M: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5008B60, symbol: aLargeText_M } # N (large) -D_5008C50: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5008C50, symbol: D_5008C50 } +aLargeText_N: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5008C50, symbol: aLargeText_N } # O (large) -D_5008D40: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5008D40, symbol: D_5008D40 } +aSmallText_O: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5008D40, symbol: aSmallText_O } # P (large) -D_5008E30: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5008E30, symbol: D_5008E30 } +aLargeText_P: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5008E30, symbol: aLargeText_P } # Q (large) -D_5008F20: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5008F20, symbol: D_5008F20 } +aLargeText_Q: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5008F20, symbol: aLargeText_Q } # R (large) -D_5009010: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5009010, symbol: D_5009010 } +aLargeText_R: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5009010, symbol: aLargeText_R } # S (large) -D_5009100: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5009100, symbol: D_5009100 } +aLargeText_S: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5009100, symbol: aLargeText_S } # T (large) -D_50091F0: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x50091F0, symbol: D_50091F0 } +aLargeText_T: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x50091F0, symbol: aLargeText_T } # U (large) -D_50092E0: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x50092E0, symbol: D_50092E0 } +aLargeText_U: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x50092E0, symbol: aLargeText_U } # V (large) -D_50093D0: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x50093D0, symbol: D_50093D0 } +aLargeText_V: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x50093D0, symbol: aLargeText_V } # W (large) -D_50094C0: - { type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 15, offset: 0x50094C0, symbol: D_50094C0 } +aLargeText_W: + { type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 15, offset: 0x50094C0, symbol: aLargeText_W } # X (large) -D_50096A0: - { type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 15, offset: 0x50096A0, symbol: D_50096A0 } +aLargeText_X: + { type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 15, offset: 0x50096A0, symbol: aLargeText_X } # Y (large) -D_5009880: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5009880, symbol: D_5009880 } +aLargeText_Y: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5009880, symbol: aLargeText_Y } # - (large) -D_5009970: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5009970, symbol: D_5009970 } +aLargeText_HYPHEN: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5009970, symbol: aLargeText_HYPHEN } # Z (large) -D_5009A60: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5009A60, symbol: D_5009A60 } +aLargeText_Z: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5009A60, symbol: aLargeText_Z } # s (large) -D_5009B50: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5009B50, symbol: D_5009B50 } +aLargeText_s: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5009B50, symbol: aLargeText_s } # t (large) -D_5009C40: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5009C40, symbol: D_5009C40 } +aLargeText_t: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5009C40, symbol: aLargeText_t } # o (small) -D_5009D30: - { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5009D30, symbol: D_5009D30 } +aSmallText_o: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5009D30, symbol: aSmallText_o } # p (small) -D_5009D70: - { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5009D70, symbol: D_5009D70 } +aSmallText_p: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5009D70, symbol: aSmallText_p } # . (large) -D_5009DB0: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5009DB0, symbol: D_5009DB0 } +aLargeText_DOT: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5009DB0, symbol: aLargeText_DOT } # q (small) -D_5009EA0: - { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5009EA0, symbol: D_5009EA0 } +aSmallText_q: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5009EA0, symbol: aSmallText_q } # r (small) -D_5009EE0: - { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5009EE0, symbol: D_5009EE0 } +aSmallText_r: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5009EE0, symbol: aSmallText_r } # s (small) -D_5009F20: - { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5009F20, symbol: D_5009F20 } +aSmallText_s: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5009F20, symbol: aSmallText_s } # 0 (large) -D_5009F60: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5009F60, symbol: D_5009F60 } +aLargeText_0: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5009F60, symbol: aLargeText_0 } # 1 (large) -D_500A050: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x500A050, symbol: D_500A050 } +aLargeText_1: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x500A050, symbol: aLargeText_1 } # 2 (large) -D_500A140: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x500A140, symbol: D_500A140 } +aLargeText_2: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x500A140, symbol: aLargeText_2 } # 3 (large) -D_500A230: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x500A230, symbol: D_500A230 } +aLargeText_3: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x500A230, symbol: aLargeText_3 } # 4 (large) -D_500A320: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x500A320, symbol: D_500A320 } +aLargeText_4: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x500A320, symbol: aLargeText_4 } # 5 (large) -D_500A410: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x500A410, symbol: D_500A410 } +aLargeText_5: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x500A410, symbol: aLargeText_5 } # 6 (large) -D_500A500: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x500A500, symbol: D_500A500 } +aLargeText_6: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x500A500, symbol: aLargeText_6 } # 7 (large) -D_500A5F0: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x500A5F0, symbol: D_500A5F0 } +aLargeText_7: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x500A5F0, symbol: aLargeText_7 } # 8 (large) -D_500A6E0: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x500A6E0, symbol: D_500A6E0 } +aLargeText_8: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x500A6E0, symbol: aLargeText_8 } # 9 (large) -D_500A7D0: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x500A7D0, symbol: D_500A7D0 } +aLargeText_9: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x500A7D0, symbol: aLargeText_9 } -# 終 (Japanese letter meaning END) -D_500A8C0: - { type: TEXTURE, ctype: u8, format: IA8, width: 56, height: 49, offset: 0x500A8C0, symbol: D_500A8C0 } +# 終 (Japanese kanji meaning END) +aTextKanji_END: + { type: TEXTURE, ctype: u8, format: IA8, width: 56, height: 49, offset: 0x500A8C0, symbol: aTextKanji_END } # T (small) -D_500B380: - { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x500B380, symbol: D_500B380 } +aSmallText_T: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x500B380, symbol: aSmallText_T } # . (small) -D_500B3C0: - { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x500B3C0, symbol: D_500B3C0 } +aSmallText_DOT: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x500B3C0, symbol: aSmallText_DOT } # : (small) -D_500B400: - { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x500B400, symbol: D_500B400 } +aSmallText_COLON: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x500B400, symbol: aSmallText_COLON } -# u (small) -D_500B440: - { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x500B440, symbol: D_500B440 } +# U (small) +aSmallText_U: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x500B440, symbol: aSmallText_U } -# v (small) -D_500B480: - { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x500B480, symbol: D_500B480 } +# V (small) +aSmallText_V: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x500B480, symbol: aSmallText_V } -# w (small) -D_500B4C0: - { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x500B4C0, symbol: D_500B4C0 } +# W (small) +aSmallText_W: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x500B4C0, symbol: aSmallText_W } -# x (small) -D_500B500: - { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x500B500, symbol: D_500B500 } +# X (small) +aSmallText_X: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x500B500, symbol: aSmallText_X } -# y (small) -D_500B540: - { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x500B540, symbol: D_500B540 } +# Y (small) +aSmallText_Y: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x500B540, symbol: aSmallText_Y } # - (small) -D_500B580: - { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x500B580, symbol: D_500B580 } +aSmallText_HYPHEN: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x500B580, symbol: aSmallText_HYPHEN } -# z (small) -D_500B5C0: - { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x500B5C0, symbol: D_500B5C0 } +# Z (small) +aSmallText_Z: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x500B5C0, symbol: aSmallText_Z } # Wrench DisplayList (Teammate in maintenance state) -D_500B600: - { type: GFX, offset: 0x500B600, symbol: D_500B600 } +aDownWrenchDL: + { type: GFX, offset: 0x500B600, symbol: aDownWrenchDL } # Wrench Texture -D_500B768: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 32, offset: 0x0500B768, tlut: 0x0500B868, symbol: D_500B768 } +aDownWrenchTexture: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 32, offset: 0x0500B768, tlut: 0x0500B868, symbol: aDownWrenchTexture } # Wrench TLUT -D_500B868: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x0500B868, symbol: D_500B868 } \ No newline at end of file +aDownWrenchTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x0500B868, symbol: aDownWrenchTLUT } \ No newline at end of file diff --git a/include/sf64dma.h b/include/sf64dma.h index 64447681..07b63739 100644 --- a/include/sf64dma.h +++ b/include/sf64dma.h @@ -137,7 +137,7 @@ DECLARE_SEGMENT(ast_title); DECLARE_SEGMENT(ast_map); DECLARE_SEGMENT(ast_option); DECLARE_SEGMENT(ast_vs_menu); -DECLARE_SEGMENT(ast_font); +DECLARE_SEGMENT(ast_text); DECLARE_SEGMENT(ast_font_3d); DECLARE_SEGMENT(ast_andross); DECLARE_SEGMENT(ast_logo); diff --git a/src/dmatable.c b/src/dmatable.c index b2b4f77c..fbe9e2d0 100644 --- a/src/dmatable.c +++ b/src/dmatable.c @@ -59,7 +59,7 @@ DmaEntry gDmaTable[90] = { { SEGMENT_ROM_START(ast_map), { SEGMENT_ROM_START(ast_map), SEGMENT_ROM_END(ast_map) }, false }, { SEGMENT_ROM_START(ast_option), { SEGMENT_ROM_START(ast_option), SEGMENT_ROM_END(ast_option) }, false }, { SEGMENT_ROM_START(ast_vs_menu), { SEGMENT_ROM_START(ast_vs_menu), SEGMENT_ROM_END(ast_vs_menu) }, false }, - { SEGMENT_ROM_START(ast_font), { SEGMENT_ROM_START(ast_font), SEGMENT_ROM_END(ast_font) }, false }, + { SEGMENT_ROM_START(ast_text), { SEGMENT_ROM_START(ast_text), SEGMENT_ROM_END(ast_text) }, false }, { SEGMENT_ROM_START(ast_font_3d), { SEGMENT_ROM_START(ast_font_3d), SEGMENT_ROM_END(ast_font_3d) }, false }, { SEGMENT_ROM_START(ast_andross), { SEGMENT_ROM_START(ast_andross), SEGMENT_ROM_END(ast_andross) }, false }, { SEGMENT_ROM_START(ast_logo), { SEGMENT_ROM_START(ast_logo), SEGMENT_ROM_END(ast_logo) }, false }, diff --git a/src/engine/fox_hud.c b/src/engine/fox_hud.c index 96eb29fc..ff4fb1be 100644 --- a/src/engine/fox_hud.c +++ b/src/engine/fox_hud.c @@ -66,7 +66,7 @@ s32 D_80161900[20]; #include "assets/ast_landmaster.h" #include "assets/ast_blue_marine.h" #include "assets/ast_versus.h" -#include "assets/ast_font.h" +#include "assets/ast_text.h" #include "assets/ast_corneria.h" #include "assets/ast_training.h" #include "assets/ast_area_6.h" @@ -204,10 +204,10 @@ void func_hud_80084B94(s32 arg0) { Matrix_Scale(gGfxMatrix, 0.68f, 0.68f, 1.0f, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, M_PI / 4, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_500B600); + gSPDisplayList(gMasterDisp++, aDownWrenchDL); Matrix_RotateZ(gGfxMatrix, 3 * M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_500B600); + gSPDisplayList(gMasterDisp++, aDownWrenchDL); Matrix_Pop(&gGfxMatrix); } } @@ -217,10 +217,10 @@ void func_hud_80084B94(s32 arg0) { Matrix_RotateZ(gGfxMatrix, M_PI / 4, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.68f, 0.68f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_500B600); + gSPDisplayList(gMasterDisp++, aDownWrenchDL); Matrix_RotateZ(gGfxMatrix, 3 * M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_500B600); + gSPDisplayList(gMasterDisp++, aDownWrenchDL); Matrix_Pop(&gGfxMatrix); } } @@ -543,15 +543,15 @@ s32 func_hud_800863C8(void) { } UnkStruct_D_800D1AEC D_800D1AEC[] = { - { D_500A050, 16, 15, D_CO_6000000, 128, 28 }, { D_500A140, 16, 15, D_ME_6000000, 96, 28 }, - { D_500A140, 16, 15, D_SY_6000000, 176, 12 }, { D_500A230, 16, 15, D_FO_6000000, 168, 28 }, - { D_500A230, 16, 15, D_KA_6000000, 168, 28 }, { D_500A230, 16, 15, D_AQ_6000000, 96, 13 }, - { D_500A320, 16, 15, D_SX_6000000, 176, 12 }, { D_500A320, 16, 15, D_SO_6000000, 112, 13 }, - { D_500A320, 16, 15, D_ZO_6000000, 112, 28 }, { D_500A410, 16, 15, D_TI_6000000, 96, 28 }, - { D_500A410, 16, 15, D_MA_6000000, 160, 28 }, { D_500A410, 16, 15, D_SZ_6000000, 176, 12 }, - { D_500A500, 16, 15, D_BO_6000000, 168, 19 }, { D_500A500, 16, 15, D_A6_6000000, 104, 28 }, - { D_500A5F0, 16, 15, D_VE1_6000D80, 128, 28 }, { D_500A5F0, 16, 15, D_VE2_60012D0, 128, 28 }, - { D_500A5F0, 16, 15, D_ANDROSS_C000A80, 128, 28 }, { D_5009F60, 16, 15, D_5000D50, 80, 12 }, + { aLargeText_1, 16, 15, D_CO_6000000, 128, 28 }, { aLargeText_2, 16, 15, D_ME_6000000, 96, 28 }, + { aLargeText_2, 16, 15, D_SY_6000000, 176, 12 }, { aLargeText_3, 16, 15, D_FO_6000000, 168, 28 }, + { aLargeText_3, 16, 15, D_KA_6000000, 168, 28 }, { aLargeText_3, 16, 15, D_AQ_6000000, 96, 13 }, + { aLargeText_4, 16, 15, D_SX_6000000, 176, 12 }, { aLargeText_4, 16, 15, D_SO_6000000, 112, 13 }, + { aLargeText_4, 16, 15, D_ZO_6000000, 112, 28 }, { aLargeText_5, 16, 15, D_TI_6000000, 96, 28 }, + { aLargeText_5, 16, 15, D_MA_6000000, 160, 28 }, { aLargeText_5, 16, 15, D_SZ_6000000, 176, 12 }, + { aLargeText_6, 16, 15, D_BO_6000000, 168, 19 }, { aLargeText_6, 16, 15, D_A6_6000000, 104, 28 }, + { aLargeText_7, 16, 15, D_VE1_6000D80, 128, 28 }, { aLargeText_7, 16, 15, D_VE2_60012D0, 128, 28 }, + { aLargeText_7, 16, 15, D_ANDROSS_C000A80, 128, 28 }, { aLargeText_0, 16, 15, aTextTraining, 80, 12 }, }; void func_hud_80086444(void) { @@ -656,7 +656,7 @@ void func_hud_80086664(f32 x, f32 y) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); if ((j != 14) && (j != 15)) { - TextureRect_8bIA(&gMasterDisp, D_5000500, 112, 19, x0 - 12.0f, y0 + 4.0f, 1.0f, 1.0f); + TextureRect_8bIA(&gMasterDisp, aTextMissionNo, 112, 19, x0 - 12.0f, y0 + 4.0f, 1.0f, 1.0f); TextureRect_8bIA(&gMasterDisp, D_800D1AEC[j].unk_00, D_800D1AEC[j].width, D_800D1AEC[j].height, x1 + 28.0f, y1 + 4.0f, 1.0f, 1.0f); @@ -686,7 +686,8 @@ void func_hud_800869A0(f32 arg0, f32 arg1, s32 k, f32 arg3, s32 arg4, s32 arg5) s32 j; u8* D_800D1CD4[] = { - D_5009F60, D_500A050, D_500A140, D_500A230, D_500A320, D_500A410, D_500A500, D_500A5F0, D_500A6E0, D_500A7D0, + aLargeText_0, aLargeText_1, aLargeText_2, aLargeText_3, aLargeText_4, + aLargeText_5, aLargeText_6, aLargeText_7, aLargeText_8, aLargeText_9, }; if (arg4 != 0) { @@ -863,42 +864,42 @@ void func_hud_80086DCC(void) { case 1: if (boolTemp) { for (i = 0; i < 11; i++) { - TextureRect_8bIA(&gMasterDisp, D_5002DC0 + (136 * 2 * i), 136, 2, x + 50.0f, y + 50.0f + (2 * i), + TextureRect_8bIA(&gMasterDisp, aTextPLISHED + (136 * 2 * i), 136, 2, x + 50.0f, y + 50.0f + (2 * i), 1.0f, 1.0f); } - TextureRect_8bIA(&gMasterDisp, D_5002DC0 + (136 * 2 * i), 136, 1, x + 50.0f, y + 50.0f + (2 * i), 1.0f, - 1.0f); + TextureRect_8bIA(&gMasterDisp, aTextPLISHED + (136 * 2 * i), 136, 1, x + 50.0f, y + 50.0f + (2 * i), + 1.0f, 1.0f); } else { for (i = 0; i < 10; i++) { - TextureRect_8bIA(&gMasterDisp, D_5004E20 + (80 * 2 * i), 80, 2, x + 66.0f, y + 50.0f + (2 * i), + TextureRect_8bIA(&gMasterDisp, aTextLETE + (80 * 2 * i), 80, 2, x + 66.0f, y + 50.0f + (2 * i), 1.0f, 1.0f); } - TextureRect_8bIA(&gMasterDisp, D_5004E20 + (80 * 2 * i), 80, 1, x + 66.0f, y + 50.0f + (2 * i), 1.0f, + TextureRect_8bIA(&gMasterDisp, aTextLETE + (80 * 2 * i), 80, 1, x + 66.0f, y + 50.0f + (2 * i), 1.0f, 1.0f); } case 2: if (boolTemp) { for (i = 0; i < 11; i++) { - TextureRect_8bIA(&gMasterDisp, D_50022F0 + (120 * 2 * i), 120, 2, x - 62.0f, y + 50.0f + (2 * i), + TextureRect_8bIA(&gMasterDisp, aTextACCOM + (120 * 2 * i), 120, 2, x - 62.0f, y + 50.0f + (2 * i), 1.0f, 1.0f); } - TextureRect_8bIA(&gMasterDisp, D_50022F0 + (120 * 2 * i), 120, 1, x - 62.0f, y + 50.0f + (2 * i), 1.0f, + TextureRect_8bIA(&gMasterDisp, aTextACCOM + (120 * 2 * i), 120, 1, x - 62.0f, y + 50.0f + (2 * i), 1.0f, 1.0f); } else { for (i = 0; i < 11; i++) { - TextureRect_8bIA(&gMasterDisp, D_5004580 + (96 * 2 * i), 96, 2, x - 22.0f, y + 50.0f + (2 * i), + TextureRect_8bIA(&gMasterDisp, aTextCOMP + (96 * 2 * i), 96, 2, x - 22.0f, y + 50.0f + (2 * i), 1.0f, 1.0f); } - TextureRect_8bIA(&gMasterDisp, D_5004580 + (96 * 2 * i), 96, 1, x - 22.0f, y + 50.0f + (2 * i), 1.0f, + TextureRect_8bIA(&gMasterDisp, aTextCOMP + (96 * 2 * i), 96, 1, x - 22.0f, y + 50.0f + (2 * i), 1.0f, 1.0f); } case 3: - TextureRect_8bIA(&gMasterDisp, D_5003A00, 128, 23, x, y + 25.0f, 1.0f, 1.0f); + TextureRect_8bIA(&gMasterDisp, aTextMISSION, 128, 23, x, y + 25.0f, 1.0f, 1.0f); case 4: - TextureRect_8bIA(&gMasterDisp, D_5000500, 112, 19, x, y, 1.0f, 1.0f); + TextureRect_8bIA(&gMasterDisp, aTextMissionNo, 112, 19, x, y, 1.0f, 1.0f); TextureRect_8bIA(&gMasterDisp, D_800D1AEC[j].unk_00, D_800D1AEC[j].width, D_800D1AEC[j].height, x + 112.0f, y, 1.0f, 1.0f); @@ -976,7 +977,7 @@ void func_hud_80087530(f32 x, f32 y, s32 number) { void func_hud_80087788(void) { u16* D_800D1D18[] = { D_10050E0, D_100BAC0, D_100D900, D_10032A0 }; - u8* D_800D1D28[] = { D_5006CB0, D_5006E90, D_5006B30 }; + u8* D_800D1D28[] = { aTextPeppy, aTextSlippy, aTextFalco }; s32 shield; s32 D_800D1D34[] = { 48, 56, 48 }; // width s32 D_800D1D40[] = { 10, 10, 8 }; // height @@ -1231,11 +1232,11 @@ void func_hud_80087B5C(void) { func_hud_800869A0(24.0f, 30.0f + 3.0f, D_801617C0[5], 1.0f, 0, 999); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_8bIA(&gMasterDisp, D_5001110, 64, 25, x0, y0 + 4.0f, 1.0f, 1.0f); + TextureRect_8bIA(&gMasterDisp, aTextEnemiesDown, 64, 25, x0, y0 + 4.0f, 1.0f, 1.0f); func_hud_800869A0(x1, y1 + 12.0f, D_801617C0[1], 1.0f, 1, 999); - TextureRect_8bIA(&gMasterDisp, D_5001750, 128, 10, x3, y3, 1.0f, 1.0f); + TextureRect_8bIA(&gMasterDisp, aTextAccumTotal, 128, 10, x3, y3, 1.0f, 1.0f); func_hud_800869A0(x4 + 4.0f, y4 + 3.0f, D_801617C0[2], 1.00f, 1, 9999); @@ -1246,7 +1247,7 @@ void func_hud_80087B5C(void) { RCP_SetupDL(&gMasterDisp, 0x4C); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_8bIA(&gMasterDisp, D_5001C50, 120, 12, x6 - 8.0f, y6 + 10.0f, 1.0f, 1.0f); + TextureRect_8bIA(&gMasterDisp, aTextStatusOfTeam, 120, 12, x6 - 8.0f, y6 + 10.0f, 1.0f, 1.0f); func_hud_80087788(); func_hud_80084B94(0); @@ -2695,7 +2696,8 @@ void func_hud_8008C104(u16* srcTexture, u16* dstTexture) { void func_hud_8008C390(f32 xPos, f32 yPos, f32 scale, s32 number) { void* D_800D1EC0[] = { - D_5000000, D_5000080, D_5000100, D_5000180, D_5000200, D_5000280, D_5000300, D_5000380, D_5000400, D_5000480, + aSmallText_0, aSmallText_1, aSmallText_2, aSmallText_3, aSmallText_4, + aSmallText_5, aSmallText_6, aSmallText_7, aSmallText_8, aSmallText_9, }; s32 i; @@ -5392,8 +5394,8 @@ void stub_80094D18(void) { } void func_hud_80094D20(f32 x, f32 y) { - u8* D_800D24DC[] = { D_5009F60, D_500A050, D_500A140, D_500A230, D_500A320, - D_500A410, D_500A500, D_500A5F0, D_500A6E0, D_500A7D0 }; + u8* D_800D24DC[] = { aLargeText_0, aLargeText_1, aLargeText_2, aLargeText_3, aLargeText_4, + aLargeText_5, aLargeText_6, aLargeText_7, aLargeText_8, aLargeText_9 }; s32 D_800D2504[] = { 100, 10, 1 }; bool boolTemp; s32 i; diff --git a/src/engine/fox_load_inits.c b/src/engine/fox_load_inits.c index c2cedfc0..392e45dd 100644 --- a/src/engine/fox_load_inits.c +++ b/src/engine/fox_load_inits.c @@ -46,7 +46,7 @@ Scene sOvlending_Ending[6] = { /* 0x2 */ NO_SEGMENT, /* 0x3 */ ROM_SEGMENT(ast_arwing), /* 0x4 */ NO_SEGMENT, - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ NO_SEGMENT, /* 0x7 */ ROM_SEGMENT(ast_ending), /* 0x8 */ NO_SEGMENT, @@ -62,7 +62,7 @@ Scene sOvlending_Ending[6] = { /* 0x2 */ NO_SEGMENT, /* 0x3 */ NO_SEGMENT, /* 0x4 */ NO_SEGMENT, - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ ROM_SEGMENT(ast_title), /* 0x7 */ ROM_SEGMENT(ast_ending), /* 0x8 */ ROM_SEGMENT(ast_ending_award_front), @@ -78,7 +78,7 @@ Scene sOvlending_Ending[6] = { /* 0x2 */ NO_SEGMENT, /* 0x3 */ NO_SEGMENT, /* 0x4 */ NO_SEGMENT, - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ ROM_SEGMENT(ast_title), /* 0x7 */ ROM_SEGMENT(ast_ending), /* 0x8 */ ROM_SEGMENT(ast_ending_award_back), @@ -94,7 +94,7 @@ Scene sOvlending_Ending[6] = { /* 0x2 */ NO_SEGMENT, /* 0x3 */ NO_SEGMENT, /* 0x4 */ NO_SEGMENT, - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ ROM_SEGMENT(ast_title), /* 0x7 */ ROM_SEGMENT(ast_ending), /* 0x8 */ ROM_SEGMENT(ast_ending_expert), @@ -110,7 +110,7 @@ Scene sOvlending_Ending[6] = { /* 0x2 */ NO_SEGMENT, /* 0x3 */ NO_SEGMENT, /* 0x4 */ NO_SEGMENT, - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ ROM_SEGMENT(ast_title), /* 0x7 */ ROM_SEGMENT(ast_ending), /* 0x8 */ NO_SEGMENT, @@ -126,7 +126,7 @@ Scene sOvlending_Ending[6] = { /* 0x2 */ NO_SEGMENT, /* 0x3 */ ROM_SEGMENT(ast_arwing), /* 0x4 */ NO_SEGMENT, - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ NO_SEGMENT, /* 0x7 */ ROM_SEGMENT(ast_ending), /* 0x8 */ ROM_SEGMENT(ast_ending_expert), @@ -145,7 +145,7 @@ Scene sOvlmenu_Title[1] = { /* 0x2 */ NO_SEGMENT, /* 0x3 */ ROM_SEGMENT(ast_arwing), /* 0x4 */ NO_SEGMENT, - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ ROM_SEGMENT(ast_title), /* 0x7 */ NO_SEGMENT, /* 0x8 */ NO_SEGMENT, @@ -164,7 +164,7 @@ Scene sOvlmenu_Option[1] = { /* 0x2 */ NO_SEGMENT, /* 0x3 */ NO_SEGMENT, /* 0x4 */ NO_SEGMENT, - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ ROM_SEGMENT(ast_map), /* 0x7 */ ROM_SEGMENT(ast_vs_menu), /* 0x8 */ ROM_SEGMENT(ast_option), @@ -183,7 +183,7 @@ Scene sOvlmenu_Map[1] = { /* 0x2 */ NO_SEGMENT, /* 0x3 */ ROM_SEGMENT(ast_arwing), /* 0x4 */ NO_SEGMENT, - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ ROM_SEGMENT(ast_map), /* 0x7 */ NO_SEGMENT, /* 0x8 */ NO_SEGMENT, @@ -202,7 +202,7 @@ Scene sOvlmenu_GameOver[1] = { /* 0x2 */ NO_SEGMENT, /* 0x3 */ NO_SEGMENT, /* 0x4 */ NO_SEGMENT, - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ NO_SEGMENT, /* 0x7 */ NO_SEGMENT, /* 0x8 */ NO_SEGMENT, @@ -221,7 +221,7 @@ Scene sOvli1_Corneria[1] = { /* 0x2 */ ROM_SEGMENT(ast_bg_planet), /* 0x3 */ ROM_SEGMENT(ast_arwing), /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ ROM_SEGMENT(ast_corneria), /* 0x7 */ NO_SEGMENT, /* 0x8 */ NO_SEGMENT, @@ -240,7 +240,7 @@ Scene sOvli2_Meteo[2] = { /* 0x2 */ ROM_SEGMENT(ast_bg_space), /* 0x3 */ ROM_SEGMENT(ast_arwing), /* 0x4 */ ROM_SEGMENT(ast_enmy_space), - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ ROM_SEGMENT(ast_meteo), /* 0x7 */ ROM_SEGMENT(ast_warp_zone), /* 0x8 */ NO_SEGMENT, @@ -256,7 +256,7 @@ Scene sOvli2_Meteo[2] = { /* 0x2 */ ROM_SEGMENT(ast_bg_space), /* 0x3 */ ROM_SEGMENT(ast_arwing), /* 0x4 */ ROM_SEGMENT(ast_enmy_space), - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ ROM_SEGMENT(ast_meteo), /* 0x7 */ ROM_SEGMENT(ast_warp_zone), /* 0x8 */ NO_SEGMENT, @@ -275,7 +275,7 @@ Scene sOvli5_Titania[6] = { /* 0x2 */ ROM_SEGMENT(ast_bg_planet), /* 0x3 */ ROM_SEGMENT(ast_landmaster), /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ ROM_SEGMENT(ast_titania), /* 0x7 */ ROM_SEGMENT(ast_7_ti_1), /* 0x8 */ NO_SEGMENT, @@ -291,7 +291,7 @@ Scene sOvli5_Titania[6] = { /* 0x2 */ ROM_SEGMENT(ast_bg_planet), /* 0x3 */ ROM_SEGMENT(ast_landmaster), /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ ROM_SEGMENT(ast_titania), /* 0x7 */ ROM_SEGMENT(ast_7_ti_2), /* 0x8 */ NO_SEGMENT, @@ -307,7 +307,7 @@ Scene sOvli5_Titania[6] = { /* 0x2 */ ROM_SEGMENT(ast_bg_planet), /* 0x3 */ ROM_SEGMENT(ast_landmaster), /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ ROM_SEGMENT(ast_titania), /* 0x7 */ ROM_SEGMENT(ast_7_ti_2), /* 0x8 */ ROM_SEGMENT(ast_8_ti), @@ -323,7 +323,7 @@ Scene sOvli5_Titania[6] = { /* 0x2 */ ROM_SEGMENT(ast_bg_planet), /* 0x3 */ ROM_SEGMENT(ast_landmaster), /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ ROM_SEGMENT(ast_titania), /* 0x7 */ ROM_SEGMENT(ast_7_ti_2), /* 0x8 */ ROM_SEGMENT(ast_8_ti), @@ -339,7 +339,7 @@ Scene sOvli5_Titania[6] = { /* 0x2 */ ROM_SEGMENT(ast_bg_planet), /* 0x3 */ ROM_SEGMENT(ast_landmaster), /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ ROM_SEGMENT(ast_titania), /* 0x7 */ ROM_SEGMENT(ast_7_ti_2), /* 0x8 */ ROM_SEGMENT(ast_8_ti), @@ -355,7 +355,7 @@ Scene sOvli5_Titania[6] = { /* 0x2 */ ROM_SEGMENT(ast_bg_planet), /* 0x3 */ ROM_SEGMENT(ast_landmaster), /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ ROM_SEGMENT(ast_titania), /* 0x7 */ ROM_SEGMENT(ast_7_ti_2), /* 0x8 */ ROM_SEGMENT(ast_8_ti), @@ -374,7 +374,7 @@ Scene sOvli2_SectorX[2] = { /* 0x2 */ ROM_SEGMENT(ast_bg_space), /* 0x3 */ ROM_SEGMENT(ast_arwing), /* 0x4 */ ROM_SEGMENT(ast_enmy_space), - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ ROM_SEGMENT(ast_sector_x), /* 0x7 */ ROM_SEGMENT(ast_warp_zone), /* 0x8 */ NO_SEGMENT, @@ -390,7 +390,7 @@ Scene sOvli2_SectorX[2] = { /* 0x2 */ ROM_SEGMENT(ast_bg_space), /* 0x3 */ ROM_SEGMENT(ast_arwing), /* 0x4 */ ROM_SEGMENT(ast_enmy_space), - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ ROM_SEGMENT(ast_sector_x), /* 0x7 */ ROM_SEGMENT(ast_warp_zone), /* 0x8 */ NO_SEGMENT, @@ -409,7 +409,7 @@ Scene sOvli4_SectorZ[1] = { /* 0x2 */ ROM_SEGMENT(ast_bg_space), /* 0x3 */ ROM_SEGMENT(ast_arwing), /* 0x4 */ ROM_SEGMENT(ast_enmy_space), - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ ROM_SEGMENT(ast_sector_z), /* 0x7 */ NO_SEGMENT, /* 0x8 */ NO_SEGMENT, @@ -428,7 +428,7 @@ Scene sOvli3_Aquas[1] = { /* 0x2 */ ROM_SEGMENT(ast_bg_planet), /* 0x3 */ ROM_SEGMENT(ast_blue_marine), /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ ROM_SEGMENT(ast_aquas), /* 0x7 */ NO_SEGMENT, /* 0x8 */ NO_SEGMENT, @@ -447,7 +447,7 @@ Scene sOvli3_Area6[1] = { /* 0x2 */ ROM_SEGMENT(ast_bg_space), /* 0x3 */ ROM_SEGMENT(ast_arwing), /* 0x4 */ ROM_SEGMENT(ast_enmy_space), - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ ROM_SEGMENT(ast_area_6), /* 0x7 */ NO_SEGMENT, /* 0x8 */ NO_SEGMENT, @@ -466,7 +466,7 @@ Scene sOvli4_Fortuna[2] = { /* 0x2 */ ROM_SEGMENT(ast_bg_planet), /* 0x3 */ ROM_SEGMENT(ast_arwing), /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ ROM_SEGMENT(ast_fortuna), /* 0x7 */ NO_SEGMENT, /* 0x8 */ NO_SEGMENT, @@ -482,7 +482,7 @@ Scene sOvli4_Fortuna[2] = { /* 0x2 */ ROM_SEGMENT(ast_bg_planet), /* 0x3 */ ROM_SEGMENT(ast_arwing), /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ ROM_SEGMENT(ast_fortuna), /* 0x7 */ NO_SEGMENT, /* 0x8 */ NO_SEGMENT, @@ -501,7 +501,7 @@ Scene sOvli3_Unk4[1] = { /* 0x2 */ ROM_SEGMENT(ast_bg_space), /* 0x3 */ ROM_SEGMENT(ast_arwing), /* 0x4 */ ROM_SEGMENT(ast_enmy_space), - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ ROM_SEGMENT(ast_area_6), /* 0x7 */ NO_SEGMENT, /* 0x8 */ NO_SEGMENT, @@ -520,7 +520,7 @@ Scene sOvli6_SectorY[1] = { /* 0x2 */ ROM_SEGMENT(ast_bg_space), /* 0x3 */ ROM_SEGMENT(ast_arwing), /* 0x4 */ ROM_SEGMENT(ast_enmy_space), - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ ROM_SEGMENT(ast_sector_y), /* 0x7 */ NO_SEGMENT, /* 0x8 */ NO_SEGMENT, @@ -539,7 +539,7 @@ Scene sOvli3_Solar[1] = { /* 0x2 */ ROM_SEGMENT(ast_bg_planet), /* 0x3 */ ROM_SEGMENT(ast_arwing), /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ ROM_SEGMENT(ast_solar), /* 0x7 */ NO_SEGMENT, /* 0x8 */ NO_SEGMENT, @@ -558,7 +558,7 @@ Scene sOvli3_Zoness[1] = { /* 0x2 */ ROM_SEGMENT(ast_bg_planet), /* 0x3 */ ROM_SEGMENT(ast_arwing), /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ ROM_SEGMENT(ast_zoness), /* 0x7 */ NO_SEGMENT, /* 0x8 */ NO_SEGMENT, @@ -577,7 +577,7 @@ Scene sOvli1_Venom1[1] = { /* 0x2 */ ROM_SEGMENT(ast_bg_planet), /* 0x3 */ ROM_SEGMENT(ast_arwing), /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ ROM_SEGMENT(ast_venom_1), /* 0x7 */ NO_SEGMENT, /* 0x8 */ NO_SEGMENT, @@ -596,7 +596,7 @@ Scene sOvli6_Andross[1] = { /* 0x2 */ ROM_SEGMENT(ast_bg_planet), /* 0x3 */ ROM_SEGMENT(ast_arwing), /* 0x4 */ NO_SEGMENT, - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ ROM_SEGMENT(ast_venom_2), /* 0x7 */ NO_SEGMENT, /* 0x8 */ NO_SEGMENT, @@ -615,7 +615,7 @@ Scene sOvli6_Venom2[2] = { /* 0x2 */ ROM_SEGMENT(ast_bg_planet), /* 0x3 */ ROM_SEGMENT(ast_arwing), /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ ROM_SEGMENT(ast_venom_2), /* 0x7 */ NO_SEGMENT, /* 0x8 */ NO_SEGMENT, @@ -631,7 +631,7 @@ Scene sOvli6_Venom2[2] = { /* 0x2 */ ROM_SEGMENT(ast_bg_planet), /* 0x3 */ ROM_SEGMENT(ast_arwing), /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ ROM_SEGMENT(ast_venom_2), /* 0x7 */ NO_SEGMENT, /* 0x8 */ NO_SEGMENT, @@ -650,7 +650,7 @@ Scene sOvli2_Setup20[1] = { /* 0x2 */ ROM_SEGMENT(ast_bg_planet), /* 0x3 */ ROM_SEGMENT(ast_arwing), /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ ROM_SEGMENT(ast_ve1_boss), /* 0x7 */ NO_SEGMENT, /* 0x8 */ NO_SEGMENT, @@ -669,7 +669,7 @@ Scene sOvli4_Bolse[1] = { /* 0x2 */ ROM_SEGMENT(ast_bg_space), /* 0x3 */ ROM_SEGMENT(ast_arwing), /* 0x4 */ ROM_SEGMENT(ast_enmy_space), - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ ROM_SEGMENT(ast_bolse), /* 0x7 */ NO_SEGMENT, /* 0x8 */ NO_SEGMENT, @@ -688,7 +688,7 @@ Scene sOvli4_Katina[1] = { /* 0x2 */ ROM_SEGMENT(ast_bg_planet), /* 0x3 */ ROM_SEGMENT(ast_arwing), /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ ROM_SEGMENT(ast_katina), /* 0x7 */ NO_SEGMENT, /* 0x8 */ NO_SEGMENT, @@ -707,7 +707,7 @@ Scene sOvli5_Macbeth[2] = { /* 0x2 */ ROM_SEGMENT(ast_bg_planet), /* 0x3 */ ROM_SEGMENT(ast_landmaster), /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ ROM_SEGMENT(ast_macbeth), /* 0x7 */ NO_SEGMENT, /* 0x8 */ NO_SEGMENT, @@ -723,7 +723,7 @@ Scene sOvli5_Macbeth[2] = { /* 0x2 */ ROM_SEGMENT(ast_bg_planet), /* 0x3 */ ROM_SEGMENT(ast_landmaster), /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ ROM_SEGMENT(ast_macbeth), /* 0x7 */ NO_SEGMENT, /* 0x8 */ NO_SEGMENT, @@ -742,7 +742,7 @@ Scene sOvli1_Training[1] = { /* 0x2 */ ROM_SEGMENT(ast_bg_planet), /* 0x3 */ ROM_SEGMENT(ast_arwing), /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ ROM_SEGMENT(ast_training), /* 0x7 */ NO_SEGMENT, /* 0x8 */ NO_SEGMENT, @@ -761,7 +761,7 @@ Scene sOvli2_Versus[2] = { /* 0x2 */ ROM_SEGMENT(ast_bg_planet), /* 0x3 */ ROM_SEGMENT(ast_versus), /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ NO_SEGMENT, /* 0x7 */ ROM_SEGMENT(ast_vs_menu), /* 0x8 */ NO_SEGMENT, @@ -777,7 +777,7 @@ Scene sOvli2_Versus[2] = { /* 0x2 */ ROM_SEGMENT(ast_bg_space), /* 0x3 */ ROM_SEGMENT(ast_versus), /* 0x4 */ ROM_SEGMENT(ast_enmy_space), - /* 0x5 */ ROM_SEGMENT(ast_font), + /* 0x5 */ ROM_SEGMENT(ast_text), /* 0x6 */ NO_SEGMENT, /* 0x7 */ ROM_SEGMENT(ast_vs_menu), /* 0x8 */ NO_SEGMENT, diff --git a/src/engine/fox_std_lib.c b/src/engine/fox_std_lib.c index df7a695f..6983f5b6 100644 --- a/src/engine/fox_std_lib.c +++ b/src/engine/fox_std_lib.c @@ -1,5 +1,5 @@ #include "global.h" -#include "assets/ast_font.h" +#include "assets/ast_text.h" char D_801619A0[100]; @@ -794,8 +794,8 @@ void Graphics_DisplayHUDNumber(s32 xPos, s32 yPos, s32 number) { 1.0f); } -u8* sSmallNumberTex[] = { D_5000000, D_5000080, D_5000100, D_5000180, D_5000200, - D_5000280, D_5000300, D_5000380, D_5000400, D_5000480 }; +u8* sSmallNumberTex[] = { aSmallText_0, aSmallText_1, aSmallText_2, aSmallText_3, aSmallText_4, + aSmallText_5, aSmallText_6, aSmallText_7, aSmallText_8, aSmallText_9 }; void Graphics_DisplaySmallNumber(s32 xPos, s32 yPos, s32 number) { s32 place; @@ -819,21 +819,26 @@ 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 }; 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, + aLargeText_A, aLargeText_B, aLargeText_C, aLargeText_D, aLargeText_E, aLargeText_F, aLargeText_G, + aLargeText_H, aLargeText_I, aLargeText_J, aLargeText_K, aLargeText_L, aLargeText_M, aLargeText_N, + aSmallText_O, aLargeText_P, aLargeText_Q, aLargeText_R, aLargeText_S, aLargeText_T, aLargeText_U, + aLargeText_V, aLargeText_W, aLargeText_X, aLargeText_Y, aLargeText_Z, aLargeText_DOT, NULL, + aLargeText_0, aLargeText_1, aLargeText_2, aLargeText_3, aLargeText_4, aLargeText_5, aLargeText_6, + aLargeText_7, aLargeText_8, aLargeText_9, aLargeText_s, aLargeText_t, aLargeText_HYPHEN, }; u8* sLargeNumberTex[] = { - D_5009F60, D_500A050, D_500A140, D_500A230, D_500A320, D_500A410, D_500A500, D_500A5F0, D_500A6E0, D_500A7D0, + aLargeText_0, aLargeText_1, aLargeText_2, aLargeText_3, aLargeText_4, + aLargeText_5, aLargeText_6, aLargeText_7, aLargeText_8, aLargeText_9, }; -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 }; +u8* sSmallCharTex[] = { NULL, aSmallText_A, aSmallText_B, aSmallText_C, aSmallText_D, + aSmallText_E, aSmallText_F, aSmallText_G, aSmallText_H, aSmallText_I, + aSmallText_J, aSmallText_K, aSmallText_L, aSmallText_M, aSmallText_N, + aSmallText_o, aSmallText_p, aSmallText_q, aSmallText_r, aSmallText_s, + aSmallText_T, aSmallText_U, aSmallText_V, aSmallText_W, aSmallText_X, + aSmallText_Y, aSmallText_Z, aSmallTextExclamMark, aSmallText_COLON, aSmallText_HYPHEN, + aSmallText_DOT, aSmallText_0, aSmallText_1, aSmallText_2, aSmallText_3, + aSmallText_4, aSmallText_5, aSmallText_6, aSmallText_7, aSmallText_8, + aSmallText_9 }; void Graphics_DisplayLargeText(s32 xPos, s32 yPos, f32 xScale, f32 yScale, char* text) { u32 charIndex; diff --git a/src/engine/fox_versus.c b/src/engine/fox_versus.c index 1ed295c9..7fc56a95 100644 --- a/src/engine/fox_versus.c +++ b/src/engine/fox_versus.c @@ -2,7 +2,7 @@ #include "global.h" #include "fox_option.h" #include "assets/ast_vs_menu.h" -#include "assets/ast_font.h" +#include "assets/ast_text.h" #include "assets/ast_versus.h" s32 D_versus_80178750; @@ -209,8 +209,8 @@ void func_versus_800BD3A8(f32 xPos, f32 yPos) { } void func_versus_800BD4D4(f32 xPos, f32 yPos, s32 arg2) { - u8* D_800D4AF8[] = { D_5000000, D_5000080, D_5000100, D_5000180, D_5000200, - D_5000280, D_5000300, D_5000380, D_5000400, D_5000480 }; + u8* D_800D4AF8[] = { aSmallText_0, aSmallText_1, aSmallText_2, aSmallText_3, aSmallText_4, + aSmallText_5, aSmallText_6, aSmallText_7, aSmallText_8, aSmallText_9 }; bool var_s2 = false; s32 i = 1000; s32 j; @@ -238,8 +238,8 @@ void func_versus_800BD76C(f32 xPos, f32 yPos) { } void func_versus_800BD7C4(f32 xPos, f32 yPos, s32 arg2) { - u8* D_800D4B20[] = { D_5000000, D_5000080, D_5000100, D_5000180, D_5000200, - D_5000280, D_5000300, D_5000380, D_5000400, D_5000480 }; + u8* D_800D4B20[] = { aSmallText_0, aSmallText_1, aSmallText_2, aSmallText_3, aSmallText_4, + aSmallText_5, aSmallText_6, aSmallText_7, aSmallText_8, aSmallText_9 }; s32 i; for (i = 10; i != 1; i /= 10) { @@ -260,12 +260,12 @@ void func_versus_800BD9FC(f32 xPos, f32 yPos) { } void func_versus_800BDA54(f32 xPos, f32 yPos) { - TextureRect_8bIA(&gMasterDisp, D_5007F60, 8, 8, xPos, yPos, 1.0f, 1.0f); + TextureRect_8bIA(&gMasterDisp, aSmallText_L, 8, 8, xPos, yPos, 1.0f, 1.0f); } void func_versus_800BDAA0(f32 xPos, f32 yPos, s32 arg2, s32 arg3, s32 arg4) { - u8* D_800D4B48[] = { D_5009F60, D_500A050, D_500A140, D_500A230, D_500A320, - D_500A410, D_500A500, D_500A5F0, D_500A6E0, D_500A7D0 }; + u8* D_800D4B48[] = { aLargeText_0, aLargeText_1, aLargeText_2, aLargeText_3, aLargeText_4, + aLargeText_5, aLargeText_6, aLargeText_7, aLargeText_8, aLargeText_9 }; s32 i = 1000; s32 temp1; s32 temp2; diff --git a/src/overlays/ovl_ending/fox_end2.c b/src/overlays/ovl_ending/fox_end2.c index a97b4119..86c404d5 100644 --- a/src/overlays/ovl_ending/fox_end2.c +++ b/src/overlays/ovl_ending/fox_end2.c @@ -183,10 +183,10 @@ void Ending_8018D814(u32 arg0, AssetInfo* asset) { gDPSetPrimColor(gMasterDisp++, 0, 0, asset->primRed, asset->primGreen, asset->primBlue, alpha); - TextureRect_8bIA(&gMasterDisp, D_5007240, 16, 15, asset->unk_18.x, asset->unk_18.y, 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, D_5007420, 16, 15, asset->unk_18.x + 16.0f * 1, asset->unk_18.y, 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, D_5007420, 16, 15, asset->unk_18.x + 16.0f * 2, asset->unk_18.y, 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, D_5007330, 16, 15, asset->unk_18.x + 16.0f * 3, asset->unk_18.y, 1.0f, 1.0f); + TextureRect_8bIA(&gMasterDisp, sLargeText_1997_1, 16, 15, asset->unk_18.x, asset->unk_18.y, 1.0f, 1.0f); + TextureRect_8bIA(&gMasterDisp, sLargeText_1997_9, 16, 15, asset->unk_18.x + 16.0f * 1, asset->unk_18.y, 1.0f, 1.0f); + TextureRect_8bIA(&gMasterDisp, sLargeText_1997_9, 16, 15, asset->unk_18.x + 16.0f * 2, asset->unk_18.y, 1.0f, 1.0f); + TextureRect_8bIA(&gMasterDisp, sLargeText_1997_7, 16, 15, asset->unk_18.x + 16.0f * 3, asset->unk_18.y, 1.0f, 1.0f); } void Ending_8018DA0C(u32 arg0, AssetInfo* asset) { diff --git a/src/overlays/ovl_ending/fox_end2_data.c b/src/overlays/ovl_ending/fox_end2_data.c index a0f98f1f..0e419211 100644 --- a/src/overlays/ovl_ending/fox_end2_data.c +++ b/src/overlays/ovl_ending/fox_end2_data.c @@ -3,7 +3,7 @@ #include "global.h" #include "assets/ast_arwing.h" -#include "assets/ast_font.h" +#include "assets/ast_text.h" #include "assets/ast_title.h" #include "assets/ast_ending.h" @@ -188,7 +188,7 @@ Credit D_ending_80192E74[] = { "HIROSHI YAMAUCHI", 7400, 200, 0, 120, 1, 0, 25, 20, "NINTENDO", 7800, 200, 0, 120, 1, 0, 25, 20, - D_50054B0, 8200, 380, 0, 110, 2, 1, 25, 20, + aText_THE_END, 8200, 380, 0, 110, 2, 1, 25, 20, }; AssetInfo D_ending_801934B4[] = { diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index 8393cfab..a86c8a0a 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -10,7 +10,7 @@ #include "fox_map.h" #include "fox_option.h" #include "assets/ast_map.h" -#include "assets/ast_font.h" +#include "assets/ast_text.h" #include "assets/ast_font_3d.h" // BSS STARTS HERE @@ -5329,72 +5329,73 @@ void Map_801A9A8C(void) { switch (gCurrentLevel) { case LEVEL_CORNERIA: - sp54 = D_500A050; + sp54 = aLargeText_1; + sp58 = 0; break; case LEVEL_METEO: - sp54 = D_500A140; + sp54 = aLargeText_2; sp58 = 1; break; case LEVEL_SECTOR_Y: - sp54 = D_500A140; + sp54 = aLargeText_2; sp58 = 2; break; case LEVEL_FORTUNA: - sp54 = D_500A230; + sp54 = aLargeText_3; sp58 = 3; break; case LEVEL_KATINA: - sp54 = D_500A230; + sp54 = aLargeText_3; sp58 = 4; break; case LEVEL_AQUAS: - sp54 = D_500A230; + sp54 = aLargeText_3; sp58 = 5; break; case LEVEL_SECTOR_X: - sp54 = D_500A320; + sp54 = aLargeText_4; sp58 = 6; break; case LEVEL_SOLAR: - sp54 = D_500A320; + sp54 = aLargeText_4; sp58 = 7; break; case LEVEL_ZONESS: - sp54 = D_500A320; + sp54 = aLargeText_4; sp58 = 8; break; case LEVEL_TITANIA: - sp54 = D_500A410; + sp54 = aLargeText_5; sp58 = 9; break; case LEVEL_MACBETH: - sp54 = D_500A410; + sp54 = aLargeText_5; sp58 = 10; break; case LEVEL_SECTOR_Z: - sp54 = D_500A410; + sp54 = aLargeText_5; sp58 = 11; break; case LEVEL_BOLSE: - sp54 = D_500A500; + sp54 = aLargeText_6; sp58 = 12; break; case LEVEL_AREA_6: - sp54 = D_500A500; + sp54 = aLargeText_6; sp58 = 13; break; } @@ -5408,7 +5409,7 @@ void Map_801A9A8C(void) { } #endif - TextureRect_8bIA(&gMasterDisp, D_5000500, 112, 19, D_menu_801B6AC0[0], D_menu_801B6AC8[0], 1.0f, 1.0f); + TextureRect_8bIA(&gMasterDisp, aTextMissionNo, 112, 19, D_menu_801B6AC0[0], D_menu_801B6AC8[0], 1.0f, 1.0f); TextureRect_8bIA(&gMasterDisp, sp54, 16, 15, D_menu_801B6AC0[1], D_menu_801B6AC8[1], 1.0f, 1.0f); for (i = 0; i < D_menu_801AF834[sp58].height; i++) { @@ -6037,7 +6038,7 @@ void Map_801ABCDC(s32 arg0, s32 alpha) { Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_500B600); + gSPDisplayList(gMasterDisp++, aDownWrenchDL); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); @@ -6048,7 +6049,7 @@ void Map_801ABCDC(s32 arg0, s32 alpha) { Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_500B600); + gSPDisplayList(gMasterDisp++, aDownWrenchDL); Matrix_Pop(&gGfxMatrix); Matrix_Pop(&gGfxMatrix); diff --git a/src/overlays/ovl_menu/fox_option.c b/src/overlays/ovl_menu/fox_option.c index d2c945dd..1709ee10 100644 --- a/src/overlays/ovl_menu/fox_option.c +++ b/src/overlays/ovl_menu/fox_option.c @@ -8,7 +8,7 @@ #include "prevent_bss_reordering.h" #include "global.h" #include "fox_option.h" -#include "assets/ast_font.h" +#include "assets/ast_text.h" #include "assets/ast_font_3d.h" #include "assets/ast_option.h" #include "assets/ast_vs_menu.h" @@ -305,7 +305,8 @@ static Gfx D_menu_801AECE0[] = { }; static u8* D_menu_801AECF8[10] = { - D_5009F60, D_500A050, D_500A140, D_500A230, D_500A320, D_500A410, D_500A500, D_500A5F0, D_500A6E0, D_500A7D0, + aLargeText_0, aLargeText_1, aLargeText_2, aLargeText_3, aLargeText_4, + aLargeText_5, aLargeText_6, aLargeText_7, aLargeText_8, aLargeText_9, }; static f32 D_menu_801AED20[2] = { 255.0f, 255.0f }; @@ -2246,8 +2247,8 @@ void Option_80197A3C(s32 arg0, s32 arg1, s32 arg2) { if (arg0 != 9) { TextureRect_8bIA(&gMasterDisp, D_menu_801AECF8[arg0 + 1], 16, 15, arg1, arg2 - 25.0f, 1.0f, 1.0f); } else { - TextureRect_8bIA(&gMasterDisp, D_500A050, 16, 15, arg1 - 14.0f, arg2 - 25.0f, 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, D_5009F60, 16, 15, arg1, arg2 - 25.0f, 1.0f, 1.0f); + TextureRect_8bIA(&gMasterDisp, aLargeText_1, 16, 15, arg1 - 14.0f, arg2 - 25.0f, 1.0f, 1.0f); + TextureRect_8bIA(&gMasterDisp, aLargeText_0, 16, 15, arg1, arg2 - 25.0f, 1.0f, 1.0f); } RCP_SetupDL(&gMasterDisp, 0x55); @@ -4079,7 +4080,7 @@ void Option_8019D118(void) { if (D_menu_801B9138 == 1) { if (gGameFrameCount & 0x10) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); - TextureRect_8bIA(&gMasterDisp, D_50021F0, 32, 8, D_menu_801AF30C[5], D_menu_801AF324[5], 1.0f, 1.0f); + TextureRect_8bIA(&gMasterDisp, aTextEnd, 32, 8, D_menu_801AF30C[5], D_menu_801AF324[5], 1.0f, 1.0f); } } diff --git a/src/overlays/ovl_menu/fox_title.c b/src/overlays/ovl_menu/fox_title.c index 21d2077d..e54ac142 100644 --- a/src/overlays/ovl_menu/fox_title.c +++ b/src/overlays/ovl_menu/fox_title.c @@ -7,7 +7,7 @@ #include "global.h" #include "fox_title.h" #include "assets/ast_title.h" -#include "assets/ast_font.h" +#include "assets/ast_text.h" f32 D_menu_801B7BB0; f32 D_menu_801B7BB4; @@ -407,14 +407,14 @@ void Title_80187CA8(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_8bIA(&gMasterDisp, D_5000300, 16, 8, 148.0f, temp, 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, D_5000200, 16, 8, 164, temp, 1.0f, 1.0f); + TextureRect_8bIA(&gMasterDisp, aSmallText_6, 16, 8, 148.0f, temp, 1.0f, 1.0f); + TextureRect_8bIA(&gMasterDisp, aSmallText_4, 16, 8, 164, temp, 1.0f, 1.0f); RCP_SetupDL(&gMasterDisp, 0x53); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_8bIA(&gMasterDisp, &D_5007690[48 * 6], 16, 2, 36, 32, 15.2f, 1.0f); + TextureRect_8bIA(&gMasterDisp, &aTextKanjiCOMPLETE[48 * 6], 16, 2, 36, 32, 15.2f, 1.0f); Title_80187E28(); } diff --git a/yamls/us/assets.yaml b/yamls/us/assets.yaml index 76356b6e..1ecf5b91 100644 --- a/yamls/us/assets.yaml +++ b/yamls/us/assets.yaml @@ -362,14 +362,14 @@ subsegments: - [0xCBFE70, .data, ast_vs_menu/ast_vs_menu] - - name: ast_font + - name: ast_text exclusive_ram_id: segment_05 type: code dir: assets vram: 0x05000000 start: 0xCD2410 subsegments: - - [0xCD2410, .data, ast_font/ast_font] + - [0xCD2410, .data, ast_text/ast_text] - name: ast_font_3d exclusive_ram_id: segment_09 From ee59dfc57facac954d63cd72c0cdf053acf2c418 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Thu, 25 Apr 2024 16:11:01 -0300 Subject: [PATCH 042/151] missionNoTex --- src/overlays/ovl_menu/fox_map.c | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index a86c8a0a..cc5e8e6b 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -5323,79 +5323,78 @@ void Map_801A9910(void) { void Map_801A9A8C(void) { s32 i; s32 sp58; - u8* sp54; + u8* missionNoTex; static f32 D_menu_801B6AC0[2] = { 91.0f, 207.0f }; static f32 D_menu_801B6AC8[2] = { 61.0f, 61.0f }; switch (gCurrentLevel) { case LEVEL_CORNERIA: - sp54 = aLargeText_1; - + missionNoTex = aLargeText_1; sp58 = 0; break; case LEVEL_METEO: - sp54 = aLargeText_2; + missionNoTex = aLargeText_2; sp58 = 1; break; case LEVEL_SECTOR_Y: - sp54 = aLargeText_2; + missionNoTex = aLargeText_2; sp58 = 2; break; case LEVEL_FORTUNA: - sp54 = aLargeText_3; + missionNoTex = aLargeText_3; sp58 = 3; break; case LEVEL_KATINA: - sp54 = aLargeText_3; + missionNoTex = aLargeText_3; sp58 = 4; break; case LEVEL_AQUAS: - sp54 = aLargeText_3; + missionNoTex = aLargeText_3; sp58 = 5; break; case LEVEL_SECTOR_X: - sp54 = aLargeText_4; + missionNoTex = aLargeText_4; sp58 = 6; break; case LEVEL_SOLAR: - sp54 = aLargeText_4; + missionNoTex = aLargeText_4; sp58 = 7; break; case LEVEL_ZONESS: - sp54 = aLargeText_4; + missionNoTex = aLargeText_4; sp58 = 8; break; case LEVEL_TITANIA: - sp54 = aLargeText_5; + missionNoTex = aLargeText_5; sp58 = 9; break; case LEVEL_MACBETH: - sp54 = aLargeText_5; + missionNoTex = aLargeText_5; sp58 = 10; break; case LEVEL_SECTOR_Z: - sp54 = aLargeText_5; + missionNoTex = aLargeText_5; sp58 = 11; break; case LEVEL_BOLSE: - sp54 = aLargeText_6; + missionNoTex = aLargeText_6; sp58 = 12; break; case LEVEL_AREA_6: - sp54 = aLargeText_6; + missionNoTex = aLargeText_6; sp58 = 13; break; } @@ -5410,7 +5409,7 @@ void Map_801A9A8C(void) { #endif TextureRect_8bIA(&gMasterDisp, aTextMissionNo, 112, 19, D_menu_801B6AC0[0], D_menu_801B6AC8[0], 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, sp54, 16, 15, D_menu_801B6AC0[1], D_menu_801B6AC8[1], 1.0f, 1.0f); + TextureRect_8bIA(&gMasterDisp, missionNoTex, 16, 15, D_menu_801B6AC0[1], D_menu_801B6AC8[1], 1.0f, 1.0f); for (i = 0; i < D_menu_801AF834[sp58].height; i++) { TextureRect_8bIA(&gMasterDisp, D_menu_801AF834[sp58].texture + (D_menu_801AF834[sp58].width * i), From 3ab050421e24ad25719f126ce81e8da62324fc89 Mon Sep 17 00:00:00 2001 From: petrie911 <69443847+petrie911@users.noreply.github.com> Date: Thu, 25 Apr 2024 17:01:25 -0500 Subject: [PATCH 043/151] use array count for collision headers (#222) * lights fix * names * remove header * so many names * format * more docs * makefile * colheaders * it's gone too far * torch --- .vscode/settings.json | 2 +- assets/yaml/us/ast_andross.yaml | 2 +- assets/yaml/us/ast_aquas.yaml | 4 +- assets/yaml/us/ast_area_6.yaml | 4 +- assets/yaml/us/ast_bolse.yaml | 2 +- assets/yaml/us/ast_corneria.yaml | 2 +- assets/yaml/us/ast_fortuna.yaml | 2 +- assets/yaml/us/ast_katina.yaml | 2 +- assets/yaml/us/ast_macbeth.yaml | 2 +- assets/yaml/us/ast_meteo.yaml | 2 +- assets/yaml/us/ast_sector_x.yaml | 2 +- assets/yaml/us/ast_sector_y.yaml | 2 +- assets/yaml/us/ast_sector_z.yaml | 2 +- assets/yaml/us/ast_solar.yaml | 2 +- assets/yaml/us/ast_titania.yaml | 2 +- assets/yaml/us/ast_training.yaml | 2 +- assets/yaml/us/ast_venom_1.yaml | 2 +- assets/yaml/us/ast_venom_2.yaml | 2 +- assets/yaml/us/ast_versus.yaml | 6 +- assets/yaml/us/ast_zoness.yaml | 2 +- include/context.h | 170 +-- include/functions.h | 22 +- include/i4.h | 6 +- include/i6.h | 2 +- include/prevent_context_reordering.h | 4 +- include/sf64audio_external.h | 2 +- include/sf64event.h | 4 +- include/sf64level.h | 47 +- include/sf64mesg.h | 2 +- include/sf64player.h | 4 +- include/variables.h | 26 +- linker_scripts/us/symbol_addrs_audio.txt | 2 +- linker_scripts/us/symbol_addrs_engine.txt | 124 +- linker_scripts/us/symbol_addrs_overlays.txt | 2 +- sfxIds.txt | 61 +- src/audio/audio_general.c | 8 +- src/engine/fox_360.c | 27 +- src/engine/fox_A4290_colheaders.c | 54 +- src/engine/fox_beam.c | 22 +- src/engine/fox_bg.c | 16 +- src/engine/fox_boss.c | 16 +- src/engine/fox_context.c | 134 +- src/engine/fox_demo.c | 50 +- src/engine/fox_display.c | 36 +- src/engine/fox_edisplay.c | 8 +- src/engine/fox_effect.c | 18 +- src/engine/fox_enmy.c | 39 +- src/engine/fox_enmy2.c | 1220 +++++++++---------- src/engine/fox_fade.c | 12 +- src/engine/fox_game.c | 30 +- src/engine/fox_hud.c | 71 +- src/engine/fox_play.c | 379 +++--- src/engine/fox_radio.c | 416 +++---- src/engine/fox_tank.c | 52 +- src/engine/fox_versus.c | 162 +-- src/overlays/ovl_ending/fox_end1.c | 80 +- src/overlays/ovl_i1/fox_co.c | 52 +- src/overlays/ovl_i1/fox_ve1.c | 6 +- src/overlays/ovl_i2/fox_me.c | 58 +- src/overlays/ovl_i2/fox_sx.c | 30 +- src/overlays/ovl_i3/fox_a6.c | 26 +- src/overlays/ovl_i3/fox_aq.c | 46 +- src/overlays/ovl_i3/fox_so.c | 22 +- src/overlays/ovl_i3/fox_zo.c | 18 +- src/overlays/ovl_i4/fox_bo.c | 40 +- src/overlays/ovl_i4/fox_fo.c | 48 +- src/overlays/ovl_i4/fox_ka.c | 22 +- src/overlays/ovl_i4/fox_sz.c | 32 +- src/overlays/ovl_i5/fox_ma.c | 26 +- src/overlays/ovl_i5/fox_ti.c | 16 +- src/overlays/ovl_i5/fox_ti_cs.c | 2 +- src/overlays/ovl_i6/fox_andross.c | 16 +- src/overlays/ovl_i6/fox_sy.c | 32 +- src/overlays/ovl_i6/fox_ve2.c | 67 +- src/overlays/ovl_menu/fox_map.c | 106 +- src/overlays/ovl_menu/fox_option.c | 22 +- src/overlays/ovl_menu/fox_title.c | 52 +- src/overlays/ovl_menu/fox_title.h | 2 +- tools/Torch | 2 +- 79 files changed, 2072 insertions(+), 2047 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index bbad84ff..4fbfb91d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -45,7 +45,7 @@ "cstdlib": "c", "typeinfo": "c", "sym_addrs_funcs": "c", - "*.txt": "c", + "*.txt": "plaintext", "fox_title.h": "c", "prevent_bss_reordering.h": "c", "fox_map.h": "c", diff --git a/assets/yaml/us/ast_andross.yaml b/assets/yaml/us/ast_andross.yaml index 01c7f267..673b0167 100644 --- a/assets/yaml/us/ast_andross.yaml +++ b/assets/yaml/us/ast_andross.yaml @@ -176,7 +176,7 @@ D_ANDROSS_C033D98: {type: SF64:ANIM, offset: 0xC033D98, symbol: D_ANDROSS_C033D98} D_ANDROSS_C035110: - {type: SF64:ENV_SETTINGS, offset: 0xC035110, symbol: D_ANDROSS_C035110} + {type: SF64:ENVIRONMENT, offset: 0xC035110, symbol: D_ANDROSS_C035110} D_ANDROSS_C035154: {type: SF64:OBJECT_INIT, offset: 0xC035154, symbol: D_ANDROSS_C035154} diff --git a/assets/yaml/us/ast_aquas.yaml b/assets/yaml/us/ast_aquas.yaml index e72f5b0c..4a3032bc 100644 --- a/assets/yaml/us/ast_aquas.yaml +++ b/assets/yaml/us/ast_aquas.yaml @@ -645,10 +645,10 @@ D_AQ_602E028: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x602E028, symbol: D_AQ_602E028 } D_AQ_602E540: - { type: SF64:ENV_SETTINGS, offset: 0x602E540, symbol: D_AQ_602E540 } + { type: SF64:ENVIRONMENT, offset: 0x602E540, symbol: D_AQ_602E540 } D_AQ_602E584: - { type: SF64:ENV_SETTINGS, offset: 0x602E584, symbol: D_AQ_602E584 } + { type: SF64:ENVIRONMENT, offset: 0x602E584, symbol: D_AQ_602E584 } D_AQ_602E584: { type: SF64:OBJECT_INIT, offset: 0x602E5C8, symbol: D_AQ_602E5C8 } diff --git a/assets/yaml/us/ast_area_6.yaml b/assets/yaml/us/ast_area_6.yaml index 097776ca..100e6e03 100644 --- a/assets/yaml/us/ast_area_6.yaml +++ b/assets/yaml/us/ast_area_6.yaml @@ -220,7 +220,7 @@ D_A6_6022F20: { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06022F20, symbol: D_A6_6022F20 } D_A6_6023F20: - { type: SF64:ENV_SETTINGS, offset: 0x6023F20, symbol: D_A6_6023F20} + { type: SF64:ENVIRONMENT, offset: 0x6023F20, symbol: D_A6_6023F20} D_A6_6023F64: { type: SF64:OBJECT_INIT, offset: 0x6023F64, symbol: D_A6_6023F64} @@ -244,7 +244,7 @@ D_A6_6028578: { type: SF64:HITBOX, offset: 0x6028578, symbol: D_A6_6028578 } D_A6_6028760: - { type: SF64:ENV_SETTINGS, offset: 0x6028760, symbol: D_A6_6028760} + { type: SF64:ENVIRONMENT, offset: 0x6028760, symbol: D_A6_6028760} D_A6_60287A4: { type: SF64:OBJECT_INIT, offset: 0x60287A4, symbol: D_A6_60287A4} diff --git a/assets/yaml/us/ast_bolse.yaml b/assets/yaml/us/ast_bolse.yaml index 9a00e883..78e5c128 100644 --- a/assets/yaml/us/ast_bolse.yaml +++ b/assets/yaml/us/ast_bolse.yaml @@ -167,7 +167,7 @@ D_BO_600F728: { type: TEXTURE, format: RGBA16, offset: 0x0600F728, width: 32, height: 32, ctype: u16, symbol: D_BO_600F728 } D_BO_600FF30: - { type: SF64:ENV_SETTINGS, offset: 0x600FF30, symbol: D_BO_600FF30 } + { type: SF64:ENVIRONMENT, offset: 0x600FF30, symbol: D_BO_600FF30 } D_BO_600FF74: { type: SF64:OBJECT_INIT, offset: 0x600FF74, symbol: D_BO_600FF74 } diff --git a/assets/yaml/us/ast_corneria.yaml b/assets/yaml/us/ast_corneria.yaml index e63d263b..cec3e86c 100644 --- a/assets/yaml/us/ast_corneria.yaml +++ b/assets/yaml/us/ast_corneria.yaml @@ -433,7 +433,7 @@ D_CO_6036D58: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 32, offset: 0x06036D58, symbol: D_CO_6036D58 } D_CO_6037160: - { type: SF64:ENV_SETTINGS, offset: 0x6037160, symbol: D_CO_6037160 } + { type: SF64:ENVIRONMENT, offset: 0x6037160, symbol: D_CO_6037160 } D_CO_60371A4: { type: SF64:OBJECT_INIT, offset: 0x60371A4, symbol: D_CO_60371A4 } diff --git a/assets/yaml/us/ast_fortuna.yaml b/assets/yaml/us/ast_fortuna.yaml index 3c19cbff..2c33e207 100644 --- a/assets/yaml/us/ast_fortuna.yaml +++ b/assets/yaml/us/ast_fortuna.yaml @@ -144,7 +144,7 @@ D_FO_600DA88: { type: TEXTURE, format: RGBA16, width: 64, height: 32, offset: 0x600DA88, ctype: u16, symbol: D_FO_600DA88 } D_FO_600EA90: - { type: SF64:ENV_SETTINGS, offset: 0x600EA90, symbol: D_FO_600EA90 } + { type: SF64:ENVIRONMENT, offset: 0x600EA90, symbol: D_FO_600EA90 } D_FO_600EAD4: { type: SF64:OBJECT_INIT, offset: 0x600EAD4, symbol: D_FO_600EAD4 } diff --git a/assets/yaml/us/ast_katina.yaml b/assets/yaml/us/ast_katina.yaml index ff3851d5..ddacbdd3 100644 --- a/assets/yaml/us/ast_katina.yaml +++ b/assets/yaml/us/ast_katina.yaml @@ -162,7 +162,7 @@ D_KA_6010780: { type: GFX, offset: 0x6010780, symbol: D_KA_6010780 } D_KA_6011000: - { type: SF64:ENV_SETTINGS, offset: 0x6011000, symbol: D_KA_6011000 } + { type: SF64:ENVIRONMENT, offset: 0x6011000, symbol: D_KA_6011000 } D_KA_6011044: { type: SF64:OBJECT_INIT, offset: 0x6011044, symbol: D_KA_6011044 } diff --git a/assets/yaml/us/ast_macbeth.yaml b/assets/yaml/us/ast_macbeth.yaml index 3bef80ff..20650095 100644 --- a/assets/yaml/us/ast_macbeth.yaml +++ b/assets/yaml/us/ast_macbeth.yaml @@ -722,7 +722,7 @@ D_MA_6030C50: {type: GFX, offset: 0x6030C50, symbol: D_MA_6030C50} D_MA_6030E30: - {type: SF64:ENV_SETTINGS, offset: 0x6030E30, symbol: D_MA_6030E30} + {type: SF64:ENVIRONMENT, offset: 0x6030E30, symbol: D_MA_6030E30} D_MA_6030E74: {type: SF64:TRIANGLE, count: 2, offset: 0x6030E74, symbol: D_MA_6030E74, mesh_symbol: D_MA_OFFSET} diff --git a/assets/yaml/us/ast_meteo.yaml b/assets/yaml/us/ast_meteo.yaml index f5f2e485..16a3ac8b 100644 --- a/assets/yaml/us/ast_meteo.yaml +++ b/assets/yaml/us/ast_meteo.yaml @@ -272,7 +272,7 @@ D_ME_6026CC4: { type: SF64:OBJECT_INIT, offset: 0x6026CC4, symbol: D_ME_6026CC4 } D_ME_6026C80: - { type: SF64:ENV_SETTINGS, offset: 0x6026C80, symbol: D_ME_6026C80 } + { type: SF64:ENVIRONMENT, offset: 0x6026C80, symbol: D_ME_6026C80 } D_ME_602B148: { type: SF64:OBJECT_INIT, offset: 0x602B148, symbol: D_ME_602B148 } diff --git a/assets/yaml/us/ast_sector_x.yaml b/assets/yaml/us/ast_sector_x.yaml index ee45e5d0..2f2d2754 100644 --- a/assets/yaml/us/ast_sector_x.yaml +++ b/assets/yaml/us/ast_sector_x.yaml @@ -227,7 +227,7 @@ D_SX_6029918: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x029918, symbol: D_SX_6029918 } D_SX_602A120: - { type: SF64:ENV_SETTINGS, offset: 0x602A120, symbol: D_SX_602A120 } + { type: SF64:ENVIRONMENT, offset: 0x602A120, symbol: D_SX_602A120 } D_SX_602A164: { type: SF64:OBJECT_INIT, count: 1026, offset: 0x602A164, symbol: D_SX_602A164 } diff --git a/assets/yaml/us/ast_sector_y.yaml b/assets/yaml/us/ast_sector_y.yaml index e4929929..8ca9f1ef 100644 --- a/assets/yaml/us/ast_sector_y.yaml +++ b/assets/yaml/us/ast_sector_y.yaml @@ -294,7 +294,7 @@ D_SY_602D238: { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 16, offset: 0x0602D238, symbol: D_SY_602D238 } D_SY_602E4B0: - { type: SF64:ENV_SETTINGS, offset: 0x602E4B0, symbol: D_SY_602E4B0 } + { type: SF64:ENVIRONMENT, offset: 0x602E4B0, symbol: D_SY_602E4B0 } D_SY_602E4F4: { type: SF64:OBJECT_INIT, offset: 0x602E4F4, symbol: D_SY_602E4F4 } diff --git a/assets/yaml/us/ast_sector_z.yaml b/assets/yaml/us/ast_sector_z.yaml index 3abdb8cd..bd532e3f 100644 --- a/assets/yaml/us/ast_sector_z.yaml +++ b/assets/yaml/us/ast_sector_z.yaml @@ -149,7 +149,7 @@ D_SZ_6006E50: { type: SF64:SKELETON, offset: 0x6006E50, symbol: D_SZ_6006E50 } D_SZ_6006E70: - { type: SF64:ENV_SETTINGS, offset: 0x6006E70, symbol: D_SZ_6006E70 } + { type: SF64:ENVIRONMENT, offset: 0x6006E70, symbol: D_SZ_6006E70 } D_SZ_6006EB4: { type: SF64:OBJECT_INIT, offset: 0x6006EB4, symbol: D_SZ_6006EB4 } diff --git a/assets/yaml/us/ast_solar.yaml b/assets/yaml/us/ast_solar.yaml index 328f9724..3e2cee43 100644 --- a/assets/yaml/us/ast_solar.yaml +++ b/assets/yaml/us/ast_solar.yaml @@ -203,7 +203,7 @@ D_SO_601E1E8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x601E1E8, symbol: D_SO_601E1E8} D_SO_601F1F0: - { type: SF64:ENV_SETTINGS, offset: 0x601F1F0, symbol: D_SO_601F1F0} + { type: SF64:ENVIRONMENT, offset: 0x601F1F0, symbol: D_SO_601F1F0} D_SO_601F234: { type: SF64:OBJECT_INIT, offset: 0x601F234, symbol: D_SO_601F234} diff --git a/assets/yaml/us/ast_titania.yaml b/assets/yaml/us/ast_titania.yaml index 8973854c..63bf8435 100644 --- a/assets/yaml/us/ast_titania.yaml +++ b/assets/yaml/us/ast_titania.yaml @@ -71,7 +71,7 @@ D_TI_6004C00: {type: TEXTURE, format: IA8, ctype: u8, width: 32, height: 32, offset: 0x6004C00, symbol: D_TI_6004C00} D_TI_6005000: - {type: SF64:ENV_SETTINGS, offset: 0x6005000, symbol: D_TI_6005000} + {type: SF64:ENVIRONMENT, offset: 0x6005000, symbol: D_TI_6005000} D_TI_600631C: {type: SF64:SCRIPT, offset: 0x600631C, symbol: D_TI_600631C} diff --git a/assets/yaml/us/ast_training.yaml b/assets/yaml/us/ast_training.yaml index bf9795eb..3a064e81 100644 --- a/assets/yaml/us/ast_training.yaml +++ b/assets/yaml/us/ast_training.yaml @@ -65,7 +65,7 @@ D_TR_60069D8: { type: TEXTURE, format: RGBA16, offset: 0x060069D8, width: 8, height: 8, ctype: u16, symbol: D_TR_60069D8 } D_TR_6006A60: - { type: SF64:ENV_SETTINGS, offset: 0x6006A60, symbol: D_TR_6006A60 } + { type: SF64:ENVIRONMENT, offset: 0x6006A60, symbol: D_TR_6006A60 } D_TR_6006AA4: { type: SF64:OBJECT_INIT, offset: 0x6006AA4, symbol: D_TR_6006AA4 } diff --git a/assets/yaml/us/ast_venom_1.yaml b/assets/yaml/us/ast_venom_1.yaml index ea462404..96722e97 100644 --- a/assets/yaml/us/ast_venom_1.yaml +++ b/assets/yaml/us/ast_venom_1.yaml @@ -113,7 +113,7 @@ D_VE1_6007D90: { type: GFX, offset: 0x6007D90, symbol: D_VE1_6007D90 } D_VE1_6007E30: - { type: SF64:ENV_SETTINGS, offset: 0x6007E30, symbol: D_VE1_6007E30 } + { type: SF64:ENVIRONMENT, offset: 0x6007E30, symbol: D_VE1_6007E30 } D_VE1_6007E74: { type: SF64:OBJECT_INIT, offset: 0x6007E74, symbol: D_VE1_6007E74 } diff --git a/assets/yaml/us/ast_venom_2.yaml b/assets/yaml/us/ast_venom_2.yaml index c7aa4b27..26d37d60 100644 --- a/assets/yaml/us/ast_venom_2.yaml +++ b/assets/yaml/us/ast_venom_2.yaml @@ -187,7 +187,7 @@ D_VE2_60149D0: { type: SF64:SKELETON, offset: 0x60149D0, symbol: D_VE2_60149D0 } D_VE2_6014D50: - { type: SF64:ENV_SETTINGS, offset: 0x6014D50, symbol: D_VE2_6014D50 } + { type: SF64:ENVIRONMENT, offset: 0x6014D50, symbol: D_VE2_6014D50 } D_VE2_6014D94: { type: SF64:OBJECT_INIT, offset: 0x6014D94, symbol: D_VE2_6014D94 } diff --git a/assets/yaml/us/ast_versus.yaml b/assets/yaml/us/ast_versus.yaml index 199cd473..f5961866 100644 --- a/assets/yaml/us/ast_versus.yaml +++ b/assets/yaml/us/ast_versus.yaml @@ -684,13 +684,13 @@ D_versus_302D568: {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x302D568, symbol: D_versus_302D568 } D_versus_302DD70: - { type: SF64:ENV_SETTINGS, offset: 0x302DD70, symbol: D_versus_302DD70} + { type: SF64:ENVIRONMENT, offset: 0x302DD70, symbol: D_versus_302DD70} D_versus_302DDB4: - { type: SF64:ENV_SETTINGS, offset: 0x302DDB4, symbol: D_versus_302DDB4} + { type: SF64:ENVIRONMENT, offset: 0x302DDB4, symbol: D_versus_302DDB4} D_versus_302DDF8: - { type: SF64:ENV_SETTINGS, offset: 0x302DDF8, symbol: D_versus_302DDF8} + { type: SF64:ENVIRONMENT, offset: 0x302DDF8, symbol: D_versus_302DDF8} D_versus_302DE3C: { type: SF64:OBJECT_INIT, offset: 0x302DE3C, symbol: D_versus_302DE3C} diff --git a/assets/yaml/us/ast_zoness.yaml b/assets/yaml/us/ast_zoness.yaml index 7cc4e5c7..9a7e21ee 100644 --- a/assets/yaml/us/ast_zoness.yaml +++ b/assets/yaml/us/ast_zoness.yaml @@ -487,7 +487,7 @@ D_ZO_6025F98: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6025F98, symbol: D_ZO_6025F98} D_ZO_60266D0: - { type: SF64:ENV_SETTINGS, offset: 0x60266D0, symbol: D_ZO_60266D0} + { type: SF64:ENVIRONMENT, offset: 0x60266D0, symbol: D_ZO_60266D0} D_ZO_6026714: { type: SF64:OBJECT_INIT, offset: 0x6026714, symbol: D_ZO_6026714} diff --git a/include/context.h b/include/context.h index cae98592..4d0f0b4f 100644 --- a/include/context.h +++ b/include/context.h @@ -8,14 +8,14 @@ extern s32 gSceneId; extern s32 gSceneSetup; -extern s32 D_ctx_80177824; // some sort of flag -extern s32 D_ctx_8017782C; // some sort of flag. all range related? +extern s32 D_ctx_80177824; +extern s32 D_ctx_8017782C; extern GameState gGameState; -extern s32 gNextGameStateTimer; // next game state timer? -extern s32 gVsItemSpawnTimer; // timer for vs item spawn +extern s32 gNextGameStateTimer; +extern s32 gVsItemSpawnTimer; extern OptionState gOptionMenuStatus; -extern s32 gPlayState; // pause-related state -extern s32 D_ctx_80177868; // some sort of state. pause-related? +extern s32 gPlayState; +extern s32 D_ctx_80177868; extern LevelMode gLevelMode; extern DrawMode gDrawMode; extern s32 gPlayerNum; @@ -24,7 +24,7 @@ extern s32 gTeamShields[6]; extern s32 gSavedTeamShields[6]; extern s32 gPrevPlanetSavedTeamShields[6]; extern s32 gTeamDamage[6]; -extern u8 gMissionStatus; // next planet path +extern u8 gMissionStatus; extern f32 gGroundHeight; extern f32 D_ctx_80177950; extern f32 D_ctx_80177968; @@ -44,37 +44,37 @@ extern s32 gCsFrameCount; extern u8 D_ctx_80177A98; extern u8 D_ctx_80177AB0; extern u8 gAqDrawMode; -extern s32 D_ctx_80177AE0; +extern s32 gTitleState; extern s32 gMainController; -extern s32 D_ctx_80177B40; +extern s32 gMapState; extern s32 gMissionNumber; extern s32 gMissionTeamStatus[7]; extern s32 gMissionHitCount[7]; extern PlanetId gMissionPlanet[7]; extern s32 gMissionMedal[7]; -extern s32 gPlanetPathStatus[]; // overruns D_ctx_80177C30? +extern s32 gPlanetPathStatus[]; extern s32 gPrevPlanetTeamShields[6]; extern s32 D_ctx_80177C58[6]; extern u8 gOptionSoundMode; extern s32 gVolumeSettings[3]; extern u16 gBgmSeqId; extern u8 gLevelType; -extern s32 D_ctx_80177CA0; +extern s32 gSavedObjectLoadIndex; extern UNK_TYPE F_80177CA8; extern f32 D_ctx_80177CB0; extern UNK_TYPE F_80177CB8; -extern f32 D_ctx_80177CC0; +extern f32 gWaterLevel; extern f32 D_ctx_80177CC8; extern f32 D_ctx_80177CE8; extern f32 D_ctx_80177D08; extern f32 D_ctx_80177D20; -extern f32 D_ctx_80177D38; -extern f32 D_ctx_80177D50; -extern f32 D_ctx_80177D68; +extern f32 gRadioPortraitScaleY; +extern f32 gRadioTextBoxScaleY; +extern f32 gRadioMsgRadioId; extern UNK_TYPE F_80177D80; extern UNK_TYPE F_80177DE8; extern s32 gGameFrameCount; -extern s32 D_ctx_80177DC8; +extern s32 gObjectLoadIndex; extern s32 gPrevEventActorIndex; extern s32 D_ctx_80177E78; extern s32 gRingPassCount; @@ -88,47 +88,47 @@ extern s32 gBossActive; extern s32 D_ctx_8017828C; extern s32 D_ctx_80178294; extern s32 gRadioState; -extern s32 D_ctx_801782A4; -extern s32 D_Timer_801782AC; -extern s32 D_Timer_801782B4; +extern s32 gCurrentRadioPortrait; +extern s32 gRadioStateTimer; +extern s32 gRadioMouthTimer; extern s32 D_ctx_801782C0; extern s32 D_ctx_801782C8; extern s32 D_ctx_801782D0; -extern s32 D_ctx_801782D8; +extern s32 gRadioMsgCharIndex; extern UNK_TYPE F_801782E0; -extern s32 D_ctx_801782E8; +extern s32 gRadioMsgId; extern UNK_TYPE F_801782F0; -extern s32 D_ctx_801782F8; -extern s32 D_ctx_80178300; -extern u16* D_ctx_80178308; +extern s32 gMsgCharIsPrinting; +extern s32 gHideRadio; +extern u16* gRadioMsg; extern ObjectInit* gLevelObjects; extern s32 gFogRed; extern s32 gFogGreen; extern s32 gFogBlue; extern s32 gFogAlpha; -extern s32 gFillScreenAlpha; // alpha something -extern s32 gFillScreenRed; // red something -extern s32 gFillScreenGreen; // green something -extern s32 gFillScreenBlue; // blue something -extern s32 gFillScreenAlphaTarget; // alpha target -extern s32 gFillScreenAlphaStep; // alpha step -extern s32 gLight3R; // 2 lights second color +extern s32 gFillScreenAlpha; +extern s32 gFillScreenRed; +extern s32 gFillScreenGreen; +extern s32 gFillScreenBlue; +extern s32 gFillScreenAlphaTarget; +extern s32 gFillScreenAlphaStep; +extern s32 gLight3R; extern s32 gLight3G; extern s32 gLight3B; -extern f32 gLight3Brightness; // 2 lights second color brightness -extern f32 gLight3x; // Vec3f? +extern f32 gLight3Brightness; +extern f32 gLight3x; extern f32 gLight3y; extern f32 gLight3z; extern s32 gFadeoutType; -extern u32 gPlayerGlareAlphas[4]; // player alphas -extern s32 gPlayerGlareReds[4]; // player reds -extern s32 gPlayerGlareGreens[4]; // player greens -extern s32 gPlayerGlareBlues[4]; // player blues +extern u32 gPlayerGlareAlphas[4]; +extern s32 gPlayerGlareReds[4]; +extern s32 gPlayerGlareGreens[4]; +extern s32 gPlayerGlareBlues[4]; extern s32 D_ctx_801783C0[4]; -extern f32 gSunViewX; // something x translate -extern f32 gSunViewY; // something y translate -extern s32 gFogNear; //near -extern s32 gFogFar; //far +extern f32 gSunViewX; +extern f32 gSunViewY; +extern s32 gFogNear; +extern s32 gFogFar; extern UNK_TYPE F_801783E0[12]; extern s32 gStarCount; extern f32 gStarWarpDistortion; @@ -160,36 +160,36 @@ extern f32 D_ctx_8017849C; extern f32 D_ctx_801784A0; extern s32 D_ctx_801784A4; extern UNK_TYPE F_801784A8; -extern s32 D_ctx_801784AC; +extern GroundType gGroundType; extern UNK_TYPE F_801784B0; extern UNK_TYPE F_801784B4; -extern f32 D_ctx_801784B8; // effective Vec3f -extern f32 D_ctx_801784BC; -extern f32 D_ctx_801784C0; -extern f32 D_ctx_801784C4; // effective Vec3f -extern f32 D_ctx_801784C8; -extern f32 D_ctx_801784CC; -extern f32 D_ctx_801784D0; // effective Vec3f -extern f32 D_ctx_801784D4; -extern f32 D_ctx_801784D8; -extern s32 gLight1x; // Vec3i light direction +extern f32 gLight1xRot; +extern f32 gLight1yRot; +extern f32 gLight1zRot; +extern f32 gLight1xRotTarget; +extern f32 gLight1yRotTarget; +extern f32 gLight1zRotTarget; +extern f32 gEnvLightxRot; +extern f32 gEnvLightyRot; +extern f32 gEnvLightzRot; +extern s32 gLight1x; extern s32 gLight1y; extern s32 gLight1z; -extern f32 D_ctx_801784E8; -extern f32 D_ctx_801784EC; // effective Vec3f? -extern f32 D_ctx_801784F0; -extern f32 D_ctx_801784F4; -extern f32 D_ctx_801784F8; // effective Vec3f -extern f32 D_ctx_801784FC; -extern f32 D_ctx_80178500; -extern s32 gLight2x; // Vec3i light direction alternate +extern f32 gLight1rotStep; +extern f32 gLight2xRot; +extern f32 gLight2yRot; +extern f32 gLight2zRot; +extern f32 gLight2xRotTarget; +extern f32 gLight2yRotTarget; +extern f32 gLight2zRotTarget; +extern s32 gLight2x; extern s32 gLight2y; extern s32 gLight2z; -extern f32 D_ctx_80178510; +extern f32 gLight2rotStep; extern UNK_TYPE F_801784514; extern UNK_TYPE F_801784518; extern UNK_TYPE F_80178451C; -extern f32 D_ctx_80178520; // effective Vec3f +extern f32 D_ctx_80178520; extern f32 D_ctx_80178524; extern f32 D_ctx_80178528; extern UNK_TYPE F_80178452C; @@ -197,29 +197,29 @@ extern UNK_TYPE F_801784530; extern UNK_TYPE F_801784534; extern f32 D_ctx_80178538; extern f32 D_ctx_8017853C; -extern s32 D_ctx_80178540; +extern s32 gLight2colorStep; extern s32 D_ctx_80178544; -extern s32 gLight1R; // Color32 light color 1 +extern s32 gLight1R; extern s32 gLight1G; extern s32 gLight1B; -extern s32 gAmbientR; // Color32 ambient color +extern s32 gAmbientR; extern s32 gAmbientG; extern s32 gAmbientB; extern UNK_TYPE F_801784560; -extern s32 gLight2R; // Color32 light color 2 +extern s32 gLight2R; extern s32 gLight2G; extern s32 gLight2B; -extern s32 D_ctx_80178570; // Color32 light color 2 modifier? -extern s32 D_ctx_80178574; -extern s32 D_ctx_80178578; -extern s32 D_ctx_80161A70; // Color32? +extern s32 gLight2RTarget; +extern s32 gLight2GTarget; +extern s32 gLight2BTarget; +extern s32 D_ctx_80161A70; extern s32 D_ctx_80161A74; extern s32 D_ctx_80161A78; extern s32 D_ctx_80161A7C; extern s32 D_ctx_80161A80; extern s32 D_ctx_80161A84; -extern s32 gGroundType; -extern s32 gSavedGroundType; +extern s32 gGroundSurface; +extern s32 gSavedGroundSurface; extern u8 gGoldRingCount[4]; extern u8 D_ctx_80161A94[4]; extern s32 gHitCount; @@ -245,26 +245,26 @@ extern f32 gActor194zPos[2][100]; extern f32 gActor194xRot[2][100]; extern f32 gActor194yRot[2][100]; extern f32 gActor194zRot[2][100]; -extern u16 gEnemyShotSpeed; // enemy shot speed? -extern u8 gShowLevelClearStatusScreen; // show level complete status overlay -extern s32 gLevelStartStatusScreenTimer; // level clear related -extern s32 gLevelClearScreenTimer; // timer for mission accomplished scrren +extern u16 gEnemyShotSpeed; +extern u8 gShowLevelClearStatusScreen; +extern s32 gLevelStartStatusScreenTimer; +extern s32 gLevelClearScreenTimer; extern s32 gBossHealthBar; -extern s32 D_ctx_80177850; // bonus text related. set to 15 but never read +extern s32 D_ctx_80177850; extern s32 D_ctx_80177858[4]; extern s32 gPlayerForms[4]; extern s32 gHandicap[4]; extern VsStage gVersusStage; -extern s32 D_ctx_801778A4; -extern s32 D_ctx_801778AC; -extern s32 D_ctx_801778C8; +extern s32 gVsPointsToWin; +extern s32 gVsMatchType; +extern s32 gVsTimeTrialLimit; extern bool gVersusMode; extern u16 gBoostButton[4]; extern u16 gBrakeButton[4]; extern u16 gShootButton[4]; extern u16 gBombButton[4]; extern f32 D_ctx_80177958[4]; -extern s32 D_ctx_8017796C; +extern s32 gTeamLowHealthMsgTimer; extern OSContPad* gInputHold; extern OSContPad* gInputPress; extern u8* gControllerRumble; @@ -305,10 +305,10 @@ extern s32 gStarWolfTeamAlive[6]; extern s32 gSavedStarWolfTeamAlive[6]; extern s32 gRightWingHealth[4]; extern s32 gLeftWingHealth[4]; -extern s32 D_ctx_80177D40[4]; -extern s32 D_ctx_80177D58[4]; -extern s32 D_ctx_80177D70[4]; -extern s32 D_ctx_80177D88[4]; +extern s32 gRightWingFlashTimer[4]; +extern s32 gLeftWingFlashTimer[4]; +extern s32 gRightWingDebrisTimer[4]; +extern s32 gLeftWingDebrisTimer[4]; extern s32 gBombCount[4]; extern s32 D_ctx_80177DB8[4]; extern s32 D_ctx_80177DD0[4][10]; diff --git a/include/functions.h b/include/functions.h index 21176863..999d12d4 100644 --- a/include/functions.h +++ b/include/functions.h @@ -46,20 +46,20 @@ void Background_DrawPartialStarfield(s32, s32); void Background_DrawBackdrop(void); void Background_DrawSun(void); void Background_DrawLensFlare(void); -void func_bg_80040CDC(void); +void Background_dummy_80040CDC(void); void Background_DrawGround(void); void func_bg_80042D38(void); // fox_boss -void func_boss_80042EC0(Boss* boss); +void Boss_AwardBonus(Boss* boss); void Boss299_Init(Boss* boss); void Boss299_Update(Boss* boss); void Boss299_Draw(Boss* boss); void Boss300_Init(Boss* boss); void Boss300_Update(Boss* boss); void Boss300_Draw(Boss* boss); -void func_boss_800430DC(f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, s32, s32); -void func_boss_8004319C(Player* player, f32 arg1, f32 arg2, f32 arg3); +void Boss_SpawnActor189(f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, s32, s32); +void Boss_CompleteLevel(Player* player, f32 xPos, f32 yPos, f32 zPos); // fox_tank void func_tank_80043468(Player* player); @@ -388,7 +388,7 @@ void func_hud_800869A0(f32, f32, s32, f32, s32, s32); void func_hud_80087530(f32, f32, s32); void func_hud_800884E4(void); void func_hud_80088564(void); -void func_hud_8008865C(void); +void HUD_DrawStatusScreens(void); s32 func_hud_8008AC54(s32); void func_hud_8008AD94(void); void func_hud_8008B5B0(f32 x, f32 y); @@ -399,14 +399,14 @@ void func_hud_8008C390(f32, f32, f32, s32); void func_hud_8008C5C8(f32, f32, f32, s32); void func_hud_8008C6F4(s32, s32); s32 func_hud_8008BCBC(s32); -void func_hud_8008CA44(void); -s32 func_hud_8008CB8C(void); +void HUD_DrawEdgeArrows(void); +s32 HUD_dummy_8008CB8C(void); void func_hud_8008D0DC(f32, f32, f32, f32, f32); -void func_hud_8008DE68(void); +void HUD_DrawBossHealth(void); void func_hud_8008E51C(s32* , f32); void func_hud_8008E9EC(f32, f32); void func_hud_8008EA14(f32, f32); -void func_hud_8008FA84(void); +void HUD_Draw(void); void func_hud_8008FE78(Boss*); void func_hud_8008FFF0(Boss*, s32); s32 func_hud_80090200(Boss* boss); @@ -493,8 +493,8 @@ bool func_play_800A8054(ObjectId objId, f32 arg1, f32 arg2, f32 arg3, f32 arg4, void Scenery360_Initialize(Scenery360*); // fox_versus -s32 func_versus_800C1E9C(void); -void func_versus_800C1ED4(void); +s32 Versus_Main(void); +void Versus_Draw(void); void Versus_StartMatch(void); void func_versus_800C2190(void); void func_versus_800C26C8(void); diff --git a/include/i4.h b/include/i4.h index ee344aad..76bb4bca 100644 --- a/include/i4.h +++ b/include/i4.h @@ -20,17 +20,17 @@ void SectorZ_LevelComplete(Player*); void SectorZ_8019DD20(Actor*); void OvlI4_CallFunction(u32, void*); -void Fortuna_80187960(Actor*); +void Fortuna_UpdateEvents(Actor*); void Fortuna_8018BA2C(void); void Bolse_UpdateEventHandler(Actor*); void Bolse_80191ED8(void); void Bolse_DrawDynamicGround(void); void Katina_Boss316_Init(Boss *); -void Katina_80198594(Actor*); +void Katina_UpdateEvents(Actor*); void Katina_80198930(void); void SectorZ_80199900(Actor *, s32); void SectorZ_Missile_Update(Actor*); -void SectorZ_8019AB8C(Actor*); +void SectorZ_UpdateEvents(Actor*); void SectorZ_8019EA68(void); void Fortuna_80188AD0(Actor*); diff --git a/include/i6.h b/include/i6.h index c2b998bf..7ef81803 100644 --- a/include/i6.h +++ b/include/i6.h @@ -31,7 +31,7 @@ void Andross_8018BDD8(void); void Andross_8018C390(Player*); void Andross_Boss320_Init(Boss *); void Andross_801961AC(void); -void Venom2_80196314(Actor*); +void Venom2_UpdateEvents(Actor*); void Venom2_80196968(void); void SectorY_Boss314_Init(Boss *); void SectorY_Actor204_Update(Actor*); diff --git a/include/prevent_context_reordering.h b/include/prevent_context_reordering.h index 31026d79..968253ae 100644 --- a/include/prevent_context_reordering.h +++ b/include/prevent_context_reordering.h @@ -1,13 +1,13 @@ #ifndef PREVENT_CONTEXT_REORDERING_H #define PREVENT_CONTEXT_REORDERING_H -extern int Dummyhalf; +// extern int Dummyhalf; // struct Dummy0 {int x;}; // struct Dummy1 {int x;}; // struct Dummy2 {int x;}; // struct Dummy3 {int x;}; // struct Dummy4 {int x;}; -struct Dummy5 {int x;}; +// struct Dummy5 {int x;}; struct Dummy6 {int x;}; struct Dummy7 {int x;}; struct Dummy8 {int x;}; diff --git a/include/sf64audio_external.h b/include/sf64audio_external.h index db903add..9d9bd265 100644 --- a/include/sf64audio_external.h +++ b/include/sf64audio_external.h @@ -185,7 +185,7 @@ void Audio_PlayBgm(u16 seqId); // used by sys or related void AudioLoad_Init(void); -void func_80016A50(void); +void Audio_dummy_80016A50(void); void Audio_InitSounds(void); void Audio_Update(void); SPTask* AudioThread_CreateTask(void); diff --git a/include/sf64event.h b/include/sf64event.h index 1516f3f8..0b292dd1 100644 --- a/include/sf64event.h +++ b/include/sf64event.h @@ -81,7 +81,7 @@ #define EVENT_CLEAR_TRIGGER(cmd) EVENT_SET_TRIGGER(EVC_NONE, cmd) #define EVENT_LOOP(count, cmd) EVENT_CMD(EVOP_LOOP, cmd, count) #define EVENT_GOTO(cmd) EVENT_LOOP(0, cmd) -#define EVENT_SET_GROUND(type) EVENT_CMD(EVOP_SET_GROUND, 0, type) +#define EVENT_SET_SURFACE(type) EVENT_CMD(EVOP_SET_SURFACE, 0, type) #define EVENT_DROP_ITEM(item) EVENT_CMD(EVOP_DROP_ITEM, 0, item) #define EVENT_ADD_TO_GROUP(num, flags) EVENT_CMD(EVOP_ADD_TO_GROUP, flags, num) #define EVENT_SET_REVERB(reverb) EVENT_CMD(EVOP_SET_REVERB, 0, reverb) @@ -154,7 +154,7 @@ typedef enum EventOpcode { /* 113 */ EVOP_ADD_TO_GROUP, /* 116 */ EVOP_DROP_ITEM = 116, /* 118 */ EVOP_SET_REVERB = 118, - /* 119 */ EVOP_SET_GROUND, + /* 119 */ EVOP_SET_SURFACE, /* 120 */ EVOP_PLAY_MSG, /* 121 */ EVOP_DAMAGE_TEAM, /* 122 */ EVOP_STOP_BGM, diff --git a/include/sf64level.h b/include/sf64level.h index f1f03a4a..b2195947 100644 --- a/include/sf64level.h +++ b/include/sf64level.h @@ -5,22 +5,22 @@ #define SAVE_SLOT_VENOM_1 14 #define SAVE_SLOT_VENOM_2 15 -typedef enum { +typedef enum LevelType { /* 0 */ LEVELTYPE_PLANET, /* 1 */ LEVELTYPE_SPACE, /* 2 */ LEVELTYPE_UNK2, /* 3 */ LEVELTYPE_UNK3, } LevelType; -typedef enum { +typedef enum MissionStatus { /* 0 */ MISSION_COMPLETE, /* 1 */ MISSION_ACCOMPLISHED, /* 2 */ MISSION_WARP, } MissionStatus; -typedef struct { +typedef struct Environment { /* 0x00 */ s32 type; - /* 0x04 */ s32 unk_04; + /* 0x04 */ s32 unk04; /* 0x08 */ u16 bgColor; /* 0x0A */ u16 seqId; /* 0x0C */ s32 fogR; @@ -28,14 +28,29 @@ typedef struct { /* 0x14 */ s32 fogB; /* 0x18 */ s32 fogN; /* 0x1C */ s32 fogF; - /* 0x20 */ Vec3f unk_20; + /* 0x20 */ Vec3f lightDir; /* 0x2C */ s32 lightR; /* 0x30 */ s32 lightG; /* 0x34 */ s32 lightB; /* 0x38 */ s32 ambR; /* 0x3C */ s32 ambG; /* 0x40 */ s32 ambB; -} EnvSettings; // size = 0x44 +} Environment; // size = 0x44 + +typedef enum GroundType { + /* 0 */ GROUND_0, + /* 1 */ GROUND_1, + /* 2 */ GROUND_2, + /* 3 */ GROUND_3, + /* 4 */ GROUND_4, + /* 5 */ GROUND_5, + /* 6 */ GROUND_6, + /* 7 */ GROUND_7, + /* 10 */ GROUND_10 = 10, + /* 11 */ GROUND_11, + /* 12 */ GROUND_12, + /* 13 */ GROUND_13, +} GroundType; typedef enum SceneId { /* 0 */ SCENE_TITLE, @@ -58,11 +73,11 @@ typedef enum SceneId { /* 17 */ SCENE_TRAINING, /* 18 */ SCENE_VENOM_1, /* 19 */ SCENE_KATINA, - /* 10 */ SCENE_20, - /* 11 */ SCENE_MACBETH, - /* 12 */ SCENE_BOLSE, - /* 13 */ SCENE_SECTOR_Z, - /* 14 */ SCENE_VENOM_2, + /* 20 */ SCENE_20, + /* 21 */ SCENE_MACBETH, + /* 22 */ SCENE_BOLSE, + /* 23 */ SCENE_SECTOR_Z, + /* 24 */ SCENE_VENOM_2, /* 50 */ SCENE_VERSUS = 50, /* 99 */ SCENE_LOGO = 99, } SceneId; @@ -119,10 +134,10 @@ typedef enum VsStage { /* 2 */ VS_STAGE_SECTOR_Z, } VsStage; -typedef enum GroundType { - /* 0 */ GROUNDTYPE_GRASS, - /* 1 */ GROUNDTYPE_ROCK, - /* 2 */ GROUNDTYPE_WATER, -} GroundType; +typedef enum GroundSurface { + /* 0 */ SURFACE_GRASS, + /* 1 */ SURFACE_ROCK, + /* 2 */ SURFACE_WATER, +} GroundSurface; #endif diff --git a/include/sf64mesg.h b/include/sf64mesg.h index db1369bf..aa5146cd 100644 --- a/include/sf64mesg.h +++ b/include/sf64mesg.h @@ -102,7 +102,7 @@ typedef enum RadioCharacterId { void Radio_PlayMessage(u16*, enum RadioCharacterId); void func_radio_800BB388(void); -void func_radio_800BB5D0(void); +void Radio_Draw(void); typedef enum { MSGCHAR_END, diff --git a/include/sf64player.h b/include/sf64player.h index 05ea3de9..f2ebffaf 100644 --- a/include/sf64player.h +++ b/include/sf64player.h @@ -186,7 +186,7 @@ typedef struct Player { /* 0x0BC */ f32 unk_0BC; /* 0x0C0 */ Vec3f vel; /* 0x0CC */ f32 unk_0CC; - /* 0x0D0 */ f32 unk_0D0; + /* 0x0D0 */ f32 baseSpeed; /* 0x0D4 */ f32 unk_0D4; /* 0x0D8 */ Vec3f unk_0D8; /* 0x0E4 */ f32 unk_0E4; @@ -200,7 +200,7 @@ typedef struct Player { /* 0x104 */ f32 unk_104; /* 0x108 */ f32 unk_108; /* 0x10C */ f32 unk_10C; - /* 0x110 */ f32 unk_110; + /* 0x110 */ f32 boostSpeed; /* 0x114 */ f32 unk_114; /* 0x118 */ f32 unk_118; /* 0x11C */ f32 unk_11C; diff --git a/include/variables.h b/include/variables.h index aa2b6f9c..da10d9ad 100644 --- a/include/variables.h +++ b/include/variables.h @@ -74,7 +74,7 @@ extern Gfx D_edisplay_800CFD80[]; // fox_enmy extern ObjectInit* gLevelObjectInits[]; -extern u32 D_enmy_800CFF54[9]; +extern u32 gWarpRingSfx[9]; // fox_enmy2 extern s32 gTeamEventActorIndex[4]; @@ -92,7 +92,7 @@ extern u8 gVenomHardClear; extern u8 gLeveLClearStatus[30]; // fox_radio -extern s32 gCurrentMsgPri; +extern s32 gRadioMsgPri; // fox_360 extern s32 gAllRangeSupplyTimer; @@ -164,26 +164,26 @@ extern s32 gShowBossHealth; // 0x80161734 // fox_play extern u8 gSavedZoSearchlightStatus; -extern f32 D_play_80161A54; +extern f32 gArwingSpeed; extern s32 D_play_80161A58; extern s32 D_play_80161A5C; extern u16 gScreenFlashTimer; extern u16 gDropHitCountItem; //fox_radio -extern u16** D_radio_80178720; -extern s32 D_radio_80178724; -extern s32 D_radio_80178728; -extern s32 D_radio_8017872C; -extern f32 D_radio_80178730; -extern f32 D_radio_80178734; -extern f32 D_radio_80178738; -extern f32 D_radio_8017873C; -extern f32 D_radio_80178740; +extern u16** gRadioMsgList; +extern s32 gRadioMsgListIndex; +extern s32 gRadioPrintPosX; +extern s32 gRadioPrintPosY; +extern f32 gRadioTextBoxPosX; +extern f32 gRadioTextBoxPosY; +extern f32 gRadioTextBoxScaleX; +extern f32 gRadioPortraitPosX; +extern f32 gRadioPortraitPosY; // fox_versus extern s32 D_versus_80178750; -extern s32 D_versus_80178754; +extern s32 gVsMatchState; extern s32 D_versus_80178758; extern s32 sUnlockLandmaster; // sUnlockLandmaster extern s32 sUnlockOnFoot; // sUnlockOnFoot diff --git a/linker_scripts/us/symbol_addrs_audio.txt b/linker_scripts/us/symbol_addrs_audio.txt index c3f16723..4ecb8a71 100644 --- a/linker_scripts/us/symbol_addrs_audio.txt +++ b/linker_scripts/us/symbol_addrs_audio.txt @@ -401,7 +401,7 @@ func_800168BC = 0x800168BC; -func_80016A50 = 0x80016A50; +Audio_dummy_80016A50 = 0x80016A50; Audio_GetSfxFalloff = 0x80016A58; Audio_GetSfxReverb = 0x80016BC0; Audio_GetSfxPan = 0x80016CDC; diff --git a/linker_scripts/us/symbol_addrs_engine.txt b/linker_scripts/us/symbol_addrs_engine.txt index 03dd42b3..c60e1d9f 100644 --- a/linker_scripts/us/symbol_addrs_engine.txt +++ b/linker_scripts/us/symbol_addrs_engine.txt @@ -111,15 +111,15 @@ RCP_SetupDL_50 = 0x800BA610; RCP_SetupDL_61 = 0x800BA640; // fox_radio -D_radio_80178720 = 0x80178720; -D_radio_80178724 = 0x80178724; -D_radio_80178728 = 0x80178728; -D_radio_8017872C = 0x8017872C; -D_radio_80178730 = 0x80178730; -D_radio_80178734 = 0x80178734; -D_radio_80178738 = 0x80178738; -D_radio_8017873C = 0x8017873C; -D_radio_80178740 = 0x80178740; +gRadioMsgList = 0x80178720; +gRadioMsgListIndex = 0x80178724; +gRadioPrintPosX = 0x80178728; +gRadioPrintPosY = 0x8017872C; +gRadioTextBoxPosX = 0x80178730; +gRadioTextBoxPosY = 0x80178734; +gRadioTextBoxScaleX = 0x80178738; +gRadioPortraitPosX = 0x8017873C; +gRadioPortraitPosY = 0x80178740; sRadioUseRedBox = 0x80178744; D_radio_80178748 = 0x80178748; @@ -127,14 +127,14 @@ D_radio_80178748 = 0x80178748; sUnlockLandmaster = 0x8017875C; sUnlockOnFoot = 0x80178760; -gCurrentMsgPri = 0x800D4A70; +gRadioMsgPri = 0x800D4A70; func_radio_800BA760 = 0x800BA760; func_radio_800BA7BC = 0x800BA7BC; Radio_PlayMessage = 0x800BA808; func_radio_800BAAE8 = 0x800BAAE8; func_radio_800BB388 = 0x800BB388; -func_radio_800BB5D0 = 0x800BB5D0; +Radio_Draw = 0x800BB5D0; // fox_message gTextCharTextures = 0x80179010; @@ -156,8 +156,8 @@ sSunShifts = 0x800C9CC4; sKaSunShifts = 0x800C9CF8; // fox_boss -func_boss_8004319C = 0x8004319C; -func_boss_80042EC0 = 0x80042EC0; +Boss_CompleteLevel = 0x8004319C; +Boss_AwardBonus = 0x80042EC0; gBossFrameCount = 0x801613A0; // fox_save @@ -276,7 +276,7 @@ func_enmy_80061E48 = 0x80061E48; ActorEvent_Load = 0x80061F0C; Object_Load = 0x80062180; func_enmy_80062568 = 0x80062568; -Object_LoadFromInit = 0x80062664; +Object_LoadLevelObjects = 0x80062664; func_enmy_80062B60 = 0x80062B60; func_enmy_80062C38 = 0x80062C38; func_enmy_80062D04 = 0x80062D04; @@ -398,12 +398,12 @@ D_800D1AEC = 0x800D1AEC; //type:s32 size:0x1B0 // fox_play gSavedZoSearchlightStatus = 0x80161A50; -D_play_80161A54 = 0x80161A54; +gArwingSpeed = 0x80161A54; D_play_80161A5C = 0x80161A5C; gScreenFlashTimer = 0x80161A60; gDropHitCountItem = 0x80161A62; D_play_80161A64 = 0x80161A64; -sEnvSettings = 0x80161A68; +sEnvironment = 0x80161A68; gVenomHardClear = 0x800D2F68; //type:u8 // fox_context @@ -413,8 +413,8 @@ D_ctx_80161A78 = 0x80161A78; D_ctx_80161A7C = 0x80161A7C; D_ctx_80161A80 = 0x80161A80; D_ctx_80161A84 = 0x80161A84; -gGroundType = 0x80161A88; -gSavedGroundType = 0x80161A8C; +gGroundSurface = 0x80161A88; +gSavedGroundSurface = 0x80161A8C; gGoldRingCount = 0x80161A90; gHitCount = 0x80161A98; gSavedHitCount = 0x80161A9C; @@ -460,12 +460,12 @@ gHandicap = 0x80177888; gDrawMode = 0x80177898; gVersusStage = 0x8017789C; gPlayerNum = 0x801778A0; -D_ctx_801778A4 = 0x801778A4; +gVsPointsToWin = 0x801778A4; gCamCount = 0x801778A8; D_801778AB = 0x801778AB; -D_ctx_801778AC = 0x801778AC; +gVsMatchType = 0x801778AC; gTeamShields = 0x801778B0; //size:0x18 -D_ctx_801778C8 = 0x801778C8; +gVsTimeTrialLimit = 0x801778C8; gSavedTeamShields = 0x801778D0; //size:0x18 gVersusMode = 0x801778E8; gPrevPlanetSavedTeamShields = 0x801778F0;//size=0x18 @@ -505,11 +505,11 @@ D_ctx_80177AB0 = 0x80177AB0; gShieldAlpha = 0x80177AB8; gAqDrawMode = 0x80177AC8; gHasShield = 0x80177AD0; -D_ctx_80177AE0 = 0x80177AE0; +gTitleState = 0x80177AE0; gShieldTimer = 0x80177AE8; gMainController = 0x80177AF8; gVsLockOnTimers = 0x80177B00; -D_ctx_80177B40 = 0x80177B40; +gMapState = 0x80177B40; gStartAndrossFightTimer = 0x80177B44; gMissionNumber = 0x80177B48; gMissionTeamStatus = 0x80177B50; @@ -527,7 +527,7 @@ gBgmSeqId = 0x80177C90; D_ctx_80177C94 = 0x80177C94; gLevelType = 0x80177C98; D_ctx_80177C9C = 0x80177C9C; -D_ctx_80177CA0 = 0x80177CA0; +gSavedObjectLoadIndex = 0x80177CA0; D_ctx_80177CA4 = 0x80177CA4; D_ctx_80177CAC = 0x80177CAC; D_ctx_80177CB0 = 0x80177CB0; @@ -540,16 +540,16 @@ D_ctx_80177D08 = 0x80177D08; gRightWingHealth = 0x80177D10; D_ctx_80177D20 = 0x80177D20; gLeftWingHealth = 0x80177D28; -D_ctx_80177D38 = 0x80177D38; -D_ctx_80177D40 = 0x80177D40; -D_ctx_80177D50 = 0x80177D50; -D_ctx_80177D58 = 0x80177D58; -D_ctx_80177D68 = 0x80177D68; -D_ctx_80177D70 = 0x80177D70; -D_ctx_80177D88 = 0x80177D88; +gRadioPortraitScaleY = 0x80177D38; +gRightWingFlashTimer = 0x80177D40; +gRadioTextBoxScaleY = 0x80177D50; +gLeftWingFlashTimer = 0x80177D58; +gRadioMsgRadioId = 0x80177D68; +gRightWingDebrisTimer = 0x80177D70; +gLeftWingDebrisTimer = 0x80177D88; gBombCount = 0x80177DA0; gGameFrameCount = 0x80177DB0; -D_ctx_80177DC8 = 0x80177DC8; +gObjectLoadIndex = 0x80177DC8; gPrevEventActorIndex = 0x80177E70; D_ctx_80177E78 = 0x80177E78; gRingPassCount = 0x80177E80; @@ -571,21 +571,21 @@ gStarOffsetsY = 0x80178290; D_ctx_80178294 = 0x80178294; gStarFillColors = 0x80178298; gRadioState = 0x8017829C; -D_ctx_801782A4 = 0x801782A4; +gCurrentRadioPortrait = 0x801782A4; gScenery360 = 0x801782A8; -D_Timer_801782AC = 0x801782AC; -D_Timer_801782B4 = 0x801782B4; +gRadioStateTimer = 0x801782AC; +gRadioMouthTimer = 0x801782B4; D_ctx_801782B8 = 0x801782B8; D_ctx_801782BC = 0x801782BC; D_ctx_801782C0 = 0x801782C0; D_ctx_801782D0 = 0x801782D0; D_ctx_801782D4 = 0x801782D4; -D_ctx_801782D8 = 0x801782D8; -D_ctx_801782E8 = 0x801782E8; -D_ctx_801782F8 = 0x801782F8; +gRadioMsgCharIndex = 0x801782D8; +gRadioMsgId = 0x801782E8; +gMsgCharIsPrinting = 0x801782F8; D_ctx_801782FC = 0x801782FC; -D_ctx_80178300 = 0x80178300; -D_ctx_80178308 = 0x80178308; +gHideRadio = 0x80178300; +gRadioMsg = 0x80178308; gLevelObjects = 0x80178310; gFogRed = 0x80178320; gFogGreen = 0x80178328; @@ -623,26 +623,26 @@ gCameraShakeY = 0x8017847C; gCameraShake = 0x80178480; gLoadLevelObjects = 0x80178488; D_ctx_801784A4 = 0x801784A4; -D_ctx_801784AC = 0x801784AC; -D_ctx_801784B8 = 0x801784B8; -D_ctx_801784BC = 0x801784BC; -D_ctx_801784C0 = 0x801784C0; -D_ctx_801784C4 = 0x801784C4; -D_ctx_801784C8 = 0x801784C8; -D_ctx_801784CC = 0x801784CC; -D_ctx_801784D0 = 0x801784D0; -D_ctx_801784D4 = 0x801784D4; -D_ctx_801784D8 = 0x801784D8; +gGroundType = 0x801784AC; +gLight1xRot = 0x801784B8; +gLight1yRot = 0x801784BC; +gLight1zRot = 0x801784C0; +gLight1xRotTarget = 0x801784C4; +gLight1yRotTarget = 0x801784C8; +gLight1zRotTarget = 0x801784CC; +gEnvLightxRot = 0x801784D0; +gEnvLightyRot = 0x801784D4; +gEnvLightzRot = 0x801784D8; gLight1x = 0x801784DC; gLight1y = 0x801784E0; gLight1z = 0x801784E4; -D_ctx_801784E8 = 0x801784E8; -D_ctx_801784EC = 0x801784EC; -D_ctx_801784F0 = 0x801784F0; -D_ctx_801784F4 = 0x801784F4; -D_ctx_801784F8 = 0x801784F8; -D_ctx_801784FC = 0x801784FC; -D_ctx_80178500 = 0x80178500; +gLight1rotStep = 0x801784E8; +gLight2xRot = 0x801784EC; +gLight2yRot = 0x801784F0; +gLight2zRot = 0x801784F4; +gLight2xRotTarget = 0x801784F8; +gLight2yRotTarget = 0x801784FC; +gLight2zRotTarget = 0x80178500; gLight2x = 0x80178504; gLight2y = 0x80178508; gLight2z = 0x8017850C; @@ -651,7 +651,7 @@ D_ctx_80178524 = 0x80178524; D_ctx_80178528 = 0x80178528; D_ctx_80178538 = 0x80178538; D_ctx_8017853C = 0x8017853C; -D_ctx_80178540 = 0x80178540; +gLight2colorStep = 0x80178540; D_ctx_80178544 = 0x80178544; gLight1R = 0x80178548; gLight1G = 0x8017854C; @@ -662,9 +662,9 @@ gAmbientB = 0x8017855C; gLight2R = 0x80178564; gLight2G = 0x80178568; gLight2B = 0x8017856C; -D_ctx_80178570 = 0x80178570; -D_ctx_80178574 = 0x80178574; -D_ctx_80178578 = 0x80178578; +gLight2RTarget = 0x80178570; +gLight2GTarget = 0x80178574; +gLight2BTarget = 0x80178578; Play_GetMaxShields = 0x800A3FC4; func_play_800A3FB0 = 0x800A3FB0; @@ -771,4 +771,4 @@ D_tank_800C9F2C = 0x800C9F2C; gNoHitbox = 0x800CBF34; D_bg_8015F970 = 0x8015F970; D_bg_8015F984 = 0x8015F984; -D_ctx_8017796C = 0x8017796C; +gTeamLowHealthMsgTimer = 0x8017796C; diff --git a/linker_scripts/us/symbol_addrs_overlays.txt b/linker_scripts/us/symbol_addrs_overlays.txt index ed319ef1..71fee18e 100644 --- a/linker_scripts/us/symbol_addrs_overlays.txt +++ b/linker_scripts/us/symbol_addrs_overlays.txt @@ -154,7 +154,7 @@ D_i3_801C2740 = 0x801C2740; //segment:ovl_i3 size:0x28 D_i3_801C2768 = 0x801C2768; //segment:ovl_i3 size:0x38 D_i3_801C27A0 = 0x801C27A0; //segment:ovl_i3 size:0x20 -Katina_80198594 = 0x80198594;//segment:ovl_i4 +Katina_UpdateEvents = 0x80198594;//segment:ovl_i4 Katina_Boss316_Init = 0x80193CA4;//segment:ovl_i4 SectorZ_Missile_Update = 0x80199C60;//segment:ovl_i4 SectorZ_80199900 = 0x80199900;//segment:ovl_i4 diff --git a/sfxIds.txt b/sfxIds.txt index 7ef3cb71..72e06a68 100644 --- a/sfxIds.txt +++ b/sfxIds.txt @@ -1,38 +1,39 @@ -0x09000000 -0x09400000 -0x09001001 -0x09000002 -0x09004002 -0x09000003 -0x09000004 -0x0903F004 -0x0100F005 -0x0100F006 -0x09000007 -0x01008008 -0x0901A009 -0x0903A00A -0x0901A00B -0x0940A00B -0x0940800C -0x0903900E -0x0903A00F -0x0900C010 -0x09007011 -0x09000012 -0x09000013 -0x09002013 -0x09000014 -0x09008015 -0x01008016 -0x09000017 +0x09000000 turret fire +0x09400000 single laser +0x09001001 bomb flight +0x09000002 boost +0x09004002 boost variant used by boss titania +0x09000003 brake +0x09000004 sector X boss hitting slippy +0x0903F004 player death +0x0100F005 arwing engine noise +0x0100F006 landmaster engine noise +0x09000007 wings changing position +0x01008008 iniial bomb flight. only plays for 1 frame +0x0901A009 unused? bomb explosion +0x0903A00A bomb explosion +0x0901A00B unused? bomb explosion +0x0940A00B corneria start explosion and save delete +0x0940800C twin laser +0x0?????0D some sort of explosion +0x0903900E weak hit +0x0903A00F strong hit +0x0900C010 fatal hit +0x09007011 deflect laser +0x09000012 arwing barrel roll +0x09000013 wings stop moving +0x09002013 arwing launchers/boss sector y spawn stop moving +0x09000014 landmaster/on foot shot +0x09008015 landmaster falls on ground +0x01008016 landmaster hover +0x09000017 blue marine barrel roll 0x0140001C 0x0100001D 0x0100001E 0x0100001F 0x0100F020 0x09400021 -0x0100F022 +0x0100F022 blue marine engine noise 0x09008023 0x01004024 0x01000025 @@ -42,7 +43,7 @@ 0x09007029 0x0900802A 0x0940802A -0x0940802B +0x0940802B hyper laser 0x0900A02C 0x0900302D 0x0903502E diff --git a/src/audio/audio_general.c b/src/audio/audio_general.c index cbabdbc5..d702861e 100644 --- a/src/audio/audio_general.c +++ b/src/audio/audio_general.c @@ -516,7 +516,7 @@ u8 sSetNextVoiceId = 0; u8 sUnkVoiceParam = 0; u8 sMuteBgmForVoice = 0; -void func_80016A50(void) { +void Audio_dummy_80016A50(void) { } f32 Audio_GetSfxFalloff(u8 bankId, u8 entryIndex) { @@ -2155,12 +2155,12 @@ void Audio_UpdateLandmasterNoise(u8 playerId) { } else { freqMod += 1.0f; } - if (gPlayer[playerId].unk_0D0 > 25.0f) { + if (gPlayer[playerId].baseSpeed > 25.0f) { freqMod += 0.5f; - } else if (gPlayer[playerId].unk_0D0 < 5.0f) { + } else if (gPlayer[playerId].baseSpeed < 5.0f) { freqMod -= 0.5f; } else { - freqMod += (gPlayer[playerId].unk_0D0 - 15.0f) * 0.05f; + freqMod += (gPlayer[playerId].baseSpeed - 15.0f) * 0.05f; } if (freqMod > 2.0f) { freqMod = 2.0f; diff --git a/src/engine/fox_360.c b/src/engine/fox_360.c index b74b9e33..174008ef 100644 --- a/src/engine/fox_360.c +++ b/src/engine/fox_360.c @@ -172,7 +172,7 @@ void AllRange_GreatFoxRepair(Player* player) { case 0: player->unk_1F4 = player->timer_498 = player->damage = player->unk_280 = player->boostMeter = player->boostCooldown = player->somersault = gCsFrameCount = 0; - player->unk_130 = player->camRoll = player->unk_110 = player->unk_08C = player->unk_0D8.x = + player->unk_130 = player->camRoll = player->boostSpeed = player->unk_08C = player->unk_0D8.x = player->unk_0D8.y = player->unk_0D8.z = player->unk_134 = player->unk_4D8 = 0.0f; gCsCamEyeX = 1673.0f; gCsCamEyeY = 337.0f; @@ -183,7 +183,7 @@ void AllRange_GreatFoxRepair(Player* player) { } player->unk_0E8 = 0.0f; player->pos.x = 2100.0f; - player->unk_0D0 = 30.0f; + player->baseSpeed = 30.0f; player->unk_0E4 = -8.0f; player->unk_114 = 90.0f; gCsCamAtX = 2100.0f; @@ -203,7 +203,7 @@ void AllRange_GreatFoxRepair(Player* player) { } if (gCsFrameCount >= 64) { player->unk_1D0++; - player->unk_0D0 = 0.0f; + player->baseSpeed = 0.0f; } break; case 2: @@ -234,7 +234,7 @@ void AllRange_GreatFoxRepair(Player* player) { if (gFillScreenAlpha == 0) { player->unk_190 = player->unk_194 = 5.0f; player->unk_114 = 90.0f; - player->unk_0D0 = D_play_80161A54; + player->baseSpeed = gArwingSpeed; player->unk_1D0++; AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); @@ -263,7 +263,7 @@ void AllRange_GreatFoxRepair(Player* player) { Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), MTXF_APPLY); sp6C.x = 0.0f; sp6C.y = 0.0f; - sp6C.z = player->unk_0D0; + sp6C.z = player->baseSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp6C, &sp60); player->vel.x = sp60.x; player->vel.z = sp60.z; @@ -461,8 +461,7 @@ void ActorAllRange_SpawnStarWolf(void) { } void ActorAllRange_PlayMessage(u16* msg, RadioCharacterId character) { - if ((D_ctx_80178300 == 0) && (gActors[0].state == STATE360_2) && - (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_STANDBY)) { + if ((gHideRadio == 0) && (gActors[0].state == STATE360_2) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_STANDBY)) { Radio_PlayMessage(msg, character); } } @@ -696,19 +695,19 @@ void ActorAllRange_UpdateEvents(Actor* this) { gAllRangeEventTimer++; switch (gCurrentLevel) { case LEVEL_FORTUNA: - Fortuna_80187960(this); + Fortuna_UpdateEvents(this); break; case LEVEL_KATINA: - Katina_80198594(this); + Katina_UpdateEvents(this); break; case LEVEL_BOLSE: Bolse_UpdateEventHandler(this); break; case LEVEL_SECTOR_Z: - SectorZ_8019AB8C(this); + SectorZ_UpdateEvents(this); break; case LEVEL_VENOM_2: - Venom2_80196314(this); + Venom2_UpdateEvents(this); break; } ActorAllRange_SpawnSupplies(this); @@ -1491,11 +1490,11 @@ void ActorAllRange_Update(Actor* this) { this->fwork[4] = gPlayer[0].pos.x + spCC; this->fwork[5] = gPlayer[0].pos.y + spC8; this->fwork[6] = gPlayer[0].unk_138 + spC4; - this->fwork[1] = gPlayer[0].unk_0D0 + 10.0f; + this->fwork[1] = gPlayer[0].baseSpeed + 10.0f; } if ((gActors[0].state == STATE360_6) && (this->aiType <= AI360_PEPPY)) { this->fwork[3] = 3.0f; - this->fwork[1] = gPlayer[0].unk_0D0 - 5.0f; + this->fwork[1] = gPlayer[0].baseSpeed - 5.0f; this->iwork[11] = 2; } else if ((gCurrentLevel == LEVEL_VENOM_2) && (this->aiType >= AI360_WOLF)) { this->fwork[3] = 1.6f; @@ -1545,7 +1544,7 @@ void ActorAllRange_Update(Actor* this) { if (this->aiIndex != AI360_FOX) { this->fwork[1] = gActors[this->aiIndex].fwork[0] - 5.0f; } else { - this->fwork[1] = gPlayer[0].unk_0D0 - 5.0f; + this->fwork[1] = gPlayer[0].baseSpeed - 5.0f; if ((gCurrentLevel == LEVEL_VENOM_2) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN) && (gPlayer[0].unk_4D8 > 100.0f)) { this->iwork[16] = STATE360_8; diff --git a/src/engine/fox_A4290_colheaders.c b/src/engine/fox_A4290_colheaders.c index 506f7e30..9ff133ac 100644 --- a/src/engine/fox_A4290_colheaders.c +++ b/src/engine/fox_A4290_colheaders.c @@ -38,70 +38,70 @@ CollisionHeader D_800D2B38[10] = { { { -1128.0f, -1835.0f, -1202.0f }, { 997.0f, 139.0f, 1360.0f }, - 79, + ARRAY_COUNT(D_ME_602FA9C), D_ME_602FA9C, D_ME_60300C8, }, { { -3006.0f, -2274.0f, -4530.0f }, { 3015.0f, 3348.0f, 5246.0f }, - 236, + ARRAY_COUNT(D_ME_60305DC), D_ME_60305DC, D_ME_603184C, }, { { -152.0f, -200.0f, -152.0f }, { 165.0f, 204.0f, 181.0f }, - 42, + ARRAY_COUNT(D_ME_6030208), D_ME_6030208, D_ME_6030550, }, { { -1704.0f, -1006.0f, -4751.0f }, { 1704.0f, 1030.0f, 4842.0f }, - 174, + ARRAY_COUNT(D_SY_6033070), D_SY_6033070, D_SY_6033E08, }, { { -1308.0f, 0.0f, -1460.0f }, { 1310.0f, 666.0f, 807.0f }, - 93, + ARRAY_COUNT(D_FO_600F60C), D_FO_600F60C, D_FO_600FD50, }, { { -951.0f, 0.0f, -1075.0f }, { 1075.0f, 1014.0f, 1075.0f }, - 22, + ARRAY_COUNT(D_FO_600F3F4), D_FO_600F3F4, D_FO_600F5AC, }, { { -951.0f, 0.0f, -1075.0f }, { 1075.0f, 384.0f, 1075.0f }, - 22, + ARRAY_COUNT(D_FO_600F1DC), D_FO_600F1DC, D_FO_600F394, }, { { -1554.0f, -2.0f, -1401.0f }, { 1554.0f, 590.0f, 1401.0f }, - 262, + ARRAY_COUNT(D_BO_6010294), D_BO_6010294, D_BO_601170C, }, { { -1386.0f, -696.0f, -2274.0f }, { 1386.0f, 1033.0f, 1833.0f }, - 316, + ARRAY_COUNT(D_SZ_6007558), D_SZ_6007558, D_SZ_6008E08, }, { { -671.0f, 0.0f, -671.0f }, { 671.0f, 648.0f, 671.0f }, - 250, + ARRAY_COUNT(D_VE2_6014FEC), D_VE2_6014FEC, D_VE2_6016374, }, @@ -118,14 +118,14 @@ CollisionHeader2 D_800D2CA0[19] = { { { -1220.0f, 0.0f, -1315.0f }, { 1403.0f, 174.0f, 1308.0f }, - 13, + ARRAY_COUNT(D_CO_603F338), D_CO_603F338, D_CO_603F388, }, { { -1311.0f, 0.0f, -1120.0f }, { 1266.0f, 1465.0f, 1266.0f }, - 36, + ARRAY_COUNT(D_CO_603F40C), D_CO_603F40C, D_CO_603F4E4, }, @@ -139,105 +139,105 @@ CollisionHeader2 D_800D2CA0[19] = { { { -498.0f, -10.0f, -498.0f }, { 498.0f, 705.0f, 498.0f }, - 4, + ARRAY_COUNT(D_versus_302EEE8), D_versus_302EEE8, D_versus_302EF00, }, { { -1494.0f, -30.0f, -1494.0f }, { 1494.0f, 2115.0f, 1494.0f }, - 4, + ARRAY_COUNT(D_versus_302EF6C), D_versus_302EF6C, D_versus_302EF84, }, { { -623.0f, -10.0f, -623.0f }, { 623.0f, 200.0f, 623.0f }, - 4, + ARRAY_COUNT(D_versus_302EFF0), D_versus_302EFF0, D_versus_302F008, }, { { -488.0f, 0.0f, -568.0f }, { 488.0f, 148.0f, 567.0f }, - 30, + ARRAY_COUNT(D_ZO_602CACC), D_ZO_602CACC, D_ZO_602CB80, }, { { -900.0f, -110.0f, -1900.0f }, { 900.0f, 190.0f, 100.0f }, - 2, + ARRAY_COUNT(D_MA_6030E74), D_MA_6030E74, D_MA_6030E80, }, { { -900.0f, -100.0f, -1000.0f }, { 900.0f, 250.0f, 100.0f }, - 2, + ARRAY_COUNT(D_MA_6030EB0), D_MA_6030EB0, D_MA_6030EBC, }, { { -900.0f, -190.0f, -1900.0f }, { 900.0f, 100.0f, 100.0f }, - 2, + ARRAY_COUNT(D_MA_6030EEC), D_MA_6030EEC, D_MA_6030EF8, }, { { -500.0f, -250.0f, -1010.0f }, { 500.0f, 100.0f, 100.0f }, - 2, + ARRAY_COUNT(D_MA_6030F28), D_MA_6030F28, D_MA_6030F34, }, { { -1200.0f, 0.0f, -1800.0f }, { 0.0f, 900.0f, 1500.0f }, - 4, + ARRAY_COUNT(D_MA_6030F64), D_MA_6030F64, D_MA_6030F7C, }, { { -400.0f, 0.0f, -900.0f }, { 400.0f, 0.0f, 0.0f }, - 2, + ARRAY_COUNT(D_MA_6030FC4), D_MA_6030FC4, D_MA_6030FD0, }, { { -74.0f, 0.0f, -84.0f }, { 74.0f, 125.0f, 84.0f }, - 30, + ARRAY_COUNT(D_AQ_60320B8), D_AQ_60320B8, D_AQ_603216C, }, { { -1200.0f, 0.0f, -1315.0f }, { 1403.0f, 200.0f, 1308.0f }, - 8, + ARRAY_COUNT(D_AQ_6031FB0), D_AQ_6031FB0, D_AQ_6031FE0, }, { { -600.0f, 0.0f, -657.0f }, { 701.0f, 100.0f, 654.0f }, - 8, + ARRAY_COUNT(D_AQ_6031FB0), D_AQ_6031FB0, D_AQ_603204C, }, { { -2965.0f, -16.0f, -2965.0f }, { 2965.0f, 544.0f, 2965.0f }, - 14, + ARRAY_COUNT(D_versus_302F044), D_versus_302F044, D_versus_302F098, }, { { -814.0f, 0.0f, -691.0f }, { 814.0f, 752.0f, 691.0f }, - 28, + ARRAY_COUNT(D_AQ_6032388), D_AQ_6032388, D_AQ_6032430, }, diff --git a/src/engine/fox_beam.c b/src/engine/fox_beam.c index fb588b6e..3dcea5e9 100644 --- a/src/engine/fox_beam.c +++ b/src/engine/fox_beam.c @@ -60,7 +60,7 @@ void func_beam_80035E78(PlayerShot* shot) { gScreenFlashTimer = 4; if (shot->obj.pos.y < (gGroundHeight + 450.0f)) { gCameraShake = 15; - if (gGroundType == GROUNDTYPE_WATER) { + if (gGroundSurface == SURFACE_WATER) { func_effect_8007D9DC(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, shot->unk_48 * 3.0f, 0); func_effect_8007D9DC(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, @@ -184,7 +184,7 @@ void func_beam_800365E4(f32 xPos, f32 yPos, f32 zPos, f32 arg3, f32 arg4, f32 ar s32 unk44, s32 time) { s32 i; - if ((D_ctx_801784AC != 4) && (gLevelType == LEVELTYPE_PLANET) && (gGroundType != GROUNDTYPE_WATER) && + if ((gGroundType != 4) && (gLevelType == LEVELTYPE_PLANET) && (gGroundSurface != SURFACE_WATER) && (gCurrentLevel != LEVEL_SOLAR) && (gCurrentLevel != LEVEL_BOLSE) && (gCurrentLevel != LEVEL_TRAINING) && (gCurrentLevel != LEVEL_ZONESS)) { for (i = 0; i < 50; i++) { @@ -213,7 +213,7 @@ void func_beam_800366CC(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yRot, void func_beam_80036770(f32 xPos, f32 yPos, f32 zPos, f32 yRot, f32 scale) { s32 i; - if ((D_ctx_801784AC != 4) && (gLevelType == LEVELTYPE_PLANET) && (gGroundType <= GROUNDTYPE_GRASS) && + if ((gGroundType != 4) && (gLevelType == LEVELTYPE_PLANET) && (gGroundSurface <= SURFACE_GRASS) && (gCurrentLevel != LEVEL_TRAINING) && (gCurrentLevel != LEVEL_SOLAR) && (gCurrentLevel != LEVEL_ZONESS)) { for (i = 0; i < 50; i++) { if (gEffects[i].obj.status == OBJ_FREE) { @@ -885,7 +885,7 @@ void func_beam_80038140(PlayerShot* shot) { } } } - if ((D_ctx_801784AC == 4) && Ground_801B6AEC(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + D_ctx_80177D20)) { + if ((gGroundType == 4) && Ground_801B6AEC(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + D_ctx_80177D20)) { func_beam_80036318(shot); if (shot->obj.id != PLAYERSHOT_4) { func_effect_8007A900(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 2.0f, 255, 15, 0); @@ -1515,11 +1515,11 @@ void func_beam_8003B00C(PlayerShot* shot, Player* player) { Matrix_Translate(gCalcMatrix, player->unk_084, player->unk_080, 0.0f, MTXF_APPLY); sp5C.x = 0.0f; sp5C.y = 0.0f; - sp5C.z = player->unk_0D0 + 200.0f; + sp5C.z = player->baseSpeed + 200.0f; Matrix_MultVec3f(gCalcMatrix, &sp5C, &sp50); shot->vel.x = sp50.x; shot->vel.y = sp50.y; - shot->vel.z = sp50.z - player->unk_110; + shot->vel.z = sp50.z - player->boostSpeed; sp5C.x = shot->unk_54; sp5C.y = -15.0f; sp5C.z = 0.0f; @@ -1600,11 +1600,11 @@ void func_beam_8003B55C(PlayerShot* shot, s32 index) { Vec3f sp44; Vec3f sp38; - if ((gGroundType == GROUNDTYPE_WATER) && (shot->obj.pos.y < (gGroundHeight + 50.0f)) && (index == 0)) { + if ((gGroundSurface == SURFACE_WATER) && (shot->obj.pos.y < (gGroundHeight + 50.0f)) && (index == 0)) { func_effect_8007ACE0(shot->obj.pos.x, gGroundHeight, shot->obj.pos.z, 0.1f, 1.5f, shot->obj.rot.y + 20.0f); func_effect_8007ACE0(shot->obj.pos.x, gGroundHeight, shot->obj.pos.z, 0.1f, 1.5f, shot->obj.rot.y - 20.0f); } - if ((shot->obj.pos.y < gGroundHeight) && (D_ctx_801784AC != 4)) { + if ((shot->obj.pos.y < gGroundHeight) && (gGroundType != 4)) { func_beam_80036318(shot); shot->obj.pos.y = gGroundHeight + 2; if (gCurrentLevel == LEVEL_BOLSE) { @@ -1629,7 +1629,7 @@ void func_beam_8003B55C(PlayerShot* shot, s32 index) { func_beam_80036770(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->obj.rot.y, 2.0f); } } - if (gGroundType == GROUNDTYPE_WATER) { + if (gGroundSurface == SURFACE_WATER) { Object_Kill(&shot->obj, shot->sfxSource); return; } @@ -2002,7 +2002,7 @@ void func_beam_8003CC08(PlayerShot* shot) { func_beam_80035E78(shot); break; } - if ((shot->obj.pos.y < gGroundHeight) && (D_ctx_801784AC != 4)) { + if ((shot->obj.pos.y < gGroundHeight) && (gGroundType != 4)) { func_beam_80035E78(shot); break; } @@ -2075,7 +2075,7 @@ void func_beam_8003CF90(PlayerShot* shot) { Player* player; if ((shot->obj.pos.y < gGroundHeight) || (shot->unk_64 == 1)) { - if ((gGroundType == GROUNDTYPE_WATER) && (shot->obj.pos.y < gGroundHeight)) { + if ((gGroundSurface == SURFACE_WATER) && (shot->obj.pos.y < gGroundHeight)) { shot->unk_48 = 10.0f; func_effect_8007D9DC(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, shot->unk_48 * 3.0f, 0); diff --git a/src/engine/fox_bg.c b/src/engine/fox_bg.c index b78a0593..42ad1a40 100644 --- a/src/engine/fox_bg.c +++ b/src/engine/fox_bg.c @@ -810,7 +810,7 @@ void Background_DrawLensFlare(void) { Matrix_Pop(&gGfxMatrix); } -void func_bg_80040CDC(void) { +void Background_dummy_80040CDC(void) { } void Background_DrawGround(void) { @@ -829,10 +829,10 @@ void Background_DrawGround(void) { return; } sp1D4 = 0.0f; - if ((D_ctx_801784AC != 10) && (D_ctx_801784AC != 11)) { + if ((gGroundType != 10) && (gGroundType != 11)) { sp1D4 = -4000.0f; } - if (D_ctx_801784AC == 7) { + if (gGroundType == 7) { sp1D4 = 0.0f; gPlayer[gPlayerNum].unk_0AC = 0.0f; } @@ -897,16 +897,16 @@ void Background_DrawGround(void) { temp_fv0 = Math_ModF((10000.0f - gPlayer[gPlayerNum].unk_0AC) * 0.32f, 128.0f); gDPSetupTile(gMasterDisp++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32, temp_fv0, temp_s0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD); - switch (gGroundType) { - case GROUNDTYPE_GRASS: + switch (gGroundSurface) { + case SURFACE_GRASS: gDPLoadTileTexture(gMasterDisp++, D_CO_601B6C0, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32); gBgColor = 0x845; // 8, 8, 32 break; - case GROUNDTYPE_ROCK: + case SURFACE_ROCK: gDPLoadTileTexture(gMasterDisp++, D_CO_6028260, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32); gBgColor = 0x845; // 8, 8, 32 break; - case GROUNDTYPE_WATER: + case SURFACE_WATER: RCP_SetupDL_45(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 128); gDPLoadTileTexture(gMasterDisp++, D_CO_6028A60, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32); @@ -924,7 +924,7 @@ void Background_DrawGround(void) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_601B640); } else { - gGroundType = GROUNDTYPE_GRASS; + gGroundSurface = SURFACE_GRASS; gBgColor = 0x845; // 8, 8, 32 for (i = 0; i < 4; i++) { Matrix_Push(&gGfxMatrix); diff --git a/src/engine/fox_boss.c b/src/engine/fox_boss.c index 7244529d..5b8e7a97 100644 --- a/src/engine/fox_boss.c +++ b/src/engine/fox_boss.c @@ -13,7 +13,7 @@ s32 PAD_boss_C9EC4[14] = { 0 }; const f32 D_boss_800D55D0[] = { 6000.0f, 18000.0f, -6000.0f, -18000.0f }; -void func_boss_80042EC0(Boss* boss) { +void Boss_AwardBonus(Boss* boss) { s32 bonus; f32 yOffset; @@ -59,7 +59,7 @@ void Boss300_Update(Boss300* this) { void Boss300_Draw(Boss300* this) { } -void func_boss_80042FF4(Actor* actor, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7, f32 arg8, +void Boss_SetupActor189(Actor* actor, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7, f32 arg8, f32 arg9, f32 argA, s32 argB, s32 argC) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; @@ -83,13 +83,13 @@ void func_boss_80042FF4(Actor* actor, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f3 } } -void func_boss_800430DC(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7, f32 arg8, +void Boss_SpawnActor189(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7, f32 arg8, f32 arg9, s32 argA, s32 argB) { s32 i; for (i = 59; i >= 0; i--) { if (gActors[i].obj.status == OBJ_FREE) { - func_boss_80042FF4(&gActors[i], arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, argA, argB); + Boss_SetupActor189(&gActors[i], arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, argA, argB); return; } } @@ -99,14 +99,14 @@ void func_boss_80043188(Boss* boss) { boss->info.unk_10 = 30000.0f; } -void func_boss_8004319C(Player* player, f32 arg1, f32 arg2, f32 arg3) { +void Boss_CompleteLevel(Player* player, f32 xPos, f32 yPos, f32 zPos) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 80); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 80); gCsFrameCount = 0; - D_ctx_80178448 = arg3 + D_ctx_80177D20; - D_ctx_80178440 = arg1; - D_ctx_80178444 = arg2; + D_ctx_80178448 = zPos + D_ctx_80177D20; + D_ctx_80178440 = xPos; + D_ctx_80178444 = yPos; player->state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; player->unk_1D0 = 10; diff --git a/src/engine/fox_context.c b/src/engine/fox_context.c index b56f03d7..5c5ca86e 100644 --- a/src/engine/fox_context.c +++ b/src/engine/fox_context.c @@ -42,9 +42,9 @@ s32 gCsFrameCount; u8 D_ctx_80177A98; u8 D_ctx_80177AB0; u8 gAqDrawMode; -s32 D_ctx_80177AE0; +s32 gTitleState; s32 gMainController; -s32 D_ctx_80177B40; +s32 gMapState; s32 gMissionNumber; s32 gMissionTeamStatus[7]; s32 gMissionHitCount[7]; @@ -61,22 +61,22 @@ u8 gOptionSoundMode; s32 gVolumeSettings[3]; u16 gBgmSeqId; u8 gLevelType; -s32 D_ctx_80177CA0; +s32 gSavedObjectLoadIndex; UNK_TYPE F_80177CA8; f32 D_ctx_80177CB0; UNK_TYPE F_80177CB8; -f32 D_ctx_80177CC0; +f32 gWaterLevel; f32 D_ctx_80177CC8; f32 D_ctx_80177CE8; f32 D_ctx_80177D08; f32 D_ctx_80177D20; -f32 D_ctx_80177D38; -f32 D_ctx_80177D50; -f32 D_ctx_80177D68; +f32 gRadioPortraitScaleY; +f32 gRadioTextBoxScaleY; +f32 gRadioMsgRadioId; UNK_TYPE F_80177D80; UNK_TYPE F_80177DE8; s32 gGameFrameCount; -s32 D_ctx_80177DC8; +s32 gObjectLoadIndex; s32 gPrevEventActorIndex; s32 D_ctx_80177E78; s32 gRingPassCount; @@ -90,22 +90,22 @@ s32 gBossActive; s32 D_ctx_8017828C; s32 D_ctx_80178294; s32 gRadioState; -s32 D_ctx_801782A4; -s32 D_Timer_801782AC; -s32 D_Timer_801782B4; +s32 gCurrentRadioPortrait; +s32 gRadioStateTimer; +s32 gRadioMouthTimer; u8 gLeveLClearStatus[30] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; s32 D_ctx_801782C0; s32 D_ctx_801782C8; s32 D_ctx_801782D0; -s32 D_ctx_801782D8; +s32 gRadioMsgCharIndex; UNK_TYPE F_801782E0; -s32 D_ctx_801782E8; +s32 gRadioMsgId; UNK_TYPE F_801782F0; -s32 D_ctx_801782F8; -s32 D_ctx_80178300; -u16* D_ctx_80178308; +s32 gMsgCharIsPrinting; +s32 gHideRadio; +u16* gRadioMsg; ObjectInit* gLevelObjects; UNK_TYPE F_80178318; s32 gFogRed; @@ -147,6 +147,7 @@ UNK_TYPE F_80178400; UNK_TYPE F_80178404; UNK_TYPE F_80178408; UNK_TYPE F_8017840C; +UNK_TYPE P_800D31A0 = 0; s32 gStarCount; f32 gStarWarpDistortion; f32 D_ctx_80178418; @@ -162,12 +163,12 @@ UNK_TYPE F_8017843C; f32 D_ctx_80178440; f32 D_ctx_80178444; f32 D_ctx_80178448; -f32 D_ctx_80178450[3]; -f32 D_ctx_80178460[3]; -f32 D_ctx_80178470[3]; +f32 D_ctx_80178450[3]; // x positions of certain actors (teammates?) +f32 D_ctx_80178460[3]; // y positions of certain actors (teammates?) +f32 D_ctx_80178470[3]; // z positions of certain actors (teammates?) f32 gCameraShakeY; s32 gCameraShake; -s32 D_ctx_80178484; +s32 D_ctx_80178484; // set to 10000 but not used bool gLoadLevelObjects; UNK_TYPE F_8017848C; UNK_TYPE F_80178490; @@ -177,46 +178,53 @@ f32 D_ctx_8017849C; f32 D_ctx_801784A0; s32 D_ctx_801784A4; UNK_TYPE F_801784A8; -s32 D_ctx_801784AC; +GroundType gGroundType; UNK_TYPE F_801784B0; UNK_TYPE F_801784B4; -f32 D_ctx_801784B8; // effective Vec3f -f32 D_ctx_801784BC; -f32 D_ctx_801784C0; -f32 D_ctx_801784C4; // effective Vec3f -f32 D_ctx_801784C8; -f32 D_ctx_801784CC; -f32 D_ctx_801784D0; // effective Vec3f -f32 D_ctx_801784D4; -f32 D_ctx_801784D8; -s32 gLight1x; // Vec3i light direction + +// light source 1 +f32 gLight1xRot; // effective Vec3f +f32 gLight1yRot; +f32 gLight1zRot; +f32 gLight1xRotTarget; // effective Vec3f +f32 gLight1yRotTarget; +f32 gLight1zRotTarget; +f32 gEnvLightxRot; // effective Vec3f +f32 gEnvLightyRot; +f32 gEnvLightzRot; +s32 gLight1x; // Vec3i? s32 gLight1y; s32 gLight1z; -f32 D_ctx_801784E8; -f32 D_ctx_801784EC; // effective Vec3f? -f32 D_ctx_801784F0; -f32 D_ctx_801784F4; -f32 D_ctx_801784F8; // effective Vec3f -f32 D_ctx_801784FC; -f32 D_ctx_80178500; -s32 gLight2x; // Vec3i light direction alternate +f32 gLight1rotStep; + +// light source 2 +f32 gLight2xRot; // effective Vec3f +f32 gLight2yRot; +f32 gLight2zRot; +f32 gLight2xRotTarget; // effective Vec3f +f32 gLight2yRotTarget; +f32 gLight2zRotTarget; +s32 gLight2x; // Vec3i? s32 gLight2y; s32 gLight2z; -f32 D_ctx_80178510; +f32 gLight2rotStep; + +// this section looks like a third light source UNK_TYPE F_801784514; UNK_TYPE F_801784518; UNK_TYPE F_80178451C; -f32 D_ctx_80178520; // effective Vec3f +f32 D_ctx_80178520; // effective Vec3f, set to env light rotation but unused f32 D_ctx_80178524; f32 D_ctx_80178528; UNK_TYPE F_80178452C; UNK_TYPE F_801784530; UNK_TYPE F_801784534; f32 D_ctx_80178538; -f32 D_ctx_8017853C; -s32 D_ctx_80178540; -s32 D_ctx_80178544; -s32 gLight1R; // Color32 light color 1 + +f32 D_ctx_8017853C; // hitbox size modifier. always 0.0f. seems out of place +s32 gLight2colorStep; // light 2 color step +s32 D_ctx_80178544; // light 3 color step? +s32 gLight1R; // Color32 light color 1 s32 gLight1G; s32 gLight1B; s32 gAmbientR; // Color32 ambient color @@ -226,18 +234,18 @@ UNK_TYPE F_80178560; s32 gLight2R; // Color32 light color 2 s32 gLight2G; s32 gLight2B; -UNK_TYPE P_800D31A0 = 0; -s32 D_ctx_80178570; // Color32 light color 2 modifier? -s32 D_ctx_80178574; -s32 D_ctx_80178578; -s32 D_ctx_80161A70; // Color32? start of bss +s32 gLight2RTarget; // Color32 light color 2 modifier? +s32 gLight2GTarget; +s32 gLight2BTarget; + +s32 D_ctx_80161A70; // Color32 set but not used, start of bss s32 D_ctx_80161A74; s32 D_ctx_80161A78; -s32 D_ctx_80161A7C; +s32 D_ctx_80161A7C; // Color32? set but not used s32 D_ctx_80161A80; s32 D_ctx_80161A84; -s32 gGroundType; -s32 gSavedGroundType; +GroundSurface gGroundSurface; +GroundSurface gSavedGroundSurface; u8 gGoldRingCount[4]; u8 D_ctx_80161A94[4]; s32 gHitCount; @@ -278,20 +286,20 @@ s32 D_ctx_80177858[4]; // set to 3 but never used PlayerForm gPlayerForms[4]; s32 gHandicap[4]; VsStage gVersusStage; -s32 D_ctx_801778A4; -s32 D_ctx_801778AC; -s32 D_ctx_801778C8; +s32 gVsPointsToWin; +s32 gVsMatchType; +s32 gVsTimeTrialLimit; bool gVersusMode; u16 gBoostButton[4]; u16 gBrakeButton[4]; u16 gShootButton[4]; u16 gBombButton[4]; f32 D_ctx_80177958[4]; // set to 1.0f but never used -s32 D_ctx_8017796C; +s32 gTeamLowHealthMsgTimer; OSContPad* gInputHold; OSContPad* gInputPress; u8* gControllerRumble; -s32 D_ctx_80177990[4]; +s32 D_ctx_80177990[4]; // these two are also rumble related f32 D_ctx_801779A8[4]; u8 gPauseEnabled; s32 gChargeTimers[4]; @@ -328,10 +336,10 @@ s32 gStarWolfTeamAlive[6]; s32 gSavedStarWolfTeamAlive[6]; s32 gRightWingHealth[4]; s32 gLeftWingHealth[4]; -s32 D_ctx_80177D40[4]; -s32 D_ctx_80177D58[4]; -s32 D_ctx_80177D70[4]; -s32 D_ctx_80177D88[4]; +s32 gRightWingFlashTimer[4]; +s32 gLeftWingFlashTimer[4]; +s32 gRightWingDebrisTimer[4]; +s32 gLeftWingDebrisTimer[4]; s32 gBombCount[4]; s32 D_ctx_80177DB8[4]; s32 D_ctx_80177DD0[4][10]; @@ -339,7 +347,7 @@ s32 D_ctx_80177E74; s32 D_ctx_80177E7C; s32 gChangeTo360; Vec3f gTeamArrowsViewPos[10]; -f32 D_ctx_80177F20[65]; +f32 D_ctx_80177F20[65]; // Seem to be an early implementation of RadarMark f32 D_ctx_80178028[65]; f32 D_ctx_80178130[65]; u8 D_ctx_80178238[65]; diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index b2a2da19..383a698e 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -200,7 +200,7 @@ void Cutscene_WarpZoneComplete(Player* player) { Math_SmoothStepToF(&player->unk_08C, 0.0f, 0.1f, 3.0f, 0.0f); Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f); Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 20.0f, 0.0f); - Math_SmoothStepToF(&player->unk_110, 0.0f, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToF(&player->boostSpeed, 0.0f, 0.1f, 3.0f, 0.0f); switch (player->unk_1D0) { case 0: @@ -217,7 +217,7 @@ void Cutscene_WarpZoneComplete(Player* player) { D_ctx_80177A48[1] -= D_ctx_80177A48[2]; Math_SmoothStepToF(&D_ctx_80177A48[2], 1.2f, 0.1f, 0.01f, 0.0f); Math_SmoothStepToF(&D_ctx_80177A48[0], 0.1f, 0.1f, 0.002f, 0.0f); - Math_SmoothStepToF(&player->unk_0D0, 0.0f, 1.0f, 0.5f, 0.0f); + Math_SmoothStepToF(&player->baseSpeed, 0.0f, 1.0f, 0.5f, 0.0f); Matrix_RotateX(gCalcMatrix, -5.0f * M_DTOR, MTXF_NEW); Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, MTXF_APPLY); sp5C.x = 0.0f; @@ -275,7 +275,7 @@ void Cutscene_WarpZoneComplete(Player* player) { } if (gCsFrameCount > 450) { Math_SmoothStepToF(&D_ctx_80177A48[0], 1.0f, 0.1f, 0.004f, 0.0f); - player->unk_0D0 += 2.0f; + player->baseSpeed += 2.0f; player->unk_0E4 += 0.1f; player->unk_190 = 2.0f; @@ -319,7 +319,7 @@ void Cutscene_WarpZoneComplete(Player* player) { sp5C.x = 0.0f; sp5C.y = 0.0f; - sp5C.z = player->unk_0D0 + player->unk_110; + sp5C.z = player->baseSpeed + player->boostSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp5C, &sp50); player->vel.x = sp50.x; @@ -388,7 +388,7 @@ void func_demo_80049630(Actor* actor) { } void func_demo_8004990C(Player* player) { - if (D_ctx_801784AC == 0) { + if (gGroundType == 0) { D_ctx_80177CE8 += 60.0f; } player->unk_138 = player->pos.z + player->unk_08C; @@ -527,7 +527,7 @@ void Cutscene_EnterWarpZone(Player* player) { } player->unk_08C += player->unk_0CC; - player->unk_0CC = player->unk_0CC - 100.0f; + player->unk_0CC -= 100.0f; if (player->unk_08C < -15000.0f) { player->unk_08C = 0.0f; @@ -583,7 +583,7 @@ void Cutscene_EnterWarpZone(Player* player) { player->vel.z = player->unk_144 = D_ctx_80177D20 = player->unk_144 = D_ctx_80177CB0 = D_ctx_80177D20 = 0.0f; - player->timer_27C = gSavedHitCount = D_ctx_80177DC8 = D_ctx_80177CA0 = 0; + player->timer_27C = gSavedHitCount = gObjectLoadIndex = gSavedObjectLoadIndex = 0; player->unk_234 = 1; gLevelPhase = 1; @@ -833,7 +833,7 @@ void Cutscene_AllRangeMode(Player* player) { Math_SmoothStepToF(&player->unk_0EC, 0.0f, 0.1f, 1.0f, 0.0f); Math_SmoothStepToF(&player->unk_12C, 0.0f, 0.1f, 5.0f, 0.0f); Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f); - Math_SmoothStepToF(&player->unk_110, 0.0f, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToF(&player->boostSpeed, 0.0f, 0.1f, 3.0f, 0.0f); Math_SmoothStepToF(&player->unk_08C, 0.0f, 0.1f, 3.0f, 0.0f); switch (player->unk_1D0) { @@ -925,7 +925,7 @@ void Cutscene_AllRangeMode(Player* player) { sp70.x = 0.0f; sp70.y = 0.0f; - sp70.z = player->unk_0D0 + player->unk_110; + sp70.z = player->baseSpeed + player->boostSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp70, &sp64); @@ -971,9 +971,9 @@ void Cutscene_CoComplete2(Player* player) { player->wings.unk_10 = 0.0f; player->unk_130 = 0.0f; player->unk_12C = 0.0f; - player->unk_110 = 0.0f; + player->boostSpeed = 0.0f; player->wings.modelId = 1; - player->unk_0D0 = 40.0f; + player->baseSpeed = 40.0f; /* fallthrough */ case 11: @@ -1099,7 +1099,7 @@ void Cutscene_CoComplete2(Player* player) { } if ((180.0f - fabsf(player->unk_0EC)) <= 3.0f) { - gGroundType = GROUNDTYPE_ROCK; + gGroundSurface = SURFACE_ROCK; } if (player->timer_1F8 == 0) { @@ -1107,7 +1107,7 @@ void Cutscene_CoComplete2(Player* player) { player->timer_1FC = 500; player->unk_1D0 = 2; player->unk_000 = (player->unk_004 = (player->unk_008 = (D_ctx_80178418 = 0.0f))); - player->unk_0D0 = 0.0f; + player->baseSpeed = 0.0f; D_ctx_80177A48[6] = 0.0f; } break; @@ -1169,7 +1169,7 @@ void Cutscene_CoComplete2(Player* player) { if (gTeamShields[TEAM_ID_PEPPY] > 0) { func_demo_8004A840(2); } - gGroundType = GROUNDTYPE_GRASS; + gGroundSurface = SURFACE_GRASS; } Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); @@ -1265,13 +1265,13 @@ void Cutscene_CoComplete2(Player* player) { player->unk_25C = 0.6f; } player->unk_000 += 1.0f; - player->unk_0D0 = player->unk_000 * player->unk_000; + player->baseSpeed = SQ(player->unk_000); if (player->timer_1F8 == 0) { D_ctx_80177A48[7] = player->vel.x; D_ctx_80177A48[8] = player->vel.y; D_ctx_80177A48[9] = player->vel.z; player->unk_1D0 = 5; - player->unk_0D0 = 0.0f; + player->baseSpeed = 0.0f; player->timer_1F8 = 10; func_effect_80078E50(player->pos.x, player->pos.y, player->unk_138, 30.0f); } @@ -1318,7 +1318,7 @@ void Cutscene_CoComplete2(Player* player) { sp60.x = 0.0f; sp60.y = 0.0f; - sp60.z = player->unk_0D0; + sp60.z = player->baseSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp60, &sp54); @@ -1451,7 +1451,7 @@ void Cutscene_UTurn(Player* player) { Math_SmoothStepToF(&player->unk_0E4, 0.0f, 0.1f, 5.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.y, player->pos.y - 20.0f, 0.2f, 100.0f, 0.0f); - sp50.rot.z = player->unk_0D0; + sp50.rot.z = player->baseSpeed; sp58.x = Math_RadToDeg(Math_Atan2F(player->pos.x, player->unk_138)); player->boostCooldown = 1; @@ -1656,7 +1656,7 @@ void Cutscene_KillPlayer(Player* player) { if (player->unk_288 > 0) { D_ctx_80177DD0[player->unk_288 - 1][D_ctx_80177DB8[player->unk_288 - 1]] = player->num; D_ctx_80177DB8[player->unk_288 - 1] += 1; - if (D_ctx_801778A4 == D_ctx_80177DB8[player->unk_288 - 1]) { + if (gVsPointsToWin == D_ctx_80177DB8[player->unk_288 - 1]) { player->unk_288 = -1; if (player->unk_284 == 0) { func_effect_8007C688(player->pos.x, player->pos.y, player->unk_138, 3.0f, 1000); @@ -1736,17 +1736,17 @@ void func_demo_8004D828(Player* player) { func_effect_8007D0E0(player->pos.x, player->pos.y, player->unk_138, 3.0f); } - if (player->wings.rightState == 2) { + if (player->wings.rightState == WINGSTATE_INTACT) { func_play_800A69F8(1, player->hit1.x, player->hit1.y, player->hit1.z); - player->wings.rightState = 1; + player->wings.rightState = WINGSTATE_BROKEN; func_effect_8007D0E0(player->hit1.x, player->hit1.y, player->hit1.z, 2.0f); } - if (player->wings.leftState == 2) { + if (player->wings.leftState == WINGSTATE_INTACT) { func_play_800A69F8(0, player->hit2.x, player->hit2.y, player->hit2.z); - player->wings.leftState = 1; + player->wings.leftState = WINGSTATE_BROKEN; func_effect_8007D0E0(player->hit2.x, player->hit2.y, player->hit2.z, 2.0f); } - } else if (((player->timer_220 > 0) || (player->pos.y < player->unk_0A4) || (player->pos.y < D_ctx_80177CC0) || + } else if (((player->timer_220 > 0) || (player->pos.y < player->unk_0A4) || (player->pos.y < gWaterLevel) || (player->timer_1FC == 0)) && (player->timer_1F8 == 0)) { if (gCamCount != 4) { @@ -1883,7 +1883,7 @@ void func_demo_8004DEF8(Player* player) { player->camRoll += 10.0f; } - if ((gGroundType == GROUNDTYPE_WATER) && (player->pos.y <= player->unk_0A4)) { + if ((gGroundSurface == SURFACE_WATER) && (player->pos.y <= player->unk_0A4)) { func_effect_8007D9DC(player->pos.x, gGroundHeight + 2.0f, player->unk_138, 3.0f, 20.0f, 0); func_effect_8007ADF4(player->pos.x, gGroundHeight, player->unk_138, 0.1f, 2.0f); } diff --git a/src/engine/fox_display.c b/src/engine/fox_display.c index f26d9307..cd7a5406 100644 --- a/src/engine/fox_display.c +++ b/src/engine/fox_display.c @@ -430,10 +430,10 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, if (wings->rightState == WINGSTATE_BROKEN) { *gfxPtr = D_arwing_3015120; } - if ((D_display_800CA22C != 0) && ((D_ctx_80177D40[0] % 2) != 0)) { + if ((D_display_800CA22C != 0) && ((gRightWingFlashTimer[0] % 2) != 0)) { RCP_SetupDL(&gMasterDisp, 0x22); func_display_8005314C(); - if (D_ctx_80177D40[0] > 1000) { + if (gRightWingFlashTimer[0] > 1000) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 32, 32, 255, 255); } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); @@ -445,10 +445,10 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, if (wings->rightState != 2) { *gfxPtr = NULL; } - if ((D_display_800CA22C != 0) && ((D_ctx_80177D40[0] % 2) != 0)) { + if ((D_display_800CA22C != 0) && ((gRightWingFlashTimer[0] % 2) != 0)) { RCP_SetupDL(&gMasterDisp, 0x22); func_display_8005314C(); - if (D_ctx_80177D40[0] > 1000) { + if (gRightWingFlashTimer[0] > 1000) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 32, 32, 255, 255); } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); @@ -462,10 +462,10 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, if (wings->leftState == WINGSTATE_BROKEN) { *gfxPtr = D_arwing_3014BF0; } - if ((D_display_800CA22C != 0) && ((D_ctx_80177D58[0] % 2) != 0)) { + if ((D_display_800CA22C != 0) && ((gLeftWingFlashTimer[0] % 2) != 0)) { RCP_SetupDL(&gMasterDisp, 0x22); func_display_8005314C(); - if (D_ctx_80177D58[0] > 1000) { + if (gLeftWingFlashTimer[0] > 1000) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 32, 32, 255, 255); } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); @@ -477,10 +477,10 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, if (wings->leftState != 2) { *gfxPtr = NULL; } - if ((D_display_800CA22C != 0) && ((D_ctx_80177D58[0] % 2) != 0)) { + if ((D_display_800CA22C != 0) && ((gLeftWingFlashTimer[0] % 2) != 0)) { RCP_SetupDL(&gMasterDisp, 0x22); func_display_8005314C(); - if (D_ctx_80177D58[0] > 1000) { + if (gLeftWingFlashTimer[0] > 1000) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 32, 32, 255, 255); } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); @@ -714,7 +714,7 @@ void func_display_80054300(Player* player) { if (player->unk_068 > 30.0f) { gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); } - if ((gGroundType == GROUNDTYPE_WATER) && (player->unk_068 < 10.0f)) { + if ((gGroundSurface == SURFACE_WATER) && (player->unk_068 < 10.0f)) { player->shadowing = 90; } else { player->shadowing = 180; @@ -1565,8 +1565,8 @@ void Play_Draw(void) { gPlayerCamAt.y += player->pos.y; gPlayerCamAt.z += player->unk_138 + player->unk_144; - if (player->cockpitView && (player->unk_110 > 5.0f)) { - gPlayerCamAt.x += SIN_DEG(gGameFrameCount * 150.0f) * player->unk_110 * 0.2f; + if (player->cockpitView && (player->boostSpeed > 5.0f)) { + gPlayerCamAt.x += SIN_DEG(gGameFrameCount * 150.0f) * player->boostSpeed * 0.2f; } } else if (player->state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) { func_display_800578C4(player); @@ -1608,7 +1608,7 @@ void Play_Draw(void) { Ground_801B58AC(&gMasterDisp, D_ctx_80177CC8); D_ctx_80177CC8 = 0.0f; Matrix_Pop(&gGfxMatrix); - } else if (gGroundType != GROUNDTYPE_WATER) { + } else if (gGroundSurface != SURFACE_WATER) { D_bg_8015F964 = false; Background_DrawGround(); } @@ -1623,7 +1623,7 @@ void Play_Draw(void) { func_display_800564C0(opponent, 0); func_display_80057814(opponent); } - if ((gGroundType == GROUNDTYPE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) { + if ((gGroundSurface == SURFACE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) { Lights_SetOneLight(&gMasterDisp, gLight2x, -1 * gLight2y, gLight2z, gLight2R, gLight2G, gLight2B, gAmbientR, gAmbientG, gAmbientB); Matrix_Push(&gGfxMatrix); @@ -1642,7 +1642,7 @@ void Play_Draw(void) { TexturedLine_Draw(); gReflectY = 1; PlayerShot_Draw(); - if ((gGroundType == GROUNDTYPE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) { + if ((gGroundSurface == SURFACE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) { Matrix_Push(&gGfxMatrix); Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, MTXF_APPLY); gReflectY = -1; @@ -1650,7 +1650,7 @@ void Play_Draw(void) { Matrix_Pop(&gGfxMatrix); } gReflectY = -1; - if ((gGroundType == GROUNDTYPE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) { + if ((gGroundSurface == SURFACE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) { Matrix_Push(&gGfxMatrix); Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, MTXF_APPLY); for (i = 0, opponent = gPlayer; i < gCamCount; i++, opponent++) { @@ -1664,7 +1664,7 @@ void Play_Draw(void) { if (gCurrentLevel == LEVEL_AQUAS) { Effect_Draw(0); } - if ((gGroundType == GROUNDTYPE_WATER) || (gAqDrawMode != 0)) { + if ((gGroundSurface == SURFACE_WATER) || (gAqDrawMode != 0)) { D_bg_8015F964 = true; Effect_Draw(1); Background_DrawGround(); @@ -1716,8 +1716,8 @@ void Play_Draw(void) { Background_DrawLensFlare(); if ((gCamCount != 1) && ((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (player->state_1C8 == PLAYERSTATE_1C8_U_TURN))) { - func_hud_8008FA84(); - func_hud_8008CA44(); + HUD_Draw(); + HUD_DrawEdgeArrows(); } Matrix_Pop(&gGfxMatrix); func_display_80051B30(); diff --git a/src/engine/fox_edisplay.c b/src/engine/fox_edisplay.c index 2815176a..c92174f1 100644 --- a/src/engine/fox_edisplay.c +++ b/src/engine/fox_edisplay.c @@ -683,7 +683,7 @@ void func_edisplay_8005BAB4(ObjectId objId, s32 index) { case OBJ_BOSS_295: case OBJ_BOSS_296: COS_DEG(gBosses[index].obj.rot.z); - if (gGroundType == GROUNDTYPE_WATER) { + if (gGroundSurface == SURFACE_WATER) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 90); } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 150); @@ -1336,7 +1336,7 @@ void Object_DrawShadow(s32 index, Object* obj) { Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundHeight + 2.0f, obj->pos.z + D_ctx_80177D20, MTXF_APPLY); break; } - if ((D_ctx_801784AC != 4) || (obj->id == OBJ_ACTOR_EVENT) || (obj->id == OBJ_ACTOR_195) || + if ((gGroundType != 4) || (obj->id == OBJ_ACTOR_EVENT) || (obj->id == OBJ_ACTOR_195) || (obj->id == OBJ_ACTOR_TEAM_BOSS)) { Matrix_Scale(gGfxMatrix, 1.0f, 0.0f, 1.0f, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, obj->rot.y * M_DTOR, MTXF_APPLY); @@ -1724,7 +1724,7 @@ void Effect_DrawAll(s32 arg0) { void Object_Draw(s32 arg0) { gReflectY = 1; Object_DrawAll(1); - if ((gGroundType == GROUNDTYPE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) { + if ((gGroundSurface == SURFACE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) { gReflectY = -1; Lights_SetOneLight(&gMasterDisp, gLight1x, -1 * gLight1y, gLight1z, gLight1R, gLight1G, gLight1B, gAmbientR, gAmbientG, gAmbientB); @@ -1741,7 +1741,7 @@ void Effect_Draw(u8 arg0) { if (arg0 == 0) { gReflectY = 1; Effect_DrawAll(1); - } else if ((gGroundType == GROUNDTYPE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) { + } else if ((gGroundSurface == SURFACE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) { gReflectY = -1; Matrix_Push(&gGfxMatrix); Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, MTXF_APPLY); diff --git a/src/engine/fox_effect.c b/src/engine/fox_effect.c index c7ddbfeb..c5c9e163 100644 --- a/src/engine/fox_effect.c +++ b/src/engine/fox_effect.c @@ -2189,7 +2189,7 @@ void func_effect_8007DB70(Effect* effect) { func_effect_8007D0E0(effect->obj.pos.x, effect->obj.pos.y + 30.0f, effect->obj.pos.z, 7.0f); func_effect_8007BFFC(effect->obj.pos.x, effect->obj.pos.y + 30.0f, effect->obj.pos.z, 0.0f, 0.0f, 0.0f, 4.0f, 5); - if ((effect->obj.pos.y < (gGroundHeight + 10.0f)) || (gGroundType != GROUNDTYPE_WATER)) { + if ((effect->obj.pos.y < (gGroundHeight + 10.0f)) || (gGroundSurface != SURFACE_WATER)) { func_beam_800365E4(effect->obj.pos.x, 3.0f, effect->obj.pos.z, effect->obj.pos.x, effect->obj.pos.z, 0.0f, 0.0f, 90.0f, 5.0f, 0, 0); break; @@ -2245,7 +2245,7 @@ void func_effect_8007E014(Effect* effect) { f32 z; f32 y; - if (D_ctx_801784AC == 4) { + if (gGroundType == 4) { Ground_801B6E20(effect->obj.pos.x, effect->obj.pos.z + D_ctx_80177D20, &x, &y, &z); effect->obj.pos.y = y + 3.0f; effect->obj.rot.x = RAD_TO_DEG(x); @@ -2622,7 +2622,7 @@ void func_effect_8007F2FC(Effect* effect) { effect->vel.y -= 0.3f; } - if (effect->obj.pos.y < D_ctx_80177CC0) { + if (effect->obj.pos.y < gWaterLevel) { effect->vel.y += 0.2f; effect->obj.pos.y -= effect->vel.y * 0.5f; effect->obj.pos.x -= effect->vel.x * 0.5f; @@ -2722,7 +2722,7 @@ void func_effect_8007F6B0(Effect* effect) { cos = __cosf(temp) * effect->scale2 * 8.0f; yPos = gGroundHeight + 40.0f; - if (D_ctx_801784AC == 4) { + if (gGroundType == 4) { Ground_801B6E20(effect->obj.pos.x + sin, effect->obj.pos.z + cos + D_ctx_80177D20, &x, &y, &z); yPos = y + 30.0f; } @@ -2769,7 +2769,7 @@ void func_effect_8007F958(Effect* effect) { cos = __cosf(temp) * effect->scale2 * 16.0f; yPos = gGroundHeight + 10.0f; - if (D_ctx_801784AC == 4) { + if (gGroundType == 4) { Ground_801B6E20(effect->obj.pos.x + sin, effect->obj.pos.z + cos + D_ctx_80177D20, &x, &y, &z); yPos = y + 10.0f; } @@ -2895,13 +2895,13 @@ void func_effect_8007FE88(Effect* effect) { } } - if (D_ctx_801784AC == 4) { + if (gGroundType == 4) { if (Ground_801B6AEC(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z + D_ctx_80177D20) != 0) { Object_Kill(&effect->obj, effect->sfxSource); } } else if (effect->obj.pos.y < gGroundHeight) { Object_Kill(&effect->obj, effect->sfxSource); - if (gGroundType != GROUNDTYPE_WATER) { + if (gGroundSurface != SURFACE_WATER) { effect->obj.pos.y = gGroundHeight; func_effect_8007D074(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 2.0f); } @@ -3025,14 +3025,14 @@ void func_effect_8008040C(Effect* effect) { } } - if (D_ctx_801784AC == 4) { + if (gGroundType == 4) { if (Ground_801B6AEC(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z + D_ctx_80177D20) != 0) { Object_Kill(&effect->obj, effect->sfxSource); } } else if (effect->obj.pos.y < gGroundHeight) { Object_Kill(&effect->obj, effect->sfxSource); - if (gGroundType != GROUNDTYPE_WATER) { + if (gGroundSurface != SURFACE_WATER) { effect->obj.pos.y = gGroundHeight; func_effect_8007D074(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 2.0f); } diff --git a/src/engine/fox_enmy.c b/src/engine/fox_enmy.c index 26bcc7eb..d41c6725 100644 --- a/src/engine/fox_enmy.c +++ b/src/engine/fox_enmy.c @@ -68,7 +68,7 @@ static Vec3f D_enmy_800CFF0C[] = { { 0.0f, 0.0f, 0.0f }, { 0.0f, -90.0f, 0.0f }, { 0.0f, 90.0f, 0.0f }, { -90.0f, 0.0f, 0.0f }, { 0.0f, 180.0f, 0.0f }, { 90.0f, 0.0f, 0.0f }, }; -u32 D_enmy_800CFF54[] = { +u32 gWarpRingSfx[] = { 0x19404038, 0x19404139, 0x1940423A, 0x1940433B, 0x1940443C, 0x1940453D, 0x1940463E, 0x1940463E, 0x1940463E, }; @@ -392,7 +392,7 @@ void ActorEvent_Load(Actor* actor, ObjectInit* objInit, s32 index) { actor->fwork[25] = 20000.0f; actor->iwork[1] = gPrevEventActorIndex; actor->iwork[10] = gActors[gPrevEventActorIndex].aiType; - actor->fwork[22] = D_play_80161A54; + actor->fwork[22] = gArwingSpeed; Matrix_RotateZ(gCalcMatrix, -D_ctx_80177E88.z * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -D_ctx_80177E88.x * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, -D_ctx_80177E88.y * M_DTOR, MTXF_APPLY); @@ -509,15 +509,15 @@ void func_enmy_80062568(void) { s32 temp = gCurrentLevel; // seems fake if (1) {} gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[temp]); - var_s0 = D_ctx_80177CA0 - 40; + var_s0 = gSavedObjectLoadIndex - 40; objInit = &gLevelObjects[var_s0]; - for (; var_s0 < D_ctx_80177CA0; var_s0++, objInit++) { + for (; var_s0 < gSavedObjectLoadIndex; var_s0++, objInit++) { Object_Load(objInit, 4000.0f, -4000.0f, 4000.0f, -4000.0f); } } -void Object_LoadFromInit(void) { +void Object_LoadLevelObjects(void) { ObjectInit* objInit; f32 xMax; f32 xMin; @@ -568,7 +568,7 @@ void Object_LoadFromInit(void) { } gLastPathChange = 0; - for (i = 0, objInit = &gLevelObjects[D_ctx_80177DC8]; i < 10000; i++, D_ctx_80177DC8++, objInit++) { + for (i = 0, objInit = &gLevelObjects[gObjectLoadIndex]; i < 10000; i++, gObjectLoadIndex++, objInit++) { if ((objInit->id > OBJ_INVALID) && D_ctx_80177D20 <= objInit->zPos1 && objInit->zPos1 <= D_ctx_80177D20 + 200.0f) { if ((gCurrentLevel == LEVEL_VENOM_1) && (objInit->id >= ACTOR_EVENT_ID)) { @@ -1077,7 +1077,7 @@ void Object_Init(s32 index, ObjectId objId) { func_enmy_80063CAC(&gScenery[index]); break; case OBJ_ITEM_CHECKPOINT: - if (D_ctx_80177CA0 != 0) { + if (gSavedObjectLoadIndex != 0) { gItems[index].obj.status = OBJ_FREE; } break; @@ -1347,7 +1347,7 @@ void func_enmy_800652CC(Scenery* scenery) { f32 sp28; f32 sp24; - if ((D_ctx_801784AC == 4) && (scenery->state == 0)) { + if ((gGroundType == 4) && (scenery->state == 0)) { Ground_801B6E20(scenery->obj.pos.x, scenery->obj.pos.z + D_ctx_80177D20, &sp2C, &sp24, &sp28); scenery->obj.pos.y = sp24 + 3.0f; scenery->obj.rot.x = RAD_TO_DEG(sp2C); @@ -1576,8 +1576,7 @@ void func_enmy_800656D4(Actor* actor) { } Math_SmoothStepToAngle(&actor->obj.rot.z, var_fv0, 0.1f, 3.0f, 0.01f); } - if ((D_ctx_801784AC == 4) && - Ground_801B6AEC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + D_ctx_80177D20)) { + if ((gGroundType == 4) && Ground_801B6AEC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + D_ctx_80177D20)) { func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 5.0f); Object_Kill(&actor->obj, actor->sfxSource); } @@ -1904,7 +1903,7 @@ void func_enmy_80066EF0(Item* item) { if (gPlayer[0].form != FORM_ARWING) { var_fa1 = 600.0f; } - if (gPlayer[0].unk_0AC + var_fa1 < item->obj.pos.x) { + if (item->obj.pos.x > gPlayer[0].unk_0AC + var_fa1) { Math_SmoothStepToF(&item->obj.pos.x, gPlayer[0].unk_0AC + var_fa1, 0.1f, 10.0f, 0.01f); } if (item->obj.pos.x < gPlayer[0].unk_0AC - var_fa1) { @@ -2059,11 +2058,11 @@ void ActorSupplies_Draw(Actor* actor) { void func_enmy_80067A40(void) { AUDIO_PLAY_SFX(0x09008023, gPlayer[0].sfxSource, 0); if (gPlayer[0].wings.rightState <= WINGSTATE_BROKEN) { - D_ctx_80177D40[0] = 1050; + gRightWingFlashTimer[0] = 1050; gPlayer[0].wings.rightState = WINGSTATE_INTACT; } if (gPlayer[0].wings.leftState <= WINGSTATE_BROKEN) { - D_ctx_80177D58[0] = 1050; + gLeftWingFlashTimer[0] = 1050; gPlayer[0].wings.leftState = WINGSTATE_INTACT; } if (gExpertMode) { @@ -2122,8 +2121,8 @@ void ItemPickup_Update(Item* this) { } else { gRightWingHealth[this->playerNum] = gLeftWingHealth[this->playerNum] = 60; } - D_ctx_80177D40[this->playerNum] = 1030; - D_ctx_80177D58[this->playerNum] = 1030; + gRightWingFlashTimer[this->playerNum] = 1030; + gLeftWingFlashTimer[this->playerNum] = 1030; } break; } @@ -2277,9 +2276,9 @@ void ItemMeteoWarp_Update(ItemMeteoWarp* this) { this->state = 1; this->unk_44 = 255; gPlayer[this->playerNum].timer_27C = 100; - AUDIO_PLAY_SFX(D_enmy_800CFF54[gRingPassCount], gPlayer[0].sfxSource, 0); + AUDIO_PLAY_SFX(gWarpRingSfx[gRingPassCount], gPlayer[0].sfxSource, 0); if (gRingPassCount == 0) { - gPlayer[0].unk_110 = 0.0f; + gPlayer[0].boostSpeed = 0.0f; } gRingPassCount++; if (gRingPassCount >= 7) { @@ -2328,10 +2327,10 @@ void ItemCheckpoint_Update(ItemCheckpoint* this) { gPlayer[this->playerNum].heal = 128; this->state++; this->timer_48 = 15; - gSavedGroundType = gGroundType; + gSavedGroundSurface = gGroundSurface; D_ctx_80177CB0 = -this->obj.pos.z; D_ctx_80177CB0 -= 250.0f; - D_ctx_80177CA0 = D_ctx_80177DC8; + gSavedObjectLoadIndex = gObjectLoadIndex; gSavedZoSearchlightStatus = gMissedZoSearchlight; gSavedHitCount = gHitCount; for (i = TEAM_ID_FALCO; i <= TEAM_ID_PEPPY; i++) { @@ -2879,7 +2878,7 @@ void Object_Update(void) { } if (gLevelMode != LEVELMODE_ALL_RANGE) { if ((gLoadLevelObjects != 0) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) { - Object_LoadFromInit(); + Object_LoadLevelObjects(); } for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) { if (scenery->obj.status != OBJ_FREE) { diff --git a/src/engine/fox_enmy2.c b/src/engine/fox_enmy2.c index 9980eaa5..64ff8b25 100644 --- a/src/engine/fox_enmy2.c +++ b/src/engine/fox_enmy2.c @@ -27,7 +27,7 @@ s32 gCallTimer; void ActorEvent_SetMessage(u16* msg, s32 character) { PRINTF("Enm->obj.pos.y + tmp_xyz.y=<%10.3f>\n"); - if ((gRadioState == 0) || (D_ctx_80177D68 != character)) { + if ((gRadioState == 0) || (gRadioMsgRadioId != character)) { Radio_PlayMessage(msg, character); } } @@ -1279,11 +1279,11 @@ void ActorEvent_ProcessScript(ActorEvent* this) { ActorEvent_ProcessScript(this); break; - case EV_OPC(EVOP_SET_GROUND): - if ((gGroundType == GROUNDTYPE_WATER) && (actorScript[this->aiIndex + 1] != 2)) { + case EV_OPC(EVOP_SET_SURFACE): + if ((gGroundSurface == SURFACE_WATER) && (actorScript[this->aiIndex + 1] != 2)) { Audio_KillSfxBySourceAndId(gPlayer[0].sfxSource, 0x1100000B); } - gGroundType = actorScript[this->aiIndex + 1]; + gGroundSurface = actorScript[this->aiIndex + 1]; this->aiIndex += 2; ActorEvent_ProcessScript(this); this->obj.status = OBJ_FREE; @@ -2984,615 +2984,641 @@ void ActorEvent_Update(ActorEvent* this) { func_effect_8007C120(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, this->vel.z, 0.3f, 10); } - } else { - if (((this->unk_0B4 == EINFO_17) || (this->unk_0B4 == EINFO_30) || (this->unk_0B4 == EINFO_31)) && - (this->health <= 0)) { - ActorEvent_80071DC0(this); - return; + return; + } + if (((this->unk_0B4 == EINFO_17) || (this->unk_0B4 == EINFO_30) || (this->unk_0B4 == EINFO_31)) && + (this->health <= 0)) { + ActorEvent_80071DC0(this); + return; + } + if (this->unk_0B4 == EINFO_300) { + gPlayer[0].unk_1A4 = this->index; + this->timer_0C2 = 100; + } else if (this->unk_0B4 >= EINFO_200) { + this->unk_04E++; + + if (this->unk_04E >= 100) { + this->unk_04E = 0; } - if (this->unk_0B4 == EINFO_300) { - gPlayer[0].unk_1A4 = this->index; - this->timer_0C2 = 100; - } else if (this->unk_0B4 >= EINFO_200) { - this->unk_04E++; - if (this->unk_04E >= 100) { - this->unk_04E = 0; - } + 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; - 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; + this->timer_0C6 = 20; + this->health -= this->damage; - if (this->unk_0D0 != 0) { - this->unk_0D0 = 0; - this->timer_0C6 = 20; - this->health -= this->damage; + AUDIO_PLAY_SFX(0x29034041, this->sfxSource, 4); - AUDIO_PLAY_SFX(0x29034041, this->sfxSource, 4); - - if (this->health <= 0) { - this->timer_0C6 = 200; - this->obj.status = OBJ_DYING; - func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 8.0f); - this->obj.status = OBJ_DYING; - this->timer_0BC = 20; - this->obj.id = OBJ_ACTOR_194; - } + if (this->health <= 0) { + this->timer_0C6 = 200; + this->obj.status = OBJ_DYING; + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 8.0f); + this->obj.status = OBJ_DYING; + this->timer_0BC = 20; + this->obj.id = OBJ_ACTOR_194; } } + } - if ((this->unk_0B4 == EINFO_27) && (this->timer_0C2 != 0)) { - this->state = EVSTATE_READY; - } + if ((this->unk_0B4 == EINFO_27) && (this->timer_0C2 != 0)) { + this->state = EVSTATE_READY; + } - switch (this->state) { - case EVSTATE_READY: + switch (this->state) { + case EVSTATE_READY: + ActorEvent_ProcessScript(this); + break; + + case EVSTATE_WAIT: + if (this->timer_0BC == 0) { ActorEvent_ProcessScript(this); - break; + } + break; - case EVSTATE_WAIT: - if (this->timer_0BC == 0) { - ActorEvent_ProcessScript(this); + case EVSTATE_6: + case EVSTATE_7: + case EVSTATE_14: + case EVSTATE_15: + spF0 = this->obj.pos.x; + spEC = this->obj.pos.y; + spE8 = this->obj.pos.z; + + if ((this->unk_0B4 == EINFO_33) || (this->unk_0B4 == EINFO_68)) { + Matrix_RotateZ(gCalcMatrix, -(this->vwork[29].z + this->unk_0F4.z) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -this->vwork[29].x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -this->vwork[29].y * M_DTOR, MTXF_APPLY); + + if ((this->state == EVSTATE_14) || (this->state == EVSTATE_15)) { + spB8.x = gPlayer[0].cam.eye.x - spF0; + spB8.y = gPlayer[0].cam.eye.y - (spEC + 25.0f); + spB8.z = (gPlayer[0].cam.eye.z * 15.0f) - spE8; + } else { + spB8.x = gPlayer[0].pos.x - spF0; + spB8.y = gPlayer[0].pos.y - (spEC + 25.0f); + spB8.z = gPlayer[0].pos.z + (gPlayer[0].vel.z * 15.0f) - spE8; } - break; - case EVSTATE_6: - case EVSTATE_7: - case EVSTATE_14: - case EVSTATE_15: - spF0 = this->obj.pos.x; - spEC = this->obj.pos.y; - spE8 = this->obj.pos.z; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &spB8, &spAC); - if ((this->unk_0B4 == EINFO_33) || (this->unk_0B4 == EINFO_68)) { - Matrix_RotateZ(gCalcMatrix, -(this->vwork[29].z + this->unk_0F4.z) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -this->vwork[29].x * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gCalcMatrix, -this->vwork[29].y * M_DTOR, MTXF_APPLY); + spE0 = Math_RadToDeg(Math_Atan2F(spAC.x, spAC.z)); + spE4 = Math_RadToDeg(-Math_Atan2F(spAC.y, sqrtf(SQ(spAC.x) + SQ(spAC.z)))); + spFC = 0; - if ((this->state == EVSTATE_14) || (this->state == EVSTATE_15)) { - spB8.x = gPlayer[0].cam.eye.x - spF0; - spB8.y = gPlayer[0].cam.eye.y - (spEC + 25.0f); - spB8.z = (gPlayer[0].cam.eye.z * 15.0f) - spE8; - } else { - spB8.x = gPlayer[0].pos.x - spF0; - spB8.y = gPlayer[0].pos.y - (spEC + 25.0f); - spB8.z = gPlayer[0].pos.z + (gPlayer[0].vel.z * 15.0f) - spE8; - } + if ((spE4 < 305.0f) && (spE4 >= 180.0f)) { + spE4 = 305.0f; + spFC++; + } + + if ((spE4 > 30.0f) && (spE4 <= 180.0f)) { + spE4 = 30.0f; + spFC++; + } + + this->obj.rot.x = 0.0f; + + Math_SmoothStepToAngle(&this->obj.rot.y, spE0, 0.2f, this->fwork[24], 0.001f); + Math_SmoothStepToAngle(&this->fwork[15], spE4, 0.2f, this->fwork[24], 0.001f); + + if (((this->timer_0BC % 32) == 0) && (spFC == 0)) { + Matrix_RotateY(gCalcMatrix, this->vwork[29].y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->vwork[29].x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, (this->vwork[29].z + this->unk_0F4.z) * M_DTOR, MTXF_APPLY); + + spB8.x = 0.0f; + spB8.y = 25.0f; + spB8.z = 0.0f; + + Matrix_MultVec3fNoTranslate(gCalcMatrix, &spB8, &spA0); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, this->fwork[15] * M_DTOR, MTXF_APPLY); + + spB8.x = 0.0f; + spB8.y = 0.0f; + spB8.z = gEnemyShotSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &spB8, &spAC); - spE0 = Math_RadToDeg(Math_Atan2F(spAC.x, spAC.z)); - spE4 = Math_RadToDeg(-Math_Atan2F(spAC.y, sqrtf(SQ(spAC.x) + SQ(spAC.z)))); - spFC = 0; - - if ((spE4 < 305.0f) && (spE4 >= 180.0f)) { - spE4 = 305.0f; - spFC++; - } - - if ((spE4 > 30.0f) && (spE4 <= 180.0f)) { - spE4 = 30.0f; - spFC++; - } - - this->obj.rot.x = 0.0f; - - Math_SmoothStepToAngle(&this->obj.rot.y, spE0, 0.2f, this->fwork[24], 0.001f); - Math_SmoothStepToAngle(&this->fwork[15], spE4, 0.2f, this->fwork[24], 0.001f); - - if (((this->timer_0BC % 32) == 0) && (spFC == 0)) { - Matrix_RotateY(gCalcMatrix, this->vwork[29].y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, this->vwork[29].x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, (this->vwork[29].z + this->unk_0F4.z) * M_DTOR, MTXF_APPLY); - - spB8.x = 0.0f; - spB8.y = 25.0f; - spB8.z = 0.0f; - - Matrix_MultVec3fNoTranslate(gCalcMatrix, &spB8, &spA0); - Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gCalcMatrix, this->fwork[15] * M_DTOR, MTXF_APPLY); - - spB8.x = 0.0f; - spB8.y = 0.0f; - spB8.z = gEnemyShotSpeed; - - Matrix_MultVec3fNoTranslate(gCalcMatrix, &spB8, &spAC); - - if (this->unk_0B4 == EINFO_68) { - var_fv0 = 80.0f; - } else { - var_fv0 = 0.0f; - } - - func_effect_8007F04C(OBJ_EFFECT_353, this->obj.pos.x + spAC.x + spA0.x, - this->obj.pos.y + spAC.y + spA0.y + var_fv0, - this->obj.pos.z + spAC.z + spA0.z, this->fwork[15], this->obj.rot.y, - this->obj.rot.z, this->vwork[29].x, this->vwork[29].y, - this->vwork[29].z + this->unk_0F4.z, spAC.x, spAC.y, spAC.z, 1.0f); - this->fwork[16] = -15.0f; - } - } else { - if ((this->state == EVSTATE_14) || (this->state == EVSTATE_15)) { - spCC = gPlayer[0].cam.eye.x; - spC8 = gPlayer[0].cam.eye.y; - spC4 = gPlayer[0].cam.eye.z; + if (this->unk_0B4 == EINFO_68) { + var_fv0 = 80.0f; } else { - spCC = gPlayer[0].pos.x; - spC8 = gPlayer[0].pos.y; - spC4 = gPlayer[0].pos.z; + var_fv0 = 0.0f; } - Math_SmoothStepToAngle(&this->vwork[29].z, 0.0f, 0.1f, 5.0f, 0.0001f); - Math_SmoothStepToAngle(&this->unk_0F4.z, 0.0f, 0.1f, 5.0f, 0.0001f); - - spE0 = Math_RadToDeg(Math_Atan2F(spCC - spF0, spC4 - spE8)); - - if ((this->state == EVSTATE_7) || (this->state == EVSTATE_15)) { - spE0 += 180.0f; - if (spE0 > 360.0f) { - spE0 -= 360.0f; - } - } - - spE4 = Math_RadToDeg(-Math_Atan2F(spC8 - spEC, sqrtf(SQ(spCC - spF0) + SQ(spC4 - spE8)))); - spEC = Math_SmoothStepToAngle(&this->unk_0F4.y, spE0, 0.2f, this->fwork[24], 0.0001f); - - Math_SmoothStepToAngle(&this->unk_0F4.x, spE4, 0.2f, this->fwork[24], 0.0001f); - - if (this->iwork[6] != 0) { - var_fv0 = 330.0f; - if (spEC < 0.0f) { - var_fv0 = 30.0f; - } - Math_SmoothStepToAngle(&this->fwork[23], var_fv0, 0.1f, 5.0f, 0.01f); - } + func_effect_8007F04C(OBJ_EFFECT_353, this->obj.pos.x + spAC.x + spA0.x, + this->obj.pos.y + spAC.y + spA0.y + var_fv0, this->obj.pos.z + spAC.z + spA0.z, + this->fwork[15], this->obj.rot.y, this->obj.rot.z, this->vwork[29].x, + this->vwork[29].y, this->vwork[29].z + this->unk_0F4.z, spAC.x, spAC.y, spAC.z, + 1.0f); + this->fwork[16] = -15.0f; + } + } else { + if ((this->state == EVSTATE_14) || (this->state == EVSTATE_15)) { + spCC = gPlayer[0].cam.eye.x; + spC8 = gPlayer[0].cam.eye.y; + spC4 = gPlayer[0].cam.eye.z; + } else { + spCC = gPlayer[0].pos.x; + spC8 = gPlayer[0].pos.y; + spC4 = gPlayer[0].pos.z; } - if (this->timer_0BC == 0) { - ActorEvent_ProcessScript(this); - } - break; + Math_SmoothStepToAngle(&this->vwork[29].z, 0.0f, 0.1f, 5.0f, 0.0001f); + Math_SmoothStepToAngle(&this->unk_0F4.z, 0.0f, 0.1f, 5.0f, 0.0001f); - case EVSTATE_CHASE_TARGET: - spDC = SIN_DEG((this->index * 45) + gGameFrameCount) * this->fwork[17]; - spD8 = COS_DEG((this->index * 45) + (gGameFrameCount * 2)) * this->fwork[17]; - index = this->iwork[1]; - index = gActors[index].iwork[12]; - D_enmy_Timer_80161670[index] = 5; - /* fallthrough */ - case EVSTATE_8: - case EVSTATE_9: - spF0 = this->obj.pos.x; - spEC = this->obj.pos.y; - spE8 = this->obj.pos.z; + spE0 = Math_RadToDeg(Math_Atan2F(spCC - spF0, spC4 - spE8)); - spE0 = Math_RadToDeg(Math_Atan2F(gActors[this->iwork[1]].obj.pos.x + spDC - spF0, - gActors[this->iwork[1]].obj.pos.z + spD4 - spE8)); - if (this->state == EVSTATE_7) { + if ((this->state == EVSTATE_7) || (this->state == EVSTATE_15)) { spE0 += 180.0f; if (spE0 > 360.0f) { spE0 -= 360.0f; } } - spE4 = Math_RadToDeg(-Math_Atan2F(gActors[this->iwork[1]].obj.pos.y + spD8 - spEC, - sqrtf(SQ(gActors[this->iwork[1]].obj.pos.x + spDC - spF0) + - SQ(gActors[this->iwork[1]].obj.pos.z + spD4 - spE8)))); + spE4 = Math_RadToDeg(-Math_Atan2F(spC8 - spEC, sqrtf(SQ(spCC - spF0) + SQ(spC4 - spE8)))); spEC = Math_SmoothStepToAngle(&this->unk_0F4.y, spE0, 0.2f, this->fwork[24], 0.0001f); Math_SmoothStepToAngle(&this->unk_0F4.x, spE4, 0.2f, this->fwork[24], 0.0001f); if (this->iwork[6] != 0) { - var_fv0 = 310.0f; + var_fv0 = 330.0f; if (spEC < 0.0f) { - var_fv0 = 50.0f; + var_fv0 = 30.0f; } - Math_SmoothStepToAngle(&this->fwork[23], var_fv0, 0.1f, 5.0f, 0.01f); } + } - if (this->timer_0BC == 0) { - ActorEvent_ProcessScript(this); + if (this->timer_0BC == 0) { + ActorEvent_ProcessScript(this); + } + break; + + case EVSTATE_CHASE_TARGET: + spDC = SIN_DEG((this->index * 45) + gGameFrameCount) * this->fwork[17]; + spD8 = COS_DEG((this->index * 45) + (gGameFrameCount * 2)) * this->fwork[17]; + index = this->iwork[1]; + index = gActors[index].iwork[12]; + D_enmy_Timer_80161670[index] = 5; + /* fallthrough */ + case EVSTATE_8: + case EVSTATE_9: + spF0 = this->obj.pos.x; + spEC = this->obj.pos.y; + spE8 = this->obj.pos.z; + + spE0 = Math_RadToDeg(Math_Atan2F(gActors[this->iwork[1]].obj.pos.x + spDC - spF0, + gActors[this->iwork[1]].obj.pos.z + spD4 - spE8)); + if (this->state == EVSTATE_7) { + spE0 += 180.0f; + if (spE0 > 360.0f) { + spE0 -= 360.0f; } - break; + } - case EVSTATE_F4_PLUS_X: - this->unk_0F4.x += this->fwork[3]; - this->fwork[2] -= this->fwork[3]; - if (this->fwork[2] <= 0.0f) { - ActorEvent_ProcessScript(this); - } - break; + spE4 = Math_RadToDeg(-Math_Atan2F(gActors[this->iwork[1]].obj.pos.y + spD8 - spEC, + sqrtf(SQ(gActors[this->iwork[1]].obj.pos.x + spDC - spF0) + + SQ(gActors[this->iwork[1]].obj.pos.z + spD4 - spE8)))); + spEC = Math_SmoothStepToAngle(&this->unk_0F4.y, spE0, 0.2f, this->fwork[24], 0.0001f); - case EVSTATE_F4_MINUS_X: - this->unk_0F4.x -= this->fwork[3]; - this->fwork[2] -= this->fwork[3]; - if (this->fwork[2] <= 0.0f) { - ActorEvent_ProcessScript(this); - } - break; + Math_SmoothStepToAngle(&this->unk_0F4.x, spE4, 0.2f, this->fwork[24], 0.0001f); - case EVSTATE_F4_PLUS_Y: - this->unk_0F4.y += this->fwork[3]; - this->fwork[2] -= this->fwork[3]; - if (this->fwork[2] <= 0.0f) { - ActorEvent_ProcessScript(this); - } - break; - - case EVSTATE_F4_MINUS_Y: - this->unk_0F4.y -= this->fwork[3]; - this->fwork[2] -= this->fwork[3]; - if (this->fwork[2] <= 0.0f) { - ActorEvent_ProcessScript(this); - } - break; - - case EVSTATE_ME_AS_OPEN: - var_s0 = 0; - if (Math_SmoothStepToAngle(&this->obj.rot.x, 0.0f, 0.3f, 10.0f, 1.0f) == 0.0f) { - var_s0++; + if (this->iwork[6] != 0) { + var_fv0 = 310.0f; + if (spEC < 0.0f) { + var_fv0 = 50.0f; } - if (Math_SmoothStepToAngle(&this->obj.rot.y, 0.0f, 0.3f, 10.0f, 1.0f) == 0.0f) { - var_s0++; - } + Math_SmoothStepToAngle(&this->fwork[23], var_fv0, 0.1f, 5.0f, 0.01f); + } - if (Math_SmoothStepToF(&this->fwork[15], 40.0f, 0.3f, 10.0f, 1.0f) == 0.0f) { - var_s0++; - } + if (this->timer_0BC == 0) { + ActorEvent_ProcessScript(this); + } + break; - if (var_s0 == 3) { - this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_ME_602F638); - ActorEvent_ProcessScript(this); - } - break; + case EVSTATE_F4_PLUS_X: + this->unk_0F4.x += this->fwork[3]; + this->fwork[2] -= this->fwork[3]; + if (this->fwork[2] <= 0.0f) { + ActorEvent_ProcessScript(this); + } + break; - case EVSTATE_ME_AS_CLOSE: - if (Math_SmoothStepToF(&this->fwork[15], 0.0f, 0.3f, 10.0f, 1.0f) == 0.0f) { - ActorEvent_ProcessScript(this); - } - break; + case EVSTATE_F4_MINUS_X: + this->unk_0F4.x -= this->fwork[3]; + this->fwork[2] -= this->fwork[3]; + if (this->fwork[2] <= 0.0f) { + ActorEvent_ProcessScript(this); + } + break; - case EVSTATE_TEAM_RETREAT: - Math_SmoothStepToAngle(&this->unk_0F4.x, 270.0f, 0.1f, 2.0f, 0.0f); - gTeamShields[this->iwork[12]] = -1; - gTeamDamage[this->iwork[12]] = 0; - break; + case EVSTATE_F4_PLUS_Y: + this->unk_0F4.y += this->fwork[3]; + this->fwork[2] -= this->fwork[3]; + if (this->fwork[2] <= 0.0f) { + ActorEvent_ProcessScript(this); + } + break; - case EVSTATE_SCRIPT_END: - break; - } + case EVSTATE_F4_MINUS_Y: + this->unk_0F4.y -= this->fwork[3]; + this->fwork[2] -= this->fwork[3]; + if (this->fwork[2] <= 0.0f) { + ActorEvent_ProcessScript(this); + } + break; - if (this->iwork[13] != 0) { - if (gActors[this->iwork[9]].obj.status != OBJ_ACTIVE) { + case EVSTATE_ME_AS_OPEN: + var_s0 = 0; + if (Math_SmoothStepToAngle(&this->obj.rot.x, 0.0f, 0.3f, 10.0f, 1.0f) == 0.0f) { + var_s0++; + } + + if (Math_SmoothStepToAngle(&this->obj.rot.y, 0.0f, 0.3f, 10.0f, 1.0f) == 0.0f) { + var_s0++; + } + + if (Math_SmoothStepToF(&this->fwork[15], 40.0f, 0.3f, 10.0f, 1.0f) == 0.0f) { + var_s0++; + } + + if (var_s0 == 3) { + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_ME_602F638); + ActorEvent_ProcessScript(this); + } + break; + + case EVSTATE_ME_AS_CLOSE: + if (Math_SmoothStepToF(&this->fwork[15], 0.0f, 0.3f, 10.0f, 1.0f) == 0.0f) { + ActorEvent_ProcessScript(this); + } + break; + + case EVSTATE_TEAM_RETREAT: + Math_SmoothStepToAngle(&this->unk_0F4.x, 270.0f, 0.1f, 2.0f, 0.0f); + gTeamShields[this->iwork[12]] = -1; + gTeamDamage[this->iwork[12]] = 0; + break; + + case EVSTATE_SCRIPT_END: + break; + } + + if (this->iwork[13] != 0) { + if (gActors[this->iwork[9]].obj.status != OBJ_ACTIVE) { + this->iwork[13] = 0; + } else { + Matrix_RotateY(gCalcMatrix, gActors[this->iwork[9]].obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, gActors[this->iwork[9]].obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, gActors[this->iwork[9]].obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_MultVec3fNoTranslate(gCalcMatrix, &this->vwork[28], &spAC); + this->obj.pos.x = gActors[this->iwork[9]].obj.pos.x + spAC.x; + this->obj.pos.y = gActors[this->iwork[9]].obj.pos.y + spAC.y; + this->obj.pos.z = gActors[this->iwork[9]].obj.pos.z + spAC.z; + this->vwork[29].x = gActors[this->iwork[9]].obj.rot.x; + this->vwork[29].y = gActors[this->iwork[9]].obj.rot.y; + this->vwork[29].z = gActors[this->iwork[9]].obj.rot.z; + if (this->timer_0C0 == 0) { this->iwork[13] = 0; - } else { - Matrix_RotateY(gCalcMatrix, gActors[this->iwork[9]].obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, gActors[this->iwork[9]].obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, gActors[this->iwork[9]].obj.rot.z * M_DTOR, MTXF_APPLY); - Matrix_MultVec3fNoTranslate(gCalcMatrix, &this->vwork[28], &spAC); - this->obj.pos.x = gActors[this->iwork[9]].obj.pos.x + spAC.x; - this->obj.pos.y = gActors[this->iwork[9]].obj.pos.y + spAC.y; - this->obj.pos.z = gActors[this->iwork[9]].obj.pos.z + spAC.z; - this->vwork[29].x = gActors[this->iwork[9]].obj.rot.x; - this->vwork[29].y = gActors[this->iwork[9]].obj.rot.y; - this->vwork[29].z = gActors[this->iwork[9]].obj.rot.z; - if (this->timer_0C0 == 0) { - this->iwork[13] = 0; - } } } + } - Math_SmoothStepToF(&this->fwork[0], this->fwork[1], 0.1f, 5.0f, 0.0001f); + Math_SmoothStepToF(&this->fwork[0], this->fwork[1], 0.1f, 5.0f, 0.0001f); - if (this->unk_0F4.x >= 360.0f) { - this->unk_0F4.x -= 360.0f; + if (this->unk_0F4.x >= 360.0f) { + this->unk_0F4.x -= 360.0f; + } + if (this->unk_0F4.x < 0.0f) { + this->unk_0F4.x += 360.0f; + } + if (this->unk_0F4.y >= 360.0f) { + this->unk_0F4.y -= 360.0f; + } + if (this->unk_0F4.y < 0.0f) { + this->unk_0F4.y += 360.0f; + } + + if (this->iwork[6] != 0) { + if ((gLevelMode == LEVELMODE_UNK_2) && (this->unk_0B4 == EINFO_200)) { + Math_SmoothStepToAngle(&this->obj.rot.x, this->unk_0F4.x, 0.1f, 10.0f, 0.00001f); + Math_SmoothStepToAngle(&this->obj.rot.y, this->unk_0F4.y, 0.1f, 10.0f, 0.00001f); + } else { + Math_SmoothStepToAngle(&this->obj.rot.x, this->unk_0F4.x, 0.2f, 100.0f, 0.00001f); + Math_SmoothStepToAngle(&this->obj.rot.y, this->unk_0F4.y, 0.2f, 100.0f, 0.00001f); } - if (this->unk_0F4.x < 0.0f) { - this->unk_0F4.x += 360.0f; + } + + if (this->fwork[4] > 0.0f) { + this->fwork[4] -= this->fwork[5]; + this->obj.rot.x += this->fwork[5] * this->fwork[6]; + if (this->obj.rot.x >= 360.0f) { + this->obj.rot.x -= 360.0f; } - if (this->unk_0F4.y >= 360.0f) { - this->unk_0F4.y -= 360.0f; + if (this->obj.rot.x < 0.0f) { + this->obj.rot.x += 360.0f; } - if (this->unk_0F4.y < 0.0f) { - this->unk_0F4.y += 360.0f; + } + + if (this->fwork[7] > 0.0f) { + this->fwork[7] -= this->fwork[8]; + this->obj.rot.y += this->fwork[8] * this->fwork[9]; + if (this->obj.rot.y >= 360.0f) { + this->obj.rot.y = this->obj.rot.y - 360.0f; } - - if (this->iwork[6] != 0) { - if ((gLevelMode == LEVELMODE_UNK_2) && (this->unk_0B4 == EINFO_200)) { - Math_SmoothStepToAngle(&this->obj.rot.x, this->unk_0F4.x, 0.1f, 10.0f, 0.00001f); - Math_SmoothStepToAngle(&this->obj.rot.y, this->unk_0F4.y, 0.1f, 10.0f, 0.00001f); - } else { - Math_SmoothStepToAngle(&this->obj.rot.x, this->unk_0F4.x, 0.2f, 100.0f, 0.00001f); - Math_SmoothStepToAngle(&this->obj.rot.y, this->unk_0F4.y, 0.2f, 100.0f, 0.00001f); - } + if (this->obj.rot.y < 0.0f) { + this->obj.rot.y += 360.0f; } + } - if (this->fwork[4] > 0.0f) { - this->fwork[4] -= this->fwork[5]; - this->obj.rot.x += this->fwork[5] * this->fwork[6]; - if (this->obj.rot.x >= 360.0f) { - this->obj.rot.x -= 360.0f; - } - if (this->obj.rot.x < 0.0f) { - this->obj.rot.x += 360.0f; - } + if (this->fwork[10] > 0.0f) { + if ((this->unk_0B4 == EINFO_13) || (this->unk_0B4 == EINFO_14) || (this->unk_0B4 == EINFO_61) || + (this->unk_0B4 == EINFO_62) || (this->unk_0B4 == EINFO_63) || (this->unk_0B4 == EINFO_64) || + (this->unk_0B4 == EINFO_65) || (this->unk_0B4 == EINFO_66) || (this->unk_0B4 == EINFO_94) || + (this->unk_0B4 == EINFO_95) || (this->unk_0B4 == EINFO_97)) { + this->obj.rot.y -= this->fwork[11] * this->fwork[12]; + this->obj.rot.x += this->fwork[11] * this->fwork[12]; + } else { + this->fwork[10] -= this->fwork[11]; + this->fwork[23] += this->fwork[11] * this->fwork[12]; } + } - if (this->fwork[7] > 0.0f) { - this->fwork[7] -= this->fwork[8]; - this->obj.rot.y += this->fwork[8] * this->fwork[9]; - if (this->obj.rot.y >= 360.0f) { - this->obj.rot.y = this->obj.rot.y - 360.0f; - } - if (this->obj.rot.y < 0.0f) { - this->obj.rot.y += 360.0f; - } - } + if (this->fwork[23] >= 360.0f) { + this->fwork[23] -= 360.0f; + } + if (this->fwork[23] < 0.0f) { + this->fwork[23] += 360.0f; + } - if (this->fwork[10] > 0.0f) { - if ((this->unk_0B4 == EINFO_13) || (this->unk_0B4 == EINFO_14) || (this->unk_0B4 == EINFO_61) || - (this->unk_0B4 == EINFO_62) || (this->unk_0B4 == EINFO_63) || (this->unk_0B4 == EINFO_64) || - (this->unk_0B4 == EINFO_65) || (this->unk_0B4 == EINFO_66) || (this->unk_0B4 == EINFO_94) || - (this->unk_0B4 == EINFO_95) || (this->unk_0B4 == EINFO_97)) { - this->obj.rot.y -= this->fwork[11] * this->fwork[12]; - this->obj.rot.x += this->fwork[11] * this->fwork[12]; - } else { - this->fwork[10] -= this->fwork[11]; - this->fwork[23] += this->fwork[11] * this->fwork[12]; - } - } + Math_SmoothStepToAngle(&this->obj.rot.z, this->fwork[23], 0.2f, 100.0f, 0.0001f); + Matrix_RotateZ(gCalcMatrix, (this->vwork[29].z + this->unk_0F4.z) * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, this->unk_0F4.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, this->unk_0F4.x * M_DTOR, MTXF_APPLY); - if (this->fwork[23] >= 360.0f) { - this->fwork[23] -= 360.0f; - } - if (this->fwork[23] < 0.0f) { - this->fwork[23] += 360.0f; - } + spB8.x = 0.0f; + spB8.y = 0.0f; + spB8.z = this->fwork[0]; - Math_SmoothStepToAngle(&this->obj.rot.z, this->fwork[23], 0.2f, 100.0f, 0.0001f); - Matrix_RotateZ(gCalcMatrix, (this->vwork[29].z + this->unk_0F4.z) * M_DTOR, MTXF_NEW); - Matrix_RotateY(gCalcMatrix, this->unk_0F4.y * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gCalcMatrix, this->unk_0F4.x * M_DTOR, MTXF_APPLY); + Matrix_MultVec3fNoTranslate(gCalcMatrix, &spB8, &spAC); - spB8.x = 0.0f; - spB8.y = 0.0f; - spB8.z = this->fwork[0]; + this->vel.x = this->fwork[13] + spAC.x; + this->vel.y = this->fwork[14] + spAC.y; + this->vel.z = spAC.z; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &spB8, &spAC); + this->fwork[13] -= this->fwork[13] * 0.1f; + this->fwork[14] -= this->fwork[14] * 0.1f; - this->vel.x = this->fwork[13] + spAC.x; - this->vel.y = this->fwork[14] + spAC.y; - this->vel.z = spAC.z; - - this->fwork[13] -= this->fwork[13] * 0.1f; - this->fwork[14] -= this->fwork[14] * 0.1f; - - if (this->iwork[5] == EV_ZMODE(EMZ_RELATIVE)) { - this->vel.z -= this->fwork[22]; - if ((gCurrentLevel == LEVEL_SECTOR_Y) && (D_ctx_80177D08 < 0.0f)) { - this->vel.z -= D_ctx_80177D08; - } - } - - if (this->iwork[5] == EV_ZMODE(EMZ_PLAYER)) { + if (this->iwork[5] == EV_ZMODE(EMZ_RELATIVE)) { + this->vel.z -= this->fwork[22]; + if ((gCurrentLevel == LEVEL_SECTOR_Y) && (D_ctx_80177D08 < 0.0f)) { this->vel.z -= D_ctx_80177D08; } + } - if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ENTER_WARP_ZONE) { - this->vel.z = 100.0f; - } + if (this->iwork[5] == EV_ZMODE(EMZ_PLAYER)) { + this->vel.z -= D_ctx_80177D08; + } - ActorEvent_ProcessTriggers(this); - ActorEvent_ProcessActions(this); - ActorEvent_UpdateTexLines(this); + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ENTER_WARP_ZONE) { + this->vel.z = 100.0f; + } - if (this->unk_0B4 == EINFO_38) { - ActorEvent_800720E8(this); + ActorEvent_ProcessTriggers(this); + ActorEvent_ProcessActions(this); + ActorEvent_UpdateTexLines(this); + + if (this->unk_0B4 == EINFO_38) { + ActorEvent_800720E8(this); + } else { + if (this->scale <= -1.999f) { + ActorEvent_80070BA8(this); } else { - if (this->scale <= -1.999f) { - ActorEvent_80070BA8(this); - } else { - if ((this->unk_0D0 == 1) && (this->scale < 0.5f) && (this->unk_0B4 != EINFO_48) && - (this->unk_0B4 != EINFO_49) && (this->unk_0B4 != EINFO_50)) { - this->unk_0D0 = 0; - if (gCurrentLevel == LEVEL_METEO) { - AUDIO_PLAY_SFX(0x2902107D, this->sfxSource, 4); - } else { - AUDIO_PLAY_SFX(0x29121007, this->sfxSource, 4); - } + if ((this->unk_0D0 == 1) && (this->scale < 0.5f) && (this->unk_0B4 != EINFO_48) && + (this->unk_0B4 != EINFO_49) && (this->unk_0B4 != EINFO_50)) { + this->unk_0D0 = 0; + if (gCurrentLevel == LEVEL_METEO) { + AUDIO_PLAY_SFX(0x2902107D, this->sfxSource, 4); + } else { + AUDIO_PLAY_SFX(0x29121007, this->sfxSource, 4); } + } - if ((this->unk_0B4 < EINFO_200) && (this->unk_0B4 != EINFO_78) && (this->scale >= 0.5f)) { - switch (this->unk_0B4) { - case EINFO_71: - ActorEvent_8006FE28(this); - break; - case EINFO_79: - ActorEvent_8006FEEC(this); - break; - default: - ActorEvent_800701E0(this); - break; - } + if ((this->unk_0B4 < EINFO_200) && (this->unk_0B4 != EINFO_78) && (this->scale >= 0.5f)) { + switch (this->unk_0B4) { + case EINFO_71: + ActorEvent_8006FE28(this); + break; + case EINFO_79: + ActorEvent_8006FEEC(this); + break; + default: + ActorEvent_800701E0(this); + break; } } } - switch (this->unk_0B4) { - case EINFO_92: - case EINFO_93: - case EINFO_94: - case EINFO_95: - case EINFO_96: - if (((gGameFrameCount % 8) == 0)) { - this->fwork[18] = RAND_FLOAT(255.0f); - this->fwork[19] = RAND_FLOAT(255.0f); - this->fwork[20] = RAND_FLOAT(255.0f); - } - Math_SmoothStepToF(&this->fwork[15], this->fwork[18], 1.0f, 10.0f, 0.0f); - Math_SmoothStepToF(&this->fwork[16], this->fwork[19], 1.0f, 10.0f, 0.0f); - Math_SmoothStepToF(&this->fwork[17], this->fwork[20], 1.0f, 10.0f, 0.0f); - break; + } + switch (this->unk_0B4) { + case EINFO_92: + case EINFO_93: + case EINFO_94: + case EINFO_95: + case EINFO_96: + if (((gGameFrameCount % 8) == 0)) { + this->fwork[18] = RAND_FLOAT(255.0f); + this->fwork[19] = RAND_FLOAT(255.0f); + this->fwork[20] = RAND_FLOAT(255.0f); + } + Math_SmoothStepToF(&this->fwork[15], this->fwork[18], 1.0f, 10.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[16], this->fwork[19], 1.0f, 10.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[17], this->fwork[20], 1.0f, 10.0f, 0.0f); + break; - case EINFO_46: - if (func_play_800A73E4(&spEC, &spFC, this->obj.pos.x, -100.0f, this->obj.pos.z)) { - spF0 = 10.0f; + case EINFO_46: + if (func_play_800A73E4(&spEC, &spFC, this->obj.pos.x, -100.0f, this->obj.pos.z)) { + spF0 = 10.0f; - if (Math_SmoothStepToF(&this->obj.pos.y, spEC, 0.5f, 7.0f, 0.0f) >= 0.0f) { - spF0 = 350.0f; - if (((gGameFrameCount % 4) == 0)) { - ActorEvent_8007240C(this->obj.pos.x, spEC, this->obj.pos.z, this->obj.rot.y); - AUDIO_PLAY_SFX(0x19800017, this->sfxSource, 4); - } - } - - Math_SmoothStepToAngle(&this->obj.rot.x, spF0, 0.1f, 1.0f, 0.0f); - - if ((this->state == EVSTATE_F4_PLUS_Y) || (this->state == EVSTATE_F4_MINUS_Y)) { - var_fv0 = this->fwork[3] * 20.0f; - if (this->state == EVSTATE_F4_PLUS_Y) { - var_fv0 *= -1.0f; - } - Math_SmoothStepToAngle(&this->obj.rot.z, var_fv0, 0.1f, 3.0f, 0.0f); + if (Math_SmoothStepToF(&this->obj.pos.y, spEC, 0.5f, 7.0f, 0.0f) >= 0.0f) { + spF0 = 350.0f; + if (((gGameFrameCount % 4) == 0)) { + ActorEvent_8007240C(this->obj.pos.x, spEC, this->obj.pos.z, this->obj.rot.y); + AUDIO_PLAY_SFX(0x19800017, this->sfxSource, 4); } } - this->obj.rot.y = this->unk_0F4.y; - break; - case EINFO_31: - this->obj.rot.z = gGameFrameCount; - break; + Math_SmoothStepToAngle(&this->obj.rot.x, spF0, 0.1f, 1.0f, 0.0f); - case EINFO_21: - case EINFO_22: - this->obj.rot.z = gGameFrameCount * 3.0f; - break; - - case EINFO_3: - this->unk_0C9 = 1; - this->obj.rot.y -= 10.0f; - break; - - case EINFO_6: - this->unk_0B6++; - if (gCurrentLevel == LEVEL_SOLAR) { - if (this->unk_0B6 >= Animation_GetFrameCount(&D_SO_600636C)) { - this->unk_0B6 = 0; + if ((this->state == EVSTATE_F4_PLUS_Y) || (this->state == EVSTATE_F4_MINUS_Y)) { + var_fv0 = this->fwork[3] * 20.0f; + if (this->state == EVSTATE_F4_PLUS_Y) { + var_fv0 *= -1.0f; } - if (((s32) gGameFrameCount % 3) == 0) { - Solar_8019E9F4(this->obj.pos.x, this->obj.pos.y - 20, this->obj.pos.z - 180.0f, 0.0f, - RAND_FLOAT(20.0f) * -1.0f, 0.0f, 4.0f, 2); - } - } else if (this->unk_0B6 >= Animation_GetFrameCount(&D_ENMY_PLANET_40057AC)) { + Math_SmoothStepToAngle(&this->obj.rot.z, var_fv0, 0.1f, 3.0f, 0.0f); + } + } + this->obj.rot.y = this->unk_0F4.y; + break; + + case EINFO_31: + this->obj.rot.z = gGameFrameCount; + break; + + case EINFO_21: + case EINFO_22: + this->obj.rot.z = gGameFrameCount * 3.0f; + break; + + case EINFO_3: + this->unk_0C9 = 1; + this->obj.rot.y -= 10.0f; + break; + + case EINFO_6: + this->unk_0B6++; + if (gCurrentLevel == LEVEL_SOLAR) { + if (this->unk_0B6 >= Animation_GetFrameCount(&D_SO_600636C)) { this->unk_0B6 = 0; } - break; + if (((s32) gGameFrameCount % 3) == 0) { + Solar_8019E9F4(this->obj.pos.x, this->obj.pos.y - 20, this->obj.pos.z - 180.0f, 0.0f, + RAND_FLOAT(20.0f) * -1.0f, 0.0f, 4.0f, 2); + } + } else if (this->unk_0B6 >= Animation_GetFrameCount(&D_ENMY_PLANET_40057AC)) { + this->unk_0B6 = 0; + } + break; - case EINFO_9: - this->unk_0B6++; - if (this->unk_0B6 >= Animation_GetFrameCount(&D_ENMY_PLANET_40001A4)) { + case EINFO_9: + this->unk_0B6++; + if (this->unk_0B6 >= Animation_GetFrameCount(&D_ENMY_PLANET_40001A4)) { + this->unk_0B6 = 0; + } + if (this->iwork[6] == 0) { + this->obj.rot.y = 0.0f; + } + break; + + case EINFO_48: + case EINFO_49: + case EINFO_50: + SectorY_Actor204_Update(this); + break; + + case EINFO_52: + ActorEvent_80072474(this); + break; + + case EINFO_78: + ActorSupplies_Update(this); + break; + + case EINFO_79: + if (this->timer_0C4 == 0) { + this->unk_0B6 += 1; + if (Animation_GetFrameCount(&D_ZO_600E5EC) < this->unk_0B6) { this->unk_0B6 = 0; } - if (this->iwork[6] == 0) { - this->obj.rot.y = 0.0f; - } - break; + } + break; - case EINFO_48: - case EINFO_49: - case EINFO_50: - SectorY_Actor204_Update(this); - break; + case EINFO_80: { + Effect* effect; + Vec3f sp90; + Vec3f sp84; + Vec3f sp78; + s32 sp74; - case EINFO_52: - ActorEvent_80072474(this); - break; + switch (this->unk_046) { + case 1: + break; - case EINFO_78: - ActorSupplies_Update(this); - break; + case 0: + Matrix_RotateZ(gCalcMatrix, this->unk_0F4.z * M_DTOR, MTXF_NEW); + Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_800D1290, &sp90); - case EINFO_79: - if (this->timer_0C4 == 0) { - this->unk_0B6 += 1; - if (Animation_GetFrameCount(&D_ZO_600E5EC) < this->unk_0B6) { - this->unk_0B6 = 0; - } - } - break; + if ((this->obj.pos.y + sp90.y) > -30.0f) { + for (sp74 = 0; sp74 < 7; sp74++) { + effect = func_effect_8007783C(OBJ_EFFECT_394); - case EINFO_80: { - Effect* effect; - Vec3f sp90; - Vec3f sp84; - Vec3f sp78; - s32 sp74; - - switch (this->unk_046) { - case 1: - break; - - case 0: - Matrix_RotateZ(gCalcMatrix, this->unk_0F4.z * M_DTOR, MTXF_NEW); - Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_800D1290, &sp90); - - if ((this->obj.pos.y + sp90.y) > -30.0f) { - for (sp74 = 0; sp74 < 7; sp74++) { - effect = func_effect_8007783C(OBJ_EFFECT_394); - - if (effect != NULL) { - effect->unk_78 = effect->unk_7A = 12; - effect->obj.status = OBJ_ACTIVE; - effect->obj.pos.x = this->obj.pos.x + sp90.x; - effect->obj.pos.y = this->obj.pos.y + sp90.y; - effect->obj.pos.z = this->obj.pos.z; - effect->obj.rot.x = RAND_FLOAT(360.0f); - effect->obj.rot.y = RAND_FLOAT(360.0f); - effect->obj.rot.z = RAND_FLOAT(360.0f); - sp84.x = RAND_FLOAT(25.0f) + 30.0f; - sp84.y = RAND_FLOAT(25.0f) + 20.0f; - sp84.z = 0.0f; - effect->unk_44 = 10; - effect->scale2 = 1.0f; - Matrix_RotateY(gCalcMatrix, (RAND_FLOAT(180.0f) + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp84, &sp78); - effect->vel.x = sp78.x; - effect->vel.y = sp78.y; - effect->vel.z = sp78.z; - effect->unk_60.x = RAND_FLOAT_CENTERED(1.0f) + 5.0f; - effect->unk_60.y = RAND_FLOAT_CENTERED(1.0f) + 5.0f; - effect->unk_60.z = RAND_FLOAT_CENTERED(1.0f) + 5.0f; - } + if (effect != NULL) { + effect->unk_78 = effect->unk_7A = 12; + effect->obj.status = OBJ_ACTIVE; + effect->obj.pos.x = this->obj.pos.x + sp90.x; + effect->obj.pos.y = this->obj.pos.y + sp90.y; + effect->obj.pos.z = this->obj.pos.z; + effect->obj.rot.x = RAND_FLOAT(360.0f); + effect->obj.rot.y = RAND_FLOAT(360.0f); + effect->obj.rot.z = RAND_FLOAT(360.0f); + sp84.x = RAND_FLOAT(25.0f) + 30.0f; + sp84.y = RAND_FLOAT(25.0f) + 20.0f; + sp84.z = 0.0f; + effect->unk_44 = 10; + effect->scale2 = 1.0f; + Matrix_RotateY(gCalcMatrix, (RAND_FLOAT(180.0f) + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp84, &sp78); + effect->vel.x = sp78.x; + effect->vel.y = sp78.y; + effect->vel.z = sp78.z; + effect->unk_60.x = RAND_FLOAT_CENTERED(1.0f) + 5.0f; + effect->unk_60.y = RAND_FLOAT_CENTERED(1.0f) + 5.0f; + effect->unk_60.z = RAND_FLOAT_CENTERED(1.0f) + 5.0f; } - this->unk_046++; } - break; + this->unk_046++; + } + break; + } + + if ((fabsf(this->fwork[0]) > 10.0f) && ((gGameFrameCount % 2) == 0)) { + effect = func_effect_8007783C(OBJ_EFFECT_394); + if (effect != NULL) { + Matrix_RotateZ(gCalcMatrix, this->unk_0F4.z * M_DTOR, MTXF_NEW); + Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_800D1290, &sp90); + + effect->unk_78 = effect->unk_7A = 11; + + effect->obj.status = OBJ_ACTIVE; + + effect->obj.pos.x = this->obj.pos.x + RAND_FLOAT_CENTERED(3.0f) + sp90.x; + effect->obj.pos.y = this->obj.pos.y + RAND_FLOAT_CENTERED(3.0f) + sp90.y; + effect->obj.pos.z = this->obj.pos.z + RAND_FLOAT_CENTERED(3.0f) + 180.0f; + + effect->scale2 = 9.0f; + effect->obj.rot.z = RAND_FLOAT(360.0f); + effect->vel.x = RAND_FLOAT_CENTERED(5.0f); + effect->vel.y = RAND_FLOAT_CENTERED(3.0f) + 30.0f; + effect->unk_44 = 100; + effect->unk_46 = -8; + effect->unk_60.z = 3; + + if (Rand_ZeroOne() < 0.5f) { + effect->unk_60.z = -effect->unk_60.z; + } + + if (gGameFrameCount & 2) { + effect->vel.y = -effect->vel.y; + } } - if ((fabsf(this->fwork[0]) > 10.0f) && ((gGameFrameCount % 2) == 0)) { + if (((gGameFrameCount % 4) == 0)) { effect = func_effect_8007783C(OBJ_EFFECT_394); if (effect != NULL) { - Matrix_RotateZ(gCalcMatrix, this->unk_0F4.z * M_DTOR, MTXF_NEW); - Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_800D1290, &sp90); - effect->unk_78 = effect->unk_7A = 11; - effect->obj.status = OBJ_ACTIVE; - - effect->obj.pos.x = this->obj.pos.x + RAND_FLOAT_CENTERED(3.0f) + sp90.x; - effect->obj.pos.y = this->obj.pos.y + RAND_FLOAT_CENTERED(3.0f) + sp90.y; - effect->obj.pos.z = this->obj.pos.z + RAND_FLOAT_CENTERED(3.0f) + 180.0f; - + effect->obj.pos.x = RAND_FLOAT_CENTERED(3.0f) + this->obj.pos.x; + effect->obj.pos.y = RAND_FLOAT_CENTERED(5.0f) + this->obj.pos.y + 50.0f; + effect->obj.pos.z = RAND_FLOAT_CENTERED(3.0f) + this->obj.pos.z + 200.0f; effect->scale2 = 9.0f; effect->obj.rot.z = RAND_FLOAT(360.0f); effect->vel.x = RAND_FLOAT_CENTERED(5.0f); - effect->vel.y = RAND_FLOAT_CENTERED(3.0f) + 30.0f; + effect->vel.y = RAND_FLOAT_CENTERED(3.0f) + 10.0f; effect->unk_44 = 100; effect->unk_46 = -8; effect->unk_60.z = 3; @@ -3601,128 +3627,102 @@ void ActorEvent_Update(ActorEvent* this) { effect->unk_60.z = -effect->unk_60.z; } - if (gGameFrameCount & 2) { + if (gGameFrameCount & 4) { effect->vel.y = -effect->vel.y; } } - - if (((gGameFrameCount % 4) == 0)) { - effect = func_effect_8007783C(OBJ_EFFECT_394); - if (effect != NULL) { - effect->unk_78 = effect->unk_7A = 11; - effect->obj.status = OBJ_ACTIVE; - effect->obj.pos.x = RAND_FLOAT_CENTERED(3.0f) + this->obj.pos.x; - effect->obj.pos.y = RAND_FLOAT_CENTERED(5.0f) + this->obj.pos.y + 50.0f; - effect->obj.pos.z = RAND_FLOAT_CENTERED(3.0f) + this->obj.pos.z + 200.0f; - effect->scale2 = 9.0f; - effect->obj.rot.z = RAND_FLOAT(360.0f); - effect->vel.x = RAND_FLOAT_CENTERED(5.0f); - effect->vel.y = RAND_FLOAT_CENTERED(3.0f) + 10.0f; - effect->unk_44 = 100; - effect->unk_46 = -8; - effect->unk_60.z = 3; - - if (Rand_ZeroOne() < 0.5f) { - effect->unk_60.z = -effect->unk_60.z; - } - - if (gGameFrameCount & 4) { - effect->vel.y = -effect->vel.y; - } - } - } } - } break; + } + } break; - case EINFO_81: - Math_SmoothStepToF(&this->fwork[15], 1.0f, 0.1f, 0.1f, 0.001f); + case EINFO_81: + Math_SmoothStepToF(&this->fwork[15], 1.0f, 0.1f, 0.1f, 0.001f); - if (this->fwork[15] > 0.5f) { - this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_VE1_601B4C4); + if (this->fwork[15] > 0.5f) { + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_VE1_601B4C4); + } + + if (this->unk_046 == 0) { + this->fwork[16] += 4.0f; + if (this->fwork[16] >= 100.0f) { + this->unk_046 = 1; + this->fwork[16] = 100.0f; + } + } else { + this->fwork[16] -= 4.0f; + if (this->fwork[16] <= 0.0f) { + this->unk_046 = 0; + this->fwork[16] = 0.0f; + } + } + break; + + case EINFO_83: + if (this->health <= 0) { + if (this->unk_0B6 == 20) { + spD4 = this->obj.pos.z; + spD8 = this->obj.pos.y; + + this->obj.pos.y += 80.0f; + this->obj.pos.z += 40.0f; + Actor_Despawn(this); + this->obj.pos.y = spD8; + this->obj.pos.z = spD4; } - if (this->unk_046 == 0) { - this->fwork[16] += 4.0f; - if (this->fwork[16] >= 100.0f) { - this->unk_046 = 1; - this->fwork[16] = 100.0f; + if ((this->unk_0B6 >= 18) && (this->unk_0B6 < 24)) { + func_effect_8007BC7C(this->obj.pos.x, this->obj.pos.y + 80.0f, this->obj.pos.z + 60.0f, 20.0f); + } + + if (this->unk_0B6 < 49) { + this->unk_0B6++; + if (this->unk_0B6 >= 49) { + this->unk_0B6 = 49; } - } else { - this->fwork[16] -= 4.0f; - if (this->fwork[16] <= 0.0f) { - this->unk_046 = 0; - this->fwork[16] = 0.0f; + if ((gGameFrameCount % 2) != 0) { + Aquas_801AC8A8(RAND_FLOAT_CENTERED(100.0f) + this->obj.pos.x, + RAND_FLOAT(50.0f) + this->obj.pos.y, + RAND_FLOAT_CENTERED(100.0f) + this->obj.pos.z, 1.0f, 0); } } - break; + this->timer_0C2 = 10000; + } + break; - case EINFO_83: - if (this->health <= 0) { - if (this->unk_0B6 == 20) { - spD4 = this->obj.pos.z; - spD8 = this->obj.pos.y; - - this->obj.pos.y += 80.0f; - this->obj.pos.z += 40.0f; - Actor_Despawn(this); - this->obj.pos.y = spD8; - this->obj.pos.z = spD4; - } - - if ((this->unk_0B6 >= 18) && (this->unk_0B6 < 24)) { - func_effect_8007BC7C(this->obj.pos.x, this->obj.pos.y + 80.0f, this->obj.pos.z + 60.0f, 20.0f); - } - - if (this->unk_0B6 < 49) { - this->unk_0B6++; - if (this->unk_0B6 >= 49) { - this->unk_0B6 = 49; - } - if ((gGameFrameCount % 2) != 0) { - Aquas_801AC8A8(RAND_FLOAT_CENTERED(100.0f) + this->obj.pos.x, - RAND_FLOAT(50.0f) + this->obj.pos.y, - RAND_FLOAT_CENTERED(100.0f) + this->obj.pos.z, 1.0f, 0); - } - } - this->timer_0C2 = 10000; + case EINFO_88: + if (this->unk_04A == 0) { + this->unk_046 += 4; + if (this->unk_046 >= 255) { + this->unk_046 = 255; + this->unk_04A = 1; } - break; - - case EINFO_88: - if (this->unk_04A == 0) { - this->unk_046 += 4; - if (this->unk_046 >= 255) { - this->unk_046 = 255; - this->unk_04A = 1; - } - } else { - this->unk_046 -= 4; - if (this->unk_046 <= 0) { - this->unk_046 = 0; - this->unk_04A = 0; - } + } else { + this->unk_046 -= 4; + if (this->unk_046 <= 0) { + this->unk_046 = 0; + this->unk_04A = 0; } - break; + } + break; - case EINFO_103: - case EINFO_104: - Andross_80187530(this); - break; + case EINFO_103: + case EINFO_104: + Andross_80187530(this); + break; - case EINFO_106: - this->unk_0B6++; - if (this->unk_0B6 >= 6) { - this->unk_0B6 = 0; - } - break; - } + case EINFO_106: + this->unk_0B6++; + if (this->unk_0B6 >= 6) { + this->unk_0B6 = 0; + } + break; + } - if (gLevelMode == LEVELMODE_ALL_RANGE) { - D_ctx_80177F20[this->index + 1] = this->obj.pos.x; - D_ctx_80178028[this->index + 1] = this->obj.pos.z; - D_ctx_80178130[this->index + 1] = Math_ModF(this->unk_0F4.y, 360.0f) + 180.0f; - D_ctx_80178238[this->index + 1] = 1; - } + if (gLevelMode == LEVELMODE_ALL_RANGE) { + D_ctx_80177F20[this->index + 1] = this->obj.pos.x; + D_ctx_80178028[this->index + 1] = this->obj.pos.z; + D_ctx_80178130[this->index + 1] = Math_ModF(this->unk_0F4.y, 360.0f) + 180.0f; + D_ctx_80178238[this->index + 1] = 1; } } @@ -4213,7 +4213,7 @@ void func_enmy2_800763A4(Actor* actor) { return; } - if (D_ctx_801784AC == 4) { + if (gGroundType == 4) { if (Ground_801B6AEC(actor->obj.pos.x, actor->obj.pos.y - 10.0f, actor->obj.pos.z + D_ctx_80177D20) != 0) { func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y + 20.0f, actor->obj.pos.z, actor->scale * 6.0f); func_effect_8007BFFC(actor->obj.pos.x - actor->vel.x, actor->obj.pos.y + 30.0f, @@ -4232,7 +4232,7 @@ void func_enmy2_800763A4(Actor* actor) { if ((sp60 != 0) || (actor->obj.pos.y < (gGroundHeight + 30.0f))) { if ((Rand_ZeroOne() < 0.5f) && (actor->timer_04C < 3) && (gLevelType == LEVELTYPE_PLANET) && - (sp60 != 999) && (gGroundType != GROUNDTYPE_WATER) && + (sp60 != 999) && (gGroundSurface != SURFACE_WATER) && ((actor->vel.z < -20.0f) || (actor->vel.z > 0.0f))) { if (gCurrentLevel == LEVEL_FORTUNA) { func_enmy2_8006BF7C(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z - actor->vel.z); @@ -4270,7 +4270,7 @@ void func_enmy2_800763A4(Actor* actor) { } else { if ((actor->obj.pos.y < (gGroundHeight + 30.0f)) && (gLevelType == LEVELTYPE_PLANET)) { actor->vel.z = 0.0f; - if (gGroundType == GROUNDTYPE_WATER) { + if (gGroundSurface == SURFACE_WATER) { func_effect_8007D9DC(actor->obj.pos.x, gGroundHeight + 2.0f, actor->obj.pos.z, 3.0f, 20.0f, 0); func_effect_8007D9DC(actor->obj.pos.x, gGroundHeight + 2.0f, actor->obj.pos.z, 3.0f, 20.0f, diff --git a/src/engine/fox_fade.c b/src/engine/fox_fade.c index 91272082..fb127c18 100644 --- a/src/engine/fox_fade.c +++ b/src/engine/fox_fade.c @@ -28,17 +28,17 @@ void func_fade_80084488(s32 arg0) { Matrix_Pop(&gGfxMatrix); } -void func_fade_80084688(s32 arg0, s32 arg1) { - if (arg1 != 0) { - switch (arg0) { +void func_fade_80084688(s32 fade, s32 progress) { + if (progress != 0) { + switch (fade) { case 0: - func_fade_80084488(arg1); + func_fade_80084488(progress); break; case 1: - func_fade_80084370(arg1); + func_fade_80084370(progress); break; case 2: - func_fade_800843FC(arg1); + func_fade_800843FC(progress); break; default: (void) "そのような フェード は ない (%d)\n"; // There is no such fade diff --git a/src/engine/fox_game.c b/src/engine/fox_game.c index 20167e46..3eb3a689 100644 --- a/src/engine/fox_game.c +++ b/src/engine/fox_game.c @@ -86,7 +86,7 @@ void Game_SetGameState(void) { } break; case GSTATE_MAP: - D_ctx_80177B40 = 0; + gMapState = 0; break; case GSTATE_GAME_OVER: D_ctx_80177868 = 0; @@ -383,7 +383,7 @@ void Game_Update(void) { break; case GSTATE_INIT: gGameState = GSTATE_TITLE; - D_ctx_80177AE0 = 1; + gTitleState = 1; D_ctx_80177824 = 1; Memory_FreeAll(); Play_ClearObjectData(); @@ -391,9 +391,9 @@ void Game_Update(void) { gLifeCount[0] = 2; D_ctx_80177D20 = 0.0f; D_hud_8016170C = gCsFrameCount = gShowLevelClearStatusScreen = gLevelStartStatusScreenTimer = - gLevelClearScreenTimer = D_versus_80178754 = gVersusMode = D_ctx_80177AE0 = gStarCount = - D_ctx_80177B40 = gPlayState = gOptionMenuStatus = gDrawMode = gShowBossHealth = gShowHud = - gBgColor = gFillScreenAlpha = 0; + gLevelClearScreenTimer = gVsMatchState = gVersusMode = gTitleState = gStarCount = gMapState = + gPlayState = gOptionMenuStatus = gDrawMode = gShowBossHealth = gShowHud = gBgColor = + gFillScreenAlpha = 0; gNextGameState = D_ctx_80177C94 = D_ctx_80177CAC = D_ctx_80177CB4 = D_ctx_80177CBC = D_ctx_80177CC4 = D_ctx_80177C9C = D_ctx_80177CA4 = D_play_80161A5C = D_game_80161A34 = 0; for (i = 0; i < 4; i++) { @@ -410,7 +410,7 @@ void Game_Update(void) { gPlayerGlareAlphas[i] = 0; } gVersusStage = 0; - D_ctx_801778A4 = 3; + gVsPointsToWin = 3; gBlurAlpha = 255; for (i = 0; i < 30; i++) { gLeveLClearStatus[i] = 0; @@ -512,19 +512,19 @@ void Game_Update(void) { gDPFillRectangle(gMasterDisp++, SCREEN_MARGIN, SCREEN_HEIGHT / 2 - 1 - 1, SCREEN_WIDTH - SCREEN_MARGIN, SCREEN_HEIGHT / 2 + 1); - func_hud_8008CB8C(); + HUD_dummy_8008CB8C(); } partialFill = false; if (gCamCount == 1) { Graphics_FillRectangle(&gMasterDisp, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, gPlayerGlareReds[0], gPlayerGlareGreens[0], gPlayerGlareBlues[0], gPlayerGlareAlphas[0]); if ((gDrawMode == DRAW_PLAY) || (gDrawMode == DRAW_ENDING)) { - func_radio_800BB5D0(); + Radio_Draw(); if (gShowHud) { - func_hud_8008FA84(); - func_hud_8008CA44(); + HUD_Draw(); + HUD_DrawEdgeArrows(); } - func_hud_8008DE68(); + HUD_DrawBossHealth(); } } else { for (i = 0; i < gCamCount; i++) { @@ -541,18 +541,18 @@ void Game_Update(void) { } } } - func_bg_80040CDC(); - func_hud_8008865C(); + Background_dummy_80040CDC(); + HUD_DrawStatusScreens(); AllRange_UpdateCountdown(); if ((gGameState == GSTATE_PLAY) && gVersusMode) { - func_versus_800C1ED4(); + Versus_Draw(); } func_fade_80084688(0, D_ctx_80177C50); if (!partialFill) { Graphics_FillRectangle(&gMasterDisp, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, gFillScreenRed, gFillScreenGreen, gFillScreenBlue, gFillScreenAlpha); } - func_80016A50(); + Audio_dummy_80016A50(); } } diff --git a/src/engine/fox_hud.c b/src/engine/fox_hud.c index ff4fb1be..04c24dde 100644 --- a/src/engine/fox_hud.c +++ b/src/engine/fox_hud.c @@ -669,7 +669,7 @@ void func_hud_80086664(f32 x, f32 y) { y2 + i, 1.0f, 1.0f); } - if ((D_ctx_80177CA0 == 0) && (gAllRangeCheckpoint == 0) && (gCurrentLevel != LEVEL_VENOM_ANDROSS) && + if ((gSavedObjectLoadIndex == 0) && (gAllRangeCheckpoint == 0) && (gCurrentLevel != LEVEL_VENOM_ANDROSS) && (gCurrentLevel != LEVEL_TRAINING)) { func_hud_80087788(); func_hud_80084B94(0); @@ -718,7 +718,7 @@ void func_hud_80086C08(f32 xPos, f32 yPos, f32 xScale, f32 yScale) { TextureRect_8bCI(&gMasterDisp, D_1013170, D_1013570, 24, 17, xPos, yPos, xScale, yScale); } -void func_hud_80086CC8(void) { +void HUD_DrawLevelStartStatusScreen(void) { char pad; f32 sp18; f32 temp; @@ -748,7 +748,7 @@ void func_hud_80086CC8(void) { f32 D_800D1CFC = 0.0f; -void func_hud_80086DCC(void) { +void HUD_DrawLevelClearScreen(void) { s32 i; s32 j; s32 temp; @@ -1034,7 +1034,7 @@ void func_hud_80087788(void) { } } -void func_hud_80087B5C(void) { +void HUD_DrawLevelClearStatusScreen(void) { s32 i; s32 temp; f32 x0; @@ -1307,7 +1307,7 @@ void func_hud_80088564(void) { } } -void func_hud_8008865C(void) { +void HUD_DrawStatusScreens(void) { s32 i; for (i = 0; i < 5; i++) { @@ -1315,9 +1315,9 @@ void func_hud_8008865C(void) { D_801617E8[i]--; } } - func_hud_80086CC8(); - func_hud_80086DCC(); - func_hud_80087B5C(); + HUD_DrawLevelStartStatusScreen(); + HUD_DrawLevelClearScreen(); + HUD_DrawLevelClearStatusScreen(); } s32 func_hud_800886B8(void) { @@ -1563,7 +1563,7 @@ void func_hud_80088970(void) { gAllRangeCheckpoint = 0; gSavedZoSearchlightStatus = false; - gSavedHitCount = D_ctx_80177CA0 = 0; + gSavedHitCount = gSavedObjectLoadIndex = 0; Audio_StopPlayerNoise(0); gPlayer[0].state_1C8 = PLAYERSTATE_1C8_NEXT; @@ -2195,7 +2195,7 @@ void func_hud_8008AD94(void) { RCP_SetupDL(&gMasterDisp, 0x4C); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); - switch ((s32) D_ctx_80177D68) { + switch ((s32) gRadioMsgRadioId) { case RCID_FOX: Graphics_DisplaySmallText(73, 173, 1.0f, 1.0f, "FOX"); break; @@ -2398,7 +2398,7 @@ s32 func_hud_8008B774(void) { s32 ret = 0; s32 temp; - switch (D_ctx_801782A4) { + switch (gCurrentRadioPortrait) { case 0: case 1: i = 0; @@ -2522,7 +2522,8 @@ void func_hud_8008B9E8(void) { } if ((D_80161788 == 0) && (D_8016178C == 0)) { - if ((gRadioState >= 4) && (D_ctx_801782A4 != RCID_STATIC) && (D_ctx_801782A4 != RCID_STATIC_FLIP)) { + if ((gRadioState >= 4) && (gCurrentRadioPortrait != RCID_STATIC) && + (gCurrentRadioPortrait != RCID_STATIC_FLIP)) { temp = func_hud_8008B774(); if (temp == 1) { D_80161788 = 20; @@ -2535,7 +2536,7 @@ void func_hud_8008B9E8(void) { } } - if ((D_ctx_801782A4 == RCID_STATIC) || (D_ctx_801782A4 == RCID_STATIC_FLIP)) { + if ((gCurrentRadioPortrait == RCID_STATIC) || (gCurrentRadioPortrait == RCID_STATIC_FLIP)) { D_80161788 = 0; D_8016178C = 0; } @@ -2769,7 +2770,7 @@ void func_hud_8008C6F4(s32 idx, s32 arg1) { Matrix_Pop(&gGfxMatrix); } -void func_hud_8008CA44(void) { +void HUD_DrawEdgeArrows(void) { s32 D_800D2048[] = { 0x80, 0x40, 0x20, 0x10, 8 | 2, 8 | 1, 4 | 2, 4 | 1, 8, 4, 2, 1, }; @@ -2797,7 +2798,7 @@ void func_hud_8008CA44(void) { } } -s32 func_hud_8008CB8C(void) { +s32 HUD_dummy_8008CB8C(void) { return 0; } @@ -2814,7 +2815,7 @@ void func_hud_8008CBE4(void) { s32 i; s32 j; - if (D_ctx_801778AC != 0) { + if (gVsMatchType != 0) { return; } @@ -2843,7 +2844,7 @@ void func_hud_8008CBE4(void) { for (i = 0; i < D_ctx_80177DB8[gPlayerNum]; i++) { if (D_80161748[gPlayerNum] < (i + 1)) { - if (((i + 1) != 1) && ((i + 1) == (D_ctx_801778A4 - 1))) { + if (((i + 1) != 1) && ((i + 1) == (gVsPointsToWin - 1))) { D_80161760[gPlayerNum] = 50; D_80161738[gPlayerNum] = 0; } else { @@ -3060,7 +3061,7 @@ void func_hud_8008DD78(f32 arg0, f32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg } } -void func_hud_8008DE68(void) { +void HUD_DrawBossHealth(void) { f32 sp3C; f32 temp1; f32 temp2; @@ -3534,7 +3535,7 @@ void func_hud_8008F96C(void) { } } -void func_hud_8008FA84(void) { +void HUD_Draw(void) { s32 i; s32 goldRings; bool medalStatus; @@ -4063,14 +4064,14 @@ void func_hud_80091254(Actor* actor) { } bool func_hud_80091298(Actor* actor) { - actor->fwork[1] = gPlayer[0].unk_0D0 + 10.0f; + actor->fwork[1] = gPlayer[0].baseSpeed + 10.0f; actor->fwork[3] = 3.6f; actor->fwork[4] = gPlayer[0].pos.x + ((f32) (actor->aiType - 2) * 700.0f); actor->fwork[5] = gPlayer[0].pos.y; actor->fwork[6] = gPlayer[0].unk_138; if ((fabsf(actor->obj.pos.x - actor->fwork[4]) < 700.0f) || (fabsf(actor->obj.pos.z - actor->fwork[6]) < 700.0f)) { - actor->fwork[1] = gPlayer[0].unk_0D0 - 10.0f; + actor->fwork[1] = gPlayer[0].baseSpeed - 10.0f; actor->fwork[3] = 1.2f; } return false; @@ -4929,7 +4930,7 @@ void HUD_AquasStart(Player* player) { player->unk_234 = 0; player->unk_1D0 = 1; player->unk_208 = 0; - player->unk_0D0 = 0.0f; + player->baseSpeed = 0.0f; gFillScreenAlpha = 255; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; @@ -5222,7 +5223,7 @@ void HUD_AquasStart(Player* player) { D_ctx_80177A48[0] = 0.1f; player->unk_0E8 = 0.0f; - player->unk_0D0 = 20.0f; + player->baseSpeed = 20.0f; player->unk_234 = 1; player->unk_1D0 = 6; @@ -5287,7 +5288,7 @@ void HUD_AquasStart(Player* player) { src.x = 0.0f; src.y = 0.0f; - src.z = player->unk_0D0; + src.z = player->baseSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); @@ -5692,9 +5693,9 @@ void HUD_AquasComplete(Player* player) { Matrix_RotateY(gCalcMatrix, -(M_DTOR * D_ctx_80177A48[4]), MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &src, &dest); - Math_SmoothStepToF(&gCsCamEyeX, dest.x, 0.02f, player->unk_0D0, 0.001f); - Math_SmoothStepToF(&gCsCamEyeY, dest.y, 0.02f, player->unk_0D0, 0.001f); - Math_SmoothStepToF(&gCsCamEyeZ, dest.z, 0.02f, player->unk_0D0, 0.001f); + Math_SmoothStepToF(&gCsCamEyeX, dest.x, 0.02f, player->baseSpeed, 0.001f); + Math_SmoothStepToF(&gCsCamEyeY, dest.y, 0.02f, player->baseSpeed, 0.001f); + Math_SmoothStepToF(&gCsCamEyeZ, dest.z, 0.02f, player->baseSpeed, 0.001f); player->cam.eye.x = gCsCamEyeX; player->cam.eye.y = gCsCamEyeY; @@ -5730,8 +5731,8 @@ void HUD_AquasComplete(Player* player) { player->unk_0F8 = player->unk_0EC = player->unk_12C = player->unk_130 = 0.0f; player->vel.x = player->vel.y = player->vel.z = 0.0f; player->unk_0E4 = player->unk_0E8 = player->unk_0EC = 0.0f; - player->unk_110 = player->unk_114 = 0.0f; - player->unk_0D0 = 3.6f; + player->boostSpeed = player->unk_114 = 0.0f; + player->baseSpeed = 3.6f; player->unk_138 = player->pos.z = 0.0f; player->pos.y = 100.0f; player->pos.x = -100.0f; @@ -5819,7 +5820,7 @@ void HUD_AquasComplete(Player* player) { } if (gCsFrameCount >= 1200) { Math_SmoothStepToF(&actor->fwork[3], 800.0f, 0.02f, 1000.0f, 0.001f); - Math_SmoothStepToF(&player->unk_0D0, 5.0f, 0.1f, 1000.0f, 0.001f); + Math_SmoothStepToF(&player->baseSpeed, 5.0f, 0.1f, 1000.0f, 0.001f); } else { actor->fwork[4] = player->pos.x; actor->fwork[5] = player->pos.y; @@ -5940,7 +5941,7 @@ void HUD_AquasComplete(Player* player) { src.x = 0.0f; src.y = 0.0f; - src.z = player->unk_0D0; + src.z = player->baseSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); @@ -5990,7 +5991,7 @@ void func_hud_80096A74(Player* player) { case 0: player->pos.y += 3400.0f; player->unk_0E4 = 270.0f; - gPlayer[0].unk_0D0 = 0.0f; + gPlayer[0].baseSpeed = 0.0f; D_ctx_80177A48[1] = 100.0f; D_ctx_80177A48[2] = 0.0f; @@ -6088,7 +6089,7 @@ void func_hud_80096A74(Player* player) { D_ctx_80177CE8 = 0; gLevelStartStatusScreenTimer = 50; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; - player->unk_0D0 = D_play_80161A54; + player->baseSpeed = gArwingSpeed; player->unk_1D0 = 0; player->timer_1F8 = 0; player->unk_014 = 0.0f; @@ -6100,7 +6101,7 @@ void func_hud_80096A74(Player* player) { } if (gCsFrameCount >= 30) { - Math_SmoothStepToF(&player->unk_0D0, 30.0f, 0.05f, 1000.0f, 0.001f); + Math_SmoothStepToF(&player->baseSpeed, 30.0f, 0.05f, 1000.0f, 0.001f); if (gCsFrameCount < 110) { player->unk_0EC += (D_ctx_80177A48[4] * 2.0f); @@ -6129,7 +6130,7 @@ void func_hud_80096A74(Player* player) { src.x = 0.0f; src.y = 0.0f; - src.z = player->unk_0D0; + src.z = player->baseSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index c81521e5..bc3483b7 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -37,13 +37,13 @@ u8 D_800D2F6C[20] = { }; u8 gSavedZoSearchlightStatus; -f32 D_play_80161A54; +f32 gArwingSpeed; s32 D_play_80161A58; s32 D_play_80161A5C; u16 gScreenFlashTimer; u16 gDropHitCountItem; s32 D_play_80161A64; -EnvSettings* sEnvSettings; +Environment* sEnvironment; #define MEM_ARRAY_ALLOCATE(arr, count) ((arr) = Memory_Allocate((count) * sizeof(*(arr)))) @@ -170,7 +170,7 @@ void func_play_800A46A0(Player* player) { if (!player->cockpitView || (gLevelMode == LEVELMODE_ALL_RANGE)) { if (player->wings.rightState <= WINGSTATE_BROKEN) { - if (((gGameFrameCount % 2U) == 0) && (D_ctx_80177D70[player->num] != 0)) { + if (((gGameFrameCount % 2U) == 0) && (gRightWingDebrisTimer[player->num] != 0)) { func_effect_8007D10C(RAND_FLOAT_CENTERED(10.0f) + player->hit1.x, RAND_FLOAT(5.0f) + player->hit1.y, player->hit1.z, 1.0f); } @@ -181,7 +181,7 @@ void func_play_800A46A0(Player* player) { } } if (player->wings.leftState <= WINGSTATE_BROKEN) { - if (((gGameFrameCount % 2U) == 0) && (D_ctx_80177D88[player->num] != 0)) { + if (((gGameFrameCount % 2U) == 0) && (gLeftWingDebrisTimer[player->num] != 0)) { func_effect_8007D10C(RAND_FLOAT_CENTERED(10.0f) + player->hit2.x, RAND_FLOAT(5.0f) + player->hit2.y, player->hit2.z, 1.0f); } @@ -234,7 +234,7 @@ void func_play_800A4C40(Player* player) { Vec3f sp3C; Vec3f sp30; - if (gGroundType == GROUNDTYPE_WATER) { + if (gGroundSurface == SURFACE_WATER) { Matrix_Translate(gCalcMatrix, player->pos.x, player->pos.y, player->unk_138, MTXF_NEW); Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, -((player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); @@ -290,7 +290,7 @@ void func_play_800A4F7C(void) { gLevelObjects = SEGMENTED_TO_VIRTUAL(D_versus_302E0E4); break; case VS_STAGE_SECTOR_Z: - if (D_ctx_801778AC == 2) { + if (gVsMatchType == 2) { gLevelObjects = SEGMENTED_TO_VIRTUAL(D_versus_302E378); } else { gLevelObjects = SEGMENTED_TO_VIRTUAL(D_versus_302E170); @@ -455,7 +455,7 @@ void Play_Setup(void) { gMissedZoSearchlight = false; gSavedZoSearchlightStatus = false; gSceneSetup = 0; - gAllRangeCheckpoint = D_ctx_80177CA0 = 0; + gAllRangeCheckpoint = gSavedObjectLoadIndex = 0; D_ctx_80177CB0 = 0.0f; gSavedHitCount = gCsFrameCount = gLevelStartStatusScreenTimer = gLevelClearScreenTimer = gRadioState = 0; D_ctx_8017782C = 1; @@ -473,7 +473,7 @@ void Play_Setup(void) { } } -EnvSettings* D_800D2F98[21] = { +Environment* D_800D2F98[21] = { &D_CO_6037160, &D_ME_6026C80, &D_SX_602A120, &D_A6_6023F20, &D_A6_6028760, &D_SY_602E4B0, &D_VE1_6007E30, &D_SO_601F1F0, &D_ZO_60266D0, &D_ANDROSS_C035110, &D_TR_6006A60, &D_MA_6030E30, &D_TI_6005000, &D_AQ_602E540, &D_FO_600EA90, NULL, &D_KA_6011000, &D_BO_600FF30, &D_SZ_6006E70, &D_VE2_6014D50, &D_versus_302DD70, @@ -483,17 +483,17 @@ void func_play_800A594C(void) { if (gVersusMode) { switch (gVersusStage) { case 0: - sEnvSettings = SEGMENTED_TO_VIRTUAL(&D_versus_302DD70); + sEnvironment = SEGMENTED_TO_VIRTUAL(&D_versus_302DD70); break; case 1: - sEnvSettings = SEGMENTED_TO_VIRTUAL(&D_versus_302DDB4); + sEnvironment = SEGMENTED_TO_VIRTUAL(&D_versus_302DDB4); break; case 2: - sEnvSettings = SEGMENTED_TO_VIRTUAL(&D_versus_302DDF8); + sEnvironment = SEGMENTED_TO_VIRTUAL(&D_versus_302DDF8); break; } } else { - sEnvSettings = SEGMENTED_TO_VIRTUAL(D_800D2F98[gCurrentLevel]); + sEnvironment = SEGMENTED_TO_VIRTUAL(D_800D2F98[gCurrentLevel]); } if (D_ctx_8017782C == 0) { if (gCurrentLevel == LEVEL_SOLAR) { @@ -502,28 +502,28 @@ void func_play_800A594C(void) { Audio_KillSfxBySourceAndId(gPlayer[0].sfxSource, 0x3140807E); } } else if (gCurrentLevel == LEVEL_AQUAS) { - sEnvSettings = SEGMENTED_TO_VIRTUAL(&D_AQ_602E584); + sEnvironment = SEGMENTED_TO_VIRTUAL(&D_AQ_602E584); } - gBgmSeqId = sEnvSettings->seqId; - gLevelType = sEnvSettings->type; - D_ctx_801784AC = sEnvSettings->unk_04; - gBgColor = sEnvSettings->bgColor; - gFogRed = sEnvSettings->fogR; - gFogGreen = sEnvSettings->fogG; - gFogBlue = sEnvSettings->fogB; - gFogNear = sEnvSettings->fogN; - gFogFar = sEnvSettings->fogF; - gLight1R = gLight2R = D_ctx_80161A70 = sEnvSettings->lightR; - gLight1G = gLight2G = D_ctx_80161A74 = sEnvSettings->lightG; - gLight1B = gLight2B = D_ctx_80161A78 = sEnvSettings->lightB; - gAmbientR = sEnvSettings->ambR; - gAmbientG = sEnvSettings->ambG; - gAmbientB = sEnvSettings->ambB; - D_ctx_801784D0 = D_ctx_801784F8 = D_ctx_80178520 = D_ctx_801784B8 = D_ctx_801784C4 = sEnvSettings->unk_20.x; - D_ctx_801784D4 = D_ctx_801784FC = D_ctx_80178524 = D_ctx_801784BC = D_ctx_801784C8 = sEnvSettings->unk_20.y; - D_ctx_801784D8 = D_ctx_80178500 = D_ctx_80178528 = D_ctx_801784C0 = D_ctx_801784CC = sEnvSettings->unk_20.z; + gBgmSeqId = sEnvironment->seqId; + gLevelType = sEnvironment->type; + gGroundType = sEnvironment->unk04; + gBgColor = sEnvironment->bgColor; + gFogRed = sEnvironment->fogR; + gFogGreen = sEnvironment->fogG; + gFogBlue = sEnvironment->fogB; + gFogNear = sEnvironment->fogN; + gFogFar = sEnvironment->fogF; + gLight1R = gLight2R = D_ctx_80161A70 = sEnvironment->lightR; + gLight1G = gLight2G = D_ctx_80161A74 = sEnvironment->lightG; + gLight1B = gLight2B = D_ctx_80161A78 = sEnvironment->lightB; + gAmbientR = sEnvironment->ambR; + gAmbientG = sEnvironment->ambG; + gAmbientB = sEnvironment->ambB; + gEnvLightxRot = gLight2xRotTarget = D_ctx_80178520 = gLight1xRot = gLight1xRotTarget = sEnvironment->lightDir.x; + gEnvLightyRot = gLight2yRotTarget = D_ctx_80178524 = gLight1yRot = gLight1yRotTarget = sEnvironment->lightDir.y; + gEnvLightzRot = gLight2zRotTarget = D_ctx_80178528 = gLight1zRot = gLight1zRotTarget = sEnvironment->lightDir.z; gProjectFar = 12800.0f; - D_ctx_80178540 = 40; + gLight2colorStep = 40; D_ctx_80178544 = 40; gFovY = 45.0f; } @@ -779,14 +779,14 @@ bool func_play_800A6A74(void) { void Player_DamageWings(Player* player, s32 side, s32 damage) { if ((player->form == FORM_ARWING) && (gShieldAlpha[player->num] < 1.0f)) { if (side == 1) { - D_ctx_80177D40[player->num] = 30; + gRightWingFlashTimer[player->num] = 30; if (player->wings.rightState == WINGSTATE_INTACT) { gRightWingHealth[player->num] -= damage; if (gRightWingHealth[player->num] <= 0) { func_play_800A69F8(1, player->hit1.x, player->hit1.y, player->hit1.z); player->wings.rightState = WINGSTATE_BROKEN; func_effect_8007D0E0(player->hit1.x, player->hit1.y, player->hit1.z, 2.0f); - D_ctx_80177D70[player->num] = 50; + gRightWingDebrisTimer[player->num] = 50; func_play_800A5FA0(player->sfxSource, 0x0900A02C, player->num); if (gAllRangeWingRepairTimer == 0) { gAllRangeWingRepairTimer = 1000; @@ -794,14 +794,14 @@ void Player_DamageWings(Player* player, s32 side, s32 damage) { } } } else if (side == 2) { - D_ctx_80177D58[player->num] = 30; + gLeftWingFlashTimer[player->num] = 30; if (player->wings.leftState == WINGSTATE_INTACT) { gLeftWingHealth[player->num] -= damage; if (gLeftWingHealth[player->num] <= 0) { func_play_800A69F8(0, player->hit2.x, player->hit2.y, player->hit2.z); player->wings.leftState = WINGSTATE_BROKEN; func_effect_8007D0E0(player->hit2.x, player->hit2.y, player->hit2.z, 2.0f); - D_ctx_80177D88[player->num] = 50; + gLeftWingDebrisTimer[player->num] = 50; func_play_800A5FA0(player->sfxSource, 0x0900A02C, player->num); if (gAllRangeWingRepairTimer == 0) { gAllRangeWingRepairTimer = 1000; @@ -833,7 +833,7 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) { player->unk_284 = 0; player->unk_1F4 = 20; if (player->unk_1A4 > 40) { - sp34 = (player->unk_110 * 0.3f) + 20.0f; + sp34 = (player->boostSpeed * 0.3f) + 20.0f; player->timer_498 = 5; } else if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gBossActive == 0)) { player->timer_498 = 3; @@ -951,7 +951,7 @@ void func_play_800A729C(Player* player, u32 arg1, f32 arg2, f32 arg3) { if (player->form == FORM_LANDMASTER) { player->pos.x -= D_800D2FEC[player->unk_21C]; } - Math_SmoothStepToF(&player->unk_0D0, 2.0f, 1.0f, 2.0f, 0.00001f); + Math_SmoothStepToF(&player->baseSpeed, 2.0f, 1.0f, 2.0f, 0.00001f); break; case 3: case 4: @@ -962,7 +962,7 @@ void func_play_800A729C(Player* player, u32 arg1, f32 arg2, f32 arg3) { player->pos.z += D_800D2FEC[player->unk_21C]; } player->unk_138 = player->pos.z; - Math_SmoothStepToF(&player->unk_0D0, 2.0f, 1.0f, 2.0f, 0.00001f); + Math_SmoothStepToF(&player->baseSpeed, 2.0f, 1.0f, 2.0f, 0.00001f); break; case 0: case 5: @@ -1582,12 +1582,12 @@ void func_play_800A8BA4(Player* player) { f32 sp8C; func_play_800A887C(player); - if (D_ctx_801784AC == 4) { + if (gGroundType == 4) { switch (player->form) { case FORM_LANDMASTER: func_tank_800444BC(player); break; - case FORM_BLUE_MARINE: + case FORM_BLUE_MARINE: // This should probably be FORM_ON_FOOT if (Ground_801B6AEC(player->pos.x, player->pos.y - 12.0f, player->unk_138 + player->unk_144)) { Ground_801B6E20(player->pos.x, player->unk_138 + player->unk_144, &spE8, &spE0, &spE4); player->pos.y = spE0 + 10.0f; @@ -1596,9 +1596,9 @@ void func_play_800A8BA4(Player* player) { } } else if (player->form == FORM_ARWING) { if ((player->hit1.y < (gGroundHeight + 13.0f)) && (player->state_1C8 != PLAYERSTATE_1C8_DOWN)) { - if (gGroundType == GROUNDTYPE_WATER) { + if (gGroundSurface == SURFACE_WATER) { player->unk_1F4 = 7; - player->unk_0E4 = (player->unk_0D0 + player->unk_110) * 0.5f; + player->unk_0E4 = (player->baseSpeed + player->boostSpeed) * 0.5f; } else { Player_ApplyDamage(player, 1, 21); } @@ -1609,9 +1609,9 @@ void func_play_800A8BA4(Player* player) { } } if ((player->hit2.y < (gGroundHeight + 13.0f)) && (player->state_1C8 != PLAYERSTATE_1C8_DOWN)) { - if (gGroundType == GROUNDTYPE_WATER) { + if (gGroundSurface == SURFACE_WATER) { player->unk_1F4 = 7; - player->unk_0E4 = (player->unk_0D0 + player->unk_110) * 0.5f; + player->unk_0E4 = (player->baseSpeed + player->boostSpeed) * 0.5f; } else { Player_ApplyDamage(player, 2, 21); } @@ -1769,10 +1769,10 @@ void func_play_800A8BA4(Player* player) { if (temp_v0 != 0) { if (temp_v0 < 0) { if (temp_v0 == -1) { - D_ctx_80178540 = 40; - D_ctx_80178570 = 20; - D_ctx_80178574 = 20; - D_ctx_80178578 = 20; + gLight2colorStep = 40; + gLight2RTarget = 20; + gLight2GTarget = 20; + gLight2BTarget = 20; player->shadowing = 80; } if (player->whooshTimer == 0) { @@ -1795,7 +1795,7 @@ void func_play_800A8BA4(Player* player) { if ((scenery->obj.id == OBJ_SCENERY_48) || (scenery->obj.id == OBJ_SCENERY_55) || (scenery->obj.id == OBJ_SCENERY_49)) { Matrix_RotateY(gCalcMatrix, scenery->obj.rot.y * M_DTOR, MTXF_NEW); - spC8.x = -(player->unk_0D0 + player->unk_110) * 0.7f; + spC8.x = -(player->baseSpeed + player->boostSpeed) * 0.7f; spC8.y = 0.0f; spC8.z = 0.0f; @@ -1850,7 +1850,7 @@ void func_play_800A8BA4(Player* player) { spfD4.z = fabsf(boss->obj.pos.z - player->unk_138) * 0.8333333f; if ((VEC3F_MAG(&spfD4)) < 1500.0f) { Player_ApplyDamage(player, 0, boss->info.damage); - player->unk_110 = 0.0f; + player->boostSpeed = 0.0f; player->timer_498 = 5; player->unk_0D8.y = 30.0f; boss->dmgType = DMG_BEAM; @@ -1943,7 +1943,7 @@ void func_play_800A8BA4(Player* player) { if (gRingPassCount == 3) { Radio_PlayMessage(gMsg_ID_5504, RCID_FALCO); } - AUDIO_PLAY_SFX(D_enmy_800CFF54[gRingPassCount], gPlayer[0].sfxSource, 0); + AUDIO_PLAY_SFX(gWarpRingSfx[gRingPassCount], gPlayer[0].sfxSource, 0); AUDIO_PLAY_SFX(0x49008025, gDefaultSfxSource, 4); } } else if (temp_v0 < 0) { @@ -2061,7 +2061,7 @@ void func_play_800A8BA4(Player* player) { player->unk_0D8.z = (player->unk_138 - opponent->unk_138) * 0.5f; opponent->unk_0D8.x = -player->unk_0D8.x; opponent->unk_0D8.z = -player->unk_0D8.z; - opponent->unk_0D0 = player->unk_0D0 = 2.0f; + opponent->baseSpeed = player->baseSpeed = 2.0f; } else { func_play_800A8804(player, opponent); func_play_800A8804(opponent, player); @@ -2073,7 +2073,7 @@ void func_play_800A8BA4(Player* player) { if (D_ctx_80178294 != 0) { if (func_play_800A73E4(&sp94, &sp90, player->hit4.x, player->hit4.y, player->hit4.z)) { if (gCurrentLevel == LEVEL_ZONESS) { - player->unk_0E4 = (player->unk_0D0 + player->unk_110) * 0.8f; + player->unk_0E4 = (player->baseSpeed + player->boostSpeed) * 0.8f; player->unk_1F4 = 15; func_effect_8007B228(player->hit4.x, sp94, player->hit4.z, 1.0f); } else { @@ -2081,7 +2081,7 @@ void func_play_800A8BA4(Player* player) { Player_ApplyDamage(player, 4, 10); } player->unk_0D8.y = 30.0f; - player->unk_0E4 = (player->unk_0D0 + player->unk_110) * 0.8f; + player->unk_0E4 = (player->baseSpeed + player->boostSpeed) * 0.8f; } if (player->state_1C8 == PLAYERSTATE_1C8_DOWN) { player->timer_220 = 2; @@ -2152,7 +2152,7 @@ void func_play_800AA800(Player* player) { if (player->unk_240 == 0) { player->unk_064 = player->pos.x; player->unk_06C = player->unk_138 - player->pos.y; - if (D_ctx_801784AC != 4) { + if (gGroundType != 4) { if (gCamCount == 1) { player->unk_068 = gGroundHeight + 3.0f; } else { @@ -2383,7 +2383,7 @@ void func_play_800AB334(void) { switch (gCurrentLevel) { case LEVEL_TRAINING: AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_28); - D_ctx_8017796C = -1; + gTeamLowHealthMsgTimer = -1; break; case LEVEL_VENOM_1: AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_6); @@ -2394,7 +2394,7 @@ void func_play_800AB334(void) { case LEVEL_VENOM_ANDROSS: AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_15); Audio_SetEnvSfxReverb(0); - D_ctx_8017796C = -1; + gTeamLowHealthMsgTimer = -1; break; } D_ctx_80178294 = 0; @@ -2514,7 +2514,7 @@ void func_play_800AB964(void) { s32 i; s32 j; - D_versus_80178754 = 0; + gVsMatchState = 0; for (i = 0; i < 4; i++) { D_ctx_80177DB8[i] = 0; for (j = 0; j < 10; j++) { @@ -2543,7 +2543,7 @@ void func_play_800ABA08(void) { void Play_Init(void) { s32 i; - D_play_80161A54 = 40.0f; + gArwingSpeed = 40.0f; for (i = 0; i < 4; i++) { gControllerRumbleEnabled[i] = 0; } @@ -2574,7 +2574,7 @@ void Play_Init(void) { D_display_800CA230 = D_800D2F58 = 0.0f; gLevelMode = LEVELMODE_ON_RAILS; D_ctx_80177CE8 = D_bg_8015F968 = 0.0f; - D_hud_800D1970 = gVersusMode = D_ctx_80178300 = gChangeTo360 = 0; + D_hud_800D1970 = gVersusMode = gHideRadio = gChangeTo360 = 0; if (gCurrentLevel >= LEVEL_FORTUNA) { gLevelMode = LEVELMODE_ALL_RANGE; if (gCurrentLevel == LEVEL_VERSUS) { @@ -2587,14 +2587,14 @@ void Play_Init(void) { } D_ctx_80177E7C = 0; func_play_800A594C(); - gDropHitCountItem = D_ctx_8017796C = gStartAndrossFightTimer = gSoShieldsEmpty = gAllRangeEventTimer = + gDropHitCountItem = gTeamLowHealthMsgTimer = gStartAndrossFightTimer = gSoShieldsEmpty = gAllRangeEventTimer = gAllRangeFrameCount = gBossActive = gGameFrameCount = gCameraShake = D_ctx_801782FC = gBossFrameCount = gCallTimer = gAllRangeSupplyTimer = gMissionStatus = 0; if (gCurrentLevel == LEVEL_SECTOR_X) { gMissionStatus = MISSION_ACCOMPLISHED; } - D_ctx_80177CC0 = -25000.0f; + gWaterLevel = -25000.0f; D_ctx_80177950 = 1.0f; if ((gCurrentLevel == LEVEL_VENOM_2) && (gLevelPhase == 2)) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; @@ -2622,8 +2622,8 @@ void Play_Init(void) { gStarCount = 0; } gFogAlpha = 255; - D_ctx_801784E8 = 5.0f; - D_ctx_80178510 = 5.0f; + gLight1rotStep = 5.0f; + gLight2rotStep = 5.0f; D_ctx_80178538 = 5.0f; Play_ClearObjectData(); D_ctx_801782C8 = 0; @@ -2631,7 +2631,7 @@ void Play_Init(void) { Ground_801B5110(0.0f, 0.0f, 200.0f); } if (gCurrentLevel == LEVEL_AQUAS) { - D_ctx_80177CC0 = 1000.0f; + gWaterLevel = 1000.0f; } gLoadLevelObjects = false; gCamCount = 1; @@ -2694,7 +2694,7 @@ void Play_Init(void) { break; case LEVEL_VERSUS: func_play_800A4F7C(); - D_ctx_8017796C = -1; + gTeamLowHealthMsgTimer = -1; break; } } @@ -3232,13 +3232,13 @@ void func_play_800ADF58(Player* player) { D_ctx_80177D08 = -player->vel.z; D_ctx_80177D20 = player->unk_144; D_ctx_80177CE8 += player->unk_140; - if (D_ctx_801784AC == 4) { + if (gGroundType == 4) { D_ctx_80177CC8 = player->unk_140; } if ((gBossActive == 0) && (player->unk_144 > 500000.0f)) { player->unk_144 = 0.0f; player->pos.z = 0.0f; - D_ctx_80177DC8 = 0; + gObjectLoadIndex = 0; Play_ClearObjectData(); } player->unk_138 = player->pos.z + player->unk_08C; @@ -3430,7 +3430,7 @@ void func_play_800AE4A4(Player* player) { sp4C.x += 2.5f; sp4C.y -= 2.5f; } - sp4C.z = player->unk_0D0 + player->unk_110; + sp4C.z = player->baseSpeed + player->boostSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp4C, &sp40); player->vel.x = sp40.x; player->vel.z = sp40.z; @@ -3513,7 +3513,7 @@ void func_play_800AECAC(Player* player) { Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); sp4C.x = 0.0f; sp4C.y = 0.0f; - sp4C.z = player->unk_0D0; + sp4C.z = player->baseSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp4C, &sp40); player->vel.x = sp40.x; player->vel.z = sp40.z; @@ -3644,7 +3644,7 @@ void func_play_800AF07C(Player* player) { sp68.x = 0.0f; sp68.y = 0.0f; - sp68.z = player->unk_0D0; + sp68.z = player->baseSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp68, &sp44); @@ -3657,7 +3657,7 @@ void func_play_800AF07C(Player* player) { sp68.x = 0.0f; sp68.y = 0.0f; - sp68.z = -player->unk_110; + sp68.z = -player->boostSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp68, &sp50); @@ -3670,7 +3670,7 @@ void func_play_800AF07C(Player* player) { } sp68.x = 0.0f; sp68.y = 0.0f; - sp68.z = -player->unk_110; + sp68.z = -player->boostSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp68, &sp50); @@ -3791,17 +3791,17 @@ void func_play_800AF928(Player* player) { Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_APPLY); sp44.x = 0.0f; sp44.y = 0.0f; - sp44.z = player->unk_0D0; - sp44.z -= fabsf((player->unk_184 * 0.4f * player->unk_0D0) / 15.0f); - sp44.z += SIN_DEG(player->unk_000) * player->unk_110; + sp44.z = player->baseSpeed; + sp44.z -= fabsf((player->unk_184 * 0.4f * player->baseSpeed) / 15.0f); + sp44.z += SIN_DEG(player->unk_000) * player->boostSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); player->vel.x = sp38.x; player->vel.z = sp38.z; if (player->unk_16C > 0.2f) { - Math_SmoothStepToF(&player->unk_184, player->unk_0D0 * 0.5f, 1.0f, 1.0f, 0); + Math_SmoothStepToF(&player->unk_184, player->baseSpeed * 0.5f, 1.0f, 1.0f, 0); } if (player->unk_170 > 0.2f) { - Math_SmoothStepToF(&player->unk_184, -player->unk_0D0 * 0.5f, 1.0f, 1.0f, 0); + Math_SmoothStepToF(&player->unk_184, -player->baseSpeed * 0.5f, 1.0f, 1.0f, 0); } if (!(player->unk_170 > 0.2f) && !(player->unk_16C > 0.2f) && (player->unk_1D4 != 0)) { Math_SmoothStepToF(&player->unk_184, 0.0f, 1.0f, 0.75f, 0.0f); @@ -3848,7 +3848,7 @@ void func_play_800AF928(Player* player) { player->unk_138 = player->pos.z; player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; if (player->unk_1D4 != 0) { - player->unk_0F4 += player->unk_0D0 * 5.0f; + player->unk_0F4 += player->baseSpeed * 5.0f; player->unk_0F0 = SIN_DEG(player->unk_0F4) * 0.7f; } func_play_800A46A0(player); @@ -3867,7 +3867,7 @@ void func_play_800B00C0(Player* player) { sp28 = D_800D30F4[gPlayerNum]; sp24 = D_800D3104[gPlayerNum]; } - Math_SmoothStepToF(&player->unk_0D0, sp2C, 1.0f, 1.0f, 0.00001f); + Math_SmoothStepToF(&player->baseSpeed, sp2C, 1.0f, 1.0f, 0.00001f); Math_SmoothStepToF(&player->unk_008, sp28, 0.1f, sp24, 0.00001f); } @@ -3907,7 +3907,7 @@ void func_play_800B0194(Player* player) { sp74 = gInputPress->stick_x; sp70 = gInputPress->stick_y; Math_SmoothStepToF(&player->unk_0E8, -sp74 * D_ctx_80177970 * 0.6f, 0.5f, D_ctx_80177968, 0.001f); - Math_SmoothStepToF(&player->unk_0EC, -sp74 * D_ctx_80177970 * 0.2f * player->unk_0D0 / 15.0f, 0.2f, 5.0f, 0.001f); + Math_SmoothStepToF(&player->unk_0EC, -sp74 * D_ctx_80177970 * 0.2f * player->baseSpeed / 15.0f, 0.2f, 5.0f, 0.001f); player->unk_0F8 = player->unk_0EC; if ((sp74 != 0.0f) || (sp70 != 0.0f)) { Math_SmoothStepToF(&player->unk_15C, sp74 * D_ctx_80177970, 0.9f, 2.0f * D_ctx_80177968, 0.1f); @@ -3928,7 +3928,7 @@ void func_play_800B0194(Player* player) { Math_SmoothStepToF(&player->unk_168, player->unk_178, 0.1f, 10.0f, 0.00001f); } player->unk_108 = player->unk_0E8; - if (player->unk_0D0 < 1.5f) { + if (player->baseSpeed < 1.5f) { var_fv0 = 0.12f; var_fa0 = 3.0f; } else { @@ -3943,7 +3943,7 @@ void func_play_800B0194(Player* player) { Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_APPLY); sp58.x = 0.0f; sp58.y = 0.0f; - sp58.z = player->unk_0D0; + sp58.z = player->baseSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp58, &sp4C); player->vel.x = sp4C.x; player->vel.z = sp4C.z; @@ -3955,7 +3955,7 @@ void func_play_800B0194(Player* player) { Math_SmoothStepToAngle(&player->unk_0FC, player->unk_104, 0.15f, 15.0f, 0.005f); Math_SmoothStepToAngle(&player->unk_100, player->unk_10C, 0.15f, 15.0f, 0.005f); if (player->unk_1D4 != 0) { - if (player->unk_0D0 > 1.0f) { + if (player->baseSpeed > 1.0f) { player->unk_00C += player->unk_008; if ((s32) player->unk_00C >= Animation_GetFrameCount(&D_versus_301CFEC)) { player->unk_00C = 0.0f; @@ -3984,9 +3984,9 @@ void func_play_800B0194(Player* player) { if (player->unk_010 < 50.0f) { player->unk_010 += 2.0f; } - sp64 = player->unk_0D0; + sp64 = player->baseSpeed; if (gGameFrameCount & 4) { - sp64 = 2.0f * player->unk_0D0; + sp64 = 2.0f * player->baseSpeed; } Math_SmoothStepToF(&player->unk_164, sp64, 0.5f, 20.0f, 0.0001f); Math_SmoothStepToF(&player->unk_168, sp64, 0.5f, 20.0f, 0.0001f); @@ -4104,13 +4104,14 @@ void func_play_800B0F50(Player* playerx) { D_Timer_80177A88[gPlayerNum] = gShieldTimer[gPlayerNum] = gHasShield[gPlayerNum] = gChargeTimers[gPlayerNum] = gVsLockOnTimers[gPlayerNum][0] = gVsLockOnTimers[gPlayerNum][1] = gVsLockOnTimers[gPlayerNum][2] = gVsLockOnTimers[gPlayerNum][3] = 0; - D_ctx_80177D40[gPlayerNum] = D_ctx_80177D58[gPlayerNum] = D_ctx_80177D70[gPlayerNum] = D_ctx_80177D88[gPlayerNum] = - D_ctx_80177990[gPlayerNum] = D_ctx_801779A8[gPlayerNum] = D_ctx_80177AA0[gPlayerNum] = 0.0f; + gRightWingFlashTimer[gPlayerNum] = gLeftWingFlashTimer[gPlayerNum] = gRightWingDebrisTimer[gPlayerNum] = + gLeftWingDebrisTimer[gPlayerNum] = D_ctx_80177990[gPlayerNum] = D_ctx_801779A8[gPlayerNum] = + D_ctx_80177AA0[gPlayerNum] = 0.0f; gShieldAlpha[gPlayerNum] = 0.0f; player->unk_190 = 1.0f; player->unk_194 = 1.0f; - gRadioState = D_ctx_80177D68 = D_ctx_801782A4 = 0; - D_ctx_8017853C = D_ctx_80177D50 = 0.0f; + gRadioState = gRadioMsgRadioId = gCurrentRadioPortrait = 0; + D_ctx_8017853C = gRadioTextBoxScaleY = 0.0f; player->cam.eye.z = 400.0f; player->unk_148 = 0.77699995f; player->unk_14C = 0.77699995f; @@ -4134,7 +4135,7 @@ void func_play_800B0F50(Player* playerx) { player->unk_0A4 = gGroundHeight + 40.0f; player->unk_0A8 = 3000.0f; } - player->unk_0D0 = D_play_80161A54; + player->baseSpeed = gArwingSpeed; player->pos.y = 350.0f; switch (gCurrentLevel) { case LEVEL_MACBETH: @@ -4143,7 +4144,7 @@ void func_play_800B0F50(Player* playerx) { player->unk_014 = 1.0f; player->unk_14C = 0.67f; player->unk_148 = 0.67f; - player->unk_0D0 = 15.0f; + player->baseSpeed = 15.0f; player->unk_0D4 = 3.0f; player->unk_09C = 500.0f; player->unk_0A0 = 500.0f; @@ -4158,7 +4159,7 @@ void func_play_800B0F50(Player* playerx) { player->form = FORM_BLUE_MARINE; player->unk_0D4 = 0.0f; player->unk_09C = 700.0f; - player->unk_0D0 = 20.0f; + player->baseSpeed = 20.0f; player->unk_0A0 = 720.0f; player->unk_0A4 = gGroundHeight + 30.0f; break; @@ -4168,7 +4169,7 @@ void func_play_800B0F50(Player* playerx) { break; } if (gCurrentLevel != LEVEL_CORNERIA) { - gSavedGroundType = GROUNDTYPE_GRASS; + gSavedGroundSurface = SURFACE_GRASS; } gGoldRingCount[0] = D_ctx_80161A94[0]; do { @@ -4201,15 +4202,15 @@ void func_play_800B0F50(Player* playerx) { gDisplayedHitCount = gHitCount; D_hud_80161730 = 0; gMissedZoSearchlight = gSavedZoSearchlightStatus; - D_ctx_80177DC8 = D_ctx_80177CA0; - gGroundType = gSavedGroundType; + gObjectLoadIndex = gSavedObjectLoadIndex; + gGroundSurface = gSavedGroundSurface; D_ctx_80177D20 = player->unk_144 = D_ctx_80177CB0; player->pos.z = player->unk_138 = -player->unk_144; - if ((D_ctx_80177CA0 > 0) && (gLevelMode == LEVELMODE_ON_RAILS)) { + if ((gSavedObjectLoadIndex > 0) && (gLevelMode == LEVELMODE_ON_RAILS)) { if (gCurrentLevel == LEVEL_MACBETH) { - sp2E = D_ctx_80177DC8; + sp2E = gObjectLoadIndex; Macbeth_801AD080(); - D_ctx_80177DC8 = sp2E; + gObjectLoadIndex = sp2E; } func_enmy_80062568(); } @@ -4234,12 +4235,12 @@ void func_play_800B0F50(Player* playerx) { break; case FORM_LANDMASTER: player->pos.y = 0.0f; - player->unk_0D0 = 15.0f; + player->baseSpeed = 15.0f; player->unk_0D4 = 3.0f; break; case FORM_ON_FOOT: player->pos.y = 0.0f; - player->unk_0D0 = 15.0f; + player->baseSpeed = 15.0f; player->unk_068 = 0; switch (gPlayerNum) { case 0: @@ -4282,7 +4283,7 @@ void func_play_800B0F50(Player* playerx) { player->unk_014 = 1.0f; player->unk_018 = 1.0f; } - if ((D_ctx_8017782C != 0) && (D_ctx_80177CA0 == 0)) { + if ((D_ctx_8017782C != 0) && (gSavedObjectLoadIndex == 0)) { gLeveLClearStatus[gCurrentLevel] = 0; for (j = 0; j < 10; j++) { D_ctx_80177A10[j] = 0; @@ -4294,7 +4295,7 @@ void func_play_800B0F50(Player* playerx) { case LEVEL_CORNERIA: player->state_1C8 = PLAYERSTATE_1C8_LEVEL_INTRO; player->unk_204 = 1; - gGroundType = gSavedGroundType = GROUNDTYPE_WATER; + gGroundSurface = gSavedGroundSurface = SURFACE_WATER; func_play_800A3FB0(); break; case LEVEL_BOLSE: @@ -4329,13 +4330,13 @@ void func_play_800B0F50(Player* playerx) { D_ctx_80177A98 = 1; } - if ((gCurrentLevel == LEVEL_MACBETH) && (D_ctx_80177CA0 == 0)) { + if ((gCurrentLevel == LEVEL_MACBETH) && (gSavedObjectLoadIndex == 0)) { player->pos.z = -4115.0f; D_ctx_80177D20 = player->unk_144 = 3932.0f; - D_ctx_80177DC8 = 40; + gObjectLoadIndex = 40; gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]); - for (objInit = gLevelObjects, i = 0; i < D_ctx_80177DC8; i++, objInit++) { + for (objInit = gLevelObjects, i = 0; i < gObjectLoadIndex; i++, objInit++) { Object_Load(objInit, 4000.0f, -4000.0f, 4000.0f, -4000.0f); } Macbeth_801ACFBC(); @@ -4636,7 +4637,7 @@ void func_play_800B2574(Player* player) { if (gRingPassCount > 0) { Math_SmoothStepToF(&D_ctx_801779A8[player->num], gRingPassCount * 10.0f, 1.0f, 5.0f, 0.0f); } - player->unk_110 += 0.3f; + player->boostSpeed += 0.3f; Math_SmoothStepToF(&player->unk_08C, -130.0f, 0.2f, 10.0f, 0.0f); player->unk_130 -= player->unk_258; player->unk_258 = player->unk_258 + 0.2f; @@ -4688,9 +4689,9 @@ void func_play_800B2574(Player* player) { player->unk_25C = 0.6f; } player->unk_190 = 2.0f; - player->unk_110 += 2.0f; - if (player->unk_110 > 30.0f) { - player->unk_110 = 30.0f; + player->boostSpeed += 2.0f; + if (player->boostSpeed > 30.0f) { + player->boostSpeed = 30.0f; } Math_SmoothStepToF(&player->unk_08C, -400.0f, 0.1f, 30.0f, 0.0f); player->sfx.boost = 1; @@ -4703,10 +4704,10 @@ void func_play_800B2574(Player* player) { player->boostCooldown = false; } } - if (player->unk_110 > 0.0f) { - player->unk_110 -= 1.0f; - if (player->unk_110 < 0.0f) { - player->unk_110 = 0.0f; + if (player->boostSpeed > 0.0f) { + player->boostSpeed -= 1.0f; + if (player->boostSpeed < 0.0f) { + player->boostSpeed = 0.0f; } } } @@ -4775,9 +4776,9 @@ void func_play_800B2C00(Player* player) { player->boostMeter = 90.0f; } player->unk_190 = 0.3f; - player->unk_110 -= 1.0f; - if (player->unk_110 < -20.0f) { - player->unk_110 = -20.0f; + player->boostSpeed -= 1.0f; + if (player->boostSpeed < -20.0f) { + player->boostSpeed = -20.0f; } Math_SmoothStepToF(&player->unk_08C, 180.0f, 0.1f, 10.0f, 0.0f); player->sfx.brake = 1; @@ -4788,10 +4789,10 @@ void func_play_800B2C00(Player* player) { player->boostMeter = 0.0f; player->boostCooldown = false; } - if (player->unk_110 < 0.0f) { - player->unk_110 += 0.5f; - if (player->unk_110 > 0.0f) { - player->unk_110 = 0.0f; + if (player->boostSpeed < 0.0f) { + player->boostSpeed += 0.5f; + if (player->boostSpeed > 0.0f) { + player->boostSpeed = 0.0f; } } } @@ -4839,7 +4840,7 @@ void func_play_800B3010(Player* player) { player->boostCooldown = true; } } - Math_SmoothStepToF(&player->unk_0D0, sp2C, 0.1f, 2.0f, 0.001f); + Math_SmoothStepToF(&player->baseSpeed, sp2C, 0.1f, 2.0f, 0.001f); } void func_play_800B3314(Player* player) { @@ -4907,7 +4908,7 @@ void func_play_800B3314(Player* player) { Math_SmoothStepToAngle(&player->unk_0EC, 0.0f, 0.05f, 5.0f, 0.00001f); temp = gInputPress->stick_y; Math_SmoothStepToF(&player->unk_000, temp * 0.5f, 0.05f, 5.0f, 0.00001f); - Math_SmoothStepToF(&player->unk_110, 30.0f, 0.5f, 5.0f, 0.0f); + Math_SmoothStepToF(&player->boostSpeed, 30.0f, 0.5f, 5.0f, 0.0f); player->unk_0D4 = -0.4f; Math_SmoothStepToF(&D_ctx_801779A8[player->num], 30.0f, 1.0f, 10.0f, 0.0f); if ((gCamCount == 1) && ((gGameFrameCount % 2) == 0)) { @@ -4959,23 +4960,23 @@ void func_play_800B39E0(Player* player) { } } } - if (D_ctx_80177D40[player->num] != 0) { - D_ctx_80177D40[player->num]--; - if (D_ctx_80177D40[player->num] == 1000) { - D_ctx_80177D40[player->num] = 0; + if (gRightWingFlashTimer[player->num] != 0) { + gRightWingFlashTimer[player->num]--; + if (gRightWingFlashTimer[player->num] == 1000) { + gRightWingFlashTimer[player->num] = 0; } } - if (D_ctx_80177D58[player->num] != 0) { - D_ctx_80177D58[player->num]--; - if (D_ctx_80177D58[player->num] == 1000) { - D_ctx_80177D58[player->num] = 0; + if (gLeftWingFlashTimer[player->num] != 0) { + gLeftWingFlashTimer[player->num]--; + if (gLeftWingFlashTimer[player->num] == 1000) { + gLeftWingFlashTimer[player->num] = 0; } } - if (D_ctx_80177D88[player->num] != 0) { - D_ctx_80177D88[player->num]--; + if (gLeftWingDebrisTimer[player->num] != 0) { + gLeftWingDebrisTimer[player->num]--; } - if (D_ctx_80177D70[player->num] != 0) { - D_ctx_80177D70[player->num]--; + if (gRightWingDebrisTimer[player->num] != 0) { + gRightWingDebrisTimer[player->num]--; } if (gShieldTimer[player->num] != 0) { gShieldTimer[player->num]--; @@ -5028,7 +5029,7 @@ void func_play_800B39E0(Player* player) { player->boostCooldown = true; player->unk_0E4 = 0; player->unk_0E8 = 0; - Math_SmoothStepToF(&player->unk_110, 0, 1.0f, 5.0f, 0); + Math_SmoothStepToF(&player->boostSpeed, 0, 1.0f, 5.0f, 0); } if (player->unk_1F4 == 0) { player->unk_134 = 0; @@ -5247,10 +5248,10 @@ void func_play_800B44C4(Player* player) { void func_play_800B46F8(Player* player) { s32 teamId; - if ((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (D_ctx_8017796C >= 0)) { - D_ctx_8017796C++; - if (D_ctx_8017796C > 32 * 30) { - D_ctx_8017796C = 0; + if ((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (gTeamLowHealthMsgTimer >= 0)) { + gTeamLowHealthMsgTimer++; + if (gTeamLowHealthMsgTimer > 32 * 30) { + gTeamLowHealthMsgTimer = 0; if (1) {} if ((player->shields < 64) && ((gTeamShields[TEAM_ID_FALCO] > 0) || (gTeamShields[TEAM_ID_PEPPY] > 0) || (gTeamShields[TEAM_ID_SLIPPY] > 0))) { @@ -5925,7 +5926,7 @@ void func_play_800B6BFC(Player* player, s32 arg1) { player->unk_134 * 0.1f; player->cam.at.z = player->pos.z; - Math_SmoothStepToF(&player->unk_028, player->unk_0E8 * (player->unk_0D0 + 5.0f) * 0.04f, 0.05f, 2.0f, 0.02f); + Math_SmoothStepToF(&player->unk_028, player->unk_0E8 * (player->baseSpeed + 5.0f) * 0.04f, 0.05f, 2.0f, 0.02f); sp64.x = -player->unk_028; sp64.y = 0.0f; sp64.z = 0.0f; @@ -6051,70 +6052,70 @@ void func_play_800B73E0(Player* player) { f32 pad; if ((gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) { - D_ctx_801784D4 = D_ctx_801784C8 = D_ctx_801784C8 = D_ctx_801784FC = D_ctx_801784C8 = 110.0f; + gEnvLightyRot = gLight1yRotTarget = gLight1yRotTarget = gLight2yRotTarget = gLight1yRotTarget = 110.0f; if (gGameFrameCount & 0x20) { - D_ctx_801784D4 = D_ctx_801784C8 = D_ctx_801784C8 = D_ctx_801784FC = D_ctx_801784C8 = 90.0f; + gEnvLightyRot = gLight1yRotTarget = gLight1yRotTarget = gLight2yRotTarget = gLight1yRotTarget = 90.0f; } - D_ctx_801784E8 = D_ctx_80178510 = D_ctx_80178538 = 1.0f; + gLight1rotStep = gLight2rotStep = D_ctx_80178538 = 1.0f; } - Math_SmoothStepToAngle(&D_ctx_801784B8, D_ctx_801784C4, 1.0f, D_ctx_801784E8, 0.0f); - Math_SmoothStepToAngle(&D_ctx_801784BC, D_ctx_801784C8, 1.0f, D_ctx_801784E8, 0.0f); - Math_SmoothStepToAngle(&D_ctx_801784C0, D_ctx_801784CC, 1.0f, D_ctx_801784E8, 0.0f); + Math_SmoothStepToAngle(&gLight1xRot, gLight1xRotTarget, 1.0f, gLight1rotStep, 0.0f); + Math_SmoothStepToAngle(&gLight1yRot, gLight1yRotTarget, 1.0f, gLight1rotStep, 0.0f); + Math_SmoothStepToAngle(&gLight1zRot, gLight1zRotTarget, 1.0f, gLight1rotStep, 0.0f); - if (gLight2R < D_ctx_80178570) { - gLight2R += D_ctx_80178540; - if (D_ctx_80178570 < gLight2R) { - gLight2R = D_ctx_80178570; + if (gLight2R < gLight2RTarget) { + gLight2R += gLight2colorStep; + if (gLight2RTarget < gLight2R) { + gLight2R = gLight2RTarget; } } - if (D_ctx_80178570 < gLight2R) { - gLight2R -= D_ctx_80178540; - if (gLight2R < D_ctx_80178570) { - gLight2R = D_ctx_80178570; + if (gLight2RTarget < gLight2R) { + gLight2R -= gLight2colorStep; + if (gLight2R < gLight2RTarget) { + gLight2R = gLight2RTarget; } } - if (gLight2G < D_ctx_80178574) { - gLight2G += D_ctx_80178540; - if (D_ctx_80178574 < gLight2G) { - gLight2G = D_ctx_80178574; + if (gLight2G < gLight2GTarget) { + gLight2G += gLight2colorStep; + if (gLight2GTarget < gLight2G) { + gLight2G = gLight2GTarget; } } - if (D_ctx_80178574 < gLight2G) { - gLight2G -= D_ctx_80178540; - if (gLight2G < D_ctx_80178574) { - gLight2G = D_ctx_80178574; + if (gLight2GTarget < gLight2G) { + gLight2G -= gLight2colorStep; + if (gLight2G < gLight2GTarget) { + gLight2G = gLight2GTarget; } } - if (gLight2B < D_ctx_80178578) { - gLight2B += D_ctx_80178540; - if (D_ctx_80178578 < gLight2B) { - gLight2B = D_ctx_80178578; + if (gLight2B < gLight2BTarget) { + gLight2B += gLight2colorStep; + if (gLight2BTarget < gLight2B) { + gLight2B = gLight2BTarget; } } - if (D_ctx_80178578 < gLight2B) { - gLight2B -= D_ctx_80178540; - if (gLight2B < D_ctx_80178578) { - gLight2B = D_ctx_80178578; + if (gLight2BTarget < gLight2B) { + gLight2B -= gLight2colorStep; + if (gLight2B < gLight2BTarget) { + gLight2B = gLight2BTarget; } } - Math_SmoothStepToAngle(&D_ctx_801784EC, D_ctx_801784F8, 1.0f, D_ctx_80178510, 0.0f); - Math_SmoothStepToAngle(&D_ctx_801784F0, D_ctx_801784FC, 1.0f, D_ctx_80178510, 0.0f); - Math_SmoothStepToAngle(&D_ctx_801784F4, D_ctx_80178500, 1.0f, D_ctx_80178510, 0.0f); - D_ctx_801784F8 = D_ctx_801784C4 = D_ctx_801784D0; - D_ctx_801784FC = D_ctx_801784C8 = D_ctx_801784D4; - D_ctx_80178500 = D_ctx_801784CC = D_ctx_801784D8; - D_ctx_801784E8 = 5.0f; - D_ctx_80178570 = gLight1R; - D_ctx_80178574 = gLight1G; - D_ctx_80178578 = gLight1B; + Math_SmoothStepToAngle(&gLight2xRot, gLight2xRotTarget, 1.0f, gLight2rotStep, 0.0f); + Math_SmoothStepToAngle(&gLight2yRot, gLight2yRotTarget, 1.0f, gLight2rotStep, 0.0f); + Math_SmoothStepToAngle(&gLight2zRot, gLight2zRotTarget, 1.0f, gLight2rotStep, 0.0f); + gLight2xRotTarget = gLight1xRotTarget = gEnvLightxRot; + gLight2yRotTarget = gLight1yRotTarget = gEnvLightyRot; + gLight2zRotTarget = gLight1zRotTarget = gEnvLightzRot; + gLight1rotStep = 5.0f; + gLight2RTarget = gLight1R; + gLight2GTarget = gLight1G; + gLight2BTarget = gLight1B; pad = player->camRoll; Matrix_RotateZ(gCalcMatrix, M_DTOR * pad, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -player->camPitch, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, player->camYaw, MTXF_APPLY); Matrix_Push(&gCalcMatrix); - Matrix_RotateX(gCalcMatrix, M_DTOR * D_ctx_801784B8, MTXF_APPLY); - Matrix_RotateY(gCalcMatrix, M_DTOR * D_ctx_801784BC, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, M_DTOR * D_ctx_801784C0, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, M_DTOR * gLight1xRot, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, M_DTOR * gLight1yRot, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, M_DTOR * gLight1zRot, MTXF_APPLY); sp44.x = 0.0f; sp44.y = 0.0f; sp44.z = 100.0f; @@ -6123,9 +6124,9 @@ void func_play_800B73E0(Player* player) { gLight1y = sp38.y; gLight1z = sp38.z; Matrix_Pop(&gCalcMatrix); - Matrix_RotateX(gCalcMatrix, M_DTOR * D_ctx_801784EC, MTXF_APPLY); - Matrix_RotateY(gCalcMatrix, M_DTOR * D_ctx_801784F0, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, M_DTOR * D_ctx_801784F4, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, M_DTOR * gLight2xRot, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, M_DTOR * gLight2yRot, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, M_DTOR * gLight2zRot, MTXF_APPLY); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); gLight2x = sp38.x; gLight2y = sp38.y; @@ -6462,7 +6463,7 @@ void Play_Main(void) { D_ctx_8017782C = 0; } if (gVersusMode) { - func_versus_800C1E9C(); + Versus_Main(); } if ((gControllerPress[gMainController].button & START_BUTTON) && gPauseEnabled) { Audio_PlayPauseSfx(1); diff --git a/src/engine/fox_radio.c b/src/engine/fox_radio.c index 307cf658..a4343464 100644 --- a/src/engine/fox_radio.c +++ b/src/engine/fox_radio.c @@ -19,36 +19,36 @@ #include "assets/ast_title.h" #include "assets/ast_zoness.h" -u16** D_radio_80178720; -s32 D_radio_80178724; -s32 D_radio_80178728; -s32 D_radio_8017872C; -f32 D_radio_80178730; -f32 D_radio_80178734; -f32 D_radio_80178738; -f32 D_radio_8017873C; -f32 D_radio_80178740; +u16** gRadioMsgList; +s32 gRadioMsgListIndex; +s32 gRadioPrintPosX; +s32 gRadioPrintPosY; +f32 gRadioTextBoxPosX; +f32 gRadioTextBoxPosY; +f32 gRadioTextBoxScaleX; +f32 gRadioPortraitPosX; +f32 gRadioPortraitPosY; -s32 gCurrentMsgPri = 0; +s32 gRadioMsgPri = 0; void func_radio_800BA760(void) { RCP_SetupDL_36(); - if (D_ctx_80177D50 == 1.3f) { - D_ctx_801782F8 = Message_IsPrintingChar(D_ctx_80178308, D_ctx_801782D8); + if (gRadioTextBoxScaleY == 1.3f) { + gMsgCharIsPrinting = Message_IsPrintingChar(gRadioMsg, gRadioMsgCharIndex); } } s32 func_radio_800BA7BC(u16* msg, s32 priority) { - if (priority == gCurrentMsgPri) { + if (priority == gRadioMsgPri) { return 0; } - if (priority < gCurrentMsgPri) { + if (priority < gRadioMsgPri) { return 1; } - if (gCurrentMsgPri < priority) { - gCurrentMsgPri = priority; + if (gRadioMsgPri < priority) { + gRadioMsgPri = priority; return 2; } } @@ -95,57 +95,57 @@ void Radio_PlayMessage(u16* msg, RadioCharacterId character) { return; } - gCurrentMsgPri = priority; - D_ctx_80177D68 = character; + gRadioMsgPri = priority; + gRadioMsgRadioId = character; if (gExpertMode && ((character == RCID_FOX) || (character == RCID_FOX_RED))) { - D_ctx_80177D68 = RCID_FOX_EXPERT; + gRadioMsgRadioId = RCID_FOX_EXPERT; } if (gCurrentLevel == LEVEL_VENOM_2) { switch (character) { case RCID_WOLF: - D_ctx_80177D68 = RCID_WOLF_2; + gRadioMsgRadioId = RCID_WOLF_2; break; case RCID_PIGMA: - D_ctx_80177D68 = RCID_PIGMA_2; + gRadioMsgRadioId = RCID_PIGMA_2; break; case RCID_LEON: - D_ctx_80177D68 = RCID_LEON_2; + gRadioMsgRadioId = RCID_LEON_2; break; case RCID_ANDREW: - D_ctx_80177D68 = RCID_ANDREW_2; + gRadioMsgRadioId = RCID_ANDREW_2; break; } } - D_ctx_80178308 = msg; + gRadioMsg = msg; gRadioState = 100; switch (gGameState) { case GSTATE_TITLE: case GSTATE_ENDING: - D_radio_8017872C = 176; - D_radio_80178728 = 85; - D_radio_80178730 = 80.0f; - D_radio_80178734 = 174.0f; - D_radio_80178738 = 4.63f; - D_radio_8017873C = 32.0f; - D_radio_80178740 = 174.0f; + gRadioPrintPosY = 176; + gRadioPrintPosX = 85; + gRadioTextBoxPosX = 80.0f; + gRadioTextBoxPosY = 174.0f; + gRadioTextBoxScaleX = 4.63f; + gRadioPortraitPosX = 32.0f; + gRadioPortraitPosY = 174.0f; break; case GSTATE_PLAY: - D_radio_8017872C = 180; - D_radio_80178728 = 79; - D_radio_80178730 = 74.0f; - D_radio_80178734 = 178.0f; - D_radio_80178738 = 4.53f; - D_radio_8017873C = 26.0f; - D_radio_80178740 = 178.0f; + gRadioPrintPosY = 180; + gRadioPrintPosX = 79; + gRadioTextBoxPosX = 74.0f; + gRadioTextBoxPosY = 178.0f; + gRadioTextBoxScaleX = 4.53f; + gRadioPortraitPosX = 26.0f; + gRadioPortraitPosY = 178.0f; break; } - D_ctx_801782E8 = Message_IdFromPtr(msg); - Audio_PlayVoice(D_ctx_801782E8); + gRadioMsgId = Message_IdFromPtr(msg); + Audio_PlayVoice(gRadioMsgId); } s32 sRadioUseRedBox; @@ -159,19 +159,19 @@ void func_radio_800BAAE8(void) { f32 temp_fa0; s32 j; - sRadioUseRedBox = 0; + sRadioUseRedBox = false; mirror = false; - switch (D_ctx_801782A4) { + switch (gCurrentRadioPortrait) { case RCID_FOX_RED: - sRadioUseRedBox = 1; + sRadioUseRedBox = true; /* fallthrough */ case RCID_FOX: sp44 = D_10050E0; break; case RCID_FOX_RED_OPEN: - sRadioUseRedBox = 1; + sRadioUseRedBox = true; /* fallthrough */ case RCID_FOX_OPEN: sp44 = D_1006000; @@ -183,37 +183,37 @@ void func_radio_800BAAE8(void) { sp44 = D_1007E40; break; case RCID_FALCO_RED: - sRadioUseRedBox = 1; + sRadioUseRedBox = true; /* fallthrough */ case RCID_FALCO: sp44 = D_10032A0; break; case RCID_FALCO_RED_OPEN: - sRadioUseRedBox = 1; + sRadioUseRedBox = true; /* fallthrough */ case RCID_FALCO_OPEN: sp44 = D_10041C0; break; case RCID_SLIPPY_RED: - sRadioUseRedBox = 1; + sRadioUseRedBox = true; /* fallthrough */ case RCID_SLIPPY: sp44 = D_100D900; break; case RCID_SLIPPY_RED_OPEN: - sRadioUseRedBox = 1; + sRadioUseRedBox = true; /* fallthrough */ case RCID_SLIPPY_OPEN: sp44 = D_100E820; break; case RCID_PEPPY_RED: - sRadioUseRedBox = 1; + sRadioUseRedBox = true; /* fallthrough */ case RCID_PEPPY: sp44 = D_100BAC0; break; case RCID_PEPPY_RED_OPEN: - sRadioUseRedBox = 1; + sRadioUseRedBox = true; /* fallthrough */ case RCID_PEPPY_OPEN: sp44 = D_100C9E0; @@ -321,14 +321,14 @@ void func_radio_800BAAE8(void) { sp44 = D_MA_6011B40; break; case RCID_ROB64_RED: - sRadioUseRedBox = 1; + sRadioUseRedBox = true; /* fallthrough */ case RCID_ROB64: case RCID_ROB64_2: sp44 = D_1009C80; break; case RCID_ROB64_RED_OPEN: - sRadioUseRedBox = 1; + sRadioUseRedBox = true; /* fallthrough */ case RCID_ROB64_OPEN: case RCID_ROB64_2_OPEN: @@ -346,7 +346,7 @@ void func_radio_800BAAE8(void) { if ((gGameState == GSTATE_PLAY) && (gCurrentLevel == LEVEL_AREA_6)) { sp44 = D_A6_6000B60; } - sRadioUseRedBox = 1; + sRadioUseRedBox = true; break; case RCID_ANDROSS_RED_OPEN: case RCID_ANDROSS_OPEN: @@ -354,7 +354,7 @@ void func_radio_800BAAE8(void) { if ((gGameState == GSTATE_PLAY) && (gCurrentLevel == LEVEL_AREA_6)) { sp44 = D_A6_6001A80; } - sRadioUseRedBox = 1; + sRadioUseRedBox = true; break; case RCID_JAMES: sp44 = D_D005C30; @@ -408,39 +408,41 @@ void func_radio_800BAAE8(void) { sp44 = gTitleRadioStatic; break; } - if (((s32) D_ctx_80177D68 == RCID_ANDROSS) || ((s32) D_ctx_80177D68 == RCID_ANDROSS_RED)) { - sRadioUseRedBox = 1; + if (((s32) gRadioMsgRadioId == RCID_ANDROSS) || ((s32) gRadioMsgRadioId == RCID_ANDROSS_RED)) { + sRadioUseRedBox = true; } break; } - if ((sp44 != NULL) && (D_ctx_80177D38 != 0.0f)) { - temp_fa0 = (2.0f * D_ctx_80177D38) + D_radio_80178740; - if ((D_radio_80178740 + 20.0f) <= temp_fa0) { + if ((sp44 != NULL) && (gRadioPortraitScaleY != 0.0f)) { + temp_fa0 = (2.0f * gRadioPortraitScaleY) + gRadioPortraitPosY; + if ((gRadioPortraitPosY + 20.0f) <= temp_fa0) { D_800D4A74 = 1.0f; } - if (temp_fa0 <= D_radio_80178740) { + if (temp_fa0 <= gRadioPortraitPosY) { D_800D4A74 = -1.0f; } - sp38 = D_ctx_80177D38 * 20.0f * D_800D4A74; + sp38 = gRadioPortraitScaleY * 20.0f * D_800D4A74; RCP_SetupDL_76(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); if (mirror) { for (i = 0, j = 0; i < 2; i++, j += 44 * 20) { - TextureRect_16bRGBA_MirX(&gMasterDisp, &sp44[j], 44, 20, D_radio_8017873C, - D_radio_80178740 + 20.0f + sp38 + (i * 20.0f * D_ctx_80177D38), 1.0f, - D_ctx_80177D38); + TextureRect_16bRGBA_MirX(&gMasterDisp, &sp44[j], 44, 20, gRadioPortraitPosX, + gRadioPortraitPosY + 20.0f + sp38 + (i * 20.0f * gRadioPortraitScaleY), 1.0f, + gRadioPortraitScaleY); } - TextureRect_16bRGBA_MirX(&gMasterDisp, &sp44[44 * 20 * 2], 44, 4, D_radio_8017873C, - D_radio_80178740 + 20.0f + sp38 + (40.0f * D_ctx_80177D38), 1.0f, D_ctx_80177D38); + TextureRect_16bRGBA_MirX(&gMasterDisp, &sp44[44 * 20 * 2], 44, 4, gRadioPortraitPosX, + gRadioPortraitPosY + 20.0f + sp38 + (40.0f * gRadioPortraitScaleY), 1.0f, + gRadioPortraitScaleY); } else { for (i = 0, j = 0; i < 2; i++, j += 44 * 20) { - TextureRect_16bRGBA(&gMasterDisp, &sp44[j], 44, 20, D_radio_8017873C, - D_radio_80178740 + 20.0f + sp38 + (i * 20.0f * D_ctx_80177D38), 1.0f, - D_ctx_80177D38); + TextureRect_16bRGBA(&gMasterDisp, &sp44[j], 44, 20, gRadioPortraitPosX, + gRadioPortraitPosY + 20.0f + sp38 + (i * 20.0f * gRadioPortraitScaleY), 1.0f, + gRadioPortraitScaleY); } - TextureRect_16bRGBA(&gMasterDisp, &sp44[44 * 20 * 2], 44, 4, D_radio_8017873C, - D_radio_80178740 + 20.0f + sp38 + (40.0f * D_ctx_80177D38), 1.0f, D_ctx_80177D38); + TextureRect_16bRGBA(&gMasterDisp, &sp44[44 * 20 * 2], 44, 4, gRadioPortraitPosX, + gRadioPortraitPosY + 20.0f + sp38 + (40.0f * gRadioPortraitScaleY), 1.0f, + gRadioPortraitScaleY); } } } @@ -452,12 +454,12 @@ void func_radio_800BB388(void) { u16* sp34; f32 sp30; - if ((gGameState != GSTATE_MAP) && (D_ctx_80177D50 != 0.0f)) { - temp_fa0 = (D_ctx_80177D50 / 0.26f) * 3.0f; - if ((D_radio_80178734 + 16.0f) <= temp_fa0 + D_radio_80178734) { + if ((gGameState != GSTATE_MAP) && (gRadioTextBoxScaleY != 0.0f)) { + temp_fa0 = (gRadioTextBoxScaleY / 0.26f) * 3.0f; + if ((gRadioTextBoxPosY + 16.0f) <= temp_fa0 + gRadioTextBoxPosY) { D_800D4A78 = 1.0f; } - if (temp_fa0 + D_radio_80178734 <= D_radio_80178734) { + if (temp_fa0 + gRadioTextBoxPosY <= gRadioTextBoxPosY) { D_800D4A78 = -1.0f; } sp30 = temp_fa0 * D_800D4A78; @@ -473,25 +475,25 @@ void func_radio_800BB388(void) { sp34 = D_1013570; break; } - if (sRadioUseRedBox == 1) { + if (sRadioUseRedBox == true) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 25, 25, 170); } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 60, 60, 255, 170); } - TextureRect_8bCI(&gMasterDisp, sp38, sp34, 32, 32, D_radio_80178730, D_radio_80178734 + 16.0f + sp30, - D_radio_80178738, D_ctx_80177D50); + TextureRect_8bCI(&gMasterDisp, sp38, sp34, 32, 32, gRadioTextBoxPosX, gRadioTextBoxPosY + 16.0f + sp30, + gRadioTextBoxScaleX, gRadioTextBoxScaleY); } - if (D_ctx_80177D50 == 1.3f) { + if (gRadioTextBoxScaleY == 1.3f) { RCP_SetupDL(&gMasterDisp, 0x55); - D_ctx_801782F8 = - Message_DisplayText(&gMasterDisp, D_ctx_80178308, D_radio_80178728, D_radio_8017872C, D_ctx_801782D8); + gMsgCharIsPrinting = + Message_DisplayText(&gMasterDisp, gRadioMsg, gRadioPrintPosX, gRadioPrintPosY, gRadioMsgCharIndex); } } -s32 D_radio_80178748; -s32 D_radio_8017874C; +s32 D_radio_80178748; // set to 1, never used +s32 sRadioCheckMouthFlag; -void func_radio_800BB5D0(void) { +void Radio_Draw(void) { s32 var_v1; s32 temp_ft0; u32 temp_v0; @@ -501,98 +503,98 @@ void func_radio_800BB5D0(void) { return; } - if (D_Timer_801782AC > 0) { - D_Timer_801782AC--; + if (gRadioStateTimer > 0) { + gRadioStateTimer--; } - if (D_Timer_801782B4 > 0) { - D_Timer_801782B4--; + if (gRadioMouthTimer > 0) { + gRadioMouthTimer--; } switch (gRadioState) { case 100: D_radio_80178748 = 1; - D_ctx_801782A4 = RCID_1000; + gCurrentRadioPortrait = RCID_1000; gRadioState = 1; - D_ctx_801782D8 = 0; - D_ctx_80177D38 = 0.0f; - D_ctx_80177D50 = 0.0f; - D_radio_8017874C = 0; + gRadioMsgCharIndex = 0; + gRadioPortraitScaleY = 0.0f; + gRadioTextBoxScaleY = 0.0f; + sRadioCheckMouthFlag = 0; if (gCamCount != 1) { gRadioState = 0; } break; case 1: - D_ctx_80177D38 += 0.25f; - if (D_ctx_80177D38 == 1.0f) { + gRadioPortraitScaleY += 0.25f; + if (gRadioPortraitScaleY == 1.0f) { gRadioState++; - D_Timer_801782AC = 10; + gRadioStateTimer = 10; } - D_ctx_801782A4 = RCID_STATIC; + gCurrentRadioPortrait = RCID_STATIC; if ((gGameFrameCount % 2) != 0) { - D_ctx_801782A4 = RCID_STATIC_FLIP; + gCurrentRadioPortrait = RCID_STATIC_FLIP; } break; case 2: - if (D_Timer_801782AC == 0) { + if (gRadioStateTimer == 0) { gRadioState++; - D_Timer_801782AC = 10; + gRadioStateTimer = 10; } - D_ctx_801782A4 = RCID_STATIC; + gCurrentRadioPortrait = RCID_STATIC; if ((gGameFrameCount % 2) != 0) { - D_ctx_801782A4 = RCID_STATIC_FLIP; + gCurrentRadioPortrait = RCID_STATIC_FLIP; } break; case 3: - if (D_Timer_801782AC == 0) { + if (gRadioStateTimer == 0) { gRadioState++; - temp_v0 = Message_GetWidth(D_ctx_80178308); + temp_v0 = Message_GetWidth(gRadioMsg); if (gVIsPerFrame == 3) { - D_Timer_801782AC = temp_v0 + 16; + gRadioStateTimer = temp_v0 + 16; } else { - D_Timer_801782AC = (2 * temp_v0) + 16; + gRadioStateTimer = (2 * temp_v0) + 16; } if ((gGameState == GSTATE_TITLE) || (gGameState == GSTATE_ENDING)) { - D_Timer_801782AC = temp_v0 * 2; + gRadioStateTimer = temp_v0 * 2; } } - D_ctx_801782A4 = (s32) D_ctx_80177D68; - D_ctx_80177D50 += 0.26f; - if (D_ctx_80177D50 > 1.3f) { - D_ctx_80177D50 = 1.3f; + gCurrentRadioPortrait = (s32) gRadioMsgRadioId; + gRadioTextBoxScaleY += 0.26f; + if (gRadioTextBoxScaleY > 1.3f) { + gRadioTextBoxScaleY = 1.3f; } break; case 31: gRadioState++; - D_Timer_801782AC = 80 - D_Timer_801782AC; + gRadioStateTimer = 80 - gRadioStateTimer; break; case 32: if (Audio_GetCurrentVoice() == 0) { - D_radio_80178724++; - D_ctx_80178308 = D_radio_80178720[D_radio_80178724]; - Audio_PlayVoice(Message_IdFromPtr(D_ctx_80178308)); - D_ctx_801782D8 = 0; - D_radio_8017874C = 0; - D_Timer_801782AC = 80; - D_Timer_801782AC = Message_GetWidth(D_ctx_80178308) * 2; + gRadioMsgListIndex++; + gRadioMsg = gRadioMsgList[gRadioMsgListIndex]; + Audio_PlayVoice(Message_IdFromPtr(gRadioMsg)); + gRadioMsgCharIndex = 0; + sRadioCheckMouthFlag = 0; + gRadioStateTimer = 80; + gRadioStateTimer = Message_GetWidth(gRadioMsg) * 2; gRadioState = 4; } break; case 4: - if ((Audio_GetCurrentVoice() == 0) && (D_Timer_801782AC == 0)) { - D_Timer_801782AC = 10; - D_ctx_801782A4 = (s32) D_ctx_80177D68; + if ((Audio_GetCurrentVoice() == 0) && (gRadioStateTimer == 0)) { + gRadioStateTimer = 10; + gCurrentRadioPortrait = (s32) gRadioMsgRadioId; gRadioState = 6; } - D_ctx_801782A4 = (s32) D_ctx_80177D68; - if (D_Timer_801782B4 > 0) { - D_ctx_801782A4 = (s32) D_ctx_80177D68 + 1; + gCurrentRadioPortrait = (s32) gRadioMsgRadioId; + if (gRadioMouthTimer > 0) { + gCurrentRadioPortrait = (s32) gRadioMsgRadioId + 1; } if (!gVIsPerFrame) {} @@ -604,42 +606,42 @@ void func_radio_800BB5D0(void) { if (!(fakeTemp)) { temp_v0 = Audio_GetCurrentVoiceStatus(); - if (D_ctx_801782D8 < 60) { - if (D_ctx_80178308[D_ctx_801782D8 + 1] == MSGCHAR_NXT) { + if (gRadioMsgCharIndex < 60) { + if (gRadioMsg[gRadioMsgCharIndex + 1] == MSGCHAR_NXT) { if (temp_v0 == 0) { gRadioState = 31; } } else { - D_ctx_801782D8++; + gRadioMsgCharIndex++; } } - if (D_radio_8017874C != 0) { - if ((D_ctx_801782E8 >= 23000) && (D_ctx_801782E8 < 23033)) { - if (D_ctx_801782F8) { - D_Timer_801782B4 = 2; + if (sRadioCheckMouthFlag) { + if ((gRadioMsgId >= 23000) && (gRadioMsgId < 23033)) { + if (gMsgCharIsPrinting) { + gRadioMouthTimer = 2; AUDIO_PLAY_SFX(0x49000017, gDefaultSfxSource, 4); } } else if (temp_v0 == 1) { - D_Timer_801782B4 = 2; + gRadioMouthTimer = 2; } else { - D_Timer_801782B4 = 0; + gRadioMouthTimer = 0; } } } - D_radio_8017874C ^= 1; + sRadioCheckMouthFlag ^= 1; break; case 5: - if (D_Timer_801782AC == 0) { + if (gRadioStateTimer == 0) { gRadioState++; - D_Timer_801782AC = 10; + gRadioStateTimer = 10; } - D_ctx_801782A4 = (s32) D_ctx_80177D68; + gCurrentRadioPortrait = (s32) gRadioMsgRadioId; break; case 6: - if (D_Timer_801782AC == 0) { + if (gRadioStateTimer == 0) { if (gGameState == GSTATE_ENDING) { Audio_ClearVoice(); } else { @@ -647,44 +649,44 @@ void func_radio_800BB5D0(void) { } gRadioState++; } - D_ctx_801782A4 = RCID_STATIC; + gCurrentRadioPortrait = RCID_STATIC; if ((gGameFrameCount % 2) != 0) { - D_ctx_801782A4 = RCID_STATIC_FLIP; + gCurrentRadioPortrait = RCID_STATIC_FLIP; } - D_ctx_80177D50 -= 0.26f; - if (D_ctx_80177D50 < 0.0f) { - D_ctx_80177D50 = 0.0f; + gRadioTextBoxScaleY -= 0.26f; + if (gRadioTextBoxScaleY < 0.0f) { + gRadioTextBoxScaleY = 0.0f; } break; case 7: - D_ctx_80177D38 -= 0.25f; - if (D_ctx_80177D38 == 0) { - D_ctx_80178300 = 0; - gCurrentMsgPri = 0; + gRadioPortraitScaleY -= 0.25f; + if (gRadioPortraitScaleY == 0) { + gHideRadio = 0; + gRadioMsgPri = 0; gRadioState = 0; } - D_ctx_801782A4 = RCID_STATIC; + gCurrentRadioPortrait = RCID_STATIC; if ((gGameFrameCount % 2) != 0) { - D_ctx_801782A4 = RCID_STATIC_FLIP; + gCurrentRadioPortrait = RCID_STATIC_FLIP; } break; case 8: - D_ctx_801782A4 = (s32) D_ctx_80177D68; - D_ctx_80177D50 = 1.3f; - D_ctx_80177D38 = 1.0f; + gCurrentRadioPortrait = (s32) gRadioMsgRadioId; + gRadioTextBoxScaleY = 1.3f; + gRadioPortraitScaleY = 1.0f; break; case 0: break; } - if (((gRadioState > 0) && (gRadioState != 100)) && (D_ctx_80178300 == 0)) { + if (((gRadioState > 0) && (gRadioState != 100)) && (gHideRadio == 0)) { func_radio_800BAAE8(); func_radio_800BB388(); - temp_ft0 = (s32) D_ctx_80177D68; + temp_ft0 = (s32) gRadioMsgRadioId; if (((temp_ft0 == RCID_FALCO) || (temp_ft0 == RCID_SLIPPY)) || (temp_ft0 == RCID_PEPPY)) { if (temp_ft0 == RCID_FALCO) { @@ -697,20 +699,20 @@ void func_radio_800BB5D0(void) { var_v1 = TEAM_ID_PEPPY; } if ((gTeamShields[var_v1] <= 0) && (gGameFrameCount & 4) && (gTeamShields[var_v1] != -2) && - (D_ctx_801782A4 != RCID_STATIC) && (D_ctx_801782A4 != RCID_STATIC_FLIP) && - (D_ctx_801782A4 != RCID_1000)) { + (gCurrentRadioPortrait != RCID_STATIC) && (gCurrentRadioPortrait != RCID_STATIC_FLIP) && + (gCurrentRadioPortrait != RCID_1000)) { RCP_SetupDL(&gMasterDisp, 0x4C); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255); Graphics_DisplaySmallText(31, 167, 1.0f, 1.0f, "DOWN"); func_hud_80084B94(1); } - if (((D_ctx_801782A4 != RCID_STATIC) && (D_ctx_801782A4 != RCID_STATIC_FLIP)) && - (D_ctx_801782A4 != RCID_1000)) { + if (((gCurrentRadioPortrait != RCID_STATIC) && (gCurrentRadioPortrait != RCID_STATIC_FLIP)) && + (gCurrentRadioPortrait != RCID_1000)) { func_hud_80086110(22.0f, 165.0f, gTeamShields[var_v1]); } } - temp_ft0 = (s32) D_ctx_80177D68; + temp_ft0 = (s32) gRadioMsgRadioId; if ((temp_ft0 == RCID_WOLF) || (temp_ft0 == RCID_PIGMA) || (temp_ft0 == RCID_LEON) || (temp_ft0 == RCID_ANDREW) || (temp_ft0 == RCID_WOLF_2) || (temp_ft0 == RCID_PIGMA_2) || @@ -746,131 +748,131 @@ void func_radio_800BB5D0(void) { } if ((gActors[var_v1].obj.status != OBJ_ACTIVE) && (gGameFrameCount & 4) && - (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (D_ctx_801782A4 != RCID_STATIC) && - (D_ctx_801782A4 != RCID_STATIC_FLIP) && (D_ctx_801782A4 != RCID_1000)) { + (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (gCurrentRadioPortrait != RCID_STATIC) && + (gCurrentRadioPortrait != RCID_STATIC_FLIP) && (gCurrentRadioPortrait != RCID_1000)) { RCP_SetupDL(&gMasterDisp, 0x4C); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255); Graphics_DisplaySmallText(31, 167, 1.0f, 1.0f, "DOWN"); } - if (((D_ctx_801782A4 != RCID_STATIC) && (D_ctx_801782A4 != RCID_STATIC_FLIP)) && - (D_ctx_801782A4 != RCID_1000)) { + if (((gCurrentRadioPortrait != RCID_STATIC) && (gCurrentRadioPortrait != RCID_STATIC_FLIP)) && + (gCurrentRadioPortrait != RCID_1000)) { func_hud_80086110(22.0f, 165.0f, gActors[var_v1].health * 2.55f); } } - if (((D_ctx_801782A4 != RCID_STATIC) && (D_ctx_801782A4 != RCID_STATIC_FLIP)) && - (D_ctx_801782A4 != RCID_1000)) { + if (((gCurrentRadioPortrait != RCID_STATIC) && (gCurrentRadioPortrait != RCID_STATIC_FLIP)) && + (gCurrentRadioPortrait != RCID_1000)) { func_hud_8008AD94(); } } - if (D_ctx_80178300 == 1) { + if (gHideRadio == 1) { func_radio_800BA760(); } } void func_radio_800BC040(void) { if (gPlayState != PLAY_PAUSE) { - if (D_Timer_801782AC > 0) { - D_Timer_801782AC--; + if (gRadioStateTimer > 0) { + gRadioStateTimer--; } - if (D_Timer_801782B4 > 0) { - D_Timer_801782B4--; + if (gRadioMouthTimer > 0) { + gRadioMouthTimer--; } switch (gRadioState) { case 100: - D_ctx_801782A4 = RCID_1000; + gCurrentRadioPortrait = RCID_1000; gRadioState = 1; - D_ctx_80177D38 = 0.0f; - D_ctx_80177D50 = 0.0f; - D_ctx_801782D8 = Message_GetWidth(D_ctx_80178308); + gRadioPortraitScaleY = 0.0f; + gRadioTextBoxScaleY = 0.0f; + gRadioMsgCharIndex = Message_GetWidth(gRadioMsg); if (gCamCount != 1) { gRadioState = 0; } break; case 1: - D_ctx_80177D38 += 0.02f; - if (D_ctx_80177D38 == 0.04f) { + gRadioPortraitScaleY += 0.02f; + if (gRadioPortraitScaleY == 0.04f) { gRadioState++; - D_Timer_801782AC = 5; + gRadioStateTimer = 5; } break; case 2: - if (D_Timer_801782AC == 0) { + if (gRadioStateTimer == 0) { gRadioState++; - D_Timer_801782AC = 5; + gRadioStateTimer = 5; } - D_ctx_801782A4 = RCID_STATIC; + gCurrentRadioPortrait = RCID_STATIC; if ((gGameFrameCount % 2) != 0) { - D_ctx_801782A4 = RCID_STATIC_FLIP; + gCurrentRadioPortrait = RCID_STATIC_FLIP; } break; case 3: - if (D_Timer_801782AC == 0) { + if (gRadioStateTimer == 0) { gRadioState++; - D_Timer_801782AC = 5; + gRadioStateTimer = 5; if (gGameState == GSTATE_TITLE) { - D_Timer_801782AC = 30; + gRadioStateTimer = 30; } } - D_ctx_801782A4 = (s32) D_ctx_80177D68; - D_ctx_80177D50 += 0.015f; + gCurrentRadioPortrait = (s32) gRadioMsgRadioId; + gRadioTextBoxScaleY += 0.015f; - if (D_ctx_80177D50 > 0.07f) { - D_ctx_80177D50 = 0.07f; + if (gRadioTextBoxScaleY > 0.07f) { + gRadioTextBoxScaleY = 0.07f; } break; case 4: - if (D_Timer_801782AC == 0) { + if (gRadioStateTimer == 0) { gRadioState++; - D_Timer_801782AC = 10; + gRadioStateTimer = 10; } break; case 5: - if (D_Timer_801782AC == 0) { + if (gRadioStateTimer == 0) { gRadioState++; - D_Timer_801782AC = 5; + gRadioStateTimer = 5; } - D_ctx_801782A4 = (s32) D_ctx_80177D68; + gCurrentRadioPortrait = (s32) gRadioMsgRadioId; break; case 6: - if (D_Timer_801782AC == 0) { + if (gRadioStateTimer == 0) { Audio_PlayVoice(0); gRadioState++; } - D_ctx_801782A4 = RCID_STATIC; + gCurrentRadioPortrait = RCID_STATIC; if ((gGameFrameCount % 2) != 0) { - D_ctx_801782A4 = RCID_STATIC_FLIP; + gCurrentRadioPortrait = RCID_STATIC_FLIP; } - D_ctx_80177D50 -= 0.015f; + gRadioTextBoxScaleY -= 0.015f; - if (D_ctx_80177D50 < 0.0f) { - D_ctx_80177D50 = 0.0f; + if (gRadioTextBoxScaleY < 0.0f) { + gRadioTextBoxScaleY = 0.0f; } break; case 7: - D_ctx_80177D38 -= 0.02f; - if (D_ctx_80177D38 == 0) { + gRadioPortraitScaleY -= 0.02f; + if (gRadioPortraitScaleY == 0) { gRadioState = 0; - D_Timer_801782AC = 5; + gRadioStateTimer = 5; } - D_ctx_801782A4 = RCID_STATIC; + gCurrentRadioPortrait = RCID_STATIC; if ((gGameFrameCount % 2) != 0) { - D_ctx_801782A4 = RCID_STATIC_FLIP; + gCurrentRadioPortrait = RCID_STATIC_FLIP; } break; @@ -881,8 +883,8 @@ void func_radio_800BC040(void) { if ((gRadioState > 0) && (gRadioState != 100)) { func_radio_800BAAE8(); func_radio_800BB388(); - if (((s32) D_ctx_80177D68 == RCID_FALCO) || ((s32) D_ctx_80177D68 == RCID_SLIPPY) || - ((s32) D_ctx_80177D68 == RCID_PEPPY)) { + if (((s32) gRadioMsgRadioId == RCID_FALCO) || ((s32) gRadioMsgRadioId == RCID_SLIPPY) || + ((s32) gRadioMsgRadioId == RCID_PEPPY)) { Matrix_Push(&gGfxMatrix); RCP_SetupDL_36(); Matrix_Translate(gGfxMatrix, -150.0f, -115.0f, -443.0f, MTXF_APPLY); diff --git a/src/engine/fox_tank.c b/src/engine/fox_tank.c index f69c4790..46555e77 100644 --- a/src/engine/fox_tank.c +++ b/src/engine/fox_tank.c @@ -201,7 +201,7 @@ void func_tank_80043B18(Player* player) { Titania_80189120(player->pos.x + sp3C.x, player->pos.y + sp3C.y, player->unk_138 + sp3C.z, player->unk_0E8 + sp38, 1.0f); } - if (((gGameFrameCount % 4) == 0) && (player->unk_0D0 >= 5.0f)) { + if (((gGameFrameCount % 4) == 0) && (player->baseSpeed >= 5.0f)) { func_effect_8007A900(player->pos.x + sp3C.x, player->pos.y + sp3C.y + 20.0f, player->unk_138 + sp3C.z, 2.0f, 255, 15, 0); } @@ -219,7 +219,7 @@ void func_tank_80043B18(Player* player) { Titania_80189120(player->pos.x + sp3C.x, player->pos.y + sp3C.y, player->unk_138 + sp3C.z, player->unk_0E8 + sp38, 1.0f); } - if (((gGameFrameCount % 4) == 0) && (player->unk_0D0 >= 5.0f)) { + if (((gGameFrameCount % 4) == 0) && (player->baseSpeed >= 5.0f)) { func_effect_8007A900(player->pos.x + sp3C.x, player->pos.y + sp3C.y + 20.0f, player->unk_138 + sp3C.z, 2.0f, 255, 15, 0); } @@ -308,7 +308,7 @@ void func_tank_800444BC(Player* player) { } sp40 = sp3C = 0.0f; sp38 = gGroundHeight; - if (D_ctx_801784AC == 4) { + if (gGroundType == 4) { Ground_801B6E20(player->pos.x, player->unk_138 + player->unk_144, &sp40, &sp38, &sp3C); } if (gCurrentLevel == LEVEL_MACBETH) { @@ -335,11 +335,11 @@ void func_tank_800444BC(Player* player) { } player->pos.y = sp38 - 3.0f; - sp34 = (player->unk_0D0 * 0.2f) + 0.2f; + sp34 = (player->baseSpeed * 0.2f) + 0.2f; player->vel.y = -3.0f; if ((player->unk_104 > 0.0f) && (sp40 <= 0.0f)) { - player->vel.y = player->unk_104 * 0.5f * player->unk_0D0 * 0.035f; + player->vel.y = player->unk_104 * 0.5f * player->baseSpeed * 0.035f; player->unk_0E4 = player->unk_104; } if (player->unk_0D4 < 0.0f) { @@ -408,16 +408,16 @@ void func_tank_80044868(Player* player) { Math_SmoothStepToF(&player->unk_0E8, -var_fv1 * D_ctx_80177970, 0.1f, D_ctx_80177968, 0.1f); } player->unk_108 = player->unk_0E8; - sp2C = player->unk_0D0; + sp2C = player->baseSpeed; if ((gCurrentLevel == LEVEL_MACBETH) && (sp2C < 3.0f)) { sp2C = 3.0f; } if (player->unk_16C > 0.2f) { - Math_SmoothStepToF(&player->unk_184, player->unk_0D0 * 0.5f, 1.0f, 1.0f, 0.0f); + Math_SmoothStepToF(&player->unk_184, player->baseSpeed * 0.5f, 1.0f, 1.0f, 0.0f); } if (player->unk_170 > 0.2f) { - Math_SmoothStepToF(&player->unk_184, -player->unk_0D0 * 0.5f, 1.0f, 1.0f, 0.0f); + Math_SmoothStepToF(&player->unk_184, -player->baseSpeed * 0.5f, 1.0f, 1.0f, 0.0f); } if (!(player->unk_170 > 0.2f) && !(player->unk_16C > 0.2f) && (player->unk_1D4 != 0)) { Math_SmoothStepToF(&player->unk_184, 0.0f, 1.0f, 0.75f, 0.0f); @@ -440,9 +440,9 @@ void func_tank_80044868(Player* player) { } else { Math_SmoothStepToF(&player->vel.x, player->unk_184 - (SIN_DEG(player->unk_108) * sp2C), 0.5f, 5.0f, 0.0f); } - player->vel.z += fabsf((player->unk_184 * 0.4f * player->unk_0D0) / 15.0f); + player->vel.z += fabsf((player->unk_184 * 0.4f * player->baseSpeed) / 15.0f); if (player->unk_000 == 0) { - player->vel.z += SIN_DEG(player->unk_0E4) * player->unk_110; + player->vel.z += SIN_DEG(player->unk_0E4) * player->boostSpeed; } if (D_800C9F00 != 0) { player->vel.z = 2.0f * D_800C9F00; @@ -474,10 +474,10 @@ void func_tank_80044868(Player* player) { player->pos.z += player->vel.z; if (player->unk_1D4 != 0) { player->unk_0A0 = 0.0f; - player->unk_0F4 += player->unk_0D0 * 5.0f; + player->unk_0F4 += player->baseSpeed * 5.0f; player->unk_0F0 = SIN_DEG(player->unk_0F4) * 0.7f; if (D_800C9F04 == 0) { - if (player->unk_0D0 != 0.0f) { + if (player->baseSpeed != 0.0f) { func_tank_80043B18(player); } if (player->unk_1DC != 0.0f) { @@ -485,7 +485,7 @@ void func_tank_80044868(Player* player) { } } } - if (player->unk_0D0 > 0.0f) { + if (player->baseSpeed > 0.0f) { Texture_Scroll(D_landmaster_3002E80, 32, 32, 0); if ((gCurrentLevel == LEVEL_TITANIA) && (gBossActive == 0)) { func_tank_80043280(D_landmaster_3005EA8, D_TI_6009BB8, gGameFrameCount * -55.0f); @@ -494,7 +494,7 @@ void func_tank_80044868(Player* player) { func_tank_80043280(D_landmaster_3005EA8, *D_Tex_800DACB8, gGameFrameCount * -55.0f); } } - if (player->unk_0D0 > 10.0f) { + if (player->baseSpeed > 10.0f) { Texture_Scroll(D_landmaster_3002E80, 32, 32, 0); if ((gCurrentLevel == LEVEL_TITANIA) && (gBossActive == 0)) { func_tank_80043280(D_landmaster_3005EA8, D_TI_6009BB8, gGameFrameCount * -55.0f); @@ -579,10 +579,10 @@ void func_tank_80045348(Player* player) { } else { D_800C9F28 = 0.0f; } - Math_SmoothStepToF(&player->unk_0D0, sp44, sp3C, sp38, 0.001f); + Math_SmoothStepToF(&player->baseSpeed, sp44, sp3C, sp38, 0.001f); Math_SmoothStepToF(&player->unk_08C, sp40, sp3C, sp38, 0.001f); } else if (player->unk_19C == -1) { - Math_SmoothStepToF(&player->unk_0D0, player->unk_000, 0.1f, 2.0f, 0.01f); + Math_SmoothStepToF(&player->baseSpeed, player->unk_000, 0.1f, 2.0f, 0.01f); } } @@ -652,7 +652,7 @@ void func_tank_80045678(Player* player) { } player->unk_2C0 = 0.0f; } - Math_SmoothStepToF(&player->unk_110, 0.0f, 0.1f, 1.0f, 0); + Math_SmoothStepToF(&player->boostSpeed, 0.0f, 0.1f, 1.0f, 0); if ((player->unk_16C > 0.2f) && (player->unk_170 > 0.2f) && (player->timer_220 == 0)) { if (D_800C9F3C == 0) { D_800C9F3C = 1; @@ -663,7 +663,7 @@ void func_tank_80045678(Player* player) { player->unk_12C += ((__cosf(gGameFrameCount * M_DTOR * 8.0f) * 10.0f) - player->unk_12C) * 0.1f; temp = -gInputPress->stick_y; Math_SmoothStepToF(&player->unk_0E4, temp * 0.3f, 0.05f, 5.0f, 0.00001f); - Math_SmoothStepToF(&player->unk_110, 15.0f, 0.5f, 5.0f, 0.0f); + Math_SmoothStepToF(&player->boostSpeed, 15.0f, 0.5f, 5.0f, 0.0f); Math_SmoothStepToF(&player->unk_0EC, 0.0f, 0.1f, 5.0f, 0.00001f); player->unk_0D4 = -0.4f; player->unk_0A0 += player->vel.y; @@ -921,7 +921,7 @@ void func_tank_80046704(Player* player) { break; case 1: case 2: - Math_SmoothStepToF(&player->unk_0D0, 15.0f, 0.3f, 3.5f, 0.001f); + Math_SmoothStepToF(&player->baseSpeed, 15.0f, 0.3f, 3.5f, 0.001f); Math_SmoothStepToF(&player->unk_08C, 0, 0.3f, 3.5f, 0.001f); if (temp_v0 == 1) { player->vel.x = -10.0f; @@ -938,7 +938,7 @@ void func_tank_80046704(Player* player) { (scenery->obj.id == OBJ_SCENERY_68)) { Player_ApplyDamage(player, temp_v0, 5); } - player->unk_0D0 = -(D_800C9F00 * 1.5f); + player->baseSpeed = -(D_800C9F00 * 1.5f); player->vel.z = D_800C9F00 * 1.5f; D_800C9F00 = 12; AUDIO_PLAY_SFX(0x09008015, player->sfxSource, 0); @@ -1360,10 +1360,10 @@ void func_tank_800481F4(Player* player) { if (temp_v0 != 0) { if (temp_v0 < 0) { if (temp_v0 == -1) { - D_ctx_80178540 = 40; - D_ctx_80178570 = 20; - D_ctx_80178574 = 20; - D_ctx_80178578 = 20; + gLight2colorStep = 40; + gLight2RTarget = 20; + gLight2GTarget = 20; + gLight2BTarget = 20; player->shadowing = 80; if (player->whooshTimer == 0) { AUDIO_PLAY_SFX(0x19000001, player->sfxSource, 0); @@ -1420,7 +1420,7 @@ void func_tank_800481F4(Player* player) { player->timer_1E8 = 15; player->unk_1EC = player->unk_1F0 = -20; } - Math_SmoothStepToF(&player->unk_0D0, 15.0f, 0.3f, 3.5f, 0.001f); + Math_SmoothStepToF(&player->baseSpeed, 15.0f, 0.3f, 3.5f, 0.001f); Math_SmoothStepToF(&player->unk_08C, 0, 0.3f, 3.5f, 0.001f); player->vel.x = 0.0f; player->vel.y = 30.0f; @@ -1434,7 +1434,7 @@ void func_tank_800481F4(Player* player) { actor->fwork[8] + actor->obj.pos.y + 25.0f, actor->obj.pos.z, actor->fwork[29], actor->fwork[26], actor->obj.rot.z, 0.0f, 0.0f, 0.0f) != 0) { - Math_SmoothStepToF(&player->unk_0D0, 15.0f, 0.3f, 3.5f, 0.001f); + Math_SmoothStepToF(&player->baseSpeed, 15.0f, 0.3f, 3.5f, 0.001f); Math_SmoothStepToF(&player->unk_08C, 0, 0.3f, 3.5f, 0.001f); if (player->pos.x < (actor->fwork[23] + actor->obj.pos.x)) { player->unk_0D8.x = (actor->vel.z > 5.0f) ? -5.0f : -1.5f; diff --git a/src/engine/fox_versus.c b/src/engine/fox_versus.c index 7fc56a95..dd38ec75 100644 --- a/src/engine/fox_versus.c +++ b/src/engine/fox_versus.c @@ -6,7 +6,7 @@ #include "assets/ast_versus.h" s32 D_versus_80178750; -s32 D_versus_80178754; +s32 gVsMatchState; s32 D_versus_80178758; s32 sUnlockLandmaster; s32 sUnlockOnFoot; @@ -19,7 +19,7 @@ s32 D_80178798; s32 D_8017879C; s32 D_801787A0; s32 D_801787A4; -s32 D_801787A8; +s32 gVsWinner; f32 D_801787AC; f32 D_801787B0; s32 D_801787B4; @@ -45,8 +45,8 @@ OSTime D_80178868; s32 D_800D4A90 = 0; s32 D_800D4A94 = 0; s32 D_800D4A98 = 0; -s32 D_800D4A9C = 0; -s32 D_800D4AA0 = 0; +s32 sStartVsHurryBgm = 0; +s32 sVsHurryBgmPlaying = 0; void func_versus_800BC760(void) { s32 i; @@ -64,9 +64,9 @@ void func_versus_800BC760(void) { gCamCount = 1; gPlayState = PLAY_STANDBY; gDrawMode = DRAW_NONE; - D_ctx_80177AE0 = 0; + gTitleState = 0; gOptionMenuStatus = OPTION_WAIT; - D_ctx_80177B40 = 0; + gMapState = 0; gBgColor = 0; gPlayerGlareAlphas[0] = 0; gPlayerGlareAlphas[1] = 0; @@ -649,8 +649,8 @@ s32 func_versus_800BF17C(void) { continue; } - if ((gPlayerInactive[i]) || (D_ctx_801778AC == 1) || ((D_801787B4 == 1) && (D_ctx_801778AC != 2)) || - ((D_ctx_801778AC == 2) && (D_versus_80178768[0] == 0) && (D_versus_80178768[1] == 0) && + if ((gPlayerInactive[i]) || (gVsMatchType == 1) || ((D_801787B4 == 1) && (gVsMatchType != 2)) || + ((gVsMatchType == 2) && (D_versus_80178768[0] == 0) && (D_versus_80178768[1] == 0) && (D_versus_80178768[2] == 0))) { ret = Math_SmoothStepToF(&D_801787D8[i], D_801787E8[i], 0.3f, 100.0f, 1.0f); if (ret == 0.0f) { @@ -717,7 +717,7 @@ s32 func_versus_800BF17C(void) { D_80178820[i]++; - if (D_ctx_801778AC == 2) { + if (gVsMatchType == 2) { D_ctx_80177C30[i] = D_80178838[i] = D_80178808[i] = D_80178810[i] = 0; } gPlayer[i].unk_1D0 = 1; @@ -741,7 +741,7 @@ s32 func_versus_800BF59C(void) { continue; } - if ((gPlayerInactive[i]) || (D_ctx_801778AC == 1)) { + if ((gPlayerInactive[i]) || (gVsMatchType == 1)) { colorGB = D_801787D8[i]; gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); func_versus_800BD76C(D_800D4BFC[i], D_800D4C0C[i]); @@ -780,18 +780,18 @@ void func_versus_800BF750(void) { } } -s32 func_versus_800BF9AC(void) { +s32 Versus_CheckForWinner(void) { s32 i; s32 j; s32 temp; s32 var_a3; s32 temp2[4]; - switch (D_ctx_801778AC) { + switch (gVsMatchType) { case 0: for (i = 0, var_a3 = 0; i < 4; i++) { if (gPlayer[i].state_1C8 != PLAYERSTATE_1C8_VS_STANDBY) { - D_801787A8 = i; + gVsWinner = i; } if (gPlayer[i].state_1C8 == PLAYERSTATE_1C8_VS_STANDBY) { var_a3 += 1; @@ -800,16 +800,16 @@ s32 func_versus_800BF9AC(void) { if ((D_801787B4 == 1) && (var_a3 == 4)) { D_ctx_80177E74 = 1; - D_801787A8 = 99; + gVsWinner = 99; break; } for (i = 0; i < 4; i++) { - if (D_ctx_80177DB8[i] == D_ctx_801778A4) { + if (D_ctx_80177DB8[i] == gVsPointsToWin) { break; } - if (D_ctx_80177DB8[i] == (D_ctx_801778A4 - 1)) { - D_800D4A9C = 1; + if (D_ctx_80177DB8[i] == (gVsPointsToWin - 1)) { + sStartVsHurryBgm = 1; } } @@ -831,14 +831,14 @@ s32 func_versus_800BF9AC(void) { gPlayer[j].state_1C8 = PLAYERSTATE_1C8_VS_STANDBY; } D_ctx_80177E74 = 1; - D_801787A8 = i; + gVsWinner = i; break; case 1: for (i = 0, var_a3 = 0; i < 4; i++) { if (gPlayer[i].state_1C8 != PLAYERSTATE_1C8_VS_STANDBY) { - D_801787A8 = i; + gVsWinner = i; } if (gPlayer[i].state_1C8 == PLAYERSTATE_1C8_VS_STANDBY) { var_a3 += 1; @@ -846,12 +846,12 @@ s32 func_versus_800BF9AC(void) { } if ((D_801787B4 == 1) && (var_a3 == 4)) { D_ctx_80177E74 = 1; - D_801787A8 = 99; + gVsWinner = 99; break; } if (var_a3 >= 2) { - D_800D4A9C = 1; + sStartVsHurryBgm = 1; } if ((var_a3 < 3) || (D_801787B4 == 1)) { @@ -859,11 +859,11 @@ s32 func_versus_800BF9AC(void) { } if (var_a3 >= 4) { - D_801787A8 = 99; + gVsWinner = 99; } for (j = 0; j < 4; j++) { - if (j == D_801787A8) { + if (j == gVsWinner) { continue; } if (gPlayer[j].unk_288 >= 0) { @@ -879,7 +879,7 @@ s32 func_versus_800BF9AC(void) { return (0); } - if (D_ctx_801778AC == 2) { + if (gVsMatchType == 2) { for (i = 0; i < 4; i++) { if ((gPlayer[i].state_1C8 == PLAYERSTATE_1C8_DOWN) || (gPlayer[i].state_1C8 == PLAYERSTATE_1C8_VS_STANDBY)) { @@ -917,11 +917,11 @@ s32 func_versus_800BF9AC(void) { } if ((j == 4) && (temp == 0)) { - D_801787A8 = i; + gVsWinner = i; } } - if (D_801787A8 == 99) { + if (gVsWinner == 99) { for (i = 0; i < 4; i++) { if (!gControllerPlugged[i]) { continue; @@ -949,11 +949,11 @@ s32 func_versus_800BF9AC(void) { } } if ((j == 4) && (temp == 0)) { - D_801787A8 = i; + gVsWinner = i; } } - if (D_801787A8 == 99) { + if (gVsWinner == 99) { for (i = 0; i < 4; i++) { if (!gControllerPlugged[i]) { continue; @@ -980,14 +980,14 @@ s32 func_versus_800BF9AC(void) { } } if ((j == 4) && (temp == 0)) { - D_801787A8 = i; + gVsWinner = i; } } } } for (j = 0; j < 4; j++) { - if (j == D_801787A8) { + if (j == gVsWinner) { continue; } @@ -1067,7 +1067,7 @@ s32 func_versus_800C04DC(f32 xPos, f32 scale, s32 arg2) { f32 x; f32 y; - if ((D_ctx_801778AC == 2) && (D_800D4A98 & 0x20) && (D_801787A8 != 99)) { + if ((gVsMatchType == 2) && (D_800D4A98 & 0x20) && (gVsWinner != 99)) { x = 118.0f; y = 110.0f; @@ -1308,7 +1308,7 @@ s32 func_versus_800C0E78(void) { return 0; } -bool func_versus_800C107C(s32 arg0) { +bool func_versus_800C107C(s32 playerNum) { D_80178798++; if (D_80178798 == 10) { AUDIO_PLAY_SFX(0x49004007, gDefaultSfxSource, 4); @@ -1316,7 +1316,7 @@ bool func_versus_800C107C(s32 arg0) { D_80178798 = 0; } - if (D_801787B8 < D_ctx_80177DB8[arg0]) { + if (D_801787B8 < D_ctx_80177DB8[playerNum]) { return false; } else { return true; @@ -1366,14 +1366,14 @@ void func_versus_800C1368(void) { D_8017879C = 0; D_801787A0 = 0; D_801787A4 = 0; - D_801787A8 = 99; + gVsWinner = 99; D_801787B8 = 0; D_versus_80178750 = 0; gBgColor = 0; D_80178830 = 0; D_800D4A90 = 0; D_800D4A98 = 0; - D_800D4A9C = D_800D4AA0 = 0; + sStartVsHurryBgm = sVsHurryBgmPlaying = 0; gFillScreenAlpha = 255; gFillScreenAlphaStep = 0; gFillScreenAlphaTarget = 0; @@ -1401,14 +1401,14 @@ void func_versus_800C1368(void) { sUnlockOnFoot = false; } - if (D_ctx_801778AC == 2) { - D_ctx_801778A4 = 10000; + if (gVsMatchType == 2) { + gVsPointsToWin = 10000; } if (!sUnlockLandmaster) { sUnlockOnFoot = false; } - D_versus_80178768[0] = D_ctx_801778C8 + 1; + D_versus_80178768[0] = gVsTimeTrialLimit + 1; D_versus_80178768[1] = 0; D_versus_80178768[2] = 0; } @@ -1444,7 +1444,7 @@ bool func_versus_800C15D8(void) { return ret; } -/* return type needs to be s32 for func_versus_800C176C to match */ +/* return type needs to be s32 for Versus_Update to match */ s32 func_versus_800C1690(void) { D_80178798 = 0; } @@ -1460,7 +1460,7 @@ bool func_versus_800C16A0(s32 arg0) { void func_versus_800C16D0(void) { func_play_800ABA08(); - D_versus_80178754 = 0; + gVsMatchState = 0; D_80178778 = 0; } @@ -1482,13 +1482,13 @@ void func_versus_800C175C(void) { void func_versus_800C1764(void) { } -bool func_versus_800C176C(void) { +bool Versus_Update(void) { s32 ret = 0; - switch (D_versus_80178754) { + switch (gVsMatchState) { case 0: func_versus_800C1368(); - D_versus_80178754 = 1; + gVsMatchState = 1; func_versus_800C1690(); break; @@ -1498,7 +1498,7 @@ bool func_versus_800C176C(void) { } if (func_versus_800C16A0(30)) { AUDIO_PLAY_BGM(gBgmSeqId); - D_versus_80178754 = 2; + gVsMatchState = 2; func_versus_800C1690(); } break; @@ -1510,7 +1510,7 @@ bool func_versus_800C176C(void) { } if (func_versus_800C16A0(30)) { func_play_800ABA08(); - D_versus_80178754 = 3; + gVsMatchState = 3; func_versus_800C1690(); } break; @@ -1526,17 +1526,17 @@ bool func_versus_800C176C(void) { D_ctx_80177E7C = 1; } if (func_versus_800C16A0(30)) { - D_versus_80178754 = 4; + gVsMatchState = 4; } break; case 4: - if ((D_800D4A9C == 1) && (D_800D4AA0 == 0)) { + if ((sStartVsHurryBgm == 1) && (sVsHurryBgmPlaying == 0)) { AUDIO_PLAY_BGM(SEQ_ID_VS_HURRY | SEQ_FLAG); - D_800D4AA0 = 1; + sVsHurryBgmPlaying = 1; } - if (D_ctx_801778AC == 2) { + if (gVsMatchType == 2) { D_80178778 = 10; func_versus_800BE078(); func_versus_800BDE3C(); @@ -1544,15 +1544,15 @@ bool func_versus_800C176C(void) { D_80178778 = 8; } - if (func_versus_800BF9AC()) { + if (Versus_CheckForWinner()) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); - if (D_ctx_801778AC == 2) { + if (gVsMatchType == 2) { D_80178778 = 11; } else { D_80178778 = 0; } - D_versus_80178754 = 5; + gVsMatchState = 5; func_versus_800C1690(); } else { func_versus_800BF17C(); @@ -1561,7 +1561,7 @@ bool func_versus_800C176C(void) { case 5: if (func_versus_800C16A0(60)) { - switch (D_801787A8) { + switch (gVsWinner) { case 0: case 1: @@ -1581,19 +1581,19 @@ bool func_versus_800C176C(void) { } D_versus_80178750 = 1; - D_versus_80178754 = 6; + gVsMatchState = 6; func_versus_800C024C(); } break; case 6: D_80178778 = 3; - if (!func_versus_800C0294(D_801787A8)) { + if (!func_versus_800C0294(gVsWinner)) { break; } if (func_versus_800C16A0(30)) { func_versus_800C1690(); - D_versus_80178754 = 7; + gVsMatchState = 7; } break; @@ -1601,26 +1601,26 @@ bool func_versus_800C176C(void) { D_80178778 = 4; if (func_versus_800C16A0(15)) { func_versus_800C1690(); - if (((D_ctx_801778AC == 0) && (D_801787B4 > 1)) || (D_ctx_801778AC == 2)) { - D_versus_80178754 = 8; + if (((gVsMatchType == 0) && (D_801787B4 > 1)) || (gVsMatchType == 2)) { + gVsMatchState = 8; } else { - D_versus_80178754 = 9; + gVsMatchState = 9; } } break; case 8: D_80178778 = 5; - switch (D_ctx_801778AC) { + switch (gVsMatchType) { case 0: - if (func_versus_800C107C(D_801787A8)) { - D_versus_80178754 = 9; + if (func_versus_800C107C(gVsWinner)) { + gVsMatchState = 9; } break; case 2: if (func_versus_800C0D10()) { - D_versus_80178754 = 9; + gVsMatchState = 9; } break; @@ -1636,7 +1636,7 @@ bool func_versus_800C176C(void) { func_versus_800C1690(); D_801787AC = 0.0f; D_80178830 = 0; - D_versus_80178754 = 10; + gVsMatchState = 10; } break; @@ -1645,19 +1645,19 @@ bool func_versus_800C176C(void) { if (func_versus_800C16A0(60) && func_versus_800C0C84()) { switch (D_801787A4) { case 0: - D_versus_80178754 = 11; + gVsMatchState = 11; break; case 1: - D_versus_80178754 = 12; + gVsMatchState = 12; break; case 2: - D_versus_80178754 = 13; + gVsMatchState = 13; break; default: - D_versus_80178754 = 14; + gVsMatchState = 14; break; } @@ -1713,32 +1713,32 @@ bool func_versus_800C176C(void) { case 20: D_80178778 = 9; if (gInputPress->button & B_BUTTON) { - D_versus_80178754 = 13; + gVsMatchState = 13; } else { func_versus_800C175C(); } break; } - if (((D_versus_80178754 == 8) || (D_versus_80178754 == 9)) || (D_versus_80178754 == 10)) { + if (((gVsMatchState == 8) || (gVsMatchState == 9)) || (gVsMatchState == 10)) { D_800D4A98++; } - if (D_versus_80178754 >= 5) { + if (gVsMatchState >= 5) { gPauseEnabled = 0; } return false; } -s32 func_versus_800C1E9C(void) { +s32 Versus_Main(void) { if (gPlayState != PLAY_PAUSE) { - func_versus_800C176C(); + Versus_Update(); } return 0; } -void func_versus_800C1ED4(void) { +void Versus_Draw(void) { s32 var_a1; D_80178868 = D_80178860; @@ -1758,9 +1758,9 @@ void func_versus_800C1ED4(void) { func_versus_800C0970(D_801787CC, D_801787D0); case 5: - switch (D_ctx_801778AC) { + switch (gVsMatchType) { case 0: - func_versus_800C1138(D_801787B8, D_801787A8); + func_versus_800C1138(D_801787B8, gVsWinner); break; case 2: @@ -1768,14 +1768,14 @@ void func_versus_800C1ED4(void) { break; } case 4: - if ((D_ctx_801778AC != 2) || (!(D_800D4A98 & 0x20))) { - if (D_801787A8 < 4) { + if ((gVsMatchType != 2) || (!(D_800D4A98 & 0x20))) { + if (gVsWinner < 4) { func_versus_800C075C(); } } case 3: - func_versus_800C04DC(D_801787C0, D_801787C8, D_801787A8); + func_versus_800C04DC(D_801787C0, D_801787C8, gVsWinner); if (D_80178778 == 7) { func_versus_800C0B0C(); } @@ -1789,7 +1789,7 @@ void func_versus_800C1ED4(void) { func_versus_800BF59C(); case 11: - if (D_ctx_801778AC == 2) { + if (gVsMatchType == 2) { func_versus_800BE300(124.0f, 116.0f, D_versus_80178768); } break; @@ -1973,7 +1973,7 @@ void func_versus_800C26C8(void) { Vec3f dest; Actor* actor; - if ((D_ctx_801778AC != 2) || (D_ctx_80177E7C == 0)) { + if ((gVsMatchType != 2) || (D_ctx_80177E7C == 0)) { return; } diff --git a/src/overlays/ovl_ending/fox_end1.c b/src/overlays/ovl_ending/fox_end1.c index 77c42de2..fb12bc0f 100644 --- a/src/overlays/ovl_ending/fox_end1.c +++ b/src/overlays/ovl_ending/fox_end1.c @@ -376,7 +376,7 @@ void Ending_8018845C(void) { if (var_a2 != D_ending_8019858C) {} } - D_ctx_80178300 = 1; + gHideRadio = 1; switch (gCsFrameCount) { case 10: @@ -570,7 +570,7 @@ void Ending_80189108(void) { switch (D_ending_80196D08[4].unk_38) { case 0: - D_ctx_80178300 = 1; + gHideRadio = 1; switch (gCsFrameCount) { case 30: Radio_PlayMessage(gMsg_ID_21030, RCID_FOX); @@ -617,7 +617,7 @@ void Ending_80189108(void) { break; case 1: - D_ctx_80178300 = 0; + gHideRadio = 0; if (gCsFrameCount == 20) { Radio_PlayMessage(gMsg_ID_21050, RCID_ROB64_TITLE); } @@ -630,7 +630,7 @@ void Ending_80189108(void) { break; case 2: - D_ctx_80178300 = 1; + gHideRadio = 1; switch (gCsFrameCount) { case 20: Radio_PlayMessage(gMsg_ID_21060, RCID_FOX); @@ -822,9 +822,9 @@ void Ending_8018A024(void) { src.x = src.y = 0.0f; src.z = -100.0f; - Matrix_RotateX(gCalcMatrix, D_ctx_801784D0 * M_DTOR, MTXF_NEW); - Matrix_RotateY(gCalcMatrix, D_ctx_801784D4 * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, D_ctx_801784D8 * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, gEnvLightxRot * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, gEnvLightyRot * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, gEnvLightzRot * M_DTOR, MTXF_APPLY); Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); gLight1x = dest.x; gLight1y = dest.y; @@ -854,8 +854,8 @@ void Ending_8018A124(s32 arg0) { gAmbientG = (&sp8)[arg0][1]; gAmbientB = (&sp8)[arg0][2]; - D_ctx_801784D0 = (&sp0)[arg0][0]; - D_ctx_801784D4 = (&sp0)[arg0][1]; + gEnvLightxRot = (&sp0)[arg0][0]; + gEnvLightyRot = (&sp0)[arg0][1]; } void Ending_8018A2A8(void) { @@ -1101,7 +1101,7 @@ void Ending_Draw(void) { Ending_8018CE20(D_ending_80196D04); D_ending_80196D04++; - func_radio_800BB5D0(); + Radio_Draw(); Matrix_Pop(&gGfxMatrix); } @@ -1241,39 +1241,39 @@ void Ending_8018ABE8(void) { case 3: if (gControllerHold[3].button & B_BUTTON) { - D_ctx_801784D0 += 1.0f; - if (D_ctx_801784D0 > 360.0f) { - D_ctx_801784D0 = 0.0f; + gEnvLightxRot += 1.0f; + if (gEnvLightxRot > 360.0f) { + gEnvLightxRot = 0.0f; } } if (gControllerHold[3].button & A_BUTTON) { - D_ctx_801784D0 -= 1.0f; - if (D_ctx_801784D0 < -360.0f) { - D_ctx_801784D0 = 0.0f; + gEnvLightxRot -= 1.0f; + if (gEnvLightxRot < -360.0f) { + gEnvLightxRot = 0.0f; } } if (gControllerHold[3].button & L_CBUTTONS) { - D_ctx_801784D4 += 1.0f; - if (D_ctx_801784D4 > 360.0f) { - D_ctx_801784D4 = 0.0f; + gEnvLightyRot += 1.0f; + if (gEnvLightyRot > 360.0f) { + gEnvLightyRot = 0.0f; } } if (gControllerHold[3].button & D_CBUTTONS) { - D_ctx_801784D4 -= 1.0f; - if (D_ctx_801784D4 < -360.0f) { - D_ctx_801784D4 = 0.0f; + gEnvLightyRot -= 1.0f; + if (gEnvLightyRot < -360.0f) { + gEnvLightyRot = 0.0f; } } if (gControllerHold[3].button & U_CBUTTONS) { - D_ctx_801784D8 += 1.0f; - if (D_ctx_801784D8 > 360.0f) { - D_ctx_801784D8 = 0.0f; + gEnvLightzRot += 1.0f; + if (gEnvLightzRot > 360.0f) { + gEnvLightzRot = 0.0f; } } if (gControllerHold[3].button & R_CBUTTONS) { - D_ctx_801784D8 -= 1.0f; - if (D_ctx_801784D8 < -360.0f) { - D_ctx_801784D8 = 0.0f; + gEnvLightzRot -= 1.0f; + if (gEnvLightzRot < -360.0f) { + gEnvLightzRot = 0.0f; } } break; @@ -1492,9 +1492,9 @@ void Ending_8018B860(void) { gLight1G = sp28[1]; gLight1B = sp28[2]; - D_ctx_801784D0 = sp34[0]; - D_ctx_801784D4 = sp34[1]; - D_ctx_801784D8 = sp34[2]; + gEnvLightxRot = sp34[0]; + gEnvLightyRot = sp34[1]; + gEnvLightzRot = sp34[2]; gAmbientR = sp1C[0]; gAmbientG = sp1C[1]; @@ -1539,9 +1539,9 @@ void Ending_8018BAD0(void) { gLight1G = sp28[1]; gLight1B = sp28[2]; - D_ctx_801784D0 = sp34[0]; - D_ctx_801784D4 = sp34[1]; - D_ctx_801784D8 = sp34[2]; + gEnvLightxRot = sp34[0]; + gEnvLightyRot = sp34[1]; + gEnvLightzRot = sp34[2]; gAmbientR = sp1C[0]; gAmbientG = sp1C[1]; @@ -1688,16 +1688,16 @@ bool Ending_8018BCB0(void) { } if ((gCsFrameCount < 548) && (gCsFrameCount >= 240)) { - D_ctx_801784D0 -= 0.2f; - if (D_ctx_801784D0 < 180.0f) { - D_ctx_801784D0 = 180.0f; + gEnvLightxRot -= 0.2f; + if (gEnvLightxRot < 180.0f) { + gEnvLightxRot = 180.0f; } } if (gCsFrameCount >= 549) { - D_ctx_801784D0 += 0.2f; - if (D_ctx_801784D0 > 240.0f) { - D_ctx_801784D0 = 240.0f; + gEnvLightxRot += 0.2f; + if (gEnvLightxRot > 240.0f) { + gEnvLightxRot = 240.0f; } } diff --git a/src/overlays/ovl_i1/fox_co.c b/src/overlays/ovl_i1/fox_co.c index e653f380..990f4cde 100644 --- a/src/overlays/ovl_i1/fox_co.c +++ b/src/overlays/ovl_i1/fox_co.c @@ -185,7 +185,7 @@ void Corneria_80187AC8(Boss* boss) { gPlayer[0].unk_114 = 0.0f; } Radio_PlayMessage(gMsg_ID_2280, RCID_BOSS_CORNERIA); - func_boss_80042EC0(boss); + Boss_AwardBonus(boss); gBossFrameCount = 100000; return; } @@ -239,7 +239,7 @@ void Corneria_80187AC8(Boss* boss) { boss->swork[7] = boss->swork[8] = boss->swork[9] = 1000; boss->info.hitbox[1 + 24] = 100000.0f; for (var_s1 = 3; var_s1 < 6; var_s1++) { - func_boss_800430DC(D_i1_8019B6D8[18 + var_s1 + 2], D_i1_8019B6D8[24 + var_s1 + 2], + Boss_SpawnActor189(D_i1_8019B6D8[18 + var_s1 + 2], D_i1_8019B6D8[24 + var_s1 + 2], D_i1_8019B6D8[30 + var_s1 + 2], D_i1_8019B6D8[36 + var_s1 + 2], D_i1_8019B6D8[42 + var_s1 + 2], D_i1_8019B6D8[48 + var_s1 + 2], 0.0f, RAND_FLOAT(20.0f), 0.0f, 5.5f, var_s1 + 28, RAND_INT(30.0f) + 60.0f); @@ -258,7 +258,7 @@ void Corneria_80187AC8(Boss* boss) { boss->info.hitbox[1 + 30] = 100000.0f; for (var_s1 = 0; var_s1 < 3; var_s1++) { - func_boss_800430DC(D_i1_8019B6D8[18 + var_s1 + 2], D_i1_8019B6D8[24 + var_s1 + 2], + Boss_SpawnActor189(D_i1_8019B6D8[18 + var_s1 + 2], D_i1_8019B6D8[24 + var_s1 + 2], D_i1_8019B6D8[30 + var_s1 + 2], D_i1_8019B6D8[36 + var_s1 + 2], D_i1_8019B6D8[42 + var_s1 + 2], D_i1_8019B6D8[48 + var_s1 + 2], 0.0f, RAND_FLOAT(20.0f), 0.0f, 5.5f, var_s1 + 28, RAND_INT(30.0f) + 60.0f); @@ -1360,7 +1360,7 @@ void Corneria_8018B58C(Actor* actor) { for (i = 0; i < 4; i++) { - func_boss_800430DC(actor->fwork[2 + i], actor->fwork[6 + i], actor->fwork[10 + i], 0.0f, 0.0f, 0.0f, + Boss_SpawnActor189(actor->fwork[2 + i], actor->fwork[6 + i], actor->fwork[10 + i], 0.0f, 0.0f, 0.0f, spB4[i] * (RAND_FLOAT(0.75f) + 0.5f), spA4[i] * (RAND_FLOAT(0.75f) + 0.5f), RAND_FLOAT_CENTERED(20.0f), 3.0f, i + 24, RAND_INT(30.0f) + 60.0f); } @@ -1482,7 +1482,7 @@ void Corneria_Boss293_Init(Boss293* this) { this->unk_05E = 1; this->timer_050 = 354; this->health = 601; - this->fwork[18] = -D_play_80161A54 - 10.0f; + this->fwork[18] = -gArwingSpeed - 10.0f; if (fabsf(gPlayer[0].unk_0AC) < 1.0f) { this->timer_05A = 30000; this->obj.pos.z = (gPlayer[0].cam.eye.z - D_ctx_80177D20) - 2000.0f; @@ -1602,10 +1602,10 @@ void Corneria_8018C19C(Boss* boss) { } } else { if ((gBossFrameCount > 380) && (gBossFrameCount < 430)) { - D_ctx_80178540 = 5; - D_ctx_80178570 = 20; - D_ctx_80178574 = 20; - D_ctx_80178578 = 20; + gLight2colorStep = 5; + gLight2RTarget = 20; + gLight2GTarget = 20; + gLight2BTarget = 20; gPlayer[0].shadowing = 100; } Matrix_MultVec3f(gCalcMatrix, &D_i1_801998CC, &sp84[0]); @@ -1729,7 +1729,7 @@ void Corneria_8018C19C(Boss* boss) { boss->fwork[12] = 1.5f; boss->fwork[6] = 800.0f; boss->fwork[3] = gPlayer[0].cam.eye.z - D_ctx_80177D20 - 2500.0f; - boss->fwork[18] = -D_play_80161A54; + boss->fwork[18] = -gArwingSpeed; AUDIO_PLAY_BGM(SEQ_ID_CO_BOSS_2 | SEQ_FLAG); boss->timer_050 = 40; } @@ -1894,7 +1894,7 @@ void Corneria_8018C19C(Boss* boss) { } } if (boss->health < 2) { - D_ctx_8017796C = -1; + gTeamLowHealthMsgTimer = -1; Audio_KillSfxBySourceAndId(boss->sfxSource, 0x31034025); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 40); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 40); @@ -1948,13 +1948,13 @@ void Corneria_8018C19C(Boss* boss) { Math_SmoothStepToAngle(&boss->obj.rot.z, boss->fwork[14], 1.0f, 1.0f, 0.001f); if (boss->health != 0) { if (boss->timer_056 == 0) { - func_boss_80042EC0(boss); + Boss_AwardBonus(boss); boss->fwork[17] = 10.0f; boss->vel.y *= 1.5f; gMissionStatus = MISSION_ACCOMPLISHED; if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { - func_boss_8004319C(gPlayer, boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z); + Boss_CompleteLevel(gPlayer, boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z); } boss->health--; boss->fwork[8] = 0.0f; @@ -2691,7 +2691,7 @@ void Corneria_LevelStart(Player* player) { player->pos.x = 0.0f; } if (player->timer_1F8 == 270) { - D_ctx_80178300 = 0; + gHideRadio = 0; Radio_PlayMessage(gMsg_ID_2005, RCID_FOX); } if (player->timer_1F8 == 180) { @@ -2736,7 +2736,7 @@ void Corneria_LevelStart(Player* player) { actor0->obj.pos.y = player->pos.y + 80.0f; actor0->obj.pos.z += 100.0f; } - if (D_ctx_801782F8 && (gGameFrameCount & 2)) { + if (gMsgCharIsPrinting && (gGameFrameCount & 2)) { player->wings.unk_30 = 5.0f; } break; @@ -2746,14 +2746,14 @@ void Corneria_LevelStart(Player* player) { D_ctx_80177A48[0] = 0.0f; player->timer_1F8 = 190; } - if (D_ctx_801782F8 && (gGameFrameCount & 2)) { + if (gMsgCharIsPrinting && (gGameFrameCount & 2)) { player->wings.unk_30 = 5.0f; } gCsCamEyeY = player->pos.y + 10.0f; gCsCamAtY = player->pos.y + 10.0f; break; case 4: - if (D_ctx_801782F8 && (gGameFrameCount & 2)) { + if (gMsgCharIsPrinting && (gGameFrameCount & 2)) { player->wings.unk_30 = 5.0f; } Math_SmoothStepToF(&D_ctx_80177A48[0], 0.1f, 1.0f, 0.001f, 0.0f); @@ -2774,7 +2774,7 @@ void Corneria_LevelStart(Player* player) { Math_SmoothStepToF(&actor0->fwork[19], 50.0f, 0.1f, 3.0f, 0.01f); } actor0->fwork[20] = 0.0f; - if (D_ctx_801782F8 && (gGameFrameCount & 2)) { + if (gMsgCharIsPrinting && (gGameFrameCount & 2)) { actor0->fwork[20] = 5.0f; } break; @@ -2814,7 +2814,7 @@ void Corneria_LevelStart(Player* player) { Radio_PlayMessage(gMsg_ID_2030, RCID_PEPPY); } actor2->fwork[20] = 0.0f; - if (D_ctx_801782F8 && (gGameFrameCount & 2)) { + if (gMsgCharIsPrinting && (gGameFrameCount & 2)) { actor2->fwork[20] = 5.0f; } break; @@ -2841,7 +2841,7 @@ void Corneria_LevelStart(Player* player) { Math_SmoothStepToF(&actor1->fwork[19], -20.0f, 0.1f, 3.0f, 0.01f); } actor1->fwork[20] = 0.0f; - if (D_ctx_801782F8 && (gGameFrameCount & 2)) { + if (gMsgCharIsPrinting && (gGameFrameCount & 2)) { actor1->fwork[20] = 5.0f; } break; @@ -2864,7 +2864,7 @@ void Corneria_LevelStart(Player* player) { Radio_PlayMessage(gMsg_ID_2050, RCID_FOX); } player->wings.unk_30 = 0.0f; - if (D_ctx_801782F8 && (gGameFrameCount & 2)) { + if (gMsgCharIsPrinting && (gGameFrameCount & 2)) { player->wings.unk_30 = 5.0f; } if (player->timer_1F8 == 80) { @@ -3031,7 +3031,7 @@ void Corneria_LevelComplete1(Player* player) { Math_SmoothStepToF(&player->unk_12C, 0.0f, 0.1f, 15.0f, 0.0f); Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f); Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 20.0f, 0.0f); - Math_SmoothStepToF(&player->unk_110, 0.0f, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToF(&player->boostSpeed, 0.0f, 0.1f, 3.0f, 0.0f); if (player->unk_1D0 >= 3) { player->cam.eye.y += 3.0f; player->cam.at.y += 3.0f; @@ -3109,7 +3109,7 @@ void Corneria_LevelComplete1(Player* player) { } Math_SmoothStepToAngle(&player->unk_0E4, 20.0f, 0.1f, 0.5f, 0); Math_SmoothStepToAngle(&player->unk_0EC, 0.0f, 0.1f, 1.0f, 0); - Math_SmoothStepToF(&player->unk_0D0, 0.0f, 0.1f, 2.0f, 0.0f); + Math_SmoothStepToF(&player->baseSpeed, 0.0f, 0.1f, 2.0f, 0.0f); Math_SmoothStepToF(&D_ctx_80177A48[2], 0.1f, 1.0f, 0.002f, 0); Math_SmoothStepToF(&D_ctx_80177A48[3], 0.1f, 1.0f, 0.002f, 0); Matrix_RotateY(gCalcMatrix, player->unk_0E8 * M_DTOR, MTXF_NEW); @@ -3143,14 +3143,14 @@ void Corneria_LevelComplete1(Player* player) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); player->unk_1D0++; - player->unk_0D0 = 2.0f; + player->baseSpeed = 2.0f; player->unk_194 = 5.0f; player->unk_190 = 5.0f; } break; case 4: if (gCsFrameCount >= 1270) { - player->unk_0D0 *= 1.2f; + player->baseSpeed *= 1.2f; player->unk_25C += 0.04f; if (player->unk_25C > 0.6f) { player->unk_25C = 0.6f; @@ -3255,7 +3255,7 @@ void Corneria_LevelComplete1(Player* player) { Matrix_RotateX(gCalcMatrix, -((player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); sp64.x = 0.0f; sp64.y = 0.0f; - sp64.z = player->unk_0D0 + player->unk_110; + sp64.z = player->baseSpeed + player->boostSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp64, &sp58); player->vel.x = sp58.x; player->vel.z = sp58.z; diff --git a/src/overlays/ovl_i1/fox_ve1.c b/src/overlays/ovl_i1/fox_ve1.c index c3edfb90..79d882dc 100644 --- a/src/overlays/ovl_i1/fox_ve1.c +++ b/src/overlays/ovl_i1/fox_ve1.c @@ -1580,7 +1580,7 @@ void Venom1_80194398(Boss* boss) { if (boss->health <= 0) { gScreenFlashTimer = 8; - D_ctx_8017796C = -1; + gTeamLowHealthMsgTimer = -1; D_ctx_8017828C = 1; AUDIO_PLAY_SFX(0x2940D09A, boss->sfxSource, 4); boss->health = 0; @@ -1628,7 +1628,7 @@ void Venom1_80194398(Boss* boss) { boss->timer_05A = 35; if (boss->health <= 0) { gScreenFlashTimer = 8; - D_ctx_8017796C = -1; + gTeamLowHealthMsgTimer = -1; D_ctx_8017828C = 1; AUDIO_PLAY_SFX(0x2940D09A, boss->sfxSource, 4); boss->health = 0; @@ -1910,7 +1910,7 @@ void Venom1_80194398(Boss* boss) { } break; case 49: - func_boss_80042EC0(boss); + Boss_AwardBonus(boss); gShowBossHealth = 0; boss->swork[28] = 9; AUDIO_PLAY_SFX(0x29405084, boss->sfxSource, 4); diff --git a/src/overlays/ovl_i2/fox_me.c b/src/overlays/ovl_i2/fox_me.c index 2479cd07..aa1f4bbe 100644 --- a/src/overlays/ovl_i2/fox_me.c +++ b/src/overlays/ovl_i2/fox_me.c @@ -761,19 +761,19 @@ void Meteo_801892F0(Boss* boss, s32 arg1) { void Meteo_80189624(void) { if ((gGameFrameCount % 2) != 0) { - D_ctx_801784B8 = D_ctx_801784C4 = 0.0f; - D_ctx_801784BC = D_ctx_801784C8 = 5.0f; - D_ctx_801784C0 = D_ctx_801784CC = 0.0f; - D_ctx_801784EC = D_ctx_801784F8 = 0.0f; - D_ctx_801784F0 = D_ctx_801784FC = 100.0f; - D_ctx_801784F4 = D_ctx_80178500 = 0.0f; + gLight1xRot = gLight1xRotTarget = 0.0f; + gLight1yRot = gLight1yRotTarget = 5.0f; + gLight1zRot = gLight1zRotTarget = 0.0f; + gLight2xRot = gLight2xRotTarget = 0.0f; + gLight2yRot = gLight2yRotTarget = 100.0f; + gLight2zRot = gLight2zRotTarget = 0.0f; } else { - D_ctx_801784B8 = D_ctx_801784C4 = 0.0f; - D_ctx_801784BC = D_ctx_801784C8 = -5.0f; - D_ctx_801784C0 = D_ctx_801784CC = 0.0f; - D_ctx_801784EC = D_ctx_801784F8 = 0.0f; - D_ctx_801784F0 = D_ctx_801784FC = 110.0f; - D_ctx_801784F4 = D_ctx_80178500 = 0.0f; + gLight1xRot = gLight1xRotTarget = 0.0f; + gLight1yRot = gLight1yRotTarget = -5.0f; + gLight1zRot = gLight1zRotTarget = 0.0f; + gLight2xRot = gLight2xRotTarget = 0.0f; + gLight2yRot = gLight2yRotTarget = 110.0f; + gLight2zRot = gLight2zRotTarget = 0.0f; } } @@ -922,7 +922,7 @@ void Meteo_8018978C(Boss* boss) { if (boss->swork[7] <= 0) { if (boss->swork[8] <= 0) { - func_boss_80042EC0(boss); + Boss_AwardBonus(boss); boss->state = 20; boss->timer_050 = 300; @@ -951,7 +951,7 @@ void Meteo_8018978C(Boss* boss) { if (boss->state >= 3) { if (boss->state < 20) { - Math_SmoothStepToF(&boss->vel.z, -D_play_80161A54, 0.1f, 2.0f, 0.0f); + Math_SmoothStepToF(&boss->vel.z, -gArwingSpeed, 0.1f, 2.0f, 0.0f); if ((boss->fwork[9] + 200.0f) < sp7C) { Math_SmoothStepToF(&boss->vel.z, -60.0f, 0.1f, 4.0f, 0.0f); } @@ -1074,9 +1074,9 @@ void Meteo_8018978C(Boss* boss) { } if ((sp7C < 200.0f) && (sp7C > -1500.0f)) { - D_ctx_801784F8 = 0.0f; - D_ctx_801784FC = 150.0f; - D_ctx_80178500 = 0.0f; + gLight2xRotTarget = 0.0f; + gLight2yRotTarget = 150.0f; + gLight2zRotTarget = 0.0f; } switch (boss->state) { @@ -1231,14 +1231,14 @@ void Meteo_8018978C(Boss* boss) { } if (boss->timer_050 == 0) { - D_ctx_801784C4 = 0.0f; - D_ctx_801784C8 = 5.0f; - D_ctx_801784CC = 0.0f; - D_ctx_801784F8 = 0.0f; - D_ctx_801784FC = 100.0f; - D_ctx_80178500 = 0.0f; - D_ctx_801784E8 = 5.0f; - D_ctx_80178510 = 5.0f; + gLight1xRotTarget = 0.0f; + gLight1yRotTarget = 5.0f; + gLight1zRotTarget = 0.0f; + gLight2xRotTarget = 0.0f; + gLight2yRotTarget = 100.0f; + gLight2zRotTarget = 0.0f; + gLight1rotStep = 5.0f; + gLight2rotStep = 5.0f; if (boss->fwork[11] < 70.0f) { boss->fwork[11] += 1.0f; @@ -2219,7 +2219,7 @@ void Meteo_LevelComplete(Player* player) { Math_SmoothStepToF(&player->unk_08C, 0.0f, 0.1f, 3.0f, 0.0f); Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f); Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 20.0f, 0.0f); - Math_SmoothStepToF(&player->unk_110, 0.0f, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToF(&player->boostSpeed, 0.0f, 0.1f, 3.0f, 0.0f); switch (player->unk_1D0) { case 0: @@ -2254,7 +2254,7 @@ void Meteo_LevelComplete(Player* player) { Math_SmoothStepToF(&D_ctx_80177A48[1], 180.0f, 0.05f, 1.0f, 0.0f); Math_SmoothStepToF(&D_ctx_80177A48[2], 1500.0f, 0.1f, 10.0f, 0.0f); Math_SmoothStepToF(&D_ctx_80177A48[0], 0.1f, 0.1f, 0.001f, 0.0f); - Math_SmoothStepToF(&player->unk_0D0, 0.0f, 1.0f, 0.5f, 0.0f); + Math_SmoothStepToF(&player->baseSpeed, 0.0f, 1.0f, 0.5f, 0.0f); Math_SmoothStepToF(&gBosses[0].vel.z, 0.0f, 1.0f, 0.5f, 0.0f); Math_SmoothStepToF(&player->unk_0E4, 0.0f, 0.1f, 3.0f, 0.0f); @@ -2314,7 +2314,7 @@ void Meteo_LevelComplete(Player* player) { gCsCamAtZ = player->unk_138 + D_ctx_80177D20 + 150.0f; if (gCsFrameCount > 1390) { - player->unk_0D0 += 2.0f; + player->baseSpeed += 2.0f; player->unk_0E4 += 0.1f; player->unk_190 = 2.0f; @@ -2455,7 +2455,7 @@ void Meteo_LevelComplete(Player* player) { src.x = 0.0f; src.y = 0.0f; - src.z = player->unk_0D0 + player->unk_110; + src.z = player->baseSpeed + player->boostSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); diff --git a/src/overlays/ovl_i2/fox_sx.c b/src/overlays/ovl_i2/fox_sx.c index 55e90771..deb8d41d 100644 --- a/src/overlays/ovl_i2/fox_sx.c +++ b/src/overlays/ovl_i2/fox_sx.c @@ -320,13 +320,13 @@ void SectorX_80190078(Boss* boss) { s32 frameData; gBossFrameCount++; - D_ctx_80178540 = 5; + gLight2colorStep = 5; attack = false; if (gBossFrameCount < 150) { - D_ctx_80178570 = 20; - D_ctx_80178574 = 20; - D_ctx_80178578 = 20; + gLight2RTarget = 20; + gLight2GTarget = 20; + gLight2BTarget = 20; } PRINTF("たかおちゃん よう見ときや!\n"); // Takao-chan, look at it! @@ -446,7 +446,7 @@ void SectorX_80190078(Boss* boss) { AUDIO_PLAY_SFX(0x2903300E, boss->sfxSource, 4); if (boss->health <= 0) { - D_ctx_8017796C = -1; + gTeamLowHealthMsgTimer = -1; boss->obj.rot.y = Math_ModF(boss->obj.rot.y, 360.0f); boss->state = 20; boss->timer_050 = 300; @@ -472,7 +472,7 @@ void SectorX_80190078(Boss* boss) { gScreenFlashTimer = 8; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); - func_boss_80042EC0(boss); + Boss_AwardBonus(boss); boss->info.hitbox = gNoHitbox; } @@ -1470,7 +1470,7 @@ void SectorX_LevelStart(Player* player) { player->cam.at.y = gCsCamAtY = 0.0f; player->cam.at.z = gCsCamAtZ = -1000.0f; player->camRoll = -5.0f; - player->unk_0D0 = 0.0f; + player->baseSpeed = 0.0f; gFillScreenAlpha = 255; /* fallthrough */ case 1: @@ -1519,7 +1519,7 @@ void SectorX_LevelStart(Player* player) { player->pos.z = player->cam.eye.z + 20.0f; player->unk_194 = 10.0f; player->unk_190 = 10.0f; - player->unk_0D0 = 30.0f; + player->baseSpeed = 30.0f; player->unk_0EC = -80.0f; player->unk_0E4 = -20.0f; AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); @@ -1572,7 +1572,7 @@ void SectorX_LevelStart(Player* player) { player->cam.at.z -= player->pos.z; gCsCamAtZ -= player->pos.z; player->pos.z = 0.0f; - player->unk_0D0 = 0.0f; + player->baseSpeed = 0.0f; } break; @@ -1589,7 +1589,7 @@ void SectorX_LevelStart(Player* player) { Math_SmoothStepToF(D_ctx_80177A48, 1.0f, 1.0f, 0.01f, 0); if (player->timer_1F8 == 0) { - player->unk_0D0 = D_play_80161A54; + player->baseSpeed = gArwingSpeed; AUDIO_PLAY_BGM(gBgmSeqId); gLevelStartStatusScreenTimer = 80; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; @@ -1616,7 +1616,7 @@ void SectorX_LevelStart(Player* player) { Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; - src.z = player->unk_0D0; + src.z = player->baseSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); player->vel.x = dest.x; player->vel.z = dest.z; @@ -1686,7 +1686,7 @@ void SectorX_LevelComplete(Player* player) { Math_SmoothStepToF(&player->unk_08C, 0.0f, 0.1f, 3.0f, 0.0f); Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f); Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 20.0f, 0.0f); - Math_SmoothStepToF(&player->unk_110, 0.0f, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToF(&player->boostSpeed, 0.0f, 0.1f, 3.0f, 0.0f); D_ctx_80178430 += 0.2f; D_ctx_8017842C -= 0.2f; @@ -1715,7 +1715,7 @@ void SectorX_LevelComplete(Player* player) { Math_SmoothStepToF(D_ctx_80177A48 + 5, -50.0f, 0.1f, 1.0f, 0.0f); } D_ctx_80177A48[2] += D_ctx_80177A48[3]; - Math_SmoothStepToF(&player->unk_0D0, 0.0f, 0.1f, 2.0f, 0.0f); + Math_SmoothStepToF(&player->baseSpeed, 0.0f, 0.1f, 2.0f, 0.0f); Math_SmoothStepToF(D_ctx_80177A48, 0.1f, 1.0f, 0.002f, 0.0f); Math_SmoothStepToF(D_ctx_80177A48 + 1, 0.1f, 1.0f, 0.002f, 0.0f); Matrix_RotateY(gCalcMatrix, player->unk_0E8 * M_DTOR, MTXF_NEW); @@ -1742,7 +1742,7 @@ void SectorX_LevelComplete(Player* player) { break; case 2: - player->unk_0D0 += 2.0f; + player->baseSpeed += 2.0f; if (player->timer_1F8 == 0) { Math_SmoothStepToAngle(&player->unk_0E4, 20.0f, 0.1f, 0.5f, 0.0f); } @@ -1929,7 +1929,7 @@ void SectorX_LevelComplete(Player* player) { Matrix_RotateX(gCalcMatrix, -((player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); sp54.x = 0.0f; sp54.y = 0.0f; - sp54.z = player->unk_0D0 + player->unk_110; + sp54.z = player->baseSpeed + player->boostSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48); player->vel.x = sp48.x; player->vel.z = sp48.z; diff --git a/src/overlays/ovl_i3/fox_a6.c b/src/overlays/ovl_i3/fox_a6.c index 34a25827..0e4b3090 100644 --- a/src/overlays/ovl_i3/fox_a6.c +++ b/src/overlays/ovl_i3/fox_a6.c @@ -578,10 +578,10 @@ void Area6_80187944(Boss* bossA6) { if (bossA6->health <= 0) { bossA6->health = 0; - func_boss_80042EC0(bossA6); + Boss_AwardBonus(bossA6); Radio_PlayMessage(gMsg_ID_15252, RCID_SLIPPY); - D_ctx_8017796C = -1; + gTeamLowHealthMsgTimer = -1; D_bg_8015F984 = (D_ctx_80177D20 * 0.00004f) + 0.5f; @@ -2296,7 +2296,7 @@ void Area6_LevelStart(Player* player) { player->pos.x = 0.0f; player->pos.y = 350.0f; player->pos.z = 16000.0f; - player->unk_0D0 = 30.0f; + player->baseSpeed = 30.0f; if (gTeamShields[TEAM_ID_FALCO] > 0) { Area6_8018D804(&gActors[3], 0); } @@ -2366,10 +2366,10 @@ void Area6_LevelStart(Player* player) { AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); } if (gCsFrameCount >= 460) { - Math_SmoothStepToF(&player->unk_0D0, 50.0f, 0.1f, 3.0f, 0.01f); + Math_SmoothStepToF(&player->baseSpeed, 50.0f, 0.1f, 3.0f, 0.01f); } if (player->pos.z < 30.0f) { - player->unk_0D0 = player->pos.z = 0.0f; + player->baseSpeed = player->pos.z = 0.0f; } if (gCsFrameCount == 540) { gLoadLevelObjects = 1; @@ -2377,7 +2377,7 @@ void Area6_LevelStart(Player* player) { player->pos.x = 0.0f; player->pos.z = 0.0f; player->pos.y = 350.0f; - player->unk_0D0 = D_play_80161A54; + player->baseSpeed = gArwingSpeed; player->unk_1D0 = 0; player->timer_1F8 = 0; @@ -2453,7 +2453,7 @@ void Area6_LevelStart(Player* player) { if (player->state_1C8 != PLAYERSTATE_1C8_ACTIVE) { sp74.x = 0.0f; sp74.y = 0.0f; - sp74.z = player->unk_0D0; + sp74.z = player->baseSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp74, &sp68); player->vel.x = sp68.x; player->vel.z = sp68.z; @@ -2555,7 +2555,7 @@ void Area6_LevelComplete(Player* player) { player->wings.modelId = 1; player->unk_194 = 5.0f; player->unk_190 = 2.0f; - player->unk_0D0 = 60.0f; + player->baseSpeed = 60.0f; AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); D_ctx_80177A48[3] = 0.0f; /* fallthrough */ @@ -2583,7 +2583,7 @@ void Area6_LevelComplete(Player* player) { } if (gCsFrameCount == 60) { player->unk_234 = 0; - player->unk_0D0 = 0.0f; + player->baseSpeed = 0.0f; } Math_SmoothStepToF(&gCsCamEyeX, gBosses[0].obj.pos.x, 0.05f, 1000.0f, 0.001f); Math_SmoothStepToF(&gCsCamEyeY, gBosses[0].obj.pos.y, 0.05f, 1000.0f, 0.001f); @@ -2653,8 +2653,8 @@ void Area6_LevelComplete(Player* player) { player->pos.x = 0.0f; player->pos.y = 200.0f; player->pos.z = 1000.0f; - player->unk_08C = player->unk_0EC = player->unk_0E8 = player->unk_0E4 = player->unk_0D0 = - player->unk_110 = player->camRoll = player->unk_12C = player->unk_130 = player->unk_4D8 = 0.0f; + player->unk_08C = player->unk_0EC = player->unk_0E8 = player->unk_0E4 = player->baseSpeed = + player->boostSpeed = player->camRoll = player->unk_12C = player->unk_130 = player->unk_4D8 = 0.0f; D_bg_8015F984 = (D_ctx_80177D20 * 0.00004f) + 0.5f; Area6_8018EC38(&gActors[1], 0); @@ -2794,13 +2794,13 @@ void Area6_LevelComplete(Player* player) { Math_SmoothStepToF(&gActors[3].fwork[0], 50.0f, 0.1f, 1000.0f, 0.001f); } if (gCsFrameCount >= 1076) { - Math_SmoothStepToF(&player->unk_0D0, 50.0f, 0.1f, 1000.0f, 0.001f); + Math_SmoothStepToF(&player->baseSpeed, 50.0f, 0.1f, 1000.0f, 0.001f); } Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + player->unk_114 + 180.0f) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), MTXF_APPLY); sp78.x = 0.0f; sp78.y = 0.0f; - sp78.z = player->unk_0D0; + sp78.z = player->baseSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp78, &sp6C); player->vel.x = sp6C.x; player->vel.z = sp6C.z; diff --git a/src/overlays/ovl_i3/fox_aq.c b/src/overlays/ovl_i3/fox_aq.c index a5531d11..36ad1664 100644 --- a/src/overlays/ovl_i3/fox_aq.c +++ b/src/overlays/ovl_i3/fox_aq.c @@ -456,7 +456,7 @@ void Aquas_801A9824(void) { D_i3_801C41B8[16] = 30.0f; D_i3_801C41B8[17] = 50.0f; - if (D_ctx_80177CA0 != 0) { + if (gSavedObjectLoadIndex != 0) { D_i3_801C41B8[12] = 0.0f; D_i3_801C41B8[13] = 3.0f; D_i3_801C41B8[14] = 5.0f; @@ -955,7 +955,7 @@ void Aquas_801AACF8(Player* player) { Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); sp8C.x = sp8C.y = 0.0f; - sp8C.z = player->unk_0D0; + sp8C.z = player->baseSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp8C, &sp68); @@ -968,7 +968,7 @@ void Aquas_801AACF8(Player* player) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp68, &sp80); sp8C.x = sp8C.y = 0.0f; - sp8C.z = -player->unk_110; + sp8C.z = -player->boostSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp8C, &sp74); @@ -1012,7 +1012,7 @@ void Aquas_801AACF8(Player* player) { } if (D_i3_801C4190[6] != 0) { - player->unk_0D0 = 20.0f; + player->baseSpeed = 20.0f; Math_SmoothStepToF(&D_i3_801BFB60, -40.0f, 0.01f, 0.1f, 0.0f); player->vel.z += D_i3_801BFB60; if (player->vel.z <= 0.0f) { @@ -1028,13 +1028,13 @@ void Aquas_801AACF8(Player* player) { player->unk_080 = -SIN_DEG(player->unk_088) * 0.5f; player->unk_0F0 = SIN_DEG(player->unk_0F4) * 1.5f; - if (player->pos.y < (D_ctx_80177CC0 + 50.0f)) { + if (player->pos.y < (gWaterLevel + 50.0f)) { Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + player->unk_114) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, MTXF_APPLY); sp8C.x = sp8C.y = 0.0f; sp8C.z = 70.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp8C, &sp80); - if (player->unk_110 > 1.0f) { + if (player->boostSpeed > 1.0f) { player->unk_178 -= 30.0f; Aquas_801AC8A8(player->pos.x + RAND_FLOAT_CENTERED(10.0f) + sp80.x, player->pos.y + RAND_FLOAT_CENTERED(10.0f) + sp80.y, @@ -1437,7 +1437,7 @@ void Aquas_801ACE50(Player* player) { if (player->timer_27C != 0) { player->timer_27C--; - player->unk_110 += 0.3f; + player->boostSpeed += 0.3f; Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + player->unk_114) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, MTXF_APPLY); @@ -1484,9 +1484,9 @@ void Aquas_801ACE50(Player* player) { player->boostMeter = 90.0f; player->boostCooldown = 1; } - player->unk_110 += 2.0f; - if (player->unk_110 > 10.0f) { - player->unk_110 = 10.0f; + player->boostSpeed += 2.0f; + if (player->boostSpeed > 10.0f) { + player->boostSpeed = 10.0f; } Math_SmoothStepToF(&D_i3_801C41B8[27], 10.0f, 0.1f, 2.0f, 0.00001f); Math_SmoothStepToF(&player->unk_08C, -200.0f, 0.1f, D_i3_801C41B8[27], 0.00001f); @@ -1501,10 +1501,10 @@ void Aquas_801ACE50(Player* player) { player->boostCooldown = 0; } } - if (player->unk_110 > 0.0f) { - player->unk_110 -= 1.0f; - if (player->unk_110 < 0.0f) { - player->unk_110 = 0.0f; + if (player->boostSpeed > 0.0f) { + player->boostSpeed -= 1.0f; + if (player->boostSpeed < 0.0f) { + player->boostSpeed = 0.0f; } } } @@ -1524,9 +1524,9 @@ void Aquas_801AD328(Player* player) { player->boostMeter = 90.0f; player->boostCooldown = 1; } - player->unk_110 -= 1.0f; - if (player->unk_110 < -20.0f) { - player->unk_110 = -20.0f; + player->boostSpeed -= 1.0f; + if (player->boostSpeed < -20.0f) { + player->boostSpeed = -20.0f; } Math_SmoothStepToF(&D_i3_801C41B8[28], 10.0f, 1.0f, 2.0f, 0.00001f); Math_SmoothStepToF(&player->unk_08C, 180.0f, 0.1f, D_i3_801C41B8[28], 0.0f); @@ -1543,10 +1543,10 @@ void Aquas_801AD328(Player* player) { Math_SmoothStepToF(&D_i3_801C41B8[28], 0.0f, 1.0f, 1.0f, 0.0001f); - if (player->unk_110 < 0.0f) { - player->unk_110 += 0.5f; - if (player->unk_110 > 0.0f) { - player->unk_110 = 0.0f; + if (player->boostSpeed < 0.0f) { + player->boostSpeed += 0.5f; + if (player->boostSpeed > 0.0f) { + player->boostSpeed = 0.0f; } } } @@ -2937,9 +2937,9 @@ void Aquas_801B134C(Boss* bossAQ) { if (bossAQ->health <= 0) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 40); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 40); - func_boss_80042EC0(bossAQ); + Boss_AwardBonus(bossAQ); Radio_PlayMessage(gMsg_ID_15252, RCID_SLIPPY); - D_ctx_8017796C = -1; + gTeamLowHealthMsgTimer = -1; if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; diff --git a/src/overlays/ovl_i3/fox_so.c b/src/overlays/ovl_i3/fox_so.c index 722c15b7..be76e90f 100644 --- a/src/overlays/ovl_i3/fox_so.c +++ b/src/overlays/ovl_i3/fox_so.c @@ -983,7 +983,7 @@ void Solar_LevelStart(Player* player) { D_ctx_80177A48[0] = 0.0045f; player->camRoll = 0.0f; - player->unk_0D0 = 0.0f; + player->baseSpeed = 0.0f; gFillScreenAlpha = 255; gFillScreenAlphaTarget = 0; @@ -1112,7 +1112,7 @@ void Solar_LevelStart(Player* player) { if (gFillScreenAlpha == 255) { AUDIO_PLAY_BGM(SEQ_ID_SOLAR | SEQ_FLAG); player->pos.z = 0.0f; - player->unk_0D0 = D_play_80161A54; + player->baseSpeed = gArwingSpeed; Play_ClearObjectData(); gLevelStartStatusScreenTimer = 50; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; @@ -1150,7 +1150,7 @@ void Solar_LevelStart(Player* player) { Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), MTXF_APPLY); sp50.x = 0.f; sp50.y = 0.0f; - sp50.z = player->unk_0D0; + sp50.z = player->baseSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp50, &sp44); player->vel.x = sp44.x; player->vel.z = sp44.z; @@ -1804,7 +1804,7 @@ void Solar_801A3C4C(Boss* bossSO) { bossSO->fwork[SO_FWK_0] = 0.01f; bossSO->info.hitbox = SEGMENTED_TO_VIRTUAL(gNoHitbox); bossSO->timer_058 = 20000; - D_ctx_8017796C = -1; + gTeamLowHealthMsgTimer = -1; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 255; gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 255; @@ -1887,7 +1887,7 @@ void Solar_801A4214(Boss* bossSO) { gFillScreenBlue = 255; gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 4; - func_boss_80042EC0(bossSO); + Boss_AwardBonus(bossSO); bossSO->swork[SO_SWK_4]++; Math_SmoothStepToF(&bossSO->obj.pos.y, 180.0f, 0.1f, 10.0f, 0.1f); } @@ -2814,10 +2814,10 @@ void Solar_LevelComplete(Player* player) { case 0: gCsFrameCount = 0; player->camRoll = player->unk_4D8 = 0.0f; - player->unk_0D0 = 40.0f; + player->baseSpeed = 40.0f; player->wings.unk_04 = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = - player->unk_130 = player->unk_12C = player->unk_110 = 0.0f; + player->unk_130 = player->unk_12C = player->boostSpeed = 0.0f; player->unk_234 = 1; gCsCamEyeX = player->cam.eye.x; gCsCamEyeY = player->cam.eye.y; @@ -2880,7 +2880,7 @@ void Solar_LevelComplete(Player* player) { Audio_KillSfxBySource(player->sfxSource); gFillScreenAlpha = 250; player->timer_1F8 = 20; - player->unk_0D0 = 0.0f; + player->baseSpeed = 0.0f; player->unk_0E4 = 0.0f; player->unk_0E8 = 0.0f; player->unk_0EC = 0.0f; @@ -2916,7 +2916,7 @@ void Solar_LevelComplete(Player* player) { D_ctx_80177CE8 += 60.0f; gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 4; - if (D_ctx_801782F8) { + if (gMsgCharIsPrinting) { player->wings.unk_30 = (s32) (gGameFrameCount % 2U) * 5.0f; } switch (gCsFrameCount) { @@ -3000,7 +3000,7 @@ void Solar_LevelComplete(Player* player) { gCsCamAtZ = player->pos.z + D_ctx_80177D20 + 200.0f - ((gCsFrameCount * 8) - 11200); } if (gCsFrameCount > 1460) { - player->unk_0D0 += 2.0f; + player->baseSpeed += 2.0f; player->unk_0E4 += 0.2f; Math_SmoothStepToF(&D_ctx_80177A48[2], 0.0f, 1.0f, 0.001f, 0); player->unk_190 = 2.0f; @@ -3106,7 +3106,7 @@ void Solar_LevelComplete(Player* player) { Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4) * M_DTOR), MTXF_APPLY); sp60.x = 0.0f; sp60.y = 0.0f; - sp60.z = player->unk_0D0; + sp60.z = player->baseSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp60, &sp54); player->vel.x = sp54.x; player->vel.z = sp54.z; diff --git a/src/overlays/ovl_i3/fox_zo.c b/src/overlays/ovl_i3/fox_zo.c index 7513903b..e05946dd 100644 --- a/src/overlays/ovl_i3/fox_zo.c +++ b/src/overlays/ovl_i3/fox_zo.c @@ -93,7 +93,7 @@ void Zoness_8019962C(Boss* bossZO, f32 arg1); // /* 240 */ Vec3f unk_F0; // /* 252 */ char padFC[8]; // /* 260 */ Vec3f unk_104; -// /* 272 */ Vec3f unk_110; +// /* 272 */ Vec3f boostSpeed; // /* 284 */ Vec3f unk_11C; // /* 296 */ char pad128[76]; // /* 372 */ Vec3f unk_174; @@ -2505,12 +2505,12 @@ void Zoness_80194A84(Boss* bossZO) { gPlayer[0].unk_0E8 += 360.0f; } gPlayer[0].unk_114 = 0.0f; - func_boss_8004319C(&gPlayer[0], bossZO->obj.pos.x, 0.0f, bossZO->obj.pos.z); + Boss_CompleteLevel(&gPlayer[0], bossZO->obj.pos.x, 0.0f, bossZO->obj.pos.z); } bossZO->timer_050 = 70; sZoSwork[ZO_BSS_5] = 0; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 0; - func_boss_80042EC0(bossZO); + Boss_AwardBonus(bossZO); bossZO->state = 7; } break; @@ -2831,7 +2831,7 @@ void Zoness_80194A84(Boss* bossZO) { AUDIO_PLAY_SFX(0x29034003, bossZO->sfxSource, 4); } if (bossZO->health <= 0) { - D_ctx_8017796C = -1; + gTeamLowHealthMsgTimer = -1; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 40); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 40); Audio_KillSfxBySource(bossZO->sfxSource); @@ -4532,10 +4532,10 @@ void Zoness_LevelComplete(Player* player) { gCsFrameCount = 0; player->unk_4D8 = 0.0f; player->camRoll = 0.0f; - player->unk_0D0 = 40.0f; + player->baseSpeed = 40.0f; player->unk_234 = 1; player->wings.unk_04 = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = - player->unk_130 = player->unk_12C = player->unk_110 = 0.0f; + player->unk_130 = player->unk_12C = player->boostSpeed = 0.0f; gCsCamEyeX = player->cam.eye.x; gCsCamEyeY = player->cam.eye.y; gCsCamEyeZ = player->cam.eye.z; @@ -4587,7 +4587,7 @@ void Zoness_LevelComplete(Player* player) { gFillScreenAlpha = 250; player->timer_1F8 = 20; player->wings.modelId = 1; - player->unk_0D0 = 0.0f; + player->baseSpeed = 0.0f; player->unk_0E4 = 0.0f; player->unk_0E8 = 0.0f; player->unk_0EC = 0.0f; @@ -4653,7 +4653,7 @@ void Zoness_LevelComplete(Player* player) { gCsCamAtZ = player->pos.z + D_ctx_80177D20; } if (gCsFrameCount > 1180) { - player->unk_0D0 += 2.0f; + player->baseSpeed += 2.0f; player->unk_0E4 += 0.1f; Math_SmoothStepToF(&D_ctx_80177A48[2], 0.0f, 1.0f, 0.001f, 0); player->unk_190 = 2.0f; @@ -4776,7 +4776,7 @@ void Zoness_LevelComplete(Player* player) { Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4) * M_DTOR), MTXF_APPLY); sp58.x = 0.0f; sp58.y = 0.0f; - sp58.z = player->unk_0D0; + sp58.z = player->baseSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp58, &sp4C); player->vel.x = sp4C.x; player->vel.z = sp4C.z; diff --git a/src/overlays/ovl_i4/fox_bo.c b/src/overlays/ovl_i4/fox_bo.c index 984b032e..3f096169 100644 --- a/src/overlays/ovl_i4/fox_bo.c +++ b/src/overlays/ovl_i4/fox_bo.c @@ -1034,7 +1034,7 @@ void Bolse_8018EAEC(Actor* actor, s32 index) { actor->obj.pos.z = D_i4_8019EFF4[index] + gPlayer[0].pos.z; actor->unk_0B6 = D_i4_8019F000[index]; actor->obj.rot.y = 180.0f; - actor->vel.z = -gPlayer[0].unk_0D0; + actor->vel.z = -gPlayer[0].baseSpeed; actor->unk_0F4.z = D_i4_8019F00C[index]; actor->unk_0F4.y = D_i4_8019F018[index]; Object_SetInfo(&actor->info, actor->obj.id); @@ -1157,7 +1157,7 @@ void Bolse_LevelStart(Player* player) { player->pos.z = 0; player->pos.y = 0; - player->unk_0D0 = 30.0f; + player->baseSpeed = 30.0f; if (gTeamShields[TEAM_ID_FALCO] > 0) { Bolse_8018EAEC(&gActors[0], 0); @@ -1297,7 +1297,7 @@ void Bolse_LevelStart(Player* player) { if (gCsFrameCount == 270) { player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; - player->unk_0D0 = D_play_80161A54; + player->baseSpeed = gArwingSpeed; player->unk_014 = 0.0001f; for (i = 0, actor = &gActors[1]; i < 3; i++, actor++) { @@ -1318,7 +1318,7 @@ void Bolse_LevelStart(Player* player) { sp54.x = 0.0f; sp54.y = 0; - sp54.z = player->unk_0D0; + sp54.z = player->baseSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48); @@ -1350,7 +1350,7 @@ void Bolse_8018F83C(Actor* actor, s32 arg1) { actor->obj.pos.z = D_i4_8019F084[arg1] + gPlayer[0].pos.z; actor->obj.rot.y = 180.0f; actor->obj.rot.z = D_i4_8019F090[arg1]; - actor->vel.z = -gPlayer[0].unk_0D0; + actor->vel.z = -gPlayer[0].baseSpeed; Object_SetInfo(&actor->info, actor->obj.id); actor->iwork[11] = 1; AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); @@ -1365,7 +1365,7 @@ void Bolse_LevelComplete(Player* player) { Vec3f sp68; s32 pad; - Math_SmoothStepToF(&player->unk_110, 0.0f, 0.1f, 1.5f, 0.0f); + Math_SmoothStepToF(&player->boostSpeed, 0.0f, 0.1f, 1.5f, 0.0f); sp8C = 100.0f; sp88 = 100.0f; @@ -1399,9 +1399,9 @@ void Bolse_LevelComplete(Player* player) { Math_SmoothStepToF(&player->unk_0EC, 40.0f, 0.2f, 5.0f, 0.0f); Math_SmoothStepToF(&player->unk_0E8, 120.0f, 0.1f, 2.0f, 0.0f); - player->unk_0D0 += 1.0f; - if (player->unk_0D0 >= 70.0f) { - player->unk_0D0 = 70.0f; + player->baseSpeed += 1.0f; + if (player->baseSpeed >= 70.0f) { + player->baseSpeed = 70.0f; } if (player->timer_1F8 == 0) { @@ -1425,7 +1425,7 @@ void Bolse_LevelComplete(Player* player) { player->unk_0EC = 0.0f; player->unk_0E8 = 0.0f; player->unk_114 = 0.0f; - player->unk_0D0 = 40.0f; + player->baseSpeed = 40.0f; if (gTeamShields[TEAM_ID_FALCO] > 0) { Bolse_8018F83C(&gActors[0], 0); @@ -1545,15 +1545,15 @@ void Bolse_LevelComplete(Player* player) { } if ((gCsFrameCount > 100) && (gCsFrameCount < 200)) { - D_ctx_801784D0 = 0.0f; + gEnvLightxRot = 0.0f; sp8C = 255.0f; - D_ctx_801784D4 = 16.0f; - D_ctx_801784D8 = 0.0f; + gEnvLightyRot = 16.0f; + gEnvLightzRot = 0.0f; sp88 = 255.0f; } else { - D_ctx_801784D0 = -80.0f; - D_ctx_801784D4 = 60.0f; - D_ctx_801784D8 = 0.0f; + gEnvLightxRot = -80.0f; + gEnvLightyRot = 60.0f; + gEnvLightzRot = 0.0f; } gCsCamEyeZ += gPlayer[0].vel.z * 0.3f; break; @@ -1569,7 +1569,7 @@ void Bolse_LevelComplete(Player* player) { Math_SmoothStepToF(&D_ctx_80177A48[6], 0.0f, 0.1f, 0.005f, 0.0f); } - Math_SmoothStepToF(&player->unk_0D0, 0.0f, 0.1f, 1.5f, 0.0f); + Math_SmoothStepToF(&player->baseSpeed, 0.0f, 0.1f, 1.5f, 0.0f); Math_SmoothStepToF(D_ctx_80177A48, 0.2f, 1.0f, 0.001f, 0.0f); Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[5] * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, 0, MTXF_APPLY); @@ -1616,7 +1616,7 @@ void Bolse_LevelComplete(Player* player) { gCsCamAtZ = gPlayer[0].pos.z + 200.0f; player->unk_190 = 2.0f; - player->unk_0D0 += 5; + player->baseSpeed += 5; if (player->timer_1F8 == 30) { Audio_FadeOutAll(30); @@ -1691,7 +1691,7 @@ void Bolse_LevelComplete(Player* player) { sp74.x = 0.0f; sp74.y = 0.0f; - sp74.z = player->unk_0D0 + player->unk_110; + sp74.z = player->baseSpeed + player->boostSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp74, &sp68); @@ -1925,7 +1925,7 @@ void Bolse_801912FC(Boss* boss) { gBosses[0].state = 1; } boss->obj.pos.y += 300.0f; - func_boss_80042EC0(boss); + Boss_AwardBonus(boss); boss->obj.pos.y -= 300.0f; } else { boss->swork[12 + boss->dmgPart] = 20; diff --git a/src/overlays/ovl_i4/fox_fo.c b/src/overlays/ovl_i4/fox_fo.c index 7d3ba318..a9cb10be 100644 --- a/src/overlays/ovl_i4/fox_fo.c +++ b/src/overlays/ovl_i4/fox_fo.c @@ -94,7 +94,7 @@ void Fortuna_80187884(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 arg4) { Vec3f D_i4_8019EDF8[] = { { -300.0f, 1000.0f, 13000.0f }, { 300.0f, 700.0f, 14000.0f }, { 1000.0f, 300.0f, 0.0f } }; Vec3f D_i4_8019EE1C[] = { { -1000.0f, 300.0f, 0 }, { 0.0f, 500.0f, 0 } }; -void Fortuna_80187960(Actor* actor) { +void Fortuna_UpdateEvents(Actor* actor) { s32 i; Player* player = &gPlayer[0]; Actor* actorPtr; @@ -613,7 +613,7 @@ void Fortuna_801890EC(Actor* actor, s32 arg1) { actor->obj.pos.x = D_i4_8019EE4C[arg1] + gPlayer[0].pos.x; actor->obj.pos.y = D_i4_8019EE5C[arg1] + gPlayer[0].pos.y; actor->obj.pos.z = D_i4_8019EE6C[arg1] + gPlayer[0].unk_138; - actor->vel.z = gPlayer[0].unk_0D0; + actor->vel.z = gPlayer[0].baseSpeed; Object_SetInfo(&actor->info, actor->obj.id); @@ -663,13 +663,13 @@ void Fortuna_LevelComplete(Player* player) { player->wings.unk_08 = 0.0f; player->wings.unk_10 = 0.0f; - Math_SmoothStepToF(&player->unk_110, 0.0f, 0.1f, 1.5f, 0.0f); + Math_SmoothStepToF(&player->boostSpeed, 0.0f, 0.1f, 1.5f, 0.0f); switch (player->unk_1D0) { case -1: player->wings.modelId = 1; player->unk_0E8 = 0.0f; - player->unk_0D0 = 30.0f; + player->baseSpeed = 30.0f; player->unk_114 = 180.0f; player->unk_0E4 = -7.0f; Math_SmoothStepToF(&player->unk_0EC, 0.0f, 0.05f, 1.0f, 0.0f); @@ -716,8 +716,8 @@ void Fortuna_LevelComplete(Player* player) { player->timer_1F8 = 150; player->unk_1D0 = -1; player->pos.x = 0.0f; - player->unk_110 = 0.0f; - player->unk_0D0 = 0.0f; + player->boostSpeed = 0.0f; + player->baseSpeed = 0.0f; player->pos.y = 350.0f; player->pos.z = -2800.0f; } else { @@ -735,9 +735,9 @@ void Fortuna_LevelComplete(Player* player) { Math_SmoothStepToF(&player->unk_0E4, 15.0f, 0.1f, 0.4f, 0.0f); Math_SmoothStepToF(&player->unk_0EC, -40.0f, 0.2f, 5.0f, 0.0f); Math_SmoothStepToF(&player->unk_0E8, -120.0f, 0.1f, 2.0f, 0.0f); - player->unk_0D0 += 1.0f; - if (player->unk_0D0 >= 70.0f) { - player->unk_0D0 = 70.0f; + player->baseSpeed += 1.0f; + if (player->baseSpeed >= 70.0f) { + player->baseSpeed = 70.0f; player->unk_25C += 0.04f; if (player->unk_25C > 0.6f) { player->unk_25C = 0.6f; @@ -792,23 +792,23 @@ void Fortuna_LevelComplete(Player* player) { func_play_800A5EBC(); gLevelType = LEVELTYPE_SPACE; - D_ctx_801784AC = gBgColor = gFogRed = gFogGreen = gFogBlue = 0; + gGroundType = gBgColor = gFogRed = gFogGreen = gFogBlue = 0; gLight1R = gLight2R = D_ctx_80161A70 = 86; gLight1G = gLight2G = D_ctx_80161A74 = 58; gLight1B = gLight2B = D_ctx_80161A78 = 25; gAmbientR = 11; gAmbientG = 8; gAmbientB = 24; - D_ctx_801784D0 = D_ctx_801784C4 = D_ctx_801784C4 = D_ctx_801784F8 = D_ctx_801784C4 = -59.0f; - D_ctx_801784D4 = D_ctx_801784C8 = D_ctx_801784C8 = D_ctx_801784FC = D_ctx_801784C8 = 58.0f; - D_ctx_801784D8 = D_ctx_801784CC = D_ctx_801784CC = D_ctx_80178500 = D_ctx_801784CC = 13.0f; + gEnvLightxRot = gLight1xRotTarget = gLight1xRotTarget = gLight2xRotTarget = gLight1xRotTarget = -59.0f; + gEnvLightyRot = gLight1yRotTarget = gLight1yRotTarget = gLight2yRotTarget = gLight1yRotTarget = 58.0f; + gEnvLightzRot = gLight1zRotTarget = gLight1zRotTarget = gLight2zRotTarget = gLight1zRotTarget = 13.0f; if (gMissionStatus == MISSION_COMPLETE) { player->pos.x = 0.0f; player->pos.y = 0.0f; player->unk_0E4 = 0.0f; player->unk_0EC = 0.0f; - player->unk_0D0 = 0.0f; + player->baseSpeed = 0.0f; player->unk_114 = 0.0f; player->unk_0E8 = 180.0f; Fortuna_8018906C(); @@ -817,7 +817,7 @@ void Fortuna_LevelComplete(Player* player) { player->unk_0E4 = 0.0f; player->unk_0EC = 0.0f; player->unk_114 = 0.0f; - player->unk_0D0 = 0.0f; + player->baseSpeed = 0.0f; player->cam.at.y = 16.0f; player->pos.y = -100.0f; player->unk_0E8 = 180.0f; @@ -847,7 +847,7 @@ void Fortuna_LevelComplete(Player* player) { player->cam.at.z = actor0->obj.pos.z; if (gCsFrameCount == 100) { - player->unk_0D0 = 30.0f; + player->baseSpeed = 30.0f; if (gTeamShields[TEAM_ID_FALCO] > 0) { Fortuna_801890EC(actor3, 0); } @@ -908,7 +908,7 @@ void Fortuna_LevelComplete(Player* player) { Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 20000.0f, 0); Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 20000.0f, 0); - Math_SmoothStepToF(&player->unk_0D0, 0.0f, 0.05f, 2.0f, 0); + Math_SmoothStepToF(&player->baseSpeed, 0.0f, 0.05f, 2.0f, 0); Math_SmoothStepToF(&actor3->vel.z, 0.0f, 0.05f, 2.0f, 0); Math_SmoothStepToF(&actor1->vel.z, 0.0f, 0.05f, 2.0f, 0); @@ -1033,8 +1033,8 @@ void Fortuna_LevelComplete(Player* player) { case 12: D_ctx_80178430 += 0.3f; D_ctx_8017842C += 0.3f; - player->unk_0D0 += 1.0f; - player->unk_0D0 *= 1.15f; + player->baseSpeed += 1.0f; + player->baseSpeed *= 1.15f; player->pos.y += D_ctx_80177A48[4]; D_ctx_80177A48[4] *= 1.19f; player->unk_190 = 2.0f; @@ -1155,7 +1155,7 @@ void Fortuna_LevelComplete(Player* player) { } if (gCsFrameCount == 140) { - player->unk_0D0 = 30.0f; + player->baseSpeed = 30.0f; actor3->vel.z = 30.0f; actor1->vel.z = 30.0f; actor2->vel.z = 30.0f; @@ -1215,14 +1215,14 @@ void Fortuna_LevelComplete(Player* player) { case 22: if ((gCsFrameCount >= 1110) && (gCsFrameCount < 1240)) { - Math_SmoothStepToF(&player->unk_0D0, 0.0f, 0.02f, 1000.0f, 0.001f); + Math_SmoothStepToF(&player->baseSpeed, 0.0f, 0.02f, 1000.0f, 0.001f); Math_SmoothStepToF(&actor3->vel.z, 0.0f, 0.02f, 1000.0f, 0.001f); Math_SmoothStepToF(&actor1->vel.z, 0.0f, 0.02f, 1000.0f, 0.001f); Math_SmoothStepToF(&actor2->vel.z, 0.0f, 0.02f, 1000.0f, 0.001f); Math_SmoothStepToF(&actor0->vel.z, 0.0f, 0.02f, 1000.0f, 0.001f); } if (gCsFrameCount == 1239) { - player->unk_0D0 = 0.0f; + player->baseSpeed = 0.0f; actor3->vel.z = 0.0f; actor1->vel.z = 0.0f; actor2->vel.z = 0.0f; @@ -1392,7 +1392,7 @@ void Fortuna_LevelComplete(Player* player) { Math_SmoothStepToF(&actor2->vel.z, 50.0f, 0.1f, 1000.0f, 0.001f); } if (gCsFrameCount >= 1300) { - Math_SmoothStepToF(&player->unk_0D0, 50.0f, 0.1f, 1000.0f, 0.001f); + Math_SmoothStepToF(&player->baseSpeed, 50.0f, 0.1f, 1000.0f, 0.001f); Math_SmoothStepToF(&actor0->vel.z, 40.0f, 0.1f, 1000.0f, 0.001f); } Math_SmoothStepToF(&gCsCamAtY, player->pos.y, 0.005f, 1000.0f, 0.0001f); @@ -1419,7 +1419,7 @@ void Fortuna_LevelComplete(Player* player) { src.x = 0.0f; src.y = 0.0f; - src.z = player->unk_0D0 + player->unk_110; + src.z = player->baseSpeed + player->boostSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); diff --git a/src/overlays/ovl_i4/fox_ka.c b/src/overlays/ovl_i4/fox_ka.c index 6e0d4094..85d6c1e8 100644 --- a/src/overlays/ovl_i4/fox_ka.c +++ b/src/overlays/ovl_i4/fox_ka.c @@ -332,7 +332,7 @@ void Katina_LevelStart(Player* player) { Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), MTXF_APPLY); src.x = 0; src.y = 0.0f; - src.z = player->unk_0D0; + src.z = player->baseSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); player->vel.x = dest.x; player->vel.z = dest.z; @@ -525,7 +525,7 @@ void Katina_80193EF0(Boss* boss) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); Radio_PlayMessage(gMsg_ID_18066, RCID_BILL); boss->obj.pos.y -= 1000.0f; - func_boss_80042EC0(boss); + Boss_AwardBonus(boss); boss->obj.pos.y += 1000.0f; } } @@ -953,7 +953,7 @@ void Katina_801946C4(Boss* boss) { Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 30.0f, 1.0f, 1.6f, 0.0f); Math_SmoothStepToF(&gPlayer[0].cam.eye.z, 0.0f, 0.05f, 5.0f, 0.0f); boss->fwork[13] += 0.1f; - Math_SmoothStepToF(&D_ctx_801784D4, 200.0f, 1.0f, 0.5f, 0.0f); + Math_SmoothStepToF(&gEnvLightyRot, 200.0f, 1.0f, 0.5f, 0.0f); scale = 0.5f; D_i4_801A0548 = 0.0f; D_i4_801A0550 = 100.0f; @@ -1008,7 +1008,7 @@ void Katina_801946C4(Boss* boss) { gPlayer[0].cam.at.x = boss->obj.pos.x; gPlayer[0].cam.at.y = 1500.0f; gPlayer[0].cam.at.z = boss->obj.pos.z; - D_ctx_801784D4 = 60.0f; + gEnvLightyRot = 60.0f; gLight1R = 100; gLight1G = 70; gLight1B = 50; @@ -1045,13 +1045,13 @@ void Katina_801946C4(Boss* boss) { Audio_StopPlayerNoise(0); Audio_KillSfxBySource(&gPlayer[0].sfxSource[0]); gPlayer[0].timer_1F8 = 50; - gPlayer[0].unk_0D0 = 0.0f; + gPlayer[0].baseSpeed = 0.0f; gPlayer[0].unk_114 = 0.0f; gPlayer[0].unk_0EC = gPlayer[0].unk_0E8 = gPlayer[0].unk_0E4 = gPlayer[0].unk_120 = gPlayer[0].unk_114; Play_ClearObjectData(); - D_ctx_801784D4 = 60.0f; + gEnvLightyRot = 60.0f; gLight1R = 100; gLight1G = 70; gLight1B = 50; @@ -1419,7 +1419,7 @@ void Katina_LevelComplete(Player* player) { player->pos.z = boss->obj.pos.z; player->unk_114 = player->unk_120 = player->unk_0E4 = player->camRoll = player->unk_4D8 = 0.0f; player->unk_0E8 = 120.0f; - player->unk_0D0 = 40.0f; + player->baseSpeed = 40.0f; gCsCamEyeX = boss->obj.pos.x + 5000.0f; gCsCamEyeY = 750.0f; gCsCamEyeZ = boss->obj.pos.z; @@ -1484,7 +1484,7 @@ void Katina_LevelComplete(Player* player) { Audio_StopPlayerNoise(0); Audio_KillSfxBySource(&player->sfxSource[0]); player->timer_1F8 = 50; - player->unk_0D0 = 0.0f; + player->baseSpeed = 0.0f; player->unk_0E4 = 0.0f; player->unk_0E8 = 0.0f; player->unk_0EC = 0.0f; @@ -1529,7 +1529,7 @@ void Katina_LevelComplete(Player* player) { gCsCamAtY = 3500.0f; gCsCamAtZ = player->pos.z + 500; if (gCsFrameCount > 1010) { - player->unk_0D0 += 2.0f; + player->baseSpeed += 2.0f; player->unk_0E4 += 0.1f; Math_SmoothStepToF(&D_ctx_80177A48[2], 0.0f, 1.0f, 0.001f, 0); player->unk_190 = 2.0f; @@ -1643,7 +1643,7 @@ void Katina_LevelComplete(Player* player) { Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4) * M_DTOR), MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; - src.z = player->unk_0D0; + src.z = player->baseSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); player->vel.x = dest.x; player->vel.z = dest.z; @@ -1800,7 +1800,7 @@ void Katina_8019848C(void) { AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); } -void Katina_80198594(Actor* actor) { +void Katina_UpdateEvents(Actor* actor) { s32 pad[4]; f32 D_i4_8019F494[5] = { -200.0f, -100.0f, -0.0f, 100.0f, 200.0f }; diff --git a/src/overlays/ovl_i4/fox_sz.c b/src/overlays/ovl_i4/fox_sz.c index e45723b5..cfefb810 100644 --- a/src/overlays/ovl_i4/fox_sz.c +++ b/src/overlays/ovl_i4/fox_sz.c @@ -465,7 +465,7 @@ bool SectorZ_8019AA9C(Player* player) { return false; } -void SectorZ_8019AB8C(Actor* actor) { +void SectorZ_UpdateEvents(Actor* actor) { s32 i; Player* player; Actor* actor8; @@ -733,7 +733,7 @@ void SectorZ_8019B75C(Actor* actor, s32 arg1) { actor->obj.pos.y = newActor->obj.pos.y - 500.0f; actor->obj.pos.z = D_i4_8019F5BC[arg1].z + newActor->obj.pos.z; - actor->vel.x = -D_play_80161A54; + actor->vel.x = -gArwingSpeed; actor->obj.rot.y = 270.0f; Object_SetInfo(&actor->info, actor->obj.id); @@ -804,7 +804,7 @@ void SectorZ_LevelStart(Player* player) { D_ctx_80177A48[0] = 1.0f; player->unk_234 = 0; - player->unk_0D0 = 0.0f; + player->baseSpeed = 0.0f; player->camRoll = -20.0f; gProjectFar = 30000.0f; @@ -992,7 +992,7 @@ void SectorZ_LevelStart(Player* player) { player->unk_194 = 5.0f; player->unk_190 = 5.0f; player->unk_114 = 90.0f; - player->unk_0D0 = D_play_80161A54; + player->baseSpeed = gArwingSpeed; player->unk_234 = 1; AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); break; @@ -1003,7 +1003,7 @@ void SectorZ_LevelStart(Player* player) { sp74.x = 0.0f; sp74.y = 0.0f; - sp74.z = player->unk_0D0; + sp74.z = player->baseSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp74, &sp68); @@ -1047,7 +1047,7 @@ void SectorZ_8019C574(Actor* actor, s32 index) { actor->obj.pos.y = D_i4_8019F62C[index]; actor->obj.pos.z = D_i4_8019F63C[index]; - actor->fwork[0] = gPlayer[0].unk_0D0; + actor->fwork[0] = gPlayer[0].baseSpeed; actor->unk_0F4.y = gPlayer[0].unk_0E8; Object_SetInfo(&actor->info, actor->obj.id); @@ -1108,7 +1108,7 @@ void SectorZ_LevelComplete(Player* player) { var_fv1 = -1.0f; } - Math_SmoothStepToF(&player->unk_110, 0.0f, 0.1f, 1.5f, 0.0f); + Math_SmoothStepToF(&player->boostSpeed, 0.0f, 0.1f, 1.5f, 0.0f); switch (player->unk_1D0) { case 1000: @@ -1132,9 +1132,9 @@ void SectorZ_LevelComplete(Player* player) { Math_SmoothStepToF(&player->unk_0EC, 40.0f, 0.2f, 5.0f, 0); Math_SmoothStepToF(&player->unk_0E8, 120.0f, 0.1f, 2.0f, 0); - player->unk_0D0 += 1.0f; - if (player->unk_0D0 >= 70.0f) { - player->unk_0D0 = 70.0f; + player->baseSpeed += 1.0f; + if (player->baseSpeed >= 70.0f) { + player->baseSpeed = 70.0f; } if (player->timer_1F8 == 0) { @@ -1155,7 +1155,7 @@ void SectorZ_LevelComplete(Player* player) { gProjectFar = 30000.0f; player->unk_234 = 0; - player->unk_0D0 = 0.0f; + player->baseSpeed = 0.0f; player->camRoll = 0.0f; if (boss0->state != 0) { @@ -1179,7 +1179,7 @@ void SectorZ_LevelComplete(Player* player) { gProjectFar = 30000.0f; player->timer_1F8 = 550; - player->unk_0D0 = 0.0f; + player->baseSpeed = 0.0f; player->camRoll = 0.0f; gFillScreenAlphaTarget = 255; @@ -1254,7 +1254,7 @@ void SectorZ_LevelComplete(Player* player) { player->unk_0EC = 0.0f; player->unk_114 = 0.0f; player->unk_4D8 = 0.0f; - player->unk_0D0 = 40.0f; + player->baseSpeed = 40.0f; gCsCamEyeX = 0.0f - (200.0f * var_fv1); gCsCamEyeY = player->pos.y; @@ -1306,7 +1306,7 @@ void SectorZ_LevelComplete(Player* player) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - Math_SmoothStepToF(&player->unk_0D0, 0, 0.05f, 1.0f, 0); + Math_SmoothStepToF(&player->baseSpeed, 0, 0.05f, 1.0f, 0); Math_SmoothStepToF(&actor1->fwork[0], 0, 0.05f, 1.0f, 0); Math_SmoothStepToF(&actor3->fwork[0], 0, 0.05f, 1.0f, 0); Math_SmoothStepToF(&actor2->fwork[0], 0.0f, 0.05f, 1.0f, 0); @@ -1324,7 +1324,7 @@ void SectorZ_LevelComplete(Player* player) { } if (gCsFrameCount > 2510) { - player->unk_0D0 += 2.0f; + player->baseSpeed += 2.0f; player->unk_0E4 += 0.1f; player->unk_190 = 2.0f; } @@ -1529,7 +1529,7 @@ void SectorZ_LevelComplete(Player* player) { src.x = 0.0f; src.y = 0.0f; - src.z = player->unk_0D0 + player->unk_110; + src.z = player->baseSpeed + player->boostSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); diff --git a/src/overlays/ovl_i5/fox_ma.c b/src/overlays/ovl_i5/fox_ma.c index 28a4e433..25cbc935 100644 --- a/src/overlays/ovl_i5/fox_ma.c +++ b/src/overlays/ovl_i5/fox_ma.c @@ -3036,11 +3036,11 @@ void Macbeth_801A4B24(Actor* actor) { gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]); - for (i = D_ctx_80177DC8 - 5, objInit = &gLevelObjects[i]; i < D_ctx_80177DC8 + 50; i++, objInit++) { + for (i = gObjectLoadIndex - 5, objInit = &gLevelObjects[i]; i < gObjectLoadIndex + 50; i++, objInit++) { Object_Load(objInit, 40000.0f, -2000.0f, 40000.0f, -2000.0f); } - D_ctx_80177DC8 = i; - D_ctx_8017796C = -1; + gObjectLoadIndex = i; + gTeamLowHealthMsgTimer = -1; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].unk_1D0 = 0; gMissionStatus = MISSION_ACCOMPLISHED; @@ -3206,7 +3206,7 @@ void Macbeth_801A57D0(Effect* effect) { if (effect->obj.pos.y < gGroundHeight) { Macbeth_801ADCEC(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 999.9f, -10.0f, 5.0f); Object_Kill(&effect->obj, effect->sfxSource); - if (gGroundType != GROUNDTYPE_WATER) { + if (gGroundSurface != SURFACE_WATER) { effect->obj.pos.y = gGroundHeight; } } @@ -4144,7 +4144,7 @@ void Macbeth_801A7E7C(Actor* actor) { } if ((actor->obj.pos.z <= D_i5_801BE368[6]) && (actor->obj.pos.y <= D_i5_801BE368[5])) { D_i5_801BE320[23] = 1; - D_ctx_8017796C = -1; + gTeamLowHealthMsgTimer = -1; actor->state = 10; actor->timer_0BC = 50; } @@ -5018,7 +5018,7 @@ void Macbeth_LevelStart(Player* player) { D_ctx_8017782C = 1; func_play_800A594C(); D_ctx_8017782C = 0; - D_ctx_80177DC8 = 40; + gObjectLoadIndex = 40; player->unk_1D0 = 4; break; case 4: @@ -5827,7 +5827,7 @@ void Macbeth_LevelComplete2(Player* player) { D_ctx_80177A48[4] = -60.0f; D_ctx_80177A48[5] = 240.0f; player->unk_0D4 = 3.0f; - gCameraShakeY = player->vel.x = player->vel.y = player->vel.z = player->unk_0D0 = 0.0f; + gCameraShakeY = player->vel.x = player->vel.y = player->vel.z = player->baseSpeed = 0.0f; if (player->shields <= 0) { player->shields = 1; } @@ -5842,7 +5842,7 @@ void Macbeth_LevelComplete2(Player* player) { D_i5_801BA1DC = 0.0f; player->unk_4D8 = 0.0f; player->camRoll = 0.0f; - player->unk_110 = 0.0f; + player->boostSpeed = 0.0f; player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = player->unk_130 = player->unk_12C = 0.0f; player->unk_080 = 0.0f; @@ -5854,7 +5854,7 @@ void Macbeth_LevelComplete2(Player* player) { case 1: gShowBossHealth = 0; if (gCsFrameCount == 70) { - D_ctx_80177DC8 = 498; + gObjectLoadIndex = 498; for (i = 0; i < ARRAY_COUNT(gActors); i++) { if (gActors[i].obj.id == OBJ_ACTOR_223) { @@ -6227,8 +6227,8 @@ void Macbeth_LevelComplete2(Player* player) { player->unk_17C = player->unk_180 = player->unk_184 = player->wings.unk_04 = player->unk_170 = player->unk_16C = player->unk_0F0 = player->unk_080 = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = player->unk_130 = player->unk_12C = - player->unk_110 = 0.0f; - player->unk_0D0 = 5.0f; + player->boostSpeed = 0.0f; + player->baseSpeed = 5.0f; D_ctx_80177A48[3] = D_ctx_80177A48[6] = D_ctx_80177A48[7] = D_ctx_80177A48[8] = 0.0f; player->unk_1D4 = 1; player->unk_1F4 = 0; @@ -6794,7 +6794,7 @@ void Macbeth_LevelComplete1(Player* player) { D_i5_801BE244 = 2000.0f; D_i5_801BE248 = 2000.0f; Math_SmoothStepToF(D_ctx_80177A48, 0.1f, 1.0f, 0.01f, 0.0f); - Math_SmoothStepToF(&player->unk_0D0, 4.9f, 0.1f, 1.0f, 0.0f); + Math_SmoothStepToF(&player->baseSpeed, 4.9f, 0.1f, 1.0f, 0.0f); Math_SmoothStepToF(&player->unk_08C, 0.0f, 0.1f, 1.0f, 0.0f); gCsCamEyeX = player->pos.x; gCsCamEyeY = player->pos.y; @@ -6888,7 +6888,7 @@ void Macbeth_LevelComplete1(Player* player) { Math_SmoothStepToF(&D_i5_801BE244, 1.5f, 0.1f, 0.05f, 0.01f); Math_SmoothStepToF(&D_i5_801BE248, 2.0f, 0.1f, 0.1f, 0.01f); } - Math_SmoothStepToF(&player->unk_0D0, 4.9f, 0.1f, 1.0f, 0.0f); + Math_SmoothStepToF(&player->baseSpeed, 4.9f, 0.1f, 1.0f, 0.0f); Math_SmoothStepToF(&player->unk_08C, 0.0f, 0.1f, 1.0f, 0.0f); func_tank_80045130(player); func_tank_80044868(player); diff --git a/src/overlays/ovl_i5/fox_ti.c b/src/overlays/ovl_i5/fox_ti.c index ad546293..95ac3de3 100644 --- a/src/overlays/ovl_i5/fox_ti.c +++ b/src/overlays/ovl_i5/fox_ti.c @@ -1096,8 +1096,8 @@ bool Titania_8018C118(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return false; } -static s16 D_i5_801B7630[18] = { - 1, 0, 2, 1, 3, 0, 4, 1, 5, 1, 6, 0, 7, 1, 8, 0, 13, 1, +static s16 D_i5_801B7630[9][2] = { + { 1, 0 }, { 2, 1 }, { 3, 0 }, { 4, 1 }, { 5, 1 }, { 6, 0 }, { 7, 1 }, { 8, 0 }, { 13, 1 }, }; bool Titania_8018C134(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { @@ -1110,7 +1110,7 @@ bool Titania_8018C134(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* sp58 = false; for (i = 0; i < 9; i++) { - if (limbIndex == D_i5_801B7630[i * 2]) { + if (limbIndex == D_i5_801B7630[i][0]) { if (!(D_i5_801BD738[sp50][i].unk_18 & 1)) { Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, MTXF_APPLY); sp58 = true; @@ -1163,7 +1163,7 @@ void Titania_8018C3D8(s32 limbIndex, Vec3f* rot, void* data) { var_s0[8].unk_18 |= 2; for (i = 0; i < 9U; i++, var_s0++) { - if ((limbIndex == D_i5_801B7630[i * 2]) && (var_s0->unk_18 & 2)) { + if ((limbIndex == D_i5_801B7630[i][0]) && (var_s0->unk_18 & 2)) { Matrix_MultVec3f(gCalcMatrix, &D_tank_800C9F2C, &var_s0->unk_00.pos); Matrix_GetYRPAngles(gCalcMatrix, &var_s0->unk_00.rot); var_s0->unk_18 &= ~2; @@ -1601,7 +1601,7 @@ void Titania_8018C8A8(Actor* actor) { var_s1 = D_i5_801BD738[actor->iwork[0]]; for (i = 0; i < 9U; i++, var_s1++) { actorPtr = func_game_800A3608(OBJ_ACTOR_189); - if ((actorPtr != NULL) && ((s16(*)[2]) D_i5_801B7630)[i][1] == 1) { + if ((actorPtr != NULL) && D_i5_801B7630[i][1] == 1) { actorPtr->state = 47; actorPtr->unk_048 = i; Matrix_MultVec3f(gCalcMatrix, &var_s1->unk_00.pos, &sp158); @@ -3864,7 +3864,7 @@ void Titania_80193DF0(Boss* boss) { (boss->swork[21] > 0)) { boss->swork[21] -= boss->damage; if (boss->swork[21] <= 0) { - D_ctx_8017796C = -1; + gTeamLowHealthMsgTimer = -1; boss->swork[21] = 0; gScreenFlashTimer = 8; AUDIO_PLAY_SFX(0x2940D09A, boss->sfxSource, 4); @@ -3934,7 +3934,7 @@ void Titania_80193DF0(Boss* boss) { if (boss->swork[21] <= 0) { boss->swork[21] = 0; gScreenFlashTimer = 8; - D_ctx_8017796C = -1; + gTeamLowHealthMsgTimer = -1; AUDIO_PLAY_SFX(0x2940D09A, boss->sfxSource, 4); } else { AUDIO_PLAY_SFX(0x2940802C, boss->sfxSource, 4); @@ -5170,7 +5170,7 @@ void Titania_801990DC(Boss* boss) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); func_effect_8007A568(boss->obj.pos.x, boss->obj.pos.y + 250.0f, boss->obj.pos.z, 40.0f); - func_boss_80042EC0(boss); + Boss_AwardBonus(boss); gShowBossHealth = 0; actor = gActors; for (i = 0; i < ARRAY_COUNT(gActors); i++, actor++) { diff --git a/src/overlays/ovl_i5/fox_ti_cs.c b/src/overlays/ovl_i5/fox_ti_cs.c index c1684749..bcc4c6ba 100644 --- a/src/overlays/ovl_i5/fox_ti_cs.c +++ b/src/overlays/ovl_i5/fox_ti_cs.c @@ -317,7 +317,7 @@ void Titania_LevelComplete(Player* player) { case 1: Math_SmoothStepToF(D_ctx_80177A48, 0.1f, 1.0f, 0.01f, 0.0f); - Math_SmoothStepToF(&player->unk_0D0, 4.9f, 0.1f, 1.0f, 0.0f); + Math_SmoothStepToF(&player->baseSpeed, 4.9f, 0.1f, 1.0f, 0.0f); Math_SmoothStepToF(&player->unk_08C, 0.0f, 0.1f, 1.0f, 0.0f); if (gCsFrameCount < 1120) { diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index a4eb3f41..b4e1f500 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -425,7 +425,7 @@ void Andross_80188A4C(Boss* boss) { if ((boss->health != 0) && (boss->health <= 0)) { gScreenFlashTimer = 8; AUDIO_PLAY_SFX(0x2940D09A, boss->sfxSource, 4); - func_boss_80042EC0(boss); + Boss_AwardBonus(boss); gPlayer[0].state_1C8 = PLAYERSTATE_1C8_STANDBY; boss->state = 20; boss->swork[1] = 1000; @@ -580,7 +580,7 @@ void Andross_80189214(void) { player->unk_148 = player->unk_14C = 0.74f; player->cam.eye.y = player->pos.y * player->unk_14C + 10.0f; player->cam.eye.x = player->pos.x * player->unk_148; - D_ctx_80177DC8 = 0; + gObjectLoadIndex = 0; // FAKE if (1) {} PRINTF("FO_Game_Sw %d\n"); @@ -846,7 +846,7 @@ void Andross_80189B70(Boss* boss) { Player_ApplyDamage(&gPlayer[0], 3, 10); } } - Math_SmoothStepToF(&gPlayer[0].unk_0D0, 0.0f, 2.0f, 2.0f, 0.0f); + Math_SmoothStepToF(&gPlayer[0].baseSpeed, 0.0f, 2.0f, 2.0f, 0.0f); Math_SmoothStepToF(&gPlayer[0].pos.x, boss->obj.pos.x, 0.8f, 50.0f, 0.0f); Math_SmoothStepToF(&gPlayer[0].pos.y, boss->obj.pos.y - 300.0f, 0.8f, 50.0f, 0.0f); Math_SmoothStepToF(&gPlayer[0].pos.z, boss->obj.pos.z, 0.8f, 50.0f, 0.0f); @@ -861,7 +861,7 @@ void Andross_80189B70(Boss* boss) { AUDIO_PLAY_SFX(0x1940306E, boss->sfxSource, 4); } if (boss->timer_050 == 0) { - gPlayer[0].unk_0D0 = D_play_80161A54; + gPlayer[0].baseSpeed = gArwingSpeed; gPlayer[0].cockpitView = false; gFillScreenAlphaTarget = 0; boss->timer_05A = 50; @@ -949,7 +949,7 @@ void Andross_80189B70(Boss* boss) { } if (gCsFrameCount == 200) { gBossActive = 0; - gPlayer[0].unk_0D0 = D_play_80161A54; + gPlayer[0].baseSpeed = gArwingSpeed; Audio_StopPlayerNoise(0); boss->state = 21; func_effect_8007B344(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 60.0f, 5); @@ -1005,7 +1005,7 @@ void Andross_80189B70(Boss* boss) { gPlayer[0].pos.z = -11140.0f; gPlayer[0].unk_08C = 0.0f; gPlayer[0].unk_114 = 271.0f; - gPlayer[0].unk_110 = gPlayer[0].unk_4D8 = gPlayer[0].unk_0E8 = gPlayer[0].unk_0E4 = + gPlayer[0].boostSpeed = gPlayer[0].unk_4D8 = gPlayer[0].unk_0E8 = gPlayer[0].unk_0E4 = gPlayer[0].unk_0EC = 0.0f; gPlayer[0].unk_12C = 150.0f; gPlayer[0].camRoll = -90.0f; @@ -3719,7 +3719,7 @@ void Andross_80193C4C(Player* player) { D_i6_801A7F4C = gAmbientR; D_i6_801A7F50 = gAmbientG; D_i6_801A7F54 = gAmbientB; - D_ctx_801784D4 = -50.0f; + gEnvLightyRot = -50.0f; gMissionStatus = MISSION_ACCOMPLISHED; for (i = 0; i < 200; i++) { gScenery360[i].obj.status = OBJ_FREE; @@ -3960,7 +3960,7 @@ void Andross_80193C4C(Player* player) { Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); sp74.x = 0.0f; sp74.y = 0.0f; - sp74.z = player->unk_0D0; + sp74.z = player->baseSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp74, &sp68); player->vel.x = sp68.x; player->vel.z = sp68.z; diff --git a/src/overlays/ovl_i6/fox_sy.c b/src/overlays/ovl_i6/fox_sy.c index dda59f43..65882a27 100644 --- a/src/overlays/ovl_i6/fox_sy.c +++ b/src/overlays/ovl_i6/fox_sy.c @@ -30,7 +30,7 @@ void SectorY_80197B30(Actor* actor, s32 timer) { actor->obj.pos.x = gPlayer[0].pos.x; actor->obj.pos.y = gPlayer[0].pos.y; actor->obj.pos.z = gPlayer[0].pos.z; - actor->fwork[0] = gPlayer[0].unk_0D0; + actor->fwork[0] = gPlayer[0].baseSpeed; actor->vel.x = gPlayer[0].vel.x; actor->vel.y = gPlayer[0].vel.y; actor->vel.z = gPlayer[0].vel.z; @@ -575,7 +575,7 @@ void SectorY_80199438(Boss* boss) { if ((gCsFrameCount == 120) && (boss->swork[36] == 0) && (boss->index == 0)) { if (boss->swork[19] == 0) { - func_boss_80042EC0(boss); + Boss_AwardBonus(boss); } for (i = 0; i < 2; i++) { @@ -2042,8 +2042,8 @@ void SectorY_LevelComplete(Player* player) { gCsFrameCount = 0; player->unk_4D8 = 0.0f; player->camRoll = 0.0f; - player->unk_0D0 = 40.0f; - player->unk_110 = 0.0f; + player->baseSpeed = 40.0f; + player->boostSpeed = 0.0f; player->wings.unk_04 = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = player->unk_130 = player->unk_12C = 0.0f; player->unk_234 = 1; @@ -2120,7 +2120,7 @@ void SectorY_LevelComplete(Player* player) { Audio_KillSfxBySource(player->sfxSource); gFillScreenAlpha = 250; player->timer_1F8 = 50; - player->unk_0D0 = 0.0f; + player->baseSpeed = 0.0f; player->unk_0E4 = 0.0f; player->unk_0E8 = 0.0f; player->unk_0EC = 0.0f; @@ -2155,7 +2155,7 @@ void SectorY_LevelComplete(Player* player) { break; case 3: - if ((gCsFrameCount < 720) && D_ctx_801782F8) { + if ((gCsFrameCount < 720) && gMsgCharIsPrinting) { player->wings.unk_30 = (f32) (gGameFrameCount & 2) * 5.0f; } @@ -2202,7 +2202,7 @@ void SectorY_LevelComplete(Player* player) { gCsCamAtZ = D_ctx_80177A48[7] + player->pos.z; if (gCsFrameCount > 1440) { - player->unk_0D0 += 2.0f; + player->baseSpeed += 2.0f; player->unk_0E4 += 0.1f; Math_SmoothStepToF(&D_ctx_80177A48[2], 0.0f, 1.0f, 0.001f, 0); player->unk_190 = 2.0f; @@ -2342,7 +2342,7 @@ void SectorY_LevelComplete(Player* player) { Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4) * M_DTOR), MTXF_APPLY); sp60.x = 0.0f; sp60.y = 0.0f; - sp60.z = player->unk_0D0; + sp60.z = player->baseSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp60, &sp54); player->vel.x = sp54.x; player->vel.z = sp54.z; @@ -2544,7 +2544,7 @@ void SectorY_801A06A4(Actor* actor, s32 arg1) { actor->obj.pos.x = gPlayer[0].pos.x + D_i6_801A6AEC[arg1].x; actor->obj.pos.y = gPlayer[0].pos.y + D_i6_801A6AEC[arg1].y; actor->obj.pos.z = gPlayer[0].pos.z + D_i6_801A6AEC[arg1].z; - actor->fwork[0] = gPlayer[0].unk_0D0; + actor->fwork[0] = gPlayer[0].baseSpeed; actor->unk_0F4.y = gPlayer[0].unk_0E8; actor->unk_0F4.z = gPlayer[0].unk_0EC; actor->state = arg1 + 7; @@ -2633,12 +2633,12 @@ void SectorY_801A0AC0(Player* player) { D_ctx_80177A48[0] = 0.0f; player->pos.y = 5000.0f; player->camRoll = 0.0f; - player->unk_0D0 = 0.0f; + player->baseSpeed = 0.0f; gActors[5].fwork[2] = gActors[6].fwork[2] = gActors[7].fwork[2] = 0.2f; gActors[5].obj.rot.z = 30.0f; gActors[6].obj.rot.z = 30.0f; gActors[7].obj.rot.z = 320.0f; - D_ctx_801784D4 = D_ctx_801784FC = D_ctx_80178524 = D_ctx_801784BC = D_ctx_801784C8 = 230.0f; + gEnvLightyRot = gLight2yRotTarget = D_ctx_80178524 = gLight1yRot = gLight1yRotTarget = 230.0f; gActors[6].fwork[1] = 15.0f; /* fallthrough */ case 1: @@ -2903,7 +2903,7 @@ void SectorY_801A0AC0(Player* player) { gFillScreenGreen = 255; gFillScreenBlue = 255; gFillScreenAlpha = 255; - D_ctx_801784D4 = -58.0f; + gEnvLightyRot = -58.0f; } if (gCsFrameCount >= 300) { Math_SmoothStepToF(&D_ctx_80177A48[1], 120.0f, 0.1f, D_ctx_80177A48[2], 0); @@ -3148,7 +3148,7 @@ void SectorY_801A0AC0(Player* player) { } if (gCsFrameCount >= 470) { - Math_SmoothStepToAngle(&D_ctx_801784D4, 58.0f, 1.0f, 2.0f, 0.0f); + Math_SmoothStepToAngle(&gEnvLightyRot, 58.0f, 1.0f, 2.0f, 0.0f); gActors[5].obj.rot.y += 1.2f; if (gActors[5].iwork[4] != 6) { gActors[5].obj.rot.z -= 0.25f; @@ -3206,7 +3206,7 @@ void SectorY_801A0AC0(Player* player) { player->pos.x = 4800.0f; player->pos.y = 300.0f; player->pos.z = 4000.0f; - player->unk_0D0 = 40.0f; + player->baseSpeed = 40.0f; player->unk_0E8 = 80.0f; player->unk_0EC = 240.0f; @@ -3347,7 +3347,7 @@ void SectorY_801A0AC0(Player* player) { gActors[9].obj.pos.z = -7100.0f; D_ctx_80177A48[0] = 1.0f; player->pos.z = player->unk_138 = 0.0f; - player->unk_0D0 = D_play_80161A54; + player->baseSpeed = gArwingSpeed; AUDIO_PLAY_BGM(SEQ_ID_SECTOR_Y | SEQ_FLAG); gLevelStartStatusScreenTimer = 100; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; @@ -3385,7 +3385,7 @@ void SectorY_801A0AC0(Player* player) { Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), MTXF_APPLY); spA4.x = 0.0f; spA4.y = 0.0f; - spA4.z = player->unk_0D0; + spA4.z = player->baseSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &spA4, &sp98); player->vel.x = sp98.x; player->vel.z = sp98.z; diff --git a/src/overlays/ovl_i6/fox_ve2.c b/src/overlays/ovl_i6/fox_ve2.c index 26b45964..cac2d03d 100644 --- a/src/overlays/ovl_i6/fox_ve2.c +++ b/src/overlays/ovl_i6/fox_ve2.c @@ -31,13 +31,13 @@ static Vec3f D_i6_801A68B0[6] = { static f32 D_i6_801A68F8[3] = { 300.0f, 70.0f, 280.0f }; -void Venom2_80196314(Actor* actor) { - Actor* otherActor; - Actor* actor4 = &gActors[4]; +void Venom2_UpdateEvents(Actor* this) { + Actor* team; + Actor* wolf = &gActors[4]; Player* player = &gPlayer[0]; s32 i; - switch (actor->state) { + switch (this->state) { case 0: gAllRangeEventTimer = 0; gStarWolfMsgTimer = 0; @@ -48,7 +48,7 @@ void Venom2_80196314(Actor* actor) { } if (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) { - actor->state = 2; + this->state = 2; player->pos.x = 0.0f; player->pos.z = 8000.0f; player->pos.y = 670.0f; @@ -57,19 +57,19 @@ void Venom2_80196314(Actor* actor) { } else { D_360_800C9B4C = 320; gStarWolfMsgTimer = 1200; - actor->state = 1; + this->state = 1; player->pos.x = 0.0f; player->pos.z = 16000.0f; player->pos.y = 4350.0f; player->unk_0E4 = -20.0f; player->unk_114 = 0.0f; - actor->timer_0BC = 210; - for (otherActor = &gActors[1], i = 1; i < 4; i++, otherActor++) { - otherActor->obj.pos.x = D_i6_801A68B0[i - 1].x; - otherActor->obj.pos.y = D_i6_801A68B0[i - 1].y + 750.f; - otherActor->obj.pos.z = D_i6_801A68B0[i - 1].z; - otherActor->obj.rot.z = D_i6_801A68F8[i - 1]; - otherActor->unk_0F4.x = 340.0f; + this->timer_0BC = 210; + for (team = &gActors[1], i = 1; i < 4; i++, team++) { + team->obj.pos.x = D_i6_801A68B0[i - 1].x; + team->obj.pos.y = D_i6_801A68B0[i - 1].y + 750.f; + team->obj.pos.z = D_i6_801A68B0[i - 1].z; + team->obj.rot.z = D_i6_801A68F8[i - 1]; + team->unk_0F4.x = 340.0f; } gFillScreenAlpha = gFillScreenAlphaTarget = 255; @@ -78,12 +78,12 @@ void Venom2_80196314(Actor* actor) { /* fallthrough */ case 1: - for (otherActor = &gActors[1], i = 1; i < 4; i++, otherActor++) { - otherActor->state = 0; - otherActor->timer_0BC = 3; - if (actor->timer_0BC == 0) { - otherActor->state = 2; - actor->state = 2; + for (team = &gActors[1], i = 1; i < 4; i++, team++) { + team->state = 0; + team->timer_0BC = 3; + if (this->timer_0BC == 0) { + team->state = 2; + this->state = 2; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_014 = 0.0001f; gLevelStartStatusScreenTimer = 80; @@ -94,14 +94,13 @@ void Venom2_80196314(Actor* actor) { } break; case 2: - Venom2_801962F4(actor); + Venom2_801962F4(this); if (((D_360_800C9B4C + 100) < gAllRangeEventTimer) && (gActors[4].obj.status == OBJ_FREE) && (gActors[5].obj.status == OBJ_FREE) && (gActors[6].obj.status == OBJ_FREE) && - (gActors[7].obj.status == OBJ_FREE) && (actor->timer_0BE == 0)) { - actor->timer_0BE = 80; + (gActors[7].obj.status == OBJ_FREE) && (this->timer_0BE == 0)) { + this->timer_0BE = 80; } - if ((actor->timer_0BE == 1) && (player->state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) { - + if ((this->timer_0BE == 1) && (player->state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) { for (i = 1; i < ARRAY_COUNT(gTeamShields); i++) { gPrevPlanetTeamShields[i] = gSavedTeamShields[i]; gPrevPlanetSavedTeamShields[i] = gSavedTeamShields[i]; @@ -123,16 +122,16 @@ void Venom2_80196314(Actor* actor) { case 3: gPauseEnabled = 0; if (gStarWolfMsgTimer < 600) { - player->cam.eye.x += actor4->vel.x * 0.23f; - player->cam.eye.y += actor4->vel.y * 0.23f; - player->cam.eye.z += actor4->vel.z * 0.23f; + player->cam.eye.x += wolf->vel.x * 0.23f; + player->cam.eye.y += wolf->vel.y * 0.23f; + player->cam.eye.z += wolf->vel.z * 0.23f; } - Math_SmoothStepToF(&player->cam.at.x, actor4->obj.pos.x, 1.0f, 20000.0f, 0.0f); - Math_SmoothStepToF(&player->cam.at.y, actor4->obj.pos.y, 1.0f, 20000.0f, 0.0f); - Math_SmoothStepToF(&player->cam.at.z, actor4->obj.pos.z, 1.0f, 20000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.x, wolf->obj.pos.x, 1.0f, 20000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.y, wolf->obj.pos.y, 1.0f, 20000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.z, wolf->obj.pos.z, 1.0f, 20000.0f, 0.0f); Math_SmoothStepToF(&player->camRoll, 0, 0.1f, 0.2f, 0.0f); if ((gControllerPress->button & START_BUTTON) || (gAllRangeEventTimer == (D_360_800C9B4C + 300))) { - actor->state = 2; + this->state = 2; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; func_play_800B7184(player, 1); player->unk_014 = 0.0f; @@ -231,7 +230,7 @@ void Venom2_LevelStart(Player* player) { Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); vec.x = 0.0f; vec.y = 0.0f; - vec.z = player->unk_0D0 + player->unk_110; + vec.z = player->baseSpeed + player->boostSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &vec, &vel); player->vel.x = vel.x; player->vel.z = vel.z; @@ -267,7 +266,7 @@ void Venom2_LevelComplete(Player* player) { Vec3f sp58; s32 pad2; - Math_SmoothStepToF(&player->unk_110, 0.0f, 0.1f, 1.5f, 0.0f); + Math_SmoothStepToF(&player->boostSpeed, 0.0f, 0.1f, 1.5f, 0.0f); Math_SmoothStepToF(&player->unk_0E8, 0.0f, 0.1f, 1.5f, 0.0f); Math_SmoothStepToF(&player->unk_0E4, 0.0f, 0.1f, 1.5f, 0.0f); @@ -452,7 +451,7 @@ void Venom2_LevelComplete(Player* player) { Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); sp64.x = 0.0f; sp64.y = 0.0f; - sp64.z = player->unk_0D0 + player->unk_110; + sp64.z = player->baseSpeed + player->boostSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp64, &sp58); player->vel.x = sp58.x; player->vel.z = sp58.z; diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index cc5e8e6b..35c81a42 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -1243,10 +1243,10 @@ void Map_Main(void) { D_menu_801CD9C0--; } - switch (D_ctx_80177B40) { + switch (gMapState) { case 0: if (gNextGameStateTimer == 0) { - D_ctx_80177B40 = 1; + gMapState = 1; } break; @@ -1413,7 +1413,7 @@ void Map_8019E99C(void) { D_menu_801CD810 = 0; - D_ctx_80177B40 = 2; + gMapState = 2; D_menu_801CD948 = 0; D_menu_801CEEC4 = 0; @@ -3954,7 +3954,7 @@ void Map_801A5E80(void) { if ((gControllerPress[gMainController].button & A_BUTTON) && (D_menu_801CD9A0 == 0) && !(D_menu_801CD9A8)) { Audio_ClearVoice(); - D_Timer_801782AC = 0; + gRadioStateTimer = 0; } if ((gControllerPress[gMainController].button & A_BUTTON) && (D_menu_801CD9A0 == 1) && !(D_menu_801CD9A8)) { @@ -4281,7 +4281,7 @@ void Map_801A6628(void) { Play_Setup(); - D_ctx_80177CA0 = 0; + gSavedObjectLoadIndex = 0; D_ctx_80177CB0 = 0.0f; D_ctx_8017782C = 1; } @@ -5781,19 +5781,19 @@ void Map_801AB17C(f32 x, f32 y, f32 z) { void Map_801AB284(void) { D_menu_801CD940 = 0; - D_ctx_80178308 = D_menu_801AF428[sCurrentPlanetId][D_menu_801CD940]; - D_ctx_80177D68 = D_menu_801AF420[D_menu_801CD940]; + gRadioMsg = D_menu_801AF428[sCurrentPlanetId][D_menu_801CD940]; + gRadioMsgRadioId = D_menu_801AF420[D_menu_801CD940]; D_menu_801CF018 = 100; - D_radio_80178728 = 78; - D_radio_8017872C = 166; + gRadioPrintPosX = 78; + gRadioPrintPosY = 166; } void Map_801AB300(void) { - if (D_Timer_801782AC > 0) { - D_Timer_801782AC--; + if (gRadioStateTimer > 0) { + gRadioStateTimer--; } - if (D_Timer_801782B4 > 0) { - D_Timer_801782B4--; + if (gRadioMouthTimer > 0) { + gRadioMouthTimer--; } switch (D_menu_801CF018) { @@ -5802,32 +5802,32 @@ void Map_801AB300(void) { case 100: D_menu_801CEA74 = 0; - D_ctx_801782A4 = 0 + D_ctx_80177D68; + gCurrentRadioPortrait = 0 + gRadioMsgRadioId; D_menu_801CF018 = 1; - D_ctx_80177D50 = 0.0f; - D_ctx_801782D8 = 0; + gRadioTextBoxScaleY = 0.0f; + gRadioMsgCharIndex = 0; D_menu_801CF124 = 0.0f; D_menu_801CEAB4 = 0; break; case 200: D_menu_801CF018 = 210; - D_Timer_801782AC = 30; + gRadioStateTimer = 30; break; case 210: - if (D_Timer_801782AC) { + if (gRadioStateTimer) { break; } D_menu_801CD940 = 1; - D_ctx_80178308 = D_menu_801AF428[sCurrentPlanetId][D_menu_801CD940]; + gRadioMsg = D_menu_801AF428[sCurrentPlanetId][D_menu_801CD940]; - Audio_PlayVoice(Message_IdFromPtr(D_ctx_80178308)); + Audio_PlayVoice(Message_IdFromPtr(gRadioMsg)); - D_ctx_80177D68 = D_menu_801AF420[D_menu_801CD940]; - D_Timer_801782AC = Message_GetCharCount(D_ctx_80178308) * 2; - D_ctx_801782A4 = D_ctx_80177D68; + gRadioMsgRadioId = D_menu_801AF420[D_menu_801CD940]; + gRadioStateTimer = Message_GetCharCount(gRadioMsg) * 2; + gCurrentRadioPortrait = gRadioMsgRadioId; D_menu_801CF018 = 4; D_menu_801CD9A0 = 1; break; @@ -5836,53 +5836,53 @@ void Map_801AB300(void) { D_menu_801CEA74 += 8; if (D_menu_801CEA74 > 255) { D_menu_801CEA74 = 255; - D_ctx_80177D50 = 1.3f; + gRadioTextBoxScaleY = 1.3f; AUDIO_PLAY_SFX(0x4100001E, gDefaultSfxSource, 4); - Audio_PlayVoice(Message_IdFromPtr(D_ctx_80178308)); + Audio_PlayVoice(Message_IdFromPtr(gRadioMsg)); - D_Timer_801782AC = Message_GetCharCount(D_ctx_80178308) * 2; + gRadioStateTimer = Message_GetCharCount(gRadioMsg) * 2; D_menu_801CD9A4 = 0; D_menu_801CF018 = 4; } break; case 4: - if (!D_Timer_801782AC && !Audio_GetCurrentVoice()) { - D_ctx_801782A4 = D_ctx_80177D68; + if (!gRadioStateTimer && !Audio_GetCurrentVoice()) { + gCurrentRadioPortrait = gRadioMsgRadioId; Audio_ClearVoice(); if (D_menu_801CD940 == 0) { - D_ctx_801782D8 = 0; - D_Timer_801782AC = 30; + gRadioMsgCharIndex = 0; + gRadioStateTimer = 30; } else { - D_Timer_801782AC = 20; + gRadioStateTimer = 20; } D_menu_801CF018 = 41; break; } - D_ctx_801782A4 = D_ctx_80177D68; + gCurrentRadioPortrait = gRadioMsgRadioId; - if (D_Timer_801782B4 > 0) { - D_ctx_801782A4 = 1 + D_ctx_80177D68; + if (gRadioMouthTimer > 0) { + gCurrentRadioPortrait = 1 + gRadioMsgRadioId; } - if (D_ctx_801782D8 >= Message_GetCharCount(D_ctx_80178308)) { + if (gRadioMsgCharIndex >= Message_GetCharCount(gRadioMsg)) { D_menu_801CD9A4 = 1; } if (D_menu_801CD9A0 == 1) { D_menu_801CF124 += 0.7f; - D_ctx_801782D8 = D_menu_801CF124; + gRadioMsgCharIndex = D_menu_801CF124; } else { - D_ctx_801782D8 += 2; + gRadioMsgCharIndex += 2; } if (D_menu_801CEAB4) { if (Audio_GetCurrentVoiceStatus() == 1) { - D_Timer_801782B4 = 2; + gRadioMouthTimer = 2; } else { - D_Timer_801782B4 = 0; + gRadioMouthTimer = 0; } } @@ -5890,7 +5890,7 @@ void Map_801AB300(void) { break; case 41: - if (D_Timer_801782AC) { + if (gRadioStateTimer) { break; } @@ -5899,13 +5899,13 @@ void Map_801AB300(void) { break; } else { D_menu_801CD940 = 1; - D_ctx_80178308 = D_menu_801AF428[sCurrentPlanetId][D_menu_801CD940]; - Audio_PlayVoice(Message_IdFromPtr(D_ctx_80178308)); - D_ctx_80177D68 = D_menu_801AF420[D_menu_801CD940]; - D_ctx_801782A4 = D_ctx_80177D68; - D_ctx_801782D8 = 0; + gRadioMsg = D_menu_801AF428[sCurrentPlanetId][D_menu_801CD940]; + Audio_PlayVoice(Message_IdFromPtr(gRadioMsg)); + gRadioMsgRadioId = D_menu_801AF420[D_menu_801CD940]; + gCurrentRadioPortrait = gRadioMsgRadioId; + gRadioMsgCharIndex = 0; D_menu_801CF124 = 0.0f; - D_Timer_801782AC = Message_GetCharCount(D_ctx_80178308) * 2; + gRadioStateTimer = Message_GetCharCount(gRadioMsg) * 2; D_menu_801CD9A0 = 1; D_menu_801CD9A4 = 0; D_menu_801CF018 = 4; @@ -5913,16 +5913,16 @@ void Map_801AB300(void) { break; case 5: - D_Timer_801782AC = 5; - D_ctx_801782A4 = D_ctx_80177D68; + gRadioStateTimer = 5; + gCurrentRadioPortrait = gRadioMsgRadioId; D_menu_801CF018++; break; case 6: - if (D_Timer_801782AC == 0) { + if (gRadioStateTimer == 0) { Audio_KillSfxById(0x4100001E); Audio_PlayVoice(0); - D_ctx_80177D50 = 0.0f; + gRadioTextBoxScaleY = 0.0f; D_menu_801CF018++; D_menu_801CF018 = 7; } @@ -5932,14 +5932,14 @@ void Map_801AB300(void) { break; case 8: - D_ctx_801782A4 = D_ctx_80177D68; - D_ctx_80177D50 = 1.3f; + gCurrentRadioPortrait = gRadioMsgRadioId; + gRadioTextBoxScaleY = 1.3f; D_menu_801CEA74 = 255; break; } if ((D_menu_801CF018 > 0) && (D_menu_801CF018 != 100)) { - Map_801AB978(D_ctx_801782A4); + Map_801AB978(gCurrentRadioPortrait); Map_801AB978(D_menu_801AF420[!D_menu_801CD940]); func_radio_800BB388(); } diff --git a/src/overlays/ovl_menu/fox_option.c b/src/overlays/ovl_menu/fox_option.c index 1709ee10..5f82b0ef 100644 --- a/src/overlays/ovl_menu/fox_option.c +++ b/src/overlays/ovl_menu/fox_option.c @@ -470,7 +470,7 @@ void Option_Setup(void) { } else { if (D_game_800D2870 != 0) { D_menu_801B91A4 = 2; - D_menu_801B91A8 = D_ctx_801778AC; + D_menu_801B91A8 = gVsMatchType; for (i = 0; i < OPTION_COUNT; i++) { if (i == 2) { continue; @@ -784,7 +784,7 @@ void Option_MapUpdate(void) { D_menu_801B9124 = 100; gGameState = GSTATE_MAP; gNextGameStateTimer = 2; - D_ctx_80177B40 = 0; + gMapState = 0; gDrawMode = DRAW_NONE; gControllerLock = 3; } else { @@ -803,7 +803,7 @@ void Option_TrainingUpdate(void) { gPlayState = PLAY_STANDBY; gDrawMode = DRAW_NONE; Play_Setup(); - D_ctx_80177CA0 = 0; + gSavedObjectLoadIndex = 0; D_ctx_80177CB0 = 0.0f; D_ctx_8017782C = 1; gControllerLock = 3; @@ -1053,7 +1053,7 @@ void Option_MainMenuUpdate(void) { gStarCount = 0; gGameState = GSTATE_TITLE; gNextGameStateTimer = 2; - D_ctx_80177AE0 = 0; + gTitleState = 0; D_menu_801B827C = 1; gDrawMode = DRAW_NONE; D_menu_801B8280 = 0; @@ -1265,7 +1265,7 @@ void Option_VersusUpdate(void) { (sOptionVSCardList[D_menu_801B91A8].unk_38.unk_04 == -15.5f)) { gBlurAlpha += 255; D_menu_801B9124 = (D_menu_801B91A8 + 1) * 10; - D_ctx_801778AC = D_menu_801B91A8; + gVsMatchType = D_menu_801B91A8; D_menu_801B91C4 = 1; Option_InitEntry(); } @@ -2633,7 +2633,7 @@ void Option_VersusMenuInit(void) { sOptionCardList[1].unk_38.unk_04 = -7.5f; } - D_ctx_801778A4 = 3; + gVsPointsToWin = 3; D_menu_801B9340 = 2; @@ -2883,10 +2883,10 @@ void Option_VersusStageInit(void) { gStarCount = 0; D_menu_801B933C = 0; D_menu_801B91E8 = 255.0f; - D_menu_801B93D4 = D_ctx_801778A4 - 1; + D_menu_801B93D4 = gVsPointsToWin - 1; D_menu_801B93D8 = D_game_80161A28; D_menu_801B93DC = D_menu_801B9340; - D_ctx_801778C8 = D_menu_801B93DC; + gVsTimeTrialLimit = D_menu_801B93DC; // clang-format off for (i = 0; i < 4; i++) {\ D_menu_801B9358[i] = 0; @@ -3011,7 +3011,7 @@ void Option_8019A2E0(void) { if (Option_8019C418(&D_menu_801B93D4, 4, 0, 0, 20, 2, 4, i, &D_menu_801B9380[i])) { AUDIO_PLAY_SFX(0x49000002, gDefaultSfxSource, 4); - D_ctx_801778A4 = D_menu_801B93D4 + 1; + gVsPointsToWin = D_menu_801B93D4 + 1; } if (gControllerPress[i].button & A_BUTTON) { @@ -3052,7 +3052,7 @@ void Option_8019A4DC(void) { if (Option_8019C418(&D_menu_801B93DC, 4, 0, 0, 20, 2, 4, i, &D_menu_801B9380[i])) { AUDIO_PLAY_SFX(0x49000002, gDefaultSfxSource, 4); D_menu_801B9340 = D_menu_801B93DC; - D_ctx_801778C8 = D_menu_801B93DC; + gVsTimeTrialLimit = D_menu_801B93DC; } if (gControllerPress[i].button & A_BUTTON) { @@ -3187,7 +3187,7 @@ void Option_VersusStageDraw(void) { void Option_8019AB30(void) { s32 pad[5]; s32 colorGB; - s32 sp44 = D_ctx_801778A4; + s32 sp44 = gVsPointsToWin; s32 var_v0; RCP_SetupDL(&gMasterDisp, 0x53); diff --git a/src/overlays/ovl_menu/fox_title.c b/src/overlays/ovl_menu/fox_title.c index e54ac142..4a45e26a 100644 --- a/src/overlays/ovl_menu/fox_title.c +++ b/src/overlays/ovl_menu/fox_title.c @@ -166,7 +166,7 @@ void Title_Init(void) { gGameFrameCount = 0; - D_ctx_80177AE0 = 2; + gTitleState = 2; D_game_80161A34 = 0; D_game_800D2870 = 0; @@ -216,11 +216,11 @@ void Title_Init(void) { } void Title_Main(void) { - switch (D_ctx_80177AE0) { + switch (gTitleState) { case 0: if (gNextGameStateTimer == 0) { gDrawMode = DRAW_NONE; - D_ctx_80177AE0 = 1; + gTitleState = 1; } break; @@ -297,7 +297,7 @@ void Title_Draw(void) { Title_801918FC(); Title_8018A2F8(); Matrix_Pop(&gGfxMatrix); - func_radio_800BB5D0(); + Radio_Draw(); Title_80190C9C(); } Title_8018FF74(); @@ -1006,8 +1006,8 @@ void Title_8018994C(void) { D_menu_801B82B8 = 0; gRadioState = 0; - D_ctx_80178300 = 0; - gCurrentMsgPri = 0; + gHideRadio = 0; + gRadioMsgPri = 0; break; case 100: @@ -3472,33 +3472,33 @@ void Title_801918FC(void) { Matrix_SetGfxMtx(&gMasterDisp); } -void Title_801919C4(u16** arg0, s32 arg1) { - D_radio_80178720 = arg0; - D_radio_80178724 = 0; - D_ctx_80178308 = arg0[D_radio_80178724]; - D_ctx_80177D68 = arg1; +void Title_801919C4(u16** msgList, RadioCharacterId character) { + gRadioMsgList = msgList; + gRadioMsgListIndex = 0; + gRadioMsg = msgList[gRadioMsgListIndex]; + gRadioMsgRadioId = character; gRadioState = 100; switch (gGameState) { case GSTATE_TITLE: - D_radio_8017872C = 176; - D_radio_80178728 = 85; - D_radio_80178730 = 80.0f; - D_radio_80178734 = 174.0f; - D_radio_80178738 = 4.63f; - D_radio_8017873C = 32.0f; - D_radio_80178740 = 174.0f; + gRadioPrintPosY = 176; + gRadioPrintPosX = 85; + gRadioTextBoxPosX = 80.0f; + gRadioTextBoxPosY = 174.0f; + gRadioTextBoxScaleX = 4.63f; + gRadioPortraitPosX = 32.0f; + gRadioPortraitPosY = 174.0f; break; case GSTATE_PLAY: - D_radio_8017872C = 179; - D_radio_80178728 = 79; - D_radio_80178730 = 74.0f; - D_radio_80178734 = 178.0f; - D_radio_80178738 = 4.53f; - D_radio_8017873C = 26.0f; - D_radio_80178740 = 178.0f; + gRadioPrintPosY = 179; + gRadioPrintPosX = 79; + gRadioTextBoxPosX = 74.0f; + gRadioTextBoxPosY = 178.0f; + gRadioTextBoxScaleX = 4.53f; + gRadioPortraitPosX = 26.0f; + gRadioPortraitPosY = 178.0f; } - Audio_PlayVoice(Message_IdFromPtr(D_ctx_80178308)); + Audio_PlayVoice(Message_IdFromPtr(gRadioMsg)); } diff --git a/src/overlays/ovl_menu/fox_title.h b/src/overlays/ovl_menu/fox_title.h index bffc2512..e6064c41 100644 --- a/src/overlays/ovl_menu/fox_title.h +++ b/src/overlays/ovl_menu/fox_title.h @@ -236,7 +236,7 @@ void Title_801914AC(f32 arg0, f32 arg1, f32 arg2, f32* arg3, f32* arg4, f32* arg void Title_80191798(f32* arg0, f32* arg1); void Title_80191844(f32 arg0, f32 arg1); void Title_801918FC(void); -void Title_801919C4(u16** arg0, s32 arg1); +void Title_801919C4(u16** msgList, RadioCharacterId character); s32 Title_80188010(void); void Title_80190C9C(void); void Title_8018D2B8(s32); diff --git a/tools/Torch b/tools/Torch index df54367b..32c49216 160000 --- a/tools/Torch +++ b/tools/Torch @@ -1 +1 @@ -Subproject commit df54367b676f44d2b925e681ae05eef665f7c45f +Subproject commit 32c49216fd5a1d9d5ec48fd93c177da47df3e789 From c1d7e814daaa082c8912b51f04449e42b28fba8b Mon Sep 17 00:00:00 2001 From: inspectredc <78732756+inspectredc@users.noreply.github.com> Date: Fri, 26 Apr 2024 16:23:40 +0100 Subject: [PATCH 044/151] Fix duplicate nodes (#224) * D_AQ_6003FF0 * D_AQ_602E5C8 --- assets/yaml/us/ast_aquas.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/yaml/us/ast_aquas.yaml b/assets/yaml/us/ast_aquas.yaml index 4a3032bc..d78d5c3b 100644 --- a/assets/yaml/us/ast_aquas.yaml +++ b/assets/yaml/us/ast_aquas.yaml @@ -92,7 +92,7 @@ D_AQ_6007D70: D_AQ_6007F68: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6007F68, symbol: D_AQ_6007F68 } -D_AQ_6007F68: +D_AQ_6003FF0: { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 32, offset: 0x6003FF0, symbol: D_AQ_6003FF0 } D_AQ_6008168: @@ -650,7 +650,7 @@ D_AQ_602E540: D_AQ_602E584: { type: SF64:ENVIRONMENT, offset: 0x602E584, symbol: D_AQ_602E584 } -D_AQ_602E584: +D_AQ_602E5C8: { type: SF64:OBJECT_INIT, offset: 0x602E5C8, symbol: D_AQ_602E5C8 } D_AQ_60308B8: From bd30371b040a460953099fb4ad31ea4662aa1c19 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Sat, 27 Apr 2024 10:03:49 -0300 Subject: [PATCH 045/151] bool --- src/engine/fox_context.c | 2 +- tools/Torch | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/fox_context.c b/src/engine/fox_context.c index 5c5ca86e..32ffd48a 100644 --- a/src/engine/fox_context.c +++ b/src/engine/fox_context.c @@ -103,7 +103,7 @@ s32 gRadioMsgCharIndex; UNK_TYPE F_801782E0; s32 gRadioMsgId; UNK_TYPE F_801782F0; -s32 gMsgCharIsPrinting; +bool gMsgCharIsPrinting; s32 gHideRadio; u16* gRadioMsg; ObjectInit* gLevelObjects; diff --git a/tools/Torch b/tools/Torch index 32c49216..4d6744dc 160000 --- a/tools/Torch +++ b/tools/Torch @@ -1 +1 @@ -Subproject commit 32c49216fd5a1d9d5ec48fd93c177da47df3e789 +Subproject commit 4d6744dcaca3bb1902a74e823353d7d79c6d3d39 From 35859e4306f21b8b59c00ed94a496f592db5644e Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Sat, 27 Apr 2024 10:07:44 -0300 Subject: [PATCH 046/151] teamId --- src/engine/fox_radio.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/engine/fox_radio.c b/src/engine/fox_radio.c index a4343464..8f0e6161 100644 --- a/src/engine/fox_radio.c +++ b/src/engine/fox_radio.c @@ -54,7 +54,7 @@ s32 func_radio_800BA7BC(u16* msg, s32 priority) { } void Radio_PlayMessage(u16* msg, RadioCharacterId character) { - s32 var_v1; + TeamId teamId; s32 temp_v0; s32 priority; @@ -77,15 +77,15 @@ void Radio_PlayMessage(u16* msg, RadioCharacterId character) { if (gGameState == GSTATE_PLAY) { if ((character == RCID_FALCO) || (character == RCID_SLIPPY) || (character == RCID_PEPPY)) { if (character == RCID_FALCO) { - var_v1 = TEAM_ID_FALCO; + teamId = TEAM_ID_FALCO; } if (character == RCID_SLIPPY) { - var_v1 = TEAM_ID_SLIPPY; + teamId = TEAM_ID_SLIPPY; } if (character == RCID_PEPPY) { - var_v1 = TEAM_ID_PEPPY; + teamId = TEAM_ID_PEPPY; } - if ((gTeamShields[var_v1] <= 0) && (gTeamShields[var_v1] != -2)) { + if ((gTeamShields[teamId] <= 0) && (gTeamShields[teamId] != -2)) { return; } } From 78683d8c03e6b16a86a880f089f15ca0141dee97 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Sat, 27 Apr 2024 10:08:19 -0300 Subject: [PATCH 047/151] pad --- src/engine/fox_radio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/fox_radio.c b/src/engine/fox_radio.c index 8f0e6161..8e711588 100644 --- a/src/engine/fox_radio.c +++ b/src/engine/fox_radio.c @@ -55,7 +55,7 @@ s32 func_radio_800BA7BC(u16* msg, s32 priority) { void Radio_PlayMessage(u16* msg, RadioCharacterId character) { TeamId teamId; - s32 temp_v0; + s32 pad; s32 priority; switch (msg[0]) { From bb4c68a22ded980091f753333b606304312a29fe Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Sat, 27 Apr 2024 10:39:24 -0300 Subject: [PATCH 048/151] radioPortraitTex --- src/engine/fox_radio.c | 147 +++++++++++++++++++++-------------------- 1 file changed, 74 insertions(+), 73 deletions(-) diff --git a/src/engine/fox_radio.c b/src/engine/fox_radio.c index 8e711588..05022e50 100644 --- a/src/engine/fox_radio.c +++ b/src/engine/fox_radio.c @@ -133,6 +133,7 @@ void Radio_PlayMessage(u16* msg, RadioCharacterId character) { gRadioPortraitPosX = 32.0f; gRadioPortraitPosY = 174.0f; break; + case GSTATE_PLAY: gRadioPrintPosY = 180; gRadioPrintPosX = 79; @@ -152,7 +153,7 @@ s32 sRadioUseRedBox; void func_radio_800BAAE8(void) { static f32 D_800D4A74 = -1.0f; - u16* sp44; + u16* radioPortraitTex; s32 mirror; s32 i; f32 sp38; @@ -168,229 +169,229 @@ void func_radio_800BAAE8(void) { sRadioUseRedBox = true; /* fallthrough */ case RCID_FOX: - sp44 = D_10050E0; + radioPortraitTex = D_10050E0; break; case RCID_FOX_RED_OPEN: sRadioUseRedBox = true; /* fallthrough */ case RCID_FOX_OPEN: - sp44 = D_1006000; + radioPortraitTex = D_1006000; break; case RCID_FOX_EXPERT: - sp44 = D_1006F20; + radioPortraitTex = D_1006F20; break; case RCID_FOX_EXPERT_OPEN: - sp44 = D_1007E40; + radioPortraitTex = D_1007E40; break; case RCID_FALCO_RED: sRadioUseRedBox = true; /* fallthrough */ case RCID_FALCO: - sp44 = D_10032A0; + radioPortraitTex = D_10032A0; break; case RCID_FALCO_RED_OPEN: sRadioUseRedBox = true; /* fallthrough */ case RCID_FALCO_OPEN: - sp44 = D_10041C0; + radioPortraitTex = D_10041C0; break; case RCID_SLIPPY_RED: sRadioUseRedBox = true; /* fallthrough */ case RCID_SLIPPY: - sp44 = D_100D900; + radioPortraitTex = D_100D900; break; case RCID_SLIPPY_RED_OPEN: sRadioUseRedBox = true; /* fallthrough */ case RCID_SLIPPY_OPEN: - sp44 = D_100E820; + radioPortraitTex = D_100E820; break; case RCID_PEPPY_RED: sRadioUseRedBox = true; /* fallthrough */ case RCID_PEPPY: - sp44 = D_100BAC0; + radioPortraitTex = D_100BAC0; break; case RCID_PEPPY_RED_OPEN: sRadioUseRedBox = true; /* fallthrough */ case RCID_PEPPY_OPEN: - sp44 = D_100C9E0; + radioPortraitTex = D_100C9E0; break; case RCID_WOLF: - sp44 = D_STAR_WOLF_F00B580; + radioPortraitTex = D_STAR_WOLF_F00B580; break; case RCID_WOLF_OPEN: - sp44 = D_STAR_WOLF_F00C4A0; + radioPortraitTex = D_STAR_WOLF_F00C4A0; break; case RCID_PIGMA: - sp44 = D_STAR_WOLF_F003C80; + radioPortraitTex = D_STAR_WOLF_F003C80; break; case RCID_PIGMA_OPEN: - sp44 = D_STAR_WOLF_F004BA0; + radioPortraitTex = D_STAR_WOLF_F004BA0; break; case RCID_LEON: - sp44 = D_STAR_WOLF_F007900; + radioPortraitTex = D_STAR_WOLF_F007900; break; case RCID_LEON_OPEN: - sp44 = D_STAR_WOLF_F008820; + radioPortraitTex = D_STAR_WOLF_F008820; break; case RCID_ANDREW: - sp44 = D_STAR_WOLF_F000000; + radioPortraitTex = D_STAR_WOLF_F000000; break; case RCID_ANDREW_OPEN: - sp44 = D_STAR_WOLF_F000F20; + radioPortraitTex = D_STAR_WOLF_F000F20; break; case RCID_WOLF_2: - sp44 = D_STAR_WOLF_F00D3C0; + radioPortraitTex = D_STAR_WOLF_F00D3C0; break; case RCID_WOLF_2_OPEN: - sp44 = D_STAR_WOLF_F00E2E0; + radioPortraitTex = D_STAR_WOLF_F00E2E0; break; case RCID_PIGMA_2: - sp44 = D_STAR_WOLF_F005AC0; + radioPortraitTex = D_STAR_WOLF_F005AC0; break; case RCID_PIGMA_2_OPEN: - sp44 = D_STAR_WOLF_F0069E0; + radioPortraitTex = D_STAR_WOLF_F0069E0; break; case RCID_LEON_2: - sp44 = D_STAR_WOLF_F009740; + radioPortraitTex = D_STAR_WOLF_F009740; break; case RCID_LEON_2_OPEN: - sp44 = D_STAR_WOLF_F00A660; + radioPortraitTex = D_STAR_WOLF_F00A660; break; case RCID_ANDREW_2: - sp44 = D_STAR_WOLF_F001E40; + radioPortraitTex = D_STAR_WOLF_F001E40; break; case RCID_ANDREW_2_OPEN: - sp44 = D_STAR_WOLF_F002D60; + radioPortraitTex = D_STAR_WOLF_F002D60; break; case RCID_BOSS_CORNERIA: - sp44 = D_CO_6026420; + radioPortraitTex = D_CO_6026420; break; case RCID_BOSS_CORNERIA_OPEN: - sp44 = D_CO_6027340; + radioPortraitTex = D_CO_6027340; break; case RCID_BOSS_CORNERIA2: - sp44 = D_CO_60245E0; + radioPortraitTex = D_CO_60245E0; break; case RCID_BOSS_CORNERIA2_OPEN: - sp44 = D_CO_6025500; + radioPortraitTex = D_CO_6025500; break; case RCID_BOSS_METEO: - sp44 = D_ME_601C8E0; + radioPortraitTex = D_ME_601C8E0; break; case RCID_BOSS_METEO_OPEN: - sp44 = D_ME_601D800; + radioPortraitTex = D_ME_601D800; break; case RCID_BOSS_AREA6: - sp44 = D_A6_60047E0; + radioPortraitTex = D_A6_60047E0; break; case RCID_BOSS_AREA6_OPEN: - sp44 = D_A6_6005700; + radioPortraitTex = D_A6_6005700; break; case RCID_CAIMAN_AREA6: - sp44 = D_A6_60029A0; + radioPortraitTex = D_A6_60029A0; break; case RCID_CAIMAN_AREA6_OPEN: - sp44 = D_A6_60038C0; + radioPortraitTex = D_A6_60038C0; break; case RCID_BOSS_ZONESS: - sp44 = D_ZO_6014510; + radioPortraitTex = D_ZO_6014510; break; case RCID_BOSS_ZONESS_OPEN: - sp44 = D_ZO_6015430; + radioPortraitTex = D_ZO_6015430; break; case RCID_BOSS_SECTORX: - sp44 = D_SX_6020FB0; + radioPortraitTex = D_SX_6020FB0; break; case RCID_BOSS_SECTORX_OPEN: - sp44 = D_SX_6021ED0; + radioPortraitTex = D_SX_6021ED0; break; case RCID_BOSS_SECTORY: - sp44 = D_SY_6018F30; + radioPortraitTex = D_SY_6018F30; break; case RCID_BOSS_SECTORY_OPEN: - sp44 = D_SY_6019E50; + radioPortraitTex = D_SY_6019E50; break; case RCID_BOSS_MACBETH: - sp44 = D_MA_6010C20; + radioPortraitTex = D_MA_6010C20; break; case RCID_BOSS_MACBETH_OPEN: - sp44 = D_MA_6011B40; + radioPortraitTex = D_MA_6011B40; break; case RCID_ROB64_RED: sRadioUseRedBox = true; /* fallthrough */ case RCID_ROB64: case RCID_ROB64_2: - sp44 = D_1009C80; + radioPortraitTex = D_1009C80; break; case RCID_ROB64_RED_OPEN: sRadioUseRedBox = true; /* fallthrough */ case RCID_ROB64_OPEN: case RCID_ROB64_2_OPEN: - sp44 = D_100ABA0; + radioPortraitTex = D_100ABA0; break; case RCID_KATT: - sp44 = D_D003DF0; + radioPortraitTex = D_D003DF0; break; case RCID_KATT_OPEN: - sp44 = D_D004D10; + radioPortraitTex = D_D004D10; break; case RCID_ANDROSS_RED: case RCID_ANDROSS: - sp44 = D_D000170; + radioPortraitTex = D_D000170; if ((gGameState == GSTATE_PLAY) && (gCurrentLevel == LEVEL_AREA_6)) { - sp44 = D_A6_6000B60; + radioPortraitTex = D_A6_6000B60; } sRadioUseRedBox = true; break; case RCID_ANDROSS_RED_OPEN: case RCID_ANDROSS_OPEN: - sp44 = D_D001090; + radioPortraitTex = D_D001090; if ((gGameState == GSTATE_PLAY) && (gCurrentLevel == LEVEL_AREA_6)) { - sp44 = D_A6_6001A80; + radioPortraitTex = D_A6_6001A80; } sRadioUseRedBox = true; break; case RCID_JAMES: - sp44 = D_D005C30; + radioPortraitTex = D_D005C30; break; case RCID_JAMES_OPEN: - sp44 = D_D006B50; + radioPortraitTex = D_D006B50; break; case RCID_BILL: - sp44 = D_D001FB0; + radioPortraitTex = D_D001FB0; break; case RCID_BILL_OPEN: - sp44 = D_D002ED0; + radioPortraitTex = D_D002ED0; break; case RCID_GEN_PEPPER: - sp44 = D_D007A70; + radioPortraitTex = D_D007A70; break; case RCID_GEN_PEPPER_OPEN: - sp44 = D_D008990; + radioPortraitTex = D_D008990; break; case RCID_ROB64_TITLE: - sp44 = D_GREAT_FOX_E00E100; + radioPortraitTex = D_GREAT_FOX_E00E100; break; case RCID_ROB64_TITLE_OPEN: - sp44 = D_GREAT_FOX_E00F020; + radioPortraitTex = D_GREAT_FOX_E00F020; break; case RCID_GEN_PEPPER_TITLE: - sp44 = D_GREAT_FOX_E00FF40; + radioPortraitTex = D_GREAT_FOX_E00FF40; break; case RCID_GEN_PEPPER_TITLE_OPEN: - sp44 = D_GREAT_FOX_E010E60; + radioPortraitTex = D_GREAT_FOX_E010E60; break; case RCID_TR: - sp44 = D_TR_6000900; + radioPortraitTex = D_TR_6000900; break; case RCID_TR_OPEN: - sp44 = D_TR_6001820; + radioPortraitTex = D_TR_6001820; break; case RCID_STATIC_FLIP: mirror = true; @@ -398,14 +399,14 @@ void func_radio_800BAAE8(void) { case RCID_STATIC: switch (gGameState) { default: - sp44 = NULL; + radioPortraitTex = NULL; break; case GSTATE_PLAY: - sp44 = D_1008D60; + radioPortraitTex = D_1008D60; break; case GSTATE_TITLE: case GSTATE_ENDING: - sp44 = gTitleRadioStatic; + radioPortraitTex = gTitleRadioStatic; break; } if (((s32) gRadioMsgRadioId == RCID_ANDROSS) || ((s32) gRadioMsgRadioId == RCID_ANDROSS_RED)) { @@ -413,7 +414,7 @@ void func_radio_800BAAE8(void) { } break; } - if ((sp44 != NULL) && (gRadioPortraitScaleY != 0.0f)) { + if ((radioPortraitTex != NULL) && (gRadioPortraitScaleY != 0.0f)) { temp_fa0 = (2.0f * gRadioPortraitScaleY) + gRadioPortraitPosY; if ((gRadioPortraitPosY + 20.0f) <= temp_fa0) { D_800D4A74 = 1.0f; @@ -427,20 +428,20 @@ void func_radio_800BAAE8(void) { if (mirror) { for (i = 0, j = 0; i < 2; i++, j += 44 * 20) { - TextureRect_16bRGBA_MirX(&gMasterDisp, &sp44[j], 44, 20, gRadioPortraitPosX, + TextureRect_16bRGBA_MirX(&gMasterDisp, &radioPortraitTex[j], 44, 20, gRadioPortraitPosX, gRadioPortraitPosY + 20.0f + sp38 + (i * 20.0f * gRadioPortraitScaleY), 1.0f, gRadioPortraitScaleY); } - TextureRect_16bRGBA_MirX(&gMasterDisp, &sp44[44 * 20 * 2], 44, 4, gRadioPortraitPosX, + TextureRect_16bRGBA_MirX(&gMasterDisp, &radioPortraitTex[44 * 20 * 2], 44, 4, gRadioPortraitPosX, gRadioPortraitPosY + 20.0f + sp38 + (40.0f * gRadioPortraitScaleY), 1.0f, gRadioPortraitScaleY); } else { for (i = 0, j = 0; i < 2; i++, j += 44 * 20) { - TextureRect_16bRGBA(&gMasterDisp, &sp44[j], 44, 20, gRadioPortraitPosX, + TextureRect_16bRGBA(&gMasterDisp, &radioPortraitTex[j], 44, 20, gRadioPortraitPosX, gRadioPortraitPosY + 20.0f + sp38 + (i * 20.0f * gRadioPortraitScaleY), 1.0f, gRadioPortraitScaleY); } - TextureRect_16bRGBA(&gMasterDisp, &sp44[44 * 20 * 2], 44, 4, gRadioPortraitPosX, + TextureRect_16bRGBA(&gMasterDisp, &radioPortraitTex[44 * 20 * 2], 44, 4, gRadioPortraitPosX, gRadioPortraitPosY + 20.0f + sp38 + (40.0f * gRadioPortraitScaleY), 1.0f, gRadioPortraitScaleY); } From 9bc64bd212586b90833583cc2dbc25efa72d8dfb Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Sat, 27 Apr 2024 12:14:16 -0300 Subject: [PATCH 049/151] RadioCharacterId --- src/engine/fox_radio.c | 87 +++++++++++++++++++++++------------------- 1 file changed, 47 insertions(+), 40 deletions(-) diff --git a/src/engine/fox_radio.c b/src/engine/fox_radio.c index 05022e50..0fd71173 100644 --- a/src/engine/fox_radio.c +++ b/src/engine/fox_radio.c @@ -451,39 +451,46 @@ void func_radio_800BAAE8(void) { void func_radio_800BB388(void) { static f32 D_800D4A78 = -1.0f; f32 temp_fa0; - u8* sp38; - u16* sp34; + u8* texture; + u16* palette; f32 sp30; if ((gGameState != GSTATE_MAP) && (gRadioTextBoxScaleY != 0.0f)) { temp_fa0 = (gRadioTextBoxScaleY / 0.26f) * 3.0f; - if ((gRadioTextBoxPosY + 16.0f) <= temp_fa0 + gRadioTextBoxPosY) { + if ((gRadioTextBoxPosY + 16.0f) <= (temp_fa0 + gRadioTextBoxPosY)) { D_800D4A78 = 1.0f; } if (temp_fa0 + gRadioTextBoxPosY <= gRadioTextBoxPosY) { D_800D4A78 = -1.0f; } + sp30 = temp_fa0 * D_800D4A78; + RCP_SetupDL(&gMasterDisp, 0x55); + switch (gGameState) { case GSTATE_TITLE: case GSTATE_ENDING: - sp38 = D_TITLE_601D750; - sp34 = D_TITLE_601DB50; + texture = D_TITLE_601D750; + palette = D_TITLE_601DB50; break; + case GSTATE_PLAY: - sp38 = D_1013170; - sp34 = D_1013570; + texture = D_1013170; + palette = D_1013570; break; } + if (sRadioUseRedBox == true) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 25, 25, 170); } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 60, 60, 255, 170); } - TextureRect_8bCI(&gMasterDisp, sp38, sp34, 32, 32, gRadioTextBoxPosX, gRadioTextBoxPosY + 16.0f + sp30, + + TextureRect_8bCI(&gMasterDisp, texture, palette, 32, 32, gRadioTextBoxPosX, gRadioTextBoxPosY + 16.0f + sp30, gRadioTextBoxScaleX, gRadioTextBoxScaleY); } + if (gRadioTextBoxScaleY == 1.3f) { RCP_SetupDL(&gMasterDisp, 0x55); gMsgCharIsPrinting = @@ -495,9 +502,9 @@ s32 D_radio_80178748; // set to 1, never used s32 sRadioCheckMouthFlag; void Radio_Draw(void) { - s32 var_v1; - s32 temp_ft0; - u32 temp_v0; + s32 idx; + RadioCharacterId radioCharId; + u32 ret; s32 fakeTemp; if ((gPlayState == PLAY_PAUSE) && (gGameState != GSTATE_ENDING)) { @@ -552,14 +559,14 @@ void Radio_Draw(void) { case 3: if (gRadioStateTimer == 0) { gRadioState++; - temp_v0 = Message_GetWidth(gRadioMsg); + ret = Message_GetWidth(gRadioMsg); if (gVIsPerFrame == 3) { - gRadioStateTimer = temp_v0 + 16; + gRadioStateTimer = ret + 16; } else { - gRadioStateTimer = (2 * temp_v0) + 16; + gRadioStateTimer = (2 * ret) + 16; } if ((gGameState == GSTATE_TITLE) || (gGameState == GSTATE_ENDING)) { - gRadioStateTimer = temp_v0 * 2; + gRadioStateTimer = ret * 2; } } gCurrentRadioPortrait = (s32) gRadioMsgRadioId; @@ -605,11 +612,11 @@ void Radio_Draw(void) { } if (!(fakeTemp)) { - temp_v0 = Audio_GetCurrentVoiceStatus(); + ret = Audio_GetCurrentVoiceStatus(); if (gRadioMsgCharIndex < 60) { if (gRadioMsg[gRadioMsgCharIndex + 1] == MSGCHAR_NXT) { - if (temp_v0 == 0) { + if (ret == 0) { gRadioState = 31; } } else { @@ -623,7 +630,7 @@ void Radio_Draw(void) { gRadioMouthTimer = 2; AUDIO_PLAY_SFX(0x49000017, gDefaultSfxSource, 4); } - } else if (temp_v0 == 1) { + } else if (ret == 1) { gRadioMouthTimer = 2; } else { gRadioMouthTimer = 0; @@ -687,19 +694,19 @@ void Radio_Draw(void) { func_radio_800BAAE8(); func_radio_800BB388(); - temp_ft0 = (s32) gRadioMsgRadioId; + radioCharId = (s32) gRadioMsgRadioId; - if (((temp_ft0 == RCID_FALCO) || (temp_ft0 == RCID_SLIPPY)) || (temp_ft0 == RCID_PEPPY)) { - if (temp_ft0 == RCID_FALCO) { - var_v1 = TEAM_ID_FALCO; + if (((radioCharId == RCID_FALCO) || (radioCharId == RCID_SLIPPY)) || (radioCharId == RCID_PEPPY)) { + if (radioCharId == RCID_FALCO) { + idx = TEAM_ID_FALCO; } - if (temp_ft0 == RCID_SLIPPY) { - var_v1 = TEAM_ID_SLIPPY; + if (radioCharId == RCID_SLIPPY) { + idx = TEAM_ID_SLIPPY; } - if (temp_ft0 == RCID_PEPPY) { - var_v1 = TEAM_ID_PEPPY; + if (radioCharId == RCID_PEPPY) { + idx = TEAM_ID_PEPPY; } - if ((gTeamShields[var_v1] <= 0) && (gGameFrameCount & 4) && (gTeamShields[var_v1] != -2) && + if ((gTeamShields[idx] <= 0) && (gGameFrameCount & 4) && (gTeamShields[idx] != -2) && (gCurrentRadioPortrait != RCID_STATIC) && (gCurrentRadioPortrait != RCID_STATIC_FLIP) && (gCurrentRadioPortrait != RCID_1000)) { RCP_SetupDL(&gMasterDisp, 0x4C); @@ -709,46 +716,46 @@ void Radio_Draw(void) { } if (((gCurrentRadioPortrait != RCID_STATIC) && (gCurrentRadioPortrait != RCID_STATIC_FLIP)) && (gCurrentRadioPortrait != RCID_1000)) { - func_hud_80086110(22.0f, 165.0f, gTeamShields[var_v1]); + func_hud_80086110(22.0f, 165.0f, gTeamShields[idx]); } } - temp_ft0 = (s32) gRadioMsgRadioId; + radioCharId = (s32) gRadioMsgRadioId; - if ((temp_ft0 == RCID_WOLF) || (temp_ft0 == RCID_PIGMA) || (temp_ft0 == RCID_LEON) || - (temp_ft0 == RCID_ANDREW) || (temp_ft0 == RCID_WOLF_2) || (temp_ft0 == RCID_PIGMA_2) || - (temp_ft0 == RCID_LEON_2) || (temp_ft0 == RCID_ANDREW_2)) { - switch (temp_ft0) { + if ((radioCharId == RCID_WOLF) || (radioCharId == RCID_PIGMA) || (radioCharId == RCID_LEON) || + (radioCharId == RCID_ANDREW) || (radioCharId == RCID_WOLF_2) || (radioCharId == RCID_PIGMA_2) || + (radioCharId == RCID_LEON_2) || (radioCharId == RCID_ANDREW_2)) { + switch (radioCharId) { case RCID_WOLF: case RCID_WOLF_2: - var_v1 = 4; + idx = 4; break; case RCID_LEON: case RCID_LEON_2: - var_v1 = 5; + idx = 5; break; case RCID_PIGMA: case RCID_PIGMA_2: - var_v1 = 6; + idx = 6; break; case RCID_ANDREW: case RCID_ANDREW_2: - var_v1 = 7; + idx = 7; break; default: - var_v1 = 0; + idx = 0; break; } - if ((gActors[var_v1].obj.status != OBJ_ACTIVE) && (gGameFrameCount & 4) && + if ((gActors[idx].obj.status != OBJ_ACTIVE) && (gGameFrameCount & 4) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (gCurrentRadioPortrait != RCID_STATIC) && (gCurrentRadioPortrait != RCID_STATIC_FLIP) && (gCurrentRadioPortrait != RCID_1000)) { RCP_SetupDL(&gMasterDisp, 0x4C); @@ -757,7 +764,7 @@ void Radio_Draw(void) { } if (((gCurrentRadioPortrait != RCID_STATIC) && (gCurrentRadioPortrait != RCID_STATIC_FLIP)) && (gCurrentRadioPortrait != RCID_1000)) { - func_hud_80086110(22.0f, 165.0f, gActors[var_v1].health * 2.55f); + func_hud_80086110(22.0f, 165.0f, gActors[idx].health * 2.55f); } } if (((gCurrentRadioPortrait != RCID_STATIC) && (gCurrentRadioPortrait != RCID_STATIC_FLIP)) && From 5056a6ef3150c9bac585730fc1a1e6e622cbe1a8 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Sat, 27 Apr 2024 12:32:07 -0300 Subject: [PATCH 050/151] bools and names --- include/context.h | 4 ++-- src/engine/fox_360.c | 2 +- src/engine/fox_context.c | 4 ++-- src/engine/fox_play.c | 2 +- src/engine/fox_radio.c | 6 +++--- src/overlays/ovl_ending/fox_end1.c | 8 ++++---- src/overlays/ovl_i1/fox_co.c | 2 +- src/overlays/ovl_menu/fox_title.c | 2 +- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/include/context.h b/include/context.h index 4d0f0b4f..6a8156cc 100644 --- a/include/context.h +++ b/include/context.h @@ -99,7 +99,7 @@ extern UNK_TYPE F_801782E0; extern s32 gRadioMsgId; extern UNK_TYPE F_801782F0; extern s32 gMsgCharIsPrinting; -extern s32 gHideRadio; +extern bool gHideRadio; extern u16* gRadioMsg; extern ObjectInit* gLevelObjects; extern s32 gFogRed; @@ -314,7 +314,7 @@ extern s32 D_ctx_80177DB8[4]; extern s32 D_ctx_80177DD0[4][10]; extern s32 D_ctx_80177E74; extern s32 D_ctx_80177E7C; -extern s32 gChangeTo360; +extern bool gChangeTo360; extern Vec3f gTeamArrowsViewPos[10]; extern f32 D_ctx_80177F20[65]; extern f32 D_ctx_80178028[65]; diff --git a/src/engine/fox_360.c b/src/engine/fox_360.c index 174008ef..274f2345 100644 --- a/src/engine/fox_360.c +++ b/src/engine/fox_360.c @@ -461,7 +461,7 @@ void ActorAllRange_SpawnStarWolf(void) { } void ActorAllRange_PlayMessage(u16* msg, RadioCharacterId character) { - if ((gHideRadio == 0) && (gActors[0].state == STATE360_2) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_STANDBY)) { + if (!gHideRadio && (gActors[0].state == STATE360_2) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_STANDBY)) { Radio_PlayMessage(msg, character); } } diff --git a/src/engine/fox_context.c b/src/engine/fox_context.c index 32ffd48a..8a587074 100644 --- a/src/engine/fox_context.c +++ b/src/engine/fox_context.c @@ -104,7 +104,7 @@ UNK_TYPE F_801782E0; s32 gRadioMsgId; UNK_TYPE F_801782F0; bool gMsgCharIsPrinting; -s32 gHideRadio; +bool gHideRadio; u16* gRadioMsg; ObjectInit* gLevelObjects; UNK_TYPE F_80178318; @@ -345,7 +345,7 @@ s32 D_ctx_80177DB8[4]; s32 D_ctx_80177DD0[4][10]; s32 D_ctx_80177E74; s32 D_ctx_80177E7C; -s32 gChangeTo360; +bool gChangeTo360; Vec3f gTeamArrowsViewPos[10]; f32 D_ctx_80177F20[65]; // Seem to be an early implementation of RadarMark f32 D_ctx_80178028[65]; diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index bc3483b7..55d34158 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -2574,7 +2574,7 @@ void Play_Init(void) { D_display_800CA230 = D_800D2F58 = 0.0f; gLevelMode = LEVELMODE_ON_RAILS; D_ctx_80177CE8 = D_bg_8015F968 = 0.0f; - D_hud_800D1970 = gVersusMode = gHideRadio = gChangeTo360 = 0; + D_hud_800D1970 = gVersusMode = gHideRadio = gChangeTo360 = false; if (gCurrentLevel >= LEVEL_FORTUNA) { gLevelMode = LEVELMODE_ALL_RANGE; if (gCurrentLevel == LEVEL_VERSUS) { diff --git a/src/engine/fox_radio.c b/src/engine/fox_radio.c index 0fd71173..5089c15b 100644 --- a/src/engine/fox_radio.c +++ b/src/engine/fox_radio.c @@ -670,7 +670,7 @@ void Radio_Draw(void) { case 7: gRadioPortraitScaleY -= 0.25f; if (gRadioPortraitScaleY == 0) { - gHideRadio = 0; + gHideRadio = false; gRadioMsgPri = 0; gRadioState = 0; } @@ -690,7 +690,7 @@ void Radio_Draw(void) { break; } - if (((gRadioState > 0) && (gRadioState != 100)) && (gHideRadio == 0)) { + if (((gRadioState > 0) && (gRadioState != 100)) && !gHideRadio) { func_radio_800BAAE8(); func_radio_800BB388(); @@ -773,7 +773,7 @@ void Radio_Draw(void) { } } - if (gHideRadio == 1) { + if (gHideRadio == true) { func_radio_800BA760(); } } diff --git a/src/overlays/ovl_ending/fox_end1.c b/src/overlays/ovl_ending/fox_end1.c index fb12bc0f..dc2538aa 100644 --- a/src/overlays/ovl_ending/fox_end1.c +++ b/src/overlays/ovl_ending/fox_end1.c @@ -376,7 +376,7 @@ void Ending_8018845C(void) { if (var_a2 != D_ending_8019858C) {} } - gHideRadio = 1; + gHideRadio = true; switch (gCsFrameCount) { case 10: @@ -570,7 +570,7 @@ void Ending_80189108(void) { switch (D_ending_80196D08[4].unk_38) { case 0: - gHideRadio = 1; + gHideRadio = true; switch (gCsFrameCount) { case 30: Radio_PlayMessage(gMsg_ID_21030, RCID_FOX); @@ -617,7 +617,7 @@ void Ending_80189108(void) { break; case 1: - gHideRadio = 0; + gHideRadio = false; if (gCsFrameCount == 20) { Radio_PlayMessage(gMsg_ID_21050, RCID_ROB64_TITLE); } @@ -630,7 +630,7 @@ void Ending_80189108(void) { break; case 2: - gHideRadio = 1; + gHideRadio = true; switch (gCsFrameCount) { case 20: Radio_PlayMessage(gMsg_ID_21060, RCID_FOX); diff --git a/src/overlays/ovl_i1/fox_co.c b/src/overlays/ovl_i1/fox_co.c index 990f4cde..b6bbad73 100644 --- a/src/overlays/ovl_i1/fox_co.c +++ b/src/overlays/ovl_i1/fox_co.c @@ -2691,7 +2691,7 @@ void Corneria_LevelStart(Player* player) { player->pos.x = 0.0f; } if (player->timer_1F8 == 270) { - gHideRadio = 0; + gHideRadio = false; Radio_PlayMessage(gMsg_ID_2005, RCID_FOX); } if (player->timer_1F8 == 180) { diff --git a/src/overlays/ovl_menu/fox_title.c b/src/overlays/ovl_menu/fox_title.c index 4a45e26a..c9264953 100644 --- a/src/overlays/ovl_menu/fox_title.c +++ b/src/overlays/ovl_menu/fox_title.c @@ -1006,7 +1006,7 @@ void Title_8018994C(void) { D_menu_801B82B8 = 0; gRadioState = 0; - gHideRadio = 0; + gHideRadio = false; gRadioMsgPri = 0; break; From 25d8938483df82ded269d9996b7639179b449b6f Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Sat, 27 Apr 2024 14:33:59 -0300 Subject: [PATCH 051/151] AVOID_UB in fox_message --- src/engine/fox_message.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/engine/fox_message.c b/src/engine/fox_message.c index e7cca64a..38b4ddbd 100644 --- a/src/engine/fox_message.c +++ b/src/engine/fox_message.c @@ -62,12 +62,15 @@ bool Message_DisplayText(Gfx** gfxPtr, u16* msgPtr, s32 xPos, s32 yPos, s32 len) s32 xChar = xPos; s32 yChar = yPos; s32 i; - s32 print; + bool print; gDPSetPrimColor((*gfxPtr)++, 0x00, 0x00, 255, 255, 255, 255); gDPSetTextureLUT((*gfxPtr)++, G_TT_RGBA16); gDPLoadTLUT((*gfxPtr)++, 64, 256, gTextCharPalettes); +#ifdef AVOID_UB + print = false; +#endif // bug: if the for loop is skipped, print is never initialized for (i = 0; msgPtr[i] != MSGCHAR_END && i < len; i++) { print = false; @@ -158,8 +161,11 @@ void Message_DisplayScrollingText(Gfx** gfxPtr, u16* msgPtr, s32 xPos, s32 yPos, bool Message_IsPrintingChar(u16* msgPtr, s32 charPos) { s32 i; - s32 print; + bool print; +#ifdef AVOID_UB + print = false; +#endif // bug: if the for loop is skipped, print is never initialized for (i = 0; msgPtr[i] != 0 && i < charPos; i++) { print = false; From 6dbc0ba6b1894e61e928a7f018b024feb86150fa Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Sat, 27 Apr 2024 14:36:31 -0300 Subject: [PATCH 052/151] name vars in Message_DisplayScrollingText --- src/engine/fox_message.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/src/engine/fox_message.c b/src/engine/fox_message.c index 38b4ddbd..16b1a0ee 100644 --- a/src/engine/fox_message.c +++ b/src/engine/fox_message.c @@ -115,8 +115,8 @@ bool Message_DisplayText(Gfx** gfxPtr, u16* msgPtr, s32 xPos, s32 yPos, s32 len) } void Message_DisplayScrollingText(Gfx** gfxPtr, u16* msgPtr, s32 xPos, s32 yPos, s32 yRangeHi, s32 yRangeLo, s32 len) { - s32 var_s2 = xPos; - s32 var_s4 = yPos; + s32 x = xPos; + s32 y = yPos; s32 i; gDPSetTextureLUT((*gfxPtr)++, G_TT_RGBA16); @@ -125,24 +125,29 @@ void Message_DisplayScrollingText(Gfx** gfxPtr, u16* msgPtr, s32 xPos, s32 yPos, for (i = 0; msgPtr[i] != 0 && i < len; i++) { switch (msgPtr[i]) { case MSGCHAR_NWL: - var_s2 = xPos; - var_s4 += 15; + x = xPos; + y += 15; break; + case MSGCHAR_QSP: - var_s2 += 2; + x += 2; break; + case MSGCHAR_HSP: - var_s2 += 3; + x += 3; break; + case MSGCHAR_SPC: - var_s2 += 7; + x += 7; break; + default: - if ((yRangeLo < var_s4) && (var_s4 < yRangeHi)) { - Message_DisplayChar(gfxPtr, msgPtr[i], var_s2, var_s4); + if ((yRangeLo < y) && (y < yRangeHi)) { + Message_DisplayChar(gfxPtr, msgPtr[i], x, y); } - var_s2 += 7; + x += 7; break; + case MSGCHAR_NP2: case MSGCHAR_NP3: case MSGCHAR_NP4: From d2436e5850219a3cbbb18411a4a6777f0e3fe6dc Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Tue, 30 Apr 2024 09:46:49 -0300 Subject: [PATCH 053/151] Ending_8018845C fake match scratch comment --- src/overlays/ovl_ending/fox_end1.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/overlays/ovl_ending/fox_end1.c b/src/overlays/ovl_ending/fox_end1.c index dc2538aa..b61e5059 100644 --- a/src/overlays/ovl_ending/fox_end1.c +++ b/src/overlays/ovl_ending/fox_end1.c @@ -366,8 +366,9 @@ s32 Ending_80188394(void) { } } -#ifdef NON_MATCHING +// fake match we can't use here: https://decomp.me/scratch/OKs3B // stupid loop thing https://decomp.me/scratch/cyOva +#ifdef NON_MATCHING void Ending_8018845C(void) { s32 var_a2; u32 temp_a3; From 926677aa6c6cfb3b633a64c772d264e1946cc79c Mon Sep 17 00:00:00 2001 From: petrie911 <69443847+petrie911@users.noreply.github.com> Date: Wed, 1 May 2024 19:57:50 -0500 Subject: [PATCH 054/151] In-game ram watch mod + upgraded jukebox (#225) * new mods * Torch --- include/mods.h | 16 ++ include/variables.h | 3 + src/engine/fox_display.c | 6 + src/mods/object_ram.c | 317 +++++++++++++++++++++++++++++ src/mods/sfxjukebox2.c | 220 ++++++++++++++++++++ src/overlays/ovl_menu/fox_option.c | 38 +++- tools/Torch | 2 +- 7 files changed, 591 insertions(+), 11 deletions(-) create mode 100644 src/mods/object_ram.c create mode 100644 src/mods/sfxjukebox2.c diff --git a/include/mods.h b/include/mods.h index fd93b357..9419d8e4 100644 --- a/include/mods.h +++ b/include/mods.h @@ -11,6 +11,9 @@ /** * Sound Effects Jukebox: * Ability to play sound effects inside the expert sound menu + * Use L to switch between jukebox and soundtrack + * Use D-PAD to move the cursor + * Use C buttons to edit values */ #define MODS_SFX_JUKEBOX 0 @@ -20,6 +23,15 @@ */ #define MODS_FPS_COUNTER 0 +/** + * Object Ram Watch: + * Watch up to seven addresses from the player and object arrays + * Press C> while paused to enable/disable + * Use D-PAD to move the cursor and change values + * Press L to edit the highlighted value +*/ + +#define MODS_OBJECT_RAM 0 /* ************************* */ @@ -31,4 +43,8 @@ void Map_LevelSelect(void); static void Play_RenderFps(void); #endif +#if MODS_OBJECT_RAM == 1 +void ObjectRam_Update(void); +#endif + #endif diff --git a/include/variables.h b/include/variables.h index da10d9ad..e9dbf839 100644 --- a/include/variables.h +++ b/include/variables.h @@ -162,6 +162,9 @@ extern s32 gDisplayedHitCount; extern s32 D_hud_80161730; extern s32 gShowBossHealth; // 0x80161734 +// fox_std_lib +extern char D_801619A0[]; + // fox_play extern u8 gSavedZoSearchlightStatus; extern f32 gArwingSpeed; diff --git a/src/engine/fox_display.c b/src/engine/fox_display.c index cd7a5406..dfa8e507 100644 --- a/src/engine/fox_display.c +++ b/src/engine/fox_display.c @@ -1726,8 +1726,14 @@ void Play_Draw(void) { #if MODS_FPS_COUNTER == 1 Play_RenderFps(); #endif +#if MODS_OBJECT_RAM == 1 + ObjectRam_Update(); +#endif } #if MODS_FPS_COUNTER == 1 #include "../mods/fpscounter.c" #endif +#if MODS_OBJECT_RAM == 1 +#include "../mods/object_ram.c" +#endif diff --git a/src/mods/object_ram.c b/src/mods/object_ram.c new file mode 100644 index 00000000..fca77f6d --- /dev/null +++ b/src/mods/object_ram.c @@ -0,0 +1,317 @@ +#include "global.h" + +typedef struct RamEntry { + u8 type; + u8 index; + s16 offset; + u8 width; + u8 fmt; + u16 x; + u16 y; +} RamEntry; + +static RamEntry oRamEntries[8] = { + { 1, 0, offsetof(Player, pos.x), 2, 3, 0, 0 }, { 1, 0, offsetof(Player, pos.y), 2, 3, 0, 0 }, + { 1, 0, offsetof(Player, pos.z), 2, 3, 0, 0 }, { 0, 0, offsetof(Player, unk_144), 2, 3, 0, 0 }, + { 0, 0, offsetof(Player, vel.x), 2, 3, 0, 0 }, { 0, 0, offsetof(Player, vel.y), 2, 3, 0, 0 }, + { 0, 0, offsetof(Player, vel.z), 2, 3, 0, 0 }, +}; + +static u32 selectIndex = 0; +static s32 oRamActive = 0; +static u32 editMode = 0; +static s32 editing = 0; +static OSContPad* contPress; + +typedef enum ObjectRamType { + ORAM_NONE, + ORAM_PLAYER, + ORAM_SCENE360, + ORAM_SCENERY, + ORAM_SPRITE, + ORAM_ACTOR, + ORAM_BOSS, + ORAM_ITEM, + ORAM_EFFECT, + ORAM_SHOT, + ORAM_MAX, +} ObjectRamType; + +typedef enum EditMode { + EDM_TYPE, + EDM_OFFSET, + EDM_FORMAT, + EDM_POS, + EDM_MAX, +} EditMode; + +typedef enum FormatType { + FMT_HEX, + FMT_SIGN, + FMT_UNSIGN, + FMT_FLOAT, + FMT_MAX, +} FormatType; + +#define WRAP_MODE(val, max) ((u8) ((val) + (max)) % max) + +static void* objPointers[] = { NULL, NULL, NULL, gScenery, gSprites, gActors, gBosses, gItems, gEffects, gPlayerShots }; +static size_t objSizes[] = { 0, + sizeof(Player), + sizeof(Scenery360), + sizeof(Scenery), + sizeof(Sprite), + sizeof(Actor), + sizeof(Boss), + sizeof(Item), + sizeof(Effect), + sizeof(PlayerShot) }; +static s32 objCounts[] = { 1, + 1, + 200, + ARRAY_COUNT(gScenery), + ARRAY_COUNT(gSprites), + ARRAY_COUNT(gActors), + ARRAY_COUNT(gBosses), + ARRAY_COUNT(gItems), + ARRAY_COUNT(gEffects), + ARRAY_COUNT(gPlayerShots) }; + +void ObjectRam_EditPosition(RamEntry* entry) { + if ((contPress->button & U_JPAD) && (entry->y > 0)) { + entry->y--; + } else if ((contPress->button & D_JPAD) && (entry->y < SCREEN_HEIGHT)) { + entry->y++; + } else if ((contPress->button & L_JPAD) && (entry->x > 0)) { + entry->x--; + } else if ((contPress->button & R_JPAD) && (entry->x < SCREEN_WIDTH / 2)) { + entry->x++; + } +} + +void ObjectRam_EditObject(RamEntry* entry) { + if (contPress->button & U_JPAD) { + entry->type++; + if ((entry->type == ORAM_SCENE360) && (gLevelMode != LEVELMODE_ALL_RANGE)) { + entry->type = ORAM_SCENERY; + } else if ((entry->type == ORAM_SCENERY) && (gLevelClearScreenTimer == LEVELMODE_ALL_RANGE)) { + entry->type = ORAM_SPRITE; + } + } else if (contPress->button & D_JPAD) { + entry->type--; + if ((entry->type == ORAM_SCENE360) && (gLevelMode != LEVELMODE_ALL_RANGE)) { + entry->type = ORAM_PLAYER; + } else if ((entry->type == ORAM_SCENERY) && (gLevelClearScreenTimer == LEVELMODE_ALL_RANGE)) { + entry->type = ORAM_SCENE360; + } + } + entry->type = WRAP_MODE(entry->type, ORAM_MAX); + if (entry->type == 0) { + return; + } + if (entry->index >= objCounts[entry->type]) { + entry->index = objCounts[entry->type] - 1; + } + if (entry->offset >= objSizes[entry->type]) { + entry->offset = objSizes[entry->type] - (1 << entry->width); + } + if (contPress->button & L_JPAD) { + entry->index--; + } else if (contPress->button & R_JPAD) { + entry->index++; + } + + entry->index = WRAP_MODE(entry->index, objCounts[entry->type]); +} + +void ObjectRam_EditFormat(RamEntry* entry) { + if ((contPress->button & U_JPAD) && (entry->width < 2)) { + entry->width++; + } else if ((contPress->button & D_JPAD) && (entry->width > 0)) { + entry->width--; + } else if (contPress->button & L_JPAD) { + entry->fmt--; + } else if (contPress->button & R_JPAD) { + entry->fmt++; + } + entry->fmt = WRAP_MODE(entry->fmt, FMT_MAX); + if (entry->fmt == FMT_FLOAT) { + entry->width = 2; + } + entry->offset &= ~((1 << entry->width) - 1); +} + +void ObjectRam_EditAddress(RamEntry* entry) { + if (contPress->button & U_JPAD) { + entry->offset += 0x10; + } else if (contPress->button & D_JPAD) { + entry->offset -= 0x10; + } else if (contPress->button & L_JPAD) { + entry->offset -= 1 << entry->width; + } else if (contPress->button & R_JPAD) { + entry->offset += 1 << entry->width; + } else if (contPress->button & R_TRIG) { + entry->offset += 0x100; + } else if (contPress->button & Z_TRIG) { + entry->offset -= 0x100; + } + if (entry->offset < 0) { + entry->offset = 0; + } else if (entry->offset >= objSizes[entry->type]) { + entry->offset = objSizes[entry->type] - (1 << entry->width); + } +} + +void ObjectRam_Select(void) { + if (contPress->button & U_JPAD) { + selectIndex--; + } else if (contPress->button & D_JPAD) { + selectIndex++; + } else if (contPress->button & L_JPAD) { + editMode--; + } else if (contPress->button & R_JPAD) { + editMode++; + ; + } + selectIndex = WRAP_MODE(selectIndex, ARRAY_COUNT(oRamEntries)); + editMode = WRAP_MODE(editMode, EDM_MAX); + if (oRamEntries[selectIndex].type == ORAM_NONE) { + editMode = EDM_TYPE; + } +} + +u32 ObjectRam_GetData(RamEntry* entry) { + fu data; + uintptr_t ptr; + + if ((entry->type <= ORAM_NONE) || (entry->type >= ORAM_MAX)) { + return 0; + } + ptr = (uintptr_t) objPointers[entry->type] + entry->index * objSizes[entry->type]; + + switch (entry->width) { + case 0: + data.i = *((u8*) (ptr + entry->offset)); + if ((entry->fmt == FMT_SIGN) && (data.i >= 0x80)) { + data.i -= 0x80; + } + break; + case 1: + data.i = *((u16*) (ptr + entry->offset)); + if ((entry->fmt == FMT_SIGN) && (data.i >= 0x8000)) { + data.i -= 0x8000; + } + break; + case 2: + if (entry->fmt == FMT_FLOAT) { + data.f = *((f32*) (ptr + entry->offset)); + } else { + data.i = *((u32*) (ptr + entry->offset)); + } + break; + } + return data.i; +} + +static char* objTypes[] = { "NONE", "PLYR", "S360", "SCEN", "SPRT", "ACTR", "BOSS", "ITEM", "EFCT", "SHOT" }; +static char* fmtTypes[] = { "X", "S", "U", "F" }; + +#define SET_DRAW_COLOR(mode) \ + if ((index == selectIndex) && (editMode == mode)) { \ + if (editing) { \ + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 0, 0, 255); \ + } else { \ + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 128, 0, 255); \ + } \ + } else { \ + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); \ + } + +void ObjectRam_DrawEntry(RamEntry* entry, s32 index) { + fu data; + s32 y = entry->y + 50 + 27 * index; + + SET_DRAW_COLOR(EDM_TYPE) + Graphics_DisplaySmallText(entry->x + 10, y, 1.0f, 1.0f, objTypes[entry->type]); + + if (entry->type == 0) { + return; + } + + Graphics_Printf("%2d", entry->index); + Graphics_DisplaySmallText(entry->x + 45, y, 1.0f, 1.0f, D_801619A0); + SET_DRAW_COLOR(EDM_OFFSET) + Graphics_Printf("%03X", entry->offset); + Graphics_DisplaySmallText(entry->x + 70, y, 1.0f, 1.0f, D_801619A0); + SET_DRAW_COLOR(EDM_FORMAT) + Graphics_DisplaySmallText(entry->x + 10, y + 10, 1.0f, 1.0f, fmtTypes[entry->fmt]); + Graphics_Printf("%-2d", 1 << (entry->width + 3)); + Graphics_DisplaySmallText(entry->x + 20, y + 10, 1.0f, 1.0f, D_801619A0); + + if (index == selectIndex) { + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 192, 0, 255); + } else { + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); + } + + data.i = ObjectRam_GetData(entry); + switch (entry->fmt) { + case FMT_HEX: + Graphics_Printf("%0*X", 1 << (entry->width + 1), data.i); + break; + case FMT_SIGN: + Graphics_Printf("%d", data.i); + break; + case FMT_UNSIGN: + Graphics_Printf("%u", data.i); + break; + case FMT_FLOAT: + Graphics_Printf("%10.2f", data.f); + break; + } + Graphics_DisplaySmallText(entry->x + 40, y + 10, 1.0f, 1.0f, D_801619A0); +} + +static char* omStr[] = { "OBJECT", "OFFSET", "FORMAT", "POSITION" }; + +void ObjectRam_Update(void) { + s32 i; + objPointers[ORAM_PLAYER] = gPlayer; + objPointers[ORAM_SCENE360] = gScenery360; + objCounts[ORAM_PLAYER] = gCamCount; + contPress = &gControllerPress[gMainController]; + + if ((gPlayState == PLAY_PAUSE) && (contPress->button & R_CBUTTONS)) { + oRamActive = 1 - oRamActive; + } + if (!oRamActive || (gPlayState <= PLAY_INIT)) { + return; + } + if (contPress->button & L_TRIG) { + editing ^= 1; + } + if (!editing) { + ObjectRam_Select(); + } else { + switch (editMode) { + case 0: + ObjectRam_EditObject(&oRamEntries[selectIndex]); + break; + case 1: + ObjectRam_EditAddress(&oRamEntries[selectIndex]); + break; + case 2: + ObjectRam_EditFormat(&oRamEntries[selectIndex]); + break; + case 3: + ObjectRam_EditPosition(&oRamEntries[selectIndex]); + break; + } + } + RCP_SetupDL(&gMasterDisp, 0x4C); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); + // Graphics_DisplaySmallText(20, 50, 1.0f, 1.0f, omStr[editMode]); + for (i = 0; i < ARRAY_COUNT(oRamEntries); i++) { + ObjectRam_DrawEntry(&oRamEntries[i], i); + } +} diff --git a/src/mods/sfxjukebox2.c b/src/mods/sfxjukebox2.c new file mode 100644 index 00000000..553a09f0 --- /dev/null +++ b/src/mods/sfxjukebox2.c @@ -0,0 +1,220 @@ +#include "global.h" +#include "fox_map.h" +#include "fox_option.h" +#include "sf64audio_provisional.h" + +extern s32 spectrumAnalyzerMode; +extern bool D_menu_801B9320; +extern s32 D_menu_801B9244; +extern OptionId D_menu_801B9124; +extern s32 D_menu_801B912C; + +static s32 showJukebox = 0; +static u32 prevSfx = 0; +static u32 sfx = 0; +static s32 sfxId = 0; +static u32 sfxBank = 0; +static u32 sfxRange = 0; +static s32 sfxImport = 0; +static int holdTimer = 0; +static u8 sfxFlag = 0; +static u8 sfxFlags[] = { 0, 0, 0, 0, 0, 0, 0, 0 }; +static char* flagNames[] = { "F18", "F19", "F20", "F21", "F22", "F23", "STT", "F25", "F26", "SFX" }; +static u8 bankSizes[] = { 0x33, 0x85, 0x9B, 0x9C, 0x37 }; +static u32 sfxEditMode = 9; +static u32 srcEditMode = 0; +static u32 editMode = 0; +static s32 srcVec[3] = { 0, 0, 0 }; +static f32 sfxSource[3] = { 0.0f, 0.0f, 0.0f }; + +void Jukebox_SelectFlag(u8* flag) { + if (gControllerPress[gMainController].button & (U_CBUTTONS | D_CBUTTONS)) { + *flag ^= 1; + } +} + +void Jukebox_SelectWrap(u32* option, s32 range) { + if (gControllerPress[gMainController].button & U_CBUTTONS) { + (*option)++; + } else if (gControllerPress[gMainController].button & D_CBUTTONS) { + (*option)--; + } + *option = (*option + range) % range; +} + +Jukebox_SelectClamp(s32* option, s32 range, s32 skip) { + OSContPad* contPress = &gControllerPress[gMainController]; + OSContPad* contHold = &gControllerHold[gMainController]; + + if (contHold->button & (U_CBUTTONS | D_CBUTTONS)) { + holdTimer++; + } else { + holdTimer = 0; + } + + if (((contHold->button & U_CBUTTONS) && (holdTimer > 15)) || (contPress->button & U_CBUTTONS)) { + (*option)++; + } else if (((contHold->button & D_CBUTTONS) && (holdTimer > 15)) || (contPress->button & D_CBUTTONS)) { + (*option)--; + } else if (contPress->button & L_CBUTTONS) { + *option -= skip; + } else if (contPress->button & R_CBUTTONS) { + *option += skip; + } + if (*option < 0) { + *option = 0; + } else if (*option >= range) { + *option = range - 1; + } +} + +void Jukebox_UpdateSource(void) { + OSContPad* contPress = &gControllerPress[gMainController]; + OSContPad* contHold = &gControllerHold[gMainController]; + + if (contPress->button & L_JPAD) { + srcEditMode--; + } else if (contPress->button & R_JPAD) { + srcEditMode++; + } + srcEditMode = (srcEditMode + 3) % 3; + + if (contHold->button & (U_CBUTTONS | D_CBUTTONS | L_CBUTTONS | R_CBUTTONS)) { + holdTimer++; + } else { + holdTimer = 0; + } + + if (((contHold->button & U_CBUTTONS) && (holdTimer > 15)) || (contPress->button & U_CBUTTONS)) { + sfxSource[srcEditMode] += 100.0f; + } else if (((contHold->button & D_CBUTTONS) && (holdTimer > 15)) || (contPress->button & D_CBUTTONS)) { + sfxSource[srcEditMode] -= 100.0f; + } else if (((contHold->button & R_CBUTTONS) && (holdTimer > 15)) || (contPress->button & R_CBUTTONS)) { + sfxSource[srcEditMode] += 10.0f; + } else if (((contHold->button & L_CBUTTONS) && (holdTimer > 15)) || (contPress->button & L_CBUTTONS)) { + sfxSource[srcEditMode] -= 10.0f; + } +} + +void Jukebox_UpdateSfx(void) { + if (gControllerPress[gMainController].button & L_JPAD) { + sfxEditMode--; + } else if (gControllerPress[gMainController].button & R_JPAD) { + sfxEditMode++; + } + sfxEditMode = (sfxEditMode + 13) % 13; + switch (sfxEditMode) { + case 9: + Jukebox_SelectWrap(&sfxBank, 5); + break; + case 10: + Jukebox_SelectClamp(&sfxId, bankSizes[sfxBank], 0x10); + break; + case 11: + Jukebox_SelectFlag(&sfxFlag); + break; + case 12: + Jukebox_SelectWrap(&sfxRange, 4); + break; + case 8: + Jukebox_SelectClamp(&sfxImport, 0x100, 0x10); + break; + default: + if ((sfxEditMode >= 0) && (sfxEditMode < 8)) { + Jukebox_SelectFlag(&sfxFlags[sfxEditMode]); + } + break; + } + sfx = SFX_PACK(sfxBank, sfxRange, sfxImport, sfxId, 1, sfxFlag, sfxFlags[7], sfxFlags[6], sfxFlags[5], sfxFlags[4], + sfxFlags[3], sfxFlags[2], sfxFlags[1], sfxFlags[0]); +} + +s32 sfxModeX[] = { 95, 104, 113, 122, 131, 140, 149, 158, 180, 0, 22, 43, 60 }; +s32 srcModeX[] = { 45, 135, 225 }; +void Jukebox_Update(void) { + s32 i; + OSContPad* contPress = &gControllerPress[gMainController]; + OSContPad* contHold = &gControllerHold[gMainController]; + + if (contPress->button & U_JPAD) { + editMode--; + } else if (contPress->button & D_JPAD) { + editMode++; + } + editMode %= 2; + switch (editMode) { + case 0: + Jukebox_UpdateSfx(); + break; + case 1: + Jukebox_UpdateSource(); + break; + } + + if (prevSfx != sfx) { + AUDIO_PLAY_SFX(0x49000002, gDefaultSfxSource, 4); + prevSfx = sfx; + } + + if (contPress->button & A_BUTTON) { + SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); + SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); + AUDIO_PLAY_SFX(sfx, sfxSource, 4); + D_menu_801B9320 = true; + } + + if (contPress->button & B_BUTTON) { + if (!D_menu_801B9320) { + AUDIO_PLAY_BGM(SEQ_ID_MENU); + gDrawMode = DRAW_NONE; + D_menu_801B9124 = 1000; + D_menu_801B912C = 0; + D_menu_801B9244 = 1; + return; + } else { + AUDIO_PLAY_SFX(0x4900101D, gDefaultSfxSource, 4); + Audio_KillSfxBySource(sfxSource); + SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); + SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); + D_menu_801B9320 = false; + } + } + + // Spectrum Analyzer mode selector + if (contPress->button & Z_TRIG) { + spectrumAnalyzerMode++; + if (spectrumAnalyzerMode > 2) { + spectrumAnalyzerMode = 0; + } + } + + /* Draw */ + + RCP_SetupDL(&gMasterDisp, 0x53); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); + + Graphics_Printf("SFX ID: %08X", sfx); + Graphics_DisplaySmallText(20, 50, 1.0f, 1.0f, D_801619A0); + Graphics_DisplaySmallText(20, 80, 1.0f, 1.0f, "B ID X R S FLAG IMP"); + Graphics_Printf("%d %02X %d %d %d %d%d%d%d%d%d%d%d %02X", sfxBank, sfxId, sfxFlag, sfxRange, 1, sfxFlags[0], + sfxFlags[1], sfxFlags[2], sfxFlags[3], sfxFlags[4], sfxFlags[5], sfxFlags[6], sfxFlags[7], + sfxImport); + Graphics_DisplaySmallText(20, 70, 1.0f, 1.0f, D_801619A0); + + // Graphics_DisplaySmallText(80, 50, 1.0f, 1.0f, hexString); + for (i = 0; i < 3; i++) { + Graphics_Printf("%5.0f", sfxSource[i]); + Graphics_DisplaySmallText(20 + 90 * i, 100, 1.0f, 1.0f, D_801619A0); + } + Graphics_DisplaySmallText(45, 110, 1.0f, 1.0f, "X"); + Graphics_DisplaySmallText(135, 110, 1.0f, 1.0f, "Y"); + Graphics_DisplaySmallText(225, 110, 1.0f, 1.0f, "Z"); + switch (editMode) { + case 0: + Graphics_DisplaySmallText(20 + sfxModeX[sfxEditMode], 60, 1.0f, 1.0f, "V"); + break; + case 1: + Graphics_DisplaySmallText(45 + 90 * srcEditMode, 90, 1.0f, 1.0f, "V"); + break; + } +} diff --git a/src/overlays/ovl_menu/fox_option.c b/src/overlays/ovl_menu/fox_option.c index 5f82b0ef..9bbc8ea3 100644 --- a/src/overlays/ovl_menu/fox_option.c +++ b/src/overlays/ovl_menu/fox_option.c @@ -1653,14 +1653,25 @@ void Option_ExpertSoundInit(void) { // clang-format on } -// Expert Sound Options #if MODS_SFX_JUKEBOX == 1 -#include "../../mods/sfxjukebox.c" -#else +#include "../../mods/sfxjukebox2.c" +#endif + +// Expert Sound Options void Option_ExpertSoundUpdate(void) { s32 pad; f32 sp28 = D_menu_801B931C; +#if MODS_SFX_JUKEBOX == 1 + if (gControllerPress[gMainController].button & L_TRIG) { + showJukebox ^= 1; + } + if (showJukebox) { + Jukebox_Update(); + return; + } +#endif + if (Option_8019C66C(&sp28, 0.0f, 49.0f, &D_menu_801B9290) != 0) { AUDIO_PLAY_SFX(0x49000002, gDefaultSfxSource, 4); D_menu_801B931C = sp28; @@ -1695,7 +1706,6 @@ void Option_ExpertSoundUpdate(void) { } } } -#endif void Option_ExpertSoundDraw(void) { u8* temp_v0_4; @@ -1728,16 +1738,24 @@ void Option_ExpertSoundDraw(void) { Option_DrawMenuLabel(); - RCP_SetupDL(&gMasterDisp, 0x53); +#if MODS_SFX_JUKEBOX == 1 + if (!showJukebox) { +#endif - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); + RCP_SetupDL(&gMasterDisp, 0x53); - TextureRect_8bIA(&gMasterDisp, D_OPT_80079F0, 128, 14, 49.0f, 81.0f, 1.0f, 1.0f); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_8bIA(&gMasterDisp, D_menu_801AECF8[D_menu_801B931C / 10], 16, 15, 230.0f, 82.0f, 1.0f, 1.0f); + TextureRect_8bIA(&gMasterDisp, D_OPT_80079F0, 128, 14, 49.0f, 81.0f, 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, D_menu_801AECF8[D_menu_801B931C % 10], 16, 15, 244.0f, 82.0f, 1.0f, 1.0f); + TextureRect_8bIA(&gMasterDisp, D_menu_801AECF8[D_menu_801B931C / 10], 16, 15, 230.0f, 82.0f, 1.0f, 1.0f); + + TextureRect_8bIA(&gMasterDisp, D_menu_801AECF8[D_menu_801B931C % 10], 16, 15, 244.0f, 82.0f, 1.0f, 1.0f); + +#if MODS_SFX_JUKEBOX == 1 + } +#endif Option_8019B7D4(); diff --git a/tools/Torch b/tools/Torch index 4d6744dc..e6de3268 160000 --- a/tools/Torch +++ b/tools/Torch @@ -1 +1 @@ -Subproject commit 4d6744dcaca3bb1902a74e823353d7d79c6d3d39 +Subproject commit e6de326810c4f56810e98d4e2812995df29bfbb9 From c9df6fda729f76607b3c1ce45cfe82a203f16d99 Mon Sep 17 00:00:00 2001 From: petrie911 <69443847+petrie911@users.noreply.github.com> Date: Thu, 2 May 2024 15:46:51 -0500 Subject: [PATCH 055/151] More docs (#226) * docs * more docs * forgot timers --- include/context.h | 38 +- include/functions.h | 30 +- include/sf64object.h | 74 +- include/sf64player.h | 130 +- include/variables.h | 2 +- linker_scripts/us/symbol_addrs.txt | 4 +- linker_scripts/us/symbol_addrs_engine.txt | 44 +- src/engine/fox_360.c | 133 +- src/engine/fox_beam.c | 172 +-- src/engine/fox_bg.c | 56 +- src/engine/fox_boss.c | 12 +- src/engine/fox_context.c | 40 +- src/engine/fox_demo.c | 972 +++++++------- src/engine/fox_display.c | 234 ++-- src/engine/fox_edata_info.c | 30 +- src/engine/fox_edisplay.c | 226 ++-- src/engine/fox_effect.c | 113 +- src/engine/fox_enmy.c | 450 +++---- src/engine/fox_enmy2.c | 180 +-- src/engine/fox_game.c | 4 +- src/engine/fox_hud.c | 278 ++-- src/engine/fox_play.c | 1441 +++++++++++---------- src/engine/fox_tank.c | 575 ++++---- src/engine/fox_versus.c | 26 +- src/mods/object_ram.c | 2 +- src/overlays/ovl_ending/fox_end1.c | 94 +- src/overlays/ovl_ending/fox_end2.c | 2 +- src/overlays/ovl_i1/fox_co.c | 310 ++--- src/overlays/ovl_i1/fox_tr.c | 10 +- src/overlays/ovl_i1/fox_tr360.c | 22 +- src/overlays/ovl_i1/fox_ve1.c | 36 +- src/overlays/ovl_i2/fox_me.c | 165 +-- src/overlays/ovl_i2/fox_sx.c | 120 +- src/overlays/ovl_i3/fox_a6.c | 91 +- src/overlays/ovl_i3/fox_aq.c | 435 +++---- src/overlays/ovl_i3/fox_so.c | 210 +-- src/overlays/ovl_i3/fox_zo.c | 244 ++-- src/overlays/ovl_i4/fox_bo.c | 216 +-- src/overlays/ovl_i4/fox_fo.c | 184 +-- src/overlays/ovl_i4/fox_ka.c | 114 +- src/overlays/ovl_i4/fox_sz.c | 140 +- src/overlays/ovl_i5/fox_ma.c | 579 ++++----- src/overlays/ovl_i5/fox_ti.c | 194 +-- src/overlays/ovl_i5/fox_ti_cs.c | 86 +- src/overlays/ovl_i6/fox_andross.c | 245 ++-- src/overlays/ovl_i6/fox_sy.c | 178 +-- src/overlays/ovl_i6/fox_turret.c | 80 +- src/overlays/ovl_i6/fox_ve2.c | 94 +- src/overlays/ovl_menu/fox_map.c | 122 +- src/overlays/ovl_menu/fox_option.c | 2 +- 50 files changed, 4628 insertions(+), 4611 deletions(-) diff --git a/include/context.h b/include/context.h index 6a8156cc..690df8cd 100644 --- a/include/context.h +++ b/include/context.h @@ -26,9 +26,9 @@ extern s32 gPrevPlanetSavedTeamShields[6]; extern s32 gTeamDamage[6]; extern u8 gMissionStatus; extern f32 gGroundHeight; -extern f32 D_ctx_80177950; -extern f32 D_ctx_80177968; -extern f32 D_ctx_80177970; +extern f32 D_ctx_80177950; // sign of something to do with camera z rotations +extern f32 gPlayerTurnRate; +extern f32 gPlayerTurnStickMod; extern f32 gCsCamEyeX; extern f32 gCsCamEyeY; extern f32 gCsCamEyeZ; @@ -61,13 +61,13 @@ extern u16 gBgmSeqId; extern u8 gLevelType; extern s32 gSavedObjectLoadIndex; extern UNK_TYPE F_80177CA8; -extern f32 D_ctx_80177CB0; +extern f32 gSavedPathProgress; extern UNK_TYPE F_80177CB8; extern f32 gWaterLevel; -extern f32 D_ctx_80177CC8; -extern f32 D_ctx_80177CE8; -extern f32 D_ctx_80177D08; -extern f32 D_ctx_80177D20; +extern f32 gPathGroundScroll; +extern f32 gPathTexScroll; +extern f32 gPathVelZ; +extern f32 gPathProgress; extern f32 gRadioPortraitScaleY; extern f32 gRadioTextBoxScaleY; extern f32 gRadioMsgRadioId; @@ -226,7 +226,7 @@ extern s32 gHitCount; extern s32 gSavedHitCount; extern s16 gLifeCount[4]; extern LaserStrength gLaserStrength[4]; -extern s32 D_ctx_80161AB8; +extern s32 gCullObjects; extern UNK_TYPE F_80161AC0[16]; extern Scenery gScenery[50]; extern Sprite gSprites[40]; @@ -272,13 +272,13 @@ extern s32 D_ctx_80177990[4]; extern f32 D_ctx_801779A8[4]; extern u8 gPauseEnabled; extern s32 gChargeTimers[4]; -extern f32 D_ctx_801779E4; -extern f32 D_ctx_801779F4; -extern s32 D_Timer_80177A00[4]; -extern s32 D_Timer_80177A38[4]; -extern s32 D_Timer_80177A70[4]; -extern s32 D_Timer_80177A88[4]; -extern f32 D_ctx_80177AA0[4]; +extern f32 gPathVelX; +extern f32 gPathVelY; +extern s32 gUturnDownTimers[4]; +extern s32 gUturnBrakeTimers[4]; +extern s32 gLoopDownTimers[4]; +extern s32 gLoopBoostTimers[4]; +extern f32 gMuzzleFlashScale[4]; extern f32 gShieldAlpha[4]; extern s32 gHasShield[4]; extern s32 gShieldTimer[4]; @@ -289,11 +289,11 @@ extern u8 gCoUturnCount; extern u8 gGreatFoxIntact; extern u8 gTiStartLandmaster; extern u16 gControllerRumbleTimers[4]; -extern u16 D_ctx_80177C30[4]; +extern u16 gPlayerScores[4]; extern s32 D_ctx_80177C50; extern s32 D_ctx_80177C70; -extern s32 D_ctx_80177C78; -extern s32 D_ctx_80177C8C; +extern s32 gTraining360MsgTimer; +extern s32 gTraining360MsgIndex; extern s32 D_ctx_80177C94; extern s32 D_ctx_80177C9C; extern s32 D_ctx_80177CA4; diff --git a/include/functions.h b/include/functions.h index 999d12d4..41deb1c3 100644 --- a/include/functions.h +++ b/include/functions.h @@ -82,8 +82,8 @@ void Cutscene_LevelComplete(Player*); void Cutscene_UTurn(Player*); void Cutscene_KillPlayer(Player* player); void Cutscene_PlayerDown(Player*); -void Actor195_Update(Actor*); -void Actor195_Draw(Actor*); +void ActorCutscene_Update(Actor*); +void ActorCutscene_Draw(Actor*); void Cutscene_DrawGreatFox(void); // fox_display @@ -95,7 +95,7 @@ void Play_Draw(void); // fox_edata void func_edata_800594F0(Scenery*); void func_edata_800595D0(Scenery*); -void func_edisplay_800596C0(void); +void Object_ApplyWaterDistortion(void); void func_edata_800596B0(Actor*); // fox_edisplay @@ -103,9 +103,9 @@ void Graphics_SetScaleMtx(f32); void Sprite168_Draw(Sprite*); void Actor201_Draw(Actor*); void Actor202_Draw(Actor*); -void Obj39_Draw(Scenery*); -void func_edisplay_80059B20(Scenery*); -void Obj42_Draw(Scenery*); +void MeteoTunnel_Draw(Scenery*); +void Scenery_DrawTitaniaBones(Scenery*); +void Scenery42_Draw(Scenery*); void Actor196_Draw(Actor*); void Sprite167_Draw(Sprite*); void FogShadow_Draw(Sprite*); @@ -162,7 +162,7 @@ bool Object_CheckHitboxCollision(Vec3f* pos, f32* hitboxData, Object* obj, f32 x bool Object_CheckSingleHitbox(Vec3f*, f32*, Vec3f*); bool Object_CheckPolyCollision(Vec3f* , Vec3f* , ObjectId , Object* ); s32 Object_CheckCollision(s32 , Vec3f* , Vec3f* , s32 ); -void func_enmy_800652CC(Scenery*); +void Scenery_UpdateTitaniaBones(Scenery*); void func_enmy_800654E4(Object*); void func_enmy_800656D4(Actor*); void func_enmy_800660F0(Actor*); @@ -175,8 +175,8 @@ void func_enmy_80066C00(Scenery*); void func_enmy_80066D5C(Scenery*); void Sprite167_Update(Sprite*); void func_enmy_80066EA8(Scenery*); -void func_enmy_80066EF0(Item*); -void func_enmy_800671D0(Item*); +void Item_CheckBounds(Item*); +void Item_SpinPickup(Item*); void func_enmy_800674B4(f32, f32, f32, f32, f32, f32, f32, f32); void ActorSupplies_Update(Actor*); void ActorSupplies_Draw(Actor*); @@ -213,16 +213,16 @@ void Object_Update(void); //fox_enmy2 void Actor237_Update(Actor*); void Actor237_Draw(Actor*); -void Obj54_Update(Scenery*); +void Scenery54_Update(Scenery*); void Actor201_Update(Actor*); void Actor202_Update(Actor*); void Actor194_Update(Actor*); -void Actor194_Init(Actor*); +void Actor194_Dying(Actor*); void Actor194_Draw(Actor*); -void Obj42_Update(Scenery*); +void Scenery42_Update(Scenery*); void Actor196_Update(Actor*); void Actor189_Update(Actor*); -void Obj39_Update(Scenery*); +void MeteoTunnel_Update(Scenery*); void func_enmy2_8006ECBC(PlayerShotId, PlayerShot*, s32, f32, f32, f32, f32, f32, f32, f32, f32, f32); void func_enmy2_8006EEFC(s32, f32, f32, f32, f32, f32, f32, f32, f32, f32); void func_enmy2_8006EFA0(s32 unk0E4, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 xRot, f32 yRot, @@ -230,7 +230,7 @@ void func_enmy2_8006EFA0(s32 unk0E4, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 void ActorEvent_8006F0D8(f32 xPos, f32 yPos, f32 zPos, f32 scale1); void ActorEvent_8006F254(Actor*); void ActorEvent_Update(Actor*); -s32 Obj111_Draw(Scenery*); +s32 Scenery111_Draw(Scenery*); void ActorEvent_Draw(Actor*); void func_enmy2_800763A4(Actor*); void ActorEvent_Dying(Actor*); @@ -483,7 +483,7 @@ void func_play_800AD7F0(Player* player); void func_play_800ADF58(Player* player); void func_play_800B415C(Player* player); void func_play_800B41E0(Player* player); -void func_play_800B41EC(Player* player); +void Player_Down(Player* player); void func_play_800A46A0(Player* player); void func_play_800A86E4(Player* player); void func_play_800A887C(Player* player); diff --git a/include/sf64object.h b/include/sf64object.h index 9fb29722..53ee4eec 100644 --- a/include/sf64object.h +++ b/include/sf64object.h @@ -42,7 +42,7 @@ typedef struct { typedef enum { /* 0 */ COL1_0, // OBJ_ACTOR_180 - /* 1 */ COL1_1, // OBJ_SCENERY_39 + /* 1 */ COL1_1, // OBJ_SCENERY_ME_TUNNEL /* 2 */ COL1_2, /* 3 */ COL1_3, // ACTOR_EVENT_ID /* 4 */ COL1_4, // OBJ_BOSS_308 @@ -88,29 +88,29 @@ typedef struct { /* 0x00 */ u8 status; /* 0x02 */ u16 type; /* 0x04 */ Vec3f pos; - /* 0x10 */ f32 unk_10; + /* 0x10 */ f32 yRot; /* 0x14 */ char pad14[0x14]; } RadarMark; // size = 0x28 typedef struct { /* 0x00 */ u8 mode; /* 0x02 */ u16 timer; - /* 0x04 */ Vec3f unk_04; - /* 0x10 */ Vec3f unk_10; - /* 0x1C */ f32 unk_1C; - /* 0x20 */ f32 unk_20; - /* 0x24 */ f32 unk_24; - /* 0x28 */ f32 unk_28; - /* 0x2C */ u8 unk_2C; // possibly a color struct - /* 0x2D */ u8 unk_2D; - /* 0x2E */ u8 unk_2E; - /* 0x2F */ u8 unk_2F; + /* 0x04 */ Vec3f posAA; + /* 0x10 */ Vec3f posBB; + /* 0x1C */ f32 xRot; + /* 0x20 */ f32 yRot; + /* 0x24 */ f32 zScale; + /* 0x28 */ f32 xyScale; + /* 0x2C */ u8 red; // possibly a color struct + /* 0x2D */ u8 green; + /* 0x2E */ u8 blue; + /* 0x2F */ u8 alpha; } TexturedLine; // size = 0x30 typedef struct { /* 0x00 */ u8 hits; /* 0x04 */ Vec3f pos; - /* 0x10 */ f32 unk_10; + /* 0x10 */ f32 rise; /* 0x14 */ char pad14[0x4]; /* 0x18 */ u16 timer; } BonusText; // size = 0x1C @@ -143,13 +143,13 @@ typedef struct { /* 0x00 */ u8 drawType; /* 0x08 */ ObjectFunc action; // argument must have object type. /* 0x0C */ f32* hitbox; - /* 0x10 */ f32 unk_10; // z coordinate of something - /* 0x14 */ s16 unk_14; // can be -1, 0, 1 - /* 0x16 */ s16 unk_16; // can be 0, 1, 2 + /* 0x10 */ f32 cullDistance; // z coordinate of something + /* 0x14 */ s16 unk_14; // can be -1, 0, 1. governs camera-related behavior in effects (billboarding?) + /* 0x16 */ s16 unk_16; // can be 0, 1, 2. affects death behavior? /* 0x18 */ u8 damage; - /* 0x19 */ u8 unk_19; // can be 0, 1, 2 - /* 0x1C */ f32 unk_1C; // target lock y offset. 0.0f can't be targeted - /* 0x20 */ u8 bonus; // bonus hits when killed. 0 means no + /* 0x19 */ u8 unk_19; // can be 0, 1, 2. Also camera-related? + /* 0x1C */ f32 targetOffset; // target lock y offset. 0.0f can't be targeted + /* 0x20 */ u8 bonus; // hits when killed. numbers above 1 indicate the hit+ bonus } ObjectInfo; // size = 0x24 typedef struct { @@ -202,7 +202,7 @@ typedef struct { /* 0x54 */ f32 unk_54; /* 0x58 */ f32 unk_58; /* 0x5C */ f32 sfxSource[3]; - /* 0x68 */ f32 scale; + /* 0x68 */ f32 width; } Item; // size 0x6C typedef struct { @@ -264,7 +264,7 @@ typedef struct { #define DMG_BEAM 1 #define DMG_NONE 0 #define DMG_BOMB -1 -#define DMG_UNK_100 100 +#define DMG_zRot_0FC 100 typedef struct { /* 0x000 */ Object obj; @@ -291,9 +291,9 @@ typedef struct { /* 0x0C9 */ u8 unk_0C9; /* 0x0CA */ u8 lockOnTimers[4]; /* 0x0CE */ s16 health; - /* 0x0D0 */ s8 unk_0D0; - /* 0x0D2 */ s16 unk_0D2; - /* 0x0D4 */ s16 unk_0D4; + /* 0x0D0 */ s8 dmgType; + /* 0x0D2 */ s16 dmgPart; + /* 0x0D4 */ s16 dmgSource; /* 0x0D6 */ u16 damage; /* 0x0D8 */ Vec3f hitPos; /* 0x0E4 */ s16 aiType; @@ -338,17 +338,17 @@ typedef enum ObjectId { /* 26 */ OBJ_SCENERY_26, /* 27 */ OBJ_SCENERY_27, /* 28 */ OBJ_SCENERY_28, - /* 29 */ OBJ_SCENERY_29, - /* 30 */ OBJ_SCENERY_30, - /* 31 */ OBJ_SCENERY_31, - /* 32 */ OBJ_SCENERY_32, - /* 33 */ OBJ_SCENERY_33, - /* 34 */ OBJ_SCENERY_34, - /* 35 */ OBJ_SCENERY_35, - /* 36 */ OBJ_SCENERY_36, - /* 37 */ OBJ_SCENERY_37, - /* 38 */ OBJ_SCENERY_38, - /* 39 */ OBJ_SCENERY_39, + /* 29 */ OBJ_SCENERY_TI_SKULL, + /* 30 */ OBJ_SCENERY_TI_RIB_0, + /* 31 */ OBJ_SCENERY_TI_RIB_1, + /* 32 */ OBJ_SCENERY_TI_RIB_2, + /* 33 */ OBJ_SCENERY_TI_RIB_3, + /* 34 */ OBJ_SCENERY_TI_RIB_4, + /* 35 */ OBJ_SCENERY_TI_RIB_5, + /* 36 */ OBJ_SCENERY_TI_RIB_6, + /* 37 */ OBJ_SCENERY_TI_RIB_7, + /* 38 */ OBJ_SCENERY_TI_RIB_8, + /* 39 */ OBJ_SCENERY_ME_TUNNEL, /* 40 */ OBJ_SCENERY_40, /* 41 */ OBJ_SCENERY_41, /* 42 */ OBJ_SCENERY_42, @@ -504,7 +504,7 @@ typedef enum ObjectId { /* 192 */ OBJ_ACTOR_192, /* 193 */ OBJ_ACTOR_193, /* 194 */ OBJ_ACTOR_194, - /* 195 */ OBJ_ACTOR_195, + /* 195 */ OBJ_ACTOR_CUTSCENE, /* 196 */ OBJ_ACTOR_196, /* 197 */ OBJ_ACTOR_ALLRANGE, /* 198 */ OBJ_ACTOR_TEAM_BOSS, @@ -1119,7 +1119,7 @@ typedef Actor Actor191; typedef Actor Actor192; typedef Actor Actor193; typedef Actor Actor194; -typedef Actor Actor195; +typedef Actor ActorCutscene; typedef Actor Actor196; typedef Actor ActorAllRange; typedef Actor ActorTeamBoss; diff --git a/include/sf64player.h b/include/sf64player.h index f2ebffaf..ccd81441 100644 --- a/include/sf64player.h +++ b/include/sf64player.h @@ -97,11 +97,9 @@ typedef struct { /* 0x00 */ Object obj; /* 0x1C */ s32 index; /* 0x20 */ Vec3f vel; - /* 0x2C */ f32 unk_2C; - /* 0x30 */ f32 unk_30; - /* 0x34 */ f32 unk_34; + /* 0x2C */ Vec3f vec_2C; /* 0x38 */ f32 sfxSource[3]; - /* 0x44 */ f32 unk_44; + /* 0x44 */ f32 scale; /* 0x48 */ f32 unk_48; /* 0x4C */ f32 unk_4C; /* 0x50 */ f32 unk_50; @@ -165,55 +163,49 @@ typedef struct Player { /* 0x058 */ f32 camYaw; /* 0x05C */ f32 camPitch; /* 0x05C */ f32 unk_060; - /* 0x064 */ f32 unk_064; - /* 0x068 */ f32 unk_068; - /* 0x06C */ f32 unk_06C; - /* 0x070 */ f32 unk_070; - /* 0x074 */ Vec3f pos; - /* 0x080 */ f32 unk_080; - /* 0x084 */ f32 unk_084; - /* 0x088 */ f32 unk_088; - /* 0x08C */ f32 unk_08C; - /* 0x090 */ Vec3f unk_090; - /* 0x09C */ f32 unk_09C; - /* 0x0A0 */ f32 unk_0A0; - /* 0x0A4 */ f32 unk_0A4; - /* 0x0A8 */ f32 unk_0A8; - /* 0x0AC */ f32 unk_0AC; - /* 0x0B0 */ f32 unk_0B0; - /* 0x0B4 */ f32 unk_0B4; - /* 0x0B8 */ f32 unk_0B8; - /* 0x0BC */ f32 unk_0BC; + /* 0x064 */ Vec3f groundPos; // position on ground directly below player + /* 0x070 */ f32 groundRotY; // y rotation of actor under player when acting as ground + /* 0x074 */ Vec3f pos; // pos.z is position along path. see trueZpos for the actual z position + /* 0x080 */ f32 yBob; + /* 0x084 */ f32 xShake; + /* 0x088 */ f32 bobPhase; + /* 0x08C */ f32 camDist; + /* 0x090 */ Vec3f basePos; // position at start of update + /* 0x09C */ f32 pathWidth; + /* 0x0A0 */ f32 pathHeight; + /* 0x0A4 */ f32 pathFloor; + /* 0x0A8 */ f32 unk_0A8; // set to 3000.0f, not used. May have been z-extent of path? + /* 0x0AC */ f32 xPath; + /* 0x0B0 */ f32 yPath; + /* 0x0B4 */ f32 pathStep; + /* 0x0B8 */ f32 xPathTarget; + /* 0x0BC */ f32 yPathTarget; /* 0x0C0 */ Vec3f vel; - /* 0x0CC */ f32 unk_0CC; + /* 0x0CC */ f32 warpCamSpeed; /* 0x0D0 */ f32 baseSpeed; - /* 0x0D4 */ f32 unk_0D4; - /* 0x0D8 */ Vec3f unk_0D8; - /* 0x0E4 */ f32 unk_0E4; - /* 0x0E8 */ f32 unk_0E8; - /* 0x0EC */ f32 unk_0EC; - /* 0x0F0 */ f32 unk_0F0; - /* 0x0F4 */ f32 unk_0F4; - /* 0x0F8 */ f32 unk_0F8; - /* 0x0FC */ f32 unk_0FC; - /* 0x100 */ f32 unk_100; - /* 0x104 */ f32 unk_104; - /* 0x108 */ f32 unk_108; - /* 0x10C */ f32 unk_10C; + /* 0x0D4 */ f32 gravity; + /* 0x0D8 */ Vec3f knockback; + /* 0x0E4 */ Vec3f rot; + /* 0x0F0 */ f32 rockAngle; + /* 0x0F4 */ f32 rockPhase; + /* 0x0F8 */ f32 bankAngle; + /* 0x0FC */ f32 xRot_0FC; + /* 0x100 */ f32 zRot_0FC; + /* 0x104 */ Vec3f rot_104; /* 0x110 */ f32 boostSpeed; - /* 0x114 */ f32 unk_114; - /* 0x118 */ f32 unk_118; - /* 0x11C */ f32 unk_11C; - /* 0x120 */ f32 unk_120; - /* 0x124 */ f32 unk_124; + /* 0x114 */ f32 yRot_114; + /* 0x118 */ f32 yRot_118; + /* 0x11C */ f32 yRotVel_11C; + /* 0x120 */ f32 xRot_120; + /* 0x124 */ f32 xRot_124; /* 0x128 */ char pad128[4]; - /* 0x12C */ f32 unk_12C; - /* 0x130 */ f32 unk_130; - /* 0x134 */ f32 unk_134; - /* 0x138 */ f32 unk_138; + /* 0x12C */ f32 zRotBank; + /* 0x130 */ f32 zRotBarrelRoll; + /* 0x134 */ f32 damageShake; + /* 0x138 */ f32 trueZpos; // the actual position of the arwing. pos.z is its z position along the path /* 0x13C */ char pad13C[4]; - /* 0x140 */ f32 unk_140; - /* 0x144 */ f32 unk_144; + /* 0x140 */ f32 zPathVel; + /* 0x144 */ f32 zPath; /* 0x148 */ f32 unk_148; /* 0x14C */ f32 unk_14C; /* 0x150 */ f32 unk_150; @@ -247,18 +239,18 @@ typedef struct Player { /* 0x1C4 */ s32 num; /* 0x1C8 */ PlayerState1C8 state_1C8; /* 0x1CC */ PlayerForm form; - /* 0x1D0 */ s32 unk_1D0; - /* 0x1D4 */ s32 unk_1D4; - /* 0x1D8 */ s32 unk_1D8; - /* 0x1DC */ s32 unk_1DC; - /* 0x1E0 */ s32 timer_1E0; - /* 0x1E4 */ s32 timer_1E4; + /* 0x1D0 */ s32 csState; + /* 0x1D4 */ bool grounded; + /* 0x1D8 */ s32 meTargetIndex; + /* 0x1DC */ s32 barrelRoll; + /* 0x1E0 */ s32 barrelInputTimerL; + /* 0x1E4 */ s32 barrelInputTimerR; /* 0x1E8 */ s32 timer_1E8; - /* 0x1EC */ s32 unk_1EC; - /* 0x1F0 */ s32 unk_1F0; - /* 0x1F4 */ s32 unk_1F4; - /* 0x1F8 */ s32 timer_1F8; - /* 0x1FC */ s32 timer_1FC; + /* 0x1EC */ s32 rollRate; + /* 0x1F0 */ s32 baseRollRate; + /* 0x1F4 */ s32 hitTimer; + /* 0x1F8 */ s32 csTimer; + /* 0x1FC */ s32 csEventTimer; /* 0x200 */ s32 unk_200; /* 0x204 */ s32 unk_204; /* 0x208 */ s32 unk_208; @@ -267,7 +259,7 @@ typedef struct Player { /* 0x214 */ s32 timer_214; /* 0x218 */ s32 timer_218; /* 0x21C */ s32 unk_21C; - /* 0x220 */ s32 timer_220; + /* 0x220 */ s32 radioDamageTimer; /* 0x224 */ s32 timer_224; /* 0x228 */ s32 flags_228; /* 0x22C */ s32 whooshTimer; @@ -279,27 +271,27 @@ typedef struct Player { /* 0x244 */ s32 timer_244; /* 0x248 */ f32 unk_248; /* 0x24C */ f32 unk_24C; - /* 0x250 */ f32 unk_250; + /* 0x250 */ f32 unk_250; // checked for by event actors, but unused? /* 0x250 */ char pad254[4]; - /* 0x258 */ f32 unk_258; - /* 0x25C */ f32 unk_25C; + /* 0x258 */ f32 meteoWarpSpinSpeed; + /* 0x25C */ f32 contrailScale; /* 0x260 */ char pad260[4]; /* 0x264 */ s32 shields; /* 0x268 */ s32 damage; /* 0x26C */ s32 heal; - /* 0x270 */ s32 unk_270; + /* 0x270 */ s32 unk_270; // checked for by event actors, but unused? /* 0x274 */ char pad274[4]; /* 0x278 */ s32 timer_278; - /* 0x27C */ s32 timer_27C; - /* 0x280 */ s32 unk_280; + /* 0x27C */ s32 meteoWarpTimer; + /* 0x280 */ s32 barrelRollAlpha; /* 0x284 */ s32 unk_284; /* 0x288 */ s32 unk_288; /* 0x28C */ char pad28C[0x28]; /* 0x2B4 */ bool boostCooldown; /* 0x2B8 */ bool boostActive; /* 0x2BC */ f32 boostMeter; - /* 0x2C0 */ f32 unk_2C0; - /* 0x2C4 */ s32 unk_2C4; + /* 0x2C0 */ f32 unk_2C0; // has to do with starting right tank jet + /* 0x2C4 */ s32 unk_2C4; // counts up during some effects. never used /* 0x2C8 */ Vec3f hit2; /* 0x2D4 */ Vec3f hit1; /* 0x2E0 */ Vec3f hit3; @@ -310,7 +302,7 @@ typedef struct Player { /* 0x478 */ PlayerSfx sfx; /* 0x498 */ s32 timer_498; /* 0x49C */ WingInfo wings; - /* 0x4D8 */ f32 unk_4D8; + /* 0x4D8 */ f32 aerobaticPitch; /* 0x4DC */ s32 somersault; } Player; // size = 0x4E0 diff --git a/include/variables.h b/include/variables.h index e9dbf839..f8ecd58f 100644 --- a/include/variables.h +++ b/include/variables.h @@ -136,7 +136,7 @@ extern s16 gReflectY; extern Matrix D_display_80161418[]; // static, here for reordering extern Vec3f D_display_80161518[]; // static, here for reordering extern Vec3f D_display_80161548[]; // static, here for reordering -extern Vec3f D_display_80161578[]; +extern Vec3f gLockOnTargetViewPos[]; extern f32 D_display_801615A8[]; extern f32 D_display_801615B8[]; diff --git a/linker_scripts/us/symbol_addrs.txt b/linker_scripts/us/symbol_addrs.txt index 2f4d01f7..36afc6f2 100644 --- a/linker_scripts/us/symbol_addrs.txt +++ b/linker_scripts/us/symbol_addrs.txt @@ -59,10 +59,10 @@ D_800C90F0 = 0x800C90F0; D_800C45E0 = 0x800C45E0; D_edisplay_801615D0 = 0x801615D0;//size:0xC -D_edisplay_801615E0 = 0x801615E0;//size:0xC +sViewPos = 0x801615E0;//size:0xC gTeamEventActorIndex = 0x800CFF80;//size:0x10 -D_display_80161578 = 0x80161578;//size:0x30 +gLockOnTargetViewPos = 0x80161578;//size:0x30 D_display_800CA23C = 0x800CA23C;//size:0x18 D_display_800CA26C = 0x800CA26C;//size:0x20 D_800CA260 = 0x800CA260;//size:0xC diff --git a/linker_scripts/us/symbol_addrs_engine.txt b/linker_scripts/us/symbol_addrs_engine.txt index c60e1d9f..b2c1b0e9 100644 --- a/linker_scripts/us/symbol_addrs_engine.txt +++ b/linker_scripts/us/symbol_addrs_engine.txt @@ -165,18 +165,18 @@ gDefaultSave = 0x800D4D10; gSaveFile = 0x80178870; //size:0x200 // fox_edisplay -func_edisplay_800596C0 = 0x800596C0; -func_edisplay_800597C0 = 0x800597C0; +Object_ApplyWaterDistortion = 0x800596C0; +Object_SetCullDirection = 0x800597C0; Graphics_SetScaleMtx = 0x8005980C; Sprite168_Draw = 0x80059850; -func_edisplay_800598DC = 0x800598DC; +Object_dummy_800598DC = 0x800598DC; Actor201_Draw = 0x800598E8; -func_edisplay_800599A4 = 0x800599A4; +Actor202_PostLimbDraw = 0x800599A4; Actor202_Draw = 0x80059A24; -Obj39_Draw = 0x80059AEC; -func_edisplay_80059B20 = 0x80059B20; +MeteoTunnel_Draw = 0x80059AEC; +Scenery_DrawTitaniaBones = 0x80059B20; func_edisplay_80059BB0 = 0x80059BB0; -Obj42_Draw = 0x80059BBC; +Scenery42_Draw = 0x80059BBC; Actor196_Draw = 0x80059BF0; func_edisplay_80059C28 = 0x80059C28; Sprite167_Draw = 0x80059C34; @@ -291,7 +291,7 @@ func_enmy_80063F4C = 0x80063F4C; func_enmy_80063F58 = 0x80063F58; func_enmy_80063F74 = 0x80063F74; Object_Init = 0x80063F90; -func_enmy_800652CC = 0x800652CC; +Scenery_UpdateTitaniaBones = 0x800652CC; func_enmy_80065380 = 0x80065380; func_enmy_8006546C = 0x8006546C; func_enmy_800654E4 = 0x800654E4; @@ -311,8 +311,8 @@ func_enmy_80066E80 = 0x80066E80; Sprite167_Update = 0x80066E8C; func_enmy_80066EA8 = 0x80066EA8; func_enmy_80066EE4 = 0x80066EE4; -func_enmy_80066EF0 = 0x80066EF0; -func_enmy_800671D0 = 0x800671D0; +Item_CheckBounds = 0x80066EF0; +Item_SpinPickup = 0x800671D0; func_enmy_80067348 = 0x80067348; func_enmy_800674B4 = 0x800674B4; ActorSupplies_Update = 0x8006753C; @@ -420,7 +420,7 @@ gHitCount = 0x80161A98; gSavedHitCount = 0x80161A9C; gLifeCount = 0x80161AA0; gLaserStrength = 0x80161AA8;//size:0x10 -D_ctx_80161AB8 = 0x80161AB8; +gCullObjects = 0x80161AB8; gScenery = 0x80161B00; //size:0x1900 gSprites = 0x80163400; //size:0xBE0 gActors = 0x80163FE0; //size:0xB130 @@ -492,15 +492,15 @@ gChargeTimers = 0x801779C8; gPlayerCamEye = 0x801779D8; gPlayerCamAt = 0x801779E8; gExpertMode = 0x801779F8; -D_Timer_80177A00 = 0x80177A00; +gUturnDownTimers = 0x80177A00; D_ctx_80177A10 = 0x80177A10;//size:0x28 -D_Timer_80177A38 = 0x80177A38; +gUturnBrakeTimers = 0x80177A38; D_ctx_80177A48 = 0x80177A48;//size:0x28 -D_Timer_80177A70 = 0x80177A70;//size:0x10 +gLoopDownTimers = 0x80177A70;//size:0x10 gCsFrameCount = 0x80177A80; -D_Timer_80177A88 = 0x80177A88;//size:0x10 +gLoopBoostTimers = 0x80177A88;//size:0x10 D_ctx_80177A98 = 0x80177A98; -D_ctx_80177AA0 = 0x80177AA0; +gMuzzleFlashScale = 0x80177AA0; D_ctx_80177AB0 = 0x80177AB0; gShieldAlpha = 0x80177AB8; gAqDrawMode = 0x80177AC8; @@ -518,7 +518,7 @@ gMissionPlanet = 0x80177B90; gMissionMedal = 0x80177BB0; gControllerRumbleTimers = 0x80177BD0; gPlanetPathStatus = 0x80177BD8; -D_ctx_80177C30 = 0x80177C30; +gPlayerScores = 0x80177C30; D_ctx_80177C50 = 0x80177C50; D_ctx_80177C58 = 0x80177C58; gOptionSoundMode = 0x80177C74; @@ -530,15 +530,15 @@ D_ctx_80177C9C = 0x80177C9C; gSavedObjectLoadIndex = 0x80177CA0; D_ctx_80177CA4 = 0x80177CA4; D_ctx_80177CAC = 0x80177CAC; -D_ctx_80177CB0 = 0x80177CB0; +gSavedPathProgress = 0x80177CB0; D_ctx_80177CB4 = 0x80177CB4; D_ctx_80177CBC = 0x80177CBC; D_ctx_80177CC4 = 0x80177CC4; -D_ctx_80177CC8 = 0x80177CC8; +gPathGroundScroll = 0x80177CC8; gStarWolfTeamAlive = 0x80177CD0; // size:0x18 -D_ctx_80177D08 = 0x80177D08; +gPathVelZ = 0x80177D08; gRightWingHealth = 0x80177D10; -D_ctx_80177D20 = 0x80177D20; +gPathProgress = 0x80177D20; gLeftWingHealth = 0x80177D28; gRadioPortraitScaleY = 0x80177D38; gRightWingFlashTimer = 0x80177D40; @@ -746,7 +746,7 @@ func_play_800B39E0 = 0x800B39E0; Player_UpdateShields = 0x800B40AC; func_play_800B415C = 0x800B415C; func_play_800B41E0 = 0x800B41E0; -func_play_800B41EC = 0x800B41EC; +Player_Down = 0x800B41EC; func_play_800B42B0 = 0x800B42B0; func_play_800B44C4 = 0x800B44C4; func_play_800B46F8 = 0x800B46F8; diff --git a/src/engine/fox_360.c b/src/engine/fox_360.c index 274f2345..cbace701 100644 --- a/src/engine/fox_360.c +++ b/src/engine/fox_360.c @@ -168,12 +168,12 @@ void AllRange_GreatFoxRepair(Player* player) { Vec3f sp60; gCsFrameCount++; - switch (player->unk_1D0) { + switch (player->csState) { case 0: - player->unk_1F4 = player->timer_498 = player->damage = player->unk_280 = player->boostMeter = + player->hitTimer = player->timer_498 = player->damage = player->barrelRollAlpha = player->boostMeter = player->boostCooldown = player->somersault = gCsFrameCount = 0; - player->unk_130 = player->camRoll = player->boostSpeed = player->unk_08C = player->unk_0D8.x = - player->unk_0D8.y = player->unk_0D8.z = player->unk_134 = player->unk_4D8 = 0.0f; + player->zRotBarrelRoll = player->camRoll = player->boostSpeed = player->camDist = player->knockback.x = + player->knockback.y = player->knockback.z = player->damageShake = player->aerobaticPitch = 0.0f; gCsCamEyeX = 1673.0f; gCsCamEyeY = 337.0f; if (player->pos.z < 0.0f) { @@ -181,11 +181,11 @@ void AllRange_GreatFoxRepair(Player* player) { } else { gCsCamEyeZ = 480.0f; } - player->unk_0E8 = 0.0f; + player->rot.y = 0.0f; player->pos.x = 2100.0f; player->baseSpeed = 30.0f; - player->unk_0E4 = -8.0f; - player->unk_114 = 90.0f; + player->rot.x = -8.0f; + player->yRot_114 = 90.0f; gCsCamAtX = 2100.0f; player->pos.y = 450.0f; gCsCamAtY = 450.0f; @@ -193,7 +193,7 @@ void AllRange_GreatFoxRepair(Player* player) { gCsCamAtZ = 0.0f; D_ctx_80177A48[0] = 1.0f; player->wings.modelId = 1; - player->unk_1D0++; + player->csState++; break; case 1: if (gCsFrameCount >= 47) { @@ -202,7 +202,7 @@ void AllRange_GreatFoxRepair(Player* player) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; } if (gCsFrameCount >= 64) { - player->unk_1D0++; + player->csState++; player->baseSpeed = 0.0f; } break; @@ -212,7 +212,7 @@ void AllRange_GreatFoxRepair(Player* player) { player->pos.x = 400.0f; player->pos.y = -420.0f; player->pos.z = 0.0f; - player->unk_0EC = 0.0f; + player->rot.z = 0.0f; gCsCamEyeX = -683.0f; gCsCamEyeY = -346.0f; gCsCamEyeZ = 305.0f; @@ -225,7 +225,7 @@ void AllRange_GreatFoxRepair(Player* player) { gRightWingHealth[0] = gLeftWingHealth[0] = 60; } AUDIO_PLAY_SFX(0x4900200E, gDefaultSfxSource, 4); - player->unk_1D0++; + player->csState++; } break; case 3: @@ -233,9 +233,9 @@ void AllRange_GreatFoxRepair(Player* player) { gCsCamEyeZ -= 1.0f; if (gFillScreenAlpha == 0) { player->unk_190 = player->unk_194 = 5.0f; - player->unk_114 = 90.0f; + player->yRot_114 = 90.0f; player->baseSpeed = gArwingSpeed; - player->unk_1D0++; + player->csState++; AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); } @@ -243,7 +243,7 @@ void AllRange_GreatFoxRepair(Player* player) { case 4: gCsCamEyeZ -= 1.0f; gCsCamEyeX -= 1.0f; - player->unk_0E4 += 0.4f; + player->rot.x += 0.4f; if (gCsFrameCount >= 130) { player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->wings.modelId = 0; @@ -257,10 +257,10 @@ void AllRange_GreatFoxRepair(Player* player) { gCsCamAtX = player->pos.x; gCsCamAtY = player->pos.y; gCsCamAtZ = player->pos.z; - Math_SmoothStepToF(&player->unk_0EC, 0.0f, 0.1f, 2.0f, 0); - Math_SmoothStepToF(&player->unk_12C, 0.0f, 0.1f, 3.0f, 0); - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + player->unk_114 + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), MTXF_APPLY); + Math_SmoothStepToF(&player->rot.z, 0.0f, 0.1f, 2.0f, 0); + Math_SmoothStepToF(&player->zRotBank, 0.0f, 0.1f, 3.0f, 0); + Matrix_RotateY(gCalcMatrix, (player->rot.y + player->yRot_114 + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(player->rot.x * M_DTOR), MTXF_APPLY); sp6C.x = 0.0f; sp6C.y = 0.0f; sp6C.z = player->baseSpeed; @@ -271,8 +271,8 @@ void AllRange_GreatFoxRepair(Player* player) { player->pos.x += player->vel.x; player->pos.y += player->vel.y; player->pos.z += player->vel.z; - player->unk_138 = player->pos.z; - player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; + player->trueZpos = player->pos.z; + player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0); Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0); Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0); @@ -284,14 +284,14 @@ void AllRange_GreatFoxRepair(Player* player) { void AllRange_FortunaIntro(Player* player) { Vec3f sp24; - Math_Vec3fFromAngles(&sp24, 0.0f, player->unk_114 + 180.0f, 40.0f); + Math_Vec3fFromAngles(&sp24, 0.0f, player->yRot_114 + 180.0f, 40.0f); player->vel.x = sp24.x; player->vel.z = sp24.z; player->vel.y = sp24.y; player->pos.x += player->vel.x; player->pos.y += player->vel.y; player->pos.z += player->vel.z; - player->unk_138 = player->pos.z; + player->trueZpos = player->pos.z; player->cam.eye.x = -200.0f; player->cam.eye.y = 500.0f; player->cam.eye.z = 7000.0f; @@ -415,7 +415,7 @@ void ActorAllRange_SpawnTeam(void) { if (actor->aiType <= AI360_PEPPY) { AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); actor->info.hitbox = SEGMENTED_TO_VIRTUAL(gTeamHitbox); - actor->info.unk_1C = 0.0f; + actor->info.targetOffset = 0.0f; actor->info.bonus = 0; } else { AUDIO_PLAY_SFX(0x31000011, actor->sfxSource, 4); @@ -505,15 +505,15 @@ void func_360_8002F69C(Actor* this) { } gPlayer[0].cam.eye.y = 2500.0f; gPlayer[0].cam.eye.z = 5000.0f; - gPlayer[0].cam.at.x = gActors[4].obj.pos.x; - gPlayer[0].cam.at.y = gActors[4].obj.pos.y; - gPlayer[0].cam.at.z = gActors[4].obj.pos.z; + gPlayer[0].cam.at.x = gActors[AI360_WOLF].obj.pos.x; + gPlayer[0].cam.at.y = gActors[AI360_WOLF].obj.pos.y; + gPlayer[0].cam.at.z = gActors[AI360_WOLF].obj.pos.z; } if ((gAllRangeEventTimer > D_360_800C9B4C) && (gStarWolfMsgTimer == 0)) { gAllRangeFrameCount++; - for (i = 1, actor = &gActors[1]; i < 8; i++, actor++) { + for (i = AI360_FALCO, actor = &gActors[AI360_FALCO]; i <= AI360_ANDREW; i++, actor++) { if ((actor->obj.status == OBJ_ACTIVE) && (actor->state == STATE360_2) && (actor->health < 70) && - (actor->timer_0C6 != 0) && (actor->unk_0D4 == 1)) { + (actor->timer_0C6 != 0) && (actor->dmgSource == 1)) { if ((gActors[actor->aiIndex].state == STATE360_3) && (gActors[actor->aiIndex].aiType <= AI360_ANDREW)) { gActors[actor->aiIndex].iwork[2] = AI360_FOX; gActors[actor->aiIndex].state = STATE360_2; @@ -603,7 +603,7 @@ void func_360_8002FC00(Actor* this) { } if (gTeamShields[actor->aiIndex] > 0) { func_360_8002FB4C(&gActors[actor->aiIndex]); - if ((actor->iwork[5] != 0) && (actor->unk_0D4 == 1) && (gActors[actor->aiIndex].iwork[3] == 0)) { + if ((actor->iwork[5] != 0) && (actor->dmgSource == 1) && (gActors[actor->aiIndex].iwork[3] == 0)) { if (gTeamHelpActor == &gActors[actor->aiIndex]) { gTeamHelpActor = NULL; gTeamHelpTimer = 0; @@ -814,40 +814,40 @@ void ActorAllRange_ApplyDamage(Actor* this) { Vec3f sp48; Vec3f sp3C; - if (this->unk_0D0 != 0) { + if (this->dmgType != 0) { if (this->aiType == AI360_GREAT_FOX) { - this->unk_0D0 = 0; + this->dmgType = 0; } - if ((this->unk_0D0 >= 2) && (this->aiType >= AI360_WOLF) && (this->aiType < AI360_KATT)) { + if ((this->dmgType >= 2) && (this->aiType >= AI360_WOLF) && (this->aiType < AI360_KATT)) { this->damage = 10; this->timer_0C2 = 10; } if (((this->aiType <= AI360_PEPPY) || (this->aiType == AI360_BILL) || (this->aiType == AI360_KATT)) && - (this->unk_0D0 == 2)) { - this->unk_0D0 = 0; + (this->dmgType == 2)) { + this->dmgType = 0; } - if ((this->unk_0D0 == 2) && (this->fwork[22] > 0.0f)) { - this->unk_0D0 = 0; + if ((this->dmgType == 2) && (this->fwork[22] > 0.0f)) { + this->dmgType = 0; } if (this->fwork[23] > 1.0f) { - this->unk_0D0 = 0; + this->dmgType = 0; } - if (this->unk_0D0 != 0) { + if (this->dmgType != 0) { var_a1 = false; if ((this->unk_0B6 == 3) || ((gCurrentLevel == LEVEL_BOLSE) && (gBosses[1].obj.status != OBJ_FREE) && (this->aiType >= AI360_WOLF)) || ((gCurrentLevel == LEVEL_VENOM_2) && (this->aiType >= AI360_WOLF) && (this->aiType < AI360_10) && - (this->unk_0D0 == 2))) { + (this->dmgType == 2))) { this->damage = 0; var_a1 = true; if (gCurrentLevel == LEVEL_BOLSE) { - this->unk_0D4 = 0; + this->dmgSource = 0; } } if (this->aiType >= AI360_WOLF) { - if (((this->unk_0D0 != 3) || (this->aiType != AI360_WOLF)) && - ((this->aiType != AI360_MISSILE) || (this->unk_0D0 != 2))) { + if (!((this->dmgType == 3) && (this->aiType == AI360_WOLF)) && + !((this->aiType == AI360_MISSILE) && (this->dmgType == 2))) { this->health -= this->damage; } } else if ((this->aiType <= AI360_PEPPY) && (this->state != STATE360_6)) { @@ -861,7 +861,7 @@ void ActorAllRange_ApplyDamage(Actor* this) { this->health = 0; if (this->aiType == AI360_MISSILE) { SectorZ_80199900(this, 1); - if (this->unk_0D4 == 1) { + if (this->dmgSource == 1) { if (gActors[8].obj.status == OBJ_ACTIVE) { Radio_PlayMessage(gMsg_ID_16140, RCID_KATT); } @@ -869,7 +869,7 @@ void ActorAllRange_ApplyDamage(Actor* this) { gHitCount += 11; D_ctx_80177850 = 15; } else { - switch (this->unk_0D4) { + switch (this->dmgSource) { case 102: Radio_PlayMessage(gMsg_ID_16170, RCID_FALCO); break; @@ -919,13 +919,13 @@ void ActorAllRange_ApplyDamage(Actor* this) { this->timer_0BC = RAND_INT(50.0f); } } - if ((this->aiType >= AI360_WOLF) && (this->aiType < AI360_KATT)) { + if ((this->aiType >= AI360_WOLF) && (this->aiType <= AI360_ANDREW)) { this->timer_0BC = RAND_INT(40.0f) + 60.0f; } if (this->damage >= 20) { this->timer_0BC = 0; } - if ((gCurrentLevel == LEVEL_KATINA) && (this->unk_0B6 == 1) && (this->unk_0D4 == 1)) { + if ((gCurrentLevel == LEVEL_KATINA) && (this->unk_0B6 == 1) && (this->dmgSource == 1)) { if (gKaAllyKillCount < 2) { ActorAllRange_PlayMessage(gMsg_ID_18018, RCID_BILL); } @@ -968,7 +968,7 @@ void ActorAllRange_ApplyDamage(Actor* this) { if ((this->aiType >= AI360_WOLF) && (this->aiType <= AI360_ANDREW)) { sStarWolfKillTimer = 150; } - switch (this->unk_0D4) { + switch (this->dmgSource) { case 1: if (this->aiType >= AI360_10) { switch (this->iwork[2]) { @@ -987,10 +987,10 @@ void ActorAllRange_ApplyDamage(Actor* this) { case 102: case 103: case 104: - if ((this->aiType >= AI360_WOLF) && (this->aiType < AI360_KATT)) { + if ((this->aiType >= AI360_WOLF) && (this->aiType <= AI360_ANDREW)) { if ((gStarWolfTeamAlive[0] + gStarWolfTeamAlive[1] + gStarWolfTeamAlive[2] + gStarWolfTeamAlive[3]) == 0) { - switch (this->unk_0D4) { + switch (this->dmgSource) { case 102: Radio_PlayMessage(gMsg_ID_9438, RCID_FALCO); break; @@ -1002,10 +1002,10 @@ void ActorAllRange_ApplyDamage(Actor* this) { break; } } else { - gActors[this->unk_0D4 - 101].iwork[1] = 80; + gActors[this->dmgSource - 101].iwork[1] = 80; } } else { - gActors[this->unk_0D4 - 101].iwork[1] = 80; + gActors[this->dmgSource - 101].iwork[1] = 80; } break; } @@ -1054,7 +1054,7 @@ void ActorAllRange_ApplyDamage(Actor* this) { this->fwork[12] = sp3C.z; } if ((gRadioState == 0) && (gActors[0].obj.status == OBJ_ACTIVE)) { - if (this->unk_0D0 == 3) { + if (this->dmgType == 3) { switch (this->aiType) { case AI360_FALCO: ActorAllRange_PlayMessage(gMsg_ID_20210, RCID_FALCO); @@ -1069,11 +1069,11 @@ void ActorAllRange_ApplyDamage(Actor* this) { ActorAllRange_PlayMessage(gMsg_ID_20084, RCID_KATT); break; } - } else if (this->unk_0D4 < 105) { + } else if (this->dmgSource <= AI360_PEPPY + 101) { if (this->aiType >= AI360_WOLF) { - if (this->unk_0D4 == 1) { - if ((gCurrentLevel == LEVEL_KATINA) && (this->unk_0B6 == 1) && (gKaKilledAlly == 0)) { - gKaKilledAlly = 1; + if (this->dmgSource == 1) { + if ((gCurrentLevel == LEVEL_KATINA) && (this->unk_0B6 == 1) && !gKaKilledAlly) { + gKaKilledAlly = true; Radio_PlayMessage(gMsg_ID_18015, RCID_BILL); } else if (this->aiType == AI360_KATT) { ActorAllRange_PlayMessage(gMsg_ID_20084, RCID_KATT); @@ -1096,7 +1096,7 @@ void ActorAllRange_ApplyDamage(Actor* this) { } } } - } else if (this->unk_0D4 == 1) { + } else if (this->dmgSource == AI360_FOX + 1) { switch (this->aiType) { case AI360_FALCO: ActorAllRange_PlayMessage(gMsg_ID_20060, RCID_FALCO); @@ -1149,7 +1149,7 @@ void ActorAllRange_ApplyDamage(Actor* this) { } } } - this->unk_0D0 = 0; + this->dmgType = 0; } } } @@ -1158,7 +1158,7 @@ void ActorAllRange_CheckPlayerNearby(Actor* actor) { if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (actor->iwork[24] != 0) && (fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 1000.0f) && (fabsf(actor->obj.pos.y - gPlayer[0].pos.y) < 1000.0f) && - (fabsf(actor->obj.pos.z - gPlayer[0].unk_138) < 1000.0f)) { + (fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 1000.0f)) { actor->iwork[10]++; } else { actor->iwork[10] = 0; @@ -1215,7 +1215,7 @@ void ActorAllRange_Update(Actor* this) { if (this->aiType == AI360_EVENT_HANDLER) { this->timer_0C2 = 10; - this->info.unk_1C = 0.0f; + this->info.targetOffset = 0.0f; ActorAllRange_UpdateEvents(this); return; } @@ -1344,7 +1344,7 @@ void ActorAllRange_Update(Actor* this) { } sp104 = 0; this->iwork[5] = 0; - if ((this->aiType > AI360_FOX) && (this->aiType <= AI360_PEPPY) && (gTeamShields[this->aiType] <= 0) && + if ((this->aiType >= AI360_FALCO) && (this->aiType <= AI360_PEPPY) && (gTeamShields[this->aiType] <= 0) && (this->state != STATE360_6)) { this->state = STATE360_6; if (this->timer_0C2 < 100) { @@ -1489,7 +1489,7 @@ void ActorAllRange_Update(Actor* this) { 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; + this->fwork[6] = gPlayer[0].trueZpos + spC4; this->fwork[1] = gPlayer[0].baseSpeed + 10.0f; } if ((gActors[0].state == STATE360_6) && (this->aiType <= AI360_PEPPY)) { @@ -1546,7 +1546,8 @@ void ActorAllRange_Update(Actor* this) { } else { this->fwork[1] = gPlayer[0].baseSpeed - 5.0f; if ((gCurrentLevel == LEVEL_VENOM_2) && - (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN) && (gPlayer[0].unk_4D8 > 100.0f)) { + (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN) && + (gPlayer[0].aerobaticPitch > 100.0f)) { this->iwork[16] = STATE360_8; } } @@ -2051,7 +2052,7 @@ void ActorAllRange_Update(Actor* this) { radarMark->pos.x = this->obj.pos.x; radarMark->pos.y = this->obj.pos.y; radarMark->pos.z = this->obj.pos.z; - radarMark->unk_10 = this->unk_0F4.y + 180.0f; + radarMark->yRot = this->unk_0F4.y + 180.0f; if (this->iwork[1] != 0) { this->iwork[1]--; if ((this->iwork[1] == 0) && (gActors[0].state == STATE360_2) && (gRadioState == 0)) { @@ -2095,7 +2096,7 @@ void ActorAllRange_Update(Actor* this) { func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 5.0f, 15); func_effect_8007A6F0(&this->obj.pos, 0x2903A008); } else { - this->unk_0D0 = 1; + this->dmgType = 1; this->damage = 10; this->health = 0; ActorAllRange_ApplyDamage(this); @@ -2257,7 +2258,7 @@ void ActorAllRange_Draw(ActorAllRange* this) { case AI360_GREAT_FOX: Display_SetSecondLight(&this->obj.pos); this->unk_0B6 = 1; - Actor195_Draw(this); + ActorCutscene_Draw(this); break; case AI360_MISSILE: Animation_GetFrameData(&D_SZ_6006D64, 0, sp7C); diff --git a/src/engine/fox_beam.c b/src/engine/fox_beam.c index 3dcea5e9..0a2bd790 100644 --- a/src/engine/fox_beam.c +++ b/src/engine/fox_beam.c @@ -52,7 +52,7 @@ void func_beam_80035E78(PlayerShot* shot) { if (shot->unk_5C == 0) { shot->vel.x = shot->vel.y = shot->vel.z = shot->obj.rot.x = shot->obj.rot.y = shot->obj.rot.z = 0.0f; - shot->unk_44 = 1.0f; + shot->scale = 1.0f; shot->unk_5C = 1; shot->unk_64 = 30; shot->unk_58 = 150; @@ -137,7 +137,7 @@ void func_beam_80036318(PlayerShot* shot) { } func_beam_80035E78(shot); } else if (shot->obj.id == PLAYERSHOT_8) { - shot->unk_44 = 7.5f; + shot->scale = 7.5f; for (i = 0; i < ARRAY_COUNT(gActors); i++) { gActors[i].lockOnTimers[shot->playerNum] = 0; } @@ -367,7 +367,7 @@ s32 func_beam_80036F88(PlayerShot* shot, Actor* actor) { if (count != 0) { xySizeMod = 0.0f; if (actor->info.unk_16 == 1) { - xySizeMod = fabsf((actor->obj.pos.z + D_ctx_80177D20) / 50.0f) + 10.0f; + xySizeMod = fabsf((actor->obj.pos.z + gPathProgress) / 50.0f) + 10.0f; if ((shot->playerNum < 4) && ((gLaserStrength[shot->playerNum] != LASERS_SINGLE) || (shot->obj.id == PLAYERSHOT_8))) { xySizeMod += 30.0f; @@ -429,7 +429,7 @@ bool func_beam_80037438(PlayerShot* shot, Actor* actor) { if (((s32) hitboxData[0] != 0) && (sqrtf(SQ(temp_fv1) + SQ(temp_fa0)) <= 500.0f)) { if (shot->playerNum < 4) { temp_fv1 = actor->obj.pos.x - gPlayer[0].cam.eye.x; - temp_fa0 = actor->obj.pos.z + D_ctx_80177D20 - gPlayer[0].cam.eye.z; + temp_fa0 = actor->obj.pos.z + gPathProgress - gPlayer[0].cam.eye.z; var_fa1 = (sqrtf(SQ(temp_fv1) + SQ(temp_fa0)) / 50.0f) + 20.0f + 10.0f; if (var_fa1 > 200.0f) { var_fa1 = 200.0f; @@ -486,7 +486,7 @@ bool func_beam_8003774C(PlayerShot* shot, ObjectId objId, Object* obj) { sp7C.z = obj->pos.z - shot->obj.pos.z; // undefined behavior: if this check fails, the function returns no value if (((fabsf(sp7C.x) < 1100.0f) && (fabsf(sp7C.z) < 1100.0f) && (shot->obj.pos.y < 900.0f)) || - (objId == OBJ_BOSS_313) || (objId == ACTOR_EVENT_ID) || (objId == OBJ_SCENERY_39)) { + (objId == OBJ_BOSS_313) || (objId == ACTOR_EVENT_ID) || (objId == OBJ_SCENERY_ME_TUNNEL)) { Matrix_RotateY(gCalcMatrix, -obj->rot.y * M_DTOR, MTXF_NEW); sp7C.x = shot->obj.pos.x - obj->pos.x; sp7C.y = shot->obj.pos.y - obj->pos.y; @@ -533,7 +533,7 @@ bool func_beam_8003774C(PlayerShot* shot, ObjectId objId, Object* obj) { case OBJ_BOSS_313: objId = COL1_8; break; - case OBJ_SCENERY_39: + case OBJ_SCENERY_ME_TUNNEL: objId = COL1_1; break; case OBJ_SCENERY_120: @@ -652,8 +652,8 @@ void func_beam_80037CF4(PlayerShot* shot, Actor* actor, s32 hitIndex) { Vec3f sp44 = { 0.0f, 0.0f, -100.0f }; Vec3f sp38; - actor->unk_0D0 = 1; - actor->unk_0D2 = hitIndex - 1; + actor->dmgType = 1; + actor->dmgPart = hitIndex - 1; actor->timer_0C2 = 2; actor->damage = 10; if ((shot->playerNum < 4) && (gPlayer[shot->playerNum].form != FORM_LANDMASTER)) { @@ -677,19 +677,19 @@ void func_beam_80037CF4(PlayerShot* shot, Actor* actor, s32 hitIndex) { if (gCurrentLevel == LEVEL_AQUAS) { actor->damage = 31; } else { - actor->unk_0D0 = 2; + actor->dmgType = 2; actor->damage = 30; actor->lockOnTimers[shot->playerNum] = 0; } } - actor->unk_0D4 = shot->playerNum + 1; + actor->dmgSource = shot->playerNum + 1; actor->hitPos.x = shot->obj.pos.x; actor->hitPos.y = shot->obj.pos.y; actor->hitPos.z = shot->obj.pos.z; - if (((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0D2 == 0) && + if (((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->dmgPart == 0) && ((actor->unk_0B4 == EINFO_48) || (actor->unk_0B4 == EINFO_49) || (actor->unk_0B4 == EINFO_50))) || ((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->fwork[23] > 1.0f)) || - ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0D2 == 0) && (actor->unk_0B4 == EINFO_67)) || + ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->dmgPart == 0) && (actor->unk_0B4 == EINFO_67)) || ((actor->obj.id == OBJ_ACTOR_261) && (shot->obj.id != PLAYERSHOT_8) && ((actor->state < 3) || (actor->state >= 5))) || ((actor->obj.id == OBJ_ACTOR_260) && (shot->obj.id != PLAYERSHOT_8) && (actor->timer_0BC != 0))) { @@ -760,16 +760,16 @@ void func_beam_80038140(PlayerShot* shot) { switch (actor->obj.id) { case OBJ_ACTOR_180: if (func_beam_8003774C(shot, actor->obj.id, &actor->obj)) { - actor->unk_0D0 = 1; - actor->unk_0D2 = shot->playerNum; + actor->dmgType = 1; + actor->dmgPart = shot->playerNum; return; } break; case OBJ_ACTOR_EVENT: if (actor->unk_0B4 == EINFO_42) { if (func_beam_8003774C(shot, ACTOR_EVENT_ID, &actor->obj)) { - actor->unk_0D0 = 1; - actor->unk_0D2 = shot->playerNum; + actor->dmgType = 1; + actor->dmgPart = shot->playerNum; return; } } else if (actor->unk_0B4 == EINFO_63) { @@ -827,7 +827,7 @@ void func_beam_80038140(PlayerShot* shot) { !((gLaserStrength[shot->playerNum] == LASERS_SINGLE) && (shot->obj.id != PLAYERSHOT_8))) { test.x = 100.0f; } - if (player->unk_280 >= 100) { + if (player->barrelRollAlpha >= 100) { test.x = 150.0f; } if (player->form == FORM_LANDMASTER) { @@ -841,11 +841,11 @@ void func_beam_80038140(PlayerShot* shot) { test.z = test.x; if ((i != shot->playerNum) && ((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (player->state_1C8 == PLAYERSTATE_1C8_DOWN)) && - (fabsf(player->unk_138 - shot->obj.pos.z) < test.z) && + (fabsf(player->trueZpos - shot->obj.pos.z) < test.z) && (fabsf(player->pos.x - shot->obj.pos.x) < test.x) && (fabsf(player->pos.y - shot->obj.pos.y) < test.y)) { - if (player->unk_280 >= 100) { - shot->obj.rot.y = player->unk_0E8 + player->unk_114 + 180.0f + 90.0f; + if (player->barrelRollAlpha >= 100) { + shot->obj.rot.y = player->rot.y + player->yRot_114 + 180.0f + 90.0f; shot->obj.rot.x = RAND_FLOAT(360.0f); Matrix_RotateY(gCalcMatrix, shot->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, shot->obj.rot.x * M_DTOR, MTXF_APPLY); @@ -860,10 +860,10 @@ void func_beam_80038140(PlayerShot* shot) { shot->obj.pos.z += 2.0f * shot->vel.z; shot->unk_64 = 5; AUDIO_PLAY_SFX(0x09007011, player->sfxSource, 0); - func_effect_80078E50(player->pos.x, player->pos.y, player->unk_138, 8.0f); + func_effect_80078E50(player->pos.x, player->pos.y, player->trueZpos, 8.0f); } else { func_beam_80036318(shot); - if (player->unk_1F4 == 0) { + if (player->hitTimer == 0) { if (gPlayer[0].form == 3) { Player_ApplyDamage(player, 0, 60); } else { @@ -873,11 +873,11 @@ void func_beam_80038140(PlayerShot* shot) { if (gCamCount != 1) { player->unk_288 = shot->playerNum + 1; } - player->unk_0D8.x = shot->vel.x * 0.1f; - player->unk_0D8.y = shot->vel.y * 0.1f; - player->unk_0D8.z = shot->vel.z * 0.1f; + player->knockback.x = shot->vel.x * 0.1f; + player->knockback.y = shot->vel.y * 0.1f; + player->knockback.z = shot->vel.z * 0.1f; if (player->form != FORM_ON_FOOT) { - func_effect_8007D1E0(player->pos.x, player->pos.y, player->unk_138, 2.0f); + func_effect_8007D1E0(player->pos.x, player->pos.y, player->trueZpos, 2.0f); } } } @@ -885,7 +885,7 @@ void func_beam_80038140(PlayerShot* shot) { } } } - if ((gGroundType == 4) && Ground_801B6AEC(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + D_ctx_80177D20)) { + if ((gGroundType == 4) && Ground_801B6AEC(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + gPathProgress)) { func_beam_80036318(shot); if (shot->obj.id != PLAYERSHOT_4) { func_effect_8007A900(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 2.0f, 255, 15, 0); @@ -915,7 +915,7 @@ void func_beam_80038140(PlayerShot* shot) { } else { for (i = 0, scenery = gScenery; i < 50; i++, scenery++) { if (scenery->obj.status == OBJ_ACTIVE) { - if ((scenery->obj.id == OBJ_SCENERY_1) || (scenery->obj.id == OBJ_SCENERY_39) || + if ((scenery->obj.id == OBJ_SCENERY_1) || (scenery->obj.id == OBJ_SCENERY_ME_TUNNEL) || (scenery->obj.id == OBJ_SCENERY_4) || (scenery->obj.id == OBJ_SCENERY_5) || (scenery->obj.id == OBJ_SCENERY_120) || (scenery->obj.id == OBJ_SCENERY_124) || (scenery->obj.id == OBJ_SCENERY_126) || (scenery->obj.id == OBJ_SCENERY_47) || @@ -1035,7 +1035,7 @@ void func_beam_80038F34(PlayerShot* shot) { Vec3f sp4C = { 0.0f, 0.0f, 0.0f }; s32 sp48 = 0; - Matrix_Translate(gGfxMatrix, shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + D_ctx_80177D20, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + gPathProgress, MTXF_APPLY); Matrix_MultVec3f(gGfxMatrix, &sp4C, &D_beam_8015F950); if ((D_beam_8015F950.z < 0.0f) && (D_beam_8015F950.z > -10000.0f)) { if (fabsf(D_beam_8015F950.x) < (fabsf(D_beam_8015F950.z * 0.5f) + 500.0f)) { @@ -1217,7 +1217,7 @@ void func_beam_80039A50(PlayerShot* shot) { f32 var_fv1; s32 sp104 = 0; - Matrix_Translate(gGfxMatrix, shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + D_ctx_80177D20, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + gPathProgress, MTXF_APPLY); Matrix_MultVec3f(gGfxMatrix, &sp11C, &D_beam_8015F950); if ((D_beam_8015F950.z < 0.0f) && (D_beam_8015F950.z > -10000.0f)) { var_fv1 = fabsf(D_beam_8015F950.x); // probably fake. The use of temps was likely different @@ -1241,9 +1241,9 @@ void func_beam_80039A50(PlayerShot* shot) { Matrix_RotateX(gGfxMatrix, shot->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, shot->obj.rot.z * M_DTOR, MTXF_APPLY); if ((shot->obj.id == PLAYERSHOT_BOMB) && (shot->unk_5C == 0)) { - Matrix_RotateZ(gGfxMatrix, shot->unk_34 * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, shot->unk_30 * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, shot->unk_2C * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, shot->vec_2C.z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, shot->vec_2C.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, shot->vec_2C.x * M_DTOR, MTXF_APPLY); } } Matrix_Translate(gGfxMatrix, 0.f, 0.f, D_800C9BD8[shot->obj.id], MTXF_APPLY); @@ -1259,7 +1259,7 @@ void func_beam_80039A50(PlayerShot* shot) { gSPDisplayList(gMasterDisp++, D_10231A0); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + D_ctx_80177D20, + Matrix_Translate(gGfxMatrix, shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + gPathProgress, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].camPitch, MTXF_APPLY); @@ -1292,7 +1292,7 @@ void func_beam_80039A50(PlayerShot* shot) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); } else { - Matrix_Scale(gGfxMatrix, shot->unk_44, shot->unk_44, shot->unk_44, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, shot->scale, shot->scale, shot->scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if (gVersusMode) { RCP_SetupDL_49(); @@ -1371,7 +1371,7 @@ void func_beam_80039A50(PlayerShot* shot) { break; case PLAYERSHOT_6: case PLAYERSHOT_7: - Matrix_Scale(gGfxMatrix, shot->unk_44, shot->unk_44, shot->unk_44, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, shot->scale, shot->scale, shot->scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL(&gMasterDisp, 0x31); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); @@ -1399,19 +1399,19 @@ void func_beam_80039A50(PlayerShot* shot) { gSPDisplayList(gMasterDisp++, D_AQ_600DB80); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, shot->obj.pos.x, gGroundHeight, shot->obj.pos.z + D_ctx_80177D20, + Matrix_Translate(gGfxMatrix, shot->obj.pos.x, gGroundHeight, shot->obj.pos.z + gPathProgress, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, shot->unk_2C, shot->unk_30, shot->unk_34, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, shot->vec_2C.x, shot->vec_2C.y, shot->vec_2C.z, MTXF_APPLY); RCP_SetupDL(&gMasterDisp, 0x31); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 32, 32, 0, shot->unk_58); gDPSetEnvColor(gMasterDisp++, 32, 16, 16, shot->unk_58); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); } else if (shot->unk_5C == 0) { - if (!(shot->unk_44 > 1.5f)) { + if (!(shot->scale > 1.5f)) { Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + D_ctx_80177D20, + Matrix_Translate(gGfxMatrix, shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + gPathProgress, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].camPitch, MTXF_APPLY); @@ -1457,7 +1457,7 @@ void func_beam_80039A50(PlayerShot* shot) { gSPDisplayList(gMasterDisp++, D_10231A0); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + D_ctx_80177D20, + Matrix_Translate(gGfxMatrix, shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + gPathProgress, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].camPitch, MTXF_APPLY); @@ -1509,10 +1509,10 @@ void func_beam_8003B00C(PlayerShot* shot, Player* player) { Vec3f sp38; switch (shot->unk_5C) { case 0: - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, -((player->unk_0F8 + player->unk_0F0) * M_DTOR), MTXF_APPLY); - Matrix_Translate(gCalcMatrix, player->unk_084, player->unk_080, 0.0f, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(player->rot.x * M_DTOR), MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -((player->bankAngle + player->rockAngle) * M_DTOR), MTXF_APPLY); + Matrix_Translate(gCalcMatrix, player->xShake, player->yBob, 0.0f, MTXF_APPLY); sp5C.x = 0.0f; sp5C.y = 0.0f; sp5C.z = player->baseSpeed + 200.0f; @@ -1526,19 +1526,19 @@ void func_beam_8003B00C(PlayerShot* shot, Player* player) { Matrix_MultVec3f(gCalcMatrix, &sp5C, &sp44); shot->unk_48 = player->pos.x + sp44.x; shot->unk_4C = player->pos.y + sp44.y; - shot->unk_50 = player->unk_138 + sp44.z; - shot->unk_44 += 200.0f; - if (shot->unk_44 > 5000.0f) { - shot->unk_44 = 5000.0f; + shot->unk_50 = player->trueZpos + sp44.z; + shot->scale += 200.0f; + if (shot->scale > 5000.0f) { + shot->scale = 5000.0f; } - for (sp5C.z = 0.0f; sp5C.z <= shot->unk_44; sp5C.z += 200.0f) { + for (sp5C.z = 0.0f; sp5C.z <= shot->scale; sp5C.z += 200.0f) { Matrix_MultVec3f(gCalcMatrix, &sp5C, &sp38); D_ctx_80178498 = shot->obj.pos.z; D_ctx_801784A0 = shot->obj.pos.y; D_ctx_8017849C = shot->obj.pos.x; shot->obj.pos.x = player->pos.x + sp38.x; shot->obj.pos.y = player->pos.y + sp38.y; - shot->obj.pos.z = player->unk_138 + sp38.z; + shot->obj.pos.z = player->trueZpos + sp38.z; Matrix_Push(&gCalcMatrix); func_beam_80038140(shot); Matrix_Pop(&gCalcMatrix); @@ -1552,7 +1552,7 @@ void func_beam_8003B00C(PlayerShot* shot, Player* player) { } } shot->unk_64 = 30; - shot->obj.rot.y = player->unk_0E8 + player->unk_114; + shot->obj.rot.y = player->rot.y + player->yRot_114; if (!(gControllerHold->button & U_CBUTTONS) && !(gControllerHold->button & A_BUTTON)) { shot->unk_5C = 1; } @@ -1698,9 +1698,9 @@ bool func_beam_8003BB4C(PlayerShot* shot) { var_fa0 = 200.0f; } for (i = 0, actor = gActors; i < 60; i++, actor++) { - if ((actor->obj.status == OBJ_ACTIVE) && (actor->info.unk_1C != 0.0f) && + if ((actor->obj.status == OBJ_ACTIVE) && (actor->info.targetOffset != 0.0f) && ((actor->lockOnTimers[shot->playerNum] == 0) && (fabsf(shot->obj.pos.x - actor->obj.pos.x) <= var_fa0) && - (fabsf(shot->obj.pos.y - (actor->obj.pos.y + actor->info.unk_1C)) <= var_fa0) && + (fabsf(shot->obj.pos.y - (actor->obj.pos.y + actor->info.targetOffset)) <= var_fa0) && (fabsf(shot->obj.pos.z - actor->obj.pos.z) <= var_fa0))) { actor->lockOnTimers[shot->playerNum] = 20; func_enmy_80060F30(gPlayer[shot->playerNum].sfxSource, 0x49008027, shot->playerNum); @@ -1720,7 +1720,7 @@ bool func_beam_8003BB4C(PlayerShot* shot) { (player->form != FORM_ON_FOOT) && (i != shot->playerNum) && (gVsLockOnTimers[i][shot->playerNum] == 0) && (fabsf(shot->obj.pos.x - player->pos.x) <= var_fa0) && (fabsf(shot->obj.pos.y - player->pos.y) <= var_fa0) && - (fabsf(shot->obj.pos.z - player->unk_138) <= var_fa0)) { + (fabsf(shot->obj.pos.z - player->trueZpos) <= var_fa0)) { gVsLockOnTimers[0][shot->playerNum] = gVsLockOnTimers[1][shot->playerNum] = gVsLockOnTimers[2][shot->playerNum] = gVsLockOnTimers[3][shot->playerNum] = 0; gVsLockOnTimers[i][shot->playerNum] = 20; @@ -1771,10 +1771,10 @@ void func_beam_8003C008(PlayerShot* shot) { if ((boss->obj.status == OBJ_ACTIVE) && (boss->timer_05A == 0)) { if (boss->obj.id == OBJ_BOSS_316) { var_s6 = gGameFrameCount % 8U; - var_fs2 = shot->unk_44 * 40.0f; + var_fs2 = shot->scale * 40.0f; } else { var_s6 = gGameFrameCount % 16U; - var_fs2 = shot->unk_44 * 30.0f; + var_fs2 = shot->scale * 30.0f; } hitboxData = boss->info.hitbox; count = *hitboxData++; @@ -1852,7 +1852,7 @@ void func_beam_8003C4D0(PlayerShot* shot, s32 damage) { Scenery* scenery; Effect* effect; Player* player; - f32 temp_fs2 = shot->unk_44 * 60.0f; + f32 temp_fs2 = shot->scale * 60.0f; for (i = 0, scenery = gScenery; i < 50; i++, scenery++) { if ((scenery->obj.status == OBJ_ACTIVE) && (scenery->obj.id == OBJ_SCENERY_56)) { @@ -1900,16 +1900,16 @@ void func_beam_8003C4D0(PlayerShot* shot, s32 damage) { ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0B4 == EINFO_78)) || ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0B4 == EINFO_38)) || (actor->obj.id == OBJ_ACTOR_196)) { - actor->unk_0D0 = 2; - actor->unk_0D2 = 0; - actor->unk_0D4 = shot->playerNum + 1; + actor->dmgType = 2; + actor->dmgPart = 0; + actor->dmgSource = shot->playerNum + 1; actor->damage = damage; if (actor->info.bonus != 0) { shot->bonus++; } } else if ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->scale >= 0.5f) && (damage > 30)) { - actor->unk_0D4 = shot->playerNum + 1; + actor->dmgSource = shot->playerNum + 1; actor->vel.x = sp68 * 0.03f; actor->vel.y = sp64 * 0.03f; actor->vel.z = sp60 * 0.03f; @@ -1922,9 +1922,9 @@ void func_beam_8003C4D0(PlayerShot* shot, s32 damage) { shot->bonus++; } } else { - actor->unk_0D0 = 2; - actor->unk_0D2 = 0; - actor->unk_0D4 = shot->playerNum + 1; + actor->dmgType = 2; + actor->dmgPart = 0; + actor->dmgSource = shot->playerNum + 1; actor->damage = damage; if (actor->info.bonus != 0) { shot->bonus++; @@ -1969,10 +1969,10 @@ void func_beam_8003C4D0(PlayerShot* shot, s32 damage) { } if (gVersusMode) { for (i = 0, player = gPlayer; i < gCamCount; i++, player++) { - if ((i != shot->playerNum) && (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (player->unk_1F4 == 0)) { + if ((i != shot->playerNum) && (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (player->hitTimer == 0)) { sp68 = player->pos.x - shot->obj.pos.x; sp64 = player->pos.y - shot->obj.pos.y; - sp60 = player->unk_138 - shot->obj.pos.z; + sp60 = player->trueZpos - shot->obj.pos.z; if (sqrtf(SQ(sp68) + SQ(sp64) + SQ(sp60)) < temp_fs2) { player->unk_288 = shot->playerNum + 1; switch (player->form) { @@ -2032,13 +2032,13 @@ void func_beam_8003CC08(PlayerShot* shot) { case 1: D_ctx_8017812C = 2; shot->obj.rot.y += 1.0f; - Math_SmoothStepToF(&shot->unk_44, shot->unk_48, 0.05f, 1.5f, 0.001f); + Math_SmoothStepToF(&shot->scale, shot->unk_48, 0.05f, 1.5f, 0.001f); if ((shot->unk_64 > 0) && (shot->unk_64 < 30)) { if (!gVersusMode && ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN))) { test.x = gPlayer[0].pos.x - shot->obj.pos.x; test.y = gPlayer[0].pos.y - shot->obj.pos.y; - test.z = gPlayer[0].unk_138 - shot->obj.pos.z; + test.z = gPlayer[0].trueZpos - shot->obj.pos.z; var_ft5 = VEC3F_MAG(&test) * 0.01f; if (var_ft5 > 60.0f) { var_ft5 = 60.0f; @@ -2090,12 +2090,12 @@ void func_beam_8003CF90(PlayerShot* shot) { var_a3 = 0; if (shot->unk_60 == 0) { for (i = 0, actor = gActors; i < 60; i++, actor++) { - if ((actor->obj.status == OBJ_ACTIVE) && (actor->info.unk_1C != 0.0f) && + if ((actor->obj.status == OBJ_ACTIVE) && (actor->info.targetOffset != 0.0f) && (actor->lockOnTimers[shot->playerNum] != 0)) { var_a3 = 1; actor->lockOnTimers[shot->playerNum] = 2; D_800C9C24 = actor->obj.pos; - D_800C9C24.y += actor->info.unk_1C; + D_800C9C24.y += actor->info.targetOffset; } } for (i = 0, player = gPlayer; i < gCamCount; i++, player++) { @@ -2109,7 +2109,7 @@ void func_beam_8003CF90(PlayerShot* shot) { } else { D_800C9C24.y = player->pos.y + 30.0f; } - D_800C9C24.z = player->unk_138; + D_800C9C24.z = player->trueZpos; } } if (var_a3 != 0) { @@ -2118,20 +2118,20 @@ void func_beam_8003CF90(PlayerShot* shot) { sp64 = shot->obj.pos.z - D_800C9C24.z; sp58 = Math_RadToDeg(Math_Atan2F(sp6C, sp64)); sp5C = Math_RadToDeg(-Math_Atan2F(sp68, sqrtf(SQ(sp6C) + SQ(sp64)))); - if (shot->unk_30 >= 360.0f) { - shot->unk_30 -= 360.0f; + if (shot->vec_2C.y >= 360.0f) { + shot->vec_2C.y -= 360.0f; } - if (shot->unk_30 < 0.0f) { - shot->unk_30 += 360.0f; + if (shot->vec_2C.y < 0.0f) { + shot->vec_2C.y += 360.0f; } - if (shot->unk_2C >= 360.0f) { - shot->unk_2C -= 360.0f; + if (shot->vec_2C.x >= 360.0f) { + shot->vec_2C.x -= 360.0f; } - if (shot->unk_2C < 0.0f) { - shot->unk_2C += 360.0f; + if (shot->vec_2C.x < 0.0f) { + shot->vec_2C.x += 360.0f; } - Math_SmoothStepToAngle(&shot->unk_30, sp58, 1.0f, shot->unk_50, 0.0f); - Math_SmoothStepToAngle(&shot->unk_2C, sp5C, 1.0f, shot->unk_50, 0.0f); + Math_SmoothStepToAngle(&shot->vec_2C.y, sp58, 1.0f, shot->unk_50, 0.0f); + Math_SmoothStepToAngle(&shot->vec_2C.x, sp5C, 1.0f, shot->unk_50, 0.0f); shot->unk_64 = 30; } else { shot->unk_60 = 1; @@ -2147,8 +2147,8 @@ void func_beam_8003CF90(PlayerShot* shot) { Vec3f sp44; Vec3f sp38; - shot->obj.rot.y = shot->unk_30; - shot->obj.rot.x = shot->unk_2C; + shot->obj.rot.y = shot->vec_2C.y; + shot->obj.rot.x = shot->vec_2C.x; Matrix_RotateY(gCalcMatrix, shot->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, shot->obj.rot.x * M_DTOR, MTXF_APPLY); sp44.x = sp44.y = 0.0f; @@ -2203,11 +2203,11 @@ void func_beam_8003D54C(PlayerShot* shot, s32 index) { func_beam_8003BACC(shot); break; case PLAYERSHOT_8: - if (shot->unk_44 > 1.5f) { + if (shot->scale > 1.5f) { func_beam_8003C4D0(shot, 30); if (shot->bonus != 0) { if (gVersusMode) { - D_ctx_80177C30[shot->playerNum] += shot->bonus; + gPlayerScores[shot->playerNum] += shot->bonus; } else { bonus = shot->bonus; if (shot->bonus > 10) { diff --git a/src/engine/fox_bg.c b/src/engine/fox_bg.c index 42ad1a40..9f8e5119 100644 --- a/src/engine/fox_bg.c +++ b/src/engine/fox_bg.c @@ -414,7 +414,7 @@ void Background_DrawBackdrop(void) { break; case LEVEL_AQUAS: if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) { - sp13C = ((Math_RadToDeg(gPlayer[gPlayerNum].camYaw) - gPlayer[gPlayerNum].unk_114)); + sp13C = Math_RadToDeg(gPlayer[gPlayerNum].camYaw) - gPlayer[gPlayerNum].yRot_114; sp134 = (gPlayer[gPlayerNum].camPitch * -7000.0f) - (gPlayer[gPlayerNum].cam.eye.y * 0.6f); sp13C = Math_ModF(sp13C * -40.44444f * 2.0f, 7280.0f); // close to 7280.0f / 180.0f RCP_SetupDL_17(); @@ -449,16 +449,16 @@ void Background_DrawBackdrop(void) { case LEVEL_ZONESS: case LEVEL_MACBETH: case LEVEL_TITANIA: - sp12C = Math_RadToDeg(gPlayer[gPlayerNum].camYaw) - gPlayer[gPlayerNum].unk_114; + sp12C = Math_RadToDeg(gPlayer[gPlayerNum].camYaw) - gPlayer[gPlayerNum].yRot_114; sp134 = (gPlayer[gPlayerNum].camPitch * -7000.0f) - (gPlayer[gPlayerNum].cam.eye.y * 0.6f); sp13C = sp12C * -40.44444f * 2.0f; // close to 7280.0f / 180.0f if ((gCurrentLevel == LEVEL_TITANIA) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && - (gPlayer[0].unk_1D0 < 3)) { + (gPlayer[0].csState < 3)) { D_bg_8015F968 += __sinf(gPlayer[0].camYaw) * 20.0f; sp13C += D_bg_8015F968; } if ((gCurrentLevel == LEVEL_SOLAR) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && - (gPlayer[0].unk_1D0 >= 2) && (gPlayer[0].cam.eye.z <= -1900.0f)) { + (gPlayer[0].csState >= 2) && (gPlayer[0].cam.eye.z <= -1900.0f)) { D_bg_8015F968 = __sinf(gPlayer[0].camPitch) * 7000.0f; sp134 -= fabsf(D_bg_8015F968); } @@ -527,7 +527,7 @@ void Background_DrawBackdrop(void) { sp138 = Math_ModF(sp138 - 34.5f, 480.0f); sp134 = Math_ModF(sp134 + 19.0f, 360.0f); } else if (levelId == LEVEL_BOLSE) { - if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) || (gPlayer[0].unk_1D0 < 10)) { + if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) || (gPlayer[0].csState < 10)) { sp134 = Math_ModF(sp134 + 360.0f - 100.0f, 360.0f); } } else { @@ -565,7 +565,7 @@ void Background_DrawBackdrop(void) { Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ME_600DDF0); - } else if (D_ctx_80177D20 > 185668.0f) { + } else if (gPathProgress > 185668.0f) { Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f) - 130.0f, -290.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.4f, 0.4f, 1.0f, MTXF_APPLY); @@ -593,7 +593,7 @@ void Background_DrawBackdrop(void) { break; case LEVEL_AREA_6: case LEVEL_UNK_4: - sp128 = (D_ctx_80177D20 * 0.00004f) + 0.5f; + sp128 = (gPathProgress * 0.00004f) + 0.5f; if (sp128 > 3.5f) { sp128 = 3.5f; } @@ -712,7 +712,7 @@ void Background_DrawSun(void) { if (gCurrentLevel == LEVEL_KATINA) { gSunViewY -= 80.0f; } - if ((gCurrentLevel == LEVEL_ZONESS) && (gPlayer[0].unk_1D0 >= 2) && !gMissedZoSearchlight) { + if ((gCurrentLevel == LEVEL_ZONESS) && (gPlayer[0].csState >= 2) && !gMissedZoSearchlight) { gSunViewY -= 60.0f; gSunViewX -= 480.0f; } @@ -834,7 +834,7 @@ void Background_DrawGround(void) { } if (gGroundType == 7) { sp1D4 = 0.0f; - gPlayer[gPlayerNum].unk_0AC = 0.0f; + gPlayer[gPlayerNum].xPath = 0.0f; } if (gLevelMode == LEVELMODE_ALL_RANGE) { @@ -844,7 +844,7 @@ void Background_DrawGround(void) { f32 temp_fa0; sp1D4 = 0.0f; - gPlayer[gPlayerNum].unk_0AC = 0.0f; + gPlayer[gPlayerNum].xPath = 0.0f; sp1B4.x = 0; sp1B4.y = 0; @@ -854,16 +854,16 @@ void Background_DrawGround(void) { temp_fv1 = gPlayer[gPlayerNum].cam.eye.x + sp1A8.x; temp_fa0 = gPlayer[gPlayerNum].cam.eye.z + sp1A8.z; if (temp_fv1 > 6000.0f) { - gPlayer[gPlayerNum].unk_0AC = 12000.0f; + gPlayer[gPlayerNum].xPath = 12000.0f; } if (temp_fv1 > 18000.0f) { - gPlayer[gPlayerNum].unk_0AC = 24000.0f; + gPlayer[gPlayerNum].xPath = 24000.0f; } if (temp_fv1 < -6000.0f) { - gPlayer[gPlayerNum].unk_0AC = -12000.0f; + gPlayer[gPlayerNum].xPath = -12000.0f; } if (temp_fv1 < -18000.0f) { - gPlayer[gPlayerNum].unk_0AC = -24000.0f; + gPlayer[gPlayerNum].xPath = -24000.0f; } if (temp_fa0 > 6000.0f) { sp1D4 = 12000.0f; @@ -879,7 +879,7 @@ void Background_DrawGround(void) { } } Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, gPlayer[gPlayerNum].unk_0AC, -3.0f + gCameraShakeY, sp1D4, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, gPlayer[gPlayerNum].xPath, -3.0f + gCameraShakeY, sp1D4, MTXF_APPLY); if (D_ctx_80177C70 == 2) { Matrix_Scale(gGfxMatrix, 1.2f, 1.2f, 1.0f, MTXF_APPLY); } @@ -893,8 +893,8 @@ void Background_DrawGround(void) { } if (gLevelMode == LEVELMODE_ON_RAILS) { gDPSetTextureImage(gMasterDisp++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, SEGMENTED_TO_VIRTUAL(D_CO_601B6C0)); - temp_s0 = fabsf(Math_ModF(2.0f * (D_ctx_80177CE8 * 0.2133333f), 128.0f)); // 0.64f / 3.0f - temp_fv0 = Math_ModF((10000.0f - gPlayer[gPlayerNum].unk_0AC) * 0.32f, 128.0f); + temp_s0 = fabsf(Math_ModF(2.0f * (gPathTexScroll * 0.2133333f), 128.0f)); // 0.64f / 3.0f + temp_fv0 = Math_ModF((10000.0f - gPlayer[gPlayerNum].xPath) * 0.32f, 128.0f); gDPSetupTile(gMasterDisp++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32, temp_fv0, temp_s0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD); switch (gGroundSurface) { @@ -955,8 +955,8 @@ void Background_DrawGround(void) { break; } gDPSetTextureImage(gMasterDisp++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, sp1C4); - temp_s0 = fabsf(Math_ModF(2.0f * (D_ctx_80177CE8 * 0.2133333f), 128.0f)); - temp_fv0 = Math_ModF((10000.0f - gPlayer[gPlayerNum].unk_0AC) * 0.32f, 128.0f); + temp_s0 = fabsf(Math_ModF(2.0f * (gPathTexScroll * 0.2133333f), 128.0f)); + temp_fv0 = Math_ModF((10000.0f - gPlayer[gPlayerNum].xPath) * 0.32f, 128.0f); gDPSetupTile(gMasterDisp++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32, temp_fv0, temp_s0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD); Matrix_Push(&gGfxMatrix); @@ -975,18 +975,18 @@ void Background_DrawGround(void) { case LEVEL_TRAINING: RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); if (gLevelMode == LEVELMODE_ON_RAILS) { - if (D_ctx_80177CE8 > 290.0f) { - D_ctx_80177CE8 -= 290.0f; + if (gPathTexScroll > 290.0f) { + gPathTexScroll -= 290.0f; } Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -3000.0f + D_ctx_80177CE8, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -3000.0f + gPathTexScroll, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_TR_6005880); Matrix_Pop(&gGfxMatrix); if (1) {} Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 3000.0f + D_ctx_80177CE8, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 3000.0f + gPathTexScroll, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_TR_6005880); @@ -1011,8 +1011,8 @@ void Background_DrawGround(void) { gDPLoadTileTexture(gMasterDisp++, SEGMENTED_TO_VIRTUAL(D_AQ_600AB68), G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32); gDPSetTextureImage(gMasterDisp++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, SEGMENTED_TO_VIRTUAL(D_AQ_600AB68)); - temp_s0 = fabsf(Math_ModF(2.0f * (D_ctx_80177CE8 * 0.2133333f), 128.0f)); - temp_fv0 = Math_ModF((10000.0f - gPlayer[gPlayerNum].unk_0AC) * 0.32f, 128.0f); + temp_s0 = fabsf(Math_ModF(2.0f * (gPathTexScroll * 0.2133333f), 128.0f)); + temp_fv0 = Math_ModF((10000.0f - gPlayer[gPlayerNum].xPath) * 0.32f, 128.0f); gDPSetupTile(gMasterDisp++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32, temp_fv0, temp_s0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD); @@ -1033,8 +1033,8 @@ void Background_DrawGround(void) { gDPLoadTileTexture(gMasterDisp++, SEGMENTED_TO_VIRTUAL(D_AQ_602ACC0), G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32); gDPSetTextureImage(gMasterDisp++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, SEGMENTED_TO_VIRTUAL(D_AQ_602ACC0)); - temp_s0 = fabsf(Math_ModF(2.0f * (D_ctx_80177CE8 * 0.2133333f), 128.0f)); - temp_fv0 = Math_ModF((10000.0f - gPlayer[gPlayerNum].unk_0AC) * 0.32f, 128.0f); + temp_s0 = fabsf(Math_ModF(2.0f * (gPathTexScroll * 0.2133333f), 128.0f)); + temp_fv0 = Math_ModF((10000.0f - gPlayer[gPlayerNum].xPath) * 0.32f, 128.0f); gDPSetupTile(gMasterDisp++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32, temp_fv0, temp_s0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD); if (gAqDrawMode != 0) { @@ -1042,7 +1042,7 @@ void Background_DrawGround(void) { } else { RCP_SetupDL(&gMasterDisp, 0x25); } - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && (gPlayer[0].unk_1D0 < 2)) { + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && (gPlayer[0].csState < 2)) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); } else if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, D_bg_8015F974, D_bg_8015F978, D_bg_8015F97C, diff --git a/src/engine/fox_boss.c b/src/engine/fox_boss.c index 5b8e7a97..6dfc39c3 100644 --- a/src/engine/fox_boss.c +++ b/src/engine/fox_boss.c @@ -96,7 +96,7 @@ void Boss_SpawnActor189(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 ar } void func_boss_80043188(Boss* boss) { - boss->info.unk_10 = 30000.0f; + boss->info.cullDistance = 30000.0f; } void Boss_CompleteLevel(Player* player, f32 xPos, f32 yPos, f32 zPos) { @@ -104,17 +104,17 @@ void Boss_CompleteLevel(Player* player, f32 xPos, f32 yPos, f32 zPos) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 80); gCsFrameCount = 0; - D_ctx_80178448 = zPos + D_ctx_80177D20; + D_ctx_80178448 = zPos + gPathProgress; D_ctx_80178440 = xPos; D_ctx_80178444 = yPos; player->state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; - player->unk_1D0 = 10; - player->timer_1F8 = 50; - player->timer_1FC = 50; + player->csState = 10; + player->csTimer = 50; + player->csEventTimer = 50; player->unk_000 = 0.0f; player->unk_004 = 1.0f; - if (player->pos.x < player->unk_0AC) { + if (player->pos.x < player->xPath) { player->unk_004 = -1.0f; } gPlayer[0].vel.x = 0.0f; diff --git a/src/engine/fox_context.c b/src/engine/fox_context.c index 8a587074..d36ff39a 100644 --- a/src/engine/fox_context.c +++ b/src/engine/fox_context.c @@ -25,8 +25,8 @@ s32 gTeamDamage[6]; u8 gMissionStatus; // next planet path f32 gGroundHeight; f32 D_ctx_80177950; -f32 D_ctx_80177968; -f32 D_ctx_80177970; +f32 gPlayerTurnRate; +f32 gPlayerTurnStickMod; f32 gCsCamEyeX; f32 gCsCamEyeY; f32 gCsCamEyeZ; @@ -63,13 +63,13 @@ u16 gBgmSeqId; u8 gLevelType; s32 gSavedObjectLoadIndex; UNK_TYPE F_80177CA8; -f32 D_ctx_80177CB0; +f32 gSavedPathProgress; UNK_TYPE F_80177CB8; f32 gWaterLevel; -f32 D_ctx_80177CC8; -f32 D_ctx_80177CE8; -f32 D_ctx_80177D08; -f32 D_ctx_80177D20; +f32 gPathGroundScroll; +f32 gPathTexScroll; +f32 gPathVelZ; +f32 gPathProgress; f32 gRadioPortraitScaleY; f32 gRadioTextBoxScaleY; f32 gRadioMsgRadioId; @@ -252,7 +252,7 @@ s32 gHitCount; s32 gSavedHitCount; s16 gLifeCount[4]; LaserStrength gLaserStrength[4]; -s32 D_ctx_80161AB8; +s32 gCullObjects; UNK_TYPE F_80161AC0[4]; UNK_TYPE F_80161AD0[4]; UNK_TYPE F_80161AE0[4]; @@ -303,13 +303,13 @@ s32 D_ctx_80177990[4]; // these two are also rumble related f32 D_ctx_801779A8[4]; u8 gPauseEnabled; s32 gChargeTimers[4]; -f32 D_ctx_801779E4; -f32 D_ctx_801779F4; -s32 D_Timer_80177A00[4]; -s32 D_Timer_80177A38[4]; -s32 D_Timer_80177A70[4]; -s32 D_Timer_80177A88[4]; -f32 D_ctx_80177AA0[4]; +f32 gPathVelX; +f32 gPathVelY; +s32 gUturnDownTimers[4]; +s32 gUturnBrakeTimers[4]; +s32 gLoopDownTimers[4]; +s32 gLoopBoostTimers[4]; +f32 gMuzzleFlashScale[4]; f32 gShieldAlpha[4]; s32 gHasShield[4]; s32 gShieldTimer[4]; @@ -320,12 +320,12 @@ u8 gCoUturnCount; u8 gGreatFoxIntact; u8 gTiStartLandmaster; u16 gControllerRumbleTimers[4]; -u16 D_ctx_80177C30[4]; +u16 gPlayerScores[4]; s32 D_ctx_80177C50; -s32 D_ctx_80177C70; -s32 D_ctx_80177C78; -s32 D_ctx_80177C8C; -s32 D_ctx_80177C94; +s32 D_ctx_80177C70; // sets camera field of view Y. initialized to 0 and never changed +s32 gTraining360MsgTimer; +s32 gTraining360MsgIndex; +s32 D_ctx_80177C94; // these save player parameters across the Venom -> Andross transition s32 D_ctx_80177C9C; s32 D_ctx_80177CA4; s32 D_ctx_80177CAC; diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index 383a698e..21467000 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -165,10 +165,10 @@ void func_demo_80048AC0(TeamId teamId) { void func_demo_80048CC4(Actor* actor, s32 arg1) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = D_demo_800C9F60[arg1].x + gPlayer[0].pos.x; actor->obj.pos.y = D_demo_800C9F60[arg1].y + gPlayer[0].pos.y; - actor->obj.pos.z = D_demo_800C9F60[arg1].z + gPlayer[0].unk_138; + actor->obj.pos.z = D_demo_800C9F60[arg1].z + gPlayer[0].trueZpos; actor->unk_0F4.y = 0.0f; actor->unk_0F4.z = D_demo_800C9F90[arg1]; Object_SetInfo(&actor->info, actor->obj.id); @@ -192,21 +192,21 @@ void Cutscene_WarpZoneComplete(Player* player) { s32 temp_v1; gBosses[1].obj.status = OBJ_FREE; - Math_SmoothStepToF(&player->unk_130, 0.0f, 0.1f, 15.0f, 0.0f); - Math_SmoothStepToF(&player->unk_12C, 0.0f, 0.1f, 15.0f, 0.0f); - Math_SmoothStepToF(&player->unk_0E4, 0.0f, 0.1f, 3.0f, 0.0f); - Math_SmoothStepToF(&player->unk_0E8, 0.0f, 0.1f, 3.0f, 0.0f); - Math_SmoothStepToF(&player->unk_0EC, 0.0f, 0.1f, 3.0f, 0.0f); - Math_SmoothStepToF(&player->unk_08C, 0.0f, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToF(&player->zRotBarrelRoll, 0.0f, 0.1f, 15.0f, 0.0f); + Math_SmoothStepToF(&player->zRotBank, 0.0f, 0.1f, 15.0f, 0.0f); + Math_SmoothStepToF(&player->rot.x, 0.0f, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToF(&player->rot.y, 0.0f, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToF(&player->rot.z, 0.0f, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToF(&player->camDist, 0.0f, 0.1f, 3.0f, 0.0f); Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f); - Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 20.0f, 0.0f); + Math_SmoothStepToAngle(&player->aerobaticPitch, 0.0f, 0.1f, 20.0f, 0.0f); Math_SmoothStepToF(&player->boostSpeed, 0.0f, 0.1f, 3.0f, 0.0f); - switch (player->unk_1D0) { + switch (player->csState) { case 0: player->somersault = false; Audio_StopSfxByBankAndSource(1, player->sfxSource); - player->unk_1D0++; + player->csState++; D_ctx_80177A48[0] = 0.0f; D_ctx_80177A48[1] = 0.0f; D_ctx_80177A48[2] = 0.0f; @@ -226,7 +226,7 @@ void Cutscene_WarpZoneComplete(Player* player) { Matrix_MultVec3f(gCalcMatrix, &sp5C, &sp50); gCsCamAtX = player->pos.x; gCsCamAtY = player->pos.y; - gCsCamAtZ = player->unk_138 + D_ctx_80177D20; + gCsCamAtZ = player->trueZpos + gPathProgress; switch (gCsFrameCount) { case 101: @@ -276,7 +276,7 @@ void Cutscene_WarpZoneComplete(Player* player) { if (gCsFrameCount > 450) { Math_SmoothStepToF(&D_ctx_80177A48[0], 1.0f, 0.1f, 0.004f, 0.0f); player->baseSpeed += 2.0f; - player->unk_0E4 += 0.1f; + player->rot.x += 0.1f; player->unk_190 = 2.0f; if (gCsFrameCount == 530) { @@ -289,7 +289,7 @@ void Cutscene_WarpZoneComplete(Player* player) { gFillScreenAlphaStep = 8; if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; - player->timer_1F8 = 0; + player->csTimer = 0; gFadeoutType = 4; if (gCurrentLevel == LEVEL_METEO) { gLeveLClearStatus[LEVEL_METEO] = Play_CheckMedalStatus(200) + 1; @@ -302,7 +302,7 @@ void Cutscene_WarpZoneComplete(Player* player) { } else { gCsCamEyeX = player->pos.x + sp50.x; gCsCamEyeY = player->pos.y + sp50.y; - gCsCamEyeZ = player->unk_138 + D_ctx_80177D20 + sp50.z; + gCsCamEyeZ = player->trueZpos + gPathProgress + sp50.z; } break; @@ -314,8 +314,8 @@ void Cutscene_WarpZoneComplete(Player* player) { Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0); Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0); Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0); - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -((player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->rot.x + player->aerobaticPitch) * M_DTOR), MTXF_APPLY); sp5C.x = 0.0f; sp5C.y = 0.0f; @@ -330,78 +330,78 @@ void Cutscene_WarpZoneComplete(Player* player) { player->pos.y += player->vel.y; player->pos.z += player->vel.z; - player->unk_138 = player->pos.z + player->unk_08C; - player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; - player->unk_088 += 10.0f; - player->unk_080 = (-SIN_DEG(player->unk_088)) * 0.3f; - player->unk_0F4 += 8.0f; - player->unk_0F0 = SIN_DEG(player->unk_0F4); + player->trueZpos = player->pos.z + player->camDist; + player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; + player->bobPhase += 10.0f; + player->yBob = (-SIN_DEG(player->bobPhase)) * 0.3f; + player->rockPhase += 8.0f; + player->rockAngle = SIN_DEG(player->rockPhase); } -void func_demo_80049630(Actor* actor) { +void func_demo_80049630(ActorCutscene* this) { Vec3f sp3C; Vec3f sp30; - switch (actor->state) { + switch (this->state) { case 0: - actor->vwork[0].x = gPlayer[0].pos.x + D_demo_800C9FA0[actor->index].x; - actor->vwork[0].y = gPlayer[0].pos.y + D_demo_800C9FA0[actor->index].y; - actor->vwork[0].z = gPlayer[0].pos.z + D_demo_800C9FA0[actor->index].z; - Math_SmoothStepToF(&actor->obj.pos.x, actor->vwork[0].x, 0.05f, 50.0f, 0.0001f); - Math_SmoothStepToF(&actor->obj.pos.y, actor->vwork[0].y, 0.05f, 50.0f, 0.0001f); - Math_SmoothStepToF(&actor->obj.pos.z, actor->vwork[0].z, 0.05f, 50.0f, 0.0001f); - Math_SmoothStepToF(&actor->unk_0F4.x, gPlayer[0].unk_0E4, 0.1f, 2.0f, 0.0001f); - Math_SmoothStepToF(&actor->unk_0F4.y, gPlayer[0].unk_0E8, 0.1f, 2.0f, 0.0001f); - Math_SmoothStepToF(&actor->unk_0F4.z, 0.0f, 0.05f, 0.2f, 0.0001f); + this->vwork[0].x = gPlayer[0].pos.x + D_demo_800C9FA0[this->index].x; + this->vwork[0].y = gPlayer[0].pos.y + D_demo_800C9FA0[this->index].y; + this->vwork[0].z = gPlayer[0].pos.z + D_demo_800C9FA0[this->index].z; + Math_SmoothStepToF(&this->obj.pos.x, this->vwork[0].x, 0.05f, 50.0f, 0.0001f); + Math_SmoothStepToF(&this->obj.pos.y, this->vwork[0].y, 0.05f, 50.0f, 0.0001f); + Math_SmoothStepToF(&this->obj.pos.z, this->vwork[0].z, 0.05f, 50.0f, 0.0001f); + Math_SmoothStepToF(&this->unk_0F4.x, gPlayer[0].rot.x, 0.1f, 2.0f, 0.0001f); + Math_SmoothStepToF(&this->unk_0F4.y, gPlayer[0].rot.y, 0.1f, 2.0f, 0.0001f); + Math_SmoothStepToF(&this->unk_0F4.z, 0.0f, 0.05f, 0.2f, 0.0001f); break; case 1: - actor->state = 2; - AUDIO_PLAY_SFX(0x09000002, actor->sfxSource, 0); - actor->timer_0BC = 150; - actor->fwork[29] = 5.0f; + this->state = 2; + AUDIO_PLAY_SFX(0x09000002, this->sfxSource, 0); + this->timer_0BC = 150; + this->fwork[29] = 5.0f; case 2: - actor->iwork[11] = 2; - actor->fwork[0] += 2.0f; - if (actor->timer_0BC == 0) { - Object_Kill(&actor->obj, actor->sfxSource); + this->iwork[11] = 2; + this->fwork[0] += 2.0f; + if (this->timer_0BC == 0) { + Object_Kill(&this->obj, this->sfxSource); } break; } - Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(actor->unk_0F4.x * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (this->unk_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(this->unk_0F4.x * M_DTOR), MTXF_APPLY); sp3C.x = 0.0f; sp3C.y = 0.0f; - sp3C.z = actor->fwork[0]; + sp3C.z = this->fwork[0]; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp3C, &sp30); - actor->vel.x = sp30.x; - actor->vel.y = sp30.y; - actor->vel.z = sp30.z; + this->vel.x = sp30.x; + this->vel.y = sp30.y; + this->vel.z = sp30.z; - actor->obj.rot.x = -actor->unk_0F4.x; - actor->obj.rot.y = actor->unk_0F4.y + 180.0f; - actor->obj.rot.z = -actor->unk_0F4.z; + this->obj.rot.x = -this->unk_0F4.x; + this->obj.rot.y = this->unk_0F4.y + 180.0f; + this->obj.rot.z = -this->unk_0F4.z; } void func_demo_8004990C(Player* player) { if (gGroundType == 0) { - D_ctx_80177CE8 += 60.0f; + gPathTexScroll += 60.0f; } - player->unk_138 = player->pos.z + player->unk_08C; - player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; + player->trueZpos = player->pos.z + player->camDist; + player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; } void func_demo_80049968(Actor* actor, s32 arg1) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = D_demo_800C9FD0[arg1]; actor->obj.pos.y = D_demo_800C9FE0[arg1]; - actor->obj.pos.z = D_demo_800C9FF0[arg1] + ((void) 0, gPlayer)[0].unk_138; + actor->obj.pos.z = D_demo_800C9FF0[arg1] + ((void) 0, gPlayer)[0].trueZpos; actor->fwork[0] = D_demo_800CA000[arg1]; actor->fwork[1] = D_demo_800CA010[arg1]; actor->unk_0B6 = D_demo_800CA030[arg1]; @@ -438,7 +438,7 @@ void func_demo_80049B44(void) { if (gEffects[i].obj.status == OBJ_FREE) { x = RAND_FLOAT_CENTERED(400.0f); y = RAND_FLOAT_CENTERED(400.0f); - z = -D_ctx_80177D20 - 500.0f - RAND_FLOAT(500.0f); + z = -gPathProgress - 500.0f - RAND_FLOAT(500.0f); func_demo_80049A9C(&gEffects[i], x, y, z); break; } @@ -457,34 +457,34 @@ void Cutscene_EnterWarpZone(Player* player) { func_demo_8004990C(player); - player->unk_140 = -player->vel.z; - player->unk_144 += -player->vel.z; - D_ctx_80177D20 = player->unk_144; + player->zPathVel = -player->vel.z; + player->zPath += -player->vel.z; + gPathProgress = player->zPath; - Math_SmoothStepToF(&player->unk_130, 0.0f, 0.1f, 15.0f, 0.0f); - Math_SmoothStepToF(&player->unk_12C, 0.0f, 0.1f, 15.0f, 0.0f); - Math_SmoothStepToF(&player->unk_0EC, 0.0f, 0.1f, 5.0f, 0.0f); - Math_SmoothStepToF(&player->unk_0E4, 0.0f, 0.1f, 5.0f, 0.0f); - Math_SmoothStepToF(&player->unk_0E8, 0.0f, 0.1f, 5.0f, 0.0f); + Math_SmoothStepToF(&player->zRotBarrelRoll, 0.0f, 0.1f, 15.0f, 0.0f); + Math_SmoothStepToF(&player->zRotBank, 0.0f, 0.1f, 15.0f, 0.0f); + Math_SmoothStepToF(&player->rot.z, 0.0f, 0.1f, 5.0f, 0.0f); + Math_SmoothStepToF(&player->rot.x, 0.0f, 0.1f, 5.0f, 0.0f); + Math_SmoothStepToF(&player->rot.y, 0.0f, 0.1f, 5.0f, 0.0f); Math_SmoothStepToF(&player->pos.x, 0.0f, 0.1f, 50.0f, 0.0f); Math_SmoothStepToF(&player->pos.y, 0.0f, 0.1f, 50.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.x, 0.0f, 0.1f, 50.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.y, 0.0f, 0.1f, 50.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.x, 0.0f, 0.1f, 50.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.y, 0.0f, 0.1f, 50.0f, 0.0f); - Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 20.0f, 0.0f); + Math_SmoothStepToAngle(&player->aerobaticPitch, 0.0f, 0.1f, 20.0f, 0.0f); - switch (player->unk_1D0) { + switch (player->csState) { case 0: player->somersault = false; gStarWarpDistortion = 100.0f; - player->unk_1D0 = 1; + player->csState = 1; gStarCount = 1; gLoadLevelObjects = 0; player->vel.x = 0.0f; player->vel.y = 0.0f; player->vel.z = -500.0f; - player->unk_0CC = -500.0f; + player->warpCamSpeed = -500.0f; if (gTeamShields[TEAM_ID_FALCO] > 0) { func_demo_80049968(&gActors[0], 0); @@ -497,19 +497,19 @@ void Cutscene_EnterWarpZone(Player* player) { } func_demo_80049968(&gActors[3], 3); - player->timer_1F8 = 50; + player->csTimer = 50; break; case 1: Math_SmoothStepToF(&D_ctx_801779A8[player->num], 100.0f, 1.0f, 4.0f, 0.0f); Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f); gStarWarpDistortion *= 1.05f; - if (player->timer_1F8 == 0) { - player->unk_1D0 = 2; - player->timer_1F8 = 150; + if (player->csTimer == 0) { + player->csState = 2; + player->csTimer = 150; } player->unk_190 = 2.0f; - player->unk_08C -= 2.0f; + player->camDist -= 2.0f; gBlurAlpha = 128; break; @@ -519,71 +519,71 @@ void Cutscene_EnterWarpZone(Player* player) { gStarWarpDistortion *= 1.01f; } - if (player->timer_1F8 <= 100) { - if (player->timer_1F8 == 100) { + if (player->csTimer <= 100) { + if (player->csTimer == 100) { func_play_800A6028(player->sfxSource, 0x0940802A); player->unk_194 = 5.0f; player->unk_190 = 5.0f; } - player->unk_08C += player->unk_0CC; - player->unk_0CC -= 100.0f; + player->camDist += player->warpCamSpeed; + player->warpCamSpeed -= 100.0f; - if (player->unk_08C < -15000.0f) { - player->unk_08C = 0.0f; - player->unk_0CC = 0.0f; + if (player->camDist < -15000.0f) { + player->camDist = 0.0f; + player->warpCamSpeed = 0.0f; player->unk_234 = 0; } } var_v0 = 1; player->unk_190 = 2.0f; - if ((player->timer_1F8 == 95) && (gTeamShields[TEAM_ID_FALCO] > 0)) { + if ((player->csTimer == 95) && (gTeamShields[TEAM_ID_FALCO] > 0)) { gActors[0].state = var_v0; AUDIO_PLAY_SFX(0x0940802A, gActors[0].sfxSource, 0); } - if ((player->timer_1F8 == 90) && (gTeamShields[TEAM_ID_PEPPY] > 0)) { + if ((player->csTimer == 90) && (gTeamShields[TEAM_ID_PEPPY] > 0)) { gActors[2].state = var_v0; AUDIO_PLAY_SFX(0x0940802A, gActors[2].sfxSource, 0); } - if ((player->timer_1F8 == 85) && (gTeamShields[TEAM_ID_SLIPPY] > 0)) { + if ((player->csTimer == 85) && (gTeamShields[TEAM_ID_SLIPPY] > 0)) { gActors[1].state = var_v0; AUDIO_PLAY_SFX(0x0940802A, gActors[1].sfxSource, 0); } - if (player->timer_1F8 == 60) { + if (player->csTimer == 60) { gActors[3].state = var_v0; AUDIO_PLAY_SFX(0x0940802A, gActors[3].sfxSource, 0); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); } - if (player->timer_1F8 == 50) { - player->unk_1D0 = 4; - player->timer_1F8 = 0; + if (player->csTimer == 50) { + player->csState = 4; + player->csTimer = 0; } break; case 4: Math_SmoothStepToF(&D_ctx_801779A8[player->num], 100.0f, 1.0f, 3.0f, 0.0f); player->camRoll -= 0.5f; - if (player->timer_1F8 == 0) { + if (player->csTimer == 0) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; gFillScreenAlphaTarget = 255; gFillScreenAlphaStep = 8; if (gFillScreenAlpha == 255) { Play_ClearObjectData(); - player->unk_1D0 = 5; - player->timer_1F8 = 10; - player->unk_08C = -10000.0f; - player->unk_0AC = player->unk_0B8 = player->unk_0B0 = player->unk_0BC = player->pos.x = - player->pos.y = player->pos.z = player->unk_130 = player->camRoll = player->unk_138 = - player->vel.z = player->unk_144 = D_ctx_80177D20 = player->unk_144 = D_ctx_80177CB0 = - D_ctx_80177D20 = 0.0f; + player->csState = 5; + player->csTimer = 10; + player->camDist = -10000.0f; + player->xPath = player->xPathTarget = player->yPath = player->yPathTarget = player->pos.x = + player->pos.y = player->pos.z = player->zRotBarrelRoll = player->camRoll = player->trueZpos = + player->vel.z = player->zPath = gPathProgress = player->zPath = gSavedPathProgress = + gPathProgress = 0.0f; - player->timer_27C = gSavedHitCount = gObjectLoadIndex = gSavedObjectLoadIndex = 0; + player->meteoWarpTimer = gSavedHitCount = gObjectLoadIndex = gSavedObjectLoadIndex = 0; player->unk_234 = 1; gLevelPhase = 1; @@ -596,31 +596,31 @@ void Cutscene_EnterWarpZone(Player* player) { case 5: Math_SmoothStepToF(&D_ctx_801779A8[player->num], 100.0f, 1.0f, 3.0f, 0.0f); - if (player->timer_1F8 == 0) { + if (player->csTimer == 0) { gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 8; if (gFillScreenAlpha == 0) { - player->unk_1D0 = 6; - player->timer_1F8 = 50; + player->csState = 6; + player->csTimer = 50; } } break; case 6: Math_SmoothStepToF(&gStarWarpDistortion, 0.0f, 0.2f, 1000.0f, 0.1f); - Math_SmoothStepToF(&player->unk_08C, 0.0f, 0.2f, 500.0f, 0.1f); - if (player->timer_1F8 < 30) { + Math_SmoothStepToF(&player->camDist, 0.0f, 0.2f, 500.0f, 0.1f); + if (player->csTimer < 30) { for (var_v0 = 0; var_v0 < 3; var_v0++) { func_demo_80049B44(); } } - if (player->timer_1F8 == 30) { + if (player->csTimer == 30) { gStarCount = 300; AUDIO_PLAY_BGM(SEQ_ID_WARP_ZONE | SEQ_FLAG); } - if (player->timer_1F8 == 0) { + if (player->csTimer == 0) { gWarpZoneBgAlpha = 0.0f; gStarWarpDistortion = 0.0f; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; @@ -724,7 +724,7 @@ void Cutscene_LevelStart(Player* player) { void func_demo_8004A700(Actor* actor, s32 arg1) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = gPlayer[0].pos.x; actor->obj.pos.y = gPlayer[0].pos.y - 1000.0f; actor->obj.pos.z = gPlayer[0].pos.z; @@ -748,8 +748,8 @@ void func_demo_8004A888(Effect* effect) { Vec3f sp2C; Vec3f sp20; - Matrix_RotateY(gCalcMatrix, (gPlayer[0].unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(gPlayer[0].unk_0E4 * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (gPlayer[0].rot.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(gPlayer[0].rot.x * M_DTOR), MTXF_APPLY); Effect_Initialize(effect); effect->obj.status = OBJ_INIT; @@ -808,7 +808,7 @@ void Cutscene_AllRangeMode(Player* player) { s32 pad2; gCsFrameCount += 1; - Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 20.0f, 0.0f); + Math_SmoothStepToAngle(&player->aerobaticPitch, 0.0f, 0.1f, 20.0f, 0.0f); if (gCsFrameCount == 37) { gChangeTo360 = true; if (gCurrentLevel == LEVEL_VENOM_ANDROSS) { @@ -828,15 +828,15 @@ void Cutscene_AllRangeMode(Player* player) { player->wings.unk_0C = 0.0f; player->wings.unk_04 = 0.0f; - Math_SmoothStepToF(&player->unk_0E4, 0.0f, 0.1f, 5.0f, 0.0f); - Math_SmoothStepToF(&player->unk_0E8, 0.0f, 0.1f, 5.0f, 0.0f); - Math_SmoothStepToF(&player->unk_0EC, 0.0f, 0.1f, 1.0f, 0.0f); - Math_SmoothStepToF(&player->unk_12C, 0.0f, 0.1f, 5.0f, 0.0f); + Math_SmoothStepToF(&player->rot.x, 0.0f, 0.1f, 5.0f, 0.0f); + Math_SmoothStepToF(&player->rot.y, 0.0f, 0.1f, 5.0f, 0.0f); + Math_SmoothStepToF(&player->rot.z, 0.0f, 0.1f, 1.0f, 0.0f); + Math_SmoothStepToF(&player->zRotBank, 0.0f, 0.1f, 5.0f, 0.0f); Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f); Math_SmoothStepToF(&player->boostSpeed, 0.0f, 0.1f, 3.0f, 0.0f); - Math_SmoothStepToF(&player->unk_08C, 0.0f, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToF(&player->camDist, 0.0f, 0.1f, 3.0f, 0.0f); - switch (player->unk_1D0) { + switch (player->csState) { case 0: Audio_PlayVoice(0); D_ctx_80177A48[0] = 0.005f; @@ -844,7 +844,7 @@ void Cutscene_AllRangeMode(Player* player) { D_ctx_80177A48[2] = 60.0f; D_ctx_80177A48[3] = 0.0f; player->wings.modelId = 1; - player->unk_1D0++; + player->csState++; gCsFrameCount = 0; /* fallthrough */ case 1: @@ -891,7 +891,7 @@ void Cutscene_AllRangeMode(Player* player) { actor->obj.id = OBJ_ACTOR_TEAM_BOSS; actor->obj.pos.x = D_demo_800CA080[i] + player->pos.x; actor->obj.pos.y = D_demo_800CA08C[i] + player->pos.y; - actor->obj.pos.z = player->unk_138 - 1000.0f; + actor->obj.pos.z = player->trueZpos - 1000.0f; actor->unk_0F4.y = 180.0f; Object_SetInfo(&actor->info, actor->obj.id); } @@ -913,15 +913,15 @@ void Cutscene_AllRangeMode(Player* player) { Math_SmoothStepToF(&D_ctx_80177A48[0], 0.1f, 1.0f, 0.005f, 0.0f); Math_SmoothStepToF(&player->cam.eye.x, player->pos.x + sp64.x, D_ctx_80177A48[0], 500.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.y, player->pos.y + sp64.y, D_ctx_80177A48[0], 500.0f, 0.0f); - Math_SmoothStepToF(&player->cam.eye.z, player->unk_138 + D_ctx_80177D20 + sp64.z, D_ctx_80177A48[0], 500.0f, + Math_SmoothStepToF(&player->cam.eye.z, player->trueZpos + gPathProgress + sp64.z, D_ctx_80177A48[0], 500.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.x, player->pos.x, D_ctx_80177A48[0], 500.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.y, player->pos.y, D_ctx_80177A48[0], 500.0f, 0.0f); - Math_SmoothStepToF(&player->cam.at.z, player->unk_138 + D_ctx_80177D20, D_ctx_80177A48[0], 500.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.z, player->trueZpos + gPathProgress, D_ctx_80177A48[0], 500.0f, 0.0f); break; } - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(player->rot.x * M_DTOR), MTXF_APPLY); sp70.x = 0.0f; sp70.y = 0.0f; @@ -935,15 +935,15 @@ void Cutscene_AllRangeMode(Player* player) { player->pos.x += player->vel.x; player->pos.y += player->vel.y; player->pos.z += player->vel.z; - player->unk_138 = player->pos.z + player->unk_08C; + player->trueZpos = player->pos.z + player->camDist; player->cam.at.z += player->vel.z; player->cam.eye.z += player->vel.z; - player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; - player->unk_088 += 10.0f; - player->unk_080 = -SIN_DEG(player->unk_088) * 0.3f; - player->unk_0F4 += 8.0f; - player->unk_0F0 = SIN_DEG(player->unk_0F4); + player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; + player->bobPhase += 10.0f; + player->yBob = -SIN_DEG(player->bobPhase) * 0.3f; + player->rockPhase += 8.0f; + player->rockAngle = SIN_DEG(player->rockPhase); func_play_800AA800(player); } @@ -961,16 +961,16 @@ void Cutscene_CoComplete2(Player* player) { Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 5.0f, 0.01f); - switch (player->unk_1D0) { + switch (player->csState) { case 10: D_ctx_80177A48[2] = 0.0f; - player->unk_1D0++; + player->csState++; player->wings.unk_04 = 0.0f; player->wings.unk_0C = 0.0f; player->wings.unk_08 = 0.0f; player->wings.unk_10 = 0.0f; - player->unk_130 = 0.0f; - player->unk_12C = 0.0f; + player->zRotBarrelRoll = 0.0f; + player->zRotBank = 0.0f; player->boostSpeed = 0.0f; player->wings.modelId = 1; player->baseSpeed = 40.0f; @@ -978,44 +978,44 @@ void Cutscene_CoComplete2(Player* player) { case 11: D_ctx_80177A48[0] = 0.0f; - Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 1.0f, 5.0f, 0.0f); + Math_SmoothStepToAngle(&player->aerobaticPitch, 0.0f, 1.0f, 5.0f, 0.0f); player->cam.at.x += (D_ctx_80178440 - player->cam.at.x) * 0.01f; player->cam.at.y += (D_ctx_80178444 - player->cam.at.y) * 0.01f; player->cam.at.z += (D_ctx_80178448 - player->cam.at.z) * 0.01f; - player->cam.eye.x += ((player->cam.at.x + (500.0f * player->unk_004)) - player->cam.eye.x) * 0.01f; - player->cam.eye.y += ((player->cam.at.y + 500.0f) - player->cam.eye.y) * 0.01f; - player->cam.eye.z += ((D_ctx_80178448 + (2000.0f * D_ctx_80177950)) - player->cam.eye.z) * 0.01f; + player->cam.eye.x += (player->cam.at.x + (500.0f * player->unk_004) - player->cam.eye.x) * 0.01f; + player->cam.eye.y += (player->cam.at.y + 500.0f - player->cam.eye.y) * 0.01f; + player->cam.eye.z += (D_ctx_80178448 + (2000.0f * D_ctx_80177950) - player->cam.eye.z) * 0.01f; - if (player->timer_1FC > 25) { + if (player->csEventTimer > 25) { D_ctx_80177A48[2] += 1.5f * player->unk_004; - Math_SmoothStepToF(&player->unk_0EC, (player->unk_004 * (-450.0f)) * D_ctx_80177950, 0.2f, 20.0f, 0.1f); + Math_SmoothStepToF(&player->rot.z, player->unk_004 * -450.0f * D_ctx_80177950, 0.2f, 20.0f, 0.1f); } else { D_ctx_80177A48[2] += 0.25f * player->unk_004; - if (player->unk_0EC < (-360.0f)) { - player->unk_0EC += 360.0f; + if (player->rot.z < (-360.0f)) { + player->rot.z += 360.0f; } - if (player->unk_0EC > 360.0f) { - player->unk_0EC -= 360.0f; + if (player->rot.z > 360.0f) { + player->rot.z -= 360.0f; } - Math_SmoothStepToF(&player->unk_0EC, (player->unk_004 * 20.0f) * D_ctx_80177950, 0.1f, 3.0f, 0.1f); + Math_SmoothStepToF(&player->rot.z, player->unk_004 * 20.0f * D_ctx_80177950, 0.1f, 3.0f, 0.1f); } if (D_ctx_80177950 > 0.0f) { - Math_SmoothStepToF(&player->unk_0E8, 0.0f, 0.1f, 3.0f, 0.1f); + Math_SmoothStepToF(&player->rot.y, 0.0f, 0.1f, 3.0f, 0.1f); } else { - Math_SmoothStepToF(&player->unk_0E8, 180.0f, 0.1f, 3.0f, 0.1f); + Math_SmoothStepToF(&player->rot.y, 180.0f, 0.1f, 3.0f, 0.1f); Math_SmoothStepToF(&player->pos.x, player->cam.eye.x, 1.0f, 30.0f, 0.0f); D_ctx_80177A48[2] = 0.0f; } player->pos.x += D_ctx_80177A48[2]; - Math_SmoothStepToF(&player->unk_0E4, 0.0f, 0.1f, 3.0f, 0.1f); + Math_SmoothStepToF(&player->rot.x, 0.0f, 0.1f, 3.0f, 0.1f); Math_SmoothStepToF(&player->pos.y, player->cam.eye.y + 5.0f, 0.1f, 1.0f, 0.0f); - if (player->timer_1F8 == 0) { - player->unk_1D0 = 0; - player->timer_1F8 = 120; - player->timer_1FC = 20; + if (player->csTimer == 0) { + player->csState = 0; + player->csTimer = 120; + player->csEventTimer = 20; D_ctx_80177A48[0] = 0.001f; gCsCamEyeX = player->cam.eye.x; gCsCamEyeY = player->cam.eye.y; @@ -1027,13 +1027,13 @@ void Cutscene_CoComplete2(Player* player) { break; case 0: - if (player->timer_1F8 > 60) { - Math_SmoothStepToF(&player->unk_0EC, (player->unk_004 * 60.0f) * D_ctx_80177950, 0.1f, 4.0f, 0.1f); + if (player->csTimer > 60) { + Math_SmoothStepToF(&player->rot.z, player->unk_004 * 60.0f * D_ctx_80177950, 0.1f, 4.0f, 0.1f); } - if (player->timer_1F8 < 80) { + if (player->csTimer < 80) { gCsCamAtX = player->pos.x; gCsCamAtY = player->pos.y; - gCsCamAtZ = player->unk_138 + D_ctx_80177D20 + 30.0f; + gCsCamAtZ = player->trueZpos + gPathProgress + 30.0f; Math_SmoothStepToF(&D_ctx_80177A48[0], 0.05f, 0.1f, 0.0005f, 0.0f); } @@ -1054,19 +1054,19 @@ void Cutscene_CoComplete2(Player* player) { if ((D_ctx_80177950 < 0.0f) && (player->unk_004 < 0.0f)) { var_fa1 = 360.0f; } - if (player->timer_1FC == 0) { - Math_SmoothStepToF(&player->unk_0E8, var_fa1, 0.1f, 4.0f, 0.0f); + if (player->csEventTimer == 0) { + Math_SmoothStepToF(&player->rot.y, var_fa1, 0.1f, 4.0f, 0.0f); } player->vel.y = 0.0f; Math_SmoothStepToF(&player->pos.y, player->cam.eye.y + 5.0f, 0.1f, 4.0f, 0.0f); - if (player->timer_1F8 < 40) { - Math_SmoothStepToF(&player->unk_0EC, player->unk_004 * 180.0f, 0.1f, 1.5f, 0.0f); + if (player->csTimer < 40) { + Math_SmoothStepToF(&player->rot.z, player->unk_004 * 180.0f, 0.1f, 1.5f, 0.0f); } - if (player->timer_1F8 == 0) { - player->unk_1D0 = 1; - player->timer_1F8 = 150; + if (player->csTimer == 0) { + player->csState = 1; + player->csTimer = 150; player->wings.unk_10 = 0.0f; player->wings.unk_08 = 0.0f; player->wings.unk_0C = 0.0f; @@ -1076,9 +1076,9 @@ void Cutscene_CoComplete2(Player* player) { case 1: Math_SmoothStepToF(&D_ctx_80177A48[0], 1.0f, 0.1f, 0.05f, 0.0f); - player->unk_25C += 0.04f; - if (player->unk_25C > 0.6f) { - player->unk_25C = 0.6f; + player->contrailScale += 0.04f; + if (player->contrailScale > 0.6f) { + player->contrailScale = 0.6f; } player->unk_000 += 0.005f; @@ -1087,25 +1087,25 @@ void Cutscene_CoComplete2(Player* player) { } Math_SmoothStepToF(&gCsCamAtX, player->pos.x, D_ctx_80177A48[0], 50000.0f, 0.0f); Math_SmoothStepToF(&gCsCamAtY, player->pos.y, D_ctx_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&gCsCamAtZ, player->unk_138 + D_ctx_80177D20 + 30.0f, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&gCsCamAtZ, player->trueZpos + gPathProgress + 30.0f, D_ctx_80177A48[0], 50000.0f, 0.0f); Math_SmoothStepToF(&player->pos.y, player->cam.eye.y + 5.0f, 0.1f, 4.0f, 0.0f); - Math_SmoothStepToF(&player->unk_0E4, 20.0f, 0.1f, 0.2f, 0.01f); + Math_SmoothStepToF(&player->rot.x, 20.0f, 0.1f, 0.2f, 0.01f); Math_SmoothStepToF(&player->pos.x, player->cam.eye.x, 0.1f, 2.0f, 0.0f); - if (player->timer_1F8 <= 110) { - Math_SmoothStepToF(&player->unk_0EC, player->unk_004 * 360.0f, 0.1f, 2.5f, 0.0f); + if (player->csTimer <= 110) { + Math_SmoothStepToF(&player->rot.z, player->unk_004 * 360.0f, 0.1f, 2.5f, 0.0f); } else { - Math_SmoothStepToF(&player->unk_0EC, player->unk_004 * 180.0f, 0.1f, 2.5f, 0.0f); + Math_SmoothStepToF(&player->rot.z, player->unk_004 * 180.0f, 0.1f, 2.5f, 0.0f); } - if ((180.0f - fabsf(player->unk_0EC)) <= 3.0f) { + if ((180.0f - fabsf(player->rot.z)) <= 3.0f) { gGroundSurface = SURFACE_ROCK; } - if (player->timer_1F8 == 0) { - player->timer_1F8 = 200; - player->timer_1FC = 500; - player->unk_1D0 = 2; + if (player->csTimer == 0) { + player->csTimer = 200; + player->csEventTimer = 500; + player->csState = 2; player->unk_000 = (player->unk_004 = (player->unk_008 = (D_ctx_80178418 = 0.0f))); player->baseSpeed = 0.0f; D_ctx_80177A48[6] = 0.0f; @@ -1114,9 +1114,9 @@ void Cutscene_CoComplete2(Player* player) { case 2: player->pos.y += 5.0f; - Matrix_RotateY(gCalcMatrix, ((player->unk_0E8 + 180.0f) + D_ctx_80178418) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, -((player->unk_0F8 + player->unk_0F0) * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, ((player->rot.y + 180.0f) + D_ctx_80178418) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(player->rot.x * M_DTOR), MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -((player->bankAngle + player->rockAngle) * M_DTOR), MTXF_APPLY); sp78.x = 0; sp78.y = 70.0f; @@ -1125,7 +1125,7 @@ void Cutscene_CoComplete2(Player* player) { Matrix_MultVec3f(gCalcMatrix, &sp78, &sp6C); Math_SmoothStepToF(&gCsCamAtX, player->pos.x, D_ctx_80177A48[0], 50000.0f, 0.0f); Math_SmoothStepToF(&gCsCamAtY, player->pos.y - D_ctx_80177A48[6], D_ctx_80177A48[0], 50000.0f, 0.0f); - Math_SmoothStepToF(&gCsCamAtZ, player->unk_138 + D_ctx_80177D20 - D_ctx_80177A48[6], D_ctx_80177A48[0], + Math_SmoothStepToF(&gCsCamAtZ, player->trueZpos + gPathProgress - D_ctx_80177A48[6], D_ctx_80177A48[0], 50000.0f, 0.0f); Math_SmoothStepToF(&D_ctx_80177A48[6], 130.0f, 0.1f, 0.25f, 0.0f); player->unk_000 += 0.002f; @@ -1136,13 +1136,13 @@ void Cutscene_CoComplete2(Player* player) { gCsCamEyeX += ((player->pos.x + sp6C.x) - gCsCamEyeX) * player->unk_000; gCsCamEyeY += ((player->pos.y + sp6C.y) - gCsCamEyeY) * player->unk_000; - gCsCamEyeZ += ((player->unk_138 + D_ctx_80177D20 + sp6C.z) - gCsCamEyeZ) * player->unk_000; + gCsCamEyeZ += ((player->trueZpos + gPathProgress + sp6C.z) - gCsCamEyeZ) * player->unk_000; D_ctx_80178430 += 0.2f; D_ctx_8017842C += 0.2f; D_ctx_80178418 += player->unk_008; - Math_SmoothStepToAngle(&player->unk_0EC, 0.0f, 0.1f, 2.0f, 0.0f); + Math_SmoothStepToAngle(&player->rot.z, 0.0f, 0.1f, 2.0f, 0.0f); - if (player->timer_1F8 == 0) { + if (player->csTimer == 0) { player->unk_008 += 0.01f; if (player->unk_008 > 0.63f) { player->unk_008 = 0.63f; @@ -1156,15 +1156,15 @@ void Cutscene_CoComplete2(Player* player) { player->vel.y = 5.0f; - if ((player->timer_1F8 == 50) && (gTeamShields[TEAM_ID_FALCO] > 0)) { + if ((player->csTimer == 50) && (gTeamShields[TEAM_ID_FALCO] > 0)) { func_demo_8004A840(0); } - if ((player->timer_1F8 == 70) && (gTeamShields[TEAM_ID_SLIPPY] > 0)) { + if ((player->csTimer == 70) && (gTeamShields[TEAM_ID_SLIPPY] > 0)) { func_demo_8004A840(1); } - if (player->timer_1F8 == 90) { + if (player->csTimer == 90) { Play_ClearObjectData(); if (gTeamShields[TEAM_ID_PEPPY] > 0) { func_demo_8004A840(2); @@ -1172,9 +1172,9 @@ void Cutscene_CoComplete2(Player* player) { gGroundSurface = SURFACE_GRASS; } - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, -((player->unk_0F8 + player->unk_0F0) * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(player->rot.x * M_DTOR), MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -((player->bankAngle + player->rockAngle) * M_DTOR), MTXF_APPLY); if ((D_ctx_80178418 > 70.0f) && (D_ctx_80178418 < 280.0f)) { func_demo_8004AA84(); @@ -1187,7 +1187,7 @@ void Cutscene_CoComplete2(Player* player) { D_ctx_80178450[0] = player->pos.x + sp6C.x; D_ctx_80178460[0] = player->pos.y + sp6C.y; - D_ctx_80178470[0] = player->unk_138 + sp6C.z; + D_ctx_80178470[0] = player->trueZpos + sp6C.z; sp78.x = gActors[1].fwork[0] * gActors[1].fwork[3]; sp78.y = gActors[1].fwork[1] * gActors[1].fwork[3]; @@ -1197,7 +1197,7 @@ void Cutscene_CoComplete2(Player* player) { D_ctx_80178450[1] = player->pos.x + sp6C.x; D_ctx_80178460[1] = player->pos.y + sp6C.y; - D_ctx_80178470[1] = player->unk_138 + sp6C.z; + D_ctx_80178470[1] = player->trueZpos + sp6C.z; sp78.x = gActors[2].fwork[0] * gActors[2].fwork[3]; sp78.y = gActors[2].fwork[1] * gActors[2].fwork[3]; @@ -1207,7 +1207,7 @@ void Cutscene_CoComplete2(Player* player) { D_ctx_80178450[2] = player->pos.x + sp6C.x; D_ctx_80178460[2] = player->pos.y + sp6C.y; - D_ctx_80178470[2] = player->unk_138 + sp6C.z; + D_ctx_80178470[2] = player->trueZpos + sp6C.z; switch (gCsFrameCount) { case 330: @@ -1247,9 +1247,9 @@ void Cutscene_CoComplete2(Player* player) { case 3: D_ctx_80178430 += 0.2f; D_ctx_8017842C += 0.2f; - if (player->timer_1F8 == 0) { - player->unk_1D0 = 4; - player->timer_1F8 = 30; + if (player->csTimer == 0) { + player->csState = 4; + player->csTimer = 30; player->unk_000 = 0.0f; player->unk_194 = 5.0f; player->unk_190 = 5.0f; @@ -1260,24 +1260,24 @@ void Cutscene_CoComplete2(Player* player) { D_ctx_80178430 += 0.2f; D_ctx_8017842C += 0.2f; player->unk_190 = 2.0f; - player->unk_25C += 0.1f; - if (player->unk_25C > 0.6f) { - player->unk_25C = 0.6f; + player->contrailScale += 0.1f; + if (player->contrailScale > 0.6f) { + player->contrailScale = 0.6f; } player->unk_000 += 1.0f; player->baseSpeed = SQ(player->unk_000); - if (player->timer_1F8 == 0) { + if (player->csTimer == 0) { D_ctx_80177A48[7] = player->vel.x; D_ctx_80177A48[8] = player->vel.y; D_ctx_80177A48[9] = player->vel.z; - player->unk_1D0 = 5; + player->csState = 5; player->baseSpeed = 0.0f; - player->timer_1F8 = 10; - func_effect_80078E50(player->pos.x, player->pos.y, player->unk_138, 30.0f); + player->csTimer = 10; + func_effect_80078E50(player->pos.x, player->pos.y, player->trueZpos, 30.0f); } gCsCamAtX = player->pos.x; gCsCamAtY = player->pos.y - D_ctx_80177A48[6]; - gCsCamAtZ = player->unk_138 + D_ctx_80177D20 - D_ctx_80177A48[6]; + gCsCamAtZ = player->trueZpos + gPathProgress - D_ctx_80177A48[6]; break; case 5: @@ -1285,9 +1285,9 @@ void Cutscene_CoComplete2(Player* player) { gCsCamAtY += D_ctx_80177A48[8]; gCsCamAtZ += D_ctx_80177A48[9]; player->unk_234 = 0; - if (player->timer_1F8 == 0) { + if (player->csTimer == 0) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; - player->timer_1F8 = 0; + player->csTimer = 0; gFadeoutType = 4; Audio_FadeOutAll(10); gLeveLClearStatus[gCurrentLevel] = Play_CheckMedalStatus(150) + 1; @@ -1305,16 +1305,16 @@ void Cutscene_CoComplete2(Player* player) { break; case 1255: - player->unk_1D0 = 3; - player->timer_1F8 = 10; + player->csState = 3; + player->csTimer = 10; func_play_800A6028(player->sfxSource, 0x09000002); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); break; } - Matrix_RotateY(gCalcMatrix, ((player->unk_114 + player->unk_0E8) + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4) * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->xRot_120 + player->rot.x) * M_DTOR), MTXF_APPLY); sp60.x = 0.0f; sp60.y = 0.0f; @@ -1330,8 +1330,8 @@ void Cutscene_CoComplete2(Player* player) { player->pos.y += player->vel.y; player->pos.z += player->vel.z; - player->unk_0F8 = player->unk_0EC; - player->unk_138 = player->pos.z; + player->bankAngle = player->rot.z; + player->trueZpos = player->pos.z; Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0); Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0); @@ -1340,10 +1340,10 @@ void Cutscene_CoComplete2(Player* player) { Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0.f); Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0.f); - player->unk_088 += 10.0f; - player->unk_080 = (-SIN_DEG(player->unk_088)) * 0.3f; - player->unk_0F4 += 8.0f; - player->unk_0F0 = SIN_DEG(player->unk_0F4); + player->bobPhase += 10.0f; + player->yBob = (-SIN_DEG(player->bobPhase)) * 0.3f; + player->rockPhase += 8.0f; + player->rockAngle = SIN_DEG(player->rockPhase); } void Cutscene_FortunaComplete(Player* player) { @@ -1445,14 +1445,14 @@ void Cutscene_UTurn(Player* player) { Vec3f sp58; PosRot sp50; - Math_SmoothStepToF(&player->unk_130, 0.0f, 0.1f, 15.0f, 0.0f); - Math_SmoothStepToF(&player->unk_0EC, 0.0f, 0.1f, 5.0f, 0.0f); - Math_SmoothStepToF(&player->unk_0E8, 0.0f, 0.1f, 5.0f, 0.0f); - Math_SmoothStepToF(&player->unk_0E4, 0.0f, 0.1f, 5.0f, 0.0f); + Math_SmoothStepToF(&player->zRotBarrelRoll, 0.0f, 0.1f, 15.0f, 0.0f); + Math_SmoothStepToF(&player->rot.z, 0.0f, 0.1f, 5.0f, 0.0f); + Math_SmoothStepToF(&player->rot.y, 0.0f, 0.1f, 5.0f, 0.0f); + Math_SmoothStepToF(&player->rot.x, 0.0f, 0.1f, 5.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.y, player->pos.y - 20.0f, 0.2f, 100.0f, 0.0f); sp50.rot.z = player->baseSpeed; - sp58.x = Math_RadToDeg(Math_Atan2F(player->pos.x, player->unk_138)); + sp58.x = Math_RadToDeg(Math_Atan2F(player->pos.x, player->trueZpos)); player->boostCooldown = 1; player->boostMeter += 1.0f; @@ -1461,35 +1461,35 @@ void Cutscene_UTurn(Player* player) { player->boostMeter = 90.0f; } - switch (player->unk_1D0) { + switch (player->csState) { case 0: if (player->unk_19C != 0) { - player->timer_1F8 = 10; + player->csTimer = 10; } else { - player->timer_1F8 = 30; + player->csTimer = 30; } - player->unk_1D0 = 1; - if (player->unk_4D8 > 180.0f) { - player->unk_4D8 -= 360.0f; + player->csState = 1; + if (player->aerobaticPitch > 180.0f) { + player->aerobaticPitch -= 360.0f; } /* fallthrough */ case 1: - if (player->timer_1F8 == 0) { - player->unk_1D0 = 2; + if (player->csTimer == 0) { + player->csState = 2; if (player->unk_19C != 0) { - player->timer_1F8 = 60; + player->csTimer = 60; } else { - player->timer_1F8 = 80; + player->csTimer = 80; } } player->cam.eye.x += player->vel.x * 0.2f; player->cam.eye.z += player->vel.z * 0.2f; - Math_SmoothStepToF(&player->unk_12C, 0.0f, 0.1f, 15.0f, 0.0f); + Math_SmoothStepToF(&player->zRotBank, 0.0f, 0.1f, 15.0f, 0.0f); break; case 2: - if (player->unk_4D8 > 140.0f) { + if (player->aerobaticPitch > 140.0f) { sp58.y = 0.0f; } else { sp58.y = 60.0f; @@ -1499,21 +1499,21 @@ void Cutscene_UTurn(Player* player) { Math_SmoothStepToF(&player->wings.unk_08, sp58.y, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->wings.unk_0C, sp58.y, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->wings.unk_10, sp58.y, 0.3f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->unk_12C, 0.0f, 0.1f, 15.0f, 0.0f); - Math_SmoothStepToF(&player->unk_4D8, 190.0f, 0.1f, 6.0f, 0.001f); + Math_SmoothStepToF(&player->zRotBank, 0.0f, 0.1f, 15.0f, 0.0f); + Math_SmoothStepToF(&player->aerobaticPitch, 190.0f, 0.1f, 6.0f, 0.001f); - if (player->unk_4D8 > 180.0f) { - player->unk_114 += 180.0f; - if (player->unk_114 >= 360.0f) { - player->unk_114 -= 360.0f; + if (player->aerobaticPitch > 180.0f) { + player->yRot_114 += 180.0f; + if (player->yRot_114 >= 360.0f) { + player->yRot_114 -= 360.0f; } - player->unk_4D8 = 360.0f - (player->unk_4D8 - 180.0f); - if ((sp58.x - player->unk_114) < 180.0f) { - player->unk_12C = 180.0f; + player->aerobaticPitch = 360.0f - (player->aerobaticPitch - 180.0f); + if ((sp58.x - player->yRot_114) < 180.0f) { + player->zRotBank = 180.0f; } else { - player->unk_12C = -180.0f; + player->zRotBank = -180.0f; } - player->unk_1D0 = 3; + player->csState = 3; func_play_800A5FA0(player->sfxSource, 0x09000002, player->num); player->unk_194 = 7.0f; player->unk_190 = 7.0f; @@ -1522,9 +1522,9 @@ void Cutscene_UTurn(Player* player) { break; case 3: - Math_SmoothStepToF(&player->unk_12C, 0.0f, 0.05f, 5.0f, 0.0f); + Math_SmoothStepToF(&player->zRotBank, 0.0f, 0.05f, 5.0f, 0.0f); - sp58.y = player->unk_12C * 0.3f; + sp58.y = player->zRotBank * 0.3f; Math_SmoothStepToF(&player->wings.unk_04, sp58.y, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->wings.unk_08, sp58.y, 0.3f, 100.0f, 0.0f); @@ -1544,10 +1544,10 @@ void Cutscene_UTurn(Player* player) { } if (player->unk_19C == 0) { - Math_SmoothStepToAngle(&player->unk_114, sp58.x, 0.1f, 2.0f, 0.0f); + Math_SmoothStepToAngle(&player->yRot_114, sp58.x, 0.1f, 2.0f, 0.0f); } - if (player->pos.y < player->unk_0A0) { + if (player->pos.y < player->pathHeight) { if (player->unk_004 < 0.0f) { player->unk_004 += 0.2f; } @@ -1555,7 +1555,7 @@ void Cutscene_UTurn(Player* player) { player->unk_004 -= 0.2f; } - if (player->timer_1F8 == 0) { + if (player->csTimer == 0) { player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_014 = 0.0f; player->unk_018 = 0.0f; @@ -1564,10 +1564,10 @@ void Cutscene_UTurn(Player* player) { } player->pos.y += player->unk_004; player->cam.at.y += player->unk_004; - player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; + player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->xRot_120 + player->rot.x + player->aerobaticPitch) * M_DTOR), MTXF_APPLY); sp50.rot.x = 0.0f; sp50.rot.y = 0.0f; @@ -1580,12 +1580,12 @@ void Cutscene_UTurn(Player* player) { player->pos.x += player->vel.x; player->pos.y += player->vel.y; - if (player->pos.y < player->unk_0A4) { - player->pos.y = player->unk_0A4; + if (player->pos.y < player->pathFloor) { + player->pos.y = player->pathFloor; player->vel.y = 0.0f; } player->pos.z += player->vel.z; - player->unk_138 = player->pos.z; + player->trueZpos = player->pos.z; func_play_800B2574(player); func_play_800B2130(player); @@ -1602,7 +1602,7 @@ void Cutscene_DropVsItem(Player* player, ObjectId itemId, Item* item) { item->obj.status = OBJ_INIT; item->obj.pos.x = player->pos.x; item->obj.pos.y = player->pos.y; - item->obj.pos.z = player->unk_138; + item->obj.pos.z = player->trueZpos; item->obj.id = itemId; Object_SetInfo(&item->info, item->obj.id); } @@ -1614,11 +1614,11 @@ void Cutscene_KillPlayer(Player* player) { Audio_KillSfxBySourceAndId(player->sfxSource, 0x0900C010); func_play_800A5FA0(player->sfxSource, 0x0903F004, player->num); player->state_1C8 = PLAYERSTATE_1C8_NEXT; - player->timer_1F8 = 70; + player->csTimer = 70; player->timer_224 = 20; gFadeoutType = 7; - if (player->unk_1D4 != 0) { + if (player->grounded) { player->unk_284 = 0; } @@ -1659,7 +1659,7 @@ void Cutscene_KillPlayer(Player* player) { if (gVsPointsToWin == D_ctx_80177DB8[player->unk_288 - 1]) { player->unk_288 = -1; if (player->unk_284 == 0) { - func_effect_8007C688(player->pos.x, player->pos.y, player->unk_138, 3.0f, 1000); + func_effect_8007C688(player->pos.x, player->pos.y, player->trueZpos, 3.0f, 1000); } } } @@ -1676,12 +1676,12 @@ void Cutscene_KillPlayer(Player* player) { void func_demo_8004D738(Player* player) { player->pos.y += 30.0f; - func_effect_8007D0E0(player->pos.x, player->pos.y, player->unk_138, 6.0f); + func_effect_8007D0E0(player->pos.x, player->pos.y, player->trueZpos, 6.0f); if (gCamCount == 1) { - func_effect_8007BFFC(player->pos.x, player->pos.y, player->unk_138, 0.0f, 0.0f, 0.0f, 3.0f, 80); - func_effect_8007C688(player->pos.x, player->pos.y, player->unk_138, 3.0f, 800); + func_effect_8007BFFC(player->pos.x, player->pos.y, player->trueZpos, 0.0f, 0.0f, 0.0f, 3.0f, 80); + func_effect_8007C688(player->pos.x, player->pos.y, player->trueZpos, 3.0f, 800); } else { - func_effect_8007BFFC(player->pos.x, player->pos.y, player->unk_138, 0.0f, 0.0f, 0.0f, 3.0f, 10); + func_effect_8007BFFC(player->pos.x, player->pos.y, player->trueZpos, 0.0f, 0.0f, 0.0f, 3.0f, 10); } Cutscene_KillPlayer(player); } @@ -1691,49 +1691,49 @@ void func_demo_8004D828(Player* player) { Vec3f src; Vec3f dest; - Math_SmoothStepToF(&player->unk_0E4, 0.0f, 0.1f, 1.0f, 0.01f); + Math_SmoothStepToF(&player->rot.x, 0.0f, 0.1f, 1.0f, 0.01f); player->pos.x += player->vel.x; player->pos.y += player->vel.y; if ((gCurrentLevel != LEVEL_VENOM_1 || gBossActive == 0) && (gLevelType == LEVELTYPE_PLANET || gCurrentLevel == LEVEL_BOLSE)) { player->vel.y -= 0.5f; - player->unk_0E4 -= 2.0f; + player->rot.x -= 2.0f; } player->pos.z += player->vel.z; - player->unk_138 = player->pos.z; - player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; - player->unk_12C += 15.0f; + player->trueZpos = player->pos.z; + player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; + player->zRotBank += 15.0f; - if (player->unk_1D0 != 0) { - player->unk_0E8 += 11.0f; - player->unk_0E4 += 17.0f; + if (player->csState != 0) { + player->rot.y += 11.0f; + player->rot.x += 17.0f; } if (gCamCount == 1) { if (((gGameFrameCount % 2) == 0)) { func_effect_8007D24C(RAND_FLOAT_CENTERED(20.0) + player->pos.x, RAND_FLOAT_CENTERED(20.0) + player->pos.y, - player->unk_138, 2.2f); + player->trueZpos, 2.2f); } } else if (((gGameFrameCount % 4) == 0)) { func_effect_8007D10C(RAND_FLOAT_CENTERED(10.0f) + player->pos.x, RAND_FLOAT_CENTERED(10.0f) + player->pos.y, - RAND_FLOAT_CENTERED(10.0f) + player->unk_138, 2.2f); + RAND_FLOAT_CENTERED(10.0f) + player->trueZpos, 2.2f); } - if ((player->pos.y < player->unk_0A4) && (player->unk_1D0 == 0)) { - player->pos.y = player->unk_0A4; + if ((player->pos.y < player->pathFloor) && (player->csState == 0)) { + player->pos.y = player->pathFloor; player->unk_284 = 0; - player->timer_220 = 0; + player->radioDamageTimer = 0; player->vel.y = 10.0f; - player->unk_1D0 = 1; + player->csState = 1; func_play_800A6070(player->sfxSource, 0x29000000); if ((gCurrentLevel == LEVEL_CORNERIA) || (gCurrentLevel == LEVEL_FORTUNA)) { func_enmy_80062C38(player->pos.x, player->pos.z); } else { - func_effect_8007D0E0(player->pos.x, player->pos.y, player->unk_138, 3.0f); + func_effect_8007D0E0(player->pos.x, player->pos.y, player->trueZpos, 3.0f); } if (player->wings.rightState == WINGSTATE_INTACT) { @@ -1746,38 +1746,38 @@ void func_demo_8004D828(Player* player) { player->wings.leftState = WINGSTATE_BROKEN; func_effect_8007D0E0(player->hit2.x, player->hit2.y, player->hit2.z, 2.0f); } - } else if (((player->timer_220 > 0) || (player->pos.y < player->unk_0A4) || (player->pos.y < gWaterLevel) || - (player->timer_1FC == 0)) && - (player->timer_1F8 == 0)) { + } else if (((player->radioDamageTimer > 0) || (player->pos.y < player->pathFloor) || + (player->pos.y < gWaterLevel) || (player->csEventTimer == 0)) && + (player->csTimer == 0)) { if (gCamCount != 4) { if (player->unk_284 == 0) { - func_effect_8007C688(player->pos.x, player->pos.y, player->unk_138 - (2.0f * player->vel.z), 3.0f, 80); + func_effect_8007C688(player->pos.x, player->pos.y, player->trueZpos - (2.0f * player->vel.z), 3.0f, 80); } - if (player->pos.y < player->unk_0A4) { + if (player->pos.y < player->pathFloor) { func_enmy_80062C38(player->pos.x, player->pos.z); } } if (gLevelType == LEVELTYPE_PLANET) { for (i = 0; i < 4; i++) { - func_play_800A69F8(2, player->pos.x, player->pos.y, player->unk_138); + func_play_800A69F8(2, player->pos.x, player->pos.y, player->trueZpos); } for (i = 0; i < 2; i++) { - func_play_800A69F8(3, player->pos.x, player->pos.y, player->unk_138); + func_play_800A69F8(3, player->pos.x, player->pos.y, player->trueZpos); } } - func_effect_8007D0E0(player->pos.x, player->pos.y, player->unk_138, 5.0f); - func_effect_8007BFFC(player->pos.x, player->pos.y, player->unk_138, player->vel.x, 0.0f, player->vel.z, 5.0f, + func_effect_8007D0E0(player->pos.x, player->pos.y, player->trueZpos, 5.0f); + func_effect_8007BFFC(player->pos.x, player->pos.y, player->trueZpos, player->vel.x, 0.0f, player->vel.z, 5.0f, 20); Cutscene_KillPlayer(player); } Math_SmoothStepToF(&player->camRoll, 0.0f, 0.05f, 5.0f, 0.00001f); - Matrix_RotateY(gCalcMatrix, (player->unk_114 + (player->unk_134 * 0.2f)) * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, (player->yRot_114 + (player->damageShake * 0.2f)) * M_DTOR, MTXF_NEW); Math_SmoothStepToF(&player->unk_000, 700.0f, 0.05f, 10.0f, 0.00001f); src.x = player->unk_004 * (player->unk_000 * 0.7f); src.y = player->unk_000 * 0.5f; - src.z = player->unk_000 + (400.0f - player->unk_08C); + src.z = player->unk_000 + (400.0f - player->camDist); Matrix_MultVec3f(gCalcMatrix, &src, &dest); @@ -1790,7 +1790,7 @@ void func_demo_8004D828(Player* player) { if ((gLevelType == LEVELTYPE_PLANET) || (gCurrentLevel == LEVEL_BOLSE)) { player->cam.eye.y = (player->pos.y * player->unk_148) + dest.y; player->cam.eye.y -= player->unk_02C - 50.0f; - player->cam.at.y = ((player->pos.y * player->unk_14C) + 20.0f) + (player->unk_060 * 5.0f); + player->cam.at.y = (player->pos.y * player->unk_14C) + 20.0f + (player->unk_060 * 5.0f); } else { player->cam.eye.y = player->pos.y + dest.y; player->cam.at.y = player->pos.y; @@ -1804,11 +1804,11 @@ void func_demo_8004D828(Player* player) { void func_demo_8004DEF8(Player* player) { s32 i; - if (player->unk_0E4 < 0.0f) { - player->unk_0E4 += 1.0f; + if (player->rot.x < 0.0f) { + player->rot.x += 1.0f; } - if (player->unk_0E4 > 0.0f) { - player->unk_0E4 -= 1.0f; + if (player->rot.x > 0.0f) { + player->rot.x -= 1.0f; } player->pos.x += player->vel.x; @@ -1819,59 +1819,59 @@ void func_demo_8004DEF8(Player* player) { } player->pos.z += player->vel.z; - player->unk_138 = player->pos.z + player->unk_08C; - player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; - player->unk_12C = player->unk_12C + 15.0f; + player->trueZpos = player->pos.z + player->camDist; + player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; + player->zRotBank = player->zRotBank + 15.0f; - if (player->unk_1D0 != 0) { - player->unk_0E8 += 14.0f; - player->unk_0E4 += 26.0f; + if (player->csState != 0) { + player->rot.y += 14.0f; + player->rot.x += 26.0f; } if (((gGameFrameCount % 2) == 0)) { func_effect_8007D24C(RAND_FLOAT_CENTERED(20.0) + player->pos.x, RAND_FLOAT_CENTERED(20.0) + player->pos.y, - player->unk_138, 2.2f); + player->trueZpos, 2.2f); } - if ((player->pos.y < player->unk_0A4) && (player->unk_1D0 == 0)) { - player->pos.y = player->unk_0A4; - player->timer_220 = 0; + if ((player->pos.y < player->pathFloor) && (player->csState == 0)) { + player->pos.y = player->pathFloor; + player->radioDamageTimer = 0; player->vel.y = 10.0f; - player->unk_1D0 = 1; + player->csState = 1; func_play_800A6070(player->sfxSource, 0x29000000); if (gCurrentLevel == LEVEL_CORNERIA) { func_enmy_80062C38(player->pos.x, player->pos.z); } - if (player->wings.rightState == 2) { + if (player->wings.rightState == WINGSTATE_INTACT) { func_play_800A69F8(1, player->hit1.x, player->hit1.y, player->hit1.z); - player->wings.rightState = 0; + player->wings.rightState = WINGSTATE_NONE; func_effect_8007D0E0(player->hit1.x, player->hit1.y, player->hit1.z, 2.0f); } - if (player->wings.leftState == 2) { + if (player->wings.leftState == WINGSTATE_INTACT) { func_play_800A69F8(0, player->hit2.x, player->hit2.y, player->hit2.z); - player->wings.leftState = 0; + player->wings.leftState = WINGSTATE_NONE; func_effect_8007D0E0(player->hit2.x, player->hit2.y, player->hit2.z, 2.0f); } - } else if ((((player->timer_220 > 0) || (player->pos.y < player->unk_0A4)) || (player->timer_1FC == 0)) && - (player->timer_1F8 == 0)) { - if (player->pos.y < player->unk_0A4) { - func_effect_8007C688(player->pos.x, gGroundHeight + 20.0f, player->unk_138 - (2.0f * player->vel.z), 3.0f, + } else if (((player->radioDamageTimer > 0) || (player->pos.y < player->pathFloor) || (player->csEventTimer == 0)) && + (player->csTimer == 0)) { + if (player->pos.y < player->pathFloor) { + func_effect_8007C688(player->pos.x, gGroundHeight + 20.0f, player->trueZpos - (2.0f * player->vel.z), 3.0f, 800); func_enmy_80062C38(player->pos.x, player->pos.z); } func_effect_8007D0E0(player->pos.x, player->pos.y - (2.0f * player->vel.y), - player->unk_138 - (2.0f * player->vel.z), 6.0f); - func_effect_8007BFFC(player->pos.x, player->pos.y - player->vel.y, player->unk_138 - (2.0f * player->vel.z), + player->trueZpos - (2.0f * player->vel.z), 6.0f); + func_effect_8007BFFC(player->pos.x, player->pos.y - player->vel.y, player->trueZpos - (2.0f * player->vel.z), 0.0f, 0.0f, 0.0f, 3.0f, 20); if (gLevelType == LEVELTYPE_PLANET) { for (i = 0; i < 2; i++) { - func_play_800A69F8(2, player->pos.x, player->pos.y, player->unk_138); + func_play_800A69F8(2, player->pos.x, player->pos.y, player->trueZpos); } for (i = 0; i < 4; i++) { - func_play_800A69F8(4, player->pos.x, player->pos.y, player->unk_138); + func_play_800A69F8(4, player->pos.x, player->pos.y, player->trueZpos); } } Cutscene_KillPlayer(player); @@ -1879,19 +1879,19 @@ void func_demo_8004DEF8(Player* player) { player->camRoll -= 3.0f; - if (player->unk_1D0 != 0) { + if (player->csState != 0) { player->camRoll += 10.0f; } - if ((gGroundSurface == SURFACE_WATER) && (player->pos.y <= player->unk_0A4)) { - func_effect_8007D9DC(player->pos.x, gGroundHeight + 2.0f, player->unk_138, 3.0f, 20.0f, 0); - func_effect_8007ADF4(player->pos.x, gGroundHeight, player->unk_138, 0.1f, 2.0f); + if ((gGroundSurface == SURFACE_WATER) && (player->pos.y <= player->pathFloor)) { + func_effect_8007D9DC(player->pos.x, gGroundHeight + 2.0f, player->trueZpos, 3.0f, 20.0f, 0); + func_effect_8007ADF4(player->pos.x, gGroundHeight, player->trueZpos, 0.1f, 2.0f); } } void Cutscene_PlayerDown(Player* player) { player->flags_228 = 0; - player->unk_280 = 0; + player->barrelRollAlpha = 0; if ((gGameFrameCount % 2) != 0) { gControllerRumbleFlags[gPlayerNum] = 1; @@ -1923,237 +1923,237 @@ void Cutscene_PlayerDown(Player* player) { } } -void func_demo_8004E4D4(Actor* actor) { +void func_demo_8004E4D4(ActorCutscene* this) { Vec3f sp54; Vec3f sp48; Vec3f sp3C; Player* sp38 = gPlayer; f32 sp34; - actor->fwork[7] += 3.0f; - actor->unk_0F4.z = SIN_DEG(actor->fwork[7]) * 1.5f; - actor->fwork[8] += 2.0f; - sp34 = SIN_DEG(actor->fwork[8]) * 10.0f; + this->fwork[7] += 3.0f; + this->unk_0F4.z = SIN_DEG(this->fwork[7]) * 1.5f; + this->fwork[8] += 2.0f; + sp34 = SIN_DEG(this->fwork[8]) * 10.0f; - switch (actor->state) { + switch (this->state) { case 0: - Math_SmoothStepToF(&actor->obj.rot.z, 0.0f, 0.05f, 1.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.pos.x, actor->fwork[0] + sp38->pos.x, 0.03f, 10.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.pos.y, actor->fwork[1] + sp38->pos.y + sp34, 0.03f, 10.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.pos.z, actor->fwork[2] + sp38->unk_138, 0.03f, 10.0f, 0.0f); - actor->obj.rot.x = -sp38->unk_0E4; - actor->obj.rot.y = sp38->unk_0E8 + 180.0f; + Math_SmoothStepToF(&this->obj.rot.z, 0.0f, 0.05f, 1.0f, 0.0f); + Math_SmoothStepToF(&this->obj.pos.x, this->fwork[0] + sp38->pos.x, 0.03f, 10.0f, 0.0f); + Math_SmoothStepToF(&this->obj.pos.y, this->fwork[1] + sp38->pos.y + sp34, 0.03f, 10.0f, 0.0f); + Math_SmoothStepToF(&this->obj.pos.z, this->fwork[2] + sp38->trueZpos, 0.03f, 10.0f, 0.0f); + this->obj.rot.x = -sp38->rot.x; + this->obj.rot.y = sp38->rot.y + 180.0f; break; case 1: - actor->state = 2; - actor->timer_0BC = 50; - actor->fwork[9] = 2.0f; - AUDIO_PLAY_SFX(0x09000002, actor->sfxSource, 0); - actor->fwork[29] = 5.0f; + this->state = 2; + this->timer_0BC = 50; + this->fwork[9] = 2.0f; + AUDIO_PLAY_SFX(0x09000002, this->sfxSource, 0); + this->fwork[29] = 5.0f; /* fallthrough */ case 2: if (gLevelType == LEVELTYPE_PLANET) { - actor->fwork[21] += 0.4f; - if (actor->fwork[21] > 0.6f) { - actor->fwork[21] = 0.6f; + this->fwork[21] += 0.4f; + if (this->fwork[21] > 0.6f) { + this->fwork[21] = 0.6f; } } - actor->iwork[11] = 2; - actor->fwork[9] *= 1.2f; - if (actor->timer_0BC == 0) { - Object_Kill(&actor->obj, actor->sfxSource); + this->iwork[11] = 2; + this->fwork[9] *= 1.2f; + if (this->timer_0BC == 0) { + Object_Kill(&this->obj, this->sfxSource); } break; case 10: - actor->state = 11; - actor->timer_0BC = 150; - actor->timer_0BE = 40; - AUDIO_PLAY_SFX(0x09000002, actor->sfxSource, 0); - actor->fwork[29] = 5.0f; + this->state = 11; + this->timer_0BC = 150; + this->timer_0BE = 40; + AUDIO_PLAY_SFX(0x09000002, this->sfxSource, 0); + this->fwork[29] = 5.0f; /* fallthrough */ case 11: - actor->iwork[11] = 2; - actor->fwork[9] += 2.0f; - if (actor->fwork[9] > 50.0f) { - actor->fwork[9] = 50.0f; + this->iwork[11] = 2; + this->fwork[9] += 2.0f; + if (this->fwork[9] > 50.0f) { + this->fwork[9] = 50.0f; } - if (actor->timer_0BE == 0) { - switch (actor->index) { + if (this->timer_0BE == 0) { + switch (this->index) { case 1: - actor->obj.rot.y += 0.3f; - Math_SmoothStepToF(&actor->obj.rot.z, -70.0f, 0.05f, 4.0f, 0.0f); + this->obj.rot.y += 0.3f; + Math_SmoothStepToF(&this->obj.rot.z, -70.0f, 0.05f, 4.0f, 0.0f); break; case 2: - actor->obj.rot.y -= 0.3f; - Math_SmoothStepToF(&actor->obj.rot.z, 70.0f, 0.05f, 4.0f, 0.0f); + this->obj.rot.y -= 0.3f; + Math_SmoothStepToF(&this->obj.rot.z, 70.0f, 0.05f, 4.0f, 0.0f); break; case 3: - actor->obj.rot.x -= 0.4f; - Math_SmoothStepToF(&actor->obj.rot.z, 1000.0f, 0.05f, 6.0f, 0.0f); + this->obj.rot.x -= 0.4f; + Math_SmoothStepToF(&this->obj.rot.z, 1000.0f, 0.05f, 6.0f, 0.0f); break; } } - if (actor->timer_0BC == 0) { - Object_Kill(&actor->obj, actor->sfxSource); + if (this->timer_0BC == 0) { + Object_Kill(&this->obj, this->sfxSource); } break; case 30: - actor->fwork[3] += D_demo_800CA098[actor->index]; + this->fwork[3] += D_demo_800CA098[this->index]; - Matrix_RotateY(gCalcMatrix, actor->fwork[3] * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, this->fwork[3] * M_DTOR, MTXF_NEW); sp54.x = 0.0f; - sp54.y = D_demo_800CA0A4[actor->index]; - sp54.z = D_demo_800CA0B0[actor->index]; + sp54.y = D_demo_800CA0A4[this->index]; + sp54.z = D_demo_800CA0B0[this->index]; Matrix_MultVec3f(gCalcMatrix, &sp54, &sp3C); - actor->fwork[0] = sp3C.x; - actor->fwork[1] = sp3C.y; - actor->fwork[2] = sp3C.z - 100.0f; + this->fwork[0] = sp3C.x; + this->fwork[1] = sp3C.y; + this->fwork[2] = sp3C.z - 100.0f; - Math_SmoothStepToF(&actor->obj.rot.z, SIN_DEG(actor->fwork[3]) * -30.0f, 0.1f, 2.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.pos.x, actor->fwork[0] + sp38->pos.x, 0.03f, 10.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.pos.y, actor->fwork[1] + sp38->pos.y + sp34, 0.03f, 10.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.pos.z, actor->fwork[2] + sp38->unk_138, 0.03f, 10.0f, 0.0f); + Math_SmoothStepToF(&this->obj.rot.z, SIN_DEG(this->fwork[3]) * -30.0f, 0.1f, 2.0f, 0.0f); + Math_SmoothStepToF(&this->obj.pos.x, this->fwork[0] + sp38->pos.x, 0.03f, 10.0f, 0.0f); + Math_SmoothStepToF(&this->obj.pos.y, this->fwork[1] + sp38->pos.y + sp34, 0.03f, 10.0f, 0.0f); + Math_SmoothStepToF(&this->obj.pos.z, this->fwork[2] + sp38->trueZpos, 0.03f, 10.0f, 0.0f); break; case 31: - AUDIO_PLAY_SFX(0x09000002, actor->sfxSource, 0); - actor->state += 1; - actor->fwork[29] = 5.0f; + AUDIO_PLAY_SFX(0x09000002, this->sfxSource, 0); + this->state += 1; + this->fwork[29] = 5.0f; /* fallthrough */ case 32: - actor->iwork[11] = 2; - Math_SmoothStepToF(&actor->obj.rot.x, -20.0f, 0.1f, 0.5f, 0.0f); - Math_SmoothStepToF(&actor->fwork[9], 25.0f, 0.1f, 2.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.rot.z, 0.0f, 0.1f, 0.5f, 0.0f); + this->iwork[11] = 2; + Math_SmoothStepToF(&this->obj.rot.x, -20.0f, 0.1f, 0.5f, 0.0f); + Math_SmoothStepToF(&this->fwork[9], 25.0f, 0.1f, 2.0f, 0.0f); + Math_SmoothStepToF(&this->obj.rot.z, 0.0f, 0.1f, 0.5f, 0.0f); break; } - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); sp54.x = 0.0f; sp54.y = 0.0f; - sp54.z = actor->fwork[9]; + sp54.z = this->fwork[9]; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48); - actor->vel.x = sp48.x; - actor->vel.y = sp48.y; - actor->vel.z = sp48.z; + this->vel.x = sp48.x; + this->vel.y = sp48.y; + this->vel.z = sp48.z; } -void func_demo_8004EBD0(Actor* actor) { +void func_demo_8004EBD0(ActorCutscene* this) { Vec3f src; Vec3f dest; - if (actor->state < 4) { - actor->fwork[9] = 0.4f; + if (this->state < 4) { + this->fwork[9] = 0.4f; - actor->obj.pos.x += (D_ctx_80178450[actor->index] - actor->obj.pos.x) * 0.4f; - actor->obj.pos.y += (D_ctx_80178460[actor->index] - actor->obj.pos.y) * 0.4f; - actor->obj.pos.z += (D_ctx_80178470[actor->index] - actor->obj.pos.z) * 0.4f; + this->obj.pos.x += (D_ctx_80178450[this->index] - this->obj.pos.x) * 0.4f; + this->obj.pos.y += (D_ctx_80178460[this->index] - this->obj.pos.y) * 0.4f; + this->obj.pos.z += (D_ctx_80178470[this->index] - this->obj.pos.z) * 0.4f; - actor->obj.rot.z *= 0.98f; - actor->obj.rot.x = -gPlayer[0].unk_0E4; - actor->obj.rot.y = gPlayer[0].unk_0E8 + 180.0f; + this->obj.rot.z *= 0.98f; + this->obj.rot.x = -gPlayer[0].rot.x; + this->obj.rot.y = gPlayer[0].rot.y + 180.0f; if (1) {} - actor->fwork[7] += 1.0f; - if ((s32) actor->fwork[7] & 0x40) { - actor->fwork[0] += 0.1f; + this->fwork[7] += 1.0f; + if ((s32) this->fwork[7] & 0x40) { + this->fwork[0] += 0.1f; } else { - actor->fwork[0] -= 0.1f; + this->fwork[0] -= 0.1f; } - actor->fwork[8] += 1.2f; - if ((s32) actor->fwork[8] & 0x40) { - actor->fwork[1] += 0.1f; + this->fwork[8] += 1.2f; + if ((s32) this->fwork[8] & 0x40) { + this->fwork[1] += 0.1f; } else { - actor->fwork[1] -= 0.1f; + this->fwork[1] -= 0.1f; } } - switch (actor->state) { + switch (this->state) { case 0: - actor->fwork[3] *= 0.992f; - if (actor->fwork[3] < 1.2f) { - actor->state += 1; + this->fwork[3] *= 0.992f; + if (this->fwork[3] < 1.2f) { + this->state += 1; } break; case 1: - actor->fwork[3] *= 0.997f; - if (actor->fwork[3] < 1.0f) { - actor->fwork[3] = 1.0f; - actor->state += 1; + this->fwork[3] *= 0.997f; + if (this->fwork[3] < 1.0f) { + this->fwork[3] = 1.0f; + this->state += 1; } - actor->timer_0BC = 560; + this->timer_0BC = 560; break; case 2: - if (actor->timer_0BC == 110) { - gPlayer[0].timer_1F8 = 10000; + if (this->timer_0BC == 110) { + gPlayer[0].csTimer = 10000; } - if (actor->timer_0BC == 260) { - gPlayer[0].timer_1FC = 10000; + if (this->timer_0BC == 260) { + gPlayer[0].csEventTimer = 10000; } - if (actor->timer_0BC == 0) { - actor->state++; - actor->timer_0BC = 10; - func_play_800A6028(actor->sfxSource, 0x09000002); - actor->fwork[29] = 5.0f; + if (this->timer_0BC == 0) { + this->state++; + this->timer_0BC = 10; + func_play_800A6028(this->sfxSource, 0x09000002); + this->fwork[29] = 5.0f; } break; case 3: - actor->iwork[11] = 2; - if (actor->timer_0BC == 0) { - actor->state++; - actor->timer_0BC = 30; + this->iwork[11] = 2; + if (this->timer_0BC == 0) { + this->state++; + this->timer_0BC = 30; } break; case 4: - actor->fwork[21] += 0.4f; - if (actor->fwork[21] > 0.6f) { - actor->fwork[21] = 0.6f; + this->fwork[21] += 0.4f; + if (this->fwork[21] > 0.6f) { + this->fwork[21] = 0.6f; } - actor->fwork[6] += 1.0f; + this->fwork[6] += 1.0f; - Matrix_RotateY(gCalcMatrix, (gPlayer[0].unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(gPlayer[0].unk_0E4 * M_DTOR), MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, -((gPlayer[0].unk_0F8 + gPlayer[0].unk_0F0) * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (gPlayer[0].rot.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(gPlayer[0].rot.x * M_DTOR), MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -((gPlayer[0].bankAngle + gPlayer[0].rockAngle) * M_DTOR), MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; - src.z = actor->fwork[6] * actor->fwork[6]; + src.z = this->fwork[6] * this->fwork[6]; Matrix_MultVec3f(gCalcMatrix, &src, &dest); - actor->vel.x = dest.x; - actor->vel.y = dest.y; - actor->vel.z = dest.z; + this->vel.x = dest.x; + this->vel.y = dest.y; + this->vel.z = dest.z; - if (actor->timer_0BC == 0) { - func_effect_80078E50(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 30.0f); - Object_Kill(&actor->obj, actor->sfxSource); + if (this->timer_0BC == 0) { + func_effect_80078E50(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 30.0f); + Object_Kill(&this->obj, this->sfxSource); } break; } - actor->obj.pos.y += 5.0f; - actor->fwork[21] -= 0.02f; - if (actor->fwork[21] < 0.0f) { - actor->fwork[21] = 0.0f; + this->obj.pos.y += 5.0f; + this->fwork[21] -= 0.02f; + if (this->fwork[21] < 0.0f) { + this->fwork[21] = 0.0f; } } @@ -2333,17 +2333,17 @@ void func_demo_8004F798(Actor* actor) { case 1: actor->fwork[29] = 10.0f; actor->vel.z -= 100.0f; - if ((actor->obj.pos.z + D_ctx_80177D20) < -15000.0f) { + if ((actor->obj.pos.z + gPathProgress) < -15000.0f) { Object_Kill(&actor->obj, actor->sfxSource); } break; } } -void Actor195_Update(Actor* actor) { +void ActorCutscene_Update(ActorCutscene* this) { if (gCurrentLevel == LEVEL_AQUAS) { - func_hud_80093164(actor); + func_hud_80093164(this); return; } @@ -2351,77 +2351,77 @@ void Actor195_Update(Actor* actor) { case PLAYERSTATE_1C8_LEVEL_COMPLETE: switch (gCurrentLevel) { case LEVEL_SECTOR_Y: - if (gPlayer[0].unk_1D0 >= 3) { - SectorY_8019FF00(actor); + if (gPlayer[0].csState >= 3) { + SectorY_8019FF00(this); } break; case LEVEL_SOLAR: - if (gPlayer[0].unk_1D0 >= 3) { - Solar_801A8BE8(actor); + if (gPlayer[0].csState >= 3) { + Solar_801A8BE8(this); } break; case LEVEL_ZONESS: - if (gPlayer[0].unk_1D0 >= 3) { - Zoness_8019E5F0(actor); + if (gPlayer[0].csState >= 3) { + Zoness_8019E5F0(this); } break; case LEVEL_VENOM_ANDROSS: case LEVEL_VENOM_2: - Andross_80195E44(actor); + Andross_80195E44(this); break; case LEVEL_KATINA: - Katina_80197F10(actor); + Katina_80197F10(this); break; case LEVEL_SECTOR_Z: - SectorZ_8019DD20(actor); + SectorZ_8019DD20(this); break; case LEVEL_AREA_6: - Area6_8018DA58(actor); + Area6_8018DA58(this); break; case LEVEL_METEO: if (gLevelPhase == 0) { - Meteo_8018ED9C(actor); + Meteo_8018ED9C(this); break; } - func_demo_80049630(actor); + func_demo_80049630(this); break; case LEVEL_FORTUNA: - if (actor->unk_0B6 == 11) { - switch (actor->state) { + if (this->unk_0B6 == 11) { + switch (this->state) { case 0: if (gCsFrameCount == 100) { - actor->state = 1; - actor->timer_0BC = 50; - actor->iwork[0] = 255; - AUDIO_PLAY_SFX(0x2902F026, actor->sfxSource, 0); + this->state = 1; + this->timer_0BC = 50; + this->iwork[0] = 255; + AUDIO_PLAY_SFX(0x2902F026, this->sfxSource, 0); } break; case 1: - Math_SmoothStepToF(&actor->scale, 0.5f, 0.03f, 0.01f, 0.0f); + Math_SmoothStepToF(&this->scale, 0.5f, 0.03f, 0.01f, 0.0f); gFillScreenRed = gFillScreenAlpha = gFillScreenGreen = gFillScreenBlue = 0; - if ((actor->timer_0BC == 43) || (actor->timer_0BC == 46) || (actor->timer_0BC == 49)) { + if ((this->timer_0BC == 43) || (this->timer_0BC == 46) || (this->timer_0BC == 49)) { gFillScreenAlpha = 192; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; } - actor->iwork[0] -= 2; - if (actor->iwork[0] < 0) { - actor->iwork[0] = 0; - actor->scale = 0.0f; + this->iwork[0] -= 2; + if (this->iwork[0] < 0) { + this->iwork[0] = 0; + this->scale = 0.0f; } - gLight3Brightness = actor->iwork[0] / 255.0f; + gLight3Brightness = this->iwork[0] / 255.0f; gLight3x = gActors[0].obj.pos.x + 10.0f; gLight3y = gActors[0].obj.pos.y - 40.0f; gLight3z = gActors[0].obj.pos.z - 70.0f; @@ -2435,51 +2435,51 @@ void Actor195_Update(Actor* actor) { case LEVEL_CORNERIA: if (gLevelMode == LEVELMODE_ALL_RANGE) { - func_demo_8004E4D4(actor); + func_demo_8004E4D4(this); break; } - func_demo_8004EBD0(actor); + func_demo_8004EBD0(this); break; case LEVEL_SECTOR_X: if (gLevelPhase != 0) { - func_demo_80049630(actor); + func_demo_80049630(this); break; } - func_demo_8004E4D4(actor); + func_demo_8004E4D4(this); break; case LEVEL_TITANIA: - func_demo_8004E4D4(actor); + func_demo_8004E4D4(this); break; case LEVEL_MACBETH: - Macbeth_801B28BC(actor); + Macbeth_801B28BC(this); break; case LEVEL_BOLSE: - func_demo_8004F05C(actor); + func_demo_8004F05C(this); break; default: - func_demo_8004EBD0(actor); + func_demo_8004EBD0(this); break; } break; case PLAYERSTATE_1C8_LEVEL_INTRO: - func_demo_8004F05C(actor); + func_demo_8004F05C(this); break; case PLAYERSTATE_1C8_ENTER_WARP_ZONE: - func_demo_8004F798(actor); + func_demo_8004F798(this); break; case PLAYERSTATE_1C8_STANDBY: if (gCurrentLevel == LEVEL_SECTOR_Y) { - SectorY_8019FF00(actor); + SectorY_8019FF00(this); } break; } @@ -2517,7 +2517,7 @@ void func_demo_8004FCB8(Actor* actor, s32 arg1) { } } -void Actor195_Draw(Actor* actor) { +void ActorCutscene_Draw(Actor* actor) { static f32 D_800CA210 = 0.0f; static f32 D_800CA214 = 0.0f; static f32 D_800CA218 = 0.0f; @@ -2798,7 +2798,7 @@ void Actor195_Draw(Actor* actor) { camX = gPlayer[0].cam.eye.x - actor->obj.pos.x; camY = gPlayer[0].cam.eye.y - actor->obj.pos.y; - camZ = gPlayer[0].cam.eye.z - (actor->obj.pos.z + D_ctx_80177D20); + camZ = gPlayer[0].cam.eye.z - (actor->obj.pos.z + gPathProgress); y = -Math_Atan2F(camX, camZ); x = Math_Atan2F(camY, sqrtf(SQ(camZ) + SQ(camX))); @@ -2830,7 +2830,7 @@ void Actor195_Draw(Actor* actor) { camX = gPlayer[0].cam.eye.x - actor->obj.pos.x; camY = gPlayer[0].cam.eye.y - actor->obj.pos.y; - camZ = gPlayer[0].cam.eye.z - (actor->obj.pos.z + D_ctx_80177D20); + camZ = gPlayer[0].cam.eye.z - (actor->obj.pos.z + gPathProgress); y = -Math_Atan2F(camX, camZ); x = Math_Atan2F(camY, sqrtf(SQ(camZ) + SQ(camX))); @@ -2977,12 +2977,12 @@ void Cutscene_DrawGreatFox(void) { Matrix_Pop(&gGfxMatrix); } - if ((gCurrentLevel == LEVEL_METEO) && (gPlayer[0].timer_1FC != 0)) { + if ((gCurrentLevel == LEVEL_METEO) && (gPlayer[0].csEventTimer != 0)) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 128); gDPSetEnvColor(gMasterDisp++, 255, 255, 32, 128); Matrix_Translate(gGfxMatrix, D_ctx_80177A48[3] * (-74.0f), -232.0f, 1190.0f, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, D_demo_800CA198[gPlayer[0].timer_1FC], D_demo_800CA198[gPlayer[0].timer_1FC], 1.0f, - MTXF_APPLY); + Matrix_Scale(gGfxMatrix, D_demo_800CA198[gPlayer[0].csEventTimer], D_demo_800CA198[gPlayer[0].csEventTimer], + 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, var_fp); } diff --git a/src/engine/fox_display.c b/src/engine/fox_display.c index dfa8e507..911bea25 100644 --- a/src/engine/fox_display.c +++ b/src/engine/fox_display.c @@ -12,7 +12,7 @@ s16 gReflectY; Matrix D_display_80161418[4]; Vec3f D_display_80161518[4]; Vec3f D_display_80161548[4]; -Vec3f D_display_80161578[4]; +Vec3f gLockOnTargetViewPos[4]; f32 D_display_801615A8[4]; f32 D_display_801615B8[4]; @@ -53,7 +53,7 @@ void func_display_80051B30(void) { Matrix_RotateX(gCalcMatrix, gPlayer[0].camPitch, MTXF_APPLY); 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; + sp68.z = gTeamHelpActor->obj.pos.z + gPathProgress - 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))) { @@ -233,11 +233,11 @@ void func_display_8005250C(s32 limbIndex, Vec3f* rot, void* data) { void func_display_80052584(Player* player) { Matrix_Push(&gGfxMatrix); Matrix_Copy(gGfxMatrix, &gIdentityMatrix); - if ((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (player->timer_1F8 != 0)) { + if ((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (player->csTimer != 0)) { Matrix_Translate(gGfxMatrix, D_display_801613B0[player->num].x, D_display_801613B0[player->num].y, D_display_801613B0[player->num].z, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, D_display_800CA23C[player->timer_1F8 - 1], D_display_800CA23C[player->timer_1F8 - 1], - D_display_800CA23C[player->timer_1F8 - 1], MTXF_APPLY); + Matrix_Scale(gGfxMatrix, D_display_800CA23C[player->csTimer - 1], D_display_800CA23C[player->csTimer - 1], + D_display_800CA23C[player->csTimer - 1], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL_40(); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); @@ -617,7 +617,7 @@ void func_display_80053C38(Player* player, s32 arg1) { Matrix_MultVec3f(gGfxMatrix, &sp4C, &D_display_801613E0[1]); } if (player->cockpitView && (gLevelMode == LEVELMODE_ON_RAILS) && - (fabsf(player->unk_138 + D_ctx_80177D20 - player->cam.eye.z) < 10.0f)) { + (fabsf(player->trueZpos + gPathProgress - player->cam.eye.z) < 10.0f)) { if (arg1 == 0) { sDrawCockpit = 1; Matrix_Push(&gGfxMatrix); @@ -711,10 +711,10 @@ void func_display_80054300(Player* player) { Math_SmoothStepToF(&sPlayerShadowing, player->shadowing, 1.0f, 10.0f, 0.0f); RCP_SetupDL(&gMasterDisp, 0x42); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, (s32) sPlayerShadowing); - if (player->unk_068 > 30.0f) { + if (player->groundPos.y > 30.0f) { gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); } - if ((gGroundSurface == SURFACE_WATER) && (player->unk_068 < 10.0f)) { + if ((gGroundSurface == SURFACE_WATER) && (player->groundPos.y < 10.0f)) { player->shadowing = 90; } else { player->shadowing = 180; @@ -782,7 +782,7 @@ void func_display_8005478C(Player* player) { RCP_SetupDL_64(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 100); Matrix_Push(&gGfxMatrix); - Matrix_RotateZ(gGfxMatrix, player->unk_0F8 * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, player->bankAngle * M_DTOR, MTXF_APPLY); if (player->form == FORM_LANDMASTER) { if (player->unk_194 <= 0.0f) { Matrix_Pop(&gGfxMatrix); @@ -807,23 +807,26 @@ void func_display_80054914(Player* player) { Vec3f sp40; Vec3f sp34; - if (player->unk_280 != 0) { - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + player->unk_134 + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_134 + player->unk_4D8) * M_DTOR), + if (player->barrelRollAlpha != 0) { + Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + player->damageShake + 180.0f) * M_DTOR, + MTXF_NEW); + Matrix_RotateX(gCalcMatrix, + -((player->xRot_120 + player->rot.x + player->damageShake + player->aerobaticPitch) * M_DTOR), MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, -((player->unk_0F8 + player->unk_0F0 + player->unk_134) * M_DTOR), MTXF_APPLY); - Matrix_Translate(gCalcMatrix, player->unk_084, player->unk_080, 0.0f, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -((player->bankAngle + player->rockAngle + player->damageShake) * M_DTOR), + MTXF_APPLY); + Matrix_Translate(gCalcMatrix, player->xShake, player->yBob, 0.0f, MTXF_APPLY); sp40.x = 0.0f; sp40.y = 0.0f; sp40.z = -30.0f; Matrix_MultVec3f(gCalcMatrix, &sp40, &sp34); sp4C = 1.0f; - if (player->unk_1F0 < 0) { + if (player->baseRollRate < 0) { sp4C = -1.0f; } Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, player->pos.x + sp34.x, player->pos.y + sp34.y, - player->unk_138 + player->unk_144 + sp34.z, MTXF_APPLY); + player->trueZpos + player->zPath + sp34.z, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].camPitch, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 20.0f * sp4C * M_DTOR, MTXF_APPLY); @@ -832,13 +835,13 @@ void func_display_80054914(Player* player) { } else { Matrix_Scale(gGfxMatrix, 1.2f, 1.2f, 1.2f, MTXF_APPLY); } - if (player->unk_1F0 < 0) { + if (player->baseRollRate < 0) { Matrix_RotateX(gGfxMatrix, M_PI, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL(&gMasterDisp, 0x43); - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, player->unk_280); - gDPSetEnvColor(gMasterDisp++, 0, 0, 160, player->unk_280); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, player->barrelRollAlpha); + gDPSetEnvColor(gMasterDisp++, 0, 0, 160, player->barrelRollAlpha); gSPDisplayList(gMasterDisp++, D_101DC10); Matrix_Pop(&gGfxMatrix); } @@ -929,7 +932,7 @@ void func_display_80054E80(Player* player) { gSPDisplayList(gMasterDisp++, D_1024AC0); Matrix_Pop(&gGfxMatrix); } - if (D_ctx_80177AA0[player->num] > 0.1f) { + if (gMuzzleFlashScale[player->num] > 0.1f) { Matrix_Push(&gGfxMatrix); RCP_SetupDL(&gMasterDisp, 0x43); Matrix_Copy(gCalcMatrix, &D_display_80161418[player->num]); @@ -948,7 +951,8 @@ void func_display_80054E80(Player* player) { } Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, sp94.x, sp94.y, sp94.z, MTXF_NEW); - Matrix_Scale(gGfxMatrix, D_ctx_80177AA0[player->num], D_ctx_80177AA0[player->num], 1.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, gMuzzleFlashScale[player->num], gMuzzleFlashScale[player->num], 1.0f, + MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); Matrix_Pop(&gGfxMatrix); @@ -966,13 +970,15 @@ void func_display_80054E80(Player* player) { Matrix_MultVec3f(gCalcMatrix, &spA0, &sp88); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, sp94.x, sp94.y, sp94.z, MTXF_NEW); - Matrix_Scale(gGfxMatrix, D_ctx_80177AA0[player->num], D_ctx_80177AA0[player->num], 1.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, gMuzzleFlashScale[player->num], gMuzzleFlashScale[player->num], 1.0f, + MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, sp88.x, sp88.y, sp88.z, MTXF_NEW); - Matrix_Scale(gGfxMatrix, D_ctx_80177AA0[player->num], D_ctx_80177AA0[player->num], 1.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, gMuzzleFlashScale[player->num], gMuzzleFlashScale[player->num], 1.0f, + MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); Matrix_Pop(&gGfxMatrix); @@ -1042,14 +1048,15 @@ void func_display_80055B58(Player* player) { if ((player->unk_234 != 0) && (player->state_1C8 != PLAYERSTATE_1C8_DOWN)) { switch (player->form) { case FORM_ARWING: - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + player->unk_134 + 180.0f) * M_DTOR, + Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + player->damageShake + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, - -((player->unk_120 + player->unk_0E4 + player->unk_134 + player->unk_4D8) * M_DTOR), + Matrix_RotateX( + gCalcMatrix, + -((player->xRot_120 + player->rot.x + player->damageShake + player->aerobaticPitch) * M_DTOR), + MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -((player->bankAngle + player->rockAngle + player->damageShake) * M_DTOR), MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, -((player->unk_0F8 + player->unk_0F0 + player->unk_134) * M_DTOR), - MTXF_APPLY); - Matrix_Translate(gCalcMatrix, player->unk_084, player->unk_080, 0.0f, MTXF_APPLY); + Matrix_Translate(gCalcMatrix, player->xShake, player->yBob, 0.0f, MTXF_APPLY); var_fv0 = player->unk_194 * 30.0f; if (var_fv0 > 30.0f) { var_fv0 = 30.0f; @@ -1062,7 +1069,7 @@ void func_display_80055B58(Player* player) { Matrix_MultVec3f(gCalcMatrix, &sp4C, &sp40); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, player->pos.x + sp40.x, player->pos.y + sp40.y, - player->unk_138 + player->unk_144 + sp40.z, MTXF_APPLY); + player->trueZpos + player->zPath + sp40.z, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].camPitch, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -1102,17 +1109,17 @@ void func_display_80055E98(Player* player) { sp5C = 108.0f; sp58 = -22.0f; } - if (player->unk_25C != 0.0f) { + if (player->contrailScale != 0.0f) { sp54 = 0.0f; if ((gGameFrameCount % 2) != 0) { sp54 = 180.0f; } - var_fs0 = player->unk_0E8; + var_fs0 = player->rot.y; if (var_fs0 > 90.0f) { var_fs0 -= 180.0f; } var_fs0 = var_fs0 * 0.25f; - sp50 = player->unk_0E4 * 0.25f; + sp50 = player->rot.x * 0.25f; if (player->state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) { var_fs0 = 0.0f; sp50 = 0.0f; @@ -1124,7 +1131,7 @@ void func_display_80055E98(Player* player) { Matrix_Translate(gGfxMatrix, sp5C, sp58, -100.0f, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_DTOR * sp50, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, -(M_DTOR * var_fs0), MTXF_APPLY); - Matrix_Scale(gGfxMatrix, player->unk_25C, 1.0f, 50.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, player->contrailScale, 1.0f, 50.0f, MTXF_APPLY); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -17.5f, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, M_DTOR * sp54, MTXF_APPLY); @@ -1137,7 +1144,7 @@ void func_display_80055E98(Player* player) { Matrix_Translate(gGfxMatrix, -sp5C, sp58, -100.0f, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_DTOR * sp50, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, -(M_DTOR * var_fs0), MTXF_APPLY); - Matrix_Scale(gGfxMatrix, player->unk_25C, 1.0f, 50.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, player->contrailScale, 1.0f, 50.0f, MTXF_APPLY); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -17.5f, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, M_DTOR * sp54, MTXF_APPLY); @@ -1152,11 +1159,12 @@ void func_display_80056230(Player* player) { if ((player->unk_234 != 0) && (player->form == FORM_ARWING) && (gCurrentLevel != LEVEL_VENOM_ANDROSS) && (gCurrentLevel != LEVEL_TRAINING) && (gLevelType == LEVELTYPE_PLANET)) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, player->pos.x, player->pos.y, player->unk_138 + player->unk_144, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, -((player->unk_0F8 + player->unk_0F0 + player->unk_134) * M_DTOR), MTXF_APPLY); - Matrix_Translate(gGfxMatrix, player->unk_084, player->unk_080, 0.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, player->pos.x, player->pos.y, player->trueZpos + player->zPath, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, (player->yRot_114 + player->rot.y + 180.0f) * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -((player->xRot_120 + player->rot.x + player->aerobaticPitch) * M_DTOR), MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, -((player->bankAngle + player->rockAngle + player->damageShake) * M_DTOR), + MTXF_APPLY); + Matrix_Translate(gGfxMatrix, player->xShake, player->yBob, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); func_display_80055E98(player); Matrix_Pop(&gGfxMatrix); @@ -1193,19 +1201,19 @@ void func_display_800564C0(Player* player, s32 arg1) { if (player->unk_234 != 0) { Matrix_Push(&gGfxMatrix); if (player->form == FORM_LANDMASTER) { - if (player->unk_1D4 != 0) { + if (player->grounded) { Matrix_Translate(gGfxMatrix, 0.0f, gCameraShakeY, 0.0f, MTXF_APPLY); } Matrix_Translate(gGfxMatrix, player->pos.x, player->pos.y + player->unk_18C + 30.0f, - player->unk_138 + player->unk_144, MTXF_APPLY); + player->trueZpos + player->zPath, MTXF_APPLY); if (gVersusMode) { for (i = 0; i < gCamCount; i++) { if (gVsLockOnTimers[player->num][i] != 0) { - Matrix_MultVec3f(gGfxMatrix, &sp50, &D_display_80161578[i]); + Matrix_MultVec3f(gGfxMatrix, &sp50, &gLockOnTargetViewPos[i]); if ((i == gPlayerNum) && - ((D_display_80161578[i].z > 300.0f) || (D_display_80161578[i].z < -8000.0f) || - (fabsf(D_display_80161578[i].x) > (fabsf(D_display_80161578[i].z * 0.5f) + 100.0f)) || - (fabsf(D_display_80161578[i].y)) > (fabsf(D_display_80161578[i].z * 0.5f) + 100.0f))) { + ((gLockOnTargetViewPos[i].z > 300.0f) || (gLockOnTargetViewPos[i].z < -8000.0f) || + (fabsf(gLockOnTargetViewPos[i].x) > (fabsf(gLockOnTargetViewPos[i].z * 0.5f) + 100.0f)) || + (fabsf(gLockOnTargetViewPos[i].y)) > (fabsf(gLockOnTargetViewPos[i].z * 0.5f) + 100.0f))) { gVsLockOnTimers[player->num][i] = 0; } @@ -1216,18 +1224,18 @@ void func_display_800564C0(Player* player, s32 arg1) { Matrix_Pop(&gGfxMatrix); return; } - Matrix_RotateX(gGfxMatrix, (player->unk_0E4 + player->unk_134) * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, (player->unk_0EC + player->unk_0F0 + player->unk_134) * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, (player->rot.x + player->damageShake) * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, (player->rot.z + player->rockAngle + player->damageShake) * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, (player->yRot_114 + player->rot.y + 180.0f) * M_DTOR, MTXF_APPLY); if (gVersusMode) { Matrix_RotateX(gGfxMatrix, player->unk_000 * M_DTOR, MTXF_APPLY); } - Matrix_RotateZ(gGfxMatrix, (-player->unk_12C - player->unk_130) * M_DTOR, MTXF_APPLY); - Matrix_Translate(gGfxMatrix, player->unk_084, player->unk_080 - 30.0f, 0.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, (-player->zRotBank - player->zRotBarrelRoll) * M_DTOR, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, player->xShake, player->yBob - 30.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); } else if (player->form == FORM_ON_FOOT) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, player->pos.x, player->pos.y, player->unk_138 + player->unk_144, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, player->pos.x, player->pos.y, player->trueZpos + player->zPath, MTXF_APPLY); if (!func_display_800563B4(player->num, arg1)) { Matrix_Pop(&gGfxMatrix); Matrix_Pop(&gGfxMatrix); @@ -1235,22 +1243,24 @@ void func_display_800564C0(Player* player, s32 arg1) { } Matrix_Pop(&gGfxMatrix); Matrix_Translate(gCalcMatrix, player->pos.x, player->pos.y + gCameraShakeY, - player->unk_138 + player->unk_144, MTXF_NEW); - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + player->unk_134 + 180.0f) * M_DTOR, + player->trueZpos + player->zPath, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + player->damageShake + 180.0f) * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_134) * M_DTOR), MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, -((player->unk_0F8 + player->unk_0F0 + player->unk_134) * M_DTOR), MTXF_APPLY); - Matrix_Translate(gCalcMatrix, player->unk_084, player->unk_080, 0.0f, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, -((player->xRot_120 + player->rot.x + player->damageShake) * M_DTOR), + MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -((player->bankAngle + player->rockAngle + player->damageShake) * M_DTOR), + MTXF_APPLY); + Matrix_Translate(gCalcMatrix, player->xShake, player->yBob, 0.0f, MTXF_APPLY); } else { - Matrix_Translate(gGfxMatrix, player->pos.x, player->pos.y, player->unk_138 + player->unk_144, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, player->pos.x, player->pos.y, player->trueZpos + player->zPath, MTXF_APPLY); if (gVersusMode) { for (i = 0; i < gCamCount; i++) { if (gVsLockOnTimers[player->num][i] != 0) { - Matrix_MultVec3f(gGfxMatrix, &sp50, &D_display_80161578[i]); + Matrix_MultVec3f(gGfxMatrix, &sp50, &gLockOnTargetViewPos[i]); if ((i == gPlayerNum) && - ((D_display_80161578[i].z > 300.0f) || (D_display_80161578[i].z < -8000.0f) || - (fabsf(D_display_80161578[i].x) > (fabsf(D_display_80161578[i].z * 0.5f) + 100.0f)) || - (fabsf(D_display_80161578[i].y) > (fabsf(D_display_80161578[i].z * 0.5f) + 100.0f)))) { + ((gLockOnTargetViewPos[i].z > 300.0f) || (gLockOnTargetViewPos[i].z < -8000.0f) || + (fabsf(gLockOnTargetViewPos[i].x) > (fabsf(gLockOnTargetViewPos[i].z * 0.5f) + 100.0f)) || + (fabsf(gLockOnTargetViewPos[i].y) > (fabsf(gLockOnTargetViewPos[i].z * 0.5f) + 100.0f)))) { gVsLockOnTimers[player->num][i] = 0; } @@ -1261,13 +1271,15 @@ void func_display_800564C0(Player* player, s32 arg1) { Matrix_Pop(&gGfxMatrix); return; } - Matrix_RotateY(gGfxMatrix, (player->unk_114 + player->unk_0E8 + player->unk_134 + 180.0f) * M_DTOR, + Matrix_RotateY(gGfxMatrix, (player->yRot_114 + player->rot.y + player->damageShake + 180.0f) * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, - -((player->unk_120 + player->unk_0E4 + player->unk_4D8 + player->unk_134) * M_DTOR), + Matrix_RotateX( + gGfxMatrix, + -((player->xRot_120 + player->rot.x + player->aerobaticPitch + player->damageShake) * M_DTOR), + MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, -((player->bankAngle + player->rockAngle + player->damageShake) * M_DTOR), MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, -((player->unk_0F8 + player->unk_0F0 + player->unk_134) * M_DTOR), MTXF_APPLY); - Matrix_Translate(gGfxMatrix, player->unk_084, player->unk_080, 0.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, player->xShake, player->yBob, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); } switch (player->unk_200) { @@ -1293,7 +1305,7 @@ void func_display_800564C0(Player* player, s32 arg1) { break; } if (arg1 != 0) { - func_edisplay_800596C0(); + Object_ApplyWaterDistortion(); } else { Matrix_Copy(&D_display_80161418[player->num], gGfxMatrix); } @@ -1322,41 +1334,45 @@ void func_display_80056E2C(Player* player) { if ((player->unk_234 != 0) && (player->unk_240 == 0)) { sp34 = D_display_800CA334[gGameFrameCount % 8U]; sp30 = D_display_800CA334[(gGameFrameCount + 4) % 8U]; - if (player->unk_1D4 != 0) { + if (player->grounded) { sp34 = sp30 = 0.0f; } Matrix_Push(&gGfxMatrix); if (gLevelMode == LEVELMODE_ALL_RANGE) { if (player->form == FORM_ON_FOOT) { - Matrix_Translate(gGfxMatrix, player->unk_064, player->unk_068 + 2.0f, player->unk_06C, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, player->groundPos.x, player->groundPos.y + 2.0f, player->groundPos.z, + MTXF_APPLY); } else { - Matrix_Translate(gGfxMatrix, player->unk_064, player->unk_068 + 2.0f, player->unk_06C, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, player->groundPos.x, player->groundPos.y + 2.0f, player->groundPos.z, + MTXF_APPLY); } } else { - Matrix_Translate(gGfxMatrix, player->unk_064, player->unk_068 + 2.0f, player->unk_06C + player->unk_144, - MTXF_APPLY); + Matrix_Translate(gGfxMatrix, player->groundPos.x, player->groundPos.y + 2.0f, + player->groundPos.z + player->zPath, MTXF_APPLY); } - Matrix_RotateY(gGfxMatrix, player->unk_070, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, player->groundRotY, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, player->unk_248, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, player->unk_24C, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.8f + sp34, 0.0f, 0.8f + sp30, MTXF_APPLY); if ((player->form == FORM_ARWING) || (player->form == FORM_BLUE_MARINE) || (player->form == FORM_ON_FOOT)) { - sp2C = player->unk_0F8 + player->unk_0F0 + player->unk_134; + sp2C = player->bankAngle + player->rockAngle + player->damageShake; if (((sp2C > 70.0f) && (sp2C < 110.0f)) || ((sp2C < -70.0f) && (sp2C > -110.0f))) { sp2C = 70.0f; } - Matrix_RotateY(gGfxMatrix, -player->unk_070, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, (player->unk_114 + player->unk_0E8 + player->unk_134) * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, - -((player->unk_120 + player->unk_0E4 + player->unk_4D8 + player->unk_134) * M_DTOR), - MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, -player->groundRotY, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, (player->yRot_114 + player->rot.y + player->damageShake) * M_DTOR, MTXF_APPLY); + Matrix_RotateX( + gGfxMatrix, + -((player->xRot_120 + player->rot.x + player->aerobaticPitch + player->damageShake) * M_DTOR), + MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, M_DTOR * sp2C, MTXF_APPLY); } else { - Matrix_RotateY(gGfxMatrix, player->unk_114 * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, (player->unk_0E4 + player->unk_4D8 + player->unk_134) * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, (player->unk_0EC + player->unk_0F0 + player->unk_134) * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, player->unk_0E8 * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, (-player->unk_12C - player->unk_130) * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, player->yRot_114 * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, (player->rot.x + player->aerobaticPitch + player->damageShake) * M_DTOR, + MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, (player->rot.z + player->rockAngle + player->damageShake) * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, player->rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, (-player->zRotBank - player->zRotBarrelRoll) * M_DTOR, MTXF_APPLY); } func_display_80054300(player); Matrix_Pop(&gGfxMatrix); @@ -1407,8 +1423,8 @@ void func_display_80057504(void) { f32 var_fs0; for (i = 0; i < gCamCount; i++) { - if (D_display_80161578[i].z < 0.0f) { - var_fs0 = (VEC3F_MAG(&D_display_80161578[i])); + if (gLockOnTargetViewPos[i].z < 0.0f) { + var_fs0 = (VEC3F_MAG(&gLockOnTargetViewPos[i])); if (var_fs0 < 20000.0f) { var_fs0 *= 0.0015f; if (var_fs0 > 100.0f) { @@ -1418,8 +1434,8 @@ void func_display_80057504(void) { var_fs0 = 1.2f; } Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_display_80161578[i].x, D_display_80161578[i].y, D_display_80161578[i].z, - MTXF_APPLY); + Matrix_Translate(gGfxMatrix, gLockOnTargetViewPos[i].x, gLockOnTargetViewPos[i].y, + gLockOnTargetViewPos[i].z, MTXF_APPLY); if ((gPlayState != PLAY_PAUSE) && (i == gPlayerNum)) { Math_SmoothStepToF(&D_display_801615A8[i], 0.0f, 0.5f, 20.0f, 0); Math_SmoothStepToF(&D_display_801615B8[i], 1.0, 0.5f, 0.2f, 0); @@ -1438,8 +1454,8 @@ void func_display_80057504(void) { } for (j = 0; j < gCamCount; j++) { - D_display_80161578[j].x = D_display_80161578[j].y = 0.f; - D_display_80161578[j].z = 100.0f; + gLockOnTargetViewPos[j].x = gLockOnTargetViewPos[j].y = 0.f; + gLockOnTargetViewPos[j].z = 100.0f; } } @@ -1449,7 +1465,7 @@ void func_display_80057814(Player* player) { sp20.x = player->pos.x; sp20.y = player->pos.y; - sp20.z = player->unk_138; + sp20.z = player->trueZpos; sp2C.x = player->sfxSource[0]; sp2C.y = player->sfxSource[1]; sp2C.z = player->sfxSource[2]; @@ -1460,7 +1476,7 @@ void func_display_80057814(Player* player) { player->sfx.srcVel = player->sfxVel; player->sfx.srcPos = player->sfxSource; player->sfx.yVel = player->vel.y; - player->sfx.zRot = player->unk_0F8; + player->sfx.zRot = player->bankAngle; } void func_display_800578C4(Player* player) { @@ -1483,14 +1499,14 @@ void func_display_800578C4(Player* player) { case 1: case 2: case 3: - sp38 = Math_RadToDeg(player->camPitch) + player->unk_0E4; + sp38 = Math_RadToDeg(player->camPitch) + player->rot.x; if (sp38 > 360.0f) { sp38 -= 360.0f; } if (sp38 < 0.0f) { sp38 += 360.0f; } - sp3C = (Math_RadToDeg(player->camYaw) + 180.0f) - player->unk_0E8; + sp3C = (Math_RadToDeg(player->camYaw) + 180.0f) - player->rot.y; if (sp3C > 360.0f) { sp3C -= 360.0f; } @@ -1504,15 +1520,15 @@ void func_display_800578C4(Player* player) { Math_SmoothStepToF(&D_display_800CA384, gControllerPress->stick_x * 3.0f, 0.1f, 5.0f, 0.0f); Math_SmoothStepToF(&D_display_800CA388, D_display_800CA38C[D_display_800CA220], 0.1f, 10.0f, 0.0f); sp4C.z = D_display_800CA388; - Matrix_RotateX(gCalcMatrix, (player->unk_0E8 + D_display_800CA380) * M_DTOR, MTXF_NEW); - Matrix_RotateY(gCalcMatrix, (player->unk_0E4 + D_display_800CA384) * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, (player->rot.y + D_display_800CA380) * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, (player->rot.x + D_display_800CA384) * M_DTOR, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &sp4C, &sp40); gPlayerCamEye.x = player->pos.x + sp40.x; gPlayerCamEye.y = player->pos.y + sp40.y + 20.0f; - gPlayerCamEye.z = player->unk_138 + sp40.z; + gPlayerCamEye.z = player->trueZpos + sp40.z; gPlayerCamAt.x = (SIN_DEG(gGameFrameCount * 3.0f) * 3.0f) + player->pos.x; gPlayerCamAt.y = (COS_DEG(gGameFrameCount * 4.0f) * 3.0f) + player->pos.y; - gPlayerCamAt.z = (SIN_DEG(gGameFrameCount * 3.5f) * 3.0f) + player->unk_138; + gPlayerCamAt.z = (SIN_DEG(gGameFrameCount * 3.5f) * 3.0f) + player->trueZpos; break; } } @@ -1546,24 +1562,24 @@ void Play_Draw(void) { Lights_SetOneLight(&gMasterDisp, gLight1x, gLight1y, gLight1z, gLight1R, gLight1G, gLight1B, gAmbientR, gAmbientG, gAmbientB); if (gLevelMode == LEVELMODE_ON_RAILS) { - Matrix_RotateY(gCalcMatrix, player->unk_114 * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, player->unk_120 * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, player->yRot_114 * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, player->xRot_120 * M_DTOR, MTXF_APPLY); tempVec.x = player->cam.eye.x - player->pos.x; tempVec.y = player->cam.eye.y - player->pos.y; - tempVec.z = player->cam.eye.z - (player->unk_138 + player->unk_144); + tempVec.z = player->cam.eye.z - (player->trueZpos + player->zPath); Matrix_MultVec3f(gCalcMatrix, &tempVec, &gPlayerCamEye); gPlayerCamEye.x += player->pos.x; gPlayerCamEye.y += player->pos.y; - gPlayerCamEye.z += player->unk_138 + player->unk_144; + gPlayerCamEye.z += player->trueZpos + player->zPath; tempVec.x = player->cam.at.x - player->pos.x; tempVec.y = player->cam.at.y - player->pos.y; - tempVec.z = player->cam.at.z - (player->unk_138 + player->unk_144); + tempVec.z = player->cam.at.z - (player->trueZpos + player->zPath); Matrix_MultVec3f(gCalcMatrix, &tempVec, &gPlayerCamAt); gPlayerCamAt.x += player->pos.x; gPlayerCamAt.y += player->pos.y; - gPlayerCamAt.z += player->unk_138 + player->unk_144; + gPlayerCamAt.z += player->trueZpos + player->zPath; if (player->cockpitView && (player->boostSpeed > 5.0f)) { gPlayerCamAt.x += SIN_DEG(gGameFrameCount * 150.0f) * player->boostSpeed * 0.2f; @@ -1605,8 +1621,8 @@ void Play_Draw(void) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, gCameraShakeY, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - Ground_801B58AC(&gMasterDisp, D_ctx_80177CC8); - D_ctx_80177CC8 = 0.0f; + Ground_801B58AC(&gMasterDisp, gPathGroundScroll); + gPathGroundScroll = 0.0f; Matrix_Pop(&gGfxMatrix); } else if (gGroundSurface != SURFACE_WATER) { D_bg_8015F964 = false; @@ -1618,7 +1634,7 @@ void Play_Draw(void) { for (i = 0, opponent = gPlayer; i < gCamCount; i++, opponent++) { opponentPos.x = opponent->pos.x; opponentPos.y = opponent->pos.y; - opponentPos.z = opponent->unk_138; + opponentPos.z = opponent->trueZpos; Display_SetSecondLight(&opponentPos); func_display_800564C0(opponent, 0); func_display_80057814(opponent); @@ -1631,7 +1647,7 @@ void Play_Draw(void) { for (i = 0, opponent = gPlayer; i < gCamCount; i++, opponent++) { opponentPos.x = opponent->pos.x; opponentPos.y = opponent->pos.y; - opponentPos.z = opponent->unk_138; + opponentPos.z = opponent->trueZpos; func_display_800564C0(opponent, 1); } Matrix_Pop(&gGfxMatrix); diff --git a/src/engine/fox_edata_info.c b/src/engine/fox_edata_info.c index 0b3c7522..19a34307 100644 --- a/src/engine/fox_edata_info.c +++ b/src/engine/fox_edata_info.c @@ -122,20 +122,20 @@ ObjectInfo D_edata_800CC124[0x190] = { /* OBJ_SCENERY_26, */ {(void*) D_CO_6010A50, 0, (ObjectFunc) NULL, D_CO_603EA74, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_27, */ {(void*) D_CO_60143E0, 0, (ObjectFunc) NULL, D_CO_603EAE0, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_28, */ {(void*) D_CO_6014A20, 0, (ObjectFunc) NULL, D_CO_603EB0C, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_29, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_60064FC, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_30, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_6006518, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_31, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_6006564, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_32, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_60065B0, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_33, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_60065FC, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_34, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_6006648, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_35, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_6006694, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_36, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_60066E0, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_37, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_600672C, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_38, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_6006778, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_39, */ {(void*) Obj39_Draw, 1, (ObjectFunc) Obj39_Update, gNoHitbox, 6000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_SKULL, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, D_TI_60064FC, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_RIB_0, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, D_TI_6006518, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_RIB_1, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, D_TI_6006564, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_RIB_2, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, D_TI_60065B0, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_RIB_3, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, D_TI_60065FC, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_RIB_4, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, D_TI_6006648, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_RIB_5, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, D_TI_6006694, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_RIB_6, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, D_TI_60066E0, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_RIB_7, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, D_TI_600672C, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_RIB_8, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, D_TI_6006778, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_ME_TUNNEL, */ {(void*) MeteoTunnel_Draw, 1, (ObjectFunc) MeteoTunnel_Update, gNoHitbox, 6000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_40, */ {(void*) func_edisplay_80059F68, 1, (ObjectFunc) func_enmy_80066D5C, D_CO_603E4A4, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_41, */ {(void*) func_edisplay_80059FDC, 1, (ObjectFunc) func_enmy_80066EA8, D_CO_603E4DC, 300.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_42, */ {(void*) Obj42_Draw, 1, (ObjectFunc) Obj42_Update, D_CO_603E514, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_42, */ {(void*) Scenery42_Draw, 1, (ObjectFunc) Scenery42_Update, D_CO_603E514, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_43, */ {(void*) D_ZO_6024AC0, 0, (ObjectFunc) NULL, D_ZO_602B9EC, 200.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_44, */ {(void*) D_ZO_600F560, 0, (ObjectFunc) NULL, D_ZO_602BA20, 1500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_45, */ {(void*) D_ZO_600EC90, 0, (ObjectFunc) NULL, D_ZO_602BAE4, 1500.0f, 0, 0, 40, 0, 0.0f, 0 }, @@ -147,7 +147,7 @@ ObjectInfo D_edata_800CC124[0x190] = { /* OBJ_SCENERY_51, */ {(void*) D_VE1_6006F50, 0, (ObjectFunc) NULL, D_VE1_601B584, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_52, */ {(void*) D_VE1_6005780, 0, (ObjectFunc) Venom1_80193540, D_VE1_601B5F4, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_53, */ {(void*) D_VE1_6003610, 0, (ObjectFunc) NULL, D_VE1_601B644, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_54, */ {(void*) D_CO_6000E00, 0, (ObjectFunc) Obj54_Update, D_CO_603E0EC, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_54, */ {(void*) D_CO_6000E00, 0, (ObjectFunc) Scenery54_Update, D_CO_603E0EC, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_55, */ {(void*) D_CO_6013B50, 0, (ObjectFunc) NULL, D_CO_603E88C, 1000.0f, 0, 0, 41, 0, 0.0f, 0 }, /* OBJ_SCENERY_56, */ {(void*) Corneria_8018F31C, 2, (ObjectFunc) Corneria_8018F044, D_CO_603E8A8, 1000.0f, 0, 0, 39, 0, 0.0f, 0 }, /* OBJ_SCENERY_57, */ {(void*) Titania_8018F8B8, 1, (ObjectFunc) Titania_8018F4D8, D_TI_6006BF0, 800.0f, 0, 0, 40, 0, 0.0f, 0 }, @@ -204,7 +204,7 @@ ObjectInfo D_edata_800CC124[0x190] = { /* OBJ_SCENERY_108 */ {(void*) D_SY_60102C0, 0, (ObjectFunc) NULL, D_SY_6034588, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, /* OBJ_SCENERY_109 */ {(void*) D_SY_60036A0, 0, (ObjectFunc) SectorY_801A4E44, D_SY_6034664, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, /* OBJ_SCENERY_110 */ {(void*) D_SY_6005360, 0, (ObjectFunc) NULL, D_SY_6034770, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_SCENERY_111 */ {(void*) Obj111_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_111 */ {(void*) Scenery111_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_SCENERY_112 */ {(void*) D_SY_600F6C0, 0, (ObjectFunc) SectorY_801A52B8, D_SY_60347F0, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, /* OBJ_SCENERY_113 */ {(void*) D_SY_601B610, 0, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_114 */ {(void*) D_SY_601C6A0, 0, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, @@ -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*) Actor195_Draw, 1, (ObjectFunc) Actor195_Update, gNoHitbox, 20000.0f, 0, 1, 39, 0, 0.0f, 0 }, + /* OBJ_ACTOR_CUTSCENE */ {(void*) ActorCutscene_Draw, 1, (ObjectFunc) ActorCutscene_Update, gNoHitbox, 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 }, diff --git a/src/engine/fox_edisplay.c b/src/engine/fox_edisplay.c index c92174f1..52da7fef 100644 --- a/src/engine/fox_edisplay.c +++ b/src/engine/fox_edisplay.c @@ -23,14 +23,14 @@ #include "assets/ast_zoness.h" Vec3f D_edisplay_801615D0; -Vec3f D_edisplay_801615E0; -s32 D_edisplay_801615EC; +Vec3f sViewPos; +s32 sDrewActor; Matrix D_edisplay_801615F0; WingInfo D_edisplay_80161630; char D_edisplay_800CF970[] = "$Id: fox_edisplay.c,v 1.196 1997/05/08 08:31:50 morita Exp $"; -void func_edisplay_800596C0(void) { +void Object_ApplyWaterDistortion(void) { Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 13.0f * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 1.02f, 0.98f, 1.0f, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, -(f32) gGameFrameCount * 13.0f * M_DTOR, MTXF_APPLY); @@ -38,7 +38,7 @@ void func_edisplay_800596C0(void) { Matrix_SetGfxMtx(&gMasterDisp); } -void func_edisplay_800597C0(s32 arg0) { +void Object_SetCullDirection(s32 arg0) { if (arg0 < 0) { gSPSetGeometryMode(gMasterDisp++, G_CULL_FRONT); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); @@ -56,7 +56,7 @@ void Sprite168_Draw(Sprite168* this) { RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } -void func_edisplay_800598DC(s32 arg0) { +void Object_dummy_800598DC(s32 arg0) { } void Actor201_Draw(Actor201* this) { @@ -65,7 +65,7 @@ void Actor201_Draw(Actor201* this) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } -void func_edisplay_800599A4(s32 limbIndex, Vec3f* rot, void* index) { +void Actor202_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* index) { Vec3f sp24; Vec3f sp18; @@ -95,18 +95,18 @@ void Actor202_Draw(Actor202* this) { Matrix_Translate(gGfxMatrix, 0.f, -temp, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); Animation_GetFrameData(&D_ME_601E8C4, this->unk_0B6, sp30); - Animation_DrawSkeleton(1, D_ME_601E9D0, sp30, NULL, func_edisplay_800599A4, &this->index, &gIdentityMatrix); + Animation_DrawSkeleton(1, D_ME_601E9D0, sp30, NULL, Actor202_PostLimbDraw, &this->index, &gIdentityMatrix); } -void Obj39_Draw(Scenery_39* this) { +void MeteoTunnel_Draw(Scenery_39* this) { gSPDisplayList(gMasterDisp++, D_ME_601AE40); } -void func_edisplay_80059B20(Scenery* scenery) { - if (scenery->obj.id == OBJ_SCENERY_29) { +void Scenery_DrawTitaniaBones(Scenery* scenery) { + if (scenery->obj.id == OBJ_SCENERY_TI_SKULL) { gSPDisplayList(gMasterDisp++, D_TI1_7007350); } else { - Graphics_SetScaleMtx(D_edisplay_800CF9B0[scenery->obj.id + 2]); + Graphics_SetScaleMtx(D_edisplay_800CFA2C[scenery->obj.id - 29]); gSPDisplayList(gMasterDisp++, D_TI1_700BB10); } } @@ -114,7 +114,7 @@ void func_edisplay_80059B20(Scenery* scenery) { void func_edisplay_80059BB0(void* arg0) { } -void Obj42_Draw(Scenery_42* this) { +void Scenery42_Draw(Scenery_42* this) { gSPDisplayList(gMasterDisp++, D_CO_6023AC0); } @@ -515,10 +515,10 @@ void func_edisplay_8005B388(Actor* actor) { (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) || (gCurrentLevel == LEVEL_VENOM_ANDROSS) || (gCurrentLevel == LEVEL_VENOM_2) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) && (gCurrentLevel != LEVEL_MACBETH) && (gCurrentLevel != LEVEL_TITANIA)) { - if (actor->obj.id == OBJ_ACTOR_195) { + if (actor->obj.id == OBJ_ACTOR_CUTSCENE) { if (((gCurrentLevel == LEVEL_VENOM_2) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) && (actor->index == 10)) || - ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) && (gPlayer[0].unk_1D0 >= 100) && + ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) && (gPlayer[0].csState >= 100) && (gCurrentLevel == LEVEL_KATINA) && (actor->index == 1)) || ((gCurrentLevel == LEVEL_SECTOR_Y) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) && (actor->state == 5))) { @@ -634,7 +634,7 @@ void func_edisplay_8005BAB4(ObjectId objId, s32 index) { } RCP_SetupDL(&gMasterDisp, 0x40); break; - case OBJ_ACTOR_195: + case OBJ_ACTOR_CUTSCENE: case OBJ_ACTOR_TEAM_BOSS: case OBJ_ACTOR_EVENT: switch (gActors[index].unk_0B4) { @@ -782,7 +782,7 @@ void ItemCheckpoint_Draw(ItemCheckpoint* this) { for (i = 0; i < 8; i++) { Matrix_Push(&gGfxMatrix); Matrix_RotateZ(gGfxMatrix, i * 45.0f * M_DTOR, MTXF_APPLY); - Matrix_Translate(gGfxMatrix, 2.0f * this->scale, 0.0f, 0.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 2.0f * this->width, 0.0f, 0.0f, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, (gGameFrameCount + (i * 110.0f)) * M_DTOR * 7.2f * this->unk_54, MTXF_APPLY); Graphics_SetScaleMtx(2.0f * this->unk_50); gSPDisplayList(gMasterDisp++, D_101CAE0); @@ -795,7 +795,7 @@ void ItemSilverRing_Draw(ItemSilverRing* this) { RCP_SetupDL(&gMasterDisp, 0x1D); gSPTexture(gMasterDisp++, 3000, 0, 0, G_TX_RENDERTILE, G_ON); gSPSetGeometryMode(gMasterDisp++, G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR); - Graphics_SetScaleMtx(this->scale); + Graphics_SetScaleMtx(this->width); gSPDisplayList(gMasterDisp++, D_101A570); gSPClearGeometryMode(gMasterDisp++, G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR); } @@ -804,7 +804,7 @@ void ItemSilverStar_Draw(ItemSilverStar* this) { RCP_SetupDL(&gMasterDisp, 0x1D); gSPTexture(gMasterDisp++, 3000, 0, 0, G_TX_RENDERTILE, G_ON); gSPSetGeometryMode(gMasterDisp++, G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR); - Graphics_SetScaleMtx(this->scale); + Graphics_SetScaleMtx(this->width); gSPDisplayList(gMasterDisp++, D_1019CA0); gSPClearGeometryMode(gMasterDisp++, G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR); } @@ -813,17 +813,17 @@ void ItemGoldRing_Draw(ItemGoldRing* this) { RCP_SetupDL(&gMasterDisp, 0x1D); gSPTexture(gMasterDisp++, 1900, 1700, 0, G_TX_RENDERTILE, G_ON); gSPSetGeometryMode(gMasterDisp++, G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR); - Graphics_SetScaleMtx(this->scale); + Graphics_SetScaleMtx(this->width); gSPDisplayList(gMasterDisp++, D_1016870); gSPClearGeometryMode(gMasterDisp++, G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR); } void ItemBomb_Draw(ItemBomb* this) { if (gCurrentLevel == LEVEL_AQUAS) { - Graphics_SetScaleMtx(this->scale); + Graphics_SetScaleMtx(this->width); gSPDisplayList(gMasterDisp++, D_blue_marine_3005980); } else { - Graphics_SetScaleMtx(this->scale * 0.1f); + Graphics_SetScaleMtx(this->width * 0.1f); RCP_SetupDL(&gMasterDisp, 0x1D); gSPTexture(gMasterDisp++, 2000, 2000, 0, G_TX_RENDERTILE, G_ON); gSPSetGeometryMode(gMasterDisp++, G_TEXTURE_GEN); @@ -836,7 +836,7 @@ void ItemBomb_Draw(ItemBomb* this) { } void ItemLasers_Draw(ItemLasers* this) { - Graphics_SetScaleMtx(this->scale * 0.1f); + Graphics_SetScaleMtx(this->width * 0.1f); RCP_SetupDL(&gMasterDisp, 0x1D); gSPTexture(gMasterDisp++, 2000, 2000, 0, G_TX_RENDERTILE, G_ON); gSPSetGeometryMode(gMasterDisp++, G_TEXTURE_GEN); @@ -851,7 +851,7 @@ void ItemMeteoWarp_Draw(ItemMeteoWarp* this) { s32 i; this->obj.rot.y = (Math_Atan2F(gPlayer[gPlayerNum].cam.eye.x - this->obj.pos.x, - gPlayer[gPlayerNum].cam.eye.z - (this->obj.pos.z + D_ctx_80177D20)) * + gPlayer[gPlayerNum].cam.eye.z - (this->obj.pos.z + gPathProgress)) * 180.0f) / M_PI; if (this->state != 0) { @@ -864,7 +864,7 @@ void ItemMeteoWarp_Draw(ItemMeteoWarp* this) { for (i = 0; i < 7; i++) { Matrix_Push(&gGfxMatrix); Matrix_RotateZ(gGfxMatrix, (i * 360.0f / 7.0f) * M_DTOR, MTXF_APPLY); - Matrix_Translate(gGfxMatrix, 0.0f, this->scale, 0.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, this->width, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_102FE80); Matrix_Pop(&gGfxMatrix); @@ -874,7 +874,7 @@ void ItemMeteoWarp_Draw(ItemMeteoWarp* this) { void func_edisplay_8005D008(Object* obj, s32 drawType) { if (drawType == 2) { - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, D_ctx_80177D20, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, gPathProgress, MTXF_APPLY); Matrix_Translate(gCalcMatrix, obj->pos.x, obj->pos.y, obj->pos.z, MTXF_NEW); Matrix_Push(&gGfxMatrix); Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); @@ -884,7 +884,7 @@ void func_edisplay_8005D008(Object* obj, s32 drawType) { Matrix_RotateX(gCalcMatrix, obj->rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, obj->rot.z * M_DTOR, MTXF_APPLY); } else { - Matrix_Translate(gGfxMatrix, obj->pos.x, obj->pos.y, obj->pos.z + D_ctx_80177D20, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, obj->pos.x, obj->pos.y, obj->pos.z + gPathProgress, MTXF_APPLY); Matrix_Copy(&D_edisplay_801615F0, gGfxMatrix); Matrix_RotateY(gGfxMatrix, obj->rot.y * M_DTOR, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, obj->rot.x * M_DTOR, MTXF_APPLY); @@ -895,7 +895,7 @@ void func_edisplay_8005D008(Object* obj, s32 drawType) { void func_edisplay_8005D1F0(Object* obj, s32 drawType) { if (drawType == 2) { - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, D_ctx_80177D20, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, gPathProgress, MTXF_APPLY); Matrix_Translate(gCalcMatrix, obj->pos.x, obj->pos.y, obj->pos.z, MTXF_NEW); Matrix_Push(&gGfxMatrix); Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); @@ -905,7 +905,7 @@ void func_edisplay_8005D1F0(Object* obj, s32 drawType) { Matrix_RotateX(gCalcMatrix, obj->rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, obj->rot.z * M_DTOR, MTXF_APPLY); } else { - Matrix_Translate(gGfxMatrix, obj->pos.x, obj->pos.y, obj->pos.z + D_ctx_80177D20, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, obj->pos.x, obj->pos.y, obj->pos.z + gPathProgress, MTXF_APPLY); Matrix_Copy(&D_edisplay_801615F0, gGfxMatrix); Matrix_RotateY(gGfxMatrix, obj->rot.y * M_DTOR, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, obj->rot.x * M_DTOR, MTXF_APPLY); @@ -915,7 +915,7 @@ void func_edisplay_8005D1F0(Object* obj, s32 drawType) { void func_edisplay_8005D3CC(Object* obj, f32 xRot, f32 yRot, f32 zRot, s32 drawType) { if (drawType == 2) { - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, D_ctx_80177D20, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, gPathProgress, MTXF_APPLY); Matrix_Translate(gCalcMatrix, obj->pos.x, obj->pos.y, obj->pos.z, MTXF_NEW); Matrix_Push(&gGfxMatrix); Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); @@ -928,7 +928,7 @@ void func_edisplay_8005D3CC(Object* obj, f32 xRot, f32 yRot, f32 zRot, s32 drawT Matrix_RotateX(gCalcMatrix, obj->rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, obj->rot.z * M_DTOR, MTXF_APPLY); } else { - Matrix_Translate(gGfxMatrix, obj->pos.x, obj->pos.y, obj->pos.z + D_ctx_80177D20, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, obj->pos.x, obj->pos.y, obj->pos.z + gPathProgress, MTXF_APPLY); Matrix_Copy(&D_edisplay_801615F0, gGfxMatrix); Matrix_RotateY(gGfxMatrix, M_DTOR * yRot, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_DTOR * xRot, MTXF_APPLY); @@ -950,7 +950,7 @@ void Scenery_Draw(Scenery* this, s32 arg1) { RCP_SetupDL_57(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); if (arg1 < 0) { - func_edisplay_800596C0(); + Object_ApplyWaterDistortion(); } gSPDisplayList(gMasterDisp++, this->info.dList); RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); @@ -961,9 +961,9 @@ void Scenery_Draw(Scenery* this, s32 arg1) { } RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } - func_edisplay_800597C0(arg1); + Object_SetCullDirection(arg1); if (arg1 < 0) { - func_edisplay_800596C0(); + Object_ApplyWaterDistortion(); } gSPDisplayList(gMasterDisp++, this->info.dList); if (this->obj.id == OBJ_SCENERY_8) { @@ -971,7 +971,7 @@ void Scenery_Draw(Scenery* this, s32 arg1) { } } } else if (this->info.draw != NULL) { - func_edisplay_800597C0(arg1); + Object_SetCullDirection(arg1); this->info.draw(&this->obj); } } @@ -1027,9 +1027,9 @@ void Actor_DrawOnRails(Actor* this) { } } if ((this->lockOnTimers[TEAM_ID_FOX] != 0) && (gReflectY > 0)) { - sp34.y += this->info.unk_1C; - Matrix_MultVec3f(gGfxMatrix, &sp34, &D_display_80161578[0]); - if (D_display_80161578[0].z > -200.0f) { + sp34.y += this->info.targetOffset; + Matrix_MultVec3f(gGfxMatrix, &sp34, &gLockOnTargetViewPos[TEAM_ID_FOX]); + if (gLockOnTargetViewPos[TEAM_ID_FOX].z > -200.0f) { this->lockOnTimers[TEAM_ID_FOX] = 0; } } @@ -1038,20 +1038,20 @@ void Actor_DrawOnRails(Actor* this) { } void Actor_DrawAllRange(Actor* this) { - s32 var_v1; + s32 playerNum; Vec3f sp50 = { 0.0f, 0.0f, 0.0f }; f32 var_fa1; f32 var_ft5; f32 var_fv0; f32 var_fv1; - D_edisplay_801615EC = 0; + sDrewActor = false; if (this->info.drawType == 2) { - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, D_ctx_80177D20, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, gPathProgress, MTXF_APPLY); Matrix_Translate(gCalcMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, MTXF_NEW); Matrix_Push(&gGfxMatrix); Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); - Matrix_MultVec3f(gGfxMatrix, &sp50, &D_edisplay_801615E0); + Matrix_MultVec3f(gGfxMatrix, &sp50, &sViewPos); Matrix_Pop(&gGfxMatrix); var_fv0 = 0.0f; var_fv1 = -12000.0f; @@ -1059,28 +1059,28 @@ void Actor_DrawAllRange(Actor* this) { var_fv0 = 1000.0f; var_fv1 = -25000.0f; } - if ((var_fv0 > D_edisplay_801615E0.z) && (D_edisplay_801615E0.z > var_fv1)) { - if (fabsf(D_edisplay_801615E0.x) < (fabsf(D_edisplay_801615E0.z * 0.5f) + 500.0f)) { - if (fabsf(D_edisplay_801615E0.y) < (fabsf(D_edisplay_801615E0.z * 0.5f) + 500.0f)) { + if ((var_fv0 > sViewPos.z) && (sViewPos.z > var_fv1)) { + if (fabsf(sViewPos.x) < (fabsf(sViewPos.z * 0.5f) + 500.0f)) { + if (fabsf(sViewPos.y) < (fabsf(sViewPos.z * 0.5f) + 500.0f)) { Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); this->info.draw(&this->obj); - D_edisplay_801615EC = 1; + sDrewActor = true; if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (this->obj.id == OBJ_ACTOR_ALLRANGE) && (this->aiType == AI360_MISSILE)) { - gTeamArrowsViewPos[0] = D_edisplay_801615E0; + gTeamArrowsViewPos[0] = sViewPos; } } } } } else { Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, MTXF_APPLY); - Matrix_MultVec3f(gGfxMatrix, &sp50, &D_edisplay_801615E0); + Matrix_MultVec3f(gGfxMatrix, &sp50, &sViewPos); if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) || ((this->obj.id == OBJ_ACTOR_ALLRANGE) && (this->aiType >= AI360_GREAT_FOX)) || - ((this->obj.id == OBJ_ACTOR_195) && (this->info.bonus != 0))) { + ((this->obj.id == OBJ_ACTOR_CUTSCENE) && (this->info.bonus != 0))) { var_ft5 = var_fv0 = 3000.0f; var_fv1 = -29000.0f; var_fa1 = 0.7f; @@ -1090,45 +1090,45 @@ void Actor_DrawAllRange(Actor* this) { var_fv1 = -20000.0f; var_fa1 = 0.5f; } - if ((var_fv0 > D_edisplay_801615E0.z) && (D_edisplay_801615E0.z > var_fv1)) { - if (fabsf(D_edisplay_801615E0.x) < (fabsf(D_edisplay_801615E0.z * var_fa1) + var_ft5)) { - if (fabsf(D_edisplay_801615E0.y) < (fabsf(D_edisplay_801615E0.z * var_fa1) + var_ft5)) { + if ((var_fv0 > sViewPos.z) && (sViewPos.z > var_fv1)) { + if (fabsf(sViewPos.x) < (fabsf(sViewPos.z * var_fa1) + var_ft5)) { + if (fabsf(sViewPos.y) < (fabsf(sViewPos.z * var_fa1) + var_ft5)) { if (this->info.draw != NULL) { Matrix_RotateY(gGfxMatrix, this->obj.rot.y * M_DTOR, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); this->info.draw(&this->obj); - D_edisplay_801615EC = 1; + sDrewActor = true; if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (((this->obj.id == OBJ_ACTOR_ALLRANGE) && ((this->aiType <= AI360_PEPPY) || (this->aiType == AI360_KATT) || (this->aiType == AI360_BILL))) || (this->obj.id == OBJ_ACTOR_TEAM_BOSS))) { - gTeamArrowsViewPos[this->aiType] = D_edisplay_801615E0; + gTeamArrowsViewPos[this->aiType] = sViewPos; } } } } } } - if (D_edisplay_801615EC == 0) { + if (!sDrewActor) { this->lockOnTimers[gPlayerNum] = 0; if ((this->obj.id == OBJ_ACTOR_189) || (this->obj.id == OBJ_ACTOR_286)) { Object_Kill(&this->obj, this->sfxSource); } } - for (var_v1 = 0; var_v1 < gCamCount; var_v1++) { - if (this->lockOnTimers[var_v1] != 0) { - D_display_80161578[var_v1] = D_edisplay_801615E0; - D_display_80161578[var_v1].y += this->info.unk_1C; - if ((var_v1 == gPlayerNum) && (D_display_80161578[var_v1].z > -300.0f)) { - this->lockOnTimers[var_v1] = 0; + for (playerNum = 0; playerNum < gCamCount; playerNum++) { + if (this->lockOnTimers[playerNum] != 0) { + gLockOnTargetViewPos[playerNum] = sViewPos; + gLockOnTargetViewPos[playerNum].y += this->info.targetOffset; + if ((playerNum == gPlayerNum) && (gLockOnTargetViewPos[playerNum].z > -300.0f)) { + this->lockOnTimers[playerNum] = 0; } } } - func_edisplay_8005F290(this->sfxSource, &D_edisplay_801615E0); - this->iwork[24] = D_edisplay_801615EC; + func_edisplay_8005F290(this->sfxSource, &sViewPos); + this->iwork[24] = sDrewActor; } void Boss_Draw(Boss* this, s32 arg1) { @@ -1177,7 +1177,7 @@ void Boss_Draw(Boss* this, s32 arg1) { Matrix_SetGfxMtx(&gMasterDisp); } if (arg1 < 0) { - func_edisplay_800596C0(); + Object_ApplyWaterDistortion(); } this->info.draw(&this->obj); } @@ -1214,22 +1214,22 @@ void Effect_DrawOnRails(Effect* this, s32 arg1) { void Effect_DrawAllRange(Effect* this) { Vec3f sp4C = { 0.0f, 0.0f, 0.0f }; Vec3f sp40; - f32 var_fv0; - u8 sp3B = 0; + f32 minZ; + u8 drawn = false; if (this->info.unk_14 == -1) { - Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y + gCameraShakeY, this->obj.pos.z + D_ctx_80177D20, + Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y + gCameraShakeY, this->obj.pos.z + gPathProgress, MTXF_APPLY); } else { - Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + D_ctx_80177D20, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + gPathProgress, MTXF_APPLY); } Matrix_MultVec3f(gGfxMatrix, &sp4C, &sp40); if ((gCurrentLevel == LEVEL_SECTOR_Z) || (gCurrentLevel == LEVEL_BOLSE)) { - var_fv0 = -20000.0f; + minZ = -20000.0f; } else { - var_fv0 = -10000.0f; + minZ = -10000.0f; } - if ((sp40.z < 0.0f) && (var_fv0 < sp40.z)) { + if ((0.0f > sp40.z) && (sp40.z > minZ)) { if (fabsf(sp40.x) < (fabsf(sp40.z * 0.5f) + 500.0f)) { if (fabsf(sp40.y) < (fabsf(sp40.z * 0.5f) + 500.0f)) { if (this->info.draw != NULL) { @@ -1239,12 +1239,12 @@ void Effect_DrawAllRange(Effect* this) { Matrix_SetGfxMtx(&gMasterDisp); this->info.draw(&this->obj); } - sp3B = 1; + drawn = true; } } } func_edisplay_8005F290(this->sfxSource, &sp40); - if ((sp3B == 0) && (this->obj.id != OBJ_EFFECT_352) && (this->obj.id != OBJ_EFFECT_373) && (!gVersusMode)) { + if (!drawn && (this->obj.id != OBJ_EFFECT_352) && (this->obj.id != OBJ_EFFECT_373) && (!gVersusMode)) { Object_Kill(&this->obj, this->sfxSource); } } @@ -1252,12 +1252,12 @@ void Effect_DrawAllRange(Effect* this) { void Item_Draw(Item* this, s32 arg1) { Vec3f sp44 = { 0.0f, 0.0f, 0.0f }; Vec3f sp38; - u8 var_v0; + u8 drawn; - Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + D_ctx_80177D20, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + gPathProgress, MTXF_APPLY); Matrix_MultVec3f(gGfxMatrix, &sp44, &sp38); - var_v0 = 0; - if ((sp38.z < 0.0f) && (sp38.z > -12000.0f)) { + drawn = false; + if ((0.0f > sp38.z) && (sp38.z > -12000.0f)) { if (fabsf(sp38.x) < (fabsf(sp38.z * 0.5f) + 500.0f)) { if (fabsf(sp38.y) < (fabsf(sp38.z * 0.5f) + 500.0f)) { if (this->info.draw != NULL) { @@ -1271,12 +1271,12 @@ void Item_Draw(Item* this, s32 arg1) { this->info.draw(&this->obj); } } - var_v0 = 1; + drawn = true; } } } func_edisplay_8005F290(this->sfxSource, &sp38); - if ((var_v0 == 0) && (gLevelMode == LEVELMODE_ALL_RANGE) && (gCamCount == 1) && (this->obj.id < 336) && + if (!drawn && (gLevelMode == LEVELMODE_ALL_RANGE) && (gCamCount == 1) && (this->obj.id < OBJ_ITEM_GOLD_RING) && (gCurrentLevel != LEVEL_VENOM_ANDROSS)) { Object_Kill(&this->obj, this->sfxSource); } @@ -1322,21 +1322,21 @@ void Object_DrawShadow(s32 index, Object* obj) { switch (obj->id) { case OBJ_ACTOR_230: Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundHeight + 2.0f + gActors[index].fwork[1], - obj->pos.z + D_ctx_80177D20, MTXF_APPLY); + obj->pos.z + gPathProgress, MTXF_APPLY); break; case OBJ_ACTOR_229: case OBJ_ACTOR_231: Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundHeight + 2.0f + gActors[index].fwork[0], - obj->pos.z + D_ctx_80177D20, MTXF_APPLY); + obj->pos.z + gPathProgress, MTXF_APPLY); break; case OBJ_BOSS_316: Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundHeight + 2.0f + gCameraShakeY, obj->pos.z, MTXF_APPLY); break; default: - Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundHeight + 2.0f, obj->pos.z + D_ctx_80177D20, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundHeight + 2.0f, obj->pos.z + gPathProgress, MTXF_APPLY); break; } - if ((gGroundType != 4) || (obj->id == OBJ_ACTOR_EVENT) || (obj->id == OBJ_ACTOR_195) || + if ((gGroundType != 4) || (obj->id == OBJ_ACTOR_EVENT) || (obj->id == OBJ_ACTOR_CUTSCENE) || (obj->id == OBJ_ACTOR_TEAM_BOSS)) { Matrix_Scale(gGfxMatrix, 1.0f, 0.0f, 1.0f, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, obj->rot.y * M_DTOR, MTXF_APPLY); @@ -1383,7 +1383,7 @@ void func_edisplay_8005F0E8(f32* sfxSrc, Vec3f* pos) { Matrix_RotateX(gCalcMatrix, gPlayer[0].camPitch, MTXF_APPLY); sp2C.x = pos->x - gPlayerCamEye.x; sp2C.y = pos->y - gPlayerCamEye.y; - sp2C.z = pos->z + D_ctx_80177D20 - gPlayerCamEye.z; + sp2C.z = pos->z + gPathProgress - gPlayerCamEye.z; Matrix_MultVec3f(gCalcMatrix, &sp2C, &sp20); sfxSrc[0] = sp20.x; sfxSrc[1] = sp20.y; @@ -1472,11 +1472,11 @@ void Display_SetSecondLight(Vec3f* pos) { Vec3f sp9C; f32 sp98; f32 sp94; - f32 temp_fv0; + f32 lightDist; Vec3f sp84; f32 temp1; f32 temp2; - f32 var_fs0; + f32 lightFade; Vec3f sp6C; f32 temp3; f32 pad; @@ -1485,17 +1485,17 @@ void Display_SetSecondLight(Vec3f* pos) { sp9C.x = pos->x - gLight3x; sp9C.y = pos->y - gLight3y; sp9C.z = pos->z - gLight3z; - temp_fv0 = VEC3F_MAG(&sp9C); + lightDist = VEC3F_MAG(&sp9C); if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) { - var_fs0 = 700.0f / temp_fv0; + lightFade = 700.0f / lightDist; } else { - var_fs0 = 200.0f / temp_fv0; + lightFade = 200.0f / lightDist; } - if (var_fs0 > 1.0f) { - var_fs0 = 1.0f; + if (lightFade > 1.0f) { + lightFade = 1.0f; } if (D_ctx_8017812C == 2) { - var_fs0 = 1.0f; + lightFade = 1.0f; } sp94 = Math_Atan2F(sp9C.x, sp9C.z); sp98 = -Math_Atan2F(sp9C.y, sqrtf(SQ(sp9C.x) + SQ(sp9C.z))); @@ -1509,9 +1509,9 @@ void Display_SetSecondLight(Vec3f* pos) { sp6C.z = -100.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp6C, &sp84); Matrix_Pop(&gCalcMatrix); - temp1 = gLight3R * gLight3Brightness * var_fs0; - temp2 = gLight3G * gLight3Brightness * var_fs0; - temp3 = gLight3B * gLight3Brightness * var_fs0; + temp1 = gLight3R * gLight3Brightness * lightFade; + temp2 = gLight3G * gLight3Brightness * lightFade; + temp3 = gLight3B * gLight3Brightness * lightFade; Lights_SetTwoLights(&gMasterDisp, gLight1x, gLight1y, gLight1z, sp84.x, sp84.y, sp84.z, gLight1R, gLight1G, gLight1B, temp1, temp2, temp3, gAmbientR, gAmbientG, gAmbientB); } @@ -1589,7 +1589,7 @@ void Object_DrawAll(s32 arg0) { RCP_SetupDL_27(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 64, 64, 255, 255); } - func_edisplay_800597C0(arg0); + Object_SetCullDirection(arg0); Matrix_Push(&gGfxMatrix); Boss_Draw(boss, arg0); Matrix_Pop(&gGfxMatrix); @@ -1638,7 +1638,7 @@ void Object_DrawAll(s32 arg0) { (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) || (gCurrentLevel == LEVEL_AQUAS)) { Display_SetSecondLight(&actor->obj.pos); } - func_edisplay_800597C0(arg0); + Object_SetCullDirection(arg0); Actor_DrawOnRails(actor); Matrix_Pop(&gGfxMatrix); if (actor->unk_0C9 != 0) { @@ -1651,8 +1651,8 @@ void Object_DrawAll(s32 arg0) { Matrix_Push(&gGfxMatrix); Actor_DrawAllRange(actor); Matrix_Pop(&gGfxMatrix); - if ((actor->unk_0C9 != 0) && (D_edisplay_801615EC != 0) && - ((D_edisplay_801615E0.z > -4000.0f) || (gCurrentLevel != LEVEL_KATINA))) { + if ((actor->unk_0C9 != 0) && (sDrewActor != 0) && + ((sViewPos.z > -4000.0f) || (gCurrentLevel != LEVEL_KATINA))) { Matrix_Push(&gGfxMatrix); Object_DrawShadow(i, &actor->obj); Matrix_Pop(&gGfxMatrix); @@ -1668,7 +1668,7 @@ void Object_DrawAll(s32 arg0) { if (item->obj.status >= OBJ_ACTIVE) { Matrix_Push(&gGfxMatrix); RCP_SetupDL(&gMasterDisp, 0x1D); - func_edisplay_800597C0(arg0); + Object_SetCullDirection(arg0); Item_Draw(item, arg0); Matrix_Pop(&gGfxMatrix); } @@ -1779,12 +1779,12 @@ void TexturedLine_Draw(void) { if (gTexturedLines[i].mode != 0) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, texLine->unk_04.x, texLine->unk_04.y, texLine->unk_04.z + D_ctx_80177D20, + Matrix_Translate(gGfxMatrix, texLine->posAA.x, texLine->posAA.y, texLine->posAA.z + gPathProgress, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, texLine->unk_20, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, texLine->unk_1C, MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, texLine->unk_20, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, texLine->unk_28, texLine->unk_28, texLine->unk_24, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, texLine->yRot, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, texLine->xRot, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, texLine->yRot, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, texLine->xyScale, texLine->xyScale, texLine->zScale, MTXF_APPLY); if ((gCurrentLevel == LEVEL_AQUAS) || (gCurrentLevel == LEVEL_VENOM_ANDROSS)) { s32 alpha = ((gGameFrameCount % 2) != 0) ? 180 : 50; @@ -1808,8 +1808,8 @@ void TexturedLine_Draw(void) { if (gCurrentLevel == LEVEL_MACBETH) { gSPDisplayList(gMasterDisp++, D_MA_6012C00); } else { - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, texLine->unk_2C, texLine->unk_2D, texLine->unk_2E, - texLine->unk_2F); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, texLine->red, texLine->green, texLine->blue, + texLine->alpha); gSPDisplayList(gMasterDisp++, D_edisplay_800CFD80); } } @@ -1821,18 +1821,18 @@ void TexturedLine_Draw(void) { void TexturedLine_DrawPath(s32 index) { TexturedLine* texLine = &gTexturedLines[index]; - if (texLine->unk_2F == 255) { + if (texLine->alpha == 255) { RCP_SetupDL(&gMasterDisp, 5); } else { RCP_SetupDL(&gMasterDisp, 0xE); } - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, texLine->unk_2C, texLine->unk_2D, texLine->unk_2E, texLine->unk_2F); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, texLine->red, texLine->green, texLine->blue, texLine->alpha); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, texLine->unk_04.x, texLine->unk_04.y, texLine->unk_04.z, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, texLine->unk_20, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, texLine->unk_1C, MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, texLine->unk_1C, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, texLine->unk_28, 1.0f, texLine->unk_24, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, texLine->posAA.x, texLine->posAA.y, texLine->posAA.z, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, texLine->yRot, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, texLine->xRot, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, texLine->xRot, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, texLine->xyScale, 1.0f, texLine->zScale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_edisplay_800CFD80); diff --git a/src/engine/fox_effect.c b/src/engine/fox_effect.c index c5c9e163..0a721e0b 100644 --- a/src/engine/fox_effect.c +++ b/src/engine/fox_effect.c @@ -31,7 +31,7 @@ s32 BonusText_Display(f32 xPos, f32 yPos, f32 zPos, s32 hits) { gBonusText[i].pos.x = xPos; gBonusText[i].pos.y = yPos; gBonusText[i].pos.z = zPos; - gBonusText[i].unk_10 = 0.0f; + gBonusText[i].rise = 0.0f; gBonusText[i].timer = 65; break; } @@ -52,14 +52,14 @@ void BonusText_Update(void) { } if (gLevelMode == LEVELMODE_ON_RAILS) { - bonus->pos.z -= D_ctx_80177D08; + bonus->pos.z -= gPathVelZ; } else if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) { bonus->pos.x += gPlayer[0].vel.x; bonus->pos.z += gPlayer[0].vel.z; } if (bonus->timer < 45) { - Math_SmoothStepToF(&bonus->unk_10, 300.0f, 0.1f, 20.0f, 0.0f); + Math_SmoothStepToF(&bonus->rise, 300.0f, 0.1f, 20.0f, 0.0f); } } } @@ -83,7 +83,7 @@ void BonusText_Draw(BonusText* bonus) { f32 sp50; if (bonus->timer <= 45) { - Matrix_Translate(gGfxMatrix, bonus->pos.x, bonus->pos.y, bonus->pos.z + D_ctx_80177D20, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, bonus->pos.x, bonus->pos.y, bonus->pos.z + gPathProgress, MTXF_APPLY); Matrix_MultVec3f(gGfxMatrix, &sp60, &sp54); if ((fabsf(sp54.x) < 20000.0f) && (fabsf(sp54.y) < 20000.0f)) { @@ -92,7 +92,7 @@ void BonusText_Draw(BonusText* bonus) { Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].camPitch, MTXF_APPLY); Matrix_Scale(gGfxMatrix, sp50, sp50, 1.0f, MTXF_APPLY); - Matrix_Translate(gGfxMatrix, 0.0f, bonus->unk_10, 0.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, bonus->rise, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if (bonus->hits <= 10) { @@ -980,7 +980,7 @@ void func_effect_8007A748(Effect* effect) { } bool func_effect_8007A774(Player* player, Effect* effect, f32 arg2) { - if ((fabsf(player->unk_138 - effect->obj.pos.z) < arg2) && (fabsf(player->pos.x - effect->obj.pos.x) < arg2) && + if ((fabsf(player->trueZpos - effect->obj.pos.z) < arg2) && (fabsf(player->pos.x - effect->obj.pos.x) < arg2) && (fabsf(player->pos.y - effect->obj.pos.y) < arg2) && (player->timer_498 == 0)) { Player_ApplyDamage(player, 0, effect->info.damage); return true; @@ -1145,7 +1145,7 @@ void func_effect_8007AF30(Effect* effect, f32 xPos, f32 zPos, f32 xVel, f32 zVel effect->obj.pos.z = zPos; effect->vel.x = xVel; - effect->vel.z = zVel - D_ctx_80177D08; + effect->vel.z = zVel - gPathVelZ; effect->scale1 = scale1; effect->timer_50 = 100; Object_SetInfo(&effect->info, effect->obj.id); @@ -2207,7 +2207,7 @@ void func_effect_8007DB70(Effect* effect) { } } effect->obj.rot.y = 180.0f - effect->obj.rot.y; - if ((fabsf(gPlayer[0].unk_138 - effect->obj.pos.z) < 40.0f) && + if ((fabsf(gPlayer[0].trueZpos - effect->obj.pos.z) < 40.0f) && (fabsf(gPlayer[0].pos.x - effect->obj.pos.x) < 80.0f)) { if ((effect->obj.pos.y < gPlayer[0].pos.y) && ((gPlayer[0].pos.y - effect->obj.pos.y) < (effect->scale2 * 35.0f)) && @@ -2246,7 +2246,7 @@ void func_effect_8007E014(Effect* effect) { f32 y; if (gGroundType == 4) { - Ground_801B6E20(effect->obj.pos.x, effect->obj.pos.z + D_ctx_80177D20, &x, &y, &z); + Ground_801B6E20(effect->obj.pos.x, effect->obj.pos.z + gPathProgress, &x, &y, &z); effect->obj.pos.y = y + 3.0f; effect->obj.rot.x = RAD_TO_DEG(x); effect->obj.rot.z = RAD_TO_DEG(z); @@ -2377,8 +2377,8 @@ void func_effect_8007E6B8(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPo effect->obj.pos.z = zPos; Object_SetInfo(&effect->info, effect->obj.id); - sp50 = Math_Atan2F(gPlayer[0].pos.x - xPos, gPlayer[0].unk_138 - zPos); - temp_ft4 = sqrtf(SQ(gPlayer[0].pos.x - xPos) + SQ(gPlayer[0].unk_138 - zPos)); + sp50 = Math_Atan2F(gPlayer[0].pos.x - xPos, gPlayer[0].trueZpos - zPos); + temp_ft4 = sqrtf(SQ(gPlayer[0].pos.x - xPos) + SQ(gPlayer[0].trueZpos - zPos)); sp54 = -Math_Atan2F(gPlayer[0].pos.y - yPos, temp_ft4); Matrix_RotateY(gCalcMatrix, sp50, MTXF_NEW); @@ -2390,9 +2390,9 @@ void func_effect_8007E6B8(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPo Matrix_MultVec3f(gCalcMatrix, &sp40, &sp34); - effect->vel.x = sp34.x + D_ctx_801779E4; - effect->vel.y = sp34.y + D_ctx_801779F4; - effect->vel.z = sp34.z - D_ctx_80177D08; + effect->vel.x = sp34.x + gPathVelX; + effect->vel.y = sp34.y + gPathVelY; + effect->vel.z = sp34.z - gPathVelZ; if ((objId == OBJ_EFFECT_353) || (objId == OBJ_EFFECT_354)) { effect->obj.rot.x = RAD_TO_DEG(sp54); @@ -2447,9 +2447,9 @@ void func_effect_8007E93C(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPo Matrix_MultVec3f(gCalcMatrix, &sp40, &sp34); - effect->vel.x = sp34.x + D_ctx_801779E4; - effect->vel.y = sp34.y + D_ctx_801779F4; - effect->vel.z = sp34.z - D_ctx_80177D08; + effect->vel.x = sp34.x + gPathVelX; + effect->vel.y = sp34.y + gPathVelY; + effect->vel.z = sp34.z - gPathVelZ; if (objId == OBJ_EFFECT_353) { effect->obj.rot.x = RAD_TO_DEG(sp54); @@ -2559,8 +2559,8 @@ void func_effect_8007EE68(ObjectId objId, Vec3f* pos, Vec3f* rot, Vec3f* arg3, V for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { func_effect_8007ED54(&gEffects[i], objId, pos->x + sp68.x, pos->y + sp68.y, pos->z + sp68.z, rot->x, rot->y, - rot->z, arg3->x, arg3->y, arg3->z, sp68.x + D_ctx_801779E4, sp68.y + D_ctx_801779F4, - sp68.z - D_ctx_80177D08, scale2); + rot->z, arg3->x, arg3->y, arg3->z, sp68.x + gPathVelX, sp68.y + gPathVelY, + sp68.z - gPathVelZ, scale2); break; } } @@ -2582,7 +2582,7 @@ void func_effect_8007F04C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 xRot void func_effect_8007F11C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 speed) { s32 i; - if ((fabsf(zPos - gPlayer[0].unk_138) > 300.0f) || (fabsf(xPos - gPlayer[0].pos.x) > 300.0f)) { + if ((fabsf(zPos - gPlayer[0].trueZpos) > 300.0f) || (fabsf(xPos - gPlayer[0].pos.x) > 300.0f)) { for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { Matrix_Push(&gCalcMatrix); @@ -2653,7 +2653,7 @@ void func_effect_8007F438(Effect* effect) { effect->unk_46--; } - if (D_ctx_80177D08 < 0.0f) { + if (gPathVelZ < 0.0f) { effect->vel.z = -10.0f; } @@ -2723,7 +2723,7 @@ void func_effect_8007F6B0(Effect* effect) { yPos = gGroundHeight + 40.0f; if (gGroundType == 4) { - Ground_801B6E20(effect->obj.pos.x + sin, effect->obj.pos.z + cos + D_ctx_80177D20, &x, &y, &z); + Ground_801B6E20(effect->obj.pos.x + sin, effect->obj.pos.z + cos + gPathProgress, &x, &y, &z); yPos = y + 30.0f; } @@ -2770,7 +2770,7 @@ void func_effect_8007F958(Effect* effect) { yPos = gGroundHeight + 10.0f; if (gGroundType == 4) { - Ground_801B6E20(effect->obj.pos.x + sin, effect->obj.pos.z + cos + D_ctx_80177D20, &x, &y, &z); + Ground_801B6E20(effect->obj.pos.x + sin, effect->obj.pos.z + cos + gPathProgress, &x, &y, &z); yPos = y + 10.0f; } @@ -2825,13 +2825,13 @@ bool func_effect_8007FD84(Effect* effect) { (fabsf(actor->obj.pos.z - effect->obj.pos.z) < 100.0f) && (fabsf(actor->obj.pos.x - effect->obj.pos.x) < 100.0f) && (fabsf(actor->obj.pos.y - effect->obj.pos.y) < 100.0f)) { - actor->unk_0D0 = 1; - actor->unk_0D2 = 0; + actor->dmgType = 1; + actor->dmgPart = 0; actor->damage = 10; if (effect->obj.id == OBJ_EFFECT_354) { actor->damage = 30; } - actor->unk_0D4 = 100; + actor->dmgSource = 100; return true; } } @@ -2855,14 +2855,14 @@ void func_effect_8007FE88(Effect* effect) { return; } - if (gPlayer[0].unk_280 != 0) { + if (gPlayer[0].barrelRollAlpha != 0) { var_fa0 = 100.0f; } - if (fabsf(gPlayer[0].unk_138 - effect->obj.pos.z) < (50.0f + var_fa0)) { + if (fabsf(gPlayer[0].trueZpos - effect->obj.pos.z) < (50.0f + var_fa0)) { if ((fabsf(gPlayer[0].pos.x - effect->obj.pos.x) < (30.0f + var_fa0)) && (fabsf(gPlayer[0].pos.y - effect->obj.pos.y) < (30.0f + var_fa0))) { - if ((gPlayer[0].unk_280 != 0) || (gPlayer[0].timer_27C != 0)) { + if ((gPlayer[0].barrelRollAlpha != 0) || (gPlayer[0].meteoWarpTimer != 0)) { effect->obj.rot.y = 90.0f; effect->obj.rot.x = RAND_FLOAT(360.0f); Matrix_RotateY(gCalcMatrix, effect->obj.rot.y * M_DTOR, MTXF_NEW); @@ -2878,16 +2878,16 @@ void func_effect_8007FE88(Effect* effect) { AUDIO_PLAY_SFX(0x09007011, effect->sfxSource, 0); } - if ((gPlayer[0].unk_280 == 0) && (gPlayer[0].timer_498 == 0)) { + if ((gPlayer[0].barrelRollAlpha == 0) && (gPlayer[0].timer_498 == 0)) { Player_ApplyDamage(gPlayer, 0, effect->info.damage); - gPlayer[0].unk_0D8.x = 20.0f; + gPlayer[0].knockback.x = 20.0f; if (effect->vel.x < 0.0f) { - gPlayer[0].unk_0D8.x *= -1.0f; + gPlayer[0].knockback.x *= -1.0f; } if (gCurrentLevel != LEVEL_MACBETH) { - gPlayer[0].unk_0D8.y = 20.0f; + gPlayer[0].knockback.y = 20.0f; if (effect->vel.y < 0.0f) { - gPlayer[0].unk_0D8.y *= -1.0f; + gPlayer[0].knockback.y *= -1.0f; } } Object_Kill(&effect->obj, effect->sfxSource); @@ -2896,7 +2896,7 @@ void func_effect_8007FE88(Effect* effect) { } if (gGroundType == 4) { - if (Ground_801B6AEC(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z + D_ctx_80177D20) != 0) { + if (Ground_801B6AEC(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z + gPathProgress) != 0) { Object_Kill(&effect->obj, effect->sfxSource); } } else if (effect->obj.pos.y < gGroundHeight) { @@ -2961,8 +2961,8 @@ void func_effect_8008040C(Effect* effect) { switch (effect->state) { case 0: - yRot = Math_Atan2F(gPlayer[0].pos.x - effect->obj.pos.x, gPlayer[0].unk_138 - effect->obj.pos.z); - temp = sqrtf(SQ(gPlayer[0].pos.x - effect->obj.pos.x) + SQ(gPlayer[0].unk_138 - effect->obj.pos.z)); + yRot = Math_Atan2F(gPlayer[0].pos.x - effect->obj.pos.x, gPlayer[0].trueZpos - effect->obj.pos.z); + temp = sqrtf(SQ(gPlayer[0].pos.x - effect->obj.pos.x) + SQ(gPlayer[0].trueZpos - effect->obj.pos.z)); xRot = -Math_Atan2F(gPlayer[0].pos.y - effect->obj.pos.y, temp); Matrix_RotateY(gCalcMatrix, yRot, MTXF_NEW); Matrix_RotateX(gCalcMatrix, xRot, MTXF_APPLY); @@ -2970,9 +2970,9 @@ void func_effect_8008040C(Effect* effect) { srcVelocity.x = 0.0f; srcVelocity.z = 100.0f; Matrix_MultVec3f(gCalcMatrix, &srcVelocity, &destVelocity); - effect->vel.x = destVelocity.x + D_ctx_801779E4; - effect->vel.y = destVelocity.y + D_ctx_801779F4; - effect->vel.z = destVelocity.z - D_ctx_80177D08; + effect->vel.x = destVelocity.x + gPathVelX; + effect->vel.y = destVelocity.y + gPathVelY; + effect->vel.z = destVelocity.z - gPathVelZ; effect->state++; break; @@ -2988,14 +2988,14 @@ void func_effect_8008040C(Effect* effect) { return; } - if (gPlayer[0].unk_280 != 0) { + if (gPlayer[0].barrelRollAlpha != 0) { var_fa0 = 100.0f; } - if (fabsf(gPlayer[0].unk_138 - effect->obj.pos.z) < (50.0f + var_fa0)) { + if (fabsf(gPlayer[0].trueZpos - effect->obj.pos.z) < (50.0f + var_fa0)) { if ((fabsf(gPlayer[0].pos.x - effect->obj.pos.x) < (30.0f + var_fa0)) && (fabsf(gPlayer[0].pos.y - effect->obj.pos.y) < (30.0f + var_fa0))) { - if ((gPlayer[0].unk_280 != 0) || (gPlayer[0].timer_27C != 0)) { + if ((gPlayer[0].barrelRollAlpha != 0) || (gPlayer[0].meteoWarpTimer != 0)) { effect->obj.rot.y = 90.0f; effect->obj.rot.x = RAND_FLOAT(360.0f); Matrix_RotateY(gCalcMatrix, effect->obj.rot.y * M_DTOR, MTXF_NEW); @@ -3011,23 +3011,22 @@ void func_effect_8008040C(Effect* effect) { AUDIO_PLAY_SFX(0x09007011, effect->sfxSource, 0); } - if ((gPlayer[0].unk_280 == 0) && (gPlayer[0].timer_498 == 0)) { + if ((gPlayer[0].barrelRollAlpha == 0) && (gPlayer[0].timer_498 == 0)) { Player_ApplyDamage(gPlayer, 0, effect->info.damage); - gPlayer[0].unk_0D8.x = 20.0f; + gPlayer[0].knockback.x = 20.0f; if (effect->vel.x < 0.0f) { - gPlayer[0].unk_0D8.x *= -1.0f; + gPlayer[0].knockback.x *= -1.0f; } - gPlayer[0].unk_0D8.y = 20.0f; + gPlayer[0].knockback.y = 20.0f; if (effect->vel.y < 0.0f) { - gPlayer[0].unk_0D8.y *= -1.0f; + gPlayer[0].knockback.y *= -1.0f; } Object_Kill(&effect->obj, effect->sfxSource); } } if (gGroundType == 4) { - if (Ground_801B6AEC(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z + D_ctx_80177D20) != - 0) { + if (Ground_801B6AEC(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z + gPathProgress) != 0) { Object_Kill(&effect->obj, effect->sfxSource); } } else if (effect->obj.pos.y < gGroundHeight) { @@ -3576,7 +3575,7 @@ void func_effect_80081C5C(Effect* effect) { if (effect->unk_44 != 0) { Object_Kill(&effect->obj, effect->sfxSource); func_effect_8007D0E0(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 5.0f); - } else if (fabsf(gPlayer[0].unk_138 - effect->obj.pos.z) < 1000.0f) { + } else if (fabsf(gPlayer[0].trueZpos - effect->obj.pos.z) < 1000.0f) { ActorEvent_8006F0D8(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 15.0f); Object_Kill(&effect->obj, effect->sfxSource); } @@ -3766,11 +3765,11 @@ void func_effect_80081C5C(Effect* effect) { if ((((gGameFrameCount % 16) == 0)) && (effect->timer_50 == 0)) { D_800D18EC = RAD_TO_DEG(Math_Atan2F(gPlayer[0].cam.eye.x - gBosses[0].obj.pos.x, - gPlayer[0].cam.eye.z - (gBosses[0].obj.pos.z + D_ctx_80177D20))); + gPlayer[0].cam.eye.z - (gBosses[0].obj.pos.z + gPathProgress))); D_800D18E8 = RAD_TO_DEG( -Math_Atan2F(gPlayer[0].cam.eye.y - gBosses[0].obj.pos.y, - sqrtf(SQ(gPlayer[0].cam.eye.z - (gBosses[0].obj.pos.z + D_ctx_80177D20)) + + sqrtf(SQ(gPlayer[0].cam.eye.z - (gBosses[0].obj.pos.z + gPathProgress)) + SQ(gPlayer[0].cam.eye.x - gBosses[0].obj.pos.x)))); } if (gBosses[0].timer_050 == 0) { @@ -3812,7 +3811,7 @@ void func_effect_80081C5C(Effect* effect) { } velocity.x = velocity.y = 0.0f; - velocity.z = fabsf(gPlayer[0].unk_138 - effect->obj.pos.z); + velocity.z = fabsf(gPlayer[0].trueZpos - effect->obj.pos.z); Matrix_MultVec3fNoTranslate(gCalcMatrix, &velocity, &velocityDest); @@ -4052,7 +4051,7 @@ void func_effect_800837EC(Effect* effect) { } effect->obj.rot.y = RAD_TO_DEG(Math_Atan2F(gPlayer[0].cam.eye.x - effect->obj.pos.x, - gPlayer[0].cam.eye.z - (effect->obj.pos.z + D_ctx_80177D20))); + gPlayer[0].cam.eye.z - (effect->obj.pos.z + gPathProgress))); } void func_effect_80083B8C(Effect* effect) { @@ -4116,7 +4115,7 @@ void func_effect_80083D2C(f32 xPos, f32 yPos, f32 zPos, f32 srcZ) { x = gPlayer[0].pos.x + xSway - xPos; y = gPlayer[0].pos.y - yPos; - z = gPlayer[0].unk_138 - zPos; + z = gPlayer[0].trueZpos - zPos; yRot = Math_Atan2F(x, z); xRot = -Math_Atan2F(y, sqrtf(SQ(x) + SQ(z))); @@ -4129,7 +4128,7 @@ void func_effect_80083D2C(f32 xPos, f32 yPos, f32 zPos, f32 srcZ) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - dest.z -= D_ctx_80177D08; + dest.z -= gPathVelZ; for (i = 0; i < 6; i++) { for (j = 0; j < ARRAY_COUNT(gEffects); j++) { diff --git a/src/engine/fox_enmy.c b/src/engine/fox_enmy.c index d41c6725..1a9e13a8 100644 --- a/src/engine/fox_enmy.c +++ b/src/engine/fox_enmy.c @@ -135,7 +135,7 @@ void Object_SetInfo(ObjectInfo* info, u32 objId) { *info = D_edata_800CC124[objId]; info->hitbox = SEGMENTED_TO_VIRTUAL(D_edata_800CC124[objId].hitbox); if (gLevelMode == LEVELMODE_UNK_2) { - info->unk_10 += 200.0f; + info->cullDistance += 200.0f; } } @@ -263,7 +263,7 @@ void Item_Load(Item* item, ObjectInit* objInit) { item->obj.rot.x = objInit->rot.x; item->obj.rot.z = objInit->rot.z; item->obj.id = objInit->id; - item->scale = 1.0f; + item->width = 1.0f; Object_SetInfo(&item->info, item->obj.id); } @@ -284,7 +284,7 @@ void func_enmy_80061958(Effect* effect, f32 xPos, f32 yPos, f32 zPos) { effect->obj.rot.z = RAND_FLOAT(360.0f); Object_SetInfo(&effect->info, effect->obj.id); if (gLevelType == LEVELTYPE_PLANET) { - effect->info.unk_10 = 100.0f; + effect->info.cullDistance = 100.0f; } } @@ -298,9 +298,9 @@ void func_enmy_80061A4C(void) { if (gEffects[i].obj.status == OBJ_FREE) { x = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(400.0f) + (5.0f * gPlayer[0].vel.x); y = gPlayer[0].pos.y + RAND_FLOAT_CENTERED(400.0f) + (5.0f * gPlayer[0].vel.y); - z = -D_ctx_80177D20 - 500.0f; - if (D_ctx_80177D08 < 0.0f) { - z = -D_ctx_80177D20 + 500.0f; + z = -gPathProgress - 500.0f; + if (gPathVelZ < 0.0f) { + z = -gPathProgress + 500.0f; } func_enmy_80061958(&gEffects[i], x, y, z); break; @@ -322,9 +322,9 @@ void func_enmy_80061B68(void) { while (y <= gGroundHeight) { y = gPlayer[0].pos.y + RAND_FLOAT_CENTERED(2000.0f) + (5.0f * gPlayer[0].vel.y); } - z = -D_ctx_80177D20 - 3000.0f; - if (D_ctx_80177D08 < 0.0f) { - z = -D_ctx_80177D20 + 1000.0f; + z = -gPathProgress - 3000.0f; + if (gPathVelZ < 0.0f) { + z = -gPathProgress + 1000.0f; } func_enmy_80061958(&gEffects[i], x, y, z); break; @@ -342,9 +342,9 @@ void func_enmy_80061CD0(void) { if (gEffects[i].obj.status == OBJ_FREE) { x = gPlayer[gPlayerNum].pos.x + RAND_FLOAT_CENTERED(3000.0f) + (5.0f * gPlayer[gPlayerNum].vel.x); y = gPlayer[gPlayerNum].pos.y + 1000.0f + RAND_FLOAT_CENTERED(500.0f) + (5.0f * gPlayer[gPlayerNum].vel.y); - z = -D_ctx_80177D20 - RAND_FLOAT(2000.0f); - if (D_ctx_80177D08 < 0.0f) { - z = -D_ctx_80177D20 + 1000.0f; + z = -gPathProgress - RAND_FLOAT(2000.0f); + if (gPathVelZ < 0.0f) { + z = -gPathProgress + 1000.0f; } func_enmy_80061958(&gEffects[i], x, y, z); break; @@ -388,7 +388,7 @@ void ActorEvent_Load(Actor* actor, ObjectInit* objInit, s32 index) { actor->aiType = objInit->id - ACTOR_EVENT_ID; Object_SetInfo(&actor->info, actor->obj.id); - actor->info.unk_10 = 3000.0f; + actor->info.cullDistance = 3000.0f; actor->fwork[25] = 20000.0f; actor->iwork[1] = gPrevEventActorIndex; actor->iwork[10] = gActors[gPrevEventActorIndex].aiType; @@ -408,8 +408,8 @@ void ActorEvent_Load(Actor* actor, ObjectInit* objInit, s32 index) { void Object_Load(ObjectInit* objInit, f32 xMax, f32 xMin, f32 yMax, f32 yMin) { s32 i; - if ((xMax > objInit->xPos - gPlayer[0].unk_0AC) && (objInit->xPos - gPlayer[0].unk_0AC > xMin) && - (yMax > objInit->yPos - gPlayer[0].unk_0B0) && (objInit->yPos - gPlayer[0].unk_0B0 > yMin)) { + if ((xMax > objInit->xPos - gPlayer[0].xPath) && (objInit->xPos - gPlayer[0].xPath > xMin) && + (yMax > objInit->yPos - gPlayer[0].yPath) && (objInit->yPos - gPlayer[0].yPath > yMin)) { if (objInit->id < OBJ_SPRITE_CO_POLE) { for (i = 0; i < ARRAY_COUNT(gScenery); i++) { if (gScenery[i].obj.status == OBJ_FREE) { @@ -560,20 +560,20 @@ void Object_LoadLevelObjects(void) { yMin = xMin = -4000.0f; } - if ((gPlayer[0].timer_210 != 0) && (gPlayer[0].unk_118 < 0.0f)) { + if ((gPlayer[0].timer_210 != 0) && (gPlayer[0].yRot_118 < 0.0f)) { xMax = 10000.0f; } - if ((gPlayer[0].timer_210 != 0) && (gPlayer[0].unk_118 > 0.0f)) { + if ((gPlayer[0].timer_210 != 0) && (gPlayer[0].yRot_118 > 0.0f)) { xMin = -10000.0f; } gLastPathChange = 0; for (i = 0, objInit = &gLevelObjects[gObjectLoadIndex]; i < 10000; i++, gObjectLoadIndex++, objInit++) { - if ((objInit->id > OBJ_INVALID) && D_ctx_80177D20 <= objInit->zPos1 && - objInit->zPos1 <= D_ctx_80177D20 + 200.0f) { + if ((objInit->id > OBJ_INVALID) && gPathProgress <= objInit->zPos1 && + objInit->zPos1 <= gPathProgress + 200.0f) { if ((gCurrentLevel == LEVEL_VENOM_1) && (objInit->id >= ACTOR_EVENT_ID)) { - if (((objInit->rot.y < 180.0f) && (objInit->xPos < gPlayer[0].unk_0AC)) || - ((objInit->rot.y > 180.0f) && (gPlayer[0].unk_0AC < objInit->xPos))) { + if (((objInit->rot.y < 180.0f) && (objInit->xPos < gPlayer[0].xPath)) || + ((objInit->rot.y > 180.0f) && (gPlayer[0].xPath < objInit->xPos))) { Object_Load(objInit, xMax, xMin, yMax, yMin); } } else { @@ -747,12 +747,12 @@ bool Object_CheckPolyCollision(Vec3f* pos, Vec3f* vel, ObjectId objId, Object* o objPos.z = obj->pos.z; if ((objId == OBJ_ACTOR_180) || (objId == OBJ_SCENERY_149) || (objId == OBJ_SCENERY_150) || (objId == OBJ_BOSS_308) || (objId == OBJ_BOSS_313) || (objId == OBJ_BOSS_312) || (objId == OBJ_BOSS_309) || - (objId == OBJ_SCENERY_39)) { + (objId == OBJ_SCENERY_ME_TUNNEL)) { colId = COL1_0; if (objId == OBJ_BOSS_312) { colId = COL1_9; } - if (objId == OBJ_SCENERY_39) { + if (objId == OBJ_SCENERY_ME_TUNNEL) { colId = COL1_1; } else if (objId == OBJ_BOSS_308) { colId = COL1_4; @@ -829,7 +829,7 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) { if (scenery->obj.status == OBJ_ACTIVE) { if ((scenery->obj.id == OBJ_SCENERY_1) || (scenery->obj.id == OBJ_SCENERY_4) || (scenery->obj.id == OBJ_SCENERY_5) || (scenery->obj.id == OBJ_SCENERY_2) || - (scenery->obj.id == OBJ_SCENERY_39) || (scenery->obj.id == OBJ_SCENERY_3)) { + (scenery->obj.id == OBJ_SCENERY_ME_TUNNEL) || (scenery->obj.id == OBJ_SCENERY_3)) { if (Object_CheckPolyCollision(pos, vel, scenery->obj.id, &scenery->obj)) { return 2; } @@ -902,9 +902,9 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) { } else if (actor->scale < 0.0f) { if (Object_CheckHitboxCollision(pos, actor->info.hitbox, &actor->obj, actor->vwork[29].x, actor->vwork[29].y, actor->vwork[29].z + actor->unk_0F4.z)) { - actor->unk_0D0 = 1; + actor->dmgType = 1; actor->damage = 10; - actor->unk_0D2 = -1; + actor->dmgPart = -1; actor->hitPos.x = pos->x; actor->hitPos.y = pos->y; actor->hitPos.z = pos->z; @@ -912,9 +912,9 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) { } } else if ((mode != 2) && (mode != 3)) { if (Object_CheckSingleHitbox(pos, actor->info.hitbox, &actor->obj.pos)) { - actor->unk_0D0 = 1; + actor->dmgType = 1; actor->damage = 10; - actor->unk_0D2 = -1; + actor->dmgPart = -1; if (!(((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->iwork[12] != 0)) || ((actor->obj.id == OBJ_ACTOR_ALLRANGE) && ((actor->aiType < AI360_10) || (actor->aiType >= AI360_GREAT_FOX))))) { @@ -1001,11 +1001,11 @@ void func_enmy_80063F4C(s32 arg0) { } void func_enmy_80063F58(Item* item) { - item->scale = item->obj.rot.z * 100.0f; + item->width = item->obj.rot.z * 100.0f; } void func_enmy_80063F74(Item* item) { - item->scale = item->obj.rot.z * 100.0f; + item->width = item->obj.rot.z * 100.0f; } void Object_Init(s32 index, ObjectId objId) { @@ -1037,7 +1037,7 @@ void Object_Init(s32 index, ObjectId objId) { break; case OBJ_EFFECT_368: if (gCurrentLevel == LEVEL_TITANIA) { - Ground_801B6E20(gEffects[index].obj.pos.x, gEffects[index].obj.pos.z + D_ctx_80177D20, &sp54, &sp4C, + Ground_801B6E20(gEffects[index].obj.pos.x, gEffects[index].obj.pos.z + gPathProgress, &sp54, &sp4C, &sp50); gEffects[index].obj.pos.y = sp4C + 3.0f; gEffects[index].obj.rot.x = RAD_TO_DEG(sp54); @@ -1046,31 +1046,31 @@ void Object_Init(s32 index, ObjectId objId) { gEffects[index].obj.status = OBJ_FREE; } break; - case OBJ_SCENERY_30: + case OBJ_SCENERY_TI_RIB_0: func_enmy_80063E5C(&gScenery[index], D_TI_6006940); break; - case OBJ_SCENERY_31: + case OBJ_SCENERY_TI_RIB_1: func_enmy_80063E5C(&gScenery[index], D_TI_600695C); break; - case OBJ_SCENERY_32: + case OBJ_SCENERY_TI_RIB_2: func_enmy_80063E5C(&gScenery[index], D_TI_6006978); break; - case OBJ_SCENERY_33: + case OBJ_SCENERY_TI_RIB_3: func_enmy_80063E5C(&gScenery[index], D_TI_6006994); break; - case OBJ_SCENERY_34: + case OBJ_SCENERY_TI_RIB_4: func_enmy_80063E5C(&gScenery[index], D_TI_60069B0); break; - case OBJ_SCENERY_35: + case OBJ_SCENERY_TI_RIB_5: func_enmy_80063E5C(&gScenery[index], D_TI_60069CC); break; - case OBJ_SCENERY_36: + case OBJ_SCENERY_TI_RIB_6: func_enmy_80063E5C(&gScenery[index], D_TI_60069E8); break; - case OBJ_SCENERY_37: + case OBJ_SCENERY_TI_RIB_7: func_enmy_80063E5C(&gScenery[index], D_TI_6006A04); break; - case OBJ_SCENERY_38: + case OBJ_SCENERY_TI_RIB_8: func_enmy_80063E5C(&gScenery[index], D_TI_6006A20); break; case OBJ_SCENERY_23: @@ -1342,13 +1342,13 @@ void Object_Init(s32 index, ObjectId objId) { } } -void func_enmy_800652CC(Scenery* scenery) { +void Scenery_UpdateTitaniaBones(Scenery* scenery) { f32 sp2C; f32 sp28; f32 sp24; if ((gGroundType == 4) && (scenery->state == 0)) { - Ground_801B6E20(scenery->obj.pos.x, scenery->obj.pos.z + D_ctx_80177D20, &sp2C, &sp24, &sp28); + Ground_801B6E20(scenery->obj.pos.x, scenery->obj.pos.z + gPathProgress, &sp2C, &sp24, &sp28); scenery->obj.pos.y = sp24 + 3.0f; scenery->obj.rot.x = RAD_TO_DEG(sp2C); scenery->obj.rot.z = RAD_TO_DEG(sp28); @@ -1513,7 +1513,7 @@ void func_enmy_800656D4(Actor* actor) { } } else { - actor->fwork[29] = gPlayer[0].unk_138; + actor->fwork[29] = gPlayer[0].trueZpos; actor->fwork[28] = gPlayer[0].pos.y; actor->fwork[27] = gPlayer[0].pos.x; } @@ -1547,9 +1547,9 @@ void func_enmy_800656D4(Actor* actor) { if ((fabsf(actor->fwork[27] - actor->obj.pos.x) < 60.0f) && (fabsf(actor->fwork[28] - actor->obj.pos.y) < 60.0f) && (fabsf(actor->fwork[29] - actor->obj.pos.z) < 60.0f) && ((spC4 == 2) || (spC4 == 3) || (spC4 == 4))) { - gActors[spC4].unk_0D0 = 1; + gActors[spC4].dmgType = 1; gActors[spC4].damage = 20; - gActors[spC4].unk_0D4 = 2; + gActors[spC4].dmgSource = 2; func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 5.0f); Object_Kill(&actor->obj, actor->sfxSource); @@ -1558,7 +1558,7 @@ void func_enmy_800656D4(Actor* actor) { Math_Vec3fFromAngles(&sp98, actor->obj.rot.x, actor->obj.rot.y, actor->fwork[5]); actor->vel.x = sp98.x; actor->vel.y = sp98.y; - actor->vel.z = sp98.z - D_ctx_80177D08; + actor->vel.z = sp98.z - gPathVelZ; if (actor->unk_0B4 == 0) { actor->obj.rot.z += 5.0f; } @@ -1576,18 +1576,18 @@ void func_enmy_800656D4(Actor* actor) { } Math_SmoothStepToAngle(&actor->obj.rot.z, var_fv0, 0.1f, 3.0f, 0.01f); } - if ((gGroundType == 4) && Ground_801B6AEC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + D_ctx_80177D20)) { + if ((gGroundType == 4) && Ground_801B6AEC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + gPathProgress)) { func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 5.0f); Object_Kill(&actor->obj, actor->sfxSource); } sp8C.x = actor->vel.x; sp8C.y = actor->vel.y; sp8C.z = actor->vel.z; - if ((Object_CheckCollision(actor->index, &actor->obj.pos, &sp8C, 1) != 0) || (actor->unk_0D0 != 0) || + if ((Object_CheckCollision(actor->index, &actor->obj.pos, &sp8C, 1) != 0) || (actor->dmgType != 0) || (actor->obj.pos.y < (gGroundHeight + 10.0f)) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 3.0f); Object_Kill(&actor->obj, actor->sfxSource); - if (actor->unk_0D0 != 0) { + if (actor->dmgType != 0) { actor->itemDrop = DROP_SILVER_RING_50p; if ((gCurrentLevel == LEVEL_CORNERIA)) { if (gLevelMode == LEVELMODE_ALL_RANGE) { @@ -1604,10 +1604,10 @@ void func_enmy_800656D4(Actor* actor) { func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); } if (gLevelMode == LEVELMODE_ON_RAILS) { - if (fabsf(actor->obj.pos.z - gPlayer[0].unk_138) < 100.0f) { + if (fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 100.0f) { actor->iwork[10] = 1; } - if (gPlayer[0].cam.eye.z < (actor->obj.pos.z + D_ctx_80177D20)) { + if (gPlayer[0].cam.eye.z < (actor->obj.pos.z + gPathProgress)) { Object_Kill(&actor->obj, actor->sfxSource); } } @@ -1649,12 +1649,12 @@ void Actor_Despawn(Actor* actor) { s32 i; if (gVersusMode) { - if ((actor->unk_0D4 > 0) && (actor->unk_0D4 < 5) && + if ((actor->dmgSource > 0) && (actor->dmgSource < 5) && !((D_versus_80178768[0] == 0) && (D_versus_80178768[1] == 0) && (D_versus_80178768[2] == 0))) { - D_ctx_80177C30[actor->unk_0D4 - 1] += actor->info.bonus; + gPlayerScores[actor->dmgSource - 1] += actor->info.bonus; } - } else if ((actor->obj.id != OBJ_ACTOR_ALLRANGE) || (actor->unk_0B6 != 1)) { - if ((actor->unk_0D4 == 1) && (actor->info.bonus != 0)) { + } else if (!((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->unk_0B6 == 1))) { + if ((actor->dmgSource == 1) && (actor->info.bonus != 0)) { gHitCount += actor->info.bonus; D_ctx_80177850 = 15; if ((gLevelMode == LEVELMODE_ALL_RANGE) && (gDropHitCountItem != 0)) { @@ -1751,10 +1751,10 @@ void func_enmy_8006654C(Actor* actor) { break; } actor->scale = 0.8f; - if (actor->unk_0D0 != 0) { + if (actor->dmgType != 0) { actor->obj.status = OBJ_DYING; actor->vel.y = RAND_FLOAT(5.0f) + 6.0f; - if (actor->unk_0D0 == 2) { + if (actor->dmgType == 2) { actor->vel.y = -2.0f; } actor->vel.z = -15.0f; @@ -1798,7 +1798,7 @@ void func_enmy_800669A0(Actor* actor) { } } else { actor->obj.rot.y += 5.0f; - if (actor->unk_0D0 != 0) { + if (actor->dmgType != 0) { func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y + 130.0f, actor->obj.pos.z, 8.0f); func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y + 130.0f, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, 4.0f, 5); @@ -1892,42 +1892,42 @@ void func_enmy_80066EA8(Scenery* scenery) { void func_enmy_80066EE4(Sprite* sprite) { } -void func_enmy_80066EF0(Item* item) { +void Item_CheckBounds(Item* this) { f32 var_fa1; if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY)) { - Object_Kill(&item->obj, item->sfxSource); + Object_Kill(&this->obj, this->sfxSource); } if ((gLevelMode == LEVELMODE_ON_RAILS) && (gLastPathChange == 0)) { var_fa1 = 900.0f; if (gPlayer[0].form != FORM_ARWING) { var_fa1 = 600.0f; } - if (item->obj.pos.x > gPlayer[0].unk_0AC + var_fa1) { - Math_SmoothStepToF(&item->obj.pos.x, gPlayer[0].unk_0AC + var_fa1, 0.1f, 10.0f, 0.01f); + if (this->obj.pos.x > gPlayer[0].xPath + var_fa1) { + Math_SmoothStepToF(&this->obj.pos.x, gPlayer[0].xPath + var_fa1, 0.1f, 10.0f, 0.01f); } - if (item->obj.pos.x < gPlayer[0].unk_0AC - var_fa1) { - Math_SmoothStepToF(&item->obj.pos.x, gPlayer[0].unk_0AC - var_fa1, 0.1f, 10.0f, 0.01f); + if (this->obj.pos.x < gPlayer[0].xPath - var_fa1) { + Math_SmoothStepToF(&this->obj.pos.x, gPlayer[0].xPath - var_fa1, 0.1f, 10.0f, 0.01f); } } - if (item->obj.pos.y > 650.0f) { - Math_SmoothStepToF(&item->obj.pos.y, 650.0f, 0.1f, 10.0f, 0.01f); + if (this->obj.pos.y > 650.0f) { + Math_SmoothStepToF(&this->obj.pos.y, 650.0f, 0.1f, 10.0f, 0.01f); } if (gLevelType == LEVELTYPE_PLANET) { - if (item->obj.pos.y < gGroundHeight + 70.0f) { - Math_SmoothStepToF(&item->obj.pos.y, gGroundHeight + 70.0f, 0.1f, 5.0f, 0.01f); + if (this->obj.pos.y < gGroundHeight + 70.0f) { + Math_SmoothStepToF(&this->obj.pos.y, gGroundHeight + 70.0f, 0.1f, 5.0f, 0.01f); } if ((gCurrentLevel == LEVEL_AQUAS) && (gBossActive != 0)) { - item->obj.pos.z += 20.0f; + this->obj.pos.z += 20.0f; } - } else if (item->obj.pos.y < -500.0f) { - Math_SmoothStepToF(&item->obj.pos.y, -500.0f, 0.1f, 5.0f, 0.01f); + } else if (this->obj.pos.y < -500.0f) { + Math_SmoothStepToF(&this->obj.pos.y, -500.0f, 0.1f, 5.0f, 0.01f); } - if (gVersusMode && (item->index == 0) && (gItems[1].obj.status == OBJ_ACTIVE)) { - if (fabsf(item->obj.pos.x - gItems[1].obj.pos.x) < 200.0f) { - if (fabsf(item->obj.pos.z - gItems[1].obj.pos.z) < 200.0f) { - item->obj.pos.x = item->obj.pos.x - 5.0f; - item->obj.pos.z = item->obj.pos.z - 5.0f; + if (gVersusMode && (this->index == 0) && (gItems[1].obj.status == OBJ_ACTIVE)) { + if (fabsf(this->obj.pos.x - gItems[1].obj.pos.x) < 200.0f) { + if (fabsf(this->obj.pos.z - gItems[1].obj.pos.z) < 200.0f) { + this->obj.pos.x = this->obj.pos.x - 5.0f; + this->obj.pos.z = this->obj.pos.z - 5.0f; gItems[1].obj.pos.x += 5.0f; gItems[1].obj.pos.z += 5.0f; } @@ -1935,29 +1935,29 @@ void func_enmy_80066EF0(Item* item) { } } -void func_enmy_800671D0(Item* item) { - s32 var_v0; +void Item_SpinPickup(Item* this) { + s32 sparkleMask; Vec3f sp40; Vec3f sp34; - Math_SmoothStepToF(&item->unk_50, 10.0f, 1.0f, 2.0f, 0.0f); - if (item->unk_50 > 30.0f) { - var_v0 = 0; - } else if (item->unk_50 > 20.0f) { - var_v0 = 1; + Math_SmoothStepToF(&this->unk_50, 10.0f, 1.0f, 2.0f, 0.0f); + if (this->unk_50 > 30.0f) { + sparkleMask = 1 - 1; + } else if (this->unk_50 > 20.0f) { + sparkleMask = 2 - 1; } else { - var_v0 = 7; + sparkleMask = 8 - 1; } - if (!(var_v0 & gGameFrameCount)) { + if (!(sparkleMask & gGameFrameCount)) { Matrix_RotateY(gCalcMatrix, gGameFrameCount * 23.0f * M_DTOR, MTXF_NEW); sp40.x = 50.0f; sp40.y = RAND_FLOAT_CENTERED(120.0f); sp40.z = 0.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp40, &sp34); - func_effect_80078E50(item->obj.pos.x + sp34.x, item->obj.pos.y + sp34.y, item->obj.pos.z + sp34.z, 3.0f); + func_effect_80078E50(this->obj.pos.x + sp34.x, this->obj.pos.y + sp34.y, this->obj.pos.z + sp34.z, 3.0f); } - item->obj.rot.y += item->unk_50; - item->obj.rot.y = Math_ModF(item->obj.rot.y, 360.0f); + this->obj.rot.y += this->unk_50; + this->obj.rot.y = Math_ModF(this->obj.rot.y, 360.0f); } void func_enmy_80067348(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 arg6, f32 arg7, f32 arg8) { @@ -2003,8 +2003,8 @@ void ActorSupplies_Update(ActorSupplies* this) { Math_SmoothStepToF(&this->obj.pos.y, 300.0f, 0.05f, 50.0f, 0.01f); } } - if (this->unk_0D0 != 0) { - this->unk_0D0 = 0; + if (this->dmgType != 0) { + this->dmgType = 0; this->health -= this->damage; if (this->health <= 0) { func_effect_8007A6F0(&this->obj.pos, 0x2903A008); @@ -2035,7 +2035,7 @@ void ActorSupplies_Update(ActorSupplies* this) { gRadarMarks[63].pos.x = this->obj.pos.x; gRadarMarks[63].pos.y = this->obj.pos.y; gRadarMarks[63].pos.z = this->obj.pos.z; - gRadarMarks[63].unk_10 = 0.0f; + gRadarMarks[63].yRot = 0.0f; } void ActorSupplies_Draw(Actor* actor) { @@ -2073,8 +2073,8 @@ void func_enmy_80067A40(void) { } void Item1up_Update(Item1UP* this) { - func_enmy_80066EF0(this); - func_enmy_800671D0(this); + Item_CheckBounds(this); + Item_SpinPickup(this); if (this->collected) { Object_Kill(&this->obj, this->sfxSource); func_enmy_80060F30(gPlayer[this->playerNum].sfxSource, 0x4900C024, this->playerNum); @@ -2088,12 +2088,12 @@ void Item1up_Update(Item1UP* this) { } void ItemPickup_Update(Item* this) { - func_enmy_80066EF0(this); - func_enmy_800671D0(this); + Item_CheckBounds(this); + Item_SpinPickup(this); if (this->state == 0) { switch (this->obj.id) { case OBJ_ITEM_BOMB: - this->scale = 18.0f; + this->width = 18.0f; if (this->collected) { this->timer_4A = 50; this->state = 1; @@ -2105,7 +2105,7 @@ void ItemPickup_Update(Item* this) { } break; case OBJ_ITEM_LASERS: - this->scale = 18.0f; + this->width = 18.0f; if (this->collected) { this->timer_4A = 50; this->state = 1; @@ -2127,14 +2127,14 @@ void ItemPickup_Update(Item* this) { break; } } else { - Math_SmoothStepToF(&this->scale, 2.5f, 1.0f, 0.5f, 0.0f); + Math_SmoothStepToF(&this->width, 2.5f, 1.0f, 0.5f, 0.0f); this->obj.pos.x += (gPlayer[this->playerNum].pos.x - this->obj.pos.x) * 0.5f; if (gPlayer[this->playerNum].form == FORM_LANDMASTER) { this->obj.pos.y += ((gPlayer[this->playerNum].pos.y + 50.0f) - this->obj.pos.y) * 0.5f; } else { this->obj.pos.y += (gPlayer[this->playerNum].pos.y - this->obj.pos.y) * 0.5f; } - this->obj.pos.z += (gPlayer[this->playerNum].unk_138 - this->obj.pos.z) * 0.5f; + this->obj.pos.z += (gPlayer[this->playerNum].trueZpos - this->obj.pos.z) * 0.5f; if (this->timer_48 == 0) { Object_Kill(&this->obj, this->sfxSource); } @@ -2159,9 +2159,9 @@ void ItemSupplyRing_Update(Item* this) { switch (this->state) { case 0: - Math_SmoothStepToF(&this->scale, 0.4f, 1.0f, 0.05f, 0.0f); - func_enmy_80066EF0(this); - func_enmy_800671D0(this); + Math_SmoothStepToF(&this->width, 0.4f, 1.0f, 0.05f, 0.0f); + Item_CheckBounds(this); + Item_SpinPickup(this); if (this->collected) { this->state = 1; this->timer_48 = 50; @@ -2179,7 +2179,7 @@ void ItemSupplyRing_Update(Item* this) { } gPlayer[this->playerNum].heal += 32; BonusText_Display(gPlayer[this->playerNum].pos.x, gPlayer[this->playerNum].pos.y, - gPlayer[this->playerNum].unk_138, BONUS_TEXT_1UP); + gPlayer[this->playerNum].trueZpos, BONUS_TEXT_1UP); } else { gPlayer[this->playerNum].heal += 32; func_enmy_80060F30(gPlayer[this->playerNum].sfxSource, 0x49003013, this->playerNum); @@ -2195,9 +2195,9 @@ void ItemSupplyRing_Update(Item* this) { break; case 1: if (this->timer_48 > 30) { - Math_SmoothStepToF(&this->scale, 1.0f, 1.0f, 0.06f, 0.0f); + Math_SmoothStepToF(&this->width, 1.0f, 1.0f, 0.06f, 0.0f); } else { - Math_SmoothStepToF(&this->scale, 0.0f, 1.0f, 0.06f, 0.0f); + Math_SmoothStepToF(&this->width, 0.0f, 1.0f, 0.06f, 0.0f); } this->obj.pos.x += (gPlayer[this->playerNum].pos.x - this->obj.pos.x) * 0.5f; if (gPlayer[this->playerNum].form == FORM_LANDMASTER) { @@ -2206,9 +2206,9 @@ void ItemSupplyRing_Update(Item* this) { this->obj.pos.y += (gPlayer[this->playerNum].pos.y - this->obj.pos.y) * 0.5f; } 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; + this->obj.pos.z += (gPlayer[this->playerNum].trueZpos - 300.0f - this->obj.pos.z) * 0.3f; } else { - this->obj.pos.z += (gPlayer[this->playerNum].unk_138 - this->obj.pos.z) * 0.5f; + this->obj.pos.z += (gPlayer[this->playerNum].trueZpos - this->obj.pos.z) * 0.5f; } this->obj.rot.z += 22.0f; Math_SmoothStepToAngle(&this->obj.rot.y, Math_RadToDeg(-gPlayer[this->playerNum].camYaw), 0.2f, 10.0f, @@ -2216,11 +2216,11 @@ void ItemSupplyRing_Update(Item* this) { if (this->timer_48 == 0) { Object_Kill(&this->obj, this->sfxSource); } - if (this->scale > 0.3f) { + if (this->width > 0.3f) { Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_RotateZ(gCalcMatrix, gGameFrameCount * 37.0f * M_DTOR, MTXF_APPLY); sp4C.x = 0.0f; - sp4C.y = this->scale * 100.0f; + sp4C.y = this->width * 100.0f; sp4C.z = 0.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp4C, &sp40); func_effect_80078E50(this->obj.pos.x + sp40.x, this->obj.pos.y + sp40.y, this->obj.pos.z + sp40.z, @@ -2239,8 +2239,8 @@ void ItemGoldRing_Update(ItemGoldRing* this) { } void ItemWingRepair_Update(ItemWingRepair* this) { - func_enmy_80066EF0(this); - func_enmy_800671D0(this); + Item_CheckBounds(this); + Item_SpinPickup(this); if (this->collected) { func_enmy_80067A40(); Object_Kill(&this->obj, this->sfxSource); @@ -2251,16 +2251,16 @@ void ItemWingRepair_Update(ItemWingRepair* this) { } void ItemMeteoWarp_Update(ItemMeteoWarp* this) { - func_enmy_80066EF0(this); + Item_CheckBounds(this); if (this->state > 0) { if (this->state == 1) { this->obj.rot.z -= 10.0f; this->obj.pos.x += (gPlayer[this->playerNum].pos.x - this->obj.pos.x) * 0.3f; this->obj.pos.y += (gPlayer[this->playerNum].pos.y - this->obj.pos.y) * 0.3f; - this->obj.pos.z += (gPlayer[this->playerNum].unk_138 - this->obj.pos.z) * 0.3f; - this->scale -= 5.0f; - if (this->scale < 0.0f) { - this->scale = 0.0f; + this->obj.pos.z += (gPlayer[this->playerNum].trueZpos - this->obj.pos.z) * 0.3f; + this->width -= 5.0f; + if (this->width < 0.0f) { + this->width = 0.0f; } } this->unk_44 -= 10; @@ -2268,14 +2268,14 @@ void ItemMeteoWarp_Update(ItemMeteoWarp* this) { Object_Kill(&this->obj, this->sfxSource); } } else { - this->scale = 100.0f; + this->width = 100.0f; if (gRingPassCount < 0) { this->state = 2; this->unk_44 = 255; } else if (this->collected) { this->state = 1; this->unk_44 = 255; - gPlayer[this->playerNum].timer_27C = 100; + gPlayer[this->playerNum].meteoWarpTimer = 100; AUDIO_PLAY_SFX(gWarpRingSfx[gRingPassCount], gPlayer[0].sfxSource, 0); if (gRingPassCount == 0) { gPlayer[0].boostSpeed = 0.0f; @@ -2283,7 +2283,7 @@ void ItemMeteoWarp_Update(ItemMeteoWarp* this) { gRingPassCount++; if (gRingPassCount >= 7) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ENTER_WARP_ZONE; - gPlayer[0].unk_1D0 = 0; + gPlayer[0].csState = 0; AUDIO_PLAY_SFX(0x1900602A, gDefaultSfxSource, 0); gMissionStatus = MISSION_WARP; gLeveLClearStatus[gCurrentLevel] = 1; @@ -2295,7 +2295,7 @@ void ItemMeteoWarp_Update(ItemMeteoWarp* this) { void ItemCheckpoint_Update(ItemCheckpoint* this) { s32 i; - func_enmy_80066EF0(this); + Item_CheckBounds(this); this->unk_58 -= this->unk_44; if (this->state > 0) { this->unk_44++; @@ -2306,30 +2306,30 @@ void ItemCheckpoint_Update(ItemCheckpoint* this) { this->obj.pos.y += (gPlayer[this->playerNum].pos.y - this->obj.pos.y) * 0.3f; } if (gPlayer[0].cockpitView) { - this->obj.pos.z += (gPlayer[this->playerNum].unk_138 - 200.0f - this->obj.pos.z) * 0.3f; + this->obj.pos.z += (gPlayer[this->playerNum].trueZpos - 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; + this->obj.pos.z += (gPlayer[this->playerNum].trueZpos - 100.0f - this->obj.pos.z) * 0.3f; } if (this->timer_48 == 0) { - Math_SmoothStepToF(&this->scale, 5.0f, 0.2f, 15.0f, 0.01f); + Math_SmoothStepToF(&this->width, 5.0f, 0.2f, 15.0f, 0.01f); Math_SmoothStepToF(&this->unk_50, 0.0f, 0.1f, 0.03f, 0.0f); Math_SmoothStepToF(&this->unk_54, 4.0f, 0.1f, 0.2f, 0.01f); } - if (this->scale <= 6.5f) { + if (this->width <= 6.5f) { Object_Kill(&this->obj, this->sfxSource); } } else { this->unk_44 = 2; this->unk_50 = 1.0f; this->unk_54 = 1.0f; - this->scale = 100.0f; + this->width = 100.0f; if (this->collected) { gPlayer[this->playerNum].heal = 128; this->state++; this->timer_48 = 15; gSavedGroundSurface = gGroundSurface; - D_ctx_80177CB0 = -this->obj.pos.z; - D_ctx_80177CB0 -= 250.0f; + gSavedPathProgress = -this->obj.pos.z; + gSavedPathProgress -= 250.0f; gSavedObjectLoadIndex = gObjectLoadIndex; gSavedZoSearchlightStatus = gMissedZoSearchlight; gSavedHitCount = gHitCount; @@ -2341,9 +2341,9 @@ void ItemCheckpoint_Update(ItemCheckpoint* this) { } } -void ItemRingCheck_Update(Item* item) { - if (item->collected) { - Object_Kill(&item->obj, item->sfxSource); +void ItemRingCheck_Update(Item* this) { + if (this->collected) { + Object_Kill(&this->obj, this->sfxSource); gRingPassCount++; } } @@ -2354,14 +2354,14 @@ void ItemPathChange_Update(Item* this) { Object_Kill(&this->obj, this->sfxSource); } else if (((gCurrentLevel == LEVEL_METEO) || (gCurrentLevel == LEVEL_SECTOR_X)) && (gLevelPhase == 1)) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; - gPlayer[0].unk_1D0 = 0; + gPlayer[0].csState = 0; Object_Kill(&this->obj, this->sfxSource); } else if (gCurrentLevel == LEVEL_TRAINING) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_START_360; - gPlayer[0].unk_1D0 = 0; + gPlayer[0].csState = 0; Object_Kill(&this->obj, this->sfxSource); } else if (this->state == 0) { - if (((this->obj.pos.z + D_ctx_80177D20) > -2700.0f) && (fabsf(this->obj.pos.x - gPlayer[0].pos.x) < 1000.0f)) { + if (((this->obj.pos.z + gPathProgress) > -2700.0f) && (fabsf(this->obj.pos.x - gPlayer[0].pos.x) < 1000.0f)) { switch (this->obj.id) { case OBJ_ITEM_PATH_SPLIT_Y: case OBJ_ITEM_PATH_TURN_UP: @@ -2380,42 +2380,42 @@ void ItemPathChange_Update(Item* this) { } if (this->collected) { Object_Kill(&this->obj, this->sfxSource); - gPlayer[0].unk_0B4 = 0.0f; - gPlayer[0].timer_210 = this->scale * 0.05f; + gPlayer[0].pathStep = 0.0f; + gPlayer[0].timer_210 = this->width * 0.05f; switch (this->obj.id) { case OBJ_ITEM_PATH_SPLIT_X: if (this->obj.pos.x < gPlayer[0].pos.x) { - gPlayer[0].unk_118 = -30.0f; - gPlayer[0].unk_0B8 = gPlayer[0].unk_0AC + this->scale; + gPlayer[0].yRot_118 = -30.0f; + gPlayer[0].xPathTarget = gPlayer[0].xPath + this->width; } else { - gPlayer[0].unk_118 = 30.0f; - gPlayer[0].unk_0B8 = gPlayer[0].unk_0AC - this->scale; + gPlayer[0].yRot_118 = 30.0f; + gPlayer[0].xPathTarget = gPlayer[0].xPath - this->width; } break; case OBJ_ITEM_PATH_TURN_LEFT: - gPlayer[0].unk_118 = 30.0f; - gPlayer[0].unk_0B8 = gPlayer[0].unk_0AC - this->scale; + gPlayer[0].yRot_118 = 30.0f; + gPlayer[0].xPathTarget = gPlayer[0].xPath - this->width; break; case OBJ_ITEM_PATH_TURN_RIGHT: - gPlayer[0].unk_118 = -30.0f; - gPlayer[0].unk_0B8 = gPlayer[0].unk_0AC + this->scale; + gPlayer[0].yRot_118 = -30.0f; + gPlayer[0].xPathTarget = gPlayer[0].xPath + this->width; break; case OBJ_ITEM_PATH_SPLIT_Y: if (this->obj.pos.y < gPlayer[0].pos.y) { - gPlayer[0].unk_124 = 30.0f; - gPlayer[0].unk_0BC = gPlayer[0].unk_0B0 + this->scale; + gPlayer[0].xRot_124 = 30.0f; + gPlayer[0].yPathTarget = gPlayer[0].yPath + this->width; } else { - gPlayer[0].unk_124 = -30.0f; - gPlayer[0].unk_0BC = gPlayer[0].unk_0B0 - this->scale; + gPlayer[0].xRot_124 = -30.0f; + gPlayer[0].yPathTarget = gPlayer[0].yPath - this->width; } break; case OBJ_ITEM_PATH_TURN_UP: - gPlayer[0].unk_124 = 30.0f; - gPlayer[0].unk_0BC = gPlayer[0].unk_0B0 + this->scale; + gPlayer[0].xRot_124 = 30.0f; + gPlayer[0].yPathTarget = gPlayer[0].yPath + this->width; break; case OBJ_ITEM_PATH_TURN_DOWN: - gPlayer[0].unk_124 = -30.0f; - gPlayer[0].unk_0BC = gPlayer[0].unk_0B0 - this->scale; + gPlayer[0].xRot_124 = -30.0f; + gPlayer[0].yPathTarget = gPlayer[0].yPath - this->width; break; } } @@ -2423,10 +2423,10 @@ void ItemPathChange_Update(Item* this) { } void Sprite_UpdateDoodad(Sprite* this) { - this->obj.rot.y = (Math_Atan2F(gPlayer[0].cam.eye.x - this->obj.pos.x, - gPlayer[0].cam.eye.z - (this->obj.pos.z + D_ctx_80177D20)) * - 180.0f) / - M_PI; + this->obj.rot.y = + (Math_Atan2F(gPlayer[0].cam.eye.x - this->obj.pos.x, gPlayer[0].cam.eye.z - (this->obj.pos.z + gPathProgress)) * + 180.0f) / + M_PI; if (this->unk_46 != 0) { this->obj.status = OBJ_FREE; func_effect_8007A6F0(&this->obj.pos, 0x1903400F); @@ -2458,7 +2458,7 @@ void Object_Dying(s32 index, ObjectId objId) { func_enmy2_800763A4(&gActors[index]); break; case OBJ_ACTOR_194: - Actor194_Init(&gActors[index]); + Actor194_Dying(&gActors[index]); break; case OBJ_ACTOR_186: Meteo_80187B08(&gActors[index]); @@ -2488,48 +2488,50 @@ void Object_Dying(s32 index, ObjectId objId) { } void Actor_Move(Actor* actor) { + f32 var_fv0; + actor->obj.pos.x += actor->vel.x; actor->obj.pos.z += actor->vel.z; actor->obj.pos.y += actor->vel.y; actor->vel.y -= actor->gravity; - if ((D_ctx_80161AB8 != 0) && (actor->obj.id != OBJ_ACTOR_TEAM_BOSS) && - ((gCurrentLevel != LEVEL_MACBETH) || (actor->obj.id == OBJ_ACTOR_EVENT))) { - f32 var_fv0 = 4000.0f; + if (!gCullObjects || (actor->obj.id == OBJ_ACTOR_TEAM_BOSS) || + ((gCurrentLevel == LEVEL_MACBETH) && (actor->obj.id != OBJ_ACTOR_EVENT))) { + return; + } + var_fv0 = 4000.0f; - if ((actor->obj.id == OBJ_ACTOR_236) || (gCurrentLevel == LEVEL_MACBETH) || - ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0B4 == EINFO_56))) { - var_fv0 = 8000.0f; - } else if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ENTER_WARP_ZONE) { - var_fv0 = 100000.0f; - } - if (((gPlayer[0].cam.eye.z + actor->info.unk_10) < (actor->obj.pos.z + D_ctx_80177D20)) || - ((actor->obj.pos.z + D_ctx_80177D20) < -15000.0f) || (actor->obj.pos.y < (gPlayer[0].unk_0B0 - var_fv0)) || - ((gPlayer[0].unk_0B0 + var_fv0) < actor->obj.pos.y) || - ((gPlayer[0].unk_0AC + var_fv0) < actor->obj.pos.x) || - (actor->obj.pos.x < (gPlayer[0].unk_0AC - var_fv0))) { - Object_Kill(&actor->obj, actor->sfxSource); - switch (actor->obj.id) { - case OBJ_ACTOR_236: - D_ctx_801784A4 = 0; - break; - case OBJ_ACTOR_229: - Titania_8018E3B0(actor); - break; - case OBJ_ACTOR_194: + if ((actor->obj.id == OBJ_ACTOR_236) || (gCurrentLevel == LEVEL_MACBETH) || + ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0B4 == EINFO_56))) { + var_fv0 = 8000.0f; + } else if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ENTER_WARP_ZONE) { + var_fv0 = 100000.0f; + } + if (((gPlayer[0].cam.eye.z + actor->info.cullDistance) < (actor->obj.pos.z + gPathProgress)) || + ((actor->obj.pos.z + gPathProgress) < -15000.0f) || (actor->obj.pos.y < (gPlayer[0].yPath - var_fv0)) || + ((gPlayer[0].yPath + var_fv0) < actor->obj.pos.y) || ((gPlayer[0].xPath + var_fv0) < actor->obj.pos.x) || + (actor->obj.pos.x < (gPlayer[0].xPath - var_fv0))) { + Object_Kill(&actor->obj, actor->sfxSource); + switch (actor->obj.id) { + case OBJ_ACTOR_236: + D_ctx_801784A4 = 0; + break; + case OBJ_ACTOR_229: + Titania_8018E3B0(actor); + break; + case OBJ_ACTOR_194: + gActor194Status[actor->unk_046] = 0; + break; + case OBJ_ACTOR_EVENT: + if ((actor->unk_0B4 >= EINFO_200) && (actor->unk_0B4 < EINFO_300)) { gActor194Status[actor->unk_046] = 0; - break; - case OBJ_ACTOR_EVENT: - if ((actor->unk_0B4 >= EINFO_200) && (actor->unk_0B4 < EINFO_300)) { - gActor194Status[actor->unk_046] = 0; - } else if ((actor->unk_0B4 == EINFO_38) && (actor->unk_046 != 2)) { - gRingPassCount = -1; - } - break; - case OBJ_ACTOR_252: - gMissedZoSearchlight = true; - break; - } + } else if ((actor->unk_0B4 == EINFO_38) && (actor->unk_046 != 2)) { + gRingPassCount = -1; + } + break; + case OBJ_ACTOR_252: + gMissedZoSearchlight = true; + break; } } } @@ -2539,7 +2541,7 @@ void Boss_Move(Boss* boss) { boss->obj.pos.y += boss->vel.y; boss->obj.pos.z += boss->vel.z; boss->vel.y -= boss->gravity; - if ((D_ctx_80161AB8 != 0) && ((boss->obj.pos.z + D_ctx_80177D20) > (boss->info.unk_10 - gPlayer[0].cam.eye.z))) { + if (gCullObjects && ((boss->obj.pos.z + gPathProgress) > (boss->info.cullDistance - gPlayer[0].cam.eye.z))) { if (gPlayer[0].cam.eye.z) {} // fake Object_Kill(&boss->obj, boss->sfxSource); } @@ -2548,7 +2550,7 @@ void Boss_Move(Boss* boss) { void Scenery_Move(Scenery* scenery) { if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) { scenery->obj.pos.z += scenery->unk_60; - if (scenery->info.unk_10 < scenery->obj.pos.z) { + if (scenery->info.cullDistance < scenery->obj.pos.z) { Object_Kill(&scenery->obj, scenery->sfxSource); } } else if ((gLevelMode == LEVELMODE_ON_RAILS) && (gBossActive != 2)) { @@ -2559,18 +2561,18 @@ void Scenery_Move(Scenery* scenery) { var_fa0 = 1000.0f; } temp_fv0 = ((temp_fv0 - var_fa0) < 0.0f) ? 0.0f : (temp_fv0 - var_fa0) * 1.7f; - if ((fabsf(gPlayer[0].unk_114) > 1.0f) || (gCurrentLevel == LEVEL_MACBETH)) { + if ((fabsf(gPlayer[0].yRot_114) > 1.0f) || (gCurrentLevel == LEVEL_MACBETH)) { temp_fv0 = 0.0f; } temp_fv0 -= gPlayer[0].cam.eye.z; - if ((scenery->info.unk_10 - temp_fv0) < (scenery->obj.pos.z + D_ctx_80177D20)) { + if ((scenery->info.cullDistance - temp_fv0) < (scenery->obj.pos.z + gPathProgress)) { Object_Kill(&scenery->obj, scenery->sfxSource); } } } void Sprite_Move(Sprite* sprite) { - if (D_ctx_80161AB8 != 0) { + if (gCullObjects) { f32 temp_fv0 = fabsf(sprite->obj.pos.x - gPlayer[0].cam.eye.x); f32 var_fa0 = 500.0f; @@ -2581,7 +2583,7 @@ void Sprite_Move(Sprite* sprite) { } temp_fv0 = ((temp_fv0 - var_fa0) < 0.0f) ? 0.0f * 1.7f : (temp_fv0 - var_fa0) * 1.7f; temp_fv0 -= gPlayer[0].cam.eye.z; - if ((sprite->info.unk_10 - temp_fv0) < (sprite->obj.pos.z + D_ctx_80177D20)) { + if ((sprite->info.cullDistance - temp_fv0) < (sprite->obj.pos.z + gPathProgress)) { sprite->obj.status = OBJ_FREE; } } @@ -2591,8 +2593,8 @@ void Effect_Move(Effect* effect) { effect->obj.pos.x += effect->vel.x; effect->obj.pos.y += effect->vel.y; effect->obj.pos.z += effect->vel.z; - if (D_ctx_80161AB8 != 0) { - if ((gPlayer[0].cam.eye.z + effect->info.unk_10) < (effect->obj.pos.z + D_ctx_80177D20)) { + if (gCullObjects) { + if ((gPlayer[0].cam.eye.z + effect->info.cullDistance) < (effect->obj.pos.z + gPathProgress)) { Object_Kill(&effect->obj, effect->sfxSource); } else if ((fabsf(effect->obj.pos.y - gPlayer[0].cam.eye.y) > 25000.0f) || (fabsf(effect->obj.pos.x - gPlayer[0].cam.eye.x) > 25000.0f)) { @@ -2602,10 +2604,10 @@ void Effect_Move(Effect* effect) { } void Item_Move(Item* item) { - if (D_ctx_80161AB8 != 0) { + if (gCullObjects) { f32 temp = (0.0f - gPlayer[0].cam.eye.z); - if ((item->info.unk_10 - temp) < (item->obj.pos.z + D_ctx_80177D20)) { + if ((item->info.cullDistance - temp) < (item->obj.pos.z + gPathProgress)) { Object_Kill(&item->obj, item->sfxSource); if ((item->obj.id == OBJ_ITEM_METEO_WARP) && (item->state == 0)) { gRingPassCount = -1; @@ -2798,36 +2800,36 @@ void Effect_Update(Effect* this) { void TexturedLine_Update(TexturedLine* this) { Vec3f sp44; Vec3f sp38; - f32 sp34; - f32 sp30; - f32 sp2C; + f32 dx; + f32 dy; + f32 dz; if (this->timer != 0) { this->timer--; } - sp34 = this->unk_04.x - this->unk_10.x; - sp30 = this->unk_04.y - this->unk_10.y; - sp2C = this->unk_04.z - this->unk_10.z; - this->unk_20 = Math_Atan2F(sp34, sp2C); - this->unk_1C = -Math_Atan2F(sp30, sqrtf(SQ(sp34) + SQ(sp2C))); + dx = this->posAA.x - this->posBB.x; + dy = this->posAA.y - this->posBB.y; + dz = this->posAA.z - this->posBB.z; + this->yRot = Math_Atan2F(dx, dz); + this->xRot = -Math_Atan2F(dy, sqrtf(SQ(dx) + SQ(dz))); if (this->mode != 4) { - this->unk_24 = sqrtf(SQ(sp34) + SQ(sp30) + SQ(sp2C)); + this->zScale = sqrtf(SQ(dx) + SQ(dy) + SQ(dz)); } if (gGameState == GSTATE_PLAY) { if (((this->mode == 1) || (this->mode == 101) || (this->mode == 50)) && - (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (gPlayer[0].unk_1F4 == 0)) { - Matrix_RotateX(gCalcMatrix, -this->unk_1C, MTXF_NEW); - Matrix_RotateY(gCalcMatrix, -this->unk_20, MTXF_APPLY); - sp44.x = gPlayer[gPlayerNum].pos.x - this->unk_04.x; - sp44.y = gPlayer[gPlayerNum].pos.y - this->unk_04.y; - sp44.z = gPlayer[gPlayerNum].unk_138 - this->unk_04.z; + (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (gPlayer[0].hitTimer == 0)) { + Matrix_RotateX(gCalcMatrix, -this->xRot, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, -this->yRot, MTXF_APPLY); + sp44.x = gPlayer[gPlayerNum].pos.x - this->posAA.x; + sp44.y = gPlayer[gPlayerNum].pos.y - this->posAA.y; + sp44.z = gPlayer[gPlayerNum].trueZpos - this->posAA.z; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); - sp38.x += this->unk_04.x; - sp38.y += this->unk_04.y; - sp38.z += this->unk_04.z; - if ((fabsf(sp38.x - this->unk_04.x) < 30.0f) && (fabsf(sp38.y - this->unk_04.y) < 30.0f) && - (sp38.z < this->unk_04.z) && ((this->unk_04.z - this->unk_24) < sp38.z)) { + sp38.x += this->posAA.x; + sp38.y += this->posAA.y; + sp38.z += this->posAA.z; + if ((fabsf(sp38.x - this->posAA.x) < 30.0f) && (fabsf(sp38.y - this->posAA.y) < 30.0f) && + (sp38.z < this->posAA.z) && ((this->posAA.z - this->zScale) < sp38.z)) { if (gCurrentLevel == LEVEL_AQUAS) { Player_ApplyDamage(&gPlayer[0], 0, 30); } else { @@ -2838,7 +2840,7 @@ void TexturedLine_Update(TexturedLine* this) { } } } - if (((this->unk_04.z + D_ctx_80177D20) > 1000.0f) && (gLevelMode != LEVELMODE_ALL_RANGE)) { + if (((this->posAA.z + gPathProgress) > 1000.0f) && (gLevelMode != LEVELMODE_ALL_RANGE)) { this->mode = 0; } if (((this->mode == 3) || (this->mode == 50)) && (this->timer == 0)) { @@ -2869,12 +2871,12 @@ void Object_Update(void) { Item* item; Effect* effect; - D_ctx_80161AB8 = 0; + gCullObjects = false; if ((gLevelMode == LEVELMODE_ON_RAILS) && ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_INIT) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_DOWN) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ENTER_WARP_ZONE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_START_360) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_NEXT))) { - D_ctx_80161AB8 = 1; + gCullObjects = true; } if (gLevelMode != LEVELMODE_ALL_RANGE) { if ((gLoadLevelObjects != 0) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) { diff --git a/src/engine/fox_enmy2.c b/src/engine/fox_enmy2.c index 64ff8b25..6b8b44c8 100644 --- a/src/engine/fox_enmy2.c +++ b/src/engine/fox_enmy2.c @@ -103,7 +103,7 @@ void Obj54_8006AA3C(f32 xPos, f32 yPos, f32 zPos) { } } -void Obj54_Update(Scenery_54* this) { +void Scenery54_Update(Scenery_54* this) { Vec3f sp24; Vec3f sp18; @@ -134,7 +134,7 @@ void Actor201_Update(Actor201* this) { func_effect_8007F11C(OBJ_EFFECT_353, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, gEnemyShotSpeed); this->timer_0BC = 20; } - sp2C = this->obj.pos.z + D_ctx_80177D20; + sp2C = this->obj.pos.z + gPathProgress; this->obj.rot.y = Math_RadToDeg(Math_Atan2F(gPlayer[0].cam.eye.x - this->obj.pos.x, gPlayer[0].cam.eye.z - sp2C)); this->obj.rot.x = -Math_RadToDeg( Math_Atan2F(gPlayer[0].cam.eye.y - this->obj.pos.y, @@ -147,7 +147,7 @@ void Actor202_Update(Actor202* this) { this->gravity = 1.5f; sp34 = false; this->obj.rot.y = Math_RadToDeg( - Math_Atan2F(gPlayer[gPlayerNum].pos.x - this->obj.pos.x, gPlayer[gPlayerNum].unk_138 - this->obj.pos.z)); + Math_Atan2F(gPlayer[gPlayerNum].pos.x - this->obj.pos.x, gPlayer[gPlayerNum].trueZpos - this->obj.pos.z)); if (this->obj.pos.y < -500.0f) { this->obj.pos.y = -500.0f; this->vel.y = 0.0f; @@ -209,9 +209,9 @@ void Actor202_Update(Actor202* this) { break; } - if (this->unk_0D0 != 0) { + if (this->dmgType != 0) { this->health -= 10; - if ((this->health <= 0) || (this->unk_0D0 >= 2)) { + if ((this->health <= 0) || (this->dmgType >= 2)) { func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y + 180.0f, this->obj.pos.z, 10.0f); func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y + 180.0f, this->obj.pos.z, this->vel.x, this->vel.y, this->vel.z, 8.0f, 30); @@ -220,7 +220,7 @@ void Actor202_Update(Actor202* this) { gHitCount += this->info.bonus; D_ctx_80177850 = 15; } else { - this->unk_0D0 = 0; + this->dmgType = 0; this->timer_0C6 = 20; AUDIO_PLAY_SFX(0x2903300E, this->sfxSource, 4); func_effect_8007D1E0(this->obj.pos.x, this->obj.pos.y + 180.0f, this->obj.pos.z, 5.0f); @@ -240,7 +240,7 @@ static f32 D_800CFFC4[16] = { }; static Gfx* D_800D0004[3] = { D_ENMY_SPACE_4000170, D_ENMY_SPACE_40084D0, D_ENMY_SPACE_400A630 }; -void Actor194_Init(Actor194* this) { +void Actor194_Dying(Actor194* this) { Vec3f sp34; s32 temp_hi; @@ -294,7 +294,7 @@ void Actor194_8006B46C(Actor194* this, f32 xTrans, f32 yTrans, f32 zTrans, f32 x Vec3f sp34 = { 0.0f, 0.0f, 0.0f }; Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, xTrans, yTrans, zTrans + D_ctx_80177D20, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, xTrans, yTrans, zTrans + gPathProgress, MTXF_APPLY); if (arg7 != 1) { Matrix_RotateY(gGfxMatrix, M_DTOR * yRot, MTXF_APPLY); @@ -308,9 +308,9 @@ void Actor194_8006B46C(Actor194* this, f32 xTrans, f32 yTrans, f32 zTrans, f32 x if (arg7 != 1) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); if ((arg7 == 0) && (this->lockOnTimers[TEAM_ID_FOX] != 0)) { - sp34.y += this->info.unk_1C; - Matrix_MultVec3f(gGfxMatrix, &sp34, D_display_80161578); - if (D_display_80161578->z > -500.0f) { + sp34.y += this->info.targetOffset; + Matrix_MultVec3f(gGfxMatrix, &sp34, &gLockOnTargetViewPos[TEAM_ID_FOX]); + if (gLockOnTargetViewPos[TEAM_ID_FOX].z > -500.0f) { this->lockOnTimers[TEAM_ID_FOX] = 0; } } @@ -341,7 +341,7 @@ void Actor194_Draw(Actor194* this) { } } -void Obj42_Update(Scenery_42* this) { +void Scenery42_Update(Scenery_42* this) { this->obj.pos.x += this->vel.x; this->obj.pos.y += this->vel.y; this->obj.pos.z += this->vel.z; @@ -424,7 +424,7 @@ void Actor196_Update(Actor196* this) { this->vel.x = sp44.x; this->vel.y = sp44.y; this->vel.z = sp44.z; - if (fabsf((this->obj.pos.z + this->fwork[10]) - gPlayer[0].unk_138) < 3000.0f) { + if (fabsf((this->obj.pos.z + this->fwork[10]) - gPlayer[0].trueZpos) < 3000.0f) { this->state = 2; this->timer_0BC = 20; this->vel.z = 0.0f; @@ -478,13 +478,13 @@ void Actor196_Update(Actor196* this) { RAND_FLOAT_CENTERED(50.0f) + this->obj.pos.z, 0.5f); } - if ((this->unk_0D0 != 0) && (this->unk_0B6 != 0)) { + if ((this->dmgType != 0) && (this->unk_0B6 != 0)) { func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0.0f, this->vel.y, 0.0f, 3.0f, 5); Object_Kill(&this->obj, this->sfxSource); this->itemDrop = DROP_SILVER_RING; Actor_Despawn(this); } - this->unk_0D0 = 0; + this->dmgType = 0; } static f32 D_800D001C[5] = { 0.0f, 30.0f, 60.0f, -60.0f, -30.0f }; // could be in-function @@ -507,7 +507,7 @@ void Actor189_Update(Actor189* this) { case 40: if (this->unk_04A & 4) { this->obj.pos.x = gPlayer[0].pos.x + this->fwork[3]; - this->obj.pos.z = gPlayer[0].unk_138 + this->fwork[4]; + this->obj.pos.z = gPlayer[0].trueZpos + this->fwork[4]; } this->obj.rot.x += this->fwork[0]; @@ -566,7 +566,7 @@ void Actor189_Update(Actor189* this) { this->obj.rot.y += this->fwork[1]; this->obj.rot.z += this->fwork[2]; - Ground_801B6E20(this->obj.pos.x, this->obj.pos.z + D_ctx_80177D20, &sp4C, &sp48, &sp4C); + Ground_801B6E20(this->obj.pos.x, this->obj.pos.z + gPathProgress, &sp4C, &sp48, &sp4C); if (this->obj.pos.y < sp48) { this->obj.pos.y = sp48; @@ -586,7 +586,7 @@ void Actor189_Update(Actor189* this) { break; case 47: - Ground_801B6E20(this->obj.pos.x, this->obj.pos.z + D_ctx_80177D20, &sp4C, &sp48, &sp4C); + Ground_801B6E20(this->obj.pos.x, this->obj.pos.z + gPathProgress, &sp4C, &sp48, &sp4C); if (this->obj.pos.y < this->fwork[3] + (-100.0f + sp48)) { this->obj.pos.y = this->fwork[3] + sp48; @@ -837,7 +837,7 @@ void func_enmy2_8006D0F4(Actor* this) { D_ctx_80178544 = 40; for (i = 0; i < ARRAY_COUNT(gScenery); i++) { - if ((gScenery[i].obj.status == OBJ_ACTIVE) && ((gPlayer[0].unk_138 - 3000.0f) < gScenery[i].obj.pos.z)) { + if ((gScenery[i].obj.status == OBJ_ACTIVE) && ((gPlayer[0].trueZpos - 3000.0f) < gScenery[i].obj.pos.z)) { hitboxData = D_edata_800CF964[gScenery[i].obj.id]; count = *hitboxData; if (count != 0) { @@ -870,7 +870,7 @@ void func_enmy2_8006D0F4(Actor* this) { } } -void Obj39_Update(Scenery_39* this) { +void MeteoTunnel_Update(Scenery_39* this) { this->obj.rot.z += 1.0f; } @@ -878,13 +878,13 @@ typedef struct { /* 0x00 */ Gfx* dList; /* 0x04 */ f32* hitbox; /* 0x08 */ f32 scale; - /* 0x0C */ f32 info_unk_10; + /* 0x0C */ f32 cullDistance; /* 0x10 */ f32 unk_10; /* 0x14 */ u8 info_unk_16; /* 0x15 */ u8 info_unk_14; /* 0x16 */ u8 sfx; /* 0x17 */ u8 info_unk_19; - /* 0x18 */ f32 info_unk_1C; + /* 0x18 */ f32 targetOffset; /* 0x1C */ u8 bonus; } UnkStruct_D003C; // size = 0x20 @@ -1064,8 +1064,8 @@ void ActorEvent_ProcessScript(ActorEvent* this) { switch (EV_OPC_MASK(actorScript[this->aiIndex])) { case EV_OPC(EVOP_STOP_SCRIPT): this->state = EVSTATE_SCRIPT_END; - if (this->info.unk_10 > 10000.0f) { - this->info.unk_10 = 100.0f; + if (this->info.cullDistance > 10000.0f) { + this->info.cullDistance = 100.0f; } break; @@ -1094,7 +1094,7 @@ void ActorEvent_ProcessScript(ActorEvent* this) { if ((this->unk_0B4 >= EINFO_200) && (this->unk_0B4 < EINFO_300)) { this->unk_046 = 100; this->info.hitbox = gCubeHitbox200; - this->info.unk_1C = 1.0f; + this->info.targetOffset = 1.0f; for (i = 0; i < 2; i++) { if (gActor194Status[i] == 0) { @@ -1148,14 +1148,14 @@ void ActorEvent_ProcessScript(ActorEvent* this) { this->info.unk_16 = D_800D003C[this->unk_0B4].info_unk_16; this->info.unk_14 = D_800D003C[this->unk_0B4].info_unk_14; this->info.unk_19 = D_800D003C[this->unk_0B4].info_unk_19; - this->info.unk_1C = D_800D003C[this->unk_0B4].info_unk_1C; + this->info.targetOffset = D_800D003C[this->unk_0B4].targetOffset; this->info.bonus = D_800D003C[this->unk_0B4].bonus; if (this->unk_0B4 == EINFO_78) { this->info.damage = 0; } - this->info.unk_10 = D_800D003C[this->unk_0B4].info_unk_10; + this->info.cullDistance = D_800D003C[this->unk_0B4].cullDistance; this->fwork[25] = D_800D003C[this->unk_0B4].unk_10; switch (D_800D003C[this->unk_0B4].sfx) { @@ -1185,8 +1185,8 @@ void ActorEvent_ProcessScript(ActorEvent* this) { break; } - if (gPlayer[0].unk_138 < this->obj.pos.z) { - this->info.unk_10 = 3000.0f; + if (gPlayer[0].trueZpos < this->obj.pos.z) { + this->info.cullDistance = 3000.0f; } if (this->info.unk_16 == 0) { @@ -1323,9 +1323,9 @@ void ActorEvent_ProcessScript(ActorEvent* this) { case EV_OPC(EVOP_DAMAGE_TEAM): if (this->iwork[12] == actorScript[this->aiIndex + 1]) { - this->unk_0D0 = 1; + this->dmgType = 1; this->damage = actorScript[this->aiIndex] & 0x1FF; - this->unk_0D4 = 100; + this->dmgSource = 100; } else { gTeamDamage[actorScript[this->aiIndex + 1]] = actorScript[this->aiIndex] & 0x1FF; } @@ -1338,14 +1338,14 @@ void ActorEvent_ProcessScript(ActorEvent* this) { for (i = 0; i < ARRAY_COUNT(gTexturedLines); i++) { if (gTexturedLines[i].mode == 0) { gTexturedLines[i].mode = 1; - gTexturedLines[i].unk_28 = 3.0f; - gTexturedLines[i].unk_04.x = this->obj.pos.x - this->vel.x; - gTexturedLines[i].unk_04.y = this->obj.pos.y - this->vel.y; - gTexturedLines[i].unk_04.z = this->obj.pos.z - this->vel.z; - gTexturedLines[i].unk_2C = D_800D0DBC[actorScript[this->aiIndex + 1]][0]; - gTexturedLines[i].unk_2D = D_800D0DBC[actorScript[this->aiIndex + 1]][1]; - gTexturedLines[i].unk_2E = D_800D0DBC[actorScript[this->aiIndex + 1]][2]; - gTexturedLines[i].unk_2F = D_800D0DBC[actorScript[this->aiIndex + 1]][3]; + gTexturedLines[i].xyScale = 3.0f; + gTexturedLines[i].posAA.x = this->obj.pos.x - this->vel.x; + gTexturedLines[i].posAA.y = this->obj.pos.y - this->vel.y; + gTexturedLines[i].posAA.z = this->obj.pos.z - this->vel.z; + gTexturedLines[i].red = D_800D0DBC[actorScript[this->aiIndex + 1]][0]; + gTexturedLines[i].green = D_800D0DBC[actorScript[this->aiIndex + 1]][1]; + gTexturedLines[i].blue = D_800D0DBC[actorScript[this->aiIndex + 1]][2]; + gTexturedLines[i].alpha = D_800D0DBC[actorScript[this->aiIndex + 1]][3]; this->iwork[8] = i; break; } @@ -1573,9 +1573,9 @@ void ActorEvent_ProcessScript(ActorEvent* this) { void ActorEvent_UpdateTexLines(ActorEvent* this) { if ((this->iwork[7] != 0) && (gTexturedLines[this->iwork[8]].mode != 0)) { - gTexturedLines[this->iwork[8]].unk_10.x = this->obj.pos.x; - gTexturedLines[this->iwork[8]].unk_10.y = this->obj.pos.y; - gTexturedLines[this->iwork[8]].unk_10.z = this->obj.pos.z; + gTexturedLines[this->iwork[8]].posBB.x = this->obj.pos.x; + gTexturedLines[this->iwork[8]].posBB.y = this->obj.pos.y; + gTexturedLines[this->iwork[8]].posBB.z = this->obj.pos.z; } } @@ -1794,7 +1794,7 @@ void ActorEvent_ProcessActions(ActorEvent* this) { break; case EVACT_2: - if (this->obj.pos.z < (gPlayer[0].unk_138 - 600.0f)) { + if (this->obj.pos.z < (gPlayer[0].trueZpos - 600.0f)) { func_effect_8007F11C(OBJ_EFFECT_353, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, gEnemyShotSpeed); } @@ -1844,7 +1844,7 @@ void ActorEvent_ProcessActions(ActorEvent* this) { break; case EVACT_6: - if (this->obj.pos.z < (gPlayer[0].unk_138 - 600.0f)) { + if (this->obj.pos.z < (gPlayer[0].trueZpos - 600.0f)) { func_effect_8007F11C(OBJ_EFFECT_355, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, gEnemyShotSpeed); } @@ -1852,7 +1852,7 @@ void ActorEvent_ProcessActions(ActorEvent* this) { break; case EVACT_7: - if (this->obj.pos.z < (gPlayer[0].unk_138 - 600.0f)) { + if (this->obj.pos.z < (gPlayer[0].trueZpos - 600.0f)) { func_effect_8007F11C(OBJ_EFFECT_356, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 60.0f); } this->unk_048 = EVACT_NONE; @@ -1975,7 +1975,7 @@ void ActorEvent_ProcessActions(ActorEvent* this) { void ActorEvent_8006FE28(ActorEvent* this) { if ((fabsf(this->obj.pos.x - gPlayer[0].pos.x) < 100.0f) && (fabsf(this->obj.pos.y - gPlayer[0].pos.y) < 100.0f) && - (fabsf(this->obj.pos.z - gPlayer[0].unk_138) < 50.0f)) { + (fabsf(this->obj.pos.z - gPlayer[0].trueZpos) < 50.0f)) { func_enmy_80067A40(); Audio_KillSfxBySourceAndId(this->sfxSource, 0x1900302B); Object_Kill(&this->obj, this->sfxSource); @@ -1985,8 +1985,8 @@ void ActorEvent_8006FE28(ActorEvent* this) { void ActorEvent_8006FEEC(ActorEvent* this) { s32 i; - if ((this->unk_0D0 != 0) && (this->health != 0)) { - this->unk_0D0 = 0; + if ((this->dmgType != 0) && (this->health != 0)) { + this->dmgType = 0; this->timer_0C6 = 15; this->health -= this->damage; @@ -2029,7 +2029,7 @@ bool ActorEvent_800700A4(ActorEvent* this) { gTeamShields[this->iwork[12]] = -1; gTeamDamage[this->iwork[12]] = 0; this->timer_0C2 = 5000; - this->unk_0D0 = 0; + this->dmgType = 0; return true; } return false; @@ -2037,22 +2037,22 @@ bool ActorEvent_800700A4(ActorEvent* this) { void ActorEvent_800701E0(ActorEvent* this) { Vec3f sp3C; - f32 var_fv1; + f32 chance; f32 temp_fv1; if (ActorEvent_800700A4(this)) { return; } - if ((this->unk_0D0 != 0) && (this->unk_0B4 == EINFO_67) && (this->unk_0D2 == 0)) { - this->unk_0D0 = 0; + if ((this->dmgType != 0) && (this->unk_0B4 == EINFO_67) && (this->dmgPart == 0)) { + this->dmgType = 0; } - if ((this->unk_0D0 != 0) && (this->unk_0B4 == EINFO_83) && (this->timer_0C2 >= 2)) { - this->unk_0D0 = 0; + if ((this->dmgType != 0) && (this->unk_0B4 == EINFO_83) && (this->timer_0C2 >= 2)) { + this->dmgType = 0; } - if ((this->unk_0D0 != 0) && - (((this->unk_0B4 == EINFO_64) && (this->unk_0D2 == 2)) || (this->unk_0B4 != EINFO_64))) { + if ((this->dmgType != 0) && + (((this->unk_0B4 == EINFO_64) && (this->dmgPart == 2)) || (this->unk_0B4 != EINFO_64))) { if (this->iwork[12] >= TEAM_ID_KATT) { this->damage = 0; } @@ -2081,18 +2081,18 @@ void ActorEvent_800701E0(ActorEvent* this) { } this->obj.status = OBJ_DYING; - var_fv1 = 0.7f; + chance = 0.7f; if (gLevelType == LEVELTYPE_SPACE) { - var_fv1 = 0.3f; + chance = 0.3f; } - if (((Rand_ZeroOne() < var_fv1) || (this->iwork[12] != 0)) && (this->info.unk_14 == 0) && + if (((Rand_ZeroOne() < chance) || (this->iwork[12] != 0)) && (this->info.unk_14 == 0) && (this->unk_0B4 != EINFO_13) && (this->unk_0B4 != EINFO_14) && (this->unk_0B4 != EINFO_61) && (this->damage <= 30) && (this->unk_0B4 != EINFO_62) && (this->unk_0B4 != EINFO_64) && (this->unk_0B4 != EINFO_72) && (this->unk_0B4 != EINFO_68)) { func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->scale * 4.0f); - this->unk_0D0 = 0; + this->dmgType = 0; } this->timer_0C2 = 10; @@ -2123,7 +2123,7 @@ void ActorEvent_800701E0(ActorEvent* this) { } else { this->vel.z = this->vel.z * 0.3f; } - if (((this->obj.pos.z + D_ctx_80177D20) > -3000.0f) && (this->vel.z > 0.0f)) { + if (((this->obj.pos.z + gPathProgress) > -3000.0f) && (this->vel.z > 0.0f)) { this->vel.z = RAND_FLOAT(-10.0f); } } @@ -2146,9 +2146,9 @@ void ActorEvent_800701E0(ActorEvent* this) { this->obj.status = OBJ_ACTIVE; func_effect_8007D0E0(this->obj.pos.x - this->vel.x, this->obj.pos.y + 30.0f, this->obj.pos.z - this->vel.z, this->scale * 5.0f); - this->unk_0D0 = 0; + this->dmgType = 0; this->timer_0C2 = 10000; - this->info.unk_1C = 0.0f; + this->info.targetOffset = 0.0f; gHitCount += this->info.bonus; D_ctx_80177850 = 15; break; @@ -2166,7 +2166,7 @@ void ActorEvent_800701E0(ActorEvent* this) { if (this->unk_0B4 == EINFO_82) { AUDIO_PLAY_SFX(0x11000055, this->sfxSource, 0); - this->unk_0D0 = 1; + this->dmgType = 1; func_effect_8007C688(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 3.0f, 60); } } else { @@ -2191,10 +2191,10 @@ void ActorEvent_800701E0(ActorEvent* this) { } } - if (this->unk_0D4 == 1) { + if (this->dmgSource == 1) { switch (this->iwork[12]) { case TEAM_ID_FALCO: - if (this->unk_0D0 == 3) { + if (this->dmgType == 3) { ActorEvent_SetMessage(gMsg_ID_20210, RCID_FALCO); } else { ActorEvent_SetMessage(gMsg_ID_20060, RCID_FALCO); @@ -2202,7 +2202,7 @@ void ActorEvent_800701E0(ActorEvent* this) { break; case TEAM_ID_PEPPY: - if (this->unk_0D0 == 3) { + if (this->dmgType == 3) { ActorEvent_SetMessage(gMsg_ID_20200, RCID_PEPPY); } else { ActorEvent_SetMessage(gMsg_ID_20070, RCID_PEPPY); @@ -2210,7 +2210,7 @@ void ActorEvent_800701E0(ActorEvent* this) { break; case TEAM_ID_SLIPPY: - if (this->unk_0D0 == 3) { + if (this->dmgType == 3) { ActorEvent_SetMessage(gMsg_ID_20190, RCID_SLIPPY); } else { ActorEvent_SetMessage(gMsg_ID_20080, RCID_SLIPPY); @@ -2226,7 +2226,7 @@ void ActorEvent_800701E0(ActorEvent* this) { break; } } - this->unk_0D0 = 0; + this->dmgType = 0; } } if ((this->iwork[12] == 0) && (this->iwork[13] == 0) && (this->info.unk_16 != 2) && @@ -2239,7 +2239,7 @@ void ActorEvent_800701E0(ActorEvent* this) { (this->obj.pos.y < (gGroundHeight + 20.0f))) { this->obj.status = OBJ_DYING; this->obj.pos.z -= this->vel.z; - this->unk_0D0 = 1; + this->dmgType = 1; if (this->unk_0B4 == EINFO_13) { this->obj.id = OBJ_ACTOR_182; func_enmy_800654E4(&this->obj); @@ -2253,9 +2253,9 @@ void ActorEvent_800701E0(ActorEvent* this) { } void ActorEvent_80070BA8(ActorEvent* this) { - if (this->unk_0D0 != 0) { - this->unk_0D0 = 0; - if ((this->unk_0B4 != EINFO_17) || ((this->unk_0B4 == EINFO_17) && (this->unk_0D2 == 0))) { + if (this->dmgType != 0) { + this->dmgType = 0; + if ((this->unk_0B4 != EINFO_17) || ((this->unk_0B4 == EINFO_17) && (this->dmgPart == 0))) { this->timer_0C6 = 10; func_effect_8007C120(this->hitPos.x, this->hitPos.y, this->hitPos.z, this->vel.x, this->vel.y, this->vel.z, 0.2f, 10); @@ -2300,7 +2300,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)) { + if (fabsf(this->obj.pos.z - gPlayer[0].trueZpos) <= ((this->iwork[2] - EVC_CLOSE_Z) * 100.0f)) { ActorEvent_TriggerBranch(this); } return; @@ -2591,7 +2591,7 @@ void ActorEvent_ProcessTriggers(ActorEvent* this) { break; case EVC_TOOK_DAMAGE: - if (this->unk_0D0 != 0) { + if (this->dmgType != 0) { ActorEvent_TriggerBranch(this); } break; @@ -2846,12 +2846,12 @@ void ActorEvent_80071DC0(ActorEvent* this) { void ActorEvent_800720E8(ActorEvent* this) { switch (this->unk_046) { case 0: - if (this->unk_0D0 != 0) { - if (this->unk_0D0 == 2) { + if (this->dmgType != 0) { + if (this->dmgType == 2) { this->damage = 3; } - if ((this->unk_0D4 >= 101) && (gActors[this->unk_0D4 - 101].unk_0B4 == 85)) { + if ((this->dmgSource >= 101) && (gActors[this->dmgSource - 101].unk_0B4 == EINFO_85)) { this->damage = 20; } @@ -2870,7 +2870,7 @@ void ActorEvent_800720E8(ActorEvent* this) { } else { AUDIO_PLAY_SFX(0x2903300E, this->sfxSource, 0); } - this->unk_0D0 = 0; + this->dmgType = 0; } break; @@ -2941,7 +2941,7 @@ void ActorEvent_80072474(ActorEvent* this) { } if (this->iwork[15] != 0) { - var_fv1 = Math_RadToDeg(Math_Atan2F(gPlayer[0].pos.x - this->obj.pos.x, gPlayer[0].unk_138 - this->obj.pos.z)); + var_fv1 = Math_RadToDeg(Math_Atan2F(gPlayer[0].pos.x - this->obj.pos.x, gPlayer[0].trueZpos - this->obj.pos.z)); } else if (this->iwork[6] != 0) { var_fv1 = this->unk_0F4.y; } else { @@ -3008,8 +3008,8 @@ void ActorEvent_Update(ActorEvent* this) { 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; + if (this->dmgType != 0) { + this->dmgType = 0; this->timer_0C6 = 20; this->health -= this->damage; @@ -3377,13 +3377,13 @@ void ActorEvent_Update(ActorEvent* this) { if (this->iwork[5] == EV_ZMODE(EMZ_RELATIVE)) { this->vel.z -= this->fwork[22]; - if ((gCurrentLevel == LEVEL_SECTOR_Y) && (D_ctx_80177D08 < 0.0f)) { - this->vel.z -= D_ctx_80177D08; + if ((gCurrentLevel == LEVEL_SECTOR_Y) && (gPathVelZ < 0.0f)) { + this->vel.z -= gPathVelZ; } } if (this->iwork[5] == EV_ZMODE(EMZ_PLAYER)) { - this->vel.z -= D_ctx_80177D08; + this->vel.z -= gPathVelZ; } if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ENTER_WARP_ZONE) { @@ -3400,9 +3400,9 @@ void ActorEvent_Update(ActorEvent* this) { if (this->scale <= -1.999f) { ActorEvent_80070BA8(this); } else { - if ((this->unk_0D0 == 1) && (this->scale < 0.5f) && (this->unk_0B4 != EINFO_48) && + if ((this->dmgType == 1) && (this->scale < 0.5f) && (this->unk_0B4 != EINFO_48) && (this->unk_0B4 != EINFO_49) && (this->unk_0B4 != EINFO_50)) { - this->unk_0D0 = 0; + this->dmgType = 0; if (gCurrentLevel == LEVEL_METEO) { AUDIO_PLAY_SFX(0x2902107D, this->sfxSource, 4); } else { @@ -3790,7 +3790,7 @@ bool ActorEvent_OverrideLimbDraw3(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* return false; } -s32 Obj111_Draw(Scenery_111* this) { +s32 Scenery111_Draw(Scenery_111* this) { RCP_SetupDL(&gMasterDisp, 0x3C); gSPDisplayList(gMasterDisp++, D_SY_601AD70); RCP_SetupDL(&gMasterDisp, 0x40); @@ -4214,7 +4214,7 @@ void func_enmy2_800763A4(Actor* actor) { } if (gGroundType == 4) { - if (Ground_801B6AEC(actor->obj.pos.x, actor->obj.pos.y - 10.0f, actor->obj.pos.z + D_ctx_80177D20) != 0) { + if (Ground_801B6AEC(actor->obj.pos.x, actor->obj.pos.y - 10.0f, actor->obj.pos.z + gPathProgress) != 0) { func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y + 20.0f, actor->obj.pos.z, actor->scale * 6.0f); func_effect_8007BFFC(actor->obj.pos.x - actor->vel.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z - actor->vel.z, 0.0f, 0.0f, 0.0f, actor->scale * 4.0f, 20); @@ -4327,7 +4327,7 @@ void func_enmy2_800763A4(Actor* actor) { } } } - if ((actor->unk_0D0 != 0) || (actor->timer_0BC == 0) || + if ((actor->dmgType != 0) || (actor->timer_0BC == 0) || ((actor->itemDrop != DROP_NONE) && (actor->obj.id != OBJ_ACTOR_ALLRANGE))) { if (gLevelMode == LEVELMODE_ALL_RANGE) { for (var_s0 = 0; var_s0 < 4; var_s0++) { diff --git a/src/engine/fox_game.c b/src/engine/fox_game.c index 3eb3a689..0475088f 100644 --- a/src/engine/fox_game.c +++ b/src/engine/fox_game.c @@ -100,7 +100,7 @@ void Game_SetGameState(void) { gNextGameState = GSTATE_NONE; gSceneSetup = 0; gFillScreenColor = gBgColor = 0; - D_ctx_80177D20 = 0.0f; + gPathProgress = 0.0f; if ((gCurrentLevel == LEVEL_VENOM_2) && (gLevelPhase == 2)) { gFillScreenColor = gBgColor = 0xFFFF; // 248, 248, 248 gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; @@ -389,7 +389,7 @@ void Game_Update(void) { Play_ClearObjectData(); gCamCount = 1; gLifeCount[0] = 2; - D_ctx_80177D20 = 0.0f; + gPathProgress = 0.0f; D_hud_8016170C = gCsFrameCount = gShowLevelClearStatusScreen = gLevelStartStatusScreenTimer = gLevelClearScreenTimer = gVsMatchState = gVersusMode = gTitleState = gStarCount = gMapState = gPlayState = gOptionMenuStatus = gDrawMode = gShowBossHealth = gShowHud = gBgColor = diff --git a/src/engine/fox_hud.c b/src/engine/fox_hud.c index 04c24dde..417b1146 100644 --- a/src/engine/fox_hud.c +++ b/src/engine/fox_hud.c @@ -1559,7 +1559,7 @@ void func_hud_80088970(void) { D_ctx_80177CA4 = D_play_80161A5C; } - D_ctx_80177CB0 = 0.0f; + gSavedPathProgress = 0.0f; gAllRangeCheckpoint = 0; gSavedZoSearchlightStatus = false; @@ -1568,7 +1568,7 @@ void func_hud_80088970(void) { Audio_StopPlayerNoise(0); gPlayer[0].state_1C8 = PLAYERSTATE_1C8_NEXT; gScreenFlashTimer = 0; - gPlayer[0].timer_1F8 = 0; + gPlayer[0].csTimer = 0; gFillScreenAlpha = gFillScreenAlphaTarget = 255; gFadeoutType = 7; @@ -1953,8 +1953,8 @@ void func_hud_8008A240(void) { } gRadarMarks[i].status = 1; gRadarMarks[i].type = i; - gRadarMarks[i].unk_10 = gPlayer[i].unk_114 + gPlayer[i].unk_0E8; - gRadarMarks[i].pos.z = gPlayer[i].unk_138; + gRadarMarks[i].yRot = gPlayer[i].yRot_114 + gPlayer[i].rot.y; + gRadarMarks[i].pos.z = gPlayer[i].trueZpos; gRadarMarks[i].pos.x = gPlayer[i].pos.x; if (gPlayerNum == i) { @@ -1986,7 +1986,7 @@ void func_hud_8008A240(void) { gRadarMarks[item->index + 50].pos.x = item->obj.pos.x; gRadarMarks[item->index + 50].pos.y = item->obj.pos.y; gRadarMarks[item->index + 50].pos.z = item->obj.pos.z; - gRadarMarks[item->index + 50].unk_10 = 0.0f; + gRadarMarks[item->index + 50].yRot = 0.0f; } } } @@ -2142,10 +2142,10 @@ s32 func_hud_8008A4DC(void) { Matrix_Translate(gGfxMatrix, gRadarMarks[i].pos.x * 0.008f, -gRadarMarks[i].pos.z * 0.008f, 0.0f, MTXF_APPLY); if (gRadarMarks[i].type == 103) { - gRadarMarks[i].unk_10 = 45.0f; + gRadarMarks[i].yRot = 45.0f; } - Matrix_RotateZ(gGfxMatrix, M_DTOR * gRadarMarks[i].unk_10, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, M_DTOR * gRadarMarks[i].yRot, MTXF_APPLY); Matrix_Scale(gGfxMatrix, scale, scale, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -2460,7 +2460,7 @@ s32 func_hud_8008B774(void) { (gCurrentLevel == LEVEL_SECTOR_Y))) { for (i = 0; i < 60; i++) { if ((gActors[i].obj.status == OBJ_ACTIVE) && (gActors[i].iwork[12] == temp)) { - if ((gActors[i].unk_0B4 == 2) || (gActors[i].unk_0B4 == 43) || + if ((gActors[i].unk_0B4 == EINFO_2) || (gActors[i].unk_0B4 == EINFO_43) || ((gActors[i].obj.id == OBJ_ACTOR_TEAM_BOSS) && ((gActors[i].aiType == AI360_FALCO) || (gActors[i].aiType == AI360_SLIPPY) || (gActors[i].aiType == AI360_PEPPY)))) { @@ -2478,7 +2478,7 @@ s32 func_hud_8008B774(void) { switch (i) { case 0: - if (gPlayer[0].timer_220) { + if (gPlayer[0].radioDamageTimer) { ret = 1; } break; @@ -3913,11 +3913,11 @@ bool func_hud_80090A00(Actor* actor) { break; case 4: - actor->fwork[6] = gPlayer[0].unk_138; + actor->fwork[6] = gPlayer[0].trueZpos; actor->fwork[5] = 100.0f; actor->fwork[4] = gPlayer[0].pos.x; if ((fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 300.0f) && - (fabsf(actor->obj.pos.z - gPlayer[0].unk_138) < 300.0f)) { + (fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 300.0f)) { actor->iwork[5] = 5; actor->iwork[3] = 20; actor->iwork[2] = 0; @@ -3925,7 +3925,7 @@ bool func_hud_80090A00(Actor* actor) { break; case 5: - actor->fwork[6] = gPlayer[0].unk_138 + 1000.0f; + actor->fwork[6] = gPlayer[0].trueZpos + 1000.0f; actor->fwork[5] = 1000.0f; actor->fwork[4] = gPlayer[0].pos.x - 1000.0f; actor->iwork[2]++; @@ -4068,7 +4068,7 @@ bool func_hud_80091298(Actor* actor) { actor->fwork[3] = 3.6f; actor->fwork[4] = gPlayer[0].pos.x + ((f32) (actor->aiType - 2) * 700.0f); actor->fwork[5] = gPlayer[0].pos.y; - actor->fwork[6] = gPlayer[0].unk_138; + actor->fwork[6] = gPlayer[0].trueZpos; if ((fabsf(actor->obj.pos.x - actor->fwork[4]) < 700.0f) || (fabsf(actor->obj.pos.z - actor->fwork[6]) < 700.0f)) { actor->fwork[1] = gPlayer[0].baseSpeed - 10.0f; @@ -4293,7 +4293,7 @@ bool func_hud_80091B90(Actor* actor) { actor->obj.pos.y = gGroundHeight + 40.0f; actor->vel.y = 0.0f; } - actor->vel.z -= D_ctx_80177D08; + actor->vel.z -= gPathVelZ; return false; } @@ -4335,11 +4335,11 @@ bool func_hud_80091DF4(Actor* actor) { } bool func_hud_80091F00(Actor* actor) { - u8 temp_v0 = actor->unk_0D0; + u8 temp_v0 = actor->dmgType; Vec3f sp40; Vec3f sp34; - actor->unk_0D0 = 0; + actor->dmgType = 0; if ((actor->state == 3) || (temp_v0 == 2)) { return false; @@ -4376,7 +4376,7 @@ bool func_hud_80091F00(Actor* actor) { return false; } - if ((actor->unk_0D0 == 3) && (actor->unk_0D4 == 1)) { + if ((actor->dmgType == 3) && (actor->dmgSource == 1)) { switch (actor->aiType) { case AI360_FALCO: Radio_PlayMessage(gMsg_ID_20210, RCID_FALCO); @@ -4390,7 +4390,7 @@ bool func_hud_80091F00(Actor* actor) { } } - if ((actor->unk_0D0 != 3) && (actor->unk_0D4 == 1)) { + if ((actor->dmgType != 3) && (actor->dmgSource == 1)) { switch (actor->aiType) { case AI360_FALCO: Radio_PlayMessage(gMsg_ID_20060, RCID_FALCO); @@ -4404,7 +4404,7 @@ bool func_hud_80091F00(Actor* actor) { } } - if ((actor->unk_0D4 == 2) || (actor->unk_0D4 == 100)) { + if ((actor->dmgSource == 2) || (actor->dmgSource == 100)) { switch (actor->aiType) { case AI360_FALCO: Radio_PlayMessage(gMsg_ID_20030, RCID_FALCO); @@ -4428,7 +4428,7 @@ void func_hud_80092244(Actor* actor) { gRadarMarks[actor->index].pos.x = actor->obj.pos.x; gRadarMarks[actor->index].pos.y = actor->obj.pos.y; gRadarMarks[actor->index].pos.z = actor->obj.pos.z; - gRadarMarks[actor->index].unk_10 = actor->unk_0F4.y + 180.0f; + gRadarMarks[actor->index].yRot = actor->unk_0F4.y + 180.0f; } void func_hud_800922F4(Actor* actor) { @@ -4620,7 +4620,7 @@ bool func_hud_800927A0(Actor* actor) { Math_SmoothStepToAngle(&actor->unk_0F4.y, sp50, 0.1f, 2.0f, 0.0f); } - if (actor->obj.pos.y < gPlayer[0].unk_0A0) { + if (actor->obj.pos.y < gPlayer[0].pathHeight) { if (actor->fwork[28] < 0.0f) { actor->fwork[28] = actor->fwork[28] + 0.2f; } @@ -4705,7 +4705,7 @@ void ActorTeamBoss_Update(ActorTeamBoss* this) { func_hud_80091B90(this); func_hud_80091DF4(this); - if (this->unk_0D0 != 0) { + if (this->dmgType != 0) { func_hud_80091F00(this); } @@ -4826,7 +4826,7 @@ void func_hud_80093310(void) { this->obj.pos.z -= 5000.0f; gActors[0].unk_0B6 = 1; if (1) {} - this->obj.id = OBJ_ACTOR_195; + this->obj.id = OBJ_ACTOR_CUTSCENE; Object_SetInfo(&this->info, this->obj.id); AUDIO_PLAY_SFX(0x11030010, this->sfxSource, 0); } @@ -4846,7 +4846,7 @@ void func_hud_800933D8(f32 x, f32 y, f32 z, f32 arg3) { effect->obj.pos.z = z; if ((player->state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && (gCurrentLevel == LEVEL_AQUAS) && - (player->unk_1D0 < 2)) { + (player->csState < 2)) { effect->scale1 = 0.4f; effect->unk_44 = 0; effect->unk_46 = 24; @@ -4863,7 +4863,7 @@ void func_hud_800933D8(f32 x, f32 y, f32 z, f32 arg3) { effect->unk_48 = -effect->unk_48; } - if (player->unk_1D0 >= 5) { + if (player->csState >= 5) { effect->unk_4A = 96; effect->unk_46 = 4; } else { @@ -4920,7 +4920,7 @@ void HUD_AquasStart(Player* player) { actor = &gActors[0]; - switch (player->unk_1D0) { + switch (player->csState) { case 0: func_hud_80093310(); @@ -4928,7 +4928,7 @@ void HUD_AquasStart(Player* player) { D_ctx_80177AB0 = 1; gAqDrawMode = 1; player->unk_234 = 0; - player->unk_1D0 = 1; + player->csState = 1; player->unk_208 = 0; player->baseSpeed = 0.0f; @@ -5051,7 +5051,7 @@ void HUD_AquasStart(Player* player) { if (gCsFrameCount >= 50) { // clang-format off - if (gFillScreenAlpha == 255) { player->unk_1D0 = 2; } + if (gFillScreenAlpha == 255) { player->csState = 2; } // clang-format on gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; gFillScreenAlphaTarget = 255; @@ -5082,14 +5082,14 @@ void HUD_AquasStart(Player* player) { D_ctx_80177A48[3] = -1600.0f; D_ctx_80177A48[4] = 520.0f; - player->unk_1D0 = 3; + player->csState = 3; D_ctx_80177AB0 = 0; player->camRoll = 60.0f; - player->timer_1F8 = 1000; + player->csTimer = 1000; - player->unk_0E8 = 30.0f; + player->rot.y = 30.0f; player->pos.z = -5100.0f; player->pos.x = -50.0f; @@ -5104,7 +5104,7 @@ void HUD_AquasStart(Player* player) { case 3: gFillScreenAlphaStep = 16; - if (player->timer_1F8 >= 775) { + if (player->csTimer > 774) { if (D_ctx_80177A48[4] >= 200.0f) { Math_SmoothStepToF(&D_ctx_80177A48[4], -200.0f, 1.00f, 4.0f, 4.0f); } else { @@ -5132,12 +5132,12 @@ void HUD_AquasStart(Player* player) { player->cam.eye.z = gCsCamEyeZ; } - if (player->timer_1F8 == 774) { + if (player->csTimer == 774) { AUDIO_PLAY_SFX(0x01038026, player->sfxSource, 0); D_ctx_80177A10[9] = 40; } - if (player->timer_1F8 < 775) { + if (player->csTimer <= 774) { D_ctx_80177A48[0] = 0.0f; temp2 = 0.0f; @@ -5167,7 +5167,7 @@ void HUD_AquasStart(Player* player) { player->pos.y = dest.y; player->pos.z = dest.z; - if (((player->timer_1F8 % 8) == 0) && (player->timer_1F8 > 740)) { + if (((player->csTimer % 8) == 0) && (player->csTimer > 740)) { func_effect_8007D9DC(player->cam.eye.x, 1600.0f, player->cam.eye.z, 10.0f, 100.0f, 0); } @@ -5181,7 +5181,7 @@ void HUD_AquasStart(Player* player) { D_ctx_80177A10[8]++; } - if (((gGameFrameCount % 3) == 0) && (player->timer_1F8 <= 740)) { + if (((gGameFrameCount % 3) == 0) && (player->csTimer <= 740)) { for (i = 0; i < 8; i++) { Aquas_801AC8A8(player->cam.eye.x + RAND_FLOAT_CENTERED(D_800D22C4), player->cam.eye.y + 260.0f + RAND_FLOAT_CENTERED(D_800D22C8), @@ -5190,8 +5190,8 @@ void HUD_AquasStart(Player* player) { } } - if (player->timer_1F8 < 736) { - player->unk_1D0 = 4; + if (player->csTimer < 736) { + player->csState = 4; gAqDrawMode = 1; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; gFillScreenAlphaTarget = 255; @@ -5200,7 +5200,7 @@ void HUD_AquasStart(Player* player) { case 4: if (gFillScreenAlpha == 255) { - player->unk_1D0 = 5; + player->csState = 5; } break; @@ -5209,12 +5209,12 @@ void HUD_AquasStart(Player* player) { player->pos.y = 350.0f; player->pos.z = 0.0f; - player->cam.eye.x = player->pos.x * (600.0f / player->unk_09C); - player->cam.eye.y = player->pos.y * (1040.0f / player->unk_0A0); + player->cam.eye.x = player->pos.x * (600.0f / player->pathWidth); + player->cam.eye.y = player->pos.y * (1040.0f / player->pathHeight); player->cam.eye.y -= 50.0f; - player->cam.at.x = player->pos.x * (600.0f / player->unk_09C); - player->cam.at.y = player->pos.y * (1050.0f / player->unk_0A0); + player->cam.at.x = player->pos.x * (600.0f / player->pathWidth); + player->cam.at.y = player->pos.y * (1050.0f / player->pathHeight); player->cam.at.y += player->unk_060 * 10.0f; player->pos.z += 1000.0f; @@ -5222,12 +5222,12 @@ void HUD_AquasStart(Player* player) { D_ctx_80177A48[0] = 0.1f; - player->unk_0E8 = 0.0f; + player->rot.y = 0.0f; player->baseSpeed = 20.0f; player->unk_234 = 1; - player->unk_1D0 = 6; + player->csState = 6; - player->timer_1F8 = 1000; + player->csTimer = 1000; gAqDrawMode = 0; gFillScreenAlphaTarget = 0; @@ -5238,36 +5238,36 @@ void HUD_AquasStart(Player* player) { player->cam.at.z = gCsCamAtZ = 0.0f; case 6: - player->unk_060 = SIN_DEG(player->unk_0F4 * 0.7f) * 0.5f; - player->unk_088 += 10.0f; - player->unk_0F4 += 8.0f; - player->unk_080 = -SIN_DEG(player->unk_088) * 0.5f; - player->unk_0F0 = SIN_DEG(player->unk_0F4) * 1.5f; + player->unk_060 = SIN_DEG(player->rockPhase * 0.7f) * 0.5f; + player->bobPhase += 10.0f; + player->rockPhase += 8.0f; + player->yBob = -SIN_DEG(player->bobPhase) * 0.5f; + player->rockAngle = SIN_DEG(player->rockPhase) * 1.5f; - gCsCamEyeX = player->pos.x * (600.0f / player->unk_09C); - gCsCamEyeY = player->pos.y * (740.0f / player->unk_0A0); + gCsCamEyeX = player->pos.x * (600.0f / player->pathWidth); + gCsCamEyeY = player->pos.y * (740.0f / player->pathHeight); gCsCamEyeY -= -50.0f; - gCsCamAtX = player->pos.x * (600.0f / player->unk_09C); - gCsCamAtY = player->pos.y * (750.0f / player->unk_0A0); + gCsCamAtX = player->pos.x * (600.0f / player->pathWidth); + gCsCamAtY = player->pos.y * (750.0f / player->pathHeight); gCsCamAtY += player->unk_060 * 10.0f; Math_SmoothStepToF(&player->pos.z, 0.0f, 0.1f, 40.0f, 0.1f); D_ctx_80177A48[0] = 0.03f; gCsCamEyeZ = 240.0f; - gCsCamAtZ = player->pos.z + (D_ctx_80177D20 - 1.0f); + gCsCamAtZ = player->pos.z + (gPathProgress - 1.0f); - if (((player->timer_1F8 % 2) == 0) && (player->timer_1F8 > 962)) { + if (((player->csTimer % 2) == 0) && (player->csTimer > 962)) { func_hud_800933D8(player->pos.x, player->pos.y, player->pos.z + 50.0f, 20.0f); } - if (player->timer_1F8 <= 900) { + if (player->csTimer <= 900) { gLevelStartStatusScreenTimer = 50; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; - player->unk_1D0 = 0; - player->timer_1F8 = 0; + player->csState = 0; + player->csTimer = 0; gLoadLevelObjects = 1; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); @@ -5283,8 +5283,8 @@ void HUD_AquasStart(Player* player) { break; } - Matrix_RotateY(gCalcMatrix, M_DTOR * (player->unk_0E8 + player->unk_114 + 180.0f), MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(M_DTOR * player->unk_0E4), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, M_DTOR * (player->rot.y + player->yRot_114 + 180.0f), MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(M_DTOR * player->rot.x), MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; @@ -5298,9 +5298,9 @@ void HUD_AquasStart(Player* player) { player->pos.x += player->vel.x; player->pos.y += player->vel.y; - D_ctx_80177CE8 -= player->vel.z; + gPathTexScroll -= player->vel.z; - player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; + player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0.0f); @@ -5320,7 +5320,7 @@ f32 D_800D24CC = 0.02f; void func_hud_80094954(Effect* effect) { Player* player = &gPlayer[0]; - if ((player->state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && (gCurrentLevel == LEVEL_AQUAS) && (player->unk_1D0 < 2)) { + if ((player->state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && (gCurrentLevel == LEVEL_AQUAS) && (player->csState < 2)) { switch (effect->state) { case 0: effect->unk_44 += effect->unk_46; @@ -5358,7 +5358,7 @@ void func_hud_80094954(Effect* effect) { if (player->state_1C8 == PLAYERSTATE_1C8_NEXT) { effect->unk_46 = 2; - if (player->unk_1D0 >= 4) { + if (player->csState >= 4) { effect->vel.y -= 0.13f; } } @@ -5367,7 +5367,7 @@ void func_hud_80094954(Effect* effect) { effect->unk_4A -= effect->unk_46; if ((effect->unk_4A < 0) || ((player->state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && - (gCurrentLevel == LEVEL_AQUAS) && (player->unk_1D0 == 5))) { + (gCurrentLevel == LEVEL_AQUAS) && (player->csState == 5))) { Object_Kill(&effect->obj, effect->sfxSource); } effect->obj.rot.z += effect->unk_48; @@ -5376,7 +5376,7 @@ void func_hud_80094954(Effect* effect) { void func_hud_80094BBC(Effect* effect) { if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && (gCurrentLevel == LEVEL_AQUAS) && - (gPlayer[0].unk_1D0 < 2)) { + (gPlayer[0].csState < 2)) { RCP_SetupDL(&gMasterDisp, 0x44); gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 21, 34, effect->unk_4A); gDPSetEnvColor(gMasterDisp++, 255, 255, 251, 0); @@ -5532,7 +5532,7 @@ void func_hud_80094D20(f32 x, f32 y) { void func_hud_80095350(Actor* actor) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->unk_0B6 = 9999; Object_SetInfo(&actor->info, actor->obj.id); } @@ -5547,9 +5547,9 @@ void func_hud_800953A0(Actor* actor, s32 arg1) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos = D_800D2510[arg1]; - actor->obj.pos.z -= D_ctx_80177D20; + actor->obj.pos.z -= gPathProgress; actor->unk_0B6 = 45; Object_SetInfo(&actor->info, actor->obj.id); } @@ -5562,9 +5562,9 @@ void func_hud_8009546C(Actor* actor, s32 arg1) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos = D_800D2540[arg1]; - actor->obj.pos.z -= D_ctx_80177D20; + actor->obj.pos.z -= gPathProgress; actor->unk_0B6 = 46; Object_SetInfo(&actor->info, actor->obj.id); } @@ -5577,9 +5577,9 @@ void func_hud_80095538(Actor* actor, s32 arg1) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos = D_800D257C[arg1]; - actor->obj.pos.z -= D_ctx_80177D20; + actor->obj.pos.z -= gPathProgress; actor->unk_0B6 = 47; Object_SetInfo(&actor->info, actor->obj.id); } @@ -5600,11 +5600,11 @@ void HUD_AquasComplete(Player* player) { actor = &gActors[0]; - switch (player->unk_1D0) { + switch (player->csState) { case 0: gCsFrameCount = 0; - player->unk_280 = 0; - player->unk_1D0 = 1; + player->barrelRollAlpha = 0; + player->csState = 1; D_ctx_80177A48[1] = gBosses[0].obj.pos.x; D_ctx_80177A48[2] = gBosses[0].obj.pos.y; @@ -5624,7 +5624,7 @@ void HUD_AquasComplete(Player* player) { gFillScreenAlphaTarget = 255; gFillScreenAlphaStep = 16; if (gCsFrameCount == 280) { - player->unk_1D0 = 10; + player->csState = 10; } } @@ -5653,13 +5653,13 @@ void HUD_AquasComplete(Player* player) { if (gCsFrameCount >= 90) { dest.x = player->cam.eye.x; dest.y = player->cam.eye.y; - dest.z = player->cam.eye.z + 200.0f - D_ctx_80177D20; + dest.z = player->cam.eye.z + 200.0f - gPathProgress; } - Math_SmoothStepToAngle(&player->unk_130, 0.0f, 0.05f, 1.2f, 0.0001f); - Math_SmoothStepToAngle(&player->unk_12C, 0.0f, 0.05f, 1.2f, 0.0001f); + Math_SmoothStepToAngle(&player->zRotBarrelRoll, 0.0f, 0.05f, 1.2f, 0.0001f); + Math_SmoothStepToAngle(&player->zRotBank, 0.0f, 0.05f, 1.2f, 0.0001f); Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f); - Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 20.0f, 0.0f); + Math_SmoothStepToAngle(&player->aerobaticPitch, 0.0f, 0.1f, 20.0f, 0.0f); x = player->pos.x - dest.x; y = player->pos.y - dest.y; @@ -5676,9 +5676,9 @@ void HUD_AquasComplete(Player* player) { x1 = 0.0f; } - z1 = Math_SmoothStepToAngle(&player->unk_0E8, y1, 0.5f, 2.0f, 0.0001f) * 30.0f; - Math_SmoothStepToAngle(&player->unk_0E4, x1, 0.5f, 2.0f, 0.0001f); - Math_SmoothStepToAngle(&player->unk_0EC, z1, 0.1f, 5.0f, 0.0001f); + z1 = Math_SmoothStepToAngle(&player->rot.y, y1, 0.5f, 2.0f, 0.0001f) * 30.0f; + Math_SmoothStepToAngle(&player->rot.x, x1, 0.5f, 2.0f, 0.0001f); + Math_SmoothStepToAngle(&player->rot.z, z1, 0.1f, 5.0f, 0.0001f); Math_SmoothStepToAngle(&D_ctx_80177A48[4], 30.0f, 0.05f, 1.0f, 0.001f); Math_SmoothStepToF(&D_ctx_80177A48[8], 600.0f, 0.05f, 1000.0f, 0.001f); @@ -5689,7 +5689,7 @@ void HUD_AquasComplete(Player* player) { src.z = D_ctx_80177A48[9]; Matrix_Translate(gCalcMatrix, gBosses[0].obj.pos.x, gBosses[0].obj.pos.y, - gBosses[0].obj.pos.z + D_ctx_80177D20, MTXF_NEW); + gBosses[0].obj.pos.z + gPathProgress, MTXF_NEW); Matrix_RotateY(gCalcMatrix, -(M_DTOR * D_ctx_80177A48[4]), MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &src, &dest); @@ -5704,11 +5704,11 @@ void HUD_AquasComplete(Player* player) { if (gCsFrameCount < 200) { Math_SmoothStepToF(&gCsCamAtX, gBosses[0].obj.pos.x, 0.03f, 100.0f, 0.001f); Math_SmoothStepToF(&gCsCamAtY, gBosses[0].obj.pos.y, 0.03f, 100.0f, 0.001f); - Math_SmoothStepToF(&gCsCamAtZ, gBosses[0].obj.pos.z + 600.0f + D_ctx_80177D20, 0.03f, 100.0f, 0.001f); + Math_SmoothStepToF(&gCsCamAtZ, gBosses[0].obj.pos.z + 600.0f + gPathProgress, 0.03f, 100.0f, 0.001f); } else { Math_SmoothStepToF(&gCsCamAtX, player->pos.x, D_ctx_80177A48[6], 1000.0f, 0.001f); Math_SmoothStepToF(&gCsCamAtY, player->pos.y, D_ctx_80177A48[6], 1000.0f, 0.001f); - Math_SmoothStepToF(&gCsCamAtZ, player->pos.z + D_ctx_80177D20, D_ctx_80177A48[6], 1000.0f, 0.001f); + Math_SmoothStepToF(&gCsCamAtZ, player->pos.z + gPathProgress, D_ctx_80177A48[6], 1000.0f, 0.001f); if (gCsFrameCount > 180) { D_ctx_80177A48[6] += 0.005f; } else { @@ -5726,17 +5726,17 @@ void HUD_AquasComplete(Player* player) { case 10: player->unk_234 = 1; gAqDrawMode = 2; - player->unk_1D0 = 11; + player->csState = 11; - player->unk_0F8 = player->unk_0EC = player->unk_12C = player->unk_130 = 0.0f; + player->bankAngle = player->rot.z = player->zRotBank = player->zRotBarrelRoll = 0.0f; player->vel.x = player->vel.y = player->vel.z = 0.0f; - player->unk_0E4 = player->unk_0E8 = player->unk_0EC = 0.0f; - player->boostSpeed = player->unk_114 = 0.0f; + player->rot.x = player->rot.y = player->rot.z = 0.0f; + player->boostSpeed = player->yRot_114 = 0.0f; player->baseSpeed = 3.6f; - player->unk_138 = player->pos.z = 0.0f; + player->trueZpos = player->pos.z = 0.0f; player->pos.y = 100.0f; player->pos.x = -100.0f; - player->unk_280 = 0; + player->barrelRollAlpha = 0; player->unk_17C = player->unk_180 = 0.0f; D_bg_8015F974 = D_bg_8015F978 = D_bg_8015F97C = 255; @@ -5752,7 +5752,7 @@ void HUD_AquasComplete(Player* player) { Play_ClearObjectData(); - player->unk_144 = D_ctx_80177D20 = 0; + player->zPath = gPathProgress = 0; j = 0; func_hud_80095350(actor); @@ -5770,8 +5770,8 @@ void HUD_AquasComplete(Player* player) { func_hud_800953A0(&gActors[j], i); } - player->pos.z -= D_ctx_80177D20; - player->unk_138 = player->pos.z; + player->pos.z -= gPathProgress; + player->trueZpos = player->pos.z; actor->fwork[1] = 0.0f; actor->fwork[2] = 600.0f; @@ -5784,13 +5784,13 @@ void HUD_AquasComplete(Player* player) { src.y = actor->fwork[2]; src.z = actor->fwork[3]; - Matrix_Translate(gCalcMatrix, player->pos.x, player->pos.y, player->unk_138 + D_ctx_80177D20, MTXF_NEW); + Matrix_Translate(gCalcMatrix, player->pos.x, player->pos.y, player->trueZpos + gPathProgress, MTXF_NEW); Matrix_RotateY(gCalcMatrix, -(M_DTOR * actor->unk_0F4.y), MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &src, &dest); player->cam.at.x = gCsCamAtX = player->pos.x; player->cam.at.y = gCsCamAtY = player->pos.y; - player->cam.at.z = gCsCamAtZ = player->pos.z - 50.0f + D_ctx_80177D20; + player->cam.at.z = gCsCamAtZ = player->pos.z - 50.0f + gPathProgress; player->cam.eye.x = gCsCamEyeX = dest.x; player->cam.eye.y = gCsCamEyeY = dest.y; @@ -5804,7 +5804,7 @@ void HUD_AquasComplete(Player* player) { gFillScreenAlphaStep = 8; if (gFillScreenAlpha == 0) { - player->unk_1D0 = 12; + player->csState = 12; } case 12: @@ -5824,17 +5824,17 @@ void HUD_AquasComplete(Player* player) { } else { actor->fwork[4] = player->pos.x; actor->fwork[5] = player->pos.y; - actor->fwork[6] = player->unk_138 + D_ctx_80177D20; + actor->fwork[6] = player->trueZpos + gPathProgress; } if (gCsFrameCount < 1200) { gCsCamAtX = player->pos.x; gCsCamAtY = player->pos.y; - gCsCamAtZ = player->pos.z - 50.0f + D_ctx_80177D20; + gCsCamAtZ = player->pos.z - 50.0f + gPathProgress; } else { gCsCamAtX = player->pos.x; gCsCamAtY = player->pos.y + 10.0f; - gCsCamAtZ = player->pos.z - 50.0f + D_ctx_80177D20; + gCsCamAtZ = player->pos.z - 50.0f + gPathProgress; } D_ctx_80177A48[0] = 0.05f; @@ -5866,7 +5866,7 @@ void HUD_AquasComplete(Player* player) { if (gFillScreenAlpha == 255) { gLeveLClearStatus[LEVEL_AQUAS] = Play_CheckMedalStatus(150) + 1; player->state_1C8 = PLAYERSTATE_1C8_NEXT; - player->timer_1F8 = 0; + player->csTimer = 0; Audio_FadeOutAll(10); gFadeoutType = 4; } @@ -5936,8 +5936,8 @@ void HUD_AquasComplete(Player* player) { break; } - Matrix_RotateY(gCalcMatrix, M_DTOR * (player->unk_0E8 + player->unk_114 + 180.0f), MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(M_DTOR * player->unk_0E4), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, M_DTOR * (player->rot.y + player->yRot_114 + 180.0f), MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(M_DTOR * player->rot.x), MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; @@ -5953,15 +5953,15 @@ void HUD_AquasComplete(Player* player) { player->pos.y += player->vel.y; player->pos.z += player->vel.z; - player->unk_138 = player->pos.z; + player->trueZpos = player->pos.z; - player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; + player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; - player->unk_060 = SIN_DEG(player->unk_0F4 * 0.7f) * 0.5f; - player->unk_088 += 10.0f; - player->unk_0F4 += 8.0f; - player->unk_080 = -SIN_DEG(player->unk_088) * 0.5f; - player->unk_0F0 = SIN_DEG(player->unk_0F4) * 1.5f; + player->unk_060 = SIN_DEG(player->rockPhase * 0.7f) * 0.5f; + player->bobPhase += 10.0f; + player->rockPhase += 8.0f; + player->yBob = -SIN_DEG(player->bobPhase) * 0.5f; + player->rockAngle = SIN_DEG(player->rockPhase) * 1.5f; if (player->unk_234) { src.x = 0.0f; @@ -5987,17 +5987,17 @@ void func_hud_80096A74(Player* player) { Vec3f src, dest; s32 button; - switch (player->unk_1D0) { + switch (player->csState) { case 0: player->pos.y += 3400.0f; - player->unk_0E4 = 270.0f; + player->rot.x = 270.0f; gPlayer[0].baseSpeed = 0.0f; D_ctx_80177A48[1] = 100.0f; D_ctx_80177A48[2] = 0.0f; D_ctx_80177A48[0] = 0.2f; gCsFrameCount = 0; - player->unk_1D0 = 1; + player->csState = 1; gFillScreenAlpha = gFillScreenAlphaTarget = 255; player->cam.eye.x = gCsCamEyeX = 0.0f; @@ -6053,7 +6053,7 @@ void func_hud_80096A74(Player* player) { if (gCsFrameCount == 270) { player->unk_190 = player->unk_194 = 10.0f; - player->unk_1D0 = 2; + player->csState = 2; D_ctx_80177A48[1] = 400.0f; AUDIO_PLAY_SFX(0x09004002, player->sfxSource, 0); } @@ -6070,7 +6070,7 @@ void func_hud_80096A74(Player* player) { button = gControllerHold[player->num].button; gControllerHold[player->num].button = gBoostButton[player->num]; player->boostMeter = 1; - player->timer_1F8 = 60; + player->csTimer = 60; func_play_800B2574(player); @@ -6086,12 +6086,12 @@ void func_hud_80096A74(Player* player) { gCsCamAtZ = player->pos.z; if (gCsFrameCount == 300) { - D_ctx_80177CE8 = 0; + gPathTexScroll = 0; gLevelStartStatusScreenTimer = 50; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->baseSpeed = gArwingSpeed; - player->unk_1D0 = 0; - player->timer_1F8 = 0; + player->csState = 0; + player->csTimer = 0; player->unk_014 = 0.0f; player->unk_018 = 0.0f; player->camRoll = 0.0f; @@ -6104,29 +6104,29 @@ void func_hud_80096A74(Player* player) { Math_SmoothStepToF(&player->baseSpeed, 30.0f, 0.05f, 1000.0f, 0.001f); if (gCsFrameCount < 110) { - player->unk_0EC += (D_ctx_80177A48[4] * 2.0f); - if (player->unk_0EC >= 360.0f) { - player->unk_0EC -= 360.0f; + player->rot.z += (D_ctx_80177A48[4] * 2.0f); + if (player->rot.z >= 360.0f) { + player->rot.z -= 360.0f; } - if (player->unk_0EC < 0.0f) { - player->unk_0EC += 360.0f; + if (player->rot.z < 0.0f) { + player->rot.z += 360.0f; } } else { - Math_SmoothStepToAngle(&player->unk_0EC, 0.0f, 0.4f, (D_ctx_80177A48[4] * 2.0f), 1.0f); - if (player->unk_0EC == 0.0f) { - if (player->unk_0E4 != 0.0f) { - Math_SmoothStepToAngle(&player->unk_0E4, 0.0f, 0.1f, 2.4f, 0.001f); + Math_SmoothStepToAngle(&player->rot.z, 0.0f, 0.4f, (D_ctx_80177A48[4] * 2.0f), 1.0f); + if (player->rot.z == 0.0f) { + if (player->rot.x != 0.0f) { + Math_SmoothStepToAngle(&player->rot.x, 0.0f, 0.1f, 2.4f, 0.001f); } else { - player->unk_088 += 10.0f; - player->unk_080 = -SIN_DEG(player->unk_088) * 0.5f; - player->unk_0F4 += 3.0f; - player->unk_0F0 = SIN_DEG(player->unk_0F4) * 1.5f; + player->bobPhase += 10.0f; + player->yBob = -SIN_DEG(player->bobPhase) * 0.5f; + player->rockPhase += 3.0f; + player->rockAngle = SIN_DEG(player->rockPhase) * 1.5f; } } } - Matrix_RotateY(gCalcMatrix, M_DTOR * (player->unk_0E8 + player->unk_114 + 180.0f), MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(M_DTOR * (player->unk_0E4)), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, M_DTOR * (player->rot.y + player->yRot_114 + 180.0f), MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(M_DTOR * (player->rot.x)), MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; @@ -6140,9 +6140,9 @@ void func_hud_80096A74(Player* player) { player->pos.x += player->vel.x; player->pos.y += player->vel.y; - D_ctx_80177CE8 += player->vel.z; + gPathTexScroll += player->vel.z; - player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; + player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; } Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0.0f); diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index 55d34158..eb6545c7 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -144,21 +144,21 @@ void func_play_800A3FEC(void) { void func_play_800A4460(Player* player) { if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gBosses[0].obj.status == OBJ_ACTIVE) && (gBosses[0].state == 17)) { - player->unk_060 = SIN_DEG(player->unk_0F4 * 0.7f) * 0.5f; - player->unk_088 += 13.0f; - player->unk_0F4 += 20.0f; - player->unk_080 = -SIN_DEG(player->unk_088) * 5.0f; - player->unk_0F0 = SIN_DEG(player->unk_0F4) * 10.0f; + player->unk_060 = SIN_DEG(player->rockPhase * 0.7f) * 0.5f; + player->bobPhase += 13.0f; + player->rockPhase += 20.0f; + player->yBob = -SIN_DEG(player->bobPhase) * 5.0f; + player->rockAngle = SIN_DEG(player->rockPhase) * 10.0f; } else { - player->unk_060 = SIN_DEG(player->unk_0F4 * 0.7f) * 0.5f; - player->unk_088 += 10.0f; - player->unk_0F4 += 8.0f; + player->unk_060 = SIN_DEG(player->rockPhase * 0.7f) * 0.5f; + player->bobPhase += 10.0f; + player->rockPhase += 8.0f; if ((gLevelType == LEVELTYPE_PLANET) || ((player->cockpitView == true) && (gLevelMode == LEVELMODE_ON_RAILS))) { - player->unk_080 = -SIN_DEG(player->unk_088) * 0.5f; + player->yBob = -SIN_DEG(player->bobPhase) * 0.5f; if ((player->wings.rightState <= WINGSTATE_BROKEN) || (player->wings.leftState <= WINGSTATE_BROKEN)) { - player->unk_0F0 = SIN_DEG(player->unk_0F4) * 5.0f; + player->rockAngle = SIN_DEG(player->rockPhase) * 5.0f; } else { - player->unk_0F0 = SIN_DEG(player->unk_0F4) * 1.5f; + player->rockAngle = SIN_DEG(player->rockPhase) * 1.5f; } } } @@ -211,12 +211,12 @@ void func_play_800A46A0(Player* player) { if ((gGameFrameCount & var_v1) == 0) { func_effect_8007D10C(player->pos.x + RAND_FLOAT_CENTERED(10.0f), player->pos.y + sp40 + RAND_FLOAT(10.0f), - player->unk_138 + RAND_FLOAT_CENTERED(10.0f), 2.2f); + player->trueZpos + RAND_FLOAT_CENTERED(10.0f), 2.2f); } if (((gGameFrameCount & (var_v1 >> 2)) == 0) && (Rand_ZeroOne() < 0.5f)) { func_effect_8007C484(player->pos.x + RAND_FLOAT_CENTERED(30.0f), player->pos.y + sp40 + RAND_FLOAT(10.0f), - player->unk_138 + RAND_FLOAT_CENTERED(30.0f), player->vel.x, player->vel.y, + player->trueZpos + RAND_FLOAT_CENTERED(30.0f), player->vel.x, player->vel.y, player->vel.z, 0.04f + RAND_FLOAT(0.03f), player->num + 1); if (player->timer_224 == 0) { player->timer_224 = 2; @@ -235,21 +235,21 @@ void func_play_800A4C40(Player* player) { Vec3f sp30; if (gGroundSurface == SURFACE_WATER) { - Matrix_Translate(gCalcMatrix, player->pos.x, player->pos.y, player->unk_138, MTXF_NEW); - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gCalcMatrix, -((player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, -(player->unk_0F8 * M_DTOR), MTXF_APPLY); + Matrix_Translate(gCalcMatrix, player->pos.x, player->pos.y, player->trueZpos, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + 180.0f) * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, -((player->rot.x + player->aerobaticPitch) * M_DTOR), MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -(player->bankAngle * M_DTOR), MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &sp54, &sp3C); Matrix_MultVec3f(gCalcMatrix, &sp48, &sp30); if (player->pos.y < (gGroundHeight + 100.0f)) { if ((sp3C.y < gGroundHeight + 80.0f) && ((gGameFrameCount % 2) == 0)) { if (D_play_80161A64) {} func_effect_8007ACE0(sp3C.x, gGroundHeight, sp3C.z, 0.1f, 2.0f, - player->unk_0E8 + player->unk_114 + 20.0f); + player->rot.y + player->yRot_114 + 20.0f); } if ((sp30.y < gGroundHeight + 80.0f) && ((gGameFrameCount % 2) == 0)) { func_effect_8007ACE0(sp30.x, gGroundHeight, sp30.z, 0.1f, 2.0f, - player->unk_0E8 + player->unk_114 - 20.0f); + player->rot.y + player->yRot_114 - 20.0f); } } if ((sp30.y < gGroundHeight + 80.0f) || (sp3C.y < gGroundHeight + 80.0f)) { @@ -456,7 +456,7 @@ void Play_Setup(void) { gSavedZoSearchlightStatus = false; gSceneSetup = 0; gAllRangeCheckpoint = gSavedObjectLoadIndex = 0; - D_ctx_80177CB0 = 0.0f; + gSavedPathProgress = 0.0f; gSavedHitCount = gCsFrameCount = gLevelStartStatusScreenTimer = gLevelClearScreenTimer = gRadioState = 0; D_ctx_8017782C = 1; if (((gCurrentLevel == LEVEL_VENOM_2) && (gNextLevelPhase == 2)) || (gCurrentLevel == LEVEL_VENOM_ANDROSS)) { @@ -495,7 +495,7 @@ void func_play_800A594C(void) { } else { sEnvironment = SEGMENTED_TO_VIRTUAL(D_800D2F98[gCurrentLevel]); } - if (D_ctx_8017782C == 0) { + if (!D_ctx_8017782C) { if (gCurrentLevel == LEVEL_SOLAR) { Audio_SetHeatAlarmParams(255, 1); AUDIO_PLAY_SFX(0x4100C023, gDefaultSfxSource, 4); @@ -828,10 +828,10 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) { player->damage = damage; } if (player->damage != 0) { - player->timer_220 = 4; + player->radioDamageTimer = 4; } player->unk_284 = 0; - player->unk_1F4 = 20; + player->hitTimer = 20; if (player->unk_1A4 > 40) { sp34 = (player->boostSpeed * 0.3f) + 20.0f; player->timer_498 = 5; @@ -861,24 +861,24 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) { func_play_800A5FA0(player->sfxSource, 0x0903A00F, player->num); } } - Matrix_RotateY(gCalcMatrix, player->unk_114 * M_DTOR, MTXF_NEW); - Matrix_RotateZ(gCalcMatrix, player->unk_0F8 * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, player->yRot_114 * M_DTOR, MTXF_NEW); + Matrix_RotateZ(gCalcMatrix, player->bankAngle * M_DTOR, MTXF_APPLY); sp44.z = 0.0f; switch (player->unk_21C) { case 0: player->timer_224 = 20; - player->unk_0D8.x = 0.f; - player->unk_0D8.y = 0.f; - player->unk_0D8.z = 0.f; + player->knockback.x = 0.f; + player->knockback.y = 0.f; + player->knockback.z = 0.f; break; case 1: sp44.x = -sp34; sp44.y = 0.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); - player->unk_0D8.x = sp38.x; - player->unk_0D8.y = sp38.y; - player->unk_0D8.z = sp38.z; + player->knockback.x = sp38.x; + player->knockback.y = sp38.y; + player->knockback.z = sp38.z; func_play_800A668C(player->hit1.x - player->vel.x, player->hit1.y, player->hit1.z - player->vel.z); Player_DamageWings(player, 1, 20); break; @@ -887,9 +887,9 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) { sp44.y = 0.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); - player->unk_0D8.x = sp38.x; - player->unk_0D8.y = sp38.y; - player->unk_0D8.z = sp38.z; + player->knockback.x = sp38.x; + player->knockback.y = sp38.y; + player->knockback.z = sp38.z; func_play_800A668C(player->hit2.x - player->vel.x, player->hit2.y, player->hit2.z - player->vel.z); Player_DamageWings(player, 2, 20); break; @@ -900,9 +900,9 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) { sp44.x = 0.0f; sp44.y = -sp34; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); - player->unk_0D8.x = sp38.x; - player->unk_0D8.y = sp38.y; - player->unk_0D8.z = sp38.z; + player->knockback.x = sp38.x; + player->knockback.y = sp38.y; + player->knockback.z = sp38.z; } if (Rand_ZeroOne() < 0.5f) { Player_DamageWings(player, 1, 15); @@ -916,9 +916,9 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) { sp44.x = 0.0f; sp44.y = sp34; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); - player->unk_0D8.x = sp38.x; - player->unk_0D8.y = sp38.y; - player->unk_0D8.z = sp38.z; + player->knockback.x = sp38.x; + player->knockback.y = sp38.y; + player->knockback.z = sp38.z; if (Rand_ZeroOne() < 0.5f) { Player_DamageWings(player, 1, 15); } else { @@ -928,9 +928,9 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) { } if ((gCurrentLevel == LEVEL_VENOM_1) && (player->unk_1A4 == 42)) { if (player->pos.x > 0.0f) { - player->unk_0D8.x = -30.0f; + player->knockback.x = -30.0f; } else { - player->unk_0D8.x = 30.0f; + player->knockback.x = 30.0f; } player->timer_498 = 10; } @@ -945,8 +945,8 @@ void func_play_800A729C(Player* player, u32 arg1, f32 arg2, f32 arg3) { switch (arg1) { case 1: case 2: - player->pos.x = player->unk_090.x; - player->unk_0D8.x = 0.0f; + player->pos.x = player->basePos.x; + player->knockback.x = 0.0f; player->pos.x += D_800D2FEC[player->unk_21C]; if (player->form == FORM_LANDMASTER) { player->pos.x -= D_800D2FEC[player->unk_21C]; @@ -955,13 +955,13 @@ void func_play_800A729C(Player* player, u32 arg1, f32 arg2, f32 arg3) { break; case 3: case 4: - player->pos.z = player->unk_090.z; - player->unk_0D8.z = 0.0f; + player->pos.z = player->basePos.z; + player->knockback.z = 0.0f; player->pos.z += D_800D2FEC[player->unk_21C]; if (player->form == FORM_LANDMASTER) { player->pos.z += D_800D2FEC[player->unk_21C]; } - player->unk_138 = player->pos.z; + player->trueZpos = player->pos.z; Math_SmoothStepToF(&player->baseSpeed, 2.0f, 1.0f, 2.0f, 0.00001f); break; case 0: @@ -1013,12 +1013,12 @@ bool func_play_800A73E4(f32* arg0, s32* arg1, f32 xPos, f32 yPos, f32 zPos) { } sp9C = (s32) ((xPos + 2400.0f) / 300.0f); - sp98 = (s32) ((zPos + D_ctx_80177D20 + 1500.0f + 2400.0f) / 300.0f); + sp98 = (s32) ((zPos + gPathProgress + 1500.0f + 2400.0f) / 300.0f); if ((sp9C < 0) || (sp9C >= 16) || (sp98 < 0) || (sp98 >= 16)) { return false; } sp90 = Math_ModF(xPos + 2400.0f, 300.0f); - sp94 = Math_ModF(zPos + D_ctx_80177D20 + 1500.0f + 2400.0f, 300.0f); + sp94 = Math_ModF(zPos + gPathProgress + 1500.0f + 2400.0f, 300.0f); sp8C = (sp98 * 17) + sp9C; x0 = spA4[spA0[sp8C]].n.ob[0] * 3.0f; y0 = spA4[spA0[sp8C]].n.ob[1] * 2.0f; @@ -1051,7 +1051,7 @@ bool func_play_800A73E4(f32* arg0, s32* arg1, f32 xPos, f32 yPos, f32 zPos) { crz = (dx10 * dy21) - (dy10 * dx21); temp1 = -crx * x0 - cry * y0 - crz * z0; - sp48 = (-temp1 - crx * xPos - crz * (zPos + D_ctx_80177D20 + 1500.0f)) / cry; + sp48 = (-temp1 - crx * xPos - crz * (zPos + gPathProgress + 1500.0f)) / cry; if (yPos < sp48) { *arg0 = sp48; *arg1 = sp8C; @@ -1235,7 +1235,7 @@ bool func_play_800A8054(ObjectId objId, f32 arg1, f32 arg2, f32 arg3, f32 arg4, case OBJ_BOSS_313: colId = COL1_8; break; - case OBJ_SCENERY_39: + case OBJ_SCENERY_ME_TUNNEL: colId = COL1_1; break; case OBJ_SCENERY_120: @@ -1392,18 +1392,18 @@ s32 func_play_800A8304(Player* player, ObjectId objId, f32 arg2, f32 arg3, f32 a if ((player->form == FORM_LANDMASTER) || (player->form == FORM_ON_FOOT)) { sp78.x = player->pos.x - sp84.x; sp78.y = player->pos.y - sp84.y; - sp78.z = player->unk_138 - sp84.z; + sp78.z = player->trueZpos - sp84.z; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp78, &sp6C); if (func_play_800A8054(objId, sp84.x, sp84.y, sp84.z, sp6C.x + sp84.x, sp6C.y + sp84.y, sp6C.z + sp84.z, &sp60, &sp54)) { player->pos.y = sp60.y; - player->unk_104 = Math_RadToDeg(sp60.x); - player->unk_10C = Math_RadToDeg(sp60.z); + player->rot_104.x = Math_RadToDeg(sp60.x); + player->rot_104.z = Math_RadToDeg(sp60.z); player->vel.y = 0.0f; if (player->form == FORM_ON_FOOT) { player->vel.y = -5.0f; } - player->unk_1D4 = 1; + player->grounded = true; return 5; } return 0; @@ -1494,10 +1494,10 @@ void func_play_800A8804(Player* playerA, Player* playerB) { void func_play_800A887C(Player* player) { Vec3f sp3C; - Matrix_Translate(gCalcMatrix, player->pos.x, player->pos.y, player->unk_138, MTXF_NEW); + Matrix_Translate(gCalcMatrix, player->pos.x, player->pos.y, player->trueZpos, MTXF_NEW); if (player->form == FORM_LANDMASTER) { - player->unk_10C = 0.0f; - player->unk_104 = 0.0f; + player->rot_104.z = 0.0f; + player->rot_104.x = 0.0f; sp3C.x = -40.0f; sp3C.y = 40.0f; @@ -1525,8 +1525,8 @@ void func_play_800A887C(Player* player) { Matrix_MultVec3f(gCalcMatrix, &sp3C, &player->hit4); } if ((player->form == FORM_ARWING) || (player->form == FORM_BLUE_MARINE)) { - Matrix_RotateY(gCalcMatrix, (player->unk_114 + 180.0f) * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, -(player->unk_0F8 * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->yRot_114 + 180.0f) * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -(player->bankAngle * M_DTOR), MTXF_APPLY); sp3C.y = 0.0f; sp3C.z = 0.0f; if (player->wings.leftState == WINGSTATE_INTACT) { @@ -1588,8 +1588,8 @@ void func_play_800A8BA4(Player* player) { func_tank_800444BC(player); break; case FORM_BLUE_MARINE: // This should probably be FORM_ON_FOOT - if (Ground_801B6AEC(player->pos.x, player->pos.y - 12.0f, player->unk_138 + player->unk_144)) { - Ground_801B6E20(player->pos.x, player->unk_138 + player->unk_144, &spE8, &spE0, &spE4); + if (Ground_801B6AEC(player->pos.x, player->pos.y - 12.0f, player->trueZpos + player->zPath)) { + Ground_801B6E20(player->pos.x, player->trueZpos + player->zPath, &spE8, &spE0, &spE4); player->pos.y = spE0 + 10.0f; } break; @@ -1597,8 +1597,8 @@ void func_play_800A8BA4(Player* player) { } else if (player->form == FORM_ARWING) { if ((player->hit1.y < (gGroundHeight + 13.0f)) && (player->state_1C8 != PLAYERSTATE_1C8_DOWN)) { if (gGroundSurface == SURFACE_WATER) { - player->unk_1F4 = 7; - player->unk_0E4 = (player->baseSpeed + player->boostSpeed) * 0.5f; + player->hitTimer = 7; + player->rot.x = (player->baseSpeed + player->boostSpeed) * 0.5f; } else { Player_ApplyDamage(player, 1, 21); } @@ -1610,8 +1610,8 @@ void func_play_800A8BA4(Player* player) { } if ((player->hit2.y < (gGroundHeight + 13.0f)) && (player->state_1C8 != PLAYERSTATE_1C8_DOWN)) { if (gGroundSurface == SURFACE_WATER) { - player->unk_1F4 = 7; - player->unk_0E4 = (player->baseSpeed + player->boostSpeed) * 0.5f; + player->hitTimer = 7; + player->rot.x = (player->baseSpeed + player->boostSpeed) * 0.5f; } else { Player_ApplyDamage(player, 2, 21); } @@ -1636,7 +1636,7 @@ void func_play_800A8BA4(Player* player) { for (i = 0, scenery360 = gScenery360; i < 200; i++, scenery360++) { if (scenery360->obj.status == OBJ_ACTIVE) { spC8.x = scenery360->obj.pos.x - player->pos.x; - spC8.z = scenery360->obj.pos.z - player->unk_138; + spC8.z = scenery360->obj.pos.z - player->trueZpos; if (sqrtf(SQ(spC8.x) + SQ(spC8.z)) < sp8C) { if ((scenery360->obj.id == OBJ_SCENERY_117) || (scenery360->obj.id == OBJ_SCENERY_143) || (scenery360->obj.id == OBJ_SCENERY_141) || (scenery360->obj.id == OBJ_SCENERY_149) || @@ -1691,15 +1691,15 @@ void func_play_800A8BA4(Player* player) { Matrix_RotateY(gCalcMatrix, (scenery360->obj.rot.y + 180.0f) * M_DTOR, MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, &D_800D3040[sp98 - 1], &spBC); - player->unk_0D8.x = spBC.x; - player->unk_0D8.y = spBC.y; - player->unk_0D8.z = spBC.z; + player->knockback.x = spBC.x; + player->knockback.y = spBC.y; + player->knockback.z = spBC.z; - player->unk_0E8 = player->unk_0E4 = 0.0f; - player->pos.x = player->unk_090.x; - player->pos.y = player->unk_090.y; - player->pos.z = player->unk_090.z; - player->unk_114 = scenery360->obj.rot.y + 180.0f; + player->rot.y = player->rot.x = 0.0f; + player->pos.x = player->basePos.x; + player->pos.y = player->basePos.y; + player->pos.z = player->basePos.z; + player->yRot_114 = scenery360->obj.rot.y + 180.0f; player->timer_498 = 5; } if ((scenery360->obj.id == OBJ_SCENERY_135) || @@ -1712,18 +1712,18 @@ void func_play_800A8BA4(Player* player) { Matrix_RotateY(gCalcMatrix, scenery360->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, &D_800D30B8[sp98 - 1], &spBC); } - player->unk_0D8.x = spBC.x; - player->unk_0D8.y = spBC.y; - player->unk_0D8.z = spBC.z; - player->unk_0E8 = 0.0f; - player->unk_0E4 = 0.0f; - player->pos.x = player->unk_090.x; - player->pos.y = player->unk_090.y; - player->pos.z = player->unk_090.z; + player->knockback.x = spBC.x; + player->knockback.y = spBC.y; + player->knockback.z = spBC.z; + player->rot.y = 0.0f; + player->rot.x = 0.0f; + player->pos.x = player->basePos.x; + player->pos.y = player->basePos.y; + player->pos.z = player->basePos.z; if (scenery360->obj.id == OBJ_SCENERY_135) { - player->unk_114 = scenery360->obj.rot.y + 180.0f; + player->yRot_114 = scenery360->obj.rot.y + 180.0f; } else { - player->unk_114 = scenery360->obj.rot.y; + player->yRot_114 = scenery360->obj.rot.y; } player->timer_498 = 5; } @@ -1742,14 +1742,14 @@ void func_play_800A8BA4(Player* player) { (scenery->obj.id != OBJ_SCENERY_70) && (scenery->obj.id != OBJ_SCENERY_72) && (scenery->obj.id != OBJ_SCENERY_71) && (scenery->obj.id != OBJ_SCENERY_73) && (scenery->obj.id != OBJ_SCENERY_74) && (scenery->obj.id != OBJ_SCENERY_69) && - ((player->unk_138 - 2000.0f) < scenery->obj.pos.z)) { + ((player->trueZpos - 2000.0f) < scenery->obj.pos.z)) { if ((scenery->obj.id == OBJ_SCENERY_1) || (scenery->obj.id == OBJ_SCENERY_4) || (scenery->obj.id == OBJ_SCENERY_5) || (scenery->obj.id == OBJ_SCENERY_47) || (scenery->obj.id == OBJ_SCENERY_117) || (scenery->obj.id == OBJ_SCENERY_120) || (scenery->obj.id == OBJ_SCENERY_124) || (scenery->obj.id == OBJ_SCENERY_126) || (scenery->obj.id == OBJ_SCENERY_2) || (scenery->obj.id == OBJ_SCENERY_3)) { spC8.x = scenery->obj.pos.x - player->pos.x; - spC8.z = scenery->obj.pos.z - player->unk_138; + spC8.z = scenery->obj.pos.z - player->trueZpos; if (sqrtf(SQ(spC8.x) + SQ(spC8.z)) < 1100.0f) { temp_v0 = func_play_800A8304(player, scenery->obj.id, scenery->obj.pos.x, scenery->obj.pos.y, scenery->obj.pos.z, scenery->obj.rot.x, @@ -1800,32 +1800,32 @@ void func_play_800A8BA4(Player* player) { spC8.z = 0.0f; Matrix_MultVec3f(gCalcMatrix, &spC8, &spBC); - player->unk_0D8.x = spBC.x; - player->unk_0D8.y = spBC.y; - player->pos.x = player->unk_090.x; + player->knockback.x = spBC.x; + player->knockback.y = spBC.y; + player->pos.x = player->basePos.x; player->timer_498 = 5; } else if (scenery->obj.id == OBJ_SCENERY_50) { if (player->pos.x < scenery->obj.pos.x) { - player->unk_0D8.x = -30.0f; - player->unk_0E8 = 45.0f; + player->knockback.x = -30.0f; + player->rot.y = 45.0f; } else { - player->unk_0D8.x = 30.0f; - player->unk_0E8 = -45.0f; + player->knockback.x = 30.0f; + player->rot.y = -45.0f; } - player->unk_0D8.y = 0.0f; - player->pos.x = player->unk_090.x; + player->knockback.y = 0.0f; + player->pos.x = player->basePos.x; player->timer_498 = 5; } else if (scenery->obj.id == OBJ_SCENERY_131) { Matrix_RotateY(gCalcMatrix, (scenery->obj.rot.y + 180.0f) * M_DTOR, MTXF_NEW); Matrix_RotateZ(gCalcMatrix, -scenery->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &D_800D3040[sp98 - 1], &spBC); - player->unk_0D8.x = spBC.x; - player->unk_0D8.y = spBC.y; - player->unk_0E8 = 0.0f; - player->unk_0E4 = 0.0f; + player->knockback.x = spBC.x; + player->knockback.y = spBC.y; + player->rot.y = 0.0f; + player->rot.x = 0.0f; player->timer_498 = 5; - player->pos.x = player->unk_090.x; - player->pos.y = player->unk_090.y; + player->pos.x = player->basePos.x; + player->pos.y = player->basePos.y; } } } @@ -1847,20 +1847,20 @@ void func_play_800A8BA4(Player* player) { if (boss->obj.id == OBJ_BOSS_310) { spfD4.x = fabsf(boss->obj.pos.x - player->pos.x) * .8333333f; spfD4.y = fabsf(boss->obj.pos.y - player->pos.y) * 2; - spfD4.z = fabsf(boss->obj.pos.z - player->unk_138) * 0.8333333f; + spfD4.z = fabsf(boss->obj.pos.z - player->trueZpos) * 0.8333333f; if ((VEC3F_MAG(&spfD4)) < 1500.0f) { Player_ApplyDamage(player, 0, boss->info.damage); player->boostSpeed = 0.0f; player->timer_498 = 5; - player->unk_0D8.y = 30.0f; + player->knockback.y = 30.0f; boss->dmgType = DMG_BEAM; func_effect_8007BFFC(player->pos.x + RAND_FLOAT_CENTERED(10.0f), player->pos.y + RAND_FLOAT(10.0f), - player->unk_138 + RAND_FLOAT_CENTERED(10.0f), 0.0f, 15.0f, 0.0f, 2.0f, 5); + player->trueZpos + RAND_FLOAT_CENTERED(10.0f), 0.0f, 15.0f, 0.0f, 2.0f, 5); for (j = 0; j < 10; j++) { func_effect_8007C484( player->pos.x + RAND_FLOAT_CENTERED(30.0f), player->pos.y + RAND_FLOAT(10.0f), - player->unk_138 + RAND_FLOAT_CENTERED(30.0f), player->vel.x, 20.0f + player->vel.y, + player->trueZpos + RAND_FLOAT_CENTERED(30.0f), player->vel.x, 20.0f + player->vel.y, player->vel.z, RAND_FLOAT(0.1f) + 0.1f, player->num + 11); } break; @@ -1869,7 +1869,7 @@ void func_play_800A8BA4(Player* player) { if (boss->obj.id == OBJ_BOSS_316) { spfD4.x = fabsf(boss->obj.pos.x - player->pos.x); spfD4.y = fabsf(boss->obj.pos.y - 300.0f - player->pos.y) * 7.42f; - spfD4.z = fabsf(boss->obj.pos.z - player->unk_138); + spfD4.z = fabsf(boss->obj.pos.z - player->trueZpos); if ((VEC3F_MAG(&spfD4)) < 2700.0f) { Player_ApplyDamage(player, 3, boss->info.damage); } @@ -1893,11 +1893,11 @@ void func_play_800A8BA4(Player* player) { Player_ApplyDamage(player, temp_v0, boss->info.damage); if ((boss->obj.id == OBJ_BOSS_303) && ((boss->state == 2) || (boss->state == 3)) && (sp98 >= 9)) { - player->unk_0D8.y = -100.0f; + player->knockback.y = -100.0f; } if ((boss->obj.id == OBJ_BOSS_320) && (sp98 < 5)) { - player->unk_0D8.x = boss->fwork[14]; - player->unk_0D8.y = boss->fwork[15]; + player->knockback.x = boss->fwork[14]; + player->knockback.y = boss->fwork[15]; } } } @@ -1924,10 +1924,10 @@ void func_play_800A8BA4(Player* player) { } else if (actor->unk_0B4 == EINFO_63) { spfD4.x = fabsf(actor->obj.pos.x - player->pos.x); spfD4.y = fabsf(actor->obj.pos.y - player->pos.y); - spfD4.z = fabsf(actor->obj.pos.z - player->unk_138); + spfD4.z = fabsf(actor->obj.pos.z - player->trueZpos); if ((VEC3F_MAG(&spfD4)) < 900.0f) { Player_ApplyDamage(player, 0, actor->info.damage); - actor->unk_0D0 = 3; + actor->dmgType = 3; } } else { temp_v0 = func_play_800A7974(player, actor->info.hitbox, &sp98, actor->obj.pos.x, @@ -1956,8 +1956,8 @@ void func_play_800A8BA4(Player* player) { } } else { Player_ApplyDamage(player, temp_v0, actor->info.damage); - actor->unk_0D0 = 3; - actor->unk_0D4 = player->num + 1; + actor->dmgType = 3; + actor->dmgSource = player->num + 1; } } } @@ -1967,11 +1967,11 @@ void func_play_800A8BA4(Player* player) { actor->fwork[8] + actor->obj.pos.y + 25.0f, actor->obj.pos.z, actor->fwork[29], actor->fwork[26], actor->obj.rot.z, 0.0f, 0.0f, 0.0f); if (temp_v0 != 0) { - actor->unk_0D0 = 3; + actor->dmgType = 3; if (actor->info.damage) { Player_ApplyDamage(player, temp_v0, actor->info.damage); } else { - actor->unk_0D0 = -1; + actor->dmgType = -1; } } } else { @@ -1988,17 +1988,17 @@ void func_play_800A8BA4(Player* player) { player->whooshTimer = 4; } } else { - actor->unk_0D0 = 3; + actor->dmgType = 3; if (actor->obj.id == OBJ_ACTOR_190) { - actor->unk_0D0 = -1; + actor->dmgType = -1; } if (actor->info.damage) { Player_ApplyDamage(player, temp_v0, actor->info.damage); if (actor->obj.id == OBJ_ACTOR_225) { - player->unk_0D8.y = 0.0f; + player->knockback.y = 0.0f; } } else { - actor->unk_0D0 = -1; + actor->dmgType = -1; } } } @@ -2007,7 +2007,7 @@ void func_play_800A8BA4(Player* player) { } for (i = 0, sprite = gSprites; i < ARRAY_COUNT(gSprites); i++, sprite++) { if (sprite->obj.status == OBJ_ACTIVE) { - if ((player->unk_138 - 200.0f) < sprite->obj.pos.z) { + if ((player->trueZpos - 200.0f) < sprite->obj.pos.z) { temp_v0 = func_play_800A7974(player, sprite->info.hitbox, &sp98, sprite->obj.pos.x, sprite->obj.pos.y, sprite->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f); @@ -2015,7 +2015,7 @@ void func_play_800A8BA4(Player* player) { if ((sprite->obj.id == OBJ_SPRITE_FO_POLE) || (sprite->obj.id == OBJ_SPRITE_CO_POLE) || (sprite->obj.id == OBJ_SPRITE_TI_CACTUS) || (sprite->obj.id == OBJ_SPRITE_CO_TREE)) { sprite->unk_46 = 1; - player->unk_1F4 = 6; + player->hitTimer = 6; player->unk_21C = 0; } else { Player_ApplyDamage(player, temp_v0, sprite->info.damage); @@ -2047,20 +2047,20 @@ void func_play_800A8BA4(Player* player) { spC8.y = 7.0f; } spBC.y = spC8.x + spC8.y; - if ((fabsf(opponent->unk_138 - player->unk_138) <= spBC.z) && + if ((fabsf(opponent->trueZpos - player->trueZpos) <= spBC.z) && (fabsf(opponent->pos.y - player->pos.y) <= spBC.y) && (fabsf(opponent->pos.x - player->pos.x) <= spBC.x)) { if ((player->form == FORM_ON_FOOT) && (opponent->form == FORM_ON_FOOT)) { - player->pos.x = player->unk_090.x; - player->pos.y = player->unk_090.y; - player->pos.z = player->unk_138 = player->unk_090.z; - opponent->pos.x = opponent->unk_090.x; - opponent->pos.y = opponent->unk_090.y; - opponent->pos.z = opponent->unk_138 = opponent->unk_090.z; - player->unk_0D8.x = (player->pos.x - opponent->unk_090.x) * 0.5f; - player->unk_0D8.z = (player->unk_138 - opponent->unk_138) * 0.5f; - opponent->unk_0D8.x = -player->unk_0D8.x; - opponent->unk_0D8.z = -player->unk_0D8.z; + player->pos.x = player->basePos.x; + player->pos.y = player->basePos.y; + player->pos.z = player->trueZpos = player->basePos.z; + opponent->pos.x = opponent->basePos.x; + opponent->pos.y = opponent->basePos.y; + opponent->pos.z = opponent->trueZpos = opponent->basePos.z; + player->knockback.x = (player->pos.x - opponent->basePos.x) * 0.5f; + player->knockback.z = (player->trueZpos - opponent->trueZpos) * 0.5f; + opponent->knockback.x = -player->knockback.x; + opponent->knockback.z = -player->knockback.z; opponent->baseSpeed = player->baseSpeed = 2.0f; } else { func_play_800A8804(player, opponent); @@ -2073,20 +2073,20 @@ void func_play_800A8BA4(Player* player) { if (D_ctx_80178294 != 0) { if (func_play_800A73E4(&sp94, &sp90, player->hit4.x, player->hit4.y, player->hit4.z)) { if (gCurrentLevel == LEVEL_ZONESS) { - player->unk_0E4 = (player->baseSpeed + player->boostSpeed) * 0.8f; - player->unk_1F4 = 15; + player->rot.x = (player->baseSpeed + player->boostSpeed) * 0.8f; + player->hitTimer = 15; func_effect_8007B228(player->hit4.x, sp94, player->hit4.z, 1.0f); } else { - if (player->unk_1F4 == 0) { + if (player->hitTimer == 0) { Player_ApplyDamage(player, 4, 10); } - player->unk_0D8.y = 30.0f; - player->unk_0E4 = (player->baseSpeed + player->boostSpeed) * 0.8f; + player->knockback.y = 30.0f; + player->rot.x = (player->baseSpeed + player->boostSpeed) * 0.8f; } if (player->state_1C8 == PLAYERSTATE_1C8_DOWN) { - player->timer_220 = 2; - func_effect_8007AFD0(player->pos.x, player->unk_138, 30.0f, 0.0f, 5.0f); - func_effect_8007AFD0(player->pos.x, player->unk_138, -30.0f, 0.0f, 5.0f); + player->radioDamageTimer = 2; + func_effect_8007AFD0(player->pos.x, player->trueZpos, 30.0f, 0.0f, 5.0f); + func_effect_8007AFD0(player->pos.x, player->trueZpos, -30.0f, 0.0f, 5.0f); } } if (func_play_800A73E4(&sp94, &sp90, player->pos.x + ((player->hit1.x - player->pos.x) * 1.5f), @@ -2095,10 +2095,10 @@ void func_play_800A8BA4(Player* player) { func_effect_8007B228(player->pos.x + (player->hit1.x - player->pos.x) * 1.5f, sp94, player->hit1.z, 1.0f); } else { - if (player->unk_1F4 == 0) { + if (player->hitTimer == 0) { Player_ApplyDamage(player, 1, 10); } - player->unk_0D8.y = 30.0f; + player->knockback.y = 30.0f; } } if (func_play_800A73E4(&sp94, &sp90, player->pos.x + ((player->hit2.x - player->pos.x) * 1.5f), @@ -2107,10 +2107,10 @@ void func_play_800A8BA4(Player* player) { func_effect_8007B228(player->pos.x + (player->hit2.x - player->pos.x) * 1.5f, sp94, player->hit2.z, 1.0f); } else { - if (player->unk_1F4 == 0) { + if (player->hitTimer == 0) { Player_ApplyDamage(player, 2, 40); } - player->unk_0D8.y = 30.0f; + player->knockback.y = 30.0f; } } } @@ -2150,18 +2150,18 @@ void func_play_800AA800(Player* player) { s32 pad4; if (player->unk_240 == 0) { - player->unk_064 = player->pos.x; - player->unk_06C = player->unk_138 - player->pos.y; + player->groundPos.x = player->pos.x; + player->groundPos.z = player->trueZpos - player->pos.y; if (gGroundType != 4) { if (gCamCount == 1) { - player->unk_068 = gGroundHeight + 3.0f; + player->groundPos.y = gGroundHeight + 3.0f; } else { - player->unk_068 = gGroundHeight; + player->groundPos.y = gGroundHeight; if (player->form == FORM_ON_FOOT) { - player->unk_06C = player->unk_138; + player->groundPos.z = player->trueZpos; } } - player->unk_248 = player->unk_24C = player->unk_070 = 0.0f; + player->unk_248 = player->unk_24C = player->groundRotY = 0.0f; } sp100 = 0.0f; spFC = 0.0f; @@ -2174,13 +2174,13 @@ void func_play_800AA800(Player* player) { ((scenery360->obj.id == OBJ_SCENERY_143) || (scenery360->obj.id == OBJ_SCENERY_140) || (scenery360->obj.id == OBJ_SCENERY_141)) && (fabsf(scenery360->obj.pos.x - player->pos.x) < 2000.0f) && - (fabsf(scenery360->obj.pos.z - player->unk_138) < 2000.0f)) { + (fabsf(scenery360->obj.pos.z - player->trueZpos) < 2000.0f)) { spC8.x = scenery360->obj.pos.x; spC8.y = scenery360->obj.pos.y; spC8.z = scenery360->obj.pos.z; spD4.x = player->pos.x; spD4.y = gGroundHeight; - spD4.z = player->unk_138; + spD4.z = player->trueZpos; colId = COL2_4; if (scenery360->obj.id == OBJ_SCENERY_141) { colId = COL2_6; @@ -2188,7 +2188,7 @@ void func_play_800AA800(Player* player) { colId = COL2_17; } if (func_col2_800A3690(&spD4, &spC8, colId, &spBC)) { - player->unk_068 = spBC.y + 1.0f; + player->groundPos.y = spBC.y + 1.0f; player->unk_248 = spBC.x; player->unk_24C = spBC.z; break; @@ -2198,15 +2198,15 @@ void func_play_800AA800(Player* player) { } } else { if ((gLevelMode == LEVELMODE_ALL_RANGE) && (gLevelType == LEVELTYPE_PLANET)) { - player->unk_064 = player->pos.x; - player->unk_06C = player->unk_138; + player->groundPos.x = player->pos.x; + player->groundPos.z = player->trueZpos; for (sp144 = 0, scenery360 = gScenery360; sp144 < 200; sp144++, scenery360++) { if ((scenery360->obj.status == OBJ_ACTIVE) && ((scenery360->obj.id == OBJ_SCENERY_150) || (scenery360->obj.id == OBJ_SCENERY_149) || (scenery360->obj.id == OBJ_SCENERY_148) || (scenery360->obj.id == OBJ_SCENERY_1) || (scenery360->obj.id == OBJ_SCENERY_3)) && (fabsf(scenery360->obj.pos.x - player->pos.x) < 2500.0f) && - (fabsf(scenery360->obj.pos.z - player->unk_138) < 2500.0f)) { + (fabsf(scenery360->obj.pos.z - player->trueZpos) < 2500.0f)) { tempx = scenery360->obj.pos.x; tempy = scenery360->obj.pos.y; tempz = scenery360->obj.pos.z; @@ -2214,7 +2214,7 @@ void func_play_800AA800(Player* player) { Matrix_RotateY(gCalcMatrix, -sp120 * M_DTOR, MTXF_NEW); spEC.x = player->pos.x - tempx; spEC.y = 0.0f; - spEC.z = player->unk_138 - tempz; + spEC.z = player->trueZpos - tempz; Matrix_MultVec3fNoTranslate(gCalcMatrix, &spEC, &spE0); spD4.x = spE0.x + tempx; spD4.y = spE0.y + tempy; @@ -2230,10 +2230,10 @@ void func_play_800AA800(Player* player) { colId = COL1_6; } if (func_col1_800998FC(&spD4, &spC8, &sp9C, colId, &spB0, spA8) > 0) { - player->unk_068 = spB0.y; + player->groundPos.y = spB0.y; player->unk_248 = spA8[0]; player->unk_24C = spA8[1]; - player->unk_070 = DEG_TO_RAD(sp120); + player->groundRotY = DEG_TO_RAD(sp120); } } else { colId = COL2_0; @@ -2241,10 +2241,10 @@ void func_play_800AA800(Player* player) { colId = COL2_3; } if (func_col2_800A3690(&spD4, &spC8, colId, &spBC)) { - player->unk_068 = spBC.y; + player->groundPos.y = spBC.y; player->unk_248 = spBC.x; player->unk_24C = spBC.z; - player->unk_070 = DEG_TO_RAD(sp120); + player->groundRotY = DEG_TO_RAD(sp120); } } } @@ -2253,7 +2253,7 @@ void func_play_800AA800(Player* player) { for (sp144 = 0, scenery = gScenery; (sp144 < 50) && (gLevelMode == LEVELMODE_ON_RAILS) && (gCurrentLevel != LEVEL_VENOM_1); sp144++, scenery++) { - if ((scenery->obj.status == OBJ_ACTIVE) && ((player->unk_138 - 3000.0f) < scenery->obj.pos.z) && + if ((scenery->obj.status == OBJ_ACTIVE) && ((player->trueZpos - 3000.0f) < scenery->obj.pos.z) && (scenery->obj.id != OBJ_SCENERY_0) && (scenery->obj.id != OBJ_SCENERY_8)) { tempx = scenery->obj.pos.x; tempy = scenery->obj.pos.y; @@ -2266,7 +2266,7 @@ void func_play_800AA800(Player* player) { for (var_fs1 = var_fs0 = -50.0f; var_fs0 > -500.0f; var_fs0 -= 5.0f, var_fs1 -= 5.0f) { spEC.x = player->pos.x - tempx; spEC.y = player->pos.y + var_fs0 - tempy; - spEC.z = player->unk_138 + var_fs1 - tempz; + spEC.z = player->trueZpos + var_fs1 - tempz; Matrix_MultVec3fNoTranslate(gCalcMatrix, &spEC, &spE0); if ((player->pos.y + var_fs0) <= gGroundHeight) { break; @@ -2291,11 +2291,11 @@ void func_play_800AA800(Player* player) { colId = COL2_1; } if (func_col2_800A3690(&spD4, &spC8, colId, &spBC)) { - player->unk_068 = spBC.y; - player->unk_06C = player->unk_138 + var_fs1; + player->groundPos.y = spBC.y; + player->groundPos.z = player->trueZpos + var_fs1; player->unk_248 = spBC.x; player->unk_24C = spBC.z; - player->unk_070 = DEG_TO_RAD(sp120); + player->groundRotY = DEG_TO_RAD(sp120); break; } } @@ -2328,7 +2328,7 @@ void func_play_800AA800(Player* player) { for (var_fs0 = var_fs1 = -50.0f; var_fs0 > -500.0f; var_fs0 -= 5.0f, var_fs1 -= 5.0f) { spEC.x = player->pos.x - tempx; spEC.y = player->pos.y + var_fs0 - tempy; - spEC.z = player->unk_138 + var_fs1 - tempz; + spEC.z = player->trueZpos + var_fs1 - tempz; Matrix_MultVec3fNoTranslate(gCalcMatrix, &spEC, &spE0); tempx2 = spE0.x + tempx; tempy2 = spE0.y + tempy; @@ -2338,11 +2338,11 @@ void func_play_800AA800(Player* player) { } if (func_play_800A78C4(hitbox, tempx, tempy, tempz, tempx2, tempy2, tempz2)) { - if (gGroundHeight < player->unk_068) { - player->unk_068 = spEC.y + 15.0f + tempy; - player->unk_06C = spEC.z + 10.0f + tempz; + if (gGroundHeight < player->groundPos.y) { + player->groundPos.y = spEC.y + 15.0f + tempy; + player->groundPos.z = spEC.z + 10.0f + tempz; player->unk_248 = DEG_TO_RAD(sp100); - player->unk_070 = DEG_TO_RAD(sp120); + player->groundRotY = DEG_TO_RAD(sp120); } break; } @@ -2561,7 +2561,7 @@ void Play_Init(void) { Audio_KillSfxById(0x11403076); Audio_KillSfxById(0x49000014); Memory_FreeAll(); - D_ctx_80177C78 = D_ctx_80177C8C = gShowBossHealth = gStarWolfMsgTimer = gAllRangeWingRepairTimer = + gTraining360MsgTimer = gTraining360MsgIndex = gShowBossHealth = gStarWolfMsgTimer = gAllRangeWingRepairTimer = gAllRangeSuppliesSent = 0; D_display_800CA220 = 0; gShowLevelClearStatusScreen = 0; @@ -2573,7 +2573,7 @@ void Play_Init(void) { gAqDrawMode = D_800D2F54 = 0; D_display_800CA230 = D_800D2F58 = 0.0f; gLevelMode = LEVELMODE_ON_RAILS; - D_ctx_80177CE8 = D_bg_8015F968 = 0.0f; + gPathTexScroll = D_bg_8015F968 = 0.0f; D_hud_800D1970 = gVersusMode = gHideRadio = gChangeTo360 = false; if (gCurrentLevel >= LEVEL_FORTUNA) { gLevelMode = LEVELMODE_ALL_RANGE; @@ -2647,7 +2647,7 @@ void Play_Init(void) { gPlayer[i].state_1C8 = PLAYERSTATE_1C8_INIT; gPlayerGlareAlphas[i] = D_ctx_801783C0[i] = 0; gControllerRumbleTimers[i] = 0; - D_ctx_80177C30[i] = 0; + gPlayerScores[i] = 0; } if (gLevelMode == LEVELMODE_ALL_RANGE) { MEM_ARRAY_ALLOCATE(gScenery360, 200); @@ -2656,7 +2656,7 @@ void Play_Init(void) { } switch (gCurrentLevel) { case LEVEL_SECTOR_Z: - if (D_ctx_8017782C == 0) { + if (!D_ctx_8017782C) { SectorZ_8019EA68(); ActorAllRange_SpawnTeam(); } @@ -2667,12 +2667,12 @@ void Play_Init(void) { break; case LEVEL_KATINA: Katina_80198930(); - if (D_ctx_8017782C == 0) { + if (!D_ctx_8017782C) { ActorAllRange_SpawnTeam(); } break; case LEVEL_BOLSE: - if (D_ctx_8017782C == 0) { + if (!D_ctx_8017782C) { Bolse_80191ED8(); ActorAllRange_SpawnTeam(); } @@ -2707,10 +2707,10 @@ void func_play_800AC290(Player* player, PlayerShot* shot, f32 arg2, f32 arg3, Pl Vec3f sp2C; PlayerShot_Initialize(shot); - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, -((player->unk_0F8 + player->unk_0F0) * M_DTOR), MTXF_APPLY); - Matrix_Translate(gCalcMatrix, player->unk_084, player->unk_080, 0.0f, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->xRot_120 + player->rot.x + player->aerobaticPitch) * M_DTOR), MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -((player->bankAngle + player->rockAngle) * M_DTOR), MTXF_APPLY); + Matrix_Translate(gCalcMatrix, player->xShake, player->yBob, 0.0f, MTXF_APPLY); if (gVersusMode && (shotId <= PLAYERSHOT_1)) { speed *= 0.5f; } @@ -2737,27 +2737,27 @@ void func_play_800AC290(Player* player, PlayerShot* shot, f32 arg2, f32 arg3, Pl if (shot->obj.id == PLAYERSHOT_4) { shot->obj.pos.x = player->pos.x + sp2C.x; shot->obj.pos.y = player->pos.y + sp2C.y; - shot->obj.pos.z = player->unk_138 + sp2C.z; + shot->obj.pos.z = player->trueZpos + sp2C.z; shot->unk_64 = 38; } else { shot->obj.pos.x = player->pos.x + sp2C.x + (sp38.x * 1.2); shot->obj.pos.y = player->pos.y + sp2C.y + (sp38.y * 1.2); - shot->obj.pos.z = player->unk_138 + sp2C.z + (sp38.z * 1.2f); + shot->obj.pos.z = player->trueZpos + sp2C.z + (sp38.z * 1.2f); } - shot->obj.rot.x = player->unk_120 + player->unk_0E4 + player->unk_4D8; - shot->obj.rot.y = player->unk_0E8 + player->unk_114; - shot->obj.rot.z = player->unk_0F8; + shot->obj.rot.x = player->xRot_120 + player->rot.x + player->aerobaticPitch; + shot->obj.rot.y = player->rot.y + player->yRot_114; + shot->obj.rot.z = player->bankAngle; if (shotId == PLAYERSHOT_8) { if (gCurrentLevel == LEVEL_AQUAS) { shot->unk_58 = RAND_INT(360.0f); shot->unk_60 = RAND_INT(360.0f); - shot->unk_2C = player->unk_0E4 + player->unk_4D8; - shot->unk_30 = player->unk_0E8; - shot->unk_34 = player->unk_0F8; + shot->vec_2C.x = player->rot.x + player->aerobaticPitch; + shot->vec_2C.y = player->rot.y; + shot->vec_2C.z = player->bankAngle; shot->unk_5C = D_ctx_80178494; } else { - shot->unk_30 = player->unk_0E8 + player->unk_114; - shot->unk_2C = player->unk_0E4 + player->unk_4D8; + shot->vec_2C.y = player->rot.y + player->yRot_114; + shot->vec_2C.x = player->rot.x + player->aerobaticPitch; if (speed <= 65.0f) { shot->unk_5C = 1; } @@ -2773,11 +2773,11 @@ void func_play_800AC650(Player* player, PlayerShot* shot, PlayerShotId shotId, f Vec3f sp3C; PlayerShot_Initialize(shot); - Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, MTXF_NEW); - Matrix_RotateZ(gCalcMatrix, (player->unk_0EC + player->unk_0F0) * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gCalcMatrix, player->unk_114 * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, (-player->unk_12C - player->unk_130) * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, player->rot.x * M_DTOR, MTXF_NEW); + Matrix_RotateZ(gCalcMatrix, (player->rot.z + player->rockAngle) * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, player->yRot_114 * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->rot.y + 180.0f) * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, (-player->zRotBank - player->zRotBarrelRoll) * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, -player->unk_180 * M_DTOR, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, player->unk_17C * M_DTOR, MTXF_APPLY); sp54.x = 0; @@ -2785,13 +2785,13 @@ void func_play_800AC650(Player* player, PlayerShot* shot, PlayerShotId shotId, f sp54.z = speed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48); Matrix_Translate(gCalcMatrix, 0.0f, player->unk_18C + 30.0f, 0, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, (player->unk_0EC + player->unk_0F0) * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gCalcMatrix, player->unk_114 * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, (-player->unk_12C - player->unk_130) * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, player->rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, (player->rot.z + player->rockAngle) * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, player->yRot_114 * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->rot.y + 180.0f) * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, (-player->zRotBank - player->zRotBarrelRoll) * M_DTOR, MTXF_APPLY); Matrix_Translate(gCalcMatrix, 0.0f, -30.0f, 0, MTXF_APPLY); - Matrix_Translate(gCalcMatrix, player->unk_084, player->unk_080, 0.0f, MTXF_APPLY); + Matrix_Translate(gCalcMatrix, player->xShake, player->yBob, 0.0f, MTXF_APPLY); Matrix_Translate(gCalcMatrix, 0.0f, 51.0f, -4.0f, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, -player->unk_180 * M_DTOR, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, player->unk_17C * M_DTOR, MTXF_APPLY); @@ -2804,14 +2804,14 @@ void func_play_800AC650(Player* player, PlayerShot* shot, PlayerShotId shotId, f shot->vel.z = sp48.z; shot->obj.pos.x = player->pos.x + sp3C.x; shot->obj.pos.y = player->pos.y + sp3C.y; - shot->obj.pos.z = player->unk_138 + sp3C.z; + shot->obj.pos.z = player->trueZpos + sp3C.z; shot->obj.status = 1; - shot->unk_2C = -player->unk_17C; - shot->unk_30 = -player->unk_180; - shot->unk_34 = player->unk_12C; - shot->obj.rot.x = player->unk_0E4 + player->unk_120; - shot->obj.rot.y = player->unk_0E8 + player->unk_114; - shot->obj.rot.z = player->unk_0EC; + shot->vec_2C.x = -player->unk_17C; + shot->vec_2C.y = -player->unk_180; + shot->vec_2C.z = player->zRotBank; + shot->obj.rot.x = player->rot.x + player->xRot_120; + shot->obj.rot.y = player->rot.y + player->yRot_114; + shot->obj.rot.z = player->rot.z; shot->unk_64 = 40; shot->obj.id = shotId; @@ -2821,7 +2821,7 @@ void func_play_800AC650(Player* player, PlayerShot* shot, PlayerShotId shotId, f shot->unk_5C = 1; } shot->unk_64 = 30; - shot->unk_30 = player->unk_0E8 + player->unk_114; + shot->vec_2C.y = player->rot.y + player->yRot_114; } } @@ -2851,7 +2851,7 @@ void func_play_800ACABC(Player* player) { if (gPlayerShots[i].obj.status == 0) { func_play_800AC290(player, &gPlayerShots[i], 0.0f, 0.0f, PLAYERSHOT_0, 400.0f / 3.0f); func_play_800A5FA0(player->sfxSource, 0x09400000, player->num); - D_ctx_80177AA0[player->num] = 0.5f; + gMuzzleFlashScale[player->num] = 0.5f; break; } } @@ -2863,10 +2863,10 @@ void func_play_800ACABC(Player* player) { func_play_800AC290(player, &gPlayerShots[i], 0.0f, -10.0f, PLAYERSHOT_1, 400.0f / 3.0f); if (laser == LASERS_TWIN) { func_play_800A5FA0(player->sfxSource, 0x0940800C, player->num); - D_ctx_80177AA0[player->num] = 0.5f; + gMuzzleFlashScale[player->num] = 0.5f; } else { func_play_800A5FA0(player->sfxSource, 0x0940802B, player->num); - D_ctx_80177AA0[player->num] = 0.75f; + gMuzzleFlashScale[player->num] = 0.75f; } break; } @@ -2904,9 +2904,9 @@ void func_play_800ACDC0(Player* player, PlayerShot* shot, PlayerShotId shotId) { Vec3f sp44; PlayerShot_Initialize(shot); - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + player->unk_134 + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -((player->unk_0E4 + player->unk_134) * M_DTOR), MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, -((player->unk_0F8 + player->unk_0F0 + player->unk_134) * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + player->damageShake + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->rot.x + player->damageShake) * M_DTOR), MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -((player->bankAngle + player->rockAngle + player->damageShake) * M_DTOR), MTXF_APPLY); Matrix_RotateX(gCalcMatrix, player->unk_154 * M_DTOR, MTXF_APPLY); sp5C.x = 0.0f; sp5C.y = 0.0f; @@ -2916,10 +2916,10 @@ void func_play_800ACDC0(Player* player, PlayerShot* shot, PlayerShotId shotId) { sp5C.z = 150.0f; } Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp5C, &sp50); - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + player->unk_134 + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -((player->unk_0E4 + player->unk_134) * M_DTOR), MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, -((player->unk_0F8 + player->unk_0F0 + player->unk_134) * M_DTOR), MTXF_APPLY); - Matrix_Translate(gCalcMatrix, 0.0f, player->unk_080, 0, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + player->damageShake + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->rot.x + player->damageShake) * M_DTOR), MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -((player->bankAngle + player->rockAngle + player->damageShake) * M_DTOR), MTXF_APPLY); + Matrix_Translate(gCalcMatrix, 0.0f, player->yBob, 0, MTXF_APPLY); Matrix_Translate(gCalcMatrix, -10.0f, 25.0f, 0.0f, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, player->unk_154 * M_DTOR, MTXF_APPLY); sp5C.x = 0.0f; @@ -2931,9 +2931,9 @@ void func_play_800ACDC0(Player* player, PlayerShot* shot, PlayerShotId shotId) { shot->vel.z = sp50.z; shot->obj.pos.x = player->pos.x + sp44.x; shot->obj.pos.y = player->pos.y + sp44.y; - shot->obj.pos.z = player->unk_138 + sp44.z; + shot->obj.pos.z = player->trueZpos + sp44.z; - shot->unk_44 = 1.0f; + shot->scale = 1.0f; shot->obj.status = 1; shot->obj.id = shotId; @@ -2950,7 +2950,7 @@ void func_play_800AD094(Player* player) { if (gPlayerShots[i].obj.status == 0) { func_play_800ACDC0(player, &gPlayerShots[i], PLAYERSHOT_6); func_play_800A5FA0(player->sfxSource, 0x09000014, player->num); - player->timer_1F8 = 2; + player->csTimer = 2; player->unk_180 = 10.0f; break; } @@ -3035,7 +3035,7 @@ bool func_play_800AD1F4(Player* player) { if ((gPlayerShots[14 - player->num].obj.status == 0) || (gPlayerShots[14 - player->num].obj.id != PLAYERSHOT_8) || ((gPlayerShots[14 - player->num].obj.id == PLAYERSHOT_8) && - (gPlayerShots[14 - player->num].unk_44 > 1.0f))) { + (gPlayerShots[14 - player->num].scale > 1.0f))) { if (player->form == FORM_ARWING) { func_play_800AC290(player, &gPlayerShots[14 - player->num], 0.0f, 0.0f, PLAYERSHOT_8, 70.0f); } else { @@ -3148,7 +3148,7 @@ void func_play_800ADA28(Player* player) { if ((gInputHold->button & Z_TRIG) && !(gInputHold->button & R_TRIG)) { sp3C = 90.0f; sp38 = 0.2f; - if (player->unk_12C < 70.0f) { + if (player->zRotBank < 70.0f) { Math_SmoothStepToF(&player->wings.unk_04, -70.0f, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->wings.unk_08, -70.0f, 0.3f, 100.0f, 0.f); Math_SmoothStepToF(&player->wings.unk_0C, 70.0f, 0.3f, 100.0f, 0.f); @@ -3162,7 +3162,7 @@ void func_play_800ADA28(Player* player) { if ((gInputHold->button & R_TRIG) && !(gInputHold->button & Z_TRIG)) { sp3C = -90.0f; sp38 = 0.2f; - if (player->unk_12C > -70.0f) { + if (player->zRotBank > -70.0f) { Math_SmoothStepToF(&player->wings.unk_04, 70.0f, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->wings.unk_08, 70.0f, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->wings.unk_0C, -70.0f, 0.3f, 100.0f, 0.0f); @@ -3172,27 +3172,27 @@ void func_play_800ADA28(Player* player) { } } } - Math_SmoothStepToF(&player->unk_12C, sp3C, sp38, 10.0f, 0.f); + Math_SmoothStepToF(&player->zRotBank, sp3C, sp38, 10.0f, 0.f); if (gInputPress->button & Z_TRIG) { player->sfx.bank = 1; - if (player->timer_1E0 != 0) { - player->unk_1DC = 1; + if (player->barrelInputTimerL != 0) { + player->barrelRoll = 1; player->timer_1E8 = 10; - player->unk_1EC = player->unk_1F0 = 30; + player->rollRate = player->baseRollRate = 30; player->sfx.roll = 1; } else { - player->timer_1E0 = 10; + player->barrelInputTimerL = 10; } } if (gInputPress->button & R_TRIG) { player->sfx.bank = 1; - if (player->timer_1E4 != 0) { - player->unk_1DC = 1; + if (player->barrelInputTimerR != 0) { + player->barrelRoll = 1; player->timer_1E8 = 10; - player->unk_1EC = player->unk_1F0 = -30; + player->rollRate = player->baseRollRate = -30; player->sfx.roll = 1; } else { - player->timer_1E4 = 10; + player->barrelInputTimerR = 10; } } } @@ -3201,25 +3201,25 @@ void func_play_800ADD98(Player* player) { Math_SmoothStepToF(&player->unk_170, 0.0f, 1.0f, 0.2f, 0.0f); Math_SmoothStepToF(&player->unk_16C, 0.0f, 1.0f, 0.2f, 0.0f); if (gInputPress->button & Z_TRIG) { - if ((player->timer_1E0 != 0) && (player->unk_12C > 0.0f) && (player->boostMeter < 10.0f)) { - player->unk_1DC = 1; + if ((player->barrelInputTimerL != 0) && (player->zRotBank > 0.0f) && (player->boostMeter < 10.0f)) { + player->barrelRoll = 1; player->timer_1E8 = 15; - player->unk_1EC = player->unk_1F0 = 20; + player->rollRate = player->baseRollRate = 20; } else { - player->timer_1E0 = 10; + player->barrelInputTimerL = 10; } } if (gInputPress->button & R_TRIG) { - if ((player->timer_1E4 != 0) && (player->unk_12C < 0.0f) && (player->boostMeter < 10.0f)) { - player->unk_1DC = 1; + if ((player->barrelInputTimerR != 0) && (player->zRotBank < 0.0f) && (player->boostMeter < 10.0f)) { + player->barrelRoll = 1; player->timer_1E8 = 15; - player->unk_1EC = player->unk_1F0 = -20; + player->rollRate = player->baseRollRate = -20; } else { - player->timer_1E4 = 10; + player->barrelInputTimerR = 10; } } - player->unk_18C = fabsf(SIN_DEG(player->unk_12C) * 25.0f); - player->unk_18C += fabsf(SIN_DEG(player->unk_130) * 20.0f); + player->unk_18C = fabsf(SIN_DEG(player->zRotBank) * 25.0f); + player->unk_18C += fabsf(SIN_DEG(player->zRotBarrelRoll) * 20.0f); } void func_play_800ADF58(Player* player) { @@ -3227,53 +3227,53 @@ void func_play_800ADF58(Player* player) { f32 temp_fv0_2; s32 temp_v0; - player->unk_140 = -player->vel.z; - player->unk_144 += -player->vel.z; - D_ctx_80177D08 = -player->vel.z; - D_ctx_80177D20 = player->unk_144; - D_ctx_80177CE8 += player->unk_140; + player->zPathVel = -player->vel.z; + player->zPath += -player->vel.z; + gPathVelZ = -player->vel.z; + gPathProgress = player->zPath; + gPathTexScroll += player->zPathVel; if (gGroundType == 4) { - D_ctx_80177CC8 = player->unk_140; + gPathGroundScroll = player->zPathVel; } - if ((gBossActive == 0) && (player->unk_144 > 500000.0f)) { - player->unk_144 = 0.0f; + if ((gBossActive == 0) && (player->zPath > 500000.0f)) { + player->zPath = 0.0f; player->pos.z = 0.0f; gObjectLoadIndex = 0; Play_ClearObjectData(); } - player->unk_138 = player->pos.z + player->unk_08C; - player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; + player->trueZpos = player->pos.z + player->camDist; + player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; while (1) { - if (player->unk_0F8 > 360.0f) { - player->unk_0F8 -= 360.0f; + if (player->bankAngle > 360.0f) { + player->bankAngle -= 360.0f; } else { break; } } while (1) { - if (player->unk_0F8 < -360.0f) { - player->unk_0F8 += 360.0f; + if (player->bankAngle < -360.0f) { + player->bankAngle += 360.0f; } else { break; } } if (gCurrentLevel == LEVEL_UNK_15) { - Math_SmoothStepToF(&player->unk_0B4, 10.0f, 0.1f, 0.5f, 0.0001f); - player->pos.x += Math_SmoothStepToF(&player->unk_0AC, player->unk_0B8, 0.1f, player->unk_0B4, 0.0001f); - player->pos.y += Math_SmoothStepToF(&player->unk_0B0, player->unk_0BC, 0.1f, player->unk_0B4, 0.0001f); + Math_SmoothStepToF(&player->pathStep, 10.0f, 0.1f, 0.5f, 0.0001f); + player->pos.x += Math_SmoothStepToF(&player->xPath, player->xPathTarget, 0.1f, player->pathStep, 0.0001f); + player->pos.y += Math_SmoothStepToF(&player->yPath, player->yPathTarget, 0.1f, player->pathStep, 0.0001f); } else { - Math_SmoothStepToF(&player->unk_0B4, D_ctx_80177D08 * 0.54f, 0.1f, 2.0f, 0.0001f); - D_ctx_801779E4 = Math_SmoothStepToF(&player->unk_0AC, player->unk_0B8, 0.1f, player->unk_0B4, 0.0001f); - D_ctx_801779F4 = Math_SmoothStepToF(&player->unk_0B0, player->unk_0BC, 0.1f, player->unk_0B4, 0.0001f); + Math_SmoothStepToF(&player->pathStep, gPathVelZ * 0.54f, 0.1f, 2.0f, 0.0001f); + gPathVelX = Math_SmoothStepToF(&player->xPath, player->xPathTarget, 0.1f, player->pathStep, 0.0001f); + gPathVelY = Math_SmoothStepToF(&player->yPath, player->yPathTarget, 0.1f, player->pathStep, 0.0001f); } if (player->timer_210 != 0) { player->timer_210--; - Math_SmoothStepToF(&player->unk_114, player->unk_118, 0.03f, 0.5f, 0.0001f); - Math_SmoothStepToF(&player->unk_120, player->unk_124, 0.03f, 0.5f, 0.0001f); + Math_SmoothStepToF(&player->yRot_114, player->yRot_118, 0.03f, 0.5f, 0.0001f); + Math_SmoothStepToF(&player->xRot_120, player->xRot_124, 0.03f, 0.5f, 0.0001f); } else { - Math_SmoothStepToF(&player->unk_114, 0.0f, 0.03f, 0.5f, 0.0001f); - Math_SmoothStepToF(&player->unk_120, 0.0f, 0.03f, 0.5f, 0.0001f); + Math_SmoothStepToF(&player->yRot_114, 0.0f, 0.03f, 0.5f, 0.0001f); + Math_SmoothStepToF(&player->xRot_120, 0.0f, 0.03f, 0.5f, 0.0001f); } } @@ -3325,7 +3325,7 @@ void func_play_800AE278(Player* player) { if ((var_fv1 < fabsf(player->pos.x)) || (var_fv1 < fabsf(player->pos.z))) { player->state_1C8 = PLAYERSTATE_1C8_U_TURN; player->unk_19C = 0; - player->unk_1D0 = 0; + player->csState = 0; player->unk_000 = 0.0f; player->unk_004 = 0.0f; } @@ -3335,7 +3335,7 @@ void func_play_800AE278(Player* player) { void func_play_800AE4A4(Player* player) { f32 sp7C; f32 sp78; - f32 var_fa0; + f32 scale; f32 var_fa1; f32 var_fv0; f32 var_fv1; @@ -3346,12 +3346,12 @@ void func_play_800AE4A4(Player* player) { Vec3f sp4C; Vec3f sp40; - D_ctx_80177968 = 2.3f; - D_ctx_80177970 = 0.68f; + gPlayerTurnRate = 2.3f; + gPlayerTurnStickMod = 0.68f; sp7C = -gInputPress->stick_x; sp78 = gInputPress->stick_y; - Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 5.0f, 0.01f); - Matrix_RotateZ(gCalcMatrix, -player->unk_12C * M_DTOR, MTXF_NEW); + Math_SmoothStepToAngle(&player->aerobaticPitch, 0.0f, 0.1f, 5.0f, 0.01f); + Matrix_RotateZ(gCalcMatrix, -player->zRotBank * M_DTOR, MTXF_NEW); sp4C.x = sp7C * 0.75f; sp4C.y = sp78 * 0.75f; sp4C.z = 0.0f; @@ -3370,40 +3370,40 @@ void func_play_800AE4A4(Player* player) { Math_SmoothStepToF(&player->wings.unk_08, -sp60 - sp5C, 0.1f, 100.0f, 0.0f); Math_SmoothStepToF(&player->wings.unk_0C, -sp60 + sp58, 0.1f, 100.0f, 0.0f); Math_SmoothStepToF(&player->wings.unk_10, -sp60 - sp58, 0.1f, 100.0f, 0.0f); - var_fa0 = 0.1f; - if ((player->unk_12C > 10.0f) && (sp7C > 0)) { - D_ctx_80177968 *= 2.0f; - var_fa0 = 0.2f; + scale = 0.1f; + if ((player->zRotBank > 10.0f) && (sp7C > 0)) { + gPlayerTurnRate *= 2.0f; + scale = 0.2f; } - if ((player->unk_12C < -10.0f) && (sp7C < 0)) { - D_ctx_80177968 *= 2.0f; - var_fa0 = 0.2f; + if ((player->zRotBank < -10.0f) && (sp7C < 0)) { + gPlayerTurnRate *= 2.0f; + scale = 0.2f; } - Math_SmoothStepToF(&player->unk_0E8, sp7C * D_ctx_80177970, var_fa0, D_ctx_80177968, 0.03f); - var_fa0 = 0.03f; - if ((player->unk_12C > 10.0f) && (sp7C > 0)) { - var_fa0 = 0.05f; + Math_SmoothStepToF(&player->rot.y, sp7C * gPlayerTurnStickMod, scale, gPlayerTurnRate, 0.03f); + scale = 0.03f; + if ((player->zRotBank > 10.0f) && (sp7C > 0)) { + scale = 0.05f; } - if ((player->unk_12C < -10.0f) && (sp7C < 0)) { - var_fa0 = 0.05f; + if ((player->zRotBank < -10.0f) && (sp7C < 0)) { + scale = 0.05f; } - Math_SmoothStepToF(&player->unk_11C, player->unk_0E8 * var_fa0, 0.1f, 0.8f, 0.05f); - player->unk_114 += player->unk_11C; - if (player->unk_114 >= 360.0f) { - player->unk_114 -= 360.0f; + Math_SmoothStepToF(&player->yRotVel_11C, player->rot.y * scale, 0.1f, 0.8f, 0.05f); + player->yRot_114 += player->yRotVel_11C; + if (player->yRot_114 >= 360.0f) { + player->yRot_114 -= 360.0f; } - if (player->unk_114 < 0.0f) { - player->unk_114 += 360.0f; + if (player->yRot_114 < 0.0f) { + player->yRot_114 += 360.0f; } - D_ctx_80177968 = 2.3f; + gPlayerTurnRate = 2.3f; var_fa1 = 0.1f; - temp = -sp78 * D_ctx_80177970; + temp = -sp78 * gPlayerTurnStickMod; if ((temp <= 0.0f) && (player->pos.y < (gGroundHeight + 50.0f))) { - D_ctx_80177968 *= 2.0f; + gPlayerTurnRate *= 2.0f; temp = 0.0f; var_fa1 = 0.2f; } - Math_SmoothStepToF(&player->unk_0E4, temp, var_fa1, D_ctx_80177968, 0.03f); + Math_SmoothStepToF(&player->rot.x, temp, var_fa1, gPlayerTurnRate, 0.03f); var_fv1 = 1.5f; if (player->pos.y < (gGroundHeight + 70.0f)) { var_fv1 = 0.8f; @@ -3416,10 +3416,10 @@ void func_play_800AE4A4(Player* player) { if (sp7C == 0) { var_fv0 = 1.0f; } - Math_SmoothStepToF(&player->unk_0EC, sp7C * 0.6f * var_fv1, 0.1f, var_fv0, 0.03f); - player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); + Math_SmoothStepToF(&player->rot.z, sp7C * 0.6f * var_fv1, 0.1f, var_fv0, 0.03f); + player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; + Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->xRot_120 + player->rot.x + player->aerobaticPitch) * M_DTOR), MTXF_APPLY); sp4C.x = 0.0f; sp4C.y = 0.0f; if (player->wings.rightState <= WINGSTATE_BROKEN) { @@ -3437,25 +3437,25 @@ void func_play_800AE4A4(Player* player) { player->vel.y = sp40.y; player->pos.x += player->vel.x; player->pos.y += player->vel.y; - if ((player->unk_0A0 < player->pos.y) && (player->vel.y >= 0.0f)) { - Math_SmoothStepToF(&player->pos.y, player->unk_0A0, 0.1f, fabsf(player->vel.y * 1.5f) + 5.0f, 0.0f); + if ((player->pathHeight < player->pos.y) && (player->vel.y >= 0.0f)) { + Math_SmoothStepToF(&player->pos.y, player->pathHeight, 0.1f, fabsf(player->vel.y * 1.5f) + 5.0f, 0.0f); } - if ((player->pos.y < player->unk_0A4) && (player->vel.y <= 0.0f)) { - if (player->unk_0A4 >= 0.0f) { - player->pos.y = player->unk_0A4; + if ((player->pos.y < player->pathFloor) && (player->vel.y <= 0.0f)) { + if (player->pathFloor >= 0.0f) { + player->pos.y = player->pathFloor; } else { - Math_SmoothStepToF(&player->pos.y, player->unk_0A4, 0.1f, fabsf(player->vel.y * 1.5f) + 5.0f, 0.0f); + Math_SmoothStepToF(&player->pos.y, player->pathFloor, 0.1f, fabsf(player->vel.y * 1.5f) + 5.0f, 0.0f); } } player->pos.z += player->vel.z; - if (player->unk_0A0 - 100.0f < player->pos.y) { + if (player->pathHeight - 100.0f < player->pos.y) { player->flags_228 = PFLAG_228_3; } - if (player->pos.y < -(player->unk_0A0 - 100.0f)) { + if (player->pos.y < -(player->pathHeight - 100.0f)) { player->flags_228 = PFLAG_228_2; } func_play_800AE278(player); - player->unk_138 = player->pos.z; + player->trueZpos = player->pos.z; func_play_800A4460(player); func_play_800A46A0(player); } @@ -3471,14 +3471,14 @@ void func_play_800AECAC(Player* player) { gVsLockOnTimers[player->num][0] = gVsLockOnTimers[player->num][1] = gVsLockOnTimers[player->num][2] = gVsLockOnTimers[player->num][3] = 0; } - if (player->unk_4D8 > 240.0f) { + if (player->aerobaticPitch > 240.0f) { sp58 = -50.0f; } Math_SmoothStepToF(&player->wings.unk_04, sp58, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->wings.unk_08, sp58, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->wings.unk_0C, sp58, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->wings.unk_10, sp58, 0.3f, 100.0f, 0.0f); - if (player->unk_4D8 < 180.0f) { + if (player->aerobaticPitch < 180.0f) { player->pos.y += 2.0f; } player->boostCooldown = true; @@ -3491,8 +3491,8 @@ void func_play_800AECAC(Player* player) { player->boostMeter = 90.0f; } player->unk_190 = 2; - Math_SmoothStepToF(&player->unk_4D8, 360.0f, 0.1f, 5.0f, 0.001f); - if (player->unk_4D8 > 350.0f) { + Math_SmoothStepToF(&player->aerobaticPitch, 360.0f, 0.1f, 5.0f, 0.001f); + if (player->aerobaticPitch > 350.0f) { player->somersault = false; if (gLevelMode != LEVELMODE_ON_RAILS) { player->unk_018 = 0.05f; @@ -3504,13 +3504,13 @@ void func_play_800AECAC(Player* player) { } } } - Math_SmoothStepToF(&player->unk_0EC, 0.0f, 0.1f, 5.0f, 0.0f); - Math_SmoothStepToF(&player->unk_0E4, 0.0f, 0.1f, 5.0f, 0.0f); + Math_SmoothStepToF(&player->rot.z, 0.0f, 0.1f, 5.0f, 0.0f); + Math_SmoothStepToF(&player->rot.x, 0.0f, 0.1f, 5.0f, 0.0f); temp = -gInputPress->stick_x * 0.68f; - Math_SmoothStepToF(&player->unk_0E8, temp, 0.1f, 2.0f, 0.0f); - player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); + Math_SmoothStepToF(&player->rot.y, temp, 0.1f, 2.0f, 0.0f); + player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; + Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->xRot_120 + player->rot.x + player->aerobaticPitch) * M_DTOR), MTXF_APPLY); sp4C.x = 0.0f; sp4C.y = 0.0f; sp4C.z = player->baseSpeed; @@ -3520,12 +3520,12 @@ void func_play_800AECAC(Player* player) { player->vel.y = sp40.y; player->pos.x += player->vel.x; player->pos.y += player->vel.y; - if (player->pos.y < player->unk_0A4 + player->unk_0B0) { - player->pos.y = player->unk_0A4 + player->unk_0B0; + if (player->pos.y < player->pathFloor + player->yPath) { + player->pos.y = player->pathFloor + player->yPath; player->vel.y = 0.0f; } player->pos.z += player->vel.z; - player->unk_138 = player->pos.z; + player->trueZpos = player->pos.z; func_play_800A46A0(player); } @@ -3546,20 +3546,20 @@ void func_play_800AF07C(Player* player) { Vec3f sp50; Vec3f sp44; - D_ctx_80177968 = 2.3f; - D_ctx_80177970 = 0.68f; + gPlayerTurnRate = 2.3f; + gPlayerTurnStickMod = 0.68f; if ((gInputPress->stick_x != 0) || (gInputPress->stick_y != 0)) { - D_ctx_80177970 = 0.68f; //! FAKE ? + gPlayerTurnStickMod = 0.68f; //! FAKE ? } stickX = -gInputPress->stick_x; stickY = +gInputPress->stick_y; - Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 5.0f, 0.01f); + Math_SmoothStepToAngle(&player->aerobaticPitch, 0.0f, 0.1f, 5.0f, 0.01f); if (player->cockpitView) { - Matrix_RotateZ(gCalcMatrix, player->unk_12C * M_DTOR, MTXF_NEW); + Matrix_RotateZ(gCalcMatrix, player->zRotBank * M_DTOR, MTXF_NEW); sp68.z = 0.0f; sp68.x = stickX; @@ -3570,7 +3570,7 @@ void func_play_800AF07C(Player* player) { stickX = sp5C.x; stickY = sp5C.y; } else { - Matrix_RotateZ(gCalcMatrix, (-player->unk_12C) * M_DTOR, MTXF_NEW); + Matrix_RotateZ(gCalcMatrix, (-player->zRotBank) * M_DTOR, MTXF_NEW); sp68.z = 0.0f; sp68.x = stickX * 0.75f; @@ -3596,32 +3596,32 @@ void func_play_800AF07C(Player* player) { sp84 = 0.1f; - if ((player->unk_12C > 10.0f) && (stickX > 0)) { + if ((player->zRotBank > 10.0f) && (stickX > 0)) { sp84 = 0.2f; - D_ctx_80177968 *= 2.0f; + gPlayerTurnRate *= 2.0f; } - if ((player->unk_12C < (-10.0f)) && (stickX < 0)) { + if ((player->zRotBank < (-10.0f)) && (stickX < 0)) { sp84 = 0.2f; - D_ctx_80177968 *= 2.0f; + gPlayerTurnRate *= 2.0f; } - if (player->unk_1DC != 0) { + if (player->barrelRoll != 0) { sp84 = 0.2f; - D_ctx_80177968 = 6.8999996f; + gPlayerTurnRate = 6.8999996f; } - Math_SmoothStepToF(&player->unk_0E8, stickX * D_ctx_80177970, sp84, D_ctx_80177968, 0.03f); + Math_SmoothStepToF(&player->rot.y, stickX * gPlayerTurnStickMod, sp84, gPlayerTurnRate, 0.03f); - D_ctx_80177968 = 2.3f; + gPlayerTurnRate = 2.3f; sp84 = 0.1f; - var_fa1 = -stickY * D_ctx_80177970; + var_fa1 = -stickY * gPlayerTurnStickMod; if ((var_fa1 <= 0.0f) && (player->pos.y < (gGroundHeight + 50.0f))) { var_fa1 = 0.0f; sp84 = 0.2f; - D_ctx_80177968 *= 2.0f; + gPlayerTurnRate *= 2.0f; } - Math_SmoothStepToF(&player->unk_0E4, var_fa1, sp84, D_ctx_80177968, 0.03f); + Math_SmoothStepToF(&player->rot.x, var_fa1, sp84, gPlayerTurnRate, 0.03f); var_fv1 = 1.0f; if (player->pos.y < (gGroundHeight + 70.0f)) { @@ -3638,9 +3638,9 @@ void func_play_800AF07C(Player* player) { var_fv0 = 1.0f; } - Math_SmoothStepToF(&player->unk_0EC, (stickX * 0.6f) * var_fv1, 0.1f, var_fv0, 0.03f); - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -((player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); + Math_SmoothStepToF(&player->rot.z, (stickX * 0.6f) * var_fv1, 0.1f, var_fv0, 0.03f); + Matrix_RotateY(gCalcMatrix, (player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->rot.x + player->aerobaticPitch) * M_DTOR), MTXF_APPLY); sp68.x = 0.0f; sp68.y = 0.0f; @@ -3651,8 +3651,8 @@ void func_play_800AF07C(Player* player) { sp44.x *= 1.4f; sp44.y *= 1.4f; - Matrix_RotateY(gCalcMatrix, player->unk_114 * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, player->unk_120 * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, player->yRot_114 * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, player->xRot_120 * M_DTOR, MTXF_APPLY); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp5C); sp68.x = 0.0f; @@ -3683,43 +3683,43 @@ void func_play_800AF07C(Player* player) { player->vel.y -= 2.5f; } - if (player->pos.x > (player->unk_0AC + (player->unk_09C - 100.0f))) { + if (player->pos.x > (player->xPath + (player->pathWidth - 100.0f))) { player->flags_228 = PFLAG_228_0; } - if (player->pos.x < (player->unk_0AC - (player->unk_09C - 100.0f))) { + if (player->pos.x < (player->xPath - (player->pathWidth - 100.0f))) { player->flags_228 = PFLAG_228_1; } - if (player->pos.y > (player->unk_0B0 + (player->unk_0A0 - 100.0f))) { + if (player->pos.y > (player->yPath + (player->pathHeight - 100.0f))) { player->flags_228 = PFLAG_228_3; } - if (player->pos.y < (player->unk_0B0 - (player->unk_0A0 - 100.0f))) { + if (player->pos.y < (player->yPath - (player->pathHeight - 100.0f))) { player->flags_228 = PFLAG_228_2; } player->pos.x += player->vel.x; - if (player->pos.x > (player->unk_09C + player->unk_0AC)) { - player->pos.x = player->unk_09C + player->unk_0AC; + if (player->pos.x > (player->pathWidth + player->xPath)) { + player->pos.x = player->pathWidth + player->xPath; player->vel.x = 0.0f; - player->unk_0D8.x = 0.0f; + player->knockback.x = 0.0f; } - if (player->pos.x < (player->unk_0AC - player->unk_09C)) { - player->pos.x = player->unk_0AC - player->unk_09C; + if (player->pos.x < (player->xPath - player->pathWidth)) { + player->pos.x = player->xPath - player->pathWidth; player->vel.x = 0.0f; - player->unk_0D8.x = 0.0f; + player->knockback.x = 0.0f; } player->pos.y += player->vel.y; - if (player->pos.y > (player->unk_0A0 + player->unk_0B0)) { - player->pos.y = player->unk_0A0 + player->unk_0B0; + if (player->pos.y > (player->pathHeight + player->yPath)) { + player->pos.y = player->pathHeight + player->yPath; player->vel.y = 0.0f; - player->unk_0D8.y = 0.0f; + player->knockback.y = 0.0f; } - if (player->pos.y < (player->unk_0A4 + player->unk_0B0)) { - player->pos.y = player->unk_0A4 + player->unk_0B0; + if (player->pos.y < (player->pathFloor + player->yPath)) { + player->pos.y = player->pathFloor + player->yPath; player->vel.y = 0.0f; - player->unk_0D8.y = 0.0f; + player->knockback.y = 0.0f; } player->pos.z += player->vel.z; @@ -3754,41 +3754,41 @@ void func_play_800AF928(Player* player) { if (player->unk_180 > 0) { player->unk_180 -= 3.0f; } - D_ctx_80177968 = 3.0f; - D_ctx_80177970 = 0.6666f; + gPlayerTurnRate = 3.0f; + gPlayerTurnStickMod = 0.6666f; sp5C = gInputPress->stick_x; if (sp5C == 0) { - Math_SmoothStepToF(&player->unk_0E8, -sp5C * D_ctx_80177970, 0.1f, D_ctx_80177968 * 0.5f, 0.1f); + Math_SmoothStepToF(&player->rot.y, -sp5C * gPlayerTurnStickMod, 0.1f, gPlayerTurnRate * 0.5f, 0.1f); } else { - Math_SmoothStepToF(&player->unk_0E8, -sp5C * D_ctx_80177970, 0.1f, D_ctx_80177968, 0.1f); + Math_SmoothStepToF(&player->rot.y, -sp5C * gPlayerTurnStickMod, 0.1f, gPlayerTurnRate, 0.1f); } - player->unk_108 = player->unk_0E8; + player->rot_104.y = player->rot.y; var_fa0 = 0.03f; var_fa1 = 1.5f; - if ((player->unk_12C > 10.0f) && (sp5C < 0.0f)) { + if ((player->zRotBank > 10.0f) && (sp5C < 0.0f)) { var_fa0 = 0.1f; var_fa1 = 4.0f; } - if ((player->unk_12C < -10.0f) && (sp5C > 0.0f)) { + if ((player->zRotBank < -10.0f) && (sp5C > 0.0f)) { var_fa0 = 0.1f; var_fa1 = 4.0f; } - if (player->unk_1DC != 0) { - if ((player->unk_1EC > 0) && (sp5C < 0.0f)) { + if (player->barrelRoll != 0) { + if ((player->rollRate > 0) && (sp5C < 0.0f)) { var_fa0 = 0.2f; var_fa1 = 20.0f; } - if ((player->unk_1EC < 0) && (sp5C > 0.0f)) { + if ((player->rollRate < 0) && (sp5C > 0.0f)) { var_fa0 = 0.2f; var_fa1 = 20.0f; } } - Math_SmoothStepToF(&player->unk_11C, player->unk_0E8 * var_fa0, 0.1f, var_fa1, 0.05f); - player->unk_114 += player->unk_11C; - player->unk_114 = Math_ModF(player->unk_114, 360.0f); - Matrix_RotateX(gCalcMatrix, player->unk_104 * M_DTOR, MTXF_NEW); - Matrix_RotateZ(gCalcMatrix, player->unk_10C * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_APPLY); + Math_SmoothStepToF(&player->yRotVel_11C, player->rot.y * var_fa0, 0.1f, var_fa1, 0.05f); + player->yRot_114 += player->yRotVel_11C; + player->yRot_114 = Math_ModF(player->yRot_114, 360.0f); + Matrix_RotateX(gCalcMatrix, player->rot_104.x * M_DTOR, MTXF_NEW); + Matrix_RotateZ(gCalcMatrix, player->rot_104.z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + 180.0f) * M_DTOR, MTXF_APPLY); sp44.x = 0.0f; sp44.y = 0.0f; sp44.z = player->baseSpeed; @@ -3803,14 +3803,14 @@ void func_play_800AF928(Player* player) { if (player->unk_170 > 0.2f) { Math_SmoothStepToF(&player->unk_184, -player->baseSpeed * 0.5f, 1.0f, 1.0f, 0); } - if (!(player->unk_170 > 0.2f) && !(player->unk_16C > 0.2f) && (player->unk_1D4 != 0)) { + if (!(player->unk_170 > 0.2f) && !(player->unk_16C > 0.2f) && player->grounded) { Math_SmoothStepToF(&player->unk_184, 0.0f, 1.0f, 0.75f, 0.0f); } - if (player->unk_1DC != 0) { - if (player->unk_1EC < 0) { + if (player->barrelRoll != 0) { + if (player->rollRate < 0) { player->unk_184 = 15.0f; } - if (player->unk_1EC > 0) { + if (player->rollRate > 0) { player->unk_184 = -15.0f; } } @@ -3821,21 +3821,21 @@ void func_play_800AF928(Player* player) { player->pos.x += sp38.x; player->pos.z += sp38.z; player->pos.x += player->vel.x; - player->vel.y -= player->unk_0D4; + player->vel.y -= player->gravity; player->pos.y += player->vel.y; - if (player->unk_1D4 != 0) { - Math_SmoothStepToAngle(&player->unk_0E4, player->unk_104, 0.2f, 5.0f, 0.005f); - Math_SmoothStepToAngle(&player->unk_0EC, player->unk_10C, 0.2f, 5.0f, 0.005f); + if (player->grounded) { + Math_SmoothStepToAngle(&player->rot.x, player->rot_104.x, 0.2f, 5.0f, 0.005f); + Math_SmoothStepToAngle(&player->rot.z, player->rot_104.z, 0.2f, 5.0f, 0.005f); Math_SmoothStepToF(&player->unk_000, 0.0f, 0.1f, 5.0f, 0.00001f); } - player->unk_1D4 = 0; + player->grounded = false; if (player->pos.y <= gGroundHeight - 5.0f) { player->pos.y = gGroundHeight - 5.0f; if (player->vel.y < -20.0f) { - player->unk_1F4 = 20; + player->hitTimer = 20; } player->vel.y = 0.0f; - player->unk_1D4 = 1; + player->grounded = true; } if (player->vel.y < -80.0f) { player->vel.y = -80.0f; @@ -3845,11 +3845,11 @@ void func_play_800AF928(Player* player) { } player->pos.z += player->vel.z; func_play_800AE278(player); - player->unk_138 = player->pos.z; - player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; - if (player->unk_1D4 != 0) { - player->unk_0F4 += player->baseSpeed * 5.0f; - player->unk_0F0 = SIN_DEG(player->unk_0F4) * 0.7f; + player->trueZpos = player->pos.z; + player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; + if (player->grounded) { + player->rockPhase += player->baseSpeed * 5.0f; + player->rockAngle = SIN_DEG(player->rockPhase) * 0.7f; } func_play_800A46A0(player); } @@ -3902,15 +3902,16 @@ void func_play_800B0194(Player* player) { Math_SmoothStepToF(&player->unk_154, sp74, 0.1f, 3.0f, 0.00001f); Math_SmoothStepToF(&player->unk_180, 0.0f, 0.15f, 5.0f, 0.00001f); Math_SmoothStepToF(&player->unk_158, sp74, 0.2f, 5.0f, 0.00001f); - D_ctx_80177968 = 3.0f; - D_ctx_80177970 = 0.666f; + gPlayerTurnRate = 3.0f; + gPlayerTurnStickMod = 0.666f; sp74 = gInputPress->stick_x; sp70 = gInputPress->stick_y; - Math_SmoothStepToF(&player->unk_0E8, -sp74 * D_ctx_80177970 * 0.6f, 0.5f, D_ctx_80177968, 0.001f); - Math_SmoothStepToF(&player->unk_0EC, -sp74 * D_ctx_80177970 * 0.2f * player->baseSpeed / 15.0f, 0.2f, 5.0f, 0.001f); - player->unk_0F8 = player->unk_0EC; + Math_SmoothStepToF(&player->rot.y, -sp74 * gPlayerTurnStickMod * 0.6f, 0.5f, gPlayerTurnRate, 0.001f); + Math_SmoothStepToF(&player->rot.z, -sp74 * gPlayerTurnStickMod * 0.2f * player->baseSpeed / 15.0f, 0.2f, 5.0f, + 0.001f); + player->bankAngle = player->rot.z; if ((sp74 != 0.0f) || (sp70 != 0.0f)) { - Math_SmoothStepToF(&player->unk_15C, sp74 * D_ctx_80177970, 0.9f, 2.0f * D_ctx_80177968, 0.1f); + Math_SmoothStepToF(&player->unk_15C, sp74 * gPlayerTurnStickMod, 0.9f, 2.0f * gPlayerTurnRate, 0.1f); Math_SmoothStepToF(&player->unk_164, sp74 * 0.3f, 0.1f, 10.0f, 0.00001f); Math_SmoothStepToF(&player->unk_168, -sp74 * 0.3f, 0.1f, 10.0f, 0.00001f); } else { @@ -3927,7 +3928,7 @@ void func_play_800B0194(Player* player) { Math_SmoothStepToF(&player->unk_164, player->unk_174, 0.1f, 10.0f, 0.00001f); Math_SmoothStepToF(&player->unk_168, player->unk_178, 0.1f, 10.0f, 0.00001f); } - player->unk_108 = player->unk_0E8; + player->rot_104.y = player->rot.y; if (player->baseSpeed < 1.5f) { var_fv0 = 0.12f; var_fa0 = 3.0f; @@ -3935,12 +3936,12 @@ void func_play_800B0194(Player* player) { var_fv0 = 0.08f; var_fa0 = 1.5f; } - Math_SmoothStepToF(&player->unk_11C, -sp74 * D_ctx_80177970 * var_fv0, 0.2f, var_fa0, 0.0f); - player->unk_114 += player->unk_11C; - player->unk_114 = Math_ModF(player->unk_114, 360.0f); - Matrix_RotateX(gCalcMatrix, player->unk_104 * M_DTOR, MTXF_NEW); - Matrix_RotateZ(gCalcMatrix, player->unk_10C * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_APPLY); + Math_SmoothStepToF(&player->yRotVel_11C, -sp74 * gPlayerTurnStickMod * var_fv0, 0.2f, var_fa0, 0.0f); + player->yRot_114 += player->yRotVel_11C; + player->yRot_114 = Math_ModF(player->yRot_114, 360.0f); + Matrix_RotateX(gCalcMatrix, player->rot_104.x * M_DTOR, MTXF_NEW); + Matrix_RotateZ(gCalcMatrix, player->rot_104.z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + 180.0f) * M_DTOR, MTXF_APPLY); sp58.x = 0.0f; sp58.y = 0.0f; sp58.z = player->baseSpeed; @@ -3949,22 +3950,22 @@ void func_play_800B0194(Player* player) { player->vel.z = sp4C.z; player->pos.x += player->vel.x; if ((player->pos.y < 40.0f) || (player->pos.y > 670.0f)) { - player->unk_10C = 0.0f; - player->unk_104 = 0.0f; + player->rot_104.z = 0.0f; + player->rot_104.x = 0.0f; } - Math_SmoothStepToAngle(&player->unk_0FC, player->unk_104, 0.15f, 15.0f, 0.005f); - Math_SmoothStepToAngle(&player->unk_100, player->unk_10C, 0.15f, 15.0f, 0.005f); - if (player->unk_1D4 != 0) { + Math_SmoothStepToAngle(&player->xRot_0FC, player->rot_104.x, 0.15f, 15.0f, 0.005f); + Math_SmoothStepToAngle(&player->zRot_0FC, player->rot_104.z, 0.15f, 15.0f, 0.005f); + if (player->grounded) { if (player->baseSpeed > 1.0f) { player->unk_00C += player->unk_008; if ((s32) player->unk_00C >= Animation_GetFrameCount(&D_versus_301CFEC)) { player->unk_00C = 0.0f; } - player->unk_080 = 2.0f * SIN_DEG((player->unk_20C + 7) * 24.0f); - if (player->unk_080 < -0.5f) { - player->unk_080 = -0.5f; + player->yBob = 2.0f * SIN_DEG((player->unk_20C + 7) * 24.0f); + if (player->yBob < -0.5f) { + player->yBob = -0.5f; } - player->unk_080 -= 3.0f; + player->yBob -= 3.0f; player->unk_20C = player->unk_00C; switch (gPlayerNum) { case 0: @@ -4012,14 +4013,14 @@ void func_play_800B0194(Player* player) { break; } Math_SmoothStepToVec3fArray(sp48, player->jointTable, 1, 24, 0.2f, 10.0f, 0.01f); - Math_SmoothStepToF(&player->unk_080, -3.0f, 0.1f, 2.0f, 0.1f); + Math_SmoothStepToF(&player->yBob, -3.0f, 0.1f, 2.0f, 0.1f); Math_SmoothStepToF(&player->unk_164, 0.0f, 0.03f, 1.0f, 0.0001f); Math_SmoothStepToF(&player->unk_168, 0.0f, 0.03f, 1.0f, 0.0001f); player->unk_20C = 0; player->unk_00C = 0.0f; } } - if (player->unk_1D4 == 0) { + if (!player->grounded) { switch (gPlayerNum) { case 0: sp48 = SEGMENTED_TO_VIRTUAL(D_versus_302E95C); @@ -4036,21 +4037,21 @@ void func_play_800B0194(Player* player) { } Math_SmoothStepToVec3fArray(sp48, player->jointTable, 1, 24, 0.2f, 10.0f, 0.01f); } - player->unk_0D4 = 2.0f; - if ((gInputPress->button & Z_TRIG) && (player->unk_1D4 != 0)) { + player->gravity = 2.0f; + if ((gInputPress->button & Z_TRIG) && player->grounded) { player->vel.y = 12.0f; } if ((gInputHold->button & Z_TRIG) && (player->vel.y > 0.0f)) { - player->unk_0D4 = 1.5f; + player->gravity = 1.5f; } - player->unk_1D4 = 0; - player->vel.y -= player->unk_0D4; + player->grounded = false; + player->vel.y -= player->gravity; player->pos.y += player->vel.y; if (player->pos.y <= gGroundHeight) { - player->unk_1D4 = 1; + player->grounded = true; player->pos.y = 0.0f; player->vel.y = 0.0f; - player->unk_0E4 += (player->pos.y - player->unk_0E4) * 0.05f; + player->rot.x += (player->pos.y - player->rot.x) * 0.05f; } if (player->vel.y < -50.0f) { player->vel.y = -50.0f; @@ -4060,7 +4061,7 @@ void func_play_800B0194(Player* player) { } player->pos.z += player->vel.z; func_play_800AE278(player); - player->unk_138 = player->pos.z; + player->trueZpos = player->pos.z; } f32 D_800D3114[4] = { 10000.0f, -10000.0f, 10000.0f, -10000.0f }; @@ -4100,13 +4101,13 @@ void func_play_800B0F50(Player* playerx) { gLeftWingHealth[gPlayerNum] = 60; gRightWingHealth[gPlayerNum] = 60; } - D_Timer_80177A00[gPlayerNum] = D_Timer_80177A38[gPlayerNum] = D_Timer_80177A70[gPlayerNum] = - D_Timer_80177A88[gPlayerNum] = gShieldTimer[gPlayerNum] = gHasShield[gPlayerNum] = gChargeTimers[gPlayerNum] = + gUturnDownTimers[gPlayerNum] = gUturnBrakeTimers[gPlayerNum] = gLoopDownTimers[gPlayerNum] = + gLoopBoostTimers[gPlayerNum] = gShieldTimer[gPlayerNum] = gHasShield[gPlayerNum] = gChargeTimers[gPlayerNum] = gVsLockOnTimers[gPlayerNum][0] = gVsLockOnTimers[gPlayerNum][1] = gVsLockOnTimers[gPlayerNum][2] = gVsLockOnTimers[gPlayerNum][3] = 0; gRightWingFlashTimer[gPlayerNum] = gLeftWingFlashTimer[gPlayerNum] = gRightWingDebrisTimer[gPlayerNum] = gLeftWingDebrisTimer[gPlayerNum] = D_ctx_80177990[gPlayerNum] = D_ctx_801779A8[gPlayerNum] = - D_ctx_80177AA0[gPlayerNum] = 0.0f; + gMuzzleFlashScale[gPlayerNum] = 0.0f; gShieldAlpha[gPlayerNum] = 0.0f; player->unk_190 = 1.0f; player->unk_194 = 1.0f; @@ -4116,23 +4117,23 @@ void func_play_800B0F50(Player* playerx) { player->unk_148 = 0.77699995f; player->unk_14C = 0.77699995f; player->unk_01C = 1.0f; - player->unk_068 = -1000.0f; + player->groundPos.y = -1000.0f; player->cam.at.z = player->cam.eye.z - 1000.0f; D_ctx_80177950 = 1.0f; if ((gLevelType == LEVELTYPE_SPACE) && (gCurrentLevel != LEVEL_BOLSE)) { player->unk_240 = 1; player->unk_0A8 = 3000.0f; - player->unk_09C = 700.0f; - player->unk_0A0 = 612.0f; - player->unk_0A4 = -544.0f; + player->pathWidth = 700.0f; + player->pathHeight = 612.0f; + player->pathFloor = -544.0f; if (gCurrentLevel == LEVEL_UNK_15) { - player->unk_0A0 = 3000.0f; - player->unk_0A4 = -3000.0f; + player->pathHeight = 3000.0f; + player->pathFloor = -3000.0f; } } else { - player->unk_09C = 700.0f; - player->unk_0A0 = 680.0f; - player->unk_0A4 = gGroundHeight + 40.0f; + player->pathWidth = 700.0f; + player->pathHeight = 680.0f; + player->pathFloor = gGroundHeight + 40.0f; player->unk_0A8 = 3000.0f; } player->baseSpeed = gArwingSpeed; @@ -4145,10 +4146,10 @@ void func_play_800B0F50(Player* playerx) { player->unk_14C = 0.67f; player->unk_148 = 0.67f; player->baseSpeed = 15.0f; - player->unk_0D4 = 3.0f; - player->unk_09C = 500.0f; - player->unk_0A0 = 500.0f; - player->unk_0A4 = -500.0f; + player->gravity = 3.0f; + player->pathWidth = 500.0f; + player->pathHeight = 500.0f; + player->pathFloor = -500.0f; if (gCurrentLevel == LEVEL_TITANIA) { player->pos.y = 150.0f; } else { @@ -4157,15 +4158,15 @@ void func_play_800B0F50(Player* playerx) { break; case LEVEL_AQUAS: player->form = FORM_BLUE_MARINE; - player->unk_0D4 = 0.0f; - player->unk_09C = 700.0f; + player->gravity = 0.0f; + player->pathWidth = 700.0f; player->baseSpeed = 20.0f; - player->unk_0A0 = 720.0f; - player->unk_0A4 = gGroundHeight + 30.0f; + player->pathHeight = 720.0f; + player->pathFloor = gGroundHeight + 30.0f; break; case LEVEL_SOLAR: case LEVEL_ZONESS: - player->unk_0A4 = -450.0f; + player->pathFloor = -450.0f; break; } if (gCurrentLevel != LEVEL_CORNERIA) { @@ -4204,8 +4205,8 @@ void func_play_800B0F50(Player* playerx) { gMissedZoSearchlight = gSavedZoSearchlightStatus; gObjectLoadIndex = gSavedObjectLoadIndex; gGroundSurface = gSavedGroundSurface; - D_ctx_80177D20 = player->unk_144 = D_ctx_80177CB0; - player->pos.z = player->unk_138 = -player->unk_144; + gPathProgress = player->zPath = gSavedPathProgress; + player->pos.z = player->trueZpos = -player->zPath; if ((gSavedObjectLoadIndex > 0) && (gLevelMode == LEVELMODE_ON_RAILS)) { if (gCurrentLevel == LEVEL_MACBETH) { sp2E = gObjectLoadIndex; @@ -4216,7 +4217,7 @@ void func_play_800B0F50(Player* playerx) { } if (player->form == FORM_LANDMASTER) { player->pos.z -= 200.0f; - player->unk_138 -= 200.0f; + player->trueZpos -= 200.0f; } player->cam.eye.y = (player->pos.y * player->unk_148) + 10.0f; player->cam.eye.x = player->pos.x * player->unk_148; @@ -4228,7 +4229,7 @@ void func_play_800B0F50(Player* playerx) { player->pos.y = 500.0f; player->pos.x = D_800D3114[gPlayerNum]; player->pos.z = D_800D3124[gPlayerNum]; - player->unk_114 = D_800D3154[gPlayerNum]; + player->yRot_114 = D_800D3154[gPlayerNum]; player->form = gPlayerForms[gPlayerNum]; switch (player->form) { case FORM_ARWING: @@ -4236,12 +4237,12 @@ void func_play_800B0F50(Player* playerx) { case FORM_LANDMASTER: player->pos.y = 0.0f; player->baseSpeed = 15.0f; - player->unk_0D4 = 3.0f; + player->gravity = 3.0f; break; case FORM_ON_FOOT: player->pos.y = 0.0f; player->baseSpeed = 15.0f; - player->unk_068 = 0; + player->groundPos.y = 0; switch (gPlayerNum) { case 0: sp38 = SEGMENTED_TO_VIRTUAL(D_versus_302E56C); @@ -4268,14 +4269,14 @@ void func_play_800B0F50(Player* playerx) { if ((gLevelMode == LEVELMODE_ALL_RANGE) && !gVersusMode) { player->pos.z = 8000.0f; player->pos.y = 670.0f; - player->unk_0A0 = 730.0f; + player->pathHeight = 730.0f; player->unk_204 = 2; if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gLevelPhase == 1)) { player->pos.x = -7910.0f; player->pos.y = 300.0f; player->pos.z = -11808.0f; - player->unk_114 = 188.0f; + player->yRot_114 = 188.0f; player->unk_240 = 1; } func_play_800B63BC(player, 1); @@ -4283,7 +4284,7 @@ void func_play_800B0F50(Player* playerx) { player->unk_014 = 1.0f; player->unk_018 = 1.0f; } - if ((D_ctx_8017782C != 0) && (gSavedObjectLoadIndex == 0)) { + if (D_ctx_8017782C && (gSavedObjectLoadIndex == 0)) { gLeveLClearStatus[gCurrentLevel] = 0; for (j = 0; j < 10; j++) { D_ctx_80177A10[j] = 0; @@ -4332,7 +4333,7 @@ void func_play_800B0F50(Player* playerx) { if ((gCurrentLevel == LEVEL_MACBETH) && (gSavedObjectLoadIndex == 0)) { player->pos.z = -4115.0f; - D_ctx_80177D20 = player->unk_144 = 3932.0f; + gPathProgress = player->zPath = 3932.0f; gObjectLoadIndex = 40; gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]); @@ -4454,22 +4455,22 @@ void func_play_800B2130(Player* player) { s32 var_v0; Math_SmoothStepToF(&player->unk_150, 1.0f, 0.05f, 10.0f, 0.0001f); - player->unk_130 = Math_ModF(player->unk_130, 360.0f); - if (player->unk_280 > 0) { - player->unk_280 -= 30; - if (player->unk_280 <= 0) { - player->unk_280 = 0; + player->zRotBarrelRoll = Math_ModF(player->zRotBarrelRoll, 360.0f); + if (player->barrelRollAlpha > 0) { + player->barrelRollAlpha -= 30; + if (player->barrelRollAlpha <= 0) { + player->barrelRollAlpha = 0; } } - if (player->timer_27C == 0) { - if (player->unk_1DC == 0) { - Math_SmoothStepToF(&player->unk_130, 0.0f, 0.1f, 10.0f, 0.00001f); + if (player->meteoWarpTimer == 0) { + if (player->barrelRoll == 0) { + Math_SmoothStepToF(&player->zRotBarrelRoll, 0.0f, 0.1f, 10.0f, 0.00001f); } - if (player->timer_1E0 != 0) { - player->timer_1E0--; + if (player->barrelInputTimerL != 0) { + player->barrelInputTimerL--; } - if (player->timer_1E4 != 0) { - player->timer_1E4--; + if (player->barrelInputTimerR != 0) { + player->barrelInputTimerR--; } if (player->timer_214 != 0) { player->timer_214--; @@ -4480,25 +4481,25 @@ void func_play_800B2130(Player* player) { if (player->timer_1E8 != 0) { player->timer_1E8--; } - if (player->unk_1DC != 0) { - player->timer_1E4 = 0; - player->timer_1E0 = 0; + if (player->barrelRoll != 0) { + player->barrelInputTimerR = 0; + player->barrelInputTimerL = 0; player->unk_150 = 1.5f; - player->unk_130 += player->unk_1EC; + player->zRotBarrelRoll += player->rollRate; if (player->timer_1E8 == 0) { - if (player->unk_1EC > 0) { - player->unk_1EC -= 5; + if (player->rollRate > 0) { + player->rollRate -= 5; } - if (player->unk_1EC < 0) { - player->unk_1EC += 5; + if (player->rollRate < 0) { + player->rollRate += 5; } - if (player->unk_1EC == 0) { - player->unk_1DC = 0; + if (player->rollRate == 0) { + player->barrelRoll = 0; } - } else if (player->unk_280 < 180) { - player->unk_280 += 100; - if (player->unk_280 > 180) { - player->unk_280 = 180; + } else if (player->barrelRollAlpha < 180) { + player->barrelRollAlpha += 100; + if (player->barrelRollAlpha > 180) { + player->barrelRollAlpha = 180; } } } @@ -4517,66 +4518,66 @@ void func_play_800B22C0(Player* player) { s32 temp_v0_4; s32 var_v0; - player->unk_130 = Math_ModF(player->unk_130, 360.0f); - if (player->unk_1DC == 0) { - temp_fv0 = player->unk_130; - if (player->unk_130 > 0.0f) { - player->unk_130 -= (player->unk_130 * 0.1f); - if (player->unk_130 < 0.1f) { - player->unk_130 = 0.0f; + player->zRotBarrelRoll = Math_ModF(player->zRotBarrelRoll, 360.0f); + if (player->barrelRoll == 0) { + temp_fv0 = player->zRotBarrelRoll; + if (player->zRotBarrelRoll > 0.0f) { + player->zRotBarrelRoll -= (player->zRotBarrelRoll * 0.1f); + if (player->zRotBarrelRoll < 0.1f) { + player->zRotBarrelRoll = 0.0f; } } - if (player->unk_130 < 0.0f) { - player->unk_130 -= player->unk_130 * 0.1f; - if (player->unk_130 > -0.1f) { - player->unk_130 = 0.0f; + if (player->zRotBarrelRoll < 0.0f) { + player->zRotBarrelRoll -= player->zRotBarrelRoll * 0.1f; + if (player->zRotBarrelRoll > -0.1f) { + player->zRotBarrelRoll = 0.0f; } } } - temp_v0 = player->timer_1E0; - if (player->timer_1E0 != 0) { - player->timer_1E0--; + temp_v0 = player->barrelInputTimerL; + if (player->barrelInputTimerL != 0) { + player->barrelInputTimerL--; } - if (player->timer_1E4 != 0) { - player->timer_1E4--; + if (player->barrelInputTimerR != 0) { + player->barrelInputTimerR--; } if (player->timer_1E8 != 0) { player->timer_1E8--; } - if (player->unk_1DC != 0) { - player->timer_1E4 = 0; - player->timer_1E0 = 0; - player->unk_130 += player->unk_1EC; - if (player->unk_12C > 0.0f) { - player->unk_12C -= 8.0f; - if (player->unk_12C < 0.0f) { - player->unk_12C = 0.0f; + if (player->barrelRoll != 0) { + player->barrelInputTimerR = 0; + player->barrelInputTimerL = 0; + player->zRotBarrelRoll += player->rollRate; + if (player->zRotBank > 0.0f) { + player->zRotBank -= 8.0f; + if (player->zRotBank < 0.0f) { + player->zRotBank = 0.0f; } } - if (player->unk_12C < 0.0f) { - player->unk_12C += 8.0f; - if (player->unk_12C > 0.0f) { - player->unk_12C = 0.0f; + if (player->zRotBank < 0.0f) { + player->zRotBank += 8.0f; + if (player->zRotBank > 0.0f) { + player->zRotBank = 0.0f; } } if (player->timer_1E8 == 0) { - if (player->unk_1EC > 0) { - player->unk_1EC -= 2; + if (player->rollRate > 0) { + player->rollRate -= 2; } - if (player->unk_1EC < 0) { - player->unk_1EC += 2; + if (player->rollRate < 0) { + player->rollRate += 2; } - if (player->unk_1EC == 0) { - player->unk_1DC = 0; + if (player->rollRate == 0) { + player->barrelRoll = 0; } } else { Math_SmoothStepToF(&D_ctx_801779A8[player->num], 30.0f, 1.0f, 30.0f, 0.0f); } if ((player->timer_1E8 >= 5) && (player->timer_498 == 0)) { - if (player->unk_1EC > 0) { + if (player->rollRate > 0) { player->unk_170 = 1.3f; } - if (player->unk_1EC < 0) { + if (player->rollRate < 0) { player->unk_16C = 1.3f; } } @@ -4606,50 +4607,50 @@ void func_play_800B2574(Player* player) { } player->sfx.boost = 0; var = gInputPress->stick_y; // fake? - if (D_Timer_80177A70[gPlayerNum] != 0) { - D_Timer_80177A70[gPlayerNum]--; + if (gLoopDownTimers[gPlayerNum] != 0) { + gLoopDownTimers[gPlayerNum]--; } - if (D_Timer_80177A88[gPlayerNum] != 0) { - D_Timer_80177A88[gPlayerNum]--; + if (gLoopBoostTimers[gPlayerNum] != 0) { + gLoopBoostTimers[gPlayerNum]--; } if (!player->somersault && (D_ctx_80177AB0 < 5)) { if (var >= -50) { - D_Timer_80177A70[gPlayerNum] = 5; + gLoopDownTimers[gPlayerNum] = 5; } - if ((D_Timer_80177A70[gPlayerNum] > 0) && (D_Timer_80177A70[gPlayerNum] < 5) && - (D_Timer_80177A88[gPlayerNum] != 0)) { + if ((gLoopDownTimers[gPlayerNum] > 0) && (gLoopDownTimers[gPlayerNum] < 5) && + (gLoopBoostTimers[gPlayerNum] != 0)) { player->somersault = true; if (gLevelMode == LEVELMODE_ON_RAILS) { player->savedCockpitView = player->cockpitView; player->cockpitView = false; } player->unk_014 = player->unk_018 = 0.0f; - if (player->unk_4D8 > 340.0f) { - player->unk_4D8 -= 360.0f; + if (player->aerobaticPitch > 340.0f) { + player->aerobaticPitch -= 360.0f; } return; } } - if (player->timer_27C != 0) { - player->timer_27C--; + if (player->meteoWarpTimer != 0) { + player->meteoWarpTimer--; player->boostCooldown = true; if (gRingPassCount > 0) { Math_SmoothStepToF(&D_ctx_801779A8[player->num], gRingPassCount * 10.0f, 1.0f, 5.0f, 0.0f); } player->boostSpeed += 0.3f; - Math_SmoothStepToF(&player->unk_08C, -130.0f, 0.2f, 10.0f, 0.0f); - player->unk_130 -= player->unk_258; - player->unk_258 = player->unk_258 + 0.2f; - if (player->unk_258 > 50.0f) { - player->unk_258 = 50.0f; + Math_SmoothStepToF(&player->camDist, -130.0f, 0.2f, 10.0f, 0.0f); + player->zRotBarrelRoll -= player->meteoWarpSpinSpeed; + player->meteoWarpSpinSpeed = player->meteoWarpSpinSpeed + 0.2f; + if (player->meteoWarpSpinSpeed > 50.0f) { + player->meteoWarpSpinSpeed = 50.0f; } if (((gGameFrameCount % 2) == 0) && (gBlurAlpha > 64)) { if (1) {} gBlurAlpha--; } } else { - player->unk_258 = 0.0f; + player->meteoWarpSpinSpeed = 0.0f; if (gBlurAlpha < 255) { gBlurAlpha += 4; if (gBlurAlpha >= 252) { @@ -4669,7 +4670,7 @@ void func_play_800B2574(Player* player) { player->unk_194 = 5.0f; player->unk_190 = 5.0f; if (gBoostButton[player->num] & gInputPress->button) { - D_Timer_80177A88[gPlayerNum] = 5; + gLoopBoostTimers[gPlayerNum] = 5; } } if (gLevelType == LEVELTYPE_PLANET) { @@ -4684,16 +4685,16 @@ void func_play_800B2574(Player* player) { player->boostMeter = 90.0f; player->boostCooldown = true; } - player->unk_25C += 0.04f; - if (player->unk_25C > 0.6f) { - player->unk_25C = 0.6f; + player->contrailScale += 0.04f; + if (player->contrailScale > 0.6f) { + player->contrailScale = 0.6f; } player->unk_190 = 2.0f; player->boostSpeed += 2.0f; if (player->boostSpeed > 30.0f) { player->boostSpeed = 30.0f; } - Math_SmoothStepToF(&player->unk_08C, -400.0f, 0.1f, 30.0f, 0.0f); + Math_SmoothStepToF(&player->camDist, -400.0f, 0.1f, 30.0f, 0.0f); player->sfx.boost = 1; Math_SmoothStepToF(&D_ctx_801779A8[player->num], 50.0f, 1.0f, 10.0f, 0.0f); } else { @@ -4732,21 +4733,21 @@ void func_play_800B2C00(Player* player) { } player->sfx.brake = 0; var = gInputPress->stick_y; // fake? - if (D_Timer_80177A00[gPlayerNum] != 0) { - D_Timer_80177A00[gPlayerNum]--; + if (gUturnDownTimers[gPlayerNum] != 0) { + gUturnDownTimers[gPlayerNum]--; } - if (D_Timer_80177A38[gPlayerNum] != 0) { - D_Timer_80177A38[gPlayerNum]--; + if (gUturnBrakeTimers[gPlayerNum] != 0) { + gUturnBrakeTimers[gPlayerNum]--; } if (var >= -50) { - D_Timer_80177A00[gPlayerNum] = 5; + gUturnDownTimers[gPlayerNum] = 5; } - if ((D_Timer_80177A00[gPlayerNum] > 0) && (D_Timer_80177A00[gPlayerNum] < 5) && (D_ctx_80177AB0 < 5) && - (D_Timer_80177A38[gPlayerNum] != 0)) { - D_Timer_80177A00[gPlayerNum] = 0; - D_Timer_80177A38[gPlayerNum] = 0; + if ((gUturnDownTimers[gPlayerNum] > 0) && (gUturnDownTimers[gPlayerNum] < 5) && (D_ctx_80177AB0 < 5) && + (gUturnBrakeTimers[gPlayerNum] != 0)) { + gUturnDownTimers[gPlayerNum] = 0; + gUturnBrakeTimers[gPlayerNum] = 0; player->state_1C8 = PLAYERSTATE_1C8_U_TURN; - player->unk_1D0 = 0; + player->csState = 0; player->unk_19C = 1; player->unk_000 = 0.0f; player->unk_004 = 0.0f; @@ -4761,7 +4762,7 @@ void func_play_800B2C00(Player* player) { if (player->boostMeter == 0.0f) { func_play_800A5FA0(player->sfxSource, 0x09000003, player->num); if ((gLevelMode == LEVELMODE_ALL_RANGE) && (gInputPress->button & gBrakeButton[player->num])) { - D_Timer_80177A38[gPlayerNum] = 5; + gUturnBrakeTimers[gPlayerNum] = 5; } } if (gLevelType == LEVELTYPE_PLANET) { @@ -4780,7 +4781,7 @@ void func_play_800B2C00(Player* player) { if (player->boostSpeed < -20.0f) { player->boostSpeed = -20.0f; } - Math_SmoothStepToF(&player->unk_08C, 180.0f, 0.1f, 10.0f, 0.0f); + Math_SmoothStepToF(&player->camDist, 180.0f, 0.1f, 10.0f, 0.0f); player->sfx.brake = 1; Math_SmoothStepToF(&D_ctx_801779A8[player->num], 25.0f, 1.0f, 5.0f, 0.0f); } else if (player->boostMeter > 0.0f) { @@ -4796,7 +4797,7 @@ void func_play_800B2C00(Player* player) { } } } - Math_SmoothStepToF(&player->unk_08C, 0.0f, 0.1f, 5.0f, 0.0f); + Math_SmoothStepToF(&player->camDist, 0.0f, 0.1f, 5.0f, 0.0f); } void func_play_800B3010(Player* player) { @@ -4847,15 +4848,15 @@ void func_play_800B3314(Player* player) { f32 temp; f32 temp2; - player->unk_0D4 = 3.0f; + player->gravity = 3.0f; if ((gInputHold->button & Z_TRIG) && !player->boostCooldown) { if (player->boostMeter == 0.0f) { func_play_800A5FA0(player->sfxSource, 0x09000002, player->num); } player->unk_188 = 0.0f; - player->unk_12C += 4.0f; - if (player->unk_12C > 50.0f) { - player->unk_12C = 50.0f; + player->zRotBank += 4.0f; + if (player->zRotBank > 50.0f) { + player->zRotBank = 50.0f; } Math_SmoothStepToF(&player->unk_170, 1.0f, 1.0f, 0.4f, 0.0f); player->boostActive = true; @@ -4864,14 +4865,14 @@ void func_play_800B3314(Player* player) { player->boostCooldown = true; } } else { - if (player->unk_12C > 0.0f) { + if (player->zRotBank > 0.0f) { player->unk_188 += 1.5f; - player->unk_12C -= player->unk_188; - if (player->unk_12C <= 0.0f) { - player->unk_12C = 0.0f; + player->zRotBank -= player->unk_188; + if (player->zRotBank <= 0.0f) { + player->zRotBank = 0.0f; if (player->unk_188 > 3.0f) { player->unk_188 *= -0.4f; - player->unk_12C -= player->unk_188; + player->zRotBank -= player->unk_188; } } } @@ -4881,9 +4882,9 @@ void func_play_800B3314(Player* player) { func_play_800A5FA0(player->sfxSource, 0x09000002, player->num); } player->unk_188 = 0.0f; - player->unk_12C -= 4.0f; - if (player->unk_12C < -50.0f) { - player->unk_12C = -50.0f; + player->zRotBank -= 4.0f; + if (player->zRotBank < -50.0f) { + player->zRotBank = -50.0f; } Math_SmoothStepToF(&player->unk_16C, 1.0f, 1.0f, 0.4f, 0.0f); player->boostActive = true; @@ -4891,38 +4892,38 @@ void func_play_800B3314(Player* player) { if (player->boostMeter >= 90.0f) { player->boostCooldown = true; } - } else if (player->unk_12C < 0.0f) { + } else if (player->zRotBank < 0.0f) { player->unk_188 += 1.5f; - player->unk_12C += player->unk_188; - if (player->unk_12C >= 0.0f) { - player->unk_12C = 0.0f; + player->zRotBank += player->unk_188; + if (player->zRotBank >= 0.0f) { + player->zRotBank = 0.0f; if (player->unk_188 > 3.0f) { player->unk_188 *= -0.4f; - player->unk_12C += player->unk_188; + player->zRotBank += player->unk_188; } } } - if ((player->unk_16C > 0.2f) && (player->unk_170 > 0.2f) && (player->timer_220 == 0)) { - player->unk_12C += (((__cosf(gGameFrameCount * M_DTOR * 8.0f) * 10.0f) - player->unk_12C) * 0.1f); - Math_SmoothStepToAngle(&player->unk_0E4, 0.0f, 0.05f, 5.0f, 0.00001f); - Math_SmoothStepToAngle(&player->unk_0EC, 0.0f, 0.05f, 5.0f, 0.00001f); + if ((player->unk_16C > 0.2f) && (player->unk_170 > 0.2f) && (player->radioDamageTimer == 0)) { + player->zRotBank += (((__cosf(gGameFrameCount * M_DTOR * 8.0f) * 10.0f) - player->zRotBank) * 0.1f); + Math_SmoothStepToAngle(&player->rot.x, 0.0f, 0.05f, 5.0f, 0.00001f); + Math_SmoothStepToAngle(&player->rot.z, 0.0f, 0.05f, 5.0f, 0.00001f); temp = gInputPress->stick_y; Math_SmoothStepToF(&player->unk_000, temp * 0.5f, 0.05f, 5.0f, 0.00001f); Math_SmoothStepToF(&player->boostSpeed, 30.0f, 0.5f, 5.0f, 0.0f); - player->unk_0D4 = -0.4f; + player->gravity = -0.4f; Math_SmoothStepToF(&D_ctx_801779A8[player->num], 30.0f, 1.0f, 10.0f, 0.0f); if ((gCamCount == 1) && ((gGameFrameCount % 2) == 0)) { - func_effect_8007BC7C(RAND_FLOAT_CENTERED(20.0f) + player->pos.x, player->unk_068 + 10.0f, - player->unk_138 - 10.0f, RAND_FLOAT(2.0f) + 4.0f); + func_effect_8007BC7C(RAND_FLOAT_CENTERED(20.0f) + player->pos.x, player->groundPos.y + 10.0f, + player->trueZpos - 10.0f, RAND_FLOAT(2.0f) + 4.0f); } - } else if ((gCamCount == 1) && ((gGameFrameCount % 4) == 0) && (player->unk_1DC == 0)) { - if ((player->unk_16C > 0.2f) && (player->timer_220 == 0)) { - func_effect_8007BC7C(RAND_FLOAT_CENTERED(10.0f) + (player->pos.x - 57.0f), player->unk_068 + 10.0f, - player->unk_138 - 10.0f, RAND_FLOAT(2.0f) + 3.0f); + } else if ((gCamCount == 1) && ((gGameFrameCount % 4) == 0) && (player->barrelRoll == 0)) { + if ((player->unk_16C > 0.2f) && (player->radioDamageTimer == 0)) { + func_effect_8007BC7C(RAND_FLOAT_CENTERED(10.0f) + (player->pos.x - 57.0f), player->groundPos.y + 10.0f, + player->trueZpos - 10.0f, RAND_FLOAT(2.0f) + 3.0f); } - if ((player->unk_170 > 0.2f) && (player->timer_220 == 0)) { - func_effect_8007BC7C(RAND_FLOAT_CENTERED(10.0f) + (player->pos.x + 57.0f), player->unk_068 + 10.0f, - player->unk_138 - 10.0f, RAND_FLOAT(2.0f) + 3.0f); + if ((player->unk_170 > 0.2f) && (player->radioDamageTimer == 0)) { + func_effect_8007BC7C(RAND_FLOAT_CENTERED(10.0f) + (player->pos.x + 57.0f), player->groundPos.y + 10.0f, + player->trueZpos - 10.0f, RAND_FLOAT(2.0f) + 3.0f); } } } @@ -4934,18 +4935,18 @@ s32 D_800D3164[6] = { void func_play_800B39E0(Player* player) { s32 i; - player->unk_084 = 0.0f; - player->unk_090.x = player->pos.x; - player->unk_090.y = player->pos.y; - player->unk_090.z = player->pos.z; - if (player->timer_1F8 != 0) { - player->timer_1F8--; + player->xShake = 0.0f; + player->basePos.x = player->pos.x; + player->basePos.y = player->pos.y; + player->basePos.z = player->pos.z; + if (player->csTimer != 0) { + player->csTimer--; } - if (player->timer_1FC != 0) { - player->timer_1FC--; + if (player->csEventTimer != 0) { + player->csEventTimer--; } - if (player->timer_220 != 0) { - player->timer_220--; + if (player->radioDamageTimer != 0) { + player->radioDamageTimer--; } if (player->timer_498 != 0) { player->timer_498--; @@ -4984,7 +4985,7 @@ void func_play_800B39E0(Player* player) { } else { Math_SmoothStepToF(&gShieldAlpha[player->num], 0.0f, 1.0f, 10.0f, 0.01f); } - Math_SmoothStepToF(&D_ctx_80177AA0[player->num], 0.0f, 1.0f, 0.4f, 0.01f); + Math_SmoothStepToF(&gMuzzleFlashScale[player->num], 0.0f, 1.0f, 0.4f, 0.01f); if ((player->form == FORM_LANDMASTER) && (player->unk_1A0 != 0)) { player->unk_1A0--; } @@ -5007,45 +5008,45 @@ void func_play_800B39E0(Player* player) { } player->timer_278--; } - if (player->unk_1F4 > 0) { - if (player->unk_1F4 > 3) { + if (player->hitTimer > 0) { + if (player->hitTimer > 3) { *gControllerRumble = 1; } - player->unk_1F4--; + player->hitTimer--; if (player->form == FORM_ARWING) { - player->unk_134 = (SIN_DEG(player->unk_1F4 * 400.0f) * player->unk_1F4) * D_800D3164[player->unk_21C]; + player->damageShake = (SIN_DEG(player->hitTimer * 400.0f) * player->hitTimer) * D_800D3164[player->unk_21C]; if (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) { - player->unk_084 = - (SIN_DEG(player->unk_1F4 * 400.0f) * player->unk_1F4) * D_800D3164[player->unk_21C] * 0.8f; + player->xShake = + (SIN_DEG(player->hitTimer * 400.0f) * player->hitTimer) * D_800D3164[player->unk_21C] * 0.8f; } } else { - player->unk_134 = - (SIN_DEG(player->unk_1F4 * 400.0f) * player->unk_1F4) * D_800D3164[player->unk_21C] * 1.5f; - player->unk_084 = 0.0f; + player->damageShake = + (SIN_DEG(player->hitTimer * 400.0f) * player->hitTimer) * D_800D3164[player->unk_21C] * 1.5f; + player->xShake = 0.0f; } if ((gLevelMode != LEVELMODE_UNK_2) && - ((player->unk_0D8.x != 0.f) || (player->unk_0D8.y != 0.f) || (player->unk_0D8.z != 0.f)) && + ((player->knockback.x != 0.f) || (player->knockback.y != 0.f) || (player->knockback.z != 0.f)) && ((player->unk_1A4 >= 40) || (player->unk_1A4 == 21))) { player->boostCooldown = true; - player->unk_0E4 = 0; - player->unk_0E8 = 0; + player->rot.x = 0; + player->rot.y = 0; Math_SmoothStepToF(&player->boostSpeed, 0, 1.0f, 5.0f, 0); } - if (player->unk_1F4 == 0) { - player->unk_134 = 0; + if (player->hitTimer == 0) { + player->damageShake = 0; } } - player->pos.x += player->unk_0D8.x; - player->pos.y += player->unk_0D8.y; + player->pos.x += player->knockback.x; + player->pos.y += player->knockback.y; if (gLevelMode == LEVELMODE_ALL_RANGE) { - player->pos.z += player->unk_0D8.z; - Math_SmoothStepToF(&player->unk_0D8.z, 0, 0.1f, 1.0f, 0.5f); + player->pos.z += player->knockback.z; + Math_SmoothStepToF(&player->knockback.z, 0, 0.1f, 1.0f, 0.5f); } - Math_SmoothStepToF(&player->unk_0D8.x, 0, 0.1f, 1.0f, 0.5f); - Math_SmoothStepToF(&player->unk_0D8.y, 0, 0.1f, 1.0f, 0.5f); - player->unk_25C -= 0.02f; - if (player->unk_25C < 0.0f) { - player->unk_25C = 0.0f; + Math_SmoothStepToF(&player->knockback.x, 0, 0.1f, 1.0f, 0.5f); + Math_SmoothStepToF(&player->knockback.y, 0, 0.1f, 1.0f, 0.5f); + player->contrailScale -= 0.02f; + if (player->contrailScale < 0.0f) { + player->contrailScale = 0.0f; } } @@ -5098,7 +5099,7 @@ void func_play_800B415C(Player* player) { void func_play_800B41E0(Player* player) { } -void func_play_800B41EC(Player* player) { +void Player_Down(Player* player) { player->state_1C8 = PLAYERSTATE_1C8_DOWN; if (!gVersusMode) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); @@ -5111,17 +5112,17 @@ void func_play_800B41EC(Player* player) { Audio_StopPlayerNoise(player->num); func_play_800A5FA0(player->sfxSource, 0x0900C010, player->num); player->shields = 0; - player->unk_1D0 = 0; - player->unk_1F4 = 0; - player->timer_220 = 0; - player->unk_134 = 0.0f; + player->csState = 0; + player->hitTimer = 0; + player->radioDamageTimer = 0; + player->damageShake = 0.0f; gShowHud = 0; } void func_play_800B42B0(Player* player) { switch (player->form) { case FORM_ARWING: - if (player->timer_1F8 != 0) { + if (player->csTimer != 0) { gInputPress->stick_x = 0; gInputPress->stick_y = 0; gInputPress->button = 0; @@ -5145,17 +5146,17 @@ void func_play_800B42B0(Player* player) { func_play_800A4C40(player); func_play_800AA800(player); func_play_800B415C(player); - if ((player->shields <= 0) && (player->timer_220 != 0)) { - func_play_800B41EC(player); + if ((player->shields <= 0) && (player->radioDamageTimer != 0)) { + Player_Down(player); player->vel.x *= 0.2f; player->vel.y = 5.0f; - player->unk_0E4 = player->unk_0E8 = 0.0f; + player->rot.x = player->rot.y = 0.0f; player->cockpitView = 0; - player->timer_1F8 = 20; + player->csTimer = 20; if (gLevelType == LEVELTYPE_SPACE) { - player->timer_1F8 = 40; + player->csTimer = 40; } - player->timer_1FC = 120; + player->csEventTimer = 120; } break; case FORM_LANDMASTER: @@ -5171,8 +5172,8 @@ void func_play_800B42B0(Player* player) { func_play_800A8BA4(player); func_play_800AA800(player); func_play_800B415C(player); - if ((player->shields <= 0) && (player->timer_220 != 0)) { - func_play_800B41EC(player); + if ((player->shields <= 0) && (player->radioDamageTimer != 0)) { + Player_Down(player); } break; } @@ -5196,21 +5197,21 @@ void func_play_800B44C4(Player* player) { func_play_800A4C40(player); func_play_800AA800(player); func_play_800B415C(player); - if ((player->shields <= 0) && (player->timer_220 != 0)) { - func_play_800B41EC(player); + if ((player->shields <= 0) && (player->radioDamageTimer != 0)) { + Player_Down(player); player->vel.y = 5.0f; if (gLevelType == LEVELTYPE_SPACE) { player->vel.y = 0.0f; } - player->timer_1F8 = 20; - player->timer_1FC = 120; + player->csTimer = 20; + player->csEventTimer = 120; player->unk_000 = 0.0f; player->unk_004 = 1.0f; - if (player->unk_0E8 < 0.0f) { + if (player->rot.y < 0.0f) { player->unk_004 = -1.0f; } - player->unk_0E4 = 0.0f; - player->unk_4D8 = 0.0f; + player->rot.x = 0.0f; + player->aerobaticPitch = 0.0f; } break; case FORM_LANDMASTER: @@ -5224,8 +5225,8 @@ void func_play_800B44C4(Player* player) { func_play_800A8BA4(player); func_play_800AA800(player); func_play_800B415C(player); - if ((player->shields <= 0) && (player->timer_220 != 0)) { - func_play_800B41EC(player); + if ((player->shields <= 0) && (player->radioDamageTimer != 0)) { + Player_Down(player); } break; case FORM_BLUE_MARINE: @@ -5238,8 +5239,8 @@ void func_play_800B44C4(Player* player) { func_play_800A8BA4(player); func_play_800AA800(player); func_play_800B415C(player); - if ((player->shields <= 0) && (player->timer_220 != 0)) { - func_play_800B41EC(player); + if ((player->shields <= 0) && (player->radioDamageTimer != 0)) { + Player_Down(player); } break; } @@ -5393,7 +5394,7 @@ void Player_Update(Player* player) { } while (gPlayerInactive[sp1C4]); player->unk_288 = sp1C4 + 1; player->state_1C8 = PLAYERSTATE_1C8_VS_STANDBY; - player->unk_1D0 = 0; + player->csState = 0; func_play_800B5FBC(player, player->unk_288 - 1, 1); } else { if (D_ctx_80177E7C == 1) { @@ -5477,8 +5478,8 @@ void Player_Update(Player* player) { player->unk_234 = 0; if (gPlayerInactive[player->num] == true) { func_play_800B5FBC(player, player->unk_288 - 1, 0); - } else if ((D_ctx_80177E74 == 0) && (player->unk_1D0 != 0)) { - player->unk_1D0 = 0; + } else if ((D_ctx_80177E74 == 0) && (player->csState != 0)) { + player->csState = 0; Player_Initialize(player); func_play_800B0F50(player); func_play_800B44C4(player); @@ -5498,7 +5499,7 @@ void Player_Update(Player* player) { gPauseEnabled = 0; } player->unk_234 = 0; - player->vel.z = player->vel.x = player->vel.y = player->unk_0D8.x = player->unk_0D8.y = 0.0f; + player->vel.z = player->vel.x = player->vel.y = player->knockback.x = player->knockback.y = 0.0f; if ((gLevelMode == LEVELMODE_ALL_RANGE) && (gFadeoutType == 7)) { player->cam.eye.x += 1.0f; @@ -5506,19 +5507,19 @@ void Player_Update(Player* player) { } if ((gCurrentLevel == LEVEL_ZONESS) || (gCurrentLevel == LEVEL_SOLAR)) { Math_SmoothStepToF(&player->cam.eye.y, 500.0f, 0.05f, 10.0f, 0.0f); - Math_SmoothStepToF(&player->cam.eye.z, player->unk_138 + D_ctx_80177D20 + 500.0f, 0.05f, 20.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.z, player->trueZpos + gPathProgress + 500.0f, 0.05f, 20.0f, 0.0f); } - if (player->timer_1F8 == 0) { + if (player->csTimer == 0) { if (gCamCount == 4) { player->state_1C8 = PLAYERSTATE_1C8_VS_STANDBY; - player->timer_1F8 = 200; + player->csTimer = 200; } else { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; gFillScreenAlphaTarget = 255; } if (gFillScreenAlpha == 255) { Play_ClearObjectData(); - D_ctx_80177D20 = gPlayer[0].unk_144 = 0.0f; + gPathProgress = gPlayer[0].zPath = 0.0f; gPlayerGlareAlphas[0] = 0; gShowAllRangeCountdown = gRadioState = 0; Audio_ClearVoice(); @@ -5580,7 +5581,7 @@ void Player_Update(Player* player) { } Math_SmoothStepToF(&player->unk_148, sp1CC, 1.0f, 0.05f, 0.0f); Math_SmoothStepToF(&player->unk_14C, sp1CC, 1.0f, 0.05f, 0.0f); - Math_SmoothStepToF(&player->unk_09C, sp1C8, 1.0f, 10.0f, 0.0f); + Math_SmoothStepToF(&player->pathWidth, sp1C8, 1.0f, 10.0f, 0.0f); if (player->form == FORM_ARWING) { Math_SmoothStepToF(&player->unk_194, player->unk_190, 0.5f, 5.0f, 0.0f); if (player->boostCooldown && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { @@ -5600,10 +5601,10 @@ void func_play_800B56BC(Player* player) { f32 var_fv0; f32 temp; - gCsCamEyeX = (player->pos.x - player->unk_0AC) * player->unk_148; + gCsCamEyeX = (player->pos.x - player->xPath) * player->unk_148; if (((player->form == FORM_ARWING) && (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE)) || (player->state_1C8 == PLAYERSTATE_1C8_U_TURN)) { - gCsCamEyeY = (player->pos.y - player->unk_0B0) * player->unk_148; + gCsCamEyeY = (player->pos.y - player->yPath) * player->unk_148; } var_fv1 = gInputPress->stick_x; var_fv0 = -gInputPress->stick_y; @@ -5622,10 +5623,10 @@ void func_play_800B56BC(Player* player) { } gCsCamEyeX -= player->unk_030 * 1.5f; gCsCamEyeY -= player->unk_02C - 50.0f; - gCsCamAtX = (player->pos.x - player->unk_0AC) * player->unk_14C; - gCsCamAtX += player->unk_084 * -2.0f; + gCsCamAtX = (player->pos.x - player->xPath) * player->unk_14C; + gCsCamAtX += player->xShake * -2.0f; gCsCamAtX -= player->unk_030 * 0.5f; - gCsCamAtY = ((player->pos.y - player->unk_0B0) * player->unk_14C) + 20.0f; + gCsCamAtY = ((player->pos.y - player->yPath) * player->unk_14C) + 20.0f; gCsCamAtY += player->unk_060 * 5.0f; gCsCamAtY -= player->unk_02C * 0.25f; switch (D_800D2F54) { @@ -5636,31 +5637,31 @@ void func_play_800B56BC(Player* player) { Math_SmoothStepToF(&D_800D2F58, 200.0f, 0.4f, 10.0f, 0); break; } - gCsCamEyeX += player->unk_0AC; - gCsCamAtX += player->unk_0AC; - gCsCamEyeY += player->unk_0B0 + D_800D2F58; - gCsCamAtZ = (player->unk_138 + D_ctx_80177D20) - 1.0f; + gCsCamEyeX += player->xPath; + gCsCamAtX += player->xPath; + gCsCamEyeY += player->yPath + D_800D2F58; + gCsCamAtZ = (player->trueZpos + gPathProgress) - 1.0f; gCsCamEyeZ = 400.0f + D_800D2F58; if (D_ctx_80177C70 == 2) { gCsCamEyeZ -= 50.0f; } if (player->somersault) { gCsCamEyeZ += 200.0f; - gCsCamAtY = (player->pos.y - player->unk_0B0) * 0.9f; + gCsCamAtY = (player->pos.y - player->yPath) * 0.9f; Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, 0.1f, 8.0f, 0.0f); Math_SmoothStepToF(&player->unk_018, 0.2f, 1.0f, 0.05f, 0.0f); } else { Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, 0.2f, 20.0f, 0.0f); Math_SmoothStepToF(&player->unk_018, 1.0f, 1.0f, 0.05f, 0.0f); } - gCsCamAtY += player->unk_0B0 + (D_800D2F58 * 0.5f); + gCsCamAtY += player->yPath + (D_800D2F58 * 0.5f); Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, player->unk_014, 1000.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, player->unk_018, 1000.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, player->unk_014, 1000.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, player->unk_018, 1000.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, player->unk_014, 1000.0f, 0.0f); Math_SmoothStepToF(&player->unk_014, 1.0f, 1.0f, 0.05f, 0.0f); - temp = -player->unk_0EC; + temp = -player->rot.z; if (gLevelType == LEVELTYPE_PLANET) { Math_SmoothStepToF(&player->camRoll, temp * 0.3f, 0.1f, 1.5f, 0.0f); } else if (gLevelType == LEVELTYPE_SPACE) { @@ -5675,18 +5676,18 @@ void func_play_800B5D30(Player* player, s32 arg1) { s32 pad2; s32 pad3; - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + player->unk_134) * M_DTOR * 0.75f, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, (player->unk_0E4 + player->unk_134) * M_DTOR * 0.75f, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->rot.y + player->damageShake) * M_DTOR * 0.75f, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, (player->rot.x + player->damageShake) * M_DTOR * 0.75f, MTXF_APPLY); sp4C.x = 0; sp4C.y = 0; sp4C.z = -1000.0f; Matrix_MultVec3f(gCalcMatrix, &sp4C, &sp40); gCsCamEyeX = player->pos.x; - gCsCamEyeY = player->pos.y + player->unk_080; - gCsCamEyeZ = player->unk_138 + D_ctx_80177D20; + gCsCamEyeY = player->pos.y + player->yBob; + gCsCamEyeZ = player->trueZpos + gPathProgress; gCsCamAtX = player->pos.x + sp40.x; - gCsCamAtY = player->pos.y + player->unk_080 + sp40.y; - gCsCamAtZ = player->unk_138 + D_ctx_80177D20 + sp40.z; + gCsCamAtY = player->pos.y + player->yBob + sp40.y; + gCsCamAtZ = player->trueZpos + gPathProgress + sp40.z; Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, player->unk_014, 100.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, player->unk_014, 100.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, player->unk_014, 50.0f, 0.0f); @@ -5694,7 +5695,7 @@ void func_play_800B5D30(Player* player, s32 arg1) { Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, player->unk_014, 100.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, player->unk_014, 100.0f, 0.0f); Math_SmoothStepToF(&player->unk_014, 1.0f, 1.0f, 0.05f, 0); - player->camRoll = -(player->unk_0F8 + player->unk_0F0); + player->camRoll = -(player->bankAngle + player->rockAngle); if (arg1 != 0) { player->cam.eye.x = gCsCamEyeX; player->cam.eye.y = gCsCamEyeY; @@ -5726,7 +5727,7 @@ void func_play_800B5FBC(Player* player, s32 playerNum, bool arg2) { playerNum = 0; } player->unk_288 = playerNum + 1; - Matrix_RotateY(gCalcMatrix, gPlayer[playerNum].unk_114 * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, gPlayer[playerNum].yRot_114 * M_DTOR, MTXF_NEW); switch (gPlayer[playerNum].form) { case FORM_ARWING: sp58.x = 300.0f; @@ -5748,11 +5749,11 @@ void func_play_800B5FBC(Player* player, s32 playerNum, bool arg2) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp58, &sp4C); player->cam.eye.x = gPlayer[playerNum].pos.x + sp4C.x; player->cam.eye.y = gPlayer[playerNum].pos.y + 50.0f; - player->cam.eye.z = gPlayer[playerNum].unk_138 + sp4C.z; + player->cam.eye.z = gPlayer[playerNum].trueZpos + sp4C.z; } player->cam.at.x = gPlayer[playerNum].pos.x; player->cam.at.y = gPlayer[playerNum].pos.y; - player->cam.at.z = gPlayer[playerNum].unk_138; + player->cam.at.z = gPlayer[playerNum].trueZpos; switch (gPlayer[playerNum].form) { case FORM_ARWING: player->cam.eye.x += gPlayer[playerNum].vel.x * 0.5f; @@ -5765,8 +5766,8 @@ void func_play_800B5FBC(Player* player, s32 playerNum, bool arg2) { case FORM_ON_FOOT: player->cam.eye.x += gPlayer[playerNum].vel.x * 0.7f; player->cam.eye.z += gPlayer[playerNum].vel.z * 0.7f; - player->cam.eye.y = gPlayer[playerNum].unk_068 + 20.0f; - player->cam.at.y = gPlayer[playerNum].unk_068 + 20.0f; + player->cam.eye.y = gPlayer[playerNum].groundPos.y + 20.0f; + player->cam.at.y = gPlayer[playerNum].groundPos.y + 20.0f; break; } Math_SmoothStepToF(&player->camRoll, 0.0f, 0.05f, 5.0f, 0.00001f); @@ -5786,14 +5787,14 @@ void func_play_800B63BC(Player* player, s32 arg1) { f32 atY; f32 atZ; - Matrix_RotateY(gCalcMatrix, (player->unk_114 + (player->unk_134 * 0.2f)) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, player->unk_134 * 0.2f * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->yRot_114 + (player->damageShake * 0.2f)) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, player->damageShake * 0.2f * M_DTOR, MTXF_APPLY); sp74.x = 0.0f; sp74.y = 0.0f; if (player->cockpitView) { - sp74.z = 1000.0f - player->unk_08C; + sp74.z = 1000.0f - player->camDist; } else { - sp74.z = 300.0f - player->unk_08C; + sp74.z = 300.0f - player->camDist; } if (player->somersault) { sp74.z += 500.0f; @@ -5810,16 +5811,16 @@ void func_play_800B63BC(Player* player, s32 arg1) { eyeY -= (player->unk_02C * 1.5f); eyeZ = player->pos.z + sp68.z; - atX = player->pos.x + player->unk_134; + atX = player->pos.x + player->damageShake; var_fv0 = (player->somersault) ? 1.0f : 0.79f; - atY = (player->pos.y * (var_fv0)) + player->unk_134 + (player->unk_060 * 5.0f); + atY = (player->pos.y * (var_fv0)) + player->damageShake + (player->unk_060 * 5.0f); atY += (player->unk_02C * 0.5f); if (player->state_1C8 == PLAYERSTATE_1C8_U_TURN) { atY = player->pos.y; } atZ = player->pos.z; - Math_SmoothStepToF(&player->unk_028, 2.0f * player->unk_0E8, 0.05f, 2.0f, 0.02f); + Math_SmoothStepToF(&player->unk_028, 2.0f * player->rot.y, 0.05f, 2.0f, 0.02f); sp74.x = -player->unk_028; sp74.y = 0.0f; sp74.z = 0.f; @@ -5832,7 +5833,7 @@ void func_play_800B63BC(Player* player, s32 arg1) { Math_SmoothStepToF(&player->cam.eye.x, eyeX, player->unk_014, 30000.0f, 0); Math_SmoothStepToF(&player->cam.eye.y, eyeY, player->unk_014, 30000.0f, 0); Math_SmoothStepToF(&player->cam.eye.z, eyeZ, player->unk_014, 30000.0f, 0); - Math_SmoothStepToF(&player->camRoll, player->unk_0E8 * -0.3f, 0.1f, 1.0f, 0); + Math_SmoothStepToF(&player->camRoll, player->rot.y * -0.3f, 0.1f, 1.0f, 0); Math_SmoothStepToF(&player->unk_014, 0.2f, 0.1f, 0.005f, 0.0f); } Math_SmoothStepToF(&player->cam.at.x, atX, player->unk_01C, 30000.0f, 0); @@ -5857,17 +5858,17 @@ void func_play_800B6848(Player* player, s32 arg1) { f32 sp40; f32 sp3C; - Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, MTXF_NEW); - Matrix_RotateZ(gCalcMatrix, player->unk_0EC * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gCalcMatrix, (player->unk_114 + (player->unk_134 * 0.2f)) * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gCalcMatrix, player->unk_134 * 0.2f * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, player->rot.x * M_DTOR, MTXF_NEW); + Matrix_RotateZ(gCalcMatrix, player->rot.z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->yRot_114 + (player->damageShake * 0.2f)) * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, player->damageShake * 0.2f * M_DTOR, MTXF_APPLY); sp54.x = 0.0f; if (player->cockpitView) { sp54.y = 150.0f; - sp54.z = 500.0f - player->unk_08C; + sp54.z = 500.0f - player->camDist; } else { sp54.y = 100.0f; - sp54.z = 250.0f - player->unk_08C; + sp54.z = 250.0f - player->camDist; } Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48); if (player->cockpitView) { @@ -5879,10 +5880,10 @@ void func_play_800B6848(Player* player, s32 arg1) { sp40 = player->pos.y + sp48.y - (player->unk_02C * 0.6f); sp3C = player->pos.z + sp48.z; - player->cam.at.x = player->pos.x + player->unk_134; - player->cam.at.y = player->pos.y + 60.0f + player->unk_02C + player->unk_134; + player->cam.at.x = player->pos.x + player->damageShake; + player->cam.at.y = player->pos.y + 60.0f + player->unk_02C + player->damageShake; player->cam.at.z = player->pos.z; - Math_SmoothStepToF(&player->unk_028, 2.0f * player->unk_0E8, 0.05f, 2.0f, 0.02f); + Math_SmoothStepToF(&player->unk_028, 2.0f * player->rot.y, 0.05f, 2.0f, 0.02f); sp54.x = -player->unk_028; sp54.y = 0.0f; sp54.z = 0.0f; @@ -5894,7 +5895,7 @@ void func_play_800B6848(Player* player, s32 arg1) { Math_SmoothStepToF(&player->cam.eye.x, sp44, 0.1f, 200.0f, 0.001f); Math_SmoothStepToF(&player->cam.eye.y, sp40, 0.1f, 200.0f, 0.001f); Math_SmoothStepToF(&player->cam.eye.z, sp3C, 0.1f, 200.0f, 0.001f); - Math_SmoothStepToF(&player->camRoll, player->unk_12C * -0.1f, 0.1f, 1.0f, 0.01f); + Math_SmoothStepToF(&player->camRoll, player->zRotBank * -0.1f, 0.1f, 1.0f, 0.01f); if (arg1 != 0) { player->cam.eye.x = sp44; player->cam.eye.y = sp40; @@ -5907,26 +5908,26 @@ void func_play_800B6BFC(Player* player, s32 arg1) { Vec3f sp58; Vec3f sp4C; - Matrix_RotateX(gCalcMatrix, player->unk_0FC * M_DTOR, MTXF_NEW); - Matrix_RotateZ(gCalcMatrix, player->unk_100 * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gCalcMatrix, (player->unk_114 + (player->unk_134 * 0.02f)) * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gCalcMatrix, player->unk_134 * 0.02f * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, player->xRot_0FC * M_DTOR, MTXF_NEW); + Matrix_RotateZ(gCalcMatrix, player->zRot_0FC * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->yRot_114 + (player->damageShake * 0.02f)) * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, player->damageShake * 0.02f * M_DTOR, MTXF_APPLY); sp64.x = 0.0f; sp64.y = 20.0f; - sp64.z = 60.0f - player->unk_08C; + sp64.z = 60.0f - player->camDist; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp64, &sp58); Math_SmoothStepToF(&player->unk_02C, -player->unk_158 * 0.5f, 0.07f, 3.0f, 0.001f); sp4C.x = player->pos.x + sp58.x; - sp4C.y = (player->unk_068 + 10.0f + sp58.y) - (player->unk_02C * 0.8f); + sp4C.y = player->groundPos.y + 10.0f + sp58.y - (player->unk_02C * 0.8f); sp4C.z = player->pos.z + sp58.z; - player->cam.at.x = player->pos.x + player->unk_134 * 0.1f; - player->cam.at.y = player->unk_068 + (player->pos.y - player->unk_068) * 0.4f + 18.0f + player->unk_02C * 1.5f + - player->unk_134 * 0.1f; + player->cam.at.x = player->pos.x + player->damageShake * 0.1f; + player->cam.at.y = player->groundPos.y + (player->pos.y - player->groundPos.y) * 0.4f + 18.0f + + player->unk_02C * 1.5f + player->damageShake * 0.1f; player->cam.at.z = player->pos.z; - Math_SmoothStepToF(&player->unk_028, player->unk_0E8 * (player->baseSpeed + 5.0f) * 0.04f, 0.05f, 2.0f, 0.02f); + Math_SmoothStepToF(&player->unk_028, player->rot.y * (player->baseSpeed + 5.0f) * 0.04f, 0.05f, 2.0f, 0.02f); sp64.x = -player->unk_028; sp64.y = 0.0f; sp64.z = 0.0f; @@ -5939,7 +5940,7 @@ void func_play_800B6BFC(Player* player, s32 arg1) { Math_SmoothStepToF(&player->cam.eye.x, sp4C.x, 0.3f, 65.0f, 0.001f); Math_SmoothStepToF(&player->cam.eye.y, sp4C.y, 0.3f, 65.0f, 0.001f); Math_SmoothStepToF(&player->cam.eye.z, sp4C.z, 0.3f, 65.0f, 0.001f); - Math_SmoothStepToF(&player->camRoll, player->unk_12C * -0.1f, 0.1f, 1.0f, 0.01f); + Math_SmoothStepToF(&player->camRoll, player->zRotBank * -0.1f, 0.1f, 1.0f, 0.01f); if (arg1 != 0) { player->cam.eye.x = sp4C.x; player->cam.eye.y = sp4C.y; @@ -6032,12 +6033,12 @@ void Player_UpdateCamera(Player* player) { player->cam.eye.x += (player->pos.x - player->cam.eye.x) * 0.1f; player->cam.eye.y += (player->pos.y - player->cam.eye.y) * 0.1f; player->cam.eye.z -= player->vel.z * 0.2f; - if (player->unk_1D0 != 0) { + if (player->csState != 0) { player->cam.eye.z -= player->vel.z * 0.2f; } player->cam.at.x += (player->pos.x - player->cam.at.x) * 0.1f; player->cam.at.y += (player->pos.y - player->cam.at.y) * 0.1f; - player->cam.at.z = player->unk_138 + D_ctx_80177D20 - 1.0f; + player->cam.at.z = player->trueZpos + gPathProgress - 1.0f; } break; case PLAYERSTATE_1C8_NEXT: @@ -6165,7 +6166,7 @@ void Play_UpdateLevel(void) { case LEVEL_VENOM_2: if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) && (gLevelPhase == 2)) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; - gPlayer[0].unk_1D0 = 0; + gPlayer[0].csState = 0; gPlayer[0].unk_234 = 1; gPlayer[0].pos.z = 15000.0f; func_play_800B7184(gPlayer, 1); @@ -6179,8 +6180,8 @@ void Play_UpdateLevel(void) { case LEVEL_VENOM_ANDROSS: Andross_8018BDD8(); gGroundHeight = -25000.0f; - gPlayer[0].unk_0A0 = 612.0f; - gPlayer[0].unk_0A4 = -544.0f; + gPlayer[0].pathHeight = 612.0f; + gPlayer[0].pathFloor = -544.0f; if (gStartAndrossFightTimer != 0) { gStartAndrossFightTimer--; if (gStartAndrossFightTimer == 0) { @@ -6203,7 +6204,7 @@ void Play_UpdateLevel(void) { if ((gCurrentLevel == LEVEL_SECTOR_X) && (gLevelPhase == 0) && (gRingPassCount == 4)) { gRingPassCount++; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ENTER_WARP_ZONE; - gPlayer[0].unk_1D0 = 0; + gPlayer[0].csState = 0; gSceneSetup = 1; AUDIO_PLAY_SFX(0x1900602A, gDefaultSfxSource, 0); gMissionStatus = MISSION_WARP; @@ -6222,7 +6223,7 @@ void Play_UpdateLevel(void) { case LEVEL_SOLAR: func_play_800A3FEC(); - for (D_ctx_80177CE8; D_ctx_80177CE8 >= 10.0f; D_ctx_80177CE8 -= 10.0f) { + for (gPathTexScroll; gPathTexScroll >= 10.0f; gPathTexScroll -= 10.0f) { Texture_Scroll(D_SO_6005710, 32, 32, 1); } if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_NEXT) { @@ -6272,7 +6273,7 @@ void Play_UpdateLevel(void) { Audio_SetHeatAlarmParams(shields, heightParam); if (((gGameFrameCount % 8) == 0) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) { Solar_8019E8B8(RAND_FLOAT_CENTERED(6000.0f), -80.0f, - gPlayer[0].unk_138 + (RAND_FLOAT(2000.0f) + -6000.0f), + gPlayer[0].trueZpos + (RAND_FLOAT(2000.0f) + -6000.0f), RAND_FLOAT(10.0f) + 20.0f); // check } func_hud_8008C104(D_SO_60229A4, D_SO_6010198); @@ -6282,7 +6283,7 @@ void Play_UpdateLevel(void) { break; case LEVEL_ZONESS: func_play_800A3FEC(); - for (D_ctx_80177CE8; D_ctx_80177CE8 >= 20.0f; D_ctx_80177CE8 -= 20.0f) { + for (gPathTexScroll; gPathTexScroll >= 20.0f; gPathTexScroll -= 20.0f) { Texture_Scroll(D_ZO_602C2CC, 32, 32, 1); } if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_NEXT) { @@ -6290,7 +6291,7 @@ void Play_UpdateLevel(void) { } func_hud_8008C104(D_ZO_602C2CC, D_ZO_600D990); if (func_play_800A73E4(&sp3C, &sp40, gPlayer[0].cam.eye.x, gPlayer[0].cam.eye.y, - gPlayer[0].cam.eye.z - D_ctx_80177D20)) { + gPlayer[0].cam.eye.z - gPathProgress)) { gLight1R = 0; gLight1G = 7; gLight1B = 10; @@ -6373,7 +6374,7 @@ void Play_SpawnVsItem(ObjectId objId, Item* item) { } void func_play_800B86A4(f32* arg0) { - *arg0 += D_ctx_80177D20 + 15000.0f; + *arg0 += gPathProgress + 15000.0f; } void Play_Main(void) { @@ -6415,10 +6416,10 @@ void Play_Main(void) { Training_80198C50(); } func_play_800B86A4(&gPlayer[0].pos.z); - func_play_800B86A4(&gPlayer[0].unk_138); + func_play_800B86A4(&gPlayer[0].trueZpos); gPlayer[0].cam.eye.z += 15000.0f; gPlayer[0].cam.at.z += 15000.0f; - gPlayer[0].unk_144 = gPlayer[0].unk_140 = D_ctx_80177D08 = D_ctx_80177D20 = 0.0f; + gPlayer[0].zPath = gPlayer[0].zPathVel = gPathVelZ = gPathProgress = 0.0f; } if (gPlayState != PLAY_PAUSE) { (void) "play_time = %d\n"; diff --git a/src/engine/fox_tank.c b/src/engine/fox_tank.c index 46555e77..24c247f7 100644 --- a/src/engine/fox_tank.c +++ b/src/engine/fox_tank.c @@ -63,31 +63,31 @@ void func_tank_80043468(Player* player) { f32 sp40; s32 pad3C; - sp54 = ((player->pos.x - player->unk_0AC) * player->unk_148) + (player->unk_0E8 * 0.5f); - sp48 = sp54 + (player->unk_0E8 * -5.0f); + sp54 = ((player->pos.x - player->xPath) * player->unk_148) + (player->rot.y * 0.5f); + sp48 = sp54 + (player->rot.y * -5.0f); sp40 = player->cam.eye.z - 1000.0f; - sp54 += player->unk_0AC; - sp48 += player->unk_0AC; - if (player->unk_1D4 != 0) { - sp50 = player->pos.y + 100.0f + (-player->unk_0E4 * 5.0f); - sp4C = player->pos.y + player->unk_0E4 * 10.0f; + sp54 += player->xPath; + sp48 += player->xPath; + if (player->grounded) { + sp50 = player->pos.y + 100.0f + (-player->rot.x * 5.0f); + sp4C = player->pos.y + player->rot.x * 10.0f; sp50 += player->unk_17C * 0.5f; sp4C += player->unk_17C * -5.0f; if (0 || (gCurrentLevel == LEVEL_MACBETH) && (D_MA_801BA1E8 == 102)) { - sp50 = player->pos.y + 45.0f + (-player->unk_0E4 * 5.0f); - sp4C = player->pos.y + 200.0f + (player->unk_0E4 * 10.0f); + sp50 = player->pos.y + 45.0f + (-player->rot.x * 5.0f); + sp4C = player->pos.y + 200.0f + (player->rot.x * 10.0f); sp50 += player->unk_17C * 0.2f; sp4C += player->unk_17C * -3.0f; } if (D_MA_801BA1E8 == 99) { - sp50 = player->pos.y + 40.0f + (-player->unk_0E4 * 5.0f); - sp4C = player->pos.y + 200.0f + (player->unk_0E4 * 10.0f); + sp50 = player->pos.y + 40.0f + (-player->rot.x * 5.0f); + sp4C = player->pos.y + 200.0f + (player->rot.x * 10.0f); sp50 += player->unk_17C * 0.2f; sp4C += player->unk_17C * -3.0f; } else if (D_MA_801BA1E8 == 98) { sp50 = player->pos.y + 100.0f; - sp4C = player->pos.y + (player->unk_0E4 * 10.0f); + sp4C = player->pos.y + (player->rot.x * 10.0f); sp4C += player->unk_17C * -3.0f; } } else { @@ -110,7 +110,7 @@ void func_tank_80043468(Player* player) { Math_SmoothStepToF(&player->cam.at.x, sp48, 0.1f, player->unk_014 * 20.0f, 0.00001f); Math_SmoothStepToF(&player->cam.eye.z, 200.0f, 0.1f, player->unk_014 * 10.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.z, sp40, 1.0f, player->unk_014 * 10.0f, 0.0f); - Math_SmoothStepToF(&player->camRoll, player->unk_0EC * -0.4f, 0.1f, 1.0f, 0.01f); + Math_SmoothStepToF(&player->camRoll, player->rot.z * -0.4f, 0.1f, 1.0f, 0.01f); Math_SmoothStepToF(&player->unk_014, 1.0f, 1.0f, 0.1f, 0.0f); } @@ -156,72 +156,72 @@ void func_tank_80043B18(Player* player) { f32 sp38; Matrix_Translate(gCalcMatrix, 0.0f, player->unk_18C + 30.0f, 0, MTXF_NEW); - Matrix_RotateY(gCalcMatrix, player->unk_114 * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, (player->unk_0EC + player->unk_0F0) * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, -player->unk_12C * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, player->yRot_114 * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, player->rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, (player->rot.z + player->rockAngle) * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->rot.y + 180.0f) * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -player->zRotBank * M_DTOR, MTXF_APPLY); Matrix_Translate(gCalcMatrix, 0.0f, -30.0f, 0, MTXF_APPLY); sp48.y = 0.0f; sp48.z = -20.0f; - sp38 = player->unk_114; - if (player->unk_1DC != 0) { + sp38 = player->yRot_114; + if (player->barrelRoll != 0) { sp48.x = 0.0f; sp48.z = RAND_FLOAT_CENTERED(50.0f) + -20.0f; - if (player->unk_1EC < 0) { + if (player->rollRate < 0) { sp38 -= 65.0f; } else { sp38 += 65.0f; } Matrix_MultVec3f(gCalcMatrix, &sp48, &sp3C); if (gCurrentLevel == LEVEL_MACBETH) { - func_tank_80043AA0(player->pos.x + sp3C.x, player->pos.y + sp3C.y, player->unk_138 + sp3C.z, 0.2f); + func_tank_80043AA0(player->pos.x + sp3C.x, player->pos.y + sp3C.y, player->trueZpos + sp3C.z, 0.2f); } else { if (((gGameFrameCount % 2) == 0)) { - Titania_80189120(player->pos.x + sp3C.x, player->pos.y + sp3C.y, player->unk_138 + sp3C.z, - player->unk_0E8 + sp38, 1.3f); + Titania_80189120(player->pos.x + sp3C.x, player->pos.y + sp3C.y, player->trueZpos + sp3C.z, + player->rot.y + sp38, 1.3f); } if (((gGameFrameCount % 4) == 0)) { - func_effect_8007A900(player->pos.x + sp3C.x, player->pos.y + sp3C.y + 20.0f, player->unk_138 + sp3C.z, + func_effect_8007A900(player->pos.x + sp3C.x, player->pos.y + sp3C.y + 20.0f, player->trueZpos + sp3C.z, 2.0f, 255, 15, 0); } } } else { - sp38 += player->unk_12C; - if (player->unk_12C > -5.0f) { + sp38 += player->zRotBank; + if (player->zRotBank > -5.0f) { sp48.x = 36.0f; Matrix_MultVec3f(gCalcMatrix, &sp48, &sp3C); if (gCurrentLevel == LEVEL_MACBETH) { if ((gGameFrameCount % 2) != 0) { - func_tank_80043AA0(player->pos.x + sp3C.x, player->pos.y + sp3C.y, player->unk_138 + sp3C.z, 0.2f); + func_tank_80043AA0(player->pos.x + sp3C.x, player->pos.y + sp3C.y, player->trueZpos + sp3C.z, 0.2f); } } else { if (((gGameFrameCount % 2) == 0)) { - Titania_80189120(player->pos.x + sp3C.x, player->pos.y + sp3C.y, player->unk_138 + sp3C.z, - player->unk_0E8 + sp38, 1.0f); + Titania_80189120(player->pos.x + sp3C.x, player->pos.y + sp3C.y, player->trueZpos + sp3C.z, + player->rot.y + sp38, 1.0f); } if (((gGameFrameCount % 4) == 0) && (player->baseSpeed >= 5.0f)) { func_effect_8007A900(player->pos.x + sp3C.x, player->pos.y + sp3C.y + 20.0f, - player->unk_138 + sp3C.z, 2.0f, 255, 15, 0); + player->trueZpos + sp3C.z, 2.0f, 255, 15, 0); } } } - if (player->unk_12C < 5.0f) { + if (player->zRotBank < 5.0f) { sp48.x = -36.0f; Matrix_MultVec3f(gCalcMatrix, &sp48, &sp3C); if (gCurrentLevel == LEVEL_MACBETH) { if (((gGameFrameCount % 2) == 0)) { - func_tank_80043AA0(player->pos.x + sp3C.x, player->pos.y + sp3C.y, player->unk_138 + sp3C.z, 0.2f); + func_tank_80043AA0(player->pos.x + sp3C.x, player->pos.y + sp3C.y, player->trueZpos + sp3C.z, 0.2f); } } else { if (((gGameFrameCount % 2) == 0)) { - Titania_80189120(player->pos.x + sp3C.x, player->pos.y + sp3C.y, player->unk_138 + sp3C.z, - player->unk_0E8 + sp38, 1.0f); + Titania_80189120(player->pos.x + sp3C.x, player->pos.y + sp3C.y, player->trueZpos + sp3C.z, + player->rot.y + sp38, 1.0f); } if (((gGameFrameCount % 4) == 0) && (player->baseSpeed >= 5.0f)) { func_effect_8007A900(player->pos.x + sp3C.x, player->pos.y + sp3C.y + 20.0f, - player->unk_138 + sp3C.z, 2.0f, 255, 15, 0); + player->trueZpos + sp3C.z, 2.0f, 255, 15, 0); } } } @@ -256,21 +256,21 @@ void func_tank_800441C8(Player* player, f32* hitboxData, f32 xPos, f32 yPos, f32 if (player->vel.y <= 0.0f) { x = player->pos.x; y = player->pos.y - 10.0f; - z = player->unk_138; + z = player->trueZpos; if (func_tank_80044120(hitbox, x, y, z, xPos, yPos, zPos)) { - player->unk_1D4 = 1; + player->grounded = true; if (player->vel.y < -20.0f) { - player->unk_1F4 = 20; + player->hitTimer = 20; } player->vel.y = 0.0f; player->pos.y = yPos + 20.0f; - Math_SmoothStepToF(&player->unk_0E4, 0.0f, 0.3f, 5.0f, 0.0f); - Math_SmoothStepToF(&player->unk_0EC, 0.0f, 0.3f, 5.0f, 0.0f); + Math_SmoothStepToF(&player->rot.x, 0.0f, 0.3f, 5.0f, 0.0f); + Math_SmoothStepToF(&player->rot.z, 0.0f, 0.3f, 5.0f, 0.0f); } } else { x = player->pos.x; y = player->pos.y + 30.0f; - z = player->unk_138; + z = player->trueZpos; if (func_tank_80044120(hitbox, x, y, z, xPos, yPos, zPos)) { player->vel.y = 0.0f; player->pos.y = yPos - 75.0f; @@ -286,7 +286,7 @@ void func_tank_800443DC(Player* player) { for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) { if ((scenery->obj.status == OBJ_ACTIVE) && (scenery->obj.id == OBJ_SCENERY_58) && - ((player->unk_138 - 2000.0f) < scenery->obj.pos.z)) { + ((player->trueZpos - 2000.0f) < scenery->obj.pos.z)) { func_tank_800441C8(player, scenery->info.hitbox, scenery->obj.pos.x, scenery->obj.pos.y, scenery->obj.pos.z, scenery->obj.rot.x, scenery->obj.rot.y, scenery->obj.rot.z); } @@ -302,14 +302,14 @@ void func_tank_800444BC(Player* player) { f32 sp30; sp30 = 5.0f; - player->unk_1D4 = 0; - if (player->unk_0D4 < 0.0f) { + player->grounded = false; + if (player->gravity < 0.0f) { sp30 = 0.0f; } sp40 = sp3C = 0.0f; sp38 = gGroundHeight; if (gGroundType == 4) { - Ground_801B6E20(player->pos.x, player->unk_138 + player->unk_144, &sp40, &sp38, &sp3C); + Ground_801B6E20(player->pos.x, player->trueZpos + player->zPath, &sp40, &sp38, &sp3C); } if (gCurrentLevel == LEVEL_MACBETH) { D_MA_801BE250[27] = gGroundHeight; @@ -324,9 +324,9 @@ void func_tank_800444BC(Player* player) { if (player->vel.y < -10.0f) { AUDIO_PLAY_SFX(0x09008015, player->sfxSource, 0); } - player->unk_1D4 = 1; + player->grounded = true; if (player->vel.y < -20.0f) { - player->unk_1F4 = 20; + player->hitTimer = 20; } if (gTiStartLandmaster != 0) { gTiStartLandmaster = 0; @@ -338,36 +338,36 @@ void func_tank_800444BC(Player* player) { sp34 = (player->baseSpeed * 0.2f) + 0.2f; player->vel.y = -3.0f; - if ((player->unk_104 > 0.0f) && (sp40 <= 0.0f)) { - player->vel.y = player->unk_104 * 0.5f * player->baseSpeed * 0.035f; - player->unk_0E4 = player->unk_104; + if ((player->rot_104.x > 0.0f) && (sp40 <= 0.0f)) { + player->vel.y = player->rot_104.x * 0.5f * player->baseSpeed * 0.035f; + player->rot.x = player->rot_104.x; } - if (player->unk_0D4 < 0.0f) { + if (player->gravity < 0.0f) { player->vel.y = 2.0f; if (player->vel.y) {} // fake? player->pos.y += 7.0f; } - player->unk_104 = RAD_TO_DEG(sp40); - player->unk_10C = RAD_TO_DEG(sp3C); + player->rot_104.x = RAD_TO_DEG(sp40); + player->rot_104.z = RAD_TO_DEG(sp3C); if (gCurrentLevel == LEVEL_MACBETH) { - if (player->unk_104 > 90.0f) { - player->unk_104 = -(180 - player->unk_104); + if (player->rot_104.x > 90.0f) { + player->rot_104.x = -(180 - player->rot_104.x); } - if (player->unk_10C > 90.0f) { - player->unk_10C = -(180 - player->unk_10C); + if (player->rot_104.z > 90.0f) { + player->rot_104.z = -(180 - player->rot_104.z); } } - if (player->unk_0E4 < player->unk_104) { - player->unk_0E4 += sp34; + if (player->rot.x < player->rot_104.x) { + player->rot.x += sp34; } - if (player->unk_0E4 > player->unk_104) { - player->unk_0E4 -= sp34; + if (player->rot.x > player->rot_104.x) { + player->rot.x -= sp34; } - if (player->unk_0EC < player->unk_10C) { - player->unk_0EC += sp34; + if (player->rot.z < player->rot_104.z) { + player->rot.z += sp34; } - if (player->unk_0EC > player->unk_10C) { - player->unk_0EC -= sp34; + if (player->rot.z > player->rot_104.z) { + player->rot.z -= sp34; } } if (gCurrentLevel == LEVEL_TITANIA) { @@ -377,20 +377,20 @@ void func_tank_800444BC(Player* player) { void func_tank_80044868(Player* player) { f32 pad; - f32 var_fv1; + f32 stickTilt; f32 sp2C; - var_fv1 = (gInputPress->stick_y * 0.7f) - 8.0f; - if (var_fv1 < -40.0f) { - var_fv1 = -40.0f; + stickTilt = (gInputPress->stick_y * 0.7f) - 8.0f; + if (stickTilt < -40.0f) { + stickTilt = -40.0f; } - if (var_fv1 > 0.0f) { - var_fv1 = 0.0f; + if (stickTilt > 0.0f) { + stickTilt = 0.0f; } - if (player->unk_17C < var_fv1) { + if (player->unk_17C < stickTilt) { player->unk_17C += 3.0f; } - if (var_fv1 < player->unk_17C) { + if (stickTilt < player->unk_17C) { player->unk_17C -= 3.0f; } if (player->unk_180 < 0.0f) { @@ -399,15 +399,15 @@ void func_tank_80044868(Player* player) { if (player->unk_180 > 0.0f) { player->unk_180 -= 3.0f; } - D_ctx_80177968 = 3.0f; - D_ctx_80177970 = 0.66f; - var_fv1 = gInputPress->stick_x; - if (var_fv1 == 0.0f) { - Math_SmoothStepToF(&player->unk_0E8, -var_fv1 * D_ctx_80177970, 0.1f, D_ctx_80177968 * 0.5f, 0.1f); + gPlayerTurnRate = 3.0f; + gPlayerTurnStickMod = 0.66f; + stickTilt = gInputPress->stick_x; + if (stickTilt == 0.0f) { + Math_SmoothStepToF(&player->rot.y, -stickTilt * gPlayerTurnStickMod, 0.1f, gPlayerTurnRate * 0.5f, 0.1f); } else { - Math_SmoothStepToF(&player->unk_0E8, -var_fv1 * D_ctx_80177970, 0.1f, D_ctx_80177968, 0.1f); + Math_SmoothStepToF(&player->rot.y, -stickTilt * gPlayerTurnStickMod, 0.1f, gPlayerTurnRate, 0.1f); } - player->unk_108 = player->unk_0E8; + player->rot_104.y = player->rot.y; sp2C = player->baseSpeed; if ((gCurrentLevel == LEVEL_MACBETH) && (sp2C < 3.0f)) { @@ -419,51 +419,51 @@ void func_tank_80044868(Player* player) { if (player->unk_170 > 0.2f) { Math_SmoothStepToF(&player->unk_184, -player->baseSpeed * 0.5f, 1.0f, 1.0f, 0.0f); } - if (!(player->unk_170 > 0.2f) && !(player->unk_16C > 0.2f) && (player->unk_1D4 != 0)) { + if (!(player->unk_170 > 0.2f) && !(player->unk_16C > 0.2f) && player->grounded) { Math_SmoothStepToF(&player->unk_184, 0.0f, 1.0f, 0.75f, 0.0f); } - if (player->unk_1DC != 0) { - if (player->unk_1EC < 0) { + if (player->barrelRoll != 0) { + if (player->rollRate < 0) { player->unk_184 = 15.0f; } - if (player->unk_1EC > 0) { + if (player->rollRate > 0) { player->unk_184 = -15.0f; } } - player->vel.z = -(COS_DEG(player->unk_108) * COS_DEG(player->unk_104) * sp2C); - if ((player->vel.x < 20.0f) && (player->unk_10C < -30.0f)) { - Math_SmoothStepToF(&player->vel.x, -player->unk_10C * 0.5f, 0.2f, 3.0f, 0.0f); + player->vel.z = -(COS_DEG(player->rot_104.y) * COS_DEG(player->rot_104.x) * sp2C); + if ((player->vel.x < 20.0f) && (player->rot_104.z < -30.0f)) { + Math_SmoothStepToF(&player->vel.x, -player->rot_104.z * 0.5f, 0.2f, 3.0f, 0.0f); player->unk_184 = 0.0f; - } else if ((player->vel.x > -20.0f) && (player->unk_10C > 30.0f)) { - Math_SmoothStepToF(&player->vel.x, -player->unk_10C * 0.5f, 0.2f, 3.0f, 0.0f); + } else if ((player->vel.x > -20.0f) && (player->rot_104.z > 30.0f)) { + Math_SmoothStepToF(&player->vel.x, -player->rot_104.z * 0.5f, 0.2f, 3.0f, 0.0f); player->unk_184 = 0.0f; } else { - Math_SmoothStepToF(&player->vel.x, player->unk_184 - (SIN_DEG(player->unk_108) * sp2C), 0.5f, 5.0f, 0.0f); + Math_SmoothStepToF(&player->vel.x, player->unk_184 - (SIN_DEG(player->rot_104.y) * sp2C), 0.5f, 5.0f, 0.0f); } player->vel.z += fabsf((player->unk_184 * 0.4f * player->baseSpeed) / 15.0f); if (player->unk_000 == 0) { - player->vel.z += SIN_DEG(player->unk_0E4) * player->boostSpeed; + player->vel.z += SIN_DEG(player->rot.x) * player->boostSpeed; } if (D_800C9F00 != 0) { player->vel.z = 2.0f * D_800C9F00; } player->pos.x += player->vel.x; - if ((player->unk_0AC + (player->unk_09C - 100.0f)) < player->pos.x) { + if ((player->xPath + (player->pathWidth - 100.0f)) < player->pos.x) { player->flags_228 = PFLAG_228_0; } - if (player->pos.x < (player->unk_0AC - (player->unk_09C - 100.0f))) { + if (player->pos.x < (player->xPath - (player->pathWidth - 100.0f))) { player->flags_228 = PFLAG_228_1; } - if (player->unk_09C + player->unk_0AC < player->pos.x) { - player->pos.x = player->unk_09C + player->unk_0AC; + if (player->pathWidth + player->xPath < player->pos.x) { + player->pos.x = player->pathWidth + player->xPath; player->vel.x = 0.0f; } - if (player->pos.x < player->unk_0AC - player->unk_09C) { - player->pos.x = player->unk_0AC - player->unk_09C; + if (player->pos.x < player->xPath - player->pathWidth) { + player->pos.x = player->xPath - player->pathWidth; player->vel.x = 0.0f; } player->pos.y += player->vel.y; - player->vel.y -= player->unk_0D4; + player->vel.y -= player->gravity; if (player->vel.y < -50.0f) { player->vel.y = -50.0f; @@ -472,15 +472,15 @@ void func_tank_80044868(Player* player) { player->vel.y = 20.0f; } player->pos.z += player->vel.z; - if (player->unk_1D4 != 0) { - player->unk_0A0 = 0.0f; - player->unk_0F4 += player->baseSpeed * 5.0f; - player->unk_0F0 = SIN_DEG(player->unk_0F4) * 0.7f; + if (player->grounded) { + player->pathHeight = 0.0f; + player->rockPhase += player->baseSpeed * 5.0f; + player->rockAngle = SIN_DEG(player->rockPhase) * 0.7f; if (D_800C9F04 == 0) { if (player->baseSpeed != 0.0f) { func_tank_80043B18(player); } - if (player->unk_1DC != 0.0f) { + if (player->barrelRoll != 0.0f) { func_tank_80043B18(player); } } @@ -508,32 +508,32 @@ void func_tank_80045130(Player* player) { Math_SmoothStepToF(&player->unk_16C, 0.0f, 1.0f, 0.2f, 0.0f); if (gInputPress->button & Z_TRIG) { player->sfx.bank = 1; - if ((player->timer_1E0 != 0) && (player->unk_12C > 0.0f) && (player->boostMeter < 10.0f)) { - player->unk_1DC = 1; + if ((player->barrelInputTimerL != 0) && (player->zRotBank > 0.0f) && (player->boostMeter < 10.0f)) { + player->barrelRoll = 1; player->timer_1E8 = 15; - player->unk_1F0 = 20; - player->unk_1EC = 20; + player->baseRollRate = 20; + player->rollRate = 20; player->sfx.roll = 1; AUDIO_PLAY_SFX(0x1100000A, player->sfxSource, 0); } else { - player->timer_1E0 = 10; + player->barrelInputTimerL = 10; } } if (gInputPress->button & R_TRIG) { player->sfx.bank = 1; - if ((player->timer_1E4 != 0) && (player->unk_12C < 0.0f) && (player->boostMeter < 10.0f)) { - player->unk_1DC = 1; + if ((player->barrelInputTimerR != 0) && (player->zRotBank < 0.0f) && (player->boostMeter < 10.0f)) { + player->barrelRoll = 1; player->timer_1E8 = 15; - player->unk_1F0 = -20; - player->unk_1EC = -20; + player->baseRollRate = -20; + player->rollRate = -20; player->sfx.roll = 1; AUDIO_PLAY_SFX(0x1100000A, player->sfxSource, 0); } else { - player->timer_1E4 = 10; + player->barrelInputTimerR = 10; } } - player->unk_18C = fabsf(SIN_DEG(player->unk_12C) * 25.0f); - player->unk_18C += fabsf(SIN_DEG(player->unk_130) * 20.0f); + player->unk_18C = fabsf(SIN_DEG(player->zRotBank) * 25.0f); + player->unk_18C += fabsf(SIN_DEG(player->zRotBarrelRoll) * 20.0f); } void func_tank_80045348(Player* player) { @@ -580,7 +580,7 @@ void func_tank_80045348(Player* player) { D_800C9F28 = 0.0f; } Math_SmoothStepToF(&player->baseSpeed, sp44, sp3C, sp38, 0.001f); - Math_SmoothStepToF(&player->unk_08C, sp40, sp3C, sp38, 0.001f); + Math_SmoothStepToF(&player->camDist, sp40, sp3C, sp38, 0.001f); } else if (player->unk_19C == -1) { Math_SmoothStepToF(&player->baseSpeed, player->unk_000, 0.1f, 2.0f, 0.01f); } @@ -591,7 +591,7 @@ void func_tank_80045678(Player* player) { f32 temp; f32 pad; - player->unk_0D4 = 3.0f; + player->gravity = 3.0f; if (!(gInputHold->button & Z_TRIG)) { Audio_KillSfxBySourceAndId(player->sfxSource, 0x01008016); Audio_KillSfxBySourceAndId(player->sfxSource, 0x1100000A); @@ -602,21 +602,21 @@ void func_tank_80045678(Player* player) { AUDIO_PLAY_SFX(0x01004024, player->sfxSource, 0); } player->unk_188 = 0.0f; - player->unk_12C += 4.0f; - if (player->unk_12C > 50.0f) { - player->unk_12C = 50.0f; + player->zRotBank += 4.0f; + if (player->zRotBank > 50.0f) { + player->zRotBank = 50.0f; } Math_SmoothStepToF(&player->unk_170, 1.0f, 1.0f, 0.4f, 0.0f); D_800C9F20 += 1.0f; } else { - if (player->unk_12C > 0) { + if (player->zRotBank > 0) { player->unk_188 += 1.5f; - player->unk_12C -= player->unk_188; - if (player->unk_12C <= 0.0f) { - player->unk_12C = 0.0f; + player->zRotBank -= player->unk_188; + if (player->zRotBank <= 0.0f) { + player->zRotBank = 0.0f; if (player->unk_188 > 3.0f) { player->unk_188 *= -0.4f; - player->unk_12C -= player->unk_188; + player->zRotBank -= player->unk_188; } } } @@ -632,124 +632,124 @@ void func_tank_80045678(Player* player) { AUDIO_PLAY_SFX(0x01004024, player->sfxSource, 0); } player->unk_188 = 0.0f; - player->unk_12C -= 4.0f; - if (player->unk_12C < -50.0f) { - player->unk_12C = -50.0f; + player->zRotBank -= 4.0f; + if (player->zRotBank < -50.0f) { + player->zRotBank = -50.0f; } Math_SmoothStepToF(&player->unk_16C, 1.0f, 1.0f, 0.4f, 0.0f); player->unk_2C0 += 1.0f; } else { - if (player->unk_12C < 0.0f) { + if (player->zRotBank < 0.0f) { player->unk_188 += 1.5f; - player->unk_12C += player->unk_188; - if (player->unk_12C >= 0.0f) { - player->unk_12C = 0.0f; + player->zRotBank += player->unk_188; + if (player->zRotBank >= 0.0f) { + player->zRotBank = 0.0f; if (player->unk_188 > 3.0f) { player->unk_188 *= -0.4f; - player->unk_12C += player->unk_188; + player->zRotBank += player->unk_188; } } } player->unk_2C0 = 0.0f; } Math_SmoothStepToF(&player->boostSpeed, 0.0f, 0.1f, 1.0f, 0); - if ((player->unk_16C > 0.2f) && (player->unk_170 > 0.2f) && (player->timer_220 == 0)) { + if ((player->unk_16C > 0.2f) && (player->unk_170 > 0.2f) && (player->radioDamageTimer == 0)) { if (D_800C9F3C == 0) { D_800C9F3C = 1; Audio_KillSfxBySourceAndId(player->sfxSource, 0x1100000A); Audio_KillSfxBySourceAndId(player->sfxSource, 0x01004024); AUDIO_PLAY_SFX(0x01008016, player->sfxSource, 0); } - player->unk_12C += ((__cosf(gGameFrameCount * M_DTOR * 8.0f) * 10.0f) - player->unk_12C) * 0.1f; + player->zRotBank += ((__cosf(gGameFrameCount * M_DTOR * 8.0f) * 10.0f) - player->zRotBank) * 0.1f; temp = -gInputPress->stick_y; - Math_SmoothStepToF(&player->unk_0E4, temp * 0.3f, 0.05f, 5.0f, 0.00001f); + Math_SmoothStepToF(&player->rot.x, temp * 0.3f, 0.05f, 5.0f, 0.00001f); Math_SmoothStepToF(&player->boostSpeed, 15.0f, 0.5f, 5.0f, 0.0f); - Math_SmoothStepToF(&player->unk_0EC, 0.0f, 0.1f, 5.0f, 0.00001f); - player->unk_0D4 = -0.4f; - player->unk_0A0 += player->vel.y; + Math_SmoothStepToF(&player->rot.z, 0.0f, 0.1f, 5.0f, 0.00001f); + player->gravity = -0.4f; + player->pathHeight += player->vel.y; - if (player->unk_0A0 > 300.0f) { - player->unk_0D4 = 0.0f; + if (player->pathHeight > 300.0f) { + player->gravity = 0.0f; Math_SmoothStepToF(&player->vel.y, 0.0f, 0.1f, 2.0f, 0); } if ((gCamCount == 1) && ((gGameFrameCount % 2) == 0)) { - func_effect_8007A900(RAND_FLOAT_CENTERED(20.0f) + player->pos.x, player->unk_068 + 10.0f, - player->unk_138 - 10.0f, RAND_FLOAT(2.0f) + 3.5f, 255, 16, 1); + func_effect_8007A900(RAND_FLOAT_CENTERED(20.0f) + player->pos.x, player->groundPos.y + 10.0f, + player->trueZpos - 10.0f, RAND_FLOAT(2.0f) + 3.5f, 255, 16, 1); } } else { D_800C9F3C = 0; - if ((gCamCount == 1) && ((gGameFrameCount % 4) == 0) && (player->unk_1DC == 0)) { - if ((player->unk_16C > 0.2f) && (player->timer_220 == 0)) { - func_effect_8007A900(RAND_FLOAT_CENTERED(10.0f) + (player->pos.x - 57.0f), player->unk_068 + 10.0f, - player->unk_138 - 10.0f, RAND_FLOAT(1.0f) + 1.5f, 255, 15, 0); + if ((gCamCount == 1) && ((gGameFrameCount % 4) == 0) && (player->barrelRoll == 0)) { + if ((player->unk_16C > 0.2f) && (player->radioDamageTimer == 0)) { + func_effect_8007A900(RAND_FLOAT_CENTERED(10.0f) + (player->pos.x - 57.0f), player->groundPos.y + 10.0f, + player->trueZpos - 10.0f, RAND_FLOAT(1.0f) + 1.5f, 255, 15, 0); } - if ((player->unk_170 > 0.2f) && (player->timer_220 == 0)) { - func_effect_8007A900(RAND_FLOAT_CENTERED(10.0f) + (player->pos.x + 57.0f), player->unk_068 + 10.0f, - player->unk_138 - 10.0f, RAND_FLOAT(1.0f) + 1.5f, 255, 15, 0); + if ((player->unk_170 > 0.2f) && (player->radioDamageTimer == 0)) { + func_effect_8007A900(RAND_FLOAT_CENTERED(10.0f) + (player->pos.x + 57.0f), player->groundPos.y + 10.0f, + player->trueZpos - 10.0f, RAND_FLOAT(1.0f) + 1.5f, 255, 15, 0); } } } } void func_tank_80045E7C(Player* player) { - player->unk_130 = Math_ModF(player->unk_130, 360.0f); - if (player->unk_1DC == 0) { - if (player->unk_130 > 0.0f) { - player->unk_130 -= player->unk_130 * 0.1f; - if (player->unk_130 < 0.1f) { - player->unk_130 = 0.0f; + player->zRotBarrelRoll = Math_ModF(player->zRotBarrelRoll, 360.0f); + if (player->barrelRoll == 0) { + if (player->zRotBarrelRoll > 0.0f) { + player->zRotBarrelRoll -= player->zRotBarrelRoll * 0.1f; + if (player->zRotBarrelRoll < 0.1f) { + player->zRotBarrelRoll = 0.0f; } } - if (player->unk_130 < 0.0f) { - player->unk_130 -= player->unk_130 * 0.1f; - if (player->unk_130 > -0.1f) { - player->unk_130 = 0.0f; + if (player->zRotBarrelRoll < 0.0f) { + player->zRotBarrelRoll -= player->zRotBarrelRoll * 0.1f; + if (player->zRotBarrelRoll > -0.1f) { + player->zRotBarrelRoll = 0.0f; } } } - if (player->timer_1E0 != 0) { - player->timer_1E0--; + if (player->barrelInputTimerL != 0) { + player->barrelInputTimerL--; } - if (player->timer_1E4 != 0) { - player->timer_1E4--; + if (player->barrelInputTimerR != 0) { + player->barrelInputTimerR--; } if (player->timer_1E8 != 0) { player->timer_1E8--; } - if (player->unk_1DC != 0) { - player->timer_1E4 = 0; - player->timer_1E0 = 0; - player->unk_130 += player->unk_1EC; - if (player->unk_12C > 0.0f) { - player->unk_12C -= 8.0f; - if (player->unk_12C < 0.0f) { - player->unk_12C = 0.0f; + if (player->barrelRoll != 0) { + player->barrelInputTimerR = 0; + player->barrelInputTimerL = 0; + player->zRotBarrelRoll += player->rollRate; + if (player->zRotBank > 0.0f) { + player->zRotBank -= 8.0f; + if (player->zRotBank < 0.0f) { + player->zRotBank = 0.0f; } } - if (player->unk_12C < 0.0f) { - player->unk_12C += 8.0f; - if (player->unk_12C > 0.0f) { - player->unk_12C = 0.0f; + if (player->zRotBank < 0.0f) { + player->zRotBank += 8.0f; + if (player->zRotBank > 0.0f) { + player->zRotBank = 0.0f; } } if (player->timer_1E8 == 0) { D_ctx_801779A8[player->num] = 25.0f; - if (player->unk_1EC > 0) { - player->unk_1EC -= 2; + if (player->rollRate > 0) { + player->rollRate -= 2; } - if (player->unk_1EC < 0) { - player->unk_1EC += 2; + if (player->rollRate < 0) { + player->rollRate += 2; } - if (player->unk_1EC == 0) { - player->unk_1DC = 0; + if (player->rollRate == 0) { + player->barrelRoll = 0; Audio_KillSfxBySourceAndId(player->sfxSource, 0x1100000A); } } - if ((player->timer_1E8 >= 5) && (player->unk_1F4 == 0) && (player->unk_1DC != 9)) { - if (player->unk_1EC > 0) { + if ((player->timer_1E8 >= 5) && (player->hitTimer == 0) && (player->barrelRoll != 9)) { + if (player->rollRate > 0) { player->unk_170 = 1.3f; } - if (player->unk_1EC < 0) { + if (player->rollRate < 0) { player->unk_16C = 1.3f; } } @@ -771,14 +771,14 @@ void func_tank_800460E0(Player* player, f32* hitboxData, f32 arg2, f32 arg3, f32 spf94.x = player->pos.x; spf94.y = arg3; - spf94.z = player->unk_138; + spf94.z = player->trueZpos; sp88.x = spf94.x - arg2; sp88.y = spf94.y - arg3; sp88.z = spf94.z - arg4; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp88, &sp7C); if (func_play_800A78C4(hitbox, arg2, arg3, arg4, sp7C.x + arg2, sp7C.y + arg3, sp7C.z + arg4)) { - player->unk_068 = arg3 + 20.0f + 3.0f; + player->groundPos.y = arg3 + 20.0f + 3.0f; } } } @@ -790,7 +790,7 @@ void func_tank_80046260(Player* player) { for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) { if ((scenery->obj.status == OBJ_ACTIVE) && (scenery->obj.id == OBJ_SCENERY_58) && - ((player->unk_138 - 2000.0f) < scenery->obj.pos.z) && (scenery->obj.pos.y < player->pos.y)) { + ((player->trueZpos - 2000.0f) < scenery->obj.pos.z) && (scenery->obj.pos.y < player->pos.y)) { func_tank_800460E0(player, scenery->info.hitbox, scenery->obj.pos.x, scenery->obj.pos.y, scenery->obj.pos.z, scenery->obj.rot.x, scenery->obj.rot.y, scenery->obj.rot.z); } @@ -806,14 +806,14 @@ void func_tank_80046358(Player* player) { s32 pad1; s32 pad2; - player->unk_064 = player->pos.x; - player->unk_06C = player->unk_138 + -20.0f; - player->unk_068 = gGroundHeight + 3.0f; + player->groundPos.x = player->pos.x; + player->groundPos.z = player->trueZpos + -20.0f; + player->groundPos.y = gGroundHeight + 3.0f; player->unk_248 = 0.0f; player->unk_24C = 0.0f; - player->unk_070 = 0.0f; - Ground_801B6E20(player->unk_064, player->unk_06C + player->unk_144, &spD4, &spD0, &spCC); - player->unk_068 = spD0 + 2.0f; + player->groundRotY = 0.0f; + Ground_801B6E20(player->groundPos.x, player->groundPos.z + player->zPath, &spD4, &spD0, &spCC); + player->groundPos.y = spD0 + 2.0f; player->unk_248 = spD4; player->unk_24C = spCC; } @@ -836,7 +836,7 @@ void func_tank_8004641C(Player* player, s32 arg1, f32 arg2, f32 arg3, f32 arg4, Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp70, &sp4C); sp70.x = player->pos.x - arg2; sp70.y = player->pos.y - arg3; - sp70.z = player->unk_138 - arg4; + sp70.z = player->trueZpos - arg4; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp70, &sp64); sp84 = sp64.x + arg2; sp80 = sp64.y + arg3; @@ -845,7 +845,7 @@ void func_tank_8004641C(Player* player, s32 arg1, f32 arg2, f32 arg3, f32 arg4, if (D_MA_801BE250[27] < arg3 + sp58.y) { D_MA_801BE250[27] = arg3 + sp58.y; if (arg1 == OBJ_SCENERY_67) { - player->unk_1DC = 0; + player->barrelRoll = 0; D_800C9F04 = 1; } } @@ -853,18 +853,18 @@ void func_tank_8004641C(Player* player, s32 arg1, f32 arg2, f32 arg3, f32 arg4, D_MA_801BE250[29] = sp58.z; } else if ((arg1 == OBJ_SCENERY_67) && (D_MA_801BE250[27] == 0.0f) && func_play_800A8054(arg1, arg2 + 20.0f, arg3, arg4, sp84, sp80, sp7C, &sp58, &sp4C)) { - player->unk_1DC = 9; + player->barrelRoll = 9; player->timer_1E8 = 15; if ((arg6 > 90.0f) && (arg6 < 270.0f)) { - player->unk_1EC = player->unk_1F0 = 20; + player->rollRate = player->baseRollRate = 20; } else { - player->unk_1EC = player->unk_1F0 = -20; + player->rollRate = player->baseRollRate = -20; } } if (func_play_800A8054(arg1, arg2, arg3, arg4, sp84, arg3, sp7C, &sp58, &sp4C) && (D_800C9F10 <= arg3 + sp58.y)) { D_800C9F10 = arg3 + sp58.y; - player->unk_064 = player->pos.x; - player->unk_068 = D_800C9F10 - 2.0f; + player->groundPos.x = player->pos.x; + player->groundPos.y = D_800C9F10 - 2.0f; player->unk_248 = sp58.x; player->unk_24C = sp58.z; } @@ -884,12 +884,12 @@ void func_tank_80046704(Player* player) { } if (1) {} for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) { - if ((scenery->obj.status == OBJ_ACTIVE) && ((player->unk_138 - 2000.0f) < scenery->obj.pos.z)) { + if ((scenery->obj.status == OBJ_ACTIVE) && ((player->trueZpos - 2000.0f) < scenery->obj.pos.z)) { if ((scenery->obj.id == OBJ_SCENERY_69) || (scenery->obj.id == OBJ_SCENERY_70) || (scenery->obj.id == OBJ_SCENERY_71) || (scenery->obj.id == OBJ_SCENERY_72) || (scenery->obj.id == OBJ_SCENERY_73) || (scenery->obj.id == OBJ_SCENERY_67)) { temp1 = scenery->obj.pos.x - player->pos.x; - temp2 = scenery->obj.pos.z - player->unk_138; + temp2 = scenery->obj.pos.z - player->trueZpos; if (sqrtf(SQ(temp1) + SQ(temp2)) < 2000.0f) { func_tank_8004641C(player, scenery->obj.id, scenery->obj.pos.x, scenery->obj.pos.y, @@ -899,11 +899,11 @@ void func_tank_80046704(Player* player) { if (((player->pos.x - 820.0f) <= scenery->obj.pos.x) && (scenery->obj.pos.x <= (player->pos.x + 820.0f)) && ((player->pos.y - 50.0f) <= scenery->obj.pos.y) && - (scenery->obj.pos.y <= (player->pos.y + 50.0f)) && (player->unk_138 <= scenery->obj.pos.z) && - (scenery->obj.pos.z <= (player->unk_138 + 960.0f))) { + (scenery->obj.pos.y <= (player->pos.y + 50.0f)) && (player->trueZpos <= scenery->obj.pos.z) && + (scenery->obj.pos.z <= (player->trueZpos + 960.0f))) { D_MA_801BE250[27] = scenery->obj.pos.y; - player->unk_064 = player->pos.x; - player->unk_068 = D_MA_801BE250[27] - 3.0f; + player->groundPos.x = player->pos.x; + player->groundPos.y = D_MA_801BE250[27] - 3.0f; } } if ((scenery->obj.id == OBJ_SCENERY_59) || (scenery->obj.id == OBJ_SCENERY_60) || @@ -922,14 +922,14 @@ void func_tank_80046704(Player* player) { case 1: case 2: Math_SmoothStepToF(&player->baseSpeed, 15.0f, 0.3f, 3.5f, 0.001f); - Math_SmoothStepToF(&player->unk_08C, 0, 0.3f, 3.5f, 0.001f); + Math_SmoothStepToF(&player->camDist, 0, 0.3f, 3.5f, 0.001f); if (temp_v0 == 1) { player->vel.x = -10.0f; } else { player->vel.x = 10.0f; } - player->pos.x = player->unk_090.x; - player->unk_0D8.x = 2.0f * D_800C9F4C[temp_v0]; + player->pos.x = player->basePos.x; + player->knockback.x = 2.0f * D_800C9F4C[temp_v0]; player->pos.x += (D_800C9F4C[temp_v0] * 5.0f); break; case 3: @@ -949,35 +949,35 @@ void func_tank_80046704(Player* player) { (scenery->obj.pos.x <= (player->pos.x + 230.0f)) && ((80.0f <= player->pos.y - scenery->obj.pos.y)) && ((player->pos.y - scenery->obj.pos.y) < 210.0f) && - ((player->unk_138 - 220.0f) <= scenery->obj.pos.z) && - (scenery->obj.pos.z <= (player->unk_138 + 220.0f))) { + ((player->trueZpos - 220.0f) <= scenery->obj.pos.z) && + (scenery->obj.pos.z <= (player->trueZpos + 220.0f))) { if (!(((player->pos.x - 210.0f) <= scenery->obj.pos.x) && (scenery->obj.pos.x <= (player->pos.x + 210.0f))) && (D_MA_801BE250[27] == 0.f) && (player->vel.y < 0.f)) { - player->unk_1DC = 9; + player->barrelRoll = 9; player->timer_1E8 = 15; if ((player->pos.x - 200.0f) <= scenery->obj.pos.x) { - player->unk_1EC = player->unk_1F0 = 20; + player->rollRate = player->baseRollRate = 20; } else { - player->unk_1EC = player->unk_1F0 = -20; + player->rollRate = player->baseRollRate = -20; } } else { D_800C9F04 = 1; D_MA_801BE250[27] = scenery->obj.pos.y + 206.0f; - player->unk_1DC = 0; + player->barrelRoll = 0; } } if (((player->pos.x - 220.0f) <= scenery->obj.pos.x) && (scenery->obj.pos.x <= (player->pos.x + 220.0f)) && - ((player->unk_138 - 220.0f) <= scenery->obj.pos.z) && - (scenery->obj.pos.z <= (player->unk_138 + 220.0f)) && (player->pos.y >= 200.0f)) { - player->unk_068 = scenery->obj.pos.y + 204.0f; + ((player->trueZpos - 220.0f) <= scenery->obj.pos.z) && + (scenery->obj.pos.z <= (player->trueZpos + 220.0f)) && (player->pos.y >= 200.0f)) { + player->groundPos.y = scenery->obj.pos.y + 204.0f; } - } else if ((scenery->obj.id == OBJ_SCENERY_105) && Macbeth_801A3C20(player->unk_138)) { + } else if ((scenery->obj.id == OBJ_SCENERY_105) && Macbeth_801A3C20(player->trueZpos)) { if (((player->pos.x - 200.0f) < D_MA_801BE250[21]) && (D_MA_801BE250[21] < (player->pos.x + 200.0f))) { - player->unk_068 = D_MA_801BE250[22] - 1.0f; + player->groundPos.y = D_MA_801BE250[22] - 1.0f; } } } @@ -1146,12 +1146,12 @@ void func_tank_80047504(Player* player) { if (gCurrentLevel != LEVEL_MACBETH) { func_play_800A8BA4(player); } else { - player->unk_064 = player->pos.x; - player->unk_06C = player->unk_138 + -10.0f; - player->unk_068 = gGroundHeight - 4.0f; + player->groundPos.x = player->pos.x; + player->groundPos.z = player->trueZpos + -10.0f; + player->groundPos.y = gGroundHeight - 4.0f; player->unk_248 = 0.0f; player->unk_24C = 0.0f; - player->unk_070 = 0.0f; + player->groundRotY = 0.0f; func_tank_800481F4(player); } if (gCurrentLevel == LEVEL_TITANIA) { @@ -1159,8 +1159,8 @@ void func_tank_80047504(Player* player) { func_tank_80046260(player); } func_play_800B415C(player); - if ((player->shields <= 0) && (player->timer_220 != 0)) { - func_play_800B41EC(player); + if ((player->shields <= 0) && (player->radioDamageTimer != 0)) { + Player_Down(player); } } @@ -1168,12 +1168,12 @@ void func_tank_80047504(Player* player) { void func_tank_80047754(Player* player) { u8 sp2F = false; - if ((D_MA_801BE2F0[5] == 0) && (Macbeth_801A3300(player, player->unk_138, player->unk_0E8) == 0)) { + if ((D_MA_801BE2F0[5] == 0) && (Macbeth_801A3300(player, player->trueZpos, player->rot.y) == 0)) { if (((player->pos.x - 110.0f) < D_MA_801BE250[9]) && (D_MA_801BE250[9] < (player->pos.x + 110.0f)) && ((player->pos.y - 60.0f) < (D_MA_801BE250[2] + 30.0f)) && ((D_MA_801BE250[2] + 30.0f) < (player->pos.y + 60.f))) { func_tank_80047D38(player, D_MA_801BE250[2] + 29.0f); - player->unk_0E4 = D_MA_801BE250[3]; + player->rot.x = D_MA_801BE250[3]; func_tank_80047FBC(player); sp2F = true; } else { @@ -1185,27 +1185,27 @@ void func_tank_80047754(Player* player) { if (1) {} } } - if (Macbeth_801A3C20(player->unk_138)) { - player->unk_0E4 = D_MA_801BE250[23]; + if (Macbeth_801A3C20(player->trueZpos)) { + player->rot.x = D_MA_801BE250[23]; if (((player->pos.x - 200.0f) < D_MA_801BE250[21]) && (D_MA_801BE250[21] < (player->pos.x + 200.0f))) { if (((player->pos.y - 60.0f) < D_MA_801BE250[22]) && (D_MA_801BE250[22] < (player->pos.y + 60.0f))) { func_tank_80047D38(player, D_MA_801BE250[22]); } else { if ((100.0f < (D_MA_801BE250[22] - player->pos.y)) && ((D_MA_801BE250[22] - player->pos.y) < 130.0f)) { - player->unk_0A0 = 999.0f; - player->pos.y = player->unk_090.y - 1.0f; + player->pathHeight = 999.0f; + player->pos.y = player->basePos.y - 1.0f; } goto label_29; } if (!(((player->pos.x - 65.0f) < D_MA_801BE250[21]) && (D_MA_801BE250[21] < (player->pos.x + 65.0f)))) { if (!(((player->pos.x - 100.0f) < D_MA_801BE250[21]) && (D_MA_801BE250[21] < (player->pos.x + 100.0f)))) { - player->unk_1D4 = 9; + player->grounded = 9; Math_SmoothStepToF(&player->pos.y, D_MA_801BE250[22] + 100.0f, 0.5f, 20.0f, 0); player->vel.y = 2.0f; - Math_SmoothStepToF(&player->unk_0E8, 0.0f, 0.5f, 20.0f, 0); + Math_SmoothStepToF(&player->rot.y, 0.0f, 0.5f, 20.0f, 0); Math_SmoothStepToF(&player->pos.x, D_MA_801BE250[21], 0.02f, 30.0f, 0); - Math_SmoothStepToF(&player->unk_12C, -30.0f, 1.0f, 10.0f, 0); + Math_SmoothStepToF(&player->zRotBank, -30.0f, 1.0f, 10.0f, 0); D_MA_801BE250[13] += 0; // fake? } player->unk_188 = 0; @@ -1221,15 +1221,15 @@ void func_tank_80047754(Player* player) { } label_29: - if (((D_MA_801BE2F0[5] == 1) || (player->unk_138 < -116467.875f)) && - (Macbeth_801A3790(player, player->unk_138, player->unk_0E8) == 0)) { + if (((D_MA_801BE2F0[5] == 1) || (player->trueZpos < -116467.875f)) && + (Macbeth_801A3790(player, player->trueZpos, player->rot.y) == 0)) { if (((player->pos.x - 110.0f) < D_MA_801BE250[19]) && (D_MA_801BE250[19] < (player->pos.x + 110.0f)) && ((player->pos.y - 60.0f) < (D_MA_801BE250[12] + 30.0f)) && ((D_MA_801BE250[12] + 30.0f) < (player->pos.y + 60.0f))) { sp2F = true; func_tank_80047D38(player, D_MA_801BE250[12] + 29.0f); - player->unk_0E4 = D_MA_801BE250[13]; // not fake, but weird - player->unk_0E4 = D_MA_801BE250[13]; + player->rot.x = D_MA_801BE250[13]; // not fake, but weird + player->rot.x = D_MA_801BE250[13]; func_tank_80047FBC(player); } else { if (((player->pos.x - 150.0f) < D_MA_801BE250[19]) && (D_MA_801BE250[19] < (player->pos.x + 150.0f)) && @@ -1247,18 +1247,19 @@ label_29: } void func_tank_80047D38(Player* player, f32 arg1) { - if ((player->unk_16C > 0.2f) && (player->unk_170 > 0.2f) && (player->timer_220 == 0) && (player->vel.y >= 0.0f)) { + if ((player->unk_16C > 0.2f) && (player->unk_170 > 0.2f) && (player->radioDamageTimer == 0) && + (player->vel.y >= 0.0f)) { return; } if ((player->pos.y - 5.0f) < arg1) { if (player->vel.y < -10.0f) { AUDIO_PLAY_SFX(0x09008015, player->sfxSource, 0); - player->unk_1F4 = 10; + player->hitTimer = 10; } D_800C9F04 = 1; - player->unk_1D4 = 1; + player->grounded = true; Math_SmoothStepToF(&player->pos.y, arg1, 0.5f, 30.0f, 0.02f); - player->unk_068 = arg1 - 1.0f; + player->groundPos.y = arg1 - 1.0f; D_800C9F00 = 0; player->vel.y = 0.0f; } @@ -1267,25 +1268,25 @@ void func_tank_80047D38(Player* player, f32 arg1) { void func_tank_80047E7C(Player* player, f32 arg1, f32 arg2) { player->unk_188 = 0.0f; if (player->pos.x < arg1) { - if (player->unk_12C >= -10.0f) { - Math_SmoothStepToF(&player->unk_12C, 30.0f, 0.5f, 20.0f, 0); + if (player->zRotBank >= -10.0f) { + Math_SmoothStepToF(&player->zRotBank, 30.0f, 0.5f, 20.0f, 0); } else { Math_SmoothStepToF(&player->pos.y, arg2, 0.5f, 30.0f, 0); - if (player->unk_1DC == 0) { - player->unk_1DC = 9; + if (player->barrelRoll == 0) { + player->barrelRoll = 9; player->timer_1E8 = 15; - player->unk_1EC = player->unk_1F0 = -20; + player->rollRate = player->baseRollRate = -20; } } } else { - if (player->unk_12C <= 10.0f) { - Math_SmoothStepToF(&player->unk_12C, -30.0f, 0.5f, 20.0f, 0); + if (player->zRotBank <= 10.0f) { + Math_SmoothStepToF(&player->zRotBank, -30.0f, 0.5f, 20.0f, 0); } else { Math_SmoothStepToF(&player->pos.y, arg2, 0.5f, 30.0f, 0); - if (player->unk_1DC == 0) { - player->unk_1DC = 9; + if (player->barrelRoll == 0) { + player->barrelRoll = 9; player->timer_1E8 = 15; - player->unk_1EC = player->unk_1F0 = 20; + player->rollRate = player->baseRollRate = 20; } } } @@ -1296,16 +1297,16 @@ void func_tank_80047FBC(Player* player) { f32 temp_fv0_2; if (!(D_800C9F08 & 1)) { - Math_SmoothStepToF(&player->unk_0EC, -((player->vel.z / 5.0f) * 4.0f), 0.4f, 8.0f, 0.01f); - if (player->unk_0EC >= 3.0f) { + Math_SmoothStepToF(&player->rot.z, -((player->vel.z / 5.0f) * 4.0f), 0.4f, 8.0f, 0.01f); + if (player->rot.z >= 3.0f) { if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) { AUDIO_PLAY_SFX(0x19000065, player->sfxSource, 0); } D_800C9F08 |= 1; } } else { - Math_SmoothStepToF(&player->unk_0EC, (player->vel.z / 5.0f) * 4.0f, 0.4f, 8.0f, 0.01f); - if (player->unk_0EC <= -3.0f) { + Math_SmoothStepToF(&player->rot.z, (player->vel.z / 5.0f) * 4.0f, 0.4f, 8.0f, 0.01f); + if (player->rot.z <= -3.0f) { D_800C9F08 &= (u8) ~1; } } @@ -1349,7 +1350,7 @@ void func_tank_800481F4(Player* player) { (scenery->obj.id != OBJ_SCENERY_68) && (scenery->obj.id != OBJ_SCENERY_70) && (scenery->obj.id != OBJ_SCENERY_72) && (scenery->obj.id != OBJ_SCENERY_71) && (scenery->obj.id != OBJ_SCENERY_73) && (scenery->obj.id != OBJ_SCENERY_74) && - (scenery->obj.id != OBJ_SCENERY_69) && ((player->unk_138 - 2000.0f) < scenery->obj.pos.z)) { + (scenery->obj.id != OBJ_SCENERY_69) && ((player->trueZpos - 2000.0f) < scenery->obj.pos.z)) { var_fv1 = scenery->obj.rot.y; if (scenery->info.action == (ObjectFunc) func_enmy_80066EA8) { var_fv1 = 0.0f; @@ -1402,30 +1403,30 @@ void func_tank_800481F4(Player* player) { actor->vwork[29].z + actor->unk_0F4.z); if (temp_v0 != 0) { Player_ApplyDamage(player, temp_v0, actor->info.damage); - actor->unk_0D0 = 3; - actor->unk_0D4 = player->num + 1; + actor->dmgType = 3; + actor->dmgSource = player->num + 1; } } else if (actor->obj.id == OBJ_ACTOR_207) { if (func_tank_80046E40(player, actor->info.hitbox, &sp98, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, actor->obj.rot.x, actor->obj.rot.y, actor->obj.rot.z, 0.0f, 0.0f, 0.0f) != 0) { if (player->pos.x < actor->obj.pos.x) { - player->unk_0D8.x = (actor->vel.z > 5.0f) ? -5.0f : -1.5f; - player->unk_1DC = 8; + player->knockback.x = (actor->vel.z > 5.0f) ? -5.0f : -1.5f; + player->barrelRoll = 8; player->timer_1E8 = 15; - player->unk_1EC = player->unk_1F0 = 20; + player->rollRate = player->baseRollRate = 20; } else { - player->unk_0D8.x = (actor->vel.z > 5.0f) ? 5.0f : 1.5f; - player->unk_1DC = 8; + player->knockback.x = (actor->vel.z > 5.0f) ? 5.0f : 1.5f; + player->barrelRoll = 8; player->timer_1E8 = 15; - player->unk_1EC = player->unk_1F0 = -20; + player->rollRate = player->baseRollRate = -20; } Math_SmoothStepToF(&player->baseSpeed, 15.0f, 0.3f, 3.5f, 0.001f); - Math_SmoothStepToF(&player->unk_08C, 0, 0.3f, 3.5f, 0.001f); + Math_SmoothStepToF(&player->camDist, 0, 0.3f, 3.5f, 0.001f); player->vel.x = 0.0f; player->vel.y = 30.0f; - player->pos.x = player->unk_090.x; - actor->unk_0D0 = 3; + player->pos.x = player->basePos.x; + actor->dmgType = 3; Player_ApplyDamage(player, 0, 5); player->timer_498 = 1; } @@ -1435,26 +1436,26 @@ void func_tank_800481F4(Player* player) { actor->fwork[29], actor->fwork[26], actor->obj.rot.z, 0.0f, 0.0f, 0.0f) != 0) { Math_SmoothStepToF(&player->baseSpeed, 15.0f, 0.3f, 3.5f, 0.001f); - Math_SmoothStepToF(&player->unk_08C, 0, 0.3f, 3.5f, 0.001f); + Math_SmoothStepToF(&player->camDist, 0, 0.3f, 3.5f, 0.001f); if (player->pos.x < (actor->fwork[23] + actor->obj.pos.x)) { - player->unk_0D8.x = (actor->vel.z > 5.0f) ? -5.0f : -1.5f; - player->unk_1DC = 8; + player->knockback.x = (actor->vel.z > 5.0f) ? -5.0f : -1.5f; + player->barrelRoll = 8; player->timer_1E8 = 15; - player->unk_1EC = player->unk_1F0 = 20; + player->rollRate = player->baseRollRate = 20; } else { - player->unk_0D8.x = (actor->vel.z > 5.0f) ? 5.0f : 1.5f; - player->unk_1DC = 8; + player->knockback.x = (actor->vel.z > 5.0f) ? 5.0f : 1.5f; + player->barrelRoll = 8; player->timer_1E8 = 15; - player->unk_1EC = player->unk_1F0 = -20; + player->rollRate = player->baseRollRate = -20; } player->vel.x = 0.0f; player->vel.y = 30.0f; - player->pos.x = player->unk_090.x; - actor->unk_0D0 = 3; + player->pos.x = player->basePos.x; + actor->dmgType = 3; if (actor->info.damage != 0) { Player_ApplyDamage(player, 0, 20); } else { - actor->unk_0D0 = -1; + actor->dmgType = -1; } } } else { @@ -1462,17 +1463,17 @@ void func_tank_800481F4(Player* player) { actor->obj.pos.z, actor->obj.rot.x, actor->obj.rot.y, actor->obj.rot.z, 0.0f, 0.0f, 0.0f); if (temp_v0 != 0) { - actor->unk_0D0 = 3; + actor->dmgType = 3; if ((actor->obj.id == OBJ_ACTOR_225) || (actor->obj.id == OBJ_ACTOR_190)) { - actor->unk_0D0 = -1; + actor->dmgType = -1; } if (actor->info.damage) { Player_ApplyDamage(player, temp_v0, actor->info.damage); if (actor->obj.id == OBJ_ACTOR_225) { - player->unk_0D8.y = 0.0f; + player->knockback.y = 0.0f; } } else { - actor->unk_0D0 = -1; + actor->dmgType = -1; } } } @@ -1480,7 +1481,7 @@ void func_tank_800481F4(Player* player) { } for (i = 0, sprite = gSprites; i < ARRAY_COUNT(gSprites); i++, sprite++) { if (sprite->obj.status == OBJ_ACTIVE) { - if ((player->unk_138 - 200.0f) < sprite->obj.pos.z) { + if ((player->trueZpos - 200.0f) < sprite->obj.pos.z) { temp_v0 = func_play_800A7974(player, sprite->info.hitbox, &sp98, sprite->obj.pos.x, sprite->obj.pos.y, sprite->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f); @@ -1488,7 +1489,7 @@ void func_tank_800481F4(Player* player) { if ((sprite->obj.id == OBJ_SPRITE_FO_POLE) || (sprite->obj.id == OBJ_SPRITE_CO_POLE) || (sprite->obj.id == OBJ_SPRITE_CO_TREE)) { sprite->unk_46 = 1; - player->unk_1F4 = 6; + player->hitTimer = 6; player->unk_21C = 0; } else if (sprite->obj.id == OBJ_SPRITE_TI_CACTUS) { sprite->unk_46 = 1; diff --git a/src/engine/fox_versus.c b/src/engine/fox_versus.c index dd38ec75..ffd9e655 100644 --- a/src/engine/fox_versus.c +++ b/src/engine/fox_versus.c @@ -322,16 +322,16 @@ void func_versus_800BDE44(void) { for (i = 0; i < 4; i++) { if ((gPlayer[i].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[i].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { - if ((D_ctx_80177C30[i] != D_80178808[i]) || (D_80178810[i])) { + if ((gPlayerScores[i] != D_80178808[i]) || (D_80178810[i] != 0)) { D_80178810[i] += 4; if (D_80178810[i] > 15) { - if (D_ctx_80177C30[i] > D_80178808[i]) { + if (gPlayerScores[i] > D_80178808[i]) { D_80178808[i] += 1; } else { D_80178808[i] -= 1; } - if (D_ctx_80177C30[i] != D_80178808[i]) { + if (gPlayerScores[i] != D_80178808[i]) { D_80178810[i] -= 15; } else { D_80178810[i] = 0; @@ -340,7 +340,7 @@ void func_versus_800BDE44(void) { } } - if (D_ctx_80177C30[i] >= D_80178808[i]) { + if (gPlayerScores[i] >= D_80178808[i]) { func_versus_800BDAA0(D_800D4B70[i], D_800D4B80[i], D_80178808[i] + 1, D_80178808[i], D_80178810[i]); } else { func_versus_800BDAA0(D_800D4B70[i], D_800D4B80[i], D_80178808[i] - 1, D_80178808[i], D_80178810[i]); @@ -660,10 +660,10 @@ s32 func_versus_800BF17C(void) { D_801787E8[i] = 32.0f; } } - gPlayer[i].unk_1D0 = 0; + gPlayer[i].csState = 0; } else { D_80178780[i] = 0; - gPlayer[i].unk_1D0 = 0; + gPlayer[i].csState = 0; if ((D_80178780[i] == 0) && (D_801787F8[i] == 0)) { if (sUnlockLandmaster && sUnlockOnFoot) { D_80178780[i] = RAND_INT(3.0f) + 1; @@ -718,9 +718,9 @@ s32 func_versus_800BF17C(void) { D_80178820[i]++; if (gVsMatchType == 2) { - D_ctx_80177C30[i] = D_80178838[i] = D_80178808[i] = D_80178810[i] = 0; + gPlayerScores[i] = D_80178838[i] = D_80178808[i] = D_80178810[i] = 0; } - gPlayer[i].unk_1D0 = 1; + gPlayer[i].csState = 1; } } } @@ -883,7 +883,7 @@ s32 Versus_CheckForWinner(void) { for (i = 0; i < 4; i++) { if ((gPlayer[i].state_1C8 == PLAYERSTATE_1C8_DOWN) || (gPlayer[i].state_1C8 == PLAYERSTATE_1C8_VS_STANDBY)) { - D_ctx_80177C30[i] = D_80178838[i] = D_80178808[i] = D_80178810[i] = 0; + gPlayerScores[i] = D_80178838[i] = D_80178808[i] = D_80178810[i] = 0; D_80178820[i] += 1; } } @@ -906,11 +906,11 @@ s32 Versus_CheckForWinner(void) { } if (i != j) { - if (D_ctx_80177C30[i] < D_ctx_80177C30[j]) { + if (gPlayerScores[i] < gPlayerScores[j]) { temp2[i] = 1; break; } - if (D_ctx_80177C30[i] == D_ctx_80177C30[j]) { + if (gPlayerScores[i] == gPlayerScores[j]) { temp = 1; } } @@ -1249,7 +1249,7 @@ bool func_versus_800C0D10(void) { cont = 0; for (i = 0; i < 4; i++) { - if (D_ctx_80177C30[i] == D_80178838[i]) { + if (gPlayerScores[i] == D_80178838[i]) { cont++; continue; } @@ -1379,7 +1379,7 @@ void func_versus_800C1368(void) { gFillScreenAlphaTarget = 0; for (i = 0; i < 4; i++) { - D_ctx_80177C30[i] = 0; + gPlayerScores[i] = 0; D_80178808[i] = 0; D_80178810[i] = 0; D_80178820[i] = 0; diff --git a/src/mods/object_ram.c b/src/mods/object_ram.c index fca77f6d..b590bfeb 100644 --- a/src/mods/object_ram.c +++ b/src/mods/object_ram.c @@ -12,7 +12,7 @@ typedef struct RamEntry { static RamEntry oRamEntries[8] = { { 1, 0, offsetof(Player, pos.x), 2, 3, 0, 0 }, { 1, 0, offsetof(Player, pos.y), 2, 3, 0, 0 }, - { 1, 0, offsetof(Player, pos.z), 2, 3, 0, 0 }, { 0, 0, offsetof(Player, unk_144), 2, 3, 0, 0 }, + { 1, 0, offsetof(Player, pos.z), 2, 3, 0, 0 }, { 0, 0, offsetof(Player, zPath), 2, 3, 0, 0 }, { 0, 0, offsetof(Player, vel.x), 2, 3, 0, 0 }, { 0, 0, offsetof(Player, vel.y), 2, 3, 0, 0 }, { 0, 0, offsetof(Player, vel.z), 2, 3, 0, 0 }, }; diff --git a/src/overlays/ovl_ending/fox_end1.c b/src/overlays/ovl_ending/fox_end1.c index b61e5059..32e39d34 100644 --- a/src/overlays/ovl_ending/fox_end1.c +++ b/src/overlays/ovl_ending/fox_end1.c @@ -1383,7 +1383,7 @@ void Ending_8018B3D8(void) { void Ending_8018B3E0(void) { } -void Ending_8018B3E8(Actor* arg0, s32 arg1) { +void Ending_8018B3E8(Actor* actor, s32 arg1) { Vec3f sp38[2] = { { 2880.0f, 860.0f, -1440.0f }, { -6000.0f, 3400.0f, 3600.0f }, @@ -1393,24 +1393,24 @@ void Ending_8018B3E8(Actor* arg0, s32 arg1) { { 0.0f, 290.0f, 0.0f }, }; - Actor_Initialize(arg0); - arg0->obj.status = OBJ_ACTIVE; - arg0->obj.id = 0; - arg0->state = arg1; - arg0->unk_0F4.x = sp20[arg1].x; - arg0->unk_0F4.y = sp20[arg1].y; - arg0->unk_0F4.z = sp20[arg1].z; - arg0->obj.pos = sp38[arg1]; + Actor_Initialize(actor); + actor->obj.status = OBJ_ACTIVE; + actor->obj.id = 0; + actor->state = arg1; + actor->unk_0F4.x = sp20[arg1].x; + actor->unk_0F4.y = sp20[arg1].y; + actor->unk_0F4.z = sp20[arg1].z; + actor->obj.pos = sp38[arg1]; if (arg1 == 0) { - arg0->obj.pos.x -= 600.0f; - arg0->obj.pos.y += 150.0f; - arg0->fwork[0] = 6.0f; + actor->obj.pos.x -= 600.0f; + actor->obj.pos.y += 150.0f; + actor->fwork[0] = 6.0f; } - arg0->scale = 1.0f; + actor->scale = 1.0f; } -void Ending_8018B52C(Actor* arg0, s32 arg1) { +void Ending_8018B52C(Actor* actor, s32 arg1) { Vec3f sp44[3] = { { -230.0f, -750.0f, -1300.0f }, { 230.0f, -240.0f, -1150.0f }, @@ -1422,31 +1422,31 @@ void Ending_8018B52C(Actor* arg0, s32 arg1) { { 180.0f, 0.0f, 0.0f }, }; - Actor_Initialize(arg0); - arg0->obj.status = OBJ_ACTIVE; - arg0->obj.id = 1; - arg0->obj.pos = sp44[arg1]; - arg0->unk_0F4.x = sp20[arg1].x; - arg0->unk_0F4.y = sp20[arg1].y; - arg0->unk_0F4.z = sp20[arg1].z; - arg0->scale = 1.0f; + Actor_Initialize(actor); + actor->obj.status = OBJ_ACTIVE; + actor->obj.id = 1; + actor->obj.pos = sp44[arg1]; + actor->unk_0F4.x = sp20[arg1].x; + actor->unk_0F4.y = sp20[arg1].y; + actor->unk_0F4.z = sp20[arg1].z; + actor->scale = 1.0f; } -void Ending_8018B624(Actor* arg0) { +void Ending_8018B624(Actor* actor) { Vec3f sp24 = { -40.0f, -560.0f, 400.0f }; Vec3f sp18 = { 0.0f, 290.0f, 0.0f }; - Actor_Initialize(arg0); - arg0->obj.status = 2; - arg0->obj.id = 2; - arg0->obj.pos = sp24; - arg0->unk_0F4.x = sp18.x; - arg0->unk_0F4.y = sp18.y; - arg0->unk_0F4.z = sp18.z; - arg0->scale = 1.0f; + Actor_Initialize(actor); + actor->obj.status = 2; + actor->obj.id = 2; + actor->obj.pos = sp24; + actor->unk_0F4.x = sp18.x; + actor->unk_0F4.y = sp18.y; + actor->unk_0F4.z = sp18.z; + actor->scale = 1.0f; } -void Ending_8018B6D8(Actor* arg0, s32 arg1) { +void Ending_8018B6D8(Actor* actor, s32 arg1) { Vec3f sp80[6] = { { -400.0f, 500.0f, -1200.0f }, { -160.0f, 500.0f, -1400.0f }, { 80.0f, 500.0f, -1600.0f }, { 320.0f, 500.0f, -1800.0f }, { 560.0f, 500.0f, -2000.0f }, { 800.0f, 500.0f, -2200.0f }, @@ -1457,21 +1457,21 @@ void Ending_8018B6D8(Actor* arg0, s32 arg1) { }; s32 sp20[6] = { 150, 157, 164, 171, 178, 185 }; - Actor_Initialize(arg0); - arg0->obj.status = OBJ_ACTIVE; - arg0->obj.id = 3; - arg0->obj.pos = sp80[arg1]; - arg0->unk_0F4.x = sp38[arg1].x; - arg0->unk_0F4.y = sp38[arg1].y; - arg0->unk_0F4.z = sp38[arg1].z; - arg0->obj.pos.x += 3200.0f; - arg0->obj.pos.z -= 200.0f; - arg0->scale = 1.0f; - arg0->fwork[1] = 1.0f; - arg0->iwork[1] = 100; - arg0->fwork[0] = 30.0f; - arg0->iwork[0] = sp20[arg1]; - arg0->unk_046 = arg1; + Actor_Initialize(actor); + actor->obj.status = OBJ_ACTIVE; + actor->obj.id = 3; + actor->obj.pos = sp80[arg1]; + actor->unk_0F4.x = sp38[arg1].x; + actor->unk_0F4.y = sp38[arg1].y; + actor->unk_0F4.z = sp38[arg1].z; + actor->obj.pos.x += 3200.0f; + actor->obj.pos.z -= 200.0f; + actor->scale = 1.0f; + actor->fwork[1] = 1.0f; + actor->iwork[1] = 100; + actor->fwork[0] = 30.0f; + actor->iwork[0] = sp20[arg1]; + actor->unk_046 = arg1; } void Ending_8018B860(void) { diff --git a/src/overlays/ovl_ending/fox_end2.c b/src/overlays/ovl_ending/fox_end2.c index 86c404d5..963ab123 100644 --- a/src/overlays/ovl_ending/fox_end2.c +++ b/src/overlays/ovl_ending/fox_end2.c @@ -1079,7 +1079,7 @@ void Ending_801926D4(void) { if (D_ctx_80177824 == 0) { D_ending_80198590 = gPlayer[0].wings; } else { - D_ending_80198590.rightState = D_ending_80198590.leftState = 2; + D_ending_80198590.rightState = D_ending_80198590.leftState = WINGSTATE_INTACT; } AUDIO_PLAY_BGM(SEQ_ID_ENDING); } diff --git a/src/overlays/ovl_i1/fox_co.c b/src/overlays/ovl_i1/fox_co.c index b6bbad73..fe6f3912 100644 --- a/src/overlays/ovl_i1/fox_co.c +++ b/src/overlays/ovl_i1/fox_co.c @@ -102,7 +102,7 @@ void Corneria_Boss292_Init(Boss292* this) { if (gLevelMode == LEVELMODE_ON_RAILS) { if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_START_360; - gPlayer[0].unk_1D0 = 0; + gPlayer[0].csState = 0; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); } @@ -174,15 +174,15 @@ void Corneria_80187AC8(Boss* boss) { if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; - gPlayer[0].unk_1D0 = gPlayer[0].timer_1F8 = 0; - gPlayer[0].unk_0E8 += gPlayer[0].unk_114; - if (gPlayer[0].unk_0E8 > 360.0f) { - gPlayer[0].unk_0E8 -= 360.0f; + gPlayer[0].csState = gPlayer[0].csTimer = 0; + gPlayer[0].rot.y += gPlayer[0].yRot_114; + if (gPlayer[0].rot.y > 360.0f) { + gPlayer[0].rot.y -= 360.0f; } - if (gPlayer[0].unk_0E8 < 0.0f) { - gPlayer[0].unk_0E8 += 360.0f; + if (gPlayer[0].rot.y < 0.0f) { + gPlayer[0].rot.y += 360.0f; } - gPlayer[0].unk_114 = 0.0f; + gPlayer[0].yRot_114 = 0.0f; } Radio_PlayMessage(gMsg_ID_2280, RCID_BOSS_CORNERIA); Boss_AwardBonus(boss); @@ -387,14 +387,14 @@ void Corneria_801887AC(Boss* boss) { if (boss->swork[3] != 1000) { sp3C.x = gPlayer[0].pos.x; sp3C.y = gPlayer[0].pos.y; - sp3C.z = gPlayer[0].unk_138; + sp3C.z = gPlayer[0].trueZpos; gPlayer[0].pos.x += RAND_FLOAT_CENTERED(300.0f); gPlayer[0].pos.y += RAND_FLOAT_CENTERED(300.0f); - gPlayer[0].unk_138 += RAND_FLOAT_CENTERED(300.0f); + gPlayer[0].trueZpos += RAND_FLOAT_CENTERED(300.0f); func_effect_8007F11C(OBJ_EFFECT_376, D_i1_8019B6D8[12], D_i1_8019B6D8[13], D_i1_8019B6D8[14], 60.0f); gPlayer[0].pos.x = sp3C.x; gPlayer[0].pos.y = sp3C.y; - gPlayer[0].unk_138 = sp3C.z; + gPlayer[0].trueZpos = sp3C.z; } boss->swork[30] = 0; break; @@ -475,7 +475,7 @@ void Corneria_80188D50(Boss* boss) { s32 temp_ft3; if (boss->swork[36] == 0) { - if (gPlayer[0].unk_1F4 != 0) { + if (gPlayer[0].hitTimer != 0) { D_i1_801997E0 = 80; } @@ -483,7 +483,7 @@ void Corneria_80188D50(Boss* boss) { D_i1_801997E0--; } else if ((gPlayer[0].pos.y < 200.0f) && (boss->state < 5) && (fabsf(boss->obj.pos.x - gPlayer[0].pos.x) < 200.0f) && - (fabsf(boss->obj.pos.z - gPlayer[0].unk_138) < 200.0f) && (gPlayer[0].unk_4D8 > 180.0f)) { + (fabsf(boss->obj.pos.z - gPlayer[0].trueZpos) < 200.0f) && (gPlayer[0].aerobaticPitch > 180.0f)) { boss->swork[36]++; D_i1_801997E0 = 20; AUDIO_PLAY_SFX(0x49008025, gDefaultSfxSource, 4); @@ -507,7 +507,7 @@ void Corneria_80188D50(Boss* boss) { break; } } - Matrix_RotateY(gCalcMatrix, (gPlayer[0].unk_114 + gPlayer[0].unk_0E8) * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, (gPlayer[0].yRot_114 + gPlayer[0].rot.y) * M_DTOR, MTXF_NEW); sp48.x = 0.0f; sp48.y = 0.0f; sp48.z = -2500.0f; @@ -519,7 +519,7 @@ void Corneria_80188D50(Boss* boss) { gItems[i].obj.id = OBJ_ITEM_1UP; gItems[i].obj.pos.x = gPlayer[0].pos.x + sp3C.x; gItems[i].obj.pos.y = gPlayer[0].pos.y + 100.0f; - gItems[i].obj.pos.z = gPlayer[0].unk_138 + sp3C.z; + gItems[i].obj.pos.z = gPlayer[0].trueZpos + sp3C.z; gItems[i].timer_4A = 8; Object_SetInfo(&gItems[i].info, gItems[i].obj.id); func_effect_8007B344(gItems[i].obj.pos.x, gItems[i].obj.pos.y, gItems[i].obj.pos.z, 5.0f, 0); @@ -581,7 +581,7 @@ void Corneria_80189058(Boss* boss) { gRadarMarks[59].pos.y = boss->obj.pos.y; gRadarMarks[59].pos.z = boss->obj.pos.z; - gRadarMarks[59].unk_10 = boss->obj.rot.y + 180.0f; + gRadarMarks[59].yRot = boss->obj.rot.y + 180.0f; Corneria_80188D50(boss); if (D_edisplay_801615D0.z > 0.0f) { if (D_edisplay_801615D0.x > 0.0f) { @@ -683,7 +683,7 @@ void Corneria_80189058(Boss* boss) { boss->unk_04C = 0; D_i1_8019B6D8[17] = gPlayer[0].pos.x; D_i1_8019B6D8[18] = gPlayer[0].pos.y; - D_i1_8019B6D8[19] = gPlayer[0].unk_138; + D_i1_8019B6D8[19] = gPlayer[0].trueZpos; if (boss->timer_050 == 0) { switch (boss->swork[31]) { case 1: @@ -722,7 +722,7 @@ void Corneria_80189058(Boss* boss) { case 1: D_i1_8019B6D8[17] = D_i1_8019B6D8[66] = gPlayer[0].pos.x; D_i1_8019B6D8[18] = gPlayer[0].pos.y; - D_i1_8019B6D8[19] = D_i1_8019B6D8[67] = gPlayer[0].unk_138; + D_i1_8019B6D8[19] = D_i1_8019B6D8[67] = gPlayer[0].trueZpos; boss->unk_04C += 2; if (boss->unk_04C >= Animation_GetFrameCount(&D_CO_602BC18)) { @@ -739,7 +739,7 @@ void Corneria_80189058(Boss* boss) { case 2: D_i1_8019B6D8[17] = D_i1_8019B6D8[66] = gPlayer[0].pos.x; D_i1_8019B6D8[18] = gPlayer[0].pos.y; - D_i1_8019B6D8[19] = D_i1_8019B6D8[67] = gPlayer[0].unk_138; + D_i1_8019B6D8[19] = D_i1_8019B6D8[67] = gPlayer[0].trueZpos; boss->unk_04C -= 4; if (boss->unk_04C < 0) { @@ -760,7 +760,7 @@ void Corneria_80189058(Boss* boss) { case 3: D_i1_8019B6D8[17] = D_i1_8019B6D8[66] = gPlayer[0].pos.x; D_i1_8019B6D8[18] = gPlayer[0].pos.y; - D_i1_8019B6D8[19] = D_i1_8019B6D8[67] = gPlayer[0].unk_138; + D_i1_8019B6D8[19] = D_i1_8019B6D8[67] = gPlayer[0].trueZpos; boss->unk_04C += 4; if (boss->unk_04C > 100) { @@ -781,7 +781,7 @@ void Corneria_80189058(Boss* boss) { case 4: D_i1_8019B6D8[17] = gPlayer[0].pos.x; D_i1_8019B6D8[18] = gPlayer[0].pos.y; - D_i1_8019B6D8[19] = gPlayer[0].unk_138; + D_i1_8019B6D8[19] = gPlayer[0].trueZpos; boss->unk_04C += 4; if (boss->unk_04C > 100) { @@ -798,7 +798,7 @@ void Corneria_80189058(Boss* boss) { if (((gGameFrameCount % 8) == 0)) { D_i1_8019B6D8[17] = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(2000.0f); D_i1_8019B6D8[18] = gPlayer[0].pos.y; - D_i1_8019B6D8[19] = gPlayer[0].unk_138 + RAND_FLOAT_CENTERED(2000.0f); + D_i1_8019B6D8[19] = gPlayer[0].trueZpos + RAND_FLOAT_CENTERED(2000.0f); } boss->fwork[12] += 0.05f; if (boss->state == 6) { @@ -1127,9 +1127,9 @@ s32 Corneria_8018AB64(Actor* actor) { void Corneria_8018ACE0(Actor* actor) { - if (actor->unk_0D0 != 0) { - actor->unk_0D0 = 0; - if (actor->unk_0D2 == 0) { + if (actor->dmgType != 0) { + actor->dmgType = 0; + if (actor->dmgPart == 0) { AUDIO_PLAY_SFX(0x29034003, actor->sfxSource, 4); func_effect_8007C120(actor->obj.pos.x, actor->obj.pos.y + 200.0f, actor->obj.pos.z, actor->vel.x, actor->vel.y, actor->vel.z, 0.1f, 20); @@ -1365,7 +1365,7 @@ void Corneria_8018B58C(Actor* actor) { RAND_FLOAT_CENTERED(20.0f), 3.0f, i + 24, RAND_INT(30.0f) + 60.0f); } - if ((fabsf(actor->obj.pos.z - gPlayer[0].unk_138) < 500.0f) && + if ((fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 500.0f) && (fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 200.0f) && (fabsf(actor->obj.pos.y - gPlayer[0].pos.y) < 200.0f)) { *gControllerRumbleTimers = 25; @@ -1483,16 +1483,16 @@ void Corneria_Boss293_Init(Boss293* this) { this->timer_050 = 354; this->health = 601; this->fwork[18] = -gArwingSpeed - 10.0f; - if (fabsf(gPlayer[0].unk_0AC) < 1.0f) { + if (fabsf(gPlayer[0].xPath) < 1.0f) { this->timer_05A = 30000; - this->obj.pos.z = (gPlayer[0].cam.eye.z - D_ctx_80177D20) - 2000.0f; + this->obj.pos.z = (gPlayer[0].cam.eye.z - gPathProgress) - 2000.0f; AUDIO_PLAY_SFX(0x31038018, this->sfxSource, 4); D_i1_8019B6D0 = 0; } else { D_i1_8019B6D0 = 1; this->obj.rot.y = 180.0f; this->fwork[6] = 800.0f; - this->obj.pos.z = gPlayer[0].unk_138 + 2000.0f; + this->obj.pos.z = gPlayer[0].trueZpos + 2000.0f; this->fwork[7] = this->obj.pos.x; this->fwork[5] = 30.0f; AUDIO_PLAY_SFX(0x31038018, this->sfxSource, 4); @@ -1587,7 +1587,7 @@ void Corneria_8018C19C(Boss* boss) { Matrix_MultVec3f(gCalcMatrix, &sp78, &sp6C); boss->vel.x = sp6C.x; boss->vel.y = sp6C.y; - boss->vel.z = sp6C.z - D_ctx_80177D08; + boss->vel.z = sp6C.z - gPathVelZ; boss->fwork[16] = 4.0f; if (((gGameFrameCount % 2) == 0)) { Matrix_MultVec3f(gCalcMatrix, &D_i1_80199914[0], &sp84[6]); @@ -1651,7 +1651,7 @@ void Corneria_8018C19C(Boss* boss) { } boss->vel.z = boss->fwork[18]; if (boss->state > 0) { - boss->fwork[3] = (gPlayer[0].cam.eye.z - D_ctx_80177D20) - 2500.0f; + boss->fwork[3] = (gPlayer[0].cam.eye.z - gPathProgress) - 2500.0f; } if (boss->state != 7) { Math_SmoothStepToF(&boss->fwork[4], boss->fwork[5], 0.1f, 2.0f, 0.00001f); @@ -1712,7 +1712,7 @@ void Corneria_8018C19C(Boss* boss) { switch (boss->state) { case 0: - boss->fwork[3] = gPlayer[0].unk_138 + 1500.0f; + boss->fwork[3] = gPlayer[0].trueZpos + 1500.0f; if (boss->timer_050 == 350) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 40); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 40); @@ -1728,7 +1728,7 @@ void Corneria_8018C19C(Boss* boss) { boss->fwork[13] = 180.0f; boss->fwork[12] = 1.5f; boss->fwork[6] = 800.0f; - boss->fwork[3] = gPlayer[0].cam.eye.z - D_ctx_80177D20 - 2500.0f; + boss->fwork[3] = gPlayer[0].cam.eye.z - gPathProgress - 2500.0f; boss->fwork[18] = -gArwingSpeed; AUDIO_PLAY_BGM(SEQ_ID_CO_BOSS_2 | SEQ_FLAG); boss->timer_050 = 40; @@ -1836,7 +1836,7 @@ void Corneria_8018C19C(Boss* boss) { } break; case 7: - boss->fwork[3] = (gPlayer[0].cam.eye.z - D_ctx_80177D20) - 4000.0f; + boss->fwork[3] = (gPlayer[0].cam.eye.z - gPathProgress) - 4000.0f; Math_SmoothStepToF(&boss->obj.pos.z, boss->fwork[3], 0.1f, 15.0f, 0.00001f); if (boss->timer_058 == 0) { @@ -1865,7 +1865,7 @@ void Corneria_8018C19C(Boss* boss) { boss->swork[6] &= 1; } if (((gGameFrameCount % 8) == 0)) { - if (fabsf(boss->obj.pos.z - gPlayer[0].unk_138) > 700.0f) { + if (fabsf(boss->obj.pos.z - gPlayer[0].trueZpos) > 700.0f) { Matrix_MultVec3f(gCalcMatrix, &D_i1_801998F0[0], &sp84[3]); effect = gEffects; @@ -1923,7 +1923,7 @@ void Corneria_8018C19C(Boss* boss) { Matrix_MultVec3f(gCalcMatrix, &sp78, &sp6C); boss->vel.x = sp6C.x; boss->vel.y = sp6C.y; - boss->vel.z = sp6C.z - D_ctx_80177D08; + boss->vel.z = sp6C.z - gPathVelZ; } break; case 8: @@ -1967,7 +1967,7 @@ void Corneria_8018C19C(Boss* boss) { Matrix_MultVec3f(gCalcMatrix, &sp78, &sp6C); boss->vel.x = sp6C.x; boss->vel.y = sp6C.y; - boss->vel.z = sp6C.z - D_ctx_80177D08; + boss->vel.z = sp6C.z - gPathVelZ; if (boss->timer_056 == 60) { Radio_PlayMessage(gMsg_ID_2295, RCID_FOX); } @@ -2075,7 +2075,7 @@ void Corneria_8018DDAC(Boss* boss) { } else { Radio_PlayMessage(gMsg_ID_7085, RCID_FALCO); } - boss->info.unk_10 = 300.0f; + boss->info.cullDistance = 300.0f; gBosses[0].fwork[14] = 25.0f; gBosses[0].fwork[15] = 0.0f; AUDIO_PLAY_SFX(0x2940C027, boss->sfxSource, 4); @@ -2168,7 +2168,7 @@ void Corneria_8018E290(Boss* boss) { } else { Radio_PlayMessage(gMsg_ID_7085, RCID_FALCO); } - boss->info.unk_10 = 300.0f; + boss->info.cullDistance = 300.0f; gBosses[0].fwork[15] = 0.0f; gBosses[0].fwork[14] = 335.0f; boss->health = 0; @@ -2260,7 +2260,7 @@ void Corneria_8018E76C(Boss* boss) { } else { Radio_PlayMessage(gMsg_ID_7085, RCID_FALCO); } - boss->info.unk_10 = 300.0f; + boss->info.cullDistance = 300.0f; gBosses[0].fwork[15] = 0.0f; gBosses[0].fwork[14] = 335.0f; boss->health = 0; @@ -2467,13 +2467,13 @@ void Corneria_8018F3BC(Scenery* scenery, f32 arg1) { scenery->unk_60 = 60.0f; Object_SetInfo(&scenery->info, scenery->obj.id); scenery->obj.pos.z = -2000.0f; - scenery->info.unk_10 = 15000.0f; + scenery->info.cullDistance = 15000.0f; } void Corneria_8018F4A4(void) { s32 i; - if (((gGameFrameCount % 16) == 0) && !(gPlayer[0].unk_1D0 < 4)) { + if (((gGameFrameCount % 16) == 0) && !(gPlayer[0].csState < 4)) { for (i = 0; i < 50; i++) { if (gScenery[i].obj.status == OBJ_FREE) { Corneria_8018F3BC(&gScenery[i], 4000.0f); @@ -2533,13 +2533,13 @@ static f32 D_i1_80199AD8[3] = { -60.0f, 60.0f, -45.0f }; void Corneria_8018F6F8(Actor* actor, s32 arg1) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = (D_i1_80199AB4[arg1] * 4.0f) + gPlayer[0].pos.x; actor->obj.pos.y = (D_i1_80199AC0[arg1] * 2.0f) + gPlayer[0].pos.y; - actor->obj.pos.z = (D_i1_80199ACC[arg1] * 3.0f) + gPlayer[0].unk_138; + actor->obj.pos.z = (D_i1_80199ACC[arg1] * 3.0f) + gPlayer[0].trueZpos; actor->vwork[20].x = D_i1_80199AB4[arg1] + gPlayer[0].pos.x; actor->vwork[20].y = gPlayer[0].pos.y; - actor->vwork[20].z = D_i1_80199ACC[arg1] + gPlayer[0].unk_138; + actor->vwork[20].z = D_i1_80199ACC[arg1] + gPlayer[0].trueZpos; actor->obj.rot.z = D_i1_80199AD8[arg1]; actor->state = 100; actor->obj.rot.y = 180.0f; @@ -2547,7 +2547,7 @@ void Corneria_8018F6F8(Actor* actor, s32 arg1) { Object_SetInfo(&actor->info, actor->obj.id); actor->unk_0C9 = 1; actor->iwork[11] = 1; - actor->info.unk_10 = 200.0f; + actor->info.cullDistance = 200.0f; AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); } @@ -2567,7 +2567,7 @@ void Corneria_LevelStart(Player* player) { if (gCsFrameCount < 815) { sp3C = player->pos.x; sp38 = player->pos.y + 15.0f; - sp34 = player->unk_138 - 20.0f; + sp34 = player->trueZpos - 20.0f; } else { if (gCsFrameCount < 1009) { sp3C = actor0->obj.pos.x; @@ -2637,19 +2637,19 @@ void Corneria_LevelStart(Player* player) { } player->vel.z = 0.0f; player->pos.z = player->pos.z; - player->unk_138 = player->pos.z + player->unk_08C; - player->unk_088 += 10.0f; - player->unk_080 = -SIN_DEG(player->unk_088) * 0.5f; - player->unk_0F4 += 3.0f; - player->unk_0F0 = SIN_DEG(player->unk_0F4) * 1.5f; + player->trueZpos = player->pos.z + player->camDist; + player->bobPhase += 10.0f; + player->yBob = -SIN_DEG(player->bobPhase) * 0.5f; + player->rockPhase += 3.0f; + player->rockAngle = SIN_DEG(player->rockPhase) * 1.5f; Corneria_8018F678(); player->wings.unk_30 = 0; - switch (player->unk_1D0) { + switch (player->csState) { case 0: gCsFrameCount = 0; - player->unk_1D0 = 1; - player->timer_1F8 = 600; + player->csState = 1; + player->csTimer = 600; player->pos.y = 6000.0f; player->pos.x = 0.1f; Corneria_8018F6F8(&gActors[0], 0); @@ -2660,10 +2660,10 @@ void Corneria_LevelStart(Player* player) { actor2->iwork[14] = 4; player->cam.eye.x = gCsCamEyeX = player->pos.x - 400.0f; gPlayer[0].cam.eye.y = gCsCamEyeY = player->pos.y + 600.0f; - player->cam.eye.z = gCsCamEyeZ = player->unk_138 + 2000.0f; + player->cam.eye.z = gCsCamEyeZ = player->trueZpos + 2000.0f; player->cam.at.x = gCsCamAtX = player->pos.x; player->cam.at.y = gCsCamAtY = player->pos.y; - player->cam.at.z = gCsCamAtZ = player->unk_138 + 300.0f; + player->cam.at.z = gCsCamAtZ = player->trueZpos + 300.0f; D_ctx_80177A48[0] = 0; D_ctx_80177A48[1] = D_ctx_80177A48[2] = 0; gFillScreenAlphaTarget = 255; @@ -2671,46 +2671,46 @@ void Corneria_LevelStart(Player* player) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; break; case 1: - if (player->timer_1F8 < 550) { + if (player->csTimer < 550) { gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 3; Math_SmoothStepToF(&D_ctx_80177A48[0], 0.01f, 1.0f, 0.0005f, 0.0f); } gCsCamEyeX = player->pos.x - 150.0f; gCsCamEyeY = player->pos.y - 70.0f; - gCsCamEyeZ = player->unk_138 + 150.0f; + gCsCamEyeZ = player->trueZpos + 150.0f; gCsCamAtX = player->pos.x; gCsCamAtY = player->pos.y; - gCsCamAtZ = player->unk_138; - if (player->timer_1F8 == 0) { - player->unk_1D0 = 2; - player->timer_1F8 = 130; + gCsCamAtZ = player->trueZpos; + if (player->csTimer == 0) { + player->csState = 2; + player->csTimer = 130; D_ctx_80177A48[0] = 0.0f; } - if (player->timer_1F8 == 315) { + if (player->csTimer == 315) { player->pos.x = 0.0f; } - if (player->timer_1F8 == 270) { + if (player->csTimer == 270) { gHideRadio = false; Radio_PlayMessage(gMsg_ID_2005, RCID_FOX); } - if (player->timer_1F8 == 180) { + if (player->csTimer == 180) { AUDIO_PLAY_SFX(0x09000007, player->sfxSource, 0); } - if (player->timer_1F8 == 120) { + if (player->csTimer == 120) { AUDIO_PLAY_SFX(0x09000013, player->sfxSource, 0); } - if ((player->timer_1F8 < 190) && (player->timer_1F8 > 150)) { + if ((player->csTimer < 190) && (player->csTimer > 150)) { Math_SmoothStepToF(&player->wings.unk_24, 2.0f, 0.2f, 0.5f, 0.0f); } - if (player->timer_1F8 < 150) { + if (player->csTimer < 150) { player->unk_204 = 0; } - if ((player->timer_1F8 < 120) && ((player->timer_1F8 % 16) == 0)) { + if ((player->csTimer < 120) && ((player->csTimer % 16) == 0)) { D_ctx_80177A48[1] = RAND_FLOAT_CENTERED(60.0f); D_ctx_80177A48[2] = RAND_FLOAT_CENTERED(60.0f); } - if (player->timer_1F8 == 0) { + if (player->csTimer == 0) { D_ctx_80177A48[1] = 0.0f; D_ctx_80177A48[2] = D_ctx_80177A48[1]; } @@ -2719,16 +2719,16 @@ void Corneria_LevelStart(Player* player) { Math_SmoothStepToF(&D_ctx_80177A48[0], 0.1f, 1.0f, 0.001f, 0.0f); gCsCamEyeX = player->pos.x - 50.0f; gCsCamEyeY = player->pos.y + 10.0f; - gCsCamEyeZ = player->unk_138 - 10.0f; + gCsCamEyeZ = player->trueZpos - 10.0f; gCsCamAtX = player->pos.x; gCsCamAtY = player->pos.y + 10.0f; - gCsCamAtZ = player->unk_138 + 10.0f; - if (player->timer_1F8 == 20) { + gCsCamAtZ = player->trueZpos + 10.0f; + if (player->csTimer == 20) { Radio_PlayMessage(gMsg_ID_2010, RCID_FOX); } - if (player->timer_1F8 == 0) { - player->unk_1D0 = 3; - player->timer_1F8 = 180; + if (player->csTimer == 0) { + player->csState = 3; + player->csTimer = 180; player->unk_004 = 0.0f; actor0->state = 0; actor2->state = 0; @@ -2742,9 +2742,9 @@ void Corneria_LevelStart(Player* player) { break; case 3: if (fabsf(Math_SmoothStepToF(&actor0->obj.pos.z, player->pos.z + 100.0f, 0.05f, 5.0f, 0.0f)) < 1.0f) { - player->unk_1D0 = 4; + player->csState = 4; D_ctx_80177A48[0] = 0.0f; - player->timer_1F8 = 190; + player->csTimer = 190; } if (gMsgCharIsPrinting && (gGameFrameCount & 2)) { player->wings.unk_30 = 5.0f; @@ -2763,14 +2763,14 @@ void Corneria_LevelStart(Player* player) { gCsCamAtX = actor0->obj.pos.x; gCsCamAtY = actor0->obj.pos.y + 10.0f; gCsCamAtZ = actor0->obj.pos.z + 10.0f; - if (player->timer_1F8 == 0) { - player->unk_1D0 = 5; - player->timer_1F8 = 5; + if (player->csTimer == 0) { + player->csState = 5; + player->csTimer = 5; } - if (player->timer_1F8 == 80) { + if (player->csTimer == 80) { Radio_PlayMessage(gMsg_ID_2020, RCID_FALCO); } - if (player->timer_1F8 < 100) { + if (player->csTimer < 100) { Math_SmoothStepToF(&actor0->fwork[19], 50.0f, 0.1f, 3.0f, 0.01f); } actor0->fwork[20] = 0.0f; @@ -2780,10 +2780,10 @@ void Corneria_LevelStart(Player* player) { break; case 5: Math_SmoothStepToF(&actor0->fwork[19], 0, 0.1f, 3.0f, 0.01f); - if (player->timer_1F8 == 0) { - player->unk_1D0 = 6; + if (player->csTimer == 0) { + player->csState = 6; D_ctx_80177A48[0] = 0.0f; - player->timer_1F8 = 190; + player->csTimer = 190; } gCsCamEyeY = actor0->obj.pos.y + 10.0f; @@ -2803,14 +2803,14 @@ void Corneria_LevelStart(Player* player) { gCsCamAtY = actor2->obj.pos.y + 10.0f; gCsCamAtZ = actor2->obj.pos.z + 10.0f; - if (player->timer_1F8 == 0) { - player->unk_1D0 = 7; - player->timer_1F8 = 190; + if (player->csTimer == 0) { + player->csState = 7; + player->csTimer = 190; D_ctx_80177A48[0] = 0.0f; actor0->obj.pos.y = player->pos.y; - actor0->obj.pos.z = player->unk_138 + 240.0f; + actor0->obj.pos.z = player->trueZpos + 240.0f; } - if (player->timer_1F8 == 80) { + if (player->csTimer == 80) { Radio_PlayMessage(gMsg_ID_2030, RCID_PEPPY); } actor2->fwork[20] = 0.0f; @@ -2826,18 +2826,18 @@ void Corneria_LevelStart(Player* player) { gCsCamAtX = actor1->obj.pos.x + 10.0f; gCsCamAtY = actor1->obj.pos.y + 10.0f; gCsCamAtZ = actor1->obj.pos.z + 10.0f; - if (player->timer_1F8 == 0) { - player->unk_1D0 = 8; + if (player->csTimer == 0) { + player->csState = 8; D_ctx_80177A48[0] = 0.0f; - player->timer_1F8 = 300; + player->csTimer = 300; D_ctx_80177A48[8] = 50.0f; D_ctx_80177A48[3] = 0.0f; } - if (player->timer_1F8 == 80) { + if (player->csTimer == 80) { Radio_PlayMessage(gMsg_ID_2040, RCID_SLIPPY); player->pos.x = 0.1f; } - if (player->timer_1F8 < 100) { + if (player->csTimer < 100) { Math_SmoothStepToF(&actor1->fwork[19], -20.0f, 0.1f, 3.0f, 0.01f); } actor1->fwork[20] = 0.0f; @@ -2847,60 +2847,60 @@ void Corneria_LevelStart(Player* player) { break; case 8: Math_SmoothStepToF(&D_ctx_80177A48[0], 0.1f, 1.0f, 0.001f, 0.0f); - if (player->timer_1F8 < 150) { + if (player->csTimer < 150) { D_ctx_80177A48[3] += player->unk_004; Math_SmoothStepToF(&player->unk_004, 2.0f, 1.0f, 0.2f, 0.0f); } gCsCamEyeX = player->pos.x; - gCsCamEyeZ = (player->unk_138 - 600.0f) + D_ctx_80177A48[3]; + gCsCamEyeZ = (player->trueZpos - 600.0f) + D_ctx_80177A48[3]; gCsCamEyeY = player->pos.y + D_ctx_80177A48[8]; gCsCamAtX = player->pos.x; gCsCamAtY = player->pos.y + 20.0f; - gCsCamAtZ = player->unk_138 + 100.0f; - if (player->timer_1F8 < 100) { + gCsCamAtZ = player->trueZpos + 100.0f; + if (player->csTimer < 100) { Math_SmoothStepToF(&D_ctx_80177A48[8], 10.0f, 0.1f, 0.7f, 0.0f); } - if (player->timer_1F8 == 200) { + if (player->csTimer == 200) { Radio_PlayMessage(gMsg_ID_2050, RCID_FOX); } player->wings.unk_30 = 0.0f; if (gMsgCharIsPrinting && (gGameFrameCount & 2)) { player->wings.unk_30 = 5.0f; } - if (player->timer_1F8 == 80) { + if (player->csTimer == 80) { actor0->fwork[29] = 5.0f; } - if (player->timer_1F8 == 60) { + if (player->csTimer == 60) { actor1->fwork[29] = 5.0f; } - if (player->timer_1F8 == 40) { + if (player->csTimer == 40) { actor2->fwork[29] = 5.0f; } - if ((player->timer_1F8 > 70) && (player->timer_1F8 < 80)) { + if ((player->csTimer > 70) && (player->csTimer < 80)) { actor0->iwork[11] = 2; } - if ((player->timer_1F8 > 50) && (player->timer_1F8 < 60)) { + if ((player->csTimer > 50) && (player->csTimer < 60)) { actor1->iwork[11] = 2; } - if ((player->timer_1F8 > 30) && (player->timer_1F8 < 40)) { + if ((player->csTimer > 30) && (player->csTimer < 40)) { actor2->iwork[11] = 2; } - if (player->timer_1F8 == 70) { + if (player->csTimer == 70) { actor0->state = 1; func_play_800A6028(player->sfxSource, 0x09000002); } - if (player->timer_1F8 == 50) { + if (player->csTimer == 50) { actor1->state = 2; func_play_800A6028(player->sfxSource, 0x09000002); } - if (player->timer_1F8 == 30) { + if (player->csTimer == 30) { actor2->state = 3; func_play_800A6028(player->sfxSource, 0x09000002); } - if (player->timer_1F8 == 0) { - player->unk_1D0 = 9; + if (player->csTimer == 0) { + player->csState = 9; func_play_800A6028(player->sfxSource, 0x09000002); - player->timer_1F8 = 3; + player->csTimer = 3; player->unk_194 = 5.0f; player->unk_190 = 5.0f; } @@ -2908,13 +2908,13 @@ void Corneria_LevelStart(Player* player) { case 9: gCsCamEyeX = player->pos.x; gCsCamEyeY = player->pos.y; - gCsCamEyeZ = player->unk_138 + 1000.0f; + gCsCamEyeZ = player->trueZpos + 1000.0f; gCsCamAtX = player->pos.x; gCsCamAtY = player->pos.y; - gCsCamAtZ = player->unk_138 + 1100.0f; + gCsCamAtZ = player->trueZpos + 1100.0f; D_ctx_80177A48[0] = 0.03f; player->unk_190 = 2.0f; - if (player->timer_1F8 == 0) { + if (player->csTimer == 0) { gFillScreenAlphaTarget = 255; gFillScreenAlphaStep = 48; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; @@ -2931,25 +2931,25 @@ void Corneria_LevelStart(Player* player) { player->cam.eye.y = (player->pos.y * player->unk_148) + 50.0f; player->cam.eye.z = 30.0f; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; - player->unk_1D0 = 0; + player->csState = 0; player->cam.at.x = player->pos.x; player->cam.at.y = (player->pos.y * player->unk_148) + 20.0f; - player->cam.at.z = player->unk_138; + player->cam.at.z = player->trueZpos; D_ctx_80177950 = 1.0f; gPlayerGlareAlphas[0] = gPlayerGlareAlphas[1] = gPlayerGlareAlphas[2] = gPlayerGlareAlphas[3] = 0; gLoadLevelObjects = 1; gFillScreenAlphaTarget = 0; - player->timer_1F8 = 15; + player->csTimer = 15; } break; case 10: break; } Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 20000.0f, 0.0f); - Math_SmoothStepToF(&player->cam.eye.y, player->unk_080 + gCsCamEyeY, D_ctx_80177A48[0], 20000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.y, player->yBob + gCsCamEyeY, D_ctx_80177A48[0], 20000.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 20000.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 20000.0f, 0.0f); - Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY - player->unk_080, D_ctx_80177A48[0], 20000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY - player->yBob, D_ctx_80177A48[0], 20000.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 20000.0f, 0.0f); Math_SmoothStepToF(&player->wings.unk_04, D_ctx_80177A48[1], 0.2f, 1.0f, 0.0f); Math_SmoothStepToF(&player->wings.unk_0C, D_ctx_80177A48[2], 0.2f, 1.0f, 0.0f); @@ -2987,7 +2987,7 @@ void Corneria_80190F74(Actor* actor, s32 arg1) { Vec3f sp38; Player* player = &gPlayer[0]; - Matrix_RotateY(gCalcMatrix, player->unk_0E8 * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, player->rot.y * M_DTOR, MTXF_NEW); sp5C.x = D_i1_80199AE4[arg1]; sp5C.y = D_i1_80199AF0[arg1]; sp5C.z = D_i1_80199AFC[arg1]; @@ -3009,7 +3009,7 @@ void Corneria_80190F74(Actor* actor, s32 arg1) { actor->vel.y = player->vel.y; actor->vel.z = player->vel.z; actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.rot.z = D_i1_80199B2C[arg1]; Object_SetInfo(&actor->info, actor->obj.id); actor->iwork[11] = 1; @@ -3027,12 +3027,12 @@ void Corneria_LevelComplete1(Player* player) { f32 temp_deg; player->wings.unk_04 = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = 0.0f; - Math_SmoothStepToF(&player->unk_130, 0.0f, 0.1f, 15.0f, 0.0f); - Math_SmoothStepToF(&player->unk_12C, 0.0f, 0.1f, 15.0f, 0.0f); + Math_SmoothStepToF(&player->zRotBarrelRoll, 0.0f, 0.1f, 15.0f, 0.0f); + Math_SmoothStepToF(&player->zRotBank, 0.0f, 0.1f, 15.0f, 0.0f); Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f); - Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 20.0f, 0.0f); + Math_SmoothStepToAngle(&player->aerobaticPitch, 0.0f, 0.1f, 20.0f, 0.0f); Math_SmoothStepToF(&player->boostSpeed, 0.0f, 0.1f, 3.0f, 0.0f); - if (player->unk_1D0 >= 3) { + if (player->csState >= 3) { player->cam.eye.y += 3.0f; player->cam.at.y += 3.0f; player->pos.y += 3.0f; @@ -3043,7 +3043,7 @@ void Corneria_LevelComplete1(Player* player) { gBgColor = 0x845; // 8, 8, 32 - switch (player->unk_1D0) { + switch (player->csState) { case 0: Audio_StopSfxByBankAndSource(1, player->sfxSource); sp54 = player->cam.eye.x - D_i1_8019B6D8[62]; @@ -3051,16 +3051,16 @@ void Corneria_LevelComplete1(Player* player) { D_ctx_80177A48[0] = Math_RadToDeg(Math_Atan2F(sp54, sp4C)); D_ctx_80177A48[1] = sqrtf(SQ(sp54) + SQ(sp4C)); - player->unk_1D0++; + player->csState++; D_ctx_80177A48[5] = 0.0f; D_ctx_80177A48[4] = D_ctx_80177A48[5]; D_ctx_80177A48[2] = D_ctx_80177A48[5]; /* fallthrough */ case 1: - Math_SmoothStepToF(&player->unk_0E4, 0.0f, 0.1f, 5.0f, 0.0f); + Math_SmoothStepToF(&player->rot.x, 0.0f, 0.1f, 5.0f, 0.0f); Math_SmoothStepToF(&player->pos.y, 400.0f, 0.05f, 3.0f, 0.0f); Math_SmoothStepToF(&D_ctx_80177A48[1], 1300.0f, 0.05f, 1000.0f, 0.0f); - if (player->unk_0E8 > 180.0f) { + if (player->rot.y > 180.0f) { D_ctx_80177A48[0] += 0.5f; } else { D_ctx_80177A48[0] -= 0.5f; @@ -3080,25 +3080,25 @@ void Corneria_LevelComplete1(Player* player) { temp_fa1 = player->pos.z - D_i1_8019B6D8[64]; if (gCsFrameCount < 30) { temp_deg = Math_RadToDeg(-Math_Atan2F(temp_fa0, temp_fa1)); - var_fv1 = Math_SmoothStepToAngle(&player->unk_0E8, temp_deg, 0.5f, 4.0f, 0.0001f) * 20.0f; + var_fv1 = Math_SmoothStepToAngle(&player->rot.y, temp_deg, 0.5f, 4.0f, 0.0001f) * 20.0f; } else { temp_deg = Math_RadToDeg(Math_Atan2F(temp_fa0, temp_fa1)); - var_fv1 = Math_SmoothStepToAngle(&player->unk_0E8, temp_deg, 0.5f, 2.0f, 0.0001f) * 30.0f; + var_fv1 = Math_SmoothStepToAngle(&player->rot.y, temp_deg, 0.5f, 2.0f, 0.0001f) * 30.0f; } - Math_SmoothStepToAngle(&player->unk_0EC, var_fv1, 0.1f, 5.0f, 0.0001f); + Math_SmoothStepToAngle(&player->rot.z, var_fv1, 0.1f, 5.0f, 0.0001f); if (gCsFrameCount == 220) { - player->unk_1D0++; + player->csState++; } break; case 2: - Math_SmoothStepToAngle(&player->unk_0E4, 20.0f, 0.1f, 0.5f, 0.0001f); - Math_SmoothStepToAngle(&player->unk_0EC, 0.0f, 0.1f, 1.0f, 0.0001f); + Math_SmoothStepToAngle(&player->rot.x, 20.0f, 0.1f, 0.5f, 0.0001f); + Math_SmoothStepToAngle(&player->rot.z, 0.0f, 0.1f, 1.0f, 0.0001f); Math_SmoothStepToF(&D_ctx_80177A48[2], 0.05f, 1.0f, 0.005f, 0.0001f); Math_SmoothStepToF(&player->cam.at.x, player->pos.x, D_ctx_80177A48[2], 500.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.y, player->pos.y, D_ctx_80177A48[2], 500.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.z, player->pos.z, D_ctx_80177A48[2], 500.0f, 0.0f); if (gCsFrameCount == 350) { - player->unk_1D0++; + player->csState++; D_ctx_80177A48[2] = 0.0f; D_ctx_80177A48[3] = 0.05f; } @@ -3107,12 +3107,12 @@ void Corneria_LevelComplete1(Player* player) { if ((gCsFrameCount > 700) && (gCsFrameCount < 1000)) { func_demo_8004AA84(); } - Math_SmoothStepToAngle(&player->unk_0E4, 20.0f, 0.1f, 0.5f, 0); - Math_SmoothStepToAngle(&player->unk_0EC, 0.0f, 0.1f, 1.0f, 0); + Math_SmoothStepToAngle(&player->rot.x, 20.0f, 0.1f, 0.5f, 0); + Math_SmoothStepToAngle(&player->rot.z, 0.0f, 0.1f, 1.0f, 0); Math_SmoothStepToF(&player->baseSpeed, 0.0f, 0.1f, 2.0f, 0.0f); Math_SmoothStepToF(&D_ctx_80177A48[2], 0.1f, 1.0f, 0.002f, 0); Math_SmoothStepToF(&D_ctx_80177A48[3], 0.1f, 1.0f, 0.002f, 0); - Matrix_RotateY(gCalcMatrix, player->unk_0E8 * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, player->rot.y * M_DTOR, MTXF_NEW); Matrix_Push(&gCalcMatrix); Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[5] * M_DTOR, MTXF_APPLY); sp64.x = 0.0f; @@ -3142,7 +3142,7 @@ void Corneria_LevelComplete1(Player* player) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); - player->unk_1D0++; + player->csState++; player->baseSpeed = 2.0f; player->unk_194 = 5.0f; player->unk_190 = 5.0f; @@ -3151,9 +3151,9 @@ void Corneria_LevelComplete1(Player* player) { case 4: if (gCsFrameCount >= 1270) { player->baseSpeed *= 1.2f; - player->unk_25C += 0.04f; - if (player->unk_25C > 0.6f) { - player->unk_25C = 0.6f; + player->contrailScale += 0.04f; + if (player->contrailScale > 0.6f) { + player->contrailScale = 0.6f; } player->unk_190 = 2.0f; } @@ -3166,7 +3166,7 @@ void Corneria_LevelComplete1(Player* player) { gFillScreenAlphaStep = 8; if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; - player->timer_1F8 = 0; + player->csTimer = 0; gFadeoutType = 4; gLeveLClearStatus[gCurrentLevel] = Play_CheckMedalStatus(150) + 1; } @@ -3251,8 +3251,8 @@ void Corneria_LevelComplete1(Player* player) { } break; } - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -((player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->rot.x + player->aerobaticPitch) * M_DTOR), MTXF_APPLY); sp64.x = 0.0f; sp64.y = 0.0f; sp64.z = player->baseSpeed + player->boostSpeed; @@ -3263,10 +3263,10 @@ void Corneria_LevelComplete1(Player* player) { player->pos.x += player->vel.x; player->pos.y += player->vel.y; player->pos.z += player->vel.z; - player->unk_138 = player->pos.z; - player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; - player->unk_088 += 10.0f; - player->unk_080 = -SIN_DEG(player->unk_088) * 0.3f; - player->unk_0F4 += 8.0f; - player->unk_0F0 = SIN_DEG(player->unk_0F4); + player->trueZpos = player->pos.z; + player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; + player->bobPhase += 10.0f; + player->yBob = -SIN_DEG(player->bobPhase) * 0.3f; + player->rockPhase += 8.0f; + player->rockAngle = SIN_DEG(player->rockPhase); } diff --git a/src/overlays/ovl_i1/fox_tr.c b/src/overlays/ovl_i1/fox_tr.c index 1b186852..a7973567 100644 --- a/src/overlays/ovl_i1/fox_tr.c +++ b/src/overlays/ovl_i1/fox_tr.c @@ -21,14 +21,14 @@ void Training_ItemRing_Update(ItemTrainingRing* this) { switch (this->state) { case 0: this->obj.rot.z += 1.0f; - Math_SmoothStepToF(&this->scale, 1.0f, 1.0f, 0.05f, 0.0f); + Math_SmoothStepToF(&this->width, 1.0f, 1.0f, 0.05f, 0.0f); if ((this->unk_44 == 0) && !gPlayer[0].somersault) { if (this->obj.rot.y == 0.0f) { var_fv0 = 550.0f; } else { var_fv0 = 1000.0f; } - if (this->obj.pos.z > (gPlayer[0].unk_138 + var_fv0)) { + if (this->obj.pos.z > (gPlayer[0].trueZpos + var_fv0)) { this->unk_44 = 1; PRINTF("♪:リング未通過音\n"); // Ring not passed sound AUDIO_PLAY_SFX(0x4900402F, gDefaultSfxSource, 4); @@ -38,7 +38,7 @@ void Training_ItemRing_Update(ItemTrainingRing* this) { if (this->collected) { this->state = 1; this->timer_48 = 50; - this->info.unk_10 = 10000.0f; + this->info.cullDistance = 10000.0f; PRINTF("♪:リング通過音\n"); // Ring passing sound AUDIO_PLAY_SFX(0x49008025, gDefaultSfxSource, 4); gRingPassCount++; @@ -51,9 +51,9 @@ void Training_ItemRing_Update(ItemTrainingRing* this) { this->obj.pos.x += ((gPlayer[this->playerNum].pos.x - this->obj.pos.x) * 0.05f); this->obj.pos.y += ((gPlayer[this->playerNum].pos.y - this->obj.pos.y) * 0.05f); if (gPlayer[0].cockpitView) { - this->obj.pos.z += (gPlayer[this->playerNum].unk_138 - 300.0f - this->obj.pos.z) * 0.05f; + this->obj.pos.z += (gPlayer[this->playerNum].trueZpos - 300.0f - this->obj.pos.z) * 0.05f; } else { - this->obj.pos.z += ((gPlayer[this->playerNum].unk_138 - this->obj.pos.z) * 0.05f); + this->obj.pos.z += ((gPlayer[this->playerNum].trueZpos - this->obj.pos.z) * 0.05f); } this->obj.rot.z += 22.0f; Math_SmoothStepToAngle(&this->obj.rot.y, Math_RadToDeg(-gPlayer[this->playerNum].camYaw), 0.2f, 10.0f, diff --git a/src/overlays/ovl_i1/fox_tr360.c b/src/overlays/ovl_i1/fox_tr360.c index 8dcedd49..b9cabfc7 100644 --- a/src/overlays/ovl_i1/fox_tr360.c +++ b/src/overlays/ovl_i1/fox_tr360.c @@ -154,7 +154,7 @@ void Training_80199024(Actor* actor) { radarMark->pos.x = actor->obj.pos.x; radarMark->pos.y = actor->obj.pos.y; radarMark->pos.z = actor->obj.pos.z; - radarMark->unk_10 = actor->unk_0F4.y + 180.0f; + radarMark->yRot = actor->unk_0F4.y + 180.0f; if (actor->iwork[8] != 0) { actor->iwork[8]--; } @@ -217,22 +217,22 @@ void Training_8019949C(void) { } } - if (D_ctx_80177C78 != 0) { - D_ctx_80177C78--; + if (gTraining360MsgTimer != 0) { + gTraining360MsgTimer--; } - if (D_ctx_80177C78 == 0) { - if (D_i1_8019AE50[D_ctx_80177C8C].msg == 0) { - D_ctx_80177C8C = 1; + if (gTraining360MsgTimer == 0) { + if (D_i1_8019AE50[gTraining360MsgIndex].msg == 0) { + gTraining360MsgIndex = 1; } - if (D_i1_8019AE50[D_ctx_80177C8C].unk != 0) { - Radio_PlayMessage(D_i1_8019AE50[D_ctx_80177C8C].msg, RCID_TR); - D_ctx_80177C78 = D_i1_8019AE50[D_ctx_80177C8C].unk; + if (D_i1_8019AE50[gTraining360MsgIndex].unk != 0) { + Radio_PlayMessage(D_i1_8019AE50[gTraining360MsgIndex].msg, RCID_TR); + gTraining360MsgTimer = D_i1_8019AE50[gTraining360MsgIndex].unk; } else { gCallTimer = 80; - D_ctx_80177C78 = 320; + gTraining360MsgTimer = 320; } - D_ctx_80177C8C++; + gTraining360MsgIndex++; } if ((gCallTimer != 0) && (gControllerPress[gMainController].button & R_CBUTTONS)) { diff --git a/src/overlays/ovl_i1/fox_ve1.c b/src/overlays/ovl_i1/fox_ve1.c index 79d882dc..5da5e486 100644 --- a/src/overlays/ovl_i1/fox_ve1.c +++ b/src/overlays/ovl_i1/fox_ve1.c @@ -339,8 +339,8 @@ void Venom1_80192518(Actor* actor) { f32 temp_fv1_2; Effect* effect; - if (actor->unk_0D0 == 1) { - actor->unk_0D0 = 0; + if (actor->dmgType == 1) { + actor->dmgType = 0; func_effect_8007A6F0(&actor->obj.pos, 0x29121007); } @@ -621,8 +621,8 @@ void Venom1_80192CB0(Actor* actor) { } void Venom1_80192CD4(Actor* actor) { - if (actor->unk_0D0 == 1) { - actor->unk_0D0 = 0; + if (actor->dmgType == 1) { + actor->dmgType = 0; func_effect_8007A6F0(&actor->obj.pos, 0x29121007); } @@ -763,8 +763,8 @@ void Venom1_80192EB0(Actor* actor) { } break; } - if (actor->unk_0D0 == 1) { - actor->unk_0D0 = 0; + if (actor->dmgType == 1) { + actor->dmgType = 0; func_effect_8007A6F0(&actor->obj.pos, 0x29121007); } actor->iwork[0]++; @@ -778,8 +778,8 @@ void Venom1_801933B4(Actor* actor) { void Venom1_801933DC(Actor* actor) { f32* hitboxData; - if (actor->unk_0D0 == 1) { - actor->unk_0D0 = 0; + if (actor->dmgType == 1) { + actor->dmgType = 0; AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 0); } @@ -804,7 +804,7 @@ void Venom1_801934D0(Actor* actor) { } void Venom1_80193540(Scenery* scenery) { - if (((gPlayer[0].unk_138 - scenery->obj.pos.z) <= 3500.0f) && ((gGameFrameCount % 4) == 0)) { + if (((gPlayer[0].trueZpos - scenery->obj.pos.z) <= 3500.0f) && ((gGameFrameCount % 4) == 0)) { func_effect_8007C120(scenery->obj.pos.x, scenery->obj.pos.y, scenery->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.2f, 10); } } @@ -1672,10 +1672,10 @@ void Venom1_80194398(Boss* boss) { } switch (boss->swork[6]) { case 0: - temp_fs0 = gPlayer[0].unk_138 + boss->fwork[2]; + temp_fs0 = gPlayer[0].trueZpos + boss->fwork[2]; if (boss->swork[15] == 0) { if (boss->obj.pos.z >= temp_fs0) { - if (boss->obj.pos.z > (gPlayer[0].unk_138 - 200.0f)) { + if (boss->obj.pos.z > (gPlayer[0].trueZpos - 200.0f)) { var_fv0 = Math_SmoothStepToF(&boss->obj.pos.z, temp_fs0, 0.5f, 35.0f, 0.01f); } else { var_fv0 = Math_SmoothStepToF(&boss->obj.pos.z, temp_fs0, 0.4f, 10.0f, 0.01f); @@ -1742,7 +1742,7 @@ void Venom1_80194398(Boss* boss) { boss->fwork[11] = 0.8f; } } - temp_fs0 = gPlayer[0].unk_138 + boss->fwork[2] - boss->obj.pos.z; + temp_fs0 = gPlayer[0].trueZpos + boss->fwork[2] - boss->obj.pos.z; if ((fabsf(temp_fs0) <= 70.0f) && (boss->state == 3)) { boss->swork[5] = D_i1_8019AD2C[4].unk_0[0].unk_0; boss->swork[4] = boss->swork[4]; @@ -2221,7 +2221,7 @@ void Venom1_80194398(Boss* boss) { if (actor->obj.status == OBJ_FREE) { while ((is3 <= boss->swork[22]) && - ((temp_fs0 + D_i1_80199CD0[is4][is3].z) >= (var_fv0 + gPlayer[0].unk_138))) { + ((temp_fs0 + D_i1_80199CD0[is4][is3].z) >= (var_fv0 + gPlayer[0].trueZpos))) { is3++; } if (is3 <= boss->swork[22]) { @@ -2368,7 +2368,7 @@ void Venom1_801985E4(Boss* boss) { boss->state = boss->swork[9]; } -void Venom1_8019864C(PlayerShot* playerShot) { +void Venom1_8019864C(PlayerShot* shot) { s32 i; s32 j; s32 count; @@ -2382,7 +2382,7 @@ void Venom1_8019864C(PlayerShot* playerShot) { boss = gBosses; for (i = 0; i < 4; i++, boss++) { if ((boss->obj.id == OBJ_BOSS_319) && (boss->obj.status == OBJ_ACTIVE) && (boss->timer_05A == 0)) { - temp_fs1 = playerShot->unk_44 * 30.0f; + temp_fs1 = shot->scale * 30.0f; hitboxData = boss->info.hitbox; count = *hitboxData++; if (count != 0) { @@ -2392,9 +2392,9 @@ void Venom1_8019864C(PlayerShot* playerShot) { Matrix_RotateX(gCalcMatrix, -boss->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, -boss->obj.rot.y * M_DTOR, MTXF_APPLY); - sp88.x = playerShot->obj.pos.x - boss->obj.pos.x; - sp88.y = playerShot->obj.pos.y - boss->obj.pos.y; - sp88.z = playerShot->obj.pos.z - boss->obj.pos.z; + sp88.x = shot->obj.pos.x - boss->obj.pos.x; + sp88.y = shot->obj.pos.y - boss->obj.pos.y; + sp88.z = shot->obj.pos.z - boss->obj.pos.z; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp88, &sp78); diff --git a/src/overlays/ovl_i2/fox_me.c b/src/overlays/ovl_i2/fox_me.c index aa1f4bbe..30d3b236 100644 --- a/src/overlays/ovl_i2/fox_me.c +++ b/src/overlays/ovl_i2/fox_me.c @@ -44,8 +44,8 @@ Vec3f D_i2_80195610[] = { }; void Meteo_80187530(Actor* actor) { - if (actor->unk_0D0 == 1) { - actor->unk_0D0 = 0; + if (actor->dmgType == 1) { + actor->dmgType = 0; func_effect_8007A6F0(&actor->obj.pos, 0x2902107D); } } @@ -53,8 +53,8 @@ void Meteo_80187530(Actor* actor) { void Meteo_8018756C(Actor* actor) { Vec3f vec; - if (actor->unk_0D0 != 0) { - actor->unk_0D0 = 0; + if (actor->dmgType != 0) { + actor->dmgType = 0; actor->health -= actor->damage; if (actor->health <= 0) { actor->obj.status = OBJ_DYING; @@ -95,7 +95,7 @@ void Meteo_80187650(Actor* actor) { func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 6.0f); } - if (actor->unk_0D0 != 0) { + if (actor->dmgType != 0) { func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f); Object_Kill(&actor->obj, actor->sfxSource); @@ -132,7 +132,7 @@ void Meteo_801877C4(Actor* actor) { actor->obj.pos.x = actor->fwork[0] + sp44.x; actor->obj.pos.y = actor->fwork[1] + sp44.y; - if (actor->unk_0D0 != 0) { + if (actor->dmgType != 0) { Actor_Despawn(actor); func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); Object_Kill(&actor->obj, actor->sfxSource); @@ -142,7 +142,7 @@ void Meteo_801877C4(Actor* actor) { if (actor->timer_0BC == 0) { actor->timer_0BC = 40; - if (actor->obj.pos.z < (gPlayer[0].unk_138 - 1000.0f)) { + if (actor->obj.pos.z < (gPlayer[0].trueZpos - 1000.0f)) { func_effect_8007F11C(OBJ_EFFECT_353, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 120.0f); } } @@ -155,7 +155,7 @@ void Meteo_8018795C(Actor* actor) { actor->obj.rot.y += 7.0f; actor->obj.rot.x += 3.3f; - if (actor->unk_0D0 != 0) { + if (actor->dmgType != 0) { Actor_Despawn(actor); func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); Object_Kill(&actor->obj, actor->sfxSource); @@ -191,7 +191,7 @@ void Meteo_80187B08(Actor* actor) { func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 6.0f); } - if ((actor->unk_0D0 != 0) || (actor->timer_0BC == 0)) { + if ((actor->dmgType != 0) || (actor->timer_0BC == 0)) { func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); Object_Kill(&actor->obj, actor->sfxSource); func_effect_8007D0E0(actor->obj.pos.x - actor->vel.x, actor->obj.pos.y, actor->obj.pos.z - actor->vel.z, 8.0f); @@ -444,7 +444,7 @@ void Meteo_80188344(Boss* boss) { 20.0f, 30); boss->state = 5; - boss->info.unk_10 = 1000.0f; + boss->info.cullDistance = 1000.0f; Audio_KillSfxBySourceAndId(boss->sfxSource, 0x3103605B); AUDIO_PLAY_SFX(0x3102405D, boss->sfxSource, 4); @@ -933,7 +933,7 @@ void Meteo_8018978C(Boss* boss) { if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; - gPlayer[0].unk_1D0 = 0; + gPlayer[0].csState = 0; gCsFrameCount = 0; } @@ -947,7 +947,7 @@ void Meteo_8018978C(Boss* boss) { } } - sp7C = boss->obj.pos.z + D_ctx_80177D20; + sp7C = boss->obj.pos.z + gPathProgress; if (boss->state >= 3) { if (boss->state < 20) { @@ -1085,7 +1085,7 @@ void Meteo_8018978C(Boss* boss) { boss->swork[1] = 10; boss->obj.pos.y += ((0.0f - boss->obj.pos.y) * boss->fwork[1]); - boss->vel.z = boss->fwork[0] - D_ctx_80177D08; + boss->vel.z = boss->fwork[0] - gPathVelZ; if (sp7C < boss->fwork[9]) { boss->state = 1; @@ -1101,7 +1101,7 @@ void Meteo_8018978C(Boss* boss) { case 1: boss->obj.pos.y += ((0.0f - boss->obj.pos.y) * boss->fwork[1]); - boss->vel.z = boss->fwork[0] - D_ctx_80177D08; + boss->vel.z = boss->fwork[0] - gPathVelZ; if (boss->fwork[0] < 0.0f) { boss->fwork[0] += 0.5f; @@ -1119,7 +1119,7 @@ void Meteo_8018978C(Boss* boss) { case 2: boss->obj.pos.y += ((0.0f - boss->obj.pos.y) * boss->fwork[1]); - boss->vel.z = boss->fwork[0] - D_ctx_80177D08; + boss->vel.z = boss->fwork[0] - gPathVelZ; if (boss->fwork[1] < 0.05f) { boss->fwork[1] = boss->fwork[1] + 0.0004f; @@ -1775,16 +1775,16 @@ void Meteo_8018BACC(Boss* boss) { void Meteo_8018C77C(Actor* actor, s32 arg1) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = D_i2_80195584[arg1] + gPlayer[0].pos.x; actor->obj.pos.y = D_i2_80195594[arg1] + gPlayer[0].pos.y; - actor->obj.pos.z = D_i2_801955A4[arg1] + gPlayer[0].unk_138; + actor->obj.pos.z = D_i2_801955A4[arg1] + gPlayer[0].trueZpos; actor->unk_0B6 = D_i2_801955B4[arg1]; actor->obj.rot.y = 180.0f; Object_SetInfo(&actor->info, actor->obj.id); - actor->info.unk_10 = 200.0f; + actor->info.cullDistance = 200.0f; if (actor->unk_0B6 == 0) { actor->iwork[11] = 1; @@ -1839,7 +1839,7 @@ void Meteo_8018CAD8(void) { actor->obj.pos.y = 0.0f; actor->obj.pos.z = 9000.0f; actor->unk_0B6 = 10; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; Object_SetInfo(&actor->info, actor->obj.id); } @@ -1897,7 +1897,7 @@ void Meteo_LevelStart(Player* player) { PRINTF("Demo_Time %d\n"); - switch (player->unk_1D0) { + switch (player->csState) { case 0: gCsFrameCount = 0; @@ -1924,13 +1924,13 @@ void Meteo_LevelStart(Player* player) { player->cam.eye.x = gCsCamEyeX = player->pos.x + 100.0f; player->cam.eye.y = gCsCamEyeY = player->pos.y; - player->cam.eye.z = gCsCamEyeZ = D_ctx_80177A48[1] + player->unk_138; + player->cam.eye.z = gCsCamEyeZ = D_ctx_80177A48[1] + player->trueZpos; player->cam.at.x = gCsCamAtX = D_ctx_80177A48[2] + player->pos.x; player->cam.at.y = gCsCamAtY = player->pos.y; - player->cam.at.z = gCsCamAtZ = D_ctx_80177A48[4] + player->unk_138; + player->cam.at.z = gCsCamAtZ = D_ctx_80177A48[4] + player->trueZpos; - player->unk_1D0 = 1; + player->csState = 1; D_ctx_80177A48[3] = 1.0f; @@ -1938,14 +1938,14 @@ void Meteo_LevelStart(Player* player) { actor3->vel.z = 4.0f; gCsCamEyeX = player->pos.x + 100.0f; gCsCamEyeY = player->pos.y; - gCsCamEyeZ = D_ctx_80177A48[1] + player->unk_138; + gCsCamEyeZ = D_ctx_80177A48[1] + player->trueZpos; gCsCamAtX = D_ctx_80177A48[2] + player->pos.x; gCsCamAtY = player->pos.y + 20.0f; - gCsCamAtZ = D_ctx_80177A48[4] + player->unk_138; + gCsCamAtZ = D_ctx_80177A48[4] + player->trueZpos; Math_SmoothStepToF(&D_ctx_80177A48[1], 8000.0f, 0.05f, 20.0f, 0); Math_SmoothStepToF(&D_ctx_80177A48[2], 0.0f, 0.05f, 25.0f, 0); Math_SmoothStepToF(&D_ctx_80177A48[4], 0.0f, 0.05f, 200.0f, 0); - Math_SmoothStepToF(&player->unk_0EC, 0.0f, 0.05f, 0.3f, 0); + Math_SmoothStepToF(&player->rot.z, 0.0f, 0.05f, 0.3f, 0); D_ctx_80177A48[0] = 0.1f; if (gCsFrameCount == 680) { @@ -1961,29 +1961,29 @@ void Meteo_LevelStart(Player* player) { actor1->state = 13; } if (gCsFrameCount > 810) { - player->unk_1D0 = 2; + player->csState = 2; D_ctx_80177A48[0] = 0.0f; - player->timer_1F8 = 40; + player->csTimer = 40; } sp8F = false; if (gCsFrameCount == 190) { - player->timer_1FC = 5; - player->unk_1D8 = 10; + player->csEventTimer = 5; + player->meTargetIndex = 10; sp8F = true; } if (gCsFrameCount == 230) { - player->timer_1FC = 3; - player->unk_1D8 = 6; + player->csEventTimer = 3; + player->meTargetIndex = 6; sp8F = true; } if (gCsFrameCount == 240) { - player->timer_1FC = 3; - player->unk_1D8 = 11; + player->csEventTimer = 3; + player->meTargetIndex = 11; sp8F = true; } if (gCsFrameCount == 270) { - player->timer_1FC = 2; - player->unk_1D8 = 12; + player->csEventTimer = 2; + player->meTargetIndex = 12; sp8F = true; } if (gCsFrameCount == 600) { @@ -2022,16 +2022,16 @@ void Meteo_LevelStart(Player* player) { Meteo_8018CCF8(&gActors[8]); } - if (player->timer_1FC != 0) { + if (player->csEventTimer != 0) { if (sp8F != 0) { sp58 = D_i2_801955C4; D_ctx_80177A48[3] *= -1.0f; - x = gActors[player->unk_1D8].obj.pos.x - (actor3->obj.pos.x + (D_ctx_80177A48[3] * 74.0f)); - y = gActors[player->unk_1D8].obj.pos.y - (actor3->obj.pos.y - 232.0f); - z = gActors[player->unk_1D8].obj.pos.z - (actor3->obj.pos.z - 1190.0f); + x = gActors[player->meTargetIndex].obj.pos.x - (actor3->obj.pos.x + (D_ctx_80177A48[3] * 74.0f)); + y = gActors[player->meTargetIndex].obj.pos.y - (actor3->obj.pos.y - 232.0f); + z = gActors[player->meTargetIndex].obj.pos.z - (actor3->obj.pos.z - 1190.0f); sp64 = Math_RadToDeg(Math_Atan2F(x, z)); - x = sqrtf((x * x) + (z * z)); + x = sqrtf(SQ(x) + SQ(z)); sp68 = Math_RadToDeg(-Math_Atan2F(y, x)); Matrix_RotateY(gCalcMatrix, M_DTOR * sp64, MTXF_NEW); @@ -2043,11 +2043,12 @@ void Meteo_LevelStart(Player* player) { actor3->obj.pos.z - 1190.0f + (sp4C.z * 0.8f), sp4C.x, sp4C.y, sp4C.z, sp68, sp64, 0.0f); } - if (player->timer_1FC == 1) { - func_effect_8007D2C8(gActors[player->unk_1D8].obj.pos.x, gActors[player->unk_1D8].obj.pos.y, - gActors[player->unk_1D8].obj.pos.z, 10.0f); - gActors[player->unk_1D8].obj.status = OBJ_FREE; - Meteo_8018CCF8(&gActors[player->unk_1D8]); + if (player->csEventTimer == 1) { + func_effect_8007D2C8(gActors[player->meTargetIndex].obj.pos.x, + gActors[player->meTargetIndex].obj.pos.y, + gActors[player->meTargetIndex].obj.pos.z, 10.0f); + gActors[player->meTargetIndex].obj.status = OBJ_FREE; + Meteo_8018CCF8(&gActors[player->meTargetIndex]); Object_Kill(&gPlayerShots[0].obj, gPlayerShots[0].sfxSource); } } @@ -2059,23 +2060,23 @@ void Meteo_LevelStart(Player* player) { gCsCamEyeZ = 400.0f; gCsCamAtX = player->pos.x; gCsCamAtY = (player->pos.y * player->unk_148) + 20.0f; - gCsCamAtZ = player->unk_138; + gCsCamAtZ = player->trueZpos; Math_SmoothStepToF(D_ctx_80177A48, 1.0f, 1.0f, 0.01f, 0.0f); - if (player->timer_1F8 == 0) { + if (player->csTimer == 0) { AUDIO_PLAY_BGM(gBgmSeqId); gLevelStartStatusScreenTimer = 80; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; - player->unk_1D0 = 0; - player->timer_1F8 = 0; - player->timer_1FC = 0; + player->csState = 0; + player->csTimer = 0; + player->csEventTimer = 0; player->cam.eye.x = player->pos.x; player->cam.eye.y = (player->pos.y * player->unk_148) + 50.0f; player->cam.eye.z = 400.0f; player->cam.at.x = player->pos.x; player->cam.at.y = (player->pos.y * player->unk_148) + 20.0f; - player->cam.at.z = player->unk_138; + player->cam.at.z = player->trueZpos; for (i = 0; i < 4; i++) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); @@ -2184,11 +2185,11 @@ void Meteo_8018DE14(Effect* effect) { void Meteo_8018DF08(Actor* actor, s32 idx) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = D_i2_801955D0[idx].x + gPlayer[0].pos.x; actor->obj.pos.y = D_i2_801955D0[idx].y + gPlayer[0].pos.y; - actor->obj.pos.z = D_i2_801955D0[idx].z + gPlayer[0].unk_138; + actor->obj.pos.z = D_i2_801955D0[idx].z + gPlayer[0].trueZpos; actor->unk_0F4.y = 0.0f; actor->unk_0F4.z = D_i2_80195600[idx]; @@ -2212,19 +2213,19 @@ void Meteo_LevelComplete(Player* player) { gBosses[1].obj.status = OBJ_FREE; - Math_SmoothStepToF(&player->unk_130, 0.0f, 0.1f, 15.0f, 0.0f); - Math_SmoothStepToF(&player->unk_12C, 0.0f, 0.1f, 15.0f, 0.0f); - Math_SmoothStepToF(&player->unk_0E8, 0.0f, 0.1f, 3.0f, 0.0f); - Math_SmoothStepToF(&player->unk_0EC, 0.0f, 0.1f, 3.0f, 0.0f); - Math_SmoothStepToF(&player->unk_08C, 0.0f, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToF(&player->zRotBarrelRoll, 0.0f, 0.1f, 15.0f, 0.0f); + Math_SmoothStepToF(&player->zRotBank, 0.0f, 0.1f, 15.0f, 0.0f); + Math_SmoothStepToF(&player->rot.y, 0.0f, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToF(&player->rot.z, 0.0f, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToF(&player->camDist, 0.0f, 0.1f, 3.0f, 0.0f); Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f); - Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 20.0f, 0.0f); + Math_SmoothStepToAngle(&player->aerobaticPitch, 0.0f, 0.1f, 20.0f, 0.0f); Math_SmoothStepToF(&player->boostSpeed, 0.0f, 0.1f, 3.0f, 0.0f); - switch (player->unk_1D0) { + switch (player->csState) { case 0: Audio_StopSfxByBankAndSource(1, player->sfxSource); - player->unk_1D0++; + player->csState++; D_ctx_80177A48[0] = 0.0f; D_ctx_80177A48[1] = 0.0f; @@ -2245,34 +2246,34 @@ void Meteo_LevelComplete(Player* player) { gCsCamEyeX = gBosses[0].obj.pos.x + dest.x; gCsCamEyeY = gBosses[0].obj.pos.y + dest.y; - gCsCamEyeZ = gBosses[0].obj.pos.z + D_ctx_80177D20 + dest.z; + gCsCamEyeZ = gBosses[0].obj.pos.z + gPathProgress + dest.z; gCsCamAtX = gBosses[0].obj.pos.x; gCsCamAtY = gBosses[0].obj.pos.y; - gCsCamAtZ = gBosses[0].obj.pos.z + D_ctx_80177D20; + gCsCamAtZ = gBosses[0].obj.pos.z + gPathProgress; Math_SmoothStepToF(&D_ctx_80177A48[1], 180.0f, 0.05f, 1.0f, 0.0f); Math_SmoothStepToF(&D_ctx_80177A48[2], 1500.0f, 0.1f, 10.0f, 0.0f); Math_SmoothStepToF(&D_ctx_80177A48[0], 0.1f, 0.1f, 0.001f, 0.0f); Math_SmoothStepToF(&player->baseSpeed, 0.0f, 1.0f, 0.5f, 0.0f); Math_SmoothStepToF(&gBosses[0].vel.z, 0.0f, 1.0f, 0.5f, 0.0f); - Math_SmoothStepToF(&player->unk_0E4, 0.0f, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToF(&player->rot.x, 0.0f, 0.1f, 3.0f, 0.0f); if (gCsFrameCount == 320) { gCsFrameCount = 200; D_ctx_80177A48[0] = 0.0f; D_ctx_80177A48[3] = 0.0f; D_ctx_80177A48[4] = 0.0f; - player->unk_1D0++; - player->timer_1F8 = 100; + player->csState++; + player->csTimer = 100; } break; case 2: - if (player->timer_1F8 == 0) { + if (player->csTimer == 0) { Math_SmoothStepToF(&D_ctx_80177A48[3], 1.0f, 1.0f, 0.01f, 0.0f); } - if (player->timer_1F8 == 50) { + if (player->csTimer == 50) { AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); } @@ -2311,11 +2312,11 @@ void Meteo_LevelComplete(Player* player) { gCsCamAtX = player->pos.x; gCsCamAtY = player->pos.y; - gCsCamAtZ = player->unk_138 + D_ctx_80177D20 + 150.0f; + gCsCamAtZ = player->trueZpos + gPathProgress + 150.0f; if (gCsFrameCount > 1390) { player->baseSpeed += 2.0f; - player->unk_0E4 += 0.1f; + player->rot.x += 0.1f; player->unk_190 = 2.0f; if (gCsFrameCount == 1465) { @@ -2328,7 +2329,7 @@ void Meteo_LevelComplete(Player* player) { gFillScreenAlphaStep = 8; if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; - player->timer_1F8 = 0; + player->csTimer = 0; gFadeoutType = 4; gLeveLClearStatus[LEVEL_METEO] = Play_CheckMedalStatus(200) + 1; } @@ -2336,7 +2337,7 @@ void Meteo_LevelComplete(Player* player) { } else { gCsCamEyeX = player->pos.x + dest.x; gCsCamEyeY = player->pos.y + dest.y; - gCsCamEyeZ = player->unk_138 + D_ctx_80177D20 + 150.0f + dest.z; + gCsCamEyeZ = player->trueZpos + gPathProgress + 150.0f + dest.z; } break; } @@ -2439,7 +2440,7 @@ void Meteo_LevelComplete(Player* player) { gActors[3].state = 1; gActors[3].obj.pos.x = player->cam.eye.x - 700.0f; gActors[3].obj.pos.y = player->cam.eye.y; - gActors[3].obj.pos.z = player->cam.eye.z - D_ctx_80177D20 + 1000.0f; + gActors[3].obj.pos.z = player->cam.eye.z - gPathProgress + 1000.0f; break; } @@ -2450,8 +2451,8 @@ void Meteo_LevelComplete(Player* player) { Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0); Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0); - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -((player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->rot.x + player->aerobaticPitch) * M_DTOR), MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; @@ -2467,12 +2468,12 @@ void Meteo_LevelComplete(Player* player) { player->pos.y += player->vel.y; player->pos.z += player->vel.z; - player->unk_138 = player->pos.z + player->unk_08C; - player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; - player->unk_088 += 10.0f; - player->unk_080 = -SIN_DEG(player->unk_088) * 0.3f; - player->unk_0F4 += 8.0f; - player->unk_0F0 = SIN_DEG(player->unk_0F4); + player->trueZpos = player->pos.z + player->camDist; + player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; + player->bobPhase += 10.0f; + player->yBob = -SIN_DEG(player->bobPhase) * 0.3f; + player->rockPhase += 8.0f; + player->rockAngle = SIN_DEG(player->rockPhase); } void Meteo_8018ED9C(Actor* actor) { diff --git a/src/overlays/ovl_i2/fox_sx.c b/src/overlays/ovl_i2/fox_sx.c index deb8d41d..1f058636 100644 --- a/src/overlays/ovl_i2/fox_sx.c +++ b/src/overlays/ovl_i2/fox_sx.c @@ -28,7 +28,7 @@ void SectorX_8018F030(void) { actor->obj.rot.y = 180.0f; actor->obj.pos.x = gPlayer[0].cam.eye.x - 300.0f; actor->obj.pos.y = gPlayer[0].cam.eye.y + 200.0f; - actor->obj.pos.z = gPlayer[0].cam.eye.z - D_ctx_80177D20 + 300.0f; + actor->obj.pos.z = gPlayer[0].cam.eye.z - gPathProgress + 300.0f; actor->iwork[11] = 1; actor->aiType = AI360_SLIPPY; Object_SetInfo(&actor->info, actor->obj.id); @@ -49,7 +49,7 @@ void SectorX_8018F124(void) { actor->obj.pos.y = gPlayer[0].cam.eye.y - 3000.0f; actor->obj.pos.z = gPlayer[0].pos.z + 30000.0f; Object_SetInfo(&actor->info, actor->obj.id); - actor->info.unk_10 = 100000.0f; + actor->info.cullDistance = 100000.0f; } void SectorX_8018F1DC(Actor* actor) { @@ -128,7 +128,7 @@ void SectorX_8018F330(Actor* actor) { Math_SmoothStepToF(&actor->fwork[1], 0.1f, 1.0f, 0.01f, 0); Math_SmoothStepToF(&gPlayer[0].cam.at.x, actor->obj.pos.x, actor->fwork[0], 100.0f, 0.0f); Math_SmoothStepToF(&gPlayer[0].cam.at.y, actor->obj.pos.y, actor->fwork[0], 100.0f, 0.0f); - Math_SmoothStepToF(&gPlayer[0].cam.at.z, actor->obj.pos.z + D_ctx_80177D20, actor->fwork[0], 100.0f, 0.0f); + Math_SmoothStepToF(&gPlayer[0].cam.at.z, actor->obj.pos.z + gPathProgress, actor->fwork[0], 100.0f, 0.0f); Math_SmoothStepToF(&gPlayer[0].cam.eye.x, actor->obj.pos.x - 30.0f, actor->fwork[1], 20.0f, 0.0f); Math_SmoothStepToF(&gPlayer[0].cam.eye.y, actor->obj.pos.y, actor->fwork[1], 20.0f, 0.0f); if (actor->timer_0BC == 0) { @@ -197,8 +197,8 @@ void SectorX_8018FA04(f32 x, f32 y, f32 z) { actor->obj.pos.z = z; Object_SetInfo(&actor->info, actor->obj.id); actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SX_60328CC); - xRot = Math_Atan2F(gPlayer[0].pos.x - x, gPlayer[0].unk_138 - z); - pad = sqrtf(SQ(gPlayer[0].pos.x - x) + SQ(gPlayer[0].unk_138 - z)); + xRot = Math_Atan2F(gPlayer[0].pos.x - x, gPlayer[0].trueZpos - z); + pad = sqrtf(SQ(gPlayer[0].pos.x - x) + SQ(gPlayer[0].trueZpos - z)); yRot = -Math_Atan2F(gPlayer[0].pos.y - y, pad); Matrix_RotateY(gCalcMatrix, xRot, MTXF_NEW); Matrix_RotateX(gCalcMatrix, yRot, MTXF_APPLY); @@ -208,7 +208,7 @@ void SectorX_8018FA04(f32 x, f32 y, f32 z) { Matrix_MultVec3f(gCalcMatrix, &src, &dest); actor->vel.x = dest.x; actor->vel.y = dest.y; - actor->vel.z = dest.z - D_ctx_80177D08; + actor->vel.z = dest.z - gPathVelZ; break; } } @@ -360,7 +360,7 @@ void SectorX_80190078(Boss* boss) { } sp68 = gPlayer[0].pos.x - boss->obj.pos.x; - sp64 = gPlayer[0].unk_138 - (boss->obj.pos.z + (-237.0f)); + sp64 = gPlayer[0].trueZpos - (boss->obj.pos.z + (-237.0f)); if (boss->swork[7] != 0) { sp70 = Math_RadToDeg(Math_Atan2F(sp68, sp64)); @@ -498,7 +498,7 @@ void SectorX_80190078(Boss* boss) { switch (boss->state) { case 0: boss->swork[7] = 1; - boss->obj.pos.x = gPlayer[0].unk_0AC; + boss->obj.pos.x = gPlayer[0].xPath; boss->swork[0] = 0; Animation_GetFrameData(&D_SX_60206DC, boss->unk_04C, boss->vwork); boss->fwork[1] = -2000.0f; @@ -1072,7 +1072,7 @@ void SectorX_80190078(Boss* boss) { if (boss->timer_050 == 120) { if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_NEXT) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_DOWN)) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; - gPlayer[0].unk_1D0 = 0; + gPlayer[0].csState = 0; gPlayer[0].unk_234 = 1; } Object_Kill(&boss->obj, boss->sfxSource); @@ -1412,7 +1412,7 @@ void SectorX_80193800(Actor* actor, s32 arg1) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = D_i2_801956B0[arg1].x; actor->obj.pos.y = D_i2_801956B0[arg1].y; actor->obj.pos.z = D_i2_801956B0[arg1].z; @@ -1428,7 +1428,7 @@ void SectorX_80193800(Actor* actor, s32 arg1) { void SectorX_801938D8(Actor* actor, s32 arg1) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = gPlayer[0].cam.eye.x + D_i2_801956EC[arg1].x; actor->obj.pos.y = gPlayer[0].cam.eye.y + D_i2_801956EC[arg1].y; actor->obj.pos.z = gPlayer[0].cam.eye.z + D_i2_801956EC[arg1].z; @@ -1456,13 +1456,13 @@ void SectorX_LevelStart(Player* player) { f32 xzDeg; f32 xyzDeg; - switch (player->unk_1D0) { + switch (player->csState) { case 0: gCsFrameCount = 0; for (i = 0; i < 5; i++) { SectorX_80193800(&gActors[5 + i], i); } - player->unk_1D0 = 1; + player->csState = 1; player->cam.eye.x = gCsCamEyeX = 100.0f; player->cam.eye.y = gCsCamEyeY = 0.0f; player->cam.eye.z = gCsCamEyeZ = -200.0f; @@ -1506,7 +1506,7 @@ void SectorX_LevelStart(Player* player) { func_effect_80079618(gActors[5].obj.pos.x, gActors[5].obj.pos.y, gActors[5].obj.pos.z, 0.5f); } func_effect_8007A6F0(&gActors[5].obj.pos, 0x2903B009); - player->unk_1D0 += 1; + player->csState += 1; D_ctx_80177A48[0] = 0.1f; } break; @@ -1515,13 +1515,13 @@ void SectorX_LevelStart(Player* player) { if (gCsFrameCount == 170) { player->pos.x = 0.0f; player->pos.y = player->cam.eye.y + 50.0f; - player->unk_1D0 += 1; + player->csState += 1; player->pos.z = player->cam.eye.z + 20.0f; player->unk_194 = 10.0f; player->unk_190 = 10.0f; player->baseSpeed = 30.0f; - player->unk_0EC = -80.0f; - player->unk_0E4 = -20.0f; + player->rot.z = -80.0f; + player->rot.x = -20.0f; AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); for (i = 6; i < 10; i++) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); @@ -1539,8 +1539,8 @@ void SectorX_LevelStart(Player* player) { } Math_SmoothStepToF(&player->camRoll, 0.0f, 0.5f, 0.07f, 0); - Math_SmoothStepToF(&player->unk_0EC, 0.0f, 0.2f, 2.0f, 0); - Math_SmoothStepToF(&player->unk_0E4, 20.0f, 0.1f, 1.0f, 0); + Math_SmoothStepToF(&player->rot.z, 0.0f, 0.2f, 2.0f, 0); + Math_SmoothStepToF(&player->rot.x, 20.0f, 0.1f, 1.0f, 0); switch (gCsFrameCount) { case 195: @@ -1561,8 +1561,8 @@ void SectorX_LevelStart(Player* player) { } if (gCsFrameCount > 300) { - player->unk_1D0 += 1; - player->timer_1F8 = 40; + player->csState += 1; + player->csTimer = 40; D_ctx_80177A48[0] = 0.0f; gActors[0].obj.pos.z -= player->pos.z; gActors[1].obj.pos.z -= player->pos.z; @@ -1579,25 +1579,25 @@ void SectorX_LevelStart(Player* player) { case 4: Math_SmoothStepToF(&player->camRoll, 0.0f, 0.2f, 0.5f, 0); Math_SmoothStepToF(&player->pos.y, 350.0f, 0.1f, 15.0f, 0); - Math_SmoothStepToF(&player->unk_0E4, 0.0f, 0.1f, 2.0f, 0); + Math_SmoothStepToF(&player->rot.x, 0.0f, 0.1f, 2.0f, 0); gCsCamEyeX = player->pos.x; gCsCamEyeY = (player->pos.y * player->unk_148) + 50.0f; gCsCamEyeZ = 400.0f; gCsCamAtX = player->pos.x; gCsCamAtY = (player->pos.y * player->unk_148) + 20.0f; - gCsCamAtZ = player->unk_138; + gCsCamAtZ = player->trueZpos; Math_SmoothStepToF(D_ctx_80177A48, 1.0f, 1.0f, 0.01f, 0); - if (player->timer_1F8 == 0) { + if (player->csTimer == 0) { player->baseSpeed = gArwingSpeed; AUDIO_PLAY_BGM(gBgmSeqId); gLevelStartStatusScreenTimer = 80; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; - player->unk_1D0 = player->timer_1F8 = player->timer_1FC = 0; + player->csState = player->csTimer = player->csEventTimer = 0; player->cam.eye.y = player->pos.y * player->unk_148 + 50.0f; player->cam.eye.z = 400.0f; player->cam.at.y = player->pos.y * player->unk_148 + 20.0f; - player->cam.at.z = player->unk_138; + player->cam.at.z = player->trueZpos; player->cam.at.x = player->cam.eye.x = player->pos.x; gLoadLevelObjects = 1; for (i = 0; i < 3; i++) { @@ -1612,8 +1612,8 @@ void SectorX_LevelStart(Player* player) { Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 20000.0f, 0); Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 20000.0f, 0); Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 20000.0f, 0); - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(player->rot.x * M_DTOR), MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; src.z = player->baseSpeed; @@ -1624,7 +1624,7 @@ void SectorX_LevelStart(Player* player) { player->pos.x += player->vel.x; player->pos.y += player->vel.y; player->pos.z += player->vel.z; - player->unk_138 = player->pos.z + player->unk_08C; + player->trueZpos = player->pos.z + player->camDist; } void SectorX_801944D4(Actor* actor, s32 arg1) { @@ -1634,7 +1634,7 @@ void SectorX_801944D4(Actor* actor, s32 arg1) { Vec3f destB; Player* player = &gPlayer[0]; - Matrix_RotateY(gCalcMatrix, player->unk_0E8 * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, player->rot.y * M_DTOR, MTXF_NEW); srcA.x = D_i2_80195710[arg1]; srcA.y = D_i2_80195720[arg1]; srcA.z = D_i2_80195730[arg1]; @@ -1647,7 +1647,7 @@ void SectorX_801944D4(Actor* actor, s32 arg1) { Actor_Initialize(actor); actor->obj.pos.x = player->pos.x + destA.x; actor->obj.pos.y = player->pos.y + destA.y; - actor->obj.pos.z = player->unk_138 + destA.z; + actor->obj.pos.z = player->trueZpos + destA.z; actor->fwork[0] = destB.x; actor->fwork[1] = destB.y; actor->fwork[2] = destB.z; @@ -1657,13 +1657,13 @@ void SectorX_801944D4(Actor* actor, s32 arg1) { actor->vel.y = player->vel.y; actor->vel.z = player->vel.z; actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; Object_SetInfo(&actor->info, actor->obj.id); if (arg1 == 3) { actor->unk_0B6 = 1; actor->state = 20; - actor->obj.rot.x = -player->unk_0E4 - 10.0f; - actor->obj.rot.y = (player->unk_0E8 + 180.0f) - 10.0f; + actor->obj.rot.x = -player->rot.x - 10.0f; + actor->obj.rot.y = (player->rot.y + 180.0f) - 10.0f; actor->fwork[9] = 10.0f; } else { actor->obj.rot.z = D_i2_80195770[arg1]; @@ -1678,23 +1678,23 @@ void SectorX_LevelComplete(Player* player) { Vec3f sp48; s32 pad[5]; - Math_SmoothStepToF(&player->unk_130, 0.0f, 0.1f, 15.0f, 0.0f); - Math_SmoothStepToF(&player->unk_12C, 0.0f, 0.1f, 15.0f, 0.0f); - Math_SmoothStepToF(&player->unk_0E4, 0.0f, 0.1f, 3.0f, 0.0f); - Math_SmoothStepToF(&player->unk_0E8, 0.0f, 0.1f, 3.0f, 0.0f); - Math_SmoothStepToF(&player->unk_0EC, 0.0f, 0.1f, 3.0f, 0.0f); - Math_SmoothStepToF(&player->unk_08C, 0.0f, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToF(&player->zRotBarrelRoll, 0.0f, 0.1f, 15.0f, 0.0f); + Math_SmoothStepToF(&player->zRotBank, 0.0f, 0.1f, 15.0f, 0.0f); + Math_SmoothStepToF(&player->rot.x, 0.0f, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToF(&player->rot.y, 0.0f, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToF(&player->rot.z, 0.0f, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToF(&player->camDist, 0.0f, 0.1f, 3.0f, 0.0f); Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f); - Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 20.0f, 0.0f); + Math_SmoothStepToAngle(&player->aerobaticPitch, 0.0f, 0.1f, 20.0f, 0.0f); Math_SmoothStepToF(&player->boostSpeed, 0.0f, 0.1f, 3.0f, 0.0f); D_ctx_80178430 += 0.2f; D_ctx_8017842C -= 0.2f; - switch (player->unk_1D0) { + switch (player->csState) { case 0: Audio_StopSfxByBankAndSource(1, player->sfxSource); - player->unk_1D0 += 1; + player->csState += 1; D_ctx_80177A48[1] = 0.05f; D_ctx_80177A48[0] = 0.02f; D_ctx_80177A48[2] = 0.0f; @@ -1718,8 +1718,8 @@ void SectorX_LevelComplete(Player* player) { Math_SmoothStepToF(&player->baseSpeed, 0.0f, 0.1f, 2.0f, 0.0f); Math_SmoothStepToF(D_ctx_80177A48, 0.1f, 1.0f, 0.002f, 0.0f); Math_SmoothStepToF(D_ctx_80177A48 + 1, 0.1f, 1.0f, 0.002f, 0.0f); - Matrix_RotateY(gCalcMatrix, player->unk_0E8 * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, player->rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, player->rot.x * M_DTOR, MTXF_APPLY); Matrix_Push(&gCalcMatrix); Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[2] * M_DTOR, MTXF_APPLY); sp54.x = 0.0f; @@ -1728,7 +1728,7 @@ void SectorX_LevelComplete(Player* player) { Matrix_MultVec3f(gCalcMatrix, &sp54, &sp48); Math_SmoothStepToF(&player->cam.eye.x, player->pos.x + sp48.x, D_ctx_80177A48[0], 500.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.y, player->pos.y + sp48.y, D_ctx_80177A48[0], 500.0f, 0.0f); - Math_SmoothStepToF(&player->cam.eye.z, player->unk_138 + D_ctx_80177D20 + sp48.z, D_ctx_80177A48[0], 500.0f, + Math_SmoothStepToF(&player->cam.eye.z, player->trueZpos + gPathProgress + sp48.z, D_ctx_80177A48[0], 500.0f, 0.0f); Matrix_Pop(&gCalcMatrix); sp54.x = 0.0f; @@ -1737,14 +1737,14 @@ void SectorX_LevelComplete(Player* player) { Matrix_MultVec3f(gCalcMatrix, &sp54, &sp48); Math_SmoothStepToF(&player->cam.at.x, player->pos.x + sp48.x, D_ctx_80177A48[1], 500.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.y, player->pos.y + sp48.y, D_ctx_80177A48[1], 500.0f, 0.0f); - Math_SmoothStepToF(&player->cam.at.z, player->unk_138 + D_ctx_80177D20 + sp48.z, D_ctx_80177A48[1], 500.0f, + Math_SmoothStepToF(&player->cam.at.z, player->trueZpos + gPathProgress + sp48.z, D_ctx_80177A48[1], 500.0f, 0.0f); break; case 2: player->baseSpeed += 2.0f; - if (player->timer_1F8 == 0) { - Math_SmoothStepToAngle(&player->unk_0E4, 20.0f, 0.1f, 0.5f, 0.0f); + if (player->csTimer == 0) { + Math_SmoothStepToAngle(&player->rot.x, 20.0f, 0.1f, 0.5f, 0.0f); } if (gCsFrameCount == 1195) { @@ -1757,7 +1757,7 @@ void SectorX_LevelComplete(Player* player) { if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; gFadeoutType = 4; - player->timer_1F8 = 0; + player->csTimer = 0; Play_ClearObjectData(); gLeveLClearStatus[LEVEL_SECTOR_X] = Play_CheckMedalStatus(150) + 1; } @@ -1820,8 +1820,8 @@ void SectorX_LevelComplete(Player* player) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); - player->unk_1D0 = 2; - player->timer_1F8 = 40; + player->csState = 2; + player->csTimer = 40; player->unk_194 = 5.0f; player->unk_190 = 5.0f; break; @@ -1925,8 +1925,8 @@ void SectorX_LevelComplete(Player* player) { break; } } - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -((player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->rot.x + player->aerobaticPitch) * M_DTOR), MTXF_APPLY); sp54.x = 0.0f; sp54.y = 0.0f; sp54.z = player->baseSpeed + player->boostSpeed; @@ -1937,10 +1937,10 @@ void SectorX_LevelComplete(Player* player) { player->pos.x += player->vel.x; player->pos.y += player->vel.y; player->pos.z += player->vel.z; - player->unk_138 = player->pos.z + player->unk_08C; - player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; - player->unk_088 += 10.0f; - player->unk_080 = -SIN_DEG(player->unk_088) * 0.3f; - player->unk_0F4 += 8.0f; - player->unk_0F0 = SIN_DEG(player->unk_0F4); + player->trueZpos = player->pos.z + player->camDist; + player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; + player->bobPhase += 10.0f; + player->yBob = -SIN_DEG(player->bobPhase) * 0.3f; + player->rockPhase += 8.0f; + player->rockAngle = SIN_DEG(player->rockPhase); } diff --git a/src/overlays/ovl_i3/fox_a6.c b/src/overlays/ovl_i3/fox_a6.c index 0e4b3090..d893f686 100644 --- a/src/overlays/ovl_i3/fox_a6.c +++ b/src/overlays/ovl_i3/fox_a6.c @@ -552,10 +552,10 @@ void Area6_80187944(Boss* bossA6) { if ((bossA6->state < 6) || ((bossA6->state >= 8) && (bossA6->state < 12))) { bossA6->obj.rot.y = RAD_TO_DEG(Math_Atan2F(gPlayer[0].cam.eye.x - bossA6->obj.pos.x, - gPlayer[0].cam.eye.z - (bossA6->obj.pos.z + D_ctx_80177D20))); + gPlayer[0].cam.eye.z - (bossA6->obj.pos.z + gPathProgress))); bossA6->obj.rot.x = RAD_TO_DEG(-Math_Atan2F(gPlayer[0].cam.eye.y - bossA6->obj.pos.y, - sqrtf(SQ(gPlayer[0].cam.eye.z - (bossA6->obj.pos.z + D_ctx_80177D20)) + + sqrtf(SQ(gPlayer[0].cam.eye.z - (bossA6->obj.pos.z + gPathProgress)) + SQ(gPlayer[0].cam.eye.x - bossA6->obj.pos.x)))); } @@ -583,7 +583,7 @@ void Area6_80187944(Boss* bossA6) { gTeamLowHealthMsgTimer = -1; - D_bg_8015F984 = (D_ctx_80177D20 * 0.00004f) + 0.5f; + D_bg_8015F984 = (gPathProgress * 0.00004f) + 0.5f; AUDIO_PLAY_SFX(0x2940D09A, bossA6->sfxSource, 4); @@ -688,7 +688,7 @@ void Area6_80187944(Boss* bossA6) { if (bossA6->state != 0) { Math_SmoothStepToF(&bossA6->fwork[A6_FWK_4], bossA6->fwork[A6_FWK_5], 0.1f, 2.0f, 0.00001f); - Math_SmoothStepToF(&bossA6->obj.pos.z, gPlayer[0].cam.eye.z - D_ctx_80177D20 + bossA6->fwork[A6_FWK_3], 0.1f, + Math_SmoothStepToF(&bossA6->obj.pos.z, gPlayer[0].cam.eye.z - gPathProgress + bossA6->fwork[A6_FWK_3], 0.1f, bossA6->fwork[A6_FWK_4], 0.00001f); if (bossA6->state < 5) { sp120 = 2.0f; @@ -785,7 +785,7 @@ void Area6_80187944(Boss* bossA6) { if ((bossA6->timer_050 != 0) && (bossA6->timer_050 < 200)) { dx_11C = gPlayer[0].cam.eye.x - bossA6->obj.pos.x; dy_118 = gPlayer[0].cam.eye.y - bossA6->obj.pos.y; - dz_114 = gPlayer[0].cam.eye.z - D_ctx_80177D20 + bossA6->fwork[A6_FWK_3] - bossA6->obj.pos.z; + dz_114 = gPlayer[0].cam.eye.z - gPathProgress + bossA6->fwork[A6_FWK_3] - bossA6->obj.pos.z; sp104 = 100.0f; } @@ -823,7 +823,7 @@ void Area6_80187944(Boss* bossA6) { Audio_KillSfxBySource(bossA6->sfxSource); AUDIO_PLAY_SFX(0x19004051, bossA6->sfxSource, 4); bossA6->timer_050 = 20; - bossA6->obj.pos.z = gPlayer[0].cam.eye.z - D_ctx_80177D20 + bossA6->fwork[A6_FWK_3]; + bossA6->obj.pos.z = gPlayer[0].cam.eye.z - gPathProgress + bossA6->fwork[A6_FWK_3]; bossA6->fwork[A6_FWK_6] = bossA6->obj.pos.x = gPlayer[0].cam.eye.x; bossA6->fwork[A6_FWK_7] = bossA6->obj.pos.y = gPlayer[0].cam.eye.y; bossA6->state = 2; @@ -871,7 +871,7 @@ void Area6_80187944(Boss* bossA6) { if ((bossA6->swork[A6_SWK_25] != 1) && (D_i3_801C2250[A6_BSS_0] != 2)) { bossA6->fwork[A6_FWK_3] = RAND_FLOAT_CENTERED(1000.0f) + -3700.0f; } - bossA6->obj.pos.z = gPlayer[0].cam.eye.z - D_ctx_80177D20 + bossA6->fwork[A6_FWK_3]; + bossA6->obj.pos.z = gPlayer[0].cam.eye.z - gPathProgress + bossA6->fwork[A6_FWK_3]; bossA6->fwork[A6_FWK_6] = bossA6->obj.pos.x = gPlayer[0].cam.eye.x; bossA6->fwork[A6_FWK_7] = bossA6->obj.pos.y = gPlayer[0].cam.eye.y; } @@ -1229,7 +1229,7 @@ void Area6_80187944(Boss* bossA6) { if ((bossA6->timer_052 == 160) && ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN))) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; - gPlayer[0].unk_1D0 = 0; + gPlayer[0].csState = 0; } if (bossA6->timer_052 < 50) { D_ctx_801779A8[0] = 50.0f; @@ -2115,7 +2115,7 @@ void Area6_8018D5C8(void) { gActors[i].unk_0B6 = 1; gActors[i].state = 90; gActors[i].fwork[0] = 0.0f; - gActors[i].obj.id = OBJ_ACTOR_195; + gActors[i].obj.id = OBJ_ACTOR_CUTSCENE; Object_SetInfo(&gActors[i].info, gActors[i].obj.id); AUDIO_PLAY_SFX(0x11030010, gActors[i].sfxSource, 0); } @@ -2128,7 +2128,7 @@ void Area6_8018D694(Actor* actor, s32 arg1) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = sp2C[arg1].x + 100.0f; actor->obj.pos.y = sp2C[arg1].y + 350.0f; actor->obj.pos.z = sp2C[arg1].z + 1000.0f; @@ -2154,7 +2154,7 @@ void Area6_8018D804(Actor* actor, s32 arg1) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = sp2C[arg1].x + player->pos.x; actor->obj.pos.y = sp2C[arg1].y + player->pos.y; actor->obj.pos.z = sp2C[arg1].z + player->pos.z; @@ -2282,10 +2282,10 @@ void Area6_LevelStart(Player* player) { f32 temp3; // 50 f32 temp4; // 4C - switch (player->unk_1D0) { + switch (player->csState) { case 0: gCsFrameCount = 0; - player->unk_1D0 = 1; + player->csState = 1; Rand_SetSeed(1, 29000, 9876); Area6_8018D694(&gActors[1], 0); Area6_8018D694(&gActors[2], 1); @@ -2378,8 +2378,8 @@ void Area6_LevelStart(Player* player) { player->pos.z = 0.0f; player->pos.y = 350.0f; player->baseSpeed = gArwingSpeed; - player->unk_1D0 = 0; - player->timer_1F8 = 0; + player->csState = 0; + player->csTimer = 0; AUDIO_PLAY_BGM(SEQ_ID_AREA_6 | SEQ_FLAG); player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; @@ -2448,8 +2448,8 @@ void Area6_LevelStart(Player* player) { Play_ClearObjectData(); break; } - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + player->unk_114 + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->rot.y + player->yRot_114 + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(player->rot.x * M_DTOR), MTXF_APPLY); if (player->state_1C8 != PLAYERSTATE_1C8_ACTIVE) { sp74.x = 0.0f; sp74.y = 0.0f; @@ -2461,9 +2461,9 @@ void Area6_LevelStart(Player* player) { player->pos.x += player->vel.x; player->pos.y += player->vel.y; player->pos.z += player->vel.z; - player->unk_138 = player->pos.z; + player->trueZpos = player->pos.z; } - player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; + player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0.001f); Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0.001f); Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0.001f); @@ -2475,7 +2475,7 @@ void Area6_LevelStart(Player* player) { void Area6_8018EA88(Actor* actor) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = 0.0f; actor->obj.pos.y = 0.0f; actor->obj.pos.z = gBosses[0].obj.pos.z + 500.0f; @@ -2499,7 +2499,7 @@ void Area6_8018EB3C(Actor* actor) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = player->pos.x; actor->obj.pos.y = player->pos.y + 600.0f; actor->obj.pos.z = player->pos.z + 2800.0f; @@ -2522,7 +2522,7 @@ void Area6_8018EC38(Actor* actor, s32 arg1) { if (gTeamShields[arg1 + 1] > 0) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = sp2C[arg1].x + player->pos.x; actor->obj.pos.y = sp2C[arg1].y + player->pos.y; actor->obj.pos.z = sp2C[arg1].z + player->pos.z; @@ -2548,10 +2548,10 @@ void Area6_LevelComplete(Player* player) { Actor* actor4 = &gActors[4]; s32 pad; - switch (player->unk_1D0) { + switch (player->csState) { case 0: gCsFrameCount = 0; - player->unk_1D0 = 1; + player->csState = 1; player->wings.modelId = 1; player->unk_194 = 5.0f; player->unk_190 = 2.0f; @@ -2560,10 +2560,10 @@ void Area6_LevelComplete(Player* player) { D_ctx_80177A48[3] = 0.0f; /* fallthrough */ case 1: - Math_SmoothStepToAngle(&player->unk_130, 0.0f, 0.05f, 1.2f, 0.0001f); - Math_SmoothStepToAngle(&player->unk_12C, 0.0f, 0.05f, 1.2f, 0.0001f); + Math_SmoothStepToAngle(&player->zRotBarrelRoll, 0.0f, 0.05f, 1.2f, 0.0001f); + Math_SmoothStepToAngle(&player->zRotBank, 0.0f, 0.05f, 1.2f, 0.0001f); Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f); - Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 20.0f, 0.0f); + Math_SmoothStepToAngle(&player->aerobaticPitch, 0.0f, 0.1f, 20.0f, 0.0f); if (gCsFrameCount < 60) { spf90.x = -100.0f; spf90.y = -100.0f; @@ -2577,9 +2577,9 @@ void Area6_LevelComplete(Player* player) { if (sp88 > 180.0f) { sp88 = 0.0f; } - sp84 = Math_SmoothStepToAngle(&player->unk_0E8, sp8C, 0.5f, 2.0f, 0.0001f) * 30.0f; - Math_SmoothStepToAngle(&player->unk_0E4, sp88, 0.1f, 5.0f, 0.0001f); - Math_SmoothStepToAngle(&player->unk_0EC, sp84, 0.1f, 5.0f, 0.0001f); + sp84 = Math_SmoothStepToAngle(&player->rot.y, sp8C, 0.5f, 2.0f, 0.0001f) * 30.0f; + Math_SmoothStepToAngle(&player->rot.x, sp88, 0.1f, 5.0f, 0.0001f); + Math_SmoothStepToAngle(&player->rot.z, sp84, 0.1f, 5.0f, 0.0001f); } if (gCsFrameCount == 60) { player->unk_234 = 0; @@ -2587,14 +2587,14 @@ void Area6_LevelComplete(Player* player) { } Math_SmoothStepToF(&gCsCamEyeX, gBosses[0].obj.pos.x, 0.05f, 1000.0f, 0.001f); Math_SmoothStepToF(&gCsCamEyeY, gBosses[0].obj.pos.y, 0.05f, 1000.0f, 0.001f); - Math_SmoothStepToF(&gCsCamEyeZ, gBosses[0].obj.pos.z + D_ctx_80177D20, 0.05f, 10.0f, 0.0001f); + Math_SmoothStepToF(&gCsCamEyeZ, gBosses[0].obj.pos.z + gPathProgress, 0.05f, 10.0f, 0.0001f); player->cam.eye.x = gCsCamEyeX; player->cam.eye.y = gCsCamEyeY; player->cam.eye.z = gCsCamEyeZ; gCsCamAtX = gBosses[0].obj.pos.x; gCsCamAtY = gBosses[0].obj.pos.y; - gCsCamAtZ = gBosses[0].obj.pos.z + D_ctx_80177D20; + gCsCamAtZ = gBosses[0].obj.pos.z + gPathProgress; D_ctx_80177A48[0] = 0.04f; if (gCsFrameCount == 140) { Area6_8018EA88(actor4); @@ -2604,7 +2604,7 @@ void Area6_LevelComplete(Player* player) { } if (gCsFrameCount >= 200) { if (gFillScreenAlpha == 255) { - player->unk_1D0 = 2; + player->csState = 2; Play_ClearObjectData(); } else { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; @@ -2653,10 +2653,11 @@ void Area6_LevelComplete(Player* player) { player->pos.x = 0.0f; player->pos.y = 200.0f; player->pos.z = 1000.0f; - player->unk_08C = player->unk_0EC = player->unk_0E8 = player->unk_0E4 = player->baseSpeed = - player->boostSpeed = player->camRoll = player->unk_12C = player->unk_130 = player->unk_4D8 = 0.0f; + player->camDist = player->rot.z = player->rot.y = player->rot.x = player->baseSpeed = + player->boostSpeed = player->camRoll = player->zRotBank = player->zRotBarrelRoll = + player->aerobaticPitch = 0.0f; - D_bg_8015F984 = (D_ctx_80177D20 * 0.00004f) + 0.5f; + D_bg_8015F984 = (gPathProgress * 0.00004f) + 0.5f; Area6_8018EC38(&gActors[1], 0); Area6_8018EC38(&gActors[2], 1); Area6_8018EC38(&gActors[3], 2); @@ -2666,13 +2667,13 @@ void Area6_LevelComplete(Player* player) { D_ctx_80177A48[9] = 50.0f; player->cam.at.x = gCsCamAtX = player->pos.x; player->cam.at.y = gCsCamAtY = 0.0f; - player->cam.at.z = gCsCamAtZ = player->pos.z + 50.0f + D_ctx_80177D20; + player->cam.at.z = gCsCamAtZ = player->pos.z + 50.0f + gPathProgress; } if (gFillScreenAlpha != 0) { gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 4; } else { - player->unk_1D0 = 3; + player->csState = 3; } case 3: Math_SmoothStepToF(&player->pos.y, 0.0f, 0.01f, 10.0f, 0.001f); @@ -2697,7 +2698,7 @@ void Area6_LevelComplete(Player* player) { } gCsCamAtX = player->pos.x; gCsCamAtY = 0.0f; - gCsCamAtZ = D_ctx_80177A48[9] + player->pos.z + D_ctx_80177D20; + gCsCamAtZ = D_ctx_80177A48[9] + player->pos.z + gPathProgress; D_ctx_80177A48[0] = 0.008f; } else { Math_SmoothStepToAngle(&D_ctx_80177A48[4], 0.0f, 0.1f, 10.0f, 0.001f); @@ -2706,12 +2707,12 @@ void Area6_LevelComplete(Player* player) { gCsCamAtX += 2.0f; player->cam.at.x = gCsCamAtX = player->pos.x; player->cam.at.y = gCsCamAtY = 0.0f; - player->cam.at.z = gCsCamAtZ = D_ctx_80177A48[9] + player->pos.z + D_ctx_80177D20; + player->cam.at.z = gCsCamAtZ = D_ctx_80177A48[9] + player->pos.z + gPathProgress; } sp78.x = 0.0f; sp78.y = 0.0f; sp78.z = D_ctx_80177A48[5]; - Matrix_Translate(gCalcMatrix, D_ctx_80177A48[1], 0.0f, D_ctx_80177A48[3] + D_ctx_80177D20, MTXF_NEW); + Matrix_Translate(gCalcMatrix, D_ctx_80177A48[1], 0.0f, D_ctx_80177A48[3] + gPathProgress, MTXF_NEW); Matrix_RotateY(gCalcMatrix, -(D_ctx_80177A48[4] * M_DTOR), MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &sp78, &sp6C); player->cam.eye.x = gCsCamEyeX = sp6C.x; @@ -2796,8 +2797,8 @@ void Area6_LevelComplete(Player* player) { if (gCsFrameCount >= 1076) { Math_SmoothStepToF(&player->baseSpeed, 50.0f, 0.1f, 1000.0f, 0.001f); } - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + player->unk_114 + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->rot.y + player->yRot_114 + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(player->rot.x * M_DTOR), MTXF_APPLY); sp78.x = 0.0f; sp78.y = 0.0f; sp78.z = player->baseSpeed; @@ -2808,8 +2809,8 @@ void Area6_LevelComplete(Player* player) { player->pos.x += player->vel.x; player->pos.y += player->vel.y; player->pos.z += player->vel.z; - player->unk_138 = player->pos.z; - player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; + player->trueZpos = player->pos.z; + player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0.0001f); Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0.0001f); Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0.0001f); diff --git a/src/overlays/ovl_i3/fox_aq.c b/src/overlays/ovl_i3/fox_aq.c index 36ad1664..e4e38616 100644 --- a/src/overlays/ovl_i3/fox_aq.c +++ b/src/overlays/ovl_i3/fox_aq.c @@ -323,15 +323,15 @@ void Aquas_801A8E30(void) { void Aquas_801A92EC(Actor* actor, f32 xUnk, f32 yUnk, f32 zUnk, s32 index, s32 mode) { gTexturedLines[index].mode = mode; - gTexturedLines[index].unk_28 = 10.0f; - gTexturedLines[index].unk_04.x = actor->obj.pos.x; - gTexturedLines[index].unk_04.y = actor->obj.pos.y; - gTexturedLines[index].unk_04.z = actor->obj.pos.z; - gTexturedLines[index].unk_10.x = xUnk; - gTexturedLines[index].unk_10.y = yUnk; - gTexturedLines[index].unk_10.z = zUnk; - gTexturedLines[index].unk_2C = gTexturedLines[index].unk_2D = gTexturedLines[index].unk_2E = - gTexturedLines[index].unk_2F = 255; + gTexturedLines[index].xyScale = 10.0f; + gTexturedLines[index].posAA.x = actor->obj.pos.x; + gTexturedLines[index].posAA.y = actor->obj.pos.y; + gTexturedLines[index].posAA.z = actor->obj.pos.z; + gTexturedLines[index].posBB.x = xUnk; + gTexturedLines[index].posBB.y = yUnk; + gTexturedLines[index].posBB.z = zUnk; + gTexturedLines[index].red = gTexturedLines[index].green = gTexturedLines[index].blue = gTexturedLines[index].alpha = + 255; gTexturedLines[index].timer = 3; } @@ -471,7 +471,7 @@ void Aquas_801A9824(void) { } void Aquas_801A99D4(Player* player) { - s32 sp24 = fabsf(player->unk_138 / 1000.0f); + s32 sp24 = fabsf(player->trueZpos / 1000.0f); Math_SmoothStepToF(&D_bg_8015F970, D_i3_801C41B8[25], 1.0f, 10.0f, 0.00001f); Math_SmoothStepToF(&D_AQ_801C4188, D_i3_801C41B8[26], 0.1f, 10.0f, 0.00001f); @@ -531,8 +531,8 @@ void Aquas_801A9C98(Player* player) { i = D_i3_801C4190[0] - 1; actor = &gActors[i]; - if ((actor->obj.status != OBJ_ACTIVE) || ((player->unk_138 - 300.0f) <= actor->obj.pos.z) || - (actor->obj.pos.z <= (player->unk_138 - 7000.0f)) || (actor->obj.id != D_i3_801C4190[1]) || + if ((actor->obj.status != OBJ_ACTIVE) || ((player->trueZpos - 300.0f) <= actor->obj.pos.z) || + (actor->obj.pos.z <= (player->trueZpos - 7000.0f)) || (actor->obj.id != D_i3_801C4190[1]) || (actor->health == 0)) { D_i3_801C4190[0] = D_i3_801C4190[3] = D_i3_801C4190[5] = D_i3_801C4190[1] = 0; } else { @@ -577,8 +577,8 @@ void Aquas_801A9ED0(Player* player) { Vec3f sp64; f32* tempy; - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, player->rot.x * M_DTOR, MTXF_APPLY); sp70.x = 0.0f; sp70.y = 0.0f; @@ -604,9 +604,9 @@ void Aquas_801A9ED0(Player* player) { (temp_fa0 <= (player->pos.y + sp64.y)) && ((player->pos.x + sp64.x) <= temp_fv1) && (temp_fa1 <= (player->pos.x + sp64.x))) { if (D_i3_801C41B8[11] >= - fabsf(player->unk_138 - gBosses[0].obj.pos.z - gBosses[0].info.hitbox[j])) { + fabsf(player->trueZpos - gBosses[0].obj.pos.z - gBosses[0].info.hitbox[j])) { D_i3_801C41B8[11] = - fabsf(player->unk_138 - gBosses[0].obj.pos.z - gBosses[0].info.hitbox[j]); + fabsf(player->trueZpos - gBosses[0].obj.pos.z - gBosses[0].info.hitbox[j]); D_i3_801C4190[0] = 777; D_i3_801C4190[4] = i; D_i3_801C4190[1] = OBJ_BOSS_AQ; @@ -648,7 +648,7 @@ void Aquas_801AA20C(void) { } Matrix_Translate(gGfxMatrix, D_i3_801C41B8[0] + var_fs1, D_i3_801C41B8[1] + var_fs2, - D_i3_801C41B8[2] + gPlayer[0].unk_144, MTXF_APPLY); + D_i3_801C41B8[2] + gPlayer[0].zPath, MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_i3_801C41B8[5], D_i3_801C41B8[5], D_i3_801C41B8[5], MTXF_APPLY); for (i = 0; i < 4; i++) { @@ -661,7 +661,7 @@ void Aquas_801AA20C(void) { } } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); - Matrix_Translate(gGfxMatrix, D_i3_801C41B8[0], D_i3_801C41B8[1], D_i3_801C41B8[2] + gPlayer[0].unk_144, + Matrix_Translate(gGfxMatrix, D_i3_801C41B8[0], D_i3_801C41B8[1], D_i3_801C41B8[2] + gPlayer[0].zPath, MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_i3_801C41B8[5], D_i3_801C41B8[5], D_i3_801C41B8[5], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -681,7 +681,7 @@ void Aquas_801AA4BC(Player* player) { if ((gInputHold->button & Z_TRIG) && !(gInputHold->button & R_TRIG)) { sp3C = 90.0f; sp38 = 0.2f; - if (player->unk_12C < 70.0f) { + if (player->zRotBank < 70.0f) { Math_SmoothStepToF(&player->wings.unk_04, -70.0f, 0.3f, 100.0f, 0); Math_SmoothStepToF(&player->wings.unk_08, -70.0f, 0.3f, 100.0f, 0); Math_SmoothStepToF(&player->wings.unk_0C, 70.0f, 0.3f, 100.0f, 0); @@ -692,7 +692,7 @@ void Aquas_801AA4BC(Player* player) { if ((gInputHold->button & R_TRIG) && !(gInputHold->button & Z_TRIG)) { sp3C = -90.0f; sp38 = 0.2f; - if (player->unk_12C > -70.0f) { + if (player->zRotBank > -70.0f) { Math_SmoothStepToF(&player->wings.unk_04, 70.0f, 0.3f, 100.0f, 0); Math_SmoothStepToF(&player->wings.unk_08, 70.0f, 0.3f, 100.0f, 0); Math_SmoothStepToF(&player->wings.unk_0C, -70.0f, 0.3f, 100.0f, 0); @@ -700,53 +700,53 @@ void Aquas_801AA4BC(Player* player) { } } - Math_SmoothStepToF(&player->unk_12C, sp3C, sp38, 10.0f, 0); + Math_SmoothStepToF(&player->zRotBank, sp3C, sp38, 10.0f, 0); } if ((gInputPress->button & Z_TRIG) && (player->unk_230 == 0)) { player->sfx.bank = 1; - if (player->timer_1E0 != 0) { - player->unk_1DC = 1; + if (player->barrelInputTimerL != 0) { + player->barrelRoll = 1; player->timer_1E8 = 10; - player->unk_1EC = player->unk_1F0 = 30; + player->rollRate = player->baseRollRate = 30; player->sfx.roll = 1; } else { - player->timer_1E0 = 10; + player->barrelInputTimerL = 10; } } if ((gInputPress->button & R_TRIG) && (player->unk_230 == 0)) { player->sfx.bank = 1; - if (player->timer_1E4 != 0) { - player->unk_1DC = 1; + if (player->barrelInputTimerR != 0) { + player->barrelRoll = 1; player->timer_1E8 = 10; - player->unk_1EC = player->unk_1F0 = -30; + player->rollRate = player->baseRollRate = -30; player->sfx.roll = 1; } else { - player->timer_1E4 = 10; + player->barrelInputTimerR = 10; } } Math_SmoothStepToF(&player->unk_150, 1.0f, 0.05f, 10.0f, 0.0001f); - player->unk_130 = Math_ModF(player->unk_130, 360.0f); + player->zRotBarrelRoll = Math_ModF(player->zRotBarrelRoll, 360.0f); - if (player->unk_280 > 0) { - player->unk_280 -= 30; - if (player->unk_280 <= 0) { - player->unk_280 = 0; + if (player->barrelRollAlpha > 0) { + player->barrelRollAlpha -= 30; + if (player->barrelRollAlpha <= 0) { + player->barrelRollAlpha = 0; } } - if (player->unk_1DC == 0) { - Math_SmoothStepToF(&player->unk_130, 0.0f, 0.1f, 10.0f, 0.00001f); + if (player->barrelRoll == 0) { + Math_SmoothStepToF(&player->zRotBarrelRoll, 0.0f, 0.1f, 10.0f, 0.00001f); } - if (player->timer_1E0 != 0) { - player->timer_1E0--; + if (player->barrelInputTimerL != 0) { + player->barrelInputTimerL--; } - if (player->timer_1E4 != 0) { - player->timer_1E4--; + if (player->barrelInputTimerR != 0) { + player->barrelInputTimerR--; } if (player->timer_214 != 0) { player->timer_214--; @@ -758,25 +758,25 @@ void Aquas_801AA4BC(Player* player) { player->timer_1E8--; } - if (player->unk_1DC != 0) { - player->timer_1E0 = player->timer_1E4 = 0; + if (player->barrelRoll != 0) { + player->barrelInputTimerL = player->barrelInputTimerR = 0; player->unk_150 = 1.5f; - player->unk_130 += player->unk_1EC; + player->zRotBarrelRoll += player->rollRate; if (player->timer_1E8 == 0) { - if (player->unk_1EC > 0) { - player->unk_1EC -= 5; + if (player->rollRate > 0) { + player->rollRate -= 5; } - if (player->unk_1EC < 0) { - player->unk_1EC += 5; + if (player->rollRate < 0) { + player->rollRate += 5; } - if (player->unk_1EC == 0) { - player->unk_1DC = 0; + if (player->rollRate == 0) { + player->barrelRoll = 0; } } else { - if (player->unk_280 < 180) { - player->unk_280 += 60; - if (player->unk_280 > 180) { - player->unk_280 = 180; + if (player->barrelRollAlpha < 180) { + player->barrelRollAlpha += 60; + if (player->barrelRollAlpha > 180) { + player->barrelRollAlpha = 180; } } } @@ -800,27 +800,27 @@ void Aquas_801AA8E8(Player* player) { Math_SmoothStepToF(&player->unk_02C, var_fv1, 0.05f, 2.0f, 0.05f); } - gCsCamEyeX = (player->pos.x - player->unk_0AC) * (600.0f / player->unk_09C); + gCsCamEyeX = (player->pos.x - player->xPath) * (600.0f / player->pathWidth); gCsCamEyeX -= player->unk_030 * 1.5f; - gCsCamEyeX += player->unk_0AC + D_i3_801C41B8[9]; - gCsCamEyeY = player->pos.y * (740.0f / player->unk_0A0); + gCsCamEyeX += player->xPath + D_i3_801C41B8[9]; + gCsCamEyeY = player->pos.y * (740.0f / player->pathHeight); gCsCamEyeY -= player->unk_02C - 50.0f; - gCsCamEyeY += player->unk_0B0; - gCsCamAtX = (player->pos.x - player->unk_0AC - D_i3_801C41B8[9]) * (600.0f / player->unk_09C); - gCsCamAtX += player->unk_084 * -2.0f; + gCsCamEyeY += player->yPath; + gCsCamAtX = (player->pos.x - player->xPath - D_i3_801C41B8[9]) * (600.0f / player->pathWidth); + gCsCamAtX += player->xShake * -2.0f; gCsCamAtX -= player->unk_030 * 0.5f; - gCsCamAtX += player->unk_0AC; - gCsCamAtY = (player->pos.y - player->unk_0B0) * (750.0f / player->unk_0A0); + gCsCamAtX += player->xPath; + gCsCamAtY = (player->pos.y - player->yPath) * (750.0f / player->pathHeight); gCsCamAtY += player->unk_060 * 10.0f; gCsCamAtY -= player->unk_02C * -0.55f; - gCsCamAtY += player->unk_0B0 + D_i3_801C41B8[10]; + gCsCamAtY += player->yPath + D_i3_801C41B8[10]; if (gCsCamAtY < 20.0f) { gCsCamAtY = 20.0f; } gCsCamEyeZ = 240.0f; - gCsCamAtZ = player->unk_138 + (D_ctx_80177D20 - 1.0f); + gCsCamAtZ = player->trueZpos + (gPathProgress - 1.0f); Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, player->unk_014, 1000.0f, 0); Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, player->unk_014, 1000.0f, 0); @@ -832,7 +832,7 @@ void Aquas_801AA8E8(Player* player) { Math_SmoothStepToF(&player->unk_014, 1.0f, 1.0f, 0.05f, 0.0f); - temp = -player->unk_0EC; + temp = -player->rot.z; Math_SmoothStepToF(&player->camRoll, temp * 0.3f, 0.1f, 1.5f, 0.0f); } @@ -858,9 +858,9 @@ void Aquas_801AACF8(Player* player) { sp64 = -gInputPress->stick_x; sp5C = gInputPress->stick_y; - D_ctx_80177970 = 0.68f; + gPlayerTurnStickMod = 0.68f; - Math_SmoothStepToF(&player->unk_180, sp64 * D_ctx_80177970, 1.0f, 10.0f, 0.0001f); + Math_SmoothStepToF(&player->unk_180, sp64 * gPlayerTurnStickMod, 1.0f, 10.0f, 0.0001f); var_fa0 = fabsf(player->unk_180 * 0.5f); if (var_fa0 > 2.0f) { @@ -880,24 +880,24 @@ void Aquas_801AACF8(Player* player) { Math_SmoothStepToF(&D_i3_801C41B8[3], player->unk_180, 0.1f, 2.0f, 0.00001f); sp60 = D_i3_801C41B8[3]; - D_ctx_80177968 = 7.0f; + gPlayerTurnRate = 7.0f; - if ((player->pos.x < (-player->unk_09C + player->unk_0AC + 10.0f)) && (sp60 >= 20.0f)) { - D_ctx_80177968 = 2.0f; + if ((player->pos.x < (-player->pathWidth + player->xPath + 10.0f)) && (sp60 >= 20.0f)) { + gPlayerTurnRate = 2.0f; Math_SmoothStepToF(&D_i3_801C41B8[9], 30.0f, 0.1f, 10.0f, 0.0001f); } - if ((player->pos.x > (player->unk_09C + player->unk_0AC - 10.0f)) && (sp60 <= -20.0f)) { - D_ctx_80177968 = 2.0f; + if ((player->pos.x > (player->pathWidth + player->xPath - 10.0f)) && (sp60 <= -20.0f)) { + gPlayerTurnRate = 2.0f; Math_SmoothStepToF(&D_i3_801C41B8[9], -30.0f, 0.1f, 10.0f, 0.0001f); } - Math_SmoothStepToF(&player->unk_0E8, sp60, 0.3f, D_ctx_80177968, 0.00001f); + Math_SmoothStepToF(&player->rot.y, sp60, 0.3f, gPlayerTurnRate, 0.00001f); - if (D_ctx_80177968 != 2.0f) { + if (gPlayerTurnRate != 2.0f) { Math_SmoothStepToF(&D_i3_801C41B8[9], 0.0f, 0.1f, 20.0f, 0.0001f); } - Math_SmoothStepToF(&player->unk_17C, sp5C * D_ctx_80177970, 1.0f, 7.0f, 0.0001f); + Math_SmoothStepToF(&player->unk_17C, sp5C * gPlayerTurnStickMod, 1.0f, 7.0f, 0.0001f); var_fa1 = fabsf(player->unk_17C * 0.05f); if (var_fa1 > 2.0f) { @@ -917,12 +917,12 @@ void Aquas_801AACF8(Player* player) { Math_SmoothStepToF(&D_i3_801C41B8[4], player->unk_17C * -1.0f, 0.1f, 3.0f, 0.00001f); sp58 = D_i3_801C41B8[4] * 0.8f; - D_ctx_80177968 = 10.0f; + gPlayerTurnRate = 10.0f; if (player->pos.y < (gGroundHeight + 50.0f)) { if (sp58 <= 0.0f) { sp58 = 0.0f; - D_ctx_80177968 = 2.0f; + gPlayerTurnRate = 2.0f; if (D_i3_801C4190[7] == 0) { AUDIO_PLAY_SFX(0x09404028, player->sfxSource, 0); D_i3_801C4190[7] = 1; @@ -932,7 +932,7 @@ void Aquas_801AACF8(Player* player) { D_i3_801C4190[7] = 0; } - if ((player->unk_0A0 - 50.0f) <= player->pos.y) { + if ((player->pathHeight - 50.0f) <= player->pos.y) { if (sp58 >= 0.0f) { Math_SmoothStepToF(&D_i3_801C41B8[10], 30.0f, 1.0f, 1.0f, 0.00001f); } @@ -940,19 +940,19 @@ void Aquas_801AACF8(Player* player) { Math_SmoothStepToF(&D_i3_801C41B8[10], 0.0f, 0.1f, 1.0f, 0.00001f); } - Math_SmoothStepToF(&player->unk_0E4, sp58, 1.0f, D_ctx_80177968, 0.00001f); + Math_SmoothStepToF(&player->rot.x, sp58, 1.0f, gPlayerTurnRate, 0.00001f); var_fv1_2 = 2.0f; if (sp64 == 0.0f) { var_fv1_2 = 1.0f; } - Math_SmoothStepToF(&player->unk_0EC, player->unk_180 * 0.7f, 0.08f, var_fv1_2, 0.0001f); + Math_SmoothStepToF(&player->rot.z, player->unk_180 * 0.7f, 0.08f, var_fv1_2, 0.0001f); - player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; + player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->xRot_120 + player->rot.x + player->aerobaticPitch) * M_DTOR), MTXF_APPLY); sp8C.x = sp8C.y = 0.0f; sp8C.z = player->baseSpeed; @@ -962,8 +962,8 @@ void Aquas_801AACF8(Player* player) { sp68.x *= 1.4f; sp68.y *= 1.4f; - Matrix_RotateY(gCalcMatrix, player->unk_114 * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, player->unk_120 * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, player->yRot_114 * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, player->xRot_120 * M_DTOR, MTXF_APPLY); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp68, &sp80); @@ -978,33 +978,33 @@ void Aquas_801AACF8(Player* player) { player->pos.x += player->vel.x; - if (player->pos.x > player->unk_09C + player->unk_0AC) { - player->pos.x = player->unk_09C + player->unk_0AC; + if (player->pos.x > player->pathWidth + player->xPath) { + player->pos.x = player->pathWidth + player->xPath; player->vel.x = 0.0f; } - if (player->pos.x < player->unk_0AC - player->unk_09C) { - player->pos.x = player->unk_0AC - player->unk_09C; + if (player->pos.x < player->xPath - player->pathWidth) { + player->pos.x = player->xPath - player->pathWidth; player->vel.x = 0.0f; } player->pos.y += player->vel.y; - if (player->pos.y > player->unk_0A0) { - player->pos.y = player->unk_0A0; + if (player->pos.y > player->pathHeight) { + player->pos.y = player->pathHeight; player->vel.y = 0.0f; } - if (player->pos.y < player->unk_0A4) { - player->pos.y = player->unk_0A4; + if (player->pos.y < player->pathFloor) { + player->pos.y = player->pathFloor; player->vel.y = 0.0f; } - if (player->pos.x > (player->unk_0AC + (player->unk_09C - 100.0f))) { + if (player->pos.x > (player->xPath + (player->pathWidth - 100.0f))) { player->flags_228 = PFLAG_228_0; } - if (player->pos.x < (player->unk_0AC - (player->unk_09C - 100.0f))) { + if (player->pos.x < (player->xPath - (player->pathWidth - 100.0f))) { player->flags_228 = PFLAG_228_1; } - if (player->pos.y > (player->unk_0B0 + (player->unk_0A0 - 100.0f))) { + if (player->pos.y > (player->yPath + (player->pathHeight - 100.0f))) { player->flags_228 = PFLAG_228_3; } if (player->pos.y <= (gGroundHeight + 100)) { @@ -1021,16 +1021,16 @@ void Aquas_801AACF8(Player* player) { } player->pos.z += player->vel.z; - player->unk_138 = player->pos.z; - player->unk_060 = SIN_DEG(player->unk_0F4 * 0.7f) * 0.5f; - player->unk_088 += 10.0f; - player->unk_0F4 += 8.0f + D_i3_801C41B8[24]; - player->unk_080 = -SIN_DEG(player->unk_088) * 0.5f; - player->unk_0F0 = SIN_DEG(player->unk_0F4) * 1.5f; + player->trueZpos = player->pos.z; + player->unk_060 = SIN_DEG(player->rockPhase * 0.7f) * 0.5f; + player->bobPhase += 10.0f; + player->rockPhase += 8.0f + D_i3_801C41B8[24]; + player->yBob = -SIN_DEG(player->bobPhase) * 0.5f; + player->rockAngle = SIN_DEG(player->rockPhase) * 1.5f; if (player->pos.y < (gWaterLevel + 50.0f)) { - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + player->unk_114) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->rot.y + player->yRot_114) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, player->rot.x * M_DTOR, MTXF_APPLY); sp8C.x = sp8C.y = 0.0f; sp8C.z = 70.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp8C, &sp80); @@ -1038,22 +1038,22 @@ void Aquas_801AACF8(Player* player) { player->unk_178 -= 30.0f; Aquas_801AC8A8(player->pos.x + RAND_FLOAT_CENTERED(10.0f) + sp80.x, player->pos.y + RAND_FLOAT_CENTERED(10.0f) + sp80.y, - player->unk_138 + RAND_FLOAT_CENTERED(10.0f) + (sp80.z * -1.0f), 0.4f, 1); + player->trueZpos + RAND_FLOAT_CENTERED(10.0f) + (sp80.z * -1.0f), 0.4f, 1); } else { player->unk_178 -= 10.0f; if (((gGameFrameCount % 8) == 0)) { Aquas_801AC8A8(player->pos.x + RAND_FLOAT_CENTERED(10.0f) + sp80.x, player->pos.y + RAND_FLOAT_CENTERED(10.0f) + sp80.y, - player->unk_138 + RAND_FLOAT_CENTERED(20.0f) + sp80.z, 0.4f, 0); + player->trueZpos + RAND_FLOAT_CENTERED(20.0f) + sp80.z, 0.4f, 0); } } } } void Aquas_801AB9B0(Player* player) { - func_effect_8007D0E0(player->pos.x, player->pos.y, player->unk_138, 6.0f); - func_effect_8007B344(player->pos.x, player->pos.y, player->unk_138, 3.0f, 5); - func_effect_8007BFFC(player->pos.x, player->pos.y, player->unk_138, 0.0f, 0.0f, 0.0f, 3.0f, 80); + func_effect_8007D0E0(player->pos.x, player->pos.y, player->trueZpos, 6.0f); + func_effect_8007B344(player->pos.x, player->pos.y, player->trueZpos, 3.0f, 5); + func_effect_8007BFFC(player->pos.x, player->pos.y, player->trueZpos, 0.0f, 0.0f, 0.0f, 3.0f, 80); Cutscene_KillPlayer(player); } @@ -1070,7 +1070,7 @@ void Aquas_801ABA40(PlayerShot* shot) { D_i3_801C41B8[22] = shot->obj.pos.y; D_i3_801C41B8[23] = shot->obj.pos.z; - if ((fabsf(shot->obj.pos.z - (gPlayer[0].cam.eye.z - D_ctx_80177D20)) > 10000.0f) || + if ((fabsf(shot->obj.pos.z - (gPlayer[0].cam.eye.z - gPathProgress)) > 10000.0f) || (fabsf(shot->obj.pos.y - gPlayer[0].cam.eye.y) > 1500.0f) || ((fabsf(shot->obj.pos.x - gPlayer[0].cam.eye.x) > 4000.0f) && (shot->unk_5C != 0))) { shot->unk_64 = 0; @@ -1097,9 +1097,9 @@ void Aquas_801ABA40(PlayerShot* shot) { func_beam_80038140(shot); - shot->unk_2C = (shot->obj.pos.y * 0.01f) + 1.2f; - shot->unk_30 = (shot->obj.pos.y * 0.003f) + 0.6f; - shot->unk_34 = (shot->obj.pos.y * 0.001f) + 0.6f; + shot->vec_2C.x = (shot->obj.pos.y * 0.01f) + 1.2f; + shot->vec_2C.y = (shot->obj.pos.y * 0.003f) + 0.6f; + shot->vec_2C.z = (shot->obj.pos.y * 0.001f) + 0.6f; shot->unk_58 = (shot->obj.pos.y * -0.24f) + 150.0f; if (shot->unk_58 < 30) { shot->unk_58 = 30; @@ -1108,8 +1108,8 @@ void Aquas_801ABA40(PlayerShot* shot) { switch (shot->unk_5C) { case 0: shot->unk_64 = 50; - shot->obj.rot.y = gPlayer[0].unk_0E8; - shot->obj.rot.x = gPlayer[0].unk_0E4; + shot->obj.rot.y = gPlayer[0].rot.y; + shot->obj.rot.x = gPlayer[0].rot.x; shot->unk_5C++; break; @@ -1221,8 +1221,8 @@ void Aquas_801AC274(Player* player) { D_i3_801C4190[5] = D_i3_801C4190[3] = 0; } - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + player->unk_114) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->rot.y + player->yRot_114) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, player->rot.x * M_DTOR, MTXF_APPLY); sp68.x = 0.0f; sp68.y = 0.0f; @@ -1232,13 +1232,13 @@ void Aquas_801AC274(Player* player) { D_i3_801C41B8[6] = player->pos.x + sp5C.x; D_i3_801C41B8[7] = player->pos.y + sp5C.y; - D_i3_801C41B8[8] = player->unk_138 + sp5C.z; + D_i3_801C41B8[8] = player->trueZpos + sp5C.z; if (D_i3_801C4190[3] == 0) { if (D_i3_801C4190[0] == 0) { D_i3_801C41B8[0] = player->pos.x + sp5C.x; D_i3_801C41B8[1] = player->pos.y + sp5C.y; - D_i3_801C41B8[2] = player->unk_138 + sp5C.z; + D_i3_801C41B8[2] = player->trueZpos + sp5C.z; D_i3_801C41B8[5] = 3.0f; } @@ -1257,12 +1257,13 @@ void Aquas_801AC274(Player* player) { tempx1 = actor->obj.pos.x + actor->info.hitbox[var_v1 + 4] + actor->info.hitbox[var_v1 + 5] + 200.0f; tempx2 = actor->obj.pos.x + actor->info.hitbox[var_v1 + 4] - actor->info.hitbox[var_v1 + 5] - 200.0f; - if ((actor->health > 0) && (actor->timer_0C2 < 5) && (actor->obj.pos.z <= (player->unk_138 - 300.0f)) && - ((player->unk_138 - 7000.0f) <= actor->obj.pos.z) && (player->pos.y + sp5C.y <= tempy1) && + if ((actor->health > 0) && (actor->timer_0C2 < 5) && + (actor->obj.pos.z <= (player->trueZpos - 300.0f)) && + ((player->trueZpos - 7000.0f) <= actor->obj.pos.z) && (player->pos.y + sp5C.y <= tempy1) && (tempy2 <= player->pos.y + sp5C.y) && (player->pos.x + sp5C.x <= tempx1) && (tempx2 <= player->pos.x + sp5C.x) && - (fabsf(player->unk_138 - actor->obj.pos.z - actor->info.hitbox[var_v1 + 0]) < D_i3_801C41B8[11])) { - D_i3_801C41B8[11] = fabsf(player->unk_138 - actor->obj.pos.z - actor->info.hitbox[var_v1 + 0]); + (fabsf(player->trueZpos - actor->obj.pos.z - actor->info.hitbox[var_v1 + 0]) < D_i3_801C41B8[11])) { + D_i3_801C41B8[11] = fabsf(player->trueZpos - actor->obj.pos.z - actor->info.hitbox[var_v1 + 0]); D_i3_801C4190[0] = actor->index + 1; D_i3_801C4190[1] = actor->obj.id; } @@ -1298,7 +1299,7 @@ void Aquas_801AC274(Player* player) { if (D_i3_801C4190[5] == 0) { gLight3x = player->pos.x; gLight3y = player->pos.y - 5.0f; - gLight3z = player->unk_138 - 60.0f; + gLight3z = player->trueZpos - 60.0f; gLight3R += 4; gLight3G += 3; @@ -1328,7 +1329,7 @@ void Aquas_801AC7C8(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2, s3 effect->unk_4A = 40; effect->scale2 = scale2 * 0.2f; effect->unk_46 = 50; - effect->unk_60.y = gPlayer[0].unk_0E8 + gPlayer[0].unk_114; + effect->unk_60.y = gPlayer[0].rot.y + gPlayer[0].yRot_114; if (effect->state == 2) { effect->unk_46 = 100; } @@ -1435,11 +1436,11 @@ void Aquas_801ACE50(Player* player) { player->sfx.boost = 0; - if (player->timer_27C != 0) { - player->timer_27C--; + if (player->meteoWarpTimer != 0) { + player->meteoWarpTimer--; player->boostSpeed += 0.3f; - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + player->unk_114) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->rot.y + player->yRot_114) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, player->rot.x * M_DTOR, MTXF_APPLY); sp54.x = sp54.y = 0.0f; sp54.z = 70.0f; @@ -1447,19 +1448,19 @@ void Aquas_801ACE50(Player* player) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48); Aquas_801AC8A8(player->pos.x + RAND_FLOAT_CENTERED(10.0f) + sp48.x, player->pos.y + RAND_FLOAT_CENTERED(10.0f) + sp48.y, - player->unk_138 + RAND_FLOAT_CENTERED(10.0f) + (sp48.z * -1.0f), 0.4f, 1); - Math_SmoothStepToF(&player->unk_08C, -130.0f, 0.1f, 10.0f, 0.00001f); + player->trueZpos + RAND_FLOAT_CENTERED(10.0f) + (sp48.z * -1.0f), 0.4f, 1); + Math_SmoothStepToF(&player->camDist, -130.0f, 0.1f, 10.0f, 0.00001f); - player->unk_130 -= player->unk_258; - player->unk_258 += 0.2f; - if (player->unk_258 > 50.0f) { - player->unk_258 = 50.0f; + player->zRotBarrelRoll -= player->meteoWarpSpinSpeed; + player->meteoWarpSpinSpeed += 0.2f; + if (player->meteoWarpSpinSpeed > 50.0f) { + player->meteoWarpSpinSpeed = 50.0f; } if (((gGameFrameCount % 2) == 0) && (gBlurAlpha > 64)) { gBlurAlpha -= 1; } } else { - player->unk_258 = 0.0f; + player->meteoWarpSpinSpeed = 0.0f; if (gBlurAlpha < 255) { gBlurAlpha += 4; if (gBlurAlpha >= 252) { @@ -1489,7 +1490,7 @@ void Aquas_801ACE50(Player* player) { player->boostSpeed = 10.0f; } Math_SmoothStepToF(&D_i3_801C41B8[27], 10.0f, 0.1f, 2.0f, 0.00001f); - Math_SmoothStepToF(&player->unk_08C, -200.0f, 0.1f, D_i3_801C41B8[27], 0.00001f); + Math_SmoothStepToF(&player->camDist, -200.0f, 0.1f, D_i3_801C41B8[27], 0.00001f); player->sfx.boost = 1; Math_SmoothStepToF(&D_ctx_801779A8[0], 50.0f, 1.0f, 10.0f, 0.0f); } else { @@ -1509,7 +1510,7 @@ void Aquas_801ACE50(Player* player) { } } } - Math_SmoothStepToF(&player->unk_08C, 0.0f, 0.1f, 2.0f, 0.0f); + Math_SmoothStepToF(&player->camDist, 0.0f, 0.1f, 2.0f, 0.0f); } void Aquas_801AD328(Player* player) { @@ -1529,7 +1530,7 @@ void Aquas_801AD328(Player* player) { player->boostSpeed = -20.0f; } Math_SmoothStepToF(&D_i3_801C41B8[28], 10.0f, 1.0f, 2.0f, 0.00001f); - Math_SmoothStepToF(&player->unk_08C, 180.0f, 0.1f, D_i3_801C41B8[28], 0.0f); + Math_SmoothStepToF(&player->camDist, 180.0f, 0.1f, D_i3_801C41B8[28], 0.0f); player->sfx.brake = 1; Math_SmoothStepToF(&D_ctx_801779A8[0], 25.0f, 1.0f, 5.0f, 0.0f); } else { @@ -1551,7 +1552,7 @@ void Aquas_801AD328(Player* player) { } } } - Math_SmoothStepToF(&player->unk_08C, 0.0f, 0.1f, 2.0f, 0.0f); + Math_SmoothStepToF(&player->camDist, 0.0f, 0.1f, 2.0f, 0.0f); } void Aquas_801AD598(Actor* actor) { @@ -1600,7 +1601,7 @@ void Aquas_801AD6C0(Actor* actor) { actor->vel.z = 0.0f; } - if ((gPlayer[0].unk_138 + 500.0f) <= actor->obj.pos.z) { + if ((gPlayer[0].trueZpos + 500.0f) <= actor->obj.pos.z) { Object_Kill(&actor->obj, actor->sfxSource); } @@ -1624,9 +1625,9 @@ void Aquas_801AD6C0(Actor* actor) { break; case 1: - if (actor->unk_0D0 != 0) { + if (actor->dmgType != 0) { if (actor->health > 0) { - actor->unk_0D0 = 0; + actor->dmgType = 0; actor->timer_0C6 = 15; actor->health -= actor->damage; AUDIO_PLAY_SFX(0x29034045, actor->sfxSource, 4); @@ -1641,10 +1642,10 @@ void Aquas_801AD6C0(Actor* actor) { } } - if (actor->obj.pos.z <= (gPlayer[0].unk_138 - 200.0f)) { + if (actor->obj.pos.z <= (gPlayer[0].trueZpos - 200.0f)) { actor->fwork[7] = sp80 = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(100.0f) - actor->obj.pos.x; actor->fwork[8] = sp7C = gPlayer[0].pos.y - 30.0f - actor->obj.pos.y; - actor->fwork[9] = sp78 = gPlayer[0].unk_138 - actor->obj.pos.z; + actor->fwork[9] = sp78 = gPlayer[0].trueZpos - actor->obj.pos.z; } else { sp80 = actor->fwork[7]; sp7C = actor->fwork[8]; @@ -1679,10 +1680,10 @@ void Aquas_801AD6C0(Actor* actor) { } sp68 = Math_RadToDeg(Math_Atan2F(gPlayer[0].pos.x + sp80 + RAND_FLOAT_CENTERED(200.0f) - actor->obj.pos.x, - gPlayer[0].unk_138 + sp78 - actor->obj.pos.z)); + gPlayer[0].trueZpos + sp78 - actor->obj.pos.z)); sp6C = Math_RadToDeg(-Math_Atan2F(gPlayer[0].pos.y - 30.0f + sp7C - actor->obj.pos.y, sp70)); - if (gPlayer[0].unk_138 <= actor->obj.pos.z) { + if (gPlayer[0].trueZpos <= actor->obj.pos.z) { sp68 = actor->unk_0F4.y; sp6C = actor->unk_0F4.x; } @@ -1721,7 +1722,7 @@ void Aquas_801AD6C0(Actor* actor) { actor->iwork[1]--; if (actor->iwork[1] <= 0) { actor->itemDrop = DROP_NONE; - actor->unk_0D4 = 2; + actor->dmgSource = 2; Actor_Despawn(actor); Object_Kill(&actor->obj, actor->sfxSource); } @@ -1743,7 +1744,7 @@ void Aquas_801AD6C0(Actor* actor) { void Aquas_801ADF7C(f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 zRot, u8 type, s32 flag, f32 scale, s32 index) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, xPos, yPos, zPos + D_ctx_80177D20, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, xPos, yPos, zPos + gPathProgress, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, M_DTOR * yRot, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_DTOR * xRot, MTXF_APPLY); @@ -1802,9 +1803,9 @@ void Aquas_801AE168(Actor* actor) { if (i >= 2) { yRot = RAD_TO_DEG(Math_Atan2F(gPlayer[0].cam.eye.x - D_i3_801C27C0->pos.x, - gPlayer[0].cam.eye.z - (D_i3_801C27C0->pos.z + D_ctx_80177D20))); - xz = sqrtf(((gPlayer[0].cam.eye.z - (D_i3_801C27C0->pos.z + D_ctx_80177D20)) * - (gPlayer[0].cam.eye.z - (D_i3_801C27C0->pos.z + D_ctx_80177D20))) + + gPlayer[0].cam.eye.z - (D_i3_801C27C0->pos.z + gPathProgress))); + xz = sqrtf(((gPlayer[0].cam.eye.z - (D_i3_801C27C0->pos.z + gPathProgress)) * + (gPlayer[0].cam.eye.z - (D_i3_801C27C0->pos.z + gPathProgress))) + ((gPlayer[0].cam.eye.x - D_i3_801C27C0->pos.x) * (gPlayer[0].cam.eye.x - D_i3_801C27C0->pos.x))); xRot = RAD_TO_DEG(-Math_Atan2F(gPlayer[0].cam.eye.y - D_i3_801C27C0->pos.y, xz)); } @@ -1849,8 +1850,8 @@ void Aquas_801AE3D8(Actor* actor) { } } - if (actor->unk_0D0 != 0) { - actor->unk_0D0 = 0; + if (actor->dmgType != 0) { + actor->dmgType = 0; if ((fabsf(D_i3_801C4308[10]) >= 6.0f) && (gBosses[0].state >= 10) && (gBosses[0].swork[AQ_SWK_0] < 2)) { actor->timer_0C6 = 30; @@ -2118,8 +2119,8 @@ void Aquas_801AFA5C(Actor* actor) { actor->obj.rot.y = D_i3_801BFBC8[i]; actor->obj.rot.z = D_i3_801BFBD4[i]; } - if (actor->unk_0D0 != 0) { - actor->unk_0D0 = 0; + if (actor->dmgType != 0) { + actor->dmgType = 0; if ((gBosses[0].state >= 10) && (actor->health != 0) && (actor->damage == 31)) { actor->timer_0BE = 70; actor->health -= actor->damage; @@ -2343,7 +2344,7 @@ void Aquas_801B0B60(Actor* actor) { Vec3f sp44; Vec3f sp38; - if ((actor->unk_0D0 != 0) || (gBosses[0].state >= 16)) { + if ((actor->dmgType != 0) || (gBosses[0].state >= 16)) { actor->state = 3; } @@ -2395,7 +2396,7 @@ void Aquas_801B0B60(Actor* actor) { case 3: if (Rand_ZeroOne() < 0.1) { actor->itemDrop = DROP_SILVER_RING_10p; - actor->unk_0D4 = 2; + actor->dmgSource = 2; Actor_Despawn(actor); } Object_Kill(&actor->obj, actor->sfxSource); @@ -2551,7 +2552,7 @@ void Aquas_801B134C(Boss* bossAQ) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 40); Radio_PlayMessage(gMsg_ID_15100, RCID_FOX); } - if (fabsf(bossAQ->obj.pos.z - gPlayer[0].unk_138) <= 3000.0f) { + if (fabsf(bossAQ->obj.pos.z - gPlayer[0].trueZpos) <= 3000.0f) { D_i3_801C4190[6] = 1; bossAQ->timer_056 = 20; Audio_PlaySequence(SEQ_PLAYER_BGM, SEQ_ID_AQ_BOSS | SEQ_FLAG, 0, 1); @@ -2827,13 +2828,13 @@ void Aquas_801B134C(Boss* bossAQ) { if (bossAQ->timer_058 != 0) { gPlayer[0].boostCooldown = 1; Math_SmoothStepToF(&D_i3_801C41B8[24], 20.0f, 0.1f, 1.0f, 0.0f); - Math_SmoothStepToF(&gPlayer[0].unk_08C, 180.0f, 0.4f, 20.0f, 0.0f); + Math_SmoothStepToF(&gPlayer[0].camDist, 180.0f, 0.4f, 20.0f, 0.0f); } else { Math_SmoothStepToF(&D_i3_801C41B8[24], 0.0f, 0.01f, 0.1f, 0.0f); - Math_SmoothStepToF(&gPlayer[0].unk_08C, 0.0f, 0.1f, 2.0f, 0.0f); - if (gPlayer[0].unk_08C < 0.1f) { + Math_SmoothStepToF(&gPlayer[0].camDist, 0.0f, 0.1f, 2.0f, 0.0f); + if (gPlayer[0].camDist < 0.1f) { gPlayer[0].boostCooldown = 0; - gPlayer[0].unk_08C = D_i3_801C41B8[24] = 0.0f; + gPlayer[0].camDist = D_i3_801C41B8[24] = 0.0f; bossAQ->swork[AQ_SWK_0] = 0; } } @@ -2943,7 +2944,7 @@ void Aquas_801B134C(Boss* bossAQ) { if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; - gPlayer[0].unk_1D0 = 0; + gPlayer[0].csState = 0; } D_i3_801C4190[1] = 0; D_i3_801C4190[5] = 0; @@ -3027,7 +3028,7 @@ void Aquas_801B134C(Boss* bossAQ) { if ((bossAQ->state >= 4) && (bossAQ->state < 16)) { sp104 = gPlayer[0].pos.x - bossAQ->obj.pos.x; sp100 = gPlayer[0].pos.y - bossAQ->obj.pos.y; - spFC = gPlayer[0].unk_138 - bossAQ->obj.pos.z; + spFC = gPlayer[0].trueZpos - bossAQ->obj.pos.z; spE8 = Math_RadToDeg(Math_Atan2F(sp104, spFC)); // spEC = sqrtf(SQ(sp104) + SQ(spFC)); spE4 = Math_RadToDeg(-Math_Atan2F(sp100, sqrtf(SQ(sp104) + SQ(spFC)))); @@ -3062,10 +3063,10 @@ void Aquas_801B134C(Boss* bossAQ) { spF4 = gPlayer[0].pos.y - D_i3_801C4308[77]; spF8 = gPlayer[0].pos.x - D_i3_801C4308[76]; - spF0 = gPlayer[0].unk_138 - D_i3_801C4308[78]; + spF0 = gPlayer[0].trueZpos - D_i3_801C4308[78]; sp104 = gPlayer[0].pos.x - D_i3_801C4308[73]; sp100 = gPlayer[0].pos.y - D_i3_801C4308[74]; - spFC = gPlayer[0].unk_138 - D_i3_801C4308[75]; + spFC = gPlayer[0].trueZpos - D_i3_801C4308[75]; spE8 = Math_RadToDeg(Math_Atan2F(sp104, spFC)); spE0 = Math_RadToDeg(Math_Atan2F(spF8, spF0)); @@ -3692,8 +3693,8 @@ void Aquas_801B50E8(Actor* actor) { break; case 2: - Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].unk_138, 1.0f, 10.0f, 0); - if (fabsf(actor->obj.pos.z - gPlayer[0].unk_138) < actor->fwork[4]) { + Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].trueZpos, 1.0f, 10.0f, 0); + if (fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < actor->fwork[4]) { Aquas_801A9728(actor, 50.0f, 10.0f, 8); actor->state = 3; actor->vel.y = 30.0f; @@ -3714,7 +3715,7 @@ void Aquas_801B50E8(Actor* actor) { case 4: Math_SmoothStepToF(&actor->vel.y, 0.0f, 1.0f, 4.0f, 0.0001f); actor->vel.z = gPlayer[0].vel.z; - Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].unk_138 - actor->fwork[4], 0.1f, 100.0f, 0); + Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].trueZpos - actor->fwork[4], 0.1f, 100.0f, 0); Math_SmoothStepToF(&actor->obj.pos.y, actor->fwork[0], 1.0f, D_i3_801C0224[actor->iwork[1]], 0); actor->fwork[1] += 10.0f; actor->vel.x = COS_DEG(actor->fwork[1]) * actor->iwork[1] * 0.1f; @@ -3730,7 +3731,7 @@ void Aquas_801B50E8(Actor* actor) { case 5: actor->vel.z = gPlayer[0].vel.z; - Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].unk_138 - 1000.0f, 0.1f, 100.0f, 0); + Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].trueZpos - 1000.0f, 0.1f, 100.0f, 0); Math_SmoothStepToF(&actor->vel.x, 0.0f, 1.0f, 2.0f, 0.001f); Math_SmoothStepToAngle(&actor->obj.rot.x, D_i3_801C025C[actor->iwork[0]], 1.0f, 20.0f, 0); if (actor->obj.rot.x == D_i3_801C025C[actor->iwork[0]]) { @@ -3738,7 +3739,7 @@ void Aquas_801B50E8(Actor* actor) { if (actor->iwork[0] >= 2) { sp88.x = gPlayer[0].pos.x - actor->obj.pos.x; sp88.y = gPlayer[0].pos.y - actor->obj.pos.y; - sp88.z = gPlayer[0].unk_138 - actor->obj.pos.z; + sp88.z = gPlayer[0].trueZpos - actor->obj.pos.z; actor->fwork[2] = Math_RadToDeg(Math_Atan2F(sp88.x, sp88.z)); actor->fwork[3] = Math_RadToDeg(-Math_Atan2F(sp88.y, sqrtf(SQ(sp88.x) + SQ(sp88.z)))); Matrix_RotateY(gCalcMatrix, actor->fwork[2] * M_DTOR, MTXF_NEW); @@ -3789,8 +3790,8 @@ void Aquas_801B50E8(Actor* actor) { } } - if (actor->unk_0D0 != 0) { - actor->unk_0D0 = 0; + if (actor->dmgType != 0) { + actor->dmgType = 0; if (actor->health != 0) { if (actor->damage == 31) { actor->info.bonus = 1; @@ -4048,7 +4049,7 @@ void Aquas_801B638C(Actor* actor) { actor->iwork[15] = 1; } if (actor->iwork[15] != 0) { - if ((gPlayer[0].unk_138 + 300.0f) < actor->obj.pos.z) { + if ((gPlayer[0].trueZpos + 300.0f) < actor->obj.pos.z) { Object_Kill(&actor->obj, actor->sfxSource); } } else { @@ -4106,7 +4107,7 @@ void Aquas_801B638C(Actor* actor) { actor->vel.x = actor->vel.y = actor->vel.z = 0.0f; } - if ((actor->iwork[14] != 0) && (actor->obj.pos.z < (gPlayer[0].unk_138 - 2000.0f))) { + if ((actor->iwork[14] != 0) && (actor->obj.pos.z < (gPlayer[0].trueZpos - 2000.0f))) { actor->iwork[14] = 0; actor->timer_0BC = 500; } @@ -4114,9 +4115,9 @@ void Aquas_801B638C(Actor* actor) { break; } - if (actor->unk_0D0 != 0) { - actor->unk_0D0 = 0; - if ((actor->health != 0) && (actor->unk_0D2 == 0)) { + if (actor->dmgType != 0) { + actor->dmgType = 0; + if ((actor->health != 0) && (actor->dmgPart == 0)) { actor->health -= actor->damage; actor->timer_0C6 = 30; AUDIO_PLAY_SFX(0x2903408F, actor->sfxSource, 4); @@ -4181,7 +4182,7 @@ void Aquas_801B6FF8(Actor* actor) { actor->timer_0BC = 200; actor->fwork[1] = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(800.0f); actor->fwork[2] = gPlayer[0].pos.y + 50.0f + RAND_FLOAT(100.0f); - actor->fwork[3] = gPlayer[0].unk_138 - 1500.0f; + actor->fwork[3] = gPlayer[0].trueZpos - 1500.0f; if (actor->fwork[1] > 700.0f) { actor->fwork[1] = 700.0f; } @@ -4189,7 +4190,7 @@ void Aquas_801B6FF8(Actor* actor) { actor->fwork[1] = -700.0f; } if (Rand_ZeroOne() < 0.2f) { - actor->fwork[3] = gPlayer[0].unk_138 - 800.0f; + actor->fwork[3] = gPlayer[0].trueZpos - 800.0f; actor->fwork[1] = gPlayer[0].pos.x; actor->fwork[2] = gPlayer[0].pos.y + 50.0f; } @@ -4244,8 +4245,8 @@ void Aquas_801B6FF8(Actor* actor) { actor->unk_0B6 = 0; } - if (actor->unk_0D0 != 0) { - actor->unk_0D0 = 0; + if (actor->dmgType != 0) { + actor->dmgType = 0; if (actor->health > -100) { actor->timer_0C6 = 15; actor->health -= actor->damage; @@ -4424,7 +4425,7 @@ void Aquas_801B7C78(Actor* actor) { if (actor->state != 6) { spAC = gPlayer[0].pos.x - actor->obj.pos.x; Math_SmoothStepToAngle(&actor->obj.rot.y, - Math_RadToDeg(Math_Atan2F(spAC, gPlayer[0].unk_138 - actor->obj.pos.z)), 1.0f, 5.0f, + Math_RadToDeg(Math_Atan2F(spAC, gPlayer[0].trueZpos - actor->obj.pos.z)), 1.0f, 5.0f, 0.001f); } @@ -4444,8 +4445,8 @@ void Aquas_801B7C78(Actor* actor) { } Math_SmoothStepToF(&actor->fwork[1], actor->fwork[2], 0.1f, 2.0f, 0.00001f); - Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].cam.eye.z - D_ctx_80177D20 + actor->fwork[3], 0.1f, - actor->fwork[1], 0.00001); + Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].cam.eye.z - gPathProgress + actor->fwork[3], 0.1f, actor->fwork[1], + 0.00001); if ((actor->state == 1) && (fabsf(actor->fwork[7] - actor->obj.pos.z) >= 10000.0f)) { actor->timer_0C0 = 20; @@ -4531,7 +4532,7 @@ void Aquas_801B7C78(Actor* actor) { if (actor->unk_0B6 == 20) { spAC = gPlayer[0].pos.x - effect->obj.pos.x; temp_dy = gPlayer[0].pos.y - effect->obj.pos.y; - temp_dz = gPlayer[0].unk_138 - 50.0f - effect->obj.pos.z; + temp_dz = gPlayer[0].trueZpos - 50.0f - effect->obj.pos.z; temp_fs2 = Math_RadToDeg(Math_Atan2F(spAC, temp_dz)); temp1 = Math_RadToDeg(-Math_Atan2F(temp_dy, sqrtf(SQ(spAC) + SQ(temp_dz)))); @@ -4565,7 +4566,7 @@ void Aquas_801B7C78(Actor* actor) { if (actor->unk_0B6 == 57) { spAC = gPlayer[0].pos.x - effect->obj.pos.x; temp_dy = gPlayer[0].pos.y - effect->obj.pos.y; - temp_dz = gPlayer[0].unk_138 - 50.0f - effect->obj.pos.z; + temp_dz = gPlayer[0].trueZpos - 50.0f - effect->obj.pos.z; temp_fs2 = Math_RadToDeg(Math_Atan2F(spAC, temp_dz)); temp1 = Math_RadToDeg(-Math_Atan2F(temp_dy, sqrtf(SQ(spAC) + SQ(temp_dz)))); @@ -4603,7 +4604,7 @@ void Aquas_801B7C78(Actor* actor) { if (actor->timer_0C0 == 0) { temp_dy = gPlayer[0].pos.y - 50.0f - actor->obj.pos.y; - temp_dz = gPlayer[0].unk_138 - actor->obj.pos.z; + temp_dz = gPlayer[0].trueZpos - actor->obj.pos.z; temp1 = Math_RadToDeg(-Math_Atan2F(temp_dy, sqrtf(SQ(spAC) + SQ(temp_dz)))); Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, M_DTOR * temp1, MTXF_APPLY); @@ -4648,8 +4649,8 @@ void Aquas_801B7C78(Actor* actor) { actor->health = 0; } - if (actor->unk_0D0 != 0) { - actor->unk_0D0 = 0; + if (actor->dmgType != 0) { + actor->dmgType = 0; if (actor->health != 0) { actor->info.bonus = 0; if (actor->damage == 31) { @@ -4902,10 +4903,10 @@ void Aquas_801B91A4(Actor* actor) { } } - if ((actor->unk_0B6 > 36) && (i != 0) && (fabsf(gPlayer[0].unk_138 - actor->obj.pos.z) > 1000.0f)) { + if ((actor->unk_0B6 > 36) && (i != 0) && (fabsf(gPlayer[0].trueZpos - actor->obj.pos.z) > 1000.0f)) { spfA4 = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(200.0f) - actor->vwork[26].x; spA0 = gPlayer[0].pos.y + RAND_FLOAT_CENTERED(200.0f) - actor->vwork[26].y; - spf9C = gPlayer[0].unk_138 + RAND_FLOAT_CENTERED(200.0f) - actor->vwork[26].z; + spf9C = gPlayer[0].trueZpos + RAND_FLOAT_CENTERED(200.0f) - actor->vwork[26].z; sp94 = Math_RadToDeg(Math_Atan2F(spfA4, spf9C)); spf98 = Math_RadToDeg(-Math_Atan2F(spA0, sqrtf(SQ(spfA4) + SQ(spf9C)))); Matrix_RotateY(gCalcMatrix, M_DTOR * sp94, MTXF_NEW); @@ -4957,8 +4958,8 @@ void Aquas_801B91A4(Actor* actor) { break; } - if (actor->unk_0D0 != 0) { - actor->unk_0D0 = 0; + if (actor->dmgType != 0) { + actor->dmgType = 0; if ((actor->health != 0) && (actor->state != 0)) { actor->timer_0C6 = 15; actor->health -= actor->damage; @@ -5099,7 +5100,7 @@ void Aquas_801BA26C(Actor* actor) { if ((fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 150.0f) && (fabsf(actor->obj.pos.y - gPlayer[0].pos.y) < 500.0f) && - (fabsf(actor->obj.pos.z - gPlayer[0].unk_138) < 700.0f)) { + (fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 700.0f)) { actor->state = 2; actor->fwork[0] = 0.0f; } @@ -5113,7 +5114,7 @@ void Aquas_801BA26C(Actor* actor) { sp3E = Animation_GetFrameData(&D_AQ_601DE50, actor->unk_0B6, sp40); if ((fabsf(actor->obj.pos.x - gPlayer[0].pos.x) > 150.0f) || (fabsf(actor->obj.pos.y - gPlayer[0].pos.y) > 500.0f) || - (fabsf(actor->obj.pos.z - gPlayer[0].unk_138) > 700.0f)) { + (fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) > 700.0f)) { actor->state = 1; actor->fwork[0] = 0.0f; } @@ -5207,8 +5208,8 @@ void Aquas_801BA6A4(Actor* actor) { break; } - if (actor->unk_0D0 != 0) { - actor->unk_0D0 = 0; + if (actor->dmgType != 0) { + actor->dmgType = 0; actor->health -= actor->damage; if (actor->health <= 0) { actor->health = actor->itemDrop = 0; @@ -5274,10 +5275,10 @@ void Aquas_801BADF8(Actor* actor) { break; case 1: - if (actor->unk_0D0 != 0) { - actor->unk_0D0 = 0; + if (actor->dmgType != 0) { + actor->dmgType = 0; if (actor->damage == 0) { - gPlayer[0].unk_1F4 = 6; + gPlayer[0].hitTimer = 6; gPlayer[0].unk_21C = 0; } actor->state++; @@ -5737,8 +5738,8 @@ void Aquas_801BB79C(Actor* actor) { actor->iwork[9] = actor->iwork[12] = 0; } - if (actor->unk_0D0 != 0) { - actor->unk_0D0 = 0; + if (actor->dmgType != 0) { + actor->dmgType = 0; AUDIO_PLAY_SFX(0x2903408F, actor->sfxSource, 4); if (actor->damage != 31) { actor->timer_0C0 = actor->timer_0C6 = 40; @@ -5881,8 +5882,8 @@ void Aquas_801BC9A0(Actor* actor) { break; case 1: - if (actor->unk_0D0 != 0) { - actor->unk_0D0 = 0; + if (actor->dmgType != 0) { + actor->dmgType = 0; if ((actor->health != 0) && (actor->iwork[3] == 0) && (actor->damage == 31)) { actor->health -= actor->damage; AUDIO_PLAY_SFX(0x2903B009, actor->sfxSource, 4); @@ -6142,7 +6143,7 @@ void Aquas_801BD54C(Actor* actor) { actor->timer_0BC = 0; } else { Math_SmoothStepToF(&actor->fwork[3], D_i3_801C04F4[actor->iwork[1]], 0.1f, 30.0f, 0.0001f); - Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].cam.eye.z - D_ctx_80177D20 - actor->fwork[3], 0.1f, + Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].cam.eye.z - gPathProgress - actor->fwork[3], 0.1f, 30.0f, 0.00001f); } @@ -6159,7 +6160,7 @@ void Aquas_801BD54C(Actor* actor) { sp5C = gPlayer[0].pos.x - actor->obj.pos.x; sp58 = gPlayer[0].pos.y - actor->obj.pos.y; - sp54 = gPlayer[0].unk_138 - actor->obj.pos.z; + sp54 = gPlayer[0].trueZpos - actor->obj.pos.z; if (actor->timer_0BE == 0) { actor->iwork[2] = 0; @@ -6167,7 +6168,7 @@ void Aquas_801BD54C(Actor* actor) { if (D_i3_801C4190[5] == 0) { sp5C = gPlayer[0].pos.x + actor->fwork[1] - actor->obj.pos.x; sp58 = gPlayer[0].pos.y - 100.0f + actor->fwork[2] - actor->obj.pos.y; - sp54 = gPlayer[0].unk_138 - actor->fwork[3] - actor->obj.pos.z; + sp54 = gPlayer[0].trueZpos - actor->fwork[3] - actor->obj.pos.z; } else if ((D_i3_801C41B8[21] != 0) && (D_i3_801C41B8[22] != 0) && (D_i3_801C41B8[23] != 0)) { sp5C = D_i3_801C41B8[21] - actor->obj.pos.x; sp58 = D_i3_801C41B8[22] - actor->obj.pos.y; @@ -6185,7 +6186,7 @@ void Aquas_801BD54C(Actor* actor) { actor->iwork[0]--; sp5C = gPlayer[0].pos.x + actor->fwork[1] - actor->obj.pos.x; sp58 = gPlayer[0].pos.y + actor->fwork[2] - actor->obj.pos.y; - sp54 = gPlayer[0].unk_138 - actor->fwork[3] - actor->obj.pos.z; + sp54 = gPlayer[0].trueZpos - actor->fwork[3] - actor->obj.pos.z; if (actor->iwork[0] < 0) { actor->iwork[0] = 0; } @@ -6218,13 +6219,13 @@ void Aquas_801BD54C(Actor* actor) { case 3: sp5C = gPlayer[0].pos.x + actor->fwork[1] - actor->obj.pos.x; sp58 = gPlayer[0].pos.y + actor->fwork[2] - actor->obj.pos.y; - sp54 = gPlayer[0].unk_138 + 10000.0f - actor->fwork[3] - actor->obj.pos.z; + sp54 = gPlayer[0].trueZpos + 10000.0f - actor->fwork[3] - actor->obj.pos.z; actor->iwork[2] = 1; Aquas_801BD3B0(actor, sp5C, sp58, sp54); - if ((gPlayer[0].unk_138 + 1000.0f) < actor->obj.pos.z) { + if ((gPlayer[0].trueZpos + 1000.0f) < actor->obj.pos.z) { Object_Kill(&actor->obj, actor->sfxSource); } break; @@ -6293,7 +6294,7 @@ void Aquas_801BDF14(void) { for (i = 0; i < 50; i++, actor++) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = D_i3_801C0504[i].x; actor->obj.pos.y = D_i3_801C0504[i].y; actor->obj.pos.z = D_i3_801C0504[i].z; @@ -6321,7 +6322,7 @@ void Aquas_801BE034(Actor* actor) { actor->iwork[0] = 0; } - if (gPlayer[0].unk_1D0 >= 5) { + if (gPlayer[0].csState >= 5) { Object_Kill(&actor->obj, actor->sfxSource); } } @@ -6410,11 +6411,11 @@ void Aquas_801BE3F8(Actor* actor) { if ((actor->unk_0B6 == 18) && (actor->health != 0)) { actor->unk_0B6 = 17; - if ((fabsf(actor->obj.pos.z - gPlayer[0].unk_138) > 1000.0f) && (actor->timer_0BC < 20) && + if ((fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) > 1000.0f) && (actor->timer_0BC < 20) && ((actor->timer_0BC & 3) == 0)) { sp68 = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(200.0f) - actor->obj.pos.x; sp64 = gPlayer[0].pos.y + RAND_FLOAT_CENTERED(200.0f) - actor->obj.pos.y; - sp60 = gPlayer[0].unk_138 - actor->obj.pos.z; + sp60 = gPlayer[0].trueZpos - actor->obj.pos.z; sp58 = Math_RadToDeg(Math_Atan2F(sp68, sp60)); sp5C = Math_RadToDeg(-Math_Atan2F(sp64, sqrtf(SQ(sp68) + SQ(sp60)))); Aquas_801BE274(actor, sp58, sp5C); @@ -6435,8 +6436,8 @@ void Aquas_801BE3F8(Actor* actor) { break; } - if (actor->unk_0D0 != 0) { - actor->unk_0D0 = 0; + if (actor->dmgType != 0) { + actor->dmgType = 0; if (actor->health != 0) { if (actor->state == 2) { actor->health -= actor->damage; diff --git a/src/overlays/ovl_i3/fox_so.c b/src/overlays/ovl_i3/fox_so.c index be76e90f..3b9fb96f 100644 --- a/src/overlays/ovl_i3/fox_so.c +++ b/src/overlays/ovl_i3/fox_so.c @@ -240,10 +240,10 @@ void Solar_8019EA7C(Actor* actor) { s32 sp30; if (actor->state == 0) { - actor->vel.z = 20.0f - D_ctx_80177D08; + actor->vel.z = 20.0f - gPathVelZ; actor->fwork[0] = 12.0f; } else { - actor->vel.z = actor->fwork[1] - D_ctx_80177D08; + actor->vel.z = actor->fwork[1] - gPathVelZ; if (actor->state == 2) { Math_SmoothStepToF(&actor->obj.pos.x, gPlayer[0].pos.x, 1.0f, 100.0f, 10.0f); } else { @@ -293,7 +293,7 @@ void Solar_8019EA7C(Actor* actor) { D_ctx_801782EC[sp30 - 12] = actor->fwork[0] * 0.1f; } } - switch (actor->unk_0D0) { + switch (actor->dmgType) { case 3: Solar_801A8DB8(&actor->obj.pos, 0x11002052, actor->vel.z); /* fallthrough */ @@ -436,7 +436,7 @@ void Solar_8019F20C(Actor* actor) { Solar_8019E9F4(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, actor->scale * 6.5f, 2); } - if ((actor->unk_0D0 != 0) || ((actor->obj.id == OBJ_ACTOR_277) && (actor->vel.y < 0.0f))) { + if ((actor->dmgType != 0) || ((actor->obj.id == OBJ_ACTOR_277) && (actor->vel.y < 0.0f))) { func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, actor->scale * 4.0f); Object_Kill(&actor->obj, actor->sfxSource); if (actor->obj.id == OBJ_ACTOR_277) { @@ -938,7 +938,7 @@ void Solar_801A0FD4(Actor* actor, s32 index) { if (gTeamShields[3 - index] > 0) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = D_i3_801BF95C[index].x + gPlayer[0].pos.x; actor->obj.pos.y = D_i3_801BF95C[index].y + gPlayer[0].pos.y; actor->obj.pos.z = D_i3_801BF95C[index].z + gPlayer[0].pos.z; @@ -964,11 +964,11 @@ void Solar_LevelStart(Player* player) { if (D_ctx_80177A10[1] != 0) { D_ctx_80177A10[1]--; } - switch (player->unk_1D0) { + switch (player->csState) { case 0: gCsFrameCount = 0; Rand_SetSeed(1, 29100, 9786); - player->unk_1D0 = 1; + player->csState = 1; player->cam.eye.x = -2000.0f; gCsCamEyeX = -2800.0f; player->cam.eye.y = gCsCamEyeY = 120.0f; @@ -991,7 +991,7 @@ void Solar_LevelStart(Player* player) { AUDIO_PLAY_SFX(0x3140807E, player->sfxSource, 0); break; case 1: - D_ctx_80177CE8 += 30.0f; + gPathTexScroll += 30.0f; if (gCsFrameCount == 140) { Solar_801A0DF8(-400.0f, -2000.0f, 45.0f, 3, 1.0f); } @@ -1019,7 +1019,7 @@ void Solar_LevelStart(Player* player) { } if (((gGameFrameCount % 8) == 0)) { Solar_8019E8B8(RAND_FLOAT_CENTERED(6000.0f), RAND_FLOAT_CENTERED(5.0f) - 90.0f, - RAND_FLOAT(2000.0f) - 6000.0f + D_ctx_80177D20, RAND_FLOAT(20.0f) + 20.0f); + RAND_FLOAT(2000.0f) - 6000.0f + gPathProgress, RAND_FLOAT(20.0f) + 20.0f); } if (gCsFrameCount == 380) { for (i = 0; i < 100; i++) { @@ -1028,7 +1028,7 @@ void Solar_LevelStart(Player* player) { Solar_801A0DF8(400.0f, -2800.0f, 340.0f, 1, 1.0f); } if (gCsFrameCount == 410) { - player->unk_1D0++; + player->csState++; player->cam.eye.x = 200.0f; gCsCamEyeX = 800.0f; player->cam.eye.y = 140.0f; @@ -1056,7 +1056,7 @@ void Solar_LevelStart(Player* player) { } break; case 2: - D_ctx_80177CE8 += 60.0f; + gPathTexScroll += 60.0f; gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 8; Math_SmoothStepToF(D_ctx_80177A48, 0.02f, 1.0f, 0.0000003f, 0.0f); @@ -1068,7 +1068,7 @@ void Solar_LevelStart(Player* player) { Solar_801A0DF8(30.0f, -1500.0f, 160.0f, 3, 2.0f); } if (player->cam.eye.z <= -2465.0f) { - player->unk_1D0++; + player->csState++; gCsCamEyeY = player->pos.y + 180.0f; gCsCamAtX = 0.0f; gCsCamEyeX = 0.0f; @@ -1077,10 +1077,10 @@ void Solar_LevelStart(Player* player) { } break; case 3: - D_ctx_80177CE8 += 60.0f; + gPathTexScroll += 60.0f; if (((gGameFrameCount % 4) == 0)) { Solar_8019E8B8(RAND_FLOAT_CENTERED(6000.0f), -400.0f - ((player->cam.eye.y - 1380.0f) * 0.3f), - RAND_FLOAT_CENTERED(2000.0f) + 500.0f + D_ctx_80177D20, RAND_FLOAT(20.0f) + 20.0f); + RAND_FLOAT_CENTERED(2000.0f) + 500.0f + gPathProgress, RAND_FLOAT(20.0f) + 20.0f); } if (gCsFrameCount == 615) { func_play_800A6028(player->sfxSource, 0x09000002); @@ -1088,23 +1088,23 @@ void Solar_LevelStart(Player* player) { gActors[0].state = 3; gActors[1].state = 2; gActors[2].state = 1; - player->timer_1F8 = 3; + player->csTimer = 3; player->unk_190 = 5.0f; - player->unk_1D0++; + player->csState++; player->unk_194 = 5.0f; } break; case 4: gCsCamEyeX = player->pos.x; gCsCamEyeY = player->pos.y; - gCsCamEyeZ = player->unk_138 + 1000.0f; + gCsCamEyeZ = player->trueZpos + 1000.0f; gCsCamAtX = player->pos.x; gCsCamAtY = player->pos.y; - gCsCamAtZ = player->unk_138 + 1100.0f; + gCsCamAtZ = player->trueZpos + 1100.0f; D_ctx_80177A48[0] = 0.03f; D_ctx_801779A8[gMainController] = 60.0f; player->unk_190 = 2.0f; - if (player->timer_1F8 == 0) { + if (player->csTimer == 0) { gFillScreenAlphaTarget = 255; gFillScreenAlphaStep = 24; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; @@ -1116,7 +1116,7 @@ void Solar_LevelStart(Player* player) { Play_ClearObjectData(); gLevelStartStatusScreenTimer = 50; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; - player->unk_1D0 = 0; + player->csState = 0; player->pos.y = 350.0f; player->cam.eye.x = player->pos.x; @@ -1125,19 +1125,19 @@ void Solar_LevelStart(Player* player) { player->cam.at.x = player->pos.x; player->cam.at.y = 20.0f + player->pos.y * player->unk_148; - player->cam.at.z = player->unk_138; + player->cam.at.z = player->trueZpos; D_ctx_80177950 = 1.0f; Audio_SetHeatAlarmParams(255, 3); AUDIO_PLAY_SFX(0x4100C023, gDefaultSfxSource, 4); gLoadLevelObjects = 1; gFillScreenAlphaTarget = 0; - player->timer_1F8 = 15; + player->csTimer = 15; gPlayer[0].shields = 255; } break; case 10: - D_ctx_80177CE8 += 60.0f; + gPathTexScroll += 60.0f; break; } Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 20000.0f, 0); @@ -1146,8 +1146,8 @@ void Solar_LevelStart(Player* player) { Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 20000.0f, 0); Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 20000.0f, 0); Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 20000.0f, 0); - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(player->rot.x * M_DTOR), MTXF_APPLY); sp50.x = 0.f; sp50.y = 0.0f; sp50.z = player->baseSpeed; @@ -1158,7 +1158,7 @@ void Solar_LevelStart(Player* player) { player->pos.x += player->vel.x; player->pos.y += player->vel.y; player->pos.z += player->vel.z; - player->unk_138 = player->pos.z + player->unk_08C; + player->trueZpos = player->pos.z + player->camDist; } void Solar_801A1CD8(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 zRot, f32 xVel, f32 yVel, @@ -1262,7 +1262,7 @@ void Solar_801A1F80(Boss* bossSO) { Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 120.0f, 1.0f, 3.5f, 0.0f); } if (gBossFrameCount == 60) { - gActors[10].unk_0D0 = 3; + gActors[10].dmgType = 3; AUDIO_PLAY_SFX(0x19036053, bossSO->sfxSource, 4); } if (bossSO->timer_050 == 100) { @@ -1493,7 +1493,7 @@ void Solar_801A2C98(Boss* bossSO) { } } if (bossSO->unk_04C == 20) { - gActors[10].unk_0D0 = 3; + gActors[10].dmgType = 3; AUDIO_PLAY_SFX(0x19036054, bossSO->sfxSource, 4); } if (bossSO->unk_04C == 0) { @@ -1501,7 +1501,7 @@ void Solar_801A2C98(Boss* bossSO) { bossSO->swork[SO_SWK_11] = 100; bossSO->obj.pos.y = -500.0f; bossSO->fwork[SO_FWK_3] = 4800.0f; - bossSO->obj.pos.z = gPlayer[0].unk_138 - bossSO->fwork[SO_FWK_3]; + bossSO->obj.pos.z = gPlayer[0].trueZpos - bossSO->fwork[SO_FWK_3]; bossSO->obj.rot.y = -bossSO->obj.rot.y; } } else { @@ -1527,7 +1527,7 @@ void Solar_801A2C98(Boss* bossSO) { Solar_801A3468(bossSO); } if (bossSO->swork[SO_SWK_11] == 50) { - gActors[9].unk_0D0 = 3; + gActors[9].dmgType = 3; AUDIO_PLAY_SFX(0x19036053, bossSO->sfxSource, 4); } } @@ -1554,7 +1554,7 @@ void Solar_801A3128(Boss* bossSO) { Solar_801A0CEC(&gActors[10], bossSO->obj.pos.x, bossSO->obj.pos.z + 2000.0f, 10.0f, 1); } if (bossSO->unk_04C == 40) { - gActors[10].unk_0D0 = 3; + gActors[10].dmgType = 3; AUDIO_PLAY_SFX(0x19036054, bossSO->sfxSource, 4); } if (bossSO->unk_04C == 0) { @@ -1562,7 +1562,7 @@ void Solar_801A3128(Boss* bossSO) { bossSO->swork[SO_SWK_11] = 100; bossSO->obj.pos.y = -500.0f; bossSO->fwork[SO_FWK_3] = 2400.0f; - bossSO->obj.pos.z = gPlayer[0].unk_138 - 2100.0f; + bossSO->obj.pos.z = gPlayer[0].trueZpos - 2100.0f; } } else { bossSO->unk_04C = Animation_GetFrameCount(&D_SO_601388C) - 2; @@ -1604,7 +1604,7 @@ void Solar_801A3128(Boss* bossSO) { } } if (bossSO->swork[SO_SWK_11] == 50) { - gActors[9].unk_0D0 = 3; + gActors[9].dmgType = 3; AUDIO_PLAY_SFX(0x19036053, bossSO->sfxSource, 4); } } @@ -1817,16 +1817,16 @@ void Solar_801A3C4C(Boss* bossSO) { AUDIO_PLAY_SFX(0x2940D09A, bossSO->sfxSource, 4); if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; - gPlayer[0].timer_1F8 = 0; - gPlayer[0].unk_1D0 = gPlayer[0].timer_1F8; - gPlayer[0].unk_0E8 += gPlayer[0].unk_114; - if (gPlayer[0].unk_0E8 > 360.0f) { - gPlayer[0].unk_0E8 -= 360.0f; + gPlayer[0].csTimer = 0; + gPlayer[0].csState = gPlayer[0].csTimer; + gPlayer[0].rot.y += gPlayer[0].yRot_114; + if (gPlayer[0].rot.y > 360.0f) { + gPlayer[0].rot.y -= 360.0f; } - if (gPlayer[0].unk_0E8 < 0.0f) { - gPlayer[0].unk_0E8 += 360.0f; + if (gPlayer[0].rot.y < 0.0f) { + gPlayer[0].rot.y += 360.0f; } - gPlayer[0].unk_114 = 0.0f; + gPlayer[0].yRot_114 = 0.0f; } bossSO->fwork[SO_FWK_31] = 0.0f; bossSO->fwork[SO_FWK_3] = 2400.0f; @@ -1976,7 +1976,7 @@ void Solar_801A48B8(Boss* bossSO) { if ((bossSO->swork[SO_SWK_0] == 4) && (bossSO->unk_04C >= 60) && (bossSO->unk_04C < 67)) { for (i = 4; i < 60; i++) { if (gActors[i].obj.id == OBJ_ACTOR_278) { - gActors[i].unk_0D0 = 2; + gActors[i].dmgType = 2; break; } } @@ -2098,14 +2098,14 @@ void Solar_801A4EF8(Boss* bossSO) { } } if (bossSO->swork[SO_SWK_11] == 16) { - gActors[10].unk_0D0 = 2; + gActors[10].dmgType = 2; } if (bossSO->obj.pos.y <= -900.0f) { bossSO->state++; bossSO->swork[SO_SWK_11] = 500; bossSO->obj.pos.y = -1500.0f; bossSO->fwork[SO_FWK_3] = 4800.0f; - bossSO->obj.pos.z = gPlayer[0].unk_138 - bossSO->fwork[SO_FWK_3]; + bossSO->obj.pos.z = gPlayer[0].trueZpos - bossSO->fwork[SO_FWK_3]; bossSO->swork[SO_SWK_1] = 0; bossSO->unk_078.y = bossSO->obj.rot.y = 0.0f; bossSO->vel.y = 0.0f; @@ -2129,7 +2129,7 @@ void Solar_801A4EF8(Boss* bossSO) { if (bossSO->swork[SO_SWK_11] == 170) { AUDIO_PLAY_SFX(0x29432073, bossSO->sfxSource, 4); bossSO->obj.pos.y = -500.0f; - gActors[9].unk_0D0 = 2; + gActors[9].dmgType = 2; } if (bossSO->swork[SO_SWK_11] <= 170) { bossSO->vel.y = COS_DEG(bossSO->obj.rot.x) * 80.0f; @@ -2149,7 +2149,7 @@ void Solar_801A4EF8(Boss* bossSO) { bossSO->swork[SO_SWK_11] = 100; bossSO->obj.pos.y = -500.0f; bossSO->fwork[SO_FWK_3] = 4800.0f; - bossSO->obj.pos.z = gPlayer[0].unk_138 - bossSO->fwork[SO_FWK_3]; + bossSO->obj.pos.z = gPlayer[0].trueZpos - bossSO->fwork[SO_FWK_3]; bossSO->unk_04C = 0; bossSO->obj.rot.x = 0.0f; bossSO->fwork[SO_FWK_31] = bossSO->vel.y = bossSO->vel.z = 0.0f; @@ -2177,7 +2177,7 @@ void Solar_801A4EF8(Boss* bossSO) { bossSO->fwork[SO_FWK_0] = 0.01f; } if (bossSO->swork[SO_SWK_11] == 50) { - gActors[9].unk_0D0 = 2; + gActors[9].dmgType = 2; } break; } @@ -2307,9 +2307,9 @@ void Solar_801A5B3C(Boss* bossSO) { Radio_PlayMessage(gMsg_ID_10320, RCID_PEPPY); } if (bossSO->health != 0) { - Math_SmoothStepToF(&bossSO->obj.pos.z, gPlayer[0].unk_138 - bossSO->fwork[SO_FWK_3], 1.0f, 60.0f, 1.0f); + Math_SmoothStepToF(&bossSO->obj.pos.z, gPlayer[0].trueZpos - bossSO->fwork[SO_FWK_3], 1.0f, 60.0f, 1.0f); } else { - Math_SmoothStepToF(&bossSO->obj.pos.z, -(D_ctx_80177D20 + 2600.0f), 1.0f, 40.0f, 1.0f); + Math_SmoothStepToF(&bossSO->obj.pos.z, -(gPathProgress + 2600.0f), 1.0f, 40.0f, 1.0f); } if (bossSO->swork[SO_SWK_2] != 0) { bossSO->info.hitbox[7] = bossSO->fwork[SO_FWK_12] - bossSO->obj.pos.z; @@ -2714,7 +2714,7 @@ void Solar_801A71B8(Boss* bossSO) { gDPSetEnvColor(gMasterDisp++, 255, 192, 0, 255); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, bossSO->obj.pos.x, bossSO->obj.pos.y, bossSO->obj.pos.z - 500.0f + D_ctx_80177D20, + Matrix_Translate(gGfxMatrix, bossSO->obj.pos.x, bossSO->obj.pos.y, bossSO->obj.pos.z - 500.0f + gPathProgress, MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_i3_801C2768[3], D_i3_801C2768[2], 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -2723,7 +2723,7 @@ void Solar_801A71B8(Boss* bossSO) { Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, bossSO->obj.pos.x + spE8[i].x, bossSO->obj.pos.y + spE8[i].y, - bossSO->obj.pos.z + D_ctx_80177D20 + spE8[i].z, MTXF_APPLY); + bossSO->obj.pos.z + gPathProgress + spE8[i].z, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, spC4[i] * M_DTOR, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, spA0[i] * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_i3_801C2768[4 + i], 100.0f, 1.0f, MTXF_APPLY); @@ -2735,7 +2735,7 @@ void Solar_801A71B8(Boss* bossSO) { Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, bossSO->obj.pos.x, bossSO->obj.pos.y + 230.0f, - bossSO->obj.pos.z - 300.0f + D_ctx_80177D20, MTXF_APPLY); + bossSO->obj.pos.z - 300.0f + gPathProgress, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_DTOR * 5.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_i3_801C2768[13], 1.0f, D_i3_801C2768[13], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -2746,7 +2746,7 @@ void Solar_801A71B8(Boss* bossSO) { Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, bossSO->obj.pos.x, bossSO->obj.pos.y + 270.0f, - (bossSO->obj.pos.z - 300.0f) + D_ctx_80177D20, MTXF_APPLY); + (bossSO->obj.pos.z - 300.0f) + gPathProgress, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, -3.0f * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_i3_801C2768[13], 1.0f, D_i3_801C2768[13], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -2788,7 +2788,7 @@ void Solar_801A7750(void) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = D_i3_801BFB30[i].x / 2.0f + gPlayer[0].pos.x; actor->obj.pos.y = D_i3_801BFB30[i].y + gPlayer[0].pos.y; @@ -2810,14 +2810,14 @@ void Solar_LevelComplete(Player* player) { Vec3f sp54; Boss* bossSO = &gBosses[0]; - switch (player->unk_1D0) { + switch (player->csState) { case 0: gCsFrameCount = 0; - player->camRoll = player->unk_4D8 = 0.0f; + player->camRoll = player->aerobaticPitch = 0.0f; player->baseSpeed = 40.0f; player->wings.unk_04 = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = - player->unk_130 = player->unk_12C = player->boostSpeed = 0.0f; + player->zRotBarrelRoll = player->zRotBank = player->boostSpeed = 0.0f; player->unk_234 = 1; gCsCamEyeX = player->cam.eye.x; gCsCamEyeY = player->cam.eye.y; @@ -2833,7 +2833,7 @@ void Solar_LevelComplete(Player* player) { Object_Kill(&gActors[2].obj, gActors[2].sfxSource); Object_Kill(&gActors[3].obj, gActors[3].sfxSource); Object_Kill(&gActors[4].obj, gActors[4].sfxSource); - player->unk_1D0 = 1; + player->csState = 1; D_ctx_80177A48[0] = 0.1f; if (Rand_ZeroOne() > 0.5f) { D_ctx_80177A48[9] = -1.0f; @@ -2842,28 +2842,28 @@ void Solar_LevelComplete(Player* player) { } break; case 1: - D_ctx_80177CE8 += 30.0f; - Math_SmoothStepToF(&player->unk_0E4, 0.0f, 0.1f, 5.0f, 0.0f); + gPathTexScroll += 30.0f; + Math_SmoothStepToF(&player->rot.x, 0.0f, 0.1f, 5.0f, 0.0f); Math_SmoothStepToF(&player->pos.y, 200.0f, 0.05f, 10.0f, 0.0f); dx = player->pos.x - bossSO->obj.pos.x; dz = (player->pos.z - bossSO->obj.pos.z) * 0.05f; sp78 = Math_RadToDeg(-Math_Atan2F(dx, dz)); Math_SmoothStepToF(&gCsCamEyeY, 300.0f, 1.0f, 20.0f, 0.0f); Math_SmoothStepToF(&gCsCamAtY, 290.0f, 1.0f, 20.0f, 0.0f); - sp74 = Math_SmoothStepToAngle(&player->unk_0E8, sp78, 0.5f, 2.0f, 0.0001f) * 30.0f; + sp74 = Math_SmoothStepToAngle(&player->rot.y, sp78, 0.5f, 2.0f, 0.0001f) * 30.0f; if (gCsFrameCount >= 14) { - Math_SmoothStepToAngle(&player->unk_0EC, sp74, 0.1f, 5.0f, 0.0001f); + Math_SmoothStepToAngle(&player->rot.z, sp74, 0.1f, 5.0f, 0.0001f); gCsCamAtX = 0.0f; gCsCamEyeX = 0.0f; } else if (sp74 < 0.0f) { - player->unk_0EC -= 30.0f; + player->rot.z -= 30.0f; } else { - player->unk_0EC += 30.0f; + player->rot.z += 30.0f; } if (gCsFrameCount >= 200) { - player->unk_0E4 += 1.0f; - player->unk_0E8 += 1.0f; - player->unk_0EC += 1.0f; + player->rot.x += 1.0f; + player->rot.y += 1.0f; + player->rot.z += 1.0f; } if (gCsFrameCount >= 230) { gFillScreenAlphaTarget = 255; @@ -2874,25 +2874,25 @@ void Solar_LevelComplete(Player* player) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); } if (gCsFrameCount == 400) { - player->unk_1D0++; + player->csState++; Play_ClearObjectData(); Audio_StopPlayerNoise(0); Audio_KillSfxBySource(player->sfxSource); gFillScreenAlpha = 250; - player->timer_1F8 = 20; + player->csTimer = 20; player->baseSpeed = 0.0f; - player->unk_0E4 = 0.0f; - player->unk_0E8 = 0.0f; - player->unk_0EC = 0.0f; + player->rot.x = 0.0f; + player->rot.y = 0.0f; + player->rot.z = 0.0f; } break; case 2: - D_ctx_80177CE8 += 60.0f; - if (player->timer_1F8 == 0) { + gPathTexScroll += 60.0f; + if (player->csTimer == 0) { player->pos.x = 0.0f; player->pos.y = 200.0f; - player->pos.z = -(D_ctx_80177D20 - 500.0f); - player->unk_1D0++; + player->pos.z = -(gPathProgress - 500.0f); + player->csState++; player->wings.modelId = 1; Audio_StartPlayerNoise(0); AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); @@ -2902,18 +2902,18 @@ void Solar_LevelComplete(Player* player) { D_ctx_80177A48[2] = 0.0f; player->cam.eye.x = 0.0f; player->cam.eye.y = player->pos.y + 80.0f; - player->cam.eye.z = player->pos.z + D_ctx_80177D20 - 4000.0f; - gCsCamEyeZ = player->pos.z + D_ctx_80177D20 - 4900.0f; + player->cam.eye.z = player->pos.z + gPathProgress - 4000.0f; + gCsCamEyeZ = player->pos.z + gPathProgress - 4900.0f; player->cam.at.x = gCsCamAtX = 0.0f; player->cam.at.y = gCsCamAtY = 200.0f; - player->cam.at.z = gCsCamAtZ = player->pos.z + D_ctx_80177D20; + player->cam.at.z = gCsCamAtZ = player->pos.z + gPathProgress; D_ctx_80177A48[0] = 0.0f; Object_Kill(&gActors[4].obj, gActors[4].sfxSource); Object_Kill(&gActors[5].obj, gActors[5].sfxSource); } break; case 3: - D_ctx_80177CE8 += 60.0f; + gPathTexScroll += 60.0f; gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 4; if (gMsgCharIsPrinting) { @@ -2921,10 +2921,10 @@ void Solar_LevelComplete(Player* player) { } switch (gCsFrameCount) { case 450: - Solar_801A0DF8(-1200.0f, -(D_ctx_80177D20 + 2500.0f), 90.0f, 2, 1.0f); + Solar_801A0DF8(-1200.0f, -(gPathProgress + 2500.0f), 90.0f, 2, 1.0f); break; case 545: - Solar_801A0DF8(1400.0f, -(D_ctx_80177D20 + 3250.0f), -90.0f, 3, 1.0f); + Solar_801A0DF8(1400.0f, -(gPathProgress + 3250.0f), -90.0f, 3, 1.0f); break; case 550: Object_Kill(&gActors[4].obj, gActors[4].sfxSource); @@ -2933,7 +2933,7 @@ void Solar_LevelComplete(Player* player) { Object_Kill(&gActors[5].obj, gActors[5].sfxSource); break; case 700: - player->unk_1D0++; + player->csState++; Solar_801A7750(); D_i3_801C2768[3] = 1000.0f; break; @@ -2942,19 +2942,19 @@ void Solar_LevelComplete(Player* player) { Math_SmoothStepToF(&player->pos.x, 400.0f, 0.1f, 10.0f, 0.1f); } if ((gCsFrameCount >= 520) && (gCsFrameCount < 570)) { - Math_SmoothStepToAngle(&player->unk_0EC, -30.0f, 0.1f, 5.0f, 0.1f); + Math_SmoothStepToAngle(&player->rot.z, -30.0f, 0.1f, 5.0f, 0.1f); } if ((gCsFrameCount >= 570) && (gCsFrameCount < 605)) { - Math_SmoothStepToAngle(&player->unk_0EC, 0.0f, 0.1f, 5.0f, 0.1f); + Math_SmoothStepToAngle(&player->rot.z, 0.0f, 0.1f, 5.0f, 0.1f); } if ((gCsFrameCount >= 605) && (gCsFrameCount < 620)) { - player->unk_0EC += 30.0f; + player->rot.z += 30.0f; } if ((gCsFrameCount >= 620) && (gCsFrameCount < 640)) { - Math_SmoothStepToAngle(&player->unk_0EC, 45.0f, 0.1f, 5.0f, 0.0f); + Math_SmoothStepToAngle(&player->rot.z, 45.0f, 0.1f, 5.0f, 0.0f); } if (gCsFrameCount >= 640) { - Math_SmoothStepToAngle(&player->unk_0EC, 0.0f, 0.3f, 7.0f, 0.0f); + Math_SmoothStepToAngle(&player->rot.z, 0.0f, 0.3f, 7.0f, 0.0f); } if (gCsFrameCount >= 585) { Math_SmoothStepToF(&player->pos.x, 0.0f, 0.2f, 9.0f, 0); @@ -2962,18 +2962,18 @@ void Solar_LevelComplete(Player* player) { if (gCsFrameCount >= 600) { Math_SmoothStepToF(&player->pos.y, 950.0f, 0.1f, 10.0f, 0.0001f); } - Math_SmoothStepToF(&player->pos.z, -(D_ctx_80177D20 + 4350.0f), 1.0f, 20.0f, 0.0001f); + Math_SmoothStepToF(&player->pos.z, -(gPathProgress + 4350.0f), 1.0f, 20.0f, 0.0001f); if (gCsFrameCount >= 620) { Math_SmoothStepToF(&player->cam.eye.x, 0.0f, 1.0f, 10.0f, 0); Math_SmoothStepToF(&player->cam.eye.y, player->pos.y + 52.0f, 1.0f, 16.0f, 0.0f); - Math_SmoothStepToF(&player->cam.eye.z, (player->pos.z + D_ctx_80177D20) - 50.0f, 1.0f, 21.5f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.z, (player->pos.z + gPathProgress) - 50.0f, 1.0f, 21.5f, 0.0f); } player->cam.at.x = gCsCamAtX = player->pos.x; player->cam.at.y = gCsCamAtY = player->pos.y; - player->cam.at.z = gCsCamAtZ = player->pos.z + D_ctx_80177D20; + player->cam.at.z = gCsCamAtZ = player->pos.z + gPathProgress; break; case 4: - D_ctx_80177CE8 += 60.0f; + gPathTexScroll += 60.0f; gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 4; D_ctx_80177A48[1] += D_ctx_80177A48[2] * 0.8f; @@ -2985,11 +2985,11 @@ void Solar_LevelComplete(Player* player) { if (gCsFrameCount < 1440) { gCsCamEyeX = sp54.x; gCsCamEyeY = D_i3_801C2768[3] + sp54.y; - gCsCamEyeZ = player->pos.z + D_ctx_80177D20 + sp54.z; + gCsCamEyeZ = player->pos.z + gPathProgress + sp54.z; gCsCamAtX = 0.0f; gCsCamAtY = player->pos.y + 75.0f; Math_SmoothStepToF(&D_i3_801C2768[3], 500.0f, 0.1f, 1.0f, 0.0001f); - gCsCamAtZ = player->pos.z + D_ctx_80177D20 + 200.0f; + gCsCamAtZ = player->pos.z + gPathProgress + 200.0f; if (gCsFrameCount >= 1400) { gCsCamAtZ -= (gCsFrameCount * 8) - 11200; } @@ -2997,11 +2997,11 @@ void Solar_LevelComplete(Player* player) { Math_SmoothStepToF(&gCsCamEyeX, 0.0f, 0.1f, 1.0f, 0.0001f); gCsCamAtX = 0.0f; gCsCamAtY = player->pos.y + 75.0f; - gCsCamAtZ = player->pos.z + D_ctx_80177D20 + 200.0f - ((gCsFrameCount * 8) - 11200); + gCsCamAtZ = player->pos.z + gPathProgress + 200.0f - ((gCsFrameCount * 8) - 11200); } if (gCsFrameCount > 1460) { player->baseSpeed += 2.0f; - player->unk_0E4 += 0.2f; + player->rot.x += 0.2f; Math_SmoothStepToF(&D_ctx_80177A48[2], 0.0f, 1.0f, 0.001f, 0); player->unk_190 = 2.0f; } else { @@ -3019,7 +3019,7 @@ void Solar_LevelComplete(Player* player) { Audio_StopPlayerNoise(0); Audio_FadeOutAll(10); player->state_1C8 = PLAYERSTATE_1C8_NEXT; - player->timer_1F8 = 0; + player->csTimer = 0; gFadeoutType = 4; gLeveLClearStatus[LEVEL_SOLAR] = Play_CheckMedalStatus(100) + 1; } @@ -3102,8 +3102,8 @@ void Solar_LevelComplete(Player* player) { } break; } - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4) * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->xRot_120 + player->rot.x) * M_DTOR), MTXF_APPLY); sp60.x = 0.0f; sp60.y = 0.0f; sp60.z = player->baseSpeed; @@ -3116,18 +3116,18 @@ void Solar_LevelComplete(Player* player) { player->pos.y += player->vel.y; player->pos.z += player->vel.z; - player->unk_138 = player->pos.z; - player->unk_0F8 = player->unk_0EC; + player->trueZpos = player->pos.z; + player->bankAngle = player->rot.z; Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0.0f); - player->unk_088 += 10.0f; - player->unk_080 = -SIN_DEG(player->unk_088) * 0.3f; - player->unk_0F4 += 8.0f; - player->unk_0F0 = SIN_DEG(player->unk_0F4); + player->bobPhase += 10.0f; + player->yBob = -SIN_DEG(player->bobPhase) * 0.3f; + player->rockPhase += 8.0f; + player->rockAngle = SIN_DEG(player->rockPhase); } void Solar_801A8BE8(Actor* actor) { diff --git a/src/overlays/ovl_i3/fox_zo.c b/src/overlays/ovl_i3/fox_zo.c index e05946dd..11c31548 100644 --- a/src/overlays/ovl_i3/fox_zo.c +++ b/src/overlays/ovl_i3/fox_zo.c @@ -92,9 +92,9 @@ void Zoness_8019962C(Boss* bossZO, f32 arg1); // /* 232 */ char padE8[8]; // /* 240 */ Vec3f unk_F0; // /* 252 */ char padFC[8]; -// /* 260 */ Vec3f unk_104; +// /* 260 */ Vec3f rot_104.x; // /* 272 */ Vec3f boostSpeed; -// /* 284 */ Vec3f unk_11C; +// /* 284 */ Vec3f yRotVel_11C; // /* 296 */ char pad128[76]; // /* 372 */ Vec3f unk_174; // /* 384 */ Vec3f unk_180; @@ -539,8 +539,8 @@ void Zoness_8018FF50(Actor* actor) { (void) " Enm->hitNO %d\n"; // Unclear where this goes. hitNO can't be info.bonus. Damage related? actor->obj.rot.y = RAD_TO_DEG(Math_Atan2F(gPlayer[0].cam.eye.x - actor->obj.pos.x, - gPlayer[0].cam.eye.z - (actor->obj.pos.z + D_ctx_80177D20))); - temp = sqrtf(SQ(gPlayer[0].cam.eye.z - (actor->obj.pos.z + D_ctx_80177D20)) + + gPlayer[0].cam.eye.z - (actor->obj.pos.z + gPathProgress))); + temp = sqrtf(SQ(gPlayer[0].cam.eye.z - (actor->obj.pos.z + gPathProgress)) + SQ(gPlayer[0].cam.eye.x - actor->obj.pos.x)); actor->obj.rot.x = RAD_TO_DEG(-Math_Atan2F(gPlayer[0].cam.eye.y - actor->obj.pos.y, temp)); } @@ -680,8 +680,8 @@ void Zoness_801904CC(Actor* actor) { if (Animation_GetFrameCount(&D_ZO_600E5EC) < actor->unk_0B6) { actor->unk_0B6 = 0; } - if ((actor->unk_0D0 != 0) && (actor->health != 0)) { - actor->unk_0D0 = 0; + if ((actor->dmgType != 0) && (actor->health != 0)) { + actor->dmgType = 0; if (actor->state > 0) { actor->timer_0C6 = 15; actor->health -= actor->damage; @@ -757,8 +757,8 @@ void Zoness_80190A00(Actor* actor) { actor->timer_0C0 = 30; } Zoness_80190790(actor); - if (actor->unk_0D0 != 0) { - actor->unk_0D0 = 0; + if (actor->dmgType != 0) { + actor->dmgType = 0; AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); } } @@ -773,7 +773,7 @@ Gfx* D_i3_801BF5A8[3] = { D_ZO_60012A0, D_ZO_60239E0, D_ZO_6023730 }; void Zoness_80190B4C(f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 zRot, u8 arg6, s32 arg7) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, xPos, yPos, zPos + D_ctx_80177D20, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, xPos, yPos, zPos + gPathProgress, 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); @@ -919,8 +919,8 @@ void Zoness_80191010(Actor* actor) { func_effect_8007A6F0(&actor->obj.pos, 0x29018036); break; } - if ((actor->unk_0D0 != 0) && (actor->health != 0)) { - actor->unk_0D0 = 0; + if ((actor->dmgType != 0) && (actor->health != 0)) { + actor->dmgType = 0; actor->timer_0C6 = 15; actor->health -= actor->damage; if (actor->health <= 0) { @@ -978,8 +978,8 @@ void Zoness_80191680(Actor* actor) { if (actor->obj.pos.z < actor->fwork[0]) { actor->state = 1; } - if ((actor->unk_0D0 != 0) && (actor->health != 0)) { - actor->unk_0D0 = 0; + if ((actor->dmgType != 0) && (actor->health != 0)) { + actor->dmgType = 0; actor->timer_0C6 = 15; actor->health -= actor->damage; AUDIO_PLAY_SFX(0x29033037, actor->sfxSource, 4); @@ -998,7 +998,7 @@ void Zoness_80191680(Actor* actor) { actor->timer_0BC = 30; actor->fwork[1] = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(1000.0f); actor->fwork[2] = gPlayer[0].pos.y + 50.0f + RAND_FLOAT(200.0f); - actor->fwork[3] = gPlayer[0].unk_138 - 1500.0f; + actor->fwork[3] = gPlayer[0].trueZpos - 1500.0f; } actor->fwork[3] += gPlayer[0].vel.z; sp64 = actor->fwork[1] - actor->obj.pos.x; @@ -1008,7 +1008,7 @@ void Zoness_80191680(Actor* actor) { otherActor = &gActors[actor->iwork[0]]; if ((actor->state != 0) || (otherActor->obj.status == OBJ_FREE)) { actor->lockOnTimers[TEAM_ID_FOX] = 0; - actor->info.unk_1C = 0.0f; + actor->info.targetOffset = 0.0f; sp54 += 180.0f; if (sp54 > 360.0f) { sp54 -= 360.0f; @@ -1151,7 +1151,7 @@ void Zoness_80192094(Actor* actor) { temp_fs0 = gPlayer[0].pos.x - actor->obj.pos.x; spB0 = gPlayer[0].pos.y - actor->obj.pos.y; - temp_fs1 = gPlayer[0].unk_138 - actor->obj.pos.z; + temp_fs1 = gPlayer[0].trueZpos - actor->obj.pos.z; spA4 = Math_RadToDeg(Math_Atan2F(temp_fs0, temp_fs1)); temp_fs0_2 = sqrtf(SQ(temp_fs0) + SQ(temp_fs1)); temp_fs0_2 = Math_RadToDeg(-Math_Atan2F(spB0, temp_fs0_2)); @@ -1245,14 +1245,14 @@ void Zoness_80192094(Actor* actor) { func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f); break; } - if ((actor->unk_0D0 != 0) && (actor->state < 3)) { - if (actor->unk_0D0 != 1) { + if ((actor->dmgType != 0) && (actor->state < 3)) { + if (actor->dmgType != 1) { BonusText_Display(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 200.0f, 5); gHitCount += 6; D_ctx_80177850 = 15; actor->state = 4; } - actor->unk_0D0 = 0; + actor->dmgType = 0; } } @@ -1326,8 +1326,8 @@ void Zoness_80192834(Actor* actor) { } actor->obj.rot.x += 20.0f; actor->obj.rot.x = Math_ModF(actor->obj.rot.x, 360.0f); - if ((actor->unk_0D0 != 0) && (actor->health != 0)) { - actor->unk_0D0 = 0; + if ((actor->dmgType != 0) && (actor->health != 0)) { + actor->dmgType = 0; actor->health -= actor->damage; if (actor->health <= 0) { actor->health = 0; @@ -1463,8 +1463,8 @@ void Zoness_80192E64(Actor* actor) { func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f); break; } - if (actor->unk_0D0 != 0) { - if (actor->unk_0D0 != 1) { + if (actor->dmgType != 0) { + if (actor->dmgType != 1) { if ((actor->state != 0) && (actor->state != 3)) { BonusText_Display(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 200.0f, 2); gHitCount += 3; @@ -1474,7 +1474,7 @@ void Zoness_80192E64(Actor* actor) { } else { AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); } - actor->unk_0D0 = 0; + actor->dmgType = 0; } if (func_play_800A73E4(&sp70, &sp6C, actor->obj.pos.x, actor->obj.pos.y - 1000.0f, actor->obj.pos.z)) { Math_SmoothStepToF(&actor->obj.pos.y, sp70 + 300.0f, 0.1f, 20.0f, 0); @@ -2035,7 +2035,7 @@ void Zoness_80194A84(Boss* bossZO) { } if (sZoSwork[ZO_BSS_24] == 0) { Math_SmoothStepToF(&sZoFwork[ZO_BSF_27], sZoFwork[ZO_BSF_26], 0.1f, 2.0f, 0.00001f); - Math_SmoothStepToF(&bossZO->obj.pos.z, gPlayer[0].cam.eye.z - D_ctx_80177D20 + sZoFwork[ZO_BSF_28], 0.1f, + Math_SmoothStepToF(&bossZO->obj.pos.z, gPlayer[0].cam.eye.z - gPathProgress + sZoFwork[ZO_BSF_28], 0.1f, sZoFwork[ZO_BSF_27], 0.00001f); } if ((gGameFrameCount % 4U) == 0) { @@ -2067,7 +2067,7 @@ void Zoness_80194A84(Boss* bossZO) { sZoSwork[ZO_BSS_43] = 255; } } - if (((bossZO->state == 2) || (bossZO->state == 3) || (bossZO->state == 8)) && (gPlayer[0].timer_220 == 2)) { + if (((bossZO->state == 2) || (bossZO->state == 3) || (bossZO->state == 8)) && (gPlayer[0].radioDamageTimer == 2)) { if (bossZO->swork[ZO_SWK_8] == 0) { Radio_PlayMessage(gMsg_ID_6068, RCID_BOSS_ZONESS); } @@ -2272,7 +2272,7 @@ void Zoness_80194A84(Boss* bossZO) { bossZO->fwork[ZO_FWK_5] += 4.0f; bossZO->vel.x = COS_DEG(bossZO->fwork[ZO_FWK_5]) * 40.0f; padF4 = Math_Atan2F(bossZO->fwork[ZO_FWK_6] - bossZO->obj.pos.x, - gPlayer[0].cam.eye.z - D_ctx_80177D20 + D_i3_801BF6BC[bossZO->swork[ZO_SWK_1]] - + gPlayer[0].cam.eye.z - gPathProgress + D_i3_801BF6BC[bossZO->swork[ZO_SWK_1]] - bossZO->obj.pos.z); padF4 = Math_RadToDeg(padF4); Math_SmoothStepToAngle(&bossZO->fwork[ZO_FWK_7], padF4, 0.1f, 100.0f, 0.001f); @@ -2281,7 +2281,7 @@ void Zoness_80194A84(Boss* bossZO) { spE4.z = 20.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &spE4, &spCC); var_s0 = 0; - bossZO->vel.z = spCC.z - D_ctx_80177D08; + bossZO->vel.z = spCC.z - gPathVelZ; if (bossZO->vel.x > 0.0f) { var_s0 = 1; } @@ -2298,7 +2298,7 @@ void Zoness_80194A84(Boss* bossZO) { Matrix_RotateY(gCalcMatrix, -bossZO->obj.rot.y * M_DTOR, MTXF_APPLY); spE4.x = gPlayer[0].pos.x - sZoFwork[ZO_BSF_93_X]; spE4.y = gPlayer[0].pos.y - sZoFwork[ZO_BSF_93_Y]; - spE4.z = gPlayer[0].unk_138 - sZoFwork[ZO_BSF_93_Z]; + spE4.z = gPlayer[0].trueZpos - sZoFwork[ZO_BSF_93_Z]; Matrix_MultVec3f(gCalcMatrix, &spE4, &spC0); sp10C = Math_Atan2F(spC0.x, spC0.z); sp10C = Math_RadToDeg(sp10C); @@ -2318,7 +2318,7 @@ void Zoness_80194A84(Boss* bossZO) { } spE4.x = gPlayer[0].pos.x - sZoFwork[ZO_BSF_96_X]; spE4.y = gPlayer[0].pos.y - sZoFwork[ZO_BSF_96_Y]; - spE4.z = gPlayer[0].unk_138 - sZoFwork[ZO_BSF_96_Z]; + spE4.z = gPlayer[0].trueZpos - sZoFwork[ZO_BSF_96_Z]; Matrix_MultVec3f(gCalcMatrix, &spE4, &spB4); sp104 = Math_Atan2F(spB4.x, spB4.z); sp104 = Math_RadToDeg(sp104); @@ -2496,15 +2496,15 @@ void Zoness_80194A84(Boss* bossZO) { (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { gCsFrameCount = 0; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; - gPlayer[0].unk_1D0 = gPlayer[0].timer_1F8 = 0; - gPlayer[0].unk_0E8 += gPlayer[0].unk_114; - if (gPlayer[0].unk_0E8 > 360.0f) { - gPlayer[0].unk_0E8 -= 360.0f; + gPlayer[0].csState = gPlayer[0].csTimer = 0; + gPlayer[0].rot.y += gPlayer[0].yRot_114; + if (gPlayer[0].rot.y > 360.0f) { + gPlayer[0].rot.y -= 360.0f; } - if (gPlayer[0].unk_0E8 < 0.0f) { - gPlayer[0].unk_0E8 += 360.0f; + if (gPlayer[0].rot.y < 0.0f) { + gPlayer[0].rot.y += 360.0f; } - gPlayer[0].unk_114 = 0.0f; + gPlayer[0].yRot_114 = 0.0f; Boss_CompleteLevel(&gPlayer[0], bossZO->obj.pos.x, 0.0f, bossZO->obj.pos.z); } bossZO->timer_050 = 70; @@ -2596,7 +2596,7 @@ void Zoness_80194A84(Boss* bossZO) { } sZoFwork[ZO_BSF_2] += 20.0f; spE4.x = gPlayer[0].pos.x - bossZO->obj.pos.x; - spE4.z = gPlayer[0].unk_138 - bossZO->obj.pos.z; + spE4.z = gPlayer[0].trueZpos - bossZO->obj.pos.z; Math_SmoothStepToAngle(&sZoFwork[ZO_BSF_14], Math_RadToDeg(Math_Atan2F(spE4.x, spE4.z)), 0.5f, 100.0f, 0.001f); Math_SmoothStepToAngle(&sZoFwork[ZO_BSF_0], sZoFwork[ZO_BSF_76], 0.2f, 4.0f, 0.0001f); if ((((gGameFrameCount % 64) == 0) || (sZoSwork[ZO_BSS_22] != 0)) && @@ -2612,7 +2612,7 @@ void Zoness_80194A84(Boss* bossZO) { } } spE4.x = gPlayer[0].pos.x - sZoFwork[ZO_BSF_65_X]; - spE4.z = gPlayer[0].unk_138 - sZoFwork[ZO_BSF_65_Z]; + spE4.z = gPlayer[0].trueZpos - sZoFwork[ZO_BSF_65_Z]; Math_SmoothStepToAngle(&sZoFwork[ZO_BSF_19], Math_RadToDeg(Math_Atan2F(spE4.x, spE4.z)), 0.1f, 5.0f, 0.0f); if ((bossZO->state >= 3) && (bossZO->state < 6)) { Matrix_RotateY(gCalcMatrix, bossZO->obj.rot.y * M_DTOR, MTXF_NEW); @@ -2625,7 +2625,7 @@ void Zoness_80194A84(Boss* bossZO) { Matrix_RotateY(gCalcMatrix, -bossZO->obj.rot.y * M_DTOR, MTXF_APPLY); spE4.x = gPlayer[0].pos.x - (bossZO->obj.pos.x + spD8.x); spE4.y = gPlayer[0].pos.y - (bossZO->obj.pos.y + spD8.y); - spE4.z = gPlayer[0].unk_138 - (bossZO->obj.pos.z + spD8.z); + spE4.z = gPlayer[0].trueZpos - (bossZO->obj.pos.z + spD8.z); Matrix_MultVec3f(gCalcMatrix, &spE4, &spD8); sp11C = Math_Atan2F(spD8.x, spD8.z); sp11C = Math_RadToDeg(sp11C); @@ -2633,7 +2633,7 @@ void Zoness_80194A84(Boss* bossZO) { sp120 = Math_RadToDeg(-sp120); spE4.x = gPlayer[0].pos.x - (bossZO->obj.pos.x + spCC.x); spE4.y = gPlayer[0].pos.y - (bossZO->obj.pos.y + spCC.y); - spE4.z = gPlayer[0].unk_138 - (bossZO->obj.pos.z + spCC.z); + spE4.z = gPlayer[0].trueZpos - (bossZO->obj.pos.z + spCC.z); Matrix_MultVec3f(gCalcMatrix, &spE4, &spCC); sp114 = Math_Atan2F(spCC.x, spCC.z); sp114 = Math_RadToDeg(sp114); @@ -3184,7 +3184,7 @@ void Zoness_80198BE8(Boss* bossZO, s32 arg1) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp3C, &sp30); effect->vel.x = sp30.x; effect->vel.y = sp30.y; - effect->vel.z = sp30.z - D_ctx_80177D08; + effect->vel.z = sp30.z - gPathVelZ; Object_SetInfo(&effect->info, effect->obj.id); break; } @@ -3336,7 +3336,7 @@ void Zoness_8019962C(Boss* bossZO, f32 arg1) { void Zoness_8019969C(Actor* actor) { s32 i; - if ((actor->unk_0D0 != 0) && (actor->health != 0)) { + if ((actor->dmgType != 0) && (actor->health != 0)) { actor->health -= actor->damage; if (actor->health <= 0) { actor->health = 0; @@ -3347,13 +3347,13 @@ void Zoness_8019969C(Actor* actor) { } func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 200.0f, 5.0f); actor->itemDrop = DROP_BOMB; - actor->unk_0D4 = 2; + actor->dmgSource = 2; actor->obj.pos.z -= 100.0f; Actor_Despawn(actor); Object_Kill(&actor->obj, actor->sfxSource); func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); } - actor->unk_0D0 = 0; + actor->dmgType = 0; } actor->fwork[0] += 10.0f; Zoness_8018FF50(actor); @@ -3444,17 +3444,17 @@ void Zoness_80199A28(Actor* actor) { } Math_SmoothStepToAngle(&actor->obj.rot.z, sp38, 0.1f, 1.0f, 0); } - if ((actor->unk_0D0 != 0) && (actor->health != 0)) { - actor->unk_0D0 = 0; + if ((actor->dmgType != 0) && (actor->health != 0)) { + actor->dmgType = 0; actor->itemDrop = DROP_SILVER_RING_50p; func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y + 100.0f, actor->obj.pos.z, 7.0f); - actor->unk_0D4 = 2; + actor->dmgSource = 2; actor->obj.pos.y += 200.0f; Actor_Despawn(actor); Object_Kill(&actor->obj, actor->sfxSource); func_effect_8007A6F0(&actor->obj.pos, 0x1903400F); } else { - if ((fabsf(actor->obj.pos.z - gPlayer[0].unk_138) < 800.0f) || (actor->unk_0D0 != 0)) { + if ((fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 800.0f) || (actor->dmgType != 0)) { Zoness_801999CC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z); Object_Kill(&actor->obj, actor->sfxSource); func_effect_8007A6F0(&actor->obj.pos, 0x2903B009); @@ -3465,7 +3465,7 @@ void Zoness_80199A28(Actor* actor) { if ((actor->timer_0BC == 0) && (actor->iwork[0] == 0)) { func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y + 100.0f, actor->obj.pos.z, 7.0f); actor->itemDrop = DROP_SILVER_RING_50p; - actor->unk_0D4 = 2; + actor->dmgSource = 2; actor->obj.pos.y += 200.0f; Actor_Despawn(actor); Object_Kill(&actor->obj, actor->sfxSource); @@ -3540,11 +3540,11 @@ void Zoness_80199F10(Actor* actor) { } break; } - if (actor->unk_0D0 != 0) { - if (actor->unk_0D0 == 1) { + if (actor->dmgType != 0) { + if (actor->dmgType == 1) { AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); } - actor->unk_0D0 = 0; + actor->dmgType = 0; } } @@ -3635,7 +3635,7 @@ void Zoness_8019A5D4(Actor* actor) { var_fa0 = 100.0f; } Zoness_8019A4E0(actor, gPlayer[0].pos.x + var_fv1, gPlayer[0].pos.y + var_fa0, gPlayer[0].pos.z, 80.0f); - actor->vel.z -= D_ctx_80177D08; + actor->vel.z -= gPathVelZ; Zoness_80193C5C(sZoFwork[ZO_BSF_65_X], sZoFwork[ZO_BSF_65_Y], sZoFwork[ZO_BSF_65_Z], 30.0f); Zoness_80193C5C(sZoFwork[ZO_BSF_65_X], sZoFwork[ZO_BSF_65_Y], sZoFwork[ZO_BSF_65_Z], 30.0f); Zoness_80193C5C(sZoFwork[ZO_BSF_65_X], sZoFwork[ZO_BSF_65_Y], sZoFwork[ZO_BSF_65_Z], 30.0f); @@ -3653,7 +3653,7 @@ void Zoness_8019A5D4(Actor* actor) { actor->iwork[0] = 0; if (actor->timer_0BC == 0) { actor->vel.x = 0.0f; - actor->vel.z = -D_ctx_80177D08; + actor->vel.z = -gPathVelZ; actor->gravity = 5.0f; actor->fwork[5] = actor->vel.y * -3.0f; if (actor->obj.pos.y < -150.0f) { @@ -3677,7 +3677,7 @@ void Zoness_8019A5D4(Actor* actor) { var_fa0 = sqrtf(SQ(sp4C) + SQ(sp48)) * 0.5f; Zoness_8019A4E0(actor, sZoFwork[ZO_BSF_65_X], sZoFwork[ZO_BSF_65_Y] - var_fa0, sZoFwork[ZO_BSF_65_Z], 30.0f); - actor->vel.z -= D_ctx_80177D08; + actor->vel.z -= gPathVelZ; } if (Object_CheckHitboxCollision(&actor->obj.pos, gBosses[0].info.hitbox, &gBosses[0].obj, 0.0f, 0.0f, 0.0f) != 0) { @@ -3702,11 +3702,11 @@ void Zoness_8019A5D4(Actor* actor) { break; } Zoness_8018FF50(actor); - if (actor->unk_0D0 != 0) { - if (actor->unk_0D0 == 1) { + if (actor->dmgType != 0) { + if (actor->dmgType == 1) { AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); } - actor->unk_0D0 = 0; + actor->dmgType = 0; } if (((gGameFrameCount % 8) == 0) && (actor->state != 0) && (actor->iwork[0] < 8) && (func_play_800A73E4(&sp44, &sp40, actor->obj.pos.x, actor->obj.pos.y - 100.0f, actor->obj.pos.z) != 0)) { @@ -3755,7 +3755,7 @@ void Zoness_8019ACCC(Actor* actor) { if (var_s4 < 0) { var_s4 = 0; } - Matrix_Translate(gGfxMatrix, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + D_ctx_80177D20, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + gPathProgress, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, temp_fs4, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, temp_fs0_2, MTXF_APPLY); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 0.0f, MTXF_APPLY); @@ -3780,7 +3780,7 @@ void Zoness_8019ACCC(Actor* actor) { } Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + D_ctx_80177D20, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + gPathProgress, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, actor->obj.rot.y * M_DTOR, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 2.6f, 2.6f, 2.6f, MTXF_APPLY); @@ -3913,7 +3913,7 @@ void Zoness_8019B548(Actor* actor) { } break; } - if ((fabsf(actor->obj.pos.z - gPlayer[0].unk_138) < 1000.0f) && + if ((fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 1000.0f) && func_play_800A73E4(&sp6C, &sp68, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z)) { Math_SmoothStepToF(&actor->obj.pos.y, sp6C, 0.1f, 4.0f, 0.0f); } @@ -3945,8 +3945,8 @@ void Zoness_8019B854(Actor* actor) { Vec3f spA8 = { 0.0f, 0.0f, 0.0f }; Vec3f sp9C; - if ((actor->unk_0D0 != 0) && (actor->health != 0)) { - actor->unk_0D0 = 0; + if ((actor->dmgType != 0) && (actor->health != 0)) { + actor->dmgType = 0; actor->timer_0C6 = 15; actor->health -= actor->damage; AUDIO_PLAY_SFX(0x2903300E, actor->sfxSource, 4); @@ -4078,8 +4078,8 @@ void Zoness_8019BE48(Actor* actor) { actor->state++; break; case 1: - if ((actor->unk_0D0 != 0) && (actor->health != 0)) { - actor->unk_0D0 = 0; + if ((actor->dmgType != 0) && (actor->health != 0)) { + actor->dmgType = 0; actor->timer_0C6 = 15; actor->health -= actor->damage; if (actor->health <= 0) { @@ -4179,7 +4179,7 @@ void Zoness_8019C454(Actor* actor) { Vec3f sp34; Actor* otherActor; - if ((actor->fwork[0] == 30.0f) && (fabsf(actor->obj.pos.z - gPlayer[0].unk_138) < 2500.0f)) { + if ((actor->fwork[0] == 30.0f) && (fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 2500.0f)) { Math_SmoothStepToAngle(&actor->fwork[6], 10.0f, 0.1f, 1.0f, 0.01f); Math_SmoothStepToAngle(&actor->obj.rot.y, actor->fwork[5], 1.0f, actor->fwork[6], 0.01f); if (actor->fwork[5] != actor->obj.rot.y) { @@ -4206,7 +4206,7 @@ void Zoness_8019C454(Actor* actor) { switch (actor->iwork[4]) { case 1: if ((actor->fwork[5] == actor->obj.rot.y) && - (fabsf(actor->obj.pos.z - gPlayer[0].unk_138) < 1000.0f)) { + (fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 1000.0f)) { if (otherActor->obj.id == OBJ_ACTOR_251) { otherActor->gravity = 1.0f; } @@ -4408,9 +4408,9 @@ void Zoness_8019D15C(Actor* actor) { Actor* otherActor; if (actor->state == 0) { - if (actor->unk_0D0 != 0) { - actor->unk_0D0 = 0; - if (actor->unk_0D2 < 2) { + if (actor->dmgType != 0) { + actor->dmgType = 0; + if (actor->dmgPart < 2) { AUDIO_PLAY_SFX(0x1903001E, actor->sfxSource, 4); if ((actor->obj.pos.y + 268.0f) < actor->hitPos.y) { actor->fwork[1] = 20.0f; @@ -4469,11 +4469,11 @@ void Zoness_8019D3C4(Actor* actor) { void Zoness_LevelStart(Player* player) { s32 sp2C; - player->unk_088 += 10.0f; - player->unk_080 = -SIN_DEG(player->unk_088) * 0.5f; - player->unk_0F4 += 3.0f; - player->unk_0F0 = SIN_DEG(player->unk_0F4) * 1.5f; - switch (player->unk_1D0) { /* irregular */ + player->bobPhase += 10.0f; + player->yBob = -SIN_DEG(player->bobPhase) * 0.5f; + player->rockPhase += 3.0f; + player->rockAngle = SIN_DEG(player->rockPhase) * 1.5f; + switch (player->csState) { case 0: gCsFrameCount = 0; player->pos.z += 10000.0f; @@ -4483,17 +4483,17 @@ void Zoness_LevelStart(Player* player) { player->cam.at.x = gCsCamAtX = player->pos.x; player->cam.at.y = gCsCamAtY = (player->pos.y * player->unk_148) + 20.0f - 230.0f; player->cam.at.z = gCsCamAtZ = 0.0f; - player->unk_1D0 = 1; + player->csState = 1; /* fallthrough */ case 1: Math_SmoothStepToF(&player->pos.z, 0.0f, 0.1f, 48.0f, 0); Math_SmoothStepToF(&player->cam.at.y, (player->pos.y * player->unk_148) + 20.0f, 0.1f, 1.0f, 0.0f); if (gCsFrameCount >= 230) { - Math_SmoothStepToF(&player->cam.at.z, player->unk_138, 0.2f, 20000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.z, player->trueZpos, 0.2f, 20000.0f, 0.0f); } sp2C = gControllerHold[gMainController].button; gControllerHold[gMainController].button = gBoostButton[gMainController]; - player->timer_1F8 = 60; + player->csTimer = 60; player->boostMeter = 1.0f; func_play_800B2574(player); if (gCsFrameCount > 195) { @@ -4506,14 +4506,14 @@ void Zoness_LevelStart(Player* player) { AUDIO_PLAY_BGM(SEQ_ID_ZONESS | SEQ_FLAG); gLevelStartStatusScreenTimer = 80; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; - player->unk_1D0 = 0; - player->timer_1F8 = 0; - player->timer_1FC = 0; + player->csState = 0; + player->csTimer = 0; + player->csEventTimer = 0; gLoadLevelObjects = 1; } break; } - D_ctx_80177CE8 += 40.0f; + gPathTexScroll += 40.0f; } void Zoness_LevelComplete(Player* player) { @@ -4526,16 +4526,16 @@ void Zoness_LevelComplete(Player* player) { Vec3f sp4C; Boss* boss = &gBosses[0]; - switch (player->unk_1D0) { + switch (player->csState) { case 0: case 10: gCsFrameCount = 0; - player->unk_4D8 = 0.0f; + player->aerobaticPitch = 0.0f; player->camRoll = 0.0f; player->baseSpeed = 40.0f; player->unk_234 = 1; player->wings.unk_04 = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = - player->unk_130 = player->unk_12C = player->boostSpeed = 0.0f; + player->zRotBarrelRoll = player->zRotBank = player->boostSpeed = 0.0f; gCsCamEyeX = player->cam.eye.x; gCsCamEyeY = player->cam.eye.y; gCsCamEyeZ = player->cam.eye.z; @@ -4550,7 +4550,7 @@ void Zoness_LevelComplete(Player* player) { Object_Kill(&gActors[2].obj, gActors[2].sfxSource); Object_Kill(&gActors[3].obj, gActors[3].sfxSource); Object_Kill(&gActors[4].obj, gActors[4].sfxSource); - player->unk_1D0 = 1; + player->csState = 1; D_ctx_80177A48[0] = 0.05f; if (Rand_ZeroOne() > 0.5f) { D_ctx_80177A48[9] = -1.0f; @@ -4559,47 +4559,47 @@ void Zoness_LevelComplete(Player* player) { } break; case 1: - D_ctx_80177CE8 += 30.0f; - Math_SmoothStepToF(&player->unk_0E4, 0.0f, 0.1f, 5.0f, 0.0f); + gPathTexScroll += 30.0f; + Math_SmoothStepToF(&player->rot.x, 0.0f, 0.1f, 5.0f, 0.0f); Math_SmoothStepToF(&player->pos.y, 200.0f, 0.05f, 10.0f, 0.0f); Math_SmoothStepToF(&gCsCamEyeY, 250.0f, 1.0f, 20.0f, 0.0f); Math_SmoothStepToF(&gCsCamAtY, 240.0f, 1.0f, 20.0f, 0.0f); dx = player->pos.x - boss->obj.pos.x; dz = (player->pos.z - boss->obj.pos.z) * 0.05f; temp_ft5 = Math_RadToDeg(-Math_Atan2F(dx, dz)); - temp_fa0 = Math_SmoothStepToAngle(&player->unk_0E8, temp_ft5, 0.5f, 2.0f, 0.0001f) * 30.0f; + temp_fa0 = Math_SmoothStepToAngle(&player->rot.y, temp_ft5, 0.5f, 2.0f, 0.0001f) * 30.0f; if (gCsFrameCount >= 14) { - Math_SmoothStepToAngle(&player->unk_0EC, temp_fa0, 0.1f, 5.0f, 0.0001f); + Math_SmoothStepToAngle(&player->rot.z, temp_fa0, 0.1f, 5.0f, 0.0001f); } else if (temp_fa0 < 0.0f) { - player->unk_0EC -= 30.0f; + player->rot.z -= 30.0f; } else { - player->unk_0EC += 30.0f; + player->rot.z += 30.0f; } if (gCsFrameCount >= 140) { gFillScreenAlphaTarget = 255; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; } if (gCsFrameCount == 160) { - player->unk_1D0++; + player->csState++; Play_ClearObjectData(); Audio_StopPlayerNoise(0); Audio_KillSfxBySource(player->sfxSource); gFillScreenAlpha = 250; - player->timer_1F8 = 20; + player->csTimer = 20; player->wings.modelId = 1; player->baseSpeed = 0.0f; - player->unk_0E4 = 0.0f; - player->unk_0E8 = 0.0f; - player->unk_0EC = 0.0f; + player->rot.x = 0.0f; + player->rot.y = 0.0f; + player->rot.z = 0.0f; } break; case 2: - D_ctx_80177CE8 += 60.0f; - if (player->timer_1F8 == 0) { + gPathTexScroll += 60.0f; + if (player->csTimer == 0) { player->pos.x = 0.0f; player->pos.y = 200.0f; - player->pos.z = -(D_ctx_80177D20 + 1500.0f); - player->unk_1D0++; + player->pos.z = -(gPathProgress + 1500.0f); + player->csState++; Audio_StartPlayerNoise(0); AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); D_ctx_80177A98 = 1; @@ -4614,23 +4614,23 @@ void Zoness_LevelComplete(Player* player) { D_ctx_80177A48[3] = 800.0f; D_ctx_80177A48[4] = -0.15f; D_ctx_80177A48[5] = -250.0f; - player->cam.eye.z = player->pos.z + D_ctx_80177D20 - 1780.0f; + player->cam.eye.z = player->pos.z + gPathProgress - 1780.0f; } else { player->cam.eye.x = -1500.0f; player->cam.at.x = gCsCamAtX = -1500.0f; D_ctx_80177A48[3] = -800.0f; D_ctx_80177A48[4] = 0.2f; D_ctx_80177A48[5] = 250.0f; - player->cam.eye.z = player->pos.z + D_ctx_80177D20 - 2000.0f; + player->cam.eye.z = player->pos.z + gPathProgress - 2000.0f; } player->cam.eye.y = 200.0f; player->cam.at.y = gCsCamAtY = player->pos.y; - player->cam.at.z = gCsCamAtZ = player->pos.z + D_ctx_80177D20; + player->cam.at.z = gCsCamAtZ = player->pos.z + gPathProgress; D_ctx_80177A48[0] = 0.0f; } break; case 3: - D_ctx_80177CE8 += 60.0f; + gPathTexScroll += 60.0f; gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 4; D_ctx_80177A48[1] += D_ctx_80177A48[2]; @@ -4642,19 +4642,19 @@ void Zoness_LevelComplete(Player* player) { if (gCsFrameCount < 1180) { gCsCamEyeX = sp4C.x; gCsCamEyeY = 200.0f + sp4C.y; - gCsCamEyeZ = player->pos.z + D_ctx_80177D20 + sp4C.z; + gCsCamEyeZ = player->pos.z + gPathProgress + sp4C.z; gCsCamAtX = 0.0f; gCsCamAtY = player->pos.y; - gCsCamAtZ = D_ctx_80177A48[5] + (player->pos.z + D_ctx_80177D20); + gCsCamAtZ = D_ctx_80177A48[5] + (player->pos.z + gPathProgress); Math_SmoothStepToF(&D_ctx_80177A48[5], 250.0f, 1.0f, 1.0f, 0.0f); } else { gCsCamAtX = 0.0f; gCsCamAtY = player->pos.y; - gCsCamAtZ = player->pos.z + D_ctx_80177D20; + gCsCamAtZ = player->pos.z + gPathProgress; } if (gCsFrameCount > 1180) { player->baseSpeed += 2.0f; - player->unk_0E4 += 0.1f; + player->rot.x += 0.1f; Math_SmoothStepToF(&D_ctx_80177A48[2], 0.0f, 1.0f, 0.001f, 0); player->unk_190 = 2.0f; if (!gMissedZoSearchlight) { @@ -4675,7 +4675,7 @@ void Zoness_LevelComplete(Player* player) { Audio_StopPlayerNoise(0); Audio_FadeOutAll(10); player->state_1C8 = PLAYERSTATE_1C8_NEXT; - player->timer_1F8 = 0; + player->csTimer = 0; gFadeoutType = 4; gLeveLClearStatus[LEVEL_ZONESS] = Play_CheckMedalStatus(250) + 1; } @@ -4767,13 +4767,13 @@ void Zoness_LevelComplete(Player* player) { break; } if (gCsFrameCount >= 1180) { - player->unk_25C += 0.02f; - if (player->unk_25C > 0.6f) { - player->unk_25C = 0.6f; + player->contrailScale += 0.02f; + if (player->contrailScale > 0.6f) { + player->contrailScale = 0.6f; } } - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4) * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->xRot_120 + player->rot.x) * M_DTOR), MTXF_APPLY); sp58.x = 0.0f; sp58.y = 0.0f; sp58.z = player->baseSpeed; @@ -4783,18 +4783,18 @@ void Zoness_LevelComplete(Player* player) { player->vel.y = sp4C.y; player->pos.x += player->vel.x; player->pos.y += player->vel.y; - player->unk_138 = player->pos.z += player->vel.z; - player->unk_0F8 = player->unk_0EC; + player->trueZpos = player->pos.z += player->vel.z; + player->bankAngle = player->rot.z; Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0.0f); - player->unk_088 += 10.0f; - player->unk_080 = -SIN_DEG(player->unk_088) * 0.3f; - player->unk_0F4 += 8.0f; - player->unk_0F0 = SIN_DEG(player->unk_0F4); + player->bobPhase += 10.0f; + player->yBob = -SIN_DEG(player->bobPhase) * 0.3f; + player->rockPhase += 8.0f; + player->rockAngle = SIN_DEG(player->rockPhase); } void Zoness_8019E5F0(Actor* actor) { diff --git a/src/overlays/ovl_i4/fox_bo.c b/src/overlays/ovl_i4/fox_bo.c index 3f096169..424840f2 100644 --- a/src/overlays/ovl_i4/fox_bo.c +++ b/src/overlays/ovl_i4/fox_bo.c @@ -125,70 +125,70 @@ void Bolse_8018BD60(Actor* this) { f32 D_i4_8019EEE4[] = { -200.0f, -100.0f, -0.0f, 100.0f, 200.0f }; -void Bolse_8018BEF8(Actor* actor, s32 arg1) { +void Bolse_SpawnEnemies(Actor* this, s32 count) { s32 i; - Actor* actorPtr; + Actor* enemy; - for (i = 10, actorPtr = &gActors[10]; i < arg1 + 10; i++, actorPtr++) { - if (actorPtr->obj.status == OBJ_FREE) { - Actor_Initialize(actorPtr); - actorPtr->obj.status = OBJ_ACTIVE; - actorPtr->obj.id = OBJ_ACTOR_ALLRANGE; - actorPtr->obj.pos.z = 0.0f; + for (i = AI360_10, enemy = &gActors[AI360_10]; i < count + AI360_10; i++, enemy++) { + if (enemy->obj.status == OBJ_FREE) { + Actor_Initialize(enemy); + enemy->obj.status = OBJ_ACTIVE; + enemy->obj.id = OBJ_ACTOR_ALLRANGE; + enemy->obj.pos.z = 0.0f; if (D_i4_801A0530 > 1000) { - actorPtr->obj.pos.x = 10000.0f; - actorPtr->obj.pos.y = 3000.0f; + enemy->obj.pos.x = 10000.0f; + enemy->obj.pos.y = 3000.0f; } else { - actorPtr->obj.pos.x = D_i4_8019EEE4[actor->unk_04E]; - actorPtr->obj.pos.y = 50.0f; - AUDIO_PLAY_SFX(0x2903305F, actorPtr->sfxSource, 4); - actorPtr->timer_0BC = 5; - actorPtr->timer_0C2 = 100; - actorPtr->unk_0F4.x = 90.0f; + enemy->obj.pos.x = D_i4_8019EEE4[this->unk_04E]; + enemy->obj.pos.y = 50.0f; + AUDIO_PLAY_SFX(0x2903305F, enemy->sfxSource, 4); + enemy->timer_0BC = 5; + enemy->timer_0C2 = 100; + enemy->unk_0F4.x = 90.0f; } - actorPtr->state = 1; - actorPtr->timer_0C4 = 300; - actorPtr->aiType = i; - actorPtr->aiIndex = -1; + enemy->state = 1; + enemy->timer_0C4 = 300; + enemy->aiType = i; + enemy->aiIndex = -1; - if (i < 13) { - actorPtr->aiIndex = AI360_SLIPPY; + if (i < AI360_10 + 3) { + enemy->aiIndex = AI360_SLIPPY; gActors[AI360_SLIPPY].aiIndex = -1; } - if ((i == 17) || (i == 18)) { - actorPtr->aiIndex = AI360_FOX; + if ((i == AI360_10 + 7) || (i == AI360_10 + 8)) { + enemy->aiIndex = AI360_FOX; } - if ((i == 20) || (i == 21)) { - actorPtr->aiIndex = AI360_PEPPY; + if ((i == AI360_10 + 10) || (i == AI360_10 + 11)) { + enemy->aiIndex = AI360_PEPPY; gActors[AI360_PEPPY].aiIndex = -1; } - if (i == 22) { - actorPtr->aiIndex = AI360_FALCO; + if (i == AI360_10 + 12) { + enemy->aiIndex = AI360_FALCO; gActors[AI360_FALCO].aiIndex = -1; } - if ((D_i4_801A0530 > 16000) && ((i == 23) || (i == 24))) { - actorPtr->aiIndex = AI360_FOX; + if ((D_i4_801A0530 > 16000) && ((i == AI360_10 + 13) || (i == AI360_10 + 14))) { + enemy->aiIndex = AI360_FOX; } - actorPtr->health = 24; - actorPtr->iwork[11] = 1; + enemy->health = 24; + enemy->iwork[11] = 1; if (D_i4_801A0530 < 16000) { - actorPtr->itemDrop = DROP_SILVER_RING_50p; + enemy->itemDrop = DROP_SILVER_RING_50p; } - Object_SetInfo(&actorPtr->info, actorPtr->obj.id); - AUDIO_PLAY_SFX(0x3100000C, actorPtr->sfxSource, 4); + Object_SetInfo(&enemy->info, enemy->obj.id); + AUDIO_PLAY_SFX(0x3100000C, enemy->sfxSource, 4); - actor->unk_04E++; - if (actor->unk_04E >= 5) { - actor->unk_04E = 0; + this->unk_04E++; + if (this->unk_04E >= 5) { + this->unk_04E = 0; } break; } @@ -254,7 +254,7 @@ void Bolse_UpdateEventHandler(Actor* this) { } if ((D_i4_801A0530 < 9600) && (D_i4_801A0530 & 0x400)) { - Bolse_8018BEF8(this, 8); + Bolse_SpawnEnemies(this, 8); } if (gBosses[2].state == 10) { @@ -263,8 +263,8 @@ void Bolse_UpdateEventHandler(Actor* this) { if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; - gPlayer[0].timer_1F8 = 30; - gPlayer[0].unk_1D0 = 0; + gPlayer[0].csTimer = 30; + gPlayer[0].csState = 0; gPlayer[0].unk_000 = 0.0f; } AllRange_ClearRadio(); @@ -377,7 +377,7 @@ void Bolse_UpdateEventHandler(Actor* this) { } if ((this->timer_0BC % 8) == 0) { - Bolse_8018BEF8(this, 15); + Bolse_SpawnEnemies(this, 15); } if (!this->timer_0BC) { @@ -605,11 +605,11 @@ void Bolse_8018D124(Actor* actor) { bool Bolse_8018D278(Actor* actor) { s32 i; - if (actor->unk_0D0 == 0) { + if (actor->dmgType == 0) { return false; } - actor->unk_0D0 = 0; + actor->dmgType = 0; actor->obj.pos.y += 150.0f; func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, 8.0f, 15); @@ -629,7 +629,7 @@ bool Bolse_8018D278(Actor* actor) { actor->info.bonus = 0; actor->lockOnTimers[TEAM_ID_FOX] = 0; - actor->info.unk_1C = 0.0f; + actor->info.targetOffset = 0.0f; return true; } @@ -691,13 +691,13 @@ s32 Bolse_8018D4F0(Actor* actor) { bool Bolse_8018D584(Actor* actor) { s32 i; - if (actor->unk_0D0 == 0) { + if (actor->dmgType == 0) { return false; } - if ((actor->unk_0D2 < 2) && (actor->state == 0)) { + if ((actor->dmgPart < 2) && (actor->state == 0)) { actor->timer_0C6 = 20; - actor->unk_0D0 = 0; + actor->dmgType = 0; AUDIO_PLAY_SFX(0x29024003, actor->sfxSource, 0); actor->health += actor->damage; @@ -745,7 +745,7 @@ void Bolse_8018D7F0(Actor* actor) { } else { actor->lockOnTimers[TEAM_ID_FOX] = 0; actor->info.bonus = 0; - actor->info.unk_1C = 0.0f; + actor->info.targetOffset = 0.0f; } actor->scale = -1.0f; } @@ -850,30 +850,30 @@ s32 Bolse_8018E05C(Boss* boss, s32 index) { src.x = gPlayer[0].pos.x - (boss->obj.pos.x + temp_fs2); src.y = gPlayer[0].pos.y - (boss->obj.pos.y + 580.0f); - src.z = gPlayer[0].unk_138 - (boss->obj.pos.z + temp_fs3); + src.z = gPlayer[0].trueZpos - (boss->obj.pos.z + temp_fs3); Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); if ((fabsf(dest.x) < 100.0f) && (fabsf(dest.y) < 200.0f)) { - if ((dest.z >= 0.0f) && (dest.z < temp_fs4) && (gPlayer[0].unk_1F4 == 0)) { + if ((dest.z >= 0.0f) && (dest.z < temp_fs4) && (gPlayer[0].hitTimer == 0)) { Player_ApplyDamage(gPlayer, 0, 40); if (dest.y > 0.0f) { - gPlayer[0].unk_0D8.y = 20.0f; + gPlayer[0].knockback.y = 20.0f; } else { - gPlayer[0].unk_0D8.y = -20.0f; + gPlayer[0].knockback.y = -20.0f; } for (i = 0; i < 5; i++) { func_effect_8007C484(gPlayer[0].pos.x + RAND_FLOAT_CENTERED(30.0f), gPlayer[0].pos.y + RAND_FLOAT(10.0f), - gPlayer[0].unk_138 + RAND_FLOAT_CENTERED(30.0f), gPlayer[0].vel.x, - gPlayer[0].vel.y + gPlayer[0].unk_0D8.y, gPlayer[0].vel.z, RAND_FLOAT(0.1f) + 0.1f, - gPlayer[0].num + 11); + gPlayer[0].trueZpos + RAND_FLOAT_CENTERED(30.0f), gPlayer[0].vel.x, + gPlayer[0].vel.y + gPlayer[0].knockback.y, gPlayer[0].vel.z, + RAND_FLOAT(0.1f) + 0.1f, gPlayer[0].num + 11); } func_effect_8007BFFC(gPlayer[0].pos.x + RAND_FLOAT_CENTERED(10.0f), gPlayer[0].pos.y + RAND_FLOAT(10.0f), - gPlayer[0].unk_138 + RAND_FLOAT_CENTERED(10.0f), 0.0f, 15.0f, 0.0f, 2.0f, 5); + gPlayer[0].trueZpos + RAND_FLOAT_CENTERED(10.0f), 0.0f, 15.0f, 0.0f, 2.0f, 5); } ret = true; } @@ -1028,7 +1028,7 @@ f32 D_i4_8019F018[] = { 3.0f, -4.0f, 5.0f, 700.0f, 300.0f, 1000.0f }; void Bolse_8018EAEC(Actor* actor, s32 index) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = D_i4_8019EFDC[index] + gPlayer[0].pos.x; actor->obj.pos.y = D_i4_8019EFE8[index] + gPlayer[0].pos.y; actor->obj.pos.z = D_i4_8019EFF4[index] + gPlayer[0].pos.z; @@ -1052,7 +1052,7 @@ void Bolse_8018EC1C(void) { actor->obj.pos.z = -9000.0f; actor->unk_0B6 = 30; actor->fwork[20] = 1.0f; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; Object_SetInfo(&actor->info, actor->obj.id); actor->info.bonus = 1; } @@ -1079,7 +1079,7 @@ void Bolse_8018ED44(void) { if (actor->obj.status == OBJ_FREE) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = RAND_FLOAT_CENTERED(500.0f); actor->obj.pos.y = gActors[50].obj.pos.y + RAND_FLOAT(100.0f); actor->obj.pos.z = -9000.0f; @@ -1101,7 +1101,7 @@ void Bolse_8018EE4C(f32 x, f32 y) { if (actor->obj.status == OBJ_FREE) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = x; actor->obj.pos.y = gActors[50].obj.pos.y + y; actor->obj.pos.z = -9000.0f; @@ -1139,7 +1139,7 @@ void Bolse_LevelStart(Player* player) { Actor* actor; s32 pad[4]; - switch (player->unk_1D0) { + switch (player->csState) { case 0: gLight1R = 100; gLight1G = 100; @@ -1184,7 +1184,7 @@ void Bolse_LevelStart(Player* player) { gCsCamAtY = player->pos.y; gCsCamAtZ = player->pos.z; - player->unk_1D0 = 1; + player->csState = 1; player->unk_204 = 1; D_ctx_80177A48[0] = 1.0f; @@ -1198,7 +1198,7 @@ void Bolse_LevelStart(Player* player) { gCsCamAtZ = player->pos.z; D_ctx_80177A48[2] += 4.5f; sp60 = SIN_DEG(D_ctx_80177A48[2]) * 10.0f; - player->unk_0EC = SIN_DEG(D_ctx_80177A48[2]) * -60.0f; + player->rot.z = SIN_DEG(D_ctx_80177A48[2]) * -60.0f; if (((gCsFrameCount % 8) == 0) && (Rand_ZeroOne() < 0.5f)) { Bolse_8018ED44(); @@ -1245,13 +1245,13 @@ void Bolse_LevelStart(Player* player) { Bolse_80191ED8(); ActorAllRange_SpawnTeam(); - player->unk_1D0 = 2; + player->csState = 2; player->pos.x = 0.0f; player->pos.y = 1400.0f; player->pos.z = 14000.0f; - player->unk_0E4 = -8.0f; + player->rot.x = -8.0f; for (i = 0, actor = &gActors[1]; i < 3; i++, actor++) { actor->obj.pos.x = D_i4_8019F030[i - 1].x + player->pos.x; @@ -1289,7 +1289,7 @@ void Bolse_LevelStart(Player* player) { gCsCamAtY = player->pos.y; gCsCamAtZ = player->pos.z; - Math_SmoothStepToF(&player->unk_0EC, 0.0f, 0.1f, 1.0f, 0.0f); + Math_SmoothStepToF(&player->rot.z, 0.0f, 0.1f, 1.0f, 0.0f); if (gCsFrameCount == 200) { player->unk_204 = 2; @@ -1313,8 +1313,8 @@ void Bolse_LevelStart(Player* player) { break; } - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(player->rot.x * M_DTOR), MTXF_APPLY); sp54.x = 0.0f; sp54.y = 0; @@ -1330,8 +1330,8 @@ void Bolse_LevelStart(Player* player) { player->pos.y += player->vel.y; player->pos.z += player->vel.z; - player->unk_138 = player->pos.z; - player->unk_0F8 = (player->unk_0EC + player->unk_12C) + player->unk_130; + player->trueZpos = player->pos.z; + player->bankAngle = (player->rot.z + player->zRotBank) + player->zRotBarrelRoll; Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0); Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0); @@ -1344,7 +1344,7 @@ void Bolse_LevelStart(Player* player) { void Bolse_8018F83C(Actor* actor, s32 arg1) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = D_i4_8019F06C[arg1] + gPlayer[0].pos.x; actor->obj.pos.y = D_i4_8019F078[arg1] + gPlayer[0].pos.y; actor->obj.pos.z = D_i4_8019F084[arg1] + gPlayer[0].pos.z; @@ -1370,7 +1370,7 @@ void Bolse_LevelComplete(Player* player) { sp8C = 100.0f; sp88 = 100.0f; - switch (player->unk_1D0) { + switch (player->csState) { case 0: Audio_StopSfxByBankAndSource(1, player->sfxSource); gCsFrameCount = 0; @@ -1378,13 +1378,13 @@ void Bolse_LevelComplete(Player* player) { D_i4_801A03D4 = 100.0f; D_i4_801A03D8 = 80.0f; - Math_SmoothStepToF(&player->unk_0E8, -40.0f, 0.1f, 2.5f, 0.0f); - Math_SmoothStepToF(&player->unk_0EC, -60.0f, 0.2f, 5.0f, 0.0f); - Math_SmoothStepToF(&player->unk_0E4, 0.0f, 0.1f, 2.5f, 0.0f); + Math_SmoothStepToF(&player->rot.y, -40.0f, 0.1f, 2.5f, 0.0f); + Math_SmoothStepToF(&player->rot.z, -60.0f, 0.2f, 5.0f, 0.0f); + Math_SmoothStepToF(&player->rot.x, 0.0f, 0.1f, 2.5f, 0.0f); - if (player->timer_1F8 == 0) { - player->unk_1D0 = 1; - player->timer_1F8 = 200; + if (player->csTimer == 0) { + player->csState = 1; + player->csTimer = 200; AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); player->unk_194 = 5.0f; player->unk_190 = 5.0f; @@ -1395,18 +1395,18 @@ void Bolse_LevelComplete(Player* player) { case 1: player->unk_190 = 2.0f; - Math_SmoothStepToF(&player->unk_0E4, 15.0f, 0.1f, 0.4f, 0.0f); - Math_SmoothStepToF(&player->unk_0EC, 40.0f, 0.2f, 5.0f, 0.0f); - Math_SmoothStepToF(&player->unk_0E8, 120.0f, 0.1f, 2.0f, 0.0f); + Math_SmoothStepToF(&player->rot.x, 15.0f, 0.1f, 0.4f, 0.0f); + Math_SmoothStepToF(&player->rot.z, 40.0f, 0.2f, 5.0f, 0.0f); + Math_SmoothStepToF(&player->rot.y, 120.0f, 0.1f, 2.0f, 0.0f); player->baseSpeed += 1.0f; if (player->baseSpeed >= 70.0f) { player->baseSpeed = 70.0f; } - if (player->timer_1F8 == 0) { - player->unk_1D0 = 5; - player->timer_1F8 = 1000; + if (player->csTimer == 0) { + player->csState = 5; + player->csTimer = 1000; Audio_StopPlayerNoise(0); Audio_KillSfxBySource(player->sfxSource); Play_ClearObjectData(); @@ -1421,10 +1421,10 @@ void Bolse_LevelComplete(Player* player) { player->pos.y = actor50->obj.pos.y; player->pos.z = actor50->obj.pos.z - 1000.0f; - player->unk_0E4 = 0.0f; - player->unk_0EC = 0.0f; - player->unk_0E8 = 0.0f; - player->unk_114 = 0.0f; + player->rot.x = 0.0f; + player->rot.z = 0.0f; + player->rot.y = 0.0f; + player->yRot_114 = 0.0f; player->baseSpeed = 40.0f; if (gTeamShields[TEAM_ID_FALCO] > 0) { @@ -1460,7 +1460,7 @@ void Bolse_LevelComplete(Player* player) { case 5: gFillScreenAlpha = gFillScreenAlphaTarget = 0; - player->unk_1D0 = 10; + player->csState = 10; case 10: gCsCamAtX = gPlayer[0].pos.x; @@ -1537,7 +1537,7 @@ void Bolse_LevelComplete(Player* player) { break; case 240: - player->unk_1D0++; + player->csState++; D_ctx_80177A48[0] = 0; D_ctx_80177A48[5] = 20.0f; D_ctx_80177A48[6] = 0.0f; @@ -1601,8 +1601,8 @@ void Bolse_LevelComplete(Player* player) { break; case 800: - player->unk_1D0 += 1; - player->timer_1F8 = 50; + player->csState += 1; + player->csTimer = 50; player->unk_194 = 5.0f; player->unk_190 = 5.0f; AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); @@ -1618,11 +1618,11 @@ void Bolse_LevelComplete(Player* player) { player->unk_190 = 2.0f; player->baseSpeed += 5; - if (player->timer_1F8 == 30) { + if (player->csTimer == 30) { Audio_FadeOutAll(30); } - if (player->timer_1F8 == 0) { + if (player->csTimer == 0) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; gFillScreenAlphaTarget = 255; if (gFillScreenAlpha == 255) { @@ -1686,8 +1686,8 @@ void Bolse_LevelComplete(Player* player) { gLight1G = D_i4_801A03D4; gLight1B = D_i4_801A03D8; - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->xRot_120 + player->rot.x + player->aerobaticPitch) * M_DTOR), MTXF_APPLY); sp74.x = 0.0f; sp74.y = 0.0f; @@ -1703,15 +1703,15 @@ void Bolse_LevelComplete(Player* player) { player->pos.y += player->vel.y; player->pos.z += player->vel.z; - player->unk_138 = player->pos.z; - player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; + player->trueZpos = player->pos.z; + player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; - if (player->unk_1D0 < 10) { - Math_SmoothStepToF(&player->unk_130, 0.0f, 0.1f, 15.0f, 0.0f); - Math_SmoothStepToF(&player->unk_12C, 0.0f, 0.1f, 15.0f, 0.0f); + if (player->csState < 10) { + Math_SmoothStepToF(&player->zRotBarrelRoll, 0.0f, 0.1f, 15.0f, 0.0f); + Math_SmoothStepToF(&player->zRotBank, 0.0f, 0.1f, 15.0f, 0.0f); Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f); - Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 20.0f, 0.0f); + Math_SmoothStepToAngle(&player->aerobaticPitch, 0.0f, 0.1f, 20.0f, 0.0f); if (player->pos.y < 700.0f) { Math_SmoothStepToF(&player->pos.y, 700.0f, 0.1f, 10.0f, 0.0f); @@ -1730,10 +1730,10 @@ void Bolse_LevelComplete(Player* player) { Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 50000, 0); Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000, 0); } - player->unk_088 += 10.0f; - player->unk_080 = -SIN_DEG(player->unk_088) * 0.3f; - player->unk_0F4 += 8.0f; - player->unk_0F0 = SIN_DEG(player->unk_0F4); + player->bobPhase += 10.0f; + player->yBob = -SIN_DEG(player->bobPhase) * 0.3f; + player->rockPhase += 8.0f; + player->rockAngle = SIN_DEG(player->rockPhase); } void Bolse_80190D98(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot) { @@ -1802,7 +1802,7 @@ void Bolse_80190FE8(f32 x, f32 y, f32 z, f32 scale) { void Bolse_80191054(Effect* effect) { switch (effect->state) { case 0: - if (gPlayer[0].unk_280 == 0) { + if (gPlayer[0].barrelRollAlpha == 0) { func_effect_8007A774(gPlayer, effect, 150.0f); } diff --git a/src/overlays/ovl_i4/fox_fo.c b/src/overlays/ovl_i4/fox_fo.c index a9cb10be..d9f75a78 100644 --- a/src/overlays/ovl_i4/fox_fo.c +++ b/src/overlays/ovl_i4/fox_fo.c @@ -191,7 +191,7 @@ void Fortuna_UpdateEvents(Actor* actor) { actor->iwork[0] = 0; actor->state = 6; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; - gPlayer[0].unk_1D0 = 0; + gPlayer[0].csState = 0; gPlayer[0].unk_000 = 0.0f; AllRange_ClearRadio(); @@ -204,7 +204,7 @@ void Fortuna_UpdateEvents(Actor* actor) { (gStarWolfTeamAlive[3] == 0)) { Radio_PlayMessage(gMsg_ID_9411, RCID_FOX); gMissionStatus = MISSION_ACCOMPLISHED; - gPlayer[0].timer_1F8 = 50; + gPlayer[0].csTimer = 50; player->unk_190 = 5.0f; player->unk_194 = 5.0f; AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); @@ -212,7 +212,7 @@ void Fortuna_UpdateEvents(Actor* actor) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 30); } else { gMissionStatus = MISSION_COMPLETE; - gPlayer[0].timer_1F8 = 30; + gPlayer[0].csTimer = 30; } } @@ -240,7 +240,7 @@ void Fortuna_UpdateEvents(Actor* actor) { player->pos.x = 0.0f; player->pos.z = 15000.0f; player->pos.y = 670.0f; - player->unk_114 = 0.0f; + player->yRot_114 = 0.0f; for (actorPtr = &gActors[1], i = 0; i < 3; i++, actorPtr++) { actorPtr->obj.pos.x = D_i4_8019EDF8[i - 1].x; @@ -374,15 +374,15 @@ void Fortuna_UpdateEvents(Actor* actor) { Vec3f sp50 = { 0.0f, 0.0f, -10000 }; Actor_Initialize(actor19); - Matrix_Translate(gCalcMatrix, player->pos.x, player->pos.y, player->unk_138, MTXF_NEW); - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + player->unk_114) * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, MTXF_APPLY); + Matrix_Translate(gCalcMatrix, player->pos.x, player->pos.y, player->trueZpos, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, (player->rot.y + player->yRot_114) * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, player->rot.x * M_DTOR, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &sp50, &actor19->obj.pos); actor19->obj.status = OBJ_ACTIVE; actor19->obj.id = OBJ_ACTOR_ALLRANGE; actor19->state = 4; - actor19->unk_0F4.y = player->unk_0E8 + player->unk_114 + 180.0f; + actor19->unk_0F4.y = player->rot.y + player->yRot_114 + 180.0f; actor19->unk_0F4.x = 15.0f; actor19->aiType = AI360_GREAT_FOX; actor19->fwork[1] = 90.0f; @@ -489,11 +489,11 @@ void Fortuna_80188AD0(Actor* actor) { actor->obj.pos.y -= 230.0f; } - if ((actor->unk_0D0 != 0) && (actor->state == 0)) { - actor->unk_0D0 = 0; + if ((actor->dmgType != 0) && (actor->state == 0)) { + actor->dmgType = 0; actor->state = 1; actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_FO_600FF64); - actor->info.unk_1C = 0.0f; + actor->info.targetOffset = 0.0f; actor->lockOnTimers[TEAM_ID_FOX] = 0; actor->info.bonus = 0; AUDIO_PLAY_SFX(0x2903B009, actor->sfxSource, 4); @@ -586,7 +586,7 @@ void Fortuna_8018906C(void) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = 0.0f; actor->obj.pos.y = 0.0f; actor->obj.pos.z = -9000.0f; @@ -609,10 +609,10 @@ Matrix D_BO_8019EE80 = { { void Fortuna_801890EC(Actor* actor, s32 arg1) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = D_i4_8019EE4C[arg1] + gPlayer[0].pos.x; actor->obj.pos.y = D_i4_8019EE5C[arg1] + gPlayer[0].pos.y; - actor->obj.pos.z = D_i4_8019EE6C[arg1] + gPlayer[0].unk_138; + actor->obj.pos.z = D_i4_8019EE6C[arg1] + gPlayer[0].trueZpos; actor->vel.z = gPlayer[0].baseSpeed; Object_SetInfo(&actor->info, actor->obj.id); @@ -640,11 +640,11 @@ void Fortuna_LevelComplete(Player* player) { Actor* actor3 = &gActors[3]; s32 pad[3]; - if ((player->unk_1D0 < 10) && (player->unk_1D0 >= 0)) { - Math_SmoothStepToF(&player->unk_130, 0.0f, 0.1f, 15.0f, 0.0f); - Math_SmoothStepToF(&player->unk_12C, 0.0f, 0.1f, 15.0f, 0.0f); + if ((player->csState < 10) && (player->csState >= 0)) { + Math_SmoothStepToF(&player->zRotBarrelRoll, 0.0f, 0.1f, 15.0f, 0.0f); + Math_SmoothStepToF(&player->zRotBank, 0.0f, 0.1f, 15.0f, 0.0f); Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f); - Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 20.0f, 0.0f); + Math_SmoothStepToAngle(&player->aerobaticPitch, 0.0f, 0.1f, 20.0f, 0.0f); if (gMissionStatus == MISSION_COMPLETE) { if (player->pos.y < 700.0f) { Math_SmoothStepToF(&player->pos.y, 700.0f, 0.1f, 10.0f, 0.0f); @@ -665,64 +665,64 @@ void Fortuna_LevelComplete(Player* player) { Math_SmoothStepToF(&player->boostSpeed, 0.0f, 0.1f, 1.5f, 0.0f); - switch (player->unk_1D0) { + switch (player->csState) { case -1: player->wings.modelId = 1; - player->unk_0E8 = 0.0f; + player->rot.y = 0.0f; player->baseSpeed = 30.0f; - player->unk_114 = 180.0f; - player->unk_0E4 = -7.0f; - Math_SmoothStepToF(&player->unk_0EC, 0.0f, 0.05f, 1.0f, 0.0f); - player->unk_12C = 0.0f; - player->unk_130 = 0.0f; - player->unk_4D8 = 0.0f; + player->yRot_114 = 180.0f; + player->rot.x = -7.0f; + Math_SmoothStepToF(&player->rot.z, 0.0f, 0.05f, 1.0f, 0.0f); + player->zRotBank = 0.0f; + player->zRotBarrelRoll = 0.0f; + player->aerobaticPitch = 0.0f; player->cam.eye.x = -200.0f; player->cam.eye.y = 100.0f; player->cam.eye.z = -1500.0f; player->cam.at.x = player->pos.x; player->cam.at.y = player->pos.y; - player->cam.at.z = player->unk_138; + player->cam.at.z = player->trueZpos; - if (player->timer_1F8 < 80) { + if (player->csTimer < 80) { gFillScreenAlphaTarget = 255; gFillScreenAlphaStep = 10; gFillScreenGreen = gFillScreenRed = gFillScreenBlue = 0; - if (player->timer_1F8 == 0) { - player->timer_1F8 = 0; - player->unk_1D0 = 1; + if (player->csTimer == 0) { + player->csTimer = 0; + player->csState = 1; } } break; case 0: if (gMissionStatus == MISSION_COMPLETE) { - Math_SmoothStepToF(&player->unk_0E8, 40.0f, 0.1f, 2.5f, 0.0f); - Math_SmoothStepToF(&player->unk_0EC, 60.0f, 0.2f, 5.0f, 0.0f); - Math_SmoothStepToF(&player->unk_0E4, 0.0f, 0.1f, 2.5f, 0.0f); + Math_SmoothStepToF(&player->rot.y, 40.0f, 0.1f, 2.5f, 0.0f); + Math_SmoothStepToF(&player->rot.z, 60.0f, 0.2f, 5.0f, 0.0f); + Math_SmoothStepToF(&player->rot.x, 0.0f, 0.1f, 2.5f, 0.0f); } else { player->unk_190 = 2.0f; player->cam.eye.y += 3.0f; - Math_SmoothStepToF(&player->unk_0EC, - Math_SmoothStepToF(&player->unk_114, - Math_RadToDeg(Math_Atan2F(player->pos.x, player->unk_138)), 0.1f, + Math_SmoothStepToF(&player->rot.z, + Math_SmoothStepToF(&player->yRot_114, + Math_RadToDeg(Math_Atan2F(player->pos.x, player->trueZpos)), 0.1f, 4.0f, 0.0f) * 20.0f, 0.2f, 5.0f, 0.0f); - Math_SmoothStepToF(&player->unk_0E4, 0.0f, 0.1f, 2.5f, 0.0f); + Math_SmoothStepToF(&player->rot.x, 0.0f, 0.1f, 2.5f, 0.0f); } - if (player->timer_1F8 == 0) { + if (player->csTimer == 0) { if (gMissionStatus != MISSION_COMPLETE) { - player->timer_1F8 = 150; - player->unk_1D0 = -1; + player->csTimer = 150; + player->csState = -1; player->pos.x = 0.0f; player->boostSpeed = 0.0f; player->baseSpeed = 0.0f; player->pos.y = 350.0f; player->pos.z = -2800.0f; } else { - player->timer_1F8 = 280; - player->unk_1D0 = 1; + player->csTimer = 280; + player->csState = 1; } player->unk_194 = 5.0f; player->unk_190 = 5.0f; @@ -732,20 +732,20 @@ void Fortuna_LevelComplete(Player* player) { case 1: player->unk_190 = 2.0f; - Math_SmoothStepToF(&player->unk_0E4, 15.0f, 0.1f, 0.4f, 0.0f); - Math_SmoothStepToF(&player->unk_0EC, -40.0f, 0.2f, 5.0f, 0.0f); - Math_SmoothStepToF(&player->unk_0E8, -120.0f, 0.1f, 2.0f, 0.0f); + Math_SmoothStepToF(&player->rot.x, 15.0f, 0.1f, 0.4f, 0.0f); + Math_SmoothStepToF(&player->rot.z, -40.0f, 0.2f, 5.0f, 0.0f); + Math_SmoothStepToF(&player->rot.y, -120.0f, 0.1f, 2.0f, 0.0f); player->baseSpeed += 1.0f; if (player->baseSpeed >= 70.0f) { player->baseSpeed = 70.0f; - player->unk_25C += 0.04f; - if (player->unk_25C > 0.6f) { - player->unk_25C = 0.6f; + player->contrailScale += 0.04f; + if (player->contrailScale > 0.6f) { + player->contrailScale = 0.6f; } } - if (player->timer_1F8 == 0) { - player->unk_1D0 = 2; - player->timer_1F8 = 1000; + if (player->csTimer == 0) { + player->csState = 2; + player->csTimer = 1000; for (i = 0; i < ARRAY_COUNT(gActors); i++) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); } @@ -763,14 +763,14 @@ void Fortuna_LevelComplete(Player* player) { break; case 2: - if (!(gMissionStatus) && (player->timer_1F8) > 830) { + if (!(gMissionStatus) && (player->csTimer) > 830) { gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 8; } - if (player->timer_1F8 == 810) { + if (player->csTimer == 810) { Audio_KillSfxBySource(gBosses[0].sfxSource); } - if (player->timer_1F8 == 830) { + if (player->csTimer == 830) { gFillScreenAlphaTarget = 255; gFillScreenAlphaStep = 2; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; @@ -781,9 +781,9 @@ void Fortuna_LevelComplete(Player* player) { if ((func_hud_80090200(&gBosses[0]) == 2) || (gMissionStatus != MISSION_COMPLETE)) { Play_ClearObjectData(); if (gMissionStatus == MISSION_COMPLETE) { - player->unk_1D0 = 10; + player->csState = 10; } else { - player->unk_1D0 = 20; + player->csState = 20; } for (i = 0; i < 200; i++) { @@ -806,21 +806,21 @@ void Fortuna_LevelComplete(Player* player) { if (gMissionStatus == MISSION_COMPLETE) { player->pos.x = 0.0f; player->pos.y = 0.0f; - player->unk_0E4 = 0.0f; - player->unk_0EC = 0.0f; + player->rot.x = 0.0f; + player->rot.z = 0.0f; player->baseSpeed = 0.0f; - player->unk_114 = 0.0f; - player->unk_0E8 = 180.0f; + player->yRot_114 = 0.0f; + player->rot.y = 180.0f; Fortuna_8018906C(); } else { player->pos.x = 0.0f; - player->unk_0E4 = 0.0f; - player->unk_0EC = 0.0f; - player->unk_114 = 0.0f; + player->rot.x = 0.0f; + player->rot.z = 0.0f; + player->yRot_114 = 0.0f; player->baseSpeed = 0.0f; player->cam.at.y = 16.0f; player->pos.y = -100.0f; - player->unk_0E8 = 180.0f; + player->rot.y = 180.0f; } player->pos.z = -10000.0f; gCsFrameCount = 0; @@ -860,7 +860,7 @@ void Fortuna_LevelComplete(Player* player) { } if (gCsFrameCount == 496) { - player->unk_1D0 = 11; + player->csState = 11; D_ctx_80177A48[0] = 0.01f; D_ctx_80177A48[1] = 0.0f; D_ctx_80177A48[2] = -400.0f; @@ -1016,8 +1016,8 @@ void Fortuna_LevelComplete(Player* player) { D_ctx_8017842C += 0.3f; Math_SmoothStepToF(&D_ctx_80177A48[3], 0.0f, 1.0f, 0.02f, 0); if (gCsFrameCount == 1216) { - player->unk_1D0 = 12; - player->timer_1F8 = 1000; + player->csState = 12; + player->csTimer = 1000; D_ctx_80177A48[4] = 1.0f; actor2->vel.y = 0.1f; actor1->vel.y = 0.1f; @@ -1040,12 +1040,12 @@ void Fortuna_LevelComplete(Player* player) { player->unk_190 = 2.0f; if (gTeamShields[TEAM_ID_FALCO] > 0) { - if (player->timer_1F8 == 980) { + if (player->csTimer == 980) { AUDIO_PLAY_SFX(0x09000002, actor3->sfxSource, 0); actor3->vel.y = 1.0f; actor3->fwork[29] = 5.0f; } - if (player->timer_1F8 < 980) { + if (player->csTimer < 980) { actor3->vel.z += 1.0f; actor3->vel.z *= 1.15f; actor3->vel.y *= 1.19f; @@ -1053,13 +1053,13 @@ void Fortuna_LevelComplete(Player* player) { } } - if ((gTeamShields[TEAM_ID_PEPPY] > 0) && (player->timer_1F8 == 960)) { + if ((gTeamShields[TEAM_ID_PEPPY] > 0) && (player->csTimer == 960)) { AUDIO_PLAY_SFX(0x09000002, actor2->sfxSource, 0); actor2->vel.y = 1.0f; actor2->fwork[29] = 5.0f; } - if (player->timer_1F8 < 960) { + if (player->csTimer < 960) { actor2->vel.z += 1.0f; actor2->vel.z *= 1.15f; actor2->vel.y *= 1.19f; @@ -1067,13 +1067,13 @@ void Fortuna_LevelComplete(Player* player) { } if (gTeamShields[TEAM_ID_SLIPPY] > 0) { - if (player->timer_1F8 == 940) { + if (player->csTimer == 940) { AUDIO_PLAY_SFX(0x09000002, actor1->sfxSource, 0); actor1->vel.y = 1.0f; actor1->fwork[29] = 5.0f; } - if (player->timer_1F8 < 940) { + if (player->csTimer < 940) { actor1->vel.z += 1.0f; actor1->vel.z *= 1.15f; actor1->vel.y *= 1.19f; @@ -1081,12 +1081,12 @@ void Fortuna_LevelComplete(Player* player) { } } - if (player->timer_1F8 == 910) { + if (player->csTimer == 910) { actor0->vel.y = 1.0f; actor0->obj.rot.x = -2.0f; } - if (player->timer_1F8 < 910) { + if (player->csTimer < 910) { actor0->vel.z += 1.0f; actor0->vel.z *= 1.02f; actor0->vel.y *= 1.06f; @@ -1095,7 +1095,7 @@ void Fortuna_LevelComplete(Player* player) { if (gCsFrameCount == 1382) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; - player->timer_1F8 = 0; + player->csTimer = 0; gFadeoutType = 4; Audio_FadeOutAll(10); for (i = 0; i < 6; i++) { @@ -1110,21 +1110,21 @@ void Fortuna_LevelComplete(Player* player) { Fortuna_801890EC(actor3, 0); actor3->obj.pos.x = (player->pos.x - 100.0f) - 400.0f; actor3->obj.pos.y = player->pos.y + 400.0f; - actor3->obj.pos.z = player->unk_138 - 150.0f; + actor3->obj.pos.z = player->trueZpos - 150.0f; actor3->obj.rot.z = 90.0f; } if (gTeamShields[TEAM_ID_SLIPPY] > 0) { Fortuna_801890EC(actor1, 1); actor1->obj.pos.x = player->pos.x + 100.0f + 400.0f; actor1->obj.pos.y = player->pos.y + 400.0f; - actor1->obj.pos.z = player->unk_138 - 150.0f; + actor1->obj.pos.z = player->trueZpos - 150.0f; actor1->obj.rot.z = -90.0f; } if (gTeamShields[TEAM_ID_PEPPY] > 0) { Fortuna_801890EC(actor2, 2); actor2->obj.pos.x = player->pos.x; actor2->obj.pos.y = player->pos.y + 100.0f + 400.0f; - actor2->obj.pos.z = player->unk_138 - 250.0f; + actor2->obj.pos.z = player->trueZpos - 250.0f; } Fortuna_801890EC(actor0, 3); @@ -1132,7 +1132,7 @@ void Fortuna_LevelComplete(Player* player) { actor0->vel.z = 0.0f; actor0->info.bonus = 1; gCsFrameCount = 0; - player->unk_1D0 = 21; + player->csState = 21; player->unk_234 = 1; for (i = 0; i < 9; i++) { @@ -1187,7 +1187,7 @@ void Fortuna_LevelComplete(Player* player) { actor1->obj.pos.x = 100.0f; actor1->obj.pos.y = 40.0f; actor2->obj.pos.y = 90.0f; - player->unk_1D0 = 22; + player->csState = 22; } switch (gCsFrameCount) { @@ -1201,7 +1201,7 @@ void Fortuna_LevelComplete(Player* player) { src.x = 0.0f; src.y = D_ctx_80177A48[7]; src.z = D_ctx_80177A48[5]; - Matrix_Translate(gCalcMatrix, player->pos.x, 0.0f, player->pos.z + D_ctx_80177D20, MTXF_NEW); + Matrix_Translate(gCalcMatrix, player->pos.x, 0.0f, player->pos.z + gPathProgress, MTXF_NEW); Matrix_RotateY(gCalcMatrix, -(D_ctx_80177A48[4] * M_DTOR), MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &src, &dest); player->cam.eye.x = gCsCamEyeX = dest.x; @@ -1210,7 +1210,7 @@ void Fortuna_LevelComplete(Player* player) { Math_SmoothStepToF(&gCsCamAtY, 0.0f, 0.005f, 1000.0f, 0.0001f); player->cam.at.x = player->pos.x; player->cam.at.y = gCsCamAtY; - player->cam.at.z = player->pos.z + D_ctx_80177D20; + player->cam.at.z = player->pos.z + gPathProgress; break; case 22: @@ -1318,7 +1318,7 @@ void Fortuna_LevelComplete(Player* player) { gFillScreenAlphaStep = 16; if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; - player->timer_1F8 = 0; + player->csTimer = 0; gFadeoutType = 4; Audio_FadeOutAll(10); @@ -1374,7 +1374,7 @@ void Fortuna_LevelComplete(Player* player) { src.x = 0.0f; src.y = D_ctx_80177A48[7]; src.z = D_ctx_80177A48[5]; - Matrix_Translate(gCalcMatrix, player->pos.x, 0.0f, player->pos.z + D_ctx_80177D20, MTXF_NEW); + Matrix_Translate(gCalcMatrix, player->pos.x, 0.0f, player->pos.z + gPathProgress, MTXF_NEW); Matrix_RotateY(gCalcMatrix, -(D_ctx_80177A48[4] * M_DTOR), MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &src, &dest); player->cam.eye.x = gCsCamEyeX = dest.x; @@ -1399,11 +1399,11 @@ void Fortuna_LevelComplete(Player* player) { player->cam.at.x = gCsCamAtX = player->pos.x; player->cam.at.y = gCsCamAtY; - player->cam.at.z = gCsCamAtZ = player->pos.z - D_ctx_80177A48[6] + D_ctx_80177D20; + player->cam.at.z = gCsCamAtZ = player->pos.z - D_ctx_80177A48[6] + gPathProgress; break; } - if (player->unk_1D0 < 20) { + if (player->csState < 20) { switch (gCsFrameCount) { case 1020: gShowLevelClearStatusScreen = 1; @@ -1414,8 +1414,8 @@ void Fortuna_LevelComplete(Player* player) { } } - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->xRot_120 + player->rot.x + player->aerobaticPitch) * M_DTOR), MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; @@ -1429,8 +1429,8 @@ void Fortuna_LevelComplete(Player* player) { player->pos.x += player->vel.x; player->pos.y += player->vel.y; player->pos.z += player->vel.z; - player->unk_138 = player->pos.z; - player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; + player->trueZpos = player->pos.z; + player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; } void Fortuna_8018BA2C(void) { diff --git a/src/overlays/ovl_i4/fox_ka.c b/src/overlays/ovl_i4/fox_ka.c index 85d6c1e8..bdae64bc 100644 --- a/src/overlays/ovl_i4/fox_ka.c +++ b/src/overlays/ovl_i4/fox_ka.c @@ -171,7 +171,7 @@ void Katina_80192C8C(void) { if (actor->obj.status == OBJ_FREE) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_i4_8019F0F0[i], &actor->obj.pos); actor->obj.rot = D_i4_8019F138[i]; Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_i4_8019F114[i], &dest); @@ -196,11 +196,11 @@ void Katina_LevelStart(Player* player) { gAllRangeEventTimer = 0; - if (player->unk_1D0 != 0) { + if (player->csState != 0) { Katina_801981F8(&gActors[4]); } - switch (player->unk_1D0) { + switch (player->csState) { case 1: case 2: case 3: @@ -222,7 +222,7 @@ void Katina_LevelStart(Player* player) { gCsCamAtX = gActors[4].obj.pos.x; gCsCamAtY = gActors[4].obj.pos.y; gCsCamAtZ = gActors[4].obj.pos.z; - player->unk_1D0 = 11; + player->csState = 11; D_ctx_80177A48[0] = 1.0f; break; @@ -235,7 +235,7 @@ void Katina_LevelStart(Player* player) { gActors[6].obj.rot.z += 0.7f; if (gCsFrameCount == 100) { gCsFrameCount = 80; - player->unk_1D0 = 12; + player->csState = 12; } break; @@ -245,11 +245,11 @@ void Katina_LevelStart(Player* player) { gActors[4].obj.rot.z -= 1.0f; if (gCsFrameCount == 120) { ActorAllRange_SpawnTeam(); - player->unk_1D0 = 13; + player->csState = 13; player->pos.x = 0.0f; player->pos.y = 1300.0f; player->pos.z = 10000.0f; - player->unk_0E4 = -10.0f; + player->rot.x = -10.0f; for (i = 1, actor = &gActors[1]; i < 4; i++, actor++) { actor->obj.pos.x = D_i4_8019F168[i - 1].x + player->pos.x; actor->obj.pos.y = D_i4_8019F168[i - 1].y + player->pos.y; @@ -328,8 +328,8 @@ void Katina_LevelStart(Player* player) { Object_Kill(&gActors[5].obj, gActors[5].sfxSource); break; } - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + player->unk_114 + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->rot.y + player->yRot_114 + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(player->rot.x * M_DTOR), MTXF_APPLY); src.x = 0; src.y = 0.0f; src.z = player->baseSpeed; @@ -340,8 +340,8 @@ void Katina_LevelStart(Player* player) { player->pos.x += player->vel.x; player->pos.y += player->vel.y; player->pos.z += player->vel.z; - player->unk_138 = player->pos.z; - player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; + player->trueZpos = player->pos.z; + player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0.0f); @@ -912,7 +912,7 @@ void Katina_801946C4(Boss* boss) { if (boss->timer_050 == 500) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; - gPlayer[0].unk_1D0 = 100; + gPlayer[0].csState = 100; gPlayer[0].unk_234 = 0; gCsFrameCount = 5000; } @@ -1039,17 +1039,16 @@ void Katina_801946C4(Boss* boss) { gFillScreenBlue = 255; if (gFillScreenAlpha == 255) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; - gPlayer[0].unk_1D0 = 2; + gPlayer[0].csState = 2; gPlayer[0].unk_234 = 1; gCsFrameCount = 200; Audio_StopPlayerNoise(0); Audio_KillSfxBySource(&gPlayer[0].sfxSource[0]); - gPlayer[0].timer_1F8 = 50; + gPlayer[0].csTimer = 50; gPlayer[0].baseSpeed = 0.0f; - gPlayer[0].unk_114 = 0.0f; + gPlayer[0].yRot_114 = 0.0f; - gPlayer[0].unk_0EC = gPlayer[0].unk_0E8 = gPlayer[0].unk_0E4 = gPlayer[0].unk_120 = - gPlayer[0].unk_114; + gPlayer[0].rot.z = gPlayer[0].rot.y = gPlayer[0].rot.x = gPlayer[0].xRot_120 = gPlayer[0].yRot_114; Play_ClearObjectData(); gEnvLightyRot = 60.0f; gLight1R = 100; @@ -1065,7 +1064,7 @@ void Katina_801946C4(Boss* boss) { if ((boss->timer_050 == 0) && ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN))) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; - gPlayer[0].unk_1D0 = 0; + gPlayer[0].csState = 0; gMissionStatus = MISSION_ACCOMPLISHED; boss->obj.pos.z = 0.0f; boss->health = -1; @@ -1147,7 +1146,7 @@ void Katina_801946C4(Boss* boss) { gRadarMarks[64].pos.x = boss->obj.pos.x; gRadarMarks[64].pos.y = boss->obj.pos.y; gRadarMarks[64].pos.z = boss->obj.pos.z; - gRadarMarks[64].unk_10 = boss->unk_078.y + 180.0f; + gRadarMarks[64].yRot = boss->unk_078.y + 180.0f; if (boss->state < 6) { Math_SmoothStepToF(&boss->obj.pos.x, boss->vwork[0].x, 0.01f, boss->fwork[10], 0); Math_SmoothStepToF(&boss->obj.pos.y, boss->vwork[0].y, 0.01f, boss->fwork[10], 0); @@ -1328,7 +1327,7 @@ void Katina_80196E30(Actor* actor, s32 idx) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = D_i4_8019F260[idx + 1] + gPlayer[0].pos.x; actor->obj.pos.y = D_i4_8019F26C[idx + 1] + gPlayer[0].pos.y; actor->obj.pos.z = D_i4_8019F278[idx + 1] + gPlayer[0].pos.z; @@ -1346,7 +1345,7 @@ void Katina_80196F40(Actor* actor, s32 idx) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = D_i4_8019F29C[idx + 1]; actor->obj.pos.y = D_i4_8019F2AC[idx + 1]; actor->obj.pos.z = D_i4_8019F2BC[idx + 1]; @@ -1377,7 +1376,7 @@ void Katina_80197024(void) { if ((D_i4_8019F2F0[i] >= gKaAllyKillCount) && ((i >= 3) || (gTeamShields[i + 1] > 0))) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = ((D_i4_8019F340[i].x * 0.5f) + gPlayer[0].pos.x) + RAND_FLOAT_CENTERED_SEEDED(2000.0f); actor->obj.pos.y = (D_i4_8019F340[i].y + gPlayer[0].pos.y) - RAND_FLOAT_SEEDED(1000.0f); actor->obj.pos.z = (D_i4_8019F340[i].z + gPlayer[0].pos.z) + RAND_FLOAT_SEEDED(1000.0f); @@ -1407,9 +1406,9 @@ void Katina_LevelComplete(Player* player) { player->wings.unk_0C = 0.0f; player->wings.unk_08 = 0.0f; player->wings.unk_04 = 0.0f; - player->unk_4D8 = 0.0f; + player->aerobaticPitch = 0.0f; D_ctx_80177A48[0] = 1.0f; - switch (player->unk_1D0) { + switch (player->csState) { case 0: Audio_StopSfxByBankAndSource(1, &player->sfxSource[0]); gCsFrameCount = 0; @@ -1417,8 +1416,8 @@ void Katina_LevelComplete(Player* player) { player->pos.x = boss->obj.pos.x; player->pos.y = 800.0f; player->pos.z = boss->obj.pos.z; - player->unk_114 = player->unk_120 = player->unk_0E4 = player->camRoll = player->unk_4D8 = 0.0f; - player->unk_0E8 = 120.0f; + player->yRot_114 = player->xRot_120 = player->rot.x = player->camRoll = player->aerobaticPitch = 0.0f; + player->rot.y = 120.0f; player->baseSpeed = 40.0f; gCsCamEyeX = boss->obj.pos.x + 5000.0f; gCsCamEyeY = 750.0f; @@ -1431,7 +1430,7 @@ void Katina_LevelComplete(Player* player) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); } } - player->unk_1D0 += 1; + player->csState += 1; if (gTeamShields[TEAM_ID_FALCO] > 0) { Katina_80196E30(&gActors[1], 0); } @@ -1450,18 +1449,17 @@ void Katina_LevelComplete(Player* player) { gCsCamAtX = boss->obj.pos.x; gCsCamAtY = 1000.0f; gCsCamAtZ = boss->obj.pos.z; - Math_SmoothStepToF(&player->unk_0EC, - Math_SmoothStepToAngle(&player->unk_0E8, 283.0f, 0.1f, 3.0f, 0.0f) * 20.0f, 0.1f, 1.0f, - 0.0f); + Math_SmoothStepToF(&player->rot.z, Math_SmoothStepToAngle(&player->rot.y, 283.0f, 0.1f, 3.0f, 0.0f) * 20.0f, + 0.1f, 1.0f, 0.0f); for (i = 1; i < 4; i++) { angle = Math_SmoothStepToAngle(&gActors[i].unk_0F4.y, gActors[i].fwork[1], 0.1f, 3.0f, 0.0f); Math_SmoothStepToF(&gActors[i].unk_0F4.z, angle * 20.0f, 0.1f, 1.0f, 0.0f); } if (gCsFrameCount >= 200) { - player->unk_0E4 += 1.0f; - player->unk_0E8 += 1.0f; - player->unk_0EC += 1.0f; + player->rot.x += 1.0f; + player->rot.y += 1.0f; + player->rot.z += 1.0f; } if (gCsFrameCount >= 225) { @@ -1479,25 +1477,25 @@ void Katina_LevelComplete(Player* player) { } if (gCsFrameCount == 250) { - player->unk_1D0 = 2; + player->csState = 2; Play_ClearObjectData(); Audio_StopPlayerNoise(0); Audio_KillSfxBySource(&player->sfxSource[0]); - player->timer_1F8 = 50; + player->csTimer = 50; player->baseSpeed = 0.0f; - player->unk_0E4 = 0.0f; - player->unk_0E8 = 0.0f; - player->unk_0EC = 0.0f; + player->rot.x = 0.0f; + player->rot.y = 0.0f; + player->rot.z = 0.0f; } break; case 2: - if (player->timer_1F8 == 0) { + if (player->csTimer == 0) { player->unk_240 = 1; player->pos.x = 0.0f; player->pos.y = 3500.0f; player->pos.z = 150.0f; - player->unk_1D0 = 3; + player->csState = 3; Audio_StartPlayerNoise(0); if (gMissionStatus != MISSION_COMPLETE) { AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); @@ -1530,12 +1528,12 @@ void Katina_LevelComplete(Player* player) { gCsCamAtZ = player->pos.z + 500; if (gCsFrameCount > 1010) { player->baseSpeed += 2.0f; - player->unk_0E4 += 0.1f; + player->rot.x += 0.1f; Math_SmoothStepToF(&D_ctx_80177A48[2], 0.0f, 1.0f, 0.001f, 0); player->unk_190 = 2.0f; - player->unk_25C += 0.04f; - if (player->unk_25C > 0.6f) { - player->unk_25C = 0.6f; + player->contrailScale += 0.04f; + if (player->contrailScale > 0.6f) { + player->contrailScale = 0.6f; } } else { Math_SmoothStepToF(&D_ctx_80177A48[2], 0.2f, 1.0f, 0.005f, 0); @@ -1551,7 +1549,7 @@ void Katina_LevelComplete(Player* player) { gFillScreenAlphaStep = 8; if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; - player->timer_1F8 = 0; + player->csTimer = 0; gFadeoutType = 4; gLeveLClearStatus[LEVEL_KATINA] = Play_CheckMedalStatus(150) + 1; } @@ -1625,7 +1623,7 @@ void Katina_LevelComplete(Player* player) { if (gTeamShields[TEAM_ID_PEPPY] > 0) { Katina_80196F40(&gActors[4], 3); } - player->unk_1D0 += 1; + player->csState += 1; break; case 101: @@ -1639,8 +1637,8 @@ void Katina_LevelComplete(Player* player) { gActors[4].unk_0F4.x += 0.08f; break; } - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4) * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->xRot_120 + player->rot.x) * M_DTOR), MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; src.z = player->baseSpeed; @@ -1651,9 +1649,9 @@ void Katina_LevelComplete(Player* player) { player->pos.x += player->vel.x; player->pos.y += player->vel.y; player->pos.z += player->vel.z; - player->unk_0F8 = player->unk_0EC; - player->unk_138 = player->pos.z; - if (player->unk_1D0 < 100) { + player->bankAngle = player->rot.z; + player->trueZpos = player->pos.z; + if (player->csState < 100) { Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0); Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0); Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0); @@ -1661,10 +1659,10 @@ void Katina_LevelComplete(Player* player) { Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0); Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0); } - player->unk_088 += 10.0f; - player->unk_080 = -SIN_DEG(player->unk_088) * 0.3f; - player->unk_0F4 += 8.0f; - player->unk_0F0 = SIN_DEG(player->unk_0F4); + player->bobPhase += 10.0f; + player->yBob = -SIN_DEG(player->bobPhase) * 0.3f; + player->rockPhase += 8.0f; + player->rockAngle = SIN_DEG(player->rockPhase); } void Katina_80197F10(Actor* actor) { @@ -1764,7 +1762,7 @@ void Katina_801981F8(Actor* actor) { actor_it->timer_0C2 = 30; Object_SetInfo(&actor_it->info, actor_it->obj.id); if (actor_it->unk_0B6 == 1) { - actor_it->info.unk_1C = 0.0f; + actor_it->info.targetOffset = 0.0f; actor_it->info.bonus = 0; AUDIO_PLAY_SFX(0x3100000C, actor_it->sfxSource, 4); } @@ -1795,7 +1793,7 @@ void Katina_8019848C(void) { actor->timer_0C2 = 30; actor->obj.id = OBJ_ACTOR_ALLRANGE; Object_SetInfo(&actor->info, actor->obj.id); - actor->info.unk_1C = 0.0f; + actor->info.targetOffset = 0.0f; actor->info.bonus = 0; AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); } @@ -2118,7 +2116,7 @@ void Katina_80198AA0(Actor* actor) { radarMark->pos.x = actor->obj.pos.x; radarMark->pos.y = actor->obj.pos.y; radarMark->pos.z = actor->obj.pos.z; - radarMark->unk_10 = actor->unk_0F4.y + 180.0f; + radarMark->yRot = actor->unk_0F4.y + 180.0f; if (actor->iwork[8] != 0) { actor->iwork[8]--; } diff --git a/src/overlays/ovl_i4/fox_sz.c b/src/overlays/ovl_i4/fox_sz.c index cfefb810..e087d5a5 100644 --- a/src/overlays/ovl_i4/fox_sz.c +++ b/src/overlays/ovl_i4/fox_sz.c @@ -49,9 +49,9 @@ void SectorZ_80199900(Actor* actor, s32 arg1) { ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN))) { gCsFrameCount = 0; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; - gPlayer[0].unk_1D0 = 1000; + gPlayer[0].csState = 1000; gActors[0].state = 6; - gPlayer[0].timer_1F8 = 30; + gPlayer[0].csTimer = 30; AUDIO_PLAY_SFX(0x11030010, gActors[0].sfxSource, 0); AUDIO_PLAY_SFX(0x31024059, gActors[0].sfxSource, 0); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); @@ -156,10 +156,10 @@ void SectorZ_Missile_Update(Actor* this) { (fabsf(this->fwork[MISSILE_TARGET_Z] - this->obj.pos.z) < 800.0f)) { SectorZ_80199900(this, 0); gCameraShake = 25; - gBosses[0].dmgType = DMG_UNK_100; + gBosses[0].dmgType = DMG_zRot_0FC; if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; - gPlayer[0].unk_1D0 = 0; + gPlayer[0].csState = 0; gActors[0].state = -31072; return; } @@ -171,7 +171,7 @@ void SectorZ_Missile_Update(Actor* this) { (((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_GFOX_REPAIR)) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN))) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; - gPlayer[0].unk_1D0 = 100; + gPlayer[0].csState = 100; gActors[0].state = -31072; } } @@ -245,7 +245,7 @@ void SectorZ_8019A1D0(void) { Object_SetInfo(&actor->info, actor->obj.id); - actor->info.unk_1C = 0.0f; + actor->info.targetOffset = 0.0f; AUDIO_PLAY_SFX(0x31000011, actor->sfxSource, 4); } @@ -453,10 +453,10 @@ void SectorZ_8019A3E8(Actor* actor) { bool SectorZ_8019AA9C(Player* player) { if (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) { - if ((player->unk_114 > 30.0f) && (player->unk_114 < 150.0f) && (fabsf(player->pos.x - 1270.0f) < 450.0f) && - (fabsf(player->pos.y - 265.0f) < 100.0f) && (fabsf(player->unk_138) < 172.0f)) { + if ((player->yRot_114 > 30.0f) && (player->yRot_114 < 150.0f) && (fabsf(player->pos.x - 1270.0f) < 450.0f) && + (fabsf(player->pos.y - 265.0f) < 100.0f) && (fabsf(player->trueZpos) < 172.0f)) { player->state_1C8 = PLAYERSTATE_1C8_GFOX_REPAIR; - player->unk_1D0 = 0; + player->csState = 0; gActors[0].state = 20; gAllRangeEventTimer--; return true; @@ -662,7 +662,7 @@ void SectorZ_8019B48C(void) { for (i = 0; i < ARRAY_COUNT(D_i4_8019F528); i++, actor++) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->unk_0B6 = 25; actor->obj.pos.x = D_i4_8019F528[i].x; actor->obj.pos.y = D_i4_8019F528[i].y; @@ -678,7 +678,7 @@ void SectorZ_8019B568(void) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = 5000.0f; actor->obj.pos.y = 0.0f; @@ -699,7 +699,7 @@ f32 D_i4_8019F5AC[] = { -30.0f, 20.0f, 30.0f, -40.0f }; void SectorZ_8019B630(Actor* actor, s32 index) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = gPlayer[0].cam.eye.x + D_i4_8019F57C[index].x; actor->obj.pos.y = gPlayer[0].cam.eye.y + D_i4_8019F57C[index].y; @@ -727,7 +727,7 @@ void SectorZ_8019B75C(Actor* actor, s32 arg1) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = D_i4_8019F5BC[arg1].x + newActor->obj.pos.x; actor->obj.pos.y = newActor->obj.pos.y - 500.0f; @@ -771,7 +771,7 @@ void SectorZ_8019B888(void) { AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); actor->info.hitbox = SEGMENTED_TO_VIRTUAL(gTeamHitbox); actor->info.unk_16 = 0; - actor->info.unk_1C = 0.0f; + actor->info.targetOffset = 0.0f; } } } @@ -786,11 +786,11 @@ void SectorZ_LevelStart(Player* player) { gAllRangeEventTimer = 0; - switch (player->unk_1D0) { + switch (player->csState) { case 0: gCsFrameCount = 0; - player->unk_1D0++; + player->csState++; SectorZ_8019B568(); SectorZ_8019B48C(); @@ -819,7 +819,7 @@ void SectorZ_LevelStart(Player* player) { if (gCsFrameCount == 320) { actor = &actor[0]; - player->unk_1D0 = 2; + player->csState = 2; actor->vel.x = -10.0f; actor->obj.pos.x = 1000.0f; gCsCamEyeX = 0.0f; @@ -846,7 +846,7 @@ void SectorZ_LevelStart(Player* player) { if (gCsFrameCount == 500) { gCsFrameCount = 520; - player->unk_1D0++; + player->csState++; actor->vel.x = 0.0f; @@ -910,7 +910,7 @@ void SectorZ_LevelStart(Player* player) { gActors[32].vel.y += 0.4f; if (gCsFrameCount > 760) { - player->unk_0E4 += 0.25f; + player->rot.x += 0.25f; } if (gCsFrameCount > 765) { @@ -991,15 +991,15 @@ void SectorZ_LevelStart(Player* player) { case 760: player->unk_194 = 5.0f; player->unk_190 = 5.0f; - player->unk_114 = 90.0f; + player->yRot_114 = 90.0f; player->baseSpeed = gArwingSpeed; player->unk_234 = 1; AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); break; } - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + player->unk_114 + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->rot.y + player->yRot_114 + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(player->rot.x * M_DTOR), MTXF_APPLY); sp74.x = 0.0f; sp74.y = 0.0f; @@ -1015,8 +1015,8 @@ void SectorZ_LevelStart(Player* player) { player->pos.y += player->vel.y; player->pos.z += player->vel.z; - player->unk_138 = player->pos.z; - player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; + player->trueZpos = player->pos.z; + player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0); Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0); @@ -1041,14 +1041,14 @@ void SectorZ_8019C574(Actor* actor, s32 index) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = D_i4_8019F61C[index] * var_fv0; actor->obj.pos.y = D_i4_8019F62C[index]; actor->obj.pos.z = D_i4_8019F63C[index]; actor->fwork[0] = gPlayer[0].baseSpeed; - actor->unk_0F4.y = gPlayer[0].unk_0E8; + actor->unk_0F4.y = gPlayer[0].rot.y; Object_SetInfo(&actor->info, actor->obj.id); @@ -1069,7 +1069,7 @@ void SectorZ_8019C70C(void) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = gBosses[0].obj.pos.x + 700.0f; actor->obj.pos.y = gBosses[0].obj.pos.y - 1000.0f; @@ -1110,14 +1110,14 @@ void SectorZ_LevelComplete(Player* player) { Math_SmoothStepToF(&player->boostSpeed, 0.0f, 0.1f, 1.5f, 0.0f); - switch (player->unk_1D0) { + switch (player->csState) { case 1000: - Math_SmoothStepToF(&player->unk_0E8, -40.0f, 0.1f, 2.5f, 0); - Math_SmoothStepToF(&player->unk_0EC, -60.0f, 0.2f, 5.0f, 0); - Math_SmoothStepToF(&player->unk_0E4, 0, 0.1f, 2.5f, 0); - if (player->timer_1F8 == 0) { - player->unk_1D0 = 1001; - player->timer_1F8 = 100; + Math_SmoothStepToF(&player->rot.y, -40.0f, 0.1f, 2.5f, 0); + Math_SmoothStepToF(&player->rot.z, -60.0f, 0.2f, 5.0f, 0); + Math_SmoothStepToF(&player->rot.x, 0, 0.1f, 2.5f, 0); + if (player->csTimer == 0) { + player->csState = 1001; + player->csTimer = 100; AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); player->unk_194 = 5.0f; player->unk_190 = 5.0f; @@ -1128,17 +1128,17 @@ void SectorZ_LevelComplete(Player* player) { case 1001: player->unk_190 = 2.0f; - Math_SmoothStepToF(&player->unk_0E4, 15.0f, 0.1f, 0.4f, 0); - Math_SmoothStepToF(&player->unk_0EC, 40.0f, 0.2f, 5.0f, 0); - Math_SmoothStepToF(&player->unk_0E8, 120.0f, 0.1f, 2.0f, 0); + Math_SmoothStepToF(&player->rot.x, 15.0f, 0.1f, 0.4f, 0); + Math_SmoothStepToF(&player->rot.z, 40.0f, 0.2f, 5.0f, 0); + Math_SmoothStepToF(&player->rot.y, 120.0f, 0.1f, 2.0f, 0); player->baseSpeed += 1.0f; if (player->baseSpeed >= 70.0f) { player->baseSpeed = 70.0f; } - if (player->timer_1F8 == 0) { - gPlayer[0].unk_1D0 = 0; + if (player->csTimer == 0) { + gPlayer[0].csState = 0; } break; @@ -1159,7 +1159,7 @@ void SectorZ_LevelComplete(Player* player) { player->camRoll = 0.0f; if (boss0->state != 0) { - player->unk_1D0 = 0; + player->csState = 0; } break; @@ -1174,11 +1174,11 @@ void SectorZ_LevelComplete(Player* player) { D_ctx_80177A48[0] = 1.0f; - player->unk_1D0 = 1; + player->csState = 1; gProjectFar = 30000.0f; - player->timer_1F8 = 550; + player->csTimer = 550; player->baseSpeed = 0.0f; player->camRoll = 0.0f; @@ -1220,8 +1220,8 @@ void SectorZ_LevelComplete(Player* player) { gCsCamAtY = boss0->obj.pos.y + (2.0f * gCameraShakeY); gCsCamAtZ = boss0->obj.pos.z; - if (player->timer_1F8 == 0) { - player->unk_1D0 = 2; + if (player->csTimer == 0) { + player->csState = 2; } break; @@ -1229,7 +1229,7 @@ void SectorZ_LevelComplete(Player* player) { gFillScreenAlphaTarget = 0; gFillScreenAlpha = 0; - if (player->timer_1F8 == 0) { + if (player->csTimer == 0) { if (!gGreatFoxIntact) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); @@ -1237,8 +1237,8 @@ void SectorZ_LevelComplete(Player* player) { gCsFrameCount = 1280; - player->unk_1D0 = 10; - player->timer_1F8 = 1000; + player->csState = 10; + player->csTimer = 1000; Audio_StopPlayerNoise(0U); Audio_KillSfxBySource(player->sfxSource); @@ -1248,12 +1248,12 @@ void SectorZ_LevelComplete(Player* player) { player->pos.y = 0.0f; player->pos.z = 0.0f; - player->unk_0E4 = 0.0f; + player->rot.x = 0.0f; player->unk_234 = 1; - player->unk_0E8 = 180.0f; - player->unk_0EC = 0.0f; - player->unk_114 = 0.0f; - player->unk_4D8 = 0.0f; + player->rot.y = 180.0f; + player->rot.z = 0.0f; + player->yRot_114 = 0.0f; + player->aerobaticPitch = 0.0f; player->baseSpeed = 40.0f; gCsCamEyeX = 0.0f - (200.0f * var_fv1); @@ -1284,7 +1284,7 @@ void SectorZ_LevelComplete(Player* player) { gCsCamAtZ = player->pos.z; if (gCsFrameCount == 1620) { - player->unk_1D0 += 1; + player->csState += 1; D_ctx_80177A48[0] = 0.0f; D_ctx_80177A48[1] = 0.0f; D_ctx_80177A48[2] = 0.0f; @@ -1325,7 +1325,7 @@ void SectorZ_LevelComplete(Player* player) { if (gCsFrameCount > 2510) { player->baseSpeed += 2.0f; - player->unk_0E4 += 0.1f; + player->rot.x += 0.1f; player->unk_190 = 2.0f; } @@ -1351,7 +1351,7 @@ void SectorZ_LevelComplete(Player* player) { gFillScreenAlphaStep = 8; if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; - player->timer_1F8 = 0; + player->csTimer = 0; gFadeoutType = 4; gLeveLClearStatus[LEVEL_SECTOR_Z] = Play_CheckMedalStatus(100) + 1; } @@ -1524,8 +1524,8 @@ void SectorZ_LevelComplete(Player* player) { break; } - Matrix_RotateY(gCalcMatrix, ((player->unk_114 + player->unk_0E8) + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(((player->unk_120 + player->unk_0E4) + player->unk_4D8) * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, ((player->yRot_114 + player->rot.y) + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(((player->xRot_120 + player->rot.x) + player->aerobaticPitch) * M_DTOR), MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; @@ -1541,15 +1541,15 @@ void SectorZ_LevelComplete(Player* player) { player->pos.y += player->vel.y; player->pos.z += player->vel.z; - player->unk_138 = player->pos.z; - player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; + player->trueZpos = player->pos.z; + player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; - Math_SmoothStepToF(&player->unk_130, 0.0f, 0.1f, 15.0f, 0.0f); - Math_SmoothStepToF(&player->unk_12C, 0.0f, 0.1f, 15.0f, 0.0f); + Math_SmoothStepToF(&player->zRotBarrelRoll, 0.0f, 0.1f, 15.0f, 0.0f); + Math_SmoothStepToF(&player->zRotBank, 0.0f, 0.1f, 15.0f, 0.0f); Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f); - Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 20.0f, 0.0f); + Math_SmoothStepToAngle(&player->aerobaticPitch, 0.0f, 0.1f, 20.0f, 0.0f); - if (player->unk_1D0 >= 1000) { + if (player->csState >= 1000) { if (player->pos.y < 700.0f) { Math_SmoothStepToF(&player->pos.y, 700.0f, 0.1f, 10.0f, 0.0f); } @@ -1566,10 +1566,10 @@ void SectorZ_LevelComplete(Player* player) { Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0.0f); } - player->unk_088 += 10.0f; - player->unk_080 = -SIN_DEG(player->unk_088) * 0.3f; - player->unk_0F4 += 8.0f; - player->unk_0F0 = SIN_DEG(player->unk_0F4); + player->bobPhase += 10.0f; + player->yBob = -SIN_DEG(player->bobPhase) * 0.3f; + player->rockPhase += 8.0f; + player->rockAngle = SIN_DEG(player->rockPhase); } void SectorZ_8019DD20(Actor* actor) { @@ -1677,9 +1677,9 @@ void SectorZ_8019E234(Actor* actor) { actor->obj.rot.x += actor->unk_0F4.x; actor->obj.rot.y += actor->unk_0F4.y; - if (actor->unk_0D0 != 0) { + if (actor->dmgType != 0) { actor->timer_0C6 = 20; - actor->unk_0D0 = 0; + actor->dmgType = 0; actor->health -= actor->damage; AUDIO_PLAY_SFX(0x2903300E, actor->sfxSource, 4); if (actor->health <= 0) { @@ -1719,7 +1719,7 @@ void SectorZ_8019E454(Boss* boss) { Vec3f src; Vec3f dest; - if (boss->dmgType == DMG_UNK_100) { + if (boss->dmgType == DMG_zRot_0FC) { boss->dmgType = 0; boss->timer_050 = 10; boss->timer_052 = 60; diff --git a/src/overlays/ovl_i5/fox_ma.c b/src/overlays/ovl_i5/fox_ma.c index 25cbc935..5f482ee0 100644 --- a/src/overlays/ovl_i5/fox_ma.c +++ b/src/overlays/ovl_i5/fox_ma.c @@ -471,7 +471,7 @@ void Macbeth_8019A2F4(Actor* actor) { s32 var_a0; for (var_v0 = D_MA_801BE2F0[0]; D_i5_801BA1EC[var_v0].unk_00 != -1.0f; var_v0++) { - if (D_i5_801BA1EC[var_v0].unk_00 < gPlayer[0].unk_138) { + if (D_i5_801BA1EC[var_v0].unk_00 < gPlayer[0].trueZpos) { var_a0 = var_v0; if (var_v0 == 0) { var_a0 = 1; @@ -515,19 +515,19 @@ void Macbeth_8019A2F4(Actor* actor) { } } if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) { - if (var_fa1 < (gPlayer[0].unk_138 - actor->obj.pos.z - (D_i5_801BA1E4 * 1416 - 1416))) { + if (var_fa1 < (gPlayer[0].trueZpos - actor->obj.pos.z - (D_i5_801BA1E4 * 1416 - 1416))) { Math_SmoothStepToF(&D_i5_801BA1DC, -6.0f, 0.1f, 0.2f, 0.01f); } - if ((gPlayer[0].unk_138 - actor->obj.pos.z - (D_i5_801BA1E4 * 1416 - 1416)) < var_ft4) { + if ((gPlayer[0].trueZpos - actor->obj.pos.z - (D_i5_801BA1E4 * 1416 - 1416)) < var_ft4) { Math_SmoothStepToF(&D_i5_801BA1DC, -30.0f, 0.1f, 0.2f, 0.01f); } - if ((D_i5_801BA1E4 < 5) && (gPlayer[0].unk_138 - actor->obj.pos.z > 4000.0f)) { + if ((D_i5_801BA1E4 < 5) && (gPlayer[0].trueZpos - actor->obj.pos.z > 4000.0f)) { Math_SmoothStepToF(&D_i5_801BA1DC, 0.0f, 0.1f, 1.0f, 0.01f); } - if (gPlayer[0].unk_138 - actor->obj.pos.z > 25000.0f) { + if (gPlayer[0].trueZpos - actor->obj.pos.z > 25000.0f) { D_i5_801BA1DC = 0.0f; } - if (gPlayer[0].unk_138 - actor->obj.pos.z < -8000.0f) { + if (gPlayer[0].trueZpos - actor->obj.pos.z < -8000.0f) { D_i5_801BA1DC = -200.0f; } } @@ -558,13 +558,13 @@ void Macbeth_8019A728(Actor* actor) { } void Macbeth_8019A830(Actor* actor) { - if ((gPlayer[0].unk_138 - actor->obj.pos.z) < -20000.0f) { + if ((gPlayer[0].trueZpos - actor->obj.pos.z) < -20000.0f) { Object_Kill(&actor->obj, actor->sfxSource); } } void Macbeth_8019A87C(Actor* actor) { - if ((gPlayer[0].unk_138 - actor->obj.pos.z) < -2000.0f) { + if ((gPlayer[0].trueZpos - actor->obj.pos.z) < -2000.0f) { Object_Kill(&actor->obj, actor->sfxSource); } } @@ -730,11 +730,11 @@ void Macbeth_8019BE50(Actor* actor) { } bool Macbeth_8019C4EC(Actor* actor) { - if (actor->unk_0D0 != 0) { - actor->unk_0D0 = 0; - if (actor->unk_0D2 == 1) { + if (actor->dmgType != 0) { + actor->dmgType = 0; + if (actor->dmgPart == 1) { AUDIO_PLAY_SFX(0x29034003, actor->sfxSource, 4); - actor->unk_0D0 = 0; + actor->dmgType = 0; actor->iwork[7] = 15; D_i5_801BE320[22] = 0; D_i5_801BE320[4] = 120; @@ -889,7 +889,7 @@ void Macbeth_8019C778(Actor* actor) { Object_Kill(&actor->obj, actor->sfxSource); if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; - gPlayer[0].unk_1D0 = 0; + gPlayer[0].csState = 0; gMissionStatus = MISSION_COMPLETE; } actor->state++; @@ -899,8 +899,8 @@ void Macbeth_8019C778(Actor* actor) { break; } - if (actor->unk_0D0 != 0) { - actor->unk_0D0 = 0; + if (actor->dmgType != 0) { + actor->dmgType = 0; AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); } @@ -961,8 +961,8 @@ void Macbeth_8019CE88(Actor* actor) { Math_SmoothStepToF(&actor->vel.z, 0.0f, 0.02f, 10.0f, 0.01f); Macbeth_801A015C(actor); Macbeth_8019A87C(actor); - if (actor->unk_0D0 != 0) { - actor->unk_0D0 = 0; + if (actor->dmgType != 0) { + actor->dmgType = 0; actor->timer_0BC = 20; Macbeth_8019BE50(actor); actor->state = 3; @@ -1098,8 +1098,8 @@ void Macbeth_8019D700(Actor* actor) { Math_SmoothStepToF(&actor->vel.z, 0.0f, 0.02f, 10.0f, 0); Macbeth_801A015C(actor); Macbeth_8019A830(actor); - if (actor->unk_0D0 != 0) { - actor->unk_0D0 = 0; + if (actor->dmgType != 0) { + actor->dmgType = 0; actor->timer_0BC = 20; Macbeth_8019BE50(actor); actor->state = 3; @@ -1121,11 +1121,11 @@ void Macbeth_8019D910(Actor* actor, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f3 switch (*arg1) { case 0: - if (((actor->unk_0D0 != 0) && (arg3 == actor->unk_0D2)) || + if (((actor->dmgType != 0) && (arg3 == actor->dmgPart)) || ((D_MA_801BE2F0[1] - 1 == actor->iwork[5]) && (actor->iwork[5] < D_MA_801BE2F0[3])) || (((D_MA_801BE2F0[1] + 1) == actor->iwork[5]) && (D_MA_801BE2F0[3] < actor->iwork[5]))) { AUDIO_PLAY_SFX(0x29034003, actor->sfxSource, 4); - actor->unk_0D0 = 0; + actor->dmgType = 0; func_effect_8007C120(actor->obj.pos.x + arg4, actor->obj.pos.y + 200.0f, actor->obj.pos.z + arg5, actor->vel.x, actor->vel.y, actor->vel.z, 0.15f, 20); actor->iwork[arg3 + 6] = 15; @@ -1135,8 +1135,8 @@ void Macbeth_8019D910(Actor* actor, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f3 (((D_MA_801BE2F0[1] + 1) == actor->iwork[5]) && (D_MA_801BE2F0[3] < actor->iwork[5]))) { (*arg1)++; } - } else if ((actor->unk_0D0 != 0) && (actor->unk_0D2 == 0)) { - actor->unk_0D0 = 0; + } else if ((actor->dmgType != 0) && (actor->dmgPart == 0)) { + actor->dmgType = 0; AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); } break; @@ -1158,12 +1158,12 @@ void Macbeth_8019D910(Actor* actor, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f3 (*arg1)++; break; case 2: - if (((actor->unk_0D0 != 0) && (arg3 == actor->unk_0D2)) || + if (((actor->dmgType != 0) && (arg3 == actor->dmgPart)) || ((D_MA_801BE2F0[1] - 1 == actor->iwork[5]) && (actor->iwork[5] < D_MA_801BE2F0[3])) || (((D_MA_801BE2F0[1] + 1) == actor->iwork[5]) && (D_MA_801BE2F0[3] < actor->iwork[5])) || ((actor->obj.id == OBJ_ACTOR_209) && (arg3 == 2))) { AUDIO_PLAY_SFX(0x29034003, actor->sfxSource, 4); - actor->unk_0D0 = 0; + actor->dmgType = 0; func_effect_8007C120(actor->obj.pos.x + arg4, actor->obj.pos.y + 200.0f, actor->obj.pos.z + arg5, actor->vel.x, actor->vel.y, actor->vel.z, 0.15f, 20); actor->iwork[arg3 + 6] = 20; @@ -1175,8 +1175,8 @@ void Macbeth_8019D910(Actor* actor, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f3 gHitCount++; (*arg1)++; } - } else if ((actor->unk_0D0 != 0) && (actor->unk_0D2 == 0)) { - actor->unk_0D0 = 0; + } else if ((actor->dmgType != 0) && (actor->dmgPart == 0)) { + actor->dmgType = 0; AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); } break; @@ -1264,8 +1264,8 @@ void Macbeth_8019E410(Actor* actor) { Math_SmoothStepToF(&actor->vel.z, 0.0f, 0.02f, 10.0f, 0.01f); Macbeth_801A015C(actor); Macbeth_8019A87C(actor); - if (actor->unk_0D0 != 0) { - actor->unk_0D0 = 0; + if (actor->dmgType != 0) { + actor->dmgType = 0; actor->timer_0BC = 20; Macbeth_8019BE50(actor); actor->state = 3; @@ -1287,11 +1287,11 @@ f32 D_i5_801BE24C; void Macbeth_8019E624(Actor* actor, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f32 arg5, s32* arg6) { switch (*arg1) { case 0: - if (((actor->unk_0D0 != 0) && (arg3 == actor->unk_0D2)) || + if (((actor->dmgType != 0) && (arg3 == actor->dmgPart)) || ((D_MA_801BE2F0[1] - 1 == actor->iwork[5]) && (actor->iwork[5] < D_MA_801BE2F0[3])) || (((D_MA_801BE2F0[1] + 1) == actor->iwork[5]) && (D_MA_801BE2F0[3] < actor->iwork[5]))) { AUDIO_PLAY_SFX(0x29034003, actor->sfxSource, 4); - actor->unk_0D0 = 0; + actor->dmgType = 0; func_effect_8007C120(actor->obj.pos.x + arg4, actor->obj.pos.y + 200.0f, actor->obj.pos.z + arg5, actor->vel.x, actor->vel.y, actor->vel.z, 0.15f, 10); actor->iwork[7] = 15; @@ -1301,8 +1301,8 @@ void Macbeth_8019E624(Actor* actor, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f3 (((D_MA_801BE2F0[1] + 1) == actor->iwork[5]) && (D_MA_801BE2F0[3] < actor->iwork[5]))) { (*arg1)++; } - } else if (actor->unk_0D0 != 0) { - actor->unk_0D0 = 0; + } else if (actor->dmgType != 0) { + actor->dmgType = 0; AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); } Macbeth_8019B580(actor, arg2); @@ -1314,11 +1314,11 @@ void Macbeth_8019E624(Actor* actor, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f3 (*arg1)++; break; case 2: - if (((actor->unk_0D0 != 0) && (arg3 == actor->unk_0D2)) || + if (((actor->dmgType != 0) && (arg3 == actor->dmgPart)) || ((D_MA_801BE2F0[1] - 1 == actor->iwork[5]) && (actor->iwork[5] < D_MA_801BE2F0[3])) || (((D_MA_801BE2F0[1] + 1) == actor->iwork[5]) && (D_MA_801BE2F0[3] < actor->iwork[5]))) { AUDIO_PLAY_SFX(0x29034003, actor->sfxSource, 4); - actor->unk_0D0 = 0; + actor->dmgType = 0; func_effect_8007C120(actor->obj.pos.x + arg4, actor->obj.pos.y + 200.0f, actor->obj.pos.z + arg5, actor->vel.x, actor->vel.y, actor->vel.z, 0.2f, 10); actor->iwork[7] = 15; @@ -1330,8 +1330,8 @@ void Macbeth_8019E624(Actor* actor, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f3 (*arg1)++; } } else { - if (actor->unk_0D0 != 0) { - actor->unk_0D0 = 0; + if (actor->dmgType != 0) { + actor->dmgType = 0; AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); } } @@ -1372,8 +1372,8 @@ void Macbeth_8019EA60(Actor* actor) { Math_SmoothStepToF(&actor->vel.z, 0.0f, 0.02f, 10.0f, 0.01f); Macbeth_801A015C(actor); Macbeth_8019A87C(actor); - if (actor->unk_0D0 != 0) { - actor->unk_0D0 = 0; + if (actor->dmgType != 0) { + actor->dmgType = 0; actor->timer_0BC = 20; Macbeth_8019BE50(actor); actor->state = 3; @@ -1393,11 +1393,11 @@ void Macbeth_8019EA60(Actor* actor) { void Macbeth_8019EBF8(Actor* actor, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f32 arg5, s32* arg6) { switch (*arg1) { case 0: - if (((actor->unk_0D0 != 0) && (arg3 == actor->unk_0D2)) || + if (((actor->dmgType != 0) && (arg3 == actor->dmgPart)) || ((D_MA_801BE2F0[1] - 1 == actor->iwork[5]) && (actor->iwork[5] < D_MA_801BE2F0[3])) || (((D_MA_801BE2F0[1] + 1) == actor->iwork[5]) && (D_MA_801BE2F0[3] < actor->iwork[5]))) { AUDIO_PLAY_SFX(0x29034003, actor->sfxSource, 4); - actor->unk_0D0 = 0; + actor->dmgType = 0; func_effect_8007C120(actor->obj.pos.x + arg4, actor->obj.pos.y + 200.0f, actor->obj.pos.z + arg5, actor->vel.x, actor->vel.y, actor->vel.z, 0.15f, 10); actor->iwork[7] = 15; @@ -1408,8 +1408,8 @@ void Macbeth_8019EBF8(Actor* actor, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f3 gHitCount++; (*arg1)++; } - } else if (actor->unk_0D0 != 0) { - actor->unk_0D0 = 0; + } else if (actor->dmgType != 0) { + actor->dmgType = 0; AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); } Macbeth_8019B580(actor, arg2); @@ -1440,9 +1440,10 @@ void Macbeth_8019EE68(Actor* actor) { } gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 255; gCameraShake = 35; - if ((gPlayer[0].unk_138 - actor->obj.pos.z > -200.0f) && (gPlayer[0].unk_138 - actor->obj.pos.z < 200.0f) && - (gPlayer[0].pos.y - actor->obj.pos.y > -300.0f) && (gPlayer[0].pos.y - actor->obj.pos.y < 300.0f) && - (gPlayer[0].pos.x - actor->obj.pos.x > -800.0f) && (gPlayer[0].pos.x - actor->obj.pos.x < 800.0f)) { + if ((gPlayer[0].trueZpos - actor->obj.pos.z > -200.0f) && + (gPlayer[0].trueZpos - actor->obj.pos.z < 200.0f) && (gPlayer[0].pos.y - actor->obj.pos.y > -300.0f) && + (gPlayer[0].pos.y - actor->obj.pos.y < 300.0f) && (gPlayer[0].pos.x - actor->obj.pos.x > -800.0f) && + (gPlayer[0].pos.x - actor->obj.pos.x < 800.0f)) { gFillScreenRed = gFillScreenAlpha = 255; gFillScreenGreen = gFillScreenBlue = 0; Player_ApplyDamage(&gPlayer[0], 0, 60); @@ -1464,7 +1465,7 @@ void Macbeth_8019EE68(Actor* actor) { Macbeth_801A015C(actor); Macbeth_8019A87C(actor); if (gCameraShake == 20) { - actor->unk_0D0 = 0; + actor->dmgType = 0; actor->timer_0BC = 20; Macbeth_8019BE50(actor); actor->state = 3; @@ -1495,7 +1496,7 @@ void Macbeth_8019F164(Actor* actor) { sp44 = 0; sp6C.x = gPlayer[0].pos.x - actor->obj.pos.x + actor->fwork[25]; sp6C.y = gPlayer[0].pos.y - 25.0f - actor->obj.pos.y + actor->fwork[8] + 25.0f; - sp6C.z = gPlayer[0].unk_138 - 500.0f - actor->obj.pos.z; + sp6C.z = gPlayer[0].trueZpos - 500.0f - actor->obj.pos.z; for (i = 0; i < 60; i++) { if ((gActors[i].obj.id == OBJ_ACTOR_219) && (gActors[i].obj.status == OBJ_ACTIVE)) { @@ -1562,8 +1563,8 @@ void Macbeth_8019F164(Actor* actor) { (gPlayer[0].pos.x - actor->obj.pos.x < 3000.0f)) || ((gPlayer[0].pos.x - actor->obj.pos.x < -300.0f) && (gPlayer[0].pos.x - actor->obj.pos.x > -3000.0f))) { - if ((gPlayer[0].unk_138 - actor->obj.pos.z < 5000.0f) && - (gPlayer[0].unk_138 - actor->obj.pos.z > 200.0f) && (actor->timer_0BC == 0) && + if ((gPlayer[0].trueZpos - actor->obj.pos.z < 5000.0f) && + (gPlayer[0].trueZpos - actor->obj.pos.z > 200.0f) && (actor->timer_0BC == 0) && (actor->health != 0)) { sp60.x -= 60.0f; func_effect_8007EE68(OBJ_EFFECT_378, &sp60, &sp54, &sp48, &D_i5_801BA714, 1.0f); @@ -1640,11 +1641,11 @@ void Macbeth_8019F164(Actor* actor) { void Macbeth_8019FC54(Actor* actor, s32* arg1, s32* arg2, s32 arg3, s32 arg4, f32 arg5, f32 arg6, s32* arg7) { switch (*arg1) { case 0: - if (((actor->unk_0D0 != 0) && (actor->unk_0D2 >= arg3) && (arg4 >= actor->unk_0D2)) || + if (((actor->dmgType != 0) && (actor->dmgPart >= arg3) && (arg4 >= actor->dmgPart)) || ((D_MA_801BE2F0[1] - 1 == actor->iwork[5]) && (actor->iwork[5] < D_MA_801BE2F0[3])) || (((D_MA_801BE2F0[1] + 1) == actor->iwork[5]) && (D_MA_801BE2F0[3] < actor->iwork[5]))) { AUDIO_PLAY_SFX(0x29034003, actor->sfxSource, 4); - actor->unk_0D0 = 0; + actor->dmgType = 0; func_effect_8007C120(actor->obj.pos.x + arg5, actor->obj.pos.y + 200.0f, actor->obj.pos.z + arg6, actor->vel.x, actor->vel.y, actor->vel.z, 0.15f, 10); actor->iwork[7] = 15; @@ -1658,8 +1659,8 @@ void Macbeth_8019FC54(Actor* actor, s32* arg1, s32* arg2, s32 arg3, s32 arg4, f3 } (*arg1)++; } - } else if (actor->unk_0D0 != 0) { - actor->unk_0D0 = 0; + } else if (actor->dmgType != 0) { + actor->dmgType = 0; AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); } Macbeth_8019B580(actor, arg2); @@ -1711,8 +1712,8 @@ void Macbeth_8019FF9C(Actor* actor) { Math_SmoothStepToF(&actor->vel.z, 0.0f, 0.02f, 10.0f, 0.01f); Macbeth_801A015C(actor); Macbeth_8019A87C(actor); - if (actor->unk_0D0 != 0) { - actor->unk_0D0 = 0; + if (actor->dmgType != 0) { + actor->dmgType = 0; actor->timer_0BC = 20; Macbeth_8019BE50(actor); actor->state = 3; @@ -2051,13 +2052,13 @@ void Macbeth_801A12C4(Actor* actor) { s32 id; if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) { - if (((gPlayer[0].unk_138 - actor->obj.pos.z) > 7000.0f) || - ((gPlayer[0].unk_138 - actor->obj.pos.z) < -1000.0f)) { + if (((gPlayer[0].trueZpos - actor->obj.pos.z) > 7000.0f) || + ((gPlayer[0].trueZpos - actor->obj.pos.z) < -1000.0f)) { return; } } else { - if (((gPlayer[0].unk_138 - actor->obj.pos.z) > 7000.0f) || - ((gPlayer[0].unk_138 - actor->obj.pos.z) < -5000.0f)) { + if (((gPlayer[0].trueZpos - actor->obj.pos.z) > 7000.0f) || + ((gPlayer[0].trueZpos - actor->obj.pos.z) < -5000.0f)) { return; } } @@ -2069,7 +2070,7 @@ void Macbeth_801A12C4(Actor* actor) { Matrix_SetGfxMtx(&gMasterDisp); if ((actor->obj.id != OBJ_ACTOR_206) && (actor->obj.id != OBJ_ACTOR_205)) { - if (((gPlayer[0].unk_138 - actor->obj.pos.z) > 3000.0f) && (D_i5_801BE310 != actor->iwork[5])) { + if (((gPlayer[0].trueZpos - actor->obj.pos.z) > 3000.0f) && (D_i5_801BE310 != actor->iwork[5])) { gSPDisplayList(gMasterDisp++, D_MA_6027BF0); gSPDisplayList(gMasterDisp++, D_MA_601BE90); } else { @@ -2216,7 +2217,7 @@ void Macbeth_801A12C4(Actor* actor) { Matrix_RotateX(gGfxMatrix, actor->fwork[27] * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); Matrix_Scale(gGfxMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY); - if ((gPlayer[0].unk_138 - actor->obj.pos.z) > 3000.0f) { + if ((gPlayer[0].trueZpos - actor->obj.pos.z) > 3000.0f) { gSPDisplayList(gMasterDisp++, D_MA_6027D40); } else if (actor->vel.z > -2.0f) { gSPDisplayList(gMasterDisp++, D_MA_60227F0); @@ -2231,7 +2232,7 @@ void Macbeth_801A12C4(Actor* actor) { Matrix_Scale(gGfxMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL(&gMasterDisp, 0x1D); - if ((gPlayer[0].unk_138 - actor->obj.pos.z) > 3000.0f) { + if ((gPlayer[0].trueZpos - actor->obj.pos.z) > 3000.0f) { gSPDisplayList(gMasterDisp++, D_MA_6027D40); } else if (actor->vel.z > -2.0f) { gSPDisplayList(gMasterDisp++, D_MA_60227F0); @@ -2302,7 +2303,7 @@ void Macbeth_801A23AC(Scenery* scenery) { case OBJ_SCENERY_94: case OBJ_SCENERY_97: if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) && - ((gPlayer[0].unk_138 - scenery->obj.pos.z) < -2500.0f)) { + ((gPlayer[0].trueZpos - scenery->obj.pos.z) < -2500.0f)) { Object_Kill(&scenery->obj, scenery->sfxSource); } gSPDisplayList(gMasterDisp++, D_MA_6026860); @@ -2310,7 +2311,7 @@ void Macbeth_801A23AC(Scenery* scenery) { case OBJ_SCENERY_95: case OBJ_SCENERY_98: if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) && - ((gPlayer[0].unk_138 - scenery->obj.pos.z) < -2500.0f)) { + ((gPlayer[0].trueZpos - scenery->obj.pos.z) < -2500.0f)) { Object_Kill(&scenery->obj, scenery->sfxSource); } gSPDisplayList(gMasterDisp++, D_MA_602FBF0); @@ -2776,14 +2777,14 @@ void Macbeth_801A3E70(Actor* actor) { } void Macbeth_801A3E98(Actor* actor) { - if ((gPlayer[0].unk_138 - actor->obj.pos.z) < -500.0f) { + if ((gPlayer[0].trueZpos - actor->obj.pos.z) < -500.0f) { Object_Kill(&actor->obj, actor->sfxSource); } switch (actor->state) { case 0: - if ((actor->unk_0D0 != 0) && (actor->unk_0D0 != 3)) { - actor->unk_0D0 = 0; + if ((actor->dmgType != 0) && (actor->dmgType != 3)) { + actor->dmgType = 0; AUDIO_PLAY_SFX(0x1903205F, actor->sfxSource, 0); actor->state = 1; } @@ -2811,9 +2812,9 @@ void Macbeth_801A3E98(Actor* actor) { case 3: break; } - if (actor->unk_0D0 != 0) { + if (actor->dmgType != 0) { AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); - actor->unk_0D0 = 0; + actor->dmgType = 0; } Math_SmoothStepToF(&actor->fwork[0], 30.0f, 0.4f, 10.0f, 0.0f); Math_SmoothStepToF(&actor->fwork[4], 30.0f, 0.4f, 10.0f, 0.0f); @@ -2884,7 +2885,7 @@ void Macbeth_801A4660(Actor* actor) { } void Macbeth_801A46A0(Actor* actor) { - if ((gPlayer[0].unk_138 - actor->obj.pos.z) < -500.0f) { + if ((gPlayer[0].trueZpos - actor->obj.pos.z) < -500.0f) { Object_Kill(&actor->obj, actor->sfxSource); } @@ -2945,7 +2946,7 @@ void Macbeth_801A46A0(Actor* actor) { } void Macbeth_801A49B8(Actor* actor) { - if (actor->unk_0D0 != 0) { + if (actor->dmgType != 0) { AUDIO_PLAY_SFX(0x29024003, actor->sfxSource, 0); actor->timer_0C6 = 15; actor->health -= actor->damage; @@ -2954,7 +2955,7 @@ void Macbeth_801A49B8(Actor* actor) { gHitCount++; actor->state = 2; } - actor->unk_0D0 = 0; + actor->dmgType = 0; } } @@ -2982,7 +2983,7 @@ void Macbeth_801A4B24(Actor* actor) { u8 j; var_s0 = 0; - if ((gPlayer[0].unk_138 - actor->obj.pos.z) < -700.0f) { + if ((gPlayer[0].trueZpos - actor->obj.pos.z) < -700.0f) { if (D_MA_801BE2F0[5] == 0) { Radio_PlayMessage(gMsg_ID_17170, RCID_PEPPY); } @@ -3003,7 +3004,7 @@ void Macbeth_801A4B24(Actor* actor) { } break; case 1: - if ((gPlayer[0].unk_138 - actor->obj.pos.z) < 2000.0f) { + if ((gPlayer[0].trueZpos - actor->obj.pos.z) < 2000.0f) { actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_6036520); actor->state = 2; } @@ -3030,8 +3031,8 @@ void Macbeth_801A4B24(Actor* actor) { } break; case 5: - if ((actor->unk_0D0 != 0) && (actor->unk_0D2 == 3)) { - actor->unk_0D0 = 0; + if ((actor->dmgType != 0) && (actor->dmgPart == 3)) { + actor->dmgType = 0; D_MA_801BE2F0[5] = 1; gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]); @@ -3042,7 +3043,7 @@ void Macbeth_801A4B24(Actor* actor) { gObjectLoadIndex = i; gTeamLowHealthMsgTimer = -1; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; - gPlayer[0].unk_1D0 = 0; + gPlayer[0].csState = 0; gMissionStatus = MISSION_ACCOMPLISHED; actor->timer_0BC = 5; actor->state = 6; @@ -3069,8 +3070,8 @@ void Macbeth_801A4B24(Actor* actor) { default: break; } - if (actor->unk_0D0 != 0) { - actor->unk_0D0 = 0; + if (actor->dmgType != 0) { + actor->dmgType = 0; AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); } Math_SmoothStepToF(&actor->fwork[0], 30, 0.4f, actor->fwork[1], 0.0f); @@ -3152,8 +3153,8 @@ s32 Macbeth_801A55D4(s32 arg0, Vec3f* arg1, Vec3f* arg2, s32 arg3) { if ((actor->obj.status >= OBJ_ACTIVE) && (fabsf(arg1->x - actor->obj.pos.x) < 1000.0f) && (fabsf(arg1->z - actor->obj.pos.z) < 1500.0f) && (arg0 != i) && (actor->info.unk_16 != 2) && (actor->timer_0C2 == 0) && (Object_CheckSingleHitbox(arg1, actor->info.hitbox, &actor->obj.pos) != 0)) { - actor->unk_0D0 = 1; - actor->unk_0D2 = -1; + actor->dmgType = 1; + actor->dmgPart = -1; actor->hitPos.x = arg1->x; actor->hitPos.y = arg1->y; actor->hitPos.z = arg1->z; @@ -3169,7 +3170,7 @@ void Macbeth_801A57D0(Effect* effect) { Vec3f sp44; Vec3f sp38; - if ((gPlayer[0].unk_138 - effect->obj.pos.z) < -2000.0f) { + if ((gPlayer[0].trueZpos - effect->obj.pos.z) < -2000.0f) { Object_Kill(&effect->obj, effect->sfxSource); } effect->obj.rot.x = 0.0f; @@ -3180,10 +3181,10 @@ void Macbeth_801A57D0(Effect* effect) { func_effect_8007BC7C(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 6.0f); } } - if ((fabsf(gPlayer[0].unk_138 - effect->obj.pos.z) < 50.0f) && + if ((fabsf(gPlayer[0].trueZpos - effect->obj.pos.z) < 50.0f) && (fabsf(gPlayer[0].pos.x - effect->obj.pos.x) < 30.0f) && (fabsf(gPlayer[0].pos.y - effect->obj.pos.y) < 30.0f)) { - if ((gPlayer[0].unk_280 != 0) || (gPlayer[0].timer_27C != 0)) { + if ((gPlayer[0].barrelRollAlpha != 0) || (gPlayer[0].meteoWarpTimer != 0)) { sp50.x = 0.0f; sp50.y = 0.0f; sp50.z = 100.0f; @@ -3193,11 +3194,11 @@ void Macbeth_801A57D0(Effect* effect) { effect->vel.z = sp44.z; AUDIO_PLAY_SFX(0x09007011, effect->sfxSource, 4); } - if ((gPlayer[0].unk_280 == 0) && (gPlayer[0].timer_498 == 0)) { + if ((gPlayer[0].barrelRollAlpha == 0) && (gPlayer[0].timer_498 == 0)) { Player_ApplyDamage(&gPlayer[0], 0, effect->info.damage); - gPlayer[0].unk_0D8.x = 20.0f; + gPlayer[0].knockback.x = 20.0f; if (effect->vel.x < 0.0f) { - gPlayer[0].unk_0D8.x *= -1.0f; + gPlayer[0].knockback.x *= -1.0f; } Object_Kill(&effect->obj, effect->sfxSource); } @@ -3226,7 +3227,7 @@ void Macbeth_801A5AF0(Effect* effect) { } void Macbeth_801A5B4C(Effect* effect) { - if ((gPlayer[0].unk_138 - effect->obj.pos.z) < -2000.0f) { + if ((gPlayer[0].trueZpos - effect->obj.pos.z) < -2000.0f) { Object_Kill(&effect->obj, effect->sfxSource); } effect->obj.rot.x = 20.0f; @@ -3236,17 +3237,17 @@ void Macbeth_801A5B4C(Effect* effect) { effect->obj.rot.y = 0.0f; } effect->obj.rot.z = 0.0f; - if ((fabsf(gPlayer[0].unk_138 - effect->obj.pos.z) < 100.0f) && + if ((fabsf(gPlayer[0].trueZpos - effect->obj.pos.z) < 100.0f) && (fabsf(gPlayer[0].pos.x - effect->obj.pos.x) < 100.0f) && (fabsf(gPlayer[0].pos.y - effect->obj.pos.y) < 30.0f) && (gPlayer[0].timer_498 == 0)) { Player_ApplyDamage(gPlayer, 0, effect->info.damage); - gPlayer[0].unk_0D8.x = 20.0f; + gPlayer[0].knockback.x = 20.0f; if (effect->vel.x < 0.0f) { - gPlayer[0].unk_0D8.x *= -1.0f; + gPlayer[0].knockback.x *= -1.0f; } - gPlayer[0].unk_0D8.y = 20.0f; + gPlayer[0].knockback.y = 20.0f; if (effect->vel.y < 0.0f) { - gPlayer[0].unk_0D8.y *= -1.0f; + gPlayer[0].knockback.y *= -1.0f; } Object_Kill(&effect->obj, effect->sfxSource); } @@ -3276,7 +3277,7 @@ void Macbeth_801A5E2C(Actor* actor) { } void Macbeth_801A5E54(Actor* actor) { - if ((gPlayer[0].unk_138 - actor->obj.pos.z) < -500.0f) { + if ((gPlayer[0].trueZpos - actor->obj.pos.z) < -500.0f) { Object_Kill(&actor->obj, actor->sfxSource); } if ((D_i5_801BA1E0 - actor->obj.pos.z) < -800.0f) { @@ -3286,8 +3287,8 @@ void Macbeth_801A5E54(Actor* actor) { } Math_SmoothStepToF(&actor->obj.pos.x, actor->fwork[0] + (actor->fwork[2] * 400.0f), 0.1f, 4.0f, 0.01f); } - if (actor->unk_0D0 != 0) { - actor->unk_0D0 = 0; + if (actor->dmgType != 0) { + actor->dmgType = 0; AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); } } @@ -3300,18 +3301,18 @@ void Macbeth_801A5FC4(s32 arg0) { } void Macbeth_801A5FD0(Actor* actor) { - if (gPlayer[0].unk_138 - actor->obj.pos.z < -500.0f) { + if (gPlayer[0].trueZpos - actor->obj.pos.z < -500.0f) { Object_Kill(&actor->obj, actor->sfxSource); } - if (gPlayer[0].unk_138 - actor->obj.pos.z < actor->fwork[2]) { + if (gPlayer[0].trueZpos - actor->obj.pos.z < actor->fwork[2]) { if (actor->iwork[0] == 0) { AUDIO_PLAY_SFX(0x19001062, actor->sfxSource, 0); actor->iwork[0] += 1; } Math_SmoothStepToF(&actor->obj.pos.y, actor->fwork[1] + 356.0f, 0.4f, 20.0f, 0.01f); } - if (actor->unk_0D0 != 0) { - actor->unk_0D0 = 0; + if (actor->dmgType != 0) { + actor->dmgType = 0; AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); } } @@ -3327,19 +3328,19 @@ void Macbeth_801A6134(Actor* actor) { void Macbeth_801A6144(Actor* actor) { s16 i; - if ((gPlayer[0].unk_138 - actor->obj.pos.z) < -500.0f) { + if ((gPlayer[0].trueZpos - actor->obj.pos.z) < -500.0f) { Object_Kill(&actor->obj, actor->sfxSource); } switch (actor->state) { case 0: - if (actor->unk_0D0 != 0) { + if (actor->dmgType != 0) { func_effect_8007C120(actor->obj.pos.x, actor->obj.pos.y + 100.0f, actor->obj.pos.z, actor->vel.x, actor->vel.y, actor->vel.z, 0.15f, 20); AUDIO_PLAY_SFX(0x2903300E, actor->sfxSource, 4); actor->health -= actor->damage; actor->timer_0C6 = 15; - if ((gPlayer[0].unk_138 - 20.0f) < actor->obj.pos.z) { + if ((gPlayer[0].trueZpos - 20.0f) < actor->obj.pos.z) { actor->health = 0; } if (actor->health <= 0) { @@ -3357,7 +3358,7 @@ void Macbeth_801A6144(Actor* actor) { actor->timer_0BC = 20; actor->state = 1; } - actor->unk_0D0 = 0; + actor->dmgType = 0; } break; case 1: @@ -3387,7 +3388,7 @@ void Macbeth_801A65E0(Scenery* scenery) { } void Macbeth_801A6608(Scenery* scenery) { - if ((gPlayer[0].unk_138 - scenery->obj.pos.z) < scenery->vel.z) { + if ((gPlayer[0].trueZpos - scenery->obj.pos.z) < scenery->vel.z) { if (gPlayState != PLAY_PAUSE) { Math_SmoothStepToF(&scenery->vel.x, 30, 0.5f, 30.0f, 0.0f); if (scenery->vel.x < 31.0f) { @@ -3406,11 +3407,11 @@ void Macbeth_801A67BC(s32 arg0) { } void Macbeth_801A67C8(Actor* actor) { - if ((gPlayer[0].unk_138 - actor->obj.pos.z) < -300.0f) { + if ((gPlayer[0].trueZpos - actor->obj.pos.z) < -300.0f) { Object_Kill(&actor->obj, actor->sfxSource); } - if ((actor->unk_0D0 != 0) && (actor->unk_0D2 == -1)) { - actor->unk_0D0 = 0; + if ((actor->dmgType != 0) && (actor->dmgPart == -1)) { + actor->dmgType = 0; if (actor->obj.pos.x <= gPlayer[0].pos.x) { actor->iwork[4] = 1; } else { @@ -3428,16 +3429,16 @@ void Macbeth_801A68EC(Actor* actor) { void Macbeth_801A68F8(Actor* actor, s16 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7) { gTexturedLines[arg1].mode = 3; - gTexturedLines[arg1].unk_04.x = arg2; - gTexturedLines[arg1].unk_04.y = arg3; - gTexturedLines[arg1].unk_28 = 5.0f; - gTexturedLines[arg1].unk_2C = gTexturedLines[arg1].unk_2D = gTexturedLines[arg1].unk_2E = - gTexturedLines[arg1].unk_2F = 255; + gTexturedLines[arg1].posAA.x = arg2; + gTexturedLines[arg1].posAA.y = arg3; + gTexturedLines[arg1].xyScale = 5.0f; + gTexturedLines[arg1].red = gTexturedLines[arg1].green = gTexturedLines[arg1].blue = gTexturedLines[arg1].alpha = + 255; gTexturedLines[arg1].timer = 3; - gTexturedLines[arg1].unk_04.z = arg4; - gTexturedLines[arg1].unk_10.x = arg5; - gTexturedLines[arg1].unk_10.y = arg6; - gTexturedLines[arg1].unk_10.z = arg7; + gTexturedLines[arg1].posAA.z = arg4; + gTexturedLines[arg1].posBB.x = arg5; + gTexturedLines[arg1].posBB.y = arg6; + gTexturedLines[arg1].posBB.z = arg7; } void Macbeth_801A6984(Actor* actor) { @@ -3461,7 +3462,7 @@ void Macbeth_801A6984(Actor* actor) { f32 sp80; var_s3 = 0; - if ((gPlayer[0].unk_138 - actor->obj.pos.z) > 7000.0f) { + if ((gPlayer[0].trueZpos - actor->obj.pos.z) > 7000.0f) { return; } test.x = actor->obj.pos.x - D_i5_801BE368[4]; @@ -3528,7 +3529,7 @@ void Macbeth_801A6C78(Actor* actor) { D_i5_801BE320[7] = 0; Math_SmoothStepToF(&D_i5_801BE368[2], 15.0f, 0.2f, 2.0f, 0.01f); D_i5_801BE368[3] += D_i5_801BE368[2]; - if ((((gPlayer[0].unk_138 - actor->obj.pos.z) * 0.25f) < D_i5_801BE368[3]) || + if ((((gPlayer[0].trueZpos - actor->obj.pos.z) * 0.25f) < D_i5_801BE368[3]) || (D_i5_801BE368[3] > 8000.0f)) { D_i5_801BE320[1] = 1; } @@ -3576,7 +3577,7 @@ void Macbeth_801A6FB4(Actor* actor) { D_i5_801BE320[8] = 1; Math_SmoothStepToF(&D_i5_801BE368[2], 15.0f, 0.2f, 2.0f, 0.01f); D_i5_801BE368[3] += D_i5_801BE368[2]; - if ((((gPlayer[0].unk_138 - actor->obj.pos.z) * 0.25f) < D_i5_801BE368[3]) || + if ((((gPlayer[0].trueZpos - actor->obj.pos.z) * 0.25f) < D_i5_801BE368[3]) || (D_i5_801BE368[3] > 8000.0f)) { D_i5_801BE320[1] = 1; } @@ -3643,7 +3644,7 @@ void Macbeth_801A74C4(Actor* actor) { D_i5_801BE320[7] = 1; Math_SmoothStepToF(&D_i5_801BE368[2], 10.0f, 0.4f, 10.0f, 0.01f); D_i5_801BE368[3] += D_i5_801BE368[2]; - if ((((gPlayer[0].unk_138 - actor->obj.pos.z) * 0.25f) < D_i5_801BE368[3]) || + if ((((gPlayer[0].trueZpos - actor->obj.pos.z) * 0.25f) < D_i5_801BE368[3]) || (D_i5_801BE368[3] > 8000.0f)) { D_i5_801BE320[1] = 1; } @@ -3756,7 +3757,7 @@ void Macbeth_801A7CAC(Actor* actor) { f32 sp2C; temp_fa0 = gPlayer[0].pos.x - actor->obj.pos.x; - temp_fa1 = (gPlayer[0].unk_138 - 130.0f) - actor->obj.pos.z; + temp_fa1 = (gPlayer[0].trueZpos - 130.0f) - actor->obj.pos.z; sp2C = sqrtf(SQ(temp_fa0) + SQ(temp_fa1)); sp30 = Math_Atan2F(temp_fa0, temp_fa1); sp34 = -Math_Atan2F(gPlayer[0].pos.y - actor->obj.pos.y, sp2C); @@ -3959,12 +3960,12 @@ void Macbeth_801A7E7C(Actor* actor) { Macbeth_8019A198(actor); Macbeth_801A0308(actor, actor->obj.pos.z, actor->obj.rot.y, 0); Math_SmoothStepToF(&actor->obj.pos.x, gPlayer[0].pos.x, 0.1f, 10.0f, 0.01f); - Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].unk_138 - 1500.0f, 0.1f, 20.0f, 0.01f); + Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].trueZpos - 1500.0f, 0.1f, 20.0f, 0.01f); Math_SmoothStepToF(&actor->obj.pos.y, - (actor->fwork[5] + 600.0f + (gPlayer[0].unk_138 - actor->obj.pos.z) * 0.25f) + 10.0f, + (actor->fwork[5] + 600.0f + (gPlayer[0].trueZpos - actor->obj.pos.z) * 0.25f) + 10.0f, 0.1f, 10.0f, 0.01f); - if (((actor->fwork[5] + 600.0f + (gPlayer[0].unk_138 - actor->obj.pos.z) * 0.25f) <= actor->obj.pos.y) && - (actor->obj.pos.z < (gPlayer[0].unk_138 - 1300.0f))) { + if (((actor->fwork[5] + 600.0f + (gPlayer[0].trueZpos - actor->obj.pos.z) * 0.25f) <= actor->obj.pos.y) && + (actor->obj.pos.z < (gPlayer[0].trueZpos - 1300.0f))) { actor->timer_0BC = 0; actor->state = 6; } @@ -3981,7 +3982,7 @@ void Macbeth_801A7E7C(Actor* actor) { Macbeth_801A6984(actor); break; case 7: - if ((gPlayer[0].unk_138 - actor->obj.pos.z) < 1200.0f) { + if ((gPlayer[0].trueZpos - actor->obj.pos.z) < 1200.0f) { if (D_i5_801BE320[3] < (Animation_GetFrameCount(&D_MA_601D188) - 1)) { D_i5_801BE320[3] = (s16) (D_i5_801BE320[3] + 1); if ((D_i5_801BE320[3] == 26) && (D_i5_801BE320[10] > 0)) { @@ -4017,7 +4018,7 @@ void Macbeth_801A7E7C(Actor* actor) { var_fv0 = 100.0f; break; } - if (var_fv0 < (gPlayer[0].unk_138 - actor->obj.pos.z)) { + if (var_fv0 < (gPlayer[0].trueZpos - actor->obj.pos.z)) { Macbeth_801A7CAC(actor); D_i5_801BE368[9] = gPlayer[0].pos.x; } @@ -4027,7 +4028,7 @@ void Macbeth_801A7E7C(Actor* actor) { } else { Math_SmoothStepToF(&actor->obj.pos.y, gPlayer[0].pos.y + 1210.0f, 0.1f, 20.0f, 0.01f); } - Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].unk_138 - 100.0f, 0.3f, 60.0f, 0.01f); + Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].trueZpos - 100.0f, 0.3f, 60.0f, 0.01f); Math_SmoothStepToF(&actor->obj.rot.x, 0.0f, 0.2f, 20.0f, 0.01f); Macbeth_801A6984(actor); break; @@ -4057,8 +4058,8 @@ void Macbeth_801A7E7C(Actor* actor) { actor->state = 4; break; } - if (actor->unk_0D0 != 0) { - actor->unk_0D0 = 0; + if (actor->dmgType != 0) { + actor->dmgType = 0; actor->iwork[9] = 15; D_i5_801BE320[29] -= actor->damage; if (D_i5_801BE320[29] <= 0) { @@ -4323,7 +4324,7 @@ void Macbeth_801A7E7C(Actor* actor) { Math_SmoothStepToAngle(&actor->obj.rot.y, 0.0f, 0.1f, 20.0f, 0.01f); Math_SmoothStepToAngle(&actor->obj.rot.x, 0.0f, 0.1f, 20.0f, 0.01f); Math_SmoothStepToAngle(&actor->obj.rot.z, 0.0f, 0.1f, 20.0f, 0.01f); - Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].unk_138 - 700.0f, 0.2f, 15.0f, 0.01f); + Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].trueZpos - 700.0f, 0.2f, 15.0f, 0.01f); Math_SmoothStepToF(&actor->obj.pos.y, gPlayer[0].pos.y + 400.0f, 0.2f, 10.0f, 0.01f); Math_SmoothStepToF(&actor->obj.pos.x, gPlayer[0].pos.x, 0.1f, 10.0f, 0.01f); if (D_i5_801BE320[3] < 15) { @@ -4372,7 +4373,7 @@ void Macbeth_801A7E7C(Actor* actor) { Math_SmoothStepToAngle(&actor->obj.rot.y, 0.0f, 0.1f, 20.0f, 0.01f); Math_SmoothStepToAngle(&actor->obj.rot.x, 0.0f, 0.1f, 20.0f, 0.01f); Math_SmoothStepToAngle(&actor->obj.rot.z, 0.0f, 0.1f, 20.0f, 0.01f); - Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].unk_138 - 250.0f, 0.1f, 15.0f, 0.01f); + Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].trueZpos - 250.0f, 0.1f, 15.0f, 0.01f); Math_SmoothStepToF(&actor->obj.pos.y, 250.0f, 0.1f, 10.0f, 0.01f); if (D_i5_801BE320[3] < (Animation_GetFrameCount(&D_MA_6015C24) - 1)) { D_i5_801BE320[3]++; @@ -4391,10 +4392,10 @@ void Macbeth_801A7E7C(Actor* actor) { if (((gGameFrameCount % 2) == 0) && (D_i5_801BE320[15] == 0)) { actor->vwork[6].x = actor->vwork[2].x + 80.0f; actor->vwork[6].y = 0.0f; - actor->vwork[6].z = gPlayer[0].unk_138 + 50.0f; + actor->vwork[6].z = gPlayer[0].trueZpos + 50.0f; actor->vwork[7].x = actor->vwork[4].x - 80.0f; actor->vwork[7].y = 0.0f; - actor->vwork[7].z = gPlayer[0].unk_138 + 50.0f; + actor->vwork[7].z = gPlayer[0].trueZpos + 50.0f; actor->vwork[6].z += actor->vel.z; actor->vwork[7].z += actor->vel.z; sp348.x = actor->vwork[6].x - actor->vwork[2].x; @@ -4464,9 +4465,9 @@ void Macbeth_801A7E7C(Actor* actor) { Macbeth_8019A198(actor); Macbeth_801A0308(actor, actor->obj.pos.z, actor->obj.rot.y, 0); Math_SmoothStepToF(&actor->obj.pos.x, gPlayer[0].pos.x, 0.1f, 10.0f, 0.01f); - Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].unk_138 - 1200.0f, 0.1f, 35.0f, 0.01f); + Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].trueZpos - 1200.0f, 0.1f, 35.0f, 0.01f); Math_SmoothStepToF(&actor->obj.pos.y, actor->fwork[5] + 600.0f + D_i5_801BE368[3], 0.1f, 20.0f, 10.0f); - if (D_i5_801BE368[3] < ((gPlayer[0].unk_138 - actor->obj.pos.z) / 5.0f)) { + if (D_i5_801BE368[3] < ((gPlayer[0].trueZpos - actor->obj.pos.z) / 5.0f)) { Math_SmoothStepToF(&D_i5_801BE368[2], 15.0f, 0.2f, 2.0f, 0.01f); D_i5_801BE368[3] += D_i5_801BE368[2]; } else if (((actor->fwork[5] + 600.0f) + D_i5_801BE368[3]) <= actor->obj.pos.y) { @@ -4488,7 +4489,7 @@ void Macbeth_801A7E7C(Actor* actor) { Math_SmoothStepToF(&D_i5_801BE368[32], actor->obj.pos.x + RAND_FLOAT(500.0f), 0.2f, 20.0f, 0.01f); Math_SmoothStepToF(&D_i5_801BE368[33], actor->obj.pos.y + RAND_FLOAT(100.0f), 0.2f, 10.0f, 0.01f); Math_SmoothStepToF(&D_i5_801BE368[34], actor->obj.pos.y + RAND_FLOAT(500.0f), 0.2f, 20.0f, 0.01f); - if (actor->unk_0D0 != 0) { + if (actor->dmgType != 0) { gPlayer[0].shields = 0; } if (((gGameFrameCount % 16) == 0)) { @@ -4497,7 +4498,7 @@ void Macbeth_801A7E7C(Actor* actor) { D_i5_801BE368[9] = gPlayer[0].pos.x; Math_SmoothStepToF(&actor->obj.pos.x, D_i5_801BE368[9], 0.2f, 35.0f, 0.01f); Math_SmoothStepToF(&actor->obj.pos.y, gPlayer[0].pos.y, 0.3f, 15.0f, 0.01f); - Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].unk_138, 0.3f, 20.0f, 0.01f); + Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].trueZpos, 0.3f, 20.0f, 0.01f); Math_SmoothStepToF(&actor->obj.rot.x, 60.0f, 0.2f, 20.0f, 0.01f); Macbeth_801A6984(actor); break; @@ -4534,9 +4535,9 @@ void Macbeth_801A7E7C(Actor* actor) { default: break; } - if ((actor->unk_0D0 != 0) && (actor->state >= 2)) { - actor->unk_0D0 = 0; - if ((actor->unk_0D2 == 0) && (D_i5_801BE320[9] > 0) && ((gPlayer[0].unk_138 - actor->obj.pos.z) > 200.0f)) { + if ((actor->dmgType != 0) && (actor->state >= 2)) { + actor->dmgType = 0; + if ((actor->dmgPart == 0) && (D_i5_801BE320[9] > 0) && ((gPlayer[0].trueZpos - actor->obj.pos.z) > 200.0f)) { AUDIO_PLAY_SFX(0x2903300E, actor->sfxSource, 4); actor->iwork[7] = 15; D_i5_801BE320[9] -= actor->damage; @@ -4561,8 +4562,8 @@ void Macbeth_801A7E7C(Actor* actor) { RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT_CENTERED(10.0f), (s32) (RAND_FLOAT(50.0f) + 70.0f), 8, 1.0f); } - } else if ((actor->unk_0D2 == 1) && (D_i5_801BE320[10] > 0) && - ((gPlayer[0].unk_138 - actor->obj.pos.z) > 200.0f)) { + } else if ((actor->dmgPart == 1) && (D_i5_801BE320[10] > 0) && + ((gPlayer[0].trueZpos - actor->obj.pos.z) > 200.0f)) { AUDIO_PLAY_SFX(0x2903300E, actor->sfxSource, 4); actor->iwork[8] = 16; D_i5_801BE320[10] -= actor->damage; @@ -4838,13 +4839,13 @@ void Macbeth_801AC1C0(s32 limbIndex, Vec3f* rot, void* data) { void Macbeth_801AC294(Actor* actor) { if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) { - if (((gPlayer[0].unk_138 - actor->obj.pos.z) > 7000.0f) || - ((gPlayer[0].unk_138 - actor->obj.pos.z) < -1000.0f)) { + if (((gPlayer[0].trueZpos - actor->obj.pos.z) > 7000.0f) || + ((gPlayer[0].trueZpos - actor->obj.pos.z) < -1000.0f)) { return; } } else { - if (((gPlayer[0].unk_138 - actor->obj.pos.z) > 7000.0f) || - ((gPlayer[0].unk_138 - actor->obj.pos.z) < -5000.0f)) { + if (((gPlayer[0].trueZpos - actor->obj.pos.z) > 7000.0f) || + ((gPlayer[0].trueZpos - actor->obj.pos.z) < -5000.0f)) { return; } } @@ -4882,8 +4883,8 @@ void Macbeth_801AC438(Actor* actor) { Macbeth_8019A830(actor); break; } - if (actor->unk_0D0 != 0) { - actor->unk_0D0 = 0; + if (actor->dmgType != 0) { + actor->dmgType = 0; AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); } } @@ -4906,7 +4907,7 @@ bool Macbeth_801AC5AC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* void Macbeth_801AC6B4(Actor* actor) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = 0.0f; actor->obj.pos.y = 3000.0f; actor->obj.pos.z = 0.0f; @@ -4931,7 +4932,7 @@ void Macbeth_LevelStart(Player* player) { sp44 = 0.0f; func_play_800ADF58(player); - switch (player->unk_1D0) { + switch (player->csState) { case 0: objInit = gLevelObjects = SEGMENTED_TO_VIRTUAL(D_MA_6035678); @@ -4947,14 +4948,14 @@ void Macbeth_LevelStart(Player* player) { } gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 255; - player->unk_144 -= 800.0f; - player->unk_1D0 = 1; + player->zPath -= 800.0f; + player->csState = 1; D_i5_801BE24C = 8.0f; D_i5_801BA768 = 0.0f; break; case 1: gCsFrameCount = 0; - player->unk_0D4 = 0.0f; + player->gravity = 0.0f; player->pos.x = 0.0f; player->pos.y = -3.0f; player->vel.z = -15.0f; @@ -4965,7 +4966,7 @@ void Macbeth_LevelStart(Player* player) { player->cam.at.y = gCsCamAtY = 42.0f; player->cam.at.z = gCsCamAtZ = -800.0f; player->unk_240 = 1; - player->unk_1D0 = 2; + player->csState = 2; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; gFillScreenAlpha = 255; Macbeth_801ACF6C(); @@ -5003,8 +5004,8 @@ void Macbeth_LevelStart(Player* player) { sp44 = 30.0f; } if (gCsFrameCount == 260) { - player->unk_1D0 = 3; - player->timer_1F8 = 10; + player->csState = 3; + player->csTimer = 10; } } break; @@ -5012,35 +5013,35 @@ void Macbeth_LevelStart(Player* player) { AUDIO_PLAY_BGM(SEQ_ID_MACBETH | SEQ_FLAG); gLevelStartStatusScreenTimer = 50; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; - player->unk_1D0 = player->timer_1F8 = player->timer_1FC = player->unk_240 = 0; - player->unk_0D4 = 3.0f; + player->csState = player->csTimer = player->csEventTimer = player->unk_240 = 0; + player->gravity = 3.0f; player->unk_014 = 0.0f; D_ctx_8017782C = 1; func_play_800A594C(); D_ctx_8017782C = 0; gObjectLoadIndex = 40; - player->unk_1D0 = 4; + player->csState = 4; break; case 4: default: break; } - player->unk_138 = player->pos.z += player->vel.z; + player->trueZpos = player->pos.z += player->vel.z; Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], sp4C, 0); Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[1], sp48, 0); Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[2], sp44, 0); Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], sp4C, 0); Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[1], sp48, 0); Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[2], sp44, 0); - player->unk_0A0 = 0.0f; - player->unk_0F4 += player->vel.z * 5.0f; - player->unk_0F0 = SIN_DEG(player->unk_0F4) * 0.7f; + player->pathHeight = 0.0f; + player->rockPhase += player->vel.z * 5.0f; + player->rockAngle = SIN_DEG(player->rockPhase) * 0.7f; Texture_Scroll(D_landmaster_3002E80, 32, 32, 0); - if ((gCsFrameCount > 150) && ((-player->unk_138 - player->unk_144) > 200.0f)) { + if ((gCsFrameCount > 150) && ((-player->trueZpos - player->zPath) > 200.0f)) { if (D_i5_801BA768 < 11.5f) { D_i5_801BA768 += 0.2f; } - player->unk_144 += D_i5_801BA768; + player->zPath += D_i5_801BA768; } } @@ -5049,7 +5050,7 @@ void Macbeth_801ACE40(Effect* effect) { effect->obj.status = OBJ_INIT; effect->obj.pos.x = gPlayer[0].cam.eye.x + RAND_FLOAT_CENTERED(600.0f); effect->obj.pos.y = gPlayer[0].cam.eye.y - 1000.0f; - effect->obj.pos.z = gPlayer[0].unk_138 - 2000.0f; + effect->obj.pos.z = gPlayer[0].trueZpos - 2000.0f; effect->obj.id = OBJ_EFFECT_352; effect->timer_50 = 80; effect->unk_46 = 144; @@ -5090,7 +5091,7 @@ void Macbeth_801AD080(void) { } } -void Macbeth_801AD144(PlayerShot* playerShot) { +void Macbeth_801AD144(PlayerShot* shot) { s32 i; s32 j; Actor* actor; @@ -5102,7 +5103,7 @@ void Macbeth_801AD144(PlayerShot* playerShot) { s32 temp_ft3; s32 temp_s6; - temp_fs2 = playerShot->unk_44 * 40.0f; + temp_fs2 = shot->scale * 40.0f; actor = &gActors[0]; for (i = 0; i < 60; i++, actor++) { @@ -5128,9 +5129,9 @@ void Macbeth_801AD144(PlayerShot* playerShot) { Matrix_RotateY(gCalcMatrix, -actor->obj.rot.y * M_DTOR, MTXF_APPLY); } if ((j == temp_s6) && (var_s1[1] > -100.0f) && (var_s1[3] > -100.0f)) { - sp8C.x = playerShot->obj.pos.x - actor->obj.pos.x; - sp8C.y = playerShot->obj.pos.y - actor->obj.pos.y; - sp8C.z = playerShot->obj.pos.z - actor->obj.pos.z; + sp8C.x = shot->obj.pos.x - actor->obj.pos.x; + sp8C.y = shot->obj.pos.y - actor->obj.pos.y; + sp8C.z = shot->obj.pos.z - actor->obj.pos.z; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp8C, &sp80); test.x = (var_s1[4] + actor->obj.pos.x) - (actor->obj.pos.x + sp80.x); test.y = (var_s1[2] + actor->obj.pos.y) - (actor->obj.pos.y + sp80.y); @@ -5139,9 +5140,9 @@ void Macbeth_801AD144(PlayerShot* playerShot) { test.z *= 0.6f; } if (VEC3F_MAG(&test) < temp_fs2) { - actor->unk_0D2 = j; - actor->unk_0D0 = -1; - if ((gPlayer[0].unk_138 - actor->obj.pos.z) < 5000.0f) { + actor->dmgPart = j; + actor->dmgType = -1; + if ((gPlayer[0].trueZpos - actor->obj.pos.z) < 5000.0f) { actor->damage = 20; } else { actor->damage = 1; @@ -5198,7 +5199,7 @@ void Macbeth_801AD6E8(void) { void Macbeth_801AD6F0(Actor* actor) { Vec3f sp4C = { 0.0f, -10.0f, 0.0f }; - if ((gPlayer[0].unk_138 - actor->obj.pos.z) < -500.0f) { + if ((gPlayer[0].trueZpos - actor->obj.pos.z) < -500.0f) { Object_Kill(&actor->obj, actor->sfxSource); } @@ -5240,7 +5241,7 @@ void Macbeth_801AD6F0(Actor* actor) { } } actor->obj.rot.y = 180.0f - actor->obj.rot.y; - if ((fabsf(gPlayer[0].unk_138 - actor->obj.pos.z) < 40.0f) && + if ((fabsf(gPlayer[0].trueZpos - actor->obj.pos.z) < 40.0f) && (fabsf(gPlayer[0].pos.x - actor->obj.pos.x) < 80.0f)) { if ((gPlayer[0].pos.y - actor->obj.pos.y > -5.0f) && (gPlayer[0].pos.y - actor->obj.pos.y < (actor->scale * 35.0f)) && (gPlayer[0].timer_498 == 0)) { @@ -5306,7 +5307,7 @@ void Macbeth_801ADD68(Actor* actor) { Vec3f sp3C = { 0.0f, -10.0f, 0.0f }; s32 var_v0; - if ((gPlayer[0].unk_138 - actor->obj.pos.z) < -500.0f) { + if ((gPlayer[0].trueZpos - actor->obj.pos.z) < -500.0f) { Object_Kill(&actor->obj, actor->sfxSource); } @@ -5335,7 +5336,7 @@ void Macbeth_801ADD68(Actor* actor) { gPlayer[0].pos.x + D_i5_801BA570[actor->iwork[2]][actor->iwork[1]] / var_v0, 0.2f, 30.0f, 0.01f); Math_SmoothStepToF(&actor->obj.pos.z, - gPlayer[0].unk_138 - D_i5_801BA638[actor->iwork[2]][actor->iwork[1]] / var_v0, + gPlayer[0].trueZpos - D_i5_801BA638[actor->iwork[2]][actor->iwork[1]] / var_v0, 0.2f, 40.0f, 0.01f); Math_SmoothStepToF(&actor->obj.rot.z, RAND_FLOAT_CENTERED(15.0f), 0.1f, 10.0f, 0.01f); @@ -5371,8 +5372,8 @@ void Macbeth_801ADD68(Actor* actor) { } else if (actor->iwork[0] > 0) { actor->iwork[0] -= 1; } - if (actor->unk_0D0 != 0) { - actor->unk_0D0 = 0; + if (actor->dmgType != 0) { + actor->dmgType = 0; actor->iwork[7] = 15; actor->health -= actor->damage; @@ -5393,7 +5394,7 @@ void Macbeth_801ADD68(Actor* actor) { } break; } - actor->unk_0D0 = 0; + actor->dmgType = 0; } static Vec3f D_i5_801BA784[8] = { @@ -5568,7 +5569,7 @@ void Macbeth_801AEAA0(Effect* effect) { } void Macbeth_801AEC04(Actor* actor) { - if ((gPlayer[0].unk_138 - actor->obj.pos.z) < -300.0f) { + if ((gPlayer[0].trueZpos - actor->obj.pos.z) < -300.0f) { Object_Kill(&actor->obj, actor->sfxSource); } @@ -5612,9 +5613,9 @@ void Macbeth_801AEC04(Actor* actor) { } else { actor->fwork[1] = 32.0f; } - if ((actor->unk_0D0 != 0) && (actor->unk_0D2 == 0)) { + if ((actor->dmgType != 0) && (actor->dmgPart == 0)) { AUDIO_PLAY_SFX(0x2903300E, actor->sfxSource, 4); - actor->unk_0D0 = 0; + actor->dmgType = 0; actor->health -= actor->damage; actor->timer_0C6 = 15; if (actor->health <= 0) { @@ -5688,7 +5689,7 @@ void Macbeth_801AF27C(Actor* actor, s32 arg1) { actor->vel.y = player->vel.y; actor->vel.z = player->vel.z; actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.rot.y = 180.0f; Object_SetInfo(&actor->info, actor->obj.id); if (arg1 < 3) { @@ -5711,7 +5712,7 @@ void Macbeth_801AF44C(void) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = gPlayer[0].pos.x + D_i5_801BA7E4[4]; actor->obj.pos.y = gPlayer[0].pos.y + D_i5_801BA7F8[4]; actor->obj.pos.z = gPlayer[0].pos.z + D_i5_801BA80C[4]; @@ -5746,10 +5747,10 @@ static f32 D_i5_801BA84C[2] = { 0.0f, 60.0f }; void Macbeth_801AF628(Actor* actor, s32 arg1) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_195; - actor->obj.pos.x = gPlayer[0].unk_0AC + D_i5_801BA834[arg1].x; + actor->obj.id = OBJ_ACTOR_CUTSCENE; + actor->obj.pos.x = gPlayer[0].xPath + D_i5_801BA834[arg1].x; actor->obj.pos.y = D_i5_801BA834[arg1].y; - actor->obj.pos.z = D_i5_801BA834[arg1].z - D_ctx_80177D20; + actor->obj.pos.z = D_i5_801BA834[arg1].z - gPathProgress; actor->unk_0B6 = 37; actor->obj.rot.y = D_i5_801BA84C[arg1]; actor->iwork[4] = actor->iwork[5] = 192; @@ -5815,38 +5816,38 @@ void Macbeth_LevelComplete2(Player* player) { Vec3f spD8; f32 zeroVar = 0.0f; - switch (player->unk_1D0) { + switch (player->csState) { case 0: gCsFrameCount = 0; gLoadLevelObjects = 1; player->unk_234 = 0; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 30); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 30); - player->unk_1D0 = 1; + player->csState = 1; D_ctx_80177A48[0] = 0.0f; D_ctx_80177A48[4] = -60.0f; D_ctx_80177A48[5] = 240.0f; - player->unk_0D4 = 3.0f; + player->gravity = 3.0f; gCameraShakeY = player->vel.x = player->vel.y = player->vel.z = player->baseSpeed = 0.0f; if (player->shields <= 0) { player->shields = 1; } player->cam.eye.x = gCsCamEyeX = gActors[D_i5_801BE318].obj.pos.x - 250.0f; player->cam.eye.y = gCsCamEyeY = gActors[D_i5_801BE318].obj.pos.y + 150.0f; - player->cam.eye.z = gCsCamEyeZ = gActors[D_i5_801BE318].obj.pos.z + D_ctx_80177D20 + 500.0f; + player->cam.eye.z = gCsCamEyeZ = gActors[D_i5_801BE318].obj.pos.z + gPathProgress + 500.0f; player->cam.at.x = gCsCamAtX = gActors[D_i5_801BE318].obj.pos.x; player->cam.at.y = gCsCamAtY = gActors[D_i5_801BE318].obj.pos.y + 200.0f; - player->cam.at.z = gCsCamAtZ = gActors[D_i5_801BE318].obj.pos.z + D_ctx_80177D20; + player->cam.at.z = gCsCamAtZ = gActors[D_i5_801BE318].obj.pos.z + gPathProgress; player->pos.x = 500.0f; player->pos.y = -3.0f; D_i5_801BA1DC = 0.0f; - player->unk_4D8 = 0.0f; + player->aerobaticPitch = 0.0f; player->camRoll = 0.0f; player->boostSpeed = 0.0f; - player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = player->unk_130 = player->unk_12C = - 0.0f; - player->unk_080 = 0.0f; - player->unk_0F0 = 0.0f; + player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = player->zRotBarrelRoll = + player->zRotBank = 0.0f; + player->yBob = 0.0f; + player->rockAngle = 0.0f; player->unk_16C = 0.0f; player->unk_170 = 0.0f; player->wings.unk_04 = 0.0f; @@ -5863,7 +5864,7 @@ void Macbeth_LevelComplete2(Player* player) { } } - player->unk_1D0++; + player->csState++; gCsCamEyeX = -100.0f; gCsCamEyeY = 250.0f; gCsCamEyeZ = 2090.0f; @@ -5879,8 +5880,8 @@ void Macbeth_LevelComplete2(Player* player) { D_i5_801BE312 = 1; player->pos.x = 500.0f; player->pos.y = -3.0f; - player->pos.z = player->unk_138 = -111130.0f; - player->unk_144 = D_ctx_80177D20 = 115930.0f; + player->pos.z = player->trueZpos = -111130.0f; + player->zPath = gPathProgress = 115930.0f; player->flags_228 = PFLAG_228_4; gLastPathChange = OBJ_ITEM_PATH_TURN_RIGHT; D_i5_801BA1DC = 0.0f; @@ -5913,7 +5914,7 @@ void Macbeth_LevelComplete2(Player* player) { } else { D_ctx_80177A48[0] = 0.0f; D_i5_801BA1DC = -40.0f; - player->unk_1D0++; + player->csState++; } /* fallthrough */ case 3: @@ -5921,30 +5922,30 @@ void Macbeth_LevelComplete2(Player* player) { if (gCsFrameCount == 252) { gCsCamEyeY = 570.0f; player->timer_210 = 1000; - player->unk_0B8 = 20000.0f; - player->unk_118 = -23.0f; - player->unk_0B4 = 0.0f; + player->xPathTarget = 20000.0f; + player->yRot_118 = -23.0f; + player->pathStep = 0.0f; } if (gCsFrameCount >= 252) { player->pos.x = gActors[D_i5_801BE314].obj.pos.x + 500.0f; - player->unk_140 = -gActors[D_i5_801BE314].vel.z; - player->unk_144 += player->unk_140; - D_ctx_80177D08 = player->unk_140; - D_ctx_80177D20 = player->unk_144; - D_ctx_80177CE8 += player->unk_140; - player->pos.z = player->unk_138 = -(D_ctx_80177D20 + 210.0f); + player->zPathVel = -gActors[D_i5_801BE314].vel.z; + player->zPath += player->zPathVel; + gPathVelZ = player->zPathVel; + gPathProgress = player->zPath; + gPathTexScroll += player->zPathVel; + player->pos.z = player->trueZpos = -(gPathProgress + 210.0f); Math_SmoothStepToF(&D_ctx_80177A48[0], 1.0f, 0.1f, 0.00025f, 0.0f); gCsCamAtX = gActors[D_i5_801BE314].obj.pos.x + 2500.0f; - gCsCamAtZ = (gActors[D_i5_801BE314].obj.pos.z + D_ctx_80177D20) - 2000.0f; + gCsCamAtZ = gActors[D_i5_801BE314].obj.pos.z + gPathProgress - 2000.0f; gCsCamEyeX = gCsCamAtX - 2340.0f; gCsCamEyeZ = gCsCamAtZ + 1410.0f; } if (gCsFrameCount == 389) { - player->unk_1D0++; + player->csState++; player->vel.z = 0.0f; - player->unk_140 = 0.0f; - D_ctx_801779E4 = 0.0f; - D_ctx_801779F4 = 0.0f; + player->zPathVel = 0.0f; + gPathVelX = 0.0f; + gPathVelY = 0.0f; player->timer_210 = 0; player->cam.eye.x = gCsCamEyeX = 2750.0f; player->cam.eye.y = gCsCamEyeY = 50.0f; @@ -5952,7 +5953,7 @@ void Macbeth_LevelComplete2(Player* player) { player->cam.at.x = gCsCamAtX = -650.0f; player->cam.at.y = gCsCamAtY = 30.0f; player->cam.at.z = gCsCamAtZ = 1900.0f; - player->unk_114 = 0.0f; + player->yRot_114 = 0.0f; D_i5_801BA1DC = -100.0f; Audio_KillSfxById(0x31078085); AUDIO_PLAY_SFX(0x31408095, gActors[D_i5_801BE314].sfxSource, 4); @@ -5966,26 +5967,26 @@ void Macbeth_LevelComplete2(Player* player) { gFillScreenAlphaStep = 20; } if (gCsFrameCount == 416) { - player->unk_1D0++; + player->csState++; D_ctx_80177A48[0] = 1.0f; - player->unk_114 = 30.0f; - player->unk_0AC = 4600.0f; + player->yRot_114 = 30.0f; + player->xPath = 4600.0f; D_i5_801BA1DC = -80.0f; - player->unk_144 = D_ctx_80177D20 += 300.0f; + player->zPath = gPathProgress += 300.0f; D_ctx_80177A48[5] = 0.0f; D_ctx_80177A48[6] = 0.5f; D_ctx_80177A48[7] = 1560.0f; D_ctx_80177A48[8] = 2400.0f; player->cam.at.x = gCsCamAtX = gActors[D_i5_801BE314].obj.pos.x; - player->cam.at.z = gCsCamAtZ = (gActors[D_i5_801BE314].obj.pos.z + D_ctx_80177D20) - 2000.0f; + player->cam.at.z = gCsCamAtZ = (gActors[D_i5_801BE314].obj.pos.z + gPathProgress) - 2000.0f; player->cam.eye.y = gCsCamEyeY = 50.0f; player->cam.at.y = gCsCamAtY = 10.0f; player->cam.eye.x = gCsCamEyeX = D_ctx_80177A48[7] + gCsCamAtX; player->cam.eye.z = gCsCamEyeZ = D_ctx_80177A48[8] + gCsCamAtZ; - player->unk_118 = -30.0f; - player->unk_0B8 = 10014.0f; + player->yRot_118 = -30.0f; + player->xPathTarget = 10014.0f; player->timer_210 = 1000; - player->unk_0B4 = 0.0f; + player->pathStep = 0.0f; gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 127; } @@ -6001,12 +6002,12 @@ void Macbeth_LevelComplete2(Player* player) { Math_SmoothStepToF(&gCsCamEyeY, 1300.0f, 0.1f, 17.0f, 0.0f); } if (gCsFrameCount <= 505) { - gCsCamAtZ = gActors[D_i5_801BE314].obj.pos.z + D_ctx_80177D20 - 2000.0f; + gCsCamAtZ = gActors[D_i5_801BE314].obj.pos.z + gPathProgress - 2000.0f; gCsCamAtX = gActors[D_i5_801BE314].obj.pos.x; player->vel.z = gActors[D_i5_801BE314].vel.z; player->pos.x = gActors[D_i5_801BE314].obj.pos.x + 500.0f; - player->pos.z = player->unk_138 = -(D_ctx_80177D20 + 210.0f); - player->unk_140 = -gActors[D_i5_801BE314].vel.z; + player->pos.z = player->trueZpos = -(gPathProgress + 210.0f); + player->zPathVel = -gActors[D_i5_801BE314].vel.z; gCsCamEyeX = D_ctx_80177A48[7] + gCsCamAtX; gCsCamEyeZ = D_ctx_80177A48[8] + gCsCamAtZ; func_effect_8007C120(gActors[D_i5_801BE314].obj.pos.x + 480.0f, @@ -6020,16 +6021,16 @@ void Macbeth_LevelComplete2(Player* player) { gFogGreen -= 1; gFogBlue -= 2; } - Math_SmoothStepToF(&player->unk_140, 0.0f, 1.0f, 0.6f, 0.0f); + Math_SmoothStepToF(&player->zPathVel, 0.0f, 1.0f, 0.6f, 0.0f); Math_SmoothStepToF(&gCsCamAtX, 11700.0f, 0.1f, 50.0f, 0.0f); Math_SmoothStepToF(&D_ctx_80177A48[5], 30.0f, 0.1f, 0.05f, 0.0f); Math_SmoothStepToF(&gCsCamAtY, 1600.0f, 0.1f, D_ctx_80177A48[5], 0.0f); - if (player->unk_140 >= 2.5f) { + if (player->zPathVel >= 2.5f) { player->pos.x = gActors[D_i5_801BE314].obj.pos.x + 500.0f; - player->pos.z = player->unk_138 = -(D_ctx_80177D20 + 210.0f); + player->pos.z = player->trueZpos = -(gPathProgress + 210.0f); } else { - player->unk_0B8 = player->unk_0AC; - D_ctx_801779E4 = 0.0f; + player->xPathTarget = player->xPath; + gPathVelX = 0.0f; } func_effect_8007BC7C(gActors[D_i5_801BE314].obj.pos.x + 190.0f, @@ -6045,19 +6046,19 @@ void Macbeth_LevelComplete2(Player* player) { gActors[D_i5_801BE314].obj.pos.y + 30.0f, gActors[D_i5_801BE314].obj.pos.z - 120.0f, 6.0f); } - player->unk_144 += player->unk_140; - D_ctx_80177D08 = player->unk_140; - D_ctx_80177D20 = player->unk_144; - D_ctx_80177CE8 += player->unk_140; + player->zPath += player->zPathVel; + gPathVelZ = player->zPathVel; + gPathProgress = player->zPath; + gPathTexScroll += player->zPathVel; if (gCsFrameCount == 630) { Audio_KillSfxBySourceAndId(gActors[D_i5_801BE314].sfxSource, 0x31408095); AUDIO_PLAY_SFX(0x2940C00A, gActors[D_i5_801BE314].sfxSource, 4); - player->unk_1D0++; + player->csState++; player->vel.z = 0.0f; - player->unk_140 = 0.0f; - D_ctx_80177D08 = 0.0f; - D_ctx_801779E4 = 0.0f; - D_ctx_801779F4 = 0.0f; + player->zPathVel = 0.0f; + gPathVelZ = 0.0f; + gPathVelX = 0.0f; + gPathVelY = 0.0f; player->timer_210 = 10000; D_ctx_80177A48[0] = 1.0f; D_i5_801BA1DC = 0.0f; @@ -6206,10 +6207,10 @@ void Macbeth_LevelComplete2(Player* player) { gBossActive = gLoadLevelObjects = 0; } if (gCsFrameCount == 940) { - player->unk_1D0++; + player->csState++; Play_ClearObjectData(); - player->pos.z = player->unk_138 = -(D_ctx_80177D20 + 210.0f); - player->pos.x = player->unk_0AC; + player->pos.z = player->trueZpos = -(gPathProgress + 210.0f); + player->pos.x = player->xPath; func_effect_8007A568(player->pos.x - 1800.0f, -50.0f, player->pos.z + 5000.0f, 40.0f); gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 255; gFillScreenAlphaTarget = 0; @@ -6219,24 +6220,24 @@ void Macbeth_LevelComplete2(Player* player) { player->cam.at.x = gCsCamAtX = player->cam.eye.x = gCsCamEyeX = player->pos.x; player->cam.at.y = gCsCamAtY = player->pos.y + 70.0f; player->cam.eye.y = gCsCamEyeY = player->pos.y + 30.0f; - player->cam.eye.z = gCsCamEyeZ = (player->unk_138 + D_ctx_80177D20) - 300.0f; - player->cam.at.z = gCsCamAtZ = player->unk_138 + D_ctx_80177D20; + player->cam.eye.z = gCsCamEyeZ = (player->trueZpos + gPathProgress) - 300.0f; + player->cam.at.z = gCsCamAtZ = player->trueZpos + gPathProgress; player->savedCockpitView = player->timer_210 = 0; - player->unk_190 = player->unk_194 = player->unk_188 = player->unk_18C = player->unk_118 = - player->unk_114 = player->unk_4D8 = player->camRoll = player->unk_174 = player->unk_178 = + player->unk_190 = player->unk_194 = player->unk_188 = player->unk_18C = player->yRot_118 = + player->yRot_114 = player->aerobaticPitch = player->camRoll = player->unk_174 = player->unk_178 = player->unk_17C = player->unk_180 = player->unk_184 = player->wings.unk_04 = player->unk_170 = - player->unk_16C = player->unk_0F0 = player->unk_080 = player->wings.unk_0C = - player->wings.unk_08 = player->wings.unk_10 = player->unk_130 = player->unk_12C = - player->boostSpeed = 0.0f; + player->unk_16C = player->rockAngle = player->yBob = player->wings.unk_0C = + player->wings.unk_08 = player->wings.unk_10 = player->zRotBarrelRoll = + player->zRotBank = player->boostSpeed = 0.0f; player->baseSpeed = 5.0f; D_ctx_80177A48[3] = D_ctx_80177A48[6] = D_ctx_80177A48[7] = D_ctx_80177A48[8] = 0.0f; - player->unk_1D4 = 1; - player->unk_1F4 = 0; + player->grounded = true; + player->hitTimer = 0; player->pos.y = gGroundHeight - 3.0f; player->vel.y = -3.0f; - player->unk_1DC = player->boostCooldown = player->boostMeter = player->unk_184 = player->unk_108 = - player->unk_10C = player->unk_0E8 = player->unk_0E4 = player->unk_104 = 0.0f; - player->timer_1E0 = player->sfx.bank = 0; + player->barrelRoll = player->boostCooldown = player->boostMeter = player->unk_184 = player->rot_104.y = + player->rot_104.z = player->rot.y = player->rot.x = player->rot_104.x = 0.0f; + player->barrelInputTimerL = player->sfx.bank = 0; } break; case 7: @@ -6256,7 +6257,7 @@ void Macbeth_LevelComplete2(Player* player) { spE4.z = -300.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &spE4, &spD8); gCsCamEyeX = player->pos.x + spD8.x; - gCsCamEyeZ = player->pos.z + D_ctx_80177D20 + spD8.z; + gCsCamEyeZ = player->pos.z + gPathProgress + spD8.z; } if (gCsFrameCount >= 2120) { Math_SmoothStepToF(&D_ctx_80177A48[0], 1.0f, 1.0f, 0.001f, 0.0f); @@ -6276,22 +6277,22 @@ void Macbeth_LevelComplete2(Player* player) { Math_SmoothStepToF(&player->unk_16C, 2.0f, 1.0f, 0.3f, 0.0f); if ((gCsFrameCount >= 2165) && (gCsFrameCount <= 2180)) { func_effect_8007BC7C(player->pos.x + RAND_FLOAT_CENTERED(30.0f), 0.0f, - RAND_FLOAT_CENTERED(30.0f) + player->unk_138, RAND_FLOAT(2.0f) + 3.5f); + RAND_FLOAT_CENTERED(30.0f) + player->trueZpos, RAND_FLOAT(2.0f) + 3.5f); func_effect_8007BC7C(player->pos.x - RAND_FLOAT_CENTERED(30.0f), 0.0f, - RAND_FLOAT_CENTERED(30.0f) + player->unk_138, RAND_FLOAT(2.0f) + 3.5f); + RAND_FLOAT_CENTERED(30.0f) + player->trueZpos, RAND_FLOAT(2.0f) + 3.5f); } Math_SmoothStepToF(&D_ctx_80177A48[7], 4.5f, 0.1f, 0.3f, 0.0f); - player->unk_138 = player->pos.z; + player->trueZpos = player->pos.z; } func_tank_80045130(player); func_tank_80044868(player); func_tank_800444BC(player); func_play_800ADF58(player); if (gCsFrameCount >= 2175) { - Math_SmoothStepToF(&gCsCamAtZ, gActors[3].obj.pos.z + D_ctx_80177D20 - 300.0f, 0.1f, 20.0f, 0.0f); + Math_SmoothStepToF(&gCsCamAtZ, gActors[3].obj.pos.z + gPathProgress - 300.0f, 0.1f, 20.0f, 0.0f); Math_SmoothStepToF(&gCsCamAtY, gActors[3].obj.pos.y + 100.0f, 0.1f, 10.0f, 0.0f); } else { - player->cam.at.z = gCsCamAtZ = player->unk_138 + D_ctx_80177D20; + player->cam.at.z = gCsCamAtZ = player->trueZpos + gPathProgress; } Math_SmoothStepToF(&player->pos.y, 260.0f, 0.1f, D_ctx_80177A48[7], 0.0f); break; @@ -6436,12 +6437,12 @@ void Macbeth_LevelComplete2(Player* player) { if (player->timer_210 != 0) { player->timer_210--; - Math_SmoothStepToF(&player->unk_114, -player->unk_118, 0.03f, 0.5f, 0.0001f); - Math_SmoothStepToF(&player->unk_0B4, D_ctx_80177D08 * .3f, 0.1f, 2.0f, 0.0001f); - D_ctx_801779E4 = Math_SmoothStepToF(&player->unk_0AC, player->unk_0B8, 0.1f, player->unk_0B4, 0.0001f); - D_ctx_801779F4 = Math_SmoothStepToF(&player->unk_0B0, player->unk_0BC, 0.1f, player->unk_0B4, 0.0001f); + Math_SmoothStepToF(&player->yRot_114, -player->yRot_118, 0.03f, 0.5f, 0.0001f); + Math_SmoothStepToF(&player->pathStep, gPathVelZ * .3f, 0.1f, 2.0f, 0.0001f); + gPathVelX = Math_SmoothStepToF(&player->xPath, player->xPathTarget, 0.1f, player->pathStep, 0.0001f); + gPathVelY = Math_SmoothStepToF(&player->yPath, player->yPathTarget, 0.1f, player->pathStep, 0.0001f); } else { - Math_SmoothStepToF(&player->unk_114, 0.0f, 0.03f, 0.5f, 0.0001f); + Math_SmoothStepToF(&player->yRot_114, 0.0f, 0.03f, 0.5f, 0.0001f); } Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 20000.0f, 0); Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 20000.0f, 0); @@ -6450,7 +6451,7 @@ void Macbeth_LevelComplete2(Player* player) { Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 20000.0f, 0); Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 20000.0f, 0); player->cam.at.y += zeroVar; - if (player->unk_1D0 >= 6) { + if (player->csState >= 6) { player->cam.eye.y += gCameraShakeY * 10.0f; } if (gCsFrameCount > 2500) { @@ -6494,7 +6495,7 @@ void Macbeth_801B28BC(Actor* actor) { Math_SmoothStepToF(&actor->obj.rot.z, SIN_DEG(actor->fwork[3]) * -30.0f, 0.1f, 2.0f, 0.0f); Math_SmoothStepToF(&actor->obj.pos.x, actor->fwork[0] + player->pos.x, 0.03f, 10.0f, 0.0f); Math_SmoothStepToF(&actor->obj.pos.y, actor->fwork[1] + player->pos.y + sp3C, 0.03f, 10.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.pos.z, actor->fwork[2] + player->unk_138, 0.03f, 10.0f, 0.0f); + Math_SmoothStepToF(&actor->obj.pos.z, actor->fwork[2] + player->trueZpos, 0.03f, 10.0f, 0.0f); break; case 11: AUDIO_PLAY_SFX(0x09000002, actor->sfxSource, 0); @@ -6603,7 +6604,7 @@ void Macbeth_801B28BC(Actor* actor) { Math_SmoothStepToF(&actor->obj.rot.z, SIN_DEG(actor->fwork[3]) * -30.0f, 0.1f, 2.0f, 0.0f); Math_SmoothStepToF(&actor->obj.pos.x, actor->fwork[0] + player->pos.x, 0.03f, 10.0f, 0.0f); Math_SmoothStepToF(&actor->obj.pos.y, actor->fwork[1] + player->pos.y + sp3C, 0.03f, 10.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.pos.z, actor->fwork[2] + player->unk_138, 0.03f, 10.0f, 0.0f); + Math_SmoothStepToF(&actor->obj.pos.z, actor->fwork[2] + player->trueZpos, 0.03f, 10.0f, 0.0f); break; case 31: AUDIO_PLAY_SFX(0x09000002, actor->sfxSource, 0); @@ -6655,7 +6656,7 @@ void Macbeth_801B3554(Actor* actor, s32 arg1) { actor->vel.y = player->vel.y; actor->vel.z = player->vel.z; actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.rot.y = 180.0f; Object_SetInfo(&actor->info, actor->obj.id); if (arg1 < 3) { @@ -6679,7 +6680,7 @@ void Macbeth_801B3718(void) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = gPlayer[0].pos.x + D_i5_801BA8B4[4]; actor->obj.pos.y = gPlayer[0].pos.y + D_i5_801BA8C8[4]; actor->obj.pos.z = gPlayer[0].pos.z + D_i5_801BA8DC[4]; @@ -6773,8 +6774,8 @@ void Macbeth_LevelComplete1(Player* player) { gCsCamEyeX = player->pos.x; gCsCamEyeY = player->pos.y; - gCsCamEyeZ = player->pos.z + player->unk_144 + 50.0f; - switch (player->unk_1D0) { + gCsCamEyeZ = player->pos.z + player->zPath + 50.0f; + switch (player->csState) { case 0: gCsFrameCount = gBossActive = gLoadLevelObjects = 1; D_i5_801BA894[4] = 80.0f; @@ -6787,7 +6788,7 @@ void Macbeth_LevelComplete1(Player* player) { gFillScreenBlue = 255; gFillScreenAlpha = gFillScreenAlphaTarget = D_ctx_80177A10[9] = 0; D_ctx_80177A48[0] = 0.0f; - player->unk_1D0++; + player->csState++; /* fallthrough */ case 1: D_i5_801BE240 = 2000.0f; @@ -6795,16 +6796,16 @@ void Macbeth_LevelComplete1(Player* player) { D_i5_801BE248 = 2000.0f; Math_SmoothStepToF(D_ctx_80177A48, 0.1f, 1.0f, 0.01f, 0.0f); Math_SmoothStepToF(&player->baseSpeed, 4.9f, 0.1f, 1.0f, 0.0f); - Math_SmoothStepToF(&player->unk_08C, 0.0f, 0.1f, 1.0f, 0.0f); + Math_SmoothStepToF(&player->camDist, 0.0f, 0.1f, 1.0f, 0.0f); gCsCamEyeX = player->pos.x; gCsCamEyeY = player->pos.y; - gCsCamEyeZ = player->pos.z + player->unk_144 + 50.0f; + gCsCamEyeZ = player->pos.z + player->zPath + 50.0f; if (gCsCamEyeY < 5.0f) { gCsCamEyeY = 5.0f; } gCsCamAtX = player->pos.x; gCsCamAtY = player->pos.y + 30.0f; - gCsCamAtZ = player->pos.z + player->unk_144; + gCsCamAtZ = player->pos.z + player->zPath; gFillScreenRed = 255; gFillScreenGreen = 255; gFillScreenBlue = 255; @@ -6822,10 +6823,10 @@ void Macbeth_LevelComplete1(Player* player) { player->cam.at.x = gCsCamAtX = 0.0f; player->cam.at.y = gCsCamAtY = 22.873417f; player->cam.at.z = gCsCamAtZ = -283.55914f; - player->unk_1D0++; + player->csState++; player->pos.x = 0.0f; player->pos.y = -3.0f; - player->unk_08C = 0.0f; + player->camDist = 0.0f; Macbeth_801B38E0(); } func_tank_80045130(player); @@ -6850,7 +6851,7 @@ void Macbeth_LevelComplete1(Player* player) { D_ctx_80177A10[9] -= 10; if (D_ctx_80177A10[9] < 11) { gFillScreenAlphaTarget = gFillScreenAlpha = 0; - player->unk_1D0 = 10; + player->csState = 10; } } func_tank_80045130(player); @@ -6861,8 +6862,8 @@ void Macbeth_LevelComplete1(Player* player) { func_play_800ADF58(player); break; case 10: - player->unk_1D0 = 11; - player->unk_0D4 = 3.0f; + player->csState = 11; + player->gravity = 3.0f; D_i5_801BE240 = 0.2f; /* fallthrough */ case 11: @@ -6889,7 +6890,7 @@ void Macbeth_LevelComplete1(Player* player) { Math_SmoothStepToF(&D_i5_801BE248, 2.0f, 0.1f, 0.1f, 0.01f); } Math_SmoothStepToF(&player->baseSpeed, 4.9f, 0.1f, 1.0f, 0.0f); - Math_SmoothStepToF(&player->unk_08C, 0.0f, 0.1f, 1.0f, 0.0f); + Math_SmoothStepToF(&player->camDist, 0.0f, 0.1f, 1.0f, 0.0f); func_tank_80045130(player); func_tank_80044868(player); func_tank_80045678(player); diff --git a/src/overlays/ovl_i5/fox_ti.c b/src/overlays/ovl_i5/fox_ti.c index 95ac3de3..d10f7275 100644 --- a/src/overlays/ovl_i5/fox_ti.c +++ b/src/overlays/ovl_i5/fox_ti.c @@ -144,7 +144,7 @@ void Titania_801891F4(Actor* actor) { f32 temp2; temp_fs0 = gPlayer[0].pos.x - actor->obj.pos.x; - temp_fs1 = (gPlayer[0].unk_138 + gPlayer[0].unk_08C) - actor->obj.pos.z; + temp_fs1 = (gPlayer[0].trueZpos + gPlayer[0].camDist) - actor->obj.pos.z; var_fv1 = Math_RadToDeg(Math_Atan2F(temp_fs0, temp_fs1)); @@ -158,7 +158,7 @@ void Titania_801891F4(Actor* actor) { Math_SmoothStepToAngle(&actor->obj.rot.y, var_fv1, 0.2f, 6.0f, 0.01f); temp_fs0 = (actor->obj.pos.x + actor->fwork[0]) - gPlayer[0].pos.x; temp2 = (actor->obj.pos.y + actor->fwork[1]) - (gPlayer[0].pos.y + 30.0f); - temp_fs1 = ((actor->obj.pos.z + actor->fwork[2]) - gPlayer[0].unk_138) + gPlayer[0].unk_08C; + temp_fs1 = ((actor->obj.pos.z + actor->fwork[2]) - gPlayer[0].trueZpos) + gPlayer[0].camDist; temp = sqrtf(SQ(temp_fs0) + SQ(temp_fs1)); Math_SmoothStepToAngle(&actor->fwork[5], Math_RadToDeg(Math_Atan2F(temp2, temp)), 0.2f, 5.0f, 0.01f); } @@ -236,7 +236,7 @@ void Titania_801895B8(Actor* actor) { /* fallthrough */ case 1: actor->fwork[7] = 20.0f; - if (fabsf(actor->obj.pos.z - gPlayer[0].unk_138) < 3000.0f) { + if (fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 3000.0f) { actor->state = 2; actor->timer_0BC = 30; } @@ -245,7 +245,7 @@ void Titania_801895B8(Actor* actor) { case 2: if (actor->iwork[0] == 1) { actor->fwork[7] = 5.0f; - if (fabsf(actor->obj.pos.z - gPlayer[0].unk_138) < 200.0f) { + if (fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 200.0f) { actor->fwork[7] = 0.0f; } Titania_801891F4(actor); @@ -253,14 +253,14 @@ void Titania_801895B8(Actor* actor) { if (actor->timer_0BC == 0) { actor->timer_0BC = 40; Titania_80189380(actor); - if ((fabsf(actor->obj.pos.z - gPlayer[0].unk_138) > 200.0f) && (actor->iwork[0] == 1)) { + if ((fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) > 200.0f) && (actor->iwork[0] == 1)) { actor->fwork[6] = -10.0f; } } break; } - Ground_801B6E20(actor->obj.pos.x, actor->obj.pos.z + D_ctx_80177D20, &sp44, &sp3C, &sp40); + Ground_801B6E20(actor->obj.pos.x, actor->obj.pos.z + gPathProgress, &sp44, &sp3C, &sp40); actor->obj.pos.y = sp3C; if (actor->obj.rot.x < sp44 * M_RTOD) { @@ -280,7 +280,7 @@ void Titania_801895B8(Actor* actor) { Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_Push(&gCalcMatrix); - if (((actor->iwork[2] % 2) == 0) && ((actor->obj.pos.z + D_ctx_80177D20) > -3800.0f)) { + if (((actor->iwork[2] % 2) == 0) && ((actor->obj.pos.z + gPathProgress) > -3800.0f)) { Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_i5_801B752C, &sp48); @@ -304,7 +304,7 @@ void Titania_801895B8(Actor* actor) { actor->vel.y = sp48.y; actor->vel.z = sp48.z; - if (actor->unk_0D0 > 0) { + if (actor->dmgType > 0) { if (Rand_ZeroOne() <= 0.25f) { actor->itemDrop = DROP_SILVER_RING_50p; } else { @@ -331,7 +331,7 @@ static Vec3f D_i5_801B7544 = { 0.0f, -50.0f, 178.0f }; void Titania_80189B80(Actor* actor) { f32 sp2C; - Ground_801B6E20(actor->obj.pos.x, actor->obj.pos.z + D_ctx_80177D20, &sp2C, &actor->obj.pos.y, &sp2C); + Ground_801B6E20(actor->obj.pos.x, actor->obj.pos.z + gPathProgress, &sp2C, &actor->obj.pos.y, &sp2C); actor->health = 10; actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_TI_60068F0); Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); @@ -353,15 +353,15 @@ void Titania_80189CC8(Actor* actor) { f32 temp; if (actor->health > 0) { - if (actor->unk_0D0 != 0) { - actor->unk_0D0 = 0; + if (actor->dmgType != 0) { + actor->dmgType = 0; actor->timer_0C6 = 15; actor->health -= actor->damage; if (actor->health <= 0) { actor->health = 0; AUDIO_PLAY_SFX(0x2903A008, actor->sfxSource, 4); actor->lockOnTimers[TEAM_ID_FOX] = actor->itemDrop = 0; - actor->info.unk_1C = 0.0f; + actor->info.targetOffset = 0.0f; Actor_Despawn(actor); actor->info.bonus = 0; actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_TI_6006924); @@ -493,12 +493,12 @@ void Titania_8018A544(Actor* actor) { actor->unk_0C9 = 1; - if ((actor->scale != 1.0f) && (actor->unk_0D0 == 3)) { + if ((actor->scale != 1.0f) && (actor->dmgType == 3)) { Object_Kill(&actor->obj, actor->sfxSource); } - if (actor->unk_0D0 != 0) { - actor->unk_0D0 = 0; + if (actor->dmgType != 0) { + actor->dmgType = 0; actor->timer_0C6 = 15; actor->health += actor->damage; if (actor->scale == 1.0f) { @@ -530,7 +530,7 @@ void Titania_8018A544(Actor* actor) { if (actor->unk_046 == 2) { actor->gravity = 0.0f; - Ground_801B6E20(actor->obj.pos.x, actor->obj.pos.z + D_ctx_80177D20, &sp4C, &sp44, &sp48); + Ground_801B6E20(actor->obj.pos.x, actor->obj.pos.z + gPathProgress, &sp4C, &sp44, &sp48); actor->fwork[0] = sp4C; actor->fwork[1] = sp44; actor->fwork[2] = sp48; @@ -538,7 +538,7 @@ void Titania_8018A544(Actor* actor) { } actor->gravity = 3.0f; - Ground_801B6E20(actor->obj.pos.x, actor->obj.pos.z + D_ctx_80177D20, &sp4C, &sp44, &sp48); + Ground_801B6E20(actor->obj.pos.x, actor->obj.pos.z + gPathProgress, &sp4C, &sp44, &sp48); actor->fwork[0] = sp4C; actor->fwork[1] = sp44; actor->fwork[2] = sp48; @@ -608,7 +608,7 @@ void Titania_8018AB44(Actor* actor) { switch (actor->state) { case 0: actor->gravity = 1.0f; - Ground_801B6E20(actor->obj.pos.x, actor->obj.pos.z + D_ctx_80177D20, &sp3C, &sp34, &sp38); + Ground_801B6E20(actor->obj.pos.x, actor->obj.pos.z + gPathProgress, &sp3C, &sp34, &sp38); if (actor->obj.pos.y <= (sp34 + 3.0f)) { AUDIO_PLAY_SFX(0x19000024, actor->sfxSource, 4); actor->obj.pos.y = sp34 + 3.0f; @@ -624,7 +624,7 @@ void Titania_8018AB44(Actor* actor) { break; } - switch (actor->unk_0D0) { + switch (actor->dmgType) { case 1: AUDIO_PLAY_SFX(0x29022086, actor->sfxSource, 4); break; @@ -643,16 +643,16 @@ void Titania_8018AB44(Actor* actor) { func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y + 50.0f, actor->obj.pos.z, (10.0f / 3.0f)); gPlayer[0].vel.y = 20.0f; gPlayer[0].pos.y += 15.0f; - gPlayer[0].unk_1DC = 1; + gPlayer[0].barrelRoll = 1; gPlayer[0].timer_1E8 = 15; - gPlayer[0].unk_1EC = 20; + gPlayer[0].rollRate = 20; if (actor->obj.pos.x < gPlayer[0].pos.x) { - gPlayer[0].unk_1EC = -20; + gPlayer[0].rollRate = -20; } Object_Kill(&actor->obj, actor->sfxSource); break; } - actor->unk_0D0 = 0; + actor->dmgType = 0; } static Vec3f D_i5_801B75AC = { -70.0f, 50.0f, 212.0f }; @@ -672,7 +672,7 @@ void Titania_8018ADC4(Actor* actor) { actor->obj.rot.z = 0.0f; actor->obj.rot.x = 0.0f; - Ground_801B6E20(actor->obj.pos.x, actor->obj.pos.z + D_ctx_80177D20, &sp54, &sp58, &sp54); + Ground_801B6E20(actor->obj.pos.x, actor->obj.pos.z + gPathProgress, &sp54, &sp58, &sp54); actor->obj.pos.y = sp58; @@ -774,8 +774,8 @@ void Titania_8018B268(Actor* actor) { Actor* sp3C = actor->iwork[0]; Actor* sp38 = actor->iwork[1]; - if (actor->unk_0D0 > 0) { - actor->unk_0D0 = 0; + if (actor->dmgType > 0) { + actor->dmgType = 0; if (actor->health > 0) { actor->health -= actor->damage; if (actor->health <= 0) { @@ -867,7 +867,7 @@ void Titania_8018B268(Actor* actor) { &gIdentityMatrix); func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f); actor->lockOnTimers[TEAM_ID_FOX] = 0; - actor->info.unk_1C = 0.0f; + actor->info.targetOffset = 0.0f; } } @@ -928,7 +928,7 @@ void Titania_8018B720(Actor* actor) { void Titania_Actor231_Init(Actor* actor) { f32 sp24; - Ground_801B6E20(actor->obj.pos.x, actor->obj.pos.z + D_ctx_80177D20, &sp24, &actor->obj.pos.y, &sp24); + Ground_801B6E20(actor->obj.pos.x, actor->obj.pos.z + gPathProgress, &sp24, &actor->obj.pos.y, &sp24); actor->obj.rot.x = actor->obj.rot.y = actor->obj.rot.z = 0.0f; actor->obj.pos.y -= 20.0f; } @@ -978,17 +978,17 @@ void Titania_8018B9D0(Actor* actor) { Player_ApplyDamage(gPlayer, 0, 60); gPlayer[0].vel.y = 20.0f; gPlayer[0].pos.y += 15.0f; - gPlayer[0].unk_1DC = 1; + gPlayer[0].barrelRoll = 1; gPlayer[0].timer_1E8 = 15; - gPlayer[0].unk_1EC = 20; + gPlayer[0].rollRate = 20; if (actor->obj.pos.x < gPlayer[0].pos.x) { - gPlayer[0].unk_1EC = -20; + gPlayer[0].rollRate = -20; } } break; case 1: - Ground_801B6E20(actor->obj.pos.x, actor->obj.pos.z + D_ctx_80177D20, &sp4C, &sp50, &sp48); + Ground_801B6E20(actor->obj.pos.x, actor->obj.pos.z + gPathProgress, &sp4C, &sp50, &sp48); actor->fwork[0] = sp50; actor->fwork[1] = sp4C; actor->fwork[2] = sp48; @@ -1018,11 +1018,11 @@ void Titania_8018B9D0(Actor* actor) { actor->obj.rot.x = (var_fa0 / 130.0f) * 90.0f; - if (actor->unk_0D0 == 1) { + if (actor->dmgType == 1) { AUDIO_PLAY_SFX(0x19020008, actor->sfxSource, 4); sp44 = actor->obj.pos.x - actor->hitPos.x; sp40 = fabsf(sp44); - actor->unk_0D0 = 0; + actor->dmgType = 0; actor->state = 1; actor->timer_0BC = 0; actor->timer_0BE = 0; @@ -1282,11 +1282,11 @@ void Titania_8018C8A8(Actor* actor) { s32 pad; actor->iwork[7]++; - sp88 = gPlayer[0].unk_138 - actor->obj.pos.z; + sp88 = gPlayer[0].trueZpos - actor->obj.pos.z; if (actor->iwork[4] > 0) { actor->iwork[4]--; - } else if ((gPlayer[0].unk_1D4 != 0) && (actor->iwork[3] > 0)) { + } else if ((gPlayer[0].grounded != 0) && (actor->iwork[3] > 0)) { gControllerRumbleFlags[0] = 1; actor->iwork[3]--; } @@ -1299,8 +1299,8 @@ void Titania_8018C8A8(Actor* actor) { actor->iwork[6]--; } - if ((actor->health > 0) && (actor->unk_0D0 > 0) && (actor->unk_0D0 != 3) && (actor->state >= 3)) { - if ((actor->health > 0) && (actor->unk_0D2 >= 0) && (actor->unk_0D2 < 3)) { + if ((actor->health > 0) && (actor->dmgType > 0) && (actor->dmgType != 3) && (actor->state >= 3)) { + if ((actor->health > 0) && (actor->dmgPart >= 0) && (actor->dmgPart < 3)) { actor->iwork[5] = 10; if (actor->state == 4) { Audio_KillSfxBySourceAndId(actor->sfxSource, 0x31030043); @@ -1321,10 +1321,10 @@ void Titania_8018C8A8(Actor* actor) { } else { AUDIO_PLAY_SFX(0x29034041, actor->sfxSource, 4); } - } else if (actor->unk_0D0 == 1) { + } else if (actor->dmgType == 1) { func_effect_8007A6F0(&actor->obj.pos, 0x29121007); } - actor->unk_0D0 = 0; + actor->dmgType = 0; } switch (actor->state) { @@ -1344,7 +1344,7 @@ void Titania_8018C8A8(Actor* actor) { break; case 1: - Ground_801B6E20(actor->obj.pos.x, actor->obj.pos.z + gPlayer->unk_144, &spA0, &sp9C, &sp98); + Ground_801B6E20(actor->obj.pos.x, actor->obj.pos.z + gPlayer->zPath, &spA0, &sp9C, &sp98); actor->fwork[0] = sp9C; actor->fwork[1] = spA0; actor->fwork[2] = sp98; @@ -1445,7 +1445,7 @@ void Titania_8018C8A8(Actor* actor) { break; case 4: - Ground_801B6E20(actor->obj.pos.x, actor->obj.pos.z + D_ctx_80177D20, &spA0, &sp9C, &sp98); + Ground_801B6E20(actor->obj.pos.x, actor->obj.pos.z + gPathProgress, &spA0, &sp9C, &sp98); actor->fwork[0] = sp9C; actor->fwork[1] = spA0; actor->fwork[2] = sp98; @@ -1677,12 +1677,12 @@ void Titania_8018C8A8(Actor* actor) { } if (actor->health > 0) { - actor->info.unk_1C = actor->fwork[27]; + actor->info.targetOffset = actor->fwork[27]; } else { actor->lockOnTimers[TEAM_ID_FOX] = 0; - actor->info.unk_1C = 0.0f; + actor->info.targetOffset = 0.0f; } - actor->unk_0D0 = 0; + actor->dmgType = 0; } void Titania_8018E2D8(Actor* actor) { @@ -1712,7 +1712,7 @@ void Titania_8018E3CC(Actor* actor) { Vec3f sp34; s32 i; - Ground_801B6E20(actor->obj.pos.x, actor->obj.pos.z + D_ctx_80177D20, &sp40, &actor->obj.pos.y, &sp40); + Ground_801B6E20(actor->obj.pos.x, actor->obj.pos.z + gPathProgress, &sp40, &actor->obj.pos.y, &sp40); actor->obj.pos.y -= 20.0f; actorPtr = gActors; @@ -1785,7 +1785,7 @@ void Titania_8018E5F8(Actor* actor) { sp9C = gPlayer[0].pos.x - actor->obj.pos.x; spA0 = (gPlayer[0].pos.y - actor->obj.pos.y) - 30.0f; - spA4 = gPlayer[0].unk_138 - actor->obj.pos.z; + spA4 = gPlayer[0].trueZpos - actor->obj.pos.z; switch (actor->state) { case 0: @@ -1834,7 +1834,7 @@ void Titania_8018E5F8(Actor* actor) { func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f); actor->timer_0BE = 10; } - Ground_801B6E20(actor->obj.pos.x, actor->obj.pos.z + D_ctx_80177D20, &sp80, &sp7C, &sp80); + Ground_801B6E20(actor->obj.pos.x, actor->obj.pos.z + gPathProgress, &sp80, &sp7C, &sp80); if (actor->obj.pos.y < (94.0f + sp7C)) { spA4 = fabsf(spA4); if (spA4 < 5000.0f) { @@ -1851,7 +1851,7 @@ void Titania_8018E5F8(Actor* actor) { case 4: if (actor->iwork[7] > 0) { actor->iwork[7]--; - } else if ((gPlayer[0].unk_1D4 != 0) && (actor->iwork[8] > 0)) { + } else if ((gPlayer[0].grounded != 0) && (actor->iwork[8] > 0)) { gControllerRumbleFlags[0] = 1; actor->iwork[8]--; } @@ -1874,8 +1874,8 @@ void Titania_8018E5F8(Actor* actor) { actor->fwork[3] = sp84.x; actor->fwork[4] = sp84.y; actor->fwork[5] = sp84.z; - if (actor->unk_0D0 > 0) { - actor->unk_0D0 = 0; + if (actor->dmgType > 0) { + actor->dmgType = 0; actor->timer_0C6 = 10; if (actor->health > 0) { actor->health -= actor->damage; @@ -1883,7 +1883,7 @@ void Titania_8018E5F8(Actor* actor) { BonusText_Display(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + actor->fwork[27], 2); gHitCount += 2; actor->lockOnTimers[TEAM_ID_FOX] = actor->health = actor->itemDrop = 0; - actor->info.unk_1C = 0.0f; + actor->info.targetOffset = 0.0f; Actor_Despawn(actor); actor->info.bonus = 0; ((Actor*) actor->iwork[4])->iwork[0] = 0; @@ -1913,7 +1913,7 @@ void Titania_8018E5F8(Actor* actor) { for (i = 0; i <= 3000; i += 50) { sp5C = (sp68 * i) + sp40; sp54 = (sp60 * i) + sp48; - Ground_801B6E20(sp5C, sp54 + D_ctx_80177D20, &sp74, &sp70, &sp6C); + Ground_801B6E20(sp5C, sp54 + gPathProgress, &sp74, &sp70, &sp6C); if ((sp64 * i) + sp44 < sp70) { break; } @@ -1922,25 +1922,25 @@ void Titania_8018E5F8(Actor* actor) { if (actor->iwork[2] == 0) { index = actor->iwork[3] - 1; gTexturedLines[index].mode = 101; - gTexturedLines[index].unk_04.x = actor->obj.pos.x + actor->fwork[0]; - gTexturedLines[index].unk_04.y = actor->obj.pos.y + actor->fwork[1]; - gTexturedLines[index].unk_04.z = actor->obj.pos.z + actor->fwork[2]; - gTexturedLines[index].unk_2C = 255; - gTexturedLines[index].unk_2D = 255; - gTexturedLines[index].unk_2E = 0; - gTexturedLines[index].unk_2F = 255; - gTexturedLines[index].unk_10.x = sp5C; - gTexturedLines[index].unk_10.y = sp70; - gTexturedLines[index].unk_10.z = sp54; - gTexturedLines[index].unk_28 = 3.0f; + gTexturedLines[index].posAA.x = actor->obj.pos.x + actor->fwork[0]; + gTexturedLines[index].posAA.y = actor->obj.pos.y + actor->fwork[1]; + gTexturedLines[index].posAA.z = actor->obj.pos.z + actor->fwork[2]; + gTexturedLines[index].red = 255; + gTexturedLines[index].green = 255; + gTexturedLines[index].blue = 0; + gTexturedLines[index].alpha = 255; + gTexturedLines[index].posBB.x = sp5C; + gTexturedLines[index].posBB.y = sp70; + gTexturedLines[index].posBB.z = sp54; + gTexturedLines[index].xyScale = 3.0f; if (actor->timer_0C0 == 0) { - gTexturedLines[index].unk_2C = 255; - gTexturedLines[index].unk_2D = 255; - gTexturedLines[index].unk_2E = 64; + gTexturedLines[index].red = 255; + gTexturedLines[index].green = 255; + gTexturedLines[index].blue = 64; } else { - gTexturedLines[index].unk_2C = 255; - gTexturedLines[index].unk_2D = 100; - gTexturedLines[index].unk_2E = 0; + gTexturedLines[index].red = 255; + gTexturedLines[index].green = 100; + gTexturedLines[index].blue = 0; } if (i <= 3000) { if (actor->timer_0C0 == 0) { @@ -1990,13 +1990,13 @@ void Titania_8018EFF0(Sprite* sprite) { f32 sp24; f32 sp20; - Ground_801B6E20(sprite->obj.pos.x, sprite->obj.pos.z + D_ctx_80177D20, &sp20, &sp24, &sp20); + Ground_801B6E20(sprite->obj.pos.x, sprite->obj.pos.z + gPathProgress, &sp20, &sp24, &sp20); sprite->obj.pos.y = sp24; } void Titania_Cactus_Update(Sprite* sprite) { sprite->obj.rot.y = Math_Atan2F(gPlayer[0].cam.eye.x - sprite->obj.pos.x, - gPlayer[0].cam.eye.z - (sprite->obj.pos.z + D_ctx_80177D20)) * + gPlayer[0].cam.eye.z - (sprite->obj.pos.z + gPathProgress)) * M_RTOD; if (sprite->unk_46 != 0) { func_effect_8007D074(sprite->obj.pos.x, sprite->obj.pos.y + 96.0f, sprite->obj.pos.z, 4.0f); @@ -2762,7 +2762,7 @@ bool Titania_80190A08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* if ((limbIndex == 71) && (boss->fwork[0x2E] != 0.0f)) { sp70.x = (gPlayer[0].pos.x - (boss->obj.pos.x + sp7C.x)) * boss->fwork[0x2E]; sp70.y = (gPlayer[0].pos.y + 50.0f) - (boss->obj.pos.y + sp7C.y); - sp70.z = (gPlayer[0].unk_138 - (boss->obj.pos.z + sp7C.z)) * boss->fwork[0x2E]; + sp70.z = (gPlayer[0].trueZpos - (boss->obj.pos.z + sp7C.z)) * boss->fwork[0x2E]; sp5C.y = Math_Atan2F(sp70.x, sp70.z) * M_RTOD; sp5C.x = -Math_Atan2F(sp70.y, sqrtf(SQ(sp70.x) + SQ(sp70.z))) * M_RTOD; @@ -2770,7 +2770,7 @@ bool Titania_80190A08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* } else { sp70.x = gPlayer[0].pos.x - (boss->obj.pos.x + sp7C.x); sp70.y = (gPlayer[0].pos.y + 30.0f) - (boss->obj.pos.y + sp7C.y); - sp70.z = gPlayer[0].unk_138 - (boss->obj.pos.z + sp7C.z); + sp70.z = gPlayer[0].trueZpos - (boss->obj.pos.z + sp7C.z); sp5C.y = Math_Atan2F(sp70.x, sp70.z) * M_RTOD; sp5C.x = -Math_Atan2F(sp70.y, sqrtf(SQ(sp70.x) + SQ(sp70.z))) * M_RTOD; @@ -3118,7 +3118,7 @@ void Titania_80192118(Boss* boss) { Animation_GetFrameData(&D_TI_A0002BC, 0, &D_i5_801BCDC8[8]); Animation_GetFrameData(&D_TI_A000934, 0, &D_i5_801BC978[16]); Animation_GetFrameData(&D_TI_A000934, 0, &D_i5_801BCDC8[16]); - if ((gPlayer[0].unk_138 - boss->obj.pos.z) <= 450.0f) { + if ((gPlayer[0].trueZpos - boss->obj.pos.z) <= 450.0f) { gPlayer[0].unk_19C = -1; gPlayer[0].unk_000 = 0.0f; boss->swork[1] = 2; @@ -3253,7 +3253,7 @@ void Titania_80192118(Boss* boss) { } Math_SmoothStepToF(&boss->vel.z, gPlayer[0].vel.z, 0.7f, 1.0f, 0.01f); Math_SmoothStepToF(&boss->obj.pos.x, gPlayer[0].pos.x, 0.1f, 6.0f, 0.01f); - Math_SmoothStepToF(&boss->obj.pos.z, gPlayer[0].unk_138 - 450.0f, 0.1f, 1.0f, 0.01f); + Math_SmoothStepToF(&boss->obj.pos.z, gPlayer[0].trueZpos - 450.0f, 0.1f, 1.0f, 0.01f); Animation_GetFrameData(&D_TI_A000D50, D_i5_801BBEF0[24] >> 1, &D_i5_801BC978[16]); switch (D_i5_801BBEF0[39]) { @@ -4032,7 +4032,7 @@ void Titania_80193DF0(Boss* boss) { actor->obj.pos.x = 0.0f; actor->obj.pos.y = 0.0f; actor->obj.pos.z = boss->obj.pos.z + 2000.0f; - actor->info.unk_10 = 5000.0f; + actor->info.cullDistance = 5000.0f; actor->unk_046 = D_i5_801B7770[D_i5_801B8198[i].unk_00][5]; actor->unk_048 = D_i5_801B7770[D_i5_801B8198[i].unk_00][1]; D_i5_801B8198[i].unk_0C = D_i5_801B8198[i].unk_04; @@ -4167,7 +4167,7 @@ void Titania_80193DF0(Boss* boss) { D_i5_801BBEF0[1] = 25; D_i5_801BBEF4[0] = 0.25f; boss->obj.pos.x = gPlayer[0].pos.x; - boss->obj.pos.z = gPlayer[0].unk_138 - 1070.0f; + boss->obj.pos.z = gPlayer[0].trueZpos - 1070.0f; boss->vel.z = 0.0f; Animation_GetFrameData(&D_TI_900FC4C, 0, D_i5_801BCDC8); D_i5_801BBEF4[8] = 48.0f; @@ -4191,7 +4191,7 @@ void Titania_80193DF0(Boss* boss) { if ((boss->unk_04C == 0) || (boss->unk_04C == 68) || (boss->unk_04C == 96) || (boss->unk_04C == 149)) { AUDIO_PLAY_SFX(0x2900502A, boss->sfxSource, 4); } - temp_f = gPlayer[0].unk_138 - boss->obj.pos.z - 530.0f; + temp_f = gPlayer[0].trueZpos - boss->obj.pos.z - 530.0f; if (temp_f < 0.0f) { boss->obj.pos.z += temp_f; } @@ -4667,7 +4667,7 @@ void Titania_80193DF0(Boss* boss) { effect->obj.pos.z = boss->obj.pos.z + spC8.z; effect->obj.rot.y = boss->fwork[49] + -44.0f; effect->unk_44 = 53; - effect->info.unk_10 = 400.0f; + effect->info.cullDistance = 400.0f; effect->info.unk_14 = -1; effect->unk_74 = D_TI2_7009A80; } @@ -4684,7 +4684,7 @@ void Titania_80193DF0(Boss* boss) { effect->obj.pos.z = boss->obj.pos.z + spC8.z; effect->obj.rot.y = boss->fwork[49] + 44.0f; effect->unk_44 = 53; - effect->info.unk_10 = 400.0f; + effect->info.cullDistance = 400.0f; effect->info.unk_14 = -1; effect->unk_74 = D_TI2_7009A80; } @@ -4734,7 +4734,7 @@ void Titania_80197A94(Boss* boss) { AUDIO_PLAY_SFX(0x29121007, boss->sfxSource, 4); boss->dmgType = DMG_NONE; } - if ((gPlayer[0].unk_1D4 != 0) && (boss->swork[39] > 0)) { + if ((gPlayer[0].grounded != 0) && (boss->swork[39] > 0)) { gControllerRumbleFlags[0] = 1; boss->swork[39]--; } @@ -5134,22 +5134,22 @@ void Titania_801982A8(Boss* boss) { spF4.y = D_i5_801B8E24[i][1] * boss->fwork[41]; spF4.z = boss->fwork[42]; Matrix_MultVec3f(gCalcMatrix, &spF4, &spE8); - gTexturedLines[temp_v1_28].unk_04.x = temp_fs0; - gTexturedLines[temp_v1_28].unk_04.y = temp_fs1; - gTexturedLines[temp_v1_28].unk_04.z = temp_fs2; - gTexturedLines[temp_v1_28].unk_10.x = temp_fs0 + spE8.x; - gTexturedLines[temp_v1_28].unk_10.y = temp_fs1 + spE8.y; - gTexturedLines[temp_v1_28].unk_10.z = temp_fs2 + spE8.z; + gTexturedLines[temp_v1_28].posAA.x = temp_fs0; + gTexturedLines[temp_v1_28].posAA.y = temp_fs1; + gTexturedLines[temp_v1_28].posAA.z = temp_fs2; + gTexturedLines[temp_v1_28].posBB.x = temp_fs0 + spE8.x; + gTexturedLines[temp_v1_28].posBB.y = temp_fs1 + spE8.y; + gTexturedLines[temp_v1_28].posBB.z = temp_fs2 + spE8.z; if (boss->swork[32] == 0) { gTexturedLines[temp_v1_28].mode = 0; } else { gTexturedLines[temp_v1_28].mode = 1; } - gTexturedLines[temp_v1_28].unk_2C = 0; - gTexturedLines[temp_v1_28].unk_2E = 0; - gTexturedLines[temp_v1_28].unk_2D = 0; - gTexturedLines[temp_v1_28].unk_2F = 0; - gTexturedLines[temp_v1_28].unk_28 = 1; + gTexturedLines[temp_v1_28].red = 0; + gTexturedLines[temp_v1_28].blue = 0; + gTexturedLines[temp_v1_28].green = 0; + gTexturedLines[temp_v1_28].alpha = 0; + gTexturedLines[temp_v1_28].xyScale = 1; } } } @@ -5234,7 +5234,7 @@ void Titania_801990DC(Boss* boss) { actor->fwork[4] = -200.0f; actor->obj.pos.x = gPlayer[0].pos.x; actor->obj.pos.y = 500.0f; - actor->obj.pos.z = gPlayer[0].unk_138 + actor->fwork[4]; + actor->obj.pos.z = gPlayer[0].trueZpos + actor->fwork[4]; actor->obj.rot.y = (RAND_FLOAT(5.0f) + 90.0f) - 2.5f; actor->obj.rot.z = (RAND_FLOAT(5.0f) + 180.0f) - 2.5f; actor->vel.y = -10.0f; @@ -5256,7 +5256,7 @@ void Titania_801990DC(Boss* boss) { actor->fwork[5] = 200.0f; actor->obj.pos.x = gPlayer[0].pos.x + actor->fwork[3]; actor->obj.pos.y = 500.0f; - actor->obj.pos.z = gPlayer[0].unk_138 + actor->fwork[4]; + actor->obj.pos.z = gPlayer[0].trueZpos + actor->fwork[4]; actor->obj.rot.z = 90.0f; actor->vel.y = -10.0f; actor->gravity = 0.8f; @@ -5277,7 +5277,7 @@ void Titania_801990DC(Boss* boss) { actor->fwork[5] = 200.0f; actor->obj.pos.x = gPlayer[0].pos.x + actor->fwork[3]; actor->obj.pos.y = 500.0f; - actor->obj.pos.z = gPlayer[0].unk_138 + actor->fwork[4]; + actor->obj.pos.z = gPlayer[0].trueZpos + actor->fwork[4]; actor->obj.rot.z = 90.0f; actor->vel.y = -10.0f; actor->gravity = 0.8f; @@ -5287,6 +5287,6 @@ void Titania_801990DC(Boss* boss) { if ((boss->timer_050 == 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { Object_Kill(&boss->obj, boss->sfxSource); gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; - gPlayer[0].unk_1D0 = 0; + gPlayer[0].csState = 0; } } diff --git a/src/overlays/ovl_i5/fox_ti_cs.c b/src/overlays/ovl_i5/fox_ti_cs.c index bcc4c6ba..417f1964 100644 --- a/src/overlays/ovl_i5/fox_ti_cs.c +++ b/src/overlays/ovl_i5/fox_ti_cs.c @@ -11,7 +11,7 @@ f32 D_i5_801B7348[] = { 90.0f, -90.0f, 0.0f }; void Titania_80187530(Actor* actor) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = 0.0f; actor->obj.pos.y = 3000.0f; @@ -26,7 +26,7 @@ void Titania_80187530(Actor* actor) { void Titania_801875D0(Actor* actor, s32 arg1) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = D_i5_801B72A0[arg1].x; actor->obj.pos.y = D_i5_801B72A0[arg1].y + 3000.0f; @@ -46,11 +46,11 @@ void Titania_LevelStart(Player* player) { sp64 = 20000.0f; - switch (player->unk_1D0) { + switch (player->csState) { case 0: gCsFrameCount = 0; gTiStartLandmaster = 1; - player->unk_0D4 = 0.0f; + player->gravity = 0.0f; Titania_80187530(&gActors[3]); @@ -75,7 +75,7 @@ void Titania_LevelStart(Player* player) { player->cam.at.z = gCsCamAtZ = player->pos.z; player->unk_240 = 1; - player->unk_1D0 = 1; + player->csState = 1; gFogFar = 1006; gPlayer[0].unk_19C = 0; gBgColor = 0x78C1; // 120, 24, 0 @@ -92,8 +92,8 @@ void Titania_LevelStart(Player* player) { } if (gCsFrameCount == 430) { - player->unk_1D0 = 2; - player->timer_1F8 = 10; + player->csState = 2; + player->csTimer = 10; AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); } gCsCamAtX = player->pos.x; @@ -107,14 +107,14 @@ void Titania_LevelStart(Player* player) { gCsCamAtY = player->pos.y; gCsCamAtZ = player->pos.z; - if (player->timer_1F8 == 1) { - player->unk_0D4 = 1.0f; + if (player->csTimer == 1) { + player->gravity = 1.0f; D_ctx_80177A48[0] = 0.05f; } - if (player->timer_1F8 == 0) { - if (player->unk_0D4 > -0.3f) { - player->unk_0D4 = player->unk_0D4 - 0.05f; + if (player->csTimer == 0) { + if (player->gravity > -0.3f) { + player->gravity = player->gravity - 0.05f; } } @@ -129,14 +129,14 @@ void Titania_LevelStart(Player* player) { if (gCsFrameCount == 500) { gCsFrameCount = 480; - player->unk_1D0 = 3; - player->unk_144 = 200.0f; + player->csState = 3; + player->zPath = 200.0f; - D_ctx_80177D20 = 200.0f; - D_ctx_80177CC8 = D_ctx_80177D20; + gPathProgress = 200.0f; + gPathGroundScroll = gPathProgress; - player->pos.z = -(D_ctx_80177D20) -200.0f; - player->unk_0D4 = 0.0f; + player->pos.z = -(gPathProgress) -200.0f; + player->gravity = 0.0f; player->vel.y = 0.0f; player->pos.y = 2000.0f; player->vel.z = 0.0f; @@ -173,7 +173,7 @@ void Titania_LevelStart(Player* player) { gCsCamEyeY = sp48.y; player->cam.eye.y = sp48.y; - player->cam.eye.z = gCsCamEyeZ = player->pos.z + player->unk_144 + sp48.z; + player->cam.eye.z = gCsCamEyeZ = player->pos.z + player->zPath + sp48.z; } break; @@ -189,12 +189,12 @@ void Titania_LevelStart(Player* player) { gCsCamEyeX = sp48.x; gCsCamEyeY = sp48.y; - gCsCamEyeZ = player->pos.z + player->unk_144 + sp48.z; + gCsCamEyeZ = player->pos.z + player->zPath + sp48.z; gCsCamAtX = player->pos.x; player->cam.at.x = gCsCamAtX; player->cam.at.y = gCsCamAtY = player->pos.y; - player->cam.at.z = gCsCamAtZ = player->pos.z + player->unk_144; + player->cam.at.z = gCsCamAtZ = player->pos.z + player->zPath; Math_SmoothStepToF(&player->pos.y, D_ctx_80177A48[1], 0.1f, 50.0f, 0.0f); @@ -212,17 +212,18 @@ void Titania_LevelStart(Player* player) { if (player->pos.y < 100.0f) { func_effect_8007A900(RAND_FLOAT_CENTERED(30.0f) + player->pos.x, 30.0f, - RAND_FLOAT_CENTERED(30.0f) + player->unk_138, RAND_FLOAT(2.0f) + 3.5f, 255, 12, 1); + RAND_FLOAT_CENTERED(30.0f) + player->trueZpos, RAND_FLOAT(2.0f) + 3.5f, 255, 12, + 1); Object_Kill(&gActors[3].obj, gActors[3].sfxSource); } - Math_SmoothStepToF(&player->unk_0F0, SIN_DEG(gGameFrameCount * 5.0f) * 10.0f, 0.1f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->rockAngle, SIN_DEG(gGameFrameCount * 5.0f) * 10.0f, 0.1f, 100.0f, 0.0f); if (gCsFrameCount == 580) { gLevelStartStatusScreenTimer = 50; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; - player->unk_1D0 = player->timer_1F8 = player->timer_1FC = player->unk_240 = 0; - player->unk_0D4 = 3.0f; + player->csState = player->csTimer = player->csEventTimer = player->unk_240 = 0; + player->gravity = 3.0f; player->unk_014 = 0.0f; D_ctx_8017782C = 1; func_play_800A594C(); @@ -235,9 +236,9 @@ void Titania_LevelStart(Player* player) { } player->pos.y += player->vel.y; - player->vel.y -= player->unk_0D4; + player->vel.y -= player->gravity; player->pos.z += player->vel.z; - player->unk_138 = player->pos.z; + player->trueZpos = player->pos.z; Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], sp64, 0.00f); Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], sp64, 0.00f); @@ -263,7 +264,7 @@ void Titania_80188108(Actor* actor, s32 arg1) { actor->vel.z = player->vel.z; actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.rot.y = 180.0f; Object_SetInfo(&actor->info, actor->obj.id); @@ -289,20 +290,20 @@ void Titania_LevelComplete(Player* player) { Vec3f dest; s32 i; - switch (player->unk_1D0) { + switch (player->csState) { case 0: gCsFrameCount = gBossActive = gLoadLevelObjects = 0; Play_ClearObjectData(); - player->unk_1D0 = 1; + player->csState = 1; D_ctx_80177A48[0] = 0.0f; D_ctx_80177A48[1] = 0.0f; D_ctx_80177A48[2] = 0.0f; D_ctx_80177A48[3] = 250.0f; - player->unk_0D4 = 3.0f; + player->gravity = 3.0f; Titania_80188108(&gActors[0], 0); @@ -318,7 +319,7 @@ void Titania_LevelComplete(Player* player) { case 1: Math_SmoothStepToF(D_ctx_80177A48, 0.1f, 1.0f, 0.01f, 0.0f); Math_SmoothStepToF(&player->baseSpeed, 4.9f, 0.1f, 1.0f, 0.0f); - Math_SmoothStepToF(&player->unk_08C, 0.0f, 0.1f, 1.0f, 0.0f); + Math_SmoothStepToF(&player->camDist, 0.0f, 0.1f, 1.0f, 0.0f); if (gCsFrameCount < 1120) { Math_SmoothStepToF(&D_ctx_80177A48[1], 0.65f, 0.1f, 0.01f, 0.0f); @@ -339,7 +340,7 @@ void Titania_LevelComplete(Player* player) { gCsCamEyeX = player->pos.x + dest.x; gCsCamEyeY = player->pos.y + dest.y; - gCsCamEyeZ = player->pos.z + player->unk_144 + dest.z + 50.0f; + gCsCamEyeZ = player->pos.z + player->zPath + dest.z + 50.0f; if (gCsCamEyeY < 5.0f) { gCsCamEyeY = 5.0f; @@ -347,7 +348,7 @@ void Titania_LevelComplete(Player* player) { gCsCamAtX = player->pos.x; gCsCamAtY = player->pos.y + 30.0f; - gCsCamAtZ = player->pos.z + player->unk_144; + gCsCamAtZ = player->pos.z + player->zPath; func_tank_80045130(player); func_tank_80044868(player); @@ -366,7 +367,7 @@ void Titania_LevelComplete(Player* player) { y = D_i5_801B72B8[i].y + RAND_FLOAT_CENTERED(10.0f); z = D_i5_801B72B8[i].z; - func_effect_8007A900(player->pos.x + x, player->pos.y + y, player->unk_138 + z, + func_effect_8007A900(player->pos.x + x, player->pos.y + y, player->trueZpos + z, RAND_FLOAT(0.5f) + 0.5f, 255, 21, 0); } } @@ -379,7 +380,7 @@ void Titania_LevelComplete(Player* player) { gCsCamAtX = player->pos.x; gCsCamAtY = player->pos.y + 30.0f; - gCsCamAtZ = player->pos.z + player->unk_144; + gCsCamAtZ = player->pos.z + player->zPath; if (player->pos.y < 100.0f) { camAtY = SIN_DEG(gGameFrameCount * 130.0f) * 3.0f; @@ -390,13 +391,14 @@ void Titania_LevelComplete(Player* player) { if (gCsFrameCount < 1470) { func_effect_8007A900(RAND_FLOAT_CENTERED(30.0f) + (player->pos.x + 30.0f), 30.0f, - RAND_FLOAT_CENTERED(30.0f) + player->unk_138, RAND_FLOAT(2.0f) + 3.5f, 255, 12, 1); + RAND_FLOAT_CENTERED(30.0f) + player->trueZpos, RAND_FLOAT(2.0f) + 3.5f, 255, 12, + 1); } func_effect_8007A900(RAND_FLOAT_CENTERED(30.0f) + (player->pos.x - 30.0f), 30.0f, - RAND_FLOAT_CENTERED(30.0f) + player->unk_138, RAND_FLOAT(2.0f) + 3.5f, 255, 12, 1); - Math_SmoothStepToF(&player->unk_0F0, SIN_DEG(gGameFrameCount * 6.0f) * 18.0f, 0.1f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->unk_080, SIN_DEG(gGameFrameCount * 3.0f) * 5.0f, 0.1f, 100.0f, 0.0f); + RAND_FLOAT_CENTERED(30.0f) + player->trueZpos, RAND_FLOAT(2.0f) + 3.5f, 255, 12, 1); + Math_SmoothStepToF(&player->rockAngle, SIN_DEG(gGameFrameCount * 6.0f) * 18.0f, 0.1f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->yBob, SIN_DEG(gGameFrameCount * 3.0f) * 5.0f, 0.1f, 100.0f, 0.0f); x = SIN_DEG(gGameFrameCount * 4.0f) * -1.5f; @@ -408,7 +410,7 @@ void Titania_LevelComplete(Player* player) { player->pos.y += player->vel.y; player->pos.z += player->vel.z; - player->unk_138 = player->pos.z; + player->trueZpos = player->pos.z; break; } @@ -491,7 +493,7 @@ void Titania_LevelComplete(Player* player) { break; case 1300: - player->unk_1D0++; + player->csState++; D_ctx_80177A48[0] = 0.0f; player->vel.z = 0.0f; player->vel.y = 0.0f; diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index b4e1f500..e077dd5b 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -269,7 +269,7 @@ void Andross_801880E4(Actor* actor) { actor->fwork[1] = 47.0f; if ((fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 1000.0f) && (fabsf(actor->obj.pos.y - gPlayer[0].pos.y) < 500.0f) && - (fabsf(actor->obj.pos.z - gPlayer[0].unk_138) < 1000.0f)) { + (fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 1000.0f)) { actor->iwork[11] = 2; actor->fwork[1] = 65.0f; } @@ -324,7 +324,7 @@ void Andross_80188528(Actor* actor) { Math_SmoothStepToF(&actor->vel.x, 0.0f, 0.2f, 0.5f, 0.0f); Math_SmoothStepToF(&actor->vel.y, 0.0f, 0.2f, 0.5f, 0.0f); Math_SmoothStepToF(&actor->vel.z, 0.0f, 0.2f, 0.5f, 0.0f); - if (actor->unk_0D0 != 0) { + if (actor->dmgType != 0) { func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); Object_Kill(&actor->obj, actor->sfxSource); func_effect_8007B344(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 3.0f, 5); @@ -385,7 +385,7 @@ void Andross_801888F4(Actor* actor) { if ((actor->timer_0BC % 2U) == 1) { func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 5.0f); } - if ((actor->timer_0BC == 0) || (actor->unk_0D0 != 0)) { + if ((actor->timer_0BC == 0) || (actor->dmgType != 0)) { func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, actor->vel.x, actor->vel.y, actor->vel.z, 7.0f, 20); func_effect_8007B344(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f, 5); @@ -449,7 +449,7 @@ void Andross_80188A4C(Boss* boss) { boss->state = 12; boss->timer_050 = 50; boss->fwork[3] = gPlayer[0].pos.x; - boss->fwork[5] = gPlayer[0].unk_138; + boss->fwork[5] = gPlayer[0].trueZpos; AUDIO_PLAY_SFX(0x2940B096, boss->sfxSource, 4); } } @@ -517,14 +517,14 @@ void Andross_80188CB8(Boss* boss) { for (i = 10; i < 12; i++) { if ((gActors[i].obj.status == OBJ_ACTIVE) && (gActors[i].obj.id == OBJ_ACTOR_ALLRANGE)) { gTexturedLines[i].mode = 50; - gTexturedLines[i].unk_28 = 1.0f; - gTexturedLines[i].unk_04.x = boss->obj.pos.x; - gTexturedLines[i].unk_04.y = boss->obj.pos.y - 200.0f; - gTexturedLines[i].unk_04.z = boss->obj.pos.z; + gTexturedLines[i].xyScale = 1.0f; + gTexturedLines[i].posAA.x = boss->obj.pos.x; + gTexturedLines[i].posAA.y = boss->obj.pos.y - 200.0f; + gTexturedLines[i].posAA.z = boss->obj.pos.z; gTexturedLines[i].timer = 3; - gTexturedLines[i].unk_10.x = gActors[i].obj.pos.x; - gTexturedLines[i].unk_10.y = gActors[i].obj.pos.y; - gTexturedLines[i].unk_10.z = gActors[i].obj.pos.z; + gTexturedLines[i].posBB.x = gActors[i].obj.pos.x; + gTexturedLines[i].posBB.y = gActors[i].obj.pos.y; + gTexturedLines[i].posBB.z = gActors[i].obj.pos.z; boss->swork[4] = 1; } } @@ -586,17 +586,17 @@ void Andross_80189214(void) { PRINTF("FO_Game_Sw %d\n"); player->cam.at.x = 0.0f; player->cam.at.y = 0.0f; - player->unk_114 = 0.0f; - player->unk_144 = 0.0f; - D_ctx_80177D20 = 0.0f; + player->yRot_114 = 0.0f; + player->zPath = 0.0f; + gPathProgress = 0.0f; player->unk_018 = player->unk_014 = 1.0f; - player->pos.z = player->unk_138 = -player->unk_144; + player->pos.z = player->trueZpos = -player->zPath; func_play_800B56BC(player); } void Andross_8018933C(Actor* actor) { if ((fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 1000.0f) && - (fabsf(actor->obj.pos.z - gPlayer[0].unk_138) < 1000.0f)) { + (fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 1000.0f)) { gStartAndrossFightTimer = 50; Object_Kill(&actor->obj, actor->sfxSource); } @@ -629,7 +629,7 @@ void Andross_80189470(Actor* actor) { if ((D_ctx_80177AB0 != 7) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 9000.0f) && - (fabsf(actor->obj.pos.z - gPlayer[0].unk_138) < 9000.0f)) { + (fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 9000.0f)) { D_ctx_80177AB0 = 7; Radio_PlayMessage(gMsg_ID_19370, RCID_JAMES); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 20); @@ -637,15 +637,15 @@ void Andross_80189470(Actor* actor) { } if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 500.0f) && - (fabsf(actor->obj.pos.z - gPlayer[0].unk_138) < 500.0f)) { + (fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 500.0f)) { Audio_KillSfxById(0x11403076); Audio_SetEnvSfxReverb(0); gCurrentLevel = LEVEL_VENOM_2; gLevelPhase = 1; gVenomHardClear = 1; player->state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; - player->unk_1D0 = 3; - player->unk_144 = D_ctx_80177D20 = 0.0f; + player->csState = 3; + player->zPath = gPathProgress = 0.0f; D_ctx_80177AB0 = D_ctx_80177A98 = 1; player->cam.eye.x = 1200.0f; player->cam.eye.z = 1200.0f; @@ -667,7 +667,7 @@ void Andross_80189470(Actor* actor) { func_play_800A594C(); gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; gFillScreenAlpha = gFillScreenAlphaTarget = 255; - player->timer_1F8 = 2; + player->csTimer = 2; gCsFrameCount = 0; D_ctx_80177A48[1] = 0.0f; } @@ -680,7 +680,7 @@ void Andross_80189724(Actor* actor) { Vec3f vel; if ((fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 2000.0f) && - (fabsf(actor->obj.pos.z - gPlayer[0].unk_138) < 2000.0f)) { + (fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 2000.0f)) { Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); vec.x = 0.0f; vec.y = 0.0f; @@ -701,14 +701,14 @@ void Andross_80189724(Actor* actor) { } } if ((fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 500.0f) && - (fabsf(actor->obj.pos.z - gPlayer[0].unk_138) < 500.0f)) { + (fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 500.0f)) { if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE || gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { gPlayer[0].shields = 0; gRightWingHealth[0] = gLeftWingHealth[0] = 0; Player_ApplyDamage(&gPlayer[0], 1, 60); Player_ApplyDamage(&gPlayer[0], 2, 60); actor->timer_0BC = 10; - gPlayer[0].timer_220 = 200; + gPlayer[0].radioDamageTimer = 200; } } if (actor->timer_0BC == 1) { @@ -772,7 +772,7 @@ void Andross_80189B70(Boss* boss) { } if ((fabsf(boss->obj.pos.x - gPlayer[0].pos.x) < 300.0f) && (fabsf(boss->obj.pos.y - 300.0f - gPlayer[0].pos.y) < 300.0f) && - (fabsf(boss->obj.pos.z - gPlayer[0].unk_138) < 300.0f) && (boss->state < 11) && (boss->timer_05A == 0)) { + (fabsf(boss->obj.pos.z - gPlayer[0].trueZpos) < 300.0f) && (boss->state < 11) && (boss->timer_05A == 0)) { boss->state = 11; boss->timer_050 = 150; AUDIO_PLAY_SFX(0x31408097, boss->sfxSource, 4); @@ -807,7 +807,7 @@ void Andross_80189B70(Boss* boss) { boss->swork[5] = 100; if (boss->timer_050 == 0) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_START_360; - gPlayer[0].unk_1D0 = 0; + gPlayer[0].csState = 0; boss->state = 1; gPlayer[0].unk_240 = 1; } @@ -840,7 +840,7 @@ void Andross_80189B70(Boss* boss) { gFillScreenAlphaTarget = 80; gFillScreenAlphaStep = 1; gPlayer[0].timer_224 = gGameFrameCount % 8U; - gPlayer[0].timer_220 = 3; + gPlayer[0].radioDamageTimer = 3; Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 40.0f, 1.0f, 3.0f, 0.0f); if (((gGameFrameCount % 32) == 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { Player_ApplyDamage(&gPlayer[0], 3, 10); @@ -880,7 +880,7 @@ void Andross_80189B70(Boss* boss) { boss->fwork[2] = 1.3f; boss->fwork[3] = gPlayer[0].pos.x; boss->fwork[4] = gPlayer[0].pos.y; - boss->fwork[5] = gPlayer[0].unk_138; + boss->fwork[5] = gPlayer[0].trueZpos; break; case 12: boss->info.hitbox = SEGMENTED_TO_VIRTUAL(&gNoHitbox); @@ -981,7 +981,7 @@ void Andross_80189B70(Boss* boss) { case 30: gRadioState = 0; Radio_PlayMessage(gMsg_ID_20318, RCID_FOX); - gPlayer[0].timer_220 = 200; + gPlayer[0].radioDamageTimer = 200; break; case 350: Radio_PlayMessage(gMsg_ID_19468, RCID_JAMES); @@ -1003,15 +1003,15 @@ void Andross_80189B70(Boss* boss) { gPlayer[0].pos.x = -25995.0f; gPlayer[0].pos.y = 300.0f; gPlayer[0].pos.z = -11140.0f; - gPlayer[0].unk_08C = 0.0f; - gPlayer[0].unk_114 = 271.0f; - gPlayer[0].boostSpeed = gPlayer[0].unk_4D8 = gPlayer[0].unk_0E8 = gPlayer[0].unk_0E4 = - gPlayer[0].unk_0EC = 0.0f; - gPlayer[0].unk_12C = 150.0f; + gPlayer[0].camDist = 0.0f; + gPlayer[0].yRot_114 = 271.0f; + gPlayer[0].boostSpeed = gPlayer[0].aerobaticPitch = gPlayer[0].rot.y = gPlayer[0].rot.x = + gPlayer[0].rot.z = 0.0f; + gPlayer[0].zRotBank = 150.0f; gPlayer[0].camRoll = -90.0f; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; - gPlayer[0].unk_1D0 = 100; - gPlayer[0].timer_1F8 = 240; + gPlayer[0].csState = 100; + gPlayer[0].csTimer = 240; gPlayer[0].unk_234 = 1; D_ctx_80177A48[5] = -1200.0f; @@ -1044,12 +1044,12 @@ void Andross_80189B70(Boss* boss) { boss->obj.pos.y = 10000.0f; if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && ((gGameFrameCount % 4) == 0)) { - Matrix_RotateY(gCalcMatrix, (gPlayer[0].unk_114 + gPlayer[0].unk_0E8) * M_DTOR, 0U); + Matrix_RotateY(gCalcMatrix, (gPlayer[0].yRot_114 + gPlayer[0].rot.y) * M_DTOR, 0U); vec.x = RAND_FLOAT_CENTERED(800.0f); vec.y = 600.0f; vec.z = RAND_FLOAT(1000.0f) + -3000.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &vec, &sp64); - Andross_80189B00(gPlayer[0].pos.x + sp64.x, sp64.y, gPlayer[0].unk_138 + sp64.z, 1.2f); + Andross_80189B00(gPlayer[0].pos.x + sp64.x, sp64.y, gPlayer[0].trueZpos + sp64.z, 1.2f); } if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_STANDBY) { Matrix_RotateY(gCalcMatrix, -gPlayer[0].camYaw, MTXF_NEW); @@ -1104,17 +1104,17 @@ void Andross_80189B70(Boss* boss) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &vec, &sp64); boss->vel.x = sp64.x; boss->vel.y = sp64.y; - boss->vel.z = sp64.z - D_ctx_80177D08; + boss->vel.z = sp64.z - gPathVelZ; if (boss->state < 20) { gRadarMarks[59].status = 1; gRadarMarks[59].type = 102; gRadarMarks[59].pos.x = boss->obj.pos.x; gRadarMarks[59].pos.y = boss->obj.pos.y; gRadarMarks[59].pos.z = boss->obj.pos.z; - gRadarMarks[59].unk_10 = boss->unk_078.y + 180.0f; + gRadarMarks[59].yRot = boss->unk_078.y + 180.0f; } - gActors[10].info.unk_1C = 1.0f; - gActors[11].info.unk_1C = 1.0f; + gActors[10].info.targetOffset = 1.0f; + gActors[11].info.targetOffset = 1.0f; if (boss->swork[5] != 0) { boss->swork[5]--; if (boss->swork[5] == 0) { @@ -1128,13 +1128,13 @@ void Andross_80189B70(Boss* boss) { gActors[10].obj.pos.z = boss->obj.pos.z + 200.0f; gActors[10].state = 0; gActors[10].timer_0C2 = 20; - gActors[10].info.unk_1C = 0.0f; + gActors[10].info.targetOffset = 0.0f; gActors[11].obj.pos.x = boss->obj.pos.x - 200.0f; gActors[11].obj.pos.y = boss->obj.pos.y - 200.0f; gActors[11].obj.pos.z = boss->obj.pos.z + 200.0f; gActors[11].state = 0; gActors[11].timer_0C2 = 20; - gActors[11].info.unk_1C = 0.0f; + gActors[11].info.targetOffset = 0.0f; } Math_SmoothStepToF(&boss->fwork[21], boss->fwork[22], 1.0f, 6.0f, 0); Math_SmoothStepToF(&boss->fwork[23], boss->fwork[24], 0.3f, 0.01f, 0); @@ -1291,8 +1291,8 @@ void Andross_8018BDD8(void) { void Andross_8018C390(Player* player) { player->boostCooldown = 1; - player->unk_280 = 0; - switch (player->unk_1D0) { + player->barrelRollAlpha = 0; + switch (player->csState) { case 2: case 3: break; @@ -1300,7 +1300,7 @@ void Andross_8018C390(Player* player) { Math_SmoothStepToF(&player->pos.x, gBosses[0].obj.pos.x, 0.5f, 30.0f, 0); Math_SmoothStepToF(&player->pos.y, gBosses[0].obj.pos.y - 150.0f, 0.5f, 30.0f, 0); Math_SmoothStepToF(&player->pos.z, gBosses[0].obj.pos.z - 100.0f, 0.5f, 60.0f, 0); - D_ctx_80177D20 = player->unk_144 = -player->pos.z; + gPathProgress = player->zPath = -player->pos.z; Math_SmoothStepToF(&player->cam.eye.z, 2000.0f, 0.05f, 20.0f, 0); Math_SmoothStepToF(&player->cam.eye.x, 0.0f, 0.05f, 10.0f, 0); Math_SmoothStepToF(&player->cam.eye.y, 0.0f, 0.05f, 10.0f, 0); @@ -1309,29 +1309,29 @@ void Andross_8018C390(Player* player) { Math_SmoothStepToF(&player->cam.at.z, 100.0f, 0.05f, 10.0f, 0.0f); break; case 1: - player->unk_0E4 += 15.0f; + player->rot.x += 15.0f; - if (player->unk_0E4 > 180.0f) { - player->unk_0E4 -= 360.0f; + if (player->rot.x > 180.0f) { + player->rot.x -= 360.0f; } - player->unk_0E8 += 9.0f; - if (player->unk_0E8 > 180.0f) { - player->unk_0E8 -= 360.0f; + player->rot.y += 9.0f; + if (player->rot.y > 180.0f) { + player->rot.y -= 360.0f; } Math_SmoothStepToF(&player->cam.eye.z, 400.0f, 0.05f, 20.0f, 0.0f); - if (player->timer_1F8 != 0) { + if (player->csTimer != 0) { if (gControllerPress[gMainController].button != 0) { - player->timer_1F8--; + player->csTimer--; } } - if (player->timer_1F8 == 0) { + if (player->csTimer == 0) { player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_014 = 0.0f; player->unk_018 = 0.0f; } break; } - player->unk_138 = player->pos.z + player->unk_08C; + player->trueZpos = player->pos.z + player->camDist; func_play_800A46A0(player); } @@ -1380,7 +1380,7 @@ void Andross_8018C7A0(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f3 effect->unk_60.x = RAND_FLOAT(10.0f) + 10.0f; effect->unk_60.y = RAND_FLOAT(10.0f) + 10.0f; Object_SetInfo(&effect->info, effect->obj.id); - effect->info.unk_10 = 100.0f; + effect->info.cullDistance = 100.0f; } void Andross_8018C8D4(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, s32 arg6) { @@ -1412,7 +1412,7 @@ void Andross_8018C958(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f3 effect->unk_60.z = RAND_FLOAT_CENTERED(20.0f); Object_SetInfo(&effect->info, effect->obj.id); effect->info.unk_14 = 1; - effect->info.unk_10 = 100.0f; + effect->info.cullDistance = 100.0f; } void Andross_8018CA50(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale) { @@ -1465,13 +1465,13 @@ void Andross_8018CAD4(Effect* effect) { Matrix_MultVec3f(gCalcMatrix, &vec, &vel); effect->vel.x = vel.x; effect->vel.y = vel.y; - effect->vel.z = vel.z - D_ctx_80177D08; + effect->vel.z = vel.z - gPathVelZ; if ((fabsf(effect->obj.pos.x - gBosses[0].obj.pos.x) <= 100.0f) && (fabsf(effect->obj.pos.z - (gBosses[0].obj.pos.z - 100.0f)) <= 100.0f)) { Object_Kill(&effect->obj, effect->sfxSource); } } else { - effect->info.unk_10 = 100.0f; + effect->info.cullDistance = 100.0f; Math_SmoothStepToF(&effect->vel.x, 0.0f, 0.05f, 1.0f, 0); Math_SmoothStepToF(&effect->vel.y, 0.0f, 0.05f, 1.0f, 0); Math_SmoothStepToF(&effect->vel.z, 70.0f, 0.05f, 2.0f, 0); @@ -1602,7 +1602,7 @@ void Andross_8018D2B0(Boss* boss) { boss->state = 31; boss->timer_050 = 200; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; - gPlayer[0].unk_1D0 = 0; + gPlayer[0].csState = 0; } else if (boss->health < 50) { AUDIO_PLAY_SFX(0x2943500F, boss->sfxSource, 4); } else { @@ -1840,7 +1840,7 @@ void Andross_8018DBF0(Boss* boss) { if (player->unk_234 != 0) { xDisplacement = gPlayer[0].pos.x - boss->vwork[2].x; yDisplacement = gPlayer[0].pos.y - boss->vwork[2].y; - zDisplacement = gPlayer[0].unk_138 - boss->vwork[2].z; + zDisplacement = gPlayer[0].trueZpos - boss->vwork[2].z; yaw = Math_RadToDeg(Math_Atan2F(xDisplacement, zDisplacement)); pitch = Math_RadToDeg(Math_Atan2F(yDisplacement, sqrtf(SQ(xDisplacement) + SQ(zDisplacement)))); @@ -1865,7 +1865,7 @@ void Andross_8018DBF0(Boss* boss) { if (player->unk_234 != 0) { xDisplacement = gPlayer[0].pos.x - boss->vwork[3].x; yDisplacement = gPlayer[0].pos.y - boss->vwork[3].y; - zDisplacement = gPlayer[0].unk_138 - boss->vwork[3].z; + zDisplacement = gPlayer[0].trueZpos - boss->vwork[3].z; yaw = Math_RadToDeg(Math_Atan2F(xDisplacement, zDisplacement)); pitch = Math_RadToDeg(Math_Atan2F(yDisplacement, sqrtf(SQ(xDisplacement) + SQ(zDisplacement)))); if ((yaw > 30.0f) && (yaw < 180.0f)) { @@ -2332,8 +2332,8 @@ void Andross_8018DBF0(Boss* boss) { } if ((boss->unk_04C == 13) && (player->state_1C8 == PLAYERSTATE_1C8_ANDROSS_MOUTH)) { player->unk_234 = 1; - player->unk_1D0 = 1; - player->timer_1F8 = 60; + player->csState = 1; + player->csTimer = 60; player->timer_498 = 50; boss->swork[8] = 0; gControllerRumbleTimers[0] = 30; @@ -2371,7 +2371,7 @@ void Andross_8018DBF0(Boss* boss) { if ((boss->timer_050 > 70) && (boss->timer_050 < 1000) && ((gGameFrameCount % 4) == 0)) { Andross_8018C734(gPlayer[0].cam.eye.x + RAND_FLOAT_CENTERED(3000.0f), gPlayer[0].cam.eye.y + RAND_FLOAT_CENTERED(3000.0f), - gPlayer[0].cam.eye.z - D_ctx_80177D20, RAND_INT(7.9)); + gPlayer[0].cam.eye.z - gPathProgress, RAND_INT(7.9)); } if (boss->timer_050 > 0) { playerShot = gPlayerShots; @@ -2412,14 +2412,14 @@ void Andross_8018DBF0(Boss* boss) { Math_SmoothStepToF(&player->pos.x, boss->obj.pos.x, 0.1f, boss->fwork[16], 0); Math_SmoothStepToF(&player->pos.y, boss->obj.pos.y - 150.0f, 0.1f, boss->fwork[16], 0); Math_SmoothStepToF(&boss->fwork[16], 35.0f, 1.0f, 0.5f, 0); - if (fabsf(player->unk_138 - boss->obj.pos.z) < 200.0f) { + if (fabsf(player->trueZpos - boss->obj.pos.z) < 200.0f) { boss->state = 15; boss->swork[8] = 1; boss->fwork[9] = 0.2f; boss->unk_04C = 0; if (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) { player->state_1C8 = PLAYERSTATE_1C8_ANDROSS_MOUTH; - player->unk_1D0 = 0; + player->csState = 0; } break; } @@ -3139,7 +3139,7 @@ void Andross_801928C8(Boss* boss) { Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); if (boss->fwork[20] > 0.05f) { - Matrix_Translate(gGfxMatrix, boss->vwork[10].x, boss->vwork[10].y, boss->vwork[10].z + D_ctx_80177D20, + Matrix_Translate(gGfxMatrix, boss->vwork[10].x, boss->vwork[10].y, boss->vwork[10].z + gPathProgress, MTXF_APPLY); if (boss->fwork[21] > 0.05f) { Matrix_Push(&gGfxMatrix); @@ -3221,13 +3221,13 @@ void Andross_80192E94(Actor* actor) { actor->timer_0BC = 5; otherActor->timer_0BC = 5; gTexturedLines[actor->index].mode = 50; - gTexturedLines[actor->index].unk_28 = 1.0f; - gTexturedLines[actor->index].unk_04.x = actor->obj.pos.x; - gTexturedLines[actor->index].unk_04.y = actor->obj.pos.y; - gTexturedLines[actor->index].unk_04.z = actor->obj.pos.z; - gTexturedLines[actor->index].unk_10.x = otherActor->obj.pos.x; - gTexturedLines[actor->index].unk_10.y = otherActor->obj.pos.y; - gTexturedLines[actor->index].unk_10.z = otherActor->obj.pos.z; + gTexturedLines[actor->index].xyScale = 1.0f; + gTexturedLines[actor->index].posAA.x = actor->obj.pos.x; + gTexturedLines[actor->index].posAA.y = actor->obj.pos.y; + gTexturedLines[actor->index].posAA.z = actor->obj.pos.z; + gTexturedLines[actor->index].posBB.x = otherActor->obj.pos.x; + gTexturedLines[actor->index].posBB.y = otherActor->obj.pos.y; + gTexturedLines[actor->index].posBB.z = otherActor->obj.pos.z; gTexturedLines[actor->index].timer = 3; break; } @@ -3241,8 +3241,8 @@ void Andross_80192E94(Actor* actor) { break; } - if (actor->unk_0D0 != 0) { - actor->unk_0D0 = 0; + if (actor->dmgType != 0) { + actor->dmgType = 0; actor->health -= actor->damage; if (actor->health <= 0) { func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 5.0f); @@ -3284,7 +3284,7 @@ void Andross_80193380(Scenery* scenery) { switch (scenery->state) { case 0: - if (fabsf(scenery->obj.pos.z - gPlayer[0].unk_138) < 1800.0f) { + if (fabsf(scenery->obj.pos.z - gPlayer[0].trueZpos) < 1800.0f) { scenery->state = 1; scenery->info.hitbox = SEGMENTED_TO_VIRTUAL(D_ANDROSS_C038AC4); } @@ -3351,7 +3351,7 @@ void Andross_80193668(Scenery* scenery, f32 xPos, f32 yPos, f32 zPos, s32 arg4) scenery->unk_60 = -40.0f; Object_SetInfo(&scenery->info, scenery->obj.id); scenery->timer_4C = (arg4 * 50) + 100; - scenery->info.unk_10 = 100000.0f; + scenery->info.cullDistance = 100000.0f; } void Andross_80193710(void) { @@ -3410,7 +3410,7 @@ void Andross_801939A0(s32 actorIndex) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = 0.0f; actor->obj.pos.y = gPlayer[0].cam.at.y; actor->obj.pos.z = 0.0f; @@ -3443,7 +3443,7 @@ void Andross_80193AE4(s32 actorIndex) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = D_i6_801A6878[actorIndex].x; actor->obj.pos.y = D_i6_801A6878[actorIndex].y; actor->obj.pos.z = D_i6_801A6878[actorIndex].z; @@ -3486,33 +3486,33 @@ void Andross_80193C4C(Player* player) { Math_SmoothStepToF(D_ctx_80177A48, 1.0f, 1.0f, 0.01f, 0.0f); player->wings.unk_04 = player->wings.unk_08 = player->wings.unk_0C = player->wings.unk_10 = 0.0f; - switch (player->unk_1D0) { + switch (player->csState) { case 0: gCsFrameCount = 0; player->wings.modelId = 1; D_ctx_80177A48[0] = 0.0f; - if (player->unk_4D8 > 180.0f) { - player->unk_4D8 -= 360.0f; + if (player->aerobaticPitch > 180.0f) { + player->aerobaticPitch -= 360.0f; } - player->unk_1D0++; - player->timer_1F8 = 50; + player->csState++; + player->csTimer = 50; player->vel.z = -40.0f; /* fallthrough */ case 1: - Math_SmoothStepToF(&player->unk_12C, 0.0f, 0.1f, 15.0f, 0.0f); + Math_SmoothStepToF(&player->zRotBank, 0.0f, 0.1f, 15.0f, 0.0f); Math_SmoothStepToF(&boss->vel.z, -40.0f, 1.0f, 1.0f, 0.0f); - Math_SmoothStepToF(&player->unk_0E8, 0.0f, 0.1f, 10.0f, 0.0f); + Math_SmoothStepToF(&player->rot.y, 0.0f, 0.1f, 10.0f, 0.0f); Math_SmoothStepToF(&player->vel.x, 0.0f, 1.0f, 3.0f, 0.0f); Math_SmoothStepToF(&player->vel.y, 0.0f, 1.0f, 3.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.x, player->pos.x, 0.1f, 15.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.y, player->pos.y + 30.0f, 0.1f, 15.0f, 0.0f); - if (player->timer_1F8 == 0) { - player->pos.y += SIN_DEG(player->unk_0E4) * 15.0f; - Math_SmoothStepToF(&player->unk_0E4, 180.0f, 0.1f, 5.0f, 0.0f); + if (player->csTimer == 0) { + player->pos.y += SIN_DEG(player->rot.x) * 15.0f; + Math_SmoothStepToF(&player->rot.x, 180.0f, 0.1f, 5.0f, 0.0f); Math_SmoothStepToF(&player->vel.z, 40.0f, 1.0f, 2.0f, 0.0f); } else { - Math_SmoothStepToF(&player->unk_08C, 0.0f, 1.0f, 5.0f, 0.0f); - Math_SmoothStepToF(&player->unk_0E4, 0.0f, 0.1f, 10.0f, 0.0f); + Math_SmoothStepToF(&player->camDist, 0.0f, 1.0f, 5.0f, 0.0f); + Math_SmoothStepToF(&player->rot.x, 0.0f, 0.1f, 10.0f, 0.0f); } player->cam.eye.z += player->vel.z * 0.5f; switch (gCsFrameCount) { @@ -3529,7 +3529,7 @@ void Andross_80193C4C(Player* player) { D_ctx_80177AB0 = 0; break; case 111: - player->unk_1D0 = 2; + player->csState = 2; AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); player->unk_190 = player->unk_194 = 7.0f; D_ctx_80177A48[0] = 0.0f; @@ -3543,7 +3543,7 @@ void Andross_80193C4C(Player* player) { } gCsCamAtX = gBosses[0].obj.pos.x; gCsCamAtY = gBosses[0].obj.pos.y; - gCsCamAtZ = gBosses[0].obj.pos.z + D_ctx_80177D20; + gCsCamAtZ = gBosses[0].obj.pos.z + gPathProgress; Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f); break; case 2: @@ -3583,7 +3583,7 @@ void Andross_80193C4C(Player* player) { Math_SmoothStepToF(&D_ctx_80177A48[5], 3.0f, 1.0f, 0.05f, 0.0f); player->cam.eye.z += player->vel.z * D_ctx_80177A48[2]; if (gCsFrameCount > 230) { - player->unk_08C -= 7.0f; + player->camDist -= 7.0f; } if (gCsFrameCount > 230) { Math_SmoothStepToF(&D_ctx_80177A48[7], 3.0f, 1.0f, 0.1f, 0.0f); @@ -3598,15 +3598,15 @@ void Andross_80193C4C(Player* player) { Math_SmoothStepToF(&player->cam.eye.x, D_ctx_80177A48[1] + player->pos.x, 0.1f, 15.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.y, player->pos.y + 30.0f, 0.1f, 15.0f, 0.0f); - Math_SmoothStepToF(&player->unk_0EC, -180.0f, 0.02f, D_ctx_80177A48[6], 0.0f); + Math_SmoothStepToF(&player->rot.z, -180.0f, 0.02f, D_ctx_80177A48[6], 0.0f); Math_SmoothStepToF(&D_ctx_80177A48[6], 3.0f, 1.0f, 0.05f, 0.0f); gCsCamAtX = player->pos.x; gCsCamAtY = player->pos.y; - gCsCamAtZ = player->unk_138 + D_ctx_80177D20; + gCsCamAtZ = player->trueZpos + gPathProgress; if (gCsFrameCount > 200) { - player->unk_25C += 0.03f; - if (player->unk_25C > 0.6f) { - player->unk_25C = 0.6f; + player->contrailScale += 0.03f; + if (player->contrailScale > 0.6f) { + player->contrailScale = 0.6f; } Math_SmoothStepToF(&player->camRoll, 3.0f, 0.5f, 0.1f, 0.0f); Math_SmoothStepToF(D_ctx_801779A8, 70.0f, 1.0f, 2.0f, 0.0f); @@ -3624,7 +3624,7 @@ void Andross_80193C4C(Player* player) { case 25: for (i = 0; i < 12; i++) { Andross_80193668(&gScenery[i], player->pos.x, player->pos.y, - (player->cam.eye.z - D_ctx_80177D20) + (2195.0f * i), i); + (player->cam.eye.z - gPathProgress) + (2195.0f * i), i); } break; case 150: @@ -3638,8 +3638,8 @@ void Andross_80193C4C(Player* player) { gCurrentLevel = LEVEL_VENOM_2; gLevelPhase = 1; gLevelMode = LEVELMODE_ALL_RANGE; - player->unk_1D0 = 3; - player->unk_144 = D_ctx_80177D20 = 0.0f; + player->csState = 3; + player->zPath = gPathProgress = 0.0f; D_ctx_80177AB0 = D_ctx_80177A98 = 1; player->cam.eye.x = 1200.0f; player->cam.eye.z = 1200.0f; @@ -3660,14 +3660,14 @@ void Andross_80193C4C(Player* player) { func_play_800A594C(); gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; gFillScreenAlpha = gFillScreenAlphaTarget = 255; - player->timer_1F8 = 2; + player->csTimer = 2; gCsFrameCount = 0; D_ctx_80177A48[1] = 0.0f; break; } break; case 3: - if (player->timer_1F8 == 0) { + if (player->csTimer == 0) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; gFillScreenAlpha = gFillScreenAlphaTarget = 0; } else { @@ -3704,7 +3704,7 @@ void Andross_80193C4C(Player* player) { AUDIO_PLAY_BGM(SEQ_ID_VE_CLEAR | SEQ_FLAG); } if (gCsFrameCount == 150) { - player->unk_1D0++; + player->csState++; D_ctx_80177A48[0] = 1.0f; D_ctx_80177A48[1] = 1000.0f; D_ctx_80177A48[2] = 0; @@ -3784,7 +3784,7 @@ void Andross_80193C4C(Player* player) { } if (gCsFrameCount == 360) { gCsFrameCount = 340; - player->unk_1D0++; + player->csState++; D_ctx_80177A48[0] = 1.0f; D_ctx_80177A48[1] = 0.0f; D_ctx_80177A48[2] = 0.0f; @@ -3804,7 +3804,7 @@ void Andross_80193C4C(Player* player) { gActors[10].unk_0F4.x = gActors[10].unk_0F4.y = 0.0f; gFillScreenAlpha = gFillScreenAlphaTarget = 255; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; - player->timer_1F8 = 3; + player->csTimer = 3; gStarCount = 500; } if (gCsFrameCount == 250) { @@ -3812,7 +3812,7 @@ void Andross_80193C4C(Player* player) { } break; case 5: - if (player->timer_1F8 == 1) { + if (player->csTimer == 1) { gFillScreenAlpha = gFillScreenAlphaTarget = 0; } if (gVenomHardClear != 0) { @@ -3825,9 +3825,9 @@ void Andross_80193C4C(Player* player) { } if ((gCsFrameCount >= 920) && (gTeamShields[TEAM_ID_PEPPY] > 0)) { if (gCsFrameCount == 920) { - player->timer_1F8 = 25; + player->csTimer = 25; } - gActors[10].fwork[19] = SIN_DEG(player->timer_1F8 * 40.0f) * 5.0f; + gActors[10].fwork[19] = SIN_DEG(player->csTimer * 40.0f) * 5.0f; } else { if (gCsFrameCount < 850) { switch (gCsFrameCount) { @@ -3956,8 +3956,9 @@ void Andross_80193C4C(Player* player) { if (gPlayerGlareAlphas[0] > 255) { gPlayerGlareAlphas[0] = 0; } - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->xRot_120 + player->rot.x + player->aerobaticPitch) * M_DTOR), + MTXF_APPLY); sp74.x = 0.0f; sp74.y = 0.0f; sp74.z = player->baseSpeed; @@ -3965,7 +3966,7 @@ void Andross_80193C4C(Player* player) { player->vel.x = sp68.x; player->vel.z = sp68.z; player->vel.y = sp68.y; - if (player->timer_1F8 == 0) { + if (player->csTimer == 0) { player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_014 = 0.2f; player->unk_018 = 0.0f; @@ -3988,17 +3989,17 @@ void Andross_80193C4C(Player* player) { Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0); Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0); Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0); - Math_SmoothStepToF(&player->unk_12C, 0.0f, 0.1f, 0.7f, 0.0f); + Math_SmoothStepToF(&player->zRotBank, 0.0f, 0.1f, 0.7f, 0.0f); Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 0.4f, 0.0f); break; } player->pos.x += player->vel.x; player->pos.y += player->vel.y; player->pos.z += player->vel.z; - player->unk_138 = player->pos.z + player->unk_08C; - player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; - Math_SmoothStepToF(&player->unk_130, 0.0f, 0.1f, 15.0f, 0.0f); - Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 20.0f, 0.0f); + player->trueZpos = player->pos.z + player->camDist; + player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; + Math_SmoothStepToF(&player->zRotBarrelRoll, 0.0f, 0.1f, 15.0f, 0.0f); + Math_SmoothStepToAngle(&player->aerobaticPitch, 0.0f, 0.1f, 20.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0); Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0); Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0); diff --git a/src/overlays/ovl_i6/fox_sy.c b/src/overlays/ovl_i6/fox_sy.c index 65882a27..06903226 100644 --- a/src/overlays/ovl_i6/fox_sy.c +++ b/src/overlays/ovl_i6/fox_sy.c @@ -26,7 +26,7 @@ f32 D_i6_801A8440[3]; void SectorY_80197B30(Actor* actor, s32 timer) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = gPlayer[0].pos.x; actor->obj.pos.y = gPlayer[0].pos.y; actor->obj.pos.z = gPlayer[0].pos.z; @@ -34,9 +34,9 @@ void SectorY_80197B30(Actor* actor, s32 timer) { actor->vel.x = gPlayer[0].vel.x; actor->vel.y = gPlayer[0].vel.y; actor->vel.z = gPlayer[0].vel.z; - actor->obj.rot.x = gPlayer[0].unk_120 + gPlayer[0].unk_0E4 + gPlayer[0].unk_4D8; - actor->obj.rot.y = gPlayer[0].unk_114 + gPlayer[0].unk_0E8 + 180.0f; - actor->obj.rot.z = gPlayer[0].unk_0EC; + actor->obj.rot.x = gPlayer[0].xRot_120 + gPlayer[0].rot.x + gPlayer[0].aerobaticPitch; + actor->obj.rot.y = gPlayer[0].yRot_114 + gPlayer[0].rot.y + 180.0f; + actor->obj.rot.z = gPlayer[0].rot.z; actor->state = 5; actor->timer_04C = timer; actor->iwork[11] = 1; @@ -98,7 +98,7 @@ void SectorY_Boss314_Init(Boss314* this) { if (gLevelMode == LEVELMODE_ON_RAILS) { if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_START_360; - gPlayer[0].unk_1D0 = 0; + gPlayer[0].csState = 0; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); } @@ -232,7 +232,7 @@ void SectorY_801983E4(Boss* boss) { SectorY_8019C194(boss, zSpeed, xSpeed); if (boss->swork[22] == 1) { - yAngle = gPlayer[0].unk_114 - 180.0f; + yAngle = gPlayer[0].yRot_114 - 180.0f; if (yAngle < 0.0f) { yAngle += 360.0f; } @@ -425,16 +425,16 @@ void SectorY_80198F5C(Boss* boss) { if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { gCsFrameCount = 0; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; - gPlayer[0].timer_1F8 = 0; - gPlayer[0].unk_1D0 = gPlayer[0].timer_1F8; - gPlayer[0].unk_0E8 += gPlayer[0].unk_114; - if (gPlayer[0].unk_0E8 > 360.0f) { - gPlayer[0].unk_0E8 -= 360.0f; + gPlayer[0].csTimer = 0; + gPlayer[0].csState = gPlayer[0].csTimer; + gPlayer[0].rot.y += gPlayer[0].yRot_114; + if (gPlayer[0].rot.y > 360.0f) { + gPlayer[0].rot.y -= 360.0f; } - if (gPlayer[0].unk_0E8 < 0.0f) { - gPlayer[0].unk_0E8 += 360.0f; + if (gPlayer[0].rot.y < 0.0f) { + gPlayer[0].rot.y += 360.0f; } - gPlayer[0].unk_114 = 0.0f; + gPlayer[0].yRot_114 = 0.0f; } AUDIO_PLAY_SFX(0x2940D09A, boss->sfxSource, 4); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 30); @@ -714,7 +714,7 @@ void SectorY_80199DAC(Boss* boss) { } else { Math_SmoothStepToF(&boss->vel.x, boss->fwork[11], 0.1f, 0.5f, 0.1f); Math_SmoothStepToF(&boss->vel.z, boss->fwork[13], 0.1f, 0.5f, 0.1f); - yAngle = gPlayer[0].unk_114 - 180.0f; + yAngle = gPlayer[0].yRot_114 - 180.0f; if (yAngle < 0.0f) { yAngle += 360.0f; } @@ -1247,13 +1247,13 @@ void SectorY_8019BC14(Boss* boss) { gPlayer[0].pos.x = boss->fwork[0x12]; gPlayer[0].pos.y = boss->fwork[0x13]; - gPlayer[0].unk_138 = gPlayer[0].pos.z = boss->fwork[0x14]; + gPlayer[0].trueZpos = gPlayer[0].pos.z = boss->fwork[0x14]; func_effect_8007F11C(OBJ_EFFECT_354, boss->fwork[1], boss->fwork[2], boss->fwork[3], 100.0f); gPlayer[0].pos.x = sp4C; gPlayer[0].pos.y = sp48; - gPlayer[0].unk_138 = gPlayer[0].pos.z = sp44; + gPlayer[0].trueZpos = gPlayer[0].pos.z = sp44; if (boss->index == 0) { AUDIO_PLAY_SFX(0x2901306E, boss->sfxSource, 4); @@ -1632,7 +1632,7 @@ void SectorY_8019C888(Boss* boss) { radarMark->pos.x = boss->obj.pos.x; radarMark->pos.y = boss->obj.pos.y; radarMark->pos.z = boss->obj.pos.z; - radarMark->unk_10 = boss->unk_078.y + 180.0f; + radarMark->yRot = boss->unk_078.y + 180.0f; } else { radarMark = &gRadarMarks[boss->index + 4]; radarMark->status = 1; @@ -1640,7 +1640,7 @@ void SectorY_8019C888(Boss* boss) { radarMark->pos.x = boss->obj.pos.x; radarMark->pos.y = boss->obj.pos.y; radarMark->pos.z = boss->obj.pos.z; - radarMark->unk_10 = boss->unk_078.y + 180.0f; + radarMark->yRot = boss->unk_078.y + 180.0f; } if (gBossFrameCount == 250) { @@ -1902,7 +1902,7 @@ void SectorY_8019E2C4(Boss* boss) { Matrix_RotateZ(gGfxMatrix, -boss->obj.rot.z * M_DTOR, MTXF_APPLY); sp98 = gPlayer[0].cam.eye.x - boss->obj.pos.x; sp94 = gPlayer[0].cam.eye.y - boss->obj.pos.y; - sp90 = gPlayer[0].cam.eye.z - (boss->obj.pos.z + D_ctx_80177D20); + sp90 = gPlayer[0].cam.eye.z - (boss->obj.pos.z + gPathProgress); sp8C = -Math_Atan2F(sp98, sp90); sp9C = sqrtf(SQ(sp90) + SQ(sp98)); sp88 = Math_Atan2F(sp94, sp9C); @@ -2003,7 +2003,7 @@ void SectorY_8019EB80(void) { } Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = (D_i6_801A69FC[i].x * 0.5f) + gPlayer[0].pos.x + RAND_FLOAT_CENTERED_SEEDED(2000.0f); actor->obj.pos.y = D_i6_801A69FC[i].y + gPlayer[0].pos.y + RAND_FLOAT_SEEDED(1000.0f); actor->obj.pos.z = D_i6_801A69FC[i].z + gPlayer[0].pos.z + RAND_FLOAT_SEEDED(1000.0f); @@ -2037,15 +2037,15 @@ void SectorY_LevelComplete(Player* player) { Boss* boss = &gBosses[0]; f32 temp_ft1; - switch (player->unk_1D0) { + switch (player->csState) { case 0: gCsFrameCount = 0; - player->unk_4D8 = 0.0f; + player->aerobaticPitch = 0.0f; player->camRoll = 0.0f; player->baseSpeed = 40.0f; player->boostSpeed = 0.0f; player->wings.unk_04 = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = - player->unk_130 = player->unk_12C = 0.0f; + player->zRotBarrelRoll = player->zRotBank = 0.0f; player->unk_234 = 1; D_ctx_80177A48[8] = Math_RadToDeg( Math_Atan2F(gPlayer[0].cam.eye.x - boss->obj.pos.x, gPlayer[0].cam.eye.z - boss->obj.pos.z)); @@ -2071,7 +2071,7 @@ void SectorY_LevelComplete(Player* player) { Object_Kill(&gActors[3].obj, gActors[3].sfxSource); Object_Kill(&gActors[4].obj, gActors[4].sfxSource); - player->unk_1D0++; + player->csState++; D_ctx_80177A48[0] = 0.05f; if (Rand_ZeroOne() > 0.5f) { @@ -2082,13 +2082,13 @@ void SectorY_LevelComplete(Player* player) { break; case 1: - Math_SmoothStepToF(&player->unk_0E4, 0, 0.1f, 5.0f, 0); + Math_SmoothStepToF(&player->rot.x, 0, 0.1f, 5.0f, 0); Math_SmoothStepToF(&player->pos.y, 400.0f, 0.05f, 3.0f, 0); temp1 = player->pos.x - boss->obj.pos.x; temp2 = player->pos.z - boss->obj.pos.z; temp_ft1 = Math_RadToDeg(Math_Atan2F(temp1, temp2)); - temp_ft1 = Math_SmoothStepToAngle(&player->unk_0E8, temp_ft1, 0.5f, 2.0f, 0.0001f) * 30.0f; - Math_SmoothStepToAngle(&player->unk_0EC, -temp_ft1, 0.1f, 5.0f, 0.0001f); + temp_ft1 = Math_SmoothStepToAngle(&player->rot.y, temp_ft1, 0.5f, 2.0f, 0.0001f) * 30.0f; + Math_SmoothStepToAngle(&player->rot.z, -temp_ft1, 0.1f, 5.0f, 0.0001f); if (gCsFrameCount < 180) { D_ctx_80177A48[8] += D_ctx_80177A48[9]; @@ -2100,8 +2100,8 @@ void SectorY_LevelComplete(Player* player) { gCsCamEyeX = boss->obj.pos.x + sp54.x; gCsCamEyeZ = boss->obj.pos.z + sp54.z; } - temp_ft1 = Math_SmoothStepToAngle(&player->unk_0E8, 283.0f, 0.1f, 3.0f, 0.0f); - Math_SmoothStepToF(&player->unk_0EC, temp_ft1 * 20.0f, 0.1f, 1.0f, 0); + temp_ft1 = Math_SmoothStepToAngle(&player->rot.y, 283.0f, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToF(&player->rot.z, temp_ft1 * 20.0f, 0.1f, 1.0f, 0); for (i = 1; i < 4; i++) { temp_ft1 = Math_SmoothStepToAngle(&gActors[i].unk_0F4.y, gActors[i].fwork[1], 0.1f, 3.0f, 0.0f); @@ -2114,26 +2114,26 @@ void SectorY_LevelComplete(Player* player) { } if (gCsFrameCount == 230) { D_ctx_80177A48[0] = 1.0f; - player->unk_1D0++; + player->csState++; Play_ClearObjectData(); Audio_StopPlayerNoise(0); Audio_KillSfxBySource(player->sfxSource); gFillScreenAlpha = 250; - player->timer_1F8 = 50; + player->csTimer = 50; player->baseSpeed = 0.0f; - player->unk_0E4 = 0.0f; - player->unk_0E8 = 0.0f; - player->unk_0EC = 0.0f; + player->rot.x = 0.0f; + player->rot.y = 0.0f; + player->rot.z = 0.0f; } break; case 2: - if (player->timer_1F8 == 0) { + if (player->csTimer == 0) { player->unk_240 = 1; player->pos.x = 0.0f; player->pos.y = 3500.0f; player->pos.z = 0.0f; - player->unk_1D0++; + player->csState++; Audio_StartPlayerNoise(0); AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); D_ctx_80177A98 = 0; @@ -2203,7 +2203,7 @@ void SectorY_LevelComplete(Player* player) { if (gCsFrameCount > 1440) { player->baseSpeed += 2.0f; - player->unk_0E4 += 0.1f; + player->rot.x += 0.1f; Math_SmoothStepToF(&D_ctx_80177A48[2], 0.0f, 1.0f, 0.001f, 0); player->unk_190 = 2.0f; } else if (D_ctx_80177A48[1] >= 92.0f) { @@ -2219,7 +2219,7 @@ void SectorY_LevelComplete(Player* player) { if (gFillScreenAlpha == 255) { Audio_FadeOutAll(10); player->state_1C8 = PLAYERSTATE_1C8_NEXT; - player->timer_1F8 = 0; + player->csTimer = 0; gFadeoutType = 4; gLeveLClearStatus[LEVEL_SECTOR_Y] = Play_CheckMedalStatus(150) + 1; } @@ -2338,8 +2338,8 @@ void SectorY_LevelComplete(Player* player) { break; } - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4) * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->xRot_120 + player->rot.x) * M_DTOR), MTXF_APPLY); sp60.x = 0.0f; sp60.y = 0.0f; sp60.z = player->baseSpeed; @@ -2350,18 +2350,18 @@ void SectorY_LevelComplete(Player* player) { player->pos.x += player->vel.x; player->pos.y += player->vel.y; player->pos.z += player->vel.z; - player->unk_138 = player->pos.z; - player->unk_0F8 = player->unk_0EC; + player->trueZpos = player->pos.z; + player->bankAngle = player->rot.z; Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0.0f); - player->unk_088 += 10.0f; - player->unk_080 = -SIN_DEG(player->unk_088) * 0.3f; - player->unk_0F4 += 8.0f; - player->unk_0F0 = SIN_DEG(player->unk_0F4); + player->bobPhase += 10.0f; + player->yBob = -SIN_DEG(player->bobPhase) * 0.3f; + player->rockPhase += 8.0f; + player->rockAngle = SIN_DEG(player->rockPhase); } void SectorY_8019FF00(Actor* actor) { @@ -2404,10 +2404,10 @@ void SectorY_8019FF00(Actor* actor) { break; case 7: - actor->unk_0F4.y = gPlayer[0].unk_0E8; - actor->unk_0F4.z = gPlayer[0].unk_0EC; + actor->unk_0F4.y = gPlayer[0].rot.y; + actor->unk_0F4.z = gPlayer[0].rot.z; Math_SmoothStepToF(&actor->obj.pos.y, 50.0f, 0.1f, 1.0f, 0.0f); - if (gPlayer[0].unk_0E8 == 0.0f) { + if (gPlayer[0].rot.y == 0.0f) { Math_SmoothStepToF(&actor->obj.pos.x, 1300.0f, 1.0f, 2.0f, 0.0f); } else { if (gCsFrameCount == 540) { @@ -2428,8 +2428,8 @@ void SectorY_8019FF00(Actor* actor) { Math_SmoothStepToF(&actor->obj.pos.x, -1000.0f, 1.0f, 20.0f, 0.0f); Math_SmoothStepToAngle(&actor->unk_0F4.z, 45.0f, 1.0f, 4.0f, 0.0f); } else { - actor->unk_0F4.y = gPlayer[0].unk_0E8; - actor->unk_0F4.z = gPlayer[0].unk_0EC; + actor->unk_0F4.y = gPlayer[0].rot.y; + actor->unk_0F4.z = gPlayer[0].rot.z; Math_SmoothStepToF(&actor->obj.pos.x, -230.0f, 1.0f, 13.0f, 0.0f); } break; @@ -2444,8 +2444,8 @@ void SectorY_8019FF00(Actor* actor) { Math_SmoothStepToF(&actor->obj.pos.x, 1500.0f, 1.0f, 20.0f, 0.0f); Math_SmoothStepToAngle(&actor->unk_0F4.z, 315.0f, 1.0f, 2.0f, 0.0f); } else { - actor->unk_0F4.y = gPlayer[0].unk_0E8; - actor->unk_0F4.z = gPlayer[0].unk_0EC; + actor->unk_0F4.y = gPlayer[0].rot.y; + actor->unk_0F4.z = gPlayer[0].rot.z; Math_SmoothStepToF(&actor->obj.pos.x, 150.0f, 1.0f, 13.0f, 0.0f); } break; @@ -2477,7 +2477,7 @@ void SectorY_801A0510(Actor* actor, s32 arg1) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = D_i6_801A6A74[arg1].x; actor->obj.pos.y = D_i6_801A6A74[arg1].y; actor->obj.pos.z = D_i6_801A6A74[arg1].z; @@ -2540,13 +2540,13 @@ void SectorY_801A06A4(Actor* actor, s32 arg1) { if (gTeamShields[1 + arg1] > 0) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = gPlayer[0].pos.x + D_i6_801A6AEC[arg1].x; actor->obj.pos.y = gPlayer[0].pos.y + D_i6_801A6AEC[arg1].y; actor->obj.pos.z = gPlayer[0].pos.z + D_i6_801A6AEC[arg1].z; actor->fwork[0] = gPlayer[0].baseSpeed; - actor->unk_0F4.y = gPlayer[0].unk_0E8; - actor->unk_0F4.z = gPlayer[0].unk_0EC; + actor->unk_0F4.y = gPlayer[0].rot.y; + actor->unk_0F4.z = gPlayer[0].rot.z; actor->state = arg1 + 7; actor->iwork[11] = 1; Object_SetInfo(&actor->info, actor->obj.id); @@ -2561,7 +2561,7 @@ void SectorY_801A07FC(Actor* actor0, Actor* actor1) { Actor_Initialize(actor1); actor1->obj.status = OBJ_ACTIVE; - actor1->obj.id = OBJ_ACTOR_195; + actor1->obj.id = OBJ_ACTOR_CUTSCENE; actor0->fwork[6] = 1.8f; sp3C.x = -40.0f; sp3C.y = 0.0f; @@ -2593,7 +2593,7 @@ void SectorY_801A07FC(Actor* actor0, Actor* actor1) { void SectorY_801A0A08(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 arg4) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_195; + actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->fwork[0] = arg4; actor->obj.pos.x = xPos; actor->obj.pos.y = yPos; @@ -2617,13 +2617,13 @@ void SectorY_801A0AC0(Player* player) { f32 sp84; f32 sp80; - switch (player->unk_1D0) { + switch (player->csState) { case 0: gCsFrameCount = 0; for (i = 0; i < 5; i++) { SectorY_801A0510(&gActors[i + 5], i); } - player->unk_1D0 = 1; + player->csState = 1; player->cam.eye.x = gCsCamEyeX = -2000.0f; player->cam.eye.y = gCsCamEyeY = 0.0f; player->cam.eye.z = gCsCamEyeZ = -1700.0f; @@ -2868,7 +2868,7 @@ void SectorY_801A0AC0(Player* player) { gFillScreenAlpha = 255; gFillScreenAlphaTarget = 0; Object_Kill(&gActors[8].obj, gActors[8].sfxSource); - player->unk_1D0++; + player->csState++; player->cam.eye.x = gCsCamEyeX = 0.0f; player->cam.eye.y = gCsCamEyeY = 0.0f; player->cam.eye.z = gCsCamEyeZ = 0.0f; @@ -3051,7 +3051,7 @@ void SectorY_801A0AC0(Player* player) { gActors[7].iwork[4] = 4; gActors[7].iwork[5] = 0; gActors[7].vel.x = -1.5f; - player->unk_1D0++; + player->csState++; break; } break; @@ -3122,16 +3122,16 @@ void SectorY_801A0AC0(Player* player) { Math_SmoothStepToAngle(&gActors[5].obj.rot.y, 30.0f, 1.0f, 0.75f, 0.0f); } - if ((gCsFrameCount > 440) && (player->unk_0E8 != 0.0f)) { + if ((gCsFrameCount > 440) && (player->rot.y != 0.0f)) { Math_SmoothStepToF(&gPlayer[0].pos.y, 0.0f, 0.1f, 5.0f, 0.0f); - Math_SmoothStepToAngle(&player->unk_0EC, - Math_SmoothStepToAngle(&player->unk_0E8, 0.0f, 1.0f, 0.7f, 0.0f) * 30.0f, 0.1f, + Math_SmoothStepToAngle(&player->rot.z, + Math_SmoothStepToAngle(&player->rot.y, 0.0f, 1.0f, 0.7f, 0.0f) * 30.0f, 0.1f, 5.0f, 0); Math_SmoothStepToF(&gPlayer[0].pos.x, 0.0f, 1.0f, 13.0f, 0.0f); } - if (player->unk_0E8 == 0.0f) { - Math_SmoothStepToAngle(&player->unk_0EC, 0.0f, 1.0f, 0.5f, 0); + if (player->rot.y == 0.0f) { + Math_SmoothStepToAngle(&player->rot.z, 0.0f, 1.0f, 0.5f, 0); Math_SmoothStepToF(&gPlayer[0].pos.x, 0.0f, 1.0f, 2.0f, 0.0f); } @@ -3207,8 +3207,8 @@ void SectorY_801A0AC0(Player* player) { player->pos.y = 300.0f; player->pos.z = 4000.0f; player->baseSpeed = 40.0f; - player->unk_0E8 = 80.0f; - player->unk_0EC = 240.0f; + player->rot.y = 80.0f; + player->rot.z = 240.0f; for (i = 0; i < 3; i++) { SectorY_801A06A4(&gActors[i], i); @@ -3272,13 +3272,13 @@ void SectorY_801A0AC0(Player* player) { gActors[7].obj.rot.y = 140.0f; gActors[5].fwork[0] = 2.8f; AUDIO_PLAY_SFX(0x2902306C, gActors[5].sfxSource, 4); - player->unk_1D0++; + player->csState++; break; } break; case 4: - Math_SmoothStepToAngle(&player->unk_0EC, 0.0f, 1.0f, 0.5f, 0); + Math_SmoothStepToAngle(&player->rot.z, 0.0f, 1.0f, 0.5f, 0); Math_SmoothStepToF(&gPlayer[0].pos.x, 0.0f, 1.0f, 1.0f, 0.0f); Math_SmoothStepToF(D_ctx_80177A48, 1.0f, 0.1f, 0.05f, 0.0f); @@ -3286,7 +3286,7 @@ void SectorY_801A0AC0(Player* player) { Math_SmoothStepToF(&gActors[5].obj.pos.z, -12000.0f, 1.0f, 100.0f, 1.0f); Math_SmoothStepToF(&gActors[5].obj.pos.x, 0.0f, 1.0f, 40.0f, 1.0f); Math_SmoothStepToF(&gActors[5].obj.pos.y, 13000.0f, 1.0f, 30.0f, 1.0f); - Math_SmoothStepToAngle(&player->unk_0E8, 0.0f, 1.0f, 0.5f, 0.0f); + Math_SmoothStepToAngle(&player->rot.y, 0.0f, 1.0f, 0.5f, 0.0f); Math_SmoothStepToF(&player->pos.x, 0.0f, 1.0f, 1.0f, 0.0f); } else { Math_SmoothStepToF(&gActors[5].obj.pos.z, -12000.0f, 1.0f, 100.0f, 1.0f); @@ -3346,20 +3346,20 @@ void SectorY_801A0AC0(Player* player) { gActors[8].obj.pos.z = -8100.0f; gActors[9].obj.pos.z = -7100.0f; D_ctx_80177A48[0] = 1.0f; - player->pos.z = player->unk_138 = 0.0f; + player->pos.z = player->trueZpos = 0.0f; player->baseSpeed = gArwingSpeed; AUDIO_PLAY_BGM(SEQ_ID_SECTOR_Y | SEQ_FLAG); gLevelStartStatusScreenTimer = 100; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; - player->unk_1D0 = 0; - player->timer_1F8 = 0; - player->timer_1FC = 0; + player->csState = 0; + player->csTimer = 0; + player->csEventTimer = 0; gCsCamEyeX = player->pos.x; gCsCamEyeY = (player->pos.y * player->unk_148) + 50.0f; gCsCamEyeZ = 400.0f; gCsCamAtX = player->pos.x; gCsCamAtY = (player->pos.y * player->unk_148) + 20.0f; - gCsCamAtZ = player->unk_138; + gCsCamAtZ = player->trueZpos; player->cam.eye.x = player->pos.x; player->cam.eye.y = player->pos.y * player->unk_148; player->cam.eye.y += 50.0f; @@ -3367,7 +3367,7 @@ void SectorY_801A0AC0(Player* player) { player->cam.at.x = player->pos.x; player->cam.at.y = player->pos.y * player->unk_148; player->cam.at.y += 20.0f; - player->cam.at.z = player->unk_138 - 41.0f; + player->cam.at.z = player->trueZpos - 41.0f; for (i = 0; i < 11; i++) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); @@ -3381,8 +3381,8 @@ void SectorY_801A0AC0(Player* player) { Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 20000.0f, 0); Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 20000.0f, 0); Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 20000.0f, 0); - Matrix_RotateY(gCalcMatrix, (player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(player->unk_0E4 * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(player->rot.x * M_DTOR), MTXF_APPLY); spA4.x = 0.0f; spA4.y = 0.0f; spA4.z = player->baseSpeed; @@ -3393,7 +3393,7 @@ void SectorY_801A0AC0(Player* player) { player->pos.x += player->vel.x; player->pos.y += player->vel.y; player->pos.z += player->vel.z; - player->unk_138 = player->pos.z + player->unk_08C; + player->trueZpos = player->pos.z + player->camDist; } void SectorY_801A39FC(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, s32 arg7) { @@ -3716,13 +3716,13 @@ void SectorY_Actor204_Update(Actor204* this) { this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_60340C0); } - if ((this->unk_0D0 != 0) && (this->unk_046 != 3)) { + if ((this->dmgType != 0) && (this->unk_046 != 3)) { - if (this->unk_0D0 == 2) { - this->unk_0D2 = 1; + if (this->dmgType == 2) { + this->dmgPart = 1; } - this->unk_0D0 = 0; - if (this->unk_0D2 == 0) { + this->dmgType = 0; + if (this->dmgPart == 0) { this->iwork[18] = 15; AUDIO_PLAY_SFX(0x29121007, this->sfxSource, 4); @@ -3815,7 +3815,7 @@ void SectorY_Actor204_Draw(Actor204* this) { gDPSetEnvColor(gMasterDisp++, 255, 48, 0, 255); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, this->fwork[16], this->fwork[17], this->fwork[18] + D_ctx_80177D20, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, this->fwork[16], this->fwork[17], this->fwork[18] + gPathProgress, MTXF_APPLY); Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); diff --git a/src/overlays/ovl_i6/fox_turret.c b/src/overlays/ovl_i6/fox_turret.c index e517ea3d..e70a9689 100644 --- a/src/overlays/ovl_i6/fox_turret.c +++ b/src/overlays/ovl_i6/fox_turret.c @@ -8,7 +8,7 @@ void Turret_801A5560(Player* player, PlayerShot* shot, f32 xOffset, f32 yOffset, PlayerShot_Initialize(shot); Matrix_RotateY(gCalcMatrix, player->unk_000 * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, player->unk_004 * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, player->unk_0EC * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, player->rot.z * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, player->unk_180 * M_DTOR, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, player->unk_17C * M_DTOR, MTXF_APPLY); sp4C.x = xOffset; @@ -17,11 +17,11 @@ void Turret_801A5560(Player* player, PlayerShot* shot, f32 xOffset, f32 yOffset, Matrix_MultVec3f(gCalcMatrix, &sp4C, &sp34); Matrix_RotateY(gCalcMatrix, player->unk_000 * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, player->unk_004 * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, player->unk_0EC * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, player->rot.z * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, player->unk_180 * M_DTOR, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, player->unk_17C * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gCalcMatrix, player->unk_0E8 * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, player->rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, player->rot.x * M_DTOR, MTXF_APPLY); sp4C.x = sp4C.y = 0.0f; sp4C.z = speed; Matrix_MultVec3f(gCalcMatrix, &sp4C, &sp40); @@ -45,11 +45,11 @@ void Turret_801A5560(Player* player, PlayerShot* shot, f32 xOffset, f32 yOffset, shot->unk_50 = player->unk_004; shot->unk_54 = player->unk_000; - shot->obj.rot.z = player->unk_0EC; + shot->obj.rot.z = player->rot.z; shot->unk_60 = 0; shot->obj.id = shotId; shot->unk_64 = 40; - shot->unk_44 = 1.5f; + shot->scale = 1.5f; shot->playerNum = player->num; } @@ -97,22 +97,22 @@ void Turret_801A58A8(Player* player) { for (i = 0; i < player->unk_1C0; i++) { if ((gActors[i].obj.status == OBJ_ACTIVE) && (gActors[i].obj.id == OBJ_ACTOR_EVENT)) { gTexturedLines[i].mode = 3; - gTexturedLines[i].unk_24 = 1.0f; + gTexturedLines[i].zScale = 1.0f; - gTexturedLines[i].unk_04.x = player->pos.x; - gTexturedLines[i].unk_04.y = player->pos.y; - gTexturedLines[i].unk_04.z = player->pos.z - 100.0f; + gTexturedLines[i].posAA.x = player->pos.x; + gTexturedLines[i].posAA.y = player->pos.y; + gTexturedLines[i].posAA.z = player->pos.z - 100.0f; gTexturedLines[i].timer = 2; - gTexturedLines[i].unk_2C = 255; - gTexturedLines[i].unk_2D = 255; - gTexturedLines[i].unk_2E = 255; - gTexturedLines[i].unk_2F = 255; + gTexturedLines[i].red = 255; + gTexturedLines[i].green = 255; + gTexturedLines[i].blue = 255; + gTexturedLines[i].alpha = 255; - gTexturedLines[i].unk_10.x = gActors[i].obj.pos.x; - gTexturedLines[i].unk_10.y = gActors[i].obj.pos.y; - gTexturedLines[i].unk_10.z = gActors[i].obj.pos.z; + gTexturedLines[i].posBB.x = gActors[i].obj.pos.x; + gTexturedLines[i].posBB.y = gActors[i].obj.pos.y; + gTexturedLines[i].posBB.z = gActors[i].obj.pos.z; } } if (gControllerHold[player->num].button & R_TRIG) { @@ -136,7 +136,7 @@ void Turret_801A5AD4(Player* player) { player->pos.z = gActors[player->unk_1B4].obj.pos.z; player->unk_000 = gActors[player->unk_1B4].obj.rot.y; player->unk_004 = gActors[player->unk_1B4].obj.rot.x; - player->unk_0EC = gActors[player->unk_1B4].obj.rot.z; + player->rot.z = gActors[player->unk_1B4].obj.rot.z; if (player->unk_1B0 < 2) { if (player->unk_1B0 == 0) { player->unk_1BC = 200; @@ -151,14 +151,14 @@ void Turret_801A5AD4(Player* player) { } sp2C = (f32) gControllerPress[player->num].stick_x; sp28 = -(f32) gControllerPress[player->num].stick_y; - Math_SmoothStepToF(&player->unk_0E8, -sp2C * 0.35000002f, 0.5f, 2.0f, 0.00001f); - Math_SmoothStepToF(&player->unk_0E4, -sp28 * 0.3f, 0.5f, 2.0f, 0.00001f); - player->unk_138 = player->pos.z; - player->unk_140 = -gActors[player->unk_1B4].vel.z; - player->unk_144 += player->unk_140; + Math_SmoothStepToF(&player->rot.y, -sp2C * 0.35000002f, 0.5f, 2.0f, 0.00001f); + Math_SmoothStepToF(&player->rot.x, -sp28 * 0.3f, 0.5f, 2.0f, 0.00001f); + player->trueZpos = player->pos.z; + player->zPathVel = -gActors[player->unk_1B4].vel.z; + player->zPath += player->zPathVel; - D_ctx_80177D08 = player->unk_140; - D_ctx_80177D20 = player->unk_144; + gPathVelZ = player->zPathVel; + gPathProgress = player->zPath; if (!(gControllerHold[player->num].button & Z_TRIG) && (sqrtf((sp2C * sp2C) + (sp28 * sp28)) > 55.0f)) { if ((gControllerHold[player->num].button & R_CBUTTONS) || (sp2C > 40.0f)) { @@ -215,9 +215,9 @@ void Turret_801A5FC0(Player* player) { sp3C.x = 0.0f; sp3C.y = 0.0f; sp3C.z = 100.0f; - Matrix_RotateY(gCalcMatrix, (player->unk_000 + (player->unk_134 * 0.3f)) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, (player->unk_004 + (player->unk_134 * 0.3f)) * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, player->unk_0EC * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->unk_000 + (player->damageShake * 0.3f)) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, (player->unk_004 + (player->damageShake * 0.3f)) * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, player->rot.z * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, player->unk_180 * M_DTOR, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, player->unk_17C * M_DTOR, MTXF_APPLY); // unclear what values are being multiplied by 0.0f @@ -226,10 +226,10 @@ void Turret_801A5FC0(Player* player) { Matrix_MultVec3f(gCalcMatrix, &sp3C, &sp30); player->cam.at.x = player->pos.x + sp30.x; player->cam.at.y = player->pos.y + sp30.y; - player->cam.at.z = player->pos.z + D_ctx_80177D20 + sp30.z; + player->cam.at.z = player->pos.z + gPathProgress + sp30.z; player->cam.eye.x = player->pos.x; player->cam.eye.y = player->pos.y; - player->cam.eye.z = player->pos.z + D_ctx_80177D20; + player->cam.eye.z = player->pos.z + gPathProgress; } void Turret_801A6164(Player* player) { @@ -245,8 +245,8 @@ void Turret_801A6164(Player* player) { Matrix_Push(&gGfxMatrix); RCP_SetupDL_36(); Matrix_Translate(gGfxMatrix, 0.0f, -100.0f, 0.0f, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, player->unk_0E8 * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, -player->unk_0E4 * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, player->rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -player->rot.x * M_DTOR, MTXF_APPLY); if (player->unk_1B0 < 2) { Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -5000.0f + (player->unk_1BC * 25), MTXF_APPLY); } else { @@ -263,15 +263,15 @@ void Turret_801A6164(Player* player) { } Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, -100.0f, -100.0f, -200.0f + player->unk_1BC, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, player->unk_0E8 * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, -player->unk_0E4 * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, player->rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -player->rot.x * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 100.0f, -100.0f, -200.0f + player->unk_1BC, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, player->unk_0E8 * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, -player->unk_0E4 * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, player->rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -player->rot.x * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); Matrix_Pop(&gGfxMatrix); @@ -280,16 +280,16 @@ void Turret_801A6164(Player* player) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 128); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, -100.0f, -100.0f, -200.0f + player->unk_1BC, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, player->unk_0E8 * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, -player->unk_0E4 * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, player->rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -player->rot.x * M_DTOR, MTXF_APPLY); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -188.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 100.0f, -100.0f, -200.0f + player->unk_1BC, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, player->unk_0E8 * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, -player->unk_0E4 * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, player->rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -player->rot.x * M_DTOR, MTXF_APPLY); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -188.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); diff --git a/src/overlays/ovl_i6/fox_ve2.c b/src/overlays/ovl_i6/fox_ve2.c index cac2d03d..2fc75bbf 100644 --- a/src/overlays/ovl_i6/fox_ve2.c +++ b/src/overlays/ovl_i6/fox_ve2.c @@ -61,8 +61,8 @@ void Venom2_UpdateEvents(Actor* this) { player->pos.x = 0.0f; player->pos.z = 16000.0f; player->pos.y = 4350.0f; - player->unk_0E4 = -20.0f; - player->unk_114 = 0.0f; + player->rot.x = -20.0f; + player->yRot_114 = 0.0f; this->timer_0BC = 210; for (team = &gActors[1], i = 1; i < 4; i++, team++) { team->obj.pos.x = D_i6_801A68B0[i - 1].x; @@ -108,7 +108,7 @@ void Venom2_UpdateEvents(Actor* this) { } player->state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; - player->unk_1D0 = 0; + player->csState = 0; gLeveLClearStatus[gCurrentLevel] = 2; D_ctx_80177C94 = gGoldRingCount[0]; D_ctx_80177C9C = player->shields + 1; @@ -226,8 +226,8 @@ void Venom2_LevelStart(Player* player) { gFillScreenAlphaStep = 3; gFillScreenAlphaTarget = 0; } - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->xRot_120 + player->rot.x + player->aerobaticPitch) * M_DTOR), MTXF_APPLY); vec.x = 0.0f; vec.y = 0.0f; vec.z = player->baseSpeed + player->boostSpeed; @@ -239,8 +239,8 @@ void Venom2_LevelStart(Player* player) { player->pos.y += player->vel.y; player->pos.z += player->vel.z; - player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; - player->unk_138 = player->pos.z; + player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; + player->trueZpos = player->pos.z; player->cam.eye.x = 50.0f; player->cam.eye.y = 1800.0f; player->cam.eye.z = 9000.0f; @@ -267,11 +267,11 @@ void Venom2_LevelComplete(Player* player) { s32 pad2; Math_SmoothStepToF(&player->boostSpeed, 0.0f, 0.1f, 1.5f, 0.0f); - Math_SmoothStepToF(&player->unk_0E8, 0.0f, 0.1f, 1.5f, 0.0f); - Math_SmoothStepToF(&player->unk_0E4, 0.0f, 0.1f, 1.5f, 0.0f); + Math_SmoothStepToF(&player->rot.y, 0.0f, 0.1f, 1.5f, 0.0f); + Math_SmoothStepToF(&player->rot.x, 0.0f, 0.1f, 1.5f, 0.0f); - var_fa0 = -player->unk_120; - temp_fv1 = player->unk_0EC; + var_fa0 = -player->xRot_120; + temp_fv1 = player->rot.z; if (var_fa0 < -90.0f) { var_fa0 = 0.0f; @@ -295,30 +295,30 @@ void Venom2_LevelComplete(Player* player) { sp90 = player->pos.y - (gBosses[0].obj.pos.y + 700.0f); sp8C = player->pos.z - gBosses[0].obj.pos.z; - switch (player->unk_1D0) { + switch (player->csState) { case 0: - player->unk_1D0++; + player->csState++; player->wings.unk_04 = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = 0.0f; player->wings.modelId = 1; D_ctx_80177A48[0] = 0.0f; D_ctx_80177A48[1] = 0.1f; D_ctx_80177A48[3] = 0.0f; D_ctx_80177A48[4] = 0.0f; - player->timer_1F8 = 0; + player->csTimer = 0; if ((fabsf(sp94) < 4000.0f) && (fabsf(sp8C) < 4000.0f)) { - player->timer_1F8 = 250; + player->csTimer = 250; sp64.x = 0.0f; sp64.y = 0.0f; sp64.z = 5000.0f; - Matrix_RotateY(gCalcMatrix, player->unk_114, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, player->yRot_114, MTXF_NEW); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp64, &sp58); D_ctx_80177A48[5] = sp58.x; D_ctx_80177A48[6] = sp58.z; } if (gLevelPhase == 2) { - player->timer_1FC = 240; + player->csEventTimer = 240; } else { - player->timer_1FC = 180; + player->csEventTimer = 180; } SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 60); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 60); @@ -330,11 +330,11 @@ void Venom2_LevelComplete(Player* player) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; } Math_SmoothStepToF(&D_ctx_80177A48[1], 0.8f, 1.0f, 0.05f, 0.0f); - Math_SmoothStepToF(&player->unk_12C, 0.0f, 0.1f, 15.0f, 0.0f); - if (player->timer_1F8 == 1) { + Math_SmoothStepToF(&player->zRotBank, 0.0f, 0.1f, 15.0f, 0.0f); + if (player->csTimer == 1) { D_ctx_80177A48[4] = 0.0f; } - if (player->timer_1F8 != 0) { + if (player->csTimer != 0) { sp94 = player->pos.x - (gBosses[0].obj.pos.x + D_ctx_80177A48[5]); sp90 = player->pos.y - (gBosses[0].obj.pos.y + 700.0f); sp8C = player->pos.z - (gBosses[0].obj.pos.z + D_ctx_80177A48[6]); @@ -342,12 +342,12 @@ void Venom2_LevelComplete(Player* player) { sp84 = Math_RadToDeg(Math_Atan2F(sp94, sp8C)); sp8C = sqrtf(SQ(sp94) + SQ(sp8C)); pad88 = Math_RadToDeg(-Math_Atan2F(sp90, sp8C)); - Math_SmoothStepToAngle(&player->unk_120, pad88, 0.1f, D_ctx_80177A48[4], 0.0f); - pad80 = Math_SmoothStepToAngle(&player->unk_114, sp84, 0.1f, D_ctx_80177A48[4], 0.0f) * 20.0f; - Math_SmoothStepToF(&player->unk_0EC, pad80, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToAngle(&player->xRot_120, pad88, 0.1f, D_ctx_80177A48[4], 0.0f); + pad80 = Math_SmoothStepToAngle(&player->yRot_114, sp84, 0.1f, D_ctx_80177A48[4], 0.0f) * 20.0f; + Math_SmoothStepToF(&player->rot.z, pad80, 0.1f, 3.0f, 0.0f); Math_SmoothStepToF(&D_ctx_80177A48[4], 3.0f, 1.0f, 0.1f, 0.0f); Matrix_RotateX(gCalcMatrix, -(D_PI / 9), MTXF_NEW); - Matrix_RotateY(gCalcMatrix, (D_ctx_80177A48[3] + player->unk_114) * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (D_ctx_80177A48[3] + player->yRot_114) * M_DTOR, MTXF_APPLY); D_ctx_80177A48[3] += 1.0f; sp64.x = 0.0f; sp64.y = 0.0f; @@ -358,14 +358,14 @@ void Venom2_LevelComplete(Player* player) { gCsCamEyeZ = player->pos.z + sp58.z; Math_SmoothStepToF(D_ctx_80177A48, 0.5f, 1.0f, 0.01f, 0.0f); Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f); - if ((player->timer_1F8 == 0) && (fabsf(sp94) < 50.0f) && (fabsf(sp8C) < 50.0f)) { - player->unk_1D0++; + if ((player->csTimer == 0) && (fabsf(sp94) < 50.0f) && (fabsf(sp8C) < 50.0f)) { + player->csState++; D_ctx_80177A48[2] = 0.75f; D_ctx_80177A48[3] = 0.0f; D_ctx_80177A48[4] = 0.0f; - if (player->unk_120 >= 180.0f) { - player->unk_120 -= 360.0f; + if (player->xRot_120 >= 180.0f) { + player->xRot_120 -= 360.0f; } AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); player->unk_194 = 5.0f; @@ -376,17 +376,17 @@ void Venom2_LevelComplete(Player* player) { break; case 2: player->unk_190 = 2.0f; - Math_SmoothStepToF(&player->unk_120, 270.0f, 0.1f, D_ctx_80177A48[2], 0.0f); + Math_SmoothStepToF(&player->xRot_120, 270.0f, 0.1f, D_ctx_80177A48[2], 0.0f); Math_SmoothStepToF(&D_ctx_80177A48[2], 4.0f, 1.0f, 0.05f, 0.0f); - if (player->unk_120 > 80.0f) { - Math_SmoothStepToF(&player->unk_12C, 10000.0f, 0.1f, 8.0f, 0.0f); + if (player->xRot_120 > 80.0f) { + Math_SmoothStepToF(&player->zRotBank, 10000.0f, 0.1f, 8.0f, 0.0f); } - if (player->unk_120 > 250.0f) { + if (player->xRot_120 > 250.0f) { Math_SmoothStepToF(&player->pos.x, 0.0f, 0.3f, D_ctx_80177A48[3], 0.0f); Math_SmoothStepToF(&player->pos.z, 0.0f, 0.3f, D_ctx_80177A48[3], 0.0f); Math_SmoothStepToF(&D_ctx_80177A48[3], 30.0f, 1.0f, 1.0f, 0.0f); } - if (player->unk_120 > 200.0f) { + if (player->xRot_120 > 200.0f) { Math_SmoothStepToF(&D_ctx_80177A48[4], 20.0f, 1.0f, 1.0f, 0.0f); Math_SmoothStepToF(&gCsCamEyeX, player->pos.x, 0.1f, D_ctx_80177A48[4], 0.0f); Math_SmoothStepToF(&gCsCamEyeY, player->pos.y + 200.0f, 0.1f, D_ctx_80177A48[4], 0.0f); @@ -430,11 +430,11 @@ void Venom2_LevelComplete(Player* player) { } break; } - if (player->timer_1FC == 150) { + if (player->csEventTimer == 150) { Radio_PlayMessage(gMsg_ID_8215, RCID_FOX); AUDIO_PLAY_BGM(SEQ_ID_TO_ANDROSS | SEQ_FLAG); } - if (player->timer_1FC == 1) { + if (player->csEventTimer == 1) { if ((gTeamShields[TEAM_ID_SLIPPY] > 0) || (gTeamShields[TEAM_ID_FALCO] > 0) || (gTeamShields[TEAM_ID_PEPPY] > 0)) { Radio_PlayMessage(gMsg_ID_8230, RCID_FALCO); @@ -446,9 +446,9 @@ void Venom2_LevelComplete(Player* player) { } gCsCamAtX = player->pos.x; gCsCamAtY = player->pos.y; - gCsCamAtZ = player->unk_138; - Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); + gCsCamAtZ = player->trueZpos; + Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -((player->xRot_120 + player->rot.x + player->aerobaticPitch) * M_DTOR), MTXF_APPLY); sp64.x = 0.0f; sp64.y = 0.0f; sp64.z = player->baseSpeed + player->boostSpeed; @@ -459,18 +459,18 @@ void Venom2_LevelComplete(Player* player) { player->pos.x += player->vel.x; player->pos.y += player->vel.y; player->pos.z += player->vel.z; - player->unk_138 = player->pos.z; - player->unk_0F8 = player->unk_0EC + player->unk_12C + player->unk_130; - Math_SmoothStepToF(&player->unk_130, 0.0f, 0.1f, 15.0f, 0.0f); - Math_SmoothStepToAngle(&player->unk_4D8, 0.0f, 0.1f, 5.0f, 0.0f); + player->trueZpos = player->pos.z; + player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; + Math_SmoothStepToF(&player->zRotBarrelRoll, 0.0f, 0.1f, 15.0f, 0.0f); + Math_SmoothStepToAngle(&player->aerobaticPitch, 0.0f, 0.1f, 5.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 100.0f, 0); Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 100.0f, 0); Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 100.0f, 0); Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[1], 100.0f, 0); Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[1], 100.0f, 0); Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[1], 100.0f, 0); - player->unk_088 += 10.0f; - player->unk_080 = -SIN_DEG(player->unk_088) * 0.3f; - player->unk_0F4 += 8.0f; - player->unk_0F0 = SIN_DEG(player->unk_0F4); + player->bobPhase += 10.0f; + player->yBob = -SIN_DEG(player->bobPhase) * 0.3f; + player->rockPhase += 8.0f; + player->rockAngle = SIN_DEG(player->rockPhase); } diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index 35c81a42..86951da7 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -1340,7 +1340,7 @@ void Map_8019E99C(void) { gFillScreenRed = 0; gFillScreenGreen = 0; gFillScreenBlue = 0; - D_ctx_80177D20 = 0.0f; + gPathProgress = 0.0f; D_menu_801CF018 = 0; @@ -1588,7 +1588,7 @@ void Map_8019F600(void) { //! @bug gPlanetPathStatus is 2 shorter than sPaths for (i = 0; i < ARRAY_COUNT(sPaths); i++) { gPlanetPathStatus[i] = 0; - gTexturedLines[i].unk_24 = 0.0f; + gTexturedLines[i].zScale = 0.0f; } for (i = 0; i < ARRAY_COUNT(gMissionMedal); i++) { @@ -1639,7 +1639,7 @@ void Map_8019F83C(void) { } sPaths[i].alpha = 0; - gTexturedLines[i].unk_24 = 0.0f; + gTexturedLines[i].zScale = 0.0f; } } @@ -4282,7 +4282,7 @@ void Map_801A6628(void) { Play_Setup(); gSavedObjectLoadIndex = 0; - D_ctx_80177CB0 = 0.0f; + gSavedPathProgress = 0.0f; D_ctx_8017782C = 1; } @@ -6113,9 +6113,9 @@ void Map_801AC200(s32 index) { f32 r2; Vec3f vec; - v.x = gTexturedLines[index].unk_10.x - gTexturedLines[index].unk_04.x; - v.y = gTexturedLines[index].unk_10.y - gTexturedLines[index].unk_04.y; - v.z = gTexturedLines[index].unk_10.z - gTexturedLines[index].unk_04.z; + v.x = gTexturedLines[index].posBB.x - gTexturedLines[index].posAA.x; + v.y = gTexturedLines[index].posBB.y - gTexturedLines[index].posAA.y; + v.z = gTexturedLines[index].posBB.z - gTexturedLines[index].posAA.z; r = VEC3F_MAG(&v); @@ -6128,9 +6128,9 @@ void Map_801AC200(s32 index) { vec.y = (v.y / r) * (r / (sPaths[index].length - 1)); vec.z = (v.z / r) * (r / (sPaths[index].length - 1)); - D_menu_801CEEB0.x = gTexturedLines[index].unk_04.x + (vec.x * D_menu_801CEEA0); - D_menu_801CEEB0.y = gTexturedLines[index].unk_04.y + (vec.y * D_menu_801CEEA0); - D_menu_801CEEB0.z = gTexturedLines[index].unk_04.z + (vec.z * D_menu_801CEEA0); + D_menu_801CEEB0.x = gTexturedLines[index].posAA.x + (vec.x * D_menu_801CEEA0); + D_menu_801CEEB0.y = gTexturedLines[index].posAA.y + (vec.y * D_menu_801CEEA0); + D_menu_801CEEB0.z = gTexturedLines[index].posAA.z + (vec.z * D_menu_801CEEA0); switch (D_menu_801CEEA4) { case 0: @@ -6167,17 +6167,17 @@ void Map_801AC200(s32 index) { return; } } else { - vec.x = (v.x / r) * gTexturedLines[index].unk_24; - vec.y = (v.y / r) * gTexturedLines[index].unk_24; - vec.z = (v.z / r) * gTexturedLines[index].unk_24; + vec.x = (v.x / r) * gTexturedLines[index].zScale; + vec.y = (v.y / r) * gTexturedLines[index].zScale; + vec.z = (v.z / r) * gTexturedLines[index].zScale; - D_menu_801CEEB0.x = gTexturedLines[index].unk_04.x + vec.x; - D_menu_801CEEB0.y = gTexturedLines[index].unk_04.y + vec.y; - D_menu_801CEEB0.z = gTexturedLines[index].unk_04.z + vec.z; + D_menu_801CEEB0.x = gTexturedLines[index].posAA.x + vec.x; + D_menu_801CEEB0.y = gTexturedLines[index].posAA.y + vec.y; + D_menu_801CEEB0.z = gTexturedLines[index].posAA.z + vec.z; - v.x = D_menu_801CEEB0.x - gTexturedLines[index].unk_04.x; - v.y = D_menu_801CEEB0.y - gTexturedLines[index].unk_04.y; - v.z = D_menu_801CEEB0.z - gTexturedLines[index].unk_04.z; + v.x = D_menu_801CEEB0.x - gTexturedLines[index].posAA.x; + v.y = D_menu_801CEEB0.y - gTexturedLines[index].posAA.y; + v.z = D_menu_801CEEB0.z - gTexturedLines[index].posAA.z; r2 = VEC3F_MAG(&v); if (((r / 9.0f) * 8.0f) < r2) { @@ -6222,9 +6222,9 @@ void Map_801AC530(s32 index) { Matrix_Translate(gGfxMatrix, D_menu_801CEEB0.x, D_menu_801CEEB0.y, D_menu_801CEEB0.z, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, gTexturedLines[index].unk_20, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, gTexturedLines[index].yRot, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_DTOR * -90.0f, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, gTexturedLines[index].unk_1C, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, gTexturedLines[index].xRot, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.8f, 0.8f, 0.8f, MTXF_APPLY); @@ -6346,16 +6346,16 @@ void Map_801AC9A0(s32 index) { gTexturedLines[index].mode = 4; - gTexturedLines[index].unk_04.x = srcPos.x; - gTexturedLines[index].unk_04.y = srcPos.y; - gTexturedLines[index].unk_04.z = srcPos.z; + gTexturedLines[index].posAA.x = srcPos.x; + gTexturedLines[index].posAA.y = srcPos.y; + gTexturedLines[index].posAA.z = srcPos.z; - gTexturedLines[index].unk_10.x = destPos.x; - gTexturedLines[index].unk_10.y = destPos.y; - gTexturedLines[index].unk_10.z = destPos.z; + gTexturedLines[index].posBB.x = destPos.x; + gTexturedLines[index].posBB.y = destPos.y; + gTexturedLines[index].posBB.z = destPos.z; - gTexturedLines[index].unk_20 = Math_Atan2F(x, z); - gTexturedLines[index].unk_1C = -Math_Atan2F(y, sqrtf(SQ(x) + SQ(z))); + gTexturedLines[index].yRot = Math_Atan2F(x, z); + gTexturedLines[index].xRot = -Math_Atan2F(y, sqrtf(SQ(x) + SQ(z))); switch (gPlanetPathStatus[index]) { case 1: @@ -6364,9 +6364,9 @@ void Map_801AC9A0(s32 index) { break; case 11: - Math_SmoothStepToF(&gTexturedLines[index].unk_24, target, 0.1f, 100.0f, 4.0f); - gTexturedLines[index].unk_2F = 255; - if (gTexturedLines[index].unk_24 == target) { + Math_SmoothStepToF(&gTexturedLines[index].zScale, target, 0.1f, 100.0f, 4.0f); + gTexturedLines[index].alpha = 255; + if (gTexturedLines[index].zScale == target) { Audio_KillSfxById(0x1900404D); gPlanetPathStatus[index] = 4; } @@ -6374,9 +6374,9 @@ void Map_801AC9A0(s32 index) { case 5: case 6: - Math_SmoothStepToF(&gTexturedLines[index].unk_24, target, 0.1f, 100.0f, 1.0f); - if (gTexturedLines[index].unk_24 == target) { - gTexturedLines[index].unk_24 = 0.0f; + Math_SmoothStepToF(&gTexturedLines[index].zScale, target, 0.1f, 100.0f, 1.0f); + if (gTexturedLines[index].zScale == target) { + gTexturedLines[index].zScale = 0.0f; gPlanetPathStatus[index] = 6; D_menu_801CEEAC = 255; } @@ -6387,55 +6387,55 @@ void Map_801AC9A0(s32 index) { if (D_menu_801CD944 == 7) { temp = 0.25f; } - Math_SmoothStepToF(&gTexturedLines[index].unk_24, target, temp, 100.0f, 4.0f); - gTexturedLines[index].unk_2F = 255; - if (gTexturedLines[index].unk_24 == target) { + Math_SmoothStepToF(&gTexturedLines[index].zScale, target, temp, 100.0f, 4.0f); + gTexturedLines[index].alpha = 255; + if (gTexturedLines[index].zScale == target) { gPlanetPathStatus[index] = 3; } break; case 3: case 4: - gTexturedLines[index].unk_24 = target; - gTexturedLines[index].unk_2F = sPaths[index].alpha; + gTexturedLines[index].zScale = target; + gTexturedLines[index].alpha = sPaths[index].alpha; break; } if ((gPlanetPathStatus[index] == 1) || (gPlanetPathStatus[index] == 11) || (gPlanetPathStatus[index] == 4)) { - gTexturedLines[index].unk_2C = 32; - gTexturedLines[index].unk_2D = 32; - gTexturedLines[index].unk_2E = 32; - gTexturedLines[index].unk_28 = 4.0f; + gTexturedLines[index].red = 32; + gTexturedLines[index].green = 32; + gTexturedLines[index].blue = 32; + gTexturedLines[index].xyScale = 4.0f; } else { switch (sPaths[index].type) { case PL_PATH_BLU: - gTexturedLines[index].unk_2C = 16; - gTexturedLines[index].unk_2D = 64; - gTexturedLines[index].unk_2E = 255; - gTexturedLines[index].unk_28 = 8.0f; + gTexturedLines[index].red = 16; + gTexturedLines[index].green = 64; + gTexturedLines[index].blue = 255; + gTexturedLines[index].xyScale = 8.0f; break; case PL_PATH_YLW: - gTexturedLines[index].unk_2C = 255; - gTexturedLines[index].unk_2D = 175; - gTexturedLines[index].unk_2E = 0; - gTexturedLines[index].unk_28 = 8.0f; + gTexturedLines[index].red = 255; + gTexturedLines[index].green = 175; + gTexturedLines[index].blue = 0; + gTexturedLines[index].xyScale = 8.0f; break; case PL_PATH_RED: - gTexturedLines[index].unk_2C = 255; - gTexturedLines[index].unk_2D = 0; - gTexturedLines[index].unk_2E = 0; - gTexturedLines[index].unk_28 = 8.0f; + gTexturedLines[index].red = 255; + gTexturedLines[index].green = 0; + gTexturedLines[index].blue = 0; + gTexturedLines[index].xyScale = 8.0f; break; case PL_WARP_YLW: case PL_WARP_RED: - gTexturedLines[index].unk_2C = 0; - gTexturedLines[index].unk_2D = 0; - gTexturedLines[index].unk_2E = 0; - gTexturedLines[index].unk_2F = 0; - gTexturedLines[index].unk_28 = 0.1f; + gTexturedLines[index].red = 0; + gTexturedLines[index].green = 0; + gTexturedLines[index].blue = 0; + gTexturedLines[index].alpha = 0; + gTexturedLines[index].xyScale = 0.1f; break; } } diff --git a/src/overlays/ovl_menu/fox_option.c b/src/overlays/ovl_menu/fox_option.c index 9bbc8ea3..4086b924 100644 --- a/src/overlays/ovl_menu/fox_option.c +++ b/src/overlays/ovl_menu/fox_option.c @@ -804,7 +804,7 @@ void Option_TrainingUpdate(void) { gDrawMode = DRAW_NONE; Play_Setup(); gSavedObjectLoadIndex = 0; - D_ctx_80177CB0 = 0.0f; + gSavedPathProgress = 0.0f; D_ctx_8017782C = 1; gControllerLock = 3; AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_28); From 77060ba506ffde7ab82b6816f0d061a8b57f7873 Mon Sep 17 00:00:00 2001 From: petrie911 <69443847+petrie911@users.noreply.github.com> Date: Fri, 3 May 2024 14:56:26 -0500 Subject: [PATCH 056/151] Start on sfx IDs (#227) * sfx stuff * sfxIds --- include/functions.h | 6 +- include/macros.h | 2 + include/mods.h | 6 + include/sf64audio_external.h | 1 + include/sf64audio_provisional.h | 36 +-- include/sfx.h | 165 ++++++++++++++ sfxIds.txt | 312 ++++++++++++++------------ sfxStrings.txt | 351 ++++++++++++++++++++++++++++++ src/audio/audio_general.c | 116 +++++----- src/audio/audio_heap.c | 2 +- src/audio/audio_playback.c | 2 +- src/audio/audio_seqplayer.c | 2 +- src/engine/fox_360.c | 4 +- src/engine/fox_beam.c | 2 +- src/engine/fox_context.c | 2 +- src/engine/fox_display.c | 4 +- src/engine/fox_enmy2.c | 2 +- src/engine/fox_game.c | 2 +- src/engine/fox_hud.c | 18 +- src/engine/fox_play.c | 4 +- src/engine/fox_tank.c | 6 +- src/engine/fox_versus.c | 49 ++--- src/mods/sfxjukebox2.c | 17 +- src/overlays/ovl_i2/fox_me.c | 8 +- src/overlays/ovl_i3/fox_aq.c | 4 +- src/overlays/ovl_i3/fox_zo.c | 45 +--- src/overlays/ovl_i4/fox_fo.c | 2 +- src/overlays/ovl_i5/fox_ti.c | 6 +- src/overlays/ovl_i6/fox_andross.c | 3 +- src/overlays/ovl_menu/fox_map.c | 4 +- src/sys/sys_fault.c | 3 +- 31 files changed, 845 insertions(+), 341 deletions(-) create mode 100644 include/sfx.h create mode 100644 sfxStrings.txt diff --git a/include/functions.h b/include/functions.h index 41deb1c3..e9ae1323 100644 --- a/include/functions.h +++ b/include/functions.h @@ -9,7 +9,7 @@ // fox_360 void AllRange_FortunaIntro(Player*); void AllRange_GetStarWolfHits(Actor*); -void AllRange_UpdateCountdown(void); +void AllRange_DrawCountdown(void); void Boss309_Update(Boss*); void Boss309_Draw(Boss*); void Boss310_Update(Boss*); @@ -395,7 +395,7 @@ void func_hud_8008B5B0(f32 x, f32 y); s32 func_hud_8008B774(void); void func_hud_8008BD00(u8*, s32, s32, u8); void func_hud_8008C104(u16*, u16*); -void func_hud_8008C390(f32, f32, f32, s32); +void HUD_DisplaySmallNumber(f32, f32, f32, s32); void func_hud_8008C5C8(f32, f32, f32, s32); void func_hud_8008C6F4(s32, s32); s32 func_hud_8008BCBC(s32); @@ -403,7 +403,7 @@ void HUD_DrawEdgeArrows(void); s32 HUD_dummy_8008CB8C(void); void func_hud_8008D0DC(f32, f32, f32, f32, f32); void HUD_DrawBossHealth(void); -void func_hud_8008E51C(s32* , f32); +void HUD_DrawCountdown(s32* , f32); void func_hud_8008E9EC(f32, f32); void func_hud_8008EA14(f32, f32); void HUD_Draw(void); diff --git a/include/macros.h b/include/macros.h index 30a1ae1e..6c04ee09 100644 --- a/include/macros.h +++ b/include/macros.h @@ -44,6 +44,8 @@ #define CYCLES_TO_USEC(c) (((u64)(c)*(1000000LL/15625LL))/(osClockRate/15625LL)) #define CYCLES_TO_MSEC(c) ((s32)CYCLES_TO_USEC(c)/1000) +#define UNPACK_BYTE(data, bytenum) (((data) & (0xFF << ((bytenum) * 8))) >> ((bytenum) * 8)) + /* * Macros for libultra */ diff --git a/include/mods.h b/include/mods.h index 9419d8e4..de7e03da 100644 --- a/include/mods.h +++ b/include/mods.h @@ -17,6 +17,12 @@ */ #define MODS_SFX_JUKEBOX 0 +/** + * Auto debugger: + * Crash debugger appears without needing to enter code. +*/ +#define MODS_AUTO_DEBUGGER 0 + /** * FPS Counter: * Press L to toggle FPS Display diff --git a/include/sf64audio_external.h b/include/sf64audio_external.h index 9d9bd265..a3be1105 100644 --- a/include/sf64audio_external.h +++ b/include/sf64audio_external.h @@ -3,6 +3,7 @@ #include "sys.h" #include "audioseq_cmd.h" +#include "sfx.h" #define AUDIO_PLAY_SFX(sfxId, srcPos, token) (Audio_PlaySfx((sfxId),(srcPos),(token),&gDefaultMod,&gDefaultMod,&gDefaultReverb)) #define AUDIO_PLAY_BGM(seqId) Audio_PlaySequence(SEQ_PLAYER_BGM, (seqId), 0, -1) diff --git a/include/sf64audio_provisional.h b/include/sf64audio_provisional.h index 9abfc390..512c07c0 100644 --- a/include/sf64audio_provisional.h +++ b/include/sf64audio_provisional.h @@ -123,9 +123,9 @@ typedef enum { } AudioLoadStatus; typedef enum AudioResetStatus { - AUDIORESET_READY, - AUDIORESET_WAIT, - AUDIORESET_BLOCK, + /* 0 */ AUDIORESET_READY, + /* 1 */ AUDIORESET_WAIT, + /* 2 */ AUDIORESET_BLOCK, } AudioResetStatus; typedef s32 (*DmaHandler)(OSPiHandle* handle, OSIoMesg* mb, s32 direction); @@ -990,36 +990,6 @@ typedef struct { #define SEQ_BYTE3(seqId) (((seqId) & (0xFF << 8)) >>8 & 0xFF) #define SEQ_BYTE2(seqId) (((seqId) & (0xFF << 16)) >>13 & 0xFFFF) -#define SFX_BANK_MASK(sfxId) ((sfxId) & (0xF << 28)) -#define SFX_STATE_MASK(sfxId) ((sfxId) & (1 << 24)) -#define SFX_RANGE_MASK(sfxId) ((sfxId) & (3 << 16)) -#define SFX_IMPORTANCE_MASK(sfxId) ((sfxId) & (0xFF << 8)) - -#define SFX_BANK_SHIFT(sfxId) (((sfxId) >> 28) & 0xFF) -#define SFX_STATE_SHIFT(sfxId) (((sfxId) >> 24)) -#define SFX_RANGE_SHIFT(sfxId) (((sfxId) >> 16) & 0xFF) -#define SFX_IMPORTANCE_SHIFT(sfxId) (((sfxId) >> 8) & 0xFF) - -#define SFX_BANK(sfxId) SFX_BANK_SHIFT(SFX_BANK_MASK(sfxId)) -#define SFX_STATE(sfxId) SFX_STATE_SHIFT(SFX_STATE_MASK(sfxId)) -#define SFX_BIT04(sfxId) ((sfxId) & (1 << 27)) -#define SFX_BIT05(sfxId) ((sfxId) & (1 << 26)) -#define SFX_BIT06(sfxId) ((sfxId) & (1 << 25)) -#define SFX_BIT08(sfxId) ((sfxId) & (1 << 23)) // adds random variance to freqMod -#define SFX_BIT09(sfxId) ((sfxId) & (1 << 22)) // turns off distance-dependent frequency increase -#define SFX_BIT10(sfxId) ((sfxId) & (1 << 21)) // makes reverb increase with distance -#define SFX_BIT11(sfxId) ((sfxId) & (1 << 20)) // makes priority independent of distance -#define SFX_BIT12(sfxId) ((sfxId) & (1 << 19)) -#define SFX_BIT13(sfxId) ((sfxId) & (1 << 18)) // makes distance ignore z position? probably more -#define SFX_RANGE(sfxId) SFX_RANGE_SHIFT(SFX_RANGE_MASK(sfxId)) -#define SFX_IMPORTANCE(sfxId) SFX_IMPORTANCE_SHIFT(SFX_IMPORTANCE_MASK(sfxId)) -#define SFX_INDEX(sfxId) ((sfxId) & 0xFF) - -#define SFX_PACK(bank, range, importance, index, state, bit4, bit5, bit6, bit8, bit9, bit10, bit11, bit12, bit13) \ - (((bank)<<28)|((range)<<16)|((importance)<<8)|(index)|((state)<<24)|\ - ((bit4)<<27)|((bit5)<<23)|((bit6)<<23)|((bit8)<<23)|((bit9)<<22)|\ - ((bit10)<<21)|((bit11)<<20)|((bit12)<<19)|((bit13)<<18)) - // audio_synthesis void func_80008780(f32 *, s32, f32 *); Acmd* func_80009B64(Acmd* aList, s32* cmdCount, s16* aiBufStart, s32 aiBufLen); diff --git a/include/sfx.h b/include/sfx.h new file mode 100644 index 00000000..1fdee05e --- /dev/null +++ b/include/sfx.h @@ -0,0 +1,165 @@ +#ifndef SFX_H +#define SFX_H + +#define SFX_FLAG_18 (1 << 18) // makes distance ignore z position? probably more +#define SFX_FLAG_19 (1 << 19) +#define SFX_FLAG_20 (1 << 20) // make priority ignore distance +#define SFX_FLAG_21 (1 << 21) // make reverb ignore distance +#define SFX_FLAG_22 (1 << 22) // make volume ignore distance +#define SFX_FLAG_23 (1 << 23) // make noisy + +#define SFX_FLAG_27 (1 << 27) // allow duplicate requests + +#define SFX_BANK_SHIFT 28 +#define SFX_STATE_SHIFT 24 +#define SFX_RANGE_SHIFT 16 +#define SFX_IMPORT_SHIFT 8 + +#define SFX_BANK_MASK (0xF << SFX_BANK_SHIFT) +#define SFX_STATE_FLAG (1 << SFX_STATE_SHIFT) +#define SFX_RANGE_MASK (3 << SFX_RANGE_SHIFT) +#define SFX_IMPORT_MASK (0xFF << SFX_IMPORT_SHIFT) + +#define SFX_BANK(sfxId) ((((sfxId) & SFX_BANK_MASK) >> SFX_BANK_SHIFT) & 0xFF) +#define SFX_BANK_ALT(sfxId) (((sfxId) >> SFX_BANK_SHIFT) & 0xFF) +#define SFX_STATE(sfxId) (((sfxId) & SFX_STATE_FLAG) >> SFX_STATE_SHIFT) +#define SFX_RANGE(sfxId) ((((sfxId) & SFX_RANGE_MASK) >> SFX_RANGE_SHIFT) & 0xFF) +#define SFX_IMPORT(sfxId) ((((sfxId) & SFX_IMPORT_MASK) >> SFX_IMPORT_SHIFT) & 0xFF) +#define SFX_INDEX(sfxId) ((sfxId) & 0xFF) + +#define SFX_PACK(bank, index, range, importance, flags) \ + ((((bank)< call alert +#define NA_SE_MAP_WINDOW_OPEN 0x49000019 // Also crosshairs on +#define NA_SE_MAP_WINDOW_CLOSE 0x4900101A // Also crosshairs off +#define NA_SE_MAR_LOCKON 0x4900001B +#define NA_SE_MISSILE_ALARM 0x4900001C +#define NA_SE_CANCEL 0x4900101D +#define NA_SE_COMPUTER_NOISE 0x4100001E // Used in mission briefing +#define NA_SE_MAP_MOVE_STOP 0x4900001F +#define NA_SE_ARWING_DECIDE 0x49000020 // Used in main menu +#define NA_SE_ARWING_CANCEL 0x49000021 // Used in main menu +#define NA_SE_ARWING_CURSOR 0x49000022 // Used in main menu +#define NA_SE_OVERHEAT_ALARM 0x4100C023 +#define NA_SE_ONE_UP 0x4900C024 +#define NA_SE_RING_PASS 0x49008025 // Also used for Corneria mech boss secret 1UP +#define NA_SE_SHIELD_BUZZER 0x49001026 +#define NA_SE_LOCK_ON 0x49008027 +#define NA_SE_BOSS_GAUGE_OPEN 0x4900C028 +#define NA_SE_UNK_1 0x40000029 // Unreferenced. Sounds like an item collect jingle +#define NA_SE_COUNTDOWN 0x4900C02A +#define NA_SE_VIEW_SITCHW_ON 0x4000002B // Unreferenced. Related to D_ctx_80177C70? +#define NA_SE_VIEW_MOVE_IN 0x4900002C +#define NA_SE_VIEW_MOVE_OUT 0x4900002D +#define NA_SE_SEARCHLIGHT_MISS 0x4900402E +#define NA_SE_RING_MISS 0x4900402F +#define NA_SE_GET_EMBLEM 0x49008030 +#define NA_SE_MISSION_ACCOMPLISHED 0x49008031 +#define NA_SE_VO_PEPPER_CONSENT 0x49000032 // This is ONE steep bill, but it's worth it. +#define NA_SE_VO_PEPPER_SURPRISE 0x49000033 // WHAT?! +#define NA_SE_MISSION_COMPLETE 0x49008034 +#define NA_SE_UNK_2 0x40000035 // Unreferenced. Hard to make out what it is +#define NA_SE_TIME_OVER 0x4900D036 + +#endif + + diff --git a/sfxIds.txt b/sfxIds.txt index 72e06a68..cedc0b77 100644 --- a/sfxIds.txt +++ b/sfxIds.txt @@ -6,7 +6,7 @@ 0x09000003 brake 0x09000004 sector X boss hitting slippy 0x0903F004 player death -0x0100F005 arwing engine noise +0x0100F005 arwing planet engine noise 0x0100F006 landmaster engine noise 0x09000007 wings changing position 0x01008008 iniial bomb flight. only plays for 1 frame @@ -27,43 +27,49 @@ 0x09008015 landmaster falls on ground 0x01008016 landmaster hover 0x09000017 blue marine barrel roll -0x0140001C -0x0100001D -0x0100001E -0x0100001F -0x0100F020 -0x09400021 +0x0?????18 footstep. comparisons are relative to this +0x0?????19 heavier footstep +0x0?????1A lighter footstep +0x0?????1B lightest footstep +0x0140001C running footsteps in title +0x0100001D something mechanical starting to move, used in title +0x0100001E engines powering up +0x0100001F Beam sounds from sound test +0x0100F020 arwing space engine noise +0x09400021 blue marine single laser 0x0100F022 blue marine engine noise -0x09008023 -0x01004024 -0x01000025 -0x01038026 -0x09400027 -0x09404028 -0x09007029 -0x0900802A -0x0940802A -0x0940802B hyper laser -0x0900A02C -0x0900302D -0x0903502E -0x0900402F -0x09004030 -0x09004031 -0x09000032 +0x09008023 wings repaired +0x01004024 landmaster single jet +0x01000025 torpedo shot +0x01038026 blue marine launch +0x09400027 blue marine twin laser (and hyper?) +0x09404028 blue marine hit ground +0x09007029 charge shot fire +0x0900802A warp zone map path +0x0940802A warp zone enter +0x0940802B arwing hyper laser +0x0900A02C wing break +0x0900302D charge shot charge +0x0903502E charge shot explode +0x0900402F landmaster boost +0x09004030 blue marine boost +0x09004031 blue marine brake +0x09000032 normal map path -0x11000000 -0x19000001 -0x19030003 -0x19031003 -0x19130003 -0x19030004 -0x19122005 -0x19020006 -0x19030006 -0x19400007 -0x19020008 -0x19033008 +0x11000000 CO waterfall noise +0x19000001 whoosh +0x1?????02 clang sound, ligher than 3 +0x19030003 various falling pillars hitting ground +0x19031003 various falling pillars hitting ground +0x19130003 various falling pillars hitting ground +0x19030004 corneria mech boss hitting ground +0x19122005 EVSFX_5. venom event actors. spawning pillars/fingers? +0x19020006 titania rocks +0x19030006 macbeth rocks +0x19400007 aquas rocks +0x19020008 titania hopping bombs +0x19033008 macbeth switches +0x1?????09 0x1100000A 0x1100000B 0x1100000C @@ -81,6 +87,7 @@ 0x11030016 0x11404016 0x19800017 +0x1?????18 0x19832019 0x1983201A 0x1900001B @@ -132,9 +139,11 @@ 0x19401048 0x11032049 0x1913204A +0x1?????4B 0x1100004C 0x1100204C 0x1900404D +0x1?????4E 0x1900404F 0x11002050 0x19004051 @@ -193,18 +202,32 @@ 0x11020084 0x29000000 +0x5?????01 0x29002002 0x29024003 0x29034003 +0x5?????04 +0x31004005 +0x31004006 0x29121007 0x2903A008 0x2903B009 0x2940C00A 0x2903700B +0x3100000C 0x2900000D 0x2903300E 0x2900300F 0x2943500F +0x5?????10 +0x31000011 +0x31000012 +0x31000013 +0x31000014 +0x31000015 +0x31000016 +0x31000017 +0x31038018 0x29022019 0x2940201A 0x2903101B @@ -212,6 +235,7 @@ 0x2902401C 0x2903401C 0x2900201D +0x3100001E 0x2902201F 0x29023020 0x29034021 @@ -220,6 +244,8 @@ 0x29400023 0x29034024 0x29402024 +0x31000025 +0x31034025 0x2902F026 0x2940F026 0x2940C027 @@ -229,172 +255,174 @@ 0x2940702B 0x2940802C 0x2940902D +0x3140402E +0x3143402E +0x3143102F +0x39435830 0x29003031 0x29403031 0x29503032 0x29038033 +0x5?????34 +0x5?????35 0x29018036 0x29033037 +0x5?????38 +0x31012039 +0x3100203A 0x2903203B 0x2940983C 0x2900403D +0x3100503E 0x2900803F +0x31000040 0x29034041 +0x5?????42 +0x31030043 +0x5?????44 0x29034045 0x2902A046 +0x31000047 0x29022048 0x29018049 +0x5?????4A 0x2903404B 0x2903604C 0x2940604C +0x3140904D 0x2940804E 0x2940A04F 0x29036050 0x29409051 0x29400052 +0x5?????53 0x29408054 0x29408055 +0x31016056 +0x31037057 0x29038058 +0x31024059 +0x3102505A +0x3103605B +0x3102705C +0x3102405D 0x2902405E 0x2903305F 0x2903A060 +0x31032061 +0x3103A061 0x29001062 +0x31009063 0x29033064 +0x31034064 0x29034065 +0x31404066 +0x31404067 +0x39404068 +0x31008069 0x2900306A 0x2900306B 0x2902306C 0x2902306D 0x2901306E 0x2903A06F +0x5?????70 0x29000071 0x29000072 0x29432073 0x29433074 0x29434075 +0x39439076 0x29432077 +0x31033078 +0x39033079 +0x5?????7A +0x5?????7B +0x5?????7C 0x2902107D +0x3140807E +0x5?????7F 0x29032080 0x29033081 0x29034082 +0x31030083 0x29405084 +0x31078085 0x29022086 +0x31022087 0x29022088 0x29022089 -0x2900308C -0x2900208D -0x2903408F -0x29038090 -0x2940B096 -0x29030098 -0x29036099 -0x2940D09A - -0x31004005 -0x31004006 -0x3100000C -0x31000011 -0x31000012 -0x31000013 -0x31000014 -0x31000015 -0x31000016 -0x31000017 -0x31038018 -0x3100001E -0x31000025 -0x31034025 -0x3140402E -0x3143402E -0x3143102F -0x39435830 -0x31012039 -0x3100203A -0x3100503E -0x31000040 -0x31030043 -0x31000047 -0x3140904D -0x31016056 -0x31037057 -0x31024059 -0x3102505A -0x3103605B -0x3102705C -0x3102405D -0x31032061 -0x3103A061 -0x31009063 -0x31034064 -0x31404066 -0x31404067 -0x39404068 -0x31008069 -0x39439076 -0x31033078 -0x39033079 -0x3140807E -0x31030083 -0x31078085 -0x31022087 0x3140208A 0x3103108B +0x2900308C +0x2900208D 0x3100208E +0x2903408F +0x29038090 0x39408091 0x39408092 0x39033093 0x31405094 0x31408095 +0x2940B096 0x31408097 +0x29030098 +0x29036099 +0x2940D09A 0x3103109B -0x4900F000 -0x49000002 -0x49000003 -0x49002004 -0x49002005 -0x49002006 -0x49004007 -0x49000008 -0x49000009 -0x4900100A -0x4900000C -0x4900200D -0x4900200E -0x4900400F -0x49008010 -0x49008011 -0x41007012 -0x49003013 -0x49000014 -0x49008015 -0x49002016 -0x49000017 -0x49002018 -0x49000019 -0x4900101A -0x4900001B -0x4900001C -0x4900101D -0x4100001E -0x4900001F -0x49000020 -0x49000021 -0x49000022 -0x4100C023 -0x4900C024 -0x49008025 -0x49001026 -0x49008027 -0x4900C028 -0x4900C02A -0x4900002C -0x4900002D -0x4900402E -0x4900402F -0x49008030 -0x49008031 -0x49000032 -0x49000033 -0x49008034 -0x4900D036 +0x4900F000 pause menu +0x4?????01 identical to above? +0x49000002 change menu selection +0x49000003 select menu item +0x49002004 collect lasers +0x49002005 collect bomb +0x49002006 collect bomb. identical to above, played at same time +0x49004007 scroll number +0x49000008 vs countodwn +0x49000009 vs go +0x4900100A bad selection +0x4?????0B warning sound? +0x4900000C item appears +0x4900200D big heal +0x4900200E small heal +0x4900400F collect checkpoint +0x49008010 low health hit alarm +0x49008011 critical health hit alarm +0x41007012 teammate health increase +0x49003013 collect gold ring +0x49000014 great fox warning siren +0x49008015 health bar increase +0x49002016 good luck +0x49000017 trainer text display +0x49002018 call alert +0x49000019 map pause menu up, also crosshairs on +0x4900101A map pause menu down, also crosshairs off +0x4900001B torpedo lock on +0x4900001C missile great fox proximity alert +0x4900101D exit menu +0x4100001E briefing sounds +0x4900001F world map appears ? +0x49000020 main menu select +0x49000021 main menu back +0x49000022 main menu change selection +0x4100C023 solar heat alarm +0x4900C024 1UP +0x49008025 ring passed +0x49001026 low health nag +0x49008027 charge lock on +0x4900C028 boss health appears +0x4?????29 sound like an item collect jingle +0x4900C02A timer countdown alert +0x4?????2B some sort of option change? +0x4900002C cockpit view on +0x4900002D cockpit view off +0x4900402E EVSFX_16, missed zoness searchlight +0x4900402F ring failed +0x49008030 medal award +0x49008031 mission accomplished text +0x49000032 one steep bill +0x49000033 whaaat +0x49008034 mission complete text +0x4?????35 quiet noise, hard to place +0x4900D036 vs mode time up. doesn't play? diff --git a/sfxStrings.txt b/sfxStrings.txt new file mode 100644 index 00000000..1a36867e --- /dev/null +++ b/sfxStrings.txt @@ -0,0 +1,351 @@ + +NA_SE_FALL +NA_SE_PASS +NA_SE_ARWIN_GO_OUT +NA_SE_OB_METAL_BOUND_S +NA_SE_OB_METAL_BOUND_M +NA_SE_EN_METAL_BOUND_M +NA_SE_EN_MS_LAND +NA_SE_OB_METAL_BOUND_L +NA_SE_OB_BOUND_S +NA_SE_OB_BLOCK_APPEAR +NA_SE_OB_BOUND_M +NA_SE_OB_ROCK_BOUND +NA_SE_OB_BOUND_L +NA_SE_OB_AC_ROCK_BOUND +NA_SE_OB_AC_PILLAR_BOUND +NA_SE_METALBOMB_REFLECT +NA_SE_OB_MC_SWITCH_UP +NA_SE_METALBOMB_BOUND +NA_SE_SAND_SLIDE +NA_SE_TANK_SLIDE +NA_SE_SPLASH_LEVEL_S +NA_SE_SPLASH_LEVEL_L +NA_SE_OB_GATE_OPEN +NA_SE_OB_SLIDE_OPEN +NA_SE_OB_GATE_CLOSE +NA_SE_OB_SLIDE_CLOSE +NA_SE_OB_EXPLOSION_S +NA_SE_GREATFOX_ENGINE +NA_SE_EARTHQUAKE +NA_SE_MAP_ZOOM_START +NA_SE_MAP_ZOOM_END +NA_SE_OB_WATER_BOUND_M +NA_SE_EN_WATER_BOUND_M +NA_SE_OB_STEELFRAME +NA_SE_EXPLOSION_DEMO2 +NA_SE_KT_UFO_FALLING +NA_SE_IN_SPLASH_S +NA_SE_OUT_SPLASH_S +NA_SE_IN_SPLASH_L +NA_SE_OUT_SPLASH_L +NA_SE_OB_CRAME_MOTOR +NA_SE_OB_BROKEN_BOX +NA_SE_OB_MINI_BOMB +NA_SE_OB_WT_WHEEL_ROLL +NA_SE_OB_WALL_UP +NA_SE_OB_WALL_BOMB +NA_SE_ON_SPLASH_S +NA_SE_EN_PULL_CHAIN0 +NA_SE_EN_GATHER_PARTS +NA_SE_EN_HEARTBEAT +NA_SE_OB_SAND_BOUND_S +NA_SE_EN_SAND_BOUND_S +NA_SE_KT_UFO_ENGINE +NA_SE_MAP_ZOOM_OUT +NA_SE_EN_BROKEN_SPARK +NA_SE_OB_BROKEN_SPARK +NA_SE_OB_SPARK_BEAM +NA_SE_OB_BOMB_ALARM +NA_SE_WARP_HOLE +NA_SE_OB_WING +NA_SE_SUBMARINE_ATM +NA_SE_WATER_PRESSURE +NA_SE_BUBBLE_UP +NA_SE_EN_WT_BROKEN +NA_SE_EN_WT_DISAPPEAR_S +NA_SE_EN_WT_BOUND_M +NA_SE_OB_BOMB_ALARM_LAST +NA_SE_EN_WT_DISAPPEAR_L +NA_SE_EN_RNG_BEAM_CHARGE +NA_SE_EN_RNG_BEAM_SHOT +NA_SE_EN_MCBOSS_PLATEBEAM +NA_SE_EN_SHIELD_ROLL +NA_SE_GREATFOX_SHOT_DEMO +NA_SE_WARP_RING_1 +NA_SE_WARP_RING_2 +NA_SE_WARP_RING_3 +NA_SE_WARP_RING_4 +NA_SE_WARP_RING_5 +NA_SE_WARP_RING_6 +NA_SE_WARP_RING_7 +NA_SE_KT_UFO_HATCH_OPEN +NA_SE_KT_UFO_HATCH_CLOSE +NA_SE_KT_UFO_CORE_OPEN +NA_SE_BO_CORE_APPEAR +NA_SE_KT_UFO_HATCH_STOP +NA_SE_KT_UFO_CORE_STOP +NA_SE_KT_UFO_LONG_CHARGE +NA_SE_KT_UFO_LAST_CHARGE +NA_SE_KT_UFO_BEAM +NA_SE_EXPLOSION_DEMO3 +NA_SE_KT_UFO_BOUND +NA_SE_OB_BARRIER_RELEASE +NA_SE_EN_SPACE_SNAKE +NA_SE_OB_ROCKWALL_UP +NA_SE_COLONY_LEVEL +NA_SE_MAP_MOVE +NA_SE_MAP_ROLL +NA_SE_MAP_LINE_DRAW +NA_SE_SHIP_ENGINE_SPC +NA_SE_OB_BROKEN_SPARK_L +NA_SE_EN_SHIELD_ROLL_LEVEL +NA_SE_EN_SHIELD_ROLL_STOP +NA_SE_OB_MAGMA_WAVE +NA_SE_EN_OUT_PROMINENCE +NA_SE_EN_OUT_MAGMA +NA_SE_EN_IN_PROMINENCE +NA_SE_EN_IN_MAGMA +NA_SE_OB_SMOKE +NA_SE_OB_ROCK_CRASH +NA_SE_OB_ROCK_EYE_OPEN +NA_SE_OB_SHIP_FALLDOWN +NA_SE_EN_BMBOSS_BROKEN +NA_SE_OB_ARM_SWING +NA_SE_OB_POLE_MOVE +NA_SE_OB_POLE_BOUND +NA_SE_OB_HEAVY_SWITCH +NA_SE_OB_CONNECT_CUT +NA_SE_OB_MC_SWITCH_ON +NA_SE_OB_MC_SWITCH_GRN +NA_SE_OB_MC_SWITCH_RED +NA_SE_OB_POST_UP +NA_SE_OB_SIDE_GATE_CLOSE +NA_SE_OB_SPEAR_STICK +NA_SE_RAILWAY_BOUND +NA_SE_EN_MCBOSS_HATCH +NA_SE_EN_MCBOSS_CHARGE0 +NA_SE_EN_MCBOSS_SHOT0 +NA_SE_EN_MCBOSS_PLATECHARGE +NA_SE_VO_ANDORF_PUNCH +NA_SE_VO_ANDORF_UPSLAP +NA_SE_VO_ANDORF_SLAP +NA_SE_VO_ANDORF_WHAND +NA_SE_VO_ANDORF_CHOKE +NA_SE_VO_ANDORF_LAUGH +NA_SE_VO_ANDORF_GROAN +NA_SE_VO_ANDORF_DEATH +NA_SE_OB_ROOT_EXPLOSION0 +NA_SE_OB_ROOT_GATE_OPEN +NA_SE_OB_ROUTEGATE_OPEN_Q +NA_SE_EN_ANDORF_ROBOT +NA_SE_EN_ANDORF_BRAIN +NA_SE_EN_ANDORF_EYE +NA_SE_OB_ROOT_EXPLOSION1 +NA_SE_OB_FISH_AWAY +NA_SE_OB_AC_PILLAR_BROKE +NA_SE_WARP_OUT +NA_SE_ARWING_HATCH +NA_SE_OB_POINT_SWITCH +NA_SE_VO_ANDORF_EXCITE +NA_SE_OB_PILLER_ROLL +NA_SE_OB_ROUTEGATE_CLOSE_Q +NA_SE_OB_ROUTEGATE_OPEN_S +NA_SE_OB_ROUTEGATE_CLOSE_S +NA_SE_OB_LIFT +NA_SE_OB_PLATE_ROLL +NA_SE_STARFOX_SEAL +NA_SE_EXPLOSION_DEMO6 + + +NA_SE_EXPLOSION_S +NA_SE_BIG_EXPLOSION +NA_SE_EN_SHOT_0 +NA_SE_EN_DAMAGE_M +NA_SE_OB_DAMAGE_M +NA_SE_EN_BREATH +NA_SE_EN_WOLF_ENGINE +NA_SE_EN_WOLF_ENGINE2 +NA_SE_EN_REFLECT +NA_SE_OB_REFLECT +NA_SE_EN_EXPLOSION_S +NA_SE_EN_EXPLOSION_M +NA_SE_OB_EXPLOSION_M +NA_SE_EN_EXPLOSION_L +NA_SE_EN_CRASH_DOWN +NA_SE_ARWING_ENGINE_F +NA_SE_ARWING_ENGINE_FG +NA_SE_ARWING_SHOT_F +NA_SE_EN_DAMAGE_S +NA_SE_OB_DAMAGE_S +NA_SE_EN_DAMAGE_L +NA_SE_EN_KNOCK_DOWN +NA_SE_EN_ENGINE_00 +NA_SE_EN_S_FIGHTER_ENGINE +NA_SE_EN_ENGINE_01 +NA_SE_EN_ENGINE_02 +NA_SE_EN_MISSILE_ENGINE +NA_SE_EN_ENGINE_03 +NA_SE_EN_LONG_BEAM +NA_SE_EN_ENGINE_04 +NA_SE_EN_ALIEN_FLY +NA_SE_EN_ENGINE_05 +NA_SE_EN_SPACE_SHIP +NA_SE_EN_ENGINE_06 +NA_SE_EN_TANK_RB_ENGINE +NA_SE_EN_ENGINE_07 +NA_SE_EN_TANK_ENGINE +NA_SE_A_CARRIER_ENGINE +NA_SE_A_CARRIER_ENGINE2 +NA_SE_EN_HEAVY_WALK +NA_SE_EN_HEAVY_WALK0 +NA_SE_EN_HATCH +NA_SE_EN_MISSILE_SHOT +NA_SE_EN_BARREL_SHOT +NA_SE_EN_THROW +NA_SE_EN_MS_PUNCH +NA_SE_EN_FALLING_DOWN +NA_SE_EN_LASER_BEAM +NA_SE_EN_HEAVY_WALK1 +NA_SE_EN_HEAVY_JUMP +NA_SE_EN_HEAVY_BOUND +NA_SE_OB_HEAVY_BOUND +NA_SE_EN_COMBINE +NA_SE_EN_MOTOR_ROLL +NA_SE_EN_MOTOR_STOP +NA_SE_EN_UNIT_COMBINE +NA_SE_EN_ENERGY_BEAM +NA_SE_EN_CIRCLE_BEAM +NA_SE_EN_ZOBOSS_BEAM +NA_SE_EN_BOSS_EXPLOSION +NA_SE_EN_STAR_EXPLOSION +NA_SE_EN_PARTS_BROKEN +NA_SE_EN_THROW_S +NA_SE_EN_HEAVY_WALK2 +NA_SE_EN_APPEAR_SAND +NA_SE_EN_TIBOSS_AT_CRY +NA_SE_EN_TIBOSS_DM_CRY +NA_SE_EN_TIBOSS_DW_CRY +NA_SE_EXPLOSION_DEMO +NA_SE_EXPLOSION_DEMO5 +NA_SE_EN_BOSS_BEAM0 +NA_SE_EN_BOSS_CHARGE +NA_SE_EN_BOSS_ATTACK +NA_SE_EN_SAND_BOUND_M +NA_SE_OB_SPEAR_PILLAR +NA_SE_EN_WT_EXPLOSION_S +NA_SE_EN_WT_EXPLOSION_M +NA_SE_EN_WT_EXPLOSION_L +NA_SE_EN_BIRD_DOWN +NA_SE_EN_SN_BIRD_DOWN +NA_SE_EN_BIRD_DAMAGE +NA_SE_EN_SN_BIRD_DAMAGE +NA_SE_EN_SPIDER_MOVE +NA_SE_EN_SHIP_ENGINE_S +NA_SE_EN_SHIP_ENGINE_L +NA_SE_EN_S_BALL_SHOT +NA_SE_EN_SINK_PARTS +NA_SE_EN_M_BALL_SHOT +NA_SE_EN_PULL_CHAIN1 +NA_SE_EN_HEART_OPEN +NA_SE_ARWING_ENGINE_FS +NA_SE_EN_SNAKE_DAMAGE +NA_SE_EN_KANI_DAMAGE +NA_SE_EN_KANI_DOWN +NA_SE_EN_KANI_MOTOR +NA_SE_EN_DISAPPEAR_SAND +NA_SE_EN_SANADA_DAMAGE +NA_SE_EN_SANADA_DOWN +NA_SE_EN_SANADA_SWIM +NA_SE_EN_SANADA_APPEAR +NA_SE_EN_SEA_EXPLOSION_S +NA_SE_EN_SEA_EXPLOSION_L +NA_SE_EN_P_BALL_SHOT +NA_SE_EN_WT_DAMAGE_S +NA_SE_EN_EYEFILM_DAMAGE +NA_SE_EN_SHELL_BEAT +NA_SE_EN_SHELL_DAMAGE +NA_SE_EN_SHELL_DOWN +NA_SE_EN_KAIBASHIRA_DAMEGE +NA_SE_EN_EYEFILM_REVIVAL +NA_SE_EN_P_GUN_APPEAR +NA_SE_EN_P_GUN_DISAPPEAR +NA_SE_EN_SHELL_CLOSE +NA_SE_EN_SHELL_FILLOPEN +NA_SE_EN_S_BEAM_CHARGE +NA_SE_EN_S_BEAM_SHOT +NA_SE_EN_S_BEAM_END +NA_SE_GREATFOX_BURNER +NA_SE_EN_BURNER_S +NA_SE_EN_BURNER_L +NA_SE_EN_MS_BURNER +NA_SE_EN_GRN_BEAM_CHARGE +NA_SE_EN_GRN_BEAM_SHOT +NA_SE_EN_ASBOSS_SHIELD +NA_SE_EN_CATCH +NA_SE_EN_PASS +NA_SE_EN_SZMIS_EXPLOSION +NA_SE_EN_MS_EXPLOSION_S +NA_SE_EN_SZMIS_ENGINE +NA_SE_EN_PUNCH_ENGINE +NA_SE_EN_BARRIER_REFLECT +NA_SE_EXPLOSION_DEMO4 +NA_SE_EN_ANDORF_EXPLOSION +NA_SE_EN_SPARK_DAMAGE_M +NA_SE_EN_BMBOSS_DAMAGE +NA_SE_EN_ARM_SWING +NA_SE_EN_COVER_OPEN +NA_SE_EN_COVER_CLOSE +NA_SE_EN_COVER_MOVE_STOP +NA_SE_EN_ENERGY_BALL +NA_SE_EN_UNIT_GATHERING +NA_SE_EN_MS_SHOT_S +NA_SE_EN_DASH +NA_SE_EN_MS_DASH +NA_SE_EN_KICK +NA_SE_EN_MS_KICK +NA_SE_EN_MS_SHOT_L +NA_SE_EN_MS_SHIELD_BROKEN +NA_SE_EN_MS_EXPLOSION_L +NA_SE_OB_SNROCK_APPEAR +NA_SE_OB_SNROCK_DISAPPEAR +NA_SE_EN_SNBOSS_CRY +NA_SE_EN_SNBOSS_DAMAGE +NA_SE_EN_SNBOSS_BROKEN +NA_SE_EN_SNBOSS_DOWN +NA_SE_EN_SNBOSS_SWING +NA_SE_EN_SNBOSS_BREATH +NA_SE_EN_SNBOSS_ROLL +NA_SE_EN_ANGLER_DAMAGE +NA_SE_EN_ANGLER_DOWN +NA_SE_ROCK_REFLECT +NA_SE_OB_ROCK_REFLECT +NA_SE_OB_MAGMA_BUBBLE +NA_SE_OB_BMBOSS_WALK +NA_SE_OB_BMBOSS_JUMP +NA_SE_OB_BMBOSS_LAND +NA_SE_OB_BMBOSS_ATTACK +NA_SE_OB_BMBOSS_BOUND +NA_SE_EN_FREIGHT_TRAIN +NA_SE_EN_MCBOSS_REFLECT +NA_SE_EN_ANDORF_BREATH +NA_SE_EN_ANDORF_BITE0 +NA_SE_EN_ANDORF_BITE1 +NA_SE_EN_ANDORF_VOMIT +NA_SE_EN_ANDORF_SPARK +NA_SE_EN_WT_THROW +NA_SE_EN_WT_SPARK_CHARGE +NA_SE_EN_WT_SPARK_BEAM +NA_SE_EN_AC_ZAKO_DAMAGE +NA_SE_EN_AC_ZAKO_DOWN +NA_SE_EN_WARP_IN +NA_SE_EN_WARP_OUT +NA_SE_EN_CLBOSS_CHARGE +NA_SE_EN_CLBOSS_BEAM +NA_SE_EN_TRAIN_BREAK +NA_SE_EN_ANDORF_WARP +NA_SE_EN_ANDORF_CATCH +NA_SE_EN_KANI_STOP +NA_SE_EN_MCBOSS_RAGE +NA_SE_EN_DOWN_IMPACT +NA_SE_EN_MARBLE_BEAM diff --git a/src/audio/audio_general.c b/src/audio/audio_general.c index d702861e..cf0eb02b 100644 --- a/src/audio/audio_general.c +++ b/src/audio/audio_general.c @@ -527,25 +527,25 @@ f32 Audio_GetSfxFalloff(u8 bankId, u8 entryIndex) { f32 midrange; f32 range; - if (SFX_BIT09(sSfxBanks[bankId][entryIndex].sfxId)) { + if (sSfxBanks[bankId][entryIndex].sfxId & SFX_FLAG_22) { return 1.0f; } distance = sSfxBanks[bankId][entryIndex].distance; if (distance > 33000.0f) { falloff = 0.0f; } else { - switch (SFX_RANGE_MASK(sSfxBanks[bankId][entryIndex].sfxId)) { + switch ((sSfxBanks[bankId][entryIndex].sfxId & SFX_RANGE_MASK)) { default: - range = 1650.0f; + range = 33000.0f / 20.0f; break; - case 1 << 16: - range = 2200.0f; + case 1 << SFX_RANGE_SHIFT: + range = 33000.0f / 15.0f; break; - case 2 << 16: - range = 3142.8572f; + case 2 << SFX_RANGE_SHIFT: + range = 33000.0f / 10.5f; break; - case 3 << 16: - range = 6346.1543f; + case 3 << SFX_RANGE_SHIFT: + range = 33000.0f / 5.2f; break; } cutoff = range / 5.0f; @@ -568,9 +568,9 @@ s8 Audio_GetSfxReverb(u8 bankId, u8 entryIndex, u8 channelId) { s8 distReverb = 0; s8 scriptReverb = 0; - if (!SFX_BIT10(sSfxBanks[bankId][entryIndex].sfxId)) { - if (sSfxBanks[bankId][entryIndex].distance < 8250.0f) { - distReverb = (sSfxBanks[bankId][entryIndex].distance / 8250.0f) * 40.0f; + if (!(sSfxBanks[bankId][entryIndex].sfxId & SFX_FLAG_21)) { + if (sSfxBanks[bankId][entryIndex].distance < (33000.0f / 4.0f)) { + distReverb = (sSfxBanks[bankId][entryIndex].distance / (33000.0f / 4.0f)) * 40.0f; } else { distReverb = 40; } @@ -618,11 +618,11 @@ f32 Audio_GetSfxFreqMod(u8 bankId, u8 entryIndex) { f32 distance; f32 freqMod = 1.0f; - if (SFX_BIT08(sSfxBanks[bankId][entryIndex].sfxId)) { + if (sSfxBanks[bankId][entryIndex].sfxId & SFX_FLAG_23) { freqMod -= ((gAudioRandom % 16) / 192.0f); } distance = sSfxBanks[bankId][entryIndex].distance; - if (!SFX_BIT09(sSfxBanks[bankId][entryIndex].sfxId)) { + if (!(sSfxBanks[bankId][entryIndex].sfxId & SFX_FLAG_22)) { if (distance >= 33000.0f) { freqMod += 0.2f; } else { @@ -643,27 +643,28 @@ void Audio_SetSfxProperties(u8 bankId, u8 entryIndex, u8 channelId) { SfxBankEntry* entry = &sSfxBanks[bankId][entryIndex]; switch (bankId) { - case 0: - case 1: - case 2: - case 3: + case SFX_BANK_PLAYER: + case SFX_BANK_1: + case SFX_BANK_2: + case SFX_BANK_3: if (entry->state == 2) { AUDIOCMD_CHANNEL_SET_IO(SEQ_PLAYER_SFX, channelId, 1, gLevelType); } - if (SFX_BIT13(entry->sfxId) && (*entry->zPos > 0.0f)) { + if ((entry->sfxId & SFX_FLAG_18) && (*entry->zPos > 0.0f)) { f32 yScaled = *entry->yPos / 2.5f; entry->distance = SQ(*entry->xPos) + SQ(yScaled); } entry->distance = sqrtf(entry->distance); - volumeMod = (Audio_GetSfxFalloff(bankId, entryIndex) * *entry->volMod) * sSfxVolumeMods[bankId].value; + volumeMod = Audio_GetSfxFalloff(bankId, entryIndex) * *entry->volMod * sSfxVolumeMods[bankId].value; reverb = Audio_GetSfxReverb(bankId, entryIndex, channelId); freqMod = Audio_GetSfxFreqMod(bankId, entryIndex) * *entry->freqMod; - if ((bankId != 0) || !(*entry->zPos > -200.0f) || !(*entry->zPos < 200.0f) || (sSfxChannelLayout == 3)) { + if (!((bankId == SFX_BANK_PLAYER) && ((-200.0f < *entry->zPos) && (*entry->zPos < 200.0f)) && + (sSfxChannelLayout != 3))) { pan = Audio_GetSfxPan(*entry->xPos, *entry->zPos, entry->token); } break; - case 4: + case SFX_BANK_SYSTEM: if (sSfxChannelLayout == 3) { if (entry->token != 4) { pan = (entry->token & 1) * 127; @@ -1393,7 +1394,7 @@ void Audio_ClearBGMMute(u8 channelIndex) { } void Audio_PlaySfx(u32 sfxId, f32* sfxSource, u8 token, f32* freqMod, f32* volMod, s8* reverbAdd) { - if (sSfxBankMuted[SFX_BANK_SHIFT(sfxId)] == 0) { + if (sSfxBankMuted[SFX_BANK_ALT(sfxId)] == 0) { SfxRequest* request = &sSfxRequests[sSfxRequestWriteIndex]; request->sfxId = sfxId; @@ -1415,12 +1416,13 @@ void Audio_RemoveMatchingSfxRequests(u8 aspect, SfxBankEntry* data) { switch (aspect) { case 0: - if (SFX_BANK_MASK(request->sfxId) == SFX_BANK_MASK(data->sfxId)) { + if ((request->sfxId & SFX_BANK_MASK) == (data->sfxId & SFX_BANK_MASK)) { found = true; } break; case 1: - if ((SFX_BANK_MASK(request->sfxId) == SFX_BANK_MASK(data->sfxId)) && (&request->pos[0] == data->xPos)) { + if (((request->sfxId & SFX_BANK_MASK) == (data->sfxId & SFX_BANK_MASK)) && + (&request->pos[0] == data->xPos)) { found = true; } break; @@ -1446,7 +1448,7 @@ void Audio_RemoveMatchingSfxRequests(u8 aspect, SfxBankEntry* data) { break; } if (found) { - request->sfxId = 0; + request->sfxId = NA_SE_NONE; } } } @@ -1460,7 +1462,7 @@ void Audio_ProcessSfxRequest(void) { u8 count; SfxBankEntry* entry; - if (request->sfxId == 0) { + if (request->sfxId == NA_SE_NONE) { return; } bankId = SFX_BANK(request->sfxId); @@ -1474,13 +1476,13 @@ void Audio_ProcessSfxRequest(void) { if (count == 0) { evict = next; sfxId = sSfxBanks[bankId][next].sfxId; - } else if (SFX_IMPORTANCE_MASK(sSfxBanks[bankId][next].sfxId) < SFX_IMPORTANCE_MASK(sfxId)) { + } else if ((sSfxBanks[bankId][next].sfxId & SFX_IMPORT_MASK) < (sfxId & SFX_IMPORT_MASK)) { evict = next; sfxId = sSfxBanks[bankId][next].sfxId; } count++; if (count == sUsedChannelsPerBank[sSfxChannelLayout][bankId]) { - if (SFX_IMPORTANCE_MASK(request->sfxId) >= SFX_IMPORTANCE_MASK(sfxId)) { + if ((request->sfxId & SFX_IMPORT_MASK) >= (sfxId & SFX_IMPORT_MASK)) { next = evict; } else { next = 0; @@ -1488,8 +1490,8 @@ void Audio_ProcessSfxRequest(void) { } } if (count == sUsedChannelsPerBank[sSfxChannelLayout][bankId]) { - if (SFX_BIT04(request->sfxId) || SFX_BIT13(request->sfxId) || (next == evict)) { - if (SFX_BIT12(sSfxBanks[bankId][next].sfxId) && (sSfxBanks[bankId][next].state != 1)) { + if ((request->sfxId & SFX_FLAG_27) || (request->sfxId & SFX_FLAG_18) || (next == evict)) { + if ((sSfxBanks[bankId][next].sfxId & SFX_FLAG_19) && (sSfxBanks[bankId][next].state != 1)) { Audio_ClearBGMMute(sSfxBanks[bankId][next].channelIndex); } sSfxBanks[bankId][next].token = request->token; @@ -1536,7 +1538,7 @@ void Audio_RemoveSfxBankEntry(u8 bankId, u8 entryIndex) { SfxBankEntry* sfxBank = sSfxBanks[bankId]; s32 pad; - if (SFX_BIT12(sfxBank[entryIndex].sfxId)) { + if (sfxBank[entryIndex].sfxId & SFX_FLAG_19) { Audio_ClearBGMMute(sfxBank[entryIndex].channelIndex); } if (entryIndex == sSfxBankListEnd[bankId]) { @@ -1573,11 +1575,11 @@ void Audio_ChooseActiveSfx(u8 bankId) { chosenSfx[i].priority = INT32_MAX; chosenSfx[i].entryIndex = 0xFF; } - entryIndex = sSfxBanks[bankId]->next; + entryIndex = sSfxBanks[bankId][0].next; k = 0; while (entryIndex != 0xFF) { if ((sSfxBanks[bankId][entryIndex].state == 1) && - (SFX_BIT04(sSfxBanks[bankId][entryIndex].sfxId) == SFX_BIT04(-1))) { + ((sSfxBanks[bankId][entryIndex].sfxId & SFX_FLAG_27) == SFX_FLAG_27)) { sSfxBanks[bankId][entryIndex].freshness--; } if (sSfxBanks[bankId][entryIndex].freshness == 0) { @@ -1591,8 +1593,8 @@ void Audio_ChooseActiveSfx(u8 bankId) { yScaled = *entry->yPos / 2.5f; entry->distance = SQ(*entry->xPos) + SQ(yScaled) + SQ(*entry->zPos); } - importance = SFX_IMPORTANCE(entry->sfxId); - if (SFX_BIT11(entry->sfxId)) { + importance = SFX_IMPORT(entry->sfxId); + if (entry->sfxId & SFX_FLAG_20) { entry->priority = SQ(0xFF - importance) * SQ(76); } else { entry->priority = (u32) entry->distance + SQ(0xFF - importance) * SQ(76); @@ -1608,7 +1610,7 @@ void Audio_ChooseActiveSfx(u8 bankId) { if (entry->distance > maxRangeSq) { if (entry->state == 4) { AUDIOCMD_CHANNEL_SET_IO(2, entry->channelIndex, 0, 0); - if (SFX_BIT04(entry->sfxId)) { + if (entry->sfxId & SFX_FLAG_27) { Audio_RemoveSfxBankEntry(bankId, entryIndex); entryIndex = k; } @@ -1649,7 +1651,7 @@ void Audio_ChooseActiveSfx(u8 bankId) { if (activeSfx->entryIndex == 0xFF) { needNewSfx = 1; } else if (sSfxBanks[bankId][activeSfx->entryIndex].state == 4) { - if (SFX_BIT04(sSfxBanks[bankId][activeSfx->entryIndex].sfxId)) { + if (sSfxBanks[bankId][activeSfx->entryIndex].sfxId & SFX_FLAG_27) { Audio_RemoveSfxBankEntry(bankId, activeSfx->entryIndex); } else { sSfxBanks[bankId][activeSfx->entryIndex].state = 1; @@ -1706,7 +1708,7 @@ void Audio_PlayActiveSfx(u8 bankId) { if (entry->state == 2) { entry->channelIndex = sCurSfxPlayerChannelIndex; - if (SFX_BIT12(entry->sfxId)) { + if (entry->sfxId & SFX_FLAG_19) { sChannelMuteFlags |= 1 << sCurSfxPlayerChannelIndex; Audio_SetSequenceFade(SEQ_PLAYER_BGM, 2, 64, 15); } @@ -1742,7 +1744,7 @@ void Audio_KillSfxByBank(u8 bankId) { } next = sSfxBanks[bankId][0].next; } - cmp.sfxId = bankId << 28; + cmp.sfxId = bankId << SFX_BANK_SHIFT; Audio_RemoveMatchingSfxRequests(0, &cmp); } @@ -1768,23 +1770,23 @@ void Audio_StopSfxByBankAndSource(u8 bankId, f32* sfxSource) { } void Audio_KillSfxByBankAndSource(u8 bankId, f32* sfxSource) { - SfxBankEntry sp18; + SfxBankEntry cmp; Audio_StopSfxByBankAndSource(bankId, sfxSource); - sp18.sfxId = bankId << 0x1C; - sp18.xPos = sfxSource; - Audio_RemoveMatchingSfxRequests(1, &sp18); + cmp.sfxId = bankId << SFX_BANK_SHIFT; + cmp.xPos = sfxSource; + Audio_RemoveMatchingSfxRequests(1, &cmp); } void Audio_KillSfxBySource(f32* sfxSource) { u8 i; - SfxBankEntry sp24; + SfxBankEntry cmp; for (i = 0; i < 5; i++) { Audio_StopSfxByBankAndSource(i, sfxSource); } - sp24.xPos = sfxSource; - Audio_RemoveMatchingSfxRequests(2, &sp24); + cmp.xPos = sfxSource; + Audio_RemoveMatchingSfxRequests(2, &cmp); } void Audio_KillSfxBySourceAndId(f32* sfxSource, u32 sfxId) { @@ -1900,7 +1902,7 @@ void Audio_PlayAllSfx(void) { if (IS_SEQUENCE_CHANNEL_VALID(gSeqPlayers[SEQ_PLAYER_SFX].channels[0])) { sCurSfxPlayerChannelIndex = 0; - for (bankId = 0; bankId < 5; bankId++) { + for (bankId = 0; bankId < ARRAY_COUNT(sSfxBanks); bankId++) { Audio_ChooseActiveSfx(bankId); Audio_PlayActiveSfx(bankId); Audio_UpdateSfxVolumeMod(bankId); @@ -2346,8 +2348,8 @@ void Audio_AnalyzeFrequencies(f32* buffer0, f32* buffer1, s32 length, f32* buffe var_fs0 = 0.0f; temp_ft0 = D_PI / (2 * size); for (i = 0; i < half; i++) { - *buf2half2++ = (__cosf(var_fs0) - __sinf(var_fs0)) * 0.707107f; - *buf2half3++ = (__cosf(var_fs0) + __sinf(var_fs0)) * 0.707107f; + *buf2half2++ = (__cosf(var_fs0) - __sinf(var_fs0)) * 0.707107f; // approx 1/sqrt(2) + *buf2half3++ = (__cosf(var_fs0) + __sinf(var_fs0)) * 0.707107f; // approx 1/sqrt(2) var_fs0 += temp_ft0; } } @@ -2454,7 +2456,7 @@ u8* Audio_UpdateFrequencyAnalysis(void) { } void Audio_StartPlayerNoise(u8 playerId) { - u32 sfxId = 0x00000000; + u32 sfxId = NA_SE_NONE; sPlayerNoise[playerId].form = gPlayer[playerId].sfx.form; Audio_ResetPlayerFreqMods(); @@ -2475,14 +2477,14 @@ void Audio_StartPlayerNoise(u8 playerId) { &sPlayerNoise[playerId].reverbAdd); break; } - if (sfxId != 0) { + if (sfxId != NA_SE_NONE) { Audio_PlaySfx(sfxId, gPlayer[playerId].sfx.srcPos, playerId, &sPlayerNoise[playerId].totalMod, &gDefaultMod, &sPlayerNoise[playerId].reverbAdd); } } void Audio_StopPlayerNoise(u8 playerId) { - u32 sfxId = 0x00000000; + u32 sfxId = NA_SE_NONE; switch (sPlayerNoise[playerId].form) { case FORM_ARWING: @@ -2502,7 +2504,7 @@ void Audio_StopPlayerNoise(u8 playerId) { break; } sPlayerNoise[playerId].form = FORM_NONE; - if (sfxId != 0) { + if (sfxId != NA_SE_NONE) { Audio_KillSfxBySourceAndId(gPlayer[playerId].sfx.srcPos, sfxId); } } @@ -2652,7 +2654,7 @@ void Audio_SetHeatAlarmParams(u8 shields, u8 heightParam) { } void Audio_PlayEventSfx(f32* sfxSource, u16 eventSfxId) { - if ((sEventSfx[eventSfxId] & 0xF0000000) != 0x40000000) { + if ((sEventSfx[eventSfxId] & SFX_BANK_MASK) != (SFX_BANK_SYSTEM << SFX_BANK_SHIFT)) { AUDIO_PLAY_SFX(sEventSfx[eventSfxId], sfxSource, 0); } else { AUDIO_PLAY_SFX(sEventSfx[eventSfxId], gDefaultSfxSource, 0); @@ -2660,7 +2662,7 @@ void Audio_PlayEventSfx(f32* sfxSource, u16 eventSfxId) { } void Audio_StopEventSfx(f32* sfxSource, u16 eventSfxId) { - if ((sEventSfx[eventSfxId] & 0xF0000000) != 0x40000000) { + if ((sEventSfx[eventSfxId] & SFX_BANK_MASK) != (SFX_BANK_SYSTEM << SFX_BANK_SHIFT)) { Audio_KillSfxBySourceAndId(sfxSource, sEventSfx[eventSfxId]); } else { Audio_KillSfxBySourceAndId(gDefaultSfxSource, sEventSfx[eventSfxId]); @@ -2778,7 +2780,7 @@ void Audio_PlaySoundTest(u8 enable) { void Audio_PlaySequenceDistorted(u8 seqPlayId, u16 seqId, u16 distortion, u8 fadeinTime, u8 unused) { u8 tempoDistortion = (distortion / 10); - Audio_PlaySequence(seqPlayId, seqId & ~0x8000, 0, -1); + Audio_PlaySequence(seqPlayId, seqId & ~SEQ_FLAG, 0, -1); SEQCMD_SET_SEQPLAYER_FREQ(seqPlayId, fadeinTime, distortion); SEQCMD_SCALE_TEMPO(seqPlayId, fadeinTime, tempoDistortion); } diff --git a/src/audio/audio_heap.c b/src/audio/audio_heap.c index 6ae13ba7..ebbcccdb 100644 --- a/src/audio/audio_heap.c +++ b/src/audio/audio_heap.c @@ -660,7 +660,7 @@ void AudioHeap_Init(void) { gAudioBufferParams.samplesPerTickMax = gAudioBufferParams.samplesPerTick + 8; gAudioBufferParams.samplesPerTickMin = gAudioBufferParams.samplesPerTick - 8; gAudioBufferParams.resampleRate = 32000.0f / (s32) gAudioBufferParams.samplingFrequency; - gAudioBufferParams.ticksPerUpdateInvScaled = 0.001171875f / gAudioBufferParams.ticksPerUpdate; + gAudioBufferParams.ticksPerUpdateInvScaled = (3.0f / 2560.0f) / gAudioBufferParams.ticksPerUpdate; gAudioBufferParams.ticksPerUpdateInv = 1.0f / gAudioBufferParams.ticksPerUpdate; gNumNotes = spec->numNotes; D_8014C1B0 = spec->unk_14; diff --git a/src/audio/audio_playback.c b/src/audio/audio_playback.c index 21639354..f6f90dad 100644 --- a/src/audio/audio_playback.c +++ b/src/audio/audio_playback.c @@ -411,7 +411,7 @@ void func_80012438(SequenceLayer* layer, s32 arg1) { layer->adsr.decayIndex * gAudioBufferParams.ticksPerUpdateInvScaled; } temp_v0->playbackState.adsr.sustain = - (s32) layer->channel->adsr.sustain * temp_v0->playbackState.adsr.current * 0.00390625f; + (s32) layer->channel->adsr.sustain * temp_v0->playbackState.adsr.current / 256.0f; } } if (arg1 == 6) { diff --git a/src/audio/audio_seqplayer.c b/src/audio/audio_seqplayer.c index c936fbe9..54614852 100644 --- a/src/audio/audio_seqplayer.c +++ b/src/audio/audio_seqplayer.c @@ -845,7 +845,7 @@ void func_800153E8(SequenceChannel* channel) { channel->changes.s.volume = 1; break; case 0xE0: - channel->volumeMod = (s32) func_800146C0(state) * 0.0078125f; + channel->volumeMod = (s32) func_800146C0(state) / 128.0f; channel->changes.s.volume = 1; break; case 0xDE: diff --git a/src/engine/fox_360.c b/src/engine/fox_360.c index cbace701..173c0fa5 100644 --- a/src/engine/fox_360.c +++ b/src/engine/fox_360.c @@ -120,11 +120,11 @@ bool AllRange_PlayMessage(u16* msg, RadioCharacterId rcid) { } } -void AllRange_UpdateCountdown(void) { +void AllRange_DrawCountdown(void) { if (gShowAllRangeCountdown != 0) { s32 seconds = gAllRangeCountdown[1]; - func_hud_8008E51C(gAllRangeCountdown, gAllRangeCountdownScale); + HUD_DrawCountdown(gAllRangeCountdown, gAllRangeCountdownScale); if ((gAllRangeCountdown[0] == 0) && (seconds != gAllRangeCountdown[1]) && (gAllRangeCountdown[1] < 15)) { AUDIO_PLAY_SFX(0x4900C02A, gDefaultSfxSource, 4); } diff --git a/src/engine/fox_beam.c b/src/engine/fox_beam.c index 0a2bd790..4f9f3bc3 100644 --- a/src/engine/fox_beam.c +++ b/src/engine/fox_beam.c @@ -850,7 +850,7 @@ void func_beam_80038140(PlayerShot* shot) { Matrix_RotateY(gCalcMatrix, shot->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, shot->obj.rot.x * M_DTOR, MTXF_APPLY); sp88.x = sp88.y = 0.0f; - sp88.z = -133.33333f; + sp88.z = -400.0f / 3.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp88, &sp7C); shot->vel.x = sp7C.x; shot->vel.y = sp7C.y; diff --git a/src/engine/fox_context.c b/src/engine/fox_context.c index d36ff39a..25238849 100644 --- a/src/engine/fox_context.c +++ b/src/engine/fox_context.c @@ -39,7 +39,7 @@ bool gExpertMode; s32 D_ctx_80177A10[10]; f32 D_ctx_80177A48[10]; s32 gCsFrameCount; -u8 D_ctx_80177A98; +u8 D_ctx_80177A98; // some sort of flag. Used in background u8 D_ctx_80177AB0; u8 gAqDrawMode; s32 gTitleState; diff --git a/src/engine/fox_display.c b/src/engine/fox_display.c index 911bea25..b96f13bf 100644 --- a/src/engine/fox_display.c +++ b/src/engine/fox_display.c @@ -722,7 +722,7 @@ void func_display_80054300(Player* player) { switch (player->form) { case FORM_ARWING: fake_label: - Matrix_Scale(gGfxMatrix, 2.5049999f, 1.5f, 2.5049999f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 1.5f * 1.67f, 1.5f, 1.5f * 1.67f, MTXF_APPLY); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 30.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1032780); @@ -795,7 +795,7 @@ void func_display_8005478C(Player* player) { if ((gGameFrameCount % 2) != 0) { Matrix_Scale(gGfxMatrix, 0.9f, 0.63f, 1.0f, MTXF_APPLY); } else { - Matrix_Scale(gGfxMatrix, 0.80999994f, 0.567f, 1.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.9f * 0.9f, 0.9f * 0.63f, 1.0f, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); Play_DrawEngineGlow(gLevelType); diff --git a/src/engine/fox_enmy2.c b/src/engine/fox_enmy2.c index 6b8b44c8..bc0401e3 100644 --- a/src/engine/fox_enmy2.c +++ b/src/engine/fox_enmy2.c @@ -3745,7 +3745,7 @@ bool ActorEvent_OverrideLimbDraw2(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* s32 var_s1; if (limbIndex == 5) { - var_s1 = (s32) (this->health * 0.6375f); + var_s1 = (s32) (this->health * (255.0f / 400.0f)); if (var_s1 > 255) { var_s1 = 255; } diff --git a/src/engine/fox_game.c b/src/engine/fox_game.c index 0475088f..a945e06f 100644 --- a/src/engine/fox_game.c +++ b/src/engine/fox_game.c @@ -543,7 +543,7 @@ void Game_Update(void) { } Background_dummy_80040CDC(); HUD_DrawStatusScreens(); - AllRange_UpdateCountdown(); + AllRange_DrawCountdown(); if ((gGameState == GSTATE_PLAY) && gVersusMode) { Versus_Draw(); } diff --git a/src/engine/fox_hud.c b/src/engine/fox_hud.c index 417b1146..c1a56913 100644 --- a/src/engine/fox_hud.c +++ b/src/engine/fox_hud.c @@ -2695,8 +2695,8 @@ void func_hud_8008C104(u16* srcTexture, u16* dstTexture) { Texture_Mottle(dst, buffer, 2); } -void func_hud_8008C390(f32 xPos, f32 yPos, f32 scale, s32 number) { - void* D_800D1EC0[] = { +void HUD_DisplaySmallNumber(f32 xPos, f32 yPos, f32 scale, s32 number) { + void* sSmallNumberTex[] = { aSmallText_0, aSmallText_1, aSmallText_2, aSmallText_3, aSmallText_4, aSmallText_5, aSmallText_6, aSmallText_7, aSmallText_8, aSmallText_9, }; @@ -2704,14 +2704,14 @@ void func_hud_8008C390(f32 xPos, f32 yPos, f32 scale, s32 number) { for (i = 10; i != 1; i /= 10) { if ((xPos > 0.0f) && (yPos > 0.0f)) { - TextureRect_8bIA(&gMasterDisp, D_800D1EC0[number / i], 16, 8, xPos, yPos, scale, scale); + TextureRect_8bIA(&gMasterDisp, sSmallNumberTex[number / i], 16, 8, xPos, yPos, scale, scale); } xPos += 9.0f * scale; number %= i; } if ((xPos > 0.0f) && (yPos > 0.0f)) { - TextureRect_8bIA(&gMasterDisp, D_800D1EC0[number / i], 16, 8, xPos, yPos, scale, scale); + TextureRect_8bIA(&gMasterDisp, sSmallNumberTex[number / i], 16, 8, xPos, yPos, scale, scale); } } @@ -3122,7 +3122,7 @@ void HUD_DrawBossHealth(void) { if (D_801616C4 >= 0.88f) { temp6 = sp3C + 8.0f; - temp7 = 101.0f - (31.884058f * D_801616C8) + temp1; + temp7 = 101.0f - ((2200.0f / 69.0f) * D_801616C8) + temp1; if (D_801616C8 > 0.0f) { TextureRect_16bRGBA(&gMasterDisp, D_Tex_800D99F8, 32, 32, temp6, temp7, 0.2f, D_801616C8); } @@ -3135,7 +3135,7 @@ void HUD_DrawBossHealth(void) { } } -void func_hud_8008E2C8(f32 xPos, f32 yPos, s32* countdown, f32 scale) { +void HUD_DisplayCountdown(f32 xPos, f32 yPos, s32* countdown, f32 scale) { f32 var_fs0 = 0.0f; s32 var_s2 = 0; s32 i; @@ -3159,14 +3159,14 @@ void func_hud_8008E2C8(f32 xPos, f32 yPos, s32* countdown, f32 scale) { } else { RCP_SetupDL_76(); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); - func_hud_8008C390((var_fs0 * scale) + xPos, yPos, scale, var_s2); + HUD_DisplaySmallNumber((var_fs0 * scale) + xPos, yPos, scale, var_s2); var_fs0 += 9.0f; } var_fs0 += 9.0f; } } -void func_hud_8008E51C(s32* countdown, f32 scale) { +void HUD_DrawCountdown(s32* countdown, f32 scale) { //! FAKE: if (1) {} @@ -3191,7 +3191,7 @@ void func_hud_8008E51C(s32* countdown, f32 scale) { } if (gPlayState != PLAY_PAUSE) { - func_hud_8008E2C8(176.0f, 22.0f, countdown, scale); + HUD_DisplayCountdown(176.0f, 22.0f, countdown, scale); } } diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index eb6545c7..18d3d8c7 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -3606,7 +3606,7 @@ void func_play_800AF07C(Player* player) { } if (player->barrelRoll != 0) { sp84 = 0.2f; - gPlayerTurnRate = 6.8999996f; + gPlayerTurnRate = 6.8999996f; // 690.0f * 0.01f } Math_SmoothStepToF(&player->rot.y, stickX * gPlayerTurnStickMod, sp84, gPlayerTurnRate, 0.03f); @@ -4114,7 +4114,7 @@ void func_play_800B0F50(Player* playerx) { gRadioState = gRadioMsgRadioId = gCurrentRadioPortrait = 0; D_ctx_8017853C = gRadioTextBoxScaleY = 0.0f; player->cam.eye.z = 400.0f; - player->unk_148 = 0.77699995f; + player->unk_148 = 0.77699995f; // 77.7f *0.01f player->unk_14C = 0.77699995f; player->unk_01C = 1.0f; player->groundPos.y = -1000.0f; diff --git a/src/engine/fox_tank.c b/src/engine/fox_tank.c index 24c247f7..d9ec4dbe 100644 --- a/src/engine/fox_tank.c +++ b/src/engine/fox_tank.c @@ -322,7 +322,7 @@ void func_tank_800444BC(Player* player) { } if ((player->pos.y - sp30) < sp38) { if (player->vel.y < -10.0f) { - AUDIO_PLAY_SFX(0x09008015, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_TANK_BOUND, player->sfxSource, 0); } player->grounded = true; if (player->vel.y < -20.0f) { @@ -941,7 +941,7 @@ void func_tank_80046704(Player* player) { player->baseSpeed = -(D_800C9F00 * 1.5f); player->vel.z = D_800C9F00 * 1.5f; D_800C9F00 = 12; - AUDIO_PLAY_SFX(0x09008015, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_TANK_WALL_HIT, player->sfxSource, 0); break; } if (scenery->obj.id == OBJ_SCENERY_59) { @@ -1253,7 +1253,7 @@ void func_tank_80047D38(Player* player, f32 arg1) { } if ((player->pos.y - 5.0f) < arg1) { if (player->vel.y < -10.0f) { - AUDIO_PLAY_SFX(0x09008015, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_TANK_BOUND, player->sfxSource, 0); player->hitTimer = 10; } D_800C9F04 = 1; diff --git a/src/engine/fox_versus.c b/src/engine/fox_versus.c index ffd9e655..37d85811 100644 --- a/src/engine/fox_versus.c +++ b/src/engine/fox_versus.c @@ -349,41 +349,38 @@ void func_versus_800BDE44(void) { } } -s32 func_versus_800BE078(void) { - s32 temp; +s32 Versus_UpdateTimer(void) { + s32 temp = (s32) CYCLES_TO_USEC((D_80178860 - D_80178868)) / 10000; - while (true) { - temp = (s32) CYCLES_TO_USEC((D_80178860 - D_80178868)) / 10000; - - if ((D_versus_80178768[2] -= temp) >= 0) { - break; - } + D_versus_80178768[2] -= temp; + if (D_versus_80178768[2] < 0) { D_versus_80178768[2] *= -1; temp = (D_versus_80178768[2] / 100) + 1; D_versus_80178768[2] %= 100; D_versus_80178768[2] = (100 - D_versus_80178768[2]) % 100; + D_versus_80178768[1] -= temp; - if ((D_versus_80178768[1] -= temp) >= 0) { + if (D_versus_80178768[1] >= 0) { if ((D_versus_80178768[0] == 0) && (D_versus_80178768[1] < 15) && (D_versus_80178768[1] >= 0)) { AUDIO_PLAY_SFX(0x4900C02A, gDefaultSfxSource, 4); } - break; + } else { + // clang-format off + 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; + D_versus_80178768[1] %= 60; + D_versus_80178768[1] = (60 - D_versus_80178768[1]) % 60; + D_versus_80178768[0] -= temp; + if (D_versus_80178768[0] < 0) { + D_versus_80178768[0] = 0; + D_versus_80178768[1] = 0; + D_versus_80178768[2] = 0; + } } - // clang-format off - 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; - D_versus_80178768[1] %= 60; - D_versus_80178768[1] = (60 - D_versus_80178768[1]) % 60; - - if ((D_versus_80178768[0] -= temp) >= 0) { - break; - } - D_versus_80178768[0] = 0; - D_versus_80178768[1] = 0; - D_versus_80178768[2] = 0; - break; } return 0; @@ -1538,7 +1535,7 @@ bool Versus_Update(void) { if (gVsMatchType == 2) { D_80178778 = 10; - func_versus_800BE078(); + Versus_UpdateTimer(); func_versus_800BDE3C(); } else { D_80178778 = 8; diff --git a/src/mods/sfxjukebox2.c b/src/mods/sfxjukebox2.c index 553a09f0..68d11235 100644 --- a/src/mods/sfxjukebox2.c +++ b/src/mods/sfxjukebox2.c @@ -10,17 +10,17 @@ extern OptionId D_menu_801B9124; extern s32 D_menu_801B912C; static s32 showJukebox = 0; -static u32 prevSfx = 0; -static u32 sfx = 0; +static u32 prevSfx = NA_SE_NONE; +static u32 sfx = NA_SE_NONE; static s32 sfxId = 0; -static u32 sfxBank = 0; +static u32 sfxBank = SFX_BANK_PLAYER; static u32 sfxRange = 0; static s32 sfxImport = 0; static int holdTimer = 0; static u8 sfxFlag = 0; static u8 sfxFlags[] = { 0, 0, 0, 0, 0, 0, 0, 0 }; static char* flagNames[] = { "F18", "F19", "F20", "F21", "F22", "F23", "STT", "F25", "F26", "SFX" }; -static u8 bankSizes[] = { 0x33, 0x85, 0x9B, 0x9C, 0x37 }; +static u8 bankSizes[] = { 0x33, 0x85, 0x9C, 0x9C, 0x37 }; static u32 sfxEditMode = 9; static u32 srcEditMode = 0; static u32 editMode = 0; @@ -97,6 +97,9 @@ void Jukebox_UpdateSource(void) { } void Jukebox_UpdateSfx(void) { + s32 i; + u16 flags = 0; + if (gControllerPress[gMainController].button & L_JPAD) { sfxEditMode--; } else if (gControllerPress[gMainController].button & R_JPAD) { @@ -125,8 +128,10 @@ void Jukebox_UpdateSfx(void) { } break; } - sfx = SFX_PACK(sfxBank, sfxRange, sfxImport, sfxId, 1, sfxFlag, sfxFlags[7], sfxFlags[6], sfxFlags[5], sfxFlags[4], - sfxFlags[3], sfxFlags[2], sfxFlags[1], sfxFlags[0]); + for (i = 0; i < 8; i++) { + flags |= sfxFlags[i] << (i + (i > 5)); + } + sfx = SFX_PACK(sfxBank, sfxId, sfxRange, sfxImport, (sfxFlag << 27) | (flags << 18)); } s32 sfxModeX[] = { 95, 104, 113, 122, 131, 140, 149, 158, 180, 0, 22, 43, 60 }; diff --git a/src/overlays/ovl_i2/fox_me.c b/src/overlays/ovl_i2/fox_me.c index 30d3b236..2fe0eefe 100644 --- a/src/overlays/ovl_i2/fox_me.c +++ b/src/overlays/ovl_i2/fox_me.c @@ -1488,18 +1488,18 @@ void Meteo_8018978C(Boss* boss) { if (gBossFrameCount > 406) { gBossHealthBar = (boss->swork[2] + boss->swork[3] + boss->swork[4] + boss->swork[5] + boss->swork[7] + boss->swork[8] + boss->swork[6]) / - 2.6274f; + 2.6274f; // approx 670 / 255 if ((gBossFrameCount > 506) && (gBossFrameCount < 1000)) { Math_SmoothStepToF(&boss->fwork[17], 3.3f, 1.0f, 0.1f, 0.0f); - Math_SmoothStepToF(&boss->fwork[0x12], 3.3f, 1.0f, 0.1f, 0.0f); - Math_SmoothStepToF(&boss->fwork[0x13], 3.3f, 1.0f, 0.1f, 0.0f); + Math_SmoothStepToF(&boss->fwork[18], 3.3f, 1.0f, 0.1f, 0.0f); + Math_SmoothStepToF(&boss->fwork[19], 3.3f, 1.0f, 0.1f, 0.0f); Math_SmoothStepToF(&boss->fwork[20], 3.3f, 1.0f, 0.1f, 0.0f); } } } void Meteo_8018B7C4(s32 arg0) { - f32 effect = arg0 * 0.83333f; + f32 effect = arg0 * 0.83333f; // approx 5 / 6 if ((gGameFrameCount % 2) != 0) { effect *= 1.1f; diff --git a/src/overlays/ovl_i3/fox_aq.c b/src/overlays/ovl_i3/fox_aq.c index e4e38616..58784a56 100644 --- a/src/overlays/ovl_i3/fox_aq.c +++ b/src/overlays/ovl_i3/fox_aq.c @@ -6351,8 +6351,8 @@ void Aquas_801BE274(Actor* actor, f32 yRot, f32 xRot) { Vec3f sp4C = { 0.0f, 0.0f, 0.0f }; Vec3f sp40; - Matrix_RotateY(gCalcMatrix, 0.017453292f * yRot, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, 0.017453292f * xRot, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, M_DTOR * yRot, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, M_DTOR * xRot, MTXF_APPLY); sp40.x = sp40.y = 0.0f; sp40.z = 50.0f; diff --git a/src/overlays/ovl_i3/fox_zo.c b/src/overlays/ovl_i3/fox_zo.c index 11c31548..25574f72 100644 --- a/src/overlays/ovl_i3/fox_zo.c +++ b/src/overlays/ovl_i3/fox_zo.c @@ -8,31 +8,6 @@ #include "assets/ast_enmy_planet.h" #include "assets/ast_zoness.h" -// f32 temp[] = { -// 13.0f, -// { { -163.79999f, 187.2f }, { 1495.0f, 119.6f }, { 0.0f, 153.4f } }, -// { { -397.8f, 130.0f }, { 1284.3999f, 262.59998f }, { 0.0f, 80.6f } }, -// { { -223.59999f, 197.59999f }, { 904.8f, 145.59999f }, { 0.0f, 140.4f } }, -// { -// HITBOX_ROTATED, -// { 40.0f, 0.0f, 0.0f }, -// { { -561.6f, 119.6f }, { 600.6f, 319.8f }, { 338.0f, 104.0f } }, -// }, -// { -// HITBOX_ROTATED, -// { 40.0f, 0.0f, 0.0f }, -// { { -561.6f, 119.6f }, { 600.6f, 319.8f }, { -338.0f, 104.0f } }, -// }, -// { { -78.0f, 231.4f }, { 577.19995f, 184.59999f }, { 0.0f, 189.79999f } }, -// { { 26.0f, 754.0f }, { 140.4f, 267.8f }, { 0.0f, 215.79999f } }, -// { { -556.39996f, 260.0f }, { 491.4f, 226.2f }, { 0.0f, 179.4f } }, -// { { -213.2f, 200.2f }, { 473.19998f, 231.4f }, { 613.6f, 187.2f } }, -// { { -213.2f, 200.2f }, { 473.19998f, 231.4f }, { -613.6f, 187.2f } }, -// { { -351.0f, 694.19995f }, { 33.8f, 208.0f }, { 572.0f, 306.8f } }, -// { { -351.0f, 694.19995f }, { 33.8f, 208.0f }, { -572.0f, 306.8f } }, -// { { -896.99994f, 244.4f }, { 863.19995f, 171.59999f }, { 0.0f, 93.6f } }, -// }; - typedef struct { f32 id; Vec3f tilt; @@ -2217,12 +2192,12 @@ void Zoness_80194A84(Boss* bossZO) { break; case 3: if (ZO_HIT_12(bossZO)->z.offset != -883.99994f) { - ZO_HIT_12(bossZO)->z.offset = -883.99994f; - ZO_HIT_12(bossZO)->z.size = 244.4f; - ZO_HIT_12(bossZO)->y.offset = 863.19995f; - ZO_HIT_12(bossZO)->y.size = 171.59999f; + ZO_HIT_12(bossZO)->z.offset = -883.99994f; // 13 * 68.0 + ZO_HIT_12(bossZO)->z.size = 244.4f; // 13 * 18.8 + ZO_HIT_12(bossZO)->y.offset = 863.19995f; // 13 * 66.4 + ZO_HIT_12(bossZO)->y.size = 171.59999f; // 13 * 13.2 ZO_HIT_12(bossZO)->x.offset = 0.0f; - ZO_HIT_12(bossZO)->x.size = 93.6f; + ZO_HIT_12(bossZO)->x.size = 93.6f; // 13 * 7.2 } Math_SmoothStepToF(&bossZO->fwork[ZO_FWK_4], 100.0f, 0.1f, 1.0f, 0.0f); if (bossZO->timer_058 != 0) { @@ -3267,7 +3242,7 @@ void Zoness_801991D0(Boss* bossZO, s32 arg1) { } } - if (arg1 == 0) { + if (arg1 == 0) { // all divisible by 13 ZO_HIT_12(bossZO)->z.offset = -556.39996f; ZO_HIT_12(bossZO)->z.size = 130.0f; ZO_HIT_12(bossZO)->y.offset = 663.0f; @@ -3575,7 +3550,7 @@ void Zoness_8019A1FC(Actor* actor) { } for (var_s0 = 0; var_s0 < var_s1; var_s0++) { Matrix_Translate(gGfxMatrix, 0.0f, 30.0f, 0.0f, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, 1.5707964f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_Push(&gGfxMatrix); Matrix_Scale(gGfxMatrix, 0.75f, 0.75f, 0.75f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -3769,7 +3744,7 @@ void Zoness_8019ACCC(Actor* actor) { Matrix_RotateX(gGfxMatrix, M_DTOR * temp_fs0_4, MTXF_APPLY); Matrix_Push(&gGfxMatrix); Matrix_RotateZ(gGfxMatrix, M_DTOR * var_fs5, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, 1.5707964f, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 1.5f, 1.5f, 1.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ZO_6018660); @@ -4260,7 +4235,7 @@ void Zoness_8019C83C(Actor* actor) { gSPDisplayList(gMasterDisp++, D_ZO_6013330); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_RotateZ(gGfxMatrix, 1.5707964f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_Translate(gGfxMatrix, -110.0f, 0.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ZO_601D680); @@ -4286,7 +4261,7 @@ void Zoness_8019C83C(Actor* actor) { } for (i = 0; i < var_s1; i++) { Matrix_Translate(gGfxMatrix, 0.0f, 9.3f, 0.0f, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, 1.5707964f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_Push(&gGfxMatrix); Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); diff --git a/src/overlays/ovl_i4/fox_fo.c b/src/overlays/ovl_i4/fox_fo.c index d9f75a78..378f12fd 100644 --- a/src/overlays/ovl_i4/fox_fo.c +++ b/src/overlays/ovl_i4/fox_fo.c @@ -885,7 +885,7 @@ void Fortuna_LevelComplete(Player* player) { case 11: D_ctx_80177A48[1] += D_ctx_80177A48[3]; - Matrix_RotateX(gCalcMatrix, -0.17453292f, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -M_DTOR * 10.0f, MTXF_NEW); Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, MTXF_APPLY); src.x = 0; src.y = 0.0f; diff --git a/src/overlays/ovl_i5/fox_ti.c b/src/overlays/ovl_i5/fox_ti.c index d10f7275..b962632c 100644 --- a/src/overlays/ovl_i5/fox_ti.c +++ b/src/overlays/ovl_i5/fox_ti.c @@ -5000,7 +5000,7 @@ void Titania_801982A8(Boss* boss) { RCP_SetupDL(&gMasterDisp, 0x45); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 0); - Matrix_RotateX(gGfxMatrix, -1.5707964f, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -M_PI / 2, MTXF_APPLY); Matrix_Scale(gGfxMatrix, boss->fwork[47] * 10.0f, boss->fwork[47] * 10.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); @@ -5017,7 +5017,7 @@ void Titania_801982A8(Boss* boss) { RCP_SetupDL(&gMasterDisp, 0x45); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 0); - Matrix_RotateX(gGfxMatrix, -1.5707964f, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -M_PI / 2, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); @@ -5053,7 +5053,7 @@ void Titania_801982A8(Boss* boss) { Matrix_Push(&gGfxMatrix); sp120 = D_i5_801BBEF0[7] * 16.0f; RCP_SetupDL(&gMasterDisp, 0x40); - Matrix_RotateX(gGfxMatrix, 1.5707964f, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_Push(&gGfxMatrix); Matrix_Scale(gGfxMatrix, sp120, 1.0f, sp120, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index e077dd5b..fb8b1707 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -2118,7 +2118,8 @@ void Andross_8018DBF0(Boss* boss) { Math_SmoothStepToF(&boss->fwork[13], 80.0f, 1.0f, 15.0f, 0); } if (boss->unk_04C == 25) { - AUDIO_PLAY_SFX(0x09008015, D_i6_801A67B8, 4); + // Why tank? + AUDIO_PLAY_SFX(NA_SE_TANK_BOUND, D_i6_801A67B8, 4); } } Math_SmoothStepToF(&boss->fwork[9], 1.0f, 1.0f, 0.01f, 0); diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index 86951da7..744b6757 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -1322,7 +1322,7 @@ void Map_8019E99C(void) { D_menu_801CDA08 = 0.0f; D_menu_801CDA0C = -42.750008f; D_menu_801CDA10 = -9.849999f; - D_menu_801CDA14 = 3375.000000f; + D_menu_801CDA14 = 3375.0f; // 15^3 D_menu_801CDA18 = 0.0f; D_menu_801CDA1C = 0.0f; @@ -2770,7 +2770,7 @@ void Map_801A281C(void) { D_menu_801CDA0C = -42.750008f; D_menu_801CDA10 = -9.849999f; - D_menu_801CDA14 = 3375.000000f; + D_menu_801CDA14 = 3375.0f; // 15^3 Map_801AD718(D_menu_801CEF58[6].x, D_menu_801CEF58[6].y, D_menu_801CEF58[6].z, &D_menu_801CEEE8[6].x, &D_menu_801CEEE8[6].y, &D_menu_801CEEE8[6].z, D_menu_801CDA14, D_menu_801CDA0C, D_menu_801CDA10); diff --git a/src/sys/sys_fault.c b/src/sys/sys_fault.c index 04dc5ea4..b0240169 100644 --- a/src/sys/sys_fault.c +++ b/src/sys/sys_fault.c @@ -1,5 +1,6 @@ #include "sys.h" #include "PR/os_internal.h" +#include "mods.h" FaultMgr gFaultMgr; @@ -242,7 +243,7 @@ void Fault_ThreadEntry(void* arg0) { func_8000762C(300, 10, "-"); gControllerPlugged[0] = 1; -#if 1 // Turn this off for instant crash debugger (no button combination needed) +#if MODS_AUTO_DEBUGGER == 0 // Turn this off for instant crash debugger (no button combination needed) while (var_s5 == 0) { osSendMesg(&gSerialThreadMesgQueue, (OSMesg) SI_READ_CONTROLLER, OS_MESG_NOBLOCK); MQ_WAIT_FOR_MESG(&gControllerMesgQueue, NULL); From 9303fba359a28d809246e4a2ea007a81d01f7686 Mon Sep 17 00:00:00 2001 From: petrie911 <69443847+petrie911@users.noreply.github.com> Date: Sat, 4 May 2024 16:24:24 -0500 Subject: [PATCH 057/151] Event opcodes documented, more all range stuff (#229) * stuff * Torch1 * dark link --- .vscode/settings.json | 6 +- include/context.h | 6 +- include/functions.h | 10 +- include/sf64event.h | 361 ++++++++------- include/sf64object.h | 8 +- include/sf64player.h | 7 +- include/variables.h | 4 +- linker_scripts/us/symbol_addrs.txt | 2 +- linker_scripts/us/symbol_addrs_engine.txt | 6 +- src/engine/fox_360.c | 252 +++++----- src/engine/fox_beam.c | 196 ++++---- src/engine/fox_context.c | 6 +- src/engine/fox_demo.c | 2 +- src/engine/fox_edata_info.c | 2 +- src/engine/fox_edisplay.c | 10 +- src/engine/fox_effect.c | 22 +- src/engine/fox_enmy.c | 56 +-- src/engine/fox_enmy2.c | 537 +++++++++++----------- src/engine/fox_hud.c | 20 +- src/engine/fox_play.c | 26 +- src/engine/fox_tank.c | 8 +- src/overlays/ovl_i1/fox_co.c | 8 +- src/overlays/ovl_i1/fox_ve1.c | 20 +- src/overlays/ovl_i2/fox_me.c | 34 +- src/overlays/ovl_i2/fox_sx.c | 14 +- src/overlays/ovl_i3/fox_a6.c | 32 +- src/overlays/ovl_i3/fox_aq.c | 62 +-- src/overlays/ovl_i3/fox_so.c | 20 +- src/overlays/ovl_i3/fox_zo.c | 72 +-- src/overlays/ovl_i4/fox_bo.c | 20 +- src/overlays/ovl_i4/fox_fo.c | 24 +- src/overlays/ovl_i4/fox_ka.c | 20 +- src/overlays/ovl_i4/fox_sz.c | 18 +- src/overlays/ovl_i5/fox_ma.c | 148 +++--- src/overlays/ovl_i5/fox_ti.c | 39 +- src/overlays/ovl_i6/fox_andross.c | 8 +- src/overlays/ovl_i6/fox_sy.c | 18 +- src/overlays/ovl_i6/fox_turret.c | 2 +- src/overlays/ovl_i6/fox_ve2.c | 10 +- tools/Torch | 2 +- 40 files changed, 1075 insertions(+), 1043 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 4fbfb91d..cca7d0b8 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -137,7 +137,11 @@ "sf64mesg.h": "c", "sf64audio_external.h": "c", "audioseq_cmd.h": "c", - "ultralog.h": "c" + "ultralog.h": "c", + "charconv": "c", + "compare": "c", + "os_motor.h": "c", + "os_pfs.h": "c" }, "C_Cpp_Runner.msvcBatchPath": "" } \ No newline at end of file diff --git a/include/context.h b/include/context.h index 690df8cd..0027aac4 100644 --- a/include/context.h +++ b/include/context.h @@ -76,10 +76,10 @@ extern UNK_TYPE F_80177DE8; extern s32 gGameFrameCount; extern s32 gObjectLoadIndex; extern s32 gPrevEventActorIndex; -extern s32 D_ctx_80177E78; +extern s32 gFormationLeaderIndex; extern s32 gRingPassCount; -extern Vec3f D_ctx_80177E88; -extern Vec3f D_ctx_80177F10; +extern Vec3f gFormationInitRot; +extern Vec3f gFormationInitPos; extern UNK_TYPE F_80178020; extern s32 D_ctx_8017812C; extern LevelId gCurrentLevel; diff --git a/include/functions.h b/include/functions.h index e9ae1323..223e8abf 100644 --- a/include/functions.h +++ b/include/functions.h @@ -24,8 +24,8 @@ void AllRange_ClearRadio(void); void func_360_8002EE64(Actor* this); void ActorAllRange_SpawnTeam(void); void ActorAllRange_PlayMessage(u16* msg, RadioCharacterId character); -void func_360_8002F69C(Actor*); -void func_360_8002FC00(Actor*); +void ActorAllRange_UpdateStarWolfEvents(Actor*); +void ActorAllRange_UpdateEvemyEvents(Actor*); void ActorAllRange_ApplyDamage(Actor*); bool func_360_80031900(Actor*); void ActorAllRange_Update(Actor* this); @@ -223,9 +223,9 @@ void Scenery42_Update(Scenery*); void Actor196_Update(Actor*); void Actor189_Update(Actor*); void MeteoTunnel_Update(Scenery*); -void func_enmy2_8006ECBC(PlayerShotId, PlayerShot*, s32, f32, f32, f32, f32, f32, f32, f32, f32, f32); -void func_enmy2_8006EEFC(s32, f32, f32, f32, f32, f32, f32, f32, f32, f32); -void func_enmy2_8006EFA0(s32 unk0E4, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 xRot, f32 yRot, +void Actor_SetupPlayerShot(PlayerShotId, PlayerShot*, s32, f32, f32, f32, f32, f32, f32, f32, f32, f32); +void Actor_SpawnPlayerLaser(s32, f32, f32, f32, f32, f32, f32, f32, f32, f32); +void Actor_SpawnGreatFoxLaser(s32 actorId, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 xRot, f32 yRot, f32 zRot); void ActorEvent_8006F0D8(f32 xPos, f32 yPos, f32 zPos, f32 scale1); void ActorEvent_8006F254(Actor*); diff --git a/include/sf64event.h b/include/sf64event.h index 0b292dd1..c382d054 100644 --- a/include/sf64event.h +++ b/include/sf64event.h @@ -10,11 +10,11 @@ #define evaRotateFlag(actor) (actor)->iwork[6] #define evaTexLineFlag(actor) (actor)->iwork[7] #define evaTexLineIndex(actor) (actor)->iwork[8] -#define EvaIwork9(actor) (actor)->iwork[9] +#define evaLeaderActorIndex(actor) (actor)->iwork[9] #define EvaIwork10(actor) (actor)->iwork[10] #define EvaIwork11(actor) (actor)->iwork[11] #define EvaIwork12(actor) (actor)->iwork[12] -#define EvaIwork13(actor) (actor)->iwork[13] +#define evaFormationFly(actor) (actor)->iwork[13] #define EvaIwork14(actor) (actor)->iwork[14] #define EvaIwork15(actor) (actor)->iwork[15] #define EvaIwork16(actor) (actor)->iwork[16] @@ -67,47 +67,70 @@ #define EV_CHANGE_AI 200 -#define EVENT_PLAY_MSG(rcid, msg) EVENT_CMD(EVOP_PLAY_MSG, rcid, msg) -#define EVENT_STOP_SCRIPT() EVENT_CMD(EVOP_STOP_SCRIPT, 0, 0) -#define EVENT_MAKE_TEXLINE(color) EVENT_CMD(EVOP_MAKE_TEXLINE, 0, color) -#define EVENT_STOP_TEXLINE() EVENT_CMD(EVOP_STOP_TEXLINE, 0, 0) -#define EVENT_INIT_ACTOR(info, health) EVENT_CMD(EVOP_INIT_ACTOR, health, info) #define EVENT_SET_SPEED(speed, zmode, time) EVENT_CMD(EVOP_SET_SPEED, EV_ZMODE(zmode) | ((speed) & 0x7F), time) #define EVENT_SET_ACCEL(speedTarget, zmode, time) EVENT_CMD(EVOP_SET_ACCEL, EV_ZMODE(zmode) | ((speedTarget) & 0x7F), time) -#define EVENT_SET_ROTATE() EVENT_CMD(EVOP_SET_ROTATE, 0, 0) -#define EVENT_STOP_ROTATE() EVENT_CMD(EVOP_STOP_ROTATE, 0, 0) -#define EVENT_SET_TRIGGER(cond, cmd) EVENT_CMD(EVOP_SET_TRIGGER, cmd, cond) -#define EVENT_SET_Z_TRIGGER(z, cmd) EVENT_SET_TRIGGER(EVC_CLOSE_Z + (s32)((z) / 10), cmd) -#define EVENT_CLEAR_TRIGGER(cmd) EVENT_SET_TRIGGER(EVC_NONE, cmd) -#define EVENT_LOOP(count, cmd) EVENT_CMD(EVOP_LOOP, cmd, count) -#define EVENT_GOTO(cmd) EVENT_LOOP(0, cmd) -#define EVENT_SET_SURFACE(type) EVENT_CMD(EVOP_SET_SURFACE, 0, type) -#define EVENT_DROP_ITEM(item) EVENT_CMD(EVOP_DROP_ITEM, 0, item) -#define EVENT_ADD_TO_GROUP(num, flags) EVENT_CMD(EVOP_ADD_TO_GROUP, flags, num) -#define EVENT_SET_REVERB(reverb) EVENT_CMD(EVOP_SET_REVERB, 0, reverb) -#define EVENT_STOP_BGM() EVENT_CMD(EVOP_STOP_BGM, 0, 0) -#define EVENT_SET_ACTION(action) EVENT_CMD(EVOP_SET_ACTION, 0, action) -#define EVENT_RESTORE_TEAM(teammate) EVENT_CMD(EVOP_RESTORE_TEAM, 0, teammate) -#define EVENT_PLAY_SFX(sfx) EVENT_CMD(EVOP_PLAY_SFX, 0, sfx) -#define EVENT_STOP_SFX(sfx) EVENT_CMD(EVOP_STOP_SFX, 0, sfx) -#define EVENT_SET_CALL(duration, voiceParam) EVENT_CMD(EVOP_SET_CALL, voiceParam, duration) +#define EVENT_SET_BASE_ZVEL(zvel) EVENT_CMD(EVOP_SET_BASE_ZVEL, 0, zvel) +#define EVENT_SET_AS_LEADER() EVENT_CMD(EVOP_SET_AS_LEADER, 0 ,0 ) +#define EVENT_START_FORMATION(duration) EVENT_CMD(EVOP_START_FORMATION, 0, duration) +#define EVENT_STOP_FORMATION() EVENT_CMD(EVOP_STOP_FORMATION, 0, 0) + +#define EVENT_F4_PLUS_X(rot, rotVel) EVENT_CMD(EVOP_F4_PLUS_X, (rotVel) * 10, rot) +#define EVENT_F4_MINUS_X(rot, rotVel) EVENT_CMD(EVOP_F4_MINUS_X, (rotVel) * 10, rot) +#define EVENT_F4_PLUS_Y(rot, rotVel) EVENT_CMD(EVOP_F4_PLUS_Y, (rotVel) * 10, rot) +#define EVENT_F4_MINUS_Y(rot, rotVel) EVENT_CMD(EVOP_F4_MINUS_Y, (rotVel) * 10, rot) + #define EVENT_ROT_PLUS_X(rot, rotVel) EVENT_CMD(EVOP_ROT_PLUS_X, (rotVel) * 10, rot) #define EVENT_ROT_MINUS_X(rot, rotVel) EVENT_CMD(EVOP_ROT_MINUS_X, (rotVel) * 10, rot) #define EVENT_ROT_PLUS_Y(rot, rotVel) EVENT_CMD(EVOP_ROT_PLUS_Y, (rotVel) * 10, rot) #define EVENT_ROT_MINUS_Y(rot, rotVel) EVENT_CMD(EVOP_ROT_MINUS_Y, (rotVel) * 10, rot) #define EVENT_ROT_PLUS_Z(rot, rotVel) EVENT_CMD(EVOP_ROT_PLUS_Z, (rotVel) * 10, rot) #define EVENT_ROT_MINUS_Z(rot, rotVel) EVENT_CMD(EVOP_ROT_MINUS_Z, (rotVel) * 10, rot) -#define EVENT_F4_PLUS_X(rot, rotVel) EVENT_CMD(EVOP_F4_PLUS_X, (rotVel) * 10, rot) -#define EVENT_F4_MINUS_X(rot, rotVel) EVENT_CMD(EVOP_F4_MINUS_X, (rotVel) * 10, rot) -#define EVENT_F4_PLUS_Y(rot, rotVel) EVENT_CMD(EVOP_F4_PLUS_Y, (rotVel) * 10, rot) -#define EVENT_F4_MINUS_Y(rot, rotVel) EVENT_CMD(EVOP_F4_MINUS_Y, (rotVel) * 10, rot) -#define EVENT_SET_BASE_ZVEL(zvel) EVENT_CMD(EVOP_SET_BASE_ZVEL, 0, zvel) -#define EVENT_SET_TEAM_ID(teamId) EVENT_CMD(EVOP_SET_TEAM_ID, 0, teamId) -#define EVENT_DAMAGE_TEAM(teamId, damage) EVENT_CMD(EVOP_DAMAGE_TEAM, damage, teamId) + +#define EVENT_SET_ROTATE() EVENT_CMD(EVOP_SET_ROTATE, 0, 0) +#define EVENT_STOP_ROTATE() EVENT_CMD(EVOP_STOP_ROTATE, 0, 0) + +#define EVENT_PURSUE_PLAYER(duration, turnRate) EVENT_CMD(EVOP_PURSUE_PLAYER, turnRate, duration) +#define EVENT_FLEE_PLAYER(duration, turnRate) EVENT_CMD(EVOP_FLEE_PLAYER, turnRate, duration) +#define EVENT_PURSUE_TARGET(duration, turnRate) EVENT_CMD(EVOP_PURSUE_TARGET, turnRate, duration) +#define EVENT_FLEE_TARGET(duration, turnRate) EVENT_CMD(EVOP_FLEE_TARGET, turnRate, duration) +#define EVENT_CHASE_TARGET(duration, turnRate) EVENT_CMD(EVOP_CHASE_TARGET, turnRate, duration) #define EVENT_SET_TARGET(teamId, spread) EVENT_CMD(EVOP_SET_TARGET, teamId, spread) -#define EVENT_CHASE_TARGET(duration, turnRate) EVENT_CMD(EVOP_CHASE_TARGET, duration, turnRate) +#define EVENT_PURSUE_CAMERA(duration, turnRate) EVENT_CMD(EVOP_PURSUE_CAMERA, turnRate, duration) +#define EVENT_FLEE_CAMERA(duration, turnRate) EVENT_CMD(EVOP_FLEE_CAMERA, turnRate, duration) #define EVENT_SET_WAIT(duration) EVENT_CMD(EVOP_SET_WAIT, 0, duration) +#define EVENT_SET_CALL(duration, voiceParam) EVENT_CMD(EVOP_SET_CALL, voiceParam, duration) +#define EVENT_RESTORE_TEAM(teammate) EVENT_CMD(EVOP_RESTORE_TEAM, 0, teammate) +#define EVENT_PLAY_SFX(sfx) EVENT_CMD(EVOP_PLAY_SFX, 0, sfx) +#define EVENT_STOP_SFX(sfx) EVENT_CMD(EVOP_STOP_SFX, 0, sfx) + +#define EVENT_SET_TRIGGER(cond, cmd) EVENT_CMD(EVOP_SET_TRIGGER, cmd, cond) +#define EVENT_SET_Z_TRIGGER(z, cmd) EVENT_SET_TRIGGER(EVC_CLOSE_Z + (s32)((z) / 100), cmd) +#define EVENT_CLEAR_TRIGGER(cmd) EVENT_SET_TRIGGER(EVC_NONE, cmd) + +#define EVENT_INIT_ACTOR(info, health) EVENT_CMD(EVOP_INIT_ACTOR, health, info) +#define EVENT_SET_TEAM_ID(teamId) EVENT_CMD(EVOP_SET_TEAM_ID, 0, teamId) + +#define EVENT_SET_ACTION(action) EVENT_CMD(EVOP_SET_ACTION, 0, action) +#define EVENT_ADD_TO_GROUP(num, flags) EVENT_CMD(EVOP_ADD_TO_GROUP, flags, num) + +#define EVENT_DROP_ITEM(item) EVENT_CMD(EVOP_DROP_ITEM, 0, item) + +#define EVENT_SET_REVERB(reverb) EVENT_CMD(EVOP_SET_REVERB, 0, reverb) +#define EVENT_SET_SURFACE(type) EVENT_CMD(EVOP_SET_SURFACE, 0, type) +#define EVENT_PLAY_MSG(rcid, msg) EVENT_CMD(EVOP_PLAY_MSG, rcid, msg) +#define EVENT_DAMAGE_TEAM(teamId, damage) EVENT_CMD(EVOP_DAMAGE_TEAM, damage, teamId) +#define EVENT_STOP_BGM() EVENT_CMD(EVOP_STOP_BGM, 0, 0) + +#define EVENT_MAKE_TEXLINE(color) EVENT_CMD(EVOP_MAKE_TEXLINE, 0, color) +#define EVENT_STOP_TEXLINE() EVENT_CMD(EVOP_STOP_TEXLINE, 0, 0) + +#define EVENT_LOOP(count, cmd) EVENT_CMD(EVOP_LOOP, cmd, count) +#define EVENT_GOTO(cmd) EVENT_LOOP(0, cmd) + +#define EVENT_STOP_SCRIPT() EVENT_CMD(EVOP_STOP_SCRIPT, 0, 0) + + typedef enum EventModeZ { EMZ_REST, EMZ_RELATIVE, @@ -119,9 +142,9 @@ typedef enum EventOpcode { /* 0 */ EVOP_SET_SPEED, /* 1 */ EVOP_SET_ACCEL, /* 2 */ EVOP_SET_BASE_ZVEL, - /* 3 */ EVOP_SET_TO_IWORK_9, - /* 4 */ EVOP_SET_IWORK_13, - /* 8 */ EVOP_CLEAR_IWORK_13 = 8, + /* 3 */ EVOP_SET_AS_LEADER, + /* 4 */ EVOP_START_FORMATION, + /* 8 */ EVOP_STOP_FORMATION = 8, /* 9 */ EVOP_F4_PLUS_X, /* 10 */ EVOP_F4_MINUS_X, /* 11 */ EVOP_F4_PLUS_Y, @@ -134,14 +157,14 @@ typedef enum EventOpcode { /* 21 */ EVOP_ROT_MINUS_Z, /* 24 */ EVOP_SET_ROTATE = 24, /* 25 */ EVOP_STOP_ROTATE, - /* 40 */ EVOP_SET_STATE_6 = 40, - /* 41 */ EVOP_SET_STATE_7, - /* 42 */ EVOP_SET_STATE_8, - /* 43 */ EVOP_SET_STATE_9, + /* 40 */ EVOP_PURSUE_PLAYER = 40, + /* 41 */ EVOP_FLEE_PLAYER, + /* 42 */ EVOP_PURSUE_TARGET, + /* 43 */ EVOP_FLEE_TARGET, /* 44 */ EVOP_CHASE_TARGET, /* 45 */ EVOP_SET_TARGET, - /* 46 */ EVOP_SET_STATE_14, - /* 47 */ EVOP_SET_STATE_15, + /* 46 */ EVOP_PURSUE_CAMERA, + /* 47 */ EVOP_FLEE_CAMERA, /* 48 */ EVOP_SET_WAIT, /* 56 */ EVOP_SET_CALL = 56, /* 57 */ EVOP_RESTORE_TEAM, @@ -166,7 +189,7 @@ typedef enum EventOpcode { typedef enum EventCondition { /* 0 */ EVC_NONE, - /* 1 */ EVC_1, + /* 1 */ EVC_NO_TARGET, /* 2 */ EVC_TEAM_COUNT_3, /* 3 */ EVC_TEAM_COUNT_2, /* 4 */ EVC_TEAM_COUNT_1, @@ -206,12 +229,12 @@ typedef enum EventCondition { /* 38 */ EVC_UNK3_LASER, /* 39 */ EVC_SHOT_CLOSE_150, /* 40 */ EVC_SHOT_CLOSE_300, - /* 41 */ EVC_41, - /* 42 */ EVC_42, - /* 43 */ EVC_43, + /* 41 */ EVC_NO_LEADER, + /* 42 */ EVC_NO_FOLLOWER, + /* 43 */ EVC_HAS_FOLLOWER, /* 44 */ EVC_TOOK_DAMAGE, /* 45 */ EVC_PASSED_ALL_RINGS, - /* 46 */ EVC_46, + /* 46 */ EVC_ATTACK_GROUP_CLEARED, /* 47 */ EVC_PRESS_CRIGHT, /* 48 */ EVC_WING_BROKEN, /* 49 */ EVC_ME_CLEAR, @@ -227,14 +250,12 @@ typedef enum EventCondition { /* 59 */ EVC_ZO_CLEAR, /* 60 */ EVC_SZ_CLEAR, /* 61 */ EVC_A6_CLEAR, - /* 62 */ EVC_62, - /* 63 */ EVC_63, + /* 62 */ EVC_NOT_CHASED, + /* 63 */ EVC_CHASED, /* 64 */ EVC_MISSED_SEARCHLIGHT, /* 65 */ EVC_30_HITS, /* 66 */ EVC_80_HITS, /* 67 */ EVC_EXPERT_MODE, - /* 68 */ EVC_68, - /* 69 */ EVC_69, /* 100 */ EVC_CLOSE_Z=100, } EventCondition; @@ -245,16 +266,16 @@ typedef enum EventState { /* 3 */ EVSTATE_F4_MINUS_X, /* 4 */ EVSTATE_F4_PLUS_Y, /* 5 */ EVSTATE_F4_MINUS_Y, - /* 6 */ EVSTATE_6, - /* 7 */ EVSTATE_7, - /* 8 */ EVSTATE_8, - /* 9 */ EVSTATE_9, + /* 6 */ EVSTATE_PURSUE_PLAYER, + /* 7 */ EVSTATE_FLEE_PLAYER, + /* 8 */ EVSTATE_PURSUE_TARGET, + /* 9 */ EVSTATE_FLEE_TARGET, /* 10 */ EVSTATE_ME_AS_OPEN, /* 11 */ EVSTATE_ME_AS_CLOSE, /* 12 */ EVSTATE_TEAM_RETREAT, /* 13 */ EVSTATE_CHASE_TARGET, - /* 14 */ EVSTATE_14, - /* 15 */ EVSTATE_15, + /* 14 */ EVSTATE_PURSUE_CAMERA, + /* 15 */ EVSTATE_FLEE_CAMERA, /* 200 */ EVSTATE_SCRIPT_END = 200, /* 1000 */ EVSTATE_1000 = 1000, } EventState; @@ -273,7 +294,7 @@ typedef enum EventAction { /* 10 */ EVACT_10, /* 11 */ EVACT_11, /* 12 */ EVACT_DESPAWN, - /* 13 */ EVACT_13, + /* 13 */ EVACT_TI_DROP_MINE, /* 14 */ EVACT_ME_AS_OPEN, /* 15 */ EVACT_ME_AS_CLOSE, /* 16 */ EVACT_16, @@ -282,119 +303,119 @@ typedef enum EventAction { /* 19 */ EVACT_19, } EventAction; -typedef enum EventActorInfo { - /* 0 */ EINFO_0, - /* 1 */ EINFO_1, - /* 2 */ EINFO_2, - /* 3 */ EINFO_3, - /* 4 */ EINFO_4, - /* 5 */ EINFO_5, - /* 6 */ EINFO_6, - /* 7 */ EINFO_7, - /* 8 */ EINFO_8, - /* 9 */ EINFO_9, - /* 10 */ EINFO_10, - /* 11 */ EINFO_11, - /* 12 */ EINFO_12, - /* 13 */ EINFO_13, - /* 14 */ EINFO_14, - /* 15 */ EINFO_15, - /* 16 */ EINFO_16, - /* 17 */ EINFO_17, - /* 18 */ EINFO_18, - /* 19 */ EINFO_19, - /* 20 */ EINFO_20, - /* 21 */ EINFO_21, - /* 22 */ EINFO_22, - /* 23 */ EINFO_23, - /* 24 */ EINFO_24, - /* 25 */ EINFO_25, - /* 26 */ EINFO_26, - /* 27 */ EINFO_27, - /* 28 */ EINFO_28, - /* 29 */ EINFO_29, - /* 30 */ EINFO_30, - /* 31 */ EINFO_31, - /* 32 */ EINFO_32, - /* 33 */ EINFO_33, - /* 34 */ EINFO_34, - /* 35 */ EINFO_35, - /* 36 */ EINFO_36, - /* 37 */ EINFO_37, - /* 38 */ EINFO_38, - /* 39 */ EINFO_39, - /* 40 */ EINFO_40, - /* 41 */ EINFO_41, - /* 42 */ EINFO_42, - /* 43 */ EINFO_43, - /* 44 */ EINFO_44, - /* 45 */ EINFO_45, - /* 46 */ EINFO_46, - /* 47 */ EINFO_47, - /* 48 */ EINFO_48, - /* 49 */ EINFO_49, - /* 50 */ EINFO_50, - /* 51 */ EINFO_51, - /* 52 */ EINFO_52, - /* 53 */ EINFO_53, - /* 54 */ EINFO_54, - /* 55 */ EINFO_55, - /* 56 */ EINFO_56, - /* 57 */ EINFO_57, - /* 58 */ EINFO_58, - /* 59 */ EINFO_59, - /* 60 */ EINFO_60, - /* 61 */ EINFO_61, - /* 62 */ EINFO_62, - /* 63 */ EINFO_63, - /* 64 */ EINFO_64, - /* 65 */ EINFO_65, - /* 66 */ EINFO_66, - /* 67 */ EINFO_67, - /* 68 */ EINFO_68, - /* 69 */ EINFO_69, - /* 70 */ EINFO_70, - /* 71 */ EINFO_71, - /* 72 */ EINFO_72, - /* 73 */ EINFO_73, - /* 74 */ EINFO_74, - /* 75 */ EINFO_75, - /* 76 */ EINFO_76, - /* 77 */ EINFO_77, - /* 78 */ EINFO_78, - /* 79 */ EINFO_79, - /* 80 */ EINFO_80, - /* 81 */ EINFO_81, - /* 82 */ EINFO_82, - /* 83 */ EINFO_83, - /* 84 */ EINFO_84, - /* 85 */ EINFO_85, - /* 86 */ EINFO_86, - /* 87 */ EINFO_87, - /* 88 */ EINFO_88, - /* 89 */ EINFO_89, - /* 90 */ EINFO_90, - /* 91 */ EINFO_91, - /* 92 */ EINFO_92, - /* 93 */ EINFO_93, - /* 94 */ EINFO_94, - /* 95 */ EINFO_95, - /* 96 */ EINFO_96, - /* 97 */ EINFO_97, - /* 98 */ EINFO_98, - /* 99 */ EINFO_99, - /* 100 */ EINFO_100, - /* 101 */ EINFO_101, - /* 102 */ EINFO_102, - /* 103 */ EINFO_103, - /* 104 */ EINFO_104, - /* 105 */ EINFO_105, - /* 106 */ EINFO_106, - /* 107 */ EINFO_107, - /* 200 */ EINFO_200 = 200, - /* 300 */ EINFO_300 = 300, - /* 4095*/ EINFO_FFF = 4095, -} EventActorInfo; +typedef enum EventActorId { + /* 0 */ EVID_0, + /* 1 */ EVID_1, + /* 2 */ EVID_2, + /* 3 */ EVID_3, + /* 4 */ EVID_4, + /* 5 */ EVID_5, + /* 6 */ EVID_6, + /* 7 */ EVID_7, + /* 8 */ EVID_8, + /* 9 */ EVID_9, + /* 10 */ EVID_10, + /* 11 */ EVID_11, + /* 12 */ EVID_12, + /* 13 */ EVID_13, + /* 14 */ EVID_14, + /* 15 */ EVID_15, + /* 16 */ EVID_16, + /* 17 */ EVID_17, + /* 18 */ EVID_18, + /* 19 */ EVID_19, + /* 20 */ EVID_20, + /* 21 */ EVID_21, + /* 22 */ EVID_22, + /* 23 */ EVID_23, + /* 24 */ EVID_24, + /* 25 */ EVID_25, + /* 26 */ EVID_26, + /* 27 */ EVID_27, + /* 28 */ EVID_28, + /* 29 */ EVID_29, + /* 30 */ EVID_30, + /* 31 */ EVID_31, + /* 32 */ EVID_32, + /* 33 */ EVID_33, + /* 34 */ EVID_34, + /* 35 */ EVID_35, + /* 36 */ EVID_36, + /* 37 */ EVID_37, + /* 38 */ EVID_38, + /* 39 */ EVID_39, + /* 40 */ EVID_40, + /* 41 */ EVID_41, + /* 42 */ EVID_42, + /* 43 */ EVID_43, + /* 44 */ EVID_44, + /* 45 */ EVID_45, + /* 46 */ EVID_46, + /* 47 */ EVID_47, + /* 48 */ EVID_48, + /* 49 */ EVID_49, + /* 50 */ EVID_50, + /* 51 */ EVID_51, + /* 52 */ EVID_52, + /* 53 */ EVID_53, + /* 54 */ EVID_54, + /* 55 */ EVID_55, + /* 56 */ EVID_56, + /* 57 */ EVID_57, + /* 58 */ EVID_58, + /* 59 */ EVID_59, + /* 60 */ EVID_60, + /* 61 */ EVID_61, + /* 62 */ EVID_62, + /* 63 */ EVID_63, + /* 64 */ EVID_64, + /* 65 */ EVID_65, + /* 66 */ EVID_66, + /* 67 */ EVID_67, + /* 68 */ EVID_68, + /* 69 */ EVID_69, + /* 70 */ EVID_70, + /* 71 */ EVID_71, + /* 72 */ EVID_72, + /* 73 */ EVID_73, + /* 74 */ EVID_74, + /* 75 */ EVID_75, + /* 76 */ EVID_76, + /* 77 */ EVID_77, + /* 78 */ EVID_78, + /* 79 */ EVID_79, + /* 80 */ EVID_80, + /* 81 */ EVID_81, + /* 82 */ EVID_82, + /* 83 */ EVID_83, + /* 84 */ EVID_84, + /* 85 */ EVID_85, + /* 86 */ EVID_86, + /* 87 */ EVID_87, + /* 88 */ EVID_88, + /* 89 */ EVID_89, + /* 90 */ EVID_90, + /* 91 */ EVID_91, + /* 92 */ EVID_92, + /* 93 */ EVID_93, + /* 94 */ EVID_94, + /* 95 */ EVID_95, + /* 96 */ EVID_96, + /* 97 */ EVID_97, + /* 98 */ EVID_98, + /* 99 */ EVID_99, + /* 100 */ EVID_100, + /* 101 */ EVID_101, + /* 102 */ EVID_102, + /* 103 */ EVID_103, + /* 104 */ EVID_104, + /* 105 */ EVID_105, + /* 106 */ EVID_106, + /* 107 */ EVID_107, + /* 200 */ EVID_200 = 200, + /* 300 */ EVID_300 = 300, + /* 4095*/ EVID_FFF = 4095, +} EventActorId; typedef enum EventSfx { /* 0 */ EVSFX_0, diff --git a/include/sf64object.h b/include/sf64object.h index 53ee4eec..574ac14b 100644 --- a/include/sf64object.h +++ b/include/sf64object.h @@ -261,10 +261,14 @@ typedef struct { /* 0x3FC */ f32 sfxSource[3]; } Boss; // size = 0x408 +#define DMG_COLLISION 3 +#define DMG_EXPLOSION 2 #define DMG_BEAM 1 #define DMG_NONE 0 #define DMG_BOMB -1 -#define DMG_zRot_0FC 100 +#define DMG_UNK_100 100 + + typedef struct { /* 0x000 */ Object obj; @@ -963,7 +967,7 @@ typedef Scenery Scenery_35; typedef Scenery Scenery_36; typedef Scenery Scenery_37; typedef Scenery Scenery_38; -typedef Scenery Scenery_39; +typedef Scenery MeteoTunnel; typedef Scenery Scenery_40; typedef Scenery Scenery_41; typedef Scenery Scenery_42; diff --git a/include/sf64player.h b/include/sf64player.h index ccd81441..e0d42f5f 100644 --- a/include/sf64player.h +++ b/include/sf64player.h @@ -86,6 +86,11 @@ typedef enum { /* 9 */ PLAYERSHOT_9, } PlayerShotId; +#define NPC_SHOT_ID 100 +#define CS_SHOT_ID 100 +#define DMG_SRC_2 2 +#define DMG_SRC_100 100 + typedef enum { /* 0 */ LASERS_SINGLE, /* 1 */ LASERS_TWIN, @@ -108,7 +113,7 @@ typedef struct { /* 0x5C */ s32 unk_5C; /* 0x60 */ s32 unk_60; /* 0x64 */ s32 unk_64; - /* 0x68 */ s32 playerNum; + /* 0x68 */ s32 sourceId; /* 0x6C */ u8 bonus; } PlayerShot; // size = 0x70 diff --git a/include/variables.h b/include/variables.h index f8ecd58f..fa6760d2 100644 --- a/include/variables.h +++ b/include/variables.h @@ -7,7 +7,7 @@ #include "sf64player.h" // fox_360 -extern s32 D_360_800C9B4C; +extern s32 gAllRangeSpawnEvent; // fox_bg extern u16 gStarColors[16]; @@ -47,7 +47,7 @@ extern f32 gWarpZoneEvent94Hitbox[]; extern f32 gWarpZoneEvent96Hitbox[]; extern f32 gWarpZoneEvent92Hitbox[]; extern f32 gWarpZoneEvent93Hitbox[]; -extern ObjectInfo D_edata_800CC124[]; +extern ObjectInfo gObjectInfo[]; extern f32* D_edata_800CF964[]; // fox_edisplay diff --git a/linker_scripts/us/symbol_addrs.txt b/linker_scripts/us/symbol_addrs.txt index 36afc6f2..74125aff 100644 --- a/linker_scripts/us/symbol_addrs.txt +++ b/linker_scripts/us/symbol_addrs.txt @@ -67,7 +67,7 @@ D_display_800CA23C = 0x800CA23C;//size:0x18 D_display_800CA26C = 0x800CA26C;//size:0x20 D_800CA260 = 0x800CA260;//size:0xC D_display_801613E0 = 0x801613E0;//size:0x18 -D_edata_800CC124 = 0x800CC124;//type:u8 +gObjectInfo = 0x800CC124;//type:u8 D_boss_800C9E90 = 0x800C9E90;//size:0x70 gLeveLClearStatus = 0x800D3180; // size:0x20 diff --git a/linker_scripts/us/symbol_addrs_engine.txt b/linker_scripts/us/symbol_addrs_engine.txt index b2c1b0e9..27c43104 100644 --- a/linker_scripts/us/symbol_addrs_engine.txt +++ b/linker_scripts/us/symbol_addrs_engine.txt @@ -551,11 +551,11 @@ gBombCount = 0x80177DA0; gGameFrameCount = 0x80177DB0; gObjectLoadIndex = 0x80177DC8; gPrevEventActorIndex = 0x80177E70; -D_ctx_80177E78 = 0x80177E78; +gFormationLeaderIndex = 0x80177E78; gRingPassCount = 0x80177E80; -D_ctx_80177E88 = 0x80177E88; // size:0xC +gFormationInitRot = 0x80177E88; // size:0xC gTeamArrowsViewPos = 0x80177E98; -D_ctx_80177F10 = 0x80177F10; +gFormationInitPos = 0x80177F10; D_ctx_80177F20 = 0x80177F20; //size:0xF4 D_ctx_80178028 = 0x80178028; //size:0xF4 D_ctx_8017812C = 0x8017812C; diff --git a/src/engine/fox_360.c b/src/engine/fox_360.c index 173c0fa5..d158a64f 100644 --- a/src/engine/fox_360.c +++ b/src/engine/fox_360.c @@ -32,32 +32,6 @@ typedef enum ActorAllRangeState { STATE360_19, } ActorAllRangeState; -/* static */ Vec3f D_360_800C9A90 = { 0.0f, -10.0f, 0.0f }; -/* static */ Vec3f D_360_800C9A9C[4] = { - { 0.0f, 20000.0f, 0.0f }, - { 0.0f, 700.0f, 6500.0f }, - { -300.0f, 800.0f, 6800.0f }, - { 300.0f, 900.0f, 7200.0f }, -}; -/* static */ AllRangeAi D_360_800C9ACC[4] = { AI360_FOX, AI360_FALCO, AI360_SLIPPY, AI360_PEPPY }; -/* static */ s32 D_360_800C9ADC[4] = { -1, AI360_10, AI360_10 + 1, AI360_10 + 2 }; -/* static */ s32 D_360_800C9AEC[4] = { -1, AI360_10 + 11, AI360_10 + 13, AI360_10 + 15 }; -/* static */ Vec3f D_360_800C9AFC[4] = { - { 9500.0f, 5000.0f, 9500.0f }, - { 10000.0f, 5000.0f, 10000.0f }, - { 10000.0f, 5000.0f, 9500.0f }, - { 9500.0f, 5000.0f, 10000.0f }, -}; -/* static */ s32 D_360_800C9B2C[4] = { AI360_FOX, AI360_FALCO, AI360_PEPPY, AI360_SLIPPY }; -/* static */ f32 D_360_800C9B3C[4] = { 330.0f, 90.0f, 280.0f, 70.0f }; -s32 D_360_800C9B4C = 96 * 30; -/* static */ Vec3f D_360_800C9B50[6] = { - { 8000.0f, 500.0f, 0.0f }, { 5000.0f, 400.0f, 0.0f }, { 2000.0f, 300.0f, 0.0f }, - { -500.0f, 250.0f, 0.0f }, { 0.0f, 250.0f, 0.0f }, { 0.0f, 250.0f, 0.0f }, -}; -/* static */ Vec3f D_360_800C9B98 = { 60.0f, 0.0f, -170.0f }; -/* static */ Vec3f D_360_800C9BA4 = { -60.0f, 0.0f, -170.0f }; - s32 gAllRangeSupplyTimer; s32 sStarWolfKillTimer; s16 gStarWolfMsgTimer; @@ -318,7 +292,7 @@ void func_360_8002EE64(Actor* this) { Vec3f spB4; Vec3f spA8; f32 spA0[2]; - Vec3f sp94 = D_360_800C9A90; + Vec3f sp94 = { 0.0f, -10.0f, 0.0f }; s32 pad1; s32 pad2; @@ -377,6 +351,16 @@ void func_360_8002EE64(Actor* this) { } } +static Vec3f sTeamSpawnPos[4] = { + { 0.0f, 20000.0f, 0.0f }, + { 0.0f, 700.0f, 6500.0f }, + { -300.0f, 800.0f, 6800.0f }, + { 300.0f, 900.0f, 7200.0f }, +}; +static AllRangeAi sTeamAi[4] = { AI360_FOX, AI360_FALCO, AI360_SLIPPY, AI360_PEPPY }; +static s32 sTeamSpawnTargets[4] = { -1, AI360_10, AI360_10 + 1, AI360_10 + 2 }; +static s32 sTeamSpawnTargetsKA[4] = { -1, AI360_10 + 11, AI360_10 + 13, AI360_10 + 15 }; + void ActorAllRange_SpawnTeam(void) { Actor* actor; s32 i; @@ -393,14 +377,14 @@ void ActorAllRange_SpawnTeam(void) { if (i == 0) { actor->aiType = AI360_EVENT_HANDLER; } else { - actor->obj.pos.x = D_360_800C9A9C[i].x; - actor->obj.pos.y = D_360_800C9A9C[i].y; - actor->obj.pos.z = D_360_800C9A9C[i].z; - actor->aiType = D_360_800C9ACC[i]; + actor->obj.pos.x = sTeamSpawnPos[i].x; + actor->obj.pos.y = sTeamSpawnPos[i].y; + actor->obj.pos.z = sTeamSpawnPos[i].z; + actor->aiType = sTeamAi[i]; if (gCurrentLevel == LEVEL_KATINA) { - actor->aiIndex = D_360_800C9AEC[i]; + actor->aiIndex = sTeamSpawnTargetsKA[i]; } else { - actor->aiIndex = D_360_800C9ADC[i]; + actor->aiIndex = sTeamSpawnTargets[i]; } actor->state = STATE360_2; actor->unk_0F4.y = 180.0f; @@ -424,6 +408,16 @@ void ActorAllRange_SpawnTeam(void) { } } +static Vec3f sStarWolfSpawnPos[4] = { + { 9500.0f, 5000.0f, 9500.0f }, + { 10000.0f, 5000.0f, 10000.0f }, + { 10000.0f, 5000.0f, 9500.0f }, + { 9500.0f, 5000.0f, 10000.0f }, +}; +static s32 sStarWolfSpawnTargets[4] = { AI360_FOX, AI360_FALCO, AI360_PEPPY, AI360_SLIPPY }; +static f32 sStarWolfVE2SpawnRot[4] = { 330.0f, 90.0f, 280.0f, 70.0f }; +s32 gAllRangeSpawnEvent = 96 * 30; + void ActorAllRange_SpawnStarWolf(void) { Actor* actor; s32 i; @@ -432,12 +426,12 @@ void ActorAllRange_SpawnStarWolf(void) { if (gStarWolfTeamAlive[i] != 0) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; - actor->obj.pos.x = D_360_800C9AFC[i].x; - actor->obj.pos.y = D_360_800C9AFC[i].y; - actor->obj.pos.z = D_360_800C9AFC[i].z; + actor->obj.pos.x = sStarWolfSpawnPos[i].x; + actor->obj.pos.y = sStarWolfSpawnPos[i].y; + actor->obj.pos.z = sStarWolfSpawnPos[i].z; actor->obj.id = OBJ_ACTOR_ALLRANGE; actor->aiType = i + AI360_WOLF; - actor->aiIndex = D_360_800C9B2C[i]; + actor->aiIndex = sStarWolfSpawnTargets[i]; gActors[actor->aiIndex].aiIndex = -1; actor->health = 100; actor->unk_0C9 = 1; @@ -447,7 +441,7 @@ void ActorAllRange_SpawnStarWolf(void) { actor->unk_0F4.x = -20.0f; actor->iwork[11] = 1; if (gCurrentLevel == LEVEL_VENOM_2) { - actor->obj.rot.z = D_360_800C9B3C[i]; + actor->obj.rot.z = sStarWolfVE2SpawnRot[i]; actor->itemDrop = DROP_SILVER_STAR; } Object_SetInfo(&actor->info, actor->obj.id); @@ -473,7 +467,7 @@ void ActorAllRange_StarWolfDefeatMesg(u16* msg, RadioCharacterId character) { ActorAllRange_PlayMessage(msg, character); } -void func_360_8002F69C(Actor* this) { +void ActorAllRange_UpdateStarWolfEvents(Actor* this) { Actor* actor; s32 i; @@ -484,12 +478,12 @@ void func_360_8002F69C(Actor* this) { Radio_PlayMessage(gMsg_ID_19465, RCID_FOX); } } - if (((gAllRangeEventTimer + 100) == (0, D_360_800C9B4C)) && (gCurrentLevel != LEVEL_VENOM_2)) { + if ((gAllRangeEventTimer + 100 == (0, gAllRangeSpawnEvent)) && (gCurrentLevel != LEVEL_VENOM_2)) { // fake? SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 30); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 30); } - if (gAllRangeEventTimer == D_360_800C9B4C) { + if (gAllRangeEventTimer == gAllRangeSpawnEvent) { ActorAllRange_SpawnStarWolf(); this->state = STATE360_3; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_STANDBY; @@ -509,11 +503,11 @@ void func_360_8002F69C(Actor* this) { gPlayer[0].cam.at.y = gActors[AI360_WOLF].obj.pos.y; gPlayer[0].cam.at.z = gActors[AI360_WOLF].obj.pos.z; } - if ((gAllRangeEventTimer > D_360_800C9B4C) && (gStarWolfMsgTimer == 0)) { + if ((gAllRangeEventTimer > gAllRangeSpawnEvent) && (gStarWolfMsgTimer == 0)) { gAllRangeFrameCount++; for (i = AI360_FALCO, actor = &gActors[AI360_FALCO]; i <= AI360_ANDREW; i++, actor++) { if ((actor->obj.status == OBJ_ACTIVE) && (actor->state == STATE360_2) && (actor->health < 70) && - (actor->timer_0C6 != 0) && (actor->dmgSource == 1)) { + (actor->timer_0C6 != 0) && (actor->dmgSource == AI360_FOX + 1)) { if ((gActors[actor->aiIndex].state == STATE360_3) && (gActors[actor->aiIndex].aiType <= AI360_ANDREW)) { gActors[actor->aiIndex].iwork[2] = AI360_FOX; gActors[actor->aiIndex].state = STATE360_2; @@ -560,24 +554,24 @@ void func_360_8002F69C(Actor* this) { } } -void func_360_8002FB4C(Actor* actor) { - Actor* actor2; - Actor* actor1; - s32 var_a0; - s32 j; - s32 i; +void ActorAllRange_ChooseNewTarget(Actor* actor) { + Actor* team; + Actor* enemy; + s32 alreadyTaken; + s32 teamId; + s32 enemyId; - for (i = 10, actor1 = &gActors[10]; i < ARRAY_COUNT(gActors); i++, actor1++) { - if ((actor1->obj.status == OBJ_ACTIVE) && (actor1->obj.id == OBJ_ACTOR_ALLRANGE) && (actor1->unk_0B6 == 0) && - (actor1->aiIndex <= -1)) { - var_a0 = false; - for (j = 1, actor2 = &gActors[1]; j < 4; j++, actor2++) { - if ((j != actor->index) && (i == actor2->aiIndex)) { - var_a0 = true; + for (enemyId = AI360_10, enemy = &gActors[AI360_10]; enemyId < ARRAY_COUNT(gActors); enemyId++, enemy++) { + if ((enemy->obj.status == OBJ_ACTIVE) && (enemy->obj.id == OBJ_ACTOR_ALLRANGE) && (enemy->unk_0B6 == 0) && + (enemy->aiIndex <= -1)) { + alreadyTaken = false; + for (teamId = AI360_FALCO, team = &gActors[AI360_FALCO]; teamId <= AI360_PEPPY; teamId++, team++) { + if ((teamId != actor->index) && (enemyId == team->aiIndex)) { + alreadyTaken = true; } } - if (!var_a0) { - actor->aiIndex = i; + if (!alreadyTaken) { + actor->aiIndex = enemyId; actor->state = STATE360_2; actor->iwork[2] = AI360_FOX; break; @@ -586,29 +580,30 @@ void func_360_8002FB4C(Actor* actor) { } } -void func_360_8002FC00(Actor* this) { - Actor* actor; +void ActorAllRange_UpdateEvemyEvents(Actor* this) { + Actor* enemy; s32 i; - for (i = 0, actor = &gActors[10]; i < 50; i++, actor++) { - if ((actor->obj.status == OBJ_DYING) && (actor->aiIndex >= AI360_FALCO) && (actor->aiIndex <= AI360_PEPPY)) { - Actor* actor2; + for (i = 0, enemy = &gActors[AI360_10]; i < 50; i++, enemy++) { + if ((enemy->obj.status == OBJ_DYING) && (enemy->aiIndex >= AI360_FALCO) && (enemy->aiIndex <= AI360_PEPPY)) { + Actor* enemy2; s32 j; - for (j = 0, actor2 = &gActors[10]; j < 51; j++, actor2++) { - if ((actor2->obj.status == OBJ_ACTIVE) && (actor2->state == STATE360_2) && - (actor2->aiIndex == actor->aiIndex)) { + for (j = 0, enemy2 = &gActors[AI360_10]; j <= 50; j++, enemy2++) { // bug? should be < + if ((enemy2->obj.status == OBJ_ACTIVE) && (enemy2->state == STATE360_2) && + (enemy2->aiIndex == enemy->aiIndex)) { return; } } - if (gTeamShields[actor->aiIndex] > 0) { - func_360_8002FB4C(&gActors[actor->aiIndex]); - if ((actor->iwork[5] != 0) && (actor->dmgSource == 1) && (gActors[actor->aiIndex].iwork[3] == 0)) { - if (gTeamHelpActor == &gActors[actor->aiIndex]) { + if (gTeamShields[enemy->aiIndex] > 0) { + ActorAllRange_ChooseNewTarget(&gActors[enemy->aiIndex]); + if ((enemy->iwork[5] != 0) && (enemy->dmgSource == AI360_FOX + 1) && + (gActors[enemy->aiIndex].iwork[3] == 0)) { + if (gTeamHelpActor == &gActors[enemy->aiIndex]) { gTeamHelpActor = NULL; gTeamHelpTimer = 0; } - switch (gActors[actor->aiIndex].aiType) { + switch (gActors[enemy->aiIndex].aiType) { case AI360_FALCO: ActorAllRange_PlayMessage(gMsg_ID_9160, RCID_FALCO); break; @@ -619,8 +614,8 @@ void func_360_8002FC00(Actor* this) { ActorAllRange_PlayMessage(gMsg_ID_9180, RCID_PEPPY); break; } - gActors[actor->aiIndex].iwork[3] = 200; - gActors[actor->aiIndex].timer_0C4 = 600; + gActors[enemy->aiIndex].iwork[3] = 200; + gActors[enemy->aiIndex].timer_0C4 = 600; } } } @@ -630,7 +625,7 @@ void func_360_8002FC00(Actor* this) { bool AllRange_SupplyEvent(void) { switch (gCurrentLevel) { case LEVEL_FORTUNA: - return gAllRangeEventTimer == D_360_800C9B4C + 2400; + return gAllRangeEventTimer == gAllRangeSpawnEvent + 2400; case LEVEL_BOLSE: return gBosses[2].swork[36] == 4; case LEVEL_KATINA: @@ -814,40 +809,40 @@ void ActorAllRange_ApplyDamage(Actor* this) { Vec3f sp48; Vec3f sp3C; - if (this->dmgType != 0) { + if (this->dmgType != DMG_NONE) { if (this->aiType == AI360_GREAT_FOX) { - this->dmgType = 0; + this->dmgType = DMG_NONE; } - if ((this->dmgType >= 2) && (this->aiType >= AI360_WOLF) && (this->aiType < AI360_KATT)) { + if ((this->dmgType >= DMG_EXPLOSION) && (this->aiType >= AI360_WOLF) && (this->aiType <= AI360_ANDREW)) { this->damage = 10; this->timer_0C2 = 10; } if (((this->aiType <= AI360_PEPPY) || (this->aiType == AI360_BILL) || (this->aiType == AI360_KATT)) && - (this->dmgType == 2)) { - this->dmgType = 0; + (this->dmgType == DMG_EXPLOSION)) { + this->dmgType = DMG_NONE; } - if ((this->dmgType == 2) && (this->fwork[22] > 0.0f)) { - this->dmgType = 0; + if ((this->dmgType == DMG_EXPLOSION) && (this->fwork[22] > 0.0f)) { + this->dmgType = DMG_NONE; } if (this->fwork[23] > 1.0f) { - this->dmgType = 0; + this->dmgType = DMG_NONE; } - if (this->dmgType != 0) { + if (this->dmgType != DMG_NONE) { var_a1 = false; if ((this->unk_0B6 == 3) || ((gCurrentLevel == LEVEL_BOLSE) && (gBosses[1].obj.status != OBJ_FREE) && (this->aiType >= AI360_WOLF)) || ((gCurrentLevel == LEVEL_VENOM_2) && (this->aiType >= AI360_WOLF) && (this->aiType < AI360_10) && - (this->dmgType == 2))) { - this->damage = 0; + (this->dmgType == DMG_EXPLOSION))) { + this->damage = DMG_NONE; var_a1 = true; if (gCurrentLevel == LEVEL_BOLSE) { this->dmgSource = 0; } } if (this->aiType >= AI360_WOLF) { - if (!((this->dmgType == 3) && (this->aiType == AI360_WOLF)) && - !((this->aiType == AI360_MISSILE) && (this->dmgType == 2))) { + if (!((this->dmgType == DMG_COLLISION) && (this->aiType == AI360_WOLF)) && + !((this->aiType == AI360_MISSILE) && (this->dmgType == DMG_EXPLOSION))) { this->health -= this->damage; } } else if ((this->aiType <= AI360_PEPPY) && (this->state != STATE360_6)) { @@ -861,8 +856,8 @@ void ActorAllRange_ApplyDamage(Actor* this) { this->health = 0; if (this->aiType == AI360_MISSILE) { SectorZ_80199900(this, 1); - if (this->dmgSource == 1) { - if (gActors[8].obj.status == OBJ_ACTIVE) { + if (this->dmgSource == AI360_FOX + 1) { + if (gActors[AI360_KATT].obj.status == OBJ_ACTIVE) { Radio_PlayMessage(gMsg_ID_16140, RCID_KATT); } BonusText_Display(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 10); @@ -870,16 +865,16 @@ void ActorAllRange_ApplyDamage(Actor* this) { D_ctx_80177850 = 15; } else { switch (this->dmgSource) { - case 102: + case AI360_FALCO + NPC_SHOT_ID + 1: Radio_PlayMessage(gMsg_ID_16170, RCID_FALCO); break; - case 103: + case AI360_SLIPPY + NPC_SHOT_ID + 1: Radio_PlayMessage(gMsg_ID_16180, RCID_SLIPPY); break; - case 104: + case AI360_PEPPY + NPC_SHOT_ID + 1: Radio_PlayMessage(gMsg_ID_16175, RCID_PEPPY); break; - case 109: + case AI360_KATT + NPC_SHOT_ID + 1: Radio_PlayMessage(gMsg_ID_16185, RCID_KATT); break; } @@ -925,7 +920,7 @@ void ActorAllRange_ApplyDamage(Actor* this) { if (this->damage >= 20) { this->timer_0BC = 0; } - if ((gCurrentLevel == LEVEL_KATINA) && (this->unk_0B6 == 1) && (this->dmgSource == 1)) { + if ((gCurrentLevel == LEVEL_KATINA) && (this->unk_0B6 == 1) && (this->dmgSource == AI360_FOX + 1)) { if (gKaAllyKillCount < 2) { ActorAllRange_PlayMessage(gMsg_ID_18018, RCID_BILL); } @@ -969,7 +964,7 @@ void ActorAllRange_ApplyDamage(Actor* this) { sStarWolfKillTimer = 150; } switch (this->dmgSource) { - case 1: + case AI360_FOX + 1: if (this->aiType >= AI360_10) { switch (this->iwork[2]) { case AI360_FALCO: @@ -984,28 +979,28 @@ void ActorAllRange_ApplyDamage(Actor* this) { } } break; - case 102: - case 103: - case 104: + case AI360_FALCO + NPC_SHOT_ID + 1: + case AI360_SLIPPY + NPC_SHOT_ID + 1: + case AI360_PEPPY + NPC_SHOT_ID + 1: if ((this->aiType >= AI360_WOLF) && (this->aiType <= AI360_ANDREW)) { if ((gStarWolfTeamAlive[0] + gStarWolfTeamAlive[1] + gStarWolfTeamAlive[2] + gStarWolfTeamAlive[3]) == 0) { switch (this->dmgSource) { - case 102: + case AI360_FALCO + NPC_SHOT_ID + 1: Radio_PlayMessage(gMsg_ID_9438, RCID_FALCO); break; - case 103: + case AI360_SLIPPY + NPC_SHOT_ID + 1: Radio_PlayMessage(gMsg_ID_9436, RCID_SLIPPY); break; - case 104: + case AI360_PEPPY + NPC_SHOT_ID + 1: Radio_PlayMessage(gMsg_ID_9437, RCID_PEPPY); break; } } else { - gActors[this->dmgSource - 101].iwork[1] = 80; + gActors[this->dmgSource - NPC_SHOT_ID - 1].iwork[1] = 80; } } else { - gActors[this->dmgSource - 101].iwork[1] = 80; + gActors[this->dmgSource - NPC_SHOT_ID - 1].iwork[1] = 80; } break; } @@ -1054,7 +1049,7 @@ void ActorAllRange_ApplyDamage(Actor* this) { this->fwork[12] = sp3C.z; } if ((gRadioState == 0) && (gActors[0].obj.status == OBJ_ACTIVE)) { - if (this->dmgType == 3) { + if (this->dmgType == DMG_COLLISION) { switch (this->aiType) { case AI360_FALCO: ActorAllRange_PlayMessage(gMsg_ID_20210, RCID_FALCO); @@ -1071,7 +1066,7 @@ void ActorAllRange_ApplyDamage(Actor* this) { } } else if (this->dmgSource <= AI360_PEPPY + 101) { if (this->aiType >= AI360_WOLF) { - if (this->dmgSource == 1) { + if (this->dmgSource == AI360_FOX + 1) { if ((gCurrentLevel == LEVEL_KATINA) && (this->unk_0B6 == 1) && !gKaKilledAlly) { gKaKilledAlly = true; Radio_PlayMessage(gMsg_ID_18015, RCID_BILL); @@ -1149,7 +1144,7 @@ void ActorAllRange_ApplyDamage(Actor* this) { } } } - this->dmgType = 0; + this->dmgType = DMG_NONE; } } } @@ -1180,6 +1175,11 @@ bool func_360_80031900(Actor* actor) { return false; } +static Vec3f sSectorZRetreatPath[6] = { + { 8000.0f, 500.0f, 0.0f }, { 5000.0f, 400.0f, 0.0f }, { 2000.0f, 300.0f, 0.0f }, + { -500.0f, 250.0f, 0.0f }, { 0.0f, 250.0f, 0.0f }, { 0.0f, 250.0f, 0.0f }, +}; + void ActorAllRange_Update(Actor* this) { u8 sp10F; s32 sp108; @@ -1207,8 +1207,8 @@ void ActorAllRange_Update(Actor* this) { Vec3f spA8; Vec3f sp9C; Vec3f sp90; - Vec3f sp84 = D_360_800C9B98; - Vec3f sp78 = D_360_800C9BA4; + Vec3f sp84 = { 60.0f, 0.0f, -170.0f }; + Vec3f sp78 = { -60.0f, 0.0f, -170.0f }; s32 pad1; s32 pad2; s32 pad3; @@ -1380,11 +1380,11 @@ void ActorAllRange_Update(Actor* this) { gTeamShields[this->aiType] = -1; gTeamDamage[this->aiType] = 0; if (gCurrentLevel == LEVEL_SECTOR_Z) { - this->fwork[4] = D_360_800C9B50[this->unk_046].x; - this->fwork[5] = D_360_800C9B50[this->unk_046].y; - this->fwork[6] = D_360_800C9B50[this->unk_046].z; - if ((fabsf(this->obj.pos.x - D_360_800C9B50[this->unk_046].x) < 800.0f) && - (fabsf(this->obj.pos.z - D_360_800C9B50[this->unk_046].z) < 800.0f)) { + this->fwork[4] = sSectorZRetreatPath[this->unk_046].x; + this->fwork[5] = sSectorZRetreatPath[this->unk_046].y; + this->fwork[6] = sSectorZRetreatPath[this->unk_046].z; + if ((fabsf(this->obj.pos.x - sSectorZRetreatPath[this->unk_046].x) < 800.0f) && + (fabsf(this->obj.pos.z - sSectorZRetreatPath[this->unk_046].z) < 800.0f)) { this->unk_046++; if (this->unk_046 >= 4) { Object_Kill(&this->obj, this->sfxSource); @@ -1751,7 +1751,7 @@ void ActorAllRange_Update(Actor* this) { (gActors[this->aiIndex].obj.status == OBJ_FREE))) { this->state = STATE360_3; if (gCurrentLevel == LEVEL_BOLSE) { - func_360_8002FB4C(this); + ActorAllRange_ChooseNewTarget(this); } } } @@ -2019,23 +2019,23 @@ void ActorAllRange_Update(Actor* this) { if (Rand_ZeroOne() < 0.8f) { spA8.x = 60.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &spA8, &sp9C); - func_enmy2_8006EEFC(this->aiType, this->obj.pos.x + sp9C.x + (sp90.x * 1.5f), - this->obj.pos.y + sp9C.y + (sp90.y * 1.5f), - this->obj.pos.z + sp9C.z + (sp90.z * 1.5f), sp90.x, sp90.y, sp90.z, this->obj.rot.x, - this->obj.rot.y, this->obj.rot.z); + Actor_SpawnPlayerLaser(this->aiType, this->obj.pos.x + sp9C.x + (sp90.x * 1.5f), + this->obj.pos.y + sp9C.y + (sp90.y * 1.5f), + this->obj.pos.z + sp9C.z + (sp90.z * 1.5f), sp90.x, sp90.y, sp90.z, + this->obj.rot.x, this->obj.rot.y, this->obj.rot.z); } if (Rand_ZeroOne() < 0.8f) { spA8.x = -60.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &spA8, &sp9C); - func_enmy2_8006EEFC(this->aiType, this->obj.pos.x + sp9C.x + (sp90.x * 1.5f), - this->obj.pos.y + sp9C.y + (sp90.y * 1.5f), - this->obj.pos.z + sp9C.z + (sp90.z * 1.5f), sp90.x, sp90.y, sp90.z, this->obj.rot.x, - this->obj.rot.y, this->obj.rot.z); + Actor_SpawnPlayerLaser(this->aiType, this->obj.pos.x + sp9C.x + (sp90.x * 1.5f), + this->obj.pos.y + sp9C.y + (sp90.y * 1.5f), + this->obj.pos.z + sp9C.z + (sp90.z * 1.5f), sp90.x, sp90.y, sp90.z, + this->obj.rot.x, this->obj.rot.y, this->obj.rot.z); } } else { - func_enmy2_8006EEFC(this->aiType, this->obj.pos.x + (sp90.x * 1.5f), this->obj.pos.y + (sp90.y * 1.5f), - this->obj.pos.z + (sp90.z * 1.5f), sp90.x, sp90.y, sp90.z, this->obj.rot.x, - this->obj.rot.y, this->obj.rot.z); + Actor_SpawnPlayerLaser(this->aiType, this->obj.pos.x + (sp90.x * 1.5f), this->obj.pos.y + (sp90.y * 1.5f), + this->obj.pos.z + (sp90.z * 1.5f), sp90.x, sp90.y, sp90.z, this->obj.rot.x, + this->obj.rot.y, this->obj.rot.z); } } ActorAllRange_ApplyDamage(this); @@ -2096,7 +2096,7 @@ void ActorAllRange_Update(Actor* this) { func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 5.0f, 15); func_effect_8007A6F0(&this->obj.pos, 0x2903A008); } else { - this->dmgType = 1; + this->dmgType = DMG_BEAM; this->damage = 10; this->health = 0; ActorAllRange_ApplyDamage(this); diff --git a/src/engine/fox_beam.c b/src/engine/fox_beam.c index 4f9f3bc3..b58c7663 100644 --- a/src/engine/fox_beam.c +++ b/src/engine/fox_beam.c @@ -56,7 +56,7 @@ void func_beam_80035E78(PlayerShot* shot) { shot->unk_5C = 1; shot->unk_64 = 30; shot->unk_58 = 150; - Audio_PlayBombExplodeSfx(shot->playerNum, shot->sfxSource); + Audio_PlayBombExplodeSfx(shot->sourceId, shot->sfxSource); gScreenFlashTimer = 4; if (shot->obj.pos.y < (gGroundHeight + 450.0f)) { gCameraShake = 15; @@ -88,7 +88,7 @@ void func_beam_80035E78(PlayerShot* shot) { } if (gVersusMode) { - var_v0 = shot->playerNum + 10; + var_v0 = shot->sourceId + 10; } else { var_v0 = 0; } @@ -139,7 +139,7 @@ void func_beam_80036318(PlayerShot* shot) { } else if (shot->obj.id == PLAYERSHOT_8) { shot->scale = 7.5f; for (i = 0; i < ARRAY_COUNT(gActors); i++) { - gActors[i].lockOnTimers[shot->playerNum] = 0; + gActors[i].lockOnTimers[shot->sourceId] = 0; } shot->vel.x = shot->vel.y = shot->vel.z = 0.0f; if (gCurrentLevel == LEVEL_AQUAS) { @@ -149,7 +149,7 @@ void func_beam_80036318(PlayerShot* shot) { } else { if (gVersusMode) { - var_v0_2 = shot->playerNum + 10; + var_v0_2 = shot->sourceId + 10; } else { var_v0_2 = 12; } @@ -256,8 +256,8 @@ s32 func_beam_80036874(PlayerShot* shot, f32* hitboxData, Object* obj) { count = *hitboxData; if (count != 0) { xySizeMod = 10.0f; - if ((shot->playerNum < 4) && - ((gLaserStrength[shot->playerNum] != LASERS_SINGLE) || (shot->obj.id == PLAYERSHOT_8))) { + if ((shot->sourceId < 4) && + ((gLaserStrength[shot->sourceId] != LASERS_SINGLE) || (shot->obj.id == PLAYERSHOT_8))) { xySizeMod += 30.0f; } hitboxData++; @@ -368,8 +368,8 @@ s32 func_beam_80036F88(PlayerShot* shot, Actor* actor) { xySizeMod = 0.0f; if (actor->info.unk_16 == 1) { xySizeMod = fabsf((actor->obj.pos.z + gPathProgress) / 50.0f) + 10.0f; - if ((shot->playerNum < 4) && - ((gLaserStrength[shot->playerNum] != LASERS_SINGLE) || (shot->obj.id == PLAYERSHOT_8))) { + if ((shot->sourceId < 4) && + ((gLaserStrength[shot->sourceId] != LASERS_SINGLE) || (shot->obj.id == PLAYERSHOT_8))) { xySizeMod += 30.0f; } } @@ -394,7 +394,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 != EINFO_31)) { + (actor->unk_0B4 != EVID_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); @@ -427,7 +427,7 @@ bool func_beam_80037438(PlayerShot* shot, Actor* actor) { f32* hitboxData = actor->info.hitbox; if (((s32) hitboxData[0] != 0) && (sqrtf(SQ(temp_fv1) + SQ(temp_fa0)) <= 500.0f)) { - if (shot->playerNum < 4) { + if (shot->sourceId < 4) { temp_fv1 = actor->obj.pos.x - gPlayer[0].cam.eye.x; temp_fa0 = actor->obj.pos.z + gPathProgress - gPlayer[0].cam.eye.z; var_fa1 = (sqrtf(SQ(temp_fv1) + SQ(temp_fa0)) / 50.0f) + 20.0f + 10.0f; @@ -436,7 +436,7 @@ bool func_beam_80037438(PlayerShot* shot, Actor* actor) { } if (shotx->id == PLAYERSHOT_8) { var_fa1 = 30.0f; - } else if (gLaserStrength[shot->playerNum] != LASERS_SINGLE) { + } else if (gLaserStrength[shot->sourceId] != LASERS_SINGLE) { var_fa1 += 30.0f; } if (fabsf(hitboxData[1] + actor->obj.pos.z - shotx->pos.z) < (hitboxData[2] + var_fa1)) { @@ -652,12 +652,12 @@ void func_beam_80037CF4(PlayerShot* shot, Actor* actor, s32 hitIndex) { Vec3f sp44 = { 0.0f, 0.0f, -100.0f }; Vec3f sp38; - actor->dmgType = 1; + actor->dmgType = DMG_BEAM; actor->dmgPart = hitIndex - 1; actor->timer_0C2 = 2; actor->damage = 10; - if ((shot->playerNum < 4) && (gPlayer[shot->playerNum].form != FORM_LANDMASTER)) { - switch (gLaserStrength[shot->playerNum]) { + if ((shot->sourceId < 4) && (gPlayer[shot->sourceId].form != FORM_LANDMASTER)) { + switch (gLaserStrength[shot->sourceId]) { case LASERS_TWIN: actor->damage = 12; break; @@ -665,9 +665,9 @@ void func_beam_80037CF4(PlayerShot* shot, Actor* actor, s32 hitIndex) { actor->damage = 15; break; } - } else if ((shot->playerNum >= 100) && (gCurrentLevel == LEVEL_SECTOR_X)) { - if ((gActors[shot->playerNum - 100].obj.id == OBJ_ACTOR_EVENT) && - (gActors[shot->playerNum - 100].iwork[12] == TEAM_ID_BILL)) { + } else if ((shot->sourceId >= NPC_SHOT_ID) && (gCurrentLevel == LEVEL_SECTOR_X)) { + if ((gActors[shot->sourceId - NPC_SHOT_ID].obj.id == OBJ_ACTOR_EVENT) && + (gActors[shot->sourceId - NPC_SHOT_ID].iwork[12] == TEAM_ID_BILL)) { actor->damage = 30; } } @@ -677,19 +677,19 @@ void func_beam_80037CF4(PlayerShot* shot, Actor* actor, s32 hitIndex) { if (gCurrentLevel == LEVEL_AQUAS) { actor->damage = 31; } else { - actor->dmgType = 2; + actor->dmgType = DMG_EXPLOSION; actor->damage = 30; - actor->lockOnTimers[shot->playerNum] = 0; + actor->lockOnTimers[shot->sourceId] = 0; } } - actor->dmgSource = shot->playerNum + 1; + actor->dmgSource = shot->sourceId + 1; actor->hitPos.x = shot->obj.pos.x; actor->hitPos.y = shot->obj.pos.y; actor->hitPos.z = shot->obj.pos.z; if (((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->dmgPart == 0) && - ((actor->unk_0B4 == EINFO_48) || (actor->unk_0B4 == EINFO_49) || (actor->unk_0B4 == EINFO_50))) || + ((actor->unk_0B4 == EVID_48) || (actor->unk_0B4 == EVID_49) || (actor->unk_0B4 == EVID_50))) || ((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->fwork[23] > 1.0f)) || - ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->dmgPart == 0) && (actor->unk_0B4 == EINFO_67)) || + ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->dmgPart == 0) && (actor->unk_0B4 == EVID_67)) || ((actor->obj.id == OBJ_ACTOR_261) && (shot->obj.id != PLAYERSHOT_8) && ((actor->state < 3) || (actor->state >= 5))) || ((actor->obj.id == OBJ_ACTOR_260) && (shot->obj.id != PLAYERSHOT_8) && (actor->timer_0BC != 0))) { @@ -760,19 +760,19 @@ void func_beam_80038140(PlayerShot* shot) { switch (actor->obj.id) { case OBJ_ACTOR_180: if (func_beam_8003774C(shot, actor->obj.id, &actor->obj)) { - actor->dmgType = 1; - actor->dmgPart = shot->playerNum; + actor->dmgType = DMG_BEAM; + actor->dmgPart = shot->sourceId; return; } break; case OBJ_ACTOR_EVENT: - if (actor->unk_0B4 == EINFO_42) { + if (actor->unk_0B4 == EVID_42) { if (func_beam_8003774C(shot, ACTOR_EVENT_ID, &actor->obj)) { - actor->dmgType = 1; - actor->dmgPart = shot->playerNum; + actor->dmgType = DMG_BEAM; + actor->dmgPart = shot->sourceId; return; } - } else if (actor->unk_0B4 == EINFO_63) { + } else if (actor->unk_0B4 == EVID_63) { test.x = fabsf(actor->obj.pos.x - shot->obj.pos.x); test.y = fabsf(actor->obj.pos.y - shot->obj.pos.y); test.z = fabsf(actor->obj.pos.z - shot->obj.pos.z); @@ -791,8 +791,9 @@ void func_beam_80038140(PlayerShot* shot) { if (actor->info.unk_16 != 0) { if (actor->obj.id == OBJ_ACTOR_ALLRANGE) { if ((actor->aiType >= AI360_WOLF) && (actor->aiType < AI360_10) && - (((gCurrentLevel == LEVEL_VENOM_2) && (shot->playerNum < 104)) || - ((gCurrentLevel != LEVEL_VENOM_2) && (shot->playerNum == 0))) && + (((gCurrentLevel == LEVEL_VENOM_2) && + (shot->sourceId <= NPC_SHOT_ID + AI360_PEPPY)) || + ((gCurrentLevel != LEVEL_VENOM_2) && (shot->sourceId == AI360_FOX))) && (shot->obj.id != PLAYERSHOT_8) && (fabsf(actor->obj.pos.x - shot->obj.pos.x) < 500.0f) && (fabsf(actor->obj.pos.y - shot->obj.pos.y) < 300.0f) && @@ -823,8 +824,8 @@ void func_beam_80038140(PlayerShot* shot) { if (gLevelMode == LEVELMODE_ALL_RANGE) { for (i = 0, player = gPlayer; i < gCamCount; i++, player++) { test.x = 50.0f; - if (gVersusMode && (shot->playerNum < 4) && - !((gLaserStrength[shot->playerNum] == LASERS_SINGLE) && (shot->obj.id != PLAYERSHOT_8))) { + if (gVersusMode && (shot->sourceId < 4) && + !((gLaserStrength[shot->sourceId] == LASERS_SINGLE) && (shot->obj.id != PLAYERSHOT_8))) { test.x = 100.0f; } if (player->barrelRollAlpha >= 100) { @@ -839,7 +840,7 @@ void func_beam_80038140(PlayerShot* shot) { test.y = test.x; } test.z = test.x; - if ((i != shot->playerNum) && + if ((i != shot->sourceId) && ((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (player->state_1C8 == PLAYERSTATE_1C8_DOWN)) && (fabsf(player->trueZpos - shot->obj.pos.z) < test.z) && (fabsf(player->pos.x - shot->obj.pos.x) < test.x) && @@ -871,7 +872,7 @@ void func_beam_80038140(PlayerShot* shot) { } player->unk_284 = 1; if (gCamCount != 1) { - player->unk_288 = shot->playerNum + 1; + player->unk_288 = shot->sourceId + 1; } player->knockback.x = shot->vel.x * 0.1f; player->knockback.y = shot->vel.y * 0.1f; @@ -898,7 +899,7 @@ void func_beam_80038140(PlayerShot* shot) { } } - if ((gLevelMode == LEVELMODE_ALL_RANGE) && (shot->playerNum < 110)) { + if ((gLevelMode == LEVELMODE_ALL_RANGE) && (shot->sourceId < 110)) { for (i = 0, scenery360 = gScenery360; i < 200; i++, scenery360++) { if (scenery360->obj.status == OBJ_ACTIVE) { if ((scenery360->obj.id == OBJ_SCENERY_117) || (scenery360->obj.id == OBJ_SCENERY_141) || @@ -926,7 +927,7 @@ void func_beam_80038140(PlayerShot* shot) { } else { temp_v0 = func_beam_80036874(shot, scenery->info.hitbox, &scenery->obj); if (temp_v0 != 0) { - scenery->dmgType = 1; + scenery->dmgType = DMG_BEAM; scenery->dmgPart = temp_v0 - 1; } } @@ -987,7 +988,7 @@ void func_beam_80038140(PlayerShot* shot) { if (shot->obj.id == PLAYERSHOT_4) { Object_Kill(&shot->obj, shot->sfxSource); } else { - if ((boss->obj.id == OBJ_BOSS_316) && (shot->playerNum != 0)) { + if ((boss->obj.id == OBJ_BOSS_316) && (shot->sourceId != TEAM_ID_FOX)) { break; } boss->dmgType = DMG_BEAM; @@ -1002,8 +1003,8 @@ void func_beam_80038140(PlayerShot* shot) { } } else { boss->damage = 10; - if (shot->playerNum < 4) { - switch (gLaserStrength[shot->playerNum]) { + if (shot->sourceId < 4) { + switch (gLaserStrength[shot->sourceId]) { case LASERS_SINGLE: case LASERS_TWIN: break; @@ -1014,7 +1015,7 @@ void func_beam_80038140(PlayerShot* shot) { } } if (boss->obj.id == OBJ_BOSS_314) { - boss->swork[19] = shot->playerNum; + boss->swork[19] = shot->sourceId; } boss->dmgPart = temp_v0 - 1; if (boss->obj.id == OBJ_BOSS_301) { @@ -1114,23 +1115,24 @@ void func_beam_80039210(PlayerShot* shot) { gSPDisplayList(gMasterDisp++, sp6C); } else { var_a1 = 0; - if ((gCurrentLevel != LEVEL_KATINA) && (shot->playerNum >= 104) && (shot->playerNum != 108)) { - if (gActors[shot->playerNum - 100].obj.id != OBJ_ACTOR_EVENT) { + if ((gCurrentLevel != LEVEL_KATINA) && (shot->sourceId > NPC_SHOT_ID + AI360_PEPPY) && + (shot->sourceId != NPC_SHOT_ID + AI360_KATT)) { + if (gActors[shot->sourceId - NPC_SHOT_ID].obj.id != OBJ_ACTOR_EVENT) { var_a1 = 1; - } else if (gActors[shot->playerNum - 100].iwork[12] == TEAM_ID_BILL) { + } else if (gActors[shot->sourceId - NPC_SHOT_ID].iwork[12] == TEAM_ID_BILL) { var_a1 = 2; } } else if (gCurrentLevel == LEVEL_KATINA) { if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO) { - if (shot->playerNum >= 104) { - if (gActors[shot->playerNum - 100].unk_0B6 == 0) { + if (shot->sourceId > NPC_SHOT_ID + AI360_PEPPY) { + if (gActors[shot->sourceId - NPC_SHOT_ID].unk_0B6 == 0) { var_a1 = 1; } - if (gActors[shot->playerNum - 100].unk_0B6 == 2) { + if (gActors[shot->sourceId - NPC_SHOT_ID].unk_0B6 == 2) { var_a1 = 2; } } - } else if (gActors[shot->playerNum - 100].unk_0B6 == 34) { + } else if (gActors[shot->sourceId - NPC_SHOT_ID].unk_0B6 == 34) { var_a1 = 1; } } @@ -1177,7 +1179,7 @@ void func_beam_80039210(PlayerShot* shot) { } } else { RCP_SetupDL_64(); - switch (shot->playerNum) { + switch (shot->sourceId) { case 0: gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 32, 255); break; @@ -1194,7 +1196,7 @@ void func_beam_80039210(PlayerShot* shot) { Matrix_Scale(gGfxMatrix, 6.0f, 4.0f, 10.0f, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - if (gLaserStrength[shot->playerNum] != LASERS_SINGLE) { + if (gLaserStrength[shot->sourceId] != LASERS_SINGLE) { Matrix_Translate(gGfxMatrix, 6.0f, 0.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_versus_302D120); @@ -1272,7 +1274,7 @@ void func_beam_80039A50(PlayerShot* shot) { RCP_SetupDL(&gMasterDisp, 0x31); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); if (gVersusMode) { - switch (shot->playerNum) { + switch (shot->sourceId) { case 0: gDPSetEnvColor(gMasterDisp++, 255, 255, 32, 128); break; @@ -1297,7 +1299,7 @@ void func_beam_80039A50(PlayerShot* shot) { if (gVersusMode) { RCP_SetupDL_49(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, shot->unk_58); - switch (shot->playerNum) { + switch (shot->sourceId) { case 0: gDPSetEnvColor(gMasterDisp++, 255, 255, 32, shot->unk_58); break; @@ -1323,10 +1325,10 @@ void func_beam_80039A50(PlayerShot* shot) { RCP_SetupDL_40(); if (gVersusMode) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); - gDPSetEnvColor(gMasterDisp++, D_800C9C00[shot->playerNum], D_800C9C04[shot->playerNum], - D_800C9C08[shot->playerNum], 255); + gDPSetEnvColor(gMasterDisp++, D_800C9C00[shot->sourceId], D_800C9C04[shot->sourceId], + D_800C9C08[shot->sourceId], 255); RCP_SetupDL(&gMasterDisp, 0x31); - if (gLaserStrength[shot->playerNum] != LASERS_SINGLE) { + if (gLaserStrength[shot->sourceId] != LASERS_SINGLE) { Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 48.0f * M_DTOR, MTXF_APPLY); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.f, 50.0f, 0.0f, MTXF_APPLY); @@ -1375,9 +1377,9 @@ void func_beam_80039A50(PlayerShot* shot) { Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL(&gMasterDisp, 0x31); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); - gDPSetEnvColor(gMasterDisp++, D_800C9C00[shot->playerNum], D_800C9C04[shot->playerNum], - D_800C9C08[shot->playerNum], 255); - if (gLaserStrength[shot->playerNum] != LASERS_SINGLE) { + gDPSetEnvColor(gMasterDisp++, D_800C9C00[shot->sourceId], D_800C9C04[shot->sourceId], + D_800C9C08[shot->sourceId], 255); + if (gLaserStrength[shot->sourceId] != LASERS_SINGLE) { Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 48.0f * M_DTOR, MTXF_APPLY); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.f, 40.0f, 0.0f, MTXF_APPLY); @@ -1420,7 +1422,7 @@ void func_beam_80039A50(PlayerShot* shot) { RCP_SetupDL(&gMasterDisp, 0x31); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); if (gVersusMode) { - switch (shot->playerNum) { + switch (shot->sourceId) { case 0: gDPSetEnvColor(gMasterDisp++, 255, 255, 32, 255); break; @@ -1611,7 +1613,7 @@ void func_beam_8003B55C(PlayerShot* shot, s32 index) { func_effect_8007A6F0(&shot->obj.pos, 0x29121007); } if ((gCamCount != 4) && (gCurrentLevel != LEVEL_AQUAS)) { - if ((shot->playerNum == 0) && (gLaserStrength[0] != LASERS_SINGLE) && + if ((shot->sourceId == TEAM_ID_FOX) && (gLaserStrength[0] != LASERS_SINGLE) && (gPlayer[0].form != FORM_LANDMASTER)) { Matrix_RotateY(gCalcMatrix, shot->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, shot->obj.rot.x * M_DTOR, MTXF_APPLY); @@ -1653,7 +1655,7 @@ void func_beam_8003B55C(PlayerShot* shot, s32 index) { if (shot->unk_64 == 0) { Object_Kill(&shot->obj, shot->sfxSource); return; - } else if ((shot->playerNum < 110) || ((shot->unk_64 % 2) != 0)) { + } else if ((shot->sourceId < NPC_SHOT_ID + AI360_10) || ((shot->unk_64 % 2) != 0)) { func_beam_80038140(shot); } } @@ -1699,39 +1701,39 @@ bool func_beam_8003BB4C(PlayerShot* shot) { } for (i = 0, actor = gActors; i < 60; i++, actor++) { if ((actor->obj.status == OBJ_ACTIVE) && (actor->info.targetOffset != 0.0f) && - ((actor->lockOnTimers[shot->playerNum] == 0) && (fabsf(shot->obj.pos.x - actor->obj.pos.x) <= var_fa0) && + ((actor->lockOnTimers[shot->sourceId] == 0) && (fabsf(shot->obj.pos.x - actor->obj.pos.x) <= var_fa0) && (fabsf(shot->obj.pos.y - (actor->obj.pos.y + actor->info.targetOffset)) <= var_fa0) && (fabsf(shot->obj.pos.z - actor->obj.pos.z) <= var_fa0))) { - actor->lockOnTimers[shot->playerNum] = 20; - func_enmy_80060F30(gPlayer[shot->playerNum].sfxSource, 0x49008027, shot->playerNum); + actor->lockOnTimers[shot->sourceId] = 20; + func_enmy_80060F30(gPlayer[shot->sourceId].sfxSource, 0x49008027, shot->sourceId); for (j = 0; j < ARRAY_COUNT(gPlayerShots); j++) { if (gPlayerShots[j].obj.id == PLAYERSHOT_4) { Object_Kill(&gPlayerShots[j].obj, gPlayerShots[j].sfxSource); } } - D_display_801615B8[shot->playerNum] = 3.0f; - D_display_801615A8[shot->playerNum] = 300.0f; + D_display_801615B8[shot->sourceId] = 3.0f; + D_display_801615A8[shot->sourceId] = 300.0f; return true; } } if (gVersusMode) { for (i = 0, player = gPlayer; i < gCamCount; i++, player++) { if ((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) && !player->somersault && - (player->form != FORM_ON_FOOT) && (i != shot->playerNum) && - (gVsLockOnTimers[i][shot->playerNum] == 0) && (fabsf(shot->obj.pos.x - player->pos.x) <= var_fa0) && + (player->form != FORM_ON_FOOT) && (i != shot->sourceId) && (gVsLockOnTimers[i][shot->sourceId] == 0) && + (fabsf(shot->obj.pos.x - player->pos.x) <= var_fa0) && (fabsf(shot->obj.pos.y - player->pos.y) <= var_fa0) && (fabsf(shot->obj.pos.z - player->trueZpos) <= var_fa0)) { - gVsLockOnTimers[0][shot->playerNum] = gVsLockOnTimers[1][shot->playerNum] = - gVsLockOnTimers[2][shot->playerNum] = gVsLockOnTimers[3][shot->playerNum] = 0; - gVsLockOnTimers[i][shot->playerNum] = 20; - func_enmy_80060F30(gPlayer[shot->playerNum].sfxSource, 0x49008027, shot->playerNum); + gVsLockOnTimers[0][shot->sourceId] = gVsLockOnTimers[1][shot->sourceId] = + gVsLockOnTimers[2][shot->sourceId] = gVsLockOnTimers[3][shot->sourceId] = 0; + gVsLockOnTimers[i][shot->sourceId] = 20; + func_enmy_80060F30(gPlayer[shot->sourceId].sfxSource, 0x49008027, shot->sourceId); for (j = 0; j < ARRAY_COUNT(gPlayerShots); j++) { if (gPlayerShots[j].obj.id == PLAYERSHOT_4) { Object_Kill(&gPlayerShots[j].obj, gPlayerShots[j].sfxSource); } } - D_display_801615B8[shot->playerNum] = 3.0f; - D_display_801615A8[shot->playerNum] = 300.0f; + D_display_801615B8[shot->sourceId] = 3.0f; + D_display_801615A8[shot->sourceId] = 300.0f; return true; } } @@ -1742,7 +1744,7 @@ bool func_beam_8003BB4C(PlayerShot* shot) { void func_beam_8003BEF4(PlayerShot* shot) { if (gVersusMode) { if ((shot->obj.pos.y < gGroundHeight) || func_beam_8003BB4C(shot) || - !(gControllerHold[shot->playerNum].button & A_BUTTON) || (shot->unk_64 == 0)) { + !(gControllerHold[shot->sourceId].button & A_BUTTON) || (shot->unk_64 == 0)) { Object_Kill(&shot->obj, shot->sfxSource); } } else { @@ -1826,9 +1828,9 @@ void func_beam_8003C3D8(PlayerShot* shot) { gLight3y = shot->obj.pos.y; gLight3z = shot->obj.pos.z; if (gVersusMode) { - gLight3R = D_800C9C18[shot->playerNum]; - gLight3G = D_800C9C1C[shot->playerNum]; - gLight3B = D_800C9C20[shot->playerNum]; + gLight3R = D_800C9C18[shot->sourceId]; + gLight3G = D_800C9C1C[shot->sourceId]; + gLight3B = D_800C9C20[shot->sourceId]; } else { gLight3R = 90; gLight3G = 90; @@ -1860,7 +1862,7 @@ void func_beam_8003C4D0(PlayerShot* shot, s32 damage) { sp64 = scenery->obj.pos.y - shot->obj.pos.y; sp60 = scenery->obj.pos.z - shot->obj.pos.z; if (sqrtf(SQ(sp68) + SQ(sp64) + SQ(sp60)) < temp_fs2) { - scenery->dmgType = 2; + scenery->dmgType = DMG_EXPLOSION; } scenery->dmgPart = 0; } @@ -1897,19 +1899,19 @@ void func_beam_8003C4D0(PlayerShot* shot, s32 damage) { if ((actor->obj.id == OBJ_ACTOR_193) || (actor->obj.id == OBJ_ACTOR_186) || (actor->obj.id == OBJ_ACTOR_190) || (actor->obj.id == OBJ_ACTOR_202) || (actor->obj.id == OBJ_ACTOR_201) || (actor->obj.id == OBJ_ACTOR_187) || - ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0B4 == EINFO_78)) || - ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0B4 == EINFO_38)) || + ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0B4 == EVID_78)) || + ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0B4 == EVID_38)) || (actor->obj.id == OBJ_ACTOR_196)) { - actor->dmgType = 2; + actor->dmgType = DMG_EXPLOSION; actor->dmgPart = 0; - actor->dmgSource = shot->playerNum + 1; + actor->dmgSource = shot->sourceId + 1; actor->damage = damage; if (actor->info.bonus != 0) { shot->bonus++; } } else if ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->scale >= 0.5f) && (damage > 30)) { - actor->dmgSource = shot->playerNum + 1; + actor->dmgSource = shot->sourceId + 1; actor->vel.x = sp68 * 0.03f; actor->vel.y = sp64 * 0.03f; actor->vel.z = sp60 * 0.03f; @@ -1922,9 +1924,9 @@ void func_beam_8003C4D0(PlayerShot* shot, s32 damage) { shot->bonus++; } } else { - actor->dmgType = 2; + actor->dmgType = DMG_EXPLOSION; actor->dmgPart = 0; - actor->dmgSource = shot->playerNum + 1; + actor->dmgSource = shot->sourceId + 1; actor->damage = damage; if (actor->info.bonus != 0) { shot->bonus++; @@ -1969,12 +1971,12 @@ void func_beam_8003C4D0(PlayerShot* shot, s32 damage) { } if (gVersusMode) { for (i = 0, player = gPlayer; i < gCamCount; i++, player++) { - if ((i != shot->playerNum) && (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (player->hitTimer == 0)) { + if ((i != shot->sourceId) && (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (player->hitTimer == 0)) { sp68 = player->pos.x - shot->obj.pos.x; sp64 = player->pos.y - shot->obj.pos.y; sp60 = player->trueZpos - shot->obj.pos.z; if (sqrtf(SQ(sp68) + SQ(sp64) + SQ(sp60)) < temp_fs2) { - player->unk_288 = shot->playerNum + 1; + player->unk_288 = shot->sourceId + 1; switch (player->form) { case FORM_ARWING: Player_ApplyDamage(player, 0, 80); @@ -2006,18 +2008,18 @@ void func_beam_8003CC08(PlayerShot* shot) { func_beam_80035E78(shot); break; } - if ((gPlayer[shot->playerNum].form == FORM_LANDMASTER) || (gPlayer[shot->playerNum].form == FORM_ON_FOOT)) { + if ((gPlayer[shot->sourceId].form == FORM_LANDMASTER) || (gPlayer[shot->sourceId].form == FORM_ON_FOOT)) { shot->vel.y -= 1.0f; Math_SmoothStepToF(&shot->obj.rot.x, -90.0f, 0.05f, 1.0f, 0.0f); } if (shot->unk_64 < 25) { if (gVersusMode) { - if (gControllerPress[shot->playerNum].button & gBombButton[shot->playerNum]) { + if (gControllerPress[shot->sourceId].button & gBombButton[shot->sourceId]) { func_beam_80035E78(shot); break; } } else { - if (gControllerPress[gMainController].button & gBombButton[shot->playerNum]) { + if (gControllerPress[gMainController].button & gBombButton[shot->sourceId]) { func_beam_80035E78(shot); break; } @@ -2091,18 +2093,18 @@ void func_beam_8003CF90(PlayerShot* shot) { if (shot->unk_60 == 0) { for (i = 0, actor = gActors; i < 60; i++, actor++) { if ((actor->obj.status == OBJ_ACTIVE) && (actor->info.targetOffset != 0.0f) && - (actor->lockOnTimers[shot->playerNum] != 0)) { + (actor->lockOnTimers[shot->sourceId] != 0)) { var_a3 = 1; - actor->lockOnTimers[shot->playerNum] = 2; + actor->lockOnTimers[shot->sourceId] = 2; D_800C9C24 = actor->obj.pos; D_800C9C24.y += actor->info.targetOffset; } } for (i = 0, player = gPlayer; i < gCamCount; i++, player++) { if (((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (player->state_1C8 == PLAYERSTATE_1C8_U_TURN)) && - (gVsLockOnTimers[i][shot->playerNum] != 0)) { + (gVsLockOnTimers[i][shot->sourceId] != 0)) { var_a3 = 1; - gVsLockOnTimers[i][shot->playerNum] = 2; + gVsLockOnTimers[i][shot->sourceId] = 2; D_800C9C24.x = player->pos.x; if (player->form == FORM_ARWING) { D_800C9C24.y = player->pos.y; @@ -2143,7 +2145,7 @@ void func_beam_8003CF90(PlayerShot* shot) { } else { Math_SmoothStepToF(&shot->unk_54, 91.0f, 1.0f, 7.7999997f, 0.f); } - if (!((gPlayer[shot->playerNum].form == FORM_LANDMASTER) && (shot->unk_60 != 0))) { + if (!((gPlayer[shot->sourceId].form == FORM_LANDMASTER) && (shot->unk_60 != 0))) { Vec3f sp44; Vec3f sp38; @@ -2185,7 +2187,7 @@ void func_beam_8003D54C(PlayerShot* shot, s32 index) { func_beam_8003B55C(shot, index); break; case PLAYERSHOT_2: - func_beam_8003B00C(shot, &gPlayer[shot->playerNum]); + func_beam_8003B00C(shot, &gPlayer[shot->sourceId]); break; case PLAYERSHOT_BOMB: func_beam_8003CC08(shot); @@ -2207,7 +2209,7 @@ void func_beam_8003D54C(PlayerShot* shot, s32 index) { func_beam_8003C4D0(shot, 30); if (shot->bonus != 0) { if (gVersusMode) { - gPlayerScores[shot->playerNum] += shot->bonus; + gPlayerScores[shot->sourceId] += shot->bonus; } else { bonus = shot->bonus; if (shot->bonus > 10) { diff --git a/src/engine/fox_context.c b/src/engine/fox_context.c index 25238849..2b52d35d 100644 --- a/src/engine/fox_context.c +++ b/src/engine/fox_context.c @@ -78,10 +78,10 @@ UNK_TYPE F_80177DE8; s32 gGameFrameCount; s32 gObjectLoadIndex; s32 gPrevEventActorIndex; -s32 D_ctx_80177E78; +s32 gFormationLeaderIndex; s32 gRingPassCount; -Vec3f D_ctx_80177E88; -Vec3f D_ctx_80177F10; +Vec3f gFormationInitRot; +Vec3f gFormationInitPos; UNK_TYPE F_80178020; s32 D_ctx_8017812C; LevelId gCurrentLevel; diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index 21467000..8bc30a7c 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -401,7 +401,7 @@ void func_demo_80049968(Actor* actor, s32 arg1) { actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos.x = D_demo_800C9FD0[arg1]; actor->obj.pos.y = D_demo_800C9FE0[arg1]; - actor->obj.pos.z = D_demo_800C9FF0[arg1] + ((void) 0, gPlayer)[0].trueZpos; + actor->obj.pos.z = D_demo_800C9FF0[arg1] + gPlayer[0].trueZpos; actor->fwork[0] = D_demo_800CA000[arg1]; actor->fwork[1] = D_demo_800CA010[arg1]; actor->unk_0B6 = D_demo_800CA030[arg1]; diff --git a/src/engine/fox_edata_info.c b/src/engine/fox_edata_info.c index 19a34307..fbff7caf 100644 --- a/src/engine/fox_edata_info.c +++ b/src/engine/fox_edata_info.c @@ -92,7 +92,7 @@ f32 gWarpZoneEvent93Hitbox[] = { }; // clang-format off -ObjectInfo D_edata_800CC124[0x190] = { +ObjectInfo gObjectInfo[] = { /* OBJ_SCENERY_0, */ {(void*) D_CO_6015F00, 0, (ObjectFunc) NULL, D_CO_603E3E0, 800.0f, 0, 0, 39, 0, 0.0f, 0 }, /* OBJ_SCENERY_1, */ {(void*) D_CO_602E9E0, 0, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_2, */ {(void*) D_CO_601BEC0, 0, (ObjectFunc) NULL, gNoHitbox, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, diff --git a/src/engine/fox_edisplay.c b/src/engine/fox_edisplay.c index 52da7fef..8be8cda3 100644 --- a/src/engine/fox_edisplay.c +++ b/src/engine/fox_edisplay.c @@ -98,7 +98,7 @@ void Actor202_Draw(Actor202* this) { Animation_DrawSkeleton(1, D_ME_601E9D0, sp30, NULL, Actor202_PostLimbDraw, &this->index, &gIdentityMatrix); } -void MeteoTunnel_Draw(Scenery_39* this) { +void MeteoTunnel_Draw(MeteoTunnel* this) { gSPDisplayList(gMasterDisp++, D_ME_601AE40); } @@ -638,13 +638,13 @@ void func_edisplay_8005BAB4(ObjectId objId, s32 index) { case OBJ_ACTOR_TEAM_BOSS: case OBJ_ACTOR_EVENT: switch (gActors[index].unk_0B4) { - case EINFO_3: + case EVID_3: Matrix_Scale(gGfxMatrix, 2.3f, 0.0f, 2.3f, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_102A010); break; - case EINFO_81: + case EVID_81: RCP_SetupDL(&gMasterDisp, 0x30); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 255); @@ -1001,14 +1001,14 @@ void Actor_DrawOnRails(Actor* this) { Zoness_80190F08(this); return; } - if ((this->obj.id == OBJ_ACTOR_EVENT) && (this->unk_0B4 == EINFO_200)) { + if ((this->obj.id == OBJ_ACTOR_EVENT) && (this->unk_0B4 == EVID_200)) { Actor194_Draw(this); } else { if (this->info.unk_19 != 0) { this->obj.pos.y += gCameraShakeY; func_edisplay_8005D008(&this->obj, this->info.drawType); this->obj.pos.y -= gCameraShakeY; - } else if ((this->obj.id == OBJ_ACTOR_EVENT) && (this->unk_0B4 != EINFO_31)) { + } else if ((this->obj.id == OBJ_ACTOR_EVENT) && (this->unk_0B4 != EVID_31)) { func_edisplay_8005D3CC(&this->obj, this->vwork[29].x, this->vwork[29].y, this->vwork[29].z + this->unk_0F4.z, this->info.drawType); } else { diff --git a/src/engine/fox_effect.c b/src/engine/fox_effect.c index 0a721e0b..096b5f76 100644 --- a/src/engine/fox_effect.c +++ b/src/engine/fox_effect.c @@ -2407,14 +2407,11 @@ void func_effect_8007E6B8(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPo effect->obj.rot.z = RAND_FLOAT(360.0f); effect->unk_4A = 180; effect->scale2 = 5.0f; - return; - } - - if ((objId == OBJ_EFFECT_355) || (objId == OBJ_EFFECT_377)) { + } else if ((objId == OBJ_EFFECT_355) || (objId == OBJ_EFFECT_377)) { AUDIO_PLAY_SFX(0x31000025, effect->sfxSource, 4); - return; + } else { + AUDIO_PLAY_SFX(0x29002002, effect->sfxSource, 4); } - AUDIO_PLAY_SFX(0x29002002, effect->sfxSource, 4); } void func_effect_8007E93C(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPos, f32 speed) { @@ -2464,14 +2461,11 @@ void func_effect_8007E93C(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPo effect->obj.rot.z = RAND_FLOAT(360.0f); effect->unk_4A = 180; effect->scale2 = 5.0f; - return; - } - - if ((objId == OBJ_EFFECT_355) || (objId == OBJ_EFFECT_377)) { + } else if ((objId == OBJ_EFFECT_355) || (objId == OBJ_EFFECT_377)) { AUDIO_PLAY_SFX(0x31000025, effect->sfxSource, 4); - return; + } else { + AUDIO_PLAY_SFX(0x29002002, effect->sfxSource, 4); } - AUDIO_PLAY_SFX(0x29002002, effect->sfxSource, 4); } void func_effect_8007EBB8(Effect* effect, ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, @@ -2825,13 +2819,13 @@ bool func_effect_8007FD84(Effect* effect) { (fabsf(actor->obj.pos.z - effect->obj.pos.z) < 100.0f) && (fabsf(actor->obj.pos.x - effect->obj.pos.x) < 100.0f) && (fabsf(actor->obj.pos.y - effect->obj.pos.y) < 100.0f)) { - actor->dmgType = 1; + actor->dmgType = DMG_BEAM; actor->dmgPart = 0; actor->damage = 10; if (effect->obj.id == OBJ_EFFECT_354) { actor->damage = 30; } - actor->dmgSource = 100; + actor->dmgSource = CS_SHOT_ID; return true; } } diff --git a/src/engine/fox_enmy.c b/src/engine/fox_enmy.c index 1a9e13a8..c3f9c42b 100644 --- a/src/engine/fox_enmy.c +++ b/src/engine/fox_enmy.c @@ -72,7 +72,7 @@ u32 gWarpRingSfx[] = { 0x19404038, 0x19404139, 0x1940423A, 0x1940433B, 0x1940443C, 0x1940453D, 0x1940463E, 0x1940463E, 0x1940463E, }; -void func_enmy_80060F30(f32* pos, u32 sfxId, s32 arg2) { +void func_enmy_80060F30(f32* pos, u32 sfxId, s32 shotSource) { PRINTF("CHIME SET \n"); PRINTF("BOMB SET 1\n"); PRINTF("BOMB SET 2\n"); @@ -81,7 +81,7 @@ void func_enmy_80060F30(f32* pos, u32 sfxId, s32 arg2) { if (!gVersusMode) { AUDIO_PLAY_SFX(sfxId, gDefaultSfxSource, 4); } else { - AUDIO_PLAY_SFX(sfxId, pos, arg2); + AUDIO_PLAY_SFX(sfxId, pos, shotSource); } } @@ -132,8 +132,8 @@ bool func_enmy_80061148(Vec3f* arg0, f32 arg1) { } void Object_SetInfo(ObjectInfo* info, u32 objId) { - *info = D_edata_800CC124[objId]; - info->hitbox = SEGMENTED_TO_VIRTUAL(D_edata_800CC124[objId].hitbox); + *info = gObjectInfo[objId]; + info->hitbox = SEGMENTED_TO_VIRTUAL(gObjectInfo[objId].hitbox); if (gLevelMode == LEVELMODE_UNK_2) { info->cullDistance += 200.0f; } @@ -384,7 +384,7 @@ void ActorEvent_Load(Actor* actor, ObjectInit* objInit, s32 index) { actor->unk_0F4.z = objInit->rot.z; actor->obj.id = OBJ_ACTOR_EVENT; actor->timer_0C2 = 10; - actor->unk_0B4 = EINFO_FFF; + actor->unk_0B4 = EVID_FFF; actor->aiType = objInit->id - ACTOR_EVENT_ID; Object_SetInfo(&actor->info, actor->obj.id); @@ -393,14 +393,14 @@ void ActorEvent_Load(Actor* actor, ObjectInit* objInit, s32 index) { actor->iwork[1] = gPrevEventActorIndex; actor->iwork[10] = gActors[gPrevEventActorIndex].aiType; actor->fwork[22] = gArwingSpeed; - Matrix_RotateZ(gCalcMatrix, -D_ctx_80177E88.z * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -D_ctx_80177E88.x * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gCalcMatrix, -D_ctx_80177E88.y * M_DTOR, MTXF_APPLY); - sp24.x = actor->obj.pos.x - D_ctx_80177F10.x; - sp24.y = actor->obj.pos.y - D_ctx_80177F10.y; - sp24.z = actor->obj.pos.z - D_ctx_80177F10.z; + Matrix_RotateZ(gCalcMatrix, -gFormationInitRot.z * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -gFormationInitRot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -gFormationInitRot.y * M_DTOR, MTXF_APPLY); + sp24.x = actor->obj.pos.x - gFormationInitPos.x; + sp24.y = actor->obj.pos.y - gFormationInitPos.y; + sp24.z = actor->obj.pos.z - gFormationInitPos.z; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp24, &actor->vwork[28]); - actor->iwork[9] = D_ctx_80177E78; + actor->iwork[9] = gFormationLeaderIndex; gPrevEventActorIndex = index; Actor_Update(actor); } @@ -902,7 +902,7 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) { } else if (actor->scale < 0.0f) { if (Object_CheckHitboxCollision(pos, actor->info.hitbox, &actor->obj, actor->vwork[29].x, actor->vwork[29].y, actor->vwork[29].z + actor->unk_0F4.z)) { - actor->dmgType = 1; + actor->dmgType = DMG_BEAM; actor->damage = 10; actor->dmgPart = -1; actor->hitPos.x = pos->x; @@ -912,7 +912,7 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) { } } else if ((mode != 2) && (mode != 3)) { if (Object_CheckSingleHitbox(pos, actor->info.hitbox, &actor->obj.pos)) { - actor->dmgType = 1; + actor->dmgType = DMG_BEAM; actor->damage = 10; actor->dmgPart = -1; if (!(((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->iwork[12] != 0)) || @@ -1547,9 +1547,9 @@ void func_enmy_800656D4(Actor* actor) { if ((fabsf(actor->fwork[27] - actor->obj.pos.x) < 60.0f) && (fabsf(actor->fwork[28] - actor->obj.pos.y) < 60.0f) && (fabsf(actor->fwork[29] - actor->obj.pos.z) < 60.0f) && ((spC4 == 2) || (spC4 == 3) || (spC4 == 4))) { - gActors[spC4].dmgType = 1; + gActors[spC4].dmgType = DMG_BEAM; gActors[spC4].damage = 20; - gActors[spC4].dmgSource = 2; + gActors[spC4].dmgSource = DMG_SRC_2; func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 5.0f); Object_Kill(&actor->obj, actor->sfxSource); @@ -1583,11 +1583,11 @@ void func_enmy_800656D4(Actor* actor) { sp8C.x = actor->vel.x; sp8C.y = actor->vel.y; sp8C.z = actor->vel.z; - if ((Object_CheckCollision(actor->index, &actor->obj.pos, &sp8C, 1) != 0) || (actor->dmgType != 0) || + if ((Object_CheckCollision(actor->index, &actor->obj.pos, &sp8C, 1) != 0) || (actor->dmgType != DMG_NONE) || (actor->obj.pos.y < (gGroundHeight + 10.0f)) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 3.0f); Object_Kill(&actor->obj, actor->sfxSource); - if (actor->dmgType != 0) { + if (actor->dmgType != DMG_NONE) { actor->itemDrop = DROP_SILVER_RING_50p; if ((gCurrentLevel == LEVEL_CORNERIA)) { if (gLevelMode == LEVELMODE_ALL_RANGE) { @@ -1649,12 +1649,12 @@ void Actor_Despawn(Actor* actor) { s32 i; if (gVersusMode) { - if ((actor->dmgSource > 0) && (actor->dmgSource < 5) && + if ((actor->dmgSource >= 1) && (actor->dmgSource < 4 + 1) && !((D_versus_80178768[0] == 0) && (D_versus_80178768[1] == 0) && (D_versus_80178768[2] == 0))) { gPlayerScores[actor->dmgSource - 1] += actor->info.bonus; } } else if (!((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->unk_0B6 == 1))) { - if ((actor->dmgSource == 1) && (actor->info.bonus != 0)) { + if ((actor->dmgSource == AI360_FOX + 1) && (actor->info.bonus != 0)) { gHitCount += actor->info.bonus; D_ctx_80177850 = 15; if ((gLevelMode == LEVELMODE_ALL_RANGE) && (gDropHitCountItem != 0)) { @@ -1751,10 +1751,10 @@ void func_enmy_8006654C(Actor* actor) { break; } actor->scale = 0.8f; - if (actor->dmgType != 0) { + if (actor->dmgType != DMG_NONE) { actor->obj.status = OBJ_DYING; actor->vel.y = RAND_FLOAT(5.0f) + 6.0f; - if (actor->dmgType == 2) { + if (actor->dmgType == DMG_EXPLOSION) { actor->vel.y = -2.0f; } actor->vel.z = -15.0f; @@ -1798,7 +1798,7 @@ void func_enmy_800669A0(Actor* actor) { } } else { actor->obj.rot.y += 5.0f; - if (actor->dmgType != 0) { + if (actor->dmgType != DMG_NONE) { func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y + 130.0f, actor->obj.pos.z, 8.0f); func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y + 130.0f, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, 4.0f, 5); @@ -2003,8 +2003,8 @@ void ActorSupplies_Update(ActorSupplies* this) { Math_SmoothStepToF(&this->obj.pos.y, 300.0f, 0.05f, 50.0f, 0.01f); } } - if (this->dmgType != 0) { - this->dmgType = 0; + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; this->health -= this->damage; if (this->health <= 0) { func_effect_8007A6F0(&this->obj.pos, 0x2903A008); @@ -2502,7 +2502,7 @@ void Actor_Move(Actor* actor) { var_fv0 = 4000.0f; if ((actor->obj.id == OBJ_ACTOR_236) || (gCurrentLevel == LEVEL_MACBETH) || - ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0B4 == EINFO_56))) { + ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0B4 == EVID_56))) { var_fv0 = 8000.0f; } else if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ENTER_WARP_ZONE) { var_fv0 = 100000.0f; @@ -2523,9 +2523,9 @@ void Actor_Move(Actor* actor) { gActor194Status[actor->unk_046] = 0; break; case OBJ_ACTOR_EVENT: - if ((actor->unk_0B4 >= EINFO_200) && (actor->unk_0B4 < EINFO_300)) { + if ((actor->unk_0B4 >= EVID_200) && (actor->unk_0B4 < EVID_300)) { gActor194Status[actor->unk_046] = 0; - } else if ((actor->unk_0B4 == EINFO_38) && (actor->unk_046 != 2)) { + } else if ((actor->unk_0B4 == EVID_38) && (actor->unk_046 != 2)) { gRingPassCount = -1; } break; diff --git a/src/engine/fox_enmy2.c b/src/engine/fox_enmy2.c index bc0401e3..7b7e6c47 100644 --- a/src/engine/fox_enmy2.c +++ b/src/engine/fox_enmy2.c @@ -209,9 +209,9 @@ void Actor202_Update(Actor202* this) { break; } - if (this->dmgType != 0) { + if (this->dmgType != DMG_NONE) { this->health -= 10; - if ((this->health <= 0) || (this->dmgType >= 2)) { + if ((this->health <= 0) || (this->dmgType >= DMG_EXPLOSION)) { func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y + 180.0f, this->obj.pos.z, 10.0f); func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y + 180.0f, this->obj.pos.z, this->vel.x, this->vel.y, this->vel.z, 8.0f, 30); @@ -220,7 +220,7 @@ void Actor202_Update(Actor202* this) { gHitCount += this->info.bonus; D_ctx_80177850 = 15; } else { - this->dmgType = 0; + this->dmgType = DMG_NONE; this->timer_0C6 = 20; AUDIO_PLAY_SFX(0x2903300E, this->sfxSource, 4); func_effect_8007D1E0(this->obj.pos.x, this->obj.pos.y + 180.0f, this->obj.pos.z, 5.0f); @@ -478,13 +478,13 @@ void Actor196_Update(Actor196* this) { RAND_FLOAT_CENTERED(50.0f) + this->obj.pos.z, 0.5f); } - if ((this->dmgType != 0) && (this->unk_0B6 != 0)) { + if ((this->dmgType != DMG_NONE) && (this->unk_0B6 != 0)) { func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0.0f, this->vel.y, 0.0f, 3.0f, 5); Object_Kill(&this->obj, this->sfxSource); this->itemDrop = DROP_SILVER_RING; Actor_Despawn(this); } - this->dmgType = 0; + this->dmgType = DMG_NONE; } static f32 D_800D001C[5] = { 0.0f, 30.0f, 60.0f, -60.0f, -30.0f }; // could be in-function @@ -870,7 +870,7 @@ void func_enmy2_8006D0F4(Actor* this) { } } -void MeteoTunnel_Update(Scenery_39* this) { +void MeteoTunnel_Update(MeteoTunnel* this) { this->obj.rot.z += 1.0f; } @@ -886,9 +886,9 @@ typedef struct { /* 0x17 */ u8 info_unk_19; /* 0x18 */ f32 targetOffset; /* 0x1C */ u8 bonus; -} UnkStruct_D003C; // size = 0x20 +} EventActorInfo; // size = 0x20 -static UnkStruct_D003C D_800D003C[108] = { +static EventActorInfo sEventActorInfo[108] = { /* 0 */ { D_ENMY_PLANET_40068F0, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, /* 1 */ { D_ENMY_PLANET_4006E90, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, /* 2 */ { NULL, gCubeHitbox100, 1.0f, 20000.0f, 3000.0f, 1, 0, 2, 0, 0.0f, 0 }, @@ -1073,7 +1073,7 @@ void ActorEvent_ProcessScript(ActorEvent* this) { Audio_KillSfxBySource(this->sfxSource); this->unk_0B4 = actorScript[this->aiIndex + 1]; - if (this->unk_0B4 == EINFO_40) { + if (this->unk_0B4 == EVID_40) { this->timer_0C2 = 10000; } else { this->timer_0C2 = 0; @@ -1082,16 +1082,16 @@ void ActorEvent_ProcessScript(ActorEvent* this) { this->fwork[11] = 0.0f; this->fwork[12] = 0.0f; - if ((this->unk_0B4 == EINFO_64) || (this->unk_0B4 == EINFO_81)) { + if ((this->unk_0B4 == EVID_64) || (this->unk_0B4 == EVID_81)) { this->fwork[15] = 0.0f; - } else if (this->unk_0B4 == EINFO_79) { + } else if (this->unk_0B4 == EVID_79) { this->info.drawType = 2; } this->health = actorScript[this->aiIndex] & 0x1FF; this->aiIndex += 2; - if ((this->unk_0B4 >= EINFO_200) && (this->unk_0B4 < EINFO_300)) { + if ((this->unk_0B4 >= EVID_200) && (this->unk_0B4 < EVID_300)) { this->unk_046 = 100; this->info.hitbox = gCubeHitbox200; this->info.targetOffset = 1.0f; @@ -1104,7 +1104,7 @@ void ActorEvent_ProcessScript(ActorEvent* this) { gActor194yPos[i][j] = this->obj.pos.y; gActor194zPos[i][j] = this->obj.pos.z; } - if (this->unk_0B4 == EINFO_200) { + if (this->unk_0B4 == EVID_200) { AUDIO_PLAY_SFX(0x11032049, this->sfxSource, 4); } break; @@ -1116,52 +1116,52 @@ void ActorEvent_ProcessScript(ActorEvent* this) { } } - if ((this->unk_0B4 == EINFO_2) || (this->unk_0B4 == EINFO_43)) { + if ((this->unk_0B4 == EVID_2) || (this->unk_0B4 == EVID_43)) { this->unk_0C9 = 1; this->iwork[11] = 1; } - if (this->unk_0B4 == EINFO_81) { + if (this->unk_0B4 == EVID_81) { this->unk_0C9 = 1; } if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) { - if (this->unk_0B4 == EINFO_86) { + if (this->unk_0B4 == EVID_86) { Audio_PlayFanfare(SEQ_ID_KATT, 20, 10, 10); } - if (this->unk_0B4 == EINFO_85) { + if (this->unk_0B4 == EVID_85) { Audio_PlayFanfare(SEQ_ID_BILL, 20, 10, 10); } } - if (this->unk_0B4 == EINFO_103) { + if (this->unk_0B4 == EVID_103) { this->unk_0B6 = 0; } - if (this->unk_0B4 == EINFO_104) { + if (this->unk_0B4 == EVID_104) { this->unk_0B6 = Animation_GetFrameCount(&D_VE2_6014658) - 1; } - if (this->unk_0B4 < EINFO_200) { - this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_800D003C[this->unk_0B4].hitbox); - this->scale = D_800D003C[this->unk_0B4].scale; - this->info.unk_16 = D_800D003C[this->unk_0B4].info_unk_16; - this->info.unk_14 = D_800D003C[this->unk_0B4].info_unk_14; - this->info.unk_19 = D_800D003C[this->unk_0B4].info_unk_19; - this->info.targetOffset = D_800D003C[this->unk_0B4].targetOffset; - this->info.bonus = D_800D003C[this->unk_0B4].bonus; + if (this->unk_0B4 < EVID_200) { + this->info.hitbox = SEGMENTED_TO_VIRTUAL(sEventActorInfo[this->unk_0B4].hitbox); + this->scale = sEventActorInfo[this->unk_0B4].scale; + this->info.unk_16 = sEventActorInfo[this->unk_0B4].info_unk_16; + this->info.unk_14 = sEventActorInfo[this->unk_0B4].info_unk_14; + this->info.unk_19 = sEventActorInfo[this->unk_0B4].info_unk_19; + this->info.targetOffset = sEventActorInfo[this->unk_0B4].targetOffset; + this->info.bonus = sEventActorInfo[this->unk_0B4].bonus; - if (this->unk_0B4 == EINFO_78) { + if (this->unk_0B4 == EVID_78) { this->info.damage = 0; } - this->info.cullDistance = D_800D003C[this->unk_0B4].cullDistance; - this->fwork[25] = D_800D003C[this->unk_0B4].unk_10; + this->info.cullDistance = sEventActorInfo[this->unk_0B4].cullDistance; + this->fwork[25] = sEventActorInfo[this->unk_0B4].unk_10; - switch (D_800D003C[this->unk_0B4].sfx) { + switch (sEventActorInfo[this->unk_0B4].sfx) { case 1: - if (!((gCurrentLevel == LEVEL_SOLAR) || (this->unk_0B4 == EINFO_6) || - ((gCurrentLevel == LEVEL_CORNERIA) && (this->unk_0B4 == EINFO_8)))) { + if (!((gCurrentLevel == LEVEL_SOLAR) || (this->unk_0B4 == EVID_6) || + ((gCurrentLevel == LEVEL_CORNERIA) && (this->unk_0B4 == EVID_8)))) { AUDIO_PLAY_SFX(0x31000011, this->sfxSource, 4); } break; @@ -1191,7 +1191,7 @@ void ActorEvent_ProcessScript(ActorEvent* this) { if (this->info.unk_16 == 0) { this->obj.rot.z = this->fwork[23] = this->unk_0F4.z; - if (this->unk_0B4 != EINFO_31) { + if (this->unk_0B4 != EVID_31) { this->unk_0F4.z = 0.0f; } } @@ -1217,14 +1217,14 @@ void ActorEvent_ProcessScript(ActorEvent* this) { ActorEvent_ProcessScript(this); break; - case EV_OPC(EVOP_SET_TO_IWORK_9): - D_ctx_80177E78 = this->index; - D_ctx_80177F10.x = this->obj.pos.x; - D_ctx_80177F10.y = this->obj.pos.y; - D_ctx_80177F10.z = this->obj.pos.z; - D_ctx_80177E88.x = this->obj.rot.x; - D_ctx_80177E88.y = this->obj.rot.y; - D_ctx_80177E88.z = this->obj.rot.z; + case EV_OPC(EVOP_SET_AS_LEADER): + gFormationLeaderIndex = this->index; + gFormationInitPos.x = this->obj.pos.x; + gFormationInitPos.y = this->obj.pos.y; + gFormationInitPos.z = this->obj.pos.z; + gFormationInitRot.x = this->obj.rot.x; + gFormationInitRot.y = this->obj.rot.y; + gFormationInitRot.z = this->obj.rot.z; this->aiIndex += 2; ActorEvent_ProcessScript(this); break; @@ -1250,7 +1250,7 @@ void ActorEvent_ProcessScript(ActorEvent* this) { this->timer_04C = 4; } - if (this->unk_048 == EVACT_13) { + if (this->unk_048 == EVACT_TI_DROP_MINE) { this->timer_0BE = 50; } @@ -1323,9 +1323,9 @@ void ActorEvent_ProcessScript(ActorEvent* this) { case EV_OPC(EVOP_DAMAGE_TEAM): if (this->iwork[12] == actorScript[this->aiIndex + 1]) { - this->dmgType = 1; + this->dmgType = DMG_BEAM; this->damage = actorScript[this->aiIndex] & 0x1FF; - this->dmgSource = 100; + this->dmgSource = DMG_SRC_100; } else { gTeamDamage[actorScript[this->aiIndex + 1]] = actorScript[this->aiIndex] & 0x1FF; } @@ -1360,29 +1360,29 @@ void ActorEvent_ProcessScript(ActorEvent* this) { ActorEvent_ProcessScript(this); break; - case EV_OPC(EVOP_SET_STATE_6): - this->state = EVSTATE_6; + case EV_OPC(EVOP_PURSUE_PLAYER): + this->state = EVSTATE_PURSUE_PLAYER; this->timer_0BC = actorScript[this->aiIndex + 1]; this->fwork[24] = actorScript[this->aiIndex] & 0x1FF; this->aiIndex += 2; break; - case EV_OPC(EVOP_SET_STATE_7): - this->state = EVSTATE_7; + case EV_OPC(EVOP_FLEE_PLAYER): + this->state = EVSTATE_FLEE_PLAYER; this->timer_0BC = actorScript[this->aiIndex + 1]; this->fwork[24] = actorScript[this->aiIndex] & 0x1FF; this->aiIndex += 2; break; - case EV_OPC(EVOP_SET_STATE_8): - this->state = EVSTATE_8; + case EV_OPC(EVOP_PURSUE_TARGET): + this->state = EVSTATE_PURSUE_TARGET; this->timer_0BC = actorScript[this->aiIndex + 1]; this->fwork[24] = actorScript[this->aiIndex] & 0x1FF; this->aiIndex += 2; break; - case EV_OPC(EVOP_SET_STATE_9): - this->state = EVSTATE_9; + case EV_OPC(EVOP_FLEE_TARGET): + this->state = EVSTATE_FLEE_TARGET; this->timer_0BC = actorScript[this->aiIndex + 1]; this->fwork[24] = actorScript[this->aiIndex] & 0x1FF; this->aiIndex += 2; @@ -1403,15 +1403,15 @@ void ActorEvent_ProcessScript(ActorEvent* this) { this->aiIndex += 2; break; - case EV_OPC(EVOP_SET_STATE_14): - this->state = EVSTATE_14; + case EV_OPC(EVOP_PURSUE_CAMERA): + this->state = EVSTATE_PURSUE_CAMERA; this->timer_0BC = actorScript[this->aiIndex + 1]; this->fwork[24] = actorScript[this->aiIndex] & 0x1FF; this->aiIndex += 2; break; - case EV_OPC(EVOP_SET_STATE_15): - this->state = EVSTATE_15; + case EV_OPC(EVOP_FLEE_CAMERA): + this->state = EVSTATE_FLEE_CAMERA; this->timer_0BC = actorScript[this->aiIndex + 1]; this->fwork[24] = actorScript[this->aiIndex] & 0x1FF; this->aiIndex += 2; @@ -1468,14 +1468,14 @@ void ActorEvent_ProcessScript(ActorEvent* this) { this->aiIndex += 2; break; - case EV_OPC(EVOP_SET_IWORK_13): + case EV_OPC(EVOP_START_FORMATION): this->timer_0C0 = actorScript[this->aiIndex + 1]; this->iwork[13] = 1; this->aiIndex += 2; ActorEvent_ProcessScript(this); break; - case EV_OPC(EVOP_CLEAR_IWORK_13): + case EV_OPC(EVOP_STOP_FORMATION): this->iwork[13] = 0; this->aiIndex += 2; ActorEvent_ProcessScript(this); @@ -1604,7 +1604,7 @@ void ActorEvent_8006EB64(f32 xPos, f32 yPos, f32 zPos) { } } -void ActorEvent_8006EBC0(Actor* actor, f32 xPos, f32 yPos, f32 zPos) { +void ActorEvent_SetupTIMine(Actor* actor, f32 xPos, f32 yPos, f32 zPos) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; actor->obj.id = OBJ_ACTOR_225; @@ -1618,19 +1618,19 @@ void ActorEvent_8006EBC0(Actor* actor, f32 xPos, f32 yPos, f32 zPos) { AUDIO_PLAY_SFX(0x2900201D, actor->sfxSource, 4); } -void ActorEvent_8006EC60(f32 xPos, f32 yPos, f32 zPos) { +void ActorEvent_SpawnTIMine(f32 xPos, f32 yPos, f32 zPos) { s32 i; for (i = 0; i < ARRAY_COUNT(gActors); i++) { if (gActors[i].obj.status == OBJ_FREE) { - ActorEvent_8006EBC0(&gActors[i], xPos, yPos, zPos); + ActorEvent_SetupTIMine(&gActors[i], xPos, yPos, zPos); break; } } } -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) { +void Actor_SetupPlayerShot(PlayerShotId objId, PlayerShot* shot, s32 actorId, 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; @@ -1655,46 +1655,46 @@ void func_enmy2_8006ECBC(PlayerShotId objId, PlayerShot* shot, s32 unk0E4, f32 x } else { shot->unk_64 = 30; } - shot->playerNum = unk0E4 + 100; + shot->sourceId = actorId + NPC_SHOT_ID; if (gLevelMode == LEVELMODE_ALL_RANGE) { - if (unk0E4 + 100 <= AI360_PEPPY + 100) { + if (actorId + NPC_SHOT_ID <= AI360_PEPPY + NPC_SHOT_ID) { AUDIO_PLAY_SFX(0x2900000D, shot->sfxSource, 4); } else { AUDIO_PLAY_SFX(0x29002002, shot->sfxSource, 4); } - } else if ((unk0E4 < 60) && (gActors[unk0E4].obj.id == OBJ_ACTOR_EVENT) && - (gActors[unk0E4].iwork[12] >= TEAM_ID_FALCO)) { + } else if ((actorId < ARRAY_COUNT(gActors)) && (gActors[actorId].obj.id == OBJ_ACTOR_EVENT) && + (gActors[actorId].iwork[12] >= TEAM_ID_FALCO)) { AUDIO_PLAY_SFX(0x2900000D, shot->sfxSource, 4); - } else if (unk0E4 + 100 == 200) { - shot->playerNum = 100; + } else if (actorId + NPC_SHOT_ID == CS_SHOT_ID + NPC_SHOT_ID) { + shot->sourceId = CS_SHOT_ID; AUDIO_PLAY_SFX(0x19030037, shot->sfxSource, 0); } else { AUDIO_PLAY_SFX(0x29002002, shot->sfxSource, 4); } } -void func_enmy2_8006EEFC(s32 unk0E4, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 xRot, f32 yRot, - f32 zRot) { +void Actor_SpawnPlayerLaser(s32 actorId, 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, xVel, yVel, zVel, xRot, yRot, - zRot); + Actor_SetupPlayerShot(PLAYERSHOT_1, &gPlayerShots[i], actorId, xPos, yPos, zPos, xVel, yVel, zVel, xRot, + yRot, zRot); break; } } } -void func_enmy2_8006EFA0(s32 unk0E4, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 xRot, f32 yRot, - f32 zRot) { +void Actor_SpawnGreatFoxLaser(s32 actorId, 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, xVel, yVel, zVel, xRot, yRot, - zRot); + Actor_SetupPlayerShot(PLAYERSHOT_9, &gPlayerShots[i], actorId, xPos, yPos, zPos, xVel, yVel, zVel, xRot, + yRot, zRot); break; } } @@ -1776,24 +1776,24 @@ void ActorEvent_8006F254(ActorEvent* this) { } void ActorEvent_ProcessActions(ActorEvent* this) { - s32 var_v1; + s32 i; Vec3f sp78; Vec3f sp6C; Sprite* sprite; - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (this->unk_0B4 != EINFO_52) && - (this->unk_0B4 != EINFO_103) && (this->unk_0B4 != EINFO_104) && (this->unk_0B4 != EINFO_48) && - (this->unk_0B4 != EINFO_49) && (this->unk_0B4 != EINFO_50)) { + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (this->unk_0B4 != EVID_52) && (this->unk_0B4 != EVID_103) && + (this->unk_0B4 != EVID_104) && (this->unk_0B4 != EVID_48) && (this->unk_0B4 != EVID_49) && + (this->unk_0B4 != EVID_50)) { switch (this->unk_048) { case EVACT_NONE: break; - case EVACT_1: + case EVACT_1: // shoot forward ActorEvent_8006F254(this); this->unk_048 = EVACT_NONE; break; - case EVACT_2: + case EVACT_2: // shoot at player if (this->obj.pos.z < (gPlayer[0].trueZpos - 600.0f)) { func_effect_8007F11C(OBJ_EFFECT_353, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, gEnemyShotSpeed); @@ -1801,16 +1801,17 @@ void ActorEvent_ProcessActions(ActorEvent* this) { this->unk_048 = EVACT_NONE; break; - case EVACT_3: + case EVACT_3: // ally shoots forward if (this->timer_0BE == 0) { this->timer_0BE = 6; sp78.x = 0.0f; sp78.y = 0.0f; sp78.z = 100.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp78, &sp6C); - func_enmy2_8006EEFC(this->index, this->obj.pos.x + (sp6C.x * 1.5), this->obj.pos.y + (sp6C.y * 1.5), - this->obj.pos.z + (sp6C.z * 1.5), sp6C.x, sp6C.y, sp6C.z, this->unk_0F4.x, - this->unk_0F4.y, this->vwork[29].z + this->unk_0F4.z); + Actor_SpawnPlayerLaser(this->index, this->obj.pos.x + (sp6C.x * 1.5), + this->obj.pos.y + (sp6C.y * 1.5), this->obj.pos.z + (sp6C.z * 1.5), sp6C.x, + sp6C.y, sp6C.z, this->unk_0F4.x, this->unk_0F4.y, + this->vwork[29].z + this->unk_0F4.z); this->timer_0C2 = 2; this->timer_04C--; if (this->timer_04C <= 0) { @@ -1819,7 +1820,7 @@ void ActorEvent_ProcessActions(ActorEvent* this) { } break; - case EVACT_4: + case EVACT_4: // shoot blue energy balls ActorEvent_8006EB64(this->obj.pos.x, this->obj.pos.y - 20.0f, this->obj.pos.z); this->unk_048 = EVACT_NONE; break; @@ -1901,7 +1902,7 @@ void ActorEvent_ProcessActions(ActorEvent* this) { Object_Kill(&this->obj, this->sfxSource); break; - case EVACT_13: + case EVACT_TI_DROP_MINE: if (this->timer_0BE > 25) { Math_SmoothStepToF(&this->fwork[15], 90.0f, 0.2f, 8.0f, 0.01f); } @@ -1909,7 +1910,7 @@ void ActorEvent_ProcessActions(ActorEvent* this) { Math_SmoothStepToF(&this->fwork[15], 0.0f, 0.2f, 8.0f, 0.01f); } if (this->timer_0BE == 30) { - ActorEvent_8006EC60(this->obj.pos.x, this->obj.pos.y - 50.0f, this->obj.pos.z); + ActorEvent_SpawnTIMine(this->obj.pos.x, this->obj.pos.y - 50.0f, this->obj.pos.z); } if (this->timer_0BE == 0) { this->unk_048 = EVACT_NONE; @@ -1933,8 +1934,7 @@ void ActorEvent_ProcessActions(ActorEvent* this) { break; case EVACT_GFOX_COVER_FIRE: - for (var_v1 = 0, sprite = gSprites; var_v1 < 40; var_v1++, sprite++) { - + for (i = 0, sprite = gSprites; i < ARRAY_COUNT(gSprites); i++, sprite++) { if ((sprite->obj.status == OBJ_ACTIVE) && (sprite->obj.id == OBJ_SPRITE_GFOX_TARGET)) { f32 sp64; f32 sp60; @@ -1956,8 +1956,8 @@ void ActorEvent_ProcessActions(ActorEvent* this) { sp6C.y = 0.0f; sp6C.z = 50.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp6C, &sp78); - func_enmy2_8006EFA0(100, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, sp78.x, sp78.y, - sp78.z, sp58, sp54, 0.0f); + Actor_SpawnGreatFoxLaser(CS_SHOT_ID, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, sp78.x, + sp78.y, sp78.z, sp58, sp54, 0.0f); break; } } @@ -1965,7 +1965,7 @@ void ActorEvent_ProcessActions(ActorEvent* this) { this->unk_048 = EVACT_NONE; break; - case EVACT_19: + case EVACT_19: // projectile ring used by bee enemies func_effect_80083D2C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 40.0f); this->unk_048 = EVACT_NONE; break; @@ -1985,8 +1985,8 @@ void ActorEvent_8006FE28(ActorEvent* this) { void ActorEvent_8006FEEC(ActorEvent* this) { s32 i; - if ((this->dmgType != 0) && (this->health != 0)) { - this->dmgType = 0; + if ((this->dmgType != DMG_NONE) && (this->health != 0)) { + this->dmgType = DMG_NONE; this->timer_0C6 = 15; this->health -= this->damage; @@ -2029,7 +2029,7 @@ bool ActorEvent_800700A4(ActorEvent* this) { gTeamShields[this->iwork[12]] = -1; gTeamDamage[this->iwork[12]] = 0; this->timer_0C2 = 5000; - this->dmgType = 0; + this->dmgType = DMG_NONE; return true; } return false; @@ -2043,38 +2043,38 @@ void ActorEvent_800701E0(ActorEvent* this) { if (ActorEvent_800700A4(this)) { return; } - if ((this->dmgType != 0) && (this->unk_0B4 == EINFO_67) && (this->dmgPart == 0)) { - this->dmgType = 0; + if ((this->dmgType != DMG_NONE) && (this->unk_0B4 == EVID_67) && (this->dmgPart == 0)) { + this->dmgType = DMG_NONE; } - if ((this->dmgType != 0) && (this->unk_0B4 == EINFO_83) && (this->timer_0C2 >= 2)) { - this->dmgType = 0; + if ((this->dmgType != DMG_NONE) && (this->unk_0B4 == EVID_83) && (this->timer_0C2 >= 2)) { + this->dmgType = DMG_NONE; } - if ((this->dmgType != 0) && - (((this->unk_0B4 == EINFO_64) && (this->dmgPart == 2)) || (this->unk_0B4 != EINFO_64))) { + if ((this->dmgType != DMG_NONE) && + (((this->unk_0B4 == EVID_64) && (this->dmgPart == 2)) || (this->unk_0B4 != EVID_64))) { if (this->iwork[12] >= TEAM_ID_KATT) { this->damage = 0; } if ((this->iwork[12] >= TEAM_ID_FALCO) && (this->iwork[12] <= TEAM_ID_PEPPY)) { gTeamShields[this->iwork[12]] -= this->damage; - } else if ((this->unk_0B4 == EINFO_83) && ((this->damage == 30) || (this->damage == 31))) { + } else if ((this->unk_0B4 == EVID_83) && ((this->damage == 30) || (this->damage == 31))) { this->health = 0; } else { this->health -= this->damage; } if (this->health <= 0) { - if (this->unk_0B4 == EINFO_106) { + if (this->unk_0B4 == EVID_106) { BonusText_Display(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 3); if (1) {} gHitCount += 4; D_ctx_80177850 = 15; } - if (this->unk_0B4 != EINFO_83) { - if ((this->unk_0B4 == EINFO_6) && (gCurrentLevel == LEVEL_SOLAR)) { + if (this->unk_0B4 != EVID_83) { + if ((this->unk_0B4 == EVID_6) && (gCurrentLevel == LEVEL_SOLAR)) { AUDIO_PLAY_SFX(0x29018036, this->sfxSource, 4); } else { AUDIO_PLAY_SFX(0x2903700B, this->sfxSource, 4); @@ -2088,11 +2088,11 @@ void ActorEvent_800701E0(ActorEvent* this) { } if (((Rand_ZeroOne() < chance) || (this->iwork[12] != 0)) && (this->info.unk_14 == 0) && - (this->unk_0B4 != EINFO_13) && (this->unk_0B4 != EINFO_14) && (this->unk_0B4 != EINFO_61) && - (this->damage <= 30) && (this->unk_0B4 != EINFO_62) && (this->unk_0B4 != EINFO_64) && - (this->unk_0B4 != EINFO_72) && (this->unk_0B4 != EINFO_68)) { + (this->unk_0B4 != EVID_13) && (this->unk_0B4 != EVID_14) && (this->unk_0B4 != EVID_61) && + (this->damage <= 30) && (this->unk_0B4 != EVID_62) && (this->unk_0B4 != EVID_64) && + (this->unk_0B4 != EVID_72) && (this->unk_0B4 != EVID_68)) { func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->scale * 4.0f); - this->dmgType = 0; + this->dmgType = DMG_NONE; } this->timer_0C2 = 10; @@ -2103,7 +2103,7 @@ void ActorEvent_800701E0(ActorEvent* this) { if (gLevelType == LEVELTYPE_PLANET) { this->timer_04C = RAND_INT(2.9f); - if (this->unk_0B4 == EINFO_2) { + if (this->unk_0B4 == EVID_2) { this->timer_04C = 1; if (this->obj.pos.x < this->hitPos.x) { func_play_800A69F8(1, this->obj.pos.x + 20.0f, this->obj.pos.y, this->obj.pos.z); @@ -2128,25 +2128,25 @@ void ActorEvent_800701E0(ActorEvent* this) { } } - if (this->unk_0B4 == EINFO_90) { + if (this->unk_0B4 == EVID_90) { this->timer_04C = 999; } } else { switch (this->unk_0B4) { - case EINFO_13: + case EVID_13: func_enmy_800654E4(&this->obj); break; - case EINFO_61: + case EVID_61: Meteo_8018CCF8(this); break; - case EINFO_27: + case EVID_27: this->obj.pos.y -= this->vel.y; this->obj.status = OBJ_ACTIVE; func_effect_8007D0E0(this->obj.pos.x - this->vel.x, this->obj.pos.y + 30.0f, this->obj.pos.z - this->vel.z, this->scale * 5.0f); - this->dmgType = 0; + this->dmgType = DMG_NONE; this->timer_0C2 = 10000; this->info.targetOffset = 0.0f; gHitCount += this->info.bonus; @@ -2164,14 +2164,14 @@ void ActorEvent_800701E0(ActorEvent* this) { } } - if (this->unk_0B4 == EINFO_82) { + if (this->unk_0B4 == EVID_82) { AUDIO_PLAY_SFX(0x11000055, this->sfxSource, 0); - this->dmgType = 1; + this->dmgType = DMG_BEAM; func_effect_8007C688(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 3.0f, 60); } } else { this->timer_0C6 = 20; - if ((this->unk_0B4 == EINFO_6) && (gCurrentLevel == LEVEL_SOLAR)) { + if ((this->unk_0B4 == EVID_6) && (gCurrentLevel == LEVEL_SOLAR)) { AUDIO_PLAY_SFX(0x29033037, this->sfxSource, 4); } else if (this->health < 20) { AUDIO_PLAY_SFX(0x2943500F, this->sfxSource, 4); @@ -2179,22 +2179,22 @@ void ActorEvent_800701E0(ActorEvent* this) { AUDIO_PLAY_SFX(0x2903300E, this->sfxSource, 4); } - if ((this->unk_0B4 != EINFO_13) && (this->unk_0B4 != EINFO_61) && (this->unk_0B4 != EINFO_83)) { + if ((this->unk_0B4 != EVID_13) && (this->unk_0B4 != EVID_61) && (this->unk_0B4 != EVID_83)) { func_effect_8007D10C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->scale * 1.5f); } if (((gLevelMode == LEVELMODE_ALL_RANGE) || (gLevelMode == LEVELMODE_UNK_2)) && - (this->unk_0B4 != EINFO_21) && (this->unk_0B4 != EINFO_23)) { + (this->unk_0B4 != EVID_21) && (this->unk_0B4 != EVID_23)) { this->fwork[13] = 20.0f; if (this->obj.pos.x < this->hitPos.x) { this->fwork[13] *= -1.0f; } } - if (this->dmgSource == 1) { + if (this->dmgSource == TEAM_ID_FOX + 1) { switch (this->iwork[12]) { case TEAM_ID_FALCO: - if (this->dmgType == 3) { + if (this->dmgType == DMG_COLLISION) { ActorEvent_SetMessage(gMsg_ID_20210, RCID_FALCO); } else { ActorEvent_SetMessage(gMsg_ID_20060, RCID_FALCO); @@ -2202,7 +2202,7 @@ void ActorEvent_800701E0(ActorEvent* this) { break; case TEAM_ID_PEPPY: - if (this->dmgType == 3) { + if (this->dmgType == DMG_COLLISION) { ActorEvent_SetMessage(gMsg_ID_20200, RCID_PEPPY); } else { ActorEvent_SetMessage(gMsg_ID_20070, RCID_PEPPY); @@ -2210,7 +2210,7 @@ void ActorEvent_800701E0(ActorEvent* this) { break; case TEAM_ID_SLIPPY: - if (this->dmgType == 3) { + if (this->dmgType == DMG_COLLISION) { ActorEvent_SetMessage(gMsg_ID_20190, RCID_SLIPPY); } else { ActorEvent_SetMessage(gMsg_ID_20080, RCID_SLIPPY); @@ -2226,7 +2226,7 @@ void ActorEvent_800701E0(ActorEvent* this) { break; } } - this->dmgType = 0; + this->dmgType = DMG_NONE; } } if ((this->iwork[12] == 0) && (this->iwork[13] == 0) && (this->info.unk_16 != 2) && @@ -2239,13 +2239,13 @@ void ActorEvent_800701E0(ActorEvent* this) { (this->obj.pos.y < (gGroundHeight + 20.0f))) { this->obj.status = OBJ_DYING; this->obj.pos.z -= this->vel.z; - this->dmgType = 1; - if (this->unk_0B4 == EINFO_13) { + this->dmgType = DMG_BEAM; + if (this->unk_0B4 == EVID_13) { this->obj.id = OBJ_ACTOR_182; func_enmy_800654E4(&this->obj); } - if (this->unk_0B4 == EINFO_61) { + if (this->unk_0B4 == EVID_61) { Meteo_8018CCF8(this); } } @@ -2253,9 +2253,9 @@ void ActorEvent_800701E0(ActorEvent* this) { } void ActorEvent_80070BA8(ActorEvent* this) { - if (this->dmgType != 0) { - this->dmgType = 0; - if ((this->unk_0B4 != EINFO_17) || ((this->unk_0B4 == EINFO_17) && (this->dmgPart == 0))) { + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + if ((this->unk_0B4 != EVID_17) || ((this->unk_0B4 == EVID_17) && (this->dmgPart == 0))) { this->timer_0C6 = 10; func_effect_8007C120(this->hitPos.x, this->hitPos.y, this->hitPos.z, this->vel.x, this->vel.y, this->vel.z, 0.2f, 10); @@ -2310,7 +2310,7 @@ void ActorEvent_ProcessTriggers(ActorEvent* this) { case EVC_NONE: break; - case EVC_1: + case EVC_NO_TARGET: if ((gActors[this->iwork[1]].obj.status != OBJ_ACTIVE) || (gActors[this->iwork[1]].health <= 0) || (this->iwork[10] != gActors[this->iwork[1]].aiType)) { ActorEvent_TriggerBranch(this); @@ -2563,14 +2563,14 @@ void ActorEvent_ProcessTriggers(ActorEvent* this) { } break; - case EVC_41: + case EVC_NO_LEADER: if ((gActors[this->iwork[9]].obj.status != OBJ_ACTIVE) || ((gActors[this->iwork[9]].scale < 0.0f) && (this->health <= 0))) { ActorEvent_TriggerBranch(this); } break; - case EVC_42: + case EVC_NO_FOLLOWER: 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])) { @@ -2580,7 +2580,7 @@ void ActorEvent_ProcessTriggers(ActorEvent* this) { ActorEvent_TriggerBranch(this); break; - case EVC_43: + case EVC_HAS_FOLLOWER: 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])) { @@ -2591,7 +2591,7 @@ void ActorEvent_ProcessTriggers(ActorEvent* this) { break; case EVC_TOOK_DAMAGE: - if (this->dmgType != 0) { + if (this->dmgType != DMG_NONE) { ActorEvent_TriggerBranch(this); } break; @@ -2615,7 +2615,7 @@ void ActorEvent_ProcessTriggers(ActorEvent* this) { } break; - case EVC_46: + case EVC_ATTACK_GROUP_CLEARED: 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)) { @@ -2717,13 +2717,13 @@ void ActorEvent_ProcessTriggers(ActorEvent* this) { } break; - case EVC_62: + case EVC_NOT_CHASED: if (D_enmy_Timer_80161670[this->iwork[12]] == 0) { ActorEvent_TriggerBranch(this); } break; - case EVC_63: + case EVC_CHASED: if (D_enmy_Timer_80161670[this->iwork[12]] != 0) { ActorEvent_TriggerBranch(this); } @@ -2804,17 +2804,17 @@ void ActorEvent_80071DC0(ActorEvent* this) { Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); - if (this->unk_0B4 == EINFO_30) { + if (this->unk_0B4 == EVID_30) { rInd = RAND_FLOAT(ARRAY_COUNT(D_800D1074) - 1.1f); // off by 1 error? Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_800D1074[rInd], &sp38); } - if (this->unk_0B4 == EINFO_17) { + if (this->unk_0B4 == EVID_17) { rInd = RAND_FLOAT(ARRAY_COUNT(D_800D0DD4) - 0.1f); Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_800D0DD4[rInd], &sp38); } - if (this->unk_0B4 == EINFO_31) { + if (this->unk_0B4 == EVID_31) { rInd = RAND_FLOAT(ARRAY_COUNT(D_800D1194) - 0.1f); Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_800D1194[rInd], &sp38); } @@ -2846,12 +2846,13 @@ void ActorEvent_80071DC0(ActorEvent* this) { void ActorEvent_800720E8(ActorEvent* this) { switch (this->unk_046) { case 0: - if (this->dmgType != 0) { - if (this->dmgType == 2) { + if (this->dmgType != DMG_NONE) { + if (this->dmgType == DMG_EXPLOSION) { this->damage = 3; } - if ((this->dmgSource >= 101) && (gActors[this->dmgSource - 101].unk_0B4 == EINFO_85)) { + if ((this->dmgSource >= NPC_SHOT_ID + 1) && + (gActors[this->dmgSource - NPC_SHOT_ID - 1].unk_0B4 == EVID_85)) { this->damage = 20; } @@ -2870,7 +2871,7 @@ void ActorEvent_800720E8(ActorEvent* this) { } else { AUDIO_PLAY_SFX(0x2903300E, this->sfxSource, 0); } - this->dmgType = 0; + this->dmgType = DMG_NONE; } break; @@ -2986,15 +2987,15 @@ void ActorEvent_Update(ActorEvent* this) { } return; } - if (((this->unk_0B4 == EINFO_17) || (this->unk_0B4 == EINFO_30) || (this->unk_0B4 == EINFO_31)) && + if (((this->unk_0B4 == EVID_17) || (this->unk_0B4 == EVID_30) || (this->unk_0B4 == EVID_31)) && (this->health <= 0)) { ActorEvent_80071DC0(this); return; } - if (this->unk_0B4 == EINFO_300) { + if (this->unk_0B4 == EVID_300) { gPlayer[0].unk_1A4 = this->index; this->timer_0C2 = 100; - } else if (this->unk_0B4 >= EINFO_200) { + } else if (this->unk_0B4 >= EVID_200) { this->unk_04E++; if (this->unk_04E >= 100) { @@ -3008,8 +3009,8 @@ void ActorEvent_Update(ActorEvent* this) { gActor194yRot[this->unk_046][this->unk_04E] = this->obj.rot.y; gActor194zRot[this->unk_046][this->unk_04E] = this->obj.rot.z; - if (this->dmgType != 0) { - this->dmgType = 0; + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; this->timer_0C6 = 20; this->health -= this->damage; @@ -3026,7 +3027,7 @@ void ActorEvent_Update(ActorEvent* this) { } } - if ((this->unk_0B4 == EINFO_27) && (this->timer_0C2 != 0)) { + if ((this->unk_0B4 == EVID_27) && (this->timer_0C2 != 0)) { this->state = EVSTATE_READY; } @@ -3041,20 +3042,20 @@ void ActorEvent_Update(ActorEvent* this) { } break; - case EVSTATE_6: - case EVSTATE_7: - case EVSTATE_14: - case EVSTATE_15: + case EVSTATE_PURSUE_PLAYER: + case EVSTATE_FLEE_PLAYER: + case EVSTATE_PURSUE_CAMERA: + case EVSTATE_FLEE_CAMERA: spF0 = this->obj.pos.x; spEC = this->obj.pos.y; spE8 = this->obj.pos.z; - if ((this->unk_0B4 == EINFO_33) || (this->unk_0B4 == EINFO_68)) { + if ((this->unk_0B4 == EVID_33) || (this->unk_0B4 == EVID_68)) { Matrix_RotateZ(gCalcMatrix, -(this->vwork[29].z + this->unk_0F4.z) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -this->vwork[29].x * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, -this->vwork[29].y * M_DTOR, MTXF_APPLY); - if ((this->state == EVSTATE_14) || (this->state == EVSTATE_15)) { + if ((this->state == EVSTATE_PURSUE_CAMERA) || (this->state == EVSTATE_FLEE_CAMERA)) { spB8.x = gPlayer[0].cam.eye.x - spF0; spB8.y = gPlayer[0].cam.eye.y - (spEC + 25.0f); spB8.z = (gPlayer[0].cam.eye.z * 15.0f) - spE8; @@ -3104,7 +3105,7 @@ void ActorEvent_Update(ActorEvent* this) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &spB8, &spAC); - if (this->unk_0B4 == EINFO_68) { + if (this->unk_0B4 == EVID_68) { var_fv0 = 80.0f; } else { var_fv0 = 0.0f; @@ -3118,7 +3119,7 @@ void ActorEvent_Update(ActorEvent* this) { this->fwork[16] = -15.0f; } } else { - if ((this->state == EVSTATE_14) || (this->state == EVSTATE_15)) { + if ((this->state == EVSTATE_PURSUE_CAMERA) || (this->state == EVSTATE_FLEE_CAMERA)) { spCC = gPlayer[0].cam.eye.x; spC8 = gPlayer[0].cam.eye.y; spC4 = gPlayer[0].cam.eye.z; @@ -3133,7 +3134,7 @@ void ActorEvent_Update(ActorEvent* this) { spE0 = Math_RadToDeg(Math_Atan2F(spCC - spF0, spC4 - spE8)); - if ((this->state == EVSTATE_7) || (this->state == EVSTATE_15)) { + if ((this->state == EVSTATE_FLEE_PLAYER) || (this->state == EVSTATE_FLEE_CAMERA)) { spE0 += 180.0f; if (spE0 > 360.0f) { spE0 -= 360.0f; @@ -3166,15 +3167,15 @@ void ActorEvent_Update(ActorEvent* this) { index = gActors[index].iwork[12]; D_enmy_Timer_80161670[index] = 5; /* fallthrough */ - case EVSTATE_8: - case EVSTATE_9: + case EVSTATE_PURSUE_TARGET: + case EVSTATE_FLEE_TARGET: spF0 = this->obj.pos.x; spEC = this->obj.pos.y; spE8 = this->obj.pos.z; spE0 = Math_RadToDeg(Math_Atan2F(gActors[this->iwork[1]].obj.pos.x + spDC - spF0, gActors[this->iwork[1]].obj.pos.z + spD4 - spE8)); - if (this->state == EVSTATE_7) { + if (this->state == EVSTATE_FLEE_PLAYER) { // bug? should be EVSTATE_FLEE_TARGET? spE0 += 180.0f; if (spE0 > 360.0f) { spE0 -= 360.0f; @@ -3306,7 +3307,7 @@ void ActorEvent_Update(ActorEvent* this) { } if (this->iwork[6] != 0) { - if ((gLevelMode == LEVELMODE_UNK_2) && (this->unk_0B4 == EINFO_200)) { + if ((gLevelMode == LEVELMODE_UNK_2) && (this->unk_0B4 == EVID_200)) { Math_SmoothStepToAngle(&this->obj.rot.x, this->unk_0F4.x, 0.1f, 10.0f, 0.00001f); Math_SmoothStepToAngle(&this->obj.rot.y, this->unk_0F4.y, 0.1f, 10.0f, 0.00001f); } else { @@ -3338,10 +3339,10 @@ void ActorEvent_Update(ActorEvent* this) { } if (this->fwork[10] > 0.0f) { - if ((this->unk_0B4 == EINFO_13) || (this->unk_0B4 == EINFO_14) || (this->unk_0B4 == EINFO_61) || - (this->unk_0B4 == EINFO_62) || (this->unk_0B4 == EINFO_63) || (this->unk_0B4 == EINFO_64) || - (this->unk_0B4 == EINFO_65) || (this->unk_0B4 == EINFO_66) || (this->unk_0B4 == EINFO_94) || - (this->unk_0B4 == EINFO_95) || (this->unk_0B4 == EINFO_97)) { + if ((this->unk_0B4 == EVID_13) || (this->unk_0B4 == EVID_14) || (this->unk_0B4 == EVID_61) || + (this->unk_0B4 == EVID_62) || (this->unk_0B4 == EVID_63) || (this->unk_0B4 == EVID_64) || + (this->unk_0B4 == EVID_65) || (this->unk_0B4 == EVID_66) || (this->unk_0B4 == EVID_94) || + (this->unk_0B4 == EVID_95) || (this->unk_0B4 == EVID_97)) { this->obj.rot.y -= this->fwork[11] * this->fwork[12]; this->obj.rot.x += this->fwork[11] * this->fwork[12]; } else { @@ -3394,15 +3395,15 @@ void ActorEvent_Update(ActorEvent* this) { ActorEvent_ProcessActions(this); ActorEvent_UpdateTexLines(this); - if (this->unk_0B4 == EINFO_38) { + if (this->unk_0B4 == EVID_38) { ActorEvent_800720E8(this); } else { if (this->scale <= -1.999f) { ActorEvent_80070BA8(this); } else { - if ((this->dmgType == 1) && (this->scale < 0.5f) && (this->unk_0B4 != EINFO_48) && - (this->unk_0B4 != EINFO_49) && (this->unk_0B4 != EINFO_50)) { - this->dmgType = 0; + if ((this->dmgType == DMG_BEAM) && (this->scale < 0.5f) && (this->unk_0B4 != EVID_48) && + (this->unk_0B4 != EVID_49) && (this->unk_0B4 != EVID_50)) { + this->dmgType = DMG_NONE; if (gCurrentLevel == LEVEL_METEO) { AUDIO_PLAY_SFX(0x2902107D, this->sfxSource, 4); } else { @@ -3410,12 +3411,12 @@ void ActorEvent_Update(ActorEvent* this) { } } - if ((this->unk_0B4 < EINFO_200) && (this->unk_0B4 != EINFO_78) && (this->scale >= 0.5f)) { + if ((this->unk_0B4 < EVID_200) && (this->unk_0B4 != EVID_78) && (this->scale >= 0.5f)) { switch (this->unk_0B4) { - case EINFO_71: + case EVID_71: ActorEvent_8006FE28(this); break; - case EINFO_79: + case EVID_79: ActorEvent_8006FEEC(this); break; default: @@ -3426,11 +3427,11 @@ void ActorEvent_Update(ActorEvent* this) { } } switch (this->unk_0B4) { - case EINFO_92: - case EINFO_93: - case EINFO_94: - case EINFO_95: - case EINFO_96: + case EVID_92: + case EVID_93: + case EVID_94: + case EVID_95: + case EVID_96: if (((gGameFrameCount % 8) == 0)) { this->fwork[18] = RAND_FLOAT(255.0f); this->fwork[19] = RAND_FLOAT(255.0f); @@ -3441,7 +3442,7 @@ void ActorEvent_Update(ActorEvent* this) { Math_SmoothStepToF(&this->fwork[17], this->fwork[20], 1.0f, 10.0f, 0.0f); break; - case EINFO_46: + case EVID_46: if (func_play_800A73E4(&spEC, &spFC, this->obj.pos.x, -100.0f, this->obj.pos.z)) { spF0 = 10.0f; @@ -3466,21 +3467,21 @@ void ActorEvent_Update(ActorEvent* this) { this->obj.rot.y = this->unk_0F4.y; break; - case EINFO_31: + case EVID_31: this->obj.rot.z = gGameFrameCount; break; - case EINFO_21: - case EINFO_22: + case EVID_21: + case EVID_22: this->obj.rot.z = gGameFrameCount * 3.0f; break; - case EINFO_3: + case EVID_3: this->unk_0C9 = 1; this->obj.rot.y -= 10.0f; break; - case EINFO_6: + case EVID_6: this->unk_0B6++; if (gCurrentLevel == LEVEL_SOLAR) { if (this->unk_0B6 >= Animation_GetFrameCount(&D_SO_600636C)) { @@ -3495,7 +3496,7 @@ void ActorEvent_Update(ActorEvent* this) { } break; - case EINFO_9: + case EVID_9: this->unk_0B6++; if (this->unk_0B6 >= Animation_GetFrameCount(&D_ENMY_PLANET_40001A4)) { this->unk_0B6 = 0; @@ -3505,21 +3506,21 @@ void ActorEvent_Update(ActorEvent* this) { } break; - case EINFO_48: - case EINFO_49: - case EINFO_50: + case EVID_48: + case EVID_49: + case EVID_50: SectorY_Actor204_Update(this); break; - case EINFO_52: + case EVID_52: ActorEvent_80072474(this); break; - case EINFO_78: + case EVID_78: ActorSupplies_Update(this); break; - case EINFO_79: + case EVID_79: if (this->timer_0C4 == 0) { this->unk_0B6 += 1; if (Animation_GetFrameCount(&D_ZO_600E5EC) < this->unk_0B6) { @@ -3528,7 +3529,7 @@ void ActorEvent_Update(ActorEvent* this) { } break; - case EINFO_80: { + case EVID_80: { Effect* effect; Vec3f sp90; Vec3f sp84; @@ -3635,7 +3636,7 @@ void ActorEvent_Update(ActorEvent* this) { } } break; - case EINFO_81: + case EVID_81: Math_SmoothStepToF(&this->fwork[15], 1.0f, 0.1f, 0.1f, 0.001f); if (this->fwork[15] > 0.5f) { @@ -3657,7 +3658,7 @@ void ActorEvent_Update(ActorEvent* this) { } break; - case EINFO_83: + case EVID_83: if (this->health <= 0) { if (this->unk_0B6 == 20) { spD4 = this->obj.pos.z; @@ -3689,7 +3690,7 @@ void ActorEvent_Update(ActorEvent* this) { } break; - case EINFO_88: + case EVID_88: if (this->unk_04A == 0) { this->unk_046 += 4; if (this->unk_046 >= 255) { @@ -3705,12 +3706,12 @@ void ActorEvent_Update(ActorEvent* this) { } break; - case EINFO_103: - case EINFO_104: + case EVID_103: + case EVID_104: Andross_80187530(this); break; - case EINFO_106: + case EVID_106: this->unk_0B6++; if (this->unk_0B6 >= 6) { this->unk_0B6 = 0; @@ -3803,18 +3804,18 @@ void ActorEvent_Draw(ActorEvent* this) { s16 temp_s0; s32 pad; - if (this->timer_0C6 && (this->unk_0B4 != EINFO_90) && (this->unk_0B4 != EINFO_68) && (this->unk_0B4 != EINFO_72)) { - if ((this->unk_0B4 != EINFO_13) && (this->unk_0B4 != EINFO_14) && (this->unk_0B4 != EINFO_61) && - (this->unk_0B4 != EINFO_62) && (this->unk_0B4 != EINFO_83) && (this->unk_0B4 != EINFO_98) && + if (this->timer_0C6 && (this->unk_0B4 != EVID_90) && (this->unk_0B4 != EVID_68) && (this->unk_0B4 != EVID_72)) { + if ((this->unk_0B4 != EVID_13) && (this->unk_0B4 != EVID_14) && (this->unk_0B4 != EVID_61) && + (this->unk_0B4 != EVID_62) && (this->unk_0B4 != EVID_83) && (this->unk_0B4 != EVID_98) && (this->scale > 0.5f) && (this->timer_0C6 >= 9) && ((this->timer_0C6 & 3) == 0) && (gPlayState != PLAY_PAUSE)) { func_effect_8007C120(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, this->vel.z, this->scale * 0.07f, 3); } - if ((this->unk_0B4 != EINFO_21) && (this->unk_0B4 != EINFO_23) && (this->unk_0B4 != EINFO_79) && - (this->unk_0B4 != EINFO_83) && (this->unk_0B4 != EINFO_27) && (this->unk_0B4 != EINFO_51) && - (this->unk_0B4 != EINFO_13) && (this->unk_0B4 != EINFO_72) && (this->unk_0B4 != EINFO_28) && + if ((this->unk_0B4 != EVID_21) && (this->unk_0B4 != EVID_23) && (this->unk_0B4 != EVID_79) && + (this->unk_0B4 != EVID_83) && (this->unk_0B4 != EVID_27) && (this->unk_0B4 != EVID_51) && + (this->unk_0B4 != EVID_13) && (this->unk_0B4 != EVID_72) && (this->unk_0B4 != EVID_28) && (this->scale > 0.5f)) { sp40 = SIN_DEG(this->timer_0C6 * 400.0f) * this->timer_0C6; Matrix_RotateY(gGfxMatrix, M_DTOR * sp40, MTXF_APPLY); @@ -3829,10 +3830,10 @@ void ActorEvent_Draw(ActorEvent* this) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } - if ((this->unk_0B4 == EINFO_29) || (this->unk_0B4 == EINFO_59) || (this->unk_0B4 == EINFO_60)) { + if ((this->unk_0B4 == EVID_29) || (this->unk_0B4 == EVID_59) || (this->unk_0B4 == EVID_60)) { RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); - } else if ((this->unk_0B4 == EINFO_82) || (this->unk_0B4 == EINFO_90) || - ((this->unk_0B4 == EINFO_6) && (gCurrentLevel == LEVEL_SOLAR))) { + } else if ((this->unk_0B4 == EVID_82) || (this->unk_0B4 == EVID_90) || + ((this->unk_0B4 == EVID_6) && (gCurrentLevel == LEVEL_SOLAR))) { if ((this->timer_0C6 % 2) == 0) { RCP_SetupDL(&gMasterDisp, 0x39); } else { @@ -3841,34 +3842,34 @@ void ActorEvent_Draw(ActorEvent* this) { } switch (this->unk_0B4) { - case EINFO_92: - case EINFO_93: - case EINFO_94: - case EINFO_95: - case EINFO_96: + case EVID_92: + case EVID_93: + case EVID_94: + case EVID_95: + case EVID_96: RCP_SetupDL(&gMasterDisp, 0x22); gDPSetTextureFilter(gMasterDisp++, G_TF_POINT); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, (s32) this->fwork[15], (s32) this->fwork[16], (s32) this->fwork[17], 255); - gSPDisplayList(gMasterDisp++, D_800D003C[this->unk_0B4].dList); + gSPDisplayList(gMasterDisp++, sEventActorInfo[this->unk_0B4].dList); gDPSetTextureFilter(gMasterDisp++, G_TF_BILERP); break; default: - if ((this->unk_0B4 < EINFO_200) && (D_800D003C[this->unk_0B4].dList != NULL)) { - gSPDisplayList(gMasterDisp++, D_800D003C[this->unk_0B4].dList); + if ((this->unk_0B4 < EVID_200) && (sEventActorInfo[this->unk_0B4].dList != NULL)) { + gSPDisplayList(gMasterDisp++, sEventActorInfo[this->unk_0B4].dList); } switch (this->unk_0B4) { - case EINFO_56: + case EVID_56: Cutscene_DrawGreatFox(); break; - case EINFO_0: + case EVID_0: this->iwork[11] = 1; Actor_DrawEngineAndContrails(this); break; - case EINFO_2: + case EVID_2: this->fwork[15] -= this->fwork[15] * 0.1f; this->fwork[26] -= this->fwork[26] * 0.1f; this->fwork[16] -= this->fwork[16] * 0.1f; @@ -3886,7 +3887,7 @@ void ActorEvent_Draw(ActorEvent* this) { func_edisplay_8005B388(this); break; - case EINFO_43: + case EVID_43: if (gLevelType == LEVELTYPE_PLANET) { gSPDisplayList(gMasterDisp++, D_ENMY_PLANET_40018A0); } else { @@ -3895,12 +3896,12 @@ void ActorEvent_Draw(ActorEvent* this) { Actor_DrawEngineAndContrails(this); break; - case EINFO_5: + case EVID_5: this->iwork[11] = 1; Actor_DrawEngineAndContrails(this); break; - case EINFO_6: + case EVID_6: if (gCurrentLevel == LEVEL_SOLAR) { gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); Animation_GetFrameData(&D_SO_600636C, this->unk_0B6, sp114); @@ -3912,18 +3913,18 @@ void ActorEvent_Draw(ActorEvent* this) { } break; - case EINFO_7: + case EVID_7: this->iwork[11] = 1; Actor_DrawEngineAndContrails(this); break; - case EINFO_9: + case EVID_9: Matrix_Translate(gGfxMatrix, 0.0f, -30.0f, 0.0f, MTXF_APPLY); Animation_GetFrameData(&D_ENMY_PLANET_40001A4, this->unk_0B6, sp114); Animation_DrawSkeleton(1, D_ENMY_PLANET_4000270, sp114, NULL, NULL, this, &gIdentityMatrix); break; - case EINFO_18: + case EVID_18: if (this->fwork[0] > 0.1f) { this->iwork[11] = 1; Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -30.0f, MTXF_APPLY); @@ -3932,7 +3933,7 @@ void ActorEvent_Draw(ActorEvent* this) { } break; - case EINFO_19: + case EVID_19: if (this->fwork[0] > 0.1f) { this->iwork[11] = 1; Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -30.0f, MTXF_APPLY); @@ -3941,12 +3942,12 @@ void ActorEvent_Draw(ActorEvent* this) { } break; - case EINFO_20: + case EVID_20: RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gSPDisplayList(gMasterDisp++, D_A6_601A120); break; - case EINFO_21: + case EVID_21: gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_A6_6018BF0); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); @@ -3955,7 +3956,7 @@ void ActorEvent_Draw(ActorEvent* this) { Actor_DrawEngineGlow(this, 2); break; - case EINFO_22: + case EVID_22: gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_A6_6019730); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); @@ -3964,7 +3965,7 @@ void ActorEvent_Draw(ActorEvent* this) { Actor_DrawEngineGlow(this, 2); break; - case EINFO_27: + case EVID_27: if (this->timer_0C2 != 0) { if (((this->timer_0C2 & 3) == 0) && (gPlayState != PLAY_PAUSE)) { func_effect_8007D0E0(RAND_FLOAT_CENTERED(200.0f) + this->obj.pos.x, @@ -3980,13 +3981,13 @@ void ActorEvent_Draw(ActorEvent* this) { } break; - case EINFO_31: + case EVID_31: Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_A6_600E0C0); break; - case EINFO_33: + case EVID_33: Animation_GetFrameData(&D_ENMY_SPACE_400A30C, this->unk_0B6, sp114); Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 1.5f, 1.5f, 1.5f, MTXF_APPLY); @@ -3995,23 +3996,23 @@ void ActorEvent_Draw(ActorEvent* this) { Math_SmoothStepToF(&this->fwork[16], 0.0f, 0.3f, 2.0f, 0.0001f); break; - case EINFO_36: + case EVID_36: Animation_GetFrameData(&D_TI1_700CAF4, this->unk_0B6, sp114); sp114[2].z += this->fwork[15]; Animation_DrawSkeleton(1, D_TI1_700CB60, sp114, NULL, NULL, this, &gIdentityMatrix); break; - case EINFO_38: + case EVID_38: ActorEvent_80074E3C(this); break; - case EINFO_48: - case EINFO_49: - case EINFO_50: + case EVID_48: + case EVID_49: + case EVID_50: SectorY_Actor204_Draw(this); break; - case EINFO_52: + case EVID_52: Animation_GetFrameData(&D_ZO_601F874, this->unk_0B6, sp114); sp114[2].z -= this->fwork[15]; gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); @@ -4020,7 +4021,7 @@ void ActorEvent_Draw(ActorEvent* this) { gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); break; - case EINFO_64: + case EVID_64: Matrix_Push(&gGfxMatrix); Matrix_RotateX(gGfxMatrix, this->unk_0F4.x * M_DTOR, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, this->unk_0F4.y * M_DTOR, MTXF_APPLY); @@ -4036,30 +4037,30 @@ void ActorEvent_Draw(ActorEvent* this) { Matrix_Pop(&gGfxMatrix); break; - case EINFO_67: + case EVID_67: gSPDisplayList(gMasterDisp++, D_ME_6008AA0); RCP_SetupDL(&gMasterDisp, 0x35); gSPDisplayList(gMasterDisp++, D_ME_6009E30); break; - case EINFO_78: + case EVID_78: ActorSupplies_Draw(this); break; - case EINFO_79: + case EVID_79: temp_s0 = this->state; this->state = 2; // actor 235 state Zoness_80190430(this); this->state = temp_s0; break; - case EINFO_80: + case EVID_80: Matrix_Scale(gGfxMatrix, 0.6f, 0.6f, 0.6f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_VE1_9011200); break; - case EINFO_81: + case EVID_81: if (this->fwork[15] > 0.001f) { Matrix_Scale(gGfxMatrix, this->fwork[15], this->fwork[15], this->fwork[15], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -4068,57 +4069,57 @@ void ActorEvent_Draw(ActorEvent* this) { } break; - case EINFO_82: + case EVID_82: gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_MA_600DA10); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); break; - case EINFO_83: + case EVID_83: Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 3.0f, MTXF_APPLY); Animation_GetFrameData(&D_AQ_602201C, this->unk_0B6, sp114); Animation_DrawSkeleton(1, D_AQ_60220E8, sp114, NULL, NULL, this, &gIdentityMatrix); break; - case EINFO_85: + case EVID_85: gSPDisplayList(gMasterDisp++, D_D00B880); Actor_DrawEngineAndContrails(this); break; - case EINFO_86: + case EVID_86: gSPDisplayList(gMasterDisp++, D_D009A40); Actor_DrawEngineAndContrails(this); break; - case EINFO_88: + case EVID_88: RCP_SetupDL(&gMasterDisp, 0x16); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, this->unk_046, this->unk_046, this->unk_046, 255); gSPDisplayList(gMasterDisp++, D_AQ_6008970); break; - case EINFO_89: + case EVID_89: RCP_SetupDL(&gMasterDisp, 0x15); gSPDisplayList(gMasterDisp++, D_AQ_6000E10); break; - case EINFO_103: - case EINFO_104: + case EVID_103: + case EVID_104: Andross_8018769C(this); break; - case EINFO_105: + case EVID_105: RCP_SetupDL(&gMasterDisp, 0x23); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 143); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 0); gSPDisplayList(gMasterDisp++, D_WZ_7000000); break; - case EINFO_106: + case EVID_106: Animation_GetFrameData(&D_ENMY_SPACE_4000080, this->unk_0B6, sp114); Animation_DrawSkeleton(1, D_ENMY_SPACE_400014C, sp114, NULL, NULL, this, &gIdentityMatrix); break; - case 0xFFF: + case EVID_FFF: this->timer_0C2 = 10; break; } @@ -4144,7 +4145,7 @@ void func_enmy2_800763A4(Actor* actor) { Vec3f sp4C; s32 pad; - if (actor->unk_0B4 == EINFO_27) { + if (actor->unk_0B4 == EVID_27) { actor->obj.pos.y -= actor->vel.y; actor->obj.status = OBJ_ACTIVE; func_effect_8007D0E0(actor->obj.pos.x - actor->vel.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z - actor->vel.z, @@ -4199,7 +4200,7 @@ void func_enmy2_800763A4(Actor* actor) { break; } - if (((actor->timer_0BC % 4U) == 1) && (actor->unk_0B4 != EINFO_13) && (actor->unk_0B4 != EINFO_61)) { + if (((actor->timer_0BC % 4U) == 1) && (actor->unk_0B4 != EVID_13) && (actor->unk_0B4 != EVID_61)) { func_effect_8007D24C(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 2.2f); } @@ -4257,7 +4258,7 @@ void func_enmy2_800763A4(Actor* actor) { func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); } - if ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0B4 == EINFO_2)) { + if ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0B4 == EVID_2)) { if (actor->fwork[17] < 360.0f) { func_play_800A69F8(1, actor->obj.pos.x + 20.0f, actor->obj.pos.y, actor->obj.pos.z); actor->fwork[17] = 777.0f; @@ -4327,7 +4328,7 @@ void func_enmy2_800763A4(Actor* actor) { } } } - if ((actor->dmgType != 0) || (actor->timer_0BC == 0) || + if ((actor->dmgType != DMG_NONE) || (actor->timer_0BC == 0) || ((actor->itemDrop != DROP_NONE) && (actor->obj.id != OBJ_ACTOR_ALLRANGE))) { if (gLevelMode == LEVELMODE_ALL_RANGE) { for (var_s0 = 0; var_s0 < 4; var_s0++) { @@ -4344,12 +4345,12 @@ void func_enmy2_800763A4(Actor* actor) { actor->vel.z, 5.0f, 15); func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z - actor->vel.z, 8.0f); } else { - if ((actor->unk_0B4 != EINFO_13) && (actor->unk_0B4 != EINFO_61)) { + if ((actor->unk_0B4 != EVID_13) && (actor->unk_0B4 != EVID_61)) { func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z - actor->vel.z, actor->scale * 5.0f); } - if (actor->unk_0B4 == EINFO_36) { + if (actor->unk_0B4 == EVID_36) { func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, actor->vel.x, actor->vel.y, actor->vel.z, 5.0f, 15); } @@ -4377,7 +4378,7 @@ void func_enmy2_800763A4(Actor* actor) { } void ActorEvent_Dying(ActorEvent* this) { - if ((this->unk_0B4 == EINFO_48) || (this->unk_0B4 == EINFO_49) || (this->unk_0B4 == EINFO_50)) { + if ((this->unk_0B4 == EVID_48) || (this->unk_0B4 == EVID_49) || (this->unk_0B4 == EVID_50)) { SectorY_Actor204_Update(this); } else { func_enmy2_800763A4(this); diff --git a/src/engine/fox_hud.c b/src/engine/fox_hud.c index c1a56913..40c67dcc 100644 --- a/src/engine/fox_hud.c +++ b/src/engine/fox_hud.c @@ -2460,7 +2460,7 @@ s32 func_hud_8008B774(void) { (gCurrentLevel == LEVEL_SECTOR_Y))) { for (i = 0; i < 60; i++) { if ((gActors[i].obj.status == OBJ_ACTIVE) && (gActors[i].iwork[12] == temp)) { - if ((gActors[i].unk_0B4 == EINFO_2) || (gActors[i].unk_0B4 == EINFO_43) || + if ((gActors[i].unk_0B4 == EVID_2) || (gActors[i].unk_0B4 == EVID_43) || ((gActors[i].obj.id == OBJ_ACTOR_TEAM_BOSS) && ((gActors[i].aiType == AI360_FALCO) || (gActors[i].aiType == AI360_SLIPPY) || (gActors[i].aiType == AI360_PEPPY)))) { @@ -4327,9 +4327,9 @@ bool func_hud_80091DF4(Actor* actor) { sp44.y = 0.0f; sp44.z = 100.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); - func_enmy2_8006EEFC(actor->aiType, actor->obj.pos.x + (sp38.x * 1.5), actor->obj.pos.y + (sp38.y * 1.5), - actor->obj.pos.z + (sp38.z * 1.5), sp38.x, sp38.y, sp38.z, actor->obj.rot.x, - actor->obj.rot.y, actor->obj.rot.z); + Actor_SpawnPlayerLaser(actor->aiType, actor->obj.pos.x + (sp38.x * 1.5), actor->obj.pos.y + (sp38.y * 1.5), + actor->obj.pos.z + (sp38.z * 1.5), sp38.x, sp38.y, sp38.z, actor->obj.rot.x, + actor->obj.rot.y, actor->obj.rot.z); } return false; } @@ -4339,9 +4339,9 @@ bool func_hud_80091F00(Actor* actor) { Vec3f sp40; Vec3f sp34; - actor->dmgType = 0; + actor->dmgType = DMG_NONE; - if ((actor->state == 3) || (temp_v0 == 2)) { + if ((actor->state == 3) || (temp_v0 == DMG_EXPLOSION)) { return false; } @@ -4376,7 +4376,7 @@ bool func_hud_80091F00(Actor* actor) { return false; } - if ((actor->dmgType == 3) && (actor->dmgSource == 1)) { + if ((actor->dmgType == DMG_COLLISION) && (actor->dmgSource == AI360_FOX + 1)) { switch (actor->aiType) { case AI360_FALCO: Radio_PlayMessage(gMsg_ID_20210, RCID_FALCO); @@ -4390,7 +4390,7 @@ bool func_hud_80091F00(Actor* actor) { } } - if ((actor->dmgType != 3) && (actor->dmgSource == 1)) { + if ((actor->dmgType != DMG_COLLISION) && (actor->dmgSource == AI360_FOX + 1)) { switch (actor->aiType) { case AI360_FALCO: Radio_PlayMessage(gMsg_ID_20060, RCID_FALCO); @@ -4404,7 +4404,7 @@ bool func_hud_80091F00(Actor* actor) { } } - if ((actor->dmgSource == 2) || (actor->dmgSource == 100)) { + if ((actor->dmgSource == DMG_SRC_2) || (actor->dmgSource == DMG_SRC_100)) { switch (actor->aiType) { case AI360_FALCO: Radio_PlayMessage(gMsg_ID_20030, RCID_FALCO); @@ -4705,7 +4705,7 @@ void ActorTeamBoss_Update(ActorTeamBoss* this) { func_hud_80091B90(this); func_hud_80091DF4(this); - if (this->dmgType != 0) { + if (this->dmgType != DMG_NONE) { func_hud_80091F00(this); } diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index 18d3d8c7..b1244887 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -655,9 +655,9 @@ void Play_ClearObjectData(void) { PlayerShot_Initialize(&gPlayerShots[i]); } D_ctx_801782B8 = D_ctx_801782BC = D_ctx_801782C0 = D_ctx_801782D0 = gBossActive = D_ctx_8017828C = D_ctx_8017812C = - gPrevEventActorIndex = D_ctx_80177E78 = gRingPassCount = 0; - D_ctx_80177F10.x = D_ctx_80177F10.y = D_ctx_80177F10.z = D_ctx_80177E88.x = D_ctx_80177E88.y = D_ctx_80177E88.z = - 0.0f; + gPrevEventActorIndex = gFormationLeaderIndex = gRingPassCount = 0; + gFormationInitPos.x = gFormationInitPos.y = gFormationInitPos.z = gFormationInitRot.x = gFormationInitRot.y = + gFormationInitRot.z = 0.0f; for (i = 0; i < ARRAY_COUNT(gTeamArrowsViewPos); i++) { gTeamArrowsViewPos[i].x = gTeamArrowsViewPos[i].y = gTeamArrowsViewPos[i].z = 100.0f; } @@ -1914,20 +1914,20 @@ void func_play_800A8BA4(Player* player) { Player_ApplyDamage(player, temp_v0, actor->info.damage); } } else if (actor->obj.id == OBJ_ACTOR_EVENT) { - if (actor->unk_0B4 == EINFO_42) { + if (actor->unk_0B4 == EVID_42) { temp_v0 = func_play_800A8304(player, ACTOR_EVENT_ID, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, actor->obj.rot.x, actor->obj.rot.y, actor->obj.rot.z); if (temp_v0 != 0) { Player_ApplyDamage(player, temp_v0, actor->info.damage); } - } else if (actor->unk_0B4 == EINFO_63) { + } else if (actor->unk_0B4 == EVID_63) { spfD4.x = fabsf(actor->obj.pos.x - player->pos.x); spfD4.y = fabsf(actor->obj.pos.y - player->pos.y); spfD4.z = fabsf(actor->obj.pos.z - player->trueZpos); if ((VEC3F_MAG(&spfD4)) < 900.0f) { Player_ApplyDamage(player, 0, actor->info.damage); - actor->dmgType = 3; + actor->dmgType = DMG_COLLISION; } } else { temp_v0 = func_play_800A7974(player, actor->info.hitbox, &sp98, actor->obj.pos.x, @@ -1935,7 +1935,7 @@ void func_play_800A8BA4(Player* player) { actor->obj.rot.y, actor->obj.rot.z, actor->vwork[29].x, actor->vwork[29].y, actor->vwork[29].z + actor->unk_0F4.z); if (temp_v0 != 0) { - if ((temp_v0 < 0) && (actor->unk_0B4 == EINFO_38)) { + if ((temp_v0 < 0) && (actor->unk_0B4 == EVID_38)) { actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SX_6032328); if (gRingPassCount >= 0) { actor->unk_046 = 2; @@ -1956,7 +1956,7 @@ void func_play_800A8BA4(Player* player) { } } else { Player_ApplyDamage(player, temp_v0, actor->info.damage); - actor->dmgType = 3; + actor->dmgType = DMG_COLLISION; actor->dmgSource = player->num + 1; } } @@ -1967,7 +1967,7 @@ void func_play_800A8BA4(Player* player) { actor->fwork[8] + actor->obj.pos.y + 25.0f, actor->obj.pos.z, actor->fwork[29], actor->fwork[26], actor->obj.rot.z, 0.0f, 0.0f, 0.0f); if (temp_v0 != 0) { - actor->dmgType = 3; + actor->dmgType = DMG_COLLISION; if (actor->info.damage) { Player_ApplyDamage(player, temp_v0, actor->info.damage); } else { @@ -1988,7 +1988,7 @@ void func_play_800A8BA4(Player* player) { player->whooshTimer = 4; } } else { - actor->dmgType = 3; + actor->dmgType = DMG_COLLISION; if (actor->obj.id == OBJ_ACTOR_190) { actor->dmgType = -1; } @@ -2764,7 +2764,7 @@ void func_play_800AC290(Player* player, PlayerShot* shot, f32 arg2, f32 arg3, Pl shot->unk_64 = 30; } } - shot->playerNum = player->num; + shot->sourceId = player->num; } void func_play_800AC650(Player* player, PlayerShot* shot, PlayerShotId shotId, f32 speed) { @@ -2815,7 +2815,7 @@ void func_play_800AC650(Player* player, PlayerShot* shot, PlayerShotId shotId, f shot->unk_64 = 40; shot->obj.id = shotId; - shot->playerNum = player->num; + shot->sourceId = player->num; if (shotId == PLAYERSHOT_8) { if (speed <= 65.0f) { shot->unk_5C = 1; @@ -2940,7 +2940,7 @@ void func_play_800ACDC0(Player* player, PlayerShot* shot, PlayerShotId shotId) { shot->unk_64 = 30; shot->unk_58 = 1; - shot->playerNum = player->num; + shot->sourceId = player->num; } void func_play_800AD094(Player* player) { diff --git a/src/engine/fox_tank.c b/src/engine/fox_tank.c index d9ec4dbe..813391e8 100644 --- a/src/engine/fox_tank.c +++ b/src/engine/fox_tank.c @@ -1403,7 +1403,7 @@ void func_tank_800481F4(Player* player) { actor->vwork[29].z + actor->unk_0F4.z); if (temp_v0 != 0) { Player_ApplyDamage(player, temp_v0, actor->info.damage); - actor->dmgType = 3; + actor->dmgType = DMG_COLLISION; actor->dmgSource = player->num + 1; } } else if (actor->obj.id == OBJ_ACTOR_207) { @@ -1426,7 +1426,7 @@ void func_tank_800481F4(Player* player) { player->vel.x = 0.0f; player->vel.y = 30.0f; player->pos.x = player->basePos.x; - actor->dmgType = 3; + actor->dmgType = DMG_COLLISION; Player_ApplyDamage(player, 0, 5); player->timer_498 = 1; } @@ -1451,7 +1451,7 @@ void func_tank_800481F4(Player* player) { player->vel.x = 0.0f; player->vel.y = 30.0f; player->pos.x = player->basePos.x; - actor->dmgType = 3; + actor->dmgType = DMG_COLLISION; if (actor->info.damage != 0) { Player_ApplyDamage(player, 0, 20); } else { @@ -1463,7 +1463,7 @@ void func_tank_800481F4(Player* player) { actor->obj.pos.z, actor->obj.rot.x, actor->obj.rot.y, actor->obj.rot.z, 0.0f, 0.0f, 0.0f); if (temp_v0 != 0) { - actor->dmgType = 3; + actor->dmgType = DMG_COLLISION; if ((actor->obj.id == OBJ_ACTOR_225) || (actor->obj.id == OBJ_ACTOR_190)) { actor->dmgType = -1; } diff --git a/src/overlays/ovl_i1/fox_co.c b/src/overlays/ovl_i1/fox_co.c index fe6f3912..3d88e7aa 100644 --- a/src/overlays/ovl_i1/fox_co.c +++ b/src/overlays/ovl_i1/fox_co.c @@ -1127,8 +1127,8 @@ s32 Corneria_8018AB64(Actor* actor) { void Corneria_8018ACE0(Actor* actor) { - if (actor->dmgType != 0) { - actor->dmgType = 0; + if (actor->dmgType != DMG_NONE) { + actor->dmgType = DMG_NONE; if (actor->dmgPart == 0) { AUDIO_PLAY_SFX(0x29034003, actor->sfxSource, 4); func_effect_8007C120(actor->obj.pos.x, actor->obj.pos.y + 200.0f, actor->obj.pos.z, actor->vel.x, @@ -2401,8 +2401,8 @@ void Corneria_8018F044(Scenery* scenery) { switch (scenery->state) { case 0: - if (scenery->dmgType != 0) { - scenery->dmgType = 0; + if (scenery->dmgType != DMG_NONE) { + scenery->dmgType = DMG_NONE; if (scenery->dmgPart < 2) { scenery->unk_44++; scenery->timer_4C = 5; diff --git a/src/overlays/ovl_i1/fox_ve1.c b/src/overlays/ovl_i1/fox_ve1.c index 5da5e486..bdf66425 100644 --- a/src/overlays/ovl_i1/fox_ve1.c +++ b/src/overlays/ovl_i1/fox_ve1.c @@ -339,8 +339,8 @@ void Venom1_80192518(Actor* actor) { f32 temp_fv1_2; Effect* effect; - if (actor->dmgType == 1) { - actor->dmgType = 0; + if (actor->dmgType == DMG_BEAM) { + actor->dmgType = DMG_NONE; func_effect_8007A6F0(&actor->obj.pos, 0x29121007); } @@ -621,8 +621,8 @@ void Venom1_80192CB0(Actor* actor) { } void Venom1_80192CD4(Actor* actor) { - if (actor->dmgType == 1) { - actor->dmgType = 0; + if (actor->dmgType == DMG_BEAM) { + actor->dmgType = DMG_NONE; func_effect_8007A6F0(&actor->obj.pos, 0x29121007); } @@ -763,8 +763,8 @@ void Venom1_80192EB0(Actor* actor) { } break; } - if (actor->dmgType == 1) { - actor->dmgType = 0; + if (actor->dmgType == DMG_BEAM) { + actor->dmgType = DMG_NONE; func_effect_8007A6F0(&actor->obj.pos, 0x29121007); } actor->iwork[0]++; @@ -778,8 +778,8 @@ void Venom1_801933B4(Actor* actor) { void Venom1_801933DC(Actor* actor) { f32* hitboxData; - if (actor->dmgType == 1) { - actor->dmgType = 0; + if (actor->dmgType == DMG_BEAM) { + actor->dmgType = DMG_NONE; AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 0); } @@ -1537,8 +1537,8 @@ void Venom1_80194398(Boss* boss) { } } } - if (boss->dmgType == 1) { - boss->dmgType = 0; + if (boss->dmgType == DMG_BEAM) { + boss->dmgType = DMG_NONE; switch (boss->state) { case 0: case 1: diff --git a/src/overlays/ovl_i2/fox_me.c b/src/overlays/ovl_i2/fox_me.c index 2fe0eefe..ac907a3b 100644 --- a/src/overlays/ovl_i2/fox_me.c +++ b/src/overlays/ovl_i2/fox_me.c @@ -44,8 +44,8 @@ Vec3f D_i2_80195610[] = { }; void Meteo_80187530(Actor* actor) { - if (actor->dmgType == 1) { - actor->dmgType = 0; + if (actor->dmgType == DMG_BEAM) { + actor->dmgType = DMG_NONE; func_effect_8007A6F0(&actor->obj.pos, 0x2902107D); } } @@ -53,8 +53,8 @@ void Meteo_80187530(Actor* actor) { void Meteo_8018756C(Actor* actor) { Vec3f vec; - if (actor->dmgType != 0) { - actor->dmgType = 0; + if (actor->dmgType != DMG_NONE) { + actor->dmgType = DMG_NONE; actor->health -= actor->damage; if (actor->health <= 0) { actor->obj.status = OBJ_DYING; @@ -95,7 +95,7 @@ void Meteo_80187650(Actor* actor) { func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 6.0f); } - if (actor->dmgType != 0) { + if (actor->dmgType != DMG_NONE) { func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f); Object_Kill(&actor->obj, actor->sfxSource); @@ -132,7 +132,7 @@ void Meteo_801877C4(Actor* actor) { actor->obj.pos.x = actor->fwork[0] + sp44.x; actor->obj.pos.y = actor->fwork[1] + sp44.y; - if (actor->dmgType != 0) { + if (actor->dmgType != DMG_NONE) { Actor_Despawn(actor); func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); Object_Kill(&actor->obj, actor->sfxSource); @@ -155,7 +155,7 @@ void Meteo_8018795C(Actor* actor) { actor->obj.rot.y += 7.0f; actor->obj.rot.x += 3.3f; - if (actor->dmgType != 0) { + if (actor->dmgType != DMG_NONE) { Actor_Despawn(actor); func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); Object_Kill(&actor->obj, actor->sfxSource); @@ -191,7 +191,7 @@ void Meteo_80187B08(Actor* actor) { func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 6.0f); } - if ((actor->dmgType != 0) || (actor->timer_0BC == 0)) { + if ((actor->dmgType != DMG_NONE) || (actor->timer_0BC == 0)) { func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); Object_Kill(&actor->obj, actor->sfxSource); func_effect_8007D0E0(actor->obj.pos.x - actor->vel.x, actor->obj.pos.y, actor->obj.pos.z - actor->vel.z, 8.0f); @@ -385,13 +385,13 @@ void Meteo_80188344(Boss* boss) { if (boss->timer_050 == 0) { boss->state = 2; - boss->dmgType = 0; + boss->dmgType = DMG_NONE; } break; case 2: - if (boss->dmgType == 1) { - boss->dmgType = 0; + if (boss->dmgType == DMG_BEAM) { + boss->dmgType = DMG_NONE; boss->timer_054 = 5; boss->swork[0] += 32; @@ -858,8 +858,8 @@ void Meteo_8018978C(Boss* boss) { } } - if (boss->dmgType != 0) { - boss->dmgType = 0; + if (boss->dmgType != DMG_NONE) { + boss->dmgType = DMG_NONE; if ((boss->dmgPart != 7) && (boss->dmgPart >= 5) && (boss->dmgPart != 5)) { AUDIO_PLAY_SFX(0x29121007, boss->sfxSource, 4); } @@ -2038,10 +2038,10 @@ void Meteo_LevelStart(Player* player) { Matrix_RotateX(gCalcMatrix, M_DTOR * sp68, MTXF_APPLY); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp58, &sp4C); - func_enmy2_8006EFA0(100, actor3->obj.pos.x + (D_ctx_80177A48[3] * 74.0f) + (sp4C.x * 0.6f), - actor3->obj.pos.y - 232.0f + (sp4C.y * 0.8f), - actor3->obj.pos.z - 1190.0f + (sp4C.z * 0.8f), sp4C.x, sp4C.y, sp4C.z, sp68, - sp64, 0.0f); + Actor_SpawnGreatFoxLaser(100, actor3->obj.pos.x + (D_ctx_80177A48[3] * 74.0f) + (sp4C.x * 0.6f), + actor3->obj.pos.y - 232.0f + (sp4C.y * 0.8f), + actor3->obj.pos.z - 1190.0f + (sp4C.z * 0.8f), sp4C.x, sp4C.y, sp4C.z, + sp68, sp64, 0.0f); } if (player->csEventTimer == 1) { func_effect_8007D2C8(gActors[player->meTargetIndex].obj.pos.x, diff --git a/src/overlays/ovl_i2/fox_sx.c b/src/overlays/ovl_i2/fox_sx.c index 1f058636..533996d5 100644 --- a/src/overlays/ovl_i2/fox_sx.c +++ b/src/overlays/ovl_i2/fox_sx.c @@ -62,9 +62,9 @@ void SectorX_8018F1DC(Actor* actor) { Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, actor->unk_0F4.x * M_DTOR, MTXF_APPLY); Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - func_enmy2_8006EEFC(actor->index, actor->obj.pos.x + (dest.x * 1.5), actor->obj.pos.y + (dest.y * 1.5), - actor->obj.pos.z + (dest.z * 1.5), dest.x, dest.y, dest.z, actor->unk_0F4.x, - actor->unk_0F4.y + 180.0f, 0.0f); + Actor_SpawnPlayerLaser(actor->index, actor->obj.pos.x + (dest.x * 1.5), actor->obj.pos.y + (dest.y * 1.5), + actor->obj.pos.z + (dest.z * 1.5), dest.x, dest.y, dest.z, actor->unk_0F4.x, + actor->unk_0F4.y + 180.0f, 0.0f); } void SectorX_8018F330(Actor* actor) { @@ -393,8 +393,8 @@ void SectorX_80190078(Boss* boss) { } } - if (boss->dmgType != 0) { - boss->dmgType = 0; + if (boss->dmgType != DMG_NONE) { + boss->dmgType = DMG_NONE; if (boss->swork[0] == 1) { if ((boss->dmgPart == 0) && ((boss->fwork[4] < 45.0f) || (boss->fwork[4] > 315.0f))) { AUDIO_PLAY_SFX(0x2903300E, boss->sfxSource, 4); @@ -1492,8 +1492,8 @@ void SectorX_LevelStart(Player* player) { src.y = src.x = 0.0f; src.z = 100.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - func_enmy2_8006EEFC(100, 0.0f, player->cam.eye.y + 50.0f, player->cam.eye.z + 20.0f, dest.x, dest.y, - dest.z, xyzDeg, xzDeg, 0.0f); + Actor_SpawnPlayerLaser(CS_SHOT_ID, 0.0f, player->cam.eye.y + 50.0f, player->cam.eye.z + 20.0f, dest.x, + dest.y, dest.z, xyzDeg, xzDeg, 0.0f); } if (gCsFrameCount == 143) { Object_Kill(&gPlayerShots[0].obj, gPlayerShots[0].sfxSource); diff --git a/src/overlays/ovl_i3/fox_a6.c b/src/overlays/ovl_i3/fox_a6.c index d893f686..832f3bac 100644 --- a/src/overlays/ovl_i3/fox_a6.c +++ b/src/overlays/ovl_i3/fox_a6.c @@ -2083,7 +2083,7 @@ void Area6_8018D3CC(s32 arg0, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, gPlayerShots[i].unk_60 = 0; gPlayerShots[i].obj.id = PLAYERSHOT_1; gPlayerShots[i].unk_64 = 150; - gPlayerShots[i].playerNum = 100; + gPlayerShots[i].sourceId = CS_SHOT_ID; AUDIO_PLAY_SFX(0x2900000D, gPlayerShots[i].sfxSource, 4); break; @@ -2165,22 +2165,22 @@ void Area6_8018D804(Actor* actor, s32 arg1) { AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); } -void Area6_8018D920(Vec3f* arg0) { - f32 sp6C = arg0->x - arg0->x; - f32 sp68 = arg0->y - arg0->y; - f32 sp64 = arg0->z - 1000.0f - arg0->z; - f32 sp60 = Math_RadToDeg(Math_Atan2F(sp6C, sp64)); - f32 sp5C = Math_RadToDeg(-Math_Atan2F(sp68, sqrtf(SQ(sp6C) + SQ(sp64)))); - Vec3f sp50; - Vec3f sp44; +void Area6_8018D920(Vec3f* pos) { + f32 sp6C = pos->x - pos->x; // what is this calculation? + f32 sp68 = pos->y - pos->y; + f32 sp64 = pos->z - 1000.0f - pos->z; + f32 yRot = Math_RadToDeg(Math_Atan2F(sp6C, sp64)); + f32 xRot = Math_RadToDeg(-Math_Atan2F(sp68, sqrtf(SQ(sp6C) + SQ(sp64)))); + Vec3f speed; + Vec3f vel; - Matrix_RotateY(gCalcMatrix, M_DTOR * sp60, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, M_DTOR * sp5C, MTXF_APPLY); - sp50.x = 0.0f; - sp50.y = 0.0f; - sp50.z = 100.0f; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp50, &sp44); - Area6_8018D3CC(100, arg0->x, arg0->y, arg0->z, sp44.x, sp44.y, sp44.z, sp5C, sp60, 0.0f); + Matrix_RotateY(gCalcMatrix, M_DTOR * yRot, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, M_DTOR * xRot, MTXF_APPLY); + speed.x = 0.0f; + speed.y = 0.0f; + speed.z = 100.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &speed, &vel); + Area6_8018D3CC(CS_SHOT_ID, pos->x, pos->y, pos->z, vel.x, vel.y, vel.z, xRot, yRot, 0.0f); } void Area6_8018DA58(Actor* actor) { diff --git a/src/overlays/ovl_i3/fox_aq.c b/src/overlays/ovl_i3/fox_aq.c index 58784a56..b571f65d 100644 --- a/src/overlays/ovl_i3/fox_aq.c +++ b/src/overlays/ovl_i3/fox_aq.c @@ -1625,9 +1625,9 @@ void Aquas_801AD6C0(Actor* actor) { break; case 1: - if (actor->dmgType != 0) { + if (actor->dmgType != DMG_NONE) { if (actor->health > 0) { - actor->dmgType = 0; + actor->dmgType = DMG_NONE; actor->timer_0C6 = 15; actor->health -= actor->damage; AUDIO_PLAY_SFX(0x29034045, actor->sfxSource, 4); @@ -1722,7 +1722,7 @@ void Aquas_801AD6C0(Actor* actor) { actor->iwork[1]--; if (actor->iwork[1] <= 0) { actor->itemDrop = DROP_NONE; - actor->dmgSource = 2; + actor->dmgSource = DMG_SRC_2; Actor_Despawn(actor); Object_Kill(&actor->obj, actor->sfxSource); } @@ -1850,8 +1850,8 @@ void Aquas_801AE3D8(Actor* actor) { } } - if (actor->dmgType != 0) { - actor->dmgType = 0; + if (actor->dmgType != DMG_NONE) { + actor->dmgType = DMG_NONE; if ((fabsf(D_i3_801C4308[10]) >= 6.0f) && (gBosses[0].state >= 10) && (gBosses[0].swork[AQ_SWK_0] < 2)) { actor->timer_0C6 = 30; @@ -2119,8 +2119,8 @@ void Aquas_801AFA5C(Actor* actor) { actor->obj.rot.y = D_i3_801BFBC8[i]; actor->obj.rot.z = D_i3_801BFBD4[i]; } - if (actor->dmgType != 0) { - actor->dmgType = 0; + if (actor->dmgType != DMG_NONE) { + actor->dmgType = DMG_NONE; if ((gBosses[0].state >= 10) && (actor->health != 0) && (actor->damage == 31)) { actor->timer_0BE = 70; actor->health -= actor->damage; @@ -2344,7 +2344,7 @@ void Aquas_801B0B60(Actor* actor) { Vec3f sp44; Vec3f sp38; - if ((actor->dmgType != 0) || (gBosses[0].state >= 16)) { + if ((actor->dmgType != DMG_NONE) || (gBosses[0].state >= 16)) { actor->state = 3; } @@ -2396,7 +2396,7 @@ void Aquas_801B0B60(Actor* actor) { case 3: if (Rand_ZeroOne() < 0.1) { actor->itemDrop = DROP_SILVER_RING_10p; - actor->dmgSource = 2; + actor->dmgSource = DMG_SRC_2; Actor_Despawn(actor); } Object_Kill(&actor->obj, actor->sfxSource); @@ -2842,8 +2842,8 @@ void Aquas_801B134C(Boss* bossAQ) { } Math_SmoothStepToF(&D_i3_801C4308[80], 0.0f, 1.0f, 2.0f, 0); Math_SmoothStepToF(&D_i3_801C4308[11], D_i3_801C4308[80], 0.1f, 2.0f, 0); - if (bossAQ->dmgType != 0) { - bossAQ->dmgType = 0; + if (bossAQ->dmgType != DMG_NONE) { + bossAQ->dmgType = DMG_NONE; if (fabsf(D_i3_801C4308[10]) >= 5.0f) { switch (bossAQ->dmgPart) { case 13: @@ -3790,8 +3790,8 @@ void Aquas_801B50E8(Actor* actor) { } } - if (actor->dmgType != 0) { - actor->dmgType = 0; + if (actor->dmgType != DMG_NONE) { + actor->dmgType = DMG_NONE; if (actor->health != 0) { if (actor->damage == 31) { actor->info.bonus = 1; @@ -4115,8 +4115,8 @@ void Aquas_801B638C(Actor* actor) { break; } - if (actor->dmgType != 0) { - actor->dmgType = 0; + if (actor->dmgType != DMG_NONE) { + actor->dmgType = DMG_NONE; if ((actor->health != 0) && (actor->dmgPart == 0)) { actor->health -= actor->damage; actor->timer_0C6 = 30; @@ -4245,8 +4245,8 @@ void Aquas_801B6FF8(Actor* actor) { actor->unk_0B6 = 0; } - if (actor->dmgType != 0) { - actor->dmgType = 0; + if (actor->dmgType != DMG_NONE) { + actor->dmgType = DMG_NONE; if (actor->health > -100) { actor->timer_0C6 = 15; actor->health -= actor->damage; @@ -4649,8 +4649,8 @@ void Aquas_801B7C78(Actor* actor) { actor->health = 0; } - if (actor->dmgType != 0) { - actor->dmgType = 0; + if (actor->dmgType != DMG_NONE) { + actor->dmgType = DMG_NONE; if (actor->health != 0) { actor->info.bonus = 0; if (actor->damage == 31) { @@ -4958,8 +4958,8 @@ void Aquas_801B91A4(Actor* actor) { break; } - if (actor->dmgType != 0) { - actor->dmgType = 0; + if (actor->dmgType != DMG_NONE) { + actor->dmgType = DMG_NONE; if ((actor->health != 0) && (actor->state != 0)) { actor->timer_0C6 = 15; actor->health -= actor->damage; @@ -5208,8 +5208,8 @@ void Aquas_801BA6A4(Actor* actor) { break; } - if (actor->dmgType != 0) { - actor->dmgType = 0; + if (actor->dmgType != DMG_NONE) { + actor->dmgType = DMG_NONE; actor->health -= actor->damage; if (actor->health <= 0) { actor->health = actor->itemDrop = 0; @@ -5275,8 +5275,8 @@ void Aquas_801BADF8(Actor* actor) { break; case 1: - if (actor->dmgType != 0) { - actor->dmgType = 0; + if (actor->dmgType != DMG_NONE) { + actor->dmgType = DMG_NONE; if (actor->damage == 0) { gPlayer[0].hitTimer = 6; gPlayer[0].unk_21C = 0; @@ -5738,8 +5738,8 @@ void Aquas_801BB79C(Actor* actor) { actor->iwork[9] = actor->iwork[12] = 0; } - if (actor->dmgType != 0) { - actor->dmgType = 0; + if (actor->dmgType != DMG_NONE) { + actor->dmgType = DMG_NONE; AUDIO_PLAY_SFX(0x2903408F, actor->sfxSource, 4); if (actor->damage != 31) { actor->timer_0C0 = actor->timer_0C6 = 40; @@ -5882,8 +5882,8 @@ void Aquas_801BC9A0(Actor* actor) { break; case 1: - if (actor->dmgType != 0) { - actor->dmgType = 0; + if (actor->dmgType != DMG_NONE) { + actor->dmgType = DMG_NONE; if ((actor->health != 0) && (actor->iwork[3] == 0) && (actor->damage == 31)) { actor->health -= actor->damage; AUDIO_PLAY_SFX(0x2903B009, actor->sfxSource, 4); @@ -6436,8 +6436,8 @@ void Aquas_801BE3F8(Actor* actor) { break; } - if (actor->dmgType != 0) { - actor->dmgType = 0; + if (actor->dmgType != DMG_NONE) { + actor->dmgType = DMG_NONE; if (actor->health != 0) { if (actor->state == 2) { actor->health -= actor->damage; diff --git a/src/overlays/ovl_i3/fox_so.c b/src/overlays/ovl_i3/fox_so.c index 3b9fb96f..065a558b 100644 --- a/src/overlays/ovl_i3/fox_so.c +++ b/src/overlays/ovl_i3/fox_so.c @@ -436,7 +436,7 @@ void Solar_8019F20C(Actor* actor) { Solar_8019E9F4(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, actor->scale * 6.5f, 2); } - if ((actor->dmgType != 0) || ((actor->obj.id == OBJ_ACTOR_277) && (actor->vel.y < 0.0f))) { + if ((actor->dmgType != DMG_NONE) || ((actor->obj.id == OBJ_ACTOR_277) && (actor->vel.y < 0.0f))) { func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, actor->scale * 4.0f); Object_Kill(&actor->obj, actor->sfxSource); if (actor->obj.id == OBJ_ACTOR_277) { @@ -1262,7 +1262,7 @@ void Solar_801A1F80(Boss* bossSO) { Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 120.0f, 1.0f, 3.5f, 0.0f); } if (gBossFrameCount == 60) { - gActors[10].dmgType = 3; + gActors[10].dmgType = DMG_COLLISION; AUDIO_PLAY_SFX(0x19036053, bossSO->sfxSource, 4); } if (bossSO->timer_050 == 100) { @@ -1493,7 +1493,7 @@ void Solar_801A2C98(Boss* bossSO) { } } if (bossSO->unk_04C == 20) { - gActors[10].dmgType = 3; + gActors[10].dmgType = DMG_COLLISION; AUDIO_PLAY_SFX(0x19036054, bossSO->sfxSource, 4); } if (bossSO->unk_04C == 0) { @@ -1527,7 +1527,7 @@ void Solar_801A2C98(Boss* bossSO) { Solar_801A3468(bossSO); } if (bossSO->swork[SO_SWK_11] == 50) { - gActors[9].dmgType = 3; + gActors[9].dmgType = DMG_COLLISION; AUDIO_PLAY_SFX(0x19036053, bossSO->sfxSource, 4); } } @@ -1554,7 +1554,7 @@ void Solar_801A3128(Boss* bossSO) { Solar_801A0CEC(&gActors[10], bossSO->obj.pos.x, bossSO->obj.pos.z + 2000.0f, 10.0f, 1); } if (bossSO->unk_04C == 40) { - gActors[10].dmgType = 3; + gActors[10].dmgType = DMG_COLLISION; AUDIO_PLAY_SFX(0x19036054, bossSO->sfxSource, 4); } if (bossSO->unk_04C == 0) { @@ -1604,7 +1604,7 @@ void Solar_801A3128(Boss* bossSO) { } } if (bossSO->swork[SO_SWK_11] == 50) { - gActors[9].dmgType = 3; + gActors[9].dmgType = DMG_COLLISION; AUDIO_PLAY_SFX(0x19036053, bossSO->sfxSource, 4); } } @@ -1976,7 +1976,7 @@ void Solar_801A48B8(Boss* bossSO) { if ((bossSO->swork[SO_SWK_0] == 4) && (bossSO->unk_04C >= 60) && (bossSO->unk_04C < 67)) { for (i = 4; i < 60; i++) { if (gActors[i].obj.id == OBJ_ACTOR_278) { - gActors[i].dmgType = 2; + gActors[i].dmgType = DMG_EXPLOSION; break; } } @@ -2098,7 +2098,7 @@ void Solar_801A4EF8(Boss* bossSO) { } } if (bossSO->swork[SO_SWK_11] == 16) { - gActors[10].dmgType = 2; + gActors[10].dmgType = DMG_EXPLOSION; } if (bossSO->obj.pos.y <= -900.0f) { bossSO->state++; @@ -2129,7 +2129,7 @@ void Solar_801A4EF8(Boss* bossSO) { if (bossSO->swork[SO_SWK_11] == 170) { AUDIO_PLAY_SFX(0x29432073, bossSO->sfxSource, 4); bossSO->obj.pos.y = -500.0f; - gActors[9].dmgType = 2; + gActors[9].dmgType = DMG_EXPLOSION; } if (bossSO->swork[SO_SWK_11] <= 170) { bossSO->vel.y = COS_DEG(bossSO->obj.rot.x) * 80.0f; @@ -2177,7 +2177,7 @@ void Solar_801A4EF8(Boss* bossSO) { bossSO->fwork[SO_FWK_0] = 0.01f; } if (bossSO->swork[SO_SWK_11] == 50) { - gActors[9].dmgType = 2; + gActors[9].dmgType = DMG_EXPLOSION; } break; } diff --git a/src/overlays/ovl_i3/fox_zo.c b/src/overlays/ovl_i3/fox_zo.c index 25574f72..6940f397 100644 --- a/src/overlays/ovl_i3/fox_zo.c +++ b/src/overlays/ovl_i3/fox_zo.c @@ -655,8 +655,8 @@ void Zoness_801904CC(Actor* actor) { if (Animation_GetFrameCount(&D_ZO_600E5EC) < actor->unk_0B6) { actor->unk_0B6 = 0; } - if ((actor->dmgType != 0) && (actor->health != 0)) { - actor->dmgType = 0; + if ((actor->dmgType != DMG_NONE) && (actor->health != 0)) { + actor->dmgType = DMG_NONE; if (actor->state > 0) { actor->timer_0C6 = 15; actor->health -= actor->damage; @@ -732,8 +732,8 @@ void Zoness_80190A00(Actor* actor) { actor->timer_0C0 = 30; } Zoness_80190790(actor); - if (actor->dmgType != 0) { - actor->dmgType = 0; + if (actor->dmgType != DMG_NONE) { + actor->dmgType = DMG_NONE; AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); } } @@ -894,8 +894,8 @@ void Zoness_80191010(Actor* actor) { func_effect_8007A6F0(&actor->obj.pos, 0x29018036); break; } - if ((actor->dmgType != 0) && (actor->health != 0)) { - actor->dmgType = 0; + if ((actor->dmgType != DMG_NONE) && (actor->health != 0)) { + actor->dmgType = DMG_NONE; actor->timer_0C6 = 15; actor->health -= actor->damage; if (actor->health <= 0) { @@ -953,8 +953,8 @@ void Zoness_80191680(Actor* actor) { if (actor->obj.pos.z < actor->fwork[0]) { actor->state = 1; } - if ((actor->dmgType != 0) && (actor->health != 0)) { - actor->dmgType = 0; + if ((actor->dmgType != DMG_NONE) && (actor->health != 0)) { + actor->dmgType = DMG_NONE; actor->timer_0C6 = 15; actor->health -= actor->damage; AUDIO_PLAY_SFX(0x29033037, actor->sfxSource, 4); @@ -1220,14 +1220,14 @@ void Zoness_80192094(Actor* actor) { func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f); break; } - if ((actor->dmgType != 0) && (actor->state < 3)) { - if (actor->dmgType != 1) { + if ((actor->dmgType != DMG_NONE) && (actor->state < 3)) { + if (actor->dmgType != DMG_BEAM) { BonusText_Display(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 200.0f, 5); gHitCount += 6; D_ctx_80177850 = 15; actor->state = 4; } - actor->dmgType = 0; + actor->dmgType = DMG_NONE; } } @@ -1301,8 +1301,8 @@ void Zoness_80192834(Actor* actor) { } actor->obj.rot.x += 20.0f; actor->obj.rot.x = Math_ModF(actor->obj.rot.x, 360.0f); - if ((actor->dmgType != 0) && (actor->health != 0)) { - actor->dmgType = 0; + if ((actor->dmgType != DMG_NONE) && (actor->health != 0)) { + actor->dmgType = DMG_NONE; actor->health -= actor->damage; if (actor->health <= 0) { actor->health = 0; @@ -1438,8 +1438,8 @@ void Zoness_80192E64(Actor* actor) { func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f); break; } - if (actor->dmgType != 0) { - if (actor->dmgType != 1) { + if (actor->dmgType != DMG_NONE) { + if (actor->dmgType != DMG_BEAM) { if ((actor->state != 0) && (actor->state != 3)) { BonusText_Display(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 200.0f, 2); gHitCount += 3; @@ -1449,7 +1449,7 @@ void Zoness_80192E64(Actor* actor) { } else { AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); } - actor->dmgType = 0; + actor->dmgType = DMG_NONE; } if (func_play_800A73E4(&sp70, &sp6C, actor->obj.pos.x, actor->obj.pos.y - 1000.0f, actor->obj.pos.z)) { Math_SmoothStepToF(&actor->obj.pos.y, sp70 + 300.0f, 0.1f, 20.0f, 0); @@ -3311,7 +3311,7 @@ void Zoness_8019962C(Boss* bossZO, f32 arg1) { void Zoness_8019969C(Actor* actor) { s32 i; - if ((actor->dmgType != 0) && (actor->health != 0)) { + if ((actor->dmgType != DMG_NONE) && (actor->health != 0)) { actor->health -= actor->damage; if (actor->health <= 0) { actor->health = 0; @@ -3322,13 +3322,13 @@ void Zoness_8019969C(Actor* actor) { } func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 200.0f, 5.0f); actor->itemDrop = DROP_BOMB; - actor->dmgSource = 2; + actor->dmgSource = DMG_SRC_2; actor->obj.pos.z -= 100.0f; Actor_Despawn(actor); Object_Kill(&actor->obj, actor->sfxSource); func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); } - actor->dmgType = 0; + actor->dmgType = DMG_NONE; } actor->fwork[0] += 10.0f; Zoness_8018FF50(actor); @@ -3419,17 +3419,17 @@ void Zoness_80199A28(Actor* actor) { } Math_SmoothStepToAngle(&actor->obj.rot.z, sp38, 0.1f, 1.0f, 0); } - if ((actor->dmgType != 0) && (actor->health != 0)) { - actor->dmgType = 0; + if ((actor->dmgType != DMG_NONE) && (actor->health != 0)) { + actor->dmgType = DMG_NONE; actor->itemDrop = DROP_SILVER_RING_50p; func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y + 100.0f, actor->obj.pos.z, 7.0f); - actor->dmgSource = 2; + actor->dmgSource = DMG_SRC_2; actor->obj.pos.y += 200.0f; Actor_Despawn(actor); Object_Kill(&actor->obj, actor->sfxSource); func_effect_8007A6F0(&actor->obj.pos, 0x1903400F); } else { - if ((fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 800.0f) || (actor->dmgType != 0)) { + if ((fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 800.0f) || (actor->dmgType != DMG_NONE)) { Zoness_801999CC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z); Object_Kill(&actor->obj, actor->sfxSource); func_effect_8007A6F0(&actor->obj.pos, 0x2903B009); @@ -3440,7 +3440,7 @@ void Zoness_80199A28(Actor* actor) { if ((actor->timer_0BC == 0) && (actor->iwork[0] == 0)) { func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y + 100.0f, actor->obj.pos.z, 7.0f); actor->itemDrop = DROP_SILVER_RING_50p; - actor->dmgSource = 2; + actor->dmgSource = DMG_SRC_2; actor->obj.pos.y += 200.0f; Actor_Despawn(actor); Object_Kill(&actor->obj, actor->sfxSource); @@ -3515,11 +3515,11 @@ void Zoness_80199F10(Actor* actor) { } break; } - if (actor->dmgType != 0) { - if (actor->dmgType == 1) { + if (actor->dmgType != DMG_NONE) { + if (actor->dmgType == DMG_BEAM) { AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); } - actor->dmgType = 0; + actor->dmgType = DMG_NONE; } } @@ -3677,11 +3677,11 @@ void Zoness_8019A5D4(Actor* actor) { break; } Zoness_8018FF50(actor); - if (actor->dmgType != 0) { - if (actor->dmgType == 1) { + if (actor->dmgType != DMG_NONE) { + if (actor->dmgType == DMG_BEAM) { AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); } - actor->dmgType = 0; + actor->dmgType = DMG_NONE; } if (((gGameFrameCount % 8) == 0) && (actor->state != 0) && (actor->iwork[0] < 8) && (func_play_800A73E4(&sp44, &sp40, actor->obj.pos.x, actor->obj.pos.y - 100.0f, actor->obj.pos.z) != 0)) { @@ -3920,8 +3920,8 @@ void Zoness_8019B854(Actor* actor) { Vec3f spA8 = { 0.0f, 0.0f, 0.0f }; Vec3f sp9C; - if ((actor->dmgType != 0) && (actor->health != 0)) { - actor->dmgType = 0; + if ((actor->dmgType != DMG_NONE) && (actor->health != 0)) { + actor->dmgType = DMG_NONE; actor->timer_0C6 = 15; actor->health -= actor->damage; AUDIO_PLAY_SFX(0x2903300E, actor->sfxSource, 4); @@ -4053,8 +4053,8 @@ void Zoness_8019BE48(Actor* actor) { actor->state++; break; case 1: - if ((actor->dmgType != 0) && (actor->health != 0)) { - actor->dmgType = 0; + if ((actor->dmgType != DMG_NONE) && (actor->health != 0)) { + actor->dmgType = DMG_NONE; actor->timer_0C6 = 15; actor->health -= actor->damage; if (actor->health <= 0) { @@ -4383,8 +4383,8 @@ void Zoness_8019D15C(Actor* actor) { Actor* otherActor; if (actor->state == 0) { - if (actor->dmgType != 0) { - actor->dmgType = 0; + if (actor->dmgType != DMG_NONE) { + actor->dmgType = DMG_NONE; if (actor->dmgPart < 2) { AUDIO_PLAY_SFX(0x1903001E, actor->sfxSource, 4); if ((actor->obj.pos.y + 268.0f) < actor->hitPos.y) { diff --git a/src/overlays/ovl_i4/fox_bo.c b/src/overlays/ovl_i4/fox_bo.c index 424840f2..94dbde89 100644 --- a/src/overlays/ovl_i4/fox_bo.c +++ b/src/overlays/ovl_i4/fox_bo.c @@ -119,8 +119,8 @@ void Bolse_8018BD60(Actor* this) { } } } - func_360_8002F69C(this); - func_360_8002FC00(this); + ActorAllRange_UpdateStarWolfEvents(this); + ActorAllRange_UpdateEvemyEvents(this); } f32 D_i4_8019EEE4[] = { -200.0f, -100.0f, -0.0f, 100.0f, 200.0f }; @@ -206,7 +206,7 @@ void Bolse_UpdateEventHandler(Actor* this) { switch (this->state) { case 0: - D_360_800C9B4C = 500000; + gAllRangeSpawnEvent = 500000; gAllRangeEventTimer = 0; gStarWolfMsgTimer = 0; this->state = 2; @@ -302,7 +302,7 @@ void Bolse_UpdateEventHandler(Actor* this) { this->iwork[1] = gHitCount; if ((gStarWolfTeamAlive[0] != 0) || (gStarWolfTeamAlive[1] != 0) || (gStarWolfTeamAlive[2] != 0) || (gStarWolfTeamAlive[3] != 0)) { - D_360_800C9B4C = gAllRangeEventTimer + 120; + gAllRangeSpawnEvent = gAllRangeEventTimer + 120; gStarWolfMsgTimer = 1000; } } @@ -332,7 +332,7 @@ void Bolse_UpdateEventHandler(Actor* this) { Math_SmoothStepToF(&player->cam.at.z, actor->obj.pos.z, 1.0f, 20000.0f, 0.0f); Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 0.2f, 0); - if ((gControllerPress->button & START_BUTTON) || ((D_360_800C9B4C + 300) == gAllRangeEventTimer)) { + if ((gControllerPress->button & START_BUTTON) || ((gAllRangeSpawnEvent + 300) == gAllRangeEventTimer)) { this->state = 2; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; func_play_800B7184(player, 1); @@ -605,11 +605,11 @@ void Bolse_8018D124(Actor* actor) { bool Bolse_8018D278(Actor* actor) { s32 i; - if (actor->dmgType == 0) { + if (actor->dmgType == DMG_NONE) { return false; } - actor->dmgType = 0; + actor->dmgType = DMG_NONE; actor->obj.pos.y += 150.0f; func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, 8.0f, 15); @@ -691,13 +691,13 @@ s32 Bolse_8018D4F0(Actor* actor) { bool Bolse_8018D584(Actor* actor) { s32 i; - if (actor->dmgType == 0) { + if (actor->dmgType == DMG_NONE) { return false; } if ((actor->dmgPart < 2) && (actor->state == 0)) { actor->timer_0C6 = 20; - actor->dmgType = 0; + actor->dmgType = DMG_NONE; AUDIO_PLAY_SFX(0x29024003, actor->sfxSource, 0); actor->health += actor->damage; @@ -1907,7 +1907,7 @@ void Bolse_801912FC(Boss* boss) { } if (boss->state == 2) { - if (boss->dmgType != 0) { + if (boss->dmgType != DMG_NONE) { boss->dmgType = DMG_NONE; if (boss->damage >= 16) { diff --git a/src/overlays/ovl_i4/fox_fo.c b/src/overlays/ovl_i4/fox_fo.c index 378f12fd..c58375c5 100644 --- a/src/overlays/ovl_i4/fox_fo.c +++ b/src/overlays/ovl_i4/fox_fo.c @@ -20,7 +20,7 @@ void Fortuna_801875F0(Actor* actor) { } if ((counter < 10) && (actor->timer_0C0 == 0)) { - if (gAllRangeEventTimer < (D_360_800C9B4C - 500)) { + if (gAllRangeEventTimer < (gAllRangeSpawnEvent - 500)) { actor->timer_0C0 = 40; actor->unk_04E++; @@ -63,7 +63,7 @@ void Fortuna_801875F0(Actor* actor) { } } } - func_360_8002F69C(actor); + ActorAllRange_UpdateStarWolfEvents(actor); } f32 D_8019EDEC[] = { 0.0f, 700.0f, 12000.0f }; @@ -115,17 +115,17 @@ void Fortuna_UpdateEvents(Actor* actor) { Radio_PlayMessage(gMsg_ID_9000, RCID_FOX); } - if ((gAllRangeEventTimer + 400) == (0, D_360_800C9B4C)) { + if ((gAllRangeEventTimer + 400) == (0, gAllRangeSpawnEvent)) { Radio_PlayMessage(gMsg_ID_9010, RCID_SLIPPY); } - if ((gAllRangeEventTimer + 240) == (0, D_360_800C9B4C)) { + if ((gAllRangeEventTimer + 240) == (0, gAllRangeSpawnEvent)) { Radio_PlayMessage(gMsg_ID_9375, RCID_ROB64); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); } - if ((gAllRangeEventTimer + 100) == (0, D_360_800C9B4C)) { + if ((gAllRangeEventTimer + 100) == (0, gAllRangeSpawnEvent)) { Radio_PlayMessage(gMsg_ID_9380, RCID_FOX); } @@ -155,7 +155,7 @@ void Fortuna_UpdateEvents(Actor* actor) { gActors[6].aiIndex = gActors[7].aiIndex = -1; } - if ((D_360_800C9B4C < gAllRangeEventTimer) && (gAllRangeEventTimer < 9970) && (gStarWolfTeamAlive[0] == 0) && + if ((gAllRangeSpawnEvent < gAllRangeEventTimer) && (gAllRangeEventTimer < 9970) && (gStarWolfTeamAlive[0] == 0) && (gStarWolfTeamAlive[1] == 0) && (gStarWolfTeamAlive[2] == 0) && (gStarWolfTeamAlive[3] == 0)) { gAllRangeEventTimer = 9970; } @@ -218,7 +218,7 @@ void Fortuna_UpdateEvents(Actor* actor) { switch (actor->state) { case 0: - D_360_800C9B4C = 2880; + gAllRangeSpawnEvent = 2880; for (i = 0; i < 6; i++) { gSavedStarWolfTeamAlive[i] = 1; gStarWolfTeamAlive[i] = 1; @@ -232,7 +232,7 @@ void Fortuna_UpdateEvents(Actor* actor) { player->pos.y = 670.0f; gAllRangeEventTimer = 200; if (gAllRangeCheckpoint != 0) { - gAllRangeEventTimer = D_360_800C9B4C - 1; + gAllRangeEventTimer = gAllRangeSpawnEvent - 1; gHitCount = gSavedHitCount; } } else { @@ -281,7 +281,7 @@ void Fortuna_UpdateEvents(Actor* actor) { Math_SmoothStepToF(&player->cam.at.y, actor4->obj.pos.y, 1.0f, 20000.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.z, actor4->obj.pos.z, 1.0f, 20000.0f, 0.0f); Math_SmoothStepToF(&player->camRoll, 0.0f, 1.0f, 1000.0f, 0.0f); - if (gAllRangeEventTimer == (D_360_800C9B4C + 2)) { + if (gAllRangeEventTimer == (gAllRangeSpawnEvent + 2)) { gStarWolfMsgTimer = 883; gAllRangeCheckpoint = 1; @@ -292,7 +292,7 @@ void Fortuna_UpdateEvents(Actor* actor) { }; } - if ((gControllerPress->button & START_BUTTON) || (gAllRangeEventTimer == (D_360_800C9B4C + 440))) { + if ((gControllerPress->button & START_BUTTON) || (gAllRangeEventTimer == (gAllRangeSpawnEvent + 440))) { actor->state = 2; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; func_play_800B7184(player, 1); @@ -489,8 +489,8 @@ void Fortuna_80188AD0(Actor* actor) { actor->obj.pos.y -= 230.0f; } - if ((actor->dmgType != 0) && (actor->state == 0)) { - actor->dmgType = 0; + if ((actor->dmgType != DMG_NONE) && (actor->state == 0)) { + actor->dmgType = DMG_NONE; actor->state = 1; actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_FO_600FF64); actor->info.targetOffset = 0.0f; diff --git a/src/overlays/ovl_i4/fox_ka.c b/src/overlays/ovl_i4/fox_ka.c index bdae64bc..41233361 100644 --- a/src/overlays/ovl_i4/fox_ka.c +++ b/src/overlays/ovl_i4/fox_ka.c @@ -298,9 +298,9 @@ void Katina_LevelStart(Player* player) { Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - func_enmy2_8006EEFC(5, actor->obj.pos.x + (dest.x * 1.5), actor->obj.pos.y + (dest.y * 1.5), - actor->obj.pos.z + (dest.z * 1.5), dest.x, dest.y, dest.z, actor->obj.rot.x, - actor->obj.rot.y, actor->obj.rot.z); + Actor_SpawnPlayerLaser(5, actor->obj.pos.x + (dest.x * 1.5), actor->obj.pos.y + (dest.y * 1.5), + actor->obj.pos.z + (dest.z * 1.5), dest.x, dest.y, dest.z, actor->obj.rot.x, + actor->obj.rot.y, actor->obj.rot.z); break; case 35: @@ -310,9 +310,9 @@ void Katina_LevelStart(Player* player) { Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - func_enmy2_8006EEFC(6, actor->obj.pos.x + (dest.x * 1.5), actor->obj.pos.y + (dest.y * 1.5), - actor->obj.pos.z + (dest.z * 1.5), dest.x, dest.y, dest.z, actor->obj.rot.x, - actor->obj.rot.y, actor->obj.rot.z); + Actor_SpawnPlayerLaser(6, actor->obj.pos.x + (dest.x * 1.5), actor->obj.pos.y + (dest.y * 1.5), + actor->obj.pos.z + (dest.z * 1.5), dest.x, dest.y, dest.z, actor->obj.rot.x, + actor->obj.rot.y, actor->obj.rot.z); break; case 45: @@ -2104,10 +2104,10 @@ void Katina_80198AA0(Actor* actor) { yVel = (-xSin * 200.0f * 0.5f); xVel = (xCos * 200.0f * 0.5f); zVel = (xCos * 200.0f * 0.5f); - func_enmy2_8006EEFC(actor->aiType, actor->obj.pos.x + ((ySin * xVel) * 1.5f), actor->obj.pos.y + (yVel * 1.5f), - actor->obj.pos.z + ((yCos * zVel) * 1.5f), (ySin * (xCos * 200.0f * 0.5f)), - (-xSin * 200.0f * 0.5f), (yCos * (xCos * 200.0f * 0.5f)), actor->obj.rot.x, - actor->obj.rot.y, actor->obj.rot.z); + Actor_SpawnPlayerLaser(actor->aiType, actor->obj.pos.x + ((ySin * xVel) * 1.5f), + actor->obj.pos.y + (yVel * 1.5f), actor->obj.pos.z + ((yCos * zVel) * 1.5f), + (ySin * (xCos * 200.0f * 0.5f)), (-xSin * 200.0f * 0.5f), + (yCos * (xCos * 200.0f * 0.5f)), actor->obj.rot.x, actor->obj.rot.y, actor->obj.rot.z); } ActorAllRange_ApplyDamage(actor); radarMark = &gRadarMarks[actor->index]; diff --git a/src/overlays/ovl_i4/fox_sz.c b/src/overlays/ovl_i4/fox_sz.c index e087d5a5..5484f7d1 100644 --- a/src/overlays/ovl_i4/fox_sz.c +++ b/src/overlays/ovl_i4/fox_sz.c @@ -59,7 +59,7 @@ void SectorZ_80199900(Actor* actor, s32 arg1) { } if ((D_i4_801A0560 == 3) && (gLeveLClearStatus[LEVEL_ZONESS] != 0)) { - D_360_800C9B4C = gAllRangeEventTimer + 110; + gAllRangeSpawnEvent = gAllRangeEventTimer + 110; } } } @@ -156,7 +156,7 @@ void SectorZ_Missile_Update(Actor* this) { (fabsf(this->fwork[MISSILE_TARGET_Z] - this->obj.pos.z) < 800.0f)) { SectorZ_80199900(this, 0); gCameraShake = 25; - gBosses[0].dmgType = DMG_zRot_0FC; + gBosses[0].dmgType = DMG_UNK_100; if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].csState = 0; @@ -251,7 +251,7 @@ void SectorZ_8019A1D0(void) { } void SectorZ_8019A2F4(Actor* actor) { - if (gAllRangeEventTimer == D_360_800C9B4C) { + if (gAllRangeEventTimer == gAllRangeSpawnEvent) { SectorZ_8019A1D0(); gCsFrameCount = 0; actor->timer_0BC = 400; @@ -447,7 +447,7 @@ void SectorZ_8019A3E8(Actor* actor) { break; } - func_360_8002FC00(actor); + ActorAllRange_UpdateEvemyEvents(actor); SectorZ_8019A2F4(actor); } @@ -486,7 +486,7 @@ void SectorZ_UpdateEvents(Actor* actor) { if (gAllRangeCheckpoint != 0) { gHitCount = gSavedHitCount; } - D_360_800C9B4C = 1000000; + gAllRangeSpawnEvent = 1000000; case 2: if (SectorZ_8019AA9C(player) == 0) { @@ -1677,9 +1677,9 @@ void SectorZ_8019E234(Actor* actor) { actor->obj.rot.x += actor->unk_0F4.x; actor->obj.rot.y += actor->unk_0F4.y; - if (actor->dmgType != 0) { + if (actor->dmgType != DMG_NONE) { actor->timer_0C6 = 20; - actor->dmgType = 0; + actor->dmgType = DMG_NONE; actor->health -= actor->damage; AUDIO_PLAY_SFX(0x2903300E, actor->sfxSource, 4); if (actor->health <= 0) { @@ -1719,8 +1719,8 @@ void SectorZ_8019E454(Boss* boss) { Vec3f src; Vec3f dest; - if (boss->dmgType == DMG_zRot_0FC) { - boss->dmgType = 0; + if (boss->dmgType == DMG_UNK_100) { + boss->dmgType = DMG_NONE; boss->timer_050 = 10; boss->timer_052 = 60; boss->state = 1; diff --git a/src/overlays/ovl_i5/fox_ma.c b/src/overlays/ovl_i5/fox_ma.c index 5f482ee0..3ae62ac3 100644 --- a/src/overlays/ovl_i5/fox_ma.c +++ b/src/overlays/ovl_i5/fox_ma.c @@ -730,11 +730,11 @@ void Macbeth_8019BE50(Actor* actor) { } bool Macbeth_8019C4EC(Actor* actor) { - if (actor->dmgType != 0) { - actor->dmgType = 0; + if (actor->dmgType != DMG_NONE) { + actor->dmgType = DMG_NONE; if (actor->dmgPart == 1) { AUDIO_PLAY_SFX(0x29034003, actor->sfxSource, 4); - actor->dmgType = 0; + actor->dmgType = DMG_NONE; actor->iwork[7] = 15; D_i5_801BE320[22] = 0; D_i5_801BE320[4] = 120; @@ -899,8 +899,8 @@ void Macbeth_8019C778(Actor* actor) { break; } - if (actor->dmgType != 0) { - actor->dmgType = 0; + if (actor->dmgType != DMG_NONE) { + actor->dmgType = DMG_NONE; AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); } @@ -961,8 +961,8 @@ void Macbeth_8019CE88(Actor* actor) { Math_SmoothStepToF(&actor->vel.z, 0.0f, 0.02f, 10.0f, 0.01f); Macbeth_801A015C(actor); Macbeth_8019A87C(actor); - if (actor->dmgType != 0) { - actor->dmgType = 0; + if (actor->dmgType != DMG_NONE) { + actor->dmgType = DMG_NONE; actor->timer_0BC = 20; Macbeth_8019BE50(actor); actor->state = 3; @@ -1098,8 +1098,8 @@ void Macbeth_8019D700(Actor* actor) { Math_SmoothStepToF(&actor->vel.z, 0.0f, 0.02f, 10.0f, 0); Macbeth_801A015C(actor); Macbeth_8019A830(actor); - if (actor->dmgType != 0) { - actor->dmgType = 0; + if (actor->dmgType != DMG_NONE) { + actor->dmgType = DMG_NONE; actor->timer_0BC = 20; Macbeth_8019BE50(actor); actor->state = 3; @@ -1121,11 +1121,11 @@ void Macbeth_8019D910(Actor* actor, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f3 switch (*arg1) { case 0: - if (((actor->dmgType != 0) && (arg3 == actor->dmgPart)) || + if (((actor->dmgType != DMG_NONE) && (arg3 == actor->dmgPart)) || ((D_MA_801BE2F0[1] - 1 == actor->iwork[5]) && (actor->iwork[5] < D_MA_801BE2F0[3])) || (((D_MA_801BE2F0[1] + 1) == actor->iwork[5]) && (D_MA_801BE2F0[3] < actor->iwork[5]))) { AUDIO_PLAY_SFX(0x29034003, actor->sfxSource, 4); - actor->dmgType = 0; + actor->dmgType = DMG_NONE; func_effect_8007C120(actor->obj.pos.x + arg4, actor->obj.pos.y + 200.0f, actor->obj.pos.z + arg5, actor->vel.x, actor->vel.y, actor->vel.z, 0.15f, 20); actor->iwork[arg3 + 6] = 15; @@ -1135,8 +1135,8 @@ void Macbeth_8019D910(Actor* actor, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f3 (((D_MA_801BE2F0[1] + 1) == actor->iwork[5]) && (D_MA_801BE2F0[3] < actor->iwork[5]))) { (*arg1)++; } - } else if ((actor->dmgType != 0) && (actor->dmgPart == 0)) { - actor->dmgType = 0; + } else if ((actor->dmgType != DMG_NONE) && (actor->dmgPart == 0)) { + actor->dmgType = DMG_NONE; AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); } break; @@ -1158,12 +1158,12 @@ void Macbeth_8019D910(Actor* actor, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f3 (*arg1)++; break; case 2: - if (((actor->dmgType != 0) && (arg3 == actor->dmgPart)) || + if (((actor->dmgType != DMG_NONE) && (arg3 == actor->dmgPart)) || ((D_MA_801BE2F0[1] - 1 == actor->iwork[5]) && (actor->iwork[5] < D_MA_801BE2F0[3])) || (((D_MA_801BE2F0[1] + 1) == actor->iwork[5]) && (D_MA_801BE2F0[3] < actor->iwork[5])) || ((actor->obj.id == OBJ_ACTOR_209) && (arg3 == 2))) { AUDIO_PLAY_SFX(0x29034003, actor->sfxSource, 4); - actor->dmgType = 0; + actor->dmgType = DMG_NONE; func_effect_8007C120(actor->obj.pos.x + arg4, actor->obj.pos.y + 200.0f, actor->obj.pos.z + arg5, actor->vel.x, actor->vel.y, actor->vel.z, 0.15f, 20); actor->iwork[arg3 + 6] = 20; @@ -1175,8 +1175,8 @@ void Macbeth_8019D910(Actor* actor, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f3 gHitCount++; (*arg1)++; } - } else if ((actor->dmgType != 0) && (actor->dmgPart == 0)) { - actor->dmgType = 0; + } else if ((actor->dmgType != DMG_NONE) && (actor->dmgPart == 0)) { + actor->dmgType = DMG_NONE; AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); } break; @@ -1264,8 +1264,8 @@ void Macbeth_8019E410(Actor* actor) { Math_SmoothStepToF(&actor->vel.z, 0.0f, 0.02f, 10.0f, 0.01f); Macbeth_801A015C(actor); Macbeth_8019A87C(actor); - if (actor->dmgType != 0) { - actor->dmgType = 0; + if (actor->dmgType != DMG_NONE) { + actor->dmgType = DMG_NONE; actor->timer_0BC = 20; Macbeth_8019BE50(actor); actor->state = 3; @@ -1287,11 +1287,11 @@ f32 D_i5_801BE24C; void Macbeth_8019E624(Actor* actor, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f32 arg5, s32* arg6) { switch (*arg1) { case 0: - if (((actor->dmgType != 0) && (arg3 == actor->dmgPart)) || + if (((actor->dmgType != DMG_NONE) && (arg3 == actor->dmgPart)) || ((D_MA_801BE2F0[1] - 1 == actor->iwork[5]) && (actor->iwork[5] < D_MA_801BE2F0[3])) || (((D_MA_801BE2F0[1] + 1) == actor->iwork[5]) && (D_MA_801BE2F0[3] < actor->iwork[5]))) { AUDIO_PLAY_SFX(0x29034003, actor->sfxSource, 4); - actor->dmgType = 0; + actor->dmgType = DMG_NONE; func_effect_8007C120(actor->obj.pos.x + arg4, actor->obj.pos.y + 200.0f, actor->obj.pos.z + arg5, actor->vel.x, actor->vel.y, actor->vel.z, 0.15f, 10); actor->iwork[7] = 15; @@ -1301,8 +1301,8 @@ void Macbeth_8019E624(Actor* actor, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f3 (((D_MA_801BE2F0[1] + 1) == actor->iwork[5]) && (D_MA_801BE2F0[3] < actor->iwork[5]))) { (*arg1)++; } - } else if (actor->dmgType != 0) { - actor->dmgType = 0; + } else if (actor->dmgType != DMG_NONE) { + actor->dmgType = DMG_NONE; AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); } Macbeth_8019B580(actor, arg2); @@ -1314,11 +1314,11 @@ void Macbeth_8019E624(Actor* actor, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f3 (*arg1)++; break; case 2: - if (((actor->dmgType != 0) && (arg3 == actor->dmgPart)) || + if (((actor->dmgType != DMG_NONE) && (arg3 == actor->dmgPart)) || ((D_MA_801BE2F0[1] - 1 == actor->iwork[5]) && (actor->iwork[5] < D_MA_801BE2F0[3])) || (((D_MA_801BE2F0[1] + 1) == actor->iwork[5]) && (D_MA_801BE2F0[3] < actor->iwork[5]))) { AUDIO_PLAY_SFX(0x29034003, actor->sfxSource, 4); - actor->dmgType = 0; + actor->dmgType = DMG_NONE; func_effect_8007C120(actor->obj.pos.x + arg4, actor->obj.pos.y + 200.0f, actor->obj.pos.z + arg5, actor->vel.x, actor->vel.y, actor->vel.z, 0.2f, 10); actor->iwork[7] = 15; @@ -1330,8 +1330,8 @@ void Macbeth_8019E624(Actor* actor, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f3 (*arg1)++; } } else { - if (actor->dmgType != 0) { - actor->dmgType = 0; + if (actor->dmgType != DMG_NONE) { + actor->dmgType = DMG_NONE; AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); } } @@ -1372,8 +1372,8 @@ void Macbeth_8019EA60(Actor* actor) { Math_SmoothStepToF(&actor->vel.z, 0.0f, 0.02f, 10.0f, 0.01f); Macbeth_801A015C(actor); Macbeth_8019A87C(actor); - if (actor->dmgType != 0) { - actor->dmgType = 0; + if (actor->dmgType != DMG_NONE) { + actor->dmgType = DMG_NONE; actor->timer_0BC = 20; Macbeth_8019BE50(actor); actor->state = 3; @@ -1393,11 +1393,11 @@ void Macbeth_8019EA60(Actor* actor) { void Macbeth_8019EBF8(Actor* actor, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f32 arg5, s32* arg6) { switch (*arg1) { case 0: - if (((actor->dmgType != 0) && (arg3 == actor->dmgPart)) || + if (((actor->dmgType != DMG_NONE) && (arg3 == actor->dmgPart)) || ((D_MA_801BE2F0[1] - 1 == actor->iwork[5]) && (actor->iwork[5] < D_MA_801BE2F0[3])) || (((D_MA_801BE2F0[1] + 1) == actor->iwork[5]) && (D_MA_801BE2F0[3] < actor->iwork[5]))) { AUDIO_PLAY_SFX(0x29034003, actor->sfxSource, 4); - actor->dmgType = 0; + actor->dmgType = DMG_NONE; func_effect_8007C120(actor->obj.pos.x + arg4, actor->obj.pos.y + 200.0f, actor->obj.pos.z + arg5, actor->vel.x, actor->vel.y, actor->vel.z, 0.15f, 10); actor->iwork[7] = 15; @@ -1408,8 +1408,8 @@ void Macbeth_8019EBF8(Actor* actor, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f3 gHitCount++; (*arg1)++; } - } else if (actor->dmgType != 0) { - actor->dmgType = 0; + } else if (actor->dmgType != DMG_NONE) { + actor->dmgType = DMG_NONE; AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); } Macbeth_8019B580(actor, arg2); @@ -1465,7 +1465,7 @@ void Macbeth_8019EE68(Actor* actor) { Macbeth_801A015C(actor); Macbeth_8019A87C(actor); if (gCameraShake == 20) { - actor->dmgType = 0; + actor->dmgType = DMG_NONE; actor->timer_0BC = 20; Macbeth_8019BE50(actor); actor->state = 3; @@ -1641,11 +1641,11 @@ void Macbeth_8019F164(Actor* actor) { void Macbeth_8019FC54(Actor* actor, s32* arg1, s32* arg2, s32 arg3, s32 arg4, f32 arg5, f32 arg6, s32* arg7) { switch (*arg1) { case 0: - if (((actor->dmgType != 0) && (actor->dmgPart >= arg3) && (arg4 >= actor->dmgPart)) || + if (((actor->dmgType != DMG_NONE) && (actor->dmgPart >= arg3) && (arg4 >= actor->dmgPart)) || ((D_MA_801BE2F0[1] - 1 == actor->iwork[5]) && (actor->iwork[5] < D_MA_801BE2F0[3])) || (((D_MA_801BE2F0[1] + 1) == actor->iwork[5]) && (D_MA_801BE2F0[3] < actor->iwork[5]))) { AUDIO_PLAY_SFX(0x29034003, actor->sfxSource, 4); - actor->dmgType = 0; + actor->dmgType = DMG_NONE; func_effect_8007C120(actor->obj.pos.x + arg5, actor->obj.pos.y + 200.0f, actor->obj.pos.z + arg6, actor->vel.x, actor->vel.y, actor->vel.z, 0.15f, 10); actor->iwork[7] = 15; @@ -1659,8 +1659,8 @@ void Macbeth_8019FC54(Actor* actor, s32* arg1, s32* arg2, s32 arg3, s32 arg4, f3 } (*arg1)++; } - } else if (actor->dmgType != 0) { - actor->dmgType = 0; + } else if (actor->dmgType != DMG_NONE) { + actor->dmgType = DMG_NONE; AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); } Macbeth_8019B580(actor, arg2); @@ -1712,8 +1712,8 @@ void Macbeth_8019FF9C(Actor* actor) { Math_SmoothStepToF(&actor->vel.z, 0.0f, 0.02f, 10.0f, 0.01f); Macbeth_801A015C(actor); Macbeth_8019A87C(actor); - if (actor->dmgType != 0) { - actor->dmgType = 0; + if (actor->dmgType != DMG_NONE) { + actor->dmgType = DMG_NONE; actor->timer_0BC = 20; Macbeth_8019BE50(actor); actor->state = 3; @@ -2783,8 +2783,8 @@ void Macbeth_801A3E98(Actor* actor) { switch (actor->state) { case 0: - if ((actor->dmgType != 0) && (actor->dmgType != 3)) { - actor->dmgType = 0; + if ((actor->dmgType != DMG_NONE) && (actor->dmgType != DMG_COLLISION)) { + actor->dmgType = DMG_NONE; AUDIO_PLAY_SFX(0x1903205F, actor->sfxSource, 0); actor->state = 1; } @@ -2812,9 +2812,9 @@ void Macbeth_801A3E98(Actor* actor) { case 3: break; } - if (actor->dmgType != 0) { + if (actor->dmgType != DMG_NONE) { AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); - actor->dmgType = 0; + actor->dmgType = DMG_NONE; } Math_SmoothStepToF(&actor->fwork[0], 30.0f, 0.4f, 10.0f, 0.0f); Math_SmoothStepToF(&actor->fwork[4], 30.0f, 0.4f, 10.0f, 0.0f); @@ -2946,7 +2946,7 @@ void Macbeth_801A46A0(Actor* actor) { } void Macbeth_801A49B8(Actor* actor) { - if (actor->dmgType != 0) { + if (actor->dmgType != DMG_NONE) { AUDIO_PLAY_SFX(0x29024003, actor->sfxSource, 0); actor->timer_0C6 = 15; actor->health -= actor->damage; @@ -2955,7 +2955,7 @@ void Macbeth_801A49B8(Actor* actor) { gHitCount++; actor->state = 2; } - actor->dmgType = 0; + actor->dmgType = DMG_NONE; } } @@ -3031,8 +3031,8 @@ void Macbeth_801A4B24(Actor* actor) { } break; case 5: - if ((actor->dmgType != 0) && (actor->dmgPart == 3)) { - actor->dmgType = 0; + if ((actor->dmgType != DMG_NONE) && (actor->dmgPart == 3)) { + actor->dmgType = DMG_NONE; D_MA_801BE2F0[5] = 1; gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]); @@ -3070,8 +3070,8 @@ void Macbeth_801A4B24(Actor* actor) { default: break; } - if (actor->dmgType != 0) { - actor->dmgType = 0; + if (actor->dmgType != DMG_NONE) { + actor->dmgType = DMG_NONE; AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); } Math_SmoothStepToF(&actor->fwork[0], 30, 0.4f, actor->fwork[1], 0.0f); @@ -3153,7 +3153,7 @@ s32 Macbeth_801A55D4(s32 arg0, Vec3f* arg1, Vec3f* arg2, s32 arg3) { if ((actor->obj.status >= OBJ_ACTIVE) && (fabsf(arg1->x - actor->obj.pos.x) < 1000.0f) && (fabsf(arg1->z - actor->obj.pos.z) < 1500.0f) && (arg0 != i) && (actor->info.unk_16 != 2) && (actor->timer_0C2 == 0) && (Object_CheckSingleHitbox(arg1, actor->info.hitbox, &actor->obj.pos) != 0)) { - actor->dmgType = 1; + actor->dmgType = DMG_BEAM; actor->dmgPart = -1; actor->hitPos.x = arg1->x; actor->hitPos.y = arg1->y; @@ -3287,8 +3287,8 @@ void Macbeth_801A5E54(Actor* actor) { } Math_SmoothStepToF(&actor->obj.pos.x, actor->fwork[0] + (actor->fwork[2] * 400.0f), 0.1f, 4.0f, 0.01f); } - if (actor->dmgType != 0) { - actor->dmgType = 0; + if (actor->dmgType != DMG_NONE) { + actor->dmgType = DMG_NONE; AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); } } @@ -3311,8 +3311,8 @@ void Macbeth_801A5FD0(Actor* actor) { } Math_SmoothStepToF(&actor->obj.pos.y, actor->fwork[1] + 356.0f, 0.4f, 20.0f, 0.01f); } - if (actor->dmgType != 0) { - actor->dmgType = 0; + if (actor->dmgType != DMG_NONE) { + actor->dmgType = DMG_NONE; AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); } } @@ -3334,7 +3334,7 @@ void Macbeth_801A6144(Actor* actor) { switch (actor->state) { case 0: - if (actor->dmgType != 0) { + if (actor->dmgType != DMG_NONE) { func_effect_8007C120(actor->obj.pos.x, actor->obj.pos.y + 100.0f, actor->obj.pos.z, actor->vel.x, actor->vel.y, actor->vel.z, 0.15f, 20); AUDIO_PLAY_SFX(0x2903300E, actor->sfxSource, 4); @@ -3358,7 +3358,7 @@ void Macbeth_801A6144(Actor* actor) { actor->timer_0BC = 20; actor->state = 1; } - actor->dmgType = 0; + actor->dmgType = DMG_NONE; } break; case 1: @@ -3410,8 +3410,8 @@ void Macbeth_801A67C8(Actor* actor) { if ((gPlayer[0].trueZpos - actor->obj.pos.z) < -300.0f) { Object_Kill(&actor->obj, actor->sfxSource); } - if ((actor->dmgType != 0) && (actor->dmgPart == -1)) { - actor->dmgType = 0; + if ((actor->dmgType != DMG_NONE) && (actor->dmgPart == -1)) { + actor->dmgType = DMG_NONE; if (actor->obj.pos.x <= gPlayer[0].pos.x) { actor->iwork[4] = 1; } else { @@ -4058,8 +4058,8 @@ void Macbeth_801A7E7C(Actor* actor) { actor->state = 4; break; } - if (actor->dmgType != 0) { - actor->dmgType = 0; + if (actor->dmgType != DMG_NONE) { + actor->dmgType = DMG_NONE; actor->iwork[9] = 15; D_i5_801BE320[29] -= actor->damage; if (D_i5_801BE320[29] <= 0) { @@ -4489,7 +4489,7 @@ void Macbeth_801A7E7C(Actor* actor) { Math_SmoothStepToF(&D_i5_801BE368[32], actor->obj.pos.x + RAND_FLOAT(500.0f), 0.2f, 20.0f, 0.01f); Math_SmoothStepToF(&D_i5_801BE368[33], actor->obj.pos.y + RAND_FLOAT(100.0f), 0.2f, 10.0f, 0.01f); Math_SmoothStepToF(&D_i5_801BE368[34], actor->obj.pos.y + RAND_FLOAT(500.0f), 0.2f, 20.0f, 0.01f); - if (actor->dmgType != 0) { + if (actor->dmgType != DMG_NONE) { gPlayer[0].shields = 0; } if (((gGameFrameCount % 16) == 0)) { @@ -4535,8 +4535,8 @@ void Macbeth_801A7E7C(Actor* actor) { default: break; } - if ((actor->dmgType != 0) && (actor->state >= 2)) { - actor->dmgType = 0; + if ((actor->dmgType != DMG_NONE) && (actor->state >= 2)) { + actor->dmgType = DMG_NONE; if ((actor->dmgPart == 0) && (D_i5_801BE320[9] > 0) && ((gPlayer[0].trueZpos - actor->obj.pos.z) > 200.0f)) { AUDIO_PLAY_SFX(0x2903300E, actor->sfxSource, 4); actor->iwork[7] = 15; @@ -4883,8 +4883,8 @@ void Macbeth_801AC438(Actor* actor) { Macbeth_8019A830(actor); break; } - if (actor->dmgType != 0) { - actor->dmgType = 0; + if (actor->dmgType != DMG_NONE) { + actor->dmgType = DMG_NONE; AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); } } @@ -5372,8 +5372,8 @@ void Macbeth_801ADD68(Actor* actor) { } else if (actor->iwork[0] > 0) { actor->iwork[0] -= 1; } - if (actor->dmgType != 0) { - actor->dmgType = 0; + if (actor->dmgType != DMG_NONE) { + actor->dmgType = DMG_NONE; actor->iwork[7] = 15; actor->health -= actor->damage; @@ -5394,7 +5394,7 @@ void Macbeth_801ADD68(Actor* actor) { } break; } - actor->dmgType = 0; + actor->dmgType = DMG_NONE; } static Vec3f D_i5_801BA784[8] = { @@ -5613,9 +5613,9 @@ void Macbeth_801AEC04(Actor* actor) { } else { actor->fwork[1] = 32.0f; } - if ((actor->dmgType != 0) && (actor->dmgPart == 0)) { + if ((actor->dmgType != DMG_NONE) && (actor->dmgPart == 0)) { AUDIO_PLAY_SFX(0x2903300E, actor->sfxSource, 4); - actor->dmgType = 0; + actor->dmgType = DMG_NONE; actor->health -= actor->damage; actor->timer_0C6 = 15; if (actor->health <= 0) { @@ -6753,9 +6753,9 @@ void Macbeth_801B38E0(void) { } D_ctx_801782B8 = D_ctx_801782BC = D_ctx_801782C0 = D_ctx_801782D0 = gBossActive = D_ctx_8017828C = D_ctx_8017812C = - gPrevEventActorIndex = D_ctx_80177E78 = gRingPassCount = 0; - D_ctx_80177F10.x = D_ctx_80177F10.y = D_ctx_80177F10.z = D_ctx_80177E88.x = D_ctx_80177E88.y = D_ctx_80177E88.z = - 0.0f; + gPrevEventActorIndex = gFormationLeaderIndex = gRingPassCount = 0; + gFormationInitPos.x = gFormationInitPos.y = gFormationInitPos.z = gFormationInitRot.x = gFormationInitRot.y = + gFormationInitRot.z = 0.0f; for (i = 0; i < 10; i++) { gTeamArrowsViewPos[i].x = gTeamArrowsViewPos[i].y = gTeamArrowsViewPos[i].z = 100.0f; diff --git a/src/overlays/ovl_i5/fox_ti.c b/src/overlays/ovl_i5/fox_ti.c index b962632c..4030c037 100644 --- a/src/overlays/ovl_i5/fox_ti.c +++ b/src/overlays/ovl_i5/fox_ti.c @@ -304,7 +304,7 @@ void Titania_801895B8(Actor* actor) { actor->vel.y = sp48.y; actor->vel.z = sp48.z; - if (actor->dmgType > 0) { + if (actor->dmgType > DMG_NONE) { if (Rand_ZeroOne() <= 0.25f) { actor->itemDrop = DROP_SILVER_RING_50p; } else { @@ -353,8 +353,8 @@ void Titania_80189CC8(Actor* actor) { f32 temp; if (actor->health > 0) { - if (actor->dmgType != 0) { - actor->dmgType = 0; + if (actor->dmgType != DMG_NONE) { + actor->dmgType = DMG_NONE; actor->timer_0C6 = 15; actor->health -= actor->damage; if (actor->health <= 0) { @@ -493,12 +493,12 @@ void Titania_8018A544(Actor* actor) { actor->unk_0C9 = 1; - if ((actor->scale != 1.0f) && (actor->dmgType == 3)) { + if ((actor->scale != 1.0f) && (actor->dmgType == DMG_COLLISION)) { Object_Kill(&actor->obj, actor->sfxSource); } - if (actor->dmgType != 0) { - actor->dmgType = 0; + if (actor->dmgType != DMG_NONE) { + actor->dmgType = DMG_NONE; actor->timer_0C6 = 15; actor->health += actor->damage; if (actor->scale == 1.0f) { @@ -652,7 +652,7 @@ void Titania_8018AB44(Actor* actor) { Object_Kill(&actor->obj, actor->sfxSource); break; } - actor->dmgType = 0; + actor->dmgType = DMG_NONE; } static Vec3f D_i5_801B75AC = { -70.0f, 50.0f, 212.0f }; @@ -774,8 +774,8 @@ void Titania_8018B268(Actor* actor) { Actor* sp3C = actor->iwork[0]; Actor* sp38 = actor->iwork[1]; - if (actor->dmgType > 0) { - actor->dmgType = 0; + if (actor->dmgType > DMG_NONE) { + actor->dmgType = DMG_NONE; if (actor->health > 0) { actor->health -= actor->damage; if (actor->health <= 0) { @@ -1018,11 +1018,11 @@ void Titania_8018B9D0(Actor* actor) { actor->obj.rot.x = (var_fa0 / 130.0f) * 90.0f; - if (actor->dmgType == 1) { + if (actor->dmgType == DMG_BEAM) { AUDIO_PLAY_SFX(0x19020008, actor->sfxSource, 4); sp44 = actor->obj.pos.x - actor->hitPos.x; sp40 = fabsf(sp44); - actor->dmgType = 0; + actor->dmgType = DMG_NONE; actor->state = 1; actor->timer_0BC = 0; actor->timer_0BE = 0; @@ -1299,7 +1299,8 @@ void Titania_8018C8A8(Actor* actor) { actor->iwork[6]--; } - if ((actor->health > 0) && (actor->dmgType > 0) && (actor->dmgType != 3) && (actor->state >= 3)) { + if ((actor->health > 0) && (actor->dmgType > DMG_NONE) && (actor->dmgType != DMG_COLLISION) && + (actor->state >= 3)) { if ((actor->health > 0) && (actor->dmgPart >= 0) && (actor->dmgPart < 3)) { actor->iwork[5] = 10; if (actor->state == 4) { @@ -1321,10 +1322,10 @@ void Titania_8018C8A8(Actor* actor) { } else { AUDIO_PLAY_SFX(0x29034041, actor->sfxSource, 4); } - } else if (actor->dmgType == 1) { + } else if (actor->dmgType == DMG_BEAM) { func_effect_8007A6F0(&actor->obj.pos, 0x29121007); } - actor->dmgType = 0; + actor->dmgType = DMG_NONE; } switch (actor->state) { @@ -1682,7 +1683,7 @@ void Titania_8018C8A8(Actor* actor) { actor->lockOnTimers[TEAM_ID_FOX] = 0; actor->info.targetOffset = 0.0f; } - actor->dmgType = 0; + actor->dmgType = DMG_NONE; } void Titania_8018E2D8(Actor* actor) { @@ -1874,8 +1875,8 @@ void Titania_8018E5F8(Actor* actor) { actor->fwork[3] = sp84.x; actor->fwork[4] = sp84.y; actor->fwork[5] = sp84.z; - if (actor->dmgType > 0) { - actor->dmgType = 0; + if (actor->dmgType > DMG_NONE) { + actor->dmgType = DMG_NONE; actor->timer_0C6 = 10; if (actor->health > 0) { actor->health -= actor->damage; @@ -3160,7 +3161,7 @@ void Titania_80192118(Boss* boss) { } } } - if (boss->dmgType != 0) { + if (boss->dmgType != DMG_NONE) { D_i5_801BBEF0[48]++; } if ((D_i5_801BBEF0[48] >= 3) || (boss->swork[31] >= 90)) { @@ -4729,7 +4730,7 @@ void Titania_80197A94(Boss* boss) { Vec3f sp3C; boss->swork[38]++; - if ((boss->dmgType != 0) && + if ((boss->dmgType != DMG_NONE) && (((boss->state >= 0) && (boss->state <= 1)) || ((boss->state >= 4) && (boss->state <= 6)))) { AUDIO_PLAY_SFX(0x29121007, boss->sfxSource, 4); boss->dmgType = DMG_NONE; diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index fb8b1707..43dbd929 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -324,7 +324,7 @@ void Andross_80188528(Actor* actor) { Math_SmoothStepToF(&actor->vel.x, 0.0f, 0.2f, 0.5f, 0.0f); Math_SmoothStepToF(&actor->vel.y, 0.0f, 0.2f, 0.5f, 0.0f); Math_SmoothStepToF(&actor->vel.z, 0.0f, 0.2f, 0.5f, 0.0f); - if (actor->dmgType != 0) { + if (actor->dmgType != DMG_NONE) { func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); Object_Kill(&actor->obj, actor->sfxSource); func_effect_8007B344(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 3.0f, 5); @@ -385,7 +385,7 @@ void Andross_801888F4(Actor* actor) { if ((actor->timer_0BC % 2U) == 1) { func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 5.0f); } - if ((actor->timer_0BC == 0) || (actor->dmgType != 0)) { + if ((actor->timer_0BC == 0) || (actor->dmgType != DMG_NONE)) { func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, actor->vel.x, actor->vel.y, actor->vel.z, 7.0f, 20); func_effect_8007B344(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f, 5); @@ -3242,8 +3242,8 @@ void Andross_80192E94(Actor* actor) { break; } - if (actor->dmgType != 0) { - actor->dmgType = 0; + if (actor->dmgType != DMG_NONE) { + actor->dmgType = DMG_NONE; actor->health -= actor->damage; if (actor->health <= 0) { func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 5.0f); diff --git a/src/overlays/ovl_i6/fox_sy.c b/src/overlays/ovl_i6/fox_sy.c index 06903226..425c48e4 100644 --- a/src/overlays/ovl_i6/fox_sy.c +++ b/src/overlays/ovl_i6/fox_sy.c @@ -2680,9 +2680,9 @@ void SectorY_801A0AC0(Player* player) { for (i = 0; i < 10; i++) { if (gPlayerShots[i].obj.status == OBJ_FREE) { - func_enmy2_8006ECBC(PLAYERSHOT_1, &gPlayerShots[i], 100, gActors[8].obj.pos.x, - gActors[8].obj.pos.y - 200.0f, sp80, sp98.x, sp98.y, sp98.z, sp88, sp84, - 0.0f); + Actor_SetupPlayerShot(PLAYERSHOT_1, &gPlayerShots[i], CS_SHOT_ID, gActors[8].obj.pos.x, + gActors[8].obj.pos.y - 200.0f, sp80, sp98.x, sp98.y, sp98.z, sp88, sp84, + 0.0f); gPlayerShots[i].unk_64 = 200; break; } @@ -2795,9 +2795,9 @@ void SectorY_801A0AC0(Player* player) { for (i = 0; i < 11; i++) { if (gPlayerShots[i].obj.status == OBJ_FREE) { - func_enmy2_8006ECBC(PLAYERSHOT_1, &gPlayerShots[i], 100, gActors[8].obj.pos.x, - gActors[8].obj.pos.y, gActors[8].obj.pos.z, sp98.x, sp98.y, sp98.z, - sp88, sp84, 0.0f); + Actor_SetupPlayerShot(PLAYERSHOT_1, &gPlayerShots[i], CS_SHOT_ID, gActors[8].obj.pos.x, + gActors[8].obj.pos.y, gActors[8].obj.pos.z, sp98.x, sp98.y, sp98.z, + sp88, sp84, 0.0f); gPlayerShots[i].unk_64 = 174; break; } @@ -3716,12 +3716,12 @@ void SectorY_Actor204_Update(Actor204* this) { this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_60340C0); } - if ((this->dmgType != 0) && (this->unk_046 != 3)) { + if ((this->dmgType != DMG_NONE) && (this->unk_046 != 3)) { - if (this->dmgType == 2) { + if (this->dmgType == DMG_EXPLOSION) { this->dmgPart = 1; } - this->dmgType = 0; + this->dmgType = DMG_NONE; if (this->dmgPart == 0) { this->iwork[18] = 15; AUDIO_PLAY_SFX(0x29121007, this->sfxSource, 4); diff --git a/src/overlays/ovl_i6/fox_turret.c b/src/overlays/ovl_i6/fox_turret.c index e70a9689..8551a70e 100644 --- a/src/overlays/ovl_i6/fox_turret.c +++ b/src/overlays/ovl_i6/fox_turret.c @@ -51,7 +51,7 @@ void Turret_801A5560(Player* player, PlayerShot* shot, f32 xOffset, f32 yOffset, shot->unk_64 = 40; shot->scale = 1.5f; - shot->playerNum = player->num; + shot->sourceId = player->num; } void Turret_801A581C(Player* player, f32 xOffset) { diff --git a/src/overlays/ovl_i6/fox_ve2.c b/src/overlays/ovl_i6/fox_ve2.c index 2fc75bbf..12e03bbc 100644 --- a/src/overlays/ovl_i6/fox_ve2.c +++ b/src/overlays/ovl_i6/fox_ve2.c @@ -21,7 +21,7 @@ void Venom2_80196288(Boss* boss) { } void Venom2_801962F4(Actor* actor) { - func_360_8002F69C(actor); + ActorAllRange_UpdateStarWolfEvents(actor); } static Vec3f D_i6_801A68B0[6] = { @@ -52,10 +52,10 @@ void Venom2_UpdateEvents(Actor* this) { player->pos.x = 0.0f; player->pos.z = 8000.0f; player->pos.y = 670.0f; - D_360_800C9B4C = 120; + gAllRangeSpawnEvent = 120; gStarWolfMsgTimer = 1000; } else { - D_360_800C9B4C = 320; + gAllRangeSpawnEvent = 320; gStarWolfMsgTimer = 1200; this->state = 1; player->pos.x = 0.0f; @@ -95,7 +95,7 @@ void Venom2_UpdateEvents(Actor* this) { break; case 2: Venom2_801962F4(this); - if (((D_360_800C9B4C + 100) < gAllRangeEventTimer) && (gActors[4].obj.status == OBJ_FREE) && + if (((gAllRangeSpawnEvent + 100) < gAllRangeEventTimer) && (gActors[4].obj.status == OBJ_FREE) && (gActors[5].obj.status == OBJ_FREE) && (gActors[6].obj.status == OBJ_FREE) && (gActors[7].obj.status == OBJ_FREE) && (this->timer_0BE == 0)) { this->timer_0BE = 80; @@ -130,7 +130,7 @@ void Venom2_UpdateEvents(Actor* this) { Math_SmoothStepToF(&player->cam.at.y, wolf->obj.pos.y, 1.0f, 20000.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.z, wolf->obj.pos.z, 1.0f, 20000.0f, 0.0f); Math_SmoothStepToF(&player->camRoll, 0, 0.1f, 0.2f, 0.0f); - if ((gControllerPress->button & START_BUTTON) || (gAllRangeEventTimer == (D_360_800C9B4C + 300))) { + if ((gControllerPress->button & START_BUTTON) || (gAllRangeEventTimer == (gAllRangeSpawnEvent + 300))) { this->state = 2; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; func_play_800B7184(player, 1); diff --git a/tools/Torch b/tools/Torch index e6de3268..f24e7ec6 160000 --- a/tools/Torch +++ b/tools/Torch @@ -1 +1 @@ -Subproject commit e6de326810c4f56810e98d4e2812995df29bfbb9 +Subproject commit f24e7ec63b81bfe24e4daa795cc1e1d690e789cd From 455aa0aa2c35da2dfca64c24a5cc2c36f488c110 Mon Sep 17 00:00:00 2001 From: Alejandro Asenjo Nitti <96613413+sonicdcer@users.noreply.github.com> Date: Sun, 5 May 2024 17:23:49 -0300 Subject: [PATCH 058/151] Initial Katina documentation (#228) * initial docs * func names * docs * more docs * more katina docs * format * format * yRot * more docs * more docs * this * some fixes * fixes * ActorAllRange * These should not be used here * corrections * some renamings * more docs * format * Merge remote-tracking branch 'origin' into fox_ka_docs * ActorCutscene * PR review * comment * bump torch * PR review * review --- Makefile | 2 +- assets/yaml/us/ast_katina.yaml | 46 +- include/i4.h | 18 +- include/sf64object.h | 8 +- include/variables.h | 2 +- linker_scripts/us/symbol_addrs_overlays.txt | 4 +- src/engine/fox_360.c | 11 +- src/engine/fox_demo.c | 6 +- src/engine/fox_edata_info.c | 10 +- src/engine/fox_effect.c | 6 +- src/engine/fox_enmy.c | 6 +- src/engine/fox_hud.c | 6 +- src/engine/fox_play.c | 2 +- src/overlays/ovl_i4/fox_ka.c | 1949 ++++++++++++------- src/overlays/ovl_i4/fox_sz.c | 4 +- src/overlays/ovl_i5/fox_ma.c | 1 + src/sys/sys_fault.c | 2 +- tools/Torch | 2 +- 18 files changed, 1292 insertions(+), 793 deletions(-) diff --git a/Makefile b/Makefile index 5938057c..4bf4ec97 100644 --- a/Makefile +++ b/Makefile @@ -425,7 +425,7 @@ extract: assets: @echo "Extracting assets from ROM..." - @$(TORCH) code $(BASEROM_UNCOMPRESSED) -v + @$(TORCH) code $(BASEROM_UNCOMPRESSED) @$(TORCH) header $(BASEROM_UNCOMPRESSED) @$(TORCH) modding export $(BASEROM_UNCOMPRESSED) diff --git a/assets/yaml/us/ast_katina.yaml b/assets/yaml/us/ast_katina.yaml index ddacbdd3..efc3f21c 100644 --- a/assets/yaml/us/ast_katina.yaml +++ b/assets/yaml/us/ast_katina.yaml @@ -20,15 +20,16 @@ D_KA_6000000: D_KA_6001260: { type: TEXTURE, format: IA8, width: 8, height: 8, offset: 0x6001260, ctype: u8, symbol: D_KA_6001260 } -D_KA_60012A0: - { type: GFX, offset: 0x60012A0, symbol: D_KA_60012A0 } +aDestroyedHatch1DL: + { type: GFX, offset: 0x60012A0, symbol: aDestroyedHatch1DL } -D_KA_6001530: - { type: GFX, offset: 0x6001530, symbol: D_KA_6001530 } +aKaEnemy1DL: + { type: GFX, offset: 0x6001530, symbol: aKaEnemy1DL } D_KA_6001968: { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6001968, ctype: u16, symbol: D_KA_6001968 } +# Mothership model D_KA_6002170: { type: GFX, offset: 0x6002170, symbol: D_KA_6002170 } @@ -56,8 +57,8 @@ D_KA_60062F8: D_KA_6006AF8: { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6006AF8, ctype: u16, symbol: D_KA_6006AF8 } -D_KA_6007300: - { type: GFX, offset: 0x6007300, symbol: D_KA_6007300 } +aDestroyedMothershipDL: + { type: GFX, offset: 0x6007300, symbol: aDestroyedMothershipDL } D_KA_6009250: { type: GFX, offset: 0x6009250, symbol: D_KA_6009250 } @@ -71,8 +72,8 @@ D_KA_6009CB0: D_KA_600ABD0: { type: TEXTURE, format: RGBA16, width: 44, height: 44, offset: 0x600ABD0, ctype: u16, symbol: D_KA_600ABD0 } -D_KA_600BAF0: - { type: GFX, offset: 0x600BAF0, symbol: D_KA_600BAF0 } +aKaFLBaseDL: + { type: GFX, offset: 0x600BAF0, symbol: aKaFLBaseDL } D_KA_600BDB0: { type: TEXTURE, format: RGBA16, width: 16, height: 16, offset: 0x600BDB0, ctype: u16, symbol: D_KA_600BDB0 } @@ -80,8 +81,8 @@ D_KA_600BDB0: D_KA_600C2D8: { type: TEXTURE, format: RGBA16, width: 16, height: 16, offset: 0x600C2D8, ctype: u16, symbol: D_KA_600C2D8 } -D_KA_600C4E0: - { type: GFX, offset: 0x600C4E0, symbol: D_KA_600C4E0 } +aKaFLBaseDestroyedDL: + { type: GFX, offset: 0x600C4E0, symbol: aKaFLBaseDestroyedDL } D_KA_600C760: { type: TEXTURE, format: RGBA16, width: 16, height: 16, offset: 0x600C760, ctype: u16, symbol: D_KA_600C760 } @@ -89,23 +90,24 @@ D_KA_600C760: D_KA_600C960: { type: TEXTURE, format: RGBA16, width: 16, height: 16, offset: 0x600C960, ctype: u16, symbol: D_KA_600C960 } +# Mothership Core D_KA_600CB60: { type: GFX, offset: 0x600CB60, symbol: D_KA_600CB60 } D_KA_600BFB0: { type: GFX, offset: 0x600BFB0, symbol: D_KA_600BFB0 } -D_KA_600CDC0: - { type: GFX, offset: 0x600CDC0, symbol: D_KA_600CDC0 } +aDestroyedHatch2DL: + { type: GFX, offset: 0x600CDC0, symbol: aDestroyedHatch2DL } -D_KA_600D090: - { type: GFX, offset: 0x600D090, symbol: D_KA_600D090 } +aDestroyedCoreDL: + { type: GFX, offset: 0x600D090, symbol: aDestroyedCoreDL } -D_KA_600D290: - { type: GFX, offset: 0x600D290, symbol: D_KA_600D290 } +aDestroyedHatch4DL: + { type: GFX, offset: 0x600D290, symbol: aDestroyedHatch4DL } -D_KA_600D4E0: - { type: GFX, offset: 0x600D4E0, symbol: D_KA_600D4E0 } +aDestroyedHatch3DL: + { type: GFX, offset: 0x600D4E0, symbol: aDestroyedHatch3DL } D_KA_600D730: { type: GFX, offset: 0x600D730, symbol: D_KA_600D730 } @@ -119,8 +121,8 @@ D_KA_600DBC0: D_KA_600DC48: { type: TEXTURE, format: IA8, width: 32, height: 32, offset: 0x600DC48, ctype: u8, symbol: D_KA_600DC48 } -D_KA_600E050: - { type: GFX, offset: 0x600E050, symbol: D_KA_600E050 } +aKaCornerianFighterDL: + { type: GFX, offset: 0x600E050, symbol: aKaCornerianFighterDL } D_KA_600E7E8: { type: TEXTURE, format: RGBA16, width: 16, height: 16, offset: 0x600E7E8, ctype: u16, symbol: D_KA_600E7E8 } @@ -134,8 +136,8 @@ D_KA_600EBE8: D_KA_600EDE8: { type: TEXTURE, format: RGBA16, width: 16, height: 16, offset: 0x600EDE8, ctype: u16, symbol: D_KA_600EDE8 } -D_KA_600EFF0: - { type: GFX, offset: 0x600EFF0, symbol: D_KA_600EFF0 } +aKaEnemy1LowPolyDL: + { type: GFX, offset: 0x600EFF0, symbol: aKaEnemy1LowPolyDL } D_KA_600F1D0: { type: GFX, offset: 0x600F1D0, symbol: D_KA_600F1D0 } diff --git a/include/i4.h b/include/i4.h index 76bb4bca..d4188c53 100644 --- a/include/i4.h +++ b/include/i4.h @@ -14,7 +14,7 @@ void Bolse_LevelStart(Player*); void Bolse_LevelComplete(Player*); void Katina_LevelStart(Player*); void Katina_LevelComplete(Player*); -void Katina_80197F10(Actor*); +void Katina_SFTeamFlyTowardsCamera(Actor*); void SectorZ_LevelStart(Player*); void SectorZ_LevelComplete(Player*); void SectorZ_8019DD20(Actor*); @@ -25,9 +25,9 @@ void Fortuna_8018BA2C(void); void Bolse_UpdateEventHandler(Actor*); void Bolse_80191ED8(void); void Bolse_DrawDynamicGround(void); -void Katina_Boss316_Init(Boss *); +void Katina_BossSetup(Boss *); void Katina_UpdateEvents(Actor*); -void Katina_80198930(void); +void Katina_BossInit(void); void SectorZ_80199900(Actor *, s32); void SectorZ_Missile_Update(Actor*); void SectorZ_UpdateEvents(Actor*); @@ -39,12 +39,12 @@ void Bolse_80191054(Effect*); void Bolse_80191180(Effect*); void Bolse_801912FC(Boss*); void Bolse_80191AFC(Boss*); -void Katina_80192984(Effect*); -void Katina_80192A68(Effect*); -void Katina_80193718(Boss*); -void Katina_80193B1C(Boss*); -void Katina_801946C4(Boss*); -void Katina_801968F4(Boss*); +void Katina_LaserEnergyParticlesUpdate(Effect*); +void Katina_LaserEnergyParticlesDraw(Effect*); +void Katina_BaseUpdate(Boss*); +void Katina_Base_Draw(Boss*); +void Katina_BossUpdate(Boss*); +void Katina_BossDraw(Boss*); void SectorZ_8019E234(Actor*); void SectorZ_8019E3A8(Actor*); void SectorZ_8019E454(Boss*); diff --git a/include/sf64object.h b/include/sf64object.h index 574ac14b..8b8899a2 100644 --- a/include/sf64object.h +++ b/include/sf64object.h @@ -652,7 +652,7 @@ typedef enum ObjectId { /* 336 */ OBJ_ITEM_GOLD_RING, /* 337 */ OBJ_ITEM_WING_REPAIR, /* 338 */ OBJ_ITEM_TRAINING_RING, - /* 339 */ OBJ_EFFECT_339, + /* 339 */ OBJ_EFFECT_FIRE_SMOKE, /* 340 */ OBJ_EFFECT_340, /* 341 */ OBJ_EFFECT_341, /* 342 */ OBJ_EFFECT_342, @@ -1244,8 +1244,8 @@ typedef Boss Boss312; typedef Boss Boss313; typedef Boss Boss314; typedef Boss BossSO; -typedef Boss Boss316; -typedef Boss Boss317; +typedef Boss Saucerer; +typedef Boss Frontlinebase; typedef Boss BossAQ; typedef Boss Boss319; typedef Boss Boss320; @@ -1267,7 +1267,7 @@ typedef Item Item1UP; typedef Item ItemGoldRing; typedef Item ItemWingRepair; typedef Item ItemTrainingRing; -typedef Effect Effect339; +typedef Effect EffectFireSmoke; typedef Effect Effect340; typedef Effect Effect341; typedef Effect Effect342; diff --git a/include/variables.h b/include/variables.h index fa6760d2..2080cfa7 100644 --- a/include/variables.h +++ b/include/variables.h @@ -108,7 +108,7 @@ extern u8 gKaAllyKillCount; extern s32 gAllRangeCheckpoint; extern s32 gAllRangeEventTimer; extern s32 gAllRangeCountdown[3]; -extern s32 gShowAllRangeCountdown; +extern bool gShowAllRangeCountdown; extern s32 gAllRangeFrameCount; extern f32 gAllRangeCountdownScale; diff --git a/linker_scripts/us/symbol_addrs_overlays.txt b/linker_scripts/us/symbol_addrs_overlays.txt index 71fee18e..5e44bc6c 100644 --- a/linker_scripts/us/symbol_addrs_overlays.txt +++ b/linker_scripts/us/symbol_addrs_overlays.txt @@ -38,7 +38,7 @@ D_i4_8019F2BC = 0x8019F2BC; // type:f32 segment:ovl_i4 force_migration:True D_i4_8019F2CC = 0x8019F2CC; // type:f32 segment:ovl_i4 force_migration:True D_i4_8019F2DC = 0x8019F2DC; // type:f32 segment:ovl_i4 force_migration:True D_i4_8019F2F0 = 0x8019F2F0; // type:s32 segment:ovl_i4 force_migration:True -D_i4_8019F340 = 0x8019F340; // type:f32 segment:ovl_i4 force_migration:True +sCsLevelCompleteActorPos = 0x8019F340; // type:f32 segment:ovl_i4 force_migration:True sOptionCardPosY = 0x801AE570; // type:f32 size:0x18 force_migration:True segment:ovl_menu sOptionCardTextPosX = 0x801AE588; // type:f32 size:0x18 force_migration:True segment:ovl_menu sOptionCardTextPosY = 0x801AE5A0; // type:f32 size:0x18 force_migration:True segment:ovl_menu @@ -155,7 +155,7 @@ D_i3_801C2768 = 0x801C2768; //segment:ovl_i3 size:0x38 D_i3_801C27A0 = 0x801C27A0; //segment:ovl_i3 size:0x20 Katina_UpdateEvents = 0x80198594;//segment:ovl_i4 -Katina_Boss316_Init = 0x80193CA4;//segment:ovl_i4 +Katina_BossSetup = 0x80193CA4;//segment:ovl_i4 SectorZ_Missile_Update = 0x80199C60;//segment:ovl_i4 SectorZ_80199900 = 0x80199900;//segment:ovl_i4 D_i4_801A03C0 = 0x801A03C0;//segment:ovl_i4 diff --git a/src/engine/fox_360.c b/src/engine/fox_360.c index d158a64f..d9c30a34 100644 --- a/src/engine/fox_360.c +++ b/src/engine/fox_360.c @@ -45,7 +45,7 @@ u8 gKaAllyKillCount; s32 gAllRangeCheckpoint; s32 gAllRangeEventTimer; s32 gAllRangeCountdown[3]; -s32 gShowAllRangeCountdown; +bool gShowAllRangeCountdown; s32 gAllRangeFrameCount; f32 gAllRangeCountdownScale; @@ -1171,8 +1171,9 @@ bool func_360_80031900(Actor* actor) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp24, &sp18); if (sp18.z > 0.0f) { return true; + } else { + return false; } - return false; } static Vec3f sSectorZRetreatPath[6] = { @@ -2279,15 +2280,15 @@ void ActorAllRange_Draw(ActorAllRange* this) { } else if (gCurrentLevel == LEVEL_KATINA) { switch (this->unk_0B6) { case 0: - gSPDisplayList(gMasterDisp++, D_KA_600EFF0); + gSPDisplayList(gMasterDisp++, aKaEnemy1LowPolyDL); break; case 1: - gSPDisplayList(gMasterDisp++, D_KA_600E050); + gSPDisplayList(gMasterDisp++, aKaCornerianFighterDL); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY); Actor_DrawEngineGlow(this, 0); break; case 3: - gSPDisplayList(gMasterDisp++, D_KA_6001530); + gSPDisplayList(gMasterDisp++, aKaEnemy1DL); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 30.0f, MTXF_APPLY); ActorAllRange_DrawShield(this); break; diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index 8bc30a7c..f28533d7 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -2374,7 +2374,7 @@ void ActorCutscene_Update(ActorCutscene* this) { break; case LEVEL_KATINA: - Katina_80197F10(this); + Katina_SFTeamFlyTowardsCamera(this); break; case LEVEL_SECTOR_Z: @@ -2745,14 +2745,14 @@ void ActorCutscene_Draw(Actor* actor) { if ((actor->index == 3) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { gSPDisplayList(gMasterDisp++, D_D00B880); } else { - gSPDisplayList(gMasterDisp++, D_KA_600E050); + gSPDisplayList(gMasterDisp++, aKaCornerianFighterDL); } Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY); Actor_DrawEngineGlow(actor, 0); break; case 34: - gSPDisplayList(gMasterDisp++, D_KA_6001530); + gSPDisplayList(gMasterDisp++, aKaEnemy1DL); break; case 35: diff --git a/src/engine/fox_edata_info.c b/src/engine/fox_edata_info.c index fbff7caf..dbb7726c 100644 --- a/src/engine/fox_edata_info.c +++ b/src/engine/fox_edata_info.c @@ -247,7 +247,7 @@ ObjectInfo gObjectInfo[] = { /* OBJ_SCENERY_151 */ {(void*) D_FO_60066E0, 0, (ObjectFunc) NULL, D_FO_600FEB8, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_152 */ {(void*) D_BO_600F4C0, 0, (ObjectFunc) NULL, D_BO_6011C10, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_153 */ {(void*) D_BO_600B8B0, 0, (ObjectFunc) NULL, D_BO_6011C48, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_154 */ {(void*) D_KA_600BAF0, 0, (ObjectFunc) NULL, D_KA_601115C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_154 */ {(void*) aKaFLBaseDL, 0, (ObjectFunc) NULL, D_KA_601115C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_155 */ {(void*) NULL, 0, (ObjectFunc) NULL, gNoHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_156 */ {(void*) SectorY_80197CB8, 1, (ObjectFunc) NULL, D_SY_6034368, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_157 */ {(void*) D_SZ_6001DA0, 0, (ObjectFunc) NULL, D_SZ_600924C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, @@ -409,8 +409,8 @@ ObjectInfo gObjectInfo[] = { /* OBJ_BOSS_313 */ {(void*) SectorZ_8019E98C, 1, (ObjectFunc) SectorZ_8019E454, D_SZ_6009388, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_314 */ {(void*) SectorY_8019E2C4, 2, (ObjectFunc) SectorY_8019C888, gNoHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_SO */ {(void*) Solar_801A71B8, 2, (ObjectFunc) Solar_801A5B3C, gNoHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_316 */ {(void*) Katina_801968F4, 1, (ObjectFunc) Katina_801946C4, D_KA_6011058, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_317 */ {(void*) Katina_80193B1C, 1, (ObjectFunc) Katina_80193718, D_KA_601115C, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, + /* OBJ_BOSS_316 */ {(void*) Katina_BossDraw, 1, (ObjectFunc) Katina_BossUpdate, D_KA_6011058, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_317 */ {(void*) Katina_Base_Draw, 1, (ObjectFunc) Katina_BaseUpdate, D_KA_601115C, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_AQ */ {(void*) Aquas_801B4D84, 2, (ObjectFunc) Aquas_801B134C, D_AQ_6030F74, 10000.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_319 */ {(void*) Venom1_801985E4, 1, (ObjectFunc) Venom1_80194398,D_VE1_8019A9B8, 3000.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_320 */ {(void*) Andross_801928C8, 2, (ObjectFunc) Andross_8018DBF0, D_ANDROSS_C038DC0, 10000.0f, 0, 0, 40, 0, 0.0f, 10 }, @@ -432,7 +432,7 @@ ObjectInfo gObjectInfo[] = { /* OBJ_ITEM_GOLD_RING */ {(void*) ItemGoldRing_Draw, 1, (ObjectFunc) ItemGoldRing_Update, gItemSupplyRingHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ITEM_WING_REPAIR */ {(void*) D_arwing_3007650, 0, (ObjectFunc) ItemWingRepair_Update, gItemLasersHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ITEM_TRAINING_RING */ {(void*) gItemTrainingRingDL, 0, (ObjectFunc) Training_ItemRing_Update, D_TR_6009CFC, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_339 */ {(void*) func_effect_8007D55C, 1, (ObjectFunc) func_effect_8007D2F4, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_FIRE_SMOKE */ {(void*) func_effect_8007D55C, 1, (ObjectFunc) func_effect_8007D2F4, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, /* OBJ_EFFECT_340 */ {(void*) func_effect_8007D55C, 1, (ObjectFunc) func_effect_8007D748, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, /* OBJ_EFFECT_341 */ {(void*) func_effect_8007D55C, 1, (ObjectFunc) func_effect_8007D8A8, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, /* OBJ_EFFECT_342 */ {(void*) func_effect_8007E330, 1, (ObjectFunc) func_effect_8007E298, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, @@ -451,7 +451,7 @@ ObjectInfo gObjectInfo[] = { /* OBJ_EFFECT_355 */ {(void*) func_effect_80078AEC, 1, (ObjectFunc) func_effect_800802B8, NULL, 100.0f, 1, 0, 20, 1, 0.0f, 0 }, /* OBJ_EFFECT_356 */ {(void*) func_effect_80078C84, 1, (ObjectFunc) func_effect_800802F8, NULL, 100.0f, 1, 0, 20, 0, 0.0f, 0 }, /* OBJ_EFFECT_357 */ {(void*) func_effect_800798F0, 1, (ObjectFunc) func_effect_8007968C, NULL, 100.0f, 0, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_358 */ {(void*) Katina_80192A68, 1, (ObjectFunc) Katina_80192984, NULL, 100.0f, 1, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_358 */ {(void*) Katina_LaserEnergyParticlesDraw, 1, (ObjectFunc) Katina_LaserEnergyParticlesUpdate, NULL, 100.0f, 1, 1, 0, 0, 0.0f, 0 }, /* OBJ_EFFECT_359 */ {(void*) func_effect_8007AA60, 1, (ObjectFunc) func_effect_8007A994, NULL, -100.0f, 1, 2, 0, 0, 0.0f, 0 }, /* OBJ_EFFECT_360 */ {(void*) func_effect_8007BEE8, 1, (ObjectFunc) func_effect_8007BE54, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, /* OBJ_EFFECT_361 */ {(void*) func_effect_8007BEE8, 1, (ObjectFunc) func_effect_8007BDE0, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, diff --git a/src/engine/fox_effect.c b/src/engine/fox_effect.c index 096b5f76..53d4a472 100644 --- a/src/engine/fox_effect.c +++ b/src/engine/fox_effect.c @@ -167,7 +167,7 @@ Effect* func_effect_8007783C(ObjectId objId) { void func_effect_800778C4(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2) { Effect_Initialize(effect); effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_339; + effect->obj.id = OBJ_EFFECT_FIRE_SMOKE; effect->obj.pos.x = xPos; effect->obj.pos.y = yPos; @@ -628,6 +628,7 @@ void func_effect_800794CC(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { } } +// Broken pieces and debris effect void func_effect_8007953C(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { s32 i; @@ -1226,6 +1227,7 @@ void func_effect_8007B2BC(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scal Object_SetInfo(&effect->info, effect->obj.id); } +// Orange-yellowish light effect simulating an explosion void func_effect_8007B344(f32 xPos, f32 yPos, f32 zPos, f32 scale1, s32 arg4) { s32 i; @@ -1791,7 +1793,7 @@ void func_effect_8007CAF0(Effect* effect) { void func_effect_8007CC00(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { Effect_Initialize(effect); effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_339; + effect->obj.id = OBJ_EFFECT_FIRE_SMOKE; effect->obj.pos.x = xPos; effect->obj.pos.y = yPos; effect->obj.pos.z = zPos; diff --git a/src/engine/fox_enmy.c b/src/engine/fox_enmy.c index c3f9c42b..65002e7e 100644 --- a/src/engine/fox_enmy.c +++ b/src/engine/fox_enmy.c @@ -458,7 +458,7 @@ void Object_Load(ObjectInit* objInit, f32 xMax, f32 xMin, f32 yMax, f32 yMin) { } } } - if ((objInit->id >= OBJ_ITEM_LASERS) && (objInit->id < OBJ_EFFECT_339)) { + if ((objInit->id >= OBJ_ITEM_LASERS) && (objInit->id < OBJ_EFFECT_FIRE_SMOKE)) { for (i = 0; i < ARRAY_COUNT(gItems); i++) { if (gItems[i].obj.status == OBJ_FREE) { Item_Load(&gItems[i], objInit); @@ -466,7 +466,7 @@ void Object_Load(ObjectInit* objInit, f32 xMax, f32 xMin, f32 yMax, f32 yMin) { } } } - if (objInit->id >= OBJ_EFFECT_339 && objInit->id <= OBJ_UNK_406) { + if (objInit->id >= OBJ_EFFECT_FIRE_SMOKE && objInit->id <= OBJ_UNK_406) { switch (objInit->id) { case OBJ_UNK_403: D_MA_801BA1E8 = 99; @@ -1188,7 +1188,7 @@ void Object_Init(s32 index, ObjectId objId) { Andross_Boss320_Init(&gBosses[index]); break; case OBJ_BOSS_316: - Katina_Boss316_Init(&gBosses[index]); + Katina_BossSetup(&gBosses[index]); break; case OBJ_BOSS_314: SectorY_Boss314_Init(&gBosses[index]); diff --git a/src/engine/fox_hud.c b/src/engine/fox_hud.c index 40c67dcc..92894176 100644 --- a/src/engine/fox_hud.c +++ b/src/engine/fox_hud.c @@ -5417,7 +5417,7 @@ void func_hud_80094D20(f32 x, f32 y) { temp4 = gDisplayedHitCount; } - boolTemp = 0; + boolTemp = false; i = 1000; temp3 %= i; temp4 %= i; @@ -5430,7 +5430,7 @@ void func_hud_80094D20(f32 x, f32 y) { temp = temp3 / i; temp2 = temp4 / i; - if ((temp != 0) || (boolTemp == 1)) { + if ((temp != 0) || (boolTemp == true)) { if (temp != temp2) { D_hud_80161720[j] += 0.4f; if (D_hud_80161720[j] <= 0.9f) { @@ -5466,7 +5466,7 @@ void func_hud_80094D20(f32 x, f32 y) { if (xScale != 0.0f) { TextureRect_8bIA(&gMasterDisp, D_800D24DC[temp], 16, 15, x1, y1, xScale, 1.0f); } - boolTemp = 1; + boolTemp = true; } if ((!boolTemp) && (xScale != 0.0f)) { diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index b1244887..a613f799 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -2666,7 +2666,7 @@ void Play_Init(void) { ActorAllRange_SpawnTeam(); break; case LEVEL_KATINA: - Katina_80198930(); + Katina_BossInit(); if (!D_ctx_8017782C) { ActorAllRange_SpawnTeam(); } diff --git a/src/overlays/ovl_i4/fox_ka.c b/src/overlays/ovl_i4/fox_ka.c index 41233361..1a790c0b 100644 --- a/src/overlays/ovl_i4/fox_ka.c +++ b/src/overlays/ovl_i4/fox_ka.c @@ -1,7 +1,7 @@ /* * File: fox_ka.c * System: Katina - * Description: Level: Karina + * Description: Level: Katina */ #include "global.h" @@ -15,9 +15,47 @@ Vec3f D_i4_8019F168[] = { { 700.0f, 50.0f, -700.0f }, { -500.0f, 150.0f, -500 }, f32 D_i4_8019F18C[] = { 200.0f, 160.0f, 185.0f }; u8 D_i4_8019F198[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; -s32 D_i4_8019F1C0[] = { - -1, 11, -1, 13, -1, 15, -1, 17, -1, 19, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 10, 11, 12, 13, 14, 2, 2, 4, 3, 2, +s32 sEnemySpawnTargets[] = { + -1, + AI360_10 + 1, + -1, + AI360_10 + 3, + -1, + AI360_10 + 5, + -1, + AI360_10 + 7, + -1, + AI360_10 + 9, + AI360_10, + AI360_10 + 1, + AI360_10 + 2, + AI360_10 + 3, + AI360_10 + 4, + AI360_10 + 5, + AI360_10 + 6, + AI360_10 + 7, + AI360_10 + 8, + AI360_10 + 9, + AI360_10, + AI360_10 + 1, + AI360_10 + 2, + AI360_10 + 3, + AI360_10 + 4, + AI360_10 + 5, + AI360_10 + 6, + AI360_10 + 7, + AI360_10 + 8, + AI360_10 + 9, + AI360_10, + AI360_10 + 1, + AI360_10 + 2, + AI360_10 + 3, + AI360_10 + 4, + AI360_SLIPPY, + AI360_SLIPPY, + 4, + 3, + 2, }; f32 D_i4_8019F260[] = { 377.0f, -600.0f, 700.0f }; f32 D_i4_8019F26C[] = { 50.0f, -50.0f, -100.0f }; @@ -32,7 +70,7 @@ f32 D_i4_8019F2DC[] = { 180.0f, 0.0f, 0.0f, 0.0f, 0.0f }; s32 D_i4_8019F2F0[] = { 100000, 100000, 100000, 100000, 1, 16, 15, 8, 3, 7, 12, 2, 5, 14, 9, 4, 10, 13, 6, 11, }; -Vec3f D_i4_8019F340[] = { +Vec3f sCsLevelCompleteActorPos[] = { { 500.0f, -100.0f, 500.0f }, { -500.0f, -70.0f, 500.0f }, { 0.0f, -140.0f, 1000.0f }, { -500.0f, -200.0f, 1000.0f }, { 1000.0f, -230.0f, 1500.0f }, { -1500.0f, -300.0f, 2300.0f }, { -500.0f, -250.0f, 2000.0f }, { 500.0f, -300.0f, 2200.0f }, { 1500.0f, -280.0f, 2100.0f }, @@ -53,71 +91,163 @@ f32 D_i4_801A0550; f32 D_i4_801A0554; f32 D_i4_801A0558; -void Katina_801995B4(Actor*); -void Katina_80198AA0(Actor*); +void Katina_EnemyDraw(ActorAllRange*); +void Katina_EnemyUpdate(ActorAllRange*); void Katina_801981F8(Actor*); -void Katina_801927E0(Effect* effect, f32 x, f32 y, f32 z, f32 x2, f32 y2, f32 z2) { +typedef enum KaActorIwork { + /* 0 */ KA_ACTOR_IWORK_0, + /* 1 */ KA_ACTOR_IWORK_1, + /* 2 */ KA_ACTOR_IWORK_2, + /* 4 */ KA_ACTOR_IWORK_4 = 4, + /* 5 */ KA_ACTOR_IWORK_5, + /* 8 */ KA_ACTOR_IWORK_8 = 8, + /* 11 */ KA_ACTOR_IWORK_11 = 11, + /* 23 */ KA_ACTOR_LOW_POLY = 23, +} KaActorIwork; + +typedef enum KaActorFwork { + /* 0 */ KA_ACTOR_FWORK_0, + /* 1 */ KA_ACTOR_FWORK_1, + /* 2 */ KA_ACTOR_FWORK_2, + /* 3 */ KA_ACTOR_FWORK_3, + /* 4 */ KA_ACTOR_FWORK_4, + /* 5 */ KA_ACTOR_FWORK_5, + /* 6 */ KA_ACTOR_FWORK_6, + /* 7 */ KA_ACTOR_FWORK_7, + /* 8 */ KA_ACTOR_FWORK_8, + /* 9 */ KA_ACTOR_FWORK_9, + /* 10 */ KA_ACTOR_FWORK_10, + /* 11 */ KA_ACTOR_FWORK_11, + /* 12 */ KA_ACTOR_FWORK_12, + /* 13 */ KA_ACTOR_FWORK_13, + /* 14 */ KA_ACTOR_FWORK_14, + /* 19 */ KA_ACTOR_FWORK_19 = 19, + /* 20 */ KA_ACTOR_FWORK_20, + /* 21 */ KA_ACTOR_FWORK_21, + /* 29 */ KA_ACTOR_FWORK_29 = 29, +} KaActorFwork; + +typedef enum KaBosses { + /* 0 */ KA_BOSS_BASE, + /* 1 */ KA_BOSS_MOTHERSHIP +} KaBosses; + +typedef enum KaBossSwork { + /* 0 */ BOSS_HATCH_1_FLASH_TIMER, + /* 1 */ BOSS_HATCH_2_FLASH_TIMER, + /* 2 */ BOSS_HATCH_3_FLASH_TIMER, + /* 3 */ BOSS_HATCH_4_FLASH_TIMER, + /* 4 */ BOSS_CORE_FLASH_TIMER, + /* 5 */ BOSS_SWORK_5, + /* 6 */ BOSS_SWORK_6, + /* 7 */ BOSS_SWORK_7, + /* 8 */ BOSS_SWORK_8, + /* 9 */ BOSS_SWORK_9, + /* 10 */ BOSS_HATCH_1_HP, + /* 11 */ BOSS_HATCH_2_HP, + /* 12 */ BOSS_HATCH_3_HP, + /* 13 */ BOSS_HATCH_4_HP, + /* 14 */ BOSS_CORE_HP, + /* 15 */ BOSS_HATCH_DESTROY_COUNT, + /* 16 */ BOSS_CORE_TIMER +} KaBossSwork; + +typedef enum KaBossFwork { + /* 0 */ BOSS_HATCH_1_ANGLE, + /* 1 */ BOSS_HATCH_2_ANGLE, + /* 2 */ BOSS_HATCH_3_ANGLE, + /* 3 */ BOSS_HATCH_4_ANGLE, + /* 4 */ BOSS_CORE_LEVEL, + /* 5 */ BOSS_HATCH_1_ANGLE_TARGET, + /* 6 */ BOSS_HATCH_2_ANGLE_TARGET, + /* 7 */ BOSS_HATCH_3_ANGLE_TARGET, + /* 8 */ BOSS_HATCH_4_ANGLE_TARGET, + /* 9 */ BOSS_CORE_TARGET_LEVEL, + /* 10 */ BOSS_MOVEMENT_SPEED, + /* 11 */ BOSS_Y_ROT_SPEED, + /* 12 */ BOSS_Y_ROT_SPEED_TARGET, + /* 13 */ BOSS_FWORK_13, + /* 14 */ BOSS_LASER_LIGHT_SCALE, + /* 15 */ BOSS_LASER_LENGTH +} KaBossFwork; + +typedef enum KaBaseStates { + /* 0 */ KA_BOSS_BASE_IDLE, + /* 1 */ KA_BASE_STATE_1, + /* 2 */ KA_BASE_STATE_2 +} KaBaseStates; + +// Particle effects visible while the Mothership is charging it's laser +void Katina_LaserEnergyParticlesSetup(Effect358* this, f32 x, f32 y, f32 z, f32 x2, f32 y2, f32 z2) { f32 yRot; f32 xRot; f32 distXZ; Vec3f src; Vec3f dest; - Effect_Initialize(effect); - effect->obj.status = OBJ_ACTIVE; - effect->obj.id = OBJ_EFFECT_358; - effect->obj.pos.x = x; - effect->obj.pos.y = y; - effect->obj.pos.z = z; + Effect_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_EFFECT_358; + + this->obj.pos.x = x; + this->obj.pos.y = y; + this->obj.pos.z = z; + xRot = Math_Atan2F(x2 - x, z2 - z); distXZ = sqrtf(SQ(x2 - x) + SQ(z2 - z)); yRot = -Math_Atan2F(y2 - y, distXZ); + Matrix_RotateY(gCalcMatrix, xRot, MTXF_NEW); Matrix_RotateX(gCalcMatrix, yRot, MTXF_APPLY); + src.x = 0.0f; src.y = 0.0f; src.z = 30.0f; + Matrix_MultVec3f(gCalcMatrix, &src, &dest); - effect->unk_60.x = dest.x; - effect->unk_60.y = dest.y; - effect->unk_60.z = dest.z; - Object_SetInfo(&effect->info, effect->obj.id); + + this->unk_60.x = dest.x; + this->unk_60.y = dest.y; + this->unk_60.z = dest.z; + + Object_SetInfo(&this->info, this->obj.id); } -void Katina_80192908(f32 x, f32 y, f32 z, f32 x2, f32 y2, f32 z2) { +// Allocation of particle effects visible while the Mothership is charging it's laser +void Katina_LaserEnergyParticlesSpawn(f32 x, f32 y, f32 z, f32 x2, f32 y2, f32 z2) { s32 i; for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { - Katina_801927E0(&gEffects[i], x, y, z, x2, y2, z2); + Katina_LaserEnergyParticlesSetup(&gEffects[i], x, y, z, x2, y2, z2); break; } } } -void Katina_80192984(Effect* effect) { - effect->vel.x = effect->unk_60.x * effect->scale1; - effect->vel.y = effect->unk_60.y * effect->scale1; - effect->vel.z = effect->unk_60.z * effect->scale1; +void Katina_LaserEnergyParticlesUpdate(Effect358* this) { + this->vel.x = this->unk_60.x * this->scale1; + this->vel.y = this->unk_60.y * this->scale1; + this->vel.z = this->unk_60.z * this->scale1; - Math_SmoothStepToF(&effect->scale1, 1.0f, 1.0f, 0.02f, 0.0f); + Math_SmoothStepToF(&this->scale1, 1.0f, 1.0f, 0.02f, 0.0f); - if (effect->unk_44 < 253) { - effect->unk_44 += 3; + if (this->unk_44 < 253) { + this->unk_44 += 3; } - if ((fabsf(effect->obj.pos.x - gBosses[1].obj.pos.x) <= 30.0f) && - (fabsf(effect->obj.pos.z - gBosses[1].obj.pos.z) <= 30.0f)) { - Object_Kill(&effect->obj, effect->sfxSource); + if ((fabsf(this->obj.pos.x - gBosses[KA_BOSS_MOTHERSHIP].obj.pos.x) <= 30.0f) && + (fabsf(this->obj.pos.z - gBosses[KA_BOSS_MOTHERSHIP].obj.pos.z) <= 30.0f)) { + Object_Kill(&this->obj, this->sfxSource); } } -void Katina_80192A68(Effect* effect) { +void Katina_LaserEnergyParticlesDraw(Effect358* this) { RCP_SetupDL(&gMasterDisp, 67); - gDPSetPrimColor(gMasterDisp++, 0, 0, 48, 48, 255, effect->unk_44); - gDPSetEnvColor(gMasterDisp++, 0, 0, 0, effect->unk_44); + gDPSetPrimColor(gMasterDisp++, 0, 0, 48, 48, 255, this->unk_44); + gDPSetEnvColor(gMasterDisp++, 0, 0, 0, this->unk_44); Matrix_Scale(gGfxMatrix, 0.4f, 0.4f, 0.4f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -127,45 +257,54 @@ void Katina_80192A68(Effect* effect) { RCP_SetupDL(&gMasterDisp, 64); } -void Katina_80192B4C(Effect* effect, f32 x, f32 y, f32 z, f32 xVel, f32 yVel, f32 zVel, f32 scale) { - Effect_Initialize(effect); +// Explosion/Fire effect with smoke. +void Katina_FireSmokeEffectSetup(EffectFireSmoke* this, f32 x, f32 y, f32 z, f32 xVel, f32 yVel, f32 zVel, f32 scale) { + Effect_Initialize(this); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_339; + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_FIRE_SMOKE; - effect->obj.pos.x = x; - effect->obj.pos.y = y; - effect->obj.pos.z = z; + this->obj.pos.x = x; + this->obj.pos.y = y; + this->obj.pos.z = z; - effect->vel.x = xVel; - effect->vel.y = yVel; - effect->vel.z = zVel; + this->vel.x = xVel; + this->vel.y = yVel; + this->vel.z = zVel; - effect->scale2 = scale; - effect->scale1 = 0.5f; - effect->unk_4C = 2; - effect->obj.rot.z = RAND_FLOAT(360.0f); - Object_SetInfo(&effect->info, effect->obj.id); - effect->unk_44 = 230; + this->scale2 = scale; + this->scale1 = 0.5f; + + this->unk_4C = 2; + this->obj.rot.z = RAND_FLOAT(360.0f); + + Object_SetInfo(&this->info, this->obj.id); + + this->unk_44 = 230; } -void Katina_80192C08(f32 x, f32 y, f32 z, f32 xVel, f32 yVel, f32 zVel, f32 scale) { +// Explosion/Fire effect with smoke. +void Katina_FireSmokeEffectSpawn(f32 x, f32 y, f32 z, f32 xVel, f32 yVel, f32 zVel, f32 scale) { s32 i; for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { - Katina_80192B4C(&gEffects[i], x, y, z, xVel, yVel, zVel, scale); + Katina_FireSmokeEffectSetup(&gEffects[i], x, y, z, xVel, yVel, zVel, scale); break; } } } -void Katina_80192C8C(void) { - Actor* actor = &gActors[4]; +/** + * Start cutscene where Bill is seen chasing an enemy + * while one of his teammates defeats it. + */ +void Katina_StartCutsceneUpdate(void) { + ActorCutscene* actor = &gActors[4]; s32 i; Vec3f dest; - Matrix_RotateY(gCalcMatrix, -0.7853982f, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, -(M_PI / 4), MTXF_NEW); for (i = 0; i < 3; i++, actor++) { if (actor->obj.status == OBJ_FREE) { @@ -180,7 +319,7 @@ void Katina_80192C8C(void) { actor->vel.z = dest.z; actor->unk_0B6 = D_i4_8019F15C[i]; actor->unk_0C9 = 1; - actor->iwork[11] = 1; + actor->iwork[KA_ACTOR_IWORK_11] = 1; Object_SetInfo(&actor->info, actor->obj.id); AUDIO_PLAY_SFX(0x31000011, actor->sfxSource, 4); } @@ -215,13 +354,16 @@ void Katina_LevelStart(Player* player) { case 0: gCsFrameCount = 0; - Katina_80192C8C(); + + Katina_StartCutsceneUpdate(); + gCsCamEyeX = 3535.0f; gCsCamEyeY = 500.0f; gCsCamEyeZ = 3535.0f; gCsCamAtX = gActors[4].obj.pos.x; gCsCamAtY = gActors[4].obj.pos.y; gCsCamAtZ = gActors[4].obj.pos.z; + player->csState = 11; D_ctx_80177A48[0] = 1.0f; break; @@ -230,9 +372,11 @@ void Katina_LevelStart(Player* player) { gCsCamAtX = gActors[4].obj.pos.x; gCsCamAtY = gActors[4].obj.pos.y; gCsCamAtZ = gActors[4].obj.pos.z; + gActors[4].obj.rot.z -= 0.2f; gActors[5].obj.rot.z += 0.3f; gActors[6].obj.rot.z += 0.7f; + if (gCsFrameCount == 100) { gCsFrameCount = 80; player->csState = 12; @@ -243,6 +387,7 @@ void Katina_LevelStart(Player* player) { gActors[4].vel.y += 0.3f; gActors[4].vel.z += 0.7f; gActors[4].obj.rot.z -= 1.0f; + if (gCsFrameCount == 120) { ActorAllRange_SpawnTeam(); player->csState = 13; @@ -250,7 +395,8 @@ void Katina_LevelStart(Player* player) { player->pos.y = 1300.0f; player->pos.z = 10000.0f; player->rot.x = -10.0f; - for (i = 1, actor = &gActors[1]; i < 4; i++, actor++) { + + for (i = 1, actor = &gActors[1]; i <= 3; i++, actor++) { actor->obj.pos.x = D_i4_8019F168[i - 1].x + player->pos.x; actor->obj.pos.y = D_i4_8019F168[i - 1].y + player->pos.y; actor->obj.pos.z = D_i4_8019F168[i - 1].z + player->pos.z; @@ -268,23 +414,29 @@ void Katina_LevelStart(Player* player) { player->cam.at.z = gCsCamAtZ = player->pos.z; player->cam.eye.x = gCsCamEyeX = 100.0f; player->cam.eye.z = gCsCamEyeZ = 7000.0f; + if (gCsFrameCount == 240) { Object_Kill(&gActors[4].obj, gActors[4].sfxSource); Object_Kill(&gActors[6].obj, gActors[6].sfxSource); player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_014 = 0.0001f; + AUDIO_PLAY_BGM(gBgmSeqId); + gLevelStartStatusScreenTimer = 80; - for (actor = &gActors[1], i = 1; i < 4; i += 1, actor++) { + + for (actor = &gActors[1], i = 1; i <= 3; i++, actor++) { actor->timer_0BC = 0; } gAllRangeEventTimer = -610; } break; } + src.x = 0.0f; src.y = 0.0f; src.z = 100.0f; + switch (gCsFrameCount) { case 15: Radio_PlayMessage(gMsg_ID_18000, RCID_BILL); @@ -321,6 +473,7 @@ void Katina_LevelStart(Player* player) { for (j = 0; j < 10; j++) { func_effect_800794CC(gActors[5].obj.pos.x, gActors[5].obj.pos.y, gActors[5].obj.pos.z, 1.0f); } + func_effect_8007A6F0(&gActors[5].obj.pos, 0x2903B009); break; @@ -328,20 +481,27 @@ void Katina_LevelStart(Player* player) { Object_Kill(&gActors[5].obj, gActors[5].sfxSource); break; } + Matrix_RotateY(gCalcMatrix, (player->rot.y + player->yRot_114 + 180.0f) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -(player->rot.x * M_DTOR), MTXF_APPLY); + src.x = 0; src.y = 0.0f; src.z = player->baseSpeed; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + player->vel.x = dest.x; player->vel.z = dest.z; player->vel.y = dest.y; + player->pos.x += player->vel.x; player->pos.y += player->vel.y; player->pos.z += player->vel.z; + player->trueZpos = player->pos.z; player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0.0f); @@ -350,34 +510,36 @@ void Katina_LevelStart(Player* player) { Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0.0f); } -void Katina_80193718(Boss* boss) { +void Katina_BaseUpdate(Frontlinebase* this) { s32 i; f32 posX; Vec3f src; Vec3f dest; Actor* actor; - switch (boss->state) { - case 0: + switch (this->state) { + case KA_BOSS_BASE_IDLE: break; - case 1: - boss->timer_050 = 4; - boss->state++; - func_effect_8007B344(boss->obj.pos.x, boss->obj.pos.y + 250.0f, boss->obj.pos.z + 600.0f, 71.0f, 5); + case KA_BASE_STATE_1: + this->timer_050 = 4; + this->state++; + func_effect_8007B344(this->obj.pos.x, this->obj.pos.y + 250.0f, this->obj.pos.z + 600.0f, 71.0f, 5); gCameraShake = 25; gLight1R = 255; gLight1G = 0; gLight1B = 0; - case 2: - if (boss->timer_050 == 1) { + case KA_BASE_STATE_2: + if (this->timer_050 == 1) { src.x = 0.0f; src.y = 0.0f; src.z = 500.0f; + for (posX = 50.0f, i = 0; posX < 600.0f; i++) { Matrix_RotateY(gCalcMatrix, i * 13.0f * M_DTOR, MTXF_NEW); Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + if (dest.z > 0.0f) { func_effect_8007953C(dest.x, posX, dest.z, 1.3f); posX += 6.25f; @@ -385,77 +547,87 @@ void Katina_80193718(Boss* boss) { } } - for (actor = &gActors[10], i = 10; i < ARRAY_COUNT(gActors); i++, actor++) { + // Kill all active enemy and ally actors + for (actor = &gActors[AI360_10], i = 10; i < ARRAY_COUNT(gActors); i++, actor++) { if (actor->obj.status == OBJ_ACTIVE) { actor->obj.status = OBJ_DYING; actor->timer_0BC = 30; } } } + for (i = 0; i < 1; i++) { - Katina_80192C08(RAND_FLOAT_CENTERED(700.0f) + boss->obj.pos.x, - RAND_FLOAT_CENTERED(400.0f) + (boss->obj.pos.y + 200.0f), - RAND_FLOAT_CENTERED(700.0f) + boss->obj.pos.z, RAND_FLOAT_CENTERED(50.0f), - RAND_FLOAT(40.0f) + 30.0f, RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT(10.0f) + 10.0f); + Katina_FireSmokeEffectSpawn(RAND_FLOAT_CENTERED(700.0f) + this->obj.pos.x, + RAND_FLOAT_CENTERED(400.0f) + (this->obj.pos.y + 200.0f), + RAND_FLOAT_CENTERED(700.0f) + this->obj.pos.z, RAND_FLOAT_CENTERED(50.0f), + RAND_FLOAT(40.0f) + 30.0f, RAND_FLOAT_CENTERED(50.0f), + RAND_FLOAT(10.0f) + 10.0f); } break; } - if (boss->dmgType != DMG_NONE) { - boss->dmgType = DMG_NONE; - AUDIO_PLAY_SFX(0x29121007, boss->sfxSource, 4); + + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + AUDIO_PLAY_SFX(0x29121007, this->sfxSource, 4); } } -void Katina_80193B1C(Boss* boss) { +void Katina_Base_Draw(Frontlinebase* this) { gSPFogPosition(gMasterDisp++, gFogNear, 1002); Matrix_Translate(gGfxMatrix, 0.0f, 20.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - if (boss->state == 0) { - gSPDisplayList(gMasterDisp++, D_KA_600BAF0); + + if (this->state == KA_BOSS_BASE_IDLE) { + gSPDisplayList(gMasterDisp++, aKaFLBaseDL); } else { RCP_SetupDL(&gMasterDisp, 57); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - gSPDisplayList(gMasterDisp++, D_KA_600C4E0); + gSPDisplayList(gMasterDisp++, aKaFLBaseDestroyedDL); } } -void Katina_Boss316_Init(Boss316* this) { - this->swork[10] = 100; - this->swork[11] = 100; - this->swork[12] = 100; - this->swork[13] = 100; - this->swork[14] = 400; - this->fwork[9] = 850.0f; - this->fwork[4] = 850.0f; +void Katina_BossSetup(Saucerer* this) { + this->swork[BOSS_HATCH_1_HP] = 100; + this->swork[BOSS_HATCH_2_HP] = 100; + this->swork[BOSS_HATCH_3_HP] = 100; + this->swork[BOSS_HATCH_4_HP] = 100; + this->swork[BOSS_CORE_HP] = 400; + this->fwork[BOSS_CORE_TARGET_LEVEL] = 850.0f; + this->fwork[BOSS_CORE_LEVEL] = 850.0f; this->vwork[0].y = 1000.0f; } -void Katina_80193CE4(Boss* boss, s32 idx) { +void Katina_Hatch_Destroy(Saucerer* this, s32 hatchIdx) { s32 i; Vec3f pos; - func_effect_8007D2C8(boss->obj.pos.x + (boss->vwork[idx + 1].x * 1.3f), - boss->obj.pos.y + (boss->vwork[idx + 1].y * 1.3f), - boss->obj.pos.z + (boss->vwork[idx + 1].z * 1.3f), 15.0f); - boss->swork[idx + 5] = 60; + func_effect_8007D2C8(this->obj.pos.x + (this->vwork[hatchIdx + 1].x * 1.3f), + this->obj.pos.y + (this->vwork[hatchIdx + 1].y * 1.3f), + this->obj.pos.z + (this->vwork[hatchIdx + 1].z * 1.3f), 15.0f); + this->swork[hatchIdx + 5] = 60; for (i = 0; i < 20; i++) { - func_effect_800794CC(boss->obj.pos.x + RAND_FLOAT_CENTERED(300.0f) + (boss->vwork[idx + 1].x * 1.3f), - boss->obj.pos.y + RAND_FLOAT_CENTERED(300.0f) + (boss->vwork[idx + 1].y * 1.3f), - boss->obj.pos.z + RAND_FLOAT_CENTERED(300.0f) + (boss->vwork[idx + 1].z * 1.3f), 1.55f); + func_effect_800794CC(this->obj.pos.x + RAND_FLOAT_CENTERED(300.0f) + (this->vwork[hatchIdx + 1].x * 1.3f), + this->obj.pos.y + RAND_FLOAT_CENTERED(300.0f) + (this->vwork[hatchIdx + 1].y * 1.3f), + this->obj.pos.z + RAND_FLOAT_CENTERED(300.0f) + (this->vwork[hatchIdx + 1].z * 1.3f), + 1.55f); } - pos.x = boss->obj.pos.x + (boss->vwork[idx + 1].x * 1.3f); - pos.y = boss->obj.pos.y + (boss->vwork[idx + 1].y * 1.3f); - pos.z = boss->obj.pos.z + (boss->vwork[idx + 1].z * 1.3f); + pos.x = this->obj.pos.x + (this->vwork[hatchIdx + 1].x * 1.3f); + pos.y = this->obj.pos.y + (this->vwork[hatchIdx + 1].y * 1.3f); + pos.z = this->obj.pos.z + (this->vwork[hatchIdx + 1].z * 1.3f); + func_effect_8007A6F0(&pos, 0x2903B009); - boss->swork[15] += 1; + + this->swork[BOSS_HATCH_DESTROY_COUNT]++; + BonusText_Display(pos.x, pos.y - 300.0f, pos.z, 5); + gHitCount += 6; D_ctx_80177850 = 15; } -void Katina_80193EF0(Boss* boss) { +void Katina_BossHandleDamage(Saucerer* this) { s32 i; s32 pad; Vec3f src; @@ -463,28 +635,31 @@ void Katina_80193EF0(Boss* boss) { Vec3f sfxSource; f32 y; - if (boss->dmgType != DMG_NONE) { - boss->dmgType = DMG_NONE; + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) { return; } - switch (boss->dmgPart) { + switch (this->dmgPart) { case 0: case 1: case 2: case 3: - if (boss->swork[10 + boss->dmgPart] > 0) { - boss->swork[00 + boss->dmgPart] = 20; - boss->swork[10 + boss->dmgPart] -= boss->damage; - sfxSource.x = (boss->vwork[1 + boss->dmgPart].x * 1.3f) + boss->obj.pos.x; - sfxSource.y = (boss->vwork[1 + boss->dmgPart].y * 1.3f) + boss->obj.pos.y; - sfxSource.z = (boss->vwork[1 + boss->dmgPart].z * 1.3f) + boss->obj.pos.z; + if (this->swork[10 + this->dmgPart] > 0) { + this->swork[00 + this->dmgPart] = 20; + this->swork[10 + this->dmgPart] -= this->damage; + + sfxSource.x = (this->vwork[1 + this->dmgPart].x * 1.3f) + this->obj.pos.x; + sfxSource.y = (this->vwork[1 + this->dmgPart].y * 1.3f) + this->obj.pos.y; + sfxSource.z = (this->vwork[1 + this->dmgPart].z * 1.3f) + this->obj.pos.z; + func_effect_8007A6F0(&sfxSource, 0x29034003); - if (boss->swork[10 + boss->dmgPart] <= 0) { - boss->swork[10 + boss->dmgPart] = 0; - Katina_80193CE4(boss, boss->dmgPart); + + if (this->swork[10 + this->dmgPart] <= 0) { + this->swork[10 + this->dmgPart] = 0; + Katina_Hatch_Destroy(this, this->dmgPart); } } break; @@ -493,20 +668,24 @@ void Katina_80193EF0(Boss* boss) { case 5: case 6: case 7: - if ((boss->swork[14] > 0) && (boss->state > 10)) { - boss->swork[4] = 20; - boss->swork[14] = boss->swork[14] - boss->damage; + if ((this->swork[BOSS_CORE_HP] > 0) && (this->state > 10)) { + this->swork[BOSS_CORE_FLASH_TIMER] = 20; + this->swork[BOSS_CORE_HP] -= this->damage; - if (boss->swork[14] < 100) { - func_effect_8007A6F0(&boss->obj.pos, 0x2943500F); + if (this->swork[BOSS_CORE_HP] < 100) { + func_effect_8007A6F0(&this->obj.pos, 0x2943500F); } else { - func_effect_8007A6F0(&boss->obj.pos, 0x29034003); + func_effect_8007A6F0(&this->obj.pos, 0x29034003); } - if (boss->swork[14] <= 0) { - func_effect_8007D2C8(boss->obj.pos.x, boss->obj.pos.y - 1000.0f, boss->obj.pos.z, 15.0f); + if (this->swork[BOSS_CORE_HP] <= 0) { + // OBJ_EFFECT_FIRE_SMOKE + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y - 1000.0f, this->obj.pos.z, 15.0f); + y = 0.0f; - boss->swork[9] = 80; + + this->swork[BOSS_SWORK_9] = 80; + src.x = 0.0f; src.y = 0.0f; src.z = 50.0f; @@ -514,19 +693,29 @@ void Katina_80193EF0(Boss* boss) { for (i = 0; i < 130; i++, y += 5.0f, src.z += 1.4f) { Matrix_RotateY(gCalcMatrix, i * 35.0f * M_DTOR, MTXF_NEW); Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - func_effect_800794CC(boss->obj.pos.x + dest.x, boss->obj.pos.y - 1200.0f + y, - boss->obj.pos.z + dest.z, 1.6f); + + // Broken pieces of the core + // OBJ_EFFECT_357 + func_effect_800794CC(this->obj.pos.x + dest.x, this->obj.pos.y - 1200.0f + y, + this->obj.pos.z + dest.z, 1.6f); } - AUDIO_PLAY_SFX(0x2940D09A, boss->sfxSource, 4); + + AUDIO_PLAY_SFX(0x2940D09A, this->sfxSource, 4); + gScreenFlashTimer = 8; - boss->state = 20; - boss->timer_050 = 50; + this->state = 20; + this->timer_050 = 50; + SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); + Radio_PlayMessage(gMsg_ID_18066, RCID_BILL); - boss->obj.pos.y -= 1000.0f; - Boss_AwardBonus(boss); - boss->obj.pos.y += 1000.0f; + + this->obj.pos.y -= 1000.0f; + + Boss_AwardBonus(this); + + this->obj.pos.y += 1000.0f; } } break; @@ -536,90 +725,104 @@ void Katina_80193EF0(Boss* boss) { if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) { if ((gGameFrameCount % 16) == 0) { for (i = 0; i < 4; i++) { - if ((boss->swork[10 + i] <= 0) && (Rand_ZeroOne() < 0.2f)) { - func_effect_8007BFFC((boss->vwork[1 + i].x * 1.3f) + boss->obj.pos.x, - (boss->vwork[1 + i].y * 1.3f) + boss->obj.pos.y, - (boss->vwork[1 + i].z * 1.3f) + boss->obj.pos.z, boss->vel.x, boss->vel.y, - boss->vel.z, 7.0f, 5); + if ((this->swork[10 + i] <= 0) && (Rand_ZeroOne() < 0.2f)) { + func_effect_8007BFFC((this->vwork[1 + i].x * 1.3f) + this->obj.pos.x, + (this->vwork[1 + i].y * 1.3f) + this->obj.pos.y, + (this->vwork[1 + i].z * 1.3f) + this->obj.pos.z, this->vel.x, this->vel.y, + this->vel.z, 7.0f, 5); } } } } for (i = 0; i < 5; i++) { - if (boss->swork[5 + i] != 0) { - boss->swork[5 + i]--; + if (this->swork[5 + i] != 0) { + this->swork[5 + i]--; if (i < 4) { - Katina_80192C08(boss->vwork[1 + i].x * 1.3f + boss->obj.pos.x, - boss->vwork[1 + i].y * 1.1f + boss->obj.pos.y, - boss->vwork[1 + i].z * 1.3f + boss->obj.pos.z, boss->vwork[1 + i].x * 0.05f, - boss->vwork[1 + i].y * 0.05f, boss->vwork[1 + i].z * 0.05f, 15.0f); + Katina_FireSmokeEffectSpawn(this->vwork[1 + i].x * 1.3f + this->obj.pos.x, + this->vwork[1 + i].y * 1.1f + this->obj.pos.y, + this->vwork[1 + i].z * 1.3f + this->obj.pos.z, this->vwork[1 + i].x * 0.05f, + this->vwork[1 + i].y * 0.05f, this->vwork[1 + i].z * 0.05f, 15.0f); } else { - Katina_80192C08(boss->obj.pos.x, boss->obj.pos.y - 700.0f, boss->obj.pos.z, 0.0f, -40.0f, 0.0f, 10.0f); + Katina_FireSmokeEffectSpawn(this->obj.pos.x, this->obj.pos.y - 700.0f, this->obj.pos.z, 0.0f, -40.0f, + 0.0f, 10.0f); } } } } -void Katina_80194458(Boss* boss, Vec3f* pos, f32 arg2) { +void Katina_BossSpawnEnemies(Saucerer* this, Vec3f* pos, f32 arg2) { s32 i; - Actor* actor = &gActors[20]; + ActorAllRange* actor = &gActors[20]; for (i = 10; i < 49; i++, actor++) { if (actor->obj.status == OBJ_FREE) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; actor->obj.id = OBJ_ACTOR_ALLRANGE; - actor->obj.pos.x = boss->obj.pos.x + pos->x; - actor->obj.pos.y = boss->obj.pos.y + pos->y; - actor->obj.pos.z = boss->obj.pos.z + pos->z; + + actor->obj.pos.x = this->obj.pos.x + pos->x; + actor->obj.pos.y = this->obj.pos.y + pos->y; + actor->obj.pos.z = this->obj.pos.z + pos->z; + actor->state = 1; actor->timer_0BC = 20; actor->unk_0F4.y = arg2; actor->unk_0F4.x = -30.0f; + actor->aiType = i + AI360_10; actor->unk_0B6 = D_i4_8019F198[i - 10]; - actor->aiIndex = D_i4_8019F1C0[i - 10]; + actor->aiIndex = sEnemySpawnTargets[i - 10]; + actor->health = 24; if (actor->unk_0B6 >= 2) { actor->health = 1000; } + actor->unk_0C9 = 1; + if (D_i4_801A0540 < 9600) { actor->itemDrop = DROP_SILVER_RING_10p; } + actor->timer_0C2 = 30; actor->timer_0C4 = 400; + Object_SetInfo(&actor->info, actor->obj.id); + AUDIO_PLAY_SFX(0x2903305F, actor->sfxSource, 4); - actor->info.action = (ObjectFunc) Katina_80198AA0; - actor->info.draw = (ObjectFunc) Katina_801995B4; + + actor->info.action = (ObjectFunc) Katina_EnemyUpdate; + actor->info.draw = (ObjectFunc) Katina_EnemyDraw; break; } } } -void Katina_801945FC(Boss* boss) { +/** + * Sets the angle for the enemies coming out of the mothership + */ +void Katina_SetOutcomingEnemyAngle(Saucerer* this) { f32 angle; f32 distY; s32 i; for (i = 0, angle = 360.0f; i < 4; i++) { - if (boss->swork[i + 10] > 0) { - distY = boss->obj.rot.y + angle; + if (this->swork[i + BOSS_HATCH_1_HP] > 0) { + distY = this->obj.rot.y + angle; if (distY > 360.0f) { distY -= 360.0f; } - Katina_80194458(boss, &boss->vwork[i + 1], distY); + Katina_BossSpawnEnemies(this, &this->vwork[i + 1], distY); } angle -= 90.0f; } } -void Katina_801946C4(Boss* boss) { +void Katina_BossUpdate(Saucerer* this) { s32 i; - s32 rot_count; - s32 en_count; + s32 rotCount; + s32 enemyCount; s32 pad[2]; f32 angle; f32 scale; @@ -630,110 +833,152 @@ void Katina_801946C4(Boss* boss) { gBossFrameCount++; - en_count = 0; + enemyCount = 0; + for (i = 10, actor = &gActors[i]; i < ARRAY_COUNT(gActors); i++, actor++) { - if (actor->obj.status == OBJ_ACTIVE && actor->unk_0B6 == 0) { - en_count++; + if ((actor->obj.status == OBJ_ACTIVE) && (actor->unk_0B6 == 0)) { + enemyCount++; } } - if (boss->swork[16] != 0) { - boss->swork[16]--; + if (this->swork[BOSS_CORE_TIMER] != 0) { + this->swork[BOSS_CORE_TIMER]--; } - if ((((boss->swork[10] <= 0) && (boss->swork[11] <= 0) && (boss->swork[12] <= 0) && (boss->swork[13] <= 0)) || - (boss->swork[16] == 1)) && - (boss->state < 10)) { - boss->state = 10; - boss->timer_050 = 50; + /** + * Summon core if all hatches are destroyed or after 3 minutes from mothership appearance. + */ + if ((((this->swork[BOSS_HATCH_1_HP] <= 0) && (this->swork[BOSS_HATCH_2_HP] <= 0) && + (this->swork[BOSS_HATCH_3_HP] <= 0) && (this->swork[BOSS_HATCH_4_HP] <= 0)) || + (this->swork[BOSS_CORE_TIMER] == 1)) && + (this->state < 10)) { + this->state = 10; + this->timer_050 = 50; } - if (boss->timer_054 == 1) { + if (this->timer_054 == 1) { Radio_PlayMessage(gMsg_ID_18040, RCID_BILL); } - switch (boss->state) { + switch (this->state) { case 0: + /** + * Send Mothership whether you killed 10 enemies or after 2 minutes of gameplay + */ if (((gHitCount >= 10) || (gAllRangeEventTimer > 3840))) { if ((D_edisplay_801615D0.y < 0.0f)) { - boss->state = 1; - boss->vwork[0].y = 2000.0f; - boss->unk_05E = 1; - AUDIO_PLAY_SFX(0x11000011, boss->sfxSource, 0); + this->state = 1; + + this->vwork[0].y = 2000.0f; + + this->unk_05E = 1; + + AUDIO_PLAY_SFX(0x11000011, this->sfxSource, 0); + D_i4_801A0548 = 100.0f; D_i4_801A0544 = 100.0f; D_i4_801A0550 = 70.0f; D_i4_801A054C = 70.0f; D_i4_801A0558 = 50.0f; D_i4_801A0554 = 50.0f; - boss->fwork[12] = 0.4f; - boss->fwork[10] = 10.0f; + + this->fwork[BOSS_Y_ROT_SPEED_TARGET] = 0.4f; + this->fwork[BOSS_MOVEMENT_SPEED] = 10.0f; + Radio_PlayMessage(gMsg_ID_18030, RCID_BILL); - AUDIO_PLAY_SFX(0x11037025, boss->sfxSource, 0); + + AUDIO_PLAY_SFX(0x11037025, this->sfxSource, 0); } } break; + /** + * Wait for mothership to aproach the base to start cutscene. + */ case 1: if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { - if (boss->obj.pos.z < 4500.0f) { - boss->state++; + if (this->obj.pos.z < 4500.0f) { + this->state++; + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_STANDBY; + gPlayer[0].cam.eye.x = -900.0f; gPlayer[0].cam.eye.y = 100.0f; gPlayer[0].cam.eye.z = 1400.0f; + gPlayer[0].cam.at.x = -730.0f; gPlayer[0].cam.at.y = 130.0f; gPlayer[0].cam.at.z = 1160.0f; + gPlayer[0].camRoll = 0.0f; - boss->obj.pos.x = -4500.0f; - boss->obj.pos.z = 4500.0f; - boss->timer_050 = 500; - boss->fwork[10] = 60.0f; + + this->obj.pos.x = -4500.0f; + this->obj.pos.z = 4500.0f; + + this->timer_050 = 500; + this->fwork[BOSS_MOVEMENT_SPEED] = 60.0f; + + // Checkpoint reached gAllRangeCheckpoint = 1; gSavedHitCount = gHitCount; for (i = TEAM_ID_FALCO; i <= TEAM_ID_PEPPY; i++) { gSavedTeamShields[i] = gTeamShields[i]; } + SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 10); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 10); } } break; + /** + * Cutscene: Close up + */ case 2: gPlayer[0].cam.at.y += 0.2f; + Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 30.0f, 1.0f, 1.65f, 0.0f); - if (boss->timer_050 == 460) { + + if (this->timer_050 == 460) { D_i4_801A0548 = 10.0f; D_i4_801A0550 = 7.0f; D_i4_801A0558 = 5.0f; } + Math_SmoothStepToF(&D_i4_801A0544, D_i4_801A0548, 1.0f, 4.0f, 0); Math_SmoothStepToF(&D_i4_801A054C, D_i4_801A0550, 1.0f, 2.8f, 0); Math_SmoothStepToF(&D_i4_801A0554, D_i4_801A0558, 1.0f, 2.0f, 0); + gLight1R = D_i4_801A0544; gLight1G = D_i4_801A054C; gLight1B = D_i4_801A0554; - if (boss->timer_050 == 170) { - boss->state++; + + if (this->timer_050 == 170) { + this->state++; + gPlayer[0].cam.eye.x = -2500.0f; gPlayer[0].cam.eye.y = 250.0f; gPlayer[0].cam.eye.z = 2500.0f; gPlayer[0].cam.at.x = 0.0f; gPlayer[0].cam.at.y = 1000.0f; gPlayer[0].cam.at.z = 0.0f; - boss->unk_05E = 0; - boss->obj.pos.x = -500.0f; - boss->obj.pos.z = 500.0f; + + this->unk_05E = 0; + + this->obj.pos.x = -500.0f; + this->obj.pos.z = 500.0f; + gLight1R = 50; gLight1G = 35; gLight1B = 25; + SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); - boss->timer_050 = 80; - boss->fwork[12] = 0.0f; - boss->obj.rot.y = 217.0f; + + this->timer_050 = 80; + this->fwork[BOSS_Y_ROT_SPEED_TARGET] = 0.0f; + this->obj.rot.y = 217.0f; + for (i = 10; i < ARRAY_COUNT(gActors); i++) { if (gActors[i].unk_0B6 == 0) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); @@ -742,315 +987,409 @@ void Katina_801946C4(Boss* boss) { } break; + /** + * Cutscene: Open hatches. + */ case 3: - if (boss->timer_050 == 0) { - boss->state++; - boss->timer_050 = 60; - AUDIO_PLAY_SFX(0x1903203F, boss->sfxSource, 0); - boss->fwork[5] = 30.0f; - boss->fwork[6] = 30.0f; - boss->fwork[7] = 30.0f; - boss->fwork[8] = 30.0f; + if (this->timer_050 == 0) { + this->state++; + this->timer_050 = 60; + AUDIO_PLAY_SFX(0x1903203F, this->sfxSource, 0); + this->fwork[BOSS_HATCH_1_ANGLE_TARGET] = 30.0f; + this->fwork[BOSS_HATCH_2_ANGLE_TARGET] = 30.0f; + this->fwork[BOSS_HATCH_3_ANGLE_TARGET] = 30.0f; + this->fwork[BOSS_HATCH_4_ANGLE_TARGET] = 30.0f; } break; + /** + * Cutscene: Hatches opened completely. + */ case 4: - if (boss->timer_050 == 0) { - boss->state++; - boss->timer_050 = 100; - boss->timer_052 = 310; - AUDIO_PLAY_SFX(0x19034042, boss->sfxSource, 0); + if (this->timer_050 == 0) { + this->state++; + this->timer_050 = 100; + this->timer_052 = 310; + AUDIO_PLAY_SFX(0x19034042, this->sfxSource, 0); } break; + /** + * Cutscene: Boss music starts, enemies coming out of the mothership. + * Return control to the player after cutscene ends and close the hatches. + */ case 5: - if (boss->timer_050 == 1) { + if (this->timer_050 == 1) { AUDIO_PLAY_BGM(SEQ_ID_KA_BOSS | SEQ_FLAG); } - if ((boss->timer_050 == 0) && ((boss->timer_052 % 16) == 0)) { - Katina_801945FC(boss); + if ((this->timer_050 == 0) && ((this->timer_052 % 16) == 0)) { + Katina_SetOutcomingEnemyAngle(this); } - if (boss->timer_052 == 0) { - AUDIO_PLAY_SFX(0x19032040, boss->sfxSource, 0); - boss->state++; + if (this->timer_052 == 0) { + AUDIO_PLAY_SFX(0x19032040, this->sfxSource, 0); + + this->state++; + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ACTIVE; func_play_800B7184(&gPlayer[0], 1); } + gPlayer[0].unk_014 = 0.0f; - boss->fwork[5] = 0.0f; - boss->fwork[6] = 0.0f; - boss->fwork[7] = 0.0f; - boss->fwork[8] = 0.0f; - boss->fwork[12] = 0.4f; - boss->fwork[10] = 0.0f; + + // Close hatches. + this->fwork[BOSS_HATCH_1_ANGLE_TARGET] = 0.0f; + this->fwork[BOSS_HATCH_2_ANGLE_TARGET] = 0.0f; + this->fwork[BOSS_HATCH_3_ANGLE_TARGET] = 0.0f; + this->fwork[BOSS_HATCH_4_ANGLE_TARGET] = 0.0f; + this->fwork[BOSS_Y_ROT_SPEED_TARGET] = 0.4f; + this->fwork[BOSS_MOVEMENT_SPEED] = 0.0f; + Radio_PlayMessage(gMsg_ID_18035, RCID_FALCO); - boss->timer_052 = 70; - boss->timer_054 = 200; - boss->timer_056 = 1280; - boss->swork[16] = 5760; + + this->timer_052 = 70; + this->timer_054 = 200; + this->timer_056 = 1280; + + this->swork[BOSS_CORE_TIMER] = 5760; + gBossFrameCount = 0; + D_i4_801A0540 = 0; } break; + /** + * Open hatches for 10 seconds when there's less than 30 enemies + * or after 40 seconds have passed + */ case 6: - if (boss->timer_052 == 1) { - AUDIO_PLAY_SFX(0x19034042, boss->sfxSource, 0); + if (this->timer_052 == 1) { + AUDIO_PLAY_SFX(0x19034042, this->sfxSource, 0); } - if (boss->timer_050 == 0) { - boss->timer_050 = RAND_INT(100.0f) + 100; - boss->vwork[0].x = RAND_FLOAT_CENTERED(10000.0f); - boss->vwork[0].z = RAND_FLOAT_CENTERED(10000.0f); + if (this->timer_050 == 0) { + this->timer_050 = RAND_INT(100.0f) + 100; + this->vwork[0].x = RAND_FLOAT_CENTERED(10000.0f); + this->vwork[0].z = RAND_FLOAT_CENTERED(10000.0f); } - Math_SmoothStepToF(&boss->fwork[10], 30.0f, 0.1f, 0.5f, 0.0f); - if ((en_count < 30) || (boss->timer_056 == 0)) { - boss->state = 7; - boss->timer_050 = 300; - AUDIO_PLAY_SFX(0x1903203F, boss->sfxSource, 0); - boss->fwork[12] = 0.0f; - boss->fwork[8] = 30.0f; - boss->fwork[7] = 30.0f; - boss->fwork[6] = 30.0f; - boss->fwork[5] = 30.0f; + + Math_SmoothStepToF(&this->fwork[BOSS_MOVEMENT_SPEED], 30.0f, 0.1f, 0.5f, 0.0f); + + if ((enemyCount < 30) || (this->timer_056 == 0)) { + this->state = 7; + this->timer_050 = 300; + + AUDIO_PLAY_SFX(0x1903203F, this->sfxSource, 0); + + this->fwork[BOSS_Y_ROT_SPEED_TARGET] = 0.0f; + this->fwork[BOSS_HATCH_4_ANGLE_TARGET] = 30.0f; + this->fwork[BOSS_HATCH_3_ANGLE_TARGET] = 30.0f; + this->fwork[BOSS_HATCH_2_ANGLE_TARGET] = 30.0f; + this->fwork[BOSS_HATCH_1_ANGLE_TARGET] = 30.0f; + Radio_PlayMessage(gMsg_ID_18045, RCID_BILL); } break; + /** + * Send out more enemies. + * Close hatches after 10 seconds. + */ case 7: - Math_SmoothStepToF(&boss->fwork[10], 0.0f, 0.1f, 0.5f, 0.0f); - if ((boss->timer_050 < 200) && ((boss->timer_050 % 16) == 0)) { - Katina_801945FC(boss); + Math_SmoothStepToF(&this->fwork[10], 0.0f, 0.1f, 0.5f, 0.0f); + + if ((this->timer_050 < 200) && ((this->timer_050 % 16) == 0)) { + Katina_SetOutcomingEnemyAngle(this); } - if (boss->timer_050 == 240) { - AUDIO_PLAY_SFX(0x19034042, boss->sfxSource, 0); + if (this->timer_050 == 240) { + AUDIO_PLAY_SFX(0x19034042, this->sfxSource, 0); } - if (boss->timer_050 == 0) { - boss->state = 6; - boss->fwork[8] = 0.0f; - boss->fwork[7] = 0.0f; - boss->fwork[6] = 0.0f; - boss->fwork[5] = 0.0f; - boss->timer_056 = 1920; - boss->timer_052 = 70; - AUDIO_PLAY_SFX(0x19032040, boss->sfxSource, 0); + if (this->timer_050 == 0) { + this->state = 6; + this->fwork[BOSS_HATCH_4_ANGLE_TARGET] = 0.0f; + this->fwork[BOSS_HATCH_3_ANGLE_TARGET] = 0.0f; + this->fwork[BOSS_HATCH_2_ANGLE_TARGET] = 0.0f; + this->fwork[BOSS_HATCH_1_ANGLE_TARGET] = 0.0f; + this->timer_056 = 1920; + this->timer_052 = 70; + AUDIO_PLAY_SFX(0x19032040, this->sfxSource, 0); } break; + /** + * Start countdown and lower down core. + */ case 10: - if (boss->timer_050 == 0) { - boss->fwork[9] = 200.0f; - AUDIO_PLAY_SFX(0x19032041, boss->sfxSource, 0); - Audio_KillSfxBySourceAndId(boss->sfxSource, 0x11037025); - boss->state = 11; - boss->timer_050 = 100; + if (this->timer_050 == 0) { + this->fwork[BOSS_CORE_TARGET_LEVEL] = 200.0f; + AUDIO_PLAY_SFX(0x19032041, this->sfxSource, 0); + Audio_KillSfxBySourceAndId(this->sfxSource, 0x11037025); + this->state = 11; + this->timer_050 = 100; Radio_PlayMessage(gMsg_ID_18050, RCID_BILL); gAllRangeCountdownScale = 1.0f; - gShowAllRangeCountdown = 1; + gShowAllRangeCountdown = true; gAllRangeCountdown[0] = 1; gAllRangeCountdown[1] = 1; gAllRangeCountdown[2] = 30; } break; + /** + * Set a 1 minute timer for mothership attack. + */ case 11: - if (boss->timer_050 == 0) { - AUDIO_PLAY_SFX(0x19034042, boss->sfxSource, 0); - boss->state = 12; - boss->timer_050 = 1928; + if (this->timer_050 == 0) { + AUDIO_PLAY_SFX(0x19034042, this->sfxSource, 0); + this->state = 12; + this->timer_050 = 1928; Radio_PlayMessage(gMsg_ID_18055, RCID_BILL); - AUDIO_PLAY_SFX(0x11034043, boss->sfxSource, 0); + AUDIO_PLAY_SFX(0x11034043, this->sfxSource, 0); } break; + /** + * Start mothership attack after 13 seconds from Bill's warning + * Start cutscene for base destruction. + */ case 12: - if (boss->timer_050 == 400) { + if (this->timer_050 == 400) { Radio_PlayMessage(gMsg_ID_18065, RCID_BILL); } - boss->vwork[0].x = 0.0f; - boss->vwork[0].z = 0.0f; - Math_SmoothStepToF(&boss->fwork[10], 5.0f, 0.1f, 0.5f, 0.0f); - if (boss->timer_050 == 0 && - (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE || gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { - gShowAllRangeCountdown = 0; - boss->timer_050 = 1000; - boss->state = 15; - boss->obj.rot.y = 0.0f; - boss->obj.pos.y = 3500.0f; - boss->obj.pos.x = 0.0f; - boss->obj.pos.z = 0.0f; + this->vwork[0].x = 0.0f; + this->vwork[0].z = 0.0f; + + Math_SmoothStepToF(&this->fwork[BOSS_MOVEMENT_SPEED], 5.0f, 0.1f, 0.5f, 0.0f); + + if ((this->timer_050 == 0) && ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || + (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN))) { + gShowAllRangeCountdown = false; + this->timer_050 = 1000; + this->state = 15; + this->obj.rot.y = 0.0f; + + this->obj.pos.y = 3500.0f; + this->obj.pos.x = 0.0f; + this->obj.pos.z = 0.0f; + + this->fwork[BOSS_Y_ROT_SPEED_TARGET] = 0.0f; + this->fwork[BOSS_MOVEMENT_SPEED] = 0.0f; - boss->fwork[12] = 0.0f; - boss->fwork[10] = 0.0f; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_STANDBY; + gPlayer[0].camRoll = 0.0f; - gPlayer[0].cam.eye.x = boss->obj.pos.x; + + gPlayer[0].cam.eye.x = this->obj.pos.x; gPlayer[0].cam.eye.y = 600.0f; - gPlayer[0].cam.eye.z = boss->obj.pos.z + 5000.0f; - gPlayer[0].cam.at.x = boss->obj.pos.x; - gPlayer[0].cam.at.y = boss->obj.pos.y - 500.0f; - gPlayer[0].cam.at.z = boss->obj.pos.z; + gPlayer[0].cam.eye.z = this->obj.pos.z + 5000.0f; + + gPlayer[0].cam.at.x = this->obj.pos.x; + gPlayer[0].cam.at.y = this->obj.pos.y - 500.0f; + gPlayer[0].cam.at.z = this->obj.pos.z; } break; + /** + * Rotate mothership into fire position. + */ case 15: - if (boss->timer_050 == 700) { + if (this->timer_050 == 700) { Radio_PlayMessage(gMsg_ID_18070, RCID_BILL); } - if (boss->timer_050 == 580) { + if (this->timer_050 == 580) { Radio_PlayMessage(gMsg_ID_18075, RCID_FOX); } - if (boss->timer_050 == 500) { + if (this->timer_050 == 500) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].csState = 100; gPlayer[0].unk_234 = 0; gCsFrameCount = 5000; } - Math_SmoothStepToF(&boss->obj.pos.y, 3000.0f, 0.02f, 0.5f, 0.0f); - Math_SmoothStepToF(&boss->obj.rot.x, 180.0f, 0.02f, 0.3f, 0.0f); - Math_SmoothStepToF(&boss->fwork[13], 180.0f, 0.02f, 0.2f, 0.0f); - Math_SmoothStepToF(&gPlayer[0].cam.eye.z, boss->obj.pos.z + 8000.0f, 0.05f, 3.0f, 0.0f); - Math_SmoothStepToF(&gPlayer[0].cam.eye.y, boss->obj.pos.y - 1000.0f, 0.05f, 2.0f, 0.0f); - gPlayer[0].cam.at.y = boss->obj.pos.y - 500.0f; - boss->unk_05E = 0; - if (boss->timer_050 == 260) { - boss->obj.pos.y = 3000.0f; - boss->obj.rot.y = 0.0f; - boss->obj.rot.x = 180.0f; - boss->fwork[13] = 15.0f; + + Math_SmoothStepToF(&this->obj.pos.y, 3000.0f, 0.02f, 0.5f, 0.0f); + Math_SmoothStepToF(&this->obj.rot.x, 180.0f, 0.02f, 0.3f, 0.0f); + Math_SmoothStepToF(&this->fwork[BOSS_FWORK_13], 180.0f, 0.02f, 0.2f, 0.0f); + Math_SmoothStepToF(&gPlayer[0].cam.eye.z, this->obj.pos.z + 8000.0f, 0.05f, 3.0f, 0.0f); + Math_SmoothStepToF(&gPlayer[0].cam.eye.y, this->obj.pos.y - 1000.0f, 0.05f, 2.0f, 0.0f); + + gPlayer[0].cam.at.y = this->obj.pos.y - 500.0f; + + this->unk_05E = 0; + + if (this->timer_050 == 260) { + this->obj.pos.y = 3000.0f; + this->obj.rot.y = 0.0f; + this->obj.rot.x = 180.0f; + this->fwork[BOSS_FWORK_13] = 15.0f; + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_STANDBY; - gPlayer[0].cam.eye.x = boss->obj.pos.x; + gPlayer[0].cam.eye.x = this->obj.pos.x; gPlayer[0].cam.eye.y = 600.0f; - gPlayer[0].cam.eye.z = boss->obj.pos.z - 1500.0f; - gPlayer[0].cam.at.x = boss->obj.pos.x; - gPlayer[0].cam.at.y = boss->obj.pos.y - 300.0f; - gPlayer[0].cam.at.z = boss->obj.pos.z; - boss->state = 16; - boss->timer_050 = 130; - boss->timer_052 = 1000; + gPlayer[0].cam.eye.z = this->obj.pos.z - 1500.0f; + gPlayer[0].cam.at.x = this->obj.pos.x; + gPlayer[0].cam.at.y = this->obj.pos.y - 300.0f; + gPlayer[0].cam.at.z = this->obj.pos.z; + + this->state = 16; + this->timer_050 = 130; + this->timer_052 = 1000; + D_i4_801A0548 = 100.0f; D_i4_801A0544 = 100.0f; D_i4_801A0550 = 70.0f; D_i4_801A054C = 70.0f; D_i4_801A0558 = 50.0f; D_i4_801A0554 = 50.0f; - Audio_KillSfxBySourceAndId(boss->sfxSource, 0x11034043); - AUDIO_PLAY_SFX(0x19406044, boss->sfxSource, 0); + + Audio_KillSfxBySourceAndId(this->sfxSource, 0x11034043); + AUDIO_PLAY_SFX(0x19406044, this->sfxSource, 0); } break; + /** + * Cutscene: Close up, start mothership attack. + */ case 16: Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 30.0f, 1.0f, 1.6f, 0.0f); Math_SmoothStepToF(&gPlayer[0].cam.eye.z, 0.0f, 0.05f, 5.0f, 0.0f); - boss->fwork[13] += 0.1f; + this->fwork[BOSS_FWORK_13] += 0.1f; Math_SmoothStepToF(&gEnvLightyRot, 200.0f, 1.0f, 0.5f, 0.0f); + scale = 0.5f; + D_i4_801A0548 = 0.0f; D_i4_801A0550 = 100.0f; - rot_count = 0; D_i4_801A0558 = 255.0f; - if (boss->timer_050 == 0) { - rot_count = 4; - Math_SmoothStepToF(&boss->fwork[14], 10.0f, 0.02f, 0.05f, 0.0f); - } else if (boss->timer_050 < 40) { - rot_count = 2; - Math_SmoothStepToF(&boss->fwork[14], 10.0f, 0.02f, 0.05f, 0.0f); - } else if (boss->timer_050 < 80) { + + rotCount = 0; + + if (this->timer_050 == 0) { + rotCount = 4; + Math_SmoothStepToF(&this->fwork[BOSS_LASER_LIGHT_SCALE], 10.0f, 0.02f, 0.05f, 0.0f); + } else if (this->timer_050 < 40) { + rotCount = 2; + Math_SmoothStepToF(&this->fwork[BOSS_LASER_LIGHT_SCALE], 10.0f, 0.02f, 0.05f, 0.0f); + } else if (this->timer_050 < 80) { D_i4_801A0550 = 0.0f; - rot_count = 1; + rotCount = 1; scale = 3.0f; } + Math_SmoothStepToF(&D_i4_801A0544, D_i4_801A0548, 1.0f, scale, 0); Math_SmoothStepToF(&D_i4_801A054C, D_i4_801A0550, 1.0f, scale, 0); Math_SmoothStepToF(&D_i4_801A0554, D_i4_801A0558, 1.0f, scale, 0); - i = 0; + gLight1R = D_i4_801A0544; gLight1G = D_i4_801A054C; gLight1B = D_i4_801A0554; - for (i = 0; i < rot_count; i++) { + for (i = 0; i < rotCount; i++) { Matrix_RotateY(gCalcMatrix, RAND_FLOAT(2.0f) * M_PI, MTXF_NEW); src.x = 0.0f; src.y = 0.0f; src.z = RAND_FLOAT(400.0f) + 300.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - Katina_80192908(boss->obj.pos.x + dest.x, boss->obj.pos.y - 500.0f, boss->obj.pos.z + dest.z, - boss->obj.pos.x, boss->obj.pos.y - 500.0f, boss->obj.pos.z); + Katina_LaserEnergyParticlesSpawn(this->obj.pos.x + dest.x, this->obj.pos.y - 500.0f, + this->obj.pos.z + dest.z, this->obj.pos.x, this->obj.pos.y - 500.0f, + this->obj.pos.z); } - if ((boss->timer_052 == 700) || (boss->timer_052 == 697)) { + if ((this->timer_052 == 700) || (this->timer_052 == 697)) { i = gGameFrameCount % 64U; Object_Kill(&gEffects[i].obj, gEffects[i].sfxSource); - func_effect_8007B344(boss->obj.pos.x, boss->obj.pos.y - 600.0f, boss->obj.pos.z, 90.0f, 0); - AUDIO_PLAY_SFX(0x1140B045, boss->sfxSource, 0); + func_effect_8007B344(this->obj.pos.x, this->obj.pos.y - 600.0f, this->obj.pos.z, 90.0f, 0); + AUDIO_PLAY_SFX(0x1140B045, this->sfxSource, 0); } - if (boss->timer_052 == 690) { - boss->state = 17; + if (this->timer_052 == 690) { + this->state = 17; + for (i = 0; i < ARRAY_COUNT(gEffects); i++) { if (gEffects[i].obj.id == OBJ_EFFECT_358) { Object_Kill(&gEffects[i].obj, gEffects[i].sfxSource); } } - gPlayer[0].cam.eye.x = boss->obj.pos.x; + + gPlayer[0].cam.eye.x = this->obj.pos.x; gPlayer[0].cam.eye.y = 300.0f; - gPlayer[0].cam.eye.z = boss->obj.pos.z + 2000.0f; - gPlayer[0].cam.at.x = boss->obj.pos.x; + gPlayer[0].cam.eye.z = this->obj.pos.z + 2000.0f; + + gPlayer[0].cam.at.x = this->obj.pos.x; gPlayer[0].cam.at.y = 1500.0f; - gPlayer[0].cam.at.z = boss->obj.pos.z; + gPlayer[0].cam.at.z = this->obj.pos.z; + gEnvLightyRot = 60.0f; + gLight1R = 100; gLight1G = 70; gLight1B = 50; - boss->timer_050 = 10; - boss->fwork[14] = 20.0f; + + this->timer_050 = 10; + this->fwork[BOSS_LASER_LIGHT_SCALE] = 20.0f; } break; + /** + * Cutscene: Mothership fires laser to the base. + */ case 17: - boss->fwork[13] += 0.1f; + this->fwork[BOSS_FWORK_13] += 0.1f; + Math_SmoothStepToF(&gPlayer[0].cam.at.y, 525.0f, 0.3f, 50.0f, 0.0f); - Math_SmoothStepToF(&boss->fwork[15], 8.0f, 1.0f, 2.0f, 0.0f); - if (boss->timer_050 == 1) { - gBosses[0].state = 1; - boss->state = 18; - boss->timer_050 = 50; - AUDIO_PLAY_SFX(0x11038046, boss->sfxSource, 0); + Math_SmoothStepToF(&this->fwork[BOSS_LASER_LENGTH], 8.0f, 1.0f, 2.0f, 0.0f); + + if (this->timer_050 == 1) { + gBosses[KA_BOSS_BASE].state = 1; + this->state = 18; + this->timer_050 = 50; + AUDIO_PLAY_SFX(0x11038046, this->sfxSource, 0); } break; + /** + * Cutscene: Base is hit by mothership's laser. + */ case 18: Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 100.0f, 1.0f, 100.0f, 0.0f); Math_SmoothStepToF(&gPlayer[0].cam.at.y, 525.0f, 0.3f, 50.0f, 0.0f); - if (boss->timer_050 == 0) { + + if (this->timer_050 == 0) { gFillScreenAlphaTarget = 255; gFillScreenRed = 255; gFillScreenGreen = 255; gFillScreenBlue = 255; + if (gFillScreenAlpha == 255) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].csState = 2; gPlayer[0].unk_234 = 1; + gCsFrameCount = 200; + Audio_StopPlayerNoise(0); Audio_KillSfxBySource(&gPlayer[0].sfxSource[0]); + gPlayer[0].csTimer = 50; gPlayer[0].baseSpeed = 0.0f; gPlayer[0].yRot_114 = 0.0f; gPlayer[0].rot.z = gPlayer[0].rot.y = gPlayer[0].rot.x = gPlayer[0].xRot_120 = gPlayer[0].yRot_114; + Play_ClearObjectData(); + gEnvLightyRot = 60.0f; + gLight1R = 100; gLight1G = 70; gLight1B = 50; @@ -1058,208 +1397,237 @@ void Katina_801946C4(Boss* boss) { } break; + /** + * Mothership core destroyed, setup for MISSION_ACCOMPLISHED. + */ case 20: - gShowAllRangeCountdown = 0; - Math_SmoothStepToF(&boss->fwork[10], 0.0f, 0.1f, 3.0f, 0.0f); - if ((boss->timer_050 == 0) && ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || + gShowAllRangeCountdown = false; + + Math_SmoothStepToF(&this->fwork[BOSS_MOVEMENT_SPEED], 0.0f, 0.1f, 3.0f, 0.0f); + + if ((this->timer_050 == 0) && ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN))) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].csState = 0; gMissionStatus = MISSION_ACCOMPLISHED; - boss->obj.pos.z = 0.0f; - boss->health = -1; - boss->fwork[10] = 0.0f; - boss->state++; - boss->timer_050 = 1000; - boss->obj.rot.y = 30.0f; - boss->obj.pos.x = -4000.0f; - boss->unk_078.z = 7.0f; - AUDIO_PLAY_SFX(0x11404016, boss->sfxSource, 0); + this->obj.pos.z = 0.0f; + this->health = -1; + this->fwork[BOSS_MOVEMENT_SPEED] = 0.0f; + this->state++; + this->timer_050 = 1000; + this->obj.rot.y = 30.0f; + this->obj.pos.x = -4000.0f; + this->unk_078.z = 7.0f; + + AUDIO_PLAY_SFX(0x11404016, this->sfxSource, 0); + for (i = 0; i < ARRAY_COUNT(gEffects); i++) { Object_Kill(&gEffects[i].obj, gEffects[i].sfxSource); } } break; + /** + * Cutscene: Mothership falling to the ground. + */ case 21: - Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, boss->obj.rot.x * M_DTOR, MTXF_APPLY); - boss->obj.pos.z += boss->unk_078.z; - if (boss->timer_050 == 820) { - AUDIO_PLAY_SFX(0x19408047, boss->sfxSource, 0); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + + this->obj.pos.z += this->unk_078.z; + + if (this->timer_050 == 820) { + AUDIO_PLAY_SFX(0x19408047, this->sfxSource, 0); } - if (boss->timer_050 > 820) { - boss->obj.rot.x += 0.075f; - boss->gravity = 0.1f; - if (boss->vel.y < -10.0f) { - boss->vel.y = -10.0f; + if (this->timer_050 > 820) { + this->obj.rot.x += 0.075f; + this->gravity = 0.1f; + if (this->vel.y < -10.0f) { + this->vel.y = -10.0f; } src.x = RAND_FLOAT_CENTERED(3000.0f); src.y = -800.0f; src.z = RAND_FLOAT_CENTERED(3000.0f); Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - func_effect_800794CC(boss->obj.pos.x + dest.x, boss->obj.pos.y + dest.y, boss->obj.pos.z + dest.z, + func_effect_800794CC(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, 1.55f); } else { - boss->obj.rot.x -= 0.06f; - boss->vel.y = 0.0f; - boss->gravity = 0.0f; - Math_SmoothStepToF(&boss->unk_078.z, 0.0f, 1.0f, 1.0f, 0.0f); - Katina_80192C08( - boss->obj.pos.x + 2000.0f + RAND_FLOAT(500.0f), (boss->obj.pos.y - 500.0f) + RAND_FLOAT(500.0f), - boss->obj.pos.z + 600.0f + RAND_FLOAT(1000.0f), 0.0f, 20.0f, 0.0f, RAND_FLOAT(20.0f) + 15.0f); + this->obj.rot.x -= 0.06f; + this->vel.y = 0.0f; + this->gravity = 0.0f; + Math_SmoothStepToF(&this->unk_078.z, 0.0f, 1.0f, 1.0f, 0.0f); + Katina_FireSmokeEffectSpawn( + this->obj.pos.x + 2000.0f + RAND_FLOAT(500.0f), (this->obj.pos.y - 500.0f) + RAND_FLOAT(500.0f), + this->obj.pos.z + 600.0f + RAND_FLOAT(1000.0f), 0.0f, 20.0f, 0.0f, RAND_FLOAT(20.0f) + 15.0f); } - if (((gGameFrameCount % 2) != 0) || (boss->timer_050 > 850)) { + if (((gGameFrameCount % 2) != 0) || (this->timer_050 > 850)) { src.x = RAND_FLOAT_CENTERED(4000.0f); src.y = RAND_FLOAT_CENTERED(600.0f) + -300.0f; src.z = RAND_FLOAT_CENTERED(4000.0f); Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - Katina_80192C08(boss->obj.pos.x + dest.x, boss->obj.pos.y + dest.y, boss->obj.pos.z + dest.z, 0.0f, - 5.0f, 0.0f, RAND_FLOAT(15.0f) + 10.0f); + Katina_FireSmokeEffectSpawn(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, + this->obj.pos.z + dest.z, 0.0f, 5.0f, 0.0f, RAND_FLOAT(15.0f) + 10.0f); } break; } - if (boss->state != 0) { + + if (this->state != 0) { angle = 360.0f; + for (i = 0; i < 4; i++) { - Matrix_RotateY(gCalcMatrix, (boss->obj.rot.y + angle) * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, (this->obj.rot.y + angle) * M_DTOR, MTXF_NEW); src.x = 0.0f; src.y = -550.0f; src.z = 850.0f; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &boss->vwork[1 + i]); + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &this->vwork[1 + i]); angle -= 90.0f; } - Math_SmoothStepToF(&boss->fwork[11], boss->fwork[12], 0.1f, 0.01f, 0.0f); - boss->obj.rot.y += boss->fwork[11]; + Math_SmoothStepToF(&this->fwork[BOSS_Y_ROT_SPEED], this->fwork[BOSS_Y_ROT_SPEED_TARGET], 0.1f, 0.01f, 0.0f); + this->obj.rot.y += this->fwork[BOSS_Y_ROT_SPEED]; - if (boss->obj.rot.y > 360.0f) { - boss->obj.rot.y -= 360.0f; + if (this->obj.rot.y > 360.0f) { + this->obj.rot.y -= 360.0f; } - if (boss->obj.rot.y < 0.0f) { - boss->obj.rot.y += 360.0f; + if (this->obj.rot.y < 0.0f) { + this->obj.rot.y += 360.0f; } + gRadarMarks[64].status = 1; gRadarMarks[64].type = 101; - gRadarMarks[64].pos.x = boss->obj.pos.x; - gRadarMarks[64].pos.y = boss->obj.pos.y; - gRadarMarks[64].pos.z = boss->obj.pos.z; - gRadarMarks[64].yRot = boss->unk_078.y + 180.0f; - if (boss->state < 6) { - Math_SmoothStepToF(&boss->obj.pos.x, boss->vwork[0].x, 0.01f, boss->fwork[10], 0); - Math_SmoothStepToF(&boss->obj.pos.y, boss->vwork[0].y, 0.01f, boss->fwork[10], 0); - Math_SmoothStepToF(&boss->obj.pos.z, boss->vwork[0].z, 0.01f, boss->fwork[10], 0); + gRadarMarks[64].pos.x = this->obj.pos.x; + gRadarMarks[64].pos.y = this->obj.pos.y; + gRadarMarks[64].pos.z = this->obj.pos.z; + gRadarMarks[64].yRot = this->unk_078.y + 180.0f; + + if (this->state < 6) { + Math_SmoothStepToF(&this->obj.pos.x, this->vwork[0].x, 0.01f, this->fwork[BOSS_MOVEMENT_SPEED], 0); + Math_SmoothStepToF(&this->obj.pos.y, this->vwork[0].y, 0.01f, this->fwork[BOSS_MOVEMENT_SPEED], 0); + Math_SmoothStepToF(&this->obj.pos.z, this->vwork[0].z, 0.01f, this->fwork[BOSS_MOVEMENT_SPEED], 0); } else { Math_SmoothStepToAngle( - &boss->unk_078.y, - Math_RadToDeg(Math_Atan2F(boss->vwork[0].x - boss->obj.pos.x, boss->vwork[0].z - boss->obj.pos.z)), + &this->unk_078.y, + Math_RadToDeg(Math_Atan2F(this->vwork[0].x - this->obj.pos.x, this->vwork[0].z - this->obj.pos.z)), 0.5f, 1.5f, 0.0001f); - boss->vel.x = SIN_DEG(boss->unk_078.y) * boss->fwork[10]; - boss->vel.z = COS_DEG(boss->unk_078.y) * boss->fwork[10]; + this->vel.x = SIN_DEG(this->unk_078.y) * this->fwork[BOSS_MOVEMENT_SPEED]; + this->vel.z = COS_DEG(this->unk_078.y) * this->fwork[BOSS_MOVEMENT_SPEED]; } + for (i = 0; i < 10; i++) { - if (boss->swork[i] != 0) { - boss->swork[i]--; + if (this->swork[i] != 0) { + this->swork[i]--; } } - if (boss->swork[10] != 0) { - Math_SmoothStepToF(&boss->fwork[0], boss->fwork[5], 0.03f, 0.5f, 0); + + if (this->swork[BOSS_HATCH_1_HP] != 0) { + Math_SmoothStepToF(&this->fwork[BOSS_HATCH_1_ANGLE], this->fwork[BOSS_HATCH_1_ANGLE_TARGET], 0.03f, 0.5f, + 0); } - if (boss->swork[11] != 0) { - Math_SmoothStepToF(&boss->fwork[1], boss->fwork[6], 0.03f, 0.5f, 0); + if (this->swork[BOSS_HATCH_2_HP] != 0) { + Math_SmoothStepToF(&this->fwork[BOSS_HATCH_2_ANGLE], this->fwork[BOSS_HATCH_2_ANGLE_TARGET], 0.03f, 0.5f, + 0); } - if (boss->swork[12] != 0) { - Math_SmoothStepToF(&boss->fwork[2], boss->fwork[7], 0.03f, 0.5f, 0); + if (this->swork[BOSS_HATCH_3_HP] != 0) { + Math_SmoothStepToF(&this->fwork[BOSS_HATCH_3_ANGLE], this->fwork[BOSS_HATCH_3_ANGLE_TARGET], 0.03f, 0.5f, + 0); } - if (boss->swork[13] != 0) { - Math_SmoothStepToF(&boss->fwork[3], boss->fwork[8], 0.03f, 0.5f, 0); + if (this->swork[BOSS_HATCH_4_HP] != 0) { + Math_SmoothStepToF(&this->fwork[BOSS_HATCH_4_ANGLE], this->fwork[BOSS_HATCH_4_ANGLE_TARGET], 0.03f, 0.5f, + 0); } - if (boss->swork[14] != 0) { - Math_SmoothStepToF(&boss->fwork[4], boss->fwork[9], 0.05f, 5.0f, 0); + if (this->swork[BOSS_CORE_HP] != 0) { + Math_SmoothStepToF(&this->fwork[BOSS_CORE_LEVEL], this->fwork[BOSS_CORE_TARGET_LEVEL], 0.05f, 5.0f, 0); } - boss->info.hitbox[2] = boss->fwork[0]; - boss->info.hitbox[12] = boss->fwork[1]; - boss->info.hitbox[22] = boss->fwork[2]; - boss->info.hitbox[32] = boss->fwork[3]; - boss->info.hitbox[43] = boss->fwork[4] - 200.0f + -750.0f; - boss->info.hitbox[49] = boss->fwork[4] - 200.0f + -850.0f; - boss->info.hitbox[55] = boss->fwork[4] - 200.0f + -950.0f; - boss->info.hitbox[61] = boss->fwork[4] - 200.0f + -1200.0f; - Katina_80193EF0(boss); + + this->info.hitbox[2] = this->fwork[BOSS_HATCH_1_ANGLE]; + this->info.hitbox[12] = this->fwork[BOSS_HATCH_2_ANGLE]; + this->info.hitbox[22] = this->fwork[BOSS_HATCH_3_ANGLE]; + this->info.hitbox[32] = this->fwork[BOSS_HATCH_4_ANGLE]; + this->info.hitbox[43] = this->fwork[BOSS_CORE_LEVEL] - 200.0f + -750.0f; + this->info.hitbox[49] = this->fwork[BOSS_CORE_LEVEL] - 200.0f + -850.0f; + this->info.hitbox[55] = this->fwork[BOSS_CORE_LEVEL] - 200.0f + -950.0f; + this->info.hitbox[61] = this->fwork[BOSS_CORE_LEVEL] - 200.0f + -1200.0f; + + Katina_BossHandleDamage(this); } } -bool Katina_801965A8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { - Boss* boss = (Boss*) data; +bool Katina_BossOverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { + Saucerer* boss = (Saucerer*) data; RCP_SetupDL(&gMasterDisp, 29); gDPSetPrimColor(gMasterDisp++, 0, 0, 40, 40, 255, 255); switch (limbIndex) { case 1: - rot->y += boss->fwork[0]; - if ((boss->swork[0] % 2) != 0) { + rot->y += boss->fwork[BOSS_HATCH_1_ANGLE]; + + if ((boss->swork[BOSS_HATCH_1_FLASH_TIMER] % 2) != 0) { RCP_SetupDL(&gMasterDisp, 30); } - if (boss->swork[10] <= 0) { + if (boss->swork[BOSS_HATCH_1_HP] <= 0) { RCP_SetupDL(&gMasterDisp, 57); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - *dList = D_KA_60012A0; + *dList = aDestroyedHatch1DL; } break; case 2: - rot->y += boss->fwork[1]; - if ((boss->swork[1] % 2) != 0) { + rot->y += boss->fwork[BOSS_HATCH_2_ANGLE]; + + if ((boss->swork[BOSS_HATCH_2_FLASH_TIMER] % 2) != 0) { RCP_SetupDL(&gMasterDisp, 30); } - if (boss->swork[11] <= 0) { + if (boss->swork[BOSS_HATCH_2_HP] <= 0) { RCP_SetupDL(&gMasterDisp, 57); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - *dList = D_KA_600CDC0; + *dList = aDestroyedHatch2DL; } break; case 3: - rot->y += boss->fwork[2]; - if ((boss->swork[2] % 2) != 0) { + rot->y += boss->fwork[BOSS_HATCH_3_ANGLE]; + + if ((boss->swork[BOSS_HATCH_3_FLASH_TIMER] % 2) != 0) { RCP_SetupDL(&gMasterDisp, 30); } - if (boss->swork[12] <= 0) { + if (boss->swork[BOSS_HATCH_3_HP] <= 0) { RCP_SetupDL(&gMasterDisp, 57); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - *dList = D_KA_600D4E0; + *dList = aDestroyedHatch3DL; } break; case 4: - rot->y -= boss->fwork[3]; - if ((boss->swork[3] % 2) != 0) { + rot->y -= boss->fwork[BOSS_HATCH_4_ANGLE]; + + if ((boss->swork[BOSS_HATCH_4_FLASH_TIMER] % 2) != 0) { RCP_SetupDL(&gMasterDisp, 30); } - if (boss->swork[13] <= 0) { + if (boss->swork[BOSS_HATCH_4_HP] <= 0) { RCP_SetupDL(&gMasterDisp, 57); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - *dList = D_KA_600D290; + *dList = aDestroyedHatch4DL; } break; case 9: - pos->x -= boss->fwork[4]; - if ((boss->swork[4] % 2) != 0) { + pos->x -= boss->fwork[BOSS_CORE_LEVEL]; + + if ((boss->swork[BOSS_CORE_FLASH_TIMER] % 2) != 0) { RCP_SetupDL(&gMasterDisp, 30); } - if (boss->swork[14] <= 0) { + if (boss->swork[BOSS_CORE_HP] <= 0) { RCP_SetupDL(&gMasterDisp, 57); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - *dList = D_KA_600D090; + *dList = aDestroyedCoreDL; } break; @@ -1267,44 +1635,49 @@ bool Katina_801965A8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* d if (boss->health < 0) { RCP_SetupDL(&gMasterDisp, 57); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - *dList = D_KA_6007300; + *dList = aDestroyedMothershipDL; } break; } return 0; } -void Katina_801968F4(Boss* boss) { +void Katina_BossDraw(Saucerer* this) { Vec3f jointTable[30]; - if (boss->state != 0) { - if (boss->state < 20) { + if (this->state != 0) { + if (this->state < 20) { gSPFogPosition(gMasterDisp++, gFogNear, 1002); } else { gSPFogPosition(gMasterDisp++, gFogNear, 1006); } - Matrix_RotateY(gGfxMatrix, boss->fwork[13] * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, this->fwork[BOSS_FWORK_13] * M_DTOR, MTXF_APPLY); + Animation_GetFrameData(&D_KA_60105D8, 0, jointTable); - Animation_DrawSkeleton(1, D_KA_6010744, jointTable, Katina_801965A8, NULL, boss, &gIdentityMatrix); + Animation_DrawSkeleton(1, D_KA_6010744, jointTable, Katina_BossOverrideLimbDraw, NULL, this, &gIdentityMatrix); gSPFogPosition(gMasterDisp++, gFogNear, gFogFar); - if (boss->fwork[14] > 0.0f) { + + if (this->fwork[BOSS_LASER_LIGHT_SCALE] > 0.0f) { RCP_SetupDL(&gMasterDisp, 67); Matrix_Push(&gGfxMatrix); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 0, 255, 255, 255); Matrix_Translate(gGfxMatrix, 0.0f, 500.0f, 0.0f, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, boss->fwork[14], boss->fwork[14], boss->fwork[14], MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->fwork[BOSS_LASER_LIGHT_SCALE], this->fwork[BOSS_LASER_LIGHT_SCALE], + this->fwork[BOSS_LASER_LIGHT_SCALE], MTXF_APPLY); Matrix_RotateX(gGfxMatrix, -90 * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); Matrix_Pop(&gGfxMatrix); + Matrix_Push(&gGfxMatrix); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 64); gDPSetEnvColor(gMasterDisp++, 0, 255, 255, 64); Matrix_Translate(gGfxMatrix, 0.0f, 500.0f, 0.0f, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, boss->fwork[14] * 3.0f, boss->fwork[14] * 3.0f, boss->fwork[14] * 3.0f, + Matrix_Scale(gGfxMatrix, this->fwork[BOSS_LASER_LIGHT_SCALE] * 3.0f, + this->fwork[BOSS_LASER_LIGHT_SCALE] * 3.0f, this->fwork[BOSS_LASER_LIGHT_SCALE] * 3.0f, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, -90 * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -1312,84 +1685,113 @@ void Katina_801968F4(Boss* boss) { Matrix_Pop(&gGfxMatrix); } - if (boss->fwork[15] > 0.0f) { + if (this->fwork[BOSS_LASER_LENGTH] > 0.0f) { RCP_SetupDL(&gMasterDisp, 41); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 128); Matrix_RotateX(gGfxMatrix, M_PI, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, 0.3f, boss->fwork[15], 0.3f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.3f, this->fwork[BOSS_LASER_LENGTH], 0.3f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_KA_600BFB0); } } } -void Katina_80196E30(Actor* actor, s32 idx) { - Actor_Initialize(actor); +/** + * Updates the arwing position of the teammates while + * leaving the stage in the context of a succeeded mission. + */ +void Katina_SFTeamMissionAccomUpdate(ActorCutscene* this, s32 idx) { + Actor_Initialize(this); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.pos.x = D_i4_8019F260[idx + 1] + gPlayer[0].pos.x; - actor->obj.pos.y = D_i4_8019F26C[idx + 1] + gPlayer[0].pos.y; - actor->obj.pos.z = D_i4_8019F278[idx + 1] + gPlayer[0].pos.z; - actor->unk_0F4.y = D_i4_8019F284[idx + 1]; - actor->fwork[1] = D_i4_8019F290[idx + 1]; - actor->fwork[0] = 40.0f; + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_ACTOR_CUTSCENE; - Object_SetInfo(&actor->info, actor->obj.id); + this->obj.pos.x = D_i4_8019F260[idx + 1] + gPlayer[0].pos.x; + this->obj.pos.y = D_i4_8019F26C[idx + 1] + gPlayer[0].pos.y; + this->obj.pos.z = D_i4_8019F278[idx + 1] + gPlayer[0].pos.z; - actor->iwork[11] = 1; - AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); + this->unk_0F4.y = D_i4_8019F284[idx + 1]; + + this->fwork[KA_ACTOR_FWORK_1] = D_i4_8019F290[idx + 1]; + this->fwork[KA_ACTOR_FWORK_0] = 40.0f; + + Object_SetInfo(&this->info, this->obj.id); + + this->iwork[KA_ACTOR_IWORK_11] = 1; + + AUDIO_PLAY_SFX(0x3100000C, this->sfxSource, 4); } -void Katina_80196F40(Actor* actor, s32 idx) { - Actor_Initialize(actor); +/** + * Updates the arwing position of the teammates while + * fleeing the stage in the context of a failed mission. + */ +void Katina_SFTeamFleeUpdate(ActorCutscene* this, s32 idx) { + Actor_Initialize(this); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.pos.x = D_i4_8019F29C[idx + 1]; - actor->obj.pos.y = D_i4_8019F2AC[idx + 1]; - actor->obj.pos.z = D_i4_8019F2BC[idx + 1]; - actor->unk_0F4.y = D_i4_8019F2CC[idx + 1]; - actor->fwork[1] = D_i4_8019F2DC[idx + 1]; - actor->fwork[0] = 40.0f; + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_ACTOR_CUTSCENE; - Object_SetInfo(&actor->info, actor->obj.id); + this->obj.pos.x = D_i4_8019F29C[idx + 1]; + this->obj.pos.y = D_i4_8019F2AC[idx + 1]; + this->obj.pos.z = D_i4_8019F2BC[idx + 1]; - actor->iwork[11] = 1; - AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); + this->unk_0F4.y = D_i4_8019F2CC[idx + 1]; + + this->fwork[KA_ACTOR_FWORK_1] = D_i4_8019F2DC[idx + 1]; + this->fwork[KA_ACTOR_FWORK_0] = 40.0f; + + Object_SetInfo(&this->info, this->obj.id); + + this->iwork[KA_ACTOR_IWORK_11] = 1; + + AUDIO_PLAY_SFX(0x3100000C, this->sfxSource, 4); } -void Katina_80197024(void) { +/** + * Updates the actor positions that follow + * fox at the level complete cutscene. + */ +void Katina_SFTeam_LevelComplete_Update(void) { s32 i; - s32 target; - Actor* actor = &gActors[0]; + s32 numActors; + ActorCutscene* actor = &gActors[0]; Rand_SetSeed(1, 29100, 9786); if (gMissionStatus != MISSION_COMPLETE) { - target = 19; + numActors = 19; } else { - target = 2; + numActors = 2; } - for (i = 0; i <= target; i++, actor++) { + for (i = 0; i <= numActors; i++, actor++) { if ((D_i4_8019F2F0[i] >= gKaAllyKillCount) && ((i >= 3) || (gTeamShields[i + 1] > 0))) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; actor->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.pos.x = ((D_i4_8019F340[i].x * 0.5f) + gPlayer[0].pos.x) + RAND_FLOAT_CENTERED_SEEDED(2000.0f); - actor->obj.pos.y = (D_i4_8019F340[i].y + gPlayer[0].pos.y) - RAND_FLOAT_SEEDED(1000.0f); - actor->obj.pos.z = (D_i4_8019F340[i].z + gPlayer[0].pos.z) + RAND_FLOAT_SEEDED(1000.0f); + + actor->obj.pos.x = + (sCsLevelCompleteActorPos[i].x * 0.5f) + gPlayer[0].pos.x + RAND_FLOAT_CENTERED_SEEDED(2000.0f); + actor->obj.pos.y = (sCsLevelCompleteActorPos[i].y + gPlayer[0].pos.y) - RAND_FLOAT_SEEDED(1000.0f); + actor->obj.pos.z = (sCsLevelCompleteActorPos[i].z + gPlayer[0].pos.z) + RAND_FLOAT_SEEDED(1000.0f); + actor->unk_0F4.z = RAND_FLOAT_CENTERED_SEEDED(200.0f); - actor->vwork[0].x = (D_i4_8019F340[i].x * 0.5f) + gPlayer[0].pos.x; - actor->vwork[0].y = D_i4_8019F340[i].y + gPlayer[0].pos.y; - actor->vwork[0].z = D_i4_8019F340[i].z + gPlayer[0].pos.z; + + actor->vwork[0].x = (sCsLevelCompleteActorPos[i].x * 0.5f) + gPlayer[0].pos.x; + actor->vwork[0].y = sCsLevelCompleteActorPos[i].y + gPlayer[0].pos.y; + actor->vwork[0].z = sCsLevelCompleteActorPos[i].z + gPlayer[0].pos.z; + actor->state = 1; + if (i >= 3) { actor->unk_0B6 = 33; } + Object_SetInfo(&actor->info, actor->obj.id); - actor->iwork[11] = 1; + + actor->iwork[KA_ACTOR_IWORK_11] = 1; + AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); } } @@ -1397,7 +1799,7 @@ void Katina_80197024(void) { void Katina_LevelComplete(Player* player) { s32 i; - Boss* boss = &gBosses[1]; + Saucerer* boss = &gBosses[KA_BOSS_MOTHERSHIP]; Vec3f src; Vec3f dest; f32 angle; @@ -1406,41 +1808,50 @@ void Katina_LevelComplete(Player* player) { player->wings.unk_0C = 0.0f; player->wings.unk_08 = 0.0f; player->wings.unk_04 = 0.0f; + player->aerobaticPitch = 0.0f; + D_ctx_80177A48[0] = 1.0f; + switch (player->csState) { case 0: Audio_StopSfxByBankAndSource(1, &player->sfxSource[0]); gCsFrameCount = 0; player->unk_234 = 1; + player->pos.x = boss->obj.pos.x; player->pos.y = 800.0f; player->pos.z = boss->obj.pos.z; + player->yRot_114 = player->xRot_120 = player->rot.x = player->camRoll = player->aerobaticPitch = 0.0f; player->rot.y = 120.0f; player->baseSpeed = 40.0f; + gCsCamEyeX = boss->obj.pos.x + 5000.0f; gCsCamEyeY = 750.0f; gCsCamEyeZ = boss->obj.pos.z; gCsCamAtX = boss->obj.pos.x; gCsCamAtY = 1000.0f; gCsCamAtZ = boss->obj.pos.z; + for (i = 10; i < 60; i++) { if (gActors[i].unk_0B6 == 0) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); } } + player->csState += 1; + if (gTeamShields[TEAM_ID_FALCO] > 0) { - Katina_80196E30(&gActors[1], 0); + Katina_SFTeamMissionAccomUpdate(&gActors[1], 0); } if (gTeamShields[TEAM_ID_SLIPPY] > 0) { - Katina_80196E30(&gActors[2], 1); + Katina_SFTeamMissionAccomUpdate(&gActors[2], 1); } if (gTeamShields[TEAM_ID_PEPPY] > 0) { - Katina_80196E30(&gActors[3], 2); + Katina_SFTeamMissionAccomUpdate(&gActors[3], 2); } break; @@ -1449,8 +1860,10 @@ void Katina_LevelComplete(Player* player) { gCsCamAtX = boss->obj.pos.x; gCsCamAtY = 1000.0f; gCsCamAtZ = boss->obj.pos.z; + Math_SmoothStepToF(&player->rot.z, Math_SmoothStepToAngle(&player->rot.y, 283.0f, 0.1f, 3.0f, 0.0f) * 20.0f, 0.1f, 1.0f, 0.0f); + for (i = 1; i < 4; i++) { angle = Math_SmoothStepToAngle(&gActors[i].unk_0F4.y, gActors[i].fwork[1], 0.1f, 3.0f, 0.0f); Math_SmoothStepToF(&gActors[i].unk_0F4.z, angle * 20.0f, 0.1f, 1.0f, 0.0f); @@ -1492,21 +1905,28 @@ void Katina_LevelComplete(Player* player) { case 2: if (player->csTimer == 0) { player->unk_240 = 1; + player->pos.x = 0.0f; player->pos.y = 3500.0f; player->pos.z = 150.0f; + player->csState = 3; + Audio_StartPlayerNoise(0); + if (gMissionStatus != MISSION_COMPLETE) { AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); } else { AUDIO_PLAY_BGM(SEQ_ID_BAD_END); } + D_ctx_80177A98 = 0; D_ctx_80177A48[1] = 0.0f; D_ctx_80177A48[2] = 0.0f; - Katina_80197024(); + + Katina_SFTeam_LevelComplete_Update(); func_play_800A3FB0(); + gCsFrameCount = 0; } break; @@ -1514,18 +1934,24 @@ void Katina_LevelComplete(Player* player) { case 3: gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 2; + D_ctx_80177A48[1] -= D_ctx_80177A48[2]; + Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, MTXF_NEW); + src.x = -1000.0f; src.y = 0.0f; src.z = 0.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + gCsCamEyeX = dest.x; gCsCamEyeY = 3600.0f; gCsCamEyeZ = 500.0f + dest.z; gCsCamAtX = 0.0f; gCsCamAtY = 3500.0f; gCsCamAtZ = player->pos.z + 500; + if (gCsFrameCount > 1010) { player->baseSpeed += 2.0f; player->rot.x += 0.1f; @@ -1554,6 +1980,7 @@ void Katina_LevelComplete(Player* player) { gLeveLClearStatus[LEVEL_KATINA] = Play_CheckMedalStatus(150) + 1; } } + switch (gCsFrameCount) { case 190: gLevelClearScreenTimer = 100; @@ -1611,19 +2038,19 @@ void Katina_LevelComplete(Player* player) { break; case 100: - Katina_80196F40(&gActors[1], 0); + Katina_SFTeamFleeUpdate(&gActors[1], 0); if (gTeamShields[TEAM_ID_FALCO] > 0) { - Katina_80196F40(&gActors[2], 1); + Katina_SFTeamFleeUpdate(&gActors[2], 1); } if (gTeamShields[TEAM_ID_SLIPPY] > 0) { - Katina_80196F40(&gActors[3], 2); + Katina_SFTeamFleeUpdate(&gActors[3], 2); } if (gTeamShields[TEAM_ID_PEPPY] > 0) { - Katina_80196F40(&gActors[4], 3); + Katina_SFTeamFleeUpdate(&gActors[4], 3); } - player->csState += 1; + player->csState++; break; case 101: @@ -1637,20 +2064,27 @@ void Katina_LevelComplete(Player* player) { gActors[4].unk_0F4.x += 0.08f; break; } + Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -((player->xRot_120 + player->rot.x) * M_DTOR), MTXF_APPLY); + src.x = 0.0f; src.y = 0.0f; src.z = player->baseSpeed; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + player->vel.x = dest.x; player->vel.z = dest.z; player->vel.y = dest.y; + player->pos.x += player->vel.x; player->pos.y += player->vel.y; player->pos.z += player->vel.z; + player->bankAngle = player->rot.z; player->trueZpos = player->pos.z; + if (player->csState < 100) { Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0); Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0); @@ -1659,116 +2093,135 @@ void Katina_LevelComplete(Player* player) { Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0); Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0); } + player->bobPhase += 10.0f; player->yBob = -SIN_DEG(player->bobPhase) * 0.3f; player->rockPhase += 8.0f; player->rockAngle = SIN_DEG(player->rockPhase); } -void Katina_80197F10(Actor* actor) { +// Makes your teammates fly towards the camera after defeating the mothership. +void Katina_SFTeamFlyTowardsCamera(ActorCutscene* this) { Vec3f src; Vec3f dest; - switch (actor->state) { + switch (this->state) { case 1: - Math_SmoothStepToF(&actor->obj.pos.x, actor->vwork[0].x, 0.02f, 2.0f, 0.0001f); - Math_SmoothStepToF(&actor->obj.pos.y, actor->vwork[0].y, 0.02f, 2.0f, 0.0001f); - Math_SmoothStepToF(&actor->obj.pos.z, actor->vwork[0].z, 0.02f, 2.0f, 0.0001f); - Math_SmoothStepToF(&actor->unk_0F4.z, 0.0f, 0.02f, 0.2f, 0.0001f); - if ((actor->unk_0B6 != 0) && ((((s32) (actor->index % 8U) * 10) + 800) < gCsFrameCount)) { - actor->state = 4; + Math_SmoothStepToF(&this->obj.pos.x, this->vwork[0].x, 0.02f, 2.0f, 0.0001f); + Math_SmoothStepToF(&this->obj.pos.y, this->vwork[0].y, 0.02f, 2.0f, 0.0001f); + Math_SmoothStepToF(&this->obj.pos.z, this->vwork[0].z, 0.02f, 2.0f, 0.0001f); + Math_SmoothStepToF(&this->unk_0F4.z, 0.0f, 0.02f, 0.2f, 0.0001f); + + if ((this->unk_0B6 != 0) && ((((s32) (this->index % 8U) * 10) + 800) < gCsFrameCount)) { + this->state = 4; } break; case 2: - actor->state = 3; - AUDIO_PLAY_SFX(0x09000002, actor->sfxSource, 0); - actor->fwork[29] = 5.0f; + this->state = 3; + AUDIO_PLAY_SFX(0x09000002, this->sfxSource, 0); + this->fwork[KA_ACTOR_FWORK_29] = 5.0f; case 3: - actor->iwork[11] = 2; - actor->fwork[0] += 2.0f; - actor->unk_0F4.x += 0.1f; - actor->fwork[21] += 0.4f; - if (actor->fwork[21] > 0.6f) { - actor->fwork[21] = 0.6f; + this->iwork[KA_ACTOR_IWORK_11] = 2; + this->fwork[KA_ACTOR_FWORK_0] += 2.0f; + this->unk_0F4.x += 0.1f; + this->fwork[KA_ACTOR_FWORK_21] += 0.4f; + if (this->fwork[KA_ACTOR_FWORK_21] > 0.6f) { + this->fwork[KA_ACTOR_FWORK_21] = 0.6f; } break; case 4: - Math_SmoothStepToF(&actor->unk_0F4.z, 120.0f, 0.1f, 3.0f, 0.0001f); - actor->obj.pos.x += actor->fwork[1]; - actor->obj.pos.y += actor->fwork[1]; - actor->fwork[1] -= 0.5f; + Math_SmoothStepToF(&this->unk_0F4.z, 120.0f, 0.1f, 3.0f, 0.0001f); + this->obj.pos.x += this->fwork[KA_ACTOR_FWORK_1]; + this->obj.pos.y += this->fwork[KA_ACTOR_FWORK_1]; + this->fwork[KA_ACTOR_FWORK_1] -= 0.5f; break; } - Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(actor->unk_0F4.x * M_DTOR), MTXF_APPLY); + + Matrix_RotateY(gCalcMatrix, (this->unk_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(this->unk_0F4.x * M_DTOR), MTXF_APPLY); + src.x = 0.0f; src.y = 0.0f; - src.z = actor->fwork[0]; + src.z = this->fwork[KA_ACTOR_FWORK_0]; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - actor->vel.x = dest.x; - actor->vel.y = dest.y; - actor->vel.z = dest.z; - actor->obj.rot.x = -actor->unk_0F4.x; - actor->obj.rot.y = actor->unk_0F4.y + 180.0f; - actor->obj.rot.z = -actor->unk_0F4.z; + + this->vel.x = dest.x; + this->vel.y = dest.y; + this->vel.z = dest.z; + + this->obj.rot.x = -this->unk_0F4.x; + this->obj.rot.y = this->unk_0F4.y + 180.0f; + this->obj.rot.z = -this->unk_0F4.z; } -void Katina_801981F8(Actor* actor) { +void Katina_801981F8(Actor* this) { s32 i; - Actor* actor_it; + ActorAllRange* actor; Vec3f src; Vec3f dest; s32 pad; - if (actor->timer_0C0 == 0 && (i = 0, (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_STANDBY))) { - actor->timer_0C0 = 2; + if ((this->timer_0C0 == 0) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_STANDBY)) { + this->timer_0C0 = 2; src.x = 0.0f; src.y = 0.0f; src.z = -5000.0f; - if (gBosses[1].state != 0) { + if (gBosses[KA_BOSS_MOTHERSHIP].state != 0) { src.z = -10000.0f; } - for (i = 0, actor_it = &gActors[10]; i < 20; i++, actor_it++) { - if (actor_it->obj.status == OBJ_FREE) { - Actor_Initialize(actor_it); - actor_it->unk_0B6 = D_i4_8019F430[i]; - if ((actor_it->unk_0B6 != 0) || (gBosses[1].state == 0)) { - actor_it->obj.status = OBJ_ACTIVE; - actor_it->obj.id = OBJ_ACTOR_ALLRANGE; - Matrix_RotateY(gCalcMatrix, actor->unk_04E * 18.0f * M_DTOR, MTXF_NEW); + // Spawn actors 10 to 20 as Cornerian Fighters, 20 to 29 as enemies. + for (i = 0, actor = &gActors[AI360_10]; i < 20; i++, actor++) { + if (actor->obj.status == OBJ_FREE) { + Actor_Initialize(actor); + + actor->unk_0B6 = D_i4_8019F430[i]; + + if ((actor->unk_0B6 != 0) || (gBosses[KA_BOSS_MOTHERSHIP].state == 0)) { + actor->obj.status = OBJ_ACTIVE; + actor->obj.id = OBJ_ACTOR_ALLRANGE; + + Matrix_RotateY(gCalcMatrix, this->unk_04E * 18.0f * M_DTOR, MTXF_NEW); Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - actor_it->obj.pos.x = dest.x; - actor_it->obj.pos.y = RAND_FLOAT(1000.0f) + 300.0f; - actor_it->obj.pos.z = dest.z; - actor_it->unk_0F4.y = actor->unk_04E * 18.0f; - actor_it->state = 1; - actor_it->aiType = i + AI360_10; - actor_it->aiIndex = D_i4_8019F444[i]; - actor_it->unk_0F4.x = 3.0f; - actor_it->health = 24; - if (actor_it->unk_0B6 >= 2) { - actor_it->health = 1000; + + actor->obj.pos.x = dest.x; + actor->obj.pos.y = RAND_FLOAT(1000.0f) + 300.0f; + actor->obj.pos.z = dest.z; + + actor->unk_0F4.y = this->unk_04E * 18.0f; + actor->state = 1; + actor->aiType = i + AI360_10; + actor->aiIndex = D_i4_8019F444[i]; + actor->unk_0F4.x = 3.0f; + actor->health = 24; + + if (actor->unk_0B6 >= 2) { + actor->health = 1000; } - actor_it->iwork[11] = 1; - actor_it->unk_0C9 = 1; + + actor->iwork[KA_ACTOR_IWORK_11] = 1; + actor->unk_0C9 = 1; + if (D_i4_801A0540 < 9600) { - actor_it->itemDrop = DROP_SILVER_RING_10p; + actor->itemDrop = DROP_SILVER_RING_10p; } - actor_it->timer_0C2 = 30; - Object_SetInfo(&actor_it->info, actor_it->obj.id); - if (actor_it->unk_0B6 == 1) { - actor_it->info.targetOffset = 0.0f; - actor_it->info.bonus = 0; - AUDIO_PLAY_SFX(0x3100000C, actor_it->sfxSource, 4); + + actor->timer_0C2 = 30; + Object_SetInfo(&actor->info, actor->obj.id); + + if (actor->unk_0B6 == 1) { + actor->info.targetOffset = 0.0f; + actor->info.bonus = 0; + AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); } - actor_it->info.action = (ObjectFunc) Katina_80198AA0; - actor_it->info.draw = (ObjectFunc) Katina_801995B4; - actor->unk_04E++; + actor->info.action = (ObjectFunc) Katina_EnemyUpdate; + actor->info.draw = (ObjectFunc) Katina_EnemyDraw; + this->unk_04E++; } break; } @@ -1776,10 +2229,11 @@ void Katina_801981F8(Actor* actor) { } } -void Katina_8019848C(void) { - Actor* actor = &gActors[9]; +void Katina_BillFighterInit(void) { + ActorAllRange* actor = &gActors[AI360_BILL]; Actor_Initialize(actor); + actor->obj.status = OBJ_ACTIVE; actor->obj.pos.x = 0; actor->obj.pos.y = 1000.0f; @@ -1788,58 +2242,67 @@ void Katina_8019848C(void) { actor->aiIndex = AI360_10 + 17; actor->unk_0B6 = 2; actor->health = 1000; - actor->iwork[11] = 1; + actor->iwork[KA_ACTOR_IWORK_11] = 1; actor->unk_0C9 = 1; actor->timer_0C2 = 30; actor->obj.id = OBJ_ACTOR_ALLRANGE; + Object_SetInfo(&actor->info, actor->obj.id); + actor->info.targetOffset = 0.0f; actor->info.bonus = 0; + AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); } -void Katina_UpdateEvents(Actor* actor) { +void Katina_UpdateEvents(ActorAllRange* this) { s32 pad[4]; f32 D_i4_8019F494[5] = { -200.0f, -100.0f, -0.0f, 100.0f, 200.0f }; - switch (actor->state) { + switch (this->state) { case 0: gProjectFar = 30000.0f; D_i4_801A0540 = 0; gKaKilledAlly = gKaAllyKillCount = 0; - actor->state = 2; + this->state = 2; + if (gAllRangeCheckpoint != 0) { gHitCount = gSavedHitCount; - gBosses[1].state = 6; - gBosses[1].obj.pos.x = 0.0f; - gBosses[1].obj.pos.z = 0.0f; - gBosses[1].obj.pos.y = 2000.0f; - AUDIO_PLAY_SFX(0x11037025, gBosses[1].sfxSource, 0); + + gBosses[KA_BOSS_MOTHERSHIP].state = 6; + gBosses[KA_BOSS_MOTHERSHIP].obj.pos.x = 0.0f; + gBosses[KA_BOSS_MOTHERSHIP].obj.pos.z = 0.0f; + gBosses[KA_BOSS_MOTHERSHIP].obj.pos.y = 2000.0f; + + AUDIO_PLAY_SFX(0x11037025, gBosses[KA_BOSS_MOTHERSHIP].sfxSource, 0); + gAllRangeEventTimer = 20000; - gBosses[1].swork[16] = 5760; + + gBosses[KA_BOSS_MOTHERSHIP].swork[BOSS_CORE_TIMER] = 5760; + gKaKilledAlly = 1; + AUDIO_PLAY_BGM(SEQ_ID_KA_BOSS | SEQ_FLAG); } - - Katina_8019848C(); + Katina_BillFighterInit(); case 2: D_i4_801A0540++; PRINTF("KT_time %d\n", D_i4_801A0540); - Katina_801981F8(actor); + Katina_801981F8(this); break; case 6: - gActors[1].aiIndex = AI360_FOX; - gActors[1].state = 2; - gActors[2].aiIndex = AI360_FOX; - gActors[2].state = 2; - gActors[3].aiIndex = AI360_FOX; - gActors[3].state = 2; + gActors[AI360_FALCO].aiIndex = AI360_FOX; + gActors[AI360_FALCO].state = 2; + gActors[AI360_SLIPPY].aiIndex = AI360_FOX; + gActors[AI360_SLIPPY].state = 2; + gActors[AI360_PEPPY].aiIndex = AI360_FOX; + gActors[AI360_PEPPY].state = 2; break; } - if (gBosses[1].state < 15) { + if (gBosses[KA_BOSS_MOTHERSHIP].state < 15) { switch (gAllRangeEventTimer) { case -500: Radio_PlayMessage(gMsg_ID_18005, RCID_BILL); @@ -1858,7 +2321,7 @@ void Katina_UpdateEvents(Actor* actor) { break; } - if (gBosses[1].state == 12) { + if (gBosses[KA_BOSS_MOTHERSHIP].state == 12) { if (((gAllRangeEventTimer % 256) == 0) && (Rand_ZeroOne() < 0.5f)) { AllRange_PlayMessage(gMsg_ID_18060, RCID_BILL); } @@ -1885,40 +2348,39 @@ void Katina_UpdateEvents(Actor* actor) { } } -void Katina_80198930(void) { - Boss* boss = &gBosses[0]; +void Katina_BossInit(void) { + Frontlinebase* base = &gBosses[KA_BOSS_BASE]; + Saucerer* mothership = &gBosses[KA_BOSS_MOTHERSHIP]; - Boss_Initialize(&boss[1]); + Boss_Initialize(mothership); + mothership->obj.status = OBJ_INIT; + mothership->obj.pos.x = -15000.0f; + mothership->obj.pos.y = 3240.0f; + mothership->obj.pos.z = 15000.0f; + mothership->obj.id = OBJ_BOSS_316; + Object_SetInfo(&mothership->info, mothership->obj.id); - boss[1].obj.status = OBJ_INIT; - boss[1].obj.pos.x = -15000.0f; - boss[1].obj.pos.y = 3240.0f; - boss[1].obj.pos.z = 15000.0f; - boss[1].obj.id = OBJ_BOSS_316; - Object_SetInfo(&boss[1].info, boss[1].obj.id); - - Boss_Initialize(&boss[0]); - - boss[0].obj.status = OBJ_INIT; - boss[0].obj.pos.x = 0.0f; - boss[0].obj.pos.y = 0.0f; - boss[0].obj.pos.z = 0.0f; - boss[0].obj.id = OBJ_BOSS_317; - Object_SetInfo(&boss[0].info, boss[0].obj.id); + Boss_Initialize(base); + base->obj.status = OBJ_INIT; + base->obj.pos.x = 0.0f; + base->obj.pos.y = 0.0f; + base->obj.pos.z = 0.0f; + base->obj.id = OBJ_BOSS_317; + Object_SetInfo(&base->info, base->obj.id); } -bool Katina_801989F4(Actor* boss, f32 posX, f32 posY) { - if ((fabsf(gBosses[0].obj.pos.x - (boss->obj.pos.x + (posX * 650.0f))) < 1500.0f) && - (fabsf(gBosses[0].obj.pos.z - (boss->obj.pos.z + (posY * 650.0f))) < 1500.0f) && - (fabsf(gBosses[0].obj.pos.y - boss->obj.pos.y) < 700.0f)) { +bool Katina_IsActorCloseToBase(Actor* this, f32 posX, f32 posY) { + if ((fabsf(gBosses[KA_BOSS_BASE].obj.pos.x - (this->obj.pos.x + (posX * 650.0f))) < 1500.0f) && + (fabsf(gBosses[KA_BOSS_BASE].obj.pos.z - (this->obj.pos.z + (posY * 650.0f))) < 1500.0f) && + (fabsf(gBosses[KA_BOSS_BASE].obj.pos.y - this->obj.pos.y) < 700.0f)) { return true; } else { return false; } } -void Katina_80198AA0(Actor* actor) { - s32 isClose; +void Katina_EnemyUpdate(ActorAllRange* this) { + bool actorCloseToBase; s32 state; s32 pad; f32 xVel; @@ -1945,63 +2407,73 @@ void Katina_80198AA0(Actor* actor) { zPos = 0.0f; yPos = 0.0f; xPos = 0.0f; - Math_SmoothStepToF(&actor->fwork[10], 0.0f, 0.1f, 0.2f, 0.1f); - Math_SmoothStepToF(&actor->fwork[9], actor->fwork[10], 0.1f, 2.0f, 0.1f); + + Math_SmoothStepToF(&this->fwork[KA_ACTOR_FWORK_10], 0.0f, 0.1f, 0.2f, 0.1f); + Math_SmoothStepToF(&this->fwork[KA_ACTOR_FWORK_9], this->fwork[KA_ACTOR_FWORK_10], 0.1f, 2.0f, 0.1f); + state = 0; - actor->iwork[5] = 0; - switch (actor->state) { + + this->iwork[KA_ACTOR_IWORK_5] = 0; + + switch (this->state) { case 1: - actor->fwork[1] = 40.0f; - if (actor->timer_0BC == 0) { - actor->state = 3; + this->fwork[KA_ACTOR_FWORK_1] = 40.0f; + if (this->timer_0BC == 0) { + this->state = 3; } break; case 2: state = 1; - xDist = fabsf(actor->fwork[4] - actor->obj.pos.x); - yDist = fabsf(actor->fwork[6] - actor->obj.pos.z); - if (actor->aiIndex <= -1) { - actor->state = 3; + xDist = fabsf(this->fwork[KA_ACTOR_FWORK_4] - this->obj.pos.x); + yDist = fabsf(this->fwork[KA_ACTOR_FWORK_6] - this->obj.pos.z); + + if (this->aiIndex <= -1) { + this->state = 3; } else { - if (actor->aiType >= AI360_10) { - xPos = SIN_DEG((actor->index * 45) + gGameFrameCount) * 200.0f; - yPos = COS_DEG((actor->index * 45) + (gGameFrameCount * 2)) * 200.0f; - zPos = SIN_DEG((actor->index * 45) + gGameFrameCount) * 200.0f; + if (this->aiType >= AI360_10) { + xPos = SIN_DEG((this->index * 45) + gGameFrameCount) * 200.0f; + yPos = COS_DEG((this->index * 45) + (gGameFrameCount * 2)) * 200.0f; + zPos = SIN_DEG((this->index * 45) + gGameFrameCount) * 200.0f; } - actor->fwork[4] = gActors[actor->aiIndex].obj.pos.x + xPos; - actor->fwork[5] = gActors[actor->aiIndex].obj.pos.y + yPos; - actor->fwork[6] = gActors[actor->aiIndex].obj.pos.z + zPos; - actor->fwork[1] = gActors[actor->aiIndex].fwork[0] + 10.0f; - if (actor->fwork[1] < 30.0f) { - actor->fwork[1] = 30.0f; + + this->fwork[KA_ACTOR_FWORK_4] = gActors[this->aiIndex].obj.pos.x + xPos; + this->fwork[KA_ACTOR_FWORK_5] = gActors[this->aiIndex].obj.pos.y + yPos; + this->fwork[KA_ACTOR_FWORK_6] = gActors[this->aiIndex].obj.pos.z + zPos; + this->fwork[KA_ACTOR_FWORK_1] = gActors[this->aiIndex].fwork[0] + 10.0f; + + if (this->fwork[KA_ACTOR_FWORK_1] < 30.0f) { + this->fwork[KA_ACTOR_FWORK_1] = 30.0f; } - actor->fwork[3] = 1.4f; - if (actor->aiIndex > -1) { + + this->fwork[KA_ACTOR_FWORK_3] = 1.4f; + + if (this->aiIndex > -1) { if (yDist < 800.0f) { if (xDist < 800.0f) { - actor->fwork[1] = gActors[actor->aiIndex].fwork[0] - 5.0f; + this->fwork[KA_ACTOR_FWORK_1] = gActors[this->aiIndex].fwork[0] - 5.0f; } - } else if (actor->timer_0C0 == 0) { - actor->timer_0C0 = RAND_INT(200.0f) + 200; - actor->fwork[10] = 20.0f; + } else if (this->timer_0C0 == 0) { + this->timer_0C0 = RAND_INT(200.0f) + 200; + this->fwork[KA_ACTOR_FWORK_10] = 20.0f; } - if ((yDist < 1500.0f) && (xDist < 1500.0f)) { - actor->iwork[4] += 1; - actor->iwork[5] = 1; - if ((((actor->index + gGameFrameCount) & 0xB) == 0) && (Rand_ZeroOne() < 0.1f) && - func_360_80031900(actor) && (gActors[0].state == 2)) { - actor->iwork[0] = 1; + if ((yDist < 1500.0f) && (xDist < 1500.0f)) { + this->iwork[KA_ACTOR_IWORK_4] += 1; + this->iwork[KA_ACTOR_IWORK_5] = 1; + + if ((((this->index + gGameFrameCount) & 11) == 0) && (Rand_ZeroOne() < 0.1f) && + func_360_80031900(this) && (gActors[0].state == 2)) { + this->iwork[KA_ACTOR_IWORK_0] = true; } } else { - actor->iwork[4] = 0; + this->iwork[KA_ACTOR_IWORK_4] = 0; } - if ((actor->aiIndex >= AI360_FALCO) && - ((gActors[actor->aiIndex].obj.status == OBJ_DYING) || (gActors[actor->aiIndex].state == 6) || - gActors[actor->aiIndex].obj.status == OBJ_FREE)) { - actor->state = 3; + if ((this->aiIndex >= AI360_FALCO) && + ((gActors[this->aiIndex].obj.status == OBJ_DYING) || (gActors[this->aiIndex].state == 6) || + gActors[this->aiIndex].obj.status == OBJ_FREE)) { + this->state = 3; } } } @@ -2009,10 +2481,12 @@ void Katina_80198AA0(Actor* actor) { case 3: state = 1; - if (actor->timer_0BC == 0) { - actor->fwork[3] = 1.2f; - actor->fwork[1] = 40.0f; + + if (this->timer_0BC == 0) { + this->fwork[KA_ACTOR_FWORK_3] = 1.2f; + this->fwork[KA_ACTOR_FWORK_1] = 40.0f; yRand = RAND_FLOAT(1000.0f); + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) { xRand = RAND_FLOAT_CENTERED(5000.0f); zRand = RAND_FLOAT_CENTERED(5000.0f); @@ -2020,42 +2494,47 @@ void Katina_80198AA0(Actor* actor) { xRand = RAND_FLOAT_CENTERED(10000.0f); zRand = RAND_FLOAT_CENTERED(10000.0f); } - actor->fwork[4] = xRand; - actor->fwork[5] = yRand; - actor->fwork[6] = zRand; - actor->timer_0BC = RAND_INT(20.0f) + 10; + + this->fwork[KA_ACTOR_FWORK_4] = xRand; + this->fwork[KA_ACTOR_FWORK_5] = yRand; + this->fwork[KA_ACTOR_FWORK_6] = zRand; + this->timer_0BC = RAND_INT(20.0f) + 10; } - if (actor->timer_0C0 == 0) { - actor->timer_0C0 = RAND_INT(200.0f) + 200; - actor->fwork[10] = 30.0f; + if (this->timer_0C0 == 0) { + this->timer_0C0 = RAND_INT(200.0f) + 200; + this->fwork[KA_ACTOR_FWORK_10] = 30.0f; } - if ((actor->aiIndex >= AI360_FALCO) && (gActors[actor->aiIndex].obj.status == OBJ_ACTIVE)) { - actor->state = 2; - actor->iwork[2] = AI360_FOX; + if ((this->aiIndex >= AI360_FALCO) && (gActors[this->aiIndex].obj.status == OBJ_ACTIVE)) { + this->state = 2; + this->iwork[KA_ACTOR_IWORK_2] = AI360_FOX; } break; } - xSin = SIN_DEG(actor->obj.rot.x); - xCos = COS_DEG(actor->obj.rot.x); - ySin = SIN_DEG(actor->obj.rot.y); - yCos = COS_DEG(actor->obj.rot.y); + xSin = SIN_DEG(this->obj.rot.x); + xCos = COS_DEG(this->obj.rot.x); + ySin = SIN_DEG(this->obj.rot.y); + yCos = COS_DEG(this->obj.rot.y); if (state != 0) { - xRand = actor->fwork[4] - actor->obj.pos.x; - yRand = actor->fwork[5] - actor->obj.pos.y; - zRand = actor->fwork[6] - actor->obj.pos.z; - if (((actor->index + gGameFrameCount) % 8) == 0) { - actor->fwork[19] = Math_RadToDeg(Math_Atan2F(xRand, zRand)); + xRand = this->fwork[KA_ACTOR_FWORK_4] - this->obj.pos.x; + yRand = this->fwork[KA_ACTOR_FWORK_5] - this->obj.pos.y; + zRand = this->fwork[KA_ACTOR_FWORK_6] - this->obj.pos.z; + + if (((this->index + gGameFrameCount) % 8) == 0) { + this->fwork[KA_ACTOR_FWORK_19] = Math_RadToDeg(Math_Atan2F(xRand, zRand)); xAngle = sqrtf(SQ(xRand) + SQ(zRand)); - actor->fwork[20] = Math_RadToDeg(Math_Atan2F(yRand, xAngle)); + this->fwork[KA_ACTOR_FWORK_20] = Math_RadToDeg(Math_Atan2F(yRand, xAngle)); } - xAngle = actor->fwork[20]; - isClose = Katina_801989F4(actor, ySin, yCos); - if (isClose != 0) { - xAngle += 40.0f * isClose; + + xAngle = this->fwork[KA_ACTOR_FWORK_20]; + + actorCloseToBase = Katina_IsActorCloseToBase(this, ySin, yCos); + + if (actorCloseToBase) { + xAngle += 40.0f * actorCloseToBase; if (xAngle >= 360.0f) { xAngle -= 360.0f; } @@ -2063,108 +2542,122 @@ void Katina_80198AA0(Actor* actor) { if (xAngle < 0.0f) { xAngle += 360.0f; } - } else if ((actor->obj.pos.y < (gGroundHeight + 50.0f)) && (xAngle > 180.0f)) { + } else if ((this->obj.pos.y < (gGroundHeight + 50.0f)) && (xAngle > 180.0f)) { xAngle = 0.0f; - actor->unk_0F4.x = 0.0f; + this->unk_0F4.x = 0.0f; } - Math_SmoothStepToAngle(&actor->unk_0F4.x, xAngle, 0.5f, actor->fwork[2], 0.0001f); - yAngle = Math_SmoothStepToAngle(&actor->unk_0F4.y, actor->fwork[19], 0.5f, actor->fwork[2], 0.0001f) * 30.0f; + + Math_SmoothStepToAngle(&this->unk_0F4.x, xAngle, 0.5f, this->fwork[KA_ACTOR_FWORK_2], 0.0001f); + + yAngle = Math_SmoothStepToAngle(&this->unk_0F4.y, this->fwork[KA_ACTOR_FWORK_19], 0.5f, + this->fwork[KA_ACTOR_FWORK_2], 0.0001f) * + 30.0f; + if (yAngle < 0.0f) { zAngle = yAngle * -1.0f; } else { zAngle = 360.0f - yAngle; } - Math_SmoothStepToAngle(&actor->obj.rot.z, zAngle, 0.1f, 3.0f, 0.01f); + Math_SmoothStepToAngle(&this->obj.rot.z, zAngle, 0.1f, 3.0f, 0.01f); } - actor->obj.rot.x = -actor->unk_0F4.x; - actor->obj.rot.y = actor->unk_0F4.y; + this->obj.rot.x = -this->unk_0F4.x; + this->obj.rot.y = this->unk_0F4.y; - Math_SmoothStepToF(&actor->fwork[0], actor->fwork[1], 0.2f, 1.0f, 0.1f); - Math_SmoothStepToF(&actor->fwork[2], actor->fwork[3], 1.0f, 0.1f, 0.1f); - zVel = (actor->fwork[0] + actor->fwork[9]) * xCos; - yVel = (actor->fwork[0] + actor->fwork[9]) * -xSin; + Math_SmoothStepToF(&this->fwork[KA_ACTOR_FWORK_0], this->fwork[KA_ACTOR_FWORK_1], 0.2f, 1.0f, 0.1f); + Math_SmoothStepToF(&this->fwork[KA_ACTOR_FWORK_2], this->fwork[KA_ACTOR_FWORK_3], 1.0f, 0.1f, 0.1f); + + zVel = (this->fwork[KA_ACTOR_FWORK_0] + this->fwork[KA_ACTOR_FWORK_9]) * xCos; + yVel = (this->fwork[KA_ACTOR_FWORK_0] + this->fwork[KA_ACTOR_FWORK_9]) * -xSin; xVel = ySin * zVel; zVel = yCos * zVel; - actor->vel.x = actor->fwork[13] + xVel; - actor->vel.y = actor->fwork[14] + yVel; - actor->vel.z = actor->fwork[12] + zVel; + this->vel.x = this->fwork[KA_ACTOR_FWORK_13] + xVel; + this->vel.y = this->fwork[KA_ACTOR_FWORK_14] + yVel; + this->vel.z = this->fwork[KA_ACTOR_FWORK_12] + zVel; - actor->fwork[13] -= actor->fwork[13] * 0.1f; - actor->fwork[14] -= actor->fwork[14] * 0.1f; - actor->fwork[12] -= actor->fwork[12] * 0.1f; + this->fwork[KA_ACTOR_FWORK_13] -= this->fwork[KA_ACTOR_FWORK_13] * 0.1f; + this->fwork[KA_ACTOR_FWORK_14] -= this->fwork[KA_ACTOR_FWORK_14] * 0.1f; + this->fwork[KA_ACTOR_FWORK_12] -= this->fwork[KA_ACTOR_FWORK_12] * 0.1f; - if ((actor->obj.pos.y < gGroundHeight + 40.0f) && (actor->vel.y < 0.0f)) { - actor->obj.pos.y = gGroundHeight + 40.0f; - actor->vel.y = 0.0f; + if ((this->obj.pos.y < gGroundHeight + 40.0f) && (this->vel.y < 0.0f)) { + this->obj.pos.y = gGroundHeight + 40.0f; + this->vel.y = 0.0f; } - if (actor->iwork[0] != 0) { - actor->iwork[0] = 0; - yVel = (-xSin * 200.0f * 0.5f); - xVel = (xCos * 200.0f * 0.5f); - zVel = (xCos * 200.0f * 0.5f); - Actor_SpawnPlayerLaser(actor->aiType, actor->obj.pos.x + ((ySin * xVel) * 1.5f), - actor->obj.pos.y + (yVel * 1.5f), actor->obj.pos.z + ((yCos * zVel) * 1.5f), - (ySin * (xCos * 200.0f * 0.5f)), (-xSin * 200.0f * 0.5f), - (yCos * (xCos * 200.0f * 0.5f)), actor->obj.rot.x, actor->obj.rot.y, actor->obj.rot.z); + if (this->iwork[KA_ACTOR_IWORK_0]) { + this->iwork[KA_ACTOR_IWORK_0] = false; + + yVel = -xSin * 200.0f * 0.5f; + xVel = +xCos * 200.0f * 0.5f; + zVel = +xCos * 200.0f * 0.5f; + + Actor_SpawnPlayerLaser(this->aiType, this->obj.pos.x + (ySin * xVel * 1.5f), this->obj.pos.y + (yVel * 1.5f), + this->obj.pos.z + (yCos * zVel * 1.5f), ySin * (xCos * 200.0f * 0.5f), + -xSin * 200.0f * 0.5f, yCos * (xCos * 200.0f * 0.5f), this->obj.rot.x, this->obj.rot.y, + this->obj.rot.z); } - ActorAllRange_ApplyDamage(actor); - radarMark = &gRadarMarks[actor->index]; + + ActorAllRange_ApplyDamage(this); + + radarMark = &gRadarMarks[this->index]; radarMark->status = 1; - radarMark->type = actor->aiType; - radarMark->pos.x = actor->obj.pos.x; - radarMark->pos.y = actor->obj.pos.y; - radarMark->pos.z = actor->obj.pos.z; - radarMark->yRot = actor->unk_0F4.y + 180.0f; - if (actor->iwork[8] != 0) { - actor->iwork[8]--; + radarMark->type = this->aiType; + radarMark->pos.x = this->obj.pos.x; + radarMark->pos.y = this->obj.pos.y; + radarMark->pos.z = this->obj.pos.z; + radarMark->yRot = this->unk_0F4.y + 180.0f; + + if (this->iwork[KA_ACTOR_IWORK_8] != 0) { + this->iwork[KA_ACTOR_IWORK_8]--; } } -void Katina_801995B4(Actor* actor) { +void Katina_EnemyDraw(ActorAllRange* this) { s32 pad3[3]; f32 angle; Vec3f D_i4_8019F4A8 = { 0.0f, 0.0f, 0.0f }; Vec3f pad[30]; - if (((actor->index + gSysFrameCount) % 8) == 0) { - actor->iwork[23] = 1; - if ((fabsf(actor->obj.pos.x - gPlayer[0].cam.eye.x) < 4500.0f) && - (fabsf(actor->obj.pos.z - gPlayer[0].cam.eye.z) < 4500.0f)) { - actor->iwork[23] = 0; + if (((this->index + gSysFrameCount) % 8) == 0) { + this->iwork[KA_ACTOR_LOW_POLY] = true; + if ((fabsf(this->obj.pos.x - gPlayer[0].cam.eye.x) < 4500.0f) && + (fabsf(this->obj.pos.z - gPlayer[0].cam.eye.z) < 4500.0f)) { + this->iwork[KA_ACTOR_LOW_POLY] = false; } } - if ((actor->iwork[8] != 0) && (actor->aiType < AI360_GREAT_FOX)) { - angle = SIN_DEG(actor->iwork[8] * 400.0f) * actor->iwork[8]; + if ((this->iwork[KA_ACTOR_IWORK_8] != 0) && (this->aiType < AI360_GREAT_FOX)) { + angle = SIN_DEG(this->iwork[KA_ACTOR_IWORK_8] * 400.0f) * this->iwork[KA_ACTOR_IWORK_8]; Matrix_RotateY(gGfxMatrix, M_DTOR * angle, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_DTOR * angle, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, M_DTOR * angle, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); } - if (actor->iwork[23] != 0) { + + if (this->iwork[KA_ACTOR_LOW_POLY]) { RCP_SetupDL(&gMasterDisp, 34); gDPSetPrimColor(gMasterDisp++, 0, 0, 80, 64, 64, 255); } else { RCP_SetupDL(&gMasterDisp, 29); } - if ((actor->timer_0C6 % 2) == 0) { + + if ((this->timer_0C6 % 2) == 0) { gSPFogPosition(gMasterDisp++, gFogNear, 1005); } - switch (actor->unk_0B6) { + + switch (this->unk_0B6) { case 0: - if (actor->iwork[23] != 0) { - gSPDisplayList(gMasterDisp++, D_KA_600EFF0); + if (this->iwork[KA_ACTOR_LOW_POLY]) { + gSPDisplayList(gMasterDisp++, aKaEnemy1LowPolyDL); } else { - gSPDisplayList(gMasterDisp++, D_KA_6001530); + gSPDisplayList(gMasterDisp++, aKaEnemy1DL); } break; case 1: - gSPDisplayList(gMasterDisp++, D_KA_600E050); + gSPDisplayList(gMasterDisp++, aKaCornerianFighterDL); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY); - Actor_DrawEngineGlow(actor, 0); + Actor_DrawEngineGlow(this, 0); break; } } diff --git a/src/overlays/ovl_i4/fox_sz.c b/src/overlays/ovl_i4/fox_sz.c index 5484f7d1..e8d68048 100644 --- a/src/overlays/ovl_i4/fox_sz.c +++ b/src/overlays/ovl_i4/fox_sz.c @@ -67,7 +67,7 @@ void SectorZ_80199900(Actor* actor, s32 arg1) { void SectorZ_80199B18(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale) { Effect_Initialize(effect); effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_339; + effect->obj.id = OBJ_EFFECT_FIRE_SMOKE; effect->obj.pos.x = xPos; effect->obj.pos.y = yPos; @@ -1240,7 +1240,7 @@ void SectorZ_LevelComplete(Player* player) { player->csState = 10; player->csTimer = 1000; - Audio_StopPlayerNoise(0U); + Audio_StopPlayerNoise(0); Audio_KillSfxBySource(player->sfxSource); Play_ClearObjectData(); diff --git a/src/overlays/ovl_i5/fox_ma.c b/src/overlays/ovl_i5/fox_ma.c index 3ae62ac3..c43b4fb9 100644 --- a/src/overlays/ovl_i5/fox_ma.c +++ b/src/overlays/ovl_i5/fox_ma.c @@ -6265,6 +6265,7 @@ void Macbeth_LevelComplete2(Player* player) { Math_SmoothStepToF(&gCsCamEyeX, player->pos.x - 2000.0f, 0.1f, D_ctx_80177A48[8], 0.0f); gCsCamEyeZ -= 1.0f; } + //! @BUG: The following condition is always true: if ((gCsFrameCount >= 2120) || (gCsFrameCount < 2175)) { Math_SmoothStepToF(&gCsCamAtY, player->pos.y + 70.0f, 0.1f, 8.0f, 0.0f); } diff --git a/src/sys/sys_fault.c b/src/sys/sys_fault.c index b0240169..000304a5 100644 --- a/src/sys/sys_fault.c +++ b/src/sys/sys_fault.c @@ -243,7 +243,7 @@ void Fault_ThreadEntry(void* arg0) { func_8000762C(300, 10, "-"); gControllerPlugged[0] = 1; -#if MODS_AUTO_DEBUGGER == 0 // Turn this off for instant crash debugger (no button combination needed) +#if MODS_AUTO_DEBUGGER == 0 // Instant crash debugger (no button combination needed) while (var_s5 == 0) { osSendMesg(&gSerialThreadMesgQueue, (OSMesg) SI_READ_CONTROLLER, OS_MESG_NOBLOCK); MQ_WAIT_FOR_MESG(&gControllerMesgQueue, NULL); diff --git a/tools/Torch b/tools/Torch index f24e7ec6..45e6853e 160000 --- a/tools/Torch +++ b/tools/Torch @@ -1 +1 @@ -Subproject commit f24e7ec63b81bfe24e4daa795cc1e1d690e789cd +Subproject commit 45e6853e315933d57a0e7213a2d5590fb74f628a From d08678a5acd8ebdb5f58a59d12fdcebefe87470c Mon Sep 17 00:00:00 2001 From: inspectredc <78732756+inspectredc@users.noreply.github.com> Date: Sun, 5 May 2024 21:29:59 +0100 Subject: [PATCH 059/151] Use array count for more things (#230) * array count more things * fix array count error * undo array count for later --------- Co-authored-by: Alejandro Javier Asenjo Nitti --- src/audio/audio_effects.c | 2 +- src/audio/audio_heap.c | 10 +++---- src/audio/audio_seqplayer.c | 30 ++++++++++----------- src/audio/audio_thread.c | 6 ++--- src/engine/fox_360.c | 2 +- src/engine/fox_beam.c | 14 +++++----- src/engine/fox_bg.c | 8 +++--- src/engine/fox_boss.c | 2 +- src/engine/fox_demo.c | 2 +- src/engine/fox_effect.c | 2 +- src/engine/fox_enmy.c | 2 +- src/engine/fox_game.c | 2 +- src/engine/fox_hud.c | 8 +++--- src/engine/fox_play.c | 2 +- src/overlays/ovl_ending/fox_end1.c | 4 +-- src/overlays/ovl_i1/fox_co.c | 10 +++---- src/overlays/ovl_i1/fox_ve1.c | 22 ++++++++-------- src/overlays/ovl_i3/fox_aq.c | 42 +++++++++++++++--------------- src/overlays/ovl_i3/fox_so.c | 10 +++---- src/overlays/ovl_i3/fox_zo.c | 30 ++++++++++----------- src/overlays/ovl_i4/fox_bo.c | 4 +-- src/overlays/ovl_i4/fox_ka.c | 3 +-- src/overlays/ovl_i4/fox_sz.c | 2 +- src/overlays/ovl_i5/fox_ma.c | 24 ++++++++--------- src/overlays/ovl_i5/fox_ti.c | 8 +++--- src/overlays/ovl_i6/fox_andross.c | 6 ++--- src/overlays/ovl_i6/fox_sy.c | 8 +++--- src/overlays/ovl_i6/fox_turret.c | 4 +-- 28 files changed, 134 insertions(+), 135 deletions(-) diff --git a/src/audio/audio_effects.c b/src/audio/audio_effects.c index 925de24e..7a3f84ea 100644 --- a/src/audio/audio_effects.c +++ b/src/audio/audio_effects.c @@ -17,7 +17,7 @@ void func_80013400(SequenceChannel* channel, s32 updateVolume) { if (channel->changes.s.pan) { channel->pan = channel->newPan * channel->panChannelWeight; } - for (i = 0; i < 4; i++) { + for (i = 0; i < ARRAY_COUNT(channel->layers); i++) { SequenceLayer* layer = channel->layers[i]; if ((layer != NULL) && layer->enabled && (layer->note != NULL)) { diff --git a/src/audio/audio_heap.c b/src/audio/audio_heap.c index ebbcccdb..a7bb79e9 100644 --- a/src/audio/audio_heap.c +++ b/src/audio/audio_heap.c @@ -109,7 +109,7 @@ void AudioHeap_DiscardFont(s32 fontId) { void AudioHeap_DiscardSequence(s32 seqId) { s32 i; - for (i = 0; i < 4; i++) { + for (i = 0; i < ARRAY_COUNT(gSeqPlayers); i++) { if (gSeqPlayers[i].enabled && gSeqPlayers[i].seqId == seqId) { func_800144E4(&gSeqPlayers[i]); } @@ -300,7 +300,7 @@ void* AudioHeap_AllocCached(s32 tableType, s32 size, s32 cache, s32 id) { // Check if there is a side which isn't in active use, if so, evict that one. if (tableType == 0) { if (loadStatusEntry0 == 2) { - for (i = 0; i < 4; i++) { + for (i = 0; i < ARRAY_COUNT(gSeqPlayers); i++) { if (gSeqPlayers[i].enabled && (gSeqPlayers[i].seqId == temporaryCache->entries[0].id)) { break; } @@ -311,7 +311,7 @@ void* AudioHeap_AllocCached(s32 tableType, s32 size, s32 cache, s32 id) { } } if (loadStatusEntry1 == 2) { - for (i = 0; i < 4; i++) { + for (i = 0; i < ARRAY_COUNT(gSeqPlayers); i++) { if (gSeqPlayers[i].enabled && (gSeqPlayers[i].seqId == temporaryCache->entries[1].id)) { break; } @@ -570,7 +570,7 @@ s32 AudioHeap_ResetStep(void) { } switch (gResetStatus) { case 5: - for (i = 0; i < 4; i++) { + for (i = 0; i < ARRAY_COUNT(gSeqPlayers); i++) { func_800144E4(&gSeqPlayers[i]); } gResetFadeoutFramesLeft = 4 / sp24; @@ -703,7 +703,7 @@ void AudioHeap_Init(void) { for (i = 0; i != 2; i++) { gAbiCmdBuffs[i] = AudioHeap_AllocZeroed(&gMiscPool, gMaxAudioCmds * 8); } - for (i = 0; i < 4; i++) { + for (i = 0; i < ARRAY_COUNT(gSynthReverbs); i++) { gSynthReverbs[i].useReverb = 0; } gNumSynthReverbs = spec->numReverbs; diff --git a/src/audio/audio_seqplayer.c b/src/audio/audio_seqplayer.c index 54614852..032c72e7 100644 --- a/src/audio/audio_seqplayer.c +++ b/src/audio/audio_seqplayer.c @@ -142,7 +142,7 @@ void func_8001410C(SequenceChannel* channel, s32 arg1) { void func_8001415C(SequenceChannel* channel) { s32 var_s0; - for (var_s0 = 0; var_s0 < 4; var_s0++) { + for (var_s0 = 0; var_s0 < ARRAY_COUNT(channel->layers); var_s0++) { func_8001410C(channel, var_s0); } func_80012964(&channel->notePool); @@ -212,18 +212,18 @@ void func_80014370(SequencePlayer* seqPlayer, u16 arg1) { } void func_80014440(SequencePlayer* seqPlayer, u8 arg1, u8* arg2) { - SequenceChannel* temp_s2 = seqPlayer->channels[arg1]; + SequenceChannel* channel = seqPlayer->channels[arg1]; s32 i; - if (IS_SEQUENCE_CHANNEL_VALID(temp_s2) != 0) { - temp_s2->scriptState.depth = 0; - temp_s2->scriptState.pc = arg2; - temp_s2->enabled = 1; - temp_s2->finished = 0; - temp_s2->delay = 0; - for (i = 0; i < 4; i++) { - if (temp_s2->layers[i] != NULL) { - func_8001410C(temp_s2, i); + if (IS_SEQUENCE_CHANNEL_VALID(channel) != 0) { + channel->scriptState.depth = 0; + channel->scriptState.pc = arg2; + channel->enabled = 1; + channel->finished = 0; + channel->delay = 0; + for (i = 0; i < ARRAY_COUNT(channel->layers); i++) { + if (channel->layers[i] != NULL) { + func_8001410C(channel, i); } } } @@ -715,7 +715,7 @@ void func_800153E8(SequenceChannel* channel) { return; } if (channel->stopScript) { - for (i = 0; i < 4; i++) { + for (i = 0; i < ARRAY_COUNT(channel->layers); i++) { if (channel->layers[i] != NULL) { func_80014748(channel->layers[i]); } @@ -1093,7 +1093,7 @@ void func_800153E8(SequenceChannel* channel) { } } end_loop:; - for (i = 0; i < 4; i++) { + for (i = 0; i < ARRAY_COUNT(channel->layers); i++) { if (channel->layers[i] != NULL) { func_80014748(channel->layers[i]); } @@ -1352,7 +1352,7 @@ void func_80015FD4(SequencePlayer* seqPlayer) { void func_8001678C(s32 arg0) { s32 i; - for (i = 0; i < 4; i++) { + for (i = 0; i < ARRAY_COUNT(gSeqPlayers); i++) { if (gSeqPlayers[i].enabled == 1) { func_80015FD4(&gSeqPlayers[i]); func_800135A8(&gSeqPlayers[i]); @@ -1404,7 +1404,7 @@ void func_800168BC(void) { gSeqLayers[i].channel = NULL; gSeqLayers[i].enabled = false; } - for (i = 0; i < 4; i++) { + for (i = 0; i < ARRAY_COUNT(gSeqPlayers); i++) { for (j = 0; j < 16; j++) { gSeqPlayers[i].channels[j] = &gSeqChannelNone; } diff --git a/src/audio/audio_thread.c b/src/audio/audio_thread.c index 499cb668..034bc1c8 100644 --- a/src/audio/audio_thread.c +++ b/src/audio/audio_thread.c @@ -177,7 +177,7 @@ void AudioThread_ProcessGlobalCmd(AudioCmd* cmd) { gAudioSoundMode = cmd->asUInt; break; case AUDIOCMD_OP_GLOBAL_MUTE: - for (i = 0; i < 4; i++) { + for (i = 0; i < ARRAY_COUNT(gSeqPlayers); i++) { SequencePlayer* seqplayer = &gSeqPlayers[i]; seqplayer->muted = true; @@ -197,7 +197,7 @@ void AudioThread_ProcessGlobalCmd(AudioCmd* cmd) { } } } - for (i = 0; i < 4; i++) { + for (i = 0; i < ARRAY_COUNT(gSeqPlayers); i++) { SequencePlayer* seqplayer = &gSeqPlayers[i]; seqplayer->muted = false; @@ -315,7 +315,7 @@ void AudioThread_ProcessCmds(u32 msg) { } if ((cmd->op & 0xF0) == 0xF0) { AudioThread_ProcessGlobalCmd(cmd); - } else if (cmd->arg0 < 4) { + } else if (cmd->arg0 < ARRAY_COUNT(gSeqPlayers)) { player = &gSeqPlayers[cmd->arg0]; if (cmd->op & 0x80) { AudioThread_ProcessGlobalCmd(cmd); diff --git a/src/engine/fox_360.c b/src/engine/fox_360.c index d9c30a34..b15a5bb4 100644 --- a/src/engine/fox_360.c +++ b/src/engine/fox_360.c @@ -422,7 +422,7 @@ void ActorAllRange_SpawnStarWolf(void) { Actor* actor; s32 i; - for (i = 0, actor = &gActors[4]; i < 4; i++, actor++) { + for (i = 0, actor = &gActors[4]; i < ARRAY_COUNT(sStarWolfSpawnPos); i++, actor++) { if (gStarWolfTeamAlive[i] != 0) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; diff --git a/src/engine/fox_beam.c b/src/engine/fox_beam.c index b58c7663..fd982d30 100644 --- a/src/engine/fox_beam.c +++ b/src/engine/fox_beam.c @@ -743,7 +743,7 @@ void func_beam_80038140(PlayerShot* shot) { sp60 = false; } if (sp60) { - for (i = 0, effect = gEffects; i < 100; i++, effect++) { + for (i = 0, effect = gEffects; i < ARRAY_COUNT(gEffects); i++, effect++) { if ((effect->obj.status >= OBJ_ACTIVE) && (effect->info.unk_19 != 0) && (fabsf(shot->obj.pos.z - effect->obj.pos.z) < 200.0f) && (fabsf(shot->obj.pos.x - effect->obj.pos.x) < 100.0f) && @@ -914,7 +914,7 @@ void func_beam_80038140(PlayerShot* shot) { } } } else { - for (i = 0, scenery = gScenery; i < 50; i++, scenery++) { + for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) { if (scenery->obj.status == OBJ_ACTIVE) { if ((scenery->obj.id == OBJ_SCENERY_1) || (scenery->obj.id == OBJ_SCENERY_ME_TUNNEL) || (scenery->obj.id == OBJ_SCENERY_4) || (scenery->obj.id == OBJ_SCENERY_5) || @@ -935,7 +935,7 @@ void func_beam_80038140(PlayerShot* shot) { } } if (sp60) { - for (i = 0, sprite = gSprites; i < 40; i++, sprite++) { + for (i = 0, sprite = gSprites; i < ARRAY_COUNT(gSprites); i++, sprite++) { if (sprite->obj.status == OBJ_ACTIVE) { if (sprite->obj.id != OBJ_SPRITE_TI_CACTUS) { if (func_beam_80037698(shot, sprite)) { @@ -949,7 +949,7 @@ void func_beam_80038140(PlayerShot* shot) { } } } - for (i = 0, boss = gBosses; i < 4; i++, boss++) { + for (i = 0, boss = gBosses; i < ARRAY_COUNT(gBosses); i++, boss++) { if ((boss->obj.status == OBJ_ACTIVE) && (boss->timer_05A == 0)) { if ((boss->obj.id == OBJ_BOSS_308) || (boss->obj.id == OBJ_BOSS_312) || (boss->obj.id == OBJ_BOSS_309) || (boss->obj.id == OBJ_BOSS_313)) { @@ -1856,7 +1856,7 @@ void func_beam_8003C4D0(PlayerShot* shot, s32 damage) { Player* player; f32 temp_fs2 = shot->scale * 60.0f; - for (i = 0, scenery = gScenery; i < 50; i++, scenery++) { + for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) { if ((scenery->obj.status == OBJ_ACTIVE) && (scenery->obj.id == OBJ_SCENERY_56)) { sp68 = scenery->obj.pos.x - shot->obj.pos.x; sp64 = scenery->obj.pos.y - shot->obj.pos.y; @@ -1867,7 +1867,7 @@ void func_beam_8003C4D0(PlayerShot* shot, s32 damage) { scenery->dmgPart = 0; } } - for (i = 0, sprite = gSprites; i < 40; i++, sprite++) { + for (i = 0, sprite = gSprites; i < ARRAY_COUNT(gSprites); i++, sprite++) { if ((sprite->obj.status == OBJ_ACTIVE) && ((sprite->obj.id == OBJ_SPRITE_FO_POLE) || (sprite->obj.id == OBJ_SPRITE_TI_CACTUS) || (sprite->obj.id == OBJ_SPRITE_CO_POLE) || (sprite->obj.id == OBJ_SPRITE_CO_TREE))) { @@ -1943,7 +1943,7 @@ void func_beam_8003C4D0(PlayerShot* shot, s32 damage) { func_beam_8003C008(shot); } effect = gEffects; - for (i = 0; i < 100; i++, effect++) { + for (i = 0; i < ARRAY_COUNT(gEffects); i++, effect++) { if (effect->obj.status == OBJ_ACTIVE) { sp68 = effect->obj.pos.x - shot->obj.pos.x; sp64 = effect->obj.pos.y - shot->obj.pos.y; diff --git a/src/engine/fox_bg.c b/src/engine/fox_bg.c index 9f8e5119..78c2b18e 100644 --- a/src/engine/fox_bg.c +++ b/src/engine/fox_bg.c @@ -926,7 +926,7 @@ void Background_DrawGround(void) { } else { gGroundSurface = SURFACE_GRASS; gBgColor = 0x845; // 8, 8, 32 - for (i = 0; i < 4; i++) { + for (i = 0; i < ARRAY_COUNT(sGroundPositions360x); i++) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, sGroundPositions360x[i], 0.0f, sGroundPositions360z[i], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -992,7 +992,7 @@ void Background_DrawGround(void) { gSPDisplayList(gMasterDisp++, D_TR_6005880); Matrix_Pop(&gGfxMatrix); } else { - for (i = 0; i < 4; i++) { + for (i = 0; i < ARRAY_COUNT(sGroundPositions360x); i++) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, sGroundPositions360x[i], 0.0f, sGroundPositions360z[i], MTXF_APPLY); Matrix_Scale(gGfxMatrix, 1.5f, 1.0f, 1.0f, MTXF_APPLY); @@ -1071,7 +1071,7 @@ void Background_DrawGround(void) { } else { RCP_SetupDL_20(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } - for (i = 0; i < 4; i++) { + for (i = 0; i < ARRAY_COUNT(sGroundPositions360x); i++) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, sGroundPositions360x[i], 0.0f, sGroundPositions360z[i], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -1093,7 +1093,7 @@ void Background_DrawGround(void) { } else { RCP_SetupDL_20(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } - for (i = 0; i < 4; i++) { + for (i = 0; i < ARRAY_COUNT(sGroundPositions360x); i++) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, sGroundPositions360x[i], 0.0f, sGroundPositions360z[i], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); diff --git a/src/engine/fox_boss.c b/src/engine/fox_boss.c index 6dfc39c3..476ff09b 100644 --- a/src/engine/fox_boss.c +++ b/src/engine/fox_boss.c @@ -87,7 +87,7 @@ void Boss_SpawnActor189(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 ar f32 arg9, s32 argA, s32 argB) { s32 i; - for (i = 59; i >= 0; i--) { + for (i = (ARRAY_COUNT(gActors)) - 1; i >= 0; i--) { if (gActors[i].obj.status == OBJ_FREE) { Boss_SetupActor189(&gActors[i], arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, argA, argB); return; diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index f28533d7..9127e61a 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -2933,7 +2933,7 @@ void Cutscene_DrawGreatFox(void) { ((gCurrentLevel != LEVEL_SECTOR_Z) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE))) { RCP_SetupDL_49(); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - for (i = 0, var_s6_2 = D_demo_800CA0BC; i < 4; i++, var_s6_2++) { + for (i = 0, var_s6_2 = D_demo_800CA0BC; i < ARRAY_COUNT(sp9C); i++, var_s6_2++) { if ((i != 1) || gGreatFoxIntact) { sp9C[i] = 0.0f; if (i < 2) { diff --git a/src/engine/fox_effect.c b/src/engine/fox_effect.c index 53d4a472..a6d9b65c 100644 --- a/src/engine/fox_effect.c +++ b/src/engine/fox_effect.c @@ -632,7 +632,7 @@ void func_effect_800794CC(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { void func_effect_8007953C(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { s32 i; - for (i = 79; i >= 0; i--) { + for (i = (ARRAY_COUNT(gEffects) - 20) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { func_effect_8007905C(&gEffects[i], xPos, yPos, zPos, scale2, 0); break; diff --git a/src/engine/fox_enmy.c b/src/engine/fox_enmy.c index 65002e7e..1bebe4a7 100644 --- a/src/engine/fox_enmy.c +++ b/src/engine/fox_enmy.c @@ -1981,7 +1981,7 @@ void func_enmy_80067348(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xRot, f3 void func_enmy_800674B4(f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 arg5, f32 arg6, f32 arg7) { s32 i; - for (i = 59; i >= 50; i--) { + for (i = ARRAY_COUNT(gActors) - 1; i >= 50; i--) { if (gActors[i].obj.status == OBJ_FREE) { func_enmy_80067348(&gActors[i], xPos, yPos, zPos, xRot, yRot, arg5, arg6, arg7); break; diff --git a/src/engine/fox_game.c b/src/engine/fox_game.c index a945e06f..22116be2 100644 --- a/src/engine/fox_game.c +++ b/src/engine/fox_game.c @@ -412,7 +412,7 @@ void Game_Update(void) { gVersusStage = 0; gVsPointsToWin = 3; gBlurAlpha = 255; - for (i = 0; i < 30; i++) { + for (i = 0; i < ARRAY_COUNT(gLeveLClearStatus); i++) { gLeveLClearStatus[i] = 0; } gExpertMode = false; diff --git a/src/engine/fox_hud.c b/src/engine/fox_hud.c index 92894176..f229a965 100644 --- a/src/engine/fox_hud.c +++ b/src/engine/fox_hud.c @@ -1979,7 +1979,7 @@ void func_hud_8008A240(void) { } if (gVersusMode == 1) { - for (i = 0, item = gItems; i < 20; i++, item++) { + for (i = 0, item = gItems; i < ARRAY_COUNT(gItems); i++, item++) { if (item->obj.status >= OBJ_ACTIVE) { gRadarMarks[item->index + 50].status = 1; gRadarMarks[item->index + 50].type = 103; @@ -2132,7 +2132,7 @@ s32 func_hud_8008A4DC(void) { D_hud_80161710--; } - for (i = 64; i >= 0; i--) { + for (i = ARRAY_COUNT(gRadarMarks) - 1; i >= 0; i--) { if ((gRadarMarks[i].status == 0) || (fabsf(gRadarMarks[i].pos.x) >= (temp2 + 1000.0f)) || (fabsf(gRadarMarks[i].pos.z) >= (temp2 + 1000.0f))) { continue; @@ -2458,7 +2458,7 @@ s32 func_hud_8008B774(void) { if ((i >= 1) && (i <= 3) && ((gLevelMode != LEVELMODE_ALL_RANGE) || (gCurrentLevel == LEVEL_CORNERIA) || (gCurrentLevel == LEVEL_SECTOR_Y))) { - for (i = 0; i < 60; i++) { + for (i = 0; i < ARRAY_COUNT(gActors); i++) { if ((gActors[i].obj.status == OBJ_ACTIVE) && (gActors[i].iwork[12] == temp)) { if ((gActors[i].unk_0B4 == EVID_2) || (gActors[i].unk_0B4 == EVID_43) || ((gActors[i].obj.id == OBJ_ACTOR_TEAM_BOSS) && @@ -3848,7 +3848,7 @@ bool func_hud_8009092C(Actor* actor) { boss = &gBosses[1]; - for (i = 1; i < 4; i++, boss++) { + for (i = 1; i < ARRAY_COUNT(gBosses); i++, boss++) { if (boss->obj.status == OBJ_ACTIVE) { var_s5 = true; if (actor->aiIndex == 0) { diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index a613f799..9dad5c5b 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -2544,7 +2544,7 @@ void Play_Init(void) { s32 i; gArwingSpeed = 40.0f; - for (i = 0; i < 4; i++) { + for (i = 0; i < ARRAY_COUNT(gControllerRumbleEnabled); i++) { gControllerRumbleEnabled[i] = 0; } diff --git a/src/overlays/ovl_ending/fox_end1.c b/src/overlays/ovl_ending/fox_end1.c index 32e39d34..f0c4ccce 100644 --- a/src/overlays/ovl_ending/fox_end1.c +++ b/src/overlays/ovl_ending/fox_end1.c @@ -1592,7 +1592,7 @@ bool Ending_8018BCB0(void) { Lights_SetOneLight(&gMasterDisp, gLight1x, gLight1y, gLight1z, gLight1R, gLight1G, gLight1B, gAmbientR, gAmbientG, gAmbientB); - for (i = 59; i >= 0; i--) { + for (i = ARRAY_COUNT(gActors) - 1; i >= 0; i--) { if (gActors[i].obj.status != OBJ_FREE) { switch (gActors[i].obj.id) { case 0: @@ -1752,7 +1752,7 @@ void Ending_8018C21C(void) { Matrix_Push(&gGfxMatrix); - for (i = 59; i >= 0; i--) { + for (i = ARRAY_COUNT(gActors) - 1; i >= 0; i--) { if (gActors[i].obj.status != OBJ_FREE) { Matrix_Push(&gGfxMatrix); switch (gActors[i].obj.id) { diff --git a/src/overlays/ovl_i1/fox_co.c b/src/overlays/ovl_i1/fox_co.c index 3d88e7aa..a4d594ba 100644 --- a/src/overlays/ovl_i1/fox_co.c +++ b/src/overlays/ovl_i1/fox_co.c @@ -307,7 +307,7 @@ void Corneria_80187AC8(Boss* boss) { if (!(D_edisplay_801615D0.y < 0.0f)) { sprite = gSprites; - for (var_s1 = 0; var_s1 < 40; var_s1++, sprite++) { + for (var_s1 = 0; var_s1 < ARRAY_COUNT(gSprites); var_s1++, sprite++) { if ((sprite->obj.status == OBJ_ACTIVE) && (sprite->obj.id == OBJ_SPRITE_CO_TREE)) { if ((fabsf(sprite->obj.pos.x - D_i1_8019B6D8[20]) < 90.0f) && (fabsf(sprite->obj.pos.z - D_i1_8019B6D8[32]) < 90.0f)) { @@ -1203,7 +1203,7 @@ void Corneria_8018AED0(Actor* actor) { void Corneria_8018B0B4(Actor* actor) { s32 i; - for (i = 0; i < 50; i++) { + for (i = 0; i < ARRAY_COUNT(gScenery); i++) { if (gScenery[i].obj.status == OBJ_FREE) { Scenery_Initialize(&gScenery[i]); gScenery[i].obj.status = OBJ_INIT; @@ -1503,7 +1503,7 @@ void Corneria_Boss293_Init(Boss293* this) { temp_s1 = this->timer_05A; // Bosses OBJ_BOSS_294 to OBJ_BOSS_296 - for (i = 1; i < 4; i++) { + for (i = 1; i < ARRAY_COUNT(gBosses); i++) { Boss_Initialize(&gBosses[i]); gBosses[i].obj.status = OBJ_INIT; gBosses[i].obj.id = i + 293; @@ -1869,7 +1869,7 @@ void Corneria_8018C19C(Boss* boss) { Matrix_MultVec3f(gCalcMatrix, &D_i1_801998F0[0], &sp84[3]); effect = gEffects; - for (i = 0; i < 100; i++, effect++) { + for (i = 0; i < ARRAY_COUNT(gEffects); i++, effect++) { if (effect->obj.status == OBJ_FREE) { Effect_Initialize(effect); effect->obj.status = OBJ_INIT; @@ -2474,7 +2474,7 @@ void Corneria_8018F4A4(void) { s32 i; if (((gGameFrameCount % 16) == 0) && !(gPlayer[0].csState < 4)) { - for (i = 0; i < 50; i++) { + for (i = 0; i < ARRAY_COUNT(gScenery); i++) { if (gScenery[i].obj.status == OBJ_FREE) { Corneria_8018F3BC(&gScenery[i], 4000.0f); break; diff --git a/src/overlays/ovl_i1/fox_ve1.c b/src/overlays/ovl_i1/fox_ve1.c index bdf66425..b6c926e5 100644 --- a/src/overlays/ovl_i1/fox_ve1.c +++ b/src/overlays/ovl_i1/fox_ve1.c @@ -255,7 +255,7 @@ void Venom1_BossTrigger1_Update(Ve1BossTrigger1* this) { Boss* boss = &gBosses[0]; s32 i; - for (i = 0; i < 4; i++, boss++) { + for (i = 0; i < ARRAY_COUNT(gBosses); i++, boss++) { if ((boss->obj.status != OBJ_FREE) && (boss->obj.id == OBJ_BOSS_319)) { if (boss->obj.pos.z <= this->obj.pos.z) { D_i1_8019C0B8 = (s32) this->obj.rot.x + 1; @@ -270,7 +270,7 @@ void Venom1_BossTrigger2_Update(Ve1BossTrigger2* this) { Boss* boss = &gBosses[0]; s32 i; - for (i = 0; i < 4; i++, boss++) { + for (i = 0; i < ARRAY_COUNT(gBosses); i++, boss++) { if ((boss->obj.status != OBJ_FREE) && (boss->obj.id == OBJ_BOSS_319)) { if (boss->obj.pos.z <= this->obj.pos.z) { D_i1_8019C0B8 = 0; @@ -285,7 +285,7 @@ void Venom1_BossTrigger3_Update(Ve1BossTrigger3* this) { Boss* boss = &gBosses[0]; s32 i; - for (i = 0; i < 4; i++, boss++) { + for (i = 0; i < ARRAY_COUNT(gBosses); i++, boss++) { if ((boss->obj.status != OBJ_FREE) && (boss->obj.id == OBJ_BOSS_319)) { if (boss->obj.pos.z <= this->obj.pos.z) { D_i1_8019C0BC = (s32) this->obj.rot.x + 1; @@ -300,7 +300,7 @@ void Venom1_BossTrigger4_Update(Ve1BossTrigger4* this) { Boss* boss = &gBosses[0]; s32 i; - for (i = 0; i < 4; i++, boss++) { + for (i = 0; i < ARRAY_COUNT(gBosses); i++, boss++) { if ((boss->obj.status != OBJ_FREE) && (boss->obj.id == OBJ_BOSS_319)) { if (boss->obj.pos.z <= this->obj.pos.z) { D_i1_8019C0C0 = 1; @@ -361,7 +361,7 @@ void Venom1_80192518(Actor* actor) { scenery = &gScenery[0]; - for (i = 0; i < 50; i++, scenery++) { + for (i = 0; i < ARRAY_COUNT(gScenery); i++, scenery++) { if ((scenery->obj.id == OBJ_SCENERY_128) || (scenery->obj.id == OBJ_SCENERY_129) || (scenery->obj.id == OBJ_SCENERY_130)) { if (((actor->obj.pos.z + 1100.0f - scenery->obj.pos.z) < 2200.0f) && @@ -692,7 +692,7 @@ void Venom1_80192EB0(Actor* actor) { var_ft4 = 0.0f; scenery = gScenery; - for (i = 0; i < 50; i++, scenery++) { + for (i = 0; i < ARRAY_COUNT(gScenery); i++, scenery++) { if (((scenery->obj.id == OBJ_SCENERY_128) || (scenery->obj.id == OBJ_SCENERY_129) || (scenery->obj.id == OBJ_SCENERY_130)) && ((actor->obj.pos.z + 1100.0f - scenery->obj.pos.z) < 2200.0f) && @@ -2217,7 +2217,7 @@ void Venom1_80194398(Boss* boss) { is4 = boss->swork[23]; temp_fs0 = boss->obj.pos.z; var_fv0 = -1500.0f; - for (spF4 = 0; spF4 < 60; spF4++, actor++) { + for (spF4 = 0; spF4 < ARRAY_COUNT(gActors); spF4++, actor++) { if (actor->obj.status == OBJ_FREE) { while ((is3 <= boss->swork[22]) && @@ -2249,7 +2249,7 @@ void Venom1_80194398(Boss* boss) { is4 = boss->swork[23]; temp_fs0 = boss->obj.pos.z; var_fv0 = -1500.0f; - for (spF4 = 0; spF4 < 60; spF4++, actor++) { + for (spF4 = 0; spF4 < ARRAY_COUNT(gActors); spF4++, actor++) { if (actor->obj.status == OBJ_FREE) { while ((is3 > boss->swork[22]) && @@ -2282,7 +2282,7 @@ void Venom1_80194398(Boss* boss) { is4 = boss->swork[23]; temp_fs0 = boss->obj.pos.z; var_fv0 = (gPlayer[0].pos.z + -1500.0f); - for (spF4 = 0; spF4 < 60; spF4++, actor++) { + for (spF4 = 0; spF4 < ARRAY_COUNT(gActors); spF4++, actor++) { if (actor->obj.status == OBJ_FREE) { while ((is3 > D_i1_80199E60[is4]) && (var_fv0) <= (temp_fs0 + D_i1_80199E6C[is4][is3].z)) { is3++; @@ -2305,7 +2305,7 @@ void Venom1_80194398(Boss* boss) { } } actor = gActors; - for (spF4 = 0; spF4 < 60; spF4++, actor++) { + for (spF4 = 0; spF4 < ARRAY_COUNT(gActors); spF4++, actor++) { if (((actor->obj.id == OBJ_ACTOR_281) || (actor->obj.id == OBJ_ACTOR_282)) && (actor->state == 0) && (100.f <= (actor->obj.pos.z - boss->obj.pos.z)) && ((actor->obj.pos.z - boss->obj.pos.z) <= 2400.0f)) { @@ -2380,7 +2380,7 @@ void Venom1_8019864C(PlayerShot* shot) { Vec3f diff; boss = gBosses; - for (i = 0; i < 4; i++, boss++) { + for (i = 0; i < ARRAY_COUNT(gBosses); i++, boss++) { if ((boss->obj.id == OBJ_BOSS_319) && (boss->obj.status == OBJ_ACTIVE) && (boss->timer_05A == 0)) { temp_fs1 = shot->scale * 30.0f; hitboxData = boss->info.hitbox; diff --git a/src/overlays/ovl_i3/fox_aq.c b/src/overlays/ovl_i3/fox_aq.c index b571f65d..a899dceb 100644 --- a/src/overlays/ovl_i3/fox_aq.c +++ b/src/overlays/ovl_i3/fox_aq.c @@ -357,7 +357,7 @@ void Aquas_801A9448(Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32 un s32 unk48) { s32 i; - for (i = 59; i >= 0; i--) { + for (i = ARRAY_COUNT(gActors) - 1; i >= 0; i--) { if (gActors[i].obj.status == OBJ_FREE) { Aquas_801A9374(&gActors[i], pos, rot, xVel, yVel, zVel, unkB8, scale, timerBC, unk48); break; @@ -1174,7 +1174,7 @@ void Aquas_801AC09C(Player* player) { s32 i; PlayerShot* shot; - for (i = 15, shot = &gPlayerShots[15]; i < 16; i++, shot++) { + for (i = 15, shot = &gPlayerShots[15]; i < ARRAY_COUNT(gPlayerShots); i++, shot++) { if (shot->obj.status == OBJ_FREE) { func_play_800AC290(player, shot, 0.0f, 0.0f, PLAYERSHOT_8, 50.0f); AUDIO_PLAY_SFX(0x01000025, shot->sfxSource, 0); @@ -1245,7 +1245,7 @@ void Aquas_801AC274(Player* player) { D_i3_801C41B8[11] = 10000.0f; temp = D_i3_801C4190[0]; - for (i = 0, actor = gActors; i < 60; i++, actor++) { + for (i = 0, actor = gActors; i < ARRAY_COUNT(gActors); i++, actor++) { if ((actor->obj.status == OBJ_ACTIVE) && (actor->obj.id != OBJ_ACTOR_189)) { var_v1 = 1; if (actor->info.hitbox[1] == HITBOX_ROTATED) { @@ -1867,7 +1867,7 @@ void Aquas_801AE3D8(Actor* actor) { if (gBosses[0].timer_052 == 0) { gBosses[0].timer_052 = 72; actor->health = 10; - for (i = 0; i < 60; i++) { + for (i = 0; i < ARRAY_COUNT(gActors); i++) { if ((gActors[i].obj.id == OBJ_ACTOR_256) && (actor->index != gActors[i].index)) { gActors[i].health = 10; } @@ -2193,7 +2193,7 @@ void Aquas_801AFA5C(Actor* actor) { } if ((actor->iwork[1] == 13) && (i < 0)) { AUDIO_PLAY_SFX(0x29022048, actor->sfxSource, 4); - for (i = 0, sp48 = gActors; i < 60; i++, sp48++) { + for (i = 0, sp48 = gActors; i < ARRAY_COUNT(gActors); i++, sp48++) { if (sp48->obj.status == OBJ_FREE) { Actor_Initialize(sp48); sp48->obj.status = OBJ_INIT; @@ -2224,7 +2224,7 @@ void Aquas_801AFA5C(Actor* actor) { break; } } - if (i >= 60) { + if (i >= ARRAY_COUNT(gActors)) { actor->iwork[3] = 0; sp48->obj.status = OBJ_FREE; } @@ -2796,7 +2796,7 @@ void Aquas_801B134C(Boss* bossAQ) { D_i3_801C4308[79] = 0.0f; AUDIO_PLAY_SFX(0x29408054, bossAQ->sfxSource, 4); if (bossAQ->state < 14) { - for (i3 = 0, actor = gActors; i3 < 60; i3++, actor++) { + for (i3 = 0, actor = gActors; i3 < ARRAY_COUNT(gActors); i3++, actor++) { if ((actor->obj.id == OBJ_ACTOR_260) && (actor->obj.status == OBJ_ACTIVE)) { actor->iwork[0] = 1; } @@ -3126,8 +3126,8 @@ void Aquas_801B134C(Boss* bossAQ) { spD4.z = D_i3_801C4308[75 + 3 * i7]; func_effect_8007A6F0(&spD4, 0x2903404B); i2 = 0; - for (i3 = 0; i2 <= i && i3 < 60; i3++) { - if ((gActors[i3].obj.status == OBJ_FREE) && (i3 < 60)) { + for (i3 = 0; i2 <= i && i3 < ARRAY_COUNT(gActors); i3++) { + if ((gActors[i3].obj.status == OBJ_FREE) && (i3 < ARRAY_COUNT(gActors))) { Actor_Initialize(&gActors[i3]); gActors[i3].obj.status = OBJ_INIT; @@ -3163,7 +3163,7 @@ void Aquas_801B134C(Boss* bossAQ) { gActors[i3].fwork[1] = D_i3_801C4308[i7 + 16]; gActors[i3].fwork[2] = D_i3_801C4308[i7 + 18]; Object_SetInfo(&gActors[i3].info, gActors[i3].obj.id); - if (i3 >= 60) { + if (i3 >= ARRAY_COUNT(gActors)) { gActors[i3].obj.status = OBJ_FREE; } i2++; @@ -3800,7 +3800,7 @@ void Aquas_801B50E8(Actor* actor) { actor->health = 0; } } else if (actor->damage == 30) { - for (i = 0, var_v0 = gActors; i < 60; i++, var_v0++) { + for (i = 0, var_v0 = gActors; i < ARRAY_COUNT(gActors); i++, var_v0++) { if ((var_v0->obj.status == OBJ_ACTIVE) && (var_v0->obj.id == OBJ_ACTOR_261) && (var_v0->state == 1) && (i != actor->index) && (fabsf(var_v0->obj.pos.x - actor->obj.pos.x) <= 300.0f) && @@ -4054,7 +4054,7 @@ void Aquas_801B638C(Actor* actor) { } } else { if (((gGameFrameCount % 2) == 0)) { - for (i = 0, var_v0 = gActors; i < 60; i++, var_v0++) { + for (i = 0, var_v0 = gActors; i < ARRAY_COUNT(gActors); i++, var_v0++) { if ((var_v0->obj.status == OBJ_ACTIVE) && (var_v0->obj.id == OBJ_ACTOR_261) && (var_v0->state == 1) && (fabsf(var_v0->obj.pos.x - actor->fwork[8]) <= (actor->fwork[5] * 48.0f)) && @@ -5215,7 +5215,7 @@ void Aquas_801BA6A4(Actor* actor) { actor->health = actor->itemDrop = 0; Actor_Despawn(actor); if (actor->state == 0) { - for (i = 0, var_s2 = 0, actor265 = gActors; i < 60 && var_s2 < 4; i++, actor265++) { + for (i = 0, var_s2 = 0, actor265 = gActors; i < ARRAY_COUNT(gActors) && var_s2 < 4; i++, actor265++) { if (actor265->obj.status == OBJ_FREE) { Actor_Initialize(actor265); actor265->obj.status = OBJ_INIT; @@ -5232,7 +5232,7 @@ void Aquas_801BA6A4(Actor* actor) { var_s2++; } } - if (i >= 60) { + if (i >= ARRAY_COUNT(gActors)) { actor265->obj.status = OBJ_FREE; } } else { @@ -5401,7 +5401,7 @@ void Aquas_801BB26C(Actor* actor) { sp54.z = 0.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48); - for (sp64 = 0, actor267 = gActors; sp64 < 60; sp64++, actor267++) { + for (sp64 = 0, actor267 = gActors; sp64 < ARRAY_COUNT(gActors); sp64++, actor267++) { if (actor267->obj.status == OBJ_FREE) { Actor_Initialize(actor267); actor267->obj.status = OBJ_INIT; @@ -5427,7 +5427,7 @@ void Aquas_801BB26C(Actor* actor) { sp54.z = 0.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48); - for (sp60 = 0, actor267_2 = gActors; sp60 < 60; sp60++, actor267_2++) { + for (sp60 = 0, actor267_2 = gActors; sp60 < ARRAY_COUNT(gActors); sp60++, actor267_2++) { if (actor267_2->obj.status == OBJ_FREE) { Actor_Initialize(actor267_2); actor267_2->obj.status = OBJ_INIT; @@ -5484,7 +5484,7 @@ void Aquas_801BB79C(Actor* actor) { actor->iwork[20] = 50; } } else { - for (i = 0, actor122 = gScenery; i < 50; i++, actor122++) { + for (i = 0, actor122 = gScenery; i < ARRAY_COUNT(gScenery); i++, actor122++) { if ((actor122->obj.status == OBJ_ACTIVE) && (actor122->obj.id == OBJ_SCENERY_122) && Object_CheckHitboxCollision(&actor->obj.pos, actor122->info.hitbox, &actor122->obj, 0.0f, 0.0f, 0.0f) && @@ -5510,7 +5510,7 @@ void Aquas_801BB79C(Actor* actor) { actor->iwork[20] = 50; } } else { - for (i = 0, actor122 = gScenery; i < 50; i++, actor122++) { + for (i = 0, actor122 = gScenery; i < ARRAY_COUNT(gScenery); i++, actor122++) { if ((actor122->obj.status == OBJ_ACTIVE) && (actor122->obj.id == OBJ_SCENERY_122) && (Object_CheckHitboxCollision(&actor->obj.pos, actor122->info.hitbox, &actor122->obj, 0.0f, 0.0f, 0.0f) || @@ -5897,7 +5897,7 @@ void Aquas_801BC9A0(Actor* actor) { case 3: for (i = 0; i < 2; i++) { - for (j = 0; j < 60; j++) { + for (j = 0; j < ARRAY_COUNT(gActors); j++) { if ((gActors[j].obj.status == OBJ_ACTIVE) && (gActors[j].obj.id == OBJ_ACTOR_189) && (gActors[j].state == 58)) { Object_Kill(&gActors[j].obj, gActors[j].sfxSource); @@ -5907,7 +5907,7 @@ void Aquas_801BC9A0(Actor* actor) { } for (i = 0; i < 2; i++) { - for (j = 0, actor269 = gActors; j < 60; j++, actor269++) { + for (j = 0, actor269 = gActors; j < ARRAY_COUNT(gActors); j++, actor269++) { if (actor269->obj.status == OBJ_FREE) { Actor_Initialize(actor269); actor269->obj.status = OBJ_INIT; @@ -6106,7 +6106,7 @@ void Aquas_801BD54C(Actor* actor) { case 1: sp64 = actor->index; for (sp68 = 0; sp68 < 15; sp68++) { - for (sp6C = 0, actor268 = gActors; sp6C < 60; sp6C++, actor268++) { + for (sp6C = 0, actor268 = gActors; sp6C < ARRAY_COUNT(gActors); sp6C++, actor268++) { if (actor268->obj.status == OBJ_FREE) { Actor_Initialize(actor268); actor268->obj.status = OBJ_INIT; diff --git a/src/overlays/ovl_i3/fox_so.c b/src/overlays/ovl_i3/fox_so.c index 065a558b..00e58e0b 100644 --- a/src/overlays/ovl_i3/fox_so.c +++ b/src/overlays/ovl_i3/fox_so.c @@ -227,7 +227,7 @@ void Solar_8019E920(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 void Solar_8019E9F4(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, s32 unk4E) { s32 i; - for (i = 99; i >= 34; i--) { + for (i = ARRAY_COUNT(gEffects) - 1; i >= 34; i--) { if (gEffects[i].obj.status == OBJ_FREE) { Solar_8019E920(&gEffects[i], xPos, yPos, zPos, xVel, yVel, zVel, scale2, unk4E); break; @@ -1022,7 +1022,7 @@ void Solar_LevelStart(Player* player) { RAND_FLOAT(2000.0f) - 6000.0f + gPathProgress, RAND_FLOAT(20.0f) + 20.0f); } if (gCsFrameCount == 380) { - for (i = 0; i < 100; i++) { + for (i = 0; i < ARRAY_COUNT(gEffects); i++) { Object_Kill(&gEffects[i].obj, gEffects[i].sfxSource); } Solar_801A0DF8(400.0f, -2800.0f, 340.0f, 1, 1.0f); @@ -1193,7 +1193,7 @@ void Solar_801A1E14(f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 zRot, s32 unk46) { s32 i; - for (i = 59; i >= 0; i--) { + for (i = ARRAY_COUNT(gActors) - 1; i >= 0; i--) { if (gActors[i].obj.status == OBJ_FREE) { Solar_801A1CD8(&gActors[i], xPos, yPos, zPos, xRot, yRot, zRot, xVel, yVel, zVel, unk46); break; @@ -1974,7 +1974,7 @@ void Solar_801A48B8(Boss* bossSO) { bossSO->swork[SO_SWK_7] = bossSO->unk_04C; } if ((bossSO->swork[SO_SWK_0] == 4) && (bossSO->unk_04C >= 60) && (bossSO->unk_04C < 67)) { - for (i = 4; i < 60; i++) { + for (i = 4; i < ARRAY_COUNT(gActors); i++) { if (gActors[i].obj.id == OBJ_ACTOR_278) { gActors[i].dmgType = DMG_EXPLOSION; break; @@ -2825,7 +2825,7 @@ void Solar_LevelComplete(Player* player) { gCsCamAtX = player->cam.at.x; gCsCamAtY = player->cam.at.y; gCsCamAtZ = player->cam.at.z; - for (i = 10; i < 60; i++) { + for (i = 10; i < ARRAY_COUNT(gActors); i++) { if (gActors[i].unk_0B6 == 0) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); } diff --git a/src/overlays/ovl_i3/fox_zo.c b/src/overlays/ovl_i3/fox_zo.c index 6940f397..f7c2d992 100644 --- a/src/overlays/ovl_i3/fox_zo.c +++ b/src/overlays/ovl_i3/fox_zo.c @@ -542,7 +542,7 @@ void Zoness_80190028(Actor* actor, Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f void Zoness_801900FC(Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32 arg6, f32 scale, s32 arg8, s32 arg9) { s32 i; - for (i = 59; i > 0; i--) { + for (i = ARRAY_COUNT(gActors) - 1; i > 0; i--) { if (gActors[i].obj.status == OBJ_FREE) { Zoness_80190028(&gActors[i], pos, rot, xVel, yVel, zVel, arg6, scale, arg8, arg9); break; @@ -687,7 +687,7 @@ void Zoness_80190790(Actor* actor) { actor->unk_0F4.x = -actor->vel.y * 2.5f; actor->fwork[1] += 5.0f; actor->unk_0F4.z = SIN_DEG(actor->fwork[1]) * 30.0f; - for (i = 0, otherActor = gActors; i < 60; i++, otherActor++) { + for (i = 0, otherActor = gActors; i < ARRAY_COUNT(gActors); i++, otherActor++) { if ((otherActor->obj.status == OBJ_ACTIVE) && (otherActor->obj.id == OBJ_ACTOR_239) && (otherActor->iwork[0] == actor->iwork[0])) { temp1 = Math_RadToDeg( @@ -921,7 +921,7 @@ void Zoness_801915A4(Actor* actor) { actor->health = 50; actor->fwork[0] = actor->obj.pos.z - 10000.0f; - for (i = 0, actor241 = gActors; i < 60; i++, actor241++) { + for (i = 0, actor241 = gActors; i < ARRAY_COUNT(gActors); i++, actor241++) { if (actor241->obj.status == OBJ_FREE) { Actor_Initialize(actor241); actor241->obj.status = OBJ_INIT; @@ -935,7 +935,7 @@ void Zoness_801915A4(Actor* actor) { break; } } - if (i >= 60) { + if (i >= ARRAY_COUNT(gActors)) { actor241->obj.status = OBJ_FREE; } } @@ -3050,7 +3050,7 @@ void Zoness_801986FC(Boss* bossZO, s32 arg1, f32 xOff, f32 yOff, f32 zOff, f32 y if (sZoSwork[ZO_BSS_12 + sp50] == 0) { sZoSwork[ZO_BSS_0 + arg1] = 40; } - for (sp50 = 0, newActor = gActors; sp50 < 60; sp50++, newActor++) { + for (sp50 = 0, newActor = gActors; sp50 < ARRAY_COUNT(gActors); sp50++, newActor++) { if (newActor->obj.status == OBJ_FREE) { D_ctx_801779A8[0] = 20.0f; Actor_Initialize(newActor); @@ -3080,7 +3080,7 @@ void Zoness_801986FC(Boss* bossZO, s32 arg1, f32 xOff, f32 yOff, f32 zOff, f32 y } } } - if (sp50 >= 60) { + if (sp50 >= ARRAY_COUNT(gActors)) { newActor->obj.status = OBJ_FREE; } } @@ -3094,7 +3094,7 @@ void Zoness_801989FC(Boss* bossZO) { for (i = 0; i < 2; i++) { if (sZoSwork[ZO_BSS_11 + i] != 0) { - for (j = 0, newActor = gActors; j < 60; j++, newActor++) { + for (j = 0, newActor = gActors; j < ARRAY_COUNT(gActors); j++, newActor++) { if (newActor->obj.status == OBJ_FREE) { Actor_Initialize(newActor); newActor->obj.status = OBJ_INIT; @@ -3164,7 +3164,7 @@ void Zoness_80198BE8(Boss* bossZO, s32 arg1) { break; } } - if (var_s1 >= 60) { + if (var_s1 >= ARRAY_COUNT(gActors)) { effect->obj.status = OBJ_FREE; } } @@ -3812,7 +3812,7 @@ void Zoness_8019B1F0(Actor* actor) { actor->obj.rot.x = (s32) fabsf(Math_ModF(actor->obj.rot.x, 100.0f)); } - for (i = 0, var_s6 = 0; var_s3 < 3 && i < 60; i++) { + for (i = 0, var_s6 = 0; var_s3 < 3 && i < ARRAY_COUNT(gActors); i++) { if (gActors[i].obj.status == OBJ_FREE) { if (actor->state == 0) { Matrix_MultVec3f(gCalcMatrix, &D_i3_801BF744[var_s3], &sp84); @@ -4028,7 +4028,7 @@ void Zoness_8019BE48(Actor* actor) { switch (actor->state) { /* irregular */ case 0: - for (i = 0, newActor = gActors; i < 60; i++, newActor++) { + for (i = 0, newActor = gActors; i < ARRAY_COUNT(gActors); i++, newActor++) { if (newActor->obj.status == OBJ_FREE) { Actor_Initialize(newActor); newActor->obj.status = OBJ_INIT; @@ -4046,7 +4046,7 @@ void Zoness_8019BE48(Actor* actor) { break; } } - if (i >= 60) { + if (i >= ARRAY_COUNT(gActors)) { newActor->obj.status = OBJ_FREE; } actor->health = 10; @@ -4129,7 +4129,7 @@ void Zoness_8019C200(Actor* actor) { actor->fwork[2] = actor->fwork[3] + sp2C.y; Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, &D_i3_801BF8B8, &sp2C); - for (i = 0, newActor = gActors; i < 60; i++, newActor++) { + for (i = 0, newActor = gActors; i < ARRAY_COUNT(gActors); i++, newActor++) { if (newActor->obj.status == OBJ_FREE) { Actor_Initialize(newActor); newActor->obj.status = OBJ_INIT; @@ -4145,7 +4145,7 @@ void Zoness_8019C200(Actor* actor) { break; } } - if (i >= 60) { + if (i >= ARRAY_COUNT(gActors)) { newActor->obj.status = OBJ_FREE; } } @@ -4359,7 +4359,7 @@ void Zoness_8019CE58(Actor* actor) { void Zoness_Actor247_Init(Actor247* this) { s32 i; - for (i = 0; i < 60; i++) { + for (i = 0; i < ARRAY_COUNT(gActors); i++) { if (gActors[i].obj.status == OBJ_FREE) { Actor_Initialize(&gActors[i]); gActors[i].obj.status = OBJ_ACTIVE; @@ -4517,7 +4517,7 @@ void Zoness_LevelComplete(Player* player) { gCsCamAtX = player->cam.at.x; gCsCamAtY = player->cam.at.y; gCsCamAtZ = player->cam.at.z; - for (i = 10; i < 60; i++) { + for (i = 10; i < ARRAY_COUNT(gActors); i++) { if (gActors[i].unk_0B6 == 0) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); } diff --git a/src/overlays/ovl_i4/fox_bo.c b/src/overlays/ovl_i4/fox_bo.c index 94dbde89..481e6099 100644 --- a/src/overlays/ovl_i4/fox_bo.c +++ b/src/overlays/ovl_i4/fox_bo.c @@ -1766,7 +1766,7 @@ void Bolse_80190D98(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 void Bolse_80190EE4(f32 x, f32 y, f32 z, f32 arg3, f32 arg4) { s32 i; - for (i = 99; i >= 0; i--) { + for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { Bolse_80190D98(&gEffects[i], x, y, z, arg3, arg4); break; @@ -1791,7 +1791,7 @@ void Bolse_80190F58(Effect* effect, f32 x, f32 y, f32 z, f32 scale) { void Bolse_80190FE8(f32 x, f32 y, f32 z, f32 scale) { s32 i; - for (i = 99; i >= 0; i--) { + for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { Bolse_80190F58(&gEffects[i], x, y, z, scale); break; diff --git a/src/overlays/ovl_i4/fox_ka.c b/src/overlays/ovl_i4/fox_ka.c index 1a790c0b..d7172832 100644 --- a/src/overlays/ovl_i4/fox_ka.c +++ b/src/overlays/ovl_i4/fox_ka.c @@ -1833,8 +1833,7 @@ void Katina_LevelComplete(Player* player) { gCsCamAtX = boss->obj.pos.x; gCsCamAtY = 1000.0f; gCsCamAtZ = boss->obj.pos.z; - - for (i = 10; i < 60; i++) { + for (i = 10; i < ARRAY_COUNT(gActors); i++) { if (gActors[i].unk_0B6 == 0) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); } diff --git a/src/overlays/ovl_i4/fox_sz.c b/src/overlays/ovl_i4/fox_sz.c index e8d68048..7adf6a90 100644 --- a/src/overlays/ovl_i4/fox_sz.c +++ b/src/overlays/ovl_i4/fox_sz.c @@ -1835,7 +1835,7 @@ void SectorZ_8019EA68(void) { Object_SetInfo(&actor->info, actor->obj.id); actor->itemDrop = DROP_SILVER_RING; - if (j++ >= 60) { + if (j++ >= ARRAY_COUNT(gActors)) { break; } actor++; diff --git a/src/overlays/ovl_i5/fox_ma.c b/src/overlays/ovl_i5/fox_ma.c index c43b4fb9..638b2cd9 100644 --- a/src/overlays/ovl_i5/fox_ma.c +++ b/src/overlays/ovl_i5/fox_ma.c @@ -1498,7 +1498,7 @@ void Macbeth_8019F164(Actor* actor) { sp6C.y = gPlayer[0].pos.y - 25.0f - actor->obj.pos.y + actor->fwork[8] + 25.0f; sp6C.z = gPlayer[0].trueZpos - 500.0f - actor->obj.pos.z; - for (i = 0; i < 60; i++) { + for (i = 0; i < ARRAY_COUNT(gActors); i++) { if ((gActors[i].obj.id == OBJ_ACTOR_219) && (gActors[i].obj.status == OBJ_ACTIVE)) { if ((actor->obj.pos.z < (gActors[i].obj.pos.z + 3000.0f)) && ((gActors[i].obj.pos.z - actor->obj.pos.z) < 5000.0f)) { @@ -5106,7 +5106,7 @@ void Macbeth_801AD144(PlayerShot* shot) { temp_fs2 = shot->scale * 40.0f; actor = &gActors[0]; - for (i = 0; i < 60; i++, actor++) { + for (i = 0; i < ARRAY_COUNT(gActors); i++, actor++) { if ((actor->obj.status == OBJ_ACTIVE) && (actor->timer_0C2 == 0) && (actor->obj.id >= OBJ_ACTOR_205) && (actor->obj.id <= OBJ_ACTOR_213)) { temp_s6 = gGameFrameCount % 8U; @@ -6708,47 +6708,47 @@ void Macbeth_801B38E0(void) { s16 i; s16 j; - for (i = 0; i < 65; i++) { + for (i = 0; i < ARRAY_COUNT(gRadarMarks); i++) { gRadarMarks[i].status = 0; } - for (i = 0; i < 100; i++) { + for (i = 0; i < ARRAY_COUNT(gTexturedLines); i++) { gTexturedLines[i].mode = 0; } - for (i = 0; i < 50; i++) { + for (i = 0; i < ARRAY_COUNT(gScenery); i++) { if (gScenery[i].obj.id <= OBJ_SCENERY_91 || gScenery[i].obj.id >= OBJ_SCENERY_97) { Object_Kill(&gScenery[i].obj, gScenery[i].sfxSource); Scenery_Initialize(&gScenery[i]); } } - for (i = 0; i < 40; i++) { + for (i = 0; i < ARRAY_COUNT(gSprites); i++) { gSprites[i].obj.status = OBJ_FREE; Sprite_Initialize(&gSprites[i]); } - for (i = 0; i < 60; i++) { + for (i = 0; i < ARRAY_COUNT(gActors); i++) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); Actor_Initialize(&gActors[i]); } - for (i = 0; i < 4; i++) { + for (i = 0; i < ARRAY_COUNT(gBosses); i++) { Object_Kill(&gBosses[i].obj, gBosses[i].sfxSource); Boss_Initialize(&gBosses[i]); } - for (i = 0; i < 100; i++) { + for (i = 0; i < ARRAY_COUNT(gEffects); i++) { Object_Kill(&gEffects[i].obj, gEffects[i].sfxSource); Effect_Initialize(&gEffects[i]); } - for (i = 0; i < 20; i++) { + for (i = 0; i < ARRAY_COUNT(gItems); i++) { Object_Kill(&gItems[i].obj, gItems[i].sfxSource); Item_Initialize(&gItems[i]); } - for (i = 0; i < 16; i++) { + for (i = 0; i < ARRAY_COUNT(gPlayerShots); i++) { Object_Kill(&gPlayerShots[i].obj, gPlayerShots[i].sfxSource); PlayerShot_Initialize(&gPlayerShots[i]); } @@ -6758,7 +6758,7 @@ void Macbeth_801B38E0(void) { gFormationInitPos.x = gFormationInitPos.y = gFormationInitPos.z = gFormationInitRot.x = gFormationInitRot.y = gFormationInitRot.z = 0.0f; - for (i = 0; i < 10; i++) { + for (i = 0; i < ARRAY_COUNT(gTeamArrowsViewPos); i++) { gTeamArrowsViewPos[i].x = gTeamArrowsViewPos[i].y = gTeamArrowsViewPos[i].z = 100.0f; } diff --git a/src/overlays/ovl_i5/fox_ti.c b/src/overlays/ovl_i5/fox_ti.c index 4030c037..3116e9d4 100644 --- a/src/overlays/ovl_i5/fox_ti.c +++ b/src/overlays/ovl_i5/fox_ti.c @@ -684,7 +684,7 @@ void Titania_8018ADC4(Actor* actor) { k = 0; actorPtr = gActors; - for (i = 0; i < 60; i++, actorPtr++) { + for (i = 0; i < ARRAY_COUNT(gActors); i++, actorPtr++) { if (actorPtr->obj.status == OBJ_FREE) { Actor_Initialize(actorPtr); actorPtr->obj.status = OBJ_INIT; @@ -1718,7 +1718,7 @@ void Titania_8018E3CC(Actor* actor) { actor->obj.pos.y -= 20.0f; actorPtr = gActors; - for (i = 0; i < 60; i++, actorPtr++) { + for (i = 0; i < ARRAY_COUNT(gActors); i++, actorPtr++) { if (actorPtr->obj.status == OBJ_FREE) { Actor_Initialize(actorPtr); actorPtr->obj.status = OBJ_INIT; @@ -1896,7 +1896,7 @@ void Titania_8018E5F8(Actor* actor) { } if (actor->iwork[3] == 0) { - for (i = 0; i < 100; i++) { + for (i = 0; i < ARRAY_COUNT(gTexturedLines); i++) { if (gTexturedLines[i].mode == 0) { actor->iwork[3] = i + 1; break; @@ -4399,7 +4399,7 @@ void Titania_80193DF0(Boss* boss) { D_i5_801BBEF4[33] = 1.0f; for (i = 0; i < 4; i++) { if (D_i5_801BBEF0[9 + i] == 0) { - for (j = 0; j < 100; j++) { + for (j = 0; j < ARRAY_COUNT(gTexturedLines); j++) { if (gTexturedLines[j].mode == 0) { gTexturedLines[j].mode = 1; D_i5_801BBEF0[9 + i] = j + 1; diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index 43dbd929..7af536d8 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -1492,7 +1492,7 @@ void Andross_8018CAD4(Effect* effect) { Object_Kill(&effect->obj, effect->sfxSource); if (Rand_ZeroOne() < 0.1f) { item = gItems; - for (i = 0; i < 20; i++, item++) { + for (i = 0; i < ARRAY_COUNT(gItems); i++, item++) { if (item->obj.status == OBJ_FREE) { Item_Initialize(item); item->obj.status = OBJ_INIT; @@ -2377,7 +2377,7 @@ void Andross_8018DBF0(Boss* boss) { if (boss->timer_050 > 0) { playerShot = gPlayerShots; effect = gEffects; - for (i = 0; i < 16; i++, playerShot++) { + for (i = 0; i < ARRAY_COUNT(gPlayerShots); i++, playerShot++) { Math_SmoothStepToF(&playerShot->obj.pos.x, boss->obj.pos.x, 0.5f, boss->fwork[16], 0); Math_SmoothStepToF(&playerShot->obj.pos.y, boss->obj.pos.y - 100.0f, 0.5f, boss->fwork[16], 0); Math_SmoothStepToF(&playerShot->vel.x, 0.0f, 0.9f, 5.0f, 0); @@ -3215,7 +3215,7 @@ void Andross_80192E94(Actor* actor) { break; case 1: otherActor = gActors; - for (i = 0; i < 60; i++, otherActor++) { + for (i = 0; i < ARRAY_COUNT(gActors); i++, otherActor++) { if ((i != actor->index) && (otherActor->obj.status == OBJ_ACTIVE) && (otherActor->obj.id == OBJ_ACTOR_285) && (fabsf(otherActor->obj.pos.z - actor->obj.pos.z) < 200.0f)) { diff --git a/src/overlays/ovl_i6/fox_sy.c b/src/overlays/ovl_i6/fox_sy.c index 425c48e4..1178ba84 100644 --- a/src/overlays/ovl_i6/fox_sy.c +++ b/src/overlays/ovl_i6/fox_sy.c @@ -447,7 +447,7 @@ void SectorY_80198F5C(Boss* boss) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 20); } - for (i = 4; i < 60; i++) { + for (i = 4; i < ARRAY_COUNT(gActors); i++) { if (gActors[i].obj.status == OBJ_FREE) { SectorY_80197B30(&gActors[i], boss->index); D_ctx_80177A10[9] = i; @@ -625,7 +625,7 @@ void SectorY_80199438(Boss* boss) { if (boss->swork[25] == 0) { boss->swork[25] = 1; - for (j = 59; j >= 0; j--) { + for (j = ARRAY_COUNT(gActors) - 1; j >= 0; j--) { if (gActors[j].obj.status == OBJ_FREE) { SectorY_801A39FC(&gActors[j], boss->fwork[28], boss->fwork[29], boss->fwork[30], RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT_CENTERED(50.0f), @@ -1644,7 +1644,7 @@ void SectorY_8019C888(Boss* boss) { } if (gBossFrameCount == 250) { - for (i = 59; i >= 0; i--) { + for (i = ARRAY_COUNT(gActors) - 1; i >= 0; i--) { if (gActors[i].obj.status == OBJ_ACTIVE) { gTeamEventActorIndex[gActors[i].iwork[12]] = i; } @@ -3415,7 +3415,7 @@ void SectorY_801A39FC(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 void SectorY_801A3B50(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, s32 arg6) { s32 i; - for (i = 59; i >= 0; i--) { + for (i = ARRAY_COUNT(gActors) - 1; i >= 0; i--) { if (gActors[i].obj.status == OBJ_FREE) { SectorY_801A39FC(&gActors[i], xPos, yPos, zPos, xVel, yVel, zVel, arg6); break; diff --git a/src/overlays/ovl_i6/fox_turret.c b/src/overlays/ovl_i6/fox_turret.c index 8551a70e..60c8fe9d 100644 --- a/src/overlays/ovl_i6/fox_turret.c +++ b/src/overlays/ovl_i6/fox_turret.c @@ -117,8 +117,8 @@ void Turret_801A58A8(Player* player) { } if (gControllerHold[player->num].button & R_TRIG) { player->unk_1C0++; - if (player->unk_1C0 > 60) { - player->unk_1C0 = 60; + if (player->unk_1C0 > ARRAY_COUNT(gActors)) { + player->unk_1C0 = ARRAY_COUNT(gActors); } else { player->unk_1C0 = player->unk_1C0; } From 65cb9e270ec361666b04d41d34566063229a559b Mon Sep 17 00:00:00 2001 From: petrie911 <69443847+petrie911@users.noreply.github.com> Date: Sun, 5 May 2024 15:48:16 -0500 Subject: [PATCH 060/151] SFX Ids complete and upgraded level select (#231) * sfx banks * better level select * left the mods on * new description for level select --- .vscode/settings.json | 3 +- include/mods.h | 5 +- include/sf64event.h | 46 ++-- include/sfx.h | 315 +++++++++++++++++++++- sfxIds.txt | 428 ------------------------------ sfxStrings.txt | 351 ------------------------ src/engine/fox_enmy2.c | 241 +++++++++-------- src/mods/levelselect.c | 82 ++++-- src/mods/object_ram.c | 2 +- src/mods/sfxjukebox2.c | 8 +- src/overlays/ovl_i1/fox_co.c | 4 +- src/overlays/ovl_i6/fox_andross.c | 12 +- 12 files changed, 546 insertions(+), 951 deletions(-) delete mode 100644 sfxIds.txt delete mode 100644 sfxStrings.txt diff --git a/.vscode/settings.json b/.vscode/settings.json index cca7d0b8..b34a2350 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -141,7 +141,8 @@ "charconv": "c", "compare": "c", "os_motor.h": "c", - "os_pfs.h": "c" + "os_pfs.h": "c", + "semaphore": "c" }, "C_Cpp_Runner.msvcBatchPath": "" } \ No newline at end of file diff --git a/include/mods.h b/include/mods.h index de7e03da..9c463869 100644 --- a/include/mods.h +++ b/include/mods.h @@ -3,8 +3,9 @@ /** * Level Select: - * Press left or right on the D-PAD to choose which level to play, - * useful for debugging and speedrunning training. + * Use the D-Pad to select a level. Press L to start in + * an advanced level phase (warp zone or Andross fight). + * Useful for debugging and speedrunning training. */ #define MODS_LEVEL_SELECT 0 diff --git a/include/sf64event.h b/include/sf64event.h index c382d054..96c99b9f 100644 --- a/include/sf64event.h +++ b/include/sf64event.h @@ -418,29 +418,29 @@ typedef enum EventActorId { } EventActorId; typedef enum EventSfx { - /* 0 */ EVSFX_0, - /* 1 */ EVSFX_1, - /* 2 */ EVSFX_2, - /* 3 */ EVSFX_3, - /* 4 */ EVSFX_4, - /* 5 */ EVSFX_5, - /* 6 */ EVSFX_6, - /* 7 */ EVSFX_7, - /* 8 */ EVSFX_8, - /* 9 */ EVSFX_9, - /* 10 */ EVSFX_10, - /* 11 */ EVSFX_11, - /* 12 */ EVSFX_12, - /* 13 */ EVSFX_13, - /* 14 */ EVSFX_14, - /* 15 */ EVSFX_15, - /* 16 */ EVSFX_16, - /* 17 */ EVSFX_17, - /* 18 */ EVSFX_18, - /* 19 */ EVSFX_19, - /* 20 */ EVSFX_20, - /* 21 */ EVSFX_21, - /* 22 */ EVSFX_22, + /* 0 */ EVSFX_OB_SLIDE_OPEN, + /* 1 */ EVSFX_OB_SLIDE_CLOSE, + /* 2 */ EVSFX_OB_STEELFRAME, + /* 3 */ EVSFX_OB_HEAVY_BOUND, + /* 4 */ EVSFX_ITEM_APPEAR, + /* 5 */ EVSFX_OB_BLOCK_APPEAR, + /* 6 */ EVSFX_OB_ROCKWALL_UP, + /* 7 */ EVSFX_EN_UNIT_GATHERING, + /* 8 */ EVSFX_EN_MOTOR_STOP, + /* 9 */ EVSFX_EN_MS_DASH, + /* 10 */ EVSFX_OB_ROCK_CRASH, + /* 11 */ EVSFX_OB_ROCK_EYE_OPEN, + /* 12 */ EVSFX_OB_SHIP_FALLDOWN, + /* 13 */ EVSFX_OB_BOUND_M, + /* 14 */ EVSFX_OB_SPEAR_PILLAR, + /* 15 */ EVSFX_OB_PILLER_ROLL, + /* 16 */ EVSFX_SEARCHLIGHT_MISS, + /* 17 */ EVSFX_OB_ROUTEGATE_OPEN_Q, + /* 18 */ EVSFX_OB_ROUTEGATE_CLOSE_Q, + /* 19 */ EVSFX_OB_ROUTEGATE_OPEN_S, + /* 20 */ EVSFX_OB_ROUTEGATE_CLOSE_S, + /* 21 */ EVSFX_OB_LIFT, + /* 22 */ EVSFX_OB_PLATE_ROLL, } EventSfx; typedef enum TexLineColor { diff --git a/include/sfx.h b/include/sfx.h index 1fdee05e..b6f65633 100644 --- a/include/sfx.h +++ b/include/sfx.h @@ -100,9 +100,320 @@ typedef enum SfxBankId { #define NA_SE_MARINE_BRAKE 0x09004031 #define NA_SE_MAP_ARWING_DASH 0x09000032 +#define NA_SE_FALL 0x11000000 +#define NA_SE_PASS 0x19000001 +#define NA_SE_OB_METAL_BOUND_S 0x19030002 // Unreferenced. +#define NA_SE_OB_METAL_BOUND_M 0x19030003 +#define NA_SE_EN_METAL_BOUND_M 0x19130003 +#define NA_SE_EN_MS_LAND 0x19031003 +#define NA_SE_OB_METAL_BOUND_L 0x19030004 +#define NA_SE_OB_BLOCK_APPEAR 0x19122005 +#define NA_SE_OB_BOUND_M 0x19020006 +#define NA_SE_OB_ROCK_BOUND 0x19030006 +#define NA_SE_OB_AC_ROCK_BOUND 0x19400007 +#define NA_SE_METALBOMB_REFLECT 0x19020008 +#define NA_SE_OB_MC_SWITCH_UP 0x19033008 +#define NA_SE_METALBOMB_BOUND 0x19030009 // Unreferenced. +#define NA_SE_TANK_SLIDE 0x1100000A +#define NA_SE_SPLASH_LEVEL_S 0x1100000B +#define NA_SE_SPLASH_LEVEL_L 0x1100000C +#define NA_SE_OB_GATE_OPEN 0x1900000D +#define NA_SE_OB_SLIDE_OPEN 0x1903000D +#define NA_SE_OB_GATE_CLOSE 0x1900000E +#define NA_SE_OB_SLIDE_CLOSE 0x1903000E +#define NA_SE_OB_EXPLOSION_S 0x1903400F +#define NA_SE_GREATFOX_ENGINE 0x11030010 +#define NA_SE_EARTHQUAKE 0x11000011 +#define NA_SE_MAP_ZOOM_START 0x19003012 +#define NA_SE_MAP_ZOOM_END 0x19004013 +#define NA_SE_OB_WATER_BOUND_M 0x19000014 +#define NA_SE_OB_STEELFRAME 0x19500015 +#define NA_SE_EXPLOSION_DEMO2 0x11030016 +#define NA_SE_KT_UFO_FALLING 0x11404016 +#define NA_SE_IN_SPLASH_S 0x19800017 +#define NA_SE_OUT_SPLASH_S 0x19800018 // Unreferenced. +#define NA_SE_IN_SPLASH_L 0x19832019 +#define NA_SE_OUT_SPLASH_L 0x1983201A +#define NA_SE_OB_CRAME_MOTOR 0x1900001B +#define NA_SE_OB_BROKEN_BOX 0x1903901C +#define NA_SE_OB_MINI_BOMB 0x1903001D +#define NA_SE_OB_WT_WHEEL_ROLL 0x1903001E +#define NA_SE_OB_WALL_UP 0x1903001F +#define NA_SE_ON_SPLASH_S 0x19000020 +#define NA_SE_EN_PULL_CHAIN0 0x19003021 +#define NA_SE_EN_GATHER_PARTS 0x11033022 +#define NA_SE_EN_HEARTBEAT 0x11003023 +#define NA_SE_OB_SAND_BOUND_S 0x19000024 +#define NA_SE_KT_UFO_ENGINE 0x11037025 +#define NA_SE_MAP_ZOOM_OUT 0x19000026 +#define NA_SE_EN_BROKEN_SPARK 0x11000027 +#define NA_SE_OB_SPARK_BEAM 0x11000028 +#define NA_SE_OB_BOMB_ALARM 0x19000029 +#define NA_SE_WARP_HOLE 0x1900602A +#define NA_SE_OB_WING 0x1900302B +#define NA_SE_SUBMARINE_ATM 0x1100802C +#define NA_SE_WATER_PRESSURE 0x1900002D +#define NA_SE_BUBBLE_UP 0x1900002E +#define NA_SE_EN_WT_BROKEN 0x1902102F +#define NA_SE_EN_WT_DISAPPEAR_S 0x19003030 +#define NA_SE_EN_WT_BOUND_M 0x19402031 +#define NA_SE_OB_BOMB_ALARM_LAST 0x19000032 +#define NA_SE_EN_WT_DISAPPEAR_L 0x19000033 +#define NA_SE_EN_RNG_BEAM_CHARGE 0x11015034 +#define NA_SE_EN_RNG_BEAM_SHOT 0x19006035 +#define NA_SE_EN_SHIELD_ROLL 0x19030036 +#define NA_SE_GREATFOX_SHOT_DEMO 0x19030037 +#define NA_SE_WARP_RING_1 0x19404038 +#define NA_SE_WARP_RING_2 0x19404139 +#define NA_SE_WARP_RING_3 0x1940423A +#define NA_SE_WARP_RING_4 0x1940433B +#define NA_SE_WARP_RING_5 0x1940443C +#define NA_SE_WARP_RING_6 0x1940453D +#define NA_SE_WARP_RING_7 0x1940463E +#define NA_SE_KT_UFO_HATCH_OPEN 0x1903203F +#define NA_SE_KT_UFO_HATCH_CLOSE 0x19032040 +#define NA_SE_KT_UFO_CORE_OPEN 0x19032041 +#define NA_SE_BO_CORE_APPEAR 0x19034041 +#define NA_SE_KT_UFO_HATCH_STOP 0x19034042 +#define NA_SE_KT_UFO_LONG_CHARGE 0x11034043 +#define NA_SE_KT_UFO_LAST_CHARGE 0x19406044 +#define NA_SE_KT_UFO_BEAM 0x1140B045 +#define NA_SE_EXPLOSION_DEMO3 0x11038046 +#define NA_SE_KT_UFO_BOUND 0x19408047 +#define NA_SE_OB_BARRIER_RELEASE 0x19401048 +#define NA_SE_EN_SPACE_SNAKE 0x11032049 +#define NA_SE_OB_ROCKWALL_UP 0x1913204A +#define NA_SE_COLONY_LEVEL 0x1100004B // Unreferenced. +#define NA_SE_MAP_MOVE 0x1100004C +#define NA_SE_MAP_ROLL 0x1100204C +#define NA_SE_MAP_LINE_DRAW 0x1900404D +#define NA_SE_SHIP_ENGINE_SPC 0x1100004E // Unreferenced. +#define NA_SE_OB_BROKEN_SPARK_L 0x1900404F +#define NA_SE_EN_SHIELD_ROLL_LEVEL 0x11002050 +#define NA_SE_EN_SHIELD_ROLL_STOP 0x19004051 +#define NA_SE_OB_MAGMA_WAVE 0x11002052 +#define NA_SE_EN_OUT_PROMINENCE 0x19035053 +#define NA_SE_EN_OUT_MAGMA 0x19036053 +#define NA_SE_EN_IN_PROMINENCE 0x19035054 +#define NA_SE_EN_IN_MAGMA 0x19036054 +#define NA_SE_OB_SMOKE 0x11000055 +#define NA_SE_OB_ROCK_CRASH 0x19032056 +#define NA_SE_OB_ROCK_EYE_OPEN 0x19030057 +#define NA_SE_OB_SHIP_FALLDOWN 0x19033058 +#define NA_SE_EN_BMBOSS_BROKEN 0x19030059 +#define NA_SE_OB_ARM_SWING 0x1903005A +#define NA_SE_OB_POLE_MOVE 0x1903205B +#define NA_SE_OB_POLE_BOUND 0x1903205C +#define NA_SE_OB_HEAVY_SWITCH 0x1940405D +#define NA_SE_OB_CONNECT_CUT 0x1940205E +#define NA_SE_OB_MC_SWITCH_ON 0x1903205F +#define NA_SE_OB_MC_SWITCH_GRN 0x19020060 +#define NA_SE_OB_MC_SWITCH_RED 0x19020061 +#define NA_SE_OB_POST_UP 0x19001062 +#define NA_SE_OB_SIDE_GATE_CLOSE 0x11001063 +#define NA_SE_OB_SPEAR_STICK 0x19032064 +#define NA_SE_RAILWAY_BOUND 0x19000065 +#define NA_SE_EN_MCBOSS_HATCH 0x19034066 +#define NA_SE_EN_MCBOSS_CHARGE0 0x19022067 +#define NA_SE_EN_MCBOSS_SHOT0 0x19023068 +#define NA_SE_EN_MCBOSS_PLATECHARGE 0x19022069 +#define NA_SE_VO_ANDORF_PUNCH 0x1940306A +#define NA_SE_VO_ANDORF_SLAP 0x1940306B +#define NA_SE_VO_ANDORF_WHAND 0x1940306C +#define NA_SE_VO_ANDORF_CHOKE 0x1940306D +#define NA_SE_VO_ANDORF_LAUGH 0x1940306E +#define NA_SE_VO_ANDORF_GROAN 0x1940306F +#define NA_SE_VO_ANDORF_DEATH 0x19403070 +#define NA_SE_OB_ROOT_EXPLOSION0 0x11403071 +#define NA_SE_OB_ROUTEGATE_OPEN_Q 0x19038072 +#define NA_SE_EN_ANDORF_ROBOT 0x11030073 +#define NA_SE_EN_ANDORF_BRAIN 0x11034074 +#define NA_SE_EN_ANDORF_EYE 0x11032075 +#define NA_SE_OB_ROOT_EXPLOSION1 0x11403076 +#define NA_SE_OB_FISH_AWAY 0x19400077 +#define NA_SE_OB_AC_PILLAR_BROKE 0x19021078 +#define NA_SE_WARP_OUT 0x11407079 +#define NA_SE_ARWING_HATCH 0x1950107A +#define NA_SE_OB_POINT_SWITCH 0x1940807B +#define NA_SE_VO_ANDORF_EXCITE 0x1940307C +#define NA_SE_OB_PILLER_ROLL 0x1903407D +#define NA_SE_OB_ROUTEGATE_CLOSE_Q 0x1903807E +#define NA_SE_OB_ROUTEGATE_OPEN_S 0x1903807F +#define NA_SE_OB_ROUTEGATE_CLOSE_S 0x19038080 // events that play this are unused +#define NA_SE_OB_LIFT 0x11032081 +#define NA_SE_OB_PLATE_ROLL 0x19031082 +#define NA_SE_STARFOX_SEAL 0x19031083 +#define NA_SE_EXPLOSION_DEMO6 0x11020084 - - +#define NA_SE_EXPLOSION_S 0x29000000 +#define NA_SE_BIG_EXPLOSION 0x29000001 // Unreferenced. +#define NA_SE_EN_SHOT_0 0x29002002 +#define NA_SE_EN_DAMAGE_M 0x29024003 +#define NA_SE_OB_DAMAGE_M 0x29034003 +#define NA_SE_EN_BREATH 0x31000004 // Unreferenced. +#define NA_SE_EN_WOLF_ENGINE 0x31004005 +#define NA_SE_EN_WOLF_ENGINE2 0x31004006 +#define NA_SE_EN_REFLECT 0x29121007 +#define NA_SE_EN_EXPLOSION_S 0x2903A008 +#define NA_SE_EN_EXPLOSION_M 0x2903B009 +#define NA_SE_EN_EXPLOSION_L 0x2940C00A +#define NA_SE_EN_CRASH_DOWN 0x2903700B +#define NA_SE_ARWING_ENGINE_FG 0x3100000C +#define NA_SE_ARWING_SHOT_F 0x2900000D +#define NA_SE_EN_DAMAGE_S 0x2903300E +#define NA_SE_EN_DAMAGE_L 0x2900300F +#define NA_SE_EN_KNOCK_DOWN 0x2943500F +#define NA_SE_EN_S_FIGHTER_ENGINE 0x31000010 // Unreferenced. +#define NA_SE_EN_ENGINE_01 0x31000011 +#define NA_SE_EN_MISSILE_ENGINE 0x31000012 +#define NA_SE_EN_LONG_BEAM 0x31000013 +#define NA_SE_EN_ALIEN_FLY 0x31000014 +#define NA_SE_EN_SPACE_SHIP 0x31000015 +#define NA_SE_EN_TANK_RB_ENGINE 0x31000016 +#define NA_SE_EN_TANK_ENGINE 0x31000017 +#define NA_SE_A_CARRIER_ENGINE 0x31038018 +#define NA_SE_EN_HEAVY_WALK 0x29022019 +#define NA_SE_EN_HATCH 0x2940201A +#define NA_SE_EN_MISSILE_SHOT 0x2903101B +#define NA_SE_EN_BARREL_SHOT 0x2903201B +#define NA_SE_EN_THROW 0x2902401C +#define NA_SE_EN_MS_PUNCH 0x2903401C +#define NA_SE_EN_FALLING_DOWN 0x2900201D +#define NA_SE_EN_LASER_BEAM 0x3100001E +#define NA_SE_EN_HEAVY_WALK1 0x2902201F +#define NA_SE_EN_HEAVY_JUMP 0x29023020 +#define NA_SE_EN_HEAVY_BOUND 0x29034021 +#define NA_SE_OB_HEAVY_BOUND 0x2903A021 +#define NA_SE_EN_COMBINE 0x29433022 +#define NA_SE_EN_MOTOR_ROLL 0x29400023 +#define NA_SE_EN_MOTOR_STOP 0x29034024 +#define NA_SE_EN_UNIT_COMBINE 0x29402024 +#define NA_SE_EN_ENERGY_BEAM 0x31000025 +#define NA_SE_EN_ZOBOSS_BEAM 0x31034025 +#define NA_SE_EN_BOSS_EXPLOSION 0x2902F026 +#define NA_SE_EN_STAR_EXPLOSION 0x2940F026 +#define NA_SE_EN_PARTS_BROKEN 0x2940C027 +#define NA_SE_EN_THROW_S 0x29000028 +#define NA_SE_EN_HEAVY_WALK2 0x29406029 +#define NA_SE_EN_APPEAR_SAND 0x2900502A +#define NA_SE_EN_TIBOSS_AT_CRY 0x2940702B +#define NA_SE_EN_TIBOSS_DM_CRY 0x2940802C +#define NA_SE_EN_TIBOSS_DW_CRY 0x2940902D +#define NA_SE_EXPLOSION_DEMO 0x3140402E +#define NA_SE_EXPLOSION_DEMO5 0x3143402E +#define NA_SE_EN_BOSS_BEAM0 0x3143102F +#define NA_SE_EN_BOSS_CHARGE 0x39435830 +#define NA_SE_EN_BOSS_ATTACK 0x29003031 +#define NA_SE_EN_SAND_BOUND_M 0x29403031 +#define NA_SE_OB_SPEAR_PILLAR 0x29503032 +#define NA_SE_EN_WT_EXPLOSION_S 0x29038033 +#define NA_SE_EN_WT_EXPLOSION_M 0x29000034 // Unreferenced. +#define NA_SE_EN_WT_EXPLOSION_L 0x29000035 // Unreferenced. +#define NA_SE_EN_BIRD_DOWN 0x29018036 +#define NA_SE_EN_BIRD_DAMAGE 0x29033037 +#define NA_SE_EN_SPIDER_MOVE 0x21000038 // Unreferenced. +#define NA_SE_EN_SHIP_ENGINE_S 0x31012039 +#define NA_SE_EN_SHIP_ENGINE_L 0x3100203A +#define NA_SE_EN_S_BALL_SHOT 0x2903203B +#define NA_SE_EN_SINK_PARTS 0x2940983C +#define NA_SE_EN_M_BALL_SHOT 0x2900403D +#define NA_SE_EN_PULL_CHAIN1 0x3100503E +#define NA_SE_EN_HEART_OPEN 0x2900803F +#define NA_SE_ARWING_ENGINE_FS 0x31000040 +#define NA_SE_EN_SNAKE_DAMAGE 0x29034041 +#define NA_SE_EN_KANI_DOWN 0x29000042 // Unreferenced. +#define NA_SE_EN_KANI_MOTOR 0x31030043 +#define NA_SE_EN_DISAPPEAR_SAND 0x29000044 // Unreferenced. +#define NA_SE_EN_SANADA_DAMAGE 0x29034045 +#define NA_SE_EN_SANADA_DOWN 0x2902A046 +#define NA_SE_EN_SANADA_SWIM 0x31000047 +#define NA_SE_EN_SANADA_APPEAR 0x29022048 +#define NA_SE_EN_SEA_EXPLOSION_S 0x29018049 +#define NA_SE_EN_SEA_EXPLOSION_L 0x2900004A // Unreferenced. +#define NA_SE_EN_P_BALL_SHOT 0x2903404B +#define NA_SE_EN_WT_DAMAGE_S 0x2903604C +#define NA_SE_EN_EYEFILM_DAMAGE 0x2940604C +#define NA_SE_EN_SHELL_BEAT 0x3140904D +#define NA_SE_EN_SHELL_DAMAGE 0x2940804E +#define NA_SE_EN_SHELL_DOWN 0x2940A04F +#define NA_SE_EN_KAIBASHIRA_DAMEGE 0x29036050 +#define NA_SE_EN_EYEFILM_REVIVAL 0x29409051 +#define NA_SE_EN_P_GUN_APPEAR 0x29400052 +#define NA_SE_EN_P_GUN_DISAPPEAR 0x29000053 // Unreferenced. +#define NA_SE_EN_SHELL_CLOSE 0x29408054 +#define NA_SE_EN_SHELL_FILLOPEN 0x29408055 +#define NA_SE_EN_S_BEAM_CHARGE 0x31016056 +#define NA_SE_EN_S_BEAM_SHOT 0x31037057 +#define NA_SE_EN_S_BEAM_END 0x29038058 +#define NA_SE_GREATFOX_BURNER 0x31024059 +#define NA_SE_EN_BURNER_L 0x3102505A +#define NA_SE_EN_GRN_BEAM_CHARGE 0x3103605B +#define NA_SE_EN_GRN_BEAM_SHOT 0x3102705C +#define NA_SE_EN_ASBOSS_SHIELD 0x3102405D +#define NA_SE_EN_CATCH 0x2902405E +#define NA_SE_EN_PASS 0x2903305F +#define NA_SE_EN_MS_EXPLOSION_S 0x2903A060 +#define NA_SE_EN_SZMIS_ENGINE 0x31032061 +#define NA_SE_EN_PUNCH_ENGINE 0x3103A061 +#define NA_SE_EN_BARRIER_REFLECT 0x29001062 +#define NA_SE_EN_ANDORF_EXPLOSION 0x31009063 +#define NA_SE_EN_SPARK_DAMAGE_M 0x29033064 +#define NA_SE_EN_BMBOSS_DAMAGE 0x31034064 +#define NA_SE_EN_ARM_SWING 0x29034065 +#define NA_SE_EN_COVER_OPEN 0x31404066 +#define NA_SE_EN_COVER_CLOSE 0x31404067 +#define NA_SE_EN_COVER_MOVE_STOP 0x39404068 +#define NA_SE_EN_ENERGY_BALL 0x31008069 +#define NA_SE_EN_UNIT_GATHERING 0x2900306A +#define NA_SE_EN_MS_SHOT_S 0x2900306B +#define NA_SE_EN_MS_DASH 0x2902306C +#define NA_SE_EN_MS_KICK 0x2902306D +#define NA_SE_EN_MS_SHOT_L 0x2901306E +#define NA_SE_EN_MS_SHIELD_BROKEN 0x2903A06F +#define NA_SE_EN_MS_EXPLOSION_L 0x29000070 // Unreferenced. +#define NA_SE_OB_SNROCK_APPEAR 0x29000071 +#define NA_SE_OB_SNROCK_DISAPPEAR 0x29000072 +#define NA_SE_EN_SNBOSS_CRY 0x29432073 +#define NA_SE_EN_SNBOSS_DAMAGE 0x29433074 +#define NA_SE_EN_SNBOSS_BROKEN 0x29434075 +#define NA_SE_EN_SNBOSS_DOWN 0x39439076 +#define NA_SE_EN_SNBOSS_SWING 0x29432077 +#define NA_SE_EN_SNBOSS_BREATH 0x31033078 +#define NA_SE_EN_SNBOSS_ROLL 0x39033079 +#define NA_SE_EN_ANGLER_DAMAGE 0x2900007A // Unreferenced. +#define NA_SE_EN_ANGLER_DOWN 0x2900007B // Unreferenced. +#define NA_SE_UNK_7C 0x2100007C // Unreferenced. Sounds like many small explosions +#define NA_SE_ROCK_REFLECT 0x2902107D +#define NA_SE_OB_MAGMA_BUBBLE 0x3140807E +#define NA_SE_UNK_7F 0x2900007F // Unreferenced. Sounds like an impact +#define NA_SE_OB_BMBOSS_WALK 0x29032080 +#define NA_SE_OB_BMBOSS_JUMP 0x29033081 +#define NA_SE_OB_BMBOSS_LAND 0x29034082 +#define NA_SE_OB_BMBOSS_ATTACK 0x31030083 +#define NA_SE_OB_BMBOSS_BOUND 0x29405084 +#define NA_SE_EN_FREIGHT_TRAIN 0x31078085 +#define NA_SE_EN_MCBOSS_REFLECT 0x29022086 +#define NA_SE_EN_ANDORF_BREATH 0x31022087 +#define NA_SE_EN_ANDORF_BITE0 0x29022088 +#define NA_SE_EN_ANDORF_BITE1 0x29022089 +#define NA_SE_EN_ANDORF_VOMIT 0x3140208A +#define NA_SE_EN_ANDORF_SPARK 0x3103108B +#define NA_SE_EN_WT_THROW 0x2900308C +#define NA_SE_EN_WT_SPARK_CHARGE 0x2900208D +#define NA_SE_EN_WT_SPARK_BEAM 0x3100208E +#define NA_SE_EN_AC_ZAKO_DAMAGE 0x2903408F +#define NA_SE_EN_AC_ZAKO_DOWN 0x29038090 +#define NA_SE_EN_WARP_IN 0x39408091 +#define NA_SE_EN_WARP_OUT 0x39408092 +#define NA_SE_EN_CLBOSS_CHARGE 0x39033093 +#define NA_SE_EN_CLBOSS_BEAM 0x31405094 +#define NA_SE_EN_TRAIN_BREAK 0x31408095 +#define NA_SE_EN_ANDORF_WARP 0x2940B096 +#define NA_SE_EN_ANDORF_CATCH 0x31408097 +#define NA_SE_EN_KANI_STOP 0x29030098 +#define NA_SE_EN_MCBOSS_RAGE 0x29036099 +#define NA_SE_EN_DOWN_IMPACT 0x2940D09A +#define NA_SE_EN_MARBLE_BEAM 0x3103109B #define NA_SE_PAUSE_ON 0x4900F000 #define NA_SE_PAUSE_OFF 0x4900F001 // Unreferenced. Seems to be identical to NA_SE_PAUSE_ON diff --git a/sfxIds.txt b/sfxIds.txt deleted file mode 100644 index cedc0b77..00000000 --- a/sfxIds.txt +++ /dev/null @@ -1,428 +0,0 @@ -0x09000000 turret fire -0x09400000 single laser -0x09001001 bomb flight -0x09000002 boost -0x09004002 boost variant used by boss titania -0x09000003 brake -0x09000004 sector X boss hitting slippy -0x0903F004 player death -0x0100F005 arwing planet engine noise -0x0100F006 landmaster engine noise -0x09000007 wings changing position -0x01008008 iniial bomb flight. only plays for 1 frame -0x0901A009 unused? bomb explosion -0x0903A00A bomb explosion -0x0901A00B unused? bomb explosion -0x0940A00B corneria start explosion and save delete -0x0940800C twin laser -0x0?????0D some sort of explosion -0x0903900E weak hit -0x0903A00F strong hit -0x0900C010 fatal hit -0x09007011 deflect laser -0x09000012 arwing barrel roll -0x09000013 wings stop moving -0x09002013 arwing launchers/boss sector y spawn stop moving -0x09000014 landmaster/on foot shot -0x09008015 landmaster falls on ground -0x01008016 landmaster hover -0x09000017 blue marine barrel roll -0x0?????18 footstep. comparisons are relative to this -0x0?????19 heavier footstep -0x0?????1A lighter footstep -0x0?????1B lightest footstep -0x0140001C running footsteps in title -0x0100001D something mechanical starting to move, used in title -0x0100001E engines powering up -0x0100001F Beam sounds from sound test -0x0100F020 arwing space engine noise -0x09400021 blue marine single laser -0x0100F022 blue marine engine noise -0x09008023 wings repaired -0x01004024 landmaster single jet -0x01000025 torpedo shot -0x01038026 blue marine launch -0x09400027 blue marine twin laser (and hyper?) -0x09404028 blue marine hit ground -0x09007029 charge shot fire -0x0900802A warp zone map path -0x0940802A warp zone enter -0x0940802B arwing hyper laser -0x0900A02C wing break -0x0900302D charge shot charge -0x0903502E charge shot explode -0x0900402F landmaster boost -0x09004030 blue marine boost -0x09004031 blue marine brake -0x09000032 normal map path - -0x11000000 CO waterfall noise -0x19000001 whoosh -0x1?????02 clang sound, ligher than 3 -0x19030003 various falling pillars hitting ground -0x19031003 various falling pillars hitting ground -0x19130003 various falling pillars hitting ground -0x19030004 corneria mech boss hitting ground -0x19122005 EVSFX_5. venom event actors. spawning pillars/fingers? -0x19020006 titania rocks -0x19030006 macbeth rocks -0x19400007 aquas rocks -0x19020008 titania hopping bombs -0x19033008 macbeth switches -0x1?????09 -0x1100000A -0x1100000B -0x1100000C -0x1900000D -0x1903000D -0x1900000E -0x1903000E -0x1903400F -0x11030010 -0x11000011 -0x19003012 -0x19004013 -0x19000014 -0x19500015 -0x11030016 -0x11404016 -0x19800017 -0x1?????18 -0x19832019 -0x1983201A -0x1900001B -0x1903901C -0x1903001D -0x1903001E -0x1903001F -0x19000020 -0x19003021 -0x11033022 -0x11003023 -0x19000024 -0x11037025 -0x19000026 -0x11000027 -0x11000028 -0x19000029 -0x1900602A -0x1900302B -0x1100802C -0x1900002D -0x1900002E -0x1902102F -0x19003030 -0x19402031 -0x19000032 -0x19000033 -0x11015034 -0x19006035 -0x19030036 -0x19030037 -0x19404038 -0x19404139 -0x1940423A -0x1940433B -0x1940443C -0x1940453D -0x1940463E -0x1903203F -0x19032040 -0x19032041 -0x19034041 -0x19034042 -0x11034043 -0x19406044 -0x1140B045 -0x11038046 -0x19408047 -0x19401048 -0x11032049 -0x1913204A -0x1?????4B -0x1100004C -0x1100204C -0x1900404D -0x1?????4E -0x1900404F -0x11002050 -0x19004051 -0x11002052 -0x19035053 -0x19036053 -0x19035054 -0x19036054 -0x11000055 -0x19032056 -0x19030057 -0x19033058 -0x19030059 -0x1903005A -0x1903205B -0x1903205C -0x1940405D -0x1940205E -0x1903205F -0x19020060 -0x19020061 -0x19001062 -0x11001063 -0x19032064 -0x19000065 -0x19034066 -0x19022067 -0x19023068 -0x19022069 -0x1940306A -0x1940306B -0x1940306C -0x1940306D -0x1940306E -0x1940306F -0x19403070 -0x11403071 -0x19038072 -0x11030073 -0x11034074 -0x11032075 -0x11403076 -0x19400077 -0x19021078 -0x11407079 -0x1950107A -0x1940807B -0x1940307C -0x1903407D -0x1903807E -0x1903807F -0x19038080 -0x11032081 -0x19031082 -0x19031083 -0x11020084 - -0x29000000 -0x5?????01 -0x29002002 -0x29024003 -0x29034003 -0x5?????04 -0x31004005 -0x31004006 -0x29121007 -0x2903A008 -0x2903B009 -0x2940C00A -0x2903700B -0x3100000C -0x2900000D -0x2903300E -0x2900300F -0x2943500F -0x5?????10 -0x31000011 -0x31000012 -0x31000013 -0x31000014 -0x31000015 -0x31000016 -0x31000017 -0x31038018 -0x29022019 -0x2940201A -0x2903101B -0x2903201B -0x2902401C -0x2903401C -0x2900201D -0x3100001E -0x2902201F -0x29023020 -0x29034021 -0x2903A021 -0x29433022 -0x29400023 -0x29034024 -0x29402024 -0x31000025 -0x31034025 -0x2902F026 -0x2940F026 -0x2940C027 -0x29000028 -0x29406029 -0x2900502A -0x2940702B -0x2940802C -0x2940902D -0x3140402E -0x3143402E -0x3143102F -0x39435830 -0x29003031 -0x29403031 -0x29503032 -0x29038033 -0x5?????34 -0x5?????35 -0x29018036 -0x29033037 -0x5?????38 -0x31012039 -0x3100203A -0x2903203B -0x2940983C -0x2900403D -0x3100503E -0x2900803F -0x31000040 -0x29034041 -0x5?????42 -0x31030043 -0x5?????44 -0x29034045 -0x2902A046 -0x31000047 -0x29022048 -0x29018049 -0x5?????4A -0x2903404B -0x2903604C -0x2940604C -0x3140904D -0x2940804E -0x2940A04F -0x29036050 -0x29409051 -0x29400052 -0x5?????53 -0x29408054 -0x29408055 -0x31016056 -0x31037057 -0x29038058 -0x31024059 -0x3102505A -0x3103605B -0x3102705C -0x3102405D -0x2902405E -0x2903305F -0x2903A060 -0x31032061 -0x3103A061 -0x29001062 -0x31009063 -0x29033064 -0x31034064 -0x29034065 -0x31404066 -0x31404067 -0x39404068 -0x31008069 -0x2900306A -0x2900306B -0x2902306C -0x2902306D -0x2901306E -0x2903A06F -0x5?????70 -0x29000071 -0x29000072 -0x29432073 -0x29433074 -0x29434075 -0x39439076 -0x29432077 -0x31033078 -0x39033079 -0x5?????7A -0x5?????7B -0x5?????7C -0x2902107D -0x3140807E -0x5?????7F -0x29032080 -0x29033081 -0x29034082 -0x31030083 -0x29405084 -0x31078085 -0x29022086 -0x31022087 -0x29022088 -0x29022089 -0x3140208A -0x3103108B -0x2900308C -0x2900208D -0x3100208E -0x2903408F -0x29038090 -0x39408091 -0x39408092 -0x39033093 -0x31405094 -0x31408095 -0x2940B096 -0x31408097 -0x29030098 -0x29036099 -0x2940D09A -0x3103109B - -0x4900F000 pause menu -0x4?????01 identical to above? -0x49000002 change menu selection -0x49000003 select menu item -0x49002004 collect lasers -0x49002005 collect bomb -0x49002006 collect bomb. identical to above, played at same time -0x49004007 scroll number -0x49000008 vs countodwn -0x49000009 vs go -0x4900100A bad selection -0x4?????0B warning sound? -0x4900000C item appears -0x4900200D big heal -0x4900200E small heal -0x4900400F collect checkpoint -0x49008010 low health hit alarm -0x49008011 critical health hit alarm -0x41007012 teammate health increase -0x49003013 collect gold ring -0x49000014 great fox warning siren -0x49008015 health bar increase -0x49002016 good luck -0x49000017 trainer text display -0x49002018 call alert -0x49000019 map pause menu up, also crosshairs on -0x4900101A map pause menu down, also crosshairs off -0x4900001B torpedo lock on -0x4900001C missile great fox proximity alert -0x4900101D exit menu -0x4100001E briefing sounds -0x4900001F world map appears ? -0x49000020 main menu select -0x49000021 main menu back -0x49000022 main menu change selection -0x4100C023 solar heat alarm -0x4900C024 1UP -0x49008025 ring passed -0x49001026 low health nag -0x49008027 charge lock on -0x4900C028 boss health appears -0x4?????29 sound like an item collect jingle -0x4900C02A timer countdown alert -0x4?????2B some sort of option change? -0x4900002C cockpit view on -0x4900002D cockpit view off -0x4900402E EVSFX_16, missed zoness searchlight -0x4900402F ring failed -0x49008030 medal award -0x49008031 mission accomplished text -0x49000032 one steep bill -0x49000033 whaaat -0x49008034 mission complete text -0x4?????35 quiet noise, hard to place -0x4900D036 vs mode time up. doesn't play? diff --git a/sfxStrings.txt b/sfxStrings.txt deleted file mode 100644 index 1a36867e..00000000 --- a/sfxStrings.txt +++ /dev/null @@ -1,351 +0,0 @@ - -NA_SE_FALL -NA_SE_PASS -NA_SE_ARWIN_GO_OUT -NA_SE_OB_METAL_BOUND_S -NA_SE_OB_METAL_BOUND_M -NA_SE_EN_METAL_BOUND_M -NA_SE_EN_MS_LAND -NA_SE_OB_METAL_BOUND_L -NA_SE_OB_BOUND_S -NA_SE_OB_BLOCK_APPEAR -NA_SE_OB_BOUND_M -NA_SE_OB_ROCK_BOUND -NA_SE_OB_BOUND_L -NA_SE_OB_AC_ROCK_BOUND -NA_SE_OB_AC_PILLAR_BOUND -NA_SE_METALBOMB_REFLECT -NA_SE_OB_MC_SWITCH_UP -NA_SE_METALBOMB_BOUND -NA_SE_SAND_SLIDE -NA_SE_TANK_SLIDE -NA_SE_SPLASH_LEVEL_S -NA_SE_SPLASH_LEVEL_L -NA_SE_OB_GATE_OPEN -NA_SE_OB_SLIDE_OPEN -NA_SE_OB_GATE_CLOSE -NA_SE_OB_SLIDE_CLOSE -NA_SE_OB_EXPLOSION_S -NA_SE_GREATFOX_ENGINE -NA_SE_EARTHQUAKE -NA_SE_MAP_ZOOM_START -NA_SE_MAP_ZOOM_END -NA_SE_OB_WATER_BOUND_M -NA_SE_EN_WATER_BOUND_M -NA_SE_OB_STEELFRAME -NA_SE_EXPLOSION_DEMO2 -NA_SE_KT_UFO_FALLING -NA_SE_IN_SPLASH_S -NA_SE_OUT_SPLASH_S -NA_SE_IN_SPLASH_L -NA_SE_OUT_SPLASH_L -NA_SE_OB_CRAME_MOTOR -NA_SE_OB_BROKEN_BOX -NA_SE_OB_MINI_BOMB -NA_SE_OB_WT_WHEEL_ROLL -NA_SE_OB_WALL_UP -NA_SE_OB_WALL_BOMB -NA_SE_ON_SPLASH_S -NA_SE_EN_PULL_CHAIN0 -NA_SE_EN_GATHER_PARTS -NA_SE_EN_HEARTBEAT -NA_SE_OB_SAND_BOUND_S -NA_SE_EN_SAND_BOUND_S -NA_SE_KT_UFO_ENGINE -NA_SE_MAP_ZOOM_OUT -NA_SE_EN_BROKEN_SPARK -NA_SE_OB_BROKEN_SPARK -NA_SE_OB_SPARK_BEAM -NA_SE_OB_BOMB_ALARM -NA_SE_WARP_HOLE -NA_SE_OB_WING -NA_SE_SUBMARINE_ATM -NA_SE_WATER_PRESSURE -NA_SE_BUBBLE_UP -NA_SE_EN_WT_BROKEN -NA_SE_EN_WT_DISAPPEAR_S -NA_SE_EN_WT_BOUND_M -NA_SE_OB_BOMB_ALARM_LAST -NA_SE_EN_WT_DISAPPEAR_L -NA_SE_EN_RNG_BEAM_CHARGE -NA_SE_EN_RNG_BEAM_SHOT -NA_SE_EN_MCBOSS_PLATEBEAM -NA_SE_EN_SHIELD_ROLL -NA_SE_GREATFOX_SHOT_DEMO -NA_SE_WARP_RING_1 -NA_SE_WARP_RING_2 -NA_SE_WARP_RING_3 -NA_SE_WARP_RING_4 -NA_SE_WARP_RING_5 -NA_SE_WARP_RING_6 -NA_SE_WARP_RING_7 -NA_SE_KT_UFO_HATCH_OPEN -NA_SE_KT_UFO_HATCH_CLOSE -NA_SE_KT_UFO_CORE_OPEN -NA_SE_BO_CORE_APPEAR -NA_SE_KT_UFO_HATCH_STOP -NA_SE_KT_UFO_CORE_STOP -NA_SE_KT_UFO_LONG_CHARGE -NA_SE_KT_UFO_LAST_CHARGE -NA_SE_KT_UFO_BEAM -NA_SE_EXPLOSION_DEMO3 -NA_SE_KT_UFO_BOUND -NA_SE_OB_BARRIER_RELEASE -NA_SE_EN_SPACE_SNAKE -NA_SE_OB_ROCKWALL_UP -NA_SE_COLONY_LEVEL -NA_SE_MAP_MOVE -NA_SE_MAP_ROLL -NA_SE_MAP_LINE_DRAW -NA_SE_SHIP_ENGINE_SPC -NA_SE_OB_BROKEN_SPARK_L -NA_SE_EN_SHIELD_ROLL_LEVEL -NA_SE_EN_SHIELD_ROLL_STOP -NA_SE_OB_MAGMA_WAVE -NA_SE_EN_OUT_PROMINENCE -NA_SE_EN_OUT_MAGMA -NA_SE_EN_IN_PROMINENCE -NA_SE_EN_IN_MAGMA -NA_SE_OB_SMOKE -NA_SE_OB_ROCK_CRASH -NA_SE_OB_ROCK_EYE_OPEN -NA_SE_OB_SHIP_FALLDOWN -NA_SE_EN_BMBOSS_BROKEN -NA_SE_OB_ARM_SWING -NA_SE_OB_POLE_MOVE -NA_SE_OB_POLE_BOUND -NA_SE_OB_HEAVY_SWITCH -NA_SE_OB_CONNECT_CUT -NA_SE_OB_MC_SWITCH_ON -NA_SE_OB_MC_SWITCH_GRN -NA_SE_OB_MC_SWITCH_RED -NA_SE_OB_POST_UP -NA_SE_OB_SIDE_GATE_CLOSE -NA_SE_OB_SPEAR_STICK -NA_SE_RAILWAY_BOUND -NA_SE_EN_MCBOSS_HATCH -NA_SE_EN_MCBOSS_CHARGE0 -NA_SE_EN_MCBOSS_SHOT0 -NA_SE_EN_MCBOSS_PLATECHARGE -NA_SE_VO_ANDORF_PUNCH -NA_SE_VO_ANDORF_UPSLAP -NA_SE_VO_ANDORF_SLAP -NA_SE_VO_ANDORF_WHAND -NA_SE_VO_ANDORF_CHOKE -NA_SE_VO_ANDORF_LAUGH -NA_SE_VO_ANDORF_GROAN -NA_SE_VO_ANDORF_DEATH -NA_SE_OB_ROOT_EXPLOSION0 -NA_SE_OB_ROOT_GATE_OPEN -NA_SE_OB_ROUTEGATE_OPEN_Q -NA_SE_EN_ANDORF_ROBOT -NA_SE_EN_ANDORF_BRAIN -NA_SE_EN_ANDORF_EYE -NA_SE_OB_ROOT_EXPLOSION1 -NA_SE_OB_FISH_AWAY -NA_SE_OB_AC_PILLAR_BROKE -NA_SE_WARP_OUT -NA_SE_ARWING_HATCH -NA_SE_OB_POINT_SWITCH -NA_SE_VO_ANDORF_EXCITE -NA_SE_OB_PILLER_ROLL -NA_SE_OB_ROUTEGATE_CLOSE_Q -NA_SE_OB_ROUTEGATE_OPEN_S -NA_SE_OB_ROUTEGATE_CLOSE_S -NA_SE_OB_LIFT -NA_SE_OB_PLATE_ROLL -NA_SE_STARFOX_SEAL -NA_SE_EXPLOSION_DEMO6 - - -NA_SE_EXPLOSION_S -NA_SE_BIG_EXPLOSION -NA_SE_EN_SHOT_0 -NA_SE_EN_DAMAGE_M -NA_SE_OB_DAMAGE_M -NA_SE_EN_BREATH -NA_SE_EN_WOLF_ENGINE -NA_SE_EN_WOLF_ENGINE2 -NA_SE_EN_REFLECT -NA_SE_OB_REFLECT -NA_SE_EN_EXPLOSION_S -NA_SE_EN_EXPLOSION_M -NA_SE_OB_EXPLOSION_M -NA_SE_EN_EXPLOSION_L -NA_SE_EN_CRASH_DOWN -NA_SE_ARWING_ENGINE_F -NA_SE_ARWING_ENGINE_FG -NA_SE_ARWING_SHOT_F -NA_SE_EN_DAMAGE_S -NA_SE_OB_DAMAGE_S -NA_SE_EN_DAMAGE_L -NA_SE_EN_KNOCK_DOWN -NA_SE_EN_ENGINE_00 -NA_SE_EN_S_FIGHTER_ENGINE -NA_SE_EN_ENGINE_01 -NA_SE_EN_ENGINE_02 -NA_SE_EN_MISSILE_ENGINE -NA_SE_EN_ENGINE_03 -NA_SE_EN_LONG_BEAM -NA_SE_EN_ENGINE_04 -NA_SE_EN_ALIEN_FLY -NA_SE_EN_ENGINE_05 -NA_SE_EN_SPACE_SHIP -NA_SE_EN_ENGINE_06 -NA_SE_EN_TANK_RB_ENGINE -NA_SE_EN_ENGINE_07 -NA_SE_EN_TANK_ENGINE -NA_SE_A_CARRIER_ENGINE -NA_SE_A_CARRIER_ENGINE2 -NA_SE_EN_HEAVY_WALK -NA_SE_EN_HEAVY_WALK0 -NA_SE_EN_HATCH -NA_SE_EN_MISSILE_SHOT -NA_SE_EN_BARREL_SHOT -NA_SE_EN_THROW -NA_SE_EN_MS_PUNCH -NA_SE_EN_FALLING_DOWN -NA_SE_EN_LASER_BEAM -NA_SE_EN_HEAVY_WALK1 -NA_SE_EN_HEAVY_JUMP -NA_SE_EN_HEAVY_BOUND -NA_SE_OB_HEAVY_BOUND -NA_SE_EN_COMBINE -NA_SE_EN_MOTOR_ROLL -NA_SE_EN_MOTOR_STOP -NA_SE_EN_UNIT_COMBINE -NA_SE_EN_ENERGY_BEAM -NA_SE_EN_CIRCLE_BEAM -NA_SE_EN_ZOBOSS_BEAM -NA_SE_EN_BOSS_EXPLOSION -NA_SE_EN_STAR_EXPLOSION -NA_SE_EN_PARTS_BROKEN -NA_SE_EN_THROW_S -NA_SE_EN_HEAVY_WALK2 -NA_SE_EN_APPEAR_SAND -NA_SE_EN_TIBOSS_AT_CRY -NA_SE_EN_TIBOSS_DM_CRY -NA_SE_EN_TIBOSS_DW_CRY -NA_SE_EXPLOSION_DEMO -NA_SE_EXPLOSION_DEMO5 -NA_SE_EN_BOSS_BEAM0 -NA_SE_EN_BOSS_CHARGE -NA_SE_EN_BOSS_ATTACK -NA_SE_EN_SAND_BOUND_M -NA_SE_OB_SPEAR_PILLAR -NA_SE_EN_WT_EXPLOSION_S -NA_SE_EN_WT_EXPLOSION_M -NA_SE_EN_WT_EXPLOSION_L -NA_SE_EN_BIRD_DOWN -NA_SE_EN_SN_BIRD_DOWN -NA_SE_EN_BIRD_DAMAGE -NA_SE_EN_SN_BIRD_DAMAGE -NA_SE_EN_SPIDER_MOVE -NA_SE_EN_SHIP_ENGINE_S -NA_SE_EN_SHIP_ENGINE_L -NA_SE_EN_S_BALL_SHOT -NA_SE_EN_SINK_PARTS -NA_SE_EN_M_BALL_SHOT -NA_SE_EN_PULL_CHAIN1 -NA_SE_EN_HEART_OPEN -NA_SE_ARWING_ENGINE_FS -NA_SE_EN_SNAKE_DAMAGE -NA_SE_EN_KANI_DAMAGE -NA_SE_EN_KANI_DOWN -NA_SE_EN_KANI_MOTOR -NA_SE_EN_DISAPPEAR_SAND -NA_SE_EN_SANADA_DAMAGE -NA_SE_EN_SANADA_DOWN -NA_SE_EN_SANADA_SWIM -NA_SE_EN_SANADA_APPEAR -NA_SE_EN_SEA_EXPLOSION_S -NA_SE_EN_SEA_EXPLOSION_L -NA_SE_EN_P_BALL_SHOT -NA_SE_EN_WT_DAMAGE_S -NA_SE_EN_EYEFILM_DAMAGE -NA_SE_EN_SHELL_BEAT -NA_SE_EN_SHELL_DAMAGE -NA_SE_EN_SHELL_DOWN -NA_SE_EN_KAIBASHIRA_DAMEGE -NA_SE_EN_EYEFILM_REVIVAL -NA_SE_EN_P_GUN_APPEAR -NA_SE_EN_P_GUN_DISAPPEAR -NA_SE_EN_SHELL_CLOSE -NA_SE_EN_SHELL_FILLOPEN -NA_SE_EN_S_BEAM_CHARGE -NA_SE_EN_S_BEAM_SHOT -NA_SE_EN_S_BEAM_END -NA_SE_GREATFOX_BURNER -NA_SE_EN_BURNER_S -NA_SE_EN_BURNER_L -NA_SE_EN_MS_BURNER -NA_SE_EN_GRN_BEAM_CHARGE -NA_SE_EN_GRN_BEAM_SHOT -NA_SE_EN_ASBOSS_SHIELD -NA_SE_EN_CATCH -NA_SE_EN_PASS -NA_SE_EN_SZMIS_EXPLOSION -NA_SE_EN_MS_EXPLOSION_S -NA_SE_EN_SZMIS_ENGINE -NA_SE_EN_PUNCH_ENGINE -NA_SE_EN_BARRIER_REFLECT -NA_SE_EXPLOSION_DEMO4 -NA_SE_EN_ANDORF_EXPLOSION -NA_SE_EN_SPARK_DAMAGE_M -NA_SE_EN_BMBOSS_DAMAGE -NA_SE_EN_ARM_SWING -NA_SE_EN_COVER_OPEN -NA_SE_EN_COVER_CLOSE -NA_SE_EN_COVER_MOVE_STOP -NA_SE_EN_ENERGY_BALL -NA_SE_EN_UNIT_GATHERING -NA_SE_EN_MS_SHOT_S -NA_SE_EN_DASH -NA_SE_EN_MS_DASH -NA_SE_EN_KICK -NA_SE_EN_MS_KICK -NA_SE_EN_MS_SHOT_L -NA_SE_EN_MS_SHIELD_BROKEN -NA_SE_EN_MS_EXPLOSION_L -NA_SE_OB_SNROCK_APPEAR -NA_SE_OB_SNROCK_DISAPPEAR -NA_SE_EN_SNBOSS_CRY -NA_SE_EN_SNBOSS_DAMAGE -NA_SE_EN_SNBOSS_BROKEN -NA_SE_EN_SNBOSS_DOWN -NA_SE_EN_SNBOSS_SWING -NA_SE_EN_SNBOSS_BREATH -NA_SE_EN_SNBOSS_ROLL -NA_SE_EN_ANGLER_DAMAGE -NA_SE_EN_ANGLER_DOWN -NA_SE_ROCK_REFLECT -NA_SE_OB_ROCK_REFLECT -NA_SE_OB_MAGMA_BUBBLE -NA_SE_OB_BMBOSS_WALK -NA_SE_OB_BMBOSS_JUMP -NA_SE_OB_BMBOSS_LAND -NA_SE_OB_BMBOSS_ATTACK -NA_SE_OB_BMBOSS_BOUND -NA_SE_EN_FREIGHT_TRAIN -NA_SE_EN_MCBOSS_REFLECT -NA_SE_EN_ANDORF_BREATH -NA_SE_EN_ANDORF_BITE0 -NA_SE_EN_ANDORF_BITE1 -NA_SE_EN_ANDORF_VOMIT -NA_SE_EN_ANDORF_SPARK -NA_SE_EN_WT_THROW -NA_SE_EN_WT_SPARK_CHARGE -NA_SE_EN_WT_SPARK_BEAM -NA_SE_EN_AC_ZAKO_DAMAGE -NA_SE_EN_AC_ZAKO_DOWN -NA_SE_EN_WARP_IN -NA_SE_EN_WARP_OUT -NA_SE_EN_CLBOSS_CHARGE -NA_SE_EN_CLBOSS_BEAM -NA_SE_EN_TRAIN_BREAK -NA_SE_EN_ANDORF_WARP -NA_SE_EN_ANDORF_CATCH -NA_SE_EN_KANI_STOP -NA_SE_EN_MCBOSS_RAGE -NA_SE_EN_DOWN_IMPACT -NA_SE_EN_MARBLE_BEAM diff --git a/src/engine/fox_enmy2.c b/src/engine/fox_enmy2.c index 7b7e6c47..1b2307e9 100644 --- a/src/engine/fox_enmy2.c +++ b/src/engine/fox_enmy2.c @@ -874,6 +874,17 @@ void MeteoTunnel_Update(MeteoTunnel* this) { this->obj.rot.z += 1.0f; } +typedef enum EventInfoSfx { + /* 0 */ EISFX_NONE, + /* 1 */ EISFX_EN_ENGINE_01, + /* 2 */ EISFX_ARWING_ENGINE_FG, + /* 3 */ EISFX_GREATFOX_ENGINE, + /* 4 */ EISFX_EN_SHIP_ENGINE_S, + /* 5 */ EISFX_OB_WING, + /* 6 */ EISFX_EN_ALIEN_FLY, + /* 7 */ EISFX_EN_SPACE_SHIP, +} EventInfoSfx; + typedef struct { /* 0x00 */ Gfx* dList; /* 0x04 */ f32* hitbox; @@ -889,114 +900,114 @@ typedef struct { } EventActorInfo; // size = 0x20 static EventActorInfo sEventActorInfo[108] = { - /* 0 */ { D_ENMY_PLANET_40068F0, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 1 */ { D_ENMY_PLANET_4006E90, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 2 */ { NULL, gCubeHitbox100, 1.0f, 20000.0f, 3000.0f, 1, 0, 2, 0, 0.0f, 0 }, - /* 3 */ { D_ENMY_PLANET_4009800, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, - /* 4 */ { D_ENMY_PLANET_40073C0, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 5 */ { D_ENMY_PLANET_4007AF0, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 6 */ { NULL, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, - /* 7 */ { D_CO_6011F90, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 0.0f, 1 }, - /* 8 */ { D_ENMY_PLANET_4000710, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 2, 0, 1, 1, 1.0f, 1 }, - /* 9 */ { NULL, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 6, 0, 1.0f, 1 }, - /* 10 */ { D_ENMY_SPACE_400BD20, gCubeHitbox200, 2.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 11 */ { D_ENMY_SPACE_4001310, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 6, 0, 1.0f, 1 }, - /* 12 */ { D_ENMY_SPACE_400B390, gCubeHitbox100, 2.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 13 */ { D_ME_6018C00, gCubeHitbox100, 2.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 14 */ { D_ME_601F2A0, gCubeHitbox400, 7.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 15 */ { D_ENMY_SPACE_400AAE0, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 16 */ { D_ENMY_SPACE_4000650, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 6, 0, 1.0f, 1 }, - /* 17 */ { D_A6_6016190, D_A6_60282A0, -2.0f, 2100.0f, 3000.0f, 0, 0, 7, 0, 0.0f, 5 }, - /* 18 */ { D_SX_6023500, gCubeHitbox200, 2.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 19 */ { D_SX_6022DF0, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 20 */ { NULL, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 2, 1, 1, 0, 0.0f, 1 }, - /* 21 */ { NULL, gCubeHitbox200, 2.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 0.0f, 1 }, - /* 22 */ { NULL, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 0.0f, 1 }, - /* 23 */ { D_ENMY_SPACE_4008FA0, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 24 */ { D_SX_60285F0, D_SX_603298C, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 25 */ { D_SX_600AF70, D_SX_6032904, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 26 */ { D_SX_6023E30, D_SX_6032970, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 27 */ { NULL, D_SX_603285C, 2.5f, 100.0f, 3000.0f, 2, 0, 0, 0, 1.0f, 1 }, - /* 28 */ { D_SX_6001CE0, D_SX_6032938, 3.0f, 100.0f, 3000.0f, 2, 0, 0, 0, 1.0f, 1 }, - /* 29 */ { D_SX_6000840, D_SX_6032954, 1.0f, 100.0f, 3000.0f, 2, 1, 0, 0, 1.0f, 1 }, - /* 30 */ { D_A6_6012A40, D_A6_6028254, -2.0f, 2100.0f, 3001.0f, 0, 0, 7, 0, 0.0f, 2 }, - /* 31 */ { NULL, D_A6_60280E0, -2.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 3 }, - /* 32 */ { D_SX_6009950, D_SX_6032878, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 33 */ { NULL, gCubeHitbox200, 2.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, - /* 34 */ { D_SX_600B2B0, D_SX_6032894, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 35 */ { D_SX_600A2E0, D_SX_60328B0, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 36 */ { NULL, gCubeHitbox400, 2.0f, 200.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 37 */ { D_SX_600B830, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 38 */ { NULL, D_SX_603238C, 1.0f, 500.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, - /* 39 */ { D_SX_6020D20, D_SX_60328CC, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 40 */ { NULL, gNoHitbox, 1.0f, 100.0f, 3001.0f, 2, 0, 0, 0, 0.0f, 1 }, - /* 41 */ { D_SY_60097E0, D_SY_6034478, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 42 */ { D_SY_601D730, D_SY_603450C, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 43 */ { NULL, gCubeHitbox100, 1.0f, 20000.0f, 3000.0f, 1, 0, 2, 0, 0.0f, 0 }, - /* 44 */ { D_SY_60102C0, D_SY_6034588, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 45 */ { D_ME_6017B60, gCubeHitbox200, -1.0f, 300.0f, 3001.0f, 0, 0, 0, 0, 1.0f, 1 }, - /* 46 */ { D_ZO_6004D00, gCubeHitbox200, 1.0f, 100.0f, 3000.0f, 1, 0, 4, 0, 1.0f, 1 }, - /* 47 */ { D_ME_601A880, gCubeHitbox100, -1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, - /* 48 */ { NULL, D_SY_603405C, 0.3f, 100.0f, 3000.0f, 0, 0, 1, 0, 1.0f, 1 }, - /* 49 */ { NULL, D_SY_603405C, 0.3f, 100.0f, 3000.0f, 0, 0, 1, 0, 1.0f, 1 }, - /* 50 */ { NULL, D_SY_603405C, 0.3f, 100.0f, 3000.0f, 0, 0, 1, 0, 1.0f, 1 }, - /* 51 */ { D_SY_6015D60, D_SY_6034124, 2.0f, 100.0f, 3000.0f, 0, 0, 1, 0, 1.0f, 1 }, - /* 52 */ { NULL, D_ZO_602C1A0, -1.0f, 1000.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 53 */ { D_SX_600B540, D_SX_60328E8, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 54 */ { D_ENMY_SPACE_4000EC0, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 55 */ { D_ENMY_SPACE_4008D50, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 56 */ { NULL, gNoHitbox, -1.0f, 2000.0f, 3000.0f, 0, 0, 3, 0, 0.0f, 1 }, - /* 57 */ { D_SY_60102C0, gNoHitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 58 */ { D_SY_601F3D0, gNoHitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 59 */ { D_SY_6022B10, gNoHitbox, 2.0f, 100.0f, 3000.0f, 0, 0, 1, 0, 0.0f, 1 }, - /* 60 */ { D_SY_60209F0, gNoHitbox, 2.0f, 100.0f, 3000.0f, 0, 0, 1, 0, 0.0f, 1 }, - /* 61 */ { D_ME_6019430, gCubeHitbox200, 2.5f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, - /* 62 */ { D_ME_6018960, gCubeHitbox100, 2.5f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, - /* 63 */ { D_ME_6009F50, gNoHitbox, -1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, - /* 64 */ { NULL, gCubeHitbox200, 3.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, - /* 65 */ { D_ME_600C2A0, gCubeHitbox200, -1.0f, 100.0f, 8000.0f, 1, 0, 0, 0, 0.0f, 1 }, - /* 66 */ { D_ME_600BD40, gCubeHitbox100, -1.0f, 100.0f, 8000.0f, 1, 0, 0, 0, 0.0f, 1 }, - /* 67 */ { NULL, D_ME_602F604, 3.0f, 100.0f, 3000.0f, 2, 0, 1, 0, 1.0f, 1 }, - /* 68 */ { D_SY_60205D0, D_SY_603445C, 3.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, - /* 69 */ { D_SY_60036A0, D_SY_6034664, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 70 */ { D_SY_601AD70, gNoHitbox, 4.0f, 100.0f, 3000.0f, 0, 0, 1, 0, 0.0f, 1 }, - /* 71 */ { D_arwing_3007650, gNoHitbox, 1.0f, 100.0f, 3000.0f, 2, 0, 5, 0, 0.0f, 1 }, - /* 72 */ { D_SY_60034D0, D_SY_60347D4, 3.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, - /* 73 */ { D_SY_6005360, D_SY_6034770, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 74 */ { D_SY_600F6C0, D_SY_60347F0, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 75 */ { D_SY_601B610, gNoHitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, 1, 0, 0.0f, 1 }, - /* 76 */ { D_SY_601C6A0, gNoHitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, 1, 0, 0.0f, 1 }, - /* 77 */ { D_SY_60188D0, D_SY_603486C, 3.0f, 100.0f, 3001.0f, 0, 0, 1, 0, 0.0f, 1 }, - /* 78 */ { NULL, gCubeHitbox150, 1.0f, 100.0f, 3000.0f, 2, 0, 0, 0, 1.0f, 0 }, - /* 79 */ { NULL, D_ZO_602C294, 1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 1.0f, 1 }, - /* 80 */ { NULL, D_VE1_601B474, -1.0f, 100.0f, 3000.0f, 2, 0, 0, 0, 0.0f, 1 }, - /* 81 */ { NULL, gNoHitbox, -1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 82 */ { NULL, gCubeHitbox100, 2.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 83 */ { NULL, D_AQ_6030B4C, 1.0f, 100.0f, 3000.0f, 2, 0, 0, 0, 60.0f, 1 }, - /* 84 */ { D_VE1_9012180, D_VE1_601B43C, -1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 85 */ { NULL, gCubeHitbox100, 1.0f, 20000.0f, 3000.0f, 1, 0, 2, 0, 0.0f, 0 }, - /* 86 */ { NULL, gCubeHitbox100, 1.0f, 20000.0f, 3000.0f, 1, 0, 2, 0, 0.0f, 0 }, - /* 87 */ { D_VE1_900EFC0, gNoHitbox, 1.0f, 100.0f, 3000.0f, 1, 1, 0, 0, 0.0f, 1 }, - /* 88 */ { NULL, D_AQ_6030B30, 1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, - /* 89 */ { NULL, D_AQ_6030B14_f32, 1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, - /* 90 */ { D_MA_601C520, D_MA_60368FC, 1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, - /* 91 */ { D_MA_600AF40, D_MA_60368E0, -1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, - /* 92 */ { D_WZ_7000C40, gWarpZoneEvent92Hitbox, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 93 */ { D_WZ_70010E0, gWarpZoneEvent93Hitbox, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 94 */ { D_WZ_7000E80, gWarpZoneEvent94Hitbox, 2.5f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, - /* 95 */ { D_WZ_70008F0, gCubeHitbox100, -1.0f, 100.0f, 8000.0f, 1, 0, 0, 0, 0.0f, 0 }, - /* 96 */ { D_WZ_7000280, gWarpZoneEvent96Hitbox, -1.0f, 1000.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 0 }, - /* 97 */ { D_ME_600AC70, gCubeHitbox100, -1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, - /* 98 */ { D_MA_601A2B0, D_MA_60364C0, 1.0f, 100.0f, 3000.0f, 1, 1, 0, 0, 0.0f, 1 }, - /* 99 */ { D_VE1_6002500, D_VE1_601B944, -1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 100 */ { D_VE1_60043F0, gNoHitbox, -1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 101 */ { D_VE1_6004310, gNoHitbox, -1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 102 */ { D_TR_6002740, D_TR_6009D18, -1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 103 */ { NULL, gNoHitbox, -1.0f, 500.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* 104 */ { NULL, gNoHitbox, -1.0f, 500.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* 105 */ { NULL, gCubeHitbox200, 1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 1.0f, 1 }, - /* 106 */ { NULL, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 0, 0, 6, 0, 0.0f, 0 }, - /* 107 */ { D_MA_6002890, D_MA_60368E0, -1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, + /* 0 */ { D_ENMY_PLANET_40068F0, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* 1 */ { D_ENMY_PLANET_4006E90, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* 2 */ { NULL, gCubeHitbox100, 1.0f, 20000.0f, 3000.0f, 1, 0, EISFX_ARWING_ENGINE_FG, 0, 0.0f, 0 }, + /* 3 */ { D_ENMY_PLANET_4009800, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 1.0f, 1 }, + /* 4 */ { D_ENMY_PLANET_40073C0, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* 5 */ { D_ENMY_PLANET_4007AF0, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* 6 */ { NULL, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 1.0f, 1 }, + /* 7 */ { D_CO_6011F90, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, + /* 8 */ { D_ENMY_PLANET_4000710, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 2, 0, EISFX_EN_ENGINE_01, 1, 1.0f, 1 }, + /* 9 */ { NULL, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ALIEN_FLY, 0, 1.0f, 1 }, + /* 10 */ { D_ENMY_SPACE_400BD20, gCubeHitbox200, 2.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* 11 */ { D_ENMY_SPACE_4001310, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ALIEN_FLY, 0, 1.0f, 1 }, + /* 12 */ { D_ENMY_SPACE_400B390, gCubeHitbox100, 2.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* 13 */ { D_ME_6018C00, gCubeHitbox100, 2.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* 14 */ { D_ME_601F2A0, gCubeHitbox400, 7.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* 15 */ { D_ENMY_SPACE_400AAE0, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* 16 */ { D_ENMY_SPACE_4000650, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ALIEN_FLY, 0, 1.0f, 1 }, + /* 17 */ { D_A6_6016190, D_A6_60282A0, -2.0f, 2100.0f, 3000.0f, 0, 0, EISFX_EN_SPACE_SHIP, 0, 0.0f, 5 }, + /* 18 */ { D_SX_6023500, gCubeHitbox200, 2.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* 19 */ { D_SX_6022DF0, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* 20 */ { NULL, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 2, 1, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, + /* 21 */ { NULL, gCubeHitbox200, 2.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, + /* 22 */ { NULL, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, + /* 23 */ { D_ENMY_SPACE_4008FA0, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* 24 */ { D_SX_60285F0, D_SX_603298C, -1.0f, 2100.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 25 */ { D_SX_600AF70, D_SX_6032904, -1.0f, 2100.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 26 */ { D_SX_6023E30, D_SX_6032970, -1.0f, 2100.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 27 */ { NULL, D_SX_603285C, 2.5f, 100.0f, 3000.0f, 2, 0, EISFX_NONE, 0, 1.0f, 1 }, + /* 28 */ { D_SX_6001CE0, D_SX_6032938, 3.0f, 100.0f, 3000.0f, 2, 0, EISFX_NONE, 0, 1.0f, 1 }, + /* 29 */ { D_SX_6000840, D_SX_6032954, 1.0f, 100.0f, 3000.0f, 2, 1, EISFX_NONE, 0, 1.0f, 1 }, + /* 30 */ { D_A6_6012A40, D_A6_6028254, -2.0f, 2100.0f, 3001.0f, 0, 0, EISFX_EN_SPACE_SHIP, 0, 0.0f, 2 }, + /* 31 */ { NULL, D_A6_60280E0, -2.0f, 2100.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 3 }, + /* 32 */ { D_SX_6009950, D_SX_6032878, -1.0f, 2100.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 33 */ { NULL, gCubeHitbox200, 2.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 34 */ { D_SX_600B2B0, D_SX_6032894, -1.0f, 2100.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 35 */ { D_SX_600A2E0, D_SX_60328B0, -1.0f, 2100.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 36 */ { NULL, gCubeHitbox400, 2.0f, 200.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* 37 */ { D_SX_600B830, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* 38 */ { NULL, D_SX_603238C, 1.0f, 500.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 39 */ { D_SX_6020D20, D_SX_60328CC, -1.0f, 2100.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 40 */ { NULL, gNoHitbox, 1.0f, 100.0f, 3001.0f, 2, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 41 */ { D_SY_60097E0, D_SY_6034478, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 42 */ { D_SY_601D730, D_SY_603450C, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 43 */ { NULL, gCubeHitbox100, 1.0f, 20000.0f, 3000.0f, 1, 0, EISFX_ARWING_ENGINE_FG, 0, 0.0f, 0 }, + /* 44 */ { D_SY_60102C0, D_SY_6034588, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 45 */ { D_ME_6017B60, gCubeHitbox200, -1.0f, 300.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 1.0f, 1 }, + /* 46 */ { D_ZO_6004D00, gCubeHitbox200, 1.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_SHIP_ENGINE_S, 0, 1.0f, 1 }, + /* 47 */ { D_ME_601A880, gCubeHitbox100, -1.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 48 */ { NULL, D_SY_603405C, 0.3f, 100.0f, 3000.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* 49 */ { NULL, D_SY_603405C, 0.3f, 100.0f, 3000.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* 50 */ { NULL, D_SY_603405C, 0.3f, 100.0f, 3000.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* 51 */ { D_SY_6015D60, D_SY_6034124, 2.0f, 100.0f, 3000.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* 52 */ { NULL, D_ZO_602C1A0, -1.0f, 1000.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 53 */ { D_SX_600B540, D_SX_60328E8, -1.0f, 2100.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 54 */ { D_ENMY_SPACE_4000EC0, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* 55 */ { D_ENMY_SPACE_4008D50, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* 56 */ { NULL, gNoHitbox, -1.0f, 2000.0f, 3000.0f, 0, 0, EISFX_GREATFOX_ENGINE, 0, 0.0f, 1 }, + /* 57 */ { D_SY_60102C0, gNoHitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 58 */ { D_SY_601F3D0, gNoHitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 59 */ { D_SY_6022B10, gNoHitbox, 2.0f, 100.0f, 3000.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, + /* 60 */ { D_SY_60209F0, gNoHitbox, 2.0f, 100.0f, 3000.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, + /* 61 */ { D_ME_6019430, gCubeHitbox200, 2.5f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 1.0f, 1 }, + /* 62 */ { D_ME_6018960, gCubeHitbox100, 2.5f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 1.0f, 1 }, + /* 63 */ { D_ME_6009F50, gNoHitbox, -1.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 64 */ { NULL, gCubeHitbox200, 3.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 1.0f, 1 }, + /* 65 */ { D_ME_600C2A0, gCubeHitbox200, -1.0f, 100.0f, 8000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 66 */ { D_ME_600BD40, gCubeHitbox100, -1.0f, 100.0f, 8000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 67 */ { NULL, D_ME_602F604, 3.0f, 100.0f, 3000.0f, 2, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* 68 */ { D_SY_60205D0, D_SY_603445C, 3.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 1.0f, 1 }, + /* 69 */ { D_SY_60036A0, D_SY_6034664, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 70 */ { D_SY_601AD70, gNoHitbox, 4.0f, 100.0f, 3000.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, + /* 71 */ { D_arwing_3007650, gNoHitbox, 1.0f, 100.0f, 3000.0f, 2, 0, EISFX_OB_WING, 0, 0.0f, 1 }, + /* 72 */ { D_SY_60034D0, D_SY_60347D4, 3.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 73 */ { D_SY_6005360, D_SY_6034770, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 74 */ { D_SY_600F6C0, D_SY_60347F0, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 75 */ { D_SY_601B610, gNoHitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, + /* 76 */ { D_SY_601C6A0, gNoHitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, + /* 77 */ { D_SY_60188D0, D_SY_603486C, 3.0f, 100.0f, 3001.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, + /* 78 */ { NULL, gCubeHitbox150, 1.0f, 100.0f, 3000.0f, 2, 0, EISFX_NONE, 0, 1.0f, 0 }, + /* 79 */ { NULL, D_ZO_602C294, 1.0f, 100.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 1.0f, 1 }, + /* 80 */ { NULL, D_VE1_601B474, -1.0f, 100.0f, 3000.0f, 2, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 81 */ { NULL, gNoHitbox, -1.0f, 100.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 82 */ { NULL, gCubeHitbox100, 2.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* 83 */ { NULL, D_AQ_6030B4C, 1.0f, 100.0f, 3000.0f, 2, 0, EISFX_NONE, 0, 60.0f, 1 }, + /* 84 */ { D_VE1_9012180, D_VE1_601B43C, -1.0f, 100.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 85 */ { NULL, gCubeHitbox100, 1.0f, 20000.0f, 3000.0f, 1, 0, EISFX_ARWING_ENGINE_FG, 0, 0.0f, 0 }, + /* 86 */ { NULL, gCubeHitbox100, 1.0f, 20000.0f, 3000.0f, 1, 0, EISFX_ARWING_ENGINE_FG, 0, 0.0f, 0 }, + /* 87 */ { D_VE1_900EFC0, gNoHitbox, 1.0f, 100.0f, 3000.0f, 1, 1, EISFX_NONE, 0, 0.0f, 1 }, + /* 88 */ { NULL, D_AQ_6030B30, 1.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 1.0f, 1 }, + /* 89 */ { NULL, D_AQ_6030B14_f32, 1.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 1.0f, 1 }, + /* 90 */ { D_MA_601C520, D_MA_60368FC, 1.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 91 */ { D_MA_600AF40, D_MA_60368E0, -1.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 92 */ { D_WZ_7000C40, gWarpZoneEvent92Hitbox, -1.0f, 2100.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 93 */ { D_WZ_70010E0, gWarpZoneEvent93Hitbox, -1.0f, 2100.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 94 */ { D_WZ_7000E80, gWarpZoneEvent94Hitbox, 2.5f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 1.0f, 1 }, + /* 95 */ { D_WZ_70008F0, gCubeHitbox100, -1.0f, 100.0f, 8000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 0 }, + /* 96 */ { D_WZ_7000280, gWarpZoneEvent96Hitbox, -1.0f, 1000.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 0 }, + /* 97 */ { D_ME_600AC70, gCubeHitbox100, -1.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 98 */ { D_MA_601A2B0, D_MA_60364C0, 1.0f, 100.0f, 3000.0f, 1, 1, EISFX_NONE, 0, 0.0f, 1 }, + /* 99 */ { D_VE1_6002500, D_VE1_601B944, -1.0f, 100.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 100 */ { D_VE1_60043F0, gNoHitbox, -1.0f, 100.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 101 */ { D_VE1_6004310, gNoHitbox, -1.0f, 100.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 102 */ { D_TR_6002740, D_TR_6009D18, -1.0f, 100.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 103 */ { NULL, gNoHitbox, -1.0f, 500.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 0.0f, 0 }, + /* 104 */ { NULL, gNoHitbox, -1.0f, 500.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 0.0f, 0 }, + /* 105 */ { NULL, gCubeHitbox200, 1.0f, 100.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 1.0f, 1 }, + /* 106 */ { NULL, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 0, 0, EISFX_EN_ALIEN_FLY, 0, 0.0f, 0 }, + /* 107 */ { D_MA_6002890, D_MA_60368E0, -1.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, }; static u8 D_800D0DBC[6][4] = { // could be in-function @@ -1159,28 +1170,28 @@ void ActorEvent_ProcessScript(ActorEvent* this) { this->fwork[25] = sEventActorInfo[this->unk_0B4].unk_10; switch (sEventActorInfo[this->unk_0B4].sfx) { - case 1: + case EISFX_EN_ENGINE_01: if (!((gCurrentLevel == LEVEL_SOLAR) || (this->unk_0B4 == EVID_6) || ((gCurrentLevel == LEVEL_CORNERIA) && (this->unk_0B4 == EVID_8)))) { AUDIO_PLAY_SFX(0x31000011, this->sfxSource, 4); } break; - case 2: + case EISFX_ARWING_ENGINE_FG: AUDIO_PLAY_SFX(0x3100000C, this->sfxSource, 4); break; - case 3: + case EISFX_GREATFOX_ENGINE: AUDIO_PLAY_SFX(0x11030010, this->sfxSource, 0); break; - case 4: + case EISFX_EN_SHIP_ENGINE_S: AUDIO_PLAY_SFX(0x31012039, this->sfxSource, 4); break; - case 5: + case EISFX_OB_WING: AUDIO_PLAY_SFX(0x1900302B, this->sfxSource, 0); break; - case 6: + case EISFX_EN_ALIEN_FLY: AUDIO_PLAY_SFX(0x31000014, this->sfxSource, 4); break; - case 7: + case EISFX_EN_SPACE_SHIP: AUDIO_PLAY_SFX(0x31000015, this->sfxSource, 4); break; } diff --git a/src/mods/levelselect.c b/src/mods/levelselect.c index 4a51f980..1f8f9fbd 100644 --- a/src/mods/levelselect.c +++ b/src/mods/levelselect.c @@ -13,31 +13,61 @@ void Map_801A6368(void); void Map_801A914C(void); void Map_801A6628(void); +static PlanetId sPlanetArray[][3] = { + { PLANET_CORNERIA, PLANET_CORNERIA, PLANET_CORNERIA }, { PLANET_METEO, PLANET_METEO, PLANET_SECTOR_Y }, + { PLANET_FORTUNA, PLANET_KATINA, PLANET_AQUAS }, { PLANET_SECTOR_X, PLANET_SOLAR, PLANET_ZONESS }, + { PLANET_TITANIA, PLANET_MACBETH, PLANET_SECTOR_Z }, { PLANET_BOLSE, PLANET_BOLSE, PLANET_AREA_6 }, + { PLANET_VENOM, PLANET_VENOM, SAVE_SLOT_VENOM_2 }, +}; + void Map_LevelSelect(void) { - static PlanetId planetIndex = 0; + static s32 mission = 0; + static s32 difficulty = 0; static char* sLevelSelectPlanetNames[] = { "METEO", "AREA 6", "BOLSE", "SECTOR Z", "SECTOR X", "SECTOR Y", "KATINA", "MACBETH", - "ZONESS", "CORNERIA", "TITANIA", "AQUAS", "FORTUNA", "VENOM", "SOLAR", + "ZONESS", "CORNERIA", "TITANIA", "AQUAS", "FORTUNA", "VENOM 1", "SOLAR", "VENOM 2", }; + static s32 startOption = 0; + s32 nextPlanetId; if (gControllerPress[0].button & L_JPAD) { - planetIndex--; - if (planetIndex < 0) { - planetIndex = 14; + mission--; + if (mission < 0) { + mission = 6; } - sCurrentPlanetId = sPlanetList[planetIndex]; + } else if (gControllerPress[0].button & R_JPAD) { + mission++; + if (mission > 6) { + mission = 0; + } + } else if ((gControllerPress[0].button & U_JPAD) && (mission != 0)) { + difficulty++; + if (difficulty > 2) { + difficulty = 0; + } + if ((difficulty == 1) && ((mission == 1) || (mission == 5))) { + difficulty = 2; + } + } else if ((gControllerPress[0].button & D_JPAD) && (mission != 0)) { + difficulty--; + if ((difficulty != 2) && ((mission == 1) || (mission == 5) || (mission == 6))) { + difficulty--; + } + if (difficulty < 0) { + difficulty = 2; + } + } + + nextPlanetId = + (sPlanetArray[mission][difficulty] == SAVE_SLOT_VENOM_2) ? PLANET_VENOM : sPlanetArray[mission][difficulty]; + if (sCurrentPlanetId != nextPlanetId) { + sCurrentPlanetId = nextPlanetId; + startOption = 0; Map_801A6368(); Map_801A914C(); } - - if (gControllerPress[0].button & R_JPAD) { - planetIndex++; - if (planetIndex > 14) { - planetIndex = 0; - } - sCurrentPlanetId = sPlanetList[planetIndex]; - Map_801A6368(); - Map_801A914C(); + if (gControllerPress[0].button & L_TRIG) { + startOption ^= 1; } /* Draw */ @@ -46,15 +76,33 @@ void Map_LevelSelect(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); Graphics_DisplaySmallText(20, 200, 1.0f, 1.0f, "PLANET:"); - Graphics_DisplaySmallText(80, 200, 1.0f, 1.0f, sLevelSelectPlanetNames[sCurrentPlanetId]); + Graphics_DisplaySmallText(80, 200, 1.0f, 1.0f, sLevelSelectPlanetNames[sPlanetArray[mission][difficulty]]); + + if (startOption) { + if ((sCurrentPlanetId == PLANET_SECTOR_X) || (sCurrentPlanetId == PLANET_METEO)) { + Graphics_DisplaySmallText(80, 210, 1.0f, 1.0f, "WARP ZONE"); + } else if (sCurrentPlanetId == PLANET_VENOM) { + Graphics_DisplaySmallText(80, 210, 1.0f, 1.0f, "ANDROSS"); + } + } } // Bypass briefing - // if (gControllerPress[0].button & A_BUTTON) { if ((D_menu_801CD944 == 2) && (D_menu_801CD948 > 0)) { + if (sCurrentPlanetId == PLANET_VENOM) { + if (startOption) { + gCurrentLevel = LEVEL_VENOM_ANDROSS; + } else if (sPlanetArray[mission][difficulty] == SAVE_SLOT_VENOM_2) { + gCurrentLevel = LEVEL_VENOM_2; + } + } Map_801A61B4(gCurrentLevel); D_menu_801B8280 = 0; D_menu_801CD968 = 0; Map_801A6628(); + if (startOption && ((gCurrentLevel == LEVEL_METEO) || (gCurrentLevel == LEVEL_SECTOR_X) || + (sPlanetArray[mission][difficulty] == SAVE_SLOT_VENOM_2))) { + gLevelPhase = 1; + } } } diff --git a/src/mods/object_ram.c b/src/mods/object_ram.c index b590bfeb..6816444b 100644 --- a/src/mods/object_ram.c +++ b/src/mods/object_ram.c @@ -10,7 +10,7 @@ typedef struct RamEntry { u16 y; } RamEntry; -static RamEntry oRamEntries[8] = { +static RamEntry oRamEntries[7] = { { 1, 0, offsetof(Player, pos.x), 2, 3, 0, 0 }, { 1, 0, offsetof(Player, pos.y), 2, 3, 0, 0 }, { 1, 0, offsetof(Player, pos.z), 2, 3, 0, 0 }, { 0, 0, offsetof(Player, zPath), 2, 3, 0, 0 }, { 0, 0, offsetof(Player, vel.x), 2, 3, 0, 0 }, { 0, 0, offsetof(Player, vel.y), 2, 3, 0, 0 }, diff --git a/src/mods/sfxjukebox2.c b/src/mods/sfxjukebox2.c index 68d11235..4324e7c6 100644 --- a/src/mods/sfxjukebox2.c +++ b/src/mods/sfxjukebox2.c @@ -28,15 +28,15 @@ static s32 srcVec[3] = { 0, 0, 0 }; static f32 sfxSource[3] = { 0.0f, 0.0f, 0.0f }; void Jukebox_SelectFlag(u8* flag) { - if (gControllerPress[gMainController].button & (U_CBUTTONS | D_CBUTTONS)) { + if (gControllerPress[gMainController].button & (U_CBUTTONS | D_CBUTTONS | R_CBUTTONS | L_CBUTTONS)) { *flag ^= 1; } } void Jukebox_SelectWrap(u32* option, s32 range) { - if (gControllerPress[gMainController].button & U_CBUTTONS) { + if (gControllerPress[gMainController].button & (U_CBUTTONS | R_CBUTTONS)) { (*option)++; - } else if (gControllerPress[gMainController].button & D_CBUTTONS) { + } else if (gControllerPress[gMainController].button & (D_CBUTTONS | L_CBUTTONS)) { (*option)--; } *option = (*option + range) % range; @@ -136,6 +136,7 @@ void Jukebox_UpdateSfx(void) { s32 sfxModeX[] = { 95, 104, 113, 122, 131, 140, 149, 158, 180, 0, 22, 43, 60 }; s32 srcModeX[] = { 45, 135, 225 }; + void Jukebox_Update(void) { s32 i; OSContPad* contPress = &gControllerPress[gMainController]; @@ -170,6 +171,7 @@ void Jukebox_Update(void) { if (contPress->button & B_BUTTON) { if (!D_menu_801B9320) { + AUDIO_PLAY_SFX(0x49000021, gDefaultSfxSource, 4); AUDIO_PLAY_BGM(SEQ_ID_MENU); gDrawMode = DRAW_NONE; D_menu_801B9124 = 1000; diff --git a/src/overlays/ovl_i1/fox_co.c b/src/overlays/ovl_i1/fox_co.c index a4d594ba..a8b9e79e 100644 --- a/src/overlays/ovl_i1/fox_co.c +++ b/src/overlays/ovl_i1/fox_co.c @@ -2412,9 +2412,9 @@ void Corneria_8018F044(Scenery* scenery) { scenery->state = 1; scenery->info.hitbox = SEGMENTED_TO_VIRTUAL(&D_CO_603E924); AUDIO_PLAY_SFX(0x1900000D, scenery->sfxSource, 0); - return; + } else { + AUDIO_PLAY_SFX(0x2903300E, scenery->sfxSource, 0); } - AUDIO_PLAY_SFX(0x2903300E, scenery->sfxSource, 0); } } break; diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index 7af536d8..f21b1941 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -3453,13 +3453,13 @@ void Andross_80193AE4(s32 actorIndex) { actor->state = 200; actor->unk_0B6 = 1; AUDIO_PLAY_SFX(0x11030010, actor->sfxSource, 0); - return; + } else { + actor->iwork[11] = 1; + actor->fwork[7] = RAND_FLOAT(360.0f); + actor->fwork[8] = RAND_FLOAT(360.0f); + actor->state = 100; + AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); } - actor->iwork[11] = 1; - actor->fwork[7] = RAND_FLOAT(360.0f); - actor->fwork[8] = RAND_FLOAT(360.0f); - actor->state = 100; - AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); } //! @bug This references a variable in another overlay, causing undefined behavior. From 44c9eadbc22286207d56e346e5dacb99fc4c5ec0 Mon Sep 17 00:00:00 2001 From: Alejandro Asenjo Nitti <96613413+sonicdcer@users.noreply.github.com> Date: Sun, 5 May 2024 22:07:32 -0300 Subject: [PATCH 061/151] 3DS VERSION SfxIds applied to code (#232) * NA_SE_ARWING_BOOST is everywhere * man, there's just no end of these sfxIds * NA_SE_GREATFOX_ENGINE everywhere * NA_SE_OB_DAMAGE_M, another SfxId with massive usage * massive usage of NA_SE_EN_REFLECT * massive usage of NA_SE_EN_EXPLOSION_S * massive usage of NA_SE_EN_EXPLOSION_M * NA_SE_ARWING_ENGINE_FG * save progress * MISSION ACCOMPLISHED --- include/sfx.h | 2 +- src/audio/audio_general.c | 81 ++++++----- src/engine/fox_360.c | 28 ++-- src/engine/fox_beam.c | 30 ++--- src/engine/fox_demo.c | 56 ++++---- src/engine/fox_effect.c | 40 +++--- src/engine/fox_enmy.c | 63 ++++----- src/engine/fox_enmy2.c | 116 ++++++++-------- src/engine/fox_hud.c | 46 +++---- src/engine/fox_play.c | 100 +++++++------- src/engine/fox_radio.c | 2 +- src/engine/fox_tank.c | 40 +++--- src/engine/fox_versus.c | 22 +-- src/mods/sfxjukebox.c | 4 +- src/mods/sfxjukebox2.c | 6 +- src/overlays/ovl_ending/fox_end1.c | 6 +- src/overlays/ovl_ending/fox_end2.c | 2 +- src/overlays/ovl_i1/fox_co.c | 110 +++++++-------- src/overlays/ovl_i1/fox_tr.c | 4 +- src/overlays/ovl_i1/fox_tr360.c | 2 +- src/overlays/ovl_i1/fox_ve1.c | 68 +++++----- src/overlays/ovl_i2/fox_me.c | 82 ++++++------ src/overlays/ovl_i2/fox_sx.c | 74 +++++----- src/overlays/ovl_i3/fox_a6.c | 96 ++++++------- src/overlays/ovl_i3/fox_aq.c | 132 +++++++++--------- src/overlays/ovl_i3/fox_so.c | 129 +++++++++--------- src/overlays/ovl_i3/fox_zo.c | 135 +++++++++---------- src/overlays/ovl_i4/fox_bo.c | 50 +++---- src/overlays/ovl_i4/fox_fo.c | 34 ++--- src/overlays/ovl_i4/fox_ka.c | 72 +++++----- src/overlays/ovl_i4/fox_sz.c | 56 ++++---- src/overlays/ovl_i5/fox_ma.c | 208 ++++++++++++++--------------- src/overlays/ovl_i5/fox_ti.c | 150 ++++++++++----------- src/overlays/ovl_i5/fox_ti_cs.c | 18 +-- src/overlays/ovl_i6/fox_andross.c | 132 +++++++++--------- src/overlays/ovl_i6/fox_sy.c | 120 ++++++++--------- src/overlays/ovl_i6/fox_turret.c | 2 +- src/overlays/ovl_i6/fox_ve2.c | 4 +- src/overlays/ovl_menu/fox_map.c | 56 ++++---- src/overlays/ovl_menu/fox_option.c | 104 +++++++-------- src/overlays/ovl_menu/fox_title.c | 52 ++++---- 41 files changed, 1276 insertions(+), 1258 deletions(-) diff --git a/include/sfx.h b/include/sfx.h index b6f65633..537a41e1 100644 --- a/include/sfx.h +++ b/include/sfx.h @@ -75,7 +75,7 @@ typedef enum SfxBankId { #define NA_SE_STEP_FALCO 0x09000019 // Unreferenced #define NA_SE_STEP_PEPPY 0x0900001A // Unreferenced #define NA_SE_STEP_SLIPPY 0x0900001B // Unreferenced -#define NA_SE_DENO_RUNNING 0x0140001C +#define NA_SE_DEMO_RUNNING 0x0140001C #define NA_SE_LIFT_UP 0x0100001D #define NA_SE_ENGINE_START 0x0100001E #define NA_SE_VOLUME_TEST 0x0100001F diff --git a/src/audio/audio_general.c b/src/audio/audio_general.c index cf0eb02b..5474c4f7 100644 --- a/src/audio/audio_general.c +++ b/src/audio/audio_general.c @@ -112,9 +112,18 @@ u8 sPlaylistIndex = 255; s32 sPlaylistTimer = 0; u8 sPlaylistCmdIndex = 0; u32 sEventSfx[] = { - 0x1903000D, 0x1903000E, 0x19500015, 0x2903A021, 0x4900000C, 0x19122005, 0x1913204A, 0x2900306A, - 0x29034024, 0x2902306C, 0x19032056, 0x19030057, 0x19033058, 0x19030006, 0x29503032, 0x1903407D, - 0x4900402E, 0x19038072, 0x1903807E, 0x1903807F, 0x19038080, 0x11032081, 0x19031082, + NA_SE_OB_SLIDE_OPEN, NA_SE_OB_SLIDE_CLOSE, + NA_SE_OB_STEELFRAME, NA_SE_OB_HEAVY_BOUND, + NA_SE_ITEM_APPEAR, NA_SE_OB_BLOCK_APPEAR, + NA_SE_OB_ROCKWALL_UP, NA_SE_EN_UNIT_GATHERING, + NA_SE_EN_MOTOR_STOP, NA_SE_EN_MS_DASH, + NA_SE_OB_ROCK_CRASH, NA_SE_OB_ROCK_EYE_OPEN, + NA_SE_OB_SHIP_FALLDOWN, NA_SE_OB_ROCK_BOUND, + NA_SE_OB_SPEAR_PILLAR, NA_SE_OB_PILLER_ROLL, + NA_SE_SEARCHLIGHT_MISS, NA_SE_OB_ROUTEGATE_OPEN_Q, + NA_SE_OB_ROUTEGATE_CLOSE_Q, NA_SE_OB_ROUTEGATE_OPEN_S, + NA_SE_OB_ROUTEGATE_CLOSE_S, NA_SE_OB_LIFT, + NA_SE_OB_PLATE_ROLL, }; SoundTestTrack sSoundTestTracks[] = { /* 0 */ { SEQ_ID_OPENING, 22, -1 }, @@ -2068,7 +2077,7 @@ void Audio_UpdateArwingNoise(u8 playerId) { (sPlayerNoise[playerId].freqMod[2].target - sPlayerNoise[playerId].freqMod[2].value) / 10; } if (gPlayer[playerId].sfx.roll != 0) { - AUDIO_PLAY_SFX(0x09000012, gPlayer[playerId].sfx.srcPos, playerId); + AUDIO_PLAY_SFX(NA_SE_ROLLING_AIR, gPlayer[playerId].sfx.srcPos, playerId); sPlayerNoise[playerId].freqMod[1].target = 1.65f; sPlayerNoise[playerId].freqMod[1].timer = 8; sPlayerNoise[playerId].freqMod[1].step = @@ -2180,7 +2189,7 @@ void Audio_UpdateBlueMarineNoise(u8 playerId) { sPlayerNoise[playerId].freqMod[2].step = (1.1f - sPlayerNoise[playerId].freqMod[2].value) / 10; } if (gPlayer[playerId].sfx.roll != 0) { - AUDIO_PLAY_SFX(0x09000017, gPlayer[playerId].sfx.srcPos, playerId); + AUDIO_PLAY_SFX(NA_SE_MAR_ROLLING_AIR, gPlayer[playerId].sfx.srcPos, playerId); sPlayerNoise[playerId].freqMod[1].timer = 8; sPlayerNoise[playerId].freqMod[1].target = 1.2f; sPlayerNoise[playerId].freqMod[1].step = (1.2f - sPlayerNoise[playerId].freqMod[1].value) / 8; @@ -2463,17 +2472,17 @@ void Audio_StartPlayerNoise(u8 playerId) { switch (sPlayerNoise[playerId].form) { case FORM_ARWING: if (gPlayer[playerId].sfx.levelType == LEVELTYPE_SPACE) { - sfxId = 0x0100F020; + sfxId = NA_SE_ARWING_ENGIN_SPC; } else { - sfxId = 0x0100F005; + sfxId = NA_SE_ARWING_ENGIN_GRD; } break; case FORM_LANDMASTER: - sfxId = 0x0100F006; + sfxId = NA_SE_TANK_ENGIN; break; case FORM_BLUE_MARINE: - sfxId = 0x0100F022; - Audio_PlaySfx(0x1100802C, gPlayer[playerId].sfx.srcPos, playerId, &gDefaultMod, &gDefaultMod, + sfxId = NA_SE_MARINE_ENGINE00; + Audio_PlaySfx(NA_SE_SUBMARINE_ATM, gPlayer[playerId].sfx.srcPos, playerId, &gDefaultMod, &gDefaultMod, &sPlayerNoise[playerId].reverbAdd); break; } @@ -2489,18 +2498,18 @@ void Audio_StopPlayerNoise(u8 playerId) { switch (sPlayerNoise[playerId].form) { case FORM_ARWING: if (gPlayer[playerId].sfx.levelType == LEVELTYPE_SPACE) { - sfxId = 0x0100F020; + sfxId = NA_SE_ARWING_ENGIN_SPC; } else { - sfxId = 0x0100F005; + sfxId = NA_SE_ARWING_ENGIN_GRD; } - Audio_KillSfxBySourceAndId(gPlayer[playerId].sfx.srcPos, 0x1100000B); + Audio_KillSfxBySourceAndId(gPlayer[playerId].sfx.srcPos, NA_SE_SPLASH_LEVEL_S); break; case FORM_LANDMASTER: - sfxId = 0x0100F006; + sfxId = NA_SE_TANK_ENGIN; break; case FORM_BLUE_MARINE: - sfxId = 0x0100F022; - Audio_KillSfxBySourceAndId(gPlayer[playerId].sfx.srcPos, 0x1100802C); + sfxId = NA_SE_MARINE_ENGINE00; + Audio_KillSfxBySourceAndId(gPlayer[playerId].sfx.srcPos, NA_SE_SUBMARINE_ATM); break; } sPlayerNoise[playerId].form = FORM_NONE; @@ -2527,7 +2536,7 @@ void Audio_InitBombSfx(u8 playerId, u8 type) { break; } if (sBombState[playerId] != 1) { - Audio_PlaySfx(0x01008008, gPlayer[playerId].sfx.srcPos, playerId, &sBombFreqMod[playerId], &gDefaultMod, + Audio_PlaySfx(NA_SE_BOMB_CHARGE, gPlayer[playerId].sfx.srcPos, playerId, &sBombFreqMod[playerId], &gDefaultMod, &sPlayerNoise[playerId].reverbAdd); sBombState[playerId] = 1; } @@ -2547,8 +2556,8 @@ void Audio_PlayBombFlightSfx(u8 playerId, f32* sfxSource) { sBombFreqMod[playerId] = 1.0f; break; } - Audio_KillSfxBySourceAndId(gPlayer[playerId].sfx.srcPos, 0x01008008); - Audio_PlaySfx(0x09001001, sfxSource, playerId, &sBombFreqMod[playerId], &gDefaultMod, + Audio_KillSfxBySourceAndId(gPlayer[playerId].sfx.srcPos, NA_SE_BOMB_CHARGE); + Audio_PlaySfx(NA_SE_SMART_BOMB_SHOT, sfxSource, playerId, &sBombFreqMod[playerId], &gDefaultMod, &sPlayerNoise[playerId].reverbAdd); sBombState[playerId] = 2; } @@ -2560,30 +2569,30 @@ void Audio_PlayBombExplodeSfx(u8 playerId, f32* sfxSource) { if (sBombState[playerId] != 0) { switch (sBombType[playerId]) { case 1: - sfxId = 0x0903A00A; + sfxId = NA_SE_BOMB_EXPLODE1; break; case 2: - sfxId = 0x0901A00B; + sfxId = NA_SE_BOMB_EXPLODE2; break; default: case 0: - sfxId = 0x0901A009; + sfxId = NA_SE_BOMB_EXPLODE0; break; } - Audio_KillSfxByTokenAndId(playerId, 0x09001001); + Audio_KillSfxByTokenAndId(playerId, NA_SE_SMART_BOMB_SHOT); AUDIO_PLAY_SFX(sfxId, sfxSource, playerId); sBombState[playerId] = 0; } } void Audio_StartEngineNoise(f32* sfxSource) { - u32 sfxId = (gPlayer[0].sfx.levelType == LEVELTYPE_SPACE) ? 0x31000040 : 0x3100000C; + u32 sfxId = (gPlayer[0].sfx.levelType == LEVELTYPE_SPACE) ? NA_SE_ARWING_ENGINE_FS : NA_SE_ARWING_ENGINE_FG; AUDIO_PLAY_SFX(sfxId, sfxSource, 0); } void Audio_StopEngineNoise(f32* sfxSource) { - u32 sfxId = (gPlayer[0].sfx.levelType == LEVELTYPE_SPACE) ? 0x31000040 : 0x3100000C; + u32 sfxId = (gPlayer[0].sfx.levelType == LEVELTYPE_SPACE) ? NA_SE_ARWING_ENGINE_FS : NA_SE_ARWING_ENGINE_FG; Audio_KillSfxBySourceAndId(sfxSource, sfxId); } @@ -2696,7 +2705,7 @@ void Audio_PlayDeathSequence(void) { if (sAudioSpecId == AUDIOSPEC_24) { Audio_ClearVoice(); Audio_PlayMapMenuSfx(0); - AUDIO_PLAY_SFX(0x0903F004, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_EXPLOSION, gDefaultSfxSource, 4); SEQCMD_SET_SEQPLAYER_VOLUME(SEQ_PLAYER_BGM, 5, 30); SEQCMD_SETUP_RESTORE_SEQPLAYER_VOLUME(SEQ_PLAYER_FANFARE, SEQ_PLAYER_BGM, 30); SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_FANFARE, 0, 0, SEQ_ID_DEATH); @@ -2705,7 +2714,7 @@ void Audio_PlayDeathSequence(void) { Audio_KillSfxByBank(i); } AUDIOCMD_GLOBAL_UNMUTE(true); - AUDIO_PLAY_SFX(0x0903F004, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_EXPLOSION, gDefaultSfxSource, 4); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 0); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 0); SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM, 0, 0, SEQ_ID_DEATH); @@ -2714,20 +2723,20 @@ void Audio_PlayDeathSequence(void) { void Audio_PlayPauseSfx(u8 active) { if (active) { - AUDIO_PLAY_SFX(0x4900F000, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_PAUSE_ON, gDefaultSfxSource, 4); AUDIOCMD_GLOBAL_MUTE(); } else { - AUDIO_PLAY_SFX(0x4900F000, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_PAUSE_ON, gDefaultSfxSource, 4); AUDIOCMD_GLOBAL_UNMUTE(false); } } void Audio_PlayMapMenuSfx(u8 active) { if (active) { - AUDIO_PLAY_SFX(0x49000019, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_MAP_WINDOW_OPEN, gDefaultSfxSource, 4); AUDIOCMD_GLOBAL_MUTE(); } else { - AUDIO_PLAY_SFX(0x4900101A, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_MAP_WINDOW_CLOSE, gDefaultSfxSource, 4); AUDIOCMD_GLOBAL_UNMUTE(false); } } @@ -2765,14 +2774,14 @@ void Audio_PlaySoundTest(u8 enable) { case false: AUDIO_PLAY_BGM(SEQ_ID_MENU); Audio_PlayVoice(1); - Audio_KillSfxById(0x0100001F); - Audio_KillSfxById(0x0100F005); + Audio_KillSfxById(NA_SE_VOLUME_TEST); + Audio_KillSfxById(NA_SE_ARWING_ENGIN_GRD); break; case true: AUDIO_PLAY_BGM(SEQ_ID_VERSUS); Audio_PlayVoice(2); - AUDIO_PLAY_SFX(0x0100001F, gDefaultSfxSource, 0); - AUDIO_PLAY_SFX(0x0100F005, gDefaultSfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_VOLUME_TEST, gDefaultSfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGIN_GRD, gDefaultSfxSource, 0); break; } } @@ -2796,7 +2805,7 @@ void Audio_PlaySoundTestTrack(u8 trackNumber) { sPlaylistCmdIndex = 0; sPlaylistTimer = 0; } else if (trackNumber >= 50) { - AUDIO_PLAY_SFX(0x4900100A, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ERROR, gDefaultSfxSource, 4); } else { sPlaylistIndex = 0xFF; sp26 = sSoundTestTracks[trackNumber].seqId & 0xFF; diff --git a/src/engine/fox_360.c b/src/engine/fox_360.c index b15a5bb4..46dc224e 100644 --- a/src/engine/fox_360.c +++ b/src/engine/fox_360.c @@ -100,7 +100,7 @@ void AllRange_DrawCountdown(void) { HUD_DrawCountdown(gAllRangeCountdown, gAllRangeCountdownScale); if ((gAllRangeCountdown[0] == 0) && (seconds != gAllRangeCountdown[1]) && (gAllRangeCountdown[1] < 15)) { - AUDIO_PLAY_SFX(0x4900C02A, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_COUNTDOWN, gDefaultSfxSource, 4); } } } @@ -198,7 +198,7 @@ void AllRange_GreatFoxRepair(Player* player) { } else { gRightWingHealth[0] = gLeftWingHealth[0] = 60; } - AUDIO_PLAY_SFX(0x4900200E, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_SHIELD_RING, gDefaultSfxSource, 4); player->csState++; } break; @@ -211,7 +211,7 @@ void AllRange_GreatFoxRepair(Player* player) { player->baseSpeed = gArwingSpeed; player->csState++; - AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, player->sfxSource, 0); } break; case 4: @@ -397,12 +397,12 @@ void ActorAllRange_SpawnTeam(void) { } actor->iwork[11] = 1; if (actor->aiType <= AI360_PEPPY) { - AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); actor->info.hitbox = SEGMENTED_TO_VIRTUAL(gTeamHitbox); actor->info.targetOffset = 0.0f; actor->info.bonus = 0; } else { - AUDIO_PLAY_SFX(0x31000011, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ENGINE_01, actor->sfxSource, 4); } } } @@ -446,9 +446,9 @@ void ActorAllRange_SpawnStarWolf(void) { } Object_SetInfo(&actor->info, actor->obj.id); if (gCurrentLevel == LEVEL_VENOM_2) { - AUDIO_PLAY_SFX(0x31004006, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_WOLF_ENGINE2, actor->sfxSource, 4); } else { - AUDIO_PLAY_SFX(0x31004005, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_WOLF_ENGINE, actor->sfxSource, 4); } } } @@ -657,7 +657,7 @@ void ActorAllRange_SpawnSupplies(Actor* this) { supplies->obj.pos.x = 200.0f; supplies->obj.pos.y = -500.0f; supplies->obj.pos.z = 0.0f; - AUDIO_PLAY_SFX(0x09000002, supplies->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, supplies->sfxSource, 0); supplies->timer_0C2 = 50; } else { supplies->obj.pos.x = 0.0f; @@ -886,7 +886,7 @@ void ActorAllRange_ApplyDamage(Actor* this) { this->obj.status = OBJ_DYING; this->fwork[23] = 0.0f; func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 4.0f); - AUDIO_PLAY_SFX(0x2903700B, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_CRASH_DOWN, this->sfxSource, 4); this->timer_0C2 = 10; this->timer_0BE = 0; this->timer_04C = RAND_INT(2.9f); @@ -1006,7 +1006,7 @@ void ActorAllRange_ApplyDamage(Actor* this) { } } else { if (var_a1) { - AUDIO_PLAY_SFX(0x29001062, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_BARRIER_REFLECT, this->sfxSource, 4); this->iwork[7] = 3; this->iwork[18] = 5; this->iwork[8] = 15; @@ -1022,9 +1022,9 @@ void ActorAllRange_ApplyDamage(Actor* this) { this->iwork[8] = 20; } if (this->aiType == AI360_MISSILE) { - AUDIO_PLAY_SFX(0x29034003, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, this->sfxSource, 4); } else if (this->iwork[7] == 0) { - AUDIO_PLAY_SFX(0x2903300E, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, this->sfxSource, 4); } func_effect_8007D10C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1.5f); if (this->aiType < AI360_GREAT_FOX) { @@ -1364,7 +1364,7 @@ void ActorAllRange_Update(Actor* this) { this->fwork[29] = 5.0f; this->fwork[7] = 360.0f; this->fwork[8] = 0.0f; - AUDIO_PLAY_SFX(0x09000002, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, this->sfxSource, 0); this->unk_046 = 0; } gTeamShields[this->aiType] = -1; @@ -2095,7 +2095,7 @@ void ActorAllRange_Update(Actor* this) { this->obj.status = OBJ_DYING; this->itemDrop = DROP_NONE; func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 5.0f, 15); - func_effect_8007A6F0(&this->obj.pos, 0x2903A008); + func_effect_8007A6F0(&this->obj.pos, NA_SE_EN_EXPLOSION_S); } else { this->dmgType = DMG_BEAM; this->damage = 10; diff --git a/src/engine/fox_beam.c b/src/engine/fox_beam.c index fd982d30..c1a2cca0 100644 --- a/src/engine/fox_beam.c +++ b/src/engine/fox_beam.c @@ -69,7 +69,7 @@ void func_beam_80035E78(PlayerShot* shot) { shot->unk_48 * 3.0f, 10); func_effect_8007ADF4(shot->obj.pos.x, gGroundHeight, shot->obj.pos.z, shot->unk_48 * 0.05f, shot->unk_48 * 0.5f); - func_effect_8007A6F0(&shot->obj.pos, 0x19000014); + func_effect_8007A6F0(&shot->obj.pos, NA_SE_OB_WATER_BOUND_M); } else { func_enmy_80062B60(shot->obj.pos.x, shot->obj.pos.z, 0, shot->unk_48 * 3.0f); } @@ -177,7 +177,7 @@ void func_beam_80036528(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yRot, effect->unk_46 = 80; effect->timer_50 = time; Object_SetInfo(&effect->info, effect->obj.id); - func_play_800A6070(effect->sfxSource, 0x29000000); + func_play_800A6070(effect->sfxSource, NA_SE_EXPLOSION_S); } void func_beam_800365E4(f32 xPos, f32 yPos, f32 zPos, f32 arg3, f32 arg4, f32 arg5, f32 yRot, f32 xRot, f32 scale, @@ -207,7 +207,7 @@ void func_beam_800366CC(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yRot, effect->scale2 = scale * 0.5f; effect->timer_50 = 80; Object_SetInfo(&effect->info, effect->obj.id); - func_play_800A6070(effect->sfxSource, 0x29000000); + func_play_800A6070(effect->sfxSource, NA_SE_EXPLOSION_S); } void func_beam_80036770(f32 xPos, f32 yPos, f32 zPos, f32 yRot, f32 scale) { @@ -337,7 +337,7 @@ s32 func_beam_80036874(PlayerShot* shot, f32* hitboxData, Object* obj) { return i + 1; } if (obj->id <= OBJ_SCENERY_160) { - func_effect_8007A6F0(&shot->obj.pos, 0x29121007); + func_effect_8007A6F0(&shot->obj.pos, NA_SE_EN_REFLECT); } return i + 1; } @@ -613,7 +613,7 @@ bool func_beam_8003774C(PlayerShot* shot, ObjectId objId, Object* obj) { return false; } func_beam_80036318(shot); - func_effect_8007A6F0(&shot->obj.pos, 0x29121007); + func_effect_8007A6F0(&shot->obj.pos, NA_SE_EN_REFLECT); if (gCurrentLevel == LEVEL_METEO) { Matrix_RotateY(gCalcMatrix, obj->rot.y * M_DTOR, MTXF_NEW); sp7C.x = sp4C.x - obj->pos.x; @@ -636,7 +636,7 @@ bool func_beam_8003774C(PlayerShot* shot, ObjectId objId, Object* obj) { return false; } func_beam_80036318(shot); - func_effect_8007A6F0(&shot->obj.pos, 0x29121007); + func_effect_8007A6F0(&shot->obj.pos, NA_SE_EN_REFLECT); if (gCurrentLevel == LEVEL_FORTUNA) { func_effect_8007BC7C(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); func_effect_8007BC7C(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); @@ -713,7 +713,7 @@ void func_beam_80037CF4(PlayerShot* shot, Actor* actor, s32 hitIndex) { shot->obj.pos.z += shot->vel.z * 5.0f; actor->timer_0C2 = 3; func_effect_80078E50(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 8.0f); - AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); func_play_800A668C(D_ctx_8017849C, D_ctx_801784A0, D_ctx_80178498); } } else { @@ -860,7 +860,7 @@ void func_beam_80038140(PlayerShot* shot) { shot->obj.pos.y += 2.0f * shot->vel.y; shot->obj.pos.z += 2.0f * shot->vel.z; shot->unk_64 = 5; - AUDIO_PLAY_SFX(0x09007011, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ROLLING_REFLECT, player->sfxSource, 0); func_effect_80078E50(player->pos.x, player->pos.y, player->trueZpos, 8.0f); } else { func_beam_80036318(shot); @@ -964,7 +964,7 @@ void func_beam_80038140(PlayerShot* shot) { } else { boss->dmgType = DMG_BEAM; func_beam_80036318(shot); - AUDIO_PLAY_SFX(0x29001062, shot->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_BARRIER_REFLECT, shot->sfxSource, 4); } } } else { @@ -978,7 +978,7 @@ void func_beam_80038140(PlayerShot* shot) { } else { boss->dmgType = DMG_BEAM; boss->dmgPart = 100; - AUDIO_PLAY_SFX(0x29121007, shot->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, shot->sfxSource, 4); func_beam_80036318(shot); } } @@ -1610,7 +1610,7 @@ void func_beam_8003B55C(PlayerShot* shot, s32 index) { func_beam_80036318(shot); shot->obj.pos.y = gGroundHeight + 2; if (gCurrentLevel == LEVEL_BOLSE) { - func_effect_8007A6F0(&shot->obj.pos, 0x29121007); + func_effect_8007A6F0(&shot->obj.pos, NA_SE_EN_REFLECT); } if ((gCamCount != 4) && (gCurrentLevel != LEVEL_AQUAS)) { if ((shot->sourceId == TEAM_ID_FOX) && (gLaserStrength[0] != LASERS_SINGLE) && @@ -1705,7 +1705,7 @@ bool func_beam_8003BB4C(PlayerShot* shot) { (fabsf(shot->obj.pos.y - (actor->obj.pos.y + actor->info.targetOffset)) <= var_fa0) && (fabsf(shot->obj.pos.z - actor->obj.pos.z) <= var_fa0))) { actor->lockOnTimers[shot->sourceId] = 20; - func_enmy_80060F30(gPlayer[shot->sourceId].sfxSource, 0x49008027, shot->sourceId); + func_enmy_80060F30(gPlayer[shot->sourceId].sfxSource, NA_SE_LOCK_ON, shot->sourceId); for (j = 0; j < ARRAY_COUNT(gPlayerShots); j++) { if (gPlayerShots[j].obj.id == PLAYERSHOT_4) { Object_Kill(&gPlayerShots[j].obj, gPlayerShots[j].sfxSource); @@ -1726,7 +1726,7 @@ bool func_beam_8003BB4C(PlayerShot* shot) { gVsLockOnTimers[0][shot->sourceId] = gVsLockOnTimers[1][shot->sourceId] = gVsLockOnTimers[2][shot->sourceId] = gVsLockOnTimers[3][shot->sourceId] = 0; gVsLockOnTimers[i][shot->sourceId] = 20; - func_enmy_80060F30(gPlayer[shot->sourceId].sfxSource, 0x49008027, shot->sourceId); + func_enmy_80060F30(gPlayer[shot->sourceId].sfxSource, NA_SE_LOCK_ON, shot->sourceId); for (j = 0; j < ARRAY_COUNT(gPlayerShots); j++) { if (gPlayerShots[j].obj.id == PLAYERSHOT_4) { Object_Kill(&gPlayerShots[j].obj, gPlayerShots[j].sfxSource); @@ -2085,7 +2085,7 @@ void func_beam_8003CF90(PlayerShot* shot) { shot->unk_48 * 3.0f, 5); func_effect_8007ADF4(shot->obj.pos.x, gGroundHeight, shot->obj.pos.z, shot->unk_48 * 0.05f, shot->unk_48 * 0.5f); - func_effect_8007A6F0(&shot->obj.pos, 0x19000014); + func_effect_8007A6F0(&shot->obj.pos, NA_SE_OB_WATER_BOUND_M); } func_beam_80036318(shot); } else { @@ -2238,7 +2238,7 @@ void func_beam_8003D54C(PlayerShot* shot, s32 index) { } } Object_Kill(&shot->obj, shot->sfxSource); - func_effect_8007A6F0(&shot->obj.pos, 0x0903502E); + func_effect_8007A6F0(&shot->obj.pos, NA_SE_SPREAD_EXPLSION); } else if (gCurrentLevel == LEVEL_AQUAS) { Aquas_801ABA40(shot); } else { diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index 9127e61a..ee4aed90 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -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(0x11030010, actor->sfxSource, 0); - AUDIO_PLAY_SFX(0x31024059, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, actor->sfxSource, 0); actor->unk_0B6 = 1; } else { actor->iwork[11] = 1; - AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } } @@ -266,7 +266,7 @@ void Cutscene_WarpZoneComplete(Player* player) { break; case 450: - AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, player->sfxSource, 0); player->unk_194 = 5.0f; player->unk_190 = 5.0f; @@ -357,7 +357,7 @@ void func_demo_80049630(ActorCutscene* this) { case 1: this->state = 2; - AUDIO_PLAY_SFX(0x09000002, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, this->sfxSource, 0); this->timer_0BC = 150; this->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(0x3100000C, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } void func_demo_80049A9C(Effect* effect, f32 x, f32 y, f32 z) { @@ -521,7 +521,7 @@ void Cutscene_EnterWarpZone(Player* player) { if (player->csTimer <= 100) { if (player->csTimer == 100) { - func_play_800A6028(player->sfxSource, 0x0940802A); + func_play_800A6028(player->sfxSource, NA_SE_ARWING_WARP_DASH); player->unk_194 = 5.0f; player->unk_190 = 5.0f; } @@ -540,22 +540,22 @@ void Cutscene_EnterWarpZone(Player* player) { if ((player->csTimer == 95) && (gTeamShields[TEAM_ID_FALCO] > 0)) { gActors[0].state = var_v0; - AUDIO_PLAY_SFX(0x0940802A, gActors[0].sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_WARP_DASH, gActors[0].sfxSource, 0); } if ((player->csTimer == 90) && (gTeamShields[TEAM_ID_PEPPY] > 0)) { gActors[2].state = var_v0; - AUDIO_PLAY_SFX(0x0940802A, gActors[2].sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_WARP_DASH, gActors[2].sfxSource, 0); } if ((player->csTimer == 85) && (gTeamShields[TEAM_ID_SLIPPY] > 0)) { gActors[1].state = var_v0; - AUDIO_PLAY_SFX(0x0940802A, gActors[1].sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_WARP_DASH, gActors[1].sfxSource, 0); } if (player->csTimer == 60) { gActors[3].state = var_v0; - AUDIO_PLAY_SFX(0x0940802A, gActors[3].sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_WARP_DASH, gActors[3].sfxSource, 0); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); } @@ -588,7 +588,7 @@ void Cutscene_EnterWarpZone(Player* player) { player->unk_234 = 1; gLevelPhase = 1; D_display_800CA230 = 0.15f; - AUDIO_PLAY_SFX(0x11407079, gDefaultSfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_WARP_OUT, 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(0x3100000C, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } void func_demo_8004A840(s32 actor) { @@ -865,11 +865,11 @@ void Cutscene_AllRangeMode(Player* player) { } if (gCsFrameCount == 138) { - AUDIO_PLAY_SFX(0x09000007, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_WING_OPEN, player->sfxSource, 0); } if (gCsFrameCount == 190) { - AUDIO_PLAY_SFX(0x09000013, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_WING_OPEN_END, 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(0x09000002, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, player->sfxSource, 0); D_ctx_801779A8[player->num] = 70.0f; @@ -1307,7 +1307,7 @@ void Cutscene_CoComplete2(Player* player) { case 1255: player->csState = 3; player->csTimer = 10; - func_play_800A6028(player->sfxSource, 0x09000002); + func_play_800A6028(player->sfxSource, NA_SE_ARWING_BOOST); 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->zRotBank = -180.0f; } player->csState = 3; - func_play_800A5FA0(player->sfxSource, 0x09000002, player->num); + func_play_800A5FA0(player->sfxSource, NA_SE_ARWING_BOOST, player->num); player->unk_194 = 7.0f; player->unk_190 = 7.0f; } @@ -1611,8 +1611,8 @@ void Cutscene_KillPlayer(Player* player) { s32 teamId; Audio_StopPlayerNoise(player->num); - Audio_KillSfxBySourceAndId(player->sfxSource, 0x0900C010); - func_play_800A5FA0(player->sfxSource, 0x0903F004, player->num); + Audio_KillSfxBySourceAndId(player->sfxSource, NA_SE_ARWING_DOWN); + func_play_800A5FA0(player->sfxSource, NA_SE_ARWING_EXPLOSION, player->num); player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->csTimer = 70; player->timer_224 = 20; @@ -1728,7 +1728,7 @@ void func_demo_8004D828(Player* player) { player->vel.y = 10.0f; player->csState = 1; - func_play_800A6070(player->sfxSource, 0x29000000); + func_play_800A6070(player->sfxSource, NA_SE_EXPLOSION_S); 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->radioDamageTimer = 0; player->vel.y = 10.0f; player->csState = 1; - func_play_800A6070(player->sfxSource, 0x29000000); + func_play_800A6070(player->sfxSource, NA_SE_EXPLOSION_S); if (gCurrentLevel == LEVEL_CORNERIA) { func_enmy_80062C38(player->pos.x, player->pos.z); } @@ -1949,7 +1949,7 @@ void func_demo_8004E4D4(ActorCutscene* this) { this->state = 2; this->timer_0BC = 50; this->fwork[9] = 2.0f; - AUDIO_PLAY_SFX(0x09000002, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, this->sfxSource, 0); this->fwork[29] = 5.0f; /* fallthrough */ @@ -1971,7 +1971,7 @@ void func_demo_8004E4D4(ActorCutscene* this) { this->state = 11; this->timer_0BC = 150; this->timer_0BE = 40; - AUDIO_PLAY_SFX(0x09000002, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, this->sfxSource, 0); this->fwork[29] = 5.0f; /* fallthrough */ case 11: @@ -2026,7 +2026,7 @@ void func_demo_8004E4D4(ActorCutscene* this) { break; case 31: - AUDIO_PLAY_SFX(0x09000002, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, this->sfxSource, 0); this->state += 1; this->fwork[29] = 5.0f; /* fallthrough */ @@ -2111,7 +2111,7 @@ void func_demo_8004EBD0(ActorCutscene* this) { if (this->timer_0BC == 0) { this->state++; this->timer_0BC = 10; - func_play_800A6028(this->sfxSource, 0x09000002); + func_play_800A6028(this->sfxSource, NA_SE_ARWING_BOOST); this->fwork[29] = 5.0f; } break; @@ -2183,7 +2183,7 @@ void func_demo_8004F05C(Actor* actor) { case 1: actor->state = 2; actor->timer_0BC = 100; - AUDIO_PLAY_SFX(0x09000002, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); actor->fwork[29] = 5.0f; case 2: @@ -2402,7 +2402,7 @@ void ActorCutscene_Update(ActorCutscene* this) { this->state = 1; this->timer_0BC = 50; this->iwork[0] = 255; - AUDIO_PLAY_SFX(0x2902F026, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_EN_BOSS_EXPLOSION, this->sfxSource, 0); } break; diff --git a/src/engine/fox_effect.c b/src/engine/fox_effect.c index a6d9b65c..28b90e71 100644 --- a/src/engine/fox_effect.c +++ b/src/engine/fox_effect.c @@ -925,7 +925,7 @@ void func_effect_8007A4B8(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scal effect->obj.pos.y = yPos; effect->obj.pos.z = zPos; - AUDIO_PLAY_SFX(0x2940F026, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_STAR_EXPLOSION, effect->sfxSource, 4); Object_SetInfo(&effect->info, effect->obj.id); } @@ -952,9 +952,9 @@ void func_effect_8007A5F8(Effect* effect, Vec3f* pos, u32 sfxId) { effect->timer_50 = 50; - if ((sfxId == 0x1903400F) || (sfxId == 0x11000055)) { + if ((sfxId == NA_SE_OB_EXPLOSION_S) || (sfxId == NA_SE_OB_SMOKE)) { AUDIO_PLAY_SFX(sfxId, effect->sfxSource, 0); - if (sfxId == 0x11000055) { + if (sfxId == NA_SE_OB_SMOKE) { effect->timer_50 = 300; } } else { @@ -1198,7 +1198,7 @@ void func_effect_8007B180(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scal effect->unk_44 = 255; effect->scale1 = scale1; Object_SetInfo(&effect->info, effect->obj.id); - AUDIO_PLAY_SFX(0x1100000C, effect->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_SPLASH_LEVEL_L, effect->sfxSource, 0); } void func_effect_8007B228(f32 xPos, f32 yPos, f32 zPos, f32 scale1) { @@ -1580,7 +1580,7 @@ void func_effect_8007C1AC(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { func_effect_8007BF64(&gEffects[i], xPos, yPos, zPos, xVel, yVel, zVel, scale2, timer50); - func_play_800A6070(gEffects[i].sfxSource, 0x29000000); + func_play_800A6070(gEffects[i].sfxSource, NA_SE_EXPLOSION_S); break; } } @@ -2187,7 +2187,7 @@ void func_effect_8007DB70(Effect* effect) { effect->unk_44 = 192; effect->scale2 = 2.5f; effect->scale1 = 2.5f; - AUDIO_PLAY_SFX(0x2903B009, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, effect->sfxSource, 4); func_effect_8007D0E0(effect->obj.pos.x, effect->obj.pos.y + 30.0f, effect->obj.pos.z, 7.0f); func_effect_8007BFFC(effect->obj.pos.x, effect->obj.pos.y + 30.0f, effect->obj.pos.z, 0.0f, 0.0f, 0.0f, 4.0f, 5); @@ -2402,7 +2402,7 @@ void func_effect_8007E6B8(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPo } if (objId == OBJ_EFFECT_356) { - AUDIO_PLAY_SFX(0x31000025, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ENERGY_BEAM, effect->sfxSource, 4); } if (objId == OBJ_EFFECT_376) { @@ -2410,9 +2410,9 @@ void func_effect_8007E6B8(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPo effect->unk_4A = 180; effect->scale2 = 5.0f; } else if ((objId == OBJ_EFFECT_355) || (objId == OBJ_EFFECT_377)) { - AUDIO_PLAY_SFX(0x31000025, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ENERGY_BEAM, effect->sfxSource, 4); } else { - AUDIO_PLAY_SFX(0x29002002, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SHOT_0, effect->sfxSource, 4); } } @@ -2456,7 +2456,7 @@ void func_effect_8007E93C(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPo } if (objId == OBJ_EFFECT_356) { - AUDIO_PLAY_SFX(0x31000025, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ENERGY_BEAM, effect->sfxSource, 4); } if (objId == OBJ_EFFECT_376) { @@ -2464,9 +2464,9 @@ void func_effect_8007E93C(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPo effect->unk_4A = 180; effect->scale2 = 5.0f; } else if ((objId == OBJ_EFFECT_355) || (objId == OBJ_EFFECT_377)) { - AUDIO_PLAY_SFX(0x31000025, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ENERGY_BEAM, effect->sfxSource, 4); } else { - AUDIO_PLAY_SFX(0x29002002, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SHOT_0, effect->sfxSource, 4); } } @@ -2488,9 +2488,9 @@ void func_effect_8007EBB8(Effect* effect, ObjectId objId, f32 xPos, f32 yPos, f3 effect->scale2 = scale2; if (objId == OBJ_EFFECT_355) { - AUDIO_PLAY_SFX(0x31000025, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ENERGY_BEAM, effect->sfxSource, 4); } else { - AUDIO_PLAY_SFX(0x29002002, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SHOT_0, effect->sfxSource, 4); } Object_SetInfo(&effect->info, effect->obj.id); } @@ -2535,7 +2535,7 @@ void func_effect_8007ED54(Effect* effect, ObjectId objId, f32 xPos, f32 yPos, f3 effect->scale2 = scale2; if (effect->obj.id != OBJ_EFFECT_380) { - AUDIO_PLAY_SFX(0x29002002, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SHOT_0, effect->sfxSource, 4); } Object_SetInfo(&effect->info, effect->obj.id); } @@ -2871,7 +2871,7 @@ void func_effect_8007FE88(Effect* effect) { effect->vel.y = destVelocity.y; effect->vel.z = destVelocity.z; gPlayer[0].unk_2C4 += 1; - AUDIO_PLAY_SFX(0x09007011, effect->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ROLLING_REFLECT, effect->sfxSource, 0); } if ((gPlayer[0].barrelRollAlpha == 0) && (gPlayer[0].timer_498 == 0)) { @@ -3004,7 +3004,7 @@ void func_effect_8008040C(Effect* effect) { effect->vel.y = destVelocity.y; effect->vel.z = destVelocity.z; gPlayer[0].unk_2C4++; - AUDIO_PLAY_SFX(0x09007011, effect->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ROLLING_REFLECT, effect->sfxSource, 0); } if ((gPlayer[0].barrelRollAlpha == 0) && (gPlayer[0].timer_498 == 0)) { @@ -3368,7 +3368,7 @@ void func_effect_8008165C(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scal case 10: effect->timer_50 = 10; - AUDIO_PLAY_SFX(0x31405094, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_CLBOSS_BEAM, effect->sfxSource, 4); break; case 11: @@ -3389,7 +3389,7 @@ void func_effect_8008165C(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scal effect->obj.pos.y = yPos; effect->obj.pos.z = zPos; - AUDIO_PLAY_SFX(0x2940F026, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_STAR_EXPLOSION, effect->sfxSource, 4); gControllerRumbleTimers[0] = 60; break; } @@ -4131,7 +4131,7 @@ void func_effect_80083D2C(f32 xPos, f32 yPos, f32 zPos, f32 srcZ) { if (gEffects[j].obj.status == OBJ_FREE) { func_effect_80083C70(&gEffects[j], xPos, yPos, zPos, dest.x, dest.y, dest.z, i * 60.0f, i); if (i == 0) { - AUDIO_PLAY_SFX(0x3103109B, gEffects[j].sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MARBLE_BEAM, gEffects[j].sfxSource, 4); } break; } diff --git a/src/engine/fox_enmy.c b/src/engine/fox_enmy.c index 1bebe4a7..ac6ad445 100644 --- a/src/engine/fox_enmy.c +++ b/src/engine/fox_enmy.c @@ -69,7 +69,8 @@ static Vec3f D_enmy_800CFF0C[] = { { -90.0f, 0.0f, 0.0f }, { 0.0f, 180.0f, 0.0f }, { 90.0f, 0.0f, 0.0f }, }; u32 gWarpRingSfx[] = { - 0x19404038, 0x19404139, 0x1940423A, 0x1940433B, 0x1940443C, 0x1940453D, 0x1940463E, 0x1940463E, 0x1940463E, + NA_SE_WARP_RING_1, NA_SE_WARP_RING_2, NA_SE_WARP_RING_3, NA_SE_WARP_RING_4, NA_SE_WARP_RING_5, + NA_SE_WARP_RING_6, NA_SE_WARP_RING_7, NA_SE_WARP_RING_7, NA_SE_WARP_RING_7, }; void func_enmy_80060F30(f32* pos, u32 sfxId, s32 shotSource) { @@ -1018,13 +1019,13 @@ void Object_Init(s32 index, ObjectId objId) { switch (objId) { case OBJ_SPRITE_CO_SMOKE: - func_effect_8007A6F0(&gSprites[index].obj.pos, 0x11000055); + func_effect_8007A6F0(&gSprites[index].obj.pos, NA_SE_OB_SMOKE); break; case OBJ_ACTOR_234: - AUDIO_PLAY_SFX(0x11030010, gActors[index].sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, gActors[index].sfxSource, 0); break; case OBJ_SCENERY_54: - AUDIO_PLAY_SFX(0x11000000, gScenery[index].sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_FALL, gScenery[index].sfxSource, 0); break; case OBJ_ACTOR_TEAM_BOSS: ActorTeamBoss_Init(&gActors[index]); @@ -1179,7 +1180,7 @@ void Object_Init(s32 index, ObjectId objId) { break; case OBJ_ACTOR_190: case OBJ_ACTOR_191: - AUDIO_PLAY_SFX(0x31000012, gActors[index].sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MISSILE_ENGINE, gActors[index].sfxSource, 4); break; case OBJ_ACTOR_192: gActors[index].unk_0C9 = 1; @@ -1231,7 +1232,7 @@ void Object_Init(s32 index, ObjectId objId) { /* fallthrough */ case OBJ_ACTOR_176: gActors[index].health = 24; - AUDIO_PLAY_SFX(0x31000016, gActors[index].sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_TANK_RB_ENGINE, gActors[index].sfxSource, 4); break; case OBJ_BOSS_297: Meteo_Boss297_Init(&gBosses[index]); @@ -1550,7 +1551,7 @@ void func_enmy_800656D4(Actor* actor) { gActors[spC4].dmgType = DMG_BEAM; gActors[spC4].damage = 20; gActors[spC4].dmgSource = DMG_SRC_2; - func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 5.0f); Object_Kill(&actor->obj, actor->sfxSource); } @@ -1601,7 +1602,7 @@ void func_enmy_800656D4(Actor* actor) { } Actor_Despawn(actor); } - func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); } if (gLevelMode == LEVELMODE_ON_RAILS) { if (fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 100.0f) { @@ -1633,10 +1634,10 @@ void func_enmy_800660F0(Actor* actor) { } if ((item->obj.id >= OBJ_ITEM_GOLD_RING) || (item->obj.id == OBJ_ITEM_1UP)) { item->unk_50 = 90.0f; - AUDIO_PLAY_SFX(0x4900000C, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ITEM_APPEAR, gDefaultSfxSource, 4); item->timer_48 = 1000; if (item->obj.id == OBJ_ITEM_WING_REPAIR) { - AUDIO_PLAY_SFX(0x1900302B, item->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_WING, item->sfxSource, 0); } } break; @@ -1691,7 +1692,7 @@ void Actor_Despawn(Actor* actor) { } } func_enmy_800660F0(actor); - AUDIO_PLAY_SFX(0x4900000C, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ITEM_APPEAR, gDefaultSfxSource, 4); } else if (actor->itemDrop == DROP_TEAM_MESG) { if (gTeamShields[TEAM_ID_PEPPY] > 0) { Radio_PlayMessage(gMsg_ID_20261, RCID_PEPPY); @@ -1760,7 +1761,7 @@ void func_enmy_8006654C(Actor* actor) { actor->vel.z = -15.0f; actor->gravity = 0.5f; func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z, 13.0f); - AUDIO_PLAY_SFX(0x2903A008, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_S, actor->sfxSource, 4); } } @@ -1775,7 +1776,7 @@ void func_enmy_8006684C(Actor* actor) { Object_Kill(&actor->obj, actor->sfxSource); actor->itemDrop = DROP_SILVER_RING; Actor_Despawn(actor); - AUDIO_PLAY_SFX(0x2903B009, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, actor->sfxSource, 4); BonusText_Display(actor->obj.pos.x, actor->obj.pos.y + 250.0f, actor->obj.pos.z, 3); gHitCount += 3; D_ctx_80177850 = 15; @@ -1803,7 +1804,7 @@ void func_enmy_800669A0(Actor* actor) { func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y + 130.0f, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, 4.0f, 5); actor->timer_0BC = 4; - func_effect_8007A6F0(&actor->obj.pos, 0x1903400F); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_OB_EXPLOSION_S); } } } @@ -1856,7 +1857,7 @@ void func_enmy_80066D5C(Scenery* scenery) { case 1: func_enmy_80066C00(scenery); scenery->state++; - AUDIO_PLAY_SFX(0x2900300F, scenery->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_L, scenery->sfxSource, 4); break; case 2: scenery->vel.x += 0.05f; @@ -1867,7 +1868,7 @@ void func_enmy_80066D5C(Scenery* scenery) { func_enmy_80066A8C(scenery); scenery->state = 0; gCameraShake = 25; - AUDIO_PLAY_SFX(0x19130003, scenery->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_METAL_BOUND_M, scenery->sfxSource, 4); } break; case 0: @@ -2007,7 +2008,7 @@ void ActorSupplies_Update(ActorSupplies* this) { this->dmgType = DMG_NONE; this->health -= this->damage; if (this->health <= 0) { - func_effect_8007A6F0(&this->obj.pos, 0x2903A008); + func_effect_8007A6F0(&this->obj.pos, NA_SE_EN_EXPLOSION_S); func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 5.0f); if (((player[0].wings.rightState <= WINGSTATE_BROKEN) || (player[0].wings.leftState <= WINGSTATE_BROKEN)) && (player[0].form != FORM_LANDMASTER)) { @@ -2056,7 +2057,7 @@ void ActorSupplies_Draw(Actor* actor) { } void func_enmy_80067A40(void) { - AUDIO_PLAY_SFX(0x09008023, gPlayer[0].sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_WING_REPAIR, gPlayer[0].sfxSource, 0); if (gPlayer[0].wings.rightState <= WINGSTATE_BROKEN) { gRightWingFlashTimer[0] = 1050; gPlayer[0].wings.rightState = WINGSTATE_INTACT; @@ -2077,7 +2078,7 @@ void Item1up_Update(Item1UP* this) { Item_SpinPickup(this); if (this->collected) { Object_Kill(&this->obj, this->sfxSource); - func_enmy_80060F30(gPlayer[this->playerNum].sfxSource, 0x4900C024, this->playerNum); + func_enmy_80060F30(gPlayer[this->playerNum].sfxSource, NA_SE_ONE_UP, this->playerNum); if (gCurrentLevel != LEVEL_TRAINING) { gLifeCount[this->playerNum]++; } @@ -2100,8 +2101,8 @@ void ItemPickup_Update(Item* this) { this->timer_48 = 20; this->unk_50 = 60.0f; gBombCount[this->playerNum]++; - func_enmy_80060F30(gPlayer[this->playerNum].sfxSource, 0x49002005, this->playerNum); - func_enmy_80060F30(gPlayer[this->playerNum].sfxSource, 0x49002006, this->playerNum); + func_enmy_80060F30(gPlayer[this->playerNum].sfxSource, NA_SE_BOMB_GET, this->playerNum); + func_enmy_80060F30(gPlayer[this->playerNum].sfxSource, NA_SE_BOMB_GAUGE_UP, this->playerNum); } break; case OBJ_ITEM_LASERS: @@ -2115,7 +2116,7 @@ void ItemPickup_Update(Item* this) { if (gLaserStrength[this->playerNum] > LASERS_HYPER) { gLaserStrength[this->playerNum] = LASERS_HYPER; } - func_enmy_80060F30(gPlayer[this->playerNum].sfxSource, 0x49002004, this->playerNum); + func_enmy_80060F30(gPlayer[this->playerNum].sfxSource, NA_SE_TWIN_LASER_GET, this->playerNum); if (gExpertMode) { gRightWingHealth[this->playerNum] = gLeftWingHealth[this->playerNum] = 10; } else { @@ -2147,7 +2148,7 @@ void ItemLasers_Update(ItemLasers* this) { this->obj.id = OBJ_ITEM_WING_REPAIR; Object_SetInfo(&this->info, this->obj.id); this->timer_48 = 2000; - AUDIO_PLAY_SFX(0x1900302B, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_WING, this->sfxSource, 0); } else { ItemPickup_Update(this); } @@ -2167,13 +2168,13 @@ void ItemSupplyRing_Update(Item* this) { this->timer_48 = 50; if (this->obj.id == OBJ_ITEM_SILVER_RING) { gPlayer[this->playerNum].heal += 32; - func_enmy_80060F30(gPlayer[this->playerNum].sfxSource, 0x4900200E, this->playerNum); + func_enmy_80060F30(gPlayer[this->playerNum].sfxSource, NA_SE_SHIELD_RING, this->playerNum); } else if (this->obj.id == OBJ_ITEM_GOLD_RING) { gGoldRingCount[0]++; if (gGoldRingCount[0] == 3) { - func_enmy_80060F30(gPlayer[this->playerNum].sfxSource, 0x49008015, this->playerNum); + func_enmy_80060F30(gPlayer[this->playerNum].sfxSource, NA_SE_SHIELD_UPGRADE, this->playerNum); } else if (gGoldRingCount[0] == 6) { - func_enmy_80060F30(gPlayer[this->playerNum].sfxSource, 0x4900C024, this->playerNum); + func_enmy_80060F30(gPlayer[this->playerNum].sfxSource, NA_SE_ONE_UP, this->playerNum); if (gCurrentLevel != LEVEL_TRAINING) { gLifeCount[this->playerNum]++; } @@ -2182,11 +2183,11 @@ void ItemSupplyRing_Update(Item* this) { gPlayer[this->playerNum].trueZpos, BONUS_TEXT_1UP); } else { gPlayer[this->playerNum].heal += 32; - func_enmy_80060F30(gPlayer[this->playerNum].sfxSource, 0x49003013, this->playerNum); + func_enmy_80060F30(gPlayer[this->playerNum].sfxSource, NA_SE_GOLD_RING, this->playerNum); } } else { gPlayer[this->playerNum].heal += 128; - func_enmy_80060F30(gPlayer[this->playerNum].sfxSource, 0x4900200D, this->playerNum); + func_enmy_80060F30(gPlayer[this->playerNum].sfxSource, NA_SE_SHIELD_RING_M, this->playerNum); } } if ((this->obj.id == OBJ_ITEM_GOLD_RING) && (this->timer_48 == 1)) { @@ -2284,7 +2285,7 @@ void ItemMeteoWarp_Update(ItemMeteoWarp* this) { if (gRingPassCount >= 7) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ENTER_WARP_ZONE; gPlayer[0].csState = 0; - AUDIO_PLAY_SFX(0x1900602A, gDefaultSfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_WARP_HOLE, gDefaultSfxSource, 0); gMissionStatus = MISSION_WARP; gLeveLClearStatus[gCurrentLevel] = 1; } @@ -2336,7 +2337,7 @@ void ItemCheckpoint_Update(ItemCheckpoint* this) { for (i = TEAM_ID_FALCO; i <= TEAM_ID_PEPPY; i++) { gSavedTeamShields[i] = gTeamShields[i]; } - AUDIO_PLAY_SFX(0x4900400F, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_CHECKPOINT, gDefaultSfxSource, 4); } } } @@ -2429,7 +2430,7 @@ void Sprite_UpdateDoodad(Sprite* this) { M_PI; if (this->unk_46 != 0) { this->obj.status = OBJ_FREE; - func_effect_8007A6F0(&this->obj.pos, 0x1903400F); + func_effect_8007A6F0(&this->obj.pos, NA_SE_OB_EXPLOSION_S); switch (this->obj.id) { case OBJ_SPRITE_CO_POLE: func_effect_8007D074(this->obj.pos.x, this->obj.pos.y + 160.0f, this->obj.pos.z, 4.0f); diff --git a/src/engine/fox_enmy2.c b/src/engine/fox_enmy2.c index 1b2307e9..333912ac 100644 --- a/src/engine/fox_enmy2.c +++ b/src/engine/fox_enmy2.c @@ -216,13 +216,13 @@ void Actor202_Update(Actor202* this) { func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y + 180.0f, this->obj.pos.z, this->vel.x, this->vel.y, this->vel.z, 8.0f, 30); Object_Kill(&this->obj, this->sfxSource); - func_effect_8007A6F0(&this->obj.pos, 0x2903A008); + func_effect_8007A6F0(&this->obj.pos, NA_SE_EN_EXPLOSION_S); gHitCount += this->info.bonus; D_ctx_80177850 = 15; } else { this->dmgType = DMG_NONE; this->timer_0C6 = 20; - AUDIO_PLAY_SFX(0x2903300E, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, this->sfxSource, 4); func_effect_8007D1E0(this->obj.pos.x, this->obj.pos.y + 180.0f, this->obj.pos.z, 5.0f); } } @@ -277,7 +277,7 @@ void Actor194_Dying(Actor194* this) { gActor194zPos[this->unk_046][temp_hi], 4.0f); } - AUDIO_PLAY_SFX(0x2903B009, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, this->sfxSource, 4); this->unk_04A++; if (this->unk_04A > 15) { @@ -352,7 +352,7 @@ void Scenery42_Update(Scenery_42* this) { if (this->obj.pos.y < gGroundHeight + 40.0f) { this->obj.pos.y = gGroundHeight + 40.0f; - AUDIO_PLAY_SFX(0x19130003, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_EN_METAL_BOUND_M, this->sfxSource, 0); this->state = 2; this->vel.y = 0.0f; } @@ -531,10 +531,10 @@ void Actor189_Update(Actor189* this) { if (this->unk_04A & 4) { switch (this->unk_046) { case 2: - AUDIO_PLAY_SFX(0x19000024, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_SAND_BOUND_S, this->sfxSource, 4); break; case 25: - AUDIO_PLAY_SFX(0x29003031, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_BOSS_ATTACK, this->sfxSource, 4); break; } } @@ -628,7 +628,7 @@ void Actor189_Update(Actor189* this) { (this->timer_0BE == 0)) { func_effect_8007B8F8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 50.0f, this->scale * 10.0f); Object_Kill(&this->obj, this->sfxSource); - func_effect_8007A6F0(&this->obj.pos, 0x2903A008); + func_effect_8007A6F0(&this->obj.pos, NA_SE_EN_EXPLOSION_S); } break; @@ -639,7 +639,7 @@ void Actor189_Update(Actor189* this) { (this->timer_0BE == 0)) { func_effect_8007B8F8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 50.0f, this->scale * 10.0f); Object_Kill(&this->obj, this->sfxSource); - func_effect_8007A6F0(&this->obj.pos, 0x2903A008); + func_effect_8007A6F0(&this->obj.pos, NA_SE_EN_EXPLOSION_S); } break; @@ -660,7 +660,7 @@ void Actor189_Update(Actor189* this) { (this->timer_0BE == 0)) { func_effect_8007B8F8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 50.0f, this->scale * 10.0f); Object_Kill(&this->obj, this->sfxSource); - func_effect_8007A6F0(&this->obj.pos, 0x2903A008); + func_effect_8007A6F0(&this->obj.pos, NA_SE_EN_EXPLOSION_S); } break; @@ -671,7 +671,7 @@ void Actor189_Update(Actor189* this) { func_effect_8007B8F8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 70.0f, this->scale * 20.0f); func_effect_8007B8F8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 70.0f, this->scale * 20.0f); Object_Kill(&this->obj, this->sfxSource); - func_effect_8007A6F0(&this->obj.pos, 0x2903A008); + func_effect_8007A6F0(&this->obj.pos, NA_SE_EN_EXPLOSION_S); } break; @@ -743,7 +743,7 @@ void Actor189_Update(Actor189* this) { (this->timer_0BE == 0)) { func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 10.0f); Object_Kill(&this->obj, this->sfxSource); - func_effect_8007A6F0(&this->obj.pos, 0x2903A008); + func_effect_8007A6F0(&this->obj.pos, NA_SE_EN_EXPLOSION_S); } } else if (((this->state >= 41) && (this->state < 45)) || (this->state == 59)) { if (((this->timer_0BC == 0) || @@ -751,7 +751,7 @@ void Actor189_Update(Actor189* this) { (this->timer_0BE == 0)) { func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 2.0f * this->scale); Object_Kill(&this->obj, this->sfxSource); - func_effect_8007A6F0(&this->obj.pos, 0x2903A008); + func_effect_8007A6F0(&this->obj.pos, NA_SE_EN_EXPLOSION_S); } if (func_play_800A73E4(&sp44, &sp40, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z)) { func_effect_8007B228(this->obj.pos.x, sp44, this->obj.pos.z, 2.0f); @@ -768,7 +768,7 @@ void Actor189_Update(Actor189* this) { func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, this->vel.z, this->scale * 1.5f, 4); Object_Kill(&this->obj, this->sfxSource); - func_effect_8007A6F0(&this->obj.pos, 0x2903A008); + func_effect_8007A6F0(&this->obj.pos, NA_SE_EN_EXPLOSION_S); } } else { if ((this->state == 3) && ((this->timer_0BC % 8) == 0)) { @@ -1116,7 +1116,7 @@ void ActorEvent_ProcessScript(ActorEvent* this) { gActor194zPos[i][j] = this->obj.pos.z; } if (this->unk_0B4 == EVID_200) { - AUDIO_PLAY_SFX(0x11032049, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SPACE_SNAKE, this->sfxSource, 4); } break; } @@ -1173,26 +1173,26 @@ void ActorEvent_ProcessScript(ActorEvent* this) { case EISFX_EN_ENGINE_01: if (!((gCurrentLevel == LEVEL_SOLAR) || (this->unk_0B4 == EVID_6) || ((gCurrentLevel == LEVEL_CORNERIA) && (this->unk_0B4 == EVID_8)))) { - AUDIO_PLAY_SFX(0x31000011, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ENGINE_01, this->sfxSource, 4); } break; case EISFX_ARWING_ENGINE_FG: - AUDIO_PLAY_SFX(0x3100000C, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); break; case EISFX_GREATFOX_ENGINE: - AUDIO_PLAY_SFX(0x11030010, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, this->sfxSource, 0); break; case EISFX_EN_SHIP_ENGINE_S: - AUDIO_PLAY_SFX(0x31012039, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SHIP_ENGINE_S, this->sfxSource, 4); break; case EISFX_OB_WING: - AUDIO_PLAY_SFX(0x1900302B, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_WING, this->sfxSource, 0); break; case EISFX_EN_ALIEN_FLY: - AUDIO_PLAY_SFX(0x31000014, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ALIEN_FLY, this->sfxSource, 4); break; case EISFX_EN_SPACE_SHIP: - AUDIO_PLAY_SFX(0x31000015, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SPACE_SHIP, this->sfxSource, 4); break; } @@ -1292,7 +1292,7 @@ void ActorEvent_ProcessScript(ActorEvent* this) { case EV_OPC(EVOP_SET_SURFACE): if ((gGroundSurface == SURFACE_WATER) && (actorScript[this->aiIndex + 1] != 2)) { - Audio_KillSfxBySourceAndId(gPlayer[0].sfxSource, 0x1100000B); + Audio_KillSfxBySourceAndId(gPlayer[0].sfxSource, NA_SE_SPLASH_LEVEL_S); } gGroundSurface = actorScript[this->aiIndex + 1]; this->aiIndex += 2; @@ -1601,7 +1601,7 @@ void ActorEvent_8006EAC4(Effect* effect, f32 xPos, f32 yPos, f32 zPos) { effect->timer_50 = 20; Object_SetInfo(&effect->info, effect->obj.id); - AUDIO_PLAY_SFX(0x2900201D, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_FALLING_DOWN, effect->sfxSource, 4); } void ActorEvent_8006EB64(f32 xPos, f32 yPos, f32 zPos) { @@ -1626,7 +1626,7 @@ void ActorEvent_SetupTIMine(Actor* actor, f32 xPos, f32 yPos, f32 zPos) { Object_SetInfo(&actor->info, actor->obj.id); actor->info.unk_16 = 2; - AUDIO_PLAY_SFX(0x2900201D, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_FALLING_DOWN, actor->sfxSource, 4); } void ActorEvent_SpawnTIMine(f32 xPos, f32 yPos, f32 zPos) { @@ -1670,18 +1670,18 @@ void Actor_SetupPlayerShot(PlayerShotId objId, PlayerShot* shot, s32 actorId, f3 if (gLevelMode == LEVELMODE_ALL_RANGE) { if (actorId + NPC_SHOT_ID <= AI360_PEPPY + NPC_SHOT_ID) { - AUDIO_PLAY_SFX(0x2900000D, shot->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_SHOT_F, shot->sfxSource, 4); } else { - AUDIO_PLAY_SFX(0x29002002, shot->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SHOT_0, shot->sfxSource, 4); } } else if ((actorId < ARRAY_COUNT(gActors)) && (gActors[actorId].obj.id == OBJ_ACTOR_EVENT) && (gActors[actorId].iwork[12] >= TEAM_ID_FALCO)) { - AUDIO_PLAY_SFX(0x2900000D, shot->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_SHOT_F, shot->sfxSource, 4); } else if (actorId + NPC_SHOT_ID == CS_SHOT_ID + NPC_SHOT_ID) { shot->sourceId = CS_SHOT_ID; - AUDIO_PLAY_SFX(0x19030037, shot->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_SHOT_DEMO, shot->sfxSource, 0); } else { - AUDIO_PLAY_SFX(0x29002002, shot->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SHOT_0, shot->sfxSource, 4); } } @@ -1723,7 +1723,7 @@ void ActorEvent_8006F044(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale effect->scale1 = scale1; effect->unk_44 = 100; Object_SetInfo(&effect->info, effect->obj.id); - func_effect_8007A6F0(&effect->obj.pos, 0x2903B009); + func_effect_8007A6F0(&effect->obj.pos, NA_SE_EN_EXPLOSION_M); } void ActorEvent_8006F0D8(f32 xPos, f32 yPos, f32 zPos, f32 scale1) { @@ -1752,7 +1752,7 @@ void ActorEvent_8006F140(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale effect->unk_7A = 18; Object_SetInfo(&effect->info, effect->obj.id); effect->info.damage = 40; - func_effect_8007A6F0(&effect->obj.pos, 0x2903B009); + func_effect_8007A6F0(&effect->obj.pos, NA_SE_EN_EXPLOSION_M); } void ActorEvent_8006F1EC(f32 xPos, f32 yPos, f32 zPos, f32 scale1) { @@ -1905,7 +1905,7 @@ void ActorEvent_ProcessActions(ActorEvent* this) { this->vel.z, this->scale * 3.0f, 15); Actor_Despawn(this); Object_Kill(&this->obj, this->sfxSource); - func_effect_8007A6F0(&this->obj.pos, 0x2903B009); + func_effect_8007A6F0(&this->obj.pos, NA_SE_EN_EXPLOSION_M); break; case EVACT_DESPAWN: @@ -1988,7 +1988,7 @@ void ActorEvent_8006FE28(ActorEvent* this) { if ((fabsf(this->obj.pos.x - gPlayer[0].pos.x) < 100.0f) && (fabsf(this->obj.pos.y - gPlayer[0].pos.y) < 100.0f) && (fabsf(this->obj.pos.z - gPlayer[0].trueZpos) < 50.0f)) { func_enmy_80067A40(); - Audio_KillSfxBySourceAndId(this->sfxSource, 0x1900302B); + Audio_KillSfxBySourceAndId(this->sfxSource, NA_SE_OB_WING); Object_Kill(&this->obj, this->sfxSource); } } @@ -2009,10 +2009,10 @@ void ActorEvent_8006FEEC(ActorEvent* this) { this->itemDrop = DROP_NONE; Actor_Despawn(this); Object_Kill(&this->obj, this->sfxSource); - func_effect_8007A6F0(&this->obj.pos, 0x29018036); + func_effect_8007A6F0(&this->obj.pos, NA_SE_EN_BIRD_DOWN); func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 4.0f); } else { - AUDIO_PLAY_SFX(0x29033037, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_BIRD_DAMAGE, this->sfxSource, 4); } } } @@ -2086,9 +2086,9 @@ void ActorEvent_800701E0(ActorEvent* this) { if (this->unk_0B4 != EVID_83) { if ((this->unk_0B4 == EVID_6) && (gCurrentLevel == LEVEL_SOLAR)) { - AUDIO_PLAY_SFX(0x29018036, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_BIRD_DOWN, this->sfxSource, 4); } else { - AUDIO_PLAY_SFX(0x2903700B, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_CRASH_DOWN, this->sfxSource, 4); } this->obj.status = OBJ_DYING; @@ -2176,18 +2176,18 @@ void ActorEvent_800701E0(ActorEvent* this) { } if (this->unk_0B4 == EVID_82) { - AUDIO_PLAY_SFX(0x11000055, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_SMOKE, this->sfxSource, 0); this->dmgType = DMG_BEAM; func_effect_8007C688(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 3.0f, 60); } } else { this->timer_0C6 = 20; if ((this->unk_0B4 == EVID_6) && (gCurrentLevel == LEVEL_SOLAR)) { - AUDIO_PLAY_SFX(0x29033037, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_BIRD_DAMAGE, this->sfxSource, 4); } else if (this->health < 20) { - AUDIO_PLAY_SFX(0x2943500F, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_KNOCK_DOWN, this->sfxSource, 4); } else { - AUDIO_PLAY_SFX(0x2903300E, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, this->sfxSource, 4); } if ((this->unk_0B4 != EVID_13) && (this->unk_0B4 != EVID_61) && (this->unk_0B4 != EVID_83)) { @@ -2271,14 +2271,14 @@ void ActorEvent_80070BA8(ActorEvent* this) { func_effect_8007C120(this->hitPos.x, this->hitPos.y, this->hitPos.z, this->vel.x, this->vel.y, this->vel.z, 0.2f, 10); this->health -= this->damage; - AUDIO_PLAY_SFX(0x29033064, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SPARK_DAMAGE_M, this->sfxSource, 4); if (this->health <= 0) { BonusText_Display(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->info.bonus); gHitCount += this->info.bonus + 1; D_ctx_80177850 = 15; } } else { - AUDIO_PLAY_SFX(0x29121007, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } } } @@ -2841,7 +2841,7 @@ void ActorEvent_80071DC0(ActorEvent* this) { } if (((gGameFrameCount % 16) == 0)) { - AUDIO_PLAY_SFX(0x2903B009, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, this->sfxSource, 4); } this->vel.y -= 0.1f; @@ -2878,9 +2878,9 @@ void ActorEvent_800720E8(ActorEvent* this) { if (this->health <= 0) { this->unk_046 = 1; this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SX_6032408); - AUDIO_PLAY_SFX(0x1900000D, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_GATE_OPEN, this->sfxSource, 0); } else { - AUDIO_PLAY_SFX(0x2903300E, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, this->sfxSource, 0); } this->dmgType = DMG_NONE; } @@ -3025,7 +3025,7 @@ void ActorEvent_Update(ActorEvent* this) { this->timer_0C6 = 20; this->health -= this->damage; - AUDIO_PLAY_SFX(0x29034041, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SNAKE_DAMAGE, this->sfxSource, 4); if (this->health <= 0) { this->timer_0C6 = 200; @@ -3416,9 +3416,9 @@ void ActorEvent_Update(ActorEvent* this) { (this->unk_0B4 != EVID_49) && (this->unk_0B4 != EVID_50)) { this->dmgType = DMG_NONE; if (gCurrentLevel == LEVEL_METEO) { - AUDIO_PLAY_SFX(0x2902107D, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ROCK_REFLECT, this->sfxSource, 4); } else { - AUDIO_PLAY_SFX(0x29121007, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } } @@ -3461,7 +3461,7 @@ void ActorEvent_Update(ActorEvent* this) { spF0 = 350.0f; if (((gGameFrameCount % 4) == 0)) { ActorEvent_8007240C(this->obj.pos.x, spEC, this->obj.pos.z, this->obj.rot.y); - AUDIO_PLAY_SFX(0x19800017, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_IN_SPLASH_S, this->sfxSource, 4); } } @@ -4221,7 +4221,7 @@ void func_enmy2_800763A4(Actor* actor) { actor->scale * 3.0f, 5); func_effect_8007B228(actor->obj.pos.x, sp58, actor->obj.pos.z, 2.0f); actor->timer_0BE = 2; - func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); return; } @@ -4232,7 +4232,7 @@ void func_enmy2_800763A4(Actor* actor) { actor->obj.pos.z - actor->vel.z, 0.0f, 0.0f, 0.0f, actor->scale * 4.0f, 20); func_enmy_80062C38(actor->obj.pos.x, actor->obj.pos.z); actor->timer_0BE = 2; - func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); return; } } else { @@ -4264,9 +4264,9 @@ void func_enmy2_800763A4(Actor* actor) { actor->obj.pos.z - actor->vel.z, actor->scale * 3.0f); if ((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->aiType < AI360_KATT)) { - func_effect_8007A6F0(&actor->obj.pos, 0x2903B009); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); } else { - func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); } if ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0B4 == EVID_2)) { @@ -4332,9 +4332,9 @@ void func_enmy2_800763A4(Actor* actor) { actor->timer_0BE = 2; if ((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->aiType < AI360_KATT)) { - func_effect_8007A6F0(&actor->obj.pos, 0x2903B009); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); } else { - func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); } } } @@ -4370,9 +4370,9 @@ void func_enmy2_800763A4(Actor* actor) { actor->timer_0BE = 2; if ((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->aiType < AI360_KATT)) { - func_effect_8007A6F0(&actor->obj.pos, 0x2903B009); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); } else { - func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); } } } diff --git a/src/engine/fox_hud.c b/src/engine/fox_hud.c index f229a965..b159dd8a 100644 --- a/src/engine/fox_hud.c +++ b/src/engine/fox_hud.c @@ -795,7 +795,7 @@ void HUD_DrawLevelClearScreen(void) { if ((gLevelClearScreenTimer == 92) || (gLevelClearScreenTimer == 87) || (gLevelClearScreenTimer == 82) || (gLevelClearScreenTimer == 77)) { - AUDIO_PLAY_SFX(0x49008031, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_MISSION_ACCOMPLISHED, gDefaultSfxSource, 4); } } else { if (gLevelClearScreenTimer <= 100) { @@ -823,9 +823,9 @@ void HUD_DrawLevelClearScreen(void) { if ((gLevelClearScreenTimer == 80) || (gLevelClearScreenTimer == 72) || (gLevelClearScreenTimer == 64) || (gLevelClearScreenTimer == 56)) { if (!boolTemp) { - AUDIO_PLAY_SFX(0x49008034, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_MISSION_COMPLETE, gDefaultSfxSource, 4); } else { - AUDIO_PLAY_SFX(0x49008031, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_MISSION_ACCOMPLISHED, gDefaultSfxSource, 4); } } } @@ -1053,7 +1053,7 @@ void HUD_DrawLevelClearStatusScreen(void) { f32 y6; if (gShowLevelClearStatusScreen == 0) { - Audio_KillSfxById(0x41007012); + Audio_KillSfxById(NA_SE_TEAM_SHIELD_UP); D_801617C0[0] = 0; } @@ -1083,20 +1083,20 @@ void HUD_DrawLevelClearStatusScreen(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(0x41007012, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_TEAM_SHIELD_UP, gDefaultSfxSource, 4); } D_801617C0[0] = 2; case 2: if ((D_801617C0[5] == 0) && (D_801617C0[4] == 0)) { - Audio_KillSfxById(0x41007012); + Audio_KillSfxById(NA_SE_TEAM_SHIELD_UP); D_801617C0[0] = 3; D_801617E8[0] = 30; break; } if (D_801617C0[5] > 0) { - AUDIO_PLAY_SFX(0x49004007, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_COUNT_UP, gDefaultSfxSource, 4); if (D_801617C0[5] >= 100) { D_801617C0[5] -= 100; @@ -1135,7 +1135,7 @@ void HUD_DrawLevelClearStatusScreen(void) { if ((D_801617C0[i] == 0) || (temp == 0)) { D_801617C0[4] = 0; - Audio_KillSfxById(0x41007012); + Audio_KillSfxById(NA_SE_TEAM_SHIELD_UP); } } break; @@ -1154,7 +1154,7 @@ void HUD_DrawLevelClearStatusScreen(void) { D_801617C0[0]++; } else { if (((gGameFrameCount % 2) == 0)) { - AUDIO_PLAY_SFX(0x4900C024, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ONE_UP, gDefaultSfxSource, 4); D_801617C0[3]++; } } @@ -1429,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(0x49000002, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); } } @@ -1823,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(NA_SE_MISSILE_ALARM, gDefaultSfxSource, 4);} // clang-format on } @@ -2250,7 +2250,7 @@ void func_hud_8008B044(void) { return; } - AUDIO_PLAY_SFX(0x49002018, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_COMMU_REQUEST, gDefaultSfxSource, 4); if (gCallVoiceParam != 0) { Audio_SetUnkVoiceParam(1); @@ -2263,7 +2263,7 @@ void func_hud_8008B044(void) { D_80161790++; if (D_80161790 >= 7) { if ((D_80161794 % 2) != 0) { - AUDIO_PLAY_SFX(0x49002018, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_COMMU_REQUEST, gDefaultSfxSource, 4); } D_80161790 = 0; D_80161794++; @@ -2273,7 +2273,7 @@ void func_hud_8008B044(void) { gCallVoiceParam = 0; D_80161790 = 0; D_80161798 = 0; - Audio_KillSfxById(0x49002018); + Audio_KillSfxById(NA_SE_COMMU_REQUEST); } break; } @@ -3074,7 +3074,7 @@ void HUD_DrawBossHealth(void) { if ((gShowBossHealth == 1) && (gTeamShields[TEAM_ID_SLIPPY] > 0)) { if ((gBossHealthBar >= 0) && (D_801616BC == -1.0f)) { - AUDIO_PLAY_SFX(0x4900C028, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_BOSS_GAUGE_OPEN, gDefaultSfxSource, 4); D_801616BC = 255.0f; } @@ -3719,8 +3719,8 @@ s32 func_hud_80090200(Boss* boss) { switch (boss->swork[1]) { case 0: - AUDIO_PLAY_SFX(0x11000011, boss->sfxSource, 0); - AUDIO_PLAY_SFX(0x3140402E, boss->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_EARTHQUAKE, boss->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_EXPLOSION_DEMO, boss->sfxSource, 0); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); @@ -4302,7 +4302,7 @@ bool func_hud_80091CF8(Actor* actor) { if (actor->iwork[1] != 0) { if (actor->fwork[10] < 0.1f) { actor->fwork[10] = 20.0f; - AUDIO_PLAY_SFX(0x09000002, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); actor->fwork[29] = 5.0f; } actor->iwork[1] = 0; @@ -4351,7 +4351,7 @@ bool func_hud_80091F00(Actor* actor) { } actor->timer_0C6 = 20; - AUDIO_PLAY_SFX(0x2903300E, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, actor->sfxSource, 4); func_effect_8007D10C(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 1.5f); Matrix_RotateY(gCalcMatrix, actor->unk_0F4.y * M_DTOR, MTXF_NEW); @@ -4682,7 +4682,7 @@ void ActorTeamBoss_Init(Actor* actor) { actor->unk_0C9 = 1; } - AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); if (((s32) (D_hud_800D1970 % 4U) == AI360_SLIPPY) && (gCurrentLevel == LEVEL_SECTOR_X)) { Object_Kill(&actor->obj, actor->sfxSource); @@ -4828,7 +4828,7 @@ void func_hud_80093310(void) { if (1) {} this->obj.id = OBJ_ACTOR_CUTSCENE; Object_SetInfo(&this->info, this->obj.id); - AUDIO_PLAY_SFX(0x11030010, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, this->sfxSource, 0); } void func_hud_800933D8(f32 x, f32 y, f32 z, f32 arg3) { @@ -5133,7 +5133,7 @@ void HUD_AquasStart(Player* player) { } if (player->csTimer == 774) { - AUDIO_PLAY_SFX(0x01038026, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_MAR_LAUNCH, player->sfxSource, 0); D_ctx_80177A10[9] = 40; } @@ -6055,7 +6055,7 @@ void func_hud_80096A74(Player* player) { player->unk_190 = player->unk_194 = 10.0f; player->csState = 2; D_ctx_80177A48[1] = 400.0f; - AUDIO_PLAY_SFX(0x09004002, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_DASH, player->sfxSource, 0); } break; diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index 9dad5c5b..fe62bd11 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -255,11 +255,11 @@ void func_play_800A4C40(Player* player) { if ((sp30.y < gGroundHeight + 80.0f) || (sp3C.y < gGroundHeight + 80.0f)) { if (D_play_80161A64 == 0) { D_play_80161A64 = 1; - AUDIO_PLAY_SFX(0x1100000B, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_SPLASH_LEVEL_S, player->sfxSource, 0); } } else { D_play_80161A64 = 0; - Audio_KillSfxBySourceAndId(player->sfxSource, 0x1100000B); + Audio_KillSfxBySourceAndId(player->sfxSource, NA_SE_SPLASH_LEVEL_S); } } } @@ -498,8 +498,8 @@ void func_play_800A594C(void) { if (!D_ctx_8017782C) { if (gCurrentLevel == LEVEL_SOLAR) { Audio_SetHeatAlarmParams(255, 1); - AUDIO_PLAY_SFX(0x4100C023, gDefaultSfxSource, 4); - Audio_KillSfxBySourceAndId(gPlayer[0].sfxSource, 0x3140807E); + AUDIO_PLAY_SFX(NA_SE_OVERHEAT_ALARM, gDefaultSfxSource, 4); + Audio_KillSfxBySourceAndId(gPlayer[0].sfxSource, NA_SE_OB_MAGMA_BUBBLE); } } else if (gCurrentLevel == LEVEL_AQUAS) { sEnvironment = SEGMENTED_TO_VIRTUAL(&D_AQ_602E584); @@ -787,7 +787,7 @@ void Player_DamageWings(Player* player, s32 side, s32 damage) { player->wings.rightState = WINGSTATE_BROKEN; func_effect_8007D0E0(player->hit1.x, player->hit1.y, player->hit1.z, 2.0f); gRightWingDebrisTimer[player->num] = 50; - func_play_800A5FA0(player->sfxSource, 0x0900A02C, player->num); + func_play_800A5FA0(player->sfxSource, NA_SE_ARWING_WING_BROKEN, player->num); if (gAllRangeWingRepairTimer == 0) { gAllRangeWingRepairTimer = 1000; } @@ -802,7 +802,7 @@ void Player_DamageWings(Player* player, s32 side, s32 damage) { player->wings.leftState = WINGSTATE_BROKEN; func_effect_8007D0E0(player->hit2.x, player->hit2.y, player->hit2.z, 2.0f); gLeftWingDebrisTimer[player->num] = 50; - func_play_800A5FA0(player->sfxSource, 0x0900A02C, player->num); + func_play_800A5FA0(player->sfxSource, NA_SE_ARWING_WING_BROKEN, player->num); if (gAllRangeWingRepairTimer == 0) { gAllRangeWingRepairTimer = 1000; } @@ -843,22 +843,22 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) { player->timer_498 = 20; } if (gHasShield[player->num]) { - func_play_800A5FA0(player->sfxSource, 0x0903900E, player->num); + func_play_800A5FA0(player->sfxSource, NA_SE_DAMAGE_S, player->num); gShieldTimer[player->num] = 5; gShieldAlpha[player->num] = 2.0f; player->damage = 0; } else { if (player->shields != 0) { if (player->shields < 50) { - AUDIO_PLAY_SFX(0x49008011, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_SHIELD_WARNING1, gDefaultSfxSource, 4); } else if (player->shields < 100) { - AUDIO_PLAY_SFX(0x49008010, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_SHIELD_WARNING0, gDefaultSfxSource, 4); } } if (damage < 25) { - func_play_800A5FA0(player->sfxSource, 0x0903900E, player->num); + func_play_800A5FA0(player->sfxSource, NA_SE_DAMAGE_S, player->num); } else { - func_play_800A5FA0(player->sfxSource, 0x0903A00F, player->num); + func_play_800A5FA0(player->sfxSource, NA_SE_DAMAGE_L, player->num); } } Matrix_RotateY(gCalcMatrix, player->yRot_114 * M_DTOR, MTXF_NEW); @@ -1661,7 +1661,7 @@ void func_play_800A8BA4(Player* player) { scenery360->obj.rot.y, scenery360->obj.rot.z, 0.0f, 0.0f, 0.0f); if ((temp_v0 != 0) && (temp_v0 < 0)) { if (player->whooshTimer == 0) { - func_effect_8007A6F0(&scenery360->obj.pos, 0x19000001); + func_effect_8007A6F0(&scenery360->obj.pos, NA_SE_PASS); } player->whooshTimer += 2; if (player->whooshTimer >= 4) { @@ -1677,7 +1677,7 @@ void func_play_800A8BA4(Player* player) { if (temp_v0 != 0) { if (temp_v0 < 0) { if (player->whooshTimer == 0) { - func_effect_8007A6F0(&scenery360->obj.pos, 0x19000001); + func_effect_8007A6F0(&scenery360->obj.pos, NA_SE_PASS); } player->whooshTimer += 2; if (player->whooshTimer >= 4) { @@ -1776,7 +1776,7 @@ void func_play_800A8BA4(Player* player) { player->shadowing = 80; } if (player->whooshTimer == 0) { - AUDIO_PLAY_SFX(0x19000001, scenery->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_PASS, scenery->sfxSource, 0); } player->whooshTimer += 2; if (player->whooshTimer >= 4) { @@ -1784,7 +1784,7 @@ void func_play_800A8BA4(Player* player) { } } else if (scenery->obj.id == OBJ_SCENERY_54) { if (player->whooshTimer == 0) { - AUDIO_PLAY_SFX(0x19832019, scenery->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_IN_SPLASH_L, scenery->sfxSource, 0); } player->whooshTimer += 2; if (player->whooshTimer >= 4) { @@ -1880,7 +1880,7 @@ void func_play_800A8BA4(Player* player) { if (temp_v0 != 0) { if (temp_v0 < 0) { if (player->whooshTimer == 0) { - AUDIO_PLAY_SFX(0x19000001, boss->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_PASS, boss->sfxSource, 0); } player->whooshTimer += 2; if (player->whooshTimer >= 4) { @@ -1944,11 +1944,11 @@ void func_play_800A8BA4(Player* player) { Radio_PlayMessage(gMsg_ID_5504, RCID_FALCO); } AUDIO_PLAY_SFX(gWarpRingSfx[gRingPassCount], gPlayer[0].sfxSource, 0); - AUDIO_PLAY_SFX(0x49008025, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_RING_PASS, gDefaultSfxSource, 4); } } else if (temp_v0 < 0) { if (player->whooshTimer == 0) { - AUDIO_PLAY_SFX(0x19000001, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_PASS, actor->sfxSource, 0); } player->whooshTimer += 2; if (player->whooshTimer >= 4) { @@ -1981,7 +1981,7 @@ void func_play_800A8BA4(Player* player) { if (temp_v0 != 0) { if (temp_v0 < 0) { if (player->whooshTimer == 0) { - AUDIO_PLAY_SFX(0x19000001, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_PASS, actor->sfxSource, 0); } player->whooshTimer += 2; if (player->whooshTimer >= 4) { @@ -2558,8 +2558,8 @@ void Play_Init(void) { D_ctx_80177C70 = 0; gTeamHelpActor = NULL; gTeamHelpTimer = 0; - Audio_KillSfxById(0x11403076); - Audio_KillSfxById(0x49000014); + Audio_KillSfxById(NA_SE_OB_ROOT_EXPLOSION1); + Audio_KillSfxById(NA_SE_DEMO_SIREN); Memory_FreeAll(); gTraining360MsgTimer = gTraining360MsgIndex = gShowBossHealth = gStarWolfMsgTimer = gAllRangeWingRepairTimer = gAllRangeSuppliesSent = 0; @@ -2831,7 +2831,7 @@ void func_play_800ACA40(Player* player) { for (i = 0; i < ARRAY_COUNT(gPlayerShots) - 1; i++) { if (gPlayerShots[i].obj.status == 0) { func_play_800AC650(player, &gPlayerShots[i], PLAYERSHOT_5, 100.0f); - func_play_800A5FA0(player->sfxSource, 0x09000014, player->num); + func_play_800A5FA0(player->sfxSource, NA_SE_TANK_SHOT, player->num); player->unk_1A0 = 2; break; } @@ -2850,7 +2850,7 @@ void func_play_800ACABC(Player* player) { for (i = 0; i < ARRAY_COUNT(gPlayerShots) - 1; i++) { if (gPlayerShots[i].obj.status == 0) { func_play_800AC290(player, &gPlayerShots[i], 0.0f, 0.0f, PLAYERSHOT_0, 400.0f / 3.0f); - func_play_800A5FA0(player->sfxSource, 0x09400000, player->num); + func_play_800A5FA0(player->sfxSource, NA_SE_ARWING_SHOT, player->num); gMuzzleFlashScale[player->num] = 0.5f; break; } @@ -2862,10 +2862,10 @@ void func_play_800ACABC(Player* player) { if (gPlayerShots[i].obj.status == 0) { func_play_800AC290(player, &gPlayerShots[i], 0.0f, -10.0f, PLAYERSHOT_1, 400.0f / 3.0f); if (laser == LASERS_TWIN) { - func_play_800A5FA0(player->sfxSource, 0x0940800C, player->num); + func_play_800A5FA0(player->sfxSource, NA_SE_ARWING_TWIN_LASER, player->num); gMuzzleFlashScale[player->num] = 0.5f; } else { - func_play_800A5FA0(player->sfxSource, 0x0940802B, player->num); + func_play_800A5FA0(player->sfxSource, NA_SE_ARWING_TWIN_LASER2, player->num); gMuzzleFlashScale[player->num] = 0.75f; } break; @@ -2949,7 +2949,7 @@ void func_play_800AD094(Player* player) { for (i = 0; i < ARRAY_COUNT(gPlayerShots); i++) { if (gPlayerShots[i].obj.status == 0) { func_play_800ACDC0(player, &gPlayerShots[i], PLAYERSHOT_6); - func_play_800A5FA0(player->sfxSource, 0x09000014, player->num); + func_play_800A5FA0(player->sfxSource, NA_SE_TANK_SHOT, player->num); player->csTimer = 2; player->unk_180 = 10.0f; break; @@ -2988,7 +2988,7 @@ bool func_play_800AD1F4(Player* player) { gChargeTimers[player->num] = 21; } if (gChargeTimers[player->num] == 20) { - func_enmy_80060F30(player->sfxSource, 0x0900302D, player->num); + func_enmy_80060F30(player->sfxSource, NA_SE_LOCK_SEARCH, player->num); } if ((!(gInputHold->button & R_TRIG) || !(gInputHold->button & Z_TRIG) || (player->form != FORM_ARWING) || (player->state_1C8 != PLAYERSTATE_1C8_ACTIVE)) && @@ -3024,7 +3024,7 @@ bool func_play_800AD1F4(Player* player) { } else { func_play_800AC650(player, &gPlayerShots[14 - player->num], PLAYERSHOT_8, 70.0f); } - func_enmy_80060F30(player->sfxSource, 0x09007029, player->num); + func_enmy_80060F30(player->sfxSource, NA_SE_LOCK_ON_LASER, player->num); gControllerRumbleTimers[player->num] = 5; return true; } @@ -3041,7 +3041,7 @@ bool func_play_800AD1F4(Player* player) { } else { func_play_800AC650(player, &gPlayerShots[14 - player->num], PLAYERSHOT_8, 70.0f); } - func_enmy_80060F30(player->sfxSource, 0x09007029, player->num); + func_enmy_80060F30(player->sfxSource, NA_SE_LOCK_ON_LASER, player->num); gChargeTimers[player->num] = 0; gControllerRumbleTimers[player->num] = 5; return true; @@ -4666,7 +4666,7 @@ void func_play_800B2574(Player* player) { if ((gInputHold->button & gBoostButton[player->num]) && !(gInputHold->button & gBrakeButton[player->num]) && (player->state_1C8 != PLAYERSTATE_1C8_U_TURN) && !player->boostCooldown) { if (player->boostMeter == 0.0f) { - func_play_800A5FA0(player->sfxSource, 0x09000002, player->num); + func_play_800A5FA0(player->sfxSource, NA_SE_ARWING_BOOST, player->num); player->unk_194 = 5.0f; player->unk_190 = 5.0f; if (gBoostButton[player->num] & gInputPress->button) { @@ -4760,7 +4760,7 @@ void func_play_800B2C00(Player* player) { if ((gInputHold->button & gBrakeButton[player->num]) && !(gInputHold->button & gBoostButton[player->num]) && (player->state_1C8 != PLAYERSTATE_1C8_U_TURN) && !player->boostCooldown) { if (player->boostMeter == 0.0f) { - func_play_800A5FA0(player->sfxSource, 0x09000003, player->num); + func_play_800A5FA0(player->sfxSource, NA_SE_ARWING_BRAKE, player->num); if ((gLevelMode == LEVELMODE_ALL_RANGE) && (gInputPress->button & gBrakeButton[player->num])) { gUturnBrakeTimers[gPlayerNum] = 5; } @@ -4818,7 +4818,7 @@ void func_play_800B3010(Player* player) { if (player->boostMeter == 0.0f) { player->unk_194 = 4.0f; player->unk_190 = 4.0f; - func_play_800A5FA0(player->sfxSource, 0x09000002, player->num); + func_play_800A5FA0(player->sfxSource, NA_SE_ARWING_BOOST, player->num); } Math_SmoothStepToF(&D_ctx_801779A8[player->num], 30.0f, 1.0f, 10.0f, 0.0f); player->unk_190 = 2.0f; @@ -4831,7 +4831,7 @@ void func_play_800B3010(Player* player) { } if ((gInputHold->button & gBrakeButton[player->num]) && !player->boostCooldown) { if (player->boostMeter == 0.0f) { - func_play_800A5FA0(player->sfxSource, 0x09000003, player->num); + func_play_800A5FA0(player->sfxSource, NA_SE_ARWING_BRAKE, player->num); } Math_SmoothStepToF(&D_ctx_801779A8[player->num], 20.0f, 1.0f, 10.0f, 0.0f); sp2C = 5.0f; @@ -4851,7 +4851,7 @@ void func_play_800B3314(Player* player) { player->gravity = 3.0f; if ((gInputHold->button & Z_TRIG) && !player->boostCooldown) { if (player->boostMeter == 0.0f) { - func_play_800A5FA0(player->sfxSource, 0x09000002, player->num); + func_play_800A5FA0(player->sfxSource, NA_SE_ARWING_BOOST, player->num); } player->unk_188 = 0.0f; player->zRotBank += 4.0f; @@ -4879,7 +4879,7 @@ void func_play_800B3314(Player* player) { } if ((gInputHold->button & R_TRIG) && !player->boostCooldown) { if (player->boostMeter == 0.0f) { - func_play_800A5FA0(player->sfxSource, 0x09000002, player->num); + func_play_800A5FA0(player->sfxSource, NA_SE_ARWING_BOOST, player->num); } player->unk_188 = 0.0f; player->zRotBank -= 4.0f; @@ -5072,7 +5072,7 @@ void Player_UpdateShields(Player* player) { if (player->shields >= Play_GetMaxShields()) { player->shields = Play_GetMaxShields(); player->heal = 0; - Audio_KillSfxById(0x41007012); + Audio_KillSfxById(NA_SE_TEAM_SHIELD_UP); } } } @@ -5091,7 +5091,7 @@ void func_play_800B415C(Player* player) { var_v0 = 16 - 1; } if ((gGameFrameCount & var_v0) == 0) { - func_enmy_80060F30(player->sfxSource, 0x49001026, player->num); + func_enmy_80060F30(player->sfxSource, NA_SE_SHIELD_BUZZER, player->num); } } } @@ -5107,10 +5107,10 @@ void Player_Down(Player* player) { AUDIO_PLAY_BGM(SEQ_ID_DEATH); } if (gCurrentLevel == LEVEL_SOLAR) { - Audio_KillSfxById(0x4100C023); + Audio_KillSfxById(NA_SE_OVERHEAT_ALARM); } Audio_StopPlayerNoise(player->num); - func_play_800A5FA0(player->sfxSource, 0x0900C010, player->num); + func_play_800A5FA0(player->sfxSource, NA_SE_ARWING_DOWN, player->num); player->shields = 0; player->csState = 0; player->hitTimer = 0; @@ -5368,9 +5368,9 @@ void Player_Update(Player* player) { 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); + AUDIO_PLAY_SFX(NA_SE_VIEW_MOVE_IN, gDefaultSfxSource, 4); } else { - AUDIO_PLAY_SFX(0x4900002D, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_VIEW_MOVE_OUT, gDefaultSfxSource, 4); if (gLevelMode == LEVELMODE_ON_RAILS) { player->camRoll = 0.0f; } @@ -5400,7 +5400,7 @@ void Player_Update(Player* player) { if (D_ctx_80177E7C == 1) { D_ctx_80177E7C += 1; for (i = 0; i < 4; i++) { - func_play_800A5FA0(gPlayer[i].sfxSource, 0x09000002, gPlayer[i].num); + func_play_800A5FA0(gPlayer[i].sfxSource, NA_SE_ARWING_BOOST, gPlayer[i].num); gPlayer[i].unk_190 = gPlayer[i].unk_194 = 5.0f; } } @@ -5484,7 +5484,7 @@ void Player_Update(Player* player) { func_play_800B0F50(player); func_play_800B44C4(player); func_play_800B7184(player, 1); - func_play_800A5FA0(player->sfxSource, 0x09000002, player->num); + func_play_800A5FA0(player->sfxSource, NA_SE_ARWING_BOOST, player->num); player->unk_190 = player->unk_194 = 5.0f; } else if (player->unk_288 >= 0) { if (player->unk_288 == 0) { @@ -6206,7 +6206,7 @@ void Play_UpdateLevel(void) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ENTER_WARP_ZONE; gPlayer[0].csState = 0; gSceneSetup = 1; - AUDIO_PLAY_SFX(0x1900602A, gDefaultSfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_WARP_HOLE, gDefaultSfxSource, 0); gMissionStatus = MISSION_WARP; gLeveLClearStatus[gCurrentLevel] = 1; } @@ -6263,9 +6263,9 @@ void Play_UpdateLevel(void) { } if (gPlayer[0].heal == 0) { if (gPlayer[0].shields == 50) { - AUDIO_PLAY_SFX(0x49008011, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_SHIELD_WARNING1, gDefaultSfxSource, 4); } else if (gPlayer[0].shields == 100) { - AUDIO_PLAY_SFX(0x49008010, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_SHIELD_WARNING0, gDefaultSfxSource, 4); } } } @@ -6478,18 +6478,18 @@ void Play_Main(void) { if ((gControllerPress[gMainController].button & R_TRIG) && (gPlayer[0].form != FORM_BLUE_MARINE) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_STANDBY)) { if (gShowCrosshairs[0] = 1 - gShowCrosshairs[0]) { - AUDIO_PLAY_SFX(0x49000019, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_MAP_WINDOW_OPEN, gDefaultSfxSource, 4); } else { - AUDIO_PLAY_SFX(0x4900101A, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_MAP_WINDOW_CLOSE, gDefaultSfxSource, 4); } } } else { for (i = 0; i < 4; i++) { if ((gControllerPress[i].button & R_TRIG) && (gPlayer[i].form != FORM_ON_FOOT)) { if (gShowCrosshairs[i] = 1 - gShowCrosshairs[i]) { - func_enmy_80060F30(gPlayer[i].sfxSource, 0x49000019, i); + func_enmy_80060F30(gPlayer[i].sfxSource, NA_SE_MAP_WINDOW_OPEN, i); } else { - func_enmy_80060F30(gPlayer[i].sfxSource, 0x4900101A, i); + func_enmy_80060F30(gPlayer[i].sfxSource, NA_SE_MAP_WINDOW_CLOSE, i); } } } diff --git a/src/engine/fox_radio.c b/src/engine/fox_radio.c index 5089c15b..0840ead8 100644 --- a/src/engine/fox_radio.c +++ b/src/engine/fox_radio.c @@ -628,7 +628,7 @@ void Radio_Draw(void) { if ((gRadioMsgId >= 23000) && (gRadioMsgId < 23033)) { if (gMsgCharIsPrinting) { gRadioMouthTimer = 2; - AUDIO_PLAY_SFX(0x49000017, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_MESSAGE_MOVE, gDefaultSfxSource, 4); } } else if (ret == 1) { gRadioMouthTimer = 2; diff --git a/src/engine/fox_tank.c b/src/engine/fox_tank.c index 813391e8..45617862 100644 --- a/src/engine/fox_tank.c +++ b/src/engine/fox_tank.c @@ -514,7 +514,7 @@ void func_tank_80045130(Player* player) { player->baseRollRate = 20; player->rollRate = 20; player->sfx.roll = 1; - AUDIO_PLAY_SFX(0x1100000A, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_TANK_SLIDE, player->sfxSource, 0); } else { player->barrelInputTimerL = 10; } @@ -527,7 +527,7 @@ void func_tank_80045130(Player* player) { player->baseRollRate = -20; player->rollRate = -20; player->sfx.roll = 1; - AUDIO_PLAY_SFX(0x1100000A, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_TANK_SLIDE, player->sfxSource, 0); } else { player->barrelInputTimerR = 10; } @@ -551,7 +551,7 @@ void func_tank_80045348(Player* player) { sp2E = true; if (D_800C9F24 == 0.0f) { player->unk_190 = player->unk_194 = 4.0f; - AUDIO_PLAY_SFX(0x0900402F, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_TANK_DASH, player->sfxSource, 0); } else { player->unk_190 = 2.0f; } @@ -593,13 +593,13 @@ void func_tank_80045678(Player* player) { player->gravity = 3.0f; if (!(gInputHold->button & Z_TRIG)) { - Audio_KillSfxBySourceAndId(player->sfxSource, 0x01008016); - Audio_KillSfxBySourceAndId(player->sfxSource, 0x1100000A); + Audio_KillSfxBySourceAndId(player->sfxSource, NA_SE_TANK_GO_UP); + Audio_KillSfxBySourceAndId(player->sfxSource, NA_SE_TANK_SLIDE); } if ((gInputHold->button & Z_TRIG) && !player->boostCooldown) { D_800C9F14++; if (D_800C9F20 == 0.0f) { - AUDIO_PLAY_SFX(0x01004024, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_TANK_BURNER_HALF, player->sfxSource, 0); } player->unk_188 = 0.0f; player->zRotBank += 4.0f; @@ -623,13 +623,13 @@ void func_tank_80045678(Player* player) { D_800C9F20 = 0.0f; } if (!(gInputHold->button & R_TRIG)) { - Audio_KillSfxBySourceAndId(player->sfxSource, 0x01008016); - Audio_KillSfxBySourceAndId(player->sfxSource, 0x1100000A); + Audio_KillSfxBySourceAndId(player->sfxSource, NA_SE_TANK_GO_UP); + Audio_KillSfxBySourceAndId(player->sfxSource, NA_SE_TANK_SLIDE); } if ((gInputHold->button & R_TRIG) && !player->boostCooldown) { D_800C9F14++; if (player->unk_2C0 == 0.0f) { - AUDIO_PLAY_SFX(0x01004024, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_TANK_BURNER_HALF, player->sfxSource, 0); } player->unk_188 = 0.0f; player->zRotBank -= 4.0f; @@ -656,9 +656,9 @@ void func_tank_80045678(Player* player) { if ((player->unk_16C > 0.2f) && (player->unk_170 > 0.2f) && (player->radioDamageTimer == 0)) { if (D_800C9F3C == 0) { D_800C9F3C = 1; - Audio_KillSfxBySourceAndId(player->sfxSource, 0x1100000A); - Audio_KillSfxBySourceAndId(player->sfxSource, 0x01004024); - AUDIO_PLAY_SFX(0x01008016, player->sfxSource, 0); + Audio_KillSfxBySourceAndId(player->sfxSource, NA_SE_TANK_SLIDE); + Audio_KillSfxBySourceAndId(player->sfxSource, NA_SE_TANK_BURNER_HALF); + AUDIO_PLAY_SFX(NA_SE_TANK_GO_UP, player->sfxSource, 0); } player->zRotBank += ((__cosf(gGameFrameCount * M_DTOR * 8.0f) * 10.0f) - player->zRotBank) * 0.1f; temp = -gInputPress->stick_y; @@ -742,7 +742,7 @@ void func_tank_80045E7C(Player* player) { } if (player->rollRate == 0) { player->barrelRoll = 0; - Audio_KillSfxBySourceAndId(player->sfxSource, 0x1100000A); + Audio_KillSfxBySourceAndId(player->sfxSource, NA_SE_TANK_SLIDE); } } if ((player->timer_1E8 >= 5) && (player->hitTimer == 0) && (player->barrelRoll != 9)) { @@ -1120,14 +1120,14 @@ void func_tank_80047504(Player* player) { if (player->boostMeter > 90.0f) { player->boostMeter = 90.0f; player->boostCooldown = true; - Audio_KillSfxBySourceAndId(player->sfxSource, 0x01004024); - Audio_KillSfxBySourceAndId(player->sfxSource, 0x01008016); + Audio_KillSfxBySourceAndId(player->sfxSource, NA_SE_TANK_BURNER_HALF); + Audio_KillSfxBySourceAndId(player->sfxSource, NA_SE_TANK_GO_UP); } } else { if (player->boostMeter > 0.0f) { player->boostCooldown = true; - Audio_KillSfxBySourceAndId(player->sfxSource, 0x01004024); - Audio_KillSfxBySourceAndId(player->sfxSource, 0x01008016); + Audio_KillSfxBySourceAndId(player->sfxSource, NA_SE_TANK_BURNER_HALF); + Audio_KillSfxBySourceAndId(player->sfxSource, NA_SE_TANK_GO_UP); } } } else { @@ -1300,7 +1300,7 @@ void func_tank_80047FBC(Player* player) { Math_SmoothStepToF(&player->rot.z, -((player->vel.z / 5.0f) * 4.0f), 0.4f, 8.0f, 0.01f); if (player->rot.z >= 3.0f) { if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) { - AUDIO_PLAY_SFX(0x19000065, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_RAILWAY_BOUND, player->sfxSource, 0); } D_800C9F08 |= 1; } @@ -1367,14 +1367,14 @@ void func_tank_800481F4(Player* player) { gLight2BTarget = 20; player->shadowing = 80; if (player->whooshTimer == 0) { - AUDIO_PLAY_SFX(0x19000001, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_PASS, player->sfxSource, 0); } player->whooshTimer += 2; if (player->whooshTimer >= 4) { player->whooshTimer = 4; } } else if (temp_v0 == -2) { - AUDIO_PLAY_SFX(0x19000001, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_PASS, player->sfxSource, 0); } } else { Player_ApplyDamage(player, temp_v0, scenery->info.damage); diff --git a/src/engine/fox_versus.c b/src/engine/fox_versus.c index 37d85811..239bbb10 100644 --- a/src/engine/fox_versus.c +++ b/src/engine/fox_versus.c @@ -336,7 +336,7 @@ void func_versus_800BDE44(void) { } else { D_80178810[i] = 0; } - AUDIO_PLAY_SFX(0x49004007, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_COUNT_UP, gDefaultSfxSource, 4); } } @@ -362,12 +362,12 @@ s32 Versus_UpdateTimer(void) { if (D_versus_80178768[1] >= 0) { if ((D_versus_80178768[0] == 0) && (D_versus_80178768[1] < 15) && (D_versus_80178768[1] >= 0)) { - AUDIO_PLAY_SFX(0x4900C02A, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_COUNTDOWN, gDefaultSfxSource, 4); } } else { // clang-format off if (D_versus_80178768[0] == 0) {\ - AUDIO_PLAY_SFX(0x4900D036, gDefaultSfxSource, 4);\ + AUDIO_PLAY_SFX(NA_SE_TIME_OVER, gDefaultSfxSource, 4);\ } // clang-format on D_versus_80178768[1] *= -1; @@ -463,19 +463,19 @@ s32 func_versus_800BE564(void) { } if (sUnlockLandmaster && (D_80178780[i] == 0) && (gControllerPress[i].button & B_BUTTON)) { - AUDIO_PLAY_SFX(0x49000003, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_DECIDE, 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(0x49000003, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); D_80178780[i] = 3; } if ((D_80178780[i] == 0) && (gControllerPress[i].button & A_BUTTON)) { - AUDIO_PLAY_SFX(0x49000003, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); D_80178780[i] = 1; } @@ -598,10 +598,10 @@ s32 func_versus_800BEF00(void) { if (D_80178794 == 0) { D_80178790--; if (D_80178790 != 0) { - AUDIO_PLAY_SFX(0x49000008, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_READY, gDefaultSfxSource, 4); ret = 0; } else { - AUDIO_PLAY_SFX(0x49000009, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_GO, gDefaultSfxSource, 4); ret = 1; } D_80178794 = 30; @@ -1131,7 +1131,7 @@ s32 func_versus_800C07C4(void) { } // clang-format off - if (ret != 0) { AUDIO_PLAY_SFX(0x49000002, gDefaultSfxSource, 4); } + if (ret != 0) { AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); } // clang-format on return ret; @@ -1257,7 +1257,7 @@ bool func_versus_800C0D10(void) { if (cont == 4) { D_800D4A90 = 2; } else { - AUDIO_PLAY_SFX(0x49004007, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_COUNT_UP, gDefaultSfxSource, 4); } break; @@ -1308,7 +1308,7 @@ s32 func_versus_800C0E78(void) { bool func_versus_800C107C(s32 playerNum) { D_80178798++; if (D_80178798 == 10) { - AUDIO_PLAY_SFX(0x49004007, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_COUNT_UP, gDefaultSfxSource, 4); D_801787B8++; D_80178798 = 0; } diff --git a/src/mods/sfxjukebox.c b/src/mods/sfxjukebox.c index 4f2f5773..ad894ec3 100644 --- a/src/mods/sfxjukebox.c +++ b/src/mods/sfxjukebox.c @@ -79,7 +79,7 @@ void Option_ExpertSoundUpdate(void) { sfx |= sfxId & 0xFF; if (prevSfx != sfx) { - AUDIO_PLAY_SFX(0x49000002, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); prevSfx = sfx; } @@ -100,7 +100,7 @@ void Option_ExpertSoundUpdate(void) { D_menu_801B912C = 0; D_menu_801B9244 = 1; } else { - AUDIO_PLAY_SFX(0x4900101D, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_CANCEL, gDefaultSfxSource, 4); Audio_KillSfxBySource(gDefaultSfxSource); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); diff --git a/src/mods/sfxjukebox2.c b/src/mods/sfxjukebox2.c index 4324e7c6..75840b07 100644 --- a/src/mods/sfxjukebox2.c +++ b/src/mods/sfxjukebox2.c @@ -158,7 +158,7 @@ void Jukebox_Update(void) { } if (prevSfx != sfx) { - AUDIO_PLAY_SFX(0x49000002, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); prevSfx = sfx; } @@ -171,7 +171,7 @@ void Jukebox_Update(void) { if (contPress->button & B_BUTTON) { if (!D_menu_801B9320) { - AUDIO_PLAY_SFX(0x49000021, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_CANCEL, gDefaultSfxSource, 4); AUDIO_PLAY_BGM(SEQ_ID_MENU); gDrawMode = DRAW_NONE; D_menu_801B9124 = 1000; @@ -179,7 +179,7 @@ void Jukebox_Update(void) { D_menu_801B9244 = 1; return; } else { - AUDIO_PLAY_SFX(0x4900101D, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_CANCEL, gDefaultSfxSource, 4); Audio_KillSfxBySource(sfxSource); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); diff --git a/src/overlays/ovl_ending/fox_end1.c b/src/overlays/ovl_ending/fox_end1.c index f0c4ccce..c3d43b09 100644 --- a/src/overlays/ovl_ending/fox_end1.c +++ b/src/overlays/ovl_ending/fox_end1.c @@ -406,12 +406,12 @@ void Ending_8018845C(void); s32 Ending_80188634(void) { if (gCallTimer != 0) { if ((D_ending_80196F90 % 14) == 0) { - AUDIO_PLAY_SFX(0x49002018, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_COMMU_REQUEST, gDefaultSfxSource, 4); } D_ending_80196F90++; gCallTimer--; if (gCallTimer == 0) { - Audio_KillSfxById(0x49002018); + Audio_KillSfxById(NA_SE_COMMU_REQUEST); } } else { D_ending_80196F90 = 0; @@ -602,7 +602,7 @@ void Ending_80189108(void) { D_ending_80196D08[4].unk_34 = 0; D_ending_80196D08[4].unk_38 = 1; gCsFrameCount = 0; - Audio_KillSfxById(0x49002018); + Audio_KillSfxById(NA_SE_COMMU_REQUEST); D_ending_80196F90 = 0; gCallTimer = 0; } diff --git a/src/overlays/ovl_ending/fox_end2.c b/src/overlays/ovl_ending/fox_end2.c index 963ab123..15b0f9f6 100644 --- a/src/overlays/ovl_ending/fox_end2.c +++ b/src/overlays/ovl_ending/fox_end2.c @@ -745,7 +745,7 @@ void Ending_80190CF0(u32 arg0, AssetInfo* asset) { } if (arg0 == asset->unk_0C) { - AUDIO_PLAY_SFX(0x1940306E, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_VO_ANDORF_LAUGH, gDefaultSfxSource, 4); } RCP_SetupDL(&gMasterDisp, asset->unk_08); diff --git a/src/overlays/ovl_i1/fox_co.c b/src/overlays/ovl_i1/fox_co.c index a8b9e79e..a530e5e3 100644 --- a/src/overlays/ovl_i1/fox_co.c +++ b/src/overlays/ovl_i1/fox_co.c @@ -117,12 +117,12 @@ void Corneria_Boss292_Init(Boss292* this) { void Corneria_8018798C(Boss* boss, f32 arg1, f32 arg2, f32 arg3, f32 arg4) { func_effect_8007BFFC(arg1, arg2, arg3, 0.0f, 0.0f, 0.0f, arg4, 30); - func_effect_8007A6F0(&boss->obj.pos, 0x29034003); + func_effect_8007A6F0(&boss->obj.pos, NA_SE_OB_DAMAGE_M); } void Corneria_801879F0(Boss* boss, f32 arg1, f32 arg2, f32 arg3, f32 arg4) { func_effect_8007D1E0(arg1, arg2, arg3, arg4); - func_effect_8007A6F0(&boss->obj.pos, 0x29034003); + func_effect_8007A6F0(&boss->obj.pos, NA_SE_OB_DAMAGE_M); } void Corneria_80187A38(Boss* boss, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5) { @@ -151,16 +151,16 @@ void Corneria_80187AC8(Boss* boss) { boss->swork[29] -= boss->damage; Corneria_80187A38(boss, D_i1_8019B6D8[62], D_i1_8019B6D8[63], D_i1_8019B6D8[64], 0.2f, 20); if (boss->swork[29] < 30) { - func_effect_8007A6F0(&boss->obj.pos, 0x2943500F); + func_effect_8007A6F0(&boss->obj.pos, NA_SE_EN_KNOCK_DOWN); } else { - func_effect_8007A6F0(&boss->obj.pos, 0x29034003); + func_effect_8007A6F0(&boss->obj.pos, NA_SE_OB_DAMAGE_M); } Radio_PlayMessage(gMsg_ID_2270, RCID_BOSS_CORNERIA); if (boss->swork[29] <= 0) { boss->swork[10] = 1000; boss->info.hitbox[1 + 0] = 100000.0f; Corneria_8018798C(boss, D_i1_8019B6D8[62], D_i1_8019B6D8[63], D_i1_8019B6D8[64], 10.0f); - AUDIO_PLAY_SFX(0x2940D09A, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, boss->sfxSource, 4); gScreenFlashTimer = 8; if (fabsf(boss->obj.rot.x) < 20.0f) { boss->swork[32] = 1; @@ -229,7 +229,7 @@ void Corneria_80187AC8(Boss* boss) { Corneria_8018798C(boss, D_i1_8019B6D8[0], D_i1_8019B6D8[1], D_i1_8019B6D8[2], 7.0f); } } else if ((boss->dmgPart == 4) || (boss->dmgPart == 5)) { - AUDIO_PLAY_SFX(0x2903300E, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, boss->sfxSource, 4); boss->swork[23] = 200; if (boss->dmgPart == 4) { boss->swork[24] -= boss->damage; @@ -300,7 +300,7 @@ void Corneria_80187AC8(Boss* boss) { } } } else { - func_effect_8007A6F0(&boss->obj.pos, 0x29121007); + func_effect_8007A6F0(&boss->obj.pos, NA_SE_EN_REFLECT); } } @@ -454,7 +454,7 @@ void Corneria_80188C7C(Boss* boss) { if (boss->unk_044 == 0) { boss->unk_044++; boss->fwork[12] *= -0.2f; - AUDIO_PLAY_SFX(0x19030004, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_METAL_BOUND_L, boss->sfxSource, 4); func_enmy_80062B60(D_i1_8019B6D8[56], D_i1_8019B6D8[58], 0, 30.0f); boss->swork[18] = 13; boss->swork[19] = 15; @@ -486,7 +486,7 @@ void Corneria_80188D50(Boss* boss) { (fabsf(boss->obj.pos.z - gPlayer[0].trueZpos) < 200.0f) && (gPlayer[0].aerobaticPitch > 180.0f)) { boss->swork[36]++; D_i1_801997E0 = 20; - AUDIO_PLAY_SFX(0x49008025, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_RING_PASS, gDefaultSfxSource, 4); if ((gTeamShields[TEAM_ID_FALCO] > 0) || (gTeamShields[TEAM_ID_SLIPPY] > 0) || (gTeamShields[TEAM_ID_PEPPY] > 0)) { do { @@ -937,7 +937,7 @@ void Corneria_80189058(Boss* boss) { boss->swork[31] = 0; } if ((boss->state != 0) && ((boss->unk_04C == 0) || (boss->unk_04C == 52))) { - AUDIO_PLAY_SFX(0x29022019, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_HEAVY_WALK, boss->sfxSource, 4); } if (gPlayer[0].somersault && (boss->state != 0)) { boss->state = 0; @@ -1130,7 +1130,7 @@ void Corneria_8018ACE0(Actor* actor) { if (actor->dmgType != DMG_NONE) { actor->dmgType = DMG_NONE; if (actor->dmgPart == 0) { - AUDIO_PLAY_SFX(0x29034003, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, actor->sfxSource, 4); func_effect_8007C120(actor->obj.pos.x, actor->obj.pos.y + 200.0f, actor->obj.pos.z, actor->vel.x, actor->vel.y, actor->vel.z, 0.1f, 20); actor->timer_0C6 = 15; @@ -1274,7 +1274,7 @@ void Corneria_8018B15C(Actor* actor) { scenery->vel.x = sp48.x; scenery->vel.y = sp48.y; scenery->vel.z = sp48.z; - AUDIO_PLAY_SFX(0x2902401C, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_THROW, actor->sfxSource, 4); } break; } @@ -1353,7 +1353,7 @@ void Corneria_8018B58C(Actor* actor) { actor->obj.pos.z + 50.0f + RAND_FLOAT(50.0f), 3.0f); func_effect_8007C120(actor->obj.pos.x, actor->obj.pos.y + 200.0f, actor->obj.pos.z, actor->vel.x, actor->vel.y, actor->vel.z, 0.1f, 10); - AUDIO_PLAY_SFX(0x2903A008, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_S, actor->sfxSource, 4); } if (actor->timer_0BC == 0) { @@ -1379,7 +1379,7 @@ void Corneria_8018B58C(Actor* actor) { if (actor->timer_0BC == 8) { func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y + 200.0f, actor->obj.pos.z + 50.0f, 0.0f, 0.0f, 0.0f, 5.0f, 30); - AUDIO_PLAY_SFX(0x2903B009, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, actor->sfxSource, 4); } break; case 101: @@ -1486,7 +1486,7 @@ void Corneria_Boss293_Init(Boss293* this) { if (fabsf(gPlayer[0].xPath) < 1.0f) { this->timer_05A = 30000; this->obj.pos.z = (gPlayer[0].cam.eye.z - gPathProgress) - 2000.0f; - AUDIO_PLAY_SFX(0x31038018, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_A_CARRIER_ENGINE, this->sfxSource, 4); D_i1_8019B6D0 = 0; } else { D_i1_8019B6D0 = 1; @@ -1495,7 +1495,7 @@ void Corneria_Boss293_Init(Boss293* this) { this->obj.pos.z = gPlayer[0].trueZpos + 2000.0f; this->fwork[7] = this->obj.pos.x; this->fwork[5] = 30.0f; - AUDIO_PLAY_SFX(0x31038018, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_A_CARRIER_ENGINE, this->sfxSource, 4); this->swork[10] = 3; this->swork[8] = 3; } @@ -1640,13 +1640,13 @@ void Corneria_8018C19C(Boss* boss) { boss->health -= boss->damage; if (boss->health < 120) { boss->fwork[17] = 2.8f; - AUDIO_PLAY_SFX(0x2943500F, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_KNOCK_DOWN, boss->sfxSource, 4); } else { - AUDIO_PLAY_SFX(0x29034003, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, boss->sfxSource, 4); } } } else { - AUDIO_PLAY_SFX(0x29121007, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, boss->sfxSource, 4); } } boss->vel.z = boss->fwork[18]; @@ -1763,7 +1763,7 @@ void Corneria_8018C19C(Boss* boss) { boss->state = boss->swork[0]; boss->timer_050 = 60; boss->fwork[8] = 0.0f; - AUDIO_PLAY_SFX(0x2940201A, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_HATCH, boss->sfxSource, 4); } break; case 4: @@ -1775,7 +1775,7 @@ void Corneria_8018C19C(Boss* boss) { boss->timer_050 = 20; boss->fwork[8] = 0.0f; if (gBosses[1].state == 0) { - AUDIO_PLAY_SFX(0x2940201A, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_HATCH, boss->sfxSource, 4); } if ((boss->swork[5] == 0) && ((gBosses[2].state == 0) || (gBosses[3].state == 0))) { Radio_PlayMessage(gMsg_ID_2292, RCID_BOSS_CORNERIA2); @@ -1793,13 +1793,13 @@ void Corneria_8018C19C(Boss* boss) { boss->fwork[13] = 20.0f; if ((boss->fwork[0] > 60.0f) && (gBosses[2].state == 0) && (boss->swork[1] == 0)) { Corneria_8018BDD4(boss, sp84[1].x, sp84[1].y + 50.0f, sp84[1].z, 45.0f, 0, 0); - AUDIO_PLAY_SFX(0x2903201B, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_BARREL_SHOT, boss->sfxSource, 4); Corneria_8018BDD4(boss, sp84[1].x, sp84[1].y - 50.0f, sp84[1].z, 40.0f, 0, 0); boss->swork[1] = 1; } if ((boss->fwork[1] > 60.0f) && (gBosses[3].state == 0) && (boss->swork[2] == 0)) { Corneria_8018BDD4(boss, sp84[2].x, sp84[2].y + 50.0f, sp84[2].z, 35.0f, 0, 0); - AUDIO_PLAY_SFX(0x2903201B, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_BARREL_SHOT, boss->sfxSource, 4); Corneria_8018BDD4(boss, sp84[2].x, sp84[2].y - 50.0f, sp84[2].z, 30.0f, 0, 0); boss->swork[2] = 1; } @@ -1821,7 +1821,7 @@ void Corneria_8018C19C(Boss* boss) { boss->swork[4]++; boss->swork[4] &= 3; if ((gBosses[3].state == 0) && (gBosses[2].state == 0)) { - AUDIO_PLAY_SFX(0x2940201A, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_HATCH, boss->sfxSource, 4); } } break; @@ -1847,7 +1847,7 @@ void Corneria_8018C19C(Boss* boss) { boss->fwork[8] = 0.0f; if ((boss->swork[3] != 1) || (boss->swork[3] != 3)) { - Audio_KillSfxBySourceAndId(boss->sfxSource, 0x31034025); + Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_ZOBOSS_BEAM); boss->swork[9] = 0; } } @@ -1857,7 +1857,7 @@ void Corneria_8018C19C(Boss* boss) { if ((boss->obj.rot.y < 20.0f) && (boss->obj.rot.y > -20.0f)) { if (boss->swork[9] == 0) { boss->swork[9]++; - AUDIO_PLAY_SFX(0x31034025, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ZOBOSS_BEAM, boss->sfxSource, 4); if (boss->swork[6] == 0) { Radio_PlayMessage(gMsg_ID_2293, RCID_BOSS_CORNERIA2); } @@ -1895,10 +1895,10 @@ void Corneria_8018C19C(Boss* boss) { } if (boss->health < 2) { gTeamLowHealthMsgTimer = -1; - Audio_KillSfxBySourceAndId(boss->sfxSource, 0x31034025); + Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_ZOBOSS_BEAM); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 40); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 40); - AUDIO_PLAY_SFX(0x2940D09A, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, boss->sfxSource, 4); gScreenFlashTimer = 8; gShowBossHealth = false; Radio_PlayMessage(gMsg_ID_2294, RCID_BOSS_CORNERIA2); @@ -2029,7 +2029,7 @@ void Corneria_8018C19C(Boss* boss) { boss->fwork[16] = 4.0f; if ((boss->swork[10] == 0) && (boss->state < 6)) { boss->fwork[17] = 1.8f; - AUDIO_PLAY_SFX(0x11020084, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EXPLOSION_DEMO6, boss->sfxSource, 4); boss->timer_058 = 71; boss->state = 6; boss->fwork[12] = 0.0f; @@ -2067,7 +2067,7 @@ void Corneria_8018DDAC(Boss* boss) { if (boss->health != 0) { boss->timer_05C = 15; boss->health -= boss->damage; - AUDIO_PLAY_SFX(0x29034003, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, boss->sfxSource, 4); if (boss->health <= 0) { gBosses[0].swork[8]--; if (gBosses[0].swork[8] != 0) { @@ -2078,7 +2078,7 @@ void Corneria_8018DDAC(Boss* boss) { boss->info.cullDistance = 300.0f; gBosses[0].fwork[14] = 25.0f; gBosses[0].fwork[15] = 0.0f; - AUDIO_PLAY_SFX(0x2940C027, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_PARTS_BROKEN, boss->sfxSource, 4); if (gBosses[0].swork[10] != 0) { gBosses[0].swork[10]--; } @@ -2098,7 +2098,7 @@ void Corneria_8018DDAC(Boss* boss) { } } } else { - AUDIO_PLAY_SFX(0x29121007, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, boss->sfxSource, 4); } } boss->obj.rot.x = gBosses[0].obj.rot.x; @@ -2133,7 +2133,7 @@ void Corneria_8018DDAC(Boss* boss) { boss->swork[0] = 1; boss->gravity = 0.0f; Corneria_8018C0B0(boss); - AUDIO_PLAY_SFX(0x19000014, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_WATER_BOUND_M, boss->sfxSource, 4); } } else { boss->obj.rot.z -= 2.0f; @@ -2160,7 +2160,7 @@ void Corneria_8018E290(Boss* boss) { if (boss->health != 0) { boss->timer_05C = 15; boss->health -= boss->damage; - AUDIO_PLAY_SFX(0x29034003, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, boss->sfxSource, 4); if (boss->health <= 0) { gBosses[0].swork[8]--; if (gBosses[0].swork[8] != 0) { @@ -2172,7 +2172,7 @@ void Corneria_8018E290(Boss* boss) { gBosses[0].fwork[15] = 0.0f; gBosses[0].fwork[14] = 335.0f; boss->health = 0; - AUDIO_PLAY_SFX(0x2940C027, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_PARTS_BROKEN, boss->sfxSource, 4); if (gBosses[0].swork[10] != 0) { gBosses[0].swork[10]--; } @@ -2190,7 +2190,7 @@ void Corneria_8018E290(Boss* boss) { } } } else { - AUDIO_PLAY_SFX(0x29121007, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, boss->sfxSource, 4); } } boss->obj.rot.x = gBosses[0].obj.rot.x; @@ -2225,7 +2225,7 @@ void Corneria_8018E290(Boss* boss) { boss->swork[0] = 1; boss->gravity = 0.0f; Corneria_8018C0B0(boss); - AUDIO_PLAY_SFX(0x19000014, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_WATER_BOUND_M, boss->sfxSource, 4); } } else { boss->obj.rot.z -= 2.0f; @@ -2252,7 +2252,7 @@ void Corneria_8018E76C(Boss* boss) { if (boss->health != 0) { boss->timer_05C = 15; boss->health -= boss->damage; - AUDIO_PLAY_SFX(0x29034003, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, boss->sfxSource, 4); if (boss->health <= 0) { gBosses[0].swork[8]--; if (gBosses[0].swork[8] != 0) { @@ -2264,7 +2264,7 @@ void Corneria_8018E76C(Boss* boss) { gBosses[0].fwork[15] = 0.0f; gBosses[0].fwork[14] = 335.0f; boss->health = 0; - AUDIO_PLAY_SFX(0x2940C027, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_PARTS_BROKEN, boss->sfxSource, 4); if (gBosses[0].swork[10] != 0) { gBosses[0].swork[10]--; } @@ -2285,7 +2285,7 @@ void Corneria_8018E76C(Boss* boss) { } } } else { - AUDIO_PLAY_SFX(0x29121007, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, boss->sfxSource, 4); } } boss->obj.rot.x = gBosses[0].obj.rot.x; @@ -2317,7 +2317,7 @@ void Corneria_8018E76C(Boss* boss) { boss->swork[0] = 1; boss->gravity = 0.0f; Corneria_8018C0B0(boss); - AUDIO_PLAY_SFX(0x19000014, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_WATER_BOUND_M, boss->sfxSource, 4); } } else { boss->obj.rot.z -= 2.0f; @@ -2411,9 +2411,9 @@ void Corneria_8018F044(Scenery* scenery) { if (scenery->unk_44 >= 3) { scenery->state = 1; scenery->info.hitbox = SEGMENTED_TO_VIRTUAL(&D_CO_603E924); - AUDIO_PLAY_SFX(0x1900000D, scenery->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_GATE_OPEN, scenery->sfxSource, 0); } else { - AUDIO_PLAY_SFX(0x2903300E, scenery->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, scenery->sfxSource, 0); } } } @@ -2548,7 +2548,7 @@ void Corneria_8018F6F8(Actor* actor, s32 arg1) { actor->unk_0C9 = 1; actor->iwork[11] = 1; actor->info.cullDistance = 200.0f; - AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } void Corneria_LevelStart(Player* player) { @@ -2695,10 +2695,10 @@ void Corneria_LevelStart(Player* player) { Radio_PlayMessage(gMsg_ID_2005, RCID_FOX); } if (player->csTimer == 180) { - AUDIO_PLAY_SFX(0x09000007, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_WING_OPEN, player->sfxSource, 0); } if (player->csTimer == 120) { - AUDIO_PLAY_SFX(0x09000013, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_WING_OPEN_END, player->sfxSource, 0); } if ((player->csTimer < 190) && (player->csTimer > 150)) { Math_SmoothStepToF(&player->wings.unk_24, 2.0f, 0.2f, 0.5f, 0.0f); @@ -2887,19 +2887,19 @@ void Corneria_LevelStart(Player* player) { } if (player->csTimer == 70) { actor0->state = 1; - func_play_800A6028(player->sfxSource, 0x09000002); + func_play_800A6028(player->sfxSource, NA_SE_ARWING_BOOST); } if (player->csTimer == 50) { actor1->state = 2; - func_play_800A6028(player->sfxSource, 0x09000002); + func_play_800A6028(player->sfxSource, NA_SE_ARWING_BOOST); } if (player->csTimer == 30) { actor2->state = 3; - func_play_800A6028(player->sfxSource, 0x09000002); + func_play_800A6028(player->sfxSource, NA_SE_ARWING_BOOST); } if (player->csTimer == 0) { player->csState = 9; - func_play_800A6028(player->sfxSource, 0x09000002); + func_play_800A6028(player->sfxSource, NA_SE_ARWING_BOOST); player->csTimer = 3; player->unk_194 = 5.0f; player->unk_190 = 5.0f; @@ -3013,7 +3013,7 @@ void Corneria_80190F74(Actor* actor, s32 arg1) { actor->obj.rot.z = D_i1_80199B2C[arg1]; Object_SetInfo(&actor->info, actor->obj.id); actor->iwork[11] = 1; - AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } void Corneria_LevelComplete1(Player* player) { @@ -3141,7 +3141,7 @@ void Corneria_LevelComplete1(Player* player) { if (gCsFrameCount == 1270) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); - AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, player->sfxSource, 0); player->csState++; player->baseSpeed = 2.0f; player->unk_194 = 5.0f; @@ -3228,7 +3228,7 @@ void Corneria_LevelComplete1(Player* player) { gActors[0].state = 1; gActors[0].fwork[9] = 2.0f; gActors[0].timer_0BC = 50; - AUDIO_PLAY_SFX(0x09000002, gActors[0].sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, gActors[0].sfxSource, 0); gActors[0].fwork[29] = 5.0f; } break; @@ -3237,7 +3237,7 @@ void Corneria_LevelComplete1(Player* player) { gActors[1].state = 1; gActors[1].fwork[9] = 2.0f; gActors[1].timer_0BC = 50; - AUDIO_PLAY_SFX(0x09000002, gActors[1].sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, gActors[1].sfxSource, 0); gActors[1].fwork[29] = 5.0f; } break; @@ -3246,7 +3246,7 @@ void Corneria_LevelComplete1(Player* player) { gActors[2].state = 1; gActors[2].fwork[9] = 2.0f; gActors[2].timer_0BC = 50; - AUDIO_PLAY_SFX(0x09000002, gActors[2].sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, gActors[2].sfxSource, 0); gActors[2].fwork[29] = 5.0f; } break; diff --git a/src/overlays/ovl_i1/fox_tr.c b/src/overlays/ovl_i1/fox_tr.c index a7973567..cdd0a41f 100644 --- a/src/overlays/ovl_i1/fox_tr.c +++ b/src/overlays/ovl_i1/fox_tr.c @@ -31,7 +31,7 @@ void Training_ItemRing_Update(ItemTrainingRing* this) { if (this->obj.pos.z > (gPlayer[0].trueZpos + var_fv0)) { this->unk_44 = 1; PRINTF("♪:リング未通過音\n"); // Ring not passed sound - AUDIO_PLAY_SFX(0x4900402F, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_RING_MISS, gDefaultSfxSource, 4); gRingPassCount = 0; } } @@ -40,7 +40,7 @@ void Training_ItemRing_Update(ItemTrainingRing* this) { this->timer_48 = 50; this->info.cullDistance = 10000.0f; PRINTF("♪:リング通過音\n"); // Ring passing sound - AUDIO_PLAY_SFX(0x49008025, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_RING_PASS, gDefaultSfxSource, 4); gRingPassCount++; if ((this->obj.rot.x != 0.0f) && (gRingPassCount >= 100)) { Radio_PlayMessage(gMsg_ID_20330, RCID_ROB64); diff --git a/src/overlays/ovl_i1/fox_tr360.c b/src/overlays/ovl_i1/fox_tr360.c index b9cabfc7..75df3f1b 100644 --- a/src/overlays/ovl_i1/fox_tr360.c +++ b/src/overlays/ovl_i1/fox_tr360.c @@ -204,7 +204,7 @@ void Training_8019949C(void) { actor->unk_0C9 = actor->iwork[11] = 1; actor->timer_0C2 = 30; Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); if ((i + 10) == 10) { actor->aiIndex = AI360_FOX; actor->health = 50; diff --git a/src/overlays/ovl_i1/fox_ve1.c b/src/overlays/ovl_i1/fox_ve1.c index b6c926e5..39b4b76f 100644 --- a/src/overlays/ovl_i1/fox_ve1.c +++ b/src/overlays/ovl_i1/fox_ve1.c @@ -341,7 +341,7 @@ void Venom1_80192518(Actor* actor) { if (actor->dmgType == DMG_BEAM) { actor->dmgType = DMG_NONE; - func_effect_8007A6F0(&actor->obj.pos, 0x29121007); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_REFLECT); } if ((actor->state == 1) || (actor->state == 2) || (actor->state == 3)) { @@ -393,7 +393,7 @@ void Venom1_80192518(Actor* actor) { } actor->timer_0BC = actor->iwork[2]; - AUDIO_PLAY_SFX(0x1903205B, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_POLE_MOVE, actor->sfxSource, 0); actor->state = 2; case 2: @@ -623,7 +623,7 @@ void Venom1_80192CB0(Actor* actor) { void Venom1_80192CD4(Actor* actor) { if (actor->dmgType == DMG_BEAM) { actor->dmgType = DMG_NONE; - func_effect_8007A6F0(&actor->obj.pos, 0x29121007); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_REFLECT); } if (actor->iwork[1] > 0) { @@ -651,7 +651,7 @@ void Venom1_80192CD4(Actor* actor) { Venom1_80192AA4(actor); actor->iwork[1] = 5; actor->obj.rot.x = 90.0f; - AUDIO_PLAY_SFX(0x1903205C, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_POLE_BOUND, actor->sfxSource, 0); actor->state++; } break; @@ -705,7 +705,7 @@ void Venom1_80192EB0(Actor* actor) { actor->fwork[1] = 1237.0f - (var_ft4 - actor->obj.pos.y); actor->obj.pos.y = var_ft4 + 1.0f; actor->timer_0BC = actor->iwork[1]; - AUDIO_PLAY_SFX(0x1903205B, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_POLE_MOVE, actor->sfxSource, 0); actor->state = 2; case 2: @@ -765,7 +765,7 @@ void Venom1_80192EB0(Actor* actor) { } if (actor->dmgType == DMG_BEAM) { actor->dmgType = DMG_NONE; - func_effect_8007A6F0(&actor->obj.pos, 0x29121007); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_REFLECT); } actor->iwork[0]++; } @@ -780,11 +780,11 @@ void Venom1_801933DC(Actor* actor) { if (actor->dmgType == DMG_BEAM) { actor->dmgType = DMG_NONE; - AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 0); } if ((actor->unk_0B6 == 38) || (actor->unk_0B6 == 58)) { - AUDIO_PLAY_SFX(0x1903005A, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_ARM_SWING, actor->sfxSource, 0); } Animation_GetFrameData(&D_VE1_900D098, actor->unk_0B6, actor->vwork); @@ -1262,8 +1262,8 @@ void Venom1_80194398(Boss* boss) { D_i1_8019B838[is4].unk_02[0] = 16; D_i1_8019B838[is4].unk_02[1] = D_i1_8019A820[spF4].unk_0C; D_i1_8019B838[is4].unk_7C |= 4; - AUDIO_PLAY_SFX(0x2903A008, boss->sfxSource, 4); - AUDIO_PLAY_SFX(0x19030059, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_S, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_BMBOSS_BROKEN, boss->sfxSource, 4); } is4 = D_i1_8019A820[spF4].unk_0A; if (is4 != -1) { @@ -1549,28 +1549,28 @@ void Venom1_80194398(Boss* boss) { D_i1_8019B838[is4].unk_02[2] = 15; if (D_i1_8019B838[is4].unk_00 <= 0) { - AUDIO_PLAY_SFX(0x2903A008, boss->sfxSource, 4); - AUDIO_PLAY_SFX(0x19030059, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_S, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_BMBOSS_BROKEN, boss->sfxSource, 4); D_i1_8019B838[is4].unk_00 = -1; D_i1_8019B838[is4].unk_02[0] = 16; D_i1_8019B838[is4].unk_02[1] = 0; D_i1_8019B838[is4].unk_7C |= 0xC; } else { - AUDIO_PLAY_SFX(0x2903300E, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, boss->sfxSource, 4); if (is4 == 14) { D_i1_8019B838[is4].unk_7C |= 8; } } } else { - AUDIO_PLAY_SFX(0x29121007, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, boss->sfxSource, 4); } } else { - AUDIO_PLAY_SFX(0x29121007, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, boss->sfxSource, 4); } break; case 2: if (D_i1_8019A500[boss->dmgPart] == 15) { - AUDIO_PLAY_SFX(0x31034064, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_BMBOSS_DAMAGE, boss->sfxSource, 4); D_i1_8019B838[15].unk_02[2] = 10; D_i1_8019B838[15].unk_02[3] = 0; D_i1_8019B838[15].unk_7C |= 0x80; @@ -1582,12 +1582,12 @@ void Venom1_80194398(Boss* boss) { gScreenFlashTimer = 8; gTeamLowHealthMsgTimer = -1; D_ctx_8017828C = 1; - AUDIO_PLAY_SFX(0x2940D09A, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, boss->sfxSource, 4); boss->health = 0; } } } else { - AUDIO_PLAY_SFX(0x29121007, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, boss->sfxSource, 4); } break; } @@ -1605,8 +1605,8 @@ void Venom1_80194398(Boss* boss) { D_i1_8019B838[is4].unk_02[0] = 16; D_i1_8019B838[is4].unk_02[1] = 0; D_i1_8019B838[is4].unk_7C |= 0xC; - AUDIO_PLAY_SFX(0x2903A008, boss->sfxSource, 4); - AUDIO_PLAY_SFX(0x19030059, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_S, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_BMBOSS_BROKEN, boss->sfxSource, 4); } else if (is4 == 14) { D_i1_8019B838[is4].unk_7C |= 8; } @@ -1619,7 +1619,7 @@ void Venom1_80194398(Boss* boss) { if (((gGameFrameCount % 4) == 0) && (boss->timer_05A == 0)) { for (spF4 = 0; spF4 < 33U; spF4++) { if ((D_i1_8019A500[spF4] == 15) && (D_i1_8019B7F0[spF4] != 0)) { - AUDIO_PLAY_SFX(0x31034064, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_BMBOSS_DAMAGE, boss->sfxSource, 4); D_i1_8019B838[15].unk_02[3] = 10; D_i1_8019B838[15].unk_02[4] = 0; D_i1_8019B838[15].unk_7C |= 0x80; @@ -1630,7 +1630,7 @@ void Venom1_80194398(Boss* boss) { gScreenFlashTimer = 8; gTeamLowHealthMsgTimer = -1; D_ctx_8017828C = 1; - AUDIO_PLAY_SFX(0x2940D09A, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, boss->sfxSource, 4); boss->health = 0; } } @@ -1721,7 +1721,7 @@ void Venom1_80194398(Boss* boss) { boss->swork[10] = 16; gCameraShake = 40; boss->swork[23] = RAND_FLOAT(5.0f); - AUDIO_PLAY_SFX(0x29034082, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_BMBOSS_LAND, boss->sfxSource, 4); spB8 = 3; boss->swork[28] = 5; } @@ -1787,13 +1787,13 @@ void Venom1_80194398(Boss* boss) { switch (boss->swork[27]) { case 0: if (boss->fwork[10] > 14.0f) { - AUDIO_PLAY_SFX(0x29032080, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_BMBOSS_WALK, boss->sfxSource, 4); boss->swork[27]++; } break; case 1: if (boss->fwork[10] > 45.0f) { - AUDIO_PLAY_SFX(0x29032080, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_BMBOSS_WALK, boss->sfxSource, 4); boss->swork[27]++; } break; @@ -1832,7 +1832,7 @@ void Venom1_80194398(Boss* boss) { case 122: gCameraShake = 20; boss->swork[28] = 7; - AUDIO_PLAY_SFX(0x29405084, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_BMBOSS_BOUND, boss->sfxSource, 4); D_i1_8019B838[2].unk_60 = 5.0f; D_i1_8019B838[2].unk_7C |= 0x800; D_i1_8019B838[5].unk_7C |= 0x800; @@ -1848,7 +1848,7 @@ void Venom1_80194398(Boss* boss) { case 118: gCameraShake = 30; boss->swork[28] = 7; - AUDIO_PLAY_SFX(0x29405084, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_BMBOSS_BOUND, boss->sfxSource, 4); D_i1_8019B838[8].unk_7C |= 0x800; D_i1_8019B838[8].unk_60 = 10.0f; break; @@ -1857,11 +1857,11 @@ void Venom1_80194398(Boss* boss) { break; case 91: boss->swork[28] = 7; - AUDIO_PLAY_SFX(0x29405084, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_BMBOSS_BOUND, boss->sfxSource, 4); break; case 78: boss->swork[28] = 7; - AUDIO_PLAY_SFX(0x29405084, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_BMBOSS_BOUND, boss->sfxSource, 4); gCameraShake = 20; D_i1_8019B838[10].unk_7C |= 0x800; D_i1_8019B838[10].unk_60 = 10.0f; @@ -1871,7 +1871,7 @@ void Venom1_80194398(Boss* boss) { break; case 66: boss->swork[28] = 7; - AUDIO_PLAY_SFX(0x29405084, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_BMBOSS_BOUND, boss->sfxSource, 4); D_i1_8019B838[11].unk_7C |= 0x20; break; case 65: @@ -1913,7 +1913,7 @@ void Venom1_80194398(Boss* boss) { Boss_AwardBonus(boss); gShowBossHealth = 0; boss->swork[28] = 9; - AUDIO_PLAY_SFX(0x29405084, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_BMBOSS_BOUND, boss->sfxSource, 4); boss->swork[26] = 1; boss->info.hitbox = gNoHitbox; boss->unk_05E = 0; @@ -1938,7 +1938,7 @@ void Venom1_80194398(Boss* boss) { boss->swork[11] |= 1; break; case 1: - AUDIO_PLAY_SFX(0x31030083, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_BMBOSS_ATTACK, boss->sfxSource, 4); gCameraShake = 40; boss->swork[28] = 5; spB8 = spB4 = 1; @@ -1956,7 +1956,7 @@ void Venom1_80194398(Boss* boss) { break; case 1: spB4 = 1; - AUDIO_PLAY_SFX(0x31030083, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_BMBOSS_ATTACK, boss->sfxSource, 4); gCameraShake = 40; boss->swork[28] = 5; spB8 = 2; @@ -2149,7 +2149,7 @@ void Venom1_80194398(Boss* boss) { } break; case 4: - AUDIO_PLAY_SFX(0x29033081, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_BMBOSS_JUMP, boss->sfxSource, 4); boss->swork[7] = 1; boss->fwork[10] = 0; boss->gravity = 0; diff --git a/src/overlays/ovl_i2/fox_me.c b/src/overlays/ovl_i2/fox_me.c index ac907a3b..de223a4e 100644 --- a/src/overlays/ovl_i2/fox_me.c +++ b/src/overlays/ovl_i2/fox_me.c @@ -46,7 +46,7 @@ Vec3f D_i2_80195610[] = { void Meteo_80187530(Actor* actor) { if (actor->dmgType == DMG_BEAM) { actor->dmgType = DMG_NONE; - func_effect_8007A6F0(&actor->obj.pos, 0x2902107D); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_ROCK_REFLECT); } } @@ -96,7 +96,7 @@ void Meteo_80187650(Actor* actor) { } if (actor->dmgType != DMG_NONE) { - func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f); Object_Kill(&actor->obj, actor->sfxSource); } @@ -134,7 +134,7 @@ void Meteo_801877C4(Actor* actor) { if (actor->dmgType != DMG_NONE) { Actor_Despawn(actor); - func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); Object_Kill(&actor->obj, actor->sfxSource); func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z, 5.0f); func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, 3.0f, 10); @@ -157,7 +157,7 @@ void Meteo_8018795C(Actor* actor) { if (actor->dmgType != DMG_NONE) { Actor_Despawn(actor); - func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); Object_Kill(&actor->obj, actor->sfxSource); func_effect_8007D0E0(actor->obj.pos.x - actor->vel.x, actor->obj.pos.y, actor->obj.pos.z - actor->vel.z, 8.0f); func_effect_8007BFFC(actor->obj.pos.x - actor->vel.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z - actor->vel.z, @@ -192,7 +192,7 @@ void Meteo_80187B08(Actor* actor) { } if ((actor->dmgType != DMG_NONE) || (actor->timer_0BC == 0)) { - func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); Object_Kill(&actor->obj, actor->sfxSource); func_effect_8007D0E0(actor->obj.pos.x - actor->vel.x, actor->obj.pos.y, actor->obj.pos.z - actor->vel.z, 8.0f); func_effect_8007BFFC(actor->obj.pos.x - actor->vel.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z - actor->vel.z, @@ -256,7 +256,7 @@ void Meteo_80187E38(f32 x, f32 y, f32 z, f32 arg3) { for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { Meteo_80187D98(&gEffects[i], x, y, z, arg3, 0); - AUDIO_PLAY_SFX(0x31037057, gEffects[i].sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_S_BEAM_SHOT, gEffects[i].sfxSource, 4); break; } } @@ -304,7 +304,7 @@ void Meteo_80188088(Boss* boss) { for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { Meteo_80187FF8(&gEffects[i], boss->obj.pos.x + 700.0f, boss->obj.pos.y, boss->obj.pos.z + 1235.0f); - AUDIO_PLAY_SFX(0x19006035, gEffects[i].sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_RNG_BEAM_SHOT, gEffects[i].sfxSource, 4); break; } } @@ -349,7 +349,7 @@ void Meteo_80188298(f32 x, f32 y, f32 z, f32 zRot) { for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { Meteo_801881A8(&gEffects[i], x, y, z, zRot, -1); - AUDIO_PLAY_SFX(0x3102705C, gEffects[i].sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_GRN_BEAM_SHOT, gEffects[i].sfxSource, 4); break; } } @@ -395,7 +395,7 @@ void Meteo_80188344(Boss* boss) { boss->timer_054 = 5; boss->swork[0] += 32; - Audio_SetTransposeAndPlaySfx(boss->sfxSource, 0x3103605B, boss->unk_04A); + Audio_SetTransposeAndPlaySfx(boss->sfxSource, NA_SE_EN_GRN_BEAM_CHARGE, boss->unk_04A); boss->unk_04A++; if (boss->unk_04A >= 8) { @@ -446,8 +446,8 @@ void Meteo_80188344(Boss* boss) { boss->info.cullDistance = 1000.0f; - Audio_KillSfxBySourceAndId(boss->sfxSource, 0x3103605B); - AUDIO_PLAY_SFX(0x3102405D, boss->sfxSource, 4); + Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_GRN_BEAM_CHARGE); + AUDIO_PLAY_SFX(NA_SE_EN_ASBOSS_SHIELD, boss->sfxSource, 4); } break; @@ -531,7 +531,7 @@ void Meteo_Boss297_Init(Boss297* this) { Object_SetInfo(&gBosses[i].info, gBosses[i].obj.id); Radio_PlayMessage(gMsg_ID_3300, RCID_BOSS_METEO); - AUDIO_PLAY_SFX(0x3102505A, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_BURNER_L, this->sfxSource, 4); } void Meteo_80188B84(Effect* effect, f32 x, f32 y, f32 z, f32 xRot, f32 yRot, f32 arg6, f32 arg7) { @@ -722,7 +722,7 @@ void Meteo_801892F0(Boss* boss, s32 arg1) { Vec3f dest; Vec3f src; - func_effect_8007A6F0(&boss->obj.pos, 0x2903B009); + func_effect_8007A6F0(&boss->obj.pos, NA_SE_EN_EXPLOSION_M); if (arg1 == 7) { func_effect_8007D2C8(boss->obj.pos.x, boss->obj.pos.y + 330.0f, boss->obj.pos.z + 1020.0f, 15.0f); @@ -847,27 +847,27 @@ void Meteo_8018978C(Boss* boss) { if (boss->swork[0] > 5) { boss->swork[0]--; if (boss->swork[0] == 5) { - Audio_KillSfxBySourceAndId(boss->sfxSource, 0x3102505A); + Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_BURNER_L); } } if (boss->swork[1] > 5) { boss->swork[1] = boss->swork[1] - 1; if (boss->swork[1] == 5) { - Audio_KillSfxBySourceAndId(boss->sfxSource, 0x3102505A); + Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_BURNER_L); } } if (boss->dmgType != DMG_NONE) { boss->dmgType = DMG_NONE; if ((boss->dmgPart != 7) && (boss->dmgPart >= 5) && (boss->dmgPart != 5)) { - AUDIO_PLAY_SFX(0x29121007, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, boss->sfxSource, 4); } if ((boss->state >= 2) && (boss->state < 20)) { if ((boss->dmgPart < 5) && (boss[0].fwork[17 + boss->dmgPart] > 0.5f)) { if (boss[0].swork[boss->dmgPart + 2] != 0) { - AUDIO_PLAY_SFX(0x29034003, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, boss->sfxSource, 4); boss[0].swork[9 + boss->dmgPart] = 20; boss[0].swork[2 + boss->dmgPart] -= boss->damage; @@ -887,14 +887,14 @@ void Meteo_8018978C(Boss* boss) { } } } else { - AUDIO_PLAY_SFX(0x29121007, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, boss->sfxSource, 4); } } if (boss->state >= 9) { if (boss->dmgPart == 5) { if ((boss->swork[7] != 0) && (boss->fwork[22] > 0.8f)) { - AUDIO_PLAY_SFX(0x2943500F, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_KNOCK_DOWN, boss->sfxSource, 4); boss->swork[14] = 20; boss->swork[7] -= boss->damage; if (boss->swork[7] <= 0) { @@ -902,13 +902,13 @@ void Meteo_8018978C(Boss* boss) { Meteo_801892F0(boss, boss->dmgPart); } } else { - AUDIO_PLAY_SFX(0x29121007, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, boss->sfxSource, 4); } } if (boss->dmgPart == 7) { if ((boss->swork[8] != 0) && (boss->fwork[23] > 0.8f)) { - AUDIO_PLAY_SFX(0x2943500F, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_KNOCK_DOWN, boss->sfxSource, 4); boss->swork[15] = 20; boss->swork[8] -= boss->damage; if (boss->swork[8] <= 0) { @@ -916,7 +916,7 @@ void Meteo_8018978C(Boss* boss) { Meteo_801892F0(boss, boss->dmgPart); } } else { - AUDIO_PLAY_SFX(0x29121007, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, boss->sfxSource, 4); } } @@ -939,7 +939,7 @@ void Meteo_8018978C(Boss* boss) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); - AUDIO_PLAY_SFX(0x2940D09A, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, boss->sfxSource, 4); gScreenFlashTimer = 8; } } @@ -1043,7 +1043,7 @@ void Meteo_8018978C(Boss* boss) { objId = OBJ_ACTOR_190; } - AUDIO_PLAY_SFX(0x2903201B, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_BARREL_SHOT, boss->sfxSource, 4); src.x = 0.0f; src.y = 330.0f; @@ -1146,7 +1146,7 @@ void Meteo_8018978C(Boss* boss) { boss->timer_052 = 80; } else if (boss->vel.z < -50.0f) { if (boss->swork[0] == 5) { - AUDIO_PLAY_SFX(0x3102505A, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_BURNER_L, boss->sfxSource, 4); } if (boss->swork[0] < 10) { @@ -1193,7 +1193,7 @@ void Meteo_8018978C(Boss* boss) { if ((boss->timer_050 == 0) && (gBosses[boss->unk_044].state == 2)) { boss->fwork[2] = 90.0f; boss->timer_050 = D_i2_80195520[var_v0] + 45; - AUDIO_PLAY_SFX(0x19030036, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SHIELD_ROLL, boss->sfxSource, 4); } if (boss->fwork[2] > 0.0f) { @@ -1227,7 +1227,7 @@ void Meteo_8018978C(Boss* boss) { boss->obj.rot.z += ((0.0f - boss->obj.rot.z) * 0.02f); if (boss->timer_050 == 1) { - AUDIO_PLAY_SFX(0x31016056, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_S_BEAM_CHARGE, boss->sfxSource, 4); } if (boss->timer_050 == 0) { @@ -1278,7 +1278,7 @@ void Meteo_8018978C(Boss* boss) { } if (boss->timer_050 == 0) { boss->state = 7; - AUDIO_PLAY_SFX(0x29038058, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_S_BEAM_END, boss->sfxSource, 4); } Meteo_80189624(); } @@ -1343,7 +1343,7 @@ void Meteo_8018978C(Boss* boss) { if (boss->timer_052 != 0) { if (boss->swork[0] == 5) { - AUDIO_PLAY_SFX(0x3102505A, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_BURNER_L, boss->sfxSource, 4); } if (boss->swork[0] < 10) { boss->swork[0] += 2; @@ -1357,7 +1357,7 @@ void Meteo_8018978C(Boss* boss) { boss->state = 9; boss->timer_050 = 0; boss->fwork[15] = 8.0f; - AUDIO_PLAY_SFX(0x11015034, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_RNG_BEAM_CHARGE, boss->sfxSource, 4); } } break; @@ -1404,7 +1404,7 @@ void Meteo_8018978C(Boss* boss) { boss->state = 9; boss->timer_050 = 70; boss->fwork[15] = 8.0f; - AUDIO_PLAY_SFX(0x11015034, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_RNG_BEAM_CHARGE, boss->sfxSource, 4); } else if ((boss->timer_050 % 2U) == 1) { Meteo_80188088(boss); } @@ -1443,7 +1443,7 @@ void Meteo_8018978C(Boss* boss) { } if (boss->timer_050 == 20) { func_effect_8007A568(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 80.0f); - AUDIO_PLAY_SFX(0x2940F026, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_STAR_EXPLOSION, boss->sfxSource, 4); gControllerRumbleTimers[0] = 60; for (i = 0; i < ARRAY_COUNT(gActors); i++) { if (gActors[i].obj.id == OBJ_ACTOR_TEAM_BOSS) { @@ -1788,12 +1788,12 @@ void Meteo_8018C77C(Actor* actor, s32 arg1) { if (actor->unk_0B6 == 0) { actor->iwork[11] = 1; - AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); return; } - AUDIO_PLAY_SFX(0x11030010, actor->sfxSource, 0); - AUDIO_PLAY_SFX(0x31024059, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, actor->sfxSource, 0); } void Meteo_8018C8F4(Actor* actor1, Actor* actor2) { @@ -1866,7 +1866,7 @@ void Meteo_8018CCF8(Actor* actor) { s32 i; s32 j; - func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); for (i = 0; i < 25; ++i) { for (j = 0; j < ARRAY_COUNT(gEffects); j++) { @@ -2197,12 +2197,12 @@ void Meteo_8018DF08(Actor* actor, s32 idx) { Object_SetInfo(&actor->info, actor->obj.id); if (idx == 3) { - AUDIO_PLAY_SFX(0x11030010, actor->sfxSource, 0); - AUDIO_PLAY_SFX(0x31024059, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, actor->sfxSource, 0); actor->unk_0B6 = 1; } else { actor->iwork[11] = 1; - AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } } @@ -2431,7 +2431,7 @@ void Meteo_LevelComplete(Player* player) { break; case 1390: - AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, player->sfxSource, 0); player->unk_194 = 5.0f; player->unk_190 = 5.0f; break; @@ -2494,7 +2494,7 @@ void Meteo_8018ED9C(Actor* actor) { case 1: actor->state = 2; - AUDIO_PLAY_SFX(0x09000002, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); actor->timer_0BC = 150; actor->fwork[29] = 5.0f; diff --git a/src/overlays/ovl_i2/fox_sx.c b/src/overlays/ovl_i2/fox_sx.c index 533996d5..539c916a 100644 --- a/src/overlays/ovl_i2/fox_sx.c +++ b/src/overlays/ovl_i2/fox_sx.c @@ -99,7 +99,7 @@ void SectorX_8018F330(Actor* actor) { actor->vel.y = -10.0f; actor->vel.z = 30.0f; Radio_PlayMessage(gMsg_ID_4111, RCID_SLIPPY); - func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); gBosses[0].swork[6] = 0; gTeamShields[TEAM_ID_SLIPPY] = -2; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_STANDBY; @@ -229,7 +229,7 @@ void SectorX_8018FBBC(Vec3f* pos) { (actor->scale < 0.0f) && Object_CheckHitboxCollision(pos, actor->info.hitbox, &actor->obj, actor->vwork[29].x, actor->vwork[29].y, actor->vwork[29].z + actor->unk_0F4.z)) { - func_play_800A6028(actor->sfxSource, 0x09000004); + func_play_800A6028(actor->sfxSource, NA_SE_SLIPPY_HIT); actor->state = 1000; xRot = Math_Atan2F(actor->obj.pos.x - pos->x, actor->obj.pos.z - pos->z); yRot = -Math_Atan2F(actor->obj.pos.y - pos->y, @@ -275,7 +275,7 @@ void SectorX_8018FE38(Boss* boss) { } if (boss->dmgType == DMG_BEAM) { boss->dmgType = DMG_NONE; - func_effect_8007A6F0(&boss->obj.pos, 0x29121007); + func_effect_8007A6F0(&boss->obj.pos, NA_SE_EN_REFLECT); } } @@ -397,7 +397,7 @@ void SectorX_80190078(Boss* boss) { boss->dmgType = DMG_NONE; if (boss->swork[0] == 1) { if ((boss->dmgPart == 0) && ((boss->fwork[4] < 45.0f) || (boss->fwork[4] > 315.0f))) { - AUDIO_PLAY_SFX(0x2903300E, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, boss->sfxSource, 4); boss->swork[3] -= boss->damage; boss->timer_054 = 20; func_effect_8007C120(boss->obj.pos.x, boss->obj.pos.y + 334.0f, -237.0f + boss->obj.pos.z, boss->vel.x, @@ -413,7 +413,7 @@ void SectorX_80190078(Boss* boss) { func_play_800A69F8(4, boss->obj.pos.x, boss->obj.pos.y + 334.0f, -237.0f + boss->obj.pos.z); } - func_effect_8007A6F0(&boss->obj.pos, 0x2940C00A); + func_effect_8007A6F0(&boss->obj.pos, NA_SE_EN_EXPLOSION_L); boss->state = 7; boss->timer_050 = 80; boss->swork[0] = 0; @@ -424,8 +424,8 @@ void SectorX_80190078(Boss* boss) { boss->swork[4] = 1; boss->health = 1; boss->swork[7] = 1; - Audio_KillSfxBySourceAndId(D_i2_80195D88, 0x31032061); - Audio_KillSfxBySourceAndId(D_i2_80195D98, 0x31032061); + Audio_KillSfxBySourceAndId(D_i2_80195D88, NA_SE_EN_SZMIS_ENGINE); + Audio_KillSfxBySourceAndId(D_i2_80195D98, NA_SE_EN_SZMIS_ENGINE); boss->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SX_603265C); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); @@ -433,17 +433,17 @@ void SectorX_80190078(Boss* boss) { gScreenFlashTimer = 5; } } else { - func_effect_8007A6F0(&boss->obj.pos, 0x29121007); + func_effect_8007A6F0(&boss->obj.pos, NA_SE_EN_REFLECT); } } else { - func_effect_8007A6F0(&boss->obj.pos, 0x29121007); + func_effect_8007A6F0(&boss->obj.pos, NA_SE_EN_REFLECT); } if (boss->swork[0] == 2) { if (boss->dmgPart == 0) { boss->health -= boss->damage; - AUDIO_PLAY_SFX(0x2903300E, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, boss->sfxSource, 4); if (boss->health <= 0) { gTeamLowHealthMsgTimer = -1; @@ -467,7 +467,7 @@ void SectorX_80190078(Boss* boss) { boss->swork[4] = 2; - AUDIO_PLAY_SFX(0x2940D09A, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, boss->sfxSource, 4); gScreenFlashTimer = 8; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); @@ -481,7 +481,7 @@ void SectorX_80190078(Boss* boss) { func_effect_8007C120(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, boss->vel.x, boss->vel.y, boss->vel.z, 0.2f, 10); } else { - func_effect_8007A6F0(&boss->obj.pos, 0x29121007); + func_effect_8007A6F0(&boss->obj.pos, NA_SE_EN_REFLECT); } } } @@ -489,8 +489,8 @@ void SectorX_80190078(Boss* boss) { if (((boss->state != 8) && (boss->state != 20)) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_ACTIVE)) { boss->state = 8; boss->fwork[0] = 0.0f; - Audio_KillSfxBySourceAndId(D_i2_80195D88, 0x31032061); - Audio_KillSfxBySourceAndId(D_i2_80195D98, 0x31032061); + Audio_KillSfxBySourceAndId(D_i2_80195D88, NA_SE_EN_SZMIS_ENGINE); + Audio_KillSfxBySourceAndId(D_i2_80195D98, NA_SE_EN_SZMIS_ENGINE); } boss->vel.z = -20.0f; @@ -521,7 +521,7 @@ void SectorX_80190078(Boss* boss) { case 90: if ((boss->timer_050 == 110) || (boss->timer_050 == 66)) { - AUDIO_PLAY_SFX(0x29433022, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_COMBINE, boss->sfxSource, 4); } if (fabsf(Math_SmoothStepToF(&boss->fwork[16], 0.0f, 0.1f, 10.0f, 0)) < 8.0f) { @@ -543,7 +543,7 @@ void SectorX_80190078(Boss* boss) { if (boss->timer_050 == 0) { boss->state = 100; boss->fwork[0] = 0.0f; - AUDIO_PLAY_SFX(0x29400023, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MOTOR_ROLL, boss->sfxSource, 4); } boss->fwork[43] = boss->fwork[44] = 5.0f; boss->fwork[42] = 30.0f; @@ -562,7 +562,7 @@ void SectorX_80190078(Boss* boss) { boss->unk_04C = 0; boss->state = 1; boss->fwork[0] = 0.0f; - AUDIO_PLAY_SFX(0x29402024, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_UNIT_COMBINE, boss->sfxSource, 4); } boss->fwork[43] = boss->fwork[44] = 5.0f; @@ -609,7 +609,7 @@ void SectorX_80190078(Boss* boss) { } if (boss->unk_04C == 60) { - AUDIO_PLAY_SFX(0x2902401C, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_THROW, boss->sfxSource, 4); boss->fwork[42] = 0.0f; } @@ -645,7 +645,7 @@ void SectorX_80190078(Boss* boss) { } if (boss->unk_04C == 60) { - AUDIO_PLAY_SFX(0x2902401C, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_THROW, boss->sfxSource, 4); boss->fwork[42] = 0.0f; } @@ -703,14 +703,14 @@ void SectorX_80190078(Boss* boss) { sp74.z = boss->fwork[10] + boss->obj.pos.z; func_edisplay_8005F0E8(D_i2_80195D88, &sp74); - AUDIO_PLAY_SFX(0x31032061, D_i2_80195D88, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SZMIS_ENGINE, D_i2_80195D88, 4); sp74.x = boss->fwork[11] + boss->obj.pos.x; sp74.y = boss->fwork[12] + boss->obj.pos.y; sp74.z = boss->fwork[13] + boss->obj.pos.z; func_edisplay_8005F0E8(D_i2_80195D98, &sp74); - AUDIO_PLAY_SFX(0x31032061, D_i2_80195D98, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SZMIS_ENGINE, D_i2_80195D98, 4); Math_SmoothStepToF(&boss->fwork[27], 30.0f, 0.05f, 1.0f, 0); Math_SmoothStepToF(&boss->fwork[28], -30.0f, 0.05f, 1.0f, 0); @@ -785,15 +785,15 @@ void SectorX_80190078(Boss* boss) { case 6: // Arms come back to robot if ((boss->timer_050 == 20) || (boss->timer_050 == 30)) { - AUDIO_PLAY_SFX(0x29433022, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_COMBINE, boss->sfxSource, 4); } if (boss->timer_050 == 0) { boss->unk_04C = 0; boss->state = 1; boss->swork[1] = 1; - Audio_KillSfxBySourceAndId(D_i2_80195D88, 0x31032061); - Audio_KillSfxBySourceAndId(D_i2_80195D98, 0x31032061); + Audio_KillSfxBySourceAndId(D_i2_80195D88, NA_SE_EN_SZMIS_ENGINE); + Audio_KillSfxBySourceAndId(D_i2_80195D98, NA_SE_EN_SZMIS_ENGINE); boss->fwork[0] = 0.0f; boss->fwork[44] = 0.0f; boss->fwork[43] = 0.0f; @@ -893,7 +893,7 @@ void SectorX_80190078(Boss* boss) { } } if (boss->unk_04C == 60) { - AUDIO_PLAY_SFX(0x2902401C, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_THROW, boss->sfxSource, 4); } } else if (boss->timer_050 == 1) { Radio_PlayMessage(gMsg_ID_20267, RCID_PEPPY); @@ -928,7 +928,7 @@ void SectorX_80190078(Boss* boss) { if (boss->unk_04C == 70) { SectorX_8018FA04(boss->fwork[11] + boss->obj.pos.x, boss->fwork[12] + boss->obj.pos.y, boss->fwork[13] + boss->obj.pos.z); - AUDIO_PLAY_SFX(0x2902401C, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_THROW, boss->sfxSource, 4); } break; @@ -944,7 +944,7 @@ void SectorX_80190078(Boss* boss) { boss->unk_04C++; if ((boss->unk_04C % 16) == 0) { - AUDIO_PLAY_SFX(0x2902401C, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_THROW, boss->sfxSource, 4); } if (boss->unk_04C >= Animation_GetFrameCount(&D_SX_60158C4)) { @@ -983,13 +983,13 @@ void SectorX_80190078(Boss* boss) { boss->fwork[3] = -1000.0f; boss->fwork[1] = -2500.0f; if ((gGameFrameCount % 16) == 0) { - AUDIO_PLAY_SFX(0x2902401C, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_THROW, boss->sfxSource, 4); } } else if (boss->timer_050 > 100) { boss->fwork[3] = 0; boss->fwork[1] = -500.0f; if (((gGameFrameCount % 16) == 0)) { - AUDIO_PLAY_SFX(0x2902401C, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_THROW, boss->sfxSource, 4); } } else { boss->fwork[3] = 0; @@ -1422,7 +1422,7 @@ void SectorX_80193800(Actor* actor, s32 arg1) { actor->obj.rot.x = 15.0f; Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(0x31000011, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ENGINE_01, actor->sfxSource, 4); } void SectorX_801938D8(Actor* actor, s32 arg1) { @@ -1442,8 +1442,8 @@ void SectorX_801938D8(Actor* actor, s32 arg1) { actor->obj.rot.z = -20.0f; } Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); - AUDIO_PLAY_SFX(0x09000002, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); } void SectorX_LevelStart(Player* player) { @@ -1505,7 +1505,7 @@ void SectorX_LevelStart(Player* player) { for (i = 0; i < 20; i++) { func_effect_80079618(gActors[5].obj.pos.x, gActors[5].obj.pos.y, gActors[5].obj.pos.z, 0.5f); } - func_effect_8007A6F0(&gActors[5].obj.pos, 0x2903B009); + func_effect_8007A6F0(&gActors[5].obj.pos, NA_SE_EN_EXPLOSION_M); player->csState += 1; D_ctx_80177A48[0] = 0.1f; } @@ -1522,7 +1522,7 @@ void SectorX_LevelStart(Player* player) { player->baseSpeed = 30.0f; player->rot.z = -80.0f; player->rot.x = -20.0f; - AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, player->sfxSource, 0); for (i = 6; i < 10; i++) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); } @@ -1669,7 +1669,7 @@ void SectorX_801944D4(Actor* actor, s32 arg1) { actor->obj.rot.z = D_i2_80195770[arg1]; actor->iwork[11] = 1; actor->iwork[14] = D_i2_8019577C[arg1]; - AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } } @@ -1801,7 +1801,7 @@ void SectorX_LevelComplete(Player* player) { case 920: gActors[1].iwork[14] = gActors[2].iwork[14] = gActors[3].iwork[14] = 0; SectorX_801944D4(&gActors[0], 3); - AUDIO_PLAY_SFX(0x11030010, gActors[0].sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, gActors[0].sfxSource, 0); break; case 1050: @@ -1819,7 +1819,7 @@ void SectorX_LevelComplete(Player* player) { case 1160: SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); - AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, player->sfxSource, 0); player->csState = 2; player->csTimer = 40; player->unk_194 = 5.0f; diff --git a/src/overlays/ovl_i3/fox_a6.c b/src/overlays/ovl_i3/fox_a6.c index 832f3bac..ed9e797c 100644 --- a/src/overlays/ovl_i3/fox_a6.c +++ b/src/overlays/ovl_i3/fox_a6.c @@ -439,8 +439,8 @@ f32 D_i3_801BF494[12] = { void Area6_80187530(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 fwork6, f32 xRot, f32 yRot, s32 timer0BC, s32 unk0B4) { - (void) "おん\n"; - (void) "おふ\n"; + PRINTF("おん\n"); // On + PRINTF("おふ\n"); // Off Actor_Initialize(actor); actor->obj.status = OBJ_INIT; actor->obj.id = OBJ_ACTOR_191; @@ -454,7 +454,7 @@ void Area6_80187530(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 fwork6, f32 actor->unk_0B4 = unk0B4; actor->fwork[5] = fwork6; Object_SetInfo(&actor->info, actor->obj.id); - func_effect_8007A6F0(&actor->obj.pos, 0x2903201B); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_BARREL_SHOT); } void Area6_801875E4(f32 xPos, f32 yPos, f32 zPos, f32 fwork6, f32 xRot, f32 yRot, s32 timer0BC, s32 unk0B4) { @@ -526,7 +526,7 @@ void Area6_BossA6_Init(BossA6* this) { A6_HIT_1(this, 0)->x.size = A6_HIT_1(this, 1)->x.size = A6_HIT_1(this, 2)->x.size = 153.0f; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 40); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 40); - AUDIO_PLAY_SFX(0x11002050, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SHIELD_ROLL_LEVEL, this->sfxSource, 4); } void Area6_80187944(Boss* bossA6) { @@ -571,9 +571,9 @@ void Area6_80187944(Boss* bossA6) { bossA6->health -= bossA6->damage; if (bossA6->health < 390) { - AUDIO_PLAY_SFX(0x2943500F, bossA6->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_KNOCK_DOWN, bossA6->sfxSource, 4); } else { - AUDIO_PLAY_SFX(0x29034003, bossA6->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, bossA6->sfxSource, 4); } if (bossA6->health <= 0) { @@ -585,7 +585,7 @@ void Area6_80187944(Boss* bossA6) { D_bg_8015F984 = (gPathProgress * 0.00004f) + 0.5f; - AUDIO_PLAY_SFX(0x2940D09A, bossA6->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, bossA6->sfxSource, 4); gShowBossHealth = 0; @@ -612,8 +612,8 @@ void Area6_80187944(Boss* bossA6) { bossA6->swork[A6_SWK_33 + 0] = bossA6->swork[A6_SWK_33 + 1] = bossA6->swork[A6_SWK_33 + 2] = 0; gScreenFlashTimer = 4; bossA6->state = 11; - AUDIO_PLAY_SFX(0x2940C00A, bossA6->sfxSource, 4); - AUDIO_PLAY_SFX(0x3143402E, bossA6->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_L, bossA6->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EXPLOSION_DEMO5, bossA6->sfxSource, 4); } } @@ -627,7 +627,7 @@ void Area6_80187944(Boss* bossA6) { Area6_8018A2C4(bossA6); } if (bossA6->dmgPart >= 7) { - AUDIO_PLAY_SFX(0x29121007, bossA6->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, bossA6->sfxSource, 4); } } @@ -821,7 +821,7 @@ void Area6_80187944(Boss* bossA6) { if (D_i3_801C22F0.unk_24 < 1.0f) { D_i3_801C22F0.unk_24 = 0.0f; Audio_KillSfxBySource(bossA6->sfxSource); - AUDIO_PLAY_SFX(0x19004051, bossA6->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SHIELD_ROLL_STOP, bossA6->sfxSource, 4); bossA6->timer_050 = 20; bossA6->obj.pos.z = gPlayer[0].cam.eye.z - gPathProgress + bossA6->fwork[A6_FWK_3]; bossA6->fwork[A6_FWK_6] = bossA6->obj.pos.x = gPlayer[0].cam.eye.x; @@ -831,7 +831,7 @@ void Area6_80187944(Boss* bossA6) { bossA6->vel.y = 0.0f; bossA6->vel.z = -40.0f; - AUDIO_PLAY_SFX(0x39408092, bossA6->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_WARP_OUT, bossA6->sfxSource, 4); } } break; @@ -843,7 +843,7 @@ void Area6_80187944(Boss* bossA6) { if (bossA6->obj.rot.z < 1.0f) { if (D_i3_801C2250[A6_BSS_27] == 0) { - AUDIO_PLAY_SFX(0x39408091, bossA6->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_WARP_IN, bossA6->sfxSource, 4); D_i3_801C2250[A6_BSS_27] = 1; } bossA6->obj.rot.z = 0.0f; @@ -879,7 +879,7 @@ void Area6_80187944(Boss* bossA6) { bossA6->timer_050 = 50; bossA6->state = 2; D_i3_801C2250[A6_BSS_8] = 0; - AUDIO_PLAY_SFX(0x39408092, bossA6->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_WARP_OUT, bossA6->sfxSource, 4); } } break; @@ -943,7 +943,7 @@ void Area6_80187944(Boss* bossA6) { if ((D_i3_801C2250[A6_BSS_6] == 0) || (D_i3_801C2250[A6_BSS_0] == 0)) { bossA6->fwork[A6_FWK_1] = 90.0f; bossA6->fwork[A6_FWK_2] = 2.0f; - AUDIO_PLAY_SFX(0x31404066, bossA6->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_COVER_OPEN, bossA6->sfxSource, 4); bossA6->info.hitbox = SEGMENTED_TO_VIRTUAL(D_A6_6028578); D_i3_801C2250[A6_BSS_7] = 0; } @@ -955,7 +955,7 @@ void Area6_80187944(Boss* bossA6) { if (bossA6->timer_050 == 1) { Audio_KillSfxBySource(bossA6->sfxSource); if (D_i3_801C2250[A6_BSS_7] == 0) { - AUDIO_PLAY_SFX(0x31008069, bossA6->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ENERGY_BALL, bossA6->sfxSource, 4); D_i3_801C2250[A6_BSS_7] = 1; } } @@ -988,7 +988,7 @@ void Area6_80187944(Boss* bossA6) { bossA6->info.hitbox = SEGMENTED_TO_VIRTUAL(D_A6_6028454); D_i3_801C2250[A6_BSS_6] = 1; Audio_KillSfxBySource(bossA6->sfxSource); - AUDIO_PLAY_SFX(0x31404067, bossA6->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_COVER_CLOSE, bossA6->sfxSource, 4); bossA6->swork[A6_SWK_30 + 0] = bossA6->swork[A6_SWK_30 + 1] = bossA6->swork[A6_SWK_30 + 2] = 0; } else if (bossA6->swork[A6_SWK_30 + 0] == 0) { Area6_8018A1B0(bossA6, 0); @@ -1008,7 +1008,7 @@ void Area6_80187944(Boss* bossA6) { } bossA6->fwork[A6_FWK_3] = RAND_FLOAT_CENTERED(1000.0f) + -3700.0f; if (D_i3_801C2250[A6_BSS_28] == 0) { - AUDIO_PLAY_SFX(0x39404068, bossA6->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_COVER_MOVE_STOP, bossA6->sfxSource, 4); } } @@ -1041,7 +1041,7 @@ void Area6_80187944(Boss* bossA6) { bossA6->fwork[A6_FWK_8] = bossA6->fwork[A6_FWK_9] = 0; bossA6->fwork[A6_FWK_2] = 2.0f; - AUDIO_PLAY_SFX(0x31404066, bossA6->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_COVER_OPEN, bossA6->sfxSource, 4); bossA6->info.hitbox = SEGMENTED_TO_VIRTUAL(D_A6_6028578); @@ -1068,7 +1068,7 @@ void Area6_80187944(Boss* bossA6) { case 5: if (bossA6->timer_050 == 1) { Area6_80187704(); - AUDIO_PLAY_SFX(0x39033093, bossA6->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_CLBOSS_CHARGE, bossA6->sfxSource, 4); D_i3_801C2250[A6_BSS_33] = 120; } @@ -1144,14 +1144,14 @@ void Area6_80187944(Boss* bossA6) { bossA6->timer_052 = 300; bossA6->timer_054 = 0; bossA6->state = 9; - AUDIO_PLAY_SFX(0x11002050, bossA6->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SHIELD_ROLL_LEVEL, bossA6->sfxSource, 4); } break; case 9: if (bossA6->timer_052 == 0) { Audio_KillSfxBySource(bossA6->sfxSource); - AUDIO_PLAY_SFX(0x19004051, bossA6->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SHIELD_ROLL_STOP, bossA6->sfxSource, 4); bossA6->timer_054 = 0; bossA6->state = 10; } else { @@ -1347,19 +1347,19 @@ void Area6_8018A2C4(Boss* bossA6) { sp58.x = D_i3_801BF334[0]; sp58.y = D_i3_801BF3C4[0]; sp58.z = bossA6->obj.pos.z; - func_effect_8007A6F0(&sp58, 0x29034003); + func_effect_8007A6F0(&sp58, NA_SE_OB_DAMAGE_M); } if (i == 1) { sp58.x = D_i3_801BF364[0]; sp58.y = D_i3_801BF3F4[0]; sp58.z = bossA6->obj.pos.z; - func_effect_8007A6F0(&sp58, 0x29034003); + func_effect_8007A6F0(&sp58, NA_SE_OB_DAMAGE_M); } if (i == 2) { sp58.x = D_i3_801BF394[0]; sp58.y = D_i3_801BF424[0]; sp58.z = bossA6->obj.pos.z; - func_effect_8007A6F0(&sp58, 0x29034003); + func_effect_8007A6F0(&sp58, NA_SE_OB_DAMAGE_M); } if (bossA6->swork[A6_SWK_33 + i] < 0) { bossA6->swork[A6_SWK_33 + i] = 0; @@ -1604,19 +1604,19 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { spE0.x = D_i3_801BF334[0]; spE0.y = D_i3_801BF3C4[0]; spE0.z = bossA6->obj.pos.z; - func_effect_8007A6F0(&spE0, 0x29034065); + func_effect_8007A6F0(&spE0, NA_SE_EN_ARM_SWING); } if (arg1 == 1) { spE0.x = D_i3_801BF364[0]; spE0.y = D_i3_801BF3F4[0]; spE0.z = bossA6->obj.pos.z; - func_effect_8007A6F0(&spE0, 0x29034065); + func_effect_8007A6F0(&spE0, NA_SE_EN_ARM_SWING); } if (arg1 == 2) { spE0.x = D_i3_801BF394[0]; spE0.y = D_i3_801BF424[0]; spE0.z = bossA6->obj.pos.z; - func_effect_8007A6F0(&spE0, 0x29034065); + func_effect_8007A6F0(&spE0, NA_SE_EN_ARM_SWING); } bossA6->swork[A6_SWK_18 + arg1] = 2; } @@ -1727,7 +1727,7 @@ void Area6_8018B9BC(Boss* bossA6) { D_i3_801C2250[A6_BSS_25] = 20; } } - AUDIO_PLAY_SFX(0x29033064, bossA6->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SPARK_DAMAGE_M, bossA6->sfxSource, 4); if (bossA6->swork[A6_SWK_0 + j] <= 0) { bossA6->swork[A6_SWK_0 + j] = 0; Matrix_MultVec3f(gCalcMatrix, &bossA6->vwork[A6_VWK_1 + i], &sp94); @@ -1736,7 +1736,7 @@ void Area6_8018B9BC(Boss* bossA6) { sp88.x = bossA6->obj.pos.x + sp94.x; sp88.y = bossA6->obj.pos.y + sp94.y; sp88.z = bossA6->obj.pos.z + sp94.z; - func_effect_8007A6F0(&sp88, 0x2903B009); + func_effect_8007A6F0(&sp88, NA_SE_EN_EXPLOSION_M); func_effect_8007C120(bossA6->obj.pos.x, bossA6->obj.pos.y, bossA6->obj.pos.z + 150.0f, bossA6->vel.x, bossA6->vel.y, bossA6->vel.z, 0.2f, 50); } @@ -1936,7 +1936,7 @@ void Area6_8018C54C(Boss* bossA6) { spB8.z = bossA6->obj.pos.z + spC4.z; if ((!bossA6) && (!bossA6)) {} // fake if (D_i3_801C2250[A6_BSS_26] == 0) { - func_effect_8007A6F0(&spB8, 0x2903B009); + func_effect_8007A6F0(&spB8, NA_SE_EN_EXPLOSION_M); } D_i3_801C2250[A6_BSS_26]++; D_i3_801C2250[A6_BSS_26] &= 1; @@ -1995,7 +1995,7 @@ void Area6_8018C54C(Boss* bossA6) { if (bossA6->swork[A6_SWK_25] != 0) { j = bossA6->swork[A6_SWK_25] - 1; if ((bossA6->timer_058 != 0) && !(bossA6->timer_058 & 3)) { - AUDIO_PLAY_SFX(0x29034003, bossA6->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, bossA6->sfxSource, 4); } if (bossA6->timer_058 == 1) { if (bossA6->swork[A6_SWK_25] == 2) { @@ -2085,7 +2085,7 @@ void Area6_8018D3CC(s32 arg0, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, gPlayerShots[i].unk_64 = 150; gPlayerShots[i].sourceId = CS_SHOT_ID; - AUDIO_PLAY_SFX(0x2900000D, gPlayerShots[i].sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_SHOT_F, gPlayerShots[i].sfxSource, 4); break; } } @@ -2101,7 +2101,7 @@ void Area6_8018D4E0(Actor* actor) { for (i = 0; i < 15; i++) { func_effect_800794CC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 1.0f); } - func_effect_8007A6F0(&actor->obj.pos, 0x2903B009); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); } void Area6_8018D5C8(void) { @@ -2117,7 +2117,7 @@ void Area6_8018D5C8(void) { gActors[i].fwork[0] = 0.0f; gActors[i].obj.id = OBJ_ACTOR_CUTSCENE; Object_SetInfo(&gActors[i].info, gActors[i].obj.id); - AUDIO_PLAY_SFX(0x11030010, gActors[i].sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, gActors[i].sfxSource, 0); } void Area6_8018D694(Actor* actor, s32 arg1) { @@ -2141,7 +2141,7 @@ void Area6_8018D694(Actor* actor, s32 arg1) { actor->fwork[8] = RAND_FLOAT_SEEDED(360.0f); actor->fwork[9] = RAND_FLOAT_SEEDED(360.0f); Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(0x31000011, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ENGINE_01, actor->sfxSource, 4); } void Area6_8018D804(Actor* actor, s32 arg1) { @@ -2162,7 +2162,7 @@ void Area6_8018D804(Actor* actor, s32 arg1) { actor->iwork[11] = 1; actor->fwork[0] = 0.0f; Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } void Area6_8018D920(Vec3f* pos) { @@ -2215,7 +2215,7 @@ void Area6_8018DA58(Actor* actor) { case 11: case 16: actor->state++; - AUDIO_PLAY_SFX(0x09000002, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); actor->fwork[29] = 5.0f; /* fallthrough */ case 7: @@ -2363,7 +2363,7 @@ void Area6_LevelStart(Player* player) { if (gCsFrameCount == 460) { player->unk_190 = 2.0f; player->unk_194 = 5.0f; - AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, player->sfxSource, 0); } if (gCsFrameCount >= 460) { Math_SmoothStepToF(&player->baseSpeed, 50.0f, 0.1f, 3.0f, 0.01f); @@ -2507,8 +2507,8 @@ void Area6_8018EB3C(Actor* actor) { actor->state = 100; actor->fwork[0] = 0.0f; Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(0x11030010, actor->sfxSource, 0); - AUDIO_PLAY_SFX(0x31024059, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, actor->sfxSource, 0); } void Area6_8018EC38(Actor* actor, s32 arg1) { @@ -2533,7 +2533,7 @@ void Area6_8018EC38(Actor* actor, s32 arg1) { actor->iwork[14] = arg1 + 2; } Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } } @@ -2556,7 +2556,7 @@ void Area6_LevelComplete(Player* player) { player->unk_194 = 5.0f; player->unk_190 = 2.0f; player->baseSpeed = 60.0f; - AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, player->sfxSource, 0); D_ctx_80177A48[3] = 0.0f; /* fallthrough */ case 1: @@ -2618,7 +2618,7 @@ void Area6_LevelComplete(Player* player) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 0; } if ((gCsFrameCount == 146) || (gCsFrameCount == 150)) { - AUDIO_PLAY_SFX(0x2940F026, gActors[5].sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_STAR_EXPLOSION, gActors[5].sfxSource, 4); } if (gCsFrameCount > 146) { actor4->iwork[3] -= 4; @@ -2723,7 +2723,7 @@ void Area6_LevelComplete(Player* player) { Object_Kill(&gActors[0].obj, gActors[0].sfxSource); player->unk_190 = 2.0f; player->unk_194 = 5.0f; - AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, player->sfxSource, 0); } if (gCsFrameCount >= 1090) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; @@ -2774,15 +2774,15 @@ void Area6_LevelComplete(Player* player) { break; case 1070: gActors[1].fwork[29] = 5.0f; - AUDIO_PLAY_SFX(0x09000002, gActors[1].sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, gActors[1].sfxSource, 0); break; case 1072: gActors[2].fwork[29] = 5.0f; - AUDIO_PLAY_SFX(0x09000002, gActors[2].sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, gActors[2].sfxSource, 0); break; case 1074: gActors[3].fwork[29] = 5.0f; - AUDIO_PLAY_SFX(0x09000002, gActors[3].sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, gActors[3].sfxSource, 0); break; } if (gCsFrameCount >= 1070) { diff --git a/src/overlays/ovl_i3/fox_aq.c b/src/overlays/ovl_i3/fox_aq.c index a899dceb..435d50c8 100644 --- a/src/overlays/ovl_i3/fox_aq.c +++ b/src/overlays/ovl_i3/fox_aq.c @@ -621,7 +621,7 @@ void Aquas_801A9ED0(Player* player) { } } if ((sp8C != D_i3_801C4190[4]) && (D_i3_801C41B8[5] == 3.0f)) { - AUDIO_PLAY_SFX(0x4900001B, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_MAR_LOCKON, gDefaultSfxSource, 4); D_i3_801C41B8[5] = 20.0f; } } @@ -924,7 +924,7 @@ void Aquas_801AACF8(Player* player) { sp58 = 0.0f; gPlayerTurnRate = 2.0f; if (D_i3_801C4190[7] == 0) { - AUDIO_PLAY_SFX(0x09404028, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_MAR_BOUND, player->sfxSource, 0); D_i3_801C4190[7] = 1; } } @@ -1177,7 +1177,7 @@ void Aquas_801AC09C(Player* player) { for (i = 15, shot = &gPlayerShots[15]; i < ARRAY_COUNT(gPlayerShots); i++, shot++) { if (shot->obj.status == OBJ_FREE) { func_play_800AC290(player, shot, 0.0f, 0.0f, PLAYERSHOT_8, 50.0f); - AUDIO_PLAY_SFX(0x01000025, shot->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_MAR_BOMB_SHOT, shot->sfxSource, 0); D_i3_801C4190[5] = i + 1; D_i3_801C4454 = 300; D_i3_801C4458 = -100.0f; @@ -1195,9 +1195,9 @@ void Aquas_801AC18C(Player* player) { if (gPlayerShots[i].obj.status == OBJ_FREE) { func_play_800AC290(player, &gPlayerShots[i], 0.0f, -10.0f, PLAYERSHOT_0, 120.0f); if (gLaserStrength[gPlayerNum] == LASERS_SINGLE) { - AUDIO_PLAY_SFX(0x09400021, gPlayerShots[i].sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_MAR_SHOT, gPlayerShots[i].sfxSource, 0); } else { - AUDIO_PLAY_SFX(0x09400027, gPlayerShots[i].sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_MAR_TWIN_LASER, gPlayerShots[i].sfxSource, 0); } break; } @@ -1271,7 +1271,7 @@ void Aquas_801AC274(Player* player) { } if ((D_i3_801C4190[0] != temp) && (D_i3_801C41B8[5] == 3.0f)) { - AUDIO_PLAY_SFX(0x4900001B, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_MAR_LOCKON, gDefaultSfxSource, 4); D_i3_801C41B8[5] = 20.0f; } if (D_i3_801C4190[0] != 0) { @@ -1478,7 +1478,7 @@ void Aquas_801ACE50(Player* player) { if ((gBoostButton[player->num] & gInputHold->button) && (player->unk_230 == 0) && (player->state_1C8 != PLAYERSTATE_1C8_U_TURN) && (player->boostCooldown == 0)) { if (player->boostMeter == 0) { - AUDIO_PLAY_SFX(0x09004030, player->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_MARINE_BOOST, player->sfxSource, 4); } player->boostMeter += 3.0f; if (player->boostMeter > 90.0f) { @@ -1518,7 +1518,7 @@ void Aquas_801AD328(Player* player) { if ((gBrakeButton[player->num] & gInputHold->button) && (player->unk_230 == 0) && (player->state_1C8 != PLAYERSTATE_1C8_U_TURN) && (player->boostCooldown == 0)) { if (player->boostMeter == 0) { - AUDIO_PLAY_SFX(0x09004031, player->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_MARINE_BRAKE, player->sfxSource, 4); } player->boostMeter += 3.0f; if (player->boostMeter > 90.0f) { @@ -1619,7 +1619,7 @@ void Aquas_801AD6C0(Actor* actor) { actor->unk_0F4.z = Math_ModF(actor->unk_0F4.z, 360.0f); } else { actor->health = 30; - AUDIO_PLAY_SFX(0x31000047, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SANADA_SWIM, actor->sfxSource, 4); actor->state++; } break; @@ -1630,14 +1630,14 @@ void Aquas_801AD6C0(Actor* actor) { actor->dmgType = DMG_NONE; actor->timer_0C6 = 15; actor->health -= actor->damage; - AUDIO_PLAY_SFX(0x29034045, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SANADA_DAMAGE, actor->sfxSource, 4); if (actor->health <= 0) { actor->timer_0C2 = 30000; actor->state = 2; actor->vel.y = 0.0f; actor->vel.x = 0.0f; actor->vel.z = 0.0f; - AUDIO_PLAY_SFX(0x2902A046, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SANADA_DOWN, actor->sfxSource, 4); } } } @@ -1728,7 +1728,7 @@ void Aquas_801AD6C0(Actor* actor) { } actor->timer_0BC = 4; func_effect_8007D0E0(D_i3_801C27C0->pos.x, D_i3_801C27C0->pos.y, D_i3_801C27C0->pos.z, 3.0f); - AUDIO_PLAY_SFX(0x29018049, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SEA_EXPLOSION_S, actor->sfxSource, 4); } break; } @@ -1857,7 +1857,7 @@ void Aquas_801AE3D8(Actor* actor) { actor->timer_0C6 = 30; actor->iwork[1] = 0; D_i3_801C4308[79] -= 5.0f; - AUDIO_PLAY_SFX(0x29036050, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_KAIBASHIRA_DAMEGE, actor->sfxSource, 4); if (D_i3_801C4308[79] <= -28.0f) { D_i3_801C4308[79] = -28.0f; @@ -1893,7 +1893,7 @@ void Aquas_801AE3D8(Actor* actor) { actor->health = 0; actor->timer_0C6 = 300; actor->fwork[2] = actor->scale; - AUDIO_PLAY_SFX(0x19000033, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_WT_DISAPPEAR_L, actor->sfxSource, 4); actor->state++; } } @@ -2124,7 +2124,7 @@ void Aquas_801AFA5C(Actor* actor) { if ((gBosses[0].state >= 10) && (actor->health != 0) && (actor->damage == 31)) { actor->timer_0BE = 70; actor->health -= actor->damage; - AUDIO_PLAY_SFX(0x2903604C, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_WT_DAMAGE_S, actor->sfxSource, 4); if (actor->timer_0C6 == 0) { actor->timer_0C6 = 70; } @@ -2192,7 +2192,7 @@ void Aquas_801AFA5C(Actor* actor) { i = -1; } if ((actor->iwork[1] == 13) && (i < 0)) { - AUDIO_PLAY_SFX(0x29022048, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SANADA_APPEAR, actor->sfxSource, 4); for (i = 0, sp48 = gActors; i < ARRAY_COUNT(gActors); i++, sp48++) { if (sp48->obj.status == OBJ_FREE) { Actor_Initialize(sp48); @@ -2243,7 +2243,7 @@ void Aquas_801AFA5C(Actor* actor) { actor->state = 5; actor->vel.y = 10.0f; actor->vel.z = 5.0f; - AUDIO_PLAY_SFX(0x1902102F, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_WT_BROKEN, actor->sfxSource, 4); break; case 5: if (actor->obj.pos.y > (gGroundHeight + 70.0f)) { @@ -2274,10 +2274,10 @@ void Aquas_801AFA5C(Actor* actor) { } if (actor->vel.z != 0) { actor->vel.y = actor->vel.z = 0.0f; - AUDIO_PLAY_SFX(0x19402031, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_WT_BOUND_M, actor->sfxSource, 4); } if (actor->timer_0C0 == 1) { - AUDIO_PLAY_SFX(0x19003030, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_WT_DISAPPEAR_S, actor->sfxSource, 4); } if (actor->timer_0C0 == 0) { if (actor->timer_0BE == 0) { @@ -2402,7 +2402,7 @@ void Aquas_801B0B60(Actor* actor) { Object_Kill(&actor->obj, actor->sfxSource); func_effect_800815DC(); func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 50.0f, 5.0f); - func_effect_8007A6F0(&actor->obj.pos, 0x29018049); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_SEA_EXPLOSION_S); break; } if (((gGameFrameCount % 16) == 0)) { @@ -2500,7 +2500,7 @@ void Aquas_BossAq_Init(BossAQ* this) { this->info.hitbox[119] = 1028.0f; this->info.hitbox[169] = 800.0f; this->swork[AQ_SWK_8] = this->swork[AQ_SWK_9] = 2; - AUDIO_PLAY_SFX(0x3140904D, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SHELL_BEAT, this->sfxSource, 4); } // OBJ_BOSS_AQ action @@ -2565,7 +2565,7 @@ void Aquas_801B134C(Boss* bossAQ) { D_i3_801C4308[12] = D_i3_801C4308[13] = 0.0f; bossAQ->timer_056 = 20; bossAQ->state = 2; - AUDIO_PLAY_SFX(0x1900002E, bossAQ->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_BUBBLE_UP, bossAQ->sfxSource, 0); } break; case 2: @@ -2655,7 +2655,7 @@ void Aquas_801B134C(Boss* bossAQ) { break; case 14: if (bossAQ->timer_056 == 58) { - AUDIO_PLAY_SFX(0x29408055, bossAQ->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SHELL_FILLOPEN, bossAQ->sfxSource, 4); } if ((bossAQ->timer_056 == 0) && (D_i3_801C4308[12] <= -44.0f)) { bossAQ->swork[AQ_SWK_2] = bossAQ->swork[AQ_SWK_3] = 20; @@ -2794,7 +2794,7 @@ void Aquas_801B134C(Boss* bossAQ) { bossAQ->timer_052 = 0; bossAQ->swork[AQ_SWK_19] = 500; D_i3_801C4308[79] = 0.0f; - AUDIO_PLAY_SFX(0x29408054, bossAQ->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SHELL_CLOSE, bossAQ->sfxSource, 4); if (bossAQ->state < 14) { for (i3 = 0, actor = gActors; i3 < ARRAY_COUNT(gActors); i3++, actor++) { if ((actor->obj.id == OBJ_ACTOR_260) && (actor->obj.status == OBJ_ACTIVE)) { @@ -2804,7 +2804,7 @@ void Aquas_801B134C(Boss* bossAQ) { bossAQ->timer_058 = 30; bossAQ->swork[AQ_SWK_0] = 4; gCameraShake = 50; - AUDIO_PLAY_SFX(0x1900002D, bossAQ->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_WATER_PRESSURE, bossAQ->sfxSource, 0); func_enmy_80062B60(bossAQ->obj.pos.x, bossAQ->obj.pos.z + 800.0f, 0, 100.0f); var_fs3 = 80.0f; for (i2 = 0; i2 < 3; i2++, var_fs3 += 10.0f) { @@ -2853,26 +2853,26 @@ void Aquas_801B134C(Boss* bossAQ) { D_i3_801C42A0[22] = 0; bossAQ->swork[AQ_SWK_12]--; bossAQ->swork[AQ_SWK_13] = 70; - AUDIO_PLAY_SFX(0x2940604C, bossAQ->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_EYEFILM_DAMAGE, bossAQ->sfxSource, 4); } } else if (bossAQ->state >= 10) { - AUDIO_PLAY_SFX(0x29121007, bossAQ->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, bossAQ->sfxSource, 4); } break; case 14: if (bossAQ->damage == 31) { if (D_i3_801C42A0[23] != 0) { - AUDIO_PLAY_SFX(0x29121007, bossAQ->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, bossAQ->sfxSource, 4); } else if ((bossAQ->state >= 15) && (bossAQ->swork[AQ_SWK_8] != 0)) { D_i3_801C42A0[1] = 50; sBossAQlimbTimers[AQ_LIMB_7] = 50; bossAQ->swork[AQ_SWK_8]--; - AUDIO_PLAY_SFX(0x2903604C, bossAQ->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_WT_DAMAGE_S, bossAQ->sfxSource, 4); if (bossAQ->swork[AQ_SWK_8] == 0) { spD4.x = D_i3_801C4308[73]; spD4.y = D_i3_801C4308[74]; spD4.z = D_i3_801C4308[75]; // 74? - func_effect_8007A6F0(&spD4, 0x19000033); + func_effect_8007A6F0(&spD4, NA_SE_EN_WT_DISAPPEAR_L); bossAQ->swork[AQ_SWK_10] = 250.0f + RAND_FLOAT(50.0f); } } @@ -2881,17 +2881,17 @@ void Aquas_801B134C(Boss* bossAQ) { case 15: if (bossAQ->damage == 31) { if (D_i3_801C42A0[23] != 0) { - AUDIO_PLAY_SFX(0x29121007, bossAQ->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, bossAQ->sfxSource, 4); } else if ((bossAQ->state >= 15) && (bossAQ->swork[AQ_SWK_9] != 0)) { D_i3_801C42A0[2] = 50; sBossAQlimbTimers[AQ_LIMB_8] = 50; bossAQ->swork[AQ_SWK_9]--; - AUDIO_PLAY_SFX(0x2903604C, bossAQ->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_WT_DAMAGE_S, bossAQ->sfxSource, 4); if (bossAQ->swork[AQ_SWK_9] == 0) { spD4.x = D_i3_801C4308[76]; spD4.y = D_i3_801C4308[77]; // 76? spD4.z = D_i3_801C4308[78]; - func_effect_8007A6F0(&spD4, 0x19000033); + func_effect_8007A6F0(&spD4, NA_SE_EN_WT_DISAPPEAR_L); bossAQ->swork[AQ_SWK_11] = 250.0f + RAND_FLOAT(50.0f); } } @@ -2900,7 +2900,7 @@ void Aquas_801B134C(Boss* bossAQ) { case 16: if (bossAQ->damage == 31) { if (D_i3_801C42A0[23] != 0) { - AUDIO_PLAY_SFX(0x29121007, bossAQ->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, bossAQ->sfxSource, 4); } else if (bossAQ->state >= 15) { D_i3_801C42A0[4] = 75; } @@ -2909,7 +2909,7 @@ void Aquas_801B134C(Boss* bossAQ) { case 17: if (bossAQ->damage == 31) { if (D_i3_801C42A0[23] != 0) { - AUDIO_PLAY_SFX(0x29121007, bossAQ->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, bossAQ->sfxSource, 4); } else if (bossAQ->state >= 15) { D_i3_801C42A0[5] = 75; } @@ -2919,7 +2919,7 @@ void Aquas_801B134C(Boss* bossAQ) { if ((bossAQ->damage == 31) && (bossAQ->swork[AQ_SWK_1] != 2) && (bossAQ->swork[AQ_SWK_12] == 0) && (bossAQ->state == 15) && (bossAQ->health != 0)) { if (D_i3_801C42A0[23] != 0) { - AUDIO_PLAY_SFX(0x29121007, bossAQ->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, bossAQ->sfxSource, 4); } else { for (i7 = 0; i7 < AQ_LIMB_MAX; i7++) { sBossAQlimbTimers[i7] = 50; @@ -2929,7 +2929,7 @@ void Aquas_801B134C(Boss* bossAQ) { bossAQ->swork[AQ_SWK_13] = 40; bossAQ->swork[AQ_SWK_1] = 2; - AUDIO_PLAY_SFX(0x2940804E, bossAQ->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SHELL_DAMAGE, bossAQ->sfxSource, 4); bossAQ->health -= bossAQ->damage; if ((bossAQ->swork[AQ_SWK_25] == 0) || (bossAQ->swork[AQ_SWK_25] == 2)) { Radio_PlayMessage(gMsg_ID_7086, RCID_SLIPPY); @@ -2955,7 +2955,7 @@ void Aquas_801B134C(Boss* bossAQ) { bossAQ->swork[AQ_SWK_13] = 40; bossAQ->swork[AQ_SWK_1] = 2; bossAQ->timer_056 = 50; - AUDIO_PLAY_SFX(0x2940A04F, bossAQ->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SHELL_DOWN, bossAQ->sfxSource, 4); gShowBossHealth = false; bossAQ->state = 16; } @@ -2966,14 +2966,14 @@ void Aquas_801B134C(Boss* bossAQ) { case 20: if (bossAQ->damage == 31) { if (D_i3_801C42A0[23] != 0) { - AUDIO_PLAY_SFX(0x29121007, bossAQ->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, bossAQ->sfxSource, 4); } else if (bossAQ->state >= 15) { D_i3_801C42A0[6] = 50; } } break; default: - AUDIO_PLAY_SFX(0x29121007, bossAQ->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, bossAQ->sfxSource, 4); break; } } @@ -3124,7 +3124,7 @@ void Aquas_801B134C(Boss* bossAQ) { spD4.x = D_i3_801C4308[73 + 3 * i7]; spD4.y = D_i3_801C4308[74 + 3 * i7]; spD4.z = D_i3_801C4308[75 + 3 * i7]; - func_effect_8007A6F0(&spD4, 0x2903404B); + func_effect_8007A6F0(&spD4, NA_SE_EN_P_BALL_SHOT); i2 = 0; for (i3 = 0; i2 <= i && i3 < ARRAY_COUNT(gActors); i3++) { if ((gActors[i3].obj.status == OBJ_FREE) && (i3 < ARRAY_COUNT(gActors))) { @@ -3226,7 +3226,7 @@ void Aquas_801B134C(Boss* bossAQ) { Math_SmoothStepToF(&D_i3_801C4308[61], 0.0f, 0.3f, 0.5f, 0.0f); bossAQ->info.hitbox[119] = -10000.0f; if (bossAQ->swork[AQ_SWK_13] == 1) { - AUDIO_PLAY_SFX(0x29409051, bossAQ->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_EYEFILM_REVIVAL, bossAQ->sfxSource, 4); } } else if ((bossAQ->health != 0) || (bossAQ->state < 16)) { Math_SmoothStepToF(&D_i3_801C4308[54], 1.0f, 0.3f, 0.5f, 0.0f); @@ -3256,7 +3256,7 @@ void Aquas_801B134C(Boss* bossAQ) { spD4.x = D_i3_801C4308[73 + 3 * i3]; spD4.y = D_i3_801C4308[74 + 3 * i3]; spD4.z = D_i3_801C4308[75 + 3 * i3]; - func_effect_8007A6F0(&spD4, 0x29400052); + func_effect_8007A6F0(&spD4, NA_SE_EN_P_GUN_APPEAR); } if ((fabsf(D_i3_801C4308[10]) <= 3.0f) || (bossAQ->swork[AQ_SWK_10 + i3] == 0)) { Math_SmoothStepToF(&D_i3_801C4308[52 + i3], 1.0f, 0.1f, 0.5f, 0.0f); @@ -3673,7 +3673,7 @@ void Aquas_801B50E8(Actor* actor) { } actor->health = 0; actor->state = 7; - func_effect_8007A6F0(&actor->obj.pos, 0x29038090); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_AC_ZAKO_DOWN); } switch (actor->state) { @@ -3998,8 +3998,8 @@ void Aquas_801B638C(Actor* actor) { Actor_Despawn(actor); Object_Kill(&actor->obj, actor->sfxSource); - AUDIO_PLAY_SFX(0x1903001D, actor->sfxSource, 4); - func_effect_8007A6F0(&actor->obj.pos, 0x29038090); + AUDIO_PLAY_SFX(NA_SE_OB_MINI_BOMB, actor->sfxSource, 4); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_AC_ZAKO_DOWN); } actor->fwork[5] = (actor->obj.pos.y * 0.01f) + 2.5f; @@ -4120,7 +4120,7 @@ void Aquas_801B638C(Actor* actor) { if ((actor->health != 0) && (actor->dmgPart == 0)) { actor->health -= actor->damage; actor->timer_0C6 = 30; - AUDIO_PLAY_SFX(0x2903408F, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_AC_ZAKO_DAMAGE, actor->sfxSource, 4); if (actor->health <= 0) { actor->health = 0; BonusText_Display(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 200.0f, 3); @@ -4173,7 +4173,7 @@ void Aquas_801B6FF8(Actor* actor) { func_effect_8007D0E0(actor->vwork[i].x, actor->vwork[i].y, actor->vwork[i].z + 100.0f, 6.0f); } Object_Kill(&actor->obj, actor->sfxSource); - func_effect_8007A6F0(&actor->obj.pos, 0x29038090); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_AC_ZAKO_DOWN); } switch (actor->state) { @@ -4255,7 +4255,7 @@ void Aquas_801B6FF8(Actor* actor) { actor->hitPos.y + RAND_FLOAT_CENTERED(70.0f), actor->hitPos.z + RAND_FLOAT_CENTERED(70.0f), 1.0f, 1); } - AUDIO_PLAY_SFX(0x2903408F, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_AC_ZAKO_DAMAGE, actor->sfxSource, 4); if (actor->health <= -100) { actor->health = -100; BonusText_Display(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 200.0f, 3); @@ -4419,7 +4419,7 @@ void Aquas_801B7C78(Actor* actor) { actor->itemDrop = DROP_SILVER_RING_25p; Actor_Despawn(actor); Object_Kill(&actor->obj, actor->sfxSource); - func_effect_8007A6F0(&actor->obj.pos, 0x29038090); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_AC_ZAKO_DOWN); } if (actor->state != 6) { @@ -4508,7 +4508,7 @@ void Aquas_801B7C78(Actor* actor) { 1; } actor->timer_0C0 = 10; - AUDIO_PLAY_SFX(0x2900208D, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_WT_SPARK_CHARGE, actor->sfxSource, 4); actor->state = 4; } break; @@ -4552,7 +4552,7 @@ void Aquas_801B7C78(Actor* actor) { effect->unk_44 = 2; effect->timer_50 = 100; actor->iwork[3] = 0; - AUDIO_PLAY_SFX(0x2900308C, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_WT_THROW, actor->sfxSource, 4); } else { effect->obj.pos.x = actor->vwork[21].x; effect->obj.pos.y = actor->vwork[21].y; @@ -4668,7 +4668,7 @@ void Aquas_801B7C78(Actor* actor) { actor->info.bonus = 1; actor->timer_0C6 = 30; actor->health -= actor->damage; - AUDIO_PLAY_SFX(0x2903408F, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_AC_ZAKO_DAMAGE, actor->sfxSource, 4); } else { actor->timer_0BC = 50; } @@ -4834,7 +4834,7 @@ void Aquas_801B91A4(Actor* actor) { func_effect_800815DC(); func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 5.0f); - func_effect_8007A6F0(&actor->obj.pos, 0x29038090); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_AC_ZAKO_DOWN); } switch (actor->state) { @@ -4963,7 +4963,7 @@ void Aquas_801B91A4(Actor* actor) { if ((actor->health != 0) && (actor->state != 0)) { actor->timer_0C6 = 15; actor->health -= actor->damage; - AUDIO_PLAY_SFX(0x2903408F, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_AC_ZAKO_DAMAGE, actor->sfxSource, 4); if (actor->health <= 0) { actor->health = 0; if (actor->scale > 1.0f) { @@ -5167,7 +5167,7 @@ void Aquas_801BA6A4(Actor* actor) { actor->vel.x = SIN_DEG(actor->fwork[1]) * 10.0f; if (actor->obj.pos.y < (gGroundHeight + 30.0f)) { - AUDIO_PLAY_SFX(0x19400007, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_AC_ROCK_BOUND, actor->sfxSource, 4); actor->iwork[1] = 1; actor->vel.x = actor->vel.y = actor->vel.z = 0.0f; actor->gravity = 0.0f; @@ -5196,7 +5196,7 @@ void Aquas_801BA6A4(Actor* actor) { actor->vel.y = 0.0f; } actor->iwork[1] = 1; - AUDIO_PLAY_SFX(0x19400007, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_AC_ROCK_BOUND, actor->sfxSource, 4); func_effect_8007B8F8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 100.0f, actor->scale * 30.0f); } @@ -5245,7 +5245,7 @@ void Aquas_801BA6A4(Actor* actor) { func_effect_8007BC7C(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 130.0f, actor->scale * 30.0f); func_effect_8007BC7C(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 130.0f, actor->scale * 30.0f); Object_Kill(&actor->obj, actor->sfxSource); - func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); } } } @@ -5552,7 +5552,7 @@ void Aquas_801BB79C(Actor* actor) { } } if (((gGameFrameCount % 8) == 0)) { - func_effect_8007A6F0(&sp70->obj.pos, 0x3100208E); + func_effect_8007A6F0(&sp70->obj.pos, NA_SE_EN_WT_SPARK_BEAM); } Aquas_801A92EC(actor, sp70->obj.pos.x, sp70->obj.pos.y, sp70->obj.pos.z, actor->iwork[13], i); @@ -5586,7 +5586,7 @@ void Aquas_801BB79C(Actor* actor) { } } if (((gGameFrameCount % 4) == 0)) { - func_effect_8007A6F0(&sp6C->obj.pos, 0x3100208E); + func_effect_8007A6F0(&sp6C->obj.pos, NA_SE_EN_WT_SPARK_BEAM); } Aquas_801A92EC(actor, sp6C->obj.pos.x, sp6C->obj.pos.y, sp6C->obj.pos.z, actor->iwork[13] + 1, i); @@ -5621,7 +5621,7 @@ void Aquas_801BB79C(Actor* actor) { } } if (((gGameFrameCount % 16) == 0)) { - func_effect_8007A6F0(&sp70->obj.pos, 0x3100208E); + func_effect_8007A6F0(&sp70->obj.pos, NA_SE_EN_WT_SPARK_BEAM); } Aquas_801A92EC(actor, sp70->obj.pos.x, sp70->obj.pos.y, sp70->obj.pos.z, actor->iwork[13] + 2, i); @@ -5740,7 +5740,7 @@ void Aquas_801BB79C(Actor* actor) { if (actor->dmgType != DMG_NONE) { actor->dmgType = DMG_NONE; - AUDIO_PLAY_SFX(0x2903408F, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_AC_ZAKO_DAMAGE, actor->sfxSource, 4); if (actor->damage != 31) { actor->timer_0C0 = actor->timer_0C6 = 40; } else { @@ -5886,7 +5886,7 @@ void Aquas_801BC9A0(Actor* actor) { actor->dmgType = DMG_NONE; if ((actor->health != 0) && (actor->iwork[3] == 0) && (actor->damage == 31)) { actor->health -= actor->damage; - AUDIO_PLAY_SFX(0x2903B009, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, actor->sfxSource, 4); if (actor->health <= 0) { actor->health = 0; actor->state = 3; @@ -5965,7 +5965,7 @@ void Aquas_801BC9A0(Actor* actor) { actor->itemDrop = D_i3_801C04C4[actor->iwork[1]]; Actor_Despawn(actor); Object_Kill(&actor->obj, actor->sfxSource); - func_effect_8007A6F0(&actor->obj.pos, 0x19021078); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_OB_AC_PILLAR_BROKE); } break; @@ -5981,7 +5981,7 @@ void Aquas_801BC9A0(Actor* actor) { if ((actor->obj.pos.y < (gGroundHeight + 30.0f)) && (actor->iwork[2] == 0)) { actor->iwork[2] = 1; actor->vel.x = actor->vel.y = actor->vel.z = actor->gravity = 0.0f; - func_effect_8007A6F0(&actor->obj.pos, 0x19400007); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_OB_AC_ROCK_BOUND); for (j = 0; j < 6; j++) { func_effect_8007B8F8(actor->obj.pos.x + RAND_FLOAT_CENTERED(100.0f), actor->obj.pos.y + RAND_RANGE(-9.0f, 21.0f), @@ -6086,7 +6086,7 @@ void Aquas_801BD54C(Actor* actor) { if (fabsf(actor->fwork[5] - actor->obj.pos.z) >= var_fs0) { actor->state = 3; if (actor->iwork[0] == 0) { - AUDIO_PLAY_SFX(0x19400077, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_FISH_AWAY, actor->sfxSource, 4); } } else { // needed to match diff --git a/src/overlays/ovl_i3/fox_so.c b/src/overlays/ovl_i3/fox_so.c index 00e58e0b..fdc00b24 100644 --- a/src/overlays/ovl_i3/fox_so.c +++ b/src/overlays/ovl_i3/fox_so.c @@ -253,7 +253,7 @@ void Solar_8019EA7C(Actor* actor) { if ((actor->unk_046 == 0) || (actor->unk_046 == 1)) { actor->unk_046 = 3; func_edisplay_8005F0E8(actor->sfxSource, &actor->obj.pos); - AUDIO_PLAY_SFX(0x11002052, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_MAGMA_WAVE, actor->sfxSource, 0); } if (func_play_800A73E4(&sp34, &sp30, actor->obj.pos.x, -100.0f, actor->obj.pos.z)) { D_ctx_801782EC[sp30] = actor->fwork[0]; @@ -295,7 +295,7 @@ void Solar_8019EA7C(Actor* actor) { } switch (actor->dmgType) { case 3: - Solar_801A8DB8(&actor->obj.pos, 0x11002052, actor->vel.z); + Solar_801A8DB8(&actor->obj.pos, NA_SE_OB_MAGMA_WAVE, actor->vel.z); /* fallthrough */ case 2: Object_Kill(&actor->obj, actor->sfxSource); @@ -307,23 +307,30 @@ void Solar_8019EF30(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yV Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; actor->obj.id = OBJ_ACTOR_275; + if (Rand_ZeroOne() < 0.1f) { actor->obj.id = OBJ_ACTOR_276; } + actor->obj.pos.x = xPos; actor->obj.pos.y = yPos; actor->obj.pos.z = zPos; + actor->unk_0F4.x = RAND_FLOAT(360.0f); + actor->vel.x = xVel; actor->vel.y = yVel; actor->vel.z = zVel; + actor->state = 2; actor->timer_0C2 = 8; + Object_SetInfo(&actor->info, actor->obj.id); + if (gBossActive != 0) { actor->info.bonus = 0; } - AUDIO_PLAY_SFX(0x29000071, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_SNROCK_APPEAR, actor->sfxSource, 0); } void Solar_8019F038(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel) { @@ -354,7 +361,7 @@ void Solar_8019F0B0(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yV if (gBossActive != 0) { actor->info.bonus = 0; } - AUDIO_PLAY_SFX(0x29000071, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_SNROCK_APPEAR, actor->sfxSource, 0); } void Solar_8019F194(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel) { @@ -419,13 +426,13 @@ void Solar_8019F20C(Actor* actor) { RAND_FLOAT(10.0f) + 10.0f, 0.0f, actor->scale * 5.0f, 1); } actor->timer_0C2 = 5; - AUDIO_PLAY_SFX(0x29000071, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_SNROCK_APPEAR, actor->sfxSource, 0); break; case 2: actor->gravity = 0.5f; if (func_play_800A73E4(&sp8C, &sp88, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z)) { Object_Kill(&actor->obj, actor->sfxSource); - func_effect_8007A6F0(&actor->obj.pos, 0x29000072); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_OB_SNROCK_DISAPPEAR); for (i = 0; i < 4; i++) { Solar_8019E9F4(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, D_i3_801BF8E0[i], RAND_FLOAT(10.0f) + 10.0f, 0.0f, actor->scale * 5.0f, 1); @@ -462,7 +469,7 @@ void Solar_8019F20C(Actor* actor) { Solar_8019E9F4(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), 0.0f, (RAND_FLOAT(2.0f) + 2.0f) * actor->scale, 1); } - func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); } break; } @@ -659,7 +666,7 @@ void Solar_801A003C(Actor* actor) { actor->timer_0BE = 50; actor->unk_04E = 0; func_edisplay_8005F0E8(actor->sfxSource, &actor->obj.pos); - AUDIO_PLAY_SFX(0x19035053, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, actor->sfxSource, 4); } break; } @@ -700,7 +707,7 @@ void Solar_801A0120(Effect* effect) { if (func_play_800A73E4(&sp5C, &sp4C, effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z)) { effect->unk_48 = 1; if (effect->scale2 == 20.0f) { - AUDIO_PLAY_SFX(0x19035054, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_IN_PROMINENCE, effect->sfxSource, 4); } } else { effect->unk_48 = 0; @@ -771,7 +778,7 @@ void Solar_801A0120(Effect* effect) { if (func_play_800A73E4(&sp5C, &sp4C, effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z)) { effect->unk_48 = 1; if (effect->scale2 == 20.0f) { - AUDIO_PLAY_SFX(0x19035054, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_IN_PROMINENCE, effect->sfxSource, 4); } } else { effect->unk_48 = 0; @@ -801,12 +808,12 @@ void Solar_801A0120(Effect* effect) { if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) { func_effect_8007A774(&gPlayer[0], effect, effect->scale2 * 18.0f); if ((effect->unk_4C == 0) && ((effect->scale2 >= 9.8f) || (effect->scale2 <= 4.4f))) { - AUDIO_PLAY_SFX(0x31033078, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_BREATH, effect->sfxSource, 4); } } else { effect->vel.z += 65.0f; if (fabsf(gBosses[0].obj.pos.z - effect->obj.pos.z) >= 2000.0f) { - Audio_KillSfxBySourceAndId(effect->sfxSource, 0x31033078); + Audio_KillSfxBySourceAndId(effect->sfxSource, NA_SE_EN_SNBOSS_BREATH); } } break; @@ -825,10 +832,10 @@ void Solar_801A0120(Effect* effect) { if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) { func_effect_8007A774(&gPlayer[0], effect, effect->scale2 * 18.0f); if ((effect->unk_4C == 0) && ((effect->scale2 >= 9.8f) || (effect->scale2 <= 4.4f))) { - AUDIO_PLAY_SFX(0x31033078, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_BREATH, effect->sfxSource, 4); } } else if (fabsf(gBosses[0].obj.pos.z - effect->obj.pos.z) >= 2000.0f) { - Audio_KillSfxBySourceAndId(effect->sfxSource, 0x31033078); + Audio_KillSfxBySourceAndId(effect->sfxSource, NA_SE_EN_SNBOSS_BREATH); } break; } @@ -930,7 +937,7 @@ void Solar_801A0DF8(f32 xPos, f32 zPos, f32 yRot, s32 index, f32 yPos) { gActors[sp2C].unk_04E = 0; gActors[sp2C].obj.pos.y = -1.0f * yPos; func_edisplay_8005F0E8(gActors[sp2C].sfxSource, &gActors[sp2C].obj.pos); - AUDIO_PLAY_SFX(0x19035053, gActors[sp2C].sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, gActors[sp2C].sfxSource, 4); } } @@ -949,7 +956,7 @@ void Solar_801A0FD4(Actor* actor, s32 index) { actor->obj.rot.x = 0.0f; actor->obj.rot.y = 180.0f; Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } } @@ -988,7 +995,7 @@ void Solar_LevelStart(Player* player) { gFillScreenAlpha = 255; gFillScreenAlphaTarget = 0; Solar_801A0DF8(-750.0f, -2600.0f, 300.0f, 2, 1.0f); - AUDIO_PLAY_SFX(0x3140807E, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_MAGMA_BUBBLE, player->sfxSource, 0); break; case 1: gPathTexScroll += 30.0f; @@ -1048,7 +1055,7 @@ void Solar_LevelStart(Player* player) { Solar_801A0FD4(&gActors[2], 2); gCsCamAtZ = -3000.0f; gCsCamEyeZ = -3400.0f; - Audio_KillSfxBySourceAndId(player->sfxSource, 0x3140807E); + Audio_KillSfxBySourceAndId(player->sfxSource, NA_SE_OB_MAGMA_BUBBLE); AUDIO_PLAY_BGM(SEQ_ID_INTRO_51); func_display_80057814(player); Audio_StartPlayerNoise(gPlayerNum); @@ -1083,7 +1090,7 @@ void Solar_LevelStart(Player* player) { RAND_FLOAT_CENTERED(2000.0f) + 500.0f + gPathProgress, RAND_FLOAT(20.0f) + 20.0f); } if (gCsFrameCount == 615) { - func_play_800A6028(player->sfxSource, 0x09000002); + func_play_800A6028(player->sfxSource, NA_SE_ARWING_BOOST); gActors[0].fwork[29] = gActors[1].fwork[29] = gActors[2].fwork[29] = 5.0f; gActors[0].state = 3; gActors[1].state = 2; @@ -1129,7 +1136,7 @@ void Solar_LevelStart(Player* player) { D_ctx_80177950 = 1.0f; Audio_SetHeatAlarmParams(255, 3); - AUDIO_PLAY_SFX(0x4100C023, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OVERHEAT_ALARM, gDefaultSfxSource, 4); gLoadLevelObjects = 1; gFillScreenAlphaTarget = 0; player->csTimer = 15; @@ -1263,7 +1270,7 @@ void Solar_801A1F80(Boss* bossSO) { } if (gBossFrameCount == 60) { gActors[10].dmgType = DMG_COLLISION; - AUDIO_PLAY_SFX(0x19036053, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_OUT_MAGMA, bossSO->sfxSource, 4); } if (bossSO->timer_050 == 100) { bossSO->unk_04C = 0; @@ -1324,10 +1331,10 @@ void Solar_801A23F4(Boss* bossSO) { } if (bossSO->unk_04C == 29) { func_edisplay_8005F0E8(bossSO->sfxSource, &bossSO->obj.pos); - AUDIO_PLAY_SFX(0x19035053, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, bossSO->sfxSource, 4); } if (bossSO->unk_04C == 80) { - AUDIO_PLAY_SFX(0x29432077, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_SWING, bossSO->sfxSource, 4); } if (bossSO->unk_04C >= 94) { bossSO->info.hitbox[38] = 220.0f; @@ -1351,10 +1358,10 @@ void Solar_801A23F4(Boss* bossSO) { } if (bossSO->unk_04C == 10) { func_edisplay_8005F0E8(bossSO->sfxSource, &bossSO->obj.pos); - AUDIO_PLAY_SFX(0x19035053, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, bossSO->sfxSource, 4); } if (bossSO->unk_04C == 50) { - AUDIO_PLAY_SFX(0x29432077, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_SWING, bossSO->sfxSource, 4); } if (bossSO->unk_04C >= 85) { bossSO->info.hitbox[20] = 220.0f; @@ -1404,10 +1411,10 @@ void Solar_801A23F4(Boss* bossSO) { } if (bossSO->obj.rot.y >= 360.0f) { bossSO->obj.rot.y -= 360.0f; - AUDIO_PLAY_SFX(0x39033079, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_ROLL, bossSO->sfxSource, 4); } if (bossSO->unk_04C == 1) { - AUDIO_PLAY_SFX(0x39033079, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_ROLL, bossSO->sfxSource, 4); } if (bossSO->unk_04C >= 100) { Math_SmoothStepToAngle(&bossSO->obj.rot.y, 0.0f, 1.0f, 2.0f, 1.0f); @@ -1443,10 +1450,10 @@ void Solar_801A23F4(Boss* bossSO) { } if (bossSO->unk_04C == 5) { func_edisplay_8005F0E8(bossSO->sfxSource, &bossSO->obj.pos); - AUDIO_PLAY_SFX(0x19035053, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, bossSO->sfxSource, 4); } if (bossSO->unk_04C == 20) { - AUDIO_PLAY_SFX(0x29432077, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_SWING, bossSO->sfxSource, 4); } if (bossSO->unk_04C > 36) { bossSO->info.hitbox[20] = 220.0f; @@ -1494,7 +1501,7 @@ void Solar_801A2C98(Boss* bossSO) { } if (bossSO->unk_04C == 20) { gActors[10].dmgType = DMG_COLLISION; - AUDIO_PLAY_SFX(0x19036054, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_IN_MAGMA, bossSO->sfxSource, 4); } if (bossSO->unk_04C == 0) { bossSO->state++; @@ -1528,7 +1535,7 @@ void Solar_801A2C98(Boss* bossSO) { } if (bossSO->swork[SO_SWK_11] == 50) { gActors[9].dmgType = DMG_COLLISION; - AUDIO_PLAY_SFX(0x19036053, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_OUT_MAGMA, bossSO->sfxSource, 4); } } } @@ -1555,7 +1562,7 @@ void Solar_801A3128(Boss* bossSO) { } if (bossSO->unk_04C == 40) { gActors[10].dmgType = DMG_COLLISION; - AUDIO_PLAY_SFX(0x19036054, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_IN_MAGMA, bossSO->sfxSource, 4); } if (bossSO->unk_04C == 0) { bossSO->state++; @@ -1605,7 +1612,7 @@ void Solar_801A3128(Boss* bossSO) { } if (bossSO->swork[SO_SWK_11] == 50) { gActors[9].dmgType = DMG_COLLISION; - AUDIO_PLAY_SFX(0x19036053, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_OUT_MAGMA, bossSO->sfxSource, 4); } } } @@ -1647,10 +1654,10 @@ void Solar_801A3510(Boss* bossSO) { } if (bossSO->unk_04C == 29) { func_edisplay_8005F0E8(bossSO->sfxSource, &bossSO->obj.pos); - AUDIO_PLAY_SFX(0x19035053, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, bossSO->sfxSource, 4); } if (bossSO->unk_04C == 80) { - AUDIO_PLAY_SFX(0x29432077, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_SWING, bossSO->sfxSource, 4); } if (bossSO->unk_04C == 94) { Solar_801A0DF8(bossSO->fwork[SO_FWK_13], bossSO->fwork[SO_FWK_15], RAND_FLOAT_CENTERED(60.0f), 4, 2.0f); @@ -1665,10 +1672,10 @@ void Solar_801A3510(Boss* bossSO) { Math_SmoothStepToAngle(&bossSO->obj.rot.x, 20.0f, 0.1f, 10.0f, 0.1f); if (bossSO->unk_04C == 10) { func_edisplay_8005F0E8(bossSO->sfxSource, &bossSO->obj.pos); - AUDIO_PLAY_SFX(0x19035053, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, bossSO->sfxSource, 4); } if (bossSO->unk_04C == 50) { - AUDIO_PLAY_SFX(0x29432077, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_SWING, bossSO->sfxSource, 4); } if (bossSO->unk_04C == 60) { Solar_801A0D90(bossSO->obj.pos.x, bossSO->obj.pos.z + 1600.0f, 80.0f, 2); @@ -1696,7 +1703,7 @@ void Solar_801A3510(Boss* bossSO) { break; case 8: if (bossSO->unk_04C == 65) { - AUDIO_PLAY_SFX(0x31033078, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_BREATH, bossSO->sfxSource, 4); bossSO->timer_050 = 30; } if (bossSO->timer_050 != 0) { @@ -1709,7 +1716,7 @@ void Solar_801A3510(Boss* bossSO) { bossSO->fwork[SO_FWK_6] + 300.0f); } if (bossSO->unk_04C == 75) { - Audio_KillSfxBySourceAndId(bossSO->sfxSource, 0x31033078); + Audio_KillSfxBySourceAndId(bossSO->sfxSource, NA_SE_EN_SNBOSS_BREATH); } if (bossSO->unk_04C == 99) { bossSO->swork[SO_SWK_1] = 5; @@ -1719,7 +1726,7 @@ void Solar_801A3510(Boss* bossSO) { case 9: bossSO->unk_04C++; if (bossSO->unk_04C == 66) { - AUDIO_PLAY_SFX(0x31033078, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_BREATH, bossSO->sfxSource, 4); bossSO->timer_050 = 30; } if (bossSO->timer_050 != 0) { @@ -1734,7 +1741,7 @@ void Solar_801A3510(Boss* bossSO) { bossSO->fwork[SO_FWK_6] + 300.0f); } if (bossSO->unk_04C == 76) { - Audio_KillSfxBySourceAndId(bossSO->sfxSource, 0x31033078); + Audio_KillSfxBySourceAndId(bossSO->sfxSource, NA_SE_EN_SNBOSS_BREATH); } if (bossSO->unk_04C >= 99) { Solar_801A30CC(bossSO); @@ -1760,13 +1767,13 @@ void Solar_801A3C4C(Boss* bossSO) { bossSO->swork[SO_SWK_10] = 20; if (bossSO->health > 0.0f) { - AUDIO_PLAY_SFX(0x29433074, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_DAMAGE, bossSO->sfxSource, 4); } if (bossSO) {} } bossSO->timer_058 = 20; if ((bossSO->dmgPart >= 1) && (bossSO->dmgPart <= 3) && (bossSO->swork[SO_SWK_2] != 0)) { - AUDIO_PLAY_SFX(0x29433074, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_DAMAGE, bossSO->sfxSource, 4); bossSO->swork[SO_SWK_2] -= bossSO->damage; if (bossSO->swork[SO_SWK_2] < 0) { bossSO->swork[SO_SWK_2] = 0; @@ -1782,7 +1789,7 @@ void Solar_801A3C4C(Boss* bossSO) { } } if ((bossSO->dmgPart >= 4) && (bossSO->dmgPart <= 6) && (bossSO->swork[SO_SWK_3] != 0)) { - AUDIO_PLAY_SFX(0x29433074, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_DAMAGE, bossSO->sfxSource, 4); bossSO->swork[SO_SWK_3] -= bossSO->damage; if (bossSO->swork[SO_SWK_3] < 0) { bossSO->swork[SO_SWK_3] = 0; @@ -1813,8 +1820,8 @@ void Solar_801A3C4C(Boss* bossSO) { gControllerRumbleTimers[gMainController] = 10; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); - Audio_KillSfxById(0x4100C023); - AUDIO_PLAY_SFX(0x2940D09A, bossSO->sfxSource, 4); + Audio_KillSfxById(NA_SE_OVERHEAT_ALARM); + AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, bossSO->sfxSource, 4); if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].csTimer = 0; @@ -1875,7 +1882,7 @@ void Solar_801A4214(Boss* bossSO) { bossSO->unk_04C = 50; bossSO->state++; gShowBossHealth = false; - AUDIO_PLAY_SFX(0x39439076, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_DOWN, bossSO->sfxSource, 4); Solar_801A1E14(bossSO->fwork[SO_FWK_4], bossSO->fwork[SO_FWK_5] + 300.0f, bossSO->fwork[SO_FWK_6], bossSO->fwork[SO_FWK_1], bossSO->fwork[SO_FWK_2], 73.0f, RAND_FLOAT_CENTERED(50.0f), 80.0f, 40.0f, 8); @@ -1938,7 +1945,7 @@ void Solar_801A4214(Boss* bossSO) { D_i3_801C2768[13] = 0.0f; } if (gCsFrameCount == 230) { - AUDIO_PLAY_SFX(0x2940F026, gActors[5].sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_STAR_EXPLOSION, gActors[5].sfxSource, 4); D_ctx_801779A8[gMainController] = 120.0f; } if (gCsFrameCount == 250) { @@ -1965,7 +1972,7 @@ void Solar_801A4214(Boss* bossSO) { void Solar_801A48B8(Boss* bossSO) { s32 i; - AUDIO_PLAY_SFX(0x29434075, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_BROKEN, bossSO->sfxSource, 4); gControllerRumbleFlags[gMainController] = 1; gControllerRumbleTimers[gMainController] = 10; if (bossSO->swork[SO_SWK_0] != 6) { @@ -2020,11 +2027,11 @@ void Solar_801A4A34(Boss* bossSO) { } switch (bossSO->unk_04C) { case 30: - AUDIO_PLAY_SFX(0x29433074, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_DAMAGE, bossSO->sfxSource, 4); /* fallthrough */ case 35: case 97: - AUDIO_PLAY_SFX(0x29434075, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_BROKEN, bossSO->sfxSource, 4); break; } if (bossSO->unk_04C == 119) { @@ -2064,13 +2071,13 @@ void Solar_801A4EF8(Boss* bossSO) { bossSO->unk_04C = 56; } if (bossSO->obj.rot.y == 0.0f) { - AUDIO_PLAY_SFX(0x39033079, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_ROLL, bossSO->sfxSource, 4); } bossSO->fwork[SO_FWK_31] += 0.5f; bossSO->obj.rot.y += bossSO->fwork[SO_FWK_31]; if (bossSO->obj.rot.y >= 360.0f) { bossSO->obj.rot.y -= 360.0f; - AUDIO_PLAY_SFX(0x39033079, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_ROLL, bossSO->sfxSource, 4); } bossSO->unk_078.y = bossSO->obj.rot.y; break; @@ -2079,7 +2086,7 @@ void Solar_801A4EF8(Boss* bossSO) { bossSO->unk_04C = 56; if (bossSO->obj.rot.y >= 360.0f) { bossSO->obj.rot.y -= 360.0f; - AUDIO_PLAY_SFX(0x39033079, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_ROLL, bossSO->sfxSource, 4); } if (bossSO->swork[SO_SWK_11] <= 45) { Math_SmoothStepToF(&bossSO->obj.pos.y, -1000.0f, 0.1f, 20.0f, 0.1f); @@ -2127,7 +2134,7 @@ void Solar_801A4EF8(Boss* bossSO) { bossSO->unk_04C = 98; bossSO->unk_078.y += bossSO->fwork[SO_FWK_31]; if (bossSO->swork[SO_SWK_11] == 170) { - AUDIO_PLAY_SFX(0x29432073, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_CRY, bossSO->sfxSource, 4); bossSO->obj.pos.y = -500.0f; gActors[9].dmgType = DMG_EXPLOSION; } @@ -2373,7 +2380,7 @@ void Solar_801A5B3C(Boss* bossSO) { case 0: bossSO->unk_04C++; if (bossSO->unk_04C == 75) { - AUDIO_PLAY_SFX(0x29432073, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_CRY, bossSO->sfxSource, 4); } if (bossSO->unk_04C >= Animation_GetFrameCount(&D_SO_601388C)) { if (bossSO->health != 0) { @@ -2419,7 +2426,7 @@ void Solar_801A5B3C(Boss* bossSO) { case 9: bossSO->unk_04C++; if ((bossSO->unk_04C == 45) && (bossSO->health != 0)) { - AUDIO_PLAY_SFX(0x29432073, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_CRY, bossSO->sfxSource, 4); } if (bossSO->unk_04C >= Animation_GetFrameCount(&D_SO_6012C00)) { bossSO->unk_04C = 0; @@ -2476,7 +2483,7 @@ void Solar_801A5B3C(Boss* bossSO) { Math_SmoothStepToVec3fArray(sp50, bossSO->vwork, 1, sp1BC, bossSO->fwork[SO_FWK_0], 100.0f, 0.0f); if ((bossSO->dmgType != DMG_NONE) && (bossSO->health > 0)) { bossSO->dmgType = DMG_NONE; - AUDIO_PLAY_SFX(0x29121007, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, bossSO->sfxSource, 4); if (!((bossSO->swork[SO_SWK_0] == 0) || (bossSO->swork[SO_SWK_0] == 2) || (bossSO->swork[SO_SWK_0] == 3) || (bossSO->swork[SO_SWK_0] == 6) || ((bossSO->swork[SO_SWK_0] == 7) && (bossSO->state == 2)))) { Solar_801A3C4C(bossSO); @@ -2796,7 +2803,7 @@ void Solar_801A7750(void) { actor->state = 1; Object_SetInfo(&actor->info, actor->obj.id); actor->iwork[11] = 1; - AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } } @@ -3079,7 +3086,7 @@ void Solar_LevelComplete(Player* player) { gShowLevelClearStatusScreen = 0; break; case 1460: - AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, player->sfxSource, 0); player->unk_190 = player->unk_194 = 5.0f; break; case 1400: @@ -3144,7 +3151,7 @@ void Solar_801A8BE8(Actor* actor) { break; case 2: actor->state = 3; - AUDIO_PLAY_SFX(0x09000002, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); actor->fwork[29] = 5.0f; /* fallthrough */ case 3: diff --git a/src/overlays/ovl_i3/fox_zo.c b/src/overlays/ovl_i3/fox_zo.c index f7c2d992..9b29c3c0 100644 --- a/src/overlays/ovl_i3/fox_zo.c +++ b/src/overlays/ovl_i3/fox_zo.c @@ -648,7 +648,7 @@ void Zoness_801904CC(Actor* actor) { Actor_Despawn(actor); Object_Kill(&actor->obj, actor->sfxSource); func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 4.0f); - func_effect_8007A6F0(&actor->obj.pos, 0x29018036); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_BIRD_DOWN); break; } actor->unk_0B6++; @@ -660,7 +660,7 @@ void Zoness_801904CC(Actor* actor) { if (actor->state > 0) { actor->timer_0C6 = 15; actor->health -= actor->damage; - AUDIO_PLAY_SFX(0x29033037, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_BIRD_DAMAGE, actor->sfxSource, 4); if (actor->health <= 0) { actor->health = 0; actor->state = 1; @@ -725,16 +725,16 @@ void Zoness_80190A00(Actor* actor) { func_play_800A73E4(&sp2C, &sp28, actor->obj.pos.x, actor->obj.pos.y - 50.0f, actor->obj.pos.z)) { func_effect_8008377C(actor->obj.pos.x, sp2C, actor->obj.pos.z + 150.0f, 0.0f, 1.7f); if (actor->vel.y >= 0.0f) { - AUDIO_PLAY_SFX(0x1983201A, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OUT_SPLASH_L, actor->sfxSource, 4); } else { - AUDIO_PLAY_SFX(0x19832019, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_IN_SPLASH_L, actor->sfxSource, 4); } actor->timer_0C0 = 30; } Zoness_80190790(actor); if (actor->dmgType != DMG_NONE) { actor->dmgType = DMG_NONE; - AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); } } @@ -872,9 +872,9 @@ void Zoness_80191010(Actor* actor) { if (func_play_800A73E4(&sp7C, &sp70, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z) && (actor->iwork[0] < 2) && (actor->timer_0C0 == 0)) { if (var_fs0 == 5.0f) { - AUDIO_PLAY_SFX(0x1983201A, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OUT_SPLASH_L, actor->sfxSource, 4); } else { - AUDIO_PLAY_SFX(0x19832019, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_IN_SPLASH_L, actor->sfxSource, 4); } actor->timer_0C0 = 10; actor->iwork[0] += 1; @@ -889,9 +889,9 @@ void Zoness_80191010(Actor* actor) { actor->itemDrop = DROP_SILVER_RING_25p; Actor_Despawn(actor); func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 3.0f); - AUDIO_PLAY_SFX(0x2903A008, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_S, actor->sfxSource, 4); Object_Kill(&actor->obj, actor->sfxSource); - func_effect_8007A6F0(&actor->obj.pos, 0x29018036); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_BIRD_DOWN); break; } if ((actor->dmgType != DMG_NONE) && (actor->health != 0)) { @@ -957,12 +957,12 @@ void Zoness_80191680(Actor* actor) { actor->dmgType = DMG_NONE; actor->timer_0C6 = 15; actor->health -= actor->damage; - AUDIO_PLAY_SFX(0x29033037, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_BIRD_DAMAGE, actor->sfxSource, 4); if (actor->health <= 0) { actor->health = actor->itemDrop = 0; Actor_Despawn(actor); actor->state = 1; - AUDIO_PLAY_SFX(0x29018036, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_BIRD_DOWN, actor->sfxSource, 4); } } actor->unk_0B6++; @@ -1040,14 +1040,14 @@ void Zoness_80191BC4(Actor* actor) { if ((actor->vel.y != 0.0f) && (actor->iwork[1] == 0)) { actor->iwork[1] = 1; - AUDIO_PLAY_SFX(0x2900201D, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_FALLING_DOWN, actor->sfxSource, 4); } if (func_play_800A73E4(&sp4C, &sp48, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z) && (actor->state == 0)) { func_effect_8007B344(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 20.0f, 7); func_effect_8007C120(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.5f, 50); Object_Kill(&actor->obj, actor->sfxSource); actor->iwork[0] = 0; - func_effect_8007A6F0(&actor->obj.pos, 0x1903001D); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_OB_MINI_BOMB); } actor->fwork[0] += 10.0f; Zoness_8018FF50(actor); @@ -1137,9 +1137,9 @@ void Zoness_80192094(Actor* actor) { func_effect_8008377C(actor->obj.pos.x, spB8, actor->obj.pos.z + 100.0f, 0.0f, 1.5f); actor->iwork[0] += 1; if (actor->vel.y >= 0.0f) { - AUDIO_PLAY_SFX(0x1983201A, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OUT_SPLASH_L, actor->sfxSource, 4); } else { - AUDIO_PLAY_SFX(0x19832019, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_IN_SPLASH_L, actor->sfxSource, 4); } } switch (actor->state) { @@ -1319,17 +1319,18 @@ void Zoness_80192834(Actor* actor) { Actor_Despawn(actor); Object_Kill(&actor->obj, actor->sfxSource); func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 3.0f); - func_effect_8007A6F0(&actor->obj.pos, 0x29018036); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_BIRD_DOWN); break; } + if ((actor->iwork[0] == 0) && (func_play_800A73E4(&sp74, &sp70, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z) != 0)) { actor->iwork[0]++; func_effect_8008377C(actor->obj.pos.x, sp74, actor->obj.pos.z, 0.0f, 0.7f); if (actor->vel.y >= 0.0f) { - AUDIO_PLAY_SFX(0x1983201A, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OUT_SPLASH_L, actor->sfxSource, 4); } else { - AUDIO_PLAY_SFX(0x19832019, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_IN_SPLASH_L, actor->sfxSource, 4); } } } @@ -1447,7 +1448,7 @@ void Zoness_80192E64(Actor* actor) { actor->state = 3; } } else { - AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); } actor->dmgType = DMG_NONE; } @@ -2100,9 +2101,9 @@ void Zoness_80194A84(Boss* bossZO) { } func_effect_8008377C(sZoFwork[ZO_BSF_43_X], sp134, sZoFwork[ZO_BSF_43_Z] + 100.0f, sp100, spFC); if (bossZO->timer_050 == 43) { - AUDIO_PLAY_SFX(0x1983201A, bossZO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OUT_SPLASH_L, bossZO->sfxSource, 4); } else { - AUDIO_PLAY_SFX(0x19832019, bossZO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_IN_SPLASH_L, bossZO->sfxSource, 4); } bossZO->swork[ZO_SWK_12]++; } @@ -2721,7 +2722,7 @@ void Zoness_80194A84(Boss* bossZO) { dmgType = bossZO->dmgType; bossZO->dmgType = DMG_NONE; if (dmgType == DMG_BEAM) { - AUDIO_PLAY_SFX(0x29121007, bossZO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, bossZO->sfxSource, 4); } switch (bossZO->dmgPart) { case 0: @@ -2747,7 +2748,7 @@ void Zoness_80194A84(Boss* bossZO) { spD8.x = sZoFwork[ZO_BSF_29_X]; spD8.y = sZoFwork[ZO_BSF_29_Y]; spD8.z = sZoFwork[ZO_BSF_29_Z]; - func_effect_8007A6F0(&spD8, 0x2903A008); + func_effect_8007A6F0(&spD8, NA_SE_EN_EXPLOSION_S); } } break; @@ -2762,7 +2763,7 @@ void Zoness_80194A84(Boss* bossZO) { spD8.x = sZoFwork[ZO_BSF_32_X]; spD8.y = sZoFwork[ZO_BSF_32_Y]; spD8.z = sZoFwork[ZO_BSF_32_Z]; - func_effect_8007A6F0(&spD8, 0x2903A008); + func_effect_8007A6F0(&spD8, NA_SE_EN_EXPLOSION_S); } } break; @@ -2777,7 +2778,7 @@ void Zoness_80194A84(Boss* bossZO) { spD8.x = sZoFwork[ZO_BSF_29_X]; spD8.y = sZoFwork[ZO_BSF_29_Y]; spD8.z = sZoFwork[ZO_BSF_29_Z]; - func_effect_8007A6F0(&spD8, 0x2903A008); + func_effect_8007A6F0(&spD8, NA_SE_EN_EXPLOSION_S); } } if ((sZoSwork[ZO_BSS_10] != 0) && (bossZO->state == 3) && (dmgType == DMG_BOMB) && @@ -2790,7 +2791,7 @@ void Zoness_80194A84(Boss* bossZO) { spD8.x = sZoFwork[ZO_BSF_32_X]; spD8.y = sZoFwork[ZO_BSF_32_Y]; spD8.z = sZoFwork[ZO_BSF_32_Z]; - func_effect_8007A6F0(&spD8, 0x2903A008); + func_effect_8007A6F0(&spD8, NA_SE_EN_EXPLOSION_S); } } /* fallthrough */ @@ -2801,19 +2802,19 @@ void Zoness_80194A84(Boss* bossZO) { sZoLimbTimers[ZO_LIMB_25] = sZoLimbTimers[ZO_LIMB_36] = 15; bossZO->health -= bossZO->damage; if (bossZO->health < 150) { - AUDIO_PLAY_SFX(0x2943500F, bossZO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_KNOCK_DOWN, bossZO->sfxSource, 4); } else { - AUDIO_PLAY_SFX(0x29034003, bossZO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, bossZO->sfxSource, 4); } if (bossZO->health <= 0) { gTeamLowHealthMsgTimer = -1; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 40); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 40); Audio_KillSfxBySource(bossZO->sfxSource); - AUDIO_PLAY_SFX(0x2940D09A, bossZO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, bossZO->sfxSource, 4); sZoSwork[ZO_BSS_8] = bossZO->health = sZoSwork[ZO_BSS_24] = 0; bossZO->timer_050 = 100; - AUDIO_PLAY_SFX(0x2940D09A, bossZO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, bossZO->sfxSource, 4); sZoFwork[ZO_BSF_27] = 20.0f; sZoFwork[ZO_BSF_26] = 50.0f; sZoFwork[ZO_BSF_28] = -2600.0f; @@ -2835,7 +2836,7 @@ void Zoness_80194A84(Boss* bossZO) { spD8.x = sZoFwork[ZO_BSF_52_X]; spD8.y = sZoFwork[ZO_BSF_52_Y]; spD8.z = sZoFwork[ZO_BSF_52_Z]; - func_effect_8007A6F0(&spD8, 0x2940983C); + func_effect_8007A6F0(&spD8, NA_SE_EN_SINK_PARTS); } } break; @@ -2857,7 +2858,7 @@ void Zoness_80194A84(Boss* bossZO) { spD8.x = sZoFwork[ZO_BSF_106_X]; spD8.y = sZoFwork[ZO_BSF_106_Y]; spD8.z = sZoFwork[ZO_BSF_106_Z]; - func_effect_8007A6F0(&spD8, 0x2940983C); + func_effect_8007A6F0(&spD8, NA_SE_EN_SINK_PARTS); sZoSwork[ZO_BSS_16] = 0; ZO_HIT_8(bossZO, 0)->z.offset = ZO_HIT_10(bossZO, 0)->z.offset = 100000.0f; bossZO->state = 4; @@ -2883,7 +2884,7 @@ void Zoness_80194A84(Boss* bossZO) { spCC.x = sZoFwork[ZO_BSF_109_X]; spCC.y = sZoFwork[ZO_BSF_109_Y]; spCC.z = sZoFwork[ZO_BSF_109_Z]; - func_effect_8007A6F0(&spCC, 0x2940983C); + func_effect_8007A6F0(&spCC, NA_SE_EN_SINK_PARTS); sZoSwork[ZO_BSS_16] = 0; ZO_HIT_8(bossZO, 1)->z.offset = ZO_HIT_10(bossZO, 1)->z.offset = 100000.0f; bossZO->state = 4; @@ -2956,29 +2957,29 @@ void Zoness_80194A84(Boss* bossZO) { spCC.y = sZoFwork[ZO_BSF_109_Y]; spCC.z = sZoFwork[ZO_BSF_109_Z]; if ((sZoSwork[ZO_BSS_53] & 1) && (sZoSwork[ZO_BSS_11] != 0)) { - func_effect_8007A6F0(&spD8, 0x29034003); + func_effect_8007A6F0(&spD8, NA_SE_OB_DAMAGE_M); } if ((sZoSwork[ZO_BSS_54] & 1) && (sZoSwork[ZO_BSS_12] != 0)) { - func_effect_8007A6F0(&spCC, 0x29034003); + func_effect_8007A6F0(&spCC, NA_SE_OB_DAMAGE_M); } } if (sZoSwork[ZO_BSS_50] & 1) { spD8.x = sZoFwork[ZO_BSF_29_X]; spD8.y = sZoFwork[ZO_BSF_29_Y]; spD8.z = sZoFwork[ZO_BSF_29_Z]; - func_effect_8007A6F0(&spD8, 0x2903300E); + func_effect_8007A6F0(&spD8, NA_SE_EN_DAMAGE_S); } if (sZoSwork[ZO_BSS_51] & 1) { spD8.x = sZoFwork[ZO_BSF_32_X]; spD8.y = sZoFwork[ZO_BSF_32_Y]; spD8.z = sZoFwork[ZO_BSF_32_Z]; - func_effect_8007A6F0(&spD8, 0x2903300E); + func_effect_8007A6F0(&spD8, NA_SE_EN_DAMAGE_S); } if (sZoSwork[ZO_BSS_52] & 1) { spD8.x = sZoFwork[ZO_BSF_52_X]; spD8.y = sZoFwork[ZO_BSF_52_Y]; spD8.z = sZoFwork[ZO_BSF_52_Z]; - func_effect_8007A6F0(&spD8, 0x29034003); + func_effect_8007A6F0(&spD8, NA_SE_OB_DAMAGE_M); } if (func_play_800A73E4(&sp134, &sp130, bossZO->obj.pos.x, bossZO->obj.pos.y - 500.0f, bossZO->obj.pos.z) != 0) { Math_SmoothStepToF(&bossZO->obj.pos.y, sp134 - 20.0f, 0.1f, bossZO->fwork[ZO_FWK_4], 0.0f); @@ -3071,7 +3072,7 @@ void Zoness_801986FC(Boss* bossZO, s32 arg1, f32 xOff, f32 yOff, f32 zOff, f32 y newActor->vel.z = bossZO->vel.z + sp54.z; Object_SetInfo(&newActor->info, newActor->obj.id); sZoFwork[ZO_BSF_35 + arg1] = 40.0f; - AUDIO_PLAY_SFX(0x2903203B, bossZO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_S_BALL_SHOT, bossZO->sfxSource, 4); for (sp50 = 0; sp50 < 4; sp50++) { Zoness_80193C5C(newActor->obj.pos.x + (sp54.x * 4.3f), newActor->obj.pos.y + (sp54.y * 4.3f), newActor->obj.pos.z + (sp54.z * 4.3f) + 100.0f, 30.0f); @@ -3112,7 +3113,7 @@ void Zoness_801989FC(Boss* bossZO) { newActor->vel.x = sp64.x; newActor->vel.z = bossZO->vel.z + sp64.z; Object_SetInfo(&newActor->info, newActor->obj.id); - AUDIO_PLAY_SFX(0x2903101B, bossZO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MISSILE_SHOT, bossZO->sfxSource, 4); break; } } @@ -3128,7 +3129,7 @@ void Zoness_80198BE8(Boss* bossZO, s32 arg1) { if ((sZoSwork[ZO_BSS_2 + arg1] == 0) && (sZoSwork[ZO_BSS_39 + arg1] == 0)) { if ((arg1 == 0) && (sZoSwork[ZO_BSS_41] == 0)) { - AUDIO_PLAY_SFX(0x31034025, bossZO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ZOBOSS_BEAM, bossZO->sfxSource, 4); } sZoSwork[ZO_BSS_2 + arg1] = 2; sZoSwork[ZO_BSS_41 + arg1]++; @@ -3136,7 +3137,7 @@ void Zoness_80198BE8(Boss* bossZO, s32 arg1) { sZoSwork[ZO_BSS_41 + arg1] = 0; sZoSwork[ZO_BSS_39 + arg1] = 30; if (arg1 == 1) { - Audio_KillSfxBySourceAndId(bossZO->sfxSource, 0x31034025); + Audio_KillSfxBySourceAndId(bossZO->sfxSource, NA_SE_EN_ZOBOSS_BEAM); } } for (var_s1 = 0, effect = gEffects; var_s1 < 100; var_s1++, effect++) { @@ -3270,7 +3271,7 @@ void Zoness_80199394(Boss* bossZO, s32 arg1) { bossZO->timer_050 = 20; sZoFwork[ZO_BSF_17 + arg1] = sZoFwork[ZO_BSF_77] = 0.0f; sZoSwork[ZO_BSS_16] = 3; - AUDIO_PLAY_SFX(0x29433022, bossZO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_COMBINE, bossZO->sfxSource, 4); } void Zoness_80199470(Boss* bossZO, s32 arg1) { @@ -3326,7 +3327,7 @@ void Zoness_8019969C(Actor* actor) { actor->obj.pos.z -= 100.0f; Actor_Despawn(actor); Object_Kill(&actor->obj, actor->sfxSource); - func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); } actor->dmgType = DMG_NONE; } @@ -3397,7 +3398,7 @@ void Zoness_80199A28(Actor* actor) { (actor->iwork[1] == 0)) { func_effect_8008377C(actor->obj.pos.x, sp3C, actor->obj.pos.z, 0.0f, 0.5f); actor->iwork[1]++; - AUDIO_PLAY_SFX(0x19000020, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ON_SPLASH_S, actor->sfxSource, 4); } Math_SmoothStepToF(&actor->vel.y, -60.0f, 0.5f, 5.0f, 0.00001f); if (actor->obj.pos.y < -30.0f) { @@ -3427,12 +3428,12 @@ void Zoness_80199A28(Actor* actor) { actor->obj.pos.y += 200.0f; Actor_Despawn(actor); Object_Kill(&actor->obj, actor->sfxSource); - func_effect_8007A6F0(&actor->obj.pos, 0x1903400F); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_OB_EXPLOSION_S); } else { if ((fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 800.0f) || (actor->dmgType != DMG_NONE)) { Zoness_801999CC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z); Object_Kill(&actor->obj, actor->sfxSource); - func_effect_8007A6F0(&actor->obj.pos, 0x2903B009); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); } } break; @@ -3478,12 +3479,12 @@ void Zoness_80199F10(Actor* actor) { switch (sZoSwork[ZO_BSS_16]) { /* switch 1; irregular */ case 1: actor->fwork[1] = sZoFwork[ZO_BSF_68_Y] - sZoFwork[ZO_BSF_60_Y]; - AUDIO_PLAY_SFX(0x3100503E, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_PULL_CHAIN1, actor->sfxSource, 4); actor->state++; break; case 2: actor->fwork[1] = sZoFwork[ZO_BSF_71_Y] - sZoFwork[ZO_BSF_60_Y]; - AUDIO_PLAY_SFX(0x3100503E, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_PULL_CHAIN1, actor->sfxSource, 4); actor->state++; break; } @@ -3517,7 +3518,7 @@ void Zoness_80199F10(Actor* actor) { } if (actor->dmgType != DMG_NONE) { if (actor->dmgType == DMG_BEAM) { - AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); } actor->dmgType = DMG_NONE; } @@ -3617,7 +3618,7 @@ void Zoness_8019A5D4(Actor* actor) { actor->timer_0BC = (s32) ((fabsf(sZoFwork[ZO_BSF_28] - -2600.0f) / 100.0f) + 30.0f); actor->timer_0C0 = 3; - AUDIO_PLAY_SFX(0x2900403D, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_M_BALL_SHOT, actor->sfxSource, 4); actor->state++; } break; @@ -3633,7 +3634,7 @@ void Zoness_8019A5D4(Actor* actor) { actor->fwork[5] = actor->vel.y * -3.0f; if (actor->obj.pos.y < -150.0f) { actor->gravity = 0.0f; - AUDIO_PLAY_SFX(0x19003021, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_PULL_CHAIN0, actor->sfxSource, 4); actor->state++; } } @@ -3657,7 +3658,7 @@ void Zoness_8019A5D4(Actor* actor) { if (Object_CheckHitboxCollision(&actor->obj.pos, gBosses[0].info.hitbox, &gBosses[0].obj, 0.0f, 0.0f, 0.0f) != 0) { actor->fwork[6] = 50.0f; - AUDIO_PLAY_SFX(0x19030003, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_METAL_BOUND_M, actor->sfxSource, 4); } actor->vel.z += actor->fwork[6] * 0.8f; actor->vel.y += actor->fwork[6] * 1.4f; @@ -3668,7 +3669,7 @@ void Zoness_8019A5D4(Actor* actor) { if ((sp4C <= 30.0f) && (sp48 <= 30.0f)) { actor->state = 0; Audio_KillSfxBySource(actor->sfxSource); - AUDIO_PLAY_SFX(0x29433022, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_COMBINE, actor->sfxSource, 4); actor->timer_0BC = 40; sZoFwork[ZO_BSF_74] = sZoFwork[ZO_BSF_75] = 0.0f; sZoSwork[ZO_BSS_19] = 1; @@ -3679,7 +3680,7 @@ void Zoness_8019A5D4(Actor* actor) { Zoness_8018FF50(actor); if (actor->dmgType != DMG_NONE) { if (actor->dmgType == DMG_BEAM) { - AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); } actor->dmgType = DMG_NONE; } @@ -3688,9 +3689,9 @@ void Zoness_8019A5D4(Actor* actor) { func_effect_8008377C(actor->obj.pos.x, sp44, actor->obj.pos.z, 0.0f, 0.7f); actor->iwork[0]++; if (actor->vel.y >= 0.0f) { - AUDIO_PLAY_SFX(0x1983201A, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OUT_SPLASH_L, actor->sfxSource, 4); } else { - AUDIO_PLAY_SFX(0x19832019, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_IN_SPLASH_L, actor->sfxSource, 4); } } } @@ -3851,7 +3852,7 @@ void Zoness_8019B1F0(Actor* actor) { } } actor->obj.rot.x = 0.0f; - AUDIO_PLAY_SFX(0x3100203A, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SHIP_ENGINE_L, actor->sfxSource, 4); } void Zoness_8019B548(Actor* actor) { @@ -3924,7 +3925,7 @@ void Zoness_8019B854(Actor* actor) { actor->dmgType = DMG_NONE; actor->timer_0C6 = 15; actor->health -= actor->damage; - AUDIO_PLAY_SFX(0x2903300E, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, actor->sfxSource, 4); } switch (actor->state) { case 0: @@ -3972,7 +3973,7 @@ void Zoness_8019B854(Actor* actor) { Actor_Despawn(actor); } Object_Kill(&actor->obj, actor->sfxSource); - func_effect_8007A6F0(&actor->obj.pos, 0x1903901C); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_OB_BROKEN_BOX); break; } } @@ -4076,7 +4077,7 @@ void Zoness_8019BE48(Actor* actor) { func_effect_8008377C(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 5.0f, 0.7f); func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y + 50.0f, actor->obj.pos.z, 5.0f); Object_Kill(&actor->obj, actor->sfxSource); - func_effect_8007A6F0(&actor->obj.pos, 0x29038033); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_WT_EXPLOSION_S); break; } if ((actor->state < 2) && @@ -4158,7 +4159,7 @@ void Zoness_8019C454(Actor* actor) { Math_SmoothStepToAngle(&actor->fwork[6], 10.0f, 0.1f, 1.0f, 0.01f); Math_SmoothStepToAngle(&actor->obj.rot.y, actor->fwork[5], 1.0f, actor->fwork[6], 0.01f); if (actor->fwork[5] != actor->obj.rot.y) { - AUDIO_PLAY_SFX(0x1900001B, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_CRAME_MOTOR, actor->sfxSource, 4); } if (1) {} } @@ -4386,15 +4387,15 @@ void Zoness_8019D15C(Actor* actor) { if (actor->dmgType != DMG_NONE) { actor->dmgType = DMG_NONE; if (actor->dmgPart < 2) { - AUDIO_PLAY_SFX(0x1903001E, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_WT_WHEEL_ROLL, actor->sfxSource, 4); if ((actor->obj.pos.y + 268.0f) < actor->hitPos.y) { actor->fwork[1] = 20.0f; } else { actor->fwork[1] = -20.0f; } - AUDIO_PLAY_SFX(0x1903001F, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_WALL_UP, actor->sfxSource, 4); } else { - AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); } } if (actor->unk_046 != 0) { @@ -4718,7 +4719,7 @@ void Zoness_LevelComplete(Player* player) { gShowLevelClearStatusScreen = 0; break; case 1180: - AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, player->sfxSource, 0); player->unk_190 = player->unk_194 = 5.0f; break; case 1240: @@ -4792,7 +4793,7 @@ void Zoness_8019E5F0(Actor* actor) { break; case 2: actor->state = 3; - AUDIO_PLAY_SFX(0x09000002, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); actor->fwork[29] = 5.0f; /* fallthrough */ case 3: diff --git a/src/overlays/ovl_i4/fox_bo.c b/src/overlays/ovl_i4/fox_bo.c index 481e6099..62439a96 100644 --- a/src/overlays/ovl_i4/fox_bo.c +++ b/src/overlays/ovl_i4/fox_bo.c @@ -114,7 +114,7 @@ void Bolse_8018BD60(Actor* this) { actor->itemDrop = DROP_SILVER_RING_50p; actor->aiType = i; Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); break; } } @@ -142,7 +142,7 @@ void Bolse_SpawnEnemies(Actor* this, s32 count) { } else { enemy->obj.pos.x = D_i4_8019EEE4[this->unk_04E]; enemy->obj.pos.y = 50.0f; - AUDIO_PLAY_SFX(0x2903305F, enemy->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_PASS, enemy->sfxSource, 4); enemy->timer_0BC = 5; enemy->timer_0C2 = 100; enemy->unk_0F4.x = 90.0f; @@ -184,7 +184,7 @@ void Bolse_SpawnEnemies(Actor* this, s32 count) { } Object_SetInfo(&enemy->info, enemy->obj.id); - AUDIO_PLAY_SFX(0x3100000C, enemy->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, enemy->sfxSource, 4); this->unk_04E++; if (this->unk_04E >= 5) { @@ -269,8 +269,8 @@ void Bolse_UpdateEventHandler(Actor* this) { } AllRange_ClearRadio(); this->state = 6; - AUDIO_PLAY_SFX(0x31009063, this->sfxSource, 0); - AUDIO_PLAY_SFX(0x2940D09A, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ANDORF_EXPLOSION, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, this->sfxSource, 4); gScreenFlashTimer = 8; for (actor = &gActors[10], i = 0; i < 20; i++, actor++) { @@ -620,7 +620,7 @@ bool Bolse_8018D278(Actor* actor) { } } - func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); actor->itemDrop = DROP_SILVER_RING; @@ -698,7 +698,7 @@ bool Bolse_8018D584(Actor* actor) { if ((actor->dmgPart < 2) && (actor->state == 0)) { actor->timer_0C6 = 20; actor->dmgType = DMG_NONE; - AUDIO_PLAY_SFX(0x29024003, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_M, actor->sfxSource, 0); actor->health += actor->damage; if (actor->health < 100) { @@ -723,10 +723,10 @@ bool Bolse_8018D584(Actor* actor) { func_effect_8007B344(actor->obj.pos.x, actor->obj.pos.y + 730.0f, actor->obj.pos.z, 10.0f, 5); actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_BO_6011BA4); - Audio_KillSfxBySourceAndId(actor->sfxSource, 0x11000028); - AUDIO_PLAY_SFX(0x2903B009, actor->sfxSource, 0); + Audio_KillSfxBySourceAndId(actor->sfxSource, NA_SE_OB_SPARK_BEAM); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, actor->sfxSource, 0); } else { - func_effect_8007A6F0(&actor->obj.pos, 0x29121007); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_REFLECT); } return true; @@ -1039,7 +1039,7 @@ void Bolse_8018EAEC(Actor* actor, s32 index) { actor->unk_0F4.y = D_i4_8019F018[index]; Object_SetInfo(&actor->info, actor->obj.id); actor->iwork[11] = 1; - AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } void Bolse_8018EC1C(void) { @@ -1087,7 +1087,7 @@ void Bolse_8018ED44(void) { actor->unk_0B6 = 31; actor->vel.z = 200.0f; Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(0x29002002, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SHOT_0, actor->sfxSource, 4); break; } } @@ -1111,7 +1111,7 @@ void Bolse_8018EE4C(f32 x, f32 y) { actor->obj.rot.z = RAND_FLOAT_CENTERED(120.0f); actor->unk_0F4.z = RAND_FLOAT_CENTERED(1.0f); Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(0x29002002, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SHOT_0, actor->sfxSource, 4); break; } } @@ -1353,7 +1353,7 @@ void Bolse_8018F83C(Actor* actor, s32 arg1) { actor->vel.z = -gPlayer[0].baseSpeed; Object_SetInfo(&actor->info, actor->obj.id); actor->iwork[11] = 1; - AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } void Bolse_LevelComplete(Player* player) { @@ -1385,7 +1385,7 @@ void Bolse_LevelComplete(Player* player) { if (player->csTimer == 0) { player->csState = 1; player->csTimer = 200; - AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, player->sfxSource, 0); player->unk_194 = 5.0f; player->unk_190 = 5.0f; gProjectFar = 30000.0f; @@ -1453,7 +1453,7 @@ void Bolse_LevelComplete(Player* player) { gGroundHeight = -10000.0f; player->unk_240 = 1; player->wings.modelId = 1; - AUDIO_PLAY_SFX(0x31009063, actor50->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_EN_ANDORF_EXPLOSION, actor50->sfxSource, 0); Audio_StartPlayerNoise(0); } break; @@ -1501,7 +1501,7 @@ void Bolse_LevelComplete(Player* player) { case 95: Audio_KillSfxBySource(actor50->sfxSource); - AUDIO_PLAY_SFX(0x2902F026, gActors[0].sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_EN_BOSS_EXPLOSION, gActors[0].sfxSource, 0); for (i = 0; i < ARRAY_COUNT(gEffects); i++) { Object_Kill(&gEffects[i].obj, gEffects[i].sfxSource); @@ -1605,7 +1605,7 @@ void Bolse_LevelComplete(Player* player) { player->csTimer = 50; player->unk_194 = 5.0f; player->unk_190 = 5.0f; - AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, player->sfxSource, 0); break; } break; @@ -1759,7 +1759,7 @@ void Bolse_80190D98(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 effect->vel.y = dest.y; effect->vel.z = dest.z; effect->timer_50 = 60; - AUDIO_PLAY_SFX(0x31000013, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_LONG_BEAM, effect->sfxSource, 4); Object_SetInfo(&effect->info, effect->obj.id); } @@ -1876,7 +1876,7 @@ void Bolse_801912FC(Boss* boss) { boss->state = 2; Radio_PlayMessage(gMsg_ID_11150, RCID_PEPPY); boss->timer_050 = 1000; - AUDIO_PLAY_SFX(0x19034041, boss->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_BO_CORE_APPEAR, boss->sfxSource, 0); } break; @@ -1887,7 +1887,7 @@ void Bolse_801912FC(Boss* boss) { if (boss->timer_050 == 1) { boss->timer_050 = 2000; Radio_PlayMessage(gMsg_ID_11160, RCID_PEPPY); - Audio_KillSfxBySourceAndId(boss->sfxSource, 0x19034041); + Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_BO_CORE_APPEAR); } break; @@ -1918,7 +1918,7 @@ void Bolse_801912FC(Boss* boss) { boss->swork[boss->dmgPart] -= boss->damage; if (boss->swork[boss->dmgPart] <= 0) { boss->swork[24 + boss->dmgPart] = 30; - AUDIO_PLAY_SFX(0x2903B009, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, boss->sfxSource, 4); boss->swork[36]--; if (boss->swork[36] <= 0) { boss->state = 10; @@ -1929,7 +1929,7 @@ void Bolse_801912FC(Boss* boss) { boss->obj.pos.y -= 300.0f; } else { boss->swork[12 + boss->dmgPart] = 20; - AUDIO_PLAY_SFX(0x29034003, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, boss->sfxSource, 4); } } } @@ -2064,7 +2064,7 @@ void Bolse_80191BAC(Boss* boss) { Math_SmoothStepToF(&gBosses[0].fwork[1], 0.0f, 1.0f, 0.01f, 0.001f); if (boss->timer_052 == 0) { boss->state = 2; - AUDIO_PLAY_SFX(0x19401048, boss->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_BARRIER_RELEASE, boss->sfxSource, 0); } break; } @@ -2135,7 +2135,7 @@ void Bolse_80191ED8(void) { actor->obj.status = OBJ_INIT; actor->obj.id = gLevelObjects[i].id; if ((actor->obj.id == OBJ_ACTOR_271) && (gAllRangeCheckpoint == 0)) { - AUDIO_PLAY_SFX(0x11000028, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_SPARK_BEAM, actor->sfxSource, 0); } actor->fwork[10] = actor->obj.pos.x = gLevelObjects[i].xPos; actor->fwork[11] = actor->obj.pos.y = gLevelObjects[i].yPos; diff --git a/src/overlays/ovl_i4/fox_fo.c b/src/overlays/ovl_i4/fox_fo.c index c58375c5..06510360 100644 --- a/src/overlays/ovl_i4/fox_fo.c +++ b/src/overlays/ovl_i4/fox_fo.c @@ -57,7 +57,7 @@ void Fortuna_801875F0(Actor* actor) { actorPtr->unk_0C9 = actorPtr->iwork[11] = 1; actorPtr->itemDrop = DROP_SILVER_RING_50p; Object_SetInfo(&actorPtr->info, actorPtr->obj.id); - AUDIO_PLAY_SFX(0x31000011, actorPtr->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ENGINE_01, actorPtr->sfxSource, 4); break; } } @@ -88,7 +88,7 @@ void Fortuna_80187884(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 arg4) { actor->iwork[11] = 1; actor->unk_0F4.x = 0.0f; Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(0x31004005, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_WOLF_ENGINE, actor->sfxSource, 4); } Vec3f D_i4_8019EDF8[] = { { -300.0f, 1000.0f, 13000.0f }, { 300.0f, 700.0f, 14000.0f }, { 1000.0f, 300.0f, 0.0f } }; @@ -134,7 +134,7 @@ void Fortuna_UpdateEvents(Actor* actor) { } if (gAllRangeEventTimer == 7000) { - AUDIO_PLAY_SFX(0x11030016, gBosses[0].sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EXPLOSION_DEMO2, gBosses[0].sfxSource, 4); AllRange_ClearRadio(); Radio_PlayMessage(gMsg_ID_9390, RCID_ROB64); gAllRangeCountdownScale = 1.0f; @@ -207,7 +207,7 @@ void Fortuna_UpdateEvents(Actor* actor) { gPlayer[0].csTimer = 50; player->unk_190 = 5.0f; player->unk_194 = 5.0f; - AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, player->sfxSource, 0); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 30); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 30); } else { @@ -496,7 +496,7 @@ void Fortuna_80188AD0(Actor* actor) { actor->info.targetOffset = 0.0f; actor->lockOnTimers[TEAM_ID_FOX] = 0; actor->info.bonus = 0; - AUDIO_PLAY_SFX(0x2903B009, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, actor->sfxSource, 4); } } @@ -619,14 +619,14 @@ void Fortuna_801890EC(Actor* actor, s32 arg1) { if (arg1 < 3) { actor->iwork[11] = 1; - AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } else { actor->obj.pos.z = -9500.0f; actor->unk_0B6 = 1; actor->vel.z = 22.0f; - AUDIO_PLAY_SFX(0x11030010, actor->sfxSource, 0); - AUDIO_PLAY_SFX(0x31024059, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, actor->sfxSource, 0); } } @@ -726,7 +726,7 @@ void Fortuna_LevelComplete(Player* player) { } player->unk_194 = 5.0f; player->unk_190 = 5.0f; - AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, player->sfxSource, 0); } break; @@ -1021,7 +1021,7 @@ void Fortuna_LevelComplete(Player* player) { D_ctx_80177A48[4] = 1.0f; actor2->vel.y = 0.1f; actor1->vel.y = 0.1f; - AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, player->sfxSource, 0); player->unk_194 = 5.0f; player->unk_190 = 5.0f; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); @@ -1041,7 +1041,7 @@ void Fortuna_LevelComplete(Player* player) { if (gTeamShields[TEAM_ID_FALCO] > 0) { if (player->csTimer == 980) { - AUDIO_PLAY_SFX(0x09000002, actor3->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor3->sfxSource, 0); actor3->vel.y = 1.0f; actor3->fwork[29] = 5.0f; } @@ -1054,7 +1054,7 @@ void Fortuna_LevelComplete(Player* player) { } if ((gTeamShields[TEAM_ID_PEPPY] > 0) && (player->csTimer == 960)) { - AUDIO_PLAY_SFX(0x09000002, actor2->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor2->sfxSource, 0); actor2->vel.y = 1.0f; actor2->fwork[29] = 5.0f; } @@ -1068,7 +1068,7 @@ void Fortuna_LevelComplete(Player* player) { if (gTeamShields[TEAM_ID_SLIPPY] > 0) { if (player->csTimer == 940) { - AUDIO_PLAY_SFX(0x09000002, actor1->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor1->sfxSource, 0); actor1->vel.y = 1.0f; actor1->fwork[29] = 5.0f; } @@ -1278,7 +1278,7 @@ void Fortuna_LevelComplete(Player* player) { case 1240: if (gTeamShields[TEAM_ID_FALCO] > 0) { - AUDIO_PLAY_SFX(0x09000002, actor3->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor3->sfxSource, 0); actor3->fwork[29] = 5.0f; actor3->iwork[11] = 2; } @@ -1286,7 +1286,7 @@ void Fortuna_LevelComplete(Player* player) { case 1260: if (gTeamShields[TEAM_ID_SLIPPY] > 0) { - AUDIO_PLAY_SFX(0x09000002, actor1->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor1->sfxSource, 0); actor1->fwork[29] = 5.0f; actor1->iwork[11] = 2; } @@ -1294,7 +1294,7 @@ void Fortuna_LevelComplete(Player* player) { case 1280: if (gTeamShields[TEAM_ID_PEPPY] > 0) { - AUDIO_PLAY_SFX(0x09000002, actor2->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor2->sfxSource, 0); actor2->fwork[29] = 5.0f; actor2->iwork[11] = 2; } @@ -1302,7 +1302,7 @@ void Fortuna_LevelComplete(Player* player) { break; case 1300: - AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, player->sfxSource, 0); player->unk_190 = 2.0f; player->unk_194 = 5.0f; break; diff --git a/src/overlays/ovl_i4/fox_ka.c b/src/overlays/ovl_i4/fox_ka.c index d7172832..22cc20cd 100644 --- a/src/overlays/ovl_i4/fox_ka.c +++ b/src/overlays/ovl_i4/fox_ka.c @@ -321,7 +321,7 @@ void Katina_StartCutsceneUpdate(void) { actor->unk_0C9 = 1; actor->iwork[KA_ACTOR_IWORK_11] = 1; Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(0x31000011, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ENGINE_01, actor->sfxSource, 4); } } } @@ -474,7 +474,7 @@ void Katina_LevelStart(Player* player) { func_effect_800794CC(gActors[5].obj.pos.x, gActors[5].obj.pos.y, gActors[5].obj.pos.z, 1.0f); } - func_effect_8007A6F0(&gActors[5].obj.pos, 0x2903B009); + func_effect_8007A6F0(&gActors[5].obj.pos, NA_SE_EN_EXPLOSION_M); break; case 47: @@ -568,7 +568,7 @@ void Katina_BaseUpdate(Frontlinebase* this) { if (this->dmgType != DMG_NONE) { this->dmgType = DMG_NONE; - AUDIO_PLAY_SFX(0x29121007, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } } @@ -617,7 +617,7 @@ void Katina_Hatch_Destroy(Saucerer* this, s32 hatchIdx) { pos.y = this->obj.pos.y + (this->vwork[hatchIdx + 1].y * 1.3f); pos.z = this->obj.pos.z + (this->vwork[hatchIdx + 1].z * 1.3f); - func_effect_8007A6F0(&pos, 0x2903B009); + func_effect_8007A6F0(&pos, NA_SE_EN_EXPLOSION_M); this->swork[BOSS_HATCH_DESTROY_COUNT]++; @@ -655,7 +655,7 @@ void Katina_BossHandleDamage(Saucerer* this) { sfxSource.y = (this->vwork[1 + this->dmgPart].y * 1.3f) + this->obj.pos.y; sfxSource.z = (this->vwork[1 + this->dmgPart].z * 1.3f) + this->obj.pos.z; - func_effect_8007A6F0(&sfxSource, 0x29034003); + func_effect_8007A6F0(&sfxSource, NA_SE_OB_DAMAGE_M); if (this->swork[10 + this->dmgPart] <= 0) { this->swork[10 + this->dmgPart] = 0; @@ -673,9 +673,9 @@ void Katina_BossHandleDamage(Saucerer* this) { this->swork[BOSS_CORE_HP] -= this->damage; if (this->swork[BOSS_CORE_HP] < 100) { - func_effect_8007A6F0(&this->obj.pos, 0x2943500F); + func_effect_8007A6F0(&this->obj.pos, NA_SE_EN_KNOCK_DOWN); } else { - func_effect_8007A6F0(&this->obj.pos, 0x29034003); + func_effect_8007A6F0(&this->obj.pos, NA_SE_OB_DAMAGE_M); } if (this->swork[BOSS_CORE_HP] <= 0) { @@ -700,7 +700,7 @@ void Katina_BossHandleDamage(Saucerer* this) { this->obj.pos.z + dest.z, 1.6f); } - AUDIO_PLAY_SFX(0x2940D09A, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, this->sfxSource, 4); gScreenFlashTimer = 8; this->state = 20; @@ -790,7 +790,7 @@ void Katina_BossSpawnEnemies(Saucerer* this, Vec3f* pos, f32 arg2) { Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(0x2903305F, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_PASS, actor->sfxSource, 4); actor->info.action = (ObjectFunc) Katina_EnemyUpdate; actor->info.draw = (ObjectFunc) Katina_EnemyDraw; @@ -873,7 +873,7 @@ void Katina_BossUpdate(Saucerer* this) { this->unk_05E = 1; - AUDIO_PLAY_SFX(0x11000011, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_EARTHQUAKE, this->sfxSource, 0); D_i4_801A0548 = 100.0f; D_i4_801A0544 = 100.0f; @@ -887,7 +887,7 @@ void Katina_BossUpdate(Saucerer* this) { Radio_PlayMessage(gMsg_ID_18030, RCID_BILL); - AUDIO_PLAY_SFX(0x11037025, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_KT_UFO_ENGINE, this->sfxSource, 0); } } break; @@ -994,7 +994,7 @@ void Katina_BossUpdate(Saucerer* this) { if (this->timer_050 == 0) { this->state++; this->timer_050 = 60; - AUDIO_PLAY_SFX(0x1903203F, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_KT_UFO_HATCH_OPEN, this->sfxSource, 0); this->fwork[BOSS_HATCH_1_ANGLE_TARGET] = 30.0f; this->fwork[BOSS_HATCH_2_ANGLE_TARGET] = 30.0f; this->fwork[BOSS_HATCH_3_ANGLE_TARGET] = 30.0f; @@ -1010,7 +1010,7 @@ void Katina_BossUpdate(Saucerer* this) { this->state++; this->timer_050 = 100; this->timer_052 = 310; - AUDIO_PLAY_SFX(0x19034042, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_KT_UFO_HATCH_STOP, this->sfxSource, 0); } break; @@ -1028,7 +1028,7 @@ void Katina_BossUpdate(Saucerer* this) { } if (this->timer_052 == 0) { - AUDIO_PLAY_SFX(0x19032040, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_KT_UFO_HATCH_CLOSE, this->sfxSource, 0); this->state++; @@ -1067,7 +1067,7 @@ void Katina_BossUpdate(Saucerer* this) { */ case 6: if (this->timer_052 == 1) { - AUDIO_PLAY_SFX(0x19034042, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_KT_UFO_HATCH_STOP, this->sfxSource, 0); } if (this->timer_050 == 0) { @@ -1082,7 +1082,7 @@ void Katina_BossUpdate(Saucerer* this) { this->state = 7; this->timer_050 = 300; - AUDIO_PLAY_SFX(0x1903203F, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_KT_UFO_HATCH_OPEN, this->sfxSource, 0); this->fwork[BOSS_Y_ROT_SPEED_TARGET] = 0.0f; this->fwork[BOSS_HATCH_4_ANGLE_TARGET] = 30.0f; @@ -1106,7 +1106,7 @@ void Katina_BossUpdate(Saucerer* this) { } if (this->timer_050 == 240) { - AUDIO_PLAY_SFX(0x19034042, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_KT_UFO_HATCH_STOP, this->sfxSource, 0); } if (this->timer_050 == 0) { @@ -1117,7 +1117,7 @@ void Katina_BossUpdate(Saucerer* this) { this->fwork[BOSS_HATCH_1_ANGLE_TARGET] = 0.0f; this->timer_056 = 1920; this->timer_052 = 70; - AUDIO_PLAY_SFX(0x19032040, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_KT_UFO_HATCH_CLOSE, this->sfxSource, 0); } break; @@ -1127,8 +1127,8 @@ void Katina_BossUpdate(Saucerer* this) { case 10: if (this->timer_050 == 0) { this->fwork[BOSS_CORE_TARGET_LEVEL] = 200.0f; - AUDIO_PLAY_SFX(0x19032041, this->sfxSource, 0); - Audio_KillSfxBySourceAndId(this->sfxSource, 0x11037025); + AUDIO_PLAY_SFX(NA_SE_KT_UFO_CORE_OPEN, this->sfxSource, 0); + Audio_KillSfxBySourceAndId(this->sfxSource, NA_SE_KT_UFO_ENGINE); this->state = 11; this->timer_050 = 100; Radio_PlayMessage(gMsg_ID_18050, RCID_BILL); @@ -1145,11 +1145,11 @@ void Katina_BossUpdate(Saucerer* this) { */ case 11: if (this->timer_050 == 0) { - AUDIO_PLAY_SFX(0x19034042, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_KT_UFO_HATCH_STOP, this->sfxSource, 0); this->state = 12; this->timer_050 = 1928; Radio_PlayMessage(gMsg_ID_18055, RCID_BILL); - AUDIO_PLAY_SFX(0x11034043, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_KT_UFO_LONG_CHARGE, this->sfxSource, 0); } break; @@ -1252,8 +1252,8 @@ void Katina_BossUpdate(Saucerer* this) { D_i4_801A0558 = 50.0f; D_i4_801A0554 = 50.0f; - Audio_KillSfxBySourceAndId(this->sfxSource, 0x11034043); - AUDIO_PLAY_SFX(0x19406044, this->sfxSource, 0); + Audio_KillSfxBySourceAndId(this->sfxSource, NA_SE_KT_UFO_LONG_CHARGE); + AUDIO_PLAY_SFX(NA_SE_KT_UFO_LAST_CHARGE, this->sfxSource, 0); } break; @@ -1309,7 +1309,7 @@ void Katina_BossUpdate(Saucerer* this) { i = gGameFrameCount % 64U; Object_Kill(&gEffects[i].obj, gEffects[i].sfxSource); func_effect_8007B344(this->obj.pos.x, this->obj.pos.y - 600.0f, this->obj.pos.z, 90.0f, 0); - AUDIO_PLAY_SFX(0x1140B045, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_KT_UFO_BEAM, this->sfxSource, 0); } if (this->timer_052 == 690) { @@ -1353,7 +1353,7 @@ void Katina_BossUpdate(Saucerer* this) { gBosses[KA_BOSS_BASE].state = 1; this->state = 18; this->timer_050 = 50; - AUDIO_PLAY_SFX(0x11038046, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_EXPLOSION_DEMO3, this->sfxSource, 0); } break; @@ -1419,7 +1419,7 @@ void Katina_BossUpdate(Saucerer* this) { this->obj.pos.x = -4000.0f; this->unk_078.z = 7.0f; - AUDIO_PLAY_SFX(0x11404016, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_KT_UFO_FALLING, this->sfxSource, 0); for (i = 0; i < ARRAY_COUNT(gEffects); i++) { Object_Kill(&gEffects[i].obj, gEffects[i].sfxSource); @@ -1437,7 +1437,7 @@ void Katina_BossUpdate(Saucerer* this) { this->obj.pos.z += this->unk_078.z; if (this->timer_050 == 820) { - AUDIO_PLAY_SFX(0x19408047, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_KT_UFO_BOUND, this->sfxSource, 0); } if (this->timer_050 > 820) { @@ -1719,7 +1719,7 @@ void Katina_SFTeamMissionAccomUpdate(ActorCutscene* this, s32 idx) { this->iwork[KA_ACTOR_IWORK_11] = 1; - AUDIO_PLAY_SFX(0x3100000C, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); } /** @@ -1745,7 +1745,7 @@ void Katina_SFTeamFleeUpdate(ActorCutscene* this, s32 idx) { this->iwork[KA_ACTOR_IWORK_11] = 1; - AUDIO_PLAY_SFX(0x3100000C, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); } /** @@ -1792,7 +1792,7 @@ void Katina_SFTeam_LevelComplete_Update(void) { actor->iwork[KA_ACTOR_IWORK_11] = 1; - AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } } } @@ -1994,7 +1994,7 @@ void Katina_LevelComplete(Player* player) { break; case 1010: - AUDIO_PLAY_SFX(0x09000002, &player->sfxSource[0], 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, &player->sfxSource[0], 0); player->unk_190 = player->unk_194 = 5.0f; break; @@ -2118,7 +2118,7 @@ void Katina_SFTeamFlyTowardsCamera(ActorCutscene* this) { case 2: this->state = 3; - AUDIO_PLAY_SFX(0x09000002, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, this->sfxSource, 0); this->fwork[KA_ACTOR_FWORK_29] = 5.0f; case 3: @@ -2216,7 +2216,7 @@ void Katina_801981F8(Actor* this) { if (actor->unk_0B6 == 1) { actor->info.targetOffset = 0.0f; actor->info.bonus = 0; - AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } actor->info.action = (ObjectFunc) Katina_EnemyUpdate; actor->info.draw = (ObjectFunc) Katina_EnemyDraw; @@ -2251,7 +2251,7 @@ void Katina_BillFighterInit(void) { actor->info.targetOffset = 0.0f; actor->info.bonus = 0; - AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } void Katina_UpdateEvents(ActorAllRange* this) { @@ -2273,7 +2273,7 @@ void Katina_UpdateEvents(ActorAllRange* this) { gBosses[KA_BOSS_MOTHERSHIP].obj.pos.z = 0.0f; gBosses[KA_BOSS_MOTHERSHIP].obj.pos.y = 2000.0f; - AUDIO_PLAY_SFX(0x11037025, gBosses[KA_BOSS_MOTHERSHIP].sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_KT_UFO_ENGINE, gBosses[KA_BOSS_MOTHERSHIP].sfxSource, 0); gAllRangeEventTimer = 20000; diff --git a/src/overlays/ovl_i4/fox_sz.c b/src/overlays/ovl_i4/fox_sz.c index 7adf6a90..e46eb186 100644 --- a/src/overlays/ovl_i4/fox_sz.c +++ b/src/overlays/ovl_i4/fox_sz.c @@ -33,7 +33,7 @@ void SectorZ_80199900(Actor* actor, s32 arg1) { gScreenFlashTimer = 8; Object_Kill(&actor->obj, actor->sfxSource); - func_effect_8007A6F0(&actor->obj.pos, 0x2903A060); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_MS_EXPLOSION_S); for (i = 0; i < 20; i++) { func_effect_800794CC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 1.0f); @@ -52,8 +52,8 @@ void SectorZ_80199900(Actor* actor, s32 arg1) { gPlayer[0].csState = 1000; gActors[0].state = 6; gPlayer[0].csTimer = 30; - AUDIO_PLAY_SFX(0x11030010, gActors[0].sfxSource, 0); - AUDIO_PLAY_SFX(0x31024059, gActors[0].sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, gActors[0].sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, gActors[0].sfxSource, 0); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); } @@ -200,7 +200,7 @@ void SectorZ_80199FCC(Actor* actor, s32 arg1) { actor->fwork[1] = 25.0f; actor->fwork[29] = 2.0f; - AUDIO_PLAY_SFX(0x3103A061, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_PUNCH_ENGINE, actor->sfxSource, 4); } void SectorZ_8019A0F8(Actor* actor, s32 arg1) { @@ -247,7 +247,7 @@ void SectorZ_8019A1D0(void) { actor->info.targetOffset = 0.0f; - AUDIO_PLAY_SFX(0x31000011, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ENGINE_01, actor->sfxSource, 4); } void SectorZ_8019A2F4(Actor* actor) { @@ -386,7 +386,7 @@ void SectorZ_8019A3E8(Actor* actor) { actorPtr->itemDrop = DROP_SILVER_RING_50p; actorPtr->timer_0C2 = 30; Object_SetInfo(&actorPtr->info, actorPtr->obj.id); - AUDIO_PLAY_SFX(0x31000011, actorPtr->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ENGINE_01, actorPtr->sfxSource, 4); actor->unk_04E++; break; } @@ -580,7 +580,7 @@ void SectorZ_UpdateEvents(Actor* actor) { gFillScreenAlpha = gFillScreenAlphaTarget = 0; switch (actor->timer_0BC) { case 9800: - AUDIO_PLAY_SFX(0x09000002, gActors[10].sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, gActors[10].sfxSource, 0); gActors[10].fwork[29] = 12.0f; break; @@ -688,7 +688,7 @@ void SectorZ_8019B568(void) { actor->unk_0B6 = 1; actor->vel.x = -20.0f; Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(0x11030010, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); } Vec3f D_i4_8019F57C[] = { { 150.0f, 150.0f, 50.0f }, { -150.0f, -150.0f, 50.0f }, { -150.0f, 150.0f, 50.0f }, { 150.0f, -150.0f, 50.0f } @@ -715,7 +715,7 @@ void SectorZ_8019B630(Actor* actor, s32 index) { actor->unk_0B6 = 26; actor->iwork[11] = 1; Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(0x31000011, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ENGINE_01, actor->sfxSource, 4); } Vec3f D_i4_8019F5BC[] = { @@ -738,8 +738,8 @@ void SectorZ_8019B75C(Actor* actor, s32 arg1) { Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); - AUDIO_PLAY_SFX(0x09000002, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); actor->fwork[29] = 5.0f; } @@ -768,7 +768,7 @@ void SectorZ_8019B888(void) { actor->unk_0F4.y = 270.0f; actor->health = 255; actor->iwork[11] = 1; - AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); actor->info.hitbox = SEGMENTED_TO_VIRTUAL(gTeamHitbox); actor->info.unk_16 = 0; actor->info.targetOffset = 0.0f; @@ -929,7 +929,7 @@ void SectorZ_LevelStart(Player* player) { } if (gCsFrameCount == 820) { - Audio_KillSfxById(0x49000014); + Audio_KillSfxById(NA_SE_DEMO_SIREN); player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_01C = player->unk_018 = player->unk_014 = 0.f; AUDIO_PLAY_BGM(gBgmSeqId); @@ -940,7 +940,7 @@ void SectorZ_LevelStart(Player* player) { switch (gCsFrameCount) { case 20: - AUDIO_PLAY_SFX(0x49000014, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_DEMO_SIREN, gDefaultSfxSource, 4); break; case 330: @@ -994,7 +994,7 @@ void SectorZ_LevelStart(Player* player) { player->yRot_114 = 90.0f; player->baseSpeed = gArwingSpeed; player->unk_234 = 1; - AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, player->sfxSource, 0); break; } @@ -1054,13 +1054,13 @@ void SectorZ_8019C574(Actor* actor, s32 index) { if (index < 3) { actor->iwork[11] = 1; - AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } else { actor->unk_0B6 = 1; actor->fwork[0] = 20.0f; - AUDIO_PLAY_SFX(0x11030010, actor->sfxSource, 0); - AUDIO_PLAY_SFX(0x31024059, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, actor->sfxSource, 0); } } @@ -1090,7 +1090,7 @@ void SectorZ_8019C70C(void) { actor->timer_0BC = 130; Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } void SectorZ_LevelComplete(Player* player) { @@ -1118,7 +1118,7 @@ void SectorZ_LevelComplete(Player* player) { if (player->csTimer == 0) { player->csState = 1001; player->csTimer = 100; - AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, player->sfxSource, 0); player->unk_194 = 5.0f; player->unk_190 = 5.0f; gProjectFar = 30000.0f; @@ -1188,7 +1188,7 @@ void SectorZ_LevelComplete(Player* player) { for (i = 0; i < ARRAY_COUNT(gActors); i++) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); } - AUDIO_PLAY_SFX(0x31024059, boss0->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, boss0->sfxSource, 0); break; case 1: @@ -1515,7 +1515,7 @@ void SectorZ_LevelComplete(Player* player) { break; case 2510: - AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, player->sfxSource, 0); player->unk_190 = player->unk_194 = 5.0f; break; @@ -1579,7 +1579,7 @@ void SectorZ_8019DD20(Actor* actor) { switch (actor->state) { case 1: actor->state = 2; - AUDIO_PLAY_SFX(0x09000002, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); actor->fwork[29] = 5.0f; case 2: @@ -1621,7 +1621,7 @@ void SectorZ_8019DD20(Actor* actor) { break; case 430: - AUDIO_PLAY_SFX(0x09000002, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); actor->fwork[29] = 8.0f; break; @@ -1681,7 +1681,7 @@ void SectorZ_8019E234(Actor* actor) { actor->timer_0C6 = 20; actor->dmgType = DMG_NONE; actor->health -= actor->damage; - AUDIO_PLAY_SFX(0x2903300E, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, actor->sfxSource, 4); if (actor->health <= 0) { func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, 5.0f, 10); Actor_Despawn(actor); @@ -1692,7 +1692,7 @@ void SectorZ_8019E234(Actor* actor) { func_effect_800794CC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 1.0f); } Object_Kill(&actor->obj, actor->sfxSource); - func_effect_8007A6F0(&actor->obj.pos, 0x1903400F); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_OB_EXPLOSION_S); } } } @@ -1724,7 +1724,7 @@ void SectorZ_8019E454(Boss* boss) { boss->timer_050 = 10; boss->timer_052 = 60; boss->state = 1; - AUDIO_PLAY_SFX(0x1900404F, boss->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_BROKEN_SPARK_L, boss->sfxSource, 0); } if (boss->timer_050 == 1) { @@ -1857,5 +1857,5 @@ void SectorZ_8019EA68(void) { boss->obj.id = OBJ_BOSS_313; Object_SetInfo(&boss->info, boss->obj.id); - AUDIO_PLAY_SFX(0x11030010, boss->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, boss->sfxSource, 0); } diff --git a/src/overlays/ovl_i5/fox_ma.c b/src/overlays/ovl_i5/fox_ma.c index 638b2cd9..9dc0b3c9 100644 --- a/src/overlays/ovl_i5/fox_ma.c +++ b/src/overlays/ovl_i5/fox_ma.c @@ -449,7 +449,7 @@ void Macbeth_8019A198(Actor* actor) { } else { Audio_SetSfxSpeedModulation(actor->vel.z); } - Audio_PlaySfxModulated(actor->sfxSource, 0x31078085); + Audio_PlaySfxModulated(actor->sfxSource, NA_SE_EN_FREIGHT_TRAIN); D_i5_801BE310 = actor->iwork[5]; } D_i5_801BA1E0 = actor->obj.pos.z; @@ -478,7 +478,7 @@ void Macbeth_8019A2F4(Actor* actor) { } D_MA_801BE2F0[0] = var_a0; if (D_i5_801BA1E4 != D_i5_801BA1EC[var_a0 - 1].unk_04) { - AUDIO_PLAY_SFX(0x1940205E, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_CONNECT_CUT, actor->sfxSource, 0); } D_i5_801BA1E4 = D_i5_801BA1EC[var_a0 - 1].unk_04; var_fa1 = D_i5_801BA1EC[var_a0 - 1].unk_08; @@ -595,7 +595,7 @@ void Macbeth_8019A8C8(Actor* actor, s16 arg1) { RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), (s32) (RAND_FLOAT(50.0f) + 70.0f), arg1, RAND_FLOAT(0.8f) + 0.3f); } - AUDIO_PLAY_SFX(0x2940C00A, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_L, actor->sfxSource, 4); } void Macbeth_8019AF34(Actor* actor) { @@ -624,7 +624,7 @@ void Macbeth_8019AF34(Actor* actor) { RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), (s32) (RAND_FLOAT(50.0f) + 70.0f), 1, RAND_FLOAT(0.8f) + 0.3f); } - AUDIO_PLAY_SFX(0x2940C00A, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_L, actor->sfxSource, 4); } void Macbeth_8019B580(Actor* actor, s32* arg1) { @@ -725,7 +725,7 @@ void Macbeth_8019BE50(Actor* actor) { RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), (s32) (RAND_FLOAT(50.0f) + 70.0f), 0, RAND_FLOAT(0.8f) + 0.3f); } - func_effect_8007A6F0(&actor->obj.pos, 0x2940C00A); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_L); gHitCount++; } @@ -733,7 +733,7 @@ bool Macbeth_8019C4EC(Actor* actor) { if (actor->dmgType != DMG_NONE) { actor->dmgType = DMG_NONE; if (actor->dmgPart == 1) { - AUDIO_PLAY_SFX(0x29034003, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, actor->sfxSource, 4); actor->dmgType = DMG_NONE; actor->iwork[7] = 15; D_i5_801BE320[22] = 0; @@ -741,7 +741,7 @@ bool Macbeth_8019C4EC(Actor* actor) { D_i5_801BE320[21] = 2; return true; } - AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); } return false; @@ -811,7 +811,7 @@ void Macbeth_8019C778(Actor* actor) { break; case 1: if (actor->timer_0BC == 1) { - AUDIO_PLAY_SFX(0x1900000D, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_GATE_OPEN, actor->sfxSource, 4); } if (actor->timer_0BC <= 0) { Math_SmoothStepToF(&actor->fwork[2], -60.0f, 0.4f, 10.0f, 0.01f); @@ -823,7 +823,7 @@ void Macbeth_8019C778(Actor* actor) { actor->timer_0BC = 200; D_i5_801BE320[19] = 0; actor->state++; - AUDIO_PLAY_SFX(0x1900000E, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_GATE_CLOSE, actor->sfxSource, 4); } } break; @@ -832,7 +832,7 @@ void Macbeth_8019C778(Actor* actor) { if ((actor->timer_0BC <= 0) && (D_i5_801BE320[25] == 1)) { actor->timer_0BC = 60; actor->state++; - AUDIO_PLAY_SFX(0x1900000D, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_GATE_OPEN, actor->sfxSource, 4); } break; case 3: @@ -845,7 +845,7 @@ void Macbeth_8019C778(Actor* actor) { D_i5_801BE320[30] = 0; D_i5_801BE320[25] = 0; } - AUDIO_PLAY_SFX(0x1900000E, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_GATE_CLOSE, actor->sfxSource, 4); } if (actor->timer_0BC <= 0) { D_i5_801BE320[30]++; @@ -855,7 +855,7 @@ void Macbeth_8019C778(Actor* actor) { } actor->timer_0BC = 100; actor->state--; - AUDIO_PLAY_SFX(0x1900000E, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_GATE_CLOSE, actor->sfxSource, 4); } if (actor->timer_0BC == 30) { Macbeth_8019C5B8(actor); @@ -893,15 +893,15 @@ void Macbeth_8019C778(Actor* actor) { gMissionStatus = MISSION_COMPLETE; } actor->state++; - Audio_KillSfxBySourceAndId(gPlayer[0].sfxSource, 0x1100000A); - Audio_KillSfxBySourceAndId(gPlayer[0].sfxSource, 0x01004024); + Audio_KillSfxBySourceAndId(gPlayer[0].sfxSource, NA_SE_TANK_SLIDE); + Audio_KillSfxBySourceAndId(gPlayer[0].sfxSource, NA_SE_TANK_BURNER_HALF); } break; } if (actor->dmgType != DMG_NONE) { actor->dmgType = DMG_NONE; - AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); } if (D_i5_801BE320[4] > 0) { @@ -1124,7 +1124,7 @@ void Macbeth_8019D910(Actor* actor, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f3 if (((actor->dmgType != DMG_NONE) && (arg3 == actor->dmgPart)) || ((D_MA_801BE2F0[1] - 1 == actor->iwork[5]) && (actor->iwork[5] < D_MA_801BE2F0[3])) || (((D_MA_801BE2F0[1] + 1) == actor->iwork[5]) && (D_MA_801BE2F0[3] < actor->iwork[5]))) { - AUDIO_PLAY_SFX(0x29034003, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, actor->sfxSource, 4); actor->dmgType = DMG_NONE; func_effect_8007C120(actor->obj.pos.x + arg4, actor->obj.pos.y + 200.0f, actor->obj.pos.z + arg5, actor->vel.x, actor->vel.y, actor->vel.z, 0.15f, 20); @@ -1137,7 +1137,7 @@ void Macbeth_8019D910(Actor* actor, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f3 } } else if ((actor->dmgType != DMG_NONE) && (actor->dmgPart == 0)) { actor->dmgType = DMG_NONE; - AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); } break; case 1: @@ -1152,7 +1152,7 @@ void Macbeth_8019D910(Actor* actor, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f3 RAND_FLOAT_CENTERED(30.0f), (s32) (RAND_FLOAT(50.0f) + 70.0f), 3, (RAND_FLOAT(0.8f) + 0.3f) * 2.0f); } - AUDIO_PLAY_SFX(0x2903B009, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, actor->sfxSource, 4); *arg7 = 1; *arg2 = 20; (*arg1)++; @@ -1162,7 +1162,7 @@ void Macbeth_8019D910(Actor* actor, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f3 ((D_MA_801BE2F0[1] - 1 == actor->iwork[5]) && (actor->iwork[5] < D_MA_801BE2F0[3])) || (((D_MA_801BE2F0[1] + 1) == actor->iwork[5]) && (D_MA_801BE2F0[3] < actor->iwork[5])) || ((actor->obj.id == OBJ_ACTOR_209) && (arg3 == 2))) { - AUDIO_PLAY_SFX(0x29034003, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, actor->sfxSource, 4); actor->dmgType = DMG_NONE; func_effect_8007C120(actor->obj.pos.x + arg4, actor->obj.pos.y + 200.0f, actor->obj.pos.z + arg5, actor->vel.x, actor->vel.y, actor->vel.z, 0.15f, 20); @@ -1177,7 +1177,7 @@ void Macbeth_8019D910(Actor* actor, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f3 } } else if ((actor->dmgType != DMG_NONE) && (actor->dmgPart == 0)) { actor->dmgType = DMG_NONE; - AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); } break; case 3: @@ -1193,7 +1193,7 @@ void Macbeth_8019D910(Actor* actor, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f3 (s32) (RAND_FLOAT(50.0f) + 70.0f), 2, (RAND_FLOAT(0.8f) + 0.3f) * 1.5f); } } - AUDIO_PLAY_SFX(0x2903B009, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, actor->sfxSource, 4); *arg7 = 2; var_v0 = arg3; if (var_v0 == 3) { @@ -1290,7 +1290,7 @@ void Macbeth_8019E624(Actor* actor, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f3 if (((actor->dmgType != DMG_NONE) && (arg3 == actor->dmgPart)) || ((D_MA_801BE2F0[1] - 1 == actor->iwork[5]) && (actor->iwork[5] < D_MA_801BE2F0[3])) || (((D_MA_801BE2F0[1] + 1) == actor->iwork[5]) && (D_MA_801BE2F0[3] < actor->iwork[5]))) { - AUDIO_PLAY_SFX(0x29034003, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, actor->sfxSource, 4); actor->dmgType = DMG_NONE; func_effect_8007C120(actor->obj.pos.x + arg4, actor->obj.pos.y + 200.0f, actor->obj.pos.z + arg5, actor->vel.x, actor->vel.y, actor->vel.z, 0.15f, 10); @@ -1303,7 +1303,7 @@ void Macbeth_8019E624(Actor* actor, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f3 } } else if (actor->dmgType != DMG_NONE) { actor->dmgType = DMG_NONE; - AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); } Macbeth_8019B580(actor, arg2); break; @@ -1317,7 +1317,7 @@ void Macbeth_8019E624(Actor* actor, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f3 if (((actor->dmgType != DMG_NONE) && (arg3 == actor->dmgPart)) || ((D_MA_801BE2F0[1] - 1 == actor->iwork[5]) && (actor->iwork[5] < D_MA_801BE2F0[3])) || (((D_MA_801BE2F0[1] + 1) == actor->iwork[5]) && (D_MA_801BE2F0[3] < actor->iwork[5]))) { - AUDIO_PLAY_SFX(0x29034003, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, actor->sfxSource, 4); actor->dmgType = DMG_NONE; func_effect_8007C120(actor->obj.pos.x + arg4, actor->obj.pos.y + 200.0f, actor->obj.pos.z + arg5, actor->vel.x, actor->vel.y, actor->vel.z, 0.2f, 10); @@ -1332,7 +1332,7 @@ void Macbeth_8019E624(Actor* actor, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f3 } else { if (actor->dmgType != DMG_NONE) { actor->dmgType = DMG_NONE; - AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); } } break; @@ -1396,7 +1396,7 @@ void Macbeth_8019EBF8(Actor* actor, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f3 if (((actor->dmgType != DMG_NONE) && (arg3 == actor->dmgPart)) || ((D_MA_801BE2F0[1] - 1 == actor->iwork[5]) && (actor->iwork[5] < D_MA_801BE2F0[3])) || (((D_MA_801BE2F0[1] + 1) == actor->iwork[5]) && (D_MA_801BE2F0[3] < actor->iwork[5]))) { - AUDIO_PLAY_SFX(0x29034003, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, actor->sfxSource, 4); actor->dmgType = DMG_NONE; func_effect_8007C120(actor->obj.pos.x + arg4, actor->obj.pos.y + 200.0f, actor->obj.pos.z + arg5, actor->vel.x, actor->vel.y, actor->vel.z, 0.15f, 10); @@ -1410,7 +1410,7 @@ void Macbeth_8019EBF8(Actor* actor, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f3 } } else if (actor->dmgType != DMG_NONE) { actor->dmgType = DMG_NONE; - AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); } Macbeth_8019B580(actor, arg2); return; @@ -1556,7 +1556,7 @@ void Macbeth_8019F164(Actor* actor) { if (sp44 != 0) { sp60.x -= 60.0f; func_effect_8007EE68(OBJ_EFFECT_378, &sp60, &sp54, &sp48, &D_i5_801BA714, 1.0f); - AUDIO_PLAY_SFX(0x2903101B, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MISSILE_SHOT, actor->sfxSource, 4); actor->iwork[4]++; } else if ((D_i5_801BE310 == actor->iwork[5]) || ((gPlayer[0].pos.x - actor->obj.pos.x > 300.0f) && @@ -1568,7 +1568,7 @@ void Macbeth_8019F164(Actor* actor) { (actor->health != 0)) { sp60.x -= 60.0f; func_effect_8007EE68(OBJ_EFFECT_378, &sp60, &sp54, &sp48, &D_i5_801BA714, 1.0f); - AUDIO_PLAY_SFX(0x2903101B, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MISSILE_SHOT, actor->sfxSource, 4); actor->iwork[4]++; } } @@ -1591,7 +1591,7 @@ void Macbeth_8019F164(Actor* actor) { case 3: if ((actor->timer_0BC == 0) && (actor->health != 0)) { func_effect_8007EE68(OBJ_EFFECT_378, &sp60, &sp54, &sp48, &D_i5_801BA714, 1.0f); - AUDIO_PLAY_SFX(0x2903101B, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MISSILE_SHOT, actor->sfxSource, 4); actor->iwork[4]++; } break; @@ -1614,7 +1614,7 @@ void Macbeth_8019F164(Actor* actor) { if ((actor->timer_0BC == 0) && (actor->health != 0)) { sp60.x += 60.0f; func_effect_8007EE68(OBJ_EFFECT_378, &sp60, &sp54, &sp48, &D_i5_801BA714, 1.0f); - AUDIO_PLAY_SFX(0x2903101B, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MISSILE_SHOT, actor->sfxSource, 4); actor->iwork[4]++; } break; @@ -1644,7 +1644,7 @@ void Macbeth_8019FC54(Actor* actor, s32* arg1, s32* arg2, s32 arg3, s32 arg4, f3 if (((actor->dmgType != DMG_NONE) && (actor->dmgPart >= arg3) && (arg4 >= actor->dmgPart)) || ((D_MA_801BE2F0[1] - 1 == actor->iwork[5]) && (actor->iwork[5] < D_MA_801BE2F0[3])) || (((D_MA_801BE2F0[1] + 1) == actor->iwork[5]) && (D_MA_801BE2F0[3] < actor->iwork[5]))) { - AUDIO_PLAY_SFX(0x29034003, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, actor->sfxSource, 4); actor->dmgType = DMG_NONE; func_effect_8007C120(actor->obj.pos.x + arg5, actor->obj.pos.y + 200.0f, actor->obj.pos.z + arg6, actor->vel.x, actor->vel.y, actor->vel.z, 0.15f, 10); @@ -1661,7 +1661,7 @@ void Macbeth_8019FC54(Actor* actor, s32* arg1, s32* arg2, s32 arg3, s32 arg4, f3 } } else if (actor->dmgType != DMG_NONE) { actor->dmgType = DMG_NONE; - AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); } Macbeth_8019B580(actor, arg2); break; @@ -1948,13 +1948,13 @@ void Macbeth_801A0BD8(Scenery* scenery) { break; case 1: if (scenery->timer_4C == 1) { - AUDIO_PLAY_SFX(0x01004024, gPlayer[0].sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_TANK_BURNER_HALF, gPlayer[0].sfxSource, 0); } if (scenery->timer_4C <= 0) { Math_SmoothStepToF(&scenery->vel.x, 1751.0f, 0.2f, 80.0f, 1.0f); if (scenery->vel.x >= 1750.0) { - AUDIO_PLAY_SFX(0x1940807B, scenery->sfxSource, 0); - Audio_KillSfxBySourceAndId(gPlayer[0].sfxSource, 0x01004024); + AUDIO_PLAY_SFX(NA_SE_OB_POINT_SWITCH, scenery->sfxSource, 0); + Audio_KillSfxBySourceAndId(gPlayer[0].sfxSource, NA_SE_TANK_BURNER_HALF); scenery->timer_4C = 5; scenery->state = 2; } @@ -2469,7 +2469,7 @@ void Macbeth_801A2DD8(Scenery* scenery) { } break; case 1: - func_effect_8007A6F0(&scenery->obj.pos, 0x2903B009); + func_effect_8007A6F0(&scenery->obj.pos, NA_SE_EN_EXPLOSION_M); gControllerRumbleFlags[gMainController] = 1; gControllerRumbleTimers[gMainController] = 15; for (i = 0; i < 6; i++) { @@ -2785,14 +2785,14 @@ void Macbeth_801A3E98(Actor* actor) { case 0: if ((actor->dmgType != DMG_NONE) && (actor->dmgType != DMG_COLLISION)) { actor->dmgType = DMG_NONE; - AUDIO_PLAY_SFX(0x1903205F, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_MC_SWITCH_ON, actor->sfxSource, 0); actor->state = 1; } break; case 1: Math_SmoothStepToF(&actor->fwork[1], -181.0f, 0.6f, 20.0f, 0.0f); if (actor->fwork[1] <= -180.0f) { - AUDIO_PLAY_SFX(0x19033008, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_MC_SWITCH_UP, actor->sfxSource, 0); actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_603648C); actor->iwork[0] = 2; actor->state = 2; @@ -2813,16 +2813,16 @@ void Macbeth_801A3E98(Actor* actor) { break; } if (actor->dmgType != DMG_NONE) { - AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); actor->dmgType = DMG_NONE; } Math_SmoothStepToF(&actor->fwork[0], 30.0f, 0.4f, 10.0f, 0.0f); Math_SmoothStepToF(&actor->fwork[4], 30.0f, 0.4f, 10.0f, 0.0f); if (actor->fwork[0] < 31.0f) { if (actor->state >= 3) { - AUDIO_PLAY_SFX(0x19020060, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_MC_SWITCH_GRN, actor->sfxSource, 0); } else { - AUDIO_PLAY_SFX(0x19020061, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_MC_SWITCH_RED, actor->sfxSource, 0); } actor->fwork[0] = 255.0f; actor->fwork[4] = 170.0f; @@ -2896,7 +2896,7 @@ void Macbeth_801A46A0(Actor* actor) { Math_SmoothStepToF(&actor->gravity, 5.0f, 0.08f, 1.0f, 0.0f); if (actor->obj.pos.y < 80.0f) { if (actor->unk_046 != 0) { - AUDIO_PLAY_SFX(0x19030006, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_ROCK_BOUND, actor->sfxSource, 0); actor->obj.pos.y = 80.0f; if (actor->vel.y < 0) { actor->vel.y = -actor->vel.y * (actor->unk_046 * 0.07f); @@ -2947,11 +2947,11 @@ void Macbeth_801A46A0(Actor* actor) { void Macbeth_801A49B8(Actor* actor) { if (actor->dmgType != DMG_NONE) { - AUDIO_PLAY_SFX(0x29024003, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_M, actor->sfxSource, 0); actor->timer_0C6 = 15; actor->health -= actor->damage; if (actor->health <= 0) { - func_effect_8007A6F0(&actor->obj.pos, 0x2903B009); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); gHitCount++; actor->state = 2; } @@ -3047,13 +3047,13 @@ void Macbeth_801A4B24(Actor* actor) { gMissionStatus = MISSION_ACCOMPLISHED; actor->timer_0BC = 5; actor->state = 6; - Audio_KillSfxBySourceAndId(gPlayer[0].sfxSource, 0x1100000A); - Audio_KillSfxBySourceAndId(gPlayer[0].sfxSource, 0x01004024); + Audio_KillSfxBySourceAndId(gPlayer[0].sfxSource, NA_SE_TANK_SLIDE); + Audio_KillSfxBySourceAndId(gPlayer[0].sfxSource, NA_SE_TANK_BURNER_HALF); } break; case 6: if (actor->timer_0BC == 1) { - AUDIO_PLAY_SFX(0x1940405D, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_HEAVY_SWITCH, actor->sfxSource, 0); } if (actor->timer_0BC == 0) { Math_SmoothStepToF(&actor->fwork[7], -41.0f, 0.2f, 5.0f, 0.01f); @@ -3072,7 +3072,7 @@ void Macbeth_801A4B24(Actor* actor) { } if (actor->dmgType != DMG_NONE) { actor->dmgType = DMG_NONE; - AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); } Math_SmoothStepToF(&actor->fwork[0], 30, 0.4f, actor->fwork[1], 0.0f); Math_SmoothStepToF(&actor->fwork[4], 30, 0.4f, actor->fwork[1], 0.0f); @@ -3192,7 +3192,7 @@ void Macbeth_801A57D0(Effect* effect) { effect->vel.x = sp44.x; effect->vel.y = sp44.y; effect->vel.z = sp44.z; - AUDIO_PLAY_SFX(0x09007011, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ROLLING_REFLECT, effect->sfxSource, 4); } if ((gPlayer[0].barrelRollAlpha == 0) && (gPlayer[0].timer_498 == 0)) { Player_ApplyDamage(&gPlayer[0], 0, effect->info.damage); @@ -3282,14 +3282,14 @@ void Macbeth_801A5E54(Actor* actor) { } if ((D_i5_801BA1E0 - actor->obj.pos.z) < -800.0f) { if (actor->iwork[0] == 0) { - AUDIO_PLAY_SFX(0x11001063, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_SIDE_GATE_CLOSE, actor->sfxSource, 0); actor->iwork[0]++; } Math_SmoothStepToF(&actor->obj.pos.x, actor->fwork[0] + (actor->fwork[2] * 400.0f), 0.1f, 4.0f, 0.01f); } if (actor->dmgType != DMG_NONE) { actor->dmgType = DMG_NONE; - AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); } } @@ -3306,14 +3306,14 @@ void Macbeth_801A5FD0(Actor* actor) { } if (gPlayer[0].trueZpos - actor->obj.pos.z < actor->fwork[2]) { if (actor->iwork[0] == 0) { - AUDIO_PLAY_SFX(0x19001062, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_POST_UP, actor->sfxSource, 0); actor->iwork[0] += 1; } Math_SmoothStepToF(&actor->obj.pos.y, actor->fwork[1] + 356.0f, 0.4f, 20.0f, 0.01f); } if (actor->dmgType != DMG_NONE) { actor->dmgType = DMG_NONE; - AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); } } @@ -3337,14 +3337,14 @@ void Macbeth_801A6144(Actor* actor) { if (actor->dmgType != DMG_NONE) { func_effect_8007C120(actor->obj.pos.x, actor->obj.pos.y + 100.0f, actor->obj.pos.z, actor->vel.x, actor->vel.y, actor->vel.z, 0.15f, 20); - AUDIO_PLAY_SFX(0x2903300E, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, actor->sfxSource, 4); actor->health -= actor->damage; actor->timer_0C6 = 15; if ((gPlayer[0].trueZpos - 20.0f) < actor->obj.pos.z) { actor->health = 0; } if (actor->health <= 0) { - AUDIO_PLAY_SFX(0x2903B009, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, actor->sfxSource, 0); func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y + 100.0f, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, 14.0f, 5); for (i = 0; i < 20; i++) { @@ -3917,7 +3917,7 @@ void Macbeth_801A7E7C(Actor* actor) { D_i5_801BE320[2] = 5; D_i5_801BE320[31] = 30; actor->timer_0BC = 100; - AUDIO_PLAY_SFX(0x19022067, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MCBOSS_CHARGE0, actor->sfxSource, 4); actor->state = 12; } } else if ((D_i5_801BE320[26] != 0) && (D_i5_801BE320[10] > 0)) { @@ -3987,7 +3987,7 @@ void Macbeth_801A7E7C(Actor* actor) { D_i5_801BE320[3] = (s16) (D_i5_801BE320[3] + 1); if ((D_i5_801BE320[3] == 26) && (D_i5_801BE320[10] > 0)) { actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_6036818); - AUDIO_PLAY_SFX(0x2902405E, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_CATCH, actor->sfxSource, 4); } } else { actor->info.hitbox = SEGMENTED_TO_VIRTUAL(gNoHitbox); @@ -4035,7 +4035,7 @@ void Macbeth_801A7E7C(Actor* actor) { case 8: Macbeth_8019A198(actor); if (((gGameFrameCount % 16) == 0)) { - AUDIO_PLAY_SFX(0x29036099, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MCBOSS_RAGE, actor->sfxSource, 4); } Macbeth_801A74C4(actor); Macbeth_801A6984(actor); @@ -4066,7 +4066,7 @@ void Macbeth_801A7E7C(Actor* actor) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 255; - AUDIO_PLAY_SFX(0x2940D09A, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, actor->sfxSource, 4); Radio_PlayMessage(gMsg_ID_17450, RCID_BOSS_MACBETH); func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f); Macbeth_801AD624(actor->vwork[2].x, actor->vwork[2].y, actor->vwork[2].z, @@ -4084,9 +4084,9 @@ void Macbeth_801A7E7C(Actor* actor) { D_i5_801BE368[13] = 30.0f; if (D_i5_801BE320[29] > 0) { if (D_i5_801BE320[29] > 100) { - AUDIO_PLAY_SFX(0x29034003, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, actor->sfxSource, 4); } else { - AUDIO_PLAY_SFX(0x2943500F, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_KNOCK_DOWN, actor->sfxSource, 4); } } } @@ -4235,7 +4235,7 @@ void Macbeth_801A7E7C(Actor* actor) { Macbeth_801A72DC(actor); Macbeth_801A6984(actor); if (D_i5_801BE320[9] <= 0) { - Audio_KillSfxBySourceAndId(actor->sfxSource, 0x19022067); + Audio_KillSfxBySourceAndId(actor->sfxSource, NA_SE_EN_MCBOSS_CHARGE0); actor->state = 14; actor->vel.y = -20.0f; } @@ -4255,7 +4255,7 @@ void Macbeth_801A7E7C(Actor* actor) { } } if (actor->timer_0BC == 0) { - Audio_KillSfxBySourceAndId(actor->sfxSource, 0x19022067); + Audio_KillSfxBySourceAndId(actor->sfxSource, NA_SE_EN_MCBOSS_CHARGE0); D_i5_801BE320[3] = 0; D_i5_801BE320[2] = 6; D_i5_801BE320[31] = 30; @@ -4277,7 +4277,7 @@ void Macbeth_801A7E7C(Actor* actor) { D_i5_801BE320[5] = 0; D_i5_801BE320[7] = 0; if (actor->timer_0BC == 60) { - AUDIO_PLAY_SFX(0x19023068, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MCBOSS_SHOT0, actor->sfxSource, 4); D_i5_801BE320[24] = 0; spC6 = RAND_INT(5.0f); @@ -4334,7 +4334,7 @@ void Macbeth_801A7E7C(Actor* actor) { Macbeth_801A6984(actor); if (actor->timer_0BC < 100) { if (actor->timer_0BC == 98) { - AUDIO_PLAY_SFX(0x19022069, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MCBOSS_PLATECHARGE, actor->sfxSource, 4); } Matrix_RotateY(gCalcMatrix, RAND_FLOAT(2.0f) * (M_DTOR * 180.0f), MTXF_NEW); sp360.x = 0.0f; @@ -4366,7 +4366,7 @@ void Macbeth_801A7E7C(Actor* actor) { } actor->timer_0BC = D_i5_801BE320[27]; actor->state = 16; - Audio_KillSfxBySourceAndId(actor->sfxSource, 0x19022069); + Audio_KillSfxBySourceAndId(actor->sfxSource, NA_SE_EN_MCBOSS_PLATECHARGE); } break; case 16: @@ -4384,9 +4384,9 @@ void Macbeth_801A7E7C(Actor* actor) { if (actor->timer_0BC < (D_i5_801BE320[27] - 40)) { if ((actor->timer_0BC + 42) == D_i5_801BE320[27]) { actor->sfxSource[0] = actor->vwork[2].x; - AUDIO_PLAY_SFX(0x19006035, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_RNG_BEAM_SHOT, actor->sfxSource, 4); actor->sfxSource[0] = actor->vwork[4].x; - AUDIO_PLAY_SFX(0x19006035, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_RNG_BEAM_SHOT, actor->sfxSource, 4); actor->sfxSource[0] = actor->obj.pos.x; } if (((gGameFrameCount % 2) == 0) && (D_i5_801BE320[15] == 0)) { @@ -4452,7 +4452,7 @@ void Macbeth_801A7E7C(Actor* actor) { Macbeth_801A78B0(actor); } if (actor->timer_0BC == 0) { - Audio_KillSfxBySourceAndId(actor->sfxSource, 0x19006035); + Audio_KillSfxBySourceAndId(actor->sfxSource, NA_SE_EN_RNG_BEAM_SHOT); actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_603677C); D_i5_801BE320[3] = 0; D_i5_801BE320[2] = 1; @@ -4525,7 +4525,7 @@ void Macbeth_801A7E7C(Actor* actor) { RAND_FLOAT_CENTERED(10.0f), (s32) (RAND_FLOAT(50.0f) + 70.0f), 11, 1.0f); gControllerRumbleFlags[gMainController] = 1; gControllerRumbleTimers[gMainController] = 15; - AUDIO_PLAY_SFX(0x2940C00A, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_L, actor->sfxSource, 4); actor->state = 21; } break; @@ -4538,7 +4538,7 @@ void Macbeth_801A7E7C(Actor* actor) { if ((actor->dmgType != DMG_NONE) && (actor->state >= 2)) { actor->dmgType = DMG_NONE; if ((actor->dmgPart == 0) && (D_i5_801BE320[9] > 0) && ((gPlayer[0].trueZpos - actor->obj.pos.z) > 200.0f)) { - AUDIO_PLAY_SFX(0x2903300E, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, actor->sfxSource, 4); actor->iwork[7] = 15; D_i5_801BE320[9] -= actor->damage; Macbeth_801AD624(actor->obj.pos.x, actor->obj.pos.y + 80, actor->obj.pos.z + 50.0f, @@ -4547,7 +4547,7 @@ void Macbeth_801A7E7C(Actor* actor) { RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), (s32) (RAND_FLOAT(50.0f) + 70.0f), 3, RAND_FLOAT(1.0f)); if (D_i5_801BE320[9] <= 0) { - AUDIO_PLAY_SFX(0x2903B009, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, actor->sfxSource, 4); func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y + 80.0f, actor->obj.pos.z + 50.0f, 5.0f); for (i = 0; i < 2; i++) { Macbeth_801AD624(actor->obj.pos.x, actor->obj.pos.y + 80.0f, actor->obj.pos.z + 50.0f, @@ -4564,7 +4564,7 @@ void Macbeth_801A7E7C(Actor* actor) { } } else if ((actor->dmgPart == 1) && (D_i5_801BE320[10] > 0) && ((gPlayer[0].trueZpos - actor->obj.pos.z) > 200.0f)) { - AUDIO_PLAY_SFX(0x2903300E, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, actor->sfxSource, 4); actor->iwork[8] = 16; D_i5_801BE320[10] -= actor->damage; Macbeth_801AD624(actor->obj.pos.x, actor->obj.pos.y - 30.0f, actor->obj.pos.z, RAND_FLOAT_CENTERED(10.0f), @@ -4572,7 +4572,7 @@ void Macbeth_801A7E7C(Actor* actor) { RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), (s32) (RAND_FLOAT(50.0f) + 70.0f), 3, RAND_FLOAT(1.0f)); if (D_i5_801BE320[10] <= 0) { - AUDIO_PLAY_SFX(0x2903B009, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, actor->sfxSource, 4); func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y - 30.0f, actor->obj.pos.z, 6.0f); for (i = 0; i < 10; i++) { @@ -4589,7 +4589,7 @@ void Macbeth_801A7E7C(Actor* actor) { (s32) (RAND_FLOAT(50.0f) + 70.0f), 9, 1.0f); } } else { - AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); } } if (D_i5_801BE320[4] != 0) { @@ -4870,7 +4870,7 @@ void Macbeth_801AC438(Actor* actor) { Macbeth_8019A728(actor); if (actor->iwork[1] != 0) { Radio_PlayMessage(gMsg_ID_17420, RCID_BOSS_MACBETH); - AUDIO_PLAY_SFX(0x19034066, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MCBOSS_HATCH, actor->sfxSource, 4); actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_6035A94); actor->state += 1; } @@ -4885,7 +4885,7 @@ void Macbeth_801AC438(Actor* actor) { } if (actor->dmgType != DMG_NONE) { actor->dmgType = DMG_NONE; - AUDIO_PLAY_SFX(0x29121007, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); } } @@ -4913,7 +4913,7 @@ void Macbeth_801AC6B4(Actor* actor) { actor->obj.pos.z = 0.0f; actor->obj.rot.y = 180.0f; Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(0x11030010, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); actor->unk_0B6 = 1; } @@ -5219,7 +5219,7 @@ void Macbeth_801AD6F0(Actor* actor) { actor->unk_046 = 192; actor->scale = 2.5f; actor->fwork[0] = 2.5f; - AUDIO_PLAY_SFX(0x2903B009, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, actor->sfxSource, 4); func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z, 7.0f); func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, 4.0f, 5); @@ -5289,7 +5289,7 @@ void Macbeth_801ADC08(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 actor->vel.z = zVel; actor->timer_0BC = 0; Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(0x2900201D, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_FALLING_DOWN, actor->sfxSource, 4); } void Macbeth_801ADCEC(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel) { @@ -5347,7 +5347,7 @@ void Macbeth_801ADD68(Actor* actor) { } if ((Object_CheckCollision(actor->index, &actor->obj.pos, &sp3C, 1) != 0) || (actor->obj.pos.y < (gGroundHeight + 200.0f))) { - AUDIO_PLAY_SFX(0x19032064, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_SPEAR_STICK, actor->sfxSource, 4); gControllerRumbleFlags[gMainController] = 1; gControllerRumbleTimers[gMainController] = 5; actor->vel.x = 0.0f; @@ -5378,7 +5378,7 @@ void Macbeth_801ADD68(Actor* actor) { actor->health -= actor->damage; if (actor->health <= 0) { - func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(20.0f), actor->obj.pos.y - 200.0f, actor->obj.pos.z, 8.0f); func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(20.0f), actor->obj.pos.y, @@ -5389,7 +5389,7 @@ void Macbeth_801ADD68(Actor* actor) { actor->obj.pos.z, 7.0f); Object_Kill(&actor->obj, actor->sfxSource); } else { - AUDIO_PLAY_SFX(0x2903300E, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, actor->sfxSource, 4); } } break; @@ -5451,7 +5451,7 @@ void Macbeth_801AE4CC(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 arg4, f32 } actor->health = 30; Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(0x2900201D, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_FALLING_DOWN, actor->sfxSource, 4); } void Macbeth_801AE610(f32 xPos, f32 yPos, f32 zPos, f32 arg3, f32 yVel, f32 arg5, s16 arg6) { @@ -5585,7 +5585,7 @@ void Macbeth_801AEC04(Actor* actor) { } actor->state = 1; actor->timer_0BC = 200; - AUDIO_PLAY_SFX(0x11000028, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_SPARK_BEAM, actor->sfxSource, 4); } break; case 1: @@ -5614,12 +5614,12 @@ void Macbeth_801AEC04(Actor* actor) { actor->fwork[1] = 32.0f; } if ((actor->dmgType != DMG_NONE) && (actor->dmgPart == 0)) { - AUDIO_PLAY_SFX(0x2903300E, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, actor->sfxSource, 4); actor->dmgType = DMG_NONE; actor->health -= actor->damage; actor->timer_0C6 = 15; if (actor->health <= 0) { - func_effect_8007A6F0(&actor->obj.pos, 0x29000000); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EXPLOSION_S); func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 8.0f); Object_Kill(&actor->obj, actor->sfxSource); } @@ -5654,7 +5654,7 @@ void Macbeth_801AF134(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 actor->fwork[0] = 1.0f; actor->fwork[2] = 1.0f; Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(0x2900201D, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_FALLING_DOWN, actor->sfxSource, 4); } void Macbeth_801AF200(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel) { @@ -5697,12 +5697,12 @@ void Macbeth_801AF27C(Actor* actor, s32 arg1) { actor->unk_0C9 = 1; actor->fwork[3] = D_i5_801BA820[arg1]; actor->state = 30; - AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } else { actor->unk_0B6 = 1; actor->state = 21; actor->obj.rot.z = 32.5f; - AUDIO_PLAY_SFX(0x11030010, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); actor->fwork[9] = 20.0f; } } @@ -5734,7 +5734,7 @@ void Macbeth_801AF44C(void) { actor->state = 15; actor->fwork[3] = D_i5_801BA820[4]; Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } static Vec3f D_i5_801BA834[2] = { @@ -5955,8 +5955,8 @@ void Macbeth_LevelComplete2(Player* player) { player->cam.at.z = gCsCamAtZ = 1900.0f; player->yRot_114 = 0.0f; D_i5_801BA1DC = -100.0f; - Audio_KillSfxById(0x31078085); - AUDIO_PLAY_SFX(0x31408095, gActors[D_i5_801BE314].sfxSource, 4); + Audio_KillSfxById(NA_SE_EN_FREIGHT_TRAIN); + AUDIO_PLAY_SFX(NA_SE_EN_TRAIN_BREAK, gActors[D_i5_801BE314].sfxSource, 4); D_i5_801BE313 = 0; } break; @@ -6051,8 +6051,8 @@ void Macbeth_LevelComplete2(Player* player) { gPathProgress = player->zPath; gPathTexScroll += player->zPathVel; if (gCsFrameCount == 630) { - Audio_KillSfxBySourceAndId(gActors[D_i5_801BE314].sfxSource, 0x31408095); - AUDIO_PLAY_SFX(0x2940C00A, gActors[D_i5_801BE314].sfxSource, 4); + Audio_KillSfxBySourceAndId(gActors[D_i5_801BE314].sfxSource, NA_SE_EN_TRAIN_BREAK); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_L, gActors[D_i5_801BE314].sfxSource, 4); player->csState++; player->vel.z = 0.0f; player->zPathVel = 0.0f; @@ -6203,7 +6203,7 @@ void Macbeth_LevelComplete2(Player* player) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; gFillScreenAlphaTarget = 255; gFillScreenAlphaStep = 20; - AUDIO_PLAY_SFX(0x2940F026, gActors[D_i5_801BE314].sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_STAR_EXPLOSION, gActors[D_i5_801BE314].sfxSource, 4); gBossActive = gLoadLevelObjects = 0; } if (gCsFrameCount == 940) { @@ -6425,7 +6425,7 @@ void Macbeth_LevelComplete2(Player* player) { gProjectFar = 30000.0f; player->unk_240 = 1; Audio_StopPlayerNoise(0); - AUDIO_PLAY_SFX(0x01008016, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_TANK_GO_UP, player->sfxSource, 0); break; case 2310: gActors[3].state++; @@ -6499,7 +6499,7 @@ void Macbeth_801B28BC(Actor* actor) { Math_SmoothStepToF(&actor->obj.pos.z, actor->fwork[2] + player->trueZpos, 0.03f, 10.0f, 0.0f); break; case 11: - AUDIO_PLAY_SFX(0x09000002, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); actor->timer_0BC = 10; actor->state++; actor->fwork[29] = 5.0f; @@ -6555,7 +6555,7 @@ void Macbeth_801B28BC(Actor* actor) { Math_SmoothStepToAngle(&actor->obj.rot.z, 62.0f, 1.0f, 0.5f, 0); if (actor->fwork[0] > 180.0f) { actor->state++; - AUDIO_PLAY_SFX(0x09000002, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); actor->timer_0BC = 160; actor->fwork[29] = 5.0f; } @@ -6608,7 +6608,7 @@ void Macbeth_801B28BC(Actor* actor) { Math_SmoothStepToF(&actor->obj.pos.z, actor->fwork[2] + player->trueZpos, 0.03f, 10.0f, 0.0f); break; case 31: - AUDIO_PLAY_SFX(0x09000002, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); actor->unk_0C9 = 0; actor->timer_0BC = 20; actor->state++; @@ -6665,12 +6665,12 @@ void Macbeth_801B3554(Actor* actor, s32 arg1) { actor->unk_0C9 = 1; actor->fwork[3] = D_i5_801BA8F0[arg1]; actor->state = 30; - AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); return; } actor->unk_0B6 = 1; actor->state = 20; - AUDIO_PLAY_SFX(0x11030010, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); actor->fwork[9] = 20.0f; } @@ -6701,7 +6701,7 @@ void Macbeth_801B3718(void) { actor->state = 10; actor->fwork[3] = D_i5_801BA900; Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } void Macbeth_801B38E0(void) { diff --git a/src/overlays/ovl_i5/fox_ti.c b/src/overlays/ovl_i5/fox_ti.c index 3116e9d4..a0ea9f80 100644 --- a/src/overlays/ovl_i5/fox_ti.c +++ b/src/overlays/ovl_i5/fox_ti.c @@ -228,7 +228,7 @@ void Titania_801895B8(Actor* actor) { switch (actor->state) { case 0: - AUDIO_PLAY_SFX(0x31000017, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_TANK_ENGINE, actor->sfxSource, 4); if (actor->obj.rot.z > 1.0f) { actor->iwork[0] = 1; } @@ -315,7 +315,7 @@ void Titania_801895B8(Actor* actor) { func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z, 8.0f); func_effect_8007C120(actor->obj.pos.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z, actor->vel.x, actor->vel.y, actor->vel.z, 0.1f, 30); - func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); Object_Kill(&actor->obj, actor->sfxSource); } } @@ -359,7 +359,7 @@ void Titania_80189CC8(Actor* actor) { actor->health -= actor->damage; if (actor->health <= 0) { actor->health = 0; - AUDIO_PLAY_SFX(0x2903A008, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_S, actor->sfxSource, 4); actor->lockOnTimers[TEAM_ID_FOX] = actor->itemDrop = 0; actor->info.targetOffset = 0.0f; Actor_Despawn(actor); @@ -419,7 +419,7 @@ void Titania_80189CC8(Actor* actor) { } } } else if (((gGameFrameCount % 8) == 0) && (Rand_ZeroOne() < 0.5f)) { - AUDIO_PLAY_SFX(0x11000027, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_BROKEN_SPARK, actor->sfxSource, 4); func_effect_8007C120(actor->fwork[0], actor->fwork[1], actor->fwork[2], 0.0f, 0.0f, 0.0f, 0.1f, 7); actor->timer_0C6 = 4; } @@ -503,7 +503,7 @@ void Titania_8018A544(Actor* actor) { actor->health += actor->damage; if (actor->scale == 1.0f) { if (actor->health >= 10) { - func_effect_8007A6F0(&actor->obj.pos, 0x1903400F); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_OB_EXPLOSION_S); if ((Actor*) actor->iwork[0] != NULL) { ((Actor*) actor->iwork[0])->iwork[actor->iwork[1]] = 0; } @@ -550,7 +550,7 @@ void Titania_8018A544(Actor* actor) { actor->obj.pos.y = sp44 + temp_fv1; if (actor->unk_046 == 0) { if (actor->vel.y < -6.0f) { - AUDIO_PLAY_SFX(0x19020006, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_BOUND_M, actor->sfxSource, 4); } if (actor->vel.y < 0.0f) { actor->vel.y = -actor->vel.y * 0.2f; @@ -610,7 +610,7 @@ void Titania_8018AB44(Actor* actor) { actor->gravity = 1.0f; Ground_801B6E20(actor->obj.pos.x, actor->obj.pos.z + gPathProgress, &sp3C, &sp34, &sp38); if (actor->obj.pos.y <= (sp34 + 3.0f)) { - AUDIO_PLAY_SFX(0x19000024, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_SAND_BOUND_S, actor->sfxSource, 4); actor->obj.pos.y = sp34 + 3.0f; actor->obj.rot.x = sp3C * (M_RTOD); actor->obj.rot.z = sp38 * (M_RTOD); @@ -626,7 +626,7 @@ void Titania_8018AB44(Actor* actor) { switch (actor->dmgType) { case 1: - AUDIO_PLAY_SFX(0x29022086, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MCBOSS_REFLECT, actor->sfxSource, 4); break; case 2: @@ -634,12 +634,12 @@ void Titania_8018AB44(Actor* actor) { Actor_Despawn(actor); actor->info.bonus = 0; func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y + 10.0f, actor->obj.pos.z, 6.0f); - func_effect_8007A6F0(&actor->obj.pos, 0x2903B009); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); Object_Kill(&actor->obj, actor->sfxSource); break; case 3: - func_effect_8007A6F0(&actor->obj.pos, 0x2903B009); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y + 50.0f, actor->obj.pos.z, (10.0f / 3.0f)); gPlayer[0].vel.y = 20.0f; gPlayer[0].pos.y += 15.0f; @@ -830,7 +830,7 @@ void Titania_8018B268(Actor* actor) { sp38->vel.y = 0.0f; sp38->vel.z = 0.0f; } else if (actor->unk_0B6 == 57) { - AUDIO_PLAY_SFX(0x29000028, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_THROW_S, actor->sfxSource, 4); src.x = 0.0f; src.y = actor->fwork[1]; src.z = 20.0f; @@ -953,7 +953,7 @@ void Titania_8018B9D0(Actor* actor) { if (actor->timer_0BE == 7) { actor->iwork[0] = 2; - AUDIO_PLAY_SFX(0x19000032, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_BOMB_ALARM_LAST, actor->sfxSource, 0); } if (actor->timer_0BE == 0) { @@ -963,7 +963,7 @@ void Titania_8018B9D0(Actor* actor) { } else if (temp_fa1 < SQ(600.0f)) { actor->timer_0BE = 0; if (actor->timer_0BC == 0) { - AUDIO_PLAY_SFX(0x19000029, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_BOMB_ALARM, actor->sfxSource, 4); actor->iwork[0] = 1 - actor->iwork[0]; actor->timer_0BC = 5; } @@ -995,7 +995,7 @@ void Titania_8018B9D0(Actor* actor) { if (actor->vel.y <= 0.0f) { actor->itemDrop = DROP_NONE; Actor_Despawn(actor); - func_effect_8007A6F0(&actor->obj.pos, 0x2903B009); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f); Object_Kill(&actor->obj, actor->sfxSource); } @@ -1019,7 +1019,7 @@ void Titania_8018B9D0(Actor* actor) { actor->obj.rot.x = (var_fa0 / 130.0f) * 90.0f; if (actor->dmgType == DMG_BEAM) { - AUDIO_PLAY_SFX(0x19020008, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_METALBOMB_REFLECT, actor->sfxSource, 4); sp44 = actor->obj.pos.x - actor->hitPos.x; sp40 = fabsf(sp44); actor->dmgType = DMG_NONE; @@ -1247,7 +1247,7 @@ void Titania_8018C72C(Actor* actor) { f32 sp30; actor->state = 8; - AUDIO_PLAY_SFX(0x29030098, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_KANI_STOP, actor->sfxSource, 4); for (i = 0; i < 9; i++) { D_i5_801BD738[actor->iwork[0]][i].unk_18 |= 2; @@ -1304,7 +1304,7 @@ void Titania_8018C8A8(Actor* actor) { if ((actor->health > 0) && (actor->dmgPart >= 0) && (actor->dmgPart < 3)) { actor->iwork[5] = 10; if (actor->state == 4) { - Audio_KillSfxBySourceAndId(actor->sfxSource, 0x31030043); + Audio_KillSfxBySourceAndId(actor->sfxSource, NA_SE_EN_KANI_MOTOR); actor->timer_0BC = 20; actor->fwork[24] = 1.0f; actor->fwork[23] = actor->unk_0B6; @@ -1320,17 +1320,17 @@ void Titania_8018C8A8(Actor* actor) { actor->unk_0B6 = 0; actor->fwork[15] = 0.0f; } else { - AUDIO_PLAY_SFX(0x29034041, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SNAKE_DAMAGE, actor->sfxSource, 4); } } else if (actor->dmgType == DMG_BEAM) { - func_effect_8007A6F0(&actor->obj.pos, 0x29121007); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_REFLECT); } actor->dmgType = DMG_NONE; } switch (actor->state) { case 0: - AUDIO_PLAY_SFX(0x29023020, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_HEAVY_JUMP, actor->sfxSource, 4); actor->unk_0F4.y = actor->obj.rot.y; actor->obj.rot.y = 180.0f; actor->obj.pos.y += 125.0f; @@ -1357,7 +1357,7 @@ void Titania_8018C8A8(Actor* actor) { Math_SmoothStepToAngle(&actor->obj.rot.y, actor->unk_0F4.y, 0.2f, 10.0f, 0.01f); } if ((actor->obj.pos.y + actor->fwork[7] + actor->fwork[26]) <= sp9C) { - AUDIO_PLAY_SFX(0x29034021, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_HEAVY_BOUND, actor->sfxSource, 4); actor->fwork[16] = actor->obj.pos.y = sp9C; actor->unk_0F4.x = spA0 * M_RTOD; actor->unk_0F4.z = sp98 * M_RTOD; @@ -1418,7 +1418,7 @@ void Titania_8018C8A8(Actor* actor) { if (actor->timer_0BC == 0) { actor->timer_0BC = 15; actor->state++; - AUDIO_PLAY_SFX(0x31030043, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_KANI_MOTOR, actor->sfxSource, 4); } Math_SmoothStepToF(&actor->fwork[26], -60.0f, actor->fwork[15], 500.0f, 0.01f); break; @@ -1456,7 +1456,7 @@ void Titania_8018C8A8(Actor* actor) { if (actor->timer_0BC == 0) { if (((actor->unk_0B6 == 40) || (actor->unk_0B6 == 80)) && (actor->timer_0BC == 0)) { - AUDIO_PLAY_SFX(0x2902201F, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_HEAVY_WALK1, actor->sfxSource, 4); } Math_SmoothStepToF(&actor->fwork[15], 1.0f, 0.7f, 0.1f, 0.01f); actor->unk_0B6++; @@ -1478,7 +1478,7 @@ void Titania_8018C8A8(Actor* actor) { } actor->unk_0B6 = actor->fwork[23]; if (actor->timer_0BC == 1) { - AUDIO_PLAY_SFX(0x31030043, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_KANI_MOTOR, actor->sfxSource, 4); } } @@ -1497,7 +1497,7 @@ void Titania_8018C8A8(Actor* actor) { actor->unk_0B6 = 0; actor->timer_0BC = 30; actor->fwork[15] = 0.0f; - AUDIO_PLAY_SFX(0x29030098, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_KANI_STOP, actor->sfxSource, 4); } break; @@ -1552,7 +1552,7 @@ void Titania_8018C8A8(Actor* actor) { Matrix_MultVec3f(gCalcMatrix, (Vec3f*) &actor->fwork[6], &sp158); func_effect_8007A900(actor->obj.pos.x + sp158.x, actor->obj.pos.y + sp158.y, actor->obj.pos.z + sp158.z, 20.0f, 255, 8, 0); - AUDIO_PLAY_SFX(0x19030003, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_METAL_BOUND_M, actor->sfxSource, 4); } if ((actor->timer_0BC % 8) == 0) { @@ -1591,7 +1591,7 @@ void Titania_8018C8A8(Actor* actor) { for (i = 0; i < 9U; i++) { D_i5_801BD738[actor->iwork[0]][i].unk_18 |= 1; } - AUDIO_PLAY_SFX(0x2940C00A, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_L, actor->sfxSource, 4); gCameraShake = 20; gControllerRumbleTimers[0] = 16; Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); @@ -1842,7 +1842,7 @@ void Titania_8018E5F8(Actor* actor) { actor->iwork[7] = (s32) (spA4 / 200.0f); actor->iwork[8] = (s32) ((5000.0f - spA4) / 714.0f); } - AUDIO_PLAY_SFX(0x19130003, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_METAL_BOUND_M, actor->sfxSource, 4); actor->vel.y = 0.0f; actor->gravity = 0.0f; actor->obj.pos.y = 94.0f + sp7C; @@ -1957,7 +1957,7 @@ void Titania_8018E5F8(Actor* actor) { temp_v0_4->obj.pos.z = sp54; temp_v0_4->timer_50 = 2; actor->iwork[5] = (uintptr_t) temp_v0_4; - AUDIO_PLAY_SFX(0x3100001E, temp_v0_4->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_LASER_BEAM, temp_v0_4->sfxSource, 4); } } else { temp_v0_3->obj.pos.x = sp5C; @@ -2002,7 +2002,7 @@ void Titania_Cactus_Update(Sprite* sprite) { if (sprite->unk_46 != 0) { func_effect_8007D074(sprite->obj.pos.x, sprite->obj.pos.y + 96.0f, sprite->obj.pos.z, 4.0f); sprite->obj.status = OBJ_FREE; - func_effect_8007A6F0(&sprite->obj.pos, 0x1903400F); + func_effect_8007A6F0(&sprite->obj.pos, NA_SE_OB_EXPLOSION_S); } } @@ -2103,7 +2103,7 @@ void Titania_8018F4D8(Scenery* scenery) { gControllerRumbleTimers[0] = 7; gCameraShake = 12; Titania_8018F134(scenery); - AUDIO_PLAY_SFX(0x19130003, scenery->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_METAL_BOUND_M, scenery->sfxSource, 4); } break; case 1: @@ -2113,7 +2113,7 @@ void Titania_8018F4D8(Scenery* scenery) { gControllerRumbleTimers[0] = 7; gCameraShake = 12; Titania_8018F134(scenery); - AUDIO_PLAY_SFX(0x19130003, scenery->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_METAL_BOUND_M, scenery->sfxSource, 4); scenery->state++; } break; @@ -2124,7 +2124,7 @@ void Titania_8018F4D8(Scenery* scenery) { gControllerRumbleTimers[0] = 7; gCameraShake = 12; Titania_8018F134(scenery); - AUDIO_PLAY_SFX(0x19130003, scenery->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_METAL_BOUND_M, scenery->sfxSource, 4); scenery->state++; } break; @@ -3133,15 +3133,15 @@ void Titania_80192118(Boss* boss) { switch (D_i5_801B8C0C[boss->dmgPart]) { case 0: D_i5_801BBEF0[30] = 15; - AUDIO_PLAY_SFX(0x2903300E, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, boss->sfxSource, 4); break; case 1: D_i5_801BBEF0[33] = 15; - AUDIO_PLAY_SFX(0x2903300E, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, boss->sfxSource, 4); break; case 2: D_i5_801BBEF0[34] = 15; - AUDIO_PLAY_SFX(0x2903300E, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, boss->sfxSource, 4); break; } } @@ -3196,7 +3196,7 @@ void Titania_80192118(Boss* boss) { sp54.x = (boss->obj.pos.x + D_i5_801BBEF4[39]) + D_i5_801BBEF4[68]; sp54.y = 0.0f; sp54.z = (boss->obj.pos.z + D_i5_801BBEF4[41]) + D_i5_801BBEF4[70]; - func_effect_8007A6F0(&sp54, 0x29403031); + func_effect_8007A6F0(&sp54, NA_SE_EN_SAND_BOUND_M); boss->swork[39] = 5; gCameraShake = 5; } @@ -3204,7 +3204,7 @@ void Titania_80192118(Boss* boss) { sp54.x = (boss->obj.pos.x + D_i5_801BBEF4[42]) + D_i5_801BBEF4[71]; sp54.y = 0.0f; sp54.z = (boss->obj.pos.z + D_i5_801BBEF4[44]) + D_i5_801BBEF4[73]; - func_effect_8007A6F0(&sp54, 0x29403031); + func_effect_8007A6F0(&sp54, NA_SE_EN_SAND_BOUND_M); boss->swork[39] = 5; gCameraShake = 5; } @@ -3214,19 +3214,19 @@ void Titania_80192118(Boss* boss) { D_i5_801BBEF0[30] = 15; D_i5_801BBEF0[27] -= boss->damage; - AUDIO_PLAY_SFX(0x2903300E, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, boss->sfxSource, 4); break; case 1: D_i5_801BBEF0[33] = 15; D_i5_801BBEF0[27] -= boss->damage; - AUDIO_PLAY_SFX(0x2903300E, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, boss->sfxSource, 4); break; case 2: D_i5_801BBEF0[34] = 15; D_i5_801BBEF0[27] -= boss->damage; - AUDIO_PLAY_SFX(0x2903300E, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, boss->sfxSource, 4); break; } boss->dmgType = DMG_NONE; @@ -3371,8 +3371,8 @@ void Titania_80192118(Boss* boss) { D_i5_801BBEF4[53] = -350.0f; D_i5_801BBEF4[63] = 0.0f; D_i5_801BBEF4[55] = D_i5_801BBEF4[63]; - AUDIO_PLAY_SFX(0x2900502A, boss->sfxSource, 4); - AUDIO_PLAY_SFX(0x2940802C, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_APPEAR_SAND, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_TIBOSS_DM_CRY, boss->sfxSource, 4); boss->swork[1] = 4; boss->timer_050 = 120; D_i5_801BBEF0[22] = 0; @@ -3724,7 +3724,7 @@ void Titania_80193DF0(Boss* boss) { } } D_i5_801BBF00[i].unk_26 = 4; - AUDIO_PLAY_SFX(0x2903B009, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, boss->sfxSource, 4); } } if (boss->fwork[38] != 0.0f) { @@ -3822,7 +3822,7 @@ void Titania_80193DF0(Boss* boss) { if ((boss->state >= 7) && (boss->state < 14) && (boss->dmgType == DMG_BEAM) && (D_i5_801BAA78[D_i5_801B7904[boss->dmgPart]] == 2) && (D_i5_801BBEF0[8] == 0)) { - AUDIO_PLAY_SFX(0x29121007, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, boss->sfxSource, 4); boss->dmgType = DMG_NONE; } if ((boss->state >= 7) && (boss->state < 14)) { @@ -3836,7 +3836,7 @@ void Titania_80193DF0(Boss* boss) { } if (D_i5_801BAA78[D_i5_801B7904[boss->dmgPart]] != 0) { - AUDIO_PLAY_SFX(0x2940802C, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_TIBOSS_DM_CRY, boss->sfxSource, 4); boss->swork[D_i5_801BAA78[D_i5_801B7904[boss->dmgPart]] + 4] = 20; if (boss->swork[D_i5_801BAA78[D_i5_801B7904[boss->dmgPart]] + 8] > 0) { boss->swork[D_i5_801BAA78[D_i5_801B7904[boss->dmgPart]] + 8] -= boss->damage; @@ -3868,9 +3868,9 @@ void Titania_80193DF0(Boss* boss) { gTeamLowHealthMsgTimer = -1; boss->swork[21] = 0; gScreenFlashTimer = 8; - AUDIO_PLAY_SFX(0x2940D09A, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, boss->sfxSource, 4); } else { - AUDIO_PLAY_SFX(0x2940802C, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_TIBOSS_DM_CRY, boss->sfxSource, 4); if (boss->swork[21] <= 10) { D_i5_801BBEF0[1] = 15; @@ -3887,7 +3887,7 @@ void Titania_80193DF0(Boss* boss) { boss->swork[37] |= 4; D_i5_801BBEF0[43] = 0; } else { - AUDIO_PLAY_SFX(0x29121007, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, boss->sfxSource, 4); } } if ((boss->dmgType == DMG_BOMB) && (boss->dmgPart == 1) && (D_i5_801BBEF0[8] == 0)) { @@ -3900,7 +3900,7 @@ void Titania_80193DF0(Boss* boss) { case 1: case 2: case 3: - AUDIO_PLAY_SFX(0x2940802C, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_TIBOSS_DM_CRY, boss->sfxSource, 4); boss->swork[boss->dmgPart + 5] = 20; if (boss->swork[boss->dmgPart + 9] <= 0) { break; @@ -3930,15 +3930,15 @@ void Titania_80193DF0(Boss* boss) { break; case 4: if ((gBossHealthBar > 0) && (boss->swork[29] != 0) && (boss->swork[21] > 0)) { - AUDIO_PLAY_SFX(0x2940802C, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_TIBOSS_DM_CRY, boss->sfxSource, 4); boss->swork[21] -= boss->damage; if (boss->swork[21] <= 0) { boss->swork[21] = 0; gScreenFlashTimer = 8; gTeamLowHealthMsgTimer = -1; - AUDIO_PLAY_SFX(0x2940D09A, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, boss->sfxSource, 4); } else { - AUDIO_PLAY_SFX(0x2940802C, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_TIBOSS_DM_CRY, boss->sfxSource, 4); if (boss->swork[21] < 11) { D_i5_801BBEF0[1] = 15; @@ -3974,8 +3974,8 @@ void Titania_80193DF0(Boss* boss) { D_i5_801BBEF4[2] = 0.0f; D_i5_801BBEF4[1] = 20.0f; boss->swork[28]++; - AUDIO_PLAY_SFX(0x2900803F, boss->sfxSource, 4); - AUDIO_PLAY_SFX(0x11003023, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_HEART_OPEN, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_HEARTBEAT, boss->sfxSource, 4); break; case 3: D_i5_801BBEF4[2] += D_i5_801BBEF4[1]; @@ -3987,7 +3987,7 @@ void Titania_80193DF0(Boss* boss) { D_i5_801BBEF4[4] = 20.0f; boss->swork[29] = 1; boss->swork[37] |= 1; - AUDIO_PLAY_SFX(0x2903300E, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, boss->sfxSource, 4); } break; case 4: @@ -4017,14 +4017,14 @@ void Titania_80193DF0(Boss* boss) { D_i5_801BBEF4[2] += D_i5_801BBEF4[1]; D_i5_801BBEF4[1] -= 3.0; if (D_i5_801BBEF4[2] <= 0.0f) { - Audio_KillSfxBySourceAndId(boss->sfxSource, 0x11003023); + Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_HEARTBEAT); boss->swork[29] = 0; D_i5_801BBEF4[2] = 0.0f; boss->swork[28]++; } break; case 8: - AUDIO_PLAY_SFX(0x11033022, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_GATHER_PARTS, boss->sfxSource, 4); for (i = 0; i < 33; i++) { actor = func_game_800A3608(OBJ_ACTOR_189); @@ -4190,7 +4190,7 @@ void Titania_80193DF0(Boss* boss) { case 6: boss->fwork[47] = (f32) boss->unk_04C / (f32) (Animation_GetFrameCount(&D_TI_900FC4C) * 2); if ((boss->unk_04C == 0) || (boss->unk_04C == 68) || (boss->unk_04C == 96) || (boss->unk_04C == 149)) { - AUDIO_PLAY_SFX(0x2900502A, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_APPEAR_SAND, boss->sfxSource, 4); } temp_f = gPlayer[0].trueZpos - boss->obj.pos.z - 530.0f; if (temp_f < 0.0f) { @@ -4222,7 +4222,7 @@ void Titania_80193DF0(Boss* boss) { Math_SmoothStepToVec3fArray(D_i5_801BC978, D_i5_801BCDC8, 1, 92, boss->fwork[0], 360.0f, 0.01f); boss->unk_04C++; if (boss->unk_04C >= (Animation_GetFrameCount(&D_TI_900FC4C) * 2)) { - AUDIO_PLAY_SFX(0x2940702B, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_TIBOSS_AT_CRY, boss->sfxSource, 4); gPlayer[0].unk_19C = 0; boss->unk_04C = 0; boss->fwork[48] = 0; @@ -4300,7 +4300,7 @@ void Titania_80193DF0(Boss* boss) { D_i5_801BBEF4[12] = 0.0f; } if ((boss->unk_04C == 22) || (boss->unk_04C == 80)) { - AUDIO_PLAY_SFX(0x2940702B, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_TIBOSS_AT_CRY, boss->sfxSource, 4); } if (((boss->unk_04C >= 0) && (boss->unk_04C < 18)) || ((boss->unk_04C >= 62) && (boss->unk_04C < 80))) { D_i5_801BBEF4[12] = @@ -4315,7 +4315,7 @@ void Titania_80193DF0(Boss* boss) { func_effect_8007A900(spD4.x, 0.0f, spD4.z, 10.0f, 255, 8, 0); } if (boss->unk_04C == 38) { - func_effect_8007A6F0(&spD4, 0x29403031); + func_effect_8007A6F0(&spD4, NA_SE_EN_SAND_BOUND_M); boss->swork[39] = 5; gCameraShake = 20; } @@ -4328,7 +4328,7 @@ void Titania_80193DF0(Boss* boss) { func_effect_8007A900(spD4.x, 0.0f, spD4.z, 10.0f, 255, 8, 0); } if (boss->unk_04C == 98) { - func_effect_8007A6F0(&spD4, 0x29403031); + func_effect_8007A6F0(&spD4, NA_SE_EN_SAND_BOUND_M); boss->swork[39] = 5; gCameraShake = 20; } @@ -4369,7 +4369,7 @@ void Titania_80193DF0(Boss* boss) { D_i5_801BBEF0[17]--; } if (boss->unk_04C == 0) { - AUDIO_PLAY_SFX(0x39435830, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_BOSS_CHARGE, boss->sfxSource, 4); } if (boss->unk_04C == 15) { D_i5_801BBEF0[16] = 25; @@ -4387,7 +4387,7 @@ void Titania_80193DF0(Boss* boss) { // pad = boss->unk_04C == 45; if (boss->unk_04C == 45) { - AUDIO_PLAY_SFX(0x3143102F, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_BOSS_BEAM0, boss->sfxSource, 4); boss->swork[32] = 0; boss->fwork[42] = 0.0f; boss->fwork[41] = 40.0f; @@ -4415,7 +4415,7 @@ void Titania_80193DF0(Boss* boss) { } boss->swork[32] = 0; - Audio_KillSfxBySourceAndId(boss->sfxSource, 0x3143102F); + Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_BOSS_BEAM0); boss->swork[25] = 0; boss->fwork[41] = 0.0f; boss->fwork[42] = 0.0f; @@ -4488,7 +4488,7 @@ void Titania_80193DF0(Boss* boss) { boss->fwork[41] = 0.0f; boss->fwork[42] = 0.0f; boss->swork[24] = 0; - Audio_KillSfxBySourceAndId(boss->sfxSource, 0x39435830); + Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_BOSS_CHARGE); } } Math_SmoothStepToF(&boss->fwork[0], 0.5f, 1.0f, 0.02f, 0.0f); @@ -4530,7 +4530,7 @@ void Titania_80193DF0(Boss* boss) { } D_i5_801BBEF0[6] = 2; if (boss->unk_04C == 30) { - Audio_KillSfxBySourceAndId(boss->sfxSource, 0x11003023); + Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_HEARTBEAT); D_i5_801BBEF0[7] = 0; boss->obj.status = OBJ_DYING; D_i5_801BBEF4[12] = 0.0f; @@ -4647,11 +4647,11 @@ void Titania_80193DF0(Boss* boss) { boss->swork[1] = 13; boss->unk_04C = 0; if (boss->swork[25] != 0) { - Audio_KillSfxBySourceAndId(boss->sfxSource, 0x3143102F); + Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_BOSS_BEAM0); boss->swork[25] = 0; } if (boss->swork[24] != 0) { - Audio_KillSfxBySourceAndId(boss->sfxSource, 0x39435830); + Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_BOSS_CHARGE); boss->swork[24] = 0; } } @@ -4692,14 +4692,14 @@ void Titania_80193DF0(Boss* boss) { } } if ((boss->state == 6) && ((boss->unk_04C == 134) || (boss->unk_04C == 188))) { - AUDIO_PLAY_SFX(0x29406029, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_HEAVY_WALK2, boss->sfxSource, 4); boss->swork[39] = 4; gCameraShake = 7; } if (boss->state >= 7) { if (((boss->fwork[15] > 0.0f) && (boss->fwork[9] <= 0.0f)) || ((boss->fwork[12] > 0.0f) && (boss->fwork[6] <= 0.0f))) { - AUDIO_PLAY_SFX(0x29406029, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_HEAVY_WALK2, boss->sfxSource, 4); if (boss->state == 12) { boss->swork[39] = 4; gCameraShake = 20; @@ -4732,7 +4732,7 @@ void Titania_80197A94(Boss* boss) { boss->swork[38]++; if ((boss->dmgType != DMG_NONE) && (((boss->state >= 0) && (boss->state <= 1)) || ((boss->state >= 4) && (boss->state <= 6)))) { - AUDIO_PLAY_SFX(0x29121007, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, boss->sfxSource, 4); boss->dmgType = DMG_NONE; } if ((gPlayer[0].grounded != 0) && (boss->swork[39] > 0)) { @@ -4907,7 +4907,7 @@ void Titania_80197A94(Boss* boss) { sp3C.x = boss->fwork[29] + boss->obj.pos.x; sp3C.y = boss->fwork[30] + boss->obj.pos.y; sp3C.z = boss->fwork[31] + boss->obj.pos.z; - func_effect_8007A6F0(&sp3C, 0x09004002); + func_effect_8007A6F0(&sp3C, NA_SE_ARWING_DASH); D_i5_801BBEF0[49] = D_i5_801B8D54[RAND_INT(4.0f)]; D_i5_801BBEF4[74] = RAND_FLOAT(0.4f) + 0.9f; D_i5_801BBEF4[75] = 0.6f; @@ -5167,7 +5167,7 @@ void Titania_801990DC(Boss* boss) { Actor* actor; if (boss->unk_044 == 0) { - AUDIO_PLAY_SFX(0x2940902D, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_TIBOSS_DW_CRY, boss->sfxSource, 4); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); func_effect_8007A568(boss->obj.pos.x, boss->obj.pos.y + 250.0f, boss->obj.pos.z, 40.0f); diff --git a/src/overlays/ovl_i5/fox_ti_cs.c b/src/overlays/ovl_i5/fox_ti_cs.c index 417f1964..4b67df5e 100644 --- a/src/overlays/ovl_i5/fox_ti_cs.c +++ b/src/overlays/ovl_i5/fox_ti_cs.c @@ -19,7 +19,7 @@ void Titania_80187530(Actor* actor) { actor->obj.rot.y = 180.0f; Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(0x11030010, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); actor->unk_0B6 = 1; } @@ -35,7 +35,7 @@ void Titania_801875D0(Actor* actor, s32 arg1) { actor->obj.rot.y = 180.0f; actor->iwork[11] = 1; Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } void Titania_LevelStart(Player* player) { @@ -94,7 +94,7 @@ void Titania_LevelStart(Player* player) { if (gCsFrameCount == 430) { player->csState = 2; player->csTimer = 10; - AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, player->sfxSource, 0); } gCsCamAtX = player->pos.x; gCsCamAtY = player->pos.y; @@ -206,7 +206,7 @@ void Titania_LevelStart(Player* player) { if (D_ctx_80177A10[0] == 0) { D_ctx_80177A10[0]++; - AUDIO_PLAY_SFX(0x01008016, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_TANK_GO_UP, player->sfxSource, 0); } } @@ -229,7 +229,7 @@ void Titania_LevelStart(Player* player) { func_play_800A594C(); D_ctx_8017782C = 0; if ((gControllerHold[player->num].button & Z_TRIG) && (gControllerHold[player->num].button & R_TRIG)) { - Audio_KillSfxBySourceAndId(player->sfxSource, 0x01008016); + Audio_KillSfxBySourceAndId(player->sfxSource, NA_SE_TANK_GO_UP); } } break; @@ -274,11 +274,11 @@ void Titania_80188108(Actor* actor, s32 arg1) { actor->unk_0C9 = 1; actor->fwork[3] = D_i5_801B7348[arg1]; actor->state = 30; - AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } else { actor->unk_0B6 = 1; actor->state = 20; - AUDIO_PLAY_SFX(0x11030010, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); actor->fwork[9] = 20.0f; } } @@ -314,7 +314,7 @@ void Titania_LevelComplete(Player* player) { Titania_80188108(&gActors[2], 2); } - Audio_KillSfxBySourceAndId(player->sfxSource, 0x01004024); + Audio_KillSfxBySourceAndId(player->sfxSource, NA_SE_TANK_BURNER_HALF); case 1: Math_SmoothStepToF(D_ctx_80177A48, 0.1f, 1.0f, 0.01f, 0.0f); @@ -501,7 +501,7 @@ void Titania_LevelComplete(Player* player) { gProjectFar = 30000.0f; player->unk_240 = 1; Audio_StopPlayerNoise(0); - AUDIO_PLAY_SFX(0x01008016, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_TANK_GO_UP, player->sfxSource, 0); break; } diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index f21b1941..5e90e0f7 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -317,7 +317,7 @@ void Andross_80188468(void) { actor->iwork[14] = 1; actor->obj.id = OBJ_ACTOR_199; Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } void Andross_80188528(Actor* actor) { @@ -325,7 +325,7 @@ void Andross_80188528(Actor* actor) { Math_SmoothStepToF(&actor->vel.y, 0.0f, 0.2f, 0.5f, 0.0f); Math_SmoothStepToF(&actor->vel.z, 0.0f, 0.2f, 0.5f, 0.0f); if (actor->dmgType != DMG_NONE) { - func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); Object_Kill(&actor->obj, actor->sfxSource); func_effect_8007B344(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 3.0f, 5); } else if (actor->timer_0BC == 0) { @@ -394,7 +394,7 @@ void Andross_801888F4(Actor* actor) { func_effect_800794CC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 1.0f); } - func_effect_8007A6F0(&actor->obj.pos, 0x2903B009); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); Object_Kill(&actor->obj, actor->sfxSource); BonusText_Display(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 5); gHitCount += 6; @@ -420,11 +420,11 @@ void Andross_80188A4C(Boss* boss) { if (boss->swork[4] == 0) { boss->swork[2] = 10; boss->swork[3] = 15; - AUDIO_PLAY_SFX(0x2943500F, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_KNOCK_DOWN, boss->sfxSource, 4); boss->health -= boss->damage; if ((boss->health != 0) && (boss->health <= 0)) { gScreenFlashTimer = 8; - AUDIO_PLAY_SFX(0x2940D09A, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, boss->sfxSource, 4); Boss_AwardBonus(boss); gPlayer[0].state_1C8 = PLAYERSTATE_1C8_STANDBY; boss->state = 20; @@ -434,8 +434,8 @@ void Andross_80188A4C(Boss* boss) { D_ctx_80177A48[0] = 0.0f; D_ctx_80177A48[1] = 0.1f; gCsFrameCount = 0; - Audio_KillSfxBySourceAndId(boss->sfxSource, 0x11034074); - Audio_KillSfxBySourceAndId(boss->sfxSource, 0x31408097); + Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_ANDORF_BRAIN); + Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_ANDORF_CATCH); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); } @@ -450,7 +450,7 @@ void Andross_80188A4C(Boss* boss) { boss->timer_050 = 50; boss->fwork[3] = gPlayer[0].pos.x; boss->fwork[5] = gPlayer[0].trueZpos; - AUDIO_PLAY_SFX(0x2940B096, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ANDORF_WARP, boss->sfxSource, 4); } } break; @@ -638,7 +638,7 @@ void Andross_80189470(Actor* actor) { if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 500.0f) && (fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 500.0f)) { - Audio_KillSfxById(0x11403076); + Audio_KillSfxById(NA_SE_OB_ROOT_EXPLOSION1); Audio_SetEnvSfxReverb(0); gCurrentLevel = LEVEL_VENOM_2; gLevelPhase = 1; @@ -775,7 +775,7 @@ void Andross_80189B70(Boss* boss) { (fabsf(boss->obj.pos.z - gPlayer[0].trueZpos) < 300.0f) && (boss->state < 11) && (boss->timer_05A == 0)) { boss->state = 11; boss->timer_050 = 150; - AUDIO_PLAY_SFX(0x31408097, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ANDORF_CATCH, boss->sfxSource, 4); } switch (boss->state) { @@ -787,7 +787,7 @@ void Andross_80189B70(Boss* boss) { Andross_80189098(boss); boss->swork[5] = 300; boss->state++; - AUDIO_PLAY_SFX(0x11034074, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ANDORF_BRAIN, boss->sfxSource, 4); boss->fwork[21] = 255.0f; boss->fwork[22] = 255.0f; boss->fwork[23] = 0.0f; @@ -858,7 +858,7 @@ void Andross_80189B70(Boss* boss) { gPlayer[0].cockpitView = true; Math_SmoothStepToF(&D_display_800CA230, 0.15f, 0.2f, 0.004f, 0.0f); if (boss->timer_050 == 120) { - AUDIO_PLAY_SFX(0x1940306E, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_VO_ANDORF_LAUGH, boss->sfxSource, 4); } if (boss->timer_050 == 0) { gPlayer[0].baseSpeed = gArwingSpeed; @@ -872,7 +872,7 @@ void Andross_80189B70(Boss* boss) { } else { boss->state = 3; } - Audio_KillSfxBySourceAndId(boss->sfxSource, 0x31408097); + Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_ANDORF_CATCH); } break; case 3: @@ -899,7 +899,7 @@ void Andross_80189B70(Boss* boss) { boss->obj.pos.z = boss->fwork[5] + sp64.z; boss->unk_078.y = Math_RadToDeg(Math_Atan2F(xDisplacement, zDisplacement)); boss->state = 13; - AUDIO_PLAY_SFX(0x1940306E, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_VO_ANDORF_LAUGH, boss->sfxSource, 4); boss->timer_054 = 90; } break; @@ -1021,7 +1021,7 @@ void Andross_80189B70(Boss* boss) { func_play_800B7184(gPlayer, 1); Audio_StartPlayerNoise(0); AUDIO_PLAY_BGM(D_boss_800C9E90[gCurrentLevel]); - AUDIO_PLAY_SFX(0x11403076, gDefaultSfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_ROOT_EXPLOSION1, gDefaultSfxSource, 0); D_ctx_80177CA4 = gHitCount; break; @@ -1118,10 +1118,10 @@ void Andross_80189B70(Boss* boss) { if (boss->swork[5] != 0) { boss->swork[5]--; if (boss->swork[5] == 0) { - AUDIO_PLAY_SFX(0x11032075, gActors[10].sfxSource, 4); - AUDIO_PLAY_SFX(0x11032075, gActors[11].sfxSource, 4); - AUDIO_PLAY_SFX(0x3103108B, gActors[10].sfxSource, 4); - AUDIO_PLAY_SFX(0x3103108B, gActors[11].sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ANDORF_EYE, gActors[10].sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ANDORF_EYE, gActors[11].sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ANDORF_SPARK, gActors[10].sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ANDORF_SPARK, gActors[11].sfxSource, 4); } gActors[10].obj.pos.x = boss->obj.pos.x + 200.0f; gActors[10].obj.pos.y = boss->obj.pos.y - 200.0f; @@ -1478,7 +1478,7 @@ void Andross_8018CAD4(Effect* effect) { func_effect_8007A774(&gPlayer[0], effect, 100.0f); if (effect->unk_44 != 0) { func_effect_8007D0E0(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 10.0f); - func_effect_8007A6F0(&effect->obj.pos, 0x2903A008); + func_effect_8007A6F0(&effect->obj.pos, NA_SE_EN_EXPLOSION_S); Object_Kill(&effect->obj, effect->sfxSource); } } @@ -1488,7 +1488,7 @@ void Andross_8018CAD4(Effect* effect) { func_effect_8007A774(&gPlayer[0], effect, 100.0f); if (effect->unk_44 != 0) { func_effect_8007D0E0(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 10.0f); - func_effect_8007A6F0(&effect->obj.pos, 0x2903A008); + func_effect_8007A6F0(&effect->obj.pos, NA_SE_EN_EXPLOSION_S); Object_Kill(&effect->obj, effect->sfxSource); if (Rand_ZeroOne() < 0.1f) { item = gItems; @@ -1593,10 +1593,10 @@ void Andross_8018D2B0(Boss* boss) { if ((boss->state == 9) || (boss->state == 10)) { if (boss->health <= 0) { gScreenFlashTimer = 8; - AUDIO_PLAY_SFX(0x2940D09A, boss->sfxSource, 4); - AUDIO_PLAY_SFX(0x31009063, boss->sfxSource, 4); - AUDIO_PLAY_SFX(0x19403070, boss->sfxSource, 4); - Audio_KillSfxBySourceAndId(boss->sfxSource, 0x11030073); + AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ANDORF_EXPLOSION, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_VO_ANDORF_DEATH, boss->sfxSource, 4); + Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_ANDORF_ROBOT); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); boss->state = 31; @@ -1604,12 +1604,12 @@ void Andross_8018D2B0(Boss* boss) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].csState = 0; } else if (boss->health < 50) { - AUDIO_PLAY_SFX(0x2943500F, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_KNOCK_DOWN, boss->sfxSource, 4); } else { - AUDIO_PLAY_SFX(0x29034003, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, boss->sfxSource, 4); } } else if (boss->health <= 0) { - AUDIO_PLAY_SFX(0x19403070, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_VO_ANDORF_DEATH, boss->sfxSource, 4); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); if (gLevelPhase == 0) { @@ -1622,7 +1622,7 @@ void Andross_8018D2B0(Boss* boss) { gCsFrameCount = 0; boss->timer_05C = 100; } else { - AUDIO_PLAY_SFX(0x29034003, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, boss->sfxSource, 4); } } } @@ -1632,14 +1632,14 @@ void Andross_8018D2B0(Boss* boss) { if (boss->state < 11) { boss->swork[6] -= boss->damage; boss->swork[0] = 30; - AUDIO_PLAY_SFX(0x29034003, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, boss->sfxSource, 4); if (boss->swork[6] <= 0) { boss->swork[6] = 100; boss->state = 12; boss->timer_050 = 120; boss->unk_04C = 0; boss->fwork[9] = 0.0f; - AUDIO_PLAY_SFX(0x1940306F, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_VO_ANDORF_GROAN, boss->sfxSource, 4); } } break; @@ -1647,14 +1647,14 @@ void Andross_8018D2B0(Boss* boss) { if (boss->state < 12) { boss->swork[6] -= boss->damage; boss->swork[1] = 30; - AUDIO_PLAY_SFX(0x29034003, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, boss->sfxSource, 4); if (boss->swork[6] <= 0) { boss->swork[6] = 100; boss->state = 13; boss->timer_050 = 120; boss->unk_04C = 0; boss->fwork[9] = 0.0f; - AUDIO_PLAY_SFX(0x1940306F, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_VO_ANDORF_GROAN, boss->sfxSource, 4); } } break; @@ -1678,9 +1678,9 @@ void Andross_8018D2B0(Boss* boss) { RAND_FLOAT(1.0f) + 1.0f); } func_effect_8007B344(boss->vwork[0].x, boss->vwork[0].y, boss->vwork[0].z, 20.0f, 5); - func_effect_8007A6F0(&sp68, 0x2903B009); + func_effect_8007A6F0(&sp68, NA_SE_EN_EXPLOSION_M); } else { - func_effect_8007A6F0(&sp68, 0x29034003); + func_effect_8007A6F0(&sp68, NA_SE_OB_DAMAGE_M); } } else { sp68.x = boss->vwork[1].x; @@ -1698,9 +1698,9 @@ void Andross_8018D2B0(Boss* boss) { RAND_FLOAT(1.0f) + 1.0f); } func_effect_8007B344(boss->vwork[1].x, boss->vwork[1].y, boss->vwork[1].z, 20.0f, 5); - func_effect_8007A6F0(&sp68, 0x2903B009); + func_effect_8007A6F0(&sp68, NA_SE_EN_EXPLOSION_M); } else { - func_effect_8007A6F0(&sp68, 0x29034003); + func_effect_8007A6F0(&sp68, NA_SE_OB_DAMAGE_M); } } } @@ -1758,7 +1758,7 @@ void Andross_8018DA94(Boss* boss, Vec3f* arg1) { RAND_FLOAT(0.5f) + 1.0f); } func_effect_8007B344(arg1->x, arg1->y, arg1->z, 10.0f, 5); - AUDIO_PLAY_SFX(0x2903B009, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, boss->sfxSource, 4); } static f32 D_i6_801A67B8[] = { 0.0f, 0.0f, 0.0f }; @@ -1899,7 +1899,7 @@ void Andross_8018DBF0(Boss* boss) { case 1: boss->timer_05A = 100; if (boss->timer_054 == 65) { - AUDIO_PLAY_SFX(0x1940306E, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_VO_ANDORF_LAUGH, boss->sfxSource, 4); } if (boss->timer_050 != 0) { boss->fwork[6] = -3000.0f; @@ -1969,7 +1969,7 @@ void Andross_8018DBF0(Boss* boss) { boss->fwork[0] = player->pos.x; boss->fwork[3] = player->pos.y + 1000.0f; if (boss->unk_04C == 60) { - AUDIO_PLAY_SFX(0x1940306A, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_VO_ANDORF_PUNCH, boss->sfxSource, 4); } if (boss->unk_04C > 60) { if (boss->unk_04C == 76) { @@ -2017,7 +2017,7 @@ void Andross_8018DBF0(Boss* boss) { boss->fwork[0] = player->pos.x; boss->fwork[3] = player->pos.y; if (boss->unk_04C == 55) { - AUDIO_PLAY_SFX(0x1940306A, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_VO_ANDORF_PUNCH, boss->sfxSource, 4); } if (boss->unk_04C > 55) { boss->fwork[6] = -1500.0f; @@ -2072,7 +2072,7 @@ void Andross_8018DBF0(Boss* boss) { Math_SmoothStepToF(&boss->fwork[1], 2.0f, 1.0f, 1.0f, 0); Math_SmoothStepToF(&boss->fwork[4], 2.0f, 1.0f, 1.0f, 0); if (boss->unk_04C == 5) { - AUDIO_PLAY_SFX(0x1940306B, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_VO_ANDORF_SLAP, boss->sfxSource, 4); } boss->swork[7] = 1; boss->fwork[14] = 100.0f; @@ -2090,7 +2090,7 @@ void Andross_8018DBF0(Boss* boss) { Andross_8018D9C0(boss); } else { if (boss->timer_050 == 1) { - AUDIO_PLAY_SFX(0x1940306C, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_VO_ANDORF_WHAND, boss->sfxSource, 4); } if (boss->timer_050 != 0) { boss->fwork[6] = -4000.0f; @@ -2135,7 +2135,7 @@ void Andross_8018DBF0(Boss* boss) { Andross_8018D9C0(boss); } else { if (boss->unk_04C == 48) { - AUDIO_PLAY_SFX(0x3103108B, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ANDORF_SPARK, boss->sfxSource, 4); } if (boss->unk_04C > 48) { Andross_8018D0D8(boss); @@ -2268,10 +2268,10 @@ void Andross_8018DBF0(Boss* boss) { boss->fwork[3] = 0.0f; Math_SmoothStepToF(&boss->fwork[9], 1.0f, 1.0f, 0.01f, 0); if (boss->unk_04C == 15) { - AUDIO_PLAY_SFX(0x29022088, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ANDORF_BITE0, boss->sfxSource, 4); } if ((boss->unk_04C > 35) && (boss->unk_04C < 150) && ((boss->unk_04C % 32) == 0)) { - AUDIO_PLAY_SFX(0x29022089, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ANDORF_BITE1, boss->sfxSource, 4); if (player->state_1C8 == PLAYERSTATE_1C8_ANDROSS_MOUTH) { gControllerRumbleTimers[0] = 10; } @@ -2329,7 +2329,7 @@ void Andross_8018DBF0(Boss* boss) { limbCount = Animation_GetFrameData(&D_ANDROSS_C023B54, boss->unk_04C, spD0); Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, boss->fwork[9], 100.0f, 0.0f); if (boss->unk_04C == 10) { - AUDIO_PLAY_SFX(0x3140208A, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ANDORF_VOMIT, boss->sfxSource, 4); } if ((boss->unk_04C == 13) && (player->state_1C8 == PLAYERSTATE_1C8_ANDROSS_MOUTH)) { player->unk_234 = 1; @@ -2391,7 +2391,7 @@ void Andross_8018DBF0(Boss* boss) { boss->fwork[9] = 0.2f; boss->unk_04C = 0; boss->swork[8] = 2; - AUDIO_PLAY_SFX(0x1940306D, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_VO_ANDORF_CHOKE, boss->sfxSource, 4); break; } } @@ -2436,7 +2436,7 @@ void Andross_8018DBF0(Boss* boss) { Math_SmoothStepToF(&boss->fwork[7], 20.0f, 0.1f, 0.1f, 0); Math_SmoothStepToF(&boss->fwork[9], 1.0f, 1.0f, 0.01f, 0); if (boss->unk_04C == 10) { - AUDIO_PLAY_SFX(0x31022087, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ANDORF_BREATH, boss->sfxSource, 4); } boss->unk_04C++; if (boss->unk_04C >= Animation_GetFrameCount(&D_ANDROSS_C0240D0)) { @@ -2484,7 +2484,7 @@ void Andross_8018DBF0(Boss* boss) { boss->unk_044 = 2; boss->timer_050 = 70; boss->fwork[9] = 0.0f; - AUDIO_PLAY_SFX(0x1940307C, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_VO_ANDORF_EXCITE, boss->sfxSource, 4); } if (boss->timer_050 == 15) { boss->swork[10] = 80; @@ -2581,7 +2581,7 @@ void Andross_8018DBF0(Boss* boss) { boss->health = 100; boss->timer_050 = 50; boss->fwork[9] = 0.0f; - AUDIO_PLAY_SFX(0x11030073, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ANDORF_ROBOT, boss->sfxSource, 4); AUDIO_PLAY_BGM(SEQ_ID_AND_BOSS | SEQ_FLAG); break; } @@ -2729,7 +2729,7 @@ void Andross_8018DBF0(Boss* boss) { Andross_8018DA94(boss, &boss->vwork[17]); break; case 173: - func_effect_8007A6F0(&boss->obj.pos, 0x2940C00A); + func_effect_8007A6F0(&boss->obj.pos, NA_SE_EN_EXPLOSION_L); func_effect_8007B344(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 100.0f, 4); break; case 180: @@ -2793,10 +2793,10 @@ void Andross_8018DBF0(Boss* boss) { boss->info.hitbox[9] = boss->vwork[3].y - boss->obj.pos.y; boss->info.hitbox[11] = boss->vwork[3].x - boss->obj.pos.x; if ((initialstate == 17) && (boss->state != 17)) { - Audio_KillSfxBySourceAndId(boss->sfxSource, 0x31022087); + Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_ANDORF_BREATH); } if ((initialstate == 7) && (boss->state != 7)) { - Audio_KillSfxBySourceAndId(boss->sfxSource, 0x3103108B); + Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_ANDORF_SPARK); } } @@ -3211,7 +3211,7 @@ void Andross_80192E94(Actor* actor) { actor->vwork[0].z = actor->obj.pos.z; actor->health = 30; actor->unk_0F4.z = actor->obj.rot.z; - AUDIO_PLAY_SFX(0x11000028, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_SPARK_BEAM, actor->sfxSource, 0); break; case 1: otherActor = gActors; @@ -3252,7 +3252,7 @@ void Andross_80192E94(Actor* actor) { RAND_FLOAT_CENTERED(10.0f) + actor->obj.pos.y, actor->obj.pos.z, RAND_FLOAT(0.5f) + 0.5f); } - func_effect_8007A6F0(&actor->obj.pos, 0x2903A008); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); Object_Kill(&actor->obj, actor->sfxSource); } } @@ -3428,8 +3428,8 @@ void Andross_801939A0(s32 actorIndex) { actor->unk_0B6 = 1000; } Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); - AUDIO_PLAY_SFX(0x09000002, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); } static Vec3f D_i6_801A6878[4] = { @@ -3452,13 +3452,13 @@ void Andross_80193AE4(s32 actorIndex) { if (actorIndex == 0) { actor->state = 200; actor->unk_0B6 = 1; - AUDIO_PLAY_SFX(0x11030010, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); } else { actor->iwork[11] = 1; actor->fwork[7] = RAND_FLOAT(360.0f); actor->fwork[8] = RAND_FLOAT(360.0f); actor->state = 100; - AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } } @@ -3519,7 +3519,7 @@ void Andross_80193C4C(Player* player) { switch (gCsFrameCount) { case 80: func_effect_8007A568(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 40.0f); - func_effect_8007A6F0(&boss->obj.pos, 0x2940C00A); + func_effect_8007A6F0(&boss->obj.pos, NA_SE_EN_EXPLOSION_L); /* fallthrough */ case 85: case 90: @@ -3531,7 +3531,7 @@ void Andross_80193C4C(Player* player) { break; case 111: player->csState = 2; - AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, player->sfxSource, 0); player->unk_190 = player->unk_194 = 7.0f; D_ctx_80177A48[0] = 0.0f; D_ctx_80177A48[1] = 0.0f; @@ -3554,7 +3554,7 @@ void Andross_80193C4C(Player* player) { sp68.y = RAND_FLOAT_CENTERED(150.0f); sp68.z = 0.0f; if (gCsFrameCount == 50) { - AUDIO_PLAY_SFX(0x11403071, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_ROOT_EXPLOSION0, player->sfxSource, 0); Audio_SetEnvSfxReverb(0); } if (gCsFrameCount > 40) { @@ -3629,10 +3629,10 @@ void Andross_80193C4C(Player* player) { } break; case 150: - AUDIO_PLAY_SFX(0x1900602A, gDefaultSfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_WARP_HOLE, gDefaultSfxSource, 0); break; case 340: - Audio_KillSfxBySourceAndId(player->sfxSource, 0x11403071); + Audio_KillSfxBySourceAndId(player->sfxSource, NA_SE_OB_ROOT_EXPLOSION0); Audio_SetEnvSfxReverb(0); gVenomHardClear = 0; gBlurAlpha = 255; @@ -3681,7 +3681,7 @@ void Andross_80193C4C(Player* player) { } if (gCsFrameCount == 40) { Andross_801939A0(10); - AUDIO_PLAY_SFX(0x2940F026, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_STAR_EXPLOSION, boss->sfxSource, 4); gCameraShake = 30; gSceneSetup = 1; gControllerRumbleTimers[0] = 30; diff --git a/src/overlays/ovl_i6/fox_sy.c b/src/overlays/ovl_i6/fox_sy.c index 1178ba84..020a02e8 100644 --- a/src/overlays/ovl_i6/fox_sy.c +++ b/src/overlays/ovl_i6/fox_sy.c @@ -41,7 +41,7 @@ void SectorY_80197B30(Actor* actor, s32 timer) { actor->timer_04C = timer; actor->iwork[11] = 1; Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } void SectorY_80197C64(Effect* effect) { @@ -185,7 +185,7 @@ void SectorY_80198244(Boss* boss) { } boss->fwork[10] = 181.0f; boss->fwork[34] = 2.8f; - AUDIO_PLAY_SFX(0x2902306C, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MS_DASH, boss->sfxSource, 4); } void SectorY_801983E4(Boss* boss) { @@ -323,7 +323,7 @@ void SectorY_80198ABC(Boss* boss) { boss->fwork[41] = 1.8f; } } - AUDIO_PLAY_SFX(0x2902306C, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MS_DASH, boss->sfxSource, 4); switch (D_ctx_80177A10[8]) { case 0: @@ -436,7 +436,7 @@ void SectorY_80198F5C(Boss* boss) { } gPlayer[0].yRot_114 = 0.0f; } - AUDIO_PLAY_SFX(0x2940D09A, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, boss->sfxSource, 4); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 30); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 30); return; @@ -486,11 +486,11 @@ void SectorY_80198F5C(Boss* boss) { } } else { if (boss->index != 0) { - AUDIO_PLAY_SFX(0x2903300E, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, boss->sfxSource, 4); } else if (boss->health > 70) { - AUDIO_PLAY_SFX(0x29034003, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, boss->sfxSource, 4); } else { - AUDIO_PLAY_SFX(0x2943500F, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_KNOCK_DOWN, boss->sfxSource, 4); } if ((gBosses[1].obj.status == OBJ_FREE) && (gBosses[2].obj.status == OBJ_FREE)) { @@ -545,7 +545,7 @@ void SectorY_80199438(Boss* boss) { gHitCount += 4; } if (boss->timer_058 == 50) { - AUDIO_PLAY_SFX(0x2903A060, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MS_EXPLOSION_S, boss->sfxSource, 4); gControllerRumbleFlags[gMainController] = 1; gControllerRumbleTimers[gMainController] = 20; D_ctx_80177850 = 15; @@ -635,7 +635,7 @@ void SectorY_80199438(Boss* boss) { } func_effect_8007D2C8(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z + 30.0f, 4.0f); boss->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_6034304); - AUDIO_PLAY_SFX(0x2903A06F, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MS_SHIELD_BROKEN, boss->sfxSource, 4); } } if (boss->health <= 80) { @@ -708,7 +708,7 @@ void SectorY_80199DAC(Boss* boss) { boss->fwork[12] = 320.0f; if (boss->timer_056 == 0) { boss->timer_056 = 51; - AUDIO_PLAY_SFX(0x2902306C, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MS_DASH, boss->sfxSource, 4); } } } else { @@ -764,7 +764,7 @@ void SectorY_8019A434(Boss* boss) { boss->fwork[13] = COS_DEG(boss->unk_078.y) * boss->fwork[45]; boss->fwork[12] = 30.0f; boss->fwork[10] = 181.0f; - AUDIO_PLAY_SFX(0x19031003, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MS_LAND, boss->sfxSource, 4); } void SectorY_8019A520(Boss* boss) { @@ -785,7 +785,7 @@ void SectorY_8019A520(Boss* boss) { } if ((boss->unk_04C == 0) || (boss->unk_04C == 27)) { - AUDIO_PLAY_SFX(0x29022019, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_HEAVY_WALK, boss->sfxSource, 4); } } @@ -806,7 +806,7 @@ void SectorY_8019A66C(Boss* boss) { } if (boss->timer_056 == 60) { - AUDIO_PLAY_SFX(0x2902306C, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MS_DASH, boss->sfxSource, 4); boss->fwork[34] = 4.5f; if (Rand_ZeroOne() > 0.5f) { AllRange_PlayMessage(gMsg_ID_14330, RCID_BOSS_SECTORY); @@ -860,7 +860,7 @@ void SectorY_8019A898(Boss* boss) { Math_SmoothStepToAngle(&boss->unk_078.y, yAngle1, 0.1f, 2.0f, 0.1f); boss->fwork[0] = 1.0f; if ((boss->unk_04C == 0) || (boss->unk_04C == 27)) { - AUDIO_PLAY_SFX(0x29022019, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_HEAVY_WALK, boss->sfxSource, 4); } } else { boss->timer_056 = 0; @@ -923,9 +923,9 @@ void SectorY_8019AAF0(Boss* boss) { if (boss->unk_04C >= boss->swork[32] - 29) { if (boss->unk_04C == boss->swork[32] - 29) { if (boss->swork[31] == 11) { - AUDIO_PLAY_SFX(0x2903401C, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MS_PUNCH, boss->sfxSource, 4); } else { - AUDIO_PLAY_SFX(0x2902306D, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MS_KICK, boss->sfxSource, 4); } } @@ -1006,7 +1006,7 @@ void SectorY_8019AEEC(Boss* boss) { } if (boss->obj.pos.y == 0.0f) { - AUDIO_PLAY_SFX(0x0100001D, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_LIFT_UP, gDefaultSfxSource, 4); } Math_SmoothStepToF(&boss->obj.pos.y, 365.0f, 0.1f, 5.0f, 0.1f); @@ -1019,7 +1019,7 @@ void SectorY_8019AEEC(Boss* boss) { } if (boss->obj.pos.y == 365.0f) { - AUDIO_PLAY_SFX(0x09002013, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_LIFT_UP_END, gDefaultSfxSource, 4); boss->timer_050 = 20; boss->timer_056 = 135; } @@ -1036,7 +1036,7 @@ void SectorY_8019AEEC(Boss* boss) { } if (boss->timer_056 == 95) { - AUDIO_PLAY_SFX(0x3102505A, gActors[59].sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_BURNER_L, gActors[59].sfxSource, 4); } if (boss->timer_056 < 96) { Math_SmoothStepToF(&gActors[59].fwork[0], 0.0f, 0.1f, 0.2f, 0.05f); @@ -1053,7 +1053,7 @@ void SectorY_8019AEEC(Boss* boss) { D_i6_801A8440[0] = boss->sfxSource[0]; D_i6_801A8440[1] = boss->sfxSource[1]; D_i6_801A8440[2] = -500.0f; - AUDIO_PLAY_SFX(0x2902306C, D_i6_801A8440, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MS_DASH, D_i6_801A8440, 4); Audio_KillSfxBySource(gActors[59].sfxSource); boss->fwork[34] = 4.5f; gActors[59].vel.z = -40.0f; @@ -1256,9 +1256,9 @@ void SectorY_8019BC14(Boss* boss) { gPlayer[0].trueZpos = gPlayer[0].pos.z = sp44; if (boss->index == 0) { - AUDIO_PLAY_SFX(0x2901306E, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MS_SHOT_L, boss->sfxSource, 4); } else { - AUDIO_PLAY_SFX(0x2900306B, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MS_SHOT_S, boss->sfxSource, 4); } } } @@ -1357,11 +1357,11 @@ void SectorY_8019C194(Boss* boss, f32 zSpeed, f32 xSpeed) { if (sp2C > 0.0f) { if (boss->fwork[41] == 0.0f) { boss->fwork[41] = ABS(sp2C * 0.01f) + 0.8f; - AUDIO_PLAY_SFX(0x09000003, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_BRAKE, boss->sfxSource, 4); } } else if (boss->fwork[42] == 0.0f) { boss->fwork[42] = ABS(sp2C * 0.01f) + 0.8f; - AUDIO_PLAY_SFX(0x09000003, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_BRAKE, boss->sfxSource, 4); } } } @@ -1616,7 +1616,7 @@ void SectorY_8019C888(Boss* boss) { if (boss->dmgPart == 0) { if (boss->swork[25] == 0) { boss->swork[24] = 15; - AUDIO_PLAY_SFX(0x29121007, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, boss->sfxSource, 4); } else { SectorY_80198F5C(boss); } @@ -2023,7 +2023,7 @@ void SectorY_8019EB80(void) { actor->scale = 0.125f; } actor->iwork[11] = 1; - AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } } @@ -2166,10 +2166,10 @@ void SectorY_LevelComplete(Player* player) { } if (gCsFrameCount == 343) { - AUDIO_PLAY_SFX(0x09000007, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_WING_OPEN, player->sfxSource, 0); } if (gCsFrameCount == 395) { - AUDIO_PLAY_SFX(0x09000013, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_WING_OPEN_END, player->sfxSource, 0); } D_ctx_80177A48[1] += D_ctx_80177A48[2]; @@ -2312,7 +2312,7 @@ void SectorY_LevelComplete(Player* player) { break; case 1440: - AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, player->sfxSource, 0); player->unk_194 = 5.0f; player->unk_190 = 5.0f; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); @@ -2383,7 +2383,7 @@ void SectorY_8019FF00(Actor* actor) { case 2: actor->state = 3; - AUDIO_PLAY_SFX(0x09000002, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); actor->fwork[29] = 5.0f; /* fallthrough */ case 3: @@ -2412,7 +2412,7 @@ void SectorY_8019FF00(Actor* actor) { } else { if (gCsFrameCount == 540) { actor->fwork[29] = 3.8f; - AUDIO_PLAY_SFX(0x09000002, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); } Math_SmoothStepToF(&actor->obj.pos.x, 230.0f, 1.0f, 13.0f, 0.0f); } @@ -2423,7 +2423,7 @@ void SectorY_8019FF00(Actor* actor) { if (gCsFrameCount >= 535) { if (gCsFrameCount == 535) { actor->fwork[29] = 3.8f; - AUDIO_PLAY_SFX(0x09000002, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); } Math_SmoothStepToF(&actor->obj.pos.x, -1000.0f, 1.0f, 20.0f, 0.0f); Math_SmoothStepToAngle(&actor->unk_0F4.z, 45.0f, 1.0f, 4.0f, 0.0f); @@ -2439,7 +2439,7 @@ void SectorY_8019FF00(Actor* actor) { if (gCsFrameCount >= 525) { if (gCsFrameCount == 525) { actor->fwork[29] = 3.8f; - AUDIO_PLAY_SFX(0x09000002, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); } Math_SmoothStepToF(&actor->obj.pos.x, 1500.0f, 1.0f, 20.0f, 0.0f); Math_SmoothStepToAngle(&actor->unk_0F4.z, 315.0f, 1.0f, 2.0f, 0.0f); @@ -2550,8 +2550,8 @@ void SectorY_801A06A4(Actor* actor, s32 arg1) { actor->state = arg1 + 7; actor->iwork[11] = 1; Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); - AUDIO_PLAY_SFX(0x09000002, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); } } @@ -2587,7 +2587,7 @@ void SectorY_801A07FC(Actor* actor0, Actor* actor1) { actor1->obj.rot.x = actor0->obj.rot.x; actor1->obj.rot.y = actor0->obj.rot.y; actor1->unk_0B6 = 42; - AUDIO_PLAY_SFX(0x2900306B, actor1->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MS_SHOT_S, actor1->sfxSource, 4); } void SectorY_801A0A08(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 arg4) { @@ -2602,7 +2602,7 @@ void SectorY_801A0A08(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 arg4) { actor->timer_0BC = 35; actor->iwork[0] = 255; actor->unk_0B6 = 43; - AUDIO_PLAY_SFX(0x2900306B, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MS_SHOT_S, actor->sfxSource, 4); } void SectorY_801A0AC0(Player* player) { @@ -2817,14 +2817,14 @@ void SectorY_801A0AC0(Player* player) { func_effect_8007BFFC(gActors[11].obj.pos.x, gActors[11].obj.pos.y, gActors[11].obj.pos.z, gActors[11].vel.x, gActors[11].vel.y, gActors[11].vel.z, 8, 10); func_effect_8007B344(gActors[11].obj.pos.x, gActors[11].obj.pos.y, gActors[11].obj.pos.z, 8, 5); - AUDIO_PLAY_SFX(0x2903A060, gActors[11].sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MS_EXPLOSION_S, gActors[11].sfxSource, 4); break; case 188: gActors[5].fwork[0] = gActors[6].fwork[0] = gActors[7].fwork[0] = 3.8f; - AUDIO_PLAY_SFX(0x2902306C, gActors[5].sfxSource, 4); - AUDIO_PLAY_SFX(0x2902306C, gActors[6].sfxSource, 4); - AUDIO_PLAY_SFX(0x2902306C, gActors[7].sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MS_DASH, gActors[5].sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MS_DASH, gActors[6].sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MS_DASH, gActors[7].sfxSource, 4); break; case 150: @@ -2838,12 +2838,12 @@ void SectorY_801A0AC0(Player* player) { case 155: gActors[7].fwork[0] = 3.8f; - AUDIO_PLAY_SFX(0x2902306C, gActors[7].sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MS_DASH, gActors[7].sfxSource, 4); break; case 163: gActors[6].fwork[0] = 3.8f; - AUDIO_PLAY_SFX(0x2902306C, gActors[6].sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MS_DASH, gActors[6].sfxSource, 4); break; case 240: @@ -2855,7 +2855,7 @@ void SectorY_801A0AC0(Player* player) { gActors[9].iwork[5] = 0; gActors[9].iwork[6] = 255; gActors[9].iwork[7] = 100; - AUDIO_PLAY_SFX(0x2940F026, gActors[5].sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_STAR_EXPLOSION, gActors[5].sfxSource, 4); D_ctx_801779A8[gMainController] = 100.0f; break; @@ -2924,7 +2924,7 @@ void SectorY_801A0AC0(Player* player) { gActors[5].iwork[4] = gActors[6].iwork[4] = gActors[7].iwork[4] = 1; gActors[5].fwork[5] = gActors[6].fwork[5] = gActors[7].fwork[5] = 80.0f; gActors[6].fwork[1] = 60.0f; - AUDIO_PLAY_SFX(0x31000011, gActors[5].sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ENGINE_01, gActors[5].sfxSource, 4); } if ((gCsFrameCount >= 285) && (gActors[9].iwork[3] != 0)) { gActors[9].iwork[3] -= 5; @@ -3027,12 +3027,12 @@ void SectorY_801A0AC0(Player* player) { switch (gCsFrameCount) { case 340: gActors[5].fwork[0] = 1.8f; - AUDIO_PLAY_SFX(0x2902306C, gActors[5].sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MS_DASH, gActors[5].sfxSource, 4); break; case 350: gActors[6].fwork[0] = 1.8f; - AUDIO_PLAY_SFX(0x2902306C, gActors[6].sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MS_DASH, gActors[6].sfxSource, 4); break; case 370: @@ -3079,7 +3079,7 @@ void SectorY_801A0AC0(Player* player) { if (gCsFrameCount >= 390) { if (gActors[6].iwork[4] != 0) { gActors[6].fwork[0] = 1.8f; - AUDIO_PLAY_SFX(0x2902306C, gActors[6].sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MS_DASH, gActors[6].sfxSource, 4); gActors[6].obj.rot.x = (gActors[6].obj.rot.x - 2.0f); if (gActors[6].obj.rot.x <= 320.0f) { gActors[6].iwork[4] = 0; @@ -3098,7 +3098,7 @@ void SectorY_801A0AC0(Player* player) { gActors[6].obj.rot.y = (gActors[6].obj.rot.y + 6.0f); if (gActors[6].obj.rot.y > 230.0f) { gActors[6].fwork[0] = 2.8f; - AUDIO_PLAY_SFX(0x2902306C, gActors[6].sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MS_DASH, gActors[6].sfxSource, 4); } } } @@ -3142,7 +3142,7 @@ void SectorY_801A0AC0(Player* player) { gActors[7].obj.rot.y = (gActors[7].obj.rot.y + 6.0f); if (gActors[7].obj.rot.y > 230.0f) { gActors[7].fwork[0] = 2.8f; - AUDIO_PLAY_SFX(0x2902306C, gActors[7].sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MS_DASH, gActors[7].sfxSource, 4); } } } @@ -3174,7 +3174,7 @@ void SectorY_801A0AC0(Player* player) { gActors[5].obj.rot.y += 7.0f; if (gActors[5].obj.rot.y > 174.0f) { gActors[5].fwork[0] = 2.8f; - AUDIO_PLAY_SFX(0x2902306C, gActors[5].sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MS_DASH, gActors[5].sfxSource, 4); } } @@ -3226,7 +3226,7 @@ void SectorY_801A0AC0(Player* player) { Object_Kill(&gActors[10].obj, gActors[10].sfxSource); SectorY_801A07FC(&gActors[5], &gActors[10]); gActors[7].fwork[0] = 1.8f; - AUDIO_PLAY_SFX(0x2902306C, gActors[7].sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MS_DASH, gActors[7].sfxSource, 4); break; case 458: @@ -3255,7 +3255,7 @@ void SectorY_801A0AC0(Player* player) { case 545: player->unk_194 = 10.0f; player->unk_190 = 10.0f; - AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, player->sfxSource, 0); gControllerRumbleFlags[gMainController] = 1; gControllerRumbleTimers[gMainController] = 5; break; @@ -3271,7 +3271,7 @@ void SectorY_801A0AC0(Player* player) { gActors[5].obj.rot.y = gActors[6].obj.rot.y = 180.0f; gActors[7].obj.rot.y = 140.0f; gActors[5].fwork[0] = 2.8f; - AUDIO_PLAY_SFX(0x2902306C, gActors[5].sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MS_DASH, gActors[5].sfxSource, 4); player->csState++; break; } @@ -3557,7 +3557,7 @@ void SectorY_Actor204_Update(Actor204* this) { func_effect_8007F11C(OBJ_EFFECT_354, this->fwork[16], this->fwork[17], this->fwork[18], 100.0f); gPlayer[0].pos.x = sp1E4; gPlayer[0].pos.y = sp1E0; - AUDIO_PLAY_SFX(0x2900306B, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MS_SHOT_S, this->sfxSource, 4); } this->unk_048 = 0; } @@ -3618,7 +3618,7 @@ void SectorY_Actor204_Update(Actor204* this) { func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, this->vel.z, 8.0f, 10); func_effect_8007B344(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 8.0f, 5); - AUDIO_PLAY_SFX(0x2903A060, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MS_EXPLOSION_S, this->sfxSource, 4); } if (this->timer_0BE == 0) { @@ -3724,10 +3724,10 @@ void SectorY_Actor204_Update(Actor204* this) { this->dmgType = DMG_NONE; if (this->dmgPart == 0) { this->iwork[18] = 15; - AUDIO_PLAY_SFX(0x29121007, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } else { - AUDIO_PLAY_SFX(0x2903300E, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, this->sfxSource, 4); this->timer_0C6 = 15; func_effect_8007C120(this->hitPos.x, this->hitPos.y, this->hitPos.z, this->vel.x, this->vel.y, this->vel.z, 0.1f, 10); @@ -3828,7 +3828,7 @@ void SectorY_801A4E44(Scenery* scenery) { Vec3f sp30; if (scenery->state == 0) { - AUDIO_PLAY_SFX(0x1900404F, scenery->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_BROKEN_SPARK_L, scenery->sfxSource, 4); scenery->state++; } if (((gGameFrameCount % 4) == 0)) { @@ -3867,7 +3867,7 @@ void SectorY_801A52B8(Scenery* scenery) { Vec3f sp38; if (scenery->state == 0) { - AUDIO_PLAY_SFX(0x1900404F, scenery->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_BROKEN_SPARK_L, scenery->sfxSource, 4); scenery->state++; } diff --git a/src/overlays/ovl_i6/fox_turret.c b/src/overlays/ovl_i6/fox_turret.c index 60c8fe9d..5519389f 100644 --- a/src/overlays/ovl_i6/fox_turret.c +++ b/src/overlays/ovl_i6/fox_turret.c @@ -61,7 +61,7 @@ void Turret_801A581C(Player* player, f32 xOffset) { for (i = 0; i < ARRAY_COUNT(gPlayerShots); i++) { if (gPlayerShots[i].obj.status == 0) { Turret_801A5560(player, &gPlayerShots[i], xOffset, -100.0f, 200.0f, PLAYERSHOT_9, 100.0f); - func_play_800A6028(gPlayerShots[i].sfxSource, 0x09000000); + func_play_800A6028(gPlayerShots[i].sfxSource, NA_SE_TURRET_SHOT); break; } } diff --git a/src/overlays/ovl_i6/fox_ve2.c b/src/overlays/ovl_i6/fox_ve2.c index 12e03bbc..edee1db0 100644 --- a/src/overlays/ovl_i6/fox_ve2.c +++ b/src/overlays/ovl_i6/fox_ve2.c @@ -367,7 +367,7 @@ void Venom2_LevelComplete(Player* player) { if (player->xRot_120 >= 180.0f) { player->xRot_120 -= 360.0f; } - AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, player->sfxSource, 0); player->unk_194 = 5.0f; player->unk_190 = 5.0f; gCsFrameCount = 0; @@ -396,7 +396,7 @@ void Venom2_LevelComplete(Player* player) { } if (gCsFrameCount == 105) { - AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, player->sfxSource, 0); player->unk_194 = 5.0f; player->unk_190 = 5.0f; } diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index 744b6757..65df066a 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -2134,7 +2134,7 @@ void Map_801A0954(void) { if (gControllerPress[gMainController].button & START_BUTTON) { AUDIO_PLAY_BGM(SEQ_ID_WORLD_MAP); - AUDIO_PLAY_SFX(0x4900001F, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_MAP_MOVE_STOP, gDefaultSfxSource, 4); for (planetId = 0; planetId < PLANET_MAX; planetId++) { if ((planetId == PLANET_SECTOR_Z) || (planetId == PLANET_SECTOR_X) || (planetId == PLANET_SECTOR_Y)) { @@ -2346,7 +2346,7 @@ void Map_801A1528(void) { } if (temp == 0.0f) { - AUDIO_PLAY_SFX(0x4900001F, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_MAP_MOVE_STOP, gDefaultSfxSource, 4); D_menu_801CD948 = 0; D_menu_801CD97C = 1; D_menu_801CD944 = 3; @@ -2355,7 +2355,7 @@ void Map_801A1528(void) { } if (gControllerPress[gMainController].button & START_BUTTON) { - AUDIO_PLAY_SFX(0x4900001F, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_MAP_MOVE_STOP, gDefaultSfxSource, 4); for (planetId = 0; planetId < PLANET_MAX; planetId++) { if ((planetId == PLANET_SECTOR_Z) || (planetId == PLANET_SECTOR_X) || (planetId == PLANET_SECTOR_Y)) { @@ -2463,9 +2463,9 @@ void Map_801A1C14(void) { if (sCurrentPlanetId == PLANET_CORNERIA) { gFillScreenAlpha = 0; D_menu_801CD948 = 10; - AUDIO_PLAY_SFX(0x0940A00B, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_BACKUP_CLEAR, gDefaultSfxSource, 4); } else { - AUDIO_PLAY_SFX(0x19003012, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_MAP_ZOOM_START, gDefaultSfxSource, 4); D_menu_801CD948++; } } else { @@ -2481,7 +2481,7 @@ void Map_801A1C14(void) { case 10: if (D_menu_801CEB34 == 4) { - AUDIO_PLAY_SFX(0x19003012, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_MAP_ZOOM_START, gDefaultSfxSource, 4); D_menu_801CD948 = 2; } break; @@ -2489,7 +2489,7 @@ void Map_801A1C14(void) { case 2: Map_801A2674(); if ((D_menu_801CD9FC == D_menu_801CDA50.z) && (D_menu_801CD9D8 == 0)) { - AUDIO_PLAY_SFX(0x19004013, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_MAP_ZOOM_END, gDefaultSfxSource, 4); D_menu_801CD9D8 = 1; if (sCurrentPlanetId == PLANET_CORNERIA) { D_menu_801CEB48[0] = true; @@ -2909,9 +2909,9 @@ void Map_801A2EB8(void) { if (D_menu_801CD9C4 == 30) { if (sPrevMissionStatus == MISSION_WARP) { - AUDIO_PLAY_SFX(0x0900802A, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_MAP_ARWING_WARP_DASH, gDefaultSfxSource, 4); } else { - AUDIO_PLAY_SFX(0x09000032, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_MAP_ARWING_DASH, gDefaultSfxSource, 4); } } @@ -2979,7 +2979,7 @@ void Map_801A2EB8(void) { } if ((D_menu_801CEED8 == 4) && (D_menu_801CEEDC == 0.0f)) { - AUDIO_PLAY_SFX(0x19000026, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_MAP_ZOOM_OUT, gDefaultSfxSource, 4); } if ((D_menu_801CEED8 == 5) && (D_menu_801CEEDC == 0.0f)) { @@ -3137,7 +3137,7 @@ void Map_801A36A8(void) { } if (gControllerPress[gMainController].button & (A_BUTTON | START_BUTTON)) { - AUDIO_PLAY_SFX(0x49000003, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); D_menu_801CD948 = 3; } } @@ -3592,7 +3592,7 @@ void Map_801A4D7C(void) { if (gControllerPress[gMainController].button & A_BUTTON) { Audio_PlayMapMenuSfx(0); - AUDIO_PLAY_SFX(0x49000003, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); D_menu_801CF000[D_menu_801CEFDC] = 10; if (((sPrevMissionStatus != MISSION_COMPLETE) && (D_menu_801CEFDC == 2)) || @@ -3784,7 +3784,7 @@ bool Map_801A5770(void) { } if (ret) { - AUDIO_PLAY_SFX(0x49000002, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); } return ret; @@ -3945,7 +3945,7 @@ void Map_801A5E80(void) { case 1: if ((gControllerPress[gMainController].button & START_BUTTON) && !(D_menu_801CD9A8)) { - Audio_KillSfxById(0x4100001E); + Audio_KillSfxById(NA_SE_COMPUTER_NOISE); Audio_ClearVoice(); D_menu_801CF018 = 0; D_menu_801B8280 = 2; @@ -3994,7 +3994,7 @@ void Map_801A5E80(void) { case 4: if (D_menu_801CD9B8 == 0) { - AUDIO_PLAY_SFX(0x49002016, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_GOOD_LUCK, gDefaultSfxSource, 4); D_menu_801CD9B8 = 75; D_menu_801B8280++; } @@ -4260,11 +4260,11 @@ s32 Map_GetPathId(PlanetId start, PlanetId end) { } void Map_801A659C(void) { - Audio_KillSfxById(0x1100004C); - Audio_KillSfxById(0x1100204C); + Audio_KillSfxById(NA_SE_MAP_MOVE); + Audio_KillSfxById(NA_SE_MAP_ROLL); if (sCurrentPlanetId != PLANET_CORNERIA) { - AUDIO_PLAY_SFX(0x49000003, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); } D_menu_801CEFC8 = 0; @@ -4925,7 +4925,7 @@ void Map_801A809C(PlanetId planetId) { D_menu_801CD998 += 8; if (D_menu_801CD998 == 8) { - AUDIO_PLAY_SFX(0x49008030, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_GET_EMBLEM, gDefaultSfxSource, 4); } if (D_menu_801CD998 >= 255) { @@ -5838,7 +5838,7 @@ void Map_801AB300(void) { D_menu_801CEA74 = 255; gRadioTextBoxScaleY = 1.3f; - AUDIO_PLAY_SFX(0x4100001E, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_COMPUTER_NOISE, gDefaultSfxSource, 4); Audio_PlayVoice(Message_IdFromPtr(gRadioMsg)); gRadioStateTimer = Message_GetCharCount(gRadioMsg) * 2; @@ -5920,7 +5920,7 @@ void Map_801AB300(void) { case 6: if (gRadioStateTimer == 0) { - Audio_KillSfxById(0x4100001E); + Audio_KillSfxById(NA_SE_COMPUTER_NOISE); Audio_PlayVoice(0); gRadioTextBoxScaleY = 0.0f; D_menu_801CF018++; @@ -6359,7 +6359,7 @@ void Map_801AC9A0(s32 index) { switch (gPlanetPathStatus[index]) { case 1: - AUDIO_PLAY_SFX(0x1900404D, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_MAP_LINE_DRAW, gDefaultSfxSource, 4); gPlanetPathStatus[index] = 11; break; @@ -6367,7 +6367,7 @@ void Map_801AC9A0(s32 index) { Math_SmoothStepToF(&gTexturedLines[index].zScale, target, 0.1f, 100.0f, 4.0f); gTexturedLines[index].alpha = 255; if (gTexturedLines[index].zScale == target) { - Audio_KillSfxById(0x1900404D); + Audio_KillSfxById(NA_SE_MAP_LINE_DRAW); gPlanetPathStatus[index] = 4; } break; @@ -6581,7 +6581,7 @@ void Map_801AD11C(void) { if (gControllerPress[gMainController].button & START_BUTTON) { if (D_menu_801CD944 == 3 && D_game_80161A34 == 7) { if (D_menu_801CEFD0) { - AUDIO_PLAY_SFX(0x4900100A, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ERROR, gDefaultSfxSource, 4); } else { Audio_PlayMapMenuSfx(1); D_menu_801CEFC4 = 1; @@ -6626,14 +6626,14 @@ void Map_801AD11C(void) { } if (D_menu_801CF014 == 0 && var_a3 == 1) { - Audio_PlaySfxModulated(gDefaultSfxSource, 0x1100204C); + Audio_PlaySfxModulated(gDefaultSfxSource, NA_SE_MAP_ROLL); D_menu_801CF014 = 1; } if ((D_menu_801CF014 == 1) && (var_a3 == 0) && (y == 0.0f) && (x == 0.0f)) { var_a1 = 0; var_a2 = 0; - Audio_KillSfxById(0x1100204C); + Audio_KillSfxById(NA_SE_MAP_ROLL); D_menu_801CF014 = 0; } @@ -6680,12 +6680,12 @@ void Map_801AD11C(void) { } if ((D_menu_801CF010 == 0) && (var_t0 == 1)) { - AUDIO_PLAY_SFX(0x1100004C, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_MAP_MOVE, gDefaultSfxSource, 4); D_menu_801CF010 = 1; } if ((D_menu_801CF010 == 1) && (var_t0 == 0)) { - Audio_KillSfxById(0x1100004C); + Audio_KillSfxById(NA_SE_MAP_MOVE); D_menu_801CF010 = 0; } } diff --git a/src/overlays/ovl_menu/fox_option.c b/src/overlays/ovl_menu/fox_option.c index 4086b924..4936d5ce 100644 --- a/src/overlays/ovl_menu/fox_option.c +++ b/src/overlays/ovl_menu/fox_option.c @@ -922,13 +922,13 @@ void Option_MainMenuUpdate(void) { temp1 = Option_8019C418(&D_menu_801B91A4, OPTION_COUNT - 1, 1, 0, 20, 5, 4, gMainController, &D_menu_801B9180); // clang-format off - if (temp1 != 0) { AUDIO_PLAY_SFX(0x49000022, gDefaultSfxSource, 4); } + if (temp1 != 0) { AUDIO_PLAY_SFX(NA_SE_ARWING_CURSOR, gDefaultSfxSource, 4); } // clang-format on if ((D_menu_801B91A4 == 0) && (D_menu_801B91C8 != 0)) { temp2 = Option_8019C418(&D_menu_801B91B0, 1, 0, 0, 20, 5, 4, gMainController, &D_menu_801B9190); if (temp2 != 0) { - AUDIO_PLAY_SFX(0x49000022, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_CURSOR, gDefaultSfxSource, 4); if (D_menu_801B91B0) { sOptionCardList[0].unk_00.unk_08 = D_OPT_8004C50; sOptionCardList[0].unk_00.unk_10 = 80; @@ -948,7 +948,7 @@ void Option_MainMenuUpdate(void) { if ((D_menu_801B91A4 == 4) && (D_menu_801B91C8 != 0)) { temp2 = Option_8019C418(&D_menu_801B91AC, 1, 0, 0, 20, 5, 4, gMainController, &D_menu_801B9198); if (temp2 != 0) { - AUDIO_PLAY_SFX(0x49000022, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_CURSOR, gDefaultSfxSource, 4); if (D_menu_801B91AC) { sOptionCardList[4].unk_00.unk_08 = D_OPT_8004C50; sOptionCardList[4].unk_00.unk_10 = 80; @@ -966,13 +966,13 @@ void Option_MainMenuUpdate(void) { } if (gControllerPress[gMainController].button & (A_BUTTON | START_BUTTON)) { - AUDIO_PLAY_SFX(0x49000020, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_DECIDE, gDefaultSfxSource, 4); D_menu_801B9208 = sOptionCardPosY[D_menu_801B91A4]; D_menu_801B91BC = 0; D_menu_801B912C = 11; } if (gControllerPress[gMainController].button & B_BUTTON) { - AUDIO_PLAY_SFX(0x49000021, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_CANCEL, gDefaultSfxSource, 4); D_menu_801B8284 = 0; D_menu_801B8280 = 1; D_menu_801B912C = 100; @@ -1191,18 +1191,18 @@ void Option_VersusUpdate(void) { case 1: // clang-format off - if (Option_8019C418(&D_menu_801B91A8, 2, 1, 0, 20, 5, 4, gMainController, &D_menu_801B9188)) { AUDIO_PLAY_SFX(0x49000022, gDefaultSfxSource, 4); } + if (Option_8019C418(&D_menu_801B91A8, 2, 1, 0, 20, 5, 4, gMainController, &D_menu_801B9188)) { AUDIO_PLAY_SFX(NA_SE_ARWING_CURSOR, gDefaultSfxSource, 4); } // clang-format on if (gControllerPress[gMainController].button & (A_BUTTON | START_BUTTON)) { - AUDIO_PLAY_SFX(0x49000020, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_DECIDE, gDefaultSfxSource, 4); D_menu_801B9208 = D_menu_801AEF84[D_menu_801B91A8]; D_menu_801B91BC = 0; D_menu_801B912C = 11; } if (gControllerPress[gMainController].button & B_BUTTON) { - AUDIO_PLAY_SFX(0x49000021, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_CANCEL, gDefaultSfxSource, 4); D_menu_801B912C = 0; D_menu_801B9124 = 1000; gDrawMode = DRAW_NONE; @@ -1370,7 +1370,7 @@ void Option_SoundUpdate(void) { temp = Option_8019C418(&D_menu_801B9288, 3, 1, 0, 20, 5, 4, gMainController, &D_menu_801B9250); if (temp != 0) { D_menu_801B9270[sp34] = 255.0f; - AUDIO_PLAY_SFX(0x49000002, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); } if (D_menu_801B9288 == 0) { @@ -1386,12 +1386,12 @@ void Option_SoundUpdate(void) { } if (gControllerPress[gMainController].button & A_BUTTON) { - AUDIO_PLAY_SFX(0x49000003, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); D_menu_801B9288 = (D_menu_801B9288 + 1) % 4U; } if (gControllerPress[gMainController].button & B_BUTTON) { - AUDIO_PLAY_SFX(0x49000021, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_CANCEL, gDefaultSfxSource, 4); if (D_menu_801B9284 == 1) { D_menu_801B9284 = 0; Audio_PlaySoundTest(D_menu_801B9284); @@ -1409,7 +1409,7 @@ void Option_80194AEC(void) { s32 pad; if (Option_8019C418(&sp3C, 2, 0, 0, 20, 5, 4, gMainController, &D_menu_801B9260)) { - AUDIO_PLAY_SFX(0x49000002, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); gOptionSoundMode = sp3C; if (gOptionSoundMode >= OPTIONSOUND_MAX) { gOptionSoundMode = OPTIONSOUND_STEREO; @@ -1673,7 +1673,7 @@ void Option_ExpertSoundUpdate(void) { #endif if (Option_8019C66C(&sp28, 0.0f, 49.0f, &D_menu_801B9290) != 0) { - AUDIO_PLAY_SFX(0x49000002, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); D_menu_801B931C = sp28; } @@ -1684,14 +1684,14 @@ void Option_ExpertSoundUpdate(void) { if (gControllerPress[gMainController].button & B_BUTTON) { if (!D_menu_801B9320) { - AUDIO_PLAY_SFX(0x49000021, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_CANCEL, gDefaultSfxSource, 4); AUDIO_PLAY_BGM(SEQ_ID_MENU); gDrawMode = DRAW_NONE; D_menu_801B9124 = 1000; D_menu_801B912C = 0; D_menu_801B9244 = 1; } else { - AUDIO_PLAY_SFX(0x4900101D, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_CANCEL, gDefaultSfxSource, 4); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); D_menu_801B9320 = false; @@ -1869,7 +1869,7 @@ void Option_DataUpdate(void) { case 1: D_menu_801B91CC = 2; - AUDIO_PLAY_SFX(0x0940A00B, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_BACKUP_CLEAR, gDefaultSfxSource, 4); D_ctx_801779A8[gMainController] = 50.0f; D_ctx_80177990[gMainController] = 0; break; @@ -1922,36 +1922,36 @@ void Option_DataUpdate(void) { void Option_8019669C(void) { if ((D_menu_801B91CC == 0) || (D_menu_801B91CC == 1)) { if (Option_8019C5A0(&D_menu_801B91C0) != 0) { - AUDIO_PLAY_SFX(0x49000002, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); } if (1) {} } if (gControllerPress[gMainController].button & A_BUTTON) { if (D_menu_801B91CC == 3) { - AUDIO_PLAY_SFX(0x49000021, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_CANCEL, gDefaultSfxSource, 4); D_menu_801B912C = 3; } else { D_menu_801B9330[D_menu_801B91C0] = 10; if (D_menu_801B91C0 == 0) { if (D_menu_801B91CC == 1) { - AUDIO_PLAY_SFX(0x49000003, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); D_menu_801B912C = 2; } else { - AUDIO_PLAY_SFX(0x49000021, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_CANCEL, gDefaultSfxSource, 4); D_menu_801B912C = 3; } } else { - AUDIO_PLAY_SFX(0x49000003, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); D_menu_801B912C = 4; } } } else if (gControllerPress[gMainController].button & B_BUTTON) { if (D_menu_801B91CC == 1) { - AUDIO_PLAY_SFX(0x4900101D, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_CANCEL, gDefaultSfxSource, 4); D_menu_801B912C = 2; } else { - AUDIO_PLAY_SFX(0x49000021, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_CANCEL, gDefaultSfxSource, 4); D_menu_801B912C = 3; } } @@ -2080,7 +2080,7 @@ void Option_RankingUpdate(void) { Option_80196FC4(); if (gControllerPress[gMainController].button & B_BUTTON) { - AUDIO_PLAY_SFX(0x49000021, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_CANCEL, gDefaultSfxSource, 4); gDrawMode = DRAW_NONE; D_menu_801B9124 = 1000; D_menu_801B912C = 0; @@ -2095,7 +2095,7 @@ void Option_RankingDraw(void) { void Option_80196FC4(void) { if (gControllerPress[gMainController].button & A_BUTTON) { - AUDIO_PLAY_SFX(0x49000003, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); D_menu_801B93E0 ^= 1; } @@ -2109,7 +2109,7 @@ void Option_80196FC4(void) { void Option_80197074(void) { if (Option_8019C418(&D_menu_801B93E4, 9, 1, 0, 20, 5, 4, gMainController, &D_menu_801B9400)) { - AUDIO_PLAY_SFX(0x49000002, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); D_menu_801B91D4 = 114.0f - D_menu_801B93E4 * 130.0f; D_menu_801B91DC = 114.0f - D_menu_801B93E4 * 130.0f; D_menu_801B91D8 = -6.0f + D_menu_801B93E4 * 130.0f; @@ -2126,7 +2126,7 @@ void Option_8019715C(void) { if (D_menu_801B91D0 != 0) { if (Option_8019C418(&D_menu_801B93E4, 9, 1, 1, 20, 2, 9, gMainController, &D_menu_801B9408) != 0.00f) { - AUDIO_PLAY_SFX(0x49000002, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); D_menu_801B91DC = 114.0f - D_menu_801B93E4 * 130.0f; D_menu_801B91E0 = -6.0f + D_menu_801B93E4 * 130.0f; D_menu_801B91D0 = 0; @@ -2696,19 +2696,19 @@ void Option_8019949C(void) { if (!(D_menu_801B93C4 & (1 << i))) { Option_8019C824(&D_menu_801B9358[i]); if (Option_8019C418(&D_menu_801AED3C[i], 2, 0, 0, 20, 2, 4, i, &D_menu_801B93A0[i])) { - AUDIO_PLAY_SFX(0x49000002, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); } } if (gControllerPress[i].button & A_BUTTON) { if (D_menu_801B93C4 == 15) { - AUDIO_PLAY_SFX(0x49000003, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); D_menu_801B91EC = 10; D_menu_801B912C++; break; } else { if (!(D_menu_801B93C4 & (1 << i))) { - AUDIO_PLAY_SFX(0x49000003, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); gHandicap[i] = D_menu_801AED3C[i]; D_menu_801B9358[i] = 255.0f; D_menu_801B9348[i] = 10; @@ -2719,11 +2719,11 @@ void Option_8019949C(void) { if (gControllerPress[i].button & B_BUTTON) { if (D_menu_801B93C4 & (1 << i)) { - AUDIO_PLAY_SFX(0x4900101D, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_CANCEL, gDefaultSfxSource, 4); D_menu_801B93C4 &= (1 << i) ^ 15; } else { AUDIO_PLAY_BGM(SEQ_ID_MENU); - AUDIO_PLAY_SFX(0x49000021, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_CANCEL, gDefaultSfxSource, 4); Option_8019B8A0(2); D_menu_801B9248 = 1; break; @@ -3028,19 +3028,19 @@ void Option_8019A2E0(void) { } if (Option_8019C418(&D_menu_801B93D4, 4, 0, 0, 20, 2, 4, i, &D_menu_801B9380[i])) { - AUDIO_PLAY_SFX(0x49000002, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); gVsPointsToWin = D_menu_801B93D4 + 1; } if (gControllerPress[i].button & A_BUTTON) { - AUDIO_PLAY_SFX(0x49000003, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); Option_8019A080(); D_menu_801B936C = 10; break; } if (gControllerPress[i].button & B_BUTTON) { - AUDIO_PLAY_SFX(0x4900101D, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_CANCEL, gDefaultSfxSource, 4); D_menu_801B9124 = D_menu_801B93D0; D_menu_801B91C4 = 0; Option_InitEntry(); @@ -3068,20 +3068,20 @@ void Option_8019A4DC(void) { } if (Option_8019C418(&D_menu_801B93DC, 4, 0, 0, 20, 2, 4, i, &D_menu_801B9380[i])) { - AUDIO_PLAY_SFX(0x49000002, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); D_menu_801B9340 = D_menu_801B93DC; gVsTimeTrialLimit = D_menu_801B93DC; } if (gControllerPress[i].button & A_BUTTON) { - AUDIO_PLAY_SFX(0x49000003, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); Option_8019A080(); D_menu_801B937C = 10; break; } if (gControllerPress[i].button & B_BUTTON) { - AUDIO_PLAY_SFX(0x4900101D, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_CANCEL, gDefaultSfxSource, 4); D_menu_801B9124 = D_menu_801B93D0; D_menu_801B91C4 = 0; Option_InitEntry(); @@ -3109,12 +3109,12 @@ void Option_8019A6DC(void) { continue; } if (Option_8019C418(&D_menu_801B93D8, 1, 0, 1, 20, 2, 4, i, &D_menu_801B9380[i])) { - AUDIO_PLAY_SFX(0x49000002, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); D_game_80161A28 = D_menu_801B93D8; } if (gControllerPress[i].button & A_BUTTON) { - AUDIO_PLAY_SFX(0x49000003, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); if (D_game_80161A28 == 0) { gVersusStage = VS_STAGE_CORNERIA; if (D_menu_801B93D0 == 30) { @@ -3130,7 +3130,7 @@ void Option_8019A6DC(void) { } if (gControllerPress[i].button & B_BUTTON) { - AUDIO_PLAY_SFX(0x4900101D, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_CANCEL, gDefaultSfxSource, 4); if (D_menu_801B93D0 == 20) { D_menu_801B9124 = D_menu_801B93D0; D_menu_801B91C4 = 0; @@ -3165,13 +3165,13 @@ void Option_8019A954(void) { } if (gControllerPress[i].button & A_BUTTON) { - AUDIO_PLAY_SFX(0x49000003, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); D_menu_801B91EC = 10; break; } if (gControllerPress[i].button & B_BUTTON) { - AUDIO_PLAY_SFX(0x4900101D, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_CANCEL, gDefaultSfxSource, 4); Option_8019A080(); D_menu_801B933C = 0; D_menu_801B91F0 = 0; @@ -3827,7 +3827,7 @@ bool Option_8019C66C(f32* arg0, f32 arg1, f32 arg2, UnkStruct_D_menu_801B9250* a temp2 = *arg0; if ((s32) temp2 != (s32) temp) { - AUDIO_PLAY_SFX(0x49004007, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_COUNT_UP, gDefaultSfxSource, 4); var_a2 = true; } @@ -3986,7 +3986,7 @@ void Option_8019CD54(void) { if (D_menu_801B9138 == 0) { if (Option_8019C418(&D_menu_801B90A0[D_menu_801B9098], 36, 0, 0, 50, 5, 10, gMainController, &D_menu_801B9160[D_menu_801B9098])) { - AUDIO_PLAY_SFX(0x49000002, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); D_menu_801B9150[D_menu_801B9098][0] = D_menu_801AEF5C[D_menu_801B90A0[D_menu_801B9098]]; D_menu_801B90D0[D_menu_801B9098] = 0.0f; D_menu_801B9100[D_menu_801B9098] = 0.0f; @@ -3996,7 +3996,7 @@ void Option_8019CD54(void) { if (gControllerPress[gMainController].button & A_BUTTON) { D_menu_801B90D0[D_menu_801B9098] = 0.0f; if (D_menu_801B9138 != 0) { - AUDIO_PLAY_SFX(0x49000003, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); D_menu_801B9140[0] = 10; D_menu_801B9140[1] = 10; D_menu_801B9140[2] = 10; @@ -4006,7 +4006,7 @@ void Option_8019CD54(void) { } else { if (D_menu_801B9098 < 3) { - AUDIO_PLAY_SFX(0x49000003, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); D_menu_801B90D0[D_menu_801B9098] = 0.0f; D_menu_801B9140[D_menu_801B9098] = 15; D_menu_801B9128 = 1; @@ -4016,7 +4016,7 @@ void Option_8019CD54(void) { } if ((gControllerPress[gMainController].button & B_BUTTON) && (D_menu_801B9098 != 0)) { - AUDIO_PLAY_SFX(0x4900101D, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_CANCEL, gDefaultSfxSource, 4); if (D_menu_801B9138 != 0) { D_menu_801B9138 = 0; } @@ -4358,7 +4358,7 @@ void Option_8019DE74(void) { if (gControllerPress[gMainController].button & (START_BUTTON | A_BUTTON | B_BUTTON | D_CBUTTONS | L_CBUTTONS | U_CBUTTONS)) { // START, A, B, C-UP, C-LEFT, C-DOWN - AUDIO_PLAY_SFX(0x49000003, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); gDrawMode = DRAW_NONE; D_menu_801B912C = 0; @@ -4401,10 +4401,10 @@ void Option_InvoiceUpdate(void) { case 1: if (D_menu_801B9178 == 0) { if (((gTotalHits * 64) >= 50000) && ((gTotalHits * 64) < 70000)) { - AUDIO_PLAY_SFX(0x49000032, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_VO_PEPPER_CONSENT, gDefaultSfxSource, 4); } if ((gTotalHits * 64) >= 70000) { - AUDIO_PLAY_SFX(0x49000033, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_VO_PEPPER_SURPRISE, gDefaultSfxSource, 4); } D_menu_801B9178 = 20; D_menu_801B912C++; @@ -4415,7 +4415,7 @@ void Option_InvoiceUpdate(void) { if ((D_menu_801B9178 == 0) && (gControllerPress[gMainController].button & (START_BUTTON | A_BUTTON | B_BUTTON | D_CBUTTONS | L_CBUTTONS | U_CBUTTONS))) { - AUDIO_PLAY_SFX(0x19031083, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_STARFOX_SEAL, gDefaultSfxSource, 4); D_menu_801B9090 = 1; D_menu_801B9178 = 60; D_menu_801B912C++; diff --git a/src/overlays/ovl_menu/fox_title.c b/src/overlays/ovl_menu/fox_title.c index c9264953..4804b8d3 100644 --- a/src/overlays/ovl_menu/fox_title.c +++ b/src/overlays/ovl_menu/fox_title.c @@ -1103,8 +1103,8 @@ void Title_8018994C(void) { } if (D_menu_801B82B8 == 638) { - AUDIO_PLAY_SFX(0x11030010, D_menu_801B8658.unk_24, 0); - AUDIO_PLAY_SFX(0x31024059, D_menu_801B8658.unk_24, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, D_menu_801B8658.unk_24, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, D_menu_801B8658.unk_24, 0); Radio_PlayMessage(gMsg_ID_60, RCID_ROB64_TITLE); } @@ -1175,8 +1175,8 @@ void Title_8018994C(void) { } if (gFillScreenAlpha == 255) { - Audio_KillSfxBySourceAndId(D_menu_801B8658.unk_24, 0x11030010); - Audio_KillSfxBySourceAndId(D_menu_801B8658.unk_24, 0x31024059); + Audio_KillSfxBySourceAndId(D_menu_801B8658.unk_24, NA_SE_GREATFOX_ENGINE); + Audio_KillSfxBySourceAndId(D_menu_801B8658.unk_24, NA_SE_GREATFOX_BURNER); D_menu_801B82C0 = 0; @@ -1328,8 +1328,8 @@ void Title_8018A644(void) { switch (D_menu_801B82C0) { case 0: Title_8018A338(); - AUDIO_PLAY_SFX(0x49000014, gDefaultSfxSource, 4); - AUDIO_PLAY_SFX(0x0140001C, D_menu_801B84D8, 0); + AUDIO_PLAY_SFX(NA_SE_DEMO_SIREN, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_DEMO_RUNNING, D_menu_801B84D8, 0); D_menu_801B82B4 = 0; D_menu_801B82C8 = 0.0f; @@ -1374,8 +1374,8 @@ void Title_8018A644(void) { } if (D_menu_801B7BEC == 795) { - Audio_KillSfxById(0x49000014); - Audio_KillSfxBySourceAndId(D_menu_801B84D8, 0x0140001C); + Audio_KillSfxById(NA_SE_DEMO_SIREN); + Audio_KillSfxBySourceAndId(D_menu_801B84D8, NA_SE_DEMO_RUNNING); D_menu_801B82C0 = 0; @@ -1492,8 +1492,8 @@ void Title_8018ACEC(void) { switch (D_menu_801B82C0) { case 0: Title_8018ABC0(); - AUDIO_PLAY_SFX(0x11030010, D_menu_801B8658.unk_24, 0); - AUDIO_PLAY_SFX(0x31024059, D_menu_801B8658.unk_24, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, D_menu_801B8658.unk_24, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, D_menu_801B8658.unk_24, 0); D_menu_801B82CC = 0.01f; D_menu_801B82B4 = 0; @@ -1513,8 +1513,8 @@ void Title_8018ACEC(void) { } if (gFillScreenAlpha == 255) { - Audio_KillSfxBySourceAndId(D_menu_801B8658.unk_24, 0x11030010); - Audio_KillSfxBySourceAndId(D_menu_801B8658.unk_24, 0x31024059); + Audio_KillSfxBySourceAndId(D_menu_801B8658.unk_24, NA_SE_GREATFOX_ENGINE); + Audio_KillSfxBySourceAndId(D_menu_801B8658.unk_24, NA_SE_GREATFOX_BURNER); gDrawMode = DRAW_NONE; @@ -1669,7 +1669,7 @@ void Title_8018B5C4(void) { case 10: if (D_menu_801B82A8 == 0) { - AUDIO_PLAY_SFX(0x0100001D, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_LIFT_UP, gDefaultSfxSource, 4); D_menu_801B82B4 = 0; D_menu_801B82C0 = 1; } @@ -1684,7 +1684,7 @@ void Title_8018B5C4(void) { D_menu_801B9048 -= 0.41f; if (D_menu_801B9048 < 0.0f) { D_menu_801B9048 = 0.0f; - AUDIO_PLAY_SFX(0x09002013, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_LIFT_UP_END, gDefaultSfxSource, 4); } } @@ -1698,7 +1698,7 @@ void Title_8018B5C4(void) { } if (D_menu_801B84E8[i].unk_38 == 1) { - AUDIO_PLAY_SFX(0x1950107A, D_menu_801B84E8[i].unk_50, 0); + AUDIO_PLAY_SFX(NA_SE_ARWING_HATCH, D_menu_801B84E8[i].unk_50, 0); }; if (D_menu_801B84E8[i].unk_38 == 0) { @@ -1707,7 +1707,7 @@ void Title_8018B5C4(void) { 0.01f); D_menu_801B84E8[i].unk_10 *= 1.04f; if (temp[i] == 0.0f) { - Audio_KillSfxBySourceAndId(D_menu_801B84E8[i].unk_50, 0x1950107A); + Audio_KillSfxBySourceAndId(D_menu_801B84E8[i].unk_50, NA_SE_ARWING_HATCH); } } } @@ -1733,7 +1733,7 @@ void Title_8018B5C4(void) { if (D_menu_801B82B4 == 226) { D_menu_801B7BF0 = 0; - AUDIO_PLAY_SFX(0x0100001E, D_menu_801B84E8[3].unk_50, 0); + AUDIO_PLAY_SFX(NA_SE_ENGINE_START, D_menu_801B84E8[3].unk_50, 0); D_menu_801B86BC = 105.0f; D_menu_801B86C0 = 0.0f; @@ -1826,8 +1826,8 @@ void Title_8018B5C4(void) { case 3: if (D_menu_801B82A8 == 0) { - Audio_KillSfxBySourceAndId(D_menu_801B84E8[3].unk_50, 0x0100001E); - AUDIO_PLAY_SFX(0x09000002, D_menu_801B84E8[3].unk_50, 0); + Audio_KillSfxBySourceAndId(D_menu_801B84E8[3].unk_50, NA_SE_ENGINE_START); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, D_menu_801B84E8[3].unk_50, 0); D_menu_801B82A8 = 4; @@ -2015,8 +2015,8 @@ void Title_8018C644(void) { switch (D_menu_801B82C0) { case 0: - AUDIO_PLAY_SFX(0x11030010, D_menu_801B8658.unk_24, 0); - AUDIO_PLAY_SFX(0x31024059, D_menu_801B8658.unk_24, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, D_menu_801B8658.unk_24, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, D_menu_801B8658.unk_24, 0); Title_8018C1C0(); @@ -2043,7 +2043,7 @@ void Title_8018C644(void) { D_menu_801B84E8[i].unk_38--; } else { if (D_menu_801B84E8[i].unk_38 == 0) { - AUDIO_PLAY_SFX(0x19000001, D_menu_801B84E8[i].unk_50, 0); + AUDIO_PLAY_SFX(NA_SE_PASS, D_menu_801B84E8[i].unk_50, 0); D_menu_801B84E8[i].unk_38 = -1; D_menu_801B84E8[i].unk_4C = 1; } @@ -2079,8 +2079,8 @@ void Title_8018C644(void) { } if (gFillScreenAlpha == 255) { - Audio_KillSfxBySourceAndId(D_menu_801B8658.unk_24, 0x11030010); - Audio_KillSfxBySourceAndId(D_menu_801B8658.unk_24, 0x31024059); + Audio_KillSfxBySourceAndId(D_menu_801B8658.unk_24, NA_SE_GREATFOX_ENGINE); + Audio_KillSfxBySourceAndId(D_menu_801B8658.unk_24, NA_SE_GREATFOX_BURNER); D_menu_801B82C0++; } Title_801912A0(); @@ -3205,7 +3205,7 @@ void Title_80190EA4(void) { if (gControllerPress[gMainController].button & (START_BUTTON | A_BUTTON | B_BUTTON | D_CBUTTONS | L_CBUTTONS | U_CBUTTONS | R_CBUTTONS)) { // START, A, B, C-left, C-Down, C-Up, C-Right - AUDIO_PLAY_SFX(0x49000003, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); D_menu_801B8284 = 0; D_menu_801B8280 = 1; gControllerLock = 30; @@ -3237,7 +3237,7 @@ void Title_80190FD0(void) { if (((gControllerPress[gMainController].button & START_BUTTON) || (gControllerPress[gMainController].button & A_BUTTON)) && (D_menu_801B8280 == 0)) { - AUDIO_PLAY_SFX(0x49000003, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 30); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 30); D_menu_801B8284 = 0; From 7d46b8ad6b346cc17502f9b0c79d93d286825fff Mon Sep 17 00:00:00 2001 From: Alejandro Asenjo Nitti <96613413+sonicdcer@users.noreply.github.com> Date: Sun, 5 May 2024 23:10:44 -0300 Subject: [PATCH 062/151] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 03021abe..b0d8ef1a 100644 --- a/README.md +++ b/README.md @@ -68,8 +68,9 @@ The build process has a few python packages required that are located in `/tools To install them simply run in a terminal: ```bash -python3 -m pip install -r ./tools/requirements-python.txt --break-system-packages +python3 -m pip install -r ./tools/requirements-python.txt ``` +* Depending on your python version, you might need to add --break-system-packages, or use venv. #### 4. Update submodules & build toolchain From 7a68fcea815e7facad20c9bfb1d57e94b7091331 Mon Sep 17 00:00:00 2001 From: Alejandro Asenjo Nitti <96613413+sonicdcer@users.noreply.github.com> Date: Sun, 5 May 2024 23:11:52 -0300 Subject: [PATCH 063/151] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b0d8ef1a..790124cc 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,7 @@ make toolchain #### 5. Prepare a base ROM Copy your ROM to the root of this new project directory, and rename the file of the baserom to reflect the version of ROM you are using. ex: `baserom.us.z64` +*Make sure the ROM is revision 1.1 (REV A). #### 6. Make and Build the ROM From f5ce14123cbffec95cba36437faf76713b8994d2 Mon Sep 17 00:00:00 2001 From: Alejandro Asenjo Nitti <96613413+sonicdcer@users.noreply.github.com> Date: Sun, 5 May 2024 23:12:17 -0300 Subject: [PATCH 064/151] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 790124cc..55eecf25 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ make toolchain #### 5. Prepare a base ROM Copy your ROM to the root of this new project directory, and rename the file of the baserom to reflect the version of ROM you are using. ex: `baserom.us.z64` -*Make sure the ROM is revision 1.1 (REV A). +*Make sure the ROM is the US version, revision 1.1 (REV A). #### 6. Make and Build the ROM From 28be7aaba9bc941ef2317ea09b24c9aa669f61b2 Mon Sep 17 00:00:00 2001 From: Alejandro Asenjo Nitti <96613413+sonicdcer@users.noreply.github.com> Date: Sun, 5 May 2024 23:12:56 -0300 Subject: [PATCH 065/151] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 55eecf25..575bdc16 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ make toolchain #### 5. Prepare a base ROM Copy your ROM to the root of this new project directory, and rename the file of the baserom to reflect the version of ROM you are using. ex: `baserom.us.z64` -*Make sure the ROM is the US version, revision 1.1 (REV A). +* Make sure the ROM is the US version, revision 1.1 (REV A). #### 6. Make and Build the ROM From e7d5278426e02978047222149250aa12bad01634 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Mon, 6 May 2024 08:33:01 -0300 Subject: [PATCH 066/151] update message in comptool --- tools/comptool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/comptool.py b/tools/comptool.py index da44ef20..dbcf34af 100644 --- a/tools/comptool.py +++ b/tools/comptool.py @@ -195,7 +195,7 @@ def decompress(baserom, decomprom, mio0, extract_dest=None): dec_msg = 'compressed' v_file_size = len(file_bytes) else: - print('Invalid compression flag. This should be impossible, so please tell us if you get this error anyways.') + print('Invalid compression flag. Invalid ROM? Make sure ROM version is US v1.1 (REV A)') sys.exit(2) decompfile.seek(0, 2) From baaba960e6c5db790f10d37465968f4320334417 Mon Sep 17 00:00:00 2001 From: inspectredc <78732756+inspectredc@users.noreply.github.com> Date: Mon, 6 May 2024 18:11:29 +0100 Subject: [PATCH 067/151] use correct widths/heights (#233) --- assets/yaml/us/ast_radio.yaml | 48 +++++++++++++++++------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/assets/yaml/us/ast_radio.yaml b/assets/yaml/us/ast_radio.yaml index 88662b16..bb2bb02b 100644 --- a/assets/yaml/us/ast_radio.yaml +++ b/assets/yaml/us/ast_radio.yaml @@ -26,76 +26,76 @@ - '} CharCode;' text_char_special_0: - { type: TEXTURE, offset: 0x0, width: 13, height: 16, format: CI4, ctype: u8, symbol: gTextCharSpecial0 } + { type: TEXTURE, offset: 0x0, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharSpecial0 } text_char_special_4: - { type: TEXTURE, offset: 0x68, width: 13, height: 16, format: CI4, ctype: u8, symbol: gTextCharSpecial4 } + { type: TEXTURE, offset: 0x68, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharSpecial4 } text_char_special_8: - { type: TEXTURE, offset: 0xD0, width: 13, height: 16, format: CI4, ctype: u8, symbol: gTextCharSpecial8 } + { type: TEXTURE, offset: 0xD0, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharSpecial8 } text_char_special_12: - { type: TEXTURE, offset: 0x138, width: 13, height: 16, format: CI4, ctype: u8, symbol: gTextCharSpecial12 } + { type: TEXTURE, offset: 0x138, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharSpecial12 } text_char_cdir: - { type: TEXTURE, offset: 0x1A0, width: 13, height: 16, format: CI4, ctype: u8, symbol: gTextCharCDIR } + { type: TEXTURE, offset: 0x1A0, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharCDIR } text_char_adir: - { type: TEXTURE, offset: 0x208, width: 13, height: 16, format: CI4, ctype: u8, symbol: gTextCharADIR } + { type: TEXTURE, offset: 0x208, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharADIR } text_char_abcd_upper: - { type: TEXTURE, offset: 0x270, width: 13, height: 16, format: CI4, ctype: u8, symbol: gTextCharABCD } + { type: TEXTURE, offset: 0x270, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharABCD } text_char_efgh_upper: - { type: TEXTURE, offset: 0x2D8, width: 13, height: 16, format: CI4, ctype: u8, symbol: gTextCharEFGH } + { type: TEXTURE, offset: 0x2D8, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharEFGH } text_char_ijkl_upper: - { type: TEXTURE, offset: 0x340, width: 13, height: 16, format: CI4, ctype: u8, symbol: gTextCharIJKL } + { type: TEXTURE, offset: 0x340, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharIJKL } text_char_mnop_upper: - { type: TEXTURE, offset: 0x3A8, width: 13, height: 16, format: CI4, ctype: u8, symbol: gTextCharMNOP } + { type: TEXTURE, offset: 0x3A8, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharMNOP } text_char_qrst_upper: - { type: TEXTURE, offset: 0x410, width: 13, height: 16, format: CI4, ctype: u8, symbol: gTextCharQRST } + { type: TEXTURE, offset: 0x410, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharQRST } text_char_uvwx_upper: - { type: TEXTURE, offset: 0x478, width: 13, height: 16, format: CI4, ctype: u8, symbol: gTextCharUVWX } + { type: TEXTURE, offset: 0x478, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharUVWX } text_char_yzab_both: - { type: TEXTURE, offset: 0x4E0, width: 13, height: 16, format: CI4, ctype: u8, symbol: gTextCharYZABBoth } + { type: TEXTURE, offset: 0x4E0, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharYZABBoth } text_char_cdef_lower: - { type: TEXTURE, offset: 0x548, width: 13, height: 16, format: CI4, ctype: u8, symbol: gTextCharCDEFLower } + { type: TEXTURE, offset: 0x548, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharCDEFLower } text_char_ghij_lower: - { type: TEXTURE, offset: 0x5B0, width: 13, height: 16, format: CI4, ctype: u8, symbol: gTextCharGHIJLower } + { type: TEXTURE, offset: 0x5B0, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharGHIJLower } text_char_klmn_lower: - { type: TEXTURE, offset: 0x618, width: 13, height: 16, format: CI4, ctype: u8, symbol: gTextCharKLMNLower } + { type: TEXTURE, offset: 0x618, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharKLMNLower } text_char_opqr_lower: - { type: TEXTURE, offset: 0x680, width: 13, height: 16, format: CI4, ctype: u8, symbol: gTextCharOPQRLower } + { type: TEXTURE, offset: 0x680, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharOPQRLower } text_char_stuv_lower: - { type: TEXTURE, offset: 0x6E8, width: 13, height: 16, format: CI4, ctype: u8, symbol: gTextCharSTUVLower } + { type: TEXTURE, offset: 0x6E8, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharSTUVLower } text_char_wxyz_lower: - { type: TEXTURE, offset: 0x750, width: 13, height: 16, format: CI4, ctype: u8, symbol: gTextCharWXYZLower } + { type: TEXTURE, offset: 0x750, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharWXYZLower } text_char_pidc: - { type: TEXTURE, offset: 0x7B8, width: 13, height: 16, format: CI4, ctype: u8, symbol: gTextCharPIDC } + { type: TEXTURE, offset: 0x7B8, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharPIDC } text_char_p012: - { type: TEXTURE, offset: 0x820, width: 13, height: 16, format: CI4, ctype: u8, symbol: gTextCharP012 } + { type: TEXTURE, offset: 0x820, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharP012 } text_char_3456: - { type: TEXTURE, offset: 0x888, width: 13, height: 16, format: CI4, ctype: u8, symbol: gTextChar3456 } + { type: TEXTURE, offset: 0x888, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextChar3456 } text_char_789a: - { type: TEXTURE, offset: 0x8F0, width: 13, height: 16, format: CI4, ctype: u8, symbol: gTextChar789A } + { type: TEXTURE, offset: 0x8F0, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextChar789A } text_char_ppdp: - { type: TEXTURE, offset: 0x958, width: 13, height: 16, format: CI4, ctype: u8, symbol: gTextCharPPDP } + { type: TEXTURE, offset: 0x958, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharPPDP } message_table: { type: SF64:MSG_TABLE, offset: 0xCCAC, vram: 0x80179010, ctype: u8, symbol: gMsgLookup } \ No newline at end of file From a864e5ebe2dda26ef7ac5612d9fb2924184c680a Mon Sep 17 00:00:00 2001 From: petrie911 <69443847+petrie911@users.noreply.github.com> Date: Mon, 6 May 2024 17:45:24 -0500 Subject: [PATCH 068/151] oh god the docs (#234) --- include/context.h | 2 +- include/functions.h | 114 +-- include/i1.h | 6 +- include/i3.h | 34 +- include/i4.h | 4 +- include/i5.h | 4 +- include/i6.h | 14 +- include/prevent_context_reordering.h | 6 +- include/sf64audio_external.h | 1 + include/sf64object.h | 44 +- include/sf64player.h | 46 +- include/sfx.h | 4 +- linker_scripts/us/symbol_addrs_engine.txt | 178 ++-- linker_scripts/us/symbol_addrs_overlays.txt | 14 +- src/audio/audio_general.c | 10 +- src/engine/fox_360.c | 2 +- src/engine/fox_beam.c | 751 ++++++++--------- src/engine/fox_boss.c | 14 +- src/engine/fox_context.c | 2 +- src/engine/fox_demo.c | 98 +-- src/engine/fox_display.c | 27 +- src/engine/fox_edata_info.c | 28 +- src/engine/fox_edisplay.c | 56 +- src/engine/fox_effect.c | 12 +- src/engine/fox_enmy.c | 90 ++- src/engine/fox_enmy2.c | 96 ++- src/engine/fox_game.c | 26 +- src/engine/fox_hud.c | 32 +- src/engine/fox_play.c | 853 ++++++++++---------- src/engine/fox_tank.c | 83 +- src/engine/fox_versus.c | 16 +- src/overlays/ovl_ending/fox_end2.c | 4 +- src/overlays/ovl_i1/fox_co.c | 30 +- src/overlays/ovl_i1/fox_tr360.c | 27 +- src/overlays/ovl_i1/fox_ve1.c | 28 +- src/overlays/ovl_i2/fox_sx.c | 12 +- src/overlays/ovl_i3/fox_a6.c | 14 +- src/overlays/ovl_i3/fox_aq.c | 118 +-- src/overlays/ovl_i3/fox_so.c | 47 +- src/overlays/ovl_i3/fox_zo.c | 111 +-- src/overlays/ovl_i4/fox_bo.c | 14 +- src/overlays/ovl_i4/fox_fo.c | 40 +- src/overlays/ovl_i4/fox_ka.c | 8 +- src/overlays/ovl_i4/fox_sz.c | 16 +- src/overlays/ovl_i5/fox_ma.c | 40 +- src/overlays/ovl_i5/fox_ti.c | 34 +- src/overlays/ovl_i5/fox_ti_cs.c | 6 +- src/overlays/ovl_i6/fox_andross.c | 30 +- src/overlays/ovl_i6/fox_sy.c | 63 +- src/overlays/ovl_i6/fox_turret.c | 121 +-- src/overlays/ovl_i6/fox_ve2.c | 14 +- src/overlays/ovl_menu/fox_map.c | 12 +- src/overlays/ovl_menu/fox_option.c | 32 +- src/overlays/ovl_menu/fox_title.c | 18 +- src/sys/sys_fault.c | 2 +- src/sys/sys_lib.c | 4 +- src/sys/sys_main.c | 8 +- 57 files changed, 1808 insertions(+), 1712 deletions(-) diff --git a/include/context.h b/include/context.h index 0027aac4..5c697030 100644 --- a/include/context.h +++ b/include/context.h @@ -86,7 +86,7 @@ extern LevelId gCurrentLevel; extern s32 gLevelPhase; extern s32 gBossActive; extern s32 D_ctx_8017828C; -extern s32 D_ctx_80178294; +extern s32 gUseDynaFloor; extern s32 gRadioState; extern s32 gCurrentRadioPortrait; extern s32 gRadioStateTimer; diff --git a/include/functions.h b/include/functions.h index 223e8abf..81fa1215 100644 --- a/include/functions.h +++ b/include/functions.h @@ -32,13 +32,13 @@ void ActorAllRange_Update(Actor* this); void ActorAllRange_Draw(Actor* this); //fox_beam -void func_beam_80038140(PlayerShot* shot); -void func_beam_80036318(PlayerShot* shot); -void func_beam_80035DEC(f32 xPos, f32 yPos, f32 zPos); +void PlayerShot_CollisionCheck(PlayerShot* shot); +void PlayerShot_Impact(PlayerShot* shot); +void PlayerShot_SpawnEffect351(f32 xPos, f32 yPos, f32 zPos); void PlayerShot_Initialize(PlayerShot*); -void func_beam_800365E4(f32, f32, f32, f32, f32, f32, f32, f32, f32, s32, s32); -void PlayerShot_Update(void); -void PlayerShot_Draw(void); +void PlayerShot_SpawnEffect344(f32, f32, f32, f32, f32, f32, f32, f32, f32, s32, s32); +void PlayerShot_UpdateAll(void); +void PlayerShot_DrawAll(void); // fox_bg void Background_DrawStarfield(void); @@ -58,17 +58,17 @@ void Boss299_Draw(Boss* boss); void Boss300_Init(Boss* boss); void Boss300_Update(Boss* boss); void Boss300_Draw(Boss* boss); -void Boss_SpawnActor189(f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, s32, s32); +void Boss_SpawnDebris(f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, s32, s32); void Boss_CompleteLevel(Player* player, f32 xPos, f32 yPos, f32 zPos); // fox_tank -void func_tank_80043468(Player* player); +void Player_UpdateTankCamOnRails(Player* player); void func_tank_800444BC(Player* player); void func_tank_80044868(Player*); void func_tank_80045130(Player*); void func_tank_80045678(Player*); void func_tank_80045E7C(Player*); -void func_tank_80047504(Player* player); +void Tank_UpdateOnRails(Player* player); void func_tank_80046358(Player*); // fox_demo @@ -111,7 +111,7 @@ void Sprite167_Draw(Sprite*); void FogShadow_Draw(Sprite*); void func_edisplay_80059F68(Scenery*); void func_edisplay_80059FDC(Scenery*); -void Actor189_Draw(Actor*); +void ActorDebris_Draw(Actor*); void Actor_DrawEngineAndContrails(Actor*); void Actor_DrawEngineGlow(Actor*, s32); void func_edisplay_8005B388(Actor*); @@ -129,9 +129,9 @@ void ItemBomb_Draw(Item*); void ItemLasers_Draw(Item*); void ItemMeteoWarp_Draw(Item*); void Object_ClampSfxSource(f32*); -void func_edisplay_8005F0E8(f32*, Vec3f*); -void func_edisplay_8005F1EC(f32*); -void func_edisplay_8005F290(f32*, Vec3f*); +void Object_SetSfxSourceToPos(f32*, Vec3f*); +void Object_UpdateSfxSource(f32*); +void Object_SetSfxSourceToView(f32*, Vec3f*); void Display_SetSecondLight(Vec3f*); bool func_edisplay_8005F9DC(Vec3f*); @@ -140,7 +140,7 @@ void Object_Draw(s32 ); void Effect_Draw(u8 ); void TexturedLine_Draw(void); void TexturedLine_DrawPath(s32); -void func_enmy_80060F30(f32* , u32 , s32 ); +void Object_PlayerSfx(f32* , u32 , s32 ); void Object_Kill(Object*, f32*); bool func_enmy_80060FE4(Vec3f*, f32); void Object_SetInfo(ObjectInfo* info, u32 objId); @@ -177,7 +177,7 @@ void Sprite167_Update(Sprite*); void func_enmy_80066EA8(Scenery*); void Item_CheckBounds(Item*); void Item_SpinPickup(Item*); -void func_enmy_800674B4(f32, f32, f32, f32, f32, f32, f32, f32); +void Actor_SpawnDebris70(f32, f32, f32, f32, f32, f32, f32, f32); void ActorSupplies_Update(Actor*); void ActorSupplies_Draw(Actor*); void func_enmy_80067A40(void); @@ -221,7 +221,7 @@ void Actor194_Dying(Actor*); void Actor194_Draw(Actor*); void Scenery42_Update(Scenery*); void Actor196_Update(Actor*); -void Actor189_Update(Actor*); +void ActorDebris_Update(Actor*); void MeteoTunnel_Update(Scenery*); void Actor_SetupPlayerShot(PlayerShotId, PlayerShot*, s32, f32, f32, f32, f32, f32, f32, f32, f32, f32); void Actor_SpawnPlayerLaser(s32, f32, f32, f32, f32, f32, f32, f32, f32, f32); @@ -407,11 +407,11 @@ void HUD_DrawCountdown(s32* , f32); void func_hud_8008E9EC(f32, f32); void func_hud_8008EA14(f32, f32); void HUD_Draw(void); -void func_hud_8008FE78(Boss*); +void HUD_BossFO_Draw(Boss*); void func_hud_8008FFF0(Boss*, s32); s32 func_hud_80090200(Boss* boss); bool func_hud_8009092C(Actor*); -void func_hud_800907C4(Boss*); +void HUD_BossFO_Update(Boss*); bool func_hud_800915FC(Actor*); bool func_hud_800924E0(Actor*); @@ -442,54 +442,54 @@ void func_800A3CA0(void); // fox_play bool Play_CheckMedalStatus(u16); -void func_play_800A3FB0(void); +void Play_dummy_MuteSfx(void); s32 Play_GetMaxShields(void); -void func_play_800A6028(f32*, u32); -void func_play_800AC290(Player* player, PlayerShot* shot, f32 arg2, f32 arg3, PlayerShotId shotId, f32 speed); +void Play_PlaySfxFirstPlayer(f32*, u32); +void Player_SetupArwingShot(Player* player, PlayerShot* shot, f32 arg2, f32 arg3, PlayerShotId shotId, f32 speed); void Play_Setup(void); -void func_play_800A594C(void); +void Play_InitEnvironment(void); +void Play_GenerateStarfield(void); void Play_SetupStarfield(void); -void func_play_800A5EBC(void); -void func_play_800A5FA0(f32* , u32 , s32 ); -void func_play_800A6070(f32* , u32 ); +void Player_PlaySfx(f32* , u32 , s32 ); +void Play_PlaySfxNoPlayer(f32* , u32 ); void Play_ClearObjectData(void); -void func_play_800A69F8(s32 , f32 , f32 , f32 ); +void Play_SpawnDebris(s32 , f32 , f32 , f32 ); void Player_ApplyDamage(Player* player, s32 direction, s32 damage); -bool func_play_800A73E4(f32* , s32* , f32 xPos, f32 yPos, f32 zPos); -bool func_play_800A78C4(Hitbox* hitbox, f32 , f32 , f32 , f32 , f32 , f32 ); -void func_play_800A8BA4(Player* player); -void func_play_800AA800(Player* player); -void func_play_800ACDC0(Player*, PlayerShot*, PlayerShotId ); -void func_play_800B0F50(Player*); -void func_play_800B44C4(Player*); -void func_play_800AB334(void); -void func_play_800ABA08(void); -void func_play_800AE278(Player*); -void func_play_800B2130(Player*); -void func_play_800B2574(Player*); -void func_play_800B56BC(Player*); -void func_play_800B5D30(Player*, s32); -void func_play_800B5FBC(Player*, s32 , bool ); -void func_play_800B63BC(Player*, s32); -void func_play_800B6848(Player*, s32 ); -void func_play_800B6BFC(Player*, s32 ); -void func_play_800B6F50(f32, f32, f32, f32, f32, f32); -void func_play_800B7184(Player*, s32); -void func_play_800B73E0(Player*); +bool Play_CheckDynaFloorCollision(f32* , s32* , f32 xPos, f32 yPos, f32 zPos); +bool Play_CheckSingleHitbox(Hitbox* hitbox, f32 , f32 , f32 , f32 , f32 , f32 ); +void Player_CollisionCheck(Player* player); +void Player_FloorCheck(Player* player); +void Player_SetupOnFootShot(Player*, PlayerShot*, PlayerShotId ); +void Player_Setup(Player*); +void Player_Update360(Player*); +void Play_InitLevel(void); +void Player_InitVersus(void); +void Player_CheckBounds360(Player*); +void Player_UpdateArwingRoll(Player*); +void Player_ArwingBoost(Player*); +void Camera_UpdateArwingOnRails(Player*); +void Camera_UpdateCockpitOnRails(Player*, s32); +void Camera_FollowPlayer(Player*, s32 , bool ); +void Camera_UpdateArwing360(Player*, s32); +void Camera_UpdateTank360(Player*, s32 ); +void Camera_UpdateOnFoot360(Player*, s32 ); +void Camera_SetStarfieldPos(f32, f32, f32, f32, f32, f32); +void Camera_Update360(Player*, s32); +void Camera_SetupLights(Player*); void Play_SpawnVsItem(ObjectId , Item*); void Play_Main(void); -void func_play_800A668C(f32 xPos, f32 yPos, f32 zPos); -void func_play_800AD7F0(Player* player); -void func_play_800ADF58(Player* player); -void func_play_800B415C(Player* player); -void func_play_800B41E0(Player* player); +void Play_SpawnHitmark(f32 xPos, f32 yPos, f32 zPos); +void Player_Shoot(Player* player); +void Player_UpdatePath(Player* player); +void Player_LowHealthAlarm(Player* player); +void Play_dummy_800B41E0(Player* player); void Player_Down(Player* player); -void func_play_800A46A0(Player* player); -void func_play_800A86E4(Player* player); -void func_play_800A887C(Player* player); -s32 func_play_800A7974(Player* player, f32* hitboxData, s32* index, f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, +void Player_DamageEffects(Player* player); +void Player_CheckItemCollect(Player* player); +void Player_UpdateHitbox(Player* player); +s32 Player_CheckHitboxCollision(Player* player, f32* hitboxData, s32* index, f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 zRot, f32 arg9, f32 argA, f32 argB); -bool func_play_800A8054(ObjectId objId, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, Vec3f* arg7, Vec3f* arg8); +bool Play_CheckPolyCollision(ObjectId objId, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, Vec3f* arg7, Vec3f* arg8); void Scenery360_Initialize(Scenery360*); // fox_versus diff --git a/include/i1.h b/include/i1.h index 5316bb5d..ba1ce7fe 100644 --- a/include/i1.h +++ b/include/i1.h @@ -46,8 +46,8 @@ void Venom1_80192EB0(Actor*); void Venom1_801933DC(Actor*); void Venom1_801934D0(Actor*); void Venom1_80193540(Scenery*); -void Venom1_80194398(Boss*); -void Venom1_801985E4(Boss*); +void Venom1_Boss_Update(Boss*); +void Venom1_Boss_Draw(Boss*); void Training_ItemRing_Update(Item*); void OvlI1_CallFunction(s32, void*); @@ -66,7 +66,7 @@ void Venom1_Boss319_Init(Boss *); void Venom1_80198310(Boss *); void Venom1_80198594(Boss *); void Training_801988E0(void); -void Training_80198C50(void); +void Training_Setup360(void); void Training_8019949C(void); void Venom1_8019864C(PlayerShot*); diff --git a/include/i3.h b/include/i3.h index 94a5c041..a7620e87 100644 --- a/include/i3.h +++ b/include/i3.h @@ -19,12 +19,12 @@ void Aquas_801BE0F0(Actor*); void OvlI3_CallFunction(s32, void*); void Area6_BossA6_Init(Boss *); -void Area6_80187944(Boss*); -void Area6_8018C54C(Boss*); +void Area6_Boss_Update(Boss*); +void Area6_Boss_Draw(Boss*); void Area6_LevelStart(Player *player); void Area6_LevelComplete(Player*); -void Zoness_801900FC(Vec3f*, Vec3f*, f32, f32, f32, s32, f32, s32, s32); +void Zoness_SpawnDebris(Vec3f*, Vec3f*, f32, f32, f32, s32, f32, s32, s32); void Zoness_80190430(Actor* actor); void Zoness_801904CC(Actor* actor); void Zoness_80190A00(Actor* actor); @@ -45,8 +45,8 @@ void Zoness_80192C18(Actor* actor); void Zoness_80192E64(Actor* actor); void Zoness_80193240(Actor* actor); void Zoness_BossZo_Init(Boss* this); -void Zoness_801949DC(Boss* bossZO); -void Zoness_80194A84(Boss* bossZO); +void Zoness_Boss_Draw(Boss* bossZO); +void Zoness_Boss_Update(Boss* bossZO); void Zoness_8019969C(Actor* actor); void Zoness_8019983C(Actor* actor); void Zoness_80199A28(Actor* actor); @@ -83,22 +83,22 @@ void Solar_801A003C(Actor*); void Solar_801A0120(Effect*); void Solar_801A0AF0(Effect*); void Solar_LevelStart(Player* player); -void Solar_801A5B3C(Boss*); -void Solar_801A71B8(Boss*); +void Solar_Boss_Update(Boss*); +void Solar_Boss_Draw(Boss*); void Solar_801A8BE8(Actor*); void Solar_LevelComplete(Player* player); void Aquas_801A9824(void); void Aquas_801AA20C(void); -void Aquas_801AA8E8(Player*); -void Aquas_801AACF8(Player*); +void Aquas_UpdateCamera(Player*); +void Aquas_BlueMarineMove(Player*); void Aquas_801ABA40(PlayerShot*); -void Aquas_801AC274(Player*); +void Aquas_BlueMarineShoot(Player*); void Aquas_801AC8A8(f32, f32, f32, f32, s32); void Aquas_801AC918(Effect*); void Aquas_801ACBB4(Player*); -void Aquas_801ACE50(Player*); -void Aquas_801AD328(Player*); +void Aquas_BlueMarineBoost(Player*); +void Aquas_BlueMarineBrake(Player*); void Aquas_801AD688(Actor *); void Aquas_801AD6C0(Actor*); void Aquas_801AE168(Actor*); @@ -111,8 +111,8 @@ void Aquas_801B099C(Actor*); void Aquas_801B0B60(Actor*); void Aquas_801B0EC0(Actor*); void Aquas_BossAq_Init(Boss*); -void Aquas_801B134C(Boss*); -void Aquas_801B4D84(Boss*); +void Aquas_Boss_Update(Boss*); +void Aquas_Boss_Draw(Boss*); void Aquas_801B504C(Actor*); void Aquas_801B50E8(Actor*); void Aquas_801B619C(Actor*); @@ -144,10 +144,10 @@ void Aquas_801BDF14(void); void Aquas_801BE1FC(Scenery*); void Aquas_801BE3F8(Actor*); void Aquas_801BEB1C(Actor*); -void Aquas_801BEC50(Boss*); -void Aquas_801BEC5C(Boss*); +void Aquas_Boss301_Update(Boss*); +void Aquas_Boss301_Draw(Boss*); void Aquas_801BEC68(Actor*); void Aquas_801BEC74(Actor*); -void Aquas_801BEC80(Player*); +void Aquas_Update360(Player*); #endif diff --git a/include/i4.h b/include/i4.h index d4188c53..a1b9069b 100644 --- a/include/i4.h +++ b/include/i4.h @@ -47,7 +47,7 @@ void Katina_BossUpdate(Boss*); void Katina_BossDraw(Boss*); void SectorZ_8019E234(Actor*); void SectorZ_8019E3A8(Actor*); -void SectorZ_8019E454(Boss*); -void SectorZ_8019E98C(Boss*); +void SectorZ_Boss_Update(Boss*); +void SectorZ_Boss_Draw(Boss*); #endif diff --git a/include/i5.h b/include/i5.h index c73f6513..ae2b94d4 100644 --- a/include/i5.h +++ b/include/i5.h @@ -82,8 +82,8 @@ void Titania_8018EF14(Actor*); void Titania_Cactus_Update(Sprite*); void Titania_8018F4D8(Scenery*); void Titania_8018F8B8(Scenery*); -void Titania_80197A94(Boss*); -void Titania_801982A8(Boss*); +void Titania_Boss_Update(Boss*); +void Titania_Boss_Draw(Boss*); void Macbeth_8019C778(Actor*); void Macbeth_8019CE88(Actor*); void Macbeth_8019D700(Actor*); diff --git a/include/i6.h b/include/i6.h index 7ef81803..844e4fb5 100644 --- a/include/i6.h +++ b/include/i6.h @@ -36,9 +36,9 @@ void Venom2_80196968(void); void SectorY_Boss314_Init(Boss *); void SectorY_Actor204_Update(Actor*); void SectorY_Actor204_Draw(Actor*); -void Turret_801A5AD4(Player*); -void Turret_801A5FC0(Player*); -void Turret_801A6164(Player *); +void Turret_Update(Player*); +void Turret_UpdateCamera(Player*); +void Turret_Draw(Player *); void Andross_801880E4(Actor*); void Andross_80188448(Actor*); @@ -60,12 +60,12 @@ void Andross_80193380(Scenery*); void Andross_8019350C(Scenery*); void Andross_8019356C(Scenery*); void Andross_801935D4(Scenery*); -void Venom2_80196210(Boss*); -void Venom2_80196288(Boss*); +void Venom2_Boss_Update(Boss*); +void Venom2_Boss_Draw(Boss*); void SectorY_80197C64(Effect*); void SectorY_80197CB8(Scenery*); -void SectorY_8019C888(Boss*); -void SectorY_8019E2C4(Boss*); +void SectorY_Boss_Update(Boss*); +void SectorY_Boss_Draw(Boss*); void SectorY_801A4E44(Scenery*); void SectorY_801A52B8(Scenery*); diff --git a/include/prevent_context_reordering.h b/include/prevent_context_reordering.h index 968253ae..9b7404d8 100644 --- a/include/prevent_context_reordering.h +++ b/include/prevent_context_reordering.h @@ -1,15 +1,15 @@ #ifndef PREVENT_CONTEXT_REORDERING_H #define PREVENT_CONTEXT_REORDERING_H -// extern int Dummyhalf; +extern int Dummyhalf; // struct Dummy0 {int x;}; // struct Dummy1 {int x;}; // struct Dummy2 {int x;}; // struct Dummy3 {int x;}; // struct Dummy4 {int x;}; // struct Dummy5 {int x;}; -struct Dummy6 {int x;}; -struct Dummy7 {int x;}; +// struct Dummy6 {int x;}; +// struct Dummy7 {int x;}; struct Dummy8 {int x;}; struct Dummy9 {int x;}; struct Dummy10 {int x;}; diff --git a/include/sf64audio_external.h b/include/sf64audio_external.h index a3be1105..7fb41b79 100644 --- a/include/sf64audio_external.h +++ b/include/sf64audio_external.h @@ -14,6 +14,7 @@ typedef enum AudioType { /* 0 */ AUDIO_TYPE_MUSIC, /* 1 */ AUDIO_TYPE_VOICE, /* 2 */ AUDIO_TYPE_SFX, + /* 3 */ AUDIO_TYPE_MAX, } AudioType; typedef enum { diff --git a/include/sf64object.h b/include/sf64object.h index 8b8899a2..776b8591 100644 --- a/include/sf64object.h +++ b/include/sf64object.h @@ -45,12 +45,12 @@ typedef enum { /* 1 */ COL1_1, // OBJ_SCENERY_ME_TUNNEL /* 2 */ COL1_2, /* 3 */ COL1_3, // ACTOR_EVENT_ID - /* 4 */ COL1_4, // OBJ_BOSS_308 + /* 4 */ COL1_4, // OBJ_BOSS_FO /* 5 */ COL1_5, // OBJ_SCENERY_149 /* 6 */ COL1_6, // OBJ_SCENERY_150 /* 7 */ COL1_7, // OBJ_BOSS_309 - /* 8 */ COL1_8, // OBJ_BOSS_313 - /* 9 */ COL1_9, // OBJ_BOSS_312 + /* 8 */ COL1_8, // OBJ_BOSS_SZ + /* 9 */ COL1_9, // OBJ_BOSS_VE2 } CollisonId_1; typedef enum { @@ -502,7 +502,7 @@ typedef enum ObjectId { /* 186 */ OBJ_ACTOR_186, /* 187 */ OBJ_ACTOR_187, /* 188 */ OBJ_ACTOR_188, - /* 189 */ OBJ_ACTOR_189, + /* 189 */ OBJ_ACTOR_DEBRIS, /* 190 */ OBJ_ACTOR_190, /* 191 */ OBJ_ACTOR_191, /* 192 */ OBJ_ACTOR_192, @@ -619,20 +619,20 @@ typedef enum ObjectId { /* 303 */ OBJ_BOSS_303, /* 304 */ OBJ_BOSS_304, /* 305 */ OBJ_BOSS_305, - /* 306 */ OBJ_BOSS_306, + /* 306 */ OBJ_BOSS_TI, /* 307 */ OBJ_BOSS_ZO, - /* 308 */ OBJ_BOSS_308, + /* 308 */ OBJ_BOSS_FO, /* 309 */ OBJ_BOSS_309, /* 310 */ OBJ_BOSS_310, /* 311 */ OBJ_BOSS_311, - /* 312 */ OBJ_BOSS_312, - /* 313 */ OBJ_BOSS_313, - /* 314 */ OBJ_BOSS_314, + /* 312 */ OBJ_BOSS_VE2, + /* 313 */ OBJ_BOSS_SZ, + /* 314 */ OBJ_BOSS_SY, /* 315 */ OBJ_BOSS_SO, - /* 316 */ OBJ_BOSS_316, - /* 317 */ OBJ_BOSS_317, + /* 316 */ OBJ_BOSS_KA, + /* 317 */ OBJ_BOSS_KA_BASE, /* 318 */ OBJ_BOSS_AQ, - /* 319 */ OBJ_BOSS_319, + /* 319 */ OBJ_BOSS_VE1, /* 320 */ OBJ_BOSS_320, /* 321 */ OBJ_BOSS_321, /* 322 */ OBJ_ITEM_LASERS, @@ -719,10 +719,24 @@ typedef enum ObjectId { /* 403 */ OBJ_UNK_403, /* 404 */ OBJ_UNK_404, /* 405 */ OBJ_UNK_405, - /* 406 */ OBJ_UNK_406, /* 407 */ OBJ_ID_MAX, } ObjectId; +#define OBJ_SCENERY_START OBJ_SCENERY_0 +#define OBJ_SPRITE_START OBJ_SPRITE_CO_POLE +#define OBJ_ACTOR_START OBJ_ACTOR_176 +#define OBJ_BOSS_START OBJ_BOSS_292 +#define OBJ_ITEM_START OBJ_ITEM_LASERS +#define OBJ_EFFECT_START OBJ_EFFECT_FIRE_SMOKE +#define OBJ_ENV_START OBJ_UNK_400 + +#define OBJ_SCENERY_MAX OBJ_SPRITE_START +#define OBJ_SPRITE_MAX OBJ_ACTOR_START +#define OBJ_ACTOR_MAX OBJ_BOSS_START +#define OBJ_BOSS_MAX OBJ_ITEM_START +#define OBJ_ITEM_MAX OBJ_EFFECT_START +#define OBJ_EFFECT_MAX OBJ_ENV_START + #define ACTOR_EVENT_ID 1000 typedef enum ItemDrop { @@ -772,7 +786,7 @@ typedef enum AllRangeAi { /* 200 */ AI360_EVENT_HANDLER = 1000, } AllRangeAi; -Actor* func_game_800A3608(ObjectId); +Actor* Game_SpawnActor(ObjectId); // template enums for boss work buffers @@ -1117,7 +1131,7 @@ typedef Actor Actor185; typedef Actor Actor186; typedef Actor Actor187; typedef Actor Actor188; -typedef Actor Actor189; +typedef Actor ActorDebris; typedef Actor Actor190; typedef Actor Actor191; typedef Actor Actor192; diff --git a/include/sf64player.h b/include/sf64player.h index e0d42f5f..22f78580 100644 --- a/include/sf64player.h +++ b/include/sf64player.h @@ -73,17 +73,23 @@ typedef enum PlayerState1C8 { /* 13 */ PLAYERSTATE_1C8_VS_STANDBY, } PlayerState1C8; -typedef enum { - /* 0 */ PLAYERSHOT_0, // single laser? - /* 1 */ PLAYERSHOT_1, // twin laser? +typedef enum PlayerShotStatus { + /* 0 */ SHOT_FREE, + /* 1 */ SHOT_ACTIVE, + /* 2 */ SHOT_HITMARK, +} PlayerShotStatus; + +typedef enum PlayerShotId { + /* 0 */ PLAYERSHOT_SINGLE_LASER, // single laser? + /* 1 */ PLAYERSHOT_TWIN_LASER, // twin laser? /* 2 */ PLAYERSHOT_2, /* 3 */ PLAYERSHOT_BOMB, // bomb? - /* 4 */ PLAYERSHOT_4, - /* 5 */ PLAYERSHOT_5, // landmaster shot - /* 6 */ PLAYERSHOT_6, // on-foot shot + /* 4 */ PLAYERSHOT_LOCK_SEARCH, + /* 5 */ PLAYERSHOT_TANK, // landmaster shot + /* 6 */ PLAYERSHOT_ON_FOOT, // on-foot shot /* 7 */ PLAYERSHOT_7, // unused? related to on-foot shot somehow - /* 8 */ PLAYERSHOT_8, // charge shot - /* 9 */ PLAYERSHOT_9, + /* 8 */ PLAYERSHOT_LOCK_ON, // charge shot + /* 9 */ PLAYERSHOT_GFOX_LASER, } PlayerShotId; #define NPC_SHOT_ID 100 @@ -91,14 +97,14 @@ typedef enum { #define DMG_SRC_2 2 #define DMG_SRC_100 100 -typedef enum { +typedef enum LaserStrength { /* 0 */ LASERS_SINGLE, /* 1 */ LASERS_TWIN, /* 2 */ LASERS_HYPER, /* 3 */ LASERS_UNK_3, } LaserStrength; -typedef struct { +typedef struct PlayerShot { /* 0x00 */ Object obj; /* 0x1C */ s32 index; /* 0x20 */ Vec3f vel; @@ -112,12 +118,12 @@ typedef struct { /* 0x58 */ s32 unk_58; /* 0x5C */ s32 unk_5C; /* 0x60 */ s32 unk_60; - /* 0x64 */ s32 unk_64; + /* 0x64 */ s32 timer; /* 0x68 */ s32 sourceId; /* 0x6C */ u8 bonus; } PlayerShot; // size = 0x70 -typedef struct { +typedef struct WingInfo { /* 0x00 */ u8 rightState; /* 0x01 */ u8 leftState; /* 0x04 */ f32 unk_04; @@ -136,7 +142,7 @@ typedef struct { /* 0x38 */ f32 unk_38; } WingInfo; // size = 0x3C -typedef struct { +typedef struct PlayerSfx { /* 0x00 */ u8 levelType; /* 0x01 */ u8 form; /* 0x04 */ f32 *srcPos; @@ -167,7 +173,7 @@ typedef struct Player { /* 0x040 */ CameraPoint cam; /* 0x058 */ f32 camYaw; /* 0x05C */ f32 camPitch; - /* 0x05C */ f32 unk_060; + /* 0x05C */ f32 xRock; /* 0x064 */ Vec3f groundPos; // position on ground directly below player /* 0x070 */ f32 groundRotY; // y rotation of actor under player when acting as ground /* 0x074 */ Vec3f pos; // pos.z is position along path. see trueZpos for the actual z position @@ -236,11 +242,11 @@ typedef struct Player { /* 0x1A0 */ s32 unk_1A0; /* 0x1A4 */ s32 unk_1A4; /* 0x1A8 */ char pad1A8[8]; - /* 0x1B0 */ s32 unk_1B0; - /* 0x1B4 */ s32 unk_1B4; + /* 0x1B0 */ s32 turretState; + /* 0x1B4 */ s32 turretActor; /* 0x1B8 */ char pad1B8[4]; - /* 0x1BC */ s32 unk_1BC; - /* 0x1C0 */ s32 unk_1C0; + /* 0x1BC */ s32 turretRecoil; + /* 0x1C0 */ s32 turretLockOnCount; /* 0x1C4 */ s32 num; /* 0x1C8 */ PlayerState1C8 state_1C8; /* 0x1CC */ PlayerForm form; @@ -273,7 +279,7 @@ typedef struct Player { /* 0x238 */ s32 cockpitView; /* 0x23C */ s32 shadowing; /* 0x240 */ s32 unk_240; - /* 0x244 */ s32 timer_244; + /* 0x244 */ s32 shotTimer; /* 0x248 */ f32 unk_248; /* 0x24C */ f32 unk_24C; /* 0x250 */ f32 unk_250; // checked for by event actors, but unused? @@ -290,7 +296,7 @@ typedef struct Player { /* 0x27C */ s32 meteoWarpTimer; /* 0x280 */ s32 barrelRollAlpha; /* 0x284 */ s32 unk_284; - /* 0x288 */ s32 unk_288; + /* 0x288 */ s32 attacker; /* 0x28C */ char pad28C[0x28]; /* 0x2B4 */ bool boostCooldown; /* 0x2B8 */ bool boostActive; diff --git a/include/sfx.h b/include/sfx.h index 537a41e1..5c6f390b 100644 --- a/include/sfx.h +++ b/include/sfx.h @@ -303,8 +303,8 @@ typedef enum SfxBankId { #define NA_SE_EXPLOSION_DEMO5 0x3143402E #define NA_SE_EN_BOSS_BEAM0 0x3143102F #define NA_SE_EN_BOSS_CHARGE 0x39435830 -#define NA_SE_EN_BOSS_ATTACK 0x29003031 -#define NA_SE_EN_SAND_BOUND_M 0x29403031 +#define NA_SE_OB_SAND_BOUND_M 0x29003031 +#define NA_SE_EN_BOSS_ATTACK 0x29403031 #define NA_SE_OB_SPEAR_PILLAR 0x29503032 #define NA_SE_EN_WT_EXPLOSION_S 0x29038033 #define NA_SE_EN_WT_EXPLOSION_M 0x29000034 // Unreferenced. diff --git a/linker_scripts/us/symbol_addrs_engine.txt b/linker_scripts/us/symbol_addrs_engine.txt index 27c43104..8cb30781 100644 --- a/linker_scripts/us/symbol_addrs_engine.txt +++ b/linker_scripts/us/symbol_addrs_engine.txt @@ -186,7 +186,7 @@ func_edisplay_80059FDC = 0x80059FDC; func_edisplay_8005A010 = 0x8005A010; func_edisplay_8005A07C = 0x8005A07C; func_edisplay_8005A088 = 0x8005A088; -Actor189_Draw = 0x8005A094; +ActorDebris_Draw = 0x8005A094; Actor_DrawEngineAndContrails = 0x8005ADAC; Actor_DrawEngineGlow = 0x8005B1E8; func_edisplay_8005B388 = 0x8005B388; @@ -219,9 +219,9 @@ Item_Draw = 0x8005E7B8; ActorAllRange_DrawShadow = 0x8005EA24; Object_DrawShadow = 0x8005ECD8; Object_ClampSfxSource = 0x8005F030; -func_edisplay_8005F0E8 = 0x8005F0E8; -func_edisplay_8005F1EC = 0x8005F1EC; -func_edisplay_8005F290 = 0x8005F290; +Object_SetSfxSourceToPos = 0x8005F0E8; +Object_UpdateSfxSource = 0x8005F1EC; +Object_SetSfxSourceToView = 0x8005F290; Scenery360_Draw = 0x8005F2F4; Display_SetSecondLight = 0x8005F670; func_edisplay_8005F9DC = 0x8005F9DC; @@ -252,7 +252,7 @@ func_effect_80081A8C = 0x80081A8C; func_effect_8008377C = 0x8008377C; // fox_enmy -func_enmy_80060F30 = 0x80060F30; +Object_PlayerSfx = 0x80060F30; Object_Kill = 0x80060FBC; func_enmy_80060FE4 = 0x80060FE4; func_enmy_80061148 = 0x80061148; @@ -313,8 +313,8 @@ func_enmy_80066EA8 = 0x80066EA8; func_enmy_80066EE4 = 0x80066EE4; Item_CheckBounds = 0x80066EF0; Item_SpinPickup = 0x800671D0; -func_enmy_80067348 = 0x80067348; -func_enmy_800674B4 = 0x800674B4; +Actor_SetupDebris70 = 0x80067348; +Actor_SpawnDebris70 = 0x800674B4; ActorSupplies_Update = 0x8006753C; ActorSupplies_Draw = 0x80067874; func_enmy_80067A40 = 0x80067A40; @@ -384,7 +384,7 @@ Game_InitViewport = 0x800A1FB0; Game_Draw = 0x800A24DC; Game_SetScene = 0x800A25DC; Game_Update = 0x800A26C0; -func_game_800A3608 = 0x800A3608; +Game_SpawnActor = 0x800A3608; // sf_hud @@ -568,7 +568,7 @@ gBossActive = 0x80178284; gStarOffsetsX = 0x80178288; D_ctx_8017828C = 0x8017828C; gStarOffsetsY = 0x80178290; -D_ctx_80178294 = 0x80178294; +gUseDynaFloor = 0x80178294; gStarFillColors = 0x80178298; gRadioState = 0x8017829C; gCurrentRadioPortrait = 0x801782A4; @@ -667,104 +667,104 @@ gLight2GTarget = 0x80178574; gLight2BTarget = 0x80178578; Play_GetMaxShields = 0x800A3FC4; -func_play_800A3FB0 = 0x800A3FB0; +Play_dummy_MuteSfx = 0x800A3FB0; Play_CheckMedalStatus = 0x800A3F50; -func_play_800A3FEC = 0x800A3FEC; -func_play_800A4460 = 0x800A4460; -func_play_800A46A0 = 0x800A46A0; -func_play_800A4C40 = 0x800A4C40; +Play_UpdateDynaFloor = 0x800A3FEC; +Player_WingEffects = 0x800A4460; +Player_DamageEffects = 0x800A46A0; +Player_WaterEffects = 0x800A4C40; Scenery360_Initialize = 0x800A4F4C; -func_play_800A4F7C = 0x800A4F7C; -func_play_800A5330 = 0x800A5330; -func_play_800A5338 = 0x800A5338; -func_play_800A55B0 = 0x800A55B0; -func_play_800A57E0 = 0x800A57E0; +Play_InitVsStage = 0x800A4F7C; +Play_dummy_800A5330 = 0x800A5330; +Play_Setup360_CO = 0x800A5338; +Play_Setup360_SY = 0x800A55B0; +Play_Setup360_AND = 0x800A57E0; Play_Setup = 0x800A5844; -func_play_800A594C = 0x800A594C; -Play_SetupStarfield = 0x800A5D6C; -func_play_800A5EBC = 0x800A5EBC; -func_play_800A5FA0 = 0x800A5FA0; -func_play_800A6028 = 0x800A6028; -func_play_800A6070 = 0x800A6070; +Play_InitEnvironment = 0x800A594C; +Play_GenerateStarfield = 0x800A5D6C; +Play_SetupStarfield = 0x800A5EBC; +Player_PlaySfx = 0x800A5FA0; +Play_PlaySfxFirstPlayer = 0x800A6028; +Play_PlaySfxNoPlayer = 0x800A6070; BonusText_Initialize = 0x800A60B8; TexturedLine_Initialize = 0x800A60E8; RadarMark_Initialize = 0x800A6118; Play_ClearObjectData = 0x800A6148; Play_UpdateFillScreen = 0x800A6590; -func_play_800A668C = 0x800A668C; -func_play_800A670C = 0x800A670C; -func_play_800A69F8 = 0x800A69F8; -func_play_800A6A74 = 0x800A6A74; +Play_SpawnHitmark = 0x800A668C; +Play_SetupDebris = 0x800A670C; +Play_SpawnDebris = 0x800A69F8; +Player_CheckAllGoldRings = 0x800A6A74; Player_DamageWings = 0x800A6AC0; Player_ApplyDamage = 0x800A6CD0; -func_play_800A729C = 0x800A729C; -func_play_800A73E4 = 0x800A73E4; -func_play_800A78C4 = 0x800A78C4; -func_play_800A7974 = 0x800A7974; -func_play_800A8054 = 0x800A8054; -func_play_800A8304 = 0x800A8304; -func_play_800A86E4 = 0x800A86E4; -func_play_800A8804 = 0x800A8804; -func_play_800A887C = 0x800A887C; -func_play_800A8BA4 = 0x800A8BA4; -func_play_800AA800 = 0x800AA800; -func_play_800AB2AC = 0x800AB2AC; +Player_GroundedCollision = 0x800A729C; +Play_CheckDynaFloorCollision = 0x800A73E4; +Play_CheckSingleHitbox = 0x800A78C4; +Player_CheckHitboxCollision = 0x800A7974; +Play_CheckPolyCollision = 0x800A8054; +Player_CheckPolyCollision = 0x800A8304; +Player_CheckItemCollect = 0x800A86E4; +Player_Collide = 0x800A8804; +Player_UpdateHitbox = 0x800A887C; +Player_CollisionCheck = 0x800A8BA4; +Player_FloorCheck = 0x800AA800; +Player_InitializeAll = 0x800AB2AC; Player_Initialize = 0x800AB304; -func_play_800AB334 = 0x800AB334; -func_play_800AB964 = 0x800AB964; -func_play_800ABA08 = 0x800ABA08; +Play_InitLevel = 0x800AB334; +Player_ResetVsData = 0x800AB964; +Player_InitVersus = 0x800ABA08; Play_Init = 0x800ABAB4; -func_play_800AC290 = 0x800AC290; -func_play_800AC650 = 0x800AC650; -func_play_800ACA40 = 0x800ACA40; -func_play_800ACABC = 0x800ACABC; -func_play_800ACC7C = 0x800ACC7C; -func_play_800ACDC0 = 0x800ACDC0; -func_play_800AD094 = 0x800AD094; -func_play_800AD118 = 0x800AD118; -func_play_800AD1F4 = 0x800AD1F4; -func_play_800AD7F0 = 0x800AD7F0; -func_play_800ADA28 = 0x800ADA28; -func_play_800ADD98 = 0x800ADD98; -func_play_800ADF58 = 0x800ADF58; -func_play_800AE278 = 0x800AE278; -func_play_800AE4A4 = 0x800AE4A4; -func_play_800AECAC = 0x800AECAC; -func_play_800AF07C = 0x800AF07C; -func_play_800AF928 = 0x800AF928; -func_play_800B00C0 = 0x800B00C0; -func_play_800B0194 = 0x800B0194; -func_play_800B0F50 = 0x800B0F50; -func_play_800B2130 = 0x800B2130; -func_play_800B22C0 = 0x800B22C0; -func_play_800B2574 = 0x800B2574; -func_play_800B2BE0 = 0x800B2BE0; -func_play_800B2C00 = 0x800B2C00; -func_play_800B3010 = 0x800B3010; -func_play_800B3314 = 0x800B3314; -func_play_800B39E0 = 0x800B39E0; +Player_SetupArwingShot = 0x800AC290; +Player_SetupTankShot = 0x800AC650; +Player_TankCannon = 0x800ACA40; +Player_ArwingLaser = 0x800ACABC; +Player_SmartBomb = 0x800ACC7C; +Player_SetupOnFootShot = 0x800ACDC0; +Player_OnFootGun = 0x800AD094; +Player_CanLockOn = 0x800AD118; +Player_UpdateLockOn = 0x800AD1F4; +Player_Shoot = 0x800AD7F0; +Player_ArwingBank = 0x800ADA28; +Player_UseTankJets = 0x800ADD98; +Player_UpdatePath = 0x800ADF58; +Player_CheckBounds360 = 0x800AE278; +Player_ArwingMove360 = 0x800AE4A4; +Player_PerformLoop = 0x800AECAC; +Player_ArwingMoveOnRails = 0x800AF07C; +Player_TankMove360 = 0x800AF928; +Player_OnFootUpdateSpeed = 0x800B00C0; +Player_OnFootMove = 0x800B0194; +Player_Setup = 0x800B0F50; +Player_UpdateArwingRoll = 0x800B2130; +Player_UpdateTankRoll = 0x800B22C0; +Player_ArwingBoost = 0x800B2574; +Player_ArwingBoost2 = 0x800B2BE0; +Player_ArwingBrake = 0x800B2C00; +Player_TankBoostBrake = 0x800B3010; +Player_UpdateTankJets = 0x800B3314; +Player_UpdateEffects = 0x800B39E0; Player_UpdateShields = 0x800B40AC; -func_play_800B415C = 0x800B415C; -func_play_800B41E0 = 0x800B41E0; +Player_LowHealthAlarm = 0x800B415C; +Play_dummy_800B41E0 = 0x800B41E0; Player_Down = 0x800B41EC; -func_play_800B42B0 = 0x800B42B0; -func_play_800B44C4 = 0x800B44C4; -func_play_800B46F8 = 0x800B46F8; +Player_UpdateOnRails = 0x800B42B0; +Player_Update360 = 0x800B44C4; +Player_LowHealthMsg = 0x800B46F8; Player_Update = 0x800B48BC; -func_play_800B56BC = 0x800B56BC; -func_play_800B5D30 = 0x800B5D30; -func_play_800B5FBC = 0x800B5FBC; -func_play_800B63BC = 0x800B63BC; -func_play_800B6848 = 0x800B6848; -func_play_800B6BFC = 0x800B6BFC; -func_play_800B6F50 = 0x800B6F50; -func_play_800B7184 = 0x800B7184; -Player_UpdateCamera = 0x800B71E4; -func_play_800B73E0 = 0x800B73E0; +Camera_UpdateArwingOnRails = 0x800B56BC; +Camera_UpdateCockpitOnRails = 0x800B5D30; +Camera_FollowPlayer = 0x800B5FBC; +Camera_UpdateArwing360 = 0x800B63BC; +Camera_UpdateTank360 = 0x800B6848; +Camera_UpdateOnFoot360 = 0x800B6BFC; +Camera_SetStarfieldPos = 0x800B6F50; +Camera_Update360 = 0x800B7184; +Camera_Update = 0x800B71E4; +Camera_SetupLights = 0x800B73E0; Play_UpdateLevel = 0x800B79B0; Play_Update = 0x800B832C; Play_SpawnVsItem = 0x800B852C; -func_play_800B86A4 = 0x800B86A4; +Play_SetupZPos360 = 0x800B86A4; Play_Main = 0x800B86CC; D_tank_800C9F2C = 0x800C9F2C; diff --git a/linker_scripts/us/symbol_addrs_overlays.txt b/linker_scripts/us/symbol_addrs_overlays.txt index 5e44bc6c..9a1bc028 100644 --- a/linker_scripts/us/symbol_addrs_overlays.txt +++ b/linker_scripts/us/symbol_addrs_overlays.txt @@ -8,7 +8,7 @@ Venom1_80192CB0 = 0x80192CB0;//segment:ovl_i1 Venom1_80192EA4 = 0x80192EA4;//segment:ovl_i1 Venom1_801933B4 = 0x801933B4;//segment:ovl_i1 Venom1_Boss319_Init = 0x801935CC;//segment:ovl_i1 -Venom1_80194398 = 0x80194398;//segment:ovl_i1 +Venom1_Boss_Update = 0x80194398;//segment:ovl_i1 Venom1_801920F0 = 0x801920F0;//segment:ovl_i1 D_i1_8019A04C = 0x8019A04C; // size:0xC type:s16 segment:ovl_i1 D_i1_8019B6C0 = 0x8019B6C0;//segment:ovl_i1 @@ -58,22 +58,22 @@ D_menu_801AF274 = 0x801AF274; // type:f32 size:0x18 force_migration:True segment Area6_801875E4 = 0x801875E4;//segment:ovl_i3 Area6_80187704 = 0x80187704;//segment:ovl_i3 Area6_BossA6_Init = 0x80187754;//segment:ovl_i3 -Area6_80187944 = 0x80187944;//segment:ovl_i3 +Area6_Boss_Update = 0x80187944;//segment:ovl_i3 Area6_8018A1B0 = 0x8018A1B0;//segment:ovl_i3 Area6_8018A2C4 = 0x8018A2C4;//segment:ovl_i3 Area6_8018A464 = 0x8018A464;//segment:ovl_i3 Area6_8018B9BC = 0x8018B9BC;//segment:ovl_i3 Area6_8018BCD4 = 0x8018BCD4;//segment:ovl_i3 Area6_8018C0D0 = 0x8018C0D0;//segment:ovl_i3 -Area6_8018C54C = 0x8018C54C;//segment:ovl_i3 -Zoness_801900FC = 0x801900FC;//segment:ovl_i3 +Area6_Boss_Draw = 0x8018C54C;//segment:ovl_i3 +Zoness_SpawnDebris = 0x801900FC;//segment:ovl_i3 Zoness_801915A4 = 0x801915A4;//segment:ovl_i3 Zoness_80191BB8 = 0x80191BB8;//segment:ovl_i3 Zoness_BossZo_Init = 0x801932AC;//segment:ovl_i3 Zoness_80193908 = 0x80193908;//segment:ovl_i3 Zoness_80193A98 = 0x80193A98;//segment:ovl_i3 Zoness_80193CC8 = 0x80193CC8;//segment:ovl_i3 -Zoness_80194A84 = 0x80194A84;//segment:ovl_i3 +Zoness_Boss_Update = 0x80194A84;//segment:ovl_i3 Zoness_801986FC = 0x801986FC;//segment:ovl_i3 Zoness_801989FC = 0x801989FC;//segment:ovl_i3 Zoness_80198BE8 = 0x80198BE8;//segment:ovl_i3 @@ -90,7 +90,7 @@ Zoness_8019B810 = 0x8019B810;//segment:ovl_i3 Zoness_8019C200 = 0x8019C200;//segment:ovl_i3 Zoness_Actor247_Init = 0x8019D060;//segment:ovl_i3 Solar_LevelComplete = 0x801A7930;//segment:ovl_i3 -Aquas_801A9448 = 0x801A9448;//segment:ovl_i3 +Aquas_SpawnDebris = 0x801A9448;//segment:ovl_i3 Aquas_801A94EC = 0x801A94EC;//segment:ovl_i3 Aquas_801A958C = 0x801A958C;//segment:ovl_i3 Aquas_801AC8A8 = 0x801AC8A8;//segment:ovl_i3 @@ -102,7 +102,7 @@ Aquas_801B0F88 = 0x801B0F88;//segment:ovl_i3 Aquas_801B0FCC = 0x801B0FCC;//segment:ovl_i3 Aquas_801B1008 = 0x801B1008;//segment:ovl_i3 Aquas_BossAq_Init = 0x801B10F8;//segment:ovl_i3 -Aquas_801B134C = 0x801B134C;//segment:ovl_i3 +Aquas_Boss_Update = 0x801B134C;//segment:ovl_i3 Aquas_801B6344 = 0x801B6344;//segment:ovl_i3 Aquas_801B638C = 0x801B638C;//segment:ovl_i3 Aquas_801B6E54 = 0x801B6E54;//segment:ovl_i3 diff --git a/src/audio/audio_general.c b/src/audio/audio_general.c index 5474c4f7..8cb3a405 100644 --- a/src/audio/audio_general.c +++ b/src/audio/audio_general.c @@ -71,7 +71,7 @@ u8 sUsedChannelsPerBank[5][5] = { }; u8 sSfxRequestWriteIndex = 0; u8 sSfxRequestReadIndex = 0; -u8 sSfxChannelLayout = 0; +u8 sSfxChannelLayout = SFXCHAN_0; u16 sChannelMuteFlags = 0; f32 gDefaultSfxSource[3] = { 0.0f, 0.0f, 0.0f }; f32 gDefaultMod = 1.0f; @@ -596,7 +596,7 @@ s8 Audio_GetSfxReverb(u8 bankId, u8 entryIndex, u8 channelId) { } s8 Audio_GetSfxPan(f32 xPos, f32 zPos, u8 mode) { - if (sSfxChannelLayout != 3) { + if (sSfxChannelLayout != SFXCHAN_3) { f32 absx = ABSF(xPos); f32 absz = ABSF(zPos); f32 pan; @@ -638,7 +638,7 @@ f32 Audio_GetSfxFreqMod(u8 bankId, u8 entryIndex) { freqMod += 0.2f * (distance / 33000.0f); } } - if ((sSfxChannelLayout != 0) && (sSfxBanks[bankId][entryIndex].token & 2)) { + if ((sSfxChannelLayout != SFXCHAN_0) && (sSfxBanks[bankId][entryIndex].token & 2)) { freqMod *= 1.1f; } return freqMod; @@ -669,12 +669,12 @@ void Audio_SetSfxProperties(u8 bankId, u8 entryIndex, u8 channelId) { reverb = Audio_GetSfxReverb(bankId, entryIndex, channelId); freqMod = Audio_GetSfxFreqMod(bankId, entryIndex) * *entry->freqMod; if (!((bankId == SFX_BANK_PLAYER) && ((-200.0f < *entry->zPos) && (*entry->zPos < 200.0f)) && - (sSfxChannelLayout != 3))) { + (sSfxChannelLayout != SFXCHAN_3))) { pan = Audio_GetSfxPan(*entry->xPos, *entry->zPos, entry->token); } break; case SFX_BANK_SYSTEM: - if (sSfxChannelLayout == 3) { + if (sSfxChannelLayout == SFXCHAN_3) { if (entry->token != 4) { pan = (entry->token & 1) * 127; } diff --git a/src/engine/fox_360.c b/src/engine/fox_360.c index 46dc224e..5f76df24 100644 --- a/src/engine/fox_360.c +++ b/src/engine/fox_360.c @@ -792,7 +792,7 @@ s32 func_360_8003049C(Actor* this) { } else if (boss->obj.id == OBJ_BOSS_309) { sp44 = 2000.0f; var_ft5 = 750.0f; - } else if (boss->obj.id == OBJ_BOSS_317) { + } else if (boss->obj.id == OBJ_BOSS_KA_BASE) { sp44 = 1500.0f; var_ft5 = 700.0f; } diff --git a/src/engine/fox_beam.c b/src/engine/fox_beam.c index c1a2cca0..a300fa40 100644 --- a/src/engine/fox_beam.c +++ b/src/engine/fox_beam.c @@ -4,9 +4,9 @@ #include "assets/ast_great_fox.h" #include "assets/ast_versus.h" -static Vec3f D_beam_8015F950; +static Vec3f sShotViewPos; -void func_beam_80035D30(Effect* effect, f32 xPos, f32 yPos, f32 zPos) { +void PlayerShot_SetupEffect351(Effect* effect, f32 xPos, f32 yPos, f32 zPos) { Effect_Initialize(effect); effect->obj.status = OBJ_INIT; effect->obj.id = OBJ_EFFECT_351; @@ -24,12 +24,12 @@ void func_beam_80035D30(Effect* effect, f32 xPos, f32 yPos, f32 zPos) { Object_SetInfo(&effect->info, effect->obj.id); } -void func_beam_80035DEC(f32 xPos, f32 yPos, f32 zPos) { +void PlayerShot_SpawnEffect351(f32 xPos, f32 yPos, f32 zPos) { s32 i; for (i = 0; i < ARRAY_COUNT(gEffects); i++) { if (gEffects[i].obj.status == OBJ_FREE) { - func_beam_80035D30(&gEffects[i], xPos, yPos, zPos); + PlayerShot_SetupEffect351(&gEffects[i], xPos, yPos, zPos); break; } } @@ -44,7 +44,7 @@ void PlayerShot_Initialize(PlayerShot* shot) { } } -void func_beam_80035E78(PlayerShot* shot) { +void PlayerShot_ExplodeBomb(PlayerShot* shot) { f32 var_fs0; f32 var_fv0; f32 var_fv1; @@ -54,7 +54,7 @@ void func_beam_80035E78(PlayerShot* shot) { shot->vel.x = shot->vel.y = shot->vel.z = shot->obj.rot.x = shot->obj.rot.y = shot->obj.rot.z = 0.0f; shot->scale = 1.0f; shot->unk_5C = 1; - shot->unk_64 = 30; + shot->timer = 30; shot->unk_58 = 150; Audio_PlayBombExplodeSfx(shot->sourceId, shot->sfxSource); gScreenFlashTimer = 4; @@ -93,7 +93,7 @@ void func_beam_80035E78(PlayerShot* shot) { var_v0 = 0; } func_effect_8007B344(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, shot->unk_48 * 1.5f, var_v0); - if (D_ctx_80178294 != 0) { + if (gUseDynaFloor) { var_fs0 = 5.0f; if (shot->obj.pos.y > 300.0f) { var_fs0 = 1.0f; @@ -118,11 +118,11 @@ void func_beam_80035E78(PlayerShot* shot) { } } -void func_beam_80036318(PlayerShot* shot) { +void PlayerShot_Impact(PlayerShot* shot) { s32 var_v0_2; s32 i; - if (shot->obj.id == PLAYERSHOT_4) { + if (shot->obj.id == PLAYERSHOT_LOCK_SEARCH) { Object_Kill(&shot->obj, shot->sfxSource); return; } @@ -130,13 +130,13 @@ void func_beam_80036318(PlayerShot* shot) { shot->obj.pos.y = D_ctx_801784A0; shot->obj.pos.x = D_ctx_8017849C; if ((shot->obj.id == PLAYERSHOT_BOMB) || - ((gCurrentLevel != LEVEL_AQUAS) && (shot->obj.id == PLAYERSHOT_8) && (shot->unk_5C != 0))) { - if (shot->obj.id == PLAYERSHOT_8) { + ((gCurrentLevel != LEVEL_AQUAS) && (shot->obj.id == PLAYERSHOT_LOCK_ON) && (shot->unk_5C != 0))) { + if (shot->obj.id == PLAYERSHOT_LOCK_ON) { shot->obj.id = PLAYERSHOT_BOMB; shot->unk_5C = 0; } - func_beam_80035E78(shot); - } else if (shot->obj.id == PLAYERSHOT_8) { + PlayerShot_ExplodeBomb(shot); + } else if (shot->obj.id == PLAYERSHOT_LOCK_ON) { shot->scale = 7.5f; for (i = 0; i < ARRAY_COUNT(gActors); i++) { gActors[i].lockOnTimers[shot->sourceId] = 0; @@ -147,7 +147,6 @@ void func_beam_80036318(PlayerShot* shot) { func_effect_8007B344(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 10.0f, 4); func_effect_8007C120(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.3f, 30); } else { - if (gVersusMode) { var_v0_2 = shot->sourceId + 10; } else { @@ -157,13 +156,13 @@ void func_beam_80036318(PlayerShot* shot) { func_effect_8007D2C8(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 4.0f); } } else { - shot->obj.status = 2; + shot->obj.status = SHOT_HITMARK; shot->unk_60 = 0; } } -void func_beam_80036528(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yRot, f32 xRot, f32 scale, s32 unk44, - s32 time) { +void PlayerShot_SetupEffect344(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yRot, f32 xRot, f32 scale, s32 unk44, + s32 time) { Effect_Initialize(effect); effect->obj.status = OBJ_INIT; effect->obj.id = OBJ_EFFECT_344; @@ -177,11 +176,11 @@ void func_beam_80036528(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yRot, effect->unk_46 = 80; effect->timer_50 = time; Object_SetInfo(&effect->info, effect->obj.id); - func_play_800A6070(effect->sfxSource, NA_SE_EXPLOSION_S); + Play_PlaySfxNoPlayer(effect->sfxSource, NA_SE_EXPLOSION_S); } -void func_beam_800365E4(f32 xPos, f32 yPos, f32 zPos, f32 arg3, f32 arg4, f32 arg5, f32 yRot, f32 xRot, f32 scale, - s32 unk44, s32 time) { +void PlayerShot_SpawnEffect344(f32 xPos, f32 yPos, f32 zPos, f32 arg3, f32 arg4, f32 arg5, f32 yRot, f32 xRot, + f32 scale, s32 unk44, s32 time) { s32 i; if ((gGroundType != 4) && (gLevelType == LEVELTYPE_PLANET) && (gGroundSurface != SURFACE_WATER) && @@ -189,14 +188,14 @@ void func_beam_800365E4(f32 xPos, f32 yPos, f32 zPos, f32 arg3, f32 arg4, f32 ar (gCurrentLevel != LEVEL_ZONESS)) { for (i = 0; i < 50; i++) { if (gEffects[i].obj.status == OBJ_FREE) { - func_beam_80036528(&gEffects[i], xPos, yPos, zPos, yRot, xRot, scale, unk44, time); + PlayerShot_SetupEffect344(&gEffects[i], xPos, yPos, zPos, yRot, xRot, scale, unk44, time); break; } } } } -void func_beam_800366CC(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yRot, f32 scale) { +void PlayerShot_SetupEffect345(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yRot, f32 scale) { Effect_Initialize(effect); effect->obj.status = OBJ_INIT; effect->obj.id = OBJ_EFFECT_345; @@ -207,17 +206,17 @@ void func_beam_800366CC(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yRot, effect->scale2 = scale * 0.5f; effect->timer_50 = 80; Object_SetInfo(&effect->info, effect->obj.id); - func_play_800A6070(effect->sfxSource, NA_SE_EXPLOSION_S); + Play_PlaySfxNoPlayer(effect->sfxSource, NA_SE_EXPLOSION_S); } -void func_beam_80036770(f32 xPos, f32 yPos, f32 zPos, f32 yRot, f32 scale) { +void PlayerShot_HitGround(f32 xPos, f32 yPos, f32 zPos, f32 yRot, f32 scale) { s32 i; if ((gGroundType != 4) && (gLevelType == LEVELTYPE_PLANET) && (gGroundSurface <= SURFACE_GRASS) && (gCurrentLevel != LEVEL_TRAINING) && (gCurrentLevel != LEVEL_SOLAR) && (gCurrentLevel != LEVEL_ZONESS)) { for (i = 0; i < 50; i++) { if (gEffects[i].obj.status == OBJ_FREE) { - func_beam_800366CC(&gEffects[i], xPos, yPos, zPos, yRot, scale); + PlayerShot_SetupEffect345(&gEffects[i], xPos, yPos, zPos, yRot, scale); func_effect_8007D10C(xPos, yPos, zPos, 2.0f); break; } @@ -228,7 +227,7 @@ void func_beam_80036770(f32 xPos, f32 yPos, f32 zPos, f32 yRot, f32 scale) { } } -s32 func_beam_80036874(PlayerShot* shot, f32* hitboxData, Object* obj) { +s32 PlayerShot_CheckObjectHitbox(PlayerShot* shot, f32* hitboxData, Object* obj) { s32 count; f32 shotPx; f32 shotPy; @@ -257,7 +256,7 @@ s32 func_beam_80036874(PlayerShot* shot, f32* hitboxData, Object* obj) { if (count != 0) { xySizeMod = 10.0f; if ((shot->sourceId < 4) && - ((gLaserStrength[shot->sourceId] != LASERS_SINGLE) || (shot->obj.id == PLAYERSHOT_8))) { + ((gLaserStrength[shot->sourceId] != LASERS_SINGLE) || (shot->obj.id == PLAYERSHOT_LOCK_ON))) { xySizeMod += 30.0f; } hitboxData++; @@ -299,12 +298,12 @@ s32 func_beam_80036874(PlayerShot* shot, f32* hitboxData, Object* obj) { if ((fabsf(hitbox->z.offset + obj->pos.z - shotPz) < (hitbox->z.size + 50.0f)) && (fabsf(hitbox->x.offset + obj->pos.x - shotPx) < (hitbox->x.size + xySizeMod)) && (fabsf(hitbox->y.offset + obj->pos.y - shotPy) < (hitbox->y.size + xySizeMod))) { - if (shot->obj.id == PLAYERSHOT_4) { + if (shot->obj.id == PLAYERSHOT_LOCK_SEARCH) { Object_Kill(&shot->obj, shot->sfxSource); return 0; } - if ((obj->id <= OBJ_SPRITE_GFOX_TARGET) || (obj->id >= OBJ_BOSS_292)) { - func_beam_80036318(shot); + if (!((obj->id >= OBJ_ACTOR_START) && (obj->id < OBJ_ACTOR_MAX))) { + PlayerShot_Impact(shot); } if ((obj->id == OBJ_SCENERY_15) || ((obj->id == OBJ_SCENERY_22) && (i == 0)) || ((obj->id == OBJ_SCENERY_10) && (i == 0)) || ((obj->id == OBJ_SCENERY_13) && (i == 0)) || @@ -314,29 +313,29 @@ s32 func_beam_80036874(PlayerShot* shot, f32* hitboxData, Object* obj) { if (hitbox->z.size + (obj->pos.z + hitbox->z.offset) < shot->obj.pos.z) { shot->obj.pos.z = hitbox->z.size + (obj->pos.z + hitbox->z.offset) - 5.0f; } - func_beam_800365E4((hitbox->x.offset + obj->pos.x) - (hitbox->x.size + 2.0f), - shot->obj.pos.y, shot->obj.pos.z, obj->pos.x, obj->pos.z, obj->rot.y, - obj->rot.y + 90.0f, 0.0f, 2.0f, 1, 20); + PlayerShot_SpawnEffect344((hitbox->x.offset + obj->pos.x) - (hitbox->x.size + 2.0f), + shot->obj.pos.y, shot->obj.pos.z, obj->pos.x, obj->pos.z, + obj->rot.y, obj->rot.y + 90.0f, 0.0f, 2.0f, 1, 20); return i + 1; } if (hitbox->x.size < shot->obj.pos.x - (obj->pos.x + hitbox->x.offset)) { if ((hitbox->z.size + (obj->pos.z + hitbox->z.offset)) < shot->obj.pos.z) { shot->obj.pos.z = hitbox->z.size + (obj->pos.z + hitbox->z.offset) - 5.0f; } - func_beam_800365E4(hitbox->x.size + (hitbox->x.offset + obj->pos.x) + 2.0f, shot->obj.pos.y, - shot->obj.pos.z, obj->pos.x, obj->pos.z, obj->rot.y, obj->rot.y + 90.0f, - 0.0f, 2.0f, 1, 20); + PlayerShot_SpawnEffect344(hitbox->x.size + (hitbox->x.offset + obj->pos.x) + 2.0f, + shot->obj.pos.y, shot->obj.pos.z, obj->pos.x, obj->pos.z, + obj->rot.y, obj->rot.y + 90.0f, 0.0f, 2.0f, 1, 20); return i + 1; } if (((hitbox->y.size + (obj->pos.y + hitbox->y.offset)) - 10.0f) <= shot->obj.pos.y) { shot->obj.pos.y = ((hitbox->y.size + (obj->pos.y + hitbox->y.offset)) - 10.0f); } - func_beam_800365E4(shot->obj.pos.x, shot->obj.pos.y, - hitbox->z.size + (obj->pos.z + hitbox->z.offset) + 20.0f, obj->pos.x, - obj->pos.z, 0.0f, 0.0f, 0.0f, 2.0f, 1, 20); + PlayerShot_SpawnEffect344(shot->obj.pos.x, shot->obj.pos.y, + hitbox->z.size + (obj->pos.z + hitbox->z.offset) + 20.0f, obj->pos.x, + obj->pos.z, 0.0f, 0.0f, 0.0f, 2.0f, 1, 20); return i + 1; } - if (obj->id <= OBJ_SCENERY_160) { + if (obj->id < OBJ_SCENERY_MAX) { func_effect_8007A6F0(&shot->obj.pos, NA_SE_EN_REFLECT); } return i + 1; @@ -347,7 +346,7 @@ s32 func_beam_80036874(PlayerShot* shot, f32* hitboxData, Object* obj) { return 0; } -s32 func_beam_80036F88(PlayerShot* shot, Actor* actor) { +s32 PlayerShot_CheckEventHitbox(PlayerShot* shot, Actor* actor) { s32 i; f32* hitboxData; f32 shotPx; @@ -369,7 +368,7 @@ s32 func_beam_80036F88(PlayerShot* shot, Actor* actor) { if (actor->info.unk_16 == 1) { xySizeMod = fabsf((actor->obj.pos.z + gPathProgress) / 50.0f) + 10.0f; if ((shot->sourceId < 4) && - ((gLaserStrength[shot->sourceId] != LASERS_SINGLE) || (shot->obj.id == PLAYERSHOT_8))) { + ((gLaserStrength[shot->sourceId] != LASERS_SINGLE) || (shot->obj.id == PLAYERSHOT_LOCK_ON))) { xySizeMod += 30.0f; } } @@ -419,7 +418,7 @@ s32 func_beam_80036F88(PlayerShot* shot, Actor* actor) { return 0; } -bool func_beam_80037438(PlayerShot* shot, Actor* actor) { +s32 PlayerShot_CheckActorHitbox(PlayerShot* shot, Actor* actor) { Object* shotx = &shot->obj; f32 temp_fv1 = actor->obj.pos.x - shotx->pos.x; f32 temp_fa0 = actor->obj.pos.z - shotx->pos.z; @@ -434,7 +433,7 @@ bool func_beam_80037438(PlayerShot* shot, Actor* actor) { if (var_fa1 > 200.0f) { var_fa1 = 200.0f; } - if (shotx->id == PLAYERSHOT_8) { + if (shotx->id == PLAYERSHOT_LOCK_ON) { var_fa1 = 30.0f; } else if (gLaserStrength[shot->sourceId] != LASERS_SINGLE) { var_fa1 += 30.0f; @@ -442,7 +441,7 @@ bool func_beam_80037438(PlayerShot* shot, Actor* actor) { if (fabsf(hitboxData[1] + actor->obj.pos.z - shotx->pos.z) < (hitboxData[2] + var_fa1)) { if (fabsf(hitboxData[3] + actor->obj.pos.y - shotx->pos.y) < (hitboxData[4] + var_fa1)) { if (fabsf(hitboxData[5] + actor->obj.pos.x - shotx->pos.x) < (hitboxData[6] + var_fa1)) { - return true; + return 1; } } } @@ -450,17 +449,17 @@ bool func_beam_80037438(PlayerShot* shot, Actor* actor) { if (fabsf(hitboxData[1] + actor->obj.pos.z - shotx->pos.z) < hitboxData[2]) { if (fabsf(hitboxData[3] + actor->obj.pos.y - shotx->pos.y) < hitboxData[4]) { if (fabsf(hitboxData[5] + actor->obj.pos.x - shotx->pos.x) < hitboxData[6]) { - return true; + return 1; } } } } } - return false; + return 0; } -bool func_beam_80037698(PlayerShot* shot, Sprite* sprite) { +bool PlayerShot_CheckSpriteHitbox(PlayerShot* shot, Sprite* sprite) { f32* temp_v0 = sprite->info.hitbox; if (((s32) temp_v0[0] != 0) && (fabsf(temp_v0[1] + sprite->obj.pos.z - shot->obj.pos.z) < temp_v0[2]) && @@ -471,7 +470,7 @@ bool func_beam_80037698(PlayerShot* shot, Sprite* sprite) { return false; } -bool func_beam_8003774C(PlayerShot* shot, ObjectId objId, Object* obj) { +bool PlayerShot_CheckPolyCollision(PlayerShot* shot, ObjectId objId, Object* obj) { Vec3f sp7C; Vec3f sp70; Vec3f sp64; @@ -486,7 +485,7 @@ bool func_beam_8003774C(PlayerShot* shot, ObjectId objId, Object* obj) { sp7C.z = obj->pos.z - shot->obj.pos.z; // undefined behavior: if this check fails, the function returns no value if (((fabsf(sp7C.x) < 1100.0f) && (fabsf(sp7C.z) < 1100.0f) && (shot->obj.pos.y < 900.0f)) || - (objId == OBJ_BOSS_313) || (objId == ACTOR_EVENT_ID) || (objId == OBJ_SCENERY_ME_TUNNEL)) { + (objId == OBJ_BOSS_SZ) || (objId == ACTOR_EVENT_ID) || (objId == OBJ_SCENERY_ME_TUNNEL)) { Matrix_RotateY(gCalcMatrix, -obj->rot.y * M_DTOR, MTXF_NEW); sp7C.x = shot->obj.pos.x - obj->pos.x; sp7C.y = shot->obj.pos.y - obj->pos.y; @@ -518,10 +517,10 @@ bool func_beam_8003774C(PlayerShot* shot, ObjectId objId, Object* obj) { case OBJ_SCENERY_150: objId = COL1_6; break; - case OBJ_BOSS_308: + case OBJ_BOSS_FO: objId = COL1_4; break; - case OBJ_BOSS_312: + case OBJ_BOSS_VE2: objId = COL1_9; break; case OBJ_BOSS_309: @@ -530,7 +529,7 @@ bool func_beam_8003774C(PlayerShot* shot, ObjectId objId, Object* obj) { case ACTOR_EVENT_ID: objId = COL1_3; break; - case OBJ_BOSS_313: + case OBJ_BOSS_SZ: objId = COL1_8; break; case OBJ_SCENERY_ME_TUNNEL: @@ -608,11 +607,11 @@ bool func_beam_8003774C(PlayerShot* shot, ObjectId objId, Object* obj) { } if (!useCol2) { if (func_col1_800998FC(&sp64, &sp58, &sp38, objId, &sp4C, sp44) > 0) { - if (shot->obj.id == PLAYERSHOT_4) { + if (shot->obj.id == PLAYERSHOT_LOCK_SEARCH) { Object_Kill(&shot->obj, shot->sfxSource); return false; } - func_beam_80036318(shot); + PlayerShot_Impact(shot); func_effect_8007A6F0(&shot->obj.pos, NA_SE_EN_REFLECT); if (gCurrentLevel == LEVEL_METEO) { Matrix_RotateY(gCalcMatrix, obj->rot.y * M_DTOR, MTXF_NEW); @@ -631,11 +630,11 @@ bool func_beam_8003774C(PlayerShot* shot, ObjectId objId, Object* obj) { return true; } } else if (func_col2_800A3690(&sp64, &sp58, objId, &sp4C)) { - if (shot->obj.id == PLAYERSHOT_4) { + if (shot->obj.id == PLAYERSHOT_LOCK_SEARCH) { Object_Kill(&shot->obj, shot->sfxSource); return false; } - func_beam_80036318(shot); + PlayerShot_Impact(shot); func_effect_8007A6F0(&shot->obj.pos, NA_SE_EN_REFLECT); if (gCurrentLevel == LEVEL_FORTUNA) { func_effect_8007BC7C(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); @@ -648,7 +647,7 @@ bool func_beam_8003774C(PlayerShot* shot, ObjectId objId, Object* obj) { // return false; } -void func_beam_80037CF4(PlayerShot* shot, Actor* actor, s32 hitIndex) { +void PlayerShot_ApplyDamageToActor(PlayerShot* shot, Actor* actor, s32 hitIndex) { Vec3f sp44 = { 0.0f, 0.0f, -100.0f }; Vec3f sp38; @@ -671,9 +670,9 @@ void func_beam_80037CF4(PlayerShot* shot, Actor* actor, s32 hitIndex) { actor->damage = 30; } } - if (shot->obj.id == PLAYERSHOT_9) { + if (shot->obj.id == PLAYERSHOT_GFOX_LASER) { actor->damage = 100; - } else if (shot->obj.id == PLAYERSHOT_8) { + } else if (shot->obj.id == PLAYERSHOT_LOCK_ON) { if (gCurrentLevel == LEVEL_AQUAS) { actor->damage = 31; } else { @@ -690,16 +689,16 @@ void func_beam_80037CF4(PlayerShot* shot, Actor* actor, s32 hitIndex) { ((actor->unk_0B4 == EVID_48) || (actor->unk_0B4 == EVID_49) || (actor->unk_0B4 == EVID_50))) || ((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->fwork[23] > 1.0f)) || ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->dmgPart == 0) && (actor->unk_0B4 == EVID_67)) || - ((actor->obj.id == OBJ_ACTOR_261) && (shot->obj.id != PLAYERSHOT_8) && + ((actor->obj.id == OBJ_ACTOR_261) && (shot->obj.id != PLAYERSHOT_LOCK_ON) && ((actor->state < 3) || (actor->state >= 5))) || - ((actor->obj.id == OBJ_ACTOR_260) && (shot->obj.id != PLAYERSHOT_8) && (actor->timer_0BC != 0))) { + ((actor->obj.id == OBJ_ACTOR_260) && (shot->obj.id != PLAYERSHOT_LOCK_ON) && (actor->timer_0BC != 0))) { if ((actor->obj.id == OBJ_ACTOR_261) && (actor->state < 2)) { actor->state = 2; } - if ((shot->obj.id == PLAYERSHOT_8) || (shot->obj.id == PLAYERSHOT_BOMB)) { - func_beam_80036318(shot); + if ((shot->obj.id == PLAYERSHOT_LOCK_ON) || (shot->obj.id == PLAYERSHOT_BOMB)) { + PlayerShot_Impact(shot); } else { - shot->unk_64 = 25; + shot->timer = 25; shot->obj.rot.y += 90.0f; shot->obj.rot.x = RAND_FLOAT(360.0f); Matrix_RotateY(gCalcMatrix, shot->obj.rot.y * M_DTOR, MTXF_NEW); @@ -714,14 +713,14 @@ void func_beam_80037CF4(PlayerShot* shot, Actor* actor, s32 hitIndex) { actor->timer_0C2 = 3; func_effect_80078E50(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 8.0f); AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); - func_play_800A668C(D_ctx_8017849C, D_ctx_801784A0, D_ctx_80178498); + Play_SpawnHitmark(D_ctx_8017849C, D_ctx_801784A0, D_ctx_80178498); } } else { - func_beam_80036318(shot); + PlayerShot_Impact(shot); } } -void func_beam_80038140(PlayerShot* shot) { +void PlayerShot_CollisionCheck(PlayerShot* shot) { s32 i; s32 temp_v0; s32 spA4; @@ -739,7 +738,7 @@ void func_beam_80038140(PlayerShot* shot) { Player* player; sp60 = true; - if (shot->obj.id == PLAYERSHOT_4) { + if (shot->obj.id == PLAYERSHOT_LOCK_SEARCH) { sp60 = false; } if (sp60) { @@ -755,11 +754,11 @@ void func_beam_80038140(PlayerShot* shot) { } } } - for (i = 0, actor = gActors; i < 60; i++, actor++) { + for (i = 0, actor = gActors; i < ARRAY_COUNT(gActors); i++, actor++) { if ((actor->obj.status >= OBJ_ACTIVE) && (actor->timer_0C2 == 0)) { switch (actor->obj.id) { case OBJ_ACTOR_180: - if (func_beam_8003774C(shot, actor->obj.id, &actor->obj)) { + if (PlayerShot_CheckPolyCollision(shot, actor->obj.id, &actor->obj)) { actor->dmgType = DMG_BEAM; actor->dmgPart = shot->sourceId; return; @@ -767,7 +766,7 @@ void func_beam_80038140(PlayerShot* shot) { break; case OBJ_ACTOR_EVENT: if (actor->unk_0B4 == EVID_42) { - if (func_beam_8003774C(shot, ACTOR_EVENT_ID, &actor->obj)) { + if (PlayerShot_CheckPolyCollision(shot, ACTOR_EVENT_ID, &actor->obj)) { actor->dmgType = DMG_BEAM; actor->dmgPart = shot->sourceId; return; @@ -777,12 +776,12 @@ void func_beam_80038140(PlayerShot* shot) { test.y = fabsf(actor->obj.pos.y - shot->obj.pos.y); test.z = fabsf(actor->obj.pos.z - shot->obj.pos.z); if (VEC3F_MAG(&test) < 1000.0f) { - func_beam_80037CF4(shot, actor, 0); + PlayerShot_ApplyDamageToActor(shot, actor, 0); } } else { - temp_v0 = func_beam_80036F88(shot, actor); + temp_v0 = PlayerShot_CheckEventHitbox(shot, actor); if (temp_v0 != 0) { - func_beam_80037CF4(shot, actor, temp_v0); + PlayerShot_ApplyDamageToActor(shot, actor, temp_v0); return; } } @@ -794,7 +793,7 @@ void func_beam_80038140(PlayerShot* shot) { (((gCurrentLevel == LEVEL_VENOM_2) && (shot->sourceId <= NPC_SHOT_ID + AI360_PEPPY)) || ((gCurrentLevel != LEVEL_VENOM_2) && (shot->sourceId == AI360_FOX))) && - (shot->obj.id != PLAYERSHOT_8) && + (shot->obj.id != PLAYERSHOT_LOCK_ON) && (fabsf(actor->obj.pos.x - shot->obj.pos.x) < 500.0f) && (fabsf(actor->obj.pos.y - shot->obj.pos.y) < 300.0f) && (fabsf(actor->obj.pos.z - shot->obj.pos.z) < 500.0f)) { @@ -805,15 +804,15 @@ void func_beam_80038140(PlayerShot* shot) { } } } - temp_v0 = func_beam_80037438(shot, actor); + temp_v0 = PlayerShot_CheckActorHitbox(shot, actor); if (temp_v0 != 0) { - func_beam_80037CF4(shot, actor, temp_v0); + PlayerShot_ApplyDamageToActor(shot, actor, temp_v0); return; } } else { - temp_v0 = func_beam_80036874(shot, actor->info.hitbox, &actor->obj); + temp_v0 = PlayerShot_CheckObjectHitbox(shot, actor->info.hitbox, &actor->obj); if (temp_v0 != 0) { - func_beam_80037CF4(shot, actor, temp_v0); + PlayerShot_ApplyDamageToActor(shot, actor, temp_v0); return; } } @@ -825,7 +824,7 @@ void func_beam_80038140(PlayerShot* shot) { for (i = 0, player = gPlayer; i < gCamCount; i++, player++) { test.x = 50.0f; if (gVersusMode && (shot->sourceId < 4) && - !((gLaserStrength[shot->sourceId] == LASERS_SINGLE) && (shot->obj.id != PLAYERSHOT_8))) { + ((gLaserStrength[shot->sourceId] != LASERS_SINGLE) || (shot->obj.id == PLAYERSHOT_LOCK_ON))) { test.x = 100.0f; } if (player->barrelRollAlpha >= 100) { @@ -859,20 +858,20 @@ void func_beam_80038140(PlayerShot* shot) { shot->obj.pos.x += 2.0f * shot->vel.x; shot->obj.pos.y += 2.0f * shot->vel.y; shot->obj.pos.z += 2.0f * shot->vel.z; - shot->unk_64 = 5; + shot->timer = 5; AUDIO_PLAY_SFX(NA_SE_ROLLING_REFLECT, player->sfxSource, 0); func_effect_80078E50(player->pos.x, player->pos.y, player->trueZpos, 8.0f); } else { - func_beam_80036318(shot); + PlayerShot_Impact(shot); if (player->hitTimer == 0) { - if (gPlayer[0].form == 3) { + if (gPlayer[0].form == FORM_ON_FOOT) { Player_ApplyDamage(player, 0, 60); } else { Player_ApplyDamage(player, 0, 20); } player->unk_284 = 1; if (gCamCount != 1) { - player->unk_288 = shot->sourceId + 1; + player->attacker = shot->sourceId + 1; } player->knockback.x = shot->vel.x * 0.1f; player->knockback.y = shot->vel.y * 0.1f; @@ -887,14 +886,15 @@ void func_beam_80038140(PlayerShot* shot) { } } if ((gGroundType == 4) && Ground_801B6AEC(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + gPathProgress)) { - func_beam_80036318(shot); - if (shot->obj.id != PLAYERSHOT_4) { + PlayerShot_Impact(shot); + if (shot->obj.id != PLAYERSHOT_LOCK_SEARCH) { func_effect_8007A900(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 2.0f, 255, 15, 0); } } - if ((D_ctx_80178294 != 0) && func_play_800A73E4(&sp94, &spA4, shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z)) { - func_beam_80036318(shot); - if (shot->obj.id != PLAYERSHOT_4) { + if (gUseDynaFloor && + Play_CheckDynaFloorCollision(&sp94, &spA4, shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z)) { + PlayerShot_Impact(shot); + if (shot->obj.id != PLAYERSHOT_LOCK_SEARCH) { func_effect_8007B228(shot->obj.pos.x, sp94, shot->obj.pos.z, 1.0f); } } @@ -907,9 +907,9 @@ void func_beam_80038140(PlayerShot* shot) { (scenery360->obj.id == OBJ_SCENERY_148) || (scenery360->obj.id == OBJ_SCENERY_143) || (scenery360->obj.id == OBJ_SCENERY_160) || (scenery360->obj.id == OBJ_SCENERY_1) || (scenery360->obj.id == OBJ_SCENERY_3) || (scenery360->obj.id == OBJ_SCENERY_140)) { - func_beam_8003774C(shot, scenery360->obj.id, &scenery360->obj); + PlayerShot_CheckPolyCollision(shot, scenery360->obj.id, &scenery360->obj); } else { - func_beam_80036874(shot, scenery360->info.hitbox, &scenery360->obj); + PlayerShot_CheckObjectHitbox(shot, scenery360->info.hitbox, &scenery360->obj); } } } @@ -923,9 +923,9 @@ void func_beam_80038140(PlayerShot* shot) { (scenery->obj.id == OBJ_SCENERY_2) || (scenery->obj.id == OBJ_SCENERY_3) || (scenery->obj.id == OBJ_SCENERY_67) || (scenery->obj.id == OBJ_SCENERY_74) || (scenery->obj.id == OBJ_SCENERY_3)) { - func_beam_8003774C(shot, scenery->obj.id, &scenery->obj); + PlayerShot_CheckPolyCollision(shot, scenery->obj.id, &scenery->obj); } else { - temp_v0 = func_beam_80036874(shot, scenery->info.hitbox, &scenery->obj); + temp_v0 = PlayerShot_CheckObjectHitbox(shot, scenery->info.hitbox, &scenery->obj); if (temp_v0 != 0) { scenery->dmgType = DMG_BEAM; scenery->dmgPart = temp_v0 - 1; @@ -938,11 +938,11 @@ void func_beam_80038140(PlayerShot* shot) { for (i = 0, sprite = gSprites; i < ARRAY_COUNT(gSprites); i++, sprite++) { if (sprite->obj.status == OBJ_ACTIVE) { if (sprite->obj.id != OBJ_SPRITE_TI_CACTUS) { - if (func_beam_80037698(shot, sprite)) { + if (PlayerShot_CheckSpriteHitbox(shot, sprite)) { sprite->unk_46 = 1; } } else { - if (func_beam_80036874(shot, sprite->info.hitbox, &sprite->obj) != 0) { + if (PlayerShot_CheckObjectHitbox(shot, sprite->info.hitbox, &sprite->obj) != 0) { sprite->unk_46 = 1; } } @@ -951,51 +951,51 @@ void func_beam_80038140(PlayerShot* shot) { } for (i = 0, boss = gBosses; i < ARRAY_COUNT(gBosses); i++, boss++) { if ((boss->obj.status == OBJ_ACTIVE) && (boss->timer_05A == 0)) { - if ((boss->obj.id == OBJ_BOSS_308) || (boss->obj.id == OBJ_BOSS_312) || (boss->obj.id == OBJ_BOSS_309) || - (boss->obj.id == OBJ_BOSS_313)) { - func_beam_8003774C(shot, boss->obj.id, &boss->obj); + if ((boss->obj.id == OBJ_BOSS_FO) || (boss->obj.id == OBJ_BOSS_VE2) || (boss->obj.id == OBJ_BOSS_309) || + (boss->obj.id == OBJ_BOSS_SZ)) { + PlayerShot_CheckPolyCollision(shot, boss->obj.id, &boss->obj); } else if (boss->obj.id == OBJ_BOSS_310) { test.x = fabsf(boss->obj.pos.x - shot->obj.pos.x) * .8333333f; test.y = fabsf(boss->obj.pos.y - shot->obj.pos.y) * 2; test.z = fabsf(boss->obj.pos.z - shot->obj.pos.z) * 0.8333333f; if (VEC3F_MAG(&test) < 1500.0f) { - if (shot->obj.id == PLAYERSHOT_4) { + if (shot->obj.id == PLAYERSHOT_LOCK_SEARCH) { Object_Kill(&shot->obj, shot->sfxSource); } else { boss->dmgType = DMG_BEAM; - func_beam_80036318(shot); + PlayerShot_Impact(shot); AUDIO_PLAY_SFX(NA_SE_EN_BARRIER_REFLECT, shot->sfxSource, 4); } } } else { - if (boss->obj.id == OBJ_BOSS_316) { + if (boss->obj.id == OBJ_BOSS_KA) { test.x = fabsf(boss->obj.pos.x - shot->obj.pos.x); test.y = fabsf(boss->obj.pos.y - 300.0f - shot->obj.pos.y) * 7.42f; test.z = fabsf(boss->obj.pos.z - shot->obj.pos.z); if (VEC3F_MAG(&test) < 2700.0f) { - if (shot->obj.id == PLAYERSHOT_4) { + if (shot->obj.id == PLAYERSHOT_LOCK_SEARCH) { Object_Kill(&shot->obj, shot->sfxSource); } else { boss->dmgType = DMG_BEAM; boss->dmgPart = 100; AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, shot->sfxSource, 4); - func_beam_80036318(shot); + PlayerShot_Impact(shot); } } } - temp_v0 = func_beam_80036874(shot, boss->info.hitbox, &boss->obj); + temp_v0 = PlayerShot_CheckObjectHitbox(shot, boss->info.hitbox, &boss->obj); if (temp_v0 != 0) { - if (shot->obj.id == PLAYERSHOT_4) { + if (shot->obj.id == PLAYERSHOT_LOCK_SEARCH) { Object_Kill(&shot->obj, shot->sfxSource); } else { - if ((boss->obj.id == OBJ_BOSS_316) && (shot->sourceId != TEAM_ID_FOX)) { + if ((boss->obj.id == OBJ_BOSS_KA) && (shot->sourceId != TEAM_ID_FOX)) { break; } boss->dmgType = DMG_BEAM; if (shot->obj.id == PLAYERSHOT_BOMB) { boss->dmgType = DMG_BOMB; boss->damage = 20; - } else if (shot->obj.id == PLAYERSHOT_8) { + } else if (shot->obj.id == PLAYERSHOT_LOCK_ON) { if (gCurrentLevel == LEVEL_AQUAS) { boss->damage = 31; } else { @@ -1014,13 +1014,13 @@ void func_beam_80038140(PlayerShot* shot) { } } } - if (boss->obj.id == OBJ_BOSS_314) { + if (boss->obj.id == OBJ_BOSS_SY) { boss->swork[19] = shot->sourceId; } boss->dmgPart = temp_v0 - 1; if (boss->obj.id == OBJ_BOSS_301) { boss->swork[5] = shot->obj.id; - } else if (boss->obj.id == OBJ_BOSS_319) { + } else if (boss->obj.id == OBJ_BOSS_VE1) { boss->fwork[47] = shot->obj.pos.x; boss->fwork[48] = shot->obj.pos.y; boss->fwork[49] = shot->obj.pos.z; @@ -1032,20 +1032,20 @@ void func_beam_80038140(PlayerShot* shot) { } } -void func_beam_80038F34(PlayerShot* shot) { +void PlayerShot_DrawHitmark(PlayerShot* shot) { Vec3f sp4C = { 0.0f, 0.0f, 0.0f }; - s32 sp48 = 0; + s32 isDrawn = false; Matrix_Translate(gGfxMatrix, shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + gPathProgress, MTXF_APPLY); - Matrix_MultVec3f(gGfxMatrix, &sp4C, &D_beam_8015F950); - if ((D_beam_8015F950.z < 0.0f) && (D_beam_8015F950.z > -10000.0f)) { - if (fabsf(D_beam_8015F950.x) < (fabsf(D_beam_8015F950.z * 0.5f) + 500.0f)) { - if (fabsf(D_beam_8015F950.y) < (fabsf(D_beam_8015F950.z * 0.5f) + 500.0f)) { - sp48 = 1; + Matrix_MultVec3f(gGfxMatrix, &sp4C, &sShotViewPos); + if ((sShotViewPos.z < 0.0f) && (sShotViewPos.z > -10000.0f)) { + if (fabsf(sShotViewPos.x) < (fabsf(sShotViewPos.z * 0.5f) + 500.0f)) { + if (fabsf(sShotViewPos.y) < (fabsf(sShotViewPos.z * 0.5f) + 500.0f)) { + isDrawn = true; } } } - if (!sp48) { + if (!isDrawn) { if (!gVersusMode) { Object_Kill(&shot->obj, shot->sfxSource); return; @@ -1075,44 +1075,44 @@ void func_beam_80038F34(PlayerShot* shot) { } } -void func_beam_80039210(PlayerShot* shot) { - f32 var_fv0; - f32 var_fv1; +void PlayerShot_DrawLaser(PlayerShot* shot) { + f32 width; + f32 length; u8 var_a1; - f32 sp70; - Gfx* sp6C; + f32 twinLaserSeparation; + Gfx* dList; - sp6C = D_101AED0; + dList = D_101AED0; if (gCamCount < 4) { RCP_SetupDL_21(); - sp70 = 9.0f; + twinLaserSeparation = 9.0f; if ((shot->unk_58 == 0) || ((gCurrentLevel == LEVEL_METEO) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO))) { - var_fv0 = 4.0f; - var_fv1 = 20.0f; + width = 4.0f; + length = 20.0f; } else { - var_fv0 = 2.0f; - var_fv1 = 10.0f; + width = 2.0f; + length = 10.0f; } if ((gLaserStrength[0] > LASERS_SINGLE) && (shot->unk_58 == 0)) { switch (gLaserStrength[0]) { case LASERS_TWIN: break; case LASERS_HYPER: - sp6C = D_101AD20; + dList = D_101AD20; break; } if (gCurrentLevel == LEVEL_AQUAS) { - sp70 = 4.0f; + twinLaserSeparation = 4.0f; } - Matrix_Scale(gGfxMatrix, var_fv0, var_fv0, var_fv1, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, width, width, length, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); - Matrix_Translate(gGfxMatrix, sp70, 0.f, 0.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, twinLaserSeparation, 0.f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, sp6C); - Matrix_Translate(gGfxMatrix, -(2.0f * sp70), 0.0f, 0.f, MTXF_APPLY); + gSPDisplayList(gMasterDisp++, dList); + Matrix_Translate(gGfxMatrix, -(2.0f * twinLaserSeparation), 0.0f, 0.f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, sp6C); + gSPDisplayList(gMasterDisp++, dList); } else { var_a1 = 0; if ((gCurrentLevel != LEVEL_KATINA) && (shot->sourceId > NPC_SHOT_ID + AI360_PEPPY) && @@ -1138,7 +1138,7 @@ void func_beam_80039210(PlayerShot* shot) { } switch (var_a1) { case 0: - Matrix_Scale(gGfxMatrix, var_fv0, var_fv0, var_fv1, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, width, width, length, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_101AED0); @@ -1151,15 +1151,15 @@ void func_beam_80039210(PlayerShot* shot) { gSPDisplayList(gMasterDisp++, D_101ABD0); break; case 2: - Matrix_Scale(gGfxMatrix, var_fv0, var_fv0, var_fv1, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, width, width, length, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_Translate(gGfxMatrix, 25.0f, 0.0f, 0.f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_101AED0); - sp6C = D_101AED0; + dList = D_101AED0; Matrix_Translate(gGfxMatrix, -50.0f, 0.0f, 0.f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, sp6C); + gSPDisplayList(gMasterDisp++, dList); break; case 3: Matrix_Push(&gGfxMatrix); @@ -1213,28 +1213,29 @@ static f32 D_800C9BD8[10] = { 100.0f, 100.0f, 0.0f, 0.0f, 0.0f, 50.0f, 0.0f, 40. static u8 D_800C9C00[4] = { 255, 255, 32, 32 }; static u8 D_800C9C04[4] = { 255, 32, 255, 32 }; static u8 D_800C9C08[4] = { 32, 32, 32, 255 }; -void func_beam_80039A50(PlayerShot* shot) { +void PlayerShot_DrawShot(PlayerShot* shot) { Vec3f sp11C = { 0.0f, 0.0f, 0.0f }; s32 pad[4]; f32 var_fv1; - s32 sp104 = 0; + s32 isDrawn = false; Matrix_Translate(gGfxMatrix, shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + gPathProgress, MTXF_APPLY); - Matrix_MultVec3f(gGfxMatrix, &sp11C, &D_beam_8015F950); - if ((D_beam_8015F950.z < 0.0f) && (D_beam_8015F950.z > -10000.0f)) { - var_fv1 = fabsf(D_beam_8015F950.x); // probably fake. The use of temps was likely different - if (var_fv1 < (fabsf(D_beam_8015F950.z * 0.5f) + 500.0f)) { - if (fabsf(D_beam_8015F950.y) < (fabsf(D_beam_8015F950.z * 0.5f) + 500.0f)) { - sp104 = 1; + Matrix_MultVec3f(gGfxMatrix, &sp11C, &sShotViewPos); + if ((sShotViewPos.z < 0.0f) && (sShotViewPos.z > -10000.0f)) { + var_fv1 = fabsf(sShotViewPos.x); // probably fake. The use of temps was likely different + if (var_fv1 < (fabsf(sShotViewPos.z * 0.5f) + 500.0f)) { + if (fabsf(sShotViewPos.y) < (fabsf(sShotViewPos.z * 0.5f) + 500.0f)) { + isDrawn = true; } } } - if (!sp104) { - if ((shot->obj.id != PLAYERSHOT_BOMB) && (shot->unk_64 < 10) && !gVersusMode) { + if (!isDrawn) { + if ((shot->obj.id != PLAYERSHOT_BOMB) && (shot->timer < 10) && !gVersusMode) { Object_Kill(&shot->obj, shot->sfxSource); } } else { - if ((shot->obj.id == PLAYERSHOT_5) || (shot->obj.id == PLAYERSHOT_6) || (shot->obj.id == PLAYERSHOT_7)) { + if ((shot->obj.id == PLAYERSHOT_TANK) || (shot->obj.id == PLAYERSHOT_ON_FOOT) || + (shot->obj.id == PLAYERSHOT_7)) { shot->obj.rot.y = RAD_TO_DEG(-gPlayer[gPlayerNum].camYaw); shot->obj.rot.x = RAD_TO_DEG(gPlayer[gPlayerNum].camPitch); } @@ -1251,9 +1252,9 @@ void func_beam_80039A50(PlayerShot* shot) { Matrix_Translate(gGfxMatrix, 0.f, 0.f, D_800C9BD8[shot->obj.id], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); switch (shot->obj.id) { - case PLAYERSHOT_0: - case PLAYERSHOT_1: - func_beam_80039210(shot); + case PLAYERSHOT_SINGLE_LASER: + case PLAYERSHOT_TWIN_LASER: + PlayerShot_DrawLaser(shot); break; case PLAYERSHOT_BOMB: if (shot->unk_5C == 0) { @@ -1320,7 +1321,7 @@ void func_beam_80039A50(PlayerShot* shot) { gSPDisplayList(gMasterDisp++, D_1031EC0); } break; - case PLAYERSHOT_5: + case PLAYERSHOT_TANK: gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); RCP_SetupDL_40(); if (gVersusMode) { @@ -1371,7 +1372,7 @@ void func_beam_80039A50(PlayerShot* shot) { gSPDisplayList(gMasterDisp++, D_landmaster_3006940); } break; - case PLAYERSHOT_6: + case PLAYERSHOT_ON_FOOT: case PLAYERSHOT_7: Matrix_Scale(gGfxMatrix, shot->scale, shot->scale, shot->scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -1393,7 +1394,7 @@ void func_beam_80039A50(PlayerShot* shot) { gSPDisplayList(gMasterDisp++, D_versus_301AEF0); } break; - case PLAYERSHOT_8: + case PLAYERSHOT_LOCK_ON: Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if (gCurrentLevel == LEVEL_AQUAS) { @@ -1410,50 +1411,51 @@ void func_beam_80039A50(PlayerShot* shot) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); } else if (shot->unk_5C == 0) { - if (!(shot->scale > 1.5f)) { - Matrix_Pop(&gGfxMatrix); - Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + gPathProgress, - MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].camPitch, MTXF_APPLY); - Matrix_Push(&gGfxMatrix); - Matrix_Scale(gGfxMatrix, 20.0f, 20.0f, 20.0f, MTXF_APPLY); - RCP_SetupDL(&gMasterDisp, 0x31); - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); - if (gVersusMode) { - switch (shot->sourceId) { - case 0: - gDPSetEnvColor(gMasterDisp++, 255, 255, 32, 255); - break; - case 1: - gDPSetEnvColor(gMasterDisp++, 255, 32, 32, 255); - break; - case 2: - gDPSetEnvColor(gMasterDisp++, 32, 255, 32, 255); - break; - case 3: - gDPSetEnvColor(gMasterDisp++, 32, 32, 255, 255); - break; - } - } else { - gDPSetEnvColor(gMasterDisp++, 0, 255, 0, 255); - } - Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 53.0f * M_DTOR, MTXF_APPLY); - Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_101C2E0); - Matrix_RotateZ(gGfxMatrix, gGameFrameCount * -53.0f * 2.0f * M_DTOR, MTXF_APPLY); - Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_101C2E0); - Matrix_Pop(&gGfxMatrix); - if (((gGameFrameCount % 2) == 0)) { - Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.7f, MTXF_APPLY); - } else { - Matrix_Scale(gGfxMatrix, 1.3f, 1.3f, 1.3f, MTXF_APPLY); - } - Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + if (shot->scale > 1.5f) { + break; } + Matrix_Pop(&gGfxMatrix); + Matrix_Push(&gGfxMatrix); + Matrix_Translate(gGfxMatrix, shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + gPathProgress, + MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].camPitch, MTXF_APPLY); + Matrix_Push(&gGfxMatrix); + Matrix_Scale(gGfxMatrix, 20.0f, 20.0f, 20.0f, MTXF_APPLY); + RCP_SetupDL(&gMasterDisp, 0x31); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); + if (gVersusMode) { + switch (shot->sourceId) { + case 0: + gDPSetEnvColor(gMasterDisp++, 255, 255, 32, 255); + break; + case 1: + gDPSetEnvColor(gMasterDisp++, 255, 32, 32, 255); + break; + case 2: + gDPSetEnvColor(gMasterDisp++, 32, 255, 32, 255); + break; + case 3: + gDPSetEnvColor(gMasterDisp++, 32, 32, 255, 255); + break; + } + } else { + gDPSetEnvColor(gMasterDisp++, 0, 255, 0, 255); + } + Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 53.0f * M_DTOR, MTXF_APPLY); + Matrix_SetGfxMtx(&gMasterDisp); + gSPDisplayList(gMasterDisp++, D_101C2E0); + Matrix_RotateZ(gGfxMatrix, gGameFrameCount * -53.0f * 2.0f * M_DTOR, MTXF_APPLY); + Matrix_SetGfxMtx(&gMasterDisp); + gSPDisplayList(gMasterDisp++, D_101C2E0); + Matrix_Pop(&gGfxMatrix); + if (((gGameFrameCount % 2) == 0)) { + Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.7f, MTXF_APPLY); + } else { + Matrix_Scale(gGfxMatrix, 1.3f, 1.3f, 1.3f, MTXF_APPLY); + } + Matrix_SetGfxMtx(&gMasterDisp); + gSPDisplayList(gMasterDisp++, D_1024AC0); } else { RCP_SetupDL(&gMasterDisp, 0x1D); gSPDisplayList(gMasterDisp++, D_10231A0); @@ -1475,7 +1477,7 @@ void func_beam_80039A50(PlayerShot* shot) { gSPDisplayList(gMasterDisp++, D_1024AC0); } break; - case PLAYERSHOT_9: + case PLAYERSHOT_GFOX_LASER: Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 20.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -1486,29 +1488,30 @@ void func_beam_80039A50(PlayerShot* shot) { } } -void func_beam_8003AF88(PlayerShot* shot) { +void PlayerShot_Draw(PlayerShot* shot) { switch (shot->obj.status) { - case 1: - func_beam_80039A50(shot); + case SHOT_ACTIVE: + PlayerShot_DrawShot(shot); break; - case 2: - func_beam_80038F34(shot); + case SHOT_HITMARK: + PlayerShot_DrawHitmark(shot); break; } } -void func_beam_8003AFD8(PlayerShot* shot) { +void PlayerShot_UpdateHitmark(PlayerShot* shot) { shot->unk_60++; if (shot->unk_60 > 2) { Object_Kill(&shot->obj, shot->sfxSource); } } -void func_beam_8003B00C(PlayerShot* shot, Player* player) { +void PlayerShot_UpdateShot2(PlayerShot* shot, Player* player) { Vec3f sp5C; Vec3f sp50; Vec3f sp44; Vec3f sp38; + switch (shot->unk_5C) { case 0: Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); @@ -1542,18 +1545,18 @@ void func_beam_8003B00C(PlayerShot* shot, Player* player) { shot->obj.pos.y = player->pos.y + sp38.y; shot->obj.pos.z = player->trueZpos + sp38.z; Matrix_Push(&gCalcMatrix); - func_beam_80038140(shot); + PlayerShot_CollisionCheck(shot); Matrix_Pop(&gCalcMatrix); if (shot->obj.pos.y < gGroundHeight) { shot->unk_5C = 0; - func_beam_80036770(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->obj.rot.y, 2.0f); + PlayerShot_HitGround(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->obj.rot.y, 2.0f); break; } else if (shot->unk_5C == 2) { shot->unk_5C = 0; break; } } - shot->unk_64 = 30; + shot->timer = 30; shot->obj.rot.y = player->rot.y + player->yRot_114; if (!(gControllerHold->button & U_CBUTTONS) && !(gControllerHold->button & A_BUTTON)) { shot->unk_5C = 1; @@ -1572,7 +1575,7 @@ void func_beam_8003B00C(PlayerShot* shot, Player* player) { shot->unk_4C += shot->vel.y; shot->unk_50 += shot->vel.z; if (((gGameFrameCount % 4) == 0)) { - func_play_800A668C(D_ctx_8017849C, D_ctx_801784A0, D_ctx_80178498); + Play_SpawnHitmark(D_ctx_8017849C, D_ctx_801784A0, D_ctx_80178498); } if ((fabsf(shot->obj.pos.x - shot->unk_48) < 200.0f) && (fabsf(shot->obj.pos.y - shot->unk_4C) < 200.0f) && (fabsf(shot->obj.pos.z - shot->unk_50) < 200.0f)) { @@ -1581,24 +1584,24 @@ void func_beam_8003B00C(PlayerShot* shot, Player* player) { } break; } - if (shot->unk_64 == 0) { + if (shot->timer == 0) { Object_Kill(&shot->obj, shot->sfxSource); } if (shot->unk_5C == 1) { if (shot->obj.pos.y < gGroundHeight) { - func_beam_80036318(shot); - func_beam_80036770(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->obj.rot.y, 2.0f); + PlayerShot_Impact(shot); + PlayerShot_HitGround(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->obj.rot.y, 2.0f); if (gCurrentLevel == LEVEL_FORTUNA) { func_effect_8007BC7C(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); func_effect_8007BC7C(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); func_effect_8007BC7C(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); } } - func_beam_80038140(shot); + PlayerShot_CollisionCheck(shot); } } -void func_beam_8003B55C(PlayerShot* shot, s32 index) { +void PlayerShot_UpdateBeam(PlayerShot* shot, s32 index) { Vec3f sp44; Vec3f sp38; @@ -1607,7 +1610,7 @@ void func_beam_8003B55C(PlayerShot* shot, s32 index) { func_effect_8007ACE0(shot->obj.pos.x, gGroundHeight, shot->obj.pos.z, 0.1f, 1.5f, shot->obj.rot.y - 20.0f); } if ((shot->obj.pos.y < gGroundHeight) && (gGroundType != 4)) { - func_beam_80036318(shot); + PlayerShot_Impact(shot); shot->obj.pos.y = gGroundHeight + 2; if (gCurrentLevel == LEVEL_BOLSE) { func_effect_8007A6F0(&shot->obj.pos, NA_SE_EN_REFLECT); @@ -1621,14 +1624,14 @@ void func_beam_8003B55C(PlayerShot* shot, s32 index) { sp44.y = sp44.z = 0.0f; sp44.x = 40.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); - func_beam_80036770(shot->obj.pos.x + sp38.x, gGroundHeight + 2.0f, shot->obj.pos.z + sp38.z, - shot->obj.rot.y, 2.0f); + PlayerShot_HitGround(shot->obj.pos.x + sp38.x, gGroundHeight + 2.0f, shot->obj.pos.z + sp38.z, + shot->obj.rot.y, 2.0f); sp44.x = -40.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); - func_beam_80036770(shot->obj.pos.x + sp38.x, gGroundHeight + 2.0f, shot->obj.pos.z + sp38.z, - shot->obj.rot.y, 2.0f); + PlayerShot_HitGround(shot->obj.pos.x + sp38.x, gGroundHeight + 2.0f, shot->obj.pos.z + sp38.z, + shot->obj.rot.y, 2.0f); } else { - func_beam_80036770(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->obj.rot.y, 2.0f); + PlayerShot_HitGround(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->obj.rot.y, 2.0f); } } if (gGroundSurface == SURFACE_WATER) { @@ -1652,29 +1655,30 @@ void func_beam_8003B55C(PlayerShot* shot, s32 index) { shot->obj.pos.z, 0.8f, 0); } } - if (shot->unk_64 == 0) { + if (shot->timer == 0) { Object_Kill(&shot->obj, shot->sfxSource); return; - } else if ((shot->sourceId < NPC_SHOT_ID + AI360_10) || ((shot->unk_64 % 2) != 0)) { - func_beam_80038140(shot); + } + if ((shot->sourceId < NPC_SHOT_ID + AI360_10) || ((shot->timer % 2) != 0)) { + PlayerShot_CollisionCheck(shot); } } -void func_beam_8003BA80(PlayerShot* shot) { - func_beam_8003B55C(shot, 0); +void PlayerShot_UpdateTank(PlayerShot* shot) { + PlayerShot_UpdateBeam(shot, 0); } -void func_beam_8003BAA0(PlayerShot* shot) { - func_beam_8003B55C(shot, 0); +void PlayerShot_UpdateOnFoot(PlayerShot* shot) { + PlayerShot_UpdateBeam(shot, 0); shot->unk_58 = 0; } -void func_beam_8003BACC(PlayerShot* shot) { +void PlayerShot_UpdateShot7(PlayerShot* shot) { Vec3f sp3C; Vec3f sp30; Vec3f sp24; - func_beam_8003B55C(shot, 0); + PlayerShot_UpdateBeam(shot, 0); sp3C.x = shot->obj.pos.x; sp3C.y = shot->obj.pos.y; sp3C.z = shot->obj.pos.z; @@ -1682,32 +1686,32 @@ void func_beam_8003BACC(PlayerShot* shot) { sp30.y = 0.0f; sp30.z = 0.0f; if (!func_col2_800A3690(&sp3C, &sp30, COL2_5, &sp24)) { - func_beam_80036318(shot); + PlayerShot_Impact(shot); } shot->unk_58 = 0; } -bool func_beam_8003BB4C(PlayerShot* shot) { +bool PlayerShot_FindLockTarget(PlayerShot* shot) { s32 i; s32 j; - f32 var_fa0; + f32 lockRange; Actor* actor; Player* player; if (gLevelMode == LEVELMODE_ON_RAILS) { - var_fa0 = 300.0f; + lockRange = 300.0f; } else { - var_fa0 = 200.0f; + lockRange = 200.0f; } - for (i = 0, actor = gActors; i < 60; i++, actor++) { + for (i = 0, actor = gActors; i < ARRAY_COUNT(gActors); i++, actor++) { if ((actor->obj.status == OBJ_ACTIVE) && (actor->info.targetOffset != 0.0f) && - ((actor->lockOnTimers[shot->sourceId] == 0) && (fabsf(shot->obj.pos.x - actor->obj.pos.x) <= var_fa0) && - (fabsf(shot->obj.pos.y - (actor->obj.pos.y + actor->info.targetOffset)) <= var_fa0) && - (fabsf(shot->obj.pos.z - actor->obj.pos.z) <= var_fa0))) { + ((actor->lockOnTimers[shot->sourceId] == 0) && (fabsf(shot->obj.pos.x - actor->obj.pos.x) <= lockRange) && + (fabsf(shot->obj.pos.y - (actor->obj.pos.y + actor->info.targetOffset)) <= lockRange) && + (fabsf(shot->obj.pos.z - actor->obj.pos.z) <= lockRange))) { actor->lockOnTimers[shot->sourceId] = 20; - func_enmy_80060F30(gPlayer[shot->sourceId].sfxSource, NA_SE_LOCK_ON, shot->sourceId); + Object_PlayerSfx(gPlayer[shot->sourceId].sfxSource, NA_SE_LOCK_ON, shot->sourceId); for (j = 0; j < ARRAY_COUNT(gPlayerShots); j++) { - if (gPlayerShots[j].obj.id == PLAYERSHOT_4) { + if (gPlayerShots[j].obj.id == PLAYERSHOT_LOCK_SEARCH) { Object_Kill(&gPlayerShots[j].obj, gPlayerShots[j].sfxSource); } } @@ -1720,15 +1724,15 @@ bool func_beam_8003BB4C(PlayerShot* shot) { for (i = 0, player = gPlayer; i < gCamCount; i++, player++) { if ((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) && !player->somersault && (player->form != FORM_ON_FOOT) && (i != shot->sourceId) && (gVsLockOnTimers[i][shot->sourceId] == 0) && - (fabsf(shot->obj.pos.x - player->pos.x) <= var_fa0) && - (fabsf(shot->obj.pos.y - player->pos.y) <= var_fa0) && - (fabsf(shot->obj.pos.z - player->trueZpos) <= var_fa0)) { + (fabsf(shot->obj.pos.x - player->pos.x) <= lockRange) && + (fabsf(shot->obj.pos.y - player->pos.y) <= lockRange) && + (fabsf(shot->obj.pos.z - player->trueZpos) <= lockRange)) { gVsLockOnTimers[0][shot->sourceId] = gVsLockOnTimers[1][shot->sourceId] = gVsLockOnTimers[2][shot->sourceId] = gVsLockOnTimers[3][shot->sourceId] = 0; gVsLockOnTimers[i][shot->sourceId] = 20; - func_enmy_80060F30(gPlayer[shot->sourceId].sfxSource, NA_SE_LOCK_ON, shot->sourceId); + Object_PlayerSfx(gPlayer[shot->sourceId].sfxSource, NA_SE_LOCK_ON, shot->sourceId); for (j = 0; j < ARRAY_COUNT(gPlayerShots); j++) { - if (gPlayerShots[j].obj.id == PLAYERSHOT_4) { + if (gPlayerShots[j].obj.id == PLAYERSHOT_LOCK_SEARCH) { Object_Kill(&gPlayerShots[j].obj, gPlayerShots[j].sfxSource); } } @@ -1741,22 +1745,22 @@ bool func_beam_8003BB4C(PlayerShot* shot) { return false; } -void func_beam_8003BEF4(PlayerShot* shot) { +void PlayerShot_SearchLockOnTarget(PlayerShot* shot) { if (gVersusMode) { - if ((shot->obj.pos.y < gGroundHeight) || func_beam_8003BB4C(shot) || - !(gControllerHold[shot->sourceId].button & A_BUTTON) || (shot->unk_64 == 0)) { + if ((shot->obj.pos.y < gGroundHeight) || PlayerShot_FindLockTarget(shot) || + !(gControllerHold[shot->sourceId].button & A_BUTTON) || (shot->timer == 0)) { Object_Kill(&shot->obj, shot->sfxSource); } } else { - if ((shot->obj.pos.y < gGroundHeight) || func_beam_8003BB4C(shot) || - !(gControllerHold[gMainController].button & A_BUTTON) || (shot->unk_64 == 0)) { + if ((shot->obj.pos.y < gGroundHeight) || PlayerShot_FindLockTarget(shot) || + !(gControllerHold[gMainController].button & A_BUTTON) || (shot->timer == 0)) { Object_Kill(&shot->obj, shot->sfxSource); } } - func_beam_80038140(shot); + PlayerShot_CollisionCheck(shot); } -void func_beam_8003C008(PlayerShot* shot) { +void PlayerShot_CheckBossHitbox(PlayerShot* shot) { s32 i; s32 j; f32* hitboxData; @@ -1771,7 +1775,7 @@ void func_beam_8003C008(PlayerShot* shot) { boss = gBosses; for (i = 0; i < ARRAY_COUNT(gBosses); i++, boss++) { if ((boss->obj.status == OBJ_ACTIVE) && (boss->timer_05A == 0)) { - if (boss->obj.id == OBJ_BOSS_316) { + if (boss->obj.id == OBJ_BOSS_KA) { var_s6 = gGameFrameCount % 8U; var_fs2 = shot->scale * 40.0f; } else { @@ -1818,11 +1822,11 @@ void func_beam_8003C008(PlayerShot* shot) { } } -void func_beam_8003C3D8(PlayerShot* shot) { +void PlayerShot_SetBombLight(PlayerShot* shot) { static u8 D_800C9C18[4] = { 255, 255, 32, 32 }; static u8 D_800C9C1C[4] = { 255, 32, 255, 32 }; static u8 D_800C9C20[4] = { 32, 32, 32, 255 }; - f32 var_fv0; + f32 brightness; gLight3x = shot->obj.pos.x; gLight3y = shot->obj.pos.y; @@ -1836,66 +1840,68 @@ void func_beam_8003C3D8(PlayerShot* shot) { gLight3G = 90; gLight3B = 255; } - var_fv0 = 0.7f; + brightness = 0.7f; if (shot->unk_5C != 0) { - var_fv0 = 1.0f; + brightness = 1.0f; } - Math_SmoothStepToF(&gLight3Brightness, var_fv0, 1.0f, 0.08f, 0.001f); + Math_SmoothStepToF(&gLight3Brightness, brightness, 1.0f, 0.08f, 0.001f); } -void func_beam_8003C4D0(PlayerShot* shot, s32 damage) { +void PlayerShot_ApplyExplosionDamage(PlayerShot* shot, s32 damage) { s32 i; - f32 sp68; - f32 sp64; - f32 sp60; + f32 dx; + f32 dy; + f32 dz; s32 pad[2]; Actor* actor; Sprite* sprite; Scenery* scenery; Effect* effect; Player* player; - f32 temp_fs2 = shot->scale * 60.0f; + f32 radius = shot->scale * 60.0f; - for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) { + scenery = gScenery; + for (i = 0; i < ARRAY_COUNT(gScenery); i++, scenery++) { if ((scenery->obj.status == OBJ_ACTIVE) && (scenery->obj.id == OBJ_SCENERY_56)) { - sp68 = scenery->obj.pos.x - shot->obj.pos.x; - sp64 = scenery->obj.pos.y - shot->obj.pos.y; - sp60 = scenery->obj.pos.z - shot->obj.pos.z; - if (sqrtf(SQ(sp68) + SQ(sp64) + SQ(sp60)) < temp_fs2) { + dx = scenery->obj.pos.x - shot->obj.pos.x; + dy = scenery->obj.pos.y - shot->obj.pos.y; + dz = scenery->obj.pos.z - shot->obj.pos.z; + if (sqrtf(SQ(dx) + SQ(dy) + SQ(dz)) < radius) { scenery->dmgType = DMG_EXPLOSION; } scenery->dmgPart = 0; } } - for (i = 0, sprite = gSprites; i < ARRAY_COUNT(gSprites); i++, sprite++) { + sprite = gSprites; + for (i = 0; i < ARRAY_COUNT(gSprites); i++, sprite++) { if ((sprite->obj.status == OBJ_ACTIVE) && ((sprite->obj.id == OBJ_SPRITE_FO_POLE) || (sprite->obj.id == OBJ_SPRITE_TI_CACTUS) || (sprite->obj.id == OBJ_SPRITE_CO_POLE) || (sprite->obj.id == OBJ_SPRITE_CO_TREE))) { - sp68 = sprite->obj.pos.x - shot->obj.pos.x; - sp64 = sprite->obj.pos.y - shot->obj.pos.y; - sp60 = sprite->obj.pos.z - shot->obj.pos.z; - if (sqrtf(SQ(sp68) + SQ(sp64) + SQ(sp60)) < temp_fs2) { + dx = sprite->obj.pos.x - shot->obj.pos.x; + dy = sprite->obj.pos.y - shot->obj.pos.y; + dz = sprite->obj.pos.z - shot->obj.pos.z; + if (sqrtf(SQ(dx) + SQ(dy) + SQ(dz)) < radius) { sprite->unk_46 = 1; } } } actor = gActors; - for (i = 0; i < 60; i++, actor++) { + for (i = 0; i < ARRAY_COUNT(gActors); i++, actor++) { if ((actor->obj.status == OBJ_ACTIVE) && (actor->timer_0C2 == 0) && !((gCurrentLevel == LEVEL_MACBETH) && (OBJ_ACTOR_205 <= actor->obj.id) && (actor->obj.id < OBJ_ACTOR_214)) && !((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->iwork[12] != 0)) && ((actor->scale >= 0.0f) || (actor->obj.id == OBJ_ACTOR_271))) { - sp68 = actor->obj.pos.x - shot->obj.pos.x; - sp64 = actor->obj.pos.y - shot->obj.pos.y; - sp60 = actor->obj.pos.z - shot->obj.pos.z; - if ((gLevelMode == 0) && (sp60 < 0.0f)) { - sp60 *= 0.6f; + dx = actor->obj.pos.x - shot->obj.pos.x; + dy = actor->obj.pos.y - shot->obj.pos.y; + dz = actor->obj.pos.z - shot->obj.pos.z; + if ((gLevelMode == LEVELMODE_ON_RAILS) && (dz < 0.0f)) { + dz *= 0.6f; } actor->hitPos.x = shot->obj.pos.x; actor->hitPos.y = shot->obj.pos.y; actor->hitPos.z = shot->obj.pos.z; - if (sqrtf(SQ(sp68) + SQ(sp64) + SQ(sp60)) < temp_fs2) { + if (sqrtf(SQ(dx) + SQ(dy) + SQ(dz)) < radius) { if ((actor->obj.id == OBJ_ACTOR_193) || (actor->obj.id == OBJ_ACTOR_186) || (actor->obj.id == OBJ_ACTOR_190) || (actor->obj.id == OBJ_ACTOR_202) || (actor->obj.id == OBJ_ACTOR_201) || (actor->obj.id == OBJ_ACTOR_187) || @@ -1912,9 +1918,9 @@ void func_beam_8003C4D0(PlayerShot* shot, s32 damage) { } } else if ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->scale >= 0.5f) && (damage > 30)) { actor->dmgSource = shot->sourceId + 1; - actor->vel.x = sp68 * 0.03f; - actor->vel.y = sp64 * 0.03f; - actor->vel.z = sp60 * 0.03f; + actor->vel.x = dx * 0.03f; + actor->vel.y = dy * 0.03f; + actor->vel.z = dz * 0.03f; actor->obj.status = OBJ_DYING; actor->timer_0BC = RAND_INT(15.0f) + 10; actor->timer_0BE = 0; @@ -1940,24 +1946,24 @@ void func_beam_8003C4D0(PlayerShot* shot, s32 damage) { } else if (gCurrentLevel == LEVEL_VENOM_1) { Venom1_8019864C(shot); } else { - func_beam_8003C008(shot); + PlayerShot_CheckBossHitbox(shot); } effect = gEffects; for (i = 0; i < ARRAY_COUNT(gEffects); i++, effect++) { if (effect->obj.status == OBJ_ACTIVE) { - sp68 = effect->obj.pos.x - shot->obj.pos.x; - sp64 = effect->obj.pos.y - shot->obj.pos.y; - sp60 = effect->obj.pos.z - shot->obj.pos.z; - if (sqrtf(SQ(sp68) + SQ(sp64) + SQ(sp60)) < temp_fs2) { + dx = effect->obj.pos.x - shot->obj.pos.x; + dy = effect->obj.pos.y - shot->obj.pos.y; + dz = effect->obj.pos.z - shot->obj.pos.z; + if (sqrtf(SQ(dx) + SQ(dy) + SQ(dz)) < radius) { if (effect->info.unk_16 == 0) { Object_Kill(&effect->obj, effect->sfxSource); } if (effect->info.unk_16 == 2) { - effect->obj.pos.x += sp68 * 0.03f; + effect->obj.pos.x += dx * 0.03f; if (!((gLevelType == LEVELTYPE_PLANET) && (effect->obj.pos.y < 100.0f))) { - effect->obj.pos.y += sp64 * 0.03f; + effect->obj.pos.y += dy * 0.03f; } - effect->obj.pos.z += sp60 * 0.03f; + effect->obj.pos.z += dz * 0.03f; if ((effect->obj.id == OBJ_EFFECT_392) && (effect->state == 0)) { effect->state = 1; effect->unk_44 = 176; @@ -1970,13 +1976,14 @@ void func_beam_8003C4D0(PlayerShot* shot, s32 damage) { } } if (gVersusMode) { - for (i = 0, player = gPlayer; i < gCamCount; i++, player++) { + player = gPlayer; + for (i = 0; i < gCamCount; i++, player++) { if ((i != shot->sourceId) && (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (player->hitTimer == 0)) { - sp68 = player->pos.x - shot->obj.pos.x; - sp64 = player->pos.y - shot->obj.pos.y; - sp60 = player->trueZpos - shot->obj.pos.z; - if (sqrtf(SQ(sp68) + SQ(sp64) + SQ(sp60)) < temp_fs2) { - player->unk_288 = shot->sourceId + 1; + dx = player->pos.x - shot->obj.pos.x; + dy = player->pos.y - shot->obj.pos.y; + dz = player->trueZpos - shot->obj.pos.z; + if (sqrtf(SQ(dx) + SQ(dy) + SQ(dz)) < radius) { + player->attacker = shot->sourceId + 1; switch (player->form) { case FORM_ARWING: Player_ApplyDamage(player, 0, 80); @@ -1994,48 +2001,48 @@ void func_beam_8003C4D0(PlayerShot* shot, s32 damage) { } } -void func_beam_8003CC08(PlayerShot* shot) { +void PlayerShot_UpdateBomb(PlayerShot* shot) { Vec3f test; f32 var_ft5; switch (shot->unk_5C) { case 0: - if (shot->unk_64 == 0) { - func_beam_80035E78(shot); + if (shot->timer == 0) { + PlayerShot_ExplodeBomb(shot); break; } if ((shot->obj.pos.y < gGroundHeight) && (gGroundType != 4)) { - func_beam_80035E78(shot); + PlayerShot_ExplodeBomb(shot); break; } if ((gPlayer[shot->sourceId].form == FORM_LANDMASTER) || (gPlayer[shot->sourceId].form == FORM_ON_FOOT)) { shot->vel.y -= 1.0f; Math_SmoothStepToF(&shot->obj.rot.x, -90.0f, 0.05f, 1.0f, 0.0f); } - if (shot->unk_64 < 25) { + if (shot->timer < 25) { if (gVersusMode) { if (gControllerPress[shot->sourceId].button & gBombButton[shot->sourceId]) { - func_beam_80035E78(shot); + PlayerShot_ExplodeBomb(shot); break; } } else { if (gControllerPress[gMainController].button & gBombButton[shot->sourceId]) { - func_beam_80035E78(shot); + PlayerShot_ExplodeBomb(shot); break; } } } if (!((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gBosses[0].obj.status == OBJ_ACTIVE) && (gBosses[0].state == 17))) { - func_beam_80038140(shot); + PlayerShot_CollisionCheck(shot); } - func_beam_8003C3D8(shot); + PlayerShot_SetBombLight(shot); break; case 1: D_ctx_8017812C = 2; shot->obj.rot.y += 1.0f; Math_SmoothStepToF(&shot->scale, shot->unk_48, 0.05f, 1.5f, 0.001f); - if ((shot->unk_64 > 0) && (shot->unk_64 < 30)) { + if ((shot->timer > 0) && (shot->timer < 30)) { if (!gVersusMode && ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN))) { test.x = gPlayer[0].pos.x - shot->obj.pos.x; @@ -2048,9 +2055,9 @@ void func_beam_8003CC08(PlayerShot* shot) { var_ft5 = 60.0f - var_ft5; Math_SmoothStepToF(&D_ctx_801779A8[gMainController], var_ft5 + 5.0f, 1.0f, 3.0f, 0.0f); } - func_beam_8003C3D8(shot); + PlayerShot_SetBombLight(shot); } - if (shot->unk_64 == 0) { + if (shot->timer == 0) { shot->unk_58 -= 8; if (shot->unk_58 < 0) { shot->unk_58 = 0; @@ -2058,13 +2065,13 @@ void func_beam_8003CC08(PlayerShot* shot) { D_ctx_8017812C = 0; } } - func_beam_8003C4D0(shot, 50); + PlayerShot_ApplyExplosionDamage(shot, 50); break; } } -static Vec3f D_800C9C24 = { 0.0f, 0.0f, 0.0f }; -void func_beam_8003CF90(PlayerShot* shot) { +static Vec3f sLockOnPos = { 0.0f, 0.0f, 0.0f }; +void PlayerShot_UpdateLockOnShot(PlayerShot* shot) { s32 i; s32 var_a3; f32 sp6C; @@ -2076,7 +2083,7 @@ void func_beam_8003CF90(PlayerShot* shot) { Actor* actor; Player* player; - if ((shot->obj.pos.y < gGroundHeight) || (shot->unk_64 == 1)) { + if ((shot->obj.pos.y < gGroundHeight) || (shot->timer == 1)) { if ((gGroundSurface == SURFACE_WATER) && (shot->obj.pos.y < gGroundHeight)) { shot->unk_48 = 10.0f; func_effect_8007D9DC(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, @@ -2087,17 +2094,17 @@ void func_beam_8003CF90(PlayerShot* shot) { shot->unk_48 * 0.5f); func_effect_8007A6F0(&shot->obj.pos, NA_SE_OB_WATER_BOUND_M); } - func_beam_80036318(shot); + PlayerShot_Impact(shot); } else { var_a3 = 0; if (shot->unk_60 == 0) { - for (i = 0, actor = gActors; i < 60; i++, actor++) { + for (i = 0, actor = gActors; i < ARRAY_COUNT(gActors); i++, actor++) { if ((actor->obj.status == OBJ_ACTIVE) && (actor->info.targetOffset != 0.0f) && (actor->lockOnTimers[shot->sourceId] != 0)) { var_a3 = 1; actor->lockOnTimers[shot->sourceId] = 2; - D_800C9C24 = actor->obj.pos; - D_800C9C24.y += actor->info.targetOffset; + sLockOnPos = actor->obj.pos; + sLockOnPos.y += actor->info.targetOffset; } } for (i = 0, player = gPlayer; i < gCamCount; i++, player++) { @@ -2105,19 +2112,19 @@ void func_beam_8003CF90(PlayerShot* shot) { (gVsLockOnTimers[i][shot->sourceId] != 0)) { var_a3 = 1; gVsLockOnTimers[i][shot->sourceId] = 2; - D_800C9C24.x = player->pos.x; + sLockOnPos.x = player->pos.x; if (player->form == FORM_ARWING) { - D_800C9C24.y = player->pos.y; + sLockOnPos.y = player->pos.y; } else { - D_800C9C24.y = player->pos.y + 30.0f; + sLockOnPos.y = player->pos.y + 30.0f; } - D_800C9C24.z = player->trueZpos; + sLockOnPos.z = player->trueZpos; } } if (var_a3 != 0) { - sp6C = shot->obj.pos.x - D_800C9C24.x; - sp68 = shot->obj.pos.y - D_800C9C24.y; - sp64 = shot->obj.pos.z - D_800C9C24.z; + sp6C = shot->obj.pos.x - sLockOnPos.x; + sp68 = shot->obj.pos.y - sLockOnPos.y; + sp64 = shot->obj.pos.z - sLockOnPos.z; sp58 = Math_RadToDeg(Math_Atan2F(sp6C, sp64)); sp5C = Math_RadToDeg(-Math_Atan2F(sp68, sqrtf(SQ(sp6C) + SQ(sp64)))); if (shot->vec_2C.y >= 360.0f) { @@ -2134,7 +2141,7 @@ void func_beam_8003CF90(PlayerShot* shot) { } Math_SmoothStepToAngle(&shot->vec_2C.y, sp58, 1.0f, shot->unk_50, 0.0f); Math_SmoothStepToAngle(&shot->vec_2C.x, sp5C, 1.0f, shot->unk_50, 0.0f); - shot->unk_64 = 30; + shot->timer = 30; } else { shot->unk_60 = 1; } @@ -2160,7 +2167,7 @@ void func_beam_8003CF90(PlayerShot* shot) { shot->vel.y = sp38.y; shot->vel.z = sp38.z; } - func_beam_80038140(shot); + PlayerShot_CollisionCheck(shot); gLight3x = shot->obj.pos.x; gLight3y = shot->obj.pos.y; gLight3z = shot->obj.pos.z; @@ -2171,7 +2178,7 @@ void func_beam_8003CF90(PlayerShot* shot) { } } -void func_beam_8003D54C(PlayerShot* shot, s32 index) { +void PlayerShot_UpdateShot(PlayerShot* shot, s32 index) { s32 teamId; s32 bonus; @@ -2179,34 +2186,34 @@ void func_beam_8003D54C(PlayerShot* shot, s32 index) { shot->obj.pos.y += shot->vel.y; shot->obj.pos.z += shot->vel.z; switch (shot->obj.id) { - case PLAYERSHOT_0: - func_beam_8003B55C(shot, index); + case PLAYERSHOT_SINGLE_LASER: + PlayerShot_UpdateBeam(shot, index); break; - case PLAYERSHOT_1: - case PLAYERSHOT_9: - func_beam_8003B55C(shot, index); + case PLAYERSHOT_TWIN_LASER: + case PLAYERSHOT_GFOX_LASER: + PlayerShot_UpdateBeam(shot, index); break; case PLAYERSHOT_2: - func_beam_8003B00C(shot, &gPlayer[shot->sourceId]); + PlayerShot_UpdateShot2(shot, &gPlayer[shot->sourceId]); break; case PLAYERSHOT_BOMB: - func_beam_8003CC08(shot); + PlayerShot_UpdateBomb(shot); break; - case PLAYERSHOT_4: - func_beam_8003BEF4(shot); + case PLAYERSHOT_LOCK_SEARCH: + PlayerShot_SearchLockOnTarget(shot); break; - case PLAYERSHOT_5: - func_beam_8003BA80(shot); + case PLAYERSHOT_TANK: + PlayerShot_UpdateTank(shot); break; - case PLAYERSHOT_6: - func_beam_8003BAA0(shot); + case PLAYERSHOT_ON_FOOT: + PlayerShot_UpdateOnFoot(shot); break; case PLAYERSHOT_7: - func_beam_8003BACC(shot); + PlayerShot_UpdateShot7(shot); break; - case PLAYERSHOT_8: + case PLAYERSHOT_LOCK_ON: if (shot->scale > 1.5f) { - func_beam_8003C4D0(shot, 30); + PlayerShot_ApplyExplosionDamage(shot, 30); if (shot->bonus != 0) { if (gVersusMode) { gPlayerScores[shot->sourceId] += shot->bonus; @@ -2242,75 +2249,75 @@ void func_beam_8003D54C(PlayerShot* shot, s32 index) { } else if (gCurrentLevel == LEVEL_AQUAS) { Aquas_801ABA40(shot); } else { - func_beam_8003CF90(shot); + PlayerShot_UpdateLockOnShot(shot); } break; } } -void func_beam_8003D854(PlayerShot* shot) { +void PlayerShot_Update(PlayerShot* shot) { s32 i; - s32 var_s5; + s32 ticks; switch (shot->obj.status) { - case 0: + case SHOT_FREE: break; - case 1: - var_s5 = 1; + case SHOT_ACTIVE: + ticks = 1; switch (shot->obj.id) { - case PLAYERSHOT_9: - var_s5 = 4; + case PLAYERSHOT_GFOX_LASER: + ticks = 4; break; - case PLAYERSHOT_0: - case PLAYERSHOT_1: + case PLAYERSHOT_SINGLE_LASER: + case PLAYERSHOT_TWIN_LASER: if ((shot->unk_58 == 0) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO)) { - var_s5 = 4; + ticks = 4; } else { - var_s5 = 3; + ticks = 3; } break; - case PLAYERSHOT_5: - var_s5 = 2; + case PLAYERSHOT_TANK: + ticks = 2; break; } - for (i = 0; i < var_s5 && (shot->obj.status == 1); i++) { - if (shot->unk_64 > 0) { - shot->unk_64--; + for (i = 0; i < ticks && (shot->obj.status == SHOT_ACTIVE); i++) { + if (shot->timer > 0) { + shot->timer--; } D_ctx_80178498 = shot->obj.pos.z; D_ctx_801784A0 = shot->obj.pos.y; D_ctx_8017849C = shot->obj.pos.x; - func_beam_8003D54C(shot, i); + PlayerShot_UpdateShot(shot, i); } break; - case 2: - func_beam_8003AFD8(shot); + case SHOT_HITMARK: + PlayerShot_UpdateHitmark(shot); break; } } -void PlayerShot_Update(void) { +void PlayerShot_UpdateAll(void) { s32 i; for (i = 0; i < ARRAY_COUNT(gPlayerShots); i++) { gPlayerShots[i].index = i; - func_beam_8003D854(&gPlayerShots[i]); + PlayerShot_Update(&gPlayerShots[i]); } } -void PlayerShot_Draw(void) { +void PlayerShot_DrawAll(void) { s32 i; for (i = 0; i < ARRAY_COUNT(gPlayerShots); i++) { gPlayerShots[i].index = i; - if (gPlayerShots[i].obj.status != 0) { + if (gPlayerShots[i].obj.status != SHOT_FREE) { if (!((gReflectY < 0) && (gPlayerShots[i].obj.rot.x < -10.0f))) { Matrix_Push(&gGfxMatrix); - func_beam_8003AF88(&gPlayerShots[i]); + PlayerShot_Draw(&gPlayerShots[i]); Matrix_Pop(&gGfxMatrix); } if (gReflectY > 0) { - func_edisplay_8005F290(gPlayerShots[i].sfxSource, &D_beam_8015F950); + Object_SetSfxSourceToView(gPlayerShots[i].sfxSource, &sShotViewPos); } } } diff --git a/src/engine/fox_boss.c b/src/engine/fox_boss.c index 476ff09b..6fd971af 100644 --- a/src/engine/fox_boss.c +++ b/src/engine/fox_boss.c @@ -32,7 +32,7 @@ void Boss_AwardBonus(Boss* boss) { yOffset = 0.0f; if (boss->obj.id == OBJ_BOSS_292) { yOffset = 300.0f; - } else if (boss->obj.id == OBJ_BOSS_306) { + } else if (boss->obj.id == OBJ_BOSS_TI) { yOffset = 200.0f; } BonusText_Display(boss->obj.pos.x, boss->obj.pos.y + yOffset, boss->obj.pos.z, bonus); @@ -59,11 +59,11 @@ void Boss300_Update(Boss300* this) { void Boss300_Draw(Boss300* this) { } -void Boss_SetupActor189(Actor* actor, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7, f32 arg8, - f32 arg9, f32 argA, s32 argB, s32 argC) { +void Boss_SetupDebris(Actor* actor, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7, f32 arg8, + f32 arg9, f32 argA, s32 argB, s32 argC) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_189; + actor->obj.id = OBJ_ACTOR_DEBRIS; actor->state = argB; actor->obj.pos.x = arg1; actor->obj.pos.y = arg2; @@ -83,13 +83,13 @@ void Boss_SetupActor189(Actor* actor, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f3 } } -void Boss_SpawnActor189(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7, f32 arg8, - f32 arg9, s32 argA, s32 argB) { +void Boss_SpawnDebris(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7, f32 arg8, + f32 arg9, s32 argA, s32 argB) { s32 i; for (i = (ARRAY_COUNT(gActors)) - 1; i >= 0; i--) { if (gActors[i].obj.status == OBJ_FREE) { - Boss_SetupActor189(&gActors[i], arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, argA, argB); + Boss_SetupDebris(&gActors[i], arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, argA, argB); return; } } diff --git a/src/engine/fox_context.c b/src/engine/fox_context.c index 2b52d35d..dc11cf2e 100644 --- a/src/engine/fox_context.c +++ b/src/engine/fox_context.c @@ -88,7 +88,7 @@ LevelId gCurrentLevel; s32 gLevelPhase; s32 gBossActive; s32 D_ctx_8017828C; -s32 D_ctx_80178294; +s32 gUseDynaFloor; s32 gRadioState; s32 gCurrentRadioPortrait; s32 gRadioStateTimer; diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index ee4aed90..a6165cf5 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -521,7 +521,7 @@ void Cutscene_EnterWarpZone(Player* player) { if (player->csTimer <= 100) { if (player->csTimer == 100) { - func_play_800A6028(player->sfxSource, NA_SE_ARWING_WARP_DASH); + Play_PlaySfxFirstPlayer(player->sfxSource, NA_SE_ARWING_WARP_DASH); player->unk_194 = 5.0f; player->unk_190 = 5.0f; } @@ -589,7 +589,7 @@ void Cutscene_EnterWarpZone(Player* player) { gLevelPhase = 1; D_display_800CA230 = 0.15f; AUDIO_PLAY_SFX(NA_SE_WARP_OUT, gDefaultSfxSource, 0); - func_play_800AB334(); + Play_InitLevel(); } } break; @@ -644,7 +644,7 @@ void Cutscene_LevelStart(Player* player) { switch (gCurrentLevel) { case LEVEL_CORNERIA: Corneria_LevelStart(player); - func_play_800AA800(player); + Player_FloorCheck(player); break; case LEVEL_METEO: @@ -657,7 +657,7 @@ void Cutscene_LevelStart(Player* player) { case LEVEL_TITANIA: Titania_LevelStart(player); - func_play_800AA800(player); + Player_FloorCheck(player); break; case LEVEL_ZONESS: @@ -678,7 +678,7 @@ void Cutscene_LevelStart(Player* player) { case LEVEL_VENOM_1: Venom1_LevelStart(player); - func_play_800AA800(player); + Player_FloorCheck(player); break; case LEVEL_AQUAS: @@ -694,22 +694,22 @@ void Cutscene_LevelStart(Player* player) { switch (gCurrentLevel) { case LEVEL_FORTUNA: AllRange_FortunaIntro(player); - func_play_800AA800(player); + Player_FloorCheck(player); break; case LEVEL_VENOM_2: Venom2_LevelStart(player); - func_play_800AA800(player); + Player_FloorCheck(player); break; case LEVEL_BOLSE: Bolse_LevelStart(player); - func_play_800AA800(player); + Player_FloorCheck(player); break; case LEVEL_KATINA: Katina_LevelStart(player); - func_play_800AA800(player); + Player_FloorCheck(player); break; case LEVEL_SECTOR_Z: @@ -945,7 +945,7 @@ void Cutscene_AllRangeMode(Player* player) { player->rockPhase += 8.0f; player->rockAngle = SIN_DEG(player->rockPhase); - func_play_800AA800(player); + Player_FloorCheck(player); } void Cutscene_CoComplete2(Player* player) { @@ -1307,7 +1307,7 @@ void Cutscene_CoComplete2(Player* player) { case 1255: player->csState = 3; player->csTimer = 10; - func_play_800A6028(player->sfxSource, NA_SE_ARWING_BOOST); + Play_PlaySfxFirstPlayer(player->sfxSource, NA_SE_ARWING_BOOST); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); break; @@ -1371,27 +1371,27 @@ void Cutscene_LevelComplete(Player* player) { Area6_LevelComplete(player); } else if (gCurrentLevel == LEVEL_FORTUNA) { Cutscene_FortunaComplete(player); - func_play_800AA800(player); + Player_FloorCheck(player); } else if (gCurrentLevel == LEVEL_BOLSE) { Bolse_LevelComplete(player); - func_play_800AA800(player); + Player_FloorCheck(player); } else if (gCurrentLevel == LEVEL_SECTOR_Z) { SectorZ_LevelComplete(player); } else if (gCurrentLevel == LEVEL_KATINA) { Katina_LevelComplete(player); - func_play_800AA800(player); + Player_FloorCheck(player); } else if (gCurrentLevel == LEVEL_SECTOR_Y) { SectorY_LevelComplete(player); - func_play_800AA800(player); + Player_FloorCheck(player); } else if (gCurrentLevel == LEVEL_SOLAR) { Solar_LevelComplete(player); - func_play_800AA800(player); + Player_FloorCheck(player); } else if (gCurrentLevel == LEVEL_ZONESS) { Zoness_LevelComplete(player); - func_play_800AA800(player); + Player_FloorCheck(player); } else if (gCurrentLevel == LEVEL_VENOM_2) { Venom2_LevelComplete(player); - func_play_800AA800(player); + Player_FloorCheck(player); } else if (gCurrentLevel == LEVEL_METEO) { if (gLevelPhase == 0) { Meteo_LevelComplete(player); @@ -1400,15 +1400,15 @@ void Cutscene_LevelComplete(Player* player) { } } else if ((gCurrentLevel == LEVEL_CORNERIA) && (gLevelMode == LEVELMODE_ALL_RANGE)) { Corneria_LevelComplete1(player); - func_play_800AA800(player); + Player_FloorCheck(player); } else { if (gCsFrameCount == 170) { AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); } Cutscene_CoComplete2(player); - func_play_800AA800(player); + Player_FloorCheck(player); } - func_play_800B2130(player); + Player_UpdateArwingRoll(player); break; case FORM_LANDMASTER: @@ -1514,7 +1514,7 @@ void Cutscene_UTurn(Player* player) { player->zRotBank = -180.0f; } player->csState = 3; - func_play_800A5FA0(player->sfxSource, NA_SE_ARWING_BOOST, player->num); + Player_PlaySfx(player->sfxSource, NA_SE_ARWING_BOOST, player->num); player->unk_194 = 7.0f; player->unk_190 = 7.0f; } @@ -1587,11 +1587,11 @@ void Cutscene_UTurn(Player* player) { player->pos.z += player->vel.z; player->trueZpos = player->pos.z; - func_play_800B2574(player); - func_play_800B2130(player); - func_play_800AD7F0(player); - func_play_800AA800(player); - func_play_800A46A0(player); + Player_ArwingBoost(player); + Player_UpdateArwingRoll(player); + Player_Shoot(player); + Player_FloorCheck(player); + Player_DamageEffects(player); } void func_demo_8004D3C8(s32 arg0) { @@ -1612,7 +1612,7 @@ void Cutscene_KillPlayer(Player* player) { Audio_StopPlayerNoise(player->num); Audio_KillSfxBySourceAndId(player->sfxSource, NA_SE_ARWING_DOWN); - func_play_800A5FA0(player->sfxSource, NA_SE_ARWING_EXPLOSION, player->num); + Player_PlaySfx(player->sfxSource, NA_SE_ARWING_EXPLOSION, player->num); player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->csTimer = 70; player->timer_224 = 20; @@ -1653,11 +1653,11 @@ void Cutscene_KillPlayer(Player* player) { gLifeCount[gPlayerNum] -= 1; } } else { - if (player->unk_288 > 0) { - D_ctx_80177DD0[player->unk_288 - 1][D_ctx_80177DB8[player->unk_288 - 1]] = player->num; - D_ctx_80177DB8[player->unk_288 - 1] += 1; - if (gVsPointsToWin == D_ctx_80177DB8[player->unk_288 - 1]) { - player->unk_288 = -1; + if (player->attacker > 0) { + D_ctx_80177DD0[player->attacker - 1][D_ctx_80177DB8[player->attacker - 1]] = player->num; + D_ctx_80177DB8[player->attacker - 1] += 1; + if (gVsPointsToWin == D_ctx_80177DB8[player->attacker - 1]) { + player->attacker = -1; if (player->unk_284 == 0) { func_effect_8007C688(player->pos.x, player->pos.y, player->trueZpos, 3.0f, 1000); } @@ -1728,7 +1728,7 @@ void func_demo_8004D828(Player* player) { player->vel.y = 10.0f; player->csState = 1; - func_play_800A6070(player->sfxSource, NA_SE_EXPLOSION_S); + Play_PlaySfxNoPlayer(player->sfxSource, NA_SE_EXPLOSION_S); if ((gCurrentLevel == LEVEL_CORNERIA) || (gCurrentLevel == LEVEL_FORTUNA)) { func_enmy_80062C38(player->pos.x, player->pos.z); @@ -1737,12 +1737,12 @@ void func_demo_8004D828(Player* player) { } if (player->wings.rightState == WINGSTATE_INTACT) { - func_play_800A69F8(1, player->hit1.x, player->hit1.y, player->hit1.z); + Play_SpawnDebris(1, player->hit1.x, player->hit1.y, player->hit1.z); player->wings.rightState = WINGSTATE_BROKEN; func_effect_8007D0E0(player->hit1.x, player->hit1.y, player->hit1.z, 2.0f); } if (player->wings.leftState == WINGSTATE_INTACT) { - func_play_800A69F8(0, player->hit2.x, player->hit2.y, player->hit2.z); + Play_SpawnDebris(0, player->hit2.x, player->hit2.y, player->hit2.z); player->wings.leftState = WINGSTATE_BROKEN; func_effect_8007D0E0(player->hit2.x, player->hit2.y, player->hit2.z, 2.0f); } @@ -1759,11 +1759,11 @@ void func_demo_8004D828(Player* player) { } if (gLevelType == LEVELTYPE_PLANET) { for (i = 0; i < 4; i++) { - func_play_800A69F8(2, player->pos.x, player->pos.y, player->trueZpos); + Play_SpawnDebris(2, player->pos.x, player->pos.y, player->trueZpos); } for (i = 0; i < 2; i++) { - func_play_800A69F8(3, player->pos.x, player->pos.y, player->trueZpos); + Play_SpawnDebris(3, player->pos.x, player->pos.y, player->trueZpos); } } func_effect_8007D0E0(player->pos.x, player->pos.y, player->trueZpos, 5.0f); @@ -1790,14 +1790,14 @@ void func_demo_8004D828(Player* player) { if ((gLevelType == LEVELTYPE_PLANET) || (gCurrentLevel == LEVEL_BOLSE)) { player->cam.eye.y = (player->pos.y * player->unk_148) + dest.y; player->cam.eye.y -= player->unk_02C - 50.0f; - player->cam.at.y = (player->pos.y * player->unk_14C) + 20.0f + (player->unk_060 * 5.0f); + player->cam.at.y = (player->pos.y * player->unk_14C) + 20.0f + (player->xRock * 5.0f); } else { player->cam.eye.y = player->pos.y + dest.y; player->cam.at.y = player->pos.y; } if (gVersusMode != 0) { - func_play_800AE278(player); + Player_CheckBounds360(player); } } @@ -1838,19 +1838,19 @@ void func_demo_8004DEF8(Player* player) { player->radioDamageTimer = 0; player->vel.y = 10.0f; player->csState = 1; - func_play_800A6070(player->sfxSource, NA_SE_EXPLOSION_S); + Play_PlaySfxNoPlayer(player->sfxSource, NA_SE_EXPLOSION_S); if (gCurrentLevel == LEVEL_CORNERIA) { func_enmy_80062C38(player->pos.x, player->pos.z); } if (player->wings.rightState == WINGSTATE_INTACT) { - func_play_800A69F8(1, player->hit1.x, player->hit1.y, player->hit1.z); + Play_SpawnDebris(1, player->hit1.x, player->hit1.y, player->hit1.z); player->wings.rightState = WINGSTATE_NONE; func_effect_8007D0E0(player->hit1.x, player->hit1.y, player->hit1.z, 2.0f); } if (player->wings.leftState == WINGSTATE_INTACT) { - func_play_800A69F8(0, player->hit2.x, player->hit2.y, player->hit2.z); + Play_SpawnDebris(0, player->hit2.x, player->hit2.y, player->hit2.z); player->wings.leftState = WINGSTATE_NONE; func_effect_8007D0E0(player->hit2.x, player->hit2.y, player->hit2.z, 2.0f); } @@ -1867,11 +1867,11 @@ void func_demo_8004DEF8(Player* player) { 0.0f, 0.0f, 0.0f, 3.0f, 20); if (gLevelType == LEVELTYPE_PLANET) { for (i = 0; i < 2; i++) { - func_play_800A69F8(2, player->pos.x, player->pos.y, player->trueZpos); + Play_SpawnDebris(2, player->pos.x, player->pos.y, player->trueZpos); } for (i = 0; i < 4; i++) { - func_play_800A69F8(4, player->pos.x, player->pos.y, player->trueZpos); + Play_SpawnDebris(4, player->pos.x, player->pos.y, player->trueZpos); } } Cutscene_KillPlayer(player); @@ -1903,10 +1903,10 @@ void Cutscene_PlayerDown(Player* player) { func_demo_8004D828(player); } else { func_demo_8004DEF8(player); - func_play_800ADF58(player); + Player_UpdatePath(player); } - func_play_800A8BA4(player); - func_play_800AA800(player); + Player_CollisionCheck(player); + Player_FloorCheck(player); break; case FORM_LANDMASTER: @@ -2111,7 +2111,7 @@ void func_demo_8004EBD0(ActorCutscene* this) { if (this->timer_0BC == 0) { this->state++; this->timer_0BC = 10; - func_play_800A6028(this->sfxSource, NA_SE_ARWING_BOOST); + Play_PlaySfxFirstPlayer(this->sfxSource, NA_SE_ARWING_BOOST); this->fwork[29] = 5.0f; } break; diff --git a/src/engine/fox_display.c b/src/engine/fox_display.c index b96f13bf..e725bd51 100644 --- a/src/engine/fox_display.c +++ b/src/engine/fox_display.c @@ -871,7 +871,7 @@ void func_display_80054E80(Player* player) { Vec3f spA0 = { -30.0f, -10.0f, 30.0f }; Vec3f sp94; Vec3f sp88; - u8 var_v1; + u8 laserStrength; f32 sp80; if (gChargeTimers[player->num] > 10) { @@ -936,11 +936,11 @@ void func_display_80054E80(Player* player) { Matrix_Push(&gGfxMatrix); RCP_SetupDL(&gMasterDisp, 0x43); Matrix_Copy(gCalcMatrix, &D_display_80161418[player->num]); - var_v1 = gLaserStrength[player->num]; + laserStrength = gLaserStrength[player->num]; if (player->wings.unk_14 > -8.0f) { - var_v1 = LASERS_SINGLE; + laserStrength = LASERS_SINGLE; } - switch (var_v1) { + switch (laserStrength) { case LASERS_SINGLE: gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 192, 255, 192, 128); gDPSetEnvColor(gMasterDisp++, 64, 255, 64, 128); @@ -959,7 +959,7 @@ void func_display_80054E80(Player* player) { break; case LASERS_TWIN: case LASERS_HYPER: - if (var_v1 == LASERS_TWIN) { + if (laserStrength == LASERS_TWIN) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 192, 255, 192, 128); gDPSetEnvColor(gMasterDisp++, 64, 255, 64, 128); } else { @@ -1424,7 +1424,7 @@ void func_display_80057504(void) { for (i = 0; i < gCamCount; i++) { if (gLockOnTargetViewPos[i].z < 0.0f) { - var_fs0 = (VEC3F_MAG(&gLockOnTargetViewPos[i])); + var_fs0 = VEC3F_MAG(&gLockOnTargetViewPos[i]); if (var_fs0 < 20000.0f) { var_fs0 *= 0.0015f; if (var_fs0 > 100.0f) { @@ -1453,7 +1453,6 @@ void func_display_80057504(void) { } } for (j = 0; j < gCamCount; j++) { - gLockOnTargetViewPos[j].x = gLockOnTargetViewPos[j].y = 0.f; gLockOnTargetViewPos[j].z = 100.0f; } @@ -1469,7 +1468,7 @@ void func_display_80057814(Player* player) { sp2C.x = player->sfxSource[0]; sp2C.y = player->sfxSource[1]; sp2C.z = player->sfxSource[2]; - func_edisplay_8005F0E8(player->sfxSource, &sp20); + Object_SetSfxSourceToPos(player->sfxSource, &sp20); player->sfxVel[0] = player->sfxSource[0] - sp2C.x; player->sfxVel[1] = player->sfxSource[1] - sp2C.y; player->sfxVel[2] = player->sfxSource[2] - sp2C.z; @@ -1558,7 +1557,7 @@ void Play_Draw(void) { Matrix_RotateZ(gGfxMatrix, -(f32) gGameFrameCount * 10.0f * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 1.0f + D_display_800CA230, 1.0f - D_display_800CA230, 1.0f, MTXF_APPLY); Matrix_Push(&gGfxMatrix); - func_play_800B73E0(player); + Camera_SetupLights(player); Lights_SetOneLight(&gMasterDisp, gLight1x, gLight1y, gLight1z, gLight1R, gLight1G, gLight1B, gAmbientR, gAmbientG, gAmbientB); if (gLevelMode == LEVELMODE_ON_RAILS) { @@ -1606,8 +1605,8 @@ void Play_Draw(void) { Matrix_MultVec3f(gCalcMatrix, &tempVec, &playerCamUp); if (gStarCount != 0) { gStarfieldRoll = DEG_TO_RAD(gPlayer[0].camRoll); - func_play_800B6F50(gPlayerCamEye.x, gPlayerCamEye.y, gPlayerCamEye.z, gPlayerCamAt.x, gPlayerCamAt.y, - gPlayerCamAt.z); + Camera_SetStarfieldPos(gPlayerCamEye.x, gPlayerCamEye.y, gPlayerCamEye.z, gPlayerCamAt.x, gPlayerCamAt.y, + gPlayerCamAt.z); Background_DrawStarfield(); } Background_DrawBackdrop(); @@ -1657,12 +1656,12 @@ void Play_Draw(void) { Object_Draw(1); TexturedLine_Draw(); gReflectY = 1; - PlayerShot_Draw(); + PlayerShot_DrawAll(); if ((gGroundSurface == SURFACE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) { Matrix_Push(&gGfxMatrix); Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, MTXF_APPLY); gReflectY = -1; - PlayerShot_Draw(); + PlayerShot_DrawAll(); Matrix_Pop(&gGfxMatrix); } gReflectY = -1; @@ -1727,7 +1726,7 @@ void Play_Draw(void) { } } if ((gLevelMode == LEVELMODE_UNK_2) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { - Turret_801A6164(gPlayer); + Turret_Draw(gPlayer); } Background_DrawLensFlare(); if ((gCamCount != 1) && diff --git a/src/engine/fox_edata_info.c b/src/engine/fox_edata_info.c index dbb7726c..86581a25 100644 --- a/src/engine/fox_edata_info.c +++ b/src/engine/fox_edata_info.c @@ -282,7 +282,7 @@ ObjectInfo gObjectInfo[] = { /* OBJ_ACTOR_186 */ {(void*) func_edisplay_8005B7CC, 1, (ObjectFunc) Meteo_8018795C, D_ME_602F724, 200.0f, 0, 1, 39, 0, 1.0f, 1 }, /* OBJ_ACTOR_187 */ {(void*) D_ME_6018450, 0, (ObjectFunc) Meteo_801877C4, D_ME_602F740, 200.0f, 0, 1, 39, 0, 1.0f, 1 }, /* OBJ_ACTOR_188 */ {(void*) Aquas_801BEC74, 1, (ObjectFunc) Aquas_801BEC68, D_AQ_6030BE0, 200.0f, 0, 1, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_189 */ {(void*) Actor189_Draw, 1, (ObjectFunc) Actor189_Update, gNoHitbox, 0.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_ACTOR_DEBRIS */ {(void*) ActorDebris_Draw, 1, (ObjectFunc) ActorDebris_Update, gNoHitbox, 0.0f, 0, 0, 39, 0, 0.0f, 0 }, /* OBJ_ACTOR_190 */ {(void*) func_edisplay_8005B848, 1, (ObjectFunc) func_enmy_800656D4, gActor190_191Hitbox, 100.0f, 0, 1, 39, 0, 1.0f, 0 }, /* OBJ_ACTOR_191 */ {(void*) func_edisplay_8005B848, 1, (ObjectFunc) func_enmy_800656D4, gActor190_191Hitbox, 100.0f, 0, 1, 39, 0, 1.0f, 0 }, /* OBJ_ACTOR_192 */ {(void*) func_edisplay_8005B9A4, 1, (ObjectFunc) func_enmy_8006654C, D_CO_603E54C, 200.0f, 0, 1, 39, 0, 50.0f, 1 }, @@ -394,25 +394,25 @@ ObjectInfo gObjectInfo[] = { /* OBJ_BOSS_298 */ {(void*) Meteo_801887D0, 1, (ObjectFunc) Meteo_80188344, D_ME_602FA50, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_299 */ {(void*) Boss299_Draw, 2, (ObjectFunc) Boss299_Update, gNoHitbox, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_300 */ {(void*) Boss300_Draw, 1, (ObjectFunc) Boss300_Update, gNoHitbox, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_301 */ {(void*) Aquas_801BEC5C, 1, (ObjectFunc) Aquas_801BEC50, D_AQ_6030B10, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_A6 */ {(void*) Area6_8018C54C, 1, (ObjectFunc) Area6_80187944, D_A6_6028454, 2000.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_301 */ {(void*) Aquas_Boss301_Draw, 1, (ObjectFunc) Aquas_Boss301_Update, D_AQ_6030B10, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_A6 */ {(void*) Area6_Boss_Draw, 1, (ObjectFunc) Area6_Boss_Update, D_A6_6028454, 2000.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_303 */ {(void*) SectorX_80193434, 2, (ObjectFunc) SectorX_80190078, D_SX_6032550, 20000.0f, 0, 0, 20, 0, 0.0f, 10 }, /* OBJ_BOSS_304 */ {(void*) SectorX_8018FF84, 2, (ObjectFunc) SectorX_8018FE38, D_SX_6032488, 1000.0f, 0, 0, 20, 0, 0.0f, 10 }, /* OBJ_BOSS_305 */ {(void*) SectorX_80190020, 2, (ObjectFunc) SectorX_8018FF20, D_SX_60324EC, 1000.0f, 0, 0, 20, 0, 0.0f, 10 }, - /* OBJ_BOSS_306 */ {(void*) Titania_801982A8, 1, (ObjectFunc) Titania_80197A94,D_TI_801B83A8, 1000.0f, 0, 0, 40, 1, 0.0f, 10 }, - /* OBJ_BOSS_ZO */ {(void*) Zoness_801949DC, 2, (ObjectFunc) Zoness_80194A84, D_ZO_602C044, 1000.0f, 0, 0, 40, 0, 1.0f, 10 }, - /* OBJ_BOSS_308 */ {(void*) func_hud_8008FE78, 1, (ObjectFunc) func_hud_800907C4, D_FO_600FFE0, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, + /* OBJ_BOSS_TI */ {(void*) Titania_Boss_Draw, 1, (ObjectFunc) Titania_Boss_Update,D_TI_801B83A8, 1000.0f, 0, 0, 40, 1, 0.0f, 10 }, + /* OBJ_BOSS_ZO */ {(void*) Zoness_Boss_Draw, 2, (ObjectFunc) Zoness_Boss_Update, D_ZO_602C044, 1000.0f, 0, 0, 40, 0, 1.0f, 10 }, + /* OBJ_BOSS_FO */ {(void*) HUD_BossFO_Draw, 1, (ObjectFunc) HUD_BossFO_Update, D_FO_600FFE0, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_309 */ {(void*) Boss309_Draw, 1, (ObjectFunc) Boss309_Update, gNoHitbox, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_310 */ {(void*) Boss310_Draw, 1, (ObjectFunc) Boss310_Update, gNoHitbox, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_311 */ {(void*) Bolse_80191AFC, 2, (ObjectFunc) Bolse_801912FC, D_BO_6011C80, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, - /* OBJ_BOSS_312 */ {(void*) Venom2_80196288, 2, (ObjectFunc) Venom2_80196210, D_VE2_60166F4, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, - /* OBJ_BOSS_313 */ {(void*) SectorZ_8019E98C, 1, (ObjectFunc) SectorZ_8019E454, D_SZ_6009388, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_314 */ {(void*) SectorY_8019E2C4, 2, (ObjectFunc) SectorY_8019C888, gNoHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_SO */ {(void*) Solar_801A71B8, 2, (ObjectFunc) Solar_801A5B3C, gNoHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_316 */ {(void*) Katina_BossDraw, 1, (ObjectFunc) Katina_BossUpdate, D_KA_6011058, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_317 */ {(void*) Katina_Base_Draw, 1, (ObjectFunc) Katina_BaseUpdate, D_KA_601115C, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, - /* OBJ_BOSS_AQ */ {(void*) Aquas_801B4D84, 2, (ObjectFunc) Aquas_801B134C, D_AQ_6030F74, 10000.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_319 */ {(void*) Venom1_801985E4, 1, (ObjectFunc) Venom1_80194398,D_VE1_8019A9B8, 3000.0f, 0, 0, 40, 1, 0.0f, 10 }, + /* OBJ_BOSS_VE2 */ {(void*) Venom2_Boss_Draw, 2, (ObjectFunc) Venom2_Boss_Update, D_VE2_60166F4, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, + /* OBJ_BOSS_SZ */ {(void*) SectorZ_Boss_Draw, 1, (ObjectFunc) SectorZ_Boss_Update, D_SZ_6009388, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_SY */ {(void*) SectorY_Boss_Draw, 2, (ObjectFunc) SectorY_Boss_Update, gNoHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_SO */ {(void*) Solar_Boss_Draw, 2, (ObjectFunc) Solar_Boss_Update, gNoHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_KA */ {(void*) Katina_BossDraw, 1, (ObjectFunc) Katina_BossUpdate, D_KA_6011058, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_KA_BASE */ {(void*) Katina_Base_Draw, 1, (ObjectFunc) Katina_BaseUpdate, D_KA_601115C, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, + /* OBJ_BOSS_AQ */ {(void*) Aquas_Boss_Draw, 2, (ObjectFunc) Aquas_Boss_Update, D_AQ_6030F74, 10000.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_VE1 */ {(void*) Venom1_Boss_Draw, 1, (ObjectFunc) Venom1_Boss_Update,D_VE1_8019A9B8, 3000.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_320 */ {(void*) Andross_801928C8, 2, (ObjectFunc) Andross_8018DBF0, D_ANDROSS_C038DC0, 10000.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_321 */ {(void*) Andross_8018B8C0, 1, (ObjectFunc) Andross_80189B70, D_ANDROSS_C038F24, 10000.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_ITEM_LASERS */ {(void*) ItemLasers_Draw, 1, (ObjectFunc) ItemLasers_Update, gItemLasersHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, diff --git a/src/engine/fox_edisplay.c b/src/engine/fox_edisplay.c index 8be8cda3..0d315d6e 100644 --- a/src/engine/fox_edisplay.c +++ b/src/engine/fox_edisplay.c @@ -236,7 +236,7 @@ Gfx* D_edisplay_800CFC64[] = { D_AQ_6023940, D_AQ_6023D70, D_AQ_60249C0, D_AQ_60 Gfx* D_edisplay_800CFC7C[] = { D_ZO_601B570, D_ZO_601B710, D_ZO_60209B0, D_ZO_6020B70, D_ZO_6020D50, D_ZO_601B8F0, D_ZO_601B3B0, D_ZO_601B1C0, D_ZO_6011660 }; -void Actor189_Draw(Actor189* this) { +void ActorDebris_Draw(ActorDebris* this) { switch (this->state) { case 0: Matrix_Translate(gGfxMatrix, 18.0f, 15.0f, -15.0f, MTXF_APPLY); @@ -412,7 +412,7 @@ void Actor189_Draw(Actor189* this) { gSPDisplayList(gMasterDisp++, D_VE1_8019A008[this->unk_048]); break; default: - if (this->state > 9) { + if (this->state >= 10) { if (this->state == 36) { gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); } @@ -669,7 +669,7 @@ void func_edisplay_8005BAB4(ObjectId objId, s32 index) { case OBJ_BOSS_292: gSPDisplayList(gMasterDisp++, D_CO_6034B90); break; - case OBJ_BOSS_316: + case OBJ_BOSS_KA: if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) { RCP_SetupDL(&gMasterDisp, 0x40); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 200); @@ -754,7 +754,7 @@ void func_edisplay_8005BAB4(ObjectId objId, s32 index) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); break; - case OBJ_BOSS_319: + case OBJ_BOSS_VE1: Venom1_80198310(&gBosses[index]); break; } @@ -1016,10 +1016,10 @@ void Actor_DrawOnRails(Actor* this) { } if (this->info.drawType == 0) { gSPDisplayList(gMasterDisp++, this->info.dList); - func_edisplay_8005F1EC(this->sfxSource); + Object_UpdateSfxSource(this->sfxSource); } else { this->info.draw(&this->obj); - func_edisplay_8005F1EC(this->sfxSource); + Object_UpdateSfxSource(this->sfxSource); if (((this->obj.id == OBJ_ACTOR_TEAM_BOSS) || ((this->obj.id == OBJ_ACTOR_SLIPPY_SX) && (this->unk_0B6 > 0))) && (gReflectY > 0)) { @@ -1114,7 +1114,7 @@ void Actor_DrawAllRange(Actor* this) { } if (!sDrewActor) { this->lockOnTimers[gPlayerNum] = 0; - if ((this->obj.id == OBJ_ACTOR_189) || (this->obj.id == OBJ_ACTOR_286)) { + if ((this->obj.id == OBJ_ACTOR_DEBRIS) || (this->obj.id == OBJ_ACTOR_286)) { Object_Kill(&this->obj, this->sfxSource); } } @@ -1127,7 +1127,7 @@ void Actor_DrawAllRange(Actor* this) { } } } - func_edisplay_8005F290(this->sfxSource, &sViewPos); + Object_SetSfxSourceToView(this->sfxSource, &sViewPos); this->iwork[24] = sDrewActor; } @@ -1137,7 +1137,7 @@ void Boss_Draw(Boss* this, s32 arg1) { f32 var_fv0; f32 var_fv1; f32 sp3C; - Vec3f sp30 = { 0.0f, 0.0f, 0.0f }; + Vec3f origin = { 0.0f, 0.0f, 0.0f }; if (this->info.unk_19 != 0) { this->obj.pos.y += this->unk_068 + gCameraShakeY; @@ -1146,14 +1146,14 @@ void Boss_Draw(Boss* this, s32 arg1) { } else { func_edisplay_8005D1F0(&this->obj, this->info.drawType); } - Matrix_MultVec3f(&D_edisplay_801615F0, &sp30, &D_edisplay_801615D0); - func_edisplay_8005F290(this->sfxSource, &D_edisplay_801615D0); - if ((this->obj.id == OBJ_BOSS_316) || (this->obj.id == OBJ_BOSS_317)) { + Matrix_MultVec3f(&D_edisplay_801615F0, &origin, &D_edisplay_801615D0); + Object_SetSfxSourceToView(this->sfxSource, &D_edisplay_801615D0); + if ((this->obj.id == OBJ_BOSS_KA) || (this->obj.id == OBJ_BOSS_KA_BASE)) { var_fa1 = 6000.0f; var_fv0 = 6000.0f; var_ft5 = 0.9f; var_fv1 = -20000.0f; - } else if (this->obj.id == OBJ_BOSS_313) { + } else if (this->obj.id == OBJ_BOSS_SZ) { var_fv1 = -25000.0f; var_ft5 = 0.7f; var_fa1 = 3000.0f; @@ -1170,7 +1170,7 @@ void Boss_Draw(Boss* this, s32 arg1) { if (fabsf(D_edisplay_801615D0.y) < (fabsf(D_edisplay_801615D0.z * var_ft5) + var_fa1)) { sp3C = 1.0f; if (this->obj.id != OBJ_BOSS_309) { - if (this->obj.id != OBJ_BOSS_316) { + if (this->obj.id != OBJ_BOSS_KA) { Display_SetSecondLight(&this->obj.pos); } if (this->info.drawType != 2) { @@ -1243,7 +1243,7 @@ void Effect_DrawAllRange(Effect* this) { } } } - func_edisplay_8005F290(this->sfxSource, &sp40); + Object_SetSfxSourceToView(this->sfxSource, &sp40); if (!drawn && (this->obj.id != OBJ_EFFECT_352) && (this->obj.id != OBJ_EFFECT_373) && (!gVersusMode)) { Object_Kill(&this->obj, this->sfxSource); } @@ -1275,7 +1275,7 @@ void Item_Draw(Item* this, s32 arg1) { } } } - func_edisplay_8005F290(this->sfxSource, &sp38); + Object_SetSfxSourceToView(this->sfxSource, &sp38); if (!drawn && (gLevelMode == LEVELMODE_ALL_RANGE) && (gCamCount == 1) && (this->obj.id < OBJ_ITEM_GOLD_RING) && (gCurrentLevel != LEVEL_VENOM_ANDROSS)) { Object_Kill(&this->obj, this->sfxSource); @@ -1329,7 +1329,7 @@ void Object_DrawShadow(s32 index, Object* obj) { Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundHeight + 2.0f + gActors[index].fwork[0], obj->pos.z + gPathProgress, MTXF_APPLY); break; - case OBJ_BOSS_316: + case OBJ_BOSS_KA: Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundHeight + 2.0f + gCameraShakeY, obj->pos.z, MTXF_APPLY); break; default: @@ -1341,7 +1341,7 @@ void Object_DrawShadow(s32 index, Object* obj) { Matrix_Scale(gGfxMatrix, 1.0f, 0.0f, 1.0f, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, obj->rot.y * M_DTOR, MTXF_APPLY); } - if ((obj->id < OBJ_BOSS_292) && (obj->id != OBJ_ACTOR_230) && (obj->id != OBJ_ACTOR_229) && + if ((obj->id < OBJ_ACTOR_MAX) && (obj->id != OBJ_ACTOR_230) && (obj->id != OBJ_ACTOR_229) && (obj->id != OBJ_ACTOR_231)) { Matrix_RotateX(gGfxMatrix, obj->rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, obj->rot.z * M_DTOR, MTXF_APPLY); @@ -1372,7 +1372,7 @@ void Object_ClampSfxSource(f32* sfxSrc) { } } -void func_edisplay_8005F0E8(f32* sfxSrc, Vec3f* pos) { +void Object_SetSfxSourceToPos(f32* sfxSrc, Vec3f* pos) { Vec3f sp2C; Vec3f sp20; @@ -1392,15 +1392,15 @@ void func_edisplay_8005F0E8(f32* sfxSrc, Vec3f* pos) { Object_ClampSfxSource(sfxSrc); } -void func_edisplay_8005F1EC(f32* sfxSrc) { - Vec3f sp2C = { 0.0f, 0.0f, 0.0f }; +void Object_UpdateSfxSource(f32* sfxSrc) { + Vec3f origin = { 0.0f, 0.0f, 0.0f }; Vec3f sp20; s32 pad; if (gCamCount != 1) { sfxSrc[0] = sfxSrc[1] = sfxSrc[2] = 0.0f; } else { - Matrix_MultVec3f(&D_edisplay_801615F0, &sp2C, &sp20); + Matrix_MultVec3f(&D_edisplay_801615F0, &origin, &sp20); sfxSrc[0] = sp20.x; sfxSrc[1] = sp20.y; sfxSrc[2] = sp20.z; @@ -1408,13 +1408,13 @@ void func_edisplay_8005F1EC(f32* sfxSrc) { Object_ClampSfxSource(sfxSrc); } -void func_edisplay_8005F290(f32* sfxSrc, Vec3f* pos) { +void Object_SetSfxSourceToView(f32* sfxSrc, Vec3f* viewPos) { if (gCamCount != 1) { sfxSrc[0] = sfxSrc[1] = sfxSrc[2] = 0.0f; } else { - sfxSrc[0] = pos->x; - sfxSrc[1] = pos->y; - sfxSrc[2] = pos->z; + sfxSrc[0] = viewPos->x; + sfxSrc[1] = viewPos->y; + sfxSrc[2] = viewPos->z; } Object_ClampSfxSource(sfxSrc); } @@ -1577,7 +1577,7 @@ void Object_DrawAll(s32 arg0) { Matrix_Push(&gGfxMatrix); Scenery_Draw(scenery, arg0); Matrix_Pop(&gGfxMatrix); - func_edisplay_8005F1EC(scenery->sfxSource); + Object_UpdateSfxSource(scenery->sfxSource); } } } @@ -1697,7 +1697,7 @@ void Effect_DrawAll(s32 arg0) { Matrix_Push(&gGfxMatrix); Effect_DrawOnRails(effect, arg0); Matrix_Pop(&gGfxMatrix); - func_edisplay_8005F1EC(effect->sfxSource); + Object_UpdateSfxSource(effect->sfxSource); if (effect->obj.id == OBJ_EFFECT_374) { Matrix_Push(&gGfxMatrix); Object_DrawShadow(i, &effect->obj); diff --git a/src/engine/fox_effect.c b/src/engine/fox_effect.c index 28b90e71..238f71fe 100644 --- a/src/engine/fox_effect.c +++ b/src/engine/fox_effect.c @@ -1167,7 +1167,7 @@ void func_effect_8007B040(Effect* effect) { f32 sp2C; s32 sp28; - if (func_play_800A73E4(&sp2C, &sp28, effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z)) { + if (Play_CheckDynaFloorCollision(&sp2C, &sp28, effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z)) { D_ctx_801782EC[sp28] = effect->scale1; D_ctx_801782EC[sp28 + 1] = effect->scale1 * 0.7f; D_ctx_801782EC[sp28 - 1] = effect->scale1 * 0.7f; @@ -1580,7 +1580,7 @@ void func_effect_8007C1AC(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { func_effect_8007BF64(&gEffects[i], xPos, yPos, zPos, xVel, yVel, zVel, scale2, timer50); - func_play_800A6070(gEffects[i].sfxSource, NA_SE_EXPLOSION_S); + Play_PlaySfxNoPlayer(gEffects[i].sfxSource, NA_SE_EXPLOSION_S); break; } } @@ -2192,8 +2192,8 @@ void func_effect_8007DB70(Effect* effect) { func_effect_8007BFFC(effect->obj.pos.x, effect->obj.pos.y + 30.0f, effect->obj.pos.z, 0.0f, 0.0f, 0.0f, 4.0f, 5); if ((effect->obj.pos.y < (gGroundHeight + 10.0f)) || (gGroundSurface != SURFACE_WATER)) { - func_beam_800365E4(effect->obj.pos.x, 3.0f, effect->obj.pos.z, effect->obj.pos.x, effect->obj.pos.z, - 0.0f, 0.0f, 90.0f, 5.0f, 0, 0); + PlayerShot_SpawnEffect344(effect->obj.pos.x, 3.0f, effect->obj.pos.z, effect->obj.pos.x, + effect->obj.pos.z, 0.0f, 0.0f, 90.0f, 5.0f, 0, 0); break; } } @@ -3637,8 +3637,8 @@ void func_effect_80081C5C(Effect* effect) { effect->vel.y -= 1.0f; - if ((func_play_800A73E4(&posYOut, &unusedOut, effect->obj.pos.x, effect->obj.pos.y, - effect->obj.pos.z)) || + if ((Play_CheckDynaFloorCollision(&posYOut, &unusedOut, effect->obj.pos.x, effect->obj.pos.y, + effect->obj.pos.z)) || (effect->timer_50 == 0)) { func_effect_8007B228(effect->obj.pos.x, posYOut, effect->obj.pos.z, effect->scale2); Object_Kill(&effect->obj, effect->sfxSource); diff --git a/src/engine/fox_enmy.c b/src/engine/fox_enmy.c index ac6ad445..13cce9b7 100644 --- a/src/engine/fox_enmy.c +++ b/src/engine/fox_enmy.c @@ -73,7 +73,7 @@ u32 gWarpRingSfx[] = { NA_SE_WARP_RING_6, NA_SE_WARP_RING_7, NA_SE_WARP_RING_7, NA_SE_WARP_RING_7, }; -void func_enmy_80060F30(f32* pos, u32 sfxId, s32 shotSource) { +void Object_PlayerSfx(f32* pos, u32 sfxId, s32 playerNum) { PRINTF("CHIME SET \n"); PRINTF("BOMB SET 1\n"); PRINTF("BOMB SET 2\n"); @@ -82,7 +82,7 @@ void func_enmy_80060F30(f32* pos, u32 sfxId, s32 shotSource) { if (!gVersusMode) { AUDIO_PLAY_SFX(sfxId, gDefaultSfxSource, 4); } else { - AUDIO_PLAY_SFX(sfxId, pos, shotSource); + AUDIO_PLAY_SFX(sfxId, pos, playerNum); } } @@ -411,7 +411,7 @@ void Object_Load(ObjectInit* objInit, f32 xMax, f32 xMin, f32 yMax, f32 yMin) { if ((xMax > objInit->xPos - gPlayer[0].xPath) && (objInit->xPos - gPlayer[0].xPath > xMin) && (yMax > objInit->yPos - gPlayer[0].yPath) && (objInit->yPos - gPlayer[0].yPath > yMin)) { - if (objInit->id < OBJ_SPRITE_CO_POLE) { + if (objInit->id < OBJ_SCENERY_MAX) { for (i = 0; i < ARRAY_COUNT(gScenery); i++) { if (gScenery[i].obj.status == OBJ_FREE) { Scenery_Load(&gScenery[i], objInit); @@ -419,7 +419,7 @@ void Object_Load(ObjectInit* objInit, f32 xMax, f32 xMin, f32 yMax, f32 yMin) { } } } - if ((objInit->id >= OBJ_SPRITE_CO_POLE) && (objInit->id < OBJ_ACTOR_176)) { + if ((objInit->id >= OBJ_SPRITE_START) && (objInit->id < OBJ_SPRITE_MAX)) { for (i = 0; i < ARRAY_COUNT(gSprites); i++) { if (gSprites[i].obj.status == OBJ_FREE) { Sprite_Load(&gSprites[i], objInit); @@ -427,7 +427,7 @@ void Object_Load(ObjectInit* objInit, f32 xMax, f32 xMin, f32 yMax, f32 yMin) { } } } - if ((objInit->id >= OBJ_ACTOR_176) && (objInit->id < OBJ_BOSS_292)) { + if ((objInit->id >= OBJ_ACTOR_START) && (objInit->id < OBJ_ACTOR_MAX)) { if ((objInit->id == OBJ_ACTOR_267) || (objInit->id == OBJ_ACTOR_254)) { for (i = ARRAY_COUNT(gActors) - 1; i >= 0; i--) { if (gActors[i].obj.status == OBJ_FREE) { @@ -451,7 +451,7 @@ void Object_Load(ObjectInit* objInit, f32 xMax, f32 xMin, f32 yMax, f32 yMin) { } } } - if ((objInit->id >= OBJ_BOSS_292) && (objInit->id < OBJ_ITEM_LASERS)) { + if ((objInit->id >= OBJ_BOSS_START) && (objInit->id < OBJ_BOSS_MAX)) { for (i = 0; i < ARRAY_COUNT(gBosses); i++) { if (gBosses[i].obj.status == OBJ_FREE) { Boss_Load(&gBosses[i], objInit); @@ -459,7 +459,7 @@ void Object_Load(ObjectInit* objInit, f32 xMax, f32 xMin, f32 yMax, f32 yMin) { } } } - if ((objInit->id >= OBJ_ITEM_LASERS) && (objInit->id < OBJ_EFFECT_FIRE_SMOKE)) { + if ((objInit->id >= OBJ_ITEM_START) && (objInit->id < OBJ_ITEM_MAX)) { for (i = 0; i < ARRAY_COUNT(gItems); i++) { if (gItems[i].obj.status == OBJ_FREE) { Item_Load(&gItems[i], objInit); @@ -467,7 +467,7 @@ void Object_Load(ObjectInit* objInit, f32 xMax, f32 xMin, f32 yMax, f32 yMin) { } } } - if (objInit->id >= OBJ_EFFECT_FIRE_SMOKE && objInit->id <= OBJ_UNK_406) { + if (objInit->id >= OBJ_EFFECT_START && objInit->id <= OBJ_ID_MAX) { switch (objInit->id) { case OBJ_UNK_403: D_MA_801BA1E8 = 99; @@ -493,7 +493,7 @@ void Object_Load(ObjectInit* objInit, f32 xMax, f32 xMin, f32 yMax, f32 yMin) { break; } } - if (objInit->id > OBJ_UNK_406) { + if (objInit->id > OBJ_ID_MAX) { for (i = 0; i < ARRAY_COUNT(gActors); i++) { if (gActors[i].obj.status == OBJ_FREE) { ActorEvent_Load(&gActors[i], objInit, i); @@ -570,8 +570,10 @@ void Object_LoadLevelObjects(void) { gLastPathChange = 0; for (i = 0, objInit = &gLevelObjects[gObjectLoadIndex]; i < 10000; i++, gObjectLoadIndex++, objInit++) { - if ((objInit->id > OBJ_INVALID) && gPathProgress <= objInit->zPos1 && - objInit->zPos1 <= gPathProgress + 200.0f) { + if (objInit->id <= OBJ_INVALID) { + break; + } + if (((gPathProgress <= objInit->zPos1) && (objInit->zPos1 <= gPathProgress + 200.0f))) { if ((gCurrentLevel == LEVEL_VENOM_1) && (objInit->id >= ACTOR_EVENT_ID)) { if (((objInit->rot.y < 180.0f) && (objInit->xPos < gPlayer[0].xPath)) || ((objInit->rot.y > 180.0f) && (gPlayer[0].xPath < objInit->xPos))) { @@ -747,15 +749,15 @@ bool Object_CheckPolyCollision(Vec3f* pos, Vec3f* vel, ObjectId objId, Object* o objPos.y = obj->pos.y; objPos.z = obj->pos.z; if ((objId == OBJ_ACTOR_180) || (objId == OBJ_SCENERY_149) || (objId == OBJ_SCENERY_150) || - (objId == OBJ_BOSS_308) || (objId == OBJ_BOSS_313) || (objId == OBJ_BOSS_312) || (objId == OBJ_BOSS_309) || + (objId == OBJ_BOSS_FO) || (objId == OBJ_BOSS_SZ) || (objId == OBJ_BOSS_VE2) || (objId == OBJ_BOSS_309) || (objId == OBJ_SCENERY_ME_TUNNEL)) { colId = COL1_0; - if (objId == OBJ_BOSS_312) { + if (objId == OBJ_BOSS_VE2) { colId = COL1_9; } if (objId == OBJ_SCENERY_ME_TUNNEL) { colId = COL1_1; - } else if (objId == OBJ_BOSS_308) { + } else if (objId == OBJ_BOSS_FO) { colId = COL1_4; } else if (objId == OBJ_BOSS_309) { colId = COL1_7; @@ -763,7 +765,7 @@ bool Object_CheckPolyCollision(Vec3f* pos, Vec3f* vel, ObjectId objId, Object* o colId = COL1_5; } else if (objId == OBJ_SCENERY_150) { colId = COL1_6; - } else if (objId == OBJ_BOSS_313) { + } else if (objId == OBJ_BOSS_SZ) { colId = COL1_8; } if (func_col1_800998FC(&relPos, &objPos, vel, colId, &sp44, sp30) > 0) { @@ -859,8 +861,8 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) { boss = gBosses; for (i = 0; i < ARRAY_COUNT(gBosses); i++, boss++) { if (boss->obj.status == OBJ_ACTIVE) { - if ((boss->obj.id == OBJ_BOSS_308) || (boss->obj.id == OBJ_BOSS_312) || - (boss->obj.id == OBJ_BOSS_313) || (boss->obj.id == OBJ_BOSS_309)) { + if ((boss->obj.id == OBJ_BOSS_FO) || (boss->obj.id == OBJ_BOSS_VE2) || + (boss->obj.id == OBJ_BOSS_SZ) || (boss->obj.id == OBJ_BOSS_309)) { if (Object_CheckPolyCollision(pos, vel, boss->obj.id, &boss->obj)) { return 2; } @@ -873,7 +875,7 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) { return 2; } } else { - if (boss->obj.id == OBJ_BOSS_316) { + if (boss->obj.id == OBJ_BOSS_KA) { temp.x = fabsf(boss->obj.pos.x - pos->x); temp.y = fabsf(boss->obj.pos.y - 300.0f - pos->y) * 7.42f; temp.z = fabsf(boss->obj.pos.z - pos->z); @@ -1188,10 +1190,10 @@ void Object_Init(s32 index, ObjectId objId) { case OBJ_BOSS_320: Andross_Boss320_Init(&gBosses[index]); break; - case OBJ_BOSS_316: + case OBJ_BOSS_KA: Katina_BossSetup(&gBosses[index]); break; - case OBJ_BOSS_314: + case OBJ_BOSS_SY: SectorY_Boss314_Init(&gBosses[index]); break; case OBJ_ACTOR_205: @@ -1273,7 +1275,7 @@ void Object_Init(s32 index, ObjectId objId) { case OBJ_SPRITE_TI_CACTUS: Titania_8018EFF0(&gSprites[index]); break; - case OBJ_BOSS_306: + case OBJ_BOSS_TI: Titania_Boss306_Init(&gBosses[index]); break; case OBJ_ACTOR_240: @@ -1318,7 +1320,7 @@ void Object_Init(s32 index, ObjectId objId) { case OBJ_SCENERY_57: Titania_8018F0D8(&gScenery[index]); break; - case OBJ_BOSS_319: + case OBJ_BOSS_VE1: Venom1_Boss319_Init(&gBosses[index]); break; case OBJ_ACTOR_280: @@ -1961,30 +1963,30 @@ void Item_SpinPickup(Item* this) { this->obj.rot.y = Math_ModF(this->obj.rot.y, 360.0f); } -void func_enmy_80067348(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 arg6, f32 arg7, f32 arg8) { +void Actor_SetupDebris70(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 xVel, f32 yVel, f32 zVel) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_189; + actor->obj.id = OBJ_ACTOR_DEBRIS; actor->state = 70; actor->obj.pos.x = xPos; actor->obj.pos.y = yPos; actor->obj.pos.z = zPos; actor->obj.rot.x = xRot; actor->obj.rot.y = yRot; - actor->vel.x = arg6; - actor->vel.y = arg7; - actor->vel.z = arg8; + actor->vel.x = xVel; + actor->vel.y = yVel; + actor->vel.z = zVel; actor->timer_0BC = RAND_INT(15.0f) + 25.0f; actor->gravity = 0.5f; Object_SetInfo(&actor->info, actor->obj.id); } -void func_enmy_800674B4(f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 arg5, f32 arg6, f32 arg7) { +void Actor_SpawnDebris70(f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 arg5, f32 arg6, f32 arg7) { s32 i; for (i = ARRAY_COUNT(gActors) - 1; i >= 50; i--) { if (gActors[i].obj.status == OBJ_FREE) { - func_enmy_80067348(&gActors[i], xPos, yPos, zPos, xRot, yRot, arg5, arg6, arg7); + Actor_SetupDebris70(&gActors[i], xPos, yPos, zPos, xRot, yRot, arg5, arg6, arg7); break; } } @@ -2022,10 +2024,10 @@ void ActorSupplies_Update(ActorSupplies* this) { } Actor_Despawn(this); for (i = 0; i < 6; i++) { - func_enmy_800674B4(D_enmy_800CFEC4[i].x + this->obj.pos.x, D_enmy_800CFEC4[i].y + this->obj.pos.y, - D_enmy_800CFEC4[i].z + this->obj.pos.z, D_enmy_800CFF0C[i].y + this->obj.rot.y, - D_enmy_800CFF0C[i].x + this->obj.rot.x, RAND_FLOAT_CENTERED(40.0f), - RAND_FLOAT(10.0f) + 10.0f, RAND_FLOAT_CENTERED(40.0f)); + Actor_SpawnDebris70(D_enmy_800CFEC4[i].x + this->obj.pos.x, D_enmy_800CFEC4[i].y + this->obj.pos.y, + D_enmy_800CFEC4[i].z + this->obj.pos.z, D_enmy_800CFF0C[i].y + this->obj.rot.y, + D_enmy_800CFF0C[i].x + this->obj.rot.x, RAND_FLOAT_CENTERED(40.0f), + RAND_FLOAT(10.0f) + 10.0f, RAND_FLOAT_CENTERED(40.0f)); func_effect_800794CC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0.6f); } Object_Kill(&this->obj, this->sfxSource); @@ -2078,7 +2080,7 @@ void Item1up_Update(Item1UP* this) { Item_SpinPickup(this); if (this->collected) { Object_Kill(&this->obj, this->sfxSource); - func_enmy_80060F30(gPlayer[this->playerNum].sfxSource, NA_SE_ONE_UP, this->playerNum); + Object_PlayerSfx(gPlayer[this->playerNum].sfxSource, NA_SE_ONE_UP, this->playerNum); if (gCurrentLevel != LEVEL_TRAINING) { gLifeCount[this->playerNum]++; } @@ -2101,8 +2103,8 @@ void ItemPickup_Update(Item* this) { this->timer_48 = 20; this->unk_50 = 60.0f; gBombCount[this->playerNum]++; - func_enmy_80060F30(gPlayer[this->playerNum].sfxSource, NA_SE_BOMB_GET, this->playerNum); - func_enmy_80060F30(gPlayer[this->playerNum].sfxSource, NA_SE_BOMB_GAUGE_UP, this->playerNum); + Object_PlayerSfx(gPlayer[this->playerNum].sfxSource, NA_SE_BOMB_GET, this->playerNum); + Object_PlayerSfx(gPlayer[this->playerNum].sfxSource, NA_SE_BOMB_GAUGE_UP, this->playerNum); } break; case OBJ_ITEM_LASERS: @@ -2116,7 +2118,7 @@ void ItemPickup_Update(Item* this) { if (gLaserStrength[this->playerNum] > LASERS_HYPER) { gLaserStrength[this->playerNum] = LASERS_HYPER; } - func_enmy_80060F30(gPlayer[this->playerNum].sfxSource, NA_SE_TWIN_LASER_GET, this->playerNum); + Object_PlayerSfx(gPlayer[this->playerNum].sfxSource, NA_SE_TWIN_LASER_GET, this->playerNum); if (gExpertMode) { gRightWingHealth[this->playerNum] = gLeftWingHealth[this->playerNum] = 10; } else { @@ -2168,13 +2170,13 @@ void ItemSupplyRing_Update(Item* this) { this->timer_48 = 50; if (this->obj.id == OBJ_ITEM_SILVER_RING) { gPlayer[this->playerNum].heal += 32; - func_enmy_80060F30(gPlayer[this->playerNum].sfxSource, NA_SE_SHIELD_RING, this->playerNum); + Object_PlayerSfx(gPlayer[this->playerNum].sfxSource, NA_SE_SHIELD_RING, this->playerNum); } else if (this->obj.id == OBJ_ITEM_GOLD_RING) { gGoldRingCount[0]++; if (gGoldRingCount[0] == 3) { - func_enmy_80060F30(gPlayer[this->playerNum].sfxSource, NA_SE_SHIELD_UPGRADE, this->playerNum); + Object_PlayerSfx(gPlayer[this->playerNum].sfxSource, NA_SE_SHIELD_UPGRADE, this->playerNum); } else if (gGoldRingCount[0] == 6) { - func_enmy_80060F30(gPlayer[this->playerNum].sfxSource, NA_SE_ONE_UP, this->playerNum); + Object_PlayerSfx(gPlayer[this->playerNum].sfxSource, NA_SE_ONE_UP, this->playerNum); if (gCurrentLevel != LEVEL_TRAINING) { gLifeCount[this->playerNum]++; } @@ -2183,11 +2185,11 @@ void ItemSupplyRing_Update(Item* this) { gPlayer[this->playerNum].trueZpos, BONUS_TEXT_1UP); } else { gPlayer[this->playerNum].heal += 32; - func_enmy_80060F30(gPlayer[this->playerNum].sfxSource, NA_SE_GOLD_RING, this->playerNum); + Object_PlayerSfx(gPlayer[this->playerNum].sfxSource, NA_SE_GOLD_RING, this->playerNum); } } else { gPlayer[this->playerNum].heal += 128; - func_enmy_80060F30(gPlayer[this->playerNum].sfxSource, NA_SE_SHIELD_RING_M, this->playerNum); + Object_PlayerSfx(gPlayer[this->playerNum].sfxSource, NA_SE_SHIELD_RING_M, this->playerNum); } } if ((this->obj.id == OBJ_ITEM_GOLD_RING) && (this->timer_48 == 1)) { @@ -2476,13 +2478,13 @@ void Object_Dying(s32 index, ObjectId objId) { case OBJ_ACTOR_192: func_enmy_8006684C(&gActors[index]); break; - case OBJ_BOSS_306: + case OBJ_BOSS_TI: Titania_801990DC(&gBosses[index]); break; case OBJ_ACTOR_232: Titania_8018B720(&gActors[index]); break; - case OBJ_BOSS_319: + case OBJ_BOSS_VE1: Venom1_80198594(&gBosses[index]); break; } diff --git a/src/engine/fox_enmy2.c b/src/engine/fox_enmy2.c index 333912ac..e24914f2 100644 --- a/src/engine/fox_enmy2.c +++ b/src/engine/fox_enmy2.c @@ -496,8 +496,44 @@ void func_enmy2_8006BF7C(f32 xPos, f32 yPos, f32 zPos) { } } +typedef enum DebrisType { + DEBRIS_0, + DEBRIS_1, + DEBRIS_2, + DEBRIS_3, + DEBRIS_4, + DEBRIS_10, + DEBRIS_34, + DEBRIS_35, + DEBRIS_36, + DEBRIS_37, + DEBRIS_38, // unused + DEBRIS_39, + DEBRIS_40, + DEBRIS_41, + DEBRIS_42, + DEBRIS_43, + DEBRIS_44, + DEBRIS_45, + DEBRIS_46, + DEBRIS_47, + DEBRIS_48, + DEBRIS_49, + DEBRIS_50, + DEBRIS_51, + DEBRIS_52, + DEBRIS_53, + DEBRIS_54, + DEBRIS_55, + DEBRIS_56, + DEBRIS_57, + DEBRIS_58, + DEBRIS_59, + DEBRIS_70 = 70, +} DebrisType; + static Vec3f D_800D0030 = { 0.0f, -10.0f, 0.0f }; // could be in-function -void Actor189_Update(Actor189* this) { +void ActorDebris_Update(ActorDebris* this) { f32 sp4C; f32 sp48; f32 sp44; @@ -534,7 +570,7 @@ void Actor189_Update(Actor189* this) { AUDIO_PLAY_SFX(NA_SE_OB_SAND_BOUND_S, this->sfxSource, 4); break; case 25: - AUDIO_PLAY_SFX(NA_SE_EN_BOSS_ATTACK, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_SAND_BOUND_M, this->sfxSource, 4); break; } } @@ -753,7 +789,7 @@ void Actor189_Update(Actor189* this) { Object_Kill(&this->obj, this->sfxSource); func_effect_8007A6F0(&this->obj.pos, NA_SE_EN_EXPLOSION_S); } - if (func_play_800A73E4(&sp44, &sp40, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z)) { + if (Play_CheckDynaFloorCollision(&sp44, &sp40, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z)) { func_effect_8007B228(this->obj.pos.x, sp44, this->obj.pos.z, 2.0f); Object_Kill(&this->obj, this->sfxSource); } @@ -856,8 +892,8 @@ void func_enmy2_8006D0F4(Actor* this) { for (j = 0; j < count; j++) { hitbox = (Hitbox*) hitboxData; - if (func_play_800A78C4(hitbox, gScenery[i].obj.pos.x, gScenery[i].obj.pos.y, gScenery[i].obj.pos.z, - temp_fs0, temp_fs1, temp_fs2)) { + if (Play_CheckSingleHitbox(hitbox, gScenery[i].obj.pos.x, gScenery[i].obj.pos.y, + gScenery[i].obj.pos.z, temp_fs0, temp_fs1, temp_fs2)) { D_ctx_80161A7C = 10; D_ctx_80161A80 = 10; D_ctx_80161A84 = 10; @@ -1643,7 +1679,7 @@ void ActorEvent_SpawnTIMine(f32 xPos, f32 yPos, f32 zPos) { void Actor_SetupPlayerShot(PlayerShotId objId, PlayerShot* shot, s32 actorId, 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->obj.status = SHOT_ACTIVE; shot->vel.z = zVel; shot->vel.x = xVel; @@ -1661,10 +1697,10 @@ void Actor_SetupPlayerShot(PlayerShotId objId, PlayerShot* shot, s32 actorId, f3 shot->unk_58 = 1; shot->unk_60 = 0; - if (objId == PLAYERSHOT_9) { - shot->unk_64 = 120; + if (objId == PLAYERSHOT_GFOX_LASER) { + shot->timer = 120; } else { - shot->unk_64 = 30; + shot->timer = 30; } shot->sourceId = actorId + NPC_SHOT_ID; @@ -1690,9 +1726,9 @@ void Actor_SpawnPlayerLaser(s32 actorId, f32 xPos, f32 yPos, f32 zPos, f32 xVel, s32 i; for (i = 0; i < 10; i++) { - if (gPlayerShots[i].obj.status == 0) { - Actor_SetupPlayerShot(PLAYERSHOT_1, &gPlayerShots[i], actorId, xPos, yPos, zPos, xVel, yVel, zVel, xRot, - yRot, zRot); + if (gPlayerShots[i].obj.status == SHOT_FREE) { + Actor_SetupPlayerShot(PLAYERSHOT_TWIN_LASER, &gPlayerShots[i], actorId, xPos, yPos, zPos, xVel, yVel, zVel, + xRot, yRot, zRot); break; } } @@ -1703,9 +1739,9 @@ void Actor_SpawnGreatFoxLaser(s32 actorId, f32 xPos, f32 yPos, f32 zPos, f32 xVe s32 i; for (i = 0; i < 10; i++) { - if (gPlayerShots[i].obj.status == 0) { - Actor_SetupPlayerShot(PLAYERSHOT_9, &gPlayerShots[i], actorId, xPos, yPos, zPos, xVel, yVel, zVel, xRot, - yRot, zRot); + if (gPlayerShots[i].obj.status == SHOT_FREE) { + Actor_SetupPlayerShot(PLAYERSHOT_GFOX_LASER, &gPlayerShots[i], actorId, xPos, yPos, zPos, xVel, yVel, zVel, + xRot, yRot, zRot); break; } } @@ -2003,8 +2039,8 @@ void ActorEvent_8006FEEC(ActorEvent* this) { if (this->health <= 0) { for (i = 3; i < 11; i++) { - Zoness_801900FC(&this->vwork[i], &this->vwork[i + 11], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(-10.0f), - RAND_FLOAT(10.0f), 41, this->scale, 200, i); + Zoness_SpawnDebris(&this->vwork[i], &this->vwork[i + 11], RAND_FLOAT_CENTERED(20.0f), + RAND_FLOAT(-10.0f), RAND_FLOAT(10.0f), 41, this->scale, 200, i); } this->itemDrop = DROP_NONE; Actor_Despawn(this); @@ -2117,10 +2153,10 @@ void ActorEvent_800701E0(ActorEvent* this) { if (this->unk_0B4 == EVID_2) { this->timer_04C = 1; if (this->obj.pos.x < this->hitPos.x) { - func_play_800A69F8(1, this->obj.pos.x + 20.0f, this->obj.pos.y, this->obj.pos.z); + Play_SpawnDebris(1, this->obj.pos.x + 20.0f, this->obj.pos.y, this->obj.pos.z); this->fwork[17] = 777.0f; } else { - func_play_800A69F8(0, this->obj.pos.x - 20.0f, this->obj.pos.y, this->obj.pos.z); + Play_SpawnDebris(0, this->obj.pos.x - 20.0f, this->obj.pos.y, this->obj.pos.z); this->fwork[18] = 777.0f; } } @@ -2552,7 +2588,7 @@ void ActorEvent_ProcessTriggers(ActorEvent* this) { case EVC_SHOT_CLOSE_150: for (i = 0; i < ARRAY_COUNT(gPlayerShots); i++) { - if ((gPlayerShots[i].obj.status == 1) && + if ((gPlayerShots[i].obj.status == SHOT_ACTIVE) && (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)) { @@ -2564,7 +2600,7 @@ void ActorEvent_ProcessTriggers(ActorEvent* this) { case EVC_SHOT_CLOSE_300: for (i = 0; i < ARRAY_COUNT(gPlayerShots); i++) { - if ((gPlayerShots[i].obj.status == 1) && + if ((gPlayerShots[i].obj.status == SHOT_ACTIVE) && (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)) { @@ -3454,7 +3490,7 @@ void ActorEvent_Update(ActorEvent* this) { break; case EVID_46: - if (func_play_800A73E4(&spEC, &spFC, this->obj.pos.x, -100.0f, this->obj.pos.z)) { + if (Play_CheckDynaFloorCollision(&spEC, &spFC, this->obj.pos.x, -100.0f, this->obj.pos.z)) { spF0 = 10.0f; if (Math_SmoothStepToF(&this->obj.pos.y, spEC, 0.5f, 7.0f, 0.0f) >= 0.0f) { @@ -4215,8 +4251,8 @@ void func_enmy2_800763A4(Actor* actor) { func_effect_8007D24C(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 2.2f); } - if ((D_ctx_80178294 != 0) && - func_play_800A73E4(&sp58, &sp5C, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z)) { + if (gUseDynaFloor && + Play_CheckDynaFloorCollision(&sp58, &sp5C, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z)) { func_effect_8007BFFC(actor->obj.pos.x, sp58 + 20.0f, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, actor->scale * 3.0f, 5); func_effect_8007B228(actor->obj.pos.x, sp58, actor->obj.pos.z, 2.0f); @@ -4271,11 +4307,11 @@ void func_enmy2_800763A4(Actor* actor) { if ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0B4 == EVID_2)) { if (actor->fwork[17] < 360.0f) { - func_play_800A69F8(1, actor->obj.pos.x + 20.0f, actor->obj.pos.y, actor->obj.pos.z); + Play_SpawnDebris(1, actor->obj.pos.x + 20.0f, actor->obj.pos.y, actor->obj.pos.z); actor->fwork[17] = 777.0f; } if (actor->fwork[18] < 360.0f) { - func_play_800A69F8(0, actor->obj.pos.x - 20.0f, actor->obj.pos.y, actor->obj.pos.z); + Play_SpawnDebris(0, actor->obj.pos.x - 20.0f, actor->obj.pos.y, actor->obj.pos.z); actor->fwork[18] = 777.0f; } } @@ -4291,8 +4327,8 @@ void func_enmy2_800763A4(Actor* actor) { 20); func_effect_8007ADF4(actor->obj.pos.x, gGroundHeight, actor->obj.pos.z, 0.1f, 3.0f); } else { - func_beam_800365E4(actor->obj.pos.x, 3.0f, actor->obj.pos.z, actor->obj.pos.x, - actor->obj.pos.z, 0.0f, 0.0f, 90.0f, 6.5f, 0, 0); + PlayerShot_SpawnEffect344(actor->obj.pos.x, 3.0f, actor->obj.pos.z, actor->obj.pos.x, + actor->obj.pos.z, 0.0f, 0.0f, 90.0f, 6.5f, 0, 0); } func_effect_8007C120(actor->obj.pos.x, 20.0f, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, actor->scale * 0.05f, 30); @@ -4317,7 +4353,7 @@ void func_enmy2_800763A4(Actor* actor) { for (var_s0 = 0; var_s0 < 4; var_s0++) { if (Rand_ZeroOne() < 0.7f) { if (gCurrentLevel == LEVEL_FORTUNA) { - func_play_800A69F8(4, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z); + Play_SpawnDebris(4, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z); } else { func_effect_800794CC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 1.0f); } @@ -4345,7 +4381,7 @@ void func_enmy2_800763A4(Actor* actor) { for (var_s0 = 0; var_s0 < 4; var_s0++) { if (Rand_ZeroOne() < 0.7f) { if (gCurrentLevel == LEVEL_FORTUNA) { - func_play_800A69F8(4, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z); + Play_SpawnDebris(4, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z); } else { func_effect_800794CC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 1.0f); } diff --git a/src/engine/fox_game.c b/src/engine/fox_game.c index 22116be2..5c9769f7 100644 --- a/src/engine/fox_game.c +++ b/src/engine/fox_game.c @@ -433,21 +433,21 @@ void Game_Update(void) { break; } SEQCMD_SET_SOUND_MODE(soundMode); - gVolumeSettings[0] = gSaveFile.save.data.musicVolume; - gVolumeSettings[1] = gSaveFile.save.data.voiceVolume; - gVolumeSettings[2] = gSaveFile.save.data.sfxVolume; - if (gVolumeSettings[0] > 99) { - gVolumeSettings[0] = 99; + gVolumeSettings[AUDIO_TYPE_MUSIC] = gSaveFile.save.data.musicVolume; + gVolumeSettings[AUDIO_TYPE_VOICE] = gSaveFile.save.data.voiceVolume; + gVolumeSettings[AUDIO_TYPE_SFX] = gSaveFile.save.data.sfxVolume; + if (gVolumeSettings[AUDIO_TYPE_MUSIC] > 99) { + gVolumeSettings[AUDIO_TYPE_MUSIC] = 99; } - if (gVolumeSettings[1] > 99) { - gVolumeSettings[1] = 99; + if (gVolumeSettings[AUDIO_TYPE_VOICE] > 99) { + gVolumeSettings[AUDIO_TYPE_VOICE] = 99; } - if (gVolumeSettings[2] > 99) { - gVolumeSettings[2] = 99; + if (gVolumeSettings[AUDIO_TYPE_SFX] > 99) { + gVolumeSettings[AUDIO_TYPE_SFX] = 99; } - Audio_SetVolume(0, gVolumeSettings[0]); - Audio_SetVolume(1, gVolumeSettings[1]); - Audio_SetVolume(2, gVolumeSettings[2]); + Audio_SetVolume(AUDIO_TYPE_MUSIC, gVolumeSettings[AUDIO_TYPE_MUSIC]); + Audio_SetVolume(AUDIO_TYPE_VOICE, gVolumeSettings[AUDIO_TYPE_VOICE]); + Audio_SetVolume(AUDIO_TYPE_SFX, gVolumeSettings[AUDIO_TYPE_SFX]); break; case GSTATE_TITLE: OvlMenu_CallFunction(OVLCALL_TITLE_UPDATE, NULL); @@ -556,7 +556,7 @@ void Game_Update(void) { } } -Actor* func_game_800A3608(ObjectId objId) { +Actor* Game_SpawnActor(ObjectId objId) { Actor* actor = gActors; s32 i; diff --git a/src/engine/fox_hud.c b/src/engine/fox_hud.c index b159dd8a..01502515 100644 --- a/src/engine/fox_hud.c +++ b/src/engine/fox_hud.c @@ -2668,10 +2668,9 @@ void func_hud_8008C104(u16* srcTexture, u16* dstTexture) { rowPhase = 0.0f; - i = halfHeight - 1; - - while (1) { - if ((rowPhase += 90.0f / halfHeight) > 90.0f) { + for (i = halfHeight - 1; true; i--) { + rowPhase += 90.0f / halfHeight; + if (rowPhase > 90.0f) { break; } @@ -2690,7 +2689,6 @@ void func_hud_8008C104(u16* srcTexture, u16* dstTexture) { buffer[(((halfHeight - i) + (halfHeight - 1)) * width) + j] = src[(((halfHeight - offset) + (halfHeight - 1)) * width) + j]; } - i--; } Texture_Mottle(dst, buffer, 2); } @@ -3423,7 +3421,7 @@ void func_hud_8008EA14(f32 x, f32 y) { break; } - if (gPlayerShots[15].obj.status == OBJ_FREE) { + if (gPlayerShots[15].obj.status == SHOT_FREE) { D_80161770 = D_80161774 = D_80161778 = 255.0f; D_8016177C = D_80161780 = 255.0f; D_80161784 = 0.0f; @@ -3649,7 +3647,7 @@ void HUD_Draw(void) { func_hud_80088970(); } -void func_hud_8008FE78(Boss* boss) { +void HUD_BossFO_Draw(Boss* boss) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gSPDisplayList(gMasterDisp++, D_FO_6003090); RCP_SetupDL_34(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); @@ -3674,12 +3672,7 @@ void func_hud_8008FFF0(Boss* boss, s32 arg1) { s32 i; f32 temp; s32 temp2; - - while (1) { - if (arg1 < 7000) { - break; - } - + if (arg1 >= 7000) { temp2 = arg1 - 7000; if (temp2 > 1596) { @@ -3703,7 +3696,6 @@ void func_hud_8008FFF0(Boss* boss, s32 arg1) { func_effect_8007BFFC(boss->obj.pos.x + D_800D21C8[i].x, boss->obj.pos.y + D_800D21C8[i].y, boss->obj.pos.z + D_800D21C8[i].z, 0.0f, 0.0f, 0.0f, 7.0f * temp, 10); } - break; } } @@ -3813,7 +3805,7 @@ s32 func_hud_80090200(Boss* boss) { return ret; } -void func_hud_800907C4(Boss* boss) { +void HUD_BossFO_Update(Boss* boss) { switch (boss->state) { case 0: if ((boss->fwork[1] == 255.0f) && (boss->fwork[2] == 212.0f)) { @@ -5215,7 +5207,7 @@ void HUD_AquasStart(Player* player) { player->cam.at.x = player->pos.x * (600.0f / player->pathWidth); player->cam.at.y = player->pos.y * (1050.0f / player->pathHeight); - player->cam.at.y += player->unk_060 * 10.0f; + player->cam.at.y += player->xRock * 10.0f; player->pos.z += 1000.0f; player->camRoll = 0.0f; @@ -5238,7 +5230,7 @@ void HUD_AquasStart(Player* player) { player->cam.at.z = gCsCamAtZ = 0.0f; case 6: - player->unk_060 = SIN_DEG(player->rockPhase * 0.7f) * 0.5f; + player->xRock = SIN_DEG(player->rockPhase * 0.7f) * 0.5f; player->bobPhase += 10.0f; player->rockPhase += 8.0f; player->yBob = -SIN_DEG(player->bobPhase) * 0.5f; @@ -5250,7 +5242,7 @@ void HUD_AquasStart(Player* player) { gCsCamAtX = player->pos.x * (600.0f / player->pathWidth); gCsCamAtY = player->pos.y * (750.0f / player->pathHeight); - gCsCamAtY += player->unk_060 * 10.0f; + gCsCamAtY += player->xRock * 10.0f; Math_SmoothStepToF(&player->pos.z, 0.0f, 0.1f, 40.0f, 0.1f); @@ -5957,7 +5949,7 @@ void HUD_AquasComplete(Player* player) { player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; - player->unk_060 = SIN_DEG(player->rockPhase * 0.7f) * 0.5f; + player->xRock = SIN_DEG(player->rockPhase * 0.7f) * 0.5f; player->bobPhase += 10.0f; player->rockPhase += 8.0f; player->yBob = -SIN_DEG(player->bobPhase) * 0.5f; @@ -6072,7 +6064,7 @@ void func_hud_80096A74(Player* player) { player->boostMeter = 1; player->csTimer = 60; - func_play_800B2574(player); + Player_ArwingBoost(player); gControllerRumbleFlags[0] = 0; gControllerHold[player->num].button = button; diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index fe62bd11..f8efcba7 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -25,9 +25,9 @@ UNK_TYPE D_800D2F50 = 0; // unused s32 D_800D2F54 = 0; f32 D_800D2F58 = 0.0f; -f32 D_800D2F5C = 0.0f; -f32 D_800D2F60 = 0.0f; -f32 D_800D2F64 = 0.0f; +f32 sMusicVolume = 0.0f; +f32 sVoiceVolume = 0.0f; +f32 sSfxVolume = 0.0f; u8 gVenomHardClear = 0; u8 D_800D2F6C[20] = { PLANET_CORNERIA, PLANET_METEO, PLANET_SECTOR_X, PLANET_AREA_6, PLANET_AREA_6, @@ -56,8 +56,9 @@ bool Play_CheckMedalStatus(u16 hitCount) { } } -void func_play_800A3FB0(void) { - D_800D2F64 = 0.0f; +// This sets a variable related to SFX volume to 0, but that variable is never read from +void Play_dummy_MuteSfx(void) { + sSfxVolume = 0.0f; } s32 Play_GetMaxShields(void) { @@ -67,7 +68,7 @@ s32 Play_GetMaxShields(void) { return 255; } -void func_play_800A3FEC(void) { +void Play_UpdateDynaFloor(void) { Vec3f spC4; Vec3f spB8; Vtx* spB4; @@ -142,15 +143,15 @@ void func_play_800A3FEC(void) { } } -void func_play_800A4460(Player* player) { +void Player_WingEffects(Player* player) { if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gBosses[0].obj.status == OBJ_ACTIVE) && (gBosses[0].state == 17)) { - player->unk_060 = SIN_DEG(player->rockPhase * 0.7f) * 0.5f; + player->xRock = SIN_DEG(player->rockPhase * 0.7f) * 0.5f; player->bobPhase += 13.0f; player->rockPhase += 20.0f; player->yBob = -SIN_DEG(player->bobPhase) * 5.0f; player->rockAngle = SIN_DEG(player->rockPhase) * 10.0f; } else { - player->unk_060 = SIN_DEG(player->rockPhase * 0.7f) * 0.5f; + player->xRock = SIN_DEG(player->rockPhase * 0.7f) * 0.5f; player->bobPhase += 10.0f; player->rockPhase += 8.0f; if ((gLevelType == LEVELTYPE_PLANET) || ((player->cockpitView == true) && (gLevelMode == LEVELMODE_ON_RAILS))) { @@ -164,7 +165,7 @@ void func_play_800A4460(Player* player) { } } -void func_play_800A46A0(Player* player) { +void Player_DamageEffects(Player* player) { s32 var_v1; f32 sp40; @@ -228,7 +229,7 @@ void func_play_800A46A0(Player* player) { } } -void func_play_800A4C40(Player* player) { +void Player_WaterEffects(Player* player) { Vec3f sp54 = { -65.0f, -22.0f, -65.0f }; Vec3f sp48 = { 65.0f, -22.0f, -65.0f }; Vec3f sp3C; @@ -273,7 +274,7 @@ void Scenery360_Initialize(Scenery360* scenery360) { } } -void func_play_800A4F7C(void) { +void Play_InitVsStage(void) { s16 temp_v0; s16 temp_v0_2; s32 var_s1; @@ -330,10 +331,10 @@ void func_play_800A4F7C(void) { } } -void func_play_800A5330(void) { +void Play_dummy_800A5330(void) { } -void func_play_800A5338(void) { +void Play_Setup360_CO(void) { Sprite* sprite; Scenery360* scenery360; s32 i; @@ -345,7 +346,7 @@ void func_play_800A5338(void) { if (gLevelObjects[j].id <= OBJ_INVALID) { break; } - if (gLevelObjects[j].id < OBJ_SPRITE_CO_POLE) { + if (gLevelObjects[j].id < OBJ_SCENERY_MAX) { Scenery360_Initialize(scenery360); scenery360->obj.status = OBJ_ACTIVE; scenery360->obj.id = gLevelObjects[j].id; @@ -386,7 +387,7 @@ void func_play_800A5338(void) { Object_SetInfo(&gBosses[i].info, gBosses[i].obj.id); } -void func_play_800A55B0(void) { +void Play_Setup360_SY(void) { Scenery360* scenery360; s32 i; s32 j; @@ -397,7 +398,7 @@ void func_play_800A55B0(void) { if (gLevelObjects[j].id <= OBJ_INVALID) { break; } - if (gLevelObjects[j].id < OBJ_SPRITE_CO_POLE) { + if (gLevelObjects[j].id < OBJ_SCENERY_MAX) { Scenery360_Initialize(scenery360); scenery360->obj.status = OBJ_ACTIVE; scenery360->obj.id = gLevelObjects[j].id; @@ -415,7 +416,7 @@ void func_play_800A55B0(void) { gBosses[i].obj.pos.x = 0.0f; gBosses[i].obj.pos.y = 0.0f; gBosses[i].obj.pos.z = 0.0f; - gBosses[i].obj.id = OBJ_BOSS_314; + gBosses[i].obj.id = OBJ_BOSS_SY; Object_SetInfo(&gBosses[i].info, gBosses[i].obj.id); i = 1; Boss_Initialize(&gBosses[i]); @@ -423,7 +424,7 @@ void func_play_800A55B0(void) { gBosses[i].obj.pos.x = 0.0f; gBosses[i].obj.pos.y = 0.0f; gBosses[i].obj.pos.z = 0.0f; - gBosses[i].obj.id = OBJ_BOSS_314; + gBosses[i].obj.id = OBJ_BOSS_SY; Object_SetInfo(&gBosses[i].info, gBosses[i].obj.id); i = 2; Boss_Initialize(&gBosses[i]); @@ -431,11 +432,11 @@ void func_play_800A55B0(void) { gBosses[i].obj.pos.x = 0.0f; gBosses[i].obj.pos.y = 0.0f; gBosses[i].obj.pos.z = 0.0f; - gBosses[i].obj.id = OBJ_BOSS_314; + gBosses[i].obj.id = OBJ_BOSS_SY; Object_SetInfo(&gBosses[i].info, gBosses[i].obj.id); } -void func_play_800A57E0(void) { +void Play_Setup360_AND(void) { s32 i = 0; // fake? Boss_Initialize(&gBosses[i]); @@ -479,7 +480,7 @@ Environment* D_800D2F98[21] = { &D_FO_600EA90, NULL, &D_KA_6011000, &D_BO_600FF30, &D_SZ_6006E70, &D_VE2_6014D50, &D_versus_302DD70, }; -void func_play_800A594C(void) { +void Play_InitEnvironment(void) { if (gVersusMode) { switch (gVersusStage) { case 0: @@ -528,7 +529,7 @@ void func_play_800A594C(void) { gFovY = 45.0f; } -void Play_SetupStarfield(void) { +void Play_GenerateStarfield(void) { u32 i; MEM_ARRAY_ALLOCATE(gStarOffsetsX, 1000); @@ -542,8 +543,8 @@ void Play_SetupStarfield(void) { } } -void func_play_800A5EBC(void) { - Play_SetupStarfield(); +void Play_SetupStarfield(void) { + Play_GenerateStarfield(); gGroundHeight = -25000.0f; gStarCount = 600; if (gCurrentLevel == LEVEL_AREA_6) { @@ -571,7 +572,7 @@ void func_play_800A5EBC(void) { } } -void func_play_800A5FA0(f32* sfxSrc, u32 sfxId, s32 mode) { +void Player_PlaySfx(f32* sfxSrc, u32 sfxId, s32 mode) { if (!gVersusMode) { AUDIO_PLAY_SFX(sfxId, sfxSrc, 0); } else { @@ -579,11 +580,11 @@ void func_play_800A5FA0(f32* sfxSrc, u32 sfxId, s32 mode) { } } -void func_play_800A6028(f32* sfxSrc, u32 sfxId) { +void Play_PlaySfxFirstPlayer(f32* sfxSrc, u32 sfxId) { AUDIO_PLAY_SFX(sfxId, sfxSrc, 0); } -void func_play_800A6070(f32* sfxSrc, u32 sfxId) { +void Play_PlaySfxNoPlayer(f32* sfxSrc, u32 sfxId) { AUDIO_PLAY_SFX(sfxId, sfxSrc, 4); } @@ -698,13 +699,13 @@ void Play_UpdateFillScreen(void) { } } -void func_play_800A668C(f32 xPos, f32 yPos, f32 zPos) { +void Play_SpawnHitmark(f32 xPos, f32 yPos, f32 zPos) { s32 i; for (i = 0; i < ARRAY_COUNT(gPlayerShots); i++) { - if (gPlayerShots[i].obj.status == 0) { + if (gPlayerShots[i].obj.status == SHOT_FREE) { PlayerShot_Initialize(&gPlayerShots[i]); - gPlayerShots[i].obj.status = 2; + gPlayerShots[i].obj.status = SHOT_HITMARK; gPlayerShots[i].unk_60 = 0; gPlayerShots[i].obj.pos.x = xPos; gPlayerShots[i].obj.pos.y = yPos; @@ -714,10 +715,10 @@ void func_play_800A668C(f32 xPos, f32 yPos, f32 zPos) { } } -void func_play_800A670C(Actor* actor, s32 state, f32 xPos, f32 yPos, f32 zPos) { +void Play_SetupDebris(Actor* actor, s32 state, f32 xPos, f32 yPos, f32 zPos) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_189; + actor->obj.id = OBJ_ACTOR_DEBRIS; actor->state = state; actor->obj.pos.x = xPos; actor->obj.pos.y = yPos; @@ -758,21 +759,21 @@ void func_play_800A670C(Actor* actor, s32 state, f32 xPos, f32 yPos, f32 zPos) { Object_SetInfo(&actor->info, actor->obj.id); } -void func_play_800A69F8(s32 state, f32 xPos, f32 yPos, f32 zPos) { +void Play_SpawnDebris(s32 state, f32 xPos, f32 yPos, f32 zPos) { s32 i; if (!gVersusMode) { for (i = ARRAY_COUNT(gActors) - 1; i >= 10; i--) { if (gActors[i].obj.status == OBJ_FREE) { - func_play_800A670C(&gActors[i], state, xPos, yPos, zPos); + Play_SetupDebris(&gActors[i], state, xPos, yPos, zPos); break; } } } } -// has to be int. s32 and u32 don't match -bool func_play_800A6A74(void) { +// Unused. Were gold rings in vs mode? +bool Player_CheckAllGoldRings(void) { return gGoldRingCount[0] && gGoldRingCount[1] && gGoldRingCount[2] && gGoldRingCount[3]; } @@ -783,11 +784,11 @@ void Player_DamageWings(Player* player, s32 side, s32 damage) { if (player->wings.rightState == WINGSTATE_INTACT) { gRightWingHealth[player->num] -= damage; if (gRightWingHealth[player->num] <= 0) { - func_play_800A69F8(1, player->hit1.x, player->hit1.y, player->hit1.z); + Play_SpawnDebris(1, player->hit1.x, player->hit1.y, player->hit1.z); player->wings.rightState = WINGSTATE_BROKEN; func_effect_8007D0E0(player->hit1.x, player->hit1.y, player->hit1.z, 2.0f); gRightWingDebrisTimer[player->num] = 50; - func_play_800A5FA0(player->sfxSource, NA_SE_ARWING_WING_BROKEN, player->num); + Player_PlaySfx(player->sfxSource, NA_SE_ARWING_WING_BROKEN, player->num); if (gAllRangeWingRepairTimer == 0) { gAllRangeWingRepairTimer = 1000; } @@ -798,11 +799,11 @@ void Player_DamageWings(Player* player, s32 side, s32 damage) { if (player->wings.leftState == WINGSTATE_INTACT) { gLeftWingHealth[player->num] -= damage; if (gLeftWingHealth[player->num] <= 0) { - func_play_800A69F8(0, player->hit2.x, player->hit2.y, player->hit2.z); + Play_SpawnDebris(0, player->hit2.x, player->hit2.y, player->hit2.z); player->wings.leftState = WINGSTATE_BROKEN; func_effect_8007D0E0(player->hit2.x, player->hit2.y, player->hit2.z, 2.0f); gLeftWingDebrisTimer[player->num] = 50; - func_play_800A5FA0(player->sfxSource, NA_SE_ARWING_WING_BROKEN, player->num); + Player_PlaySfx(player->sfxSource, NA_SE_ARWING_WING_BROKEN, player->num); if (gAllRangeWingRepairTimer == 0) { gAllRangeWingRepairTimer = 1000; } @@ -843,7 +844,7 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) { player->timer_498 = 20; } if (gHasShield[player->num]) { - func_play_800A5FA0(player->sfxSource, NA_SE_DAMAGE_S, player->num); + Player_PlaySfx(player->sfxSource, NA_SE_DAMAGE_S, player->num); gShieldTimer[player->num] = 5; gShieldAlpha[player->num] = 2.0f; player->damage = 0; @@ -856,9 +857,9 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) { } } if (damage < 25) { - func_play_800A5FA0(player->sfxSource, NA_SE_DAMAGE_S, player->num); + Player_PlaySfx(player->sfxSource, NA_SE_DAMAGE_S, player->num); } else { - func_play_800A5FA0(player->sfxSource, NA_SE_DAMAGE_L, player->num); + Player_PlaySfx(player->sfxSource, NA_SE_DAMAGE_L, player->num); } } Matrix_RotateY(gCalcMatrix, player->yRot_114 * M_DTOR, MTXF_NEW); @@ -879,7 +880,7 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) { player->knockback.x = sp38.x; player->knockback.y = sp38.y; player->knockback.z = sp38.z; - func_play_800A668C(player->hit1.x - player->vel.x, player->hit1.y, player->hit1.z - player->vel.z); + Play_SpawnHitmark(player->hit1.x - player->vel.x, player->hit1.y, player->hit1.z - player->vel.z); Player_DamageWings(player, 1, 20); break; case 2: @@ -890,12 +891,12 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) { player->knockback.x = sp38.x; player->knockback.y = sp38.y; player->knockback.z = sp38.z; - func_play_800A668C(player->hit2.x - player->vel.x, player->hit2.y, player->hit2.z - player->vel.z); + Play_SpawnHitmark(player->hit2.x - player->vel.x, player->hit2.y, player->hit2.z - player->vel.z); Player_DamageWings(player, 2, 20); break; case 3: player->timer_224 = 20; - func_play_800A668C(player->hit4.x - player->vel.x, player->hit4.y, player->hit4.z - player->vel.z); + Play_SpawnHitmark(player->hit4.x - player->vel.x, player->hit4.y, player->hit4.z - player->vel.z); if (player->form != FORM_LANDMASTER) { sp44.x = 0.0f; sp44.y = -sp34; @@ -912,7 +913,7 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) { break; case 4: player->timer_224 = 20; - func_play_800A668C(player->hit3.x - player->vel.x, player->hit3.y, player->hit3.z - player->vel.z); + Play_SpawnHitmark(player->hit3.x - player->vel.x, player->hit3.y, player->hit3.z - player->vel.z); sp44.x = 0.0f; sp44.y = sp34; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); @@ -940,7 +941,7 @@ f32 D_800D2FEC[5] = { 0.0f, 0.5f, -0.5f, 0.5f, -0.5f, }; -void func_play_800A729C(Player* player, u32 arg1, f32 arg2, f32 arg3) { +void Player_GroundedCollision(Player* player, u32 arg1, f32 arg2, f32 arg3) { player->unk_21C = arg1; switch (arg1) { case 1: @@ -970,7 +971,7 @@ void func_play_800A729C(Player* player, u32 arg1, f32 arg2, f32 arg3) { } } -bool func_play_800A73E4(f32* arg0, s32* arg1, f32 xPos, f32 yPos, f32 zPos) { +bool Play_CheckDynaFloorCollision(f32* arg0, s32* arg1, f32 xPos, f32 yPos, f32 zPos) { Vtx* spA4; u16* spA0; s32 sp9C; @@ -1060,7 +1061,7 @@ bool func_play_800A73E4(f32* arg0, s32* arg1, f32 xPos, f32 yPos, f32 zPos) { return false; } -bool func_play_800A78C4(Hitbox* hitbox, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6) { +bool Play_CheckSingleHitbox(Hitbox* hitbox, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6) { if ((fabsf(hitbox->z.offset + arg3 - arg6) < (hitbox->z.size + D_ctx_8017853C)) && (fabsf(hitbox->x.offset + arg1 - arg4) < (hitbox->x.size + D_ctx_8017853C)) && (fabsf(hitbox->y.offset + arg2 - arg5) < (hitbox->y.size + D_ctx_8017853C))) { @@ -1069,8 +1070,8 @@ bool func_play_800A78C4(Hitbox* hitbox, f32 arg1, f32 arg2, f32 arg3, f32 arg4, return false; } -s32 func_play_800A7974(Player* player, f32* hitboxData, s32* index, f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, - f32 zRot, f32 arg9, f32 argA, f32 argB) { +s32 Player_CheckHitboxCollision(Player* player, f32* hitboxData, s32* index, f32 xPos, f32 yPos, f32 zPos, f32 xRot, + f32 yRot, f32 zRot, f32 arg9, f32 argA, f32 argB) { s32 count; s32 i; f32 var_fv0; @@ -1120,7 +1121,7 @@ s32 func_play_800A7974(Player* player, f32* hitboxData, s32* index, f32 xPos, f3 var_fv1 = sp88.y + yPos; var_fa0 = sp88.z + zPos; } - if (func_play_800A78C4((Hitbox*) hitboxData, xPos, yPos, zPos, var_fv0, var_fv1, var_fa0)) { + if (Play_CheckSingleHitbox((Hitbox*) hitboxData, xPos, yPos, zPos, var_fv0, var_fv1, var_fa0)) { *index = i + 1; if (hitboxData[-1] == HITBOX_SHADOW) { return -1; @@ -1144,7 +1145,7 @@ s32 func_play_800A7974(Player* player, f32* hitboxData, s32* index, f32 xPos, f3 var_fv1 = sp88.y + yPos; var_fa0 = sp88.z + zPos; } - if (func_play_800A78C4((Hitbox*) hitboxData, xPos, yPos, zPos, var_fv0, var_fv1, var_fa0)) { + if (Play_CheckSingleHitbox((Hitbox*) hitboxData, xPos, yPos, zPos, var_fv0, var_fv1, var_fa0)) { *index = i + 1; return 4; } @@ -1161,7 +1162,7 @@ s32 func_play_800A7974(Player* player, f32* hitboxData, s32* index, f32 xPos, f3 var_fv1 = sp88.y + yPos; var_fa0 = sp88.z + zPos; } - if (func_play_800A78C4((Hitbox*) hitboxData, xPos, yPos, zPos, var_fv0, var_fv1, var_fa0)) { + if (Play_CheckSingleHitbox((Hitbox*) hitboxData, xPos, yPos, zPos, var_fv0, var_fv1, var_fa0)) { *index = i + 1; return 1; } @@ -1178,7 +1179,7 @@ s32 func_play_800A7974(Player* player, f32* hitboxData, s32* index, f32 xPos, f3 var_fv1 = sp88.y + yPos; var_fa0 = sp88.z + zPos; } - if (func_play_800A78C4((Hitbox*) hitboxData, xPos, yPos, zPos, var_fv0, var_fv1, var_fa0)) { + if (Play_CheckSingleHitbox((Hitbox*) hitboxData, xPos, yPos, zPos, var_fv0, var_fv1, var_fa0)) { *index = i + 1; return 2; } @@ -1188,8 +1189,8 @@ s32 func_play_800A7974(Player* player, f32* hitboxData, s32* index, f32 xPos, f3 return 0; } -bool func_play_800A8054(ObjectId objId, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, Vec3f* arg7, - Vec3f* arg8) { +bool Play_CheckPolyCollision(ObjectId objId, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, Vec3f* arg7, + Vec3f* arg8) { Vec3f sp54; Vec3f sp48; Vec3f sp3C; @@ -1220,10 +1221,10 @@ bool func_play_800A8054(ObjectId objId, f32 arg1, f32 arg2, f32 arg3, f32 arg4, case OBJ_SCENERY_150: colId = COL1_6; break; - case OBJ_BOSS_308: + case OBJ_BOSS_FO: colId = COL1_4; break; - case OBJ_BOSS_312: + case OBJ_BOSS_VE2: colId = COL1_9; break; case OBJ_BOSS_309: @@ -1232,7 +1233,7 @@ bool func_play_800A8054(ObjectId objId, f32 arg1, f32 arg2, f32 arg3, f32 arg4, case ACTOR_EVENT_ID: colId = COL1_3; break; - case OBJ_BOSS_313: + case OBJ_BOSS_SZ: colId = COL1_8; break; case OBJ_SCENERY_ME_TUNNEL: @@ -1374,7 +1375,8 @@ bool func_play_800A8054(ObjectId objId, f32 arg1, f32 arg2, f32 arg3, f32 arg4, } // arg5 could be Vec3f (not Vec3f*) -s32 func_play_800A8304(Player* player, ObjectId objId, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7) { +s32 Player_CheckPolyCollision(Player* player, ObjectId objId, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, + f32 arg7) { Vec3f sp84; Vec3f sp78; Vec3f sp6C; @@ -1394,8 +1396,8 @@ s32 func_play_800A8304(Player* player, ObjectId objId, f32 arg2, f32 arg3, f32 a sp78.y = player->pos.y - sp84.y; sp78.z = player->trueZpos - sp84.z; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp78, &sp6C); - if (func_play_800A8054(objId, sp84.x, sp84.y, sp84.z, sp6C.x + sp84.x, sp6C.y + sp84.y, sp6C.z + sp84.z, &sp60, - &sp54)) { + if (Play_CheckPolyCollision(objId, sp84.x, sp84.y, sp84.z, sp6C.x + sp84.x, sp6C.y + sp84.y, sp6C.z + sp84.z, + &sp60, &sp54)) { player->pos.y = sp60.y; player->rot_104.x = Math_RadToDeg(sp60.x); player->rot_104.z = Math_RadToDeg(sp60.z); @@ -1405,45 +1407,46 @@ s32 func_play_800A8304(Player* player, ObjectId objId, f32 arg2, f32 arg3, f32 a } player->grounded = true; return 5; + } else { + return 0; } - return 0; } sp78.x = player->hit3.x - sp84.x; sp78.y = player->hit3.y - sp84.y; sp78.z = player->hit3.z - sp84.z; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp78, &sp6C); - if (func_play_800A8054(objId, sp84.x, sp84.y, sp84.z, sp6C.x + sp84.x, sp6C.y + sp84.y, sp6C.z + sp84.z, &sp60, - &sp54)) { + if (Play_CheckPolyCollision(objId, sp84.x, sp84.y, sp84.z, sp6C.x + sp84.x, sp6C.y + sp84.y, sp6C.z + sp84.z, &sp60, + &sp54)) { return 3; } sp78.x = player->hit4.x - sp84.x; sp78.y = player->hit4.y - sp84.y; sp78.z = player->hit4.z - sp84.z; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp78, &sp6C); - if (func_play_800A8054(objId, sp84.x, sp84.y, sp84.z, sp6C.x + sp84.x, sp6C.y + sp84.y, sp6C.z + sp84.z, &sp60, - &sp54)) { + if (Play_CheckPolyCollision(objId, sp84.x, sp84.y, sp84.z, sp6C.x + sp84.x, sp6C.y + sp84.y, sp6C.z + sp84.z, &sp60, + &sp54)) { return 4; } sp78.x = player->hit1.x - sp84.x; sp78.y = player->hit1.y - sp84.y; sp78.z = player->hit1.z - sp84.z; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp78, &sp6C); - if (func_play_800A8054(objId, sp84.x, sp84.y, sp84.z, sp6C.x + sp84.x, sp6C.y + sp84.y, sp6C.z + sp84.z, &sp60, - &sp54)) { + if (Play_CheckPolyCollision(objId, sp84.x, sp84.y, sp84.z, sp6C.x + sp84.x, sp6C.y + sp84.y, sp6C.z + sp84.z, &sp60, + &sp54)) { return 1; } sp78.x = player->hit2.x - sp84.x; sp78.y = player->hit2.y - sp84.y; sp78.z = player->hit2.z - sp84.z; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp78, &sp6C); - if (func_play_800A8054(objId, sp84.x, sp84.y, sp84.z, sp6C.x + sp84.x, sp6C.y + sp84.y, sp6C.z + sp84.z, &sp60, - &sp54)) { + if (Play_CheckPolyCollision(objId, sp84.x, sp84.y, sp84.z, sp6C.x + sp84.x, sp6C.y + sp84.y, sp6C.z + sp84.z, &sp60, + &sp54)) { return 2; } return 0; } -void func_play_800A86E4(Player* player) { +void Player_CheckItemCollect(Player* player) { s32 i; Item* item; s32 sp6C; @@ -1452,8 +1455,8 @@ void func_play_800A86E4(Player* player) { if ((item->obj.status == OBJ_ACTIVE) && ((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (player->state_1C8 == PLAYERSTATE_1C8_U_TURN)) && (item->timer_4A == 0) && - func_play_800A7974(player, item->info.hitbox, &sp6C, item->obj.pos.x, item->obj.pos.y, item->obj.pos.z, - 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)) { + Player_CheckHitboxCollision(player, item->info.hitbox, &sp6C, item->obj.pos.x, item->obj.pos.y, + item->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f)) { item->collected = true; item->playerNum = gPlayerNum; } @@ -1483,15 +1486,15 @@ Vec3f D_800D30B8[4] = { { 20.0f, 0.0f, 0.0f }, }; -void func_play_800A8804(Player* playerA, Player* playerB) { +void Player_Collide(Player* playerA, Player* playerB) { if (playerA->timer_498 == 0) { Player_ApplyDamage(playerA, 0, D_800D3000[playerA->form][playerB->form]); - playerA->unk_288 = playerB->num + 1; - playerB->unk_288 = playerA->num + 1; + playerA->attacker = playerB->num + 1; + playerB->attacker = playerA->num + 1; } } -void func_play_800A887C(Player* player) { +void Player_UpdateHitbox(Player* player) { Vec3f sp3C; Matrix_Translate(gCalcMatrix, player->pos.x, player->pos.y, player->trueZpos, MTXF_NEW); @@ -1558,7 +1561,7 @@ void func_play_800A887C(Player* player) { } } -void func_play_800A8BA4(Player* player) { +void Player_CollisionCheck(Player* player) { s32 i; s32 j; s32 temp_v0; @@ -1581,7 +1584,7 @@ void func_play_800A8BA4(Player* player) { s32 sp90; f32 sp8C; - func_play_800A887C(player); + Player_UpdateHitbox(player); if (gGroundType == 4) { switch (player->form) { case FORM_LANDMASTER: @@ -1643,19 +1646,20 @@ void func_play_800A8BA4(Player* player) { (scenery360->obj.id == OBJ_SCENERY_150) || (scenery360->obj.id == OBJ_SCENERY_148) || (scenery360->obj.id == OBJ_SCENERY_160) || (scenery360->obj.id == OBJ_SCENERY_1) || (scenery360->obj.id == OBJ_SCENERY_3) || (scenery360->obj.id == OBJ_SCENERY_140)) { - temp_v0 = - func_play_800A8304(player, scenery360->obj.id, scenery360->obj.pos.x, - scenery360->obj.pos.y, scenery360->obj.pos.z, scenery360->obj.rot.x, - scenery360->obj.rot.y, scenery360->obj.rot.z); + temp_v0 = Player_CheckPolyCollision(player, scenery360->obj.id, scenery360->obj.pos.x, + scenery360->obj.pos.y, scenery360->obj.pos.z, + scenery360->obj.rot.x, scenery360->obj.rot.y, + scenery360->obj.rot.z); if (temp_v0 != 0) { if ((player->form == FORM_LANDMASTER) || (player->form == FORM_ON_FOOT)) { - func_play_800A729C(player, temp_v0, scenery360->obj.pos.x, scenery360->obj.pos.z); + Player_GroundedCollision(player, temp_v0, scenery360->obj.pos.x, + scenery360->obj.pos.z); } else { Player_ApplyDamage(player, temp_v0, scenery360->info.damage); } } if ((gCurrentLevel == LEVEL_FORTUNA) || (gCurrentLevel == LEVEL_VENOM_2)) { - temp_v0 = func_play_800A7974( + temp_v0 = Player_CheckHitboxCollision( player, scenery360->info.hitbox, &sp98, scenery360->obj.pos.x, scenery360->obj.pos.y, scenery360->obj.pos.z, scenery360->obj.rot.x, scenery360->obj.rot.y, scenery360->obj.rot.z, 0.0f, 0.0f, 0.0f); @@ -1670,10 +1674,10 @@ void func_play_800A8BA4(Player* player) { } } } else { - temp_v0 = - func_play_800A7974(player, scenery360->info.hitbox, &sp98, scenery360->obj.pos.x, - scenery360->obj.pos.y, scenery360->obj.pos.z, scenery360->obj.rot.x, - scenery360->obj.rot.y, scenery360->obj.rot.z, 0.0f, 0.0f, 0.0f); + temp_v0 = Player_CheckHitboxCollision( + player, scenery360->info.hitbox, &sp98, scenery360->obj.pos.x, scenery360->obj.pos.y, + scenery360->obj.pos.z, scenery360->obj.rot.x, scenery360->obj.rot.y, + scenery360->obj.rot.z, 0.0f, 0.0f, 0.0f); if (temp_v0 != 0) { if (temp_v0 < 0) { if (player->whooshTimer == 0) { @@ -1684,7 +1688,8 @@ void func_play_800A8BA4(Player* player) { player->whooshTimer = 4; } } else if ((player->form == FORM_LANDMASTER) || (player->form == FORM_ON_FOOT)) { - func_play_800A729C(player, temp_v0, scenery360->obj.pos.x, scenery360->obj.pos.z); + Player_GroundedCollision(player, temp_v0, scenery360->obj.pos.x, + scenery360->obj.pos.z); } else { Player_ApplyDamage(player, temp_v0, scenery360->info.damage); if (scenery360->obj.id == OBJ_SCENERY_131) { @@ -1751,9 +1756,9 @@ void func_play_800A8BA4(Player* player) { spC8.x = scenery->obj.pos.x - player->pos.x; spC8.z = scenery->obj.pos.z - player->trueZpos; if (sqrtf(SQ(spC8.x) + SQ(spC8.z)) < 1100.0f) { - temp_v0 = func_play_800A8304(player, scenery->obj.id, scenery->obj.pos.x, - scenery->obj.pos.y, scenery->obj.pos.z, scenery->obj.rot.x, - scenery->obj.rot.y, scenery->obj.rot.z); + temp_v0 = Player_CheckPolyCollision( + player, scenery->obj.id, scenery->obj.pos.x, scenery->obj.pos.y, scenery->obj.pos.z, + scenery->obj.rot.x, scenery->obj.rot.y, scenery->obj.rot.z); if (temp_v0 != 0) { Player_ApplyDamage(player, temp_v0, scenery->info.damage); } @@ -1763,9 +1768,9 @@ void func_play_800A8BA4(Player* player) { if (scenery->info.action == (ObjectFunc) func_enmy_80066EA8) { padB0 = 0.0f; } - temp_v0 = func_play_800A7974(player, scenery->info.hitbox, &sp98, scenery->obj.pos.x, - scenery->obj.pos.y, scenery->obj.pos.z, scenery->obj.rot.x, padB0, - scenery->obj.rot.z, 0.0f, 0.0f, 0.0f); + temp_v0 = Player_CheckHitboxCollision( + player, scenery->info.hitbox, &sp98, scenery->obj.pos.x, scenery->obj.pos.y, + scenery->obj.pos.z, scenery->obj.rot.x, padB0, scenery->obj.rot.z, 0.0f, 0.0f, 0.0f); if (temp_v0 != 0) { if (temp_v0 < 0) { if (temp_v0 == -1) { @@ -1835,10 +1840,11 @@ void func_play_800A8BA4(Player* player) { } for (i = 0, boss = gBosses; i < ARRAY_COUNT(gBosses); i++, boss++) { if (boss->obj.status == OBJ_ACTIVE) { - if ((boss->obj.id == OBJ_BOSS_312) || (boss->obj.id == OBJ_BOSS_308) || - (boss->obj.id == OBJ_BOSS_313) || (boss->obj.id == OBJ_BOSS_309)) { - temp_v0 = func_play_800A8304(player, boss->obj.id, boss->obj.pos.x, boss->obj.pos.y, - boss->obj.pos.z, boss->obj.rot.x, boss->obj.rot.y, boss->obj.rot.z); + if ((boss->obj.id == OBJ_BOSS_VE2) || (boss->obj.id == OBJ_BOSS_FO) || (boss->obj.id == OBJ_BOSS_SZ) || + (boss->obj.id == OBJ_BOSS_309)) { + temp_v0 = + Player_CheckPolyCollision(player, boss->obj.id, boss->obj.pos.x, boss->obj.pos.y, + boss->obj.pos.z, boss->obj.rot.x, boss->obj.rot.y, boss->obj.rot.z); if (temp_v0 != 0) { Player_ApplyDamage(player, temp_v0, boss->info.damage); break; @@ -1866,7 +1872,7 @@ void func_play_800A8BA4(Player* player) { break; } } else { - if (boss->obj.id == OBJ_BOSS_316) { + if (boss->obj.id == OBJ_BOSS_KA) { spfD4.x = fabsf(boss->obj.pos.x - player->pos.x); spfD4.y = fabsf(boss->obj.pos.y - 300.0f - player->pos.y) * 7.42f; spfD4.z = fabsf(boss->obj.pos.z - player->trueZpos); @@ -1874,9 +1880,9 @@ void func_play_800A8BA4(Player* player) { Player_ApplyDamage(player, 3, boss->info.damage); } } - temp_v0 = func_play_800A7974(player, boss->info.hitbox, &sp98, boss->obj.pos.x, boss->obj.pos.y, - boss->obj.pos.z, boss->obj.rot.x, boss->obj.rot.y, boss->obj.rot.z, - 0.0f, 0.0f, 0.0f); + temp_v0 = Player_CheckHitboxCollision(player, boss->info.hitbox, &sp98, boss->obj.pos.x, + boss->obj.pos.y, boss->obj.pos.z, boss->obj.rot.x, + boss->obj.rot.y, boss->obj.rot.z, 0.0f, 0.0f, 0.0f); if (temp_v0 != 0) { if (temp_v0 < 0) { if (player->whooshTimer == 0) { @@ -1907,17 +1913,17 @@ void func_play_800A8BA4(Player* player) { for (i = 0, actor = gActors; i < ARRAY_COUNT(gActors); i++, actor++) { if ((actor->obj.status == OBJ_ACTIVE) && (actor->timer_0C2 == 0)) { if (actor->obj.id == OBJ_ACTOR_180) { - temp_v0 = - func_play_800A8304(player, actor->obj.id, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, - actor->obj.rot.x, actor->obj.rot.y, actor->obj.rot.z); + temp_v0 = Player_CheckPolyCollision(player, actor->obj.id, actor->obj.pos.x, actor->obj.pos.y, + actor->obj.pos.z, actor->obj.rot.x, actor->obj.rot.y, + actor->obj.rot.z); if (temp_v0 != 0) { Player_ApplyDamage(player, temp_v0, actor->info.damage); } } else if (actor->obj.id == OBJ_ACTOR_EVENT) { if (actor->unk_0B4 == EVID_42) { - temp_v0 = - func_play_800A8304(player, ACTOR_EVENT_ID, actor->obj.pos.x, actor->obj.pos.y, - actor->obj.pos.z, actor->obj.rot.x, actor->obj.rot.y, actor->obj.rot.z); + temp_v0 = Player_CheckPolyCollision(player, ACTOR_EVENT_ID, actor->obj.pos.x, actor->obj.pos.y, + actor->obj.pos.z, actor->obj.rot.x, actor->obj.rot.y, + actor->obj.rot.z); if (temp_v0 != 0) { Player_ApplyDamage(player, temp_v0, actor->info.damage); } @@ -1930,10 +1936,10 @@ void func_play_800A8BA4(Player* player) { actor->dmgType = DMG_COLLISION; } } else { - temp_v0 = func_play_800A7974(player, actor->info.hitbox, &sp98, actor->obj.pos.x, - actor->obj.pos.y, actor->obj.pos.z, actor->obj.rot.x, - actor->obj.rot.y, actor->obj.rot.z, actor->vwork[29].x, - actor->vwork[29].y, actor->vwork[29].z + actor->unk_0F4.z); + temp_v0 = Player_CheckHitboxCollision( + player, actor->info.hitbox, &sp98, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, + actor->obj.rot.x, actor->obj.rot.y, actor->obj.rot.z, actor->vwork[29].x, + actor->vwork[29].y, actor->vwork[29].z + actor->unk_0F4.z); if (temp_v0 != 0) { if ((temp_v0 < 0) && (actor->unk_0B4 == EVID_38)) { actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SX_6032328); @@ -1961,11 +1967,11 @@ void func_play_800A8BA4(Player* player) { } } } - } else if ((actor->obj.id >= OBJ_ACTOR_205) && (actor->obj.id < OBJ_ACTOR_214)) { - temp_v0 = - func_play_800A7974(player, actor->info.hitbox, &sp98, actor->fwork[25] + actor->obj.pos.x, - actor->fwork[8] + actor->obj.pos.y + 25.0f, actor->obj.pos.z, - actor->fwork[29], actor->fwork[26], actor->obj.rot.z, 0.0f, 0.0f, 0.0f); + } else if ((OBJ_ACTOR_205 <= actor->obj.id) && (actor->obj.id <= OBJ_ACTOR_213)) { + temp_v0 = Player_CheckHitboxCollision( + player, actor->info.hitbox, &sp98, actor->fwork[25] + actor->obj.pos.x, + actor->fwork[8] + actor->obj.pos.y + 25.0f, actor->obj.pos.z, actor->fwork[29], + actor->fwork[26], actor->obj.rot.z, 0.0f, 0.0f, 0.0f); if (temp_v0 != 0) { actor->dmgType = DMG_COLLISION; if (actor->info.damage) { @@ -1975,9 +1981,9 @@ void func_play_800A8BA4(Player* player) { } } } else { - temp_v0 = func_play_800A7974(player, actor->info.hitbox, &sp98, actor->obj.pos.x, actor->obj.pos.y, - actor->obj.pos.z, actor->obj.rot.x, actor->obj.rot.y, actor->obj.rot.z, - 0.0f, 0.0f, 0.0f); + temp_v0 = Player_CheckHitboxCollision(player, actor->info.hitbox, &sp98, actor->obj.pos.x, + actor->obj.pos.y, actor->obj.pos.z, actor->obj.rot.x, + actor->obj.rot.y, actor->obj.rot.z, 0.0f, 0.0f, 0.0f); if (temp_v0 != 0) { if (temp_v0 < 0) { if (player->whooshTimer == 0) { @@ -2008,9 +2014,9 @@ void func_play_800A8BA4(Player* player) { for (i = 0, sprite = gSprites; i < ARRAY_COUNT(gSprites); i++, sprite++) { if (sprite->obj.status == OBJ_ACTIVE) { if ((player->trueZpos - 200.0f) < sprite->obj.pos.z) { - temp_v0 = - func_play_800A7974(player, sprite->info.hitbox, &sp98, sprite->obj.pos.x, sprite->obj.pos.y, - sprite->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f); + temp_v0 = Player_CheckHitboxCollision(player, sprite->info.hitbox, &sp98, sprite->obj.pos.x, + sprite->obj.pos.y, sprite->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 0.0f); if (temp_v0 != 0) { if ((sprite->obj.id == OBJ_SPRITE_FO_POLE) || (sprite->obj.id == OBJ_SPRITE_CO_POLE) || (sprite->obj.id == OBJ_SPRITE_TI_CACTUS) || (sprite->obj.id == OBJ_SPRITE_CO_TREE)) { @@ -2025,7 +2031,7 @@ void func_play_800A8BA4(Player* player) { } } } - func_play_800A86E4(player); + Player_CheckItemCollect(player); if (gCamCount == 4) { for (opponent = &gPlayer[3], i = 3; i >= 0; i--, opponent--) { if ((i != gPlayerNum) && (opponent->state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { @@ -2063,15 +2069,15 @@ void func_play_800A8BA4(Player* player) { opponent->knockback.z = -player->knockback.z; opponent->baseSpeed = player->baseSpeed = 2.0f; } else { - func_play_800A8804(player, opponent); - func_play_800A8804(opponent, player); + Player_Collide(player, opponent); + Player_Collide(opponent, player); } } } } } - if (D_ctx_80178294 != 0) { - if (func_play_800A73E4(&sp94, &sp90, player->hit4.x, player->hit4.y, player->hit4.z)) { + if (gUseDynaFloor) { + if (Play_CheckDynaFloorCollision(&sp94, &sp90, player->hit4.x, player->hit4.y, player->hit4.z)) { if (gCurrentLevel == LEVEL_ZONESS) { player->rot.x = (player->baseSpeed + player->boostSpeed) * 0.8f; player->hitTimer = 15; @@ -2089,8 +2095,8 @@ void func_play_800A8BA4(Player* player) { func_effect_8007AFD0(player->pos.x, player->trueZpos, -30.0f, 0.0f, 5.0f); } } - if (func_play_800A73E4(&sp94, &sp90, player->pos.x + ((player->hit1.x - player->pos.x) * 1.5f), - player->pos.y + (player->hit1.y - player->pos.y) * 1.5f, player->hit1.z)) { + if (Play_CheckDynaFloorCollision(&sp94, &sp90, player->pos.x + ((player->hit1.x - player->pos.x) * 1.5f), + player->pos.y + (player->hit1.y - player->pos.y) * 1.5f, player->hit1.z)) { if (gCurrentLevel == LEVEL_ZONESS) { func_effect_8007B228(player->pos.x + (player->hit1.x - player->pos.x) * 1.5f, sp94, player->hit1.z, 1.0f); @@ -2101,8 +2107,8 @@ void func_play_800A8BA4(Player* player) { player->knockback.y = 30.0f; } } - if (func_play_800A73E4(&sp94, &sp90, player->pos.x + ((player->hit2.x - player->pos.x) * 1.5f), - player->pos.y + (player->hit2.y - player->pos.y) * 1.5f, player->hit2.z)) { + if (Play_CheckDynaFloorCollision(&sp94, &sp90, player->pos.x + ((player->hit2.x - player->pos.x) * 1.5f), + player->pos.y + (player->hit2.y - player->pos.y) * 1.5f, player->hit2.z)) { if (gCurrentLevel == LEVEL_ZONESS) { func_effect_8007B228(player->pos.x + (player->hit2.x - player->pos.x) * 1.5f, sp94, player->hit2.z, 1.0f); @@ -2116,7 +2122,7 @@ void func_play_800A8BA4(Player* player) { } } -void func_play_800AA800(Player* player) { +void Player_FloorCheck(Player* player) { s32 sp144; Scenery360* scenery360; Scenery* scenery; @@ -2337,7 +2343,7 @@ void func_play_800AA800(Player* player) { break; } - if (func_play_800A78C4(hitbox, tempx, tempy, tempz, tempx2, tempy2, tempz2)) { + if (Play_CheckSingleHitbox(hitbox, tempx, tempy, tempz, tempx2, tempy2, tempz2)) { if (gGroundHeight < player->groundPos.y) { player->groundPos.y = spEC.y + 15.0f + tempy; player->groundPos.z = spEC.z + 10.0f + tempz; @@ -2356,7 +2362,7 @@ void func_play_800AA800(Player* player) { } } -void func_play_800AB2AC(void) { +void Player_InitializeAll(void) { u8* ptr = (u8*) gPlayer; u32 i; @@ -2374,7 +2380,7 @@ void Player_Initialize(Player* player) { } } -void func_play_800AB334(void) { +void Play_InitLevel(void) { Vtx* mesh; u8* ptr; s32 i; @@ -2397,7 +2403,7 @@ void func_play_800AB334(void) { gTeamLowHealthMsgTimer = -1; break; } - D_ctx_80178294 = 0; + gUseDynaFloor = 0; switch (gCurrentLevel) { case LEVEL_SECTOR_Z: gGreatFoxIntact = true; @@ -2444,7 +2450,7 @@ void func_play_800AB334(void) { D_ctx_801784A4 = 0; /* fallthrough */ case LEVEL_SOLAR: - D_ctx_80178294 = 1; + gUseDynaFloor = true; gGroundHeight = -20000.0f; fptr = MEM_ARRAY_ALLOCATE(D_ctx_801782CC, 17 * 17); for (i = 0; i < 17 * 17; i++, fptr++) { @@ -2510,7 +2516,7 @@ void func_play_800AB334(void) { } } -void func_play_800AB964(void) { +void Player_ResetVsData(void) { s32 i; s32 j; @@ -2526,16 +2532,16 @@ void func_play_800AB964(void) { D_ctx_80177E7C = D_ctx_80177E74 = 0; } -void func_play_800ABA08(void) { +void Player_InitVersus(void) { s32 i; - func_play_800AB964(); + Player_ResetVsData(); for (i = 0; i < 4; i++) { gPlayerNum = i; Player_Initialize(&gPlayer[i]); - func_play_800B0F50(&gPlayer[i]); - func_play_800B44C4(&gPlayer[i]); - func_play_800B7184(&gPlayer[i], 1); + Player_Setup(&gPlayer[i]); + Player_Update360(&gPlayer[i]); + Camera_Update360(&gPlayer[i], 1); } Play_ClearObjectData(); } @@ -2579,14 +2585,14 @@ void Play_Init(void) { gLevelMode = LEVELMODE_ALL_RANGE; if (gCurrentLevel == LEVEL_VERSUS) { gVersusMode = true; - func_play_800AB964(); + Player_ResetVsData(); } } if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gLevelPhase == 1)) { gLevelMode = LEVELMODE_ALL_RANGE; } D_ctx_80177E7C = 0; - func_play_800A594C(); + Play_InitEnvironment(); gDropHitCountItem = gTeamLowHealthMsgTimer = gStartAndrossFightTimer = gSoShieldsEmpty = gAllRangeEventTimer = gAllRangeFrameCount = gBossActive = gGameFrameCount = gCameraShake = D_ctx_801782FC = gBossFrameCount = gCallTimer = gAllRangeSupplyTimer = gMissionStatus = 0; @@ -2614,7 +2620,7 @@ void Play_Init(void) { gStarWarpDistortion = gStarfieldX = gStarfieldY = gStarfieldRoll = D_ctx_8017842C = D_ctx_80178430 = 0.0f; if ((gLevelType == LEVELTYPE_SPACE) || (gCurrentLevel == LEVEL_TRAINING)) { - func_play_800A5EBC(); + Play_SetupStarfield(); if (gCurrentLevel != LEVEL_TRAINING) { D_ctx_80177A98 = 0; } @@ -2642,7 +2648,7 @@ void Play_Init(void) { gTeamShields[i] = gSavedTeamShields[i]; } MEM_ARRAY_ALLOCATE(gPlayer, gCamCount); - func_play_800AB2AC(); + Player_InitializeAll(); for (i = 0; i < gCamCount; i++) { gPlayer[i].state_1C8 = PLAYERSTATE_1C8_INIT; gPlayerGlareAlphas[i] = D_ctx_801783C0[i] = 0; @@ -2693,15 +2699,15 @@ void Play_Init(void) { } break; case LEVEL_VERSUS: - func_play_800A4F7C(); + Play_InitVsStage(); gTeamLowHealthMsgTimer = -1; break; } } - func_play_800AB334(); + Play_InitLevel(); } -void func_play_800AC290(Player* player, PlayerShot* shot, f32 arg2, f32 arg3, PlayerShotId shotId, f32 speed) { +void Player_SetupArwingShot(Player* player, PlayerShot* shot, f32 arg2, f32 arg3, PlayerShotId shotId, f32 speed) { Vec3f sp44; Vec3f sp38; Vec3f sp2C; @@ -2711,7 +2717,7 @@ void func_play_800AC290(Player* player, PlayerShot* shot, f32 arg2, f32 arg3, Pl Matrix_RotateX(gCalcMatrix, -((player->xRot_120 + player->rot.x + player->aerobaticPitch) * M_DTOR), MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, -((player->bankAngle + player->rockAngle) * M_DTOR), MTXF_APPLY); Matrix_Translate(gCalcMatrix, player->xShake, player->yBob, 0.0f, MTXF_APPLY); - if (gVersusMode && (shotId <= PLAYERSHOT_1)) { + if (gVersusMode && (shotId <= PLAYERSHOT_TWIN_LASER)) { speed *= 0.5f; } sp44.x = 0.0f; @@ -2722,7 +2728,7 @@ void func_play_800AC290(Player* player, PlayerShot* shot, f32 arg2, f32 arg3, Pl sp44.y = -5.0f + arg3; sp44.z = 0.0f; Matrix_MultVec3f(gCalcMatrix, &sp44, &sp2C); - shot->obj.status = 1; + shot->obj.status = SHOT_ACTIVE; shot->vel.x = sp38.x; shot->vel.y = sp38.y; shot->vel.z = sp38.z; @@ -2730,15 +2736,15 @@ void func_play_800AC290(Player* player, PlayerShot* shot, f32 arg2, f32 arg3, Pl shot->obj.id = shotId; if (!gVersusMode) { - shot->unk_64 = 35; + shot->timer = 35; } else { - shot->unk_64 = 37; + shot->timer = 37; } - if (shot->obj.id == PLAYERSHOT_4) { + if (shot->obj.id == PLAYERSHOT_LOCK_SEARCH) { shot->obj.pos.x = player->pos.x + sp2C.x; shot->obj.pos.y = player->pos.y + sp2C.y; shot->obj.pos.z = player->trueZpos + sp2C.z; - shot->unk_64 = 38; + shot->timer = 38; } else { shot->obj.pos.x = player->pos.x + sp2C.x + (sp38.x * 1.2); shot->obj.pos.y = player->pos.y + sp2C.y + (sp38.y * 1.2); @@ -2747,7 +2753,7 @@ void func_play_800AC290(Player* player, PlayerShot* shot, f32 arg2, f32 arg3, Pl shot->obj.rot.x = player->xRot_120 + player->rot.x + player->aerobaticPitch; shot->obj.rot.y = player->rot.y + player->yRot_114; shot->obj.rot.z = player->bankAngle; - if (shotId == PLAYERSHOT_8) { + if (shotId == PLAYERSHOT_LOCK_ON) { if (gCurrentLevel == LEVEL_AQUAS) { shot->unk_58 = RAND_INT(360.0f); shot->unk_60 = RAND_INT(360.0f); @@ -2761,13 +2767,13 @@ void func_play_800AC290(Player* player, PlayerShot* shot, f32 arg2, f32 arg3, Pl if (speed <= 65.0f) { shot->unk_5C = 1; } - shot->unk_64 = 30; + shot->timer = 30; } } shot->sourceId = player->num; } -void func_play_800AC650(Player* player, PlayerShot* shot, PlayerShotId shotId, f32 speed) { +void Player_SetupTankShot(Player* player, PlayerShot* shot, PlayerShotId shotId, f32 speed) { Vec3f sp54; Vec3f sp48; Vec3f sp3C; @@ -2805,40 +2811,40 @@ void func_play_800AC650(Player* player, PlayerShot* shot, PlayerShotId shotId, f shot->obj.pos.x = player->pos.x + sp3C.x; shot->obj.pos.y = player->pos.y + sp3C.y; shot->obj.pos.z = player->trueZpos + sp3C.z; - shot->obj.status = 1; + shot->obj.status = SHOT_ACTIVE; shot->vec_2C.x = -player->unk_17C; shot->vec_2C.y = -player->unk_180; shot->vec_2C.z = player->zRotBank; shot->obj.rot.x = player->rot.x + player->xRot_120; shot->obj.rot.y = player->rot.y + player->yRot_114; shot->obj.rot.z = player->rot.z; - shot->unk_64 = 40; + shot->timer = 40; shot->obj.id = shotId; shot->sourceId = player->num; - if (shotId == PLAYERSHOT_8) { + if (shotId == PLAYERSHOT_LOCK_ON) { if (speed <= 65.0f) { shot->unk_5C = 1; } - shot->unk_64 = 30; + shot->timer = 30; shot->vec_2C.y = player->rot.y + player->yRot_114; } } -void func_play_800ACA40(Player* player) { +void Player_TankCannon(Player* player) { s32 i; for (i = 0; i < ARRAY_COUNT(gPlayerShots) - 1; i++) { - if (gPlayerShots[i].obj.status == 0) { - func_play_800AC650(player, &gPlayerShots[i], PLAYERSHOT_5, 100.0f); - func_play_800A5FA0(player->sfxSource, NA_SE_TANK_SHOT, player->num); + if (gPlayerShots[i].obj.status == SHOT_FREE) { + Player_SetupTankShot(player, &gPlayerShots[i], PLAYERSHOT_TANK, 100.0f); + Player_PlaySfx(player->sfxSource, NA_SE_TANK_SHOT, player->num); player->unk_1A0 = 2; break; } } } -void func_play_800ACABC(Player* player) { +void Player_ArwingLaser(Player* player) { s32 i; LaserStrength laser = gLaserStrength[gPlayerNum]; @@ -2848,9 +2854,10 @@ void func_play_800ACABC(Player* player) { switch (laser) { case LASERS_SINGLE: for (i = 0; i < ARRAY_COUNT(gPlayerShots) - 1; i++) { - if (gPlayerShots[i].obj.status == 0) { - func_play_800AC290(player, &gPlayerShots[i], 0.0f, 0.0f, PLAYERSHOT_0, 400.0f / 3.0f); - func_play_800A5FA0(player->sfxSource, NA_SE_ARWING_SHOT, player->num); + if (gPlayerShots[i].obj.status == SHOT_FREE) { + Player_SetupArwingShot(player, &gPlayerShots[i], 0.0f, 0.0f, PLAYERSHOT_SINGLE_LASER, + 400.0f / 3.0f); + Player_PlaySfx(player->sfxSource, NA_SE_ARWING_SHOT, player->num); gMuzzleFlashScale[player->num] = 0.5f; break; } @@ -2859,13 +2866,14 @@ void func_play_800ACABC(Player* player) { case LASERS_TWIN: case LASERS_HYPER: for (i = 0; i < ARRAY_COUNT(gPlayerShots) - 1; i++) { - if (gPlayerShots[i].obj.status == 0) { - func_play_800AC290(player, &gPlayerShots[i], 0.0f, -10.0f, PLAYERSHOT_1, 400.0f / 3.0f); + if (gPlayerShots[i].obj.status == SHOT_FREE) { + Player_SetupArwingShot(player, &gPlayerShots[i], 0.0f, -10.0f, PLAYERSHOT_TWIN_LASER, + 400.0f / 3.0f); if (laser == LASERS_TWIN) { - func_play_800A5FA0(player->sfxSource, NA_SE_ARWING_TWIN_LASER, player->num); + Player_PlaySfx(player->sfxSource, NA_SE_ARWING_TWIN_LASER, player->num); gMuzzleFlashScale[player->num] = 0.5f; } else { - func_play_800A5FA0(player->sfxSource, NA_SE_ARWING_TWIN_LASER2, player->num); + Player_PlaySfx(player->sfxSource, NA_SE_ARWING_TWIN_LASER2, player->num); gMuzzleFlashScale[player->num] = 0.75f; } break; @@ -2875,21 +2883,21 @@ void func_play_800ACABC(Player* player) { } } -void func_play_800ACC7C(Player* player) { +void Player_SmartBomb(Player* player) { if ((gBombCount[player->num] != 0) && (gBombButton[player->num] & gInputPress->button) && - (gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1].obj.status == OBJ_FREE)) { + (gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1].obj.status == SHOT_FREE)) { if (gVersusMode) { gBombCount[player->num] = 0; } else { gBombCount[player->num]--; } if (player->form == FORM_ARWING) { - func_play_800AC290(player, &gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1], 0.0f, 0.0f, PLAYERSHOT_BOMB, - 180.0f); + Player_SetupArwingShot(player, &gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1], 0.0f, 0.0f, PLAYERSHOT_BOMB, + 180.0f); } else if (player->form == FORM_LANDMASTER) { - func_play_800AC650(player, &gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1], PLAYERSHOT_BOMB, 180.0f); + Player_SetupTankShot(player, &gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1], PLAYERSHOT_BOMB, 180.0f); } else { - func_play_800ACDC0(player, &gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1], PLAYERSHOT_BOMB); + Player_SetupOnFootShot(player, &gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1], PLAYERSHOT_BOMB); } gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1].unk_48 = 30.0f; gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1].unk_60 = 0; @@ -2898,7 +2906,7 @@ void func_play_800ACC7C(Player* player) { } } -void func_play_800ACDC0(Player* player, PlayerShot* shot, PlayerShotId shotId) { +void Player_SetupOnFootShot(Player* player, PlayerShot* shot, PlayerShotId shotId) { Vec3f sp5C; Vec3f sp50; Vec3f sp44; @@ -2935,21 +2943,21 @@ void func_play_800ACDC0(Player* player, PlayerShot* shot, PlayerShotId shotId) { shot->scale = 1.0f; - shot->obj.status = 1; + shot->obj.status = SHOT_ACTIVE; shot->obj.id = shotId; - shot->unk_64 = 30; + shot->timer = 30; shot->unk_58 = 1; shot->sourceId = player->num; } -void func_play_800AD094(Player* player) { +void Player_OnFootGun(Player* player) { s32 i; for (i = 0; i < ARRAY_COUNT(gPlayerShots); i++) { - if (gPlayerShots[i].obj.status == 0) { - func_play_800ACDC0(player, &gPlayerShots[i], PLAYERSHOT_6); - func_play_800A5FA0(player->sfxSource, NA_SE_TANK_SHOT, player->num); + if (gPlayerShots[i].obj.status == SHOT_FREE) { + Player_SetupOnFootShot(player, &gPlayerShots[i], PLAYERSHOT_ON_FOOT); + Player_PlaySfx(player->sfxSource, NA_SE_TANK_SHOT, player->num); player->csTimer = 2; player->unk_180 = 10.0f; break; @@ -2957,7 +2965,7 @@ void func_play_800AD094(Player* player) { } } -bool func_play_800AD118(s32 playerNum) { +bool Player_CanLockOn(s32 playerNum) { Actor* actor; s32 i; @@ -2978,8 +2986,8 @@ bool func_play_800AD118(s32 playerNum) { return true; } -bool func_play_800AD1F4(Player* player) { - bool var_a2; +bool Player_UpdateLockOn(Player* player) { + bool hasBombTarget; s32 i; if (gInputHold->button & A_BUTTON) { @@ -2988,18 +2996,19 @@ bool func_play_800AD1F4(Player* player) { gChargeTimers[player->num] = 21; } if (gChargeTimers[player->num] == 20) { - func_enmy_80060F30(player->sfxSource, NA_SE_LOCK_SEARCH, player->num); + Object_PlayerSfx(player->sfxSource, NA_SE_LOCK_SEARCH, player->num); } - if ((!(gInputHold->button & R_TRIG) || !(gInputHold->button & Z_TRIG) || (player->form != FORM_ARWING) || - (player->state_1C8 != PLAYERSTATE_1C8_ACTIVE)) && - ((gGameFrameCount % 4) == 0) && func_play_800AD118(player->num)) { + if (!((gInputHold->button & R_TRIG) && (gInputHold->button & Z_TRIG) && (player->form == FORM_ARWING) && + (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE)) && + ((gGameFrameCount % 4) == 0) && Player_CanLockOn(player->num)) { if (gChargeTimers[player->num] > 20) { - for (i = 0; i < 13; i++) { - if (gPlayerShots[i].obj.status == 0) { + for (i = 0; i < 13; i++) { // bug? should be 11 + if (gPlayerShots[i].obj.status == SHOT_FREE) { if (player->form == FORM_ARWING) { - func_play_800AC290(player, &gPlayerShots[i], 0.0f, 0.0f, PLAYERSHOT_4, 400.0f); + Player_SetupArwingShot(player, &gPlayerShots[i], 0.0f, 0.0f, PLAYERSHOT_LOCK_SEARCH, + 400.0f); } else { - func_play_800AC650(player, &gPlayerShots[i], PLAYERSHOT_4, 400.0f); + Player_SetupTankShot(player, &gPlayerShots[i], PLAYERSHOT_LOCK_SEARCH, 400.0f); } return true; } @@ -3015,16 +3024,17 @@ bool func_play_800AD1F4(Player* player) { if (gInputPress->button & A_BUTTON) { for (i = 0; i < ARRAY_COUNT(gActors); i++) { if ((gActors[i].obj.status == OBJ_ACTIVE) && (gActors[i].lockOnTimers[player->num] != 0)) { - if ((gPlayerShots[14 - player->num].obj.status == 0) || - (gPlayerShots[14 - player->num].obj.id != PLAYERSHOT_8) || - ((gPlayerShots[14 - player->num].obj.id == PLAYERSHOT_8) && + if ((gPlayerShots[14 - player->num].obj.status == SHOT_FREE) || + (gPlayerShots[14 - player->num].obj.id != PLAYERSHOT_LOCK_ON) || + ((gPlayerShots[14 - player->num].obj.id == PLAYERSHOT_LOCK_ON) && (gPlayerShots[14 - player->num].unk_60 != 0))) { if (player->form == FORM_ARWING) { - func_play_800AC290(player, &gPlayerShots[14 - player->num], 0.0f, 0.0f, PLAYERSHOT_8, 70.0f); + Player_SetupArwingShot(player, &gPlayerShots[14 - player->num], 0.0f, 0.0f, PLAYERSHOT_LOCK_ON, + 70.0f); } else { - func_play_800AC650(player, &gPlayerShots[14 - player->num], PLAYERSHOT_8, 70.0f); + Player_SetupTankShot(player, &gPlayerShots[14 - player->num], PLAYERSHOT_LOCK_ON, 70.0f); } - func_enmy_80060F30(player->sfxSource, NA_SE_LOCK_ON_LASER, player->num); + Object_PlayerSfx(player->sfxSource, NA_SE_LOCK_ON_LASER, player->num); gControllerRumbleTimers[player->num] = 5; return true; } @@ -3032,16 +3042,17 @@ bool func_play_800AD1F4(Player* player) { } } if (gChargeTimers[player->num] > 10) { - if ((gPlayerShots[14 - player->num].obj.status == 0) || - (gPlayerShots[14 - player->num].obj.id != PLAYERSHOT_8) || - ((gPlayerShots[14 - player->num].obj.id == PLAYERSHOT_8) && + if ((gPlayerShots[14 - player->num].obj.status == SHOT_FREE) || + (gPlayerShots[14 - player->num].obj.id != PLAYERSHOT_LOCK_ON) || + ((gPlayerShots[14 - player->num].obj.id == PLAYERSHOT_LOCK_ON) && (gPlayerShots[14 - player->num].scale > 1.0f))) { if (player->form == FORM_ARWING) { - func_play_800AC290(player, &gPlayerShots[14 - player->num], 0.0f, 0.0f, PLAYERSHOT_8, 70.0f); + Player_SetupArwingShot(player, &gPlayerShots[14 - player->num], 0.0f, 0.0f, PLAYERSHOT_LOCK_ON, + 70.0f); } else { - func_play_800AC650(player, &gPlayerShots[14 - player->num], PLAYERSHOT_8, 70.0f); + Player_SetupTankShot(player, &gPlayerShots[14 - player->num], PLAYERSHOT_LOCK_ON, 70.0f); } - func_enmy_80060F30(player->sfxSource, NA_SE_LOCK_ON_LASER, player->num); + Object_PlayerSfx(player->sfxSource, NA_SE_LOCK_ON_LASER, player->num); gChargeTimers[player->num] = 0; gControllerRumbleTimers[player->num] = 5; return true; @@ -3050,91 +3061,90 @@ bool func_play_800AD1F4(Player* player) { gChargeTimers[player->num] = 0; } if (gInputPress->button & B_BUTTON) { - var_a2 = false; + hasBombTarget = false; for (i = 0; i < ARRAY_COUNT(gActors); i++) { if ((gActors[i].obj.status == OBJ_ACTIVE) && (gActors[i].lockOnTimers[player->num] != 0)) { - var_a2 = true; + hasBombTarget = true; break; } } for (i = 0; i < gCamCount; i++) { if (gVsLockOnTimers[i][player->num] != 0) { - var_a2 = true; + hasBombTarget = true; break; } } - if (var_a2 != 0) { - if ((gBombCount[player->num] != 0) && (gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1].obj.status == 0)) { - gBombCount[player->num]--; - if (player->form == FORM_ARWING) { - func_play_800AC290(player, &gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1], 0.0f, 0.0f, PLAYERSHOT_8, - 60.0f); - } else { - func_play_800AC650(player, &gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1], PLAYERSHOT_8, 60.0f); - } - gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1].unk_48 = 30.0f; - gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1].unk_60 = 0; - Audio_InitBombSfx(player->num, 1); - Audio_PlayBombFlightSfx(player->num, gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1].sfxSource); - return true; + if (hasBombTarget && (gBombCount[player->num] != 0) && + (gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1].obj.status == SHOT_FREE)) { + gBombCount[player->num]--; + if (player->form == FORM_ARWING) { + Player_SetupArwingShot(player, &gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1], 0.0f, 0.0f, + PLAYERSHOT_LOCK_ON, 60.0f); + } else { + Player_SetupTankShot(player, &gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1], PLAYERSHOT_LOCK_ON, 60.0f); } + gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1].unk_48 = 30.0f; + gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1].unk_60 = 0; + Audio_InitBombSfx(player->num, 1); + Audio_PlayBombFlightSfx(player->num, gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1].sfxSource); + return true; } } return false; } -void func_play_800AD7F0(Player* player) { +void Player_Shoot(Player* player) { switch (player->form) { case FORM_ARWING: if ((player->wings.rightState <= WINGSTATE_BROKEN) || (player->wings.leftState <= WINGSTATE_BROKEN)) { gLaserStrength[player->num] = LASERS_SINGLE; } - if (!func_play_800AD1F4(player)) { + if (!Player_UpdateLockOn(player)) { if (gLaserStrength[gPlayerNum] > LASERS_SINGLE) { Math_SmoothStepToF(&player->wings.unk_14, -10.0f, 1.0f, 0.5f, 0.0f); } else { Math_SmoothStepToF(&player->wings.unk_14, 0.0f, 1.0f, 0.5f, 0.0f); } if (gShootButton[player->num] & gInputPress->button) { - func_play_800ACABC(player); - player->timer_244 = 8; + Player_ArwingLaser(player); + player->shotTimer = 8; } - if (player->timer_244 != 0) { - player->timer_244--; - if ((gShootButton[player->num] & gInputHold->button) && ((player->timer_244 & 3) == 0)) { - func_play_800ACABC(player); + if (player->shotTimer != 0) { + player->shotTimer--; + if ((gShootButton[player->num] & gInputHold->button) && ((player->shotTimer & 3) == 0)) { + Player_ArwingLaser(player); } } - func_play_800ACC7C(player); + Player_SmartBomb(player); } break; case FORM_LANDMASTER: - if (!func_play_800AD1F4(player)) { + if (!Player_UpdateLockOn(player)) { if (gShootButton[player->num] & gInputPress->button) { - func_play_800ACA40(player); + Player_TankCannon(player); } - func_play_800ACC7C(player); + Player_SmartBomb(player); } break; case FORM_ON_FOOT: if (gInputPress->button & A_BUTTON) { - player->timer_244 = 0; + player->shotTimer = 0; } if (gInputHold->button & A_BUTTON) { - if (player->timer_244 == 0) { - func_play_800AD094(player); + if (player->shotTimer == 0) { + Player_OnFootGun(player); } - player->timer_244++; - if (player->timer_244 > 4) { - player->timer_244 = 0; + player->shotTimer++; + if (player->shotTimer > 4) { + player->shotTimer = 0; } } - func_play_800ACC7C(player); + Player_SmartBomb(player); break; } } -void func_play_800ADA28(Player* player) { +void Player_ArwingBank(Player* player) { f32 sp3C; f32 sp38; @@ -3197,7 +3207,7 @@ void func_play_800ADA28(Player* player) { } } -void func_play_800ADD98(Player* player) { +void Player_UseTankJets(Player* player) { Math_SmoothStepToF(&player->unk_170, 0.0f, 1.0f, 0.2f, 0.0f); Math_SmoothStepToF(&player->unk_16C, 0.0f, 1.0f, 0.2f, 0.0f); if (gInputPress->button & Z_TRIG) { @@ -3222,7 +3232,7 @@ void func_play_800ADD98(Player* player) { player->unk_18C += fabsf(SIN_DEG(player->zRotBarrelRoll) * 20.0f); } -void func_play_800ADF58(Player* player) { +void Player_UpdatePath(Player* player) { f32 temp_fv0; f32 temp_fv0_2; s32 temp_v0; @@ -3244,14 +3254,14 @@ void func_play_800ADF58(Player* player) { player->trueZpos = player->pos.z + player->camDist; player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; - while (1) { + while (true) { if (player->bankAngle > 360.0f) { player->bankAngle -= 360.0f; } else { break; } } - while (1) { + while (true) { if (player->bankAngle < -360.0f) { player->bankAngle += 360.0f; } else { @@ -3277,7 +3287,7 @@ void func_play_800ADF58(Player* player) { } } -void func_play_800AE278(Player* player) { +void Player_CheckBounds360(Player* player) { f32 var_fv1; bool var_v0 = false; @@ -3332,7 +3342,7 @@ void func_play_800AE278(Player* player) { } } -void func_play_800AE4A4(Player* player) { +void Player_ArwingMove360(Player* player) { f32 sp7C; f32 sp78; f32 scale; @@ -3454,13 +3464,13 @@ void func_play_800AE4A4(Player* player) { if (player->pos.y < -(player->pathHeight - 100.0f)) { player->flags_228 = PFLAG_228_2; } - func_play_800AE278(player); + Player_CheckBounds360(player); player->trueZpos = player->pos.z; - func_play_800A4460(player); - func_play_800A46A0(player); + Player_WingEffects(player); + Player_DamageEffects(player); } -void func_play_800AECAC(Player* player) { +void Player_PerformLoop(Player* player) { f32 temp; f32 sp58; Vec3f sp4C; @@ -3526,10 +3536,10 @@ void func_play_800AECAC(Player* player) { } player->pos.z += player->vel.z; player->trueZpos = player->pos.z; - func_play_800A46A0(player); + Player_DamageEffects(player); } -void func_play_800AF07C(Player* player) { +void Player_ArwingMoveOnRails(Player* player) { f32 stickX; f32 stickY; f32 var_fa0; @@ -3724,10 +3734,10 @@ void func_play_800AF07C(Player* player) { player->pos.z += player->vel.z; - func_play_800A4460(player); + Player_WingEffects(player); } -void func_play_800AF928(Player* player) { +void Player_TankMove360(Player* player) { f32 sp5C; f32 var_fa0; f32 var_fa1; @@ -3844,20 +3854,20 @@ void func_play_800AF928(Player* player) { player->vel.y = 20.0f; } player->pos.z += player->vel.z; - func_play_800AE278(player); + Player_CheckBounds360(player); player->trueZpos = player->pos.z; player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; if (player->grounded) { player->rockPhase += player->baseSpeed * 5.0f; player->rockAngle = SIN_DEG(player->rockPhase) * 0.7f; } - func_play_800A46A0(player); + Player_DamageEffects(player); } f32 D_800D30F4[4] = { 3.0f, 4.0f, 5.0f, 3.0f }; f32 D_800D3104[4] = { 0.2f, 0.25f, 0.3f, 0.2f }; -void func_play_800B00C0(Player* player) { +void Player_OnFootUpdateSpeed(Player* player) { f32 sp2C = 0.0f; f32 sp28 = 0.7f; f32 sp24 = 0.1f; @@ -3871,7 +3881,7 @@ void func_play_800B00C0(Player* player) { Math_SmoothStepToF(&player->unk_008, sp28, 0.1f, sp24, 0.00001f); } -void func_play_800B0194(Player* player) { +void Player_OnFootMove(Player* player) { Vec3f sp78[30]; f32 sp74; f32 sp70; @@ -4060,7 +4070,7 @@ void func_play_800B0194(Player* player) { player->vel.y = 20.0f; } player->pos.z += player->vel.z; - func_play_800AE278(player); + Player_CheckBounds360(player); player->trueZpos = player->pos.z; } @@ -4072,7 +4082,7 @@ f32 D_800D3134[8] = { }; f32 D_800D3154[4] = { 45.0f, -135.0f, 135.0f, -45.0f }; -void func_play_800B0F50(Player* playerx) { +void Player_Setup(Player* playerx) { s32 j; Vec3f* sp38; ObjectInit* objInit; @@ -4262,7 +4272,7 @@ void func_play_800B0F50(Player* playerx) { } break; } - func_play_800B7184(player, 1); + Camera_Update360(player, 1); } player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_204 = gLevelType; @@ -4279,7 +4289,7 @@ void func_play_800B0F50(Player* playerx) { player->yRot_114 = 188.0f; player->unk_240 = 1; } - func_play_800B63BC(player, 1); + Camera_UpdateArwing360(player, 1); } else { player->unk_014 = 1.0f; player->unk_018 = 1.0f; @@ -4297,7 +4307,7 @@ void func_play_800B0F50(Player* playerx) { player->state_1C8 = PLAYERSTATE_1C8_LEVEL_INTRO; player->unk_204 = 1; gGroundSurface = gSavedGroundSurface = SURFACE_WATER; - func_play_800A3FB0(); + Play_dummy_MuteSfx(); break; case LEVEL_BOLSE: player->unk_204 = 1; @@ -4440,7 +4450,7 @@ void func_play_800B0F50(Player* playerx) { gPauseEnabled = 0; } -void func_play_800B2130(Player* player) { +void Player_UpdateArwingRoll(Player* player) { s32 temp_t6; s32 temp_t7; s32 temp_t8; @@ -4506,7 +4516,7 @@ void func_play_800B2130(Player* player) { } } -void func_play_800B22C0(Player* player) { +void Player_UpdateTankRoll(Player* player) { f32 temp_fv0; f32 temp_fv0_2; s32* temp_v1; @@ -4588,7 +4598,7 @@ void func_play_800B22C0(Player* player) { } } -void func_play_800B2574(Player* player) { +void Player_ArwingBoost(Player* player) { f32 sp2C; f32 sp28; s32 var; @@ -4666,7 +4676,7 @@ void func_play_800B2574(Player* player) { if ((gInputHold->button & gBoostButton[player->num]) && !(gInputHold->button & gBrakeButton[player->num]) && (player->state_1C8 != PLAYERSTATE_1C8_U_TURN) && !player->boostCooldown) { if (player->boostMeter == 0.0f) { - func_play_800A5FA0(player->sfxSource, NA_SE_ARWING_BOOST, player->num); + Player_PlaySfx(player->sfxSource, NA_SE_ARWING_BOOST, player->num); player->unk_194 = 5.0f; player->unk_190 = 5.0f; if (gBoostButton[player->num] & gInputPress->button) { @@ -4715,11 +4725,12 @@ void func_play_800B2574(Player* player) { } } -void func_play_800B2BE0(Player* player) { - func_play_800B2574(player); +// Unused +void Player_ArwingBoost2(Player* player) { + Player_ArwingBoost(player); } -void func_play_800B2C00(Player* player) { +void Player_ArwingBrake(Player* player) { f32 sp34; f32 sp30; s32 var; @@ -4760,7 +4771,7 @@ void func_play_800B2C00(Player* player) { if ((gInputHold->button & gBrakeButton[player->num]) && !(gInputHold->button & gBoostButton[player->num]) && (player->state_1C8 != PLAYERSTATE_1C8_U_TURN) && !player->boostCooldown) { if (player->boostMeter == 0.0f) { - func_play_800A5FA0(player->sfxSource, NA_SE_ARWING_BRAKE, player->num); + Player_PlaySfx(player->sfxSource, NA_SE_ARWING_BRAKE, player->num); if ((gLevelMode == LEVELMODE_ALL_RANGE) && (gInputPress->button & gBrakeButton[player->num])) { gUturnBrakeTimers[gPlayerNum] = 5; } @@ -4800,7 +4811,7 @@ void func_play_800B2C00(Player* player) { Math_SmoothStepToF(&player->camDist, 0.0f, 0.1f, 5.0f, 0.0f); } -void func_play_800B3010(Player* player) { +void Player_TankBoostBrake(Player* player) { f32 sp2C; if (!player->boostActive) { @@ -4818,7 +4829,7 @@ void func_play_800B3010(Player* player) { if (player->boostMeter == 0.0f) { player->unk_194 = 4.0f; player->unk_190 = 4.0f; - func_play_800A5FA0(player->sfxSource, NA_SE_ARWING_BOOST, player->num); + Player_PlaySfx(player->sfxSource, NA_SE_ARWING_BOOST, player->num); } Math_SmoothStepToF(&D_ctx_801779A8[player->num], 30.0f, 1.0f, 10.0f, 0.0f); player->unk_190 = 2.0f; @@ -4831,7 +4842,7 @@ void func_play_800B3010(Player* player) { } if ((gInputHold->button & gBrakeButton[player->num]) && !player->boostCooldown) { if (player->boostMeter == 0.0f) { - func_play_800A5FA0(player->sfxSource, NA_SE_ARWING_BRAKE, player->num); + Player_PlaySfx(player->sfxSource, NA_SE_ARWING_BRAKE, player->num); } Math_SmoothStepToF(&D_ctx_801779A8[player->num], 20.0f, 1.0f, 10.0f, 0.0f); sp2C = 5.0f; @@ -4844,14 +4855,14 @@ void func_play_800B3010(Player* player) { Math_SmoothStepToF(&player->baseSpeed, sp2C, 0.1f, 2.0f, 0.001f); } -void func_play_800B3314(Player* player) { +void Player_UpdateTankJets(Player* player) { f32 temp; f32 temp2; player->gravity = 3.0f; if ((gInputHold->button & Z_TRIG) && !player->boostCooldown) { if (player->boostMeter == 0.0f) { - func_play_800A5FA0(player->sfxSource, NA_SE_ARWING_BOOST, player->num); + Player_PlaySfx(player->sfxSource, NA_SE_ARWING_BOOST, player->num); } player->unk_188 = 0.0f; player->zRotBank += 4.0f; @@ -4879,7 +4890,7 @@ void func_play_800B3314(Player* player) { } if ((gInputHold->button & R_TRIG) && !player->boostCooldown) { if (player->boostMeter == 0.0f) { - func_play_800A5FA0(player->sfxSource, NA_SE_ARWING_BOOST, player->num); + Player_PlaySfx(player->sfxSource, NA_SE_ARWING_BOOST, player->num); } player->unk_188 = 0.0f; player->zRotBank -= 4.0f; @@ -4932,7 +4943,7 @@ s32 D_800D3164[6] = { 1, 1, -1, 1, -1, 1, }; -void func_play_800B39E0(Player* player) { +void Player_UpdateEffects(Player* player) { s32 i; player->xShake = 0.0f; @@ -5077,7 +5088,7 @@ void Player_UpdateShields(Player* player) { } } -void func_play_800B415C(Player* player) { +void Player_LowHealthAlarm(Player* player) { s32 var_v0; Player_UpdateShields(player); @@ -5091,12 +5102,12 @@ void func_play_800B415C(Player* player) { var_v0 = 16 - 1; } if ((gGameFrameCount & var_v0) == 0) { - func_enmy_80060F30(player->sfxSource, NA_SE_SHIELD_BUZZER, player->num); + Object_PlayerSfx(player->sfxSource, NA_SE_SHIELD_BUZZER, player->num); } } } -void func_play_800B41E0(Player* player) { +void Play_dummy_800B41E0(Player* player) { } void Player_Down(Player* player) { @@ -5110,7 +5121,7 @@ void Player_Down(Player* player) { Audio_KillSfxById(NA_SE_OVERHEAT_ALARM); } Audio_StopPlayerNoise(player->num); - func_play_800A5FA0(player->sfxSource, NA_SE_ARWING_DOWN, player->num); + Player_PlaySfx(player->sfxSource, NA_SE_ARWING_DOWN, player->num); player->shields = 0; player->csState = 0; player->hitTimer = 0; @@ -5119,7 +5130,7 @@ void Player_Down(Player* player) { gShowHud = 0; } -void func_play_800B42B0(Player* player) { +void Player_UpdateOnRails(Player* player) { switch (player->form) { case FORM_ARWING: if (player->csTimer != 0) { @@ -5129,23 +5140,23 @@ void func_play_800B42B0(Player* player) { gInputHold->button = gBoostButton[player->num]; player->boostMeter = 1.0f; } - func_play_800ADA28(player); - func_play_800B2574(player); - func_play_800B2C00(player); - func_play_800B41E0(player); - func_play_800B2130(player); + Player_ArwingBank(player); + Player_ArwingBoost(player); + Player_ArwingBrake(player); + Play_dummy_800B41E0(player); + Player_UpdateArwingRoll(player); if (player->somersault) { - func_play_800AECAC(player); + Player_PerformLoop(player); } else { - func_play_800AF07C(player); + Player_ArwingMoveOnRails(player); } - func_play_800ADF58(player); - func_play_800AD7F0(player); - func_play_800A8BA4(player); - func_play_800A46A0(player); - func_play_800A4C40(player); - func_play_800AA800(player); - func_play_800B415C(player); + Player_UpdatePath(player); + Player_Shoot(player); + Player_CollisionCheck(player); + Player_DamageEffects(player); + Player_WaterEffects(player); + Player_FloorCheck(player); + Player_LowHealthAlarm(player); if ((player->shields <= 0) && (player->radioDamageTimer != 0)) { Player_Down(player); player->vel.x *= 0.2f; @@ -5160,18 +5171,18 @@ void func_play_800B42B0(Player* player) { } break; case FORM_LANDMASTER: - func_tank_80047504(player); + Tank_UpdateOnRails(player); break; case FORM_BLUE_MARINE: - Aquas_801ACE50(player); - Aquas_801AD328(player); - func_play_800B41E0(player); - Aquas_801AACF8(player); - func_play_800ADF58(player); - Aquas_801AC274(player); - func_play_800A8BA4(player); - func_play_800AA800(player); - func_play_800B415C(player); + Aquas_BlueMarineBoost(player); + Aquas_BlueMarineBrake(player); + Play_dummy_800B41E0(player); + Aquas_BlueMarineMove(player); + Player_UpdatePath(player); + Aquas_BlueMarineShoot(player); + Player_CollisionCheck(player); + Player_FloorCheck(player); + Player_LowHealthAlarm(player); if ((player->shields <= 0) && (player->radioDamageTimer != 0)) { Player_Down(player); } @@ -5179,24 +5190,24 @@ void func_play_800B42B0(Player* player) { } } -void func_play_800B44C4(Player* player) { +void Player_Update360(Player* player) { switch (player->form) { case FORM_ARWING: - func_play_800ADA28(player); - func_play_800B2574(player); - func_play_800B2C00(player); - func_play_800B41E0(player); - func_play_800B2130(player); + Player_ArwingBank(player); + Player_ArwingBoost(player); + Player_ArwingBrake(player); + Play_dummy_800B41E0(player); + Player_UpdateArwingRoll(player); if (player->somersault) { - func_play_800AECAC(player); + Player_PerformLoop(player); } else { - func_play_800AE4A4(player); + Player_ArwingMove360(player); } - func_play_800AD7F0(player); - func_play_800A8BA4(player); - func_play_800A4C40(player); - func_play_800AA800(player); - func_play_800B415C(player); + Player_Shoot(player); + Player_CollisionCheck(player); + Player_WaterEffects(player); + Player_FloorCheck(player); + Player_LowHealthAlarm(player); if ((player->shields <= 0) && (player->radioDamageTimer != 0)) { Player_Down(player); player->vel.y = 5.0f; @@ -5215,30 +5226,30 @@ void func_play_800B44C4(Player* player) { } break; case FORM_LANDMASTER: - func_play_800ADD98(player); - func_play_800B3314(player); - func_play_800B3010(player); - func_play_800B41E0(player); - func_play_800B22C0(player); - func_play_800AF928(player); - func_play_800AD7F0(player); - func_play_800A8BA4(player); - func_play_800AA800(player); - func_play_800B415C(player); + Player_UseTankJets(player); + Player_UpdateTankJets(player); + Player_TankBoostBrake(player); + Play_dummy_800B41E0(player); + Player_UpdateTankRoll(player); + Player_TankMove360(player); + Player_Shoot(player); + Player_CollisionCheck(player); + Player_FloorCheck(player); + Player_LowHealthAlarm(player); if ((player->shields <= 0) && (player->radioDamageTimer != 0)) { Player_Down(player); } break; case FORM_BLUE_MARINE: - Aquas_801BEC80(player); + Aquas_Update360(player); break; case FORM_ON_FOOT: - func_play_800B00C0(player); - func_play_800B0194(player); - func_play_800AD7F0(player); - func_play_800A8BA4(player); - func_play_800AA800(player); - func_play_800B415C(player); + Player_OnFootUpdateSpeed(player); + Player_OnFootMove(player); + Player_Shoot(player); + Player_CollisionCheck(player); + Player_FloorCheck(player); + Player_LowHealthAlarm(player); if ((player->shields <= 0) && (player->radioDamageTimer != 0)) { Player_Down(player); } @@ -5246,7 +5257,7 @@ void func_play_800B44C4(Player* player) { } } -void func_play_800B46F8(Player* player) { +void Player_LowHealthMsg(Player* player) { s32 teamId; if ((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (gTeamLowHealthMsgTimer >= 0)) { @@ -5321,7 +5332,7 @@ void Player_Update(Player* player) { } } if (player->state_1C8 > PLAYERSTATE_1C8_INIT) { - func_play_800B39E0(player); + Player_UpdateEffects(player); } player->flags_228 = 0; if ((player->state_1C8 > PLAYERSTATE_1C8_INIT) && (player->form == FORM_ARWING) && !gVersusMode) { @@ -5350,7 +5361,7 @@ void Player_Update(Player* player) { gPauseEnabled = 0; break; case PLAYERSTATE_1C8_INIT: - func_play_800B0F50(player); + Player_Setup(player); gFillScreenAlphaTarget = 0; gPauseEnabled = 0; break; @@ -5362,7 +5373,7 @@ void Player_Update(Player* player) { break; case PLAYERSTATE_1C8_ACTIVE: gShowHud = 1; - func_play_800B46F8(player); + Player_LowHealthMsg(player); player->wings.modelId = 0; D_hud_80161704 = 255; if ((!gVersusMode || (D_ctx_80177E7C != 0)) && !player->somersault && (gInputPress->button & U_CBUTTONS) && @@ -5380,31 +5391,31 @@ void Player_Update(Player* player) { switch (gLevelMode) { case LEVELMODE_ON_RAILS: gLoadLevelObjects = true; - func_play_800B42B0(player); + Player_UpdateOnRails(player); player->unk_234 = 1; break; case LEVELMODE_ALL_RANGE: if (!gVersusMode) { - func_play_800B44C4(player); + Player_Update360(player); player->unk_234 = 1; } else if (D_ctx_80177E7C != 0) { if (gPlayerInactive[player->num] == true) { do { sp1C4 = RAND_INT(3.9f); } while (gPlayerInactive[sp1C4]); - player->unk_288 = sp1C4 + 1; + player->attacker = sp1C4 + 1; player->state_1C8 = PLAYERSTATE_1C8_VS_STANDBY; player->csState = 0; - func_play_800B5FBC(player, player->unk_288 - 1, 1); + Camera_FollowPlayer(player, player->attacker - 1, 1); } else { if (D_ctx_80177E7C == 1) { D_ctx_80177E7C += 1; for (i = 0; i < 4; i++) { - func_play_800A5FA0(gPlayer[i].sfxSource, NA_SE_ARWING_BOOST, gPlayer[i].num); + Player_PlaySfx(gPlayer[i].sfxSource, NA_SE_ARWING_BOOST, gPlayer[i].num); gPlayer[i].unk_190 = gPlayer[i].unk_194 = 5.0f; } } - func_play_800B44C4(player); + Player_Update360(player); player->unk_234 = 1; } } else { @@ -5415,8 +5426,8 @@ void Player_Update(Player* player) { break; case LEVELMODE_UNK_2: gLoadLevelObjects = true; - Turret_801A5AD4(player); - func_play_800A8BA4(player); + Turret_Update(player); + Player_CollisionCheck(player); break; } break; @@ -5436,10 +5447,10 @@ void Player_Update(Player* player) { Player_UpdateShields(player); Cutscene_UTurn(player); if (gCurrentLevel == LEVEL_KATINA) { - func_play_800A8BA4(player); + Player_CollisionCheck(player); } else { - func_play_800A887C(player); - func_play_800A86E4(player); + Player_UpdateHitbox(player); + Player_CheckItemCollect(player); } break; case PLAYERSTATE_1C8_LEVEL_COMPLETE: @@ -5447,7 +5458,7 @@ void Player_Update(Player* player) { gPauseEnabled = false; Player_UpdateShields(player); Cutscene_LevelComplete(player); - func_play_800A4C40(player); + Player_WaterEffects(player); gShowHud = gChargeTimers[player->num] = 0; break; case PLAYERSTATE_1C8_ENTER_WARP_ZONE: @@ -5460,7 +5471,7 @@ void Player_Update(Player* player) { gPauseEnabled = 0; Player_UpdateShields(player); Cutscene_AllRangeMode(player); - func_play_800B2130(player); + Player_UpdateArwingRoll(player); gChargeTimers[player->num] = player->cockpitView = gShowHud = 0; break; case PLAYERSTATE_1C8_GFOX_REPAIR: @@ -5477,20 +5488,20 @@ void Player_Update(Player* player) { case PLAYERSTATE_1C8_VS_STANDBY: player->unk_234 = 0; if (gPlayerInactive[player->num] == true) { - func_play_800B5FBC(player, player->unk_288 - 1, 0); + Camera_FollowPlayer(player, player->attacker - 1, 0); } else if ((D_ctx_80177E74 == 0) && (player->csState != 0)) { player->csState = 0; Player_Initialize(player); - func_play_800B0F50(player); - func_play_800B44C4(player); - func_play_800B7184(player, 1); - func_play_800A5FA0(player->sfxSource, NA_SE_ARWING_BOOST, player->num); + Player_Setup(player); + Player_Update360(player); + Camera_Update360(player, 1); + Player_PlaySfx(player->sfxSource, NA_SE_ARWING_BOOST, player->num); player->unk_190 = player->unk_194 = 5.0f; - } else if (player->unk_288 >= 0) { - if (player->unk_288 == 0) { - player->unk_288 = 1; + } else if (player->attacker >= 0) { + if (player->attacker == 0) { + player->attacker = 1; } - func_play_800B5FBC(player, player->unk_288 - 1, 0); + Camera_FollowPlayer(player, player->attacker - 1, 0); } break; case PLAYERSTATE_1C8_NEXT: @@ -5596,7 +5607,7 @@ void Player_Update(Player* player) { } } -void func_play_800B56BC(Player* player) { +void Camera_UpdateArwingOnRails(Player* player) { f32 var_fv1; f32 var_fv0; f32 temp; @@ -5627,7 +5638,7 @@ void func_play_800B56BC(Player* player) { gCsCamAtX += player->xShake * -2.0f; gCsCamAtX -= player->unk_030 * 0.5f; gCsCamAtY = ((player->pos.y - player->yPath) * player->unk_14C) + 20.0f; - gCsCamAtY += player->unk_060 * 5.0f; + gCsCamAtY += player->xRock * 5.0f; gCsCamAtY -= player->unk_02C * 0.25f; switch (D_800D2F54) { case 0: @@ -5669,7 +5680,7 @@ void func_play_800B56BC(Player* player) { } } -void func_play_800B5D30(Player* player, s32 arg1) { +void Camera_UpdateCockpitOnRails(Player* player, s32 arg1) { Vec3f sp4C; Vec3f sp40; s32 pad; @@ -5706,7 +5717,7 @@ void func_play_800B5D30(Player* player, s32 arg1) { } } -void func_play_800B5FBC(Player* player, s32 playerNum, bool arg2) { +void Camera_FollowPlayer(Player* player, s32 playerNum, bool arg2) { u8 i; u8 var_v0; Vec3f sp58; @@ -5726,7 +5737,7 @@ void func_play_800B5FBC(Player* player, s32 playerNum, bool arg2) { if (i > 90) { playerNum = 0; } - player->unk_288 = playerNum + 1; + player->attacker = playerNum + 1; Matrix_RotateY(gCalcMatrix, gPlayer[playerNum].yRot_114 * M_DTOR, MTXF_NEW); switch (gPlayer[playerNum].form) { case FORM_ARWING: @@ -5773,7 +5784,7 @@ void func_play_800B5FBC(Player* player, s32 playerNum, bool arg2) { Math_SmoothStepToF(&player->camRoll, 0.0f, 0.05f, 5.0f, 0.00001f); } -void func_play_800B63BC(Player* player, s32 arg1) { +void Camera_UpdateArwing360(Player* player, s32 arg1) { Vec3f sp74; Vec3f sp68; f32 temp1; @@ -5814,7 +5825,7 @@ void func_play_800B63BC(Player* player, s32 arg1) { atX = player->pos.x + player->damageShake; var_fv0 = (player->somersault) ? 1.0f : 0.79f; - atY = (player->pos.y * (var_fv0)) + player->damageShake + (player->unk_060 * 5.0f); + atY = (player->pos.y * (var_fv0)) + player->damageShake + (player->xRock * 5.0f); atY += (player->unk_02C * 0.5f); if (player->state_1C8 == PLAYERSTATE_1C8_U_TURN) { atY = player->pos.y; @@ -5851,7 +5862,7 @@ void func_play_800B63BC(Player* player, s32 arg1) { } } -void func_play_800B6848(Player* player, s32 arg1) { +void Camera_UpdateTank360(Player* player, s32 arg1) { Vec3f sp54; Vec3f sp48; f32 sp44; @@ -5903,7 +5914,7 @@ void func_play_800B6848(Player* player, s32 arg1) { } } -void func_play_800B6BFC(Player* player, s32 arg1) { +void Camera_UpdateOnFoot360(Player* player, s32 arg1) { Vec3f sp64; Vec3f sp58; Vec3f sp4C; @@ -5948,7 +5959,7 @@ void func_play_800B6BFC(Player* player, s32 arg1) { } } -void func_play_800B6F50(f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt) { +void Camera_SetStarfieldPos(f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt) { f32 sp34; f32 sp30; f32 pitch; @@ -5985,48 +5996,48 @@ void func_play_800B6F50(f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt) } } -void func_play_800B7184(Player* player, s32 arg1) { +void Camera_Update360(Player* player, s32 arg1) { switch (player->form) { case FORM_ON_FOOT: - func_play_800B6BFC(player, arg1); + Camera_UpdateOnFoot360(player, arg1); break; case FORM_LANDMASTER: - func_play_800B6848(player, arg1); + Camera_UpdateTank360(player, arg1); break; case FORM_ARWING: - func_play_800B63BC(player, arg1); + Camera_UpdateArwing360(player, arg1); break; } } -void Player_UpdateCamera(Player* player) { +void Camera_Update(Player* player) { switch (player->state_1C8) { case PLAYERSTATE_1C8_ACTIVE: switch (gLevelMode) { case LEVELMODE_ON_RAILS: if (player->form == FORM_ARWING) { if (!player->cockpitView) { - func_play_800B56BC(player); + Camera_UpdateArwingOnRails(player); } else { - func_play_800B5D30(player, 0); + Camera_UpdateCockpitOnRails(player, 0); } } else if (player->form == FORM_LANDMASTER) { - func_tank_80043468(player); + Player_UpdateTankCamOnRails(player); } else if (player->form == FORM_BLUE_MARINE) { - Aquas_801AA8E8(player); + Aquas_UpdateCamera(player); } break; case LEVELMODE_ALL_RANGE: - func_play_800B7184(player, 0); + Camera_Update360(player, 0); break; case LEVELMODE_UNK_2: - Turret_801A5FC0(player); + Turret_UpdateCamera(player); break; } break; case PLAYERSTATE_1C8_U_TURN: player->camRoll -= player->camRoll * 0.1f; - func_play_800B7184(player, 0); + Camera_Update360(player, 0); break; case PLAYERSTATE_1C8_DOWN: if ((gLevelMode == LEVELMODE_ON_RAILS) && (player->form == FORM_ARWING)) { @@ -6047,7 +6058,7 @@ void Player_UpdateCamera(Player* player) { } } -void func_play_800B73E0(Player* player) { +void Camera_SetupLights(Player* player) { Vec3f sp44; Vec3f sp38; f32 pad; @@ -6169,7 +6180,7 @@ void Play_UpdateLevel(void) { gPlayer[0].csState = 0; gPlayer[0].unk_234 = 1; gPlayer[0].pos.z = 15000.0f; - func_play_800B7184(gPlayer, 1); + Camera_Update360(gPlayer, 1); gFillScreenAlpha = 255; gFillScreenAlphaStep = 255; gFillScreenAlphaTarget = 255; @@ -6221,7 +6232,7 @@ void Play_UpdateLevel(void) { func_hud_8008C104(D_AQ_603158C, D_AQ_602ACC0); break; case LEVEL_SOLAR: - func_play_800A3FEC(); + Play_UpdateDynaFloor(); for (gPathTexScroll; gPathTexScroll >= 10.0f; gPathTexScroll -= 10.0f) { Texture_Scroll(D_SO_6005710, 32, 32, 1); @@ -6282,7 +6293,7 @@ void Play_UpdateLevel(void) { } break; case LEVEL_ZONESS: - func_play_800A3FEC(); + Play_UpdateDynaFloor(); for (gPathTexScroll; gPathTexScroll >= 20.0f; gPathTexScroll -= 20.0f) { Texture_Scroll(D_ZO_602C2CC, 32, 32, 1); } @@ -6290,8 +6301,8 @@ void Play_UpdateLevel(void) { Texture_Scroll(D_ZO_602C2CC, 32, 32, 1); } func_hud_8008C104(D_ZO_602C2CC, D_ZO_600D990); - if (func_play_800A73E4(&sp3C, &sp40, gPlayer[0].cam.eye.x, gPlayer[0].cam.eye.y, - gPlayer[0].cam.eye.z - gPathProgress)) { + if (Play_CheckDynaFloorCollision(&sp3C, &sp40, gPlayer[0].cam.eye.x, gPlayer[0].cam.eye.y, + gPlayer[0].cam.eye.z - gPathProgress)) { gLight1R = 0; gLight1G = 7; gLight1B = 10; @@ -6332,11 +6343,11 @@ void Play_Update(void) { Player_Update(&gPlayer[i]); } Object_Update(); - PlayerShot_Update(); + PlayerShot_UpdateAll(); BonusText_Update(); for (i = 0; i < gCamCount; i++) { gPlayer[i].num = gPlayerNum = i; - Player_UpdateCamera(&gPlayer[i]); + Camera_Update(&gPlayer[i]); } gCameraShakeY = 0.0f; if (gCameraShake != 0) { @@ -6373,8 +6384,8 @@ void Play_SpawnVsItem(ObjectId objId, Item* item) { } } -void func_play_800B86A4(f32* arg0) { - *arg0 += gPathProgress + 15000.0f; +void Play_SetupZPos360(f32* zPos) { + *zPos += gPathProgress + 15000.0f; } void Play_Main(void) { @@ -6407,16 +6418,16 @@ void Play_Main(void) { } Play_ClearObjectData(); if (gCurrentLevel == LEVEL_CORNERIA) { - func_play_800A5338(); + Play_Setup360_CO(); } else if (gCurrentLevel == LEVEL_SECTOR_Y) { - func_play_800A55B0(); + Play_Setup360_SY(); } else if (gCurrentLevel == LEVEL_VENOM_ANDROSS) { - func_play_800A57E0(); + Play_Setup360_AND(); } else if (gCurrentLevel == LEVEL_TRAINING) { - Training_80198C50(); + Training_Setup360(); } - func_play_800B86A4(&gPlayer[0].pos.z); - func_play_800B86A4(&gPlayer[0].trueZpos); + Play_SetupZPos360(&gPlayer[0].pos.z); + Play_SetupZPos360(&gPlayer[0].trueZpos); gPlayer[0].cam.eye.z += 15000.0f; gPlayer[0].cam.at.z += 15000.0f; gPlayer[0].zPath = gPlayer[0].zPathVel = gPathVelZ = gPathProgress = 0.0f; @@ -6433,9 +6444,9 @@ void Play_Main(void) { break; case PLAY_INIT: Play_Init(); - D_800D2F5C = gVolumeSettings[0]; - D_800D2F60 = gVolumeSettings[1]; - D_800D2F64 = gVolumeSettings[2]; + sMusicVolume = gVolumeSettings[AUDIO_TYPE_MUSIC]; + sVoiceVolume = gVolumeSettings[AUDIO_TYPE_VOICE]; + sSfxVolume = gVolumeSettings[AUDIO_TYPE_SFX]; gPlayState = PLAY_UPDATE; break; case PLAY_UPDATE: @@ -6487,9 +6498,9 @@ void Play_Main(void) { for (i = 0; i < 4; i++) { if ((gControllerPress[i].button & R_TRIG) && (gPlayer[i].form != FORM_ON_FOOT)) { if (gShowCrosshairs[i] = 1 - gShowCrosshairs[i]) { - func_enmy_80060F30(gPlayer[i].sfxSource, NA_SE_MAP_WINDOW_OPEN, i); + Object_PlayerSfx(gPlayer[i].sfxSource, NA_SE_MAP_WINDOW_OPEN, i); } else { - func_enmy_80060F30(gPlayer[i].sfxSource, NA_SE_MAP_WINDOW_CLOSE, i); + Object_PlayerSfx(gPlayer[i].sfxSource, NA_SE_MAP_WINDOW_CLOSE, i); } } } diff --git a/src/engine/fox_tank.c b/src/engine/fox_tank.c index 45617862..9def6d08 100644 --- a/src/engine/fox_tank.c +++ b/src/engine/fox_tank.c @@ -54,7 +54,7 @@ void func_tank_80043280(u16* text0, u16* text1, f32 zRot) { Matrix_Pop(&gCalcMatrix); } -void func_tank_80043468(Player* player) { +void Player_UpdateTankCamOnRails(Player* player) { f32 sp54; f32 sp50; f32 sp4C; @@ -236,7 +236,7 @@ s32 func_tank_80044120(Hitbox* hitbox, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f sp34.y = arg2 - arg5; sp34.z = arg3 - arg6; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp34, &sp28); - return func_play_800A78C4(hitbox, arg4, arg5, arg6, sp28.x + arg4, sp28.y + arg5, sp28.z + arg6); + return Play_CheckSingleHitbox(hitbox, arg4, arg5, arg6, sp28.x + arg4, sp28.y + arg5, sp28.z + arg6); } void func_tank_800441C8(Player* player, f32* hitboxData, f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 zRot) { @@ -500,7 +500,7 @@ void func_tank_80044868(Player* player) { func_tank_80043280(D_landmaster_3005EA8, D_TI_6009BB8, gGameFrameCount * -55.0f); } } - func_play_800A46A0(player); + Player_DamageEffects(player); } void func_tank_80045130(Player* player) { @@ -777,7 +777,7 @@ void func_tank_800460E0(Player* player, f32* hitboxData, f32 arg2, f32 arg3, f32 sp88.y = spf94.y - arg3; sp88.z = spf94.z - arg4; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp88, &sp7C); - if (func_play_800A78C4(hitbox, arg2, arg3, arg4, sp7C.x + arg2, sp7C.y + arg3, sp7C.z + arg4)) { + if (Play_CheckSingleHitbox(hitbox, arg2, arg3, arg4, sp7C.x + arg2, sp7C.y + arg3, sp7C.z + arg4)) { player->groundPos.y = arg3 + 20.0f + 3.0f; } } @@ -841,7 +841,7 @@ void func_tank_8004641C(Player* player, s32 arg1, f32 arg2, f32 arg3, f32 arg4, sp84 = sp64.x + arg2; sp80 = sp64.y + arg3; sp7C = sp64.z + arg4; - if (func_play_800A8054(arg1, arg2, arg3, arg4, sp84, sp80, sp7C, &sp58, &sp4C)) { + if (Play_CheckPolyCollision(arg1, arg2, arg3, arg4, sp84, sp80, sp7C, &sp58, &sp4C)) { if (D_MA_801BE250[27] < arg3 + sp58.y) { D_MA_801BE250[27] = arg3 + sp58.y; if (arg1 == OBJ_SCENERY_67) { @@ -852,7 +852,7 @@ void func_tank_8004641C(Player* player, s32 arg1, f32 arg2, f32 arg3, f32 arg4, D_MA_801BE250[28] = sp58.x; D_MA_801BE250[29] = sp58.z; } else if ((arg1 == OBJ_SCENERY_67) && (D_MA_801BE250[27] == 0.0f) && - func_play_800A8054(arg1, arg2 + 20.0f, arg3, arg4, sp84, sp80, sp7C, &sp58, &sp4C)) { + Play_CheckPolyCollision(arg1, arg2 + 20.0f, arg3, arg4, sp84, sp80, sp7C, &sp58, &sp4C)) { player->barrelRoll = 9; player->timer_1E8 = 15; if ((arg6 > 90.0f) && (arg6 < 270.0f)) { @@ -861,7 +861,8 @@ void func_tank_8004641C(Player* player, s32 arg1, f32 arg2, f32 arg3, f32 arg4, player->rollRate = player->baseRollRate = -20; } } - if (func_play_800A8054(arg1, arg2, arg3, arg4, sp84, arg3, sp7C, &sp58, &sp4C) && (D_800C9F10 <= arg3 + sp58.y)) { + if (Play_CheckPolyCollision(arg1, arg2, arg3, arg4, sp84, arg3, sp7C, &sp58, &sp4C) && + (D_800C9F10 <= arg3 + sp58.y)) { D_800C9F10 = arg3 + sp58.y; player->groundPos.x = player->pos.x; player->groundPos.y = D_800C9F10 - 2.0f; @@ -1035,7 +1036,7 @@ s32 func_tank_80046E40(Player* player, f32* hitboxData, s32* index, f32 xPos, f3 var_fv1 = sp88.y + yPos; var_fa0 = sp88.z + zPos; } - if (func_play_800A78C4((Hitbox*) hitboxData, xPos, yPos, zPos, var_fv0, var_fv1, var_fa0)) { + if (Play_CheckSingleHitbox((Hitbox*) hitboxData, xPos, yPos, zPos, var_fv0, var_fv1, var_fa0)) { *index = i + 1; return 1; } @@ -1052,7 +1053,7 @@ s32 func_tank_80046E40(Player* player, f32* hitboxData, s32* index, f32 xPos, f3 var_fv1 = sp88.y + yPos; var_fa0 = sp88.z + zPos; } - if (func_play_800A78C4((Hitbox*) hitboxData, xPos, yPos, zPos, var_fv0, var_fv1, var_fa0)) { + if (Play_CheckSingleHitbox((Hitbox*) hitboxData, xPos, yPos, zPos, var_fv0, var_fv1, var_fa0)) { *index = i + 1; return 2; } @@ -1069,7 +1070,7 @@ s32 func_tank_80046E40(Player* player, f32* hitboxData, s32* index, f32 xPos, f3 var_fv1 = sp88.y + yPos; var_fa0 = sp88.z + zPos; } - if (func_play_800A78C4((Hitbox*) hitboxData, xPos, yPos, zPos, var_fv0, var_fv1, var_fa0)) { + if (Play_CheckSingleHitbox((Hitbox*) hitboxData, xPos, yPos, zPos, var_fv0, var_fv1, var_fa0)) { *index = i + 1; if (hitboxData[-1] == HITBOX_SHADOW) { return -1; @@ -1093,7 +1094,7 @@ s32 func_tank_80046E40(Player* player, f32* hitboxData, s32* index, f32 xPos, f3 var_fv1 = sp88.y + yPos; var_fa0 = sp88.z + zPos; } - if (func_play_800A78C4((Hitbox*) hitboxData, xPos, yPos, zPos, var_fv0, var_fv1, var_fa0)) { + if (Play_CheckSingleHitbox((Hitbox*) hitboxData, xPos, yPos, zPos, var_fv0, var_fv1, var_fa0)) { *index = i + 1; return 4; } @@ -1102,7 +1103,7 @@ s32 func_tank_80046E40(Player* player, f32* hitboxData, s32* index, f32 xPos, f3 return 0; } -void func_tank_80047504(Player* player) { +void Tank_UpdateOnRails(Player* player) { s32 pad; player->unk_204 = 1; @@ -1137,14 +1138,14 @@ void func_tank_80047504(Player* player) { player->boostMeter = 0.0f; } } - func_play_800B41E0(player); + Play_dummy_800B41E0(player); func_tank_80045E7C(player); func_tank_80044868(player); D_800C9F04 = 0; - func_play_800ADF58(player); - func_play_800AD7F0(player); + Player_UpdatePath(player); + Player_Shoot(player); if (gCurrentLevel != LEVEL_MACBETH) { - func_play_800A8BA4(player); + Player_CollisionCheck(player); } else { player->groundPos.x = player->pos.x; player->groundPos.z = player->trueZpos + -10.0f; @@ -1158,7 +1159,7 @@ void func_tank_80047504(Player* player) { func_tank_80046358(player); func_tank_80046260(player); } - func_play_800B415C(player); + Player_LowHealthAlarm(player); if ((player->shields <= 0) && (player->radioDamageTimer != 0)) { Player_Down(player); } @@ -1231,12 +1232,10 @@ label_29: player->rot.x = D_MA_801BE250[13]; // not fake, but weird player->rot.x = D_MA_801BE250[13]; func_tank_80047FBC(player); - } else { - if (((player->pos.x - 150.0f) < D_MA_801BE250[19]) && (D_MA_801BE250[19] < (player->pos.x + 150.0f)) && - ((player->pos.y - 60.0f) < (D_MA_801BE250[12] + 30.0f)) && - ((D_MA_801BE250[12] + 30.0f) < (player->pos.y + 60.0f))) { - func_tank_80047E7C(player, D_MA_801BE250[19], D_MA_801BE250[12] + 30.0f); - } + } else if (((player->pos.x - 150.0f) < D_MA_801BE250[19]) && (D_MA_801BE250[19] < (player->pos.x + 150.0f)) && + ((player->pos.y - 60.0f) < (D_MA_801BE250[12] + 30.0f)) && + ((D_MA_801BE250[12] + 30.0f) < (player->pos.y + 60.0f))) { + func_tank_80047E7C(player, D_MA_801BE250[19], D_MA_801BE250[12] + 30.0f); } } if (!sp2F) { @@ -1339,7 +1338,7 @@ void func_tank_800481F4(Player* player) { s32 pad2; f32 var_fv1; - func_play_800A887C(player); + Player_UpdateHitbox(player); func_tank_800444BC(player); if (player->timer_498 == 0) { for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) { @@ -1355,9 +1354,9 @@ void func_tank_800481F4(Player* player) { if (scenery->info.action == (ObjectFunc) func_enmy_80066EA8) { var_fv1 = 0.0f; } - temp_v0 = func_play_800A7974(player, scenery->info.hitbox, &sp98, scenery->obj.pos.x, - scenery->obj.pos.y, scenery->obj.pos.z, scenery->obj.rot.x, var_fv1, - scenery->obj.rot.z, 0.0f, 0.0f, 0.0f); + temp_v0 = Player_CheckHitboxCollision(player, scenery->info.hitbox, &sp98, scenery->obj.pos.x, + scenery->obj.pos.y, scenery->obj.pos.z, scenery->obj.rot.x, + var_fv1, scenery->obj.rot.z, 0.0f, 0.0f, 0.0f); if (temp_v0 != 0) { if (temp_v0 < 0) { if (temp_v0 == -1) { @@ -1385,9 +1384,9 @@ void func_tank_800481F4(Player* player) { for (i = 0, boss = gBosses; i < ARRAY_COUNT(gBosses); i++, boss++) { if (boss->obj.status == OBJ_ACTIVE) { - temp_v0 = func_play_800A7974(player, boss->info.hitbox, &sp98, boss->obj.pos.x, boss->obj.pos.y, - boss->obj.pos.z, boss->obj.rot.x, boss->obj.rot.y, boss->obj.rot.z, 0.0f, - 0.0f, 0.0f); + temp_v0 = Player_CheckHitboxCollision(player, boss->info.hitbox, &sp98, boss->obj.pos.x, + boss->obj.pos.y, boss->obj.pos.z, boss->obj.rot.x, + boss->obj.rot.y, boss->obj.rot.z, 0.0f, 0.0f, 0.0f); if (temp_v0 != 0) { Player_ApplyDamage(player, temp_v0, boss->info.damage); } @@ -1397,10 +1396,10 @@ void func_tank_800481F4(Player* player) { for (i = 0, actor = gActors; i < ARRAY_COUNT(gActors); i++, actor++) { if ((actor->obj.status == OBJ_ACTIVE) && (actor->timer_0C2 == 0)) { if (actor->obj.id == OBJ_ACTOR_EVENT) { - temp_v0 = func_play_800A7974(player, actor->info.hitbox, &sp98, actor->obj.pos.x, actor->obj.pos.y, - actor->obj.pos.z, actor->obj.rot.x, actor->obj.rot.y, actor->obj.rot.z, - actor->vwork[29].x, actor->vwork[29].y, - actor->vwork[29].z + actor->unk_0F4.z); + temp_v0 = Player_CheckHitboxCollision(player, actor->info.hitbox, &sp98, actor->obj.pos.x, + actor->obj.pos.y, actor->obj.pos.z, actor->obj.rot.x, + actor->obj.rot.y, actor->obj.rot.z, actor->vwork[29].x, + actor->vwork[29].y, actor->vwork[29].z + actor->unk_0F4.z); if (temp_v0 != 0) { Player_ApplyDamage(player, temp_v0, actor->info.damage); actor->dmgType = DMG_COLLISION; @@ -1430,7 +1429,7 @@ void func_tank_800481F4(Player* player) { Player_ApplyDamage(player, 0, 5); player->timer_498 = 1; } - } else if ((actor->obj.id >= 205) && (actor->obj.id < 214)) { + } else if ((OBJ_ACTOR_205 <= actor->obj.id) && (actor->obj.id <= OBJ_ACTOR_213)) { if (func_tank_80046E40(player, actor->info.hitbox, &sp98, actor->fwork[25] + actor->obj.pos.x, actor->fwork[8] + actor->obj.pos.y + 25.0f, actor->obj.pos.z, actor->fwork[29], actor->fwork[26], actor->obj.rot.z, 0.0f, 0.0f, @@ -1459,9 +1458,9 @@ void func_tank_800481F4(Player* player) { } } } else { - temp_v0 = func_play_800A7974(player, actor->info.hitbox, &sp98, actor->obj.pos.x, actor->obj.pos.y, - actor->obj.pos.z, actor->obj.rot.x, actor->obj.rot.y, actor->obj.rot.z, - 0.0f, 0.0f, 0.0f); + temp_v0 = Player_CheckHitboxCollision(player, actor->info.hitbox, &sp98, actor->obj.pos.x, + actor->obj.pos.y, actor->obj.pos.z, actor->obj.rot.x, + actor->obj.rot.y, actor->obj.rot.z, 0.0f, 0.0f, 0.0f); if (temp_v0 != 0) { actor->dmgType = DMG_COLLISION; if ((actor->obj.id == OBJ_ACTOR_225) || (actor->obj.id == OBJ_ACTOR_190)) { @@ -1482,9 +1481,9 @@ void func_tank_800481F4(Player* player) { for (i = 0, sprite = gSprites; i < ARRAY_COUNT(gSprites); i++, sprite++) { if (sprite->obj.status == OBJ_ACTIVE) { if ((player->trueZpos - 200.0f) < sprite->obj.pos.z) { - temp_v0 = - func_play_800A7974(player, sprite->info.hitbox, &sp98, sprite->obj.pos.x, sprite->obj.pos.y, - sprite->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f); + temp_v0 = Player_CheckHitboxCollision(player, sprite->info.hitbox, &sp98, sprite->obj.pos.x, + sprite->obj.pos.y, sprite->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 0.0f); if (temp_v0 != 0) { if ((sprite->obj.id == OBJ_SPRITE_FO_POLE) || (sprite->obj.id == OBJ_SPRITE_CO_POLE) || (sprite->obj.id == OBJ_SPRITE_CO_TREE)) { @@ -1501,5 +1500,5 @@ void func_tank_800481F4(Player* player) { } } } - func_play_800A86E4(player); + Player_CheckItemCollect(player); } diff --git a/src/engine/fox_versus.c b/src/engine/fox_versus.c index 239bbb10..ba25b89e 100644 --- a/src/engine/fox_versus.c +++ b/src/engine/fox_versus.c @@ -822,8 +822,8 @@ s32 Versus_CheckForWinner(void) { if (j == i) { continue; } - if (gPlayer[j].unk_288 >= 0) { - gPlayer[j].unk_288 = i + 1; + if (gPlayer[j].attacker >= 0) { + gPlayer[j].attacker = i + 1; } gPlayer[j].state_1C8 = PLAYERSTATE_1C8_VS_STANDBY; } @@ -863,8 +863,8 @@ s32 Versus_CheckForWinner(void) { if (j == gVsWinner) { continue; } - if (gPlayer[j].unk_288 >= 0) { - gPlayer[j].unk_288 = i + 1; + if (gPlayer[j].attacker >= 0) { + gPlayer[j].attacker = i + 1; } gPlayer[j].state_1C8 = PLAYERSTATE_1C8_VS_STANDBY; } @@ -988,8 +988,8 @@ s32 Versus_CheckForWinner(void) { continue; } - if (gPlayer[j].unk_288 >= 0) { - gPlayer[j].unk_288 = i + 1; + if (gPlayer[j].attacker >= 0) { + gPlayer[j].attacker = i + 1; } gPlayer[j].state_1C8 = PLAYERSTATE_1C8_VS_STANDBY; @@ -1456,7 +1456,7 @@ bool func_versus_800C16A0(s32 arg0) { } void func_versus_800C16D0(void) { - func_play_800ABA08(); + Player_InitVersus(); gVsMatchState = 0; D_80178778 = 0; } @@ -1506,7 +1506,7 @@ bool Versus_Update(void) { break; } if (func_versus_800C16A0(30)) { - func_play_800ABA08(); + Player_InitVersus(); gVsMatchState = 3; func_versus_800C1690(); } diff --git a/src/overlays/ovl_ending/fox_end2.c b/src/overlays/ovl_ending/fox_end2.c index 15b0f9f6..2e0ecb87 100644 --- a/src/overlays/ovl_ending/fox_end2.c +++ b/src/overlays/ovl_ending/fox_end2.c @@ -1053,8 +1053,8 @@ void Ending_801924EC(u32 arg0) { Matrix_LookAt(gGfxMatrix, D_ending_801985D0.x, D_ending_801985D0.y, D_ending_801985D0.z, D_ending_801985E0.x, D_ending_801985E0.y, D_ending_801985E0.z, 0.0f, 1.0f, 0.0f, MTXF_APPLY); - func_play_800B6F50(D_ending_801985D0.x, D_ending_801985D0.y, D_ending_801985D0.z, D_ending_801985E0.x, - D_ending_801985E0.y, D_ending_801985E0.z); + Camera_SetStarfieldPos(D_ending_801985D0.x, D_ending_801985D0.y, D_ending_801985D0.z, D_ending_801985E0.x, + D_ending_801985E0.y, D_ending_801985E0.z); Matrix_GetYRPAngles(gGfxMatrix, &D_ending_801985F0); break; diff --git a/src/overlays/ovl_i1/fox_co.c b/src/overlays/ovl_i1/fox_co.c index a530e5e3..23be8846 100644 --- a/src/overlays/ovl_i1/fox_co.c +++ b/src/overlays/ovl_i1/fox_co.c @@ -239,10 +239,10 @@ void Corneria_80187AC8(Boss* boss) { boss->swork[7] = boss->swork[8] = boss->swork[9] = 1000; boss->info.hitbox[1 + 24] = 100000.0f; for (var_s1 = 3; var_s1 < 6; var_s1++) { - Boss_SpawnActor189(D_i1_8019B6D8[18 + var_s1 + 2], D_i1_8019B6D8[24 + var_s1 + 2], - D_i1_8019B6D8[30 + var_s1 + 2], D_i1_8019B6D8[36 + var_s1 + 2], - D_i1_8019B6D8[42 + var_s1 + 2], D_i1_8019B6D8[48 + var_s1 + 2], 0.0f, - RAND_FLOAT(20.0f), 0.0f, 5.5f, var_s1 + 28, RAND_INT(30.0f) + 60.0f); + Boss_SpawnDebris(D_i1_8019B6D8[18 + var_s1 + 2], D_i1_8019B6D8[24 + var_s1 + 2], + D_i1_8019B6D8[30 + var_s1 + 2], D_i1_8019B6D8[36 + var_s1 + 2], + D_i1_8019B6D8[42 + var_s1 + 2], D_i1_8019B6D8[48 + var_s1 + 2], 0.0f, + RAND_FLOAT(20.0f), 0.0f, 5.5f, var_s1 + 28, RAND_INT(30.0f) + 60.0f); } if (boss->state < 5) { boss->state = 5; @@ -258,10 +258,10 @@ void Corneria_80187AC8(Boss* boss) { boss->info.hitbox[1 + 30] = 100000.0f; for (var_s1 = 0; var_s1 < 3; var_s1++) { - Boss_SpawnActor189(D_i1_8019B6D8[18 + var_s1 + 2], D_i1_8019B6D8[24 + var_s1 + 2], - D_i1_8019B6D8[30 + var_s1 + 2], D_i1_8019B6D8[36 + var_s1 + 2], - D_i1_8019B6D8[42 + var_s1 + 2], D_i1_8019B6D8[48 + var_s1 + 2], 0.0f, - RAND_FLOAT(20.0f), 0.0f, 5.5f, var_s1 + 28, RAND_INT(30.0f) + 60.0f); + Boss_SpawnDebris(D_i1_8019B6D8[18 + var_s1 + 2], D_i1_8019B6D8[24 + var_s1 + 2], + D_i1_8019B6D8[30 + var_s1 + 2], D_i1_8019B6D8[36 + var_s1 + 2], + D_i1_8019B6D8[42 + var_s1 + 2], D_i1_8019B6D8[48 + var_s1 + 2], 0.0f, + RAND_FLOAT(20.0f), 0.0f, 5.5f, var_s1 + 28, RAND_INT(30.0f) + 60.0f); } if (boss->state < 5) { boss->state = 6; @@ -1360,9 +1360,9 @@ void Corneria_8018B58C(Actor* actor) { for (i = 0; i < 4; i++) { - Boss_SpawnActor189(actor->fwork[2 + i], actor->fwork[6 + i], actor->fwork[10 + i], 0.0f, 0.0f, 0.0f, - spB4[i] * (RAND_FLOAT(0.75f) + 0.5f), spA4[i] * (RAND_FLOAT(0.75f) + 0.5f), - RAND_FLOAT_CENTERED(20.0f), 3.0f, i + 24, RAND_INT(30.0f) + 60.0f); + Boss_SpawnDebris(actor->fwork[2 + i], actor->fwork[6 + i], actor->fwork[10 + i], 0.0f, 0.0f, 0.0f, + spB4[i] * (RAND_FLOAT(0.75f) + 0.5f), spA4[i] * (RAND_FLOAT(0.75f) + 0.5f), + RAND_FLOAT_CENTERED(20.0f), 3.0f, i + 24, RAND_INT(30.0f) + 60.0f); } if ((fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 500.0f) && @@ -2887,19 +2887,19 @@ void Corneria_LevelStart(Player* player) { } if (player->csTimer == 70) { actor0->state = 1; - func_play_800A6028(player->sfxSource, NA_SE_ARWING_BOOST); + Play_PlaySfxFirstPlayer(player->sfxSource, NA_SE_ARWING_BOOST); } if (player->csTimer == 50) { actor1->state = 2; - func_play_800A6028(player->sfxSource, NA_SE_ARWING_BOOST); + Play_PlaySfxFirstPlayer(player->sfxSource, NA_SE_ARWING_BOOST); } if (player->csTimer == 30) { actor2->state = 3; - func_play_800A6028(player->sfxSource, NA_SE_ARWING_BOOST); + Play_PlaySfxFirstPlayer(player->sfxSource, NA_SE_ARWING_BOOST); } if (player->csTimer == 0) { player->csState = 9; - func_play_800A6028(player->sfxSource, NA_SE_ARWING_BOOST); + Play_PlaySfxFirstPlayer(player->sfxSource, NA_SE_ARWING_BOOST); player->csTimer = 3; player->unk_194 = 5.0f; player->unk_190 = 5.0f; diff --git a/src/overlays/ovl_i1/fox_tr360.c b/src/overlays/ovl_i1/fox_tr360.c index 75df3f1b..279555b2 100644 --- a/src/overlays/ovl_i1/fox_tr360.c +++ b/src/overlays/ovl_i1/fox_tr360.c @@ -7,7 +7,7 @@ #include "global.h" #include "assets/ast_training.h" -void Training_80198C50(void) { +void Training_Setup360(void) { Scenery360* scenery360; s32 i; @@ -16,21 +16,20 @@ void Training_80198C50(void) { scenery360 = gScenery360; for (i = 0; i < 1000; i++) { - if (gLevelObjects[i].id >= 0) { - if (gLevelObjects[i].id <= 160) { - Scenery360_Initialize(scenery360); - scenery360->obj.status = OBJ_ACTIVE; - scenery360->obj.id = gLevelObjects[i].id; - scenery360->obj.pos.x = gLevelObjects[i].xPos; - scenery360->obj.pos.z = -gLevelObjects[i].zPos1; - scenery360->obj.pos.y = gLevelObjects[i].yPos - RAND_FLOAT_SEEDED(300.0f); - scenery360->obj.rot.y = gLevelObjects[i].rot.y; - Object_SetInfo(&scenery360->info, scenery360->obj.id); - scenery360++; - } - } else { + if (gLevelObjects[i].id <= OBJ_INVALID) { break; } + if (gLevelObjects[i].id < OBJ_SCENERY_MAX) { + Scenery360_Initialize(scenery360); + scenery360->obj.status = OBJ_ACTIVE; + scenery360->obj.id = gLevelObjects[i].id; + scenery360->obj.pos.x = gLevelObjects[i].xPos; + scenery360->obj.pos.z = -gLevelObjects[i].zPos1; + scenery360->obj.pos.y = gLevelObjects[i].yPos - RAND_FLOAT_SEEDED(300.0f); + scenery360->obj.rot.y = gLevelObjects[i].rot.y; + Object_SetInfo(&scenery360->info, scenery360->obj.id); + scenery360++; + } } } diff --git a/src/overlays/ovl_i1/fox_ve1.c b/src/overlays/ovl_i1/fox_ve1.c index 39b4b76f..90a66ba6 100644 --- a/src/overlays/ovl_i1/fox_ve1.c +++ b/src/overlays/ovl_i1/fox_ve1.c @@ -256,7 +256,7 @@ void Venom1_BossTrigger1_Update(Ve1BossTrigger1* this) { s32 i; for (i = 0; i < ARRAY_COUNT(gBosses); i++, boss++) { - if ((boss->obj.status != OBJ_FREE) && (boss->obj.id == OBJ_BOSS_319)) { + if ((boss->obj.status != OBJ_FREE) && (boss->obj.id == OBJ_BOSS_VE1)) { if (boss->obj.pos.z <= this->obj.pos.z) { D_i1_8019C0B8 = (s32) this->obj.rot.x + 1; this->obj.status = OBJ_FREE; @@ -271,7 +271,7 @@ void Venom1_BossTrigger2_Update(Ve1BossTrigger2* this) { s32 i; for (i = 0; i < ARRAY_COUNT(gBosses); i++, boss++) { - if ((boss->obj.status != OBJ_FREE) && (boss->obj.id == OBJ_BOSS_319)) { + if ((boss->obj.status != OBJ_FREE) && (boss->obj.id == OBJ_BOSS_VE1)) { if (boss->obj.pos.z <= this->obj.pos.z) { D_i1_8019C0B8 = 0; this->obj.status = OBJ_FREE; @@ -286,7 +286,7 @@ void Venom1_BossTrigger3_Update(Ve1BossTrigger3* this) { s32 i; for (i = 0; i < ARRAY_COUNT(gBosses); i++, boss++) { - if ((boss->obj.status != OBJ_FREE) && (boss->obj.id == OBJ_BOSS_319)) { + if ((boss->obj.status != OBJ_FREE) && (boss->obj.id == OBJ_BOSS_VE1)) { if (boss->obj.pos.z <= this->obj.pos.z) { D_i1_8019C0BC = (s32) this->obj.rot.x + 1; this->obj.status = OBJ_FREE; @@ -301,7 +301,7 @@ void Venom1_BossTrigger4_Update(Ve1BossTrigger4* this) { s32 i; for (i = 0; i < ARRAY_COUNT(gBosses); i++, boss++) { - if ((boss->obj.status != OBJ_FREE) && (boss->obj.id == OBJ_BOSS_319)) { + if ((boss->obj.status != OBJ_FREE) && (boss->obj.id == OBJ_BOSS_VE1)) { if (boss->obj.pos.z <= this->obj.pos.z) { D_i1_8019C0C0 = 1; this->obj.status = OBJ_FREE; @@ -1074,7 +1074,7 @@ void Venom1_80193D64(s32 limbIndex, Vec3f* rot, void* thisx) { #ifdef NON_MATCHING // Lots of problems with loop at 2082. Seems related to spE8. https://decomp.me/scratch/gOy2L -void Venom1_80194398(Boss* boss) { +void Venom1_Boss_Update(Boss* boss) { s32 is0; Vec3f sp118[27]; Actor* actor; @@ -1296,7 +1296,7 @@ void Venom1_80194398(Boss* boss) { func_effect_8007D2C8(spF8.x, spF8.y, spF8.z, D_i1_8019AD80[is4][2]); } for (is1 = 0; is1 < D_i1_8019AD80[is4][0]; is1++) { - actor = func_game_800A3608(OBJ_ACTOR_189); + actor = Game_SpawnActor(OBJ_ACTOR_DEBRIS); if (actor != NULL) { actor->obj.status = OBJ_ACTIVE; actor->obj.pos.x = spF8.x + RAND_FLOAT_CENTERED(60.0f); @@ -1323,7 +1323,7 @@ void Venom1_80194398(Boss* boss) { } } for (is1 = 0; is1 < D_i1_8019AD80[is4][1]; is1++) { - actor = func_game_800A3608(OBJ_ACTOR_189); + actor = Game_SpawnActor(OBJ_ACTOR_DEBRIS); if (actor != NULL) { actor->obj.status = OBJ_ACTIVE; actor->obj.pos.x = spF8.x + RAND_FLOAT_CENTERED(60.0f); @@ -1357,7 +1357,7 @@ void Venom1_80194398(Boss* boss) { spF8.y += boss->obj.pos.y + RAND_FLOAT_CENTERED(60.0f); spF8.z += boss->obj.pos.z; for (is1 = 0; is1 < 5; is1++) { - actor = func_game_800A3608(OBJ_ACTOR_189); + actor = Game_SpawnActor(OBJ_ACTOR_DEBRIS); if (actor != NULL) { actor->obj.status = OBJ_ACTIVE; actor->obj.pos.x = spF8.x + RAND_FLOAT_CENTERED(60.0f); @@ -1384,7 +1384,7 @@ void Venom1_80194398(Boss* boss) { D_i1_8019B838[spF4].unk_7C &= ~0x10; } if (D_i1_8019B838[spF4].unk_7C & 0x40) { - actor = func_game_800A3608(OBJ_ACTOR_189); + actor = Game_SpawnActor(OBJ_ACTOR_DEBRIS); if (actor != NULL) { actor->obj.status = OBJ_ACTIVE; actor->obj.pos.x = boss->obj.pos.x + D_i1_8019B838[spF4].unk_0C[0].x; @@ -1419,7 +1419,7 @@ void Venom1_80194398(Boss* boss) { actor->gravity = 2.0f; } for (is1 = 0; is1 < 6; is1++) { - actor = func_game_800A3608(OBJ_ACTOR_189); + actor = Game_SpawnActor(OBJ_ACTOR_DEBRIS); if (actor != NULL) { actor->obj.status = OBJ_ACTIVE; actor->obj.pos.x = boss->obj.pos.x + D_i1_8019B838[spF4].unk_0C[0].x; @@ -2316,8 +2316,8 @@ void Venom1_80194398(Boss* boss) { } } #else -void Venom1_80194398(Boss* boss); -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i1/fox_ve1/Venom1_80194398.s") +void Venom1_Boss_Update(Boss* boss); +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i1/fox_ve1/Venom1_Boss_Update.s") #endif void Venom1_80198310(Boss* boss) { @@ -2361,7 +2361,7 @@ void Venom1_80198594(Boss* boss) { } } -void Venom1_801985E4(Boss* boss) { +void Venom1_Boss_Draw(Boss* boss) { if (boss->swork[26] == 0) { Animation_DrawSkeleton(0, D_VE1_901C0F4, boss->vwork, Venom1_801937F4, Venom1_80193D64, boss, &gIdentityMatrix); } @@ -2381,7 +2381,7 @@ void Venom1_8019864C(PlayerShot* shot) { boss = gBosses; for (i = 0; i < ARRAY_COUNT(gBosses); i++, boss++) { - if ((boss->obj.id == OBJ_BOSS_319) && (boss->obj.status == OBJ_ACTIVE) && (boss->timer_05A == 0)) { + if ((boss->obj.id == OBJ_BOSS_VE1) && (boss->obj.status == OBJ_ACTIVE) && (boss->timer_05A == 0)) { temp_fs1 = shot->scale * 30.0f; hitboxData = boss->info.hitbox; count = *hitboxData++; diff --git a/src/overlays/ovl_i2/fox_sx.c b/src/overlays/ovl_i2/fox_sx.c index 539c916a..ccdfd779 100644 --- a/src/overlays/ovl_i2/fox_sx.c +++ b/src/overlays/ovl_i2/fox_sx.c @@ -134,7 +134,7 @@ void SectorX_8018F330(Actor* actor) { if (actor->timer_0BC == 0) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ACTIVE; if (gPlayer[0].cockpitView) { - func_play_800B5D30(&gPlayer[0], 1); + Camera_UpdateCockpitOnRails(&gPlayer[0], 1); } gProjectFar = 12800.0f; Object_Kill(&gActors[50].obj, gActors[50].sfxSource); @@ -229,7 +229,7 @@ void SectorX_8018FBBC(Vec3f* pos) { (actor->scale < 0.0f) && Object_CheckHitboxCollision(pos, actor->info.hitbox, &actor->obj, actor->vwork[29].x, actor->vwork[29].y, actor->vwork[29].z + actor->unk_0F4.z)) { - func_play_800A6028(actor->sfxSource, NA_SE_SLIPPY_HIT); + Play_PlaySfxFirstPlayer(actor->sfxSource, NA_SE_SLIPPY_HIT); actor->state = 1000; xRot = Math_Atan2F(actor->obj.pos.x - pos->x, actor->obj.pos.z - pos->z); yRot = -Math_Atan2F(actor->obj.pos.y - pos->y, @@ -410,7 +410,7 @@ void SectorX_80190078(Boss* boss) { func_effect_8007C120(boss->obj.pos.x, boss->obj.pos.y + 334.0f, -237.0f + boss->obj.pos.z, boss->vel.x, boss->vel.y, boss->vel.z, 0.15f, 70); for (i = 0; i < 10; i++) { - func_play_800A69F8(4, boss->obj.pos.x, boss->obj.pos.y + 334.0f, -237.0f + boss->obj.pos.z); + Play_SpawnDebris(4, boss->obj.pos.x, boss->obj.pos.y + 334.0f, -237.0f + boss->obj.pos.z); } func_effect_8007A6F0(&boss->obj.pos, NA_SE_EN_EXPLOSION_L); @@ -462,7 +462,7 @@ void SectorX_80190078(Boss* boss) { boss->vel.x, boss->vel.y, boss->vel.z, 0.15f, 70); for (i = 0; i < 10; i++) { - func_play_800A69F8(4, boss->obj.pos.x, boss->obj.pos.y + 334.0f, -237.0f + boss->obj.pos.z); + Play_SpawnDebris(4, boss->obj.pos.x, boss->obj.pos.y + 334.0f, -237.0f + boss->obj.pos.z); } boss->swork[4] = 2; @@ -702,14 +702,14 @@ void SectorX_80190078(Boss* boss) { sp74.y = boss->fwork[9] + boss->obj.pos.y; sp74.z = boss->fwork[10] + boss->obj.pos.z; - func_edisplay_8005F0E8(D_i2_80195D88, &sp74); + Object_SetSfxSourceToPos(D_i2_80195D88, &sp74); AUDIO_PLAY_SFX(NA_SE_EN_SZMIS_ENGINE, D_i2_80195D88, 4); sp74.x = boss->fwork[11] + boss->obj.pos.x; sp74.y = boss->fwork[12] + boss->obj.pos.y; sp74.z = boss->fwork[13] + boss->obj.pos.z; - func_edisplay_8005F0E8(D_i2_80195D98, &sp74); + Object_SetSfxSourceToPos(D_i2_80195D98, &sp74); AUDIO_PLAY_SFX(NA_SE_EN_SZMIS_ENGINE, D_i2_80195D98, 4); Math_SmoothStepToF(&boss->fwork[27], 30.0f, 0.05f, 1.0f, 0); diff --git a/src/overlays/ovl_i3/fox_a6.c b/src/overlays/ovl_i3/fox_a6.c index ed9e797c..17f943ec 100644 --- a/src/overlays/ovl_i3/fox_a6.c +++ b/src/overlays/ovl_i3/fox_a6.c @@ -529,7 +529,7 @@ void Area6_BossA6_Init(BossA6* this) { AUDIO_PLAY_SFX(NA_SE_EN_SHIELD_ROLL_LEVEL, this->sfxSource, 4); } -void Area6_80187944(Boss* bossA6) { +void Area6_Boss_Update(Boss* bossA6) { s32 i; s32 pad; s32 var_s0; @@ -1717,7 +1717,7 @@ void Area6_8018B9BC(Boss* bossA6) { if (D_i3_801C2250[A6_BSS_0] == 0) { for (i = 3, j = 15; j < 18; j++, i++) { if (bossA6->swork[A6_SWK_0 + j] != 0) { - if ((D_ctx_8017812C != 0) && (gPlayerShots[15].unk_64 > 0)) { + if ((D_ctx_8017812C != 0) && (gPlayerShots[15].timer > 0)) { bossA6->swork[A6_SWK_0 + j] -= bossA6->damage; } else if (i + 1 == bossA6->dmgPart) { bossA6->swork[A6_SWK_0 + j] -= bossA6->damage; @@ -1870,7 +1870,7 @@ void Area6_8018C0D0(f32* arg0, f32 arg1, Vec3f* arg2, f32 arg3, s32 arg4) { Matrix_Pop(&gGfxMatrix); } -void Area6_8018C54C(Boss* bossA6) { +void Area6_Boss_Draw(Boss* bossA6) { Vec3f spD0[30]; Vec3f spC4; Vec3f spB8; @@ -2067,7 +2067,7 @@ void Area6_8018D3CC(s32 arg0, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, s32 i; for (i = 0; i < 10; i++) { - if (gPlayerShots[i].obj.status == 0) { + if (gPlayerShots[i].obj.status == SHOT_FREE) { PlayerShot_Initialize(&gPlayerShots[i]); gPlayerShots[i].vel.z = zVel; gPlayerShots[i].vel.x = xVel; @@ -2075,14 +2075,14 @@ void Area6_8018D3CC(s32 arg0, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, gPlayerShots[i].obj.pos.x = xPos; gPlayerShots[i].obj.pos.y = yPos; gPlayerShots[i].obj.pos.z = zPos; - gPlayerShots[i].obj.status = OBJ_INIT; + gPlayerShots[i].obj.status = SHOT_ACTIVE; gPlayerShots[i].obj.rot.x = xRot + 180.0f; gPlayerShots[i].obj.rot.y = yRot; gPlayerShots[i].obj.rot.z = -zRot; gPlayerShots[i].unk_58 = 1; gPlayerShots[i].unk_60 = 0; - gPlayerShots[i].obj.id = PLAYERSHOT_1; - gPlayerShots[i].unk_64 = 150; + gPlayerShots[i].obj.id = PLAYERSHOT_TWIN_LASER; + gPlayerShots[i].timer = 150; gPlayerShots[i].sourceId = CS_SHOT_ID; AUDIO_PLAY_SFX(NA_SE_ARWING_SHOT_F, gPlayerShots[i].sfxSource, 4); diff --git a/src/overlays/ovl_i3/fox_aq.c b/src/overlays/ovl_i3/fox_aq.c index 435d50c8..569be961 100644 --- a/src/overlays/ovl_i3/fox_aq.c +++ b/src/overlays/ovl_i3/fox_aq.c @@ -335,11 +335,11 @@ void Aquas_801A92EC(Actor* actor, f32 xUnk, f32 yUnk, f32 zUnk, s32 index, s32 m gTexturedLines[index].timer = 3; } -void Aquas_801A9374(Actor* actor, Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32 state, f32 scale, - s32 timerBC, s32 unk48) { +void Aquas_SetupDebris(Actor* actor, Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32 state, f32 scale, + s32 timerBC, s32 unk48) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_189; + actor->obj.id = OBJ_ACTOR_DEBRIS; actor->state = state; actor->scale = scale; actor->unk_048 = unk48; @@ -353,13 +353,13 @@ void Aquas_801A9374(Actor* actor, Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f3 Object_SetInfo(&actor->info, actor->obj.id); } -void Aquas_801A9448(Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32 unkB8, f32 scale, s32 timerBC, - s32 unk48) { +void Aquas_SpawnDebris(Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32 state, f32 scale, s32 timerBC, + s32 unk48) { s32 i; for (i = ARRAY_COUNT(gActors) - 1; i >= 0; i--) { if (gActors[i].obj.status == OBJ_FREE) { - Aquas_801A9374(&gActors[i], pos, rot, xVel, yVel, zVel, unkB8, scale, timerBC, unk48); + Aquas_SetupDebris(&gActors[i], pos, rot, xVel, yVel, zVel, state, scale, timerBC, unk48); break; } } @@ -537,7 +537,7 @@ void Aquas_801A9C98(Player* player) { D_i3_801C4190[0] = D_i3_801C4190[3] = D_i3_801C4190[5] = D_i3_801C4190[1] = 0; } else { var_v0 = 1; - if (actor->info.hitbox[1] == 200000.0f) { + if (actor->info.hitbox[1] == HITBOX_ROTATED) { var_v0 = 5; } D_i3_801C41B8[2] = actor->obj.pos.z + actor->info.hitbox[var_v0 + 0] + actor->info.hitbox[var_v0 + 1]; @@ -783,7 +783,7 @@ void Aquas_801AA4BC(Player* player) { } } -void Aquas_801AA8E8(Player* player) { +void Aquas_UpdateCamera(Player* player) { f32 var_fv0 = gInputPress->stick_x; f32 var_fv1 = -gInputPress->stick_y; f32 temp; @@ -811,7 +811,7 @@ void Aquas_801AA8E8(Player* player) { gCsCamAtX -= player->unk_030 * 0.5f; gCsCamAtX += player->xPath; gCsCamAtY = (player->pos.y - player->yPath) * (750.0f / player->pathHeight); - gCsCamAtY += player->unk_060 * 10.0f; + gCsCamAtY += player->xRock * 10.0f; gCsCamAtY -= player->unk_02C * -0.55f; gCsCamAtY += player->yPath + D_i3_801C41B8[10]; @@ -837,7 +837,7 @@ void Aquas_801AA8E8(Player* player) { Math_SmoothStepToF(&player->camRoll, temp * 0.3f, 0.1f, 1.5f, 0.0f); } -void Aquas_801AACF8(Player* player) { +void Aquas_BlueMarineMove(Player* player) { Vec3f sp8C; Vec3f sp80; Vec3f sp74; @@ -1022,7 +1022,7 @@ void Aquas_801AACF8(Player* player) { player->pos.z += player->vel.z; player->trueZpos = player->pos.z; - player->unk_060 = SIN_DEG(player->rockPhase * 0.7f) * 0.5f; + player->xRock = SIN_DEG(player->rockPhase * 0.7f) * 0.5f; player->bobPhase += 10.0f; player->rockPhase += 8.0f + D_i3_801C41B8[24]; player->yBob = -SIN_DEG(player->bobPhase) * 0.5f; @@ -1073,29 +1073,29 @@ void Aquas_801ABA40(PlayerShot* shot) { if ((fabsf(shot->obj.pos.z - (gPlayer[0].cam.eye.z - gPathProgress)) > 10000.0f) || (fabsf(shot->obj.pos.y - gPlayer[0].cam.eye.y) > 1500.0f) || ((fabsf(shot->obj.pos.x - gPlayer[0].cam.eye.x) > 4000.0f) && (shot->unk_5C != 0))) { - shot->unk_64 = 0; + shot->timer = 0; } if (shot->obj.pos.y < gGroundHeight) { shot->obj.pos.y = gGroundHeight + 2.0f; - func_beam_800365E4(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.0f, 90.0f, 2.0f, 0, - 0); + PlayerShot_SpawnEffect344(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.0f, 90.0f, + 2.0f, 0, 0); func_effect_8007CF30(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 1.2f); D_i3_801C4190[5] = D_i3_801C4190[3] = 0; - func_beam_80036318(shot); - } else if (((shot->unk_64 == 0) || (D_i3_801C4454 == 0)) && (shot->unk_5C != 0)) { + PlayerShot_Impact(shot); + } else if (((shot->timer == 0) || (D_i3_801C4454 == 0)) && (shot->unk_5C != 0)) { func_effect_8007CF30(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 1.2f); D_i3_801C41B8[21] = D_i3_801C41B8[22] = D_i3_801C41B8[23] = 0.0f; D_i3_801C4190[5] = D_i3_801C4190[3] = 0; - func_beam_80036318(shot); + PlayerShot_Impact(shot); } else { Math_SmoothStepToF(&shot->unk_48, 50.0f, 0.2f, 10.0f, 0.00001f); shot->obj.rot.z += shot->unk_48; if (((gGameFrameCount % 2) == 0)) { - func_beam_80035DEC(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z); + PlayerShot_SpawnEffect351(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z); } - func_beam_80038140(shot); + PlayerShot_CollisionCheck(shot); shot->vec_2C.x = (shot->obj.pos.y * 0.01f) + 1.2f; shot->vec_2C.y = (shot->obj.pos.y * 0.003f) + 0.6f; @@ -1107,7 +1107,7 @@ void Aquas_801ABA40(PlayerShot* shot) { switch (shot->unk_5C) { case 0: - shot->unk_64 = 50; + shot->timer = 50; shot->obj.rot.y = gPlayer[0].rot.y; shot->obj.rot.x = gPlayer[0].rot.x; shot->unk_5C++; @@ -1122,14 +1122,14 @@ void Aquas_801ABA40(PlayerShot* shot) { sp70 = Math_RadToDeg(-Math_Atan2F(sp78, sqrtf(SQ(sp7C) + SQ(sp74)))); Math_SmoothStepToAngle(&shot->obj.rot.y, sp6C, 1.0f, 100.0f, 0.00001f); Math_SmoothStepToAngle(&shot->obj.rot.x, sp70, 1.0f, 100.0f, 0.00001f); - if (shot->unk_64 < 2) { + if (shot->timer < 2) { if (D_i3_801C4458 < -30.0f) { D_i3_801C4458 += 20.0f; } if (D_i3_801C445C < 1.0f) { D_i3_801C445C += 0.25f; } - shot->unk_64 = 10; + shot->timer = 10; } } @@ -1170,13 +1170,13 @@ void Aquas_801ABA40(PlayerShot* shot) { } } -void Aquas_801AC09C(Player* player) { +void Aquas_BlueMarineTorpedo(Player* player) { s32 i; PlayerShot* shot; for (i = 15, shot = &gPlayerShots[15]; i < ARRAY_COUNT(gPlayerShots); i++, shot++) { - if (shot->obj.status == OBJ_FREE) { - func_play_800AC290(player, shot, 0.0f, 0.0f, PLAYERSHOT_8, 50.0f); + if (shot->obj.status == SHOT_FREE) { + Player_SetupArwingShot(player, shot, 0.0f, 0.0f, PLAYERSHOT_LOCK_ON, 50.0f); AUDIO_PLAY_SFX(NA_SE_MAR_BOMB_SHOT, shot->sfxSource, 0); D_i3_801C4190[5] = i + 1; D_i3_801C4454 = 300; @@ -1188,12 +1188,12 @@ void Aquas_801AC09C(Player* player) { } } -void Aquas_801AC18C(Player* player) { +void Aquas_BlueMarineLaser(Player* player) { s32 i; for (i = 0; i < 3; i++) { - if (gPlayerShots[i].obj.status == OBJ_FREE) { - func_play_800AC290(player, &gPlayerShots[i], 0.0f, -10.0f, PLAYERSHOT_0, 120.0f); + if (gPlayerShots[i].obj.status == SHOT_FREE) { + Player_SetupArwingShot(player, &gPlayerShots[i], 0.0f, -10.0f, PLAYERSHOT_SINGLE_LASER, 120.0f); if (gLaserStrength[gPlayerNum] == LASERS_SINGLE) { AUDIO_PLAY_SFX(NA_SE_MAR_SHOT, gPlayerShots[i].sfxSource, 0); } else { @@ -1204,7 +1204,7 @@ void Aquas_801AC18C(Player* player) { } } -void Aquas_801AC274(Player* player) { +void Aquas_BlueMarineShoot(Player* player) { s32 temp; s32 i; f32 tempy1; @@ -1216,7 +1216,7 @@ void Aquas_801AC274(Player* player) { Vec3f sp5C; Actor* actor; - if ((gPlayerShots[D_i3_801C4190[5] - 1].obj.status == OBJ_FREE) && (D_i3_801C4190[5] != 0)) { + if ((gPlayerShots[D_i3_801C4190[5] - 1].obj.status == SHOT_FREE) && (D_i3_801C4190[5] != 0)) { D_i3_801C41B8[21] = D_i3_801C41B8[22] = D_i3_801C41B8[23] = 0.0f; D_i3_801C4190[5] = D_i3_801C4190[3] = 0; } @@ -1246,7 +1246,7 @@ void Aquas_801AC274(Player* player) { temp = D_i3_801C4190[0]; for (i = 0, actor = gActors; i < ARRAY_COUNT(gActors); i++, actor++) { - if ((actor->obj.status == OBJ_ACTIVE) && (actor->obj.id != OBJ_ACTOR_189)) { + if ((actor->obj.status == OBJ_ACTIVE) && (actor->obj.id != OBJ_ACTOR_DEBRIS)) { var_v1 = 1; if (actor->info.hitbox[1] == HITBOX_ROTATED) { var_v1 = 5; @@ -1286,11 +1286,11 @@ void Aquas_801AC274(Player* player) { } if (gInputPress->button & A_BUTTON) { - Aquas_801AC18C(player); + Aquas_BlueMarineLaser(player); } if (gInputPress->button & B_BUTTON) { - Aquas_801AC09C(player); + Aquas_BlueMarineTorpedo(player); if (D_i3_801C4190[0] != 0) { D_i3_801C4190[3] = 1; } @@ -1428,7 +1428,7 @@ void Aquas_801ACBB4(Player* player) { Matrix_Pop(&gGfxMatrix); } -void Aquas_801ACE50(Player* player) { +void Aquas_BlueMarineBoost(Player* player) { f32 pad; f32 pad2; Vec3f sp54; @@ -1513,7 +1513,7 @@ void Aquas_801ACE50(Player* player) { Math_SmoothStepToF(&player->camDist, 0.0f, 0.1f, 2.0f, 0.0f); } -void Aquas_801AD328(Player* player) { +void Aquas_BlueMarineBrake(Player* player) { player->sfx.brake = 0; if ((gBrakeButton[player->num] & gInputHold->button) && (player->unk_230 == 0) && (player->state_1C8 != PLAYERSTATE_1C8_U_TURN) && (player->boostCooldown == 0)) { @@ -2509,7 +2509,7 @@ void Aquas_BossAq_Init(BossAQ* this) { // loop at 2854 unrolls incorrectly // sp100 shouldn't be on the stack // https://decomp.me/scratch/M6ghQ -void Aquas_801B134C(Boss* bossAQ) { +void Aquas_Boss_Update(Boss* bossAQ) { s32 i; s32 i2; s32 i3; @@ -3308,8 +3308,8 @@ void Aquas_801B134C(Boss* bossAQ) { } } #else -void Aquas_801B134C(Boss* bossAQ); -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/fox_aq/Aquas_801B134C.s") +void Aquas_Boss_Update(Boss* bossAQ); +#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/fox_aq/Aquas_Boss_Update.s") #endif bool Aquas_801B42AC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { @@ -3575,7 +3575,7 @@ void Aquas_801B49DC(s32 limbIndex, Vec3f* rot, void* thisx) { } // OBJ_BOSS_AQ draw -void Aquas_801B4D84(Boss* bossAQ) { +void Aquas_Boss_Draw(Boss* bossAQ) { Animation_DrawSkeleton(3, D_AQ_602BD60, bossAQ->vwork, Aquas_801B42AC, Aquas_801B49DC, bossAQ, gCalcMatrix); } @@ -3767,8 +3767,8 @@ void Aquas_801B50E8(Actor* actor) { case 7: for (i = 0; i < 8; i++) { - Aquas_801A9448(&actor->vwork[i], &actor->vwork[8 + i], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(5.0f), - RAND_FLOAT_CENTERED(10.0f), 49, actor->scale, 200, i); + Aquas_SpawnDebris(&actor->vwork[i], &actor->vwork[8 + i], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(5.0f), + RAND_FLOAT_CENTERED(10.0f), 49, actor->scale, 200, i); func_effect_8007BC7C(actor->vwork[i].x, actor->vwork[i].y, actor->vwork[i].z + 100.0f, 6.0f); } actor->itemDrop = DROP_NONE; @@ -3977,8 +3977,8 @@ void Aquas_801B638C(Actor* actor) { if (actor->health == 0) { for (i = 0; i < 9; i++) { - Aquas_801A9448(&actor->vwork[i], &actor->vwork[9 + i], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(5.0f), - RAND_FLOAT_CENTERED(10.0f), 48, actor->scale, 200, i); + Aquas_SpawnDebris(&actor->vwork[i], &actor->vwork[9 + i], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(5.0f), + RAND_FLOAT_CENTERED(10.0f), 48, actor->scale, 200, i); func_effect_8007BC7C(actor->vwork[i].x, actor->vwork[i].y, actor->vwork[i].z, 10.0f); } @@ -4167,8 +4167,8 @@ void Aquas_801B6FF8(Actor* actor) { actor->itemDrop = DROP_SILVER_RING_50p; Actor_Despawn(actor); for (i = 0; i < 15; i++) { - Aquas_801A9448(&actor->vwork[i], &actor->vwork[15 + i], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(5.0f), - RAND_FLOAT_CENTERED(10.0f), 51, actor->scale, 200, i); + Aquas_SpawnDebris(&actor->vwork[i], &actor->vwork[15 + i], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(5.0f), + RAND_FLOAT_CENTERED(10.0f), 51, actor->scale, 200, i); func_effect_800815DC(); func_effect_8007D0E0(actor->vwork[i].x, actor->vwork[i].y, actor->vwork[i].z + 100.0f, 6.0f); } @@ -4398,8 +4398,8 @@ void Aquas_801B7C78(Actor* actor) { } for (i = 0; i < 10; i++) { - Aquas_801A9448(&actor->vwork[0 + i], &actor->vwork[10 + i], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(5.0f), - RAND_FLOAT_CENTERED(10.0f), 52, actor->scale, 200, i); + Aquas_SpawnDebris(&actor->vwork[0 + i], &actor->vwork[10 + i], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(5.0f), + RAND_FLOAT_CENTERED(10.0f), 52, actor->scale, 200, i); func_effect_8007BC7C(actor->vwork[0 + i].x, actor->vwork[0 + i].y, actor->vwork[0 + i].z + 100.0f, 6.0f); } @@ -4825,8 +4825,8 @@ void Aquas_801B91A4(Actor* actor) { } for (i = RAND_INT(10.0f); i < 13; i++) { - Aquas_801A9448(&actor->vwork[0 + i], &actor->vwork[13 + i], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(5.0f), - RAND_FLOAT_CENTERED(10.0f), 53, actor->scale, 200, i); + Aquas_SpawnDebris(&actor->vwork[0 + i], &actor->vwork[13 + i], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(5.0f), + RAND_FLOAT_CENTERED(10.0f), 53, actor->scale, 200, i); func_effect_8007BC7C(actor->vwork[0 + i].x, actor->vwork[0 + i].y, actor->vwork[0 + i].z + 100.0f, 6.0f); } @@ -5237,8 +5237,8 @@ void Aquas_801BA6A4(Actor* actor) { } } else { for (i = 0; i < 4; i++) { - Aquas_801A9448(&actor->obj.pos, &actor->obj.rot, RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT(5.0f), - RAND_FLOAT_CENTERED(10.0f), 54, 0.1f, 200, i); + Aquas_SpawnDebris(&actor->obj.pos, &actor->obj.rot, RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT(5.0f), + RAND_FLOAT_CENTERED(10.0f), 54, 0.1f, 200, i); } } func_effect_8007BC7C(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 130.0f, actor->scale * 30.0f); @@ -5287,8 +5287,8 @@ void Aquas_801BADF8(Actor* actor) { case 2: for (i = 0; i < 5; i++) { - Aquas_801A9448(&actor->vwork[0 + i], &actor->vwork[5 + i], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(5.0f), - RAND_FLOAT_CENTERED(10.0f), 55, actor->scale, 200, i); + Aquas_SpawnDebris(&actor->vwork[0 + i], &actor->vwork[5 + i], RAND_FLOAT_CENTERED(20.0f), + RAND_FLOAT(5.0f), RAND_FLOAT_CENTERED(10.0f), 55, actor->scale, 200, i); func_effect_8007BC7C(actor->vwork[0 + i].x, actor->vwork[0 + i].y, actor->vwork[0 + i].z + 100.0f, 6.0f); } @@ -5898,7 +5898,7 @@ void Aquas_801BC9A0(Actor* actor) { case 3: for (i = 0; i < 2; i++) { for (j = 0; j < ARRAY_COUNT(gActors); j++) { - if ((gActors[j].obj.status == OBJ_ACTIVE) && (gActors[j].obj.id == OBJ_ACTOR_189) && + if ((gActors[j].obj.status == OBJ_ACTIVE) && (gActors[j].obj.id == OBJ_ACTOR_DEBRIS) && (gActors[j].state == 58)) { Object_Kill(&gActors[j].obj, gActors[j].sfxSource); break; @@ -5937,8 +5937,8 @@ void Aquas_801BC9A0(Actor* actor) { } for (j = 0; j < 10; j++) { - Aquas_801A9448(&actor->vwork[4], &actor->vwork[5], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(5.0f), - RAND_FLOAT_CENTERED(10.0f), 58, 0.2f + RAND_FLOAT(1.0f), 200, 0); + Aquas_SpawnDebris(&actor->vwork[4], &actor->vwork[5], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(5.0f), + RAND_FLOAT_CENTERED(10.0f), 58, 0.2f + RAND_FLOAT(1.0f), 200, 0); func_effect_8007BC7C(actor->vwork[4].x, actor->vwork[4].y, actor->vwork[4].z + 50.0f, 6.0f); } @@ -6488,11 +6488,11 @@ void Aquas_801BEB1C(Actor* actor) { } // OBJ_BOSS_301 action -void Aquas_801BEC50(Boss* boss301) { +void Aquas_Boss301_Update(Boss* boss301) { } // OBJ_BOSS_301 draw -void Aquas_801BEC5C(Boss* boss301) { +void Aquas_Boss301_Draw(Boss* boss301) { } // OBJ_ACTOR_188 action @@ -6503,7 +6503,7 @@ void Aquas_801BEC68(Actor* actor) { void Aquas_801BEC74(Actor* actor) { } -void Aquas_801BEC80(Player* player) { +void Aquas_Update360(Player* player) { } void Aquas_801BEC8C(void* arg0) { diff --git a/src/overlays/ovl_i3/fox_so.c b/src/overlays/ovl_i3/fox_so.c index fdc00b24..47a10c3d 100644 --- a/src/overlays/ovl_i3/fox_so.c +++ b/src/overlays/ovl_i3/fox_so.c @@ -252,10 +252,10 @@ void Solar_8019EA7C(Actor* actor) { } if ((actor->unk_046 == 0) || (actor->unk_046 == 1)) { actor->unk_046 = 3; - func_edisplay_8005F0E8(actor->sfxSource, &actor->obj.pos); + Object_SetSfxSourceToPos(actor->sfxSource, &actor->obj.pos); AUDIO_PLAY_SFX(NA_SE_OB_MAGMA_WAVE, actor->sfxSource, 0); } - if (func_play_800A73E4(&sp34, &sp30, actor->obj.pos.x, -100.0f, actor->obj.pos.z)) { + if (Play_CheckDynaFloorCollision(&sp34, &sp30, actor->obj.pos.x, -100.0f, actor->obj.pos.z)) { D_ctx_801782EC[sp30] = actor->fwork[0]; D_ctx_801782EC[sp30 + 1] = actor->fwork[0] * 0.95f; D_ctx_801782EC[sp30 - 1] = actor->fwork[0] * 0.95f; @@ -419,7 +419,7 @@ void Solar_8019F20C(Actor* actor) { case 1: actor->state = 2; actor->vel.y = actor->fwork[0]; - func_play_800A73E4(&sp8C, &sp88, actor->obj.pos.x, actor->obj.pos.y - 100.0f, actor->obj.pos.z); + Play_CheckDynaFloorCollision(&sp8C, &sp88, actor->obj.pos.x, actor->obj.pos.y - 100.0f, actor->obj.pos.z); actor->obj.pos.y = sp8C; for (i = 0; i < 4; i++) { Solar_8019E9F4(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, D_i3_801BF8E0[i], @@ -430,7 +430,7 @@ void Solar_8019F20C(Actor* actor) { break; case 2: actor->gravity = 0.5f; - if (func_play_800A73E4(&sp8C, &sp88, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z)) { + if (Play_CheckDynaFloorCollision(&sp8C, &sp88, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z)) { Object_Kill(&actor->obj, actor->sfxSource); func_effect_8007A6F0(&actor->obj.pos, NA_SE_OB_SNROCK_DISAPPEAR); for (i = 0; i < 4; i++) { @@ -665,7 +665,7 @@ void Solar_801A003C(Actor* actor) { actor->state = 0; actor->timer_0BE = 50; actor->unk_04E = 0; - func_edisplay_8005F0E8(actor->sfxSource, &actor->obj.pos); + Object_SetSfxSourceToPos(actor->sfxSource, &actor->obj.pos); AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, actor->sfxSource, 4); } break; @@ -704,7 +704,7 @@ void Solar_801A0120(Effect* effect) { Object_Kill(&effect->obj, effect->sfxSource); } sp48 = effect->unk_48; - if (func_play_800A73E4(&sp5C, &sp4C, effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z)) { + if (Play_CheckDynaFloorCollision(&sp5C, &sp4C, effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z)) { effect->unk_48 = 1; if (effect->scale2 == 20.0f) { AUDIO_PLAY_SFX(NA_SE_EN_IN_PROMINENCE, effect->sfxSource, 4); @@ -775,7 +775,7 @@ void Solar_801A0120(Effect* effect) { effect->obj.rot.z = 0.0f; } sp48 = effect->unk_48; - if (func_play_800A73E4(&sp5C, &sp4C, effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z)) { + if (Play_CheckDynaFloorCollision(&sp5C, &sp4C, effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z)) { effect->unk_48 = 1; if (effect->scale2 == 20.0f) { AUDIO_PLAY_SFX(NA_SE_EN_IN_PROMINENCE, effect->sfxSource, 4); @@ -936,7 +936,7 @@ void Solar_801A0DF8(f32 xPos, f32 zPos, f32 yRot, s32 index, f32 yPos) { gActors[sp2C].timer_0BE = 50; gActors[sp2C].unk_04E = 0; gActors[sp2C].obj.pos.y = -1.0f * yPos; - func_edisplay_8005F0E8(gActors[sp2C].sfxSource, &gActors[sp2C].obj.pos); + Object_SetSfxSourceToPos(gActors[sp2C].sfxSource, &gActors[sp2C].obj.pos); AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, gActors[sp2C].sfxSource, 4); } } @@ -1090,7 +1090,7 @@ void Solar_LevelStart(Player* player) { RAND_FLOAT_CENTERED(2000.0f) + 500.0f + gPathProgress, RAND_FLOAT(20.0f) + 20.0f); } if (gCsFrameCount == 615) { - func_play_800A6028(player->sfxSource, NA_SE_ARWING_BOOST); + Play_PlaySfxFirstPlayer(player->sfxSource, NA_SE_ARWING_BOOST); gActors[0].fwork[29] = gActors[1].fwork[29] = gActors[2].fwork[29] = 5.0f; gActors[0].state = 3; gActors[1].state = 2; @@ -1172,7 +1172,7 @@ void Solar_801A1CD8(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yR f32 zVel, s32 unk46) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_189; + actor->obj.id = OBJ_ACTOR_DEBRIS; actor->state = 40; actor->unk_046 = unk46; actor->unk_04A = 3; @@ -1330,7 +1330,7 @@ void Solar_801A23F4(Boss* bossSO) { bossSO->info.hitbox[42] = 110.0f; } if (bossSO->unk_04C == 29) { - func_edisplay_8005F0E8(bossSO->sfxSource, &bossSO->obj.pos); + Object_SetSfxSourceToPos(bossSO->sfxSource, &bossSO->obj.pos); AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, bossSO->sfxSource, 4); } if (bossSO->unk_04C == 80) { @@ -1357,7 +1357,7 @@ void Solar_801A23F4(Boss* bossSO) { bossSO->info.hitbox[24] = 275.0f; } if (bossSO->unk_04C == 10) { - func_edisplay_8005F0E8(bossSO->sfxSource, &bossSO->obj.pos); + Object_SetSfxSourceToPos(bossSO->sfxSource, &bossSO->obj.pos); AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, bossSO->sfxSource, 4); } if (bossSO->unk_04C == 50) { @@ -1449,7 +1449,7 @@ void Solar_801A23F4(Boss* bossSO) { bossSO->info.hitbox[24] = 110.0f; } if (bossSO->unk_04C == 5) { - func_edisplay_8005F0E8(bossSO->sfxSource, &bossSO->obj.pos); + Object_SetSfxSourceToPos(bossSO->sfxSource, &bossSO->obj.pos); AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, bossSO->sfxSource, 4); } if (bossSO->unk_04C == 20) { @@ -1653,7 +1653,7 @@ void Solar_801A3510(Boss* bossSO) { } } if (bossSO->unk_04C == 29) { - func_edisplay_8005F0E8(bossSO->sfxSource, &bossSO->obj.pos); + Object_SetSfxSourceToPos(bossSO->sfxSource, &bossSO->obj.pos); AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, bossSO->sfxSource, 4); } if (bossSO->unk_04C == 80) { @@ -1671,7 +1671,7 @@ void Solar_801A3510(Boss* bossSO) { } Math_SmoothStepToAngle(&bossSO->obj.rot.x, 20.0f, 0.1f, 10.0f, 0.1f); if (bossSO->unk_04C == 10) { - func_edisplay_8005F0E8(bossSO->sfxSource, &bossSO->obj.pos); + Object_SetSfxSourceToPos(bossSO->sfxSource, &bossSO->obj.pos); AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, bossSO->sfxSource, 4); } if (bossSO->unk_04C == 50) { @@ -2282,7 +2282,7 @@ BossSOfunc D_i3_801BF980[9] = { Solar_801A4214, Solar_801A4A34, Solar_801A4EF8, Solar_801A56B8, }; -void Solar_801A5B3C(Boss* bossSO) { +void Solar_Boss_Update(Boss* bossSO) { f32 sp1CC; f32 sp1C8; f32 sp1C4; @@ -2346,15 +2346,18 @@ void Solar_801A5B3C(Boss* bossSO) { bossSO->info.hitbox[41] = bossSO->fwork[SO_FWK_25] - bossSO->obj.pos.x; } if (((gGameFrameCount % 8) == 0) && (bossSO->fwork[SO_FWK_3] < 4800.0f)) { - if (func_play_800A73E4(&sp1C0, &sp1B8, bossSO->obj.pos.x, bossSO->obj.pos.y - 160.0f, bossSO->obj.pos.z)) { + if (Play_CheckDynaFloorCollision(&sp1C0, &sp1B8, bossSO->obj.pos.x, bossSO->obj.pos.y - 160.0f, + bossSO->obj.pos.z)) { Solar_801A1EB0(bossSO, bossSO->obj.pos.x, 50.0f, sp1C0 - 170.0f, bossSO->obj.pos.z + 100.0f); } - if ((bossSO->swork[SO_SWK_2] != 0) && func_play_800A73E4(&sp1C0, &sp1B8, bossSO->fwork[SO_FWK_16], - bossSO->fwork[SO_FWK_17], bossSO->fwork[SO_FWK_18])) { + if ((bossSO->swork[SO_SWK_2] != 0) && + Play_CheckDynaFloorCollision(&sp1C0, &sp1B8, bossSO->fwork[SO_FWK_16], bossSO->fwork[SO_FWK_17], + bossSO->fwork[SO_FWK_18])) { Solar_801A1EB0(bossSO, bossSO->fwork[SO_FWK_16], 50.0f, sp1C0 - 150.f, bossSO->fwork[SO_FWK_18] + 150.0f); } - if ((bossSO->swork[SO_SWK_3] != 0) && func_play_800A73E4(&sp1C0, &sp1B8, bossSO->fwork[SO_FWK_13], - bossSO->fwork[SO_FWK_14], bossSO->fwork[SO_FWK_15])) { + if ((bossSO->swork[SO_SWK_3] != 0) && + Play_CheckDynaFloorCollision(&sp1C0, &sp1B8, bossSO->fwork[SO_FWK_13], bossSO->fwork[SO_FWK_14], + bossSO->fwork[SO_FWK_15])) { Solar_801A1EB0(bossSO, bossSO->fwork[SO_FWK_13], 50.0f, sp1C0 - 150.0f, bossSO->fwork[SO_FWK_15] + 150.0f); } } @@ -2697,7 +2700,7 @@ void Solar_801A6BDC(s32 limbIndex, Vec3f* rot, void* thisx) { } } -void Solar_801A71B8(Boss* bossSO) { +void Solar_Boss_Draw(Boss* bossSO) { s32 i; Vec3f spE8[9] = { { 150.0f, 300.0f, 100.0f }, { -100.0f, 200.0f, 100.0f }, { 50.0f, 100.0f, 100.0f }, diff --git a/src/overlays/ovl_i3/fox_zo.c b/src/overlays/ovl_i3/fox_zo.c index 9b29c3c0..b1f71137 100644 --- a/src/overlays/ovl_i3/fox_zo.c +++ b/src/overlays/ovl_i3/fox_zo.c @@ -77,7 +77,7 @@ void Zoness_8019962C(Boss* bossZO, f32 arg1); // /* 408 */ Vec3f unk_198; // /* 420 */ char pad1A4[4]; // /* 424 */ Vec3f unk_1A8; -// /* 436 */ Vec3f unk_1B4; +// /* 436 */ Vec3f turretActor; // /* 448 */ char pad1C0[152]; // } UnkStruct_1C24E8; /* size = 600 */ @@ -520,31 +520,32 @@ void Zoness_8018FF50(Actor* actor) { actor->obj.rot.x = RAD_TO_DEG(-Math_Atan2F(gPlayer[0].cam.eye.y - actor->obj.pos.y, temp)); } -void Zoness_80190028(Actor* actor, Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32 arg6, f32 scale, s32 arg8, - s32 arg9) { +void Zoness_SetupDebris(Actor* actor, Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32 state, f32 scale, + s32 timerBC, s32 unk48) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_189; - actor->state = arg6; + actor->obj.id = OBJ_ACTOR_DEBRIS; + actor->state = state; actor->scale = scale; - actor->unk_048 = arg9; + actor->unk_048 = unk48; actor->obj.pos = *pos; actor->obj.rot = *rot; actor->vel.x = xVel; actor->vel.y = yVel; actor->vel.z = zVel; - actor->timer_0BC = arg8; + actor->timer_0BC = timerBC; actor->gravity = 0.5f; Object_SetInfo(&actor->info, actor->obj.id); } -void Zoness_801900FC(Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32 arg6, f32 scale, s32 arg8, s32 arg9) { +void Zoness_SpawnDebris(Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32 state, f32 scale, s32 timerBC, + s32 unk48) { s32 i; for (i = ARRAY_COUNT(gActors) - 1; i > 0; i--) { if (gActors[i].obj.status == OBJ_FREE) { - Zoness_80190028(&gActors[i], pos, rot, xVel, yVel, zVel, arg6, scale, arg8, arg9); + Zoness_SetupDebris(&gActors[i], pos, rot, xVel, yVel, zVel, state, scale, timerBC, unk48); break; } } @@ -641,8 +642,8 @@ void Zoness_801904CC(Actor* actor) { break; case 1: for (i = 0; i < 11; i++) { - Zoness_801900FC(&actor->vwork[i], &actor->vwork[i + 11], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(-10.0f), - RAND_FLOAT(10.0f), 41, actor->scale, 200, i); + Zoness_SpawnDebris(&actor->vwork[i], &actor->vwork[i + 11], RAND_FLOAT_CENTERED(20.0f), + RAND_FLOAT(-10.0f), RAND_FLOAT(10.0f), 41, actor->scale, 200, i); } actor->itemDrop = DROP_NONE; Actor_Despawn(actor); @@ -722,7 +723,7 @@ void Zoness_80190A00(Actor* actor) { s32 sp28; if ((actor->timer_0C0 == 0) && - func_play_800A73E4(&sp2C, &sp28, actor->obj.pos.x, actor->obj.pos.y - 50.0f, actor->obj.pos.z)) { + Play_CheckDynaFloorCollision(&sp2C, &sp28, actor->obj.pos.x, actor->obj.pos.y - 50.0f, actor->obj.pos.z)) { func_effect_8008377C(actor->obj.pos.x, sp2C, actor->obj.pos.z + 150.0f, 0.0f, 1.7f); if (actor->vel.y >= 0.0f) { AUDIO_PLAY_SFX(NA_SE_OUT_SPLASH_L, actor->sfxSource, 4); @@ -869,7 +870,7 @@ void Zoness_80191010(Actor* actor) { actor->vel.y = 0.0f; Object_Kill(&actor->obj, actor->sfxSource); } - if (func_play_800A73E4(&sp7C, &sp70, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z) && + if (Play_CheckDynaFloorCollision(&sp7C, &sp70, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z) && (actor->iwork[0] < 2) && (actor->timer_0C0 == 0)) { if (var_fs0 == 5.0f) { AUDIO_PLAY_SFX(NA_SE_OUT_SPLASH_L, actor->sfxSource, 4); @@ -883,8 +884,8 @@ void Zoness_80191010(Actor* actor) { break; case 3: for (i = 0; i < 3; i++) { - Zoness_801900FC(&actor->vwork[i], &actor->vwork[3 + i], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(-10.0f), - RAND_FLOAT(10.0f), 42, actor->scale, 200, i); + Zoness_SpawnDebris(&actor->vwork[i], &actor->vwork[3 + i], RAND_FLOAT_CENTERED(20.0f), + RAND_FLOAT(-10.0f), RAND_FLOAT(10.0f), 42, actor->scale, 200, i); } actor->itemDrop = DROP_SILVER_RING_25p; Actor_Despawn(actor); @@ -1042,7 +1043,8 @@ void Zoness_80191BC4(Actor* actor) { actor->iwork[1] = 1; AUDIO_PLAY_SFX(NA_SE_EN_FALLING_DOWN, actor->sfxSource, 4); } - if (func_play_800A73E4(&sp4C, &sp48, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z) && (actor->state == 0)) { + if (Play_CheckDynaFloorCollision(&sp4C, &sp48, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z) && + (actor->state == 0)) { func_effect_8007B344(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 20.0f, 7); func_effect_8007C120(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.5f, 50); Object_Kill(&actor->obj, actor->sfxSource); @@ -1133,7 +1135,7 @@ void Zoness_80192094(Actor* actor) { Math_SmoothStepToAngle(&actor->obj.rot.x, temp_fs0_2, 0.1f, 10.0f, 0.00001f); Math_SmoothStepToAngle(&actor->obj.rot.y, spA4, 0.1f, 10.0f, 0.00001f); if ((actor->iwork[0] == 0) && - (func_play_800A73E4(&spB8, &spA0, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z) != 0)) { + (Play_CheckDynaFloorCollision(&spB8, &spA0, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z) != 0)) { func_effect_8008377C(actor->obj.pos.x, spB8, actor->obj.pos.z + 100.0f, 0.0f, 1.5f); actor->iwork[0] += 1; if (actor->vel.y >= 0.0f) { @@ -1211,8 +1213,8 @@ void Zoness_80192094(Actor* actor) { break; case 4: for (i = 0; i < 6; i++) { - Zoness_801900FC(&actor->vwork[i], &actor->vwork[i + 6], RAND_FLOAT_CENTERED(40.0f), RAND_FLOAT(-10.0f), - RAND_FLOAT(20.0f), 44, actor->scale, 200, i); + Zoness_SpawnDebris(&actor->vwork[i], &actor->vwork[i + 6], RAND_FLOAT_CENTERED(40.0f), + RAND_FLOAT(-10.0f), RAND_FLOAT(20.0f), 44, actor->scale, 200, i); } actor->itemDrop = DROP_BOMB; Actor_Despawn(actor); @@ -1312,8 +1314,8 @@ void Zoness_80192834(Actor* actor) { break; case 2: for (i = 0; i < 5; i++) { - Zoness_801900FC(&actor->vwork[i], &actor->vwork[5 + i], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(-10.0f), - RAND_FLOAT(10.0f), 43, actor->scale, 200, i); + Zoness_SpawnDebris(&actor->vwork[i], &actor->vwork[5 + i], RAND_FLOAT_CENTERED(20.0f), + RAND_FLOAT(-10.0f), RAND_FLOAT(10.0f), 43, actor->scale, 200, i); } actor->itemDrop = DROP_NONE; Actor_Despawn(actor); @@ -1324,7 +1326,7 @@ void Zoness_80192834(Actor* actor) { } if ((actor->iwork[0] == 0) && - (func_play_800A73E4(&sp74, &sp70, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z) != 0)) { + (Play_CheckDynaFloorCollision(&sp74, &sp70, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z) != 0)) { actor->iwork[0]++; func_effect_8008377C(actor->obj.pos.x, sp74, actor->obj.pos.z, 0.0f, 0.7f); if (actor->vel.y >= 0.0f) { @@ -1430,8 +1432,8 @@ void Zoness_80192E64(Actor* actor) { break; case 3: for (i = 0; i < 9; i++) { - Zoness_801900FC(&actor->vwork[i], &actor->vwork[9 + i], RAND_FLOAT_CENTERED(40.0f), RAND_FLOAT(-10.0f), - RAND_FLOAT(20.0f), 59, actor->scale, 200, i); + Zoness_SpawnDebris(&actor->vwork[i], &actor->vwork[9 + i], RAND_FLOAT_CENTERED(40.0f), + RAND_FLOAT(-10.0f), RAND_FLOAT(20.0f), 59, actor->scale, 200, i); } actor->itemDrop = DROP_BOMB_33p; Actor_Despawn(actor); @@ -1452,7 +1454,7 @@ void Zoness_80192E64(Actor* actor) { } actor->dmgType = DMG_NONE; } - if (func_play_800A73E4(&sp70, &sp6C, actor->obj.pos.x, actor->obj.pos.y - 1000.0f, actor->obj.pos.z)) { + if (Play_CheckDynaFloorCollision(&sp70, &sp6C, actor->obj.pos.x, actor->obj.pos.y - 1000.0f, actor->obj.pos.z)) { Math_SmoothStepToF(&actor->obj.pos.y, sp70 + 300.0f, 0.1f, 20.0f, 0); } } @@ -1960,7 +1962,7 @@ void Zoness_80194394(s32 limbIndex, Vec3f* rot, void* thisx) { } } -void Zoness_801949DC(Boss* bossZO) { +void Zoness_Boss_Draw(Boss* bossZO) { Matrix_Translate(gCalcMatrix, 0.0f, bossZO->fwork[ZO_FWK_3], 0.0f, MTXF_APPLY); Matrix_Scale(gCalcMatrix, 2.6f, 2.6f, 2.6f, MTXF_APPLY); Animation_DrawSkeleton(3, D_ZO_6019E18, bossZO->vwork, Zoness_80193D08, Zoness_80194394, bossZO, gCalcMatrix); @@ -1972,7 +1974,7 @@ f32 D_i3_801BF6CC[2] = { 250.0f, -250.0f }; f32 D_i3_801BF6D4[2] = { 330.0f, 30.0f }; // OBJ_BOSS_ZO action -void Zoness_80194A84(Boss* bossZO) { +void Zoness_Boss_Update(Boss* bossZO) { f32 sp134; s32 sp130; s32 i; @@ -2085,8 +2087,8 @@ void Zoness_80194A84(Boss* bossZO) { if ((((gGameFrameCount % 8) == 0) || (bossZO->timer_050 == 43)) && (bossZO->swork[ZO_SWK_13] == 0) && ((bossZO->swork[ZO_SWK_12] < 7) || (bossZO->timer_050 == 43))) { D_ctx_801779A8[0] = 20; - if (func_play_800A73E4(&sp134, &sp130, sZoFwork[ZO_BSF_43_X], sZoFwork[ZO_BSF_43_Y] - 300.0f, - sZoFwork[ZO_BSF_43_Z])) { + if (Play_CheckDynaFloorCollision(&sp134, &sp130, sZoFwork[ZO_BSF_43_X], sZoFwork[ZO_BSF_43_Y] - 300.0f, + sZoFwork[ZO_BSF_43_Z])) { sp100 = 1.5f; spFC = 2.0f; if (bossZO->timer_050 == 43) { @@ -2444,9 +2446,9 @@ void Zoness_80194A84(Boss* bossZO) { spD8.y = Math_ModF(RAND_FLOAT_CENTERED(60.0f) + 360.0f, 360.0f); spD8.z = bossZO->obj.rot.z; for (i = 0; i < 5; i++) { - Zoness_801900FC(&spE4, &spD8, RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(20.0f), - RAND_FLOAT_CENTERED(30.0f), 4, 1.0f, RAND_FLOAT(15.0f) + (bossZO->unk_3F8 * 10.0f), - 0); + Zoness_SpawnDebris(&spE4, &spD8, RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(20.0f), + RAND_FLOAT_CENTERED(30.0f), 4, 1.0f, + RAND_FLOAT(15.0f) + (bossZO->unk_3F8 * 10.0f), 0); } } bossZO->vel.x = 0.0f; @@ -2493,7 +2495,7 @@ void Zoness_80194A84(Boss* bossZO) { case 7: D_ctx_801779A8[0] = 20; if (((gGameFrameCount % 8) == 0) && - (func_play_800A73E4(&sp134, &sp130, bossZO->obj.pos.x, -300.0f, bossZO->obj.pos.z) != 0)) { + (Play_CheckDynaFloorCollision(&sp134, &sp130, bossZO->obj.pos.x, -300.0f, bossZO->obj.pos.z) != 0)) { func_effect_8008377C(RAND_FLOAT_CENTERED(500.0f) + bossZO->obj.pos.x, sp134 - 300.0f, RAND_FLOAT_CENTERED(3000.0f) + bossZO->obj.pos.z, 5.0f, 2.0f); } @@ -2642,8 +2644,8 @@ void Zoness_80194A84(Boss* bossZO) { sZoFwork[ZO_BSF_87] -= 10.0f; sZoFwork[ZO_BSF_88] += 20.0f; func_effect_8007D0E0(sZoFwork[ZO_BSF_43_X], sZoFwork[ZO_BSF_43_Y], sZoFwork[ZO_BSF_43_Z], 5.0f); - if ((func_play_800A73E4(&sp134, &sp130, sZoFwork[ZO_BSF_43_X], sZoFwork[ZO_BSF_43_Y] - 100.0f, - sZoFwork[ZO_BSF_43_Z]) != 0) && + if ((Play_CheckDynaFloorCollision(&sp134, &sp130, sZoFwork[ZO_BSF_43_X], sZoFwork[ZO_BSF_43_Y] - 100.0f, + sZoFwork[ZO_BSF_43_Z]) != 0) && (sZoSwork[ZO_BSS_45] == 0)) { if (gPlayer) {} func_effect_8008377C(sZoFwork[ZO_BSF_43_X], sp134, sZoFwork[ZO_BSF_43_Z] + 30.0f, 0.0f, 2.0f); @@ -2660,8 +2662,8 @@ void Zoness_80194A84(Boss* bossZO) { sZoFwork[ZO_BSF_81] += 12.0f; sZoFwork[ZO_BSF_82] -= 10.0f; func_effect_8007D0E0(sZoFwork[ZO_BSF_29_X], sZoFwork[ZO_BSF_29_Y], sZoFwork[ZO_BSF_29_Z], 5.0f); - if ((func_play_800A73E4(&sp134, &sp130, sZoFwork[ZO_BSF_29_X], sZoFwork[ZO_BSF_29_Y] - 100.0f, - sZoFwork[ZO_BSF_29_Z]) != 0) && + if ((Play_CheckDynaFloorCollision(&sp134, &sp130, sZoFwork[ZO_BSF_29_X], sZoFwork[ZO_BSF_29_Y] - 100.0f, + sZoFwork[ZO_BSF_29_Z]) != 0) && (sZoSwork[ZO_BSS_46] == 0)) { func_effect_8008377C(sZoFwork[ZO_BSF_29_X], sp134, sZoFwork[ZO_BSF_29_Z] + 30.0f, 0.0f, 2.0f); sZoSwork[ZO_BSS_46]++; @@ -2677,8 +2679,8 @@ void Zoness_80194A84(Boss* bossZO) { sZoFwork[ZO_BSF_84] += 12.0f; sZoFwork[ZO_BSF_85] -= 10.0f; func_effect_8007D0E0(sZoFwork[ZO_BSF_32_X], sZoFwork[ZO_BSF_32_Y], sZoFwork[ZO_BSF_32_Z], 5.0f); - if ((func_play_800A73E4(&sp134, &sp130, sZoFwork[ZO_BSF_32_X], sZoFwork[ZO_BSF_32_Y] - 100.0f, - sZoFwork[ZO_BSF_32_Z]) != 0) && + if ((Play_CheckDynaFloorCollision(&sp134, &sp130, sZoFwork[ZO_BSF_32_X], sZoFwork[ZO_BSF_32_Y] - 100.0f, + sZoFwork[ZO_BSF_32_Z]) != 0) && (sZoSwork[ZO_BSS_47] == 0)) { func_effect_8008377C(sZoFwork[ZO_BSF_32_X], sp134, sZoFwork[ZO_BSF_32_Z] + 30.0f, 0.0f, 2.0f); sZoSwork[ZO_BSS_47]++; @@ -2709,8 +2711,8 @@ void Zoness_80194A84(Boss* bossZO) { sZoFwork[ZO_BSF_91] -= 5.0f; sZoFwork[ZO_BSF_92] -= 5.0f; func_effect_8007D0E0(sZoFwork[ZO_BSF_52_X], sZoFwork[ZO_BSF_52_Y], sZoFwork[ZO_BSF_52_Z], 5.0f); - if ((func_play_800A73E4(&sp134, &sp130, sZoFwork[ZO_BSF_52_X], sZoFwork[ZO_BSF_52_Y] - 100.0f, - sZoFwork[ZO_BSF_52_Z]) != 0) && + if ((Play_CheckDynaFloorCollision(&sp134, &sp130, sZoFwork[ZO_BSF_52_X], sZoFwork[ZO_BSF_52_Y] - 100.0f, + sZoFwork[ZO_BSF_52_Z]) != 0) && (sZoSwork[ZO_BSS_48] == 0)) { func_effect_8008377C(sZoFwork[ZO_BSF_52_X], sp134, sZoFwork[ZO_BSF_52_Z] + 100.0f, 0.0f, 2.0f); sZoSwork[ZO_BSS_48]++; @@ -2981,7 +2983,8 @@ void Zoness_80194A84(Boss* bossZO) { spD8.z = sZoFwork[ZO_BSF_52_Z]; func_effect_8007A6F0(&spD8, NA_SE_OB_DAMAGE_M); } - if (func_play_800A73E4(&sp134, &sp130, bossZO->obj.pos.x, bossZO->obj.pos.y - 500.0f, bossZO->obj.pos.z) != 0) { + if (Play_CheckDynaFloorCollision(&sp134, &sp130, bossZO->obj.pos.x, bossZO->obj.pos.y - 500.0f, + bossZO->obj.pos.z) != 0) { Math_SmoothStepToF(&bossZO->obj.pos.y, sp134 - 20.0f, 0.1f, bossZO->fwork[ZO_FWK_4], 0.0f); bossZO->fwork[ZO_FWK_1] = SIN_DEG(gGameFrameCount * 7.0f) * 12.0f; bossZO->fwork[ZO_FWK_2] = COS_DEG(gGameFrameCount * 9.0f) * 12.0f; @@ -3394,7 +3397,8 @@ void Zoness_80199A28(Actor* actor) { } break; case 1: - if ((func_play_800A73E4(&sp3C, &sp34, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z) != 0) && + if ((Play_CheckDynaFloorCollision(&sp3C, &sp34, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z) != + 0) && (actor->iwork[1] == 0)) { func_effect_8008377C(actor->obj.pos.x, sp3C, actor->obj.pos.z, 0.0f, 0.5f); actor->iwork[1]++; @@ -3410,8 +3414,8 @@ void Zoness_80199A28(Actor* actor) { break; case 2: actor->gravity = 1.0f; - if (func_play_800A73E4(&sp3C, &sp34, actor->obj.pos.x, actor->fwork[0] + actor->obj.pos.y, - actor->obj.pos.z) != 0) { + if (Play_CheckDynaFloorCollision(&sp3C, &sp34, actor->obj.pos.x, actor->fwork[0] + actor->obj.pos.y, + actor->obj.pos.z) != 0) { actor->gravity = 0.0f; Math_SmoothStepToF(&actor->fwork[0], -50.0f, 0.1f, 2.0f, 0.001f); sp38 = 10.0f; @@ -3685,7 +3689,8 @@ void Zoness_8019A5D4(Actor* actor) { actor->dmgType = DMG_NONE; } if (((gGameFrameCount % 8) == 0) && (actor->state != 0) && (actor->iwork[0] < 8) && - (func_play_800A73E4(&sp44, &sp40, actor->obj.pos.x, actor->obj.pos.y - 100.0f, actor->obj.pos.z) != 0)) { + (Play_CheckDynaFloorCollision(&sp44, &sp40, actor->obj.pos.x, actor->obj.pos.y - 100.0f, actor->obj.pos.z) != + 0)) { func_effect_8008377C(actor->obj.pos.x, sp44, actor->obj.pos.z, 0.0f, 0.7f); actor->iwork[0]++; if (actor->vel.y >= 0.0f) { @@ -3890,7 +3895,7 @@ void Zoness_8019B548(Actor* actor) { break; } if ((fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 1000.0f) && - func_play_800A73E4(&sp6C, &sp68, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z)) { + Play_CheckDynaFloorCollision(&sp6C, &sp68, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z)) { Math_SmoothStepToF(&actor->obj.pos.y, sp6C, 0.1f, 4.0f, 0.0f); } } @@ -3936,9 +3941,9 @@ void Zoness_8019B854(Actor* actor) { break; case 1: for (i = 0; i < 6; i++) { - Zoness_801900FC(&actor->vwork[i], &actor->vwork[6 + i], RAND_FLOAT_CENTERED(50.0f), - RAND_FLOAT(10.0f) + 20.0f, RAND_FLOAT_CENTERED(50.0f), 39, actor->scale, - RAND_FLOAT(15.0f) + (actor->scale * 10.0f), i); + Zoness_SpawnDebris(&actor->vwork[i], &actor->vwork[6 + i], RAND_FLOAT_CENTERED(50.0f), + RAND_FLOAT(10.0f) + 20.0f, RAND_FLOAT_CENTERED(50.0f), 39, actor->scale, + RAND_FLOAT(15.0f) + (actor->scale * 10.0f), i); } for (i = 0; i < 10; i++) { func_effect_80079618(RAND_FLOAT_CENTERED(50.0f) + actor->obj.pos.x, @@ -4080,8 +4085,8 @@ void Zoness_8019BE48(Actor* actor) { func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_WT_EXPLOSION_S); break; } - if ((actor->state < 2) && - (func_play_800A73E4(&sp40, &sp38, actor->obj.pos.x, actor->obj.pos.y - 60.0f, actor->obj.pos.z) != 0)) { + if ((actor->state < 2) && (Play_CheckDynaFloorCollision(&sp40, &sp38, actor->obj.pos.x, actor->obj.pos.y - 60.0f, + actor->obj.pos.z) != 0)) { actor->gravity = 0.0f; sp3C = 10.0f; if (Math_SmoothStepToF(&actor->obj.pos.y, sp40 - 20.0f, 0.1f, 5.0f, 0) >= 0.0f) { @@ -4471,7 +4476,7 @@ void Zoness_LevelStart(Player* player) { gControllerHold[gMainController].button = gBoostButton[gMainController]; player->csTimer = 60; player->boostMeter = 1.0f; - func_play_800B2574(player); + Player_ArwingBoost(player); if (gCsFrameCount > 195) { D_ctx_801779A8[0] = 50.0f; } else { diff --git a/src/overlays/ovl_i4/fox_bo.c b/src/overlays/ovl_i4/fox_bo.c index 62439a96..2ca391f2 100644 --- a/src/overlays/ovl_i4/fox_bo.c +++ b/src/overlays/ovl_i4/fox_bo.c @@ -335,7 +335,7 @@ void Bolse_UpdateEventHandler(Actor* this) { if ((gControllerPress->button & START_BUTTON) || ((gAllRangeSpawnEvent + 300) == gAllRangeEventTimer)) { this->state = 2; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; - func_play_800B7184(player, 1); + Camera_Update360(player, 1); player->unk_014 = 0.0f; D_hud_80161708 = 0; } @@ -384,7 +384,7 @@ void Bolse_UpdateEventHandler(Actor* this) { gAllRangeEventTimer = 3000; this->state = 2; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; - func_play_800B7184(player, 1); + Camera_Update360(player, 1); player->unk_014 = 0.0f; Audio_KillSfxBySource(gBosses[1].sfxSource); this->iwork[1] = gHitCount; @@ -616,7 +616,7 @@ bool Bolse_8018D278(Actor* actor) { for (i = 0; i < 3; i++) { if (Rand_ZeroOne() >= 0.5f) { - func_play_800A69F8(4, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z); + Play_SpawnDebris(4, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z); } } @@ -717,7 +717,7 @@ bool Bolse_8018D584(Actor* actor) { for (i = 0; i < 10; i++) { if (!(Rand_ZeroOne() >= 0.5f)) { - func_play_800A69F8(4, actor->obj.pos.x, actor->obj.pos.y + 730.0f, actor->obj.pos.z); + Play_SpawnDebris(4, actor->obj.pos.x, actor->obj.pos.y + 730.0f, actor->obj.pos.z); } } @@ -1717,7 +1717,7 @@ void Bolse_LevelComplete(Player* player) { Math_SmoothStepToF(&player->pos.y, 700.0f, 0.1f, 10.0f, 0.0f); } - func_play_800B7184(player, 0); + Camera_Update360(player, 0); player->cam.eye.x += player->vel.x * 0.1f; player->cam.eye.y += player->vel.y * 0.1f; @@ -2113,7 +2113,7 @@ void Bolse_80191ED8(void) { if (gLevelObjects[i].id < 0) { break; } - if (gLevelObjects[i].id < 161) { + if (gLevelObjects[i].id < OBJ_SCENERY_MAX) { Scenery360_Initialize(scenery360); scenery360->obj.status = OBJ_ACTIVE; scenery360->obj.id = gLevelObjects[i].id; @@ -2130,7 +2130,7 @@ void Bolse_80191ED8(void) { if (gLevelObjects[i].id < 0) { break; } - if ((gLevelObjects[i].id >= OBJ_ACTOR_176) && (gLevelObjects[i].id <= OBJ_ACTOR_SUPPLIES)) { + if ((gLevelObjects[i].id >= OBJ_ACTOR_START) && (gLevelObjects[i].id < OBJ_ACTOR_MAX)) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; actor->obj.id = gLevelObjects[i].id; diff --git a/src/overlays/ovl_i4/fox_fo.c b/src/overlays/ovl_i4/fox_fo.c index 06510360..1b05ec23 100644 --- a/src/overlays/ovl_i4/fox_fo.c +++ b/src/overlays/ovl_i4/fox_fo.c @@ -248,7 +248,7 @@ void Fortuna_UpdateEvents(Actor* actor) { actorPtr->obj.pos.z = D_i4_8019EDF8[i - 1].z; } } - func_play_800B63BC(player, 1); + Camera_UpdateArwing360(player, 1); break; case 1: @@ -295,7 +295,7 @@ void Fortuna_UpdateEvents(Actor* actor) { if ((gControllerPress->button & START_BUTTON) || (gAllRangeEventTimer == (gAllRangeSpawnEvent + 440))) { actor->state = 2; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; - func_play_800B7184(player, 1); + Camera_Update360(player, 1); player->unk_014 = 0.0f; D_hud_80161708 = 0; } @@ -347,7 +347,7 @@ void Fortuna_UpdateEvents(Actor* actor) { actor->state = 2; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; - func_play_800B7184(player, 1); + Camera_Update360(player, 1); player->unk_014 = 0.0f; D_hud_80161708 = 0; @@ -440,10 +440,10 @@ void Fortuna_UpdateEvents(Actor* actor) { } } -void Fortuna_801888C0(Actor* actor, Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32 state) { +void Fortuna_SetupDebris(Actor* actor, Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32 state) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_189; + actor->obj.id = OBJ_ACTOR_DEBRIS; actor->state = state; actor->obj.pos = *pos; @@ -459,12 +459,12 @@ void Fortuna_801888C0(Actor* actor, Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, Object_SetInfo(&actor->info, actor->obj.id); } -void Fortuna_80188A48(Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32 state) { +void Fortuna_SpawnDebris(Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32 state) { s32 i; for (i = ARRAY_COUNT(gActors) - 1; i >= 30; i--) { if (gActors[i].obj.status == 0) { - Fortuna_801888C0(&gActors[i], pos, rot, xVel, yVel, zVel, state); + Fortuna_SetupDebris(&gActors[i], pos, rot, xVel, yVel, zVel, state); break; } } @@ -474,14 +474,14 @@ void Fortuna_80188AD0(Actor* actor) { actor->fwork[0] += 2.0f; if (actor->state == 2) { actor->state = 3; - Fortuna_80188A48(actor->vwork, &actor->vwork[6], RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT(10.0f) + 10.0f, - RAND_FLOAT_CENTERED(50.0f), 36); - Fortuna_80188A48(&actor->vwork[1], &actor->vwork[7], RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT(10.0f) + 10.0f, - RAND_FLOAT_CENTERED(50.0f), 36); - Fortuna_80188A48(&actor->vwork[2], &actor->vwork[8], RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT(10.0f) + 10.0f, - RAND_FLOAT_CENTERED(50.0f), 35); - Fortuna_80188A48(&actor->vwork[3], &actor->vwork[9], RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT(10.0f) + 10.0f, - RAND_FLOAT_CENTERED(50.0f), 35); + Fortuna_SpawnDebris(actor->vwork, &actor->vwork[6], RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT(10.0f) + 10.0f, + RAND_FLOAT_CENTERED(50.0f), 36); + Fortuna_SpawnDebris(&actor->vwork[1], &actor->vwork[7], RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT(10.0f) + 10.0f, + RAND_FLOAT_CENTERED(50.0f), 36); + Fortuna_SpawnDebris(&actor->vwork[2], &actor->vwork[8], RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT(10.0f) + 10.0f, + RAND_FLOAT_CENTERED(50.0f), 35); + Fortuna_SpawnDebris(&actor->vwork[3], &actor->vwork[9], RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT(10.0f) + 10.0f, + RAND_FLOAT_CENTERED(50.0f), 35); func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y + 180.0f, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, 5.0f, 10); actor->itemDrop = DROP_SILVER_RING; actor->obj.pos.y += 230.0f; @@ -652,7 +652,7 @@ void Fortuna_LevelComplete(Player* player) { } else if (player->pos.y < 500.0f) { Math_SmoothStepToF(&player->pos.y, 500.0f, 0.1f, 5.0f, 0.0f); } - func_play_800B7184(player, 0); + Camera_Update360(player, 0); player->cam.eye.x += player->vel.x * 0.1f; player->cam.eye.y += player->vel.y * 0.1f; player->cam.eye.z += player->vel.z * 0.1f; @@ -790,7 +790,7 @@ void Fortuna_LevelComplete(Player* player) { gScenery360[i].obj.status = OBJ_FREE; } - func_play_800A5EBC(); + Play_SetupStarfield(); gLevelType = LEVELTYPE_SPACE; gGroundType = gBgColor = gFogRed = gFogGreen = gFogBlue = 0; gLight1R = gLight2R = D_ctx_80161A70 = 86; @@ -1446,7 +1446,7 @@ void Fortuna_8018BA2C(void) { if (gLevelObjects[i].id <= OBJ_INVALID) { break; } - if (gLevelObjects[i].id <= OBJ_SCENERY_160) { + if (gLevelObjects[i].id < OBJ_SCENERY_MAX) { Scenery360_Initialize(scenery360); scenery360->obj.status = OBJ_ACTIVE; scenery360->obj.id = gLevelObjects[i].id; @@ -1463,7 +1463,7 @@ void Fortuna_8018BA2C(void) { if (gLevelObjects[i].id <= OBJ_INVALID) { break; } - if ((gLevelObjects[i].id >= OBJ_ACTOR_176) && (gLevelObjects[i].id < OBJ_BOSS_292)) { + if ((gLevelObjects[i].id >= OBJ_ACTOR_START) && (gLevelObjects[i].id < OBJ_ACTOR_MAX)) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; actor->obj.id = gLevelObjects[i].id; @@ -1495,6 +1495,6 @@ void Fortuna_8018BA2C(void) { boss->obj.pos.x = 0.0f; boss->obj.pos.y = 0.0f; boss->obj.pos.z = 0.0f; - boss->obj.id = OBJ_BOSS_308; + boss->obj.id = OBJ_BOSS_FO; Object_SetInfo(&boss->info, boss->obj.id); } diff --git a/src/overlays/ovl_i4/fox_ka.c b/src/overlays/ovl_i4/fox_ka.c index 22cc20cd..b4994917 100644 --- a/src/overlays/ovl_i4/fox_ka.c +++ b/src/overlays/ovl_i4/fox_ka.c @@ -1034,7 +1034,7 @@ void Katina_BossUpdate(Saucerer* this) { if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ACTIVE; - func_play_800B7184(&gPlayer[0], 1); + Camera_Update360(&gPlayer[0], 1); } gPlayer[0].unk_014 = 0.0f; @@ -1924,7 +1924,7 @@ void Katina_LevelComplete(Player* player) { D_ctx_80177A48[2] = 0.0f; Katina_SFTeam_LevelComplete_Update(); - func_play_800A3FB0(); + Play_dummy_MuteSfx(); gCsFrameCount = 0; } @@ -2356,7 +2356,7 @@ void Katina_BossInit(void) { mothership->obj.pos.x = -15000.0f; mothership->obj.pos.y = 3240.0f; mothership->obj.pos.z = 15000.0f; - mothership->obj.id = OBJ_BOSS_316; + mothership->obj.id = OBJ_BOSS_KA; Object_SetInfo(&mothership->info, mothership->obj.id); Boss_Initialize(base); @@ -2364,7 +2364,7 @@ void Katina_BossInit(void) { base->obj.pos.x = 0.0f; base->obj.pos.y = 0.0f; base->obj.pos.z = 0.0f; - base->obj.id = OBJ_BOSS_317; + base->obj.id = OBJ_BOSS_KA_BASE; Object_SetInfo(&base->info, base->obj.id); } diff --git a/src/overlays/ovl_i4/fox_sz.c b/src/overlays/ovl_i4/fox_sz.c index e46eb186..3a4b6ce7 100644 --- a/src/overlays/ovl_i4/fox_sz.c +++ b/src/overlays/ovl_i4/fox_sz.c @@ -557,7 +557,7 @@ void SectorZ_UpdateEvents(Actor* actor) { if (actor->timer_0BC == 70) { actor->state = 2; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; - func_play_800B7184(player, 1); + Camera_Update360(player, 1); player->unk_014 = 0.0f; } break; @@ -623,7 +623,7 @@ void SectorZ_UpdateEvents(Actor* actor) { if (actor->timer_0BC < 9680) { actor->state = 2; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; - func_play_800B7184(player, 1); + Camera_Update360(player, 1); player->unk_014 = 0.0f; gActors[10].fwork[1] = 25.0f; gActors[10].fwork[29] = 5.0f; @@ -1553,7 +1553,7 @@ void SectorZ_LevelComplete(Player* player) { if (player->pos.y < 700.0f) { Math_SmoothStepToF(&player->pos.y, 700.0f, 0.1f, 10.0f, 0.0f); } - func_play_800B7184(player, 0); + Camera_Update360(player, 0); player->cam.eye.x += player->vel.x * 0.1f; player->cam.eye.y += player->vel.y * 0.1f; player->cam.eye.z += player->vel.z * 0.1f; @@ -1710,7 +1710,7 @@ Vec3f D_i4_8019F64C[] = { { 612.0f, 409.0f, 386.0f }, { 1027.0f, 141.0f, 383.0f { 600.0f, 385.0f, 380.0f }, { 776.0f, 245.0f, 384.0f }, { 376.0f, 123.0f, 384.0f }, { 428.0f, 174.0f, 383.0f }, { 722.0f, 306.0f, 383.0f }, { 530.0f, 380.0f, 385.0f } }; -void SectorZ_8019E454(Boss* boss) { +void SectorZ_Boss_Update(Boss* boss) { s32 i; s32 j; f32 x; @@ -1783,7 +1783,7 @@ void SectorZ_8019E454(Boss* boss) { } } -void SectorZ_8019E98C(Boss* boss) { +void SectorZ_Boss_Draw(Boss* boss) { gSPFogPosition(gMasterDisp++, gFogNear, 1005); Cutscene_DrawGreatFox(); } @@ -1804,7 +1804,7 @@ void SectorZ_8019EA68(void) { break; } - if (gLevelObjects[i].id <= OBJ_SCENERY_160) { + if (gLevelObjects[i].id < OBJ_SCENERY_MAX) { Scenery360_Initialize(scenery360); scenery360->obj.status = OBJ_ACTIVE; scenery360->obj.id = gLevelObjects[i].id; @@ -1822,7 +1822,7 @@ void SectorZ_8019EA68(void) { break; } - if ((gLevelObjects[i].id >= OBJ_ACTOR_176) && (gLevelObjects[i].id < OBJ_BOSS_292)) { + if ((gLevelObjects[i].id >= OBJ_ACTOR_START) && (gLevelObjects[i].id < OBJ_ACTOR_MAX)) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; actor->obj.id = gLevelObjects[i].id; @@ -1855,7 +1855,7 @@ void SectorZ_8019EA68(void) { boss->obj.rot.y = boss->unk_078.y + 180.0f; boss->obj.rot.z = -boss->unk_078.z; - boss->obj.id = OBJ_BOSS_313; + boss->obj.id = OBJ_BOSS_SZ; Object_SetInfo(&boss->info, boss->obj.id); AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, boss->sfxSource, 0); } diff --git a/src/overlays/ovl_i5/fox_ma.c b/src/overlays/ovl_i5/fox_ma.c index 9dc0b3c9..b3f97a4e 100644 --- a/src/overlays/ovl_i5/fox_ma.c +++ b/src/overlays/ovl_i5/fox_ma.c @@ -4930,20 +4930,20 @@ void Macbeth_LevelStart(Player* player) { sp4C = 0.0f; sp48 = 0.0f; sp44 = 0.0f; - func_play_800ADF58(player); + Player_UpdatePath(player); switch (player->csState) { case 0: - objInit = gLevelObjects = SEGMENTED_TO_VIRTUAL(D_MA_6035678); + gLevelObjects = SEGMENTED_TO_VIRTUAL(D_MA_6035678); - for (i = 0; objInit->id != OBJ_INVALID; i++, objInit++) { + for (i = 0, objInit = gLevelObjects; objInit->id != OBJ_INVALID; i++, objInit++) { Object_Load(objInit, 4000.0f, -4000.0f, 4000.0f, -4000.0f); } - objInit = gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]); + gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]); - for (i = 0; i < 40; i++, objInit++) { + for (i = 0, objInit = gLevelObjects; i < 40; i++, objInit++) { Object_Load(objInit, 4000.0f, -4000.0f, 4000.0f, -4000.0f); } @@ -5017,7 +5017,7 @@ void Macbeth_LevelStart(Player* player) { player->gravity = 3.0f; player->unk_014 = 0.0f; D_ctx_8017782C = 1; - func_play_800A594C(); + Play_InitEnvironment(); D_ctx_8017782C = 0; gObjectLoadIndex = 40; player->csState = 4; @@ -5078,7 +5078,9 @@ void Macbeth_801ACF6C(void) { void Macbeth_801ACFBC(void) { ObjectInit* objInit; - for (objInit = gLevelObjects = SEGMENTED_TO_VIRTUAL(D_MA_60357CC); objInit->id != OBJ_INVALID; objInit++) { + gLevelObjects = SEGMENTED_TO_VIRTUAL(D_MA_60357CC); + + for (objInit = gLevelObjects; objInit->id != OBJ_INVALID; objInit++) { Object_Load(objInit, 4000.0f, -4000.0f, 4000.0f, -4000.0f); } } @@ -5086,7 +5088,9 @@ void Macbeth_801ACFBC(void) { void Macbeth_801AD080(void) { ObjectInit* objInit; - for (objInit = gLevelObjects = SEGMENTED_TO_VIRTUAL(D_MA_6035920); objInit->id != OBJ_INVALID; objInit++) { + gLevelObjects = SEGMENTED_TO_VIRTUAL(D_MA_6035920); + + for (objInit = gLevelObjects; objInit->id != OBJ_INVALID; objInit++) { Object_Load(objInit, 4000.0f, -4000.0f, 4000.0f, -4000.0f); } } @@ -5224,8 +5228,8 @@ void Macbeth_801AD6F0(Actor* actor) { func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, 4.0f, 5); if (actor->obj.pos.y < (gGroundHeight + 10.0f)) { - func_beam_800365E4(actor->obj.pos.x, 3.0f, actor->obj.pos.z, actor->obj.pos.x, actor->obj.pos.z, - 0.0f, 0.0f, 90.0f, 5.0f, 0, 0); + PlayerShot_SpawnEffect344(actor->obj.pos.x, 3.0f, actor->obj.pos.z, actor->obj.pos.x, + actor->obj.pos.z, 0.0f, 0.0f, 90.0f, 5.0f, 0, 0); } gControllerRumbleFlags[gMainController] = 1; gControllerRumbleTimers[gMainController] = 10; @@ -6288,7 +6292,7 @@ void Macbeth_LevelComplete2(Player* player) { func_tank_80045130(player); func_tank_80044868(player); func_tank_800444BC(player); - func_play_800ADF58(player); + Player_UpdatePath(player); if (gCsFrameCount >= 2175) { Math_SmoothStepToF(&gCsCamAtZ, gActors[3].obj.pos.z + gPathProgress - 300.0f, 0.1f, 20.0f, 0.0f); Math_SmoothStepToF(&gCsCamAtY, gActors[3].obj.pos.y + 100.0f, 0.1f, 10.0f, 0.0f); @@ -6717,7 +6721,7 @@ void Macbeth_801B38E0(void) { } for (i = 0; i < ARRAY_COUNT(gScenery); i++) { - if (gScenery[i].obj.id <= OBJ_SCENERY_91 || gScenery[i].obj.id >= OBJ_SCENERY_97) { + if ((gScenery[i].obj.id <= OBJ_SCENERY_91) || (gScenery[i].obj.id >= OBJ_SCENERY_97)) { Object_Kill(&gScenery[i].obj, gScenery[i].sfxSource); Scenery_Initialize(&gScenery[i]); } @@ -6834,8 +6838,8 @@ void Macbeth_LevelComplete1(Player* player) { func_tank_80044868(player); func_tank_80045678(player); func_tank_80045E7C(player); - func_play_800A8BA4(player); - func_play_800ADF58(player); + Player_CollisionCheck(player); + Player_UpdatePath(player); break; case 2: Math_SmoothStepToF(D_ctx_80177A48, 0.01f, 0.1f, 0.01f, 0.0f); @@ -6859,8 +6863,8 @@ void Macbeth_LevelComplete1(Player* player) { func_tank_80044868(player); func_tank_80045678(player); func_tank_80045E7C(player); - func_play_800A8BA4(player); - func_play_800ADF58(player); + Player_CollisionCheck(player); + Player_UpdatePath(player); break; case 10: player->csState = 11; @@ -6896,8 +6900,8 @@ void Macbeth_LevelComplete1(Player* player) { func_tank_80044868(player); func_tank_80045678(player); func_tank_80045E7C(player); - func_play_800A8BA4(player); - func_play_800ADF58(player); + Player_CollisionCheck(player); + Player_UpdatePath(player); break; case 12: break; diff --git a/src/overlays/ovl_i5/fox_ti.c b/src/overlays/ovl_i5/fox_ti.c index a0ea9f80..1be30cf1 100644 --- a/src/overlays/ovl_i5/fox_ti.c +++ b/src/overlays/ovl_i5/fox_ti.c @@ -887,7 +887,7 @@ void Titania_8018B720(Actor* actor) { var_s1 = SEGMENTED_TO_VIRTUAL(D_i5_801BDA30); for (i = 0; i < 10; i++, var_s1++) { - actorPtr = func_game_800A3608(OBJ_ACTOR_189); + actorPtr = Game_SpawnActor(OBJ_ACTOR_DEBRIS); if (actorPtr != NULL) { actorPtr->obj.status = OBJ_ACTIVE; actorPtr->state = 46; @@ -1601,7 +1601,7 @@ void Titania_8018C8A8(Actor* actor) { 15.0f); var_s1 = D_i5_801BD738[actor->iwork[0]]; for (i = 0; i < 9U; i++, var_s1++) { - actorPtr = func_game_800A3608(OBJ_ACTOR_189); + actorPtr = Game_SpawnActor(OBJ_ACTOR_DEBRIS); if ((actorPtr != NULL) && D_i5_801B7630[i][1] == 1) { actorPtr->state = 47; actorPtr->unk_048 = i; @@ -1637,7 +1637,7 @@ void Titania_8018C8A8(Actor* actor) { } if (i == 8) { - actorPtr = func_game_800A3608(OBJ_ACTOR_189); + actorPtr = Game_SpawnActor(OBJ_ACTOR_DEBRIS); if (actorPtr != NULL) { actorPtr->state = 47; actorPtr->unk_048 = 9; @@ -3196,7 +3196,7 @@ void Titania_80192118(Boss* boss) { sp54.x = (boss->obj.pos.x + D_i5_801BBEF4[39]) + D_i5_801BBEF4[68]; sp54.y = 0.0f; sp54.z = (boss->obj.pos.z + D_i5_801BBEF4[41]) + D_i5_801BBEF4[70]; - func_effect_8007A6F0(&sp54, NA_SE_EN_SAND_BOUND_M); + func_effect_8007A6F0(&sp54, NA_SE_EN_BOSS_ATTACK); boss->swork[39] = 5; gCameraShake = 5; } @@ -3204,7 +3204,7 @@ void Titania_80192118(Boss* boss) { sp54.x = (boss->obj.pos.x + D_i5_801BBEF4[42]) + D_i5_801BBEF4[71]; sp54.y = 0.0f; sp54.z = (boss->obj.pos.z + D_i5_801BBEF4[44]) + D_i5_801BBEF4[73]; - func_effect_8007A6F0(&sp54, NA_SE_EN_SAND_BOUND_M); + func_effect_8007A6F0(&sp54, NA_SE_EN_BOSS_ATTACK); boss->swork[39] = 5; gCameraShake = 5; } @@ -3667,7 +3667,7 @@ void Titania_80193DF0(Boss* boss) { D_i5_801BBEF0[44] = 0; D_i5_801BBEF0[8] = -1; D_i5_801BBEF0[41] = 1; - actor = func_game_800A3608(OBJ_ACTOR_TEAM_BOSS); + actor = Game_SpawnActor(OBJ_ACTOR_TEAM_BOSS); if (actor != NULL) { Matrix_MultVec3f(gCalcMatrix, &D_i5_801BBF00[i].unk_00.pos, &spC8); actor->obj.pos.x = boss->obj.pos.x + spC8.x; @@ -3681,7 +3681,7 @@ void Titania_80193DF0(Boss* boss) { D_i5_801BBF00[i].unk_26 &= ~16; } if (D_i5_801BBF00[i].unk_26 & 2) { - actor = func_game_800A3608(OBJ_ACTOR_189); + actor = Game_SpawnActor(OBJ_ACTOR_DEBRIS); if (actor != NULL) { actor->state = 40; actor->unk_046 = D_i5_801B7770[i][5]; @@ -4027,7 +4027,7 @@ void Titania_80193DF0(Boss* boss) { AUDIO_PLAY_SFX(NA_SE_EN_GATHER_PARTS, boss->sfxSource, 4); for (i = 0; i < 33; i++) { - actor = func_game_800A3608(OBJ_ACTOR_189); + actor = Game_SpawnActor(OBJ_ACTOR_DEBRIS); if (actor != NULL) { actor->state = 40; actor->obj.pos.x = 0.0f; @@ -4315,7 +4315,7 @@ void Titania_80193DF0(Boss* boss) { func_effect_8007A900(spD4.x, 0.0f, spD4.z, 10.0f, 255, 8, 0); } if (boss->unk_04C == 38) { - func_effect_8007A6F0(&spD4, NA_SE_EN_SAND_BOUND_M); + func_effect_8007A6F0(&spD4, NA_SE_EN_BOSS_ATTACK); boss->swork[39] = 5; gCameraShake = 20; } @@ -4328,7 +4328,7 @@ void Titania_80193DF0(Boss* boss) { func_effect_8007A900(spD4.x, 0.0f, spD4.z, 10.0f, 255, 8, 0); } if (boss->unk_04C == 98) { - func_effect_8007A6F0(&spD4, NA_SE_EN_SAND_BOUND_M); + func_effect_8007A6F0(&spD4, NA_SE_EN_BOSS_ATTACK); boss->swork[39] = 5; gCameraShake = 20; } @@ -4726,7 +4726,7 @@ void Titania_80193DF0(Boss*); static s16 D_i5_801B8D54[4] = { 30, 35, 60, 70 }; -void Titania_80197A94(Boss* boss) { +void Titania_Boss_Update(Boss* boss) { Vec3f sp3C; boss->swork[38]++; @@ -4933,7 +4933,7 @@ static f32 D_i5_801B8E24[4][2] = { { 1.0f, -1.0f }, }; -void Titania_801982A8(Boss* boss) { +void Titania_Boss_Draw(Boss* boss) { TexturedLine* temp_v0_6; f32 sp120; f32 temp_fs0; @@ -5175,14 +5175,14 @@ void Titania_801990DC(Boss* boss) { gShowBossHealth = 0; actor = gActors; for (i = 0; i < ARRAY_COUNT(gActors); i++, actor++) { - if ((actor->obj.status == OBJ_ACTIVE) && (actor->obj.id == OBJ_ACTOR_189) && (actor->state == 40)) { + if ((actor->obj.status == OBJ_ACTIVE) && (actor->obj.id == OBJ_ACTOR_DEBRIS) && (actor->state == 40)) { actor->gravity = 0.2f; } } for (i = 0; i < ARRAY_COUNTU(D_i5_801BBF00); i++) { if (!(D_i5_801BBF00[i].unk_26 & 4)) { - actor = func_game_800A3608(OBJ_ACTOR_189); + actor = Game_SpawnActor(OBJ_ACTOR_DEBRIS); if (actor != NULL) { actor->state = 40; actor->unk_046 = D_i5_801B7770[i][5]; @@ -5223,7 +5223,7 @@ void Titania_801990DC(Boss* boss) { switch (boss->timer_050) { case 100: - actor = func_game_800A3608(OBJ_ACTOR_189); + actor = Game_SpawnActor(OBJ_ACTOR_DEBRIS); if (actor != NULL) { actor->fwork[0] = ((Rand_ZeroOne() < 0.5f) ? -1 : 1) * (RAND_FLOAT(1.0f) + 1.0f); actor->fwork[1] = ((Rand_ZeroOne() < 0.5f) ? -1 : 1) * (RAND_FLOAT(1.0f) + 1.0f); @@ -5243,7 +5243,7 @@ void Titania_801990DC(Boss* boss) { } break; case 120: - actor = func_game_800A3608(OBJ_ACTOR_189); + actor = Game_SpawnActor(OBJ_ACTOR_DEBRIS); if (actor != NULL) { actor->fwork[0] = ((Rand_ZeroOne() < 0.5f) ? -1 : 1) * (RAND_FLOAT(5.0f) + 5.0f); actor->fwork[1] = ((Rand_ZeroOne() < 0.5f) ? -1 : 1) * (RAND_FLOAT(5.0f) + 5.0f); @@ -5264,7 +5264,7 @@ void Titania_801990DC(Boss* boss) { } break; case 140: - actor = func_game_800A3608(OBJ_ACTOR_189); + actor = Game_SpawnActor(OBJ_ACTOR_DEBRIS); if (actor != NULL) { actor->fwork[0] = ((Rand_ZeroOne() < 0.5f) ? -1 : 1) * (RAND_FLOAT(1.0f) + 1.0f); actor->fwork[1] = ((Rand_ZeroOne() < 0.5f) ? -1 : 1) * (RAND_FLOAT(1.0f) + 1.0f); diff --git a/src/overlays/ovl_i5/fox_ti_cs.c b/src/overlays/ovl_i5/fox_ti_cs.c index 4b67df5e..c3302c7d 100644 --- a/src/overlays/ovl_i5/fox_ti_cs.c +++ b/src/overlays/ovl_i5/fox_ti_cs.c @@ -226,7 +226,7 @@ void Titania_LevelStart(Player* player) { player->gravity = 3.0f; player->unk_014 = 0.0f; D_ctx_8017782C = 1; - func_play_800A594C(); + Play_InitEnvironment(); D_ctx_8017782C = 0; if ((gControllerHold[player->num].button & Z_TRIG) && (gControllerHold[player->num].button & R_TRIG)) { Audio_KillSfxBySourceAndId(player->sfxSource, NA_SE_TANK_GO_UP); @@ -354,8 +354,8 @@ void Titania_LevelComplete(Player* player) { func_tank_80044868(player); func_tank_80045678(player); func_tank_80045E7C(player); - func_play_800A8BA4(player); - func_play_800ADF58(player); + Player_CollisionCheck(player); + Player_UpdatePath(player); if (((gGameFrameCount % 4) == 0)) { f32 x; diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index 5e90e0f7..2fb560da 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -102,7 +102,7 @@ void Andross_801878A8() { break; } - if (gLevelObjects[i].id <= OBJ_SCENERY_160) { + if (gLevelObjects[i].id < OBJ_SCENERY_MAX) { Scenery360_Initialize(scenery360); scenery360->obj.status = OBJ_ACTIVE; scenery360->obj.id = gLevelObjects[i].id; @@ -124,7 +124,7 @@ void Andross_801878A8() { break; } - if ((gLevelObjects[i].id <= OBJ_ACTOR_SUPPLIES) && (gLevelObjects[i].id >= OBJ_ACTOR_176)) { + if ((gLevelObjects[i].id < OBJ_ACTOR_MAX) && (gLevelObjects[i].id >= OBJ_ACTOR_START)) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; actor->obj.id = gLevelObjects[i].id; @@ -142,7 +142,7 @@ void Andross_801878A8() { if (gLevelObjects[i].id <= OBJ_INVALID) { break; } - if ((gLevelObjects[i].id <= OBJ_ITEM_TRAINING_RING) && (gLevelObjects[i].id >= OBJ_ITEM_LASERS)) { + if ((gLevelObjects[i].id < OBJ_ITEM_MAX) && (gLevelObjects[i].id >= OBJ_ITEM_START)) { Item_Initialize(item); item->obj.status = OBJ_ACTIVE; item->obj.id = gLevelObjects[i].id; @@ -180,7 +180,7 @@ void Andross_80187C5C(void) { break; } - if (gLevelObjects[i].id <= OBJ_SCENERY_160) { + if (gLevelObjects[i].id < OBJ_SCENERY_MAX) { Scenery360_Initialize(scenery360); scenery360->obj.status = OBJ_ACTIVE; scenery360->obj.id = gLevelObjects[i].id; @@ -205,7 +205,7 @@ void Andross_80187C5C(void) { break; } - if ((gLevelObjects[i].id <= OBJ_ACTOR_SUPPLIES) && (gLevelObjects[i].id >= OBJ_ACTOR_176)) { + if ((gLevelObjects[i].id < OBJ_ACTOR_MAX) && (gLevelObjects[i].id >= OBJ_ACTOR_START)) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; actor->obj.id = gLevelObjects[i].id; @@ -223,7 +223,7 @@ void Andross_80187C5C(void) { if (gLevelObjects[i].id <= OBJ_INVALID) { break; } - if ((gLevelObjects[i].id <= OBJ_ITEM_TRAINING_RING) && (gLevelObjects[i].id >= OBJ_ITEM_LASERS)) { + if ((gLevelObjects[i].id < OBJ_ITEM_MAX) && (gLevelObjects[i].id >= OBJ_ITEM_START)) { Item_Initialize(item); item->obj.status = OBJ_ACTIVE; item->obj.id = gLevelObjects[i].id; @@ -591,7 +591,7 @@ void Andross_80189214(void) { gPathProgress = 0.0f; player->unk_018 = player->unk_014 = 1.0f; player->pos.z = player->trueZpos = -player->zPath; - func_play_800B56BC(player); + Camera_UpdateArwingOnRails(player); } void Andross_8018933C(Actor* actor) { @@ -664,7 +664,7 @@ void Andross_80189470(Actor* actor) { Andross_80193710(); D_ctx_8017782C = 1; - func_play_800A594C(); + Play_InitEnvironment(); gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; gFillScreenAlpha = gFillScreenAlphaTarget = 255; player->csTimer = 2; @@ -1018,7 +1018,7 @@ void Andross_80189B70(Boss* boss) { Andross_80188468(); Andross_80187C5C(); gPlayer[0].unk_014 = 1.0f; - func_play_800B7184(gPlayer, 1); + Camera_Update360(gPlayer, 1); Audio_StartPlayerNoise(0); AUDIO_PLAY_BGM(D_boss_800C9E90[gCurrentLevel]); AUDIO_PLAY_SFX(NA_SE_OB_ROOT_EXPLOSION1, gDefaultSfxSource, 0); @@ -1332,7 +1332,7 @@ void Andross_8018C390(Player* player) { break; } player->trueZpos = player->pos.z + player->camDist; - func_play_800A46A0(player); + Player_DamageEffects(player); } void Andross_8018C660(Effect* effect, f32 xPos, f32 yPos, f32 zPos, s32 arg4) { @@ -3368,7 +3368,7 @@ void Andross_80193710(void) { break; } - if (gLevelObjects[i].id <= OBJ_SCENERY_160) { + if (gLevelObjects[i].id < OBJ_SCENERY_MAX) { Scenery360_Initialize(scenery360); scenery360->obj.status = OBJ_ACTIVE; scenery360->obj.id = gLevelObjects[i].id; @@ -3386,7 +3386,7 @@ void Andross_80193710(void) { break; } - if ((gLevelObjects[i].id >= OBJ_ACTOR_176) && (gLevelObjects[i].id <= OBJ_ACTOR_SUPPLIES)) { + if ((gLevelObjects[i].id >= OBJ_ACTOR_START) && (gLevelObjects[i].id < OBJ_ACTOR_MAX)) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; actor->obj.id = gLevelObjects[i].id; @@ -3402,7 +3402,7 @@ void Andross_80193710(void) { boss = &gBosses[0]; Boss_Initialize(boss); boss->obj.status = OBJ_INIT; - boss->obj.id = OBJ_BOSS_312; + boss->obj.id = OBJ_BOSS_VE2; Object_SetInfo(&boss->info, boss->obj.id); } @@ -3658,7 +3658,7 @@ void Andross_80193C4C(Player* player) { } Andross_80193710(); D_ctx_8017782C = 1; - func_play_800A594C(); + Play_InitEnvironment(); gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; gFillScreenAlpha = gFillScreenAlphaTarget = 255; player->csTimer = 2; @@ -3779,7 +3779,7 @@ void Andross_80193C4C(Player* player) { } if (gCsFrameCount == 190) { - Play_SetupStarfield(); + Play_GenerateStarfield(); gStarCount = 1000; player->unk_204 = 0; } diff --git a/src/overlays/ovl_i6/fox_sy.c b/src/overlays/ovl_i6/fox_sy.c index 020a02e8..3d63126d 100644 --- a/src/overlays/ovl_i6/fox_sy.c +++ b/src/overlays/ovl_i6/fox_sy.c @@ -18,8 +18,8 @@ void SectorY_8019BBBC(Boss*); void SectorY_8019BC14(Boss*); void SectorY_8019C194(Boss*, f32, f32); void SectorY_801A0510(Actor*, s32); -void SectorY_801A39FC(Actor*, f32, f32, f32, f32, f32, f32, s32); -void SectorY_801A3B50(f32, f32, f32, f32, f32, f32, s32); +void SectorY_SetupDebris(Actor*, f32, f32, f32, f32, f32, f32, s32); +void SectorY_SpawnDebris(f32, f32, f32, f32, f32, f32, s32); f32 D_i6_801A8440[3]; @@ -555,8 +555,9 @@ void SectorY_80199438(Boss* boss) { func_effect_8007B344(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 8.0f, 5); for (i = 10; i < 24; i++) { if (i != 15) { - SectorY_801A3B50(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, RAND_FLOAT_CENTERED(50.0f), - RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT_CENTERED(50.0f) + boss->vel.z, i); + SectorY_SpawnDebris(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, + RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT_CENTERED(50.0f), + RAND_FLOAT_CENTERED(50.0f) + boss->vel.z, i); } } } @@ -594,8 +595,8 @@ void SectorY_80199438(Boss* boss) { for (i = 10; i < 24; i++) { if (i != 15) { - SectorY_801A3B50(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, RAND_FLOAT_CENTERED(50.0f), - RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT_CENTERED(50.0f) + boss->vel.z, i); + SectorY_SpawnDebris(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, RAND_FLOAT_CENTERED(50.0f), + RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT_CENTERED(50.0f) + boss->vel.z, i); } } boss->timer_058 = 100; @@ -611,7 +612,7 @@ void SectorY_80199438(Boss* boss) { gScenery360[0].info.drawType = 0; } else { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ACTIVE; - func_play_800B63BC(&gPlayer[0], 1); + Camera_UpdateArwing360(&gPlayer[0], 1); gPlayer[0].unk_014 = 0.0f; if (gTeamShields[TEAM_ID_PEPPY] > 0) { AllRange_PlayMessage(gMsg_ID_14230, RCID_PEPPY); @@ -627,9 +628,9 @@ void SectorY_80199438(Boss* boss) { for (j = ARRAY_COUNT(gActors) - 1; j >= 0; j--) { if (gActors[j].obj.status == OBJ_FREE) { - SectorY_801A39FC(&gActors[j], boss->fwork[28], boss->fwork[29], boss->fwork[30], - RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT_CENTERED(50.0f), - RAND_FLOAT_CENTERED(50.0f) + boss->vel.z, 15); + SectorY_SetupDebris(&gActors[j], boss->fwork[28], boss->fwork[29], boss->fwork[30], + RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT_CENTERED(50.0f), + RAND_FLOAT_CENTERED(50.0f) + boss->vel.z, 15); break; } } @@ -1074,7 +1075,7 @@ void SectorY_8019AEEC(Boss* boss) { boss->fwork[43] = 0.0f; boss->vel.y = 0.0f; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ACTIVE; - func_play_800B63BC(&gPlayer[0], 1); + Camera_UpdateArwing360(&gPlayer[0], 1); gPlayer[0].unk_014 = 0.0f; boss->swork[34]++; Radio_PlayMessage(gMsg_ID_14310, RCID_BOSS_SECTORY); @@ -1372,7 +1373,7 @@ static BossFuncs D_i6_801A6910[] = { SectorY_80199DAC, SectorY_8019A520, SectorY_8019A66C, SectorY_8019A898, SectorY_8019AAF0, SectorY_8019AEEC, }; -void SectorY_8019C888(Boss* boss) { +void SectorY_Boss_Update(Boss* boss) { s32 i; f32 sp1E8; f32 sp1E4; @@ -1861,7 +1862,7 @@ void SectorY_8019E014(s32 limbIndex, Vec3f* rot, void* data) { static f32 D_i6_801A69AC[20] = { 0.3f, 0.7f, 1.3f, 0.7f, 0.3f, 0.0f, 10.0f, 20.0f, 300.0f, 100.0f, 200.0f, 100.0f, 60.0f, -260.0f, 80.0f, 100.0f, 80.0f, 262.0f, 285.0f, 252.0f }; -void SectorY_8019E2C4(Boss* boss) { +void SectorY_Boss_Draw(Boss* boss) { f32 sp9C; f32 sp98; f32 sp94; @@ -2679,11 +2680,11 @@ void SectorY_801A0AC0(Player* player) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &spA4, &sp98); for (i = 0; i < 10; i++) { - if (gPlayerShots[i].obj.status == OBJ_FREE) { - Actor_SetupPlayerShot(PLAYERSHOT_1, &gPlayerShots[i], CS_SHOT_ID, gActors[8].obj.pos.x, + if (gPlayerShots[i].obj.status == SHOT_FREE) { + Actor_SetupPlayerShot(PLAYERSHOT_TWIN_LASER, &gPlayerShots[i], CS_SHOT_ID, gActors[8].obj.pos.x, gActors[8].obj.pos.y - 200.0f, sp80, sp98.x, sp98.y, sp98.z, sp88, sp84, 0.0f); - gPlayerShots[i].unk_64 = 200; + gPlayerShots[i].timer = 200; break; } } @@ -2794,11 +2795,11 @@ void SectorY_801A0AC0(Player* player) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &spA4, &sp98); for (i = 0; i < 11; i++) { - if (gPlayerShots[i].obj.status == OBJ_FREE) { - Actor_SetupPlayerShot(PLAYERSHOT_1, &gPlayerShots[i], CS_SHOT_ID, gActors[8].obj.pos.x, - gActors[8].obj.pos.y, gActors[8].obj.pos.z, sp98.x, sp98.y, sp98.z, - sp88, sp84, 0.0f); - gPlayerShots[i].unk_64 = 174; + if (gPlayerShots[i].obj.status == SHOT_FREE) { + Actor_SetupPlayerShot(PLAYERSHOT_TWIN_LASER, &gPlayerShots[i], CS_SHOT_ID, + gActors[8].obj.pos.x, gActors[8].obj.pos.y, gActors[8].obj.pos.z, + sp98.x, sp98.y, sp98.z, sp88, sp84, 0.0f); + gPlayerShots[i].timer = 174; break; } } @@ -2830,9 +2831,9 @@ void SectorY_801A0AC0(Player* player) { case 150: Object_Kill(&gActors[11].obj, gActors[11].sfxSource); for (i = 10; i < 24; i++) { - SectorY_801A3B50(gActors[11].obj.pos.x, gActors[11].obj.pos.y, gActors[11].obj.pos.z, - RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT_CENTERED(50.0f), - RAND_FLOAT_CENTERED(50.0f), i); + SectorY_SpawnDebris(gActors[11].obj.pos.x, gActors[11].obj.pos.y, gActors[11].obj.pos.z, + RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT_CENTERED(50.0f), + RAND_FLOAT_CENTERED(50.0f), i); } break; @@ -3396,11 +3397,11 @@ void SectorY_801A0AC0(Player* player) { player->trueZpos = player->pos.z + player->camDist; } -void SectorY_801A39FC(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, s32 arg7) { +void SectorY_SetupDebris(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, s32 state) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_189; - actor->state = arg7; + actor->obj.id = OBJ_ACTOR_DEBRIS; + actor->state = state; actor->obj.pos.x = xPos; actor->obj.pos.y = yPos; actor->obj.pos.z = zPos; @@ -3412,12 +3413,12 @@ void SectorY_801A39FC(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 Object_SetInfo(&actor->info, actor->obj.id); } -void SectorY_801A3B50(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, s32 arg6) { +void SectorY_SpawnDebris(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, s32 state) { s32 i; for (i = ARRAY_COUNT(gActors) - 1; i >= 0; i--) { if (gActors[i].obj.status == OBJ_FREE) { - SectorY_801A39FC(&gActors[i], xPos, yPos, zPos, xVel, yVel, zVel, arg6); + SectorY_SetupDebris(&gActors[i], xPos, yPos, zPos, xVel, yVel, zVel, state); break; } } @@ -3625,8 +3626,8 @@ void SectorY_Actor204_Update(Actor204* this) { Object_Kill(&this->obj, this->sfxSource); Actor_Despawn(this); for (i = 10; i < 24; i++) { - SectorY_801A3B50(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, RAND_FLOAT_CENTERED(50.0f), - RAND_FLOAT_CENTERED(50.0f), this->vel.z + RAND_FLOAT_CENTERED(50.0f), i); + SectorY_SpawnDebris(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, RAND_FLOAT_CENTERED(50.0f), + RAND_FLOAT_CENTERED(50.0f), this->vel.z + RAND_FLOAT_CENTERED(50.0f), i); } } break; diff --git a/src/overlays/ovl_i6/fox_turret.c b/src/overlays/ovl_i6/fox_turret.c index 5519389f..0d4833ab 100644 --- a/src/overlays/ovl_i6/fox_turret.c +++ b/src/overlays/ovl_i6/fox_turret.c @@ -1,6 +1,6 @@ #include "global.h" -void Turret_801A5560(Player* player, PlayerShot* shot, f32 xOffset, f32 yOffset, f32 zOffset, s32 shotId, f32 speed) { +void Turret_SetupShot(Player* player, PlayerShot* shot, f32 xOffset, f32 yOffset, f32 zOffset, s32 shotId, f32 speed) { Vec3f sp4C; Vec3f sp40; Vec3f sp34; @@ -26,7 +26,7 @@ void Turret_801A5560(Player* player, PlayerShot* shot, f32 xOffset, f32 yOffset, sp4C.z = speed; Matrix_MultVec3f(gCalcMatrix, &sp4C, &sp40); Matrix_GetYRPAngles(gCalcMatrix, &sp4C); - shot->obj.status = 1; + shot->obj.status = SHOT_ACTIVE; shot->vel.x = sp40.x; shot->vel.y = sp40.y; @@ -48,53 +48,56 @@ void Turret_801A5560(Player* player, PlayerShot* shot, f32 xOffset, f32 yOffset, shot->obj.rot.z = player->rot.z; shot->unk_60 = 0; shot->obj.id = shotId; - shot->unk_64 = 40; + shot->timer = 40; shot->scale = 1.5f; shot->sourceId = player->num; } -void Turret_801A581C(Player* player, f32 xOffset) { +void Turret_GreatFoxLaser(Player* player, f32 xOffset) { s32 i; PlayerShot* shot; for (i = 0; i < ARRAY_COUNT(gPlayerShots); i++) { - if (gPlayerShots[i].obj.status == 0) { - Turret_801A5560(player, &gPlayerShots[i], xOffset, -100.0f, 200.0f, PLAYERSHOT_9, 100.0f); - func_play_800A6028(gPlayerShots[i].sfxSource, NA_SE_TURRET_SHOT); + if (gPlayerShots[i].obj.status == SHOT_FREE) { + Turret_SetupShot(player, &gPlayerShots[i], xOffset, -100.0f, 200.0f, PLAYERSHOT_GFOX_LASER, 100.0f); + Play_PlaySfxFirstPlayer(gPlayerShots[i].sfxSource, NA_SE_TURRET_SHOT); break; } } } -void Turret_801A58A8(Player* player) { +void Turret_Shoot(Player* player) { s32 i; if (gControllerPress[player->num].button & A_BUTTON) { - player->timer_244 = 0; + player->shotTimer = 0; } + // Fires two great fox lasers. Offsets match up with the possible guns in Draw. if (gControllerHold[player->num].button & A_BUTTON) { - if (player->timer_244 == 0) { - Turret_801A581C(player, -100.0f); - Turret_801A581C(player, 100.0f); - player->unk_1BC = 30; + if (player->shotTimer == 0) { + Turret_GreatFoxLaser(player, -100.0f); + Turret_GreatFoxLaser(player, 100.0f); + player->turretRecoil = 30; } - player->timer_244++; - if (player->timer_244 >= 4) { - player->timer_244 = 0; + player->shotTimer++; + if (player->shotTimer >= 4) { + player->shotTimer = 0; } } - if (player->unk_1BC > 0) { - player->unk_1BC -= 4; + if (player->turretRecoil > 0) { + player->turretRecoil -= 4; } else { - player->unk_1BC = 0; + player->turretRecoil = 0; } + // Fires the lock on attack? The code is missing if so if (gControllerPress[player->num].button & R_TRIG) { - player->unk_1C0 = 0; + player->turretLockOnCount = 0; } - for (i = 0; i < player->unk_1C0; i++) { + // Draws a textured line to each Event Actor in sequence as R is held. Some sort of charged lock on attack? + for (i = 0; i < player->turretLockOnCount; i++) { if ((gActors[i].obj.status == OBJ_ACTIVE) && (gActors[i].obj.id == OBJ_ACTOR_EVENT)) { gTexturedLines[i].mode = 3; gTexturedLines[i].zScale = 1.0f; @@ -116,51 +119,57 @@ void Turret_801A58A8(Player* player) { } } if (gControllerHold[player->num].button & R_TRIG) { - player->unk_1C0++; - if (player->unk_1C0 > ARRAY_COUNT(gActors)) { - player->unk_1C0 = ARRAY_COUNT(gActors); + player->turretLockOnCount++; + if (player->turretLockOnCount > ARRAY_COUNT(gActors)) { + player->turretLockOnCount = ARRAY_COUNT(gActors); } else { - player->unk_1C0 = player->unk_1C0; + player->turretLockOnCount = player->turretLockOnCount; } } else { - player->unk_1C0 = 0; + player->turretLockOnCount = 0; } } -void Turret_801A5AD4(Player* player) { +void Turret_Update(Player* player) { f32 sp2C; f32 sp28; - player->pos.x = gActors[player->unk_1B4].obj.pos.x; - player->pos.y = gActors[player->unk_1B4].obj.pos.y; - player->pos.z = gActors[player->unk_1B4].obj.pos.z; - player->unk_000 = gActors[player->unk_1B4].obj.rot.y; - player->unk_004 = gActors[player->unk_1B4].obj.rot.x; - player->rot.z = gActors[player->unk_1B4].obj.rot.z; - if (player->unk_1B0 < 2) { - if (player->unk_1B0 == 0) { - player->unk_1BC = 200; - player->unk_1B0++; + // The player follows the turret actor. Possibly the great fox + player->pos.x = gActors[player->turretActor].obj.pos.x; + player->pos.y = gActors[player->turretActor].obj.pos.y; + player->pos.z = gActors[player->turretActor].obj.pos.z; + player->unk_000 = gActors[player->turretActor].obj.rot.y; + player->unk_004 = gActors[player->turretActor].obj.rot.x; + player->rot.z = gActors[player->turretActor].obj.rot.z; + + // Disables controls for 50 frames. some sort of big charged attack? + if (player->turretState < 2) { + if (player->turretState == 0) { + player->turretRecoil = 200; + player->turretState++; } gControllerLock = 10; - if (player->unk_1BC == 0) { + if (player->turretRecoil == 0) { gControllerLock = 0; - player->unk_1B0++; + player->turretState++; gLevelStartStatusScreenTimer = 50; } } + + // The control stick may have moved a targeting cursor sp2C = (f32) gControllerPress[player->num].stick_x; sp28 = -(f32) gControllerPress[player->num].stick_y; Math_SmoothStepToF(&player->rot.y, -sp2C * 0.35000002f, 0.5f, 2.0f, 0.00001f); Math_SmoothStepToF(&player->rot.x, -sp28 * 0.3f, 0.5f, 2.0f, 0.00001f); player->trueZpos = player->pos.z; - player->zPathVel = -gActors[player->unk_1B4].vel.z; + player->zPathVel = -gActors[player->turretActor].vel.z; player->zPath += player->zPathVel; gPathVelZ = player->zPathVel; gPathProgress = player->zPath; - if (!(gControllerHold[player->num].button & Z_TRIG) && (sqrtf((sp2C * sp2C) + (sp28 * sp28)) > 55.0f)) { + // These appear to move the camera around unless locked in place with Z + if (!(gControllerHold[player->num].button & Z_TRIG) && (sqrtf(SQ(sp2C) + SQ(sp28)) > 55.0f)) { if ((gControllerHold[player->num].button & R_CBUTTONS) || (sp2C > 40.0f)) { player->unk_008 += 2.0f; } @@ -200,15 +209,17 @@ void Turret_801A5AD4(Player* player) { if (player->unk_00C < -20.0f) { player->flags_228 |= PFLAG_228_2; } + + // the B button recenters the view straight ahead if (gControllerPress[player->num].button & B_BUTTON) { player->unk_008 = player->unk_00C = 0.0f; } Math_SmoothStepToF(&player->unk_180, -player->unk_008, 0.5f, 3.0f, 0.00001f); Math_SmoothStepToF(&player->unk_17C, -player->unk_00C, 0.5f, 3.0f, 0.00001f); - Turret_801A58A8(player); + Turret_Shoot(player); } -void Turret_801A5FC0(Player* player) { +void Turret_UpdateCamera(Player* player) { Vec3f sp3C; Vec3f sp30; @@ -232,9 +243,10 @@ void Turret_801A5FC0(Player* player) { player->cam.eye.z = player->pos.z + gPathProgress; } -void Turret_801A6164(Player* player) { +void Turret_Draw(Player* player) { static f32 D_i6_801A6B80 = -100.0f; + // Probably a Y-offset adjustment, for debug? if (gControllerHold[player->num].button & U_JPAD) { D_i6_801A6B80 += 10.0f; } @@ -243,43 +255,48 @@ void Turret_801A6164(Player* player) { } Matrix_Push(&gGfxMatrix); + // Possibly the targeting cursor. During the big attack, it would come back to the player before moving outward RCP_SetupDL_36(); Matrix_Translate(gGfxMatrix, 0.0f, -100.0f, 0.0f, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, player->rot.y * M_DTOR, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, -player->rot.x * M_DTOR, MTXF_APPLY); - if (player->unk_1B0 < 2) { - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -5000.0f + (player->unk_1BC * 25), MTXF_APPLY); + if (player->turretState < 2) { + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -5000.0f + (player->turretRecoil * 25), MTXF_APPLY); } else { Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -5000.0f, MTXF_APPLY); } Matrix_Scale(gGfxMatrix, 12.0f, 12.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); Matrix_Pop(&gGfxMatrix); + + // Likely displayed the turrets guns. They are 100 units to the left and right of the player and 100 units below RCP_SetupDL_27(); - if ((player->unk_1BC > 20) && (player->unk_1B0 >= 2)) { + if ((player->turretRecoil > 20) && (player->turretState >= 2)) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 200, 0, 100, 255); } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); } Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, -100.0f, -100.0f, -200.0f + player->unk_1BC, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, -100.0f, -100.0f, -200.0f + player->turretRecoil, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, player->rot.y * M_DTOR, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, -player->rot.x * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 100.0f, -100.0f, -200.0f + player->unk_1BC, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 100.0f, -100.0f, -200.0f + player->turretRecoil, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, player->rot.y * M_DTOR, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, -player->rot.x * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); Matrix_Pop(&gGfxMatrix); - if ((player->unk_1BC > 20) && (player->unk_1B0 >= 2)) { + + // Likely drew muzzle flashes. This suggests the guns were 188 long + if ((player->turretRecoil > 20) && (player->turretState >= 2)) { RCP_SetupDL_64(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 128); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, -100.0f, -100.0f, -200.0f + player->unk_1BC, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, -100.0f, -100.0f, -200.0f + player->turretRecoil, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, player->rot.y * M_DTOR, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, -player->rot.x * M_DTOR, MTXF_APPLY); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -188.0f, MTXF_APPLY); @@ -287,7 +304,7 @@ void Turret_801A6164(Player* player) { Matrix_SetGfxMtx(&gMasterDisp); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 100.0f, -100.0f, -200.0f + player->unk_1BC, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 100.0f, -100.0f, -200.0f + player->turretRecoil, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, player->rot.y * M_DTOR, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, -player->rot.x * M_DTOR, MTXF_APPLY); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -188.0f, MTXF_APPLY); diff --git a/src/overlays/ovl_i6/fox_ve2.c b/src/overlays/ovl_i6/fox_ve2.c index edee1db0..ebaa5205 100644 --- a/src/overlays/ovl_i6/fox_ve2.c +++ b/src/overlays/ovl_i6/fox_ve2.c @@ -1,7 +1,7 @@ #include "global.h" #include "assets/ast_venom_2.h" -void Venom2_80196210(Boss* boss) { +void Venom2_Boss_Update(Boss* boss) { Math_SmoothStepToF(&boss->fwork[0], boss->fwork[1], 0.5f, 5.0f, 0.0f); } @@ -15,7 +15,7 @@ bool Venom2_8019624C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* d return false; } -void Venom2_80196288(Boss* boss) { +void Venom2_Boss_Draw(Boss* boss) { Animation_GetFrameData(&D_VE2_6014904, 0, boss->vwork); Animation_DrawSkeleton(3, D_VE2_60149D0, boss->vwork, Venom2_8019624C, NULL, boss, gCalcMatrix); } @@ -74,7 +74,7 @@ void Venom2_UpdateEvents(Actor* this) { gFillScreenAlpha = gFillScreenAlphaTarget = 255; } - func_play_800B63BC(player, 1); + Camera_UpdateArwing360(player, 1); /* fallthrough */ case 1: @@ -133,7 +133,7 @@ void Venom2_UpdateEvents(Actor* this) { if ((gControllerPress->button & START_BUTTON) || (gAllRangeEventTimer == (gAllRangeSpawnEvent + 300))) { this->state = 2; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; - func_play_800B7184(player, 1); + Camera_Update360(player, 1); player->unk_014 = 0.0f; D_hud_80161708 = 0; } @@ -178,7 +178,7 @@ void Venom2_80196968(void) { break; } - if (gLevelObjects[i].id <= OBJ_SCENERY_160) { + if (gLevelObjects[i].id < OBJ_SCENERY_MAX) { Scenery360_Initialize(scenery360); scenery360->obj.status = OBJ_ACTIVE; scenery360->obj.id = gLevelObjects[i].id; @@ -198,7 +198,7 @@ void Venom2_80196968(void) { break; } - if ((gLevelObjects[i].id >= OBJ_ACTOR_176) && (gLevelObjects[i].id <= OBJ_ACTOR_SUPPLIES)) { + if ((gLevelObjects[i].id >= OBJ_ACTOR_START) && (gLevelObjects[i].id < OBJ_ACTOR_MAX)) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; actor->obj.id = gLevelObjects[i].id; @@ -213,7 +213,7 @@ void Venom2_80196968(void) { boss = &gBosses[0]; Boss_Initialize(boss); boss->obj.status = OBJ_INIT; - boss->obj.id = OBJ_BOSS_312; + boss->obj.id = OBJ_BOSS_VE2; Object_SetInfo(&boss->info, boss->obj.id); } diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index 65df066a..ca8b6cae 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -1204,7 +1204,7 @@ void Map_801AD048(void); void Map_8019E800(void) { Memory_FreeAll(); - Play_SetupStarfield(); + Play_GenerateStarfield(); gStarCount = 0; gNextGameState = GSTATE_MAP; D_game_80161A34 = 5; @@ -1869,8 +1869,8 @@ void Map_8019FF48(void) { Map_801AD718(D_menu_801CDA00, D_menu_801CDA04, D_menu_801CDA08, &D_menu_801CD9F4, &D_menu_801CD9F8, &D_menu_801CD9FC, D_menu_801CDA14, D_menu_801CDA0C + D_menu_801CDA18, D_menu_801CDA10 + D_menu_801CDA1C); - func_play_800B6F50(D_menu_801CD9F4, D_menu_801CD9F8, D_menu_801CD9FC, D_menu_801CDA00, D_menu_801CDA04, - D_menu_801CDA08); + Camera_SetStarfieldPos(D_menu_801CD9F4, D_menu_801CD9F8, D_menu_801CD9FC, D_menu_801CDA00, D_menu_801CDA04, + D_menu_801CDA08); } gGameFrameCount++; #if MODS_LEVEL_SELECT == true @@ -2013,7 +2013,7 @@ void Map_801A0788(void) { gStarCount = 800; Memory_FreeAll(); - Play_SetupStarfield(); + Play_GenerateStarfield(); gStarfieldX = SCREEN_WIDTH; gStarfieldY = SCREEN_HEIGHT; @@ -2896,8 +2896,8 @@ void Map_801A2B8C(void) { break; } - func_play_800B6F50(D_menu_801CD9F4, D_menu_801CD9F8, D_menu_801CD9FC, D_menu_801CDA00, D_menu_801CDA04, - D_menu_801CDA08); + Camera_SetStarfieldPos(D_menu_801CD9F4, D_menu_801CD9F8, D_menu_801CD9FC, D_menu_801CDA00, D_menu_801CDA04, + D_menu_801CDA08); D_menu_801CD9C4++; } diff --git a/src/overlays/ovl_menu/fox_option.c b/src/overlays/ovl_menu/fox_option.c index 4936d5ce..1573e9f1 100644 --- a/src/overlays/ovl_menu/fox_option.c +++ b/src/overlays/ovl_menu/fox_option.c @@ -517,7 +517,7 @@ void Option_Setup(void) { gStarfieldX = SCREEN_WIDTH; gStarfieldY = SCREEN_HEIGHT; - Play_SetupStarfield(); + Play_GenerateStarfield(); gCsCamEyeX = 0.0f; gCsCamEyeY = 0.0f; @@ -1311,27 +1311,27 @@ void Option_SoundInit(void) { gOptionSoundMode = gSaveFile.save.data.soundMode; SEQCMD_SET_SOUND_MODE(D_menu_801AE998[gOptionSoundMode]); - gVolumeSettings[0] = gSaveFile.save.data.musicVolume; - gVolumeSettings[1] = gSaveFile.save.data.voiceVolume; - gVolumeSettings[2] = gSaveFile.save.data.sfxVolume; + gVolumeSettings[AUDIO_TYPE_MUSIC] = gSaveFile.save.data.musicVolume; + gVolumeSettings[AUDIO_TYPE_VOICE] = gSaveFile.save.data.voiceVolume; + gVolumeSettings[AUDIO_TYPE_SFX] = gSaveFile.save.data.sfxVolume; - if (gVolumeSettings[0] > 99) { - gVolumeSettings[0] = 99; + if (gVolumeSettings[AUDIO_TYPE_MUSIC] > 99) { + gVolumeSettings[AUDIO_TYPE_MUSIC] = 99; } - if (gVolumeSettings[1] > 99) { - gVolumeSettings[1] = 99; + if (gVolumeSettings[AUDIO_TYPE_VOICE] > 99) { + gVolumeSettings[AUDIO_TYPE_VOICE] = 99; } - if (gVolumeSettings[2] > 99) { - gVolumeSettings[2] = 99; + if (gVolumeSettings[AUDIO_TYPE_SFX] > 99) { + gVolumeSettings[AUDIO_TYPE_SFX] = 99; } - Audio_SetVolume(0, gVolumeSettings[0]); - Audio_SetVolume(1, gVolumeSettings[1]); - Audio_SetVolume(2, gVolumeSettings[2]); + Audio_SetVolume(0, gVolumeSettings[AUDIO_TYPE_MUSIC]); + Audio_SetVolume(1, gVolumeSettings[AUDIO_TYPE_VOICE]); + Audio_SetVolume(2, gVolumeSettings[AUDIO_TYPE_SFX]); - D_menu_801AEB48[0].unk_18 = gVolumeSettings[0] + 146.0f; - D_menu_801AEB48[1].unk_18 = gVolumeSettings[1] + 146.0f; - D_menu_801AEB48[2].unk_18 = gVolumeSettings[2] + 146.0f; + D_menu_801AEB48[0].unk_18 = gVolumeSettings[AUDIO_TYPE_MUSIC] + 146.0f; + D_menu_801AEB48[1].unk_18 = gVolumeSettings[AUDIO_TYPE_VOICE] + 146.0f; + D_menu_801AEB48[2].unk_18 = gVolumeSettings[AUDIO_TYPE_SFX] + 146.0f; D_menu_801B9288 = 0; D_menu_801B9284 = 0; diff --git a/src/overlays/ovl_menu/fox_title.c b/src/overlays/ovl_menu/fox_title.c index 4804b8d3..5d6f79db 100644 --- a/src/overlays/ovl_menu/fox_title.c +++ b/src/overlays/ovl_menu/fox_title.c @@ -198,7 +198,7 @@ void Title_Init(void) { Memory_FreeAll(); - Play_SetupStarfield(); + Play_GenerateStarfield(); gStarfieldX = SCREEN_WIDTH; gStarfieldY = SCREEN_HEIGHT; @@ -368,7 +368,7 @@ void Title_80187B00(void) { case 1: if (D_menu_801B82BC != 0) { - func_play_800B6F50(gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ); + Camera_SetStarfieldPos(gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ); D_ctx_8017842C -= 1.0f; if (D_menu_801B82BC == 60) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 60); @@ -840,7 +840,7 @@ void Title_801888E8(void) { Title_80191320(1, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86A8, D_menu_801B86AC, D_menu_801B86B0); - func_play_800B6F50(gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ); + Camera_SetStarfieldPos(gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ); D_ctx_8017842C -= 0.5f; @@ -1192,7 +1192,7 @@ void Title_8018994C(void) { Title_80191674(D_menu_801B86C8, D_menu_801B86CC, 100.0f, &D_menu_801B82E0, &D_menu_801B82E4, &D_menu_801B82E8); if (D_menu_801B7BE8 != 0) { - func_play_800B6F50(gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ); + Camera_SetStarfieldPos(gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ); } D_ctx_8017842C -= D_menu_801B7BE8; @@ -1529,7 +1529,7 @@ void Title_8018ACEC(void) { Title_80191320(1, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86A8, D_menu_801B86AC, D_menu_801B86B0); Title_80191674(D_menu_801B86C8, D_menu_801B86CC, 100.0f, &D_menu_801B82E0, &D_menu_801B82E4, &D_menu_801B82E8); - func_play_800B6F50(gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ); + Camera_SetStarfieldPos(gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ); D_ctx_8017842C += 2.0f; D_ctx_80178430 += 2.0f; @@ -2110,7 +2110,7 @@ void Title_8018C644(void) { Title_80191844(D_menu_801B86A8, D_menu_801B86AC); Title_8018CC30(D_menu_801B8294, 9, D_menu_801B8290); Title_80191674(D_menu_801B86C8, D_menu_801B86CC, 100.0f, &D_menu_801B82E0, &D_menu_801B82E4, &D_menu_801B82E8); - func_play_800B6F50(gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ); + Camera_SetStarfieldPos(gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ); D_menu_801B7BEC++; } @@ -2266,7 +2266,7 @@ void Title_8018D2B8(s32 arg0) { func_display_80053658(&wings); - func_edisplay_8005F1EC(D_menu_801B84E8[arg0].unk_50); + Object_UpdateSfxSource(D_menu_801B84E8[arg0].unk_50); if (D_menu_801B84E8[arg0].unk_40 != 0) { Title_8018D80C(arg0); @@ -2468,7 +2468,7 @@ void Title_8018E058(void) { gGreatFoxIntact = true; Cutscene_DrawGreatFox(); - func_edisplay_8005F1EC(D_menu_801B8658.unk_24); + Object_UpdateSfxSource(D_menu_801B8658.unk_24); Matrix_Pop(&gGfxMatrix); } @@ -2575,7 +2575,7 @@ void Title_8018E67C(s32 arg0) { } if (arg0 == 0) { - func_edisplay_8005F1EC(D_menu_801B84D8); + Object_UpdateSfxSource(D_menu_801B84D8); } Matrix_Pop(&gGfxMatrix); diff --git a/src/sys/sys_fault.c b/src/sys/sys_fault.c index 000304a5..c4144236 100644 --- a/src/sys/sys_fault.c +++ b/src/sys/sys_fault.c @@ -318,7 +318,7 @@ void Fault_ThreadEntry(void* arg0) { #endif func_80007910(sp40); - while (1) { + while (true) { ; } } diff --git a/src/sys/sys_lib.c b/src/sys/sys_lib.c index 9360abc0..a49fe580 100644 --- a/src/sys/sys_lib.c +++ b/src/sys/sys_lib.c @@ -27,7 +27,7 @@ void Lib_QuickSort(u8* first, u32 length, u32 size, CompareFunc cFunc) { u8* right; u8* left; - while (1) { + while (true) { last = first + (length - 1) * size; if (length == 2) { @@ -40,7 +40,7 @@ void Lib_QuickSort(u8* first, u32 length, u32 size, CompareFunc cFunc) { left = first; right = last - size; - while (1) { + while (true) { while (cFunc(left, last) < 0) { left += size; } diff --git a/src/sys/sys_main.c b/src/sys/sys_main.c index 1d16f407..63e3b98f 100644 --- a/src/sys/sys_main.c +++ b/src/sys/sys_main.c @@ -112,7 +112,7 @@ void Audio_ThreadEntry(void* arg0) { osWritebackDCacheAll(); osSendMesg(&gTaskMesgQueue, task, OS_MESG_NOBLOCK); } - while (1) { + while (true) { task = AudioThread_CreateTask(); if (task != NULL) { task->mesgQueue = &gAudioTaskMesgQueue; @@ -199,7 +199,7 @@ void SerialInterface_ThreadEntry(void* arg0) { OSMesg sp34; Controller_Init(); - while (1) { + while (true) { MQ_WAIT_FOR_MESG(&gSerialThreadMesgQueue, &sp34); switch ((s32) sp34) { @@ -222,7 +222,7 @@ void SerialInterface_ThreadEntry(void* arg0) { void Timer_ThreadEntry(void* arg0) { void* sp24; - while (1) { + while (true) { MQ_WAIT_FOR_MESG(&gTimerTaskMesgQueue, &sp24); Timer_CompleteTask(sp24); } @@ -247,7 +247,7 @@ void Graphics_ThreadEntry(void* arg0) { gSPEndDisplayList(gMasterDisp++); } Graphics_SetTask(); - while (1) { + while (true) { gSysFrameCount++; Graphics_InitializeTask(gSysFrameCount); MQ_WAIT_FOR_MESG(&gControllerMesgQueue, NULL); From 182eb5c65ae3ba92ec02f62f3be1b92613b9838e Mon Sep 17 00:00:00 2001 From: petrie911 <69443847+petrie911@users.noreply.github.com> Date: Wed, 8 May 2024 10:32:05 -0500 Subject: [PATCH 069/151] Use SF3DS BGM names, some other audio-related cleanup. (#235) * remember to undo mods * bgm macros --- .vscode/settings.json | 3 +- include/bgm.h | 171 ++++++++ include/prevent_context_reordering.h | 6 +- include/sf64audio_external.h | 175 ++------ include/sfx.h | 175 +++++--- include/sys.h | 7 - src/audio/audio_general.c | 621 ++++++++++++--------------- src/audio/audio_tables.c | 16 +- src/engine/fox_360.c | 2 +- src/engine/fox_beam.c | 2 +- src/engine/fox_boss.c | 6 +- src/engine/fox_demo.c | 6 +- src/engine/fox_effect.c | 2 +- src/engine/fox_enmy2.c | 4 +- src/engine/fox_hud.c | 6 +- src/engine/fox_play.c | 18 +- src/engine/fox_tank.c | 2 +- src/engine/fox_versus.c | 6 +- src/mods/levelselect.c | 5 + src/mods/sfxjukebox.c | 2 +- src/mods/sfxjukebox2.c | 2 +- src/overlays/ovl_ending/fox_end2.c | 4 +- src/overlays/ovl_i1/fox_co.c | 4 +- src/overlays/ovl_i1/fox_ve1.c | 36 +- src/overlays/ovl_i2/fox_me.c | 6 +- src/overlays/ovl_i2/fox_sx.c | 2 +- src/overlays/ovl_i3/fox_a6.c | 10 +- src/overlays/ovl_i3/fox_aq.c | 30 +- src/overlays/ovl_i3/fox_so.c | 72 ++-- src/overlays/ovl_i3/fox_zo.c | 6 +- src/overlays/ovl_i4/fox_bo.c | 8 +- src/overlays/ovl_i4/fox_fo.c | 8 +- src/overlays/ovl_i4/fox_ka.c | 44 +- src/overlays/ovl_i4/fox_sz.c | 10 +- src/overlays/ovl_i5/fox_ma.c | 32 +- src/overlays/ovl_i5/fox_ti.c | 4 +- src/overlays/ovl_i5/fox_ti_cs.c | 2 +- src/overlays/ovl_i6/fox_andross.c | 80 ++-- src/overlays/ovl_i6/fox_sy.c | 8 +- src/overlays/ovl_i6/fox_ve2.c | 2 +- src/overlays/ovl_menu/fox_map.c | 6 +- src/overlays/ovl_menu/fox_option.c | 10 +- src/overlays/ovl_menu/fox_title.c | 4 +- 43 files changed, 824 insertions(+), 801 deletions(-) create mode 100644 include/bgm.h diff --git a/.vscode/settings.json b/.vscode/settings.json index b34a2350..5c687cb9 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -142,7 +142,8 @@ "compare": "c", "os_motor.h": "c", "os_pfs.h": "c", - "semaphore": "c" + "semaphore": "c", + "bgm.h": "c" }, "C_Cpp_Runner.msvcBatchPath": "" } \ No newline at end of file diff --git a/include/bgm.h b/include/bgm.h new file mode 100644 index 00000000..3f5c6376 --- /dev/null +++ b/include/bgm.h @@ -0,0 +1,171 @@ +#ifndef BGM_H +#define BGM_H + +#include "sys.h" + +void Audio_SetBgmParam(s8 bgmParam); +void Audio_PlaySequence(u8 seqPlayId, u16 seqId, u8 fadeinTime, u8 bgmParam); +void Audio_PlayFanfare(u16 seqId, u8 bgmVolume, u8 bgmFadeoutTime, u8 bgmFadeinTime); +void Audio_PlayDeathSequence(void); +void Audio_PlaySoundTest(u8 enable); +void Audio_PlaySequenceDistorted(u8 seqPlayId, u16 seqId, u16 distortion, u8 fadeinTime, u8 unused); +void Audio_PlaySoundTestTrack(u8 trackNumber); +void Audio_PlayBgm(u16 seqId); + +#define AUDIO_PLAY_BGM(seqId) Audio_PlaySequence(SEQ_PLAYER_BGM, (seqId), 0, -1) + +typedef enum BgmSeqIds { + /* 0 */ SEQ_ID_SFX, + /* 1 */ SEQ_ID_VOICE, + /* 2 */ SEQ_ID_CORNERIA, + /* 3 */ SEQ_ID_METEO, + /* 4 */ SEQ_ID_TITANIA, + /* 5 */ SEQ_ID_SECTOR_X, + /* 6 */ SEQ_ID_ZONESS, + /* 7 */ SEQ_ID_AREA_6, + /* 8 */ SEQ_ID_VENOM_1, + /* 9 */ SEQ_ID_SECTOR_Y, + /* 10 */ SEQ_ID_FORTUNA, + /* 11 */ SEQ_ID_SOLAR, + /* 12 */ SEQ_ID_BOLSE, + /* 13 */ SEQ_ID_KATINA, + /* 14 */ SEQ_ID_AQUAS, + /* 15 */ SEQ_ID_SECTOR_Z, + /* 16 */ SEQ_ID_MACBETH, + /* 17 */ SEQ_ID_ANDROSS, + /* 18 */ SEQ_ID_BOSS_CO_1, + /* 19 */ SEQ_ID_BOSS_ME, + /* 20 */ SEQ_ID_BOSS_TI, + /* 21 */ SEQ_ID_BOSS_SX, + /* 22 */ SEQ_ID_BOSS_ZO, + /* 23 */ SEQ_ID_BOSS_A6, + /* 24 */ SEQ_ID_BOSS_VE, + /* 25 */ SEQ_ID_BOSS_SY, + /* 26 */ SEQ_ID_UNK_26, + /* 27 */ SEQ_ID_BOSS_SO, + /* 28 */ SEQ_ID_BOSS_BO, + /* 29 */ SEQ_ID_BOSS_KA, + /* 30 */ SEQ_ID_BOSS_AQ, + /* 31 */ SEQ_ID_BOSS_SZ, + /* 32 */ SEQ_ID_BOSS_MA, + /* 33 */ SEQ_ID_BOSS_ANDROSS, + /* 34 */ SEQ_ID_TITLE, + /* 35 */ SEQ_ID_OPENING, + /* 36 */ SEQ_ID_MENU, + /* 37 */ SEQ_ID_CO_INTRO, + /* 38 */ SEQ_ID_GOOD_END, + /* 39 */ SEQ_ID_DEATH, + /* 40 */ SEQ_ID_GAME_OVER, + /* 41 */ SEQ_ID_UNK_41, + /* 42 */ SEQ_ID_STAFF_ROLL, + /* 43 */ SEQ_ID_STAR_WOLF, + /* 44 */ SEQ_ID_INTRO_S, + /* 45 */ SEQ_ID_INTRO_M, + /* 46 */ SEQ_ID_VERSUS, + /* 47 */ SEQ_ID_VS_HURRY, + /* 48 */ SEQ_ID_BOSS_CO_2, + /* 49 */ SEQ_ID_BAD_END, + /* 50 */ SEQ_ID_ME_INTRO, + /* 51 */ SEQ_ID_INTRO_51, + /* 52 */ SEQ_ID_UNK_52, + /* 53 */ SEQ_ID_UNK_53, + /* 54 */ SEQ_ID_KATT, + /* 55 */ SEQ_ID_BILL, + /* 56 */ SEQ_ID_VS_MENU, + /* 57 */ SEQ_ID_UNK_57, + /* 58 */ SEQ_ID_WARP_ZONE, + /* 59 */ SEQ_ID_UNK_59, + /* 60 */ SEQ_ID_WORLD_MAP, + /* 61 */ SEQ_ID_AND_BRAIN, + /* 62 */ SEQ_ID_TO_ANDROSS, + /* 63 */ SEQ_ID_TRAINING, + /* 64 */ SEQ_ID_VE_CLEAR, + /* 65 */ SEQ_ID_BOSS_RESUME, + /* 66 */ SEQ_ID_MAX, + /* -1 */ SEQ_ID_NONE = 0xFFFF, +} BgmSeqIds; + +#define SEQ_FLAG 0x8000 + +#define NA_BGM_SE (SEQ_ID_SFX) +#define NA_BGM_VO (SEQ_ID_VOICE) +#define NA_BGM_STAGE_CO (SEQ_ID_CORNERIA | SEQ_FLAG) +#define NA_BGM_STAGE_ME (SEQ_ID_METEO | SEQ_FLAG) +#define NA_BGM_STAGE_TI (SEQ_ID_TITANIA | SEQ_FLAG) +#define NA_BGM_STAGE_SX (SEQ_ID_SECTOR_X | SEQ_FLAG) +#define NA_BGM_STAGE_ZO (SEQ_ID_ZONESS | SEQ_FLAG) +#define NA_BGM_STAGE_A6 (SEQ_ID_AREA_6 | SEQ_FLAG) +#define NA_BGM_STAGE_SB (SEQ_ID_AREA_6 | SEQ_FLAG) +#define NA_BGM_STAGE_VE1 (SEQ_ID_VENOM_1 | SEQ_FLAG) +#define NA_BGM_STAGE_SY (SEQ_ID_SECTOR_Y | SEQ_FLAG) +#define NA_BGM_STAGE_FO (SEQ_ID_FORTUNA | SEQ_FLAG) +#define NA_BGM_STAGE_SO (SEQ_ID_SOLAR | SEQ_FLAG) +#define NA_BGM_STAGE_BO (SEQ_ID_BOLSE | SEQ_FLAG) +#define NA_BGM_STAGE_KA (SEQ_ID_KATINA | SEQ_FLAG) +#define NA_BGM_STAGE_AQ (SEQ_ID_AQUAS) +#define NA_BGM_STAGE_SZ (SEQ_ID_SECTOR_Z | SEQ_FLAG) +#define NA_BGM_STAGE_MA (SEQ_ID_MACBETH | SEQ_FLAG) +#define NA_BGM_STAGE_ANDROSS (SEQ_ID_ANDROSS | SEQ_FLAG) +#define NA_BGM_BOSS_CO (SEQ_ID_BOSS_CO_1 | SEQ_FLAG) +#define NA_BGM_BOSS_ME (SEQ_ID_BOSS_ME | SEQ_FLAG) +#define NA_BGM_BOSS_TI (SEQ_ID_BOSS_TI | SEQ_FLAG) +#define NA_BGM_BOSS_SX (SEQ_ID_BOSS_SX | SEQ_FLAG) +#define NA_BGM_BOSS_ZO (SEQ_ID_BOSS_ZO | SEQ_FLAG) +#define NA_BGM_BOSS_A6 (SEQ_ID_BOSS_A6 | SEQ_FLAG) +#define NA_BGM_BOSS_SB (SEQ_ID_BOSS_A6 | SEQ_FLAG) +#define NA_BGM_BOSS_VE (SEQ_ID_BOSS_VE | SEQ_FLAG) +#define NA_BGM_BOSS_SY (SEQ_ID_BOSS_SY | SEQ_FLAG) +#define NA_BGM_BOSS_FO (SEQ_ID_UNK_26 | SEQ_FLAG) +#define NA_BGM_BOSS_SO (SEQ_ID_BOSS_SO | SEQ_FLAG) +#define NA_BGM_BOSS_BO (SEQ_ID_BOSS_BO | SEQ_FLAG) +#define NA_BGM_BOSS_KA (SEQ_ID_BOSS_KA | SEQ_FLAG) +#define NA_BGM_BOSS_AQ (SEQ_ID_BOSS_AQ | SEQ_FLAG) +#define NA_BGM_BOSS_SZ (SEQ_ID_BOSS_SZ | SEQ_FLAG) +#define NA_BGM_BOSS_MA (SEQ_ID_BOSS_MA | SEQ_FLAG) +#define NA_BGM_BOSS_ANDROSS (SEQ_ID_BOSS_ANDROSS | SEQ_FLAG) +#define NA_BGM_TITLE (SEQ_ID_TITLE) +#define NA_BGM_OPENING (SEQ_ID_OPENING) +#define NA_BGM_SELECT (SEQ_ID_MENU) +#define NA_BGM_RANKING (SEQ_ID_MENU) +#define NA_BGM_START_DEMO (SEQ_ID_CO_INTRO) +#define NA_BGM_COURSE_CLEAR (SEQ_ID_GOOD_END) +#define NA_BGM_PLAYER_DOWN (SEQ_ID_DEATH) +#define NA_BGM_GAME_OVER (SEQ_ID_GAME_OVER) +#define NA_BGM_END_DEMO (SEQ_ID_UNK_41) +#define NA_BGM_STAFF_ROLL (SEQ_ID_STAFF_ROLL) +#define NA_BGM_STARWOLF (SEQ_ID_STAR_WOLF | SEQ_FLAG) +#define NA_BGM_START_DEMO_S (SEQ_ID_INTRO_S) +#define NA_BGM_START_DEMO_M (SEQ_ID_INTRO_M) +#define NA_BGM_VOLUME_TEST (SEQ_ID_VERSUS) +#define NA_BGM_BATTLE (SEQ_ID_VERSUS | SEQ_FLAG) +#define NA_BGM_VS_00 (SEQ_ID_VERSUS | SEQ_FLAG) +#define NA_BGM_VS_01 (SEQ_ID_VERSUS | SEQ_FLAG) +#define NA_BGM_VS_02 (SEQ_ID_VERSUS | SEQ_FLAG) +#define NA_BGM_BATTLE_LAST (SEQ_ID_VS_HURRY | SEQ_FLAG) +#define NA_BGM_BOSS_A_CARRIER (SEQ_ID_BOSS_CO_2 | SEQ_FLAG) +#define NA_BGM_COURSE_FAILURE (SEQ_ID_BAD_END) +#define NA_BGM_ME_START_DEMO (SEQ_ID_ME_INTRO) +#define NA_BGM_FO_START_DEMO (SEQ_ID_INTRO_51) +#define NA_BGM_A6_START_DEMO (SEQ_ID_INTRO_51) +#define NA_BGM_BO_START_DEMO (SEQ_ID_INTRO_51) +#define NA_BGM_SO_START_DEMO (SEQ_ID_INTRO_51) +#define NA_BGM_KA_START_DEMO (SEQ_ID_INTRO_51) +#define NA_BGM_SZ_START_DEMO (SEQ_ID_INTRO_51) +#define NA_BGM_AQ_START_DEMO (SEQ_ID_UNK_52) +#define NA_BGM_VE_START_DEMO (SEQ_ID_UNK_53) +#define NA_BGM_KATT (SEQ_ID_KATT) +#define NA_BGM_BILL (SEQ_ID_BILL) +#define NA_BGM_VS_SELECT (SEQ_ID_VS_MENU) +#define NA_BGM_VS_RESULT (SEQ_ID_UNK_57) +#define NA_BGM_STAGE_WZ (SEQ_ID_WARP_ZONE | SEQ_FLAG) +#define NA_BGM_STAGE_AT (SEQ_ID_WARP_ZONE | SEQ_FLAG) +#define NA_BGM_STAGE_SS (SEQ_ID_WARP_ZONE | SEQ_FLAG) +#define NA_BGM_STAGE_BM3 (SEQ_ID_UNK_59 | SEQ_FLAG) +#define NA_BGM_MAP (SEQ_ID_WORLD_MAP) +#define NA_BGM_ANDROSS_BRAIN (SEQ_ID_AND_BRAIN | SEQ_FLAG) +#define NA_BGM_DASH_INTO_BASE (SEQ_ID_TO_ANDROSS | SEQ_FLAG) +#define NA_BGM_TRAINING (SEQ_ID_TRAINING | SEQ_FLAG) +#define NA_BGM_ALL_CLEAR (SEQ_ID_VE_CLEAR | SEQ_FLAG) +#define NA_BGM_REAL_BOSS (SEQ_ID_BOSS_RESUME | SEQ_FLAG) + +#endif diff --git a/include/prevent_context_reordering.h b/include/prevent_context_reordering.h index 9b7404d8..968253ae 100644 --- a/include/prevent_context_reordering.h +++ b/include/prevent_context_reordering.h @@ -1,15 +1,15 @@ #ifndef PREVENT_CONTEXT_REORDERING_H #define PREVENT_CONTEXT_REORDERING_H -extern int Dummyhalf; +// extern int Dummyhalf; // struct Dummy0 {int x;}; // struct Dummy1 {int x;}; // struct Dummy2 {int x;}; // struct Dummy3 {int x;}; // struct Dummy4 {int x;}; // struct Dummy5 {int x;}; -// struct Dummy6 {int x;}; -// struct Dummy7 {int x;}; +struct Dummy6 {int x;}; +struct Dummy7 {int x;}; struct Dummy8 {int x;}; struct Dummy9 {int x;}; struct Dummy10 {int x;}; diff --git a/include/sf64audio_external.h b/include/sf64audio_external.h index 7fb41b79..bfdb6acf 100644 --- a/include/sf64audio_external.h +++ b/include/sf64audio_external.h @@ -4,12 +4,31 @@ #include "sys.h" #include "audioseq_cmd.h" #include "sfx.h" +#include "bgm.h" + +void Audio_PlayVoice(s32 msgId); +void Audio_PlayVoiceWithoutBGM(u32 msgId); +void Audio_ClearVoice(void); +s32 Audio_GetCurrentVoice(void); +s32 Audio_GetCurrentVoiceStatus(void); +void Audio_SetUnkVoiceParam(u8 unkVoiceParam); + +u8* Audio_UpdateFrequencyAnalysis(void); +void Audio_SetVolume(u8 audioType, u8 volume); +void Audio_FadeOutAll(u8 fadeoutTime); +void Audio_SetAudioSpec(u8 unused, u16 specParam); -#define AUDIO_PLAY_SFX(sfxId, srcPos, token) (Audio_PlaySfx((sfxId),(srcPos),(token),&gDefaultMod,&gDefaultMod,&gDefaultReverb)) -#define AUDIO_PLAY_BGM(seqId) Audio_PlaySequence(SEQ_PLAYER_BGM, (seqId), 0, -1) #define AUDIO_SET_SPEC(sfxLayout, spec) Audio_SetAudioSpec(0, ((sfxLayout) << 8) | (spec)) #define AUDIO_SET_SPEC_ALT(sfxLayout, spec) Audio_SetAudioSpec((sfxLayout), ((sfxLayout) << 8) | (spec)) +// used by sys or related +void AudioLoad_Init(void); +void Audio_dummy_80016A50(void); +void Audio_InitSounds(void); +void Audio_Update(void); +SPTask* AudioThread_CreateTask(void); +void AudioThread_PreNMIReset(void); + typedef enum AudioType { /* 0 */ AUDIO_TYPE_MUSIC, /* 1 */ AUDIO_TYPE_VOICE, @@ -17,6 +36,20 @@ typedef enum AudioType { /* 3 */ AUDIO_TYPE_MAX, } AudioType; +typedef enum { + /* 0 */ SOUNDMODE_STEREO, + /* 1 */ SOUNDMODE_HEADSET, + /* 2 */ SOUNDMODE_SURROUND, + /* 3 */ SOUNDMODE_MONO +} SoundMode; + +typedef enum OptionSoundMode { + /* 0 */ OPTIONSOUND_STEREO, + /* 1 */ OPTIONSOUND_MONO, + /* 2 */ OPTIONSOUND_HEADSET, + /* 3 */ OPTIONSOUND_MAX, +} OptionSoundMode; + typedef enum { /* 0 */ SFXCHAN_0, /* 1 */ SFXCHAN_1, @@ -56,142 +89,4 @@ typedef enum { /* 28 */ AUDIOSPEC_28, } AudioSpecID; -typedef enum { - /* 0 */ SOUNDMODE_STEREO, - /* 1 */ SOUNDMODE_HEADSET, - /* 2 */ SOUNDMODE_SURROUND, - /* 3 */ SOUNDMODE_MONO -} SoundMode; - -typedef enum BgmSeqIds { - /* 0 */ SEQ_ID_SFX, - /* 1 */ SEQ_ID_VOICE, - /* 2 */ SEQ_ID_CORNERIA, - /* 3 */ SEQ_ID_METEO, - /* 4 */ SEQ_ID_TITANIA, - /* 5 */ SEQ_ID_SECTOR_X, - /* 6 */ SEQ_ID_ZONESS, - /* 7 */ SEQ_ID_AREA_6, - /* 8 */ SEQ_ID_VENOM_1, - /* 9 */ SEQ_ID_SECTOR_Y, - /* 10 */ SEQ_ID_FORTUNA, - /* 11 */ SEQ_ID_SOLAR, - /* 12 */ SEQ_ID_BOLSE, - /* 13 */ SEQ_ID_KATINA, - /* 14 */ SEQ_ID_AQUAS, - /* 15 */ SEQ_ID_SECTOR_Z, - /* 16 */ SEQ_ID_MACBETH, - /* 17 */ SEQ_ID_ANDROSS, - /* 18 */ SEQ_ID_CO_BOSS_1, - /* 19 */ SEQ_ID_ME_BOSS, - /* 20 */ SEQ_ID_TI_BOSS, - /* 21 */ SEQ_ID_SX_BOSS, - /* 22 */ SEQ_ID_ZO_BOSS, - /* 23 */ SEQ_ID_A6_BOSS, - /* 24 */ SEQ_ID_VE_BOSS, - /* 25 */ SEQ_ID_SY_BOSS, - /* 26 */ SEQ_ID_UNK_26, - /* 27 */ SEQ_ID_SO_BOSS, - /* 28 */ SEQ_ID_BO_BOSS, - /* 29 */ SEQ_ID_KA_BOSS, - /* 30 */ SEQ_ID_AQ_BOSS, - /* 31 */ SEQ_ID_SZ_BOSS, - /* 32 */ SEQ_ID_MA_BOSS, - /* 33 */ SEQ_ID_AND_BOSS, - /* 34 */ SEQ_ID_TITLE, - /* 35 */ SEQ_ID_OPENING, - /* 36 */ SEQ_ID_MENU, - /* 37 */ SEQ_ID_CO_INTRO, - /* 38 */ SEQ_ID_GOOD_END, - /* 39 */ SEQ_ID_DEATH, - /* 40 */ SEQ_ID_GAME_OVER, - /* 41 */ SEQ_ID_UNK_41, - /* 42 */ SEQ_ID_ENDING, - /* 43 */ SEQ_ID_STAR_WOLF, - /* 44 */ SEQ_ID_INTRO_44, - /* 45 */ SEQ_ID_INTRO_45, - /* 46 */ SEQ_ID_VERSUS, - /* 47 */ SEQ_ID_VS_HURRY, - /* 48 */ SEQ_ID_CO_BOSS_2, - /* 49 */ SEQ_ID_BAD_END, - /* 50 */ SEQ_ID_ME_INTRO, - /* 51 */ SEQ_ID_INTRO_51, - /* 52 */ SEQ_ID_UNK_52, - /* 53 */ SEQ_ID_UNK_53, - /* 54 */ SEQ_ID_KATT, - /* 55 */ SEQ_ID_BILL, - /* 56 */ SEQ_ID_VS_MENU, - /* 57 */ SEQ_ID_UNK_57, - /* 58 */ SEQ_ID_WARP_ZONE, - /* 59 */ SEQ_ID_UNK_59, - /* 60 */ SEQ_ID_WORLD_MAP, - /* 61 */ SEQ_ID_AND_BRAIN, - /* 62 */ SEQ_ID_TO_ANDROSS, - /* 63 */ SEQ_ID_TRAINING, - /* 64 */ SEQ_ID_VE_CLEAR, - /* 65 */ SEQ_ID_BOSS_RESUME, - /* 66 */ SEQ_ID_MAX, - /* -1 */ SEQ_ID_NONE = 0xFFFF, -} BgmSeqIds; - -#define SEQ_FLAG 0x8000 - -extern f32 gDefaultSfxSource[]; -extern f32 gDefaultMod; -extern s8 gDefaultReverb; - -void Audio_PlaySfx(u32 sfxId, f32* sfxSource, u8 token, f32* freqMod, f32* volMod, s8* reverbAdd); -void Audio_KillSfxByBank(u8 bankId); -void Audio_StopSfxByBankAndSource(u8 bankId, f32* sfxSource); -void Audio_KillSfxByBankAndSource(u8 bankId, f32* sfxSource); -void Audio_KillSfxBySource(f32* sfxSource); -void Audio_KillSfxBySourceAndId(f32* sfxSource, u32 sfxId); -void Audio_KillSfxByTokenAndId(u8 token, u32 sfxId); -void Audio_KillSfxById(u32 sfxId); -void Audio_PlayVoice(s32 msgId); -void Audio_PlayVoiceWithoutBGM(u32 msgId); -void Audio_ClearVoice(void); -s32 Audio_GetCurrentVoice(void); -s32 Audio_GetCurrentVoiceStatus(void); -void Audio_SetUnkVoiceParam(u8 unkVoiceParam); -u8* Audio_UpdateFrequencyAnalysis(void); -void Audio_StartPlayerNoise(u8 playerId); -void Audio_StopPlayerNoise(u8 playerId); -void Audio_InitBombSfx(u8 playerId, u8 type); -void Audio_PlayBombFlightSfx(u8 playerId, f32* sfxSource); -void Audio_PlayBombExplodeSfx(u8 playerId, f32* sfxSource); -void Audio_StopEngineNoise(f32* sfxSource); -void Audio_SetSfxSpeedModulation(f32 vel); -void Audio_SetTransposeAndPlaySfx(f32* sfxSource, u32 sfxId, u8 semitones); -void Audio_SetModulationAndPlaySfx(f32* sfxSource, u32 sfxId, f32 freqMod); -void Audio_PlaySfxModulated(f32* sfxSource, u32 sfxId); -void Audio_SetSfxMapModulation(u8 fMod); -void Audio_SetHeatAlarmParams(u8 shields, u8 heightParam); -void Audio_PlayEventSfx(f32* sfxSource, u16 eventSfxId); -void Audio_StopEventSfx(f32* sfxSource, u16 eventSfxId); -void Audio_SetEnvSfxReverb(s8 reverb); -void Audio_SetBgmParam(s8 bgmParam); -void Audio_PlaySequence(u8 seqPlayId, u16 seqId, u8 fadeinTime, u8 bgmParam); -void Audio_PlayFanfare(u16 seqId, u8 bgmVolume, u8 bgmFadeoutTime, u8 bgmFadeinTime); -void Audio_PlayDeathSequence(void); -void Audio_PlayPauseSfx(u8 active); -void Audio_PlayMapMenuSfx(u8 active); -void Audio_SetVolume(u8 audioType, u8 volume); -void Audio_PlaySoundTest(u8 enable); -void Audio_PlaySequenceDistorted(u8 seqPlayId, u16 seqId, u16 distortion, u8 fadeinTime, u8 unused); -void Audio_PlaySoundTestTrack(u8 trackNumber); -void Audio_FadeOutAll(u8 fadeoutTime); -void Audio_KillAllSfx(void); -void Audio_SetAudioSpec(u8 unused, u16 specParam); -void Audio_PlayBgm(u16 seqId); - -// used by sys or related -void AudioLoad_Init(void); -void Audio_dummy_80016A50(void); -void Audio_InitSounds(void); -void Audio_Update(void); -SPTask* AudioThread_CreateTask(void); -void AudioThread_PreNMIReset(void); - - #endif diff --git a/include/sfx.h b/include/sfx.h index 5c6f390b..45631aff 100644 --- a/include/sfx.h +++ b/include/sfx.h @@ -1,6 +1,41 @@ #ifndef SFX_H #define SFX_H +#include "sys.h" + +extern f32 gDefaultSfxSource[]; +extern f32 gDefaultMod; +extern s8 gDefaultReverb; + +void Audio_PlaySfx(u32 sfxId, f32* sfxSource, u8 token, f32* freqMod, f32* volMod, s8* reverbAdd); +void Audio_KillSfxByBank(u8 bankId); +void Audio_StopSfxByBankAndSource(u8 bankId, f32* sfxSource); +void Audio_KillSfxByBankAndSource(u8 bankId, f32* sfxSource); +void Audio_KillSfxBySource(f32* sfxSource); +void Audio_KillSfxBySourceAndId(f32* sfxSource, u32 sfxId); +void Audio_KillSfxByTokenAndId(u8 token, u32 sfxId); +void Audio_KillSfxById(u32 sfxId); +void Audio_StartPlayerNoise(u8 playerId); +void Audio_StopPlayerNoise(u8 playerId); +void Audio_InitBombSfx(u8 playerId, u8 type); +void Audio_PlayBombFlightSfx(u8 playerId, f32* sfxSource); +void Audio_PlayBombExplodeSfx(u8 playerId, f32* sfxSource); +void Audio_StopEngineNoise(f32* sfxSource); +void Audio_SetSfxSpeedModulation(f32 vel); +void Audio_SetTransposeAndPlaySfx(f32* sfxSource, u32 sfxId, u8 semitones); +void Audio_SetModulationAndPlaySfx(f32* sfxSource, u32 sfxId, f32 freqMod); +void Audio_PlaySfxModulated(f32* sfxSource, u32 sfxId); +void Audio_SetSfxMapModulation(u8 fMod); +void Audio_SetHeatAlarmParams(u8 shields, u8 heightParam); +void Audio_PlayEventSfx(f32* sfxSource, u16 eventSfxId); +void Audio_StopEventSfx(f32* sfxSource, u16 eventSfxId); +void Audio_SetEnvSfxReverb(s8 reverb); +void Audio_PlayPauseSfx(u8 active); +void Audio_PlayMapMenuSfx(u8 active); +void Audio_KillAllSfx(void); + +#define AUDIO_PLAY_SFX(sfxId, srcPos, token) (Audio_PlaySfx((sfxId),(srcPos),(token),&gDefaultMod,&gDefaultMod,&gDefaultReverb)) + #define SFX_FLAG_18 (1 << 18) // makes distance ignore z position? probably more #define SFX_FLAG_19 (1 << 19) #define SFX_FLAG_20 (1 << 20) // make priority ignore distance @@ -94,7 +129,7 @@ typedef enum SfxBankId { #define NA_SE_ARWING_TWIN_LASER2 0x0940802B #define NA_SE_ARWING_WING_BROKEN 0x0900A02C #define NA_SE_LOCK_SEARCH 0x0900302D // Charge shot charge -#define NA_SE_SPREAD_EXPLSION 0x0903502E // Charge shot/torpedo explode +#define NA_SE_SPREAD_EXPLOSION 0x0903502E // Charge shot/torpedo explode #define NA_SE_TANK_DASH 0x0900402F #define NA_SE_MARINE_BOOST 0x09004030 #define NA_SE_MARINE_BRAKE 0x09004031 @@ -110,9 +145,9 @@ typedef enum SfxBankId { #define NA_SE_OB_BLOCK_APPEAR 0x19122005 #define NA_SE_OB_BOUND_M 0x19020006 #define NA_SE_OB_ROCK_BOUND 0x19030006 -#define NA_SE_OB_AC_ROCK_BOUND 0x19400007 +#define NA_SE_OB_AQ_ROCK_BOUND 0x19400007 #define NA_SE_METALBOMB_REFLECT 0x19020008 -#define NA_SE_OB_MC_SWITCH_UP 0x19033008 +#define NA_SE_OB_MA_SWITCH_UP 0x19033008 #define NA_SE_METALBOMB_BOUND 0x19030009 // Unreferenced. #define NA_SE_TANK_SLIDE 0x1100000A #define NA_SE_SPLASH_LEVEL_S 0x1100000B @@ -129,7 +164,7 @@ typedef enum SfxBankId { #define NA_SE_OB_WATER_BOUND_M 0x19000014 #define NA_SE_OB_STEELFRAME 0x19500015 #define NA_SE_EXPLOSION_DEMO2 0x11030016 -#define NA_SE_KT_UFO_FALLING 0x11404016 +#define NA_SE_KA_UFO_FALLING 0x11404016 #define NA_SE_IN_SPLASH_S 0x19800017 #define NA_SE_OUT_SPLASH_S 0x19800018 // Unreferenced. #define NA_SE_IN_SPLASH_L 0x19832019 @@ -144,7 +179,7 @@ typedef enum SfxBankId { #define NA_SE_EN_GATHER_PARTS 0x11033022 #define NA_SE_EN_HEARTBEAT 0x11003023 #define NA_SE_OB_SAND_BOUND_S 0x19000024 -#define NA_SE_KT_UFO_ENGINE 0x11037025 +#define NA_SE_KA_UFO_ENGINE 0x11037025 #define NA_SE_MAP_ZOOM_OUT 0x19000026 #define NA_SE_EN_BROKEN_SPARK 0x11000027 #define NA_SE_OB_SPARK_BEAM 0x11000028 @@ -170,16 +205,16 @@ typedef enum SfxBankId { #define NA_SE_WARP_RING_5 0x1940443C #define NA_SE_WARP_RING_6 0x1940453D #define NA_SE_WARP_RING_7 0x1940463E -#define NA_SE_KT_UFO_HATCH_OPEN 0x1903203F -#define NA_SE_KT_UFO_HATCH_CLOSE 0x19032040 -#define NA_SE_KT_UFO_CORE_OPEN 0x19032041 +#define NA_SE_KA_UFO_HATCH_OPEN 0x1903203F +#define NA_SE_KA_UFO_HATCH_CLOSE 0x19032040 +#define NA_SE_KA_UFO_CORE_OPEN 0x19032041 #define NA_SE_BO_CORE_APPEAR 0x19034041 -#define NA_SE_KT_UFO_HATCH_STOP 0x19034042 -#define NA_SE_KT_UFO_LONG_CHARGE 0x11034043 -#define NA_SE_KT_UFO_LAST_CHARGE 0x19406044 -#define NA_SE_KT_UFO_BEAM 0x1140B045 +#define NA_SE_KA_UFO_HATCH_STOP 0x19034042 +#define NA_SE_KA_UFO_LONG_CHARGE 0x11034043 +#define NA_SE_KA_UFO_LAST_CHARGE 0x19406044 +#define NA_SE_KA_UFO_BEAM 0x1140B045 #define NA_SE_EXPLOSION_DEMO3 0x11038046 -#define NA_SE_KT_UFO_BOUND 0x19408047 +#define NA_SE_KA_UFO_BOUND 0x19408047 #define NA_SE_OB_BARRIER_RELEASE 0x19401048 #define NA_SE_EN_SPACE_SNAKE 0x11032049 #define NA_SE_OB_ROCKWALL_UP 0x1913204A @@ -200,43 +235,43 @@ typedef enum SfxBankId { #define NA_SE_OB_ROCK_CRASH 0x19032056 #define NA_SE_OB_ROCK_EYE_OPEN 0x19030057 #define NA_SE_OB_SHIP_FALLDOWN 0x19033058 -#define NA_SE_EN_BMBOSS_BROKEN 0x19030059 +#define NA_SE_EN_VEBOSS_BROKEN 0x19030059 #define NA_SE_OB_ARM_SWING 0x1903005A #define NA_SE_OB_POLE_MOVE 0x1903205B #define NA_SE_OB_POLE_BOUND 0x1903205C #define NA_SE_OB_HEAVY_SWITCH 0x1940405D #define NA_SE_OB_CONNECT_CUT 0x1940205E -#define NA_SE_OB_MC_SWITCH_ON 0x1903205F -#define NA_SE_OB_MC_SWITCH_GRN 0x19020060 -#define NA_SE_OB_MC_SWITCH_RED 0x19020061 +#define NA_SE_OB_MA_SWITCH_ON 0x1903205F +#define NA_SE_OB_MA_SWITCH_GRN 0x19020060 +#define NA_SE_OB_MA_SWITCH_RED 0x19020061 #define NA_SE_OB_POST_UP 0x19001062 #define NA_SE_OB_SIDE_GATE_CLOSE 0x11001063 #define NA_SE_OB_SPEAR_STICK 0x19032064 #define NA_SE_RAILWAY_BOUND 0x19000065 -#define NA_SE_EN_MCBOSS_HATCH 0x19034066 -#define NA_SE_EN_MCBOSS_CHARGE0 0x19022067 -#define NA_SE_EN_MCBOSS_SHOT0 0x19023068 -#define NA_SE_EN_MCBOSS_PLATECHARGE 0x19022069 -#define NA_SE_VO_ANDORF_PUNCH 0x1940306A -#define NA_SE_VO_ANDORF_SLAP 0x1940306B -#define NA_SE_VO_ANDORF_WHAND 0x1940306C -#define NA_SE_VO_ANDORF_CHOKE 0x1940306D -#define NA_SE_VO_ANDORF_LAUGH 0x1940306E -#define NA_SE_VO_ANDORF_GROAN 0x1940306F -#define NA_SE_VO_ANDORF_DEATH 0x19403070 -#define NA_SE_OB_ROOT_EXPLOSION0 0x11403071 +#define NA_SE_EN_MABOSS_HATCH 0x19034066 +#define NA_SE_EN_MABOSS_CHARGE0 0x19022067 +#define NA_SE_EN_MABOSS_SHOT0 0x19023068 +#define NA_SE_EN_MABOSS_PLATECHARGE 0x19022069 +#define NA_SE_VO_ANDROSS_PUNCH 0x1940306A +#define NA_SE_VO_ANDROSS_SLAP 0x1940306B +#define NA_SE_VO_ANDROSS_WHAND 0x1940306C +#define NA_SE_VO_ANDROSS_CHOKE 0x1940306D +#define NA_SE_VO_ANDROSS_LAUGH 0x1940306E +#define NA_SE_VO_ANDROSS_GROAN 0x1940306F +#define NA_SE_VO_ANDROSS_DEATH 0x19403070 +#define NA_SE_OB_ROUTE_EXPLOSION0 0x11403071 #define NA_SE_OB_ROUTEGATE_OPEN_Q 0x19038072 -#define NA_SE_EN_ANDORF_ROBOT 0x11030073 -#define NA_SE_EN_ANDORF_BRAIN 0x11034074 -#define NA_SE_EN_ANDORF_EYE 0x11032075 -#define NA_SE_OB_ROOT_EXPLOSION1 0x11403076 +#define NA_SE_EN_ANDROSS_ROBOT 0x11030073 +#define NA_SE_EN_ANDROSS_BRAIN 0x11034074 +#define NA_SE_EN_ANDROSS_EYE 0x11032075 +#define NA_SE_OB_ROUTE_EXPLOSION1 0x11403076 #define NA_SE_OB_FISH_AWAY 0x19400077 -#define NA_SE_OB_AC_PILLAR_BROKE 0x19021078 +#define NA_SE_OB_AQ_PILLAR_BROKE 0x19021078 #define NA_SE_WARP_OUT 0x11407079 #define NA_SE_ARWING_HATCH 0x1950107A #define NA_SE_OB_POINT_SWITCH 0x1940807B -#define NA_SE_VO_ANDORF_EXCITE 0x1940307C -#define NA_SE_OB_PILLER_ROLL 0x1903407D +#define NA_SE_VO_ANDROSS_EXCITE 0x1940307C +#define NA_SE_OB_PILLAR_ROLL 0x1903407D #define NA_SE_OB_ROUTEGATE_CLOSE_Q 0x1903807E #define NA_SE_OB_ROUTEGATE_OPEN_S 0x1903807F #define NA_SE_OB_ROUTEGATE_CLOSE_S 0x19038080 // events that play this are unused @@ -349,16 +384,16 @@ typedef enum SfxBankId { #define NA_SE_EN_BURNER_L 0x3102505A #define NA_SE_EN_GRN_BEAM_CHARGE 0x3103605B #define NA_SE_EN_GRN_BEAM_SHOT 0x3102705C -#define NA_SE_EN_ASBOSS_SHIELD 0x3102405D +#define NA_SE_EN_MEBOSS_SHIELD 0x3102405D #define NA_SE_EN_CATCH 0x2902405E #define NA_SE_EN_PASS 0x2903305F #define NA_SE_EN_MS_EXPLOSION_S 0x2903A060 #define NA_SE_EN_SZMIS_ENGINE 0x31032061 #define NA_SE_EN_PUNCH_ENGINE 0x3103A061 #define NA_SE_EN_BARRIER_REFLECT 0x29001062 -#define NA_SE_EN_ANDORF_EXPLOSION 0x31009063 +#define NA_SE_EN_ANDROSS_EXPLOSION 0x31009063 #define NA_SE_EN_SPARK_DAMAGE_M 0x29033064 -#define NA_SE_EN_BMBOSS_DAMAGE 0x31034064 +#define NA_SE_EN_VEBOSS_DAMAGE 0x31034064 #define NA_SE_EN_ARM_SWING 0x29034065 #define NA_SE_EN_COVER_OPEN 0x31404066 #define NA_SE_EN_COVER_CLOSE 0x31404067 @@ -371,47 +406,47 @@ typedef enum SfxBankId { #define NA_SE_EN_MS_SHOT_L 0x2901306E #define NA_SE_EN_MS_SHIELD_BROKEN 0x2903A06F #define NA_SE_EN_MS_EXPLOSION_L 0x29000070 // Unreferenced. -#define NA_SE_OB_SNROCK_APPEAR 0x29000071 -#define NA_SE_OB_SNROCK_DISAPPEAR 0x29000072 -#define NA_SE_EN_SNBOSS_CRY 0x29432073 -#define NA_SE_EN_SNBOSS_DAMAGE 0x29433074 -#define NA_SE_EN_SNBOSS_BROKEN 0x29434075 -#define NA_SE_EN_SNBOSS_DOWN 0x39439076 -#define NA_SE_EN_SNBOSS_SWING 0x29432077 -#define NA_SE_EN_SNBOSS_BREATH 0x31033078 -#define NA_SE_EN_SNBOSS_ROLL 0x39033079 +#define NA_SE_OB_SOROCK_APPEAR 0x29000071 +#define NA_SE_OB_SOROCK_DISAPPEAR 0x29000072 +#define NA_SE_EN_SOBOSS_CRY 0x29432073 +#define NA_SE_EN_SOBOSS_DAMAGE 0x29433074 +#define NA_SE_EN_SOBOSS_BROKEN 0x29434075 +#define NA_SE_EN_SOBOSS_DOWN 0x39439076 +#define NA_SE_EN_SOBOSS_SWING 0x29432077 +#define NA_SE_EN_SOBOSS_BREATH 0x31033078 +#define NA_SE_EN_SOBOSS_ROLL 0x39033079 #define NA_SE_EN_ANGLER_DAMAGE 0x2900007A // Unreferenced. #define NA_SE_EN_ANGLER_DOWN 0x2900007B // Unreferenced. -#define NA_SE_UNK_7C 0x2100007C // Unreferenced. Sounds like many small explosions +#define NA_SE_BANK2_UNK_7C 0x2100007C // Unreferenced. Sounds like many small explosions #define NA_SE_ROCK_REFLECT 0x2902107D #define NA_SE_OB_MAGMA_BUBBLE 0x3140807E -#define NA_SE_UNK_7F 0x2900007F // Unreferenced. Sounds like an impact -#define NA_SE_OB_BMBOSS_WALK 0x29032080 -#define NA_SE_OB_BMBOSS_JUMP 0x29033081 -#define NA_SE_OB_BMBOSS_LAND 0x29034082 -#define NA_SE_OB_BMBOSS_ATTACK 0x31030083 -#define NA_SE_OB_BMBOSS_BOUND 0x29405084 +#define NA_SE_BANK2_UNK_7F 0x2900007F // Unreferenced. Sounds like an impact +#define NA_SE_OB_VEBOSS_WALK 0x29032080 +#define NA_SE_OB_VEBOSS_JUMP 0x29033081 +#define NA_SE_OB_VEBOSS_LAND 0x29034082 +#define NA_SE_OB_VEBOSS_ATTACK 0x31030083 +#define NA_SE_OB_VEBOSS_BOUND 0x29405084 #define NA_SE_EN_FREIGHT_TRAIN 0x31078085 -#define NA_SE_EN_MCBOSS_REFLECT 0x29022086 -#define NA_SE_EN_ANDORF_BREATH 0x31022087 -#define NA_SE_EN_ANDORF_BITE0 0x29022088 -#define NA_SE_EN_ANDORF_BITE1 0x29022089 -#define NA_SE_EN_ANDORF_VOMIT 0x3140208A -#define NA_SE_EN_ANDORF_SPARK 0x3103108B +#define NA_SE_EN_MABOSS_REFLECT 0x29022086 +#define NA_SE_EN_ANDROSS_BREATH 0x31022087 +#define NA_SE_EN_ANDROSS_BITE0 0x29022088 +#define NA_SE_EN_ANDROSS_BITE1 0x29022089 +#define NA_SE_EN_ANDROSS_VOMIT 0x3140208A +#define NA_SE_EN_ANDROSS_SPARK 0x3103108B #define NA_SE_EN_WT_THROW 0x2900308C #define NA_SE_EN_WT_SPARK_CHARGE 0x2900208D #define NA_SE_EN_WT_SPARK_BEAM 0x3100208E -#define NA_SE_EN_AC_ZAKO_DAMAGE 0x2903408F -#define NA_SE_EN_AC_ZAKO_DOWN 0x29038090 +#define NA_SE_EN_AQ_ZAKO_DAMAGE 0x2903408F +#define NA_SE_EN_AQ_ZAKO_DOWN 0x29038090 #define NA_SE_EN_WARP_IN 0x39408091 #define NA_SE_EN_WARP_OUT 0x39408092 -#define NA_SE_EN_CLBOSS_CHARGE 0x39033093 -#define NA_SE_EN_CLBOSS_BEAM 0x31405094 +#define NA_SE_EN_A6BOSS_CHARGE 0x39033093 +#define NA_SE_EN_A6BOSS_BEAM 0x31405094 #define NA_SE_EN_TRAIN_BREAK 0x31408095 -#define NA_SE_EN_ANDORF_WARP 0x2940B096 -#define NA_SE_EN_ANDORF_CATCH 0x31408097 +#define NA_SE_EN_ANDROSS_WARP 0x2940B096 +#define NA_SE_EN_ANDROSS_CATCH 0x31408097 #define NA_SE_EN_KANI_STOP 0x29030098 -#define NA_SE_EN_MCBOSS_RAGE 0x29036099 +#define NA_SE_EN_MABOSS_RAGE 0x29036099 #define NA_SE_EN_DOWN_IMPACT 0x2940D09A #define NA_SE_EN_MARBLE_BEAM 0x3103109B @@ -456,7 +491,7 @@ typedef enum SfxBankId { #define NA_SE_SHIELD_BUZZER 0x49001026 #define NA_SE_LOCK_ON 0x49008027 #define NA_SE_BOSS_GAUGE_OPEN 0x4900C028 -#define NA_SE_UNK_1 0x40000029 // Unreferenced. Sounds like an item collect jingle +#define NA_SE_BANK4_UNK_1 0x40000029 // Unreferenced. Sounds like an item collect jingle #define NA_SE_COUNTDOWN 0x4900C02A #define NA_SE_VIEW_SITCHW_ON 0x4000002B // Unreferenced. Related to D_ctx_80177C70? #define NA_SE_VIEW_MOVE_IN 0x4900002C @@ -468,7 +503,7 @@ typedef enum SfxBankId { #define NA_SE_VO_PEPPER_CONSENT 0x49000032 // This is ONE steep bill, but it's worth it. #define NA_SE_VO_PEPPER_SURPRISE 0x49000033 // WHAT?! #define NA_SE_MISSION_COMPLETE 0x49008034 -#define NA_SE_UNK_2 0x40000035 // Unreferenced. Hard to make out what it is +#define NA_SE_BANL4_UNK_2 0x40000035 // Unreferenced. Hard to make out what it is #define NA_SE_TIME_OVER 0x4900D036 #endif diff --git a/include/sys.h b/include/sys.h index 4f39b97f..f457a849 100644 --- a/include/sys.h +++ b/include/sys.h @@ -65,11 +65,4 @@ typedef enum OptionState { OPTION_UPDATE } OptionState; -typedef enum OptionSoundMode { - OPTIONSOUND_STEREO, - OPTIONSOUND_MONO, - OPTIONSOUND_HEADSET, - OPTIONSOUND_MAX, -} OptionSoundMode; - #endif diff --git a/src/audio/audio_general.c b/src/audio/audio_general.c index 8cb3a405..c3e9360a 100644 --- a/src/audio/audio_general.c +++ b/src/audio/audio_general.c @@ -119,176 +119,151 @@ u32 sEventSfx[] = { NA_SE_EN_MOTOR_STOP, NA_SE_EN_MS_DASH, NA_SE_OB_ROCK_CRASH, NA_SE_OB_ROCK_EYE_OPEN, NA_SE_OB_SHIP_FALLDOWN, NA_SE_OB_ROCK_BOUND, - NA_SE_OB_SPEAR_PILLAR, NA_SE_OB_PILLER_ROLL, + NA_SE_OB_SPEAR_PILLAR, NA_SE_OB_PILLAR_ROLL, NA_SE_SEARCHLIGHT_MISS, NA_SE_OB_ROUTEGATE_OPEN_Q, NA_SE_OB_ROUTEGATE_CLOSE_Q, NA_SE_OB_ROUTEGATE_OPEN_S, NA_SE_OB_ROUTEGATE_CLOSE_S, NA_SE_OB_LIFT, NA_SE_OB_PLATE_ROLL, }; SoundTestTrack sSoundTestTracks[] = { - /* 0 */ { SEQ_ID_OPENING, 22, -1 }, - /* 1 */ { SEQ_ID_TITLE, 23, -1 }, - /* 2 */ { SEQ_ID_MENU, 23, -1 }, - /* 3 */ { SEQ_ID_WORLD_MAP, 280, -1 }, - /* 4 */ { SEQ_ID_CO_INTRO, 0, -1 }, - /* 5 */ { SEQ_ID_INTRO_44, 1, -1 }, - /* 6 */ { SEQ_ID_INTRO_45, 1, -1 }, - /* 7 */ { SEQ_ID_ME_INTRO, 1, -1 }, - /* 8 */ { SEQ_ID_INTRO_51, 8, -1 }, - /* 9 */ { SEQ_ID_CORNERIA | SEQ_FLAG, 0, -1 }, - /* 10 */ { SEQ_ID_METEO | SEQ_FLAG, 1, -1 }, - /* 11 */ { SEQ_ID_TITANIA | SEQ_FLAG, 2, -1 }, - /* 12 */ { SEQ_ID_SECTOR_X | SEQ_FLAG, 3, -1 }, - /* 13 */ { SEQ_ID_ZONESS | SEQ_FLAG, 4, -1 }, - /* 14 */ { SEQ_ID_AREA_6 | SEQ_FLAG, 5, -1 }, - /* 15 */ { SEQ_ID_VENOM_1 | SEQ_FLAG, 6, -1 }, - /* 16 */ { SEQ_ID_SECTOR_Y | SEQ_FLAG, 7, -1 }, - /* 17 */ { SEQ_ID_FORTUNA | SEQ_FLAG, 8, -1 }, - /* 18 */ { SEQ_ID_BOLSE | SEQ_FLAG, 10, -1 }, - /* 19 */ { SEQ_ID_KATINA | SEQ_FLAG, 11, -1 }, - /* 20 */ { SEQ_ID_AQUAS, 12, -1 }, - /* 21 */ { SEQ_ID_WARP_ZONE | SEQ_FLAG, 1, -1 }, - /* 22 */ { SEQ_ID_KATT, 13, -1 }, - /* 23 */ { SEQ_ID_BILL, 11, -1 }, - /* 24 */ { SEQ_ID_CO_BOSS_1 | SEQ_FLAG, 0, -1 }, - /* 25 */ { SEQ_ID_ME_BOSS | SEQ_FLAG, 1, 0 }, - /* 26 */ { SEQ_ID_ME_BOSS | SEQ_FLAG, 1, -1 }, - /* 27 */ { SEQ_ID_BOSS_RESUME | SEQ_FLAG, 7, -1 }, - /* 28 */ { SEQ_ID_BO_BOSS | SEQ_FLAG, 10, -1 }, - /* 29 */ { SEQ_ID_STAR_WOLF | SEQ_FLAG, 6, -1 }, - /* 30 */ { SEQ_ID_GOOD_END, 0, -1 }, - /* 31 */ { SEQ_ID_BAD_END, 0, -1 }, - /* 32 */ { SEQ_ID_DEATH, 0, -1 }, - /* 33 */ { SEQ_ID_GAME_OVER, 25, -1 }, - /* 34 */ { SEQ_ID_TRAINING | SEQ_FLAG, 28, -1 }, - /* 35 */ { SEQ_ID_VERSUS | SEQ_FLAG, 784, -1 }, - /* 36 */ { SEQ_ID_VS_HURRY | SEQ_FLAG, 785, -1 }, - /* 37 */ { SEQ_ID_VS_MENU, 23, -1 }, - /* 38 */ { SEQ_ID_TO_ANDROSS | SEQ_FLAG, 6, 0 }, - /* 39 */ { SEQ_ID_ANDROSS | SEQ_FLAG, 23, -1 }, - /* 40 */ { SEQ_ID_AND_BOSS | SEQ_FLAG, 6, 0 }, - /* 41 */ { SEQ_ID_AND_BOSS | SEQ_FLAG, 6, -1 }, - /* 42 */ { SEQ_ID_AND_BRAIN | SEQ_FLAG, 6, -1 }, - /* 43 */ { SEQ_ID_VE_CLEAR | SEQ_FLAG, 6, -1 }, - /* 44 */ { SEQ_ID_ENDING, 27, -1 }, + /* 0 */ { NA_BGM_OPENING, 22, -1 }, + /* 1 */ { NA_BGM_TITLE, 23, -1 }, + /* 2 */ { NA_BGM_SELECT, 23, -1 }, + /* 3 */ { NA_BGM_MAP, 280, -1 }, + /* 4 */ { NA_BGM_START_DEMO, 0, -1 }, + /* 5 */ { NA_BGM_START_DEMO_S, 1, -1 }, + /* 6 */ { NA_BGM_START_DEMO_M, 1, -1 }, + /* 7 */ { NA_BGM_ME_START_DEMO, 1, -1 }, + /* 8 */ { NA_BGM_FO_START_DEMO, 8, -1 }, + /* 9 */ { NA_BGM_STAGE_CO, 0, -1 }, + /* 10 */ { NA_BGM_STAGE_ME, 1, -1 }, + /* 11 */ { NA_BGM_STAGE_TI, 2, -1 }, + /* 12 */ { NA_BGM_STAGE_SX, 3, -1 }, + /* 13 */ { NA_BGM_STAGE_ZO, 4, -1 }, + /* 14 */ { NA_BGM_STAGE_A6, 5, -1 }, + /* 15 */ { NA_BGM_STAGE_VE1, 6, -1 }, + /* 16 */ { NA_BGM_STAGE_SY, 7, -1 }, + /* 17 */ { NA_BGM_STAGE_FO, 8, -1 }, + /* 18 */ { NA_BGM_STAGE_BO, 10, -1 }, + /* 19 */ { NA_BGM_STAGE_KA, 11, -1 }, + /* 20 */ { NA_BGM_STAGE_AQ, 12, -1 }, + /* 21 */ { NA_BGM_STAGE_WZ, 1, -1 }, + /* 22 */ { NA_BGM_KATT, 13, -1 }, + /* 23 */ { NA_BGM_BILL, 11, -1 }, + /* 24 */ { NA_BGM_BOSS_CO, 0, -1 }, + /* 25 */ { NA_BGM_BOSS_ME, 1, 0 }, + /* 26 */ { NA_BGM_BOSS_ME, 1, -1 }, + /* 27 */ { NA_BGM_REAL_BOSS, 7, -1 }, + /* 28 */ { NA_BGM_BOSS_BO, 10, -1 }, + /* 29 */ { NA_BGM_STARWOLF, 6, -1 }, + /* 30 */ { NA_BGM_COURSE_CLEAR, 0, -1 }, + /* 31 */ { NA_BGM_COURSE_FAILURE, 0, -1 }, + /* 32 */ { NA_BGM_PLAYER_DOWN, 0, -1 }, + /* 33 */ { NA_BGM_GAME_OVER, 25, -1 }, + /* 34 */ { NA_BGM_TRAINING, 28, -1 }, + /* 35 */ { NA_BGM_BATTLE, 784, -1 }, + /* 36 */ { NA_BGM_BATTLE_LAST, 785, -1 }, + /* 37 */ { NA_BGM_VS_SELECT, 23, -1 }, + /* 38 */ { NA_BGM_DASH_INTO_BASE, 6, 0 }, + /* 39 */ { NA_BGM_STAGE_ANDROSS, 23, -1 }, + /* 40 */ { NA_BGM_BOSS_ANDROSS, 6, 0 }, + /* 41 */ { NA_BGM_BOSS_ANDROSS, 6, -1 }, + /* 42 */ { NA_BGM_ANDROSS_BRAIN, 6, -1 }, + /* 43 */ { NA_BGM_ALL_CLEAR, 6, -1 }, + /* 44 */ { NA_BGM_STAFF_ROLL, 27, -1 }, }; PlaylistCmd sPlaylists[][100] = { { - { 0, 0, SEQ_ID_CO_INTRO, 0, 255, 1620 }, - { 0, 0, SEQ_ID_CORNERIA | SEQ_FLAG, 0, 255, 2490 }, - { 1, 0, SEQ_ID_CORNERIA | SEQ_FLAG, 50, 255, 50 }, - { 0, 0, SEQ_ID_CO_BOSS_1 | SEQ_FLAG, 0, 255, 1600 }, - { 1, 0, SEQ_ID_CO_BOSS_1 | SEQ_FLAG, 1, 255, 50 }, - { 0, 0, SEQ_ID_GOOD_END, 0, 255, 1091 }, - { 1, 0, SEQ_ID_GOOD_END, 100, 255, 100 }, - { 0, 0, SEQ_ID_ME_INTRO, 0, 255, 838 }, - { 0, 0, SEQ_ID_METEO | SEQ_FLAG, 0, 255, 1584 }, - { 1, 0, SEQ_ID_METEO | SEQ_FLAG, 50, 255, 50 }, - { 0, 0, SEQ_ID_ME_BOSS | SEQ_FLAG, 0, 0, 1620 }, - { 1, 0, SEQ_ID_ME_BOSS | SEQ_FLAG, 1, 255, 50 }, - { 0, 0, SEQ_ID_BOSS_RESUME | SEQ_FLAG, 0, 255, 1620 }, - { 1, 0, SEQ_ID_BOSS_RESUME | SEQ_FLAG, 1, 255, 50 }, - { 0, 0, SEQ_ID_GOOD_END, 0, 255, 1091 }, - { 1, 0, SEQ_ID_GOOD_END, 100, 255, 100 }, - { 0, 0, SEQ_ID_INTRO_51, 0, 255, 241 }, - { 0, 0, SEQ_ID_FORTUNA | SEQ_FLAG, 0, 255, 1632 }, - { 1, 0, SEQ_ID_FORTUNA | SEQ_FLAG, 100, 255, 100 }, - { 0, 0, SEQ_ID_STAR_WOLF | SEQ_FLAG, 0, 255, 2120 }, - { 0, 0, SEQ_ID_FORTUNA | SEQ_FLAG, 0, 0, 450 }, - { 1, 0, SEQ_ID_FORTUNA | SEQ_FLAG, 50, 255, 200 }, - { 0, 0, SEQ_ID_BAD_END, 0, 255, 1604 }, - { 1, 0, SEQ_ID_BAD_END, 100, 255, 100 }, - { 0, 0, SEQ_ID_INTRO_44, 0, 255, 242 }, - { 0, 0, SEQ_ID_SECTOR_X | SEQ_FLAG, 0, 255, 2291 }, - { 1, 0, SEQ_ID_SECTOR_X | SEQ_FLAG, 50, 255, 100 }, - { 0, 0, SEQ_ID_SX_BOSS | SEQ_FLAG, 0, 255, 1600 }, - { 1, 0, SEQ_ID_SX_BOSS | SEQ_FLAG, 1, 255, 50 }, - { 2, 0, SEQ_ID_SX_BOSS | SEQ_FLAG, 0, 255, 1600 }, - { 1, 0, SEQ_ID_SX_BOSS | SEQ_FLAG, 1, 255, 50 }, - { 0, 0, SEQ_ID_GOOD_END, 0, 255, 1091 }, - { 1, 0, SEQ_ID_GOOD_END, 100, 255, 100 }, - { 0, 0, SEQ_ID_INTRO_45, 0, 255, 542 }, - { 0, 0, SEQ_ID_TITANIA | SEQ_FLAG, 0, 255, 1920 }, - { 1, 0, SEQ_ID_TITANIA | SEQ_FLAG, 50, 255, 50 }, - { 0, 0, SEQ_ID_TI_BOSS | SEQ_FLAG, 0, 255, 1600 }, - { 1, 0, SEQ_ID_TI_BOSS | SEQ_FLAG, 1, 255, 50 }, - { 0, 0, SEQ_ID_GOOD_END, 0, 255, 1091 }, - { 1, 0, SEQ_ID_GOOD_END, 100, 255, 100 }, - { 0, 0, SEQ_ID_INTRO_51, 0, 255, 241 }, - { 0, 0, SEQ_ID_BOLSE | SEQ_FLAG, 0, 255, 1177 }, - { 1, 0, SEQ_ID_BOLSE | SEQ_FLAG, 100, 255, 100 }, - { 0, 0, SEQ_ID_BO_BOSS | SEQ_FLAG, 0, 255, 1115 }, - { 1, 0, SEQ_ID_BO_BOSS | SEQ_FLAG, 50, 255, 50 }, - { 0, 0, SEQ_ID_STAR_WOLF | SEQ_FLAG, 0, 255, 2120 }, - { 1, 0, SEQ_ID_STAR_WOLF | SEQ_FLAG, 1, 255, 50 }, - { 0, 0, SEQ_ID_DEATH, 0, 255, 150 }, - { 0, 0, SEQ_ID_GAME_OVER, 0, 255, 1020 }, - { 1, 0, SEQ_ID_GAME_OVER, 100, 255, 100 }, - { 255, 0, SEQ_ID_CORNERIA | SEQ_FLAG, 50, 255, 50 }, + { 0, 0, NA_BGM_START_DEMO, 0, 255, 1620 }, { 0, 0, NA_BGM_STAGE_CO, 0, 255, 2490 }, + { 1, 0, NA_BGM_STAGE_CO, 50, 255, 50 }, { 0, 0, NA_BGM_BOSS_CO, 0, 255, 1600 }, + { 1, 0, NA_BGM_BOSS_CO, 1, 255, 50 }, { 0, 0, NA_BGM_COURSE_CLEAR, 0, 255, 1091 }, + { 1, 0, NA_BGM_COURSE_CLEAR, 100, 255, 100 }, { 0, 0, NA_BGM_ME_START_DEMO, 0, 255, 838 }, + { 0, 0, NA_BGM_STAGE_ME, 0, 255, 1584 }, { 1, 0, NA_BGM_STAGE_ME, 50, 255, 50 }, + { 0, 0, NA_BGM_BOSS_ME, 0, 0, 1620 }, { 1, 0, NA_BGM_BOSS_ME, 1, 255, 50 }, + { 0, 0, NA_BGM_REAL_BOSS, 0, 255, 1620 }, { 1, 0, NA_BGM_REAL_BOSS, 1, 255, 50 }, + { 0, 0, NA_BGM_COURSE_CLEAR, 0, 255, 1091 }, { 1, 0, NA_BGM_COURSE_CLEAR, 100, 255, 100 }, + { 0, 0, NA_BGM_FO_START_DEMO, 0, 255, 241 }, { 0, 0, NA_BGM_STAGE_FO, 0, 255, 1632 }, + { 1, 0, NA_BGM_STAGE_FO, 100, 255, 100 }, { 0, 0, NA_BGM_STARWOLF, 0, 255, 2120 }, + { 0, 0, NA_BGM_STAGE_FO, 0, 0, 450 }, { 1, 0, NA_BGM_STAGE_FO, 50, 255, 200 }, + { 0, 0, NA_BGM_COURSE_FAILURE, 0, 255, 1604 }, { 1, 0, NA_BGM_COURSE_FAILURE, 100, 255, 100 }, + { 0, 0, NA_BGM_START_DEMO_S, 0, 255, 242 }, { 0, 0, NA_BGM_STAGE_SX, 0, 255, 2291 }, + { 1, 0, NA_BGM_STAGE_SX, 50, 255, 100 }, { 0, 0, NA_BGM_BOSS_SX, 0, 255, 1600 }, + { 1, 0, NA_BGM_BOSS_SX, 1, 255, 50 }, { 2, 0, NA_BGM_BOSS_SX, 0, 255, 1600 }, + { 1, 0, NA_BGM_BOSS_SX, 1, 255, 50 }, { 0, 0, NA_BGM_COURSE_CLEAR, 0, 255, 1091 }, + { 1, 0, NA_BGM_COURSE_CLEAR, 100, 255, 100 }, { 0, 0, NA_BGM_START_DEMO_M, 0, 255, 542 }, + { 0, 0, NA_BGM_STAGE_TI, 0, 255, 1920 }, { 1, 0, NA_BGM_STAGE_TI, 50, 255, 50 }, + { 0, 0, NA_BGM_BOSS_TI, 0, 255, 1600 }, { 1, 0, NA_BGM_BOSS_TI, 1, 255, 50 }, + { 0, 0, NA_BGM_COURSE_CLEAR, 0, 255, 1091 }, { 1, 0, NA_BGM_COURSE_CLEAR, 100, 255, 100 }, + { 0, 0, NA_BGM_BO_START_DEMO, 0, 255, 241 }, { 0, 0, NA_BGM_STAGE_BO, 0, 255, 1177 }, + { 1, 0, NA_BGM_STAGE_BO, 100, 255, 100 }, { 0, 0, NA_BGM_BOSS_BO, 0, 255, 1115 }, + { 1, 0, NA_BGM_BOSS_BO, 50, 255, 50 }, { 0, 0, NA_BGM_STARWOLF, 0, 255, 2120 }, + { 1, 0, NA_BGM_STARWOLF, 1, 255, 50 }, { 0, 0, NA_BGM_PLAYER_DOWN, 0, 255, 150 }, + { 0, 0, NA_BGM_GAME_OVER, 0, 255, 1020 }, { 1, 0, NA_BGM_GAME_OVER, 100, 255, 100 }, + { 255, 0, NA_BGM_STAGE_CO, 50, 255, 50 }, }, { - { 0, 0, SEQ_ID_CO_INTRO, 0, 255, 1620 }, - { 0, 0, SEQ_ID_CORNERIA | SEQ_FLAG, 0, 255, 2490 }, - { 1, 0, SEQ_ID_CORNERIA | SEQ_FLAG, 50, 255, 50 }, - { 0, 0, SEQ_ID_CO_BOSS_2 | SEQ_FLAG, 0, 255, 1620 }, - { 1, 0, SEQ_ID_CO_BOSS_2 | SEQ_FLAG, 1, 255, 50 }, - { 0, 0, SEQ_ID_GOOD_END, 0, 255, 1091 }, - { 1, 0, SEQ_ID_GOOD_END, 100, 255, 100 }, - { 0, 0, SEQ_ID_INTRO_44, 0, 255, 242 }, - { 0, 0, SEQ_ID_SECTOR_Y | SEQ_FLAG, 0, 255, 2096 }, - { 1, 0, SEQ_ID_SECTOR_Y | SEQ_FLAG, 50, 255, 50 }, - { 0, 0, SEQ_ID_SY_BOSS | SEQ_FLAG, 0, 2, 1600 }, - { 1, 0, SEQ_ID_SY_BOSS | SEQ_FLAG, 1, 255, 50 }, - { 0, 0, SEQ_ID_BOSS_RESUME | SEQ_FLAG, 0, 255, 1600 }, - { 1, 0, SEQ_ID_BOSS_RESUME | SEQ_FLAG, 1, 255, 50 }, - { 0, 0, SEQ_ID_GOOD_END, 0, 255, 1091 }, - { 1, 0, SEQ_ID_GOOD_END, 100, 255, 100 }, - { 0, 0, SEQ_ID_INTRO_51, 0, 255, 241 }, - { 0, 0, SEQ_ID_KATINA | SEQ_FLAG, 0, 255, 2184 }, - { 1, 0, SEQ_ID_KATINA | SEQ_FLAG, 1, 255, 100 }, - { 0, 0, SEQ_ID_KA_BOSS | SEQ_FLAG, 0, 1, 1115 }, - { 1, 0, SEQ_ID_KA_BOSS | SEQ_FLAG, 50, 255, 100 }, - { 0, 0, SEQ_ID_GOOD_END, 0, 255, 1091 }, - { 1, 0, SEQ_ID_GOOD_END, 100, 255, 100 }, - { 0, 0, SEQ_ID_INTRO_51, 0, 255, 250 }, - { 0, 0, SEQ_ID_SOLAR | SEQ_FLAG, 0, 255, 1096 }, - { 3, 0, SEQ_ID_BILL, 0, 255, 1000 }, - { 1, 0, SEQ_ID_SOLAR | SEQ_FLAG, 50, 255, 50 }, - { 0, 0, SEQ_ID_SO_BOSS | SEQ_FLAG, 0, 255, 1600 }, - { 1, 0, SEQ_ID_SO_BOSS | SEQ_FLAG, 1, 255, 50 }, - { 0, 0, SEQ_ID_GOOD_END, 0, 255, 1091 }, - { 1, 0, SEQ_ID_GOOD_END, 100, 255, 100 }, - { 0, 0, SEQ_ID_INTRO_44, 0, 255, 260 }, - { 0, 0, SEQ_ID_MACBETH | SEQ_FLAG, 0, 255, 1920 }, - { 1, 0, SEQ_ID_MACBETH | SEQ_FLAG, 50, 255, 50 }, - { 0, 0, SEQ_ID_MA_BOSS | SEQ_FLAG, 0, 255, 1600 }, - { 1, 0, SEQ_ID_MA_BOSS | SEQ_FLAG, 1, 255, 50 }, - { 0, 0, SEQ_ID_GOOD_END, 0, 255, 1091 }, - { 1, 0, SEQ_ID_GOOD_END, 100, 255, 100 }, - { 0, 0, SEQ_ID_INTRO_51, 0, 255, 241 }, - { 0, 0, SEQ_ID_BOLSE | SEQ_FLAG, 0, 255, 1177 }, - { 1, 0, SEQ_ID_BOLSE | SEQ_FLAG, 100, 255, 100 }, - { 0, 0, SEQ_ID_BO_BOSS | SEQ_FLAG, 0, 255, 1115 }, - { 1, 0, SEQ_ID_BO_BOSS | SEQ_FLAG, 50, 255, 50 }, - { 0, 0, SEQ_ID_STAR_WOLF | SEQ_FLAG, 0, 255, 2120 }, - { 1, 0, SEQ_ID_STAR_WOLF | SEQ_FLAG, 1, 255, 50 }, - { 0, 0, SEQ_ID_GOOD_END, 0, 255, 1091 }, - { 1, 0, SEQ_ID_GOOD_END, 100, 255, 100 }, - { 0, 0, SEQ_ID_VENOM_1 | SEQ_FLAG, 0, 255, 1671 }, - { 1, 0, SEQ_ID_VENOM_1 | SEQ_FLAG, 50, 255, 50 }, - { 0, 0, SEQ_ID_VE_BOSS | SEQ_FLAG, 0, 255, 1600 }, - { 1, 0, SEQ_ID_VE_BOSS | SEQ_FLAG, 1, 255, 50 }, - { 0, 0, SEQ_ID_TO_ANDROSS | SEQ_FLAG, 0, 0, 176 }, - { 0, 0, SEQ_ID_ANDROSS | SEQ_FLAG, 0, 255, 588 }, - { 0, 0, SEQ_ID_AND_BOSS | SEQ_FLAG, 0, 0, 2420 }, - { 1, 0, SEQ_ID_AND_BOSS | SEQ_FLAG, 10, 255, 50 }, - { 0, 0, SEQ_ID_AND_BOSS | SEQ_FLAG, 0, 255, 1200 }, - { 1, 0, SEQ_ID_AND_BOSS | SEQ_FLAG, 1, 255, 150 }, - { 0, 0, SEQ_ID_VE_CLEAR | SEQ_FLAG, 0, 255, 1091 }, - { 1, 0, SEQ_ID_VE_CLEAR | SEQ_FLAG, 80, 255, 160 }, - { 0, 0, SEQ_ID_ENDING, 0, 255, 9500 }, - { 255, 0, SEQ_ID_CORNERIA | SEQ_FLAG, 50, 255, 50 }, + { 0, 0, NA_BGM_START_DEMO, 0, 255, 1620 }, + { 0, 0, NA_BGM_STAGE_CO, 0, 255, 2490 }, + { 1, 0, NA_BGM_STAGE_CO, 50, 255, 50 }, + { 0, 0, NA_BGM_BOSS_A_CARRIER, 0, 255, 1620 }, + { 1, 0, NA_BGM_BOSS_A_CARRIER, 1, 255, 50 }, + { 0, 0, NA_BGM_COURSE_CLEAR, 0, 255, 1091 }, + { 1, 0, NA_BGM_COURSE_CLEAR, 100, 255, 100 }, + { 0, 0, NA_BGM_START_DEMO_S, 0, 255, 242 }, + { 0, 0, NA_BGM_STAGE_SY, 0, 255, 2096 }, + { 1, 0, NA_BGM_STAGE_SY, 50, 255, 50 }, + { 0, 0, NA_BGM_BOSS_SY, 0, 2, 1600 }, + { 1, 0, NA_BGM_BOSS_SY, 1, 255, 50 }, + { 0, 0, NA_BGM_REAL_BOSS, 0, 255, 1600 }, + { 1, 0, NA_BGM_REAL_BOSS, 1, 255, 50 }, + { 0, 0, NA_BGM_COURSE_CLEAR, 0, 255, 1091 }, + { 1, 0, NA_BGM_COURSE_CLEAR, 100, 255, 100 }, + { 0, 0, NA_BGM_KA_START_DEMO, 0, 255, 241 }, + { 0, 0, NA_BGM_STAGE_KA, 0, 255, 2184 }, + { 1, 0, NA_BGM_STAGE_KA, 1, 255, 100 }, + { 0, 0, NA_BGM_BOSS_KA, 0, 1, 1115 }, + { 1, 0, NA_BGM_BOSS_KA, 50, 255, 100 }, + { 0, 0, NA_BGM_COURSE_CLEAR, 0, 255, 1091 }, + { 1, 0, NA_BGM_COURSE_CLEAR, 100, 255, 100 }, + { 0, 0, NA_BGM_SO_START_DEMO, 0, 255, 250 }, + { 0, 0, NA_BGM_STAGE_SO, 0, 255, 1096 }, + { 3, 0, NA_BGM_BILL, 0, 255, 1000 }, + { 1, 0, NA_BGM_STAGE_SO, 50, 255, 50 }, + { 0, 0, NA_BGM_BOSS_SO, 0, 255, 1600 }, + { 1, 0, NA_BGM_BOSS_SO, 1, 255, 50 }, + { 0, 0, NA_BGM_COURSE_CLEAR, 0, 255, 1091 }, + { 1, 0, NA_BGM_COURSE_CLEAR, 100, 255, 100 }, + { 0, 0, NA_BGM_START_DEMO_S, 0, 255, 260 }, + { 0, 0, NA_BGM_STAGE_MA, 0, 255, 1920 }, + { 1, 0, NA_BGM_STAGE_MA, 50, 255, 50 }, + { 0, 0, NA_BGM_BOSS_MA, 0, 255, 1600 }, + { 1, 0, NA_BGM_BOSS_MA, 1, 255, 50 }, + { 0, 0, NA_BGM_COURSE_CLEAR, 0, 255, 1091 }, + { 1, 0, NA_BGM_COURSE_CLEAR, 100, 255, 100 }, + { 0, 0, NA_BGM_BO_START_DEMO, 0, 255, 241 }, + { 0, 0, NA_BGM_STAGE_BO, 0, 255, 1177 }, + { 1, 0, NA_BGM_STAGE_BO, 100, 255, 100 }, + { 0, 0, NA_BGM_BOSS_BO, 0, 255, 1115 }, + { 1, 0, NA_BGM_BOSS_BO, 50, 255, 50 }, + { 0, 0, NA_BGM_STARWOLF, 0, 255, 2120 }, + { 1, 0, NA_BGM_STARWOLF, 1, 255, 50 }, + { 0, 0, NA_BGM_COURSE_CLEAR, 0, 255, 1091 }, + { 1, 0, NA_BGM_COURSE_CLEAR, 100, 255, 100 }, + { 0, 0, NA_BGM_STAGE_VE1, 0, 255, 1671 }, + { 1, 0, NA_BGM_STAGE_VE1, 50, 255, 50 }, + { 0, 0, NA_BGM_BOSS_VE, 0, 255, 1600 }, + { 1, 0, NA_BGM_BOSS_VE, 1, 255, 50 }, + { 0, 0, NA_BGM_DASH_INTO_BASE, 0, 0, 176 }, + { 0, 0, NA_BGM_STAGE_ANDROSS, 0, 255, 588 }, + { 0, 0, NA_BGM_BOSS_ANDROSS, 0, 0, 2420 }, + { 1, 0, NA_BGM_BOSS_ANDROSS, 10, 255, 50 }, + { 0, 0, NA_BGM_BOSS_ANDROSS, 0, 255, 1200 }, + { 1, 0, NA_BGM_BOSS_ANDROSS, 1, 255, 150 }, + { 0, 0, NA_BGM_ALL_CLEAR, 0, 255, 1091 }, + { 1, 0, NA_BGM_ALL_CLEAR, 80, 255, 160 }, + { 0, 0, NA_BGM_STAFF_ROLL, 0, 255, 9500 }, + { 255, 0, NA_BGM_STAGE_CO, 50, 255, 50 }, { 0 }, { 0 }, { 0 }, @@ -330,190 +305,140 @@ PlaylistCmd sPlaylists[][100] = { { 0 }, }, { - { 0, 0, SEQ_ID_CO_INTRO, 0, 255, 1620 }, - { 0, 0, SEQ_ID_CORNERIA | SEQ_FLAG, 0, 255, 2490 }, - { 1, 0, SEQ_ID_CORNERIA | SEQ_FLAG, 50, 255, 50 }, - { 0, 0, SEQ_ID_CO_BOSS_2 | SEQ_FLAG, 0, 255, 1620 }, - { 1, 0, SEQ_ID_CO_BOSS_2 | SEQ_FLAG, 1, 255, 50 }, - { 0, 0, SEQ_ID_GOOD_END, 0, 255, 1091 }, - { 1, 0, SEQ_ID_GOOD_END, 100, 255, 100 }, - { 0, 0, SEQ_ID_INTRO_44, 0, 255, 260 }, - { 0, 0, SEQ_ID_SECTOR_Y | SEQ_FLAG, 0, 255, 2096 }, - { 1, 0, SEQ_ID_SECTOR_Y | SEQ_FLAG, 50, 255, 50 }, - { 0, 0, SEQ_ID_SY_BOSS | SEQ_FLAG, 0, 2, 1590 }, - { 1, 0, SEQ_ID_SY_BOSS | SEQ_FLAG, 1, 255, 50 }, - { 0, 0, SEQ_ID_BOSS_RESUME | SEQ_FLAG, 0, 255, 1600 }, - { 1, 0, SEQ_ID_BOSS_RESUME | SEQ_FLAG, 1, 255, 50 }, - { 0, 0, SEQ_ID_GOOD_END, 0, 255, 1091 }, - { 1, 0, SEQ_ID_GOOD_END, 100, 255, 100 }, - { 0, 0, SEQ_ID_INTRO_44, 0, 255, 260 }, - { 0, 0, SEQ_ID_AQUAS, 0, 255, 2400 }, - { 1, 0, SEQ_ID_AQUAS, 150, 255, 200 }, - { 0, 0, SEQ_ID_AQ_BOSS | SEQ_FLAG, 0, 1, 1590 }, - { 1, 0, SEQ_ID_AQ_BOSS | SEQ_FLAG, 1, 255, 50 }, - { 0, 0, SEQ_ID_GOOD_END, 0, 255, 1091 }, - { 1, 0, SEQ_ID_GOOD_END, 100, 255, 100 }, - { 0, 0, SEQ_ID_INTRO_44, 0, 255, 260 }, - { 0, 0, SEQ_ID_ZONESS | SEQ_FLAG, 0, 255, 1005 }, - { 3, 0, SEQ_ID_KATT, 0, 255, 1000 }, - { 1, 0, SEQ_ID_ZONESS | SEQ_FLAG, 50, 255, 100 }, - { 0, 0, SEQ_ID_ZO_BOSS | SEQ_FLAG, 0, 255, 1600 }, - { 1, 0, SEQ_ID_ZO_BOSS | SEQ_FLAG, 1, 255, 50 }, - { 0, 0, SEQ_ID_GOOD_END, 0, 255, 1091 }, - { 1, 0, SEQ_ID_GOOD_END, 100, 255, 100 }, - { 0, 0, SEQ_ID_INTRO_51, 0, 255, 241 }, - { 0, 0, SEQ_ID_SECTOR_Z | SEQ_FLAG, 0, 255, 1632 }, - { 1, 0, SEQ_ID_SECTOR_Z | SEQ_FLAG, 50, 255, 100 }, - { 0, 0, SEQ_ID_SZ_BOSS | SEQ_FLAG, 0, 1, 1310 }, - { 3, 0, SEQ_ID_KATT, 0, 255, 500 }, - { 1, 0, SEQ_ID_SZ_BOSS | SEQ_FLAG, 1, 255, 50 }, - { 0, 0, SEQ_ID_GOOD_END, 0, 255, 1091 }, - { 1, 0, SEQ_ID_GOOD_END, 100, 255, 100 }, - { 0, 0, SEQ_ID_INTRO_51, 0, 255, 241 }, - { 0, 0, SEQ_ID_AREA_6 | SEQ_FLAG, 0, 255, 1906 }, - { 1, 0, SEQ_ID_AREA_6 | SEQ_FLAG, 50, 255, 100 }, - { 0, 0, SEQ_ID_A6_BOSS | SEQ_FLAG, 0, 1, 1590 }, - { 1, 0, SEQ_ID_A6_BOSS | SEQ_FLAG, 1, 255, 50 }, - { 0, 0, SEQ_ID_GOOD_END, 0, 255, 1091 }, - { 1, 0, SEQ_ID_GOOD_END, 100, 255, 100 }, - { 0, 0, SEQ_ID_STAR_WOLF | SEQ_FLAG, 0, 255, 2120 }, - { 1, 0, SEQ_ID_STAR_WOLF | SEQ_FLAG, 30, 255, 150 }, - { 0, 0, SEQ_ID_TO_ANDROSS | SEQ_FLAG, 0, 0, 176 }, - { 0, 0, SEQ_ID_ANDROSS | SEQ_FLAG, 0, 255, 588 }, - { 0, 0, SEQ_ID_AND_BOSS | SEQ_FLAG, 0, 0, 2392 }, - { 1, 0, SEQ_ID_AND_BOSS | SEQ_FLAG, 10, 255, 50 }, - { 0, 0, SEQ_ID_AND_BRAIN | SEQ_FLAG, 0, 255, 1700 }, - { 1, 0, SEQ_ID_AND_BOSS | SEQ_FLAG, 10, 255, 250 }, - { 0, 0, SEQ_ID_A6_BOSS | SEQ_FLAG, 0, 255, 1600 }, - { 1, 0, SEQ_ID_A6_BOSS | SEQ_FLAG, 1, 255, 50 }, - { 0, 0, SEQ_ID_VE_CLEAR | SEQ_FLAG, 0, 255, 1091 }, - { 1, 0, SEQ_ID_VE_CLEAR | SEQ_FLAG, 80, 255, 160 }, - { 0, 0, SEQ_ID_ENDING, 0, 255, 9250 }, - { 255, 0, SEQ_ID_CORNERIA | SEQ_FLAG, 50, 255, 50 }, + { 0, 0, NA_BGM_START_DEMO, 0, 255, 1620 }, { 0, 0, NA_BGM_STAGE_CO, 0, 255, 2490 }, + { 1, 0, NA_BGM_STAGE_CO, 50, 255, 50 }, { 0, 0, NA_BGM_BOSS_A_CARRIER, 0, 255, 1620 }, + { 1, 0, NA_BGM_BOSS_A_CARRIER, 1, 255, 50 }, { 0, 0, NA_BGM_COURSE_CLEAR, 0, 255, 1091 }, + { 1, 0, NA_BGM_COURSE_CLEAR, 100, 255, 100 }, { 0, 0, NA_BGM_START_DEMO_S, 0, 255, 260 }, + { 0, 0, NA_BGM_STAGE_SY, 0, 255, 2096 }, { 1, 0, NA_BGM_STAGE_SY, 50, 255, 50 }, + { 0, 0, NA_BGM_BOSS_SY, 0, 2, 1590 }, { 1, 0, NA_BGM_BOSS_SY, 1, 255, 50 }, + { 0, 0, NA_BGM_REAL_BOSS, 0, 255, 1600 }, { 1, 0, NA_BGM_REAL_BOSS, 1, 255, 50 }, + { 0, 0, NA_BGM_COURSE_CLEAR, 0, 255, 1091 }, { 1, 0, NA_BGM_COURSE_CLEAR, 100, 255, 100 }, + { 0, 0, NA_BGM_START_DEMO_S, 0, 255, 260 }, { 0, 0, NA_BGM_STAGE_AQ, 0, 255, 2400 }, + { 1, 0, NA_BGM_STAGE_AQ, 150, 255, 200 }, { 0, 0, NA_BGM_BOSS_AQ, 0, 1, 1590 }, + { 1, 0, NA_BGM_BOSS_AQ, 1, 255, 50 }, { 0, 0, NA_BGM_COURSE_CLEAR, 0, 255, 1091 }, + { 1, 0, NA_BGM_COURSE_CLEAR, 100, 255, 100 }, { 0, 0, NA_BGM_START_DEMO_S, 0, 255, 260 }, + { 0, 0, NA_BGM_STAGE_ZO, 0, 255, 1005 }, { 3, 0, NA_BGM_KATT, 0, 255, 1000 }, + { 1, 0, NA_BGM_STAGE_ZO, 50, 255, 100 }, { 0, 0, NA_BGM_BOSS_ZO, 0, 255, 1600 }, + { 1, 0, NA_BGM_BOSS_ZO, 1, 255, 50 }, { 0, 0, NA_BGM_COURSE_CLEAR, 0, 255, 1091 }, + { 1, 0, NA_BGM_COURSE_CLEAR, 100, 255, 100 }, { 0, 0, NA_BGM_SZ_START_DEMO, 0, 255, 241 }, + { 0, 0, NA_BGM_STAGE_SZ, 0, 255, 1632 }, { 1, 0, NA_BGM_STAGE_SZ, 50, 255, 100 }, + { 0, 0, NA_BGM_BOSS_SZ, 0, 1, 1310 }, { 3, 0, NA_BGM_KATT, 0, 255, 500 }, + { 1, 0, NA_BGM_BOSS_SZ, 1, 255, 50 }, { 0, 0, NA_BGM_COURSE_CLEAR, 0, 255, 1091 }, + { 1, 0, NA_BGM_COURSE_CLEAR, 100, 255, 100 }, { 0, 0, NA_BGM_A6_START_DEMO, 0, 255, 241 }, + { 0, 0, NA_BGM_STAGE_A6, 0, 255, 1906 }, { 1, 0, NA_BGM_STAGE_A6, 50, 255, 100 }, + { 0, 0, NA_BGM_BOSS_A6, 0, 1, 1590 }, { 1, 0, NA_BGM_BOSS_A6, 1, 255, 50 }, + { 0, 0, NA_BGM_COURSE_CLEAR, 0, 255, 1091 }, { 1, 0, NA_BGM_COURSE_CLEAR, 100, 255, 100 }, + { 0, 0, NA_BGM_STARWOLF, 0, 255, 2120 }, { 1, 0, NA_BGM_STARWOLF, 30, 255, 150 }, + { 0, 0, NA_BGM_DASH_INTO_BASE, 0, 0, 176 }, { 0, 0, NA_BGM_STAGE_ANDROSS, 0, 255, 588 }, + { 0, 0, NA_BGM_BOSS_ANDROSS, 0, 0, 2392 }, { 1, 0, NA_BGM_BOSS_ANDROSS, 10, 255, 50 }, + { 0, 0, NA_BGM_ANDROSS_BRAIN, 0, 255, 1700 }, { 1, 0, NA_BGM_BOSS_ANDROSS, 10, 255, 250 }, + { 0, 0, NA_BGM_BOSS_A6, 0, 255, 1600 }, { 1, 0, NA_BGM_BOSS_A6, 1, 255, 50 }, + { 0, 0, NA_BGM_ALL_CLEAR, 0, 255, 1091 }, { 1, 0, NA_BGM_ALL_CLEAR, 80, 255, 160 }, + { 0, 0, NA_BGM_STAFF_ROLL, 0, 255, 9250 }, { 255, 0, NA_BGM_STAGE_CO, 50, 255, 50 }, }, { - { 0, 0, SEQ_ID_CO_INTRO, 0, 255, 1620 }, - { 0, 0, SEQ_ID_CORNERIA | SEQ_FLAG, 0, 255, 2490 }, - { 1, 0, SEQ_ID_CORNERIA | SEQ_FLAG, 50, 255, 50 }, - { 0, 0, SEQ_ID_CO_BOSS_1 | SEQ_FLAG, 0, 255, 1600 }, - { 1, 0, SEQ_ID_CO_BOSS_1 | SEQ_FLAG, 1, 255, 50 }, - { 0, 0, SEQ_ID_GOOD_END, 0, 255, 1091 }, - { 1, 0, SEQ_ID_GOOD_END, 100, 255, 100 }, - { 0, 0, SEQ_ID_ME_INTRO, 0, 255, 838 }, - { 0, 0, SEQ_ID_METEO | SEQ_FLAG, 0, 255, 1584 }, - { 1, 0, SEQ_ID_METEO | SEQ_FLAG, 150, 255, 150 }, - { 0, 0, SEQ_ID_WARP_ZONE | SEQ_FLAG, 0, 255, 1635 }, - { 1, 0, SEQ_ID_WARP_ZONE | SEQ_FLAG, 150, 255, 150 }, - { 0, 0, SEQ_ID_INTRO_51, 0, 255, 241 }, - { 0, 0, SEQ_ID_KATINA | SEQ_FLAG, 0, 255, 2184 }, - { 1, 0, SEQ_ID_KATINA | SEQ_FLAG, 1, 255, 100 }, - { 0, 0, SEQ_ID_KA_BOSS | SEQ_FLAG, 0, 1, 1115 }, - { 1, 0, SEQ_ID_KA_BOSS | SEQ_FLAG, 50, 255, 100 }, - { 0, 0, SEQ_ID_BAD_END, 0, 255, 1604 }, - { 1, 0, SEQ_ID_BAD_END, 100, 255, 100 }, - { 0, 0, SEQ_ID_INTRO_44, 0, 255, 242 }, - { 0, 0, SEQ_ID_SECTOR_X | SEQ_FLAG, 0, 255, 1291 }, - { 3, 0, SEQ_ID_BILL, 0, 255, 1000 }, - { 1, 0, SEQ_ID_SECTOR_X | SEQ_FLAG, 50, 255, 100 }, - { 0, 0, SEQ_ID_WARP_ZONE | SEQ_FLAG, 0, 255, 1635 }, - { 1, 0, SEQ_ID_WARP_ZONE | SEQ_FLAG, 150, 255, 150 }, - { 0, 0, SEQ_ID_INTRO_51, 0, 255, 241 }, - { 0, 0, SEQ_ID_SECTOR_Z | SEQ_FLAG, 0, 255, 1632 }, - { 1, 0, SEQ_ID_SECTOR_Z | SEQ_FLAG, 50, 255, 100 }, - { 0, 0, SEQ_ID_SZ_BOSS | SEQ_FLAG, 0, 1, 1115 }, - { 1, 0, SEQ_ID_SZ_BOSS | SEQ_FLAG, 1, 255, 50 }, - { 0, 0, SEQ_ID_GOOD_END, 0, 255, 1091 }, - { 1, 0, SEQ_ID_GOOD_END, 100, 255, 100 }, - { 0, 0, SEQ_ID_INTRO_51, 0, 255, 241 }, - { 0, 0, SEQ_ID_AREA_6 | SEQ_FLAG, 0, 255, 1906 }, - { 1, 0, SEQ_ID_AREA_6 | SEQ_FLAG, 50, 255, 100 }, - { 0, 0, SEQ_ID_A6_BOSS | SEQ_FLAG, 0, 1, 1590 }, - { 1, 0, SEQ_ID_A6_BOSS | SEQ_FLAG, 1, 255, 50 }, - { 0, 0, SEQ_ID_DEATH, 0, 255, 150 }, - { 0, 0, SEQ_ID_GAME_OVER, 0, 255, 1020 }, - { 1, 0, SEQ_ID_GAME_OVER, 100, 255, 100 }, - { 255, 0, SEQ_ID_CORNERIA | SEQ_FLAG, 50, 255, 50 }, + { 0, 0, NA_BGM_START_DEMO, 0, 255, 1620 }, { 0, 0, NA_BGM_STAGE_CO, 0, 255, 2490 }, + { 1, 0, NA_BGM_STAGE_CO, 50, 255, 50 }, { 0, 0, NA_BGM_BOSS_CO, 0, 255, 1600 }, + { 1, 0, NA_BGM_BOSS_CO, 1, 255, 50 }, { 0, 0, NA_BGM_COURSE_CLEAR, 0, 255, 1091 }, + { 1, 0, NA_BGM_COURSE_CLEAR, 100, 255, 100 }, { 0, 0, NA_BGM_ME_START_DEMO, 0, 255, 838 }, + { 0, 0, NA_BGM_STAGE_ME, 0, 255, 1584 }, { 1, 0, NA_BGM_STAGE_ME, 150, 255, 150 }, + { 0, 0, NA_BGM_STAGE_WZ, 0, 255, 1635 }, { 1, 0, NA_BGM_STAGE_WZ, 150, 255, 150 }, + { 0, 0, NA_BGM_KA_START_DEMO, 0, 255, 241 }, { 0, 0, NA_BGM_STAGE_KA, 0, 255, 2184 }, + { 1, 0, NA_BGM_STAGE_KA, 1, 255, 100 }, { 0, 0, NA_BGM_BOSS_KA, 0, 1, 1115 }, + { 1, 0, NA_BGM_BOSS_KA, 50, 255, 100 }, { 0, 0, NA_BGM_COURSE_FAILURE, 0, 255, 1604 }, + { 1, 0, NA_BGM_COURSE_FAILURE, 100, 255, 100 }, { 0, 0, NA_BGM_START_DEMO_S, 0, 255, 242 }, + { 0, 0, NA_BGM_STAGE_SX, 0, 255, 1291 }, { 3, 0, NA_BGM_BILL, 0, 255, 1000 }, + { 1, 0, NA_BGM_STAGE_SX, 50, 255, 100 }, { 0, 0, NA_BGM_STAGE_WZ, 0, 255, 1635 }, + { 1, 0, NA_BGM_STAGE_WZ, 150, 255, 150 }, { 0, 0, NA_BGM_SZ_START_DEMO, 0, 255, 241 }, + { 0, 0, NA_BGM_STAGE_SZ, 0, 255, 1632 }, { 1, 0, NA_BGM_STAGE_SZ, 50, 255, 100 }, + { 0, 0, NA_BGM_BOSS_SZ, 0, 1, 1115 }, { 1, 0, NA_BGM_BOSS_SZ, 1, 255, 50 }, + { 0, 0, NA_BGM_COURSE_CLEAR, 0, 255, 1091 }, { 1, 0, NA_BGM_COURSE_CLEAR, 100, 255, 100 }, + { 0, 0, NA_BGM_A6_START_DEMO, 0, 255, 241 }, { 0, 0, NA_BGM_STAGE_A6, 0, 255, 1906 }, + { 1, 0, NA_BGM_STAGE_A6, 50, 255, 100 }, { 0, 0, NA_BGM_BOSS_A6, 0, 1, 1590 }, + { 1, 0, NA_BGM_BOSS_A6, 1, 255, 50 }, { 0, 0, NA_BGM_PLAYER_DOWN, 0, 255, 150 }, + { 0, 0, NA_BGM_GAME_OVER, 0, 255, 1020 }, { 1, 0, NA_BGM_GAME_OVER, 100, 255, 100 }, + { 255, 0, NA_BGM_STAGE_CO, 50, 255, 50 }, }, { - { 0, 0, SEQ_ID_OPENING, 0, 255, 2926 }, - { 0, 0, SEQ_ID_TITLE, 0, 255, 1251 }, - { 1, 0, SEQ_ID_TITLE, 200, 255, 200 }, - { 0, 0, SEQ_ID_MENU, 0, 255, 1636 }, - { 1, 0, SEQ_ID_MENU, 200, 255, 200 }, - { 0, 0, SEQ_ID_WORLD_MAP, 0, 255, 1560 }, - { 1, 0, SEQ_ID_WORLD_MAP, 200, 255, 200 }, - { 0, 0, SEQ_ID_CO_INTRO, 0, 255, 1618 }, - { 0, 0, SEQ_ID_INTRO_44, 0, 255, 242 }, - { 0, 0, SEQ_ID_INTRO_45, 0, 255, 582 }, - { 0, 0, SEQ_ID_ME_INTRO, 0, 255, 868 }, - { 0, 0, SEQ_ID_INTRO_51, 0, 255, 281 }, - { 0, 0, SEQ_ID_CORNERIA | SEQ_FLAG, 0, 255, 2490 }, - { 1, 0, SEQ_ID_CORNERIA | SEQ_FLAG, 200, 255, 200 }, - { 0, 0, SEQ_ID_METEO | SEQ_FLAG, 0, 255, 1584 }, - { 1, 0, SEQ_ID_METEO | SEQ_FLAG, 200, 255, 200 }, - { 0, 0, SEQ_ID_TITANIA | SEQ_FLAG, 0, 255, 1920 }, - { 1, 0, SEQ_ID_TITANIA | SEQ_FLAG, 200, 255, 200 }, - { 0, 0, SEQ_ID_SECTOR_X | SEQ_FLAG, 0, 255, 2290 }, - { 1, 0, SEQ_ID_SECTOR_X | SEQ_FLAG, 200, 255, 200 }, - { 0, 0, SEQ_ID_ZONESS | SEQ_FLAG, 0, 255, 2005 }, - { 1, 0, SEQ_ID_ZONESS | SEQ_FLAG, 200, 255, 200 }, - { 0, 0, SEQ_ID_AREA_6 | SEQ_FLAG, 0, 255, 1905 }, - { 1, 0, SEQ_ID_AREA_6 | SEQ_FLAG, 200, 255, 200 }, - { 0, 0, SEQ_ID_VENOM_1 | SEQ_FLAG, 0, 255, 1671 }, - { 1, 0, SEQ_ID_VENOM_1 | SEQ_FLAG, 200, 255, 200 }, - { 0, 0, SEQ_ID_SECTOR_Y | SEQ_FLAG, 0, 255, 2095 }, - { 1, 0, SEQ_ID_SECTOR_Y | SEQ_FLAG, 200, 255, 200 }, - { 0, 0, SEQ_ID_FORTUNA | SEQ_FLAG, 0, 255, 1632 }, - { 1, 0, SEQ_ID_FORTUNA | SEQ_FLAG, 200, 255, 200 }, - { 0, 0, SEQ_ID_KATINA | SEQ_FLAG, 0, 255, 2184 }, - { 1, 0, SEQ_ID_KATINA | SEQ_FLAG, 200, 255, 200 }, - { 0, 0, SEQ_ID_AQUAS, 0, 255, 2400 }, - { 1, 0, SEQ_ID_AQUAS, 200, 255, 200 }, - { 0, 0, SEQ_ID_WARP_ZONE | SEQ_FLAG, 0, 255, 1635 }, - { 1, 0, SEQ_ID_WARP_ZONE | SEQ_FLAG, 200, 255, 200 }, - { 0, 0, SEQ_ID_KATT, 0, 255, 389 }, - { 0, 0, SEQ_ID_BILL, 0, 255, 268 }, - { 0, 0, SEQ_ID_CO_BOSS_1 | SEQ_FLAG, 0, 255, 1598 }, - { 1, 0, SEQ_ID_CO_BOSS_1 | SEQ_FLAG, 200, 255, 200 }, - { 0, 0, SEQ_ID_ME_BOSS | SEQ_FLAG, 0, 0, 1470 }, - { 1, 0, SEQ_ID_ME_BOSS | SEQ_FLAG, 200, 255, 200 }, - { 0, 0, SEQ_ID_ME_BOSS | SEQ_FLAG, 0, 255, 1470 }, - { 1, 0, SEQ_ID_ME_BOSS | SEQ_FLAG, 200, 255, 200 }, - { 0, 0, SEQ_ID_BOSS_RESUME | SEQ_FLAG, 0, 255, 1311 }, - { 1, 0, SEQ_ID_BOSS_RESUME | SEQ_FLAG, 200, 255, 200 }, - { 0, 0, SEQ_ID_BO_BOSS | SEQ_FLAG, 0, 255, 1115 }, - { 1, 0, SEQ_ID_BO_BOSS | SEQ_FLAG, 200, 255, 200 }, - { 0, 0, SEQ_ID_STAR_WOLF | SEQ_FLAG, 0, 255, 2120 }, - { 1, 0, SEQ_ID_STAR_WOLF | SEQ_FLAG, 200, 255, 200 }, - { 0, 0, SEQ_ID_GOOD_END, 0, 255, 1091 }, - { 1, 0, SEQ_ID_GOOD_END, 200, 255, 200 }, - { 0, 0, SEQ_ID_BAD_END, 0, 255, 1604 }, - { 1, 0, SEQ_ID_BAD_END, 200, 255, 200 }, - { 0, 0, SEQ_ID_DEATH, 0, 255, 200 }, - { 0, 0, SEQ_ID_GAME_OVER, 0, 255, 1020 }, - { 1, 0, SEQ_ID_GAME_OVER, 200, 255, 200 }, - { 0, 0, SEQ_ID_TRAINING | SEQ_FLAG, 0, 255, 900 }, - { 1, 0, SEQ_ID_TRAINING | SEQ_FLAG, 200, 255, 200 }, - { 0, 0, SEQ_ID_VS_MENU, 0, 255, 665 }, - { 1, 0, SEQ_ID_VS_MENU, 200, 255, 200 }, - { 0, 0, SEQ_ID_VERSUS | SEQ_FLAG, 0, 255, 1647 }, - { 1, 0, SEQ_ID_VERSUS | SEQ_FLAG, 200, 255, 200 }, - { 0, 0, SEQ_ID_VS_HURRY | SEQ_FLAG, 0, 255, 1667 }, - { 1, 0, SEQ_ID_VS_HURRY | SEQ_FLAG, 200, 255, 200 }, - { 0, 0, SEQ_ID_TO_ANDROSS | SEQ_FLAG, 0, 0, 176 }, - { 0, 0, SEQ_ID_ANDROSS | SEQ_FLAG, 0, 255, 588 }, - { 1, 0, SEQ_ID_ANDROSS | SEQ_FLAG, 200, 255, 200 }, - { 0, 0, SEQ_ID_AND_BOSS | SEQ_FLAG, 0, 0, 2391 }, - { 1, 0, SEQ_ID_AND_BOSS | SEQ_FLAG, 200, 255, 200 }, - { 0, 0, SEQ_ID_AND_BOSS | SEQ_FLAG, 0, 255, 2391 }, - { 1, 0, SEQ_ID_AND_BOSS | SEQ_FLAG, 200, 255, 200 }, - { 0, 0, SEQ_ID_AND_BRAIN | SEQ_FLAG, 0, 255, 1700 }, - { 1, 0, SEQ_ID_AND_BRAIN | SEQ_FLAG, 200, 255, 200 }, - { 0, 0, SEQ_ID_VE_CLEAR | SEQ_FLAG, 0, 255, 1459 }, - { 1, 0, SEQ_ID_VE_CLEAR | SEQ_FLAG, 200, 255, 200 }, - { 0, 0, SEQ_ID_ENDING, 0, 255, 9250 }, - { 1, 0, SEQ_ID_ENDING, 200, 255, 200 }, - { 255, 0, SEQ_ID_CORNERIA | SEQ_FLAG, 50, 255, 50 }, + { 0, 0, NA_BGM_OPENING, 0, 255, 2926 }, + { 0, 0, NA_BGM_TITLE, 0, 255, 1251 }, + { 1, 0, NA_BGM_TITLE, 200, 255, 200 }, + { 0, 0, NA_BGM_SELECT, 0, 255, 1636 }, + { 1, 0, NA_BGM_SELECT, 200, 255, 200 }, + { 0, 0, NA_BGM_MAP, 0, 255, 1560 }, + { 1, 0, NA_BGM_MAP, 200, 255, 200 }, + { 0, 0, NA_BGM_START_DEMO, 0, 255, 1618 }, + { 0, 0, NA_BGM_START_DEMO_S, 0, 255, 242 }, + { 0, 0, NA_BGM_START_DEMO_M, 0, 255, 582 }, + { 0, 0, NA_BGM_ME_START_DEMO, 0, 255, 868 }, + { 0, 0, NA_BGM_FO_START_DEMO, 0, 255, 281 }, + { 0, 0, NA_BGM_STAGE_CO, 0, 255, 2490 }, + { 1, 0, NA_BGM_STAGE_CO, 200, 255, 200 }, + { 0, 0, NA_BGM_STAGE_ME, 0, 255, 1584 }, + { 1, 0, NA_BGM_STAGE_ME, 200, 255, 200 }, + { 0, 0, NA_BGM_STAGE_TI, 0, 255, 1920 }, + { 1, 0, NA_BGM_STAGE_TI, 200, 255, 200 }, + { 0, 0, NA_BGM_STAGE_SX, 0, 255, 2290 }, + { 1, 0, NA_BGM_STAGE_SX, 200, 255, 200 }, + { 0, 0, NA_BGM_STAGE_ZO, 0, 255, 2005 }, + { 1, 0, NA_BGM_STAGE_ZO, 200, 255, 200 }, + { 0, 0, NA_BGM_STAGE_A6, 0, 255, 1905 }, + { 1, 0, NA_BGM_STAGE_A6, 200, 255, 200 }, + { 0, 0, NA_BGM_STAGE_VE1, 0, 255, 1671 }, + { 1, 0, NA_BGM_STAGE_VE1, 200, 255, 200 }, + { 0, 0, NA_BGM_STAGE_SY, 0, 255, 2095 }, + { 1, 0, NA_BGM_STAGE_SY, 200, 255, 200 }, + { 0, 0, NA_BGM_STAGE_FO, 0, 255, 1632 }, + { 1, 0, NA_BGM_STAGE_FO, 200, 255, 200 }, + { 0, 0, NA_BGM_STAGE_KA, 0, 255, 2184 }, + { 1, 0, NA_BGM_STAGE_KA, 200, 255, 200 }, + { 0, 0, NA_BGM_STAGE_AQ, 0, 255, 2400 }, + { 1, 0, NA_BGM_STAGE_AQ, 200, 255, 200 }, + { 0, 0, NA_BGM_STAGE_WZ, 0, 255, 1635 }, + { 1, 0, NA_BGM_STAGE_WZ, 200, 255, 200 }, + { 0, 0, NA_BGM_KATT, 0, 255, 389 }, + { 0, 0, NA_BGM_BILL, 0, 255, 268 }, + { 0, 0, NA_BGM_BOSS_CO, 0, 255, 1598 }, + { 1, 0, NA_BGM_BOSS_CO, 200, 255, 200 }, + { 0, 0, NA_BGM_BOSS_ME, 0, 0, 1470 }, + { 1, 0, NA_BGM_BOSS_ME, 200, 255, 200 }, + { 0, 0, NA_BGM_BOSS_ME, 0, 255, 1470 }, + { 1, 0, NA_BGM_BOSS_ME, 200, 255, 200 }, + { 0, 0, NA_BGM_REAL_BOSS, 0, 255, 1311 }, + { 1, 0, NA_BGM_REAL_BOSS, 200, 255, 200 }, + { 0, 0, NA_BGM_BOSS_BO, 0, 255, 1115 }, + { 1, 0, NA_BGM_BOSS_BO, 200, 255, 200 }, + { 0, 0, NA_BGM_STARWOLF, 0, 255, 2120 }, + { 1, 0, NA_BGM_STARWOLF, 200, 255, 200 }, + { 0, 0, NA_BGM_COURSE_CLEAR, 0, 255, 1091 }, + { 1, 0, NA_BGM_COURSE_CLEAR, 200, 255, 200 }, + { 0, 0, NA_BGM_COURSE_FAILURE, 0, 255, 1604 }, + { 1, 0, NA_BGM_COURSE_FAILURE, 200, 255, 200 }, + { 0, 0, NA_BGM_PLAYER_DOWN, 0, 255, 200 }, + { 0, 0, NA_BGM_GAME_OVER, 0, 255, 1020 }, + { 1, 0, NA_BGM_GAME_OVER, 200, 255, 200 }, + { 0, 0, NA_BGM_TRAINING, 0, 255, 900 }, + { 1, 0, NA_BGM_TRAINING, 200, 255, 200 }, + { 0, 0, NA_BGM_VS_SELECT, 0, 255, 665 }, + { 1, 0, NA_BGM_VS_SELECT, 200, 255, 200 }, + { 0, 0, NA_BGM_BATTLE, 0, 255, 1647 }, + { 1, 0, NA_BGM_BATTLE, 200, 255, 200 }, + { 0, 0, NA_BGM_BATTLE_LAST, 0, 255, 1667 }, + { 1, 0, NA_BGM_BATTLE_LAST, 200, 255, 200 }, + { 0, 0, NA_BGM_DASH_INTO_BASE, 0, 0, 176 }, + { 0, 0, NA_BGM_STAGE_ANDROSS, 0, 255, 588 }, + { 1, 0, NA_BGM_STAGE_ANDROSS, 200, 255, 200 }, + { 0, 0, NA_BGM_BOSS_ANDROSS, 0, 0, 2391 }, + { 1, 0, NA_BGM_BOSS_ANDROSS, 200, 255, 200 }, + { 0, 0, NA_BGM_BOSS_ANDROSS, 0, 255, 2391 }, + { 1, 0, NA_BGM_BOSS_ANDROSS, 200, 255, 200 }, + { 0, 0, NA_BGM_ANDROSS_BRAIN, 0, 255, 1700 }, + { 1, 0, NA_BGM_ANDROSS_BRAIN, 200, 255, 200 }, + { 0, 0, NA_BGM_ALL_CLEAR, 0, 255, 1459 }, + { 1, 0, NA_BGM_ALL_CLEAR, 200, 255, 200 }, + { 0, 0, NA_BGM_STAFF_ROLL, 0, 255, 9250 }, + { 1, 0, NA_BGM_STAFF_ROLL, 200, 255, 200 }, + { 255, 0, NA_BGM_STAGE_CO, 50, 255, 50 }, }, }; @@ -763,7 +688,7 @@ void Audio_LoadInstruments(void) { void Audio_LoadAquasSequence(void) { if (sAudioSpecId == AUDIOSPEC_12) { - AUDIOCMD_GLOBAL_SYNC_LOAD_SEQ_PARTS(SEQ_ID_AQUAS, 0); + AUDIOCMD_GLOBAL_SYNC_LOAD_SEQ_PARTS(NA_BGM_STAGE_AQ, 0); } } @@ -2692,7 +2617,7 @@ void Audio_PlaySequence(u8 seqPlayId, u16 seqId, u8 fadeinTime, u8 bgmParam) { } void Audio_PlayFanfare(u16 seqId, u8 bgmVolume, u8 bgmFadeoutTime, u8 bgmFadeinTime) { - if (Audio_GetActiveSeqId(SEQ_PLAYER_BGM) != SEQ_ID_DEATH) { + if (Audio_GetActiveSeqId(SEQ_PLAYER_BGM) != NA_BGM_PLAYER_DOWN) { Audio_SetSequenceFade(SEQ_PLAYER_BGM, 1, bgmVolume, bgmFadeoutTime); SEQCMD_SETUP_RESTORE_SEQPLAYER_VOLUME(SEQ_PLAYER_FANFARE, SEQ_PLAYER_BGM, bgmFadeinTime); SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_FANFARE, 0, 0, seqId); @@ -2708,7 +2633,7 @@ void Audio_PlayDeathSequence(void) { AUDIO_PLAY_SFX(NA_SE_ARWING_EXPLOSION, gDefaultSfxSource, 4); SEQCMD_SET_SEQPLAYER_VOLUME(SEQ_PLAYER_BGM, 5, 30); SEQCMD_SETUP_RESTORE_SEQPLAYER_VOLUME(SEQ_PLAYER_FANFARE, SEQ_PLAYER_BGM, 30); - SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_FANFARE, 0, 0, SEQ_ID_DEATH); + SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_FANFARE, 0, 0, NA_BGM_PLAYER_DOWN); } else { for (i = 0; i < 5; i++) { Audio_KillSfxByBank(i); @@ -2717,7 +2642,7 @@ void Audio_PlayDeathSequence(void) { AUDIO_PLAY_SFX(NA_SE_ARWING_EXPLOSION, gDefaultSfxSource, 4); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 0); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 0); - SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM, 0, 0, SEQ_ID_DEATH); + SEQCMD_PLAY_SEQUENCE(SEQ_PLAYER_BGM, 0, 0, NA_BGM_PLAYER_DOWN); } } @@ -2772,13 +2697,13 @@ void Audio_SetVolume(u8 audioType, u8 volume) { void Audio_PlaySoundTest(u8 enable) { switch (enable) { case false: - AUDIO_PLAY_BGM(SEQ_ID_MENU); + AUDIO_PLAY_BGM(NA_BGM_SELECT); Audio_PlayVoice(1); Audio_KillSfxById(NA_SE_VOLUME_TEST); Audio_KillSfxById(NA_SE_ARWING_ENGIN_GRD); break; case true: - AUDIO_PLAY_BGM(SEQ_ID_VERSUS); + AUDIO_PLAY_BGM(NA_BGM_VOLUME_TEST); Audio_PlayVoice(2); AUDIO_PLAY_SFX(NA_SE_VOLUME_TEST, gDefaultSfxSource, 0); AUDIO_PLAY_SFX(NA_SE_ARWING_ENGIN_GRD, gDefaultSfxSource, 0); @@ -2848,8 +2773,8 @@ void Audio_InitSounds(void) { Audio_ResetSfxChannelState(); Audio_ResetActiveSequencesAndVolume(); Audio_ResetSfx(); - Audio_StartSequence(SEQ_PLAYER_VOICE, SEQ_ID_VOICE, 0xFF, 1); - Audio_StartSequence(SEQ_PLAYER_SFX, SEQ_ID_SFX, 0xFF, 10); + Audio_StartSequence(SEQ_PLAYER_VOICE, NA_BGM_VO, 0xFF, 1); + Audio_StartSequence(SEQ_PLAYER_SFX, NA_BGM_SE, 0xFF, 10); } void Audio_RestartSeqPlayers(void) { @@ -2857,13 +2782,13 @@ void Audio_RestartSeqPlayers(void) { s32 pad2; u16 fadeIn = 1; - Audio_StartSequence(SEQ_PLAYER_VOICE, SEQ_ID_VOICE, 0xFF, 1); + Audio_StartSequence(SEQ_PLAYER_VOICE, NA_BGM_VO, 0xFF, 1); if (sAudioSpecId == AUDIOSPEC_12) { fadeIn = 360; } else if (sAudioSpecId < AUDIOSPEC_23) { fadeIn = 90; } - Audio_StartSequence(SEQ_PLAYER_SFX, SEQ_ID_SFX, 0xFF, fadeIn); + Audio_StartSequence(SEQ_PLAYER_SFX, NA_BGM_SE, 0xFF, fadeIn); Audio_LoadInstruments(); Audio_LoadAquasSequence(); SEQCMD_SET_SEQPLAYER_VOLUME(SEQ_PLAYER_SFX, 0, 127); diff --git a/src/audio/audio_tables.c b/src/audio/audio_tables.c index 77c78a0d..21270980 100644 --- a/src/audio/audio_tables.c +++ b/src/audio/audio_tables.c @@ -38,13 +38,13 @@ AudioTableEntry gSeqTableInitEntries[66] = { { 0x18D70, 0xD40, 2, 3, 0, 0, 0 }, { SEQ_ID_FORTUNA, 0, 2, 3, 0, 0, 0 }, { SEQ_ID_TITANIA, 0, 2, 3, 0, 0, 0 }, { 0x19AB0, 0x7F0, 2, 3, 0, 0, 0 }, { 0x1A2A0, 0x1440, 2, 3, 0, 0, 0 }, { 0x1B6E0, 0x1B20, 2, 3, 0, 0, 0 }, - { SEQ_ID_ME_BOSS, 0, 2, 3, 0, 0, 0 }, { SEQ_ID_CO_BOSS_1, 0, 2, 3, 0, 0, 0 }, - { SEQ_ID_CO_BOSS_1, 0, 2, 3, 0, 0, 0 }, { SEQ_ID_ME_BOSS, 0, 2, 3, 0, 0, 0 }, - { SEQ_ID_ME_BOSS, 0, 2, 3, 0, 0, 0 }, { 0x1D200, 0x1B30, 2, 3, 0, 0, 0 }, - { SEQ_ID_CO_BOSS_1, 0, 2, 3, 0, 0, 0 }, { SEQ_ID_ME_BOSS, 0, 2, 3, 0, 0, 0 }, - { 0x1ED30, 0x10B0, 2, 3, 0, 0, 0 }, { SEQ_ID_BO_BOSS, 0, 2, 3, 0, 0, 0 }, - { SEQ_ID_ME_BOSS, 0, 2, 3, 0, 0, 0 }, { SEQ_ID_BO_BOSS, 0, 2, 3, 0, 0, 0 }, - { SEQ_ID_ME_BOSS, 0, 2, 3, 0, 0, 0 }, { 0x1FDE0, 0x1410, 2, 3, 0, 0, 0 }, + { SEQ_ID_BOSS_ME, 0, 2, 3, 0, 0, 0 }, { SEQ_ID_BOSS_CO_1, 0, 2, 3, 0, 0, 0 }, + { SEQ_ID_BOSS_CO_1, 0, 2, 3, 0, 0, 0 }, { SEQ_ID_BOSS_ME, 0, 2, 3, 0, 0, 0 }, + { SEQ_ID_BOSS_ME, 0, 2, 3, 0, 0, 0 }, { 0x1D200, 0x1B30, 2, 3, 0, 0, 0 }, + { SEQ_ID_BOSS_CO_1, 0, 2, 3, 0, 0, 0 }, { SEQ_ID_BOSS_ME, 0, 2, 3, 0, 0, 0 }, + { 0x1ED30, 0x10B0, 2, 3, 0, 0, 0 }, { SEQ_ID_BOSS_BO, 0, 2, 3, 0, 0, 0 }, + { SEQ_ID_BOSS_ME, 0, 2, 3, 0, 0, 0 }, { SEQ_ID_BOSS_BO, 0, 2, 3, 0, 0, 0 }, + { SEQ_ID_BOSS_ME, 0, 2, 3, 0, 0, 0 }, { 0x1FDE0, 0x1410, 2, 3, 0, 0, 0 }, { 0x211F0, 0xF30, 2, 3, 0, 0, 0 }, { 0x22120, 0x2B30, 2, 3, 0, 0, 0 }, { 0x24C50, 0x7F0, 2, 3, 0, 0, 0 }, { 0x25440, 0x13B0, 2, 3, 0, 0, 0 }, { 0x267F0, 0xC70, 2, 3, 0, 0, 0 }, { 0x27460, 0x180, 2, 3, 0, 0, 0 }, @@ -52,7 +52,7 @@ AudioTableEntry gSeqTableInitEntries[66] = { { 0x27BA0, 0x4E40, 2, 3, 0, 0, 0 }, { 0x2C9E0, 0x14E0, 2, 3, 0, 0, 0 }, { 0x2DEC0, 0x400, 2, 3, 0, 0, 0 }, { 0x2E2C0, 0x800, 2, 3, 0, 0, 0 }, { 0x2EAC0, 0x1AB0, 2, 3, 0, 0, 0 }, { 0x30570, 0x1AA0, 2, 3, 0, 0, 0 }, - { SEQ_ID_ME_BOSS, 0, 2, 3, 0, 0, 0 }, { 0x32010, 0x1370, 2, 3, 0, 0, 0 }, + { SEQ_ID_BOSS_ME, 0, 2, 3, 0, 0, 0 }, { 0x32010, 0x1370, 2, 3, 0, 0, 0 }, { 0x33380, 0xB80, 2, 3, 0, 0, 0 }, { 0x33F00, 0x5C0, 2, 3, 0, 0, 0 }, { SEQ_ID_CO_INTRO, 0, 2, 3, 0, 0, 0 }, { SEQ_ID_CO_INTRO, 0, 2, 3, 0, 0, 0 }, { 0x344C0, 0x550, 2, 3, 0, 0, 0 }, { 0x34A10, 0x360, 2, 3, 0, 0, 0 }, diff --git a/src/engine/fox_360.c b/src/engine/fox_360.c index 5f76df24..0bb58c2c 100644 --- a/src/engine/fox_360.c +++ b/src/engine/fox_360.c @@ -490,7 +490,7 @@ void ActorAllRange_UpdateStarWolfEvents(Actor* this) { if ((gCurrentLevel == LEVEL_VENOM_2) || (gCurrentLevel == LEVEL_BOLSE)) { gPlayer[0].camRoll = 20.0f; } - AUDIO_PLAY_BGM(SEQ_ID_STAR_WOLF | SEQ_FLAG); + AUDIO_PLAY_BGM(NA_BGM_STARWOLF); AllRange_ClearRadio(); if ((gCurrentLevel == LEVEL_FORTUNA) || (gCurrentLevel == LEVEL_VENOM_2)) { gPlayer[0].cam.eye.x = 4500.0f; diff --git a/src/engine/fox_beam.c b/src/engine/fox_beam.c index a300fa40..5f28e4eb 100644 --- a/src/engine/fox_beam.c +++ b/src/engine/fox_beam.c @@ -2245,7 +2245,7 @@ void PlayerShot_UpdateShot(PlayerShot* shot, s32 index) { } } Object_Kill(&shot->obj, shot->sfxSource); - func_effect_8007A6F0(&shot->obj.pos, NA_SE_SPREAD_EXPLSION); + func_effect_8007A6F0(&shot->obj.pos, NA_SE_SPREAD_EXPLOSION); } else if (gCurrentLevel == LEVEL_AQUAS) { Aquas_801ABA40(shot); } else { diff --git a/src/engine/fox_boss.c b/src/engine/fox_boss.c index 6fd971af..66806874 100644 --- a/src/engine/fox_boss.c +++ b/src/engine/fox_boss.c @@ -3,10 +3,8 @@ s32 gBossFrameCount; s32 D_boss_800C9E90[] = { - SEQ_ID_CO_BOSS_1 | SEQ_FLAG, SEQ_ID_ME_BOSS | SEQ_FLAG, SEQ_ID_SX_BOSS | SEQ_FLAG, SEQ_ID_A6_BOSS | SEQ_FLAG, - SEQ_ID_A6_BOSS | SEQ_FLAG, SEQ_ID_SY_BOSS | SEQ_FLAG, SEQ_ID_VE_BOSS | SEQ_FLAG, SEQ_ID_SO_BOSS | SEQ_FLAG, - SEQ_ID_ZO_BOSS | SEQ_FLAG, SEQ_ID_VE_BOSS | SEQ_FLAG, SEQ_ID_CO_BOSS_1 | SEQ_FLAG, SEQ_ID_MA_BOSS | SEQ_FLAG, - SEQ_ID_TI_BOSS | SEQ_FLAG, SEQ_ID_AQ_BOSS | SEQ_FLAG, + NA_BGM_BOSS_CO, NA_BGM_BOSS_ME, NA_BGM_BOSS_SX, NA_BGM_BOSS_A6, NA_BGM_BOSS_SB, NA_BGM_BOSS_SY, NA_BGM_BOSS_VE, + NA_BGM_BOSS_SO, NA_BGM_BOSS_ZO, NA_BGM_BOSS_VE, NA_BGM_BOSS_CO, NA_BGM_BOSS_MA, NA_BGM_BOSS_TI, NA_BGM_BOSS_AQ, }; s32 PAD_boss_C9EC4[14] = { 0 }; diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index a6165cf5..ebc2a85c 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -617,7 +617,7 @@ void Cutscene_EnterWarpZone(Player* player) { if (player->csTimer == 30) { gStarCount = 300; - AUDIO_PLAY_BGM(SEQ_ID_WARP_ZONE | SEQ_FLAG); + AUDIO_PLAY_BGM(NA_BGM_STAGE_WZ); } if (player->csTimer == 0) { @@ -813,7 +813,7 @@ void Cutscene_AllRangeMode(Player* player) { gChangeTo360 = true; if (gCurrentLevel == LEVEL_VENOM_ANDROSS) { Radio_PlayMessage(gMsg_ID_19466, RCID_FOX); - AUDIO_PLAY_BGM(SEQ_ID_AND_BRAIN | SEQ_FLAG); + AUDIO_PLAY_BGM(NA_BGM_ANDROSS_BRAIN); } else if (gCurrentLevel != LEVEL_TRAINING) { Radio_PlayMessage(gMsg_ID_20180, RCID_FOX); if (gCurrentLevel == LEVEL_SECTOR_Y) { @@ -1403,7 +1403,7 @@ void Cutscene_LevelComplete(Player* player) { Player_FloorCheck(player); } else { if (gCsFrameCount == 170) { - AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); + AUDIO_PLAY_BGM(NA_BGM_COURSE_CLEAR); } Cutscene_CoComplete2(player); Player_FloorCheck(player); diff --git a/src/engine/fox_effect.c b/src/engine/fox_effect.c index 238f71fe..3318e235 100644 --- a/src/engine/fox_effect.c +++ b/src/engine/fox_effect.c @@ -3368,7 +3368,7 @@ void func_effect_8008165C(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scal case 10: effect->timer_50 = 10; - AUDIO_PLAY_SFX(NA_SE_EN_CLBOSS_BEAM, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_A6BOSS_BEAM, effect->sfxSource, 4); break; case 11: diff --git a/src/engine/fox_enmy2.c b/src/engine/fox_enmy2.c index e24914f2..85565616 100644 --- a/src/engine/fox_enmy2.c +++ b/src/engine/fox_enmy2.c @@ -1174,10 +1174,10 @@ void ActorEvent_ProcessScript(ActorEvent* this) { if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) { if (this->unk_0B4 == EVID_86) { - Audio_PlayFanfare(SEQ_ID_KATT, 20, 10, 10); + Audio_PlayFanfare(NA_BGM_KATT, 20, 10, 10); } if (this->unk_0B4 == EVID_85) { - Audio_PlayFanfare(SEQ_ID_BILL, 20, 10, 10); + Audio_PlayFanfare(NA_BGM_BILL, 20, 10, 10); } } diff --git a/src/engine/fox_hud.c b/src/engine/fox_hud.c index 01502515..0e3fff84 100644 --- a/src/engine/fox_hud.c +++ b/src/engine/fox_hud.c @@ -5091,7 +5091,7 @@ void HUD_AquasStart(Player* player) { Aquas_801BDF14(); - AUDIO_PLAY_BGM(SEQ_ID_INTRO_45); + AUDIO_PLAY_BGM(NA_BGM_START_DEMO_M); case 3: gFillScreenAlphaStep = 16; @@ -5264,7 +5264,7 @@ void HUD_AquasStart(Player* player) { gLoadLevelObjects = 1; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); - AUDIO_PLAY_BGM(SEQ_ID_AQUAS); + AUDIO_PLAY_BGM(NA_BGM_STAGE_AQ); } Aquas_801AC8A8(player->pos.x + RAND_FLOAT_CENTERED(10.0f), player->pos.y + RAND_FLOAT_CENTERED(10.0f), @@ -5880,7 +5880,7 @@ void HUD_AquasComplete(Player* player) { break; case 400: - AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); + AUDIO_PLAY_BGM(NA_BGM_COURSE_CLEAR); break; case 440: diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index f8efcba7..a07a6f01 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -2564,7 +2564,7 @@ void Play_Init(void) { D_ctx_80177C70 = 0; gTeamHelpActor = NULL; gTeamHelpTimer = 0; - Audio_KillSfxById(NA_SE_OB_ROOT_EXPLOSION1); + Audio_KillSfxById(NA_SE_OB_ROUTE_EXPLOSION1); Audio_KillSfxById(NA_SE_DEMO_SIREN); Memory_FreeAll(); gTraining360MsgTimer = gTraining360MsgIndex = gShowBossHealth = gStarWolfMsgTimer = gAllRangeWingRepairTimer = @@ -4357,24 +4357,24 @@ void Player_Setup(Player* playerx) { player->unk_234 = 1; switch (gCurrentLevel) { case LEVEL_CORNERIA: - AUDIO_PLAY_BGM(SEQ_ID_CO_INTRO); + AUDIO_PLAY_BGM(NA_BGM_START_DEMO); break; case LEVEL_METEO: - AUDIO_PLAY_BGM(SEQ_ID_ME_INTRO); + AUDIO_PLAY_BGM(NA_BGM_ME_START_DEMO); break; case LEVEL_FORTUNA: case LEVEL_BOLSE: case LEVEL_VENOM_2: - AUDIO_PLAY_BGM(SEQ_ID_INTRO_51); + AUDIO_PLAY_BGM(NA_BGM_FO_START_DEMO); break; case LEVEL_VENOM_1: - AUDIO_PLAY_BGM(SEQ_ID_VENOM_1 | SEQ_FLAG); + AUDIO_PLAY_BGM(NA_BGM_STAGE_VE1); break; case LEVEL_KATINA: - AUDIO_PLAY_BGM(SEQ_ID_INTRO_51); + AUDIO_PLAY_BGM(NA_BGM_KA_START_DEMO); break; case LEVEL_TITANIA: - AUDIO_PLAY_BGM(SEQ_ID_INTRO_45); + AUDIO_PLAY_BGM(NA_BGM_START_DEMO_M); break; case LEVEL_ZONESS: case LEVEL_SECTOR_X: @@ -4382,7 +4382,7 @@ void Player_Setup(Player* playerx) { case LEVEL_TRAINING: case LEVEL_MACBETH: default: - AUDIO_PLAY_BGM(SEQ_ID_INTRO_44); + AUDIO_PLAY_BGM(NA_BGM_START_DEMO_S); break; case LEVEL_AREA_6: case LEVEL_SECTOR_Y: @@ -5115,7 +5115,7 @@ void Player_Down(Player* player) { if (!gVersusMode) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); - AUDIO_PLAY_BGM(SEQ_ID_DEATH); + AUDIO_PLAY_BGM(NA_BGM_PLAYER_DOWN); } if (gCurrentLevel == LEVEL_SOLAR) { Audio_KillSfxById(NA_SE_OVERHEAT_ALARM); diff --git a/src/engine/fox_tank.c b/src/engine/fox_tank.c index 9def6d08..7a27a145 100644 --- a/src/engine/fox_tank.c +++ b/src/engine/fox_tank.c @@ -330,7 +330,7 @@ void func_tank_800444BC(Player* player) { } if (gTiStartLandmaster != 0) { gTiStartLandmaster = 0; - AUDIO_PLAY_BGM(SEQ_ID_TITANIA | SEQ_FLAG); + AUDIO_PLAY_BGM(NA_BGM_STAGE_TI); Audio_StartPlayerNoise(0); } diff --git a/src/engine/fox_versus.c b/src/engine/fox_versus.c index ba25b89e..4d8f1d5e 100644 --- a/src/engine/fox_versus.c +++ b/src/engine/fox_versus.c @@ -1529,7 +1529,7 @@ bool Versus_Update(void) { case 4: if ((sStartVsHurryBgm == 1) && (sVsHurryBgmPlaying == 0)) { - AUDIO_PLAY_BGM(SEQ_ID_VS_HURRY | SEQ_FLAG); + AUDIO_PLAY_BGM(NA_BGM_BATTLE_LAST); sVsHurryBgmPlaying = 1; } @@ -1566,11 +1566,11 @@ bool Versus_Update(void) { case 2: case 3: - AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); + AUDIO_PLAY_BGM(NA_BGM_COURSE_CLEAR); break; case 99: - AUDIO_PLAY_BGM(SEQ_ID_BAD_END); + AUDIO_PLAY_BGM(NA_BGM_COURSE_FAILURE); break; default: diff --git a/src/mods/levelselect.c b/src/mods/levelselect.c index 1f8f9fbd..941b8d8f 100644 --- a/src/mods/levelselect.c +++ b/src/mods/levelselect.c @@ -83,6 +83,8 @@ void Map_LevelSelect(void) { Graphics_DisplaySmallText(80, 210, 1.0f, 1.0f, "WARP ZONE"); } else if (sCurrentPlanetId == PLANET_VENOM) { Graphics_DisplaySmallText(80, 210, 1.0f, 1.0f, "ANDROSS"); + } else if (sCurrentPlanetId == PLANET_AREA_6) { + Graphics_DisplaySmallText(80, 210, 1.0f, 1.0f, "UNKNOWN 4"); } } } @@ -96,6 +98,9 @@ void Map_LevelSelect(void) { gCurrentLevel = LEVEL_VENOM_2; } } + if (startOption && (sCurrentPlanetId == PLANET_AREA_6)) { + gCurrentLevel = LEVEL_UNK_4; + } Map_801A61B4(gCurrentLevel); D_menu_801B8280 = 0; D_menu_801CD968 = 0; diff --git a/src/mods/sfxjukebox.c b/src/mods/sfxjukebox.c index ad894ec3..1252834e 100644 --- a/src/mods/sfxjukebox.c +++ b/src/mods/sfxjukebox.c @@ -94,7 +94,7 @@ void Option_ExpertSoundUpdate(void) { if (gControllerPress[gMainController].button & B_BUTTON) { if (!D_menu_801B9320) { - AUDIO_PLAY_BGM(SEQ_ID_MENU); + AUDIO_PLAY_BGM(NA_BGM_SELECT); gDrawMode = DRAW_NONE; D_menu_801B9124 = 1000; D_menu_801B912C = 0; diff --git a/src/mods/sfxjukebox2.c b/src/mods/sfxjukebox2.c index 75840b07..22b25449 100644 --- a/src/mods/sfxjukebox2.c +++ b/src/mods/sfxjukebox2.c @@ -172,7 +172,7 @@ void Jukebox_Update(void) { if (contPress->button & B_BUTTON) { if (!D_menu_801B9320) { AUDIO_PLAY_SFX(NA_SE_ARWING_CANCEL, gDefaultSfxSource, 4); - AUDIO_PLAY_BGM(SEQ_ID_MENU); + AUDIO_PLAY_BGM(NA_BGM_SELECT); gDrawMode = DRAW_NONE; D_menu_801B9124 = 1000; D_menu_801B912C = 0; diff --git a/src/overlays/ovl_ending/fox_end2.c b/src/overlays/ovl_ending/fox_end2.c index 2e0ecb87..a62c3a35 100644 --- a/src/overlays/ovl_ending/fox_end2.c +++ b/src/overlays/ovl_ending/fox_end2.c @@ -745,7 +745,7 @@ void Ending_80190CF0(u32 arg0, AssetInfo* asset) { } if (arg0 == asset->unk_0C) { - AUDIO_PLAY_SFX(NA_SE_VO_ANDORF_LAUGH, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_LAUGH, gDefaultSfxSource, 4); } RCP_SetupDL(&gMasterDisp, asset->unk_08); @@ -1081,7 +1081,7 @@ void Ending_801926D4(void) { } else { D_ending_80198590.rightState = D_ending_80198590.leftState = WINGSTATE_INTACT; } - AUDIO_PLAY_BGM(SEQ_ID_ENDING); + AUDIO_PLAY_BGM(NA_BGM_STAFF_ROLL); } if ((2790 <= D_ending_80192E70) && (D_ending_80192E70 < 3000)) { diff --git a/src/overlays/ovl_i1/fox_co.c b/src/overlays/ovl_i1/fox_co.c index 23be8846..a37be302 100644 --- a/src/overlays/ovl_i1/fox_co.c +++ b/src/overlays/ovl_i1/fox_co.c @@ -1730,7 +1730,7 @@ void Corneria_8018C19C(Boss* boss) { boss->fwork[6] = 800.0f; boss->fwork[3] = gPlayer[0].cam.eye.z - gPathProgress - 2500.0f; boss->fwork[18] = -gArwingSpeed; - AUDIO_PLAY_BGM(SEQ_ID_CO_BOSS_2 | SEQ_FLAG); + AUDIO_PLAY_BGM(NA_BGM_BOSS_A_CARRIER); boss->timer_050 = 40; } break; @@ -3182,7 +3182,7 @@ void Corneria_LevelComplete1(Player* player) { gShowLevelClearStatusScreen = 0; break; case 240: - AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); + AUDIO_PLAY_BGM(NA_BGM_COURSE_CLEAR); break; case 330: gLevelClearScreenTimer = 100; diff --git a/src/overlays/ovl_i1/fox_ve1.c b/src/overlays/ovl_i1/fox_ve1.c index 90a66ba6..313c7fb1 100644 --- a/src/overlays/ovl_i1/fox_ve1.c +++ b/src/overlays/ovl_i1/fox_ve1.c @@ -857,7 +857,7 @@ void Venom1_Boss319_Init(Boss319* this) { } this->swork[29] = this->swork[30] = var_v0 + 100; Animation_GetFrameData(D_i1_8019ACD4[this->swork[5]], 0, this->vwork); - AUDIO_PLAY_BGM(SEQ_ID_VE_BOSS | SEQ_FLAG); + AUDIO_PLAY_BGM(NA_BGM_BOSS_VE); } bool Venom1_801937F4(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { @@ -1263,7 +1263,7 @@ void Venom1_Boss_Update(Boss* boss) { D_i1_8019B838[is4].unk_02[1] = D_i1_8019A820[spF4].unk_0C; D_i1_8019B838[is4].unk_7C |= 4; AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_S, boss->sfxSource, 4); - AUDIO_PLAY_SFX(NA_SE_EN_BMBOSS_BROKEN, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_VEBOSS_BROKEN, boss->sfxSource, 4); } is4 = D_i1_8019A820[spF4].unk_0A; if (is4 != -1) { @@ -1550,7 +1550,7 @@ void Venom1_Boss_Update(Boss* boss) { if (D_i1_8019B838[is4].unk_00 <= 0) { AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_S, boss->sfxSource, 4); - AUDIO_PLAY_SFX(NA_SE_EN_BMBOSS_BROKEN, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_VEBOSS_BROKEN, boss->sfxSource, 4); D_i1_8019B838[is4].unk_00 = -1; D_i1_8019B838[is4].unk_02[0] = 16; D_i1_8019B838[is4].unk_02[1] = 0; @@ -1570,7 +1570,7 @@ void Venom1_Boss_Update(Boss* boss) { break; case 2: if (D_i1_8019A500[boss->dmgPart] == 15) { - AUDIO_PLAY_SFX(NA_SE_EN_BMBOSS_DAMAGE, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_VEBOSS_DAMAGE, boss->sfxSource, 4); D_i1_8019B838[15].unk_02[2] = 10; D_i1_8019B838[15].unk_02[3] = 0; D_i1_8019B838[15].unk_7C |= 0x80; @@ -1606,7 +1606,7 @@ void Venom1_Boss_Update(Boss* boss) { D_i1_8019B838[is4].unk_02[1] = 0; D_i1_8019B838[is4].unk_7C |= 0xC; AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_S, boss->sfxSource, 4); - AUDIO_PLAY_SFX(NA_SE_EN_BMBOSS_BROKEN, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_VEBOSS_BROKEN, boss->sfxSource, 4); } else if (is4 == 14) { D_i1_8019B838[is4].unk_7C |= 8; } @@ -1619,7 +1619,7 @@ void Venom1_Boss_Update(Boss* boss) { if (((gGameFrameCount % 4) == 0) && (boss->timer_05A == 0)) { for (spF4 = 0; spF4 < 33U; spF4++) { if ((D_i1_8019A500[spF4] == 15) && (D_i1_8019B7F0[spF4] != 0)) { - AUDIO_PLAY_SFX(NA_SE_EN_BMBOSS_DAMAGE, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_VEBOSS_DAMAGE, boss->sfxSource, 4); D_i1_8019B838[15].unk_02[3] = 10; D_i1_8019B838[15].unk_02[4] = 0; D_i1_8019B838[15].unk_7C |= 0x80; @@ -1721,7 +1721,7 @@ void Venom1_Boss_Update(Boss* boss) { boss->swork[10] = 16; gCameraShake = 40; boss->swork[23] = RAND_FLOAT(5.0f); - AUDIO_PLAY_SFX(NA_SE_OB_BMBOSS_LAND, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_VEBOSS_LAND, boss->sfxSource, 4); spB8 = 3; boss->swork[28] = 5; } @@ -1787,13 +1787,13 @@ void Venom1_Boss_Update(Boss* boss) { switch (boss->swork[27]) { case 0: if (boss->fwork[10] > 14.0f) { - AUDIO_PLAY_SFX(NA_SE_OB_BMBOSS_WALK, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_VEBOSS_WALK, boss->sfxSource, 4); boss->swork[27]++; } break; case 1: if (boss->fwork[10] > 45.0f) { - AUDIO_PLAY_SFX(NA_SE_OB_BMBOSS_WALK, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_VEBOSS_WALK, boss->sfxSource, 4); boss->swork[27]++; } break; @@ -1832,7 +1832,7 @@ void Venom1_Boss_Update(Boss* boss) { case 122: gCameraShake = 20; boss->swork[28] = 7; - AUDIO_PLAY_SFX(NA_SE_OB_BMBOSS_BOUND, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_VEBOSS_BOUND, boss->sfxSource, 4); D_i1_8019B838[2].unk_60 = 5.0f; D_i1_8019B838[2].unk_7C |= 0x800; D_i1_8019B838[5].unk_7C |= 0x800; @@ -1848,7 +1848,7 @@ void Venom1_Boss_Update(Boss* boss) { case 118: gCameraShake = 30; boss->swork[28] = 7; - AUDIO_PLAY_SFX(NA_SE_OB_BMBOSS_BOUND, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_VEBOSS_BOUND, boss->sfxSource, 4); D_i1_8019B838[8].unk_7C |= 0x800; D_i1_8019B838[8].unk_60 = 10.0f; break; @@ -1857,11 +1857,11 @@ void Venom1_Boss_Update(Boss* boss) { break; case 91: boss->swork[28] = 7; - AUDIO_PLAY_SFX(NA_SE_OB_BMBOSS_BOUND, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_VEBOSS_BOUND, boss->sfxSource, 4); break; case 78: boss->swork[28] = 7; - AUDIO_PLAY_SFX(NA_SE_OB_BMBOSS_BOUND, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_VEBOSS_BOUND, boss->sfxSource, 4); gCameraShake = 20; D_i1_8019B838[10].unk_7C |= 0x800; D_i1_8019B838[10].unk_60 = 10.0f; @@ -1871,7 +1871,7 @@ void Venom1_Boss_Update(Boss* boss) { break; case 66: boss->swork[28] = 7; - AUDIO_PLAY_SFX(NA_SE_OB_BMBOSS_BOUND, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_VEBOSS_BOUND, boss->sfxSource, 4); D_i1_8019B838[11].unk_7C |= 0x20; break; case 65: @@ -1913,7 +1913,7 @@ void Venom1_Boss_Update(Boss* boss) { Boss_AwardBonus(boss); gShowBossHealth = 0; boss->swork[28] = 9; - AUDIO_PLAY_SFX(NA_SE_OB_BMBOSS_BOUND, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_VEBOSS_BOUND, boss->sfxSource, 4); boss->swork[26] = 1; boss->info.hitbox = gNoHitbox; boss->unk_05E = 0; @@ -1938,7 +1938,7 @@ void Venom1_Boss_Update(Boss* boss) { boss->swork[11] |= 1; break; case 1: - AUDIO_PLAY_SFX(NA_SE_OB_BMBOSS_ATTACK, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_VEBOSS_ATTACK, boss->sfxSource, 4); gCameraShake = 40; boss->swork[28] = 5; spB8 = spB4 = 1; @@ -1956,7 +1956,7 @@ void Venom1_Boss_Update(Boss* boss) { break; case 1: spB4 = 1; - AUDIO_PLAY_SFX(NA_SE_OB_BMBOSS_ATTACK, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_VEBOSS_ATTACK, boss->sfxSource, 4); gCameraShake = 40; boss->swork[28] = 5; spB8 = 2; @@ -2149,7 +2149,7 @@ void Venom1_Boss_Update(Boss* boss) { } break; case 4: - AUDIO_PLAY_SFX(NA_SE_OB_BMBOSS_JUMP, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_VEBOSS_JUMP, boss->sfxSource, 4); boss->swork[7] = 1; boss->fwork[10] = 0; boss->gravity = 0; diff --git a/src/overlays/ovl_i2/fox_me.c b/src/overlays/ovl_i2/fox_me.c index de223a4e..3a02b9f1 100644 --- a/src/overlays/ovl_i2/fox_me.c +++ b/src/overlays/ovl_i2/fox_me.c @@ -447,7 +447,7 @@ void Meteo_80188344(Boss* boss) { boss->info.cullDistance = 1000.0f; Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_GRN_BEAM_CHARGE); - AUDIO_PLAY_SFX(NA_SE_EN_ASBOSS_SHIELD, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MEBOSS_SHIELD, boss->sfxSource, 4); } break; @@ -1326,7 +1326,7 @@ void Meteo_8018978C(Boss* boss) { } if (gCsFrameCount == 400) { - AUDIO_PLAY_BGM(SEQ_ID_BOSS_RESUME | SEQ_FLAG); + AUDIO_PLAY_BGM(NA_BGM_REAL_BOSS); if (gTeamShields[TEAM_ID_FALCO] > 0) { Radio_PlayMessage(gMsg_ID_3345, RCID_BOSS_METEO); } else { @@ -2274,7 +2274,7 @@ void Meteo_LevelComplete(Player* player) { Math_SmoothStepToF(&D_ctx_80177A48[3], 1.0f, 1.0f, 0.01f, 0.0f); } if (player->csTimer == 50) { - AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); + AUDIO_PLAY_BGM(NA_BGM_COURSE_CLEAR); } Math_SmoothStepToF(&D_ctx_80177A48[1], 1080.0f, 0.01f, D_ctx_80177A48[3], 0.0f); diff --git a/src/overlays/ovl_i2/fox_sx.c b/src/overlays/ovl_i2/fox_sx.c index ccdfd779..3ee43587 100644 --- a/src/overlays/ovl_i2/fox_sx.c +++ b/src/overlays/ovl_i2/fox_sx.c @@ -1787,7 +1787,7 @@ void SectorX_LevelComplete(Player* player) { break; case 30: - AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); + AUDIO_PLAY_BGM(NA_BGM_COURSE_CLEAR); break; case 60: diff --git a/src/overlays/ovl_i3/fox_a6.c b/src/overlays/ovl_i3/fox_a6.c index 17f943ec..c73fb361 100644 --- a/src/overlays/ovl_i3/fox_a6.c +++ b/src/overlays/ovl_i3/fox_a6.c @@ -1050,7 +1050,7 @@ void Area6_Boss_Update(Boss* bossA6) { bossA6->state = 3; if (D_i3_801C2250[A6_BSS_6] == 0) { - AUDIO_PLAY_BGM(SEQ_ID_A6_BOSS | SEQ_FLAG); + AUDIO_PLAY_BGM(NA_BGM_BOSS_A6); } } } else if (bossA6->swork[A6_SWK_38] != 0) { @@ -1068,7 +1068,7 @@ void Area6_Boss_Update(Boss* bossA6) { case 5: if (bossA6->timer_050 == 1) { Area6_80187704(); - AUDIO_PLAY_SFX(NA_SE_EN_CLBOSS_CHARGE, bossA6->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_A6BOSS_CHARGE, bossA6->sfxSource, 4); D_i3_801C2250[A6_BSS_33] = 120; } @@ -2381,14 +2381,14 @@ void Area6_LevelStart(Player* player) { player->csState = 0; player->csTimer = 0; - AUDIO_PLAY_BGM(SEQ_ID_AREA_6 | SEQ_FLAG); + AUDIO_PLAY_BGM(NA_BGM_STAGE_A6); player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; } break; } switch (gCsFrameCount) { case 280: - AUDIO_PLAY_BGM(SEQ_ID_INTRO_51); + AUDIO_PLAY_BGM(NA_BGM_A6_START_DEMO); break; case 40: Radio_PlayMessage(gMsg_ID_7005, RCID_CAIMAN_AREA6); @@ -2758,7 +2758,7 @@ void Area6_LevelComplete(Player* player) { } switch (gCsFrameCount) { case 380: - AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); + AUDIO_PLAY_BGM(NA_BGM_COURSE_CLEAR); break; case 550: gLevelClearScreenTimer = 100; diff --git a/src/overlays/ovl_i3/fox_aq.c b/src/overlays/ovl_i3/fox_aq.c index 569be961..1928ddf8 100644 --- a/src/overlays/ovl_i3/fox_aq.c +++ b/src/overlays/ovl_i3/fox_aq.c @@ -2555,7 +2555,7 @@ void Aquas_Boss_Update(Boss* bossAQ) { if (fabsf(bossAQ->obj.pos.z - gPlayer[0].trueZpos) <= 3000.0f) { D_i3_801C4190[6] = 1; bossAQ->timer_056 = 20; - Audio_PlaySequence(SEQ_PLAYER_BGM, SEQ_ID_AQ_BOSS | SEQ_FLAG, 0, 1); + Audio_PlaySequence(SEQ_PLAYER_BGM, NA_BGM_BOSS_AQ, 0, 1); bossAQ->state = 1; } break; @@ -3673,7 +3673,7 @@ void Aquas_801B50E8(Actor* actor) { } actor->health = 0; actor->state = 7; - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_AC_ZAKO_DOWN); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_AQ_ZAKO_DOWN); } switch (actor->state) { @@ -3999,7 +3999,7 @@ void Aquas_801B638C(Actor* actor) { Actor_Despawn(actor); Object_Kill(&actor->obj, actor->sfxSource); AUDIO_PLAY_SFX(NA_SE_OB_MINI_BOMB, actor->sfxSource, 4); - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_AC_ZAKO_DOWN); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_AQ_ZAKO_DOWN); } actor->fwork[5] = (actor->obj.pos.y * 0.01f) + 2.5f; @@ -4120,7 +4120,7 @@ void Aquas_801B638C(Actor* actor) { if ((actor->health != 0) && (actor->dmgPart == 0)) { actor->health -= actor->damage; actor->timer_0C6 = 30; - AUDIO_PLAY_SFX(NA_SE_EN_AC_ZAKO_DAMAGE, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_AQ_ZAKO_DAMAGE, actor->sfxSource, 4); if (actor->health <= 0) { actor->health = 0; BonusText_Display(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 200.0f, 3); @@ -4173,7 +4173,7 @@ void Aquas_801B6FF8(Actor* actor) { func_effect_8007D0E0(actor->vwork[i].x, actor->vwork[i].y, actor->vwork[i].z + 100.0f, 6.0f); } Object_Kill(&actor->obj, actor->sfxSource); - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_AC_ZAKO_DOWN); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_AQ_ZAKO_DOWN); } switch (actor->state) { @@ -4255,7 +4255,7 @@ void Aquas_801B6FF8(Actor* actor) { actor->hitPos.y + RAND_FLOAT_CENTERED(70.0f), actor->hitPos.z + RAND_FLOAT_CENTERED(70.0f), 1.0f, 1); } - AUDIO_PLAY_SFX(NA_SE_EN_AC_ZAKO_DAMAGE, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_AQ_ZAKO_DAMAGE, actor->sfxSource, 4); if (actor->health <= -100) { actor->health = -100; BonusText_Display(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 200.0f, 3); @@ -4419,7 +4419,7 @@ void Aquas_801B7C78(Actor* actor) { actor->itemDrop = DROP_SILVER_RING_25p; Actor_Despawn(actor); Object_Kill(&actor->obj, actor->sfxSource); - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_AC_ZAKO_DOWN); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_AQ_ZAKO_DOWN); } if (actor->state != 6) { @@ -4668,7 +4668,7 @@ void Aquas_801B7C78(Actor* actor) { actor->info.bonus = 1; actor->timer_0C6 = 30; actor->health -= actor->damage; - AUDIO_PLAY_SFX(NA_SE_EN_AC_ZAKO_DAMAGE, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_AQ_ZAKO_DAMAGE, actor->sfxSource, 4); } else { actor->timer_0BC = 50; } @@ -4834,7 +4834,7 @@ void Aquas_801B91A4(Actor* actor) { func_effect_800815DC(); func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 5.0f); - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_AC_ZAKO_DOWN); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_AQ_ZAKO_DOWN); } switch (actor->state) { @@ -4963,7 +4963,7 @@ void Aquas_801B91A4(Actor* actor) { if ((actor->health != 0) && (actor->state != 0)) { actor->timer_0C6 = 15; actor->health -= actor->damage; - AUDIO_PLAY_SFX(NA_SE_EN_AC_ZAKO_DAMAGE, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_AQ_ZAKO_DAMAGE, actor->sfxSource, 4); if (actor->health <= 0) { actor->health = 0; if (actor->scale > 1.0f) { @@ -5167,7 +5167,7 @@ void Aquas_801BA6A4(Actor* actor) { actor->vel.x = SIN_DEG(actor->fwork[1]) * 10.0f; if (actor->obj.pos.y < (gGroundHeight + 30.0f)) { - AUDIO_PLAY_SFX(NA_SE_OB_AC_ROCK_BOUND, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_AQ_ROCK_BOUND, actor->sfxSource, 4); actor->iwork[1] = 1; actor->vel.x = actor->vel.y = actor->vel.z = 0.0f; actor->gravity = 0.0f; @@ -5196,7 +5196,7 @@ void Aquas_801BA6A4(Actor* actor) { actor->vel.y = 0.0f; } actor->iwork[1] = 1; - AUDIO_PLAY_SFX(NA_SE_OB_AC_ROCK_BOUND, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_AQ_ROCK_BOUND, actor->sfxSource, 4); func_effect_8007B8F8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 100.0f, actor->scale * 30.0f); } @@ -5740,7 +5740,7 @@ void Aquas_801BB79C(Actor* actor) { if (actor->dmgType != DMG_NONE) { actor->dmgType = DMG_NONE; - AUDIO_PLAY_SFX(NA_SE_EN_AC_ZAKO_DAMAGE, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_AQ_ZAKO_DAMAGE, actor->sfxSource, 4); if (actor->damage != 31) { actor->timer_0C0 = actor->timer_0C6 = 40; } else { @@ -5965,7 +5965,7 @@ void Aquas_801BC9A0(Actor* actor) { actor->itemDrop = D_i3_801C04C4[actor->iwork[1]]; Actor_Despawn(actor); Object_Kill(&actor->obj, actor->sfxSource); - func_effect_8007A6F0(&actor->obj.pos, NA_SE_OB_AC_PILLAR_BROKE); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_OB_AQ_PILLAR_BROKE); } break; @@ -5981,7 +5981,7 @@ void Aquas_801BC9A0(Actor* actor) { if ((actor->obj.pos.y < (gGroundHeight + 30.0f)) && (actor->iwork[2] == 0)) { actor->iwork[2] = 1; actor->vel.x = actor->vel.y = actor->vel.z = actor->gravity = 0.0f; - func_effect_8007A6F0(&actor->obj.pos, NA_SE_OB_AC_ROCK_BOUND); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_OB_AQ_ROCK_BOUND); for (j = 0; j < 6; j++) { func_effect_8007B8F8(actor->obj.pos.x + RAND_FLOAT_CENTERED(100.0f), actor->obj.pos.y + RAND_RANGE(-9.0f, 21.0f), diff --git a/src/overlays/ovl_i3/fox_so.c b/src/overlays/ovl_i3/fox_so.c index 47a10c3d..06b04394 100644 --- a/src/overlays/ovl_i3/fox_so.c +++ b/src/overlays/ovl_i3/fox_so.c @@ -330,7 +330,7 @@ void Solar_8019EF30(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yV if (gBossActive != 0) { actor->info.bonus = 0; } - AUDIO_PLAY_SFX(NA_SE_OB_SNROCK_APPEAR, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_SOROCK_APPEAR, actor->sfxSource, 0); } void Solar_8019F038(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel) { @@ -361,7 +361,7 @@ void Solar_8019F0B0(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yV if (gBossActive != 0) { actor->info.bonus = 0; } - AUDIO_PLAY_SFX(NA_SE_OB_SNROCK_APPEAR, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_SOROCK_APPEAR, actor->sfxSource, 0); } void Solar_8019F194(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel) { @@ -426,13 +426,13 @@ void Solar_8019F20C(Actor* actor) { RAND_FLOAT(10.0f) + 10.0f, 0.0f, actor->scale * 5.0f, 1); } actor->timer_0C2 = 5; - AUDIO_PLAY_SFX(NA_SE_OB_SNROCK_APPEAR, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_SOROCK_APPEAR, actor->sfxSource, 0); break; case 2: actor->gravity = 0.5f; if (Play_CheckDynaFloorCollision(&sp8C, &sp88, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z)) { Object_Kill(&actor->obj, actor->sfxSource); - func_effect_8007A6F0(&actor->obj.pos, NA_SE_OB_SNROCK_DISAPPEAR); + func_effect_8007A6F0(&actor->obj.pos, NA_SE_OB_SOROCK_DISAPPEAR); for (i = 0; i < 4; i++) { Solar_8019E9F4(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, D_i3_801BF8E0[i], RAND_FLOAT(10.0f) + 10.0f, 0.0f, actor->scale * 5.0f, 1); @@ -808,12 +808,12 @@ void Solar_801A0120(Effect* effect) { if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) { func_effect_8007A774(&gPlayer[0], effect, effect->scale2 * 18.0f); if ((effect->unk_4C == 0) && ((effect->scale2 >= 9.8f) || (effect->scale2 <= 4.4f))) { - AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_BREATH, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_BREATH, effect->sfxSource, 4); } } else { effect->vel.z += 65.0f; if (fabsf(gBosses[0].obj.pos.z - effect->obj.pos.z) >= 2000.0f) { - Audio_KillSfxBySourceAndId(effect->sfxSource, NA_SE_EN_SNBOSS_BREATH); + Audio_KillSfxBySourceAndId(effect->sfxSource, NA_SE_EN_SOBOSS_BREATH); } } break; @@ -832,10 +832,10 @@ void Solar_801A0120(Effect* effect) { if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) { func_effect_8007A774(&gPlayer[0], effect, effect->scale2 * 18.0f); if ((effect->unk_4C == 0) && ((effect->scale2 >= 9.8f) || (effect->scale2 <= 4.4f))) { - AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_BREATH, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_BREATH, effect->sfxSource, 4); } } else if (fabsf(gBosses[0].obj.pos.z - effect->obj.pos.z) >= 2000.0f) { - Audio_KillSfxBySourceAndId(effect->sfxSource, NA_SE_EN_SNBOSS_BREATH); + Audio_KillSfxBySourceAndId(effect->sfxSource, NA_SE_EN_SOBOSS_BREATH); } break; } @@ -1056,7 +1056,7 @@ void Solar_LevelStart(Player* player) { gCsCamAtZ = -3000.0f; gCsCamEyeZ = -3400.0f; Audio_KillSfxBySourceAndId(player->sfxSource, NA_SE_OB_MAGMA_BUBBLE); - AUDIO_PLAY_BGM(SEQ_ID_INTRO_51); + AUDIO_PLAY_BGM(NA_BGM_SO_START_DEMO); func_display_80057814(player); Audio_StartPlayerNoise(gPlayerNum); D_ctx_80177A48[0] = 0.01f; @@ -1117,7 +1117,7 @@ void Solar_LevelStart(Player* player) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; } if (gFillScreenAlpha == 255) { - AUDIO_PLAY_BGM(SEQ_ID_SOLAR | SEQ_FLAG); + AUDIO_PLAY_BGM(NA_BGM_STAGE_SO); player->pos.z = 0.0f; player->baseSpeed = gArwingSpeed; Play_ClearObjectData(); @@ -1263,7 +1263,7 @@ void Solar_801A1F80(Boss* bossSO) { gFogBlue--; } if (gBossFrameCount == 30) { - AUDIO_PLAY_BGM(SEQ_ID_SO_BOSS | SEQ_FLAG); + AUDIO_PLAY_BGM(NA_BGM_BOSS_SO); } if (gBossFrameCount <= 60) { Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 120.0f, 1.0f, 3.5f, 0.0f); @@ -1334,7 +1334,7 @@ void Solar_801A23F4(Boss* bossSO) { AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, bossSO->sfxSource, 4); } if (bossSO->unk_04C == 80) { - AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_SWING, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_SWING, bossSO->sfxSource, 4); } if (bossSO->unk_04C >= 94) { bossSO->info.hitbox[38] = 220.0f; @@ -1361,7 +1361,7 @@ void Solar_801A23F4(Boss* bossSO) { AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, bossSO->sfxSource, 4); } if (bossSO->unk_04C == 50) { - AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_SWING, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_SWING, bossSO->sfxSource, 4); } if (bossSO->unk_04C >= 85) { bossSO->info.hitbox[20] = 220.0f; @@ -1411,10 +1411,10 @@ void Solar_801A23F4(Boss* bossSO) { } if (bossSO->obj.rot.y >= 360.0f) { bossSO->obj.rot.y -= 360.0f; - AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_ROLL, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_ROLL, bossSO->sfxSource, 4); } if (bossSO->unk_04C == 1) { - AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_ROLL, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_ROLL, bossSO->sfxSource, 4); } if (bossSO->unk_04C >= 100) { Math_SmoothStepToAngle(&bossSO->obj.rot.y, 0.0f, 1.0f, 2.0f, 1.0f); @@ -1453,7 +1453,7 @@ void Solar_801A23F4(Boss* bossSO) { AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, bossSO->sfxSource, 4); } if (bossSO->unk_04C == 20) { - AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_SWING, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_SWING, bossSO->sfxSource, 4); } if (bossSO->unk_04C > 36) { bossSO->info.hitbox[20] = 220.0f; @@ -1657,7 +1657,7 @@ void Solar_801A3510(Boss* bossSO) { AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, bossSO->sfxSource, 4); } if (bossSO->unk_04C == 80) { - AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_SWING, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_SWING, bossSO->sfxSource, 4); } if (bossSO->unk_04C == 94) { Solar_801A0DF8(bossSO->fwork[SO_FWK_13], bossSO->fwork[SO_FWK_15], RAND_FLOAT_CENTERED(60.0f), 4, 2.0f); @@ -1675,7 +1675,7 @@ void Solar_801A3510(Boss* bossSO) { AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, bossSO->sfxSource, 4); } if (bossSO->unk_04C == 50) { - AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_SWING, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_SWING, bossSO->sfxSource, 4); } if (bossSO->unk_04C == 60) { Solar_801A0D90(bossSO->obj.pos.x, bossSO->obj.pos.z + 1600.0f, 80.0f, 2); @@ -1703,7 +1703,7 @@ void Solar_801A3510(Boss* bossSO) { break; case 8: if (bossSO->unk_04C == 65) { - AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_BREATH, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_BREATH, bossSO->sfxSource, 4); bossSO->timer_050 = 30; } if (bossSO->timer_050 != 0) { @@ -1716,7 +1716,7 @@ void Solar_801A3510(Boss* bossSO) { bossSO->fwork[SO_FWK_6] + 300.0f); } if (bossSO->unk_04C == 75) { - Audio_KillSfxBySourceAndId(bossSO->sfxSource, NA_SE_EN_SNBOSS_BREATH); + Audio_KillSfxBySourceAndId(bossSO->sfxSource, NA_SE_EN_SOBOSS_BREATH); } if (bossSO->unk_04C == 99) { bossSO->swork[SO_SWK_1] = 5; @@ -1726,7 +1726,7 @@ void Solar_801A3510(Boss* bossSO) { case 9: bossSO->unk_04C++; if (bossSO->unk_04C == 66) { - AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_BREATH, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_BREATH, bossSO->sfxSource, 4); bossSO->timer_050 = 30; } if (bossSO->timer_050 != 0) { @@ -1741,7 +1741,7 @@ void Solar_801A3510(Boss* bossSO) { bossSO->fwork[SO_FWK_6] + 300.0f); } if (bossSO->unk_04C == 76) { - Audio_KillSfxBySourceAndId(bossSO->sfxSource, NA_SE_EN_SNBOSS_BREATH); + Audio_KillSfxBySourceAndId(bossSO->sfxSource, NA_SE_EN_SOBOSS_BREATH); } if (bossSO->unk_04C >= 99) { Solar_801A30CC(bossSO); @@ -1767,13 +1767,13 @@ void Solar_801A3C4C(Boss* bossSO) { bossSO->swork[SO_SWK_10] = 20; if (bossSO->health > 0.0f) { - AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_DAMAGE, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_DAMAGE, bossSO->sfxSource, 4); } if (bossSO) {} } bossSO->timer_058 = 20; if ((bossSO->dmgPart >= 1) && (bossSO->dmgPart <= 3) && (bossSO->swork[SO_SWK_2] != 0)) { - AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_DAMAGE, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_DAMAGE, bossSO->sfxSource, 4); bossSO->swork[SO_SWK_2] -= bossSO->damage; if (bossSO->swork[SO_SWK_2] < 0) { bossSO->swork[SO_SWK_2] = 0; @@ -1789,7 +1789,7 @@ void Solar_801A3C4C(Boss* bossSO) { } } if ((bossSO->dmgPart >= 4) && (bossSO->dmgPart <= 6) && (bossSO->swork[SO_SWK_3] != 0)) { - AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_DAMAGE, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_DAMAGE, bossSO->sfxSource, 4); bossSO->swork[SO_SWK_3] -= bossSO->damage; if (bossSO->swork[SO_SWK_3] < 0) { bossSO->swork[SO_SWK_3] = 0; @@ -1882,7 +1882,7 @@ void Solar_801A4214(Boss* bossSO) { bossSO->unk_04C = 50; bossSO->state++; gShowBossHealth = false; - AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_DOWN, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_DOWN, bossSO->sfxSource, 4); Solar_801A1E14(bossSO->fwork[SO_FWK_4], bossSO->fwork[SO_FWK_5] + 300.0f, bossSO->fwork[SO_FWK_6], bossSO->fwork[SO_FWK_1], bossSO->fwork[SO_FWK_2], 73.0f, RAND_FLOAT_CENTERED(50.0f), 80.0f, 40.0f, 8); @@ -1972,7 +1972,7 @@ void Solar_801A4214(Boss* bossSO) { void Solar_801A48B8(Boss* bossSO) { s32 i; - AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_BROKEN, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_BROKEN, bossSO->sfxSource, 4); gControllerRumbleFlags[gMainController] = 1; gControllerRumbleTimers[gMainController] = 10; if (bossSO->swork[SO_SWK_0] != 6) { @@ -2027,11 +2027,11 @@ void Solar_801A4A34(Boss* bossSO) { } switch (bossSO->unk_04C) { case 30: - AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_DAMAGE, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_DAMAGE, bossSO->sfxSource, 4); /* fallthrough */ case 35: case 97: - AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_BROKEN, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_BROKEN, bossSO->sfxSource, 4); break; } if (bossSO->unk_04C == 119) { @@ -2071,13 +2071,13 @@ void Solar_801A4EF8(Boss* bossSO) { bossSO->unk_04C = 56; } if (bossSO->obj.rot.y == 0.0f) { - AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_ROLL, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_ROLL, bossSO->sfxSource, 4); } bossSO->fwork[SO_FWK_31] += 0.5f; bossSO->obj.rot.y += bossSO->fwork[SO_FWK_31]; if (bossSO->obj.rot.y >= 360.0f) { bossSO->obj.rot.y -= 360.0f; - AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_ROLL, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_ROLL, bossSO->sfxSource, 4); } bossSO->unk_078.y = bossSO->obj.rot.y; break; @@ -2086,7 +2086,7 @@ void Solar_801A4EF8(Boss* bossSO) { bossSO->unk_04C = 56; if (bossSO->obj.rot.y >= 360.0f) { bossSO->obj.rot.y -= 360.0f; - AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_ROLL, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_ROLL, bossSO->sfxSource, 4); } if (bossSO->swork[SO_SWK_11] <= 45) { Math_SmoothStepToF(&bossSO->obj.pos.y, -1000.0f, 0.1f, 20.0f, 0.1f); @@ -2134,7 +2134,7 @@ void Solar_801A4EF8(Boss* bossSO) { bossSO->unk_04C = 98; bossSO->unk_078.y += bossSO->fwork[SO_FWK_31]; if (bossSO->swork[SO_SWK_11] == 170) { - AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_CRY, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_CRY, bossSO->sfxSource, 4); bossSO->obj.pos.y = -500.0f; gActors[9].dmgType = DMG_EXPLOSION; } @@ -2383,7 +2383,7 @@ void Solar_Boss_Update(Boss* bossSO) { case 0: bossSO->unk_04C++; if (bossSO->unk_04C == 75) { - AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_CRY, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_CRY, bossSO->sfxSource, 4); } if (bossSO->unk_04C >= Animation_GetFrameCount(&D_SO_601388C)) { if (bossSO->health != 0) { @@ -2429,7 +2429,7 @@ void Solar_Boss_Update(Boss* bossSO) { case 9: bossSO->unk_04C++; if ((bossSO->unk_04C == 45) && (bossSO->health != 0)) { - AUDIO_PLAY_SFX(NA_SE_EN_SNBOSS_CRY, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_CRY, bossSO->sfxSource, 4); } if (bossSO->unk_04C >= Animation_GetFrameCount(&D_SO_6012C00)) { bossSO->unk_04C = 0; @@ -2905,7 +2905,7 @@ void Solar_LevelComplete(Player* player) { player->csState++; player->wings.modelId = 1; Audio_StartPlayerNoise(0); - AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); + AUDIO_PLAY_BGM(NA_BGM_COURSE_CLEAR); D_ctx_80177A98 = 1; Play_ClearObjectData(); D_ctx_80177A48[1] = 0.0f; diff --git a/src/overlays/ovl_i3/fox_zo.c b/src/overlays/ovl_i3/fox_zo.c index b1f71137..5df4aa0b 100644 --- a/src/overlays/ovl_i3/fox_zo.c +++ b/src/overlays/ovl_i3/fox_zo.c @@ -2095,7 +2095,7 @@ void Zoness_Boss_Update(Boss* bossZO) { sp100 = 5.0f; spFC = 3.0f; if (sZoSwork[ZO_BSS_55] == 0) { - AUDIO_PLAY_BGM(SEQ_ID_ZO_BOSS | SEQ_FLAG); + AUDIO_PLAY_BGM(NA_BGM_BOSS_ZO); sZoSwork[ZO_BSS_55] = 1; } func_effect_8008377C(sZoFwork[ZO_BSF_43_X], sp134, sZoFwork[ZO_BSF_43_Z] + 100.0f, 5.0f, 3.0f); @@ -4484,7 +4484,7 @@ void Zoness_LevelStart(Player* player) { } gControllerHold[gMainController].button = sp2C; if (gCsFrameCount >= 270) { - AUDIO_PLAY_BGM(SEQ_ID_ZONESS | SEQ_FLAG); + AUDIO_PLAY_BGM(NA_BGM_STAGE_ZO); gLevelStartStatusScreenTimer = 80; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->csState = 0; @@ -4582,7 +4582,7 @@ void Zoness_LevelComplete(Player* player) { player->pos.z = -(gPathProgress + 1500.0f); player->csState++; Audio_StartPlayerNoise(0); - AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); + AUDIO_PLAY_BGM(NA_BGM_COURSE_CLEAR); D_ctx_80177A98 = 1; Play_ClearObjectData(); Solar_801A7750(); diff --git a/src/overlays/ovl_i4/fox_bo.c b/src/overlays/ovl_i4/fox_bo.c index 2ca391f2..cafcd16a 100644 --- a/src/overlays/ovl_i4/fox_bo.c +++ b/src/overlays/ovl_i4/fox_bo.c @@ -269,7 +269,7 @@ void Bolse_UpdateEventHandler(Actor* this) { } AllRange_ClearRadio(); this->state = 6; - AUDIO_PLAY_SFX(NA_SE_EN_ANDORF_EXPLOSION, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_EXPLOSION, this->sfxSource, 0); AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, this->sfxSource, 4); gScreenFlashTimer = 8; @@ -286,7 +286,7 @@ void Bolse_UpdateEventHandler(Actor* this) { this->state = 10; this->timer_0BC = 150; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_STANDBY; - AUDIO_PLAY_BGM(SEQ_ID_BO_BOSS | SEQ_FLAG); + AUDIO_PLAY_BGM(NA_BGM_BOSS_BO); AllRange_ClearRadio(); gPlayer[0].cam.eye.x = 400.0f; gPlayer[0].cam.eye.y = 50.0f; @@ -1453,7 +1453,7 @@ void Bolse_LevelComplete(Player* player) { gGroundHeight = -10000.0f; player->unk_240 = 1; player->wings.modelId = 1; - AUDIO_PLAY_SFX(NA_SE_EN_ANDORF_EXPLOSION, actor50->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_EXPLOSION, actor50->sfxSource, 0); Audio_StartPlayerNoise(0); } break; @@ -1492,7 +1492,7 @@ void Bolse_LevelComplete(Player* player) { switch (gCsFrameCount) { case 160: - AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); + AUDIO_PLAY_BGM(NA_BGM_COURSE_CLEAR); break; case 92: diff --git a/src/overlays/ovl_i4/fox_fo.c b/src/overlays/ovl_i4/fox_fo.c index 1b05ec23..f78dc4d0 100644 --- a/src/overlays/ovl_i4/fox_fo.c +++ b/src/overlays/ovl_i4/fox_fo.c @@ -150,7 +150,7 @@ void Fortuna_UpdateEvents(Actor* actor) { if (gAllRangeEventTimer == 8540) { Radio_PlayMessage(gMsg_ID_9400, RCID_ROB64); - Audio_PlaySequence(SEQ_PLAYER_BGM, SEQ_ID_FORTUNA | SEQ_FLAG, 0, 0); + Audio_PlaySequence(SEQ_PLAYER_BGM, NA_BGM_STAGE_FO, 0, 0); gActors[1].aiIndex = gActors[2].aiIndex = gActors[3].aiIndex = gActors[4].aiIndex = gActors[5].aiIndex = gActors[6].aiIndex = gActors[7].aiIndex = -1; } @@ -872,9 +872,9 @@ void Fortuna_LevelComplete(Player* player) { if (gCsFrameCount == 200) { if (gMissionStatus == MISSION_COMPLETE) { - AUDIO_PLAY_BGM(SEQ_ID_BAD_END); + AUDIO_PLAY_BGM(NA_BGM_COURSE_FAILURE); } else { - AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); + AUDIO_PLAY_BGM(NA_BGM_COURSE_CLEAR); } } @@ -1192,7 +1192,7 @@ void Fortuna_LevelComplete(Player* player) { switch (gCsFrameCount) { case 140: - AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); + AUDIO_PLAY_BGM(NA_BGM_COURSE_CLEAR); break; case 450: gLevelClearScreenTimer = 100; diff --git a/src/overlays/ovl_i4/fox_ka.c b/src/overlays/ovl_i4/fox_ka.c index b4994917..5c0f4564 100644 --- a/src/overlays/ovl_i4/fox_ka.c +++ b/src/overlays/ovl_i4/fox_ka.c @@ -887,7 +887,7 @@ void Katina_BossUpdate(Saucerer* this) { Radio_PlayMessage(gMsg_ID_18030, RCID_BILL); - AUDIO_PLAY_SFX(NA_SE_KT_UFO_ENGINE, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_KA_UFO_ENGINE, this->sfxSource, 0); } } break; @@ -994,7 +994,7 @@ void Katina_BossUpdate(Saucerer* this) { if (this->timer_050 == 0) { this->state++; this->timer_050 = 60; - AUDIO_PLAY_SFX(NA_SE_KT_UFO_HATCH_OPEN, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_KA_UFO_HATCH_OPEN, this->sfxSource, 0); this->fwork[BOSS_HATCH_1_ANGLE_TARGET] = 30.0f; this->fwork[BOSS_HATCH_2_ANGLE_TARGET] = 30.0f; this->fwork[BOSS_HATCH_3_ANGLE_TARGET] = 30.0f; @@ -1010,7 +1010,7 @@ void Katina_BossUpdate(Saucerer* this) { this->state++; this->timer_050 = 100; this->timer_052 = 310; - AUDIO_PLAY_SFX(NA_SE_KT_UFO_HATCH_STOP, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_KA_UFO_HATCH_STOP, this->sfxSource, 0); } break; @@ -1020,7 +1020,7 @@ void Katina_BossUpdate(Saucerer* this) { */ case 5: if (this->timer_050 == 1) { - AUDIO_PLAY_BGM(SEQ_ID_KA_BOSS | SEQ_FLAG); + AUDIO_PLAY_BGM(NA_BGM_BOSS_KA); } if ((this->timer_050 == 0) && ((this->timer_052 % 16) == 0)) { @@ -1028,7 +1028,7 @@ void Katina_BossUpdate(Saucerer* this) { } if (this->timer_052 == 0) { - AUDIO_PLAY_SFX(NA_SE_KT_UFO_HATCH_CLOSE, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_KA_UFO_HATCH_CLOSE, this->sfxSource, 0); this->state++; @@ -1067,7 +1067,7 @@ void Katina_BossUpdate(Saucerer* this) { */ case 6: if (this->timer_052 == 1) { - AUDIO_PLAY_SFX(NA_SE_KT_UFO_HATCH_STOP, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_KA_UFO_HATCH_STOP, this->sfxSource, 0); } if (this->timer_050 == 0) { @@ -1082,7 +1082,7 @@ void Katina_BossUpdate(Saucerer* this) { this->state = 7; this->timer_050 = 300; - AUDIO_PLAY_SFX(NA_SE_KT_UFO_HATCH_OPEN, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_KA_UFO_HATCH_OPEN, this->sfxSource, 0); this->fwork[BOSS_Y_ROT_SPEED_TARGET] = 0.0f; this->fwork[BOSS_HATCH_4_ANGLE_TARGET] = 30.0f; @@ -1106,7 +1106,7 @@ void Katina_BossUpdate(Saucerer* this) { } if (this->timer_050 == 240) { - AUDIO_PLAY_SFX(NA_SE_KT_UFO_HATCH_STOP, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_KA_UFO_HATCH_STOP, this->sfxSource, 0); } if (this->timer_050 == 0) { @@ -1117,7 +1117,7 @@ void Katina_BossUpdate(Saucerer* this) { this->fwork[BOSS_HATCH_1_ANGLE_TARGET] = 0.0f; this->timer_056 = 1920; this->timer_052 = 70; - AUDIO_PLAY_SFX(NA_SE_KT_UFO_HATCH_CLOSE, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_KA_UFO_HATCH_CLOSE, this->sfxSource, 0); } break; @@ -1127,8 +1127,8 @@ void Katina_BossUpdate(Saucerer* this) { case 10: if (this->timer_050 == 0) { this->fwork[BOSS_CORE_TARGET_LEVEL] = 200.0f; - AUDIO_PLAY_SFX(NA_SE_KT_UFO_CORE_OPEN, this->sfxSource, 0); - Audio_KillSfxBySourceAndId(this->sfxSource, NA_SE_KT_UFO_ENGINE); + AUDIO_PLAY_SFX(NA_SE_KA_UFO_CORE_OPEN, this->sfxSource, 0); + Audio_KillSfxBySourceAndId(this->sfxSource, NA_SE_KA_UFO_ENGINE); this->state = 11; this->timer_050 = 100; Radio_PlayMessage(gMsg_ID_18050, RCID_BILL); @@ -1145,11 +1145,11 @@ void Katina_BossUpdate(Saucerer* this) { */ case 11: if (this->timer_050 == 0) { - AUDIO_PLAY_SFX(NA_SE_KT_UFO_HATCH_STOP, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_KA_UFO_HATCH_STOP, this->sfxSource, 0); this->state = 12; this->timer_050 = 1928; Radio_PlayMessage(gMsg_ID_18055, RCID_BILL); - AUDIO_PLAY_SFX(NA_SE_KT_UFO_LONG_CHARGE, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_KA_UFO_LONG_CHARGE, this->sfxSource, 0); } break; @@ -1252,8 +1252,8 @@ void Katina_BossUpdate(Saucerer* this) { D_i4_801A0558 = 50.0f; D_i4_801A0554 = 50.0f; - Audio_KillSfxBySourceAndId(this->sfxSource, NA_SE_KT_UFO_LONG_CHARGE); - AUDIO_PLAY_SFX(NA_SE_KT_UFO_LAST_CHARGE, this->sfxSource, 0); + Audio_KillSfxBySourceAndId(this->sfxSource, NA_SE_KA_UFO_LONG_CHARGE); + AUDIO_PLAY_SFX(NA_SE_KA_UFO_LAST_CHARGE, this->sfxSource, 0); } break; @@ -1309,7 +1309,7 @@ void Katina_BossUpdate(Saucerer* this) { i = gGameFrameCount % 64U; Object_Kill(&gEffects[i].obj, gEffects[i].sfxSource); func_effect_8007B344(this->obj.pos.x, this->obj.pos.y - 600.0f, this->obj.pos.z, 90.0f, 0); - AUDIO_PLAY_SFX(NA_SE_KT_UFO_BEAM, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_KA_UFO_BEAM, this->sfxSource, 0); } if (this->timer_052 == 690) { @@ -1419,7 +1419,7 @@ void Katina_BossUpdate(Saucerer* this) { this->obj.pos.x = -4000.0f; this->unk_078.z = 7.0f; - AUDIO_PLAY_SFX(NA_SE_KT_UFO_FALLING, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_KA_UFO_FALLING, this->sfxSource, 0); for (i = 0; i < ARRAY_COUNT(gEffects); i++) { Object_Kill(&gEffects[i].obj, gEffects[i].sfxSource); @@ -1437,7 +1437,7 @@ void Katina_BossUpdate(Saucerer* this) { this->obj.pos.z += this->unk_078.z; if (this->timer_050 == 820) { - AUDIO_PLAY_SFX(NA_SE_KT_UFO_BOUND, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_KA_UFO_BOUND, this->sfxSource, 0); } if (this->timer_050 > 820) { @@ -1914,9 +1914,9 @@ void Katina_LevelComplete(Player* player) { Audio_StartPlayerNoise(0); if (gMissionStatus != MISSION_COMPLETE) { - AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); + AUDIO_PLAY_BGM(NA_BGM_COURSE_CLEAR); } else { - AUDIO_PLAY_BGM(SEQ_ID_BAD_END); + AUDIO_PLAY_BGM(NA_BGM_COURSE_FAILURE); } D_ctx_80177A98 = 0; @@ -2273,7 +2273,7 @@ void Katina_UpdateEvents(ActorAllRange* this) { gBosses[KA_BOSS_MOTHERSHIP].obj.pos.z = 0.0f; gBosses[KA_BOSS_MOTHERSHIP].obj.pos.y = 2000.0f; - AUDIO_PLAY_SFX(NA_SE_KT_UFO_ENGINE, gBosses[KA_BOSS_MOTHERSHIP].sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_KA_UFO_ENGINE, gBosses[KA_BOSS_MOTHERSHIP].sfxSource, 0); gAllRangeEventTimer = 20000; @@ -2281,7 +2281,7 @@ void Katina_UpdateEvents(ActorAllRange* this) { gKaKilledAlly = 1; - AUDIO_PLAY_BGM(SEQ_ID_KA_BOSS | SEQ_FLAG); + AUDIO_PLAY_BGM(NA_BGM_BOSS_KA); } Katina_BillFighterInit(); diff --git a/src/overlays/ovl_i4/fox_sz.c b/src/overlays/ovl_i4/fox_sz.c index 3a4b6ce7..b7187235 100644 --- a/src/overlays/ovl_i4/fox_sz.c +++ b/src/overlays/ovl_i4/fox_sz.c @@ -258,7 +258,7 @@ void SectorZ_8019A2F4(Actor* actor) { actor->state = 3; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_STANDBY; - Audio_PlayFanfare(SEQ_ID_KATT, 20, 10, 10); + Audio_PlayFanfare(NA_BGM_KATT, 20, 10, 10); AllRange_ClearRadio(); gPlayer[0].cam.eye.x = 250.0f; @@ -443,7 +443,7 @@ void SectorZ_8019A3E8(Actor* actor) { actor->timer_0BC = 10000; gFillScreenAlpha = gFillScreenAlphaTarget = 255; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; - AUDIO_PLAY_BGM(SEQ_ID_SZ_BOSS | SEQ_FLAG); + AUDIO_PLAY_BGM(NA_BGM_BOSS_SZ); break; } @@ -875,7 +875,7 @@ void SectorZ_LevelStart(Player* player) { player->pos.y = actor->obj.pos.y - 480.0f; player->pos.z = actor->obj.pos.z; - AUDIO_PLAY_BGM(SEQ_ID_INTRO_51); + AUDIO_PLAY_BGM(NA_BGM_SZ_START_DEMO); } break; @@ -1204,7 +1204,7 @@ void SectorZ_LevelComplete(Player* player) { Math_SmoothStepToF(&boss0->fwork[3], 0.7f, 1.0f, 0.7f, 0.0f); if ((gCsFrameCount == 100) && gGreatFoxIntact) { - AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); + AUDIO_PLAY_BGM(NA_BGM_COURSE_CLEAR); } if ((gCsFrameCount == 210) && gGreatFoxIntact) { @@ -1487,7 +1487,7 @@ void SectorZ_LevelComplete(Player* player) { if (gGreatFoxIntact) { gMissionStatus = MISSION_ACCOMPLISHED; } else { - AUDIO_PLAY_BGM(SEQ_ID_BAD_END); + AUDIO_PLAY_BGM(NA_BGM_COURSE_FAILURE); gMissionStatus = MISSION_COMPLETE; } break; diff --git a/src/overlays/ovl_i5/fox_ma.c b/src/overlays/ovl_i5/fox_ma.c index b3f97a4e..b7a58af0 100644 --- a/src/overlays/ovl_i5/fox_ma.c +++ b/src/overlays/ovl_i5/fox_ma.c @@ -2785,14 +2785,14 @@ void Macbeth_801A3E98(Actor* actor) { case 0: if ((actor->dmgType != DMG_NONE) && (actor->dmgType != DMG_COLLISION)) { actor->dmgType = DMG_NONE; - AUDIO_PLAY_SFX(NA_SE_OB_MC_SWITCH_ON, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_MA_SWITCH_ON, actor->sfxSource, 0); actor->state = 1; } break; case 1: Math_SmoothStepToF(&actor->fwork[1], -181.0f, 0.6f, 20.0f, 0.0f); if (actor->fwork[1] <= -180.0f) { - AUDIO_PLAY_SFX(NA_SE_OB_MC_SWITCH_UP, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_MA_SWITCH_UP, actor->sfxSource, 0); actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_603648C); actor->iwork[0] = 2; actor->state = 2; @@ -2820,9 +2820,9 @@ void Macbeth_801A3E98(Actor* actor) { Math_SmoothStepToF(&actor->fwork[4], 30.0f, 0.4f, 10.0f, 0.0f); if (actor->fwork[0] < 31.0f) { if (actor->state >= 3) { - AUDIO_PLAY_SFX(NA_SE_OB_MC_SWITCH_GRN, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_MA_SWITCH_GRN, actor->sfxSource, 0); } else { - AUDIO_PLAY_SFX(NA_SE_OB_MC_SWITCH_RED, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_MA_SWITCH_RED, actor->sfxSource, 0); } actor->fwork[0] = 255.0f; actor->fwork[4] = 170.0f; @@ -3813,7 +3813,7 @@ void Macbeth_801A7E7C(Actor* actor) { Macbeth_8019A830(actor); Macbeth_8019A728(actor); if (actor->iwork[1] != 0) { - AUDIO_PLAY_BGM(SEQ_ID_MA_BOSS | SEQ_FLAG); + AUDIO_PLAY_BGM(NA_BGM_BOSS_MA); actor->state = 1; } Macbeth_801A6984(actor); @@ -3917,7 +3917,7 @@ void Macbeth_801A7E7C(Actor* actor) { D_i5_801BE320[2] = 5; D_i5_801BE320[31] = 30; actor->timer_0BC = 100; - AUDIO_PLAY_SFX(NA_SE_EN_MCBOSS_CHARGE0, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MABOSS_CHARGE0, actor->sfxSource, 4); actor->state = 12; } } else if ((D_i5_801BE320[26] != 0) && (D_i5_801BE320[10] > 0)) { @@ -4035,7 +4035,7 @@ void Macbeth_801A7E7C(Actor* actor) { case 8: Macbeth_8019A198(actor); if (((gGameFrameCount % 16) == 0)) { - AUDIO_PLAY_SFX(NA_SE_EN_MCBOSS_RAGE, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MABOSS_RAGE, actor->sfxSource, 4); } Macbeth_801A74C4(actor); Macbeth_801A6984(actor); @@ -4235,7 +4235,7 @@ void Macbeth_801A7E7C(Actor* actor) { Macbeth_801A72DC(actor); Macbeth_801A6984(actor); if (D_i5_801BE320[9] <= 0) { - Audio_KillSfxBySourceAndId(actor->sfxSource, NA_SE_EN_MCBOSS_CHARGE0); + Audio_KillSfxBySourceAndId(actor->sfxSource, NA_SE_EN_MABOSS_CHARGE0); actor->state = 14; actor->vel.y = -20.0f; } @@ -4255,7 +4255,7 @@ void Macbeth_801A7E7C(Actor* actor) { } } if (actor->timer_0BC == 0) { - Audio_KillSfxBySourceAndId(actor->sfxSource, NA_SE_EN_MCBOSS_CHARGE0); + Audio_KillSfxBySourceAndId(actor->sfxSource, NA_SE_EN_MABOSS_CHARGE0); D_i5_801BE320[3] = 0; D_i5_801BE320[2] = 6; D_i5_801BE320[31] = 30; @@ -4277,7 +4277,7 @@ void Macbeth_801A7E7C(Actor* actor) { D_i5_801BE320[5] = 0; D_i5_801BE320[7] = 0; if (actor->timer_0BC == 60) { - AUDIO_PLAY_SFX(NA_SE_EN_MCBOSS_SHOT0, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MABOSS_SHOT0, actor->sfxSource, 4); D_i5_801BE320[24] = 0; spC6 = RAND_INT(5.0f); @@ -4334,7 +4334,7 @@ void Macbeth_801A7E7C(Actor* actor) { Macbeth_801A6984(actor); if (actor->timer_0BC < 100) { if (actor->timer_0BC == 98) { - AUDIO_PLAY_SFX(NA_SE_EN_MCBOSS_PLATECHARGE, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MABOSS_PLATECHARGE, actor->sfxSource, 4); } Matrix_RotateY(gCalcMatrix, RAND_FLOAT(2.0f) * (M_DTOR * 180.0f), MTXF_NEW); sp360.x = 0.0f; @@ -4366,7 +4366,7 @@ void Macbeth_801A7E7C(Actor* actor) { } actor->timer_0BC = D_i5_801BE320[27]; actor->state = 16; - Audio_KillSfxBySourceAndId(actor->sfxSource, NA_SE_EN_MCBOSS_PLATECHARGE); + Audio_KillSfxBySourceAndId(actor->sfxSource, NA_SE_EN_MABOSS_PLATECHARGE); } break; case 16: @@ -4870,7 +4870,7 @@ void Macbeth_801AC438(Actor* actor) { Macbeth_8019A728(actor); if (actor->iwork[1] != 0) { Radio_PlayMessage(gMsg_ID_17420, RCID_BOSS_MACBETH); - AUDIO_PLAY_SFX(NA_SE_EN_MCBOSS_HATCH, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MABOSS_HATCH, actor->sfxSource, 4); actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_6035A94); actor->state += 1; } @@ -5010,7 +5010,7 @@ void Macbeth_LevelStart(Player* player) { } break; case 3: - AUDIO_PLAY_BGM(SEQ_ID_MACBETH | SEQ_FLAG); + AUDIO_PLAY_BGM(NA_BGM_STAGE_MA); gLevelStartStatusScreenTimer = 50; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->csState = player->csTimer = player->csEventTimer = player->unk_240 = 0; @@ -6324,7 +6324,7 @@ void Macbeth_LevelComplete2(Player* player) { D_ctx_80177A48[5] = 360.0f; break; case 910: - AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); + AUDIO_PLAY_BGM(NA_BGM_COURSE_CLEAR); break; case 1040: Radio_PlayMessage(gMsg_ID_20010, RCID_FOX); @@ -6914,7 +6914,7 @@ void Macbeth_LevelComplete1(Player* player) { gShowLevelClearStatusScreen = 0; break; case 50: - AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); + AUDIO_PLAY_BGM(NA_BGM_COURSE_CLEAR); break; case 100: gLevelClearScreenTimer = 100; diff --git a/src/overlays/ovl_i5/fox_ti.c b/src/overlays/ovl_i5/fox_ti.c index 1be30cf1..6153e7e8 100644 --- a/src/overlays/ovl_i5/fox_ti.c +++ b/src/overlays/ovl_i5/fox_ti.c @@ -626,7 +626,7 @@ void Titania_8018AB44(Actor* actor) { switch (actor->dmgType) { case 1: - AUDIO_PLAY_SFX(NA_SE_EN_MCBOSS_REFLECT, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MABOSS_REFLECT, actor->sfxSource, 4); break; case 2: @@ -3187,7 +3187,7 @@ void Titania_80192118(Boss* boss) { D_i5_801BBEF0[38] = 2; gPlayer[0].unk_19C = 0; boss->swork[1] = 3; - AUDIO_PLAY_BGM(SEQ_ID_TI_BOSS | SEQ_FLAG); + AUDIO_PLAY_BGM(NA_BGM_BOSS_TI); } break; case 3: diff --git a/src/overlays/ovl_i5/fox_ti_cs.c b/src/overlays/ovl_i5/fox_ti_cs.c index c3302c7d..4f0ce0c9 100644 --- a/src/overlays/ovl_i5/fox_ti_cs.c +++ b/src/overlays/ovl_i5/fox_ti_cs.c @@ -424,7 +424,7 @@ void Titania_LevelComplete(Player* player) { break; case 50: - AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); + AUDIO_PLAY_BGM(NA_BGM_COURSE_CLEAR); break; case 80: diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index 2fb560da..b200d8b7 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -434,8 +434,8 @@ void Andross_80188A4C(Boss* boss) { D_ctx_80177A48[0] = 0.0f; D_ctx_80177A48[1] = 0.1f; gCsFrameCount = 0; - Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_ANDORF_BRAIN); - Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_ANDORF_CATCH); + Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_ANDROSS_BRAIN); + Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_ANDROSS_CATCH); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); } @@ -450,7 +450,7 @@ void Andross_80188A4C(Boss* boss) { boss->timer_050 = 50; boss->fwork[3] = gPlayer[0].pos.x; boss->fwork[5] = gPlayer[0].trueZpos; - AUDIO_PLAY_SFX(NA_SE_EN_ANDORF_WARP, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_WARP, boss->sfxSource, 4); } } break; @@ -638,7 +638,7 @@ void Andross_80189470(Actor* actor) { if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 500.0f) && (fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 500.0f)) { - Audio_KillSfxById(NA_SE_OB_ROOT_EXPLOSION1); + Audio_KillSfxById(NA_SE_OB_ROUTE_EXPLOSION1); Audio_SetEnvSfxReverb(0); gCurrentLevel = LEVEL_VENOM_2; gLevelPhase = 1; @@ -775,7 +775,7 @@ void Andross_80189B70(Boss* boss) { (fabsf(boss->obj.pos.z - gPlayer[0].trueZpos) < 300.0f) && (boss->state < 11) && (boss->timer_05A == 0)) { boss->state = 11; boss->timer_050 = 150; - AUDIO_PLAY_SFX(NA_SE_EN_ANDORF_CATCH, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_CATCH, boss->sfxSource, 4); } switch (boss->state) { @@ -787,7 +787,7 @@ void Andross_80189B70(Boss* boss) { Andross_80189098(boss); boss->swork[5] = 300; boss->state++; - AUDIO_PLAY_SFX(NA_SE_EN_ANDORF_BRAIN, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_BRAIN, boss->sfxSource, 4); boss->fwork[21] = 255.0f; boss->fwork[22] = 255.0f; boss->fwork[23] = 0.0f; @@ -858,7 +858,7 @@ void Andross_80189B70(Boss* boss) { gPlayer[0].cockpitView = true; Math_SmoothStepToF(&D_display_800CA230, 0.15f, 0.2f, 0.004f, 0.0f); if (boss->timer_050 == 120) { - AUDIO_PLAY_SFX(NA_SE_VO_ANDORF_LAUGH, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_LAUGH, boss->sfxSource, 4); } if (boss->timer_050 == 0) { gPlayer[0].baseSpeed = gArwingSpeed; @@ -872,7 +872,7 @@ void Andross_80189B70(Boss* boss) { } else { boss->state = 3; } - Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_ANDORF_CATCH); + Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_ANDROSS_CATCH); } break; case 3: @@ -899,7 +899,7 @@ void Andross_80189B70(Boss* boss) { boss->obj.pos.z = boss->fwork[5] + sp64.z; boss->unk_078.y = Math_RadToDeg(Math_Atan2F(xDisplacement, zDisplacement)); boss->state = 13; - AUDIO_PLAY_SFX(NA_SE_VO_ANDORF_LAUGH, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_LAUGH, boss->sfxSource, 4); boss->timer_054 = 90; } break; @@ -1021,7 +1021,7 @@ void Andross_80189B70(Boss* boss) { Camera_Update360(gPlayer, 1); Audio_StartPlayerNoise(0); AUDIO_PLAY_BGM(D_boss_800C9E90[gCurrentLevel]); - AUDIO_PLAY_SFX(NA_SE_OB_ROOT_EXPLOSION1, gDefaultSfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_ROUTE_EXPLOSION1, gDefaultSfxSource, 0); D_ctx_80177CA4 = gHitCount; break; @@ -1118,10 +1118,10 @@ void Andross_80189B70(Boss* boss) { if (boss->swork[5] != 0) { boss->swork[5]--; if (boss->swork[5] == 0) { - AUDIO_PLAY_SFX(NA_SE_EN_ANDORF_EYE, gActors[10].sfxSource, 4); - AUDIO_PLAY_SFX(NA_SE_EN_ANDORF_EYE, gActors[11].sfxSource, 4); - AUDIO_PLAY_SFX(NA_SE_EN_ANDORF_SPARK, gActors[10].sfxSource, 4); - AUDIO_PLAY_SFX(NA_SE_EN_ANDORF_SPARK, gActors[11].sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_EYE, gActors[10].sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_EYE, gActors[11].sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_SPARK, gActors[10].sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_SPARK, gActors[11].sfxSource, 4); } gActors[10].obj.pos.x = boss->obj.pos.x + 200.0f; gActors[10].obj.pos.y = boss->obj.pos.y - 200.0f; @@ -1577,7 +1577,7 @@ void Andross_Boss320_Init(Boss320* this) { D_ctx_80177AB0 = 1; this->info.hitbox[16] = 200.0f; this->info.hitbox[22] = 200.0f; - Audio_PlaySequence(SEQ_PLAYER_BGM, SEQ_ID_AND_BOSS | SEQ_FLAG, 0, 0); + Audio_PlaySequence(SEQ_PLAYER_BGM, NA_BGM_BOSS_ANDROSS, 0, 0); } void Andross_8018D2B0(Boss* boss) { @@ -1594,9 +1594,9 @@ void Andross_8018D2B0(Boss* boss) { if (boss->health <= 0) { gScreenFlashTimer = 8; AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, boss->sfxSource, 4); - AUDIO_PLAY_SFX(NA_SE_EN_ANDORF_EXPLOSION, boss->sfxSource, 4); - AUDIO_PLAY_SFX(NA_SE_VO_ANDORF_DEATH, boss->sfxSource, 4); - Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_ANDORF_ROBOT); + AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_EXPLOSION, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_DEATH, boss->sfxSource, 4); + Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_ANDROSS_ROBOT); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); boss->state = 31; @@ -1609,7 +1609,7 @@ void Andross_8018D2B0(Boss* boss) { AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, boss->sfxSource, 4); } } else if (boss->health <= 0) { - AUDIO_PLAY_SFX(NA_SE_VO_ANDORF_DEATH, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_DEATH, boss->sfxSource, 4); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); if (gLevelPhase == 0) { @@ -1639,7 +1639,7 @@ void Andross_8018D2B0(Boss* boss) { boss->timer_050 = 120; boss->unk_04C = 0; boss->fwork[9] = 0.0f; - AUDIO_PLAY_SFX(NA_SE_VO_ANDORF_GROAN, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_GROAN, boss->sfxSource, 4); } } break; @@ -1654,7 +1654,7 @@ void Andross_8018D2B0(Boss* boss) { boss->timer_050 = 120; boss->unk_04C = 0; boss->fwork[9] = 0.0f; - AUDIO_PLAY_SFX(NA_SE_VO_ANDORF_GROAN, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_GROAN, boss->sfxSource, 4); } } break; @@ -1899,7 +1899,7 @@ void Andross_8018DBF0(Boss* boss) { case 1: boss->timer_05A = 100; if (boss->timer_054 == 65) { - AUDIO_PLAY_SFX(NA_SE_VO_ANDORF_LAUGH, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_LAUGH, boss->sfxSource, 4); } if (boss->timer_050 != 0) { boss->fwork[6] = -3000.0f; @@ -1969,7 +1969,7 @@ void Andross_8018DBF0(Boss* boss) { boss->fwork[0] = player->pos.x; boss->fwork[3] = player->pos.y + 1000.0f; if (boss->unk_04C == 60) { - AUDIO_PLAY_SFX(NA_SE_VO_ANDORF_PUNCH, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_PUNCH, boss->sfxSource, 4); } if (boss->unk_04C > 60) { if (boss->unk_04C == 76) { @@ -2017,7 +2017,7 @@ void Andross_8018DBF0(Boss* boss) { boss->fwork[0] = player->pos.x; boss->fwork[3] = player->pos.y; if (boss->unk_04C == 55) { - AUDIO_PLAY_SFX(NA_SE_VO_ANDORF_PUNCH, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_PUNCH, boss->sfxSource, 4); } if (boss->unk_04C > 55) { boss->fwork[6] = -1500.0f; @@ -2072,7 +2072,7 @@ void Andross_8018DBF0(Boss* boss) { Math_SmoothStepToF(&boss->fwork[1], 2.0f, 1.0f, 1.0f, 0); Math_SmoothStepToF(&boss->fwork[4], 2.0f, 1.0f, 1.0f, 0); if (boss->unk_04C == 5) { - AUDIO_PLAY_SFX(NA_SE_VO_ANDORF_SLAP, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_SLAP, boss->sfxSource, 4); } boss->swork[7] = 1; boss->fwork[14] = 100.0f; @@ -2090,7 +2090,7 @@ void Andross_8018DBF0(Boss* boss) { Andross_8018D9C0(boss); } else { if (boss->timer_050 == 1) { - AUDIO_PLAY_SFX(NA_SE_VO_ANDORF_WHAND, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_WHAND, boss->sfxSource, 4); } if (boss->timer_050 != 0) { boss->fwork[6] = -4000.0f; @@ -2135,7 +2135,7 @@ void Andross_8018DBF0(Boss* boss) { Andross_8018D9C0(boss); } else { if (boss->unk_04C == 48) { - AUDIO_PLAY_SFX(NA_SE_EN_ANDORF_SPARK, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_SPARK, boss->sfxSource, 4); } if (boss->unk_04C > 48) { Andross_8018D0D8(boss); @@ -2268,10 +2268,10 @@ void Andross_8018DBF0(Boss* boss) { boss->fwork[3] = 0.0f; Math_SmoothStepToF(&boss->fwork[9], 1.0f, 1.0f, 0.01f, 0); if (boss->unk_04C == 15) { - AUDIO_PLAY_SFX(NA_SE_EN_ANDORF_BITE0, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_BITE0, boss->sfxSource, 4); } if ((boss->unk_04C > 35) && (boss->unk_04C < 150) && ((boss->unk_04C % 32) == 0)) { - AUDIO_PLAY_SFX(NA_SE_EN_ANDORF_BITE1, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_BITE1, boss->sfxSource, 4); if (player->state_1C8 == PLAYERSTATE_1C8_ANDROSS_MOUTH) { gControllerRumbleTimers[0] = 10; } @@ -2329,7 +2329,7 @@ void Andross_8018DBF0(Boss* boss) { limbCount = Animation_GetFrameData(&D_ANDROSS_C023B54, boss->unk_04C, spD0); Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, boss->fwork[9], 100.0f, 0.0f); if (boss->unk_04C == 10) { - AUDIO_PLAY_SFX(NA_SE_EN_ANDORF_VOMIT, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_VOMIT, boss->sfxSource, 4); } if ((boss->unk_04C == 13) && (player->state_1C8 == PLAYERSTATE_1C8_ANDROSS_MOUTH)) { player->unk_234 = 1; @@ -2391,7 +2391,7 @@ void Andross_8018DBF0(Boss* boss) { boss->fwork[9] = 0.2f; boss->unk_04C = 0; boss->swork[8] = 2; - AUDIO_PLAY_SFX(NA_SE_VO_ANDORF_CHOKE, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_CHOKE, boss->sfxSource, 4); break; } } @@ -2436,7 +2436,7 @@ void Andross_8018DBF0(Boss* boss) { Math_SmoothStepToF(&boss->fwork[7], 20.0f, 0.1f, 0.1f, 0); Math_SmoothStepToF(&boss->fwork[9], 1.0f, 1.0f, 0.01f, 0); if (boss->unk_04C == 10) { - AUDIO_PLAY_SFX(NA_SE_EN_ANDORF_BREATH, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_BREATH, boss->sfxSource, 4); } boss->unk_04C++; if (boss->unk_04C >= Animation_GetFrameCount(&D_ANDROSS_C0240D0)) { @@ -2484,7 +2484,7 @@ void Andross_8018DBF0(Boss* boss) { boss->unk_044 = 2; boss->timer_050 = 70; boss->fwork[9] = 0.0f; - AUDIO_PLAY_SFX(NA_SE_VO_ANDORF_EXCITE, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_EXCITE, boss->sfxSource, 4); } if (boss->timer_050 == 15) { boss->swork[10] = 80; @@ -2581,8 +2581,8 @@ void Andross_8018DBF0(Boss* boss) { boss->health = 100; boss->timer_050 = 50; boss->fwork[9] = 0.0f; - AUDIO_PLAY_SFX(NA_SE_EN_ANDORF_ROBOT, boss->sfxSource, 4); - AUDIO_PLAY_BGM(SEQ_ID_AND_BOSS | SEQ_FLAG); + AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_ROBOT, boss->sfxSource, 4); + AUDIO_PLAY_BGM(NA_BGM_BOSS_ANDROSS); break; } break; @@ -2793,10 +2793,10 @@ void Andross_8018DBF0(Boss* boss) { boss->info.hitbox[9] = boss->vwork[3].y - boss->obj.pos.y; boss->info.hitbox[11] = boss->vwork[3].x - boss->obj.pos.x; if ((initialstate == 17) && (boss->state != 17)) { - Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_ANDORF_BREATH); + Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_ANDROSS_BREATH); } if ((initialstate == 7) && (boss->state != 7)) { - Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_ANDORF_SPARK); + Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_ANDROSS_SPARK); } } @@ -3554,7 +3554,7 @@ void Andross_80193C4C(Player* player) { sp68.y = RAND_FLOAT_CENTERED(150.0f); sp68.z = 0.0f; if (gCsFrameCount == 50) { - AUDIO_PLAY_SFX(NA_SE_OB_ROOT_EXPLOSION0, player->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_ROUTE_EXPLOSION0, player->sfxSource, 0); Audio_SetEnvSfxReverb(0); } if (gCsFrameCount > 40) { @@ -3632,7 +3632,7 @@ void Andross_80193C4C(Player* player) { AUDIO_PLAY_SFX(NA_SE_WARP_HOLE, gDefaultSfxSource, 0); break; case 340: - Audio_KillSfxBySourceAndId(player->sfxSource, NA_SE_OB_ROOT_EXPLOSION0); + Audio_KillSfxBySourceAndId(player->sfxSource, NA_SE_OB_ROUTE_EXPLOSION0); Audio_SetEnvSfxReverb(0); gVenomHardClear = 0; gBlurAlpha = 255; @@ -3702,7 +3702,7 @@ void Andross_80193C4C(Player* player) { } if (gCsFrameCount == 70) { - AUDIO_PLAY_BGM(SEQ_ID_VE_CLEAR | SEQ_FLAG); + AUDIO_PLAY_BGM(NA_BGM_ALL_CLEAR); } if (gCsFrameCount == 150) { player->csState++; diff --git a/src/overlays/ovl_i6/fox_sy.c b/src/overlays/ovl_i6/fox_sy.c index 3d63126d..91134c16 100644 --- a/src/overlays/ovl_i6/fox_sy.c +++ b/src/overlays/ovl_i6/fox_sy.c @@ -989,7 +989,7 @@ void SectorY_8019AEEC(Boss* boss) { if ((boss->obj.pos.y != 365.0f) && (boss->swork[21] != 1)) { if (boss->unk_04A != 0) { if (boss->unk_04A == 1) { - Audio_PlaySequence(SEQ_PLAYER_BGM, SEQ_ID_BOSS_RESUME | SEQ_FLAG, 0, 0); + Audio_PlaySequence(SEQ_PLAYER_BGM, NA_BGM_REAL_BOSS, 0, 0); boss->unk_04A++; gPlayer[0].cam.eye.x = 0.0f; gPlayer[0].cam.eye.y = 200.0f; @@ -2136,7 +2136,7 @@ void SectorY_LevelComplete(Player* player) { player->pos.z = 0.0f; player->csState++; Audio_StartPlayerNoise(0); - AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); + AUDIO_PLAY_BGM(NA_BGM_COURSE_CLEAR); D_ctx_80177A98 = 0; for (i = 0; i < 200; i++) { @@ -3042,7 +3042,7 @@ void SectorY_801A0AC0(Player* player) { break; case 360: - AUDIO_PLAY_BGM(SEQ_ID_INTRO_44); + AUDIO_PLAY_BGM(NA_BGM_START_DEMO_S); break; case 389: @@ -3349,7 +3349,7 @@ void SectorY_801A0AC0(Player* player) { D_ctx_80177A48[0] = 1.0f; player->pos.z = player->trueZpos = 0.0f; player->baseSpeed = gArwingSpeed; - AUDIO_PLAY_BGM(SEQ_ID_SECTOR_Y | SEQ_FLAG); + AUDIO_PLAY_BGM(NA_BGM_STAGE_SY); gLevelStartStatusScreenTimer = 100; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->csState = 0; diff --git a/src/overlays/ovl_i6/fox_ve2.c b/src/overlays/ovl_i6/fox_ve2.c index ebaa5205..07f5f14a 100644 --- a/src/overlays/ovl_i6/fox_ve2.c +++ b/src/overlays/ovl_i6/fox_ve2.c @@ -432,7 +432,7 @@ void Venom2_LevelComplete(Player* player) { } if (player->csEventTimer == 150) { Radio_PlayMessage(gMsg_ID_8215, RCID_FOX); - AUDIO_PLAY_BGM(SEQ_ID_TO_ANDROSS | SEQ_FLAG); + AUDIO_PLAY_BGM(NA_BGM_DASH_INTO_BASE); } if (player->csEventTimer == 1) { if ((gTeamShields[TEAM_ID_SLIPPY] > 0) || (gTeamShields[TEAM_ID_FALCO] > 0) || diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index ca8b6cae..e7ee3712 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -1363,7 +1363,7 @@ void Map_8019E99C(void) { D_menu_801CEA6C = 0.0f; D_menu_801CEA70 = 0.002f; - AUDIO_PLAY_BGM(SEQ_ID_WORLD_MAP); + AUDIO_PLAY_BGM(NA_BGM_MAP); D_menu_801CEFC4 = 0; D_menu_801CEFC8 = 0; @@ -2132,7 +2132,7 @@ void Map_801A0954(void) { } if (gControllerPress[gMainController].button & START_BUTTON) { - AUDIO_PLAY_BGM(SEQ_ID_WORLD_MAP); + AUDIO_PLAY_BGM(NA_BGM_MAP); AUDIO_PLAY_SFX(NA_SE_MAP_MOVE_STOP, gDefaultSfxSource, 4); @@ -3081,7 +3081,7 @@ void Map_801A36A8(void) { D_menu_801CF080 = 1.0f; D_menu_801CD948 = 10; - AUDIO_PLAY_BGM(SEQ_ID_GAME_OVER); + AUDIO_PLAY_BGM(NA_BGM_GAME_OVER); break; case 10: diff --git a/src/overlays/ovl_menu/fox_option.c b/src/overlays/ovl_menu/fox_option.c index 1573e9f1..f18b26d6 100644 --- a/src/overlays/ovl_menu/fox_option.c +++ b/src/overlays/ovl_menu/fox_option.c @@ -544,7 +544,7 @@ void Option_Setup(void) { D_menu_801B91EC = 0; D_menu_801B9244 = 0; D_menu_801B9248 = 0; - AUDIO_PLAY_BGM(SEQ_ID_MENU); + AUDIO_PLAY_BGM(NA_BGM_SELECT); } void Option_Main(void) { @@ -1685,7 +1685,7 @@ void Option_ExpertSoundUpdate(void) { if (gControllerPress[gMainController].button & B_BUTTON) { if (!D_menu_801B9320) { AUDIO_PLAY_SFX(NA_SE_ARWING_CANCEL, gDefaultSfxSource, 4); - AUDIO_PLAY_BGM(SEQ_ID_MENU); + AUDIO_PLAY_BGM(NA_BGM_SELECT); gDrawMode = DRAW_NONE; D_menu_801B9124 = 1000; D_menu_801B912C = 0; @@ -2641,7 +2641,7 @@ void Option_VersusMenuInit(void) { s32 i; if (D_menu_801B91C4) { - AUDIO_PLAY_BGM(SEQ_ID_VS_MENU); + AUDIO_PLAY_BGM(NA_BGM_VS_SELECT); } D_menu_801B93D0 = D_menu_801B9124; @@ -2722,7 +2722,7 @@ void Option_8019949C(void) { AUDIO_PLAY_SFX(NA_SE_CANCEL, gDefaultSfxSource, 4); D_menu_801B93C4 &= (1 << i) ^ 15; } else { - AUDIO_PLAY_BGM(SEQ_ID_MENU); + AUDIO_PLAY_BGM(NA_BGM_SELECT); AUDIO_PLAY_SFX(NA_SE_ARWING_CANCEL, gDefaultSfxSource, 4); Option_8019B8A0(2); D_menu_801B9248 = 1; @@ -3941,7 +3941,7 @@ void Option_8019CBC0(void) { s32 temp; s32 i; - AUDIO_PLAY_BGM(SEQ_ID_MENU); + AUDIO_PLAY_BGM(NA_BGM_SELECT); gBlurAlpha = 208; gStarCount = 800; diff --git a/src/overlays/ovl_menu/fox_title.c b/src/overlays/ovl_menu/fox_title.c index 5d6f79db..e1fbfdca 100644 --- a/src/overlays/ovl_menu/fox_title.c +++ b/src/overlays/ovl_menu/fox_title.c @@ -708,7 +708,7 @@ void Title_801881FC(void) { D_menu_801B86A4 = 0; D_menu_801B82B0 = 100; - AUDIO_PLAY_BGM(SEQ_ID_TITLE); + AUDIO_PLAY_BGM(NA_BGM_TITLE); } void Title_801888E8(void) { @@ -989,7 +989,7 @@ void Title_801894E8(void) { D_menu_801B7BF0 = 0; - AUDIO_PLAY_BGM(SEQ_ID_OPENING); + AUDIO_PLAY_BGM(NA_BGM_OPENING); } void Title_8018994C(void) { From 7eff38a5f9f968994a964501d39232a312e6cb22 Mon Sep 17 00:00:00 2001 From: petrie911 <69443847+petrie911@users.noreply.github.com> Date: Wed, 8 May 2024 13:57:11 -0500 Subject: [PATCH 070/151] Add quick boot and add ram editing to object ram watch (#236) * upgrades * one cleanup * streamlining * whoops mods * more ub * cast cleanup --- .vscode/settings.json | 4 +- include/mods.h | 9 + src/audio/audio_heap.c | 6 +- src/audio/audio_load.c | 2 +- src/engine/fox_demo.c | 2 +- src/engine/fox_display.c | 14 -- src/engine/fox_game.c | 34 ++++ src/engine/fox_play.c | 1 - src/libc_sprintf.c | 8 +- src/mods/levelselect.c | 7 +- src/mods/object_ram.c | 410 +++++++++++++++++++++++---------------- src/mods/object_ram.h | 96 +++++++++ src/sys/sys_fault.c | 4 +- 13 files changed, 399 insertions(+), 198 deletions(-) create mode 100644 src/mods/object_ram.h diff --git a/.vscode/settings.json b/.vscode/settings.json index 5c687cb9..8d3a478f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -143,7 +143,9 @@ "os_motor.h": "c", "os_pfs.h": "c", "semaphore": "c", - "bgm.h": "c" + "bgm.h": "c", + "*.tcc": "c", + "object_ram.h": "c" }, "C_Cpp_Runner.msvcBatchPath": "" } \ No newline at end of file diff --git a/include/mods.h b/include/mods.h index 9c463869..232bfb7c 100644 --- a/include/mods.h +++ b/include/mods.h @@ -1,6 +1,15 @@ #ifndef MODS_H #define MODS_H +/** + * Quick Boot: + * Define this variable to a game state to boot into that + * state. Two presets (map and main menu) are provided. + * For the full list of game states, see sf64thread.h. +*/ +// #define MODS_BOOT_STATE 3 // main menu +// #define MODS_BOOT_STATE 4 // map + /** * Level Select: * Use the D-Pad to select a level. Press L to start in diff --git a/src/audio/audio_heap.c b/src/audio/audio_heap.c index a7bb79e9..a0ccd63e 100644 --- a/src/audio/audio_heap.c +++ b/src/audio/audio_heap.c @@ -464,15 +464,15 @@ void* AudioHeap_SearchRegularCaches(s32 tableType, s32 cache, s32 id) { switch (tableType) { case SEQUENCE_TABLE: - loadedCache = (AudioCache*) &gSeqCache; + loadedCache = &gSeqCache; break; case FONT_TABLE: - loadedCache = (AudioCache*) &gFontCache; + loadedCache = &gFontCache; break; case SAMPLE_TABLE: - loadedCache = (AudioCache*) &gSampleBankCache; + loadedCache = &gSampleBankCache; break; } diff --git a/src/audio/audio_load.c b/src/audio/audio_load.c index 7cf8671e..dc4a23ca 100644 --- a/src/audio/audio_load.c +++ b/src/audio/audio_load.c @@ -737,7 +737,7 @@ void* AudioLoad_AsyncLoadInner(s32 tableType, s32 id, s32 nChunks, s32 retData, ramAddr = AudioLoad_SearchCaches(tableType, id); if (ramAddr != NULL) { loadStatus = 2; - osSendMesg(retQueue, (void*) (retData << 0x18), OS_MESG_NOBLOCK); + osSendMesg(retQueue, (OSMesg) (retData << 0x18), OS_MESG_NOBLOCK); } else { table = AudioLoad_GetLoadTable(tableType); size = table->entries[id].size; diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index ebc2a85c..f3efc421 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -2823,7 +2823,7 @@ void ActorCutscene_Draw(Actor* actor) { sp2B8.y = 0.0f; sp2B8.z = 40.0f; - Matrix_MultVec3fNoTranslate(gCalcMatrix, (Vec3f*) (&sp2B8), &sp2AC); + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp2B8, &sp2AC); Matrix_Translate(gGfxMatrix, actor->obj.pos.x + sp2AC.x, actor->obj.pos.y + sp2AC.y, actor->obj.pos.z + sp2AC.z, MTXF_APPLY); Matrix_Scale(gGfxMatrix, actor->fwork[6], actor->fwork[6], actor->fwork[6], MTXF_APPLY); diff --git a/src/engine/fox_display.c b/src/engine/fox_display.c index e725bd51..99a85e1d 100644 --- a/src/engine/fox_display.c +++ b/src/engine/fox_display.c @@ -1,4 +1,3 @@ -#include "mods.h" #include "global.h" #include "assets/ast_arwing.h" #include "assets/ast_allies.h" @@ -1738,17 +1737,4 @@ void Play_Draw(void) { func_display_80051B30(); sPlayersVisible[gPlayerNum] = 0; Matrix_Pop(&gGfxMatrix); -#if MODS_FPS_COUNTER == 1 - Play_RenderFps(); -#endif -#if MODS_OBJECT_RAM == 1 - ObjectRam_Update(); -#endif } - -#if MODS_FPS_COUNTER == 1 -#include "../mods/fpscounter.c" -#endif -#if MODS_OBJECT_RAM == 1 -#include "../mods/object_ram.c" -#endif diff --git a/src/engine/fox_game.c b/src/engine/fox_game.c index 5c9769f7..3852212e 100644 --- a/src/engine/fox_game.c +++ b/src/engine/fox_game.c @@ -2,6 +2,7 @@ #include "global.h" #include "sf64dma.h" #include "assets/ast_logo.h" +#include "mods.h" f32 D_game_80161A10; f32 D_game_80161A14; @@ -54,6 +55,18 @@ void Game_Initialize(void) { Rand_Init(); Rand_SetSeed(1, 29000, 9876); gGameState = GSTATE_BOOT; +#ifdef MODS_BOOT_STATE + gNextGameState = GSTATE_INIT; + if (Save_Read() != 0) { +#ifdef AVOID_UB + gSaveFile.save = gDefaultSave; + gSaveFile.backup = gDefaultSave; +#else + gSaveFile = *((SaveFile*) &gDefaultSave); +#endif + Save_Write(); + } +#endif gNextGameStateTimer = 0; gBgColor = 0; gBlurAlpha = 255; @@ -361,7 +374,12 @@ void Game_Update(void) { break; case GSTATE_CHECK_SAVE: if (Save_Read() != 0) { +#ifdef AVOID_UB + gSaveFile.save = gDefaultSave; + gSaveFile.backup = gDefaultSave; +#else gSaveFile = *((SaveFile*) &gDefaultSave); +#endif Save_Write(); } gGameState++; @@ -396,6 +414,9 @@ void Game_Update(void) { gFillScreenAlpha = 0; gNextGameState = D_ctx_80177C94 = D_ctx_80177CAC = D_ctx_80177CB4 = D_ctx_80177CBC = D_ctx_80177CC4 = D_ctx_80177C9C = D_ctx_80177CA4 = D_play_80161A5C = D_game_80161A34 = 0; +#ifdef MODS_BOOT_STATE + gNextGameState = MODS_BOOT_STATE; +#endif for (i = 0; i < 4; i++) { gBoostButton[i] = L_CBUTTONS; gBrakeButton[i] = D_CBUTTONS; @@ -553,9 +574,22 @@ void Game_Update(void) { gFillScreenGreen, gFillScreenBlue, gFillScreenAlpha); } Audio_dummy_80016A50(); +#if MODS_OBJECT_RAM == 1 + ObjectRam_Update(); +#endif +#if MODS_FPS_COUNTER == 1 + Play_RenderFps(); +#endif } } +#if MODS_FPS_COUNTER == 1 +#include "../mods/fpscounter.c" +#endif +#if MODS_OBJECT_RAM == 1 +#include "../mods/object_ram.c" +#endif + Actor* Game_SpawnActor(ObjectId objId) { Actor* actor = gActors; s32 i; diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index a07a6f01..617a6412 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -1374,7 +1374,6 @@ bool Play_CheckPolyCollision(ObjectId objId, f32 arg1, f32 arg2, f32 arg3, f32 a return false; } -// arg5 could be Vec3f (not Vec3f*) s32 Player_CheckPolyCollision(Player* player, ObjectId objId, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7) { Vec3f sp84; diff --git a/src/libc_sprintf.c b/src/libc_sprintf.c index 0b2e506f..7fd93154 100644 --- a/src/libc_sprintf.c +++ b/src/libc_sprintf.c @@ -2,12 +2,12 @@ char D_800C7C80[] = "$Id: sprintf.c,v 1.5 1997/03/19 02:28:53 hayakawa Exp $"; -void* proutSprintf(void* dst, const char* fmt, size_t size) { - return (void*) ((uintptr_t) memcpy(dst, fmt, size) + size); +char* proutSprintf(char* dst, const char* fmt, size_t size) { + return (char*) ((uintptr_t) memcpy(dst, fmt, size) + size); } s32 vsprintf(char* dst, const char* fmt, va_list args) { - s32 ret = _Printf((outfun*) proutSprintf, dst, fmt, args); + s32 ret = _Printf(proutSprintf, dst, fmt, args); if (ret > -1) { dst[ret] = 0; @@ -20,7 +20,7 @@ int sprintf(char* s, const char* fmt, ...) { va_list args; va_start(args, fmt); - ret = _Printf((outfun*) proutSprintf, s, fmt, args); + ret = _Printf(proutSprintf, s, fmt, args); if (ret >= 0) { s[ret] = 0; diff --git a/src/mods/levelselect.c b/src/mods/levelselect.c index 941b8d8f..1a515339 100644 --- a/src/mods/levelselect.c +++ b/src/mods/levelselect.c @@ -45,7 +45,7 @@ void Map_LevelSelect(void) { if (difficulty > 2) { difficulty = 0; } - if ((difficulty == 1) && ((mission == 1) || (mission == 5))) { + if ((difficulty == 1) && ((mission == 1) || (mission == 5) || (mission == 6))) { difficulty = 2; } } else if ((gControllerPress[0].button & D_JPAD) && (mission != 0)) { @@ -84,7 +84,7 @@ void Map_LevelSelect(void) { } else if (sCurrentPlanetId == PLANET_VENOM) { Graphics_DisplaySmallText(80, 210, 1.0f, 1.0f, "ANDROSS"); } else if (sCurrentPlanetId == PLANET_AREA_6) { - Graphics_DisplaySmallText(80, 210, 1.0f, 1.0f, "UNKNOWN 4"); + Graphics_DisplaySmallText(80, 210, 1.0f, 1.0f, "BETA SB"); } } } @@ -97,8 +97,7 @@ void Map_LevelSelect(void) { } else if (sPlanetArray[mission][difficulty] == SAVE_SLOT_VENOM_2) { gCurrentLevel = LEVEL_VENOM_2; } - } - if (startOption && (sCurrentPlanetId == PLANET_AREA_6)) { + } else if ((sCurrentPlanetId == PLANET_AREA_6) && startOption) { gCurrentLevel = LEVEL_UNK_4; } Map_801A61B4(gCurrentLevel); diff --git a/src/mods/object_ram.c b/src/mods/object_ram.c index 6816444b..4fa55fe3 100644 --- a/src/mods/object_ram.c +++ b/src/mods/object_ram.c @@ -1,81 +1,39 @@ -#include "global.h" - -typedef struct RamEntry { - u8 type; - u8 index; - s16 offset; - u8 width; - u8 fmt; - u16 x; - u16 y; -} RamEntry; +#include "object_ram.h" static RamEntry oRamEntries[7] = { - { 1, 0, offsetof(Player, pos.x), 2, 3, 0, 0 }, { 1, 0, offsetof(Player, pos.y), 2, 3, 0, 0 }, - { 1, 0, offsetof(Player, pos.z), 2, 3, 0, 0 }, { 0, 0, offsetof(Player, zPath), 2, 3, 0, 0 }, - { 0, 0, offsetof(Player, vel.x), 2, 3, 0, 0 }, { 0, 0, offsetof(Player, vel.y), 2, 3, 0, 0 }, - { 0, 0, offsetof(Player, vel.z), 2, 3, 0, 0 }, + ORAM_ENTRY(PlayerShot, 15, obj.id, u8), + ORAM_ENTRY(Player, 0, pos.y, f32), + ORAM_ENTRY(Player, 0, pos.z, f32), + ORAM_ENTRY(Actor, 0, obj.status, x32), + ORAM_OFF, + ORAM_OFF, + ORAM_OFF, }; -static u32 selectIndex = 0; -static s32 oRamActive = 0; -static u32 editMode = 0; -static s32 editing = 0; +static u32 selectNum = 0; +static s32 oRamActive = true; +static u32 editMode = EDM_TYPE; +static s32 editing = false; +static s32 editingValue = false; +static fu dataTemp; static OSContPad* contPress; +static OSContPad* contHold; -typedef enum ObjectRamType { - ORAM_NONE, - ORAM_PLAYER, - ORAM_SCENE360, - ORAM_SCENERY, - ORAM_SPRITE, - ORAM_ACTOR, - ORAM_BOSS, - ORAM_ITEM, - ORAM_EFFECT, - ORAM_SHOT, - ORAM_MAX, -} ObjectRamType; - -typedef enum EditMode { - EDM_TYPE, - EDM_OFFSET, - EDM_FORMAT, - EDM_POS, - EDM_MAX, -} EditMode; - -typedef enum FormatType { - FMT_HEX, - FMT_SIGN, - FMT_UNSIGN, - FMT_FLOAT, - FMT_MAX, -} FormatType; - -#define WRAP_MODE(val, max) ((u8) ((val) + (max)) % max) - -static void* objPointers[] = { NULL, NULL, NULL, gScenery, gSprites, gActors, gBosses, gItems, gEffects, gPlayerShots }; -static size_t objSizes[] = { 0, - sizeof(Player), - sizeof(Scenery360), - sizeof(Scenery), - sizeof(Sprite), - sizeof(Actor), - sizeof(Boss), - sizeof(Item), - sizeof(Effect), - sizeof(PlayerShot) }; -static s32 objCounts[] = { 1, - 1, - 200, - ARRAY_COUNT(gScenery), - ARRAY_COUNT(gSprites), - ARRAY_COUNT(gActors), - ARRAY_COUNT(gBosses), - ARRAY_COUNT(gItems), - ARRAY_COUNT(gEffects), - ARRAY_COUNT(gPlayerShots) }; +static ObjArrayInfo objArrays[] = { + { NULL, 0, 1, "--" }, + { NULL, sizeof(Player), 1, "PL" }, + { NULL, sizeof(Scenery360), 200, "SC" }, + OBJ_ARRAY_INFO(gScenery, "SC"), + OBJ_ARRAY_INFO(gSprites, "SP"), + OBJ_ARRAY_INFO(gActors, "AC"), + OBJ_ARRAY_INFO(gBosses, "BS"), + OBJ_ARRAY_INFO(gItems, "IT"), + OBJ_ARRAY_INFO(gEffects, "EF"), + OBJ_ARRAY_INFO(gPlayerShots, "SH"), + OBJ_ARRAY_INFO(gTexturedLines, "TL"), + OBJ_ARRAY_INFO(gRadarMarks, "RM"), + OBJ_ARRAY_INFO(gBonusText, "BT"), +}; void ObjectRam_EditPosition(RamEntry* entry) { if ((contPress->button & U_JPAD) && (entry->y > 0)) { @@ -92,90 +50,124 @@ void ObjectRam_EditPosition(RamEntry* entry) { void ObjectRam_EditObject(RamEntry* entry) { if (contPress->button & U_JPAD) { entry->type++; - if ((entry->type == ORAM_SCENE360) && (gLevelMode != LEVELMODE_ALL_RANGE)) { - entry->type = ORAM_SCENERY; - } else if ((entry->type == ORAM_SCENERY) && (gLevelClearScreenTimer == LEVELMODE_ALL_RANGE)) { - entry->type = ORAM_SPRITE; + if ((entry->type == ORAM_Scenery360) && (gLevelMode != LEVELMODE_ALL_RANGE)) { + entry->type = ORAM_Scenery; + } else if ((entry->type == ORAM_Scenery) && (gLevelMode == LEVELMODE_ALL_RANGE)) { + entry->type = ORAM_Sprite; } } else if (contPress->button & D_JPAD) { entry->type--; - if ((entry->type == ORAM_SCENE360) && (gLevelMode != LEVELMODE_ALL_RANGE)) { - entry->type = ORAM_PLAYER; - } else if ((entry->type == ORAM_SCENERY) && (gLevelClearScreenTimer == LEVELMODE_ALL_RANGE)) { - entry->type = ORAM_SCENE360; + if ((entry->type == ORAM_Scenery360) && (gLevelMode != LEVELMODE_ALL_RANGE)) { + entry->type = ORAM_Player; + } else if ((entry->type == ORAM_Scenery) && (gLevelMode == LEVELMODE_ALL_RANGE)) { + entry->type = ORAM_Scenery360; } } entry->type = WRAP_MODE(entry->type, ORAM_MAX); - if (entry->type == 0) { - return; - } - if (entry->index >= objCounts[entry->type]) { - entry->index = objCounts[entry->type] - 1; - } - if (entry->offset >= objSizes[entry->type]) { - entry->offset = objSizes[entry->type] - (1 << entry->width); - } - if (contPress->button & L_JPAD) { - entry->index--; - } else if (contPress->button & R_JPAD) { +} + +void ObjectRam_EditIndex(RamEntry* entry) { + ObjArrayInfo* objInfo = &objArrays[entry->type]; + + entry->index = MIN(entry->index, objInfo->count - 1); + + if (contPress->button & U_JPAD) { entry->index++; + } else if (contPress->button & D_JPAD) { + entry->index--; } - entry->index = WRAP_MODE(entry->index, objCounts[entry->type]); + entry->index = WRAP_MODE(entry->index, objInfo->count); } void ObjectRam_EditFormat(RamEntry* entry) { + if (contPress->button & U_JPAD) { + entry->fmt--; + } else if (contPress->button & D_JPAD) { + entry->fmt++; + } + entry->fmt = WRAP_MODE(entry->fmt, FMT_MAX); + if (entry->fmt == FMT_FLOAT) { + entry->width = 2; + entry->offset &= ~((1 << entry->width) - 1); + } +} + +void ObjectRam_EditWidth(RamEntry* entry) { if ((contPress->button & U_JPAD) && (entry->width < 2)) { entry->width++; } else if ((contPress->button & D_JPAD) && (entry->width > 0)) { entry->width--; - } else if (contPress->button & L_JPAD) { - entry->fmt--; - } else if (contPress->button & R_JPAD) { - entry->fmt++; } - entry->fmt = WRAP_MODE(entry->fmt, FMT_MAX); if (entry->fmt == FMT_FLOAT) { entry->width = 2; } entry->offset &= ~((1 << entry->width) - 1); } -void ObjectRam_EditAddress(RamEntry* entry) { - if (contPress->button & U_JPAD) { - entry->offset += 0x10; - } else if (contPress->button & D_JPAD) { - entry->offset -= 0x10; - } else if (contPress->button & L_JPAD) { - entry->offset -= 1 << entry->width; - } else if (contPress->button & R_JPAD) { - entry->offset += 1 << entry->width; - } else if (contPress->button & R_TRIG) { - entry->offset += 0x100; - } else if (contPress->button & Z_TRIG) { - entry->offset -= 0x100; +void ObjectRam_EditOffset(RamEntry* entry) { + s32 inc; + ObjArrayInfo* objInfo = &objArrays[entry->type]; + + entry->offset = MIN(entry->offset, objInfo->size - (1 << entry->width)); + + if (contHold->button & Z_TRIG) { + inc = 0x10; + } else if (contHold->button & R_TRIG) { + inc = 0x100; + } else { + inc = 1 << entry->width; + } + inc *= (contPress->button & D_JPAD) ? -1 : 1; + if (contPress->button & (U_JPAD | D_JPAD)) { + entry->offset += inc; } if (entry->offset < 0) { entry->offset = 0; - } else if (entry->offset >= objSizes[entry->type]) { - entry->offset = objSizes[entry->type] - (1 << entry->width); + } else if (entry->offset >= objInfo->size) { + entry->offset = objInfo->size - (1 << entry->width); + } +} + +void ObjectRam_EditValue(RamEntry* entry) { + fu* data = entry->dataPtr; + s32 inc; + + if (contHold->button & Z_TRIG) { + inc = (entry->fmt == FMT_HEX) ? 0x10 : 10; + } else if (contHold->button & R_TRIG) { + inc = (entry->fmt == FMT_HEX) ? 0x100 : 100; + } else { + inc = 1; + } + inc *= (contPress->button & D_JPAD) ? -1 : 1; + + if (contPress->button & (U_JPAD | D_JPAD)) { + if (!editingValue) { + dataTemp.i = ObjectRam_GetData(entry); + editingValue = true; + } + if (entry->fmt == FMT_FLOAT) { + dataTemp.f += inc; + } else { + dataTemp.i += inc; + } } } void ObjectRam_Select(void) { - if (contPress->button & U_JPAD) { - selectIndex--; - } else if (contPress->button & D_JPAD) { - selectIndex++; + if ((contPress->button & U_JPAD) && !editing) { + selectNum--; + } else if ((contPress->button & D_JPAD) && !editing) { + selectNum++; } else if (contPress->button & L_JPAD) { editMode--; } else if (contPress->button & R_JPAD) { editMode++; - ; } - selectIndex = WRAP_MODE(selectIndex, ARRAY_COUNT(oRamEntries)); + selectNum = WRAP_MODE(selectNum, ARRAY_COUNT(oRamEntries)); editMode = WRAP_MODE(editMode, EDM_MAX); - if (oRamEntries[selectIndex].type == ORAM_NONE) { + if (oRamEntries[selectNum].type == ORAM_NONE) { editMode = EDM_TYPE; } } @@ -183,103 +175,154 @@ void ObjectRam_Select(void) { u32 ObjectRam_GetData(RamEntry* entry) { fu data; uintptr_t ptr; + s32 offset; + s32 index; if ((entry->type <= ORAM_NONE) || (entry->type >= ORAM_MAX)) { return 0; } - ptr = (uintptr_t) objPointers[entry->type] + entry->index * objSizes[entry->type]; switch (entry->width) { case 0: - data.i = *((u8*) (ptr + entry->offset)); + data.i = *((u8*) entry->dataPtr); if ((entry->fmt == FMT_SIGN) && (data.i >= 0x80)) { data.i -= 0x80; } break; case 1: - data.i = *((u16*) (ptr + entry->offset)); + data.i = *((u16*) entry->dataPtr); if ((entry->fmt == FMT_SIGN) && (data.i >= 0x8000)) { data.i -= 0x8000; } break; case 2: if (entry->fmt == FMT_FLOAT) { - data.f = *((f32*) (ptr + entry->offset)); + data.f = *((f32*) entry->dataPtr); } else { - data.i = *((u32*) (ptr + entry->offset)); + data.i = *((u32*) entry->dataPtr); } break; } return data.i; } -static char* objTypes[] = { "NONE", "PLYR", "S360", "SCEN", "SPRT", "ACTR", "BOSS", "ITEM", "EFCT", "SHOT" }; +void ObjectRam_WriteValue(RamEntry* entry) { + switch (entry->width) { + case 0: + *((u8*) entry->dataPtr) = dataTemp.i; + break; + case 1: + *((u16*) entry->dataPtr) = dataTemp.i; + break; + case 2: + if (entry->fmt == FMT_FLOAT) { + *((f32*) entry->dataPtr) = dataTemp.f; + } else { + *((u32*) entry->dataPtr) = dataTemp.i; + } + break; + } +} + +static char* objTypes[] = { "--", "PL", "SC", "SC", "SP", "AC", "BS", "IT", "EF", "SH", "TL", "RM", "BT" }; static char* fmtTypes[] = { "X", "S", "U", "F" }; #define SET_DRAW_COLOR(mode) \ - if ((index == selectIndex) && (editMode == mode)) { \ - if (editing) { \ + if (num == selectNum) { \ + if (editing && (editMode == mode)) { \ gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 0, 0, 255); \ + } else if (editing || (editMode == mode)) { \ + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 85, 0, 255); \ } else { \ - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 128, 0, 255); \ + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 170, 0, 255); \ } \ } else { \ gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); \ } -void ObjectRam_DrawEntry(RamEntry* entry, s32 index) { +void ObjectRam_DrawEntry(RamEntry* entry, s32 num) { fu data; - s32 y = entry->y + 50 + 27 * index; + s32 x = entry->x; + s32 y = entry->y + 50 + 27 * num; + s32 i; + s32 offset; + s32 index; + ObjArrayInfo* objInfo; - SET_DRAW_COLOR(EDM_TYPE) - Graphics_DisplaySmallText(entry->x + 10, y, 1.0f, 1.0f, objTypes[entry->type]); - - if (entry->type == 0) { + if ((entry->type < ORAM_NONE) || (entry->type >= ORAM_MAX)) { return; } - Graphics_Printf("%2d", entry->index); - Graphics_DisplaySmallText(entry->x + 45, y, 1.0f, 1.0f, D_801619A0); - SET_DRAW_COLOR(EDM_OFFSET) - Graphics_Printf("%03X", entry->offset); - Graphics_DisplaySmallText(entry->x + 70, y, 1.0f, 1.0f, D_801619A0); - SET_DRAW_COLOR(EDM_FORMAT) - Graphics_DisplaySmallText(entry->x + 10, y + 10, 1.0f, 1.0f, fmtTypes[entry->fmt]); - Graphics_Printf("%-2d", 1 << (entry->width + 3)); - Graphics_DisplaySmallText(entry->x + 20, y + 10, 1.0f, 1.0f, D_801619A0); + objInfo = &objArrays[entry->type]; - if (index == selectIndex) { - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 192, 0, 255); + offset = MIN(entry->offset, objInfo->size - (1 << entry->width)); + index = MIN(entry->index, objInfo->count - 1); + + entry->objPtr = (uintptr_t) objInfo->ptr + index * objInfo->size; + entry->dataPtr = (uintptr_t) entry->objPtr + offset; + + SET_DRAW_COLOR(EDM_TYPE) + Graphics_DisplaySmallText(x + 10, y, 1.0f, 1.0f, objInfo->name); + + if (entry->type == ORAM_NONE) { + return; + } + SET_DRAW_COLOR(EDM_MAX) + Graphics_DisplaySmallText(x + 26, y, 1.0f, 1.0f, "-"); + + SET_DRAW_COLOR(EDM_INDEX) + Graphics_Printf("%02d", index); + Graphics_DisplaySmallText(entry->x + 32, y, 1.0f, 1.0f, D_801619A0); + + SET_DRAW_COLOR(EDM_MAX) + Graphics_DisplaySmallText(x + 50, y, 1.0f, 1.0f, "."); + + SET_DRAW_COLOR(EDM_OFFSET) + Graphics_Printf("%03X", offset); + Graphics_DisplaySmallText(entry->x + 56, y, 1.0f, 1.0f, D_801619A0); + + SET_DRAW_COLOR(EDM_FORMAT) + Graphics_DisplaySmallText(x + 90, y, 1.0f, 1.0f, fmtTypes[entry->fmt]); + SET_DRAW_COLOR(EDM_WIDTH) + Graphics_Printf("%-2d", 1 << (entry->width + 3)); + Graphics_DisplaySmallText(x + 100, y, 1.0f, 1.0f, D_801619A0); + + SET_DRAW_COLOR(EDM_VALUE) + if ((num != selectNum) || !editingValue) { + data.i = ObjectRam_GetData(entry); + } else if (entry->fmt == FMT_FLOAT) { + data.f = dataTemp.f; } else { - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); + data.i = dataTemp.i; } - data.i = ObjectRam_GetData(entry); switch (entry->fmt) { case FMT_HEX: - Graphics_Printf("%0*X", 1 << (entry->width + 1), data.i); + Graphics_Printf("0X%0*X", 1 << (entry->width + 1), data.i); + x += (8 - (1 << (entry->width + 1))) * 9; break; case FMT_SIGN: - Graphics_Printf("%d", data.i); + Graphics_Printf("%10d", data.i); break; case FMT_UNSIGN: - Graphics_Printf("%u", data.i); + Graphics_Printf("%10u", data.i); break; case FMT_FLOAT: Graphics_Printf("%10.2f", data.f); break; } - Graphics_DisplaySmallText(entry->x + 40, y + 10, 1.0f, 1.0f, D_801619A0); + Graphics_DisplaySmallText(x + 25, y + 12, 1.0f, 1.0f, D_801619A0); } -static char* omStr[] = { "OBJECT", "OFFSET", "FORMAT", "POSITION" }; +// static char* omStr[] = { "OBJECT", "INDEX", "OFFSET", "FORMAT", "WIDTH", "VALUE" }; // "POSITION" }; void ObjectRam_Update(void) { s32 i; - objPointers[ORAM_PLAYER] = gPlayer; - objPointers[ORAM_SCENE360] = gScenery360; - objCounts[ORAM_PLAYER] = gCamCount; + objArrays[ORAM_Player].ptr = gPlayer; + objArrays[ORAM_Scenery360].ptr = gScenery360; + objArrays[ORAM_Player].count = gCamCount; contPress = &gControllerPress[gMainController]; + contHold = &gControllerHold[gMainController]; if ((gPlayState == PLAY_PAUSE) && (contPress->button & R_CBUTTONS)) { oRamActive = 1 - oRamActive; @@ -290,22 +333,37 @@ void ObjectRam_Update(void) { if (contPress->button & L_TRIG) { editing ^= 1; } - if (!editing) { - ObjectRam_Select(); - } else { + + ObjectRam_Select(); + + if (editingValue && !(editing && (editMode == EDM_VALUE))) { + ObjectRam_WriteValue(&oRamEntries[selectNum]); + editingValue = false; + } + + if (editing) { switch (editMode) { - case 0: - ObjectRam_EditObject(&oRamEntries[selectIndex]); + case EDM_TYPE: + ObjectRam_EditObject(&oRamEntries[selectNum]); break; - case 1: - ObjectRam_EditAddress(&oRamEntries[selectIndex]); + case EDM_INDEX: + ObjectRam_EditIndex(&oRamEntries[selectNum]); break; - case 2: - ObjectRam_EditFormat(&oRamEntries[selectIndex]); + case EDM_OFFSET: + ObjectRam_EditOffset(&oRamEntries[selectNum]); break; - case 3: - ObjectRam_EditPosition(&oRamEntries[selectIndex]); + case EDM_FORMAT: + ObjectRam_EditFormat(&oRamEntries[selectNum]); break; + case EDM_WIDTH: + ObjectRam_EditWidth(&oRamEntries[selectNum]); + break; + case EDM_VALUE: + ObjectRam_EditValue(&oRamEntries[selectNum]); + break; + // case EDM_POS: + // ObjectRam_EditPosition(&oRamEntries[selectNum]); + // break; } } RCP_SetupDL(&gMasterDisp, 0x4C); @@ -314,4 +372,22 @@ void ObjectRam_Update(void) { for (i = 0; i < ARRAY_COUNT(oRamEntries); i++) { ObjectRam_DrawEntry(&oRamEntries[i], i); } + + if ((oRamEntries[selectNum].type > ORAM_Player) && (oRamEntries[selectNum].type < ORAM_TexturedLine)) { + gTexturedLines[99].mode = 3; + gTexturedLines[99].xyScale = 3.0f; + gTexturedLines[99].posAA.x = gPlayer[0].pos.x; + gTexturedLines[99].posAA.y = gPlayer[0].pos.y; + gTexturedLines[99].posAA.z = gPlayer[0].pos.z - 100.0f; + if (oRamEntries[selectNum].objPtr->status != OBJ_FREE) { + gTexturedLines[99].timer = 15; + } + gTexturedLines[99].red = 255; + gTexturedLines[99].green = (editing) ? 128 : 255; + gTexturedLines[99].blue = 0; + gTexturedLines[99].alpha = 255; + gTexturedLines[99].posBB.x = oRamEntries[selectNum].objPtr->pos.x; + gTexturedLines[99].posBB.y = oRamEntries[selectNum].objPtr->pos.y; + gTexturedLines[99].posBB.z = oRamEntries[selectNum].objPtr->pos.z; + } } diff --git a/src/mods/object_ram.h b/src/mods/object_ram.h new file mode 100644 index 00000000..540919d3 --- /dev/null +++ b/src/mods/object_ram.h @@ -0,0 +1,96 @@ +#ifndef OBJECT_RAM_H +#define OBJECT_RAM_H + +#include "global.h" + +#define ORAM_ENTRY(struct, index, field, format) \ + { ORAM_##struct, index, offsetof(struct, field), NULL, 0, FMT_##format, WIDTH_##format, 0, 0 } +#define ORAM_OFF \ + { 0, 0, 0, 0, 0, 0, 0, 0, 0 } + +#define WRAP_MODE(val, max) ((u8) ((val) + (max)) % max) + +#define OBJ_ARRAY_INFO(objarr, name) \ + { objarr, sizeof(*objarr), ARRAY_COUNT(objarr), name } + +typedef struct ObjArrayInfo { + void* ptr; + size_t size; + s32 count; + char* name; +} ObjArrayInfo; + +typedef struct RamEntry { + u8 type; + u8 index; + s16 offset; + Object* objPtr; + void* dataPtr; + u8 fmt; + u8 width; + u16 x; + u16 y; +} RamEntry; + +typedef enum ObjectRamType { + ORAM_NONE, + ORAM_Player, + ORAM_Scenery360, + ORAM_Scenery, + ORAM_Sprite, + ORAM_Actor, + ORAM_Boss, + ORAM_Item, + ORAM_Effect, + ORAM_PlayerShot, + ORAM_TexturedLine, + ORAM_RadarMark, + ORAM_BonusText, + ORAM_MAX, +} ObjectRamType; + +typedef enum FormatType { + FMT_HEX, + FMT_SIGN, + FMT_UNSIGN, + FMT_FLOAT, + FMT_MAX, +} FormatType; + +typedef enum EditMode { + EDM_TYPE, + EDM_INDEX, + EDM_OFFSET, + EDM_FORMAT, + EDM_WIDTH, + EDM_VALUE, + // EDM_POS, + EDM_MAX, +} EditMode; + +#define FMT_f32 FMT_FLOAT +#define WIDTH_f32 2 +#define FMT_s32 FMT_SIGN +#define WIDTH_s32 2 +#define FMT_u32 FMT_UNSIGN +#define WIDTH_u32 2 +#define FMT_x32 FMT_HEX +#define WIDTH_x32 2 + +#define FMT_s16 FMT_SIGN +#define WIDTH_s16 1 +#define FMT_u16 FMT_UNSIGN +#define WIDTH_u16 1 +#define FMT_x16 FMT_HEX +#define WIDTH_x16 1 + +#define FMT_s8 FMT_SIGN +#define WIDTH_s8 0 +#define FMT_u8 FMT_UNSIGN +#define WIDTH_u8 0 +#define FMT_x8 FMT_HEX +#define WIDTH_x8 0 + +u32 ObjectRam_GetData(RamEntry* entry); + +#endif diff --git a/src/sys/sys_fault.c b/src/sys/sys_fault.c index c4144236..11745831 100644 --- a/src/sys/sys_fault.c +++ b/src/sys/sys_fault.c @@ -90,7 +90,7 @@ void func_800074AC(s32 arg0, s32 arg1, s32 arg2) { } } -void* func_80007604(void* arg0, const char* arg1, size_t arg2) { +char* func_80007604(char* arg0, const char* arg1, size_t arg2) { return (char*) memcpy(arg0, arg1, arg2) + arg2; } @@ -106,7 +106,7 @@ void func_8000762C(s32 arg0, s32 arg1, const char* fmt, ...) { sp40[i] = 0; } - if (_Printf((outfun*) func_80007604, sp40, fmt, args) <= 0) { + if (_Printf(func_80007604, sp40, fmt, args) <= 0) { return; } for (var_s0 = sp40; *var_s0 != 0; var_s0++) { From 95e35e09098146a751c93be2c22f575d20b7f641 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Thu, 9 May 2024 00:03:22 -0300 Subject: [PATCH 071/151] ignore .eeprom files --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 8a58deea..76bef8c3 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ ctx.c.m2c *.z64 *.bin *.otr +*.eeprom assets/yaml/us/ast_test.yaml src/assets/* include/assets/* From 5bda92de97922f060c2c7ad032aca686bdd1715c Mon Sep 17 00:00:00 2001 From: Alejandro Asenjo Nitti <96613413+sonicdcer@users.noreply.github.com> Date: Fri, 10 May 2024 23:28:18 -0300 Subject: [PATCH 072/151] Katina: Boss States and tweaks (#237) * Boss states and tweaks * fixes * roll back filename changes * variable name fix * Katina_Init --- assets/yaml/us/ast_katina.yaml | 8 +- assets/yaml/us/ast_text.yaml | 12 +-- include/i4.h | 2 +- src/engine/fox_play.c | 2 +- src/engine/fox_std_lib.c | 14 +-- src/overlays/ovl_i4/fox_ka.c | 172 ++++++++++++++++----------------- 6 files changed, 102 insertions(+), 108 deletions(-) diff --git a/assets/yaml/us/ast_katina.yaml b/assets/yaml/us/ast_katina.yaml index efc3f21c..09fe56ed 100644 --- a/assets/yaml/us/ast_katina.yaml +++ b/assets/yaml/us/ast_katina.yaml @@ -20,8 +20,8 @@ D_KA_6000000: D_KA_6001260: { type: TEXTURE, format: IA8, width: 8, height: 8, offset: 0x6001260, ctype: u8, symbol: D_KA_6001260 } -aDestroyedHatch1DL: - { type: GFX, offset: 0x60012A0, symbol: aDestroyedHatch1DL } +aKaDestroyedHatchDL: + { type: GFX, offset: 0x60012A0, symbol: aKaDestroyedHatchDL } aKaEnemy1DL: { type: GFX, offset: 0x6001530, symbol: aKaEnemy1DL } @@ -57,8 +57,8 @@ D_KA_60062F8: D_KA_6006AF8: { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6006AF8, ctype: u16, symbol: D_KA_6006AF8 } -aDestroyedMothershipDL: - { type: GFX, offset: 0x6007300, symbol: aDestroyedMothershipDL } +aKaDestroyedSaucererDL: + { type: GFX, offset: 0x6007300, symbol: aKaDestroyedSaucererDL } D_KA_6009250: { type: GFX, offset: 0x6009250, symbol: D_KA_6009250 } diff --git a/assets/yaml/us/ast_text.yaml b/assets/yaml/us/ast_text.yaml index 6cdf8a6d..faaadd71 100644 --- a/assets/yaml/us/ast_text.yaml +++ b/assets/yaml/us/ast_text.yaml @@ -293,16 +293,16 @@ aLargeText_Z: { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5009A60, symbol: aLargeText_Z } # s (large) -aLargeText_s: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5009B50, symbol: aLargeText_s } +aLargeText_s_: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5009B50, symbol: aLargeText_s_ } # t (large) -aLargeText_t: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5009C40, symbol: aLargeText_t } +aLargeText_t_: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5009C40, symbol: aLargeText_t_ } # o (small) -aSmallText_o: - { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5009D30, symbol: aSmallText_o } +aSmallText_o_: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5009D30, symbol: aSmallText_o_ } # p (small) aSmallText_p: diff --git a/include/i4.h b/include/i4.h index a1b9069b..3f8a3bfd 100644 --- a/include/i4.h +++ b/include/i4.h @@ -27,7 +27,7 @@ void Bolse_80191ED8(void); void Bolse_DrawDynamicGround(void); void Katina_BossSetup(Boss *); void Katina_UpdateEvents(Actor*); -void Katina_BossInit(void); +void Katina_Init(void); void SectorZ_80199900(Actor *, s32); void SectorZ_Missile_Update(Actor*); void SectorZ_UpdateEvents(Actor*); diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index 617a6412..3d70b0e3 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -2671,7 +2671,7 @@ void Play_Init(void) { ActorAllRange_SpawnTeam(); break; case LEVEL_KATINA: - Katina_BossInit(); + Katina_Init(); if (!D_ctx_8017782C) { ActorAllRange_SpawnTeam(); } diff --git a/src/engine/fox_std_lib.c b/src/engine/fox_std_lib.c index 6983f5b6..a2bffd40 100644 --- a/src/engine/fox_std_lib.c +++ b/src/engine/fox_std_lib.c @@ -819,12 +819,12 @@ 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 }; u8* sLargeCharTex[] = { - aLargeText_A, aLargeText_B, aLargeText_C, aLargeText_D, aLargeText_E, aLargeText_F, aLargeText_G, - aLargeText_H, aLargeText_I, aLargeText_J, aLargeText_K, aLargeText_L, aLargeText_M, aLargeText_N, - aSmallText_O, aLargeText_P, aLargeText_Q, aLargeText_R, aLargeText_S, aLargeText_T, aLargeText_U, - aLargeText_V, aLargeText_W, aLargeText_X, aLargeText_Y, aLargeText_Z, aLargeText_DOT, NULL, - aLargeText_0, aLargeText_1, aLargeText_2, aLargeText_3, aLargeText_4, aLargeText_5, aLargeText_6, - aLargeText_7, aLargeText_8, aLargeText_9, aLargeText_s, aLargeText_t, aLargeText_HYPHEN, + aLargeText_A, aLargeText_B, aLargeText_C, aLargeText_D, aLargeText_E, aLargeText_F, aLargeText_G, + aLargeText_H, aLargeText_I, aLargeText_J, aLargeText_K, aLargeText_L, aLargeText_M, aLargeText_N, + aSmallText_O, aLargeText_P, aLargeText_Q, aLargeText_R, aLargeText_S, aLargeText_T, aLargeText_U, + aLargeText_V, aLargeText_W, aLargeText_X, aLargeText_Y, aLargeText_Z, aLargeText_DOT, NULL, + aLargeText_0, aLargeText_1, aLargeText_2, aLargeText_3, aLargeText_4, aLargeText_5, aLargeText_6, + aLargeText_7, aLargeText_8, aLargeText_9, aLargeText_s_, aLargeText_t_, aLargeText_HYPHEN, }; u8* sLargeNumberTex[] = { aLargeText_0, aLargeText_1, aLargeText_2, aLargeText_3, aLargeText_4, @@ -833,7 +833,7 @@ u8* sLargeNumberTex[] = { u8* sSmallCharTex[] = { NULL, aSmallText_A, aSmallText_B, aSmallText_C, aSmallText_D, aSmallText_E, aSmallText_F, aSmallText_G, aSmallText_H, aSmallText_I, aSmallText_J, aSmallText_K, aSmallText_L, aSmallText_M, aSmallText_N, - aSmallText_o, aSmallText_p, aSmallText_q, aSmallText_r, aSmallText_s, + aSmallText_o_, aSmallText_p, aSmallText_q, aSmallText_r, aSmallText_s, aSmallText_T, aSmallText_U, aSmallText_V, aSmallText_W, aSmallText_X, aSmallText_Y, aSmallText_Z, aSmallTextExclamMark, aSmallText_COLON, aSmallText_HYPHEN, aSmallText_DOT, aSmallText_0, aSmallText_1, aSmallText_2, aSmallText_3, diff --git a/src/overlays/ovl_i4/fox_ka.c b/src/overlays/ovl_i4/fox_ka.c index 5c0f4564..a60df65d 100644 --- a/src/overlays/ovl_i4/fox_ka.c +++ b/src/overlays/ovl_i4/fox_ka.c @@ -130,7 +130,7 @@ typedef enum KaActorFwork { typedef enum KaBosses { /* 0 */ KA_BOSS_BASE, - /* 1 */ KA_BOSS_MOTHERSHIP + /* 1 */ KA_BOSS_SAUCERER } KaBosses; typedef enum KaBossSwork { @@ -178,7 +178,27 @@ typedef enum KaBaseStates { /* 2 */ KA_BASE_STATE_2 } KaBaseStates; -// Particle effects visible while the Mothership is charging it's laser +typedef enum KaSaucererStates { + /* 0 */ SAUCERER_STAND_BY, + /* 1 */ SAUCERER_CS_APPROACH_BASE, + /* 2 */ SAUCERER_CS_CLOSE_UP, + /* 3 */ SAUCERER_CS_OPEN_HATCHES_START, + /* 4 */ SAUCERER_CS_OPEN_HATCHES_END, + /* 5 */ SAUCERER_CS_SEND_ENEMIES, + /* 6 */ SAUCERER_OPEN_HATCHES, + /* 7 */ SAUCERER_SEND_ENEMIES, + /* 10 */ SAUCERER_LOWER_CORE = 10, + /* 11 */ SAUCERER_LASER_CHARGE_START, + /* 12 */ SAUCERER_CS_LASER_CHARGE_END, + /* 15 */ SAUCERER_CS_ROTATE = 15, + /* 16 */ SAUCERER_CS_LASER_FIRE_START, + /* 17 */ SAUCERER_CS_LASER_FIRE_END, + /* 18 */ SAUCERER_CS_LASER_HIT, + /* 20 */ SAUCERER_DEFEAT = 20, + /* 21 */ SAUCERER_CS_FALL_TO_GROUND, +} KaSaucererStates; + +// Particle effects visible while the Saucerer is charging it's laser void Katina_LaserEnergyParticlesSetup(Effect358* this, f32 x, f32 y, f32 z, f32 x2, f32 y2, f32 z2) { f32 yRot; f32 xRot; @@ -214,7 +234,7 @@ void Katina_LaserEnergyParticlesSetup(Effect358* this, f32 x, f32 y, f32 z, f32 Object_SetInfo(&this->info, this->obj.id); } -// Allocation of particle effects visible while the Mothership is charging it's laser +// Particle effects visible while the Saucerer is charging it's laser void Katina_LaserEnergyParticlesSpawn(f32 x, f32 y, f32 z, f32 x2, f32 y2, f32 z2) { s32 i; @@ -237,8 +257,8 @@ void Katina_LaserEnergyParticlesUpdate(Effect358* this) { this->unk_44 += 3; } - if ((fabsf(this->obj.pos.x - gBosses[KA_BOSS_MOTHERSHIP].obj.pos.x) <= 30.0f) && - (fabsf(this->obj.pos.z - gBosses[KA_BOSS_MOTHERSHIP].obj.pos.z) <= 30.0f)) { + if ((fabsf(this->obj.pos.x - gBosses[KA_BOSS_SAUCERER].obj.pos.x) <= 30.0f) && + (fabsf(this->obj.pos.z - gBosses[KA_BOSS_SAUCERER].obj.pos.z) <= 30.0f)) { Object_Kill(&this->obj, this->sfxSource); } } @@ -800,7 +820,7 @@ void Katina_BossSpawnEnemies(Saucerer* this, Vec3f* pos, f32 arg2) { } /** - * Sets the angle for the enemies coming out of the mothership + * Sets the angle for the enemies coming out of the Saucerer */ void Katina_SetOutcomingEnemyAngle(Saucerer* this) { f32 angle; @@ -846,7 +866,7 @@ void Katina_BossUpdate(Saucerer* this) { } /** - * Summon core if all hatches are destroyed or after 3 minutes from mothership appearance. + * Summon core if all hatches are destroyed or after 3 minutes from Saucerer appearance. */ if ((((this->swork[BOSS_HATCH_1_HP] <= 0) && (this->swork[BOSS_HATCH_2_HP] <= 0) && (this->swork[BOSS_HATCH_3_HP] <= 0) && (this->swork[BOSS_HATCH_4_HP] <= 0)) || @@ -861,11 +881,9 @@ void Katina_BossUpdate(Saucerer* this) { } switch (this->state) { - case 0: - /** - * Send Mothership whether you killed 10 enemies or after 2 minutes of gameplay - */ - if (((gHitCount >= 10) || (gAllRangeEventTimer > 3840))) { + // Send Saucerer whether you killed 10 enemies or after 2 minutes of gameplay + case SAUCERER_STAND_BY: + if ((gHitCount >= 10) || (gAllRangeEventTimer > 3840)) { if ((D_edisplay_801615D0.y < 0.0f)) { this->state = 1; @@ -893,9 +911,10 @@ void Katina_BossUpdate(Saucerer* this) { break; /** - * Wait for mothership to aproach the base to start cutscene. + * Wait for Saucerer to be near the base to start cutscene. + * Set checkpoint. */ - case 1: + case SAUCERER_CS_APPROACH_BASE: if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { if (this->obj.pos.z < 4500.0f) { this->state++; @@ -931,10 +950,7 @@ void Katina_BossUpdate(Saucerer* this) { } break; - /** - * Cutscene: Close up - */ - case 2: + case SAUCERER_CS_CLOSE_UP: gPlayer[0].cam.at.y += 0.2f; Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 30.0f, 1.0f, 1.65f, 0.0f); @@ -987,10 +1003,7 @@ void Katina_BossUpdate(Saucerer* this) { } break; - /** - * Cutscene: Open hatches. - */ - case 3: + case SAUCERER_CS_OPEN_HATCHES_START: if (this->timer_050 == 0) { this->state++; this->timer_050 = 60; @@ -1002,10 +1015,7 @@ void Katina_BossUpdate(Saucerer* this) { } break; - /** - * Cutscene: Hatches opened completely. - */ - case 4: + case SAUCERER_CS_OPEN_HATCHES_END: if (this->timer_050 == 0) { this->state++; this->timer_050 = 100; @@ -1015,10 +1025,10 @@ void Katina_BossUpdate(Saucerer* this) { break; /** - * Cutscene: Boss music starts, enemies coming out of the mothership. + * Cutscene: Boss music starts, enemies coming out of the Saucerer. * Return control to the player after cutscene ends and close the hatches. */ - case 5: + case SAUCERER_CS_SEND_ENEMIES: if (this->timer_050 == 1) { AUDIO_PLAY_BGM(NA_BGM_BOSS_KA); } @@ -1062,10 +1072,10 @@ void Katina_BossUpdate(Saucerer* this) { break; /** - * Open hatches for 10 seconds when there's less than 30 enemies - * or after 40 seconds have passed + * Open hatches for 10 seconds when there's less + * than 30 enemies or after 40 seconds have passed */ - case 6: + case SAUCERER_OPEN_HATCHES: if (this->timer_052 == 1) { AUDIO_PLAY_SFX(NA_SE_KA_UFO_HATCH_STOP, this->sfxSource, 0); } @@ -1098,7 +1108,7 @@ void Katina_BossUpdate(Saucerer* this) { * Send out more enemies. * Close hatches after 10 seconds. */ - case 7: + case SAUCERER_SEND_ENEMIES: Math_SmoothStepToF(&this->fwork[10], 0.0f, 0.1f, 0.5f, 0.0f); if ((this->timer_050 < 200) && ((this->timer_050 % 16) == 0)) { @@ -1121,10 +1131,8 @@ void Katina_BossUpdate(Saucerer* this) { } break; - /** - * Start countdown and lower down core. - */ - case 10: + // Start countdown and lower down core. + case SAUCERER_LOWER_CORE: if (this->timer_050 == 0) { this->fwork[BOSS_CORE_TARGET_LEVEL] = 200.0f; AUDIO_PLAY_SFX(NA_SE_KA_UFO_CORE_OPEN, this->sfxSource, 0); @@ -1140,10 +1148,8 @@ void Katina_BossUpdate(Saucerer* this) { } break; - /** - * Set a 1 minute timer for mothership attack. - */ - case 11: + // Set a 1 minute timer for Saucerer attack. + case SAUCERER_LASER_CHARGE_START: if (this->timer_050 == 0) { AUDIO_PLAY_SFX(NA_SE_KA_UFO_HATCH_STOP, this->sfxSource, 0); this->state = 12; @@ -1154,10 +1160,10 @@ void Katina_BossUpdate(Saucerer* this) { break; /** - * Start mothership attack after 13 seconds from Bill's warning + * Start Saucerer attack after 13 seconds from Bill's warning * Start cutscene for base destruction. */ - case 12: + case SAUCERER_CS_LASER_CHARGE_END: if (this->timer_050 == 400) { Radio_PlayMessage(gMsg_ID_18065, RCID_BILL); } @@ -1198,10 +1204,8 @@ void Katina_BossUpdate(Saucerer* this) { } break; - /** - * Rotate mothership into fire position. - */ - case 15: + // Rotate Saucerer into fire position. + case SAUCERER_CS_ROTATE: if (this->timer_050 == 700) { Radio_PlayMessage(gMsg_ID_18070, RCID_BILL); } @@ -1257,10 +1261,8 @@ void Katina_BossUpdate(Saucerer* this) { } break; - /** - * Cutscene: Close up, start mothership attack. - */ - case 16: + // Cutscene: Close up, start Saucerer attack. + case SAUCERER_CS_LASER_FIRE_START: Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 30.0f, 1.0f, 1.6f, 0.0f); Math_SmoothStepToF(&gPlayer[0].cam.eye.z, 0.0f, 0.05f, 5.0f, 0.0f); this->fwork[BOSS_FWORK_13] += 0.1f; @@ -1340,10 +1342,8 @@ void Katina_BossUpdate(Saucerer* this) { } break; - /** - * Cutscene: Mothership fires laser to the base. - */ - case 17: + // Cutscene: Saucerer fires laser to the base. + case SAUCERER_CS_LASER_FIRE_END: this->fwork[BOSS_FWORK_13] += 0.1f; Math_SmoothStepToF(&gPlayer[0].cam.at.y, 525.0f, 0.3f, 50.0f, 0.0f); @@ -1357,10 +1357,8 @@ void Katina_BossUpdate(Saucerer* this) { } break; - /** - * Cutscene: Base is hit by mothership's laser. - */ - case 18: + // Cutscene: Base is hit by Saucerer's laser. + case SAUCERER_CS_LASER_HIT: Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 100.0f, 1.0f, 100.0f, 0.0f); Math_SmoothStepToF(&gPlayer[0].cam.at.y, 525.0f, 0.3f, 50.0f, 0.0f); @@ -1397,10 +1395,8 @@ void Katina_BossUpdate(Saucerer* this) { } break; - /** - * Mothership core destroyed, setup for MISSION_ACCOMPLISHED. - */ - case 20: + // Saucerer core destroyed, setup for MISSION_ACCOMPLISHED. + case SAUCERER_DEFEAT: gShowAllRangeCountdown = false; Math_SmoothStepToF(&this->fwork[BOSS_MOVEMENT_SPEED], 0.0f, 0.1f, 3.0f, 0.0f); @@ -1427,10 +1423,8 @@ void Katina_BossUpdate(Saucerer* this) { } break; - /** - * Cutscene: Mothership falling to the ground. - */ - case 21: + // Cutscene: Saucerer falling to the ground. + case SAUCERER_CS_FALL_TO_GROUND: Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); @@ -1571,7 +1565,7 @@ bool Katina_BossOverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* if (boss->swork[BOSS_HATCH_1_HP] <= 0) { RCP_SetupDL(&gMasterDisp, 57); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - *dList = aDestroyedHatch1DL; + *dList = aKaDestroyedHatchDL; } break; @@ -1635,7 +1629,7 @@ bool Katina_BossOverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* if (boss->health < 0) { RCP_SetupDL(&gMasterDisp, 57); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - *dList = aDestroyedMothershipDL; + *dList = aKaDestroyedSaucererDL; } break; } @@ -1799,7 +1793,7 @@ void Katina_SFTeam_LevelComplete_Update(void) { void Katina_LevelComplete(Player* player) { s32 i; - Saucerer* boss = &gBosses[KA_BOSS_MOTHERSHIP]; + Saucerer* boss = &gBosses[KA_BOSS_SAUCERER]; Vec3f src; Vec3f dest; f32 angle; @@ -2099,7 +2093,7 @@ void Katina_LevelComplete(Player* player) { player->rockAngle = SIN_DEG(player->rockPhase); } -// Makes your teammates fly towards the camera after defeating the mothership. +// Makes your teammates fly towards the camera after defeating the Saucerer. void Katina_SFTeamFlyTowardsCamera(ActorCutscene* this) { Vec3f src; Vec3f dest; @@ -2170,7 +2164,7 @@ void Katina_801981F8(Actor* this) { src.y = 0.0f; src.z = -5000.0f; - if (gBosses[KA_BOSS_MOTHERSHIP].state != 0) { + if (gBosses[KA_BOSS_SAUCERER].state != 0) { src.z = -10000.0f; } @@ -2181,7 +2175,7 @@ void Katina_801981F8(Actor* this) { actor->unk_0B6 = D_i4_8019F430[i]; - if ((actor->unk_0B6 != 0) || (gBosses[KA_BOSS_MOTHERSHIP].state == 0)) { + if ((actor->unk_0B6 != 0) || (gBosses[KA_BOSS_SAUCERER].state == 0)) { actor->obj.status = OBJ_ACTIVE; actor->obj.id = OBJ_ACTOR_ALLRANGE; @@ -2268,16 +2262,16 @@ void Katina_UpdateEvents(ActorAllRange* this) { if (gAllRangeCheckpoint != 0) { gHitCount = gSavedHitCount; - gBosses[KA_BOSS_MOTHERSHIP].state = 6; - gBosses[KA_BOSS_MOTHERSHIP].obj.pos.x = 0.0f; - gBosses[KA_BOSS_MOTHERSHIP].obj.pos.z = 0.0f; - gBosses[KA_BOSS_MOTHERSHIP].obj.pos.y = 2000.0f; + gBosses[KA_BOSS_SAUCERER].state = 6; + gBosses[KA_BOSS_SAUCERER].obj.pos.x = 0.0f; + gBosses[KA_BOSS_SAUCERER].obj.pos.z = 0.0f; + gBosses[KA_BOSS_SAUCERER].obj.pos.y = 2000.0f; - AUDIO_PLAY_SFX(NA_SE_KA_UFO_ENGINE, gBosses[KA_BOSS_MOTHERSHIP].sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_KA_UFO_ENGINE, gBosses[KA_BOSS_SAUCERER].sfxSource, 0); gAllRangeEventTimer = 20000; - gBosses[KA_BOSS_MOTHERSHIP].swork[BOSS_CORE_TIMER] = 5760; + gBosses[KA_BOSS_SAUCERER].swork[BOSS_CORE_TIMER] = 5760; gKaKilledAlly = 1; @@ -2301,7 +2295,7 @@ void Katina_UpdateEvents(ActorAllRange* this) { break; } - if (gBosses[KA_BOSS_MOTHERSHIP].state < 15) { + if (gBosses[KA_BOSS_SAUCERER].state < 15) { switch (gAllRangeEventTimer) { case -500: Radio_PlayMessage(gMsg_ID_18005, RCID_BILL); @@ -2320,7 +2314,7 @@ void Katina_UpdateEvents(ActorAllRange* this) { break; } - if (gBosses[KA_BOSS_MOTHERSHIP].state == 12) { + if (gBosses[KA_BOSS_SAUCERER].state == 12) { if (((gAllRangeEventTimer % 256) == 0) && (Rand_ZeroOne() < 0.5f)) { AllRange_PlayMessage(gMsg_ID_18060, RCID_BILL); } @@ -2347,17 +2341,17 @@ void Katina_UpdateEvents(ActorAllRange* this) { } } -void Katina_BossInit(void) { +void Katina_Init(void) { Frontlinebase* base = &gBosses[KA_BOSS_BASE]; - Saucerer* mothership = &gBosses[KA_BOSS_MOTHERSHIP]; + Saucerer* saucerer = &gBosses[KA_BOSS_SAUCERER]; - Boss_Initialize(mothership); - mothership->obj.status = OBJ_INIT; - mothership->obj.pos.x = -15000.0f; - mothership->obj.pos.y = 3240.0f; - mothership->obj.pos.z = 15000.0f; - mothership->obj.id = OBJ_BOSS_KA; - Object_SetInfo(&mothership->info, mothership->obj.id); + Boss_Initialize(saucerer); + saucerer->obj.status = OBJ_INIT; + saucerer->obj.pos.x = -15000.0f; + saucerer->obj.pos.y = 3240.0f; + saucerer->obj.pos.z = 15000.0f; + saucerer->obj.id = OBJ_BOSS_KA; + Object_SetInfo(&saucerer->info, saucerer->obj.id); Boss_Initialize(base); base->obj.status = OBJ_INIT; From 0dbbf453f93f9f1b3e3d95fbfd96caf85c85ddf7 Mon Sep 17 00:00:00 2001 From: petrie911 <69443847+petrie911@users.noreply.github.com> Date: Sat, 11 May 2024 15:53:37 -0500 Subject: [PATCH 073/151] More actor docs. starting on event IDs (#238) * id start * stuff * comp and cam * add errors --- Makefile | 10 +- include/context.h | 58 +-- include/functions.h | 10 +- include/gfx.h | 10 + include/prevent_context_reordering.h | 6 +- include/sf64event.h | 36 +- include/sf64object.h | 41 +- include/sf64player.h | 10 +- include/sf64thread.h | 2 +- include/sys.h | 12 +- include/variables.h | 2 +- linker_scripts/us/symbol_addrs_engine.txt | 52 +-- src/engine/fox_360.c | 88 ++-- src/engine/fox_A48A0.c | 6 +- src/engine/fox_beam.c | 71 +-- src/engine/fox_bg.c | 24 +- src/engine/fox_boss.c | 10 +- src/engine/fox_context.c | 112 ++--- src/engine/fox_demo.c | 159 ++++--- src/engine/fox_display.c | 189 ++++---- src/engine/fox_edata.c | 2 +- src/engine/fox_edisplay.c | 63 +-- src/engine/fox_effect.c | 51 ++- src/engine/fox_enmy.c | 107 +++-- src/engine/fox_enmy2.c | 524 +++++++++++----------- src/engine/fox_fade.c | 36 +- src/engine/fox_game.c | 75 ++-- src/engine/fox_hud.c | 135 +++--- src/engine/fox_load.c | 2 +- src/engine/fox_play.c | 201 ++++----- src/engine/fox_tank.c | 10 +- src/engine/fox_versus.c | 72 +-- src/mods/object_ram.c | 8 +- src/overlays/ovl_ending/fox_end1.c | 68 ++- src/overlays/ovl_ending/fox_end2.c | 94 ++-- src/overlays/ovl_ending/fox_end2_data.c | 202 ++++----- src/overlays/ovl_i1/fox_co.c | 71 ++- src/overlays/ovl_i1/fox_tr.c | 2 +- src/overlays/ovl_i1/fox_tr360.c | 16 +- src/overlays/ovl_i1/fox_ve1.c | 28 +- src/overlays/ovl_i2/fox_me.c | 60 +-- src/overlays/ovl_i2/fox_sx.c | 54 +-- src/overlays/ovl_i3/fox_a6.c | 56 +-- src/overlays/ovl_i3/fox_aq.c | 228 +++++----- src/overlays/ovl_i3/fox_so.c | 96 ++-- src/overlays/ovl_i3/fox_zo.c | 134 +++--- src/overlays/ovl_i4/fox_bo.c | 76 ++-- src/overlays/ovl_i4/fox_fo.c | 40 +- src/overlays/ovl_i4/fox_ka.c | 144 +++--- src/overlays/ovl_i4/fox_sz.c | 98 ++-- src/overlays/ovl_i5/fox_ma.c | 86 ++-- src/overlays/ovl_i5/fox_ti.c | 124 ++--- src/overlays/ovl_i5/fox_ti_cs.c | 8 +- src/overlays/ovl_i6/fox_andross.c | 170 +++---- src/overlays/ovl_i6/fox_sy.c | 284 ++++++------ src/overlays/ovl_i6/fox_turret.c | 8 +- src/overlays/ovl_i6/fox_ve2.c | 2 +- src/overlays/ovl_menu/fox_map.c | 204 +++++---- src/overlays/ovl_menu/fox_option.c | 92 ++-- src/overlays/ovl_menu/fox_title.c | 26 +- src/sys/sys_fault.c | 256 ++++++----- src/sys/sys_main.c | 2 +- src/sys/sys_matrix.c | 4 +- tools/comptool.py | 73 ++- 64 files changed, 2533 insertions(+), 2467 deletions(-) diff --git a/Makefile b/Makefile index 4bf4ec97..eb5eb181 100644 --- a/Makefile +++ b/Makefile @@ -414,7 +414,11 @@ endif decompress: $(BASEROM) @echo "Decompressing ROM..." - @$(PYTHON) $(COMPTOOL) -de $(COMPTOOL_DIR) -m $(MIO0) $(BASEROM) $(BASEROM_UNCOMPRESSED) + @$(PYTHON) $(COMPTOOL) -die $(COMPTOOL_DIR) -m $(MIO0) $(BASEROM) $(BASEROM_UNCOMPRESSED) + +compress: $(BASEROM) + @echo "Compressing ROM..." + @$(PYTHON) $(COMPTOOL) -c -m $(MIO0) $(ROM) $(ROMC) extract: @$(RM) -r asm/$(VERSION) bin/$(VERSION) @@ -466,7 +470,7 @@ disasm: # Final ROM $(ROMC): $(BASEROM_UNCOMPRESSED) $(call print,Compressing ROM...,$<,$@) - @$(PYTHON) $(COMPTOOL) -c $(ROM) $(ROMC) + @$(PYTHON) $(COMPTOOL) -c -m $(MIO0) $(ROM) $(ROMC) # Uncompressed ROM $(ROM): $(ELF) @@ -518,4 +522,4 @@ build/src/libultra/libc/ll.o: src/libultra/libc/ll.c # Print target for debugging print-% : ; $(info $* is a $(flavor $*) variable set to [$($*)]) @true -.PHONY: all uncompressed compressed clean init extract expected format checkformat decompress assets context disasm toolchain +.PHONY: all uncompressed compressed clean init extract expected format checkformat decompress compress assets context disasm toolchain diff --git a/include/context.h b/include/context.h index 5c697030..58e61911 100644 --- a/include/context.h +++ b/include/context.h @@ -26,7 +26,7 @@ extern s32 gPrevPlanetSavedTeamShields[6]; extern s32 gTeamDamage[6]; extern u8 gMissionStatus; extern f32 gGroundHeight; -extern f32 D_ctx_80177950; // sign of something to do with camera z rotations +extern f32 D_ctx_80177950; extern f32 gPlayerTurnRate; extern f32 gPlayerTurnStickMod; extern f32 gCsCamEyeX; @@ -35,14 +35,14 @@ extern f32 gCsCamEyeZ; extern f32 gCsCamAtX; extern f32 gCsCamAtY; extern f32 gCsCamAtZ; -extern Vec3f gPlayerCamEye; -extern Vec3f gPlayerCamAt; +extern Vec3f gPlayCamEye; +extern Vec3f gPlayCamAt; extern bool gExpertMode; extern s32 D_ctx_80177A10[10]; extern f32 D_ctx_80177A48[10]; extern s32 gCsFrameCount; -extern u8 D_ctx_80177A98; -extern u8 D_ctx_80177AB0; +extern u8 gDrawGround; +extern u8 gDrawBackdrop; // Venom Andross is the only level with multiple backdrops extern u8 gAqDrawMode; extern s32 gTitleState; extern s32 gMainController; @@ -81,11 +81,11 @@ extern s32 gRingPassCount; extern Vec3f gFormationInitRot; extern Vec3f gFormationInitPos; extern UNK_TYPE F_80178020; -extern s32 D_ctx_8017812C; +extern s32 gGroundClipMode; extern LevelId gCurrentLevel; extern s32 gLevelPhase; extern s32 gBossActive; -extern s32 D_ctx_8017828C; +extern bool gKillEventActors; extern s32 gUseDynaFloor; extern s32 gRadioState; extern s32 gCurrentRadioPortrait; @@ -132,22 +132,22 @@ extern s32 gFogFar; extern UNK_TYPE F_801783E0[12]; extern s32 gStarCount; extern f32 gStarWarpDistortion; -extern f32 D_ctx_80178418; +extern f32 gCOComplete2CamRotY; extern UNK_TYPE F_8017841C; extern f32 gStarfieldX; extern f32 gStarfieldY; extern f32 gStarfieldRoll; -extern f32 D_ctx_8017842C; -extern f32 D_ctx_80178430; +extern f32 gStarfieldScrollX; +extern f32 gStarfieldScrollY; extern UNK_TYPE F_80178434; extern UNK_TYPE F_80178438; extern UNK_TYPE F_8017843C; -extern f32 D_ctx_80178440; -extern f32 D_ctx_80178444; -extern f32 D_ctx_80178448; -extern f32 D_ctx_80178450[3]; -extern f32 D_ctx_80178460[3]; -extern f32 D_ctx_80178470[3]; +extern f32 gBossDeathCamAtX; +extern f32 gBossDeathCamAtY; +extern f32 gBossDeathCamAtZ; +extern f32 gCsTeamTargetsX[3]; +extern f32 gCsTeamTargetsY[3]; +extern f32 gCsTeamTargetsZ[3]; extern f32 gCameraShakeY; extern s32 gCameraShake; extern s32 D_ctx_80178484; @@ -155,10 +155,10 @@ extern bool gLoadLevelObjects; extern UNK_TYPE F_8017848C; extern UNK_TYPE F_80178490; extern s32 D_ctx_80178494; -extern f32 D_ctx_80178498; -extern f32 D_ctx_8017849C; -extern f32 D_ctx_801784A0; -extern s32 D_ctx_801784A4; +extern f32 gShotHitPosZ; +extern f32 gShotHitPosX; +extern f32 gShotHitPosY; +extern s32 gZOSnakeWaypointCount; extern UNK_TYPE F_801784A8; extern GroundType gGroundType; extern UNK_TYPE F_801784B0; @@ -221,7 +221,7 @@ extern s32 D_ctx_80161A84; extern s32 gGroundSurface; extern s32 gSavedGroundSurface; extern u8 gGoldRingCount[4]; -extern u8 D_ctx_80161A94[4]; +extern u8 gSavedGoldRingCount[4]; extern s32 gHitCount; extern s32 gSavedHitCount; extern s16 gLifeCount[4]; @@ -290,7 +290,7 @@ extern u8 gGreatFoxIntact; extern u8 gTiStartLandmaster; extern u16 gControllerRumbleTimers[4]; extern u16 gPlayerScores[4]; -extern s32 D_ctx_80177C50; +extern s32 gCircleWipeFrame; extern s32 D_ctx_80177C70; extern s32 gTraining360MsgTimer; extern s32 gTraining360MsgIndex; @@ -310,10 +310,10 @@ extern s32 gLeftWingFlashTimer[4]; extern s32 gRightWingDebrisTimer[4]; extern s32 gLeftWingDebrisTimer[4]; extern s32 gBombCount[4]; -extern s32 D_ctx_80177DB8[4]; -extern s32 D_ctx_80177DD0[4][10]; -extern s32 D_ctx_80177E74; -extern s32 D_ctx_80177E7C; +extern s32 gVsPoints[4]; +extern s32 gVsKills[4][10]; +extern s32 gVsMatchOver; +extern s32 gVsMatchStart; extern bool gChangeTo360; extern Vec3f gTeamArrowsViewPos[10]; extern f32 D_ctx_80177F20[65]; @@ -327,16 +327,16 @@ extern u32* gStarFillColors; extern UNK_TYPE F_801782A0; extern Scenery360* gScenery360; extern UNK_TYPE F_801782B0; -extern s32 D_ctx_801782B8; +extern s32 gDrawSmallRocks; extern s32 D_ctx_801782BC; -extern PosRot* D_ctx_801782C4; +extern PosRot* gZOSnakePosRots; extern f32* D_ctx_801782CC; extern f32* D_ctx_801782D4; extern f32* D_ctx_801782DC; extern f32* D_ctx_801782E4; extern f32* D_ctx_801782EC; extern UNK_TYPE F_801782F4; -extern s32 D_ctx_801782FC; +extern s32 gDynaFloorTimer; extern UNK_TYPE F_80178304; extern UNK_TYPE F_8017830C; extern UNK_TYPE F_80178314; diff --git a/include/functions.h b/include/functions.h index 81fa1215..1e70e995 100644 --- a/include/functions.h +++ b/include/functions.h @@ -21,7 +21,7 @@ void Actor272_Draw(Actor*); bool AllRange_PlayMessage(u16*, RadioCharacterId); void AllRange_GreatFoxRepair(Player*); void AllRange_ClearRadio(void); -void func_360_8002EE64(Actor* this); +void ActorAllRange_SetShadowData(Actor* this); void ActorAllRange_SpawnTeam(void); void ActorAllRange_PlayMessage(u16* msg, RadioCharacterId character); void ActorAllRange_UpdateStarWolfEvents(Actor*); @@ -48,7 +48,6 @@ void Background_DrawSun(void); void Background_DrawLensFlare(void); void Background_dummy_80040CDC(void); void Background_DrawGround(void); -void func_bg_80042D38(void); // fox_boss void Boss_AwardBonus(Boss* boss); @@ -227,7 +226,7 @@ void Actor_SetupPlayerShot(PlayerShotId, PlayerShot*, s32, f32, f32, f32, f32, f void Actor_SpawnPlayerLaser(s32, f32, f32, f32, f32, f32, f32, f32, f32, f32); void Actor_SpawnGreatFoxLaser(s32 actorId, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 xRot, f32 yRot, f32 zRot); -void ActorEvent_8006F0D8(f32 xPos, f32 yPos, f32 zPos, f32 scale1); +void ActorEvent_SpawnEffect347(f32 xPos, f32 yPos, f32 zPos, f32 scale1); void ActorEvent_8006F254(Actor*); void ActorEvent_Update(Actor*); s32 Scenery111_Draw(Scenery*); @@ -373,10 +372,7 @@ void func_effect_80083FA8(Effect*); void func_effect_80084194(Effect*); // fox_fade -void func_fade_80084370(s32); -void func_fade_800843FC(s32); -void func_fade_80084488(s32); -void func_fade_80084688(s32, s32); +void Wipe_Draw(WipeMode mode, s32 frame); // fox_hud void func_hud_80084B94(s32); diff --git a/include/gfx.h b/include/gfx.h index 38a54724..249861e1 100644 --- a/include/gfx.h +++ b/include/gfx.h @@ -64,10 +64,20 @@ #define VTX_T(x,y,z,s,t,cr,cg,cb,a) { { x, y, z }, 0, { s, t }, { cr, cg, cb, a } } +typedef enum WipeMode { + WIPE_CIRCULAR, + WIPE_HORIZONTAL, + WIPE_VERTICAL, +} WipeMode; + typedef struct { u8 r, g, b; } Color_RGB8; // size = 0x3 +typedef struct Color_RGBA32 { + u8 r, g, b, a; +} Color_RGBA32; // size = 0x4 + typedef union { u16 data[SCREEN_HEIGHT * SCREEN_WIDTH]; u16 array[SCREEN_HEIGHT][SCREEN_WIDTH]; diff --git a/include/prevent_context_reordering.h b/include/prevent_context_reordering.h index 968253ae..2fdd6c20 100644 --- a/include/prevent_context_reordering.h +++ b/include/prevent_context_reordering.h @@ -8,9 +8,9 @@ // struct Dummy3 {int x;}; // struct Dummy4 {int x;}; // struct Dummy5 {int x;}; -struct Dummy6 {int x;}; -struct Dummy7 {int x;}; -struct Dummy8 {int x;}; +// struct Dummy6 {int x;}; +// struct Dummy7 {int x;}; +// struct Dummy8 {int x;}; struct Dummy9 {int x;}; struct Dummy10 {int x;}; struct Dummy11 {int x;}; diff --git a/include/sf64event.h b/include/sf64event.h index 96c99b9f..9e75d7f6 100644 --- a/include/sf64event.h +++ b/include/sf64event.h @@ -325,8 +325,8 @@ typedef enum EventActorId { /* 18 */ EVID_18, /* 19 */ EVID_19, /* 20 */ EVID_20, - /* 21 */ EVID_21, - /* 22 */ EVID_22, + /* 21 */ EVID_A6_MISSILE, + /* 22 */ EVID_A6_ROCKET, /* 23 */ EVID_23, /* 24 */ EVID_24, /* 25 */ EVID_25, @@ -342,12 +342,12 @@ typedef enum EventActorId { /* 35 */ EVID_35, /* 36 */ EVID_36, /* 37 */ EVID_37, - /* 38 */ EVID_38, + /* 38 */ EVID_SX_WARP_GATE, /* 39 */ EVID_39, - /* 40 */ EVID_40, + /* 40 */ EVID_EVENT_HANDLER, /* 41 */ EVID_41, /* 42 */ EVID_42, - /* 43 */ EVID_43, + /* 43 */ EVID_TEAMMATE, /* 44 */ EVID_44, /* 45 */ EVID_45, /* 46 */ EVID_46, @@ -371,28 +371,28 @@ typedef enum EventActorId { /* 64 */ EVID_64, /* 65 */ EVID_65, /* 66 */ EVID_66, - /* 67 */ EVID_67, + /* 67 */ EVID_METEO_PYRAMID_SHIP, /* 68 */ EVID_68, /* 69 */ EVID_69, /* 70 */ EVID_70, - /* 71 */ EVID_71, + /* 71 */ EVID_WING_REPAIR, /* 72 */ EVID_72, /* 73 */ EVID_73, /* 74 */ EVID_74, /* 75 */ EVID_75, /* 76 */ EVID_76, /* 77 */ EVID_77, - /* 78 */ EVID_78, + /* 78 */ EVID_SUPPLY_CRATE, /* 79 */ EVID_79, /* 80 */ EVID_80, /* 81 */ EVID_81, /* 82 */ EVID_82, - /* 83 */ EVID_83, + /* 83 */ EVID_AQ_CLAM, /* 84 */ EVID_84, - /* 85 */ EVID_85, - /* 86 */ EVID_86, + /* 85 */ EVID_BILL, + /* 86 */ EVID_KATT, /* 87 */ EVID_87, - /* 88 */ EVID_88, + /* 88 */ EVID_AQ_STARFISH, /* 89 */ EVID_89, /* 90 */ EVID_90, /* 91 */ EVID_91, @@ -406,12 +406,12 @@ typedef enum EventActorId { /* 99 */ EVID_99, /* 100 */ EVID_100, /* 101 */ EVID_101, - /* 102 */ EVID_102, - /* 103 */ EVID_103, - /* 104 */ EVID_104, - /* 105 */ EVID_105, - /* 106 */ EVID_106, - /* 107 */ EVID_107, + /* 102 */ EVID_TR_BARRIER, + /* 103 */ EVID_ANDROSS_GATE, + /* 104 */ EVID_ANDROSS_GATE_2, + /* 105 */ EVID_SX_WARP_ENMY, + /* 106 */ EVID_KILLER_BEE, + /* 107 */ EVID_MA_SHOT_GATE, /* 200 */ EVID_200 = 200, /* 300 */ EVID_300 = 300, /* 4095*/ EVID_FFF = 4095, diff --git a/include/sf64object.h b/include/sf64object.h index 776b8591..1fae1be1 100644 --- a/include/sf64object.h +++ b/include/sf64object.h @@ -101,10 +101,7 @@ typedef struct { /* 0x20 */ f32 yRot; /* 0x24 */ f32 zScale; /* 0x28 */ f32 xyScale; - /* 0x2C */ u8 red; // possibly a color struct - /* 0x2D */ u8 green; - /* 0x2E */ u8 blue; - /* 0x2F */ u8 alpha; + /* 0x2C */ Color_RGBA32 prim; } TexturedLine; // size = 0x30 typedef struct { @@ -155,7 +152,7 @@ typedef struct { typedef struct { /* 0x00 */ Object obj; /* 0x1C */ ObjectInfo info; - /* 0x40 */ u8 unk_40; + /* 0x40 */ u8 pathIndex; /* 0x41 */ char unk_41[7]; /* 0x48 */ f32 sfxSource[3]; /* 0x54 */ f32 unk_54; @@ -170,9 +167,7 @@ typedef struct { /* 0x4C */ s32 timer_4C; /* 0x50 */ s8 dmgType; /* 0x54 */ s32 dmgPart; - /* 0x58 */ f32 unk_58; - /* 0x5C */ f32 unk_5C; - /* 0x60 */ f32 unk_60; + /* 0x58 */ Vec3f effectVel; /* 0x64 */ Vec3f vel; /* 0x70 */ f32 sfxSource[3]; /* 0x7C */ char pad7C[4]; @@ -183,9 +178,9 @@ typedef struct { /* 0x1C */ ObjectInfo info; /* 0x40 */ s32 index; /* 0x44 */ char pad44[1]; - /* 0x45 */ u8 unk_45; - /* 0x46 */ s8 unk_46; - /* 0x48 */ s32 unk_48; + /* 0x45 */ u8 sceneryId; + /* 0x46 */ s8 destroy; + /* 0x48 */ s32 toLeft; } Sprite; // size = 0x4C typedef struct { @@ -245,19 +240,19 @@ typedef struct { /* 0x058 */ s16 timer_058; /* 0x05A */ s16 timer_05A; /* 0x05C */ s16 timer_05C; - /* 0x05E */ u8 unk_05E; + /* 0x05E */ u8 drawShadow; /* 0x060 */ s16 health; /* 0x062 */ s8 dmgType; /* 0x064 */ s16 damage; /* 0x066 */ s16 dmgPart; - /* 0x068 */ f32 unk_068; + /* 0x068 */ f32 yOffset; /* 0x06C */ Vec3f vel; - /* 0x078 */ Vec3f unk_078; + /* 0x078 */ Vec3f rot_078; /* 0x084 */ f32 gravity; /* 0x088 */ s16 swork[40]; /* 0x0D8 */ f32 fwork[50]; /* 0x1A0 */ Vec3f vwork[50]; - /* 0x3F8 */ f32 unk_3F8; + /* 0x3F8 */ f32 scale; /* 0x3FC */ f32 sfxSource[3]; } Boss; // size = 0x408 @@ -279,10 +274,10 @@ typedef struct { /* 0x048 */ s16 unk_048; /* 0x04A */ s16 unk_04A; /* 0x04C */ s16 timer_04C; - /* 0x04E */ s16 unk_04E; + /* 0x04E */ s16 counter_04E; /* 0x050 */ s32 iwork[25]; - /* 0x0B4 */ s16 unk_0B4; - /* 0x0B6 */ s16 unk_0B6; + /* 0x0B4 */ s16 eventType; + /* 0x0B6 */ s16 animFrame; // used for model type in ActorAllRange and ActorCutscene /* 0x0B8 */ s16 state; /* 0x0BA */ char pad0BA[0x2]; /* 0x0BC */ u16 timer_0BC; @@ -291,8 +286,8 @@ typedef struct { /* 0x0C2 */ u16 timer_0C2; /* 0x0C4 */ u16 timer_0C4; /* 0x0C6 */ u16 timer_0C6; - /* 0x0C8 */ u8 unk_0C8; - /* 0x0C9 */ u8 unk_0C9; + /* 0x0C8 */ u8 unk_0C8; // may have been used for scenery shadowing + /* 0x0C9 */ u8 drawShadow; /* 0x0CA */ u8 lockOnTimers[4]; /* 0x0CE */ s16 health; /* 0x0D0 */ s8 dmgType; @@ -300,10 +295,10 @@ typedef struct { /* 0x0D4 */ s16 dmgSource; /* 0x0D6 */ u16 damage; /* 0x0D8 */ Vec3f hitPos; - /* 0x0E4 */ s16 aiType; - /* 0x0E6 */ s16 aiIndex; + /* 0x0E4 */ s16 aiType; // Actor index for AllRange, script index for Event + /* 0x0E6 */ s16 aiIndex; // Target index for AllRange, program counter for Event /* 0x0E8 */ Vec3f vel; - /* 0x0F4 */ Vec3f unk_0F4; + /* 0x0F4 */ Vec3f rot_0F4; /* 0x100 */ f32 sfxSource[3]; /* 0x10C */ f32 gravity; /* 0x110 */ f32 scale; diff --git a/include/sf64player.h b/include/sf64player.h index 22f78580..4a1a5de5 100644 --- a/include/sf64player.h +++ b/include/sf64player.h @@ -205,10 +205,10 @@ typedef struct Player { /* 0x104 */ Vec3f rot_104; /* 0x110 */ f32 boostSpeed; /* 0x114 */ f32 yRot_114; - /* 0x118 */ f32 yRot_118; + /* 0x118 */ f32 pathChangeYaw; /* 0x11C */ f32 yRotVel_11C; /* 0x120 */ f32 xRot_120; - /* 0x124 */ f32 xRot_124; + /* 0x124 */ f32 pathChangePitch; /* 0x128 */ char pad128[4]; /* 0x12C */ f32 zRotBank; /* 0x130 */ f32 zRotBarrelRoll; @@ -237,7 +237,7 @@ typedef struct Player { /* 0x18C */ f32 unk_18C; /* 0x190 */ f32 unk_190; /* 0x194 */ f32 unk_194; - /* 0x198 */ s32 savedCockpitView; + /* 0x198 */ s32 savedAlternateView; /* 0x19C */ s32 unk_19C; /* 0x1A0 */ s32 unk_1A0; /* 0x1A4 */ s32 unk_1A4; @@ -266,7 +266,7 @@ typedef struct Player { /* 0x204 */ s32 unk_204; /* 0x208 */ s32 unk_208; /* 0x20C */ s32 unk_20C; - /* 0x210 */ s32 timer_210; + /* 0x210 */ s32 pathChangeTimer; /* 0x214 */ s32 timer_214; /* 0x218 */ s32 timer_218; /* 0x21C */ s32 unk_21C; @@ -276,7 +276,7 @@ typedef struct Player { /* 0x22C */ s32 whooshTimer; /* 0x230 */ s32 unk_230; /* 0x234 */ s32 unk_234; - /* 0x238 */ s32 cockpitView; + /* 0x238 */ s32 alternateView; /* 0x23C */ s32 shadowing; /* 0x240 */ s32 unk_240; /* 0x244 */ s32 shotTimer; diff --git a/include/sf64thread.h b/include/sf64thread.h index e3d20022..8e439612 100644 --- a/include/sf64thread.h +++ b/include/sf64thread.h @@ -86,7 +86,7 @@ void Timer_CompleteTask(TimerTask*); void Timer_Wait(u64); void Fault_ThreadEntry(OSMesg); -void func_80007FE4(FrameBuffer*, u16, u16); +void Fault_SetFrameBuffer(FrameBuffer*, u16, u16); void Fault_Init(void); typedef enum { diff --git a/include/sys.h b/include/sys.h index f457a849..9c22f97c 100644 --- a/include/sys.h +++ b/include/sys.h @@ -40,18 +40,18 @@ s32 vsprintf(char* dst, const char* fmt, va_list args); void Game_Initialize(void); void Game_Update(void); -extern s32 gShowCrosshairs[]; -extern s32 D_game_800D2870; +extern bool gShowCrosshairs[]; +extern bool D_game_800D2870; -extern f32 D_game_80161A10; -extern f32 D_game_80161A14; +extern f32 gNextVsViewScale; +extern f32 gVsViewScale; extern s32 gPlayerInactive[4]; -extern s32 D_game_80161A28; +extern s32 gVsMenuSelection; extern u8 gShowHud; extern u16 gNextLevelPhase; extern u16 gNextLevel; extern u16 gNextGameState; -extern u16 D_game_80161A34; +extern u16 gLastGameState; extern u16 gBgColor; extern u8 gBlurAlpha; extern u8 gGameStandby; diff --git a/include/variables.h b/include/variables.h index 2080cfa7..5e0579c8 100644 --- a/include/variables.h +++ b/include/variables.h @@ -20,7 +20,7 @@ extern Vec3f D_tank_800C9F2C; // fox_display extern s32 D_display_800CA220; -extern f32 D_display_800CA230; +extern f32 gCamDistortion; extern Actor* gTeamHelpActor; extern s32 gTeamHelpTimer; diff --git a/linker_scripts/us/symbol_addrs_engine.txt b/linker_scripts/us/symbol_addrs_engine.txt index 8cb30781..73707f79 100644 --- a/linker_scripts/us/symbol_addrs_engine.txt +++ b/linker_scripts/us/symbol_addrs_engine.txt @@ -197,7 +197,7 @@ func_edisplay_8005B848 = 0x8005B848; func_edisplay_8005B9A4 = 0x8005B9A4; func_edisplay_8005BA30 = 0x8005BA30; func_edisplay_8005BAAC = 0x8005BAAC; -func_edisplay_8005BAB4 = 0x8005BAB4; +Object_SetShadowDL = 0x8005BAB4; ItemCheckpoint_Draw = 0x8005C5F0; ItemSilverRing_Draw = 0x8005C900; ItemSilverStar_Draw = 0x8005C9C0; @@ -348,18 +348,18 @@ TexturedLine_UpdateAll = 0x8006A38C; Object_Update = 0x8006A3E8; // fox_enmy2 -D_800D0DBC = 0x800D0DBC;//size:24 +sEventTexLineColors = 0x800D0DBC;//size:24 // fox_game -D_game_80161A10 = 0x80161A10; -D_game_80161A14 = 0x80161A14; +gNextVsViewScale = 0x80161A10; +gVsViewScale = 0x80161A14; gPlayerInactive = 0x80161A18; //size:0x10 -D_game_80161A28 = 0x80161A28; +gVsMenuSelection = 0x80161A28; gShowHud = 0x80161A2C; gNextLevelPhase = 0x80161A2E; gNextLevel = 0x80161A30; gNextGameState = 0x80161A32; -D_game_80161A34 = 0x80161A34; +gLastGameState = 0x80161A34; gBgColor = 0x80161A36; gBlurAlpha = 0x80161A38; gGameStandby = 0x80161A39; @@ -402,7 +402,7 @@ gArwingSpeed = 0x80161A54; D_play_80161A5C = 0x80161A5C; gScreenFlashTimer = 0x80161A60; gDropHitCountItem = 0x80161A62; -D_play_80161A64 = 0x80161A64; +sPlayWingSplash = 0x80161A64; sEnvironment = 0x80161A68; gVenomHardClear = 0x800D2F68; //type:u8 @@ -489,8 +489,8 @@ D_ctx_801779A8 = 0x801779A8; gCsCamAtY = 0x801779B8; gCsCamAtZ = 0x801779C0; gChargeTimers = 0x801779C8; -gPlayerCamEye = 0x801779D8; -gPlayerCamAt = 0x801779E8; +gPlayCamEye = 0x801779D8; +gPlayCamAt = 0x801779E8; gExpertMode = 0x801779F8; gUturnDownTimers = 0x80177A00; D_ctx_80177A10 = 0x80177A10;//size:0x28 @@ -499,9 +499,9 @@ D_ctx_80177A48 = 0x80177A48;//size:0x28 gLoopDownTimers = 0x80177A70;//size:0x10 gCsFrameCount = 0x80177A80; gLoopBoostTimers = 0x80177A88;//size:0x10 -D_ctx_80177A98 = 0x80177A98; +gDrawGround = 0x80177A98; gMuzzleFlashScale = 0x80177AA0; -D_ctx_80177AB0 = 0x80177AB0; +gDrawBackdrop = 0x80177AB0; gShieldAlpha = 0x80177AB8; gAqDrawMode = 0x80177AC8; gHasShield = 0x80177AD0; @@ -519,7 +519,7 @@ gMissionMedal = 0x80177BB0; gControllerRumbleTimers = 0x80177BD0; gPlanetPathStatus = 0x80177BD8; gPlayerScores = 0x80177C30; -D_ctx_80177C50 = 0x80177C50; +gCircleWipeFrame = 0x80177C50; D_ctx_80177C58 = 0x80177C58; gOptionSoundMode = 0x80177C74; gVolumeSettings = 0x80177C80; @@ -558,7 +558,7 @@ gTeamArrowsViewPos = 0x80177E98; gFormationInitPos = 0x80177F10; D_ctx_80177F20 = 0x80177F20; //size:0xF4 D_ctx_80178028 = 0x80178028; //size:0xF4 -D_ctx_8017812C = 0x8017812C; +gGroundClipMode = 0x8017812C; D_ctx_80178130 = 0x80178130; //size:0xF4 gCurrentLevel = 0x80178234; D_ctx_80178238 = 0x80178238;//size:0x3D type:u8 @@ -566,7 +566,7 @@ gLevelPhase = 0x8017827C; gPlayer = 0x80178280; gBossActive = 0x80178284; gStarOffsetsX = 0x80178288; -D_ctx_8017828C = 0x8017828C; +gKillEventActors = 0x8017828C; gStarOffsetsY = 0x80178290; gUseDynaFloor = 0x80178294; gStarFillColors = 0x80178298; @@ -575,7 +575,7 @@ gCurrentRadioPortrait = 0x801782A4; gScenery360 = 0x801782A8; gRadioStateTimer = 0x801782AC; gRadioMouthTimer = 0x801782B4; -D_ctx_801782B8 = 0x801782B8; +gDrawSmallRocks = 0x801782B8; D_ctx_801782BC = 0x801782BC; D_ctx_801782C0 = 0x801782C0; D_ctx_801782D0 = 0x801782D0; @@ -583,7 +583,7 @@ D_ctx_801782D4 = 0x801782D4; gRadioMsgCharIndex = 0x801782D8; gRadioMsgId = 0x801782E8; gMsgCharIsPrinting = 0x801782F8; -D_ctx_801782FC = 0x801782FC; +gDynaFloorTimer = 0x801782FC; gHideRadio = 0x80178300; gRadioMsg = 0x80178308; gLevelObjects = 0x80178310; @@ -614,15 +614,15 @@ gStarCount = 0x80178410; gStarfieldX = 0x80178420; gStarfieldY = 0x80178424; gStarfieldRoll = 0x80178428; -D_ctx_8017842C = 0x8017842C; -D_ctx_80178430 = 0x80178430; -D_ctx_80178440 = 0x80178440; -D_ctx_80178444 = 0x80178444; -D_ctx_80178448 = 0x80178448; +gStarfieldScrollX = 0x8017842C; +gStarfieldScrollY = 0x80178430; +gBossDeathCamAtX = 0x80178440; +gBossDeathCamAtY = 0x80178444; +gBossDeathCamAtZ = 0x80178448; gCameraShakeY = 0x8017847C; gCameraShake = 0x80178480; gLoadLevelObjects = 0x80178488; -D_ctx_801784A4 = 0x801784A4; +gZOSnakeWaypointCount = 0x801784A4; gGroundType = 0x801784AC; gLight1xRot = 0x801784B8; gLight1yRot = 0x801784BC; @@ -728,12 +728,12 @@ Player_ArwingBank = 0x800ADA28; Player_UseTankJets = 0x800ADD98; Player_UpdatePath = 0x800ADF58; Player_CheckBounds360 = 0x800AE278; -Player_ArwingMove360 = 0x800AE4A4; +Player_MoveArwing360 = 0x800AE4A4; Player_PerformLoop = 0x800AECAC; -Player_ArwingMoveOnRails = 0x800AF07C; -Player_TankMove360 = 0x800AF928; +Player_MoveArwingOnRails = 0x800AF07C; +Player_MoveTank360 = 0x800AF928; Player_OnFootUpdateSpeed = 0x800B00C0; -Player_OnFootMove = 0x800B0194; +Player_MoveOnFoot = 0x800B0194; Player_Setup = 0x800B0F50; Player_UpdateArwingRoll = 0x800B2130; Player_UpdateTankRoll = 0x800B22C0; diff --git a/src/engine/fox_360.c b/src/engine/fox_360.c index 0bb58c2c..e026dd71 100644 --- a/src/engine/fox_360.c +++ b/src/engine/fox_360.c @@ -278,7 +278,7 @@ void AllRange_ClearRadio(void) { sStarWolfKillTimer = gRadioState = gActors[1].iwork[1] = gActors[2].iwork[1] = gActors[3].iwork[1] = 0; } -void func_360_8002EE64(Actor* this) { +void ActorAllRange_SetShadowData(Actor* this) { s32 i; s32 colId; Scenery360* scenery360; @@ -297,7 +297,7 @@ void func_360_8002EE64(Actor* this) { s32 pad2; this->fwork[25] = this->fwork[26] = this->fwork[28] = this->fwork[27] = 0.0f; - if ((this->unk_0C9 != 0) && (gLevelMode == LEVELMODE_ALL_RANGE) && (gLevelType == LEVELTYPE_PLANET)) { + if (this->drawShadow && (gLevelMode == LEVELMODE_ALL_RANGE) && (gLevelType == LEVELTYPE_PLANET)) { for (i = 0, scenery360 = gScenery360; i < 200; i++, scenery360++) { if ((scenery360->obj.status == OBJ_ACTIVE) && ((scenery360->obj.id == OBJ_SCENERY_150) || (scenery360->obj.id == OBJ_SCENERY_149) || @@ -387,13 +387,13 @@ void ActorAllRange_SpawnTeam(void) { actor->aiIndex = sTeamSpawnTargets[i]; } actor->state = STATE360_2; - actor->unk_0F4.y = 180.0f; + actor->rot_0F4.y = 180.0f; if (actor->aiIndex <= -1) { actor->state = STATE360_3; } actor->health = 50; if ((gLevelType == LEVELTYPE_PLANET) || (gCurrentLevel == LEVEL_BOLSE)) { - actor->unk_0C9 = 1; + actor->drawShadow = true; } actor->iwork[11] = 1; if (actor->aiType <= AI360_PEPPY) { @@ -434,11 +434,11 @@ void ActorAllRange_SpawnStarWolf(void) { actor->aiIndex = sStarWolfSpawnTargets[i]; gActors[actor->aiIndex].aiIndex = -1; actor->health = 100; - actor->unk_0C9 = 1; - actor->unk_0F4.y = 225.0f; + actor->drawShadow = true; + actor->rot_0F4.y = 225.0f; actor->state = STATE360_0; actor->timer_0BC = 250; - actor->unk_0F4.x = -20.0f; + actor->rot_0F4.x = -20.0f; actor->iwork[11] = 1; if (gCurrentLevel == LEVEL_VENOM_2) { actor->obj.rot.z = sStarWolfVE2SpawnRot[i]; @@ -534,7 +534,7 @@ void ActorAllRange_UpdateStarWolfEvents(Actor* this) { if (actor->aiType == AI360_WOLF) { if (gCurrentLevel != LEVEL_VENOM_2) { actor->state = STATE360_3; - actor->unk_04E = 300; + actor->counter_04E = 300; } } else { actor->state = STATE360_3; @@ -562,7 +562,7 @@ void ActorAllRange_ChooseNewTarget(Actor* actor) { s32 enemyId; for (enemyId = AI360_10, enemy = &gActors[AI360_10]; enemyId < ARRAY_COUNT(gActors); enemyId++, enemy++) { - if ((enemy->obj.status == OBJ_ACTIVE) && (enemy->obj.id == OBJ_ACTOR_ALLRANGE) && (enemy->unk_0B6 == 0) && + if ((enemy->obj.status == OBJ_ACTIVE) && (enemy->obj.id == OBJ_ACTOR_ALLRANGE) && (enemy->animFrame == 0) && (enemy->aiIndex <= -1)) { alreadyTaken = false; for (teamId = AI360_FALCO, team = &gActors[AI360_FALCO]; teamId <= AI360_PEPPY; teamId++, team++) { @@ -829,7 +829,7 @@ void ActorAllRange_ApplyDamage(Actor* this) { } if (this->dmgType != DMG_NONE) { var_a1 = false; - if ((this->unk_0B6 == 3) || + if ((this->animFrame == 3) || ((gCurrentLevel == LEVEL_BOLSE) && (gBosses[1].obj.status != OBJ_FREE) && (this->aiType >= AI360_WOLF)) || ((gCurrentLevel == LEVEL_VENOM_2) && (this->aiType >= AI360_WOLF) && (this->aiType < AI360_10) && @@ -920,7 +920,7 @@ void ActorAllRange_ApplyDamage(Actor* this) { if (this->damage >= 20) { this->timer_0BC = 0; } - if ((gCurrentLevel == LEVEL_KATINA) && (this->unk_0B6 == 1) && (this->dmgSource == AI360_FOX + 1)) { + if ((gCurrentLevel == LEVEL_KATINA) && (this->animFrame == 1) && (this->dmgSource == AI360_FOX + 1)) { if (gKaAllyKillCount < 2) { ActorAllRange_PlayMessage(gMsg_ID_18018, RCID_BILL); } @@ -1028,7 +1028,7 @@ void ActorAllRange_ApplyDamage(Actor* this) { } func_effect_8007D10C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1.5f); if (this->aiType < AI360_GREAT_FOX) { - Matrix_RotateY(gCalcMatrix, this->unk_0F4.y * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, this->rot_0F4.y * M_DTOR, MTXF_NEW); sp48.x = 30.0f; if (Rand_ZeroOne() < 0.5f) { sp48.x = -30.0f; @@ -1067,7 +1067,7 @@ void ActorAllRange_ApplyDamage(Actor* this) { } else if (this->dmgSource <= AI360_PEPPY + 101) { if (this->aiType >= AI360_WOLF) { if (this->dmgSource == AI360_FOX + 1) { - if ((gCurrentLevel == LEVEL_KATINA) && (this->unk_0B6 == 1) && !gKaKilledAlly) { + if ((gCurrentLevel == LEVEL_KATINA) && (this->animFrame == 1) && !gKaKilledAlly) { gKaKilledAlly = true; Radio_PlayMessage(gMsg_ID_18015, RCID_BILL); } else if (this->aiType == AI360_KATT) { @@ -1250,8 +1250,8 @@ void ActorAllRange_Update(Actor* this) { switch (this->state) { case STATE360_7: case STATE360_8: - if (this->unk_0F4.x > 180.0f) { - this->unk_0F4.x -= 360.0f; + if (this->rot_0F4.x > 180.0f) { + this->rot_0F4.x -= 360.0f; } this->unk_046 = 0; break; @@ -1407,16 +1407,16 @@ void ActorAllRange_Update(Actor* this) { if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_START_360) { this->fwork[0] = this->fwork[1] = 40.0f; if (gActors[0].state == STATE360_5) { - Math_SmoothStepToF(&this->unk_0F4.x, 30.0f, 0.1f, 0.5f, 0.0f); + Math_SmoothStepToF(&this->rot_0F4.x, 30.0f, 0.1f, 0.5f, 0.0f); this->fwork[1] = 200.0f; } if (this->timer_0BC == 0) { if (this->aiType == AI360_WOLF) { this->state = STATE360_3; if (gCurrentLevel == LEVEL_VENOM_2) { - this->unk_04E = 200; + this->counter_04E = 200; } else { - this->unk_04E = 200; + this->counter_04E = 200; } } else { this->state = STATE360_2; @@ -1432,7 +1432,7 @@ void ActorAllRange_Update(Actor* this) { case STATE360_1: this->fwork[1] = 40.0f; if ((this->timer_0BC < 35) && (gCurrentLevel == LEVEL_FORTUNA)) { - Math_SmoothStepToF(&this->unk_0F4.x, 15.0f, 0.1f, 1.0f, 0.0f); + Math_SmoothStepToF(&this->rot_0F4.x, 15.0f, 0.1f, 1.0f, 0.0f); } if (this->timer_0BC == 0) { this->state = STATE360_3; @@ -1451,7 +1451,7 @@ void ActorAllRange_Update(Actor* this) { sp10F = 0xB; if (this->aiType == AI360_FALCO) { spF0 = 0.5f; - } else if ((this->unk_0B6 != 2) && (this->unk_0B6 == 3)) { + } else if ((this->animFrame != 2) && (this->animFrame == 3)) { spF0 = 0.5f; } if (this->aiIndex == AI360_FOX) { @@ -1470,7 +1470,7 @@ void ActorAllRange_Update(Actor* this) { if ((gPlayer[0].somersault && (this->iwork[4] > 10)) || ((gCurrentLevel == LEVEL_BOLSE) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY))) { this->state = STATE360_3; - this->unk_04E = 300; + this->counter_04E = 300; this->timer_0BC = 160; if (this->aiType == AI360_WOLF) { ActorAllRange_PlayMessage(gMsg_ID_9369, RCID_WOLF); @@ -1822,10 +1822,10 @@ void ActorAllRange_Update(Actor* this) { this->iwork[2] = AI360_FOX; } if (this->aiIndex == AI360_FOX) { - if (this->unk_04E != 0) { - this->unk_04E--; + if (this->counter_04E != 0) { + this->counter_04E--; } - if (this->unk_04E == 0) { + if (this->counter_04E == 0) { this->state = STATE360_2; this->iwork[2] = AI360_FOX; } @@ -1833,9 +1833,9 @@ void ActorAllRange_Update(Actor* this) { break; case STATE360_7: this->fwork[1] = 40.0f; - Math_SmoothStepToF(&this->unk_0F4.x, 360.0f, 0.1f, 5.0f, 0.0001f); + Math_SmoothStepToF(&this->rot_0F4.x, 360.0f, 0.1f, 5.0f, 0.0001f); Math_SmoothStepToAngle(&this->obj.rot.z, 0.0f, 0.1f, 3.0f, 0.01f); - if (this->unk_0F4.x > 350.0f) { + if (this->rot_0F4.x > 350.0f) { this->state = STATE360_3; } break; @@ -1848,19 +1848,19 @@ void ActorAllRange_Update(Actor* this) { } switch (this->unk_046) { case 0: - Math_SmoothStepToF(&this->unk_0F4.x, 200.0f, 0.1f, 6.0f, 0.0001f); - if (this->unk_0F4.x > 190.0f) { - this->unk_0F4.y += 190.0f; - if (this->unk_0F4.y >= 360.0f) { - this->unk_0F4.y -= 360.0f; + Math_SmoothStepToF(&this->rot_0F4.x, 200.0f, 0.1f, 6.0f, 0.0001f); + if (this->rot_0F4.x > 190.0f) { + this->rot_0F4.y += 190.0f; + if (this->rot_0F4.y >= 360.0f) { + this->rot_0F4.y -= 360.0f; } - this->unk_0F4.x = 360.0f - (this->unk_0F4.x - 180.0f); + this->rot_0F4.x = 360.0f - (this->rot_0F4.x - 180.0f); this->obj.rot.z += 180.0f; if (this->obj.rot.z >= 360.0f) { this->obj.rot.z -= 360.0f; } this->timer_0BC = 40; - this->unk_046 += 1; + this->unk_046++; } this->obj.pos.y -= 3.0f; break; @@ -1873,7 +1873,7 @@ void ActorAllRange_Update(Actor* this) { break; case STATE360_9: this->fwork[1] = 40.0f; - if (Math_SmoothStepToAngle(&this->unk_0F4.y, this->fwork[19], 0.5f, 5.0f, 0.0f) < 0.0f) { + if (Math_SmoothStepToAngle(&this->rot_0F4.y, this->fwork[19], 0.5f, 5.0f, 0.0f) < 0.0f) { spD0 = 70.0f; } else { spD0 = 290.0f; @@ -1903,7 +1903,7 @@ void ActorAllRange_Update(Actor* this) { if (gCurrentLevel == LEVEL_VENOM_2) { var_v0 = 2 - 1; } - if (!((this->index + gGameFrameCount) & var_v0)) { + if (((this->index + gGameFrameCount) & var_v0) == 0) { this->fwork[19] = Math_RadToDeg(Math_Atan2F(spE4, spDC)); this->fwork[20] = Math_RadToDeg(Math_Atan2F(spE0, sqrtf(SQ(spE4) + SQ(spDC)))); } @@ -1939,11 +1939,11 @@ void ActorAllRange_Update(Actor* this) { } } else if ((this->obj.pos.y < (gGroundHeight + 50.0f)) && (spD8 > 180.0f)) { spD8 = 0.0f; - this->unk_0F4.x = 0.0f; + this->rot_0F4.x = 0.0f; } } - Math_SmoothStepToAngle(&this->unk_0F4.x, spD8, 0.5f, this->fwork[2], 0.0001f); - spD0 = Math_SmoothStepToAngle(&this->unk_0F4.y, spD4, 0.5f, this->fwork[2], 0.0001f) * 30.0f; + Math_SmoothStepToAngle(&this->rot_0F4.x, spD8, 0.5f, this->fwork[2], 0.0001f); + spD0 = Math_SmoothStepToAngle(&this->rot_0F4.y, spD4, 0.5f, this->fwork[2], 0.0001f) * 30.0f; if (spD0 < 0.0f) { spD0 = spD0 * -1.0f; } else { @@ -1979,8 +1979,8 @@ void ActorAllRange_Update(Actor* this) { } } } - this->obj.rot.x = -this->unk_0F4.x; - this->obj.rot.y = this->unk_0F4.y; + this->obj.rot.x = -this->rot_0F4.x; + this->obj.rot.y = this->rot_0F4.y; Math_SmoothStepToF(&this->fwork[0], this->fwork[1], 0.2f, 1.0f, 0.1f); Math_SmoothStepToF(&this->fwork[2], this->fwork[3], 1.0f, 0.1f, 0.1f); spC0 = SIN_DEG(this->obj.rot.x); @@ -2053,7 +2053,7 @@ void ActorAllRange_Update(Actor* this) { radarMark->pos.x = this->obj.pos.x; radarMark->pos.y = this->obj.pos.y; radarMark->pos.z = this->obj.pos.z; - radarMark->yRot = this->unk_0F4.y + 180.0f; + radarMark->yRot = this->rot_0F4.y + 180.0f; if (this->iwork[1] != 0) { this->iwork[1]--; if ((this->iwork[1] == 0) && (gActors[0].state == STATE360_2) && (gRadioState == 0)) { @@ -2106,7 +2106,7 @@ void ActorAllRange_Update(Actor* this) { } } if (gCurrentLevel == LEVEL_FORTUNA) { - func_360_8002EE64(this); + ActorAllRange_SetShadowData(this); } else if (gCurrentLevel == LEVEL_VENOM_ANDROSS) { this->unk_04A++; if (this->unk_04A >= Animation_GetFrameCount(&D_VE2_600C200)) { @@ -2258,7 +2258,7 @@ void ActorAllRange_Draw(ActorAllRange* this) { break; case AI360_GREAT_FOX: Display_SetSecondLight(&this->obj.pos); - this->unk_0B6 = 1; + this->animFrame = 1; ActorCutscene_Draw(this); break; case AI360_MISSILE: @@ -2278,7 +2278,7 @@ void ActorAllRange_Draw(ActorAllRange* this) { Matrix_Scale(gGfxMatrix, 1.5f, 1.5f, 1.5f, MTXF_APPLY); Actor_DrawEngineGlow(this, 2); } else if (gCurrentLevel == LEVEL_KATINA) { - switch (this->unk_0B6) { + switch (this->animFrame) { case 0: gSPDisplayList(gMasterDisp++, aKaEnemy1LowPolyDL); break; diff --git a/src/engine/fox_A48A0.c b/src/engine/fox_A48A0.c index 677cf218..acda833b 100644 --- a/src/engine/fox_A48A0.c +++ b/src/engine/fox_A48A0.c @@ -22,11 +22,7 @@ void func_800A3E00(void) { case 1: D_ctx_80177868 = 2; gDrawMode = DRAW_UNK_7; - gCsCamAtY = 0.0f; - gCsCamAtX = gCsCamAtY; - gCsCamEyeZ = gCsCamAtX; - gCsCamEyeY = gCsCamEyeZ; - gCsCamEyeX = gCsCamEyeY; + gCsCamEyeX = gCsCamEyeY = gCsCamEyeZ = gCsCamAtX = gCsCamAtY = 0.0f; gCsCamAtZ = -10.0f; break; case 2: diff --git a/src/engine/fox_beam.c b/src/engine/fox_beam.c index 5f28e4eb..5160d6f1 100644 --- a/src/engine/fox_beam.c +++ b/src/engine/fox_beam.c @@ -126,9 +126,9 @@ void PlayerShot_Impact(PlayerShot* shot) { Object_Kill(&shot->obj, shot->sfxSource); return; } - shot->obj.pos.z = D_ctx_80178498; // strange order on the globals - shot->obj.pos.y = D_ctx_801784A0; - shot->obj.pos.x = D_ctx_8017849C; + shot->obj.pos.z = gShotHitPosZ; // strange order on the globals + shot->obj.pos.y = gShotHitPosY; + shot->obj.pos.x = gShotHitPosX; if ((shot->obj.id == PLAYERSHOT_BOMB) || ((gCurrentLevel != LEVEL_AQUAS) && (shot->obj.id == PLAYERSHOT_LOCK_ON) && (shot->unk_5C != 0))) { if (shot->obj.id == PLAYERSHOT_LOCK_ON) { @@ -391,10 +391,10 @@ s32 PlayerShot_CheckEventHitbox(PlayerShot* shot, Actor* actor) { Matrix_RotateX(gCalcMatrix, -actor->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, -actor->obj.rot.y * M_DTOR, MTXF_APPLY); } - if (((actor->vwork[29].z != 0.0f) || (actor->vwork[29].x != 0.0f) || (actor->unk_0F4.z != 0.0f) || + if (((actor->vwork[29].z != 0.0f) || (actor->vwork[29].x != 0.0f) || (actor->rot_0F4.z != 0.0f) || (actor->vwork[29].y != 0.0f)) && - (actor->unk_0B4 != EVID_31)) { - Matrix_RotateZ(gCalcMatrix, -(actor->vwork[29].z + actor->unk_0F4.z) * M_DTOR, MTXF_APPLY); + (actor->eventType != EVID_31)) { + Matrix_RotateZ(gCalcMatrix, -(actor->vwork[29].z + actor->rot_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); } @@ -686,9 +686,10 @@ void PlayerShot_ApplyDamageToActor(PlayerShot* shot, Actor* actor, s32 hitIndex) actor->hitPos.y = shot->obj.pos.y; actor->hitPos.z = shot->obj.pos.z; if (((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->dmgPart == 0) && - ((actor->unk_0B4 == EVID_48) || (actor->unk_0B4 == EVID_49) || (actor->unk_0B4 == EVID_50))) || + ((actor->eventType == EVID_48) || (actor->eventType == EVID_49) || (actor->eventType == EVID_50))) || ((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->fwork[23] > 1.0f)) || - ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->dmgPart == 0) && (actor->unk_0B4 == EVID_67)) || + ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->dmgPart == 0) && + (actor->eventType == EVID_METEO_PYRAMID_SHIP)) || ((actor->obj.id == OBJ_ACTOR_261) && (shot->obj.id != PLAYERSHOT_LOCK_ON) && ((actor->state < 3) || (actor->state >= 5))) || ((actor->obj.id == OBJ_ACTOR_260) && (shot->obj.id != PLAYERSHOT_LOCK_ON) && (actor->timer_0BC != 0))) { @@ -713,7 +714,7 @@ void PlayerShot_ApplyDamageToActor(PlayerShot* shot, Actor* actor, s32 hitIndex) actor->timer_0C2 = 3; func_effect_80078E50(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 8.0f); AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); - Play_SpawnHitmark(D_ctx_8017849C, D_ctx_801784A0, D_ctx_80178498); + Play_SpawnHitmark(gShotHitPosX, gShotHitPosY, gShotHitPosZ); } } else { PlayerShot_Impact(shot); @@ -765,13 +766,13 @@ void PlayerShot_CollisionCheck(PlayerShot* shot) { } break; case OBJ_ACTOR_EVENT: - if (actor->unk_0B4 == EVID_42) { + if (actor->eventType == EVID_42) { if (PlayerShot_CheckPolyCollision(shot, ACTOR_EVENT_ID, &actor->obj)) { actor->dmgType = DMG_BEAM; actor->dmgPart = shot->sourceId; return; } - } else if (actor->unk_0B4 == EVID_63) { + } else if (actor->eventType == EVID_63) { test.x = fabsf(actor->obj.pos.x - shot->obj.pos.x); test.y = fabsf(actor->obj.pos.y - shot->obj.pos.y); test.z = fabsf(actor->obj.pos.z - shot->obj.pos.z); @@ -939,11 +940,11 @@ void PlayerShot_CollisionCheck(PlayerShot* shot) { if (sprite->obj.status == OBJ_ACTIVE) { if (sprite->obj.id != OBJ_SPRITE_TI_CACTUS) { if (PlayerShot_CheckSpriteHitbox(shot, sprite)) { - sprite->unk_46 = 1; + sprite->destroy = 1; } } else { if (PlayerShot_CheckObjectHitbox(shot, sprite->info.hitbox, &sprite->obj) != 0) { - sprite->unk_46 = 1; + sprite->destroy = 1; } } } @@ -1125,14 +1126,14 @@ void PlayerShot_DrawLaser(PlayerShot* shot) { } else if (gCurrentLevel == LEVEL_KATINA) { if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO) { if (shot->sourceId > NPC_SHOT_ID + AI360_PEPPY) { - if (gActors[shot->sourceId - NPC_SHOT_ID].unk_0B6 == 0) { + if (gActors[shot->sourceId - NPC_SHOT_ID].animFrame == 0) { var_a1 = 1; } - if (gActors[shot->sourceId - NPC_SHOT_ID].unk_0B6 == 2) { + if (gActors[shot->sourceId - NPC_SHOT_ID].animFrame == 2) { var_a1 = 2; } } - } else if (gActors[shot->sourceId - NPC_SHOT_ID].unk_0B6 == 34) { + } else if (gActors[shot->sourceId - NPC_SHOT_ID].animFrame == 34) { var_a1 = 1; } } @@ -1538,9 +1539,9 @@ void PlayerShot_UpdateShot2(PlayerShot* shot, Player* player) { } for (sp5C.z = 0.0f; sp5C.z <= shot->scale; sp5C.z += 200.0f) { Matrix_MultVec3f(gCalcMatrix, &sp5C, &sp38); - D_ctx_80178498 = shot->obj.pos.z; - D_ctx_801784A0 = shot->obj.pos.y; - D_ctx_8017849C = shot->obj.pos.x; + gShotHitPosZ = shot->obj.pos.z; + gShotHitPosY = shot->obj.pos.y; + gShotHitPosX = shot->obj.pos.x; shot->obj.pos.x = player->pos.x + sp38.x; shot->obj.pos.y = player->pos.y + sp38.y; shot->obj.pos.z = player->trueZpos + sp38.z; @@ -1575,7 +1576,7 @@ void PlayerShot_UpdateShot2(PlayerShot* shot, Player* player) { shot->unk_4C += shot->vel.y; shot->unk_50 += shot->vel.z; if (((gGameFrameCount % 4) == 0)) { - Play_SpawnHitmark(D_ctx_8017849C, D_ctx_801784A0, D_ctx_80178498); + Play_SpawnHitmark(gShotHitPosX, gShotHitPosY, gShotHitPosZ); } if ((fabsf(shot->obj.pos.x - shot->unk_48) < 200.0f) && (fabsf(shot->obj.pos.y - shot->unk_4C) < 200.0f) && (fabsf(shot->obj.pos.z - shot->unk_50) < 200.0f)) { @@ -1823,18 +1824,18 @@ void PlayerShot_CheckBossHitbox(PlayerShot* shot) { } void PlayerShot_SetBombLight(PlayerShot* shot) { - static u8 D_800C9C18[4] = { 255, 255, 32, 32 }; - static u8 D_800C9C1C[4] = { 255, 32, 255, 32 }; - static u8 D_800C9C20[4] = { 32, 32, 32, 255 }; + static u8 sPlayerReds[4] = { 255, 255, 32, 32 }; + static u8 sPlayerGreens[4] = { 255, 32, 255, 32 }; + static u8 sPlayerBlues[4] = { 32, 32, 32, 255 }; f32 brightness; gLight3x = shot->obj.pos.x; gLight3y = shot->obj.pos.y; gLight3z = shot->obj.pos.z; if (gVersusMode) { - gLight3R = D_800C9C18[shot->sourceId]; - gLight3G = D_800C9C1C[shot->sourceId]; - gLight3B = D_800C9C20[shot->sourceId]; + gLight3R = sPlayerReds[shot->sourceId]; + gLight3G = sPlayerGreens[shot->sourceId]; + gLight3B = sPlayerBlues[shot->sourceId]; } else { gLight3R = 90; gLight3G = 90; @@ -1881,7 +1882,7 @@ void PlayerShot_ApplyExplosionDamage(PlayerShot* shot, s32 damage) { dy = sprite->obj.pos.y - shot->obj.pos.y; dz = sprite->obj.pos.z - shot->obj.pos.z; if (sqrtf(SQ(dx) + SQ(dy) + SQ(dz)) < radius) { - sprite->unk_46 = 1; + sprite->destroy = 1; } } } @@ -1905,8 +1906,8 @@ void PlayerShot_ApplyExplosionDamage(PlayerShot* shot, s32 damage) { if ((actor->obj.id == OBJ_ACTOR_193) || (actor->obj.id == OBJ_ACTOR_186) || (actor->obj.id == OBJ_ACTOR_190) || (actor->obj.id == OBJ_ACTOR_202) || (actor->obj.id == OBJ_ACTOR_201) || (actor->obj.id == OBJ_ACTOR_187) || - ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0B4 == EVID_78)) || - ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0B4 == EVID_38)) || + ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->eventType == EVID_SUPPLY_CRATE)) || + ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->eventType == EVID_SX_WARP_GATE)) || (actor->obj.id == OBJ_ACTOR_196)) { actor->dmgType = DMG_EXPLOSION; actor->dmgPart = 0; @@ -2039,7 +2040,7 @@ void PlayerShot_UpdateBomb(PlayerShot* shot) { PlayerShot_SetBombLight(shot); break; case 1: - D_ctx_8017812C = 2; + gGroundClipMode = 2; shot->obj.rot.y += 1.0f; Math_SmoothStepToF(&shot->scale, shot->unk_48, 0.05f, 1.5f, 0.001f); if ((shot->timer > 0) && (shot->timer < 30)) { @@ -2062,7 +2063,7 @@ void PlayerShot_UpdateBomb(PlayerShot* shot) { if (shot->unk_58 < 0) { shot->unk_58 = 0; Object_Kill(&shot->obj, shot->sfxSource); - D_ctx_8017812C = 0; + gGroundClipMode = 0; } } PlayerShot_ApplyExplosionDamage(shot, 50); @@ -2225,7 +2226,7 @@ void PlayerShot_UpdateShot(PlayerShot* shot, s32 index) { BonusText_Display(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, bonus); gHitCount += shot->bonus; } - if ((shot->bonus >= 7) && (gBossActive == 0) && (gLevelMode == LEVELMODE_ON_RAILS) && + if ((shot->bonus >= 7) && !gBossActive && (gLevelMode == LEVELMODE_ON_RAILS) && ((gTeamShields[TEAM_ID_FALCO] > 0) || (gTeamShields[TEAM_ID_SLIPPY] > 0) || (gTeamShields[TEAM_ID_PEPPY] > 0))) { do { @@ -2284,9 +2285,9 @@ void PlayerShot_Update(PlayerShot* shot) { if (shot->timer > 0) { shot->timer--; } - D_ctx_80178498 = shot->obj.pos.z; - D_ctx_801784A0 = shot->obj.pos.y; - D_ctx_8017849C = shot->obj.pos.x; + gShotHitPosZ = shot->obj.pos.z; + gShotHitPosY = shot->obj.pos.y; + gShotHitPosX = shot->obj.pos.x; PlayerShot_UpdateShot(shot, i); } break; diff --git a/src/engine/fox_bg.c b/src/engine/fox_bg.c index 78c2b18e..dbded0a9 100644 --- a/src/engine/fox_bg.c +++ b/src/engine/fox_bg.c @@ -249,7 +249,7 @@ void Background_DrawBackdrop(void) { u8 levelType; s32 levelId; - if (D_ctx_80177AB0 == 0) { + if (gDrawBackdrop == 0) { return; } @@ -353,16 +353,16 @@ void Background_DrawBackdrop(void) { } break; case LEVEL_VENOM_ANDROSS: - if (D_ctx_80177AB0 != 6) { - if ((D_ctx_80177AB0 == 2) || (D_ctx_80177AB0 == 7)) { + if (gDrawBackdrop != 6) { + if ((gDrawBackdrop == 2) || (gDrawBackdrop == 7)) { Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY); Matrix_Translate(gGfxMatrix, 0.0f, -4000.0f, -7000.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_VE2_600F670); - } else if ((D_ctx_80177AB0 == 3) || (D_ctx_80177AB0 == 4)) { + } else if ((gDrawBackdrop == 3) || (gDrawBackdrop == 4)) { RCP_SetupDL(&gMasterDisp, 0x3E); - if (D_ctx_80177AB0 == 4) { - if (!(gGameFrameCount & 8)) { + if (gDrawBackdrop == 4) { + if ((gGameFrameCount & 8) == 0) { Math_SmoothStepToF(&gAndrossUnkBrightness, 0.0f, 1.0f, 30.0f, 0); } else { Math_SmoothStepToF(&gAndrossUnkBrightness, 120.0f, 1.0f, 30.0f, 0); @@ -387,7 +387,7 @@ void Background_DrawBackdrop(void) { } else { fake_label: // fake RCP_SetupDL(&gMasterDisp, 0x3E); - if (D_ctx_80177AB0 == 5) { + if (gDrawBackdrop == 5) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 64); } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 255, 128, (s32) gAndrossUnkAlpha); @@ -400,7 +400,7 @@ void Background_DrawBackdrop(void) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ANDROSS_C039208); Matrix_Pop(&gGfxMatrix); - if (D_ctx_80177AB0 != 5) { + if (gDrawBackdrop != 5) { Matrix_Push(&gGfxMatrix); Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 1.0f, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, (gPlayer[0].camRoll + (gGameFrameCount * -1.3f)) * M_DTOR, @@ -821,7 +821,7 @@ void Background_DrawGround(void) { u16* sp1C4; Gfx* sp1C0; - if ((gCurrentLevel != LEVEL_VENOM_2) && ((gPlayer[0].cam.eye.y > 4000.0f) || (D_ctx_80177A98 == 0))) { + if ((gCurrentLevel != LEVEL_VENOM_2) && ((gPlayer[0].cam.eye.y > 4000.0f) || !gDrawGround)) { return; } if ((gCurrentLevel == LEVEL_BOLSE) && gBolseDynamicGround) { @@ -886,7 +886,7 @@ void Background_DrawGround(void) { Matrix_SetGfxMtx(&gMasterDisp); switch (gCurrentLevel) { case LEVEL_CORNERIA: - if (D_ctx_8017812C != 0) { + if (gGroundClipMode != 0) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } else { RCP_SetupDL_20(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); @@ -1066,7 +1066,7 @@ void Background_DrawGround(void) { case LEVEL_KATINA: case LEVEL_BOLSE: case LEVEL_VENOM_2: - if ((D_ctx_8017812C != 0) || (gCurrentLevel == LEVEL_BOLSE)) { + if ((gGroundClipMode != 0) || (gCurrentLevel == LEVEL_BOLSE)) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } else { RCP_SetupDL_20(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); @@ -1088,7 +1088,7 @@ void Background_DrawGround(void) { } break; case LEVEL_VERSUS: - if (D_ctx_8017812C != 0) { + if (gGroundClipMode != 0) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } else { RCP_SetupDL_20(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); diff --git a/src/engine/fox_boss.c b/src/engine/fox_boss.c index 66806874..6d5d0858 100644 --- a/src/engine/fox_boss.c +++ b/src/engine/fox_boss.c @@ -88,12 +88,12 @@ void Boss_SpawnDebris(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5 for (i = (ARRAY_COUNT(gActors)) - 1; i >= 0; i--) { if (gActors[i].obj.status == OBJ_FREE) { Boss_SetupDebris(&gActors[i], arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, argA, argB); - return; + break; } } } -void func_boss_80043188(Boss* boss) { +void Boss_SetCullDistance(Boss* boss) { boss->info.cullDistance = 30000.0f; } @@ -102,9 +102,9 @@ void Boss_CompleteLevel(Player* player, f32 xPos, f32 yPos, f32 zPos) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 80); gCsFrameCount = 0; - D_ctx_80178448 = zPos + gPathProgress; - D_ctx_80178440 = xPos; - D_ctx_80178444 = yPos; + gBossDeathCamAtZ = zPos + gPathProgress; + gBossDeathCamAtX = xPos; + gBossDeathCamAtY = yPos; player->state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; player->csState = 10; diff --git a/src/engine/fox_context.c b/src/engine/fox_context.c index dc11cf2e..3384f5e3 100644 --- a/src/engine/fox_context.c +++ b/src/engine/fox_context.c @@ -9,11 +9,11 @@ s32 gSceneSetup; s32 D_ctx_80177824; // some sort of flag s32 D_ctx_8017782C; // some sort of flag. all range related? GameState gGameState; -s32 gNextGameStateTimer; // next game state timer? -s32 gVsItemSpawnTimer; // timer for vs item spawn +s32 gNextGameStateTimer; +s32 gVsItemSpawnTimer; OptionState gOptionMenuStatus; -s32 gPlayState; // pause-related state -s32 D_ctx_80177868; // some sort of state. pause-related? +s32 gPlayState; +s32 D_ctx_80177868; // some sort of state. pause-related? Also used by game over LevelMode gLevelMode; DrawMode gDrawMode; s32 gPlayerNum; @@ -22,9 +22,9 @@ s32 gTeamShields[6]; s32 gSavedTeamShields[6]; s32 gPrevPlanetSavedTeamShields[6]; s32 gTeamDamage[6]; -u8 gMissionStatus; // next planet path +u8 gMissionStatus; f32 gGroundHeight; -f32 D_ctx_80177950; +f32 D_ctx_80177950; // Related to camera z-rotations? Only set to -1 in corneria intro, where it does nothing? f32 gPlayerTurnRate; f32 gPlayerTurnStickMod; f32 gCsCamEyeX; @@ -33,14 +33,14 @@ f32 gCsCamEyeZ; f32 gCsCamAtX; f32 gCsCamAtY; f32 gCsCamAtZ; -Vec3f gPlayerCamEye; -Vec3f gPlayerCamAt; +Vec3f gPlayCamEye; +Vec3f gPlayCamAt; bool gExpertMode; -s32 D_ctx_80177A10[10]; -f32 D_ctx_80177A48[10]; +s32 D_ctx_80177A10[10]; // work buffer +f32 D_ctx_80177A48[10]; // work buffer s32 gCsFrameCount; -u8 D_ctx_80177A98; // some sort of flag. Used in background -u8 D_ctx_80177AB0; +u8 gDrawGround; // some sort of flag. Used in background +u8 gDrawBackdrop; u8 gAqDrawMode; s32 gTitleState; s32 gMainController; @@ -56,7 +56,7 @@ s32 gPlanetPathStatus[24]; s32 gPlanetPathStatus[22]; // overruns gPrevPlanetTeamShields? #endif s32 gPrevPlanetTeamShields[6]; -s32 D_ctx_80177C58[6]; +s32 D_ctx_80177C58[6]; // another saved team shields. maybe this is prev planet? u8 gOptionSoundMode; s32 gVolumeSettings[3]; u16 gBgmSeqId; @@ -83,11 +83,11 @@ s32 gRingPassCount; Vec3f gFormationInitRot; Vec3f gFormationInitPos; UNK_TYPE F_80178020; -s32 D_ctx_8017812C; +s32 gGroundClipMode; LevelId gCurrentLevel; s32 gLevelPhase; s32 gBossActive; -s32 D_ctx_8017828C; +bool gKillEventActors; s32 gUseDynaFloor; s32 gRadioState; s32 gCurrentRadioPortrait; @@ -96,9 +96,9 @@ s32 gRadioMouthTimer; u8 gLeveLClearStatus[30] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -s32 D_ctx_801782C0; -s32 D_ctx_801782C8; -s32 D_ctx_801782D0; +s32 D_ctx_801782C0; // set to 0, never used +s32 D_ctx_801782C8; // set to 0, never used +s32 D_ctx_801782D0; // set to 0, never used s32 gRadioMsgCharIndex; UNK_TYPE F_801782E0; s32 gRadioMsgId; @@ -150,39 +150,43 @@ UNK_TYPE F_8017840C; UNK_TYPE P_800D31A0 = 0; s32 gStarCount; f32 gStarWarpDistortion; -f32 D_ctx_80178418; +f32 gCOComplete2CamRotY; UNK_TYPE F_8017841C; f32 gStarfieldX; f32 gStarfieldY; f32 gStarfieldRoll; -f32 D_ctx_8017842C; -f32 D_ctx_80178430; +f32 gStarfieldScrollX; // starfield yaw? +f32 gStarfieldScrollY; // starfield roll? UNK_TYPE F_80178434; UNK_TYPE F_80178438; UNK_TYPE F_8017843C; -f32 D_ctx_80178440; -f32 D_ctx_80178444; -f32 D_ctx_80178448; -f32 D_ctx_80178450[3]; // x positions of certain actors (teammates?) -f32 D_ctx_80178460[3]; // y positions of certain actors (teammates?) -f32 D_ctx_80178470[3]; // z positions of certain actors (teammates?) +f32 gBossDeathCamAtX; // +f32 gBossDeathCamAtY; +f32 gBossDeathCamAtZ; +f32 gCsTeamTargetsX[3]; // x positions of certain actors (teammates?) +f32 gCsTeamTargetsY[3]; // y positions of certain actors (teammates?) +f32 gCsTeamTargetsZ[3]; // z positions of certain actors (teammates?) f32 gCameraShakeY; s32 gCameraShake; -s32 D_ctx_80178484; // set to 10000 but not used +s32 D_ctx_80178484; // set to 100000 when pausing but not used bool gLoadLevelObjects; UNK_TYPE F_8017848C; UNK_TYPE F_80178490; -s32 D_ctx_80178494; -f32 D_ctx_80178498; -f32 D_ctx_8017849C; -f32 D_ctx_801784A0; -s32 D_ctx_801784A4; +#ifdef AVOID_UB +s32 D_ctx_80178494 = 0; +#else +s32 D_ctx_80178494; // Torpedoes have this set to their unk_5C. Were they shot2s at some point? +#endif +f32 gShotHitPosZ; +f32 gShotHitPosX; +f32 gShotHitPosY; +s32 gZOSnakeWaypointCount; UNK_TYPE F_801784A8; GroundType gGroundType; UNK_TYPE F_801784B0; UNK_TYPE F_801784B4; -// light source 1 +// light source 1. Used for most things f32 gLight1xRot; // effective Vec3f f32 gLight1yRot; f32 gLight1zRot; @@ -197,7 +201,7 @@ s32 gLight1y; s32 gLight1z; f32 gLight1rotStep; -// light source 2 +// light source 2. used for Players f32 gLight2xRot; // effective Vec3f f32 gLight2yRot; f32 gLight2zRot; @@ -209,7 +213,7 @@ s32 gLight2y; s32 gLight2z; f32 gLight2rotStep; -// this section looks like a third light source +// this section looks like a third light source. May have been for scenery shadows UNK_TYPE F_801784514; UNK_TYPE F_801784518; UNK_TYPE F_80178451C; @@ -221,16 +225,19 @@ UNK_TYPE F_801784530; UNK_TYPE F_801784534; f32 D_ctx_80178538; -f32 D_ctx_8017853C; // hitbox size modifier. always 0.0f. seems out of place +f32 D_ctx_8017853C; // hitbox size modifier for player collisions. always 0.0f. seems out of place s32 gLight2colorStep; // light 2 color step s32 D_ctx_80178544; // light 3 color step? -s32 gLight1R; // Color32 light color 1 + +s32 gLight1R; // Color32 light color 1 s32 gLight1G; s32 gLight1B; s32 gAmbientR; // Color32 ambient color s32 gAmbientG; s32 gAmbientB; + UNK_TYPE F_80178560; + s32 gLight2R; // Color32 light color 2 s32 gLight2G; s32 gLight2B; @@ -238,16 +245,17 @@ s32 gLight2RTarget; // Color32 light color 2 modifier? s32 gLight2GTarget; s32 gLight2BTarget; -s32 D_ctx_80161A70; // Color32 set but not used, start of bss +s32 D_ctx_80161A70; // unused Color32, perhaps for third light? start of bss s32 D_ctx_80161A74; s32 D_ctx_80161A78; -s32 D_ctx_80161A7C; // Color32? set but not used +s32 D_ctx_80161A7C; // unused Color32, perhaps targets for third light? s32 D_ctx_80161A80; s32 D_ctx_80161A84; + GroundSurface gGroundSurface; GroundSurface gSavedGroundSurface; u8 gGoldRingCount[4]; -u8 D_ctx_80161A94[4]; +u8 gSavedGoldRingCount[4]; s32 gHitCount; s32 gSavedHitCount; s16 gLifeCount[4]; @@ -282,7 +290,7 @@ s32 gLevelStartStatusScreenTimer; s32 gLevelClearScreenTimer; // timer for mission accomplished scrren s32 gBossHealthBar; s32 D_ctx_80177850; // bonus text related. set to 15 but never read -s32 D_ctx_80177858[4]; // set to 3 but never used +s32 D_ctx_80177858[4]; // set to 3 but never used. related to VS mode customization? PlayerForm gPlayerForms[4]; s32 gHandicap[4]; VsStage gVersusStage; @@ -321,7 +329,7 @@ u8 gGreatFoxIntact; u8 gTiStartLandmaster; u16 gControllerRumbleTimers[4]; u16 gPlayerScores[4]; -s32 D_ctx_80177C50; +s32 gCircleWipeFrame; s32 D_ctx_80177C70; // sets camera field of view Y. initialized to 0 and never changed s32 gTraining360MsgTimer; s32 gTraining360MsgIndex; @@ -341,10 +349,10 @@ s32 gLeftWingFlashTimer[4]; s32 gRightWingDebrisTimer[4]; s32 gLeftWingDebrisTimer[4]; s32 gBombCount[4]; -s32 D_ctx_80177DB8[4]; -s32 D_ctx_80177DD0[4][10]; -s32 D_ctx_80177E74; -s32 D_ctx_80177E7C; +s32 gVsPoints[4]; +s32 gVsKills[4][10]; +s32 gVsMatchOver; +s32 gVsMatchStart; bool gChangeTo360; Vec3f gTeamArrowsViewPos[10]; f32 D_ctx_80177F20[65]; // Seem to be an early implementation of RadarMark @@ -358,16 +366,16 @@ u32* gStarFillColors; UNK_TYPE F_801782A0; Scenery360* gScenery360; UNK_TYPE F_801782B0; -s32 D_ctx_801782B8; -s32 D_ctx_801782BC; -PosRot* D_ctx_801782C4; -f32* D_ctx_801782CC; +s32 gDrawSmallRocks; +s32 D_ctx_801782BC; // set to 0, never used +PosRot* gZOSnakePosRots; +f32* D_ctx_801782CC; // arrays used for dynamic floor f32* D_ctx_801782D4; f32* D_ctx_801782DC; f32* D_ctx_801782E4; f32* D_ctx_801782EC; UNK_TYPE F_801782F4; -s32 D_ctx_801782FC; +s32 gDynaFloorTimer; // timer related to dynamic floor UNK_TYPE F_80178304; UNK_TYPE F_8017830C; UNK_TYPE F_80178314; diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index f3efc421..663d910d 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -169,14 +169,14 @@ void func_demo_80048CC4(Actor* actor, s32 arg1) { actor->obj.pos.x = D_demo_800C9F60[arg1].x + gPlayer[0].pos.x; actor->obj.pos.y = D_demo_800C9F60[arg1].y + gPlayer[0].pos.y; actor->obj.pos.z = D_demo_800C9F60[arg1].z + gPlayer[0].trueZpos; - actor->unk_0F4.y = 0.0f; - actor->unk_0F4.z = D_demo_800C9F90[arg1]; + actor->rot_0F4.y = 0.0f; + actor->rot_0F4.z = D_demo_800C9F90[arg1]; Object_SetInfo(&actor->info, actor->obj.id); if (arg1 == 3) { AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, actor->sfxSource, 0); - actor->unk_0B6 = 1; + actor->animFrame = 1; } else { actor->iwork[11] = 1; AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); @@ -350,9 +350,9 @@ void func_demo_80049630(ActorCutscene* this) { Math_SmoothStepToF(&this->obj.pos.x, this->vwork[0].x, 0.05f, 50.0f, 0.0001f); Math_SmoothStepToF(&this->obj.pos.y, this->vwork[0].y, 0.05f, 50.0f, 0.0001f); Math_SmoothStepToF(&this->obj.pos.z, this->vwork[0].z, 0.05f, 50.0f, 0.0001f); - Math_SmoothStepToF(&this->unk_0F4.x, gPlayer[0].rot.x, 0.1f, 2.0f, 0.0001f); - Math_SmoothStepToF(&this->unk_0F4.y, gPlayer[0].rot.y, 0.1f, 2.0f, 0.0001f); - Math_SmoothStepToF(&this->unk_0F4.z, 0.0f, 0.05f, 0.2f, 0.0001f); + Math_SmoothStepToF(&this->rot_0F4.x, gPlayer[0].rot.x, 0.1f, 2.0f, 0.0001f); + Math_SmoothStepToF(&this->rot_0F4.y, gPlayer[0].rot.y, 0.1f, 2.0f, 0.0001f); + Math_SmoothStepToF(&this->rot_0F4.z, 0.0f, 0.05f, 0.2f, 0.0001f); break; case 1: @@ -369,8 +369,8 @@ void func_demo_80049630(ActorCutscene* this) { } break; } - Matrix_RotateY(gCalcMatrix, (this->unk_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(this->unk_0F4.x * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (this->rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(this->rot_0F4.x * M_DTOR), MTXF_APPLY); sp3C.x = 0.0f; sp3C.y = 0.0f; @@ -382,9 +382,9 @@ void func_demo_80049630(ActorCutscene* this) { this->vel.y = sp30.y; this->vel.z = sp30.z; - this->obj.rot.x = -this->unk_0F4.x; - this->obj.rot.y = this->unk_0F4.y + 180.0f; - this->obj.rot.z = -this->unk_0F4.z; + this->obj.rot.x = -this->rot_0F4.x; + this->obj.rot.y = this->rot_0F4.y + 180.0f; + this->obj.rot.z = -this->rot_0F4.z; } void func_demo_8004990C(Player* player) { @@ -404,7 +404,7 @@ void func_demo_80049968(Actor* actor, s32 arg1) { actor->obj.pos.z = D_demo_800C9FF0[arg1] + gPlayer[0].trueZpos; actor->fwork[0] = D_demo_800CA000[arg1]; actor->fwork[1] = D_demo_800CA010[arg1]; - actor->unk_0B6 = D_demo_800CA030[arg1]; + actor->animFrame = D_demo_800CA030[arg1]; actor->state = D_demo_800CA040[arg1]; actor->obj.rot.z = D_demo_800CA020[arg1]; actor->obj.rot.y = 180.0f; @@ -451,7 +451,7 @@ void Cutscene_EnterWarpZone(Player* player) { player->pos.x += player->vel.x; player->flags_228 = 0; - player->cockpitView = false; + player->alternateView = false; player->pos.y += player->vel.y; player->pos.z += player->vel.z; @@ -587,7 +587,7 @@ void Cutscene_EnterWarpZone(Player* player) { player->unk_234 = 1; gLevelPhase = 1; - D_display_800CA230 = 0.15f; + gCamDistortion = 0.15f; AUDIO_PLAY_SFX(NA_SE_WARP_OUT, gDefaultSfxSource, 0); Play_InitLevel(); } @@ -626,7 +626,7 @@ void Cutscene_EnterWarpZone(Player* player) { player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_014 = 0.0f; player->unk_018 = 0.0f; - D_ctx_801782B8 = 0; + gDrawSmallRocks = 0; gLoadLevelObjects = 1; } Math_SmoothStepToF(&player->cam.eye.y, (player->pos.y * player->unk_148) + 50.0f, 0.2f, 15.0f, 0.01f); @@ -639,7 +639,7 @@ void Cutscene_EnterWarpZone(Player* player) { } void Cutscene_LevelStart(Player* player) { - gCsFrameCount += 1; + gCsFrameCount++; if (gLevelMode == LEVELMODE_ON_RAILS) { switch (gCurrentLevel) { case LEVEL_CORNERIA: @@ -807,7 +807,7 @@ void Cutscene_AllRangeMode(Player* player) { s32 pad1; s32 pad2; - gCsFrameCount += 1; + gCsFrameCount++; Math_SmoothStepToAngle(&player->aerobaticPitch, 0.0f, 0.1f, 20.0f, 0.0f); if (gCsFrameCount == 37) { gChangeTo360 = true; @@ -892,7 +892,7 @@ void Cutscene_AllRangeMode(Player* player) { actor->obj.pos.x = D_demo_800CA080[i] + player->pos.x; actor->obj.pos.y = D_demo_800CA08C[i] + player->pos.y; actor->obj.pos.z = player->trueZpos - 1000.0f; - actor->unk_0F4.y = 180.0f; + actor->rot_0F4.y = 180.0f; Object_SetInfo(&actor->info, actor->obj.id); } } @@ -979,12 +979,12 @@ void Cutscene_CoComplete2(Player* player) { case 11: D_ctx_80177A48[0] = 0.0f; Math_SmoothStepToAngle(&player->aerobaticPitch, 0.0f, 1.0f, 5.0f, 0.0f); - player->cam.at.x += (D_ctx_80178440 - player->cam.at.x) * 0.01f; - player->cam.at.y += (D_ctx_80178444 - player->cam.at.y) * 0.01f; - player->cam.at.z += (D_ctx_80178448 - player->cam.at.z) * 0.01f; + player->cam.at.x += (gBossDeathCamAtX - player->cam.at.x) * 0.01f; + player->cam.at.y += (gBossDeathCamAtY - player->cam.at.y) * 0.01f; + player->cam.at.z += (gBossDeathCamAtZ - player->cam.at.z) * 0.01f; player->cam.eye.x += (player->cam.at.x + (500.0f * player->unk_004) - player->cam.eye.x) * 0.01f; player->cam.eye.y += (player->cam.at.y + 500.0f - player->cam.eye.y) * 0.01f; - player->cam.eye.z += (D_ctx_80178448 + (2000.0f * D_ctx_80177950) - player->cam.eye.z) * 0.01f; + player->cam.eye.z += (gBossDeathCamAtZ + (2000.0f * D_ctx_80177950) - player->cam.eye.z) * 0.01f; if (player->csEventTimer > 25) { D_ctx_80177A48[2] += 1.5f * player->unk_004; @@ -1106,7 +1106,7 @@ void Cutscene_CoComplete2(Player* player) { player->csTimer = 200; player->csEventTimer = 500; player->csState = 2; - player->unk_000 = (player->unk_004 = (player->unk_008 = (D_ctx_80178418 = 0.0f))); + player->unk_000 = player->unk_004 = player->unk_008 = gCOComplete2CamRotY = 0.0f; player->baseSpeed = 0.0f; D_ctx_80177A48[6] = 0.0f; } @@ -1114,7 +1114,7 @@ void Cutscene_CoComplete2(Player* player) { case 2: player->pos.y += 5.0f; - Matrix_RotateY(gCalcMatrix, ((player->rot.y + 180.0f) + D_ctx_80178418) * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, (player->rot.y + 180.0f + gCOComplete2CamRotY) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -(player->rot.x * M_DTOR), MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, -((player->bankAngle + player->rockAngle) * M_DTOR), MTXF_APPLY); @@ -1134,12 +1134,12 @@ void Cutscene_CoComplete2(Player* player) { player->unk_000 = 0.3f; } - gCsCamEyeX += ((player->pos.x + sp6C.x) - gCsCamEyeX) * player->unk_000; - gCsCamEyeY += ((player->pos.y + sp6C.y) - gCsCamEyeY) * player->unk_000; - gCsCamEyeZ += ((player->trueZpos + gPathProgress + sp6C.z) - gCsCamEyeZ) * player->unk_000; - D_ctx_80178430 += 0.2f; - D_ctx_8017842C += 0.2f; - D_ctx_80178418 += player->unk_008; + gCsCamEyeX += (player->pos.x + sp6C.x - gCsCamEyeX) * player->unk_000; + gCsCamEyeY += (player->pos.y + sp6C.y - gCsCamEyeY) * player->unk_000; + gCsCamEyeZ += (player->trueZpos + gPathProgress + sp6C.z - gCsCamEyeZ) * player->unk_000; + gStarfieldScrollY += 0.2f; + gStarfieldScrollX += 0.2f; + gCOComplete2CamRotY += player->unk_008; Math_SmoothStepToAngle(&player->rot.z, 0.0f, 0.1f, 2.0f, 0.0f); if (player->csTimer == 0) { @@ -1176,7 +1176,7 @@ void Cutscene_CoComplete2(Player* player) { Matrix_RotateX(gCalcMatrix, -(player->rot.x * M_DTOR), MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, -((player->bankAngle + player->rockAngle) * M_DTOR), MTXF_APPLY); - if ((D_ctx_80178418 > 70.0f) && (D_ctx_80178418 < 280.0f)) { + if ((gCOComplete2CamRotY > 70.0f) && (gCOComplete2CamRotY < 280.0f)) { func_demo_8004AA84(); } sp78.x = gActors[0].fwork[0] * gActors[0].fwork[3]; @@ -1185,9 +1185,9 @@ void Cutscene_CoComplete2(Player* player) { Matrix_MultVec3f(gCalcMatrix, &sp78, &sp6C); - D_ctx_80178450[0] = player->pos.x + sp6C.x; - D_ctx_80178460[0] = player->pos.y + sp6C.y; - D_ctx_80178470[0] = player->trueZpos + sp6C.z; + gCsTeamTargetsX[0] = player->pos.x + sp6C.x; + gCsTeamTargetsY[0] = player->pos.y + sp6C.y; + gCsTeamTargetsZ[0] = player->trueZpos + sp6C.z; sp78.x = gActors[1].fwork[0] * gActors[1].fwork[3]; sp78.y = gActors[1].fwork[1] * gActors[1].fwork[3]; @@ -1195,9 +1195,9 @@ void Cutscene_CoComplete2(Player* player) { Matrix_MultVec3f(gCalcMatrix, &sp78, &sp6C); - D_ctx_80178450[1] = player->pos.x + sp6C.x; - D_ctx_80178460[1] = player->pos.y + sp6C.y; - D_ctx_80178470[1] = player->trueZpos + sp6C.z; + gCsTeamTargetsX[1] = player->pos.x + sp6C.x; + gCsTeamTargetsY[1] = player->pos.y + sp6C.y; + gCsTeamTargetsZ[1] = player->trueZpos + sp6C.z; sp78.x = gActors[2].fwork[0] * gActors[2].fwork[3]; sp78.y = gActors[2].fwork[1] * gActors[2].fwork[3]; @@ -1205,9 +1205,9 @@ void Cutscene_CoComplete2(Player* player) { Matrix_MultVec3f(gCalcMatrix, &sp78, &sp6C); - D_ctx_80178450[2] = player->pos.x + sp6C.x; - D_ctx_80178460[2] = player->pos.y + sp6C.y; - D_ctx_80178470[2] = player->trueZpos + sp6C.z; + gCsTeamTargetsX[2] = player->pos.x + sp6C.x; + gCsTeamTargetsY[2] = player->pos.y + sp6C.y; + gCsTeamTargetsZ[2] = player->trueZpos + sp6C.z; switch (gCsFrameCount) { case 330: @@ -1245,8 +1245,8 @@ void Cutscene_CoComplete2(Player* player) { break; case 3: - D_ctx_80178430 += 0.2f; - D_ctx_8017842C += 0.2f; + gStarfieldScrollY += 0.2f; + gStarfieldScrollX += 0.2f; if (player->csTimer == 0) { player->csState = 4; player->csTimer = 30; @@ -1257,8 +1257,8 @@ void Cutscene_CoComplete2(Player* player) { break; case 4: - D_ctx_80178430 += 0.2f; - D_ctx_8017842C += 0.2f; + gStarfieldScrollY += 0.2f; + gStarfieldScrollX += 0.2f; player->unk_190 = 2.0f; player->contrailScale += 0.1f; if (player->contrailScale > 0.6f) { @@ -1355,7 +1355,7 @@ void Cutscene_LevelComplete(Player* player) { s32 sp20; s32 btn; - gCsFrameCount += 1; + gCsFrameCount++; switch (player->form) { case FORM_ARWING: @@ -1650,13 +1650,13 @@ void Cutscene_KillPlayer(Player* player) { } if (gCurrentLevel != LEVEL_TRAINING) { - gLifeCount[gPlayerNum] -= 1; + gLifeCount[gPlayerNum]--; } } else { if (player->attacker > 0) { - D_ctx_80177DD0[player->attacker - 1][D_ctx_80177DB8[player->attacker - 1]] = player->num; - D_ctx_80177DB8[player->attacker - 1] += 1; - if (gVsPointsToWin == D_ctx_80177DB8[player->attacker - 1]) { + gVsKills[player->attacker - 1][gVsPoints[player->attacker - 1]] = player->num; + gVsPoints[player->attacker - 1]++; + if (gVsPointsToWin == gVsPoints[player->attacker - 1]) { player->attacker = -1; if (player->unk_284 == 0) { func_effect_8007C688(player->pos.x, player->pos.y, player->trueZpos, 3.0f, 1000); @@ -1695,8 +1695,8 @@ void func_demo_8004D828(Player* player) { player->pos.x += player->vel.x; player->pos.y += player->vel.y; - if ((gCurrentLevel != LEVEL_VENOM_1 || gBossActive == 0) && - (gLevelType == LEVELTYPE_PLANET || gCurrentLevel == LEVEL_BOLSE)) { + if (!((gCurrentLevel == LEVEL_VENOM_1) && gBossActive) && + ((gLevelType == LEVELTYPE_PLANET) || (gCurrentLevel == LEVEL_BOLSE))) { player->vel.y -= 0.5f; player->rot.x -= 2.0f; } @@ -1814,7 +1814,7 @@ void func_demo_8004DEF8(Player* player) { player->pos.x += player->vel.x; player->pos.y += player->vel.y; - if (((gCurrentLevel != LEVEL_VENOM_ANDROSS) || (gBossActive == 0)) && (gLevelType == LEVELTYPE_PLANET)) { + if (!((gCurrentLevel == LEVEL_VENOM_ANDROSS) && gBossActive) && (gLevelType == LEVELTYPE_PLANET)) { player->vel.y = player->vel.y - 0.5f; } @@ -1931,7 +1931,7 @@ void func_demo_8004E4D4(ActorCutscene* this) { f32 sp34; this->fwork[7] += 3.0f; - this->unk_0F4.z = SIN_DEG(this->fwork[7]) * 1.5f; + this->rot_0F4.z = SIN_DEG(this->fwork[7]) * 1.5f; this->fwork[8] += 2.0f; sp34 = SIN_DEG(this->fwork[8]) * 10.0f; @@ -2027,7 +2027,7 @@ void func_demo_8004E4D4(ActorCutscene* this) { case 31: AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, this->sfxSource, 0); - this->state += 1; + this->state++; this->fwork[29] = 5.0f; /* fallthrough */ @@ -2059,9 +2059,9 @@ void func_demo_8004EBD0(ActorCutscene* this) { if (this->state < 4) { this->fwork[9] = 0.4f; - this->obj.pos.x += (D_ctx_80178450[this->index] - this->obj.pos.x) * 0.4f; - this->obj.pos.y += (D_ctx_80178460[this->index] - this->obj.pos.y) * 0.4f; - this->obj.pos.z += (D_ctx_80178470[this->index] - this->obj.pos.z) * 0.4f; + this->obj.pos.x += (gCsTeamTargetsX[this->index] - this->obj.pos.x) * 0.4f; + this->obj.pos.y += (gCsTeamTargetsY[this->index] - this->obj.pos.y) * 0.4f; + this->obj.pos.z += (gCsTeamTargetsZ[this->index] - this->obj.pos.z) * 0.4f; this->obj.rot.z *= 0.98f; this->obj.rot.x = -gPlayer[0].rot.x; @@ -2070,14 +2070,14 @@ void func_demo_8004EBD0(ActorCutscene* this) { if (1) {} this->fwork[7] += 1.0f; - if ((s32) this->fwork[7] & 0x40) { + if (((s32) this->fwork[7] & 0x40) != 0) { this->fwork[0] += 0.1f; } else { this->fwork[0] -= 0.1f; } this->fwork[8] += 1.2f; - if ((s32) this->fwork[8] & 0x40) { + if (((s32) this->fwork[8] & 0x40) != 0) { this->fwork[1] += 0.1f; } else { this->fwork[1] -= 0.1f; @@ -2088,7 +2088,7 @@ void func_demo_8004EBD0(ActorCutscene* this) { case 0: this->fwork[3] *= 0.992f; if (this->fwork[3] < 1.2f) { - this->state += 1; + this->state++; } break; @@ -2096,7 +2096,7 @@ void func_demo_8004EBD0(ActorCutscene* this) { this->fwork[3] *= 0.997f; if (this->fwork[3] < 1.0f) { this->fwork[3] = 1.0f; - this->state += 1; + this->state++; } this->timer_0BC = 560; break; @@ -2158,19 +2158,19 @@ void func_demo_8004EBD0(ActorCutscene* this) { } void func_demo_8004F05C(Actor* actor) { - if (((gLevelType == LEVELTYPE_PLANET) && (actor->unk_0B6 == 0)) || (gCurrentLevel == LEVEL_BOLSE)) { + if (((gLevelType == LEVELTYPE_PLANET) && (actor->animFrame == 0)) || (gCurrentLevel == LEVEL_BOLSE)) { actor->fwork[0] += 3.0f; actor->fwork[1] = SIN_DEG(actor->fwork[0]) * 1.5f; } switch (gCurrentLevel) { case LEVEL_BOLSE: - switch (actor->unk_0B6) { + switch (actor->animFrame) { case 0: if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) { - actor->unk_0F4.z += actor->unk_0F4.y; - actor->vel.x = SIN_DEG(actor->unk_0F4.z) * 10.0f; - actor->obj.rot.z = SIN_DEG(actor->unk_0F4.z) * 40.0f; + actor->rot_0F4.z += actor->rot_0F4.y; + actor->vel.x = SIN_DEG(actor->rot_0F4.z) * 10.0f; + actor->obj.rot.z = SIN_DEG(actor->rot_0F4.z) * 40.0f; break; } @@ -2203,7 +2203,7 @@ void func_demo_8004F05C(Actor* actor) { break; case 32: - actor->obj.rot.z += actor->unk_0F4.z; + actor->obj.rot.z += actor->rot_0F4.z; if (actor->timer_0BC == 0) { Object_Kill(&actor->obj, actor->sfxSource); } @@ -2219,7 +2219,7 @@ void func_demo_8004F05C(Actor* actor) { break; case LEVEL_SECTOR_Y: - switch (actor->unk_0B6) { + switch (actor->animFrame) { case 0: SectorY_8019FF00(actor); break; @@ -2266,8 +2266,8 @@ void func_demo_8004F05C(Actor* actor) { break; case 0: - actor->obj.rot.z = actor->unk_0F4.z; - if (actor->unk_0B6 == 10) { + actor->obj.rot.z = actor->rot_0F4.z; + if (actor->animFrame == 10) { actor->obj.pos.z = gPlayer[0].cam.eye.z + 12000.0f; } break; @@ -2388,14 +2388,13 @@ void ActorCutscene_Update(ActorCutscene* this) { case LEVEL_METEO: if (gLevelPhase == 0) { Meteo_8018ED9C(this); - break; + } else { + func_demo_80049630(this); } - - func_demo_80049630(this); break; case LEVEL_FORTUNA: - if (this->unk_0B6 == 11) { + if (this->animFrame == 11) { switch (this->state) { case 0: if (gCsFrameCount == 100) { @@ -2436,19 +2435,17 @@ void ActorCutscene_Update(ActorCutscene* this) { case LEVEL_CORNERIA: if (gLevelMode == LEVELMODE_ALL_RANGE) { func_demo_8004E4D4(this); - break; + } else { + func_demo_8004EBD0(this); } - - func_demo_8004EBD0(this); break; case LEVEL_SECTOR_X: if (gLevelPhase != 0) { func_demo_80049630(this); - break; + } else { + func_demo_8004E4D4(this); } - - func_demo_8004E4D4(this); break; case LEVEL_TITANIA: @@ -2537,7 +2534,7 @@ void ActorCutscene_Draw(Actor* actor) { f32 y; f32 x; - switch (actor->unk_0B6) { + switch (actor->animFrame) { case 1000: RCP_SetupDL(&gMasterDisp, 0x2D); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, actor->unk_046); diff --git a/src/engine/fox_display.c b/src/engine/fox_display.c index 99a85e1d..a2209ff1 100644 --- a/src/engine/fox_display.c +++ b/src/engine/fox_display.c @@ -19,13 +19,13 @@ s32 D_display_800CA220 = 0; u8 sPlayersVisible[] = { 0, 0, 0, 0 }; // s32 sDrawCockpit = 0; // s32 D_display_800CA22C = 0; // -f32 D_display_800CA230 = 0.0f; +f32 gCamDistortion = 0.0f; 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 }; // -void func_display_80051B30(void) { +void Display_DrawHelpAlert(void) { s32 sp7C; f32 sp78; f32 sp74; @@ -47,7 +47,7 @@ void func_display_80051B30(void) { return; } } - if (!(gTeamHelpTimer & 4)) { + if ((gTeamHelpTimer & 4) == 0) { Matrix_RotateY(gCalcMatrix, gPlayer[0].camYaw, MTXF_NEW); Matrix_RotateX(gCalcMatrix, gPlayer[0].camPitch, MTXF_APPLY); sp68.x = gTeamHelpActor->obj.pos.x - gPlayer[0].cam.eye.x; @@ -615,7 +615,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 && (gLevelMode == LEVELMODE_ON_RAILS) && + if (player->alternateView && (gLevelMode == LEVELMODE_ON_RAILS) && (fabsf(player->trueZpos + gPathProgress - player->cam.eye.z) < 10.0f)) { if (arg1 == 0) { sDrawCockpit = 1; @@ -876,7 +876,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 && (gLevelMode == LEVELMODE_ON_RAILS)) { + if (player->alternateView && (gLevelMode == LEVELMODE_ON_RAILS)) { Matrix_MultVec3f(gCalcMatrix, &spB8, &sp94); } else { Matrix_MultVec3f(gCalcMatrix, &spC4, &sp94); @@ -886,7 +886,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 && (gLevelMode == LEVELMODE_ON_RAILS)) { + if (player->alternateView && (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); @@ -918,7 +918,7 @@ void func_display_80054E80(Player* player) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_101C2E0); Matrix_Pop(&gGfxMatrix); - if (player->cockpitView && (gLevelMode == LEVELMODE_ON_RAILS)) { + if (player->alternateView && (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); @@ -943,7 +943,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 && (gLevelMode == LEVELMODE_ON_RAILS)) { + if (player->alternateView && (gLevelMode == LEVELMODE_ON_RAILS)) { Matrix_MultVec3f(gCalcMatrix, &spB8, &sp94); } else { Matrix_MultVec3f(gCalcMatrix, &spC4, &sp94); @@ -1382,7 +1382,7 @@ void func_display_80057248(void) { s32 i; f32 var_fs0; - if (!(gGameFrameCount & 4)) { + if ((gGameFrameCount & 4) == 0) { RCP_SetupDL_40(); for (i = 0; i < ARRAY_COUNT(gTeamArrowsViewPos); i++) { if (gTeamArrowsViewPos[i].z < 0.0f) { @@ -1487,12 +1487,12 @@ void func_display_800578C4(Player* player) { case 0: Math_SmoothStepToAngle(&player->wings.unk_30, 0.0f, 0.2f, 3.0f, 0.0f); Math_SmoothStepToAngle(&player->wings.unk_34, 0.0f, 0.2f, 3.0f, 0.0f); - gPlayerCamEye.x = player->cam.eye.x; - gPlayerCamEye.y = player->cam.eye.y; - gPlayerCamEye.z = player->cam.eye.z; - gPlayerCamAt.x = player->cam.at.x; - gPlayerCamAt.y = player->cam.at.y; - gPlayerCamAt.z = player->cam.at.z; + gPlayCamEye.x = player->cam.eye.x; + gPlayCamEye.y = player->cam.eye.y; + gPlayCamEye.z = player->cam.eye.z; + gPlayCamAt.x = player->cam.at.x; + gPlayCamAt.y = player->cam.at.y; + gPlayCamAt.z = player->cam.at.z; break; case 1: case 2: @@ -1521,12 +1521,12 @@ void func_display_800578C4(Player* player) { Matrix_RotateX(gCalcMatrix, (player->rot.y + D_display_800CA380) * M_DTOR, MTXF_NEW); Matrix_RotateY(gCalcMatrix, (player->rot.x + D_display_800CA384) * M_DTOR, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &sp4C, &sp40); - gPlayerCamEye.x = player->pos.x + sp40.x; - gPlayerCamEye.y = player->pos.y + sp40.y + 20.0f; - gPlayerCamEye.z = player->trueZpos + sp40.z; - gPlayerCamAt.x = (SIN_DEG(gGameFrameCount * 3.0f) * 3.0f) + player->pos.x; - gPlayerCamAt.y = (COS_DEG(gGameFrameCount * 4.0f) * 3.0f) + player->pos.y; - gPlayerCamAt.z = (SIN_DEG(gGameFrameCount * 3.5f) * 3.0f) + player->trueZpos; + gPlayCamEye.x = player->pos.x + sp40.x; + gPlayCamEye.y = player->pos.y + sp40.y + 20.0f; + gPlayCamEye.z = player->trueZpos + sp40.z; + gPlayCamAt.x = (SIN_DEG(gGameFrameCount * 3.0f) * 3.0f) + player->pos.x; + gPlayCamAt.y = (COS_DEG(gGameFrameCount * 4.0f) * 3.0f) + player->pos.y; + gPlayCamAt.z = (SIN_DEG(gGameFrameCount * 3.5f) * 3.0f) + player->trueZpos; break; } } @@ -1535,10 +1535,10 @@ void Play_Draw(void) { s32 i; Vec3f tempVec; Vec3f playerCamUp; - Vec3f opponentPos; + Vec3f playerPos; s32 pad; - Player* opponent; - Player* player = &gPlayer[gPlayerNum]; + Player* player; + Player* camPlayer = &gPlayer[gPlayerNum]; sDrawCockpit = 0; @@ -1547,72 +1547,77 @@ void Play_Draw(void) { } Matrix_Push(&gGfxMatrix); if ((gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { - Math_SmoothStepToF(&D_display_800CA230, 0.01f, 0.2f, 0.002f, 0.0f); + Math_SmoothStepToF(&gCamDistortion, 0.01f, 0.2f, 0.002f, 0.0f); } else { - Math_SmoothStepToF(&D_display_800CA230, 0.0f, 0.2f, 0.002f, 0.0f); + Math_SmoothStepToF(&gCamDistortion, 0.0f, 0.2f, 0.002f, 0.0f); } Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 10.0f * M_DTOR, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, 1.0f + D_display_800CA230, 1.0f - D_display_800CA230, 1.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 1.0f + gCamDistortion, 1.0f - gCamDistortion, 1.0f, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, -(f32) gGameFrameCount * 10.0f * M_DTOR, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, 1.0f + D_display_800CA230, 1.0f - D_display_800CA230, 1.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 1.0f + gCamDistortion, 1.0f - gCamDistortion, 1.0f, MTXF_APPLY); Matrix_Push(&gGfxMatrix); - Camera_SetupLights(player); + Camera_SetupLights(camPlayer); Lights_SetOneLight(&gMasterDisp, gLight1x, gLight1y, gLight1z, gLight1R, gLight1G, gLight1B, gAmbientR, gAmbientG, gAmbientB); if (gLevelMode == LEVELMODE_ON_RAILS) { - Matrix_RotateY(gCalcMatrix, player->yRot_114 * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, player->xRot_120 * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, camPlayer->yRot_114 * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, camPlayer->xRot_120 * M_DTOR, MTXF_APPLY); - tempVec.x = player->cam.eye.x - player->pos.x; - tempVec.y = player->cam.eye.y - player->pos.y; - tempVec.z = player->cam.eye.z - (player->trueZpos + player->zPath); - Matrix_MultVec3f(gCalcMatrix, &tempVec, &gPlayerCamEye); - gPlayerCamEye.x += player->pos.x; - gPlayerCamEye.y += player->pos.y; - gPlayerCamEye.z += player->trueZpos + player->zPath; + tempVec.x = camPlayer->cam.eye.x - camPlayer->pos.x; + tempVec.y = camPlayer->cam.eye.y - camPlayer->pos.y; + tempVec.z = camPlayer->cam.eye.z - (camPlayer->trueZpos + camPlayer->zPath); + Matrix_MultVec3f(gCalcMatrix, &tempVec, &gPlayCamEye); + gPlayCamEye.x += camPlayer->pos.x; + gPlayCamEye.y += camPlayer->pos.y; + gPlayCamEye.z += camPlayer->trueZpos + camPlayer->zPath; - tempVec.x = player->cam.at.x - player->pos.x; - tempVec.y = player->cam.at.y - player->pos.y; - tempVec.z = player->cam.at.z - (player->trueZpos + player->zPath); - Matrix_MultVec3f(gCalcMatrix, &tempVec, &gPlayerCamAt); - gPlayerCamAt.x += player->pos.x; - gPlayerCamAt.y += player->pos.y; - gPlayerCamAt.z += player->trueZpos + player->zPath; + tempVec.x = camPlayer->cam.at.x - camPlayer->pos.x; + tempVec.y = camPlayer->cam.at.y - camPlayer->pos.y; + tempVec.z = camPlayer->cam.at.z - (camPlayer->trueZpos + camPlayer->zPath); + Matrix_MultVec3f(gCalcMatrix, &tempVec, &gPlayCamAt); + gPlayCamAt.x += camPlayer->pos.x; + gPlayCamAt.y += camPlayer->pos.y; + gPlayCamAt.z += camPlayer->trueZpos + camPlayer->zPath; - if (player->cockpitView && (player->boostSpeed > 5.0f)) { - gPlayerCamAt.x += SIN_DEG(gGameFrameCount * 150.0f) * player->boostSpeed * 0.2f; + if (camPlayer->alternateView && (camPlayer->boostSpeed > 5.0f)) { + gPlayCamAt.x += SIN_DEG(gGameFrameCount * 150.0f) * camPlayer->boostSpeed * 0.2f; } - } else if (player->state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) { - func_display_800578C4(player); + } else if (camPlayer->state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) { + func_display_800578C4(camPlayer); } else { - gPlayerCamEye.x = player->cam.eye.x; - gPlayerCamEye.y = player->cam.eye.y; - gPlayerCamEye.z = player->cam.eye.z; - gPlayerCamAt.x = player->cam.at.x; - gPlayerCamAt.y = player->cam.at.y; - gPlayerCamAt.z = player->cam.at.z; + gPlayCamEye.x = camPlayer->cam.eye.x; + gPlayCamEye.y = camPlayer->cam.eye.y; + gPlayCamEye.z = camPlayer->cam.eye.z; + gPlayCamAt.x = camPlayer->cam.at.x; + gPlayCamAt.y = camPlayer->cam.at.y; + gPlayCamAt.z = camPlayer->cam.at.z; } - player->camYaw = -Math_Atan2F(gPlayerCamEye.x - gPlayerCamAt.x, gPlayerCamEye.z - gPlayerCamAt.z); - player->camPitch = -Math_Atan2F(gPlayerCamEye.y - gPlayerCamAt.y, - sqrtf(SQ(gPlayerCamEye.z - gPlayerCamAt.z) + SQ(gPlayerCamEye.x - gPlayerCamAt.x))); - Matrix_RotateY(gCalcMatrix, -player->camYaw, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, player->camPitch, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, -player->camRoll * M_DTOR, MTXF_APPLY); + camPlayer->camYaw = -Math_Atan2F(gPlayCamEye.x - gPlayCamAt.x, gPlayCamEye.z - gPlayCamAt.z); + camPlayer->camPitch = -Math_Atan2F(gPlayCamEye.y - gPlayCamAt.y, + sqrtf(SQ(gPlayCamEye.z - gPlayCamAt.z) + SQ(gPlayCamEye.x - gPlayCamAt.x))); + Matrix_RotateY(gCalcMatrix, -camPlayer->camYaw, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, camPlayer->camPitch, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -camPlayer->camRoll * M_DTOR, MTXF_APPLY); tempVec.x = 0.0f; tempVec.y = 100.0f; tempVec.z = 0.0f; Matrix_MultVec3f(gCalcMatrix, &tempVec, &playerCamUp); if (gStarCount != 0) { gStarfieldRoll = DEG_TO_RAD(gPlayer[0].camRoll); - Camera_SetStarfieldPos(gPlayerCamEye.x, gPlayerCamEye.y, gPlayerCamEye.z, gPlayerCamAt.x, gPlayerCamAt.y, - gPlayerCamAt.z); + Camera_SetStarfieldPos(gPlayCamEye.x, gPlayCamEye.y, gPlayCamEye.z, gPlayCamAt.x, gPlayCamAt.y, gPlayCamAt.z); Background_DrawStarfield(); } Background_DrawBackdrop(); Background_DrawSun(); Matrix_Push(&gGfxMatrix); - Matrix_LookAt(gGfxMatrix, gPlayerCamEye.x, gPlayerCamEye.y, gPlayerCamEye.z, gPlayerCamAt.x, gPlayerCamAt.y, - gPlayerCamAt.z, playerCamUp.x, playerCamUp.y, playerCamUp.z, MTXF_APPLY); + // if(gControllerHold[gMainController]. button & L_TRIG) { + // Matrix_LookAt(gGfxMatrix, gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ, + // playerCamUp.x, playerCamUp.y, playerCamUp.z, MTXF_APPLY); + // } else { + Matrix_LookAt(gGfxMatrix, gPlayCamEye.x, gPlayCamEye.y, gPlayCamEye.z, gPlayCamAt.x, gPlayCamAt.y, gPlayCamAt.z, + playerCamUp.x, playerCamUp.y, playerCamUp.z, MTXF_APPLY); + // } + if ((gLevelType == LEVELTYPE_PLANET) || (gCurrentLevel == LEVEL_BOLSE)) { if ((gCurrentLevel == LEVEL_TITANIA) && ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO) || (gPlayer[0].unk_19C != 0))) { @@ -1629,24 +1634,24 @@ void Play_Draw(void) { } Lights_SetOneLight(&gMasterDisp, gLight2x, gLight2y, gLight2z, gLight2R, gLight2G, gLight2B, gAmbientR, gAmbientG, gAmbientB); - for (i = 0, opponent = gPlayer; i < gCamCount; i++, opponent++) { - opponentPos.x = opponent->pos.x; - opponentPos.y = opponent->pos.y; - opponentPos.z = opponent->trueZpos; - Display_SetSecondLight(&opponentPos); - func_display_800564C0(opponent, 0); - func_display_80057814(opponent); + for (i = 0, player = gPlayer; i < gCamCount; i++, player++) { + playerPos.x = player->pos.x; + playerPos.y = player->pos.y; + playerPos.z = player->trueZpos; + Display_SetSecondLight(&playerPos); + func_display_800564C0(player, 0); + func_display_80057814(player); } if ((gGroundSurface == SURFACE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) { Lights_SetOneLight(&gMasterDisp, gLight2x, -1 * gLight2y, gLight2z, gLight2R, gLight2G, gLight2B, gAmbientR, gAmbientG, gAmbientB); Matrix_Push(&gGfxMatrix); Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, MTXF_APPLY); - for (i = 0, opponent = gPlayer; i < gCamCount; i++, opponent++) { - opponentPos.x = opponent->pos.x; - opponentPos.y = opponent->pos.y; - opponentPos.z = opponent->trueZpos; - func_display_800564C0(opponent, 1); + for (i = 0, player = gPlayer; i < gCamCount; i++, player++) { + playerPos.x = player->pos.x; + playerPos.y = player->pos.y; + playerPos.z = player->trueZpos; + func_display_800564C0(player, 1); } Matrix_Pop(&gGfxMatrix); } @@ -1667,10 +1672,10 @@ void Play_Draw(void) { if ((gGroundSurface == SURFACE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) { Matrix_Push(&gGfxMatrix); Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, MTXF_APPLY); - for (i = 0, opponent = gPlayer; i < gCamCount; i++, opponent++) { + for (i = 0, player = gPlayer; i < gCamCount; i++, player++) { if (sPlayersVisible[i] != 0) { - func_display_80055B58(opponent); - func_display_80056230(opponent); + func_display_80055B58(player); + func_display_80056230(player); } Matrix_Pop(&gGfxMatrix); } @@ -1690,11 +1695,11 @@ void Play_Draw(void) { Effect_Draw(0); } gReflectY = 1; - for (i = 0, opponent = gPlayer; i < gCamCount; i++, opponent++) { + for (i = 0, player = gPlayer; i < gCamCount; i++, player++) { if (sPlayersVisible[i] != 0) { - func_display_80056E2C(opponent); - func_display_80055B58(opponent); - func_display_80056230(opponent); + func_display_80056E2C(player); + func_display_80055B58(player); + func_display_80056230(player); } } if ((gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { @@ -1712,15 +1717,15 @@ void Play_Draw(void) { if (sDrawCockpit != 0) { func_display_80053B18(); } - for (i = 0, opponent = gPlayer; i < gCamCount; i++, opponent++) { + for (i = 0, player = gPlayer; i < gCamCount; i++, player++) { if (sPlayersVisible[i] != 0) { if (gShowCrosshairs[i]) { - func_display_80053F7C(opponent); + func_display_80053F7C(player); } - if (opponent->form == FORM_LANDMASTER) { - func_display_80052B80(opponent); - } else if (opponent->form == FORM_ON_FOOT) { - func_display_80052584(opponent); + if (player->form == FORM_LANDMASTER) { + func_display_80052B80(player); + } else if (player->form == FORM_ON_FOOT) { + func_display_80052584(player); } } } @@ -1729,12 +1734,12 @@ void Play_Draw(void) { } Background_DrawLensFlare(); if ((gCamCount != 1) && - ((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (player->state_1C8 == PLAYERSTATE_1C8_U_TURN))) { + ((camPlayer->state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (camPlayer->state_1C8 == PLAYERSTATE_1C8_U_TURN))) { HUD_Draw(); HUD_DrawEdgeArrows(); } Matrix_Pop(&gGfxMatrix); - func_display_80051B30(); + Display_DrawHelpAlert(); sPlayersVisible[gPlayerNum] = 0; Matrix_Pop(&gGfxMatrix); } diff --git a/src/engine/fox_edata.c b/src/engine/fox_edata.c index 3780107d..c58f1357 100644 --- a/src/engine/fox_edata.c +++ b/src/engine/fox_edata.c @@ -2,7 +2,7 @@ #include "fox_edata_info.c" -f32* D_edata_800CF964[] = { NULL }; +f32* D_edata_800CF964[] = { NULL }; // Likely a scrapped array of scenery shadow boxes void func_edata_800594F0(Scenery* scenery) { RCP_SetupDL_57(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); diff --git a/src/engine/fox_edisplay.c b/src/engine/fox_edisplay.c index 0d315d6e..56d9ac26 100644 --- a/src/engine/fox_edisplay.c +++ b/src/engine/fox_edisplay.c @@ -24,7 +24,7 @@ Vec3f D_edisplay_801615D0; Vec3f sViewPos; -s32 sDrewActor; +bool sDrewActor; Matrix D_edisplay_801615F0; WingInfo D_edisplay_80161630; @@ -90,11 +90,11 @@ f32 D_edisplay_800CFA2C[] = { void Actor202_Draw(Actor202* this) { Vec3f sp30[30]; - f32 temp = D_edisplay_800CF9B0[this->unk_0B6] - 114.0f; + f32 temp = D_edisplay_800CF9B0[this->animFrame] - 114.0f; Matrix_Translate(gGfxMatrix, 0.f, -temp, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - Animation_GetFrameData(&D_ME_601E8C4, this->unk_0B6, sp30); + Animation_GetFrameData(&D_ME_601E8C4, this->animFrame, sp30); Animation_DrawSkeleton(1, D_ME_601E9D0, sp30, NULL, Actor202_PostLimbDraw, &this->index, &gIdentityMatrix); } @@ -119,7 +119,7 @@ void Scenery42_Draw(Scenery_42* this) { } void Actor196_Draw(Actor196* this) { - if (this->unk_0B6 != 0) { + if (this->animFrame != 0) { gSPDisplayList(gMasterDisp++, D_CO_6032BC0); } } @@ -133,7 +133,7 @@ void Sprite167_Draw(Sprite167* this) { void FogShadow_Draw(FogShadow* this) { RCP_SetupDL_47(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 180); - switch (this->unk_45) { + switch (this->sceneryId) { case OBJ_SCENERY_0: Matrix_Scale(gGfxMatrix, 2.0f, 1.0f, 0.7f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -179,8 +179,9 @@ void func_edisplay_80059FDC(Scenery* scenery) { gSPDisplayList(gMasterDisp++, D_CO_6035DA0); } +// repurposed into OBJ_SCENERY_15 void func_edisplay_8005A010(Sprite* sprite) { - if (sprite->unk_48 == 0) { + if (!sprite->toLeft) { Matrix_RotateY(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_60361F0); @@ -576,7 +577,7 @@ void func_edisplay_8005B7CC(Actor* actor) { void func_edisplay_8005B848(Actor* actor) { f32 scale; - switch (actor->unk_0B4) { + switch (actor->eventType) { case 0: gSPDisplayList(gMasterDisp++, D_1028230); break; @@ -600,7 +601,7 @@ void func_edisplay_8005B848(Actor* actor) { void func_edisplay_8005B9A4(Actor* actor) { Matrix_Translate(gGfxMatrix, 0.0f, -124.0f, 0.0f, MTXF_APPLY); - Animation_GetFrameData(&D_CO_6029528, actor->unk_0B6, actor->vwork); + Animation_GetFrameData(&D_CO_6029528, actor->animFrame, actor->vwork); Animation_DrawSkeleton(1, D_CO_6029674, actor->vwork, NULL, NULL, actor, &gIdentityMatrix); } @@ -619,7 +620,7 @@ f32 D_edisplay_800CFCCC[] = { 0.0f, 0.05f, 0.03f, 0.02f, 0.01f, 0.05f, 0.0f, 0.02f, }; -void func_edisplay_8005BAB4(ObjectId objId, s32 index) { +void Object_SetShadowDL(ObjectId objId, s32 index) { f32 temp_fv0; f32 temp1; f32 temp2; @@ -637,7 +638,7 @@ void func_edisplay_8005BAB4(ObjectId objId, s32 index) { case OBJ_ACTOR_CUTSCENE: case OBJ_ACTOR_TEAM_BOSS: case OBJ_ACTOR_EVENT: - switch (gActors[index].unk_0B4) { + switch (gActors[index].eventType) { case EVID_3: Matrix_Scale(gGfxMatrix, 2.3f, 0.0f, 2.3f, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); @@ -763,7 +764,7 @@ void func_edisplay_8005BAB4(ObjectId objId, s32 index) { void ItemCheckpoint_Draw(ItemCheckpoint* this) { s32 i; - if ((gGameFrameCount & 0x18) && (this->state == 0)) { + if (((gGameFrameCount & 0x18) != 0) && (this->state == 0)) { Matrix_Push(&gGfxMatrix); RCP_SetupDL(&gMasterDisp, 0x40); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255); @@ -1001,16 +1002,16 @@ void Actor_DrawOnRails(Actor* this) { Zoness_80190F08(this); return; } - if ((this->obj.id == OBJ_ACTOR_EVENT) && (this->unk_0B4 == EVID_200)) { + if ((this->obj.id == OBJ_ACTOR_EVENT) && (this->eventType == EVID_200)) { Actor194_Draw(this); } else { if (this->info.unk_19 != 0) { this->obj.pos.y += gCameraShakeY; func_edisplay_8005D008(&this->obj, this->info.drawType); this->obj.pos.y -= gCameraShakeY; - } else if ((this->obj.id == OBJ_ACTOR_EVENT) && (this->unk_0B4 != EVID_31)) { + } else if ((this->obj.id == OBJ_ACTOR_EVENT) && (this->eventType != EVID_31)) { func_edisplay_8005D3CC(&this->obj, this->vwork[29].x, this->vwork[29].y, - this->vwork[29].z + this->unk_0F4.z, this->info.drawType); + this->vwork[29].z + this->rot_0F4.z, this->info.drawType); } else { func_edisplay_8005D008(&this->obj, this->info.drawType); } @@ -1021,7 +1022,7 @@ void Actor_DrawOnRails(Actor* this) { this->info.draw(&this->obj); Object_UpdateSfxSource(this->sfxSource); if (((this->obj.id == OBJ_ACTOR_TEAM_BOSS) || - ((this->obj.id == OBJ_ACTOR_SLIPPY_SX) && (this->unk_0B6 > 0))) && + ((this->obj.id == OBJ_ACTOR_SLIPPY_SX) && (this->animFrame > 0))) && (gReflectY > 0)) { Matrix_MultVec3f(gGfxMatrix, &sp34, &gTeamArrowsViewPos[this->aiType]); } @@ -1140,9 +1141,9 @@ void Boss_Draw(Boss* this, s32 arg1) { Vec3f origin = { 0.0f, 0.0f, 0.0f }; if (this->info.unk_19 != 0) { - this->obj.pos.y += this->unk_068 + gCameraShakeY; + this->obj.pos.y += this->yOffset + gCameraShakeY; func_edisplay_8005D1F0(&this->obj, this->info.drawType); - this->obj.pos.y -= this->unk_068 + gCameraShakeY; + this->obj.pos.y -= this->yOffset + gCameraShakeY; } else { func_edisplay_8005D1F0(&this->obj, this->info.drawType); } @@ -1299,7 +1300,7 @@ void ActorAllRange_DrawShadow(Actor* actor) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1032780); } else if (gCurrentLevel == LEVEL_KATINA) { - if ((actor->unk_0B6 == 1) || (actor->unk_0B6 == 2)) { + if ((actor->animFrame == 1) || (actor->animFrame == 2)) { gSPDisplayList(gMasterDisp++, D_KA_600D730); } else { gSPDisplayList(gMasterDisp++, D_KA_600DBC0); @@ -1347,7 +1348,7 @@ void Object_DrawShadow(s32 index, Object* obj) { Matrix_RotateZ(gGfxMatrix, obj->rot.z * M_DTOR, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); - func_edisplay_8005BAB4(obj->id, index); + Object_SetShadowDL(obj->id, index); } } @@ -1381,9 +1382,9 @@ void Object_SetSfxSourceToPos(f32* sfxSrc, Vec3f* pos) { } else { Matrix_RotateY(gCalcMatrix, gPlayer[0].camYaw, MTXF_NEW); Matrix_RotateX(gCalcMatrix, gPlayer[0].camPitch, MTXF_APPLY); - sp2C.x = pos->x - gPlayerCamEye.x; - sp2C.y = pos->y - gPlayerCamEye.y; - sp2C.z = pos->z + gPathProgress - gPlayerCamEye.z; + sp2C.x = pos->x - gPlayCamEye.x; + sp2C.y = pos->y - gPlayCamEye.y; + sp2C.z = pos->z + gPathProgress - gPlayCamEye.z; Matrix_MultVec3f(gCalcMatrix, &sp2C, &sp20); sfxSrc[0] = sp20.x; sfxSrc[1] = sp20.y; @@ -1494,7 +1495,7 @@ void Display_SetSecondLight(Vec3f* pos) { if (lightFade > 1.0f) { lightFade = 1.0f; } - if (D_ctx_8017812C == 2) { + if (gGroundClipMode == 2) { lightFade = 1.0f; } sp94 = Math_Atan2F(sp9C.x, sp9C.z); @@ -1550,7 +1551,7 @@ void Object_DrawAll(s32 arg0) { if ((gLevelMode == LEVELMODE_ALL_RANGE) && (gCurrentLevel != LEVEL_KATINA)) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); - if (D_ctx_80177AB0 == 5) { + if (gDrawBackdrop == 5) { gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); } for (i = 0, scenery360 = gScenery360; i < 200; i++, scenery360++) { @@ -1593,7 +1594,7 @@ void Object_DrawAll(s32 arg0) { Matrix_Push(&gGfxMatrix); Boss_Draw(boss, arg0); Matrix_Pop(&gGfxMatrix); - if ((boss->unk_05E != 0) && (D_edisplay_801615D0.y > 0.0f)) { + if (boss->drawShadow && (D_edisplay_801615D0.y > 0.0f)) { Matrix_Push(&gGfxMatrix); Object_DrawShadow(i, &boss->obj); Matrix_Pop(&gGfxMatrix); @@ -1641,7 +1642,7 @@ void Object_DrawAll(s32 arg0) { Object_SetCullDirection(arg0); Actor_DrawOnRails(actor); Matrix_Pop(&gGfxMatrix); - if (actor->unk_0C9 != 0) { + if (actor->drawShadow) { Matrix_Push(&gGfxMatrix); Object_DrawShadow(i, &actor->obj); Matrix_Pop(&gGfxMatrix); @@ -1651,7 +1652,7 @@ void Object_DrawAll(s32 arg0) { Matrix_Push(&gGfxMatrix); Actor_DrawAllRange(actor); Matrix_Pop(&gGfxMatrix); - if ((actor->unk_0C9 != 0) && (sDrewActor != 0) && + if (actor->drawShadow && sDrewActor && ((sViewPos.z > -4000.0f) || (gCurrentLevel != LEVEL_KATINA))) { Matrix_Push(&gGfxMatrix); Object_DrawShadow(i, &actor->obj); @@ -1808,8 +1809,8 @@ void TexturedLine_Draw(void) { if (gCurrentLevel == LEVEL_MACBETH) { gSPDisplayList(gMasterDisp++, D_MA_6012C00); } else { - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, texLine->red, texLine->green, texLine->blue, - texLine->alpha); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, texLine->prim.r, texLine->prim.g, texLine->prim.b, + texLine->prim.a); gSPDisplayList(gMasterDisp++, D_edisplay_800CFD80); } } @@ -1821,12 +1822,12 @@ void TexturedLine_Draw(void) { void TexturedLine_DrawPath(s32 index) { TexturedLine* texLine = &gTexturedLines[index]; - if (texLine->alpha == 255) { + if (texLine->prim.a == 255) { RCP_SetupDL(&gMasterDisp, 5); } else { RCP_SetupDL(&gMasterDisp, 0xE); } - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, texLine->red, texLine->green, texLine->blue, texLine->alpha); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, texLine->prim.r, texLine->prim.g, texLine->prim.b, texLine->prim.a); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, texLine->posAA.x, texLine->posAA.y, texLine->posAA.z, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, texLine->yRot, MTXF_APPLY); diff --git a/src/engine/fox_effect.c b/src/engine/fox_effect.c index 3318e235..385455c4 100644 --- a/src/engine/fox_effect.c +++ b/src/engine/fox_effect.c @@ -423,7 +423,7 @@ static s32 D_800D173C[] = { 255, 255, 255, 0, 0, 0, 255, 0, 255, 0, 0, 0, 255, 2 void func_effect_800788B0(Effect* effect) { s32 temp_ft3; - s32* tmp; + s32 tmp; switch (gCurrentLevel) { case LEVEL_METEO: @@ -436,8 +436,8 @@ void func_effect_800788B0(Effect* effect) { RCP_SetupDL(&gMasterDisp, 0x43); temp_ft3 = Math_ModF(effect->index, 4.0f); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, (s32) effect->scale1); - tmp = &D_800D173C[(s32) (temp_ft3 * 4.0f)]; - gDPSetEnvColor(gMasterDisp++, tmp[0], tmp[1], tmp[2], 255); + tmp = temp_ft3 * 4.0f; + gDPSetEnvColor(gMasterDisp++, D_800D173C[tmp + 0], D_800D173C[tmp + 1], D_800D173C[tmp + 2], 255); Graphics_SetScaleMtx(effect->scale2); gSPDisplayList(gMasterDisp++, D_1024AC0); RCP_SetupDL(&gMasterDisp, 0x40); @@ -873,7 +873,7 @@ void func_effect_800798F0(Effect* effect) { void func_effect_8007A28C(Effect* effect) { Texture_Scroll(D_10190C0, 16, 32, 0); - D_ctx_8017812C = 2; + gGroundClipMode = 2; effect->obj.rot.y += 1.0f; Math_SmoothStepToF(&effect->scale2, effect->scale1, 0.05f, 1.5f, 0.001f); @@ -895,7 +895,7 @@ void func_effect_8007A28C(Effect* effect) { if (effect->unk_44 < 0) { effect->unk_44 = 0; Object_Kill(&effect->obj, effect->sfxSource); - D_ctx_8017812C = 0; + gGroundClipMode = 0; } } } @@ -1596,12 +1596,12 @@ void func_effect_8007C250(Effect* effect) { Math_SmoothStepToF(&effect->vel.y, 0.0f, 0.2f, 10.0f, 0.1f); Math_SmoothStepToF(&effect->vel.z, 0.0f, 0.2f, 10.0f, 0.1f); - var_v0 = 3; + var_v0 = 4 - 1; if (gLevelMode == LEVELMODE_ALL_RANGE) { - var_v0 = 1; + var_v0 = 2 - 1; } - if (!(effect->timer_50 & var_v0)) { + if ((effect->timer_50 & var_v0) == 0) { randX = RAND_FLOAT_CENTERED(40.0f); randY = RAND_FLOAT_CENTERED(40.0f); randOther = RAND_FLOAT(0.5f) + 1.0f; @@ -1738,12 +1738,12 @@ void func_effect_8007C8C4(Effect* effect) { f32 randOther; s32 var_v0; - var_v0 = 0; + var_v0 = 1 - 1; if ((gCurrentLevel == LEVEL_FORTUNA) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_NEXT)) { - var_v0 = 3; + var_v0 = 4 - 1; } - if (!(effect->timer_50 & var_v0) && (gLevelType == LEVELTYPE_PLANET)) { + if (((effect->timer_50 & var_v0) == 0) && (gLevelType == LEVELTYPE_PLANET)) { randX = RAND_FLOAT_CENTERED(10.0f); randY = RAND_FLOAT_CENTERED(10.0f); randOther = RAND_FLOAT(0.5f) + 1.0f; @@ -2032,8 +2032,7 @@ static f32 D_800D17F8[] = { 1.6f, 1.6f, 1.7f, 1.7f, 1.8f, 1.8f, 1.9f, 1.9f, 2.0f, 2.0f, }; -// RGBA values -static u8 D_800D184C[][4] = { +static Color_RGBA32 D_800D184C[] = { { 255, 255, 255, 255 }, { 255, 0, 0, 255 }, { 255, 40, 40, 255 }, { 255, 80, 80, 255 }, { 255, 120, 120, 255 }, { 255, 160, 160, 255 }, { 255, 200, 200, 255 }, { 255, 240, 240, 255 }, { 255, 255, 255, 255 }, { 255, 255, 255, 255 }, { 255, 255, 255, 255 }, { 255, 255, 255, 255 }, @@ -2053,8 +2052,8 @@ void func_effect_8007D55C(Effect* effect) { Graphics_SetScaleMtx(effect->scale2); if (gLevelType == LEVELTYPE_PLANET) { - gDPSetPrimColor(gMasterDisp++, 0, 0, D_800D184C[effect->unk_4C][0], D_800D184C[effect->unk_4C][1], - D_800D184C[effect->unk_4C][2], D_800D184C[effect->unk_4C][3]); + gDPSetPrimColor(gMasterDisp++, 0, 0, D_800D184C[effect->unk_4C].r, D_800D184C[effect->unk_4C].g, + D_800D184C[effect->unk_4C].b, D_800D184C[effect->unk_4C].a); scale = D_800D17F8[effect->unk_4C] - 0.5f; Matrix_Scale(gGfxMatrix, scale, scale, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -2324,7 +2323,7 @@ void func_effect_8007E45C(Effect* effect) { } effect->scale2 += 0.02f; - effect->unk_44 -= 1; + effect->unk_44--; if (effect->unk_44 < 0) { Object_Kill(&effect->obj, effect->sfxSource); @@ -2643,7 +2642,7 @@ void func_effect_8007F438(Effect* effect) { if (effect->unk_46 == 0) { effect->unk_46 = 30; - effect->unk_44 += 1; + effect->unk_44++; effect->unk_44 &= 1; } else { effect->unk_46--; @@ -2670,7 +2669,7 @@ void func_effect_8007F438(Effect* effect) { void func_effect_8007F5AC(Effect* effect) { if (effect->unk_4C == 0) { effect->unk_46++; - if (!(effect->unk_46 & 0x20)) { + if ((effect->unk_46 & 0x20) == 0) { effect->vel.x += 0.5f; } else { effect->vel.x -= 0.5f; @@ -2684,7 +2683,7 @@ void func_effect_8007F5AC(Effect* effect) { } effect->scale2 += 0.02f; - if (!(gGameFrameCount & 0x10)) { + if ((gGameFrameCount & 0x10) == 0) { effect->scale2 += 0.01f; } else { effect->scale2 -= 0.01f; @@ -2846,7 +2845,7 @@ void func_effect_8007FE88(Effect* effect) { return; } - if (func_effect_8007FD84(effect) != 0) { + if (func_effect_8007FD84(effect)) { Object_Kill(&effect->obj, effect->sfxSource); return; } @@ -2870,7 +2869,7 @@ void func_effect_8007FE88(Effect* effect) { effect->vel.x = destVelocity.x; effect->vel.y = destVelocity.y; effect->vel.z = destVelocity.z; - gPlayer[0].unk_2C4 += 1; + gPlayer[0].unk_2C4++; AUDIO_PLAY_SFX(NA_SE_ROLLING_REFLECT, effect->sfxSource, 0); } @@ -2979,7 +2978,7 @@ void func_effect_8008040C(Effect* effect) { return; } - if (func_effect_8007FD84(effect) != 0) { + if (func_effect_8007FD84(effect)) { Object_Kill(&effect->obj, effect->sfxSource); return; } @@ -3079,11 +3078,11 @@ void func_effect_80080ACC(Effect* effect) { break; case 1: - effect->unk_46 -= 1; + effect->unk_46--; break; case 10: - effect->unk_44 -= 1; + effect->unk_44--; if (effect->unk_44 <= 0) { effect->unk_44 = effect->unk_46; } @@ -3572,7 +3571,7 @@ void func_effect_80081C5C(Effect* effect) { Object_Kill(&effect->obj, effect->sfxSource); func_effect_8007D0E0(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 5.0f); } else if (fabsf(gPlayer[0].trueZpos - effect->obj.pos.z) < 1000.0f) { - ActorEvent_8006F0D8(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 15.0f); + ActorEvent_SpawnEffect347(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 15.0f); Object_Kill(&effect->obj, effect->sfxSource); } sp84 = 50.0f; @@ -3756,7 +3755,7 @@ void func_effect_80081C5C(Effect* effect) { effect->unk_46 = 50; } if (effect->unk_46 != 0) { - effect->unk_46 -= 1; + effect->unk_46--; } if ((((gGameFrameCount % 16) == 0)) && (effect->timer_50 == 0)) { D_800D18EC = diff --git a/src/engine/fox_enmy.c b/src/engine/fox_enmy.c index 13cce9b7..7d918bbb 100644 --- a/src/engine/fox_enmy.c +++ b/src/engine/fox_enmy.c @@ -175,7 +175,7 @@ void Boss_Initialize(Boss* boss) { for (i = 0; i < sizeof(Boss); i++, ptr++) { *ptr = 0; } - boss->unk_3F8 = 1.0f; + boss->scale = 1.0f; } void Item_Initialize(Item* item) { @@ -380,12 +380,12 @@ void ActorEvent_Load(Actor* actor, ObjectInit* objInit, s32 index) { actor->obj.pos.z += -3000.0f + objInit->zPos2; actor->obj.pos.x = objInit->xPos; actor->obj.pos.y = objInit->yPos; - actor->obj.rot.y = actor->unk_0F4.y = objInit->rot.y; - actor->obj.rot.x = actor->unk_0F4.x = objInit->rot.x; - actor->unk_0F4.z = objInit->rot.z; + actor->obj.rot.y = actor->rot_0F4.y = objInit->rot.y; + actor->obj.rot.x = actor->rot_0F4.x = objInit->rot.x; + actor->rot_0F4.z = objInit->rot.z; actor->obj.id = OBJ_ACTOR_EVENT; actor->timer_0C2 = 10; - actor->unk_0B4 = EVID_FFF; + actor->eventType = EVID_FFF; actor->aiType = objInit->id - ACTOR_EVENT_ID; Object_SetInfo(&actor->info, actor->obj.id); @@ -483,12 +483,11 @@ void Object_Load(ObjectInit* objInit, f32 xMax, f32 xMin, f32 yMax, f32 yMin) { D_Andross_801A7F60 = -(f32) objInit->rot.x; break; case OBJ_UNK_400: - D_ctx_801782B8++; + gDrawSmallRocks++; break; case OBJ_UNK_401: - if (D_ctx_801782B8 > 0) { - D_ctx_801782B8--; - break; + if (gDrawSmallRocks > 0) { + gDrawSmallRocks--; } break; } @@ -538,8 +537,8 @@ void Object_LoadLevelObjects(void) { } else { gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]); } - if (D_ctx_8017812C == 0) { - for (j = 0; j < D_ctx_801782B8; j++) { + if (gGroundClipMode == 0) { + for (j = 0; j < gDrawSmallRocks; j++) { if (gCurrentLevel == LEVEL_AQUAS) { func_enmy_80061B68(); } else { @@ -561,10 +560,10 @@ void Object_LoadLevelObjects(void) { yMin = xMin = -4000.0f; } - if ((gPlayer[0].timer_210 != 0) && (gPlayer[0].yRot_118 < 0.0f)) { + if ((gPlayer[0].pathChangeTimer != 0) && (gPlayer[0].pathChangeYaw < 0.0f)) { xMax = 10000.0f; } - if ((gPlayer[0].timer_210 != 0) && (gPlayer[0].yRot_118 > 0.0f)) { + if ((gPlayer[0].pathChangeTimer != 0) && (gPlayer[0].pathChangeYaw > 0.0f)) { xMin = -10000.0f; } gLastPathChange = 0; @@ -851,7 +850,7 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) { Object_CheckSingleHitbox(pos, sprite->info.hitbox, &sprite->obj.pos)) { if ((sprite->obj.id == OBJ_SPRITE_FO_POLE) || (sprite->obj.id == OBJ_SPRITE_CO_TREE) || (sprite->obj.id == OBJ_SPRITE_CO_TREE)) { - sprite->unk_46 = 1; + sprite->destroy = 1; } return 0; } @@ -904,7 +903,7 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) { } } else if (actor->scale < 0.0f) { if (Object_CheckHitboxCollision(pos, actor->info.hitbox, &actor->obj, actor->vwork[29].x, - actor->vwork[29].y, actor->vwork[29].z + actor->unk_0F4.z)) { + actor->vwork[29].y, actor->vwork[29].z + actor->rot_0F4.z)) { actor->dmgType = DMG_BEAM; actor->damage = 10; actor->dmgPart = -1; @@ -962,7 +961,7 @@ void func_enmy_80063D58(Scenery* scenery) { Sprite_Initialize(&gSprites[i]); gSprites[i].obj.status = OBJ_INIT; gSprites[i].obj.id = OBJ_SPRITE_FOG_SHADOW; - gSprites[i].unk_45 = scenery->obj.id; + gSprites[i].sceneryId = scenery->obj.id; gSprites[i].obj.pos.x = scenery->obj.pos.x; gSprites[i].obj.pos.y = 5.0f; gSprites[i].obj.pos.z = scenery->obj.pos.z; @@ -1144,16 +1143,16 @@ void Object_Init(s32 index, ObjectId objId) { } break; case OBJ_ACTOR_239: - gActors[index].iwork[0] = D_ctx_801784A4; - D_ctx_801784A4++; + gActors[index].iwork[0] = gZOSnakeWaypointCount; + gZOSnakeWaypointCount++; break; case OBJ_ACTOR_236: - D_ctx_801784A4 = 0; - gActors[index].unk_0F4.x = gActors[index].obj.rot.x; - gActors[index].unk_0F4.y = gActors[index].obj.rot.y; + gZOSnakeWaypointCount = 0; + gActors[index].rot_0F4.x = gActors[index].obj.rot.x; + gActors[index].rot_0F4.y = gActors[index].obj.rot.y; gActors[index].obj.rot.x = gActors[index].obj.rot.y = 0.0f; gActors[index].fwork[2] = gActors[index].obj.pos.y; - var_v0 = D_ctx_801782C4; + var_v0 = gZOSnakePosRots; for (var_a0 = 0; var_a0 < 200; var_a0++, var_v0++) { var_v0->pos.x = gActors[index].obj.pos.x; var_v0->pos.y = gActors[index].obj.pos.y; @@ -1185,7 +1184,7 @@ void Object_Init(s32 index, ObjectId objId) { AUDIO_PLAY_SFX(NA_SE_EN_MISSILE_ENGINE, gActors[index].sfxSource, 4); break; case OBJ_ACTOR_192: - gActors[index].unk_0C9 = 1; + gActors[index].drawShadow = true; break; case OBJ_BOSS_320: Andross_Boss320_Init(&gBosses[index]); @@ -1408,9 +1407,9 @@ void func_enmy_800655C8(Actor* actor, f32 xPos, f32 yPos, f32 zPos, s32 arg4) { actor->obj.pos.x = xPos; actor->obj.pos.y = yPos; actor->obj.pos.z = zPos; - actor->unk_0B4 = arg4; + actor->eventType = arg4; actor->timer_0BE = 50; - if (actor->unk_0B4 == 1) { + if (actor->eventType == 1) { actor->timer_0BE = 30; } actor->fwork[5] = 15.0f; @@ -1530,7 +1529,7 @@ void func_enmy_800656D4(Actor* actor) { sp88 = actor->fwork[27] - actor->obj.pos.x; sp80 = actor->fwork[29] - actor->obj.pos.z; sp80 = sqrtf(SQ(sp88) + SQ(sp80)) * 0.2f; - if (actor->unk_0B4 == 1) { + if (actor->eventType == 1) { sp80 = 0.1f; } spD0 = SIN_DEG(actor->fwork[0]) * sp80; @@ -1562,10 +1561,10 @@ void func_enmy_800656D4(Actor* actor) { actor->vel.x = sp98.x; actor->vel.y = sp98.y; actor->vel.z = sp98.z - gPathVelZ; - if (actor->unk_0B4 == 0) { + if (actor->eventType == 0) { actor->obj.rot.z += 5.0f; } - if (actor->unk_0B4 == 1) { + if (actor->eventType == 1) { if (actor->timer_0BE == 0) { actor->timer_0BE = 30; Math_Vec3fFromAngles(&sp98, actor->obj.rot.x, actor->obj.rot.y, 120.0f); @@ -1656,7 +1655,7 @@ void Actor_Despawn(Actor* actor) { !((D_versus_80178768[0] == 0) && (D_versus_80178768[1] == 0) && (D_versus_80178768[2] == 0))) { gPlayerScores[actor->dmgSource - 1] += actor->info.bonus; } - } else if (!((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->unk_0B6 == 1))) { + } else if (!((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->animFrame == 1))) { if ((actor->dmgSource == AI360_FOX + 1) && (actor->info.bonus != 0)) { gHitCount += actor->info.bonus; D_ctx_80177850 = 15; @@ -1723,17 +1722,17 @@ void func_enmy_8006654C(Actor* actor) { if (actor->fwork[0] < 20.0f) { actor->fwork[0] += 0.5f; } - actor->unk_0B6++; - if (Animation_GetFrameCount(&D_CO_6029528) < actor->unk_0B6) { - actor->unk_0B6 = 0; + actor->animFrame++; + if (Animation_GetFrameCount(&D_CO_6029528) < actor->animFrame) { + actor->animFrame = 0; } - if ((actor->obj.rot.z < 15.0f) && (actor->unk_0B6 < 20)) { + if ((actor->obj.rot.z < 15.0f) && (actor->animFrame < 20)) { actor->obj.rot.z += 1.0f; } - if ((actor->obj.rot.z > -15.0f) && (actor->unk_0B6 > 20)) { + if ((actor->obj.rot.z > -15.0f) && (actor->animFrame > 20)) { actor->obj.rot.z -= 1.0f; } - if ((actor->unk_0B6 == 20) || (actor->unk_0B6 == 40)) { + if ((actor->animFrame == 20) || (actor->animFrame == 40)) { actor->state++; actor->timer_0BC = 20; } @@ -1920,7 +1919,7 @@ void Item_CheckBounds(Item* this) { if (this->obj.pos.y < gGroundHeight + 70.0f) { Math_SmoothStepToF(&this->obj.pos.y, gGroundHeight + 70.0f, 0.1f, 5.0f, 0.01f); } - if ((gCurrentLevel == LEVEL_AQUAS) && (gBossActive != 0)) { + if ((gCurrentLevel == LEVEL_AQUAS) && gBossActive) { this->obj.pos.z += 20.0f; } } else if (this->obj.pos.y < -500.0f) { @@ -2208,7 +2207,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 && (gLevelMode == LEVELMODE_ON_RAILS)) { + if (gPlayer[0].alternateView && (gLevelMode == LEVELMODE_ON_RAILS)) { this->obj.pos.z += (gPlayer[this->playerNum].trueZpos - 300.0f - this->obj.pos.z) * 0.3f; } else { this->obj.pos.z += (gPlayer[this->playerNum].trueZpos - this->obj.pos.z) * 0.5f; @@ -2308,7 +2307,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) { + if (gPlayer[0].alternateView) { this->obj.pos.z += (gPlayer[this->playerNum].trueZpos - 200.0f - this->obj.pos.z) * 0.3f; } else { this->obj.pos.z += (gPlayer[this->playerNum].trueZpos - 100.0f - this->obj.pos.z) * 0.3f; @@ -2384,40 +2383,40 @@ void ItemPathChange_Update(Item* this) { if (this->collected) { Object_Kill(&this->obj, this->sfxSource); gPlayer[0].pathStep = 0.0f; - gPlayer[0].timer_210 = this->width * 0.05f; + gPlayer[0].pathChangeTimer = this->width * 0.05f; switch (this->obj.id) { case OBJ_ITEM_PATH_SPLIT_X: if (this->obj.pos.x < gPlayer[0].pos.x) { - gPlayer[0].yRot_118 = -30.0f; + gPlayer[0].pathChangeYaw = -30.0f; gPlayer[0].xPathTarget = gPlayer[0].xPath + this->width; } else { - gPlayer[0].yRot_118 = 30.0f; + gPlayer[0].pathChangeYaw = 30.0f; gPlayer[0].xPathTarget = gPlayer[0].xPath - this->width; } break; case OBJ_ITEM_PATH_TURN_LEFT: - gPlayer[0].yRot_118 = 30.0f; + gPlayer[0].pathChangeYaw = 30.0f; gPlayer[0].xPathTarget = gPlayer[0].xPath - this->width; break; case OBJ_ITEM_PATH_TURN_RIGHT: - gPlayer[0].yRot_118 = -30.0f; + gPlayer[0].pathChangeYaw = -30.0f; gPlayer[0].xPathTarget = gPlayer[0].xPath + this->width; break; case OBJ_ITEM_PATH_SPLIT_Y: if (this->obj.pos.y < gPlayer[0].pos.y) { - gPlayer[0].xRot_124 = 30.0f; + gPlayer[0].pathChangePitch = 30.0f; gPlayer[0].yPathTarget = gPlayer[0].yPath + this->width; } else { - gPlayer[0].xRot_124 = -30.0f; + gPlayer[0].pathChangePitch = -30.0f; gPlayer[0].yPathTarget = gPlayer[0].yPath - this->width; } break; case OBJ_ITEM_PATH_TURN_UP: - gPlayer[0].xRot_124 = 30.0f; + gPlayer[0].pathChangePitch = 30.0f; gPlayer[0].yPathTarget = gPlayer[0].yPath + this->width; break; case OBJ_ITEM_PATH_TURN_DOWN: - gPlayer[0].xRot_124 = -30.0f; + gPlayer[0].pathChangePitch = -30.0f; gPlayer[0].yPathTarget = gPlayer[0].yPath - this->width; break; } @@ -2430,7 +2429,7 @@ void Sprite_UpdateDoodad(Sprite* this) { (Math_Atan2F(gPlayer[0].cam.eye.x - this->obj.pos.x, gPlayer[0].cam.eye.z - (this->obj.pos.z + gPathProgress)) * 180.0f) / M_PI; - if (this->unk_46 != 0) { + if (this->destroy) { this->obj.status = OBJ_FREE; func_effect_8007A6F0(&this->obj.pos, NA_SE_OB_EXPLOSION_S); switch (this->obj.id) { @@ -2505,7 +2504,7 @@ void Actor_Move(Actor* actor) { var_fv0 = 4000.0f; if ((actor->obj.id == OBJ_ACTOR_236) || (gCurrentLevel == LEVEL_MACBETH) || - ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0B4 == EVID_56))) { + ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->eventType == EVID_56))) { var_fv0 = 8000.0f; } else if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ENTER_WARP_ZONE) { var_fv0 = 100000.0f; @@ -2517,7 +2516,7 @@ void Actor_Move(Actor* actor) { Object_Kill(&actor->obj, actor->sfxSource); switch (actor->obj.id) { case OBJ_ACTOR_236: - D_ctx_801784A4 = 0; + gZOSnakeWaypointCount = 0; break; case OBJ_ACTOR_229: Titania_8018E3B0(actor); @@ -2526,9 +2525,9 @@ void Actor_Move(Actor* actor) { gActor194Status[actor->unk_046] = 0; break; case OBJ_ACTOR_EVENT: - if ((actor->unk_0B4 >= EVID_200) && (actor->unk_0B4 < EVID_300)) { + if ((actor->eventType >= EVID_200) && (actor->eventType < EVID_300)) { gActor194Status[actor->unk_046] = 0; - } else if ((actor->unk_0B4 == EVID_38) && (actor->unk_046 != 2)) { + } else if ((actor->eventType == EVID_SX_WARP_GATE) && (actor->unk_046 != 2)) { gRingPassCount = -1; } break; @@ -2552,7 +2551,7 @@ void Boss_Move(Boss* boss) { void Scenery_Move(Scenery* scenery) { if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) { - scenery->obj.pos.z += scenery->unk_60; + scenery->obj.pos.z += scenery->effectVel.z; if (scenery->info.cullDistance < scenery->obj.pos.z) { Object_Kill(&scenery->obj, scenery->sfxSource); } @@ -2580,7 +2579,7 @@ void Sprite_Move(Sprite* sprite) { f32 var_fa0 = 500.0f; if (((sprite->obj.id == OBJ_SPRITE_FOG_SHADOW) && - ((sprite->unk_45 == OBJ_SCENERY_6) || (sprite->unk_45 == OBJ_SCENERY_7))) || + ((sprite->sceneryId == OBJ_SCENERY_6) || (sprite->sceneryId == OBJ_SCENERY_7))) || (sprite->obj.id == OBJ_SCENERY_8)) { var_fa0 = 1000.0f; } diff --git a/src/engine/fox_enmy2.c b/src/engine/fox_enmy2.c index 85565616..2628bb02 100644 --- a/src/engine/fox_enmy2.c +++ b/src/engine/fox_enmy2.c @@ -164,13 +164,13 @@ void Actor202_Update(Actor202* this) { switch (this->state) { case 0: - this->unk_0B6++; + this->animFrame++; - if (this->unk_0B6 >= 30) { - this->unk_0B6 = 0; + if (this->animFrame >= 30) { + this->animFrame = 0; } - if (this->unk_0B6 == 21) { + if (this->animFrame == 21) { this->state = 1; this->vel.y = 40.0f; @@ -192,14 +192,14 @@ void Actor202_Update(Actor202* this) { case 1: if (this->vel.y > 10.0f) { - this->unk_0B6++; - if (this->unk_0B6 >= 30) { - this->unk_0B6 = 29; + this->animFrame++; + if (this->animFrame >= 30) { + this->animFrame = 29; } } else { - this->unk_0B6--; - if (this->unk_0B6 < 0) { - this->unk_0B6 = 0; + this->animFrame--; + if (this->animFrame < 0) { + this->animFrame = 0; } } @@ -244,18 +244,18 @@ void Actor194_Dying(Actor194* this) { Vec3f sp34; s32 temp_hi; - this->unk_04E++; + this->counter_04E++; - if (this->unk_04E >= 100) { - this->unk_04E = 0; + if (this->counter_04E >= 100) { + this->counter_04E = 0; } - 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; + gActor194xPos[this->unk_046][this->counter_04E] = this->obj.pos.x; + gActor194yPos[this->unk_046][this->counter_04E] = this->obj.pos.y; + gActor194zPos[this->unk_046][this->counter_04E] = this->obj.pos.z; + gActor194xRot[this->unk_046][this->counter_04E] = this->obj.rot.x; + gActor194yRot[this->unk_046][this->counter_04E] = this->obj.rot.y; + gActor194zRot[this->unk_046][this->counter_04E] = this->obj.rot.z; this->obj.rot.x -= 10.0f; this->obj.rot.y += 3.0f; @@ -268,7 +268,7 @@ void Actor194_Dying(Actor194* this) { this->vel.z = sp34.z; if ((this->timer_0BC == 0) && ((gGameFrameCount % 4) == 0)) { - temp_hi = (D_800CFF94[this->unk_04A] + this->unk_04E) % 100; + temp_hi = (D_800CFF94[this->unk_04A] + this->counter_04E) % 100; if (this->unk_04A == 0) { func_effect_8007D2C8(gActor194xPos[this->unk_046][temp_hi], gActor194yPos[this->unk_046][temp_hi], gActor194zPos[this->unk_046][temp_hi], 7.0f); @@ -333,7 +333,7 @@ void Actor194_Draw(Actor194* this) { s16 temp_hi; for (var_s0 = this->unk_04A; var_s0 < 16; var_s0++) { - temp_hi = (D_800CFF94[var_s0] + this->unk_04E) % 100; + temp_hi = (D_800CFF94[var_s0] + this->counter_04E) % 100; 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], @@ -435,7 +435,7 @@ void Actor196_Update(Actor196* this) { case 2: if (this->timer_0BC == 0) { this->state = 3; - this->unk_0B6 = 1; + this->animFrame = 1; this->obj.pos.y += 30.0f; this->timer_0BC = 30; this->vel.y = 30.0f; @@ -454,7 +454,7 @@ void Actor196_Update(Actor196* this) { if (this->obj.pos.y < (gGroundHeight + 10.0f)) { this->obj.pos.y = gGroundHeight; this->state = 4; - this->unk_0B6 = 0; + this->animFrame = 0; this->vel.y = 0.0f; this->gravity = 0.0f; this->obj.rot.x = 0.0f; @@ -473,12 +473,12 @@ void Actor196_Update(Actor196* this) { func_enmy2_8006BB1C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z); } - if (((gGameFrameCount % 8) == 0)) { + if ((gGameFrameCount % 8) == 0) { func_enmy2_8006A900(RAND_FLOAT_CENTERED(50.0f) + this->obj.pos.x, this->obj.pos.y + 10.0f, RAND_FLOAT_CENTERED(50.0f) + this->obj.pos.z, 0.5f); } - if ((this->dmgType != DMG_NONE) && (this->unk_0B6 != 0)) { + if ((this->dmgType != DMG_NONE) && (this->animFrame != 0)) { func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0.0f, this->vel.y, 0.0f, 3.0f, 5); Object_Kill(&this->obj, this->sfxSource); this->itemDrop = DROP_SILVER_RING; @@ -579,7 +579,7 @@ void ActorDebris_Update(ActorDebris* this) { Math_SmoothStepToF(&this->fwork[2], 0.0f, 0.8f, 1.0f, 0.01f); Math_SmoothStepToF(&this->vel.x, 0.0f, 0.5f, 1.0f, 0.01f); this->obj.pos.y = 0.0f; - this->iwork[0] += 1; + this->iwork[0]++; if (this->vel.y < 0.0f) { if (this->unk_04A & 2) { this->vel.y = this->vel.y * -0.05f; @@ -855,6 +855,7 @@ void ActorDebris_Update(ActorDebris* this) { } } +// Appears to be a collision check for scenery shadow boxes void func_enmy2_8006D0F4(Actor* this) { s32 i; s32 j; @@ -1045,7 +1046,8 @@ static EventActorInfo sEventActorInfo[108] = { /* 106 */ { NULL, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 0, 0, EISFX_EN_ALIEN_FLY, 0, 0.0f, 0 }, /* 107 */ { D_MA_6002890, D_MA_60368E0, -1.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, }; -static u8 D_800D0DBC[6][4] = { + +static Color_RGBA32 sEventTexLineColors[6] = { // could be in-function { 255, 255, 255, 255 }, { 160, 160, 255, 255 }, { 80, 80, 255, 255 }, { 80, 255, 80, 255 }, { 255, 80, 80, 255 }, { 255, 255, 80, 255 }, @@ -1118,9 +1120,9 @@ void ActorEvent_ProcessScript(ActorEvent* this) { case EV_OPC(EVOP_INIT_ACTOR): Audio_KillSfxBySource(this->sfxSource); - this->unk_0B4 = actorScript[this->aiIndex + 1]; + this->eventType = actorScript[this->aiIndex + 1]; - if (this->unk_0B4 == EVID_40) { + if (this->eventType == EVID_EVENT_HANDLER) { this->timer_0C2 = 10000; } else { this->timer_0C2 = 0; @@ -1129,16 +1131,16 @@ void ActorEvent_ProcessScript(ActorEvent* this) { this->fwork[11] = 0.0f; this->fwork[12] = 0.0f; - if ((this->unk_0B4 == EVID_64) || (this->unk_0B4 == EVID_81)) { + if ((this->eventType == EVID_64) || (this->eventType == EVID_81)) { this->fwork[15] = 0.0f; - } else if (this->unk_0B4 == EVID_79) { + } else if (this->eventType == EVID_79) { this->info.drawType = 2; } this->health = actorScript[this->aiIndex] & 0x1FF; this->aiIndex += 2; - if ((this->unk_0B4 >= EVID_200) && (this->unk_0B4 < EVID_300)) { + if ((this->eventType >= EVID_200) && (this->eventType < EVID_300)) { this->unk_046 = 100; this->info.hitbox = gCubeHitbox200; this->info.targetOffset = 1.0f; @@ -1151,7 +1153,7 @@ void ActorEvent_ProcessScript(ActorEvent* this) { gActor194yPos[i][j] = this->obj.pos.y; gActor194zPos[i][j] = this->obj.pos.z; } - if (this->unk_0B4 == EVID_200) { + if (this->eventType == EVID_200) { AUDIO_PLAY_SFX(NA_SE_EN_SPACE_SNAKE, this->sfxSource, 4); } break; @@ -1163,52 +1165,52 @@ void ActorEvent_ProcessScript(ActorEvent* this) { } } - if ((this->unk_0B4 == EVID_2) || (this->unk_0B4 == EVID_43)) { - this->unk_0C9 = 1; + if ((this->eventType == EVID_2) || (this->eventType == EVID_TEAMMATE)) { + this->drawShadow = true; this->iwork[11] = 1; } - if (this->unk_0B4 == EVID_81) { - this->unk_0C9 = 1; + if (this->eventType == EVID_81) { + this->drawShadow = true; } if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) { - if (this->unk_0B4 == EVID_86) { + if (this->eventType == EVID_KATT) { Audio_PlayFanfare(NA_BGM_KATT, 20, 10, 10); } - if (this->unk_0B4 == EVID_85) { + if (this->eventType == EVID_BILL) { Audio_PlayFanfare(NA_BGM_BILL, 20, 10, 10); } } - if (this->unk_0B4 == EVID_103) { - this->unk_0B6 = 0; + if (this->eventType == EVID_ANDROSS_GATE) { + this->animFrame = 0; } - if (this->unk_0B4 == EVID_104) { - this->unk_0B6 = Animation_GetFrameCount(&D_VE2_6014658) - 1; + if (this->eventType == EVID_ANDROSS_GATE_2) { + this->animFrame = Animation_GetFrameCount(&D_VE2_6014658) - 1; } - if (this->unk_0B4 < EVID_200) { - this->info.hitbox = SEGMENTED_TO_VIRTUAL(sEventActorInfo[this->unk_0B4].hitbox); - this->scale = sEventActorInfo[this->unk_0B4].scale; - this->info.unk_16 = sEventActorInfo[this->unk_0B4].info_unk_16; - this->info.unk_14 = sEventActorInfo[this->unk_0B4].info_unk_14; - this->info.unk_19 = sEventActorInfo[this->unk_0B4].info_unk_19; - this->info.targetOffset = sEventActorInfo[this->unk_0B4].targetOffset; - this->info.bonus = sEventActorInfo[this->unk_0B4].bonus; + if (this->eventType < EVID_200) { + this->info.hitbox = SEGMENTED_TO_VIRTUAL(sEventActorInfo[this->eventType].hitbox); + this->scale = sEventActorInfo[this->eventType].scale; + this->info.unk_16 = sEventActorInfo[this->eventType].info_unk_16; + this->info.unk_14 = sEventActorInfo[this->eventType].info_unk_14; + this->info.unk_19 = sEventActorInfo[this->eventType].info_unk_19; + this->info.targetOffset = sEventActorInfo[this->eventType].targetOffset; + this->info.bonus = sEventActorInfo[this->eventType].bonus; - if (this->unk_0B4 == EVID_78) { + if (this->eventType == EVID_SUPPLY_CRATE) { this->info.damage = 0; } - this->info.cullDistance = sEventActorInfo[this->unk_0B4].cullDistance; - this->fwork[25] = sEventActorInfo[this->unk_0B4].unk_10; + this->info.cullDistance = sEventActorInfo[this->eventType].cullDistance; + this->fwork[25] = sEventActorInfo[this->eventType].unk_10; - switch (sEventActorInfo[this->unk_0B4].sfx) { + switch (sEventActorInfo[this->eventType].sfx) { case EISFX_EN_ENGINE_01: - if (!((gCurrentLevel == LEVEL_SOLAR) || (this->unk_0B4 == EVID_6) || - ((gCurrentLevel == LEVEL_CORNERIA) && (this->unk_0B4 == EVID_8)))) { + if (!((gCurrentLevel == LEVEL_SOLAR) || (this->eventType == EVID_6) || + ((gCurrentLevel == LEVEL_CORNERIA) && (this->eventType == EVID_8)))) { AUDIO_PLAY_SFX(NA_SE_EN_ENGINE_01, this->sfxSource, 4); } break; @@ -1237,9 +1239,9 @@ void ActorEvent_ProcessScript(ActorEvent* this) { } if (this->info.unk_16 == 0) { - this->obj.rot.z = this->fwork[23] = this->unk_0F4.z; - if (this->unk_0B4 != EVID_31) { - this->unk_0F4.z = 0.0f; + this->obj.rot.z = this->fwork[23] = this->rot_0F4.z; + if (this->eventType != EVID_31) { + this->rot_0F4.z = 0.0f; } } } @@ -1389,10 +1391,10 @@ void ActorEvent_ProcessScript(ActorEvent* this) { gTexturedLines[i].posAA.x = this->obj.pos.x - this->vel.x; gTexturedLines[i].posAA.y = this->obj.pos.y - this->vel.y; gTexturedLines[i].posAA.z = this->obj.pos.z - this->vel.z; - gTexturedLines[i].red = D_800D0DBC[actorScript[this->aiIndex + 1]][0]; - gTexturedLines[i].green = D_800D0DBC[actorScript[this->aiIndex + 1]][1]; - gTexturedLines[i].blue = D_800D0DBC[actorScript[this->aiIndex + 1]][2]; - gTexturedLines[i].alpha = D_800D0DBC[actorScript[this->aiIndex + 1]][3]; + gTexturedLines[i].prim.r = sEventTexLineColors[actorScript[this->aiIndex + 1]].r; + gTexturedLines[i].prim.g = sEventTexLineColors[actorScript[this->aiIndex + 1]].g; + gTexturedLines[i].prim.b = sEventTexLineColors[actorScript[this->aiIndex + 1]].b; + gTexturedLines[i].prim.a = sEventTexLineColors[actorScript[this->aiIndex + 1]].a; this->iwork[8] = i; break; } @@ -1626,7 +1628,7 @@ void ActorEvent_UpdateTexLines(ActorEvent* this) { } } -void ActorEvent_8006EAC4(Effect* effect, f32 xPos, f32 yPos, f32 zPos) { +void ActorEvent_SetupEffect374(Effect* effect, f32 xPos, f32 yPos, f32 zPos) { Effect_Initialize(effect); effect->obj.status = OBJ_INIT; effect->obj.id = OBJ_EFFECT_374; @@ -1640,12 +1642,12 @@ void ActorEvent_8006EAC4(Effect* effect, f32 xPos, f32 yPos, f32 zPos) { AUDIO_PLAY_SFX(NA_SE_EN_FALLING_DOWN, effect->sfxSource, 4); } -void ActorEvent_8006EB64(f32 xPos, f32 yPos, f32 zPos) { +void ActorEvent_SpawnEffect374(f32 xPos, f32 yPos, f32 zPos) { s32 i; for (i = 50; i < ARRAY_COUNT(gEffects); i++) { if (gEffects[i].obj.status == OBJ_FREE) { - ActorEvent_8006EAC4(&gEffects[i], xPos, yPos, zPos); + ActorEvent_SetupEffect374(&gEffects[i], xPos, yPos, zPos); break; } } @@ -1747,7 +1749,7 @@ void Actor_SpawnGreatFoxLaser(s32 actorId, f32 xPos, f32 yPos, f32 zPos, f32 xVe } } -void ActorEvent_8006F044(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale1) { +void ActorEvent_SetupEffect347(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale1) { Effect_Initialize(effect); effect->obj.status = OBJ_INIT; effect->obj.id = OBJ_EFFECT_347; @@ -1762,18 +1764,18 @@ void ActorEvent_8006F044(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale func_effect_8007A6F0(&effect->obj.pos, NA_SE_EN_EXPLOSION_M); } -void ActorEvent_8006F0D8(f32 xPos, f32 yPos, f32 zPos, f32 scale1) { +void ActorEvent_SpawnEffect347(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, scale1); + ActorEvent_SetupEffect347(&gEffects[i], xPos, yPos, zPos, scale1); break; } } } -void ActorEvent_8006F140(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale1) { +void ActorEvent_SetupEffect394(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale1) { Effect_Initialize(effect); effect->obj.status = OBJ_INIT; effect->obj.id = OBJ_EFFECT_394; @@ -1791,12 +1793,12 @@ void ActorEvent_8006F140(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale func_effect_8007A6F0(&effect->obj.pos, NA_SE_EN_EXPLOSION_M); } -void ActorEvent_8006F1EC(f32 xPos, f32 yPos, f32 zPos, f32 scale1) { +void ActorEvent_SpawnEffect394(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, scale1); + ActorEvent_SetupEffect394(&gEffects[i], xPos, yPos, zPos, scale1); break; } } @@ -1808,9 +1810,9 @@ void ActorEvent_8006F254(ActorEvent* this) { Matrix_RotateY(gCalcMatrix, this->vwork[29].y * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, this->vwork[29].x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, (this->vwork[29].z + this->unk_0F4.z) * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gCalcMatrix, this->unk_0F4.y * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gCalcMatrix, this->unk_0F4.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, (this->vwork[29].z + this->rot_0F4.z) * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, this->rot_0F4.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, this->rot_0F4.x * M_DTOR, MTXF_APPLY); sp54.x = 0.0f; sp54.y = 0.0f; @@ -1819,7 +1821,7 @@ void ActorEvent_8006F254(ActorEvent* this) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48); func_effect_8007F04C(OBJ_EFFECT_353, this->obj.pos.x + sp48.x, this->obj.pos.y + sp48.y, this->obj.pos.z + sp48.z, this->obj.rot.x, this->obj.rot.y, this->obj.rot.z, this->vwork[29].x, this->vwork[29].y, - this->vwork[29].z + this->unk_0F4.z, sp48.x, sp48.y, sp48.z, 1.0f); + this->vwork[29].z + this->rot_0F4.z, sp48.x, sp48.y, sp48.z, 1.0f); } void ActorEvent_ProcessActions(ActorEvent* this) { @@ -1828,9 +1830,9 @@ void ActorEvent_ProcessActions(ActorEvent* this) { Vec3f sp6C; Sprite* sprite; - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (this->unk_0B4 != EVID_52) && (this->unk_0B4 != EVID_103) && - (this->unk_0B4 != EVID_104) && (this->unk_0B4 != EVID_48) && (this->unk_0B4 != EVID_49) && - (this->unk_0B4 != EVID_50)) { + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (this->eventType != EVID_52) && + (this->eventType != EVID_ANDROSS_GATE) && (this->eventType != EVID_ANDROSS_GATE_2) && + (this->eventType != EVID_48) && (this->eventType != EVID_49) && (this->eventType != EVID_50)) { switch (this->unk_048) { case EVACT_NONE: break; @@ -1857,8 +1859,8 @@ void ActorEvent_ProcessActions(ActorEvent* this) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp78, &sp6C); Actor_SpawnPlayerLaser(this->index, this->obj.pos.x + (sp6C.x * 1.5), this->obj.pos.y + (sp6C.y * 1.5), this->obj.pos.z + (sp6C.z * 1.5), sp6C.x, - sp6C.y, sp6C.z, this->unk_0F4.x, this->unk_0F4.y, - this->vwork[29].z + this->unk_0F4.z); + sp6C.y, sp6C.z, this->rot_0F4.x, this->rot_0F4.y, + this->vwork[29].z + this->rot_0F4.z); this->timer_0C2 = 2; this->timer_04C--; if (this->timer_04C <= 0) { @@ -1868,16 +1870,16 @@ void ActorEvent_ProcessActions(ActorEvent* this) { break; case EVACT_4: // shoot blue energy balls - ActorEvent_8006EB64(this->obj.pos.x, this->obj.pos.y - 20.0f, this->obj.pos.z); + ActorEvent_SpawnEffect374(this->obj.pos.x, this->obj.pos.y - 20.0f, this->obj.pos.z); this->unk_048 = EVACT_NONE; break; case EVACT_5: Matrix_RotateY(gCalcMatrix, this->vwork[29].y * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, this->vwork[29].x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, (this->vwork[29].z + this->unk_0F4.z) * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gCalcMatrix, this->unk_0F4.y * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gCalcMatrix, this->unk_0F4.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, (this->vwork[29].z + this->rot_0F4.z) * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, this->rot_0F4.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, this->rot_0F4.x * M_DTOR, MTXF_APPLY); sp78.x = 0.0f; sp78.y = 0.0f; @@ -1886,7 +1888,7 @@ void ActorEvent_ProcessActions(ActorEvent* this) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp78, &sp6C); func_effect_8007F04C(OBJ_EFFECT_355, this->obj.pos.x + sp6C.x, this->obj.pos.y + sp6C.y, this->obj.pos.z + sp6C.z, this->obj.rot.x, this->obj.rot.y, this->obj.rot.z, - this->vwork[29].x, this->vwork[29].y, this->vwork[29].z + this->unk_0F4.z, sp6C.x, + this->vwork[29].x, this->vwork[29].y, this->vwork[29].z + this->rot_0F4.z, sp6C.x, sp6C.y, sp6C.z, 1.0f); this->unk_048 = EVACT_NONE; break; @@ -1920,18 +1922,18 @@ void ActorEvent_ProcessActions(ActorEvent* this) { case EVACT_9: if (gCurrentLevel == LEVEL_AQUAS) { - ActorEvent_8006F1EC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 12.0f); + ActorEvent_SpawnEffect394(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 12.0f); } else { - ActorEvent_8006F0D8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 40.0f); + ActorEvent_SpawnEffect347(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 40.0f); } Object_Kill(&this->obj, this->sfxSource); break; case EVACT_10: if (gCurrentLevel == LEVEL_AQUAS) { - ActorEvent_8006F1EC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 6.0f); + ActorEvent_SpawnEffect394(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 6.0f); } else { - ActorEvent_8006F0D8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 15.0f); + ActorEvent_SpawnEffect347(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 15.0f); } Object_Kill(&this->obj, this->sfxSource); break; @@ -2090,38 +2092,38 @@ void ActorEvent_800701E0(ActorEvent* this) { if (ActorEvent_800700A4(this)) { return; } - if ((this->dmgType != DMG_NONE) && (this->unk_0B4 == EVID_67) && (this->dmgPart == 0)) { + if ((this->dmgType != DMG_NONE) && (this->eventType == EVID_METEO_PYRAMID_SHIP) && (this->dmgPart == 0)) { this->dmgType = DMG_NONE; } - if ((this->dmgType != DMG_NONE) && (this->unk_0B4 == EVID_83) && (this->timer_0C2 >= 2)) { + if ((this->dmgType != DMG_NONE) && (this->eventType == EVID_AQ_CLAM) && (this->timer_0C2 >= 2)) { this->dmgType = DMG_NONE; } if ((this->dmgType != DMG_NONE) && - (((this->unk_0B4 == EVID_64) && (this->dmgPart == 2)) || (this->unk_0B4 != EVID_64))) { + (((this->eventType == EVID_64) && (this->dmgPart == 2)) || (this->eventType != EVID_64))) { if (this->iwork[12] >= TEAM_ID_KATT) { this->damage = 0; } if ((this->iwork[12] >= TEAM_ID_FALCO) && (this->iwork[12] <= TEAM_ID_PEPPY)) { gTeamShields[this->iwork[12]] -= this->damage; - } else if ((this->unk_0B4 == EVID_83) && ((this->damage == 30) || (this->damage == 31))) { + } else if ((this->eventType == EVID_AQ_CLAM) && ((this->damage == 30) || (this->damage == 31))) { this->health = 0; } else { this->health -= this->damage; } if (this->health <= 0) { - if (this->unk_0B4 == EVID_106) { + if (this->eventType == EVID_KILLER_BEE) { BonusText_Display(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 3); if (1) {} gHitCount += 4; D_ctx_80177850 = 15; } - if (this->unk_0B4 != EVID_83) { - if ((this->unk_0B4 == EVID_6) && (gCurrentLevel == LEVEL_SOLAR)) { + if (this->eventType != EVID_AQ_CLAM) { + if ((this->eventType == EVID_6) && (gCurrentLevel == LEVEL_SOLAR)) { AUDIO_PLAY_SFX(NA_SE_EN_BIRD_DOWN, this->sfxSource, 4); } else { AUDIO_PLAY_SFX(NA_SE_EN_CRASH_DOWN, this->sfxSource, 4); @@ -2135,9 +2137,9 @@ void ActorEvent_800701E0(ActorEvent* this) { } if (((Rand_ZeroOne() < chance) || (this->iwork[12] != 0)) && (this->info.unk_14 == 0) && - (this->unk_0B4 != EVID_13) && (this->unk_0B4 != EVID_14) && (this->unk_0B4 != EVID_61) && - (this->damage <= 30) && (this->unk_0B4 != EVID_62) && (this->unk_0B4 != EVID_64) && - (this->unk_0B4 != EVID_72) && (this->unk_0B4 != EVID_68)) { + (this->eventType != EVID_13) && (this->eventType != EVID_14) && (this->eventType != EVID_61) && + (this->damage <= 30) && (this->eventType != EVID_62) && (this->eventType != EVID_64) && + (this->eventType != EVID_72) && (this->eventType != EVID_68)) { func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->scale * 4.0f); this->dmgType = DMG_NONE; } @@ -2146,11 +2148,11 @@ void ActorEvent_800701E0(ActorEvent* this) { this->timer_0BE = 0; this->unk_046 = 255; this->unk_048 = 900; - this->unk_0C9 = 1; + this->drawShadow = true; if (gLevelType == LEVELTYPE_PLANET) { this->timer_04C = RAND_INT(2.9f); - if (this->unk_0B4 == EVID_2) { + if (this->eventType == EVID_2) { this->timer_04C = 1; if (this->obj.pos.x < this->hitPos.x) { Play_SpawnDebris(1, this->obj.pos.x + 20.0f, this->obj.pos.y, this->obj.pos.z); @@ -2175,11 +2177,11 @@ void ActorEvent_800701E0(ActorEvent* this) { } } - if (this->unk_0B4 == EVID_90) { + if (this->eventType == EVID_90) { this->timer_04C = 999; } } else { - switch (this->unk_0B4) { + switch (this->eventType) { case EVID_13: func_enmy_800654E4(&this->obj); break; @@ -2211,14 +2213,14 @@ void ActorEvent_800701E0(ActorEvent* this) { } } - if (this->unk_0B4 == EVID_82) { + if (this->eventType == EVID_82) { AUDIO_PLAY_SFX(NA_SE_OB_SMOKE, this->sfxSource, 0); this->dmgType = DMG_BEAM; func_effect_8007C688(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 3.0f, 60); } } else { this->timer_0C6 = 20; - if ((this->unk_0B4 == EVID_6) && (gCurrentLevel == LEVEL_SOLAR)) { + if ((this->eventType == EVID_6) && (gCurrentLevel == LEVEL_SOLAR)) { AUDIO_PLAY_SFX(NA_SE_EN_BIRD_DAMAGE, this->sfxSource, 4); } else if (this->health < 20) { AUDIO_PLAY_SFX(NA_SE_EN_KNOCK_DOWN, this->sfxSource, 4); @@ -2226,12 +2228,12 @@ void ActorEvent_800701E0(ActorEvent* this) { AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, this->sfxSource, 4); } - if ((this->unk_0B4 != EVID_13) && (this->unk_0B4 != EVID_61) && (this->unk_0B4 != EVID_83)) { + if ((this->eventType != EVID_13) && (this->eventType != EVID_61) && (this->eventType != EVID_AQ_CLAM)) { func_effect_8007D10C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->scale * 1.5f); } if (((gLevelMode == LEVELMODE_ALL_RANGE) || (gLevelMode == LEVELMODE_UNK_2)) && - (this->unk_0B4 != EVID_21) && (this->unk_0B4 != EVID_23)) { + (this->eventType != EVID_A6_MISSILE) && (this->eventType != EVID_23)) { this->fwork[13] = 20.0f; if (this->obj.pos.x < this->hitPos.x) { this->fwork[13] *= -1.0f; @@ -2287,12 +2289,12 @@ void ActorEvent_800701E0(ActorEvent* this) { this->obj.status = OBJ_DYING; this->obj.pos.z -= this->vel.z; this->dmgType = DMG_BEAM; - if (this->unk_0B4 == EVID_13) { + if (this->eventType == EVID_13) { this->obj.id = OBJ_ACTOR_182; func_enmy_800654E4(&this->obj); } - if (this->unk_0B4 == EVID_61) { + if (this->eventType == EVID_61) { Meteo_8018CCF8(this); } } @@ -2302,7 +2304,7 @@ void ActorEvent_800701E0(ActorEvent* this) { void ActorEvent_80070BA8(ActorEvent* this) { if (this->dmgType != DMG_NONE) { this->dmgType = DMG_NONE; - if ((this->unk_0B4 != EVID_17) || ((this->unk_0B4 == EVID_17) && (this->dmgPart == 0))) { + if ((this->eventType != EVID_17) || ((this->eventType == EVID_17) && (this->dmgPart == 0))) { this->timer_0C6 = 10; func_effect_8007C120(this->hitPos.x, this->hitPos.y, this->hitPos.z, this->vel.x, this->vel.y, this->vel.z, 0.2f, 10); @@ -2851,17 +2853,17 @@ void ActorEvent_80071DC0(ActorEvent* this) { Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); - if (this->unk_0B4 == EVID_30) { + if (this->eventType == EVID_30) { rInd = RAND_FLOAT(ARRAY_COUNT(D_800D1074) - 1.1f); // off by 1 error? Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_800D1074[rInd], &sp38); } - if (this->unk_0B4 == EVID_17) { + if (this->eventType == EVID_17) { rInd = RAND_FLOAT(ARRAY_COUNT(D_800D0DD4) - 0.1f); Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_800D0DD4[rInd], &sp38); } - if (this->unk_0B4 == EVID_31) { + if (this->eventType == EVID_31) { rInd = RAND_FLOAT(ARRAY_COUNT(D_800D1194) - 0.1f); Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_800D1194[rInd], &sp38); } @@ -2899,7 +2901,7 @@ void ActorEvent_800720E8(ActorEvent* this) { } if ((this->dmgSource >= NPC_SHOT_ID + 1) && - (gActors[this->dmgSource - NPC_SHOT_ID - 1].unk_0B4 == EVID_85)) { + (gActors[this->dmgSource - NPC_SHOT_ID - 1].eventType == EVID_BILL)) { this->damage = 20; } @@ -2932,7 +2934,7 @@ void ActorEvent_800720E8(ActorEvent* this) { } } -void ActorEvent_800722EC(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yRot) { +void ActorEvent_SetupEffect365(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yRot) { Vec3f sp2C; Vec3f sp20; @@ -2956,17 +2958,18 @@ void ActorEvent_800722EC(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yRot) Object_SetInfo(&effect->info, effect->obj.id); } -void ActorEvent_8007240C(f32 xPos, f32 yPos, f32 zPos, f32 yRot) { +void ActorEvent_SpawnEffect365(f32 xPos, f32 yPos, f32 zPos, f32 yRot) { s32 i; for (i = 0; i < ARRAY_COUNT(gEffects); i++) { if (gEffects[i].obj.status == OBJ_FREE) { - ActorEvent_800722EC(&gEffects[i], xPos, yPos, zPos, yRot); + ActorEvent_SetupEffect365(&gEffects[i], xPos, yPos, zPos, yRot); break; } } } +// turn for the purpose of shooting? void ActorEvent_80072474(ActorEvent* this) { f32 var_fv1; @@ -2991,7 +2994,7 @@ void ActorEvent_80072474(ActorEvent* this) { if (this->iwork[15] != 0) { var_fv1 = Math_RadToDeg(Math_Atan2F(gPlayer[0].pos.x - this->obj.pos.x, gPlayer[0].trueZpos - this->obj.pos.z)); } else if (this->iwork[6] != 0) { - var_fv1 = this->unk_0F4.y; + var_fv1 = this->rot_0F4.y; } else { var_fv1 = 0.0f; } @@ -3020,7 +3023,7 @@ void ActorEvent_Update(ActorEvent* this) { Vec3f spAC; Vec3f spA0; - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) || (D_ctx_8017828C != 0)) { + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) || gKillEventActors) { Object_Kill(&this->obj, this->sfxSource); return; } @@ -3034,27 +3037,27 @@ void ActorEvent_Update(ActorEvent* this) { } return; } - if (((this->unk_0B4 == EVID_17) || (this->unk_0B4 == EVID_30) || (this->unk_0B4 == EVID_31)) && + if (((this->eventType == EVID_17) || (this->eventType == EVID_30) || (this->eventType == EVID_31)) && (this->health <= 0)) { ActorEvent_80071DC0(this); return; } - if (this->unk_0B4 == EVID_300) { + if (this->eventType == EVID_300) { gPlayer[0].unk_1A4 = this->index; this->timer_0C2 = 100; - } else if (this->unk_0B4 >= EVID_200) { - this->unk_04E++; + } else if (this->eventType >= EVID_200) { + this->counter_04E++; - if (this->unk_04E >= 100) { - this->unk_04E = 0; + if (this->counter_04E >= 100) { + this->counter_04E = 0; } - 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; + gActor194xPos[this->unk_046][this->counter_04E] = this->obj.pos.x; + gActor194yPos[this->unk_046][this->counter_04E] = this->obj.pos.y; + gActor194zPos[this->unk_046][this->counter_04E] = this->obj.pos.z; + gActor194xRot[this->unk_046][this->counter_04E] = this->obj.rot.x; + gActor194yRot[this->unk_046][this->counter_04E] = this->obj.rot.y; + gActor194zRot[this->unk_046][this->counter_04E] = this->obj.rot.z; if (this->dmgType != DMG_NONE) { this->dmgType = DMG_NONE; @@ -3074,7 +3077,7 @@ void ActorEvent_Update(ActorEvent* this) { } } - if ((this->unk_0B4 == EVID_27) && (this->timer_0C2 != 0)) { + if ((this->eventType == EVID_27) && (this->timer_0C2 != 0)) { this->state = EVSTATE_READY; } @@ -3097,8 +3100,8 @@ void ActorEvent_Update(ActorEvent* this) { spEC = this->obj.pos.y; spE8 = this->obj.pos.z; - if ((this->unk_0B4 == EVID_33) || (this->unk_0B4 == EVID_68)) { - Matrix_RotateZ(gCalcMatrix, -(this->vwork[29].z + this->unk_0F4.z) * M_DTOR, MTXF_NEW); + if ((this->eventType == EVID_33) || (this->eventType == EVID_68)) { + Matrix_RotateZ(gCalcMatrix, -(this->vwork[29].z + this->rot_0F4.z) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -this->vwork[29].x * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, -this->vwork[29].y * M_DTOR, MTXF_APPLY); @@ -3136,7 +3139,7 @@ void ActorEvent_Update(ActorEvent* this) { if (((this->timer_0BC % 32) == 0) && (spFC == 0)) { Matrix_RotateY(gCalcMatrix, this->vwork[29].y * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, this->vwork[29].x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, (this->vwork[29].z + this->unk_0F4.z) * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, (this->vwork[29].z + this->rot_0F4.z) * M_DTOR, MTXF_APPLY); spB8.x = 0.0f; spB8.y = 25.0f; @@ -3152,7 +3155,7 @@ void ActorEvent_Update(ActorEvent* this) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &spB8, &spAC); - if (this->unk_0B4 == EVID_68) { + if (this->eventType == EVID_68) { var_fv0 = 80.0f; } else { var_fv0 = 0.0f; @@ -3161,7 +3164,7 @@ void ActorEvent_Update(ActorEvent* this) { func_effect_8007F04C(OBJ_EFFECT_353, this->obj.pos.x + spAC.x + spA0.x, this->obj.pos.y + spAC.y + spA0.y + var_fv0, this->obj.pos.z + spAC.z + spA0.z, this->fwork[15], this->obj.rot.y, this->obj.rot.z, this->vwork[29].x, - this->vwork[29].y, this->vwork[29].z + this->unk_0F4.z, spAC.x, spAC.y, spAC.z, + this->vwork[29].y, this->vwork[29].z + this->rot_0F4.z, spAC.x, spAC.y, spAC.z, 1.0f); this->fwork[16] = -15.0f; } @@ -3177,7 +3180,7 @@ void ActorEvent_Update(ActorEvent* this) { } Math_SmoothStepToAngle(&this->vwork[29].z, 0.0f, 0.1f, 5.0f, 0.0001f); - Math_SmoothStepToAngle(&this->unk_0F4.z, 0.0f, 0.1f, 5.0f, 0.0001f); + Math_SmoothStepToAngle(&this->rot_0F4.z, 0.0f, 0.1f, 5.0f, 0.0001f); spE0 = Math_RadToDeg(Math_Atan2F(spCC - spF0, spC4 - spE8)); @@ -3189,9 +3192,9 @@ void ActorEvent_Update(ActorEvent* this) { } spE4 = Math_RadToDeg(-Math_Atan2F(spC8 - spEC, sqrtf(SQ(spCC - spF0) + SQ(spC4 - spE8)))); - spEC = Math_SmoothStepToAngle(&this->unk_0F4.y, spE0, 0.2f, this->fwork[24], 0.0001f); + spEC = Math_SmoothStepToAngle(&this->rot_0F4.y, spE0, 0.2f, this->fwork[24], 0.0001f); - Math_SmoothStepToAngle(&this->unk_0F4.x, spE4, 0.2f, this->fwork[24], 0.0001f); + Math_SmoothStepToAngle(&this->rot_0F4.x, spE4, 0.2f, this->fwork[24], 0.0001f); if (this->iwork[6] != 0) { var_fv0 = 330.0f; @@ -3232,9 +3235,9 @@ void ActorEvent_Update(ActorEvent* this) { spE4 = Math_RadToDeg(-Math_Atan2F(gActors[this->iwork[1]].obj.pos.y + spD8 - spEC, sqrtf(SQ(gActors[this->iwork[1]].obj.pos.x + spDC - spF0) + SQ(gActors[this->iwork[1]].obj.pos.z + spD4 - spE8)))); - spEC = Math_SmoothStepToAngle(&this->unk_0F4.y, spE0, 0.2f, this->fwork[24], 0.0001f); + spEC = Math_SmoothStepToAngle(&this->rot_0F4.y, spE0, 0.2f, this->fwork[24], 0.0001f); - Math_SmoothStepToAngle(&this->unk_0F4.x, spE4, 0.2f, this->fwork[24], 0.0001f); + Math_SmoothStepToAngle(&this->rot_0F4.x, spE4, 0.2f, this->fwork[24], 0.0001f); if (this->iwork[6] != 0) { var_fv0 = 310.0f; @@ -3251,7 +3254,7 @@ void ActorEvent_Update(ActorEvent* this) { break; case EVSTATE_F4_PLUS_X: - this->unk_0F4.x += this->fwork[3]; + this->rot_0F4.x += this->fwork[3]; this->fwork[2] -= this->fwork[3]; if (this->fwork[2] <= 0.0f) { ActorEvent_ProcessScript(this); @@ -3259,7 +3262,7 @@ void ActorEvent_Update(ActorEvent* this) { break; case EVSTATE_F4_MINUS_X: - this->unk_0F4.x -= this->fwork[3]; + this->rot_0F4.x -= this->fwork[3]; this->fwork[2] -= this->fwork[3]; if (this->fwork[2] <= 0.0f) { ActorEvent_ProcessScript(this); @@ -3267,7 +3270,7 @@ void ActorEvent_Update(ActorEvent* this) { break; case EVSTATE_F4_PLUS_Y: - this->unk_0F4.y += this->fwork[3]; + this->rot_0F4.y += this->fwork[3]; this->fwork[2] -= this->fwork[3]; if (this->fwork[2] <= 0.0f) { ActorEvent_ProcessScript(this); @@ -3275,7 +3278,7 @@ void ActorEvent_Update(ActorEvent* this) { break; case EVSTATE_F4_MINUS_Y: - this->unk_0F4.y -= this->fwork[3]; + this->rot_0F4.y -= this->fwork[3]; this->fwork[2] -= this->fwork[3]; if (this->fwork[2] <= 0.0f) { ActorEvent_ProcessScript(this); @@ -3309,7 +3312,7 @@ void ActorEvent_Update(ActorEvent* this) { break; case EVSTATE_TEAM_RETREAT: - Math_SmoothStepToAngle(&this->unk_0F4.x, 270.0f, 0.1f, 2.0f, 0.0f); + Math_SmoothStepToAngle(&this->rot_0F4.x, 270.0f, 0.1f, 2.0f, 0.0f); gTeamShields[this->iwork[12]] = -1; gTeamDamage[this->iwork[12]] = 0; break; @@ -3340,26 +3343,26 @@ void ActorEvent_Update(ActorEvent* this) { Math_SmoothStepToF(&this->fwork[0], this->fwork[1], 0.1f, 5.0f, 0.0001f); - if (this->unk_0F4.x >= 360.0f) { - this->unk_0F4.x -= 360.0f; + if (this->rot_0F4.x >= 360.0f) { + this->rot_0F4.x -= 360.0f; } - if (this->unk_0F4.x < 0.0f) { - this->unk_0F4.x += 360.0f; + if (this->rot_0F4.x < 0.0f) { + this->rot_0F4.x += 360.0f; } - if (this->unk_0F4.y >= 360.0f) { - this->unk_0F4.y -= 360.0f; + if (this->rot_0F4.y >= 360.0f) { + this->rot_0F4.y -= 360.0f; } - if (this->unk_0F4.y < 0.0f) { - this->unk_0F4.y += 360.0f; + if (this->rot_0F4.y < 0.0f) { + this->rot_0F4.y += 360.0f; } if (this->iwork[6] != 0) { - if ((gLevelMode == LEVELMODE_UNK_2) && (this->unk_0B4 == EVID_200)) { - Math_SmoothStepToAngle(&this->obj.rot.x, this->unk_0F4.x, 0.1f, 10.0f, 0.00001f); - Math_SmoothStepToAngle(&this->obj.rot.y, this->unk_0F4.y, 0.1f, 10.0f, 0.00001f); + if ((gLevelMode == LEVELMODE_UNK_2) && (this->eventType == EVID_200)) { + Math_SmoothStepToAngle(&this->obj.rot.x, this->rot_0F4.x, 0.1f, 10.0f, 0.00001f); + Math_SmoothStepToAngle(&this->obj.rot.y, this->rot_0F4.y, 0.1f, 10.0f, 0.00001f); } else { - Math_SmoothStepToAngle(&this->obj.rot.x, this->unk_0F4.x, 0.2f, 100.0f, 0.00001f); - Math_SmoothStepToAngle(&this->obj.rot.y, this->unk_0F4.y, 0.2f, 100.0f, 0.00001f); + Math_SmoothStepToAngle(&this->obj.rot.x, this->rot_0F4.x, 0.2f, 100.0f, 0.00001f); + Math_SmoothStepToAngle(&this->obj.rot.y, this->rot_0F4.y, 0.2f, 100.0f, 0.00001f); } } @@ -3386,10 +3389,10 @@ void ActorEvent_Update(ActorEvent* this) { } if (this->fwork[10] > 0.0f) { - if ((this->unk_0B4 == EVID_13) || (this->unk_0B4 == EVID_14) || (this->unk_0B4 == EVID_61) || - (this->unk_0B4 == EVID_62) || (this->unk_0B4 == EVID_63) || (this->unk_0B4 == EVID_64) || - (this->unk_0B4 == EVID_65) || (this->unk_0B4 == EVID_66) || (this->unk_0B4 == EVID_94) || - (this->unk_0B4 == EVID_95) || (this->unk_0B4 == EVID_97)) { + if ((this->eventType == EVID_13) || (this->eventType == EVID_14) || (this->eventType == EVID_61) || + (this->eventType == EVID_62) || (this->eventType == EVID_63) || (this->eventType == EVID_64) || + (this->eventType == EVID_65) || (this->eventType == EVID_66) || (this->eventType == EVID_94) || + (this->eventType == EVID_95) || (this->eventType == EVID_97)) { this->obj.rot.y -= this->fwork[11] * this->fwork[12]; this->obj.rot.x += this->fwork[11] * this->fwork[12]; } else { @@ -3406,9 +3409,9 @@ void ActorEvent_Update(ActorEvent* this) { } Math_SmoothStepToAngle(&this->obj.rot.z, this->fwork[23], 0.2f, 100.0f, 0.0001f); - Matrix_RotateZ(gCalcMatrix, (this->vwork[29].z + this->unk_0F4.z) * M_DTOR, MTXF_NEW); - Matrix_RotateY(gCalcMatrix, this->unk_0F4.y * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gCalcMatrix, this->unk_0F4.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, (this->vwork[29].z + this->rot_0F4.z) * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, this->rot_0F4.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, this->rot_0F4.x * M_DTOR, MTXF_APPLY); spB8.x = 0.0f; spB8.y = 0.0f; @@ -3442,14 +3445,14 @@ void ActorEvent_Update(ActorEvent* this) { ActorEvent_ProcessActions(this); ActorEvent_UpdateTexLines(this); - if (this->unk_0B4 == EVID_38) { + if (this->eventType == EVID_SX_WARP_GATE) { ActorEvent_800720E8(this); } else { if (this->scale <= -1.999f) { ActorEvent_80070BA8(this); } else { - if ((this->dmgType == DMG_BEAM) && (this->scale < 0.5f) && (this->unk_0B4 != EVID_48) && - (this->unk_0B4 != EVID_49) && (this->unk_0B4 != EVID_50)) { + if ((this->dmgType == DMG_BEAM) && (this->scale < 0.5f) && (this->eventType != EVID_48) && + (this->eventType != EVID_49) && (this->eventType != EVID_50)) { this->dmgType = DMG_NONE; if (gCurrentLevel == LEVEL_METEO) { AUDIO_PLAY_SFX(NA_SE_ROCK_REFLECT, this->sfxSource, 4); @@ -3458,9 +3461,9 @@ void ActorEvent_Update(ActorEvent* this) { } } - if ((this->unk_0B4 < EVID_200) && (this->unk_0B4 != EVID_78) && (this->scale >= 0.5f)) { - switch (this->unk_0B4) { - case EVID_71: + if ((this->eventType < EVID_200) && (this->eventType != EVID_SUPPLY_CRATE) && (this->scale >= 0.5f)) { + switch (this->eventType) { + case EVID_WING_REPAIR: ActorEvent_8006FE28(this); break; case EVID_79: @@ -3473,7 +3476,7 @@ void ActorEvent_Update(ActorEvent* this) { } } } - switch (this->unk_0B4) { + switch (this->eventType) { case EVID_92: case EVID_93: case EVID_94: @@ -3496,7 +3499,7 @@ void ActorEvent_Update(ActorEvent* this) { if (Math_SmoothStepToF(&this->obj.pos.y, spEC, 0.5f, 7.0f, 0.0f) >= 0.0f) { spF0 = 350.0f; if (((gGameFrameCount % 4) == 0)) { - ActorEvent_8007240C(this->obj.pos.x, spEC, this->obj.pos.z, this->obj.rot.y); + ActorEvent_SpawnEffect365(this->obj.pos.x, spEC, this->obj.pos.z, this->obj.rot.y); AUDIO_PLAY_SFX(NA_SE_IN_SPLASH_S, this->sfxSource, 4); } } @@ -3511,42 +3514,42 @@ void ActorEvent_Update(ActorEvent* this) { Math_SmoothStepToAngle(&this->obj.rot.z, var_fv0, 0.1f, 3.0f, 0.0f); } } - this->obj.rot.y = this->unk_0F4.y; + this->obj.rot.y = this->rot_0F4.y; break; case EVID_31: this->obj.rot.z = gGameFrameCount; break; - case EVID_21: - case EVID_22: + case EVID_A6_MISSILE: + case EVID_A6_ROCKET: this->obj.rot.z = gGameFrameCount * 3.0f; break; case EVID_3: - this->unk_0C9 = 1; + this->drawShadow = true; this->obj.rot.y -= 10.0f; break; case EVID_6: - this->unk_0B6++; + this->animFrame++; if (gCurrentLevel == LEVEL_SOLAR) { - if (this->unk_0B6 >= Animation_GetFrameCount(&D_SO_600636C)) { - this->unk_0B6 = 0; + if (this->animFrame >= Animation_GetFrameCount(&D_SO_600636C)) { + this->animFrame = 0; } - if (((s32) gGameFrameCount % 3) == 0) { + if ((gGameFrameCount % 3) == 0) { Solar_8019E9F4(this->obj.pos.x, this->obj.pos.y - 20, this->obj.pos.z - 180.0f, 0.0f, RAND_FLOAT(20.0f) * -1.0f, 0.0f, 4.0f, 2); } - } else if (this->unk_0B6 >= Animation_GetFrameCount(&D_ENMY_PLANET_40057AC)) { - this->unk_0B6 = 0; + } else if (this->animFrame >= Animation_GetFrameCount(&D_ENMY_PLANET_40057AC)) { + this->animFrame = 0; } break; case EVID_9: - this->unk_0B6++; - if (this->unk_0B6 >= Animation_GetFrameCount(&D_ENMY_PLANET_40001A4)) { - this->unk_0B6 = 0; + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_ENMY_PLANET_40001A4)) { + this->animFrame = 0; } if (this->iwork[6] == 0) { this->obj.rot.y = 0.0f; @@ -3563,15 +3566,15 @@ void ActorEvent_Update(ActorEvent* this) { ActorEvent_80072474(this); break; - case EVID_78: + case EVID_SUPPLY_CRATE: ActorSupplies_Update(this); break; case EVID_79: if (this->timer_0C4 == 0) { - this->unk_0B6 += 1; - if (Animation_GetFrameCount(&D_ZO_600E5EC) < this->unk_0B6) { - this->unk_0B6 = 0; + this->animFrame++; + if (Animation_GetFrameCount(&D_ZO_600E5EC) < this->animFrame) { + this->animFrame = 0; } } break; @@ -3588,7 +3591,7 @@ void ActorEvent_Update(ActorEvent* this) { break; case 0: - Matrix_RotateZ(gCalcMatrix, this->unk_0F4.z * M_DTOR, MTXF_NEW); + Matrix_RotateZ(gCalcMatrix, this->rot_0F4.z * M_DTOR, MTXF_NEW); Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_800D1290, &sp90); if ((this->obj.pos.y + sp90.y) > -30.0f) { @@ -3627,7 +3630,7 @@ void ActorEvent_Update(ActorEvent* this) { if ((fabsf(this->fwork[0]) > 10.0f) && ((gGameFrameCount % 2) == 0)) { effect = func_effect_8007783C(OBJ_EFFECT_394); if (effect != NULL) { - Matrix_RotateZ(gCalcMatrix, this->unk_0F4.z * M_DTOR, MTXF_NEW); + Matrix_RotateZ(gCalcMatrix, this->rot_0F4.z * M_DTOR, MTXF_NEW); Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_800D1290, &sp90); effect->unk_78 = effect->unk_7A = 11; @@ -3675,7 +3678,7 @@ void ActorEvent_Update(ActorEvent* this) { effect->unk_60.z = -effect->unk_60.z; } - if (gGameFrameCount & 4) { + if ((gGameFrameCount & 4) != 0) { effect->vel.y = -effect->vel.y; } } @@ -3705,9 +3708,9 @@ void ActorEvent_Update(ActorEvent* this) { } break; - case EVID_83: + case EVID_AQ_CLAM: if (this->health <= 0) { - if (this->unk_0B6 == 20) { + if (this->animFrame == 20) { spD4 = this->obj.pos.z; spD8 = this->obj.pos.y; @@ -3718,14 +3721,14 @@ void ActorEvent_Update(ActorEvent* this) { this->obj.pos.z = spD4; } - if ((this->unk_0B6 >= 18) && (this->unk_0B6 < 24)) { + if ((this->animFrame >= 18) && (this->animFrame < 24)) { func_effect_8007BC7C(this->obj.pos.x, this->obj.pos.y + 80.0f, this->obj.pos.z + 60.0f, 20.0f); } - if (this->unk_0B6 < 49) { - this->unk_0B6++; - if (this->unk_0B6 >= 49) { - this->unk_0B6 = 49; + if (this->animFrame < 49) { + this->animFrame++; + if (this->animFrame >= 49) { + this->animFrame = 49; } if ((gGameFrameCount % 2) != 0) { Aquas_801AC8A8(RAND_FLOAT_CENTERED(100.0f) + this->obj.pos.x, @@ -3737,7 +3740,7 @@ void ActorEvent_Update(ActorEvent* this) { } break; - case EVID_88: + case EVID_AQ_STARFISH: if (this->unk_04A == 0) { this->unk_046 += 4; if (this->unk_046 >= 255) { @@ -3753,15 +3756,15 @@ void ActorEvent_Update(ActorEvent* this) { } break; - case EVID_103: - case EVID_104: + case EVID_ANDROSS_GATE: + case EVID_ANDROSS_GATE_2: Andross_80187530(this); break; - case EVID_106: - this->unk_0B6++; - if (this->unk_0B6 >= 6) { - this->unk_0B6 = 0; + case EVID_KILLER_BEE: + this->animFrame++; + if (this->animFrame >= 6) { + this->animFrame = 0; } break; } @@ -3769,7 +3772,7 @@ void ActorEvent_Update(ActorEvent* this) { if (gLevelMode == LEVELMODE_ALL_RANGE) { D_ctx_80177F20[this->index + 1] = this->obj.pos.x; D_ctx_80178028[this->index + 1] = this->obj.pos.z; - D_ctx_80178130[this->index + 1] = Math_ModF(this->unk_0F4.y, 360.0f) + 180.0f; + D_ctx_80178130[this->index + 1] = Math_ModF(this->rot_0F4.y, 360.0f) + 180.0f; D_ctx_80178238[this->index + 1] = 1; } } @@ -3819,7 +3822,7 @@ bool ActorEvent_OverrideLimbDraw2(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* return false; } -void ActorEvent_80074E3C(ActorEvent* this) { +void ActorEvent_DrawEVID_SX_WARP_GATE(ActorEvent* this) { Vec3f sp30[10]; Animation_GetFrameData(&D_SX_6013820, 0, sp30); @@ -3851,18 +3854,19 @@ void ActorEvent_Draw(ActorEvent* this) { s16 temp_s0; s32 pad; - if (this->timer_0C6 && (this->unk_0B4 != EVID_90) && (this->unk_0B4 != EVID_68) && (this->unk_0B4 != EVID_72)) { - if ((this->unk_0B4 != EVID_13) && (this->unk_0B4 != EVID_14) && (this->unk_0B4 != EVID_61) && - (this->unk_0B4 != EVID_62) && (this->unk_0B4 != EVID_83) && (this->unk_0B4 != EVID_98) && + if (this->timer_0C6 && (this->eventType != EVID_90) && (this->eventType != EVID_68) && + (this->eventType != EVID_72)) { + if ((this->eventType != EVID_13) && (this->eventType != EVID_14) && (this->eventType != EVID_61) && + (this->eventType != EVID_62) && (this->eventType != EVID_AQ_CLAM) && (this->eventType != EVID_98) && (this->scale > 0.5f) && (this->timer_0C6 >= 9) && ((this->timer_0C6 & 3) == 0) && (gPlayState != PLAY_PAUSE)) { func_effect_8007C120(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, this->vel.z, this->scale * 0.07f, 3); } - if ((this->unk_0B4 != EVID_21) && (this->unk_0B4 != EVID_23) && (this->unk_0B4 != EVID_79) && - (this->unk_0B4 != EVID_83) && (this->unk_0B4 != EVID_27) && (this->unk_0B4 != EVID_51) && - (this->unk_0B4 != EVID_13) && (this->unk_0B4 != EVID_72) && (this->unk_0B4 != EVID_28) && + if ((this->eventType != EVID_A6_MISSILE) && (this->eventType != EVID_23) && (this->eventType != EVID_79) && + (this->eventType != EVID_AQ_CLAM) && (this->eventType != EVID_27) && (this->eventType != EVID_51) && + (this->eventType != EVID_13) && (this->eventType != EVID_72) && (this->eventType != EVID_28) && (this->scale > 0.5f)) { sp40 = SIN_DEG(this->timer_0C6 * 400.0f) * this->timer_0C6; Matrix_RotateY(gGfxMatrix, M_DTOR * sp40, MTXF_APPLY); @@ -3877,10 +3881,10 @@ void ActorEvent_Draw(ActorEvent* this) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } - if ((this->unk_0B4 == EVID_29) || (this->unk_0B4 == EVID_59) || (this->unk_0B4 == EVID_60)) { + if ((this->eventType == EVID_29) || (this->eventType == EVID_59) || (this->eventType == EVID_60)) { RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); - } else if ((this->unk_0B4 == EVID_82) || (this->unk_0B4 == EVID_90) || - ((this->unk_0B4 == EVID_6) && (gCurrentLevel == LEVEL_SOLAR))) { + } else if ((this->eventType == EVID_82) || (this->eventType == EVID_90) || + ((this->eventType == EVID_6) && (gCurrentLevel == LEVEL_SOLAR))) { if ((this->timer_0C6 % 2) == 0) { RCP_SetupDL(&gMasterDisp, 0x39); } else { @@ -3888,7 +3892,7 @@ void ActorEvent_Draw(ActorEvent* this) { } } - switch (this->unk_0B4) { + switch (this->eventType) { case EVID_92: case EVID_93: case EVID_94: @@ -3898,15 +3902,15 @@ void ActorEvent_Draw(ActorEvent* this) { gDPSetTextureFilter(gMasterDisp++, G_TF_POINT); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, (s32) this->fwork[15], (s32) this->fwork[16], (s32) this->fwork[17], 255); - gSPDisplayList(gMasterDisp++, sEventActorInfo[this->unk_0B4].dList); + gSPDisplayList(gMasterDisp++, sEventActorInfo[this->eventType].dList); gDPSetTextureFilter(gMasterDisp++, G_TF_BILERP); break; default: - if ((this->unk_0B4 < EVID_200) && (sEventActorInfo[this->unk_0B4].dList != NULL)) { - gSPDisplayList(gMasterDisp++, sEventActorInfo[this->unk_0B4].dList); + if ((this->eventType < EVID_200) && (sEventActorInfo[this->eventType].dList != NULL)) { + gSPDisplayList(gMasterDisp++, sEventActorInfo[this->eventType].dList); } - switch (this->unk_0B4) { + switch (this->eventType) { case EVID_56: Cutscene_DrawGreatFox(); break; @@ -3934,7 +3938,7 @@ void ActorEvent_Draw(ActorEvent* this) { func_edisplay_8005B388(this); break; - case EVID_43: + case EVID_TEAMMATE: if (gLevelType == LEVELTYPE_PLANET) { gSPDisplayList(gMasterDisp++, D_ENMY_PLANET_40018A0); } else { @@ -3951,11 +3955,11 @@ void ActorEvent_Draw(ActorEvent* this) { case EVID_6: if (gCurrentLevel == LEVEL_SOLAR) { gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - Animation_GetFrameData(&D_SO_600636C, this->unk_0B6, sp114); + Animation_GetFrameData(&D_SO_600636C, this->animFrame, sp114); Animation_DrawSkeleton(1, D_SO_6006558, sp114, NULL, NULL, this, &gIdentityMatrix); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); } else { - Animation_GetFrameData(&D_ENMY_PLANET_40057AC, this->unk_0B6, sp114); + Animation_GetFrameData(&D_ENMY_PLANET_40057AC, this->animFrame, sp114); Animation_DrawSkeleton(1, D_ENMY_PLANET_40058B8, sp114, NULL, NULL, this, &gIdentityMatrix); } break; @@ -3967,7 +3971,7 @@ void ActorEvent_Draw(ActorEvent* this) { case EVID_9: Matrix_Translate(gGfxMatrix, 0.0f, -30.0f, 0.0f, MTXF_APPLY); - Animation_GetFrameData(&D_ENMY_PLANET_40001A4, this->unk_0B6, sp114); + Animation_GetFrameData(&D_ENMY_PLANET_40001A4, this->animFrame, sp114); Animation_DrawSkeleton(1, D_ENMY_PLANET_4000270, sp114, NULL, NULL, this, &gIdentityMatrix); break; @@ -3994,7 +3998,7 @@ void ActorEvent_Draw(ActorEvent* this) { gSPDisplayList(gMasterDisp++, D_A6_601A120); break; - case EVID_21: + case EVID_A6_MISSILE: gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_A6_6018BF0); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); @@ -4003,7 +4007,7 @@ void ActorEvent_Draw(ActorEvent* this) { Actor_DrawEngineGlow(this, 2); break; - case EVID_22: + case EVID_A6_ROCKET: gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_A6_6019730); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); @@ -4035,7 +4039,7 @@ void ActorEvent_Draw(ActorEvent* this) { break; case EVID_33: - Animation_GetFrameData(&D_ENMY_SPACE_400A30C, this->unk_0B6, sp114); + Animation_GetFrameData(&D_ENMY_SPACE_400A30C, this->animFrame, sp114); Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 1.5f, 1.5f, 1.5f, MTXF_APPLY); Animation_DrawSkeleton(1, D_ENMY_SPACE_400A398, sp114, ActorEvent_OverrideLimbDraw1, NULL, this, @@ -4044,13 +4048,13 @@ void ActorEvent_Draw(ActorEvent* this) { break; case EVID_36: - Animation_GetFrameData(&D_TI1_700CAF4, this->unk_0B6, sp114); + Animation_GetFrameData(&D_TI1_700CAF4, this->animFrame, sp114); sp114[2].z += this->fwork[15]; Animation_DrawSkeleton(1, D_TI1_700CB60, sp114, NULL, NULL, this, &gIdentityMatrix); break; - case EVID_38: - ActorEvent_80074E3C(this); + case EVID_SX_WARP_GATE: + ActorEvent_DrawEVID_SX_WARP_GATE(this); break; case EVID_48: @@ -4060,7 +4064,7 @@ void ActorEvent_Draw(ActorEvent* this) { break; case EVID_52: - Animation_GetFrameData(&D_ZO_601F874, this->unk_0B6, sp114); + Animation_GetFrameData(&D_ZO_601F874, this->animFrame, sp114); sp114[2].z -= this->fwork[15]; gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); Matrix_Scale(gGfxMatrix, 2.6f, 2.6f, 2.6f, MTXF_APPLY); @@ -4070,8 +4074,8 @@ void ActorEvent_Draw(ActorEvent* this) { case EVID_64: Matrix_Push(&gGfxMatrix); - Matrix_RotateX(gGfxMatrix, this->unk_0F4.x * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, this->unk_0F4.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, this->rot_0F4.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, this->rot_0F4.y * M_DTOR, MTXF_APPLY); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, this->fwork[15], 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -4084,13 +4088,13 @@ void ActorEvent_Draw(ActorEvent* this) { Matrix_Pop(&gGfxMatrix); break; - case EVID_67: + case EVID_METEO_PYRAMID_SHIP: gSPDisplayList(gMasterDisp++, D_ME_6008AA0); RCP_SetupDL(&gMasterDisp, 0x35); gSPDisplayList(gMasterDisp++, D_ME_6009E30); break; - case EVID_78: + case EVID_SUPPLY_CRATE: ActorSupplies_Draw(this); break; @@ -4122,23 +4126,23 @@ void ActorEvent_Draw(ActorEvent* this) { gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); break; - case EVID_83: + case EVID_AQ_CLAM: Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 3.0f, MTXF_APPLY); - Animation_GetFrameData(&D_AQ_602201C, this->unk_0B6, sp114); + Animation_GetFrameData(&D_AQ_602201C, this->animFrame, sp114); Animation_DrawSkeleton(1, D_AQ_60220E8, sp114, NULL, NULL, this, &gIdentityMatrix); break; - case EVID_85: + case EVID_BILL: gSPDisplayList(gMasterDisp++, D_D00B880); Actor_DrawEngineAndContrails(this); break; - case EVID_86: + case EVID_KATT: gSPDisplayList(gMasterDisp++, D_D009A40); Actor_DrawEngineAndContrails(this); break; - case EVID_88: + case EVID_AQ_STARFISH: RCP_SetupDL(&gMasterDisp, 0x16); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, this->unk_046, this->unk_046, this->unk_046, 255); gSPDisplayList(gMasterDisp++, D_AQ_6008970); @@ -4149,20 +4153,20 @@ void ActorEvent_Draw(ActorEvent* this) { gSPDisplayList(gMasterDisp++, D_AQ_6000E10); break; - case EVID_103: - case EVID_104: + case EVID_ANDROSS_GATE: + case EVID_ANDROSS_GATE_2: Andross_8018769C(this); break; - case EVID_105: + case EVID_SX_WARP_ENMY: RCP_SetupDL(&gMasterDisp, 0x23); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 143); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 0); gSPDisplayList(gMasterDisp++, D_WZ_7000000); break; - case EVID_106: - Animation_GetFrameData(&D_ENMY_SPACE_4000080, this->unk_0B6, sp114); + case EVID_KILLER_BEE: + Animation_GetFrameData(&D_ENMY_SPACE_4000080, this->animFrame, sp114); Animation_DrawSkeleton(1, D_ENMY_SPACE_400014C, sp114, NULL, NULL, this, &gIdentityMatrix); break; @@ -4192,7 +4196,7 @@ void func_enmy2_800763A4(Actor* actor) { Vec3f sp4C; s32 pad; - if (actor->unk_0B4 == EVID_27) { + if (actor->eventType == EVID_27) { actor->obj.pos.y -= actor->vel.y; actor->obj.status = OBJ_ACTIVE; func_effect_8007D0E0(actor->obj.pos.x - actor->vel.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z - actor->vel.z, @@ -4247,7 +4251,7 @@ void func_enmy2_800763A4(Actor* actor) { break; } - if (((actor->timer_0BC % 4U) == 1) && (actor->unk_0B4 != EVID_13) && (actor->unk_0B4 != EVID_61)) { + if (((actor->timer_0BC % 4U) == 1) && (actor->eventType != EVID_13) && (actor->eventType != EVID_61)) { func_effect_8007D24C(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 2.2f); } @@ -4305,7 +4309,7 @@ void func_enmy2_800763A4(Actor* actor) { func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); } - if ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0B4 == EVID_2)) { + if ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->eventType == EVID_2)) { if (actor->fwork[17] < 360.0f) { Play_SpawnDebris(1, actor->obj.pos.x + 20.0f, actor->obj.pos.y, actor->obj.pos.z); actor->fwork[17] = 777.0f; @@ -4392,12 +4396,12 @@ void func_enmy2_800763A4(Actor* actor) { actor->vel.z, 5.0f, 15); func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z - actor->vel.z, 8.0f); } else { - if ((actor->unk_0B4 != EVID_13) && (actor->unk_0B4 != EVID_61)) { + if ((actor->eventType != EVID_13) && (actor->eventType != EVID_61)) { func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z - actor->vel.z, actor->scale * 5.0f); } - if (actor->unk_0B4 == EVID_36) { + if (actor->eventType == EVID_36) { func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, actor->vel.x, actor->vel.y, actor->vel.z, 5.0f, 15); } @@ -4416,16 +4420,16 @@ void func_enmy2_800763A4(Actor* actor) { if (gLevelMode == LEVELMODE_ALL_RANGE) { D_ctx_80177F20[actor->index + 1] = actor->obj.pos.x; D_ctx_80178028[actor->index + 1] = actor->obj.pos.z; - D_ctx_80178130[actor->index + 1] = actor->unk_0F4.y + 180.0f; + D_ctx_80178130[actor->index + 1] = actor->rot_0F4.y + 180.0f; } if (actor->obj.id == OBJ_ACTOR_ALLRANGE) { - func_360_8002EE64(actor); + ActorAllRange_SetShadowData(actor); } } void ActorEvent_Dying(ActorEvent* this) { - if ((this->unk_0B4 == EVID_48) || (this->unk_0B4 == EVID_49) || (this->unk_0B4 == EVID_50)) { + if ((this->eventType == EVID_48) || (this->eventType == EVID_49) || (this->eventType == EVID_50)) { SectorY_Actor204_Update(this); } else { func_enmy2_800763A4(this); diff --git a/src/engine/fox_fade.c b/src/engine/fox_fade.c index fb127c18..2999878d 100644 --- a/src/engine/fox_fade.c +++ b/src/engine/fox_fade.c @@ -1,23 +1,23 @@ #include "global.h" -void func_fade_80084370(s32 arg0) { - Graphics_FillRectangle(&gMasterDisp, 0, 0, arg0, SCREEN_HEIGHT, 0, 0, 0, 255); - Graphics_FillRectangle(&gMasterDisp, SCREEN_WIDTH - arg0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0, 0, 255); +void Wipe_Horizontal(s32 frame) { + Graphics_FillRectangle(&gMasterDisp, 0, 0, frame, SCREEN_HEIGHT, 0, 0, 0, 255); + Graphics_FillRectangle(&gMasterDisp, SCREEN_WIDTH - frame, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0, 0, 255); } -void func_fade_800843FC(s32 arg0) { - Graphics_FillRectangle(&gMasterDisp, 0, 0, SCREEN_WIDTH, arg0, 0, 0, 0, 255); - Graphics_FillRectangle(&gMasterDisp, 0, SCREEN_HEIGHT - arg0, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0, 0, 255); +void Wipe_Vertical(s32 frame) { + Graphics_FillRectangle(&gMasterDisp, 0, 0, SCREEN_WIDTH, frame, 0, 0, 0, 255); + Graphics_FillRectangle(&gMasterDisp, 0, SCREEN_HEIGHT - frame, SCREEN_WIDTH, SCREEN_HEIGHT, 0, 0, 0, 255); } -void func_fade_80084488(s32 arg0) { +void Wipe_Circular(s32 frame) { s32 var_s1; RCP_SetupDL_12(); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -150.0f, MTXF_NEW); - for (var_s1 = 0; var_s1 < MIN(360, arg0 * 15); var_s1 += 15) { - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, MIN((arg0 - (var_s1 / 15)) * 15, 255)); + for (var_s1 = 0; var_s1 < MIN(360, frame * 15); var_s1 += 15) { + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, MIN((frame - (var_s1 / 15)) * 15, 255)); Matrix_Push(&gGfxMatrix); Matrix_RotateZ(gGfxMatrix, var_s1 * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.53f, 1.0f, 1.0f, MTXF_APPLY); @@ -28,17 +28,17 @@ void func_fade_80084488(s32 arg0) { Matrix_Pop(&gGfxMatrix); } -void func_fade_80084688(s32 fade, s32 progress) { - if (progress != 0) { - switch (fade) { - case 0: - func_fade_80084488(progress); +void Wipe_Draw(WipeMode mode, s32 frame) { + if (frame != 0) { + switch (mode) { + case WIPE_CIRCULAR: + Wipe_Circular(frame); break; - case 1: - func_fade_80084370(progress); + case WIPE_HORIZONTAL: + Wipe_Horizontal(frame); break; - case 2: - func_fade_800843FC(progress); + case WIPE_VERTICAL: + Wipe_Vertical(frame); break; default: (void) "そのような フェード は ない (%d)\n"; // There is no such fade diff --git a/src/engine/fox_game.c b/src/engine/fox_game.c index 3852212e..c46a9b24 100644 --- a/src/engine/fox_game.c +++ b/src/engine/fox_game.c @@ -4,15 +4,15 @@ #include "assets/ast_logo.h" #include "mods.h" -f32 D_game_80161A10; -f32 D_game_80161A14; +f32 gNextVsViewScale; +f32 gVsViewScale; s32 gPlayerInactive[4]; -s32 D_game_80161A28; +s32 gVsMenuSelection; u8 gShowHud; u16 gNextLevelPhase; u16 gNextLevel; u16 gNextGameState; -u16 D_game_80161A34; +u16 gLastGameState; u16 gBgColor; u8 gBlurAlpha; u8 gGameStandby; @@ -20,8 +20,8 @@ f32 gFovY; f32 gProjectNear; f32 gProjectFar; -s32 gShowCrosshairs[4] = { true, true, true, true }; -s32 D_game_800D2870 = 0; +bool gShowCrosshairs[4] = { true, true, true, true }; +bool D_game_800D2870 = false; static s32 sVsCameraULx[] = { 0, SCREEN_WIDTH / 2, 0, SCREEN_WIDTH / 2 }; static s32 sVsCameraLRx[] = { SCREEN_WIDTH / 2 - 1, SCREEN_WIDTH - 1, SCREEN_WIDTH / 2 - 1, SCREEN_WIDTH - 1 }; static s32 sVsCameraULy[] = { 0, 0, SCREEN_HEIGHT / 2, SCREEN_HEIGHT / 2 }; @@ -73,7 +73,7 @@ void Game_Initialize(void) { gFovY = 45.0f; gProjectNear = 10.0f; gProjectFar = 12800.0f; - D_game_80161A10 = D_game_80161A14 = 0.0f; + gNextVsViewScale = gVsViewScale = 0.0f; gSceneId = SCENE_LOGO; gSceneSetup = 0; Load_InitDmaAndMsg(); @@ -81,7 +81,7 @@ void Game_Initialize(void) { } void Game_SetGameState(void) { - D_game_80161A14 = D_game_80161A10; + gVsViewScale = gNextVsViewScale; if (gNextGameState == GSTATE_NONE) { return; @@ -202,48 +202,48 @@ void Game_InitViewport(Gfx** dList, u8 camCount, u8 camIndex) { if ((camCount != 1) && (camCount == 4)) { switch (camIndex) { case 0: - gViewport->vp.vscale[0] = SCREEN_WIDTH * (D_game_80161A14 - 1.0f) * 2; - gViewport->vp.vscale[1] = SCREEN_HEIGHT * (D_game_80161A14 - 1.0f) * 2; + gViewport->vp.vscale[0] = SCREEN_WIDTH * (gVsViewScale - 1.0f) * 2; + gViewport->vp.vscale[1] = SCREEN_HEIGHT * (gVsViewScale - 1.0f) * 2; gViewport->vp.vscale[2] = G_MAXZ / 2; gViewport->vp.vscale[3] = 0; - gViewport->vp.vtrans[0] = SCREEN_WIDTH * (2.0f - D_game_80161A14) * 2; - gViewport->vp.vtrans[1] = SCREEN_HEIGHT * (2.0f - D_game_80161A14) * 2; + gViewport->vp.vtrans[0] = SCREEN_WIDTH * (2.0f - gVsViewScale) * 2; + gViewport->vp.vtrans[1] = SCREEN_HEIGHT * (2.0f - gVsViewScale) * 2; gViewport->vp.vtrans[2] = G_MAXZ / 2; gViewport->vp.vtrans[3] = 0; gDPSetScissor((*dList)++, G_SC_NON_INTERLACE, SCREEN_MARGIN, SCREEN_MARGIN, SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2); break; case 1: - gViewport->vp.vscale[0] = SCREEN_WIDTH * (D_game_80161A14 - 1.0f) * 2; - gViewport->vp.vscale[1] = SCREEN_HEIGHT * (D_game_80161A14 - 1.0f) * 2; + gViewport->vp.vscale[0] = SCREEN_WIDTH * (gVsViewScale - 1.0f) * 2; + gViewport->vp.vscale[1] = SCREEN_HEIGHT * (gVsViewScale - 1.0f) * 2; gViewport->vp.vscale[2] = G_MAXZ / 2; gViewport->vp.vscale[3] = 0; - gViewport->vp.vtrans[0] = SCREEN_WIDTH * D_game_80161A14 * 2; - gViewport->vp.vtrans[1] = SCREEN_HEIGHT * (2.0f - D_game_80161A14) * 2; + gViewport->vp.vtrans[0] = SCREEN_WIDTH * gVsViewScale * 2; + gViewport->vp.vtrans[1] = SCREEN_HEIGHT * (2.0f - gVsViewScale) * 2; gViewport->vp.vtrans[2] = G_MAXZ / 2; gViewport->vp.vtrans[3] = 0; gDPSetScissor((*dList)++, G_SC_NON_INTERLACE, SCREEN_WIDTH / 2, SCREEN_MARGIN, SCREEN_WIDTH - SCREEN_MARGIN, SCREEN_HEIGHT / 2); break; case 2: - gViewport->vp.vscale[0] = SCREEN_WIDTH * (D_game_80161A14 - 1.0f) * 2; - gViewport->vp.vscale[1] = SCREEN_HEIGHT * (D_game_80161A14 - 1.0f) * 2; + gViewport->vp.vscale[0] = SCREEN_WIDTH * (gVsViewScale - 1.0f) * 2; + gViewport->vp.vscale[1] = SCREEN_HEIGHT * (gVsViewScale - 1.0f) * 2; gViewport->vp.vscale[2] = G_MAXZ / 2; gViewport->vp.vscale[3] = 0; - gViewport->vp.vtrans[0] = SCREEN_WIDTH * (2.0f - D_game_80161A14) * 2; - gViewport->vp.vtrans[1] = SCREEN_HEIGHT * D_game_80161A14 * 2; + gViewport->vp.vtrans[0] = SCREEN_WIDTH * (2.0f - gVsViewScale) * 2; + gViewport->vp.vtrans[1] = SCREEN_HEIGHT * gVsViewScale * 2; gViewport->vp.vtrans[2] = G_MAXZ / 2; gViewport->vp.vtrans[3] = 0; gDPSetScissor((*dList)++, G_SC_NON_INTERLACE, SCREEN_MARGIN, SCREEN_HEIGHT / 2, SCREEN_WIDTH / 2, SCREEN_HEIGHT - SCREEN_MARGIN); break; case 3: - gViewport->vp.vscale[0] = SCREEN_WIDTH * (D_game_80161A14 - 1.0f) * 2; - gViewport->vp.vscale[1] = SCREEN_HEIGHT * (D_game_80161A14 - 1.0f) * 2; + gViewport->vp.vscale[0] = SCREEN_WIDTH * (gVsViewScale - 1.0f) * 2; + gViewport->vp.vscale[1] = SCREEN_HEIGHT * (gVsViewScale - 1.0f) * 2; gViewport->vp.vscale[2] = G_MAXZ / 2; gViewport->vp.vscale[3] = 0; - gViewport->vp.vtrans[0] = SCREEN_WIDTH * D_game_80161A14 * 2; - gViewport->vp.vtrans[1] = SCREEN_HEIGHT * D_game_80161A14 * 2; + gViewport->vp.vtrans[0] = SCREEN_WIDTH * gVsViewScale * 2; + gViewport->vp.vtrans[1] = SCREEN_HEIGHT * gVsViewScale * 2; gViewport->vp.vtrans[2] = G_MAXZ / 2; gViewport->vp.vtrans[3] = 0; gDPSetScissor((*dList)++, G_SC_NON_INTERLACE, SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2, @@ -413,7 +413,7 @@ void Game_Update(void) { gPlayState = gOptionMenuStatus = gDrawMode = gShowBossHealth = gShowHud = gBgColor = gFillScreenAlpha = 0; gNextGameState = D_ctx_80177C94 = D_ctx_80177CAC = D_ctx_80177CB4 = D_ctx_80177CBC = D_ctx_80177CC4 = - D_ctx_80177C9C = D_ctx_80177CA4 = D_play_80161A5C = D_game_80161A34 = 0; + D_ctx_80177C9C = D_ctx_80177CA4 = D_play_80161A5C = gLastGameState = GSTATE_NONE; #ifdef MODS_BOOT_STATE gNextGameState = MODS_BOOT_STATE; #endif @@ -568,7 +568,30 @@ void Game_Update(void) { if ((gGameState == GSTATE_PLAY) && gVersusMode) { Versus_Draw(); } - func_fade_80084688(0, D_ctx_80177C50); + + Wipe_Draw(WIPE_CIRCULAR, gCircleWipeFrame); + // { + // static mode = 0; + // if(gControllerPress[gMainController].button & L_TRIG) { + // mode = 1 - mode; + // } + // if(gControllerHold[gMainController].button & L_TRIG) { + // if(mode) { + // gCircleWipeFrame++; + // } else { + // gCircleWipeFrame--; + // } + // if(gCircleWipeFrame > 41) { + // gCircleWipeFrame = 41; + // } else if (gCircleWipeFrame < 0) { + // gCircleWipeFrame = 0; + // } + // } + // RCP_SetupDL(&gMasterDisp, 0x53); + // gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); + // Graphics_Printf("FADE PROGRESS: %d", gCircleWipeFrame); + // Graphics_DisplaySmallText(14, 9, 1.0f, 1.0f, D_801619A0); + // } if (!partialFill) { Graphics_FillRectangle(&gMasterDisp, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, gFillScreenRed, gFillScreenGreen, gFillScreenBlue, gFillScreenAlpha); diff --git a/src/engine/fox_hud.c b/src/engine/fox_hud.c index 0e3fff84..fc3a41c8 100644 --- a/src/engine/fox_hud.c +++ b/src/engine/fox_hud.c @@ -328,7 +328,7 @@ void func_hud_80085944(void) { } if ((D_80161900[4] == 0) && (gGoldRingCount[0] > gGoldRingCount[1])) { - gGoldRingCount[1] += 1; // needs to be += 1 + gGoldRingCount[1] += 1; // can't be ++ if ((i = gGoldRingCount[1] % 3) == 0) { i = 3; @@ -724,7 +724,7 @@ void HUD_DrawLevelStartStatusScreen(void) { f32 temp; if ((gPlayState != PLAY_PAUSE) && (gLevelStartStatusScreenTimer != 0)) { - gLevelStartStatusScreenTimer -= 1; + gLevelStartStatusScreenTimer--; } if (gLevelStartStatusScreenTimer == 1) { @@ -1490,7 +1490,7 @@ void func_hud_80088970(void) { gNextGameStateTimer = 2; gOptionMenuStatus = OPTION_WAIT; gDrawMode = DRAW_NONE; - D_game_80161A34 = 7; + gLastGameState = GSTATE_PLAY; gStarCount = 0; break; } else { @@ -2010,7 +2010,7 @@ s32 func_hud_8008A4DC(void) { return 0; } - if (D_ctx_80177AB0 >= 5) { + if (gDrawBackdrop >= 5) { return 0; } @@ -2066,7 +2066,7 @@ s32 func_hud_8008A4DC(void) { y = 162.000f; x1 += D_800D1E10 * temp3; } else { - if ((D_ctx_80177E7C == 0) || (D_versus_80178750 != 0)) { + if ((gVsMatchStart == 0) || (D_versus_80178750 != 0)) { return 0; } temp2 = 13000.00f; @@ -2460,7 +2460,7 @@ s32 func_hud_8008B774(void) { (gCurrentLevel == LEVEL_SECTOR_Y))) { for (i = 0; i < ARRAY_COUNT(gActors); i++) { if ((gActors[i].obj.status == OBJ_ACTIVE) && (gActors[i].iwork[12] == temp)) { - if ((gActors[i].unk_0B4 == EVID_2) || (gActors[i].unk_0B4 == EVID_43) || + if ((gActors[i].eventType == EVID_2) || (gActors[i].eventType == EVID_TEAMMATE) || ((gActors[i].obj.id == OBJ_ACTOR_TEAM_BOSS) && ((gActors[i].aiType == AI360_FALCO) || (gActors[i].aiType == AI360_SLIPPY) || (gActors[i].aiType == AI360_PEPPY)))) { @@ -2742,7 +2742,7 @@ void func_hud_8008C6F4(s32 idx, s32 arg1) { Matrix_Push(&gGfxMatrix); - if (gPlayer[0].cockpitView) { + if (gPlayer[0].alternateView) { Matrix_RotateZ(gGfxMatrix, M_DTOR * gPlayer[0].camRoll, MTXF_APPLY); } @@ -2775,7 +2775,8 @@ void HUD_DrawEdgeArrows(void) { s32 i; s32 j; - if ((gPlayer[gPlayerNum].flags_228 != 0) && (gPlayer[gPlayerNum].timer_210 == 0) && (gPlayState != PLAY_PAUSE)) { + if ((gPlayer[gPlayerNum].flags_228 != 0) && (gPlayer[gPlayerNum].pathChangeTimer == 0) && + (gPlayState != PLAY_PAUSE)) { j = gPlayer[gPlayerNum].flags_228; for (i = 0; i < 12; i++) { @@ -2828,19 +2829,19 @@ void func_hud_8008CBE4(void) { break; case 1: - if (D_ctx_80177E7C == 0) { + if (gVsMatchStart == 0) { D_80161758 = 0; break; } - if (D_80161760[gPlayerNum]) { + if (D_80161760[gPlayerNum] != 0) { D_80161760[gPlayerNum]--; - if (D_80161760[gPlayerNum] & 4) { + if ((D_80161760[gPlayerNum] & 4) != 0) { break; } } - for (i = 0; i < D_ctx_80177DB8[gPlayerNum]; i++) { + for (i = 0; i < gVsPoints[gPlayerNum]; i++) { if (D_80161748[gPlayerNum] < (i + 1)) { if (((i + 1) != 1) && ((i + 1) == (gVsPointsToWin - 1))) { D_80161760[gPlayerNum] = 50; @@ -2853,12 +2854,12 @@ void func_hud_8008CBE4(void) { if ((D_80161748[gPlayerNum] == (i + 1)) && (D_80161738[gPlayerNum] != 0)) { D_80161738[gPlayerNum]--; - if (D_80161738[gPlayerNum] & 4) { + if ((D_80161738[gPlayerNum] & 4) != 0) { continue; } } - j = D_ctx_80177DD0[gPlayerNum][i]; + j = gVsKills[gPlayerNum][i]; RCP_SetupDL(&gMasterDisp, 0x4D); @@ -3010,7 +3011,7 @@ void func_hud_8008D984(void) { D_800D2190[gPlayerNum]--; } - if ((D_800D2190[gPlayerNum] & 2) || ((D_800D2190[gPlayerNum] == 0) && (gBombCount[gPlayerNum] != 0))) { + if (((D_800D2190[gPlayerNum] & 2) != 0) || ((D_800D2190[gPlayerNum] == 0) && (gBombCount[gPlayerNum] != 0))) { RCP_SetupDL_78(); if (gBombCount[gPlayerNum] >= 2) { if (Math_SmoothStepToF(&D_800D21A4, D_800D21A0, 0.4f, 100.0f, 0.1f) == 0.0f) { @@ -3029,7 +3030,7 @@ void func_hud_8008D984(void) { } void func_hud_8008DC34(void) { - if ((D_ctx_80177E7C != 0) && (D_versus_80178750 == 0)) { + if ((gVsMatchStart != 0) && (D_versus_80178750 == 0)) { func_hud_8008D250(); func_hud_8008D7F4(); func_hud_8008D4F0(0, 0); @@ -3273,7 +3274,7 @@ void func_hud_8008E620(f32 arg0, f32 arg1) { break; } - if (gMedalFlashTimer) { + if (gMedalFlashTimer != 0) { gMedalFlashTimer--; } @@ -3687,7 +3688,7 @@ void func_hud_8008FFF0(Boss* boss, s32 arg1) { i = RAND_INT(36.0f); - if (!(gGameFrameCount & 2)) { + if ((gGameFrameCount & 2) == 0) { func_effect_8007C120(boss->obj.pos.x + D_800D21C8[i].x, boss->obj.pos.y + D_800D21C8[i].y, boss->obj.pos.z + D_800D21C8[i].z, 0.0f, 0.0f, 0.0f, 0.3f * temp, 20); } @@ -3861,8 +3862,8 @@ bool func_hud_80090A00(Actor* actor) { actor->fwork[8] = 0.0f; actor->fwork[7] = 360.0f; actor->timer_0BC = 8; - actor->unk_0F4.y = 100.0f; - actor->unk_0F4.x = 300.0f; + actor->rot_0F4.y = 100.0f; + actor->rot_0F4.x = 300.0f; actor->iwork[4] = 1; actor->iwork[5] = 1; @@ -4156,7 +4157,7 @@ bool func_hud_800915FC(Actor* actor) { Scenery360* scenery360; bool ret = false; - Math_Vec3fFromAngles(&vec, 0.0f, actor->unk_0F4.y, 650.0f + actor->fwork[9] * 10.0f); + Math_Vec3fFromAngles(&vec, 0.0f, actor->rot_0F4.y, 650.0f + actor->fwork[9] * 10.0f); if (gLevelMode == LEVELMODE_ALL_RANGE) { for (i = 0, scenery360 = &gScenery360[0]; i < 200; i++, scenery360++) { @@ -4230,8 +4231,8 @@ bool func_hud_80091864(Actor* actor) { actor->iwork[0] = 0; } - sp3C = Math_SmoothStepToAngle(&actor->unk_0F4.y, sp40, 0.5f, actor->fwork[2], 0.001f) * 30.0f; - Math_SmoothStepToAngle(&actor->unk_0F4.x, sp44, 0.5f, actor->fwork[2], 0.0001f); + sp3C = Math_SmoothStepToAngle(&actor->rot_0F4.y, sp40, 0.5f, actor->fwork[2], 0.001f) * 30.0f; + Math_SmoothStepToAngle(&actor->rot_0F4.x, sp44, 0.5f, actor->fwork[2], 0.0001f); sp2C = sp28 = 0.0f; if (sp3C < 0.0f) { @@ -4265,8 +4266,8 @@ bool func_hud_80091864(Actor* actor) { bool func_hud_80091B90(Actor* actor) { Vec3f vec; - actor->obj.rot.x = -actor->unk_0F4.x; - actor->obj.rot.y = actor->unk_0F4.y; + actor->obj.rot.x = -actor->rot_0F4.x; + actor->obj.rot.y = actor->rot_0F4.y; Math_SmoothStepToF(&actor->fwork[0], actor->fwork[1], 0.2f, 1.0f, 0.0f); Math_SmoothStepToF(&actor->fwork[2], actor->fwork[3], 1.0f, 1.0f, 0.0f); @@ -4345,7 +4346,7 @@ bool func_hud_80091F00(Actor* actor) { AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, actor->sfxSource, 4); func_effect_8007D10C(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 1.5f); - Matrix_RotateY(gCalcMatrix, actor->unk_0F4.y * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, actor->rot_0F4.y * M_DTOR, MTXF_NEW); if (Rand_ZeroOne() < 0.5f) { sp40.x = -20.0f; @@ -4420,7 +4421,7 @@ void func_hud_80092244(Actor* actor) { gRadarMarks[actor->index].pos.x = actor->obj.pos.x; gRadarMarks[actor->index].pos.y = actor->obj.pos.y; gRadarMarks[actor->index].pos.z = actor->obj.pos.z; - gRadarMarks[actor->index].yRot = actor->unk_0F4.y + 180.0f; + gRadarMarks[actor->index].yRot = actor->rot_0F4.y + 180.0f; } void func_hud_800922F4(Actor* actor) { @@ -4438,7 +4439,7 @@ void func_hud_800922F4(Actor* actor) { temp = 64 - 1; } - if (!(gGameFrameCount & temp)) { + if ((gGameFrameCount & temp) == 0) { func_effect_8007D10C(actor->obj.pos.x + RAND_FLOAT_CENTERED(10.0f), actor->obj.pos.y + RAND_FLOAT(10.0f), actor->obj.pos.z + RAND_FLOAT_CENTERED(10.0f), 2.2f); } @@ -4495,8 +4496,8 @@ bool func_hud_800924E0(Actor* actor) { Math_SmoothStepToAngle(&actor->obj.rot.z, 0.0f, 0.1f, 5.0f, 0.0f); actor->obj.rot.x = actor->vwork[29].x + (360.0f - actor->fwork[19]); - Matrix_RotateY(gCalcMatrix, actor->unk_0F4.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(M_DTOR * ((actor->unk_0F4.x + actor->vwork[29].x) + actor->fwork[19])), + Matrix_RotateY(gCalcMatrix, actor->rot_0F4.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(M_DTOR * ((actor->rot_0F4.x + actor->vwork[29].x) + actor->fwork[19])), MTXF_APPLY); src.z = actor->fwork[1]; @@ -4577,14 +4578,14 @@ bool func_hud_800927A0(Actor* actor) { Math_SmoothStepToF(&actor->fwork[20], 0.0f, 0.1f, 15.0f, 0.0f); if (actor->fwork[19] > 180.0f) { - actor->unk_0F4.y += 180.0f; - if (actor->unk_0F4.y >= 360.0f) { - actor->unk_0F4.y = actor->unk_0F4.y - 360.0f; + actor->rot_0F4.y += 180.0f; + if (actor->rot_0F4.y >= 360.0f) { + actor->rot_0F4.y = actor->rot_0F4.y - 360.0f; } actor->fwork[19] -= 180.0f; - if ((sp50 - actor->unk_0F4.y) < 180.0f) { + if ((sp50 - actor->rot_0F4.y) < 180.0f) { actor->fwork[20] = 180.0f; } else { actor->fwork[20] = -180.0f; @@ -4609,7 +4610,7 @@ bool func_hud_800927A0(Actor* actor) { Math_SmoothStepToF(&actor->fwork[27], -sp54, 0.3f, 100.0f, 0.0f); if (actor->unk_04A != 0) { - Math_SmoothStepToAngle(&actor->unk_0F4.y, sp50, 0.1f, 2.0f, 0.0f); + Math_SmoothStepToAngle(&actor->rot_0F4.y, sp50, 0.1f, 2.0f, 0.0f); } if (actor->obj.pos.y < gPlayer[0].pathHeight) { @@ -4632,12 +4633,12 @@ bool func_hud_800927A0(Actor* actor) { } actor->obj.rot.x = actor->vwork[29].x - actor->fwork[19]; - actor->obj.rot.y = actor->unk_0F4.y; + actor->obj.rot.y = actor->rot_0F4.y; actor->obj.rot.z = actor->vwork[29].z + actor->fwork[20]; actor->obj.pos.y += actor->fwork[28]; - Matrix_RotateY(gCalcMatrix, actor->unk_0F4.y * M_DTOR, 0U); - Matrix_RotateX(gCalcMatrix, -(M_DTOR * (actor->unk_0F4.x + actor->vwork[29].x + actor->fwork[19])), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, actor->rot_0F4.y * M_DTOR, 0U); + Matrix_RotateX(gCalcMatrix, -(M_DTOR * (actor->rot_0F4.x + actor->vwork[29].x + actor->fwork[19])), MTXF_APPLY); src.z = actor->fwork[1]; src.y = 0.0f; @@ -4671,7 +4672,7 @@ void ActorTeamBoss_Init(Actor* actor) { actor->iwork[11] = 1; if (gLevelType == LEVELTYPE_PLANET) { - actor->unk_0C9 = 1; + actor->drawShadow = true; } AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); @@ -4769,9 +4770,9 @@ void func_hud_80093164(Actor* actor) { Player* player = &gPlayer[0]; if (actor->state == 0) { - switch (actor->unk_0B6) { + switch (actor->animFrame) { case 1: - if ((player->state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO) || (actor->unk_0B6 != 1)) { + if ((player->state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO) || (actor->animFrame != 1)) { if (gCsFrameCount > 1588) { actor->fwork[0] = 5.0f; } else { @@ -4794,8 +4795,8 @@ void func_hud_80093164(Actor* actor) { } } - Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(actor->unk_0F4.x * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (actor->rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(actor->rot_0F4.x * M_DTOR), MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; src.z = actor->fwork[0]; @@ -4803,9 +4804,9 @@ void func_hud_80093164(Actor* actor) { actor->vel.x = dest.x; actor->vel.y = dest.y; actor->vel.z = dest.z; - actor->obj.rot.x = -actor->unk_0F4.x; - actor->obj.rot.y = actor->unk_0F4.y + 180.0f; - actor->obj.rot.z = -actor->unk_0F4.z; + actor->obj.rot.x = -actor->rot_0F4.x; + actor->obj.rot.y = actor->rot_0F4.y + 180.0f; + actor->obj.rot.z = -actor->rot_0F4.z; } void func_hud_80093310(void) { @@ -4816,7 +4817,7 @@ void func_hud_80093310(void) { this->obj.pos.x = 0.0f; this->obj.pos.y += 1700.0f; this->obj.pos.z -= 5000.0f; - gActors[0].unk_0B6 = 1; + gActors[0].animFrame = 1; if (1) {} this->obj.id = OBJ_ACTOR_CUTSCENE; Object_SetInfo(&this->info, this->obj.id); @@ -4917,7 +4918,7 @@ void HUD_AquasStart(Player* player) { case 0: func_hud_80093310(); gCsFrameCount = 0; - D_ctx_80177AB0 = 1; + gDrawBackdrop = 1; gAqDrawMode = 1; player->unk_234 = 0; player->csState = 1; @@ -4940,7 +4941,7 @@ void HUD_AquasStart(Player* player) { D_801616A0.y = 124.17f; D_801616A0.z = 0.00f; - actor->unk_0F4.y = 30.0f; + actor->rot_0F4.y = 30.0f; D_ctx_80177A48[5] = 14.0f; D_ctx_80177A48[0] = 0.2f; @@ -5076,7 +5077,7 @@ void HUD_AquasStart(Player* player) { player->csState = 3; - D_ctx_80177AB0 = 0; + gDrawBackdrop = 0; player->camRoll = 60.0f; player->csTimer = 1000; @@ -5133,8 +5134,8 @@ void HUD_AquasStart(Player* player) { D_ctx_80177A48[0] = 0.0f; temp2 = 0.0f; - if (D_ctx_80177A10[9]) { - D_ctx_80177A10[9] -= 1; + if (D_ctx_80177A10[9] != 0) { + D_ctx_80177A10[9]--; temp = D_ctx_80177A10[9]; if (temp > 20.0f) { temp = 20.0f; @@ -5461,7 +5462,7 @@ void func_hud_80094D20(f32 x, f32 y) { boolTemp = true; } - if ((!boolTemp) && (xScale != 0.0f)) { + if (!boolTemp && (xScale != 0.0f)) { TextureRect_8bIA(&gMasterDisp, D_800D24DC[0], 16, 15, x1, y1, xScale, 1.0f); } @@ -5525,7 +5526,7 @@ void func_hud_80095350(Actor* actor) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; actor->obj.id = OBJ_ACTOR_CUTSCENE; - actor->unk_0B6 = 9999; + actor->animFrame = 9999; Object_SetInfo(&actor->info, actor->obj.id); } @@ -5542,7 +5543,7 @@ void func_hud_800953A0(Actor* actor, s32 arg1) { actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos = D_800D2510[arg1]; actor->obj.pos.z -= gPathProgress; - actor->unk_0B6 = 45; + actor->animFrame = 45; Object_SetInfo(&actor->info, actor->obj.id); } @@ -5557,7 +5558,7 @@ void func_hud_8009546C(Actor* actor, s32 arg1) { actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos = D_800D2540[arg1]; actor->obj.pos.z -= gPathProgress; - actor->unk_0B6 = 46; + actor->animFrame = 46; Object_SetInfo(&actor->info, actor->obj.id); } @@ -5572,7 +5573,7 @@ void func_hud_80095538(Actor* actor, s32 arg1) { actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.pos = D_800D257C[arg1]; actor->obj.pos.z -= gPathProgress; - actor->unk_0B6 = 47; + actor->animFrame = 47; Object_SetInfo(&actor->info, actor->obj.id); } void HUD_AquasComplete(Player* player) { @@ -5622,10 +5623,10 @@ void HUD_AquasComplete(Player* player) { if ((gCsFrameCount >= 30) && (gCsFrameCount < 90)) { D_ctx_80177A48[5] -= 0.6f; - if ((D_ctx_80177A48[5]) < 0.0f) { + if (D_ctx_80177A48[5] < 0.0f) { D_ctx_80177A48[5] += 360.0f; } - if ((D_ctx_80177A48[5]) > 360.0f) { + if (D_ctx_80177A48[5] > 360.0f) { D_ctx_80177A48[5] -= 360.0f; } src.x = 1000.0f; @@ -5770,14 +5771,14 @@ void HUD_AquasComplete(Player* player) { actor->fwork[3] = 2600.0f; actor->fwork[7] = 0.5f; - actor->unk_0F4.y = 130.0f; + actor->rot_0F4.y = 130.0f; src.x = actor->fwork[1]; src.y = actor->fwork[2]; src.z = actor->fwork[3]; Matrix_Translate(gCalcMatrix, player->pos.x, player->pos.y, player->trueZpos + gPathProgress, MTXF_NEW); - Matrix_RotateY(gCalcMatrix, -(M_DTOR * actor->unk_0F4.y), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -(M_DTOR * actor->rot_0F4.y), MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &src, &dest); player->cam.at.x = gCsCamAtX = player->pos.x; @@ -5830,12 +5831,12 @@ void HUD_AquasComplete(Player* player) { } D_ctx_80177A48[0] = 0.05f; - actor->unk_0F4.y += actor->fwork[7]; - if ((actor->unk_0F4.y) < 0.0f) { - actor->unk_0F4.y += 360.0f; + actor->rot_0F4.y += actor->fwork[7]; + if ((actor->rot_0F4.y) < 0.0f) { + actor->rot_0F4.y += 360.0f; } - if ((actor->unk_0F4.y) > 360.0f) { - actor->unk_0F4.y -= 360.0f; + if ((actor->rot_0F4.y) > 360.0f) { + actor->rot_0F4.y -= 360.0f; } src.x = actor->fwork[1]; @@ -5843,7 +5844,7 @@ void HUD_AquasComplete(Player* player) { src.z = actor->fwork[3]; Matrix_Translate(gCalcMatrix, actor->fwork[4], actor->fwork[5], actor->fwork[6], MTXF_NEW); - Matrix_RotateY(gCalcMatrix, -(M_DTOR * actor->unk_0F4.y), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -(M_DTOR * actor->rot_0F4.y), MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &src, &dest); gCsCamEyeX = dest.x; diff --git a/src/engine/fox_load.c b/src/engine/fox_load.c index 14023192..2d233fc8 100644 --- a/src/engine/fox_load.c +++ b/src/engine/fox_load.c @@ -72,7 +72,7 @@ u8 Load_SceneFiles(Scene* scene) { gSPSegment(gUnkDisp1++, segment + 1, K0_TO_PHYS(ramPtr)); ramPtr = ramPtr + SEGMENT_SIZE(scene->assets[segment]); } - segment += 1; + segment += 1; // can't be ++ } for (segment; segment < 15; segment += 1) { sCurrentScene.assets[segment].start = scene->assets[segment].start; diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index 3d70b0e3..5949dd79 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -23,13 +23,13 @@ #include "assets/ast_zoness.h" UNK_TYPE D_800D2F50 = 0; // unused -s32 D_800D2F54 = 0; -f32 D_800D2F58 = 0.0f; +s32 sOverheadCam = 0; +f32 sOverheadCamDist = 0.0f; f32 sMusicVolume = 0.0f; f32 sVoiceVolume = 0.0f; f32 sSfxVolume = 0.0f; u8 gVenomHardClear = 0; -u8 D_800D2F6C[20] = { +u8 sSaveSlotFromLevel[20] = { PLANET_CORNERIA, PLANET_METEO, PLANET_SECTOR_X, PLANET_AREA_6, PLANET_AREA_6, PLANET_SECTOR_Y, SAVE_SLOT_VENOM_1, SAVE_SLOT_SOLAR, PLANET_ZONESS, SAVE_SLOT_VENOM_1, PLANET_CORNERIA, PLANET_MACBETH, PLANET_TITANIA, PLANET_AQUAS, PLANET_FORTUNA, @@ -38,11 +38,11 @@ u8 D_800D2F6C[20] = { u8 gSavedZoSearchlightStatus; f32 gArwingSpeed; -s32 D_play_80161A58; -s32 D_play_80161A5C; +s32 D_play_80161A58; // unused +s32 D_play_80161A5C; // saved hit count for venom -> andross u16 gScreenFlashTimer; u16 gDropHitCountItem; -s32 D_play_80161A64; +s32 sPlayWingSplash; Environment* sEnvironment; #define MEM_ARRAY_ALLOCATE(arr, count) ((arr) = Memory_Allocate((count) * sizeof(*(arr)))) @@ -85,7 +85,7 @@ void Play_UpdateDynaFloor(void) { f32 sp88; f32 sp84; - D_ctx_801782FC++; + gDynaFloorTimer++; switch (gCurrentLevel) { case LEVEL_SOLAR: if ((gGameFrameCount % 2) != 0) { @@ -94,7 +94,7 @@ void Play_UpdateDynaFloor(void) { spB4 = SEGMENTED_TO_VIRTUAL(D_SO_6004500); } spB0 = SEGMENTED_TO_VIRTUAL(D_SO_6022760); - spA8 = 15; + spA8 = 16 - 1; sp90 = 70.0f; sp8C = 0.1f; sp88 = 2.2f; @@ -107,7 +107,7 @@ void Play_UpdateDynaFloor(void) { spB4 = SEGMENTED_TO_VIRTUAL(D_ZO_600C780); } spB0 = SEGMENTED_TO_VIRTUAL(D_ZO_602AC50); - spA8 = 7; + spA8 = 8 - 1; sp90 = 40.0f; sp8C = 0.2f; sp88 = 1.0f; @@ -122,7 +122,7 @@ void Play_UpdateDynaFloor(void) { for (i = 0; i < 17 * 17; i++, var_s3++, var_s5++, var_s4++, var_s0++, var_s1++, spB0++) { Math_SmoothStepToF(var_s3, *var_s5, sp8C, *var_s4, 0.0f); Math_SmoothStepToF(var_s4, 100.0f, 1.0f, sp84, 0.0f); - if ((D_ctx_801782FC & spA8) == (i & spA8)) { + if ((gDynaFloorTimer & spA8) == (i & spA8)) { *var_s5 = RAND_FLOAT(sp90); *var_s4 = 0.0f; } @@ -154,7 +154,8 @@ void Player_WingEffects(Player* player) { player->xRock = SIN_DEG(player->rockPhase * 0.7f) * 0.5f; player->bobPhase += 10.0f; player->rockPhase += 8.0f; - if ((gLevelType == LEVELTYPE_PLANET) || ((player->cockpitView == true) && (gLevelMode == LEVELMODE_ON_RAILS))) { + if ((gLevelType == LEVELTYPE_PLANET) || + ((player->alternateView == true) && (gLevelMode == LEVELMODE_ON_RAILS))) { player->yBob = -SIN_DEG(player->bobPhase) * 0.5f; if ((player->wings.rightState <= WINGSTATE_BROKEN) || (player->wings.leftState <= WINGSTATE_BROKEN)) { player->rockAngle = SIN_DEG(player->rockPhase) * 5.0f; @@ -169,7 +170,7 @@ void Player_DamageEffects(Player* player) { s32 var_v1; f32 sp40; - if (!player->cockpitView || (gLevelMode == LEVELMODE_ALL_RANGE)) { + if (!player->alternateView || (gLevelMode == LEVELMODE_ALL_RANGE)) { if (player->wings.rightState <= WINGSTATE_BROKEN) { if (((gGameFrameCount % 2U) == 0) && (gRightWingDebrisTimer[player->num] != 0)) { func_effect_8007D10C(RAND_FLOAT_CENTERED(10.0f) + player->hit1.x, RAND_FLOAT(5.0f) + player->hit1.y, @@ -204,7 +205,7 @@ void Player_DamageEffects(Player* player) { if (player->shields > 48) { var_v1 = 64 - 1; } - if (!player->cockpitView || (gLevelMode == LEVELMODE_ALL_RANGE)) { + if (!player->alternateView || (gLevelMode == LEVELMODE_ALL_RANGE)) { sp40 = 0.0f; if (player->form == FORM_LANDMASTER) { sp40 = 30.0f; @@ -244,7 +245,7 @@ void Player_WaterEffects(Player* player) { Matrix_MultVec3f(gCalcMatrix, &sp48, &sp30); if (player->pos.y < (gGroundHeight + 100.0f)) { if ((sp3C.y < gGroundHeight + 80.0f) && ((gGameFrameCount % 2) == 0)) { - if (D_play_80161A64) {} + if (sPlayWingSplash) {} func_effect_8007ACE0(sp3C.x, gGroundHeight, sp3C.z, 0.1f, 2.0f, player->rot.y + player->yRot_114 + 20.0f); } @@ -254,12 +255,12 @@ void Player_WaterEffects(Player* player) { } } if ((sp30.y < gGroundHeight + 80.0f) || (sp3C.y < gGroundHeight + 80.0f)) { - if (D_play_80161A64 == 0) { - D_play_80161A64 = 1; + if (!sPlayWingSplash) { + sPlayWingSplash = true; AUDIO_PLAY_SFX(NA_SE_SPLASH_LEVEL_S, player->sfxSource, 0); } } else { - D_play_80161A64 = 0; + sPlayWingSplash = false; Audio_KillSfxBySourceAndId(player->sfxSource, NA_SE_SPLASH_LEVEL_S); } } @@ -655,8 +656,8 @@ void Play_ClearObjectData(void) { Object_Kill(&gPlayerShots[i].obj, gPlayerShots[i].sfxSource); PlayerShot_Initialize(&gPlayerShots[i]); } - D_ctx_801782B8 = D_ctx_801782BC = D_ctx_801782C0 = D_ctx_801782D0 = gBossActive = D_ctx_8017828C = D_ctx_8017812C = - gPrevEventActorIndex = gFormationLeaderIndex = gRingPassCount = 0; + gDrawSmallRocks = D_ctx_801782BC = D_ctx_801782C0 = D_ctx_801782D0 = gBossActive = gKillEventActors = + gGroundClipMode = gPrevEventActorIndex = gFormationLeaderIndex = gRingPassCount = 0; gFormationInitPos.x = gFormationInitPos.y = gFormationInitPos.z = gFormationInitRot.x = gFormationInitRot.y = gFormationInitRot.z = 0.0f; for (i = 0; i < ARRAY_COUNT(gTeamArrowsViewPos); i++) { @@ -688,7 +689,7 @@ void Play_UpdateFillScreen(void) { Math_SmoothStepToF(&gLight3Brightness, 0.0f, 1.0f, 0.04f, 0.001f); if (gScreenFlashTimer != 0) { gScreenFlashTimer--; - if (gScreenFlashTimer & 2) { + if ((gScreenFlashTimer & 2) != 0) { gFillScreenRed = 255; gFillScreenGreen = 255; gFillScreenBlue = 255; @@ -836,7 +837,7 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) { if (player->unk_1A4 > 40) { sp34 = (player->boostSpeed * 0.3f) + 20.0f; player->timer_498 = 5; - } else if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gBossActive == 0)) { + } else if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && !gBossActive) { player->timer_498 = 3; } else if ((gCurrentLevel == LEVEL_VENOM_1) || (gCurrentLevel == LEVEL_AQUAS)) { player->timer_498 = 5; @@ -1919,14 +1920,14 @@ void Player_CollisionCheck(Player* player) { Player_ApplyDamage(player, temp_v0, actor->info.damage); } } else if (actor->obj.id == OBJ_ACTOR_EVENT) { - if (actor->unk_0B4 == EVID_42) { + if (actor->eventType == EVID_42) { temp_v0 = Player_CheckPolyCollision(player, ACTOR_EVENT_ID, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, actor->obj.rot.x, actor->obj.rot.y, actor->obj.rot.z); if (temp_v0 != 0) { Player_ApplyDamage(player, temp_v0, actor->info.damage); } - } else if (actor->unk_0B4 == EVID_63) { + } else if (actor->eventType == EVID_63) { spfD4.x = fabsf(actor->obj.pos.x - player->pos.x); spfD4.y = fabsf(actor->obj.pos.y - player->pos.y); spfD4.z = fabsf(actor->obj.pos.z - player->trueZpos); @@ -1938,9 +1939,9 @@ void Player_CollisionCheck(Player* player) { temp_v0 = Player_CheckHitboxCollision( player, actor->info.hitbox, &sp98, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, actor->obj.rot.x, actor->obj.rot.y, actor->obj.rot.z, actor->vwork[29].x, - actor->vwork[29].y, actor->vwork[29].z + actor->unk_0F4.z); + actor->vwork[29].y, actor->vwork[29].z + actor->rot_0F4.z); if (temp_v0 != 0) { - if ((temp_v0 < 0) && (actor->unk_0B4 == EVID_38)) { + if ((temp_v0 < 0) && (actor->eventType == EVID_SX_WARP_GATE)) { actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SX_6032328); if (gRingPassCount >= 0) { actor->unk_046 = 2; @@ -2019,7 +2020,7 @@ void Player_CollisionCheck(Player* player) { if (temp_v0 != 0) { if ((sprite->obj.id == OBJ_SPRITE_FO_POLE) || (sprite->obj.id == OBJ_SPRITE_CO_POLE) || (sprite->obj.id == OBJ_SPRITE_TI_CACTUS) || (sprite->obj.id == OBJ_SPRITE_CO_TREE)) { - sprite->unk_46 = 1; + sprite->destroy = 1; player->hitTimer = 6; player->unk_21C = 0; } else { @@ -2422,8 +2423,8 @@ void Play_InitLevel(void) { } break; case LEVEL_VENOM_ANDROSS: - D_ctx_80177A98 = 0; - D_ctx_80177AB0 = 6; + gDrawGround = false; + gDrawBackdrop = 6; D_Andross_801A7F58 = D_Andross_801A7F60 = D_Andross_801A7F68 = D_Andross_801A7F70 = D_Andross_801A7F78 = 0.0f; break; @@ -2441,12 +2442,12 @@ void Play_InitLevel(void) { Macbeth_80199920(); break; case LEVEL_ZONESS: - MEM_ARRAY_ALLOCATE(D_ctx_801782C4, 200); - ptr = (u8*) D_ctx_801782C4; - for (i = 0; i < 200 * sizeof(*D_ctx_801782C4); i++, ptr++) { + MEM_ARRAY_ALLOCATE(gZOSnakePosRots, 200); + ptr = (u8*) gZOSnakePosRots; + for (i = 0; i < 200 * sizeof(*gZOSnakePosRots); i++, ptr++) { *ptr = 0; } - D_ctx_801784A4 = 0; + gZOSnakeWaypointCount = 0; /* fallthrough */ case LEVEL_SOLAR: gUseDynaFloor = true; @@ -2521,14 +2522,14 @@ void Player_ResetVsData(void) { gVsMatchState = 0; for (i = 0; i < 4; i++) { - D_ctx_80177DB8[i] = 0; + gVsPoints[i] = 0; for (j = 0; j < 10; j++) { - D_ctx_80177DD0[i][j] = 0; + gVsKills[i][j] = 0; } gLaserStrength[i] = LASERS_SINGLE; gBombCount[i] = 0; } - D_ctx_80177E7C = D_ctx_80177E74 = 0; + gVsMatchStart = gVsMatchOver = 0; } void Player_InitVersus(void) { @@ -2574,9 +2575,9 @@ void Play_Init(void) { gSceneSetup = 0; } gShowHud = 1; - D_ctx_80177A98 = D_ctx_80177AB0 = 1; - gAqDrawMode = D_800D2F54 = 0; - D_display_800CA230 = D_800D2F58 = 0.0f; + gDrawGround = gDrawBackdrop = 1; + gAqDrawMode = sOverheadCam = 0; + gCamDistortion = sOverheadCamDist = 0.0f; gLevelMode = LEVELMODE_ON_RAILS; gPathTexScroll = D_bg_8015F968 = 0.0f; D_hud_800D1970 = gVersusMode = gHideRadio = gChangeTo360 = false; @@ -2590,10 +2591,10 @@ void Play_Init(void) { if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gLevelPhase == 1)) { gLevelMode = LEVELMODE_ALL_RANGE; } - D_ctx_80177E7C = 0; + gVsMatchStart = 0; Play_InitEnvironment(); gDropHitCountItem = gTeamLowHealthMsgTimer = gStartAndrossFightTimer = gSoShieldsEmpty = gAllRangeEventTimer = - gAllRangeFrameCount = gBossActive = gGameFrameCount = gCameraShake = D_ctx_801782FC = gBossFrameCount = + gAllRangeFrameCount = gBossActive = gGameFrameCount = gCameraShake = gDynaFloorTimer = gBossFrameCount = gCallTimer = gAllRangeSupplyTimer = gMissionStatus = 0; if (gCurrentLevel == LEVEL_SECTOR_X) { @@ -2607,7 +2608,7 @@ void Play_Init(void) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; } gScreenFlashTimer = gLight3R = gLight3G = gLight3B = D_hud_80161704 = D_hud_80161708 = gFillScreenAlpha = - D_ctx_80177C50 = gShowAllRangeCountdown = gCoUturnCount = 0; + gCircleWipeFrame = gShowAllRangeCountdown = gCoUturnCount = 0; gCsFrameCount = 0; gFillScreenAlpha = gFillScreenAlphaTarget = 255; @@ -2616,12 +2617,12 @@ void Play_Init(void) { gLight3Brightness = 0.0f; gWarpZoneBgAlpha = 0.0f; gGroundHeight = 0.0f; - gStarWarpDistortion = gStarfieldX = gStarfieldY = gStarfieldRoll = D_ctx_8017842C = D_ctx_80178430 = 0.0f; + gStarWarpDistortion = gStarfieldX = gStarfieldY = gStarfieldRoll = gStarfieldScrollX = gStarfieldScrollY = 0.0f; if ((gLevelType == LEVELTYPE_SPACE) || (gCurrentLevel == LEVEL_TRAINING)) { Play_SetupStarfield(); if (gCurrentLevel != LEVEL_TRAINING) { - D_ctx_80177A98 = 0; + gDrawGround = false; } } else { gStarCount = 0; @@ -3244,7 +3245,7 @@ void Player_UpdatePath(Player* player) { if (gGroundType == 4) { gPathGroundScroll = player->zPathVel; } - if ((gBossActive == 0) && (player->zPath > 500000.0f)) { + if (!gBossActive && (player->zPath > 500000.0f)) { player->zPath = 0.0f; player->pos.z = 0.0f; gObjectLoadIndex = 0; @@ -3276,10 +3277,10 @@ void Player_UpdatePath(Player* player) { gPathVelX = Math_SmoothStepToF(&player->xPath, player->xPathTarget, 0.1f, player->pathStep, 0.0001f); gPathVelY = Math_SmoothStepToF(&player->yPath, player->yPathTarget, 0.1f, player->pathStep, 0.0001f); } - if (player->timer_210 != 0) { - player->timer_210--; - Math_SmoothStepToF(&player->yRot_114, player->yRot_118, 0.03f, 0.5f, 0.0001f); - Math_SmoothStepToF(&player->xRot_120, player->xRot_124, 0.03f, 0.5f, 0.0001f); + if (player->pathChangeTimer != 0) { + player->pathChangeTimer--; + Math_SmoothStepToF(&player->yRot_114, player->pathChangeYaw, 0.03f, 0.5f, 0.0001f); + Math_SmoothStepToF(&player->xRot_120, player->pathChangePitch, 0.03f, 0.5f, 0.0001f); } else { Math_SmoothStepToF(&player->yRot_114, 0.0f, 0.03f, 0.5f, 0.0001f); Math_SmoothStepToF(&player->xRot_120, 0.0f, 0.03f, 0.5f, 0.0001f); @@ -3328,7 +3329,7 @@ void Player_CheckBounds360(Player* player) { var_fv1 = 10000.0f; } else if (gCurrentLevel == LEVEL_SECTOR_Z) { var_fv1 = 20000.0f; - } else if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (D_ctx_80177AB0 >= 4)) { + } else if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gDrawBackdrop >= 4)) { var_fv1 = 100000.0f; } if ((var_fv1 < fabsf(player->pos.x)) || (var_fv1 < fabsf(player->pos.z))) { @@ -3341,7 +3342,7 @@ void Player_CheckBounds360(Player* player) { } } -void Player_ArwingMove360(Player* player) { +void Player_MoveArwing360(Player* player) { f32 sp7C; f32 sp78; f32 scale; @@ -3507,8 +3508,8 @@ void Player_PerformLoop(Player* player) { player->unk_018 = 0.05f; player->unk_014 = 0.05f; } else { - player->cockpitView = player->savedCockpitView; - if (player->cockpitView) { + player->alternateView = player->savedAlternateView; + if (player->alternateView) { player->unk_014 = 0.0f; } } @@ -3538,7 +3539,7 @@ void Player_PerformLoop(Player* player) { Player_DamageEffects(player); } -void Player_ArwingMoveOnRails(Player* player) { +void Player_MoveArwingOnRails(Player* player) { f32 stickX; f32 stickY; f32 var_fa0; @@ -3567,7 +3568,7 @@ void Player_ArwingMoveOnRails(Player* player) { Math_SmoothStepToAngle(&player->aerobaticPitch, 0.0f, 0.1f, 5.0f, 0.01f); - if (player->cockpitView) { + if (player->alternateView) { Matrix_RotateZ(gCalcMatrix, player->zRotBank * M_DTOR, MTXF_NEW); sp68.z = 0.0f; @@ -3736,7 +3737,7 @@ void Player_ArwingMoveOnRails(Player* player) { Player_WingEffects(player); } -void Player_TankMove360(Player* player) { +void Player_MoveTank360(Player* player) { f32 sp5C; f32 var_fa0; f32 var_fa1; @@ -3880,7 +3881,7 @@ void Player_OnFootUpdateSpeed(Player* player) { Math_SmoothStepToF(&player->unk_008, sp28, 0.1f, sp24, 0.00001f); } -void Player_OnFootMove(Player* player) { +void Player_MoveOnFoot(Player* player) { Vec3f sp78[30]; f32 sp74; f32 sp70; @@ -4181,7 +4182,7 @@ void Player_Setup(Player* playerx) { if (gCurrentLevel != LEVEL_CORNERIA) { gSavedGroundSurface = SURFACE_GRASS; } - gGoldRingCount[0] = D_ctx_80161A94[0]; + gGoldRingCount[0] = gSavedGoldRingCount[0]; do { if (gGoldRingCount[0] > 3) { gGoldRingCount[0] -= 3; @@ -4231,7 +4232,7 @@ void Player_Setup(Player* playerx) { player->cam.eye.y = (player->pos.y * player->unk_148) + 10.0f; player->cam.eye.x = player->pos.x * player->unk_148; - gPlayerCamAt.x = gPlayerCamAt.y = gPlayerCamAt.z = gPlayerCamEye.x = gPlayerCamEye.y = gPlayerCamEye.z = 0.0f; + gPlayCamAt.x = gPlayCamAt.y = gPlayCamAt.z = gPlayCamEye.x = gPlayCamEye.y = gPlayCamEye.z = 0.0f; if (gVersusMode) { gLaserStrength[gPlayerNum] = LASERS_SINGLE; @@ -4337,7 +4338,7 @@ void Player_Setup(Player* playerx) { } if (gCurrentLevel == LEVEL_BOLSE) { - D_ctx_80177A98 = 1; + gDrawGround = true; } if ((gCurrentLevel == LEVEL_MACBETH) && (gSavedObjectLoadIndex == 0)) { @@ -4407,7 +4408,7 @@ void Player_Setup(Player* playerx) { gStarWolfTeamAlive[j] = gSavedStarWolfTeamAlive[j] = 1; } gLaserStrength[gPlayerNum] = LASERS_SINGLE; - gGoldRingCount[0] = D_ctx_80161A94[0] = gTotalHits = 0; + gGoldRingCount[0] = gSavedGoldRingCount[0] = gTotalHits = 0; gLifeCount[gPlayerNum] = 2; gBombCount[gPlayerNum] = 3; gGreatFoxIntact = true; @@ -4623,7 +4624,7 @@ void Player_ArwingBoost(Player* player) { if (gLoopBoostTimers[gPlayerNum] != 0) { gLoopBoostTimers[gPlayerNum]--; } - if (!player->somersault && (D_ctx_80177AB0 < 5)) { + if (!player->somersault && (gDrawBackdrop < 5)) { if (var >= -50) { gLoopDownTimers[gPlayerNum] = 5; } @@ -4631,8 +4632,8 @@ void Player_ArwingBoost(Player* player) { (gLoopBoostTimers[gPlayerNum] != 0)) { player->somersault = true; if (gLevelMode == LEVELMODE_ON_RAILS) { - player->savedCockpitView = player->cockpitView; - player->cockpitView = false; + player->savedAlternateView = player->alternateView; + player->alternateView = false; } player->unk_014 = player->unk_018 = 0.0f; if (player->aerobaticPitch > 340.0f) { @@ -4752,7 +4753,7 @@ void Player_ArwingBrake(Player* player) { if (var >= -50) { gUturnDownTimers[gPlayerNum] = 5; } - if ((gUturnDownTimers[gPlayerNum] > 0) && (gUturnDownTimers[gPlayerNum] < 5) && (D_ctx_80177AB0 < 5) && + if ((gUturnDownTimers[gPlayerNum] > 0) && (gUturnDownTimers[gPlayerNum] < 5) && (gDrawBackdrop < 5) && (gUturnBrakeTimers[gPlayerNum] != 0)) { gUturnDownTimers[gPlayerNum] = 0; gUturnBrakeTimers[gPlayerNum] = 0; @@ -5011,9 +5012,9 @@ void Player_UpdateEffects(Player* player) { if (player->timer_278 != 0) { if ((player->timer_278 % 8) == 0) { if (player->timer_278 & 8) { - D_ctx_80177DB8[gPlayerNum]++; + gVsPoints[gPlayerNum]++; } else { - D_ctx_80177DB8[gPlayerNum]--; + gVsPoints[gPlayerNum]--; } } player->timer_278--; @@ -5147,7 +5148,7 @@ void Player_UpdateOnRails(Player* player) { if (player->somersault) { Player_PerformLoop(player); } else { - Player_ArwingMoveOnRails(player); + Player_MoveArwingOnRails(player); } Player_UpdatePath(player); Player_Shoot(player); @@ -5161,7 +5162,7 @@ void Player_UpdateOnRails(Player* player) { player->vel.x *= 0.2f; player->vel.y = 5.0f; player->rot.x = player->rot.y = 0.0f; - player->cockpitView = 0; + player->alternateView = false; player->csTimer = 20; if (gLevelType == LEVELTYPE_SPACE) { player->csTimer = 40; @@ -5200,7 +5201,7 @@ void Player_Update360(Player* player) { if (player->somersault) { Player_PerformLoop(player); } else { - Player_ArwingMove360(player); + Player_MoveArwing360(player); } Player_Shoot(player); Player_CollisionCheck(player); @@ -5230,7 +5231,7 @@ void Player_Update360(Player* player) { Player_TankBoostBrake(player); Play_dummy_800B41E0(player); Player_UpdateTankRoll(player); - Player_TankMove360(player); + Player_MoveTank360(player); Player_Shoot(player); Player_CollisionCheck(player); Player_FloorCheck(player); @@ -5244,7 +5245,7 @@ void Player_Update360(Player* player) { break; case FORM_ON_FOOT: Player_OnFootUpdateSpeed(player); - Player_OnFootMove(player); + Player_MoveOnFoot(player); Player_Shoot(player); Player_CollisionCheck(player); Player_FloorCheck(player); @@ -5326,7 +5327,7 @@ void Player_Update(Player* player) { } if (gControllerRumbleTimers[player->num] != 0) { gControllerRumbleTimers[player->num]--; - if (((gGameFrameCount % 2) == 0)) { + if ((gGameFrameCount % 2) == 0) { *gControllerRumble = 1; } } @@ -5375,9 +5376,9 @@ void Player_Update(Player* player) { Player_LowHealthMsg(player); player->wings.modelId = 0; D_hud_80161704 = 255; - if ((!gVersusMode || (D_ctx_80177E7C != 0)) && !player->somersault && (gInputPress->button & U_CBUTTONS) && + if ((!gVersusMode || (gVsMatchStart != 0)) && !player->somersault && (gInputPress->button & U_CBUTTONS) && ((player->form == FORM_ARWING) || (gVersusMode && (player->form == FORM_LANDMASTER)))) { - if (player->cockpitView = 1 - player->cockpitView) { + if (player->alternateView = 1 - player->alternateView) { AUDIO_PLAY_SFX(NA_SE_VIEW_MOVE_IN, gDefaultSfxSource, 4); } else { AUDIO_PLAY_SFX(NA_SE_VIEW_MOVE_OUT, gDefaultSfxSource, 4); @@ -5397,7 +5398,7 @@ void Player_Update(Player* player) { if (!gVersusMode) { Player_Update360(player); player->unk_234 = 1; - } else if (D_ctx_80177E7C != 0) { + } else if (gVsMatchStart != 0) { if (gPlayerInactive[player->num] == true) { do { sp1C4 = RAND_INT(3.9f); @@ -5407,8 +5408,8 @@ void Player_Update(Player* player) { player->csState = 0; Camera_FollowPlayer(player, player->attacker - 1, 1); } else { - if (D_ctx_80177E7C == 1) { - D_ctx_80177E7C += 1; + if (gVsMatchStart == 1) { + gVsMatchStart++; for (i = 0; i < 4; i++) { Player_PlaySfx(gPlayer[i].sfxSource, NA_SE_ARWING_BOOST, gPlayer[i].num); gPlayer[i].unk_190 = gPlayer[i].unk_194 = 5.0f; @@ -5453,7 +5454,7 @@ void Player_Update(Player* player) { } break; case PLAYERSTATE_1C8_LEVEL_COMPLETE: - player->cockpitView = false; + player->alternateView = false; gPauseEnabled = false; Player_UpdateShields(player); Cutscene_LevelComplete(player); @@ -5471,7 +5472,7 @@ void Player_Update(Player* player) { Player_UpdateShields(player); Cutscene_AllRangeMode(player); Player_UpdateArwingRoll(player); - gChargeTimers[player->num] = player->cockpitView = gShowHud = 0; + gChargeTimers[player->num] = player->alternateView = gShowHud = 0; break; case PLAYERSTATE_1C8_GFOX_REPAIR: gPauseEnabled = 0; @@ -5488,7 +5489,7 @@ void Player_Update(Player* player) { player->unk_234 = 0; if (gPlayerInactive[player->num] == true) { Camera_FollowPlayer(player, player->attacker - 1, 0); - } else if ((D_ctx_80177E74 == 0) && (player->csState != 0)) { + } else if ((gVsMatchOver == 0) && (player->csState != 0)) { player->csState = 0; Player_Initialize(player); Player_Setup(player); @@ -5534,7 +5535,7 @@ void Player_Update(Player* player) { gShowAllRangeCountdown = gRadioState = 0; Audio_ClearVoice(); Audio_SetEnvSfxReverb(0); - D_ctx_80161A94[0] = gGoldRingCount[0]; + gSavedGoldRingCount[0] = gGoldRingCount[0]; if (gCurrentLevel == LEVEL_VENOM_ANDROSS) { D_ctx_80177C94 = gGoldRingCount[0]; } @@ -5545,7 +5546,7 @@ void Player_Update(Player* player) { gNextGameStateTimer = 2; gOptionMenuStatus = OPTION_WAIT; gDrawMode = DRAW_NONE; - D_game_80161A34 = 7; + gLastGameState = GSTATE_PLAY; gStarCount = 0; } else { if ((gCurrentLevel == LEVEL_SECTOR_X) || (gCurrentLevel == LEVEL_METEO)) { @@ -5553,7 +5554,7 @@ void Player_Update(Player* player) { } if (gLifeCount[gPlayerNum] < 0) { gNextGameState = GSTATE_GAME_OVER; - D_ctx_80161A94[0] = 0; + gSavedGoldRingCount[0] = 0; } else { gPlayState = PLAY_INIT; } @@ -5565,7 +5566,7 @@ void Player_Update(Player* player) { break; case 4: gNextGameState = GSTATE_MAP; - D_game_80161A34 = 7; + gLastGameState = GSTATE_PLAY; gDrawMode = DRAW_NONE; break; default: @@ -5639,19 +5640,19 @@ void Camera_UpdateArwingOnRails(Player* player) { gCsCamAtY = ((player->pos.y - player->yPath) * player->unk_14C) + 20.0f; gCsCamAtY += player->xRock * 5.0f; gCsCamAtY -= player->unk_02C * 0.25f; - switch (D_800D2F54) { + switch (sOverheadCam) { case 0: - Math_SmoothStepToF(&D_800D2F58, 0.0f, 0.4f, 10.0f, 0); + Math_SmoothStepToF(&sOverheadCamDist, 0.0f, 0.4f, 10.0f, 0); break; case 1: - Math_SmoothStepToF(&D_800D2F58, 200.0f, 0.4f, 10.0f, 0); + Math_SmoothStepToF(&sOverheadCamDist, 200.0f, 0.4f, 10.0f, 0); break; } gCsCamEyeX += player->xPath; gCsCamAtX += player->xPath; - gCsCamEyeY += player->yPath + D_800D2F58; - gCsCamAtZ = (player->trueZpos + gPathProgress) - 1.0f; - gCsCamEyeZ = 400.0f + D_800D2F58; + gCsCamEyeY += player->yPath + sOverheadCamDist; + gCsCamAtZ = player->trueZpos + gPathProgress - 1.0f; + gCsCamEyeZ = 400.0f + sOverheadCamDist; if (D_ctx_80177C70 == 2) { gCsCamEyeZ -= 50.0f; } @@ -5664,7 +5665,7 @@ void Camera_UpdateArwingOnRails(Player* player) { Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, 0.2f, 20.0f, 0.0f); Math_SmoothStepToF(&player->unk_018, 1.0f, 1.0f, 0.05f, 0.0f); } - gCsCamAtY += player->yPath + (D_800D2F58 * 0.5f); + gCsCamAtY += player->yPath + (sOverheadCamDist * 0.5f); Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, player->unk_014, 1000.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, player->unk_018, 1000.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, player->unk_014, 1000.0f, 0.0f); @@ -5801,7 +5802,7 @@ void Camera_UpdateArwing360(Player* player, s32 arg1) { Matrix_RotateX(gCalcMatrix, player->damageShake * 0.2f * M_DTOR, MTXF_APPLY); sp74.x = 0.0f; sp74.y = 0.0f; - if (player->cockpitView) { + if (player->alternateView) { sp74.z = 1000.0f - player->camDist; } else { sp74.z = 300.0f - player->camDist; @@ -5873,7 +5874,7 @@ void Camera_UpdateTank360(Player* player, s32 arg1) { Matrix_RotateY(gCalcMatrix, (player->yRot_114 + (player->damageShake * 0.2f)) * M_DTOR, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, player->damageShake * 0.2f * M_DTOR, MTXF_APPLY); sp54.x = 0.0f; - if (player->cockpitView) { + if (player->alternateView) { sp54.y = 150.0f; sp54.z = 500.0f - player->camDist; } else { @@ -5881,7 +5882,7 @@ void Camera_UpdateTank360(Player* player, s32 arg1) { sp54.z = 250.0f - player->camDist; } Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48); - if (player->cockpitView) { + if (player->alternateView) { Math_SmoothStepToF(&player->unk_02C, -player->unk_17C * 3.0f + 30.0f, 0.2f, 8.0f, 0.001f); } else { Math_SmoothStepToF(&player->unk_02C, -player->unk_17C * 3.0f, 0.2f, 8.0f, 0.001f); @@ -5979,8 +5980,8 @@ void Camera_SetStarfieldPos(f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 if (gCurrentLevel == LEVEL_UNK_15) { tempf = gPlayer[0].cam.eye.y * 0.03f; } - 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; + sp30 = (-pitch * (-8.0f / 3.0f * M_RTOD) * 2.0f) + 3000.0f + gStarfieldScrollY + tempf; + sp34 = (yaw * (-8.0f / 3.0f * M_RTOD) * 2.0f) + 3000.0f + gStarfieldScrollX; sp20 = gStarfieldX; gStarfieldX = Math_ModF(sp34, SCREEN_WIDTH * 1.5f); gStarfieldY = Math_ModF(sp30, SCREEN_HEIGHT * 1.5f); @@ -6015,7 +6016,7 @@ void Camera_Update(Player* player) { switch (gLevelMode) { case LEVELMODE_ON_RAILS: if (player->form == FORM_ARWING) { - if (!player->cockpitView) { + if (!player->alternateView) { Camera_UpdateArwingOnRails(player); } else { Camera_UpdateCockpitOnRails(player, 0); @@ -6064,7 +6065,7 @@ void Camera_SetupLights(Player* player) { if ((gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) { gEnvLightyRot = gLight1yRotTarget = gLight1yRotTarget = gLight2yRotTarget = gLight1yRotTarget = 110.0f; - if (gGameFrameCount & 0x20) { + if ((gGameFrameCount & 0x20) != 0) { gEnvLightyRot = gLight1yRotTarget = gLight1yRotTarget = gLight2yRotTarget = gLight1yRotTarget = 90.0f; } gLight1rotStep = gLight2rotStep = D_ctx_80178538 = 1.0f; @@ -6368,7 +6369,7 @@ void Play_SpawnVsItem(ObjectId objId, Item* item) { u8 spawnIndex = (u8) RAND_FLOAT(5.0f); if (sVsItemSpawnIndex == spawnIndex) { - gVsItemSpawnTimer -= 1; + gVsItemSpawnTimer--; } else { sVsItemSpawnIndex = spawnIndex; if (item->obj.status == OBJ_FREE) { @@ -6458,7 +6459,7 @@ void Play_Main(void) { Play_Update(); if ((gControllerPress[gMainController].button & START_BUTTON) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && - gSaveFile.save.data.planet[D_800D2F6C[gCurrentLevel]].normalClear) { + gSaveFile.save.data.planet[sSaveSlotFromLevel[gCurrentLevel]].normalClear) { Audio_ClearVoice(); Audio_SetEnvSfxReverb(0); Play_ClearObjectData(); diff --git a/src/engine/fox_tank.c b/src/engine/fox_tank.c index 7a27a145..3310efc8 100644 --- a/src/engine/fox_tank.c +++ b/src/engine/fox_tank.c @@ -487,7 +487,7 @@ void func_tank_80044868(Player* player) { } if (player->baseSpeed > 0.0f) { Texture_Scroll(D_landmaster_3002E80, 32, 32, 0); - if ((gCurrentLevel == LEVEL_TITANIA) && (gBossActive == 0)) { + if ((gCurrentLevel == LEVEL_TITANIA) && !gBossActive) { func_tank_80043280(D_landmaster_3005EA8, D_TI_6009BB8, gGameFrameCount * -55.0f); } if ((gCurrentLevel == LEVEL_MACBETH) && (player->state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { @@ -496,7 +496,7 @@ void func_tank_80044868(Player* player) { } if (player->baseSpeed > 10.0f) { Texture_Scroll(D_landmaster_3002E80, 32, 32, 0); - if ((gCurrentLevel == LEVEL_TITANIA) && (gBossActive == 0)) { + if ((gCurrentLevel == LEVEL_TITANIA) && !gBossActive) { func_tank_80043280(D_landmaster_3005EA8, D_TI_6009BB8, gGameFrameCount * -55.0f); } } @@ -1399,7 +1399,7 @@ void func_tank_800481F4(Player* player) { temp_v0 = Player_CheckHitboxCollision(player, actor->info.hitbox, &sp98, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, actor->obj.rot.x, actor->obj.rot.y, actor->obj.rot.z, actor->vwork[29].x, - actor->vwork[29].y, actor->vwork[29].z + actor->unk_0F4.z); + actor->vwork[29].y, actor->vwork[29].z + actor->rot_0F4.z); if (temp_v0 != 0) { Player_ApplyDamage(player, temp_v0, actor->info.damage); actor->dmgType = DMG_COLLISION; @@ -1487,11 +1487,11 @@ void func_tank_800481F4(Player* player) { if (temp_v0 != 0) { if ((sprite->obj.id == OBJ_SPRITE_FO_POLE) || (sprite->obj.id == OBJ_SPRITE_CO_POLE) || (sprite->obj.id == OBJ_SPRITE_CO_TREE)) { - sprite->unk_46 = 1; + sprite->destroy = 1; player->hitTimer = 6; player->unk_21C = 0; } else if (sprite->obj.id == OBJ_SPRITE_TI_CACTUS) { - sprite->unk_46 = 1; + sprite->destroy = 1; } else { Player_ApplyDamage(player, temp_v0, sprite->info.damage); } diff --git a/src/engine/fox_versus.c b/src/engine/fox_versus.c index 4d8f1d5e..c7cb3406 100644 --- a/src/engine/fox_versus.c +++ b/src/engine/fox_versus.c @@ -326,9 +326,9 @@ void func_versus_800BDE44(void) { D_80178810[i] += 4; if (D_80178810[i] > 15) { if (gPlayerScores[i] > D_80178808[i]) { - D_80178808[i] += 1; + D_80178808[i] += 1; // can't be ++ } else { - D_80178808[i] -= 1; + D_80178808[i] -= 1; // can't be -- } if (gPlayerScores[i] != D_80178808[i]) { @@ -568,13 +568,13 @@ s32 func_versus_800BEDDC(void) { continue; } - if (!D_80178780[i]) { + if (D_80178780[i] == 0) { func_versus_800BE924(i); } else { func_versus_800BECA8(i); } - if (D_80178780[i]) { + if (D_80178780[i] != 0) { var_s4++; if (var_s4 == D_801787B4) { func_versus_800BED78(); @@ -646,7 +646,7 @@ s32 func_versus_800BF17C(void) { continue; } - if ((gPlayerInactive[i]) || (gVsMatchType == 1) || ((D_801787B4 == 1) && (gVsMatchType != 2)) || + if (gPlayerInactive[i] || (gVsMatchType == 1) || ((D_801787B4 == 1) && (gVsMatchType != 2)) || ((gVsMatchType == 2) && (D_versus_80178768[0] == 0) && (D_versus_80178768[1] == 0) && (D_versus_80178768[2] == 0))) { ret = Math_SmoothStepToF(&D_801787D8[i], D_801787E8[i], 0.3f, 100.0f, 1.0f); @@ -670,8 +670,8 @@ s32 func_versus_800BF17C(void) { } } - if (D_801787F8[i]) { - D_801787F8[i] -= 1; + if (D_801787F8[i] != 0) { + D_801787F8[i]--; } if (sUnlockLandmaster && (D_80178780[i] == 0) && (gControllerPress[i].button & B_BUTTON)) { @@ -791,21 +791,21 @@ s32 Versus_CheckForWinner(void) { gVsWinner = i; } if (gPlayer[i].state_1C8 == PLAYERSTATE_1C8_VS_STANDBY) { - var_a3 += 1; + var_a3++; } } if ((D_801787B4 == 1) && (var_a3 == 4)) { - D_ctx_80177E74 = 1; + gVsMatchOver = 1; gVsWinner = 99; break; } for (i = 0; i < 4; i++) { - if (D_ctx_80177DB8[i] == gVsPointsToWin) { + if (gVsPoints[i] == gVsPointsToWin) { break; } - if (D_ctx_80177DB8[i] == (gVsPointsToWin - 1)) { + if (gVsPoints[i] == (gVsPointsToWin - 1)) { sStartVsHurryBgm = 1; } } @@ -814,7 +814,7 @@ s32 Versus_CheckForWinner(void) { return 0; } - if (gPlayer[i].timer_278) { + if (gPlayer[i].timer_278 != 0) { return 0; } @@ -827,7 +827,7 @@ s32 Versus_CheckForWinner(void) { } gPlayer[j].state_1C8 = PLAYERSTATE_1C8_VS_STANDBY; } - D_ctx_80177E74 = 1; + gVsMatchOver = 1; gVsWinner = i; break; @@ -838,11 +838,11 @@ s32 Versus_CheckForWinner(void) { gVsWinner = i; } if (gPlayer[i].state_1C8 == PLAYERSTATE_1C8_VS_STANDBY) { - var_a3 += 1; + var_a3++; } } if ((D_801787B4 == 1) && (var_a3 == 4)) { - D_ctx_80177E74 = 1; + gVsMatchOver = 1; gVsWinner = 99; break; } @@ -868,7 +868,7 @@ s32 Versus_CheckForWinner(void) { } gPlayer[j].state_1C8 = PLAYERSTATE_1C8_VS_STANDBY; } - D_ctx_80177E74 = 1; + gVsMatchOver = 1; break; case 2: @@ -881,7 +881,7 @@ s32 Versus_CheckForWinner(void) { if ((gPlayer[i].state_1C8 == PLAYERSTATE_1C8_DOWN) || (gPlayer[i].state_1C8 == PLAYERSTATE_1C8_VS_STANDBY)) { gPlayerScores[i] = D_80178838[i] = D_80178808[i] = D_80178810[i] = 0; - D_80178820[i] += 1; + D_80178820[i]++; } } } @@ -994,7 +994,7 @@ s32 Versus_CheckForWinner(void) { gPlayer[j].state_1C8 = PLAYERSTATE_1C8_VS_STANDBY; } - D_ctx_80177E74 = 1; + gVsMatchOver = 1; break; default: @@ -1064,7 +1064,7 @@ s32 func_versus_800C04DC(f32 xPos, f32 scale, s32 arg2) { f32 x; f32 y; - if ((gVsMatchType == 2) && (D_800D4A98 & 0x20) && (gVsWinner != 99)) { + if ((gVsMatchType == 2) && ((D_800D4A98 & 0x20) != 0) && (gVsWinner != 99)) { x = 118.0f; y = 110.0f; @@ -1113,7 +1113,7 @@ s32 func_versus_800C07C4(void) { } } - if (stick_y) { + if (stick_y != 0) { if (stick_y > 0) { stick_y = -1; } else { @@ -1313,7 +1313,7 @@ bool func_versus_800C107C(s32 playerNum) { D_80178798 = 0; } - if (D_801787B8 < D_ctx_80177DB8[playerNum]) { + if (D_801787B8 < gVsPoints[playerNum]) { return false; } else { return true; @@ -1331,7 +1331,7 @@ s32 func_versus_800C1138(s32 max, s32 arg1) { for (i = 0; i < max; i++) { RCP_SetupDL(&gMasterDisp, 0x4D); - j = D_ctx_80177DD0[arg1][i]; + j = gVsKills[arg1][i]; gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, D_800D4CD8[j], D_800D4CE8[j], D_800D4CF8[j], 0); func_versus_800BD720(D_800D4CB8[arg1] + (i * 9.0f), D_800D4CC8[arg1]); @@ -1356,7 +1356,7 @@ void func_versus_800C1368(void) { D_801787D0 = 0.0f; D_801787AC = 255.0f; D_801787B0 = 0.0f; - D_game_80161A10 = 0.5f; + gNextVsViewScale = 0.5f; D_80178778 = 0; D_80178790 = 4; D_80178794 = 1; @@ -1413,8 +1413,8 @@ void func_versus_800C1368(void) { bool func_versus_800C15D8(void) { bool ret = false; - if (D_game_80161A10 >= 1.5f) { - D_game_80161A10 = 1.5f; + if (gNextVsViewScale >= 1.5f) { + gNextVsViewScale = 1.5f; switch (gVersusStage) { case VS_STAGE_CORNERIA: gBgColor = 0x8FBD; // 136, 240, 240 @@ -1434,7 +1434,7 @@ bool func_versus_800C15D8(void) { } ret = true; } else { - D_game_80161A10 += 0.05f; + gNextVsViewScale += 0.05f; gBgColor = 0; } @@ -1466,7 +1466,7 @@ void func_versus_800C1700(void) { gGameState = GSTATE_MENU; gNextGameStateTimer = 2; gOptionMenuStatus = OPTION_WAIT; - D_game_800D2870 = 1; + D_game_800D2870 = true; gBgColor = 0; } @@ -1520,7 +1520,7 @@ bool Versus_Update(void) { break; } if (ret == 1) { - D_ctx_80177E7C = 1; + gVsMatchStart = 1; } if (func_versus_800C16A0(30)) { gVsMatchState = 4; @@ -1765,7 +1765,7 @@ void Versus_Draw(void) { break; } case 4: - if ((gVsMatchType != 2) || (!(D_800D4A98 & 0x20))) { + if ((gVsMatchType != 2) || ((D_800D4A98 & 0x20) == 0)) { if (gVsWinner < 4) { func_versus_800C075C(); } @@ -1800,7 +1800,7 @@ void Versus_Draw(void) { if (var_a1 >= 121) { var_a1 = 121; } - func_fade_80084688(2, var_a1); + Wipe_Draw(WIPE_VERTICAL, var_a1); } void Versus_StartMatch(void) { @@ -1919,12 +1919,12 @@ void func_versus_800C2244(Actor* actor) { } else if (actor->obj.pos.y < gGroundHeight + 50.0f) { if (x3 > 180.0f) { x3 = 0.0f; - actor->unk_0F4.x = 0.0f; + actor->rot_0F4.x = 0.0f; } } - Math_SmoothStepToAngle(&actor->unk_0F4.x, x3, 0.5f, 1.0f, 0.0001f); - y3 = Math_SmoothStepToAngle(&actor->unk_0F4.y, actor->fwork[19], 0.5f, 1.0f, 0.0001f) * 30.0f; + Math_SmoothStepToAngle(&actor->rot_0F4.x, x3, 0.5f, 1.0f, 0.0001f); + y3 = Math_SmoothStepToAngle(&actor->rot_0F4.y, actor->fwork[19], 0.5f, 1.0f, 0.0001f) * 30.0f; if (y3 < 0.0f) { y3 *= -1.0f; @@ -1935,8 +1935,8 @@ void func_versus_800C2244(Actor* actor) { Math_SmoothStepToAngle(&actor->obj.rot.z, y3, 0.1f, 3.0f, 0.01f); } - actor->obj.rot.x = -actor->unk_0F4.x; - actor->obj.rot.y = actor->unk_0F4.y; + actor->obj.rot.x = -actor->rot_0F4.x; + actor->obj.rot.y = actor->rot_0F4.y; vec.z = +cosX * 38.0f; vec.y = -sinX * 38.0f; @@ -1970,7 +1970,7 @@ void func_versus_800C26C8(void) { Vec3f dest; Actor* actor; - if ((gVsMatchType != 2) || (D_ctx_80177E7C == 0)) { + if ((gVsMatchType != 2) || (gVsMatchStart == 0)) { return; } diff --git a/src/mods/object_ram.c b/src/mods/object_ram.c index 4fa55fe3..653d103d 100644 --- a/src/mods/object_ram.c +++ b/src/mods/object_ram.c @@ -382,10 +382,10 @@ void ObjectRam_Update(void) { if (oRamEntries[selectNum].objPtr->status != OBJ_FREE) { gTexturedLines[99].timer = 15; } - gTexturedLines[99].red = 255; - gTexturedLines[99].green = (editing) ? 128 : 255; - gTexturedLines[99].blue = 0; - gTexturedLines[99].alpha = 255; + gTexturedLines[99].prim.r = 255; + gTexturedLines[99].prim.g = (editing) ? 128 : 255; + gTexturedLines[99].prim.b = 0; + gTexturedLines[99].prim.a = 255; gTexturedLines[99].posBB.x = oRamEntries[selectNum].objPtr->pos.x; gTexturedLines[99].posBB.y = oRamEntries[selectNum].objPtr->pos.y; gTexturedLines[99].posBB.z = oRamEntries[selectNum].objPtr->pos.z; diff --git a/src/overlays/ovl_ending/fox_end1.c b/src/overlays/ovl_ending/fox_end1.c index c3d43b09..2f079891 100644 --- a/src/overlays/ovl_ending/fox_end1.c +++ b/src/overlays/ovl_ending/fox_end1.c @@ -17,19 +17,17 @@ bool Ending_8018BCB0(void); void Ending_8018C21C(void); typedef struct { - Animation* anim; - Limb** skeleton; - s16 setupDL; - Vec3f pos; - Vec3f rot; - Vec3f scale; - f32 unk_30; - s32 unk_34; - s32 unk_38; - struct { - u8 r, g, b, a; - } prim; -} UnkStruct_196D08; + /* 0x00 */ Animation* anim; + /* 0x04 */ Limb** skeleton; + /* 0x08 */ s16 setupDL; + /* 0x0C */ Vec3f pos; + /* 0x18 */ Vec3f rot; + /* 0x24 */ Vec3f scale; + /* 0x30 */ f32 unk_30; + /* 0x34 */ s32 unk_34; + /* 0x38 */ s32 unk_38; + /* 0x3C */ Color_RGBA32 prim; +} UnkStruct_196D08; // size = 0x40 s32 D_ending_80196D00; s32 D_ending_80196D04; @@ -313,7 +311,7 @@ void Ending_80188030(s32 arg0) { D_ending_80196D08[i].pos.z -= sp2C; D_ending_80196D08[i].pos.y += sp30; if ((arg0 != 1) || (gCsFrameCount < 394)) { - D_ending_80196D08[i].unk_34 += 1; + D_ending_80196D08[i].unk_34++; } } @@ -611,9 +609,9 @@ void Ending_80189108(void) { Animation_GetFrameCount(D_ending_80196D08[4].anim); if (((gCsFrameCount >= 30) && (gCsFrameCount < 41)) || ((gCsFrameCount >= 60) && (gCsFrameCount < 111))) { - D_ending_80196D08[4].unk_34 += 1; + D_ending_80196D08[4].unk_34++; } else if (temp_a0 != 0) { - D_ending_80196D08[4].unk_34 += 1; + D_ending_80196D08[4].unk_34++; } break; @@ -645,9 +643,9 @@ void Ending_80189108(void) { Animation_GetFrameCount(D_ending_80196D08[4].anim); if ((gCsFrameCount >= 20) && (gCsFrameCount < 51)) { - D_ending_80196D08[4].unk_34 += 1; + D_ending_80196D08[4].unk_34++; } else if (temp_a0 != 0) { - D_ending_80196D08[4].unk_34 += 1; + D_ending_80196D08[4].unk_34++; } break; } @@ -1397,9 +1395,9 @@ void Ending_8018B3E8(Actor* actor, s32 arg1) { actor->obj.status = OBJ_ACTIVE; actor->obj.id = 0; actor->state = arg1; - actor->unk_0F4.x = sp20[arg1].x; - actor->unk_0F4.y = sp20[arg1].y; - actor->unk_0F4.z = sp20[arg1].z; + actor->rot_0F4.x = sp20[arg1].x; + actor->rot_0F4.y = sp20[arg1].y; + actor->rot_0F4.z = sp20[arg1].z; actor->obj.pos = sp38[arg1]; if (arg1 == 0) { @@ -1426,9 +1424,9 @@ void Ending_8018B52C(Actor* actor, s32 arg1) { actor->obj.status = OBJ_ACTIVE; actor->obj.id = 1; actor->obj.pos = sp44[arg1]; - actor->unk_0F4.x = sp20[arg1].x; - actor->unk_0F4.y = sp20[arg1].y; - actor->unk_0F4.z = sp20[arg1].z; + actor->rot_0F4.x = sp20[arg1].x; + actor->rot_0F4.y = sp20[arg1].y; + actor->rot_0F4.z = sp20[arg1].z; actor->scale = 1.0f; } @@ -1440,9 +1438,9 @@ void Ending_8018B624(Actor* actor) { actor->obj.status = 2; actor->obj.id = 2; actor->obj.pos = sp24; - actor->unk_0F4.x = sp18.x; - actor->unk_0F4.y = sp18.y; - actor->unk_0F4.z = sp18.z; + actor->rot_0F4.x = sp18.x; + actor->rot_0F4.y = sp18.y; + actor->rot_0F4.z = sp18.z; actor->scale = 1.0f; } @@ -1461,9 +1459,9 @@ void Ending_8018B6D8(Actor* actor, s32 arg1) { actor->obj.status = OBJ_ACTIVE; actor->obj.id = 3; actor->obj.pos = sp80[arg1]; - actor->unk_0F4.x = sp38[arg1].x; - actor->unk_0F4.y = sp38[arg1].y; - actor->unk_0F4.z = sp38[arg1].z; + actor->rot_0F4.x = sp38[arg1].x; + actor->rot_0F4.y = sp38[arg1].y; + actor->rot_0F4.z = sp38[arg1].z; actor->obj.pos.x += 3200.0f; actor->obj.pos.z -= 200.0f; actor->scale = 1.0f; @@ -1647,8 +1645,8 @@ bool Ending_8018BCB0(void) { break; } - Matrix_RotateY(gCalcMatrix, (gActors[i].unk_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(gActors[i].unk_0F4.x * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (gActors[i].rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(gActors[i].rot_0F4.x * M_DTOR), MTXF_APPLY); sp78.x = 0.0f; sp78.y = 0.0f; @@ -1662,9 +1660,9 @@ bool Ending_8018BCB0(void) { if (0) {} // some sort of vec_set macro? - gActors[i].obj.rot.x = -gActors[i].unk_0F4.x; - gActors[i].obj.rot.y = gActors[i].unk_0F4.y + 180.0f; - gActors[i].obj.rot.z = -gActors[i].unk_0F4.z; + gActors[i].obj.rot.x = -gActors[i].rot_0F4.x; + gActors[i].obj.rot.y = gActors[i].rot_0F4.y + 180.0f; + gActors[i].obj.rot.z = -gActors[i].rot_0F4.z; gActors[i].obj.pos.x += gActors[i].vel.x; gActors[i].obj.pos.y += gActors[i].vel.y; diff --git a/src/overlays/ovl_ending/fox_end2.c b/src/overlays/ovl_ending/fox_end2.c index a62c3a35..6c1a24ae 100644 --- a/src/overlays/ovl_ending/fox_end2.c +++ b/src/overlays/ovl_ending/fox_end2.c @@ -77,8 +77,8 @@ void Ending_8018D250(u32 arg0, AssetInfo* asset) { } void Ending_8018D28C(s32 arg0, AssetInfo* asset) { - D_ctx_8017842C += asset->unk_18.x; - D_ctx_80178430 += asset->unk_18.y; + gStarfieldScrollX += asset->unk_18.x; + gStarfieldScrollY += asset->unk_18.y; } void Ending_8018D2C8(u32 arg0, AssetInfo* asset) { @@ -92,9 +92,9 @@ void Ending_8018D2C8(u32 arg0, AssetInfo* asset) { alpha = (asset->unk_0C + asset->unk_10 - arg0 - 1) * 255 / asset->fogFar; } - gFillScreenRed = asset->primRed; - gFillScreenGreen = asset->primGreen; - gFillScreenBlue = asset->primBlue; + gFillScreenRed = asset->prim.r; + gFillScreenGreen = asset->prim.g; + gFillScreenBlue = asset->prim.b; gFillScreenAlpha = gFillScreenAlphaTarget = alpha; gFillScreenAlphaStep = 0; @@ -115,7 +115,7 @@ void Ending_8018D398(u32 arg0, AssetInfo* asset) { gFillScreenAlphaStep = 0; Graphics_FillRectangle(&gMasterDisp, SCREEN_MARGIN, SCREEN_MARGIN, SCREEN_WIDTH - SCREEN_MARGIN, - SCREEN_HEIGHT - SCREEN_MARGIN, asset->primRed, asset->primGreen, asset->primBlue, alpha); + SCREEN_HEIGHT - SCREEN_MARGIN, asset->prim.r, asset->prim.g, asset->prim.b, alpha); } void Ending_8018D4BC(s32 arg0, AssetInfo* asset) { @@ -144,9 +144,9 @@ void Ending_8018D638(u32 arg0, AssetInfo* asset) { alpha = (asset->unk_0C + asset->fogFar - arg0) * 255 / asset->fogFar; } - gFillScreenRed = asset->primRed; - gFillScreenGreen = asset->primGreen; - gFillScreenBlue = asset->primBlue; + gFillScreenRed = asset->prim.r; + gFillScreenGreen = asset->prim.g; + gFillScreenBlue = asset->prim.b; gFillScreenAlpha = gFillScreenAlphaTarget = alpha; gFillScreenAlphaStep = 0; @@ -181,7 +181,7 @@ void Ending_8018D814(u32 arg0, AssetInfo* asset) { RCP_SetupDL(&gMasterDisp, asset->unk_08); - gDPSetPrimColor(gMasterDisp++, 0, 0, asset->primRed, asset->primGreen, asset->primBlue, alpha); + gDPSetPrimColor(gMasterDisp++, 0, 0, asset->prim.r, asset->prim.g, asset->prim.b, alpha); TextureRect_8bIA(&gMasterDisp, sLargeText_1997_1, 16, 15, asset->unk_18.x, asset->unk_18.y, 1.0f, 1.0f); TextureRect_8bIA(&gMasterDisp, sLargeText_1997_9, 16, 15, asset->unk_18.x + 16.0f * 1, asset->unk_18.y, 1.0f, 1.0f); @@ -197,7 +197,7 @@ void Ending_8018DA0C(u32 arg0, AssetInfo* asset) { } RCP_SetupDL(&gMasterDisp, asset->unk_08); - gDPSetPrimColor(gMasterDisp++, 0, 0, asset->primRed, asset->primGreen, asset->primBlue, alpha); + gDPSetPrimColor(gMasterDisp++, 0, 0, asset->prim.r, asset->prim.g, asset->prim.b, alpha); Graphics_DisplaySmallText((s16) asset->unk_18.x, (s16) asset->unk_18.y, asset->unk_30.x, asset->unk_30.y, "TOTAL HITS"); @@ -222,7 +222,7 @@ void Ending_8018DA0C(u32 arg0, AssetInfo* asset) { alpha = 42 * (10 - alpha); break; } - gDPSetPrimColor(gMasterDisp++, 0, 0, asset->primRed, asset->primGreen, asset->primBlue, alpha); + gDPSetPrimColor(gMasterDisp++, 0, 0, asset->prim.r, asset->prim.g, asset->prim.b, alpha); Graphics_DisplaySmallText((s16) (asset->unk_18.x + 7), (s16) (asset->unk_18.y + 31), asset->unk_30.x, asset->unk_30.y, "RANK IN!!"); } @@ -318,9 +318,9 @@ void Ending_8018E1B8(u32 arg0, AssetInfo* asset) { } gSPFogPosition(gMasterDisp++, asset->fogNear, asset->fogFar); - gDPSetFogColor(gMasterDisp++, asset->fogRed, asset->fogGreen, asset->fogBlue, 0); - gDPSetEnvColor(gMasterDisp++, asset->envRed, asset->envGreen, asset->envBlue, asset->envAlpha); - gDPSetPrimColor(gMasterDisp++, 0, 0, asset->primRed, asset->primGreen, asset->primBlue, asset->primAlpha); + gDPSetFogColor(gMasterDisp++, asset->fog.r, asset->fog.g, asset->fog.b, 0); + gDPSetEnvColor(gMasterDisp++, asset->env.r, asset->env.g, asset->env.b, asset->env.a); + gDPSetPrimColor(gMasterDisp++, 0, 0, asset->prim.r, asset->prim.g, asset->prim.b, asset->prim.a); Matrix_Translate(gGfxMatrix, asset->unk_18.x + (arg0 - asset->unk_0C) * asset->unk_3C.x, asset->unk_18.y + (arg0 - asset->unk_0C) * asset->unk_3C.y, @@ -377,9 +377,9 @@ void Ending_8018E7B8(u32 arg0, AssetInfo* asset) { } gSPFogPosition(gMasterDisp++, asset->fogNear, asset->fogFar); - gDPSetFogColor(gMasterDisp++, asset->fogRed, asset->fogGreen, asset->fogBlue, 0); - gDPSetEnvColor(gMasterDisp++, asset->envRed, asset->envGreen, asset->envBlue, asset->envAlpha); - gDPSetPrimColor(gMasterDisp++, 0, 0, asset->primRed, asset->primGreen, asset->primBlue, asset->primAlpha); + gDPSetFogColor(gMasterDisp++, asset->fog.r, asset->fog.g, asset->fog.b, 0); + gDPSetEnvColor(gMasterDisp++, asset->env.r, asset->env.g, asset->env.b, asset->env.a); + gDPSetPrimColor(gMasterDisp++, 0, 0, asset->prim.r, asset->prim.g, asset->prim.b, asset->prim.a); Matrix_Translate(gGfxMatrix, asset->unk_18.x + (arg0 - asset->unk_0C) * asset->unk_3C.x, asset->unk_18.y + (arg0 - asset->unk_0C) * asset->unk_3C.y, @@ -435,8 +435,8 @@ void Ending_8018EDB8(u32 arg0, AssetInfo* asset) { RCP_SetupDL(&gMasterDisp, asset->unk_08); gSPFogPosition(gMasterDisp++, asset->fogNear, asset->fogFar); - gDPSetFogColor(gMasterDisp++, asset->fogRed, asset->fogGreen, asset->fogBlue, 0); - gDPSetPrimColor(gMasterDisp++, 0, 0, asset->primRed, asset->primGreen, asset->primBlue, asset->primAlpha); + gDPSetFogColor(gMasterDisp++, asset->fog.r, asset->fog.g, asset->fog.b, 0); + gDPSetPrimColor(gMasterDisp++, 0, 0, asset->prim.r, asset->prim.g, asset->prim.b, asset->prim.a); Matrix_Translate(gGfxMatrix, asset->unk_18.x + (arg0 - asset->unk_0C) * asset->unk_3C.x, asset->unk_18.y + (arg0 - asset->unk_0C) * asset->unk_3C.y, @@ -471,8 +471,8 @@ void Ending_8018F2A8(u32 arg0, AssetInfo* asset) { RCP_SetupDL(&gMasterDisp, asset->unk_08); gSPFogPosition(gMasterDisp++, asset->fogNear, asset->fogFar); - gDPSetFogColor(gMasterDisp++, asset->fogRed, asset->fogGreen, asset->fogBlue, 0); - gDPSetPrimColor(gMasterDisp++, 0, 0, asset->primRed, asset->primGreen, asset->primBlue, asset->primAlpha); + gDPSetFogColor(gMasterDisp++, asset->fog.r, asset->fog.g, asset->fog.b, 0); + gDPSetPrimColor(gMasterDisp++, 0, 0, asset->prim.r, asset->prim.g, asset->prim.b, asset->prim.a); Matrix_Translate(gGfxMatrix, asset->unk_18.x + (arg0 - asset->unk_0C) * asset->unk_3C.x, asset->unk_18.y + (arg0 - asset->unk_0C) * asset->unk_3C.y, @@ -509,9 +509,9 @@ void Ending_8018F64C(u32 arg0, AssetInfo* asset) { RCP_SetupDL(&gMasterDisp, asset->unk_08); gSPFogPosition(gMasterDisp++, asset->fogNear, asset->fogFar); - gDPSetFogColor(gMasterDisp++, asset->fogRed, asset->fogGreen, asset->fogBlue, 0); - gDPSetEnvColor(gMasterDisp++, asset->envRed, asset->envGreen, asset->envBlue, asset->envAlpha); - gDPSetPrimColor(gMasterDisp++, 0, 0, asset->primRed, asset->primGreen, asset->primBlue, asset->primAlpha); + gDPSetFogColor(gMasterDisp++, asset->fog.r, asset->fog.g, asset->fog.b, 0); + gDPSetEnvColor(gMasterDisp++, asset->env.r, asset->env.g, asset->env.b, asset->env.a); + gDPSetPrimColor(gMasterDisp++, 0, 0, asset->prim.r, asset->prim.g, asset->prim.b, asset->prim.a); Matrix_Translate(gGfxMatrix, asset->unk_18.x + (arg0 - asset->unk_0C) * asset->unk_3C.x, asset->unk_18.y + (arg0 - asset->unk_0C) * asset->unk_3C.y, @@ -576,9 +576,9 @@ void Ending_8018FC60(u32 arg0, AssetInfo* asset) { RCP_SetupDL(&gMasterDisp, asset->unk_08); gSPFogPosition(gMasterDisp++, asset->fogNear, asset->fogFar); - gDPSetFogColor(gMasterDisp++, asset->fogRed, asset->fogGreen, asset->fogBlue, 0); - gDPSetEnvColor(gMasterDisp++, asset->envRed, asset->envGreen, asset->envBlue, asset->envAlpha); - gDPSetPrimColor(gMasterDisp++, 0, 0, asset->primRed, asset->primGreen, asset->primBlue, asset->primAlpha); + gDPSetFogColor(gMasterDisp++, asset->fog.r, asset->fog.g, asset->fog.b, 0); + gDPSetEnvColor(gMasterDisp++, asset->env.r, asset->env.g, asset->env.b, asset->env.a); + gDPSetPrimColor(gMasterDisp++, 0, 0, asset->prim.r, asset->prim.g, asset->prim.b, asset->prim.a); Matrix_Translate(gGfxMatrix, asset->unk_18.x + (arg0 - asset->unk_0C) * asset->unk_3C.x, asset->unk_18.y + (arg0 - asset->unk_0C) * asset->unk_3C.y, @@ -639,8 +639,8 @@ void Ending_80190274(u32 arg0, AssetInfo* asset) { RCP_SetupDL(&gMasterDisp, asset->unk_08); gSPFogPosition(gMasterDisp++, asset->fogNear, asset->fogFar); - gDPSetFogColor(gMasterDisp++, asset->fogRed, asset->fogGreen, asset->fogBlue, 0); - gDPSetPrimColor(gMasterDisp++, 0, 0, asset->primRed, asset->primGreen, asset->primBlue, asset->primAlpha); + gDPSetFogColor(gMasterDisp++, asset->fog.r, asset->fog.g, asset->fog.b, 0); + gDPSetPrimColor(gMasterDisp++, 0, 0, asset->prim.r, asset->prim.g, asset->prim.b, asset->prim.a); Matrix_Translate(gGfxMatrix, D_ending_801985D0.x + asset->unk_18.x + (arg0 - asset->unk_0C) * asset->unk_3C.x, D_ending_801985D0.y + asset->unk_18.y + (arg0 - asset->unk_0C) * asset->unk_3C.y, @@ -685,9 +685,9 @@ void Ending_80190778(u32 arg0, AssetInfo* asset) { RCP_SetupDL(&gMasterDisp, asset->unk_08); gSPFogPosition(gMasterDisp++, asset->fogNear, asset->fogFar); - gDPSetFogColor(gMasterDisp++, asset->fogRed, asset->fogGreen, asset->fogBlue, 0); - gDPSetEnvColor(gMasterDisp++, asset->envRed, asset->envGreen, asset->envBlue, asset->envAlpha); - gDPSetPrimColor(gMasterDisp++, 0, 0, asset->primRed, asset->primGreen, asset->primBlue, asset->primAlpha); + gDPSetFogColor(gMasterDisp++, asset->fog.r, asset->fog.g, asset->fog.b, 0); + gDPSetEnvColor(gMasterDisp++, asset->env.r, asset->env.g, asset->env.b, asset->env.a); + gDPSetPrimColor(gMasterDisp++, 0, 0, asset->prim.r, asset->prim.g, asset->prim.b, asset->prim.a); Matrix_Translate(gGfxMatrix, asset->unk_18.x + (arg0 - asset->unk_0C) * asset->unk_3C.x, asset->unk_18.y - 6.0f + (arg0 - asset->unk_0C) * asset->unk_3C.y, @@ -750,14 +750,14 @@ void Ending_80190CF0(u32 arg0, AssetInfo* asset) { RCP_SetupDL(&gMasterDisp, asset->unk_08); - gDPSetFogColor(gMasterDisp++, asset->fogRed, asset->fogGreen, asset->fogBlue, 0); - gDPSetEnvColor(gMasterDisp++, asset->envRed, asset->envGreen, asset->envBlue, asset->envAlpha); + gDPSetFogColor(gMasterDisp++, asset->fog.r, asset->fog.g, asset->fog.b, 0); + gDPSetEnvColor(gMasterDisp++, asset->env.r, asset->env.g, asset->env.b, asset->env.a); if ((asset->unk_0C + asset->fogNear) > arg0) { alpha = (arg0 - asset->unk_0C) * 255 / asset->fogNear; } - gDPSetPrimColor(gMasterDisp++, 0, 0, asset->primRed, asset->primGreen, asset->primBlue, alpha); + gDPSetPrimColor(gMasterDisp++, 0, 0, asset->prim.r, asset->prim.g, asset->prim.b, alpha); Matrix_Translate(gGfxMatrix, asset->unk_18.x + (arg0 - asset->unk_0C) * asset->unk_3C.x, asset->unk_18.y + (arg0 - asset->unk_0C) * asset->unk_3C.y, @@ -804,7 +804,7 @@ void Ending_80190CF0(u32 arg0, AssetInfo* asset) { } void Ending_80191234(s32 arg0, s32 arg1) { - D_game_80161A34 = 8; + gLastGameState = GSTATE_ENDING; gGameState = GSTATE_MENU; gNextGameStateTimer = 2; gOptionMenuStatus = OPTION_WAIT; @@ -820,9 +820,9 @@ void Ending_80191294(u32 arg0, AssetInfo* asset) { RCP_SetupDL(&gMasterDisp, asset->unk_08); gSPFogPosition(gMasterDisp++, asset->fogNear, asset->fogFar); - gDPSetFogColor(gMasterDisp++, asset->fogRed, asset->fogGreen, asset->fogBlue, 0); - gDPSetEnvColor(gMasterDisp++, asset->envRed, asset->envGreen, asset->envBlue, asset->envAlpha); - gDPSetPrimColor(gMasterDisp++, 0, 0, asset->primRed, asset->primGreen, asset->primBlue, asset->primAlpha); + gDPSetFogColor(gMasterDisp++, asset->fog.r, asset->fog.g, asset->fog.b, 0); + gDPSetEnvColor(gMasterDisp++, asset->env.r, asset->env.g, asset->env.b, asset->env.a); + gDPSetPrimColor(gMasterDisp++, 0, 0, asset->prim.r, asset->prim.g, asset->prim.b, asset->prim.a); Matrix_Translate(gGfxMatrix, asset->unk_18.x + (arg0 - asset->unk_0C) * asset->unk_3C.x, asset->unk_18.y + (arg0 - asset->unk_0C) * asset->unk_3C.y, @@ -877,9 +877,9 @@ void Ending_80191710(u32 arg0, AssetInfo* asset) { RCP_SetupDL(&gMasterDisp, asset->unk_08); gSPFogPosition(gMasterDisp++, asset->fogNear, asset->fogFar); - gDPSetFogColor(gMasterDisp++, asset->fogRed, asset->fogGreen, asset->fogBlue, 0); - gDPSetEnvColor(gMasterDisp++, asset->envRed, asset->envGreen, asset->envBlue, asset->envAlpha); - gDPSetPrimColor(gMasterDisp++, 0, 0, asset->primRed, asset->primGreen, asset->primBlue, asset->primAlpha); + gDPSetFogColor(gMasterDisp++, asset->fog.r, asset->fog.g, asset->fog.b, 0); + gDPSetEnvColor(gMasterDisp++, asset->env.r, asset->env.g, asset->env.b, asset->env.a); + gDPSetPrimColor(gMasterDisp++, 0, 0, asset->prim.r, asset->prim.g, asset->prim.b, asset->prim.a); Matrix_Translate(gGfxMatrix, asset->unk_18.x + (arg0 - asset->unk_0C) * asset->unk_3C.x, asset->unk_18.y + (arg0 - asset->unk_0C) * asset->unk_3C.y, @@ -936,9 +936,9 @@ void Ending_80191C7C(u32 arg0, AssetInfo* asset) { RCP_SetupDL(&gMasterDisp, asset->unk_08); gSPFogPosition(gMasterDisp++, asset->fogNear, asset->fogFar); - gDPSetFogColor(gMasterDisp++, asset->fogRed, asset->fogGreen, asset->fogBlue, 0); - gDPSetEnvColor(gMasterDisp++, asset->envRed, asset->envGreen, asset->envBlue, asset->envAlpha); - gDPSetPrimColor(gMasterDisp++, 0, 0, asset->primRed, asset->primGreen, asset->primBlue, asset->primAlpha); + gDPSetFogColor(gMasterDisp++, asset->fog.r, asset->fog.g, asset->fog.b, 0); + gDPSetEnvColor(gMasterDisp++, asset->env.r, asset->env.g, asset->env.b, asset->env.a); + gDPSetPrimColor(gMasterDisp++, 0, 0, asset->prim.r, asset->prim.g, asset->prim.b, asset->prim.a); Matrix_Translate(gGfxMatrix, asset->unk_18.x + (arg0 - asset->unk_0C) * asset->unk_3C.x, asset->unk_18.y + (arg0 - asset->unk_0C) * asset->unk_3C.y, @@ -1088,7 +1088,7 @@ void Ending_801926D4(void) { D_ending_80192E70 = 3099; } - if ((4891 <= D_ending_80192E70) && (D_ending_80192E70 < 4999)) { + if ((4890 < D_ending_80192E70) && (D_ending_80192E70 < 4999)) { D_ending_80192E70 = 4999; } diff --git a/src/overlays/ovl_ending/fox_end2_data.c b/src/overlays/ovl_ending/fox_end2_data.c index 0e419211..40923b13 100644 --- a/src/overlays/ovl_ending/fox_end2_data.c +++ b/src/overlays/ovl_ending/fox_end2_data.c @@ -44,19 +44,11 @@ typedef struct AssetInfo { /* 0x3C */ Vec3f unk_3C; /* 0x48 */ Vec3f unk_48; /* 0x54 */ Vec3f unk_54; - /* 0x60 */ u8 fogRed; - /* 0x61 */ u8 fogGreen; - /* 0x62 */ u8 fogBlue; + /* 0x60 */ Color_RGBA32 fog; /* 0x64 */ s16 fogNear; /* 0x66 */ s16 fogFar; - /* 0x68 */ u8 envRed; - /* 0x69 */ u8 envGreen; - /* 0x6A */ u8 envBlue; - /* 0x6B */ u8 envAlpha; - /* 0x6C */ u8 primRed; - /* 0x6D */ u8 primGreen; - /* 0x6E */ u8 primBlue; - /* 0x6F */ u8 primAlpha; + /* 0x68 */ Color_RGBA32 env; + /* 0x6C */ Color_RGBA32 prim; /* 0x70 */ u8 unk_70; /* 0x71 */ u8 unk_71; } AssetInfo; // size = 0x72 @@ -192,100 +184,100 @@ Credit D_ending_80192E74[] = { }; AssetInfo D_ending_801934B4[] = { - { NULL, Ending_8018D250, 0, 0, 3000, 1000.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0 }, - { NULL, Ending_8018D4BC, 0, 100, 2800, 0.0f, 59.0f, 58.0f, 13.0f, 100.0f, 60.0f, 50.0f, 40.0f, 40.0f, 40.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { NULL, Ending_8018D28C, 36, 690, 30, 1.0f, 0.7f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { NULL, Ending_8018D28C, 36, 800, 119, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { NULL, Ending_8018D28C, 36, 920, 200, 1.0f, -1.2f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { NULL, Ending_80190648, 36, 100, 1710, 1.0f, 0.0f, 0.0f, -10000.0f, 0.0f, 0.0f, 0.0f, 40.0f, 40.0f, 40.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { NULL, Ending_8018F2A8, 29, 520, 800, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { NULL, Ending_8018F64C, 29, 100, 820, 1.0f, -900.0f, 600.0f, -1200.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 255, 0, 255, 255, 255, 255, 4, 0 }, - { NULL, Ending_8018F64C, 29, 920, 960, 1.0f, -900.0f, 600.0f, -1200.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 255, 0, 255, 255, 255, 255, 4, 0 }, - { &D_arwing_3015C28, D_arwing_3016610, 29, 100, 1780, 1.0f, -1000.0f, 500.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0 }, - { D_arwing_3016CC0, NULL, 29, 920, 150, 1.0f, -1000.0f, 506.8f, -16.0f, 5.0f, -40.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0 }, - { D_arwing_3016CC0, NULL, 29, 1070, 19, 1.0f, -1000.0f, 506.8f, -16.0f, 5.0f, -40.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 2.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0 }, - { D_arwing_3016CC0, NULL, 29, 1089, 1, 1.0f, -1000.0f, 506.8f, -16.0f, 5.0f, -1.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0 }, - { D_arwing_3016CC0, NULL, 29, 1090, 30, 1.0f, -1000.0f, 506.8f, -16.0f, 5.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0 }, - { D_arwing_30194E0, NULL, 45, 100, 1020, 1.0f, -1000.0f, 516.9f, -25.9f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 255, 255, 255, 140, 7, 0 }, - { NULL, Ending_8018E1B8, 67, 100, 1780, 1.0f, -1000.0f, 500.0f, -64.0f, 0.0f, 0.0f, 0.0f, 0.5f, 0.3f, 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 240, 176, 64, 996, 1000, 0, 0, 255, 0, 255, 255, 255, 255, 0, 0 }, - { &D_arwing_3015C28, D_arwing_3016610, 29, 100, 1780, 1.0f, -1000.0f, -500.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0 }, - { NULL, Ending_80190778, 29, 1120, 200, 1.0f, -1000.0f, -493.2f, -16.0f, 0.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0 }, - { D_arwing_30194E0, NULL, 45, 1120, 200, 1.0f, -1000.0f, -483.1f, -25.9f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 255, 255, 255, 140, 7, 0 }, - { NULL, Ending_8018E1B8, 67, 100, 1780, 1.0f, -1000.0f, -500.0f, -57.0f, 0.0f, 0.0f, 0.0f, 0.5f, 0.3f, 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 240, 176, 64, 996, 1000, 0, 0, 255, 0, 255, 255, 255, 255, 0, 0 }, - { NULL, Ending_8018FC60, 29, 100, 420, 1.0f, 1000.0f, 560.0f, -440.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 255, 0, 255, 255, 255, 255, 4, 0 }, - { NULL, Ending_8018FC60, 29, 520, 130, 1.0f, 1000.0f, 560.0f, -440.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 4.0f, 0.0f, 0.0f, 1.8f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 255, 0, 255, 255, 255, 255, 4, 0 }, - { NULL, Ending_8018FC60, 29, 650, 1230, 1.0f, 800.0f, -300.0f, 350.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 255, 0, 255, 255, 255, 255, 4, 0 }, - { NULL, Ending_80191294, 29, 100, 1780, 1.0f, 1000.0f, 500.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0 }, - { NULL, Ending_8018E1B8, 67, 100, 1780, 1.0f, 1000.0f, 500.0f, -57.0f, 0.0f, 0.0f, 0.0f, 0.5f, 0.3f, 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 240, 176, 64, 996, 1000, 0, 0, 255, 0, 255, 255, 255, 255, 0, 0 }, - { &D_arwing_3015C28, D_arwing_3016610, 29, 100, 1780, 1.0f, 1000.0f, -500.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0 }, - { D_arwing_3003CE0, NULL, 29, 850, 20, 1.0f, 1000.0f, -493.2f, -16.0f, 5.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 870, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 7.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 871, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 10.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 872, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 14.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 873, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 16.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 874, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 14.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 875, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 11.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 876, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 7.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 877, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 7.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 878, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 10.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 879, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 14.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 880, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 16.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 881, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 14.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 882, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 10.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 883, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 7.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 884, 36, 1.0f, 1000.0f, -493.2f, -16.0f, 5.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0 }, - { D_arwing_30194E0, NULL, 45, 850, 70, 1.0f, 999.0f, -483.1f, -25.9f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 255, 255, 255, 140, 11, 0 }, - { NULL, Ending_8018E1B8, 67, 100, 1780, 1.0f, 1000.0f, -500.0f, -34.0f, 0.0f, 0.0f, 0.0f, 0.5f, 0.3f, 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 240, 176, 64, 996, 1000, 0, 0, 255, 0, 255, 255, 255, 255, 0, 0 }, - { NULL, Ending_8018F2A8, 29, 100, 420, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { NULL, Ending_8018F2A8, 29, 1320, 470, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { NULL, Ending_80190274, 36, 1810, 1090, 1.0f, -200.0f, 0.0f, -10000.0f, 0.0f, 0.0f, 0.0f, 150.0f, 150.0f, 150.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { NULL, Ending_8018F2A8, 29, 1920, 980, 1.0f, 0.0f, 1000.0f, -700.0f, 0.0f, 180.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, -10.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { NULL, Ending_8018D2C8, 36, 100, 11, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { NULL, Ending_8018D2C8, 36, 1770, 30, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { NULL, Ending_8018D2C8, 36, 2780, 30, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { NULL, Ending_8018D2C8, 36, 510, 20, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { NULL, Ending_8018D2C8, 36, 710, 20, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { NULL, Ending_8018D2C8, 36, 910, 20, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { NULL, Ending_8018D2C8, 36, 1110, 20, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { NULL, Ending_8018D2C8, 36, 1310, 20, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { NULL, Ending_8018D250, 4, 3000, 2000, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0 }, - { NULL, Ending_8018D4BC, 0, 3100, 1800, 0.0f, 0.0f, 13.0f, -32.0f, 200.0f, 70.0f, 10.0f, 10.0f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { D_END_7016540, NULL, 17, 3100, 1800, 1.0f, 0.0f, -2700.0f, -6900.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { NULL, Ending_8018F2A8, 23, 3800, 950, 1.0f, 8000.0f, -5500.0f, -10000.0f, -10.0f, -90.0f, 0.0f, 3.0f, 3.0f, 3.0f, -22.0f, 12.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { NULL, Ending_8018E7B8, 67, 3800, 950, 1.0f, 12330.0f, -6500.0f, -9200.0f, 0.0f, 0.0f, -10.0f, 35.0f, 10.0f, 20.0f, -22.0f, 12.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 240, 176, 64, 996, 1000, 255, 255, 0, 0, 255, 255, 255, 164, 0, 0 }, - { NULL, Ending_8018E7B8, 67, 3800, 950, 1.0f, 15600.0f, -6710.0f, -9960.0f, 0.0f, 0.0f, -10.0f, 35.0f, 10.0f, 20.0f, -22.0f, 12.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 240, 176, 64, 996, 1000, 255, 255, 0, 0, 255, 255, 255, 164, 0, 0 }, - { NULL, Ending_8018D4BC, 0, 3100, 1800, 0.0f, 0.0f, 32.0f, -32.0f, 200.0f, 70.0f, 10.0f, 10.0f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { NULL, Ending_8018EDB8, 20, 3100, 1800, 1.0f, 0.0f, -470.0f, -3500.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 996, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { &D_TITLE_602F8E0, D_TITLE_602FBAC, 12, 3100, 1800, 5.0f, -300.0f, -300.0f, -1300.0f, 5.0f, -90.0f, -90.0f, 0.6f, 0.1f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 200, 10, 0 }, - { &D_TITLE_602F8E0, D_TITLE_602FBAC, 23, 3100, 1800, 5.0f, -300.0f, -300.0f, -1300.0f, 5.0f, -90.0f, 0.0f, 0.6f, 0.6f, 0.6f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0 }, - { &D_TITLE_60305C0, D_TITLE_603088C, 12, 3100, 1800, 5.0f, -100.0f, -300.0f, -1300.0f, 10.0f, -90.0f, -90.0f, 0.6f, 0.1f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 200, 0, 0 }, - { &D_TITLE_60305C0, D_TITLE_603088C, 23, 3100, 1800, 5.0f, -100.0f, -300.0f, -1300.0f, 10.0f, -90.0f, 0.0f, 0.6f, 0.6f, 0.6f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { &D_TITLE_6031DB8, D_TITLE_6032084, 12, 3100, 1800, 6.0f, 100.0f, -300.0f, -1300.0f, -10.0f, -90.0f, -90.0f, 0.6f, 0.1f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 200, 0, 0 }, - { &D_TITLE_6031DB8, D_TITLE_6032084, 23, 3100, 1800, 6.0f, 100.0f, -300.0f, -1300.0f, -10.0f, -90.0f, 0.0f, 0.6f, 0.6f, 0.6f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { &D_TITLE_6031120, D_TITLE_60313AC, 12, 3100, 1800, 7.0f, 300.0f, -300.0f, -1300.0f, -15.0f, -90.0f, -90.0f, 0.6f, 0.1f, 6.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 200, 0, 0 }, - { &D_TITLE_6031120, D_TITLE_60313AC, 23, 3100, 1800, 7.0f, 300.0f, -300.0f, -1300.0f, -15.0f, -90.0f, 0.0f, 0.6f, 0.6f, 0.6f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { NULL, Ending_8018D250, 5, 5000, 2000, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0 }, - { NULL, Ending_8018D4BC, 0, 5100, 1800, 0.0f, 0.0f, 32.0f, -32.0f, 200.0f, 70.0f, 10.0f, 10.0f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { D_END_7016540, NULL, 17, 5100, 310, 1.0f, 0.0f, -2800.0f, -6900.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -4.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { D_END_7016540, NULL, 17, 5410, 1490, 1.0f, 0.0f, -4040.0f, -6900.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 995, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { NULL, Ending_80190CF0, 62, 6520, 380, 1.0f, 0.0f, 0.0f, -7000.0f, 0.0f, 0.0f, 0.0f, 12.0f, 12.0f, 12.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 200, 0, 0, 0, 0, 0, 255, 255, 255, 0, 0, 0 }, - { &D_arwing_3015AF4, D_arwing_3016610, 29, 5100, 1800, 1.0f, 100.0f, 100.0f, -230.0f, 0.0f, 180.0f, 0.0f, 0.5f, 0.5f, 0.5f, 0.0f, 0.0f, -7.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 3.0f, 240, 176, 64, 996, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0 }, - { D_END_7010970, NULL, 38, 5100, 1800, 1.0f, 100.0f, 95.0f, -200.0f, 0.0f, 0.0f, 0.0f, 0.4f, 0.3f, 0.4f, 0.0f, 0.0f, -7.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 3.0f, 240, 176, 64, 996, 1000, 255, 0, 0, 0, 255, 255, 255, 255, 0, 0 }, - { &D_arwing_3015AF4, D_arwing_3016610, 29, 5100, 1800, 1.0f, 100.0f, -100.0f, -230.0f, 0.0f, 180.0f, 0.0f, 0.5f, 0.5f, 0.5f, 0.0f, 0.0f, -7.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 3.0f, 240, 176, 64, 996, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0 }, - { D_END_7010970, NULL, 38, 5100, 1800, 1.0f, 100.0f, -105.0f, -200.0f, 0.0f, 0.0f, 0.0f, 0.4f, 0.3f, 0.4f, 0.0f, 0.0f, -7.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 3.0f, 240, 176, 64, 996, 1000, 255, 0, 0, 0, 255, 255, 255, 255, 5, 0 }, - { &D_arwing_3015AF4, D_arwing_3016610, 29, 5100, 1800, 1.0f, -100.0f, 100.0f, -230.0f, 0.0f, 180.0f, 0.0f, 0.5f, 0.5f, 0.5f, 0.0f, 0.0f, -7.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 3.0f, 240, 176, 64, 996, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0 }, - { D_END_7010970, NULL, 38, 5100, 1800, 1.0f, -100.0f, 95.0f, -200.0f, 0.0f, 0.0f, 0.0f, 0.4f, 0.3f, 0.4f, 0.0f, 0.0f, -7.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 3.0f, 240, 176, 64, 996, 1000, 255, 0, 0, 0, 255, 255, 255, 255, 7, 0 }, - { &D_arwing_3015AF4, D_arwing_3016610, 29, 5100, 1800, 1.0f, -100.0f, -100.0f, -230.0f, 0.0f, 180.0f, 0.0f, 0.5f, 0.5f, 0.5f, 0.0f, 0.0f, -7.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 3.0f, 240, 176, 64, 996, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0 }, - { D_END_7010970, NULL, 38, 5100, 1800, 1.0f, -100.0f, -105.0f, -200.0f, 0.0f, 0.0f, 0.0f, 0.4f, 0.3f, 0.4f, 0.0f, 0.0f, -7.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 3.0f, 240, 176, 64, 996, 1000, 255, 0, 0, 0, 255, 255, 255, 255, 11, 0 }, - { NULL, Ending_8018F2A8, 29, 5100, 1800, 1.0f, 0.0f, 0.0f, -220.0f, 0.0f, 180.0f, 0.0f, 0.1f, 0.1f, 0.1f, 0.0f, 0.0f, -7.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 240, 176, 64, 996, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { NULL, Ending_8018DA0C, 76, 6520, 380, 1.0f, 224.0f, 164.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 20, 0, 0, 0, 0, 0, 255, 255, 255, 255, 0, 0 }, - { NULL, Ending_8018D638, 36, 6900, 300, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { NULL, Ending_8018D398, 36, 3000, 370, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 250, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { NULL, Ending_8018D814, 76, 6122, 200, 1.0f, 128.0f, 100.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 20, 20, 0, 0, 0, 0, 255, 255, 255, 0, 0, 0 }, - { NULL, Ending_8018D2C8, 36, 4880, 240, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { NULL, Ending_8018D2C8, 36, 6800, 100, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { NULL, Ending_8018D2C8, 36, 7100, 100, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { NULL, Ending_80191234, 0, 7200, 100, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } + { NULL, Ending_8018D250, 0, 0, 3000, 1000.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 2, 0 }, + { NULL, Ending_8018D4BC, 0, 100, 2800, 0.0f, 59.0f, 58.0f, 13.0f, 100.0f, 60.0f, 50.0f, 40.0f, 40.0f, 40.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { NULL, Ending_8018D28C, 36, 690, 30, 1.0f, 0.7f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { NULL, Ending_8018D28C, 36, 800, 119, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { NULL, Ending_8018D28C, 36, 920, 200, 1.0f, -1.2f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { NULL, Ending_80190648, 36, 100, 1710, 1.0f, 0.0f, 0.0f, -10000.0f, 0.0f, 0.0f, 0.0f, 40.0f, 40.0f, 40.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { NULL, Ending_8018F2A8, 29, 520, 800, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { NULL, Ending_8018F64C, 29, 100, 820, 1.0f, -900.0f, 600.0f, -1200.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 255, 0,}, {255, 255, 255, 255,}, 4, 0 }, + { NULL, Ending_8018F64C, 29, 920, 960, 1.0f, -900.0f, 600.0f, -1200.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 255, 0,}, {255, 255, 255, 255,}, 4, 0 }, + { &D_arwing_3015C28, D_arwing_3016610, 29, 100, 1780, 1.0f, -1000.0f, 500.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 3, 0 }, + { D_arwing_3016CC0, NULL, 29, 920, 150, 1.0f, -1000.0f, 506.8f, -16.0f, 5.0f, -40.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 7, 0 }, + { D_arwing_3016CC0, NULL, 29, 1070, 19, 1.0f, -1000.0f, 506.8f, -16.0f, 5.0f, -40.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 2.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 7, 0 }, + { D_arwing_3016CC0, NULL, 29, 1089, 1, 1.0f, -1000.0f, 506.8f, -16.0f, 5.0f, -1.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 7, 0 }, + { D_arwing_3016CC0, NULL, 29, 1090, 30, 1.0f, -1000.0f, 506.8f, -16.0f, 5.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 7, 0 }, + { D_arwing_30194E0, NULL, 45, 100, 1020, 1.0f, -1000.0f, 516.9f, -25.9f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {255, 255, 255, 140,}, 7, 0 }, + { NULL, Ending_8018E1B8, 67, 100, 1780, 1.0f, -1000.0f, 500.0f, -64.0f, 0.0f, 0.0f, 0.0f, 0.5f, 0.3f, 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {240, 176, 64, 0}, 996, 1000, {0, 0, 255, 0,}, {255, 255, 255, 255,}, 0, 0 }, + { &D_arwing_3015C28, D_arwing_3016610, 29, 100, 1780, 1.0f, -1000.0f, -500.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 5, 0 }, + { NULL, Ending_80190778, 29, 1120, 200, 1.0f, -1000.0f, -493.2f, -16.0f, 0.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 7, 0 }, + { D_arwing_30194E0, NULL, 45, 1120, 200, 1.0f, -1000.0f, -483.1f, -25.9f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {255, 255, 255, 140,}, 7, 0 }, + { NULL, Ending_8018E1B8, 67, 100, 1780, 1.0f, -1000.0f, -500.0f, -57.0f, 0.0f, 0.0f, 0.0f, 0.5f, 0.3f, 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {240, 176, 64, 0}, 996, 1000, {0, 0, 255, 0,}, {255, 255, 255, 255,}, 0, 0 }, + { NULL, Ending_8018FC60, 29, 100, 420, 1.0f, 1000.0f, 560.0f, -440.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 255, 0,}, {255, 255, 255, 255,}, 4, 0 }, + { NULL, Ending_8018FC60, 29, 520, 130, 1.0f, 1000.0f, 560.0f, -440.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 4.0f, 0.0f, 0.0f, 1.8f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 255, 0,}, {255, 255, 255, 255,}, 4, 0 }, + { NULL, Ending_8018FC60, 29, 650, 1230, 1.0f, 800.0f, -300.0f, 350.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 255, 0,}, {255, 255, 255, 255,}, 4, 0 }, + { NULL, Ending_80191294, 29, 100, 1780, 1.0f, 1000.0f, 500.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 7, 0 }, + { NULL, Ending_8018E1B8, 67, 100, 1780, 1.0f, 1000.0f, 500.0f, -57.0f, 0.0f, 0.0f, 0.0f, 0.5f, 0.3f, 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {240, 176, 64, 0}, 996, 1000, {0, 0, 255, 0,}, {255, 255, 255, 255,}, 0, 0 }, + { &D_arwing_3015C28, D_arwing_3016610, 29, 100, 1780, 1.0f, 1000.0f, -500.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 11, 0 }, + { D_arwing_3003CE0, NULL, 29, 850, 20, 1.0f, 1000.0f, -493.2f, -16.0f, 5.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { D_arwing_3003CE0, NULL, 29, 870, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 7.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { D_arwing_3003CE0, NULL, 29, 871, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 10.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { D_arwing_3003CE0, NULL, 29, 872, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 14.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { D_arwing_3003CE0, NULL, 29, 873, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 16.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { D_arwing_3003CE0, NULL, 29, 874, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 14.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { D_arwing_3003CE0, NULL, 29, 875, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 11.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { D_arwing_3003CE0, NULL, 29, 876, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 7.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { D_arwing_3003CE0, NULL, 29, 877, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 7.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { D_arwing_3003CE0, NULL, 29, 878, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 10.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { D_arwing_3003CE0, NULL, 29, 879, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 14.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { D_arwing_3003CE0, NULL, 29, 880, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 16.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { D_arwing_3003CE0, NULL, 29, 881, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 14.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { D_arwing_3003CE0, NULL, 29, 882, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 10.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { D_arwing_3003CE0, NULL, 29, 883, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 7.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { D_arwing_3003CE0, NULL, 29, 884, 36, 1.0f, 1000.0f, -493.2f, -16.0f, 5.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { D_arwing_30194E0, NULL, 45, 850, 70, 1.0f, 999.0f, -483.1f, -25.9f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {255, 255, 255, 140,}, 11, 0 }, + { NULL, Ending_8018E1B8, 67, 100, 1780, 1.0f, 1000.0f, -500.0f, -34.0f, 0.0f, 0.0f, 0.0f, 0.5f, 0.3f, 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {240, 176, 64, 0}, 996, 1000, {0, 0, 255, 0,}, {255, 255, 255, 255,}, 0, 0 }, + { NULL, Ending_8018F2A8, 29, 100, 420, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { NULL, Ending_8018F2A8, 29, 1320, 470, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { NULL, Ending_80190274, 36, 1810, 1090, 1.0f, -200.0f, 0.0f, -10000.0f, 0.0f, 0.0f, 0.0f, 150.0f, 150.0f, 150.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { NULL, Ending_8018F2A8, 29, 1920, 980, 1.0f, 0.0f, 1000.0f, -700.0f, 0.0f, 180.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, -10.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { NULL, Ending_8018D2C8, 36, 100, 11, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 0, 10, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { NULL, Ending_8018D2C8, 36, 1770, 30, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 10, 10, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { NULL, Ending_8018D2C8, 36, 2780, 30, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 10, 10, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { NULL, Ending_8018D2C8, 36, 510, 20, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 10, 10, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { NULL, Ending_8018D2C8, 36, 710, 20, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 10, 10, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { NULL, Ending_8018D2C8, 36, 910, 20, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 10, 10, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { NULL, Ending_8018D2C8, 36, 1110, 20, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 10, 10, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { NULL, Ending_8018D2C8, 36, 1310, 20, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 10, 10, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { NULL, Ending_8018D250, 4, 3000, 2000, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 3, 0 }, + { NULL, Ending_8018D4BC, 0, 3100, 1800, 0.0f, 0.0f, 13.0f, -32.0f, 200.0f, 70.0f, 10.0f, 10.0f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { D_END_7016540, NULL, 17, 3100, 1800, 1.0f, 0.0f, -2700.0f, -6900.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { NULL, Ending_8018F2A8, 23, 3800, 950, 1.0f, 8000.0f, -5500.0f, -10000.0f, -10.0f, -90.0f, 0.0f, 3.0f, 3.0f, 3.0f, -22.0f, 12.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { NULL, Ending_8018E7B8, 67, 3800, 950, 1.0f, 12330.0f, -6500.0f, -9200.0f, 0.0f, 0.0f, -10.0f, 35.0f, 10.0f, 20.0f, -22.0f, 12.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {240, 176, 64, 0}, 996, 1000, {255, 255, 0, 0,}, {255, 255, 255, 164,}, 0, 0 }, + { NULL, Ending_8018E7B8, 67, 3800, 950, 1.0f, 15600.0f, -6710.0f, -9960.0f, 0.0f, 0.0f, -10.0f, 35.0f, 10.0f, 20.0f, -22.0f, 12.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {240, 176, 64, 0}, 996, 1000, {255, 255, 0, 0,}, {255, 255, 255, 164,}, 0, 0 }, + { NULL, Ending_8018D4BC, 0, 3100, 1800, 0.0f, 0.0f, 32.0f, -32.0f, 200.0f, 70.0f, 10.0f, 10.0f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { NULL, Ending_8018EDB8, 20, 3100, 1800, 1.0f, 0.0f, -470.0f, -3500.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 996, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { &D_TITLE_602F8E0, D_TITLE_602FBAC, 12, 3100, 1800, 5.0f, -300.0f, -300.0f, -1300.0f, 5.0f, -90.0f, -90.0f, 0.6f, 0.1f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 200,}, 10, 0 }, + { &D_TITLE_602F8E0, D_TITLE_602FBAC, 23, 3100, 1800, 5.0f, -300.0f, -300.0f, -1300.0f, 5.0f, -90.0f, 0.0f, 0.6f, 0.6f, 0.6f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { &D_TITLE_60305C0, D_TITLE_603088C, 12, 3100, 1800, 5.0f, -100.0f, -300.0f, -1300.0f, 10.0f, -90.0f, -90.0f, 0.6f, 0.1f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 200,}, 0, 0 }, + { &D_TITLE_60305C0, D_TITLE_603088C, 23, 3100, 1800, 5.0f, -100.0f, -300.0f, -1300.0f, 10.0f, -90.0f, 0.0f, 0.6f, 0.6f, 0.6f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { &D_TITLE_6031DB8, D_TITLE_6032084, 12, 3100, 1800, 6.0f, 100.0f, -300.0f, -1300.0f, -10.0f, -90.0f, -90.0f, 0.6f, 0.1f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 200,}, 0, 0 }, + { &D_TITLE_6031DB8, D_TITLE_6032084, 23, 3100, 1800, 6.0f, 100.0f, -300.0f, -1300.0f, -10.0f, -90.0f, 0.0f, 0.6f, 0.6f, 0.6f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { &D_TITLE_6031120, D_TITLE_60313AC, 12, 3100, 1800, 7.0f, 300.0f, -300.0f, -1300.0f, -15.0f, -90.0f, -90.0f, 0.6f, 0.1f, 6.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 200,}, 0, 0 }, + { &D_TITLE_6031120, D_TITLE_60313AC, 23, 3100, 1800, 7.0f, 300.0f, -300.0f, -1300.0f, -15.0f, -90.0f, 0.0f, 0.6f, 0.6f, 0.6f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { NULL, Ending_8018D250, 5, 5000, 2000, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 2, 0 }, + { NULL, Ending_8018D4BC, 0, 5100, 1800, 0.0f, 0.0f, 32.0f, -32.0f, 200.0f, 70.0f, 10.0f, 10.0f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { D_END_7016540, NULL, 17, 5100, 310, 1.0f, 0.0f, -2800.0f, -6900.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -4.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { D_END_7016540, NULL, 17, 5410, 1490, 1.0f, 0.0f, -4040.0f, -6900.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { NULL, Ending_80190CF0, 62, 6520, 380, 1.0f, 0.0f, 0.0f, -7000.0f, 0.0f, 0.0f, 0.0f, 12.0f, 12.0f, 12.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 200, 0, {0, 0, 0, 0,}, {255, 255, 255, 0,}, 0, 0 }, + { &D_arwing_3015AF4, D_arwing_3016610, 29, 5100, 1800, 1.0f, 100.0f, 100.0f, -230.0f, 0.0f, 180.0f, 0.0f, 0.5f, 0.5f, 0.5f, 0.0f, 0.0f, -7.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 3.0f, {240, 176, 64, 0}, 996, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 3, 0 }, + { D_END_7010970, NULL, 38, 5100, 1800, 1.0f, 100.0f, 95.0f, -200.0f, 0.0f, 0.0f, 0.0f, 0.4f, 0.3f, 0.4f, 0.0f, 0.0f, -7.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 3.0f, {240, 176, 64, 0}, 996, 1000, {255, 0, 0, 0,}, {255, 255, 255, 255,}, 0, 0 }, + { &D_arwing_3015AF4, D_arwing_3016610, 29, 5100, 1800, 1.0f, 100.0f, -100.0f, -230.0f, 0.0f, 180.0f, 0.0f, 0.5f, 0.5f, 0.5f, 0.0f, 0.0f, -7.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 3.0f, {240, 176, 64, 0}, 996, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 5, 0 }, + { D_END_7010970, NULL, 38, 5100, 1800, 1.0f, 100.0f, -105.0f, -200.0f, 0.0f, 0.0f, 0.0f, 0.4f, 0.3f, 0.4f, 0.0f, 0.0f, -7.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 3.0f, {240, 176, 64, 0}, 996, 1000, {255, 0, 0, 0,}, {255, 255, 255, 255,}, 5, 0 }, + { &D_arwing_3015AF4, D_arwing_3016610, 29, 5100, 1800, 1.0f, -100.0f, 100.0f, -230.0f, 0.0f, 180.0f, 0.0f, 0.5f, 0.5f, 0.5f, 0.0f, 0.0f, -7.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 3.0f, {240, 176, 64, 0}, 996, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 7, 0 }, + { D_END_7010970, NULL, 38, 5100, 1800, 1.0f, -100.0f, 95.0f, -200.0f, 0.0f, 0.0f, 0.0f, 0.4f, 0.3f, 0.4f, 0.0f, 0.0f, -7.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 3.0f, {240, 176, 64, 0}, 996, 1000, {255, 0, 0, 0,}, {255, 255, 255, 255,}, 7, 0 }, + { &D_arwing_3015AF4, D_arwing_3016610, 29, 5100, 1800, 1.0f, -100.0f, -100.0f, -230.0f, 0.0f, 180.0f, 0.0f, 0.5f, 0.5f, 0.5f, 0.0f, 0.0f, -7.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 3.0f, {240, 176, 64, 0}, 996, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 11, 0 }, + { D_END_7010970, NULL, 38, 5100, 1800, 1.0f, -100.0f, -105.0f, -200.0f, 0.0f, 0.0f, 0.0f, 0.4f, 0.3f, 0.4f, 0.0f, 0.0f, -7.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 3.0f, {240, 176, 64, 0}, 996, 1000, {255, 0, 0, 0,}, {255, 255, 255, 255,}, 11, 0 }, + { NULL, Ending_8018F2A8, 29, 5100, 1800, 1.0f, 0.0f, 0.0f, -220.0f, 0.0f, 180.0f, 0.0f, 0.1f, 0.1f, 0.1f, 0.0f, 0.0f, -7.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, {240, 176, 64, 0}, 996, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { NULL, Ending_8018DA0C, 76, 6520, 380, 1.0f, 224.0f, 164.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 20, 0, {0, 0, 0, 0,}, {255, 255, 255, 255,}, 0, 0 }, + { NULL, Ending_8018D638, 36, 6900, 300, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 0, 20, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { NULL, Ending_8018D398, 36, 3000, 370, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 0, 250, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { NULL, Ending_8018D814, 76, 6122, 200, 1.0f, 128.0f, 100.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 20, 20, {0, 0, 0, 0,}, {255, 255, 255, 0,}, 0, 0 }, + { NULL, Ending_8018D2C8, 36, 4880, 240, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 10, 10, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { NULL, Ending_8018D2C8, 36, 6800, 100, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 100, 0, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { NULL, Ending_8018D2C8, 36, 7100, 100, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 100, 0, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { NULL, Ending_80191234, 0, 7200, 100, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 0, 0, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 } }; UnkEnd54 D_ending_80195F4C[] = { diff --git a/src/overlays/ovl_i1/fox_co.c b/src/overlays/ovl_i1/fox_co.c index a37be302..c3f5493e 100644 --- a/src/overlays/ovl_i1/fox_co.c +++ b/src/overlays/ovl_i1/fox_co.c @@ -48,7 +48,7 @@ void Corneria_80187670(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 arg4, f32 actor->obj.rot.y = yRot; actor->timer_0BC = arg7; actor->timer_0BE = 20; - actor->unk_0B4 = arg8; + actor->eventType = arg8; actor->fwork[5] = arg4; Object_SetInfo(&actor->info, actor->obj.id); } @@ -311,11 +311,11 @@ void Corneria_80187AC8(Boss* boss) { if ((sprite->obj.status == OBJ_ACTIVE) && (sprite->obj.id == OBJ_SPRITE_CO_TREE)) { if ((fabsf(sprite->obj.pos.x - D_i1_8019B6D8[20]) < 90.0f) && (fabsf(sprite->obj.pos.z - D_i1_8019B6D8[32]) < 90.0f)) { - sprite->unk_46 = 1; + sprite->destroy = 1; break; } else if ((fabsf(sprite->obj.pos.x - D_i1_8019B6D8[23]) < 90.0f) && (fabsf(sprite->obj.pos.z - D_i1_8019B6D8[35]) < 90.0f)) { - sprite->unk_46 = 1; + sprite->destroy = 1; break; } } @@ -450,7 +450,6 @@ void Corneria_80188A18(Boss* boss) { } void Corneria_80188C7C(Boss* boss) { - if (boss->unk_044 == 0) { boss->unk_044++; boss->fwork[12] *= -0.2f; @@ -552,7 +551,7 @@ void Corneria_80189058(Boss* boss) { boss->swork[33]++; gBossActive = 2; - boss->unk_05E = 1; + boss->drawShadow = true; boss->swork[24] = 150; boss->swork[25] = 150; boss->swork[26] = 40; @@ -793,8 +792,8 @@ void Corneria_80189058(Boss* boss) { break; case 5: case 6: - boss->unk_05E = 0; - D_ctx_8017812C = 1; + boss->drawShadow = false; + gGroundClipMode = 1; if (((gGameFrameCount % 8) == 0)) { D_i1_8019B6D8[17] = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(2000.0f); D_i1_8019B6D8[18] = gPlayer[0].pos.y; @@ -843,7 +842,7 @@ void Corneria_80189058(Boss* boss) { } } - boss->unk_068 = SIN_DEG(boss->obj.rot.z) * 30.0f; + boss->yOffset = SIN_DEG(boss->obj.rot.z) * 30.0f; if (((gGameFrameCount % 16) == 0)) { boss->unk_04C = RAND_INT(100.0f); } @@ -1160,7 +1159,7 @@ void Corneria_8018AED0(Actor* actor) { f32 temp_cos; Corneria_8018ACE0(actor); - Math_SmoothStepToVec3fArray(sp40, actor->vwork, 0, Animation_GetFrameData(&D_CO_602991C, actor->unk_0B6, sp40), + Math_SmoothStepToVec3fArray(sp40, actor->vwork, 0, Animation_GetFrameData(&D_CO_602991C, actor->animFrame, sp40), 1.0f, 1.0f, 1.0f); temp_sin = SIN_DEG(actor->obj.rot.y); actor->vel.x = actor->fwork[0] * temp_sin; @@ -1170,7 +1169,7 @@ void Corneria_8018AED0(Actor* actor) { case 0: actor->fwork[1] += 20.0f; Texture_Scroll(D_CO_60329C0, 16, 16, 1); - actor->unk_0B6 = 0; + actor->animFrame = 0; actor->fwork[0] += 1.0f; if (actor->fwork[0] > 10.0f) { actor->fwork[0] = 10.0f; @@ -1183,18 +1182,18 @@ void Corneria_8018AED0(Actor* actor) { } return; case 1: - actor->unk_0B6++; + actor->animFrame++; actor->fwork[1] += 20.0f; actor->fwork[0] = 0.0f; - if (actor->unk_0B6 == 50) { + if (actor->animFrame == 50) { gScenery[actor->iwork[0] - 1].state = 1; } - if (actor->unk_0B6 >= Animation_GetFrameCount(&D_CO_602991C)) { + if (actor->animFrame >= Animation_GetFrameCount(&D_CO_602991C)) { actor->state++; } break; case 2: - actor->unk_0B6 = 0; + actor->animFrame = 0; actor->fwork[1] += 20.0f; break; } @@ -1244,7 +1243,7 @@ void Corneria_8018B15C(Actor* actor) { case 0: actor->timer_0BC = 40; actor->state = 1; - actor->unk_0B6 = 0; + actor->animFrame = 0; break; case 1: @@ -1259,12 +1258,12 @@ void Corneria_8018B15C(Actor* actor) { case 2: actor->fwork[0] = -10.0f; Texture_Scroll(D_CO_60329C0, 16, 16, 1); - actor->unk_0B6++; + actor->animFrame++; - if (actor->unk_0B6 >= Animation_GetFrameCount(&D_CO_602AA04)) { + if (actor->animFrame >= Animation_GetFrameCount(&D_CO_602AA04)) { actor->state = 3; } - if (actor->unk_0B6 == (Animation_GetFrameCount(&D_CO_602AA04) - actor->iwork[2])) { + if (actor->animFrame == (Animation_GetFrameCount(&D_CO_602AA04) - actor->iwork[2])) { actor->iwork[1] = 1; scenery->state = 1; sp54.x = 0.0f; @@ -1287,7 +1286,7 @@ void Corneria_8018B15C(Actor* actor) { scenery->vel.y = 0.0f; } - Math_SmoothStepToVec3fArray(sp60, actor->vwork, 0, Animation_GetFrameData(&D_CO_602AA04, actor->unk_0B6, sp60), + Math_SmoothStepToVec3fArray(sp60, actor->vwork, 0, Animation_GetFrameData(&D_CO_602AA04, actor->animFrame, sp60), 1.0f, 1.0f, 1.0f); } @@ -1315,9 +1314,9 @@ void Corneria_8018B418(Actor* actor) { actor->fwork[0] = 5.0f; actor->fwork[1] += 5.0f; Texture_Scroll(D_CO_60329C0, 16, 16, 1); - actor->unk_0B6++; - if (actor->unk_0B6 >= Animation_GetFrameCount(&D_CO_602A520)) { - actor->unk_0B6 = 0; + actor->animFrame++; + if (actor->animFrame >= Animation_GetFrameCount(&D_CO_602A520)) { + actor->animFrame = 0; } break; } @@ -1331,7 +1330,7 @@ void Corneria_8018B418(Actor* actor) { temp_v0_2->vel.y = 0.0f; } - Math_SmoothStepToVec3fArray(sp54, actor->vwork, 0, Animation_GetFrameData(&D_CO_602A520, actor->unk_0B6, sp54), + Math_SmoothStepToVec3fArray(sp54, actor->vwork, 0, Animation_GetFrameData(&D_CO_602A520, actor->animFrame, sp54), 1.0f, 1.0f, 1.0f); } @@ -1479,7 +1478,7 @@ void Corneria_Boss293_Init(Boss293* this) { gBossActive = 1; gBossFrameCount = 0; - this->unk_05E = 1; + this->drawShadow = true; this->timer_050 = 354; this->health = 601; this->fwork[18] = -gArwingSpeed - 10.0f; @@ -1511,10 +1510,10 @@ void Corneria_Boss293_Init(Boss293* this) { gBosses[i].obj.pos.y = this->obj.pos.y; gBosses[i].obj.pos.z = this->obj.pos.z; gBosses[i].health = 200; - gBosses[i].unk_05E = 1; + gBosses[i].drawShadow = true; gBosses[i].timer_05A = temp_s1; Object_SetInfo(&gBosses[i].info, gBosses[i].obj.id); - gBosses[3].unk_05E = 0; + gBosses[3].drawShadow = false; } } @@ -1676,7 +1675,7 @@ void Corneria_8018C19C(Boss* boss) { gBosses[0].obj.pos.z + sp84[5].z, 5.0f); } if (gBosses[2].state != 0) { - gBosses[3].unk_05E = 1; + gBosses[3].drawShadow = true; if (gBosses[3].state != 0) { if (((gGameFrameCount % 8) == 0)) { Matrix_MultVec3f(gCalcMatrix, &D_i1_80199950, &sp84[11]); @@ -2464,7 +2463,7 @@ void Corneria_8018F3BC(Scenery* scenery, f32 arg1) { } scenery->obj.pos.y = 0.0f; scenery->obj.id = OBJ_SCENERY_1; - scenery->unk_60 = 60.0f; + scenery->effectVel.z = 60.0f; Object_SetInfo(&scenery->info, scenery->obj.id); scenery->obj.pos.z = -2000.0f; scenery->info.cullDistance = 15000.0f; @@ -2545,7 +2544,7 @@ void Corneria_8018F6F8(Actor* actor, s32 arg1) { actor->obj.rot.y = 180.0f; actor->fwork[0] = RAND_FLOAT(360.0f); Object_SetInfo(&actor->info, actor->obj.id); - actor->unk_0C9 = 1; + actor->drawShadow = true; actor->iwork[11] = 1; actor->info.cullDistance = 200.0f; AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); @@ -2736,7 +2735,7 @@ void Corneria_LevelStart(Player* player) { actor0->obj.pos.y = player->pos.y + 80.0f; actor0->obj.pos.z += 100.0f; } - if (gMsgCharIsPrinting && (gGameFrameCount & 2)) { + if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) { player->wings.unk_30 = 5.0f; } break; @@ -2746,14 +2745,14 @@ void Corneria_LevelStart(Player* player) { D_ctx_80177A48[0] = 0.0f; player->csTimer = 190; } - if (gMsgCharIsPrinting && (gGameFrameCount & 2)) { + if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) { player->wings.unk_30 = 5.0f; } gCsCamEyeY = player->pos.y + 10.0f; gCsCamAtY = player->pos.y + 10.0f; break; case 4: - if (gMsgCharIsPrinting && (gGameFrameCount & 2)) { + if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) { player->wings.unk_30 = 5.0f; } Math_SmoothStepToF(&D_ctx_80177A48[0], 0.1f, 1.0f, 0.001f, 0.0f); @@ -2774,7 +2773,7 @@ void Corneria_LevelStart(Player* player) { Math_SmoothStepToF(&actor0->fwork[19], 50.0f, 0.1f, 3.0f, 0.01f); } actor0->fwork[20] = 0.0f; - if (gMsgCharIsPrinting && (gGameFrameCount & 2)) { + if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) { actor0->fwork[20] = 5.0f; } break; @@ -2814,7 +2813,7 @@ void Corneria_LevelStart(Player* player) { Radio_PlayMessage(gMsg_ID_2030, RCID_PEPPY); } actor2->fwork[20] = 0.0f; - if (gMsgCharIsPrinting && (gGameFrameCount & 2)) { + if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) { actor2->fwork[20] = 5.0f; } break; @@ -2841,7 +2840,7 @@ void Corneria_LevelStart(Player* player) { Math_SmoothStepToF(&actor1->fwork[19], -20.0f, 0.1f, 3.0f, 0.01f); } actor1->fwork[20] = 0.0f; - if (gMsgCharIsPrinting && (gGameFrameCount & 2)) { + if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) { actor1->fwork[20] = 5.0f; } break; @@ -2864,7 +2863,7 @@ void Corneria_LevelStart(Player* player) { Radio_PlayMessage(gMsg_ID_2050, RCID_FOX); } player->wings.unk_30 = 0.0f; - if (gMsgCharIsPrinting && (gGameFrameCount & 2)) { + if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) { player->wings.unk_30 = 5.0f; } if (player->csTimer == 80) { diff --git a/src/overlays/ovl_i1/fox_tr.c b/src/overlays/ovl_i1/fox_tr.c index cdd0a41f..bed35c4e 100644 --- a/src/overlays/ovl_i1/fox_tr.c +++ b/src/overlays/ovl_i1/fox_tr.c @@ -50,7 +50,7 @@ void Training_ItemRing_Update(ItemTrainingRing* this) { case 1: this->obj.pos.x += ((gPlayer[this->playerNum].pos.x - this->obj.pos.x) * 0.05f); this->obj.pos.y += ((gPlayer[this->playerNum].pos.y - this->obj.pos.y) * 0.05f); - if (gPlayer[0].cockpitView) { + if (gPlayer[0].alternateView) { this->obj.pos.z += (gPlayer[this->playerNum].trueZpos - 300.0f - this->obj.pos.z) * 0.05f; } else { this->obj.pos.z += ((gPlayer[this->playerNum].trueZpos - this->obj.pos.z) * 0.05f); diff --git a/src/overlays/ovl_i1/fox_tr360.c b/src/overlays/ovl_i1/fox_tr360.c index 279555b2..da0500e6 100644 --- a/src/overlays/ovl_i1/fox_tr360.c +++ b/src/overlays/ovl_i1/fox_tr360.c @@ -121,11 +121,11 @@ void Training_80199024(Actor* actor) { } } else if ((actor->obj.pos.y < (gGroundHeight + 50.0f)) && (var_fv0 > 180.0f)) { var_fv0 = 0.0f; - actor->unk_0F4.x = 0.0f; + actor->rot_0F4.x = 0.0f; } - Math_SmoothStepToAngle(&actor->unk_0F4.x, var_fv0, 0.5f, 1.0f, 0.0001f); - temp_fv1 = Math_SmoothStepToAngle(&actor->unk_0F4.y, actor->fwork[19], 0.5f, 1.0f, 0.0001f) * 30.0f; + Math_SmoothStepToAngle(&actor->rot_0F4.x, var_fv0, 0.5f, 1.0f, 0.0001f); + temp_fv1 = Math_SmoothStepToAngle(&actor->rot_0F4.y, actor->fwork[19], 0.5f, 1.0f, 0.0001f) * 30.0f; if (temp_fv1 < 0.0f) { var_fv0_2 = temp_fv1 * -1.0f; @@ -134,8 +134,8 @@ void Training_80199024(Actor* actor) { } Math_SmoothStepToAngle(&actor->obj.rot.z, var_fv0_2, 0.1f, 3.0f, 0.01f); - actor->obj.rot.x = -actor->unk_0F4.x; - actor->obj.rot.y = actor->unk_0F4.y; + actor->obj.rot.x = -actor->rot_0F4.x; + actor->obj.rot.y = actor->rot_0F4.y; actor->vel.x = actor->fwork[13] + (sinRotY * (cosRotX * 35.0f)); actor->vel.y = actor->fwork[14] + (-sinRotX * 35.0f); actor->vel.z = actor->fwork[12] + (cosRotY * (cosRotX * 35.0f)); @@ -153,7 +153,7 @@ void Training_80199024(Actor* actor) { radarMark->pos.x = actor->obj.pos.x; radarMark->pos.y = actor->obj.pos.y; radarMark->pos.z = actor->obj.pos.z; - radarMark->yRot = actor->unk_0F4.y + 180.0f; + radarMark->yRot = actor->rot_0F4.y + 180.0f; if (actor->iwork[8] != 0) { actor->iwork[8]--; } @@ -197,10 +197,10 @@ void Training_8019949C(void) { actor->obj.pos.x = sp38.x; actor->obj.pos.y = 2000.0f; actor->obj.pos.z = sp38.z; - actor->unk_0F4.y = gGameFrameCount * 6.0f; + actor->rot_0F4.y = gGameFrameCount * 6.0f; actor->aiType = i + AI360_10; actor->health = 24; - actor->unk_0C9 = actor->iwork[11] = 1; + actor->drawShadow = actor->iwork[11] = 1; actor->timer_0C2 = 30; Object_SetInfo(&actor->info, actor->obj.id); AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); diff --git a/src/overlays/ovl_i1/fox_ve1.c b/src/overlays/ovl_i1/fox_ve1.c index 313c7fb1..d70f6c5d 100644 --- a/src/overlays/ovl_i1/fox_ve1.c +++ b/src/overlays/ovl_i1/fox_ve1.c @@ -315,8 +315,8 @@ void Venom1_801924A8(Scenery* scenery) { switch (scenery->state) { case 0: if (gPlayer[0].pos.z < scenery->obj.pos.z) { - D_ctx_80177AB0 = 0; - D_ctx_80177A98 = 0; + gDrawBackdrop = 0; + gDrawGround = false; scenery->state++; } @@ -628,7 +628,7 @@ void Venom1_80192CD4(Actor* actor) { if (actor->iwork[1] > 0) { gControllerRumbleFlags[0] = 1; - actor->iwork[1] -= 1; + actor->iwork[1]--; } switch (actor->state) { @@ -783,15 +783,15 @@ void Venom1_801933DC(Actor* actor) { AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 0); } - if ((actor->unk_0B6 == 38) || (actor->unk_0B6 == 58)) { + if ((actor->animFrame == 38) || (actor->animFrame == 58)) { AUDIO_PLAY_SFX(NA_SE_OB_ARM_SWING, actor->sfxSource, 0); } - Animation_GetFrameData(&D_VE1_900D098, actor->unk_0B6, actor->vwork); + Animation_GetFrameData(&D_VE1_900D098, actor->animFrame, actor->vwork); - if (actor->unk_0B6 < (Animation_GetFrameCount(&D_VE1_900D098) - 1)) { - actor->unk_0B6++; + if (actor->animFrame < (Animation_GetFrameCount(&D_VE1_900D098) - 1)) { + actor->animFrame++; } else { - actor->unk_0B6 = 0; + actor->animFrame = 0; } hitboxData = actor->info.hitbox; hitboxData[1 + (10 * 0) + 7] = actor->vwork[3].y; @@ -814,12 +814,12 @@ void Venom1_Boss319_Init(Boss319* this) { s32 var_v0; s32 j; - D_ctx_8017812C = 1; + gGroundClipMode = 1; D_i1_8019C0B8 = 0; D_i1_8019C0BC = 0; D_i1_8019C0C0 = 0; - gBossActive = 1; - this->unk_05E = 1; + gBossActive = true; + this->drawShadow = true; this->fwork[2] = D_i1_8019A04C[this->swork[13]][0]; this->fwork[14] = D_i1_8019A04C[this->swork[13]][1]; this->health = 100; @@ -1581,7 +1581,7 @@ void Venom1_Boss_Update(Boss* boss) { if (boss->health <= 0) { gScreenFlashTimer = 8; gTeamLowHealthMsgTimer = -1; - D_ctx_8017828C = 1; + gKillEventActors = true; AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, boss->sfxSource, 4); boss->health = 0; } @@ -1629,7 +1629,7 @@ void Venom1_Boss_Update(Boss* boss) { if (boss->health <= 0) { gScreenFlashTimer = 8; gTeamLowHealthMsgTimer = -1; - D_ctx_8017828C = 1; + gKillEventActors = true; AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, boss->sfxSource, 4); boss->health = 0; } @@ -1916,7 +1916,7 @@ void Venom1_Boss_Update(Boss* boss) { AUDIO_PLAY_SFX(NA_SE_OB_VEBOSS_BOUND, boss->sfxSource, 4); boss->swork[26] = 1; boss->info.hitbox = gNoHitbox; - boss->unk_05E = 0; + boss->drawShadow = false; func_effect_8007A568(boss->obj.pos.x, boss->obj.pos.y + 10.0f, boss->obj.pos.z, 40.0f); gCameraShake = 40; break; diff --git a/src/overlays/ovl_i2/fox_me.c b/src/overlays/ovl_i2/fox_me.c index 3a02b9f1..16b1e285 100644 --- a/src/overlays/ovl_i2/fox_me.c +++ b/src/overlays/ovl_i2/fox_me.c @@ -214,7 +214,7 @@ void Meteo_80187C68(Actor* actor, f32 x, f32 y, f32 z, f32 arg4, f32 xRot, f32 y actor->timer_0BC = timerBC; actor->timer_0BE = 20; - actor->unk_0B4 = arg8; + actor->eventType = arg8; actor->fwork[5] = arg4; Object_SetInfo(&actor->info, actor->obj.id); } @@ -366,22 +366,22 @@ void Meteo_80188344(Boss* boss) { boss->obj.pos.z = gBosses[0].obj.pos.z; boss->obj.rot.x = gBosses[0].obj.rot.x; boss->obj.rot.y = gBosses[0].obj.rot.y; - boss->obj.rot.z = (gBosses[0].obj.rot.z + boss->unk_078.z) + 45.0f + 180.0f; + boss->obj.rot.z = gBosses[0].obj.rot.z + boss->rot_078.z + 45.0f + 180.0f; } switch (boss->state) { case 0: boss->timer_050 = 150; - boss->unk_078.z += 2.5f; + boss->rot_078.z += 2.5f; break; case 1: - temp = fabsf(90.0f - boss->unk_078.z) * 0.1f; + temp = fabsf(90.0f - boss->rot_078.z) * 0.1f; if (temp > 2.5f) { temp = 2.5f; } - boss->unk_078.z += temp; + boss->rot_078.z += temp; if (boss->timer_050 == 0) { boss->state = 2; @@ -398,7 +398,7 @@ void Meteo_80188344(Boss* boss) { Audio_SetTransposeAndPlaySfx(boss->sfxSource, NA_SE_EN_GRN_BEAM_CHARGE, boss->unk_04A); boss->unk_04A++; - if (boss->unk_04A >= 8) { + if (boss->unk_04A > 7) { boss->unk_04A = 7; } @@ -459,11 +459,11 @@ void Meteo_80188344(Boss* boss) { break; } - if (boss->unk_078.z >= 360.0f) { - boss->unk_078.z -= 360.0f; + if (boss->rot_078.z >= 360.0f) { + boss->rot_078.z -= 360.0f; } - if (boss->unk_078.z < 0.0f) { - boss->unk_078.z += 360.0f; + if (boss->rot_078.z < 0.0f) { + boss->rot_078.z += 360.0f; } } @@ -506,7 +506,7 @@ void Meteo_Boss297_Init(Boss297* this) { AUDIO_PLAY_BGM(D_boss_800C9E90[gCurrentLevel]); - gBossActive = 1; + gBossActive = true; this->swork[2] = 40; this->swork[3] = 40; @@ -792,7 +792,7 @@ void Meteo_8018978C(Boss* boss) { Matrix_RotateX(gCalcMatrix, boss->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, MTXF_APPLY); - if (gGameFrameCount & 0x10) { + if ((gGameFrameCount & 0x10) != 0) { boss->swork[19] += 32; if (boss->swork[19] > 128) { boss->swork[19] = 128; @@ -875,7 +875,7 @@ void Meteo_8018978C(Boss* boss) { if (boss[0].swork[2 + boss->dmgPart] <= 0) { boss[0].swork[2 + boss->dmgPart] = 0; Meteo_801892F0(boss, boss->dmgPart); - boss->swork[20] += 1; + boss->swork[20]++; if (boss->swork[20] == 2) { Radio_PlayMessage(gMsg_ID_17160, RCID_PEPPY); } @@ -1171,15 +1171,15 @@ void Meteo_8018978C(Boss* boss) { boss->obj.rot.z += 0.1f; } if (boss->swork[3] == 0) { - var_v0 += 1; + var_v0++; boss->obj.rot.z += 0.1f; } if (boss->swork[4] == 0) { - var_v0 += 1; + var_v0++; boss->obj.rot.z += 0.1f; } if (boss->swork[5] == 0) { - var_v0 += 1; + var_v0++; boss->obj.rot.z += 0.1f; } if (var_v0 == 4) { @@ -1198,7 +1198,7 @@ void Meteo_8018978C(Boss* boss) { if (boss->fwork[2] > 0.0f) { boss->fwork[2] -= 2.0f; - gBosses[boss->unk_044].unk_078.z -= 2.0f; + gBosses[boss->unk_044].rot_078.z -= 2.0f; } } @@ -1781,12 +1781,12 @@ void Meteo_8018C77C(Actor* actor, s32 arg1) { actor->obj.pos.y = D_i2_80195594[arg1] + gPlayer[0].pos.y; actor->obj.pos.z = D_i2_801955A4[arg1] + gPlayer[0].trueZpos; - actor->unk_0B6 = D_i2_801955B4[arg1]; + actor->animFrame = D_i2_801955B4[arg1]; actor->obj.rot.y = 180.0f; Object_SetInfo(&actor->info, actor->obj.id); actor->info.cullDistance = 200.0f; - if (actor->unk_0B6 == 0) { + if (actor->animFrame == 0) { actor->iwork[11] = 1; AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); return; @@ -1838,7 +1838,7 @@ void Meteo_8018CAD8(void) { actor->obj.pos.x = 0.0f; actor->obj.pos.y = 0.0f; actor->obj.pos.z = 9000.0f; - actor->unk_0B6 = 10; + actor->animFrame = 10; actor->obj.id = OBJ_ACTOR_CUTSCENE; Object_SetInfo(&actor->info, actor->obj.id); } @@ -2191,15 +2191,15 @@ void Meteo_8018DF08(Actor* actor, s32 idx) { actor->obj.pos.y = D_i2_801955D0[idx].y + gPlayer[0].pos.y; actor->obj.pos.z = D_i2_801955D0[idx].z + gPlayer[0].trueZpos; - actor->unk_0F4.y = 0.0f; - actor->unk_0F4.z = D_i2_80195600[idx]; + actor->rot_0F4.y = 0.0f; + actor->rot_0F4.z = D_i2_80195600[idx]; Object_SetInfo(&actor->info, actor->obj.id); if (idx == 3) { AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, actor->sfxSource, 0); - actor->unk_0B6 = 1; + actor->animFrame = 1; } else { actor->iwork[11] = 1; AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); @@ -2489,7 +2489,7 @@ void Meteo_8018ED9C(Actor* actor) { Math_SmoothStepToF(&actor->obj.pos.x, actor->vwork[0].x, 0.02f, 50.0f, 0.0001f); Math_SmoothStepToF(&actor->obj.pos.y, actor->vwork[0].y, 0.02f, 50.0f, 0.0001f); Math_SmoothStepToF(&actor->obj.pos.z, actor->vwork[0].z, 0.02f, 50.0f, 0.0001f); - Math_SmoothStepToF(&actor->unk_0F4.z, 0.0f, 0.03f, 0.5f, 0.0001f); + Math_SmoothStepToF(&actor->rot_0F4.z, 0.0f, 0.03f, 0.5f, 0.0001f); break; case 1: @@ -2501,15 +2501,15 @@ void Meteo_8018ED9C(Actor* actor) { case 2: actor->iwork[11] = 2; actor->fwork[0] += 2.0f; - actor->unk_0F4.x += 0.1f; + actor->rot_0F4.x += 0.1f; if (actor->timer_0BC == 0) { Object_Kill(&actor->obj, actor->sfxSource); } break; } - Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, 0U); - Matrix_RotateX(gCalcMatrix, -(actor->unk_0F4.x * M_DTOR), 1U); + Matrix_RotateY(gCalcMatrix, (actor->rot_0F4.y + 180.0f) * M_DTOR, 0U); + Matrix_RotateX(gCalcMatrix, -(actor->rot_0F4.x * M_DTOR), 1U); sp3C.x = 0.0f; sp3C.y = 0.0f; @@ -2521,7 +2521,7 @@ void Meteo_8018ED9C(Actor* actor) { actor->vel.y = sp30.y; actor->vel.z = sp30.z; - actor->obj.rot.x = -actor->unk_0F4.x; - actor->obj.rot.y = actor->unk_0F4.y + 180.0f; - actor->obj.rot.z = -actor->unk_0F4.z; + actor->obj.rot.x = -actor->rot_0F4.x; + actor->obj.rot.y = actor->rot_0F4.y + 180.0f; + actor->obj.rot.z = -actor->rot_0F4.z; } diff --git a/src/overlays/ovl_i2/fox_sx.c b/src/overlays/ovl_i2/fox_sx.c index 3ee43587..6412593b 100644 --- a/src/overlays/ovl_i2/fox_sx.c +++ b/src/overlays/ovl_i2/fox_sx.c @@ -24,7 +24,7 @@ void SectorX_8018F030(void) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; actor->obj.id = OBJ_ACTOR_SLIPPY_SX; - actor->unk_0B6 = 1; + actor->animFrame = 1; actor->obj.rot.y = 180.0f; actor->obj.pos.x = gPlayer[0].cam.eye.x - 300.0f; actor->obj.pos.y = gPlayer[0].cam.eye.y + 200.0f; @@ -44,7 +44,7 @@ void SectorX_8018F124(void) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; actor->obj.id = OBJ_ACTOR_SLIPPY_SX; - actor->unk_0B6 = -1; + actor->animFrame = -1; actor->obj.pos.x = gPlayer[0].cam.eye.x + 3000.0f; actor->obj.pos.y = gPlayer[0].cam.eye.y - 3000.0f; actor->obj.pos.z = gPlayer[0].pos.z + 30000.0f; @@ -59,33 +59,33 @@ void SectorX_8018F1DC(Actor* actor) { src.x = 0.0f; src.y = 0.0f; src.z = 100.0f; - Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, actor->unk_0F4.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (actor->rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, actor->rot_0F4.x * M_DTOR, MTXF_APPLY); Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); Actor_SpawnPlayerLaser(actor->index, actor->obj.pos.x + (dest.x * 1.5), actor->obj.pos.y + (dest.y * 1.5), - actor->obj.pos.z + (dest.z * 1.5), dest.x, dest.y, dest.z, actor->unk_0F4.x, - actor->unk_0F4.y + 180.0f, 0.0f); + actor->obj.pos.z + (dest.z * 1.5), dest.x, dest.y, dest.z, actor->rot_0F4.x, + actor->rot_0F4.y + 180.0f, 0.0f); } void SectorX_8018F330(Actor* actor) { f32 sp34; - switch (actor->unk_0B6) { + switch (actor->animFrame) { case 0: actor->obj.rot.x += 7.0f; actor->obj.rot.y += 5.0f; break; case 1: - actor->unk_0F4.z += 3.0f; - actor->obj.rot.z = SIN_DEG(actor->unk_0F4.z + 90.0f) * 60.0f; + actor->rot_0F4.z += 3.0f; + actor->obj.rot.z = SIN_DEG(actor->rot_0F4.z + 90.0f) * 60.0f; sp34 = fabsf(actor->obj.pos.z - gBosses[0].obj.pos.z) * 0.1f; - Math_SmoothStepToF(&actor->obj.pos.x, gBosses[0].obj.pos.x + SIN_DEG(actor->unk_0F4.z) * sp34, 0.1f, 20.0f, + Math_SmoothStepToF(&actor->obj.pos.x, gBosses[0].obj.pos.x + SIN_DEG(actor->rot_0F4.z) * sp34, 0.1f, 20.0f, 0.0f); Math_SmoothStepToF(&actor->obj.pos.y, gBosses[0].obj.pos.y, 0.1f, 20.0f, 0.0f); Math_SmoothStepToF(&actor->obj.pos.z, gBosses[0].obj.pos.z, 1.0f, 55.0f, 0); if (gBosses[0].state == 20) { - actor->unk_0B6 = 10; + actor->animFrame = 10; break; } @@ -94,7 +94,7 @@ void SectorX_8018F330(Actor* actor) { } if ((gBosses[0].unk_04C == 75) && (gBosses[0].state == 85)) { - actor->unk_0B6 = 2; + actor->animFrame = 2; actor->vel.x = 10.0f; actor->vel.y = -10.0f; actor->vel.z = 30.0f; @@ -133,7 +133,7 @@ void SectorX_8018F330(Actor* actor) { Math_SmoothStepToF(&gPlayer[0].cam.eye.y, actor->obj.pos.y, actor->fwork[1], 20.0f, 0.0f); if (actor->timer_0BC == 0) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ACTIVE; - if (gPlayer[0].cockpitView) { + if (gPlayer[0].alternateView) { Camera_UpdateCockpitOnRails(&gPlayer[0], 1); } gProjectFar = 12800.0f; @@ -152,7 +152,7 @@ void SectorX_8018F330(Actor* actor) { } void SectorX_8018F884(Actor* actor) { - switch (actor->unk_0B6) { + switch (actor->animFrame) { case 0: gSPDisplayList(gMasterDisp++, D_SX_6020D20); break; @@ -228,7 +228,7 @@ void SectorX_8018FBBC(Vec3f* pos) { (fabsf(pos->z - actor->obj.pos.z) < 2500.0f) && (actor->state != 1000) && (actor->timer_0C2 == 0) && (actor->scale < 0.0f) && Object_CheckHitboxCollision(pos, actor->info.hitbox, &actor->obj, actor->vwork[29].x, actor->vwork[29].y, - actor->vwork[29].z + actor->unk_0F4.z)) { + actor->vwork[29].z + actor->rot_0F4.z)) { Play_PlaySfxFirstPlayer(actor->sfxSource, NA_SE_SLIPPY_HIT); actor->state = 1000; xRot = Math_Atan2F(actor->obj.pos.x - pos->x, actor->obj.pos.z - pos->z); @@ -511,7 +511,7 @@ void SectorX_80190078(Boss* boss) { boss->swork[3] = 400; boss->health = 300; boss->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SX_6032550); - gBossActive = 1; + gBossActive = true; AUDIO_PLAY_BGM(D_boss_800C9E90[gCurrentLevel]); boss->swork[6] = 1; boss->fwork[44] = 5.0f; @@ -957,7 +957,7 @@ void SectorX_80190078(Boss* boss) { } else { boss->state = 35; boss->timer_050 = 400; - boss->fwork[42] = boss->fwork[43] = boss->fwork[44] = boss->unk_078.y = 0.0f; + boss->fwork[42] = boss->fwork[43] = boss->fwork[44] = boss->rot_078.y = 0.0f; boss->swork[9] = RAND_INT(1.9f); Radio_PlayMessage(gMsg_ID_5498, RCID_BOSS_SECTORX); } @@ -1004,8 +1004,8 @@ void SectorX_80190078(Boss* boss) { Math_SmoothStepToVec3fArray(sp80, boss->vwork, 1, frameData, boss->fwork[0], 5.0f, 0.0f); Math_SmoothStepToF(&boss->fwork[0], 0.1f, 1.0f, 0.001f, 0); - Math_SmoothStepToF(&boss->unk_078.y, 10.0f, 1.0f, 0.1f, 0); - Math_SmoothStepToF(&boss->obj.rot.y, 2880.0f, 0.1f, boss->unk_078.y, 0.1f); + Math_SmoothStepToF(&boss->rot_078.y, 10.0f, 1.0f, 0.1f, 0); + Math_SmoothStepToF(&boss->obj.rot.y, 2880.0f, 0.1f, boss->rot_078.y, 0.1f); if ((boss->timer_050 == 0) && (boss->obj.rot.y == 2880.0f)) { boss->obj.rot.y = 0.0f; @@ -1418,7 +1418,7 @@ void SectorX_80193800(Actor* actor, s32 arg1) { actor->obj.pos.z = D_i2_801956B0[arg1].z; actor->vel.z = 30.0f; actor->vel.y = -16.0f; - actor->unk_0B6 = 20; + actor->animFrame = 20; actor->obj.rot.x = 15.0f; Object_SetInfo(&actor->info, actor->obj.id); @@ -1506,7 +1506,7 @@ void SectorX_LevelStart(Player* player) { func_effect_80079618(gActors[5].obj.pos.x, gActors[5].obj.pos.y, gActors[5].obj.pos.z, 0.5f); } func_effect_8007A6F0(&gActors[5].obj.pos, NA_SE_EN_EXPLOSION_M); - player->csState += 1; + player->csState++; D_ctx_80177A48[0] = 0.1f; } break; @@ -1515,7 +1515,7 @@ void SectorX_LevelStart(Player* player) { if (gCsFrameCount == 170) { player->pos.x = 0.0f; player->pos.y = player->cam.eye.y + 50.0f; - player->csState += 1; + player->csState++; player->pos.z = player->cam.eye.z + 20.0f; player->unk_194 = 10.0f; player->unk_190 = 10.0f; @@ -1561,7 +1561,7 @@ void SectorX_LevelStart(Player* player) { } if (gCsFrameCount > 300) { - player->csState += 1; + player->csState++; player->csTimer = 40; D_ctx_80177A48[0] = 0.0f; gActors[0].obj.pos.z -= player->pos.z; @@ -1660,7 +1660,7 @@ void SectorX_801944D4(Actor* actor, s32 arg1) { actor->obj.id = OBJ_ACTOR_CUTSCENE; Object_SetInfo(&actor->info, actor->obj.id); if (arg1 == 3) { - actor->unk_0B6 = 1; + actor->animFrame = 1; actor->state = 20; actor->obj.rot.x = -player->rot.x - 10.0f; actor->obj.rot.y = (player->rot.y + 180.0f) - 10.0f; @@ -1688,13 +1688,13 @@ void SectorX_LevelComplete(Player* player) { Math_SmoothStepToAngle(&player->aerobaticPitch, 0.0f, 0.1f, 20.0f, 0.0f); Math_SmoothStepToF(&player->boostSpeed, 0.0f, 0.1f, 3.0f, 0.0f); - D_ctx_80178430 += 0.2f; - D_ctx_8017842C -= 0.2f; + gStarfieldScrollY += 0.2f; + gStarfieldScrollX -= 0.2f; switch (player->csState) { case 0: Audio_StopSfxByBankAndSource(1, player->sfxSource); - player->csState += 1; + player->csState++; D_ctx_80177A48[1] = 0.05f; D_ctx_80177A48[0] = 0.02f; D_ctx_80177A48[2] = 0.0f; diff --git a/src/overlays/ovl_i3/fox_a6.c b/src/overlays/ovl_i3/fox_a6.c index c73fb361..014b8565 100644 --- a/src/overlays/ovl_i3/fox_a6.c +++ b/src/overlays/ovl_i3/fox_a6.c @@ -451,7 +451,7 @@ void Area6_80187530(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 fwork6, f32 actor->obj.rot.y = yRot; actor->timer_0BC = timer0BC; actor->timer_0BE = 20; - actor->unk_0B4 = unk0B4; + actor->eventType = unk0B4; actor->fwork[5] = fwork6; Object_SetInfo(&actor->info, actor->obj.id); func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_BARREL_SHOT); @@ -497,7 +497,7 @@ void Area6_BossA6_Init(BossA6* this) { Hitbox* hitbox; s32 i; - gBossActive = 1; + gBossActive = true; gProjectFar = 25000.0f; gBossFrameCount = 0; this->health = 780; @@ -795,10 +795,10 @@ void Area6_Boss_Update(Boss* bossA6) { pitch_110 = Math_Atan2F(dy_118, sqrtf(SQ(dx_11C) + SQ(dz_114))); pitch_110 = Math_RadToDeg(-pitch_110); - Math_SmoothStepToAngle(&bossA6->unk_078.y, yaw_10C, 1.0f, sp104, 0.00001f); - Math_SmoothStepToAngle(&bossA6->unk_078.x, pitch_110, 1.0f, sp104, 0.00001f); - Matrix_RotateY(gCalcMatrix, bossA6->unk_078.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, bossA6->unk_078.x * M_DTOR, MTXF_APPLY); + Math_SmoothStepToAngle(&bossA6->rot_078.y, yaw_10C, 1.0f, sp104, 0.00001f); + Math_SmoothStepToAngle(&bossA6->rot_078.x, pitch_110, 1.0f, sp104, 0.00001f); + Matrix_RotateY(gCalcMatrix, bossA6->rot_078.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, bossA6->rot_078.x * M_DTOR, MTXF_APPLY); sp98.x = sp98.y = 0.0f; sp98.z = 30.0f; @@ -1717,7 +1717,7 @@ void Area6_8018B9BC(Boss* bossA6) { if (D_i3_801C2250[A6_BSS_0] == 0) { for (i = 3, j = 15; j < 18; j++, i++) { if (bossA6->swork[A6_SWK_0 + j] != 0) { - if ((D_ctx_8017812C != 0) && (gPlayerShots[15].timer > 0)) { + if ((gGroundClipMode != 0) && (gPlayerShots[15].timer > 0)) { bossA6->swork[A6_SWK_0 + j] -= bossA6->damage; } else if (i + 1 == bossA6->dmgPart) { bossA6->swork[A6_SWK_0 + j] -= bossA6->damage; @@ -1902,7 +1902,7 @@ void Area6_Boss_Draw(Boss* bossA6) { Matrix_RotateZ(gCalcMatrix, gGameFrameCount * 6.0f * M_DTOR, MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, &spAC, &spB8); Matrix_Translate(gGfxMatrix, spB8.x, spB8.y, 0.0f, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, bossA6->unk_3F8, bossA6->unk_3F8, bossA6->unk_3F8, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, bossA6->scale, bossA6->scale, bossA6->scale, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 10.0f * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, bossA6->fwork[A6_FWK_34], bossA6->fwork[A6_FWK_35], 1.0f, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, -(f32) gGameFrameCount * 10.0f * M_DTOR, MTXF_APPLY); @@ -1920,7 +1920,7 @@ void Area6_Boss_Draw(Boss* bossA6) { spD0[4].z -= bossA6->fwork[A6_FWK_0]; spD0[5].z -= bossA6->fwork[A6_FWK_0]; Animation_DrawSkeleton(1, D_A6_6018BA0, spD0, NULL, NULL, &bossA6->index, &gIdentityMatrix); - if (bossA6->unk_3F8 >= 1.0f) { + if (bossA6->scale >= 1.0f) { for (i = 0; i < 3; i++) { if ((bossA6->swork[A6_SWK_33 + i] == 0) && (bossA6->state != 3) && (D_i3_801C2250[A6_BSS_2_0 + i] == 0) && ((gGameFrameCount % 4) == 0) && @@ -2112,7 +2112,7 @@ void Area6_8018D5C8(void) { gActors[i].obj.pos.x = 1600.0f; gActors[i].obj.pos.y = 3750.0f; gActors[i].obj.pos.z = 13000.0f; - gActors[i].unk_0B6 = 1; + gActors[i].animFrame = 1; gActors[i].state = 90; gActors[i].fwork[0] = 0.0f; gActors[i].obj.id = OBJ_ACTOR_CUTSCENE; @@ -2133,9 +2133,9 @@ void Area6_8018D694(Actor* actor, s32 arg1) { actor->obj.pos.y = sp2C[arg1].y + 350.0f; actor->obj.pos.z = sp2C[arg1].z + 1000.0f; actor->state = 1; - actor->unk_0B6 = 28; + actor->animFrame = 28; actor->iwork[11] = 1; - actor->unk_0F4.y = 90.0f; + actor->rot_0F4.y = 90.0f; actor->fwork[0] = 1.5f; actor->fwork[7] = RAND_FLOAT_SEEDED(360.0f); actor->fwork[8] = RAND_FLOAT_SEEDED(360.0f); @@ -2196,19 +2196,19 @@ void Area6_8018DA58(Actor* actor) { switch (actor->state) { /* irregular */ case 1: actor->fwork[7] += 2.5f; - actor->unk_0F4.z = SIN_DEG(actor->fwork[7]) * 10.0f; + actor->rot_0F4.z = SIN_DEG(actor->fwork[7]) * 10.0f; actor->fwork[8] += 1.0f; actor->obj.pos.y += SIN_DEG(actor->fwork[8]) * 1.5f; actor->fwork[9] += 1.0f; actor->obj.pos.z += COS_DEG(actor->fwork[9]) * 1.5f; break; case 2: - Math_SmoothStepToF(&actor->unk_0F4.z, -180.0f, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToF(&actor->rot_0F4.z, -180.0f, 0.1f, 3.0f, 0.0f); break; case 3: - Math_SmoothStepToF(&actor->unk_0F4.z, -45.0f, 0.05f, 2.0f, 0.0f); - Math_SmoothStepToAngle(&actor->unk_0F4.y, 340.0f, 0.05f, 2.4f, 0.0f); - Math_SmoothStepToF(&actor->unk_0F4.x, 3.0f, 0.05f, 1.0f, 0.0f); + Math_SmoothStepToF(&actor->rot_0F4.z, -45.0f, 0.05f, 2.0f, 0.0f); + Math_SmoothStepToAngle(&actor->rot_0F4.y, 340.0f, 0.05f, 2.4f, 0.0f); + Math_SmoothStepToF(&actor->rot_0F4.x, 3.0f, 0.05f, 1.0f, 0.0f); Math_SmoothStepToF(&actor->fwork[0], 30.0f, 0.1f, 3.0f, 0.0f); break; case 6: @@ -2248,9 +2248,9 @@ void Area6_8018DA58(Actor* actor) { if (sp40 > 180.0f) { sp40 = 0.0f; } - sp38 = Math_SmoothStepToAngle(&actor->unk_0F4.y, sp3C, 0.5f, 2.0f, 0.0001f) * 30.0f; - Math_SmoothStepToAngle(&actor->unk_0F4.x, sp40, 0.5f, 2.0f, 0.0001f); - Math_SmoothStepToAngle(&actor->unk_0F4.z, sp38, 0.1f, 5.0f, 0.0001f); + sp38 = Math_SmoothStepToAngle(&actor->rot_0F4.y, sp3C, 0.5f, 2.0f, 0.0001f) * 30.0f; + Math_SmoothStepToAngle(&actor->rot_0F4.x, sp40, 0.5f, 2.0f, 0.0001f); + Math_SmoothStepToAngle(&actor->rot_0F4.z, sp38, 0.1f, 5.0f, 0.0001f); break; case 91: Math_SmoothStepToF(&actor->obj.pos.y, 0.0f, 0.1f, 5.0f, 0.1f); @@ -2259,8 +2259,8 @@ void Area6_8018DA58(Actor* actor) { case 90: break; } - Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(actor->unk_0F4.x * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (actor->rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(actor->rot_0F4.x * M_DTOR), MTXF_APPLY); sp5C.x = 0.0f; sp5C.y = 0.0f; sp5C.z = actor->fwork[0]; @@ -2268,9 +2268,9 @@ void Area6_8018DA58(Actor* actor) { actor->vel.x = sp50.x; actor->vel.y = sp50.y; actor->vel.z = sp50.z; - actor->obj.rot.x = -actor->unk_0F4.x; - actor->obj.rot.y = actor->unk_0F4.y + 180.0f; - actor->obj.rot.z = -actor->unk_0F4.z; + actor->obj.rot.x = -actor->rot_0F4.x; + actor->obj.rot.y = actor->rot_0F4.y + 180.0f; + actor->obj.rot.z = -actor->rot_0F4.z; } void Area6_LevelStart(Player* player) { @@ -2479,7 +2479,7 @@ void Area6_8018EA88(Actor* actor) { actor->obj.pos.x = 0.0f; actor->obj.pos.y = 0.0f; actor->obj.pos.z = gBosses[0].obj.pos.z + 500.0f; - actor->unk_0B6 = 37; + actor->animFrame = 37; actor->state = 100; actor->iwork[0] = 255; actor->iwork[1] = 255; @@ -2503,7 +2503,7 @@ void Area6_8018EB3C(Actor* actor) { actor->obj.pos.x = player->pos.x; actor->obj.pos.y = player->pos.y + 600.0f; actor->obj.pos.z = player->pos.z + 2800.0f; - actor->unk_0B6 = 1; + actor->animFrame = 1; actor->state = 100; actor->fwork[0] = 0.0f; Object_SetInfo(&actor->info, actor->obj.id); @@ -2741,7 +2741,7 @@ void Area6_LevelComplete(Player* player) { gPrevPlanetTeamShields[i] = 255; } } - D_ctx_80161A94[0] = gGoldRingCount[0]; + gSavedGoldRingCount[0] = gGoldRingCount[0]; Audio_StopPlayerNoise(0); Audio_KillSfxBySource(player->sfxSource); Play_ClearObjectData(); diff --git a/src/overlays/ovl_i3/fox_aq.c b/src/overlays/ovl_i3/fox_aq.c index 1928ddf8..9b52b513 100644 --- a/src/overlays/ovl_i3/fox_aq.c +++ b/src/overlays/ovl_i3/fox_aq.c @@ -330,8 +330,8 @@ void Aquas_801A92EC(Actor* actor, f32 xUnk, f32 yUnk, f32 zUnk, s32 index, s32 m gTexturedLines[index].posBB.x = xUnk; gTexturedLines[index].posBB.y = yUnk; gTexturedLines[index].posBB.z = zUnk; - gTexturedLines[index].red = gTexturedLines[index].green = gTexturedLines[index].blue = gTexturedLines[index].alpha = - 255; + gTexturedLines[index].prim.r = gTexturedLines[index].prim.g = gTexturedLines[index].prim.b = + gTexturedLines[index].prim.a = 255; gTexturedLines[index].timer = 3; } @@ -1457,7 +1457,7 @@ void Aquas_BlueMarineBoost(Player* player) { player->meteoWarpSpinSpeed = 50.0f; } if (((gGameFrameCount % 2) == 0) && (gBlurAlpha > 64)) { - gBlurAlpha -= 1; + gBlurAlpha -= 1; // can't be -- } } else { player->meteoWarpSpinSpeed = 0.0f; @@ -1567,9 +1567,9 @@ void Aquas_801AD598(Actor* actor) { D_i3_801C27C0->rot.x = actor->obj.rot.x; D_i3_801C27C0->rot.y = actor->obj.rot.y; D_i3_801C27C0->rot.z = actor->obj.rot.z; - D_i3_801C27C0->rot.x = actor->unk_0F4.x; - D_i3_801C27C0->rot.y = actor->unk_0F4.y; - D_i3_801C27C0->rot.z = actor->unk_0F4.z; + D_i3_801C27C0->rot.x = actor->rot_0F4.x; + D_i3_801C27C0->rot.y = actor->rot_0F4.y; + D_i3_801C27C0->rot.z = actor->rot_0F4.z; } } @@ -1605,18 +1605,18 @@ void Aquas_801AD6C0(Actor* actor) { Object_Kill(&actor->obj, actor->sfxSource); } - actor->unk_04E++; + actor->counter_04E++; - if (actor->unk_04E >= 50) { - actor->unk_04E = 0; + if (actor->counter_04E >= 50) { + actor->counter_04E = 0; } switch (actor->state) { case 0: if (actor->timer_0BC != 0) { - actor->unk_0F4.x += D_i3_801C4308[10]; - actor->unk_0F4.z += 10.0f; - actor->unk_0F4.z = Math_ModF(actor->unk_0F4.z, 360.0f); + actor->rot_0F4.x += D_i3_801C4308[10]; + actor->rot_0F4.z += 10.0f; + actor->rot_0F4.z = Math_ModF(actor->rot_0F4.z, 360.0f); } else { actor->health = 30; AUDIO_PLAY_SFX(NA_SE_EN_SANADA_SWIM, actor->sfxSource, 4); @@ -1661,8 +1661,8 @@ void Aquas_801AD6C0(Actor* actor) { actor->fwork[6] = (actor->iwork[0] + 1) * 0.2f; sp7C = SIN_DEG(actor->fwork[0]) * sp70 * actor->fwork[5]; sp74 = COS_DEG(actor->fwork[1]) * sp70 * actor->fwork[6]; - sp80 = COS_DEG(actor->unk_0F4.y) * sp74; - sp78 = -SIN_DEG(actor->unk_0F4.y) * sp74; + sp80 = COS_DEG(actor->rot_0F4.y) * sp74; + sp78 = -SIN_DEG(actor->rot_0F4.y) * sp74; if (sp7C < 20.0f) { sp7C = 20.0f; @@ -1672,10 +1672,10 @@ void Aquas_801AD6C0(Actor* actor) { actor->fwork[2] = 360.0f; } - Math_SmoothStepToF(&actor->unk_0F4.z, actor->fwork[2], 0.1f, 10.0f, 0.001f); + Math_SmoothStepToF(&actor->rot_0F4.z, actor->fwork[2], 0.1f, 10.0f, 0.001f); - if (actor->unk_0F4.z >= 360.0f) { - actor->unk_0F4.z = 0.0f; + if (actor->rot_0F4.z >= 360.0f) { + actor->rot_0F4.z = 0.0f; actor->fwork[2] = 0.0f; } @@ -1684,14 +1684,14 @@ void Aquas_801AD6C0(Actor* actor) { sp6C = Math_RadToDeg(-Math_Atan2F(gPlayer[0].pos.y - 30.0f + sp7C - actor->obj.pos.y, sp70)); if (gPlayer[0].trueZpos <= actor->obj.pos.z) { - sp68 = actor->unk_0F4.y; - sp6C = actor->unk_0F4.x; + sp68 = actor->rot_0F4.y; + sp6C = actor->rot_0F4.x; } - Math_SmoothStepToAngle(&actor->unk_0F4.y, sp68, 1.0f, 5.0f, 0.001f); - Math_SmoothStepToAngle(&actor->unk_0F4.x, sp6C, 1.0f, 5.0f, 0.001f); - Matrix_RotateY(gCalcMatrix, actor->unk_0F4.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, actor->unk_0F4.x * M_DTOR, MTXF_APPLY); + Math_SmoothStepToAngle(&actor->rot_0F4.y, sp68, 1.0f, 5.0f, 0.001f); + Math_SmoothStepToAngle(&actor->rot_0F4.x, sp6C, 1.0f, 5.0f, 0.001f); + Matrix_RotateY(gCalcMatrix, actor->rot_0F4.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, actor->rot_0F4.x * M_DTOR, MTXF_APPLY); sp5C.x = 0.0f; sp5C.y = 0.0f; @@ -1710,7 +1710,7 @@ void Aquas_801AD6C0(Actor* actor) { actor->timer_0C6 = 15; } if (actor->timer_0BC == 0) { - var_v0 = actor->iwork[0] * 50 + actor->unk_04E - D_i3_801BFB64[actor->iwork[1]]; + var_v0 = actor->iwork[0] * 50 + actor->counter_04E - D_i3_801BFB64[actor->iwork[1]]; if (var_v0 < actor->iwork[0] * 50) { if (var_v0 > 0) { var_v0 -= actor->iwork[0] * 50; @@ -1732,13 +1732,13 @@ void Aquas_801AD6C0(Actor* actor) { } break; } - D_i3_801C27C0 = &D_i3_801C27C8[50 * actor->iwork[0] + actor->unk_04E]; + D_i3_801C27C0 = &D_i3_801C27C8[50 * actor->iwork[0] + actor->counter_04E]; D_i3_801C27C0->pos.x = actor->obj.pos.x; D_i3_801C27C0->pos.y = actor->obj.pos.y; D_i3_801C27C0->pos.z = actor->obj.pos.z; - D_i3_801C27C0->rot.x = actor->unk_0F4.x; - D_i3_801C27C0->rot.y = actor->unk_0F4.y; - D_i3_801C27C0->rot.z = actor->unk_0F4.z; + D_i3_801C27C0->rot.x = actor->rot_0F4.x; + D_i3_801C27C0->rot.y = actor->rot_0F4.y; + D_i3_801C27C0->rot.z = actor->rot_0F4.z; } void Aquas_801ADF7C(f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 zRot, u8 type, s32 flag, f32 scale, @@ -1787,7 +1787,7 @@ void Aquas_801AE168(Actor* actor) { i = 1; } - index = ((actor->iwork[0] * 50) + actor->unk_04E) - D_i3_801BFB64[i]; + index = ((actor->iwork[0] * 50) + actor->counter_04E) - D_i3_801BFB64[i]; if (index < (actor->iwork[0] * 50)) { if (index > 0) { @@ -2201,11 +2201,11 @@ void Aquas_801AFA5C(Actor* actor) { sp48->obj.pos.x = actor->obj.pos.x; sp48->obj.pos.y = actor->obj.pos.y; sp48->obj.pos.z = actor->obj.pos.z; - sp48->obj.rot.x = sp48->unk_0F4.x = + sp48->obj.rot.x = sp48->rot_0F4.x = Math_ModF(actor->obj.rot.x + 270.0f + D_i3_801BFC7C[actor->iwork[0]], 360.0f); - sp48->obj.rot.y = sp48->unk_0F4.y = + sp48->obj.rot.y = sp48->rot_0F4.y = Math_ModF(actor->obj.rot.y + D_i3_801BFC88[actor->iwork[0]], 360.0f); - sp48->unk_0F4.z = actor->obj.rot.z; + sp48->rot_0F4.z = actor->obj.rot.z; sp48->obj.rot.z = actor->obj.rot.z; sp48->timer_0BC = 10; Object_SetInfo(&sp48->info, sp48->obj.id); @@ -2460,7 +2460,7 @@ void Aquas_BossAq_Init(BossAQ* this) { s32 i; Actor* actor; - gBossActive = 1; + gBossActive = true; gBossFrameCount = 0; this->health = 150; for (i = 0, actor = gActors; i < 2; actor++) { @@ -3022,7 +3022,7 @@ void Aquas_Boss_Update(Boss* bossAQ) { } if (bossAQ->swork[AQ_SWK_17] == 0) { bossAQ->swork[AQ_SWK_17] = 10; - bossAQ->swork[AQ_SWK_18] += 1; + bossAQ->swork[AQ_SWK_18]++; bossAQ->swork[AQ_SWK_18] &= 3; } if ((bossAQ->state >= 4) && (bossAQ->state < 16)) { @@ -3186,10 +3186,10 @@ void Aquas_Boss_Update(Boss* bossAQ) { } if (bossAQ->state >= 10) { sp110 = D_i3_801C42A0[9]; - i2 = (gGameFrameCount & 0x1F); + i2 = (gGameFrameCount & 0x1F); // % 0x20 if possible if (sBossAQlimbTimers[AQ_LIMB_9] != 0) { Math_SmoothStepToF(&sp110, 255.0f, 1.0f, 10, 0.0001f); - } else if (!(i2 & 0x10)) { + } else if ((i2 & 0x10) == 0) { Math_SmoothStepToF(&sp110, D_i3_801C005C, 1.0f, 10, 0.0001f); } else { Math_SmoothStepToF(&sp110, D_i3_801C0058, 1.0f, 10, 0.0001f); @@ -3649,7 +3649,7 @@ void Aquas_801B504C(Actor* actor) { Vec3f sp30[30]; Matrix_Scale(gCalcMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY); - Animation_GetFrameData(&D_AQ_6005954, actor->unk_0B6, sp30); + Animation_GetFrameData(&D_AQ_6005954, actor->animFrame, sp30); Animation_DrawSkeleton(3, D_AQ_6005A80, sp30, Aquas_801B4DDC, Aquas_801B4E94, actor, gCalcMatrix); } @@ -3781,12 +3781,12 @@ void Aquas_801B50E8(Actor* actor) { if (actor->state >= 2) { if (actor->state < 3) { - actor->unk_0B6++; + actor->animFrame++; } else { - actor->unk_0B6 += 3; + actor->animFrame += 3; } - if (actor->unk_0B6 >= Animation_GetFrameCount(&D_AQ_6005954)) { - actor->unk_0B6 = 0; + if (actor->animFrame >= Animation_GetFrameCount(&D_AQ_6005954)) { + actor->animFrame = 0; } } @@ -3937,7 +3937,7 @@ void Aquas_801B619C(Actor* actor) { Matrix_Push(&gCalcMatrix); Matrix_Push(&gGfxMatrix); Matrix_Scale(gCalcMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY); - Animation_GetFrameData(&D_AQ_6002628, actor->unk_0B6, sp40); + Animation_GetFrameData(&D_AQ_6002628, actor->animFrame, sp40); Animation_DrawSkeleton(3, D_AQ_6002874, sp40, Aquas_801B5C18, Aquas_801B5F68, actor, gCalcMatrix); Matrix_Pop(&gGfxMatrix); Matrix_Pop(&gCalcMatrix); @@ -4017,9 +4017,9 @@ void Aquas_801B638C(Actor* actor) { actor->fwork[11] = 1200.0f; } - actor->unk_0B6++; - if (actor->unk_0B6 >= Animation_GetFrameCount(&D_AQ_6002628)) { - actor->unk_0B6 = 0; + actor->animFrame++; + if (actor->animFrame >= Animation_GetFrameCount(&D_AQ_6002628)) { + actor->animFrame = 0; } switch (actor->state) { @@ -4240,9 +4240,9 @@ void Aquas_801B6FF8(Actor* actor) { } } - actor->unk_0B6++; - if (Animation_GetFrameCount(&D_AQ_60260EC) < actor->unk_0B6) { - actor->unk_0B6 = 0; + actor->animFrame++; + if (Animation_GetFrameCount(&D_AQ_60260EC) < actor->animFrame) { + actor->animFrame = 0; } if (actor->dmgType != DMG_NONE) { @@ -4353,7 +4353,7 @@ void Aquas_801B7A24(Actor* actor) { RCP_SetupDL(&gMasterDisp, 0x3D); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } - Animation_GetFrameData(&D_AQ_60260EC, actor->unk_0B6, sp30); + Animation_GetFrameData(&D_AQ_60260EC, actor->animFrame, sp30); Animation_DrawSkeleton(3, D_AQ_60263F8, sp30, Aquas_801B76EC, Aquas_801B7754, actor, gCalcMatrix); } @@ -4482,9 +4482,9 @@ void Aquas_801B7C78(Actor* actor) { break; case 2: - actor->unk_0B6 += actor->iwork[1]; - if (actor->unk_0B6 >= Animation_GetFrameCount(&D_AQ_6024F80)) { - actor->unk_0B6 = 0; + actor->animFrame += actor->iwork[1]; + if (actor->animFrame >= Animation_GetFrameCount(&D_AQ_6024F80)) { + actor->animFrame = 0; actor->timer_0BE = 0; if (actor->iwork[1] >= 2) { @@ -4517,19 +4517,19 @@ void Aquas_801B7C78(Actor* actor) { actor->iwork[5]++; if (actor->timer_0C0 == 0) { Audio_KillSfxBySource(actor->sfxSource); - actor->unk_0B6++; - if (Animation_GetFrameCount(&D_AQ_602AC28) < actor->unk_0B6) { - actor->unk_0B6 = Animation_GetFrameCount(&D_AQ_6024F80) - 1; + actor->animFrame++; + if (Animation_GetFrameCount(&D_AQ_602AC28) < actor->animFrame) { + actor->animFrame = Animation_GetFrameCount(&D_AQ_6024F80) - 1; actor->state = 7; } } Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); - if ((actor->unk_0B6 < 21) && (actor->state == 4) && (actor->iwork[3] != 0)) { + if ((actor->animFrame < 21) && (actor->state == 4) && (actor->iwork[3] != 0)) { j = actor->iwork[3] - 1; effect = &gEffects[j]; - if (actor->unk_0B6 == 20) { + if (actor->animFrame == 20) { spAC = gPlayer[0].pos.x - effect->obj.pos.x; temp_dy = gPlayer[0].pos.y - effect->obj.pos.y; temp_dz = gPlayer[0].trueZpos - 50.0f - effect->obj.pos.z; @@ -4560,10 +4560,10 @@ void Aquas_801B7C78(Actor* actor) { } } - if ((actor->unk_0B6 < 58) && (actor->state == 4) && (actor->iwork[2] != 0)) { + if ((actor->animFrame < 58) && (actor->state == 4) && (actor->iwork[2] != 0)) { j = actor->iwork[2] - 1; effect = &gEffects[j]; - if (actor->unk_0B6 == 57) { + if (actor->animFrame == 57) { spAC = gPlayer[0].pos.x - effect->obj.pos.x; temp_dy = gPlayer[0].pos.y - effect->obj.pos.y; temp_dz = gPlayer[0].trueZpos - 50.0f - effect->obj.pos.z; @@ -4597,9 +4597,9 @@ void Aquas_801B7C78(Actor* actor) { case 5: Math_SmoothStepToAngle(&actor->obj.rot.x, 40.0f, 0.1f, 10.0f, 0); - actor->unk_0B6++; - if (actor->unk_0B6 >= Animation_GetFrameCount(&D_AQ_6024F80)) { - actor->unk_0B6 = Animation_GetFrameCount(&D_AQ_6024F80) - 1; + actor->animFrame++; + if (actor->animFrame >= Animation_GetFrameCount(&D_AQ_6024F80)) { + actor->animFrame = Animation_GetFrameCount(&D_AQ_6024F80) - 1; } if (actor->timer_0C0 == 0) { @@ -4622,9 +4622,9 @@ void Aquas_801B7C78(Actor* actor) { break; case 6: - actor->unk_0B6++; - if (actor->unk_0B6 >= Animation_GetFrameCount(&D_AQ_6024F80)) { - actor->unk_0B6 = Animation_GetFrameCount(&D_AQ_6024F80) - 1; + actor->animFrame++; + if (actor->animFrame >= Animation_GetFrameCount(&D_AQ_6024F80)) { + actor->animFrame = Animation_GetFrameCount(&D_AQ_6024F80) - 1; } Math_SmoothStepToAngle(&actor->obj.rot.x, 30.0f, 0.1f, 10.0f, 0); @@ -4636,9 +4636,9 @@ void Aquas_801B7C78(Actor* actor) { break; case 7: - actor->unk_0B6--; - if (actor->unk_0B6 <= 0) { - actor->unk_0B6 = 0; + actor->animFrame--; + if (actor->animFrame <= 0) { + actor->animFrame = 0; actor->timer_0BE = (s32) (100.0f + RAND_FLOAT(150.0f)); actor->state = 1; } @@ -4790,9 +4790,9 @@ void Aquas_801B90DC(Actor* actor) { Vec3f sp30[30]; if ((actor->state >= 3) && (actor->state < 5)) { - Animation_GetFrameData(&D_AQ_602AC28, actor->unk_0B6, sp30); + Animation_GetFrameData(&D_AQ_602AC28, actor->animFrame, sp30); } else { - Animation_GetFrameData(&D_AQ_6024F80, actor->unk_0B6, sp30); + Animation_GetFrameData(&D_AQ_6024F80, actor->animFrame, sp30); } Matrix_Translate(gCalcMatrix, 0.0f, -150.0f, 100.0f, MTXF_APPLY); Animation_DrawSkeleton(3, D_AQ_602512C, sp30, Aquas_801B8C50, Aquas_801B8D7C, actor, gCalcMatrix); @@ -4849,7 +4849,7 @@ void Aquas_801B91A4(Actor* actor) { } actor->health = 30; - actor->unk_0B6 = 19; + actor->animFrame = 19; actor->fwork[1] = actor->obj.pos.z; if (actor->obj.rot.z >= 4.0f) { @@ -4878,11 +4878,11 @@ void Aquas_801B91A4(Actor* actor) { break; case 1: - actor->unk_0B6++; - if (actor->unk_0B6 >= Animation_GetFrameCount(&D_AQ_6000AE4)) { - actor->unk_0B6 = 0; + actor->animFrame++; + if (actor->animFrame >= Animation_GetFrameCount(&D_AQ_6000AE4)) { + actor->animFrame = 0; } - if (actor->unk_0B6 == 36) { + if (actor->animFrame == 36) { actor->vel.x = actor->fwork[4]; actor->vel.y = actor->fwork[5]; actor->vel.z = actor->fwork[6]; @@ -4894,16 +4894,16 @@ void Aquas_801B91A4(Actor* actor) { i = 0; if (actor->iwork[1] != 0) { - if ((actor->unk_0B6 % 8) == 0) { + if ((actor->animFrame % 8) == 0) { i = 1; } } else { - if ((actor->unk_0B6 % 2) == 0) { + if ((actor->animFrame % 2) == 0) { i = 1; } } - if ((actor->unk_0B6 > 36) && (i != 0) && (fabsf(gPlayer[0].trueZpos - actor->obj.pos.z) > 1000.0f)) { + if ((actor->animFrame > 36) && (i != 0) && (fabsf(gPlayer[0].trueZpos - actor->obj.pos.z) > 1000.0f)) { spfA4 = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(200.0f) - actor->vwork[26].x; spA0 = gPlayer[0].pos.y + RAND_FLOAT_CENTERED(200.0f) - actor->vwork[26].y; spf9C = gPlayer[0].trueZpos + RAND_FLOAT_CENTERED(200.0f) - actor->vwork[26].z; @@ -4921,11 +4921,11 @@ void Aquas_801B91A4(Actor* actor) { break; case 2: - actor->unk_0B6++; - if ((actor->unk_0B6 >= Animation_GetFrameCount(&D_AQ_6000AE4)) && (actor->fwork[8] < 1.0f)) { - actor->unk_0B6 = 0; + actor->animFrame++; + if ((actor->animFrame >= Animation_GetFrameCount(&D_AQ_6000AE4)) && (actor->fwork[8] < 1.0f)) { + actor->animFrame = 0; } - if (actor->unk_0B6 == 40) { + if (actor->animFrame == 40) { actor->fwork[8] = 700.0f; Aquas_801A9728(actor, 50.0f, 10.0f, 8); } @@ -4933,13 +4933,13 @@ void Aquas_801B91A4(Actor* actor) { Math_SmoothStepToF(&actor->obj.pos.y, actor->fwork[7] + actor->fwork[8], 0.1f, 10.0f, 0.00001f); Math_SmoothStepToF(&actor->fwork[8], 0.0f, 0.1f, 10.0f, 0.0001f); - if (actor->unk_0B6 >= 40) { + if (actor->animFrame >= 40) { Aquas_801AC8A8(actor->obj.pos.x + RAND_FLOAT_CENTERED(70.0f), actor->obj.pos.y - 50.0f + RAND_FLOAT_CENTERED(50.0f), actor->obj.pos.z + RAND_FLOAT_CENTERED(100.0f), 1.0f, 0); } - if (actor->unk_0B6 >= 37) { + if (actor->animFrame >= 37) { actor->obj.rot.y += 20.0f; actor->fwork[2] += 20.0f; if (((gGameFrameCount % 4) == 0)) { @@ -5076,7 +5076,7 @@ void Aquas_801BA108(Actor* actor) { Matrix_RotateX(gCalcMatrix, (actor->obj.rot.x + 90.0f) * M_DTOR, MTXF_APPLY); } - Animation_GetFrameData(&D_AQ_6000AE4, actor->unk_0B6, sp40); + Animation_GetFrameData(&D_AQ_6000AE4, actor->animFrame, sp40); Animation_DrawSkeleton(3, D_AQ_6000DB0, sp40, NULL, Aquas_801B9DB0, actor, gCalcMatrix); } @@ -5087,16 +5087,16 @@ void Aquas_801BA26C(Actor* actor) { switch (actor->state) { case 0: - actor->unk_0B6 = RAND_INT(50.0f); + actor->animFrame = RAND_INT(50.0f); actor->state++; /* fallthrough */ case 1: - actor->unk_0B6 += 2; - if (actor->unk_0B6 >= Animation_GetFrameCount(&D_AQ_6020A40)) { - actor->unk_0B6 = 0; + actor->animFrame += 2; + if (actor->animFrame >= Animation_GetFrameCount(&D_AQ_6020A40)) { + actor->animFrame = 0; } - sp3E = Animation_GetFrameData(&D_AQ_6020A40, actor->unk_0B6, sp40); + sp3E = Animation_GetFrameData(&D_AQ_6020A40, actor->animFrame, sp40); if ((fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 150.0f) && (fabsf(actor->obj.pos.y - gPlayer[0].pos.y) < 500.0f) && @@ -5107,11 +5107,11 @@ void Aquas_801BA26C(Actor* actor) { break; case 2: - actor->unk_0B6 += 2; - if (actor->unk_0B6 >= Animation_GetFrameCount(&D_AQ_601DE50)) { - actor->unk_0B6 = 0; + actor->animFrame += 2; + if (actor->animFrame >= Animation_GetFrameCount(&D_AQ_601DE50)) { + actor->animFrame = 0; } - sp3E = Animation_GetFrameData(&D_AQ_601DE50, actor->unk_0B6, sp40); + sp3E = Animation_GetFrameData(&D_AQ_601DE50, actor->animFrame, sp40); if ((fabsf(actor->obj.pos.x - gPlayer[0].pos.x) > 150.0f) || (fabsf(actor->obj.pos.y - gPlayer[0].pos.y) > 500.0f) || (fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) > 700.0f)) { @@ -5385,7 +5385,7 @@ void Aquas_801BB26C(Actor* actor) { actor->iwork[7] = RAND_INT(120.0f); actor->iwork[8] = RAND_INT(120.0f); actor->iwork[9] = RAND_INT(120.0f); - actor->unk_0B6 = RAND_INT(Animation_GetFrameCount(&D_AQ_6023780)); + actor->animFrame = RAND_INT(Animation_GetFrameCount(&D_AQ_6023780)); if (actor->iwork[2] == 0) { actor->iwork[18] = fabsf(actor->obj.rot.y / 10.0f); @@ -5653,9 +5653,9 @@ void Aquas_801BB79C(Actor* actor) { actor->iwork[3] &= 1; } - actor->unk_0B6 += 2; - if (actor->unk_0B6 >= Animation_GetFrameCount(&D_AQ_6023780)) { - actor->unk_0B6 = 0; + actor->animFrame += 2; + if (actor->animFrame >= Animation_GetFrameCount(&D_AQ_6023780)) { + actor->animFrame = 0; } if (actor->iwork[4] < 30) { @@ -5832,7 +5832,7 @@ void Aquas_801BC91C(s32 limbIndex, Vec3f* rot, void* thisx) { void Aquas_801BC930(Actor* actor) { Vec3f sp28[30]; - Animation_GetFrameData(&D_AQ_6023780, actor->unk_0B6, sp28); + Animation_GetFrameData(&D_AQ_6023780, actor->animFrame, sp28); Animation_DrawSkeleton(3, D_AQ_602390C, sp28, Aquas_801BC530, Aquas_801BC91C, actor, gCalcMatrix); } @@ -6123,7 +6123,7 @@ void Aquas_801BD54C(Actor* actor) { actor268->obj.pos.y = actor->obj.pos.y + ((s32) (sp68 % 8U) * (var_fs0 / 2.0f)) + RAND_FLOAT(30.0f); actor268->obj.pos.z = actor->obj.pos.z + (sp68 * 20.0f) + RAND_FLOAT(-18.0f); - actor268->unk_0B6 = RAND_FLOAT(20.0f); + actor268->animFrame = RAND_FLOAT(20.0f); actor268->fwork[5] = actor->fwork[5]; actor268->state = 2; Object_SetInfo(&actor268->info, actor268->obj.id); @@ -6231,9 +6231,9 @@ void Aquas_801BD54C(Actor* actor) { break; } - actor->unk_0B6++; - if (Animation_GetFrameCount(&D_AQ_60135E0) < actor->unk_0B6) { - actor->unk_0B6 = 0; + actor->animFrame++; + if (Animation_GetFrameCount(&D_AQ_60135E0) < actor->animFrame) { + actor->animFrame = 0; } } @@ -6247,7 +6247,7 @@ bool Aquas_801BDDFC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th // OBJ_ACTOR_268 draw void Aquas_801BDE6C(Actor* actor) { - Animation_GetFrameData(&D_AQ_60135E0, actor->unk_0B6, actor->vwork); + Animation_GetFrameData(&D_AQ_60135E0, actor->animFrame, actor->vwork); if (actor->iwork[3] == 0) { Animation_DrawSkeleton(1, D_AQ_60136CC, actor->vwork, Aquas_801BDDFC, NULL, actor, &gIdentityMatrix); } else { @@ -6298,8 +6298,8 @@ void Aquas_801BDF14(void) { actor->obj.pos.x = D_i3_801C0504[i].x; actor->obj.pos.y = D_i3_801C0504[i].y; actor->obj.pos.z = D_i3_801C0504[i].z; - actor->unk_0F4.y = D_i3_801C075C[i]; - actor->unk_0B6 = 41; + actor->rot_0F4.y = D_i3_801C075C[i]; + actor->animFrame = 41; actor->iwork[0] = RAND_INT(20.0f); actor->iwork[2] = i; actor->timer_0BC = 231; @@ -6314,7 +6314,7 @@ void Aquas_801BE034(Actor* actor) { if (actor->timer_0BC == 0) { actor->fwork[0] = 10.0f; temp = D_i3_801C0828[actor->iwork[2]]; - Math_SmoothStepToAngle(&actor->unk_0F4.y, temp, 1.0f, 100.0f, 0.00001f); + Math_SmoothStepToAngle(&actor->rot_0F4.y, temp, 1.0f, 100.0f, 0.00001f); } actor->iwork[0]++; @@ -6400,8 +6400,8 @@ void Aquas_801BE3F8(Actor* actor) { break; case 2: - actor->unk_0B6++; - if (actor->unk_0B6 == 10) { + actor->animFrame++; + if (actor->animFrame == 10) { for (i = 0; i < 10; i++) { Aquas_801AC8A8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f), actor->obj.pos.y + 50.0f + RAND_FLOAT_CENTERED(70.0f), actor->obj.pos.z + 100.0f, @@ -6409,8 +6409,8 @@ void Aquas_801BE3F8(Actor* actor) { } } - if ((actor->unk_0B6 == 18) && (actor->health != 0)) { - actor->unk_0B6 = 17; + if ((actor->animFrame == 18) && (actor->health != 0)) { + actor->animFrame = 17; if ((fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) > 1000.0f) && (actor->timer_0BC < 20) && ((actor->timer_0BC & 3) == 0)) { sp68 = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(200.0f) - actor->obj.pos.x; @@ -6425,9 +6425,9 @@ void Aquas_801BE3F8(Actor* actor) { } } - if (actor->unk_0B6 >= Animation_GetFrameCount(&D_AQ_602201C)) { + if (actor->animFrame >= Animation_GetFrameCount(&D_AQ_602201C)) { actor->info.bonus = 0; - actor->unk_0B6 = Animation_GetFrameCount(&D_AQ_602201C) - 1; + actor->animFrame = Animation_GetFrameCount(&D_AQ_602201C) - 1; actor->state++; } break; @@ -6475,7 +6475,7 @@ void Aquas_801BEB1C(Actor* actor) { Graphics_SetScaleMtx(3.0f); RCP_SetupDL(&gMasterDisp, 0x38); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 143, 143, 255); - Animation_GetFrameData(&D_AQ_602201C, actor->unk_0B6, actor->vwork); + Animation_GetFrameData(&D_AQ_602201C, actor->animFrame, actor->vwork); Animation_DrawSkeleton(1, D_AQ_60220E8, actor->vwork, NULL, NULL, &actor->index, &gIdentityMatrix); if (actor->health != 0) { diff --git a/src/overlays/ovl_i3/fox_so.c b/src/overlays/ovl_i3/fox_so.c index 06b04394..2c28819b 100644 --- a/src/overlays/ovl_i3/fox_so.c +++ b/src/overlays/ovl_i3/fox_so.c @@ -316,7 +316,7 @@ void Solar_8019EF30(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yV actor->obj.pos.y = yPos; actor->obj.pos.z = zPos; - actor->unk_0F4.x = RAND_FLOAT(360.0f); + actor->rot_0F4.x = RAND_FLOAT(360.0f); actor->vel.x = xVel; actor->vel.y = yVel; @@ -327,7 +327,7 @@ void Solar_8019EF30(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yV Object_SetInfo(&actor->info, actor->obj.id); - if (gBossActive != 0) { + if (gBossActive) { actor->info.bonus = 0; } AUDIO_PLAY_SFX(NA_SE_OB_SOROCK_APPEAR, actor->sfxSource, 0); @@ -351,14 +351,14 @@ void Solar_8019F0B0(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yV actor->obj.pos.x = xPos; actor->obj.pos.y = yPos; actor->obj.pos.z = zPos; - actor->unk_0F4.x = RAND_FLOAT(360.0f); + actor->rot_0F4.x = RAND_FLOAT(360.0f); actor->vel.x = xVel; actor->vel.y = yVel; actor->vel.z = zVel; actor->state = 2; actor->timer_0C2 = 8; Object_SetInfo(&actor->info, actor->obj.id); - if (gBossActive != 0) { + if (gBossActive) { actor->info.bonus = 0; } AUDIO_PLAY_SFX(NA_SE_OB_SOROCK_APPEAR, actor->sfxSource, 0); @@ -404,12 +404,12 @@ void Solar_8019F20C(Actor* actor) { actor->scale = 2.0f; } if (actor->obj.id == OBJ_ACTOR_276) { - actor->unk_0F4.x -= 6.6f; - actor->unk_0F4.y -= 4.0f; + actor->rot_0F4.x -= 6.6f; + actor->rot_0F4.y -= 4.0f; } else { - actor->unk_0F4.x += 3.3f; - actor->unk_0F4.y += 2.0f; + actor->rot_0F4.x += 3.3f; + actor->rot_0F4.y += 2.0f; } switch (actor->state) { case 0: @@ -476,9 +476,9 @@ void Solar_8019F20C(Actor* actor) { actor->obj.rot.y = RAD_TO_DEG(-gPlayer[0].camYaw); actor->obj.rot.x = RAD_TO_DEG(gPlayer[0].camPitch); if (((gGameFrameCount % 2) == 0)) { - actor->unk_0B6++; - if (actor->unk_0B6 >= 3) { - actor->unk_0B6 = 0; + actor->animFrame++; + if (actor->animFrame >= 3) { + actor->animFrame = 0; } } } @@ -486,8 +486,8 @@ void Solar_8019F20C(Actor* actor) { void Solar_8019F7AC(Actor* actor) { if (actor->state != 0) { Matrix_Push(&gGfxMatrix); - Matrix_RotateY(gGfxMatrix, actor->unk_0F4.y * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, actor->unk_0F4.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, actor->rot_0F4.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, actor->rot_0F4.x * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); switch (actor->obj.id) { case OBJ_ACTOR_275: @@ -509,7 +509,7 @@ void Solar_8019F7AC(Actor* actor) { Graphics_SetScaleMtx(actor->scale * 3.5f); RCP_SetupDL(&gMasterDisp, 0x40); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 128, 128, 160); - gSPDisplayList(gMasterDisp++, D_i3_801BF92C[actor->unk_0B6]); + gSPDisplayList(gMasterDisp++, D_i3_801BF92C[actor->animFrame]); } } @@ -524,11 +524,11 @@ void Solar_8019F99C(Actor* actor, Effect* effect, f32 scale1) { effect->scale1 = scale1; effect->unk_60.y = actor->obj.rot.y; effect->obj.rot.z = RAND_FLOAT(360.0f); - effect->unk_44 = 255 - (actor->unk_04E * 8); + effect->unk_44 = 255 - (actor->counter_04E * 8); if (effect->unk_44 < 0) { effect->unk_44 = 0; } - effect->scale2 = 20.0f - (actor->unk_04E * 0.5f); + effect->scale2 = 20.0f - (actor->counter_04E * 0.5f); effect->unk_48 = 1; Object_SetInfo(&effect->info, effect->obj.id); } @@ -561,7 +561,7 @@ void Solar_8019FAA4(Boss* bossSO, Effect* effect, f32 xPos, f32 yPos, f32 zPos, } else { Matrix_RotateZ(gCalcMatrix, bossSO->obj.rot.z * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, gBosses[0].obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gCalcMatrix, gBosses[0].unk_078.y * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, gBosses[0].rot_078.y * M_DTOR, MTXF_APPLY); sp44.x = effect->obj.pos.x - bossSO->obj.pos.x; sp44.y = effect->obj.pos.y - bossSO->obj.pos.y; sp44.z = effect->obj.pos.z - bossSO->obj.pos.z; @@ -657,14 +657,14 @@ void Solar_801A003C(Actor* actor) { } else if (actor->timer_0BC == 0) { actor->timer_0BC = 2; Solar_8019FEE8(actor, 1000.0f); - actor->unk_04E++; + actor->counter_04E++; } break; case 1: if (actor->timer_0BE == 0) { actor->state = 0; actor->timer_0BE = 50; - actor->unk_04E = 0; + actor->counter_04E = 0; Object_SetSfxSourceToPos(actor->sfxSource, &actor->obj.pos); AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, actor->sfxSource, 4); } @@ -934,7 +934,7 @@ void Solar_801A0DF8(f32 xPos, f32 zPos, f32 yRot, s32 index, f32 yPos) { } else { gActors[sp2C].timer_0BC = 0; gActors[sp2C].timer_0BE = 50; - gActors[sp2C].unk_04E = 0; + gActors[sp2C].counter_04E = 0; gActors[sp2C].obj.pos.y = -1.0f * yPos; Object_SetSfxSourceToPos(gActors[sp2C].sfxSource, &gActors[sp2C].obj.pos); AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, gActors[sp2C].sfxSource, 4); @@ -1214,17 +1214,17 @@ void Solar_801A1EB0(Boss* bossSO, f32 xPos, f32 xOffset, f32 yPos, f32 zPos) { } void Solar_801A1F80(Boss* bossSO) { - if (gBossActive != 0) { - bossSO->unk_3F8 = 5.5f; + if (gBossActive) { + bossSO->scale = 5.5f; } if (bossSO->health == 0) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 20); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 20); - gBossActive = 1; + gBossActive = true; gBossFrameCount = 0; bossSO->health = 600; - bossSO->unk_3F8 = 0.1f; + bossSO->scale = 0.1f; bossSO->fwork[SO_FWK_0] = 1.0f; bossSO->swork[SO_SWK_2] = bossSO->swork[SO_SWK_3] = 400; @@ -1316,7 +1316,7 @@ void Solar_801A23F4(Boss* bossSO) { } else { bossSO->swork[SO_SWK_1] = 2; bossSO->state = 0; - bossSO->unk_078.y = 0.0f; + bossSO->rot_078.y = 0.0f; } } else if (bossSO->swork[SO_SWK_3] == 0) { bossSO->swork[SO_SWK_1] = 7; @@ -1436,13 +1436,13 @@ void Solar_801A23F4(Boss* bossSO) { } } if (bossSO->unk_04C == 80) { - bossSO->unk_078.y += 15.0f; + bossSO->rot_078.y += 15.0f; bossSO->state++; - if (bossSO->unk_078.y >= 30.0f) { - bossSO->unk_078.y = 0.0f; + if (bossSO->rot_078.y >= 30.0f) { + bossSO->rot_078.y = 0.0f; } } - Math_SmoothStepToAngle(&bossSO->obj.rot.y, bossSO->unk_078.y, 1.0f, 1.5f, 1.0f); + Math_SmoothStepToAngle(&bossSO->obj.rot.y, bossSO->rot_078.y, 1.0f, 1.5f, 1.0f); if (bossSO->unk_04C >= 19) { bossSO->info.hitbox[20] = 715.0f; bossSO->info.hitbox[22] = 440.0f; @@ -1581,7 +1581,7 @@ void Solar_801A3128(Boss* bossSO) { gControllerRumbleTimers[gMainController] = 70; D_i3_801C2740[2]++; if ((D_i3_801C2740[2] % 2) != 0) { - if (D_i3_801C2740[2] & 2) { + if ((D_i3_801C2740[2] & 2) != 0) { if (gTeamShields[TEAM_ID_PEPPY] > 0) { Radio_PlayMessage(gMsg_ID_20317, RCID_PEPPY); } @@ -2079,7 +2079,7 @@ void Solar_801A4EF8(Boss* bossSO) { bossSO->obj.rot.y -= 360.0f; AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_ROLL, bossSO->sfxSource, 4); } - bossSO->unk_078.y = bossSO->obj.rot.y; + bossSO->rot_078.y = bossSO->obj.rot.y; break; case 1: bossSO->obj.rot.y += bossSO->fwork[SO_FWK_31]; @@ -2114,11 +2114,11 @@ void Solar_801A4EF8(Boss* bossSO) { bossSO->fwork[SO_FWK_3] = 4800.0f; bossSO->obj.pos.z = gPlayer[0].trueZpos - bossSO->fwork[SO_FWK_3]; bossSO->swork[SO_SWK_1] = 0; - bossSO->unk_078.y = bossSO->obj.rot.y = 0.0f; + bossSO->rot_078.y = bossSO->obj.rot.y = 0.0f; bossSO->vel.y = 0.0f; bossSO->obj.rot.x = 0.0f; } - bossSO->unk_078.y = bossSO->obj.rot.y; + bossSO->rot_078.y = bossSO->obj.rot.y; break; case 2: bossSO->unk_04C = 0; @@ -2132,7 +2132,7 @@ void Solar_801A4EF8(Boss* bossSO) { } if (bossSO->swork[SO_SWK_11] < 200) { bossSO->unk_04C = 98; - bossSO->unk_078.y += bossSO->fwork[SO_FWK_31]; + bossSO->rot_078.y += bossSO->fwork[SO_FWK_31]; if (bossSO->swork[SO_SWK_11] == 170) { AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_CRY, bossSO->sfxSource, 4); bossSO->obj.pos.y = -500.0f; @@ -2196,13 +2196,13 @@ void Solar_801A56B8(Boss* bossSO) { if (((bossSO->unk_04C == 89) && (bossSO->state == 2)) || (bossSO->swork[SO_SWK_2] == 0)) { bossSO->unk_04C = 0; bossSO->state = 0; - bossSO->unk_078.y = 0.0f; + bossSO->rot_078.y = 0.0f; } if (bossSO->unk_04C == 89) { bossSO->state++; - bossSO->unk_078.y += 15.0f; + bossSO->rot_078.y += 15.0f; } - Math_SmoothStepToAngle(&bossSO->obj.rot.y, bossSO->unk_078.y, 1.0f, 3.0f, 1.0f); + Math_SmoothStepToAngle(&bossSO->obj.rot.y, bossSO->rot_078.y, 1.0f, 3.0f, 1.0f); if (bossSO->unk_04C > 18) { bossSO->info.hitbox[20] = 715.0f; bossSO->info.hitbox[22] = 440.0f; @@ -2714,8 +2714,8 @@ void Solar_Boss_Draw(Boss* bossSO) { -89.0f, -90.0f, -88.0f, -36.0f, -73.0f, -95.0f, -91.0f, -83.0f, -91.0f, }; - Matrix_Scale(gCalcMatrix, bossSO->unk_3F8, bossSO->unk_3F8, bossSO->unk_3F8, MTXF_APPLY); - if (gBossActive != 0) { + Matrix_Scale(gCalcMatrix, bossSO->scale, bossSO->scale, bossSO->scale, MTXF_APPLY); + if (gBossActive) { Animation_DrawSkeleton(2, D_SO_600E470, bossSO->vwork, Solar_801A68A8, Solar_801A6BDC, bossSO, gCalcMatrix); } if (bossSO->health <= 0) { @@ -2836,7 +2836,7 @@ void Solar_LevelComplete(Player* player) { gCsCamAtY = player->cam.at.y; gCsCamAtZ = player->cam.at.z; for (i = 10; i < ARRAY_COUNT(gActors); i++) { - if (gActors[i].unk_0B6 == 0) { + if (gActors[i].animFrame == 0) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); } } @@ -2906,7 +2906,7 @@ void Solar_LevelComplete(Player* player) { player->wings.modelId = 1; Audio_StartPlayerNoise(0); AUDIO_PLAY_BGM(NA_BGM_COURSE_CLEAR); - D_ctx_80177A98 = 1; + gDrawGround = true; Play_ClearObjectData(); D_ctx_80177A48[1] = 0.0f; D_ctx_80177A48[2] = 0.0f; @@ -3148,7 +3148,7 @@ void Solar_801A8BE8(Actor* actor) { case 4: break; case 1: - if ((actor->unk_0B6 != 0) && ((((s32) (actor->index % 8U) * 10) + 1030) < gCsFrameCount)) { + if ((actor->animFrame != 0) && ((((s32) (actor->index % 8U) * 10) + 1030) < gCsFrameCount)) { actor->state = 4; } break; @@ -3160,11 +3160,11 @@ void Solar_801A8BE8(Actor* actor) { case 3: actor->iwork[11] = 2; actor->fwork[0] += 2.0f; - actor->unk_0F4.x += 0.2f; + actor->rot_0F4.x += 0.2f; break; } - Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(actor->unk_0F4.x * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (actor->rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(actor->rot_0F4.x * M_DTOR), MTXF_APPLY); sp3C.x = 0.0f; sp3C.y = 0.0f; sp3C.z = actor->fwork[0]; @@ -3172,10 +3172,10 @@ void Solar_801A8BE8(Actor* actor) { actor->vel.x = sp30.x; actor->vel.y = sp30.y; actor->vel.z = sp30.z; - actor->obj.rot.x = -actor->unk_0F4.x; - actor->obj.rot.y = actor->unk_0F4.y + 180.0f; + actor->obj.rot.x = -actor->rot_0F4.x; + actor->obj.rot.y = actor->rot_0F4.y + 180.0f; - actor->obj.rot.z = -actor->unk_0F4.z; + actor->obj.rot.z = -actor->rot_0F4.z; } void Solar_801A8DB8(Vec3f* pos, u32 sfxId, f32 zVel) { diff --git a/src/overlays/ovl_i3/fox_zo.c b/src/overlays/ovl_i3/fox_zo.c index 5df4aa0b..8141629c 100644 --- a/src/overlays/ovl_i3/fox_zo.c +++ b/src/overlays/ovl_i3/fox_zo.c @@ -617,7 +617,7 @@ void Zoness_80190430(Actor* actor) { Vec3f sp30[30]; Matrix_Scale(gCalcMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY); - Animation_GetFrameData(&D_ZO_600E5EC, actor->unk_0B6, sp30); + Animation_GetFrameData(&D_ZO_600E5EC, actor->animFrame, sp30); Animation_DrawSkeleton(3, D_ZO_600E7D8, sp30, Zoness_8019019C, Zoness_80190204, actor, gCalcMatrix); } @@ -652,9 +652,9 @@ void Zoness_801904CC(Actor* actor) { func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_BIRD_DOWN); break; } - actor->unk_0B6++; - if (Animation_GetFrameCount(&D_ZO_600E5EC) < actor->unk_0B6) { - actor->unk_0B6 = 0; + actor->animFrame++; + if (Animation_GetFrameCount(&D_ZO_600E5EC) < actor->animFrame) { + actor->animFrame = 0; } if ((actor->dmgType != DMG_NONE) && (actor->health != 0)) { actor->dmgType = DMG_NONE; @@ -679,21 +679,21 @@ void Zoness_80190790(Actor* actor) { s32 i; Actor* otherActor; - actor->unk_04E++; - if (actor->unk_04E >= 200) { - actor->unk_04E = 0; + actor->counter_04E++; + if (actor->counter_04E >= 200) { + actor->counter_04E = 0; } actor->fwork[0] += 4.0f; actor->vel.y = SIN_DEG(actor->fwork[0]) * 20.0f; - actor->unk_0F4.x = -actor->vel.y * 2.5f; + actor->rot_0F4.x = -actor->vel.y * 2.5f; actor->fwork[1] += 5.0f; - actor->unk_0F4.z = SIN_DEG(actor->fwork[1]) * 30.0f; + actor->rot_0F4.z = SIN_DEG(actor->fwork[1]) * 30.0f; for (i = 0, otherActor = gActors; i < ARRAY_COUNT(gActors); i++, otherActor++) { if ((otherActor->obj.status == OBJ_ACTIVE) && (otherActor->obj.id == OBJ_ACTOR_239) && (otherActor->iwork[0] == actor->iwork[0])) { temp1 = Math_RadToDeg( Math_Atan2F(otherActor->obj.pos.x - actor->obj.pos.x, otherActor->obj.pos.z - actor->obj.pos.z)); - Math_SmoothStepToAngle(&actor->unk_0F4.y, temp1, 0.2f, 3.0f, 0.0f); + Math_SmoothStepToAngle(&actor->rot_0F4.y, temp1, 0.2f, 3.0f, 0.0f); if ((fabsf(actor->obj.pos.x - otherActor->obj.pos.x) < 500.0f) && (fabsf(actor->obj.pos.z - otherActor->obj.pos.z) < 500.0f)) { otherActor->obj.status = OBJ_FREE; @@ -702,20 +702,20 @@ void Zoness_80190790(Actor* actor) { break; } } - Matrix_RotateY(gCalcMatrix, actor->unk_0F4.y * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, actor->rot_0F4.y * M_DTOR, MTXF_NEW); sp44.x = 0.f; sp44.y = 0.f; sp44.z = 20.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); actor->vel.x = sp38.x; actor->vel.z = sp38.z; - temp2 = &D_ctx_801782C4[actor->unk_04E]; + temp2 = &gZOSnakePosRots[actor->counter_04E]; temp2->pos.x = actor->obj.pos.x; temp2->pos.y = actor->obj.pos.y; temp2->pos.z = actor->obj.pos.z; - temp2->rot.x = actor->unk_0F4.x; - temp2->rot.y = actor->unk_0F4.y; - temp2->rot.z = actor->unk_0F4.z; + temp2->rot.x = actor->rot_0F4.x; + temp2->rot.y = actor->rot_0F4.y; + temp2->rot.z = actor->rot_0F4.z; } void Zoness_80190A00(Actor* actor) { @@ -777,8 +777,8 @@ void Zoness_80190D0C(Actor* actor) { actor->unk_04A = 0; for (i = actor->unk_04A; i < 20; i++, var_s2++) { - k = (D_i3_801BF56C[i] + actor->unk_04E) % 200; - temp_s0 = &D_ctx_801782C4[k]; + k = (D_i3_801BF56C[i] + actor->counter_04E) % 200; + temp_s0 = &gZOSnakePosRots[k]; var_s2->z.offset = temp_s0->pos.z - actor->obj.pos.z; var_s2->y.offset = temp_s0->pos.y - actor->obj.pos.y; @@ -851,12 +851,12 @@ void Zoness_80191010(Actor* actor) { case 2: if (actor->timer_0BC == 0) { actor->obj.rot.z += 30.0f; - if (actor->unk_0B6 > 0) { - actor->unk_0B6--; + if (actor->animFrame > 0) { + actor->animFrame--; } } else { - if (actor->unk_0B6 < Animation_GetFrameCount(&D_ZO_601AA48)) { - actor->unk_0B6++; + if (actor->animFrame < Animation_GetFrameCount(&D_ZO_601AA48)) { + actor->animFrame++; } } var_fs0 = 5.0f; @@ -878,7 +878,7 @@ void Zoness_80191010(Actor* actor) { AUDIO_PLAY_SFX(NA_SE_IN_SPLASH_L, actor->sfxSource, 4); } actor->timer_0C0 = 10; - actor->iwork[0] += 1; + actor->iwork[0]++; func_effect_8008377C(actor->obj.pos.x, sp7C, actor->obj.pos.z, 0.0f, 0.7f); } break; @@ -911,7 +911,7 @@ void Zoness_801914C4(Actor* actor) { Matrix_Scale(gCalcMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - Animation_GetFrameData(&D_ZO_601AA48, actor->unk_0B6, sp38); + Animation_GetFrameData(&D_ZO_601AA48, actor->animFrame, sp38); Animation_DrawSkeleton(3, D_ZO_601AB14, sp38, NULL, Zoness_80190F28, actor, gCalcMatrix); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); } @@ -966,9 +966,9 @@ void Zoness_80191680(Actor* actor) { AUDIO_PLAY_SFX(NA_SE_EN_BIRD_DOWN, actor->sfxSource, 4); } } - actor->unk_0B6++; - if (actor->unk_0B6 >= Animation_GetFrameCount(&D_ENMY_PLANET_40057AC)) { - actor->unk_0B6 = 0; + actor->animFrame++; + if (actor->animFrame >= Animation_GetFrameCount(&D_ENMY_PLANET_40057AC)) { + actor->animFrame = 0; } if (actor->timer_0BC == 0) { actor->timer_0BC = 30; @@ -1028,7 +1028,7 @@ void Zoness_80191680(Actor* actor) { } void Zoness_80191B4C(Actor* actor) { - Animation_GetFrameData(&D_ENMY_PLANET_40057AC, actor->unk_0B6, actor->vwork); + Animation_GetFrameData(&D_ENMY_PLANET_40057AC, actor->animFrame, actor->vwork); Animation_DrawSkeleton(1, D_ENMY_PLANET_40058B8, actor->vwork, NULL, NULL, &actor->index, &gIdentityMatrix); } @@ -1108,7 +1108,7 @@ void Zoness_80191FFC(Actor* actor) { Vec3f sp30[20]; Matrix_Scale(gCalcMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY); - Animation_GetFrameData(&D_ZO_60195EC, actor->unk_0B6, sp30); + Animation_GetFrameData(&D_ZO_60195EC, actor->animFrame, sp30); Animation_DrawSkeleton(3, D_ZO_6019738, sp30, NULL, Zoness_80191E94, actor, gCalcMatrix); } @@ -1137,7 +1137,7 @@ void Zoness_80192094(Actor* actor) { if ((actor->iwork[0] == 0) && (Play_CheckDynaFloorCollision(&spB8, &spA0, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z) != 0)) { func_effect_8008377C(actor->obj.pos.x, spB8, actor->obj.pos.z + 100.0f, 0.0f, 1.5f); - actor->iwork[0] += 1; + actor->iwork[0]++; if (actor->vel.y >= 0.0f) { AUDIO_PLAY_SFX(NA_SE_OUT_SPLASH_L, actor->sfxSource, 4); } else { @@ -1151,15 +1151,15 @@ void Zoness_80192094(Actor* actor) { actor->scale = 2.0f; break; case 1: - actor->unk_0B6++; - if (actor->unk_0B6 >= Animation_GetFrameCount(&D_ZO_60195EC)) { - actor->unk_0B6 = 64; + actor->animFrame++; + if (actor->animFrame >= Animation_GetFrameCount(&D_ZO_60195EC)) { + actor->animFrame = 64; Math_SmoothStepToF(&actor->vel.z, 0.0f, 1.0f, 100.0f, 0.00001f); if (actor->obj.pos.y < -500.0f) { Object_Kill(&actor->obj, actor->sfxSource); } } - if (actor->unk_0B6 == 25) { + if (actor->animFrame == 25) { actor->fwork[2] = 0.0f; actor->vel.y = 0.0f; actor->iwork[1] = 0; @@ -1172,7 +1172,7 @@ void Zoness_80192094(Actor* actor) { actor->iwork[0] = 0; actor->state = 3; actor->vel.y = 50.0f; - if (actor->unk_0B6 == 51) { + if (actor->animFrame == 51) { actor->state = 1; actor->vel.y = -20.0f; } @@ -1202,8 +1202,8 @@ void Zoness_80192094(Actor* actor) { case 3: Math_SmoothStepToF(&actor->vel.z, -60.0f, 0.1f, 100.0f, 0.00001f); Math_SmoothStepToF(&actor->vel.y, -30.0f, 0.1f, 100.0f, 0.00001f); - actor->unk_0B6++; - if (actor->unk_0B6 == 51) { + actor->animFrame++; + if (actor->animFrame == 51) { actor->fwork[2] = 0.0f; actor->vel.y = 0.0f; actor->iwork[1] = 0; @@ -1293,12 +1293,12 @@ void Zoness_80192834(Actor* actor) { Object_Kill(&actor->obj, actor->sfxSource); } if (actor->vel.y > 0.0f) { - if (actor->unk_0B6 < 17) { - actor->unk_0B6++; + if (actor->animFrame < 17) { + actor->animFrame++; } } else { - if (actor->unk_0B6 < Animation_GetFrameCount(&D_ZO_6021ABC)) { - actor->unk_0B6++; + if (actor->animFrame < Animation_GetFrameCount(&D_ZO_6021ABC)) { + actor->animFrame++; } } actor->obj.rot.x += 20.0f; @@ -1340,7 +1340,7 @@ void Zoness_80192834(Actor* actor) { void Zoness_80192C18(Actor* actor) { Vec3f sp28[20]; - Animation_GetFrameData(&D_ZO_6021ABC, actor->unk_0B6, sp28); + Animation_GetFrameData(&D_ZO_6021ABC, actor->animFrame, sp28); Animation_DrawSkeleton(3, D_ZO_6021B88, sp28, NULL, Zoness_801926F4, actor, gCalcMatrix); } @@ -1406,8 +1406,8 @@ void Zoness_80192E64(Actor* actor) { Math_SmoothStepToF(&actor->vel.x, 0.0f, 0.1f, 1.0f, 0.0001); Math_SmoothStepToF(&actor->vel.z, 0.0f, 0.1f, 1.0f, 0.0001f); if (actor->timer_0BC == 0) { - actor->unk_0B6++; - if (actor->unk_0B6 == 5) { + actor->animFrame++; + if (actor->animFrame == 5) { Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); sp80.x = 0.0f; sp80.y = 0.0f; @@ -1422,10 +1422,10 @@ void Zoness_80192E64(Actor* actor) { case 2: Math_SmoothStepToF(&actor->vel.x, 0.0f, 0.1f, 1.0f, 0.0001f); Math_SmoothStepToF(&actor->vel.z, 0.0f, 0.1f, 1.0f, 0.0001f); - if (actor->unk_0B6 < Animation_GetFrameCount(&D_ZO_601AFB8)) { - actor->unk_0B6++; + if (actor->animFrame < Animation_GetFrameCount(&D_ZO_601AFB8)) { + actor->animFrame++; } else { - actor->unk_0B6 = 0; + actor->animFrame = 0; actor->timer_0BC = 30; actor->state = 1; } @@ -1462,7 +1462,7 @@ void Zoness_80192E64(Actor* actor) { void Zoness_80193240(Actor* actor) { Vec3f sp28[30]; - Animation_GetFrameData(&D_ZO_601AFB8, actor->unk_0B6, sp28); + Animation_GetFrameData(&D_ZO_601AFB8, actor->animFrame, sp28); Animation_DrawSkeleton(2, D_ZO_601B184, sp28, NULL, Zoness_80192C84, actor, gCalcMatrix); } @@ -1476,7 +1476,7 @@ f32 D_i3_801BF608[6] = { void Zoness_BossZo_Init(BossZO* this) { s32 i; - gBossActive = 1; + gBossActive = true; gBossFrameCount = 0; this->vel.z = -40.0f; for (i = 0; i < ZO_LIMB_MAX; i++) { @@ -2069,12 +2069,12 @@ void Zoness_Boss_Update(Boss* bossZO) { func_effect_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, 0.0f, 50.0f, 5.0f); } - bossZO->swork[ZO_SWK_11] += 1; + bossZO->swork[ZO_SWK_11]++; bossZO->swork[ZO_SWK_11] &= 1; bossZO->swork[ZO_SWK_9] = 20; if (bossZO->swork[ZO_SWK_11] == 0) { - bossZO->swork[ZO_SWK_10] += 1; + bossZO->swork[ZO_SWK_10]++; bossZO->swork[ZO_SWK_10] &= 1; bossZO->swork[ZO_SWK_9] = 100; } @@ -2243,7 +2243,7 @@ void Zoness_Boss_Update(Boss* bossZO) { Radio_PlayMessage(gMsg_ID_6078, RCID_BOSS_ZONESS); } if (bossZO->timer_056 == 0) { - bossZO->swork[ZO_SWK_1] += 1; + bossZO->swork[ZO_SWK_1]++; bossZO->swork[ZO_SWK_1] &= 1; bossZO->timer_056 = 100; } @@ -2447,8 +2447,8 @@ void Zoness_Boss_Update(Boss* bossZO) { spD8.z = bossZO->obj.rot.z; for (i = 0; i < 5; i++) { Zoness_SpawnDebris(&spE4, &spD8, RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(20.0f), - RAND_FLOAT_CENTERED(30.0f), 4, 1.0f, - RAND_FLOAT(15.0f) + (bossZO->unk_3F8 * 10.0f), 0); + RAND_FLOAT_CENTERED(30.0f), 4, 1.0f, RAND_FLOAT(15.0f) + (bossZO->scale * 10.0f), + 0); } } bossZO->vel.x = 0.0f; @@ -2958,26 +2958,26 @@ void Zoness_Boss_Update(Boss* bossZO) { spCC.x = sZoFwork[ZO_BSF_109_X]; spCC.y = sZoFwork[ZO_BSF_109_Y]; spCC.z = sZoFwork[ZO_BSF_109_Z]; - if ((sZoSwork[ZO_BSS_53] & 1) && (sZoSwork[ZO_BSS_11] != 0)) { + if (((sZoSwork[ZO_BSS_53] % 2) != 0) && (sZoSwork[ZO_BSS_11] != 0)) { func_effect_8007A6F0(&spD8, NA_SE_OB_DAMAGE_M); } - if ((sZoSwork[ZO_BSS_54] & 1) && (sZoSwork[ZO_BSS_12] != 0)) { + if (((sZoSwork[ZO_BSS_54] % 2) != 0) && (sZoSwork[ZO_BSS_12] != 0)) { func_effect_8007A6F0(&spCC, NA_SE_OB_DAMAGE_M); } } - if (sZoSwork[ZO_BSS_50] & 1) { + if ((sZoSwork[ZO_BSS_50] % 2) != 0) { spD8.x = sZoFwork[ZO_BSF_29_X]; spD8.y = sZoFwork[ZO_BSF_29_Y]; spD8.z = sZoFwork[ZO_BSF_29_Z]; func_effect_8007A6F0(&spD8, NA_SE_EN_DAMAGE_S); } - if (sZoSwork[ZO_BSS_51] & 1) { + if ((sZoSwork[ZO_BSS_51] % 2) != 0) { spD8.x = sZoFwork[ZO_BSF_32_X]; spD8.y = sZoFwork[ZO_BSF_32_Y]; spD8.z = sZoFwork[ZO_BSF_32_Z]; func_effect_8007A6F0(&spD8, NA_SE_EN_DAMAGE_S); } - if (sZoSwork[ZO_BSS_52] & 1) { + if ((sZoSwork[ZO_BSS_52] % 2) != 0) { spD8.x = sZoFwork[ZO_BSF_52_X]; spD8.y = sZoFwork[ZO_BSF_52_Y]; spD8.z = sZoFwork[ZO_BSF_52_Z]; @@ -4524,7 +4524,7 @@ void Zoness_LevelComplete(Player* player) { gCsCamAtY = player->cam.at.y; gCsCamAtZ = player->cam.at.z; for (i = 10; i < ARRAY_COUNT(gActors); i++) { - if (gActors[i].unk_0B6 == 0) { + if (gActors[i].animFrame == 0) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); } } @@ -4583,7 +4583,7 @@ void Zoness_LevelComplete(Player* player) { player->csState++; Audio_StartPlayerNoise(0); AUDIO_PLAY_BGM(NA_BGM_COURSE_CLEAR); - D_ctx_80177A98 = 1; + gDrawGround = true; Play_ClearObjectData(); Solar_801A7750(); D_ctx_80177A48[1] = 0.0f; @@ -4792,7 +4792,7 @@ void Zoness_8019E5F0(Actor* actor) { case 10: break; case 1: - if ((actor->unk_0B6 != 0) && ((((s32) (actor->index % 8U) * 10) + 1030) < gCsFrameCount)) { + if ((actor->animFrame != 0) && ((((s32) (actor->index % 8U) * 10) + 1030) < gCsFrameCount)) { actor->state = 4; } break; @@ -4804,15 +4804,15 @@ void Zoness_8019E5F0(Actor* actor) { case 3: actor->iwork[11] = 2; actor->fwork[0] += 2.0f; - actor->unk_0F4.x += 0.1f; + actor->rot_0F4.x += 0.1f; actor->fwork[21] += 0.2f; if (actor->fwork[21] > 0.6f) { actor->fwork[21] = 0.6f; } break; } - Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(actor->unk_0F4.x * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (actor->rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(actor->rot_0F4.x * M_DTOR), MTXF_APPLY); sp34.x = 0.0f; sp34.y = 0.0f; sp34.z = actor->fwork[0]; @@ -4821,7 +4821,7 @@ void Zoness_8019E5F0(Actor* actor) { actor->vel.y = sp28.y; actor->vel.z = sp28.z; - actor->obj.rot.x = -actor->unk_0F4.x; - actor->obj.rot.y = actor->unk_0F4.y + 180.0f; - actor->obj.rot.z = -actor->unk_0F4.z; + actor->obj.rot.x = -actor->rot_0F4.x; + actor->obj.rot.y = actor->rot_0F4.y + 180.0f; + actor->obj.rot.z = -actor->rot_0F4.z; } diff --git a/src/overlays/ovl_i4/fox_bo.c b/src/overlays/ovl_i4/fox_bo.c index cafcd16a..b7767f44 100644 --- a/src/overlays/ovl_i4/fox_bo.c +++ b/src/overlays/ovl_i4/fox_bo.c @@ -95,18 +95,18 @@ void Bolse_8018BD60(Actor* this) { f32 D_i4_8019EED4[4] = { 8000.0f, 8000.0f, -8000.0f, -8000.0f }; if (gAllRangeCheckpoint == 0) { - this->unk_04E++; - if (this->unk_04E >= 4) { - this->unk_04E = 0; + this->counter_04E++; + if (this->counter_04E >= 4) { + this->counter_04E = 0; } for (actor = &gActors[10], i = 10; i < 16; i++, actor++) { if (actor->obj.status == OBJ_FREE) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; actor->obj.id = OBJ_ACTOR_ALLRANGE; - actor->obj.pos.x = D_i4_8019EEC4[this->unk_04E]; + actor->obj.pos.x = D_i4_8019EEC4[this->counter_04E]; actor->obj.pos.y = 1000.0f; - actor->obj.pos.z = D_i4_8019EED4[this->unk_04E]; + actor->obj.pos.z = D_i4_8019EED4[this->counter_04E]; actor->state = 1; actor->aiIndex = -1; actor->health = 24; @@ -140,12 +140,12 @@ void Bolse_SpawnEnemies(Actor* this, s32 count) { enemy->obj.pos.x = 10000.0f; enemy->obj.pos.y = 3000.0f; } else { - enemy->obj.pos.x = D_i4_8019EEE4[this->unk_04E]; + enemy->obj.pos.x = D_i4_8019EEE4[this->counter_04E]; enemy->obj.pos.y = 50.0f; AUDIO_PLAY_SFX(NA_SE_EN_PASS, enemy->sfxSource, 4); enemy->timer_0BC = 5; enemy->timer_0C2 = 100; - enemy->unk_0F4.x = 90.0f; + enemy->rot_0F4.x = 90.0f; } enemy->state = 1; @@ -186,9 +186,9 @@ void Bolse_SpawnEnemies(Actor* this, s32 count) { Object_SetInfo(&enemy->info, enemy->obj.id); AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, enemy->sfxSource, 4); - this->unk_04E++; - if (this->unk_04E >= 5) { - this->unk_04E = 0; + this->counter_04E++; + if (this->counter_04E >= 5) { + this->counter_04E = 0; } break; } @@ -253,7 +253,7 @@ void Bolse_UpdateEventHandler(Actor* this) { break; } - if ((D_i4_801A0530 < 9600) && (D_i4_801A0530 & 0x400)) { + if ((D_i4_801A0530 < 9600) && ((D_i4_801A0530 & 0x400) != 0)) { Bolse_SpawnEnemies(this, 8); } @@ -344,7 +344,7 @@ void Bolse_UpdateEventHandler(Actor* this) { case 10: if (gBosses[1].obj.status != 0) { - if (fabsf(Math_SmoothStepToF(&gBosses[1].unk_3F8, 0.0f, 1.0f, 0.05f, 0.001f)) < 0.05f) { + if (fabsf(Math_SmoothStepToF(&gBosses[1].scale, 0.0f, 1.0f, 0.05f, 0.001f)) < 0.05f) { Object_Kill(&gBosses[1].obj, gBosses[i].sfxSource); gLight1R = 100; gLight1G = 100; @@ -546,8 +546,8 @@ s32 Bolse_8018CE5C(Actor* actor) { actor->fwork[5] = Math_RadToDeg(Math_Atan2F(y, sqrtf(SQ(x) + SQ(z)))); } - Math_SmoothStepToF(&actor->unk_0F4.x, actor->fwork[5], 0.1f, 4.8f, 0.1f); - Math_SmoothStepToF(&actor->unk_0F4.y, actor->fwork[6], 0.1f, 4.8f, 0.1f); + Math_SmoothStepToF(&actor->rot_0F4.x, actor->fwork[5], 0.1f, 4.8f, 0.1f); + Math_SmoothStepToF(&actor->rot_0F4.y, actor->fwork[6], 0.1f, 4.8f, 0.1f); return 0; } @@ -589,8 +589,8 @@ void Bolse_8018D124(Actor* actor) { Vec3f src; Vec3f dest; - Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + actor->obj.rot.y) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -actor->unk_0F4.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (actor->rot_0F4.y + actor->obj.rot.y) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -actor->rot_0F4.x * M_DTOR, MTXF_APPLY); src.y = 0.0f; src.x = 0.0f; @@ -598,7 +598,7 @@ void Bolse_8018D124(Actor* actor) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); func_effect_8007F04C(OBJ_EFFECT_353, actor->obj.pos.x + dest.x, actor->obj.pos.y + 180.0f + dest.y, - actor->obj.pos.z + dest.z, -actor->unk_0F4.x, actor->unk_0F4.y + actor->obj.rot.y, 0.0f, 0.0f, + actor->obj.pos.z + dest.z, -actor->rot_0F4.x, actor->rot_0F4.y + actor->obj.rot.y, 0.0f, 0.0f, 0.0f, 0.0f, dest.x, dest.y, dest.z, 1.0f); } @@ -651,8 +651,8 @@ bool Bolse_8018D414(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th Actor* actor = (Actor*) this; if (limbIndex == 2) { - rot->x -= actor->unk_0F4.x; - rot->y += actor->unk_0F4.y; + rot->x -= actor->rot_0F4.x; + rot->y += actor->rot_0F4.y; } return false; } @@ -807,12 +807,12 @@ s32 Bolse_8018DE8C(Boss* boss) { }; s32 index = RAND_FLOAT(26); - if (!(gGameFrameCount % 2)) { + if (!(gGameFrameCount % 2)) { // has to be ! instead of == 0 func_effect_8007C120(D_i4_8019EEF8[index].x + boss->obj.pos.x, D_i4_8019EEF8[index].y + boss->obj.pos.y - 10.0f, D_i4_8019EEF8[index].z + boss->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.2f, 20); } - if (!(gGameFrameCount % 5)) { + if ((gGameFrameCount % 5) == 0) { func_effect_8007BFFC(D_i4_8019EEF8[index].x + boss->obj.pos.x, D_i4_8019EEF8[index].y + boss->obj.pos.y - 10.0f, D_i4_8019EEF8[index].z + boss->obj.pos.z, 0.0f, 0.0f, 0.0f, 8.0f, 10); } @@ -985,7 +985,7 @@ void Bolse_8018E870(Boss* boss) { s32 i; s32 alpha; - Matrix_Scale(gGfxMatrix, boss->unk_3F8, boss->unk_3F8, boss->unk_3F8, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, boss->scale, boss->scale, boss->scale, MTXF_APPLY); if (boss->vwork[30].y >= 0.0f) { gSPDisplayList(gMasterDisp++, D_BO_6002020); @@ -1032,11 +1032,11 @@ void Bolse_8018EAEC(Actor* actor, s32 index) { actor->obj.pos.x = D_i4_8019EFDC[index] + gPlayer[0].pos.x; actor->obj.pos.y = D_i4_8019EFE8[index] + gPlayer[0].pos.y; actor->obj.pos.z = D_i4_8019EFF4[index] + gPlayer[0].pos.z; - actor->unk_0B6 = D_i4_8019F000[index]; + actor->animFrame = D_i4_8019F000[index]; actor->obj.rot.y = 180.0f; actor->vel.z = -gPlayer[0].baseSpeed; - actor->unk_0F4.z = D_i4_8019F00C[index]; - actor->unk_0F4.y = D_i4_8019F018[index]; + actor->rot_0F4.z = D_i4_8019F00C[index]; + actor->rot_0F4.y = D_i4_8019F018[index]; Object_SetInfo(&actor->info, actor->obj.id); actor->iwork[11] = 1; AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); @@ -1050,7 +1050,7 @@ void Bolse_8018EC1C(void) { actor->obj.pos.x = 0; actor->obj.pos.y = 0.0f; actor->obj.pos.z = -9000.0f; - actor->unk_0B6 = 30; + actor->animFrame = 30; actor->fwork[20] = 1.0f; actor->obj.id = OBJ_ACTOR_CUTSCENE; Object_SetInfo(&actor->info, actor->obj.id); @@ -1066,7 +1066,7 @@ void Bolse_8018ECB4(void) { boss->obj.pos.y = 0.0f; boss->obj.pos.z = -9000.0f; boss->obj.rot.x = 20.0f; - boss->unk_3F8 = 0.15f; + boss->scale = 0.15f; boss->obj.id = OBJ_BOSS_310; Object_SetInfo(&boss->info, boss->obj.id); } @@ -1084,7 +1084,7 @@ void Bolse_8018ED44(void) { actor->obj.pos.y = gActors[50].obj.pos.y + RAND_FLOAT(100.0f); actor->obj.pos.z = -9000.0f; actor->timer_0BC = 50; - actor->unk_0B6 = 31; + actor->animFrame = 31; actor->vel.z = 200.0f; Object_SetInfo(&actor->info, actor->obj.id); AUDIO_PLAY_SFX(NA_SE_EN_SHOT_0, actor->sfxSource, 4); @@ -1106,10 +1106,10 @@ void Bolse_8018EE4C(f32 x, f32 y) { actor->obj.pos.y = gActors[50].obj.pos.y + y; actor->obj.pos.z = -9000.0f; actor->timer_0BC = 200; - actor->unk_0B6 = 32; + actor->animFrame = 32; actor->vel.z = 80.0f; actor->obj.rot.z = RAND_FLOAT_CENTERED(120.0f); - actor->unk_0F4.z = RAND_FLOAT_CENTERED(1.0f); + actor->rot_0F4.z = RAND_FLOAT_CENTERED(1.0f); Object_SetInfo(&actor->info, actor->obj.id); AUDIO_PLAY_SFX(NA_SE_EN_SHOT_0, actor->sfxSource, 4); break; @@ -1257,7 +1257,7 @@ void Bolse_LevelStart(Player* player) { actor->obj.pos.x = D_i4_8019F030[i - 1].x + player->pos.x; actor->obj.pos.y = D_i4_8019F030[i - 1].y + player->pos.y; actor->obj.pos.z = D_i4_8019F030[i - 1].z + player->pos.z; - actor->unk_0F4.x = 352.0f; + actor->rot_0F4.x = 352.0f; actor->state = 1; actor->timer_0BC = 1000; } @@ -1269,7 +1269,7 @@ void Bolse_LevelStart(Player* player) { gCsCamAtY = player->pos.y; gCsCamAtZ = player->pos.z; gStarCount = 300; - D_ctx_80177A98 = 1; + gDrawGround = true; gLight1R = 200; gLight1G = 80; @@ -1439,7 +1439,7 @@ void Bolse_LevelComplete(Player* player) { D_ctx_80177A48[0] = 1.0f; gStarCount = 1000; - D_ctx_80177A98 = 0; + gDrawGround = false; gCsCamEyeY = 0; gCsCamEyeX = 200.0f; gCsCamEyeZ = -15000.0f; @@ -1601,7 +1601,7 @@ void Bolse_LevelComplete(Player* player) { break; case 800: - player->csState += 1; + player->csState++; player->csTimer = 50; player->unk_194 = 5.0f; player->unk_190 = 5.0f; @@ -1626,7 +1626,7 @@ void Bolse_LevelComplete(Player* player) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; gFillScreenAlphaTarget = 255; if (gFillScreenAlpha == 255) { - D_ctx_80161A94[0] = gGoldRingCount[0]; + gSavedGoldRingCount[0] = gGoldRingCount[0]; gNextGameState = GSTATE_PLAY; gNextLevel = LEVEL_VENOM_1; Audio_StopPlayerNoise(0); @@ -1856,7 +1856,7 @@ void Bolse_801912FC(Boss* boss) { Vec3f src; Vec3f dest; - if (gGameFrameCount & 0x18) { + if ((gGameFrameCount & 0x18) != 0) { Math_SmoothStepToF(&D_i4_8019EEC0, 0.0f, 1.0f, 30.0f, 0); } else { Math_SmoothStepToF(&D_i4_8019EEC0, 255.0f, 1.0f, 30.0f, 0); @@ -2069,7 +2069,7 @@ void Bolse_80191BAC(Boss* boss) { break; } - if (D_ctx_8017812C == 0) { + if (gGroundClipMode == 0) { if (((gGameFrameCount % 2) == 0)) { gLight3Brightness = 0.0f; } else { @@ -2087,7 +2087,7 @@ void Bolse_80191BAC(Boss* boss) { void Bolse_80191DB0(Boss* boss) { s32 alpha; - Matrix_Scale(gGfxMatrix, boss->unk_3F8, boss->unk_3F8, boss->unk_3F8, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, boss->scale, boss->scale, boss->scale, MTXF_APPLY); alpha = boss->fwork[0]; if (alpha != 0) { if (((gGameFrameCount % 2) == 0)) { diff --git a/src/overlays/ovl_i4/fox_fo.c b/src/overlays/ovl_i4/fox_fo.c index f78dc4d0..924f95d5 100644 --- a/src/overlays/ovl_i4/fox_fo.c +++ b/src/overlays/ovl_i4/fox_fo.c @@ -23,9 +23,9 @@ void Fortuna_801875F0(Actor* actor) { if (gAllRangeEventTimer < (gAllRangeSpawnEvent - 500)) { actor->timer_0C0 = 40; - actor->unk_04E++; - if (actor->unk_04E >= 3) { - actor->unk_04E = 0; + actor->counter_04E++; + if (actor->counter_04E >= 3) { + actor->counter_04E = 0; } for (i = 0, actorPtr = &gActors[10]; i < 10; i++, actorPtr++) { @@ -51,10 +51,10 @@ void Fortuna_801875F0(Actor* actor) { actorPtr->aiIndex = AI360_FALCO; } - actorPtr->unk_0F4.x = 3.0f; - actorPtr->unk_0F4.y = D_i4_8019EDE0[actor->unk_04E]; + actorPtr->rot_0F4.x = 3.0f; + actorPtr->rot_0F4.y = D_i4_8019EDE0[actor->counter_04E]; actorPtr->health = 24; - actorPtr->unk_0C9 = actorPtr->iwork[11] = 1; + actorPtr->drawShadow = actorPtr->iwork[11] = 1; actorPtr->itemDrop = DROP_SILVER_RING_50p; Object_SetInfo(&actorPtr->info, actorPtr->obj.id); AUDIO_PLAY_SFX(NA_SE_EN_ENGINE_01, actorPtr->sfxSource, 4); @@ -81,12 +81,12 @@ void Fortuna_80187884(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 arg4) { actor->obj.pos.z = zPos; actor->obj.id = OBJ_ACTOR_ALLRANGE; actor->aiType = AI360_WOLF; - actor->unk_0C9 = 1; + actor->drawShadow = true; actor->state = 0; actor->timer_0BC = 10000; - actor->unk_0F4.y = arg4; + actor->rot_0F4.y = arg4; actor->iwork[11] = 1; - actor->unk_0F4.x = 0.0f; + actor->rot_0F4.x = 0.0f; Object_SetInfo(&actor->info, actor->obj.id); AUDIO_PLAY_SFX(NA_SE_EN_WOLF_ENGINE, actor->sfxSource, 4); } @@ -304,7 +304,7 @@ void Fortuna_UpdateEvents(Actor* actor) { case 5: gAllRangeEventTimer = 9207; - actor->iwork[0] += 1; + actor->iwork[0]++; actor->fwork[0] += 10.0f; player->cam.eye.x = 300.0f; player->cam.eye.y = 300.0f; @@ -362,7 +362,7 @@ void Fortuna_UpdateEvents(Actor* actor) { break; case 6: - actor->iwork[0] += 1; + actor->iwork[0]++; if (gMissionStatus == MISSION_COMPLETE) { actor1->aiIndex = AI360_FOX; actor1->state = 2; @@ -382,8 +382,8 @@ void Fortuna_UpdateEvents(Actor* actor) { actor19->obj.status = OBJ_ACTIVE; actor19->obj.id = OBJ_ACTOR_ALLRANGE; actor19->state = 4; - actor19->unk_0F4.y = player->rot.y + player->yRot_114 + 180.0f; - actor19->unk_0F4.x = 15.0f; + actor19->rot_0F4.y = player->rot.y + player->yRot_114 + 180.0f; + actor19->rot_0F4.x = 15.0f; actor19->aiType = AI360_GREAT_FOX; actor19->fwork[1] = 90.0f; actor19->fwork[0] = 90.0f; @@ -590,7 +590,7 @@ void Fortuna_8018906C(void) { actor->obj.pos.x = 0.0f; actor->obj.pos.y = 0.0f; actor->obj.pos.z = -9000.0f; - actor->unk_0B6 = 11; + actor->animFrame = 11; actor->scale = 0.0f; Object_SetInfo(&actor->info, actor->obj.id); } @@ -622,7 +622,7 @@ void Fortuna_801890EC(Actor* actor, s32 arg1) { AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } else { actor->obj.pos.z = -9500.0f; - actor->unk_0B6 = 1; + actor->animFrame = 1; actor->vel.z = 22.0f; AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); @@ -763,7 +763,7 @@ void Fortuna_LevelComplete(Player* player) { break; case 2: - if (!(gMissionStatus) && (player->csTimer) > 830) { + if ((gMissionStatus == MISSION_COMPLETE) && (player->csTimer) > 830) { gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 8; } @@ -1012,8 +1012,8 @@ void Fortuna_LevelComplete(Player* player) { if (gCsFrameCount < 1136) { Math_SmoothStepToF(&D_ctx_80177A48[3], 0.55f, 1.0f, 0.02f, 0); } else { - D_ctx_80178430 += 0.3f; - D_ctx_8017842C += 0.3f; + gStarfieldScrollY += 0.3f; + gStarfieldScrollX += 0.3f; Math_SmoothStepToF(&D_ctx_80177A48[3], 0.0f, 1.0f, 0.02f, 0); if (gCsFrameCount == 1216) { player->csState = 12; @@ -1031,8 +1031,8 @@ void Fortuna_LevelComplete(Player* player) { break; case 12: - D_ctx_80178430 += 0.3f; - D_ctx_8017842C += 0.3f; + gStarfieldScrollY += 0.3f; + gStarfieldScrollX += 0.3f; player->baseSpeed += 1.0f; player->baseSpeed *= 1.15f; player->pos.y += D_ctx_80177A48[4]; diff --git a/src/overlays/ovl_i4/fox_ka.c b/src/overlays/ovl_i4/fox_ka.c index a60df65d..079d5a0b 100644 --- a/src/overlays/ovl_i4/fox_ka.c +++ b/src/overlays/ovl_i4/fox_ka.c @@ -337,8 +337,8 @@ void Katina_StartCutsceneUpdate(void) { actor->vel.x = dest.x; actor->vel.y = dest.y; actor->vel.z = dest.z; - actor->unk_0B6 = D_i4_8019F15C[i]; - actor->unk_0C9 = 1; + actor->animFrame = D_i4_8019F15C[i]; + actor->drawShadow = true; actor->iwork[KA_ACTOR_IWORK_11] = 1; Object_SetInfo(&actor->info, actor->obj.id); AUDIO_PLAY_SFX(NA_SE_EN_ENGINE_01, actor->sfxSource, 4); @@ -420,8 +420,8 @@ void Katina_LevelStart(Player* player) { actor->obj.pos.x = D_i4_8019F168[i - 1].x + player->pos.x; actor->obj.pos.y = D_i4_8019F168[i - 1].y + player->pos.y; actor->obj.pos.z = D_i4_8019F168[i - 1].z + player->pos.z; - actor->unk_0F4.y = D_i4_8019F18C[i - 1]; - actor->unk_0F4.x = -10.0f; + actor->rot_0F4.y = D_i4_8019F18C[i - 1]; + actor->rot_0F4.x = -10.0f; actor->state = 1; actor->timer_0BC = 1000; } @@ -787,19 +787,19 @@ void Katina_BossSpawnEnemies(Saucerer* this, Vec3f* pos, f32 arg2) { actor->state = 1; actor->timer_0BC = 20; - actor->unk_0F4.y = arg2; - actor->unk_0F4.x = -30.0f; + actor->rot_0F4.y = arg2; + actor->rot_0F4.x = -30.0f; actor->aiType = i + AI360_10; - actor->unk_0B6 = D_i4_8019F198[i - 10]; + actor->animFrame = D_i4_8019F198[i - 10]; actor->aiIndex = sEnemySpawnTargets[i - 10]; actor->health = 24; - if (actor->unk_0B6 >= 2) { + if (actor->animFrame >= 2) { actor->health = 1000; } - actor->unk_0C9 = 1; + actor->drawShadow = true; if (D_i4_801A0540 < 9600) { actor->itemDrop = DROP_SILVER_RING_10p; @@ -856,7 +856,7 @@ void Katina_BossUpdate(Saucerer* this) { enemyCount = 0; for (i = 10, actor = &gActors[i]; i < ARRAY_COUNT(gActors); i++, actor++) { - if ((actor->obj.status == OBJ_ACTIVE) && (actor->unk_0B6 == 0)) { + if ((actor->obj.status == OBJ_ACTIVE) && (actor->animFrame == 0)) { enemyCount++; } } @@ -889,7 +889,7 @@ void Katina_BossUpdate(Saucerer* this) { this->vwork[0].y = 2000.0f; - this->unk_05E = 1; + this->drawShadow = true; AUDIO_PLAY_SFX(NA_SE_EARTHQUAKE, this->sfxSource, 0); @@ -979,7 +979,7 @@ void Katina_BossUpdate(Saucerer* this) { gPlayer[0].cam.at.y = 1000.0f; gPlayer[0].cam.at.z = 0.0f; - this->unk_05E = 0; + this->drawShadow = false; this->obj.pos.x = -500.0f; this->obj.pos.z = 500.0f; @@ -996,7 +996,7 @@ void Katina_BossUpdate(Saucerer* this) { this->obj.rot.y = 217.0f; for (i = 10; i < ARRAY_COUNT(gActors); i++) { - if (gActors[i].unk_0B6 == 0) { + if (gActors[i].animFrame == 0) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); } } @@ -1229,7 +1229,7 @@ void Katina_BossUpdate(Saucerer* this) { gPlayer[0].cam.at.y = this->obj.pos.y - 500.0f; - this->unk_05E = 0; + this->drawShadow = false; if (this->timer_050 == 260) { this->obj.pos.y = 3000.0f; @@ -1413,7 +1413,7 @@ void Katina_BossUpdate(Saucerer* this) { this->timer_050 = 1000; this->obj.rot.y = 30.0f; this->obj.pos.x = -4000.0f; - this->unk_078.z = 7.0f; + this->rot_078.z = 7.0f; AUDIO_PLAY_SFX(NA_SE_KA_UFO_FALLING, this->sfxSource, 0); @@ -1428,7 +1428,7 @@ void Katina_BossUpdate(Saucerer* this) { Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); - this->obj.pos.z += this->unk_078.z; + this->obj.pos.z += this->rot_078.z; if (this->timer_050 == 820) { AUDIO_PLAY_SFX(NA_SE_KA_UFO_BOUND, this->sfxSource, 0); @@ -1450,7 +1450,7 @@ void Katina_BossUpdate(Saucerer* this) { this->obj.rot.x -= 0.06f; this->vel.y = 0.0f; this->gravity = 0.0f; - Math_SmoothStepToF(&this->unk_078.z, 0.0f, 1.0f, 1.0f, 0.0f); + Math_SmoothStepToF(&this->rot_078.z, 0.0f, 1.0f, 1.0f, 0.0f); Katina_FireSmokeEffectSpawn( this->obj.pos.x + 2000.0f + RAND_FLOAT(500.0f), (this->obj.pos.y - 500.0f) + RAND_FLOAT(500.0f), this->obj.pos.z + 600.0f + RAND_FLOAT(1000.0f), 0.0f, 20.0f, 0.0f, RAND_FLOAT(20.0f) + 15.0f); @@ -1494,7 +1494,7 @@ void Katina_BossUpdate(Saucerer* this) { gRadarMarks[64].pos.x = this->obj.pos.x; gRadarMarks[64].pos.y = this->obj.pos.y; gRadarMarks[64].pos.z = this->obj.pos.z; - gRadarMarks[64].yRot = this->unk_078.y + 180.0f; + gRadarMarks[64].yRot = this->rot_078.y + 180.0f; if (this->state < 6) { Math_SmoothStepToF(&this->obj.pos.x, this->vwork[0].x, 0.01f, this->fwork[BOSS_MOVEMENT_SPEED], 0); @@ -1502,11 +1502,11 @@ void Katina_BossUpdate(Saucerer* this) { Math_SmoothStepToF(&this->obj.pos.z, this->vwork[0].z, 0.01f, this->fwork[BOSS_MOVEMENT_SPEED], 0); } else { Math_SmoothStepToAngle( - &this->unk_078.y, + &this->rot_078.y, Math_RadToDeg(Math_Atan2F(this->vwork[0].x - this->obj.pos.x, this->vwork[0].z - this->obj.pos.z)), 0.5f, 1.5f, 0.0001f); - this->vel.x = SIN_DEG(this->unk_078.y) * this->fwork[BOSS_MOVEMENT_SPEED]; - this->vel.z = COS_DEG(this->unk_078.y) * this->fwork[BOSS_MOVEMENT_SPEED]; + this->vel.x = SIN_DEG(this->rot_078.y) * this->fwork[BOSS_MOVEMENT_SPEED]; + this->vel.z = COS_DEG(this->rot_078.y) * this->fwork[BOSS_MOVEMENT_SPEED]; } for (i = 0; i < 10; i++) { @@ -1704,7 +1704,7 @@ void Katina_SFTeamMissionAccomUpdate(ActorCutscene* this, s32 idx) { this->obj.pos.y = D_i4_8019F26C[idx + 1] + gPlayer[0].pos.y; this->obj.pos.z = D_i4_8019F278[idx + 1] + gPlayer[0].pos.z; - this->unk_0F4.y = D_i4_8019F284[idx + 1]; + this->rot_0F4.y = D_i4_8019F284[idx + 1]; this->fwork[KA_ACTOR_FWORK_1] = D_i4_8019F290[idx + 1]; this->fwork[KA_ACTOR_FWORK_0] = 40.0f; @@ -1730,7 +1730,7 @@ void Katina_SFTeamFleeUpdate(ActorCutscene* this, s32 idx) { this->obj.pos.y = D_i4_8019F2AC[idx + 1]; this->obj.pos.z = D_i4_8019F2BC[idx + 1]; - this->unk_0F4.y = D_i4_8019F2CC[idx + 1]; + this->rot_0F4.y = D_i4_8019F2CC[idx + 1]; this->fwork[KA_ACTOR_FWORK_1] = D_i4_8019F2DC[idx + 1]; this->fwork[KA_ACTOR_FWORK_0] = 40.0f; @@ -1770,7 +1770,7 @@ void Katina_SFTeam_LevelComplete_Update(void) { actor->obj.pos.y = (sCsLevelCompleteActorPos[i].y + gPlayer[0].pos.y) - RAND_FLOAT_SEEDED(1000.0f); actor->obj.pos.z = (sCsLevelCompleteActorPos[i].z + gPlayer[0].pos.z) + RAND_FLOAT_SEEDED(1000.0f); - actor->unk_0F4.z = RAND_FLOAT_CENTERED_SEEDED(200.0f); + actor->rot_0F4.z = RAND_FLOAT_CENTERED_SEEDED(200.0f); actor->vwork[0].x = (sCsLevelCompleteActorPos[i].x * 0.5f) + gPlayer[0].pos.x; actor->vwork[0].y = sCsLevelCompleteActorPos[i].y + gPlayer[0].pos.y; @@ -1779,7 +1779,7 @@ void Katina_SFTeam_LevelComplete_Update(void) { actor->state = 1; if (i >= 3) { - actor->unk_0B6 = 33; + actor->animFrame = 33; } Object_SetInfo(&actor->info, actor->obj.id); @@ -1828,12 +1828,12 @@ void Katina_LevelComplete(Player* player) { gCsCamAtY = 1000.0f; gCsCamAtZ = boss->obj.pos.z; for (i = 10; i < ARRAY_COUNT(gActors); i++) { - if (gActors[i].unk_0B6 == 0) { + if (gActors[i].animFrame == 0) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); } } - player->csState += 1; + player->csState++; if (gTeamShields[TEAM_ID_FALCO] > 0) { Katina_SFTeamMissionAccomUpdate(&gActors[1], 0); @@ -1858,8 +1858,8 @@ void Katina_LevelComplete(Player* player) { 0.1f, 1.0f, 0.0f); for (i = 1; i < 4; i++) { - angle = Math_SmoothStepToAngle(&gActors[i].unk_0F4.y, gActors[i].fwork[1], 0.1f, 3.0f, 0.0f); - Math_SmoothStepToF(&gActors[i].unk_0F4.z, angle * 20.0f, 0.1f, 1.0f, 0.0f); + angle = Math_SmoothStepToAngle(&gActors[i].rot_0F4.y, gActors[i].fwork[1], 0.1f, 3.0f, 0.0f); + Math_SmoothStepToF(&gActors[i].rot_0F4.z, angle * 20.0f, 0.1f, 1.0f, 0.0f); } if (gCsFrameCount >= 200) { @@ -1869,12 +1869,12 @@ void Katina_LevelComplete(Player* player) { } if (gCsFrameCount >= 225) { - gActors[1].unk_0F4.x += 1.0f; - gActors[1].unk_0F4.z += 1.0f; - gActors[2].unk_0F4.x += 1.0f; - gActors[2].unk_0F4.z -= 1.0f; - gActors[3].unk_0F4.x += 1.0f; - gActors[3].unk_0F4.z += 1.0f; + gActors[1].rot_0F4.x += 1.0f; + gActors[1].rot_0F4.z += 1.0f; + gActors[2].rot_0F4.x += 1.0f; + gActors[2].rot_0F4.z -= 1.0f; + gActors[3].rot_0F4.x += 1.0f; + gActors[3].rot_0F4.z += 1.0f; } if (gCsFrameCount >= 225) { @@ -1913,7 +1913,7 @@ void Katina_LevelComplete(Player* player) { AUDIO_PLAY_BGM(NA_BGM_COURSE_FAILURE); } - D_ctx_80177A98 = 0; + gDrawGround = false; D_ctx_80177A48[1] = 0.0f; D_ctx_80177A48[2] = 0.0f; @@ -2047,14 +2047,14 @@ void Katina_LevelComplete(Player* player) { break; case 101: - gActors[1].unk_0F4.y += 0.1f; - gActors[1].unk_0F4.x += 0.1f; - gActors[2].unk_0F4.y -= 0.007f; - gActors[2].unk_0F4.x += 0.12f; - gActors[3].unk_0F4.y -= 0.09f; - gActors[3].unk_0F4.x += 0.09f; - gActors[4].unk_0F4.y += 0.001f; - gActors[4].unk_0F4.x += 0.08f; + gActors[1].rot_0F4.y += 0.1f; + gActors[1].rot_0F4.x += 0.1f; + gActors[2].rot_0F4.y -= 0.007f; + gActors[2].rot_0F4.x += 0.12f; + gActors[3].rot_0F4.y -= 0.09f; + gActors[3].rot_0F4.x += 0.09f; + gActors[4].rot_0F4.y += 0.001f; + gActors[4].rot_0F4.x += 0.08f; break; } @@ -2103,9 +2103,9 @@ void Katina_SFTeamFlyTowardsCamera(ActorCutscene* this) { Math_SmoothStepToF(&this->obj.pos.x, this->vwork[0].x, 0.02f, 2.0f, 0.0001f); Math_SmoothStepToF(&this->obj.pos.y, this->vwork[0].y, 0.02f, 2.0f, 0.0001f); Math_SmoothStepToF(&this->obj.pos.z, this->vwork[0].z, 0.02f, 2.0f, 0.0001f); - Math_SmoothStepToF(&this->unk_0F4.z, 0.0f, 0.02f, 0.2f, 0.0001f); + Math_SmoothStepToF(&this->rot_0F4.z, 0.0f, 0.02f, 0.2f, 0.0001f); - if ((this->unk_0B6 != 0) && ((((s32) (this->index % 8U) * 10) + 800) < gCsFrameCount)) { + if ((this->animFrame != 0) && ((((s32) (this->index % 8U) * 10) + 800) < gCsFrameCount)) { this->state = 4; } break; @@ -2118,7 +2118,7 @@ void Katina_SFTeamFlyTowardsCamera(ActorCutscene* this) { case 3: this->iwork[KA_ACTOR_IWORK_11] = 2; this->fwork[KA_ACTOR_FWORK_0] += 2.0f; - this->unk_0F4.x += 0.1f; + this->rot_0F4.x += 0.1f; this->fwork[KA_ACTOR_FWORK_21] += 0.4f; if (this->fwork[KA_ACTOR_FWORK_21] > 0.6f) { this->fwork[KA_ACTOR_FWORK_21] = 0.6f; @@ -2126,15 +2126,15 @@ void Katina_SFTeamFlyTowardsCamera(ActorCutscene* this) { break; case 4: - Math_SmoothStepToF(&this->unk_0F4.z, 120.0f, 0.1f, 3.0f, 0.0001f); + Math_SmoothStepToF(&this->rot_0F4.z, 120.0f, 0.1f, 3.0f, 0.0001f); this->obj.pos.x += this->fwork[KA_ACTOR_FWORK_1]; this->obj.pos.y += this->fwork[KA_ACTOR_FWORK_1]; this->fwork[KA_ACTOR_FWORK_1] -= 0.5f; break; } - Matrix_RotateY(gCalcMatrix, (this->unk_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(this->unk_0F4.x * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (this->rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(this->rot_0F4.x * M_DTOR), MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; @@ -2146,9 +2146,9 @@ void Katina_SFTeamFlyTowardsCamera(ActorCutscene* this) { this->vel.y = dest.y; this->vel.z = dest.z; - this->obj.rot.x = -this->unk_0F4.x; - this->obj.rot.y = this->unk_0F4.y + 180.0f; - this->obj.rot.z = -this->unk_0F4.z; + this->obj.rot.x = -this->rot_0F4.x; + this->obj.rot.y = this->rot_0F4.y + 180.0f; + this->obj.rot.z = -this->rot_0F4.z; } void Katina_801981F8(Actor* this) { @@ -2173,32 +2173,32 @@ void Katina_801981F8(Actor* this) { if (actor->obj.status == OBJ_FREE) { Actor_Initialize(actor); - actor->unk_0B6 = D_i4_8019F430[i]; + actor->animFrame = D_i4_8019F430[i]; - if ((actor->unk_0B6 != 0) || (gBosses[KA_BOSS_SAUCERER].state == 0)) { + if ((actor->animFrame != 0) || (gBosses[KA_BOSS_SAUCERER].state == 0)) { actor->obj.status = OBJ_ACTIVE; actor->obj.id = OBJ_ACTOR_ALLRANGE; - Matrix_RotateY(gCalcMatrix, this->unk_04E * 18.0f * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, this->counter_04E * 18.0f * M_DTOR, MTXF_NEW); Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); actor->obj.pos.x = dest.x; actor->obj.pos.y = RAND_FLOAT(1000.0f) + 300.0f; actor->obj.pos.z = dest.z; - actor->unk_0F4.y = this->unk_04E * 18.0f; + actor->rot_0F4.y = this->counter_04E * 18.0f; actor->state = 1; actor->aiType = i + AI360_10; actor->aiIndex = D_i4_8019F444[i]; - actor->unk_0F4.x = 3.0f; + actor->rot_0F4.x = 3.0f; actor->health = 24; - if (actor->unk_0B6 >= 2) { + if (actor->animFrame >= 2) { actor->health = 1000; } actor->iwork[KA_ACTOR_IWORK_11] = 1; - actor->unk_0C9 = 1; + actor->drawShadow = true; if (D_i4_801A0540 < 9600) { actor->itemDrop = DROP_SILVER_RING_10p; @@ -2207,14 +2207,14 @@ void Katina_801981F8(Actor* this) { actor->timer_0C2 = 30; Object_SetInfo(&actor->info, actor->obj.id); - if (actor->unk_0B6 == 1) { + if (actor->animFrame == 1) { actor->info.targetOffset = 0.0f; actor->info.bonus = 0; AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } actor->info.action = (ObjectFunc) Katina_EnemyUpdate; actor->info.draw = (ObjectFunc) Katina_EnemyDraw; - this->unk_04E++; + this->counter_04E++; } break; } @@ -2233,10 +2233,10 @@ void Katina_BillFighterInit(void) { actor->state = 1; actor->aiType = AI360_BILL; actor->aiIndex = AI360_10 + 17; - actor->unk_0B6 = 2; + actor->animFrame = 2; actor->health = 1000; actor->iwork[KA_ACTOR_IWORK_11] = 1; - actor->unk_0C9 = 1; + actor->drawShadow = true; actor->timer_0C2 = 30; actor->obj.id = OBJ_ACTOR_ALLRANGE; @@ -2452,7 +2452,7 @@ void Katina_EnemyUpdate(ActorAllRange* this) { } if ((yDist < 1500.0f) && (xDist < 1500.0f)) { - this->iwork[KA_ACTOR_IWORK_4] += 1; + this->iwork[KA_ACTOR_IWORK_4]++; this->iwork[KA_ACTOR_IWORK_5] = 1; if ((((this->index + gGameFrameCount) & 11) == 0) && (Rand_ZeroOne() < 0.1f) && @@ -2537,12 +2537,12 @@ void Katina_EnemyUpdate(ActorAllRange* this) { } } else if ((this->obj.pos.y < (gGroundHeight + 50.0f)) && (xAngle > 180.0f)) { xAngle = 0.0f; - this->unk_0F4.x = 0.0f; + this->rot_0F4.x = 0.0f; } - Math_SmoothStepToAngle(&this->unk_0F4.x, xAngle, 0.5f, this->fwork[KA_ACTOR_FWORK_2], 0.0001f); + Math_SmoothStepToAngle(&this->rot_0F4.x, xAngle, 0.5f, this->fwork[KA_ACTOR_FWORK_2], 0.0001f); - yAngle = Math_SmoothStepToAngle(&this->unk_0F4.y, this->fwork[KA_ACTOR_FWORK_19], 0.5f, + yAngle = Math_SmoothStepToAngle(&this->rot_0F4.y, this->fwork[KA_ACTOR_FWORK_19], 0.5f, this->fwork[KA_ACTOR_FWORK_2], 0.0001f) * 30.0f; @@ -2553,8 +2553,8 @@ void Katina_EnemyUpdate(ActorAllRange* this) { } Math_SmoothStepToAngle(&this->obj.rot.z, zAngle, 0.1f, 3.0f, 0.01f); } - this->obj.rot.x = -this->unk_0F4.x; - this->obj.rot.y = this->unk_0F4.y; + this->obj.rot.x = -this->rot_0F4.x; + this->obj.rot.y = this->rot_0F4.y; Math_SmoothStepToF(&this->fwork[KA_ACTOR_FWORK_0], this->fwork[KA_ACTOR_FWORK_1], 0.2f, 1.0f, 0.1f); Math_SmoothStepToF(&this->fwork[KA_ACTOR_FWORK_2], this->fwork[KA_ACTOR_FWORK_3], 1.0f, 0.1f, 0.1f); @@ -2598,7 +2598,7 @@ void Katina_EnemyUpdate(ActorAllRange* this) { radarMark->pos.x = this->obj.pos.x; radarMark->pos.y = this->obj.pos.y; radarMark->pos.z = this->obj.pos.z; - radarMark->yRot = this->unk_0F4.y + 180.0f; + radarMark->yRot = this->rot_0F4.y + 180.0f; if (this->iwork[KA_ACTOR_IWORK_8] != 0) { this->iwork[KA_ACTOR_IWORK_8]--; @@ -2638,7 +2638,7 @@ void Katina_EnemyDraw(ActorAllRange* this) { gSPFogPosition(gMasterDisp++, gFogNear, 1005); } - switch (this->unk_0B6) { + switch (this->animFrame) { case 0: if (this->iwork[KA_ACTOR_LOW_POLY]) { gSPDisplayList(gMasterDisp++, aKaEnemy1LowPolyDL); diff --git a/src/overlays/ovl_i4/fox_sz.c b/src/overlays/ovl_i4/fox_sz.c index b7187235..0e2aac55 100644 --- a/src/overlays/ovl_i4/fox_sz.c +++ b/src/overlays/ovl_i4/fox_sz.c @@ -190,7 +190,7 @@ void SectorZ_80199FCC(Actor* actor, s32 arg1) { actor->obj.pos.z = D_i4_8019F4C0[arg1].z; actor->state = 5; - actor->unk_0F4.y = 180.0f; + actor->rot_0F4.y = 180.0f; Object_SetInfo(&actor->info, actor->obj.id); @@ -214,7 +214,7 @@ void SectorZ_8019A0F8(Actor* actor, s32 arg1) { actor->obj.pos.z = gActors[10].obj.pos.z + D_i4_8019F4E4[arg1].z; actor->state = 5; - actor->unk_0F4.y = 180.0f; + actor->rot_0F4.y = 180.0f; Object_SetInfo(&actor->info, actor->obj.id); @@ -236,10 +236,10 @@ void SectorZ_8019A1D0(void) { actor->aiType = AI360_KATT; actor->aiIndex = AI360_10 + 2; actor->health = 10000; - actor->unk_0F4.y = 180.0f; + actor->rot_0F4.y = 180.0f; actor->state = 0; actor->timer_0BC = 250; - actor->unk_0F4.x = -20.0f; + actor->rot_0F4.x = -20.0f; actor->iwork[11] = 1; actor->obj.rot.z = 90.0f; @@ -351,14 +351,14 @@ void SectorZ_8019A3E8(Actor* actor) { Actor_Initialize(actorPtr); actorPtr->obj.status = OBJ_ACTIVE; actorPtr->obj.id = OBJ_ACTOR_ALLRANGE; - Matrix_RotateY(gCalcMatrix, (actor->unk_04E * 18.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, (actor->counter_04E * 18.0f) * M_DTOR, MTXF_NEW); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp40, &sp34); actorPtr->obj.pos.x = sp34.x; actorPtr->obj.pos.y = RAND_FLOAT(1000.0f) + 300.0f; actorPtr->obj.pos.z = sp34.z; - actorPtr->unk_0F4.y = actor->unk_04E * 18.0f; + actorPtr->rot_0F4.y = actor->counter_04E * 18.0f; actorPtr->state = 3; actorPtr->aiType = i + AI360_10 + 3; actorPtr->aiIndex = -1; @@ -387,7 +387,7 @@ void SectorZ_8019A3E8(Actor* actor) { actorPtr->timer_0C2 = 30; Object_SetInfo(&actorPtr->info, actorPtr->obj.id); AUDIO_PLAY_SFX(NA_SE_EN_ENGINE_01, actorPtr->sfxSource, 4); - actor->unk_04E++; + actor->counter_04E++; break; } } @@ -638,7 +638,7 @@ void SectorZ_UpdateEvents(Actor* actor) { break; } - if (!(gGameFrameCount & 0x18)) { + if ((gGameFrameCount & 0x18) == 0) { Math_SmoothStepToF(&gSzMissileR, 63.0f, 1.0f, 9.450001f, 0); Math_SmoothStepToF(&gSzMissileG, 255.0f, 1.0f, 35.25f, 0); Math_SmoothStepToF(&gSzMissileB, 158.0f, 1.0f, 21.6f, 0); @@ -663,7 +663,7 @@ void SectorZ_8019B48C(void) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; actor->obj.id = OBJ_ACTOR_CUTSCENE; - actor->unk_0B6 = 25; + actor->animFrame = 25; actor->obj.pos.x = D_i4_8019F528[i].x; actor->obj.pos.y = D_i4_8019F528[i].y; actor->obj.pos.z = D_i4_8019F528[i].z; @@ -685,7 +685,7 @@ void SectorZ_8019B568(void) { actor->obj.pos.z = 0.0f; actor->obj.rot.y = 270.0f; - actor->unk_0B6 = 1; + actor->animFrame = 1; actor->vel.x = -20.0f; Object_SetInfo(&actor->info, actor->obj.id); AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); @@ -712,7 +712,7 @@ void SectorZ_8019B630(Actor* actor, s32 index) { actor->obj.rot.x = 10.0f; actor->obj.rot.z = D_i4_8019F5AC[index]; - actor->unk_0B6 = 26; + actor->animFrame = 26; actor->iwork[11] = 1; Object_SetInfo(&actor->info, actor->obj.id); AUDIO_PLAY_SFX(NA_SE_EN_ENGINE_01, actor->sfxSource, 4); @@ -765,7 +765,7 @@ void SectorZ_8019B888(void) { actor->obj.pos.z = gPlayer[0].pos.z + D_i4_8019F5EC[i].z; actor->aiType = i; actor->state = 2; - actor->unk_0F4.y = 270.0f; + actor->rot_0F4.y = 270.0f; actor->health = 255; actor->iwork[11] = 1; AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); @@ -1048,7 +1048,7 @@ void SectorZ_8019C574(Actor* actor, s32 index) { actor->obj.pos.z = D_i4_8019F63C[index]; actor->fwork[0] = gPlayer[0].baseSpeed; - actor->unk_0F4.y = gPlayer[0].rot.y; + actor->rot_0F4.y = gPlayer[0].rot.y; Object_SetInfo(&actor->info, actor->obj.id); @@ -1056,7 +1056,7 @@ void SectorZ_8019C574(Actor* actor, s32 index) { actor->iwork[11] = 1; AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } else { - actor->unk_0B6 = 1; + actor->animFrame = 1; actor->fwork[0] = 20.0f; AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); @@ -1075,16 +1075,16 @@ void SectorZ_8019C70C(void) { actor->obj.pos.y = gBosses[0].obj.pos.y - 1000.0f; actor->obj.pos.z = gBosses[0].obj.pos.z - 1000.0f; - actor->unk_0F4.y = 180.0f; - actor->unk_0F4.x = 20.0f; + actor->rot_0F4.y = 180.0f; + actor->rot_0F4.x = 20.0f; actor->obj.rot.x = -20.0f; actor->obj.rot.y = 180.0f; actor->obj.rot.y = 2.0f * actor->obj.rot.y; - actor->obj.rot.z = -actor->unk_0F4.z; + actor->obj.rot.z = -actor->rot_0F4.z; actor->fwork[0] = 30.0f; - actor->unk_0B6 = 24; + actor->animFrame = 24; actor->iwork[11] = 1; actor->state = 10; actor->timer_0BC = 130; @@ -1195,9 +1195,9 @@ void SectorZ_LevelComplete(Player* player) { gFillScreenAlphaTarget = 0; gFillScreenAlpha = 0; - Math_SmoothStepToAngle(&boss0->unk_078.x, 20.0f, 0.03f, boss0->fwork[1], 0.0f); - Math_SmoothStepToAngle(&boss0->unk_078.y, 180.0f, 0.03f, boss0->fwork[2], 0.0f); - Math_SmoothStepToAngle(&boss0->unk_078.z, 30.0f, 0.03f, boss0->fwork[3], 0.0f); + Math_SmoothStepToAngle(&boss0->rot_078.x, 20.0f, 0.03f, boss0->fwork[1], 0.0f); + Math_SmoothStepToAngle(&boss0->rot_078.y, 180.0f, 0.03f, boss0->fwork[2], 0.0f); + Math_SmoothStepToAngle(&boss0->rot_078.z, 30.0f, 0.03f, boss0->fwork[3], 0.0f); Math_SmoothStepToF(&boss0->fwork[0], 20.0f, 0.05f, 0.3f, 0.0f); Math_SmoothStepToF(&boss0->fwork[1], 0.07f, 1.0f, 0.07f, 0.0f); Math_SmoothStepToF(&boss0->fwork[2], 0.5f, 1.0f, 0.05f, 0.0f); @@ -1284,7 +1284,7 @@ void SectorZ_LevelComplete(Player* player) { gCsCamAtZ = player->pos.z; if (gCsFrameCount == 1620) { - player->csState += 1; + player->csState++; D_ctx_80177A48[0] = 0.0f; D_ctx_80177A48[1] = 0.0f; D_ctx_80177A48[2] = 0.0f; @@ -1585,7 +1585,7 @@ void SectorZ_8019DD20(Actor* actor) { case 2: actor->iwork[11] = 2; actor->fwork[0] += 2.0f; - actor->unk_0F4.x += actor->fwork[1]; + actor->rot_0F4.x += actor->fwork[1]; Math_SmoothStepToF(&actor->fwork[1], 0.1f, 1.0f, 0.01f, 0.0f); break; @@ -1596,23 +1596,23 @@ void SectorZ_8019DD20(Actor* actor) { break; case 11: - Math_SmoothStepToF(&actor->unk_0F4.x, 215.0f, 0.1f, 7.0f, 0.0f); + Math_SmoothStepToF(&actor->rot_0F4.x, 215.0f, 0.1f, 7.0f, 0.0f); Math_SmoothStepToF(&actor->fwork[0], 10.0f, 0.1f, 1.5f, 0.0f); - Math_SmoothStepToAngle(&actor->unk_0F4.y, 140.0f, 0.1f, 1.0f, 0.0f); - if (actor->unk_0F4.x > 180.0f) { + Math_SmoothStepToAngle(&actor->rot_0F4.y, 140.0f, 0.1f, 1.0f, 0.0f); + if (actor->rot_0F4.x > 180.0f) { actor->state = 12; } break; case 12: - Math_SmoothStepToAngle(&actor->unk_0F4.x, 218.0f, 0.1f, 7.0f, 0.0f); - Math_SmoothStepToAngle(&actor->unk_0F4.y, 147.0f, 0.1f, 1.0f, 0.0f); - Math_SmoothStepToF(&actor->unk_0F4.z, 170.0f, 0.03f, 3.0f, 0.0f); + Math_SmoothStepToAngle(&actor->rot_0F4.x, 218.0f, 0.1f, 7.0f, 0.0f); + Math_SmoothStepToAngle(&actor->rot_0F4.y, 147.0f, 0.1f, 1.0f, 0.0f); + Math_SmoothStepToF(&actor->rot_0F4.z, 170.0f, 0.03f, 3.0f, 0.0f); Math_SmoothStepToF(&actor->fwork[0], 20.0f, 0.1f, 1.0f, 0.0f); break; } - if (actor->unk_0B6 == 24) { + if (actor->animFrame == 24) { switch (gCsFrameCount) { case 290: if (gTeamShields[TEAM_ID_FALCO] > 0) { @@ -1636,7 +1636,7 @@ void SectorZ_8019DD20(Actor* actor) { if (gCsFrameCount > 430) { actor->fwork[29] = 3.0f; - Math_SmoothStepToF(&actor->unk_0F4.z, 500.0f, 0.1f, 20.0f, 0.0f); + Math_SmoothStepToF(&actor->rot_0F4.z, 500.0f, 0.1f, 20.0f, 0.0f); Math_SmoothStepToF(&actor->fwork[0], 40.0f, 0.1f, 3.0f, 0.0f); if ((gCsFrameCount < 460) && ((gCsFrameCount & 3) == 0)) { @@ -1653,8 +1653,8 @@ void SectorZ_8019DD20(Actor* actor) { } } - Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(actor->unk_0F4.x * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (actor->rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(actor->rot_0F4.x * M_DTOR), MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; @@ -1666,16 +1666,16 @@ void SectorZ_8019DD20(Actor* actor) { actor->vel.y = dest.y; actor->vel.z = dest.z; - actor->obj.rot.x = -actor->unk_0F4.x; - actor->obj.rot.y = actor->unk_0F4.y + 180.0f; - actor->obj.rot.z = -actor->unk_0F4.z; + actor->obj.rot.x = -actor->rot_0F4.x; + actor->obj.rot.y = actor->rot_0F4.y + 180.0f; + actor->obj.rot.z = -actor->rot_0F4.z; } void SectorZ_8019E234(Actor* actor) { s32 i; - actor->obj.rot.x += actor->unk_0F4.x; - actor->obj.rot.y += actor->unk_0F4.y; + actor->obj.rot.x += actor->rot_0F4.x; + actor->obj.rot.y += actor->rot_0F4.y; if (actor->dmgType != DMG_NONE) { actor->timer_0C6 = 20; @@ -1752,8 +1752,8 @@ void SectorZ_Boss_Update(Boss* boss) { } } - Matrix_RotateY(gCalcMatrix, (boss->unk_078.y + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(boss->unk_078.x * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (boss->rot_078.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(boss->rot_078.x * M_DTOR), MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; @@ -1765,9 +1765,9 @@ void SectorZ_Boss_Update(Boss* boss) { boss->vel.y = dest.y; boss->vel.z = dest.z; - boss->obj.rot.x = -boss->unk_078.x; - boss->obj.rot.y = boss->unk_078.y + 180.0f; - boss->obj.rot.z = -boss->unk_078.z; + boss->obj.rot.x = -boss->rot_078.x; + boss->obj.rot.y = boss->rot_078.y + 180.0f; + boss->obj.rot.z = -boss->rot_078.z; if (!gGreatFoxIntact) { Matrix_RotateY(gCalcMatrix, (boss->obj.rot.y - 270.0f) * M_DTOR, MTXF_NEW); @@ -1830,8 +1830,8 @@ void SectorZ_8019EA68(void) { actor->obj.pos.y = gLevelObjects[i].yPos; actor->obj.pos.z = -gLevelObjects[i].zPos1; actor->health = 24; - actor->unk_0F4.x = RAND_FLOAT_CENTERED(4.0f); - actor->unk_0F4.y = RAND_FLOAT_CENTERED(4.0f); + actor->rot_0F4.x = RAND_FLOAT_CENTERED(4.0f); + actor->rot_0F4.y = RAND_FLOAT_CENTERED(4.0f); Object_SetInfo(&actor->info, actor->obj.id); actor->itemDrop = DROP_SILVER_RING; @@ -1849,11 +1849,11 @@ void SectorZ_8019EA68(void) { boss->obj.pos.y = 0.0f; boss->obj.pos.z = 0.0f; - boss->unk_078.y = 90.0f; + boss->rot_078.y = 90.0f; - boss->obj.rot.x = -boss->unk_078.x; - boss->obj.rot.y = boss->unk_078.y + 180.0f; - boss->obj.rot.z = -boss->unk_078.z; + boss->obj.rot.x = -boss->rot_078.x; + boss->obj.rot.y = boss->rot_078.y + 180.0f; + boss->obj.rot.z = -boss->rot_078.z; boss->obj.id = OBJ_BOSS_SZ; Object_SetInfo(&boss->info, boss->obj.id); diff --git a/src/overlays/ovl_i5/fox_ma.c b/src/overlays/ovl_i5/fox_ma.c index b7a58af0..fa3fd441 100644 --- a/src/overlays/ovl_i5/fox_ma.c +++ b/src/overlays/ovl_i5/fox_ma.c @@ -1326,7 +1326,7 @@ void Macbeth_8019E624(Actor* actor, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f3 if ((*arg2 <= 0) || ((D_MA_801BE2F0[1] - 1 == actor->iwork[5]) && (actor->iwork[5] < D_MA_801BE2F0[3])) || (((D_MA_801BE2F0[1] + 1) == actor->iwork[5]) && (D_MA_801BE2F0[3] < actor->iwork[5]))) { - gHitCount += 1; + gHitCount++; (*arg1)++; } } else { @@ -3307,7 +3307,7 @@ void Macbeth_801A5FD0(Actor* actor) { if (gPlayer[0].trueZpos - actor->obj.pos.z < actor->fwork[2]) { if (actor->iwork[0] == 0) { AUDIO_PLAY_SFX(NA_SE_OB_POST_UP, actor->sfxSource, 0); - actor->iwork[0] += 1; + actor->iwork[0]++; } Math_SmoothStepToF(&actor->obj.pos.y, actor->fwork[1] + 356.0f, 0.4f, 20.0f, 0.01f); } @@ -3432,8 +3432,8 @@ void Macbeth_801A68F8(Actor* actor, s16 arg1, f32 arg2, f32 arg3, f32 arg4, f32 gTexturedLines[arg1].posAA.x = arg2; gTexturedLines[arg1].posAA.y = arg3; gTexturedLines[arg1].xyScale = 5.0f; - gTexturedLines[arg1].red = gTexturedLines[arg1].green = gTexturedLines[arg1].blue = gTexturedLines[arg1].alpha = - 255; + gTexturedLines[arg1].prim.r = gTexturedLines[arg1].prim.g = gTexturedLines[arg1].prim.b = + gTexturedLines[arg1].prim.a = 255; gTexturedLines[arg1].timer = 3; gTexturedLines[arg1].posAA.z = arg4; gTexturedLines[arg1].posBB.x = arg5; @@ -4169,24 +4169,24 @@ void Macbeth_801A7E7C(Actor* actor) { switch (D_i5_801BE320[18]) { case 0: case 1: - var_v0 = 0xF; + var_v0 = 16 - 1; var_s0 = 10; break; case 2: - var_v0 = 0xF; + var_v0 = 16 - 1; var_s0 = 20; break; case 3: - var_v0 = 7; + var_v0 = 8 - 1; var_s0 = 20; break; default: - var_v0 = 3; + var_v0 = 4 - 1; var_s0 = 10; break; } - if (!(var_v0 & gGameFrameCount)) { + if ((var_v0 & gGameFrameCount) == 0) { Macbeth_801ADCEC(actor->obj.pos.x, actor->obj.pos.y - 90.0f, actor->obj.pos.z - 50.0f, D_i5_801BE368[0] * 0.8f, -10.0f, 8.0f); D_i5_801BE320[11]++; @@ -4872,7 +4872,7 @@ void Macbeth_801AC438(Actor* actor) { Radio_PlayMessage(gMsg_ID_17420, RCID_BOSS_MACBETH); AUDIO_PLAY_SFX(NA_SE_EN_MABOSS_HATCH, actor->sfxSource, 4); actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_6035A94); - actor->state += 1; + actor->state++; } Macbeth_8019A830(actor); break; @@ -4914,7 +4914,7 @@ void Macbeth_801AC6B4(Actor* actor) { actor->obj.rot.y = 180.0f; Object_SetInfo(&actor->info, actor->obj.id); AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); - actor->unk_0B6 = 1; + actor->animFrame = 1; } static f32 D_i5_801BA768 = 0.0f; @@ -5698,12 +5698,12 @@ void Macbeth_801AF27C(Actor* actor, s32 arg1) { Object_SetInfo(&actor->info, actor->obj.id); if (arg1 < 3) { actor->iwork[11] = 1; - actor->unk_0C9 = 1; + actor->drawShadow = true; actor->fwork[3] = D_i5_801BA820[arg1]; actor->state = 30; AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } else { - actor->unk_0B6 = 1; + actor->animFrame = 1; actor->state = 21; actor->obj.rot.z = 32.5f; AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); @@ -5726,14 +5726,14 @@ void Macbeth_801AF44C(void) { actor->fwork[7] = RAND_FLOAT(360.0f); actor->fwork[8] = RAND_FLOAT(360.0f); actor->fwork[9] = 30.0f; - actor->unk_0F4.y = D_i5_801BA820[4]; - actor->unk_0F4.x = 0.0f; - actor->unk_0F4.z = 330.0f; + actor->rot_0F4.y = D_i5_801BA820[4]; + actor->rot_0F4.x = 0.0f; + actor->rot_0F4.z = 330.0f; actor->obj.rot.x = -0.0f; - actor->obj.rot.y = actor->unk_0F4.y; + actor->obj.rot.y = actor->rot_0F4.y; actor->obj.rot.z = -330.0f; actor->fwork[0] = 0.0f; - actor->unk_0B6 = 24; + actor->animFrame = 24; actor->iwork[11] = 1; actor->state = 15; actor->fwork[3] = D_i5_801BA820[4]; @@ -5755,7 +5755,7 @@ void Macbeth_801AF628(Actor* actor, s32 arg1) { actor->obj.pos.x = gPlayer[0].xPath + D_i5_801BA834[arg1].x; actor->obj.pos.y = D_i5_801BA834[arg1].y; actor->obj.pos.z = D_i5_801BA834[arg1].z - gPathProgress; - actor->unk_0B6 = 37; + actor->animFrame = 37; actor->obj.rot.y = D_i5_801BA84C[arg1]; actor->iwork[4] = actor->iwork[5] = 192; actor->iwork[0] = actor->iwork[1] = actor->iwork[2] = actor->iwork[7] = actor->iwork[3] = 255; @@ -5925,9 +5925,9 @@ void Macbeth_LevelComplete2(Player* player) { player->vel.z = gActors[D_i5_801BE314].vel.z; if (gCsFrameCount == 252) { gCsCamEyeY = 570.0f; - player->timer_210 = 1000; + player->pathChangeTimer = 1000; player->xPathTarget = 20000.0f; - player->yRot_118 = -23.0f; + player->pathChangeYaw = -23.0f; player->pathStep = 0.0f; } if (gCsFrameCount >= 252) { @@ -5950,7 +5950,7 @@ void Macbeth_LevelComplete2(Player* player) { player->zPathVel = 0.0f; gPathVelX = 0.0f; gPathVelY = 0.0f; - player->timer_210 = 0; + player->pathChangeTimer = 0; player->cam.eye.x = gCsCamEyeX = 2750.0f; player->cam.eye.y = gCsCamEyeY = 50.0f; player->cam.eye.z = gCsCamEyeZ = -620.0f; @@ -5987,9 +5987,9 @@ void Macbeth_LevelComplete2(Player* player) { player->cam.at.y = gCsCamAtY = 10.0f; player->cam.eye.x = gCsCamEyeX = D_ctx_80177A48[7] + gCsCamAtX; player->cam.eye.z = gCsCamEyeZ = D_ctx_80177A48[8] + gCsCamAtZ; - player->yRot_118 = -30.0f; + player->pathChangeYaw = -30.0f; player->xPathTarget = 10014.0f; - player->timer_210 = 1000; + player->pathChangeTimer = 1000; player->pathStep = 0.0f; gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 127; @@ -6063,7 +6063,7 @@ void Macbeth_LevelComplete2(Player* player) { gPathVelZ = 0.0f; gPathVelX = 0.0f; gPathVelY = 0.0f; - player->timer_210 = 10000; + player->pathChangeTimer = 10000; D_ctx_80177A48[0] = 1.0f; D_i5_801BA1DC = 0.0f; gControllerRumbleFlags[0] = 1; @@ -6208,7 +6208,7 @@ void Macbeth_LevelComplete2(Player* player) { gFillScreenAlphaTarget = 255; gFillScreenAlphaStep = 20; AUDIO_PLAY_SFX(NA_SE_EN_STAR_EXPLOSION, gActors[D_i5_801BE314].sfxSource, 4); - gBossActive = gLoadLevelObjects = 0; + gBossActive = gLoadLevelObjects = false; } if (gCsFrameCount == 940) { player->csState++; @@ -6226,8 +6226,8 @@ void Macbeth_LevelComplete2(Player* player) { player->cam.eye.y = gCsCamEyeY = player->pos.y + 30.0f; player->cam.eye.z = gCsCamEyeZ = (player->trueZpos + gPathProgress) - 300.0f; player->cam.at.z = gCsCamAtZ = player->trueZpos + gPathProgress; - player->savedCockpitView = player->timer_210 = 0; - player->unk_190 = player->unk_194 = player->unk_188 = player->unk_18C = player->yRot_118 = + player->savedAlternateView = player->pathChangeTimer = 0; + player->unk_190 = player->unk_194 = player->unk_188 = player->unk_18C = player->pathChangeYaw = player->yRot_114 = player->aerobaticPitch = player->camRoll = player->unk_174 = player->unk_178 = player->unk_17C = player->unk_180 = player->unk_184 = player->wings.unk_04 = player->unk_170 = player->unk_16C = player->rockAngle = player->yBob = player->wings.unk_0C = @@ -6440,9 +6440,9 @@ void Macbeth_LevelComplete2(Player* player) { break; } - if (player->timer_210 != 0) { - player->timer_210--; - Math_SmoothStepToF(&player->yRot_114, -player->yRot_118, 0.03f, 0.5f, 0.0001f); + if (player->pathChangeTimer != 0) { + player->pathChangeTimer--; + Math_SmoothStepToF(&player->yRot_114, -player->pathChangeYaw, 0.03f, 0.5f, 0.0001f); Math_SmoothStepToF(&player->pathStep, gPathVelZ * .3f, 0.1f, 2.0f, 0.0001f); gPathVelX = Math_SmoothStepToF(&player->xPath, player->xPathTarget, 0.1f, player->pathStep, 0.0001f); gPathVelY = Math_SmoothStepToF(&player->yPath, player->yPathTarget, 0.1f, player->pathStep, 0.0001f); @@ -6481,7 +6481,7 @@ void Macbeth_801B28BC(Actor* actor) { player = &gPlayer[0]; actor->fwork[7] += 3.0f; - actor->unk_0F4.z = SIN_DEG(actor->fwork[7]) * 1.5f; + actor->rot_0F4.z = SIN_DEG(actor->fwork[7]) * 1.5f; actor->fwork[8] += 2.0f; sp3C = SIN_DEG(actor->fwork[8]) * 10.0f; @@ -6613,14 +6613,14 @@ void Macbeth_801B28BC(Actor* actor) { break; case 31: AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); - actor->unk_0C9 = 0; + actor->drawShadow = false; actor->timer_0BC = 20; actor->state++; actor->fwork[29] = 5.0f; /* fallthrough */ case 32: if (actor->timer_0BC <= 0) { - actor->unk_0C9 = 1; + actor->drawShadow = true; } actor->iwork[11] = 2; Math_SmoothStepToF(&actor->obj.rot.x, -20.0f, 0.1f, 0.5f, 0.0f); @@ -6666,13 +6666,13 @@ void Macbeth_801B3554(Actor* actor, s32 arg1) { Object_SetInfo(&actor->info, actor->obj.id); if (arg1 < 3) { actor->iwork[11] = 1; - actor->unk_0C9 = 1; + actor->drawShadow = true; actor->fwork[3] = D_i5_801BA8F0[arg1]; actor->state = 30; AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); return; } - actor->unk_0B6 = 1; + actor->animFrame = 1; actor->state = 20; AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); actor->fwork[9] = 20.0f; @@ -6694,13 +6694,13 @@ void Macbeth_801B3718(void) { actor->vel.z = gPlayer[0].vel.z; actor->fwork[7] = RAND_FLOAT(360.0f); actor->fwork[8] = RAND_FLOAT(360.0f); - actor->unk_0F4.y = 180.0f; - actor->unk_0F4.x = 0.0f; + actor->rot_0F4.y = 180.0f; + actor->rot_0F4.x = 0.0f; actor->obj.rot.x = -0.0f; - actor->obj.rot.y = actor->unk_0F4.y; - actor->obj.rot.z = -actor->unk_0F4.z; + actor->obj.rot.y = actor->rot_0F4.y; + actor->obj.rot.z = -actor->rot_0F4.z; actor->fwork[0] = 30.0f; - actor->unk_0B6 = 24; + actor->animFrame = 24; actor->iwork[11] = 1; actor->state = 10; actor->fwork[3] = D_i5_801BA900; @@ -6757,8 +6757,8 @@ void Macbeth_801B38E0(void) { PlayerShot_Initialize(&gPlayerShots[i]); } - D_ctx_801782B8 = D_ctx_801782BC = D_ctx_801782C0 = D_ctx_801782D0 = gBossActive = D_ctx_8017828C = D_ctx_8017812C = - gPrevEventActorIndex = gFormationLeaderIndex = gRingPassCount = 0; + gDrawSmallRocks = D_ctx_801782BC = D_ctx_801782C0 = D_ctx_801782D0 = gBossActive = gKillEventActors = + gGroundClipMode = gPrevEventActorIndex = gFormationLeaderIndex = gRingPassCount = 0; gFormationInitPos.x = gFormationInitPos.y = gFormationInitPos.z = gFormationInitRot.x = gFormationInitRot.y = gFormationInitRot.z = 0.0f; diff --git a/src/overlays/ovl_i5/fox_ti.c b/src/overlays/ovl_i5/fox_ti.c index 6153e7e8..4378e706 100644 --- a/src/overlays/ovl_i5/fox_ti.c +++ b/src/overlays/ovl_i5/fox_ti.c @@ -491,7 +491,7 @@ void Titania_8018A544(Actor* actor) { f32 sp48; f32 sp44; - actor->unk_0C9 = 1; + actor->drawShadow = true; if ((actor->scale != 1.0f) && (actor->dmgType == DMG_COLLISION)) { Object_Kill(&actor->obj, actor->sfxSource); @@ -796,13 +796,13 @@ void Titania_8018B268(Actor* actor) { case 1: Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); - if ((actor->unk_0B6 >= 26) && (actor->unk_0B6 <= 53) && (sp3C != NULL)) { - if (actor->unk_0B6 == 26) { + if ((actor->animFrame >= 26) && (actor->animFrame <= 53) && (sp3C != NULL)) { + if (actor->animFrame == 26) { sp3C->unk_046 = 2; sp3C->vel.x = 0.0f; sp3C->vel.y = 0.0f; sp3C->vel.z = 0.0f; - } else if (actor->unk_0B6 == 53) { + } else if (actor->animFrame == 53) { src.x = 0.0f; src.y = actor->fwork[1]; src.z = 20.0f; @@ -823,13 +823,13 @@ void Titania_8018B268(Actor* actor) { sp3C->obj.pos.z = actor->obj.pos.z + dest.z; } - if ((actor->unk_0B6 >= 26) && (actor->unk_0B6 <= 57) && (sp38 != NULL)) { - if (actor->unk_0B6 == 26) { + if ((actor->animFrame >= 26) && (actor->animFrame <= 57) && (sp38 != NULL)) { + if (actor->animFrame == 26) { sp38->unk_046 = 2; sp38->vel.x = 0.0f; sp38->vel.y = 0.0f; sp38->vel.z = 0.0f; - } else if (actor->unk_0B6 == 57) { + } else if (actor->animFrame == 57) { AUDIO_PLAY_SFX(NA_SE_EN_THROW_S, actor->sfxSource, 4); src.x = 0.0f; src.y = actor->fwork[1]; @@ -851,7 +851,7 @@ void Titania_8018B268(Actor* actor) { sp38->obj.pos.z = actor->obj.pos.z + dest.z; } - if (++actor->unk_0B6 >= Animation_GetFrameCount(&D_TI1_700D534)) { + if (++actor->animFrame >= Animation_GetFrameCount(&D_TI1_700D534)) { actor->state++; } break; @@ -862,7 +862,7 @@ void Titania_8018B268(Actor* actor) { if (actor->health == 0) { actor->obj.status = OBJ_DYING; - Animation_GetFrameData(&D_TI1_700D534, actor->unk_0B6, actor->vwork); + Animation_GetFrameData(&D_TI1_700D534, actor->animFrame, actor->vwork); Animation_DrawSkeleton(0, D_TI1_700D700, actor->vwork, Titania_8018AFD4, Titania_8018B1B4, actor, &gIdentityMatrix); func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f); @@ -872,7 +872,7 @@ void Titania_8018B268(Actor* actor) { } void Titania_8018B6AC(Actor* actor) { - Animation_GetFrameData(&D_TI1_700D534, actor->unk_0B6, actor->vwork); + Animation_GetFrameData(&D_TI1_700D534, actor->animFrame, actor->vwork); Animation_DrawSkeleton(0, D_TI1_700D700, actor->vwork, Titania_8018AFF0, Titania_8018B144, actor, &gIdentityMatrix); } @@ -943,7 +943,7 @@ void Titania_8018B9D0(Actor* actor) { f32 sp3C; f32 temp_fa1; - actor->unk_0C9 = 1; + actor->drawShadow = true; switch (actor->state) { case 0: @@ -1307,7 +1307,7 @@ void Titania_8018C8A8(Actor* actor) { Audio_KillSfxBySourceAndId(actor->sfxSource, NA_SE_EN_KANI_MOTOR); actor->timer_0BC = 20; actor->fwork[24] = 1.0f; - actor->fwork[23] = actor->unk_0B6; + actor->fwork[23] = actor->animFrame; } actor->health -= actor->damage; if (actor->health <= 0) { @@ -1317,7 +1317,7 @@ void Titania_8018C8A8(Actor* actor) { Actor_Despawn(actor); actor->info.bonus = 0; actor->timer_0BC = 20; - actor->unk_0B6 = 0; + actor->animFrame = 0; actor->fwork[15] = 0.0f; } else { AUDIO_PLAY_SFX(NA_SE_EN_SNAKE_DAMAGE, actor->sfxSource, 4); @@ -1331,11 +1331,11 @@ void Titania_8018C8A8(Actor* actor) { switch (actor->state) { case 0: AUDIO_PLAY_SFX(NA_SE_EN_HEAVY_JUMP, actor->sfxSource, 4); - actor->unk_0F4.y = actor->obj.rot.y; + actor->rot_0F4.y = actor->obj.rot.y; actor->obj.rot.y = 180.0f; actor->obj.pos.y += 125.0f; actor->gravity = 1.0f; - actor->unk_0C9 = 1; + actor->drawShadow = true; actor->vel.y = 20.0f; actor->vel.z = -70.0f; Animation_GetFrameData(&D_TI1_700733C, 0, actor->vwork); @@ -1354,13 +1354,13 @@ void Titania_8018C8A8(Actor* actor) { Animation_DrawSkeleton(1, D_TI1_7006990, actor->vwork, Titania_8018C118, Titania_8018C3D8, actor, &gIdentityMatrix); if (actor->obj.pos.z <= gPlayer[0].pos.z) { - Math_SmoothStepToAngle(&actor->obj.rot.y, actor->unk_0F4.y, 0.2f, 10.0f, 0.01f); + Math_SmoothStepToAngle(&actor->obj.rot.y, actor->rot_0F4.y, 0.2f, 10.0f, 0.01f); } if ((actor->obj.pos.y + actor->fwork[7] + actor->fwork[26]) <= sp9C) { AUDIO_PLAY_SFX(NA_SE_EN_HEAVY_BOUND, actor->sfxSource, 4); actor->fwork[16] = actor->obj.pos.y = sp9C; - actor->unk_0F4.x = spA0 * M_RTOD; - actor->unk_0F4.z = sp98 * M_RTOD; + actor->rot_0F4.x = spA0 * M_RTOD; + actor->rot_0F4.z = sp98 * M_RTOD; actor->gravity = 0.0f; actor->vel.x = actor->vel.y = actor->vel.z = 0.0f; actor->timer_0BC = 10; @@ -1402,11 +1402,11 @@ void Titania_8018C8A8(Actor* actor) { break; case 2: - Math_SmoothStepToAngle(&actor->obj.rot.x, actor->unk_0F4.x, 0.5f, 5.0f, 0.01f); - Math_SmoothStepToAngle(&actor->obj.rot.z, actor->unk_0F4.z, 0.5f, 5.0f, 0.01f); + Math_SmoothStepToAngle(&actor->obj.rot.x, actor->rot_0F4.x, 0.5f, 5.0f, 0.01f); + Math_SmoothStepToAngle(&actor->obj.rot.z, actor->rot_0F4.z, 0.5f, 5.0f, 0.01f); actor->obj.pos.y = actor->fwork[0] = actor->fwork[16]; - actor->fwork[1] = actor->unk_0F4.x; - actor->fwork[2] = actor->unk_0F4.z; + actor->fwork[1] = actor->rot_0F4.x; + actor->fwork[2] = actor->rot_0F4.z; Animation_GetFrameData(&D_TI1_7007234, 0, spA4); Math_SmoothStepToVec3fArray(spA4, actor->vwork, 1, 15, 0.5f, 7.0f, 0.1f); temp_fs0 = actor->vwork[0].y; @@ -1427,7 +1427,7 @@ void Titania_8018C8A8(Actor* actor) { if (actor->timer_0BC == 0) { actor->state = 4; } - Animation_GetFrameData(&D_TI1_70067C4, actor->unk_0B6, spA4); + Animation_GetFrameData(&D_TI1_70067C4, actor->animFrame, spA4); Math_SmoothStepToVec3fArray(spA4, actor->vwork, 1, 15, 0.1f, 3.0f, 0.01f); temp_fs0 = actor->vwork[0].y; actor->vwork[0].y += actor->fwork[26]; @@ -1438,7 +1438,7 @@ void Titania_8018C8A8(Actor* actor) { Math_SmoothStepToF(&actor->fwork[26], -60.0f, 0.0f, 500.0f, 0.01f); if (actor->health <= 0) { actor->state = 5; - actor->unk_0B6 = 0; + actor->animFrame = 0; actor->timer_0BC = 30; actor->iwork[6] = 30; actor->fwork[15] = 0.0f; @@ -1455,13 +1455,13 @@ void Titania_8018C8A8(Actor* actor) { Math_SmoothStepToAngle(&actor->obj.rot.z, sp98 * M_RTOD, 0.1f, 1.0f, 0.01f); if (actor->timer_0BC == 0) { - if (((actor->unk_0B6 == 40) || (actor->unk_0B6 == 80)) && (actor->timer_0BC == 0)) { + if (((actor->animFrame == 40) || (actor->animFrame == 80)) && (actor->timer_0BC == 0)) { AUDIO_PLAY_SFX(NA_SE_EN_HEAVY_WALK1, actor->sfxSource, 4); } Math_SmoothStepToF(&actor->fwork[15], 1.0f, 0.7f, 0.1f, 0.01f); - actor->unk_0B6++; - if (actor->unk_0B6 >= Animation_GetFrameCount(&D_TI1_70067C4)) { - actor->unk_0B6 = 0; + actor->animFrame++; + if (actor->animFrame >= Animation_GetFrameCount(&D_TI1_70067C4)) { + actor->animFrame = 0; } if ((actor->fwork[4] > 0.0f) || (actor->fwork[7] > 0.0f)) { Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); @@ -1476,13 +1476,13 @@ void Titania_8018C8A8(Actor* actor) { if (Animation_GetFrameCount(&D_TI1_70067C4) <= actor->fwork[23]) { actor->fwork[23] = 0.0f; } - actor->unk_0B6 = actor->fwork[23]; + actor->animFrame = actor->fwork[23]; if (actor->timer_0BC == 1) { AUDIO_PLAY_SFX(NA_SE_EN_KANI_MOTOR, actor->sfxSource, 4); } } - Animation_GetFrameData(&D_TI1_70067C4, actor->unk_0B6, spA4); + Animation_GetFrameData(&D_TI1_70067C4, actor->animFrame, spA4); Math_SmoothStepToVec3fArray(spA4, actor->vwork, 1, 15, actor->fwork[15], 360.0f, 0.01f); temp_fs0 = actor->vwork[0].y; actor->vwork[0].y += actor->fwork[26]; @@ -1494,7 +1494,7 @@ void Titania_8018C8A8(Actor* actor) { if (actor->health <= 0) { actor->iwork[6] = 300; actor->state = 5; - actor->unk_0B6 = 0; + actor->animFrame = 0; actor->timer_0BC = 30; actor->fwork[15] = 0.0f; AUDIO_PLAY_SFX(NA_SE_EN_KANI_STOP, actor->sfxSource, 4); @@ -1503,7 +1503,7 @@ void Titania_8018C8A8(Actor* actor) { case 5: Math_SmoothStepToF(&actor->fwork[15], 1.0f, 1.0f, 0.015f, 0.01f); - Animation_GetFrameData(&D_TI1_7007130, actor->unk_0B6, spA4); + Animation_GetFrameData(&D_TI1_7007130, actor->animFrame, spA4); Math_SmoothStepToVec3fArray(spA4, actor->vwork, 1, 15, actor->fwork[15], 360.0f, 0.01f); Math_SmoothStepToF(&actor->fwork[26], -40.0f, actor->fwork[15], 500.0f, 0.01f); temp_fs0 = actor->vwork[0].y; @@ -1511,31 +1511,31 @@ void Titania_8018C8A8(Actor* actor) { Animation_DrawSkeleton(0, D_TI1_7006990, actor->vwork, Titania_8018C118, Titania_8018C3D8, actor, &gIdentityMatrix); actor->vwork[0].y = temp_fs0; - actor->unk_0B6++; - if (actor->unk_0B6 >= Animation_GetFrameCount(&D_TI1_7007130)) { - actor->unk_0B6 = 0; + actor->animFrame++; + if (actor->animFrame >= Animation_GetFrameCount(&D_TI1_7007130)) { + actor->animFrame = 0; } if (actor->timer_0BC == 0) { actor->state = 6; - actor->unk_0B6 = 0; + actor->animFrame = 0; actor->fwork[15] = 0.0f; } break; case 6: - if (actor->unk_0B6 == 18) { + if (actor->animFrame == 18) { actor->iwork[8] = 0; } actor->iwork[2] = 1; Math_SmoothStepToF(&actor->fwork[15], 1.0f, 1.0f, 0.005f, 0.01f); - Animation_GetFrameData(&D_TI1_7006F74, actor->unk_0B6, spA4); + Animation_GetFrameData(&D_TI1_7006F74, actor->animFrame, spA4); Math_SmoothStepToVec3fArray(spA4, actor->vwork, 1, 15, actor->fwork[15], 360.0f, 0.01f); temp_fs0 = actor->vwork[0].y; actor->vwork[0].y += actor->fwork[26]; Animation_DrawSkeleton(0, D_TI1_7006990, actor->vwork, Titania_8018C118, Titania_8018C3D8, actor, &gIdentityMatrix); actor->vwork[0].y = temp_fs0; - if (actor->unk_0B6 == 21) { + if (actor->animFrame == 21) { Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, MTXF_APPLY); @@ -1573,15 +1573,15 @@ void Titania_8018C8A8(Actor* actor) { 1.5f); } - if (actor->unk_0B6 < (Animation_GetFrameCount(&D_TI1_7006F74) - 1)) { - actor->unk_0B6++; + if (actor->animFrame < (Animation_GetFrameCount(&D_TI1_7006F74) - 1)) { + actor->animFrame++; } else { Titania_8018C72C(actor); } break; case 7: - Animation_GetFrameData(&D_TI1_7006F74, actor->unk_0B6, spA4); + Animation_GetFrameData(&D_TI1_7006F74, actor->animFrame, spA4); Math_SmoothStepToVec3fArray(spA4, actor->vwork, 1, 15, actor->fwork[15], 360.0f, 0.01f); break; @@ -1926,22 +1926,22 @@ void Titania_8018E5F8(Actor* actor) { gTexturedLines[index].posAA.x = actor->obj.pos.x + actor->fwork[0]; gTexturedLines[index].posAA.y = actor->obj.pos.y + actor->fwork[1]; gTexturedLines[index].posAA.z = actor->obj.pos.z + actor->fwork[2]; - gTexturedLines[index].red = 255; - gTexturedLines[index].green = 255; - gTexturedLines[index].blue = 0; - gTexturedLines[index].alpha = 255; + gTexturedLines[index].prim.r = 255; + gTexturedLines[index].prim.g = 255; + gTexturedLines[index].prim.b = 0; + gTexturedLines[index].prim.a = 255; gTexturedLines[index].posBB.x = sp5C; gTexturedLines[index].posBB.y = sp70; gTexturedLines[index].posBB.z = sp54; gTexturedLines[index].xyScale = 3.0f; if (actor->timer_0C0 == 0) { - gTexturedLines[index].red = 255; - gTexturedLines[index].green = 255; - gTexturedLines[index].blue = 64; + gTexturedLines[index].prim.r = 255; + gTexturedLines[index].prim.g = 255; + gTexturedLines[index].prim.b = 64; } else { - gTexturedLines[index].red = 255; - gTexturedLines[index].green = 100; - gTexturedLines[index].blue = 0; + gTexturedLines[index].prim.r = 255; + gTexturedLines[index].prim.g = 100; + gTexturedLines[index].prim.b = 0; } if (i <= 3000) { if (actor->timer_0C0 == 0) { @@ -1999,7 +1999,7 @@ void Titania_Cactus_Update(Sprite* sprite) { sprite->obj.rot.y = Math_Atan2F(gPlayer[0].cam.eye.x - sprite->obj.pos.x, gPlayer[0].cam.eye.z - (sprite->obj.pos.z + gPathProgress)) * M_RTOD; - if (sprite->unk_46 != 0) { + if (sprite->destroy != 0) { func_effect_8007D074(sprite->obj.pos.x, sprite->obj.pos.y + 96.0f, sprite->obj.pos.z, 4.0f); sprite->obj.status = OBJ_FREE; func_effect_8007A6F0(&sprite->obj.pos, NA_SE_OB_EXPLOSION_S); @@ -2195,7 +2195,7 @@ void Titania_Boss306_Init(Boss306* this) { return; } - gBossActive = 1; + gBossActive = true; this->fwork[2] = 1.0f; this->fwork[4] = 730.0f; for (i = 0; i < ARRAY_COUNT(D_i5_801BD668); i++) { @@ -4207,7 +4207,7 @@ void Titania_80193DF0(Boss* boss) { } if (D_i5_801BBF00[i].unk_24 > 0) { D_i5_801BBF00[i].unk_24--; - if (!(D_i5_801BBF00[i].unk_24 & 1)) { + if (!(D_i5_801BBF00[i].unk_24 & 1)) { // prefer == 0 func_effect_8007A900(boss->obj.pos.x + D_i5_801BBF00[i].unk_00.pos.x, boss->obj.pos.y + D_i5_801BBF00[i].unk_00.pos.y, boss->obj.pos.z + D_i5_801BBF00[i].unk_00.pos.z, 7.0f, 160, 16, 0); @@ -5146,10 +5146,10 @@ void Titania_Boss_Draw(Boss* boss) { } else { gTexturedLines[temp_v1_28].mode = 1; } - gTexturedLines[temp_v1_28].red = 0; - gTexturedLines[temp_v1_28].blue = 0; - gTexturedLines[temp_v1_28].green = 0; - gTexturedLines[temp_v1_28].alpha = 0; + gTexturedLines[temp_v1_28].prim.r = 0; + gTexturedLines[temp_v1_28].prim.b = 0; + gTexturedLines[temp_v1_28].prim.g = 0; + gTexturedLines[temp_v1_28].prim.a = 0; gTexturedLines[temp_v1_28].xyScale = 1; } } @@ -5230,7 +5230,7 @@ void Titania_801990DC(Boss* boss) { actor->state = 40; actor->unk_046 = 25; actor->unk_048 = 0; - actor->unk_04A = 6; + actor->unk_04A = 4 | 2; actor->fwork[3] = 0.0f; actor->fwork[4] = -200.0f; actor->obj.pos.x = gPlayer[0].pos.x; @@ -5250,7 +5250,7 @@ void Titania_801990DC(Boss* boss) { actor->state = 40; actor->unk_046 = 2; actor->unk_048 = 1; - actor->unk_04A = 6; + actor->unk_04A = 4 | 2; actor->iwork[1] = (s32) 1; actor->fwork[3] = -150.0f; actor->fwork[4] = -200.0f; @@ -5271,7 +5271,7 @@ void Titania_801990DC(Boss* boss) { actor->state = 40; actor->unk_046 = 2; actor->unk_048 = 1; - actor->unk_04A = 6; + actor->unk_04A = 4 | 2; actor->iwork[1] = 2; actor->fwork[3] = 100.0f; actor->fwork[4] = -100.0f; diff --git a/src/overlays/ovl_i5/fox_ti_cs.c b/src/overlays/ovl_i5/fox_ti_cs.c index 4f0ce0c9..942bc850 100644 --- a/src/overlays/ovl_i5/fox_ti_cs.c +++ b/src/overlays/ovl_i5/fox_ti_cs.c @@ -20,7 +20,7 @@ void Titania_80187530(Actor* actor) { actor->obj.rot.y = 180.0f; Object_SetInfo(&actor->info, actor->obj.id); AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); - actor->unk_0B6 = 1; + actor->animFrame = 1; } void Titania_801875D0(Actor* actor, s32 arg1) { @@ -156,7 +156,7 @@ void Titania_LevelStart(Player* player) { D_ctx_80177A48[3] = 200.0f; D_ctx_80177A48[1] = 0.0f; - *D_ctx_80177A10 = 0; + D_ctx_80177A10[0] = 0; Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[2] * M_DTOR, MTXF_NEW); @@ -271,12 +271,12 @@ void Titania_80188108(Actor* actor, s32 arg1) { if (arg1 < 3) { actor->iwork[11] = 1; - actor->unk_0C9 = 1; + actor->drawShadow = true; actor->fwork[3] = D_i5_801B7348[arg1]; actor->state = 30; AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } else { - actor->unk_0B6 = 1; + actor->animFrame = 1; actor->state = 20; AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); actor->fwork[9] = 20.0f; diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index b200d8b7..f628037c 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -36,22 +36,22 @@ void Andross_80187530(Actor* actor) { case 0: break; case 1: - actor->unk_0B6 += (s32) actor->fwork[22]; - if (actor->unk_0B6 >= Animation_GetFrameCount(&D_VE2_6014658)) { - actor->unk_0B6 = Animation_GetFrameCount(&D_VE2_6014658) - 1; + actor->animFrame += (s32) actor->fwork[22]; + if (actor->animFrame >= Animation_GetFrameCount(&D_VE2_6014658)) { + actor->animFrame = Animation_GetFrameCount(&D_VE2_6014658) - 1; } break; case 2: - actor->unk_0B6 -= (s32) actor->fwork[22]; - if (actor->unk_0B6 <= 0) { - actor->unk_0B6 = 0; + actor->animFrame -= (s32) actor->fwork[22]; + if (actor->animFrame <= 0) { + actor->animFrame = 0; } break; default: break; } - index = actor->unk_0B6 / 18.0f; + index = actor->animFrame / 18.0f; actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_i6_801A6760[index]); actor->obj.rot.z = D_Andross_801A7F68; } @@ -66,7 +66,7 @@ bool Andross_8018767C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* void Andross_8018769C(Actor* actor) { Vec3f sp28[20]; - Animation_GetFrameData(&D_VE2_6014658, actor->unk_0B6, sp28); + Animation_GetFrameData(&D_VE2_6014658, actor->animFrame, sp28); Animation_DrawSkeleton(1, D_VE2_6014844, sp28, Andross_8018767C, NULL, NULL, &gIdentityMatrix); } @@ -190,7 +190,7 @@ void Andross_80187C5C(void) { scenery360->obj.pos.y = gLevelObjects[i].yPos; scenery360->obj.rot.y = gLevelObjects[i].rot.y; if (scenery360->obj.id == OBJ_SCENERY_147) { - scenery360->unk_40 = gLevelObjects[i].rot.z; + scenery360->pathIndex = gLevelObjects[i].rot.z; } Object_SetInfo(&scenery360->info, scenery360->obj.id); if (scenery360->obj.id == OBJ_SCENERY_131) { @@ -250,7 +250,7 @@ void Andross_801880E4(Actor* actor) { f32 temp_fv1; for (scenery360 = gScenery360, i = 0; i < 200; i++, scenery360++) { - if ((scenery360->obj.id == OBJ_SCENERY_147) && (scenery360->unk_40 == (u8) actor->unk_04E)) { + if ((scenery360->obj.id == OBJ_SCENERY_147) && (scenery360->pathIndex == (u8) actor->counter_04E)) { actor->fwork[3] = scenery360->obj.pos.x; actor->fwork[4] = scenery360->obj.pos.y; actor->fwork[5] = scenery360->obj.pos.z; @@ -262,7 +262,7 @@ void Andross_801880E4(Actor* actor) { yDisplacement = actor->fwork[4] - actor->obj.pos.y; zDisplacement = actor->fwork[5] - actor->obj.pos.z; if ((fabsf(xDisplacement) < 300.0f) && (fabsf(yDisplacement) < 300.0f) && (fabsf(zDisplacement) < 300.0f)) { - actor->unk_04E++; + actor->counter_04E++; } if (((gGameFrameCount % 32) == 0)) { actor->iwork[11] = 1; @@ -277,10 +277,10 @@ void Andross_801880E4(Actor* actor) { Math_SmoothStepToF(&actor->fwork[0], actor->fwork[1], 0.2f, 3.0f, 0.00001f); yaw = Math_RadToDeg(Math_Atan2F(xDisplacement, zDisplacement)); - Math_SmoothStepToAngle(&actor->unk_0F4.x, + Math_SmoothStepToAngle(&actor->rot_0F4.x, Math_RadToDeg(Math_Atan2F(yDisplacement, sqrtf(SQ(xDisplacement) + SQ(zDisplacement)))), 0.1f, actor->fwork[2], 0.0f); - temp_fv1 = Math_SmoothStepToAngle(&actor->unk_0F4.y, yaw, 0.1f, actor->fwork[2], 0.0001f) * 40.0f; + temp_fv1 = Math_SmoothStepToAngle(&actor->rot_0F4.y, yaw, 0.1f, actor->fwork[2], 0.0001f) * 40.0f; if (temp_fv1 < 0.0f) { var_fv0 = temp_fv1 * -1.0f; } else { @@ -288,10 +288,10 @@ void Andross_801880E4(Actor* actor) { } Math_SmoothStepToAngle(&actor->obj.rot.z, var_fv0, 0.1f, 3.0f, 0.01f); - actor->obj.rot.y = actor->unk_0F4.y; - actor->obj.rot.x = -actor->unk_0F4.x; - Matrix_RotateY(gCalcMatrix, actor->unk_0F4.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -actor->unk_0F4.x * M_DTOR, MTXF_APPLY); + actor->obj.rot.y = actor->rot_0F4.y; + actor->obj.rot.x = -actor->rot_0F4.x; + Matrix_RotateY(gCalcMatrix, actor->rot_0F4.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -actor->rot_0F4.x * M_DTOR, MTXF_APPLY); sp48.x = 0; sp48.y = 0; sp48.z = actor->fwork[0]; @@ -333,15 +333,15 @@ void Andross_80188528(Actor* actor) { } actor->obj.rot.y = RAD_TO_DEG(-gPlayer[0].camYaw); actor->obj.rot.x = RAD_TO_DEG(gPlayer[0].camPitch); - actor->unk_0F4.z += actor->fwork[0]; + actor->rot_0F4.z += actor->fwork[0]; } void Andross_80188660(Actor* actor) { RCP_SetupDL(&gMasterDisp, 0x3D); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); - Matrix_RotateZ(gGfxMatrix, actor->unk_0F4.z * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, actor->rot_0F4.z * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 1.1f, 0.9f, 1.0f, MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, -actor->unk_0F4.z * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, -actor->rot_0F4.z * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 1.1f, 0.9f, 1.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -605,8 +605,8 @@ void Andross_8018933C(Actor* actor) { void Andross_801893B8(Actor* actor) { if (gAllRangeCheckpoint == 0) { - actor->unk_04E++; - switch (actor->unk_04E) { + actor->counter_04E++; + switch (actor->counter_04E) { case 200: Radio_PlayMessage(gMsg_ID_8250, RCID_ANDROSS_RED); return; @@ -627,10 +627,10 @@ void Andross_80189470(Actor* actor) { s32 i; Player* player = &gPlayer[0]; - if ((D_ctx_80177AB0 != 7) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && + if ((gDrawBackdrop != 7) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 9000.0f) && (fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 9000.0f)) { - D_ctx_80177AB0 = 7; + gDrawBackdrop = 7; Radio_PlayMessage(gMsg_ID_19370, RCID_JAMES); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 20); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 20); @@ -646,7 +646,7 @@ void Andross_80189470(Actor* actor) { player->state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; player->csState = 3; player->zPath = gPathProgress = 0.0f; - D_ctx_80177AB0 = D_ctx_80177A98 = 1; + gDrawBackdrop = gDrawGround = true; player->cam.eye.x = 1200.0f; player->cam.eye.z = 1200.0f; player->cam.eye.y = 1800.0f; @@ -764,8 +764,8 @@ void Andross_80189B70(Boss* boss) { Andross_80188CB8(boss); boss->info.hitbox = SEGMENTED_TO_VIRTUAL(&D_ANDROSS_C038F24); Math_SmoothStepToF(&gAndrossUnkAlpha, 255.0f, 1.0f, 4.0f, 0); - Math_SmoothStepToF(&boss->unk_3F8, 10.0f, 0.2f, 0.2f, 0); - if (!(gGameFrameCount & 0x10)) { + Math_SmoothStepToF(&boss->scale, 10.0f, 0.2f, 0.2f, 0); + if ((gGameFrameCount & 0x10) == 0) { Math_SmoothStepToF(&boss->fwork[25], 255.0f, 1.0f, 10.0f, 0); } else { Math_SmoothStepToF(&boss->fwork[25], 100.0f, 1.0f, 10.0f, 0); @@ -781,7 +781,7 @@ void Andross_80189B70(Boss* boss) { switch (boss->state) { case 0: boss->health = 200; - D_ctx_80177AB0 = 3; + gDrawBackdrop = 3; boss->fwork[19] = -26.0f; boss->fwork[10] = 8.0f; Andross_80189098(boss); @@ -855,14 +855,14 @@ void Andross_80189B70(Boss* boss) { boss->fwork[13] = 1.0f; boss->fwork[19] = 23.0f; boss->fwork[1] = 0.0f; - gPlayer[0].cockpitView = true; - Math_SmoothStepToF(&D_display_800CA230, 0.15f, 0.2f, 0.004f, 0.0f); + gPlayer[0].alternateView = true; + Math_SmoothStepToF(&gCamDistortion, 0.15f, 0.2f, 0.004f, 0.0f); if (boss->timer_050 == 120) { AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_LAUGH, boss->sfxSource, 4); } if (boss->timer_050 == 0) { gPlayer[0].baseSpeed = gArwingSpeed; - gPlayer[0].cockpitView = false; + gPlayer[0].alternateView = false; gFillScreenAlphaTarget = 0; boss->timer_05A = 50; if (boss->swork[4] != 0) { @@ -897,7 +897,7 @@ void Andross_80189B70(Boss* boss) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &vec, &sp64); boss->obj.pos.x = boss->fwork[3] + sp64.x; boss->obj.pos.z = boss->fwork[5] + sp64.z; - boss->unk_078.y = Math_RadToDeg(Math_Atan2F(xDisplacement, zDisplacement)); + boss->rot_078.y = Math_RadToDeg(Math_Atan2F(xDisplacement, zDisplacement)); boss->state = 13; AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_LAUGH, boss->sfxSource, 4); boss->timer_054 = 90; @@ -948,7 +948,7 @@ void Andross_80189B70(Boss* boss) { Radio_PlayMessage(gMsg_ID_19335, RCID_ANDROSS_RED); } if (gCsFrameCount == 200) { - gBossActive = 0; + gBossActive = false; gPlayer[0].baseSpeed = gArwingSpeed; Audio_StopPlayerNoise(0); boss->state = 21; @@ -960,7 +960,7 @@ void Andross_80189B70(Boss* boss) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); } } - D_ctx_80177AB0 = 4; + gDrawBackdrop = 4; gCsFrameCount = 0; } break; @@ -974,7 +974,7 @@ void Andross_80189B70(Boss* boss) { gPlayerGlareAlphas[0] = 255; } gPlayerGlareReds[0] = gPlayerGlareGreens[0] = gPlayerGlareBlues[0] = 255; - Math_SmoothStepToF(&D_display_800CA230, 0.15f, 0.2f, 0.004f, 0.0f); + Math_SmoothStepToF(&gCamDistortion, 0.15f, 0.2f, 0.004f, 0.0f); Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 70.0f, 1.0f, 4.0f, 0.0f); } switch (gCsFrameCount) { @@ -991,7 +991,7 @@ void Andross_80189B70(Boss* boss) { gAllRangeCheckpoint = 1; break; case 600: - D_ctx_80177AB0 = 5; + gDrawBackdrop = 5; gFogRed = 129; gFogGreen = 27; gFogBlue = 0; @@ -1063,16 +1063,16 @@ void Andross_80189B70(Boss* boss) { vec.z = 0.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &vec, &sp64); if (gCsFrameCount < 1000) { - frameCountMask = 1; + frameCountMask = 2 - 1; } else if (gCsFrameCount < 1500) { - frameCountMask = 3; + frameCountMask = 4 - 1; } else if (gCsFrameCount < 2000) { - frameCountMask = 1; + frameCountMask = 2 - 1; } else { - frameCountMask = 1; + frameCountMask = 2 - 1; } sp98 = 1; - if (!(gGameFrameCount & frameCountMask)) { + if ((gGameFrameCount & frameCountMask) == 0) { for (i = 0; i < sp98; i++) { func_effect_8007797C(gPlayer[0].cam.eye.x + sp64.x, gPlayer[0].cam.eye.y + sp64.y, gPlayer[0].cam.eye.z + sp64.z, sp58.x, sp58.y, sp58.z, @@ -1086,18 +1086,18 @@ void Andross_80189B70(Boss* boss) { yDisplacement = boss->fwork[4] - boss->obj.pos.y; zDisplacement = boss->fwork[5] - boss->obj.pos.z; yaw = Math_RadToDeg(Math_Atan2F(xDisplacement, zDisplacement)); - Math_SmoothStepToAngle(&boss->unk_078.x, + Math_SmoothStepToAngle(&boss->rot_078.x, Math_RadToDeg(Math_Atan2F(yDisplacement, sqrtf(SQ(xDisplacement) + SQ(zDisplacement)))), 0.1f, boss->fwork[2], 0.0f); - Math_SmoothStepToAngle(&boss->unk_078.y, yaw, 0.1f, boss->fwork[2], 0.0f); + Math_SmoothStepToAngle(&boss->rot_078.y, yaw, 0.1f, boss->fwork[2], 0.0f); if (boss->swork[4] != 0) { Math_SmoothStepToAngle(&boss->obj.rot.y, Math_RadToDeg(-gPlayer[0].camYaw), 0.3f, 5.0f, 0.0f); } else if (boss->timer_054 == 0) { Math_SmoothStepToAngle(&boss->obj.rot.y, Math_RadToDeg(-gPlayer[0].camYaw), 0.3f, 1.5f, 0.0f); } Math_SmoothStepToF(&boss->fwork[0], boss->fwork[1], 0.2f, 1.0f, 0.00001f); - Matrix_RotateY(gCalcMatrix, boss->unk_078.y * M_DTOR, 0U); - Matrix_RotateX(gCalcMatrix, -boss->unk_078.x * M_DTOR, 1U); + Matrix_RotateY(gCalcMatrix, boss->rot_078.y * M_DTOR, 0U); + Matrix_RotateX(gCalcMatrix, -boss->rot_078.x * M_DTOR, 1U); vec.x = 0.0f; vec.y = 0.0f; vec.z = boss->fwork[0]; @@ -1111,7 +1111,7 @@ void Andross_80189B70(Boss* boss) { gRadarMarks[59].pos.x = boss->obj.pos.x; gRadarMarks[59].pos.y = boss->obj.pos.y; gRadarMarks[59].pos.z = boss->obj.pos.z; - gRadarMarks[59].yRot = boss->unk_078.y + 180.0f; + gRadarMarks[59].yRot = boss->rot_078.y + 180.0f; } gActors[10].info.targetOffset = 1.0f; gActors[11].info.targetOffset = 1.0f; @@ -1205,7 +1205,7 @@ void Andross_8018B8C0(Boss* boss) { Matrix_Scale(gGfxMatrix, boss->fwork[23] + 1.0f, 1.0f - boss->fwork[23], 1.0f, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 20.0f * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, boss->fwork[23] + 1.0f, 1.0f - boss->fwork[23], 1.0f, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, boss->unk_3F8, boss->unk_3F8, boss->unk_3F8, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, boss->scale, boss->scale, boss->scale, MTXF_APPLY); Animation_DrawSkeleton(0, D_VE2_600C0A4, boss->vwork, Andross_8018B47C, NULL, boss, &gIdentityMatrix); if (boss->fwork[21] >= 254) { RCP_SetupDL(&gMasterDisp, 0x36); @@ -1278,7 +1278,7 @@ void Andross_8018BDD8(void) { sp70[i].v.ob[1] = sp74[i].v.ob[1] + sp7C[temp_lo]; } - if (gBossActive != 0) { + if (gBossActive) { Math_SmoothStepToF(&D_Andross_801A7F58, 0.0f, 1.0f, 10.0f, 0.0f); } else { Math_SmoothStepToF(&D_Andross_801A7F58, D_Andross_801A7F60, 1.0f, 1.0f, 0.0f); @@ -1573,8 +1573,8 @@ void Andross_Boss320_Init(Boss320* this) { this->timer_058 = 10; this->swork[4] = this->swork[5] = 200; this->swork[6] = 100; - gBossActive = 1; - D_ctx_80177AB0 = 1; + gBossActive = true; + gDrawBackdrop = 1; this->info.hitbox[16] = 200.0f; this->info.hitbox[22] = 200.0f; Audio_PlaySequence(SEQ_PLAYER_BGM, NA_BGM_BOSS_ANDROSS, 0, 0); @@ -1789,7 +1789,7 @@ void Andross_8018DBF0(Boss* boss) { gAmbientR = 10; gAmbientG = 0; gAmbientB = 20; - D_ctx_8017812C = 0; + gGroundClipMode = 0; boss->fwork[19] += 5.0f; if (boss->swork[9] != 0) { boss->swork[9]--; @@ -1802,15 +1802,15 @@ void Andross_8018DBF0(Boss* boss) { if (boss->swork[10] != 0) { boss->swork[10]--; if (boss->swork[10] < 20) { - frameCountMask = 0x1F; + frameCountMask = 32 - 1; } else if (boss->swork[10] < 30) { - frameCountMask = 7; + frameCountMask = 8 - 1; } else if (boss->swork[10] < 40) { - frameCountMask = 1; + frameCountMask = 2 - 1; } else { - frameCountMask = 0; + frameCountMask = 1 - 1; } - if (!(gGameFrameCount & frameCountMask)) { + if ((gGameFrameCount & frameCountMask) == 0) { Andross_8018CA50(boss->vwork[6].x, boss->vwork[6].y, boss->vwork[6].z, 0.0f, -30.0f, 0.0f, 30.0f); Andross_8018CA50(boss->vwork[7].x, boss->vwork[7].y, boss->vwork[7].z, 0.0f, -30.0f, 0.0f, 30.0f); Andross_8018CA50(boss->vwork[8].x, boss->vwork[8].y, boss->vwork[8].z, -30.0f, 0.0f, 0.0f, 30.0f); @@ -2743,10 +2743,10 @@ void Andross_8018DBF0(Boss* boss) { boss1->swork[1] = 100; boss1->state = 10; boss1->timer_050 = 180; - boss1->unk_3F8 = 5.0f; + boss1->scale = 5.0f; Object_SetInfo(&boss1->info, boss1->obj.id); Object_Kill(&boss->obj, boss->sfxSource); - D_ctx_80177AB0 = 3; + gDrawBackdrop = 3; Andross_80189098(boss); Radio_PlayMessage(gMsg_ID_19330, RCID_ANDROSS_RED); break; @@ -3210,7 +3210,7 @@ void Andross_80192E94(Actor* actor) { actor->vwork[0].y = actor->obj.pos.y - 300.0f; actor->vwork[0].z = actor->obj.pos.z; actor->health = 30; - actor->unk_0F4.z = actor->obj.rot.z; + actor->rot_0F4.z = actor->obj.rot.z; AUDIO_PLAY_SFX(NA_SE_OB_SPARK_BEAM, actor->sfxSource, 0); break; case 1: @@ -3235,7 +3235,7 @@ void Andross_80192E94(Actor* actor) { } /* fallthrough */ case 2: - actor->obj.rot.z = actor->unk_0F4.z + D_Andross_801A7F68; + actor->obj.rot.z = actor->rot_0F4.z + D_Andross_801A7F68; Matrix_RotateZ(gCalcMatrix, M_DTOR * D_Andross_801A7F68, MTXF_NEW); Matrix_MultVec3fNoTranslate(gCalcMatrix, actor->vwork, &actor->obj.pos); actor->obj.pos.y += 300.0f; @@ -3319,7 +3319,7 @@ void Andross_8019350C(Scenery* scenery) { void Andross_8019356C(Scenery* scenery) { scenery->obj.rot.z = D_Andross_801A7F68; - scenery->obj.pos.z += scenery->unk_60; + scenery->obj.pos.z += scenery->effectVel.z; if (scenery->timer_4C == 1) { Object_Kill(&scenery->obj, scenery->sfxSource); } @@ -3349,7 +3349,7 @@ void Andross_80193668(Scenery* scenery, f32 xPos, f32 yPos, f32 zPos, s32 arg4) scenery->obj.pos.x = xPos; scenery->obj.pos.y = yPos; scenery->obj.pos.z = zPos; - scenery->unk_60 = -40.0f; + scenery->effectVel.z = -40.0f; Object_SetInfo(&scenery->info, scenery->obj.id); scenery->timer_4C = (arg4 * 50) + 100; scenery->info.cullDistance = 100000.0f; @@ -3416,7 +3416,7 @@ void Andross_801939A0(s32 actorIndex) { actor->obj.pos.y = gPlayer[0].cam.at.y; actor->obj.pos.z = 0.0f; actor->iwork[11] = 1; - actor->unk_0F4.x = 90.0f; + actor->rot_0F4.x = 90.0f; actor->fwork[0] = 50.0f; actor->fwork[1] = 6.5f; if (actorIndex == 10) { @@ -3425,7 +3425,7 @@ void Andross_801939A0(s32 actorIndex) { if (actorIndex == 1) { actor->state = 1; actor->unk_046 = 255; - actor->unk_0B6 = 1000; + actor->animFrame = 1000; } Object_SetInfo(&actor->info, actor->obj.id); AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); @@ -3451,7 +3451,7 @@ void Andross_80193AE4(s32 actorIndex) { Object_SetInfo(&actor->info, actor->obj.id); if (actorIndex == 0) { actor->state = 200; - actor->unk_0B6 = 1; + actor->animFrame = 1; AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); } else { actor->iwork[11] = 1; @@ -3527,7 +3527,7 @@ void Andross_80193C4C(Player* player) { break; case 86: Object_Kill(&boss->obj, boss->sfxSource); - D_ctx_80177AB0 = 0; + gDrawBackdrop = 0; break; case 111: player->csState = 2; @@ -3574,7 +3574,7 @@ void Andross_80193C4C(Player* player) { Math_SmoothStepToF(&D_ctx_80177A48[2], 0.85f, 1.0f, 0.01f, 0.0f); Math_SmoothStepToF(&D_ctx_80177A48[3], 200.0f, 0.1f, 5.0f, 0.0f); D_ctx_80177A48[4] += 4.5f; - D_ctx_80177AB0 = 2; + gDrawBackdrop = 2; Matrix_RotateZ(gCalcMatrix, 2.0f * RAND_FLOAT(M_PI), MTXF_NEW); sp74.x = RAND_FLOAT(50.0f) + 120.0f; sp74.y = 0.0f; @@ -3625,7 +3625,7 @@ void Andross_80193C4C(Player* player) { case 25: for (i = 0; i < 12; i++) { Andross_80193668(&gScenery[i], player->pos.x, player->pos.y, - (player->cam.eye.z - gPathProgress) + (2195.0f * i), i); + player->cam.eye.z - gPathProgress + (2195.0f * i), i); } break; case 150: @@ -3641,7 +3641,7 @@ void Andross_80193C4C(Player* player) { gLevelMode = LEVELMODE_ALL_RANGE; player->csState = 3; player->zPath = gPathProgress = 0.0f; - D_ctx_80177AB0 = D_ctx_80177A98 = 1; + gDrawBackdrop = gDrawGround = true; player->cam.eye.x = 1200.0f; player->cam.eye.z = 1200.0f; player->cam.eye.y = 1800.0f; @@ -3711,8 +3711,8 @@ void Andross_80193C4C(Player* player) { D_ctx_80177A48[2] = 0; D_ctx_80177A48[3] = 1.0f; gActors[10].obj.pos.y = 1500.0f; - gActors[10].unk_0F4.z = 180.0f; - D_ctx_80177AB0 = 0; + gActors[10].rot_0F4.z = 180.0f; + gDrawBackdrop = 0; gFogFar = 1030; D_i6_801A7F40 = gLight1R; D_i6_801A7F44 = gLight1G; @@ -3801,8 +3801,8 @@ void Andross_80193C4C(Player* player) { gActors[10].state = 101; gActors[10].fwork[0] = 0.0f; gActors[10].obj.pos.y = 14500.0f; - gActors[10].unk_0F4.z = 70.0f; - gActors[10].unk_0F4.x = gActors[10].unk_0F4.y = 0.0f; + gActors[10].rot_0F4.z = 70.0f; + gActors[10].rot_0F4.x = gActors[10].rot_0F4.y = 0.0f; gFillScreenAlpha = gFillScreenAlphaTarget = 255; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; player->csTimer = 3; @@ -3972,7 +3972,7 @@ void Andross_80193C4C(Player* player) { player->unk_014 = 0.2f; player->unk_018 = 0.0f; player->unk_01C = 0.05f; - D_ctx_80177AB0 = 6; + gDrawBackdrop = 6; gProjectFar = 12800.0f; } D_ctx_80177A48[0] = 1.0f; @@ -4015,7 +4015,7 @@ void Andross_80195E44(Actor* actor) { switch (actor->state) { case 0: - actor->unk_0F4.z += actor->fwork[1]; + actor->rot_0F4.z += actor->fwork[1]; if (gCsFrameCount > 250) { Math_SmoothStepToF(&actor->fwork[1], 0.5f, 0.1f, 0.04f, 0.0f); } else { @@ -4023,15 +4023,15 @@ void Andross_80195E44(Actor* actor) { } break; case 1: - actor->unk_0F4.z += actor->fwork[1]; + actor->rot_0F4.z += actor->fwork[1]; Math_SmoothStepToF(&actor->fwork[1], -2.0f, 0.1f, 0.04f, 0.0f); if (gCsFrameCount == 55) { actor->state++; } break; case 2: - Math_SmoothStepToF(&actor->unk_0F4.x, 180.0f, 0.1f, 1.0f, 0.0f); - Math_SmoothStepToF(&actor->unk_0F4.y, 200.0f, 0.1f, 1.0f, 0.0f); + Math_SmoothStepToF(&actor->rot_0F4.x, 180.0f, 0.1f, 1.0f, 0.0f); + Math_SmoothStepToF(&actor->rot_0F4.y, 200.0f, 0.1f, 1.0f, 0.0f); actor->unk_046 -= 5; if (actor->unk_046 < 0) { actor->unk_046 = 0; @@ -4039,22 +4039,22 @@ void Andross_80195E44(Actor* actor) { } break; case 101: - Math_SmoothStepToF(&actor->unk_0F4.z, 0.0f, 0.03f, 0.5f, 0.0f); + Math_SmoothStepToF(&actor->rot_0F4.z, 0.0f, 0.03f, 0.5f, 0.0f); Math_SmoothStepToF(&actor->obj.pos.x, 0.0f, 0.03f, 5.0f, 0.0f); Math_SmoothStepToF(&actor->obj.pos.y, 15000.0f, 0.03f, 5.0f, 0.0f); Math_SmoothStepToF(&actor->obj.pos.z, 0.0f, 0.03f, 5.0f, 0.0f); break; case 100: actor->fwork[7] += 3.0f; - actor->unk_0F4.z = SIN_DEG(actor->fwork[7]) * 1.5f; + actor->rot_0F4.z = SIN_DEG(actor->fwork[7]) * 1.5f; actor->fwork[8] += 2.0f; sp34 = SIN_DEG(actor->fwork[8]) * 0.5f; break; case 200: break; } - Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, 0U); - Matrix_RotateX(gCalcMatrix, -(actor->unk_0F4.x * M_DTOR), 1U); + Matrix_RotateY(gCalcMatrix, (actor->rot_0F4.y + 180.0f) * M_DTOR, 0U); + Matrix_RotateX(gCalcMatrix, -(actor->rot_0F4.x * M_DTOR), 1U); sp44.x = 0.0f; sp44.y = 0.0f; sp44.z = actor->fwork[0]; @@ -4062,9 +4062,9 @@ void Andross_80195E44(Actor* actor) { actor->vel.x = sp38.x; actor->vel.y = sp38.y + sp34; actor->vel.z = sp38.z; - actor->obj.rot.x = -actor->unk_0F4.x; - actor->obj.rot.y = actor->unk_0F4.y + 180.0f; - actor->obj.rot.z = -actor->unk_0F4.z; + actor->obj.rot.x = -actor->rot_0F4.x; + actor->obj.rot.y = actor->rot_0F4.y + 180.0f; + actor->obj.rot.z = -actor->rot_0F4.z; } void Andross_801961AC(void) { diff --git a/src/overlays/ovl_i6/fox_sy.c b/src/overlays/ovl_i6/fox_sy.c index 91134c16..837f56fc 100644 --- a/src/overlays/ovl_i6/fox_sy.c +++ b/src/overlays/ovl_i6/fox_sy.c @@ -73,7 +73,7 @@ void SectorY_Boss314_Init(Boss314* this) { gScenery360[0].obj.pos.z = -30000.0f; } - this->unk_078.y = 0.0f; + this->rot_078.y = 0.0f; SectorY_8019AEC0(this); } else { this->fwork[34] = 2.8f; @@ -84,13 +84,13 @@ void SectorY_Boss314_Init(Boss314* this) { this->fwork[45] = 35.0f; if (this->index == 1) { - this->unk_078.y = 15.0f; + this->rot_078.y = 15.0f; } else { - this->unk_078.y = 345.0f; + this->rot_078.y = 345.0f; } - this->vel.x = SIN_DEG(this->unk_078.y) * this->fwork[45] * 0.2f; - this->vel.z = COS_DEG(this->unk_078.y) * this->fwork[45] * 0.2f; + this->vel.x = SIN_DEG(this->rot_078.y) * this->fwork[45] * 0.2f; + this->vel.z = COS_DEG(this->rot_078.y) * this->fwork[45] * 0.2f; SectorY_80198244(this); this->timer_056 = 250; } @@ -123,7 +123,7 @@ void SectorY_80197F84(Boss* boss) { Math_SmoothStepToF(&boss->vel.y, 0.0f, 0.1f, 0.2f, 0.1f); Math_SmoothStepToF(&boss->vel.z, 0.0f, 0.1f, 0.2f, 0.1f); Math_SmoothStepToF(&boss->vel.x, 0.0f, 0.1f, 0.2f, 0.1f); - Math_SmoothStepToAngle(&boss->unk_078.x, 0.0f, 0.1f, 4.0f, 0.1f); + Math_SmoothStepToAngle(&boss->rot_078.x, 0.0f, 0.1f, 4.0f, 0.1f); if (SectorY_8019B5CC(boss)) { Math_SmoothStepToF(&boss->obj.pos.y, 1000.0f, 0.1f, 30.0f, 0.1f); @@ -138,7 +138,7 @@ void SectorY_80197F84(Boss* boss) { yaw = Math_RadToDeg(Math_Atan2F(boss->fwork[18] - boss->obj.pos.x, boss->fwork[20] - boss->obj.pos.z)); - Math_SmoothStepToAngle(&boss->unk_078.y, yaw, 0.1f, 8.0f, 0.1f); + Math_SmoothStepToAngle(&boss->rot_078.y, yaw, 0.1f, 8.0f, 0.1f); if (boss->timer_050 == 0) { SectorY_80198244(boss); @@ -148,7 +148,7 @@ void SectorY_80197F84(Boss* boss) { if (ABS(boss->vel.x) <= 1.0f && (ABS(boss->vel.z) <= 1.0f) && (fabsf(boss->fwork[18] - boss->obj.pos.x) <= 400.0f) && (fabsf(boss->fwork[20] - boss->obj.pos.z) <= 1400.0f)) { - if ((Rand_ZeroOne() < 0.2f) && (boss->unk_078.x == 0.0f)) { + if ((Rand_ZeroOne() < 0.2f) && (boss->rot_078.x == 0.0f)) { SectorY_8019AA08(boss); } if (Rand_ZeroOne() < 0.2f) { @@ -171,8 +171,8 @@ void SectorY_80198244(Boss* boss) { boss->swork[20] = 3; boss->swork[21] = 1; boss->timer_056 = (s32) (RAND_FLOAT(500.0f) + 100.0f); - boss->fwork[11] = SIN_DEG(boss->unk_078.y) * boss->fwork[45]; - boss->fwork[13] = COS_DEG(boss->unk_078.y) * boss->fwork[45]; + boss->fwork[11] = SIN_DEG(boss->rot_078.y) * boss->fwork[45]; + boss->fwork[13] = COS_DEG(boss->rot_078.y) * boss->fwork[45]; speed = ABS(boss->vel.x); if (speed < 5.0f) { @@ -199,8 +199,8 @@ void SectorY_801983E4(Boss* boss) { SectorY_8019BC14(boss); } - Math_SmoothStepToAngle(&boss->unk_078.z, 0.0f, 0.1f, 2.0f, 0.1f); - Math_SmoothStepToAngle(&boss->unk_078.x, 0.0f, 0.1f, 2.0f, 0.1f); + Math_SmoothStepToAngle(&boss->rot_078.z, 0.0f, 0.1f, 2.0f, 0.1f); + Math_SmoothStepToAngle(&boss->rot_078.x, 0.0f, 0.1f, 2.0f, 0.1f); Math_SmoothStepToF(&boss->vel.x, boss->fwork[11], 0.1f, 0.5f, 0.1f); Math_SmoothStepToF(&boss->vel.z, boss->fwork[13], 0.1f, 0.5f, 0.1f); Math_SmoothStepToF(&boss->vel.y, 0.0f, 0.1f, 0.2f, 0.1f); @@ -208,23 +208,23 @@ void SectorY_801983E4(Boss* boss) { xSpeed = ABS(boss->fwork[18] - boss->obj.pos.x); zSpeed = ABS(boss->fwork[20] - boss->obj.pos.z); - if (boss->unk_078.x != 0.0f) { - Math_SmoothStepToAngle(&boss->unk_078.x, boss->fwork[10], 0.1f, 6.0f, 0.1f); - if (boss->unk_078.x < 200.0f) { + if (boss->rot_078.x != 0.0f) { + Math_SmoothStepToAngle(&boss->rot_078.x, boss->fwork[10], 0.1f, 6.0f, 0.1f); + if (boss->rot_078.x < 200.0f) { boss->swork[21] = 1; boss->fwork[10] = 0.0f; - boss->unk_078.x = 0.0f; - boss->unk_078.y -= 180.0f; - boss->unk_078.z -= 180.0f; - if (boss->unk_078.y < 0.0f) { - boss->unk_078.y += 360.0f; + boss->rot_078.x = 0.0f; + boss->rot_078.y -= 180.0f; + boss->rot_078.z -= 180.0f; + if (boss->rot_078.y < 0.0f) { + boss->rot_078.y += 360.0f; } - if (boss->unk_078.z < 0.0f) { - boss->unk_078.z += 360.0f; + if (boss->rot_078.z < 0.0f) { + boss->rot_078.z += 360.0f; } - boss->fwork[11] = SIN_DEG(boss->unk_078.y) * boss->fwork[45]; - boss->fwork[13] = COS_DEG(boss->unk_078.y) * boss->fwork[45]; + boss->fwork[11] = SIN_DEG(boss->rot_078.y) * boss->fwork[45]; + boss->fwork[13] = COS_DEG(boss->rot_078.y) * boss->fwork[45]; boss->fwork[34] = 2.8f; } } @@ -237,13 +237,13 @@ void SectorY_801983E4(Boss* boss) { yAngle += 360.0f; } - yAngle = boss->unk_078.y - yAngle; + yAngle = boss->rot_078.y - yAngle; if (yAngle < 0.0f) { yAngle += 360.0f; } if ((zSpeed <= 1300.0f) && (xSpeed <= 800.0f) && (yAngle < 260.0f) && (yAngle > 100.0f) && - (boss->unk_078.x == 0.0f) && (boss->fwork[34] <= 2.0f)) { + (boss->rot_078.x == 0.0f) && (boss->fwork[34] <= 2.0f)) { if (Rand_ZeroOne() < 0.2f) { SectorY_8019AA08(boss); } @@ -260,7 +260,7 @@ void SectorY_801983E4(Boss* boss) { } } - if (((yAngle > 300.0f) || (yAngle < 60.0f)) && (boss->unk_078.x == 0.0f)) { + if (((yAngle > 300.0f) || (yAngle < 60.0f)) && (boss->rot_078.x == 0.0f)) { if (Rand_ZeroOne() < 0.3f) { if (Rand_ZeroOne() < 0.4f) { SectorY_80197F18(boss); @@ -268,10 +268,10 @@ void SectorY_801983E4(Boss* boss) { SectorY_80199D64(boss); } } else if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_U_TURN) { - Math_SmoothStepToAngle(&boss->unk_078.x, 181.0f, 0.1f, 6.0f, 0.1f); + Math_SmoothStepToAngle(&boss->rot_078.x, 181.0f, 0.1f, 6.0f, 0.1f); boss->swork[21] = 3; - boss->fwork[11] = SIN_DEG(boss->unk_078.y) * (boss->fwork[45] + 10.0f); - boss->fwork[13] = COS_DEG(boss->unk_078.y) * (boss->fwork[45] + 10.0f); + boss->fwork[11] = SIN_DEG(boss->rot_078.y) * (boss->fwork[45] + 10.0f); + boss->fwork[13] = COS_DEG(boss->rot_078.y) * (boss->fwork[45] + 10.0f); boss->fwork[34] = 2.8f; } } @@ -300,7 +300,7 @@ void SectorY_801983E4(Boss* boss) { void SectorY_80198ABC(Boss* boss) { f32 yAngle; - yAngle = Math_RadToDeg(Math_Atan2F(-boss->obj.pos.x, -300.0f - boss->obj.pos.z)) - boss->unk_078.y; + yAngle = Math_RadToDeg(Math_Atan2F(-boss->obj.pos.x, -300.0f - boss->obj.pos.z)) - boss->rot_078.y; if (yAngle < 0.0f) { yAngle += 360.0f; } @@ -359,22 +359,22 @@ void SectorY_80198CE4(Boss* boss) { SectorY_8019BC14(boss); } - Math_SmoothStepToAngle(&boss->unk_078.z, boss->fwork[27], 0.1f, 0.5f, 0.1f); - Math_SmoothStepToAngle(&boss->unk_078.x, 0.0f, 0.1f, 4.0f, 0.1f); + Math_SmoothStepToAngle(&boss->rot_078.z, boss->fwork[27], 0.1f, 0.5f, 0.1f); + Math_SmoothStepToAngle(&boss->rot_078.x, 0.0f, 0.1f, 4.0f, 0.1f); yAngle = Math_RadToDeg(Math_Atan2F(-boss->obj.pos.x, -300.0f - boss->obj.pos.z)); if (boss->index != 0) { - Math_SmoothStepToAngle(&boss->unk_078.y, yAngle, 0.1f, 1.0f, 0.1f); + Math_SmoothStepToAngle(&boss->rot_078.y, yAngle, 0.1f, 1.0f, 0.1f); } else { - Math_SmoothStepToAngle(&boss->unk_078.y, yAngle, 0.1f, 2.0f, 0.1f); + Math_SmoothStepToAngle(&boss->rot_078.y, yAngle, 0.1f, 2.0f, 0.1f); } if (boss->index == 0) { - boss->vel.x = SIN_DEG(boss->unk_078.y) * (boss->fwork[45] + 20.0f); - boss->vel.z = COS_DEG(boss->unk_078.y) * (boss->fwork[45] + 20.0f); + boss->vel.x = SIN_DEG(boss->rot_078.y) * (boss->fwork[45] + 20.0f); + boss->vel.z = COS_DEG(boss->rot_078.y) * (boss->fwork[45] + 20.0f); } else { - boss->vel.x = SIN_DEG(boss->unk_078.y) * boss->fwork[45]; - boss->vel.z = COS_DEG(boss->unk_078.y) * boss->fwork[45]; + boss->vel.x = SIN_DEG(boss->rot_078.y) * boss->fwork[45]; + boss->vel.z = COS_DEG(boss->rot_078.y) * boss->fwork[45]; } if (SectorY_8019B5CC(boss)) { @@ -385,7 +385,7 @@ void SectorY_80198CE4(Boss* boss) { Math_SmoothStepToF(&boss->vel.y, 0.0f, 0.1f, 0.2f, 0.1f); - yAngle -= boss->unk_078.y; + yAngle -= boss->rot_078.y; if (yAngle < 0.0f) { yAngle += 360.0f; } @@ -685,8 +685,8 @@ void SectorY_80199DAC(Boss* boss) { boss->fwork[13] = COS_DEG(sp34) * (boss->fwork[45] + 10.0f); boss->fwork[10] = sp34; - Math_SmoothStepToAngle(&boss->unk_078.z, 0.0f, 0.1f, 4.0f, 0.1f); - Math_SmoothStepToAngle(&boss->unk_078.y, boss->fwork[10], 0.1f, 6.0f, 0.1f); + Math_SmoothStepToAngle(&boss->rot_078.z, 0.0f, 0.1f, 4.0f, 0.1f); + Math_SmoothStepToAngle(&boss->rot_078.y, boss->fwork[10], 0.1f, 6.0f, 0.1f); Math_SmoothStepToF(&boss->obj.pos.y, boss->fwork[12], 1.0f, 15.0f, 1.0f); if (((ABS(boss->obj.pos.y) - boss->fwork[12]) <= 1800.0f) && (ABS(boss->obj.pos.x) <= 1800.0f) && @@ -697,7 +697,7 @@ void SectorY_80199DAC(Boss* boss) { Math_SmoothStepToF(&boss->obj.pos.x, 0.0f, 0.1f, ABS(boss->fwork[11]), 0.1f); Math_SmoothStepToF(&boss->obj.pos.z, -300.0f, 0.1f, ABS(boss->fwork[13]), 0.1f); - Math_SmoothStepToAngle(&boss->unk_078.x, 0.0f, 0.1f, 4.0f, 0.1f); + Math_SmoothStepToAngle(&boss->rot_078.x, 0.0f, 0.1f, 4.0f, 0.1f); boss->fwork[10] = 0.0f; @@ -719,7 +719,7 @@ void SectorY_80199DAC(Boss* boss) { if (yAngle < 0.0f) { yAngle += 360.0f; } - yAngle = boss->unk_078.y - yAngle; + yAngle = boss->rot_078.y - yAngle; if (yAngle < 0.0f) { yAngle += 360.0f; } @@ -727,14 +727,14 @@ void SectorY_80199DAC(Boss* boss) { zSpeed = ABS(boss->fwork[20] - boss->obj.pos.z); xSpeed = ABS(boss->fwork[18] - boss->obj.pos.x); - if (boss->unk_078.x != 0.0f) { + if (boss->rot_078.x != 0.0f) { if ((yAngle > 300.0f) || (yAngle < 60.0f)) { - Math_SmoothStepToAngle(&boss->unk_078.x, 181.0f, 0.1f, 6.0f, 0.1f); + Math_SmoothStepToAngle(&boss->rot_078.x, 181.0f, 0.1f, 6.0f, 0.1f); } else { - Math_SmoothStepToAngle(&boss->unk_078.x, 0.0f, 0.1f, 6.0f, 0.1f); + Math_SmoothStepToAngle(&boss->rot_078.x, 0.0f, 0.1f, 6.0f, 0.1f); } } else if ((boss->swork[22] == 1) && ((yAngle > 300.0f) || (yAngle < 60.0f)) && (Rand_ZeroOne() > 0.2f)) { - Math_SmoothStepToAngle(&boss->unk_078.x, 181.0f, 0.1f, 6.0f, 0.1f); + Math_SmoothStepToAngle(&boss->rot_078.x, 181.0f, 0.1f, 6.0f, 0.1f); boss->swork[21] = 3; boss->fwork[34] = 2.8f; } @@ -761,8 +761,8 @@ void SectorY_8019A434(Boss* boss) { boss->swork[20] = 7; boss->swork[21] = 5; boss->timer_056 = (s32) (RAND_FLOAT(130.0f) + 60.0f); - boss->fwork[11] = SIN_DEG(boss->unk_078.y) * boss->fwork[45]; - boss->fwork[13] = COS_DEG(boss->unk_078.y) * boss->fwork[45]; + boss->fwork[11] = SIN_DEG(boss->rot_078.y) * boss->fwork[45]; + boss->fwork[13] = COS_DEG(boss->rot_078.y) * boss->fwork[45]; boss->fwork[12] = 30.0f; boss->fwork[10] = 181.0f; AUDIO_PLAY_SFX(NA_SE_EN_MS_LAND, boss->sfxSource, 4); @@ -774,7 +774,7 @@ void SectorY_8019A520(Boss* boss) { SectorY_8019BC14(boss); } - Math_SmoothStepToAngle(&boss->unk_078.y, 0.0f, 0.1f, 2.0f, 0.1f); + Math_SmoothStepToAngle(&boss->rot_078.y, 0.0f, 0.1f, 2.0f, 0.1f); Math_SmoothStepToF(&boss->vel.x, 0.0f, 0.1f, 0.2f, 0.1f); Math_SmoothStepToF(&boss->vel.z, 6.0f, 0.1f, 0.2f, 0.1f); Math_SmoothStepToF(&boss->vel.y, 0.0f, 0.1f, 0.2f, 0.1f); @@ -817,8 +817,8 @@ void SectorY_8019A66C(Boss* boss) { } if (boss->timer_056 <= 60) { - boss->fwork[11] = SIN_DEG(boss->unk_078.y) * boss->fwork[45]; - boss->fwork[13] = COS_DEG(boss->unk_078.y) * boss->fwork[45]; + boss->fwork[11] = SIN_DEG(boss->rot_078.y) * boss->fwork[45]; + boss->fwork[13] = COS_DEG(boss->rot_078.y) * boss->fwork[45]; boss->swork[21] = 1; Math_SmoothStepToF(&boss->fwork[43], 0.0f, 0.1f, 0.1f, 0.1f); Math_SmoothStepToF(&boss->vel.z, boss->fwork[13], 0.1f, 0.5f, 0.5f); @@ -849,7 +849,7 @@ void SectorY_8019A898(Boss* boss) { } yAngle1 = Math_RadToDeg(Math_Atan2F(boss->fwork[18] - boss->obj.pos.x, boss->fwork[20] - boss->obj.pos.z)); - yAngle2 = yAngle1 - boss->unk_078.y; + yAngle2 = yAngle1 - boss->rot_078.y; if (yAngle2 < 0.0f) { yAngle2 += 360.0f; } @@ -858,7 +858,7 @@ void SectorY_8019A898(Boss* boss) { if (((yAngle2 >= 30.0f) && (yAngle2 <= 330.0f)) || ((boss->unk_04C != 0)) && (boss->unk_04C != 27)) { boss->swork[21] = 5; - Math_SmoothStepToAngle(&boss->unk_078.y, yAngle1, 0.1f, 2.0f, 0.1f); + Math_SmoothStepToAngle(&boss->rot_078.y, yAngle1, 0.1f, 2.0f, 0.1f); boss->fwork[0] = 1.0f; if ((boss->unk_04C == 0) || (boss->unk_04C == 27)) { AUDIO_PLAY_SFX(NA_SE_EN_HEAVY_WALK, boss->sfxSource, 4); @@ -946,12 +946,12 @@ void SectorY_8019AAF0(Boss* boss) { Matrix_MultVec3f(gCalcMatrix, &vec, &vel); boss->vel.z = vel.z; boss->vel.x = vel.x; - Math_SmoothStepToAngle(&boss->unk_078.y, Math_RadToDeg(yAngle), 0.1f, 6.0f, 0.1f); + Math_SmoothStepToAngle(&boss->rot_078.y, Math_RadToDeg(yAngle), 0.1f, 6.0f, 0.1f); } if (boss->swork[31] != 11) { - if ((boss->unk_078.z <= 90.0f) || (boss->unk_078.z >= 270.0f)) { + if ((boss->rot_078.z <= 90.0f) || (boss->rot_078.z >= 270.0f)) { boss->fwork[19] += 70.0f; } else { boss->fwork[19] -= 50.0f; @@ -1112,7 +1112,7 @@ bool SectorY_8019B5CC(Boss* boss) { return false; } - Math_Vec3fFromAngles(&pos, boss->unk_078.x, boss->unk_078.y, 700.0f); + Math_Vec3fFromAngles(&pos, boss->rot_078.x, boss->rot_078.y, 700.0f); if ((fabsf(gScenery360[0].obj.pos.x - (boss->obj.pos.x + pos.x)) < 2500.0f) && (fabsf(gScenery360[0].obj.pos.z - (boss->obj.pos.z + pos.z)) < 5000.0f) && @@ -1222,7 +1222,7 @@ void SectorY_8019BC14(Boss* boss) { if ((fabsf(boss->fwork[3] - boss->fwork[0x14]) > 300.0f) || (fabsf(boss->fwork[1] - boss->fwork[0x12]) > 300.0f)) { sp3C = Math_RadToDeg( - Math_Atan2F(boss->fwork[0x12] - boss->fwork[1] - boss->unk_078.x, boss->fwork[0x14] - boss->fwork[3])); + Math_Atan2F(boss->fwork[0x12] - boss->fwork[1] - boss->rot_078.x, boss->fwork[0x14] - boss->fwork[3])); sp40 = ABS(boss->fwork[0x12] - boss->fwork[1]) + ABS(boss->fwork[0x14] - boss->fwork[3]); sp40 = Math_RadToDeg(-Math_Atan2F(boss->fwork[0x13] - boss->fwork[2], sp40)); sp38 = Math_RadToDeg(Math_Atan2F(boss->fwork[1] - boss->fwork[0x15], boss->fwork[3] - boss->fwork[0x17])); @@ -1493,9 +1493,9 @@ void SectorY_Boss_Update(Boss* boss) { break; } - boss->obj.rot.x = boss->unk_078.x; - boss->obj.rot.y = boss->unk_078.y; - boss->obj.rot.z = boss->unk_078.z; + boss->obj.rot.x = boss->rot_078.x; + boss->obj.rot.y = boss->rot_078.y; + boss->obj.rot.z = boss->rot_078.z; Matrix_RotateZ(gCalcMatrix, -boss->vwork[29].z * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -boss->vwork[29].x * M_DTOR, MTXF_APPLY); @@ -1633,7 +1633,7 @@ void SectorY_Boss_Update(Boss* boss) { radarMark->pos.x = boss->obj.pos.x; radarMark->pos.y = boss->obj.pos.y; radarMark->pos.z = boss->obj.pos.z; - radarMark->yRot = boss->unk_078.y + 180.0f; + radarMark->yRot = boss->rot_078.y + 180.0f; } else { radarMark = &gRadarMarks[boss->index + 4]; radarMark->status = 1; @@ -1641,7 +1641,7 @@ void SectorY_Boss_Update(Boss* boss) { radarMark->pos.x = boss->obj.pos.x; radarMark->pos.y = boss->obj.pos.y; radarMark->pos.z = boss->obj.pos.z; - radarMark->yRot = boss->unk_078.y + 180.0f; + radarMark->yRot = boss->rot_078.y + 180.0f; } if (gBossFrameCount == 250) { @@ -2008,7 +2008,7 @@ void SectorY_8019EB80(void) { actor->obj.pos.x = (D_i6_801A69FC[i].x * 0.5f) + gPlayer[0].pos.x + RAND_FLOAT_CENTERED_SEEDED(2000.0f); actor->obj.pos.y = D_i6_801A69FC[i].y + gPlayer[0].pos.y + RAND_FLOAT_SEEDED(1000.0f); actor->obj.pos.z = D_i6_801A69FC[i].z + gPlayer[0].pos.z + RAND_FLOAT_SEEDED(1000.0f); - actor->unk_0F4.z = RAND_FLOAT_CENTERED_SEEDED(200.0f); + actor->rot_0F4.z = RAND_FLOAT_CENTERED_SEEDED(200.0f); actor->vwork[0].x = (D_i6_801A69FC[i].x * 0.5f) + gPlayer[0].pos.x; actor->vwork[0].y = D_i6_801A69FC[i].y + gPlayer[0].pos.y; actor->vwork[0].z = D_i6_801A69FC[i].z + gPlayer[0].pos.z; @@ -2016,11 +2016,11 @@ void SectorY_8019EB80(void) { Object_SetInfo(&actor->info, actor->obj.id); if (i >= 3) { - actor->unk_0B6 = 35; - actor->unk_0F4.z = 0.0f; + actor->animFrame = 35; + actor->rot_0F4.z = 0.0f; } if (i >= 7) { - actor->unk_0B6 = 36; + actor->animFrame = 36; actor->scale = 0.125f; } actor->iwork[11] = 1; @@ -2063,7 +2063,7 @@ void SectorY_LevelComplete(Player* player) { gCsCamAtZ = boss->obj.pos.z; for (i = 10; i < ARRAY_COUNT(gActors); i++) { - if (gActors[i].unk_0B6 == 0) { + if (gActors[i].animFrame == 0) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); } } @@ -2105,8 +2105,8 @@ void SectorY_LevelComplete(Player* player) { Math_SmoothStepToF(&player->rot.z, temp_ft1 * 20.0f, 0.1f, 1.0f, 0); for (i = 1; i < 4; i++) { - temp_ft1 = Math_SmoothStepToAngle(&gActors[i].unk_0F4.y, gActors[i].fwork[1], 0.1f, 3.0f, 0.0f); - Math_SmoothStepToF(&gActors[i].unk_0F4.z, temp_ft1 * 20.0f, 0.1f, 1.0f, 0); + temp_ft1 = Math_SmoothStepToAngle(&gActors[i].rot_0F4.y, gActors[i].fwork[1], 0.1f, 3.0f, 0.0f); + Math_SmoothStepToF(&gActors[i].rot_0F4.z, temp_ft1 * 20.0f, 0.1f, 1.0f, 0); } if (gCsFrameCount >= 180) { @@ -2137,7 +2137,7 @@ void SectorY_LevelComplete(Player* player) { player->csState++; Audio_StartPlayerNoise(0); AUDIO_PLAY_BGM(NA_BGM_COURSE_CLEAR); - D_ctx_80177A98 = 0; + gDrawGround = false; for (i = 0; i < 200; i++) { gScenery360[i].obj.status = OBJ_FREE; @@ -2376,8 +2376,8 @@ void SectorY_8019FF00(Actor* actor) { Math_SmoothStepToF(&actor->obj.pos.x, actor->vwork[0].x, 0.02f, 2.0f, 0.0001f); Math_SmoothStepToF(&actor->obj.pos.y, actor->vwork[0].y, 0.02f, 2.0f, 0.0001f); Math_SmoothStepToF(&actor->obj.pos.z, actor->vwork[0].z, 0.02f, 2.0f, 0.0001f); - Math_SmoothStepToF(&actor->unk_0F4.z, 0.0f, 0.02f, 0.2f, 0.0001f); - if ((actor->unk_0B6 != 0) && ((((s32) (actor->index % 8U) * 10) + 1030) < gCsFrameCount)) { + Math_SmoothStepToF(&actor->rot_0F4.z, 0.0f, 0.02f, 0.2f, 0.0001f); + if ((actor->animFrame != 0) && ((((s32) (actor->index % 8U) * 10) + 1030) < gCsFrameCount)) { actor->state = 4; } break; @@ -2390,23 +2390,23 @@ void SectorY_8019FF00(Actor* actor) { case 3: actor->iwork[11] = 2; actor->fwork[0] += 2.0f; - actor->unk_0F4.x += 0.1f; + actor->rot_0F4.x += 0.1f; break; case 5: - Math_SmoothStepToF(&actor->unk_0F4.x, 0.0f, 0.1f, 5.0f, 0.0f); + Math_SmoothStepToF(&actor->rot_0F4.x, 0.0f, 0.1f, 5.0f, 0.0f); temp1 = actor->obj.pos.x - gBosses[actor->timer_04C].obj.pos.x; temp2 = actor->obj.pos.z - gBosses[actor->timer_04C].obj.pos.z; - Math_SmoothStepToAngle(&actor->unk_0F4.z, - Math_SmoothStepToAngle(&actor->unk_0F4.y, Math_RadToDeg(Math_Atan2F(temp1, temp2)), + Math_SmoothStepToAngle(&actor->rot_0F4.z, + Math_SmoothStepToAngle(&actor->rot_0F4.y, Math_RadToDeg(Math_Atan2F(temp1, temp2)), 0.5f, 2.0f, 0.0001f) * 30.0f, 0.1f, 5.0f, 0.0001f); break; case 7: - actor->unk_0F4.y = gPlayer[0].rot.y; - actor->unk_0F4.z = gPlayer[0].rot.z; + actor->rot_0F4.y = gPlayer[0].rot.y; + actor->rot_0F4.z = gPlayer[0].rot.z; Math_SmoothStepToF(&actor->obj.pos.y, 50.0f, 0.1f, 1.0f, 0.0f); if (gPlayer[0].rot.y == 0.0f) { Math_SmoothStepToF(&actor->obj.pos.x, 1300.0f, 1.0f, 2.0f, 0.0f); @@ -2427,10 +2427,10 @@ void SectorY_8019FF00(Actor* actor) { AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); } Math_SmoothStepToF(&actor->obj.pos.x, -1000.0f, 1.0f, 20.0f, 0.0f); - Math_SmoothStepToAngle(&actor->unk_0F4.z, 45.0f, 1.0f, 4.0f, 0.0f); + Math_SmoothStepToAngle(&actor->rot_0F4.z, 45.0f, 1.0f, 4.0f, 0.0f); } else { - actor->unk_0F4.y = gPlayer[0].rot.y; - actor->unk_0F4.z = gPlayer[0].rot.z; + actor->rot_0F4.y = gPlayer[0].rot.y; + actor->rot_0F4.z = gPlayer[0].rot.z; Math_SmoothStepToF(&actor->obj.pos.x, -230.0f, 1.0f, 13.0f, 0.0f); } break; @@ -2443,18 +2443,18 @@ void SectorY_8019FF00(Actor* actor) { AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); } Math_SmoothStepToF(&actor->obj.pos.x, 1500.0f, 1.0f, 20.0f, 0.0f); - Math_SmoothStepToAngle(&actor->unk_0F4.z, 315.0f, 1.0f, 2.0f, 0.0f); + Math_SmoothStepToAngle(&actor->rot_0F4.z, 315.0f, 1.0f, 2.0f, 0.0f); } else { - actor->unk_0F4.y = gPlayer[0].rot.y; - actor->unk_0F4.z = gPlayer[0].rot.z; + actor->rot_0F4.y = gPlayer[0].rot.y; + actor->rot_0F4.z = gPlayer[0].rot.z; Math_SmoothStepToF(&actor->obj.pos.x, 150.0f, 1.0f, 13.0f, 0.0f); } break; } if (actor->state != 6) { - Matrix_RotateY(gCalcMatrix, (actor->unk_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(actor->unk_0F4.x * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (actor->rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(actor->rot_0F4.x * M_DTOR), MTXF_APPLY); sp4C.x = 0.0f; sp4C.y = 0.0f; sp4C.z = actor->fwork[0]; @@ -2462,9 +2462,9 @@ void SectorY_8019FF00(Actor* actor) { actor->vel.x = sp40.x; actor->vel.y = sp40.y; actor->vel.z = sp40.z; - actor->obj.rot.x = -actor->unk_0F4.x; - actor->obj.rot.y = actor->unk_0F4.y + 180.0f; - actor->obj.rot.z = -actor->unk_0F4.z; + actor->obj.rot.x = -actor->rot_0F4.x; + actor->obj.rot.y = actor->rot_0F4.y + 180.0f; + actor->obj.rot.z = -actor->rot_0F4.z; } } @@ -2488,13 +2488,13 @@ void SectorY_801A0510(Actor* actor, s32 arg1) { case 1: case 2: case 8: - actor->unk_0B6 = 38; + actor->animFrame = 38; actor->obj.rot.y = 90.0f; Object_SetInfo(&actor->info, actor->obj.id); break; case 3: - actor->unk_0B6 = 36; + actor->animFrame = 36; actor->vel.z = -5.0f; actor->scale = 1.0f; actor->obj.rot.y = 180.0f; @@ -2502,27 +2502,27 @@ void SectorY_801A0510(Actor* actor, s32 arg1) { break; case 4: - actor->unk_0B6 = 37; + actor->animFrame = 37; actor->obj.rot.y = 90.0f; Object_SetInfo(&actor->info, actor->obj.id); break; case 5: case 9: - actor->unk_0B6 = 39; + actor->animFrame = 39; actor->obj.rot.y = 180.0f; Object_SetInfo(&actor->info, actor->obj.id); break; case 6: - actor->unk_0B6 = 36; + actor->animFrame = 36; actor->obj.rot.y = 180.0f; actor->scale = 1.0f; Object_SetInfo(&actor->info, actor->obj.id); break; case 7: - actor->unk_0B6 = 40; + actor->animFrame = 40; Object_SetInfo(&actor->info, actor->obj.id); break; @@ -2546,8 +2546,8 @@ void SectorY_801A06A4(Actor* actor, s32 arg1) { actor->obj.pos.y = gPlayer[0].pos.y + D_i6_801A6AEC[arg1].y; actor->obj.pos.z = gPlayer[0].pos.z + D_i6_801A6AEC[arg1].z; actor->fwork[0] = gPlayer[0].baseSpeed; - actor->unk_0F4.y = gPlayer[0].rot.y; - actor->unk_0F4.z = gPlayer[0].rot.z; + actor->rot_0F4.y = gPlayer[0].rot.y; + actor->rot_0F4.z = gPlayer[0].rot.z; actor->state = arg1 + 7; actor->iwork[11] = 1; Object_SetInfo(&actor->info, actor->obj.id); @@ -2587,7 +2587,7 @@ void SectorY_801A07FC(Actor* actor0, Actor* actor1) { actor1->vel.z = sp30.z; actor1->obj.rot.x = actor0->obj.rot.x; actor1->obj.rot.y = actor0->obj.rot.y; - actor1->unk_0B6 = 42; + actor1->animFrame = 42; AUDIO_PLAY_SFX(NA_SE_EN_MS_SHOT_S, actor1->sfxSource, 4); } @@ -2602,7 +2602,7 @@ void SectorY_801A0A08(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 arg4) { Object_SetInfo(&actor->info, actor->obj.id); actor->timer_0BC = 35; actor->iwork[0] = 255; - actor->unk_0B6 = 43; + actor->animFrame = 43; AUDIO_PLAY_SFX(NA_SE_EN_MS_SHOT_S, actor->sfxSource, 4); } @@ -2753,7 +2753,7 @@ void SectorY_801A0AC0(Player* player) { gActors[8].obj.pos.y - 500.0f + RAND_FLOAT_CENTERED(1000.0f), gActors[8].obj.pos.z + RAND_FLOAT_CENTERED(3000.0f), 8); } - if (gGameFrameCount & 20) { + if ((gGameFrameCount & 20) != 0) { for (i = 12; i < ARRAY_COUNT(gActors); i++) { if (gActors[i].obj.status == OBJ_FREE) { SectorY_801A0A08( @@ -3437,7 +3437,7 @@ void SectorY_Actor204_Update(Actor204* this) { s32 sp4C = 30; s32 pad; - this->iwork[14] = this->unk_0B4 - 48; + this->iwork[14] = this->eventType - 48; this->info.drawType = 2; if (this->iwork[18] != 0) { @@ -3460,12 +3460,12 @@ void SectorY_Actor204_Update(Actor204* this) { case 3: this->unk_046 = 2; - this->unk_0B6 = 0; + this->animFrame = 0; break; case 4: this->unk_046 = 0; - this->unk_0B6 = 0; + this->animFrame = 0; break; case 8: @@ -3494,17 +3494,17 @@ void SectorY_Actor204_Update(Actor204* this) { case 6: this->unk_046 = 4; - this->unk_0B6 = 0; + this->animFrame = 0; break; case 5: this->unk_046 = 5; - this->unk_0B6 = Animation_GetFrameCount(&D_SY_602B778) - 1; + this->animFrame = Animation_GetFrameCount(&D_SY_602B778) - 1; break; case 7: this->unk_046 = 6; - this->unk_0B6 = Animation_GetFrameCount(&D_SY_602B778) - 1; + this->animFrame = Animation_GetFrameCount(&D_SY_602B778) - 1; break; } this->unk_048 = 0; @@ -3516,15 +3516,15 @@ void SectorY_Actor204_Update(Actor204* this) { i = this->iwork[17]; if (i != 0) { if (i == 1) { - this->unk_0B6 = Animation_GetFrameCount(&D_SY_60265B4) - 1; - sp4C = Animation_GetFrameData(&D_SY_60265B4, this->unk_0B6, sp68); + this->animFrame = Animation_GetFrameCount(&D_SY_60265B4) - 1; + sp4C = Animation_GetFrameData(&D_SY_60265B4, this->animFrame, sp68); } else if (i == 2) { - this->unk_0B6 = Animation_GetFrameCount(&D_SY_602B8DC) - 1; - sp4C = Animation_GetFrameData(&D_SY_602B8DC, this->unk_0B6, sp68); + this->animFrame = Animation_GetFrameCount(&D_SY_602B8DC) - 1; + sp4C = Animation_GetFrameData(&D_SY_602B8DC, this->animFrame, sp68); } } else { - this->unk_0B6 = Animation_GetFrameCount(&D_SY_602CEB4); - sp4C = Animation_GetFrameData(&D_SY_602CEB4, this->unk_0B6, sp68); + this->animFrame = Animation_GetFrameCount(&D_SY_602CEB4); + sp4C = Animation_GetFrameData(&D_SY_602CEB4, this->animFrame, sp68); } break; @@ -3532,15 +3532,15 @@ void SectorY_Actor204_Update(Actor204* this) { i = this->iwork[17]; if (i != 0) { if (i == 1) { - this->unk_0B6 = Animation_GetFrameCount(&D_SY_60265B4) - 1; - sp4C = Animation_GetFrameData(&D_SY_60265B4, this->unk_0B6, sp68); + this->animFrame = Animation_GetFrameCount(&D_SY_60265B4) - 1; + sp4C = Animation_GetFrameData(&D_SY_60265B4, this->animFrame, sp68); } else if (i == 2) { - this->unk_0B6 = Animation_GetFrameCount(&D_SY_602B8DC) - 1; - sp4C = Animation_GetFrameData(&D_SY_602B8DC, this->unk_0B6, sp68); + this->animFrame = Animation_GetFrameCount(&D_SY_602B8DC) - 1; + sp4C = Animation_GetFrameData(&D_SY_602B8DC, this->animFrame, sp68); } } else { - this->unk_0B6 = Animation_GetFrameCount(&D_SY_602A2CC) - 1; - sp4C = Animation_GetFrameData(&D_SY_602A2CC, this->unk_0B6, sp68); + this->animFrame = Animation_GetFrameCount(&D_SY_602A2CC) - 1; + sp4C = Animation_GetFrameData(&D_SY_602A2CC, this->animFrame, sp68); } if (this->timer_0BE == 15) { @@ -3564,33 +3564,33 @@ void SectorY_Actor204_Update(Actor204* this) { } if (this->timer_0BE == 0) { - this->unk_0B6 = 0; + this->animFrame = 0; this->unk_046 = 0; this->fwork[15] = 0.0f; } break; case 2: - if (this->unk_0B6 < (Animation_GetFrameCount(&D_SY_6029B48) - 1)) { - this->unk_0B6++; + if (this->animFrame < (Animation_GetFrameCount(&D_SY_6029B48) - 1)) { + this->animFrame++; } - sp4C = Animation_GetFrameData(&D_SY_6029B48, this->unk_0B6, sp68); + sp4C = Animation_GetFrameData(&D_SY_6029B48, this->animFrame, sp68); break; case 4: - this->unk_0B6++; - if (this->unk_0B6 >= (Animation_GetFrameCount(&D_SY_602B778) - 1)) { + this->animFrame++; + if (this->animFrame >= (Animation_GetFrameCount(&D_SY_602B778) - 1)) { this->unk_046 = 0; this->iwork[17] = 0; this->fwork[15] = 0.0f; } - sp4C = Animation_GetFrameData(&D_SY_602B778, this->unk_0B6, sp68); + sp4C = Animation_GetFrameData(&D_SY_602B778, this->animFrame, sp68); break; case 5: case 6: - this->unk_0B6 -= 1; - if (this->unk_0B6 < 8) { + this->animFrame--; + if (this->animFrame < 8) { this->fwork[15] = 0.1f; if (this->unk_046 == 5) { this->iwork[17] = 1; @@ -3599,16 +3599,16 @@ void SectorY_Actor204_Update(Actor204* this) { } this->unk_046 = 0; } - sp4C = Animation_GetFrameData(&D_SY_602B778, this->unk_0B6, sp68); + sp4C = Animation_GetFrameData(&D_SY_602B778, this->animFrame, sp68); break; case 3: - this->unk_0B6++; - if (this->unk_0B6 >= Animation_GetFrameCount(&D_SY_6003348)) { - this->unk_0B6 = Animation_GetFrameCount(&D_SY_6003348) - 1; + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_SY_6003348)) { + this->animFrame = Animation_GetFrameCount(&D_SY_6003348) - 1; } - sp4C = Animation_GetFrameData(&D_SY_6003348, this->unk_0B6, sp68); + sp4C = Animation_GetFrameData(&D_SY_6003348, this->animFrame, sp68); if ((this->timer_0BE % 4U) == 0) { func_effect_8007D2C8(RAND_FLOAT_CENTERED(150.0f) + this->obj.pos.x, @@ -3737,7 +3737,7 @@ void SectorY_Actor204_Update(Actor204* this) { if (this->health <= 0) { this->unk_046 = 3; this->unk_048 = 0; - this->unk_0B6 = 0; + this->animFrame = 0; this->timer_0BE = 50; this->fwork[15] = 0.0f; } @@ -3775,7 +3775,7 @@ bool SectorY_801A4A18(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* if (limbIndex == 17) { rot->x += actor->fwork[28]; rot->y -= actor->fwork[29]; - if (actor->unk_0B4 == 48) { + if (actor->eventType == 48) { *dList = D_SY_6014BD0; } } @@ -3841,25 +3841,25 @@ void SectorY_801A4E44(Scenery* scenery) { sp3C.z = 90.0f - RAND_FLOAT(50.0f); Matrix_MultVec3f(gCalcMatrix, &sp3C, &sp30); func_effect_8007C120(scenery->obj.pos.x + sp30.x, scenery->obj.pos.y + sp30.y, scenery->obj.pos.z + sp30.z, - scenery->unk_58, scenery->unk_5C, scenery->unk_60, 0.2f, 5); + scenery->effectVel.x, scenery->effectVel.y, scenery->effectVel.z, 0.2f, 5); sp3C.x = RAND_FLOAT_CENTERED(100.0f) + -500.0f; sp3C.y = RAND_FLOAT_CENTERED(900.0f); sp3C.z = 80.0f - RAND_FLOAT(50.0f); Matrix_MultVec3f(gCalcMatrix, &sp3C, &sp30); func_effect_8007C120(scenery->obj.pos.x + sp30.x, scenery->obj.pos.y + sp30.y, scenery->obj.pos.z + sp30.z, - scenery->unk_58, scenery->unk_5C, scenery->unk_60, 0.2f, 5); + scenery->effectVel.x, scenery->effectVel.y, scenery->effectVel.z, 0.2f, 5); sp3C.x = RAND_FLOAT_CENTERED(100.0f) + 500.0f; sp3C.y = RAND_FLOAT_CENTERED(900.0f) + -50.0f; sp3C.z = 1900.0f - RAND_FLOAT(50.0f); Matrix_MultVec3f(gCalcMatrix, &sp3C, &sp30); func_effect_8007C120(scenery->obj.pos.x + sp30.x, scenery->obj.pos.y + sp30.y, scenery->obj.pos.z + sp30.z, - scenery->unk_58, scenery->unk_5C, scenery->unk_60, 0.2f, 5); + scenery->effectVel.x, scenery->effectVel.y, scenery->effectVel.z, 0.2f, 5); sp3C.x = RAND_FLOAT_CENTERED(100.0f) + -1000.0f; sp3C.y = RAND_FLOAT_CENTERED(900.0f) + -250.0f; sp3C.z = 1100.0f - RAND_FLOAT(50.0f); Matrix_MultVec3f(gCalcMatrix, &sp3C, &sp30); func_effect_8007C120(scenery->obj.pos.x + sp30.x, scenery->obj.pos.y + sp30.y, scenery->obj.pos.z + sp30.z, - scenery->unk_58, scenery->unk_5C, scenery->unk_60, 0.2f, 5); + scenery->effectVel.x, scenery->effectVel.y, scenery->effectVel.z, 0.2f, 5); } } @@ -3881,12 +3881,12 @@ void SectorY_801A52B8(Scenery* scenery) { sp44.z = RAND_FLOAT_CENTERED(5000.0f) + 500.0f; Matrix_MultVec3f(gCalcMatrix, &sp44, &sp38); func_effect_8007C120(scenery->obj.pos.x + sp38.x, scenery->obj.pos.y + sp38.y, scenery->obj.pos.z + sp38.z, - scenery->unk_58, scenery->unk_5C, scenery->unk_60, 0.3f, 5); + scenery->effectVel.x, scenery->effectVel.y, scenery->effectVel.z, 0.3f, 5); sp44.x = RAND_FLOAT_CENTERED(100.0f) + -600.0f; sp44.y = RAND_FLOAT_CENTERED(250.0f) + 300.0f; sp44.z = RAND_FLOAT_CENTERED(1500.0f) + -1650.0f; Matrix_MultVec3f(gCalcMatrix, &sp44, &sp38); func_effect_8007C120(scenery->obj.pos.x + sp38.x, scenery->obj.pos.y + sp38.y, scenery->obj.pos.z + sp38.z, - scenery->unk_58, scenery->unk_5C, scenery->unk_60, 0.2f, 5); + scenery->effectVel.x, scenery->effectVel.y, scenery->effectVel.z, 0.2f, 5); } } diff --git a/src/overlays/ovl_i6/fox_turret.c b/src/overlays/ovl_i6/fox_turret.c index 0d4833ab..e06c6d4d 100644 --- a/src/overlays/ovl_i6/fox_turret.c +++ b/src/overlays/ovl_i6/fox_turret.c @@ -108,10 +108,10 @@ void Turret_Shoot(Player* player) { gTexturedLines[i].timer = 2; - gTexturedLines[i].red = 255; - gTexturedLines[i].green = 255; - gTexturedLines[i].blue = 255; - gTexturedLines[i].alpha = 255; + gTexturedLines[i].prim.r = 255; + gTexturedLines[i].prim.g = 255; + gTexturedLines[i].prim.b = 255; + gTexturedLines[i].prim.a = 255; gTexturedLines[i].posBB.x = gActors[i].obj.pos.x; gTexturedLines[i].posBB.y = gActors[i].obj.pos.y; diff --git a/src/overlays/ovl_i6/fox_ve2.c b/src/overlays/ovl_i6/fox_ve2.c index 07f5f14a..94661f7b 100644 --- a/src/overlays/ovl_i6/fox_ve2.c +++ b/src/overlays/ovl_i6/fox_ve2.c @@ -69,7 +69,7 @@ void Venom2_UpdateEvents(Actor* this) { team->obj.pos.y = D_i6_801A68B0[i - 1].y + 750.f; team->obj.pos.z = D_i6_801A68B0[i - 1].z; team->obj.rot.z = D_i6_801A68F8[i - 1]; - team->unk_0F4.x = 340.0f; + team->rot_0F4.x = 340.0f; } gFillScreenAlpha = gFillScreenAlphaTarget = 255; diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index e7ee3712..964f8768 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -1207,7 +1207,7 @@ void Map_8019E800(void) { Play_GenerateStarfield(); gStarCount = 0; gNextGameState = GSTATE_MAP; - D_game_80161A34 = 5; + gLastGameState = GSTATE_GAME_OVER; D_ctx_80177868 = 2; gDrawMode = DRAW_NONE; } @@ -1377,7 +1377,7 @@ void Map_8019E99C(void) { Map_801A6694(); - switch (D_game_80161A34) { + switch (gLastGameState) { default: case 0: Map_8019F600(); @@ -1828,7 +1828,7 @@ void Map_8019FF48(void) { switch (D_menu_801CD944) { case 0: Map_801A0954(); - D_ctx_8017842C += 0.09f; + gStarfieldScrollX += 0.09f; break; case 1: @@ -1899,7 +1899,7 @@ void Map_Draw(void) { Map_801AC9A0(i); - if (sPaths[i].unk_14) { + if (sPaths[i].unk_14 != 0) { Map_801AC200(i); } @@ -2017,8 +2017,8 @@ void Map_801A0788(void) { gStarfieldX = SCREEN_WIDTH; gStarfieldY = SCREEN_HEIGHT; - D_ctx_8017842C = 0.0f; - D_ctx_80178430 = 0.0f; + gStarfieldScrollX = 0.0f; + gStarfieldScrollY = 0.0f; } void Map_801A07E8(u8* arg0, u8* arg1, f32* arg2) { @@ -2078,38 +2078,39 @@ void Map_801A0954(void) { break; case 1: - if (D_menu_801CD9C0 != 0) { - break; - } + if ((D_menu_801CD9C0 == 0) && (gFillScreenAlpha == 0)) { + // break; + // } - if (gFillScreenAlpha != 0) { - break; - } + // if (gFillScreenAlpha != 0) { + // break; + // } - if ((s32) D_menu_801CD9E0 == 205) { - Audio_PlayVoiceWithoutBGM(1000); - } - - if (D_menu_801CD9E0 > -355.0f) { - D_menu_801CD9E0 -= D_menu_801CD9EC; - } - - if ((D_menu_801CD9E0 < 200.0f) && (D_menu_801CD9E8 != 255)) { - D_menu_801CD9E8 += 8; - if (D_menu_801CD9E8 > 255) { - D_menu_801CD9E8 = 255; + if ((s32) D_menu_801CD9E0 == 205) { + Audio_PlayVoiceWithoutBGM(1000); } - } - if (D_menu_801CD9E0 < D_menu_801B6934[D_menu_801CD9F0]) { - D_menu_801CD9E4 += 8; - if (D_menu_801CD9E4 > 255) { - D_menu_801CD9E4 = 255; + if (D_menu_801CD9E0 > -355.0f) { + D_menu_801CD9E0 -= D_menu_801CD9EC; } - } - if (D_menu_801CD9E0 <= -355.0f) { - D_menu_801CD948++; + if ((D_menu_801CD9E0 < 200.0f) && (D_menu_801CD9E8 != 255)) { + D_menu_801CD9E8 += 8; + if (D_menu_801CD9E8 > 255) { + D_menu_801CD9E8 = 255; + } + } + + if (D_menu_801CD9E0 < D_menu_801B6934[D_menu_801CD9F0]) { + D_menu_801CD9E4 += 8; + if (D_menu_801CD9E4 > 255) { + D_menu_801CD9E4 = 255; + } + } + + if (D_menu_801CD9E0 <= -355.0f) { + D_menu_801CD948++; + } } break; @@ -2123,11 +2124,10 @@ void Map_801A0954(void) { break; case 3: - if (D_menu_801CD9C0 != 0) { - break; + if (D_menu_801CD9C0 == 0) { + D_menu_801CD948 = 0; + D_menu_801CD944 = 1; } - D_menu_801CD948 = 0; - D_menu_801CD944 = 1; break; } @@ -2572,7 +2572,7 @@ bool Map_801A2304(void) { if (D_menu_801CEA78 > 5.5f) { D_menu_801CEA78 = 5.5f; D_menu_801CEA80 = 4.6f; - D_menu_801CD94C += 1; + D_menu_801CD94C++; D_menu_801CD9B8 = 13; } break; @@ -3098,7 +3098,7 @@ void Map_801A36A8(void) { case 20: if (D_menu_801CD9C0 != 0) { - break; + break; // investigate } D_menu_801CD94C = 0; D_menu_801CD9C0 = 0; @@ -3109,10 +3109,10 @@ void Map_801A36A8(void) { if (D_menu_801CF120) { D_menu_801CDA1C += 0.03f; } - if (D_menu_801CD9C0) { - break; + if (D_menu_801CD9C0 == 0) { + Map_801A3A00(); } - Map_801A3A00(); + break; case 2: @@ -3207,17 +3207,16 @@ void Map_801A3A00(void) { break; case 11: - if (D_menu_801CD9C0) { - break; - } + if (D_menu_801CD9C0 == 0) { - if (D_menu_801CD9BC) { - for (i = 0; i < 8; i++) { - Math_SmoothStepToF(&D_menu_801CF088[i], 360.0f, 0.3f, 100.0f, 1.0f); - Math_SmoothStepToF(&D_menu_801CF0A8[i], 360.0f, 0.3f, 100.0f, 1.0f); + if (D_menu_801CD9BC) { + for (i = 0; i < 8; i++) { + Math_SmoothStepToF(&D_menu_801CF088[i], 360.0f, 0.3f, 100.0f, 1.0f); + Math_SmoothStepToF(&D_menu_801CF0A8[i], 360.0f, 0.3f, 100.0f, 1.0f); + } + } else { + D_menu_801CD94C = 10; } - } else { - D_menu_801CD94C = 10; } break; @@ -3241,7 +3240,7 @@ void Map_801A3A00(void) { break; case 2: - if (D_menu_801CF0D8[0]) { + if (D_menu_801CF0D8[0] != 0) { D_menu_801CF0D8[0]--; } else { D_menu_801CEFCC++; @@ -3587,10 +3586,7 @@ void Map_801A4D7C(void) { Audio_PlayMapMenuSfx(0); D_menu_801CEFC4 = 0; D_menu_801CD944 = 3; - return; - } - - if (gControllerPress[gMainController].button & A_BUTTON) { + } else if (gControllerPress[gMainController].button & A_BUTTON) { Audio_PlayMapMenuSfx(0); AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); D_menu_801CF000[D_menu_801CEFDC] = 10; @@ -3619,7 +3615,7 @@ void Map_801A4FC4(void) { gPlayerNum = 0; - for (i = 0; i < 6; i++) { + for (i = 0; i < TEAM_ID_MAX; i++) { gSavedTeamShields[i] = D_ctx_80177C58[i]; gTeamShields[i] = D_ctx_80177C58[i]; gPrevPlanetTeamShields[i] = D_ctx_80177C58[i]; @@ -3826,7 +3822,7 @@ void Map_801A5834(void) { var_t0 = 0; } - if (gLifeCount[gPlayerNum]) { + if (gLifeCount[gPlayerNum] != 0) { texture = D_MAP_6001080; } else { texture = D_MAP_6000000; @@ -3844,7 +3840,7 @@ void Map_801A5834(void) { D_menu_801CF000[colorIndex]--; } - if (gGameFrameCount & mask) { + if (gGameFrameCount & mask) { // can't be != 0? RCP_SetupDL(&gMasterDisp, 0x53); gDPSetPrimColor(gMasterDisp++, 0, 0, r[colorIndex], g[colorIndex], b[colorIndex], 255); TextureRect_8bIA(&gMasterDisp, D_MAP_6000840, 96, 22, x + 11.0f, y + 3.0f, 1.0f, 1.0f); @@ -3859,7 +3855,7 @@ void Map_801A5834(void) { D_menu_801CF000[colorIndex]--; } - if (gGameFrameCount & mask) { + if (gGameFrameCount & mask) { // can't be != 0? gDPSetPrimColor(gMasterDisp++, 0, 0, r[colorIndex], g[colorIndex], b[colorIndex], 255); TextureRect_8bIA(&gMasterDisp, D_MAP_60018C0, 96, 10, x + 10.0f, y + z + 8.0f, 1.0f, 1.0f); } @@ -3873,7 +3869,7 @@ void Map_801A5834(void) { D_menu_801CF000[colorIndex]--; } - if (gGameFrameCount & mask) { + if ((gGameFrameCount & mask) != 0) { gDPSetPrimColor(gMasterDisp++, 0, 0, r[colorIndex], g[colorIndex], b[colorIndex], 255); TextureRect_8bIA(&gMasterDisp, texture, 96, 22, x + 9.0f, y + z + 5.0f, 1.0f, 1.0f); } @@ -4388,7 +4384,7 @@ void Map_801A6A98(PlanetId planetId) { Map_801A7D3C(planetId); Matrix_Push(&gGfxMatrix); - if (gGameFrameCount & mask) { + if ((gGameFrameCount & mask) != 0) { if (planetId == PLANET_TITANIA) { Map_801A791C(planetId); } @@ -5190,7 +5186,7 @@ void Map_801A9224(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sPlanets[PLANET_METEO].alpha); } - if (gGameFrameCount & mask) { + if ((gGameFrameCount & mask) != 0) { for (i = 0; i < 42; i++) { Matrix_Push(&gGfxMatrix); @@ -5246,7 +5242,7 @@ void Map_801A9448(void) { dest.y = 0.0f; dest.z = 0.0f; - if (gGameFrameCount & mask) { + if ((gGameFrameCount & mask) != 0) { for (i = 0; i < 4; i++) { Matrix_Push(&gGfxMatrix); @@ -5295,7 +5291,7 @@ void Map_801A9814(void) { D_menu_801CDA08, D_menu_801CDA20, D_menu_801CDA24, D_menu_801CDA28, MTXF_APPLY); Matrix_Translate(gGfxMatrix, D_menu_801CEA58, D_menu_801CEA5C, D_menu_801CEA60, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - func_fade_80084688(2, D_menu_801B8284); + Wipe_Draw(WIPE_VERTICAL, D_menu_801B8284); Matrix_Pop(&gGfxMatrix); } } @@ -5436,11 +5432,11 @@ void Map_801A9DE8(void) { D_menu_801CF00C--; } - if (gGameFrameCount & mask) { + if ((gGameFrameCount & mask) != 0) { Map_801AD7EC(254, 16, gLifeCount[gPlayerNum]); } - if ((D_game_80161A34 == 7) || (D_game_80161A34 == 5)) { + if ((gLastGameState == GSTATE_PLAY) || (gLastGameState == GSTATE_GAME_OVER)) { if (D_menu_801CD83C < gTotalHits) { D_menu_801CD83C = gTotalHits; } @@ -5470,21 +5466,21 @@ void Map_801A9FD4(s32 arg0) { if (arg0) { var_s3 = gMissionNumber; } else { - if ((D_game_80161A34 == 7) || (D_game_80161A34 == 8)) { + if ((gLastGameState == GSTATE_PLAY) || (gLastGameState == GSTATE_ENDING)) { var_s3 = gMissionNumber; } - if (D_game_80161A34 == 5) { + if (gLastGameState == GSTATE_GAME_OVER) { var_s3 = D_menu_801CD9AC; } } Map_801AA1CC(var_s3); - if ((D_game_80161A34 == 7) || (D_game_80161A34 == 8)) { + if ((gLastGameState == GSTATE_PLAY) || (gLastGameState == GSTATE_ENDING)) { var_s3 = 7; } - if (D_game_80161A34 == 5) { + if (gLastGameState == GSTATE_GAME_OVER) { var_s3++; } @@ -5572,10 +5568,10 @@ void Map_801AA434(s32 arg0, f32 x, f32 y, s32 idx) { Graphics_DisplaySmallNumber(x + 15.0f - ((func_hud_8008BCBC(gMissionHitCount[arg0]) - 1) * 8), y + 24.0f + 1.0f, gMissionHitCount[arg0]); - if (D_game_80161A34 == 7) { + if (gLastGameState == GSTATE_PLAY) { temp = gMissionNumber; } - if ((D_game_80161A34 == 5) || (D_game_80161A34 == 8)) { + if ((gLastGameState == GSTATE_GAME_OVER) || (gLastGameState == GSTATE_ENDING)) { temp = gMissionNumber + 1; } @@ -5603,7 +5599,7 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { switch (planetId) { case PLANET_SOLAR: - if (gGameFrameCount & mask) { + if ((gGameFrameCount & mask) != 0) { RCP_SetupDL(&gMasterDisp, 0x43); gDPSetPrimColor(gMasterDisp++, 0, 0, 240, 0, 0, 255); @@ -5630,7 +5626,7 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { break; case PLANET_METEO: - if (gGameFrameCount & mask) { + if ((gGameFrameCount & mask) != 0) { RCP_SetupDL(&gMasterDisp, 0x3E); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); @@ -5657,7 +5653,7 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { case PLANET_SECTOR_X: case PLANET_SECTOR_Y: case PLANET_SECTOR_Z: - if (gGameFrameCount & mask) { + if ((gGameFrameCount & mask) != 0) { RCP_SetupDL(&gMasterDisp, 0x3E); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 144); @@ -5677,7 +5673,7 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { break; case PLANET_BOLSE: - if (gGameFrameCount & mask) { + if ((gGameFrameCount & mask) != 0) { RCP_SetupDL(&gMasterDisp, 0x17); Lights_SetOneLight(&gMasterDisp, 0, 0, 100, 50, 50, 40, 100, 100, 100); @@ -5699,7 +5695,7 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { break; case PLANET_AREA_6: - if (gGameFrameCount & mask) { + if ((gGameFrameCount & mask) != 0) { RCP_SetupDL(&gMasterDisp, 0x17); Lights_SetOneLight(&gMasterDisp, 0, 0, 100, 50, 50, 40, 100, 100, 100); @@ -5721,7 +5717,7 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { break; default: - if (gGameFrameCount & mask) { + if ((gGameFrameCount & mask) != 0) { RCP_SetupDL(&gMasterDisp, 0x3E); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); @@ -5991,7 +5987,7 @@ void Map_801AB978(s32 arg0) { case 0: RCP_SetupDL(&gMasterDisp, 0x53); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); - if (gGameFrameCount & 0x10) { + if ((gGameFrameCount & 0x10) != 0) { Graphics_DisplaySmallText(D_menu_801B6B0C[i], 131 + 28, 1.0f, 1.0f, "OK !"); } sp90[i] = D_menu_801CEA74; @@ -6142,16 +6138,16 @@ void Map_801AC200(s32 index) { break; case 10: - if (D_menu_801CD9BC) { - break; + if (D_menu_801CD9BC != 0) { + break; // investigate } D_menu_801CD9BC = 5; D_menu_801CEEA4 = 20; break; case 20: - if (D_menu_801CD9BC) { - break; + if (D_menu_801CD9BC != 0) { + break; // investigate } D_menu_801CEEA0++; @@ -6365,7 +6361,7 @@ void Map_801AC9A0(s32 index) { case 11: Math_SmoothStepToF(&gTexturedLines[index].zScale, target, 0.1f, 100.0f, 4.0f); - gTexturedLines[index].alpha = 255; + gTexturedLines[index].prim.a = 255; if (gTexturedLines[index].zScale == target) { Audio_KillSfxById(NA_SE_MAP_LINE_DRAW); gPlanetPathStatus[index] = 4; @@ -6388,7 +6384,7 @@ void Map_801AC9A0(s32 index) { temp = 0.25f; } Math_SmoothStepToF(&gTexturedLines[index].zScale, target, temp, 100.0f, 4.0f); - gTexturedLines[index].alpha = 255; + gTexturedLines[index].prim.a = 255; if (gTexturedLines[index].zScale == target) { gPlanetPathStatus[index] = 3; } @@ -6397,44 +6393,44 @@ void Map_801AC9A0(s32 index) { case 3: case 4: gTexturedLines[index].zScale = target; - gTexturedLines[index].alpha = sPaths[index].alpha; + gTexturedLines[index].prim.a = sPaths[index].alpha; break; } if ((gPlanetPathStatus[index] == 1) || (gPlanetPathStatus[index] == 11) || (gPlanetPathStatus[index] == 4)) { - gTexturedLines[index].red = 32; - gTexturedLines[index].green = 32; - gTexturedLines[index].blue = 32; + gTexturedLines[index].prim.r = 32; + gTexturedLines[index].prim.g = 32; + gTexturedLines[index].prim.b = 32; gTexturedLines[index].xyScale = 4.0f; } else { switch (sPaths[index].type) { case PL_PATH_BLU: - gTexturedLines[index].red = 16; - gTexturedLines[index].green = 64; - gTexturedLines[index].blue = 255; + gTexturedLines[index].prim.r = 16; + gTexturedLines[index].prim.g = 64; + gTexturedLines[index].prim.b = 255; gTexturedLines[index].xyScale = 8.0f; break; case PL_PATH_YLW: - gTexturedLines[index].red = 255; - gTexturedLines[index].green = 175; - gTexturedLines[index].blue = 0; + gTexturedLines[index].prim.r = 255; + gTexturedLines[index].prim.g = 175; + gTexturedLines[index].prim.b = 0; gTexturedLines[index].xyScale = 8.0f; break; case PL_PATH_RED: - gTexturedLines[index].red = 255; - gTexturedLines[index].green = 0; - gTexturedLines[index].blue = 0; + gTexturedLines[index].prim.r = 255; + gTexturedLines[index].prim.g = 0; + gTexturedLines[index].prim.b = 0; gTexturedLines[index].xyScale = 8.0f; break; case PL_WARP_YLW: case PL_WARP_RED: - gTexturedLines[index].red = 0; - gTexturedLines[index].green = 0; - gTexturedLines[index].blue = 0; - gTexturedLines[index].alpha = 0; + gTexturedLines[index].prim.r = 0; + gTexturedLines[index].prim.g = 0; + gTexturedLines[index].prim.b = 0; + gTexturedLines[index].prim.a = 0; gTexturedLines[index].xyScale = 0.1f; break; } @@ -6562,7 +6558,7 @@ void Map_801AD11C(void) { var_t0 = 0; if (gControllerPress[gMainController].button & A_BUTTON) { - if ((D_game_80161A34 == 7) && (sPrevMissionStatus != MISSION_COMPLETE) && (!D_menu_801CEFD0)) { + if ((gLastGameState == GSTATE_PLAY) && (sPrevMissionStatus != MISSION_COMPLETE) && !D_menu_801CEFD0) { Audio_PlayMapMenuSfx(1); D_menu_801CEFC4 = 1; D_menu_801CEFD4 = 0; @@ -6579,7 +6575,7 @@ void Map_801AD11C(void) { } if (gControllerPress[gMainController].button & START_BUTTON) { - if (D_menu_801CD944 == 3 && D_game_80161A34 == 7) { + if ((D_menu_801CD944 == 3) && (gLastGameState == GSTATE_PLAY)) { if (D_menu_801CEFD0) { AUDIO_PLAY_SFX(NA_SE_ERROR, gDefaultSfxSource, 4); } else { diff --git a/src/overlays/ovl_menu/fox_option.c b/src/overlays/ovl_menu/fox_option.c index f18b26d6..ea79f4fd 100644 --- a/src/overlays/ovl_menu/fox_option.c +++ b/src/overlays/ovl_menu/fox_option.c @@ -416,8 +416,8 @@ void Option_Setup(void) { gBgColor = 0; D_menu_801B91A4 = 0; - if ((D_game_80161A34 == 7) && (gCurrentLevel == LEVEL_TRAINING)) { - D_game_80161A34 = 0; + if ((gLastGameState == GSTATE_PLAY) && (gCurrentLevel == LEVEL_TRAINING)) { + gLastGameState = GSTATE_NONE; D_menu_801B91A4 = 1; } @@ -434,8 +434,8 @@ void Option_Setup(void) { D_menu_801B9124 = OPTION_MAIN_MENU; - if ((D_game_80161A34 == 5) || (D_game_80161A34 == 8)) { - if (D_game_80161A34 == 8) { + if ((gLastGameState == GSTATE_GAME_OVER) || (gLastGameState == GSTATE_ENDING)) { + if (gLastGameState == GSTATE_ENDING) { gMissionPlanet[gMissionNumber] = PLANET_VENOM; if (gLeveLClearStatus[LEVEL_VENOM_ANDROSS] == 1) { gSaveFile.save.data.planet[SAVE_SLOT_VENOM_1].played = 1; @@ -468,7 +468,7 @@ void Option_Setup(void) { D_menu_801B9124 = 300; } } else { - if (D_game_800D2870 != 0) { + if (D_game_800D2870) { D_menu_801B91A4 = 2; D_menu_801B91A8 = gVsMatchType; for (i = 0; i < OPTION_COUNT; i++) { @@ -690,7 +690,7 @@ void Option_DrawEntry(void) { if (D_menu_801B8280 != 0) { Option_8019BDF0(); - func_fade_80084688(2, D_menu_801B8284); + Wipe_Draw(WIPE_VERTICAL, D_menu_801B8284); Matrix_Pop(&gGfxMatrix); } } @@ -819,7 +819,7 @@ void Option_TrainingUpdate(void) { void Option_801929F0(void) { s32 i; - D_game_800D2870 = 0; + D_game_800D2870 = false; gBlurAlpha = 255; gControllerLock = 0; gStarCount = 800; @@ -1539,8 +1539,8 @@ void Option_801952B4(void) { break; case 1: - if (D_menu_801B9178) { - break; + if (D_menu_801B9178 != 0) { + break; // investigate } for (i = 2; i < 4; i++) { @@ -1554,8 +1554,8 @@ void Option_801952B4(void) { break; case 2: - if (D_menu_801B9178) { - break; + if (D_menu_801B9178 != 0) { + break; // investigate } for (i = 2; i < 4; i++) { @@ -1575,8 +1575,8 @@ void Option_801952B4(void) { switch (D_menu_801B9158) { case 0: - if (D_menu_801B917C) { - break; + if (D_menu_801B917C != 0) { + break; // investigate } for (i = 0; i < 4; i++) { @@ -1591,8 +1591,8 @@ void Option_801952B4(void) { break; case 1: - if (D_menu_801B917C) { - break; + if (D_menu_801B917C != 0) { + break; // investigate } for (i = 0; i < 4; i++) { @@ -1607,13 +1607,13 @@ void Option_801952B4(void) { break; case 2: - if (D_menu_801B917C) { + if (D_menu_801B917C != 0) { break; } D_menu_801B917C = RAND_INT(30.0f); D_menu_801B9158 = 0; - break; + break; // investigate } } else { @@ -1990,20 +1990,20 @@ void Option_DataDraw(void) { sp74[0] = sp74[1] = 0xFFFFFFFF; for (i = 0; i < 2; i++) { - if (D_menu_801B9330[i]) { + if (D_menu_801B9330[i] != 0) { sp74[i] = 1; sp7C[i] = 255; D_menu_801B9330[i]--; } } - if (gGameFrameCount & sp74[1]) { + if ((gGameFrameCount & sp74[1]) != 0) { sp7C[1] = D_menu_801AED20[1]; gDPSetPrimColor(gMasterDisp++, 0, 0, 255, sp7C[1], sp7C[1], 255); TextureRect_8bIA(&gMasterDisp, D_OPT_8009980, 32, 12, D_menu_801AF094[1], D_menu_801AF0AC[1], 1.0f, 1.0f); } - if (gGameFrameCount & sp74[0]) { + if ((gGameFrameCount & sp74[0]) != 0) { sp7C[0] = D_menu_801AED20[0]; gDPSetPrimColor(gMasterDisp++, 0, 0, 255, sp7C[0], sp7C[0], 255); TextureRect_8bIA(&gMasterDisp, D_OPT_8009B00, 40, 12, D_menu_801AF094[2], D_menu_801AF0AC[2], 1.0f, 1.0f); @@ -2655,7 +2655,7 @@ void Option_VersusMenuInit(void) { D_menu_801B9340 = 2; - D_game_80161A28 = 0; + gVsMenuSelection = 0; gStarCount = 0; D_menu_801B93C4 = 0; @@ -2834,7 +2834,7 @@ void Option_80199820(s32 arg0) { D_menu_801B9348[arg0]--; } - if (gGameFrameCount & var_v0) { + if ((gGameFrameCount & var_v0) != 0) { colorGB = D_menu_801B9358[arg0]; gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); @@ -2902,7 +2902,7 @@ void Option_VersusStageInit(void) { D_menu_801B933C = 0; D_menu_801B91E8 = 255.0f; D_menu_801B93D4 = gVsPointsToWin - 1; - D_menu_801B93D8 = D_game_80161A28; + D_menu_801B93D8 = gVsMenuSelection; D_menu_801B93DC = D_menu_801B9340; gVsTimeTrialLimit = D_menu_801B93DC; // clang-format off @@ -3052,8 +3052,8 @@ void Option_8019A2E0(void) { void Option_8019A4DC(void) { s32 i; - if (D_menu_801B937C) { - return; + if (D_menu_801B937C != 0) { + return; // investigate } if (D_menu_801B91F0) { @@ -3063,7 +3063,7 @@ void Option_8019A4DC(void) { } for (i = 0; i < 4; i++) { - if (gControllerPlugged[i] == 0) { + if (!gControllerPlugged[i]) { continue; } @@ -3093,8 +3093,8 @@ void Option_8019A4DC(void) { void Option_8019A6DC(void) { s32 i; - if (D_menu_801B9374) { - return; + if (D_menu_801B9374 != 0) { + return; // investigate } if (D_menu_801B91F0) { @@ -3110,12 +3110,12 @@ void Option_8019A6DC(void) { } if (Option_8019C418(&D_menu_801B93D8, 1, 0, 1, 20, 2, 4, i, &D_menu_801B9380[i])) { AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); - D_game_80161A28 = D_menu_801B93D8; + gVsMenuSelection = D_menu_801B93D8; } if (gControllerPress[i].button & A_BUTTON) { AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); - if (D_game_80161A28 == 0) { + if (gVsMenuSelection == 0) { gVersusStage = VS_STAGE_CORNERIA; if (D_menu_801B93D0 == 30) { gVersusStage = VS_STAGE_KATINA; @@ -3148,8 +3148,8 @@ void Option_8019A6DC(void) { void Option_8019A954(void) { s32 i; - if (D_menu_801B91EC) { - return; + if (D_menu_801B91EC != 0) { + return; // investigate } if (D_menu_801B91F0) { @@ -3234,7 +3234,7 @@ void Option_8019AB30(void) { } } - if (gGameFrameCount & var_v0) { + if ((gGameFrameCount & var_v0) != 0) { RCP_SetupDL(&gMasterDisp, 0x53); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); @@ -3284,12 +3284,12 @@ void Option_8019AD84(void) { colorGB = 255; var_v0 = 1; D_menu_801B937C--; - if (!D_menu_801B937C) { + if (D_menu_801B937C == 0) { D_menu_801B91F0 = 1; } } - if (gGameFrameCount & var_v0) { + if ((gGameFrameCount & var_v0) != 0) { RCP_SetupDL(&gMasterDisp, 0x53); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); @@ -3332,12 +3332,12 @@ void Option_8019AFFC(void) { var_v0 = 1; colorGB = 255; D_menu_801B9374--; - if (!D_menu_801B9374) { + if (D_menu_801B9374 == 0) { D_menu_801B91F0 = 1; } } - if (gGameFrameCount & var_v0) { + if ((gGameFrameCount & var_v0) != 0) { RCP_SetupDL(&gMasterDisp, 0x53); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); @@ -3366,7 +3366,7 @@ void Option_8019B1F8(void) { static u16* D_menu_801AF2CC[] = { D_VS_MENU_7006EA0, D_VS_MENU_7006630 }; for (xPos = D_menu_801AF2A8, i = 0; i < 2; i++, xPos += D_menu_801AF2B0) { - if (i == D_game_80161A28) { + if (i == gVsMenuSelection) { sp8C[i] = 255; } else { sp8C[i] = 32; @@ -3412,7 +3412,7 @@ void Option_8019B3DC(void) { }; for (xPos = D_menu_801AF2D4, i = 0; i < 2; i++, xPos += D_menu_801AF2DC) { - if (i == D_game_80161A28) { + if (i == gVsMenuSelection) { sp8C[i] = 255; } else { sp8C[i] = 32; @@ -3444,7 +3444,7 @@ void Option_8019B5AC(void) { colorGB = D_menu_801B91E8; var_v0 = 0xFFFFFFFF; - if (D_menu_801B91EC) { + if (D_menu_801B91EC != 0) { colorGB = 255; var_v0 = 1; D_menu_801B91EC--; @@ -3453,7 +3453,7 @@ void Option_8019B5AC(void) { } } - if (gGameFrameCount & var_v0) { + if ((gGameFrameCount & var_v0) != 0) { RCP_SetupDL(&gMasterDisp, 0x53); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); TextureRect_8bIA(&gMasterDisp, D_VS_MENU_7003650, 40, 12, 143.0f, 210.0f, 1.0f, 1.0f); @@ -4082,7 +4082,7 @@ void Option_8019D118(void) { RCP_SetupDL(&gMasterDisp, 0x4C); - if (D_game_80161A34 == 8) { + if (gLastGameState == GSTATE_ENDING) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); Graphics_DisplayLargeText(D_menu_801AF30C[0], D_menu_801AF324[0], 1.0f, 1.0f, "CONGRATULATIONS"); } @@ -4096,7 +4096,7 @@ void Option_8019D118(void) { Graphics_DisplaySmallText(D_menu_801AF30C[2], D_menu_801AF324[2], 1.0f, 1.0f, "TOTAL HITS"); (void) "p:%d x:%f y:%f\n"; if (D_menu_801B9138 == 1) { - if (gGameFrameCount & 0x10) { + if ((gGameFrameCount & 0x10) != 0) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); TextureRect_8bIA(&gMasterDisp, aTextEnd, 32, 8, D_menu_801AF30C[5], D_menu_801AF324[5], 1.0f, 1.0f); } @@ -4124,7 +4124,7 @@ void Option_8019D118(void) { mask[i] = 0xFFFFFFFF; - if (D_menu_801B9140[i]) { + if (D_menu_801B9140[i] != 0) { mask[i] = 0x1; D_menu_801B9100[i] = 0.0f; } @@ -4363,12 +4363,12 @@ void Option_8019DE74(void) { gDrawMode = DRAW_NONE; D_menu_801B912C = 0; - if (D_game_80161A34 == 5) { + if (gLastGameState == GSTATE_GAME_OVER) { gStarCount = 0; gGameState = GSTATE_INIT; gLifeCount[0] = 2; gTotalHits = 0; - } else if (D_game_80161A34 == 8) { + } else if (gLastGameState == GSTATE_ENDING) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); D_menu_801B9124 = 400; diff --git a/src/overlays/ovl_menu/fox_title.c b/src/overlays/ovl_menu/fox_title.c index e1fbfdca..4063d6ca 100644 --- a/src/overlays/ovl_menu/fox_title.c +++ b/src/overlays/ovl_menu/fox_title.c @@ -168,8 +168,8 @@ void Title_Init(void) { gTitleState = 2; - D_game_80161A34 = 0; - D_game_800D2870 = 0; + gLastGameState = GSTATE_NONE; + D_game_800D2870 = false; gMainController = Title_80187ABC(); @@ -239,11 +239,11 @@ void Title_Main(void) { void Title_UpdateEntry(void) { if (D_menu_801B82A8 > 0) { - D_menu_801B82A8 -= 1; + D_menu_801B82A8--; } if (D_menu_801B82AC > 0) { - D_menu_801B82AC -= 1; + D_menu_801B82AC--; } switch (D_menu_801B82C4) { @@ -338,7 +338,7 @@ void Title_Draw(void) { gFillScreenRed = 0; gFillScreenGreen = 0; gFillScreenBlue = 0; - func_fade_80084688(2, D_menu_801B8284); + Wipe_Draw(WIPE_VERTICAL, D_menu_801B8284); } } @@ -369,7 +369,7 @@ void Title_80187B00(void) { case 1: if (D_menu_801B82BC != 0) { Camera_SetStarfieldPos(gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ); - D_ctx_8017842C -= 1.0f; + gStarfieldScrollX -= 1.0f; if (D_menu_801B82BC == 60) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 60); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 60); @@ -793,7 +793,7 @@ void Title_801888E8(void) { } if (D_menu_801B82B0 == 0) { - if (gGameFrameCount & 0x80) { + if ((gGameFrameCount & 0x80) != 0) { if (D_menu_801B8350[1].unk_20 + D_menu_801B8350[1].unk_24 < -20.0f) { D_menu_801B8350[1].unk_24 = 4.0f; } @@ -842,10 +842,10 @@ void Title_801888E8(void) { D_menu_801B86AC, D_menu_801B86B0); Camera_SetStarfieldPos(gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ); - D_ctx_8017842C -= 0.5f; + gStarfieldScrollX -= 0.5f; if (D_menu_801B82B0 > 0) { - D_menu_801B82B0 -= 1; + D_menu_801B82B0--; } if (D_menu_801B9040 == 1) { @@ -853,7 +853,7 @@ void Title_801888E8(void) { } if (D_menu_801B82BC != 0) { - D_menu_801B82BC -= 1; + D_menu_801B82BC--; return; } @@ -1195,7 +1195,7 @@ void Title_8018994C(void) { Camera_SetStarfieldPos(gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ); } - D_ctx_8017842C -= D_menu_801B7BE8; + gStarfieldScrollX -= D_menu_801B7BE8; D_menu_801B82B8++; } @@ -1531,8 +1531,8 @@ void Title_8018ACEC(void) { Title_80191674(D_menu_801B86C8, D_menu_801B86CC, 100.0f, &D_menu_801B82E0, &D_menu_801B82E4, &D_menu_801B82E8); Camera_SetStarfieldPos(gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ); - D_ctx_8017842C += 2.0f; - D_ctx_80178430 += 2.0f; + gStarfieldScrollX += 2.0f; + gStarfieldScrollY += 2.0f; } void Title_8018B038(void) { diff --git a/src/sys/sys_fault.c b/src/sys/sys_fault.c index 11745831..56bdc7ed 100644 --- a/src/sys/sys_fault.c +++ b/src/sys/sys_fault.c @@ -50,79 +50,79 @@ const char* sFloatExceptions[6] = { "Unimplemented operation", "Invalid operation", "Division by zero", "Overflow", "Underflow", "Inexact operation", }; -void func_800073C0(s32 arg0, s32 arg1, s32 arg2, s32 arg3) { - u16* var_v0; +void Fault_FillRectange(s32 xPos, s32 yPos, s32 width, s32 height) { + u16* pixel; s32 i; s32 j; - var_v0 = gFaultMgr.width * arg1 + gFaultMgr.fb->data + arg0; - for (i = 0; i < arg3; i++) { - for (j = 0; j < arg2; j++, var_v0++) { - *var_v0 = ((*var_v0 & 0xE738) >> 2) | 1; + pixel = gFaultMgr.width * yPos + gFaultMgr.fb->data + xPos; + for (i = 0; i < height; i++) { + for (j = 0; j < width; j++, pixel++) { + *pixel = ((*pixel & 0xE738) >> 2) | 1; } - var_v0 += gFaultMgr.width - arg2; + pixel += gFaultMgr.width - width; } } -void func_800074AC(s32 arg0, s32 arg1, s32 arg2) { - s32* var_v0; - u16* var_v1; +void Fault_DisplayChar(s32 xPos, s32 yPos, s32 index) { + s32* charPixelFlags; + u16* pixel; s32 i; s32 j; - var_v0 = &sFaultCharPixelFlags[(arg2 / 5) * 7]; - var_v1 = gFaultMgr.width * arg1 + gFaultMgr.fb->data + arg0; + charPixelFlags = &sFaultCharPixelFlags[(index / 5) * 7]; + pixel = gFaultMgr.width * yPos + gFaultMgr.fb->data + xPos; for (i = 0; i < 7; i++) { - u32 temp_t1 = 0x80000000 >> ((arg2 % 5) * 6); - u32 temp_a3 = *var_v0++; + u32 bufferPixelFlag = 0x80000000 >> ((index % 5) * 6); + u32 charPixelFlag = *charPixelFlags++; for (j = 0; j < 6; j++) { - if (temp_t1 & temp_a3) { - *var_v1 = -1; + if (bufferPixelFlag & charPixelFlag) { + *pixel = 0xFFFF; } else { - *var_v1 = 1; + *pixel = 0x0001; } - var_v1++; - temp_t1 >>= 1; + pixel++; + bufferPixelFlag >>= 1; } - var_v1 += gFaultMgr.width - 6; + pixel += gFaultMgr.width - 6; } } -char* func_80007604(char* arg0, const char* arg1, size_t arg2) { - return (char*) memcpy(arg0, arg1, arg2) + arg2; +char* Fault_PrOut(char* buffer, const char* fmt, size_t size) { + return (char*) memcpy(buffer, fmt, size) + size; } -void func_8000762C(s32 arg0, s32 arg1, const char* fmt, ...) { - u8* var_s0; +void Fault_Printf(s32 xPos, s32 yPos, const char* fmt, ...) { + u8* charPtr; s32 i; - u8 sp40[0x100]; - s32 temp_a2; + u8 buffer[0x100]; + s32 charIndex; va_list args; va_start(args, fmt); for (i = 0; i < 0x100; i++) { - sp40[i] = 0; + buffer[i] = 0; } - if (_Printf(func_80007604, sp40, fmt, args) <= 0) { + if (_Printf(Fault_PrOut, buffer, fmt, args) <= 0) { return; } - for (var_s0 = sp40; *var_s0 != 0; var_s0++) { - temp_a2 = sFaultCharIndex[*var_s0 & 0x7F]; + for (charPtr = buffer; *charPtr != 0; charPtr++) { + charIndex = sFaultCharIndex[*charPtr & 0x7F]; - if (temp_a2 != 0xFF) { - func_800074AC(arg0, arg1, temp_a2); + if (charIndex != 0xFF) { + Fault_DisplayChar(xPos, yPos, charIndex); } - arg0 += 6; + xPos += 6; label:; // fake, probably } va_end(args); } -void func_8000770C(s32 time) { - u64 time64 = MSEC_TO_CYCLES(time); +void Fault_Wait(s32 msec) { + u64 time64 = MSEC_TO_CYCLES(msec); osSetTime(0); while (osGetTime() < time64) { @@ -130,25 +130,25 @@ void func_8000770C(s32 time) { } } -void func_800077F8(s32 arg0, s32 arg1, s32 arg2, f32* arg3) { - u32 temp_v0 = *(u32*) arg3; - s32 temp_v1 = ((temp_v0 & 0x7F800000) >> 0x17) - 0x7F; +void Fault_DisplayFloatReg(s32 xPos, s32 yPos, s32 regNum, f32* regValue) { + u32 regAsInt = *(u32*) regValue; + s32 regExp = ((regAsInt & 0x7F800000) >> 0x17) - 0x7F; - if (((-0x7F < temp_v1) && (temp_v1 < 0x80)) || (temp_v0 == 0)) { - func_8000762C(arg0, arg1, "F%02d:%.3e", arg2, *arg3); + if (((-0x7F < regExp) && (regExp < 0x80)) || (regAsInt == 0)) { + Fault_Printf(xPos, yPos, "F%02d:%.3e", regNum, *regValue); } else { - func_8000762C(arg0, arg1, "F%02d:---------", arg2); + Fault_Printf(xPos, yPos, "F%02d:---------", regNum); } } -void func_80007880(u32 arg0) { - s32 var_v0; - u32 var_v1 = 0x20000; +void Fault_DisplayFloatException(u32 exceptFlags) { + s32 i; + u32 flag = 0x20000; - func_8000762C(0x1E, 0xA0, "FPCSR:%08XH", arg0); - for (var_v0 = 0; var_v0 < 6; var_v0++, var_v1 >>= 1) { - if (arg0 & var_v1) { - func_8000762C(0x84, 0xA0, "(%s)", sFloatExceptions[var_v0]); + Fault_Printf(30, 160, "FPCSR:%08XH", exceptFlags); + for (i = 0; i < 6; i++, flag >>= 1) { + if (exceptFlags & flag) { + Fault_Printf(132, 160, "(%s)", sFloatExceptions[i]); return; } } @@ -156,49 +156,49 @@ void func_80007880(u32 arg0) { #define CAUSE_INDEX(cause) ((cause >> CAUSE_EXCSHIFT) & (CAUSE_EXCMASK >> CAUSE_EXCSHIFT)) -void func_80007910(OSThread* thread) { +void Fault_DisplayDebugInfo(OSThread* thread) { __OSThreadContext* context = &thread->context; - s16 var_s0 = CAUSE_INDEX(context->cause); + s16 causeIndex = CAUSE_INDEX(context->cause); - if (var_s0 == CAUSE_INDEX(EXC_WATCH)) { - var_s0 = 16; + if (causeIndex == CAUSE_INDEX(EXC_WATCH)) { + causeIndex = 16; } - if (var_s0 == CAUSE_INDEX(EXC_VCED)) { - var_s0 = 17; + if (causeIndex == CAUSE_INDEX(EXC_VCED)) { + causeIndex = 17; } - func_8000770C(3000); - func_800073C0(15, 15, 290, 210); - func_8000762C(30, 40, "THREAD:%d (%s)", thread->id, sFaultCauses[var_s0]); - func_8000762C(30, 50, "PC:%08XH SR:%08XH\tVA:%08XH", context->pc, context->sr, context->badvaddr); + Fault_Wait(3000); + Fault_FillRectange(15, 15, SCREEN_WIDTH - 30, SCREEN_HEIGHT - 30); + Fault_Printf(30, 40, "THREAD:%d (%s)", thread->id, sFaultCauses[causeIndex]); + Fault_Printf(30, 50, "PC:%08XH SR:%08XH\tVA:%08XH", context->pc, context->sr, context->badvaddr); osWritebackDCacheAll(); - func_8000762C(30, 60, "AT:%08XH V0:%08XH\tV1:%08XH", (s32) context->at, (s32) context->v0, (s32) context->v1); - func_8000762C(30, 70, "A0:%08XH A1:%08XH\tA2:%08XH", (s32) context->a0, (s32) context->a1, (s32) context->a2); - func_8000762C(30, 80, "A3:%08XH T0:%08XH\tT1:%08XH", (s32) context->a3, (s32) context->t0, (s32) context->t1); - func_8000762C(30, 90, "T2:%08XH T3:%08XH\tT4:%08XH", (s32) context->t2, (s32) context->t3, (s32) context->t4); - func_8000762C(30, 100, "T5:%08XH T6:%08XH\tT7:%08XH", (s32) context->t5, (s32) context->t6, (s32) context->t7); - func_8000762C(30, 110, "S0:%08XH S1:%08XH\tS2:%08XH", (s32) context->s0, (s32) context->s1, (s32) context->s2); - func_8000762C(30, 120, "S3:%08XH S4:%08XH\tS5:%08XH", (s32) context->s3, (s32) context->s4, (s32) context->s5); - func_8000762C(30, 130, "S6:%08XH S7:%08XH\tT8:%08XH", (s32) context->s6, (s32) context->s7, (s32) context->t8); - func_8000762C(30, 140, "T9:%08XH GP:%08XH\tSP:%08XH", (s32) context->t9, (s32) context->gp, (s32) context->sp); - func_8000762C(30, 150, "S8:%08XH RA:%08XH", (s32) context->s8, (s32) context->ra); - func_80007880(context->fpcsr); + Fault_Printf(30, 60, "AT:%08XH V0:%08XH\tV1:%08XH", (s32) context->at, (s32) context->v0, (s32) context->v1); + Fault_Printf(30, 70, "A0:%08XH A1:%08XH\tA2:%08XH", (s32) context->a0, (s32) context->a1, (s32) context->a2); + Fault_Printf(30, 80, "A3:%08XH T0:%08XH\tT1:%08XH", (s32) context->a3, (s32) context->t0, (s32) context->t1); + Fault_Printf(30, 90, "T2:%08XH T3:%08XH\tT4:%08XH", (s32) context->t2, (s32) context->t3, (s32) context->t4); + Fault_Printf(30, 100, "T5:%08XH T6:%08XH\tT7:%08XH", (s32) context->t5, (s32) context->t6, (s32) context->t7); + Fault_Printf(30, 110, "S0:%08XH S1:%08XH\tS2:%08XH", (s32) context->s0, (s32) context->s1, (s32) context->s2); + Fault_Printf(30, 120, "S3:%08XH S4:%08XH\tS5:%08XH", (s32) context->s3, (s32) context->s4, (s32) context->s5); + Fault_Printf(30, 130, "S6:%08XH S7:%08XH\tT8:%08XH", (s32) context->s6, (s32) context->s7, (s32) context->t8); + Fault_Printf(30, 140, "T9:%08XH GP:%08XH\tSP:%08XH", (s32) context->t9, (s32) context->gp, (s32) context->sp); + Fault_Printf(30, 150, "S8:%08XH RA:%08XH", (s32) context->s8, (s32) context->ra); + Fault_DisplayFloatException(context->fpcsr); osWritebackDCacheAll(); - func_800077F8(30, 170, 0, &context->fp0.f.f_even); - func_800077F8(120, 170, 2, &context->fp2.f.f_even); - func_800077F8(210, 170, 4, &context->fp4.f.f_even); - func_800077F8(30, 180, 6, &context->fp6.f.f_even); - func_800077F8(120, 180, 8, &context->fp8.f.f_even); - func_800077F8(210, 180, 10, &context->fp10.f.f_even); - func_800077F8(30, 190, 12, &context->fp12.f.f_even); - func_800077F8(120, 190, 14, &context->fp14.f.f_even); - func_800077F8(210, 190, 16, &context->fp16.f.f_even); - func_800077F8(30, 200, 18, &context->fp18.f.f_even); - func_800077F8(120, 200, 20, &context->fp20.f.f_even); - func_800077F8(210, 200, 22, &context->fp22.f.f_even); - func_800077F8(30, 210, 24, &context->fp24.f.f_even); - func_800077F8(120, 210, 26, &context->fp26.f.f_even); - func_800077F8(210, 210, 28, &context->fp28.f.f_even); - func_800077F8(30, 220, 30, &context->fp30.f.f_even); + Fault_DisplayFloatReg(30, 170, 0, &context->fp0.f.f_even); + Fault_DisplayFloatReg(120, 170, 2, &context->fp2.f.f_even); + Fault_DisplayFloatReg(210, 170, 4, &context->fp4.f.f_even); + Fault_DisplayFloatReg(30, 180, 6, &context->fp6.f.f_even); + Fault_DisplayFloatReg(120, 180, 8, &context->fp8.f.f_even); + Fault_DisplayFloatReg(210, 180, 10, &context->fp10.f.f_even); + Fault_DisplayFloatReg(30, 190, 12, &context->fp12.f.f_even); + Fault_DisplayFloatReg(120, 190, 14, &context->fp14.f.f_even); + Fault_DisplayFloatReg(210, 190, 16, &context->fp16.f.f_even); + Fault_DisplayFloatReg(30, 200, 18, &context->fp18.f.f_even); + Fault_DisplayFloatReg(120, 200, 20, &context->fp20.f.f_even); + Fault_DisplayFloatReg(210, 200, 22, &context->fp22.f.f_even); + Fault_DisplayFloatReg(30, 210, 24, &context->fp24.f.f_even); + Fault_DisplayFloatReg(120, 210, 26, &context->fp26.f.f_even); + Fault_DisplayFloatReg(210, 210, 28, &context->fp28.f.f_even); + Fault_DisplayFloatReg(30, 220, 30, &context->fp30.f.f_even); osWritebackDCacheAll(); osViBlack(false); osViRepeatLine(false); @@ -206,9 +206,7 @@ void func_80007910(OSThread* thread) { } OSThread* func_80007CEC(void) { - OSThread* queue; - - queue = __osGetActiveQueue(); + OSThread* queue = __osGetActiveQueue(); while (queue->priority != -1) { if ((queue->priority > 0) && (queue->priority < 0x7F) && (queue->flags & 3)) { @@ -219,40 +217,40 @@ OSThread* func_80007CEC(void) { return NULL; } -void Fault_ThreadEntry(void* arg0) { - OSMesg sp44; - OSThread* sp40; - s32 var_s2; - s32 var_s5; - u32 var_s0; +void Fault_ThreadEntry(void* arg) { + OSMesg dummy; + OSThread* faultedThread; + s32 codeTimer; + s32 codeComplete; + u32 codeInput; - sp44 = NULL; - var_s5 = 0; - var_s0 = 0; - var_s2 = 0; + dummy = NULL; + codeComplete = 0; + codeInput = 0; + codeTimer = 0; osSetEventMesg(OS_EVENT_CPU_BREAK, &gFaultMgr.mesgQueue, (OSMesg) FAULT_MESG_BREAK); osSetEventMesg(OS_EVENT_FAULT, &gFaultMgr.mesgQueue, (OSMesg) FAULT_MESG_FAULT); - sp40 = NULL; - while (sp40 == NULL) { - MQ_WAIT_FOR_MESG(&gFaultMgr.mesgQueue, &sp44); - sp40 = func_80007CEC(); + faultedThread = NULL; + while (faultedThread == NULL) { + MQ_WAIT_FOR_MESG(&gFaultMgr.mesgQueue, &dummy); + faultedThread = func_80007CEC(); } - func_8000762C(300, 10, "-"); - gControllerPlugged[0] = 1; + Fault_Printf(300, 10, "-"); + gControllerPlugged[0] = true; #if MODS_AUTO_DEBUGGER == 0 // Instant crash debugger (no button combination needed) - while (var_s5 == 0) { + while (!codeComplete) { osSendMesg(&gSerialThreadMesgQueue, (OSMesg) SI_READ_CONTROLLER, OS_MESG_NOBLOCK); MQ_WAIT_FOR_MESG(&gControllerMesgQueue, NULL); Controller_UpdateInput(); - switch (var_s0) { + switch (codeInput) { case 0: if (gControllerHold[0].button == (R_TRIG | D_CBUTTONS | L_CBUTTONS)) { - var_s0++; - var_s2 = 4000; + codeInput++; + codeTimer = 4000; } break; case 1: @@ -260,10 +258,10 @@ void Fault_ThreadEntry(void* arg0) { case 7: if (gControllerHold[0].button & R_TRIG) { if (gControllerPress[0].button == A_BUTTON) { - var_s0++; - var_s2 = 3000; + codeInput++; + codeTimer = 3000; } else if (gControllerPress[0].button != 0) { - var_s0 = 0; + codeInput = 0; } } break; @@ -272,10 +270,10 @@ void Fault_ThreadEntry(void* arg0) { case 8: if (gControllerHold[0].button & R_TRIG) { if (gControllerPress[0].button == B_BUTTON) { - var_s0++; - var_s2 = 3000; + codeInput++; + codeTimer = 3000; } else if (gControllerPress[0].button != 0) { - var_s0 = 0; + codeInput = 0; } } break; @@ -288,45 +286,45 @@ void Fault_ThreadEntry(void* arg0) { case 13: if (gControllerHold[0].button & R_TRIG) { if (gControllerPress[0].button == L_CBUTTONS) { - var_s0++; - var_s2 = 3000; + codeInput++; + codeTimer = 3000; } else if (gControllerPress[0].button != 0) { - var_s0 = 0; + codeInput = 0; } } break; case 14: if (gControllerHold[0].button & R_TRIG) { if (gControllerPress[0].button == START_BUTTON) { - var_s0++; - var_s2 = 3000; + codeInput++; + codeTimer = 3000; } else if (gControllerPress[0].button != 0) { - var_s0 = 0; + codeInput = 0; } } break; case 15: - var_s5 = 1; + codeComplete = true; break; } - if (var_s2 != 0) { - var_s2 -= 1; + if (codeTimer != 0) { + codeTimer--; } else { - var_s0 = 0; + codeInput = 0; } } #endif - func_80007910(sp40); + Fault_DisplayDebugInfo(faultedThread); while (true) { ; } } -void func_80007FE4(FrameBuffer* arg0, u16 arg1, u16 arg2) { - gFaultMgr.fb = arg0; - gFaultMgr.width = arg1; - gFaultMgr.height = arg2; +void Fault_SetFrameBuffer(FrameBuffer* buffer, u16 width, u16 height) { + gFaultMgr.fb = buffer; + gFaultMgr.width = width; + gFaultMgr.height = height; } void Fault_Init(void) { diff --git a/src/sys/sys_main.c b/src/sys/sys_main.c index 63e3b98f..470ed83c 100644 --- a/src/sys/sys_main.c +++ b/src/sys/sys_main.c @@ -275,7 +275,7 @@ void Graphics_ThreadEntry(void* arg0) { if (gFillScreen == 0) { osViSwapBuffer(&gFrameBuffers[(gSysFrameCount - 1) % 3]); } - func_80007FE4(&gFrameBuffers[(gSysFrameCount - 1) % 3], SCREEN_WIDTH, 16); + Fault_SetFrameBuffer(&gFrameBuffers[(gSysFrameCount - 1) % 3], SCREEN_WIDTH, 16); visPerFrame = MIN(gVIsPerFrame, 4); validVIsPerFrame = MAX(visPerFrame, gGfxVImesgQueue.validCount + 1); diff --git a/src/sys/sys_matrix.c b/src/sys/sys_matrix.c index 6de74e22..8bb6427a 100644 --- a/src/sys/sys_matrix.c +++ b/src/sys/sys_matrix.c @@ -42,12 +42,12 @@ void Matrix_Copy(Matrix* dst, Matrix* src) { // Makes a copy of the stack's current matrix and puts it on the top of the stack void Matrix_Push(Matrix** mtxStack) { Matrix_Copy(*mtxStack + 1, *mtxStack); - *mtxStack += 1; + (*mtxStack)++; } // Removes the top matrix of the stack void Matrix_Pop(Matrix** mtxStack) { - *mtxStack -= 1; + (*mtxStack)--; } // Copies tf into mtx (MTXF_NEW) or applies it to mtx (MTXF_APPLY) diff --git a/tools/comptool.py b/tools/comptool.py index dbcf34af..a2240bf9 100644 --- a/tools/comptool.py +++ b/tools/comptool.py @@ -6,6 +6,8 @@ import struct import argparse import sys +file_table_dict = {0xDE480:"US1.1", 0xD9A90:"US1.0"} + file_names = [ "makerom", "main", "dma_table", "audio_seq", "audio_bank", "audio_table", "ast_common", "ast_bg_space", "ast_bg_planet", "ast_arwing", "ast_landmaster", "ast_blue_marine", "ast_versus", "ast_enmy_planet", "ast_enmy_space", "ast_great_fox", @@ -86,17 +88,37 @@ def mio0_dec_bytes(comp_bytes, mio0): return decomp_bytes +def find_file_table(ROM): + with open(ROM, 'rb') as ROMfile: + + ROMfile.seek(0,0) + + main_area = ROMfile.read(0x100000) + + file_table_start = main_area.find(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x50\x00\x00\x00\x00') + + if(file_table_start == -1): + print('File table not found.') + sys.exit(2) + elif(file_table_start > 0x100000): + print("Warning: Detected file table offset 0x%X is larger than expected." % file_table_start) + # print(file_table_start) + + return file_table_start + def compress(baserom, comprom, mio0, extract_dest=None): decomp_inds = [0, 1, 2, 3, 4, 5, 15, 16, 21, 22, 23, 24, 48] - + file_table = find_file_table(baserom) + # comp_const = 0xFFFEFFFFFE1E7FC0 with open(comprom, 'w+b') as compfile, open(baserom, 'rb') as basefile: file_count = 0 p_file_begin = 0 + while True: - file_entry = 0xDE480 + 0x10 * file_count + file_entry = file_table + 0x10 * file_count basefile.seek(file_entry + 4) v_file_begin = int.from_bytes(basefile.read(4),'big') @@ -161,18 +183,33 @@ def compress(baserom, comprom, mio0, extract_dest=None): return -def decompress(baserom, decomprom, mio0, extract_dest=None): - with open(decomprom, 'w+b') as decompfile, open(baserom, 'rb') as baserom: +def decompress(baserom, decomprom, mio0, extract_dest=None, print_inds=False): + file_table = find_file_table(baserom) + + if file_table_dict.get(file_table) == "US1.0": + ext = "rev0.z64" + elif file_table_dict.get(file_table) == "US1.1": + ext = "z64" + else: + ext = ('%X' % file_table) + ".z64" + + print("File table found at 0x%X" % file_table) + print("Detected ROM version is " + file_table_dict.get(file_table, "Unknown")) + + outrom = decomprom.replace("z64", ext) + + with open(outrom, 'w+b') as decompfile, open(baserom, 'rb') as basefile: file_count = 0 - + decomp_inds = [] + while True: - file_entry = 0xDE480 + 0x10 * file_count - baserom.seek(file_entry) + file_entry = file_table + 0x10 * file_count + basefile.seek(file_entry) - v_file_begin = int.from_bytes(baserom.read(4),'big') - p_file_begin = int.from_bytes(baserom.read(4),'big') - p_file_end = int.from_bytes(baserom.read(4),'big') - comp_flag = int.from_bytes(baserom.read(4),'big') + v_file_begin = int.from_bytes(basefile.read(4),'big') + p_file_begin = int.from_bytes(basefile.read(4),'big') + p_file_end = int.from_bytes(basefile.read(4),'big') + comp_flag = int.from_bytes(basefile.read(4),'big') p_file_size = p_file_end - p_file_begin @@ -183,12 +220,13 @@ def decompress(baserom, decomprom, mio0, extract_dest=None): decompfile.truncate(v_file_begin) - baserom.seek(p_file_begin) + basefile.seek(p_file_begin) - file_bytes = baserom.read(p_file_size) + file_bytes = basefile.read(p_file_size) if comp_flag == 0: v_file_size = p_file_size + decomp_inds += [file_count] dec_msg = 'uncompressed' elif comp_flag == 1: file_bytes = mio0_dec_bytes(file_bytes, mio0) @@ -226,7 +264,11 @@ def decompress(baserom, decomprom, mio0, extract_dest=None): decompfile.seek(0x10) decompfile.write(crc1.to_bytes(4, 'big')) decompfile.write(crc2.to_bytes(4, 'big')) - + print("Decompressed %d files." % file_count) + if(print_inds) : + print("These file numbers were not compressed:") + print(decomp_inds) + return parser = argparse.ArgumentParser(description='Compress or decompress a Star Fox 64 ROM') @@ -237,6 +279,7 @@ parser.add_argument('-c', action='store_true',help='compress provided ROM') parser.add_argument('-d', action='store_true',help='decompress provided ROM') parser.add_argument('-m', metavar='mio0',dest='mio0',help='Path to mio0 tool if not in same directory') parser.add_argument('-r', action="store_true",help='Fix crc without compressing or decompressing') +parser.add_argument('-i', action='store_true',help='Print indices of uncompressed files during decompression.') # parser.add_argument('-v', action='store_true',help='show what changes are made') if __name__ == '__main__': @@ -252,7 +295,7 @@ if __name__ == '__main__': elif args.c: compress(args.inROM, args.outROM, mio0) elif args.d or args.extract: - decompress(args.inROM, args.outROM, mio0, args.extract) + decompress(args.inROM, args.outROM, mio0, args.extract, args.i) else: print("Something went wrong.") From cd3444b72793cfc702bae4724531da69e162a226 Mon Sep 17 00:00:00 2001 From: Alejandro Asenjo Nitti <96613413+sonicdcer@users.noreply.github.com> Date: Sat, 11 May 2024 21:11:29 -0300 Subject: [PATCH 074/151] Isolate rev1 building tree (#239) * try * move yamls * gitignore * fix * gitignore starfox64.us.rev1.yaml * fix RM * update readme * readme again, forgot a few things * okay one more... * fix ci --- .github/workflows/ci.yaml | 2 +- .gitignore | 2 +- Makefile | 55 ++++++++++--------- README.md | 12 ++-- linker_scripts/us/{ => rev1}/hardware_regs.ld | 0 linker_scripts/us/{ => rev1}/pif_syms.ld | 0 linker_scripts/us/{ => rev1}/symbol_addrs.txt | 0 .../us/{ => rev1}/symbol_addrs_EBFBE0.txt | 0 .../us/{ => rev1}/symbol_addrs_assets.txt | 0 .../us/{ => rev1}/symbol_addrs_audio.txt | 0 .../us/{ => rev1}/symbol_addrs_engine.txt | 0 .../us/{ => rev1}/symbol_addrs_libultra.txt | 0 .../us/{ => rev1}/symbol_addrs_mesg.txt | 0 .../us/{ => rev1}/symbol_addrs_nlib_funcs.txt | 0 .../us/{ => rev1}/symbol_addrs_nlib_vars.txt | 0 .../us/{ => rev1}/symbol_addrs_overlays.txt | 0 .../us/{ => rev1}/undefined_syms.ld | 0 src/audio/audio_synthesis.c | 6 +- src/overlays/ovl_ending/fox_end1.c | 2 +- src/overlays/ovl_i1/fox_ve1.c | 2 +- src/overlays/ovl_i3/fox_aq.c | 2 +- src/overlays/ovl_i4/fox_sz.c | 2 +- src/overlays/ovl_i5/fox_ti.c | 4 +- starfox64.us.md5 | 1 - starfox64.us.rev1.md5 | 1 + starfox64.us.rev1.uncompressed.md5 | 1 + starfox64.us.uncompressed.md5 | 1 - yamls/us/{ => rev1}/assets.yaml | 0 yamls/us/{ => rev1}/header.yaml | 40 +++++++------- yamls/us/{ => rev1}/main.yaml | 0 yamls/us/{ => rev1}/overlays.yaml | 0 31 files changed, 66 insertions(+), 67 deletions(-) rename linker_scripts/us/{ => rev1}/hardware_regs.ld (100%) rename linker_scripts/us/{ => rev1}/pif_syms.ld (100%) rename linker_scripts/us/{ => rev1}/symbol_addrs.txt (100%) rename linker_scripts/us/{ => rev1}/symbol_addrs_EBFBE0.txt (100%) rename linker_scripts/us/{ => rev1}/symbol_addrs_assets.txt (100%) rename linker_scripts/us/{ => rev1}/symbol_addrs_audio.txt (100%) rename linker_scripts/us/{ => rev1}/symbol_addrs_engine.txt (100%) rename linker_scripts/us/{ => rev1}/symbol_addrs_libultra.txt (100%) rename linker_scripts/us/{ => rev1}/symbol_addrs_mesg.txt (100%) rename linker_scripts/us/{ => rev1}/symbol_addrs_nlib_funcs.txt (100%) rename linker_scripts/us/{ => rev1}/symbol_addrs_nlib_vars.txt (100%) rename linker_scripts/us/{ => rev1}/symbol_addrs_overlays.txt (100%) rename linker_scripts/us/{ => rev1}/undefined_syms.ld (100%) delete mode 100644 starfox64.us.md5 create mode 100644 starfox64.us.rev1.md5 create mode 100644 starfox64.us.rev1.uncompressed.md5 delete mode 100644 starfox64.us.uncompressed.md5 rename yamls/us/{ => rev1}/assets.yaml (100%) rename yamls/us/{ => rev1}/header.yaml (56%) rename yamls/us/{ => rev1}/main.yaml (100%) rename yamls/us/{ => rev1}/overlays.yaml (100%) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 21bdc828..865381e8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -37,7 +37,7 @@ jobs: path: sf64-secret - name: Get the dependency - run: cp -r sf64-secret/baserom.us.z64 ./ + run: cp -r sf64-secret/baserom.us.rev1.z64 ./ - name: Compile run: make init diff --git a/.gitignore b/.gitignore index 76bef8c3..5b4230bb 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,7 @@ __pycache__ .splat/ starfox64.ld starfox64.uncompressed.ld -starfox64.us.yaml +starfox64.us.rev1.yaml ctx.c ctx.c.m2c *.d diff --git a/Makefile b/Makefile index eb5eb181..f3cc705b 100644 --- a/Makefile +++ b/Makefile @@ -47,9 +47,10 @@ else endif VERSION ?= us +REV ?= rev1 -BASEROM := baserom.$(VERSION).z64 -BASEROM_UNCOMPRESSED := baserom.$(VERSION).uncompressed.z64 +BASEROM := baserom.$(VERSION).$(REV).z64 +BASEROM_UNCOMPRESSED := baserom.$(VERSION).$(REV).uncompressed.z64 TARGET := starfox64 ### Output ### @@ -57,11 +58,11 @@ TARGET := starfox64 BUILD_DIR := build TOOLS := tools PYTHON := python3 -ROM := $(BUILD_DIR)/$(TARGET).$(VERSION).uncompressed.z64 -ROMC := $(BUILD_DIR)/$(TARGET).$(VERSION).z64 -ELF := $(BUILD_DIR)/$(TARGET).$(VERSION).elf -LD_MAP := $(BUILD_DIR)/$(TARGET).$(VERSION).map -LD_SCRIPT := linker_scripts/$(VERSION)/$(TARGET).ld +ROM := $(BUILD_DIR)/$(TARGET).$(VERSION).$(REV).uncompressed.z64 +ROMC := $(BUILD_DIR)/$(TARGET).$(VERSION).$(REV).z64 +ELF := $(BUILD_DIR)/$(TARGET).$(VERSION).$(REV).elf +LD_MAP := $(BUILD_DIR)/$(TARGET).$(VERSION).$(REV).map +LD_SCRIPT := linker_scripts/$(VERSION)/$(REV)/$(TARGET).ld #### Setup #### @@ -205,14 +206,14 @@ endif ASM_PROC_FLAGS := --input-enc=utf-8 --output-enc=euc-jp --convert-statics=global-with-filename SPLAT ?= $(PYTHON) $(TOOLS)/splat/split.py -SPLAT_YAML ?= $(TARGET).$(VERSION).yaml +SPLAT_YAML ?= $(TARGET).$(VERSION).$(REV).yaml COMPTOOL := $(TOOLS)/comptool.py COMPTOOL_DIR := baserom MIO0 := $(TOOLS)/mio0 -IINC := -Iinclude -Ibin/$(VERSION) -I. +IINC := -Iinclude -Ibin/$(VERSION).$(REV) -I. IINC += -Ilib/ultralib/include -Ilib/ultralib/include/PR -Ilib/ultralib/include/ido ifeq ($(KEEP_MDEBUG),0) @@ -273,10 +274,10 @@ endif #### Files #### -$(shell mkdir -p asm bin linker_scripts/$(VERSION)/auto) +$(shell mkdir -p asm bin linker_scripts/$(VERSION)/$(REV)/auto) SRC_DIRS := $(shell find src -type d) -ASM_DIRS := $(shell find asm/$(VERSION) -type d -not -path "asm/$(VERSION)/nonmatchings/*") +ASM_DIRS := $(shell find asm/$(VERSION)/$(REV) -type d -not -path "asm/$(VERSION)/$(REV)/nonmatchings/*") BIN_DIRS := $(shell find bin -type d) C_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.c)) @@ -293,7 +294,7 @@ DEP_FILES := $(O_FILES:.o=.d) \ $(O_FILES:.o=.asmproc.d) # create build directories -$(shell mkdir -p $(BUILD_DIR)/linker_scripts/$(VERSION) $(BUILD_DIR)/linker_scripts/$(VERSION)/auto $(foreach dir,$(SRC_DIRS) $(ASM_DIRS) $(BIN_DIRS),$(BUILD_DIR)/$(dir))) +$(shell mkdir -p $(BUILD_DIR)/linker_scripts/$(VERSION)/$(REV) $(BUILD_DIR)/linker_scripts/$(VERSION)/$(REV)/auto $(foreach dir,$(SRC_DIRS) $(ASM_DIRS) $(BIN_DIRS),$(BUILD_DIR)/$(dir))) ifeq ($(COMPILER),ido) @@ -393,21 +394,21 @@ uncompressed: $(ROM) ifneq ($(COMPARE),0) @echo "$(GREEN)Calculating Rom Header Checksum... $(YELLOW)$<$(NO_COL)" @$(PYTHON) $(COMPTOOL) -r $(ROM) . - @md5sum --status -c $(TARGET).$(VERSION).uncompressed.md5 && \ - $(PRINT) "$(BLUE)$(TARGET).$(VERSION).uncompressed.z64$(NO_COL): $(GREEN)OK$(NO_COL)\n$(YELLOW) $(SF)" || \ - $(PRINT) "$(BLUE)$(TARGET).$(VERSION).uncompressed.z64 $(RED)FAILED$(NO_COL)\n\ + @md5sum --status -c $(TARGET).$(VERSION).$(REV).uncompressed.md5 && \ + $(PRINT) "$(BLUE)$(TARGET).$(VERSION).$(REV).uncompressed.z64$(NO_COL): $(GREEN)OK$(NO_COL)\n$(YELLOW) $(SF)" || \ + $(PRINT) "$(BLUE)$(TARGET).$(VERSION).$(REV).uncompressed.z64 $(RED)FAILED$(NO_COL)\n\ $(RED)CAN'T LET YOU DO THAT, STARFOX.$(NO_COL)\n" - @md5sum --status -c $(TARGET).$(VERSION).uncompressed.md5 + @md5sum --status -c $(TARGET).$(VERSION).$(REV).uncompressed.md5 endif compressed: $(ROMC) ifeq ($(COMPARE),1) @echo "$(GREEN)Calculating Rom Header Checksum... $(YELLOW)$<$(NO_COL)" @$(PYTHON) $(COMPTOOL) -r $(ROMC) . - @md5sum --status -c $(TARGET).$(VERSION).md5 && \ - $(PRINT) "$(BLUE)$(TARGET).$(VERSION).z64$(NO_COL): $(GREEN)OK$(NO_COL)\n" || \ - $(PRINT) "$(BLUE)$(TARGET).$(VERSION).z64 $(RED)FAILED$(NO_COL)\n" - @md5sum --status -c $(TARGET).$(VERSION).uncompressed.md5 + @md5sum --status -c $(TARGET).$(VERSION).$(REV).md5 && \ + $(PRINT) "$(BLUE)$(TARGET).$(VERSION).$(REV).z64$(NO_COL): $(GREEN)OK$(NO_COL)\n" || \ + $(PRINT) "$(BLUE)$(TARGET).$(VERSION).$(REV).z64 $(RED)FAILED$(NO_COL)\n" + @md5sum --status -c $(TARGET).$(VERSION).$(REV).uncompressed.md5 endif #### Main Targets ### @@ -421,9 +422,9 @@ compress: $(BASEROM) @$(PYTHON) $(COMPTOOL) -c -m $(MIO0) $(ROM) $(ROMC) extract: - @$(RM) -r asm/$(VERSION) bin/$(VERSION) + @$(RM) -r asm/$(VERSION)/$(REV) bin/$(VERSION)/$(REV) @echo "Unifying yamls..." - @$(CAT) yamls/$(VERSION)/header.yaml yamls/$(VERSION)/main.yaml yamls/$(VERSION)/assets.yaml yamls/$(VERSION)/overlays.yaml > $(SPLAT_YAML) + @$(CAT) yamls/$(VERSION)/$(REV)/header.yaml yamls/$(VERSION)/$(REV)/main.yaml yamls/$(VERSION)/$(REV)/assets.yaml yamls/$(VERSION)/$(REV)/overlays.yaml > $(SPLAT_YAML) @echo "Extracting..." @$(SPLAT) $(SPLAT_YAML) @@ -440,7 +441,7 @@ clean: @git clean -fdx build/ @git clean -fdx src/assets/ @git clean -fdx include/assets/ - @git clean -fdx linker_scripts/*.ld + @git clean -fdx linker_scripts/$(REV)/*.ld format: @$(PYTHON) $(TOOLS)/format.py -j $(N_THREADS) @@ -459,9 +460,9 @@ context: @$(PYTHON) ./tools/m2ctx.py $(filter-out $@, $(MAKECMDGOALS)) disasm: - @$(RM) -r asm/$(VERSION) bin/$(VERSION) + @$(RM) -r asm/$(VERSION)/$(REV) bin/$(VERSION)/$(REV) @echo "Unifying yamls..." - @$(CAT) yamls/$(VERSION)/header.yaml yamls/$(VERSION)/main.yaml yamls/$(VERSION)/assets.yaml yamls/$(VERSION)/overlays.yaml > $(SPLAT_YAML) + @$(CAT) yamls/$(VERSION)/$(REV)/header.yaml yamls/$(VERSION)/$(REV)/main.yaml yamls/$(VERSION)/$(REV)/assets.yaml yamls/$(VERSION)/$(REV)/overlays.yaml > $(SPLAT_YAML) @echo "Extracting..." @$(SPLAT) $(SPLAT_YAML) --disassemble-all @@ -478,10 +479,10 @@ $(ROM): $(ELF) $(V)$(OBJCOPY) -O binary $< $@ # Link -$(ELF): $(LIBULTRA_O) $(O_FILES) $(LD_SCRIPT) $(BUILD_DIR)/linker_scripts/$(VERSION)/hardware_regs.ld $(BUILD_DIR)/linker_scripts/$(VERSION)/undefined_syms.ld $(BUILD_DIR)/linker_scripts/$(VERSION)/pif_syms.ld +$(ELF): $(LIBULTRA_O) $(O_FILES) $(LD_SCRIPT) $(BUILD_DIR)/linker_scripts/$(VERSION)/$(REV)/hardware_regs.ld $(BUILD_DIR)/linker_scripts/$(VERSION)/$(REV)/undefined_syms.ld $(BUILD_DIR)/linker_scripts/$(VERSION)/$(REV)/pif_syms.ld $(call print,Linking:,$<,$@) $(V)$(LD) $(LDFLAGS) -T $(LD_SCRIPT) \ - -T $(BUILD_DIR)/linker_scripts/$(VERSION)/hardware_regs.ld -T $(BUILD_DIR)/linker_scripts/$(VERSION)/undefined_syms.ld -T $(BUILD_DIR)/linker_scripts/$(VERSION)/pif_syms.ld \ + -T $(BUILD_DIR)/linker_scripts/$(VERSION)/$(REV)/hardware_regs.ld -T $(BUILD_DIR)/linker_scripts/$(VERSION)/$(REV)/undefined_syms.ld -T $(BUILD_DIR)/linker_scripts/$(VERSION)/$(REV)/pif_syms.ld \ -Map $(LD_MAP) -o $@ # PreProcessor diff --git a/README.md b/README.md index 575bdc16..1f354cae 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ This is a WIP **matching decompilation** of ***Starfox 64***. The purpose of the It currently builds the following ROM: -* starfox64.us.z64 `MD5: 741a94eee093c4c8684e66b89f8685e8` +* starfox64.us.rev1.z64 `MD5: 741a94eee093c4c8684e66b89f8685e8` **This repo does not include any assets or assembly code necessary for compiling the ROM. A prior copy of the game is required to extract the required assets.** @@ -81,7 +81,7 @@ make toolchain #### 5. Prepare a base ROM -Copy your ROM to the root of this new project directory, and rename the file of the baserom to reflect the version of ROM you are using. ex: `baserom.us.z64` +Copy your ROM to the root of this new project directory, and rename the file of the baserom to reflect the version of ROM you are using. ex: `baserom.us.rev1.z64` * Make sure the ROM is the US version, revision 1.1 (REV A). #### 6. Make and Build the ROM @@ -93,17 +93,17 @@ make init ``` This will create the build folders, a new folder with the assembly as well as containing the disassembly of nearly all the files containing code. -this make target will also build the ROM. If all goes well, a new ROM called "starfox64.us.z64" should be built and the following text should be printed: +this make target will also build the ROM. If all goes well, a new ROM called "starfox64.us.rev1.z64" should be built and the following text should be printed: ```bash -741a94eee093c4c8684e66b89f8685e8 build/starfox64.us.z64 -./build/starfox64.us.z64: OK +741a94eee093c4c8684e66b89f8685e8 build/starfox64.us.rev1.z64 +./build/starfox64.us.rev1.z64: OK ``` If you instead see the following: ```bash -./build/starfox64.us.z64: FAILED +./build/starfox64.us.rev1.z64: FAILED md5sum: WARNING: 1 computed checksum did NOT match ``` diff --git a/linker_scripts/us/hardware_regs.ld b/linker_scripts/us/rev1/hardware_regs.ld similarity index 100% rename from linker_scripts/us/hardware_regs.ld rename to linker_scripts/us/rev1/hardware_regs.ld diff --git a/linker_scripts/us/pif_syms.ld b/linker_scripts/us/rev1/pif_syms.ld similarity index 100% rename from linker_scripts/us/pif_syms.ld rename to linker_scripts/us/rev1/pif_syms.ld diff --git a/linker_scripts/us/symbol_addrs.txt b/linker_scripts/us/rev1/symbol_addrs.txt similarity index 100% rename from linker_scripts/us/symbol_addrs.txt rename to linker_scripts/us/rev1/symbol_addrs.txt diff --git a/linker_scripts/us/symbol_addrs_EBFBE0.txt b/linker_scripts/us/rev1/symbol_addrs_EBFBE0.txt similarity index 100% rename from linker_scripts/us/symbol_addrs_EBFBE0.txt rename to linker_scripts/us/rev1/symbol_addrs_EBFBE0.txt diff --git a/linker_scripts/us/symbol_addrs_assets.txt b/linker_scripts/us/rev1/symbol_addrs_assets.txt similarity index 100% rename from linker_scripts/us/symbol_addrs_assets.txt rename to linker_scripts/us/rev1/symbol_addrs_assets.txt diff --git a/linker_scripts/us/symbol_addrs_audio.txt b/linker_scripts/us/rev1/symbol_addrs_audio.txt similarity index 100% rename from linker_scripts/us/symbol_addrs_audio.txt rename to linker_scripts/us/rev1/symbol_addrs_audio.txt diff --git a/linker_scripts/us/symbol_addrs_engine.txt b/linker_scripts/us/rev1/symbol_addrs_engine.txt similarity index 100% rename from linker_scripts/us/symbol_addrs_engine.txt rename to linker_scripts/us/rev1/symbol_addrs_engine.txt diff --git a/linker_scripts/us/symbol_addrs_libultra.txt b/linker_scripts/us/rev1/symbol_addrs_libultra.txt similarity index 100% rename from linker_scripts/us/symbol_addrs_libultra.txt rename to linker_scripts/us/rev1/symbol_addrs_libultra.txt diff --git a/linker_scripts/us/symbol_addrs_mesg.txt b/linker_scripts/us/rev1/symbol_addrs_mesg.txt similarity index 100% rename from linker_scripts/us/symbol_addrs_mesg.txt rename to linker_scripts/us/rev1/symbol_addrs_mesg.txt diff --git a/linker_scripts/us/symbol_addrs_nlib_funcs.txt b/linker_scripts/us/rev1/symbol_addrs_nlib_funcs.txt similarity index 100% rename from linker_scripts/us/symbol_addrs_nlib_funcs.txt rename to linker_scripts/us/rev1/symbol_addrs_nlib_funcs.txt diff --git a/linker_scripts/us/symbol_addrs_nlib_vars.txt b/linker_scripts/us/rev1/symbol_addrs_nlib_vars.txt similarity index 100% rename from linker_scripts/us/symbol_addrs_nlib_vars.txt rename to linker_scripts/us/rev1/symbol_addrs_nlib_vars.txt diff --git a/linker_scripts/us/symbol_addrs_overlays.txt b/linker_scripts/us/rev1/symbol_addrs_overlays.txt similarity index 100% rename from linker_scripts/us/symbol_addrs_overlays.txt rename to linker_scripts/us/rev1/symbol_addrs_overlays.txt diff --git a/linker_scripts/us/undefined_syms.ld b/linker_scripts/us/rev1/undefined_syms.ld similarity index 100% rename from linker_scripts/us/undefined_syms.ld rename to linker_scripts/us/rev1/undefined_syms.ld diff --git a/src/audio/audio_synthesis.c b/src/audio/audio_synthesis.c index f7705523..d97fb40e 100644 --- a/src/audio/audio_synthesis.c +++ b/src/audio/audio_synthesis.c @@ -364,7 +364,7 @@ void func_80008780(f32* arg0, s32 arg1, f32* arg2) { } } #else -#pragma GLOBAL_ASM("asm/us/nonmatchings/audio/audio_synthesis/func_80008780.s") +#pragma GLOBAL_ASM("asm/us/rev1/nonmatchings/audio/audio_synthesis/func_80008780.s") #endif // https://decomp.me/scratch/mYlns @@ -494,7 +494,7 @@ void func_80009124(s16** arg0) { } #else void func_80009124(s16** arg0); -#pragma GLOBAL_ASM("asm/us/nonmatchings/audio/audio_synthesis/func_80009124.s") +#pragma GLOBAL_ASM("asm/us/rev1/nonmatchings/audio/audio_synthesis/func_80009124.s") #endif void func_80009504(s16* arg0, UnkStruct_800097A8* arg1) { @@ -1143,7 +1143,7 @@ Acmd* func_8000A700(s32 noteIndex, NoteSubEu* noteSub, NoteSynthesisState* synth return aList; } #else -#pragma GLOBAL_ASM("asm/us/nonmatchings/audio/audio_synthesis/func_8000A700.s") +#pragma GLOBAL_ASM("asm/us/rev1/nonmatchings/audio/audio_synthesis/func_8000A700.s") #endif Acmd* func_8000B3F0(Acmd* aList, NoteSubEu* noteSub, NoteSynthesisState* synthState, s32 numSamplesToLoad) { diff --git a/src/overlays/ovl_ending/fox_end1.c b/src/overlays/ovl_ending/fox_end1.c index 2f079891..9b4777b2 100644 --- a/src/overlays/ovl_ending/fox_end1.c +++ b/src/overlays/ovl_ending/fox_end1.c @@ -398,7 +398,7 @@ void Ending_8018845C(void) { } #else void Ending_8018845C(void); -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_ending/fox_end1/Ending_8018845C.s") +#pragma GLOBAL_ASM("asm/us/rev1/nonmatchings/overlays/ovl_ending/fox_end1/Ending_8018845C.s") #endif s32 Ending_80188634(void) { diff --git a/src/overlays/ovl_i1/fox_ve1.c b/src/overlays/ovl_i1/fox_ve1.c index d70f6c5d..9837c871 100644 --- a/src/overlays/ovl_i1/fox_ve1.c +++ b/src/overlays/ovl_i1/fox_ve1.c @@ -2317,7 +2317,7 @@ void Venom1_Boss_Update(Boss* boss) { } #else void Venom1_Boss_Update(Boss* boss); -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i1/fox_ve1/Venom1_Boss_Update.s") +#pragma GLOBAL_ASM("asm/us/rev1/nonmatchings/overlays/ovl_i1/fox_ve1/Venom1_Boss_Update.s") #endif void Venom1_80198310(Boss* boss) { diff --git a/src/overlays/ovl_i3/fox_aq.c b/src/overlays/ovl_i3/fox_aq.c index 9b52b513..68e1361f 100644 --- a/src/overlays/ovl_i3/fox_aq.c +++ b/src/overlays/ovl_i3/fox_aq.c @@ -3309,7 +3309,7 @@ void Aquas_Boss_Update(Boss* bossAQ) { } #else void Aquas_Boss_Update(Boss* bossAQ); -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i3/fox_aq/Aquas_Boss_Update.s") +#pragma GLOBAL_ASM("asm/us/rev1/nonmatchings/overlays/ovl_i3/fox_aq/Aquas_Boss_Update.s") #endif bool Aquas_801B42AC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { diff --git a/src/overlays/ovl_i4/fox_sz.c b/src/overlays/ovl_i4/fox_sz.c index 0e2aac55..6a0f87cd 100644 --- a/src/overlays/ovl_i4/fox_sz.c +++ b/src/overlays/ovl_i4/fox_sz.c @@ -176,7 +176,7 @@ void SectorZ_Missile_Update(Actor* this) { } } #else -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i4/fox_sz/SectorZ_Missile_Update.s") +#pragma GLOBAL_ASM("asm/us/rev1/nonmatchings/overlays/ovl_i4/fox_sz/SectorZ_Missile_Update.s") #endif void SectorZ_80199FCC(Actor* actor, s32 arg1) { diff --git a/src/overlays/ovl_i5/fox_ti.c b/src/overlays/ovl_i5/fox_ti.c index 4378e706..5be46077 100644 --- a/src/overlays/ovl_i5/fox_ti.c +++ b/src/overlays/ovl_i5/fox_ti.c @@ -2922,7 +2922,7 @@ bool Titania_80190A08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return ret; } #else -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i5/fox_ti/Titania_80190A08.s") +#pragma GLOBAL_ASM("asm/us/rev1/nonmatchings/overlays/ovl_i5/fox_ti/Titania_80190A08.s") bool Titania_80190A08(s32, Gfx**, Vec3f*, Vec3f*, void*); #endif @@ -4720,7 +4720,7 @@ void Titania_80193DF0(Boss* boss) { boss->dmgType = DMG_NONE; } #else -#pragma GLOBAL_ASM("asm/us/nonmatchings/overlays/ovl_i5/fox_ti/Titania_80193DF0.s") +#pragma GLOBAL_ASM("asm/us/rev1/nonmatchings/overlays/ovl_i5/fox_ti/Titania_80193DF0.s") void Titania_80193DF0(Boss*); #endif diff --git a/starfox64.us.md5 b/starfox64.us.md5 deleted file mode 100644 index e4f33584..00000000 --- a/starfox64.us.md5 +++ /dev/null @@ -1 +0,0 @@ -741a94eee093c4c8684e66b89f8685e8 ./build/starfox64.us.z64 \ No newline at end of file diff --git a/starfox64.us.rev1.md5 b/starfox64.us.rev1.md5 new file mode 100644 index 00000000..ffac9e96 --- /dev/null +++ b/starfox64.us.rev1.md5 @@ -0,0 +1 @@ +741a94eee093c4c8684e66b89f8685e8 ./build/starfox64.us.rev1.z64 \ No newline at end of file diff --git a/starfox64.us.rev1.uncompressed.md5 b/starfox64.us.rev1.uncompressed.md5 new file mode 100644 index 00000000..d26ee844 --- /dev/null +++ b/starfox64.us.rev1.uncompressed.md5 @@ -0,0 +1 @@ +23e24fb0f090c6c0b3793a96169dce51 ./build/starfox64.us.rev1.uncompressed.z64 \ No newline at end of file diff --git a/starfox64.us.uncompressed.md5 b/starfox64.us.uncompressed.md5 deleted file mode 100644 index 2746c21b..00000000 --- a/starfox64.us.uncompressed.md5 +++ /dev/null @@ -1 +0,0 @@ -23e24fb0f090c6c0b3793a96169dce51 ./build/starfox64.us.uncompressed.z64 \ No newline at end of file diff --git a/yamls/us/assets.yaml b/yamls/us/rev1/assets.yaml similarity index 100% rename from yamls/us/assets.yaml rename to yamls/us/rev1/assets.yaml diff --git a/yamls/us/header.yaml b/yamls/us/rev1/header.yaml similarity index 56% rename from yamls/us/header.yaml rename to yamls/us/rev1/header.yaml index 08ae7a15..4fae471b 100644 --- a/yamls/us/header.yaml +++ b/yamls/us/rev1/header.yaml @@ -1,39 +1,37 @@ -name: Starfox64 (North America) +name: Starfox64 US REV 1 (v1.1) # baserom compressed # sha1: 09f0d105f476b00efa5303a3ebc42e60a7753b7a # baserom uncompressed sha1: f7475fb11e7e6830f82883412638e8390791ab87 options: basename: starfox64 - target_path: baserom.us.uncompressed.z64 - elf_path: build/starfox64.elf - ld_script_path: linker_scripts/us/starfox64.ld + target_path: baserom.us.rev1.uncompressed.z64 + elf_path: build/starfox64.us.rev1.elf + ld_script_path: linker_scripts/us/rev1/starfox64.ld base_path: . compiler: IDO find_file_boundaries: True header_encoding: ASCII platform: n64 - undefined_funcs_auto_path: linker_scripts/us/auto/undefined_funcs_auto.ld - undefined_syms_auto_path: linker_scripts/us/auto/undefined_syms_auto.ld + undefined_funcs_auto_path: linker_scripts/us/rev1/auto/undefined_funcs_auto.ld + undefined_syms_auto_path: linker_scripts/us/rev1/auto/undefined_syms_auto.ld symbol_addrs_path: - - linker_scripts/us/symbol_addrs.txt - - linker_scripts/us/symbol_addrs_engine.txt - - linker_scripts/us/symbol_addrs_libultra.txt - - linker_scripts/us/symbol_addrs_nlib_funcs.txt - - linker_scripts/us/symbol_addrs_nlib_vars.txt - - linker_scripts/us/symbol_addrs_assets.txt - - linker_scripts/us/symbol_addrs_mesg.txt - - linker_scripts/us/symbol_addrs_audio.txt - - linker_scripts/us/symbol_addrs_overlays.txt - - linker_scripts/us/symbol_addrs_EBFBE0.txt - - linker_scripts/us/ignored_addresses.txt - reloc_addrs_path: - - relocs/reloc_addrs.us.txt + - linker_scripts/us/rev1/symbol_addrs.txt + - linker_scripts/us/rev1/symbol_addrs_engine.txt + - linker_scripts/us/rev1/symbol_addrs_libultra.txt + - linker_scripts/us/rev1/symbol_addrs_nlib_funcs.txt + - linker_scripts/us/rev1/symbol_addrs_nlib_vars.txt + - linker_scripts/us/rev1/symbol_addrs_assets.txt + - linker_scripts/us/rev1/symbol_addrs_mesg.txt + - linker_scripts/us/rev1/symbol_addrs_audio.txt + - linker_scripts/us/rev1/symbol_addrs_overlays.txt + - linker_scripts/us/rev1/symbol_addrs_EBFBE0.txt + - linker_scripts/us/rev1/ignored_addresses.txt - asm_path: asm/us + asm_path: asm/us/rev1 src_path: src - asset_path: bin/us + asset_path: bin/us/rev1 build_path: build diff --git a/yamls/us/main.yaml b/yamls/us/rev1/main.yaml similarity index 100% rename from yamls/us/main.yaml rename to yamls/us/rev1/main.yaml diff --git a/yamls/us/overlays.yaml b/yamls/us/rev1/overlays.yaml similarity index 100% rename from yamls/us/overlays.yaml rename to yamls/us/rev1/overlays.yaml From 1dec9db4134dcdd7bc2ef8fd73fabdd53d402e0b Mon Sep 17 00:00:00 2001 From: Alejandro Asenjo Nitti <96613413+sonicdcer@users.noreply.github.com> Date: Sun, 12 May 2024 01:07:54 -0300 Subject: [PATCH 075/151] Initial JAP REV0 extraction for function exploring (#241) * progress so far * no v * root yamls ignored * gitignore jap version src extraction for now * wipe this * separate yamls --- .gitignore | 5 +- Makefile | 8 +- tools/comptool.py | 38 ++++--- yamls/jp/rev0/assets.yaml | 3 + yamls/jp/rev0/header.yaml | 78 ++++++++++++++ yamls/jp/rev0/main.yaml | 197 ++++++++++++++++++++++++++++++++++++ yamls/jp/rev0/overlays.yaml | 110 ++++++++++++++++++++ yamls/us/rev0/assets.yaml | 0 yamls/us/rev0/header.yaml | 0 yamls/us/rev0/main.yaml | 0 yamls/us/rev0/overlays.yaml | 0 yamls/us/rev1/header.yaml | 3 - 12 files changed, 415 insertions(+), 27 deletions(-) create mode 100644 yamls/jp/rev0/assets.yaml create mode 100644 yamls/jp/rev0/header.yaml create mode 100644 yamls/jp/rev0/main.yaml create mode 100644 yamls/jp/rev0/overlays.yaml create mode 100644 yamls/us/rev0/assets.yaml create mode 100644 yamls/us/rev0/header.yaml create mode 100644 yamls/us/rev0/main.yaml create mode 100644 yamls/us/rev0/overlays.yaml diff --git a/.gitignore b/.gitignore index 5b4230bb..aa907133 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,7 @@ __pycache__ .splat/ starfox64.ld starfox64.uncompressed.ld -starfox64.us.rev1.yaml +starfox64.*.*.yaml ctx.c ctx.c.m2c *.d @@ -24,4 +24,5 @@ debug/ .venv/ m2cfiles/ TempComp.bin.mio0 -torch.hash.yml \ No newline at end of file +torch.hash.yml +srcjp \ No newline at end of file diff --git a/Makefile b/Makefile index f3cc705b..f9ca301f 100644 --- a/Makefile +++ b/Makefile @@ -122,8 +122,12 @@ BUILD_DEFINES ?= ifeq ($(VERSION),us) BUILD_DEFINES += -DVERSION_US=1 -else -$(error Invalid VERSION variable detected. Please use 'us') +# else +# $(error Invalid VERSION variable detected. Please use 'us') +endif + +ifeq ($(VERSION),jap) + BUILD_DEFINES += -DVERSION_JAP=1 endif ifeq ($(NON_MATCHING),1) diff --git a/tools/comptool.py b/tools/comptool.py index a2240bf9..d71abfe2 100644 --- a/tools/comptool.py +++ b/tools/comptool.py @@ -106,8 +106,9 @@ def find_file_table(ROM): return file_table_start +decomp_inds = [0, 1, 2, 3, 4, 5, 15, 16, 21, 22, 23, 24, 48] + def compress(baserom, comprom, mio0, extract_dest=None): - decomp_inds = [0, 1, 2, 3, 4, 5, 15, 16, 21, 22, 23, 24, 48] file_table = find_file_table(baserom) # comp_const = 0xFFFEFFFFFE1E7FC0 @@ -185,22 +186,14 @@ def compress(baserom, comprom, mio0, extract_dest=None): def decompress(baserom, decomprom, mio0, extract_dest=None, print_inds=False): file_table = find_file_table(baserom) - - if file_table_dict.get(file_table) == "US1.0": - ext = "rev0.z64" - elif file_table_dict.get(file_table) == "US1.1": - ext = "z64" - else: - ext = ('%X' % file_table) + ".z64" - + print("File table found at 0x%X" % file_table) print("Detected ROM version is " + file_table_dict.get(file_table, "Unknown")) - outrom = decomprom.replace("z64", ext) - with open(outrom, 'w+b') as decompfile, open(baserom, 'rb') as basefile: + with open(decomprom, 'w+b') as decompfile, open(baserom, 'rb') as basefile: file_count = 0 - decomp_inds = [] + decomp_file_inds = [] while True: file_entry = file_table + 0x10 * file_count @@ -226,7 +219,7 @@ def decompress(baserom, decomprom, mio0, extract_dest=None, print_inds=False): if comp_flag == 0: v_file_size = p_file_size - decomp_inds += [file_count] + decomp_file_inds += [file_count] dec_msg = 'uncompressed' elif comp_flag == 1: file_bytes = mio0_dec_bytes(file_bytes, mio0) @@ -242,15 +235,18 @@ def decompress(baserom, decomprom, mio0, extract_dest=None, print_inds=False): v_file_end = v_file_begin + v_file_size + file_name = file_names[file_count] + '.bin' + + print("name: " + file_name) + print("start: 0x%X" % v_file_begin) + if extract_dest is not None: if not os.path.exists(extract_dest): os.mkdir(extract_dest) - file_name = file_names[file_count] + '.bin' - with open(extract_dest + os.sep + file_name, 'wb') as extract_file: extract_file.write(file_bytes) - + decompfile.seek(file_entry + 4) decompfile.write(v_file_begin.to_bytes(4,'big')) decompfile.write(v_file_end.to_bytes(4,'big')) @@ -265,10 +261,12 @@ def decompress(baserom, decomprom, mio0, extract_dest=None, print_inds=False): decompfile.write(crc1.to_bytes(4, 'big')) decompfile.write(crc2.to_bytes(4, 'big')) print("Decompressed %d files." % file_count) - if(print_inds) : + if print_inds: print("These file numbers were not compressed:") - print(decomp_inds) - + print(decomp_file_inds) + elif decomp_file_inds != decomp_inds: + print("Warning: Unusual compression scheme. These files were uncompressed:") + print(decomp_file_inds) return parser = argparse.ArgumentParser(description='Compress or decompress a Star Fox 64 ROM') @@ -280,6 +278,7 @@ parser.add_argument('-d', action='store_true',help='decompress provided ROM') parser.add_argument('-m', metavar='mio0',dest='mio0',help='Path to mio0 tool if not in same directory') parser.add_argument('-r', action="store_true",help='Fix crc without compressing or decompressing') parser.add_argument('-i', action='store_true',help='Print indices of uncompressed files during decompression.') +parser.add_argument('-v', action='store_true',help='Print file names and offsets of decompressed files.') # parser.add_argument('-v', action='store_true',help='show what changes are made') if __name__ == '__main__': @@ -299,4 +298,3 @@ if __name__ == '__main__': else: print("Something went wrong.") - diff --git a/yamls/jp/rev0/assets.yaml b/yamls/jp/rev0/assets.yaml new file mode 100644 index 00000000..e1b4d396 --- /dev/null +++ b/yamls/jp/rev0/assets.yaml @@ -0,0 +1,3 @@ + - name: audio_seq + type: bin + start: 0xE9950 diff --git a/yamls/jp/rev0/header.yaml b/yamls/jp/rev0/header.yaml new file mode 100644 index 00000000..c7bbc0f6 --- /dev/null +++ b/yamls/jp/rev0/header.yaml @@ -0,0 +1,78 @@ +name: Starfox64 JAP REV 0 (v1.0) +sha1: d064229a32cc05ab85e2381ce07744eb3ffaf530 +options: + basename: starfox64 + target_path: baserom.jp.rev0.uncompressed.z64 + elf_path: build/starfox64.jp.rev0.elf + ld_script_path: linker_scripts/jp/rev0/starfox64.ld + base_path: . + compiler: IDO + find_file_boundaries: True + header_encoding: ASCII + platform: n64 + undefined_funcs_auto_path: linker_scripts/jp/rev0/auto/undefined_funcs_auto.ld + undefined_syms_auto_path: linker_scripts/jp/rev0/auto/undefined_syms_auto.ld + + symbol_addrs_path: + - linker_scripts/jp/rev0/symbol_addrs.txt + - linker_scripts/jp/rev0/symbol_addrs_engine.txt + - linker_scripts/jp/rev0/symbol_addrs_libultra.txt + - linker_scripts/jp/rev0/symbol_addrs_nlib_funcs.txt + - linker_scripts/jp/rev0/symbol_addrs_nlib_vars.txt + - linker_scripts/jp/rev0/symbol_addrs_assets.txt + - linker_scripts/jp/rev0/symbol_addrs_mesg.txt + - linker_scripts/jp/rev0/symbol_addrs_audio.txt + - linker_scripts/jp/rev0/symbol_addrs_overlays.txt + - linker_scripts/jp/rev0/symbol_addrs_EBFBE0.txt + - linker_scripts/jp/rev0/ignored_addresses.txt + + asm_path: asm/jp/rev0 + src_path: srcjp + asset_path: bin/jp/rev0 + + build_path: build + + extensions_path: tools/splat_ext + mips_abi_float_regs: o32 + create_asm_dependencies: True + do_c_func_detection: True + o_as_suffix: True + gfx_ucode: f3dex + mnemonic_ljust: 12 + rom_address_padding: True + dump_symbols: True + include_macro_inc: False + libultra_symbols: True + hardware_regs: True + + ld_dependencies: True + + + use_legacy_include_asm: False + + asm_function_macro: glabel + asm_jtbl_label_macro: jlabel + asm_data_macro: dlabel + + ld_legacy_generation: True + check_consecutive_segment_types: False + + # section_order: [".text", ".data", ".rodata", ".bss"] + # auto_all_sections: [".data", ".rodata", ".bss"] + + + + + mips_abi_float_regs: o32 + + + disasm_unknown: True + # string_encoding: ASCII + # data_string_encoding: ASCII + rodata_string_guesser_level: 2 + data_string_guesser_level: 2 + # libultra_symbols: True + # hardware_regs: True + # gfx_ucode: # one of [f3d, f3db, f3dex, f3dexb, f3dex2] +segments: + diff --git a/yamls/jp/rev0/main.yaml b/yamls/jp/rev0/main.yaml new file mode 100644 index 00000000..172578ae --- /dev/null +++ b/yamls/jp/rev0/main.yaml @@ -0,0 +1,197 @@ + - name: makerom + type: code + start: 0x0 + subsegments: + - {start: 0x0, type: header, name: header} + - {start: 0x40, type: textbin, name: ipl3} + - {start: 0x1000, type: asm, vram: 0x80000400, name: entry} + + + - name: main + type: code + start: 0x1050 + vram: 0x80000450 + #bss_size: 0x9B1F0 + subsegments: + # Microcode + - [0x01050, textbin, BOOT] + + # Nintendo libraries + - [0x3450, asm, sys] + - [0x3A90, asm] + - [0x41E0, asm] + - [0x4660, asm] + - [0x5A30, asm] + - [0x6460, asm] + - [0x7D00, asm] + - [0x7F10, asm] + - [0x8190, asm] + - [0x8E70, asm] + - [0xCA20, asm] + - [0xF250, asm] + - [0x125B0, asm] + - [0x14BC0, asm] + - [0x17770, asm] + - [0x1EC30, asm] + - [0x1FB40, asm] + - [0x1FB50, asm] + - [0x1FBF0, asm] + - [0x206C0, asm] + - [0x20C90, asm] + - [0x21050, asm] + - [0x212B0, asm] + - [0x213F0, asm] + - [0x21540, asm] + - [0x215F0, asm] + - [0x21880, asm] + - [0x21D70, asm] + - [0x21DF0, asm] + - [0x21EA0, asm] + - [0x21FB0, asm] + - [0x22050, asm] + - [0x22150, asm] + - [0x221C0, asm] + - [0x22380, asm] + - [0x223B0, asm] + - [0x22420, asm] + - [0x22490, asm] + - [0x227F0, asm] + - [0x22800, asm] + - [0x22950, asm] + - [0x22E00, asm] + - [0x22F90, asm] + - [0x233A0, asm] + - [0x233B0, asm] + - [0x236E0, asm] + - [0x237C0, asm] + - [0x23AC0, asm] + - [0x242D0, asm] + - [0x24370, asm] + - [0x25030, asm] + - [0x25060, asm] + - [0x25070, asm] + - [0x252A0, asm] + - [0x25380, asm] + - [0x25390, asm] + - [0x25440, asm] + - [0x25450, asm] + - [0x25780, asm] + - [0x258F0, asm] + - [0x25DE0, asm] + - [0x26190, asm] + - [0x26D30, asm] + - [0x26EB0, asm] + - [0x27000, asm] + - [0x27010, asm] + - [0x27020, asm] + - [0x27330, asm] + - [0x273B0, asm] + - [0x27430, asm] + - [0x27470, asm] + - [0x27500, asm] + - [0x27530, asm] + - [0x27950, asm] + - [0x27960, asm] + - [0x27CC0, asm] + - [0x283F0, asm] + - [0x284A0, asm] + - [0x28500, asm] + - [0x28560, asm] + - [0x28600, asm] + - [0x28E80, asm] + - [0x29120, asm] + - [0x29BE0, asm] + - [0x29C40, asm] + - [0x2A1D0, asm] + - [0x2A370, asm] + - [0x2A430, asm] + - [0x2A440, asm] + - [0x2A4A0, asm] + - [0x2A4F0, asm] + - [0x2A590, asm] + - [0x2A5E0, asm] + - [0x2A6D0, asm] + - [0x2A860, asm] + - [0x337A0, asm] + - [0x40940, asm] + - [0x40D00, asm] + - [0x565D0, asm, fox_load] + - [0x570F0, asm] + - [0x68190, asm] + - [0x81D10, asm] + - [0x822D0, asm] + - [0x94EA0, asm] + - [0x9F480, asm] + - [0xA1B10, asm] + - [0xB8370, asm] + - [0xBA0A0, asm] + - [0xBA350, asm] + - [0xC0580, asm] + - [0xC0D00, asm] + - [0xC1030, data] + - [0xC5CA4, rodata] + - [0xC6FF4, rodata] + - [0xC73D4, rodata] + - [0xC7534, rodata] + - [0xC7604, rodata] + - [0xC76B4, rodata] + - [0xC7954, rodata] + - [0xC7994, rodata] + - [0xC79D4, rodata] + - [0xC79F4, rodata] + - [0xC7AD4, rodata] + - [0xC7AF4, rodata] + - [0xC8014, rodata] + - [0xC8144, rodata] + - [0xC8274, rodata] + - [0xC83A4, rodata] + - [0xC8734, rodata] + - [0xC8864, rodata] + - [0xC8994, rodata] + - [0xC8BF4, rodata] + - [0xC8D24, rodata] + - [0xC8E54, rodata] + - [0xC90B4, rodata] + - [0xC9314, rodata] + - [0xC9574, rodata] + - [0xC9594, rodata] + - [0xCD104, rodata] + - [0xCD4A4, rodata] + - [0xCD4D4, rodata] + - [0xCD6F4, rodata] + - [0xCD7A4, rodata] + - [0xCECD4, rodata] + - [0xCF084, rodata] + - [0xCF194, rodata] + - [0xCF8C4, rodata] + - [0xCF924, rodata] + - [0xCF934, rodata] + - [0xCFAB4, rodata] + - [0xD0854, rodata] + - [0xD09F4, rodata] + - [0xD0A64, rodata] + - [0xD25A4, rodata] + - [0xD58F4, rodata] + - [0xD5AD4, rodata] + - [0xD5B04, rodata] + - [0xD5C14, rodata] + - [0xD5D24, rodata] + - [0xD6084, rodata] + - [0xD6F04, rodata] + - [0xD7ED4, rodata] + - [0xD82A4, rodata] + - [0xD8824, rodata] + - [0xD89E4, rodata] + - [0xD93D4, rodata] + - [0xDA0B4, rodata] + - [0xE8D44, rodata] + + - name: dma_table + type: code + start: 0xE93C0 + vram: 0x8017E210 + #follows_vram: main + subsegments: + - [0xE93C0, .data, dmatable] + + diff --git a/yamls/jp/rev0/overlays.yaml b/yamls/jp/rev0/overlays.yaml new file mode 100644 index 00000000..2d326f1b --- /dev/null +++ b/yamls/jp/rev0/overlays.yaml @@ -0,0 +1,110 @@ + - name: ovl_i1 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i1 + start: 0xDA9680 + vram: 0x8017E7A0 + #follows_vram: ast_radio + #bss_size: 0xA10 + symbol_name_format: i1_$VRAM + subsegments: + - [0xDA9680, c, fox_i1] + - [0xDB4240, c] + - [0xDBADB0, c] + + - name: ovl_i2 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i2 + start: 0xDBD820 + vram: 0x8017E7A0 + #follows_vram: ast_radio + #bss_size: 0x40 + symbol_name_format: i2_$VRAM + subsegments: + - [0xDBD820, c, fox_i2] + + - name: ovl_i3 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i3 + start: 0xDCC020 + vram: 0x8017E7A0 + #follows_vram: ast_radio + #bss_size: 0x2220 + symbol_name_format: i3_$VRAM + subsegments: + - [0xDCC020, c, fox_i3] + - [0xDE3300, c] + - [0xDED940, c] + - [0xE037E0, c] + + - name: ovl_i4 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i4 + start: 0xE06D70 + vram: 0x8017E7A0 + #follows_vram: ast_radio + #bss_size: 0x1B0 + symbol_name_format: i4_$VRAM + subsegments: + - [0xE06D70, c, fox_i4] + - [0xE06E40, c] + - [0xE0B580, c] + - [0xE18DD0, c] + - [0xE1E2B0, c] + + - name: ovl_i5 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i5 + start: 0xE1F870 + vram: 0x8017E7A0 + #follows_vram: ast_radio + #bss_size: 0xAF80 + symbol_name_format: i5_$VRAM + subsegments: + - [0xE1F870, c, fox_i5] + - [0xE21280, c] + - [0xE4F680, c] + + - name: ovl_i6 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i6 + start: 0xE542C0 + vram: 0x8017E7A0 + #follows_vram: ast_radio + #bss_size: 0x520 + symbol_name_format: i6_$VRAM + subsegments: + - [0xE542C0, c, fox_i6] + + - name: ovl_menu + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_menu + start: 0xE74D00 + vram: 0x8017E7A0 + #follows_vram: ast_radio + #bss_size: 0x17590 + symbol_name_format: menu_$VRAM + subsegments: + - [0xE74D00, c, fox_i_menu] + + - name: ovl_ending + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_ending + start: 0xEA5610 + vram: 0x8017E7A0 + #follows_vram: ast_radio + #bss_size: 0x2710 + symbol_name_format: ending_$VRAM + subsegments: + - [0xEA5610, c, fox_end1] + - [0xEAAF10, c] + - [0xEB0800, c] + + - [0xEB4CA0] \ No newline at end of file diff --git a/yamls/us/rev0/assets.yaml b/yamls/us/rev0/assets.yaml new file mode 100644 index 00000000..e69de29b diff --git a/yamls/us/rev0/header.yaml b/yamls/us/rev0/header.yaml new file mode 100644 index 00000000..e69de29b diff --git a/yamls/us/rev0/main.yaml b/yamls/us/rev0/main.yaml new file mode 100644 index 00000000..e69de29b diff --git a/yamls/us/rev0/overlays.yaml b/yamls/us/rev0/overlays.yaml new file mode 100644 index 00000000..e69de29b diff --git a/yamls/us/rev1/header.yaml b/yamls/us/rev1/header.yaml index 4fae471b..3827d794 100644 --- a/yamls/us/rev1/header.yaml +++ b/yamls/us/rev1/header.yaml @@ -1,7 +1,4 @@ name: Starfox64 US REV 1 (v1.1) -# baserom compressed -# sha1: 09f0d105f476b00efa5303a3ebc42e60a7753b7a -# baserom uncompressed sha1: f7475fb11e7e6830f82883412638e8390791ab87 options: basename: starfox64 From e8814048b3b020d41405dd87048cca8afe0c1b84 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Sun, 12 May 2024 01:23:02 -0300 Subject: [PATCH 076/151] fix progress script --- tools/progress.py | 2 +- yamls/jp/rev0/overlays.yaml | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/tools/progress.py b/tools/progress.py index d840954c..5985f625 100755 --- a/tools/progress.py +++ b/tools/progress.py @@ -11,7 +11,7 @@ script_dir = os.path.dirname(os.path.realpath(__file__)) root_dir = os.path.join(script_dir, "..") asm_dir = os.path.join(root_dir, "asm", "us", "nonmatchings") build_dir = os.path.join(root_dir, "build") -elf_path = os.path.join(build_dir, "starfox64.us.elf") +elf_path = os.path.join(build_dir, "starfox64.us.rev1.elf") def get_func_sizes(): try: diff --git a/yamls/jp/rev0/overlays.yaml b/yamls/jp/rev0/overlays.yaml index 2d326f1b..f29db110 100644 --- a/yamls/jp/rev0/overlays.yaml +++ b/yamls/jp/rev0/overlays.yaml @@ -105,6 +105,17 @@ subsegments: - [0xEA5610, c, fox_end1] - [0xEAAF10, c] - - [0xEB0800, c] + + - name: ovl_unused + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_unused + start: 0xEB0800 + vram: 0x8017E7A0 + #follows_vram: ast_radio + #bss_size: 0x10 + symbol_name_format: unused_$VRAM + subsegments: + - [0xEB0800, c, fox_unused] - [0xEB4CA0] \ No newline at end of file From ea3a09909f4fad767fa9de31be0f7d98235b719e Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Sun, 12 May 2024 01:30:03 -0300 Subject: [PATCH 077/151] fix progress script (this time for real) --- tools/progress.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/progress.py b/tools/progress.py index 5985f625..1015ba6d 100755 --- a/tools/progress.py +++ b/tools/progress.py @@ -9,7 +9,7 @@ from colour import Color script_dir = os.path.dirname(os.path.realpath(__file__)) root_dir = os.path.join(script_dir, "..") -asm_dir = os.path.join(root_dir, "asm", "us", "nonmatchings") +asm_dir = os.path.join(root_dir, "asm", "us", "rev1", "nonmatchings") build_dir = os.path.join(root_dir, "build") elf_path = os.path.join(build_dir, "starfox64.us.rev1.elf") From 7168299be41a17521eb67f7f66e31b06b154800f Mon Sep 17 00:00:00 2001 From: petrie911 <69443847+petrie911@users.noreply.github.com> Date: Sun, 12 May 2024 10:45:33 -0500 Subject: [PATCH 078/151] decompression also prints file offsets for yaml (#240) * verbose * indices --- Makefile | 10 ++--- tools/comptool.py | 100 +++++++++++++++++++++++++++++++++------------- 2 files changed, 77 insertions(+), 33 deletions(-) diff --git a/Makefile b/Makefile index f9ca301f..5d3572fa 100644 --- a/Makefile +++ b/Makefile @@ -122,12 +122,10 @@ BUILD_DEFINES ?= ifeq ($(VERSION),us) BUILD_DEFINES += -DVERSION_US=1 -# else -# $(error Invalid VERSION variable detected. Please use 'us') endif -ifeq ($(VERSION),jap) - BUILD_DEFINES += -DVERSION_JAP=1 +ifeq ($(VERSION),jp) + BUILD_DEFINES += -DVERSION_JP=1 endif ifeq ($(NON_MATCHING),1) @@ -419,11 +417,11 @@ endif decompress: $(BASEROM) @echo "Decompressing ROM..." - @$(PYTHON) $(COMPTOOL) -die $(COMPTOOL_DIR) -m $(MIO0) $(BASEROM) $(BASEROM_UNCOMPRESSED) + @$(PYTHON) $(COMPTOOL) $(DECOMPRESS_OPT) -de $(COMPTOOL_DIR) -m $(MIO0) $(BASEROM) $(BASEROM_UNCOMPRESSED) compress: $(BASEROM) @echo "Compressing ROM..." - @$(PYTHON) $(COMPTOOL) -c -m $(MIO0) $(ROM) $(ROMC) + @$(PYTHON) $(COMPTOOL) $(COMPRESS_OPT) -c -m $(MIO0) $(ROM) $(ROMC) extract: @$(RM) -r asm/$(VERSION)/$(REV) bin/$(VERSION)/$(REV) diff --git a/tools/comptool.py b/tools/comptool.py index d71abfe2..5054175f 100644 --- a/tools/comptool.py +++ b/tools/comptool.py @@ -6,9 +6,9 @@ import struct import argparse import sys -file_table_dict = {0xDE480:"US1.1", 0xD9A90:"US1.0"} +file_table_dict = {0xDE480:"US1.1", 0xD9A90:"US1.0", 0xE93C0:"JP1.0"} -file_names = [ +file_names_us = [ "makerom", "main", "dma_table", "audio_seq", "audio_bank", "audio_table", "ast_common", "ast_bg_space", "ast_bg_planet", "ast_arwing", "ast_landmaster", "ast_blue_marine", "ast_versus", "ast_enmy_planet", "ast_enmy_space", "ast_great_fox", "ast_star_wolf", "ast_allies", "ast_corneria", "ast_meteo", "ast_titania", "ast_7_ti_2", "ast_8_ti", "ast_9_ti", "ast_A_ti", @@ -19,6 +19,19 @@ file_names = [ "ovl_i3", "ovl_i4", "ovl_i5", "ovl_i6", "ovl_menu", "ovl_ending", "ovl_unused" ] +file_names_jp = [ + "makerom", "main", "dma_table", "audio_seq", "audio_bank", "audio_table", "ast_common", "ast_bg_space", "ast_bg_planet", + "ast_arwing", "ast_landmaster", "ast_blue_marine", "ast_versus", "ast_enmy_planet", "ast_enmy_space", "ast_great_fox", + "ast_star_wolf", "ast_allies", "ast_corneria", "ast_meteo", "ast_titania", "ast_7_ti_2", "ast_8_ti", "ast_9_ti", "ast_A_ti", + "ast_7_ti_1", "ast_sector_x", "ast_sector_z", "ast_aquas", "ast_area_6", "ast_venom_1", "ast_venom_2", "ast_ve1_boss", + "ast_bolse", "ast_fortuna", "ast_sector_y", "ast_solar", "ast_zoness", "ast_katina", "ast_macbeth", "ast_warp_zone", + "ast_title", "ast_map", "ast_option", "ast_vs_menu", "ast_font", "ast_font_3d", "ast_andross", "ast_logo", "ast_ending", + "ast_ending_award_front", "ast_ending_award_back", "ast_reward", "ast_training", "ovl_i1", "ovl_i2", + "ovl_i3", "ovl_i4", "ovl_i5", "ovl_i6", "ovl_menu", "ovl_ending", "ovl_unused" + ] + +file_names_critical = {"makerom", "main", "dma_table", "audio_seq", "audio_bank", "audio_table"} + def int32(x): return x & 0xFFFFFFFF @@ -108,8 +121,15 @@ def find_file_table(ROM): decomp_inds = [0, 1, 2, 3, 4, 5, 15, 16, 21, 22, 23, 24, 48] -def compress(baserom, comprom, mio0, extract_dest=None): - file_table = find_file_table(baserom) +def compress(baserom, comprom, mio0, dma_table=None, verbose=False): + if dma_table: + file_table = int(dma_table, 0) + print("Using provided DMA table offset 0x%X" % file_table) + else: + file_table = find_file_table(baserom) + print("DMA table found at 0x%X" % file_table) + + print("Detected ROM version is " + file_table_dict.get(file_table, "Unknown")) # comp_const = 0xFFFEFFFFFE1E7FC0 @@ -134,8 +154,13 @@ def compress(baserom, comprom, mio0, extract_dest=None): compfile.truncate(p_file_begin) file_bytes = basefile.read(v_file_size) + + if file_table_dict.get(file_table).startswith("JP"): + file_name = file_names_jp[file_count] + else: + file_name = file_names_us[file_count] - if (file_count in decomp_inds) or (file_count <= 5): + if (file_count in decomp_inds) or (file_name in file_names_critical): # if (1 << file_count) & comp_flags: p_file_size = v_file_size dec_msg = 'uncompressed' @@ -152,8 +177,8 @@ def compress(baserom, comprom, mio0, extract_dest=None): comp_flag = 1 compfile.seek(0, 2) - - # print("File " + str(file_count) + ": Writing " + format(p_file_size, 'X') + " bytes at " + format(compfile.tell(),'X')) + if verbose: + print("File " + file_name + ": Writing 0x%X " + dec_msg + " bytes at 0x%X" % (p_file_size, compfile.tell())) compfile.write(file_bytes) @@ -184,12 +209,20 @@ def compress(baserom, comprom, mio0, extract_dest=None): return -def decompress(baserom, decomprom, mio0, extract_dest=None, print_inds=False): - file_table = find_file_table(baserom) - - print("File table found at 0x%X" % file_table) - print("Detected ROM version is " + file_table_dict.get(file_table, "Unknown")) - +def decompress(baserom, decomprom, mio0, extract_dest=None, dma_table=None, print_inds=False, verbose=False): + if dma_table: + file_table = int(dma_table, 0) + print("Using provided DMA table offset 0x%X" % file_table) + else: + file_table = find_file_table(baserom) + print("DMA table found at 0x%X" % file_table) + + if file_table_dict.get(file_table): + version = file_table_dict.get(file_table) + print("Detected ROM version is " + version) + else: + print("Could not detect version.") + version = "Unknown" with open(decomprom, 'w+b') as decompfile, open(baserom, 'rb') as basefile: file_count = 0 @@ -226,7 +259,7 @@ def decompress(baserom, decomprom, mio0, extract_dest=None, print_inds=False): dec_msg = 'compressed' v_file_size = len(file_bytes) else: - print('Invalid compression flag. Invalid ROM? Make sure ROM version is US v1.1 (REV A)') + print('Invalid compression flag. There may be a problem with your ROM.') sys.exit(2) decompfile.seek(0, 2) @@ -235,16 +268,26 @@ def decompress(baserom, decomprom, mio0, extract_dest=None, print_inds=False): v_file_end = v_file_begin + v_file_size - file_name = file_names[file_count] + '.bin' + if file_table_dict.get(file_table).startswith("JP"): + file_name = file_names_jp[file_count] + else: + file_name = file_names_us[file_count] - print("name: " + file_name) - print("start: 0x%X" % v_file_begin) + if(verbose): + print("name: " + file_name) + print("start: 0x%X" % v_file_begin) if extract_dest is not None: if not os.path.exists(extract_dest): os.mkdir(extract_dest) - - with open(extract_dest + os.sep + file_name, 'wb') as extract_file: + + if version == "Unknown": + suffix = "%X" % file_table + else: + suffix = version.replace("1.", ".rev").lower() + + out_file_name = file_name + "." + suffix + ".bin" + with open(extract_dest + os.sep + out_file_name, 'wb') as extract_file: extract_file.write(file_bytes) decompfile.seek(file_entry + 4) @@ -260,8 +303,10 @@ def decompress(baserom, decomprom, mio0, extract_dest=None, print_inds=False): decompfile.seek(0x10) decompfile.write(crc1.to_bytes(4, 'big')) decompfile.write(crc2.to_bytes(4, 'big')) - print("Decompressed %d files." % file_count) - if print_inds: + print("Found %d files." % file_count) + if len(decomp_file_inds) == file_count: + print("Provided ROM was uncompressed.") + elif print_inds or verbose: print("These file numbers were not compressed:") print(decomp_file_inds) elif decomp_file_inds != decomp_inds: @@ -272,14 +317,15 @@ def decompress(baserom, decomprom, mio0, extract_dest=None, print_inds=False): parser = argparse.ArgumentParser(description='Compress or decompress a Star Fox 64 ROM') parser.add_argument('inROM', help="ROM file to compress or decompress") parser.add_argument('outROM', help="output file for processed ROM.") -parser.add_argument('-e', metavar='extract',dest='extract',help='directory for extracted decompressed files. Use with -d') parser.add_argument('-c', action='store_true',help='compress provided ROM') parser.add_argument('-d', action='store_true',help='decompress provided ROM') -parser.add_argument('-m', metavar='mio0',dest='mio0',help='Path to mio0 tool if not in same directory') +parser.add_argument('-e', metavar='extract',dest='extract',help='directory for extracted decompressed files. Use with -d') parser.add_argument('-r', action="store_true",help='Fix crc without compressing or decompressing') +parser.add_argument('-m', metavar='mio0',dest='mio0',help='Path to mio0 tool if not in same directory') parser.add_argument('-i', action='store_true',help='Print indices of uncompressed files during decompression.') -parser.add_argument('-v', action='store_true',help='Print file names and offsets of decompressed files.') -# parser.add_argument('-v', action='store_true',help='show what changes are made') +parser.add_argument('-v', action='store_true',help='Print details about the ROM files.') +parser.add_argument('-t', metavar='dma_table', dest='dma_table',help='Provide DMA table explicitly instead of autodetecting') + if __name__ == '__main__': args = parser.parse_args() @@ -292,9 +338,9 @@ if __name__ == '__main__': if args.r: fix_crc(args.inROM) elif args.c: - compress(args.inROM, args.outROM, mio0) + compress(args.inROM, args.outROM, mio0, dma_table=args.dma_table, verbose=args.v) elif args.d or args.extract: - decompress(args.inROM, args.outROM, mio0, args.extract, args.i) + decompress(args.inROM, args.outROM, mio0, extract_dest=args.extract, dma_table=args.dma_table, print_inds=args.i, verbose=args.v) else: print("Something went wrong.") From 1f452ce23240f73967dcbcb3c69f216050cbb91a Mon Sep 17 00:00:00 2001 From: petrie911 <69443847+petrie911@users.noreply.github.com> Date: Sun, 12 May 2024 11:18:36 -0500 Subject: [PATCH 079/151] Forgot an update to first_diff (#242) * verbose * indices * small updates --- first_diff.py | 6 +++--- src/mods/levelselect.c | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/first_diff.py b/first_diff.py index a2ff93e4..71b8d63d 100755 --- a/first_diff.py +++ b/first_diff.py @@ -46,10 +46,10 @@ def firstDiffMain(): buildFolder = Path("build") - BUILTROM = Path(buildFolder / f"starfox64.us.uncompressed.z64") - BUILTMAP = buildFolder / f"starfox64.us.map" + BUILTROM = Path(buildFolder / f"starfox64.us.rev1.uncompressed.z64") + BUILTMAP = buildFolder / f"starfox64.us.rev1.map" - EXPECTEDROM = Path("baserom.us.uncompressed.z64") + EXPECTEDROM = Path("baserom.us.rev1.uncompressed.z64") EXPECTEDMAP = "expected" / BUILTMAP mapfile_parser.frontends.first_diff.doFirstDiff(BUILTMAP, EXPECTEDMAP, BUILTROM, EXPECTEDROM, args.count, mismatchSize=True, addColons=args.add_colons, bytesConverterCallback=decodeInstruction) diff --git a/src/mods/levelselect.c b/src/mods/levelselect.c index 1a515339..22496015 100644 --- a/src/mods/levelselect.c +++ b/src/mods/levelselect.c @@ -28,6 +28,8 @@ void Map_LevelSelect(void) { "ZONESS", "CORNERIA", "TITANIA", "AQUAS", "FORTUNA", "VENOM 1", "SOLAR", "VENOM 2", }; static s32 startOption = 0; + // static f32 zStart = 0.0f; + // f32 zInc; s32 nextPlanetId; if (gControllerPress[0].button & L_JPAD) { @@ -70,6 +72,25 @@ void Map_LevelSelect(void) { startOption ^= 1; } + // if (gControllerPress[0].button & U_CBUTTONS) { + // zInc = 100.0f; + // } else if (gControllerPress[0].button & R_CBUTTONS) { + // zInc = 1000.0f; + // } else if (gControllerPress[0].button & D_CBUTTONS) { + // zInc = -100.0f; + // } else if (gControllerPress[0].button & L_CBUTTONS) { + // zInc = -1000.0f; + // } + // if (gControllerHold[0].button & R_TRIG) { + // zInc *= 100.0f; + // } + // zStart += zInc; + // if(zStart < 0.0f) { + // zStart = 0.0f; + // } else if (zStart > 500000.0f) { + // zStart = 500000.0f; + // } + /* Draw */ if ((sCurrentPlanetId >= 0) && (sCurrentPlanetId < PLANET_MAX)) { RCP_SetupDL(&gMasterDisp, 0x53); @@ -108,5 +129,6 @@ void Map_LevelSelect(void) { (sPlanetArray[mission][difficulty] == SAVE_SLOT_VENOM_2))) { gLevelPhase = 1; } + // gSavedPathProgress = gPathProgress = zStart; } } From 5d58edf4dd9c236ccfc63a9116ffad0c7604fc24 Mon Sep 17 00:00:00 2001 From: petrie911 <69443847+petrie911@users.noreply.github.com> Date: Sun, 12 May 2024 15:46:26 -0500 Subject: [PATCH 080/151] splits (#243) --- yamls/jp/rev0/main.yaml | 386 ++++++++++++++++++++---------------- yamls/jp/rev0/overlays.yaml | 28 ++- 2 files changed, 244 insertions(+), 170 deletions(-) diff --git a/yamls/jp/rev0/main.yaml b/yamls/jp/rev0/main.yaml index 172578ae..061adf30 100644 --- a/yamls/jp/rev0/main.yaml +++ b/yamls/jp/rev0/main.yaml @@ -17,174 +17,224 @@ - [0x01050, textbin, BOOT] # Nintendo libraries - - [0x3450, asm, sys] - - [0x3A90, asm] - - [0x41E0, asm] - - [0x4660, asm] - - [0x5A30, asm] - - [0x6460, asm] - - [0x7D00, asm] - - [0x7F10, asm] - - [0x8190, asm] - - [0x8E70, asm] - - [0xCA20, asm] - - [0xF250, asm] - - [0x125B0, asm] - - [0x14BC0, asm] - - [0x17770, asm] - - [0x1EC30, asm] - - [0x1FB40, asm] - - [0x1FB50, asm] - - [0x1FBF0, asm] - - [0x206C0, asm] - - [0x20C90, asm] - - [0x21050, asm] - - [0x212B0, asm] - - [0x213F0, asm] - - [0x21540, asm] - - [0x215F0, asm] - - [0x21880, asm] - - [0x21D70, asm] - - [0x21DF0, asm] - - [0x21EA0, asm] - - [0x21FB0, asm] - - [0x22050, asm] - - [0x22150, asm] - - [0x221C0, asm] - - [0x22380, asm] - - [0x223B0, asm] - - [0x22420, asm] - - [0x22490, asm] - - [0x227F0, asm] - - [0x22800, asm] - - [0x22950, asm] - - [0x22E00, asm] - - [0x22F90, asm] - - [0x233A0, asm] - - [0x233B0, asm] - - [0x236E0, asm] - - [0x237C0, asm] - - [0x23AC0, asm] - - [0x242D0, asm] - - [0x24370, asm] - - [0x25030, asm] - - [0x25060, asm] - - [0x25070, asm] - - [0x252A0, asm] - - [0x25380, asm] - - [0x25390, asm] - - [0x25440, asm] - - [0x25450, asm] - - [0x25780, asm] - - [0x258F0, asm] - - [0x25DE0, asm] - - [0x26190, asm] - - [0x26D30, asm] - - [0x26EB0, asm] - - [0x27000, asm] - - [0x27010, asm] - - [0x27020, asm] - - [0x27330, asm] - - [0x273B0, asm] - - [0x27430, asm] - - [0x27470, asm] - - [0x27500, asm] - - [0x27530, asm] - - [0x27950, asm] - - [0x27960, asm] - - [0x27CC0, asm] - - [0x283F0, asm] - - [0x284A0, asm] - - [0x28500, asm] - - [0x28560, asm] - - [0x28600, asm] - - [0x28E80, asm] - - [0x29120, asm] - - [0x29BE0, asm] - - [0x29C40, asm] - - [0x2A1D0, asm] - - [0x2A370, asm] - - [0x2A430, asm] - - [0x2A440, asm] - - [0x2A4A0, asm] - - [0x2A4F0, asm] - - [0x2A590, asm] - - [0x2A5E0, asm] - - [0x2A6D0, asm] - - [0x2A860, asm] - - [0x337A0, asm] - - [0x40940, asm] - - [0x40D00, asm] - - [0x565D0, asm, fox_load] - - [0x570F0, asm] - - [0x68190, asm] - - [0x81D10, asm] - - [0x822D0, asm] - - [0x94EA0, asm] - - [0x9F480, asm] - - [0xA1B10, asm] - - [0xB8370, asm] - - [0xBA0A0, asm] - - [0xBA350, asm] - - [0xC0580, asm] - - [0xC0D00, asm] - - [0xC1030, data] - - [0xC5CA4, rodata] - - [0xC6FF4, rodata] - - [0xC73D4, rodata] - - [0xC7534, rodata] - - [0xC7604, rodata] - - [0xC76B4, rodata] - - [0xC7954, rodata] - - [0xC7994, rodata] - - [0xC79D4, rodata] - - [0xC79F4, rodata] - - [0xC7AD4, rodata] - - [0xC7AF4, rodata] - - [0xC8014, rodata] - - [0xC8144, rodata] - - [0xC8274, rodata] - - [0xC83A4, rodata] - - [0xC8734, rodata] - - [0xC8864, rodata] - - [0xC8994, rodata] - - [0xC8BF4, rodata] - - [0xC8D24, rodata] - - [0xC8E54, rodata] - - [0xC90B4, rodata] - - [0xC9314, rodata] - - [0xC9574, rodata] - - [0xC9594, rodata] - - [0xCD104, rodata] - - [0xCD4A4, rodata] - - [0xCD4D4, rodata] - - [0xCD6F4, rodata] - - [0xCD7A4, rodata] - - [0xCECD4, rodata] - - [0xCF084, rodata] - - [0xCF194, rodata] - - [0xCF8C4, rodata] - - [0xCF924, rodata] - - [0xCF934, rodata] - - [0xCFAB4, rodata] - - [0xD0854, rodata] - - [0xD09F4, rodata] - - [0xD0A64, rodata] - - [0xD25A4, rodata] - - [0xD58F4, rodata] - - [0xD5AD4, rodata] - - [0xD5B04, rodata] - - [0xD5C14, rodata] - - [0xD5D24, rodata] - - [0xD6084, rodata] - - [0xD6F04, rodata] - - [0xD7ED4, rodata] - - [0xD82A4, rodata] - - [0xD8824, rodata] - - [0xD89E4, rodata] - - [0xD93D4, rodata] - - [0xDA0B4, rodata] - - [0xE8D44, rodata] + - [ 0x3450, asm, sys/sys_joybus] + - [ 0x3A90, asm, sys/sys_lib] + - [ 0x41E0, asm, sys/sys_lights] + - [ 0x4660, asm, sys/sys_main] + - [ 0x5A30, asm, sys/sys_math] + - [ 0x6460, asm, sys/sys_matrix] + - [ 0x7D00, asm, sys/sys_memory] + - [ 0x7D40, asm, sys/sys_timer] + - [ 0x7F10, asm, sys/sys_save] + - [ 0x8190, asm, sys/sys_fault] + - [ 0x8E70, asm, audio/audio_synthesis] + - [ 0xCA20, asm, audio/audio_heap] + - [ 0xF250, asm, audio/audio_load] + - [0x125B0, asm, audio/audio_playback] + - [0x14120, asm, audio/audio_effects] + - [0x14BC0, asm, audio/audio_seqplayer] + - [0x17770, asm, audio/audio_general] + - [0x1EC30, asm, audio/audio_thread] + - [0x1FB40, asm, 1FA60] + - [0x1FB50, asm, mio0] + - [0x1FBF0, asm, rdramcheck] + - [0x206C0, asm, libc_sprintf] + - [0x20760, asm] # libultra + - [0x20C90, asm] # libultra + - [0x21050, asm] # libultra + - [0x212B0, asm] # libultra + - [0x213F0, asm] # libultra + - [0x21540, asm] # libultra + - [0x215F0, asm] # libultra + - [0x21880, asm] # libultra + - [0x21D70, asm] # libultra + - [0x21DF0, asm] # libultra + - [0x21EA0, asm] # libultra + - [0x21FB0, asm] # libultra + - [0x22050, asm] # libultra + - [0x22150, asm] # libultra + - [0x221C0, asm] # libultra + - [0x22380, asm] # libultra + - [0x223B0, asm] # libultra + - [0x22420, asm] # libultra + - [0x22490, asm] # libultra + - [0x227F0, asm] # libultra + - [0x22800, asm] # libultra + - [0x22950, asm] # libultra + - [0x22E00, asm] # libultra + - [0x22F90, asm] # libultra + - [0x233A0, asm] # libultra + - [0x233B0, asm] # libultra + - [0x236E0, asm] # libultra + - [0x237C0, asm] # libultra + - [0x23AC0, asm] # libultra + - [0x242D0, asm] # libultra + - [0x24370, asm] # libultra + - [0x25030, asm] # libultra + - [0x25060, asm] # libultra + - [0x25070, asm] # libultra + - [0x252A0, asm] # libultra + - [0x25380, asm] # libultra + - [0x25390, asm] # libultra + - [0x25440, asm] # libultra + - [0x25450, asm] # libultra + - [0x25780, asm] # libultra + - [0x258F0, asm] # libultra + - [0x25DE0, asm] # libultra + - [0x26190, asm] # libultra + - [0x26D30, asm] # libultra + - [0x26EB0, asm] # libultra + - [0x27000, asm] # libultra + - [0x27010, asm] # libultra + - [0x27020, asm] # libultra + - [0x27330, asm] # libultra + - [0x273B0, asm] # libultra + - [0x27430, asm] # libultra + - [0x27470, asm] # libultra + - [0x27500, asm] # libultra + - [0x27530, asm] # libultra + - [0x27950, asm] # libultra + - [0x27960, asm] # libultra + - [0x27CC0, asm] # libultra + - [0x283F0, asm] # libultra + - [0x284A0, asm] # libultra + - [0x28500, asm] # libultra + - [0x28560, asm] # libultra + - [0x28600, asm] # libultra + - [0x28E80, asm] # libultra + - [0x29120, asm] # libultra + - [0x29BE0, asm] # libultra + - [0x29C40, asm] # libultra + - [0x2A1D0, asm] # libultra + - [0x2A370, asm] # libultra + - [0x2A430, asm] # libultra + - [0x2A440, asm] # libultra + - [0x2A4A0, asm] # libultra + - [0x2A4F0, asm] # libultra + - [0x2A590, asm] # libultra + - [0x2A5E0, asm] # libultra + - [0x2A6D0, asm] # libultra + - [0x2A860, asm] # libultra + - [0x2BF20, asm, engine/fox_360] + - [0x337A0, asm, engine/fox_beam] + - [0x3B560, asm, engine/fox_bg] + - [0x40940, asm, engine/fox_boss] + - [0x40D00, asm, engine/fox_tank] + - [0x46540, asm, engine/fox_demo] + - [0x4F580, asm, engine/fox_display] + - [0x565D0, asm, engine/fox_load] + - [0x56F20, asm, engine/fox_edata] + - [0x570F0, asm, engine/fox_edisplay] + - [0x5E8F0, asm, engine/fox_enmy] + - [0x68190, asm, engine/fox_enmy2] + - [0x74BE0, asm, engine/fox_effect] + - [0x81D10, asm, engine/fox_fade] + - [0x82090, asm, engine/fox_852F0] + - [0x822D0, asm, engine/fox_hud] + - [0x94EA0, asm, engine/fox_97F80] + - [0x974A0, asm, engine/fox_std_lib] + - [0x9F480, asm, engine/fox_game] + - [0xA1250, asm, engine/fox_A4290] + - [0xA1860, asm, engine/fox_A48A0] + - [0xA1B10, asm, engine/fox_play] + - [0xB69E0, asm, engine/fox_rcp] + - [0xB8370, asm, engine/fox_radio] + - [0xBA0A0, asm, engine/fox_reset] + - [0xBA350, asm, engine/fox_vs] + - [0xC0580, asm, engine/fox_message] + - [0xC0D00, asm, engine/fox_save] + - [0xC1030, data] # microcode + - [0xC2320, data, sys/sys_main] + - [0xC2330, data, sys/sys_math] + - [0xC2370, data, sys/sys_matrix] + - [0xC2440, data, sys/sys_fault] + - [0xC2620, data, audio/audio_synthesis] + - [0xC2700, data, audio/audio_heap] + - [0xC2CA0, data, audio/audio_load] + - [0xC3290, data, audio/audio_playback] # could be C6110? + - [0xC3670, data, audio/audio_effects] + - [0xC3690, data, audio/audio_seqplayer] + - [0xC3A50, data, audio/audio_general] + - [0xC5240, data, audio/audio_context] + - [0xC59C0, data, audio/audio_thread] + - [0xC59F0, data] # libultra + - [0xC5CC0, rodata, sys/sys_math] + - [0xC5D20, rodata, sys/sys_matrix] + - [0xC5D30, rodata, sys/sys_save] + - [0xC5E50, rodata, sys/sys_fault] + - [0xC6230, rodata, audio/audio_synthesis] + - [0xC6270, rodata, audio/audio_heap] + - [0xC6270, rodata, audio/audio_load] + - [0xC62D0, rodata, audio/audio_playback] + - [0xC6300, rodata, audio/audio_effects] + - [0xC6330, rodata, audio/audio_seqplayer] + - [0xC69E0, rodata, audio/audio_general] + - [0xC69E0, rodata, audio/audio_thread] + - [0xC6F20, rodata] # libultra + - [0xC6F30, rodata] # libultra + - [0xC6F80, rodata] # libultra + - [0xC6FD0, rodata] # libultra + - [0xC70D0, rodata] # libultra + - [0xC7120, rodata] # libultra + - [0xC7140, rodata] # libultra + - [0xC7150, rodata] # libultra + - [0xC71B0, rodata] # libultra + - [0xC7230, data, engine/fox_360] + - [0xC7360, data, engine/fox_beam] + - [0xC73D0, data, engine/fox_bg] + - [0xC7630, data, engine/fox_boss] + - [0xC76A0, data, engine/fox_tank] + - [0xC7700, data, engine/fox_demo] + - [0xC79C0, data, engine/fox_display] + - [0xC7B50, data, engine/fox_load] + - [0xC9610, data, engine/fox_edata] + - [0xCD110, data, engine/fox_edisplay] + - [0xCD540, data, engine/fox_enmy] + - [0xCD720, data, engine/fox_enmy2] + - [0xCEC80, data, engine/fox_effect] + - [0xCF110, data, engine/fox_hud] + - [0xCFD60, data, engine/fox_std_lib] + - [0xD0160, data, engine/fox_game] + - [0xD0220, data, engine/fox_A4290] + - [0xD0850, data, engine/fox_play] + - [0xD0A80, data, engine/fox_context] + - [0xD0AB0, data, engine/fox_rcp] + - [0xD2370, data, engine/fox_radio] + - [0xD2380, data, engine/fox_reset] + - [0xD2390, data, engine/fox_versus] + - [0xD2610, data, fox_message] + - [0xDB900, data, fox_save] + - [0xDBA00, rodata, engine/fox_360] + - [0xDBCE0, rodata, engine/fox_beam] + - [0xDBF80, rodata, engine/fox_bg] + - [0xDC1C0, rodata, engine/fox_boss] + - [0xDC1E0, rodata, engine/fox_tank] + - [0xDC340, rodata, engine/fox_demo] + - [0xDC990, rodata, engine/fox_display] + - [0xDCB90, rodata, engine/fox_load] + - [0xDCC10, rodata, engine/fox_edisplay] + - [0xDCFC0, rodata, engine/fox_enmy] + - [0xDD640, rodata, engine/fox_enmy2] + - [0xDDE20, rodata, engine/fox_effect] + - [0xDE2E0, rodata, engine/fox_fade] + - [0xDE310, rodata, engine/fox_hud] + - [0xDECB0, rodata, engine/fox_97F80] + - [0xDECC0, rodata, engine/fox_std_lib] + - [0xDED20, rodata, engine/fox_game] + - [0xDEDA0, rodata, engine/fox_A4290] + - [0xDEDB0, rodata, engine/fox_A48A0] + - [0xDEDC0, rodata, engine/fox_play] + - [0xDF6C0, rodata, engine/fox_radio] + - [0xDFD20, rodata, engine/fox_versus] + - [0xDFE30, rodata, engine/fox_message] + - [0xDFEF0, rodata, engine/fox_save] + - [0xDFF60, data, fox_msg_textures] + - [0xE4FE0, data, fox_shapes] + - [0xE67C0, data, fox_wheels] + - [0xE7560, data, fox_msg_palettes] + - [0xE75E0, data, fox_rcp_init] + - [0xE7650, data, wave_samples] + - [0xE8270, data, note_data] - name: dma_table type: code diff --git a/yamls/jp/rev0/overlays.yaml b/yamls/jp/rev0/overlays.yaml index f29db110..7f8d981f 100644 --- a/yamls/jp/rev0/overlays.yaml +++ b/yamls/jp/rev0/overlays.yaml @@ -9,8 +9,18 @@ symbol_name_format: i1_$VRAM subsegments: - [0xDA9680, c, fox_i1] - - [0xDB4240, c] - - [0xDBADB0, c] + - [0xDA9690, c, fox_co] + - [0xDB4240, c, fox_ve1] + - [0xDBAA40, c, fox_tr] + - [0xDBADB0, c, fox_tr360] + - [0xDBB930, data, fox_i1] + - [0xDBB940, data, fox_co] + - [0xDBBCA0, data, fox_ve1] + - [0xDBCFB0, data, fox_tr360] + - [0xDBD050, rodata, fox_co] + - [0xDBD410, rodata, fox_ve1] + - [0xDBD7A0, rodata, fox_tr] + - [0xDBD7E0, rodata, fox_tr360] - name: ovl_i2 exclusive_ram_id: overlay @@ -80,6 +90,20 @@ symbol_name_format: i6_$VRAM subsegments: - [0xE542C0, c, fox_i6] + - [0xE542D0, c, fox_andross] + - [0xE62FF0, c, fox_ve2] + - [0xE648F0, c, fox_sy] + - [0xE72330, c, fox_turret] + - [0xE73520, data, fox_i6] + - [0xE73530, data, fox_andross] + - [0xE73680, data, fox_ve2] + - [0xE736E0, data, fox_sy] + - [0xE73950, data, fox_turret] + - [0xE73960, rodata, fox_i6] + - [0xE73970, rodata, fox_andross] + - [0xE74210, rodata, fox_ve2] + - [0xE74250, rodata, fox_sy] + - [0xE74CA0, rodata, fox_turret] - name: ovl_menu exclusive_ram_id: overlay From f0be57a7cc80f6401089b1b6173a6114d3fcc23a Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Sun, 12 May 2024 18:44:20 -0300 Subject: [PATCH 081/151] update diff_settings --- diff_settings.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/diff_settings.py b/diff_settings.py index 4b5496e7..aabd04b7 100644 --- a/diff_settings.py +++ b/diff_settings.py @@ -1,9 +1,9 @@ #!/usr/bin/env python3 def apply(config, args): - config['baseimg'] = 'baserom.us.z64' - config['myimg'] = 'build/starfox64.us.uncompressed.z64' - config['mapfile'] = 'build/starfox64.us.map' + config['baseimg'] = 'baserom.us.rev1.z64' + config['myimg'] = 'build/starfox64.us.rev1.uncompressed.z64' + config['mapfile'] = 'build/starfox64.us.rev1.map' config['source_directories'] = ['./src','./include'] config['objdump_flags'] = ['-M','reg-names=32'] config['makeflags'] = ["KEEP_MDEBUG=1"] From bccb26174bd01db5747da8b054fffecc8f70a2f4 Mon Sep 17 00:00:00 2001 From: petrie911 <69443847+petrie911@users.noreply.github.com> Date: Mon, 13 May 2024 16:49:53 -0500 Subject: [PATCH 082/151] Set up yaml and linker scripts for jp0 (#244) * splits * split and migrate --- linker_scripts/jp/rev0/hardware_regs.ld | 120 + linker_scripts/jp/rev0/pif_syms.ld | 10 + .../jp/rev0/symbol_addrs_migrate.txt | 27 + linker_scripts/jp/rev0/undefined_syms.ld | 3501 +++++++++++++++++ linker_scripts/us/rev1/hardware_regs.ld | 26 + src/overlays/ovl_i5/fox_ti.c | 4 +- yamls/jp/rev0/header.yaml | 1 + yamls/jp/rev0/main.yaml | 382 +- yamls/jp/rev0/overlays.yaml | 95 +- yamls/us/rev1/main.yaml | 14 +- 10 files changed, 3970 insertions(+), 210 deletions(-) create mode 100644 linker_scripts/jp/rev0/hardware_regs.ld create mode 100644 linker_scripts/jp/rev0/pif_syms.ld create mode 100644 linker_scripts/jp/rev0/symbol_addrs_migrate.txt create mode 100644 linker_scripts/jp/rev0/undefined_syms.ld diff --git a/linker_scripts/jp/rev0/hardware_regs.ld b/linker_scripts/jp/rev0/hardware_regs.ld new file mode 100644 index 00000000..489e4fae --- /dev/null +++ b/linker_scripts/jp/rev0/hardware_regs.ld @@ -0,0 +1,120 @@ +// Signal Processor Registers +SP_MEM_ADDR_REG = 0xA4040000; // defined:True +SP_DRAM_ADDR_REG = 0xA4040004; // defined:True +SP_RD_LEN_REG = 0xA4040008; // defined:True +SP_WR_LEN_REG = 0xA404000C; // defined:True +SP_STATUS_REG = 0xA4040010; // defined:True +SP_DMA_FULL_REG = 0xA4040014; // defined:True +SP_DMA_BUSY_REG = 0xA4040018; // defined:True +SP_SEMAPHORE_REG = 0xA404001C; // defined:True + +SP_PC = 0xA4080000; // defined:True + +// Display Processor Command Registers / Rasterizer Interface +DPC_START_REG = 0xA4100000; // defined:True +DPC_END_REG = 0xA4100004; // defined:True +DPC_CURRENT_REG = 0xA4100008; // defined:True +DPC_STATUS_REG = 0xA410000C; // defined:True +DPC_CLOCK_REG = 0xA4100010; // defined:True +DPC_BUFBUSY_REG = 0xA4100014; // defined:True +DPC_PIPEBUSY_REG = 0xA4100018; // defined:True +DPC_TMEM_REG = 0xA410001C; // defined:True + +// Display Processor Span Registers +DPS_TBIST_REG = 0xA4200000; // defined:True // DPS_TBIST_REG / DP_TMEM_BIST +DPS_TEST_MODE_REG = 0xA4200004; // defined:True +DPS_BUFTEST_ADDR_REG = 0xA4200008; // defined:True +DPS_BUFTEST_DATA_REG = 0xA420000C; // defined:True + +// MIPS Interface Registers +MI_MODE_REG = 0xA4300000; // defined:True // MI_MODE_REG / MI_INIT_MODE_REG +MI_VERSION_REG = 0xA4300004; // defined:True +MI_INTR_REG = 0xA4300008; // defined:True +MI_INTR_MASK_REG = 0xA430000C; // defined:True + +// Video Interface Registers +VI_STATUS_REG = 0xA4400000; // defined:True // VI_STATUS_REG / VI_CONTROL_REG +VI_DRAM_ADDR_REG = 0xA4400004; // defined:True // VI_DRAM_ADDR_REG / VI_ORIGIN_REG +VI_WIDTH_REG = 0xA4400008; // defined:True +VI_INTR_REG = 0xA440000C; // defined:True +VI_CURRENT_REG = 0xA4400010; // defined:True +VI_BURST_REG = 0xA4400014; // defined:True // VI_BURST_REG / VI_TIMING_REG +VI_V_SYNC_REG = 0xA4400018; // defined:True +VI_H_SYNC_REG = 0xA440001C; // defined:True +VI_LEAP_REG = 0xA4400020; // defined:True +VI_H_START_REG = 0xA4400024; // defined:True +VI_V_START_REG = 0xA4400028; // defined:True +VI_V_BURST_REG = 0xA440002C; // defined:True +VI_X_SCALE_REG = 0xA4400030; // defined:True +VI_Y_SCALE_REG = 0xA4400034; // defined:True + +// Audio Interface Registers +AI_DRAM_ADDR_REG = 0xA4500000; // defined:True +AI_LEN_REG = 0xA4500004; // defined:True +AI_CONTROL_REG = 0xA4500008; // defined:True +AI_STATUS_REG = 0xA450000C; // defined:True +AI_DACRATE_REG = 0xA4500010; // defined:True +AI_BITRATE_REG = 0xA4500014; // defined:True + +// Peripheral/Parallel Interface Registers +PI_DRAM_ADDR_REG = 0xA4600000; // defined:True +PI_CART_ADDR_REG = 0xA4600004; // defined:True +D_A4600005 = 0xA4600005; // defined:True // TODO figure out its name +D_A4600006 = 0xA4600006; // defined:True // TODO figure out its name +D_A4600007 = 0xA4600007; // defined:True // TODO figure out its name +PI_RD_LEN_REG = 0xA4600008; // defined:True +PI_WR_LEN_REG = 0xA460000C; // defined:True +PI_STATUS_REG = 0xA4600010; // defined:True +PI_BSD_DOM1_LAT_REG = 0xA4600014; // defined:True // PI dom1 latency +PI_BSD_DOM1_PWD_REG = 0xA4600018; // defined:True // PI dom1 pulse width +PI_BSD_DOM1_PGS_REG = 0xA460001C; // defined:True // PI dom1 page size +PI_BSD_DOM1_RLS_REG = 0xA4600020; // defined:True // PI dom1 release +PI_BSD_DOM2_LAT_REG = 0xA4600024; // defined:True // PI dom2 latency +PI_BSD_DOM2_LWD_REG = 0xA4600028; // defined:True // PI dom2 pulse width +PI_BSD_DOM2_PGS_REG = 0xA460002C; // defined:True // PI dom2 page size +PI_BSD_DOM2_RLS_REG = 0xA4600030; // defined:True // PI dom2 release + +// RDRAM Interface Registers +RI_MODE_REG = 0xA4700000; // defined:True +RI_CONFIG_REG = 0xA4700004; // defined:True +RI_CURRENT_LOAD_REG = 0xA4700008; // defined:True +RI_SELECT_REG = 0xA470000C; // defined:True +RI_REFRESH_REG = 0xA4700010; // defined:True +RI_LATENCY_REG = 0xA4700014; // defined:True +RI_RERROR_REG = 0xA4700018; // defined:True +RI_WERROR_REG = 0xA470001C; // defined:True + +// Serial Interface Registers +SI_DRAM_ADDR_REG = 0xA4800000; // defined:True +SI_PIF_ADDR_RD64B_REG = 0xA4800004; // defined:True +D_A4800008 = 0xA4800008; // defined:True // reserved +D_A480000C = 0xA480000C; // defined:True // reserved +SI_PIF_ADDR_WR64B_REG = 0xA4800010; // defined:True +D_A4800014 = 0xA4800014; // defined:True // reserved +SI_STATUS_REG = 0xA4800018; // defined:True + +LEO_CMD = 0xA5000508; +LEO_STATUS = 0xA5000508; +LEO_BM_CTL = 0xA5000510; +LEO_BM_STATUS = 0xA5000510; +LEO_SEQ_CTL = 0xA5000518; +LEO_SEQ_STATUS = 0xA5000518; +LEO_C2_BUFF = 0xA5000000; +LEO_SECTOR_BUFF = 0xA5000400; +LEO_DATA = 0xA5000500; +LEO_MISC_REG = 0xA5000504; +LEO_CUR_TK = 0xA500050C; +LEO_ERR_SECTOR = 0xA5000514; +LEO_CUR_SECTOR = 0xA500051C; +LEO_HARD_RESET = 0xA5000520; +LEO_C1_S0 = 0xA5000524; +LEO_HOST_SECBYTE = 0xA5000528; +LEO_C1_S2 = 0xA500052C; +LEO_SEC_BYTE = 0xA5000530; +LEO_C1_S4 = 0xA5000534; +LEO_C1_S6 = 0xA5000538; +LEO_CUR_ADDR = 0xA500053C; +LEO_ID_REG = 0xA5000540; +LEO_TEST_REG = 0xA5000544; +LEO_TEST_PIN_SEL = 0xA5000548; +LEO_RAM_ADDR = 0xA5000580; \ No newline at end of file diff --git a/linker_scripts/jp/rev0/pif_syms.ld b/linker_scripts/jp/rev0/pif_syms.ld new file mode 100644 index 00000000..a0e8bcb2 --- /dev/null +++ b/linker_scripts/jp/rev0/pif_syms.ld @@ -0,0 +1,10 @@ +// libultra OS symbols + +osTvType = 0x80000300; +osRomType = 0x80000304; +osRomBase = 0x80000308; +osResetType = 0x8000030C; +osCicId = 0x80000310; +osVersion = 0x80000314; +osMemSize = 0x80000318; +osAppNMIBuffer = 0x8000031C; \ No newline at end of file diff --git a/linker_scripts/jp/rev0/symbol_addrs_migrate.txt b/linker_scripts/jp/rev0/symbol_addrs_migrate.txt new file mode 100644 index 00000000..fe7b30ec --- /dev/null +++ b/linker_scripts/jp/rev0/symbol_addrs_migrate.txt @@ -0,0 +1,27 @@ +D_800DB02C = 0x800DB02C; // force_migration:True +D_800DB24C = 0x800DB24C; // force_migration:True +D_800DB238 = 0x800DB238; // force_migration:True +D_800DE430 = 0x800DE430; // force_migration:True +D_800DE440 = 0x800DE440; // force_migration:True +D_800DE464 = 0x800DE464; // force_migration:True +D_800DF21C = 0x800DF21C; // force_migration:True +D_i1_80192474 = 0x80192474; // force_migration:True segment:ovl_i1 +D_i3_801B89CC = 0x801B89CC; // force_migration:True segment:ovl_i3 +D_i3_801B89D8 = 0x801B89D8; // force_migration:True segment:ovl_i3 +D_i3_801B89E0 = 0x801B89E0; // force_migration:True segment:ovl_i3 +D_i3_801B8A08 = 0x801B8A08; // force_migration:True segment:ovl_i3 +D_i4_80196D64 = 0x80196D64; // force_migration:True segment:ovl_i4 +D_i5_801B1E6C = 0x801B1E6C; // segment:ovl_i5 +D_i5_801B2B18 = 0x801B2B18; // force_migration:True segment:ovl_i5 +D_i5_801B2B4C = 0x801B2B4C; // force_migration:True segment:ovl_i5 +D_i5_801B2DE0 = 0x801B2DE0; // force_migration:True segment:ovl_i5 +D_i5_801B2DF4 = 0x801B2DF4; // force_migration:True segment:ovl_i5 +D_i6_8019E810 = 0x8019E810; // force_migration:True segment:ovl_i6 +D_menu_801AE890 = 0x801AE890; // force_migration:True segment:ovl_menu +jtbl_menu_801AED88 = 0x801AED88; // force_migration:True segment:ovl_menu +D_ending_8018D5D0 = 0x8018D5D0; // force_migration:True segment:ovl_ending +D_ending_8018DC24 = 0x8018DC24; // force_migration:True segment:ovl_ending +D_ending_801B2B18 = 0x801B2B18; // force_migration:True segment:ovl_ending + +D_800C5118 = 0x800C5118; +D_800DB5D4 = 0x800DB5D4; diff --git a/linker_scripts/jp/rev0/undefined_syms.ld b/linker_scripts/jp/rev0/undefined_syms.ld new file mode 100644 index 00000000..fa606254 --- /dev/null +++ b/linker_scripts/jp/rev0/undefined_syms.ld @@ -0,0 +1,3501 @@ +D_1 = 0x1; +D_E93C0 = 0xE93C0; +D_E9950 = 0xE9950; +D_FFFFF = 0xFFFFF; +D_124920 = 0x124920; +D_143A40 = 0x143A40; +D_1000170 = 0x1000170; +D_1001090 = 0x1001090; +D_1001FB0 = 0x1001FB0; +D_1002ED0 = 0x1002ED0; +D_1003DF0 = 0x1003DF0; +D_1004D10 = 0x1004D10; +D_1005C30 = 0x1005C30; +D_1006B50 = 0x1006B50; +D_1007A70 = 0x1007A70; +D_1008990 = 0x1008990; +D_10098B0 = 0x10098B0; +D_100A7D0 = 0x100A7D0; +D_100B6F0 = 0x100B6F0; +D_100E150 = 0x100E150; +D_100E570 = 0x100E570; +D_100E580 = 0x100E580; +D_100E600 = 0x100E600; +D_100E910 = 0x100E910; +D_100E980 = 0x100E980; +D_100E990 = 0x100E990; +D_100EA60 = 0x100EA60; +D_100EA80 = 0x100EA80; +D_100EB50 = 0x100EB50; +D_100EB70 = 0x100EB70; +D_100EC40 = 0x100EC40; +D_100EC60 = 0x100EC60; +D_100ED30 = 0x100ED30; +D_100ED50 = 0x100ED50; +D_100ED90 = 0x100ED90; +D_100EDA0 = 0x100EDA0; +D_100EDD8 = 0x100EDD8; +D_100EDF0 = 0x100EDF0; +D_100EFE0 = 0x100EFE0; +D_100F6A0 = 0x100F6A0; +D_100F768 = 0x100F768; +D_100F790 = 0x100F790; +D_100F858 = 0x100F858; +D_100F890 = 0x100F890; +D_100FF60 = 0x100FF60; +D_1010040 = 0x1010040; +D_1010101 = 0x1010101; +D_1010440 = 0x1010440; +D_1010450 = 0x1010450; +D_10105D0 = 0x10105D0; +D_10123E0 = 0x10123E0; +D_1012850 = 0x1012850; +D_1013450 = 0x1013450; +D_1013740 = 0x1013740; +D_1014690 = 0x1014690; +D_1015190 = 0x1015190; +D_1015F90 = 0x1015F90; +D_1016390 = 0x1016390; +D_10166F0 = 0x10166F0; +D_1016B70 = 0x1016B70; +D_1017440 = 0x1017440; +D_10177B0 = 0x10177B0; +D_1017AA0 = 0x1017AA0; +D_1017BF0 = 0x1017BF0; +D_1017DA0 = 0x1017DA0; +D_10191B0 = 0x10191B0; +D_101A370 = 0x101A370; +D_101A5B0 = 0x101A5B0; +D_101A670 = 0x101A670; +D_101A800 = 0x101A800; +D_101ABC0 = 0x101ABC0; +D_101B400 = 0x101B400; +D_101B460 = 0x101B460; +D_101BC60 = 0x101BC60; +D_101BEF0 = 0x101BEF0; +D_101C1F0 = 0x101C1F0; +D_101CD90 = 0x101CD90; +D_1020FA0 = 0x1020FA0; +D_1022000 = 0x1022000; +D_1022320 = 0x1022320; +D_1022880 = 0x1022880; +D_10228D0 = 0x10228D0; +D_1022E00 = 0x1022E00; +D_10233B0 = 0x10233B0; +D_1023410 = 0x1023410; +D_10239B0 = 0x10239B0; +D_1023B10 = 0x1023B10; +D_1023BD8 = 0x1023BD8; +D_1023C40 = 0x1023C40; +D_10240E0 = 0x10240E0; +D_1024980 = 0x1024980; +D_1025210 = 0x1025210; +D_10273B0 = 0x10273B0; +D_1028900 = 0x1028900; +D_1029190 = 0x1029190; +D_1029A20 = 0x1029A20; +D_102DED0 = 0x102DED0; +D_102E760 = 0x102E760; +D_102F000 = 0x102F000; +D_102F088 = 0x102F088; +D_10307B0 = 0x10307B0; +D_1031040 = 0x1031040; +D_1031900 = 0x1031900; +D_20031B0 = 0x20031B0; +D_2006F50 = 0x2006F50; +D_200D750 = 0x200D750; +D_2010A30 = 0x2010A30; +D_20112C0 = 0x20112C0; +D_3000090 = 0x3000090; +D_3000120 = 0x3000120; +D_3000130 = 0x3000130; +D_3000470 = 0x3000470; +D_30004C0 = 0x30004C0; +D_3000600 = 0x3000600; +D_3000620 = 0x3000620; +D_3000660 = 0x3000660; +D_30007B0 = 0x30007B0; +D_30007D0 = 0x30007D0; +D_3000910 = 0x3000910; +D_3000930 = 0x3000930; +D_3000AD0 = 0x3000AD0; +D_3000AF0 = 0x3000AF0; +D_3000C70 = 0x3000C70; +D_3002E80 = 0x3002E80; +D_30034F0 = 0x30034F0; +D_3004680 = 0x3004680; +D_30053E0 = 0x30053E0; +D_3005980 = 0x3005980; +D_3005AB0 = 0x3005AB0; +D_3005C80 = 0x3005C80; +D_3005EA8 = 0x3005EA8; +D_30066B0 = 0x30066B0; +D_3006940 = 0x3006940; +D_3006AF0 = 0x3006AF0; +D_3006C70 = 0x3006C70; +D_3006DE0 = 0x3006DE0; +D_3007E70 = 0x3007E70; +D_3008100 = 0x3008100; +D_3008BF0 = 0x3008BF0; +D_3009998 = 0x3009998; +D_300ADE0 = 0x300ADE0; +D_300B8D0 = 0x300B8D0; +D_300BAD0 = 0x300BAD0; +D_300BB18 = 0x300BB18; +D_300BB40 = 0x300BB40; +D_300BB88 = 0x300BB88; +D_300BBC0 = 0x300BBC0; +D_300BC80 = 0x300BC80; +D_300BCD0 = 0x300BCD0; +D_300D600 = 0x300D600; +D_300E300 = 0x300E300; +D_300F210 = 0x300F210; +D_300FBF0 = 0x300FBF0; +D_30105C0 = 0x30105C0; +D_3010660 = 0x3010660; +D_3011720 = 0x3011720; +D_3012160 = 0x3012160; +D_3012980 = 0x3012980; +D_30129C0 = 0x30129C0; +D_30131F0 = 0x30131F0; +D_3014BF0 = 0x3014BF0; +D_3015120 = 0x3015120; +D_3015230 = 0x3015230; +D_30155E0 = 0x30155E0; +D_3015AF4 = 0x3015AF4; +D_3015C28 = 0x3015C28; +D_3015D80 = 0x3015D80; +D_30162C0 = 0x30162C0; +D_30163C4 = 0x30163C4; +D_3016610 = 0x3016610; +D_3016660 = 0x3016660; +D_3016B30 = 0x3016B30; +D_3016C20 = 0x3016C20; +D_30183D0 = 0x30183D0; +D_30184D8 = 0x30184D8; +D_3019380 = 0x3019380; +D_30194E0 = 0x30194E0; +D_301B8E0 = 0x301B8E0; +D_301BA70 = 0x301BA70; +D_301C260 = 0x301C260; +D_301CF28 = 0x301CF28; +D_301D194 = 0x301D194; +D_301DB6C = 0x301DB6C; +D_301DDD8 = 0x301DDD8; +D_301E408 = 0x301E408; +D_301E714 = 0x301E714; +D_301ED1C = 0x301ED1C; +D_301EF68 = 0x301EF68; +D_301F0F0 = 0x301F0F0; +D_301FCC0 = 0x301FCC0; +D_30208A0 = 0x30208A0; +D_302DCA0 = 0x302DCA0; +D_302DDC0 = 0x302DDC0; +D_302E050 = 0x302E050; +D_302E8F0 = 0x302E8F0; +D_302E934 = 0x302E934; +D_302E978 = 0x302E978; +D_302E9BC = 0x302E9BC; +D_302EC64 = 0x302EC64; +D_302ECF0 = 0x302ECF0; +D_302EEF8 = 0x302EEF8; +D_302F0EC = 0x302F0EC; +D_302F1DC = 0x302F1DC; +D_302F2CC = 0x302F2CC; +D_302F3B0 = 0x302F3B0; +D_302F4DC = 0x302F4DC; +D_302F5CC = 0x302F5CC; +D_302F6BC = 0x302F6BC; +D_302F7A0 = 0x302F7A0; +D_4000080 = 0x4000080; +D_400014C = 0x400014C; +D_40001A4 = 0x40001A4; +D_4000270 = 0x4000270; +D_40018A0 = 0x40018A0; +D_4003BD0 = 0x4003BD0; +D_40057AC = 0x40057AC; +D_40058B8 = 0x40058B8; +D_40068F0 = 0x40068F0; +D_4007870 = 0x4007870; +D_4007AF0 = 0x4007AF0; +D_4008CE0 = 0x4008CE0; +D_4008F70 = 0x4008F70; +D_400A30C = 0x400A30C; +D_400A398 = 0x400A398; +D_400AAE0 = 0x400AAE0; +D_400B390 = 0x400B390; +D_5000200 = 0x5000200; +D_5000300 = 0x5000300; +D_5000500 = 0x5000500; +D_5000DA0 = 0x5000DA0; +D_5000E90 = 0x5000E90; +D_5000F80 = 0x5000F80; +D_5001130 = 0x5001130; +D_5001740 = 0x5001740; +D_5001930 = 0x5001930; +D_5001F50 = 0x5001F50; +D_5002070 = 0x5002070; +D_5002C20 = 0x5002C20; +D_5003070 = 0x5003070; +D_5005430 = 0x5005430; +D_5005CB0 = 0x5005CB0; +D_5005DA0 = 0x5005DA0; +D_5005E90 = 0x5005E90; +D_5005F80 = 0x5005F80; +D_5006070 = 0x5006070; +D_5006160 = 0x5006160; +D_5006250 = 0x5006250; +D_5006650 = 0x5006650; +D_50070A0 = 0x50070A0; +D_5007770 = 0x5007770; +D_5008A50 = 0x5008A50; +D_500A040 = 0x500A040; +D_6000000 = 0x6000000; +D_6000290 = 0x6000290; +D_6000320 = 0x6000320; +D_6000604 = 0x6000604; +D_60006B0 = 0x60006B0; +D_6000880 = 0x6000880; +D_6000890 = 0x6000890; +D_60008D0 = 0x60008D0; +D_60008E0 = 0x60008E0; +D_6000930 = 0x6000930; +D_6000A40 = 0x6000A40; +D_6000F20 = 0x6000F20; +D_6001110 = 0x6001110; +D_6001120 = 0x6001120; +D_60012D0 = 0x60012D0; +D_60016A0 = 0x60016A0; +D_6001730 = 0x6001730; +D_6001984 = 0x6001984; +D_6001B08 = 0x6001B08; +D_6001BA0 = 0x6001BA0; +D_6001BA8 = 0x6001BA8; +D_6001C20 = 0x6001C20; +D_6001C84 = 0x6001C84; +D_6001CD0 = 0x6001CD0; +D_6001D40 = 0x6001D40; +D_6001E40 = 0x6001E40; +D_6001EF0 = 0x6001EF0; +D_6002148 = 0x6002148; +D_60021D0 = 0x60021D0; +D_60021F0 = 0x60021F0; +D_6002320 = 0x6002320; +D_6002394 = 0x6002394; +D_6002730 = 0x6002730; +D_60028B0 = 0x60028B0; +D_6002AF8 = 0x6002AF8; +D_6002D60 = 0x6002D60; +D_6002E60 = 0x6002E60; +D_6002F90 = 0x6002F90; +D_6003090 = 0x6003090; +D_60032C0 = 0x60032C0; +D_6003740 = 0x6003740; +D_6003B00 = 0x6003B00; +D_6003C80 = 0x6003C80; +D_6003D60 = 0x6003D60; +D_6003F50 = 0x6003F50; +D_6004110 = 0x6004110; +D_60041D0 = 0x60041D0; +D_6004250 = 0x6004250; +D_6004350 = 0x6004350; +D_60043C0 = 0x60043C0; +D_6004BA0 = 0x6004BA0; +D_6004BF0 = 0x6004BF0; +D_6004DC0 = 0x6004DC0; +D_6004F80 = 0x6004F80; +D_6005000 = 0x6005000; +D_6005160 = 0x6005160; +D_6005400 = 0x6005400; +D_6005474 = 0x6005474; +D_6005520 = 0x6005520; +D_60055A0 = 0x60055A0; +D_6005720 = 0x6005720; +D_60057F0 = 0x60057F0; +D_6005800 = 0x6005800; +D_6005EB0 = 0x6005EB0; +D_6006040 = 0x6006040; +D_6006060 = 0x6006060; +D_6006090 = 0x6006090; +D_6006110 = 0x6006110; +D_60061E0 = 0x60061E0; +D_60062B0 = 0x60062B0; +D_6006318 = 0x6006318; +D_600636C = 0x600636C; +D_6006380 = 0x6006380; +D_6006558 = 0x6006558; +D_60065F0 = 0x60065F0; +D_6006610 = 0x6006610; +D_6006630 = 0x6006630; +D_6006720 = 0x6006720; +D_6006860 = 0x6006860; +D_60068EC = 0x60068EC; +D_6006920 = 0x6006920; +D_600693C = 0x600693C; +D_6006958 = 0x6006958; +D_6006974 = 0x6006974; +D_6006990 = 0x6006990; +D_60069AC = 0x60069AC; +D_60069C8 = 0x60069C8; +D_60069E4 = 0x60069E4; +D_6006A00 = 0x6006A00; +D_6006A1C = 0x6006A1C; +D_6006B44 = 0x6006B44; +D_6006BE0 = 0x6006BE0; +D_6006BEC = 0x6006BEC; +D_6006C08 = 0x6006C08; +D_6006C24 = 0x6006C24; +D_6006C30 = 0x6006C30; +D_6007854 = 0x6007854; +D_6007980 = 0x6007980; +D_6007BF0 = 0x6007BF0; +D_6007D40 = 0x6007D40; +D_6007FA0 = 0x6007FA0; +D_6008020 = 0x6008020; +D_6008490 = 0x6008490; +D_60088D8 = 0x60088D8; +D_60089E8 = 0x60089E8; +D_6008A8C = 0x6008A8C; +D_6008AD0 = 0x6008AD0; +D_6008AE8 = 0x6008AE8; +D_6008D90 = 0x6008D90; +D_6009010 = 0x6009010; +D_6009070 = 0x6009070; +D_6009210 = 0x6009210; +D_6009250 = 0x6009250; +D_6009290 = 0x6009290; +D_6009350 = 0x6009350; +D_60093B0 = 0x60093B0; +D_6009650 = 0x6009650; +D_60096AC = 0x60096AC; +D_60098E0 = 0x60098E0; +D_60098F0 = 0x60098F0; +D_6009A10 = 0x6009A10; +D_6009BB4 = 0x6009BB4; +D_6009BD0 = 0x6009BD0; +D_6009D30 = 0x6009D30; +D_6009D40 = 0x6009D40; +D_6009DD8 = 0x6009DD8; +D_6009F90 = 0x6009F90; +D_600A0B4 = 0x600A0B4; +D_600A4A0 = 0x600A4A0; +D_600A530 = 0x600A530; +D_600A630 = 0x600A630; +D_600A688 = 0x600A688; +D_600AA78 = 0x600AA78; +D_600AAA0 = 0x600AAA0; +D_600AAE4 = 0x600AAE4; +D_600AC40 = 0x600AC40; +D_600ACEC = 0x600ACEC; +D_600AD10 = 0x600AD10; +D_600AFA0 = 0x600AFA0; +D_600B1B4 = 0x600B1B4; +D_600B350 = 0x600B350; +D_600B4B0 = 0x600B4B0; +D_600B4DC = 0x600B4DC; +D_600B6B0 = 0x600B6B0; +D_600B7C0 = 0x600B7C0; +D_600BAF0 = 0x600BAF0; +D_600BB40 = 0x600BB40; +D_600BB98 = 0x600BB98; +D_600BBE0 = 0x600BBE0; +D_600BC50 = 0x600BC50; +D_600BCC0 = 0x600BCC0; +D_600BDD8 = 0x600BDD8; +D_600BFB0 = 0x600BFB0; +D_600C020 = 0x600C020; +D_600C064 = 0x600C064; +D_600C15C = 0x600C15C; +D_600C200 = 0x600C200; +D_600C300 = 0x600C300; +D_600C4E0 = 0x600C4E0; +D_600C890 = 0x600C890; +D_600CCA8 = 0x600CCA8; +D_600CD50 = 0x600CD50; +D_600CD60 = 0x600CD60; +D_600CDC0 = 0x600CDC0; +D_600CEB0 = 0x600CEB0; +D_600D090 = 0x600D090; +D_600D290 = 0x600D290; +D_600D3DC = 0x600D3DC; +D_600D4E0 = 0x600D4E0; +D_600D560 = 0x600D560; +D_600D5C0 = 0x600D5C0; +D_600D6A0 = 0x600D6A0; +D_600D730 = 0x600D730; +D_600D9AC = 0x600D9AC; +D_600D9F0 = 0x600D9F0; +D_600DB98 = 0x600DB98; +D_600DBC0 = 0x600DBC0; +D_600DDF0 = 0x600DDF0; +D_600DF40 = 0x600DF40; +D_600DFE0 = 0x600DFE0; +D_600E050 = 0x600E050; +D_600E0B0 = 0x600E0B0; +D_600E170 = 0x600E170; +D_600E250 = 0x600E250; +D_600E2C4 = 0x600E2C4; +D_600E470 = 0x600E470; +D_600E540 = 0x600E540; +D_600E690 = 0x600E690; +D_600E740 = 0x600E740; +D_600E830 = 0x600E830; +D_600E908 = 0x600E908; +D_600EA10 = 0x600EA10; +D_600ED44 = 0x600ED44; +D_600EFC4 = 0x600EFC4; +D_600EFF0 = 0x600EFF0; +D_600F000 = 0x600F000; +D_600F08C = 0x600F08C; +D_600F0A0 = 0x600F0A0; +D_600F0F8 = 0x600F0F8; +D_600F140 = 0x600F140; +D_600F1C4 = 0x600F1C4; +D_600F1D0 = 0x600F1D0; +D_600F2AC = 0x600F2AC; +D_600F2F0 = 0x600F2F0; +D_600F580 = 0x600F580; +D_600F670 = 0x600F670; +D_600F680 = 0x600F680; +D_600F744 = 0x600F744; +D_600FAA0 = 0x600FAA0; +D_600FF64 = 0x600FF64; +D_6010198 = 0x6010198; +D_60105D8 = 0x60105D8; +D_6010744 = 0x6010744; +D_60109C0 = 0x60109C0; +D_6010DB0 = 0x6010DB0; +D_60114C0 = 0x60114C0; +D_6011598 = 0x6011598; +D_60118C4 = 0x60118C4; +D_60118E0 = 0x60118E0; +D_60119F0 = 0x60119F0; +D_6011A60 = 0x6011A60; +D_6011A80 = 0x6011A80; +D_6011B18 = 0x6011B18; +D_6011B48 = 0x6011B48; +D_6011CE0 = 0x6011CE0; +D_6011DC0 = 0x6011DC0; +D_6011DD0 = 0x6011DD0; +D_6011EE0 = 0x6011EE0; +D_601219C = 0x601219C; +D_60121C0 = 0x60121C0; +D_60126F0 = 0x60126F0; +D_6012840 = 0x6012840; +D_6012C00 = 0x6012C00; +D_6013098 = 0x6013098; +D_6013100 = 0x6013100; +D_6013150 = 0x6013150; +D_60131EC = 0x60131EC; +D_60131F0 = 0x60131F0; +D_6013200 = 0x6013200; +D_6013210 = 0x6013210; +D_6013284 = 0x6013284; +D_60132EC = 0x60132EC; +D_6013310 = 0x6013310; +D_6013344 = 0x6013344; +D_6013390 = 0x6013390; +D_6013410 = 0x6013410; +D_6013510 = 0x6013510; +D_6013530 = 0x6013530; +D_6013578 = 0x6013578; +D_6013600 = 0x6013600; +D_60136EC = 0x60136EC; +D_6013750 = 0x6013750; +D_6013770 = 0x6013770; +D_601388C = 0x601388C; +D_6013B50 = 0x6013B50; +D_6013DF0 = 0x6013DF0; +D_6013E10 = 0x6013E10; +D_6013EE0 = 0x6013EE0; +D_6013F00 = 0x6013F00; +D_6013F58 = 0x6013F58; +D_6014024 = 0x6014024; +D_6014040 = 0x6014040; +D_6014350 = 0x6014350; +D_6014390 = 0x6014390; +D_60143D0 = 0x60143D0; +D_60144A0 = 0x60144A0; +D_6014AA4 = 0x6014AA4; +D_6014AF0 = 0x6014AF0; +D_6014EC0 = 0x6014EC0; +D_6014F10 = 0x6014F10; +D_6014F20 = 0x6014F20; +D_6014F90 = 0x6014F90; +D_6015000 = 0x6015000; +D_6015270 = 0x6015270; +D_6015380 = 0x6015380; +D_60156A4 = 0x60156A4; +D_60159AC = 0x60159AC; +D_6015FC0 = 0x6015FC0; +D_6016240 = 0x6016240; +D_6016594 = 0x6016594; +D_60165A0 = 0x60165A0; +D_60166C0 = 0x60166C0; +D_6016C08 = 0x6016C08; +D_6016CF0 = 0x6016CF0; +D_6017040 = 0x6017040; +D_6017090 = 0x6017090; +D_6017370 = 0x6017370; +D_60175E0 = 0x60175E0; +D_60176B0 = 0x60176B0; +D_6017790 = 0x6017790; +D_6017AB0 = 0x6017AB0; +D_6017AD0 = 0x6017AD0; +D_6017D10 = 0x6017D10; +D_6018020 = 0x6018020; +D_60180A0 = 0x60180A0; +D_6018230 = 0x6018230; +D_6018390 = 0x6018390; +D_6018398 = 0x6018398; +D_601847C = 0x601847C; +D_60184A0 = 0x60184A0; +D_6018640 = 0x6018640; +D_6018798 = 0x6018798; +D_60188B4 = 0x60188B4; +D_6018930 = 0x6018930; +D_6018A70 = 0x6018A70; +D_6018AC0 = 0x6018AC0; +D_6018B10 = 0x6018B10; +D_6018B20 = 0x6018B20; +D_6018B98 = 0x6018B98; +D_6018C00 = 0x6018C00; +D_6018D10 = 0x6018D10; +D_6018D58 = 0x6018D58; +D_6018E58 = 0x6018E58; +D_6018E80 = 0x6018E80; +D_6018FF0 = 0x6018FF0; +D_6019130 = 0x6019130; +D_6019360 = 0x6019360; +D_60193A0 = 0x60193A0; +D_6019410 = 0x6019410; +D_601942C = 0x601942C; +D_6019578 = 0x6019578; +D_6019620 = 0x6019620; +D_6019650 = 0x6019650; +D_60196C0 = 0x60196C0; +D_60197AC = 0x60197AC; +D_60199A0 = 0x60199A0; +D_60199D0 = 0x60199D0; +D_6019A30 = 0x6019A30; +D_6019A58 = 0x6019A58; +D_6019C30 = 0x6019C30; +D_6019C58 = 0x6019C58; +D_6019CF0 = 0x6019CF0; +D_6019D38 = 0x6019D38; +D_601A040 = 0x601A040; +D_601A0E0 = 0x601A0E0; +D_601A160 = 0x601A160; +D_601A170 = 0x601A170; +D_601A180 = 0x601A180; +D_601A1A8 = 0x601A1A8; +D_601A1C0 = 0x601A1C0; +D_601A580 = 0x601A580; +D_601A808 = 0x601A808; +D_601A888 = 0x601A888; +D_601A954 = 0x601A954; +D_601AB10 = 0x601AB10; +D_601AB50 = 0x601AB50; +D_601AD10 = 0x601AD10; +D_601ADF8 = 0x601ADF8; +D_601AE40 = 0x601AE40; +D_601AE70 = 0x601AE70; +D_601AE80 = 0x601AE80; +D_601AFC4 = 0x601AFC4; +D_601AFF0 = 0x601AFF0; +D_601B1D0 = 0x601B1D0; +D_601B640 = 0x601B640; +D_601B6C0 = 0x601B6C0; +D_601B910 = 0x601B910; +D_601BA60 = 0x601BA60; +D_601BB00 = 0x601BB00; +D_601BBA0 = 0x601BBA0; +D_601C008 = 0x601C008; +D_601C310 = 0x601C310; +D_601C3D0 = 0x601C3D0; +D_601C470 = 0x601C470; +D_601C820 = 0x601C820; +D_601C8E0 = 0x601C8E0; +D_601D4C0 = 0x601D4C0; +D_601D510 = 0x601D510; +D_601D800 = 0x601D800; +D_601D8A8 = 0x601D8A8; +D_601D930 = 0x601D930; +D_601DA3C = 0x601DA3C; +D_601E0F0 = 0x601E0F0; +D_601E150 = 0x601E150; +D_601E1E8 = 0x601E1E8; +D_601E310 = 0x601E310; +D_601E320 = 0x601E320; +D_601E8C4 = 0x601E8C4; +D_601E9D0 = 0x601E9D0; +D_601EAA0 = 0x601EAA0; +D_601EF60 = 0x601EF60; +D_601F128 = 0x601F128; +D_601F1B0 = 0x601F1B0; +D_601F274 = 0x601F274; +D_601F6B4 = 0x601F6B4; +D_601F760 = 0x601F760; +D_601F8B0 = 0x601F8B0; +D_601FA04 = 0x601FA04; +D_601FAD0 = 0x601FAD0; +D_601FCE0 = 0x601FCE0; +D_601FF80 = 0x601FF80; +D_60204BC = 0x60204BC; +D_6020760 = 0x6020760; +D_6020810 = 0x6020810; +D_6020A48 = 0x6020A48; +D_6020B00 = 0x6020B00; +D_6020B40 = 0x6020B40; +D_6020D90 = 0x6020D90; +D_6020DD0 = 0x6020DD0; +D_6020F00 = 0x6020F00; +D_6020F60 = 0x6020F60; +D_6021080 = 0x6021080; +D_6021128 = 0x6021128; +D_602112C = 0x602112C; +D_6021240 = 0x6021240; +D_60212D0 = 0x60212D0; +D_60213B0 = 0x60213B0; +D_6021490 = 0x6021490; +D_60218FC = 0x60218FC; +D_60219C8 = 0x60219C8; +D_6021CB0 = 0x6021CB0; +D_60224DC = 0x60224DC; +D_60225A8 = 0x60225A8; +D_6022630 = 0x6022630; +D_6022760 = 0x6022760; +D_6022920 = 0x6022920; +D_60229A4 = 0x60229A4; +D_6023068 = 0x6023068; +D_60231A4 = 0x60231A4; +D_60231C8 = 0x60231C8; +D_60236F0 = 0x60236F0; +D_6023810 = 0x6023810; +D_6023AC0 = 0x6023AC0; +D_6023B90 = 0x6023B90; +D_6023C40 = 0x6023C40; +D_6023DCC = 0x6023DCC; +D_6024060 = 0x6024060; +D_60240B0 = 0x60240B0; +D_60244B0 = 0x60244B0; +D_60245E0 = 0x60245E0; +D_6024AD0 = 0x6024AD0; +D_6024B60 = 0x6024B60; +D_6024F10 = 0x6024F10; +D_6024FE0 = 0x6024FE0; +D_6025220 = 0x6025220; +D_6025440 = 0x6025440; +D_6025500 = 0x6025500; +D_60255EC = 0x60255EC; +D_60255F0 = 0x60255F0; +D_6025680 = 0x6025680; +D_6025690 = 0x6025690; +D_6025AE0 = 0x6025AE0; +D_6025B50 = 0x6025B50; +D_6025BEC = 0x6025BEC; +D_6025CA0 = 0x6025CA0; +D_602623C = 0x602623C; +D_6026394 = 0x6026394; +D_60263F0 = 0x60263F0; +D_6026420 = 0x6026420; +D_60265AC = 0x60265AC; +D_60266A0 = 0x60266A0; +D_6026820 = 0x6026820; +D_60268B8 = 0x60268B8; +D_6027150 = 0x6027150; +D_6027160 = 0x6027160; +D_602716C = 0x602716C; +D_602726C = 0x602726C; +D_6027340 = 0x6027340; +D_6027844 = 0x6027844; +D_6027930 = 0x6027930; +D_6027A30 = 0x6027A30; +D_6027B80 = 0x6027B80; +D_6027CF0 = 0x6027CF0; +D_6027E64 = 0x6027E64; +D_6028260 = 0x6028260; +D_6028368 = 0x6028368; +D_602848C = 0x602848C; +D_60286E0 = 0x60286E0; +D_602890C = 0x602890C; +D_6028A60 = 0x6028A60; +D_6029528 = 0x6029528; +D_6029670 = 0x6029670; +D_6029674 = 0x6029674; +D_60296D0 = 0x60296D0; +D_602991C = 0x602991C; +D_6029928 = 0x6029928; +D_6029A48 = 0x6029A48; +D_602A0AC = 0x602A0AC; +D_602A520 = 0x602A520; +D_602A888 = 0x602A888; +D_602AA04 = 0x602AA04; +D_602AA18 = 0x602AA18; +D_602AA7C = 0x602AA7C; +D_602AB48 = 0x602AB48; +D_602ADB0 = 0x602ADB0; +D_602B0E8 = 0x602B0E8; +D_602B100 = 0x602B100; +D_602B134 = 0x602B134; +D_602B180 = 0x602B180; +D_602B558 = 0x602B558; +D_602B6BC = 0x602B6BC; +D_602B980 = 0x602B980; +D_602BA20 = 0x602BA20; +D_602BC18 = 0x602BC18; +D_602BDF0 = 0x602BDF0; +D_602BE64 = 0x602BE64; +D_602C094 = 0x602C094; +D_602C0D0 = 0x602C0D0; +D_602C220 = 0x602C220; +D_602C4F0 = 0x602C4F0; +D_602C548 = 0x602C548; +D_602CC94 = 0x602CC94; +D_602CF20 = 0x602CF20; +D_602D1C0 = 0x602D1C0; +D_602D400 = 0x602D400; +D_602D5AC = 0x602D5AC; +D_602DA20 = 0x602DA20; +D_602DAF8 = 0x602DAF8; +D_602E84C = 0x602E84C; +D_602E9F8 = 0x602E9F8; +D_602EA44 = 0x602EA44; +D_602EB10 = 0x602EB10; +D_602EED8 = 0x602EED8; +D_602EF6C = 0x602EF6C; +D_602EFB0 = 0x602EFB0; +D_602F0A4 = 0x602F0A4; +D_602F120 = 0x602F120; +D_602F1AC = 0x602F1AC; +D_602F1C0 = 0x602F1C0; +D_602F22C = 0x602F22C; +D_602F4B8 = 0x602F4B8; +D_602FA30 = 0x602FA30; +D_602FCF4 = 0x602FCF4; +D_602FDE0 = 0x602FDE0; +D_602FE00 = 0x602FE00; +D_603030C = 0x603030C; +D_6030510 = 0x6030510; +D_6030590 = 0x6030590; +D_6030810 = 0x6030810; +D_60308F4 = 0x60308F4; +D_6030E40 = 0x6030E40; +D_60312C4 = 0x60312C4; +D_60312E0 = 0x60312E0; +D_6031A34 = 0x6031A34; +D_6031A6C = 0x6031A6C; +D_6031AA4 = 0x6031AA4; +D_6031B14 = 0x6031B14; +D_6031D4C = 0x6031D4C; +D_6031E4C = 0x6031E4C; +D_60320A4 = 0x60320A4; +D_6032184 = 0x6032184; +D_60322CC = 0x60322CC; +D_6032318 = 0x6032318; +D_60323D8 = 0x60323D8; +D_60324E4 = 0x60324E4; +D_6032648 = 0x6032648; +D_60329C0 = 0x60329C0; +D_6032BB8 = 0x6032BB8; +D_6032BC0 = 0x6032BC0; +D_6032CA8 = 0x6032CA8; +D_6033000 = 0x6033000; +D_6033DFC = 0x6033DFC; +D_6033E60 = 0x6033E60; +D_6033EC4 = 0x6033EC4; +D_6033F48 = 0x6033F48; +D_6033FBC = 0x6033FBC; +D_6034040 = 0x6034040; +D_60340A4 = 0x60340A4; +D_6034720 = 0x6034720; +D_6034B90 = 0x6034B90; +D_60354B8 = 0x60354B8; +D_603560C = 0x603560C; +D_6035760 = 0x6035760; +D_60357EC = 0x60357EC; +D_60358D4 = 0x60358D4; +D_6035C10 = 0x6035C10; +D_6035CA8 = 0x6035CA8; +D_6035D0C = 0x6035D0C; +D_6035D70 = 0x6035D70; +D_6035DA0 = 0x6035DA0; +D_6035DD4 = 0x6035DD4; +D_6035E38 = 0x6035E38; +D_6035E9C = 0x6035E9C; +D_60361F0 = 0x60361F0; +D_60362CC = 0x60362CC; +D_6036360 = 0x6036360; +D_60363B0 = 0x60363B0; +D_60365BC = 0x60365BC; +D_6036658 = 0x6036658; +D_6036840 = 0x6036840; +D_6036CD0 = 0x6036CD0; +D_6038018 = 0x6038018; +D_603B060 = 0x603B060; +D_603D9E8 = 0x603D9E8; +D_603DAA0 = 0x603DAA0; +D_603E748 = 0x603E748; +D_603E7C4 = 0x603E7C4; +D_603E924 = 0x603E924; +D_603EB38 = 0x603EB38; +D_6040C70 = 0x6040C70; +D_6040CF0 = 0x6040CF0; +D_60420F0 = 0x60420F0; +D_6042F70 = 0x6042F70; +D_60431A0 = 0x60431A0; +D_6043A20 = 0x6043A20; +D_6043EA0 = 0x6043EA0; +D_6044340 = 0x6044340; +D_6044450 = 0x6044450; +D_6045450 = 0x6045450; +D_6046EC0 = 0x6046EC0; +D_6048820 = 0x6048820; +D_6048A10 = 0x6048A10; +D_60492B0 = 0x60492B0; +D_6049B50 = 0x6049B50; +D_60565F0 = 0x60565F0; +D_6058700 = 0x6058700; +D_7000000 = 0x7000000; +D_7001540 = 0x7001540; +D_70017F0 = 0x70017F0; +D_7001A10 = 0x7001A10; +D_7001C80 = 0x7001C80; +D_7002120 = 0x7002120; +D_7002340 = 0x7002340; +D_7002520 = 0x7002520; +D_7002960 = 0x7002960; +D_7002FF0 = 0x7002FF0; +D_70030F0 = 0x70030F0; +D_7003EE8 = 0x7003EE8; +D_7004240 = 0x7004240; +D_7004320 = 0x7004320; +D_7005300 = 0x7005300; +D_70054D0 = 0x70054D0; +D_7005A10 = 0x7005A10; +D_7005D44 = 0x7005D44; +D_7005E40 = 0x7005E40; +D_7005F10 = 0x7005F10; +D_70064E0 = 0x70064E0; +D_70064F4 = 0x70064F4; +D_70066B0 = 0x70066B0; +D_70067B4 = 0x70067B4; +D_70068BC = 0x70068BC; +D_70068D0 = 0x70068D0; +D_7007EB0 = 0x7007EB0; +D_70084CC = 0x70084CC; +D_7008A90 = 0x7008A90; +D_7008E60 = 0x7008E60; +D_70092E0 = 0x70092E0; +D_70096EC = 0x70096EC; +D_7009A80 = 0x7009A80; +D_7009F10 = 0x7009F10; +D_700B9C0 = 0x700B9C0; +D_700BB10 = 0x700BB10; +D_700C4B0 = 0x700C4B0; +D_700C620 = 0x700C620; +D_700C8B0 = 0x700C8B0; +D_700C8D8 = 0x700C8D8; +D_700C964 = 0x700C964; +D_700C980 = 0x700C980; +D_700CAF4 = 0x700CAF4; +D_700CB60 = 0x700CB60; +D_700D534 = 0x700D534; +D_700D700 = 0x700D700; +D_700E030 = 0x700E030; +D_700E244 = 0x700E244; +D_700E3F0 = 0x700E3F0; +D_700E9E0 = 0x700E9E0; +D_700EA38 = 0x700EA38; +D_700F240 = 0x700F240; +D_700F320 = 0x700F320; +D_7010970 = 0x7010970; +D_7010E10 = 0x7010E10; +D_7010EE0 = 0x7010EE0; +D_7010F00 = 0x7010F00; +D_7010F70 = 0x7010F70; +D_7010FD0 = 0x7010FD0; +D_7010FF0 = 0x7010FF0; +D_70110C0 = 0x70110C0; +D_70110E0 = 0x70110E0; +D_70111B0 = 0x70111B0; +D_7011970 = 0x7011970; +D_7011A88 = 0x7011A88; +D_7011AA0 = 0x7011AA0; +D_7011BA0 = 0x7011BA0; +D_7011C40 = 0x7011C40; +D_7011D40 = 0x7011D40; +D_7011DB0 = 0x7011DB0; +D_7011EB0 = 0x7011EB0; +D_7012B00 = 0x7012B00; +D_7012FC0 = 0x7012FC0; +D_8000000 = 0x8000000; +D_8000708 = 0x8000708; +D_8000D80 = 0x8000D80; +D_8000D90 = 0x8000D90; +D_8000FC0 = 0x8000FC0; +D_8001000 = 0x8001000; +D_8001100 = 0x8001100; +D_8001120 = 0x8001120; +D_8001170 = 0x8001170; +D_8001190 = 0x8001190; +D_8003190 = 0x8003190; +D_8003290 = 0x8003290; +D_80032B0 = 0x80032B0; +D_8003308 = 0x8003308; +D_8003330 = 0x8003330; +D_8003DB0 = 0x8003DB0; +D_8003E10 = 0x8003E10; +D_8003E30 = 0x8003E30; +D_80041F0 = 0x80041F0; +D_80043A0 = 0x80043A0; +D_8004460 = 0x8004460; +D_80044A8 = 0x80044A8; +D_80044D0 = 0x80044D0; +D_8004518 = 0x8004518; +D_8004540 = 0x8004540; +D_8004860 = 0x8004860; +D_8004E00 = 0x8004E00; +D_80053A0 = 0x80053A0; +D_8005920 = 0x8005920; +D_80067A0 = 0x80067A0; +D_80068A0 = 0x80068A0; +D_8006BC0 = 0x8006BC0; +D_8006C40 = 0x8006C40; +D_8006DC0 = 0x8006DC0; +D_8007CC0 = 0x8007CC0; +D_8008120 = 0x8008120; +D_8008FE8 = 0x8008FE8; +D_8009A20 = 0x8009A20; +D_8009AC0 = 0x8009AC0; +D_8009CA0 = 0x8009CA0; +D_800AC60 = 0x800AC60; +D_800B3B0 = 0x800B3B0; +D_800B710 = 0x800B710; +D_800B980 = 0x800B980; +D_800BC90 = 0x800BC90; +D_800CC00 = 0x800CC00; +D_800CE80 = 0x800CE80; +D_800D430 = 0x800D430; +D_800DB30 = 0x800DB30; +D_800E590 = 0x800E590; +D_800E8E0 = 0x800E8E0; +D_800E920 = 0x800E920; +D_800F460 = 0x800F460; +D_8010360 = 0x8010360; +D_8012580 = 0x8012580; +D_8013420 = 0x8013420; +D_8013CC0 = 0x8013CC0; +D_8025080 = 0x8025080; +D_9002CF0 = 0x9002CF0; +D_9003330 = 0x9003330; +D_9003890 = 0x9003890; +D_9003DF0 = 0x9003DF0; +D_9004288 = 0x9004288; +D_900D098 = 0x900D098; +D_900D164 = 0x900D164; +D_900D180 = 0x900D180; +D_900DF20 = 0x900DF20; +D_900FC4C = 0x900FC4C; +D_9010FD0 = 0x9010FD0; +D_9011200 = 0x9011200; +D_9013C20 = 0x9013C20; +D_901C0F4 = 0x901C0F4; +D_901DA50 = 0x901DA50; +D_9023290 = 0x9023290; +D_90234D0 = 0x90234D0; +D_A000000 = 0xA000000; +D_A0002BC = 0xA0002BC; +D_A00047C = 0xA00047C; +D_A000568 = 0xA000568; +D_A000858 = 0xA000858; +D_A000934 = 0xA000934; +D_A000D50 = 0xA000D50; +D_A000EDC = 0xA000EDC; +D_A001A70 = 0xA001A70; +D_A009990 = 0xA009990; +D_C00080C = 0xC00080C; +D_C000DD4 = 0xC000DD4; +D_C001D08 = 0xC001D08; +D_C001D20 = 0xC001D20; +D_C002100 = 0xC002100; +D_C0035D0 = 0xC0035D0; +D_C003A60 = 0xC003A60; +D_C006108 = 0xC006108; +D_C00D048 = 0xC00D048; +D_C00D798 = 0xC00D798; +D_C014940 = 0xC014940; +D_C016250 = 0xC016250; +D_C016630 = 0xC016630; +D_C016640 = 0xC016640; +D_C016798 = 0xC016798; +D_C017DC4 = 0xC017DC4; +D_C01BE3C = 0xC01BE3C; +D_C021720 = 0xC021720; +D_C022D54 = 0xC022D54; +D_C0232D0 = 0xC0232D0; +D_C024E00 = 0xC024E00; +D_C029174 = 0xC029174; +D_C02D694 = 0xC02D694; +D_C02DFA0 = 0xC02DFA0; +D_C02F444 = 0xC02F444; +D_C032980 = 0xC032980; +D_C032F98 = 0xC032F98; +D_C0348A4 = 0xC0348A4; +D_C0348CC = 0xC0348CC; +D_C035510 = 0xC035510; +D_C035D6C = 0xC035D6C; +D_C03653C = 0xC03653C; +D_C03703C = 0xC03703C; +D_C037CC4 = 0xC037CC4; +D_C037ECC = 0xC037ECC; +D_C038124 = 0xC038124; +D_C0381E8 = 0xC0381E8; +D_C038408 = 0xC038408; +D_C038490 = 0xC038490; +D_C039490 = 0xC039490; +D_D000000 = 0xD000000; +D_D000F20 = 0xD000F20; +D_D001E40 = 0xD001E40; +D_D002D60 = 0xD002D60; +D_D003C80 = 0xD003C80; +D_D004BA0 = 0xD004BA0; +D_D005AC0 = 0xD005AC0; +D_D0069E0 = 0xD0069E0; +D_D007900 = 0xD007900; +D_D008820 = 0xD008820; +D_D009740 = 0xD009740; +D_D0098D0 = 0xD0098D0; +D_D00B870 = 0xD00B870; +D_E000000 = 0xE000000; +D_E000150 = 0xE000150; +D_E00A660 = 0xE00A660; +D_E00DF80 = 0xE00DF80; +D_E00EEA0 = 0xE00EEA0; +D_E00FDC0 = 0xE00FDC0; +D_E010CE0 = 0xE010CE0; +D_F000000 = 0xF000000; +D_F000800 = 0xF000800; +D_F000F20 = 0xF000F20; +D_F001000 = 0xF001000; +D_F001800 = 0xF001800; +D_F001E40 = 0xF001E40; +D_F002000 = 0xF002000; +D_F002D60 = 0xF002D60; +D_F003C80 = 0xF003C80; +D_F004BA0 = 0xF004BA0; +D_F005AC0 = 0xF005AC0; +D_F0069E0 = 0xF0069E0; +D_F007900 = 0xF007900; +D_F008820 = 0xF008820; +D_F009740 = 0xF009740; +D_F00A660 = 0xF00A660; +D_F00B580 = 0xF00B580; +D_F00C4A0 = 0xF00C4A0; +D_F00D3C0 = 0xF00D3C0; +D_F00E2E0 = 0xF00E2E0; +D_F00F200 = 0xF00F200; +D_F0103D0 = 0xF0103D0; +D_F014180 = 0xF014180; +D_F014310 = 0xF014310; +D_7FFFFFFE = 0x7FFFFFFE; +D_80000000 = 0x80000000; +D_80000002 = 0x80000002; +D_80000003 = 0x80000003; +D_80000004 = 0x80000004; +D_80000006 = 0x80000006; +D_80000008 = 0x80000008; +D_8000000A = 0x8000000A; +D_8000000C = 0x8000000C; +D_8000000D = 0x8000000D; +D_8000000E = 0x8000000E; +D_8000000F = 0x8000000F; +D_80000014 = 0x80000014; +D_80000018 = 0x80000018; +D_8000001C = 0x8000001C; +D_80000024 = 0x80000024; +D_80004DB8 = 0x80004DB8; +D_8001F0A0 = 0x8001F0A0; +D_8001F4F0 = 0x8001F4F0; +D_8001F6BC = 0x8001F6BC; +D_800255E0 = 0x800255E0; +D_80025EB8 = 0x80025EB8; +D_800C6943 = 0x800C6943; +D_800C696B = 0x800C696B; +D_800CD95F = 0x800CD95F; +D_800CF1E6 = 0x800CF1E6; +D_800CFC68 = 0x800CFC68; +D_800CFE89 = 0x800CFE89; +D_800CFE8D = 0x800CFE8D; +D_800CFE9E = 0x800CFE9E; +D_800E4410 = 0x800E4410; +D_800E63F8 = 0x800E63F8; +D_800E813E = 0x800E813E; +D_800E8142 = 0x800E8142; +D_800E87C0 = 0x800E87C0; +D_800E87CC = 0x800E87CC; +D_800E87D2 = 0x800E87D2; +D_800E87D8 = 0x800E87D8; +D_800E87DA = 0x800E87DA; +D_800E87DB = 0x800E87DB; +D_800E87EA = 0x800E87EA; +D_800E87F0 = 0x800E87F0; +D_800E87F1 = 0x800E87F1; +D_800E87F2 = 0x800E87F2; +D_800E87F3 = 0x800E87F3; +D_800E87F4 = 0x800E87F4; +D_800E87F8 = 0x800E87F8; +D_800E87F9 = 0x800E87F9; +D_800E87FA = 0x800E87FA; +D_800E87FB = 0x800E87FB; +D_800E87FC = 0x800E87FC; +D_800E8800 = 0x800E8800; +D_800E8802 = 0x800E8802; +D_800E8803 = 0x800E8803; +D_800E8804 = 0x800E8804; +D_800E8806 = 0x800E8806; +D_800E8808 = 0x800E8808; +D_800E8809 = 0x800E8809; +D_800E880A = 0x800E880A; +D_800E880C = 0x800E880C; +D_800E880E = 0x800E880E; +D_800E880F = 0x800E880F; +D_800E8810 = 0x800E8810; +D_800E8812 = 0x800E8812; +D_800E8814 = 0x800E8814; +D_800E8815 = 0x800E8815; +D_800E8816 = 0x800E8816; +D_800E8818 = 0x800E8818; +D_800E8830 = 0x800E8830; +D_800E8840 = 0x800E8840; +D_800E99E0 = 0x800E99E0; +D_800EAB90 = 0x800EAB90; +D_800EBD40 = 0x800EBD40; +D_800ECEF0 = 0x800ECEF0; +D_800ECEF4 = 0x800ECEF4; +D_800ECEF8 = 0x800ECEF8; +D_800ECF00 = 0x800ECF00; +D_800ECF08 = 0x800ECF08; +D_800ECF10 = 0x800ECF10; +D_800ECF50 = 0x800ECF50; +D_800ECF68 = 0x800ECF68; +D_800ED030 = 0x800ED030; +D_800ED048 = 0x800ED048; +D_800ED050 = 0x800ED050; +D_800ED068 = 0x800ED068; +D_800ED080 = 0x800ED080; +D_800ED088 = 0x800ED088; +D_800ED0A0 = 0x800ED0A0; +D_800ED120 = 0x800ED120; +D_800ED138 = 0x800ED138; +D_800ED178 = 0x800ED178; +D_800ED190 = 0x800ED190; +D_800ED198 = 0x800ED198; +D_800ED1B0 = 0x800ED1B0; +D_800ED1B8 = 0x800ED1B8; +D_800ED1D0 = 0x800ED1D0; +D_800ED1E0 = 0x800ED1E0; +D_800ED1F8 = 0x800ED1F8; +D_800ED200 = 0x800ED200; +D_800ED218 = 0x800ED218; +D_800ED238 = 0x800ED238; +D_800ED250 = 0x800ED250; +D_800ED258 = 0x800ED258; +D_800ED270 = 0x800ED270; +D_800ED278 = 0x800ED278; +D_800ED290 = 0x800ED290; +D_800ED2D0 = 0x800ED2D0; +D_800ED2E8 = 0x800ED2E8; +D_800ED2F0 = 0x800ED2F0; +D_80140000 = 0x80140000; +D_80142D90 = 0x80142D90; +D_80142D94 = 0x80142D94; +D_80142D98 = 0x80142D98; +D_80142D9C = 0x80142D9C; +D_80142DA0 = 0x80142DA0; +D_80142DA4 = 0x80142DA4; +D_80142DA8 = 0x80142DA8; +D_80142DAC = 0x80142DAC; +D_80142DB0 = 0x80142DB0; +D_80142DB4 = 0x80142DB4; +D_80142DB8 = 0x80142DB8; +D_80142DBC = 0x80142DBC; +D_80142DC0 = 0x80142DC0; +D_80142DC1 = 0x80142DC1; +D_80142DC4 = 0x80142DC4; +D_80142DC5 = 0x80142DC5; +D_80142DC6 = 0x80142DC6; +D_80142DC7 = 0x80142DC7; +D_80142DC8 = 0x80142DC8; +D_80142DCA = 0x80142DCA; +D_80143DD0 = 0x80143DD0; +D_80144F80 = 0x80144F80; +D_80146130 = 0x80146130; +D_801462E0 = 0x801462E0; +D_801462E4 = 0x801462E4; +D_801462E8 = 0x801462E8; +D_801462EC = 0x801462EC; +D_801462F0 = 0x801462F0; +D_801462F4 = 0x801462F4; +D_80146300 = 0x80146300; +D_80146308 = 0x80146308; +D_80146B08 = 0x80146B08; +D_80146B10 = 0x80146B10; +D_80147310 = 0x80147310; +D_8014FB10 = 0x8014FB10; +D_8014FB20 = 0x8014FB20; +D_8014FEA0 = 0x8014FEA0; +D_801500A0 = 0x801500A0; +D_801502A0 = 0x801502A0; +D_80150C50 = 0x80150C50; +D_80150C68 = 0x80150C68; +D_80150C6C = 0x80150C6C; +D_80150C70 = 0x80150C70; +D_80150C88 = 0x80150C88; +D_80151084 = 0x80151084; +D_80151088 = 0x80151088; +D_80151488 = 0x80151488; +D_80151C94 = 0x80151C94; +D_80151C98 = 0x80151C98; +D_80151C9C = 0x80151C9C; +D_80151CA0 = 0x80151CA0; +D_80151CA4 = 0x80151CA4; +D_80151CA8 = 0x80151CA8; +D_80151CAC = 0x80151CAC; +D_80151CB0 = 0x80151CB0; +D_80151CC0 = 0x80151CC0; +D_80151CD0 = 0x80151CD0; +D_80151D90 = 0x80151D90; +D_80151DA0 = 0x80151DA0; +D_801535A0 = 0x801535A0; +D_801535AC = 0x801535AC; +D_80154860 = 0x80154860; +D_80154868 = 0x80154868; +D_80154870 = 0x80154870; +D_80154878 = 0x80154878; +D_801549B8 = 0x801549B8; +D_801549C0 = 0x801549C0; +D_80154DC0 = 0x80154DC0; +D_80154DC8 = 0x80154DC8; +D_801551C8 = 0x801551C8; +D_80155218 = 0x80155218; +D_80155818 = 0x80155818; +D_80155898 = 0x80155898; +D_801558B8 = 0x801558B8; +D_801558E0 = 0x801558E0; +D_801558E8 = 0x801558E8; +D_80155CE8 = 0x80155CE8; +D_80155F30 = 0x80155F30; +D_80156648 = 0x80156648; +D_80156650 = 0x80156650; +D_801566D0 = 0x801566D0; +D_80156790 = 0x80156790; +D_80156950 = 0x80156950; +D_80156960 = 0x80156960; +D_80156964 = 0x80156964; +D_80156968 = 0x80156968; +D_80156980 = 0x80156980; +D_80156990 = 0x80156990; +D_80156D90 = 0x80156D90; +D_80156DF0 = 0x80156DF0; +D_801570E0 = 0x801570E0; +D_801570E6 = 0x801570E6; +D_801570F0 = 0x801570F0; +D_801570F2 = 0x801570F2; +D_801570F3 = 0x801570F3; +D_801570F4 = 0x801570F4; +D_801570F8 = 0x801570F8; +D_80157100 = 0x80157100; +D_80157108 = 0x80157108; +D_80157110 = 0x80157110; +D_80157120 = 0x80157120; +D_80157150 = 0x80157150; +D_80157160 = 0x80157160; +D_80157170 = 0x80157170; +D_80157180 = 0x80157180; +D_80157184 = 0x80157184; +D_80157314 = 0x80157314; +D_80157318 = 0x80157318; +D_80157350 = 0x80157350; +D_80157354 = 0x80157354; +D_801574E4 = 0x801574E4; +D_801574E8 = 0x801574E8; +D_80157502 = 0x80157502; +D_8015750E = 0x8015750E; +D_80157520 = 0x80157520; +D_80157524 = 0x80157524; +D_801576B4 = 0x801576B4; +D_801576B8 = 0x801576B8; +D_801576F0 = 0x801576F0; +D_801576FC = 0x801576FC; +D_80157880 = 0x80157880; +D_80157888 = 0x80157888; +D_80157890 = 0x80157890; +D_80157D90 = 0x80157D90; +D_80157D98 = 0x80157D98; +D_80157D9C = 0x80157D9C; +D_80157DA0 = 0x80157DA0; +D_801582A8 = 0x801582A8; +D_801582B0 = 0x801582B0; +D_801582C0 = 0x801582C0; +D_801582C8 = 0x801582C8; +D_801582D8 = 0x801582D8; +D_801582E8 = 0x801582E8; +D_80158328 = 0x80158328; +D_80158368 = 0x80158368; +D_80158468 = 0x80158468; +D_80158469 = 0x80158469; +D_8015846C = 0x8015846C; +D_80159470 = 0x80159470; +D_80159478 = 0x80159478; +D_80159510 = 0x80159510; +D_801595C4 = 0x801595C4; +D_80159710 = 0x80159710; +D_80159744 = 0x80159744; +D_8015985C = 0x8015985C; +D_801598CC = 0x801598CC; +D_801599A8 = 0x801599A8; +D_8015BF28 = 0x8015BF28; +D_8015BF94 = 0x8015BF94; +D_8015DF28 = 0x8015DF28; +D_8015DF94 = 0x8015DF94; +D_8015DFF0 = 0x8015DFF0; +D_8015E000 = 0x8015E000; +D_8015E010 = 0x8015E010; +D_8015E020 = 0x8015E020; +D_8015E030 = 0x8015E030; +D_8015E040 = 0x8015E040; +D_8015E240 = 0x8015E240; +D_8015EC40 = 0x8015EC40; +D_8015EC44 = 0x8015EC44; +D_8015EC48 = 0x8015EC48; +D_8015F188 = 0x8015F188; +D_8015F1A0 = 0x8015F1A0; +D_8015F1E0 = 0x8015F1E0; +D_8015F1F8 = 0x8015F1F8; +D_8015F238 = 0x8015F238; +D_8015F250 = 0x8015F250; +D_8015F350 = 0x8015F350; +D_8015F950 = 0x8015F950; +D_8015F968 = 0x8015F968; +D_8015F970 = 0x8015F970; +D_8015F988 = 0x8015F988; +D_80160000 = 0x80160000; +D_80160988 = 0x80160988; +D_8016098C = 0x8016098C; +D_80160990 = 0x80160990; +D_80160998 = 0x80160998; +D_80160A98 = 0x80160A98; +D_80160B98 = 0x80160B98; +D_80160B99 = 0x80160B99; +D_80160B9A = 0x80160B9A; +D_80160B9B = 0x80160B9B; +D_80160B9C = 0x80160B9C; +D_80160BA0 = 0x80160BA0; +D_80160BA4 = 0x80160BA4; +D_80160BA8 = 0x80160BA8; +D_80160BAC = 0x80160BAC; +D_80160BB0 = 0x80160BB0; +D_80160BB8 = 0x80160BB8; +D_80160BC2 = 0x80160BC2; +D_80160BD0 = 0x80160BD0; +D_80160BD4 = 0x80160BD4; +D_80160BD8 = 0x80160BD8; +D_80160BDC = 0x80160BDC; +D_80160BE0 = 0x80160BE0; +D_80160BE4 = 0x80160BE4; +D_80160BE6 = 0x80160BE6; +D_80160BE8 = 0x80160BE8; +D_80160BEC = 0x80160BEC; +D_80160BF0 = 0x80160BF0; +D_80160BF4 = 0x80160BF4; +D_80160BF8 = 0x80160BF8; +D_80160C00 = 0x80160C00; +D_80160C04 = 0x80160C04; +D_80160C08 = 0x80160C08; +D_80160CA8 = 0x80160CA8; +D_80160CAC = 0x80160CAC; +D_80160CB0 = 0x80160CB0; +D_80160CBC = 0x80160CBC; +D_80160CC2 = 0x80160CC2; +D_80160CC4 = 0x80160CC4; +D_80160CC8 = 0x80160CC8; +D_80160CCC = 0x80160CCC; +D_80160CD0 = 0x80160CD0; +D_80160D40 = 0x80160D40; +D_80161540 = 0x80161540; +D_80161548 = 0x80161548; +D_80161558 = 0x80161558; +D_8016155C = 0x8016155C; +D_80161560 = 0x80161560; +D_80161660 = 0x80161660; +D_80161760 = 0x80161760; +D_80161780 = 0x80161780; +D_801617A0 = 0x801617A0; +D_801617DC = 0x801617DC; +D_801617E0 = 0x801617E0; +D_801617E1 = 0x801617E1; +D_80161808 = 0x80161808; +D_80161820 = 0x80161820; +D_80161830 = 0x80161830; +D_801618B0 = 0x801618B0; +D_801618C0 = 0x801618C0; +D_801618C8 = 0x801618C8; +D_801618D0 = 0x801618D0; +D_801618D8 = 0x801618D8; +D_801618DC = 0x801618DC; +D_801618E0 = 0x801618E0; +D_801618E8 = 0x801618E8; +D_801618F0 = 0x801618F0; +D_80161AA0 = 0x80161AA0; +D_80162AA0 = 0x80162AA0; +D_80162AB8 = 0x80162AB8; +D_80162AD0 = 0x80162AD0; +D_80162AD2 = 0x80162AD2; +D_80162AD4 = 0x80162AD4; +D_80162AE8 = 0x80162AE8; +D_80162AEA = 0x80162AEA; +D_80162AEC = 0x80162AEC; +D_80162B00 = 0x80162B00; +D_80162B10 = 0x80162B10; +D_80162CC0 = 0x80162CC0; +D_80163CC0 = 0x80163CC0; +D_80163CD8 = 0x80163CD8; +D_80163CE0 = 0x80163CE0; +D_80163CF0 = 0x80163CF0; +D_80163D2C = 0x80163D2C; +D_80163D30 = 0x80163D30; +D_80163D34 = 0x80163D34; +D_80163D35 = 0x80163D35; +D_80163D36 = 0x80163D36; +D_80163D37 = 0x80163D37; +D_80163D38 = 0x80163D38; +D_80163D3C = 0x80163D3C; +D_80163DB0 = 0x80163DB0; +D_80163DF0 = 0x80163DF0; +D_80163DF8 = 0x80163DF8; +D_80163E30 = 0x80163E30; +D_80163E34 = 0x80163E34; +D_80163E38 = 0x80163E38; +D_80163E3C = 0x80163E3C; +D_80163E40 = 0x80163E40; +D_80163E50 = 0x80163E50; +D_80163E58 = 0x80163E58; +D_80163E70 = 0x80163E70; +D_80164E70 = 0x80164E70; +D_80165020 = 0x80165020; +D_80165024 = 0x80165024; +D_80165025 = 0x80165025; +D_80165026 = 0x80165026; +D_80165028 = 0x80165028; +D_8016502C = 0x8016502C; +D_80165094 = 0x80165094; +D_801650A0 = 0x801650A0; +D_801650A4 = 0x801650A4; +D_801650A8 = 0x801650A8; +D_801650AC = 0x801650AC; +D_801650B0 = 0x801650B0; +D_801650B4 = 0x801650B4; +D_801650B8 = 0x801650B8; +D_801650BC = 0x801650BC; +D_801650C0 = 0x801650C0; +D_801650C1 = 0x801650C1; +D_801650C4 = 0x801650C4; +D_801650C8 = 0x801650C8; +D_801650D0 = 0x801650D0; +D_801650DC = 0x801650DC; +D_801650E0 = 0x801650E0; +D_801650E4 = 0x801650E4; +D_801650F0 = 0x801650F0; +D_80165100 = 0x80165100; +D_80165104 = 0x80165104; +D_80165108 = 0x80165108; +D_8016510C = 0x8016510C; +D_80165110 = 0x80165110; +D_80165114 = 0x80165114; +D_80165118 = 0x80165118; +D_8016511C = 0x8016511C; +D_80165120 = 0x80165120; +D_80165124 = 0x80165124; +D_80165128 = 0x80165128; +D_80166B40 = 0x80166B40; +D_80166B50 = 0x80166B50; +D_80166B80 = 0x80166B80; +D_80166B8C = 0x80166B8C; +D_80166B98 = 0x80166B98; +D_80166BB0 = 0x80166BB0; +D_80166BB8 = 0x80166BB8; +D_80166CB8 = 0x80166CB8; +D_80166CE8 = 0x80166CE8; +D_80166D18 = 0x80166D18; +D_80166D20 = 0x80166D20; +D_80166D48 = 0x80166D48; +D_80166D58 = 0x80166D58; +D_80166D70 = 0x80166D70; +D_80166D74 = 0x80166D74; +D_80166D78 = 0x80166D78; +D_80166D80 = 0x80166D80; +D_80166D88 = 0x80166D88; +D_80166D8C = 0x80166D8C; +D_80166D90 = 0x80166D90; +D_80166DD0 = 0x80166DD0; +D_80166E10 = 0x80166E10; +D_80166E14 = 0x80166E14; +D_80166E18 = 0x80166E18; +D_80166E1C = 0x80166E1C; +D_80166E20 = 0x80166E20; +D_80166E24 = 0x80166E24; +D_80166E30 = 0x80166E30; +D_80166E40 = 0x80166E40; +D_80166E44 = 0x80166E44; +D_80166E48 = 0x80166E48; +D_80166E4C = 0x80166E4C; +D_80166E50 = 0x80166E50; +D_80166E54 = 0x80166E54; +D_80166E58 = 0x80166E58; +D_80166E5C = 0x80166E5C; +D_80166E60 = 0x80166E60; +D_80166E88 = 0x80166E88; +D_80166E9C = 0x80166E9C; +D_80166EB0 = 0x80166EB0; +D_80166EB4 = 0x80166EB4; +D_80166ED8 = 0x80166ED8; +D_80166EDC = 0x80166EDC; +D_80166F00 = 0x80166F00; +D_80166F04 = 0x80166F04; +D_80166F08 = 0x80166F08; +D_80166F0C = 0x80166F0C; +D_80166F10 = 0x80166F10; +D_80166F50 = 0x80166F50; +D_80166F54 = 0x80166F54; +D_80166F58 = 0x80166F58; +D_80166F5C = 0x80166F5C; +D_80166F60 = 0x80166F60; +D_80166F64 = 0x80166F64; +D_80166F68 = 0x80166F68; +D_80166FA0 = 0x80166FA0; +D_80166FA4 = 0x80166FA4; +D_80166FA8 = 0x80166FA8; +D_80166FAC = 0x80166FAC; +D_80166FB0 = 0x80166FB0; +D_80166FF0 = 0x80166FF0; +D_80166FF4 = 0x80166FF4; +D_80166FF8 = 0x80166FF8; +D_80167000 = 0x80167000; +D_8016700C = 0x8016700C; +D_80167010 = 0x80167010; +D_80167014 = 0x80167014; +D_80167018 = 0x80167018; +D_80167054 = 0x80167054; +D_80167058 = 0x80167058; +D_8016705C = 0x8016705C; +D_80167060 = 0x80167060; +D_80167064 = 0x80167064; +D_80167068 = 0x80167068; +D_8016706C = 0x8016706C; +D_80167070 = 0x80167070; +D_80167074 = 0x80167074; +D_80167078 = 0x80167078; +D_8016707C = 0x8016707C; +D_80167080 = 0x80167080; +D_80167084 = 0x80167084; +D_80167088 = 0x80167088; +D_8016708C = 0x8016708C; +D_80167090 = 0x80167090; +D_80167094 = 0x80167094; +D_80167098 = 0x80167098; +D_8016709C = 0x8016709C; +D_801670A0 = 0x801670A0; +D_801670A4 = 0x801670A4; +D_801670A8 = 0x801670A8; +D_801670B0 = 0x801670B0; +D_801670B4 = 0x801670B4; +D_801670B8 = 0x801670B8; +D_801670BC = 0x801670BC; +D_801670C0 = 0x801670C0; +D_801670C4 = 0x801670C4; +D_801670C8 = 0x801670C8; +D_801670CC = 0x801670CC; +D_801670D0 = 0x801670D0; +D_801670D4 = 0x801670D4; +D_801670D8 = 0x801670D8; +D_801670DC = 0x801670DC; +D_801670E0 = 0x801670E0; +D_801670E4 = 0x801670E4; +D_801670E8 = 0x801670E8; +D_801670F0 = 0x801670F0; +D_801670F4 = 0x801670F4; +D_801670F8 = 0x801670F8; +D_801670FC = 0x801670FC; +D_80167100 = 0x80167100; +D_80167104 = 0x80167104; +D_80167108 = 0x80167108; +D_8016710C = 0x8016710C; +D_80167110 = 0x80167110; +D_80167114 = 0x80167114; +D_80167118 = 0x80167118; +D_8016711C = 0x8016711C; +D_80167120 = 0x80167120; +D_80167124 = 0x80167124; +D_80167128 = 0x80167128; +D_8016712C = 0x8016712C; +D_80167130 = 0x80167130; +D_80167134 = 0x80167134; +D_80167138 = 0x80167138; +D_8016713C = 0x8016713C; +D_80167140 = 0x80167140; +D_801671B0 = 0x801671B0; +D_801671B2 = 0x801671B2; +D_801671B3 = 0x801671B3; +D_801671B4 = 0x801671B4; +D_801671B8 = 0x801671B8; +D_801671BC = 0x801671BC; +D_801671C0 = 0x801671C0; +D_801671C4 = 0x801671C4; +D_801671C8 = 0x801671C8; +D_801671CC = 0x801671CC; +D_801671D0 = 0x801671D0; +D_801671D4 = 0x801671D4; +D_801671D8 = 0x801671D8; +D_801671DC = 0x801671DC; +D_801671DE = 0x801671DE; +D_801671E0 = 0x801671E0; +D_801671E2 = 0x801671E2; +D_801671E4 = 0x801671E4; +D_801671F4 = 0x801671F4; +D_801671F8 = 0x801671F8; +D_801671FA = 0x801671FA; +D_801671FC = 0x801671FC; +D_80167200 = 0x80167200; +D_80167204 = 0x80167204; +D_80167210 = 0x80167210; +D_80167214 = 0x80167214; +D_80167218 = 0x80167218; +D_8016721C = 0x8016721C; +D_80167220 = 0x80167220; +D_80167224 = 0x80167224; +D_80167228 = 0x80167228; +D_8016722C = 0x8016722C; +D_80167230 = 0x80167230; +D_80167231 = 0x80167231; +D_80167234 = 0x80167234; +D_80167238 = 0x80167238; +D_8016723C = 0x8016723C; +D_80167240 = 0x80167240; +D_80167248 = 0x80167248; +D_8016724B = 0x8016724B; +D_80167258 = 0x80167258; +D_80167268 = 0x80167268; +D_801672A0 = 0x801672A0; +D_801672B0 = 0x801672B0; +D_80168BA0 = 0x80168BA0; +D_80169780 = 0x80169780; +D_80169782 = 0x80169782; +D_80169784 = 0x80169784; +D_80169788 = 0x80169788; +D_8016978C = 0x8016978C; +D_80169794 = 0x80169794; +D_80169798 = 0x80169798; +D_8016979C = 0x8016979C; +D_801697D0 = 0x801697D0; +D_801697D4 = 0x801697D4; +D_801697D8 = 0x801697D8; +D_801697E8 = 0x801697E8; +D_801697FC = 0x801697FC; +D_80169808 = 0x80169808; +D_80169836 = 0x80169836; +D_80169838 = 0x80169838; +D_80169846 = 0x80169846; +D_80169849 = 0x80169849; +D_8016984E = 0x8016984E; +D_80169864 = 0x80169864; +D_80169866 = 0x80169866; +D_80169868 = 0x80169868; +D_8016986C = 0x8016986C; +D_80169870 = 0x80169870; +D_80169878 = 0x80169878; +D_80169880 = 0x80169880; +D_80169890 = 0x80169890; +D_80169894 = 0x80169894; +D_80169898 = 0x80169898; +D_8016989C = 0x8016989C; +D_801698A0 = 0x801698A0; +D_801698A4 = 0x801698A4; +D_801698A8 = 0x801698A8; +D_801698AC = 0x801698AC; +D_801698B0 = 0x801698B0; +D_801698E0 = 0x801698E0; +D_801698E4 = 0x801698E4; +D_80169908 = 0x80169908; +D_80169A00 = 0x80169A00; +D_80169A74 = 0x80169A74; +D_80169A78 = 0x80169A78; +D_80169A7C = 0x80169A7C; +D_80169A80 = 0x80169A80; +D_80169AF0 = 0x80169AF0; +D_80169AFC = 0x80169AFC; +D_80169B2C = 0x80169B2C; +D_80169B5A = 0x80169B5A; +D_80169B60 = 0x80169B60; +D_80169B64 = 0x80169B64; +D_80169B6C = 0x80169B6C; +D_80169B70 = 0x80169B70; +D_80169B74 = 0x80169B74; +D_80169B88 = 0x80169B88; +D_80169BD4 = 0x80169BD4; +D_80169BD8 = 0x80169BD8; +D_80169BFC = 0x80169BFC; +D_80169CF4 = 0x80169CF4; +D_80169D68 = 0x80169D68; +D_80169D6C = 0x80169D6C; +D_80169D70 = 0x80169D70; +D_80169D74 = 0x80169D74; +D_80169D80 = 0x80169D80; +D_80169DE4 = 0x80169DE4; +D_80169DF0 = 0x80169DF0; +D_80169E20 = 0x80169E20; +D_80169E4E = 0x80169E4E; +D_80169E54 = 0x80169E54; +D_80169E58 = 0x80169E58; +D_80169E68 = 0x80169E68; +D_80169E7C = 0x80169E7C; +D_80169ECC = 0x80169ECC; +D_80169EF0 = 0x80169EF0; +D_80169FE8 = 0x80169FE8; +D_8016A05C = 0x8016A05C; +D_8016A060 = 0x8016A060; +D_8016A064 = 0x8016A064; +D_8016A068 = 0x8016A068; +D_8016A06C = 0x8016A06C; +D_8016A098 = 0x8016A098; +D_8016A114 = 0x8016A114; +D_8016A142 = 0x8016A142; +D_8016A148 = 0x8016A148; +D_8016A14C = 0x8016A14C; +D_8016A15C = 0x8016A15C; +D_8016A170 = 0x8016A170; +D_8016A1E4 = 0x8016A1E4; +D_8016A350 = 0x8016A350; +D_8016A354 = 0x8016A354; +D_8016A358 = 0x8016A358; +D_8016A35C = 0x8016A35C; +D_8016A3AC = 0x8016A3AC; +D_8016A3BC = 0x8016A3BC; +D_8016A408 = 0x8016A408; +D_8016A438 = 0x8016A438; +D_8016A43C = 0x8016A43C; +D_8016A440 = 0x8016A440; +D_8016A44C = 0x8016A44C; +D_8016A450 = 0x8016A450; +D_8016A460 = 0x8016A460; +D_8016A464 = 0x8016A464; +D_8016A474 = 0x8016A474; +D_8016A644 = 0x8016A644; +D_8016A648 = 0x8016A648; +D_8016A64C = 0x8016A64C; +D_8016A650 = 0x8016A650; +D_8016A654 = 0x8016A654; +D_8016A658 = 0x8016A658; +D_8016A65C = 0x8016A65C; +D_8016A6FC = 0x8016A6FC; +D_8016A72C = 0x8016A72C; +D_8016A734 = 0x8016A734; +D_8016A744 = 0x8016A744; +D_8016A754 = 0x8016A754; +D_8016A758 = 0x8016A758; +D_8016A768 = 0x8016A768; +D_8016A938 = 0x8016A938; +D_8016A93C = 0x8016A93C; +D_8016A940 = 0x8016A940; +D_8016A944 = 0x8016A944; +D_8016A948 = 0x8016A948; +D_8016A94C = 0x8016A94C; +D_8016A950 = 0x8016A950; +D_8016A9F0 = 0x8016A9F0; +D_8016AA20 = 0x8016AA20; +D_8016AA28 = 0x8016AA28; +D_8016AA38 = 0x8016AA38; +D_8016AA48 = 0x8016AA48; +D_8016AA50 = 0x8016AA50; +D_8016AA5C = 0x8016AA5C; +D_8016AC2C = 0x8016AC2C; +D_8016AC30 = 0x8016AC30; +D_8016AC34 = 0x8016AC34; +D_8016AC38 = 0x8016AC38; +D_8016AC44 = 0x8016AC44; +D_8016ACE4 = 0x8016ACE4; +D_8016AD14 = 0x8016AD14; +D_8016AD1C = 0x8016AD1C; +D_8016AD2C = 0x8016AD2C; +D_8016AF20 = 0x8016AF20; +D_8016AF22 = 0x8016AF22; +D_8016AF24 = 0x8016AF24; +D_8016AF28 = 0x8016AF28; +D_8016AF2C = 0x8016AF2C; +D_8016AF30 = 0x8016AF30; +D_8016AF34 = 0x8016AF34; +D_8016AF38 = 0x8016AF38; +D_8016AF3C = 0x8016AF3C; +D_8016AF58 = 0x8016AF58; +D_8016AF9C = 0x8016AF9C; +D_8016AFD6 = 0x8016AFD6; +D_8016AFD8 = 0x8016AFD8; +D_8016AFDC = 0x8016AFDC; +D_8016AFEE = 0x8016AFEE; +D_8016B004 = 0x8016B004; +D_8016B006 = 0x8016B006; +D_8016B008 = 0x8016B008; +D_8016B00C = 0x8016B00C; +D_8016B010 = 0x8016B010; +D_8016B014 = 0x8016B014; +D_8016B018 = 0x8016B018; +D_8016B01C = 0x8016B01C; +D_8016B020 = 0x8016B020; +D_8016B034 = 0x8016B034; +D_8016B040 = 0x8016B040; +D_8016B050 = 0x8016B050; +D_8016B054 = 0x8016B054; +D_8016B058 = 0x8016B058; +D_8016B214 = 0x8016B214; +D_8016B216 = 0x8016B216; +D_8016B218 = 0x8016B218; +D_8016B21C = 0x8016B21C; +D_8016B230 = 0x8016B230; +D_8016B24C = 0x8016B24C; +D_8016B250 = 0x8016B250; +D_8016B290 = 0x8016B290; +D_8016B2CA = 0x8016B2CA; +D_8016B2CC = 0x8016B2CC; +D_8016B2D6 = 0x8016B2D6; +D_8016B2DD = 0x8016B2DD; +D_8016B2E2 = 0x8016B2E2; +D_8016B2E4 = 0x8016B2E4; +D_8016B2F8 = 0x8016B2F8; +D_8016B2FA = 0x8016B2FA; +D_8016B314 = 0x8016B314; +D_8016B508 = 0x8016B508; +D_8016B50A = 0x8016B50A; +D_8016B50C = 0x8016B50C; +D_8016B510 = 0x8016B510; +D_8016B514 = 0x8016B514; +D_8016B524 = 0x8016B524; +D_8016B530 = 0x8016B530; +D_8016B5C0 = 0x8016B5C0; +D_8016B5C4 = 0x8016B5C4; +D_8016B5D6 = 0x8016B5D6; +D_8016B5D8 = 0x8016B5D8; +D_8016B5EC = 0x8016B5EC; +D_8016B5EE = 0x8016B5EE; +D_8016B604 = 0x8016B604; +D_8016B608 = 0x8016B608; +D_8016B620 = 0x8016B620; +D_8016B668 = 0x8016B668; +D_8016B66C = 0x8016B66C; +D_8016B690 = 0x8016B690; +D_8016B7FC = 0x8016B7FC; +D_8016B8B4 = 0x8016B8B4; +D_8016B8E2 = 0x8016B8E2; +D_8016B8FC = 0x8016B8FC; +D_8016BAF0 = 0x8016BAF0; +D_8016BDE4 = 0x8016BDE4; +D_8016C0D8 = 0x8016C0D8; +D_8016C3CC = 0x8016C3CC; +D_8016C6C0 = 0x8016C6C0; +D_8016C9B4 = 0x8016C9B4; +D_8016CF9C = 0x8016CF9C; +D_8016CF9E = 0x8016CF9E; +D_8016CFA0 = 0x8016CFA0; +D_8016CFB8 = 0x8016CFB8; +D_8016D054 = 0x8016D054; +D_8016D080 = 0x8016D080; +D_8016D090 = 0x8016D090; +D_8016D094 = 0x8016D094; +D_8016D0B0 = 0x8016D0B0; +D_8016D0B4 = 0x8016D0B4; +D_8016D290 = 0x8016D290; +D_8016ED24 = 0x8016ED24; +D_8016F018 = 0x8016F018; +D_8016F028 = 0x8016F028; +D_8016F030 = 0x8016F030; +D_8016F100 = 0x8016F100; +D_8016F104 = 0x8016F104; +D_8016F118 = 0x8016F118; +D_8016F30C = 0x8016F30C; +D_8016F600 = 0x8016F600; +D_8016F8F4 = 0x8016F8F4; +D_8016FC00 = 0x8016FC00; +D_8016FCE8 = 0x8016FCE8; +D_80171780 = 0x80171780; +D_80172834 = 0x80172834; +D_80172B28 = 0x80172B28; +D_80172B2A = 0x80172B2A; +D_80172B2C = 0x80172B2C; +D_80172B30 = 0x80172B30; +D_80172B34 = 0x80172B34; +D_80172B44 = 0x80172B44; +D_80172B54 = 0x80172B54; +D_80172B64 = 0x80172B64; +D_80172B6E = 0x80172B6E; +D_80172BDE = 0x80172BDE; +D_80172C28 = 0x80172C28; +D_80172C38 = 0x80172C38; +D_80172C8C = 0x80172C8C; +D_801743D8 = 0x801743D8; +D_801745BC = 0x801745BC; +D_801745C4 = 0x801745C4; +D_801746AC = 0x801746AC; +D_801746BC = 0x801746BC; +D_801746D0 = 0x801746D0; +D_801748B0 = 0x801748B0; +D_801748B2 = 0x801748B2; +D_801748B4 = 0x801748B4; +D_801748B8 = 0x801748B8; +D_801748BC = 0x801748BC; +D_801748C0 = 0x801748C0; +D_801748C4 = 0x801748C4; +D_801748C8 = 0x801748C8; +D_801748CC = 0x801748CC; +D_801748D8 = 0x801748D8; +D_801748FA = 0x801748FA; +D_801748FE = 0x801748FE; +D_80174900 = 0x80174900; +D_80174902 = 0x80174902; +D_80174910 = 0x80174910; +D_80174912 = 0x80174912; +D_80174924 = 0x80174924; +D_80174928 = 0x80174928; +D_8017492C = 0x8017492C; +D_80174930 = 0x80174930; +D_80174938 = 0x80174938; +D_80174944 = 0x80174944; +D_8017495E = 0x8017495E; +D_8017496A = 0x8017496A; +D_80174986 = 0x80174986; +D_80174988 = 0x80174988; +D_8017498C = 0x8017498C; +D_80174990 = 0x80174990; +D_80174994 = 0x80174994; +D_801749B0 = 0x801749B0; +D_80174CAC = 0x80174CAC; +D_80174CB8 = 0x80174CB8; +D_80174CBA = 0x80174CBA; +D_80174CBC = 0x80174CBC; +D_80174CC0 = 0x80174CC0; +D_80174CC4 = 0x80174CC4; +D_80174CC8 = 0x80174CC8; +D_80174CD4 = 0x80174CD4; +D_80174D06 = 0x80174D06; +D_80174D08 = 0x80174D08; +D_80174D18 = 0x80174D18; +D_80174D42 = 0x80174D42; +D_80174D5E = 0x80174D5E; +D_80174D60 = 0x80174D60; +D_801750B0 = 0x801750B0; +D_801750B4 = 0x801750B4; +D_801750C0 = 0x801750C0; +D_801750C2 = 0x801750C2; +D_801750C4 = 0x801750C4; +D_801750C8 = 0x801750C8; +D_801750CC = 0x801750CC; +D_801750DC = 0x801750DC; +D_8017510E = 0x8017510E; +D_80175120 = 0x80175120; +D_80175190 = 0x80175190; +D_801758D0 = 0x801758D0; +D_8017591E = 0x8017591E; +D_80175950 = 0x80175950; +D_801759E8 = 0x801759E8; +D_80175CCC = 0x80175CCC; +D_80176A50 = 0x80176A50; +D_80176ADC = 0x80176ADC; +D_80177428 = 0x80177428; +D_80177F18 = 0x80177F18; +D_80178404 = 0x80178404; +D_80178490 = 0x80178490; +D_80178CC4 = 0x80178CC4; +D_80178EF4 = 0x80178EF4; +D_80178F80 = 0x80178F80; +D_80178FEC = 0x80178FEC; +D_80179000 = 0x80179000; +D_80179780 = 0x80179780; +D_801797F0 = 0x801797F0; +D_80179828 = 0x80179828; +D_80179940 = 0x80179940; +D_80179C50 = 0x80179C50; +D_80179CC0 = 0x80179CC0; +D_80179DA0 = 0x80179DA0; +D_80179E10 = 0x80179E10; +D_80179E80 = 0x80179E80; +D_80179EB8 = 0x80179EB8; +D_80179EC0 = 0x80179EC0; +D_80179EC8 = 0x80179EC8; +D_80179EE0 = 0x80179EE0; +D_80179EF0 = 0x80179EF0; +D_8017A370 = 0x8017A370; +D_8017B1B0 = 0x8017B1B0; +D_8017BBB0 = 0x8017BBB0; +D_8017BBD8 = 0x8017BBD8; +D_8017BCF0 = 0x8017BCF0; +D_8017BCF8 = 0x8017BCF8; +D_8017C018 = 0x8017C018; +D_8017C338 = 0x8017C338; +D_8017C658 = 0x8017C658; +D_8017C978 = 0x8017C978; +D_8017CC98 = 0x8017CC98; +D_8017CCA0 = 0x8017CCA0; +D_8017CFC0 = 0x8017CFC0; +D_8017CFC4 = 0x8017CFC4; +D_8017CFC8 = 0x8017CFC8; +D_8017CFCC = 0x8017CFCC; +D_8017CFD0 = 0x8017CFD0; +D_8017CFD4 = 0x8017CFD4; +D_8017CFD8 = 0x8017CFD8; +D_8017CFDC = 0x8017CFDC; +D_8017CFE0 = 0x8017CFE0; +D_8017CFE4 = 0x8017CFE4; +D_8017CFE8 = 0x8017CFE8; +D_8017CFEC = 0x8017CFEC; +D_8017CFF0 = 0x8017CFF0; +D_8017CFF4 = 0x8017CFF4; +D_8017CFF8 = 0x8017CFF8; +D_8017D008 = 0x8017D008; +D_8017D010 = 0x8017D010; +D_8017D014 = 0x8017D014; +D_8017D018 = 0x8017D018; +D_8017D01C = 0x8017D01C; +D_8017D020 = 0x8017D020; +D_8017D028 = 0x8017D028; +D_8017D038 = 0x8017D038; +D_8017D03C = 0x8017D03C; +D_8017D040 = 0x8017D040; +D_8017D043 = 0x8017D043; +D_8017D044 = 0x8017D044; +D_8017D048 = 0x8017D048; +D_8017D04B = 0x8017D04B; +D_8017D04C = 0x8017D04C; +D_8017D050 = 0x8017D050; +D_8017D054 = 0x8017D054; +D_8017D058 = 0x8017D058; +D_8017D05C = 0x8017D05C; +D_8017D060 = 0x8017D060; +D_8017D068 = 0x8017D068; +D_8017D070 = 0x8017D070; +D_8017D074 = 0x8017D074; +D_8017D07C = 0x8017D07C; +D_8017D080 = 0x8017D080; +D_8017D088 = 0x8017D088; +D_8017D090 = 0x8017D090; +D_8017D094 = 0x8017D094; +D_8017D0A8 = 0x8017D0A8; +D_8017D0B0 = 0x8017D0B0; +D_8017D0B4 = 0x8017D0B4; +D_8017D0C0 = 0x8017D0C0; +D_8017D0C8 = 0x8017D0C8; +D_8017D0D0 = 0x8017D0D0; +D_8017D0D8 = 0x8017D0D8; +D_8017D0E0 = 0x8017D0E0; +D_8017D0E8 = 0x8017D0E8; +D_8017D0F0 = 0x8017D0F0; +D_8017D0F8 = 0x8017D0F8; +D_8017D108 = 0x8017D108; +D_8017D10C = 0x8017D10C; +D_8017D110 = 0x8017D110; +D_8017D114 = 0x8017D114; +D_8017D118 = 0x8017D118; +D_8017D11C = 0x8017D11C; +D_8017D120 = 0x8017D120; +D_8017D124 = 0x8017D124; +D_8017D128 = 0x8017D128; +D_8017D130 = 0x8017D130; +D_8017D140 = 0x8017D140; +D_8017D148 = 0x8017D148; +D_8017D158 = 0x8017D158; +D_8017D15C = 0x8017D15C; +D_8017D160 = 0x8017D160; +D_8017D168 = 0x8017D168; +D_8017D178 = 0x8017D178; +D_8017D184 = 0x8017D184; +D_8017D188 = 0x8017D188; +D_8017D194 = 0x8017D194; +D_8017D198 = 0x8017D198; +D_8017D1A0 = 0x8017D1A0; +D_8017D1B0 = 0x8017D1B0; +D_8017D1B4 = 0x8017D1B4; +D_8017D1B8 = 0x8017D1B8; +D_8017D1C8 = 0x8017D1C8; +D_8017D1CC = 0x8017D1CC; +D_8017D1D0 = 0x8017D1D0; +D_8017D1D4 = 0x8017D1D4; +D_8017D1D8 = 0x8017D1D8; +D_8017D1E8 = 0x8017D1E8; +D_8017D1EC = 0x8017D1EC; +D_8017D1F0 = 0x8017D1F0; +D_8017D1F4 = 0x8017D1F4; +D_8017D1F8 = 0x8017D1F8; +D_8017D1FC = 0x8017D1FC; +D_8017D200 = 0x8017D200; +D_8017D204 = 0x8017D204; +D_8017D208 = 0x8017D208; +D_8017D20C = 0x8017D20C; +D_8017D210 = 0x8017D210; +D_8017D220 = 0x8017D220; +D_8017D228 = 0x8017D228; +D_8017D238 = 0x8017D238; +D_8017D240 = 0x8017D240; +D_8017D250 = 0x8017D250; +D_8017D258 = 0x8017D258; +D_8017D268 = 0x8017D268; +D_8017D270 = 0x8017D270; +D_8017D280 = 0x8017D280; +D_8017D288 = 0x8017D288; +D_8017D298 = 0x8017D298; +D_8017D2A0 = 0x8017D2A0; +D_8017D2E0 = 0x8017D2E0; +D_8017D2E4 = 0x8017D2E4; +D_8017D2E8 = 0x8017D2E8; +D_8017D2EC = 0x8017D2EC; +D_8017D2F0 = 0x8017D2F0; +D_8017D30C = 0x8017D30C; +D_8017D310 = 0x8017D310; +D_8017D32C = 0x8017D32C; +D_8017D330 = 0x8017D330; +D_8017D334 = 0x8017D334; +D_8017D338 = 0x8017D338; +D_8017D34C = 0x8017D34C; +D_8017D350 = 0x8017D350; +D_8017D354 = 0x8017D354; +D_8017D358 = 0x8017D358; +D_8017D370 = 0x8017D370; +D_8017D378 = 0x8017D378; +D_8017D3D0 = 0x8017D3D0; +D_8017D3D8 = 0x8017D3D8; +D_8017D3DC = 0x8017D3DC; +D_8017D3E8 = 0x8017D3E8; +D_8017D3F0 = 0x8017D3F0; +D_8017D3F8 = 0x8017D3F8; +D_8017D3FC = 0x8017D3FC; +D_8017D410 = 0x8017D410; +D_8017D414 = 0x8017D414; +D_8017D418 = 0x8017D418; +D_8017D41C = 0x8017D41C; +D_8017D420 = 0x8017D420; +D_8017D42C = 0x8017D42C; +D_8017D430 = 0x8017D430; +D_8017D434 = 0x8017D434; +D_8017D438 = 0x8017D438; +D_8017D43C = 0x8017D43C; +D_8017D440 = 0x8017D440; +D_8017D444 = 0x8017D444; +D_8017D44C = 0x8017D44C; +D_8017D450 = 0x8017D450; +D_8017D454 = 0x8017D454; +D_8017D45C = 0x8017D45C; +D_8017D460 = 0x8017D460; +D_8017D464 = 0x8017D464; +D_8017D468 = 0x8017D468; +D_8017D470 = 0x8017D470; +D_8017D474 = 0x8017D474; +D_8017D478 = 0x8017D478; +D_8017D47C = 0x8017D47C; +D_8017D488 = 0x8017D488; +D_8017D490 = 0x8017D490; +D_8017D494 = 0x8017D494; +D_8017D4A8 = 0x8017D4A8; +D_8017D4B0 = 0x8017D4B0; +D_8017D4C0 = 0x8017D4C0; +D_8017D4C8 = 0x8017D4C8; +D_8017D4D8 = 0x8017D4D8; +D_8017D4E0 = 0x8017D4E0; +D_8017D4F0 = 0x8017D4F0; +D_8017D4F8 = 0x8017D4F8; +D_8017D508 = 0x8017D508; +D_8017D510 = 0x8017D510; +D_8017D528 = 0x8017D528; +D_8017D540 = 0x8017D540; +D_8017D548 = 0x8017D548; +D_8017D550 = 0x8017D550; +D_8017D558 = 0x8017D558; +D_8017D568 = 0x8017D568; +D_8017D570 = 0x8017D570; +D_8017D610 = 0x8017D610; +D_8017D614 = 0x8017D614; +D_8017D618 = 0x8017D618; +D_8017D61C = 0x8017D61C; +D_8017D620 = 0x8017D620; +D_8017D624 = 0x8017D624; +D_8017D628 = 0x8017D628; +D_8017D62C = 0x8017D62C; +D_8017D630 = 0x8017D630; +D_8017D638 = 0x8017D638; +D_8017D6B0 = 0x8017D6B0; +D_8017D6C4 = 0x8017D6C4; +D_8017D7CC = 0x8017D7CC; +D_8017D8CC = 0x8017D8CC; +D_8017D8D4 = 0x8017D8D4; +D_8017D9D4 = 0x8017D9D4; +D_8017D9D9 = 0x8017D9D9; +D_8017DA1C = 0x8017DA1C; +D_8017DA20 = 0x8017DA20; +D_8017DA24 = 0x8017DA24; +D_8017DA28 = 0x8017DA28; +D_8017DA2C = 0x8017DA2C; +D_8017DA30 = 0x8017DA30; +D_8017DA34 = 0x8017DA34; +D_8017DA38 = 0x8017DA38; +D_8017DA3C = 0x8017DA3C; +D_8017DA44 = 0x8017DA44; +D_8017DA48 = 0x8017DA48; +D_8017DA4C = 0x8017DA4C; +D_8017DA54 = 0x8017DA54; +D_8017DA58 = 0x8017DA58; +D_8017DA5C = 0x8017DA5C; +D_8017DA60 = 0x8017DA60; +D_8017DA64 = 0x8017DA64; +D_8017DA68 = 0x8017DA68; +D_8017DA6C = 0x8017DA6C; +D_8017DA70 = 0x8017DA70; +D_8017DA74 = 0x8017DA74; +D_8017DA78 = 0x8017DA78; +D_8017DA7C = 0x8017DA7C; +D_8017DA84 = 0x8017DA84; +D_8017DA88 = 0x8017DA88; +D_8017DA8C = 0x8017DA8C; +D_8017DA98 = 0x8017DA98; +D_8017DA9C = 0x8017DA9C; +D_8017DAA0 = 0x8017DAA0; +D_8017DAA8 = 0x8017DAA8; +D_8017DAB0 = 0x8017DAB0; +D_8017DAC0 = 0x8017DAC0; +D_8017DAC8 = 0x8017DAC8; +D_8017DAD0 = 0x8017DAD0; +D_8017DAD8 = 0x8017DAD8; +D_8017DAE0 = 0x8017DAE0; +D_8017DAE8 = 0x8017DAE8; +D_8017DAF0 = 0x8017DAF0; +D_8017DAF4 = 0x8017DAF4; +D_8017DAF8 = 0x8017DAF8; +D_8017DAFC = 0x8017DAFC; +D_8017DB00 = 0x8017DB00; +D_8017DB04 = 0x8017DB04; +D_8017DB08 = 0x8017DB08; +D_8017DB0C = 0x8017DB0C; +D_8017DB10 = 0x8017DB10; +D_8017DB14 = 0x8017DB14; +D_8017DB18 = 0x8017DB18; +D_8017DB1C = 0x8017DB1C; +D_8017DB20 = 0x8017DB20; +D_8017DB30 = 0x8017DB30; +D_8017DB40 = 0x8017DB40; +D_8017DB50 = 0x8017DB50; +D_8017DB60 = 0x8017DB60; +D_8017DB70 = 0x8017DB70; +D_8017DB74 = 0x8017DB74; +D_8017DB78 = 0x8017DB78; +D_8017DB7C = 0x8017DB7C; +D_8017DBB0 = 0x8017DBB0; +D_8017DBB4 = 0x8017DBB4; +D_8017DBB8 = 0x8017DBB8; +D_8017DBC0 = 0x8017DBC0; +D_8017DBC4 = 0x8017DBC4; +D_8017DBC8 = 0x8017DBC8; +D_8017DBCC = 0x8017DBCC; +D_8017DBD0 = 0x8017DBD0; +D_8017DBE0 = 0x8017DBE0; +D_8017DBE4 = 0x8017DBE4; +D_8017DBE8 = 0x8017DBE8; +D_8017DBF0 = 0x8017DBF0; +D_8017DBF4 = 0x8017DBF4; +D_8017DBF8 = 0x8017DBF8; +D_8017DC00 = 0x8017DC00; +D_8017DC04 = 0x8017DC04; +D_8017DC08 = 0x8017DC08; +D_8017DC10 = 0x8017DC10; +D_8017DC14 = 0x8017DC14; +D_8017DC18 = 0x8017DC18; +D_8017DC1C = 0x8017DC1C; +D_8017DC20 = 0x8017DC20; +D_8017DC24 = 0x8017DC24; +D_8017DC28 = 0x8017DC28; +D_8017DC34 = 0x8017DC34; +D_8017DC38 = 0x8017DC38; +D_8017DC3C = 0x8017DC3C; +D_8017DC40 = 0x8017DC40; +D_8017DC44 = 0x8017DC44; +D_8017DC4C = 0x8017DC4C; +D_8017DC58 = 0x8017DC58; +D_8017DC5C = 0x8017DC5C; +D_8017DC60 = 0x8017DC60; +D_8017DC64 = 0x8017DC64; +D_8017DC68 = 0x8017DC68; +D_8017DC6C = 0x8017DC6C; +D_8017DC70 = 0x8017DC70; +D_8017DC74 = 0x8017DC74; +D_8017DC78 = 0x8017DC78; +D_8017DC7C = 0x8017DC7C; +D_8017DC80 = 0x8017DC80; +D_8017DC84 = 0x8017DC84; +D_8017DC88 = 0x8017DC88; +D_8017DC8C = 0x8017DC8C; +D_8017DC90 = 0x8017DC90; +D_8017DC94 = 0x8017DC94; +D_8017DC98 = 0x8017DC98; +D_8017DC9C = 0x8017DC9C; +D_8017DCA0 = 0x8017DCA0; +D_8017DCA4 = 0x8017DCA4; +D_8017DCA8 = 0x8017DCA8; +D_8017DCAC = 0x8017DCAC; +D_8017DCB0 = 0x8017DCB0; +D_8017DCC0 = 0x8017DCC0; +D_8017DCC4 = 0x8017DCC4; +D_8017DCC8 = 0x8017DCC8; +D_8017DCD8 = 0x8017DCD8; +D_8017DCDC = 0x8017DCDC; +D_8017DCE0 = 0x8017DCE0; +D_8017DCE4 = 0x8017DCE4; +D_8017DCE8 = 0x8017DCE8; +D_8017DCEC = 0x8017DCEC; +D_8017DCF0 = 0x8017DCF0; +D_8017DCF4 = 0x8017DCF4; +D_8017DCF8 = 0x8017DCF8; +D_8017DCFC = 0x8017DCFC; +D_8017DD04 = 0x8017DD04; +D_8017DD08 = 0x8017DD08; +D_8017DD0C = 0x8017DD0C; +D_8017DD10 = 0x8017DD10; +D_8017DD14 = 0x8017DD14; +D_8017DD18 = 0x8017DD18; +D_8017DD20 = 0x8017DD20; +D_8017DEB0 = 0x8017DEB0; +D_8017DEC0 = 0x8017DEC0; +D_8017DEC4 = 0x8017DEC4; +D_8017DEC8 = 0x8017DEC8; +D_8017DECC = 0x8017DECC; +D_8017DED0 = 0x8017DED0; +D_8017DED4 = 0x8017DED4; +D_8017DED8 = 0x8017DED8; +D_8017DEDC = 0x8017DEDC; +D_8017DEE0 = 0x8017DEE0; +D_8017DEE4 = 0x8017DEE4; +D_8017DEE8 = 0x8017DEE8; +D_8017DEF0 = 0x8017DEF0; +D_8017DEF4 = 0x8017DEF4; +D_8017DEF8 = 0x8017DEF8; +D_8017DEFC = 0x8017DEFC; +D_8017DF00 = 0x8017DF00; +D_8017DF08 = 0x8017DF08; +D_8017DF18 = 0x8017DF18; +D_8017DF20 = 0x8017DF20; +D_8017DF24 = 0x8017DF24; +D_8017DF28 = 0x8017DF28; +D_8017DF2C = 0x8017DF2C; +D_8017DF30 = 0x8017DF30; +D_8017DF34 = 0x8017DF34; +D_8017DF38 = 0x8017DF38; +D_8017DF3C = 0x8017DF3C; +D_8017DF40 = 0x8017DF40; +D_8017DF44 = 0x8017DF44; +D_8017DF48 = 0x8017DF48; +D_8017DF4C = 0x8017DF4C; +D_8017DF50 = 0x8017DF50; +D_8017DF54 = 0x8017DF54; +D_8017DF58 = 0x8017DF58; +D_8017DF5C = 0x8017DF5C; +D_8017DF60 = 0x8017DF60; +D_8017DF64 = 0x8017DF64; +D_8017DF68 = 0x8017DF68; +D_8017DF6C = 0x8017DF6C; +D_8017DF70 = 0x8017DF70; +D_8017DF78 = 0x8017DF78; +D_8017DF88 = 0x8017DF88; +D_8017DF98 = 0x8017DF98; +D_8017DF9C = 0x8017DF9C; +D_8017DFA0 = 0x8017DFA0; +D_8017DFA4 = 0x8017DFA4; +D_8017DFA8 = 0x8017DFA8; +D_8017DFB0 = 0x8017DFB0; +D_8017DFC0 = 0x8017DFC0; +D_8017DFD0 = 0x8017DFD0; +D_8017DFD8 = 0x8017DFD8; +D_8017DFF0 = 0x8017DFF0; +D_8017E000 = 0x8017E000; +D_8017E004 = 0x8017E004; +D_8017E008 = 0x8017E008; +D_8017E00C = 0x8017E00C; +D_8017E010 = 0x8017E010; +D_8017E011 = 0x8017E011; +D_8017E012 = 0x8017E012; +D_8017E013 = 0x8017E013; +D_8017E01A = 0x8017E01A; +D_8017E01F = 0x8017E01F; +D_8017E024 = 0x8017E024; +D_8017E025 = 0x8017E025; +D_8017E026 = 0x8017E026; +D_8017E027 = 0x8017E027; +D_8017E046 = 0x8017E046; +D_8017E06E = 0x8017E06E; +D_8017E06F = 0x8017E06F; +D_8017E09C = 0x8017E09C; +D_8017E0FA = 0x8017E0FA; +D_8017E10F = 0x8017E10F; +D_8017E110 = 0x8017E110; +D_8017E111 = 0x8017E111; +D_8017E112 = 0x8017E112; +D_8017E210 = 0x8017E210; +D_8017E218 = 0x8017E218; +D_80180001 = 0x80180001; +D_8018CFB0 = 0x8018CFB0; +D_8018CFC0 = 0x8018CFC0; +D_i6_8018DD90 = 0x8018DD90; +D_8018DD90 = 0x8018DD90; +D_8018DD94 = 0x8018DD94; +D_8018DD98 = 0x8018DD98; +D_8018DDA0 = 0x8018DDA0; +D_8018DDB0 = 0x8018DDB0; +D_8018DDB4 = 0x8018DDB4; +D_8018DE98 = 0x8018DE98; +D_8018DED0 = 0x8018DED0; +D_8018E018 = 0x8018E018; +D_8018E01C = 0x8018E01C; +D_8018E020 = 0x8018E020; +D_8018E024 = 0x8018E024; +D_8018E028 = 0x8018E028; +D_8018E02C = 0x8018E02C; +D_8018E030 = 0x8018E030; +D_8018E03C = 0x8018E03C; +D_8018E288 = 0x8018E288; +D_8018E290 = 0x8018E290; +D_8018E294 = 0x8018E294; +D_8018E29C = 0x8018E29C; +D_8018E2C4 = 0x8018E2C4; +D_8018E2CC = 0x8018E2CC; +D_8018E4E0 = 0x8018E4E0; +D_8018E4E4 = 0x8018E4E4; +D_8018E4E8 = 0x8018E4E8; +D_8018E500 = 0x8018E500; +D_8018E52C = 0x8018E52C; +D_8018E738 = 0x8018E738; +D_8018E990 = 0x8018E990; +D_8018E99C = 0x8018E99C; +D_8018F2F0 = 0x8018F2F0; +D_8018F610 = 0x8018F610; +D_8018F614 = 0x8018F614; +D_8018F618 = 0x8018F618; +D_8018F61C = 0x8018F61C; +D_8018F620 = 0x8018F620; +D_80190430 = 0x80190430; +D_80190470 = 0x80190470; +D_80190478 = 0x80190478; +D_80190480 = 0x80190480; +D_80190490 = 0x80190490; +D_80190494 = 0x80190494; +D_80190498 = 0x80190498; +D_80191288 = 0x80191288; +D_i1_801912CE = 0x801912CE; +D_i1_801917C2 = 0x801917C2; +D_i1_80191AA2 = 0x80191AA2; +D_80192950 = 0x80192950; +D_80192964 = 0x80192964; +D_80192994 = 0x80192994; +D_80192998 = 0x80192998; +D_80192A50 = 0x80192A50; +D_80192A54 = 0x80192A54; +D_80192A58 = 0x80192A58; +D_80192A68 = 0x80192A68; +D_80192A70 = 0x80192A70; +D_80192AB8 = 0x80192AB8; +D_80192B1C = 0x80192B1C; +D_80192B24 = 0x80192B24; +D_80192B2C = 0x80192B2C; +D_80192B34 = 0x80192B34; +D_80192B38 = 0x80192B38; +D_801931B8 = 0x801931B8; +D_80193240 = 0x80193240; +D_80193242 = 0x80193242; +D_801932B4 = 0x801932B4; +D_80193338 = 0x80193338; +D_8019333C = 0x8019333C; +D_80193340 = 0x80193340; +D_80195D80 = 0x80195D80; +D_i4_8019608E = 0x8019608E; +D_801972B0 = 0x801972B0; +D_801972B4 = 0x801972B4; +D_801972B8 = 0x801972B8; +D_801972BC = 0x801972BC; +D_801972C0 = 0x801972C0; +D_80197368 = 0x80197368; +D_80197380 = 0x80197380; +D_80197410 = 0x80197410; +D_80197420 = 0x80197420; +D_80197424 = 0x80197424; +D_80197428 = 0x80197428; +D_8019742C = 0x8019742C; +D_80197430 = 0x80197430; +D_80197434 = 0x80197434; +D_80197438 = 0x80197438; +D_80197440 = 0x80197440; +D_80197444 = 0x80197444; +D_8019F1F0 = 0x8019F1F0; +D_8019F1F4 = 0x8019F1F4; +D_8019F1F8 = 0x8019F1F8; +D_8019F1FC = 0x8019F1FC; +D_8019F200 = 0x8019F200; +D_8019F204 = 0x8019F204; +D_8019F208 = 0x8019F208; +D_8019F20C = 0x8019F20C; +D_8019F210 = 0x8019F210; +D_8019F214 = 0x8019F214; +D_8019F218 = 0x8019F218; +D_8019F21C = 0x8019F21C; +D_8019F220 = 0x8019F220; +D_8019F224 = 0x8019F224; +D_8019F228 = 0x8019F228; +D_8019F22C = 0x8019F22C; +D_8019F230 = 0x8019F230; +D_8019F6E0 = 0x8019F6E0; +D_8019F6F0 = 0x8019F6F0; +D_menu_801A5E23 = 0x801A5E23; +D_i5_801AE81B = 0x801AE81B; +D_801AE894 = 0x801AE894; +D_801AE918 = 0x801AE918; +D_i5_801AE942 = 0x801AE942; +D_801AE9AC = 0x801AE9AC; +D_801AF0C0 = 0x801AF0C0; +D_801AF0C4 = 0x801AF0C4; +D_801AF0C8 = 0x801AF0C8; +D_801AF0CC = 0x801AF0CC; +D_801AF0D0 = 0x801AF0D0; +D_801AF0D4 = 0x801AF0D4; +D_801AF0D8 = 0x801AF0D8; +D_801AF0DC = 0x801AF0DC; +D_801AF0E0 = 0x801AF0E0; +D_801AF0E4 = 0x801AF0E4; +D_801AF0E8 = 0x801AF0E8; +D_801AF0EC = 0x801AF0EC; +D_801AF0F0 = 0x801AF0F0; +D_801AF0F4 = 0x801AF0F4; +D_801AF0F8 = 0x801AF0F8; +D_801AF0FC = 0x801AF0FC; +D_801AF100 = 0x801AF100; +D_801AF104 = 0x801AF104; +D_801AF108 = 0x801AF108; +D_801AF10C = 0x801AF10C; +D_801AF110 = 0x801AF110; +D_801AF114 = 0x801AF114; +D_801AF118 = 0x801AF118; +D_801AF11C = 0x801AF11C; +D_801AF120 = 0x801AF120; +D_801AF124 = 0x801AF124; +D_801AF128 = 0x801AF128; +D_801AF12C = 0x801AF12C; +D_801AF130 = 0x801AF130; +D_801AF134 = 0x801AF134; +D_801AF138 = 0x801AF138; +D_801AF13C = 0x801AF13C; +D_801AF140 = 0x801AF140; +D_801AF144 = 0x801AF144; +D_801AF148 = 0x801AF148; +D_801AF14C = 0x801AF14C; +D_801AF150 = 0x801AF150; +D_801AF154 = 0x801AF154; +D_801AF158 = 0x801AF158; +D_801AF15C = 0x801AF15C; +D_801AF160 = 0x801AF160; +D_801AF164 = 0x801AF164; +D_801AF168 = 0x801AF168; +D_801AF16C = 0x801AF16C; +D_801AF170 = 0x801AF170; +D_801AF174 = 0x801AF174; +D_801AF178 = 0x801AF178; +D_801AF17C = 0x801AF17C; +D_801AF180 = 0x801AF180; +D_801AF1A8 = 0x801AF1A8; +D_801AF1AC = 0x801AF1AC; +D_801AF1B0 = 0x801AF1B0; +D_801AF1B4 = 0x801AF1B4; +D_801AF1B8 = 0x801AF1B8; +D_801AF1BC = 0x801AF1BC; +D_801AF1C0 = 0x801AF1C0; +D_801AF1C4 = 0x801AF1C4; +D_801AF1C8 = 0x801AF1C8; +D_801AF1CC = 0x801AF1CC; +D_801AF1D0 = 0x801AF1D0; +D_801AF1D8 = 0x801AF1D8; +D_801AF200 = 0x801AF200; +D_801AF240 = 0x801AF240; +D_801AF300 = 0x801AF300; +D_801AF304 = 0x801AF304; +D_801AF308 = 0x801AF308; +D_801AF318 = 0x801AF318; +D_801AF31C = 0x801AF31C; +D_801AF344 = 0x801AF344; +D_801AF354 = 0x801AF354; +D_801AF35C = 0x801AF35C; +D_801AF360 = 0x801AF360; +D_801AF3B0 = 0x801AF3B0; +D_801AF3B8 = 0x801AF3B8; +D_801AF3BC = 0x801AF3BC; +D_801AF40C = 0x801AF40C; +D_801AF414 = 0x801AF414; +D_801AF418 = 0x801AF418; +D_801AF42C = 0x801AF42C; +D_801AF434 = 0x801AF434; +D_i5_801AF45A = 0x801AF45A; +D_801AF468 = 0x801AF468; +D_i5_801AF46E = 0x801AF46E; +D_801AF470 = 0x801AF470; +D_801AF474 = 0x801AF474; +D_801AF47C = 0x801AF47C; +D_801AF488 = 0x801AF488; +D_801AF4AC = 0x801AF4AC; +D_801AF4B8 = 0x801AF4B8; +D_801AF4C0 = 0x801AF4C0; +D_801AF4C4 = 0x801AF4C4; +D_801AF4C8 = 0x801AF4C8; +D_801AF4CC = 0x801AF4CC; +D_801AF4D0 = 0x801AF4D0; +D_801AF4D4 = 0x801AF4D4; +D_801AF4D8 = 0x801AF4D8; +D_801AF4DC = 0x801AF4DC; +D_801AF4E0 = 0x801AF4E0; +D_801AF4E4 = 0x801AF4E4; +D_801AF4E8 = 0x801AF4E8; +D_801AF4EC = 0x801AF4EC; +D_801AF4F0 = 0x801AF4F0; +D_801AF4F4 = 0x801AF4F4; +D_801AF4F8 = 0x801AF4F8; +D_801AF4FC = 0x801AF4FC; +D_801AF500 = 0x801AF500; +D_801AF504 = 0x801AF504; +D_801AF508 = 0x801AF508; +D_801AF50C = 0x801AF50C; +D_801AF510 = 0x801AF510; +D_801AFE70 = 0x801AFE70; +D_801AFE74 = 0x801AFE74; +D_801AFE78 = 0x801AFE78; +D_801AFE7C = 0x801AFE7C; +D_801AFE80 = 0x801AFE80; +D_801AFE84 = 0x801AFE84; +D_801AFE88 = 0x801AFE88; +D_801AFE8C = 0x801AFE8C; +D_801AFE90 = 0x801AFE90; +D_801AFE94 = 0x801AFE94; +D_801AFE98 = 0x801AFE98; +D_801AFE9C = 0x801AFE9C; +D_801AFEA0 = 0x801AFEA0; +D_801AFEA4 = 0x801AFEA4; +D_801AFEA8 = 0x801AFEA8; +D_801AFEAC = 0x801AFEAC; +D_801AFEB0 = 0x801AFEB0; +D_801AFEB4 = 0x801AFEB4; +D_801AFEB8 = 0x801AFEB8; +D_801AFEBC = 0x801AFEBC; +D_801AFEC0 = 0x801AFEC0; +D_801AFEC4 = 0x801AFEC4; +D_801AFEC8 = 0x801AFEC8; +D_801AFECC = 0x801AFECC; +D_801AFED0 = 0x801AFED0; +D_801AFED4 = 0x801AFED4; +D_801AFED8 = 0x801AFED8; +D_801AFEDC = 0x801AFEDC; +D_801AFEE0 = 0x801AFEE0; +D_801AFEE4 = 0x801AFEE4; +D_801AFEE8 = 0x801AFEE8; +D_801AFEEC = 0x801AFEEC; +D_801AFEF0 = 0x801AFEF0; +D_801AFEF4 = 0x801AFEF4; +D_801AFEF8 = 0x801AFEF8; +D_801AFF00 = 0x801AFF00; +D_801AFF28 = 0x801AFF28; +D_801AFF50 = 0x801AFF50; +D_801AFF78 = 0x801AFF78; +D_801AFFA0 = 0x801AFFA0; +D_801AFFA8 = 0x801AFFA8; +D_801AFFD0 = 0x801AFFD0; +D_801AFFF8 = 0x801AFFF8; +D_801B0020 = 0x801B0020; +D_801B0048 = 0x801B0048; +D_801B00E8 = 0x801B00E8; +D_i3_801B0130 = 0x801B0130; +D_801B0188 = 0x801B0188; +D_801B0228 = 0x801B0228; +D_801B02C8 = 0x801B02C8; +D_801B0368 = 0x801B0368; +D_801B0408 = 0x801B0408; +D_801B0410 = 0x801B0410; +D_801B04B0 = 0x801B04B0; +D_801B0528 = 0x801B0528; +D_801B052C = 0x801B052C; +D_801B0530 = 0x801B0530; +D_801B0550 = 0x801B0550; +D_801B0584 = 0x801B0584; +D_801B0588 = 0x801B0588; +D_801B058C = 0x801B058C; +D_801B0590 = 0x801B0590; +D_801B05A0 = 0x801B05A0; +D_801B05A8 = 0x801B05A8; +D_801B0628 = 0x801B0628; +D_801B062C = 0x801B062C; +D_801B062F = 0x801B062F; +D_801B0630 = 0x801B0630; +D_801B0638 = 0x801B0638; +D_801B0640 = 0x801B0640; +D_801B0644 = 0x801B0644; +D_801B0648 = 0x801B0648; +D_801B0658 = 0x801B0658; +D_801B065C = 0x801B065C; +D_801B0660 = 0x801B0660; +D_801B0664 = 0x801B0664; +D_801B0668 = 0x801B0668; +D_801B066C = 0x801B066C; +D_801B0670 = 0x801B0670; +D_801B0674 = 0x801B0674; +D_801B0678 = 0x801B0678; +D_801B067C = 0x801B067C; +D_801B0680 = 0x801B0680; +D_801B0684 = 0x801B0684; +D_801B0688 = 0x801B0688; +D_801B068C = 0x801B068C; +D_801B0690 = 0x801B0690; +D_801B0694 = 0x801B0694; +D_801B0698 = 0x801B0698; +D_801B069C = 0x801B069C; +D_801B06A0 = 0x801B06A0; +D_801B06C0 = 0x801B06C0; +D_801B06C4 = 0x801B06C4; +D_801B06C8 = 0x801B06C8; +D_801B06CC = 0x801B06CC; +D_801B06D0 = 0x801B06D0; +D_801B06D4 = 0x801B06D4; +D_801B06D8 = 0x801B06D8; +D_801B06DC = 0x801B06DC; +D_801B06E0 = 0x801B06E0; +D_801B06E4 = 0x801B06E4; +D_801B06E8 = 0x801B06E8; +D_801B06EC = 0x801B06EC; +D_801B06F0 = 0x801B06F0; +D_801B06F8 = 0x801B06F8; +D_801B0700 = 0x801B0700; +D_801B0704 = 0x801B0704; +D_801B0708 = 0x801B0708; +D_801B0710 = 0x801B0710; +D_801B0720 = 0x801B0720; +D_801B072C = 0x801B072C; +D_801B0730 = 0x801B0730; +D_801B0740 = 0x801B0740; +D_801B0750 = 0x801B0750; +D_801B0760 = 0x801B0760; +D_801B0770 = 0x801B0770; +D_801B0780 = 0x801B0780; +D_801B078C = 0x801B078C; +D_801B0790 = 0x801B0790; +D_801B0794 = 0x801B0794; +D_801B0798 = 0x801B0798; +D_801B079C = 0x801B079C; +D_801B07A0 = 0x801B07A0; +D_801B07A4 = 0x801B07A4; +D_801B07A8 = 0x801B07A8; +D_801B07B0 = 0x801B07B0; +D_801B07BC = 0x801B07BC; +D_801B07C0 = 0x801B07C0; +D_801B07C8 = 0x801B07C8; +D_801B07D0 = 0x801B07D0; +D_801B07E8 = 0x801B07E8; +D_801B07EC = 0x801B07EC; +D_801B07F0 = 0x801B07F0; +D_801B07F8 = 0x801B07F8; +D_801B0800 = 0x801B0800; +D_801B0808 = 0x801B0808; +D_801B0810 = 0x801B0810; +D_801B0818 = 0x801B0818; +D_801B081C = 0x801B081C; +D_801B0820 = 0x801B0820; +D_801B0824 = 0x801B0824; +D_801B0828 = 0x801B0828; +D_801B082C = 0x801B082C; +D_801B0830 = 0x801B0830; +D_801B0834 = 0x801B0834; +D_801B0838 = 0x801B0838; +D_801B083C = 0x801B083C; +D_801B0840 = 0x801B0840; +D_801B0844 = 0x801B0844; +D_801B0848 = 0x801B0848; +D_801B084C = 0x801B084C; +D_801B0850 = 0x801B0850; +D_801B0854 = 0x801B0854; +D_801B0858 = 0x801B0858; +D_801B085C = 0x801B085C; +D_801B0860 = 0x801B0860; +D_801B0864 = 0x801B0864; +D_801B0868 = 0x801B0868; +D_801B086C = 0x801B086C; +D_801B0870 = 0x801B0870; +D_801B0874 = 0x801B0874; +D_801B0878 = 0x801B0878; +D_801B087C = 0x801B087C; +D_801B0880 = 0x801B0880; +D_801B0884 = 0x801B0884; +D_801B0888 = 0x801B0888; +D_801B088C = 0x801B088C; +D_801B0890 = 0x801B0890; +D_801B0894 = 0x801B0894; +D_801B0898 = 0x801B0898; +D_801B089C = 0x801B089C; +D_801B08A0 = 0x801B08A0; +D_801B08A4 = 0x801B08A4; +D_801B08A8 = 0x801B08A8; +D_801B08AC = 0x801B08AC; +D_801B08B0 = 0x801B08B0; +D_801B08B4 = 0x801B08B4; +D_801B08B8 = 0x801B08B8; +D_801B08BC = 0x801B08BC; +D_801B08C0 = 0x801B08C0; +D_801B08C4 = 0x801B08C4; +D_801B08C8 = 0x801B08C8; +D_801B08D0 = 0x801B08D0; +D_801B08D8 = 0x801B08D8; +D_801B08E0 = 0x801B08E0; +D_801B08E8 = 0x801B08E8; +D_801B08EC = 0x801B08EC; +D_801B08F0 = 0x801B08F0; +D_801B08F4 = 0x801B08F4; +D_801B08FC = 0x801B08FC; +D_801B0900 = 0x801B0900; +D_801B0910 = 0x801B0910; +D_801B14F8 = 0x801B14F8; +D_i5_801B1D62 = 0x801B1D62; +D_i5_801B1D66 = 0x801B1D66; +D_i5_801B1D86 = 0x801B1D86; +D_801B2D10 = 0x801B2D10; +D_801B3200 = 0x801B3200; +D_801B3218 = 0x801B3218; +D_801B32E4 = 0x801B32E4; +D_801B32F8 = 0x801B32F8; +D_801B34F8 = 0x801B34F8; +D_801B35E8 = 0x801B35E8; +D_801B3CFC = 0x801B3CFC; +D_801B3D00 = 0x801B3D00; +D_801B3D04 = 0x801B3D04; +D_801B3D08 = 0x801B3D08; +D_801B3D20 = 0x801B3D20; +D_801B3D24 = 0x801B3D24; +D_801B3D28 = 0x801B3D28; +D_801B3D2C = 0x801B3D2C; +D_801B3D2E = 0x801B3D2E; +D_801B3D48 = 0x801B3D48; +D_801B3D4C = 0x801B3D4C; +D_801B3D50 = 0x801B3D50; +D_801B3D54 = 0x801B3D54; +D_801B3D56 = 0x801B3D56; +D_801B3D70 = 0x801B3D70; +D_801B3D74 = 0x801B3D74; +D_801B3D78 = 0x801B3D78; +D_801B3D7C = 0x801B3D7C; +D_801B3D7E = 0x801B3D7E; +D_801B3D80 = 0x801B3D80; +D_801B4780 = 0x801B4780; +D_801B47E0 = 0x801B47E0; +D_801B4840 = 0x801B4840; +D_801B4BD0 = 0x801B4BD0; +D_801B4C30 = 0x801B4C30; +D_801B4C90 = 0x801B4C90; +D_801B5020 = 0x801B5020; +D_801B5110 = 0x801B5110; +D_801B5470 = 0x801B5470; +D_801B54B8 = 0x801B54B8; +D_801B5540 = 0x801B5540; +D_801B5544 = 0x801B5544; +D_801B5548 = 0x801B5548; +D_801B554C = 0x801B554C; +D_801B5550 = 0x801B5550; +D_801B5558 = 0x801B5558; +D_801B5560 = 0x801B5560; +D_801B5564 = 0x801B5564; +D_801B557C = 0x801B557C; +D_801B5588 = 0x801B5588; +D_801B558C = 0x801B558C; +D_801B55A4 = 0x801B55A4; +D_801B55AC = 0x801B55AC; +D_801B55B4 = 0x801B55B4; +D_801B55F8 = 0x801B55F8; +D_801B5602 = 0x801B5602; +D_801B560F = 0x801B560F; +D_801B5610 = 0x801B5610; +D_801B5618 = 0x801B5618; +D_801B561A = 0x801B561A; +D_801B561B = 0x801B561B; +D_801B561C = 0x801B561C; +D_801B561E = 0x801B561E; +D_801B5620 = 0x801B5620; +D_801B5628 = 0x801B5628; +D_801B562C = 0x801B562C; +D_801B562E = 0x801B562E; +D_801B563A = 0x801B563A; +D_801B563C = 0x801B563C; +D_801B564C = 0x801B564C; +D_801B5670 = 0x801B5670; +D_801B5674 = 0x801B5674; +D_801B5678 = 0x801B5678; +D_801B568C = 0x801B568C; +D_801B5690 = 0x801B5690; +D_801B56C0 = 0x801B56C0; +D_801B56C4 = 0x801B56C4; +D_801B56C8 = 0x801B56C8; +D_801B56CC = 0x801B56CC; +D_801B56F0 = 0x801B56F0; +D_801B56F4 = 0x801B56F4; +D_801B56F8 = 0x801B56F8; +D_801B5738 = 0x801B5738; +D_801B5990 = 0x801B5990; +D_801B599C = 0x801B599C; +D_801B59A8 = 0x801B59A8; +D_801B59B4 = 0x801B59B4; +D_801B59C0 = 0x801B59C0; +D_801B59CC = 0x801B59CC; +D_801B59D8 = 0x801B59D8; +D_801B59E4 = 0x801B59E4; +D_801B59F0 = 0x801B59F0; +D_801B59FC = 0x801B59FC; +D_801B5A08 = 0x801B5A08; +D_801B5A14 = 0x801B5A14; +D_801B5A20 = 0x801B5A20; +D_801B5A2C = 0x801B5A2C; +D_801B5A40 = 0x801B5A40; +D_801B5A44 = 0x801B5A44; +D_801B5A48 = 0x801B5A48; +D_801B7510 = 0x801B7510; +D_801B9048 = 0x801B9048; +D_801B9500 = 0x801B9500; +D_801B9508 = 0x801B9508; +D_801B9514 = 0x801B9514; +D_801B952C = 0x801B952C; +D_801B9568 = 0x801B9568; +D_801B95A0 = 0x801B95A0; +D_801B95AC = 0x801B95AC; +D_801B95B8 = 0x801B95B8; +D_801B95C4 = 0x801B95C4; +D_801B95C8 = 0x801B95C8; +D_801B95CC = 0x801B95CC; +D_801B95D0 = 0x801B95D0; +D_801B95D4 = 0x801B95D4; +D_801B95E0 = 0x801B95E0; +D_801B95E8 = 0x801B95E8; +D_801B95FC = 0x801B95FC; +D_801B9608 = 0x801B9608; +D_801B960C = 0x801B960C; +D_801B9634 = 0x801B9634; +D_801B9638 = 0x801B9638; +D_801B963C = 0x801B963C; +D_801B9640 = 0x801B9640; +D_801B9644 = 0x801B9644; +D_801B9670 = 0x801B9670; +D_801B9680 = 0x801B9680; +D_801B96A0 = 0x801B96A0; +D_801B96B4 = 0x801B96B4; +D_801B96C0 = 0x801B96C0; +D_801B96D0 = 0x801B96D0; +D_801B9714 = 0x801B9714; +D_801B9744 = 0x801B9744; +D_801B9748 = 0x801B9748; +D_801B9798 = 0x801B9798; +D_801B979C = 0x801B979C; +D_801B97A4 = 0x801B97A4; +D_801B97A8 = 0x801B97A8; +D_801B97AC = 0x801B97AC; +D_801B97B0 = 0x801B97B0; +D_801B97B4 = 0x801B97B4; +D_801B97B8 = 0x801B97B8; +D_801B97BC = 0x801B97BC; +D_801B97C0 = 0x801B97C0; +D_801B97C4 = 0x801B97C4; +D_801B97C8 = 0x801B97C8; +D_801B97CC = 0x801B97CC; +D_801B97D0 = 0x801B97D0; +D_801B97D4 = 0x801B97D4; +D_801B97D8 = 0x801B97D8; +D_801B97E4 = 0x801B97E4; +D_801B97EC = 0x801B97EC; +D_801B97F8 = 0x801B97F8; +D_801B9804 = 0x801B9804; +D_801B9824 = 0x801B9824; +D_801B9828 = 0x801B9828; +D_801B9888 = 0x801B9888; +D_801B988C = 0x801B988C; +D_801B98CC = 0x801B98CC; +D_801B98D4 = 0x801B98D4; +D_801B9910 = 0x801B9910; +D_801B9958 = 0x801B9958; +D_801B99F0 = 0x801B99F0; +D_801B9A18 = 0x801B9A18; +D_801B9A1C = 0x801B9A1C; +D_801B9A24 = 0x801B9A24; +D_801B9A3C = 0x801B9A3C; +D_801B9A4C = 0x801B9A4C; +D_801B9A70 = 0x801B9A70; +D_801B9A78 = 0x801B9A78; +D_801BAD38 = 0x801BAD38; +D_801BB438 = 0x801BB438; +D_801BB440 = 0x801BB440; +D_801BB44C = 0x801BB44C; +D_801BB450 = 0x801BB450; +D_801BB454 = 0x801BB454; +D_801BB458 = 0x801BB458; +D_801BB45C = 0x801BB45C; +D_801BB468 = 0x801BB468; +D_801BB46C = 0x801BB46C; +D_801BB470 = 0x801BB470; +D_801BB474 = 0x801BB474; +D_801BB478 = 0x801BB478; +D_801BB47C = 0x801BB47C; +D_801BB48C = 0x801BB48C; +D_801BB490 = 0x801BB490; +D_801BB4C8 = 0x801BB4C8; +D_801BB4CC = 0x801BB4CC; +D_801BB4D0 = 0x801BB4D0; +D_801BB4D4 = 0x801BB4D4; +D_801BB4D8 = 0x801BB4D8; +D_801BB4E0 = 0x801BB4E0; +D_801BB4FC = 0x801BB4FC; +D_801BB500 = 0x801BB500; +D_801BB504 = 0x801BB504; +D_801BB550 = 0x801BB550; +D_801BB554 = 0x801BB554; +D_801BB558 = 0x801BB558; +D_801BB55C = 0x801BB55C; +D_801BB560 = 0x801BB560; +D_801BB564 = 0x801BB564; +D_801BB568 = 0x801BB568; +D_801BB56C = 0x801BB56C; +D_801BB574 = 0x801BB574; +D_801BB578 = 0x801BB578; +D_801BB57C = 0x801BB57C; +D_801BB590 = 0x801BB590; +D_801BB594 = 0x801BB594; +D_801BB5A8 = 0x801BB5A8; +D_801BB5AC = 0x801BB5AC; +D_801BB5B4 = 0x801BB5B4; +D_801BB5B8 = 0x801BB5B8; +D_801BB5BC = 0x801BB5BC; +D_801BB5C0 = 0x801BB5C0; +D_801BB5E0 = 0x801BB5E0; +D_801BB5E4 = 0x801BB5E4; +D_801BB5E8 = 0x801BB5E8; +D_801BB5EC = 0x801BB5EC; +D_801BB5F0 = 0x801BB5F0; +D_801BB5F4 = 0x801BB5F4; +D_801BB5F8 = 0x801BB5F8; +D_801BB5FC = 0x801BB5FC; +D_801BB600 = 0x801BB600; +D_801BB604 = 0x801BB604; +D_801BB688 = 0x801BB688; +D_801BB690 = 0x801BB690; +D_801BB6A0 = 0x801BB6A0; +D_801BB6AC = 0x801BB6AC; +D_801BB6DC = 0x801BB6DC; +D_801BB6E0 = 0x801BB6E0; +D_801BB6E4 = 0x801BB6E4; +D_801BB6E8 = 0x801BB6E8; +D_801BB6EC = 0x801BB6EC; +D_801BB6F0 = 0x801BB6F0; +D_801BB6F4 = 0x801BB6F4; +D_801BB6F8 = 0x801BB6F8; +D_801BB700 = 0x801BB700; +D_801BB704 = 0x801BB704; +D_801BB708 = 0x801BB708; +D_801BB70C = 0x801BB70C; +D_801BBD10 = 0x801BBD10; +D_801BCF00 = 0x801BCF00; +D_801BCF04 = 0x801BCF04; +D_801BCF08 = 0x801BCF08; +D_801BCF0C = 0x801BCF0C; +D_801BCF10 = 0x801BCF10; +D_801BCF14 = 0x801BCF14; +D_801BCF18 = 0x801BCF18; +D_801BD5D8 = 0x801BD5D8; +D_801BD5E0 = 0x801BD5E0; +D_801BD5E8 = 0x801BD5E8; +D_801BD8B8 = 0x801BD8B8; +D_801BDB88 = 0x801BDB88; +D_801BDE58 = 0x801BDE58; +D_801BE110 = 0x801BE110; +D_801BE128 = 0x801BE128; +D_801BE134 = 0x801BE134; +D_801BE158 = 0x801BE158; +D_801C0001 = 0x801C0001; +D_801C0510 = 0x801C0510; +D_801C2910 = 0x801C2910; +D_801C4D10 = 0x801C4D10; +D_801C4D14 = 0x801C4D14; +D_801C4D18 = 0x801C4D18; +D_801C4D1C = 0x801C4D1C; +D_801C4D20 = 0x801C4D20; +D_801C4D24 = 0x801C4D24; +D_801C4D28 = 0x801C4D28; +D_801C4D2C = 0x801C4D2C; +D_801C4D30 = 0x801C4D30; +D_801C4D34 = 0x801C4D34; +D_801C4D38 = 0x801C4D38; +D_801C4D3C = 0x801C4D3C; +D_801C4D40 = 0x801C4D40; +D_801C4D44 = 0x801C4D44; +D_801C4D78 = 0x801C4D78; +D_801C4D7C = 0x801C4D7C; +D_801C4D80 = 0x801C4D80; +D_801C4D84 = 0x801C4D84; +D_801C4DB4 = 0x801C4DB4; +D_801C4DB8 = 0x801C4DB8; +D_801C4DBC = 0x801C4DBC; +D_801C4DC0 = 0x801C4DC0; +D_801C4DC8 = 0x801C4DC8; +D_801C4DCC = 0x801C4DCC; +D_801C4DD0 = 0x801C4DD0; +D_801C4DD8 = 0x801C4DD8; +D_801C4E50 = 0x801C4E50; +D_801C4EC8 = 0x801C4EC8; +D_801C4F40 = 0x801C4F40; +D_801C4FB8 = 0x801C4FB8; +D_801C5030 = 0x801C5030; +D_801C5058 = 0x801C5058; +D_801C50A8 = 0x801C50A8; +D_801C5120 = 0x801C5120; +D_801C5124 = 0x801C5124; +D_801C5128 = 0x801C5128; +D_801C512C = 0x801C512C; +D_801C5130 = 0x801C5130; +D_801C513C = 0x801C513C; +D_801C5140 = 0x801C5140; +D_801C5144 = 0x801C5144; +D_801C5148 = 0x801C5148; +D_801C514C = 0x801C514C; +D_801C5150 = 0x801C5150; +D_801C5154 = 0x801C5154; +D_801C5158 = 0x801C5158; +D_801C515C = 0x801C515C; +D_801C5160 = 0x801C5160; +D_801C5168 = 0x801C5168; +D_801C5180 = 0x801C5180; +D_801C5184 = 0x801C5184; +D_801C5188 = 0x801C5188; +D_801C51B0 = 0x801C51B0; +D_801C51B4 = 0x801C51B4; +D_801C51B8 = 0x801C51B8; +D_801C51D8 = 0x801C51D8; +D_801C5244 = 0x801C5244; +D_801C5248 = 0x801C5248; +D_801C524C = 0x801C524C; +D_801C5250 = 0x801C5250; +D_801C5254 = 0x801C5254; +D_801C5258 = 0x801C5258; +D_801C525C = 0x801C525C; +D_801C5260 = 0x801C5260; +D_801C5268 = 0x801C5268; +D_801C5274 = 0x801C5274; +D_801C5278 = 0x801C5278; +D_801C5280 = 0x801C5280; +D_801C528C = 0x801C528C; +D_801C5290 = 0x801C5290; +D_801C5294 = 0x801C5294; +D_801C5298 = 0x801C5298; +D_801C52A0 = 0x801C52A0; +D_801C52C0 = 0x801C52C0; +D_801C52E0 = 0x801C52E0; +D_801C5300 = 0x801C5300; +D_801C5308 = 0x801C5308; +D_801C5328 = 0x801C5328; +D_801C5348 = 0x801C5348; +D_801C534C = 0x801C534C; +D_801C5350 = 0x801C5350; +D_801C5358 = 0x801C5358; +D_801C5378 = 0x801C5378; +D_801C5398 = 0x801C5398; +D_801C539C = 0x801C539C; +D_801C53A0 = 0x801C53A0; +D_801C53A4 = 0x801C53A4; +D_801C53A8 = 0x801C53A8; +D_801C53C8 = 0x801C53C8; +D_801C53CC = 0x801C53CC; +D_801C53D0 = 0x801C53D0; +D_801C5430 = 0x801C5430; +D_801C546C = 0x801C546C; +D_801C5470 = 0x801C5470; +D_801C548C = 0x801C548C; +D_801C5490 = 0x801C5490; +D_801C5494 = 0x801C5494; +D_801C5498 = 0x801C5498; +D_801C549C = 0x801C549C; +D_801C54A0 = 0x801C54A0; +D_801C54A4 = 0x801C54A4; +D_801C54CC = 0x801C54CC; +D_801C54D0 = 0x801C54D0; +D_801C54D4 = 0x801C54D4; +D_801C54D8 = 0x801C54D8; +D_801C54DC = 0x801C54DC; +D_801C54E0 = 0x801C54E0; +D_801C54E4 = 0x801C54E4; +D_801C54E8 = 0x801C54E8; +D_801C54EC = 0x801C54EC; +D_801C54F0 = 0x801C54F0; +D_801C54F4 = 0x801C54F4; +D_801C54F8 = 0x801C54F8; +D_801C54FC = 0x801C54FC; +D_801C5500 = 0x801C5500; +D_801C5504 = 0x801C5504; +D_801C5508 = 0x801C5508; +D_801C550C = 0x801C550C; +D_801C5510 = 0x801C5510; +D_801C5514 = 0x801C5514; +D_801C5518 = 0x801C5518; +D_801C551C = 0x801C551C; +D_801C5520 = 0x801C5520; +D_801C5524 = 0x801C5524; +D_801C5528 = 0x801C5528; +D_801C552C = 0x801C552C; +D_801C5530 = 0x801C5530; +D_801C5534 = 0x801C5534; +D_801C5538 = 0x801C5538; +D_801C553C = 0x801C553C; +D_801C5540 = 0x801C5540; +D_801C5544 = 0x801C5544; +D_801C5548 = 0x801C5548; +D_801C554C = 0x801C554C; +D_801C5550 = 0x801C5550; +D_801C5554 = 0x801C5554; +D_801C5558 = 0x801C5558; +D_801C555C = 0x801C555C; +D_801C5560 = 0x801C5560; +D_801C5564 = 0x801C5564; +D_801C5568 = 0x801C5568; +D_801C556C = 0x801C556C; +D_801C5570 = 0x801C5570; +D_801C5574 = 0x801C5574; +D_801C5578 = 0x801C5578; +D_801C557C = 0x801C557C; +D_801C5580 = 0x801C5580; +D_801C5584 = 0x801C5584; +D_801C5588 = 0x801C5588; +D_801C558C = 0x801C558C; +D_801C5590 = 0x801C5590; +D_801C5594 = 0x801C5594; +D_801C5598 = 0x801C5598; +D_801C559C = 0x801C559C; +D_801C55A0 = 0x801C55A0; +D_801C55A4 = 0x801C55A4; +D_801C55A8 = 0x801C55A8; +D_801C55AC = 0x801C55AC; +D_801C55B0 = 0x801C55B0; +D_801C55B4 = 0x801C55B4; +D_801C55B8 = 0x801C55B8; +D_801C55BC = 0x801C55BC; +D_801C55C0 = 0x801C55C0; +D_801C55C4 = 0x801C55C4; +D_801C55C8 = 0x801C55C8; +D_801C55D0 = 0x801C55D0; +D_801C55D4 = 0x801C55D4; +D_801C55D8 = 0x801C55D8; +D_801C55E0 = 0x801C55E0; +D_801C55F0 = 0x801C55F0; +D_801C59B0 = 0x801C59B0; +D_801C5B70 = 0x801C5B70; +D_801C5BB0 = 0x801C5BB0; +D_801C5BF0 = 0x801C5BF0; +D_801C5C30 = 0x801C5C30; +D_801C5CF0 = 0x801C5CF0; +D_801C5D70 = 0x801C5D70; +D_801C6130 = 0x801C6130; +D_801C64F0 = 0x801C64F0; +D_801C64F8 = 0x801C64F8; +D_801C65A4 = 0x801C65A4; +D_801C65A8 = 0x801C65A8; +D_801C65E4 = 0x801C65E4; +D_801C65E8 = 0x801C65E8; +D_801C65EC = 0x801C65EC; +D_801C65F0 = 0x801C65F0; +D_801C65F4 = 0x801C65F4; +D_801C65F8 = 0x801C65F8; +D_801C65FC = 0x801C65FC; +D_801C6600 = 0x801C6600; +D_801C6604 = 0x801C6604; +D_801C6608 = 0x801C6608; +D_801C660C = 0x801C660C; +D_801C6610 = 0x801C6610; +D_801C6614 = 0x801C6614; +D_801C6618 = 0x801C6618; +D_80281000 = 0x80281000; +D_80281400 = 0x80281400; +D_80282000 = 0x80282000; +D_802A7800 = 0x802A7800; +D_802D7800 = 0x802D7800; +D_80387800 = 0x80387800; +D_8038F080 = 0x8038F080; +D_8038F300 = 0x8038F300; +D_8038F800 = 0x8038F800; +D_A0000000 = 0xA0000000; +D_A0300000 = 0xA0300000; +D_A3F0000C = 0xA3F0000C; +D_A3F80004 = 0xA3F80004; +D_A3F80008 = 0xA3F80008; +D_A3F80014 = 0xA3F80014; +D_A4000000 = 0xA4000000; +D_A4001000 = 0xA4001000; +D_A6000000 = 0xA6000000; +D_B0000000 = 0xB0000000; +jtbl_B0000008_main = 0xB0000008; + +func_80025AFC = 0x80025AFC; +func_800BE804 = 0x800BE804; +func_8017E7A0 = 0x8017E7A0; +func_8017E7B0 = 0x8017E7B0; +func_8017E91C = 0x8017E91C; +func_8017E920 = 0x8017E920; +func_8017E9D4 = 0x8017E9D4; +func_8017EB30 = 0x8017EB30; +func_8017EB58 = 0x8017EB58; +func_8017EBE0 = 0x8017EBE0; +func_8017ED88 = 0x8017ED88; +func_8017F54C = 0x8017F54C; +func_8017FB90 = 0x8017FB90; +func_8017FCC0 = 0x8017FCC0; +func_801801B0 = 0x801801B0; +func_801803A0 = 0x801803A0; +func_801804B4 = 0x801804B4; +func_80180DFC = 0x80180DFC; +func_80181BEC = 0x80181BEC; +func_80181D44 = 0x80181D44; +func_8018204C = 0x8018204C; +func_80182334 = 0x80182334; +func_801829AC = 0x801829AC; +func_80182BFC = 0x80182BFC; +func_80182C78 = 0x80182C78; +func_80183088 = 0x80183088; +func_801830FC = 0x801830FC; +func_80183240 = 0x80183240; +func_801833A8 = 0x801833A8; +func_80183644 = 0x80183644; +func_80183F30 = 0x80183F30; +func_80183FC4 = 0x80183FC4; +func_80184420 = 0x80184420; +func_80184CE4 = 0x80184CE4; +func_80185200 = 0x80185200; +func_80185298 = 0x80185298; +func_80185640 = 0x80185640; +func_8018565C = 0x8018565C; +func_80185878 = 0x80185878; +func_80185FB0 = 0x80185FB0; +func_80186004 = 0x80186004; +func_80186198 = 0x80186198; +func_80186280 = 0x80186280; +func_80186368 = 0x80186368; +func_80186AF4 = 0x80186AF4; +func_80186B6C = 0x80186B6C; +func_80186CE4 = 0x80186CE4; +func_8018737C = 0x8018737C; +func_801876B0 = 0x801876B0; +func_8018818C = 0x8018818C; +func_801883D4 = 0x801883D4; +func_80188828 = 0x80188828; +func_80188E3C = 0x80188E3C; +func_801890F8 = 0x801890F8; +func_80189488 = 0x80189488; +func_8018977C = 0x8018977C; +func_80189F20 = 0x80189F20; +func_8018A040 = 0x8018A040; +func_8018A114 = 0x8018A114; +func_8018A530 = 0x8018A530; +func_8018A624 = 0x8018A624; +func_8018A83C = 0x8018A83C; +func_8018AC58 = 0x8018AC58; +func_8018AEC4 = 0x8018AEC4; +func_8018AF08 = 0x8018AF08; +func_8018B950 = 0x8018B950; +func_8018D100 = 0x8018D100; +func_8018D468 = 0x8018D468; +func_8018D5D4 = 0x8018D5D4; +func_8018DC28 = 0x8018DC28; +func_8018DEBC = 0x8018DEBC; +func_8018E04C = 0x8018E04C; +func_8018E4AC = 0x8018E4AC; +func_8018EF64 = 0x8018EF64; +func_8018F12C = 0x8018F12C; +func_8018F598 = 0x8018F598; +func_8018F7D8 = 0x8018F7D8; +func_8018F81C = 0x8018F81C; +func_8018F8D4 = 0x8018F8D4; +func_8018FB40 = 0x8018FB40; +func_8018FB60 = 0x8018FB60; +func_8018FB74 = 0x8018FB74; +func_8018FED0 = 0x8018FED0; +func_8019037C = 0x8019037C; +func_80190720 = 0x80190720; +func_80190800 = 0x80190800; +func_80190B60 = 0x80190B60; +func_80190BC0 = 0x80190BC0; +func_80191238 = 0x80191238; +func_80191A80 = 0x80191A80; +func_80192958 = 0x80192958; +func_80192A94 = 0x80192A94; +func_80193484 = 0x80193484; +func_80193750 = 0x80193750; +func_801942E4 = 0x801942E4; +func_801946B0 = 0x801946B0; +func_801949F4 = 0x801949F4; +func_80194C14 = 0x80194C14; +func_80195878 = 0x80195878; +func_8019595C = 0x8019595C; +func_80195B48 = 0x80195B48; +func_80195C80 = 0x80195C80; +func_80195C84 = 0x80195C84; +func_80196114 = 0x80196114; +func_801971B4 = 0x801971B4; +func_80197D74 = 0x80197D74; +func_80198384 = 0x80198384; +func_8019A5D8 = 0x8019A5D8; +func_8019AA68 = 0x8019AA68; +func_8019AE88 = 0x8019AE88; +func_8019AEF8 = 0x8019AEF8; +func_8019B148 = 0x8019B148; +func_8019B93C = 0x8019B93C; +func_8019BDD4 = 0x8019BDD4; +func_8019BF68 = 0x8019BF68; +func_8019C8B8 = 0x8019C8B8; +func_8019CD84 = 0x8019CD84; +func_8019D110 = 0x8019D110; +func_8019D270 = 0x8019D270; +func_8019D414 = 0x8019D414; +func_8019D418 = 0x8019D418; +func_8019D8C4 = 0x8019D8C4; +func_8019EBC8 = 0x8019EBC8; +func_8019F07C = 0x8019F07C; +func_8019FE80 = 0x8019FE80; +func_801A0AB8 = 0x801A0AB8; +func_801A14A0 = 0x801A14A0; +func_801A1B7C = 0x801A1B7C; +func_801A1F8C = 0x801A1F8C; +func_801A2C44 = 0x801A2C44; +func_801A2CD4 = 0x801A2CD4; +func_801A3508 = 0x801A3508; +func_801A3A54 = 0x801A3A54; +func_801A3B3C = 0x801A3B3C; +func_801A3E48 = 0x801A3E48; +func_801A40E4 = 0x801A40E4; +func_801A42C4 = 0x801A42C4; +func_801A438C = 0x801A438C; +func_801A4454 = 0x801A4454; +func_801A45BC = 0x801A45BC; +func_801A491C = 0x801A491C; +func_801A5640 = 0x801A5640; +func_801A6C04 = 0x801A6C04; +func_801A6C94 = 0x801A6C94; +func_801A8390 = 0x801A8390; +func_801A9BD0 = 0x801A9BD0; +func_801AB018 = 0x801AB018; +func_801AC420 = 0x801AC420; +func_801ACBBC = 0x801ACBBC; +func_801AD5DC = 0x801AD5DC; +func_801ADDFC = 0x801ADDFC; +func_801AE0EC = 0x801AE0EC; +func_801AE130 = 0x801AE130; +func_801B1818 = 0x801B1818; +func_801B250C = 0x801B250C; +func_801B51BC = 0x801B51BC; +func_801B52DC = 0x801B52DC; +func_801B5398 = 0x801B5398; +func_801B5F30 = 0x801B5F30; diff --git a/linker_scripts/us/rev1/hardware_regs.ld b/linker_scripts/us/rev1/hardware_regs.ld index 533a42cd..b37fda5e 100644 --- a/linker_scripts/us/rev1/hardware_regs.ld +++ b/linker_scripts/us/rev1/hardware_regs.ld @@ -92,3 +92,29 @@ D_A480000C = 0xA480000C; // defined:True // reserved SI_PIF_ADDR_WR64B_REG = 0xA4800010; // defined:True D_A4800014 = 0xA4800014; // defined:True // reserved SI_STATUS_REG = 0xA4800018; // defined:True + +LEO_CMD = 0xA5000508; +LEO_STATUS = 0xA5000508; +LEO_BM_CTL = 0xA5000510; +LEO_BM_STATUS = 0xA5000510; +LEO_SEQ_CTL = 0xA5000518; +LEO_SEQ_STATUS = 0xA5000518; +LEO_C2_BUFF = 0xA5000000; +LEO_SECTOR_BUFF = 0xA5000400; +LEO_DATA = 0xA5000500; +LEO_MISC_REG = 0xA5000504; +LEO_CUR_TK = 0xA500050C; +LEO_ERR_SECTOR = 0xA5000514; +LEO_CUR_SECTOR = 0xA500051C; +LEO_HARD_RESET = 0xA5000520; +LEO_C1_S0 = 0xA5000524; +LEO_HOST_SECBYTE = 0xA5000528; +LEO_C1_S2 = 0xA500052C; +LEO_SEC_BYTE = 0xA5000530; +LEO_C1_S4 = 0xA5000534; +LEO_C1_S6 = 0xA5000538; +LEO_CUR_ADDR = 0xA500053C; +LEO_ID_REG = 0xA5000540; +LEO_TEST_REG = 0xA5000544; +LEO_TEST_PIN_SEL = 0xA5000548; +LEO_RAM_ADDR = 0xA5000580; diff --git a/src/overlays/ovl_i5/fox_ti.c b/src/overlays/ovl_i5/fox_ti.c index 5be46077..e90c1ad5 100644 --- a/src/overlays/ovl_i5/fox_ti.c +++ b/src/overlays/ovl_i5/fox_ti.c @@ -3633,9 +3633,7 @@ const s16 D_i5_801BAB0C[4][10] = { { 0, 5, 5, 5, 5, 5, 5, -1, 0, 0 }, }; -const s16 D_i5_801BAB5C[8] = { - 0x456E, 0x6D2D, 0x3E63, 0x6870, 0x743D, 0x3C25, 0x643E, 0x0A00, -}; +const char D_i5_801BAB5C[] = "Enm->chpt=<%d>\n"; #ifdef NON_MATCHING // Regalloc in the random ternary. Can't be a temp as it's too low on stack diff --git a/yamls/jp/rev0/header.yaml b/yamls/jp/rev0/header.yaml index c7bbc0f6..5abb2ced 100644 --- a/yamls/jp/rev0/header.yaml +++ b/yamls/jp/rev0/header.yaml @@ -14,6 +14,7 @@ options: undefined_syms_auto_path: linker_scripts/jp/rev0/auto/undefined_syms_auto.ld symbol_addrs_path: + - linker_scripts/jp/rev0/symbol_addrs_migrate.txt - linker_scripts/jp/rev0/symbol_addrs.txt - linker_scripts/jp/rev0/symbol_addrs_engine.txt - linker_scripts/jp/rev0/symbol_addrs_libultra.txt diff --git a/yamls/jp/rev0/main.yaml b/yamls/jp/rev0/main.yaml index 061adf30..03cb25fd 100644 --- a/yamls/jp/rev0/main.yaml +++ b/yamls/jp/rev0/main.yaml @@ -13,137 +13,149 @@ vram: 0x80000450 #bss_size: 0x9B1F0 subsegments: - # Microcode - - [0x01050, textbin, BOOT] + # Microcode + - [0x01050, textbin, rspboot] + - [0x01120, textbin, aspmain] + - [0x02020, textbin, f3dex] - # Nintendo libraries - - [ 0x3450, asm, sys/sys_joybus] - - [ 0x3A90, asm, sys/sys_lib] - - [ 0x41E0, asm, sys/sys_lights] - - [ 0x4660, asm, sys/sys_main] - - [ 0x5A30, asm, sys/sys_math] - - [ 0x6460, asm, sys/sys_matrix] - - [ 0x7D00, asm, sys/sys_memory] - - [ 0x7D40, asm, sys/sys_timer] - - [ 0x7F10, asm, sys/sys_save] - - [ 0x8190, asm, sys/sys_fault] - - [ 0x8E70, asm, audio/audio_synthesis] - - [ 0xCA20, asm, audio/audio_heap] - - [ 0xF250, asm, audio/audio_load] - - [0x125B0, asm, audio/audio_playback] - - [0x14120, asm, audio/audio_effects] - - [0x14BC0, asm, audio/audio_seqplayer] - - [0x17770, asm, audio/audio_general] - - [0x1EC30, asm, audio/audio_thread] - - [0x1FB40, asm, 1FA60] - - [0x1FB50, asm, mio0] - - [0x1FBF0, asm, rdramcheck] - - [0x206C0, asm, libc_sprintf] - - [0x20760, asm] # libultra - - [0x20C90, asm] # libultra - - [0x21050, asm] # libultra - - [0x212B0, asm] # libultra - - [0x213F0, asm] # libultra - - [0x21540, asm] # libultra - - [0x215F0, asm] # libultra - - [0x21880, asm] # libultra - - [0x21D70, asm] # libultra - - [0x21DF0, asm] # libultra - - [0x21EA0, asm] # libultra - - [0x21FB0, asm] # libultra - - [0x22050, asm] # libultra - - [0x22150, asm] # libultra - - [0x221C0, asm] # libultra - - [0x22380, asm] # libultra - - [0x223B0, asm] # libultra - - [0x22420, asm] # libultra - - [0x22490, asm] # libultra - - [0x227F0, asm] # libultra - - [0x22800, asm] # libultra - - [0x22950, asm] # libultra - - [0x22E00, asm] # libultra - - [0x22F90, asm] # libultra - - [0x233A0, asm] # libultra - - [0x233B0, asm] # libultra - - [0x236E0, asm] # libultra - - [0x237C0, asm] # libultra - - [0x23AC0, asm] # libultra - - [0x242D0, asm] # libultra - - [0x24370, asm] # libultra - - [0x25030, asm] # libultra - - [0x25060, asm] # libultra - - [0x25070, asm] # libultra - - [0x252A0, asm] # libultra - - [0x25380, asm] # libultra - - [0x25390, asm] # libultra - - [0x25440, asm] # libultra - - [0x25450, asm] # libultra - - [0x25780, asm] # libultra - - [0x258F0, asm] # libultra - - [0x25DE0, asm] # libultra - - [0x26190, asm] # libultra - - [0x26D30, asm] # libultra - - [0x26EB0, asm] # libultra - - [0x27000, asm] # libultra - - [0x27010, asm] # libultra - - [0x27020, asm] # libultra - - [0x27330, asm] # libultra - - [0x273B0, asm] # libultra - - [0x27430, asm] # libultra - - [0x27470, asm] # libultra - - [0x27500, asm] # libultra - - [0x27530, asm] # libultra - - [0x27950, asm] # libultra - - [0x27960, asm] # libultra - - [0x27CC0, asm] # libultra - - [0x283F0, asm] # libultra - - [0x284A0, asm] # libultra - - [0x28500, asm] # libultra - - [0x28560, asm] # libultra - - [0x28600, asm] # libultra - - [0x28E80, asm] # libultra - - [0x29120, asm] # libultra - - [0x29BE0, asm] # libultra - - [0x29C40, asm] # libultra - - [0x2A1D0, asm] # libultra - - [0x2A370, asm] # libultra - - [0x2A430, asm] # libultra - - [0x2A440, asm] # libultra - - [0x2A4A0, asm] # libultra - - [0x2A4F0, asm] # libultra - - [0x2A590, asm] # libultra - - [0x2A5E0, asm] # libultra - - [0x2A6D0, asm] # libultra - - [0x2A860, asm] # libultra - - [0x2BF20, asm, engine/fox_360] - - [0x337A0, asm, engine/fox_beam] - - [0x3B560, asm, engine/fox_bg] - - [0x40940, asm, engine/fox_boss] - - [0x40D00, asm, engine/fox_tank] - - [0x46540, asm, engine/fox_demo] - - [0x4F580, asm, engine/fox_display] - - [0x565D0, asm, engine/fox_load] - - [0x56F20, asm, engine/fox_edata] - - [0x570F0, asm, engine/fox_edisplay] - - [0x5E8F0, asm, engine/fox_enmy] - - [0x68190, asm, engine/fox_enmy2] - - [0x74BE0, asm, engine/fox_effect] - - [0x81D10, asm, engine/fox_fade] - - [0x82090, asm, engine/fox_852F0] - - [0x822D0, asm, engine/fox_hud] - - [0x94EA0, asm, engine/fox_97F80] - - [0x974A0, asm, engine/fox_std_lib] - - [0x9F480, asm, engine/fox_game] - - [0xA1250, asm, engine/fox_A4290] - - [0xA1860, asm, engine/fox_A48A0] - - [0xA1B10, asm, engine/fox_play] - - [0xB69E0, asm, engine/fox_rcp] - - [0xB8370, asm, engine/fox_radio] - - [0xBA0A0, asm, engine/fox_reset] - - [0xBA350, asm, engine/fox_vs] - - [0xC0580, asm, engine/fox_message] - - [0xC0D00, asm, engine/fox_save] - - [0xC1030, data] # microcode + # Nintendo libraries + - [0x03450, c, sys/sys_joybus] + - [0x03A90, c, sys/sys_lib] + - [0x041E0, c, sys/sys_lights] + - [0x04660, c, sys/sys_main] + - [0x05A30, c, sys/sys_math] + - [0x06460, c, sys/sys_matrix] + - [0x07D00, c, sys/sys_memory] + - [0x07D40, c, sys/sys_timer] + - [0x07F10, c, sys/sys_save] + - [0x08190, c, sys/sys_fault] + - [0x08E70, c, audio/audio_synthesis] + - [0x0CA20, c, audio/audio_heap] + - [0x0F250, c, audio/audio_load] + - [0x125B0, c, audio/audio_playback] + - [0x14120, c, audio/audio_effects] + - [0x14BC0, c, audio/audio_seqplayer] + - [0x17770, c, audio/audio_general] + - [0x1EC30, c, audio/audio_thread] + - [0x1FB40, c, 1FA60] + - [0x1FB50, hasm, mio0] + - [0x1FBF0, hasm, rdramcheck] + - [0x206C0, c, libc_sprintf] + + # Libultra + - [0x20760, asm] + - [0x20C90, asm] + - [0x21050, asm] + - [0x212B0, asm] + - [0x213F0, asm] + - [0x21540, asm] + - [0x215F0, asm] + - [0x21880, asm] + - [0x21D70, asm] + - [0x21DF0, asm] + - [0x21EA0, asm] + - [0x21FB0, asm] + - [0x22050, asm] + - [0x22150, asm] + - [0x221C0, asm] + - [0x22380, asm] + - [0x223B0, asm] + - [0x22420, asm] + - [0x22490, asm] + - [0x227F0, asm] + - [0x22800, asm] + - [0x22950, asm] + - [0x22E00, asm] + - [0x22F90, asm] + - [0x233A0, asm] + - [0x233B0, asm] + - [0x236E0, asm] + - [0x237C0, asm] + - [0x23AC0, asm] + - [0x242D0, asm] + - [0x24370, asm] + - [0x25030, asm] + - [0x25060, asm] + - [0x25070, asm] + - [0x252A0, asm] + - [0x25380, asm] + - [0x25390, asm] + - [0x25440, asm] + - [0x25450, asm] + - [0x25780, asm] + - [0x258F0, asm] + - [0x25DE0, asm] + - [0x26190, asm] + - [0x26D30, asm] + - [0x26EB0, asm] + - [0x27000, asm] + - [0x27010, asm] + - [0x27020, asm] + - [0x27330, asm] + - [0x273B0, asm] + - [0x27430, asm] + - [0x27470, asm] + - [0x27500, asm] + - [0x27530, asm] + - [0x27950, asm] + - [0x27960, asm] + - [0x27CC0, asm] + - [0x283F0, asm] + - [0x284A0, asm] + - [0x28500, asm] + - [0x28560, asm] + - [0x28600, asm] + - [0x28E80, asm] + - [0x29120, asm] + - [0x29BE0, asm] + - [0x29C40, asm] + - [0x2A1D0, asm] + - [0x2A370, asm] + - [0x2A430, asm] + - [0x2A440, asm] + - [0x2A4A0, asm] + - [0x2A4F0, asm] + - [0x2A590, asm] + - [0x2A5E0, asm] + - [0x2A6D0, asm] + - [0x2A860, asm] + + # Game engine + - [0x2BF20, c, engine/fox_360] + - [0x337A0, c, engine/fox_beam] + - [0x3B560, c, engine/fox_bg] + - [0x40940, c, engine/fox_boss] + - [0x40D00, c, engine/fox_tank] + - [0x46540, c, engine/fox_demo] + - [0x4F580, c, engine/fox_display] + - [0x565D0, c, engine/fox_load] + - [0x56F20, c, engine/fox_edata] + - [0x570F0, c, engine/fox_edisplay] + - [0x5E8F0, c, engine/fox_enmy] + - [0x68190, c, engine/fox_enmy2] + - [0x74BE0, c, engine/fox_effect] + - [0x81D10, c, engine/fox_fade] + - [0x82090, c, engine/fox_852F0] + - [0x822D0, c, engine/fox_hud] + - [0x94EA0, c, engine/fox_97F80] + - [0x974A0, c, engine/fox_std_lib] + - [0x9F480, c, engine/fox_game] + - [0xA1250, c, engine/fox_A4290] + - [0xA1860, c, engine/fox_A48A0] + - [0xA1B10, c, engine/fox_play] + - [0xB69E0, c, engine/fox_rcp] + - [0xB8370, c, engine/fox_radio] + - [0xBA0A0, c, engine/fox_reset] + - [0xBA350, c, engine/fox_versus] + - [0xC0580, c, engine/fox_message] + - [0xC0D00, c, engine/fox_save] + + # DATA - Microcode + - [0xC1030, data, aspmain] + - [0xC1360, data, audio/audio_tables] + - [0xC1B20, data, f3dex] + + # DATA - Nintendo Libraries - [0xC2320, data, sys/sys_main] - [0xC2330, data, sys/sys_math] - [0xC2370, data, sys/sys_matrix] @@ -157,28 +169,36 @@ - [0xC3A50, data, audio/audio_general] - [0xC5240, data, audio/audio_context] - [0xC59C0, data, audio/audio_thread] - - [0xC59F0, data] # libultra - - [0xC5CC0, rodata, sys/sys_math] - - [0xC5D20, rodata, sys/sys_matrix] - - [0xC5D30, rodata, sys/sys_save] - - [0xC5E50, rodata, sys/sys_fault] - - [0xC6230, rodata, audio/audio_synthesis] - - [0xC6270, rodata, audio/audio_heap] - - [0xC6270, rodata, audio/audio_load] - - [0xC62D0, rodata, audio/audio_playback] - - [0xC6300, rodata, audio/audio_effects] - - [0xC6330, rodata, audio/audio_seqplayer] - - [0xC69E0, rodata, audio/audio_general] - - [0xC69E0, rodata, audio/audio_thread] - - [0xC6F20, rodata] # libultra - - [0xC6F30, rodata] # libultra - - [0xC6F80, rodata] # libultra - - [0xC6FD0, rodata] # libultra - - [0xC70D0, rodata] # libultra - - [0xC7120, rodata] # libultra - - [0xC7140, rodata] # libultra - - [0xC7150, rodata] # libultra - - [0xC71B0, rodata] # libultra + + # DATA - Libultra + - [0xC59F0, data] + + # RODATA - Nintendo Libraries + - [0xC5CC0, .rodata, sys/sys_math] + - [0xC5D20, .rodata, sys/sys_matrix] + - [0xC5D30, .rodata, sys/sys_save] + - [0xC5E50, .rodata, sys/sys_fault] + - [0xC6230, .rodata, audio/audio_synthesis] + - [0xC6270, .rodata, audio/audio_heap] + - [0xC6290, .rodata, audio/audio_load] + - [0xC62D0, .rodata, audio/audio_playback] + - [0xC6300, .rodata, audio/audio_effects] + - [0xC6330, .rodata, audio/audio_seqplayer] + - [0xC69E0, .rodata, audio/audio_general] + - [0xC6D00, .rodata, audio/audio_thread] + + # RODATA - Libultra + - [0xC6F20, rodata] + - [0xC6F30, rodata] + - [0xC6F80, rodata] + - [0xC6FD0, rodata] + - [0xC70D0, rodata] + - [0xC7120, rodata] + - [0xC7140, rodata] + - [0xC7150, rodata] + - [0xC71B0, rodata] + + # DATA - Game engine - [0xC7230, data, engine/fox_360] - [0xC7360, data, engine/fox_beam] - [0xC73D0, data, engine/fox_bg] @@ -202,32 +222,36 @@ - [0xD2370, data, engine/fox_radio] - [0xD2380, data, engine/fox_reset] - [0xD2390, data, engine/fox_versus] - - [0xD2610, data, fox_message] - - [0xDB900, data, fox_save] - - [0xDBA00, rodata, engine/fox_360] - - [0xDBCE0, rodata, engine/fox_beam] - - [0xDBF80, rodata, engine/fox_bg] - - [0xDC1C0, rodata, engine/fox_boss] - - [0xDC1E0, rodata, engine/fox_tank] - - [0xDC340, rodata, engine/fox_demo] - - [0xDC990, rodata, engine/fox_display] - - [0xDCB90, rodata, engine/fox_load] - - [0xDCC10, rodata, engine/fox_edisplay] - - [0xDCFC0, rodata, engine/fox_enmy] - - [0xDD640, rodata, engine/fox_enmy2] - - [0xDDE20, rodata, engine/fox_effect] - - [0xDE2E0, rodata, engine/fox_fade] - - [0xDE310, rodata, engine/fox_hud] - - [0xDECB0, rodata, engine/fox_97F80] - - [0xDECC0, rodata, engine/fox_std_lib] - - [0xDED20, rodata, engine/fox_game] - - [0xDEDA0, rodata, engine/fox_A4290] - - [0xDEDB0, rodata, engine/fox_A48A0] - - [0xDEDC0, rodata, engine/fox_play] - - [0xDF6C0, rodata, engine/fox_radio] - - [0xDFD20, rodata, engine/fox_versus] - - [0xDFE30, rodata, engine/fox_message] - - [0xDFEF0, rodata, engine/fox_save] + - [0xD2610, data, engine/fox_message] + - [0xDB900, data, engine/fox_save] + + # RODATA - Game engine + - [0xDBA00, .rodata, engine/fox_360] + - [0xDBCE0, .rodata, engine/fox_beam] + - [0xDBF80, .rodata, engine/fox_bg] + - [0xDC1C0, .rodata, engine/fox_boss] + - [0xDC1E0, .rodata, engine/fox_tank] + - [0xDC340, .rodata, engine/fox_demo] + - [0xDC990, .rodata, engine/fox_display] + - [0xDCB90, .rodata, engine/fox_load] + - [0xDCC10, .rodata, engine/fox_edisplay] + - [0xDCFC0, .rodata, engine/fox_enmy] + - [0xDD640, .rodata, engine/fox_enmy2] + - [0xDDE20, .rodata, engine/fox_effect] + - [0xDE2E0, .rodata, engine/fox_fade] + - [0xDE310, .rodata, engine/fox_hud] + - [0xDECB0, .rodata, engine/fox_97F80] + - [0xDECC0, .rodata, engine/fox_std_lib] + - [0xDED20, .rodata, engine/fox_game] + - [0xDEDA0, .rodata, engine/fox_A4290] + - [0xDEDB0, .rodata, engine/fox_A48A0] + - [0xDEDC0, .rodata, engine/fox_play] + - [0xDF6C0, .rodata, engine/fox_radio] + - [0xDFD20, .rodata, engine/fox_versus] + - [0xDFE30, .rodata, engine/fox_message] + - [0xDFEF0, .rodata, engine/fox_save] + + # Common assets - [0xDFF60, data, fox_msg_textures] - [0xE4FE0, data, fox_shapes] - [0xE67C0, data, fox_wheels] @@ -242,6 +266,6 @@ vram: 0x8017E210 #follows_vram: main subsegments: - - [0xE93C0, .data, dmatable] + - [0xE93C0, data, dmatable] diff --git a/yamls/jp/rev0/overlays.yaml b/yamls/jp/rev0/overlays.yaml index 7f8d981f..13aec004 100644 --- a/yamls/jp/rev0/overlays.yaml +++ b/yamls/jp/rev0/overlays.yaml @@ -17,10 +17,10 @@ - [0xDBB940, data, fox_co] - [0xDBBCA0, data, fox_ve1] - [0xDBCFB0, data, fox_tr360] - - [0xDBD050, rodata, fox_co] - - [0xDBD410, rodata, fox_ve1] - - [0xDBD7A0, rodata, fox_tr] - - [0xDBD7E0, rodata, fox_tr360] + - [0xDBD050, .rodata, fox_co] + - [0xDBD410, .rodata, fox_ve1] + - [0xDBD7A0, .rodata, fox_tr] + - [0xDBD7E0, .rodata, fox_tr360] - name: ovl_i2 exclusive_ram_id: overlay @@ -33,6 +33,13 @@ symbol_name_format: i2_$VRAM subsegments: - [0xDBD820, c, fox_i2] + - [0xDBD830, c, fox_me] + - [0xDC52D0, c, fox_sx] + - [0xDCB6D0, data, fox_i2] + - [0xDCB6E0, data, fox_me] + - [0xDCB8F0, data, fox_sx] + - [0xDCBA40, .rodata, fox_me] + - [0xDCBD00, .rodata, fox_sx] - name: ovl_i3 exclusive_ram_id: overlay @@ -45,9 +52,19 @@ symbol_name_format: i3_$VRAM subsegments: - [0xDCC020, c, fox_i3] - - [0xDE3300, c] - - [0xDED940, c] - - [0xE037E0, c] + - [0xDCC030, c, fox_a6] + - [0xDD4A50, c, fox_zo] + - [0xDE3300, c, fox_so] + - [0xDED940, c, fox_aq] + - [0xE037D0, data, fox_i3] + - [0xE037E0, data, fox_a6] + - [0xE04090, data, fox_zo] + - [0xE04410, data, fox_so] + - [0xE04690, data, fox_aq] + - [0xE05430, .rodata, fox_a6] + - [0xE058E0, .rodata, fox_zo] + - [0xE06000, .rodata, fox_so] + - [0xE06560, .rodata, fox_aq] - name: ovl_i4 exclusive_ram_id: overlay @@ -60,10 +77,20 @@ symbol_name_format: i4_$VRAM subsegments: - [0xE06D70, c, fox_i4] - - [0xE06E40, c] - - [0xE0B580, c] - - [0xE18DD0, c] - - [0xE1E2B0, c] + - [0xE06E40, c, fox_fo] + - [0xE0B580, c, fox_bo] + - [0xE11FD0, c, fox_ka] + - [0xE18DD0, c, fox_sz] + - [0xE1E2A0, data, fox_i4] + - [0xE1E2B0, data, fox_fo] + - [0xE1E390, data, fox_bo] + - [0xE1E5C0, data, fox_ka] + - [0xE1E980, data, fox_sz] + - [0xE1EBA0, .rodata, fox_i4] + - [0xE1EBE0, .rodata, fox_fo] + - [0xE1EDE0, .rodata, fox_bo] + - [0xE1F1E0, .rodata, fox_ka] + - [0xE1F570, .rodata, fox_sz] - name: ovl_i5 exclusive_ram_id: overlay @@ -76,8 +103,17 @@ symbol_name_format: i5_$VRAM subsegments: - [0xE1F870, c, fox_i5] - - [0xE21280, c] - - [0xE4F680, c] + - [0xE1F880, c, fox_ti_cs] + - [0xE21280, c, fox_ti] + - [0xE31C90, c, fox_ma] + - [0xE4CDB0, c, fox_ground] + - [0xE4F670, data, fox_i5] + - [0xE4F680, data, fox_ti_cs] + - [0xE52DC0, .rodata, fox_i5] + - [0xE52DD0, .rodata, fox_ti_cs] + - [0xE52E30, .rodata, fox_ti] + - [0xE53690, .rodata, fox_ma] + - [0xE541D0, .rodata, fox_ground] - name: ovl_i6 exclusive_ram_id: overlay @@ -99,11 +135,11 @@ - [0xE73680, data, fox_ve2] - [0xE736E0, data, fox_sy] - [0xE73950, data, fox_turret] - - [0xE73960, rodata, fox_i6] - - [0xE73970, rodata, fox_andross] - - [0xE74210, rodata, fox_ve2] - - [0xE74250, rodata, fox_sy] - - [0xE74CA0, rodata, fox_turret] + - [0xE73960, .rodata, fox_i6] + - [0xE73970, .rodata, fox_andross] + - [0xE74210, .rodata, fox_ve2] + - [0xE74250, .rodata, fox_sy] + - [0xE74CA0, .rodata, fox_turret] - name: ovl_menu exclusive_ram_id: overlay @@ -116,6 +152,17 @@ symbol_name_format: menu_$VRAM subsegments: - [0xE74D00, c, fox_i_menu] + - [0xE74DC0, c, fox_title] + - [0xE7F410, c, fox_option] + - [0xE8C1E0, c, fox_map] + - [0xE9B3E0, data, fox_i_menu] + - [0xE9B3F0, data, fox_title] + - [0xE9BF60, data, fox_option] + - [0xE9CE00, data, fox_map] + - [0xEA4740, .rodata, fox_i_menu] + - [0xEA4760, .rodata, fox_title] + - [0xEA4B00, .rodata, fox_option] + - [0xEA4F00, .rodata, fox_map] - name: ovl_ending exclusive_ram_id: overlay @@ -128,18 +175,24 @@ symbol_name_format: ending_$VRAM subsegments: - [0xEA5610, c, fox_end1] - - [0xEAAF10, c] + - [0xEAAF10, c, fox_end2] + - [0xEB0800, data, fox_end1] + - [0xEB0E50, data, fox_end2] + - [0xEB41A0, .rodata, fox_end1] + - [0xEB45A0, .rodata, fox_end2] - name: ovl_unused exclusive_ram_id: overlay type: code dir: overlays/ovl_unused - start: 0xEB0800 + start: 0xEB4C00 vram: 0x8017E7A0 #follows_vram: ast_radio #bss_size: 0x10 symbol_name_format: unused_$VRAM subsegments: - - [0xEB0800, c, fox_unused] + - [0xEB4C00, c, fox_unused] + - [0xEB4C10, data, fox_unused] + - [0xEB4CA0] \ No newline at end of file diff --git a/yamls/us/rev1/main.yaml b/yamls/us/rev1/main.yaml index c80f1b94..c0d64ff7 100644 --- a/yamls/us/rev1/main.yaml +++ b/yamls/us/rev1/main.yaml @@ -13,12 +13,12 @@ vram: 0x80000450 bss_size: 0x9B1F0 subsegments: - # Microcode + # Microcode - [0x01050, textbin, rspboot] - [0x01120, textbin, aspmain] - [0x02010, textbin, f3dex] - # Nintendo libraries + # Nintendo libraries - [0x03440, c, sys/sys_joybus] - [0x03A80, c, sys/sys_lib] - [0x041D0, c, sys/sys_lights] @@ -47,10 +47,10 @@ - [0x206B0, c, libc_math64] - [0x20A60, hasm, libc_math64_fp] - # GCC + # GCC - [auto, c, libultra/gcc_fix/__floatundisf] - # Libultra + # Libultra - [0x20BC0, c, libultra/io/controller] - [0x20F80, c, libultra/io/contreaddata] - [0x211E0, c, libultra/os/recvmesg] @@ -174,7 +174,7 @@ - [0x2EE80, c, libultra/os/stopthread] - [0x2EF40, hasm, libultra/rmon/rmonrcp] - # Game engine + # Game engine - [0x2EFE0, c, engine/fox_360] - [0x36930, c, engine/fox_beam] - [0x3E6F0, c, engine/fox_bg] @@ -280,7 +280,7 @@ - [0xCA480, .rodata, libultra/rmon/rmonbrk] - [0xCA650, .rodata, libultra/rmon/rmonmain] - # DATA - game engine + # DATA - Game engine - [0xCA690, .data, engine/fox_360] - [0xCA7C0, .data, engine/fox_beam] - [0xCA830, .data, engine/fox_bg] @@ -306,7 +306,7 @@ - [0xD5690, .data, engine/fox_versus] - [0xD5910, .data, engine/fox_save] - # RODATA - game engine + # RODATA - Game engine - [0xD5A10, .rodata, engine/fox_360] - [0xD5CF0, .rodata, engine/fox_beam] - [0xD5F90, .rodata, engine/fox_bg] From fb7b087664aa468605dd0442e41f16eab595f4c9 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Mon, 13 May 2024 19:41:31 -0300 Subject: [PATCH 083/151] make clean clears version specific asm folders --- Makefile | 2 +- src/overlays/ovl_menu/fox_map.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 5d3572fa..bd3722a6 100644 --- a/Makefile +++ b/Makefile @@ -438,7 +438,7 @@ assets: clean: rm -f torch.hash.yml - @git clean -fdx asm/ + @git clean -fdx asm/$(VERSION) @git clean -fdx bin/ @git clean -fdx build/ @git clean -fdx src/assets/ diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index 964f8768..32cb4948 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -3131,7 +3131,7 @@ void Map_801A36A8(void) { gGameState = GSTATE_MENU; gNextGameStateTimer = 2; gOptionMenuStatus = OPTION_WAIT; - gDrawMode = 0; + gDrawMode = DRAW_NONE; gStarCount = 0; break; } From 89f11fc14231233325d2772df54bc857d29c0e9c Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Tue, 14 May 2024 10:59:18 -0300 Subject: [PATCH 084/151] fix jp rev0 build --- Makefile | 5 +++++ linker_scripts/jp/rev0/undefined_syms.ld | 1 + starfox64.jp.rev0.uncompressed.md5 | 1 + yamls/jp/rev0/main.yaml | 1 + yamls/us/rev0/assets.yaml | 0 yamls/us/rev0/header.yaml | 0 yamls/us/rev0/main.yaml | 0 yamls/us/rev0/overlays.yaml | 0 8 files changed, 8 insertions(+) create mode 100644 starfox64.jp.rev0.uncompressed.md5 delete mode 100644 yamls/us/rev0/assets.yaml delete mode 100644 yamls/us/rev0/header.yaml delete mode 100644 yamls/us/rev0/main.yaml delete mode 100644 yamls/us/rev0/overlays.yaml diff --git a/Makefile b/Makefile index bd3722a6..61e21933 100644 --- a/Makefile +++ b/Makefile @@ -279,9 +279,14 @@ endif $(shell mkdir -p asm bin linker_scripts/$(VERSION)/$(REV)/auto) SRC_DIRS := $(shell find src -type d) +# Temporary, until we decide how we're gonna handle other versions +ifeq ($(VERSION), jp) +SRC_DIRS := $(shell find srcjp -type d) +endif ASM_DIRS := $(shell find asm/$(VERSION)/$(REV) -type d -not -path "asm/$(VERSION)/$(REV)/nonmatchings/*") BIN_DIRS := $(shell find bin -type d) + C_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.c)) C_FILES := $(filter-out %.inc.c,$(C_FILES)) S_FILES := $(foreach dir,$(ASM_DIRS) $(SRC_DIRS),$(wildcard $(dir)/*.s)) diff --git a/linker_scripts/jp/rev0/undefined_syms.ld b/linker_scripts/jp/rev0/undefined_syms.ld index fa606254..2956b524 100644 --- a/linker_scripts/jp/rev0/undefined_syms.ld +++ b/linker_scripts/jp/rev0/undefined_syms.ld @@ -2443,6 +2443,7 @@ D_8017E112 = 0x8017E112; D_8017E210 = 0x8017E210; D_8017E218 = 0x8017E218; D_80180001 = 0x80180001; +D_80180058 = 0x80180058; D_8018CFB0 = 0x8018CFB0; D_8018CFC0 = 0x8018CFC0; D_i6_8018DD90 = 0x8018DD90; diff --git a/starfox64.jp.rev0.uncompressed.md5 b/starfox64.jp.rev0.uncompressed.md5 new file mode 100644 index 00000000..27fb7cab --- /dev/null +++ b/starfox64.jp.rev0.uncompressed.md5 @@ -0,0 +1 @@ +7815171b128791fc3c0cd16debe30bec ./build/starfox64.jp.rev0.uncompressed.z64 \ No newline at end of file diff --git a/yamls/jp/rev0/main.yaml b/yamls/jp/rev0/main.yaml index 03cb25fd..35bd9c30 100644 --- a/yamls/jp/rev0/main.yaml +++ b/yamls/jp/rev0/main.yaml @@ -40,6 +40,7 @@ - [0x1FB40, c, 1FA60] - [0x1FB50, hasm, mio0] - [0x1FBF0, hasm, rdramcheck] + - [0x1FCA0, textbin, alt_ipl3] - [0x206C0, c, libc_sprintf] # Libultra diff --git a/yamls/us/rev0/assets.yaml b/yamls/us/rev0/assets.yaml deleted file mode 100644 index e69de29b..00000000 diff --git a/yamls/us/rev0/header.yaml b/yamls/us/rev0/header.yaml deleted file mode 100644 index e69de29b..00000000 diff --git a/yamls/us/rev0/main.yaml b/yamls/us/rev0/main.yaml deleted file mode 100644 index e69de29b..00000000 diff --git a/yamls/us/rev0/overlays.yaml b/yamls/us/rev0/overlays.yaml deleted file mode 100644 index e69de29b..00000000 From 3045745789fa5fc63cc83539a15d823bec80488d Mon Sep 17 00:00:00 2001 From: petrie911 <69443847+petrie911@users.noreply.github.com> Date: Tue, 14 May 2024 09:44:12 -0500 Subject: [PATCH 085/151] name remaining files, fix some fake matches (#245) * splits * split and migrate * readwrite const * format --- Makefile | 7 + include/functions.h | 8 +- include/variables.h | 2 +- src/audio/audio_effects.c | 2 +- src/audio/audio_heap.c | 112 +++++++------- src/audio/audio_load.c | 145 +++++++++--------- src/audio/audio_playback.c | 56 +++---- src/audio/audio_seqplayer.c | 62 ++++---- src/audio/audio_synthesis.c | 20 +-- src/engine/{fox_852F0.c => fox_blur.c} | 8 +- src/engine/{fox_97F80.c => fox_col1.c} | 0 src/engine/{fox_A4290.c => fox_col2.c} | 2 +- ...ox_A4290_colheaders.c => fox_colheaders.c} | 0 src/engine/fox_game.c | 142 ++++++++--------- src/engine/{fox_A48A0.c => fox_pause.c} | 11 +- src/sys/sys_main.c | 5 +- yamls/jp/rev0/main.yaml | 17 +- yamls/us/rev1/main.yaml | 19 ++- 18 files changed, 308 insertions(+), 310 deletions(-) rename src/engine/{fox_852F0.c => fox_blur.c} (90%) rename src/engine/{fox_97F80.c => fox_col1.c} (100%) rename src/engine/{fox_A4290.c => fox_col2.c} (99%) rename src/engine/{fox_A4290_colheaders.c => fox_colheaders.c} (100%) rename src/engine/{fox_A48A0.c => fox_pause.c} (89%) diff --git a/Makefile b/Makefile index 61e21933..261c0ea8 100644 --- a/Makefile +++ b/Makefile @@ -315,6 +315,13 @@ build/src/libultra/host/%.o: OPTFLAGS := -O1 -g0 build/src/audio/%.o: OPTFLAGS := -O2 -g0 # per-file flags +build/src/audio/audio_effects.o: CFLAGS += -use_readwrite_const +build/src/audio/audio_heap.o: CFLAGS += -use_readwrite_const +build/src/audio/audio_load.o: CFLAGS += -use_readwrite_const +build/src/audio/audio_seqplayer.o: CFLAGS += -use_readwrite_const +build/src/audio/audio_playback.o: CFLAGS += -use_readwrite_const +build/src/audio/audio_synthesis.o: CFLAGS += -use_readwrite_const + build/src/libc_sprintf.o: OPTFLAGS := -O2 -g0 build/src/libc_math64.o: OPTFLAGS := -O2 -g0 diff --git a/include/functions.h b/include/functions.h index 1e70e995..717a5235 100644 --- a/include/functions.h +++ b/include/functions.h @@ -424,17 +424,17 @@ void func_hud_80094BBC(Effect*); void func_hud_80094D20(f32, f32); void func_hud_80096A74(Player* player); -// fox_97F80 +// fox_col1 void func_col1_80098860(PlaneF* plane, Vec3f* point, Vec3f* normal); s32 func_col1_800988B4(Vec3f* vec, PlaneF* plane); bool func_col1_800998FC(Vec3f* objPos, Vec3f* colliderPos, Vec3f* objVel, s32 colId, Vec3f* hitPosOut, f32* hitAnglesOut); -// fox_A4290 +// fox_col2 bool func_col2_800A3690(Vec3f* objPos, Vec3f* colliderPos, s32 colId, Vec3f* hitDataOut); -// fox_A48A0 -void func_800A3CA0(void); +// fox_pause +void func_pause_800A3CA0(void); // fox_play bool Play_CheckMedalStatus(u16); diff --git a/include/variables.h b/include/variables.h index 5e0579c8..0cf15223 100644 --- a/include/variables.h +++ b/include/variables.h @@ -83,7 +83,7 @@ extern s32 gCallVoiceParam; // fox_hud extern s16 D_hud_800D1970; -// fox_A4290 +// fox_col2 extern CollisionHeader D_800D2B38[]; extern CollisionHeader2 D_800D2CA0[]; diff --git a/src/audio/audio_effects.c b/src/audio/audio_effects.c index 7a3f84ea..5719dba7 100644 --- a/src/audio/audio_effects.c +++ b/src/audio/audio_effects.c @@ -1,7 +1,7 @@ #include "sys.h" #include "sf64audio_provisional.h" -static char devstr[] = "Audio:Envp: overflow %f\n"; +static const char devstr[] = "Audio:Envp: overflow %f\n"; void func_80013400(SequenceChannel* channel, s32 updateVolume) { s32 i; diff --git a/src/audio/audio_heap.c b/src/audio/audio_heap.c index a0ccd63e..91c1b56c 100644 --- a/src/audio/audio_heap.c +++ b/src/audio/audio_heap.c @@ -11,62 +11,62 @@ void* AudioHeap_SearchRegularCaches(s32 tableType, s32 cache, s32 id); void* AudioHeap_SearchPermanentCache(s32 tableType, s32 id); SampleCacheEntry* AudioHeap_AllocPersistentSampleCacheEntry(u32); -static char devstr00[] = "Warning:Kill Note %x \n"; -static char devstr01[] = "Kill Voice %d (ID %d) %d\n"; -static char devstr02[] = "Warning: Running Sequence's data disappear!\n"; -static char devstr03[] = "%x %x %x\n"; -static char devstr04[] = "Audio:Memory:Heap OverFlow : Not Allocate %d!\n"; -static char devstr05[] = "%x %x %x\n"; -static char devstr06[] = "Audio:Memory:Heap OverFlow : Not Allocate %d!\n"; -static char devstr07[] = "Audio:Memory:DataHeap Not Allocate \n"; -static char devstr08[] = "StayHeap Not Allocate %d\n"; -static char devstr09[] = "AutoHeap Not Allocate %d\n"; -static char devstr10[] = "Status ID0 : %d ID1 : %d\n"; -static char devstr11[] = "id 0 is Stopping\n"; -static char devstr12[] = "id 0 is Stop\n"; -static char devstr13[] = "id 1 is Stopping\n"; -static char devstr14[] = "id 1 is Stop\n"; -static char devstr15[] = "WARNING: NO FREE AUTOSEQ AREA.\n"; -static char devstr16[] = "WARNING: NO STOP AUTO AREA.\n"; -static char devstr17[] = " AND TRY FORCE TO STOP SIDE \n"; -static char devstr18[] = "Check ID0 (seq ID %d) Useing ...\n"; -static char devstr19[] = "Check ID1 (seq ID %d) Useing ...\n"; -static char devstr20[] = "No Free Seq area.\n"; -static char devstr21[] = "CH %d: ID %d\n"; -static char devstr22[] = "TWO SIDES ARE LOADING... ALLOC CANCELED.\n"; -static char devstr23[] = "WARNING: Before Area Overlaid After."; -static char devstr24[] = "WARNING: After Area Overlaid Before."; -static char devstr25[] = "MEMORY:SzHeapAlloc ERROR: sza->side %d\n"; -static char devstr26[] = "Audio:MEMORY:SzHeap Overflow error. (%d bytes)\n"; -static char devstr27[] = "Auto Heap Unhit for ID %d\n"; -static char devstr28[] = "Heap Reconstruct Start %x\n"; -static char devstr29[] = "---------------------------------------TEMPO %d %f\n"; -static char devstr30[] = "%f \n"; -static char devstr31[] = "%f \n"; -static char devstr32[] = "AHPBASE %x\n"; -static char devstr33[] = "AHPCUR %x\n"; -static char devstr34[] = "HeapTop %x\n"; -static char devstr35[] = "SynoutRate %d / %d \n"; -static char devstr36[] = "FXSIZE %d\n"; -static char devstr37[] = "FXCOMP %d\n"; -static char devstr38[] = "FXDOWN %d\n"; -static char devstr39[] = "WaveCacheLen: %d\n"; -static char devstr40[] = "SpecChange Finished\n"; -static char devstr41[] = "Warning:Emem Over,not alloc %d\n"; -static char devstr42[] = "Single AutoSize %d\n"; -static char devstr43[] = "Single Ptr %x\n"; -static char devstr44[] = "Request--------Single-Auto, %d\n"; -static char devstr45[] = "Retry %x, %x, len %x\n"; -static char devstr46[] = "DMAing list %d is killed.\n"; -static char devstr47[] = "Try Kill %d \n"; -static char devstr48[] = "Try Kill %x %x\n"; -static char devstr49[] = "Try Kill %x %x %x\n"; -static char devstr50[] = "Rom back %x %x \n"; -static char devstr51[] = "Error sw NULL \n"; -static char devstr52[] = "Request--------Single-Stay, %d\n"; -static char devstr53[] = "Try Kill %d \n"; -static char devstr54[] = "Try Kill %x %x\n"; -static char devstr55[] = "Try Kill %x %x %x\n"; +static const char devstr00[] = "Warning:Kill Note %x \n"; +static const char devstr01[] = "Kill Voice %d (ID %d) %d\n"; +static const char devstr02[] = "Warning: Running Sequence's data disappear!\n"; +static const char devstr03[] = "%x %x %x\n"; +static const char devstr04[] = "Audio:Memory:Heap OverFlow : Not Allocate %d!\n"; +static const char devstr05[] = "%x %x %x\n"; +static const char devstr06[] = "Audio:Memory:Heap OverFlow : Not Allocate %d!\n"; +static const char devstr07[] = "Audio:Memory:DataHeap Not Allocate \n"; +static const char devstr08[] = "StayHeap Not Allocate %d\n"; +static const char devstr09[] = "AutoHeap Not Allocate %d\n"; +static const char devstr10[] = "Status ID0 : %d ID1 : %d\n"; +static const char devstr11[] = "id 0 is Stopping\n"; +static const char devstr12[] = "id 0 is Stop\n"; +static const char devstr13[] = "id 1 is Stopping\n"; +static const char devstr14[] = "id 1 is Stop\n"; +static const char devstr15[] = "WARNING: NO FREE AUTOSEQ AREA.\n"; +static const char devstr16[] = "WARNING: NO STOP AUTO AREA.\n"; +static const char devstr17[] = " AND TRY FORCE TO STOP SIDE \n"; +static const char devstr18[] = "Check ID0 (seq ID %d) Useing ...\n"; +static const char devstr19[] = "Check ID1 (seq ID %d) Useing ...\n"; +static const char devstr20[] = "No Free Seq area.\n"; +static const char devstr21[] = "CH %d: ID %d\n"; +static const char devstr22[] = "TWO SIDES ARE LOADING... ALLOC CANCELED.\n"; +static const char devstr23[] = "WARNING: Before Area Overlaid After."; +static const char devstr24[] = "WARNING: After Area Overlaid Before."; +static const char devstr25[] = "MEMORY:SzHeapAlloc ERROR: sza->side %d\n"; +static const char devstr26[] = "Audio:MEMORY:SzHeap Overflow error. (%d bytes)\n"; +static const char devstr27[] = "Auto Heap Unhit for ID %d\n"; +static const char devstr28[] = "Heap Reconstruct Start %x\n"; +static const char devstr29[] = "---------------------------------------TEMPO %d %f\n"; +static const char devstr30[] = "%f \n"; +static const char devstr31[] = "%f \n"; +static const char devstr32[] = "AHPBASE %x\n"; +static const char devstr33[] = "AHPCUR %x\n"; +static const char devstr34[] = "HeapTop %x\n"; +static const char devstr35[] = "SynoutRate %d / %d \n"; +static const char devstr36[] = "FXSIZE %d\n"; +static const char devstr37[] = "FXCOMP %d\n"; +static const char devstr38[] = "FXDOWN %d\n"; +static const char devstr39[] = "WaveCacheLen: %d\n"; +static const char devstr40[] = "SpecChange Finished\n"; +static const char devstr41[] = "Warning:Emem Over,not alloc %d\n"; +static const char devstr42[] = "Single AutoSize %d\n"; +static const char devstr43[] = "Single Ptr %x\n"; +static const char devstr44[] = "Request--------Single-Auto, %d\n"; +static const char devstr45[] = "Retry %x, %x, len %x\n"; +static const char devstr46[] = "DMAing list %d is killed.\n"; +static const char devstr47[] = "Try Kill %d \n"; +static const char devstr48[] = "Try Kill %x %x\n"; +static const char devstr49[] = "Try Kill %x %x %x\n"; +static const char devstr50[] = "Rom back %x %x \n"; +static const char devstr51[] = "Error sw NULL \n"; +static const char devstr52[] = "Request--------Single-Stay, %d\n"; +static const char devstr53[] = "Try Kill %d \n"; +static const char devstr54[] = "Try Kill %x %x\n"; +static const char devstr55[] = "Try Kill %x %x %x\n"; void AudioHeap_ResetLoadStatus(void) { s32 i; diff --git a/src/audio/audio_load.c b/src/audio/audio_load.c index dc4a23ca..eb82eaf2 100644 --- a/src/audio/audio_load.c +++ b/src/audio/audio_load.c @@ -2,28 +2,6 @@ #include "sf64dma.h" #include "sf64audio_provisional.h" -static char devstr00[] = "CAUTION:WAVE CACHE FULL %d"; -static char D_800C4F6C[] = "SUPERDMA"; -static char devstr02[] = "Bank Change... top %d lba %d\n"; -static char devstr03[] = "BankCount %d\n"; -static char devstr04[] = "BANK LOAD MISS! FOR %d\n"; -static char devstr05[] = "BankCount %d\n"; -static char devstr06[] = "Flush Start\n"; -static char devstr07[] = "%d ->%d\n"; -static char devstr08[] = "useflag %d\n"; -static char devstr09[] = "BankCount %d\n"; -static char devstr10[] = "%2x "; -static char devstr11[] = "StartSeq (Group %d,Seq %d) Process finish\n"; -static char devstr12[] = "LoadCtrl, Ptr %x and Media is %d\n"; -static char devstr13[] = "Load Bank, Type %d , ID %d\n"; -static char devstr14[] = "get auto\n"; -static char devstr15[] = "get s-auto %x\n"; -static char devstr16[] = "Seq %d Write ID OK %d!\n"; -static char devstr17[] = "Banknumber %d\n"; -static char devstr18[] = "Bank Offset %x %d %d\n"; -static char devstr19[] = "PEP Touch %x \n"; -static char D_800C50E8[] = "FastCopy"; - s32 D_80146D80; s32 PAD_80146D88[2]; AudioSlowLoadBuffer gSlowLoads; @@ -86,6 +64,8 @@ void AudioLoad_DecreaseSampleDmaTtls(void) { D_80155A50 = 0; } +static const char devstr00[] = "CAUTION:WAVE CACHE FULL %d"; + void* AudioLoad_DmaSampleData(u32 devAddr, u32 size, u32 arg2, u8* dmaIndexRef, s32 medium) { u32 i; SampleDma* dma; @@ -147,11 +127,30 @@ void* AudioLoad_DmaSampleData(u32 devAddr, u32 size, u32 arg2, u8* dmaIndexRef, dma->devAddr = dmaDevAddr; dma->sizeUnused = dma->size; AudioLoad_Dma(&gCurAudioFrameDmaIoMsgBuf[gCurAudioFrameDmaCount++], 0, 0, dmaDevAddr, dma->ramAddr, dma->size, - &gCurAudioFrameDmaQueue, medium, D_800C4F6C); + &gCurAudioFrameDmaQueue, medium, "SUPERDMA"); *dmaIndexRef = sp38; return devAddr - dmaDevAddr + dma->ramAddr; } +static const char devstr02[] = "Bank Change... top %d lba %d\n"; +static const char devstr03[] = "BankCount %d\n"; +static const char devstr04[] = "BANK LOAD MISS! FOR %d\n"; +static const char devstr05[] = "BankCount %d\n"; +static const char devstr06[] = "Flush Start\n"; +static const char devstr07[] = "%d ->%d\n"; +static const char devstr08[] = "useflag %d\n"; +static const char devstr09[] = "BankCount %d\n"; +static const char devstr10[] = "%2x "; +static const char devstr11[] = "StartSeq (Group %d,Seq %d) Process finish\n"; +static const char devstr12[] = "LoadCtrl, Ptr %x and Media is %d\n"; +static const char devstr13[] = "Load Bank, Type %d , ID %d\n"; +static const char devstr14[] = "get auto\n"; +static const char devstr15[] = "get s-auto %x\n"; +static const char devstr16[] = "Seq %d Write ID OK %d!\n"; +static const char devstr17[] = "Banknumber %d\n"; +static const char devstr18[] = "Bank Offset %x %d %d\n"; +static const char devstr19[] = "PEP Touch %x \n"; + void AudioLoad_InitSampleDmaBuffers(s32 numNotes) { s32 i; u8* dma; @@ -632,8 +631,6 @@ void AudioLoad_RelocateFont(s32 fontId, u32 fontBaseAddr, void* relocData) { gSoundFontList[fontId].instruments = (u32) &fontDataPtrs[1]; } -static char D_800C50F4[] = "FastCopy"; - void AudioLoad_SyncDma(u32 devAddr, u8* ramAddr, u32 size, s32 medium) { size = ALIGN16(size); osInvalDCache(ramAddr, size); @@ -641,14 +638,14 @@ void AudioLoad_SyncDma(u32 devAddr, u8* ramAddr, u32 size, s32 medium) { if (size < 0x400) { break; } - AudioLoad_Dma(&gSyncDmaIoMsg, 1, 0, devAddr, ramAddr, 0x400, &gSyncDmaQueue, medium, D_800C50E8); + AudioLoad_Dma(&gSyncDmaIoMsg, 1, 0, devAddr, ramAddr, 0x400, &gSyncDmaQueue, medium, "FastCopy"); MQ_WAIT_FOR_MESG(&gSyncDmaQueue, NULL); size -= 0x400; devAddr += 0x400; ramAddr += 0x400; } if (size != 0) { - AudioLoad_Dma(&gSyncDmaIoMsg, 1, 0, devAddr, ramAddr, size, &gSyncDmaQueue, medium, D_800C50F4); + AudioLoad_Dma(&gSyncDmaIoMsg, 1, 0, devAddr, ramAddr, size, &gSyncDmaQueue, medium, "FastCopy"); MQ_WAIT_FOR_MESG(&gSyncDmaQueue, NULL); } } @@ -660,11 +657,11 @@ void AudioLoad_SyncDmaUnkMedium(u32 devAddr, u8* ramAddr, u32 size, s32 unkMediu func_8000FC8C(func_8000FC7C(unkMediumParam, &addr), addr, ramAddr, size); } -static char devstr22[] = "Error: Cannot DMA Media [%d]\n"; -static char devstr23[] = "Warning: size not align 16 %x (%s)\n"; -static char devstr24[] = "Load Bank BG, Type %d , ID %d\n"; -static char devstr25[] = "get auto\n"; -static char devstr26[] = "get s-auto %x\n"; +static const char devstr22[] = "Error: Cannot DMA Media [%d]\n"; +static const char devstr23[] = "Warning: size not align 16 %x (%s)\n"; +static const char devstr24[] = "Load Bank BG, Type %d , ID %d\n"; +static const char devstr25[] = "get auto\n"; +static const char devstr26[] = "get s-auto %x\n"; s32 AudioLoad_Dma(OSIoMesg* mesg, u32 priority, s32 direction, u32 devAddr, void* ramAddr, u32 size, OSMesgQueue* retQueue, s32 medium, const char* dmaType) { @@ -805,17 +802,17 @@ void AudioLoad_ProcessLoads(s32 resetStatus) { AudioLoad_ProcessAsyncLoads(resetStatus); } -static char devstr27[] = "Clear Workarea %x -%x size %x \n"; -static char devstr28[] = "AudioHeap is %x\n"; -static char devstr29[] = "Heap reset.Synth Change %x \n"; -static char devstr30[] = "Heap %x %x %x\n"; -static char devstr31[] = "Main Heap Initialize.\n"; -static char devstr32[] = "%d :WaveA %d WaveB %d Inst %d,Perc %d\n"; -static char devstr33[] = "---------- Init Completed. ------------\n"; -static char devstr34[] = " Syndrv :[%6d]\n"; -static char devstr35[] = " Seqdrv :[%6d]\n"; -static char devstr36[] = " audiodata :[%6d]\n"; -static char devstr37[] = "---------------------------------------\n"; +static const char devstr27[] = "Clear Workarea %x -%x size %x \n"; +static const char devstr28[] = "AudioHeap is %x\n"; +static const char devstr29[] = "Heap reset.Synth Change %x \n"; +static const char devstr30[] = "Heap %x %x %x\n"; +static const char devstr31[] = "Main Heap Initialize.\n"; +static const char devstr32[] = "%d :WaveA %d WaveB %d Inst %d,Perc %d\n"; +static const char devstr33[] = "---------- Init Completed. ------------\n"; +static const char devstr34[] = " Syndrv :[%6d]\n"; +static const char devstr35[] = " Seqdrv :[%6d]\n"; +static const char devstr36[] = " audiodata :[%6d]\n"; +static const char devstr37[] = "---------------------------------------\n"; void AudioLoad_Init(void) { s32 pad[14]; @@ -903,9 +900,9 @@ void AudioLoad_Init(void) { func_800168BC(); } -static char devstr38[] = "Entry--- %d %d\n"; -static char devstr39[] = "---Block LPS here\n"; -static char devstr40[] = "===Block LPS end\n"; +static const char devstr38[] = "Entry--- %d %d\n"; +static const char devstr39[] = "---Block LPS here\n"; +static const char devstr40[] = "===Block LPS end\n"; s32 AudioLoad_SlowLoadSample(s32 fontId, u8 instId, s8* status) { Sample* sample; AudioSlowLoad* slowLoad; @@ -1025,21 +1022,20 @@ void AudioLoad_ProcessSlowLoads(s32 resetStatus) { } } -static char D_800C52F4[] = "SLOWCOPY"; -static char devstr42[] = "Req: Src %x Dest %x Len %x,media %d,retcode %d\n"; -static char devstr43[] = "Remain Size %d\n"; -static char devstr44[] = "---Block BG here\n"; -static char devstr45[] = "===Block BG end\n"; -static char devstr46[] = "Retcode %x\n"; -static char devstr47[] = "Other Type: Not Write ID.\n"; - void AudioLoad_DmaSlowCopy(AudioSlowLoad* slowLoad, s32 size) { osInvalDCache(slowLoad->curRamAddr, size); osCreateMesgQueue(&slowLoad->mesgQueue, &slowLoad->msg, 1); AudioLoad_Dma(&slowLoad->ioMesg, 0, 0, slowLoad->curDevAddr, slowLoad->curRamAddr, size, &slowLoad->mesgQueue, - slowLoad->medium, D_800C52F4); + slowLoad->medium, "SLOWCOPY"); } +static const char devstr42[] = "Req: Src %x Dest %x Len %x,media %d,retcode %d\n"; +static const char devstr43[] = "Remain Size %d\n"; +static const char devstr44[] = "---Block BG here\n"; +static const char devstr45[] = "===Block BG end\n"; +static const char devstr46[] = "Retcode %x\n"; +static const char devstr47[] = "Other Type: Not Write ID.\n"; + void AudioLoad_DmaSlowCopyUnkMedium(u32 devAddr, u8* ramAddr, u32 size, s32 unkMediumParam) { s32 addr = devAddr; @@ -1184,8 +1180,7 @@ void AudioLoad_ProcessAsyncLoad(AudioAsyncLoad* asyncLoad, s32 resetStatus) { } } -static char devstr48[] = "BGLOAD:Error: dma length 0\n"; -static char D_800C53AC[] = "BGCOPY"; +static const char devstr48[] = "BGLOAD:Error: dma length 0\n"; void AudioLoad_AsyncDma(AudioAsyncLoad* asyncLoad, u32 size) { size = ALIGN16(size); @@ -1193,7 +1188,7 @@ void AudioLoad_AsyncDma(AudioAsyncLoad* asyncLoad, u32 size) { osCreateMesgQueue(&asyncLoad->mesgQueue, &asyncLoad->msg, 1); if (size) {} AudioLoad_Dma(&asyncLoad->ioMesg, 0, 0, asyncLoad->curDevAddr, asyncLoad->curRamAddr, size, &asyncLoad->mesgQueue, - asyncLoad->medium, D_800C53AC); + asyncLoad->medium, "BGCOPY"); } void AudioLoad_AsyncDmaUnkMedium(u32 devAddr, u8* ramAddr, u32 size, s32 unkMediumParam) { @@ -1203,8 +1198,8 @@ void AudioLoad_AsyncDmaUnkMedium(u32 devAddr, u8* ramAddr, u32 size, s32 unkMedi func_8000FC8C(func_8000FC7C(unkMediumParam, &addr), addr, ramAddr, size); } -static char devstr50[] = "Error: Already wavetable is touched %x.\n"; -static char devstr51[] = "Touch Warning: Length zero %x\n"; +static const char devstr50[] = "Error: Already wavetable is touched %x.\n"; +static const char devstr51[] = "Touch Warning: Length zero %x\n"; void AudioLoad_RelocateSample(TunedSample* tSample, u32 fontDataAddr, SampleBankRelocInfo* relocInfo) { void* reloc; @@ -1238,11 +1233,11 @@ void AudioLoad_RelocateSample(TunedSample* tSample, u32 fontDataAddr, SampleBank } } -static char devstr52[] = "It's busy now!!!!! %d\n"; -static char devstr53[] = "BG LOAD BUFFER is OVER.\n"; -static char devstr54[] = "Warning: Length zero %x\n"; -static char devstr55[] = "Wave Load %d \n"; -static char devstr56[] = "Total Bg Wave Load %d \n"; +static const char devstr52[] = "It's busy now!!!!! %d\n"; +static const char devstr53[] = "BG LOAD BUFFER is OVER.\n"; +static const char devstr54[] = "Warning: Length zero %x\n"; +static const char devstr55[] = "Wave Load %d \n"; +static const char devstr56[] = "Total Bg Wave Load %d \n"; s32 AudioLoad_RelocateFontAndPreloadSamples(s32 fontId, u32 fontDataAddr, SampleBankRelocInfo* relocData, s32 isAsync) { s32 i; @@ -1333,15 +1328,15 @@ s32 AudioLoad_RelocateFontAndPreloadSamples(s32 fontId, u32 fontDataAddr, Sample } } -// static char devstr55[] = "Wave Load %d \n"; -// static char devstr56[] = "Total Bg Wave Load %d \n"; -// static char devstr57[] = "Receive %d\n"; +// static const char devstr55[] = "Wave Load %d \n"; +// static const char devstr56[] = "Total Bg Wave Load %d \n"; +// static const char devstr57[] = "Receive %d\n"; -static char devstr57[] = "Receive %d\n"; -static char devstr58[] = "============Error: Magic is Broken after loading.\n"; -static char devstr59[] = "Remain DMA: %d\n"; -static char devstr60[] = "N start %d\n"; -static char devstr61[] = "============Error: Magic is Broken: %x\n"; +static const char devstr57[] = "Receive %d\n"; +static const char devstr58[] = "============Error: Magic is Broken after loading.\n"; +static const char devstr59[] = "Remain DMA: %d\n"; +static const char devstr60[] = "N start %d\n"; +static const char devstr61[] = "============Error: Magic is Broken: %x\n"; s32 AudioLoad_ProcessSamplePreloads(s32 resetStatus) { Sample* sample; @@ -1417,8 +1412,8 @@ s32 AudioLoad_AddToSampleSet(Sample* sample, s32 numSamples, Sample** sampleSet) return numSamples; } -static char devstr62[] = "Error: No Handle.\n"; -static char devstr63[] = "Success: %x\n"; +static const char devstr62[] = "Error: No Handle.\n"; +static const char devstr63[] = "Success: %x\n"; s32 AudioLoad_GetSamplesForFont(s32 fontId, Sample** sampleSet) { s32 i; diff --git a/src/audio/audio_playback.c b/src/audio/audio_playback.c index f6f90dad..a3d49541 100644 --- a/src/audio/audio_playback.c +++ b/src/audio/audio_playback.c @@ -1,37 +1,37 @@ #include "sys.h" #include "sf64audio_provisional.h" -static char devstr00[] = "Audio: setvol: volume minus %f\n"; -static char devstr01[] = "Audio: setvol: volume overflow %f\n"; -static char devstr02[] = "Audio: setpitch: pitch zero or minus %f\n"; -static char devstr03[] = "Audio: voiceman: No bank error %d\n"; -static char devstr04[] = "Audio: voiceman: progNo. overflow %d,%d\n"; -static char devstr05[] = "ptr2 %x\n"; -static char devstr06[] = "Audio: voiceman: progNo. undefined %d,%d\n"; -static char devstr07[] = "Audio: voiceman: No bank error %d\n"; -static char devstr08[] = "Audio: voiceman: Percussion Overflow %d,%d\n"; -static char devstr09[] = "Audio: voiceman: Percussion table pointer (bank %d) is irregular %x.\n"; -static char devstr10[] = "Audio: voiceman: Percpointer NULL %d,%d\n"; -static char devstr11[] = "--4 %x\n"; -static char devstr12[] = "----------------------Double-Error CH: %x %f\n"; -static char devstr13[] = "----------------------Double-Error NT: %x\n"; -static char devstr14[] = "CAUTION:SUB IS SEPARATED FROM GROUP\n"; -static char devstr15[] = "CAUTION:PAUSE EMERGENCY\n"; -static char devstr16[] = "Error:Wait Track disappear\n"; -static char devstr17[] = "NoteOff Comes during wait release %x (note %x)\n"; -static char devstr18[] = "Slow Release Batting\n"; +static const char devstr00[] = "Audio: setvol: volume minus %f\n"; +static const char devstr01[] = "Audio: setvol: volume overflow %f\n"; +static const char devstr02[] = "Audio: setpitch: pitch zero or minus %f\n"; +static const char devstr03[] = "Audio: voiceman: No bank error %d\n"; +static const char devstr04[] = "Audio: voiceman: progNo. overflow %d,%d\n"; +static const char devstr05[] = "ptr2 %x\n"; +static const char devstr06[] = "Audio: voiceman: progNo. undefined %d,%d\n"; +static const char devstr07[] = "Audio: voiceman: No bank error %d\n"; +static const char devstr08[] = "Audio: voiceman: Percussion Overflow %d,%d\n"; +static const char devstr09[] = "Audio: voiceman: Percussion table pointer (bank %d) is irregular %x.\n"; +static const char devstr10[] = "Audio: voiceman: Percpointer NULL %d,%d\n"; +static const char devstr11[] = "--4 %x\n"; +static const char devstr12[] = "----------------------Double-Error CH: %x %f\n"; +static const char devstr13[] = "----------------------Double-Error NT: %x\n"; +static const char devstr14[] = "CAUTION:SUB IS SEPARATED FROM GROUP\n"; +static const char devstr15[] = "CAUTION:PAUSE EMERGENCY\n"; +static const char devstr16[] = "Error:Wait Track disappear\n"; +static const char devstr17[] = "NoteOff Comes during wait release %x (note %x)\n"; +static const char devstr18[] = "Slow Release Batting\n"; u8 sSamplesPerWavePeriod[] = { 64, 32, 16, 8 }; -static char devstr19[] = "Audio:Wavemem: Bad voiceno (%d)\n"; -static char devstr20[] = "Audio: C-Alloc : Dealloc voice is NULL\n"; -static char devstr21[] = "Alloc Error:Dim voice-Alloc %d"; -static char devstr22[] = "Error:Same List Add\n"; -static char devstr23[] = "Already Cut\n"; -static char devstr24[] = "Audio: C-Alloc : lowerPrio is NULL\n"; -static char devstr25[] = "Intterupt UseStop %d (Kill %d)\n"; -static char devstr26[] = "Intterupt RelWait %d (Kill %d)\n"; -static char devstr27[] = "Drop Voice (Prio %x)\n"; +static const char devstr19[] = "Audio:Wavemem: Bad voiceno (%d)\n"; +static const char devstr20[] = "Audio: C-Alloc : Dealloc voice is NULL\n"; +static const char devstr21[] = "Alloc Error:Dim voice-Alloc %d"; +static const char devstr22[] = "Error:Same List Add\n"; +static const char devstr23[] = "Already Cut\n"; +static const char devstr24[] = "Audio: C-Alloc : lowerPrio is NULL\n"; +static const char devstr25[] = "Intterupt UseStop %d (Kill %d)\n"; +static const char devstr26[] = "Intterupt RelWait %d (Kill %d)\n"; +static const char devstr27[] = "Drop Voice (Prio %x)\n"; void func_80011C58(Note* note, f32); void func_8001268C(SequenceLayer* layer); diff --git a/src/audio/audio_seqplayer.c b/src/audio/audio_seqplayer.c index 032c72e7..445bb819 100644 --- a/src/audio/audio_seqplayer.c +++ b/src/audio/audio_seqplayer.c @@ -1,37 +1,37 @@ #include "sys.h" #include "sf64audio_provisional.h" -static char devstr00[] = "Audio:Track:Warning: No Free Notetrack\n"; -static char devstr01[] = "SUBTRACK DIM\n"; -static char devstr02[] = "Audio:Track: Warning :SUBTRACK had been stolen by other Group.\n"; -static char devstr03[] = "SEQID %d,BANKID %d\n"; -static char devstr04[] = "ERR:SUBTRACK %d NOT ALLOCATED\n"; -static char devstr05[] = "Stop Release\n"; -static char devstr06[] = "Error:Same List Add\n"; -static char devstr07[] = "Wait Time out!\n"; -static char devstr08[] = "Macro Level Over Error!\n"; -static char devstr09[] = "Macro Level Over Error!\n"; -static char devstr10[] = "WARNING: NPRG: cannot change %d\n"; -static char devstr11[] = "Audio:Track:NOTE:UNDEFINED NOTE COM. %x\n"; -static char devstr12[] = "Audio: Note:Velocity Error %d\n"; -static char devstr13[] = "Error: Subtrack no prg.\n"; -static char devstr14[] = "ERR %x\n"; -static char devstr15[] = "Error: Your assignchannel is stolen.\n"; -static char devstr16[] = "Audio:Track :Call Macro Level Over Error!\n"; -static char devstr17[] = "Audio:Track :Loops Macro Level Over Error!\n"; -static char devstr18[] = "SUB:ERR:BANK %d NOT CACHED.\n"; -static char devstr19[] = "SUB:ERR:BANK %d NOT CACHED.\n"; -static char devstr20[] = "Audio:Track: CTBLCALL Macro Level Over Error!\n"; -static char devstr21[] = "Set Noise %d\n"; -static char devstr22[] = "[%2x] \n"; -static char devstr23[] = "Err :Sub %x ,address %x:Undefined SubTrack Function %x"; -static char devstr24[] = "VoiceLoad Error Bank:%d,Prog:%d\n"; -static char devstr25[] = "Disappear Sequence or Bank %d\n"; -static char devstr26[] = "[FIN] group.\n"; -static char devstr27[] = "Macro Level Over Error!\n"; -static char devstr28[] = "Macro Level Over Error!\n"; -static char devstr29[] = "Group:Undefine upper C0h command (%x)\n"; -static char devstr30[] = "Group:Undefined Command\n"; +static const char devstr00[] = "Audio:Track:Warning: No Free Notetrack\n"; +static const char devstr01[] = "SUBTRACK DIM\n"; +static const char devstr02[] = "Audio:Track: Warning :SUBTRACK had been stolen by other Group.\n"; +static const char devstr03[] = "SEQID %d,BANKID %d\n"; +static const char devstr04[] = "ERR:SUBTRACK %d NOT ALLOCATED\n"; +static const char devstr05[] = "Stop Release\n"; +static const char devstr06[] = "Error:Same List Add\n"; +static const char devstr07[] = "Wait Time out!\n"; +static const char devstr08[] = "Macro Level Over Error!\n"; +static const char devstr09[] = "Macro Level Over Error!\n"; +static const char devstr10[] = "WARNING: NPRG: cannot change %d\n"; +static const char devstr11[] = "Audio:Track:NOTE:UNDEFINED NOTE COM. %x\n"; +static const char devstr12[] = "Audio: Note:Velocity Error %d\n"; +static const char devstr13[] = "Error: Subtrack no prg.\n"; +static const char devstr14[] = "ERR %x\n"; +static const char devstr15[] = "Error: Your assignchannel is stolen.\n"; +static const char devstr16[] = "Audio:Track :Call Macro Level Over Error!\n"; +static const char devstr17[] = "Audio:Track :Loops Macro Level Over Error!\n"; +static const char devstr18[] = "SUB:ERR:BANK %d NOT CACHED.\n"; +static const char devstr19[] = "SUB:ERR:BANK %d NOT CACHED.\n"; +static const char devstr20[] = "Audio:Track: CTBLCALL Macro Level Over Error!\n"; +static const char devstr21[] = "Set Noise %d\n"; +static const char devstr22[] = "[%2x] \n"; +static const char devstr23[] = "Err :Sub %x ,address %x:Undefined SubTrack Function %x"; +static const char devstr24[] = "VoiceLoad Error Bank:%d,Prog:%d\n"; +static const char devstr25[] = "Disappear Sequence or Bank %d\n"; +static const char devstr26[] = "[FIN] group.\n"; +static const char devstr27[] = "Macro Level Over Error!\n"; +static const char devstr28[] = "Macro Level Over Error!\n"; +static const char devstr29[] = "Group:Undefine upper C0h command (%x)\n"; +static const char devstr30[] = "Group:Undefined Command\n"; void func_800145BC(AudioListItem* list, AudioListItem* item); void* func_800145FC(AudioListItem* list); diff --git a/src/audio/audio_synthesis.c b/src/audio/audio_synthesis.c index d97fb40e..4411bc76 100644 --- a/src/audio/audio_synthesis.c +++ b/src/audio/audio_synthesis.c @@ -16,16 +16,16 @@ f32 D_80146D68; f32 D_80146D6C; f32 D_80146D70; -static char devstr0[] = "Table Remake\n"; -static char devstr1[] = "-------------------Undefined Ctype \n"; -static char devstr2[] = "Error? Limit OVER %d in %d\n"; -static char devstr3[] = ""; -static char devstr4[] = "Get %x %x\n"; -static char devstr5[] = "Break %x %d %d \n"; -static char devstr6[] = "Terminate-Canceled Channel %d,Phase %d\n"; -static char devstr7[] = "S->W\n"; -static char devstr8[] = "W->S\n"; -static char devstr9[] = "S-Resample Pitch %x (old %d -> delay %d)\n"; +static const char devstr0[] = "Table Remake\n"; +static const char devstr1[] = "-------------------Undefined Ctype \n"; +static const char devstr2[] = "Error? Limit OVER %d in %d\n"; +static const char devstr3[] = ""; +static const char devstr4[] = "Get %x %x\n"; +static const char devstr5[] = "Break %x %d %d \n"; +static const char devstr6[] = "Terminate-Canceled Channel %d,Phase %d\n"; +static const char devstr7[] = "S->W\n"; +static const char devstr8[] = "W->S\n"; +static const char devstr9[] = "S-Resample Pitch %x (old %d -> delay %d)\n"; void func_80009A2C(s32 updateIndex, s32 noteIndex); void func_80009AAC(s32 updateIndex); diff --git a/src/engine/fox_852F0.c b/src/engine/fox_blur.c similarity index 90% rename from src/engine/fox_852F0.c rename to src/engine/fox_blur.c index 3444511a..c78679b9 100644 --- a/src/engine/fox_852F0.c +++ b/src/engine/fox_blur.c @@ -1,6 +1,12 @@ #include "global.h" -void func_800846F0(FrameBuffer* arg0) { +/* + * File: fox_blur.c + * System: Blur + * Description: Some unused blurring code. + */ + +void func_blur_800846F0(FrameBuffer* arg0) { s32 i; s32 j; u16* var_v0; diff --git a/src/engine/fox_97F80.c b/src/engine/fox_col1.c similarity index 100% rename from src/engine/fox_97F80.c rename to src/engine/fox_col1.c diff --git a/src/engine/fox_A4290.c b/src/engine/fox_col2.c similarity index 99% rename from src/engine/fox_A4290.c rename to src/engine/fox_col2.c index 82088912..6d75b7fc 100644 --- a/src/engine/fox_A4290.c +++ b/src/engine/fox_col2.c @@ -1,6 +1,6 @@ #include "global.h" -#include "fox_A4290_colheaders.c" +#include "fox_colheaders.c" bool func_col2_800A36FC(Vec3f* objPos, Vec3f* colliderPos, CollisionHeader2* colHeader, Vec3f* hitDataOut); bool func_col2_800A3A74(Vec3f* point, Vec3f** tri, Vec3f* normOut); diff --git a/src/engine/fox_A4290_colheaders.c b/src/engine/fox_colheaders.c similarity index 100% rename from src/engine/fox_A4290_colheaders.c rename to src/engine/fox_colheaders.c diff --git a/src/engine/fox_game.c b/src/engine/fox_game.c index c46a9b24..cffc4ae4 100644 --- a/src/engine/fox_game.c +++ b/src/engine/fox_game.c @@ -199,63 +199,66 @@ void Game_InitFullViewport(void) { } void Game_InitViewport(Gfx** dList, u8 camCount, u8 camIndex) { - if ((camCount != 1) && (camCount == 4)) { - switch (camIndex) { - case 0: - gViewport->vp.vscale[0] = SCREEN_WIDTH * (gVsViewScale - 1.0f) * 2; - gViewport->vp.vscale[1] = SCREEN_HEIGHT * (gVsViewScale - 1.0f) * 2; - gViewport->vp.vscale[2] = G_MAXZ / 2; - gViewport->vp.vscale[3] = 0; - gViewport->vp.vtrans[0] = SCREEN_WIDTH * (2.0f - gVsViewScale) * 2; - gViewport->vp.vtrans[1] = SCREEN_HEIGHT * (2.0f - gVsViewScale) * 2; - gViewport->vp.vtrans[2] = G_MAXZ / 2; - gViewport->vp.vtrans[3] = 0; - gDPSetScissor((*dList)++, G_SC_NON_INTERLACE, SCREEN_MARGIN, SCREEN_MARGIN, SCREEN_WIDTH / 2, - SCREEN_HEIGHT / 2); - break; - case 1: - gViewport->vp.vscale[0] = SCREEN_WIDTH * (gVsViewScale - 1.0f) * 2; - gViewport->vp.vscale[1] = SCREEN_HEIGHT * (gVsViewScale - 1.0f) * 2; - gViewport->vp.vscale[2] = G_MAXZ / 2; - gViewport->vp.vscale[3] = 0; - gViewport->vp.vtrans[0] = SCREEN_WIDTH * gVsViewScale * 2; - gViewport->vp.vtrans[1] = SCREEN_HEIGHT * (2.0f - gVsViewScale) * 2; - gViewport->vp.vtrans[2] = G_MAXZ / 2; - gViewport->vp.vtrans[3] = 0; - gDPSetScissor((*dList)++, G_SC_NON_INTERLACE, SCREEN_WIDTH / 2, SCREEN_MARGIN, - SCREEN_WIDTH - SCREEN_MARGIN, SCREEN_HEIGHT / 2); - break; - case 2: - gViewport->vp.vscale[0] = SCREEN_WIDTH * (gVsViewScale - 1.0f) * 2; - gViewport->vp.vscale[1] = SCREEN_HEIGHT * (gVsViewScale - 1.0f) * 2; - gViewport->vp.vscale[2] = G_MAXZ / 2; - gViewport->vp.vscale[3] = 0; - gViewport->vp.vtrans[0] = SCREEN_WIDTH * (2.0f - gVsViewScale) * 2; - gViewport->vp.vtrans[1] = SCREEN_HEIGHT * gVsViewScale * 2; - gViewport->vp.vtrans[2] = G_MAXZ / 2; - gViewport->vp.vtrans[3] = 0; - gDPSetScissor((*dList)++, G_SC_NON_INTERLACE, SCREEN_MARGIN, SCREEN_HEIGHT / 2, SCREEN_WIDTH / 2, - SCREEN_HEIGHT - SCREEN_MARGIN); - break; - case 3: - gViewport->vp.vscale[0] = SCREEN_WIDTH * (gVsViewScale - 1.0f) * 2; - gViewport->vp.vscale[1] = SCREEN_HEIGHT * (gVsViewScale - 1.0f) * 2; - gViewport->vp.vscale[2] = G_MAXZ / 2; - gViewport->vp.vscale[3] = 0; - gViewport->vp.vtrans[0] = SCREEN_WIDTH * gVsViewScale * 2; - gViewport->vp.vtrans[1] = SCREEN_HEIGHT * gVsViewScale * 2; - gViewport->vp.vtrans[2] = G_MAXZ / 2; - gViewport->vp.vtrans[3] = 0; - gDPSetScissor((*dList)++, G_SC_NON_INTERLACE, SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2, - SCREEN_WIDTH - SCREEN_MARGIN, SCREEN_HEIGHT - SCREEN_MARGIN); - break; - default: - Game_InitFullViewport(); - break; - } - } else { - Game_InitFullViewport(); - if (1) {} + switch (camCount) { + case 4: + switch (camIndex) { + case 0: + gViewport->vp.vscale[0] = SCREEN_WIDTH * (gVsViewScale - 1.0f) * 2; + gViewport->vp.vscale[1] = SCREEN_HEIGHT * (gVsViewScale - 1.0f) * 2; + gViewport->vp.vscale[2] = G_MAXZ / 2; + gViewport->vp.vscale[3] = 0; + gViewport->vp.vtrans[0] = SCREEN_WIDTH * (2.0f - gVsViewScale) * 2; + gViewport->vp.vtrans[1] = SCREEN_HEIGHT * (2.0f - gVsViewScale) * 2; + gViewport->vp.vtrans[2] = G_MAXZ / 2; + gViewport->vp.vtrans[3] = 0; + gDPSetScissor((*dList)++, G_SC_NON_INTERLACE, SCREEN_MARGIN, SCREEN_MARGIN, SCREEN_WIDTH / 2, + SCREEN_HEIGHT / 2); + break; + case 1: + gViewport->vp.vscale[0] = SCREEN_WIDTH * (gVsViewScale - 1.0f) * 2; + gViewport->vp.vscale[1] = SCREEN_HEIGHT * (gVsViewScale - 1.0f) * 2; + gViewport->vp.vscale[2] = G_MAXZ / 2; + gViewport->vp.vscale[3] = 0; + gViewport->vp.vtrans[0] = SCREEN_WIDTH * gVsViewScale * 2; + gViewport->vp.vtrans[1] = SCREEN_HEIGHT * (2.0f - gVsViewScale) * 2; + gViewport->vp.vtrans[2] = G_MAXZ / 2; + gViewport->vp.vtrans[3] = 0; + gDPSetScissor((*dList)++, G_SC_NON_INTERLACE, SCREEN_WIDTH / 2, SCREEN_MARGIN, + SCREEN_WIDTH - SCREEN_MARGIN, SCREEN_HEIGHT / 2); + break; + case 2: + gViewport->vp.vscale[0] = SCREEN_WIDTH * (gVsViewScale - 1.0f) * 2; + gViewport->vp.vscale[1] = SCREEN_HEIGHT * (gVsViewScale - 1.0f) * 2; + gViewport->vp.vscale[2] = G_MAXZ / 2; + gViewport->vp.vscale[3] = 0; + gViewport->vp.vtrans[0] = SCREEN_WIDTH * (2.0f - gVsViewScale) * 2; + gViewport->vp.vtrans[1] = SCREEN_HEIGHT * gVsViewScale * 2; + gViewport->vp.vtrans[2] = G_MAXZ / 2; + gViewport->vp.vtrans[3] = 0; + gDPSetScissor((*dList)++, G_SC_NON_INTERLACE, SCREEN_MARGIN, SCREEN_HEIGHT / 2, SCREEN_WIDTH / 2, + SCREEN_HEIGHT - SCREEN_MARGIN); + break; + case 3: + gViewport->vp.vscale[0] = SCREEN_WIDTH * (gVsViewScale - 1.0f) * 2; + gViewport->vp.vscale[1] = SCREEN_HEIGHT * (gVsViewScale - 1.0f) * 2; + gViewport->vp.vscale[2] = G_MAXZ / 2; + gViewport->vp.vscale[3] = 0; + gViewport->vp.vtrans[0] = SCREEN_WIDTH * gVsViewScale * 2; + gViewport->vp.vtrans[1] = SCREEN_HEIGHT * gVsViewScale * 2; + gViewport->vp.vtrans[2] = G_MAXZ / 2; + gViewport->vp.vtrans[3] = 0; + gDPSetScissor((*dList)++, G_SC_NON_INTERLACE, SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2, + SCREEN_WIDTH - SCREEN_MARGIN, SCREEN_HEIGHT - SCREEN_MARGIN); + break; + default: + Game_InitFullViewport(); + break; + } + break; + case 1: + default: + Game_InitFullViewport(); + break; } gSPViewport((*dList)++, gViewport++); } @@ -289,7 +292,7 @@ void Game_Draw(s32 playerNum) { break; case DRAW_UNK_7: gPlayerNum = playerNum; - func_800A3CA0(); + func_pause_800A3CA0(); break; case DRAW_ENDING: Background_DrawStarfield(); @@ -570,28 +573,7 @@ void Game_Update(void) { } Wipe_Draw(WIPE_CIRCULAR, gCircleWipeFrame); - // { - // static mode = 0; - // if(gControllerPress[gMainController].button & L_TRIG) { - // mode = 1 - mode; - // } - // if(gControllerHold[gMainController].button & L_TRIG) { - // if(mode) { - // gCircleWipeFrame++; - // } else { - // gCircleWipeFrame--; - // } - // if(gCircleWipeFrame > 41) { - // gCircleWipeFrame = 41; - // } else if (gCircleWipeFrame < 0) { - // gCircleWipeFrame = 0; - // } - // } - // RCP_SetupDL(&gMasterDisp, 0x53); - // gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); - // Graphics_Printf("FADE PROGRESS: %d", gCircleWipeFrame); - // Graphics_DisplaySmallText(14, 9, 1.0f, 1.0f, D_801619A0); - // } + if (!partialFill) { Graphics_FillRectangle(&gMasterDisp, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, gFillScreenRed, gFillScreenGreen, gFillScreenBlue, gFillScreenAlpha); diff --git a/src/engine/fox_A48A0.c b/src/engine/fox_pause.c similarity index 89% rename from src/engine/fox_A48A0.c rename to src/engine/fox_pause.c index acda833b..ee7de964 100644 --- a/src/engine/fox_A48A0.c +++ b/src/engine/fox_pause.c @@ -1,6 +1,12 @@ #include "global.h" -void func_800A3CA0(void) { +/* + * File: fox_pause.c + * System: Pause + * Description: Some unused pause code. + */ + +void func_pause_800A3CA0(void) { Matrix_Push(&gGfxMatrix); Matrix_LookAt(gGfxMatrix, gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ, 0.0f, 1.0f, 0.0f, MTXF_APPLY); @@ -9,10 +15,11 @@ void func_800A3CA0(void) { Matrix_RotateX(gGfxMatrix, gControllerPress[gPlayerNum].stick_y * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL_23(); + // Missing DList Matrix_Pop(&gGfxMatrix); } -void func_800A3E00(void) { +void func_pause_800A3E00(void) { switch (D_ctx_80177868) { case 0: if (gNextGameStateTimer == 0) { diff --git a/src/sys/sys_main.c b/src/sys/sys_main.c index 470ed83c..b1b3b2c5 100644 --- a/src/sys/sys_main.c +++ b/src/sys/sys_main.c @@ -271,10 +271,13 @@ void Graphics_ThreadEntry(void* arg0) { gSPEndDisplayList(gMasterDisp++); } MQ_WAIT_FOR_MESG(&gGfxTaskMesgQueue, NULL); + Graphics_SetTask(); - if (gFillScreen == 0) { + + if (!gFillScreen) { osViSwapBuffer(&gFrameBuffers[(gSysFrameCount - 1) % 3]); } + Fault_SetFrameBuffer(&gFrameBuffers[(gSysFrameCount - 1) % 3], SCREEN_WIDTH, 16); visPerFrame = MIN(gVIsPerFrame, 4); diff --git a/yamls/jp/rev0/main.yaml b/yamls/jp/rev0/main.yaml index 35bd9c30..5a107e16 100644 --- a/yamls/jp/rev0/main.yaml +++ b/yamls/jp/rev0/main.yaml @@ -6,7 +6,6 @@ - {start: 0x40, type: textbin, name: ipl3} - {start: 0x1000, type: asm, vram: 0x80000400, name: entry} - - name: main type: code start: 0x1050 @@ -136,13 +135,13 @@ - [0x68190, c, engine/fox_enmy2] - [0x74BE0, c, engine/fox_effect] - [0x81D10, c, engine/fox_fade] - - [0x82090, c, engine/fox_852F0] + - [0x82090, c, engine/fox_blur] - [0x822D0, c, engine/fox_hud] - - [0x94EA0, c, engine/fox_97F80] + - [0x94EA0, c, engine/fox_col1] - [0x974A0, c, engine/fox_std_lib] - [0x9F480, c, engine/fox_game] - - [0xA1250, c, engine/fox_A4290] - - [0xA1860, c, engine/fox_A48A0] + - [0xA1250, c, engine/fox_col2] + - [0xA1860, c, engine/fox_pause] - [0xA1B10, c, engine/fox_play] - [0xB69E0, c, engine/fox_rcp] - [0xB8370, c, engine/fox_radio] @@ -216,7 +215,7 @@ - [0xCF110, data, engine/fox_hud] - [0xCFD60, data, engine/fox_std_lib] - [0xD0160, data, engine/fox_game] - - [0xD0220, data, engine/fox_A4290] + - [0xD0220, data, engine/fox_col2] - [0xD0850, data, engine/fox_play] - [0xD0A80, data, engine/fox_context] - [0xD0AB0, data, engine/fox_rcp] @@ -241,11 +240,11 @@ - [0xDDE20, .rodata, engine/fox_effect] - [0xDE2E0, .rodata, engine/fox_fade] - [0xDE310, .rodata, engine/fox_hud] - - [0xDECB0, .rodata, engine/fox_97F80] + - [0xDECB0, .rodata, engine/fox_col1] - [0xDECC0, .rodata, engine/fox_std_lib] - [0xDED20, .rodata, engine/fox_game] - - [0xDEDA0, .rodata, engine/fox_A4290] - - [0xDEDB0, .rodata, engine/fox_A48A0] + - [0xDEDA0, .rodata, engine/fox_col2] + - [0xDEDB0, .rodata, engine/fox_pause] - [0xDEDC0, .rodata, engine/fox_play] - [0xDF6C0, .rodata, engine/fox_radio] - [0xDFD20, .rodata, engine/fox_versus] diff --git a/yamls/us/rev1/main.yaml b/yamls/us/rev1/main.yaml index c0d64ff7..d570589c 100644 --- a/yamls/us/rev1/main.yaml +++ b/yamls/us/rev1/main.yaml @@ -6,7 +6,6 @@ - {start: 0x40, type: textbin, name: ipl3} - {start: 0x1000, type: asm, vram: 0x80000400, name: entry} - - name: main type: code start: 0x1050 @@ -189,13 +188,13 @@ - [0x6B3B0, c, engine/fox_enmy2] - [0x77E40, c, engine/fox_effect] - [0x84F70, c, engine/fox_fade] - - [0x852F0, c, engine/fox_852F0] + - [0x852F0, c, engine/fox_blur] - [0x85530, c, engine/fox_hud] - - [0x97F80, c, engine/fox_97F80] + - [0x97F80, c, engine/fox_col1] - [0x9A580, c, engine/fox_std_lib] - [0xA24B0, c, engine/fox_game] - - [0xA4290, c, engine/fox_A4290] - - [0xA48A0, c, engine/fox_A48A0] + - [0xA4290, c, engine/fox_col2] + - [0xA48A0, c, engine/fox_pause] - [0xA4B50, c, engine/fox_play] - [0xB99D0, c, engine/fox_rcp] - [0xBB360, c, engine/fox_radio] @@ -297,7 +296,7 @@ - [0xD2570, .data, engine/fox_hud] - [0xD31D0, .data, engine/fox_std_lib] - [0xD3460, .data, engine/fox_game] - - [0xD3520, .data, engine/fox_A4290] + - [0xD3520, .data, engine/fox_col2] - [0xD3B50, .data, engine/fox_play] - [0xD3D80, .data, engine/fox_context] - [0xD3DB0, .data, engine/fox_rcp] @@ -321,11 +320,11 @@ - [0xD7E30, .rodata, engine/fox_effect] - [0xD82F0, .rodata, engine/fox_fade] - [0xD8320, .rodata, engine/fox_hud] - - [0xD8DE0, .rodata, engine/fox_97F80] + - [0xD8DE0, .rodata, engine/fox_col1] - [0xD8DF0, .rodata, engine/fox_std_lib] - [0xD8E50, .rodata, engine/fox_game] - - [0xD8ED0, .rodata, engine/fox_A4290] - - [0xD8EE0, .rodata, engine/fox_A48A0] + - [0xD8ED0, .rodata, engine/fox_col2] + - [0xD8EE0, .rodata, engine/fox_pause] - [0xD8EF0, .rodata, engine/fox_play] - [0xD97F0, .rodata, engine/fox_radio] - [0xD9E50, .rodata, engine/fox_versus] @@ -391,7 +390,7 @@ - { type: .bss, vram: 0x80161670, name: engine/fox_enmy } - { type: .bss, vram: 0x80161690, name: engine/fox_enmy2 } - { type: .bss, vram: 0x801616A0, name: engine/fox_hud } - - { type: .bss, vram: 0x80161950, name: engine/fox_97F80 } + - { type: .bss, vram: 0x80161950, name: engine/fox_col1 } - { type: .bss, vram: 0x801619A0, name: engine/fox_std_lib } - { type: .bss, vram: 0x80161A10, name: engine/fox_game } - { type: .bss, vram: 0x80161A50, name: engine/fox_play } From cf786a6c155a69c7aa582dd0878206e396a7e592 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Tue, 14 May 2024 11:46:46 -0300 Subject: [PATCH 086/151] update clean recipe to handle versions --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 61e21933..ca7a253b 100644 --- a/Makefile +++ b/Makefile @@ -444,11 +444,11 @@ assets: clean: rm -f torch.hash.yml @git clean -fdx asm/$(VERSION) - @git clean -fdx bin/ - @git clean -fdx build/ + @git clean -fdx bin/$(VERSION) + @git clean -fdx build/$(VERSION) @git clean -fdx src/assets/ @git clean -fdx include/assets/ - @git clean -fdx linker_scripts/$(REV)/*.ld + @git clean -fdx linker_scripts/$(VERSION)/$(REV)/*.ld format: @$(PYTHON) $(TOOLS)/format.py -j $(N_THREADS) From 95fdcdfbb3386d8075b462389091cd6947d49144 Mon Sep 17 00:00:00 2001 From: Lywx Date: Tue, 14 May 2024 10:36:40 -0600 Subject: [PATCH 087/151] Splitted yamls into versions (#246) --- assets/yaml/{us => jp/rev0}/ast_7_ti_1.yaml | 0 assets/yaml/{us => jp/rev0}/ast_7_ti_2.yaml | 0 assets/yaml/{us => jp/rev0}/ast_8_ti.yaml | 0 assets/yaml/{us => jp/rev0}/ast_9_ti.yaml | 0 assets/yaml/{us => jp/rev0}/ast_A_ti.yaml | 0 assets/yaml/{us => jp/rev0}/ast_allies.yaml | 0 assets/yaml/{us => jp/rev0}/ast_andross.yaml | 0 assets/yaml/{us => jp/rev0}/ast_aquas.yaml | 0 assets/yaml/{us => jp/rev0}/ast_area_6.yaml | 0 assets/yaml/{us => jp/rev0}/ast_arwing.yaml | 0 .../yaml/{us => jp/rev0}/ast_bg_planet.yaml | 0 assets/yaml/{us => jp/rev0}/ast_bg_space.yaml | 0 .../yaml/{us => jp/rev0}/ast_blue_marine.yaml | 0 assets/yaml/{us => jp/rev0}/ast_bolse.yaml | 0 assets/yaml/{us => jp/rev0}/ast_common.yaml | 0 assets/yaml/{us => jp/rev0}/ast_corneria.yaml | 0 assets/yaml/{us => jp/rev0}/ast_ending.yaml | 0 .../rev0}/ast_ending_award_back.yaml | 0 .../rev0}/ast_ending_award_front.yaml | 0 .../{us => jp/rev0}/ast_ending_expert.yaml | 0 .../yaml/{us => jp/rev0}/ast_enmy_planet.yaml | 0 .../yaml/{us => jp/rev0}/ast_enmy_space.yaml | 0 assets/yaml/{us => jp/rev0}/ast_font_3d.yaml | 0 assets/yaml/{us => jp/rev0}/ast_fortuna.yaml | 0 .../yaml/{us => jp/rev0}/ast_great_fox.yaml | 0 assets/yaml/{us => jp/rev0}/ast_katina.yaml | 0 .../yaml/{us => jp/rev0}/ast_landmaster.yaml | 0 assets/yaml/{us => jp/rev0}/ast_logo.yml | 0 assets/yaml/{us => jp/rev0}/ast_macbeth.yaml | 0 assets/yaml/{us => jp/rev0}/ast_map.yaml | 0 assets/yaml/{us => jp/rev0}/ast_meteo.yaml | 0 assets/yaml/{us => jp/rev0}/ast_option.yaml | 0 assets/yaml/{us => jp/rev0}/ast_radio.yaml | 0 assets/yaml/{us => jp/rev0}/ast_sector_x.yaml | 0 assets/yaml/{us => jp/rev0}/ast_sector_y.yaml | 0 assets/yaml/{us => jp/rev0}/ast_sector_z.yaml | 0 assets/yaml/{us => jp/rev0}/ast_solar.yaml | 0 .../yaml/{us => jp/rev0}/ast_star_wolf.yaml | 0 assets/yaml/{us => jp/rev0}/ast_text.yaml | 0 assets/yaml/{us => jp/rev0}/ast_titania.yaml | 0 assets/yaml/{us => jp/rev0}/ast_title.yaml | 0 assets/yaml/{us => jp/rev0}/ast_training.yaml | 0 assets/yaml/{us => jp/rev0}/ast_ve1_boss.yaml | 0 assets/yaml/{us => jp/rev0}/ast_venom_1.yaml | 0 assets/yaml/{us => jp/rev0}/ast_venom_2.yaml | 0 assets/yaml/{us => jp/rev0}/ast_versus.yaml | 0 assets/yaml/{us => jp/rev0}/ast_vs_menu.yaml | 0 .../yaml/{us => jp/rev0}/ast_warp_zone.yaml | 0 assets/yaml/{us => jp/rev0}/ast_zoness.yaml | 0 assets/yaml/us/rev1/ast_7_ti_1.yaml | 269 +++++ assets/yaml/us/rev1/ast_7_ti_2.yaml | 71 ++ assets/yaml/us/rev1/ast_8_ti.yaml | 66 ++ assets/yaml/us/rev1/ast_9_ti.yaml | 68 ++ assets/yaml/us/rev1/ast_A_ti.yaml | 61 ++ assets/yaml/us/rev1/ast_allies.yaml | 113 ++ assets/yaml/us/rev1/ast_andross.yaml | 272 +++++ assets/yaml/us/rev1/ast_aquas.yaml | 777 ++++++++++++++ assets/yaml/us/rev1/ast_area_6.yaml | 253 +++++ assets/yaml/us/rev1/ast_arwing.yaml | 192 ++++ assets/yaml/us/rev1/ast_bg_planet.yaml | 129 +++ assets/yaml/us/rev1/ast_bg_space.yaml | 93 ++ assets/yaml/us/rev1/ast_blue_marine.yaml | 90 ++ assets/yaml/us/rev1/ast_bolse.yaml | 200 ++++ assets/yaml/us/rev1/ast_common.yaml | 987 ++++++++++++++++++ assets/yaml/us/rev1/ast_corneria.yaml | 589 +++++++++++ assets/yaml/us/rev1/ast_ending.yaml | 125 +++ .../yaml/us/rev1/ast_ending_award_back.yaml | 13 + .../yaml/us/rev1/ast_ending_award_front.yaml | 12 + assets/yaml/us/rev1/ast_ending_expert.yaml | 15 + assets/yaml/us/rev1/ast_enmy_planet.yaml | 112 ++ assets/yaml/us/rev1/ast_enmy_space.yaml | 134 +++ assets/yaml/us/rev1/ast_font_3d.yaml | 128 +++ assets/yaml/us/rev1/ast_fortuna.yaml | 183 ++++ assets/yaml/us/rev1/ast_great_fox.yaml | 93 ++ assets/yaml/us/rev1/ast_katina.yaml | 179 ++++ assets/yaml/us/rev1/ast_landmaster.yaml | 78 ++ assets/yaml/us/rev1/ast_logo.yml | 18 + assets/yaml/us/rev1/ast_macbeth.yaml | 938 +++++++++++++++++ assets/yaml/us/rev1/ast_map.yaml | 574 ++++++++++ assets/yaml/us/rev1/ast_meteo.yaml | 320 ++++++ assets/yaml/us/rev1/ast_option.yaml | 249 +++++ assets/yaml/us/rev1/ast_radio.yaml | 101 ++ assets/yaml/us/rev1/ast_sector_x.yaml | 298 ++++++ assets/yaml/us/rev1/ast_sector_y.yaml | 362 +++++++ assets/yaml/us/rev1/ast_sector_z.yaml | 172 +++ assets/yaml/us/rev1/ast_solar.yaml | 227 ++++ assets/yaml/us/rev1/ast_star_wolf.yaml | 102 ++ assets/yaml/us/rev1/ast_text.yaml | 421 ++++++++ assets/yaml/us/rev1/ast_titania.yaml | 188 ++++ assets/yaml/us/rev1/ast_title.yaml | 263 +++++ assets/yaml/us/rev1/ast_training.yaml | 88 ++ assets/yaml/us/rev1/ast_ve1_boss.yaml | 243 +++++ assets/yaml/us/rev1/ast_venom_1.yaml | 182 ++++ assets/yaml/us/rev1/ast_venom_2.yaml | 205 ++++ assets/yaml/us/rev1/ast_versus.yaml | 763 ++++++++++++++ assets/yaml/us/rev1/ast_vs_menu.yaml | 207 ++++ assets/yaml/us/rev1/ast_warp_zone.yaml | 42 + assets/yaml/us/rev1/ast_zoness.yaml | 566 ++++++++++ config.yml | 26 +- tools/Torch | 2 +- 100 files changed, 11855 insertions(+), 4 deletions(-) rename assets/yaml/{us => jp/rev0}/ast_7_ti_1.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_7_ti_2.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_8_ti.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_9_ti.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_A_ti.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_allies.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_andross.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_aquas.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_area_6.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_arwing.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_bg_planet.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_bg_space.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_blue_marine.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_bolse.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_common.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_corneria.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_ending.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_ending_award_back.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_ending_award_front.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_ending_expert.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_enmy_planet.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_enmy_space.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_font_3d.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_fortuna.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_great_fox.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_katina.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_landmaster.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_logo.yml (100%) rename assets/yaml/{us => jp/rev0}/ast_macbeth.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_map.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_meteo.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_option.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_radio.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_sector_x.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_sector_y.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_sector_z.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_solar.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_star_wolf.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_text.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_titania.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_title.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_training.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_ve1_boss.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_venom_1.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_venom_2.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_versus.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_vs_menu.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_warp_zone.yaml (100%) rename assets/yaml/{us => jp/rev0}/ast_zoness.yaml (100%) create mode 100644 assets/yaml/us/rev1/ast_7_ti_1.yaml create mode 100644 assets/yaml/us/rev1/ast_7_ti_2.yaml create mode 100644 assets/yaml/us/rev1/ast_8_ti.yaml create mode 100644 assets/yaml/us/rev1/ast_9_ti.yaml create mode 100644 assets/yaml/us/rev1/ast_A_ti.yaml create mode 100644 assets/yaml/us/rev1/ast_allies.yaml create mode 100644 assets/yaml/us/rev1/ast_andross.yaml create mode 100644 assets/yaml/us/rev1/ast_aquas.yaml create mode 100644 assets/yaml/us/rev1/ast_area_6.yaml create mode 100644 assets/yaml/us/rev1/ast_arwing.yaml create mode 100644 assets/yaml/us/rev1/ast_bg_planet.yaml create mode 100644 assets/yaml/us/rev1/ast_bg_space.yaml create mode 100644 assets/yaml/us/rev1/ast_blue_marine.yaml create mode 100644 assets/yaml/us/rev1/ast_bolse.yaml create mode 100644 assets/yaml/us/rev1/ast_common.yaml create mode 100644 assets/yaml/us/rev1/ast_corneria.yaml create mode 100644 assets/yaml/us/rev1/ast_ending.yaml create mode 100644 assets/yaml/us/rev1/ast_ending_award_back.yaml create mode 100644 assets/yaml/us/rev1/ast_ending_award_front.yaml create mode 100644 assets/yaml/us/rev1/ast_ending_expert.yaml create mode 100644 assets/yaml/us/rev1/ast_enmy_planet.yaml create mode 100644 assets/yaml/us/rev1/ast_enmy_space.yaml create mode 100644 assets/yaml/us/rev1/ast_font_3d.yaml create mode 100644 assets/yaml/us/rev1/ast_fortuna.yaml create mode 100644 assets/yaml/us/rev1/ast_great_fox.yaml create mode 100644 assets/yaml/us/rev1/ast_katina.yaml create mode 100644 assets/yaml/us/rev1/ast_landmaster.yaml create mode 100644 assets/yaml/us/rev1/ast_logo.yml create mode 100644 assets/yaml/us/rev1/ast_macbeth.yaml create mode 100644 assets/yaml/us/rev1/ast_map.yaml create mode 100644 assets/yaml/us/rev1/ast_meteo.yaml create mode 100644 assets/yaml/us/rev1/ast_option.yaml create mode 100644 assets/yaml/us/rev1/ast_radio.yaml create mode 100644 assets/yaml/us/rev1/ast_sector_x.yaml create mode 100644 assets/yaml/us/rev1/ast_sector_y.yaml create mode 100644 assets/yaml/us/rev1/ast_sector_z.yaml create mode 100644 assets/yaml/us/rev1/ast_solar.yaml create mode 100644 assets/yaml/us/rev1/ast_star_wolf.yaml create mode 100644 assets/yaml/us/rev1/ast_text.yaml create mode 100644 assets/yaml/us/rev1/ast_titania.yaml create mode 100644 assets/yaml/us/rev1/ast_title.yaml create mode 100644 assets/yaml/us/rev1/ast_training.yaml create mode 100644 assets/yaml/us/rev1/ast_ve1_boss.yaml create mode 100644 assets/yaml/us/rev1/ast_venom_1.yaml create mode 100644 assets/yaml/us/rev1/ast_venom_2.yaml create mode 100644 assets/yaml/us/rev1/ast_versus.yaml create mode 100644 assets/yaml/us/rev1/ast_vs_menu.yaml create mode 100644 assets/yaml/us/rev1/ast_warp_zone.yaml create mode 100644 assets/yaml/us/rev1/ast_zoness.yaml diff --git a/assets/yaml/us/ast_7_ti_1.yaml b/assets/yaml/jp/rev0/ast_7_ti_1.yaml similarity index 100% rename from assets/yaml/us/ast_7_ti_1.yaml rename to assets/yaml/jp/rev0/ast_7_ti_1.yaml diff --git a/assets/yaml/us/ast_7_ti_2.yaml b/assets/yaml/jp/rev0/ast_7_ti_2.yaml similarity index 100% rename from assets/yaml/us/ast_7_ti_2.yaml rename to assets/yaml/jp/rev0/ast_7_ti_2.yaml diff --git a/assets/yaml/us/ast_8_ti.yaml b/assets/yaml/jp/rev0/ast_8_ti.yaml similarity index 100% rename from assets/yaml/us/ast_8_ti.yaml rename to assets/yaml/jp/rev0/ast_8_ti.yaml diff --git a/assets/yaml/us/ast_9_ti.yaml b/assets/yaml/jp/rev0/ast_9_ti.yaml similarity index 100% rename from assets/yaml/us/ast_9_ti.yaml rename to assets/yaml/jp/rev0/ast_9_ti.yaml diff --git a/assets/yaml/us/ast_A_ti.yaml b/assets/yaml/jp/rev0/ast_A_ti.yaml similarity index 100% rename from assets/yaml/us/ast_A_ti.yaml rename to assets/yaml/jp/rev0/ast_A_ti.yaml diff --git a/assets/yaml/us/ast_allies.yaml b/assets/yaml/jp/rev0/ast_allies.yaml similarity index 100% rename from assets/yaml/us/ast_allies.yaml rename to assets/yaml/jp/rev0/ast_allies.yaml diff --git a/assets/yaml/us/ast_andross.yaml b/assets/yaml/jp/rev0/ast_andross.yaml similarity index 100% rename from assets/yaml/us/ast_andross.yaml rename to assets/yaml/jp/rev0/ast_andross.yaml diff --git a/assets/yaml/us/ast_aquas.yaml b/assets/yaml/jp/rev0/ast_aquas.yaml similarity index 100% rename from assets/yaml/us/ast_aquas.yaml rename to assets/yaml/jp/rev0/ast_aquas.yaml diff --git a/assets/yaml/us/ast_area_6.yaml b/assets/yaml/jp/rev0/ast_area_6.yaml similarity index 100% rename from assets/yaml/us/ast_area_6.yaml rename to assets/yaml/jp/rev0/ast_area_6.yaml diff --git a/assets/yaml/us/ast_arwing.yaml b/assets/yaml/jp/rev0/ast_arwing.yaml similarity index 100% rename from assets/yaml/us/ast_arwing.yaml rename to assets/yaml/jp/rev0/ast_arwing.yaml diff --git a/assets/yaml/us/ast_bg_planet.yaml b/assets/yaml/jp/rev0/ast_bg_planet.yaml similarity index 100% rename from assets/yaml/us/ast_bg_planet.yaml rename to assets/yaml/jp/rev0/ast_bg_planet.yaml diff --git a/assets/yaml/us/ast_bg_space.yaml b/assets/yaml/jp/rev0/ast_bg_space.yaml similarity index 100% rename from assets/yaml/us/ast_bg_space.yaml rename to assets/yaml/jp/rev0/ast_bg_space.yaml diff --git a/assets/yaml/us/ast_blue_marine.yaml b/assets/yaml/jp/rev0/ast_blue_marine.yaml similarity index 100% rename from assets/yaml/us/ast_blue_marine.yaml rename to assets/yaml/jp/rev0/ast_blue_marine.yaml diff --git a/assets/yaml/us/ast_bolse.yaml b/assets/yaml/jp/rev0/ast_bolse.yaml similarity index 100% rename from assets/yaml/us/ast_bolse.yaml rename to assets/yaml/jp/rev0/ast_bolse.yaml diff --git a/assets/yaml/us/ast_common.yaml b/assets/yaml/jp/rev0/ast_common.yaml similarity index 100% rename from assets/yaml/us/ast_common.yaml rename to assets/yaml/jp/rev0/ast_common.yaml diff --git a/assets/yaml/us/ast_corneria.yaml b/assets/yaml/jp/rev0/ast_corneria.yaml similarity index 100% rename from assets/yaml/us/ast_corneria.yaml rename to assets/yaml/jp/rev0/ast_corneria.yaml diff --git a/assets/yaml/us/ast_ending.yaml b/assets/yaml/jp/rev0/ast_ending.yaml similarity index 100% rename from assets/yaml/us/ast_ending.yaml rename to assets/yaml/jp/rev0/ast_ending.yaml diff --git a/assets/yaml/us/ast_ending_award_back.yaml b/assets/yaml/jp/rev0/ast_ending_award_back.yaml similarity index 100% rename from assets/yaml/us/ast_ending_award_back.yaml rename to assets/yaml/jp/rev0/ast_ending_award_back.yaml diff --git a/assets/yaml/us/ast_ending_award_front.yaml b/assets/yaml/jp/rev0/ast_ending_award_front.yaml similarity index 100% rename from assets/yaml/us/ast_ending_award_front.yaml rename to assets/yaml/jp/rev0/ast_ending_award_front.yaml diff --git a/assets/yaml/us/ast_ending_expert.yaml b/assets/yaml/jp/rev0/ast_ending_expert.yaml similarity index 100% rename from assets/yaml/us/ast_ending_expert.yaml rename to assets/yaml/jp/rev0/ast_ending_expert.yaml diff --git a/assets/yaml/us/ast_enmy_planet.yaml b/assets/yaml/jp/rev0/ast_enmy_planet.yaml similarity index 100% rename from assets/yaml/us/ast_enmy_planet.yaml rename to assets/yaml/jp/rev0/ast_enmy_planet.yaml diff --git a/assets/yaml/us/ast_enmy_space.yaml b/assets/yaml/jp/rev0/ast_enmy_space.yaml similarity index 100% rename from assets/yaml/us/ast_enmy_space.yaml rename to assets/yaml/jp/rev0/ast_enmy_space.yaml diff --git a/assets/yaml/us/ast_font_3d.yaml b/assets/yaml/jp/rev0/ast_font_3d.yaml similarity index 100% rename from assets/yaml/us/ast_font_3d.yaml rename to assets/yaml/jp/rev0/ast_font_3d.yaml diff --git a/assets/yaml/us/ast_fortuna.yaml b/assets/yaml/jp/rev0/ast_fortuna.yaml similarity index 100% rename from assets/yaml/us/ast_fortuna.yaml rename to assets/yaml/jp/rev0/ast_fortuna.yaml diff --git a/assets/yaml/us/ast_great_fox.yaml b/assets/yaml/jp/rev0/ast_great_fox.yaml similarity index 100% rename from assets/yaml/us/ast_great_fox.yaml rename to assets/yaml/jp/rev0/ast_great_fox.yaml diff --git a/assets/yaml/us/ast_katina.yaml b/assets/yaml/jp/rev0/ast_katina.yaml similarity index 100% rename from assets/yaml/us/ast_katina.yaml rename to assets/yaml/jp/rev0/ast_katina.yaml diff --git a/assets/yaml/us/ast_landmaster.yaml b/assets/yaml/jp/rev0/ast_landmaster.yaml similarity index 100% rename from assets/yaml/us/ast_landmaster.yaml rename to assets/yaml/jp/rev0/ast_landmaster.yaml diff --git a/assets/yaml/us/ast_logo.yml b/assets/yaml/jp/rev0/ast_logo.yml similarity index 100% rename from assets/yaml/us/ast_logo.yml rename to assets/yaml/jp/rev0/ast_logo.yml diff --git a/assets/yaml/us/ast_macbeth.yaml b/assets/yaml/jp/rev0/ast_macbeth.yaml similarity index 100% rename from assets/yaml/us/ast_macbeth.yaml rename to assets/yaml/jp/rev0/ast_macbeth.yaml diff --git a/assets/yaml/us/ast_map.yaml b/assets/yaml/jp/rev0/ast_map.yaml similarity index 100% rename from assets/yaml/us/ast_map.yaml rename to assets/yaml/jp/rev0/ast_map.yaml diff --git a/assets/yaml/us/ast_meteo.yaml b/assets/yaml/jp/rev0/ast_meteo.yaml similarity index 100% rename from assets/yaml/us/ast_meteo.yaml rename to assets/yaml/jp/rev0/ast_meteo.yaml diff --git a/assets/yaml/us/ast_option.yaml b/assets/yaml/jp/rev0/ast_option.yaml similarity index 100% rename from assets/yaml/us/ast_option.yaml rename to assets/yaml/jp/rev0/ast_option.yaml diff --git a/assets/yaml/us/ast_radio.yaml b/assets/yaml/jp/rev0/ast_radio.yaml similarity index 100% rename from assets/yaml/us/ast_radio.yaml rename to assets/yaml/jp/rev0/ast_radio.yaml diff --git a/assets/yaml/us/ast_sector_x.yaml b/assets/yaml/jp/rev0/ast_sector_x.yaml similarity index 100% rename from assets/yaml/us/ast_sector_x.yaml rename to assets/yaml/jp/rev0/ast_sector_x.yaml diff --git a/assets/yaml/us/ast_sector_y.yaml b/assets/yaml/jp/rev0/ast_sector_y.yaml similarity index 100% rename from assets/yaml/us/ast_sector_y.yaml rename to assets/yaml/jp/rev0/ast_sector_y.yaml diff --git a/assets/yaml/us/ast_sector_z.yaml b/assets/yaml/jp/rev0/ast_sector_z.yaml similarity index 100% rename from assets/yaml/us/ast_sector_z.yaml rename to assets/yaml/jp/rev0/ast_sector_z.yaml diff --git a/assets/yaml/us/ast_solar.yaml b/assets/yaml/jp/rev0/ast_solar.yaml similarity index 100% rename from assets/yaml/us/ast_solar.yaml rename to assets/yaml/jp/rev0/ast_solar.yaml diff --git a/assets/yaml/us/ast_star_wolf.yaml b/assets/yaml/jp/rev0/ast_star_wolf.yaml similarity index 100% rename from assets/yaml/us/ast_star_wolf.yaml rename to assets/yaml/jp/rev0/ast_star_wolf.yaml diff --git a/assets/yaml/us/ast_text.yaml b/assets/yaml/jp/rev0/ast_text.yaml similarity index 100% rename from assets/yaml/us/ast_text.yaml rename to assets/yaml/jp/rev0/ast_text.yaml diff --git a/assets/yaml/us/ast_titania.yaml b/assets/yaml/jp/rev0/ast_titania.yaml similarity index 100% rename from assets/yaml/us/ast_titania.yaml rename to assets/yaml/jp/rev0/ast_titania.yaml diff --git a/assets/yaml/us/ast_title.yaml b/assets/yaml/jp/rev0/ast_title.yaml similarity index 100% rename from assets/yaml/us/ast_title.yaml rename to assets/yaml/jp/rev0/ast_title.yaml diff --git a/assets/yaml/us/ast_training.yaml b/assets/yaml/jp/rev0/ast_training.yaml similarity index 100% rename from assets/yaml/us/ast_training.yaml rename to assets/yaml/jp/rev0/ast_training.yaml diff --git a/assets/yaml/us/ast_ve1_boss.yaml b/assets/yaml/jp/rev0/ast_ve1_boss.yaml similarity index 100% rename from assets/yaml/us/ast_ve1_boss.yaml rename to assets/yaml/jp/rev0/ast_ve1_boss.yaml diff --git a/assets/yaml/us/ast_venom_1.yaml b/assets/yaml/jp/rev0/ast_venom_1.yaml similarity index 100% rename from assets/yaml/us/ast_venom_1.yaml rename to assets/yaml/jp/rev0/ast_venom_1.yaml diff --git a/assets/yaml/us/ast_venom_2.yaml b/assets/yaml/jp/rev0/ast_venom_2.yaml similarity index 100% rename from assets/yaml/us/ast_venom_2.yaml rename to assets/yaml/jp/rev0/ast_venom_2.yaml diff --git a/assets/yaml/us/ast_versus.yaml b/assets/yaml/jp/rev0/ast_versus.yaml similarity index 100% rename from assets/yaml/us/ast_versus.yaml rename to assets/yaml/jp/rev0/ast_versus.yaml diff --git a/assets/yaml/us/ast_vs_menu.yaml b/assets/yaml/jp/rev0/ast_vs_menu.yaml similarity index 100% rename from assets/yaml/us/ast_vs_menu.yaml rename to assets/yaml/jp/rev0/ast_vs_menu.yaml diff --git a/assets/yaml/us/ast_warp_zone.yaml b/assets/yaml/jp/rev0/ast_warp_zone.yaml similarity index 100% rename from assets/yaml/us/ast_warp_zone.yaml rename to assets/yaml/jp/rev0/ast_warp_zone.yaml diff --git a/assets/yaml/us/ast_zoness.yaml b/assets/yaml/jp/rev0/ast_zoness.yaml similarity index 100% rename from assets/yaml/us/ast_zoness.yaml rename to assets/yaml/jp/rev0/ast_zoness.yaml diff --git a/assets/yaml/us/rev1/ast_7_ti_1.yaml b/assets/yaml/us/rev1/ast_7_ti_1.yaml new file mode 100644 index 00000000..011b4ff0 --- /dev/null +++ b/assets/yaml/us/rev1/ast_7_ti_1.yaml @@ -0,0 +1,269 @@ +:config: + segments: + - [0x07, 0xA0E340] + header: + code: + - '#include "assets/ast_7_ti_1.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + +D_AST_7_TI_1_7000000: + { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 28, offset: 0x07000000, symbol: D_AST_7_TI_1_7000000, tlut: 0x07001108 } + +D_TI1_7000A80: + { type: GFX, offset: 0x7000A80, symbol: D_TI1_7000A80 } + +D_TI1_7000D08: + { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x07000D08, symbol: D_TI1_7000D08, tlut: 0x07001108 } + +D_TI1_7001108: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 176, offset: 0x07001108, symbol: D_TI1_7001108 } + +D_TI1_7001268: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x7001268, symbol: D_TI1_7001268 } + +D_TI1_7002270: + { type: GFX, offset: 0x7002270, symbol: D_TI1_7002270 } + +D_TI1_7002490: + { type: GFX, offset: 0x7002490, symbol: D_TI1_7002490 } + +D_TI1_7002730: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x07002730, symbol: D_TI1_7002730 } + +D_TI1_7002930: + { type: GFX, offset: 0x7002930, symbol: D_TI1_7002930 } + +D_TI1_7002C88: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x7002C88, symbol: D_TI1_7002C88 } + +D_TI1_7003488: + { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x07003488, symbol: D_TI1_7003488, tlut: 0x07003888 } + +D_TI1_7003888: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 256, offset: 0x07003888, symbol: D_TI1_7003888 } + +D_TI1_7003A90: + { type: GFX, offset: 0x7003A90, symbol: D_TI1_7003A90 } + +D_TI1_7003C50: + { type: GFX, offset: 0x7003C50, symbol: D_TI1_7003C50 } + +D_TI1_7003E30: + { type: GFX, offset: 0x7003E30, symbol: D_TI1_7003E30 } + +D_TI1_7003FC0: + { type: GFX, offset: 0x7003FC0, symbol: D_TI1_7003FC0 } + +D_TI1_7004170: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x07004170, symbol: D_TI1_7004170 } + +D_TI1_7004370: + { type: GFX, offset: 0x7004370, symbol: D_TI1_7004370 } + +D_TI1_7004560: + { type: GFX, offset: 0x7004560, symbol: D_TI1_7004560 } + +D_TI1_7004780: + { type: GFX, offset: 0x7004780, symbol: D_TI1_7004780 } + +D_TI1_70049A0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x070049A0, symbol: D_TI1_70049A0 } + +D_TI1_7004BA0: + { type: GFX, offset: 0x7004BA0, symbol: D_TI1_7004BA0 } + +D_TI1_7004E78: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x07004E78, symbol: D_TI1_7004E78 } + +D_TI1_7005078: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x07005078, symbol: D_TI1_7005078 } + +D_TI1_7005280: + { type: GFX, offset: 0x7005280, symbol: D_TI1_7005280 } + +D_TI1_7005420: + { type: GFX, offset: 0x7005420, symbol: D_TI1_7005420 } + +D_TI1_70067C4: + { type: SF64:ANIM, offset: 0x70067C4, symbol: D_TI1_70067C4 } + +D_TI1_7006990: + { type: SF64:SKELETON, offset: 0x7006990, symbol: D_TI1_7006990} + +D_TI1_7006F74: + { type: SF64:ANIM, offset: 0x7006F74, symbol: D_TI1_7006F74 } + +D_TI1_7007130: + { type: SF64:ANIM, offset: 0x7007130, symbol: D_TI1_7007130 } + +D_TI1_7007234: + { type: SF64:ANIM, offset: 0x7007234, symbol: D_TI1_7007234 } + +D_TI1_700733C: + { type: SF64:ANIM, offset: 0x700733C, symbol: D_TI1_700733C } + +D_TI1_7007350: + { type: GFX, offset: 0x7007350, symbol: D_TI1_7007350 } + +D_TI1_7007AB0: + { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x7007AB0, symbol: D_TI1_7007AB0, tlut: 0x07007EB0 } + +D_TI1_7007EB0: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 240, offset: 0x07007EB0, symbol: D_TI1_7007EB0 } + +D_TI1_7008090: + { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x07008090, symbol: D_TI1_7008090, tlut: 0x07008490 } + +D_TI1_7008490: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 248, offset: 0x07008490, symbol: D_TI1_7008490 } + +D_TI1_7008680: + { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x07008680, symbol: D_TI1_7008680, tlut: 0x07008490 } + +D_TI1_7008780: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 216, offset: 0x07008780, symbol: D_TI1_7008780 } + +D_TI1_7008930: + { type: GFX, offset: 0x7008930, symbol: D_TI1_7008930 } + +D_TI1_7008D10: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x7008D10, symbol: D_TI1_7008D10 } + +D_TI1_7008F10: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x7008F10, symbol: D_TI1_7008F10 } + +D_TI1_7009110: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x07009110, symbol: D_TI1_7009110 } + +D_TI1_7009310: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x07009310, symbol: D_TI1_7009310 } + +D_TI1_7009510: + { type: GFX, offset: 0x7009510, symbol: D_TI1_7009510 } + +D_TI1_70096D8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x070096D8, symbol: D_TI1_70096D8 } + +D_TI1_70098E0: + { type: GFX, offset: 0x70098E0, symbol: D_TI1_70098E0 } + +D_TI1_7009B58: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x07009B58, symbol: D_TI1_7009B58 } + +D_TI1_7009D60: + { type: GFX, offset: 0x7009D60, symbol: D_TI1_7009D60 } + +D_TI1_700A190: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0700A190, symbol: D_TI1_700A190 } + +D_TI1_700A990: + { type: GFX, offset: 0x700A990, symbol: D_TI1_700A990 } + +D_TI1_700AAD8: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x700AAD8, symbol: D_TI1_700AAD8, tlut: 0x700AB58 } + +D_TI1_700AB58: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x700AB58, symbol: D_TI1_700AB58 } + +D_TI1_700AB70: + { type: GFX, offset: 0x700AB70, symbol: D_TI1_700AB70 } + +D_TI1_700AEA8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x0700AEA8, symbol: D_TI1_700AEA8 } + +D_TI1_700AF30: + { type: GFX, offset: 0x700AF30, symbol: D_TI1_700AF30 } + +D_TI1_700B5B8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x0700B5B8, symbol: D_TI1_700B5B8 } + +D_TI1_700B7B8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x0700B7B8, symbol: D_TI1_700B7B8 } + +D_TI1_700B9C0: + { type: GFX, offset: 0x700B9C0, symbol: D_TI1_700B9C0 } + +D_TI1_700BB10: + { type: GFX, offset: 0x700BB10, symbol: D_TI1_700BB10 } + +D_TI1_700BE00: + { type: GFX, offset: 0x700BE00, symbol: D_TI1_700BE00 } + +D_TI1_700BFB0: + { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x0700BFB0, symbol: D_TI1_700BFB0, tlut: 0x0700C3B0 } + +D_TI1_700C3B0: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 128, offset: 0x0700C3B0, symbol: D_TI1_700C3B0 } + +D_TI1_700C4B0: + { type: GFX, offset: 0x700C4B0, symbol: D_TI1_700C4B0 } + +D_TI1_700C8D8: + { type: SF64:ANIM, offset: 0x700C8D8, symbol: D_TI1_700C8D8 } + +D_TI1_700C964: + { type: SF64:SKELETON, offset: 0x700C964, symbol: D_TI1_700C964 } + +D_TI1_700C980: + { type: GFX, offset: 0x700C980, symbol: D_TI1_700C980 } + +D_TI1_700CAF4: + { type: SF64:ANIM, offset: 0x700CAF4, symbol: D_TI1_700CAF4} + +D_TI1_700CB60: + {type: SF64:SKELETON, offset: 0x700CB60, symbol: D_TI1_700CB60} + +D_TI1_700D534: + { type: SF64:ANIM, offset: 0x700D534, symbol: D_TI1_700D534 } + +D_TI1_700D700: + {type: SF64:SKELETON, offset: 0x700D700, symbol: D_TI1_700D700} + +D_TI1_700D740: + { type: GFX, offset: 0x700D740, symbol: D_TI1_700D740 } + +D_TI1_700D880: + { type: GFX, offset: 0x700D880, symbol: D_TI1_700D880 } + +D_TI1_700D9B0: + { type: GFX, offset: 0x700D9B0, symbol: D_TI1_700D9B0 } + +D_TI1_700DAD0: + { type: GFX, offset: 0x700DAD0, symbol: D_TI1_700DAD0 } + +D_TI1_700DBB0: + { type: GFX, offset: 0x700DBB0, symbol: D_TI1_700DBB0 } + +D_TI1_700DC50: + { type: GFX, offset: 0x700DC50, symbol: D_TI1_700DC50 } + +D_TI1_700DD68: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x0700DD68, symbol: D_TI1_700DD68 } + +D_TI1_700DDF0: + { type: GFX, offset: 0x700DDF0, symbol: D_TI1_700DDF0 } + +D_TI1_700DED0: + { type: GFX, offset: 0x700DED0, symbol: D_TI1_700DED0 } + +D_TI1_700DF70: + { type: GFX, offset: 0x700DF70, symbol: D_TI1_700DF70 } + +D_TI1_700E030: + { type: GFX, offset: 0x700E030, symbol: D_TI1_700E030 } + +D_TI1_700E1E8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x0700E1E8, symbol: D_TI1_700E1E8 } + +D_TI1_700E3F0: + { type: GFX, offset: 0x700E3F0, symbol: D_TI1_700E3F0 } + +D_TI1_700E858: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x0700E858, symbol: D_TI1_700E858 } + +D_TI1_700EA60: + { type: GFX, offset: 0x700EA60, symbol: D_TI1_700EA60 } + +# size = 0xEDB0 \ No newline at end of file diff --git a/assets/yaml/us/rev1/ast_7_ti_2.yaml b/assets/yaml/us/rev1/ast_7_ti_2.yaml new file mode 100644 index 00000000..8d2238e2 --- /dev/null +++ b/assets/yaml/us/rev1/ast_7_ti_2.yaml @@ -0,0 +1,71 @@ +:config: + segments: + - [0x07, 0x9DD390] + header: + code: + - '#include "assets/ast_7_ti_2.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + +D_TI2_7003EE8: + { type: SF64:ANIM, offset: 0x7003EE8, symbol: D_TI2_7003EE8 } + +D_TI2_7003F00: + { type: GFX, offset: 0x7003F00, symbol: D_TI2_7003F00 } + +D_TI2_7004270: + { type: GFX, offset: 0x7004270, symbol: D_TI2_7004270 } + +D_TI2_7004400: + { type: GFX, offset: 0x7004400, symbol: D_TI2_7004400 } + +D_TI2_70045D0: + { type: GFX, offset: 0x70045D0, symbol: D_TI2_70045D0 } + +D_TI2_70047B0: + { type: TEXTURE, ctype: u8, format: CI8, height: 16, width: 16, offset: 0x70047B0, symbol: D_TI2_70047B0 } +D_TI2_70048B0: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 136, offset: 0x70048B0, symbol: D_TI2_70048B0 } + +D_TI2_70049C0: + { type: GFX, offset: 0x70049C0, symbol: D_TI2_70049C0 } + +D_TI2_7004AB0: + { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 16, offset: 0x7004AB0, symbol: D_TI2_7004AB0 } +D_TI2_7004CB0: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 232 , offset: 0x7004CB0, symbol: D_TI2_7004CB0 } + +D_TI2_7004E80: + { type: GFX, offset: 0x7004E80, symbol: D_TI2_7004E80 } + +D_TI2_7005300: + { type: GFX, offset: 0x7005300, symbol: D_TI2_7005300 } + +D_TI2_70054C0: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x70054C0, symbol: D_TI2_70054C0 } + +D_TI2_70084CC: + { type: SF64:ANIM, offset: 0x70084CC, symbol: D_TI2_70084CC } + +D_TI2_70096EC: + { type: SF64:ANIM, offset: 0x70096EC, symbol: D_TI2_70096EC } + +D_TI2_7009700: + { type: GFX, offset: 0x7009700, symbol: D_TI2_7009700 } + +D_TI2_7009890: + { type: GFX, offset: 0x7009890, symbol: D_TI2_7009890 } + +D_TI2_7009A80: + { type: GFX, offset: 0x7009A80, symbol: D_TI2_7009A80 } + +D_TI2_7009B48: + { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 32, offset: 0x7009B48, symbol: D_TI2_7009B48 } +D_TI2_7009D48: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 56, offset: 0x7009D48, symbol: D_TI2_7009D48 } + +D_TI2_700E244: + { type: SF64:ANIM, offset: 0x700E244, symbol: D_TI2_700E244 } + +# size = 0xE250 \ No newline at end of file diff --git a/assets/yaml/us/rev1/ast_8_ti.yaml b/assets/yaml/us/rev1/ast_8_ti.yaml new file mode 100644 index 00000000..cbf2016a --- /dev/null +++ b/assets/yaml/us/rev1/ast_8_ti.yaml @@ -0,0 +1,66 @@ +:config: + segments: + - [0x08, 0x9EB5E0] + header: + code: + - '#include "assets/ast_8_ti.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + +D_TI_8000708: { type: SF64:ANIM, offset: 0x8000708, symbol: D_TI_8000708 } + +D_TI_8000D80: { type: SF64:ANIM, offset: 0x8000D80, symbol: D_TI_8000D80 } + +D_TI_8000D90: { type: GFX, offset: 0x8000D90, symbol: D_TI_8000D90 } + +D_TI_8000FC0: { type: TEXTURE, ctype: u16, format: IA16, width: 16, height: 16, offset: 0x8000FC0, symbol: D_TI_8000FC0} + +D_TI_80011C0: { type: GFX, offset: 0x80011C0, symbol: D_TI_80011C0 } + +D_TI_80012E8: { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x80012E8, symbol: D_TI_80012E8, tlut: 0x80013E8} +D_TI_80013E8: { type: TEXTURE, ctype: u16, format: TLUT, colors: 88, offset: 0x80013E8, symbol: D_TI_80013E8} + +D_TI_80014A0: { type: GFX, offset: 0x80014A0, symbol: D_TI_80014A0 } + +D_TI_8001630: { type: GFX, offset: 0x8001630, symbol: D_TI_8001630 } + +D_TI_80018D0: { type: GFX, offset: 0x80018D0, symbol: D_TI_80018D0 } + +D_TI_8001A80: { type: GFX, offset: 0x8001A80, symbol: D_TI_8001A80 } + +D_TI_8001D20: { type: GFX, offset: 0x8001D20, symbol: D_TI_8001D20 } + +D_TI_8001E20: { type: GFX, offset: 0x8001E20, symbol: D_TI_8001E20 } + +D_TI_8001FB0: { type: GFX, offset: 0x8001FB0, symbol: D_TI_8001FB0 } + +D_TI_80020D0: { type: GFX, offset: 0x80020D0, symbol: D_TI_80020D0 } + +D_TI_8002360: { type: GFX, offset: 0x8002360, symbol: D_TI_8002360 } + +D_TI_8002858: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x8002858, symbol: D_TI_8002858, tlut: 0x8002C58} +D_TI_8002C58: { type: TEXTURE, ctype: u16, format: TLUT, colors: 248, offset: 0x8002C58, symbol: D_TI_8002C58} + +D_TI_8002E48: { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x8002E48, symbol: D_TI_8002E48, tlut: 0x8002F48} +D_TI_8002F48: { type: TEXTURE, ctype: u16, format: TLUT, colors: 216, offset: 0x8002F48, symbol: D_TI_8002F48} + +D_TI_80030F8: { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x80030F8, symbol: D_TI_80030F8, tlut: 0x80031F8} +D_TI_80031F8: { type: TEXTURE, ctype: u16, format: TLUT, colors: 192, offset: 0x80031F8, symbol: D_TI_80031F8} + +D_TI_8003378: { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x8003378, symbol: D_TI_8003378, tlut: 0x8003478} +D_TI_8003478: { type: TEXTURE, ctype: u16, format: TLUT, colors: 24, offset: 0x8003478, symbol: D_TI_8003478} + +D_TI_80034A8: { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x80034A8, symbol: D_TI_80034A8, tlut: 0x80035A8} +D_TI_80035A8: { type: TEXTURE, ctype: u16, format: TLUT, colors: 72, offset: 0x80035A8, symbol: D_TI_80035A8} + +D_TI_8003640: { type: GFX, offset: 0x8003640, symbol: D_TI_8003640 } + +D_TI_8004200: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x8004200, symbol: D_TI_8004200, tlut: 0x8004600} +D_TI_8004600: { type: TEXTURE, ctype: u16, format: TLUT, colors: 256, offset: 0x8004600, symbol: D_TI_8004600} + +D_TI_8008FE8: { type: SF64:ANIM, offset: 0x8008FE8, symbol: D_TI_8008FE8 } + +D_TI_8009000: { type: GFX, offset: 0x8009000, symbol: D_TI_8009000 } + +# size: 0x92A0 \ No newline at end of file diff --git a/assets/yaml/us/rev1/ast_9_ti.yaml b/assets/yaml/us/rev1/ast_9_ti.yaml new file mode 100644 index 00000000..913cf7cb --- /dev/null +++ b/assets/yaml/us/rev1/ast_9_ti.yaml @@ -0,0 +1,68 @@ +:config: + segments: + - [0x09, 0x9F4880] + header: + code: + - '#include "assets/ast_9_ti.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + +D_TI_9004288: + { type: SF64:ANIM, offset: 0x9004288, symbol: D_TI_9004288 } + +D_TI_90042A0: + { type: GFX, offset: 0x90042A0, symbol: D_TI_90042A0 } + +D_TI_90043D0: + { type: GFX, offset: 0x90043D0, symbol: D_TI_90043D0 } + +D_TI_90044E0: + { type: GFX, offset: 0x90044E0, symbol: D_TI_90044E0 } + +D_TI_90045F0: + { type: GFX, offset: 0x90045F0, symbol: D_TI_90045F0 } + +D_TI_9004858: + { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x9004858, symbol: D_TI_9004858, tlut: 0x9004958 } +D_TI_9004958: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 136, offset: 0x9004958, symbol: D_TI_9004958 } + +D_TI_9004A68: + { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x9004A68, symbol: D_TI_9004A68, tlut: 0x9004E68 } +D_TI_9004E68: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 232, offset: 0x9004E68, symbol: D_TI_9004E68 } + +D_TI_9005040: + { type: GFX, offset: 0x9005040, symbol: D_TI_9005040 } + +D_TI_90051C0: + { type: GFX, offset: 0x90051C0, symbol: D_TI_90051C0 } + +D_TI_9005450: + { type: GFX, offset: 0x9005450, symbol: D_TI_9005450 } + +D_TI_9005600: + { type: GFX, offset: 0x9005600, symbol: D_TI_9005600 } + +D_TI_90058A0: + { type: GFX, offset: 0x90058A0, symbol: D_TI_90058A0 } + +D_TI_90059B8: + { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x90059B8, symbol: D_TI_90059B8, tlut: 0x9005AB8 } +D_TI_9005AB8: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 240, offset: 0x9005AB8, symbol: D_TI_9005AB8 } + +D_TI_900FC4C: + { type: SF64:ANIM, offset: 0x900FC4C, symbol: D_TI_900FC4C } + +D_TI_900FC60: + { type: GFX, offset: 0x900FC60, symbol: D_TI_900FC60 } + +D_TI_900FD70: + { type: GFX, offset: 0x900FD70, symbol: D_TI_900FD70 } + +D_TI_900FE80: + { type: GFX, offset: 0x900FE80, symbol: D_TI_900FE80 } + + # size: 0x10120 \ No newline at end of file diff --git a/assets/yaml/us/rev1/ast_A_ti.yaml b/assets/yaml/us/rev1/ast_A_ti.yaml new file mode 100644 index 00000000..e4fcb1ab --- /dev/null +++ b/assets/yaml/us/rev1/ast_A_ti.yaml @@ -0,0 +1,61 @@ +:config: + segments: + - [0x0A, 0xA049A0] + header: + code: + - '#include "assets/ast_A_ti.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + +D_TI_A000000: + {type: GFX, offset: 0xA000000, symbol: D_TI_A000000} + +D_TI_A0000C8: + { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x0A0000C8, symbol: D_TI_A0000C8, tlut: 0x0A0001C8 } + +D_TI_A0001C8: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 60, offset: 0x0A0001C8, symbol: D_TI_A0001C8 } + +D_TI_A0002BC: + {type: SF64:ANIM, offset: 0xA0002BC, symbol: D_TI_A0002BC} + +D_TI_A00047C: + {type: SF64:ANIM, offset: 0xA00047C, symbol: D_TI_A00047C} + +D_TI_A000568: + {type: SF64:SKELETON, offset: 0xA000568, symbol: D_TI_A000568} + +D_TI_A000858: + {type: SF64:ANIM, offset: 0xA000858, symbol: D_TI_A000858} + +D_TI_A000934: + {type: SF64:ANIM, offset: 0xA000934, symbol: D_TI_A000934} + +D_TI_A000D50: + {type: SF64:ANIM, offset: 0xA000D50, symbol: D_TI_A000D50} + +D_TI_A000EDC: + {type: SF64:SKELETON, offset: 0xA000EDC, symbol: D_TI_A000EDC} + +D_TI_A001A70: + {type: SF64:SKELETON, offset: 0xA001A70, symbol: D_TI_A001A70} + +D_TI_A001BE0: + {type: GFX, offset: 0xA001BE0, symbol: D_TI_A001BE0} + +D_TI_A001DB0: + {type: GFX, offset: 0xA001DB0, symbol: D_TI_A001DB0} + +D_TI_A001EC0: + {type: GFX, offset: 0xA001EC0, symbol: D_TI_A001EC0} + +D_TI_A001FA0: + {type: GFX, offset: 0xA001FA0, symbol: D_TI_A001FA0} + +D_TI_A002170: + {type: GFX, offset: 0xA002170, symbol: D_TI_A002170} + +D_TI_A009990: + {type: SF64:ANIM, offset: 0xA009990, symbol: D_TI_A009990} + diff --git a/assets/yaml/us/rev1/ast_allies.yaml b/assets/yaml/us/rev1/ast_allies.yaml new file mode 100644 index 00000000..3f9594f5 --- /dev/null +++ b/assets/yaml/us/rev1/ast_allies.yaml @@ -0,0 +1,113 @@ +:config: + segments: + - [0x0D, 0x955270] + header: + code: + - '#include "assets/ast_allies.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + +D_D000000: + { type: GFX, offset: 0xD000000, symbol: D_D000000 } + +ast_allies_seg13_vtx_00000098: + { type: VTX, count: 3, offset: 0x0D000098, symbol: ast_allies_seg13_vtx_00000098 } + +D_D0000C8: + { type: BLOB, size: 0x18, offset: 0x0D0000C8, symbol: D_D0000C8 } + +D_D0000E0: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0D0000E0, symbol: D_D0000E0, tlut: 0x0D000160 } + +D_D000160: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0xD000160, symbol: D_D000160 } + +D_D000170: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0xD000170, symbol: D_D000170 } + +D_D001090: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0xD001090, symbol: D_D001090 } + +D_D001FB0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0xD001FB0, symbol: D_D001FB0 } + +D_D002ED0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0xD002ED0, symbol: D_D002ED0 } + +D_D003DF0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0xD003DF0, symbol: D_D003DF0 } + +D_D004D10: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0xD004D10, symbol: D_D004D10 } + +D_D005C30: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0xD005C30, symbol: D_D005C30 } + +D_D006B50: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0xD006B50, symbol: D_D006B50 } + +D_D007A70: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0xD007A70, symbol: D_D007A70 } + +D_D008990: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0xD008990, symbol: D_D008990 } + +D_D0098B0: + { type: GFX, offset: 0xD0098B0, symbol: D_D0098B0 } + +D_D009938: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x0D009938, symbol: D_D009938 } + +D_D009A40: + { type: GFX, offset: 0xD009A40, symbol: D_D009A40 } + +D_D00A3B8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0D00A3B8, symbol: D_D00A3B8 } + +D_D00ABB8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x0D00ABB8, symbol: D_D00ABB8 } + +D_D00ADB8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x0D00ADB8, symbol: D_D00ADB8 } + +D_D00AFB8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 16, offset: 0x0D00AFB8, symbol: D_D00AFB8 } + +D_D00B3B8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x0D00B3B8, symbol: D_D00B3B8 } + +D_D00B5C0: + { type: GFX, offset: 0xD00B5C0, symbol: D_D00B5C0 } + +# Letter B +D_D00B688: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0D00B688, symbol: D_D00B688, tlut: 0xD00B708 } + +D_D00B708: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0xD00B708, symbol: D_D00B708 } + +D_D00B720: + { type: GFX, offset: 0xD00B720, symbol: D_D00B720 } + +# Letter J ? +D_D00B7F0: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0D00B7F0, symbol: D_D00B7F0, tlut: 0xD00B870 } + +D_D00B870: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0xD00B870, symbol: D_D00B870 } + +D_D00B880: + { type: GFX, offset: 0xD00B880, symbol: D_D00B880 } + +ast_allies_seg13_vtx_BB70: + { type: VTX, count: 144, offset: 0xD00BB70, symbol: ast_allies_seg13_vtx_BB70 } + +D_D00C470: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0xD00C470, symbol: D_D00C470 } + +D_D00C670: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x0D00C670, symbol: D_D00C670 } + +D_D00C870: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x0D00C870, symbol: D_D00C870 } diff --git a/assets/yaml/us/rev1/ast_andross.yaml b/assets/yaml/us/rev1/ast_andross.yaml new file mode 100644 index 00000000..673b0167 --- /dev/null +++ b/assets/yaml/us/rev1/ast_andross.yaml @@ -0,0 +1,272 @@ +:config: + segments: + - [0x0C, 0xCE9E70] + header: + code: + - '#include "assets/ast_andross.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + - '#include "sf64level.h"' + - '#include "sf64event.h"' + - '#include "sf64player.h"' + - '#include "sf64audio_external.h"' + - '#include "sf64mesg.h"' + +D_ANDROSS_C000000: + {type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 28, offset: 0xC000000, symbol: D_ANDROSS_C000000} + +D_ANDROSS_C000A80: + {type: TEXTURE, ctype: u8, format: IA8, width: 128, height: 28, offset: 0xC000A80, symbol: D_ANDROSS_C000A80} + +D_ANDROSS_C001880: + {type: GFX, offset: 0xC001880, symbol: D_ANDROSS_C001880} + +D_ANDROSS_C0019E8: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0xC0019E8, symbol: D_ANDROSS_C0019E8} + +D_ANDROSS_C00208C: + {type: SF64:ANIM, offset: 0xC00208C, symbol: D_ANDROSS_C00208C} + +D_ANDROSS_C002654: + {type: SF64:ANIM, offset: 0xC002654, symbol: D_ANDROSS_C002654} + +D_ANDROSS_C002B08: + {type: SF64:ANIM, offset: 0xC002B08, symbol: D_ANDROSS_C002B08} + +D_ANDROSS_C002B20: + {type: GFX, offset: 0xC002B20, symbol: D_ANDROSS_C002B20} + +D_ANDROSS_C002F00: + {type: GFX, offset: 0xC002F00, symbol: D_ANDROSS_C002F00} + +D_ANDROSS_C0031D0: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0xC0031D0, symbol: D_ANDROSS_C0031D0} + +D_ANDROSS_C0039D0: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0xC0039D0, symbol: D_ANDROSS_C0039D0} + +D_ANDROSS_C0041D0: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0xC0041D0, symbol: D_ANDROSS_C0041D0} + +D_ANDROSS_C0043D0: + {type: GFX, offset: 0xC0043D0, symbol: D_ANDROSS_C0043D0} + +D_ANDROSS_C004658: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0xC004658, symbol: D_ANDROSS_C004658} + +D_ANDROSS_C004860: + {type: GFX, offset: 0xC004860, symbol: D_ANDROSS_C004860} + +D_ANDROSS_C006F08: + {type: SF64:ANIM, offset: 0xC006F08, symbol: D_ANDROSS_C006F08} + +D_ANDROSS_C007FC0: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0xC007FC0, symbol: D_ANDROSS_C007FC0} + +D_ANDROSS_C0087C0: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0xC0087C0, symbol: D_ANDROSS_C0087C0} + +D_ANDROSS_C00DE48: + {type: SF64:ANIM, offset: 0xC00DE48, symbol: D_ANDROSS_C00DE48} + +D_ANDROSS_C00E598: + {type: SF64:ANIM, offset: 0xC00E598, symbol: D_ANDROSS_C00E598} + +D_ANDROSS_C00F108: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0xC00F108, symbol: D_ANDROSS_C00F108} + +D_ANDROSS_C010108: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0xC010108, symbol: D_ANDROSS_C010108} + +D_ANDROSS_C010188: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0xC010188, symbol: D_ANDROSS_C010188} + +D_ANDROSS_C010988: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0xC010988, symbol: D_ANDROSS_C010988} + +D_ANDROSS_C011988: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0xC011988, symbol: D_ANDROSS_C011988} + +D_ANDROSS_C012188: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0xC012188, symbol: D_ANDROSS_C012188} + +D_ANDROSS_C012988: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0xC012988, symbol: D_ANDROSS_C012988} + +D_ANDROSS_C013738: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0xC013738, symbol: D_ANDROSS_C013738} + +D_ANDROSS_C013F38: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0xC013F38, symbol: D_ANDROSS_C013F38} + +D_ANDROSS_C014738: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0xC014738, symbol: D_ANDROSS_C014738} + +D_ANDROSS_C015740: + {type: GFX, offset: 0xC015740, symbol: D_ANDROSS_C015740} + +D_ANDROSS_C016100: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0xC016100, symbol: D_ANDROSS_C016100} + +D_ANDROSS_C017050: + {type: SF64:ANIM, offset: 0xC017050, symbol: D_ANDROSS_C017050} + +D_ANDROSS_C017430: + {type: SF64:ANIM, offset: 0xC017430, symbol: D_ANDROSS_C017430} + +D_ANDROSS_C017440: + {type: GFX, offset: 0xC017440, symbol: D_ANDROSS_C017440} + +D_ANDROSS_C017598: + {type: VTX, count: 34, offset: 0xC017598, symbol: D_ANDROSS_C017598} + +D_ANDROSS_C0177B8: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0xC0177B8, symbol: D_ANDROSS_C0177B8} + +D_ANDROSS_C018BC4: + {type: SF64:ANIM, offset: 0xC018BC4, symbol: D_ANDROSS_C018BC4} + +D_ANDROSS_C01C490: + {type: SF64:ANIM, offset: 0xC01C490, symbol: D_ANDROSS_C01C490} + +D_ANDROSS_C01CC3C: + {type: SF64:SKELETON, offset: 0xC01CC3C, symbol: D_ANDROSS_C01CC3C} + +D_ANDROSS_C020128: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0xC020128, symbol: D_ANDROSS_C020128} + +D_ANDROSS_C022520: + {type: GFX, offset: 0xC022520, symbol: D_ANDROSS_C022520} + +D_ANDROSS_C022A10: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0xC022A10, symbol: D_ANDROSS_C022A10} + +D_ANDROSS_C022A90: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0xC022A90, symbol: D_ANDROSS_C022A90} + +D_ANDROSS_C023B54: + {type: SF64:ANIM, offset: 0xC023B54, symbol: D_ANDROSS_C023B54} + +D_ANDROSS_C0240D0: + {type: SF64:ANIM, offset: 0xC0240D0, symbol: D_ANDROSS_C0240D0} + +D_ANDROSS_C025C00: + {type: SF64:ANIM, offset: 0xC025C00, symbol: D_ANDROSS_C025C00} + +D_ANDROSS_C029F74: + {type: SF64:ANIM, offset: 0xC029F74, symbol: D_ANDROSS_C029F74} + +D_ANDROSS_C02E494: + {type: SF64:ANIM, offset: 0xC02E494, symbol: D_ANDROSS_C02E494} + +D_ANDROSS_C02EDA0: + {type: SF64:ANIM, offset: 0xC02EDA0, symbol: D_ANDROSS_C02EDA0} + +D_ANDROSS_C02F634: + {type: SF64:ANIM, offset: 0xC02F634, symbol: D_ANDROSS_C02F634} + +D_ANDROSS_C030244: + {type: SF64:ANIM, offset: 0xC030244, symbol: D_ANDROSS_C030244} + +D_ANDROSS_C033780: + {type: SF64:ANIM, offset: 0xC033780, symbol: D_ANDROSS_C033780} + +D_ANDROSS_C033D98: + {type: SF64:ANIM, offset: 0xC033D98, symbol: D_ANDROSS_C033D98} + +D_ANDROSS_C035110: + {type: SF64:ENVIRONMENT, offset: 0xC035110, symbol: D_ANDROSS_C035110} + +D_ANDROSS_C035154: + {type: SF64:OBJECT_INIT, offset: 0xC035154, symbol: D_ANDROSS_C035154} + +D_ANDROSS_C0356A4: + {type: SF64:OBJECT_INIT, offset: 0xC0356A4, symbol: D_ANDROSS_C0356A4} + +D_ANDROSS_C0356CC: + {type: SF64:OBJECT_INIT, offset: 0xC0356CC, symbol: D_ANDROSS_C0356CC} + +D_ANDROSS_C036310: + {type: SF64:OBJECT_INIT, offset: 0xC036310, symbol: D_ANDROSS_C036310} + +D_ANDROSS_C036B6C: + {type: SF64:OBJECT_INIT, offset: 0xC036B6C, symbol: D_ANDROSS_C036B6C} + +D_ANDROSS_C03733C: + {type: SF64:OBJECT_INIT, offset: 0xC03733C, symbol: D_ANDROSS_C03733C} + +D_ANDROSS_C037E3C: + {type: SF64:SCRIPT, offset: 0xC037E3C, symbol: D_ANDROSS_C037E3C} + +D_ANDROSS_C037FCC: + {type: SF64:HITBOX, offset: 0xC037FCC, symbol: D_ANDROSS_C037FCC} + +D_ANDROSS_C0380C0: + {type: SF64:HITBOX, offset: 0xC0380C0, symbol: D_ANDROSS_C0380C0} + +D_ANDROSS_C0381B4: + {type: SF64:HITBOX, offset: 0xC0381B4, symbol: D_ANDROSS_C0381B4} + +D_ANDROSS_C0382A8: + {type: SF64:HITBOX, offset: 0xC0382A8, symbol: D_ANDROSS_C0382A8} + +D_ANDROSS_C03839C: + {type: SF64:HITBOX, offset: 0xC03839C, symbol: D_ANDROSS_C03839C} + +D_ANDROSS_C038490: + {type: SF64:HITBOX, offset: 0xC038490, symbol: D_ANDROSS_C038490} + +D_ANDROSS_C038584: + {type: SF64:HITBOX, offset: 0xC038584, symbol: D_ANDROSS_C038584} + +D_ANDROSS_C038678: + {type: SF64:HITBOX, offset: 0xC038678, symbol: D_ANDROSS_C038678} + +D_ANDROSS_C03876C: + {type: SF64:HITBOX, offset: 0xC03876C, symbol: D_ANDROSS_C03876C} + +D_ANDROSS_C038860: + {type: SF64:HITBOX, offset: 0xC038860, symbol: D_ANDROSS_C038860} + +D_ANDROSS_C038954: + {type: SF64:HITBOX, offset: 0xC038954, symbol: D_ANDROSS_C038954} + +D_ANDROSS_C038A48: + {type: SF64:HITBOX, offset: 0xC038A48, symbol: D_ANDROSS_C038A48} + +D_ANDROSS_C038AC4: + {type: SF64:HITBOX, offset: 0xC038AC4, symbol: D_ANDROSS_C038AC4} + +D_ANDROSS_C038B40: + {type: SF64:HITBOX, offset: 0xC038B40, symbol: D_ANDROSS_C038B40} + +D_ANDROSS_C038BA4: + {type: SF64:HITBOX, offset: 0xC038BA4, symbol: D_ANDROSS_C038BA4} + +D_ANDROSS_C038BD8: + {type: SF64:HITBOX, offset: 0xC038BD8, symbol: D_ANDROSS_C038BD8} + +D_ANDROSS_C038CCC: + {type: SF64:HITBOX, offset: 0xC038CCC, symbol: D_ANDROSS_C038CCC} + +D_ANDROSS_C038DC0: + {type: SF64:HITBOX, offset: 0xC038DC0, symbol: D_ANDROSS_C038DC0} + +D_ANDROSS_C038F24: + {type: SF64:HITBOX, offset: 0xC038F24, symbol: D_ANDROSS_C038F24} + +D_ANDROSS_C038FE8: + {type: VTX, count: 34, offset: 0xC038FE8, symbol: D_ANDROSS_C038FE8} + +D_ANDROSS_C039208: + {type: GFX, offset: 0xC039208, symbol: D_ANDROSS_C039208} + +D_ANDROSS_C039290: + {type: TEXTURE, ctype: u32, format: RGBA32, width: 32, height: 32, offset: 0xC039290, symbol: D_ANDROSS_C039290} + +D_ANDROSS_C03A290: + {type: TEXTURE, ctype: u32, format: RGBA32, width: 32, height: 32, offset: 0xC03A290, symbol: D_ANDROSS_C03A290} + + + diff --git a/assets/yaml/us/rev1/ast_aquas.yaml b/assets/yaml/us/rev1/ast_aquas.yaml new file mode 100644 index 00000000..d78d5c3b --- /dev/null +++ b/assets/yaml/us/rev1/ast_aquas.yaml @@ -0,0 +1,777 @@ +:config: + segments: + - [0x06, 0xA58F60] + header: + code: + - '#include "assets/ast_aquas.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + - '#include "sf64level.h"' + - '#include "sf64event.h"' + - '#include "sf64player.h"' + - '#include "sf64audio_external.h"' + - '#include "sf64mesg.h"' + +D_AQ_6000000: + { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 13, offset: 0x6000000, symbol: D_AQ_6000000 } + +D_AQ_6000AE4: + { type: SF64:ANIM, offset: 0x6000AE4, symbol: D_AQ_6000AE4 } + +D_AQ_6000DB0: + { type: SF64:SKELETON, offset: 0x6000DB0, symbol: D_AQ_6000DB0 } + +D_AQ_6000E10: + { type: GFX, offset: 0x6000E10, symbol: D_AQ_6000E10 } + +D_AQ_6001130: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6001130, symbol: D_AQ_6001130 } + +D_AQ_6002628: + { type: SF64:ANIM, offset: 0x6002628, symbol: D_AQ_6002628 } + +D_AQ_6002874: + { type: SF64:SKELETON, offset: 0x6002874, symbol: D_AQ_6002874 } + +# +D_AQ_6002C10: + { type: GFX, offset: 0x6002C10, symbol: D_AQ_6002C10 } + +D_AQ_6002D58: + { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x6002D58, symbol: D_AQ_6002D58, tlut: 0x6003158 } + +D_AQ_6003158: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 248, offset: 0x6003158, symbol: D_AQ_6003158 } + +D_AQ_6003350: + { type: GFX, offset: 0x6003350, symbol: D_AQ_6003350 } + +D_AQ_6003610: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6003610, symbol: D_AQ_6003610 } + +D_AQ_60043B0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60043B0, symbol: D_AQ_60043B0 } + +D_AQ_6004BB0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6004BB0, symbol: D_AQ_6004BB0 } + +D_AQ_60040F0: + { type: GFX, offset: 0x60040F0, symbol: D_AQ_60040F0 } + +D_AQ_6004DB0: + { type: GFX, offset: 0x6004DB0, symbol: D_AQ_6004DB0 } + +D_AQ_60050F0: + { type: GFX, offset: 0x60050F0, symbol: D_AQ_60050F0 } + +D_AQ_6005954: + { type: SF64:ANIM, offset: 0x6005954, symbol: D_AQ_6005954 } + +D_AQ_6005A80: + { type: SF64:SKELETON, offset: 0x6005A80, symbol: D_AQ_6005A80 } + +D_AQ_6006160: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6006160, symbol: D_AQ_6006160 } + +D_AQ_6006960: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6006960, symbol: D_AQ_6006960 } + +D_AQ_6007160: + { type: GFX, offset: 0x6007160, symbol: D_AQ_6007160 } + +D_AQ_6007378: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6007378, symbol: D_AQ_6007378 } + +D_AQ_6007B80: + { type: GFX, offset: 0x6007B80, symbol: D_AQ_6007B80 } + +D_AQ_6007D70: + { type: GFX, offset: 0x6007D70, symbol: D_AQ_6007D70 } + +D_AQ_6007F68: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6007F68, symbol: D_AQ_6007F68 } + +D_AQ_6003FF0: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 32, offset: 0x6003FF0, symbol: D_AQ_6003FF0 } + +D_AQ_6008168: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6008168, symbol: D_AQ_6008168 } + +D_AQ_6008970: + { type: GFX, offset: 0x6008970, symbol: D_AQ_6008970 } + +D_AQ_6008EC8: + { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x6008EC8, symbol: D_AQ_6008EC8, tlut: 0x6008FC8 } + +D_AQ_6008FC8: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 224, offset: 0x6008FC8, symbol: D_AQ_6008FC8 } + +D_AQ_6009188: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6009188, symbol: D_AQ_6009188 } + +D_AQ_6009990: + { type: GFX, offset: 0x6009990, symbol: D_AQ_6009990 } + +D_AQ_6009C28: + { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x6009C28, symbol: D_AQ_6009C28, tlut: 0x600A028 } + +D_AQ_600A028: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 248, offset: 0x600A028, symbol: D_AQ_600A028 } + +D_AQ_600A220: + { type: GFX, offset: 0x600A220, symbol: D_AQ_600A220 } + +D_AQ_600A480: + { type: GFX, offset: 0x600A480, symbol: D_AQ_600A480 } + +D_AQ_600A520: + { type: GFX, offset: 0x600A520, symbol: D_AQ_600A520 } + +D_AQ_600A720: + { type: GFX, offset: 0x600A720, symbol: D_AQ_600A720 } + +D_AQ_600A840: + { type: GFX, offset: 0x600A840, symbol: D_AQ_600A840 } + +D_AQ_600A8E0: + { type: GFX, offset: 0x600A8E0, symbol: D_AQ_600A8E0 } + +D_AQ_600A970: + { type: GFX, offset: 0x600A970, symbol: D_AQ_600A970 } + +D_AQ_600AB10: + { type: GFX, offset: 0x600AB10, symbol: D_AQ_600AB10 } + +D_AQ_600AB68: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x600AB68, symbol: D_AQ_600AB68 } + +D_AQ_600BD20: + { type: GFX, offset: 0x600BD20, symbol: D_AQ_600BD20 } + +D_AQ_600B518: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x600B518, symbol: D_AQ_600B518 } + +D_AQ_600BF80: + { type: GFX, offset: 0x600BF80, symbol: D_AQ_600BF80 } + +D_AQ_600C530: + { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x600C530, symbol: D_AQ_600C530, tlut: 0x600C930 } + +D_AQ_600C930: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 248, offset: 0x600C930, symbol: D_AQ_600C930 } + +D_AQ_600CB20: + { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x600CB20, symbol: D_AQ_600CB20, tlut: 0x600CF20 } + +D_AQ_600CF20: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 104, offset: 0x600CF20, symbol: D_AQ_600CF20 } + +D_AQ_600CFF0: + { type: GFX, offset: 0x600CFF0, symbol: D_AQ_600CFF0 } + +D_AQ_600D390: + { type: GFX, offset: 0x600D390, symbol: D_AQ_600D390 } + +D_AQ_600D4A0: + { type: GFX, offset: 0x600D4A0, symbol: D_AQ_600D4A0 } + +D_AQ_600D720: + { type: GFX, offset: 0x600D720, symbol: D_AQ_600D720 } + +D_AQ_600D810: + { type: GFX, offset: 0x600D810, symbol: D_AQ_600D810 } + +D_AQ_600D900: + { type: GFX, offset: 0x600D900, symbol: D_AQ_600D900 } + +D_AQ_600DB80: + { type: GFX, offset: 0x600DB80, symbol: D_AQ_600DB80 } + +D_AQ_600DF48: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x600DF48, symbol: D_AQ_600DF48 } + +D_AQ_600E150: + { type: GFX, offset: 0x600E150, symbol: D_AQ_600E150 } + +D_AQ_600E368: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x600E368, symbol: D_AQ_600E368 } + +D_AQ_600EE10: + { type: GFX, offset: 0x600EE10, symbol: D_AQ_600EE10 } + +D_AQ_600EEF0: + { type: GFX, offset: 0x600EEF0, symbol: D_AQ_600EEF0 } + +D_AQ_600F030: + { type: GFX, offset: 0x600F030, symbol: D_AQ_600F030 } + +D_AQ_600F1A0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x600F1A0, symbol: D_AQ_600F1A0 } + +D_AQ_600F9A0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x600F9A0, symbol: D_AQ_600F9A0 } + +D_AQ_60101A0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60101A0, symbol: D_AQ_60101A0 } + +D_AQ_60109A0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60109A0, symbol: D_AQ_60109A0 } + +D_AQ_60111A0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60111A0, symbol: D_AQ_60111A0 } + +D_AQ_60119A0: + { type: GFX, offset: 0x60119A0, symbol: D_AQ_60119A0 } + +D_AQ_6011A78: + { type: VTX, count: 38, offset: 0x6011A78, symbol: D_AQ_6011A78 } + +D_AQ_6011CD8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6011CD8, symbol: D_AQ_6011CD8 } + +D_AQ_6011EE0: + { type: GFX, offset: 0x6011EE0, symbol: D_AQ_6011EE0 } + +D_AQ_60120F0: + { type: GFX, offset: 0x60120F0, symbol: D_AQ_60120F0 } + +D_AQ_60126A8: + { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 64, offset: 0x60126A8, symbol: D_AQ_60126A8, tlut: 0x6012AA8 } + +D_AQ_6012AA8: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 248, offset: 0x6012AA8, symbol: D_AQ_6012AA8 } + +D_AQ_6012C98: + { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x6012C98, symbol: D_AQ_6012C98, tlut: 0x6012D98 } + +D_AQ_6012D98: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 136, offset: 0x6012D98, symbol: D_AQ_6012D98 } + +D_AQ_6012EA8: + { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x6012EA8, symbol: D_AQ_6012EA8, tlut: 0x60132A8 } + +D_AQ_60132A8: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 240, offset: 0x60132A8, symbol: D_AQ_60132A8 } + +D_AQ_60135E0: + { type: SF64:ANIM, offset: 0x60135E0, symbol: D_AQ_60135E0 } + +D_AQ_60136CC: + { type: SF64:SKELETON, offset: 0x60136CC, symbol: D_AQ_60136CC } + +D_AQ_60137CC: + { type: SF64:SKELETON, offset: 0x60137CC, symbol: D_AQ_60137CC } + +D_AQ_60137F0: + { type: GFX, offset: 0x60137F0, symbol: D_AQ_60137F0 } + +D_AQ_6013CC0: + { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 32, offset: 0x6013CC0, symbol: D_AQ_6013CC0, tlut: 0x6013EC0 } + +D_AQ_6013EC0: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 184, offset: 0x6013EC0, symbol: D_AQ_6013EC0 } + +D_AQ_6014030: + { type: GFX, offset: 0x6014030, symbol: D_AQ_6014030 } + +D_AQ_6014438: + { type: SF64:ANIM, offset: 0x6014438, symbol: D_AQ_6014438 } + +D_AQ_6014504: + { type: SF64:SKELETON, offset: 0x6014504, symbol: D_AQ_6014504 } + +D_AQ_6014520: + { type: GFX, offset: 0x6014520, symbol: D_AQ_6014520 } + +D_AQ_60148B0: + { type: GFX, offset: 0x60148B0, symbol: D_AQ_60148B0 } + +D_AQ_6014CD0: + { type: GFX, offset: 0x6014CD0, symbol: D_AQ_6014CD0 } + +D_AQ_6014E50: + { type: GFX, offset: 0x6014E50, symbol: D_AQ_6014E50 } + +D_AQ_6014FD0: + { type: GFX, offset: 0x6014FD0, symbol: D_AQ_6014FD0 } + +D_AQ_6015430: + { type: GFX, offset: 0x6015430, symbol: D_AQ_6015430 } + +D_AQ_60154F8: + { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x60154F8, symbol: D_AQ_60154F8, tlut: 0x60155F8 } + +D_AQ_60155F8: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 152, offset: 0x60155F8, symbol: D_AQ_60155F8 } + +D_AQ_6015730: + { type: GFX, offset: 0x6015730, symbol: D_AQ_6015730 } + +D_AQ_6015DD0: + { type: GFX, offset: 0x6015DD0, symbol: D_AQ_6015DD0 } + +D_AQ_6015FF0: + { type: GFX, offset: 0x6015FF0, symbol: D_AQ_6015FF0 } + +D_AQ_6017BD8: + { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x6017BD8, symbol: D_AQ_6017BD8, tlut: 0x6017CD8 } + +D_AQ_6017CD8: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 64, offset: 0x6017CD8, symbol: D_AQ_6017CD8 } + +D_AQ_6018640: + { type: GFX, offset: 0x6018640, symbol: D_AQ_6018640 } + +D_AQ_6018878: + { type: VTX, count: 64, offset: 0x6018878, symbol: D_AQ_6018878 } + +D_AQ_6018C78: + { type: VTX, count: 64, offset: 0x6018C78, symbol: D_AQ_6018C78 } + +D_AQ_6019078: + { type: VTX, count: 28, offset: 0x6019078, symbol: D_AQ_6019078 } + +D_AQ_6019238: + { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x6019238, symbol: D_AQ_6019238, tlut: 0x6019338 } + +D_AQ_6019338: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 200, offset: 0x6019338, symbol: D_AQ_6019338 } + +D_AQ_60194D0: + { type: GFX, offset: 0x60194D0, symbol: D_AQ_60194D0 } + +D_AQ_6019880: + { type: GFX, offset: 0x6019880, symbol: D_AQ_6019880 } + +D_AQ_6019C28: + { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x6019C28, symbol: D_AQ_6019C28, tlut: 0x6019D28 } + +D_AQ_6019D28: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 168, offset: 0x6019D28, symbol: D_AQ_6019D28 } + +D_AQ_6019E80: + { type: GFX, offset: 0x6019E80, symbol: D_AQ_6019E80 } + +D_AQ_601A308: + { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x601A308, symbol: D_AQ_601A308, tlut: 0x601A708 } + +D_AQ_601A708: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 248, offset: 0x601A708, symbol: D_AQ_601A708 } + +D_AQ_601AE70: + { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x601AE70, symbol: D_AQ_601AE70, tlut: 0x601AF70 } + +D_AQ_601AF70: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 64, offset: 0x601AF70, symbol: D_AQ_601AF70 } + +D_AQ_601AFF0: + { type: GFX, offset: 0x601AFF0, symbol: D_AQ_601AFF0 } + +D_AQ_601B080: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x601C110, symbol: D_AQ_601C110 } + +D_AQ_601C080: + { type: GFX, offset: 0x601C080, symbol: D_AQ_601C080 } + +D_AQ_601C110: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x601B080, symbol: D_AQ_601B080 } + +D_AQ_601D110: + { type: GFX, offset: 0x601D110, symbol: D_AQ_601D110 } + +D_AQ_601DE50: + { type: SF64:ANIM, offset: 0x601DE50, symbol: D_AQ_601DE50 } + +D_AQ_601DE60: + { type: GFX, offset: 0x601DE60, symbol: D_AQ_601DE60 } + +D_AQ_601E1F0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x601E1F0, symbol: D_AQ_601E1F0 } + +D_AQ_601E9F0: + { type: GFX, offset: 0x601E9F0, symbol: D_AQ_601E9F0 } + +D_AQ_601EC68: + { type: SF64:ANIM, offset: 0x601EC68, symbol: D_AQ_601EC68 } + +D_AQ_601EDB4: + { type: SF64:SKELETON, offset: 0x601EDB4, symbol: D_AQ_601EDB4 } + +D_AQ_601EDE0: + { type: GFX, offset: 0x601EDE0, symbol: D_AQ_601EDE0 } + +D_AQ_601F2F0: + { type: GFX, offset: 0x601F2F0, symbol: D_AQ_601F2F0 } + +D_AQ_601F830: + { type: GFX, offset: 0x601F830, symbol: D_AQ_601F830 } + +D_AQ_601FD70: + { type: GFX, offset: 0x601FD70, symbol: D_AQ_601FD70 } + +D_AQ_6020A40: + { type: SF64:ANIM, offset: 0x6020A40, symbol: D_AQ_6020A40 } + +D_AQ_6020C6C: + { type: SF64:SKELETON, offset: 0x6020C6C, symbol: D_AQ_6020C6C } + +D_AQ_6021058: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6021058, symbol: D_AQ_6021058 } + +D_AQ_6021858: + { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x6021858, symbol: D_AQ_6021858, tlut: 0x6021C58 } + +D_AQ_6021C58: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 232, offset: 0x6021C58, symbol: D_AQ_6021C58 } + +D_AQ_602201C: + { type: SF64:ANIM, offset: 0x602201C, symbol: D_AQ_602201C } + +D_AQ_60220E8: + { type: SF64:SKELETON, offset: 0x60220E8, symbol: D_AQ_60220E8 } + +D_AQ_6022110: + { type: GFX, offset: 0x6022110, symbol: D_AQ_6022110 } + +D_AQ_6022198: + { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x6022198, symbol: D_AQ_6022198, tlut: 0x6022598 } + +D_AQ_6022598: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 248, offset: 0x6022598, symbol: D_AQ_6022598 } + +D_AQ_6022788: + { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x6022788, symbol: D_AQ_6022788, tlut: 0x6022888 } + +D_AQ_6022888: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 152, offset: 0x6022888, symbol: D_AQ_6022888 } + +D_AQ_60229B8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60229B8, symbol: D_AQ_60229B8 } + +D_AQ_60231C0: + { type: GFX, offset: 0x60231C0, symbol: D_AQ_60231C0 } + +D_AQ_6023780: + { type: SF64:ANIM, offset: 0x6023780, symbol: D_AQ_6023780 } + +D_AQ_602390C: + { type: SF64:SKELETON, offset: 0x602390C, symbol: D_AQ_602390C } + +D_AQ_6023940: + { type: GFX, offset: 0x6023940, symbol: D_AQ_6023940 } + +D_AQ_6023B80: + { type: GFX, offset: 0x6023B80, symbol: D_AQ_6023B80 } + +D_AQ_6023D70: + { type: GFX, offset: 0x6023D70, symbol: D_AQ_6023D70 } + +D_AQ_6023EB0: + { type: GFX, offset: 0x6023EB0, symbol: D_AQ_6023EB0 } + +D_AQ_6023F38: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6023F38, symbol: D_AQ_6023F38 } + +D_AQ_6024738: + { type: TEXTURE, ctype: u16, format: IA16, width: 16, height: 16, offset: 0x6024738, symbol: D_AQ_6024738 } + +D_AQ_6024938: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x6024938, symbol: D_AQ_6024938 } + +D_AQ_60249C0: + { type: GFX, offset: 0x60249C0, symbol: D_AQ_60249C0 } + +D_AQ_6024A50: + { type: GFX, offset: 0x6024A50, symbol: D_AQ_6024A50 } + +D_AQ_6024F80: + { type: SF64:ANIM, offset: 0x6024F80, symbol: D_AQ_6024F80 } + +D_AQ_602512C: + { type: SF64:SKELETON, offset: 0x602512C, symbol: D_AQ_602512C } + +D_AQ_60260EC: + { type: SF64:ANIM, offset: 0x60260EC, symbol: D_AQ_60260EC } + +D_AQ_60263F8: + { type: SF64:SKELETON, offset: 0x60263F8, symbol: D_AQ_60263F8 } + +D_AQ_6026460: + { type: GFX, offset: 0x6026460, symbol: D_AQ_6026460 } + +D_AQ_60266B0: + { type: GFX, offset: 0x60266B0, symbol: D_AQ_60266B0 } + +D_AQ_6026950: + { type: GFX, offset: 0x6026950, symbol: D_AQ_6026950 } + +D_AQ_6026BF0: + { type: GFX, offset: 0x6026BF0, symbol: D_AQ_6026BF0 } + +D_AQ_6026C80: + { type: GFX, offset: 0x6026C80, symbol: D_AQ_6026C80 } + +D_AQ_6026D10: + { type: GFX, offset: 0x6026D10, symbol: D_AQ_6026D10 } + +D_AQ_6026DA0: + { type: GFX, offset: 0x6026DA0, symbol: D_AQ_6026DA0 } + +D_AQ_6026E30: + { type: GFX, offset: 0x6026E30, symbol: D_AQ_6026E30 } + +D_AQ_6026EC0: + { type: GFX, offset: 0x6026EC0, symbol: D_AQ_6026EC0 } + +D_AQ_6026F60: + { type: GFX, offset: 0x6026F60, symbol: D_AQ_6026F60 } + +D_AQ_6027330: + { type: GFX, offset: 0x6027330, symbol: D_AQ_6027330 } + +D_AQ_60273C0: + { type: GFX, offset: 0x60273C0, symbol: D_AQ_60273C0 } + +D_AQ_6027460: + { type: GFX, offset: 0x6027460, symbol: D_AQ_6027460 } + +D_AQ_60276F0: + { type: GFX, offset: 0x60276F0, symbol: D_AQ_60276F0 } + +D_AQ_6027810: + { type: GFX, offset: 0x6027810, symbol: D_AQ_6027810 } + +D_AQ_6027930: + { type: GFX, offset: 0x6027930, symbol: D_AQ_6027930 } + +D_AQ_6027C90: + { type: GFX, offset: 0x6027C90, symbol: D_AQ_6027C90 } + +D_AQ_6027FA0: + { type: GFX, offset: 0x6027FA0, symbol: D_AQ_6027FA0 } + +D_AQ_6028240: + { type: GFX, offset: 0x6028240, symbol: D_AQ_6028240 } + +D_AQ_6028550: + { type: GFX, offset: 0x6028550, symbol: D_AQ_6028550 } + +D_AQ_60287F0: + { type: GFX, offset: 0x60287F0, symbol: D_AQ_60287F0 } + +D_AQ_6028910: + { type: GFX, offset: 0x6028910, symbol: D_AQ_6028910 } + +D_AQ_6028A80: + { type: GFX, offset: 0x6028A80, symbol: D_AQ_6028A80 } + +D_AQ_6028F50: + { type: GFX, offset: 0x6028F50, symbol: D_AQ_6028F50 } + +D_AQ_60290C0: + { type: GFX, offset: 0x60290C0, symbol: D_AQ_60290C0 } + +D_AQ_60291B0: + { type: GFX, offset: 0x60291B0, symbol: D_AQ_60291B0 } + +D_AQ_6029240: + { type: GFX, offset: 0x6029240, symbol: D_AQ_6029240 } + +D_AQ_6029330: + { type: GFX, offset: 0x6029330, symbol: D_AQ_6029330 } + +D_AQ_60294A0: + { type: GFX, offset: 0x60294A0, symbol: D_AQ_60294A0 } + +D_AQ_6029530: + { type: GFX, offset: 0x6029530, symbol: D_AQ_6029530 } + +D_AQ_60296A0: + { type: GFX, offset: 0x60296A0, symbol: D_AQ_60296A0 } + +D_AQ_6029790: + { type: GFX, offset: 0x6029790, symbol: D_AQ_6029790 } + +D_AQ_6029900: + { type: GFX, offset: 0x6029900, symbol: D_AQ_6029900 } + +D_AQ_602AC28: + { type: SF64:ANIM, offset: 0x602AC28, symbol: D_AQ_602AC28 } + +D_AQ_602AC40: + { type: GFX, offset: 0x602AC40, symbol: D_AQ_602AC40 } + +D_AQ_602ACC0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x602ACC0, symbol: D_AQ_602ACC0 } + +D_AQ_602B4C0: + { type: GFX, offset: 0x602B4C0, symbol: D_AQ_602B4C0 } + +D_AQ_602B9D4: # unused and possibly broken + { type: SF64:ANIM, offset: 0x602B9D4, symbol: D_AQ_602B9D4 } + +D_AQ_602BD60: + { type: SF64:SKELETON, offset: 0x602BD60, symbol: D_AQ_602BD60 } + +D_AQ_602BF88: + { type: SF64:ANIM, offset: 0x602BF88, symbol: D_AQ_602BF88 } + +D_AQ_602C014: + { type: SF64:SKELETON, offset: 0x602C014, symbol: D_AQ_602C014 } + +D_AQ_602C030: + { type: GFX, offset: 0x602C030, symbol: D_AQ_602C030 } + +D_AQ_602C088: + { type: GFX, offset: 0x602C088, symbol: D_AQ_602C088 } + +D_AQ_602C160: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x602C160, symbol: D_AQ_602C160 } + +D_AQ_602C960: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x602C960, symbol: D_AQ_602C960 } + +D_AQ_602DA28: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x602DA28, symbol: D_AQ_602DA28 } + +D_AQ_602DC28: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x602DC28, symbol: D_AQ_602DC28 } + +D_AQ_602DE28: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x602DE28, symbol: D_AQ_602DE28 } + +D_AQ_602E028: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x602E028, symbol: D_AQ_602E028 } + +D_AQ_602E540: + { type: SF64:ENVIRONMENT, offset: 0x602E540, symbol: D_AQ_602E540 } + +D_AQ_602E584: + { type: SF64:ENVIRONMENT, offset: 0x602E584, symbol: D_AQ_602E584 } + +D_AQ_602E5C8: + { type: SF64:OBJECT_INIT, offset: 0x602E5C8, symbol: D_AQ_602E5C8 } + +D_AQ_60308B8: + { type: SF64:SCRIPT, offset: 0x60308B8, symbol: D_AQ_60308B8 } + +D_AQ_6030B10: + { type: SF64:HITBOX, offset: 0x6030B10, symbol: D_AQ_6030B10 } + +D_AQ_6030B14_f32: + { type: SF64:HITBOX, offset: 0x6030B14, symbol: D_AQ_6030B14_f32 } + +D_AQ_6030B30: + { type: SF64:HITBOX, offset: 0x6030B30, symbol: D_AQ_6030B30 } + +D_AQ_6030B4C: + { type: SF64:HITBOX, offset: 0x6030B4C, symbol: D_AQ_6030B4C } + +D_AQ_6030B68: + { type: SF64:HITBOX, offset: 0x6030B68, symbol: D_AQ_6030B68 } + +D_AQ_6030BAC: + { type: SF64:HITBOX, offset: 0x6030BAC, symbol: D_AQ_6030BAC } + +D_AQ_6030BE0: + { type: SF64:HITBOX, offset: 0x6030BE0, symbol: D_AQ_6030BE0 } + +D_AQ_6030BFC: + { type: SF64:HITBOX, offset: 0x6030BFC, symbol: D_AQ_6030BFC } + +D_AQ_6030C18: + { type: SF64:HITBOX, offset: 0x6030C18, symbol: D_AQ_6030C18 } + +D_AQ_6030C44: + { type: SF64:HITBOX, offset: 0x6030C44, symbol: D_AQ_6030C44 } + +D_AQ_6030C60: + { type: SF64:HITBOX, offset: 0x6030C60, symbol: D_AQ_6030C60 } + +D_AQ_6030C7C: + { type: SF64:HITBOX, offset: 0x6030C7C, symbol: D_AQ_6030C7C } + +D_AQ_6030D20: + { type: SF64:HITBOX, offset: 0x6030D20, symbol: D_AQ_6030D20 } + +D_AQ_6030D3C: + { type: SF64:HITBOX, offset: 0x6030D3C, symbol: D_AQ_6030D3C } + +D_AQ_6030D58: + { type: SF64:HITBOX, offset: 0x6030D58, symbol: D_AQ_6030D58 } + +D_AQ_6030D74: + { type: SF64:HITBOX, offset: 0x6030D74, symbol: D_AQ_6030D74 } + +D_AQ_6030DF8: + { type: SF64:HITBOX, offset: 0x6030DF8, symbol: D_AQ_6030DF8 } + +D_AQ_6030E14: + { type: SF64:HITBOX, offset: 0x6030E14, symbol: D_AQ_6030E14 } + +D_AQ_6030E30_Hitbox: + { type: SF64:HITBOX, offset: 0x6030E30, symbol: D_AQ_6030E30_Hitbox } + +D_AQ_6030E4C: + { type: SF64:HITBOX, offset: 0x6030E4C, symbol: D_AQ_6030E4C } + +D_AQ_6030E68: + { type: SF64:HITBOX, offset: 0x6030E68, symbol: D_AQ_6030E68 } + +D_AQ_6030F74: + { type: SF64:HITBOX, offset: 0x6030F74, symbol: D_AQ_6030F74 } + +D_AQ_6031398: + { type: SF64:HITBOX, offset: 0x6031398, symbol: D_AQ_6031398 } + +D_AQ_60313CC: + { type: SF64:HITBOX, offset: 0x60313CC, symbol: D_AQ_60313CC } + +D_AQ_6031400: + { type: SF64:HITBOX, offset: 0x6031400, symbol: D_AQ_6031400 } + +D_AQ_603144C: + { type: SF64:HITBOX, offset: 0x603144C, symbol: D_AQ_603144C } + +D_AQ_6031480: + { type: SF64:HITBOX, offset: 0x6031480, symbol: D_AQ_6031480 } + +D_AQ_60314AC: + { type: SF64:HITBOX, offset: 0x60314AC, symbol: D_AQ_60314AC } + +D_AQ_60314C8: + { type: SF64:HITBOX, offset: 0x60314C8, symbol: D_AQ_60314C8 } + +D_AQ_60314E4: + { type: SF64:HITBOX, offset: 0x60314E4, symbol: D_AQ_60314E4 } + +D_AQ_6031500: + { type: SF64:HITBOX, offset: 0x6031500, symbol: D_AQ_6031500 } + +D_AQ_603151C: + { type: SF64:HITBOX, offset: 0x603151C, symbol: D_AQ_603151C } + +D_AQ_6031538: + { type: SF64:HITBOX, offset: 0x6031538, symbol: D_AQ_6031538 } + +D_AQ_6031554: + { type: SF64:HITBOX, offset: 0x6031554, symbol: D_AQ_6031554 } + +D_AQ_6031570: + { type: SF64:HITBOX, offset: 0x6031570, symbol: D_AQ_6031570 } + +D_AQ_603158C: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x603158C, symbol: D_AQ_603158C } + +D_AQ_6031D90: + { type: VTX, count: 34, offset: 0x6031D90, symbol: D_AQ_6031D90 } + +D_AQ_6031FB0: + { type: SF64:TRIANGLE, count: 8, offset: 0x6031FB0, symbol: D_AQ_6031FB0, mesh_symbol: D_AQ_OFFSET, mesh_count: 2} + +D_AQ_60320B8: + { type: SF64:TRIANGLE, count: 30, offset: 0x60320B8, symbol: D_AQ_60320B8, mesh_symbol: D_AQ_OFFSET } + +D_AQ_6032388: + { type: SF64:TRIANGLE, count: 28, offset: 0x6032388, symbol: D_AQ_6032388, mesh_symbol: D_AQ_OFFSET } diff --git a/assets/yaml/us/rev1/ast_area_6.yaml b/assets/yaml/us/rev1/ast_area_6.yaml new file mode 100644 index 00000000..100e6e03 --- /dev/null +++ b/assets/yaml/us/rev1/ast_area_6.yaml @@ -0,0 +1,253 @@ +:config: + segments: + - [0x06, 0xA8B470] + header: + code: + - '#include "assets/ast_area_6.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + - '#include "sf64level.h"' + - '#include "sf64event.h"' + - '#include "sf64player.h"' + - '#include "sf64audio_external.h"' + - '#include "sf64mesg.h"' +D_A6_6000000: + { type: TEXTURE, ctype: u8, format: IA8, width: 104, height: 28, offset: 0x6000000, symbol: D_A6_6000000 } + +D_A6_6000B60: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x06000B60, symbol: D_A6_6000B60 } + +D_A6_6001A80: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x06001A80, symbol: D_A6_6001A80 } + +D_A6_60029A0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x060029A0, symbol: D_A6_60029A0 } + +D_A6_60038C0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x060038C0, symbol: D_A6_60038C0 } + +D_A6_60047E0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x060047E0, symbol: D_A6_60047E0 } + +D_A6_6005700: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x06005700, symbol: D_A6_6005700 } + +D_A6_6006620: + { type: TEXTURE, ctype: u8, format: CI4, width: 48, height: 44, offset: 0x06006620, symbol: D_A6_6006620, tlut: 0x06006A40 } + +D_A6_6006A40: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 4, offset: 0x6006A40, symbol: D_A6_6006A40} + +D_A6_6008918: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06008918, symbol: D_A6_6008918 } + +D_A6_6008B18: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06008B18, symbol: D_A6_6008B18 } + +D_A6_6008D18: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06008D18, symbol: D_A6_6008D18 } + +D_A6_6008F18: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06008F18, symbol: D_A6_6008F18 } + +D_A6_6009718: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 16, offset: 0x06009718, symbol: D_A6_6009718 } + +D_A6_6009B18: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06009B18, symbol: D_A6_6009B18 } + +D_A6_600E0C0: + { type: GFX, offset: 0x600E0C0, symbol: D_A6_600E0C0 } + +D_A6_600EBE8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 16, offset: 0x0600EBE8, symbol: D_A6_600EBE8 } + +D_A6_600EFE8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x0600EFE8, symbol: D_A6_600EFE8 } + +D_A6_600F1F0: + { type: GFX, offset: 0x600F1F0, symbol: D_A6_600F1F0 } + +D_A6_600F850: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0600F850, symbol: D_A6_600F850 } + +D_A6_6010A88: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06010A88, symbol: D_A6_6010A88 } + +D_A6_6011288: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 16, offset: 0x06011288, symbol: D_A6_6011288 } + +D_A6_6011688: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06011688, symbol: D_A6_6011688 } + +D_A6_6011888: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x06011888, symbol: D_A6_6011888 } + +D_A6_6011910: + { type: GFX, offset: 0x6011910, symbol: D_A6_6011910 } + +D_A6_6011D48: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06011D48, symbol: D_A6_6011D48 } + +D_A6_6012550: + { type: GFX, offset: 0x6012550, symbol: D_A6_6012550 } + +D_A6_6012840: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06012840, symbol: D_A6_6012840 } + +D_A6_6012A40: + { type: GFX, offset: 0x6012A40, symbol: D_A6_6012A40 } + +D_A6_6013CD8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06013CD8, symbol: D_A6_6013CD8 } + +D_A6_60144D8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x060144D8, symbol: D_A6_60144D8 } + +D_A6_6014CD8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06014CD8, symbol: D_A6_6014CD8 } + +D_A6_60154D8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x060154D8, symbol: D_A6_60154D8 } + +D_A6_6015CD8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06015CD8, symbol: D_A6_6015CD8 } + +D_A6_6015EE0: + { type: GFX, offset: 0x6015EE0, symbol: D_A6_6015EE0 } + +D_A6_6016190: + { type: GFX, offset: 0x6016190, symbol: D_A6_6016190 } + +D_A6_6017120: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06017120, symbol: D_A6_6017120 } + +D_A6_6017920: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06017920, symbol: D_A6_6017920 } + +D_A6_6017B20: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06017B20, symbol: D_A6_6017B20 } + +D_A6_6017D20: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06017D20, symbol: D_A6_6017D20 } + +D_A6_6017F20: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06017F20, symbol: D_A6_6017F20 } + +D_A6_6018720: + { type: GFX, offset: 0x6018720, symbol: D_A6_6018720 } + +D_A6_60187F8: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x60187F8, symbol: D_A6_60187F8, tlut: 0x6018878} + +D_A6_6018878: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x6018878, symbol: D_A6_6018878} + +D_A6_6018994: + { type: SF64:ANIM, offset: 0x6018994, symbol: D_A6_6018994 } + +D_A6_6018BA0: + { type: SF64:SKELETON, offset: 0x6018BA0, symbol: D_A6_6018BA0 } + +D_A6_6018BF0: + { type: GFX, offset: 0x6018BF0, symbol: D_A6_6018BF0 } + +D_A6_6019130: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06019130, symbol: D_A6_6019130 } + +D_A6_6019330: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06019330, symbol: D_A6_6019330 } + +D_A6_6019530: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06019530, symbol: D_A6_6019530 } + +D_A6_6019730: + { type: GFX, offset: 0x6019730, symbol: D_A6_6019730 } + +D_A6_6019B20: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06019B20, symbol: D_A6_6019B20 } + +D_A6_6019D20: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06019D20, symbol: D_A6_6019D20 } + +D_A6_6019F20: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06019F20, symbol: D_A6_6019F20 } + +D_A6_601A120: + { type: GFX, offset: 0x601A120, symbol: D_A6_601A120 } + +D_A6_601A220: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601A220, symbol: D_A6_601A220 } + +D_A6_601AA20: + { type: GFX, offset: 0x601AA20, symbol: D_A6_601AA20 } + +D_A6_601AAA8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601AAA8, symbol: D_A6_601AAA8 } + +D_A6_601B2B0: + { type: GFX, offset: 0x601B2B0, symbol: D_A6_601B2B0 } + +D_A6_601B338: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601B338, symbol: D_A6_601B338 } + +D_A6_601BB40: + { type: GFX, offset: 0x601BB40, symbol: D_A6_601BB40 } + +D_A6_601BF20: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x0601BF20, symbol: D_A6_601BF20 } + +D_A6_601CF20: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x0601CF20, symbol: D_A6_601CF20 } + +D_A6_601DF20: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x0601DF20, symbol: D_A6_601DF20 } + +D_A6_601EF20: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x0601EF20, symbol: D_A6_601EF20 } + +D_A6_601FF20: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x0601FF20, symbol: D_A6_601FF20 } + +D_A6_6020F20: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06020F20, symbol: D_A6_6020F20 } + +D_A6_6021F20: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06021F20, symbol: D_A6_6021F20 } + +D_A6_6022F20: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06022F20, symbol: D_A6_6022F20 } + +D_A6_6023F20: + { type: SF64:ENVIRONMENT, offset: 0x6023F20, symbol: D_A6_6023F20} + +D_A6_6023F64: + { type: SF64:OBJECT_INIT, offset: 0x6023F64, symbol: D_A6_6023F64} + +D_A6_6027F50: + { type: SF64:SCRIPT, offset: 0x6027F50, symbol: D_A6_6027F50} + +D_A6_60280E0: + { type: SF64:HITBOX, offset: 0x60280E0, symbol: D_A6_60280E0 } + +D_A6_6028254: + { type: SF64:HITBOX, offset: 0x6028254, symbol: D_A6_6028254 } + +D_A6_60282A0: + { type: SF64:HITBOX, offset: 0x60282A0, symbol: D_A6_60282A0 } + +D_A6_6028454: + { type: SF64:HITBOX, offset: 0x6028454, symbol: D_A6_6028454 } + +D_A6_6028578: + { type: SF64:HITBOX, offset: 0x6028578, symbol: D_A6_6028578 } + +D_A6_6028760: + { type: SF64:ENVIRONMENT, offset: 0x6028760, symbol: D_A6_6028760} + +D_A6_60287A4: + { type: SF64:OBJECT_INIT, offset: 0x60287A4, symbol: D_A6_60287A4} + +D_A6_60289FC: + { type: SF64:SCRIPT, offset: 0x60289FC, symbol: D_A6_60289FC} diff --git a/assets/yaml/us/rev1/ast_arwing.yaml b/assets/yaml/us/rev1/ast_arwing.yaml new file mode 100644 index 00000000..43443489 --- /dev/null +++ b/assets/yaml/us/rev1/ast_arwing.yaml @@ -0,0 +1,192 @@ +:config: + segments: + - [0x3, 0x8BFC00] + header: + code: + - '#include "assets/ast_arwing.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + +D_arwing_3000000: + { type: TEXTURE, format: CI4, offset: 0x3000000, width: 16, height: 16, ctype: u8, tlut: 0x3000080, symbol: D_arwing_3000000 } + +D_arwing_3000080: + { type: TEXTURE, format: TLUT, offset: 0x3000080, colors: 8, ctype: u16, symbol: D_arwing_3000080 } + +D_arwing_3000090: + { type: GFX, offset: 0x3000090, symbol: D_arwing_3000090 } + +D_arwing_3001C90: + { type: GFX, offset: 0x3001C90, symbol: D_arwing_3001C90 } + +D_arwing_3003960: + { type: TEXTURE, format: RGBA16, offset: 0x3003960, width: 8, height: 8, ctype: u16, symbol: D_arwing_3003960 } + +D_arwing_30039E0: + { type: TEXTURE, format: RGBA16, offset: 0x30039E0, width: 8, height: 8, ctype: u16, symbol: D_arwing_30039E0 } + +D_arwing_3003A60: + { type: TEXTURE, format: RGBA16, offset: 0x3003A60, width: 8, height: 8, ctype: u16, symbol: D_arwing_3003A60 } + +D_arwing_3003AE0: + { type: TEXTURE, format: RGBA16, offset: 0x3003AE0, width: 8, height: 8, ctype: u16, symbol: D_arwing_3003AE0 } + +D_arwing_3003B60: + { type: TEXTURE, format: RGBA16, offset: 0x3003B60, width: 8, height: 8, ctype: u16, symbol: D_arwing_3003B60 } + +D_arwing_3003BE0: + { type: TEXTURE, format: RGBA16, offset: 0x3003BE0, width: 8, height: 8, ctype: u16, symbol: D_arwing_3003BE0 } + +D_arwing_3003C60: + { type: TEXTURE, format: RGBA16, offset: 0x3003C60, width: 8, height: 8, ctype: u16, symbol: D_arwing_3003C60 } + +D_arwing_3003CE0: + { type: GFX, offset: 0x3003CE0, symbol: D_arwing_3003CE0 } + +D_arwing_3005AB0: + { type: GFX, offset: 0x3005AB0, symbol: D_arwing_3005AB0 } + +D_arwing_30074D0: + { type: TEXTURE, format: RGBA16, offset: 0x30074D0, width: 8, height: 8, ctype: u16, symbol: D_arwing_30074D0 } + +D_arwing_3007550: + { type: TEXTURE, format: RGBA16, offset: 0x3007550, width: 8, height: 8, ctype: u16, symbol: D_arwing_3007550 } + +D_arwing_30075D0: + { type: TEXTURE, format: RGBA16, offset: 0x30075D0, width: 8, height: 8, ctype: u16, symbol: D_arwing_30075D0 } + +D_arwing_3007650: + { type: GFX, offset: 0x3007650, symbol: D_arwing_3007650 } + +ast_arwing_seg3_vtx_7A20: + { type: VTX, offset: 0x3007A20, count: 244, symbol: ast_arwing_seg3_vtx_7A20 } + +D_arwing_3008960: + { type: TEXTURE, format: RGBA16, offset: 0x3008960, width: 64, height: 32, ctype: u16, symbol: D_arwing_3008960 } + +D_arwing_3009960: + { type: TEXTURE, format: RGBA16, offset: 0x3009960, width: 16, height: 16, ctype: u16, symbol: D_arwing_3009960 } + +D_arwing_3009B60: + { type: GFX, offset: 0x3009B60, symbol: D_arwing_3009B60 } + +D_arwing_300AC48: + { type: TEXTURE, format: RGBA16, offset: 0x300AC48, width: 32, height: 32, ctype: u16, symbol: D_arwing_300AC48 } + +D_arwing_300B448: + { type: TEXTURE, format: RGBA16, offset: 0x300B448, width: 32, height: 32, ctype: u16, symbol: D_arwing_300B448 } + +D_arwing_300BC48: + { type: TEXTURE, format: RGBA16, offset: 0x300BC48, width: 32, height: 32, ctype: u16, symbol: D_arwing_300BC48 } + +D_arwing_300C448: + { type: TEXTURE, format: RGBA16, offset: 0x300C448, width: 32, height: 32, ctype: u16, symbol: D_arwing_300C448 } + +D_arwing_300CC48: + { type: TEXTURE, format: RGBA16, offset: 0x300CC48, width: 32, height: 32, ctype: u16, symbol: D_arwing_300CC48 } + +D_arwing_300D448: + { type: TEXTURE, format: RGBA16, offset: 0x300D448, width: 32, height: 32, ctype: u16, symbol: D_arwing_300D448 } + +D_arwing_300DC48: + { type: TEXTURE, format: RGBA16, offset: 0x300DC48, width: 32, height: 32, ctype: u16, symbol: D_arwing_300DC48 } + +D_arwing_300E448: + { type: TEXTURE, format: RGBA16, offset: 0x300E448, width: 32, height: 32, ctype: u16, symbol: D_arwing_300E448 } + +D_arwing_300EC48: + { type: TEXTURE, format: RGBA16, offset: 0x300EC48, width: 32, height: 32, ctype: u16, symbol: D_arwing_300EC48 } + +D_arwing_300F448: + { type: TEXTURE, format: RGBA16, offset: 0x300F448, width: 64, height: 32, ctype: u16, symbol: D_arwing_300F448 } + +D_arwing_3010448: + { type: TEXTURE, format: RGBA16, offset: 0x3010448, width: 64, height: 32, ctype: u16, symbol: D_arwing_3010448 } + +D_arwing_3011720: + { type: GFX, offset: 0x3011720, symbol: D_arwing_3011720 } + +D_arwing_30119F0: + { type: TEXTURE, format: RGBA16, offset: 0x30119F0, width: 32, height: 32, ctype: u16, symbol: D_arwing_30119F0 } + +D_arwing_30121F0: + { type: TEXTURE, format: RGBA16, offset: 0x30121F0, width: 32, height: 32, ctype: u16, symbol: D_arwing_30121F0 } + +D_arwing_30129F0: + { type: TEXTURE, format: RGBA16, offset: 0x30129F0, width: 32, height: 32, ctype: u16, symbol: D_arwing_30129F0 } + +D_arwing_30131F0: + { type: GFX, offset: 0x30131F0, symbol: D_arwing_30131F0 } + +D_arwing_30137E8: + { type: TEXTURE, format: RGBA16, offset: 0x30137E8, width: 32, height: 32, ctype: u16, symbol: D_arwing_30137E8 } + +D_arwing_3013FE8: + { type: TEXTURE, format: RGBA16, offset: 0x3013FE8, width: 32, height: 32, ctype: u16, symbol: D_arwing_3013FE8 } + +D_arwing_30147E8: + { type: TEXTURE, format: RGBA16, offset: 0x30147E8, width: 16, height: 32, ctype: u16, symbol: D_arwing_30147E8 } + +D_arwing_3014BF0: + { type: GFX, offset: 0x3014BF0, symbol: D_arwing_3014BF0 } + +D_arwing_3014F20: + { type: TEXTURE, format: RGBA16, offset: 0x3014F20, width: 16, height: 16, ctype: u16, symbol: D_arwing_3014F20 } + +D_arwing_3015120: + { type: GFX, offset: 0x3015120, symbol: D_arwing_3015120 } + +D_arwing_30155E0: + { type: GFX, offset: 0x30155E0, symbol: D_arwing_30155E0} + +D_arwing_3015AF4: + { type: SF64:ANIM, offset: 0x3015AF4, symbol: D_arwing_3015AF4 } + +D_arwing_3015C28: + { type: SF64:ANIM, offset: 0x3015C28, symbol: D_arwing_3015C28 } + +D_arwing_3015D68: + { type: SF64:ANIM, offset: 0x3015D68, symbol: D_arwing_3015D68 } + +D_arwing_3015D80: + { type: GFX, offset: 0x3015D80, symbol: D_arwing_3015D80 } + +D_arwing_30163C4: + { type: SF64:ANIM, offset: 0x30163C4, symbol: D_arwing_30163C4 } + +D_arwing_3016610: + { type: SF64:SKELETON, offset: 0x3016610, symbol: D_arwing_3016610 } + +D_arwing_3016660: + { type: GFX, offset: 0x3016660, symbol: D_arwing_3016660} + +D_arwing_3016B30: + { type: GFX, offset: 0x3016B30, symbol: D_arwing_3016B30 } + +D_arwing_3016BB8: + { type: TEXTURE, format: IA8, offset: 0x3016BB8, width: 16, height: 16, ctype: u8, symbol: D_arwing_3016BB8 } + +D_arwing_3016CC0: + { type: GFX, offset: 0x3016CC0, symbol: D_arwing_3016CC0 } + +D_arwing_30182C8: + { type: TEXTURE, format: RGBA16, offset: 0x30182C8, width: 8, height: 8, ctype: u16, symbol: D_arwing_30182C8 } + +D_arwing_3018348: + { type: TEXTURE, format: RGBA16, offset: 0x3018348, width: 8, height: 8, ctype: u16, symbol: D_arwing_3018348 } + +D_arwing_30183D0: + { type: GFX, offset: 0x30183D0, symbol: D_arwing_30183D0 } + +D_arwing_30184D8: + { type: TEXTURE, format: RGBA16, offset: 0x30184D8, width: 32, height: 32, ctype: u16, symbol: D_arwing_30184D8 } + +D_arwing_3018CD8: + { type: TEXTURE, format: RGBA16, offset: 0x3018CD8, width: 64, height: 16, ctype: u16, symbol: D_arwing_3018CD8 } + +D_arwing_30194E0: + { type: GFX, offset: 0x30194E0, symbol: D_arwing_30194E0 } + +D_arwing_30195E8: + { type: TEXTURE, format: RGBA16, offset: 0x30195E8, width: 32, height: 32, ctype: u16, symbol: D_arwing_30195E8 } diff --git a/assets/yaml/us/rev1/ast_bg_planet.yaml b/assets/yaml/us/rev1/ast_bg_planet.yaml new file mode 100644 index 00000000..69ee7ae3 --- /dev/null +++ b/assets/yaml/us/rev1/ast_bg_planet.yaml @@ -0,0 +1,129 @@ +:config: + segments: + - [0x02, 0x8AE0A0] + header: + code: + - '#include "assets/ast_bg_planet.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + +D_BG_PLANET_2000000: + { type: GFX, offset: 0x2000000, symbol: D_BG_PLANET_2000000 } + +D_BG_PLANET_2000088: + { type: TEXTURE, ctype: u32, format: RGBA32, width: 32, height: 32, offset: 0x2000088, symbol: D_BG_PLANET_2000088 } + +D_BG_PLANET_2001090: + { type: GFX, offset: 0x2001090, symbol: D_BG_PLANET_2001090 } + +D_BG_PLANET_2001118: + { type: TEXTURE, ctype: u32, format: RGBA32, width: 32, height: 32, offset: 0x02001118, symbol: D_BG_PLANET_2001118 } + +D_BG_PLANET_2002120: + { type: GFX, offset: 0x2002120, symbol: D_BG_PLANET_2002120 } + +D_BG_PLANET_20021A8: + { type: TEXTURE, ctype: u32, format: RGBA32, width: 32, height: 32, offset: 0x020021A8, symbol: D_BG_PLANET_20021A8 } + +D_BG_PLANET_20031B0: + { type: GFX, offset: 0x20031B0, symbol: D_BG_PLANET_20031B0 } + +D_BG_PLANET_2003238: + { type: TEXTURE, ctype: u32, format: RGBA32, width: 32, height: 32, offset: 0x02003238, symbol: D_BG_PLANET_2003238 } + +D_BG_PLANET_2004240: + { type: GFX, offset: 0x2004240, symbol: D_BG_PLANET_2004240 } + +D_BG_PLANET_20042C8: + { type: TEXTURE, ctype: u32, format: RGBA32, width: 32, height: 32, offset: 0x020042C8, symbol: D_BG_PLANET_20042C8 } + +D_BG_PLANET_20052D0: + { type: GFX, offset: 0x20052D0, symbol: D_BG_PLANET_20052D0 } + +D_BG_PLANET_2005358: + { type: TEXTURE, ctype: u32, format: RGBA32, width: 32, height: 32, offset: 0x02005358, symbol: D_BG_PLANET_2005358 } + +D_BG_PLANET_2006360: + { type: GFX, offset: 0x2006360, symbol: D_BG_PLANET_2006360 } + +D_BG_PLANET_20063E8: + { type: TEXTURE, ctype: u32, format: RGBA32, width: 32, height: 32, offset: 0x020063E8, symbol: D_BG_PLANET_20063E8 } + +D_BG_PLANET_20073F0: + { type: GFX, offset: 0x20073F0, symbol: D_BG_PLANET_20073F0 } + +D_BG_PLANET_2007478: + { type: TEXTURE, ctype: u32, format: RGBA32, width: 32, height: 32, offset: 0x02007478, symbol: D_BG_PLANET_2007478 } + +D_BG_PLANET_2008480: + { type: GFX, offset: 0x2008480, symbol: D_BG_PLANET_2008480 } + +D_BG_PLANET_2008508: + { type: TEXTURE, ctype: u32, format: RGBA32, width: 32, height: 32, offset: 0x02008508, symbol: D_BG_PLANET_2008508 } + +D_BG_PLANET_2009510: + { type: GFX, offset: 0x2009510, symbol: D_BG_PLANET_2009510 } + +D_BG_PLANET_2009598: + { type: TEXTURE, ctype: u32, format: RGBA32, width: 32, height: 32, offset: 0x02009598, symbol: D_BG_PLANET_2009598 } + +D_BG_PLANET_200A5A0: + { type: GFX, offset: 0x200A5A0, symbol: D_BG_PLANET_200A5A0 } + +D_BG_PLANET_200A628: + { type: TEXTURE, ctype: u32, format: RGBA32, width: 32, height: 32, offset: 0x0200A628, symbol: D_BG_PLANET_200A628 } + +D_BG_PLANET_200B630: + { type: GFX, offset: 0x200B630, symbol: D_BG_PLANET_200B630 } + +D_BG_PLANET_200B6B8: + { type: TEXTURE, ctype: u32, format: RGBA32, width: 32, height: 32, offset: 0x0200B6B8, symbol: D_BG_PLANET_200B6B8 } + +D_BG_PLANET_200C6C0: + { type: GFX, offset: 0x200C6C0, symbol: D_BG_PLANET_200C6C0 } + +D_BG_PLANET_200C748: + { type: TEXTURE, ctype: u32, format: RGBA32, width: 32, height: 32, offset: 0x0200C748, symbol: D_BG_PLANET_200C748 } + +D_BG_PLANET_200D750: + { type: GFX, offset: 0x200D750, symbol: D_BG_PLANET_200D750 } + +D_BG_PLANET_200D7E8: + { type: TEXTURE, ctype: u16, format: IA16, width: 64, height: 32, offset: 0x0200D7E8, symbol: D_BG_PLANET_200D7E8 } + +D_BG_PLANET_200E7F0: + { type: GFX, offset: 0x200E7F0, symbol: D_BG_PLANET_200E7F0 } + +D_BG_PLANET_200E878: + { type: TEXTURE, ctype: u16, format: IA16, width: 32, height: 32, offset: 0x0200E878, symbol: D_BG_PLANET_200E878 } + +D_BG_PLANET_200F080: + { type: GFX, offset: 0x200F080, symbol: D_BG_PLANET_200F080 } + +D_BG_PLANET_200F108: + { type: TEXTURE, ctype: u16, format: IA16, width: 32, height: 32, offset: 0x0200F108, symbol: D_BG_PLANET_200F108 } + +D_BG_PLANET_200F910: + { type: GFX, offset: 0x200F910, symbol: D_BG_PLANET_200F910 } + +D_BG_PLANET_200F998: + { type: TEXTURE, ctype: u16, format: IA16, width: 32, height: 32, offset: 0x0200F998, symbol: D_BG_PLANET_200F998 } + +D_BG_PLANET_20101A0: + { type: GFX, offset: 0x20101A0, symbol: D_BG_PLANET_20101A0 } + +D_BG_PLANET_2010228: + { type: TEXTURE, ctype: u16, format: IA16, width: 32, height: 32, offset: 0x02010228, symbol: D_BG_PLANET_2010228 } + +D_BG_PLANET_2010A30: + { type: GFX, offset: 0x2010A30, symbol: D_BG_PLANET_2010A30 } + +D_BG_PLANET_2010AB8: + { type: TEXTURE, ctype: u16, format: IA16, width: 32, height: 32, offset: 0x02010AB8, symbol: D_BG_PLANET_2010AB8 } + +D_BG_PLANET_20112C0: + { type: GFX, offset: 0x20112C0, symbol: D_BG_PLANET_20112C0 } + +D_BG_PLANET_2011358: + { type: TEXTURE, ctype: u16, format: IA16, width: 32, height: 32, offset: 0x02011358, symbol: D_BG_PLANET_2011358 } \ No newline at end of file diff --git a/assets/yaml/us/rev1/ast_bg_space.yaml b/assets/yaml/us/rev1/ast_bg_space.yaml new file mode 100644 index 00000000..32f1e5c8 --- /dev/null +++ b/assets/yaml/us/rev1/ast_bg_space.yaml @@ -0,0 +1,93 @@ +:config: + segments: + - [0x02, 0x8A68C0] + header: + code: + - '#include "assets/ast_bg_space.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + +D_BG_SPACE_2000000: + { type: GFX, offset: 0x2000000, symbol: D_BG_SPACE_2000000 } + +D_BG_SPACE_2000088: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x2000088, symbol: D_BG_SPACE_2000088 } + +D_BG_SPACE_2000890: + { type: GFX, offset: 0x2000890, symbol: D_BG_SPACE_2000890 } + +D_BG_SPACE_2000918: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x2000918, symbol: D_BG_SPACE_2000918 } + +D_BG_SPACE_2001120: + { type: GFX, offset: 0x2001120, symbol: D_BG_SPACE_2001120 } + +D_BG_SPACE_20011A8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x020011A8, symbol: D_BG_SPACE_20011A8 } + +D_BG_SPACE_20019B0: + { type: GFX, offset: 0x20019B0, symbol: D_BG_SPACE_20019B0 } + +D_BG_SPACE_2001A38: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x02001A38, symbol: D_BG_SPACE_2001A38 } + +D_BG_SPACE_2002240: + { type: GFX, offset: 0x2002240, symbol: D_BG_SPACE_2002240 } + +D_BG_SPACE_20022C8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x020022C8, symbol: D_BG_SPACE_20022C8 } + +D_BG_SPACE_2002AD0: + { type: GFX, offset: 0x2002AD0, symbol: D_BG_SPACE_2002AD0 } + +D_BG_SPACE_2002B58: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x02002B58, symbol: D_BG_SPACE_2002B58 } + +D_BG_SPACE_2003360: + { type: GFX, offset: 0x2003360, symbol: D_BG_SPACE_2003360 } + +D_BG_SPACE_20033E8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x020033E8, symbol: D_BG_SPACE_20033E8 } + +D_BG_SPACE_2003BF0: + { type: GFX, offset: 0x2003BF0, symbol: D_BG_SPACE_2003BF0 } + +D_BG_SPACE_2003C78: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x02003C78, symbol: D_BG_SPACE_2003C78 } + +D_BG_SPACE_2004480: + { type: GFX, offset: 0x2004480, symbol: D_BG_SPACE_2004480 } + +D_BG_SPACE_2004508: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x02004508, symbol: D_BG_SPACE_2004508 } + +D_BG_SPACE_2004D10: + { type: GFX, offset: 0x2004D10, symbol: D_BG_SPACE_2004D10 } + +D_BG_SPACE_2004D98: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x02004D98, symbol: D_BG_SPACE_2004D98 } + +D_BG_SPACE_20055A0: + { type: GFX, offset: 0x20055A0, symbol: D_BG_SPACE_20055A0 } + +D_BG_SPACE_2005628: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x02005628, symbol: D_BG_SPACE_2005628 } + +D_BG_SPACE_2005E30: + { type: GFX, offset: 0x2005E30, symbol: D_BG_SPACE_2005E30 } + +D_BG_SPACE_2005EB8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x02005EB8, symbol: D_BG_SPACE_2005EB8 } + +D_BG_SPACE_20066C0: + { type: GFX, offset: 0x20066C0, symbol: D_BG_SPACE_20066C0 } + +D_BG_SPACE_2006748: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x02006748, symbol: D_BG_SPACE_2006748 } + +D_BG_SPACE_2006F50: + { type: GFX, offset: 0x2006F50, symbol: D_BG_SPACE_2006F50 } + +D_BG_SPACE_2006FD8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x02006FD8, symbol: D_BG_SPACE_2006FD8 } diff --git a/assets/yaml/us/rev1/ast_blue_marine.yaml b/assets/yaml/us/rev1/ast_blue_marine.yaml new file mode 100644 index 00000000..8889e909 --- /dev/null +++ b/assets/yaml/us/rev1/ast_blue_marine.yaml @@ -0,0 +1,90 @@ +:config: + segments: + - [0x03, 0x8E1F80] + header: + code: + - '#include "assets/ast_blue_marine.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + +D_blue_marine_3000000: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x3000000, symbol: D_blue_marine_3000000, tlut: 0x3000080 } + +D_blue_marine_3000080: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x3000080, symbol: D_blue_marine_3000080 } + +D_blue_marine_3000090: + { type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 9, offset: 0x3000090, symbol: D_blue_marine_3000090, tlut: 0x3000120 } + +D_blue_marine_3000120: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x3000120, symbol: D_blue_marine_3000120 } + +D_blue_marine_3000130: + { type: GFX, offset: 0x3000130, symbol: D_blue_marine_3000130 } + +ast_blue_marine_seg3_vtx_00000418: + { type: VTX, count: 5, offset: 0x3000418, symbol: D_blue_marine_3000418 } + +D_blue_marine_3000470: + { type: GFX, offset: 0x3000470, symbol: D_blue_marine_3000470 } + +D_blue_marine_30005E8: + { type: BLOB, size: 24, offset: 0x30005E8, symbol: D_blue_marine_30005E8 } + +D_blue_marine_3000600: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 8, offset: 0x3000600, symbol: D_blue_marine_3000600, tlut: 0x3000640 } + +D_blue_marine_3000640: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x3000640, symbol: D_blue_marine_3000640 } + +D_blue_marine_3000660: + { type: GFX, offset: 0x3000660, symbol: D_blue_marine_3000660 } + +D_blue_marine_30006E8: + { type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 32, offset: 0x30006E8, symbol: D_blue_marine_30006E8 } + +D_blue_marine_3000AF0: + { type: GFX, offset: 0x3000AF0, symbol: D_blue_marine_3000AF0 } + +D_blue_marine_3000C70: + { type: GFX, offset: 0x3000C70, symbol: D_blue_marine_3000C70 } + +D_blue_marine_3001900: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x3001900, symbol: D_blue_marine_3001900 } + +D_blue_marine_3001980: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x3001980, symbol: D_blue_marine_3001980 } + +D_blue_marine_3002180: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x3002180, symbol: D_blue_marine_3002180 } + +D_blue_marine_3002980: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x3002980, symbol: D_blue_marine_3002980 } + +D_blue_marine_3003180: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x3003180, symbol: D_blue_marine_3003180 } + +D_blue_marine_3003980: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x3003980, symbol: D_blue_marine_3003980 } + +D_blue_marine_3004180: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x3004180, symbol: D_blue_marine_3004180 } + +D_blue_marine_3004980: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x3004980, symbol: D_blue_marine_3004980 } + +D_blue_marine_3005980: + { type: GFX, offset: 0x3005980, symbol: D_blue_marine_3005980 } + +D_blue_marine_30062E8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x30062E8, symbol: D_blue_marine_30062E8 } + +D_blue_marine_3006AF0: + { type: GFX, offset: 0x3006AF0, symbol: D_blue_marine_3006AF0 } + +D_blue_marine_3006C70: + { type: GFX, offset: 0x3006C70, symbol: D_blue_marine_3006C70 } + +D_blue_marine_3006DE0: + { type: GFX, offset: 0x3006DE0, symbol: D_blue_marine_3006DE0 } diff --git a/assets/yaml/us/rev1/ast_bolse.yaml b/assets/yaml/us/rev1/ast_bolse.yaml new file mode 100644 index 00000000..78e5c128 --- /dev/null +++ b/assets/yaml/us/rev1/ast_bolse.yaml @@ -0,0 +1,200 @@ +:config: + segments: + - [0x06, 0xB0AA00] + header: + code: + - '#include "assets/ast_bolse.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + - '#include "sf64level.h"' + - '#include "sf64event.h"' + - '#include "sf64player.h"' + - '#include "sf64audio_external.h"' + - '#include "sf64mesg.h"' +# Bolse Defense Outpost +D_BO_6000000: + { type: TEXTURE, ctype: u8, format: IA8, width: 168, height: 19, offset: 0x6000000, symbol: D_BO_6000000 } + +D_BO_6000C80: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x6000C80, symbol: D_BO_6000C80 } + +D_BO_6000D80: + { type: GFX, offset: 0x6000D80, symbol: D_BO_6000D80 } + +D_BO_6001908: + { type: TEXTURE, format: RGBA16, offset: 0x6001908, width: 16, height: 16, ctype: u16, symbol: D_BO_6001908 } + +D_BO_6001C64: + { type: SF64:ANIM, offset: 0x6001C64, symbol: D_BO_6001C64 } + +D_BO_6001FB0: + { type: SF64:SKELETON, offset: 0x6001FB0, symbol: D_BO_6001FB0 } + +D_BO_6002020: + { type: GFX, offset: 0x6002020, symbol: D_BO_6002020 } + +D_BO_6004848: + { type: TEXTURE, format: RGBA16, offset: 0x06004848, width: 32, height: 32, ctype: u16, symbol: D_BO_6004848 } + +D_BO_6005048: + { type: TEXTURE, format: RGBA16, offset: 0x06005048, width: 16, height: 32, ctype: u16, symbol: D_BO_6005048 } + +D_BO_6005908: + { type: TEXTURE, format: RGBA16, offset: 0x06005908, width: 32, height: 32, ctype: u16, symbol: D_BO_6005908 } + +D_BO_6006108: + { type: TEXTURE, format: RGBA16, offset: 0x06006108, width: 32, height: 32, ctype: u16, symbol: D_BO_6006108 } + +D_BO_6006910: + { type: GFX, offset: 0x6006910, symbol: D_BO_6006910 } + +D_BO_6006AD0: + { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x6006AD0, symbol: D_BO_6006AD0 } + +D_BO_6006ED0: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 64, offset: 0x06006ED0, symbol: D_BO_6006ED0 } + +D_BO_6006F50: + { type: TEXTURE, format: RGBA16, offset: 0x06006F50, width: 4, height: 16, ctype: u16, symbol: D_BO_6006F50 } + +D_BO_6006FD0: + { type: TEXTURE, format: RGBA16, offset: 0x06006FD0, width: 32, height: 32, ctype: u16, symbol: D_BO_6006FD0 } + +D_BO_60077D0: + { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x60077D0, symbol: D_BO_60077D0 } + +D_BO_6007BD0: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 64, offset: 0x06007BD0, symbol: D_BO_6007BD0 } + +D_BO_6007DF8: + { type: TEXTURE, format: RGBA16, offset: 0x06007DF8, width: 16, height: 32, ctype: u16, symbol: D_BO_6007DF8 } + +D_BO_6008440: + { type: TEXTURE, format: RGBA16, offset: 0x06008440, width: 16, height: 16, ctype: u16, symbol: D_BO_6008440 } + +# Unused Animation +D_BO_6008668: + { type: SF64:ANIM, offset: 0x6008668, symbol: D_BO_6008668 } + +# Unused Skeleton +D_BO_60086B4: + { type: SF64:SKELETON, offset: 0x60086B4, symbol: D_BO_60086B4 } + +# Unused Animation +D_BO_60086F4: + { type: SF64:ANIM, offset: 0x60086F4, symbol: D_BO_60086F4 } + +# Unused Skeleton +D_BO_6008760: + { type: SF64:SKELETON, offset: 0x6008760, symbol: D_BO_6008760 } + +D_BO_6008770: + { type: GFX, offset: 0x6008770, symbol: D_BO_6008770 } + +D_BO_6008BB8: + { type: TEXTURE, format: RGBA16, offset: 0x06008BB8, width: 32, height: 32, ctype: u16, symbol: D_BO_6008BB8 } + +D_BO_60093B8: + { type: TEXTURE, format: RGBA16, offset: 0x060093B8, width: 32, height: 32, ctype: u16, symbol: D_BO_60093B8 } + +D_BO_6009BC0: + { type: GFX, offset: 0x6009BC0, symbol: D_BO_6009BC0 } + +# Unused DisplayList, looks like a tube. +D_BO_600A2C0: + { type: GFX, offset: 0x600A2C0, symbol: D_BO_600A2C0 } + +D_BO_600A810: + { type: GFX, offset: 0x600A810, symbol: D_BO_600A810 } + +# Unused DisplayList, looks like a cube with an entrance. +D_BO_600AB90: + { type: GFX, offset: 0x600AB90, symbol: D_BO_600AB90 } + +D_BO_600AD80: + { type: TEXTURE, format: RGBA16, offset: 0x0600AD80, width: 32, height: 32, ctype: u16, symbol: D_BO_600AD80 } + +D_BO_600B8B0: + { type: GFX, offset: 0x600B8B0, symbol: D_BO_600B8B0 } + +D_BO_600BAA0: + { type: GFX, offset: 0x600BAA0, symbol: D_BO_600BAA0 } + +D_BO_600BEC0: + { type: GFX, offset: 0x600BEC0, symbol: D_BO_600BEC0 } + +D_BO_600BF30: + { type: GFX, offset: 0x600BF30, symbol: D_BO_600BF30 } + +D_BO_600C0B8: + { type: VTX, count: 34, offset: 0x600C0B8, symbol: D_BO_600C0B8 } + +D_BO_600C2D8: + { type: TEXTURE, format: IA8, offset: 0x0600C2D8, width: 32, height: 16, ctype: u8, symbol: D_BO_600C2D8 } + +D_BO_600C4E0: + { type: GFX, offset: 0x600C4E0, symbol: D_BO_600C4E0 } + +D_BO_600CF88: + { type: TEXTURE, format: RGBA16, offset: 0x0600CF88, width: 16, height: 16, ctype: u16, symbol: D_BO_600CF88 } + +D_BO_600D190: + { type: GFX, offset: 0x600D190, symbol: D_BO_600D190 } + +D_BO_600D2A0: + { type: TEXTURE, format: RGBA16, offset: 0x0600D2A0, width: 32, height: 64, ctype: u16, symbol: D_BO_600D2A0 } + +D_BO_600E2A0: + { type: TEXTURE, format: RGBA16, offset: 0x0600E2A0, width: 32, height: 64, ctype: u16, symbol: D_BO_600E2A0 } + +D_BO_600F2E0: + { type: SF64:ANIM, offset: 0x600F2E0, symbol: D_BO_600F2E0 } + +D_BO_600F36C: + { type: SF64:SKELETON, offset: 0x600F36C, symbol: D_BO_600F36C } + +D_BO_600F3D8: + { type: SF64:ANIM, offset: 0x600F3D8, symbol: D_BO_600F3D8 } + +D_BO_600F4A4: + { type: SF64:SKELETON, offset: 0x600F4A4, symbol: D_BO_600F4A4 } + +D_BO_600F4C0: + { type: GFX, offset: 0x600F4C0, symbol: D_BO_600F4C0 } + +D_BO_600F728: + { type: TEXTURE, format: RGBA16, offset: 0x0600F728, width: 32, height: 32, ctype: u16, symbol: D_BO_600F728 } + +D_BO_600FF30: + { type: SF64:ENVIRONMENT, offset: 0x600FF30, symbol: D_BO_600FF30 } + +D_BO_600FF74: + { type: SF64:OBJECT_INIT, offset: 0x600FF74, symbol: D_BO_600FF74 } + +D_BO_6010294: + { type: SF64:COLPOLY, count: 262, offset: 0x6010294, symbol: D_BO_6010294, mesh_symbol: D_BO_OFFSET } + +PAD_BO_6011B20: + { type: BLOB, size: 0x4, offset: 0x6011B20, symbol: PAD_BO_6011B20, mesh_symbol: D_BO_OFFSET } + +D_BO_6011B24: + { type: SF64:HITBOX, offset: 0x6011B24, symbol: D_BO_6011B24 } + +D_BO_6011BA4: + { type: SF64:HITBOX, offset: 0x6011BA4, symbol: D_BO_6011BA4 } + +D_BO_6011BF4: + { type: SF64:HITBOX, offset: 0x6011BF4, symbol: D_BO_6011BF4 } + +D_BO_6011C10: + { type: SF64:HITBOX, offset: 0x6011C10, symbol: D_BO_6011C10 } + +D_BO_6011C48: + { type: SF64:HITBOX, offset: 0x6011C48, symbol: D_BO_6011C48 } + +D_BO_6011C80: + { type: SF64:HITBOX, offset: 0x6011C80, symbol: D_BO_6011C80 } + +D_BO_6011E28: + { type: VTX, count: 34, offset: 0x6011E28, symbol: D_BO_6011E28 } diff --git a/assets/yaml/us/rev1/ast_common.yaml b/assets/yaml/us/rev1/ast_common.yaml new file mode 100644 index 00000000..5717aba9 --- /dev/null +++ b/assets/yaml/us/rev1/ast_common.yaml @@ -0,0 +1,987 @@ +:config: + segments: + - [0x1, 0x873CB0] + header: + code: + - '#include "assets/ast_common.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + +D_1000000: + { type: TEXTURE, format: IA8, width: 64, height: 10, ctype: u8, offset: 0x1000000, symbol: D_1000000 } + +D_1000280: + { type: TEXTURE, format: IA8, width: 96, height: 10, ctype: u8, offset: 0x1000280, symbol: D_1000280 } + +D_1000640: + { type: TEXTURE, format: IA8, width: 96, height: 22, ctype: u8, offset: 0x1000640, symbol: D_1000640 } + +D_1000E80: + { type: TEXTURE, format: IA8, width: 48, height: 9, ctype: u8, offset: 0x1000E80, symbol: D_1000E80 } + +D_1001030: + { type: TEXTURE, format: IA8, width: 8, height: 8, ctype: u8, offset: 0x1001030, symbol: D_1001030 } + +D_1001070: + { type: TEXTURE, format: IA8, width: 104, height: 10, ctype: u8, offset: 0x1001070, symbol: D_1001070 } + +D_1001480: + { type: TEXTURE, format: IA8, width: 56, height: 12, ctype: u8, offset: 0x1001480, symbol: D_1001480 } + +D_1001720: + { type: TEXTURE, format: IA8, width: 40, height: 36, ctype: u8, offset: 0x1001720, symbol: D_1001720 } + +D_1001CC0: + { type: TEXTURE, format: IA8, width: 64, height: 14, ctype: u8, offset: 0x1001CC0, symbol: D_1001CC0 } + +D_1002040: + { type: TEXTURE, format: IA8, width: 40, height: 12, ctype: u8, offset: 0x1002040, symbol: D_1002040 } + +D_1002220: + { type: TEXTURE, format: IA8, width: 8, height: 12, ctype: u8, offset: 0x1002220, symbol: D_1002220 } + +D_1002280: + { type: TEXTURE, format: IA8, width: 8, height: 12, ctype: u8, offset: 0x1002280, symbol: D_1002280 } + +D_10022E0: + { type: TEXTURE, format: IA8, width: 8, height: 12, ctype: u8, offset: 0x10022E0, symbol: D_10022E0 } + +D_1002340: + { type: TEXTURE, format: IA8, width: 40, height: 10, ctype: u8, offset: 0x1002340, symbol: D_1002340 } + +D_10024D0: + { type: TEXTURE, format: IA8, width: 96, height: 32, ctype: u8, offset: 0x10024D0, symbol: D_10024D0 } + +D_10030D0: + { type: TEXTURE, format: IA8, width: 8, height: 12, ctype: u8, offset: 0x10030D0, symbol: D_10030D0 } + +D_1003130: + { type: GFX, offset: 0x1003130, symbol: D_1003130 } + +D_1003208: + { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x1003208, tlut: 0x1003288, symbol: D_1003208 } + +D_1003288: + { type: TEXTURE, format: TLUT, colors: 12, offset: 0x1003288, ctype: u16, symbol: D_1003288 } + +D_10032A0: + { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x10032A0, symbol: D_10032A0 } + +D_10041C0: + { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x10041C0, symbol: D_10041C0 } + +D_10050E0: + { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x10050E0, symbol: D_10050E0 } + +D_1006000: + { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x1006000, symbol: D_1006000 } + +D_1006F20: + { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x1006F20, symbol: D_1006F20 } + +D_1007E40: + { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x1007E40, symbol: D_1007E40 } + +D_1008D60: + { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x1008D60, symbol: D_1008D60 } + +D_1009C80: + { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x1009C80, symbol: D_1009C80 } + +D_100ABA0: + { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x100ABA0, symbol: D_100ABA0 } + +D_100BAC0: + { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x100BAC0, symbol: D_100BAC0 } + +D_100C9E0: + { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x100C9E0, symbol: D_100C9E0 } + +D_100D900: + { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x100D900, symbol: D_100D900 } + +D_100E820: + { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x100E820, symbol: D_100E820 } + +D_100F740: + { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x100F740, symbol: D_100F740 } + +D_1010660: + { type: TEXTURE, format: CI4, width: 16, height: 8, ctype: u8, offset: 0x1010660, tlut: 0x10106A0, symbol: D_1010660 } + +D_10106A0: + { type: TEXTURE, format: TLUT, colors: 8, offset: 0x10106A0, ctype: u16, symbol: D_10106A0 } + +D_10106B0: + { type: TEXTURE, format: CI4, width: 16, height: 8, ctype: u8, offset: 0x10106B0, tlut: 0x10106F0, symbol: D_10106B0 } + +D_10106F0: + { type: TEXTURE, format: TLUT, colors: 8, offset: 0x10106F0, ctype: u16, symbol: D_10106F0 } + +D_1010700: + { type: TEXTURE, format: CI4, width: 16, height: 8, ctype: u8, offset: 0x1010700, tlut: 0x1010740, symbol: D_1010700 } + +D_1010740: + { type: TEXTURE, format: TLUT, colors: 8, offset: 0x1010740, ctype: u16, symbol: D_1010740 } + +D_1010750: + { type: TEXTURE, format: CI4, width: 16, height: 8, ctype: u8, offset: 0x1010750, tlut: 0x1010790, symbol: D_1010750 } + +D_1010790: + { type: TEXTURE, format: TLUT, colors: 8, offset: 0x1010790, ctype: u16, symbol: D_1010790 } + +D_10107A0: + { type: TEXTURE, format: CI4, width: 16, height: 8, ctype: u8, offset: 0x10107A0, tlut: 0x10107E0, symbol: D_10107A0 } + +D_10107E0: + { type: TEXTURE, format: TLUT, colors: 8, offset: 0x10107E0, ctype: u16, symbol: D_10107E0 } + +D_10107F0: + { type: TEXTURE, format: CI4, width: 16, height: 8, ctype: u8, offset: 0x10107F0, tlut: 0x1010830, symbol: D_10107F0 } + +D_1010830: + { type: TEXTURE, format: TLUT, colors: 8, offset: 0x1010830, ctype: u16, symbol: D_1010830 } + +D_1010840: + { type: TEXTURE, format: CI4, width: 16, height: 8, ctype: u8, offset: 0x1010840, tlut: 0x1010880, symbol: D_1010840 } + +D_1010880: + { type: TEXTURE, format: TLUT, colors: 8, offset: 0x1010880, ctype: u16, symbol: D_1010880 } + +D_1010890: + { type: TEXTURE, format: CI4, width: 16, height: 8, ctype: u8, offset: 0x1010890, tlut: 0x10108D0, symbol: D_1010890 } + +D_10108D0: + { type: TEXTURE, format: TLUT, colors: 8, offset: 0x10108D0, ctype: u16, symbol: D_10108D0 } + +D_10108E0: + { type: TEXTURE, format: CI4, width: 16, height: 8, ctype: u8, offset: 0x10108E0, tlut: 0x1010920, symbol: D_10108E0 } + +D_1010920: + { type: TEXTURE, format: TLUT, colors: 8, offset: 0x1010920, ctype: u16, symbol: D_1010920 } + +D_1010930: + { type: TEXTURE, format: CI4, width: 16, height: 8, ctype: u8, offset: 0x1010930, tlut: 0x1010970, symbol: D_1010930 } + +D_1010970: + { type: TEXTURE, format: TLUT, colors: 8, offset: 0x1010970, ctype: u16, symbol: D_1010970 } + +D_1010980: + { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x1010980, tlut: 0x1010A00, symbol: D_1010980 } + +D_1010A00: + { type: TEXTURE, format: TLUT, colors: 8, ctype: u16, offset: 0x1010A00, symbol: D_1010A00 } + +D_1010A10: + { type: TEXTURE, format: CI4, width: 32, height: 7, ctype: u8, offset: 0x1010A10, tlut: 0x1010A80, symbol: D_1010A10 } + +D_1010A80: + { type: TEXTURE, format: TLUT, colors: 4, ctype: u16, offset: 0x1010A80, symbol: D_1010A80 } + +D_1010A90: + { type: TEXTURE, format: CI4, width: 64, height: 49, ctype: u8, offset: 0x1010A90, tlut: 0x10110B0, symbol: D_1010A90 } + +D_10110B0: + { type: TEXTURE, format: TLUT, colors: 4, ctype: u16, offset: 0x10110B0, symbol: D_10110B0 } + +D_10110C0: + { type: TEXTURE, format: CI4, width: 16, height: 7, ctype: u8, offset: 0x10110C0, tlut: 0x10110F8, symbol: D_10110C0 } + +D_10110F8: + { type: TEXTURE, format: TLUT, colors: 6, ctype: u16, offset: 0x10110F8, symbol: D_10110F8 } + +D_1011110: + { type: TEXTURE, format: CI4, width: 16, height: 7, ctype: u8, offset: 0x1011110, tlut: 0x1011148, symbol: D_1011110 } + +D_1011148: + { type: TEXTURE, format: TLUT, colors: 6, ctype: u16, offset: 0x1011148, symbol: D_1011148 } + +D_1011160: + { type: TEXTURE, format: CI4, width: 16, height: 7, ctype: u8, offset: 0x1011160, tlut: 0x1011198, symbol: D_1011160 } + +D_1011198: + { type: TEXTURE, format: TLUT, colors: 6, ctype: u16, offset: 0x1011198, symbol: D_1011198 } + +D_10111B0: + { type: TEXTURE, format: CI4, width: 16, height: 7, ctype: u8, offset: 0x10111B0, tlut: 0x10111E8, symbol: D_10111B0 } + +D_10111E8: + { type: TEXTURE, format: TLUT, colors: 6, ctype: u16, offset: 0x10111E8, symbol: D_10111E8 } + +D_1011200: + { type: TEXTURE, format: CI4, width: 32, height: 7, ctype: u8, offset: 0x1011200, tlut: 0x1011270, symbol: D_1011200 } + +D_1011270: + { type: TEXTURE, format: TLUT, colors: 6, ctype: u16, offset: 0x1011270, symbol: D_1011270 } + +D_1011280: + { type: TEXTURE, format: CI4, width: 48, height: 44, ctype: u8, offset: 0x1011280, tlut: 0x10116A0, symbol: D_1011280 } + +D_10116A0: + { type: TEXTURE, format: TLUT, colors: 8, ctype: u16, offset: 0x10116A0, symbol: D_10116A0 } + +D_10116B0: + { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x10116B0, tlut: 0x1011730, symbol: D_10116B0 } + +D_1011730: + { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011730, symbol: D_1011730 } + +D_1011750: + { type: TEXTURE, format: CI4, width: 80, height: 13, ctype: u8, offset: 0x1011750, tlut: 0x1011958, symbol: D_1011750 } + +D_1011958: + { type: TEXTURE, format: TLUT, colors: 16, ctype: u16, offset: 0x1011958, symbol: D_1011958 } + +D_1011980: + { type: TEXTURE, format: CI4, width: 48, height: 7, ctype: u8, offset: 0x1011980, tlut: 0x1011A28, symbol: D_1011980 } + +D_1011A28: + { type: TEXTURE, format: TLUT, colors: 12, ctype: u16, offset: 0x1011A28, symbol: D_1011A28 } + +D_1011A40: + { type: TEXTURE, format: CI4, width: 32, height: 7, ctype: u8, offset: 0x1011A40, tlut: 0x1011AB0, symbol: D_1011A40 } + +D_1011AB0: + { type: TEXTURE, format: TLUT, colors: 8, ctype: u16, offset: 0x1011AB0, symbol: D_1011AB0 } + +D_1011AC0: + { type: TEXTURE, format: CI4, width: 16, height: 26, ctype: u8, offset: 0x1011AC0, tlut: 0x1011B90, symbol: D_1011AC0 } + +D_1011B90: + { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011B90, symbol: D_1011B90 } + +D_1011BB0: + { type: TEXTURE, format: CI4, width: 16, height: 26, ctype: u8, offset: 0x1011BB0, tlut: 0x1011C80, symbol: D_1011BB0 } + +D_1011C80: + { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011C80, symbol: D_1011C80 } + +D_1011CA0: + { type: TEXTURE, format: CI4, width: 16, height: 26, ctype: u8, offset: 0x1011CA0, tlut: 0x1011D70, symbol: D_1011CA0 } + +D_1011D70: + { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011D70, symbol: D_1011D70 } + +D_1011D90: + { type: TEXTURE, format: CI4, width: 16, height: 26, ctype: u8, offset: 0x1011D90, tlut: 0x1011E60, symbol: D_1011D90 } + +D_1011E60: + { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011E60, symbol: D_1011E60 } + +D_1011E80: + { type: TEXTURE, format: CI4, width: 16, height: 8, ctype: u8, offset: 0x1011E80, tlut: 0x1011EC0, symbol: D_1011E80 } + +D_1011EC0: + { type: TEXTURE, format: TLUT, colors: 8, ctype: u16, offset: 0x1011EC0, symbol: D_1011EC0 } + +D_1011ED0: + { type: TEXTURE, format: CI4, width: 16, height: 7, ctype: u8, offset: 0x1011ED0, tlut: 0x1011F08, symbol: D_1011ED0 } + +D_1011F08: + { type: TEXTURE, format: TLUT, colors: 12, ctype: u16, offset: 0x1011F08, symbol: D_1011F08 } + +D_1011F20: + { type: GFX, offset: 0x1011F20, symbol: D_1011F20 } + +D_1012000: + { type: TEXTURE, format: CI4, width: 32, height: 16, ctype: u8, offset: 0x1012000, tlut: 0x1012100, symbol: D_1012000 } + +D_1012100: + { type: TEXTURE, format: TLUT, colors: 8, offset: 0x1012100, ctype: u16, symbol: D_1012100 } + +D_1012110: + { type: GFX, offset: 0x1012110, symbol: D_1012110 } + +D_1012190: + { type: TEXTURE, format: IA8, width: 16, height: 16, ctype: u8, offset: 0x1012190, symbol: D_1012190 } + +D_1012290: + { type: TEXTURE, format: CI8, width: 48, height: 22, ctype: u8, offset: 0x1012290, tlut: 0x10126B0, symbol: D_1012290 } + +D_10126B0: + { type: TEXTURE, format: TLUT, colors: 32, ctype: u16, offset: 0x10126B0, symbol: D_10126B0 } + +D_10126F0: + { type: TEXTURE, format: CI8, width: 24, height: 4, ctype: u8, offset: 0x10126F0, tlut: 0x1012750, symbol: D_10126F0 } + +D_1012750: + { type: TEXTURE, format: TLUT, colors: 59, ctype: u16, offset: 0x1012750, symbol: D_1012750 } + +D_1013780: + { type: TEXTURE, format: CI8, width: 48, height: 141, ctype: u8, offset: 0x1013780, tlut: 0x10151F0, symbol: D_1013780 } + +D_10151F0: + { type: TEXTURE, format: TLUT, colors: 146, ctype: u16, offset: 0x10151F0, symbol: D_10151F0 } + +D_10127D0: + { type: TEXTURE, format: CI8, width: 40, height: 5, ctype: u8, offset: 0x10127D0, tlut: 0x1012898, symbol: D_10127D0 } + +D_1012898: + { type: TEXTURE, format: TLUT, colors: 20, ctype: u16, offset: 0x1012898, symbol: D_1012898 } + +D_10128C0: + { type: TEXTURE, format: CI8, width: 40, height: 5, ctype: u8, offset: 0x10128C0, tlut: 0x1012988, symbol: D_10128C0 } + +D_1012988: + { type: TEXTURE, format: TLUT, colors: 28, ctype: u16, offset: 0x1012988, symbol: D_1012988 } + +D_10129C0: + { type: TEXTURE, format: CI8, width: 16, height: 109, ctype: u8, offset: 0x10129C0, tlut: 0x1013090, symbol: D_10129C0 } + +D_1013090: + { type: TEXTURE, format: TLUT, colors: 112, ctype: u16, offset: 0x1013090, symbol: D_1013090 } + +D_1013170: + { type: TEXTURE, format: CI8, width: 32, height: 32, ctype: u8, offset: 0x1013170, tlut: 0x1013570, symbol: D_1013170 } + +D_1013570: + { type: TEXTURE, format: TLUT, colors: 8, ctype: u16, offset: 0x1013570, symbol: D_1013570 } + +D_1013580: + { type: TEXTURE, format: CI8, width: 48, height: 8, ctype: u8, offset: 0x1013580, tlut: 0x1013700, symbol: D_1013580 } + +D_1013700: + { type: TEXTURE, format: TLUT, colors: 58, ctype: u16, offset: 0x1013700, symbol: D_1013700 } + +D_1015320: + { type: GFX, offset: 0x1015320, symbol: D_1015320 } + +D_10153F8: + { type: TEXTURE, format: CI4, width: 32, height: 16, ctype: u8, offset: 0x10153F8, tlut: 0x10154F8, symbol: D_10153F8 } + +D_10154F8: + { type: TEXTURE, format: TLUT, colors: 12, offset: 0x10154F8, ctype: u16, symbol: D_10154F8 } + +D_1015510: + { type: GFX, offset: 0x1015510, symbol: D_1015510 } + +D_1015598: + { type: TEXTURE, format: IA8, width: 16, height: 16, ctype: u8, offset: 0x1015598, symbol: D_1015598 } + +D_10156A0: + { type: GFX, offset: 0x10156A0, symbol: D_10156A0 } + +D_1015778: + { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x1015778, tlut: 0x10157F8, symbol: D_1015778 } + +D_10157F8: + { type: TEXTURE, format: TLUT, colors: 12, offset: 0x10157F8, ctype: u16, symbol: D_10157F8 } + +D_1015810: + { type: GFX, offset: 0x1015810, symbol: D_1015810 } + +D_10158E8: + { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x10158E8, tlut: 0x1015968, symbol: D_10158E8 } + +D_1015968: + { type: TEXTURE, format: TLUT, colors: 12, offset: 0x1015968, ctype: u16, symbol: D_1015968 } + +D_1015980: + { type: GFX, offset: 0x1015980, symbol: D_1015980 } + +D_1015A58: + { type: TEXTURE, format: CI4, width: 32, height: 16, ctype: u8, offset: 0x1015A58, tlut: 0x1015B58, symbol: D_1015A58 } + +D_1015B58: + { type: TEXTURE, format: TLUT, colors: 12, offset: 0x1015B58, ctype: u16, symbol: D_1015B58 } + +D_1015B70: + { type: GFX, offset: 0x1015B70, symbol: D_1015B70 } + +D_1015C48: + { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x1015C48, tlut: 0x1015CC8, symbol: D_1015C48 } + +D_1015CC8: + { type: TEXTURE, format: TLUT, colors: 12, offset: 0x1015CC8, ctype: u16, symbol: D_1015CC8 } + +D_1015CE0: + { type: GFX, offset: 0x1015CE0, symbol: D_1015CE0 } + +D_1015DB8: + { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x1015DB8, tlut: 0x1015E38, symbol: D_1015DB8 } + +D_1015E38: + { type: TEXTURE, format: TLUT, colors: 12, offset: 0x1015E38, ctype: u16, symbol: D_1015E38 } + +D_1015E50: + { type: GFX, offset: 0x1015E50, symbol: D_1015E50 } + +D_1015F28: + { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x1015F28, tlut: 0x1015FA8, symbol: D_1015F28 } + +D_1015FA8: + { type: TEXTURE, format: TLUT, colors: 12, offset: 0x1015FA8, ctype: u16, symbol: D_1015FA8 } + +D_1015FC0: + { type: GFX, offset: 0x1015FC0, symbol: D_1015FC0 } + +D_1016098: + { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x1016098, tlut: 0x1016118, symbol: D_1016098 } + +D_1016118: + { type: TEXTURE, format: TLUT, colors: 12, offset: 0x1016118, ctype: u16, symbol: D_1016118 } + +D_1016130: + { type: GFX, offset: 0x1016130, symbol: D_1016130 } + +D_1016208: + { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x1016208, tlut: 0x1016288, symbol: D_1016208 } + +D_1016288: + { type: TEXTURE, format: TLUT, colors: 12, offset: 0x1016288, ctype: u16, symbol: D_1016288 } + +D_10162A0: + { type: GFX, offset: 0x10162A0, symbol: D_10162A0 } + +D_1016378: + { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x1016378, tlut: 0x10163F8, symbol: D_1016378 } + +D_10163F8: + { type: TEXTURE, format: TLUT, colors: 12, offset: 0x10163F8, ctype: u16, symbol: D_10163F8 } + +D_1016410: + { type: GFX, offset: 0x1016410, symbol: D_1016410 } + +D_10164E8: + { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x10164E8, tlut: 0x1016568, symbol: D_10164E8 } + +D_1016568: + { type: TEXTURE, format: TLUT, colors: 12, offset: 0x1016568, ctype: u16, symbol: D_1016568 } + +D_1016580: + { type: GFX, offset: 0x1016580, symbol: D_1016580 } + +D_1016658: + { type: TEXTURE, format: CI4, width: 64, height: 16, ctype: u8, offset: 0x1016658, tlut: 0x1016858, symbol: D_1016658 } + +D_1016858: + { type: TEXTURE, format: TLUT, colors: 12, offset: 0x1016858, ctype: u16, symbol: D_1016858 } + +D_1016870: + { type: GFX, offset: 0x1016870, symbol: D_1016870 } + +D_1016BC8: + { type: TEXTURE, format: CI8, width: 32, height: 32, ctype: u8, offset: 0x1016BC8, tlut: 0x1012100, symbol: D_1016BC8} + +D_1016FC8: + { type: TEXTURE, format: TLUT, colors: 256, offset: 0x1016FC8, ctype: u16, symbol: D_1016FC8 } + +D_10171D0: + { type: GFX, offset: 0x10171D0, symbol: D_10171D0 } + +D_10172A8: + { type: TEXTURE, format: CI4, width: 32, height: 16, ctype: u8, offset: 0x10172A8, tlut: 0x10173A8, symbol: D_10172A8 } + +D_10173A8: + { type: TEXTURE, format: TLUT, colors: 16, offset: 0x10173A8, ctype: u16, symbol: D_10173A8 } + +D_10173D0: + { type: GFX, offset: 0x10173D0, symbol: D_10173D0 } + +D_10174A8: + { type: TEXTURE, format: CI4, width: 32, height: 16, ctype: u8, offset: 0x10174A8, tlut: 0x10175A8, symbol: D_10174A8 } + +D_10175A8: + { type: TEXTURE, format: TLUT, colors: 8, offset: 0x10175A8, ctype: u16, symbol: D_10175A8 } + +D_10175C0: + { type: GFX, offset: 0x10175C0, symbol: D_10175C0 } + +D_1017698: + { type: TEXTURE, format: CI4, width: 32, height: 16, ctype: u8, offset: 0x1017698, tlut: 0x1017798, symbol: D_1017698 } + +D_1017798: + { type: TEXTURE, format: TLUT, colors: 16, offset: 0x1017798, ctype: u16, symbol: D_1017798 } + +D_10177C0: + { type: GFX, offset: 0x10177C0, symbol: D_10177C0 } + +D_1017A38: + { type: TEXTURE, format: RGBA16, width: 32, height: 32, ctype: u16, offset: 0x1017A38, symbol: D_1017A38 } + +D_1018238: + { type: TEXTURE, format: RGBA16, width: 8, height: 8, ctype: u16, offset: 0x1018238, symbol: D_1018238 } + +D_10182C0: + { type: GFX, offset: 0x10182C0, symbol: D_10182C0 } + +D_10190C0: + { type: TEXTURE, format: RGBA16, width: 16, height: 32, ctype: u16, offset: 0x10190C0, symbol: D_10190C0 } + +D_10194C0: + { type: GFX, offset: 0x10194C0, symbol: D_10194C0 } + +D_1019620: + { type: TEXTURE, format: RGBA16, width: 16, height: 16, ctype: u16, offset: 0x1019620, symbol: D_1019620 } + +D_1019820: + { type: GFX, offset: 0x1019820, symbol: D_1019820 } + +D_1019CA0: + { type: GFX, offset: 0x1019CA0, symbol: D_1019CA0 } + +D_1019AF0: + { type: TEXTURE, format: CI8, width: 16, height: 16, ctype: u8, offset: 0x1019AF0, symbol: D_1019AF0 } + +D_1019BF0: + { type: TEXTURE, format: TLUT, colors: 88, offset: 0x1019BF0, ctype: u16, symbol: D_1019BF0 } + +D_101A140: + { type: TEXTURE, format: CI8, width: 32, height: 32, ctype: u8, offset: 0x101A140, symbol: D_101A140 } + +D_101A540: + { type: TEXTURE, format: TLUT, colors: 24, offset: 0x101A540, ctype: u16, symbol: D_101A540 } + +D_101A570: + { type: GFX, offset: 0x101A570, symbol: D_101A570 } + +D_101A8E0: + { type: GFX, offset: 0x101A8E0, symbol: D_101A8E0 } + +D_101A9B8: + { type: TEXTURE, format: CI4, width: 32, height: 32, ctype: u8, offset: 0x101A9B8, tlut: 0x101ABB8, symbol: D_101A9B8 } + +D_101ABB8: + { type: TEXTURE, format: TLUT, colors: 12, offset: 0x101ABB8, ctype: u16, symbol: D_101ABB8 } + +D_101ABD0: + { type: GFX, offset: 0x101ABD0, symbol: D_101ABD0 } + +D_101AC98: + { type: TEXTURE, format: RGBA16, width: 8, height: 8, ctype: u16, offset: 0x0101AC98, symbol: D_101AC98 } + +D_101AD20: + { type: GFX, offset: 0x101AD20, symbol: D_101AD20 } + +D_101AE48: + { type: TEXTURE, format: RGBA16, width: 8, height: 8, ctype: u16, offset: 0x101AE48, symbol: D_101AE48 } + +D_101AED0: + { type: GFX, offset: 0x101AED0, symbol: D_101AED0 } + +D_101AF98: + { type: TEXTURE, format: RGBA16, width: 16, height: 16, ctype: u16, offset: 0x101AF98, symbol: D_101AF98 } + +D_101B1A0: + { type: GFX, offset: 0x101B1A0, symbol: D_101B1A0 } + +D_101B268: + { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101B268, tlut: 0x101B2E8, symbol: D_101B268 } + +D_101B2E8: + { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101B2E8, ctype: u16, symbol: D_101B2E8 } + +D_101B310: + { type: GFX, offset: 0x101B310, symbol: D_101B310 } + +D_101B3D8: + { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101B3D8, tlut: 0x101B458, symbol: D_101B3D8 } + +D_101B458: + { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101B458, ctype: u16, symbol: D_101B458 } + +D_101B480: + { type: GFX, offset: 0x101B480, symbol: D_101B480 } + +D_101B548: + { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101B548, tlut: 0x101B5C8, symbol: D_101B548 } + +D_101B5C8: + { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101B5C8, ctype: u16, symbol: D_101B5C8 } + +D_101B5F0: + { type: GFX, offset: 0x101B5F0, symbol: D_101B5F0 } + +D_101B6B8: + { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101B6B8, tlut: 0x101B738, symbol: D_101B6B8 } + +D_101B738: + { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101B738, ctype: u16, symbol: D_101B738 } + +D_101B760: + { type: GFX, offset: 0x101B760, symbol: D_101B760 } + +D_101B828: + { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101B828, tlut: 0x101B8A8, symbol: D_101B828 } + +D_101B8A8: + { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101B8A8, ctype: u16, symbol: D_101B8A8 } + +D_101B8D0: + { type: GFX, offset: 0x101B8D0, symbol: D_101B8D0 } + +D_101B998: + { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101B998, tlut: 0x101BA18, symbol: D_101B998 } + +D_101BA18: + { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101BA18, ctype: u16, symbol: D_101BA18 } + +D_101BA40: + { type: GFX, offset: 0x101BA40, symbol: D_101BA40 } + +D_101BB08: + { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101BB08, tlut: 0x101BB88, symbol: D_101BB08 } + +D_101BB88: + { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101BB88, ctype: u16, symbol: D_101BB88 } + +D_101BBB0: + { type: GFX, offset: 0x101BBB0, symbol: D_101BBB0 } + +D_101BC78: + { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101BC78, tlut: 0x101BCF8, symbol: D_101BC78 } + +D_101BCF8: + { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101BCF8, ctype: u16, symbol: D_101BCF8 } + +D_101BD20: + { type: GFX, offset: 0x101BD20, symbol: D_101BD20 } + +D_101BDE8: + { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101BDE8, tlut: 0x101BE68, symbol: D_101BDE8 } + +D_101BE68: + { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101BE68, ctype: u16, symbol: D_101BE68 } + +D_101BE90: + { type: GFX, offset: 0x101BE90, symbol: D_101BE90 } + +D_101BF58: + { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101BF58, tlut: 0x101BFD8, symbol: D_101BF58 } + +D_101BFD8: + { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101BFD8, ctype: u16, symbol: D_101BFD8 } + +D_101C000: + { type: GFX, offset: 0x101C000, symbol: D_101C000 } + +D_101C0C8: + { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101C0C8, tlut: 0x101C148, symbol: D_101C0C8 } + +D_101C148: + { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101C148, ctype: u16, symbol: D_101C148 } + +D_101C170: + { type: GFX, offset: 0x101C170, symbol: D_101C170 } + +D_101C238: + { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101C238, tlut: 0x101C2B8, symbol: D_101C238 } + +D_101C2B8: + { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101C2B8, ctype: u16, symbol: D_101C2B8 } + +D_101C2E0: + { type: GFX, offset: 0x101C2E0, symbol: D_101C2E0 } + +D_101C368: + { type: TEXTURE, format: IA8, width: 32, height: 32, ctype: u8, colors: 20, offset: 0x101C368, symbol: D_101C368 } + +D_101C770: + { type: GFX, offset: 0x101C770, symbol: D_101C770 } + +D_101C920: + { type: TEXTURE, format: CI8, width: 16, height: 16, ctype: u8, offset: 0x101C920, tlut: 0x101CA20, symbol: D_101C920 } + +D_101CA20: + { type: TEXTURE, format: TLUT, colors: 96, offset: 0x101CA20, ctype: u16, symbol: D_101CA20 } + +D_101CAE0: + { type: GFX, offset: 0x101CAE0, symbol: D_101CAE0 } + +D_101CBC0: + { type: TEXTURE, format: CI8, width: 16, height: 16, ctype: u8, offset: 0x101CBC0, tlut: 0x101CCC0, symbol: D_101CBC0 } + +D_101CCC0: + { type: TEXTURE, format: TLUT, colors: 88, offset: 0x101CCC0, ctype: u16, symbol: D_101CCC0 } + +D_101CD70: + { type: GFX, offset: 0x101CD70, symbol: D_101CD70 } + +D_101D070: + { type: TEXTURE, format: RGBA16, width: 32, height: 32, ctype: u16, offset: 0x101D070, symbol: D_101D070 } + +D_101D870: + { type: GFX, offset: 0x101D870, symbol: D_101D870 } + +ast_common_seg1_vtx_1D9C8: + { type: VTX, offset: 0x101D9C8, count: 36, symbol: ast_common_seg1_vtx_1D9C8 } + +D_101DE20: + { type: TEXTURE, format: IA8, width: 128, height: 32, ctype: u8, offset: 0x101DE20, symbol: D_101DE20 } + +D_101DC10: + { type: GFX, offset: 0x101DC10, symbol: D_101DC10 } + +D_101EE20: + { type: TEXTURE, format: IA8, width: 128, height: 32, ctype: u8, offset: 0x101EE20, symbol: D_101EE20 } + +D_101FE20: + { type: TEXTURE, format: IA8, width: 128, height: 32, ctype: u8, offset: 0x101FE20, symbol: D_101FE20 } + +D_1020E20: + { type: TEXTURE, format: IA8, width: 128, height: 32, ctype: u8, offset: 0x1020E20, symbol: D_1020E20 } + +D_1021E20: + { type: GFX, offset: 0x1021E20, symbol: D_1021E20 } + +D_1021EF8: + { type: TEXTURE, format: CI4, width: 32, height: 32, ctype: u8, offset: 0x1021EF8, tlut: 0x10220F8, symbol: D_1021EF8 } + +D_10220F8: + { type: TEXTURE, format: TLUT, colors: 20, offset: 0x10220F8, ctype: u16, symbol: D_10220F8 } + +D_1022120: + { type: GFX, offset: 0x1022120, symbol: D_1022120 } + +ast_common_seg1_vtx_22480: + { type: VTX, offset: 0x1022480, count: 124, symbol: ast_common_seg1_vtx_22480 } + +D_1022C40: + { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x1022C40, tlut: 0x1022CC0, symbol: D_1022C40 } + +D_1022CC0: + { type: TEXTURE, format: TLUT, colors: 16, offset: 0x1022CC0, ctype: u16, symbol: D_1022CC0 } + +D_1022CE0: + { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x1022CE0, tlut: 0x1022D60, symbol: D_1022CE0 } + +D_1022D60: + { type: TEXTURE, format: TLUT, colors: 16, offset: 0x1022D60, ctype: u16, symbol: D_1022D60 } + +D_1022D80: + { type: TEXTURE, format: RGBA16, width: 8, height: 16, ctype: u16, offset: 0x1022D80, symbol: D_1022D80 } + +D_1022E80: + { type: GFX, offset: 0x1022E80, symbol: D_1022E80 } + +D_1022F80: + { type: TEXTURE, format: CI4, width: 32, height: 32, ctype: u8, offset: 0x1022F80, tlut: 0x1023180, symbol: D_1022F80 } + +D_1023180: + { type: TEXTURE, format: TLUT, colors: 16, offset: 0x1023180, ctype: u16, symbol: D_1023180 } + +D_10231A0: + { type: GFX, offset: 0x10231A0, symbol: D_10231A0 } + +D_1023518: + { type: TEXTURE, format: IA8, width: 4, height: 5, ctype: u8, offset: 0x1023518, symbol: D_1023518 } + +D_1023530: + { type: TEXTURE, format: CI8, width: 16, height: 16, ctype: u8, offset: 0x1023530, tlut: 0x1023630, symbol: D_1023530 } + +D_1023630: + { type: TEXTURE, format: TLUT, colors: 104, offset: 0x1023630, ctype: u16, symbol: D_1023630 } + +D_1023700: + { type: GFX, offset: 0x1023700, symbol: D_1023700 } + +D_1023750: + { type: GFX, offset: 0x1023750, symbol: D_1023750 } + +D_10237E0: + { type: GFX, offset: 0x10237E0, symbol: D_10237E0 } + +D_1023878: + { type: TEXTURE, format: IA8, width: 32, height: 32, ctype: u8, offset: 0x1023878, symbol: D_1023878 } + +D_1023C80: + { type: GFX, offset: 0x1023C80, symbol: D_1023C80 } + +D_1023E10: + { type: TEXTURE, format: CI4, width: 64, height: 16, ctype: u8, offset: 0x1023E10, tlut: 0x1024010, symbol: D_1023E10 } + +D_1024010: + { type: TEXTURE, format: TLUT, colors: 8, offset: 0x1024010, ctype: u16, symbol: D_1024010 } + +D_1024020: + { type: TEXTURE, format: CI4, width: 64, height: 16, ctype: u8, offset: 0x1024020, tlut: 0x1024220, symbol: D_1024020 } + +D_1024220: + { type: TEXTURE, format: TLUT, colors: 8, offset: 0x1024220, ctype: u16, symbol: D_1024220 } + +D_1024230: + { type: GFX, offset: 0x1024230, symbol: D_1024230 } + +D_1024290: + { type: GFX, offset: 0x1024290, symbol: D_1024290 } + +D_1024410: + { type: GFX, offset: 0x1024410, symbol: D_1024410 } + +D_10244D8: + { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x10244D8, tlut: 0x1024558, symbol: D_10244D8 } + +D_1024558: + { type: TEXTURE, format: TLUT, colors: 12, offset: 0x1024558, ctype: u16, symbol: D_1024558 } + +D_1024570: + { type: GFX, offset: 0x1024570, symbol: D_1024570 } + +D_1024638: + { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x1024638, tlut: 0x10246B8, symbol: D_1024638 } + +D_10246B8: + { type: TEXTURE, format: TLUT, colors: 12, offset: 0x10246B8, ctype: u16, symbol: D_10246B8 } + +D_10246D0: + { type: GFX, offset: 0x10246D0, symbol: D_10246D0 } + +D_1024798: + { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x1024798, tlut: 0x1024818, symbol: D_1024798 } + +D_1024818: + { type: TEXTURE, format: TLUT, colors: 12, offset: 0x1024818, ctype: u16, symbol: D_1024818 } + +D_1024830: + { type: GFX, offset: 0x1024830, symbol: D_1024830 } + +D_10248F8: + { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x10248F8, tlut: 0x1024978, symbol: D_10248F8 } + +D_1024978: + { type: TEXTURE, format: TLUT, colors: 12, offset: 0x1024978, ctype: u16, symbol: D_1024978 } + +D_1024990: + { type: GFX, offset: 0x1024990, symbol: D_1024990 } + +D_1024A58: + { type: TEXTURE, format: CI4, width: 16, height: 8, ctype: u8, offset: 0x1024A58, tlut: 0x1024A98, symbol: D_1024A58 } + +D_1024A98: + { type: TEXTURE, format: TLUT, colors: 20, offset: 0x1024A98, ctype: u16, symbol: D_1024A98 } + +D_1024AC0: + { type: GFX, offset: 0x1024AC0, symbol: D_1024AC0 } + +D_1024B58: + { type: TEXTURE, format: IA8, width: 32, height: 32, ctype: u8, offset: 0x1024B58, symbol: D_1024B58 } + +D_1024F60: + { type: GFX, offset: 0x1024F60, symbol: D_1024F60 } + +D_1024FF8: + { type: TEXTURE, format: RGBA16, width: 32, height: 32, ctype: u16, offset: 0x1024FF8, symbol: D_1024FF8 } + +D_1025800: + { type: GFX, offset: 0x1025800, symbol: D_1025800 } + +D_1025888: + { type: TEXTURE, format: RGBA16, width: 32, height: 32, ctype: u16, offset: 0x1025888, symbol: D_1025888 } + +D_1026090: + { type: GFX, offset: 0x1026090, symbol: D_1026090 } + +D_1026120: + { type: GFX, offset: 0x1026120, symbol: D_1026120 } + +D_1026230: + { type: TEXTURE, format: RGBA16, width: 32, height: 64, ctype: u16, offset: 0x1026230, symbol: D_1026230 } + +D_1027230: + { type: TEXTURE, format: RGBA16, width: 32, height: 64, ctype: u16, offset: 0x1027230, symbol: D_1027230 } + +D_1028230: + { type: GFX, offset: 0x1028230, symbol: D_1028230 } + +D_10288D8: + { type: TEXTURE, format: RGBA16, width: 16, height: 16, ctype: u16, offset: 0x10288D8, symbol: D_10288D8 } + +D_1028AD8: + { type: TEXTURE, format: RGBA16, width: 8, height: 8, ctype: u16, offset: 0x1028AD8, symbol: D_1028AD8 } + +D_1028B58: + { type: TEXTURE, format: RGBA16, width: 16, height: 16, ctype: u16, offset: 0x1028B58, symbol: D_1028B58 } + +D_1028D58: + { type: TEXTURE, format: RGBA16, width: 8, height: 8, ctype: u16, offset: 0x1028D58, symbol: D_1028D58 } + +D_1028DE0: + { type: GFX, offset: 0x1028DE0, symbol: D_1028DE0 } + +D_1028E68: + { type: TEXTURE, format: RGBA16, width: 8, height: 8, ctype: u16, offset: 0x1028E68, symbol: D_1028E68 } + +D_1028EF0: + { type: GFX, offset: 0x1028EF0, symbol: D_1028EF0 } + +D_1028F78: + { type: TEXTURE, format: RGBA16, width: 32, height: 32, ctype: u16, offset: 0x1028F78, symbol: D_1028F78 } + +D_1029780: + { type: GFX, offset: 0x1029780, symbol: D_1029780 } + +D_1029808: + { type: TEXTURE, format: RGBA16, width: 32, height: 32, ctype: u16, offset: 0x1029808, symbol: D_1029808 } + +D_102A010: + { type: GFX, offset: 0x102A010, symbol: D_102A010 } + +D_102A098: + { type: TEXTURE, format: RGBA16, width: 32, height: 32, ctype: u16, offset: 0x102A098, symbol: D_102A098 } + +D_102A8A0: + { type: GFX, offset: 0x102A8A0, symbol: D_102A8A0 } + +D_102A928: + { type: TEXTURE, format: RGBA16, width: 16, height: 16, ctype: u16, offset: 0x102A928, symbol: D_102A928 } + +D_102AB30: + { type: GFX, offset: 0x102AB30, symbol: D_102AB30 } + +D_102AC40: + { type: TEXTURE, format: RGBA16, width: 32, height: 64, ctype: u16, offset: 0x102AC40, symbol: D_102AC40 } + +D_102BC40: + { type: TEXTURE, format: RGBA16, width: 32, height: 64, ctype: u16, offset: 0x102BC40, symbol: D_102BC40 } + +D_102CC40: + { type: GFX, offset: 0x102CC40, symbol: D_102CC40 } + +D_102CD50: + { type: TEXTURE, format: RGBA16, width: 32, height: 64, ctype: u16, offset: 0x102CD50, symbol: D_102CD50 } + +D_102DD50: + { type: TEXTURE, format: RGBA16, width: 32, height: 64, ctype: u16, offset: 0x102DD50, symbol: D_102DD50 } + +D_102ED50: + { type: GFX, offset: 0x102ED50, symbol: D_102ED50 } + +D_102EDD8: + { type: TEXTURE, format: RGBA16, width: 32, height: 32, ctype: u16, offset: 0x102EDD8, symbol: D_102EDD8 } + +D_102F5E0: + { type: GFX, offset: 0x102F5E0, symbol: D_102F5E0 } + +D_102F678: + { type: TEXTURE, format: RGBA16, width: 32, height: 32, ctype: u16, offset: 0x102F678, symbol: D_102F678 } + +D_102FE80: + { type: GFX, offset: 0x102FE80, symbol: D_102FE80 } + +D_102FF08: + { type: TEXTURE, format: RGBA16, width: 8, height: 8, ctype: u16, offset: 0x102FF08, symbol: D_102FF08 } + +D_102FF90: + { type: GFX, offset: 0x102FF90, symbol: D_102FF90 } + +D_1031228: + { type: TEXTURE, format: RGBA16, width: 32, height: 16, ctype: u16, offset: 0x1031228, symbol: D_1031228 } + +D_1031630: + { type: GFX, offset: 0x1031630, symbol: D_1031630 } + +D_1031CC08: + { type: TEXTURE, format: RGBA16, width: 16, height: 16, ctype: u16, offset: 0x1031CC0, symbol: D_1031CC0 } + +D_1031EC0: + { type: GFX, offset: 0x1031EC0, symbol: D_1031EC0 } + +D_1032578: + { type: TEXTURE, format: RGBA16, width: 16, height: 16, ctype: u16, offset: 0x1032578, symbol: D_1032578 } + +D_1032780: + { type: GFX, offset: 0x1032780, symbol: D_1032780 } + +D_1032808: + { type: TEXTURE, format: IA8, width: 32, height: 32, ctype: u8, offset: 0x1032808, symbol: D_1032808 } diff --git a/assets/yaml/us/rev1/ast_corneria.yaml b/assets/yaml/us/rev1/ast_corneria.yaml new file mode 100644 index 00000000..cec3e86c --- /dev/null +++ b/assets/yaml/us/rev1/ast_corneria.yaml @@ -0,0 +1,589 @@ +:config: + segments: + - [0x06, 0x961CE0] + header: + code: + - '#include "assets/ast_corneria.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + - '#include "sf64level.h"' + - '#include "sf64event.h"' + - '#include "sf64player.h"' + - '#include "sf64audio_external.h"' + - '#include "sf64mesg.h"' + +# Corneria +# Former Army Base +D_CO_6000000: + { type: TEXTURE, ctype: u8, format: IA8, width: 128, height: 28, offset: 0x6000000, symbol: D_CO_6000000 } + +D_CO_6000E00: + { type: GFX, offset: 0x6000E00, symbol: D_CO_6000E00 } + +D_CO_60018F8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x060018F8, symbol: D_CO_60018F8 } + +D_CO_60020F8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x060020F8, symbol: D_CO_60020F8 } + +D_CO_60028F8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x060028F8, symbol: D_CO_60028F8 } + +D_CO_60038F8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x060038F8, symbol: D_CO_60038F8 } + +D_CO_60040F8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x060040F8, symbol: D_CO_60040F8 } + +D_CO_60049F0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x060049F0, symbol: D_CO_60049F0 } + +D_CO_6004900: + { type: GFX, offset: 0x6004900, symbol: D_CO_6004900 } + +D_CO_60059F0: + { type: GFX, offset: 0x60059F0, symbol: D_CO_60059F0 } + +D_CO_6005A80: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06005A80, symbol: D_CO_6005A80 } + +D_CO_6006A80: + { type: GFX, offset: 0x6006A80, symbol: D_CO_6006A80 } + +D_CO_6006E08: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06006E08, symbol: D_CO_6006E08 } + +D_CO_6007610: + { type: GFX, offset: 0x6007610, symbol: D_CO_6007610 } + +D_CO_60091C8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x060091C8, symbol: D_CO_60091C8 } + +D_CO_60099C8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x060099C8, symbol: D_CO_60099C8 } + +D_CO_6009BC8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06009BC8, symbol: D_CO_6009BC8 } + +D_CO_600A3C8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0600A3C8, symbol: D_CO_600A3C8 } + +D_CO_600ABC8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0600ABC8, symbol: D_CO_600ABC8 } + +D_CO_600B3C8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0600B3C8, symbol: D_CO_600B3C8 } + +D_CO_600C3D8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0600C3D8, symbol: D_CO_600C3D8 } + +D_CO_600CBD8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x0600CBD8, symbol: D_CO_600CBD8 } + +D_CO_600DBD8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0600DBD8, symbol: D_CO_600DBD8 } + +D_CO_600E3D8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0600E3D8, symbol: D_CO_600E3D8 } + +D_CO_600EBD8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0600EBD8, symbol: D_CO_600EBD8 } + +D_CO_600F3D8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0600F3D8, symbol: D_CO_600F3D8 } + +D_CO_6010050: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06010050, symbol: D_CO_6010050 } + +D_CO_6010250: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06010250, symbol: D_CO_6010250 } + +D_CO_6010F90: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06010F90, symbol: D_CO_6010F90 } + +D_CO_6010A50: + { type: GFX, offset: 0x6010A50, symbol: D_CO_6010A50 } + +D_CO_6010E00: + { type: GFX, offset: 0x6010E00, symbol: D_CO_6010E00 } + +D_CO_6011790: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06011790, symbol: D_CO_6011790 } + +D_CO_6011F90: + { type: GFX, offset: 0x6011F90, symbol: D_CO_6011F90 } + +D_CO_6012640: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06012640, symbol: D_CO_6012640 } + +D_CO_6012840: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06012840, symbol: D_CO_6012840 } + +D_CO_6012D00: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06012D00, symbol: D_CO_6012D00 } + +D_CO_60132B0: + { type: GFX, offset: 0x60132B0, symbol: D_CO_60132B0 } + +D_CO_60137B0: + { type: GFX, offset: 0x60137B0, symbol: D_CO_60137B0 } + +D_CO_6013B50: + { type: GFX, offset: 0x6013B50, symbol: D_CO_6013B50 } + +D_CO_6013BE0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06013BE0, symbol: D_CO_6013BE0 } + +D_CO_60143E0: + { type: GFX, offset: 0x60143E0, symbol: D_CO_60143E0 } + +D_CO_6014500: + { type: GFX, offset: 0x6014500, symbol: D_CO_6014500 } + +D_CO_6014670: + { type: GFX, offset: 0x6014670, symbol: D_CO_6014670 } + +D_CO_6014A20: + { type: GFX, offset: 0x6014A20, symbol: D_CO_6014A20 } + +D_CO_6014B50: + { type: GFX, offset: 0x6014B50, symbol: D_CO_6014B50 } + +D_CO_60151A8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x060151A8, symbol: D_CO_60151A8 } + +D_CO_60153B0: + { type: GFX, offset: 0x60153B0, symbol: D_CO_60153B0 } + +D_CO_6015F00: + { type: GFX, offset: 0x6015F00, symbol: D_CO_6015F00 } + +D_CO_6015700: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06015700, symbol: D_CO_6015700 } + +D_CO_6016270: + { type: GFX, offset: 0x6016270, symbol: D_CO_6016270 } + +D_CO_60164F0: + { type: GFX, offset: 0x60164F0, symbol: D_CO_60164F0 } + +D_CO_6016580: + { type: GFX, offset: 0x6016580, symbol: D_CO_6016580 } + +D_CO_6017F10: + { type: GFX, offset: 0x6017F10, symbol: D_CO_6017F10 } + +D_CO_60186E0: + { type: GFX, offset: 0x60186E0, symbol: D_CO_60186E0 } + +D_CO_6018E80: + { type: GFX, offset: 0x6018E80, symbol: D_CO_6018E80 } + +D_CO_60191C8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x060191C8, symbol: D_CO_60191C8 } + +D_CO_60199D0: + { type: GFX, offset: 0x60199D0, symbol: D_CO_60199D0 } + +D_CO_6019C60: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06019C60, symbol: D_CO_6019C60 } + +D_CO_6019E60: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06019E60, symbol: D_CO_6019E60 } + +D_CO_601FF58: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601FF58, symbol: D_CO_601FF58 } + +D_CO_601A7D0: + { type: GFX, offset: 0x601A7D0, symbol: D_CO_601A7D0 } + +D_CO_601AD60: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601AD60, symbol: D_CO_601AD60 } + +D_CO_601B560: + { type: GFX, offset: 0x601B560, symbol: D_CO_601B560 } + +D_CO_601B640: + { type: GFX, offset: 0x601B640, symbol: D_CO_601B640 } + +D_CO_601B6C0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601B6C0, symbol: D_CO_601B6C0 } + +D_CO_601BEC0: + { type: GFX, offset: 0x601BEC0, symbol: D_CO_601BEC0 } + +D_CO_601C1A8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601C1A8, symbol: D_CO_601C1A8 } + +D_CO_601C9B0: + { type: GFX, offset: 0x601C9B0, symbol: D_CO_601C9B0 } + +D_CO_601CAA0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x0601CAA0, symbol: D_CO_601CAA0 } + +D_CO_601DAA0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x0601DAA0, symbol: D_CO_601DAA0 } + +D_CO_601EAA0: + { type: GFX, offset: 0x601EAA0, symbol: D_CO_601EAA0 } + +D_CO_601ED00: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601ED00, symbol: D_CO_601ED00 } + +D_CO_601F500: + { type: GFX, offset: 0x601F500, symbol: D_CO_601F500 } + +D_CO_601F5A0: + { type: GFX, offset: 0x601F5A0, symbol: D_CO_601F5A0 } + +D_CO_6020760: + { type: GFX, offset: 0x6020760, symbol: D_CO_6020760 } + +D_CO_6020B40: + { type: GFX, offset: 0x6020B40, symbol: D_CO_6020B40 } + +D_CO_6021188: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06021188, symbol: D_CO_6021188 } + +D_CO_60220D0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x060220D0, symbol: D_CO_60220D0 } + +D_CO_6023AC0: + { type: GFX, offset: 0x6023AC0, symbol: D_CO_6023AC0 } + +D_CO_6023DE8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06023DE8, symbol: D_CO_6023DE8 } + +D_CO_6024160: + { type: GFX, offset: 0x6024160, symbol: D_CO_6024160 } + +D_CO_60244A0: + { type: GFX, offset: 0x60244A0, symbol: D_CO_60244A0 } + +D_CO_60245E0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x060245E0, symbol: D_CO_60245E0 } + +D_CO_6025500: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x06025500, symbol: D_CO_6025500 } + +D_CO_6026420: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x06026420, symbol: D_CO_6026420 } + +D_CO_6027340: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x06027340, symbol: D_CO_6027340 } + +D_CO_6028260: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06028260, symbol: D_CO_6028260 } + +D_CO_6028A60: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06028A60, symbol: D_CO_6028A60 } + +D_CO_6029528: + { type: SF64:ANIM, offset: 0x6029528, symbol: D_CO_6029528 } + +D_CO_6029674: + { type: SF64:SKELETON, offset: 0x6029674, symbol: D_CO_6029674 } + +D_CO_602991C: + { type: SF64:ANIM, offset: 0x602991C, symbol: D_CO_602991C } + +D_CO_6029A48: + { type: SF64:SKELETON, offset: 0x6029A48, symbol: D_CO_6029A48 } + +D_CO_602A520: + { type: SF64:ANIM, offset: 0x602A520, symbol: D_CO_602A520 } + +D_CO_602AA04: + { type: SF64:ANIM, offset: 0x602AA04, symbol: D_CO_602AA04 } + +D_CO_602AA7C: + { type: SF64:ANIM, offset: 0x602AA7C, symbol: D_CO_602AA7C } + +D_CO_602AB48: + { type: SF64:SKELETON, offset: 0x602AB48, symbol: D_CO_602AB48 } + +D_CO_602BC18: + { type: SF64:ANIM, offset: 0x602BC18, symbol: D_CO_602BC18 } + +D_CO_602BE64: + { type: SF64:SKELETON, offset: 0x602BE64, symbol: D_CO_602BE64 } + +D_CO_602C0D0: + { type: SF64:ANIM, offset: 0x602C0D0, symbol: D_CO_602C0D0 } + +D_CO_602D31C: + { type: SF64:ANIM, offset: 0x602D31C, symbol: D_CO_602D31C } + +D_CO_602D400: + { type: SF64:ANIM, offset: 0x602D400, symbol: D_CO_602D400 } + +D_CO_602D5AC: + { type: SF64:SKELETON, offset: 0x602D5AC, symbol: D_CO_602D5AC } + +D_CO_602D5F0: + { type: GFX, offset: 0x602D5F0, symbol: D_CO_602D5F0 } + +D_CO_602DA20: + { type: GFX, offset: 0x602DA20, symbol: D_CO_602DA20 } + +D_CO_602DCA0: + { type: GFX, offset: 0x602DCA0, symbol: D_CO_602DCA0 } + +D_CO_602DD40: + { type: GFX, offset: 0x602DD40, symbol: D_CO_602DD40 } + +D_CO_602E080: + { type: GFX, offset: 0x602E080, symbol: D_CO_602E080 } + +D_CO_602E570: + { type: GFX, offset: 0x602E570, symbol: D_CO_602E570 } + +D_CO_602E7A0: + { type: GFX, offset: 0x602E7A0, symbol: D_CO_602E7A0 } + +D_CO_602E9E0: + { type: GFX, offset: 0x602E9E0, symbol: D_CO_602E9E0 } + +D_CO_602ECB0: + { type: GFX, offset: 0x602ECB0, symbol: D_CO_602ECB0 } + +D_CO_602ED50: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 16, offset: 0x0602ED50, symbol: D_CO_602ED50 } + +D_CO_602F7C0: + { type: GFX, offset: 0x602F7C0, symbol: D_CO_602F7C0 } + +D_CO_602F848: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x0602F848, symbol: D_CO_602F848 } + +D_CO_6030850: + { type: GFX, offset: 0x6030850, symbol: D_CO_6030850 } + +D_CO_6030FD0: + { type: GFX, offset: 0x6030FD0, symbol: D_CO_6030FD0 } + +D_CO_6031130: + { type: GFX, offset: 0x6031130, symbol: D_CO_6031130 } + +D_CO_6031280: + { type: GFX, offset: 0x6031280, symbol: D_CO_6031280 } + +D_CO_60329C0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x060329C0, symbol: D_CO_60329C0 } + +D_CO_6032BC0: + { type: GFX, offset: 0x6032BC0, symbol: D_CO_6032BC0 } + +D_CO_6033000: + { type: GFX, offset: 0x6033000, symbol: D_CO_6033000 } + +D_CO_6033088: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06033088, symbol: D_CO_6033088 } + +D_CO_6033290: + { type: GFX, offset: 0x6033290, symbol: D_CO_6033290 } + +D_CO_6033AF0: + { type: GFX, offset: 0x6033AF0, symbol: D_CO_6033AF0 } + +D_CO_6034388: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06034388, symbol: D_CO_6034388 } + +D_CO_6034B90: + { type: GFX, offset: 0x6034B90, symbol: D_CO_6034B90 } + +D_CO_6034C28: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06034C28, symbol: D_CO_6034C28 } + +D_CO_6035430: + { type: GFX, offset: 0x6035430, symbol: D_CO_6035430 } + +D_CO_60354F0: + { type: GFX, offset: 0x60354F0, symbol: D_CO_60354F0 } + +D_CO_60355A0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x060355A0, symbol: D_CO_60355A0 } + +D_CO_6035DA0: + { type: GFX, offset: 0x6035DA0, symbol: D_CO_6035DA0 } + +D_CO_6035F10: + { type: GFX, offset: 0x6035F10, symbol: D_CO_6035F10 } + +D_CO_60361F0: + { type: GFX, offset: 0x60361F0, symbol: D_CO_60361F0 } + +D_CO_60363B0: + { type: GFX, offset: 0x60363B0, symbol: D_CO_60363B0 } + +D_CO_6036438: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 32, offset: 0x06036438, symbol: D_CO_6036438 } + +D_CO_6036840: + { type: GFX, offset: 0x6036840, symbol: D_CO_6036840 } + +D_CO_60368C8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 32, offset: 0x060368C8, symbol: D_CO_60368C8 } + +D_CO_6036CD0: + { type: GFX, offset: 0x6036CD0, symbol: D_CO_6036CD0 } + +D_CO_6036D58: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 32, offset: 0x06036D58, symbol: D_CO_6036D58 } + +D_CO_6037160: + { type: SF64:ENVIRONMENT, offset: 0x6037160, symbol: D_CO_6037160 } + +D_CO_60371A4: + { type: SF64:OBJECT_INIT, offset: 0x60371A4, symbol: D_CO_60371A4 } + +D_CO_603B074: + { type: SF64:OBJECT_INIT, offset: 0x603B074, symbol: D_CO_603B074 } + +D_CO_603D9E8: + { type: SF64:SCRIPT, offset: 0x603D9E8, symbol: D_CO_603D9E8 } + +# Seems unused +D_CO_603DC40: + { type: SF64:HITBOX, offset: 0x603DC40, symbol: D_CO_603DC40 } + +D_CO_603DD40: + { type: SF64:HITBOX, offset: 0x603DD40, symbol: D_CO_603DD40 } + +D_CO_603DDF0: + { type: SF64:HITBOX, offset: 0x603DDF0, symbol: D_CO_603DDF0 } + +D_CO_603DCA4: + { type: SF64:HITBOX, offset: 0x603DCA4, symbol: D_CO_603DCA4 } + +D_CO_603DE8C: + { type: SF64:HITBOX, offset: 0x603DE8C, symbol: D_CO_603DE8C } + +D_CO_603DEF4: + { type: SF64:HITBOX, offset: 0x603DEF4, symbol: D_CO_603DEF4 } + +D_CO_603DF8C: + { type: SF64:HITBOX, offset: 0x603DF8C, symbol: D_CO_603DF8C } + +D_CO_603DFDC: + { type: SF64:HITBOX, offset: 0x603DFDC, symbol: D_CO_603DFDC } + +D_CO_603E014: + { type: SF64:HITBOX, offset: 0x603E014, symbol: D_CO_603E014 } + +D_CO_603E030: + { type: SF64:HITBOX, offset: 0x603E030, symbol: D_CO_603E030 } + +D_CO_603E09C: + { type: SF64:HITBOX, offset: 0x603E09C, symbol: D_CO_603E09C } + +D_CO_603E0EC: + { type: SF64:HITBOX, offset: 0x603E0EC, symbol: D_CO_603E0EC } + +D_CO_603E118: + { type: SF64:HITBOX, offset: 0x603E118, symbol: D_CO_603E118 } + +D_CO_603E14C: + { type: SF64:HITBOX, offset: 0x603E14C, symbol: D_CO_603E14C } + +D_CO_603E1B4: + { type: SF64:HITBOX, offset: 0x603E1B4, symbol: D_CO_603E1B4 } + +D_CO_603E21C: + { type: SF64:HITBOX, offset: 0x603E21C, symbol: D_CO_603E21C } + +# seems unused +D_CO_603E2C0: + { type: SF64:HITBOX, offset: 0x603E2C0, symbol: D_CO_603E2C0 } + +# seems unused +D_CO_603E2F4: + { type: SF64:HITBOX, offset: 0x603E2F4, symbol: D_CO_603E2F4 } + +D_CO_603E3E0: + { type: SF64:HITBOX, offset: 0x603E3E0, symbol: D_CO_603E3E0 } + +D_CO_603E468: + { type: SF64:HITBOX, offset: 0x603E468, symbol: D_CO_603E468 } + +D_CO_603E484: + { type: SF64:HITBOX, offset: 0x603E484, symbol: D_CO_603E484 } + +D_CO_603E4A0: + { type: SF64:HITBOX, offset: 0x603E4A0, symbol: D_CO_603E4A0 } + +D_CO_603E4A4: + { type: SF64:HITBOX, offset: 0x603E4A4, symbol: D_CO_603E4A4 } + +D_CO_603E4DC: + { type: SF64:HITBOX, offset: 0x603E4DC, symbol: D_CO_603E4DC } + +D_CO_603E514: + { type: SF64:HITBOX, offset: 0x603E514, symbol: D_CO_603E514 } + +D_CO_603E54C: + { type: SF64:HITBOX, offset: 0x603E54C, symbol: D_CO_603E54C } + +D_CO_603E598: + { type: SF64:HITBOX, offset: 0x603E598, symbol: D_CO_603E598 } + +D_CO_603E5B4: + { type: SF64:HITBOX, offset: 0x603E5B4, symbol: D_CO_603E5B4 } + +D_CO_603E5D0: + { type: SF64:HITBOX, offset: 0x603E5D0, symbol: D_CO_603E5D0 } + +D_CO_603E604: + { type: SF64:HITBOX, offset: 0x603E604, symbol: D_CO_603E604 } + +D_CO_603E620: + { type: SF64:HITBOX, offset: 0x603E620, symbol: D_CO_603E620 } + +D_CO_603E714: + { type: SF64:HITBOX, offset: 0x603E714, symbol: D_CO_603E714 } + +D_CO_603E748: + { type: SF64:HITBOX, offset: 0x603E748, symbol: D_CO_603E748 } + +D_CO_603E7C4: + { type: SF64:HITBOX, offset: 0x603E7C4, symbol: D_CO_603E7C4 } + +D_CO_603E840: + { type: SF64:HITBOX, offset: 0x603E840, symbol: D_CO_603E840 } + +D_CO_603E88C: + { type: SF64:HITBOX, offset: 0x603E88C, symbol: D_CO_603E88C } + +D_CO_603E8A8: + { type: SF64:HITBOX, offset: 0x603E8A8, symbol: D_CO_603E8A8 } + +D_CO_603E924: + { type: SF64:HITBOX, offset: 0x603E924, symbol: D_CO_603E924 } + +D_CO_603E98C: + { type: SF64:HITBOX, offset: 0x603E98C, symbol: D_CO_603E98C } + +D_CO_603E9EC: + { type: SF64:HITBOX, offset: 0x603E9EC, symbol: D_CO_603E9EC } + +D_CO_603EA08: + { type: SF64:HITBOX, offset: 0x603EA08, symbol: D_CO_603EA08 } + +D_CO_603EA74: + { type: SF64:HITBOX, offset: 0x603EA74, symbol: D_CO_603EA74 } + +D_CO_603EAE0: + { type: SF64:HITBOX, offset: 0x603EAE0, symbol: D_CO_603EAE0 } + +D_CO_603EB0C: + { type: SF64:HITBOX, offset: 0x603EB0C, symbol: D_CO_603EB0C } + +D_CO_603EB38: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0603EB38, symbol: D_CO_603EB38 } + +D_CO_603F338: + { type: SF64:TRIANGLE, count: 13, offset: 0x603F338, symbol: D_CO_603F338, mesh_symbol: D_CO_OFFSET, mesh_offset: 0x603F388 } + +D_CO_603F40C: + { type: SF64:TRIANGLE, count: 36, offset: 0x603F40C, symbol: D_CO_603F40C, mesh_symbol: D_CO_OFFSET } diff --git a/assets/yaml/us/rev1/ast_ending.yaml b/assets/yaml/us/rev1/ast_ending.yaml new file mode 100644 index 00000000..4bd1b0b2 --- /dev/null +++ b/assets/yaml/us/rev1/ast_ending.yaml @@ -0,0 +1,125 @@ +:config: + segments: + - [0x07, 0xD27600] + header: + code: + - '#include "assets/ast_ending.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + +D_END_7000000: { type: GFX, offset: 0x7000000, symbol: D_END_7000000} + +D_END_7000118: {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x7000118, symbol: D_END_7000118} + +D_END_7001118: {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x7001118, symbol: D_END_7001118} + +D_END_7002120: { type: GFX, offset: 0x7002120, symbol: D_END_7002120} + +D_END_7002238: {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x7002238, symbol: D_END_7002238} + +D_END_7003238: {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x7003238, symbol: D_END_7003238} + +D_END_7004240: { type: GFX, offset: 0x7004240, symbol: D_END_7004240} + +D_END_7004620: {type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x7004620, symbol: D_END_7004620} + +D_END_7005620: {type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x7005620, symbol: D_END_7005620} + +D_END_7006620: {type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x7006620, symbol: D_END_7006620} + +D_END_7007620: {type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x7007620, symbol: D_END_7007620} + +D_END_7008620: {type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x7008620, symbol: D_END_7008620} + +D_END_7009620: {type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x7009620, symbol: D_END_7009620} + +D_END_700A620: {type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x700A620, symbol: D_END_700A620} + +D_END_700B620: {type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x700B620, symbol: D_END_700B620} + +D_END_700C620: { type: GFX, offset: 0x700C620, symbol: D_END_700C620} + +D_END_700C6A8: {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x700C6A8, symbol: D_END_700C6A8} + +D_END_700C8B0: { type: GFX, offset: 0x700C8B0, symbol: D_END_700C8B0} + +D_END_700C940: {type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x700C940, symbol: D_END_700C940} + +D_END_700D940: { type: GFX, offset: 0x700D940, symbol: D_END_700D940} + +D_END_700D9D8: {type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x700D9D8, symbol: D_END_700D9D8} + +D_END_700E9E0: { type: GFX, offset: 0x700E9E0, symbol: D_END_700E9E0} + +D_END_700EA38: {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x700EA38, symbol: D_END_700EA38} + +D_END_700F240: { type: GFX, offset: 0x700F240, symbol: D_END_700F240} + +D_END_700F320: { type: GFX, offset: 0x700F320, symbol: D_END_700F320} + +D_END_7010070: {type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x7010070, symbol: D_END_7010070} + +D_END_70100F0: {type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x70100F0, symbol: D_END_70100F0} + +D_END_7010170: {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x7010170, symbol: D_END_7010170} + +D_END_7010970: { type: GFX, offset: 0x7010970, symbol: D_END_7010970} + +D_END_7010A08: {type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 32, offset: 0x7010A08, symbol: D_END_7010A08} + +D_END_7010E10: {type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 26, offset: 0x7010E10, symbol: D_END_7010E10, tlut: 0x7010EE0} + +D_END_7010EE0: {type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x7010EE0, symbol: D_END_7010EE0} + +D_END_7010F00: {type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 26, offset: 0x7010F00, symbol: D_END_7010F00, tlut: 0x7010FD0} + +D_END_7010FD0: {type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x7010FD0, symbol: D_END_7010FD0} + +D_END_7010FF0: {type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 26, offset: 0x7010FF0, symbol: D_END_7010FF0, tlut: 0x70110C0} + +D_END_70110C0: {type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x70110C0, symbol: D_END_70110C0} + +D_END_70110E0: {type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 26, offset: 0x70110E0, symbol: D_END_70110E0, tlut: 0x70111B0} + +D_END_70111B0: {type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x70111B0, symbol: D_END_70111B0} + +D_END_70111D0: { type: GFX, offset: 0x70111D0, symbol: D_END_70111D0} + +D_END_70113B8: {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x70113B8, symbol: D_END_70113B8} + +D_END_70123B8: {type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x70123B8, symbol: D_END_70123B8} + +D_END_70133B8: {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x70133B8, symbol: D_END_70133B8} + +D_END_70143C0: { type: GFX, offset: 0x70143C0, symbol: D_END_70143C0} + +D_END_7014540: {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x7014540, symbol: D_END_7014540} + +D_END_7015540: {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x7015540, symbol: D_END_7015540} + +D_END_7016540: { type: GFX, offset: 0x7016540, symbol: D_END_7016540} + +D_END_7016658: {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x7016658, symbol: D_END_7016658} + +D_END_7017658: {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x7017658, symbol: D_END_7017658} + +D_END_7018708: { type: SF64:ANIM, offset: 0x7018708, symbol: D_END_7018708} + +D_END_70187B4: { type: SF64:SKELETON, offset: 0x70187B4, symbol: D_END_70187B4} + +D_END_7019C90: {type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x7019C90, symbol: D_END_7019C90} + +D_END_7019D10: {type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x7019D10, symbol: D_END_7019D10} + +D_END_7019D90: {type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x7019D90, symbol: D_END_7019D90} + +D_END_7019E10: {type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x7019E10, symbol: D_END_7019E10} + +D_END_7019E90: {type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x7019E90, symbol: D_END_7019E90} + +D_END_7019F10: {type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x7019F10, symbol: D_END_7019F10} + +D_END_7019F90: {type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x7019F90, symbol: D_END_7019F90} + +D_END_701A010: {type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x701A010, symbol: D_END_701A010} diff --git a/assets/yaml/us/rev1/ast_ending_award_back.yaml b/assets/yaml/us/rev1/ast_ending_award_back.yaml new file mode 100644 index 00000000..4cc3746f --- /dev/null +++ b/assets/yaml/us/rev1/ast_ending_award_back.yaml @@ -0,0 +1,13 @@ +:config: + segments: + - [0x08, 0xD68480] + header: + code: + - '#include "assets/ast_ending_award_back.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + +ending_award_back: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 316, height: 270, offset: 0x8000000, symbol: gEndingAwardBack } + diff --git a/assets/yaml/us/rev1/ast_ending_award_front.yaml b/assets/yaml/us/rev1/ast_ending_award_front.yaml new file mode 100644 index 00000000..81908bf9 --- /dev/null +++ b/assets/yaml/us/rev1/ast_ending_award_front.yaml @@ -0,0 +1,12 @@ +:config: + segments: + - [0x08, 0xD43400] + header: + code: + - '#include "assets/ast_ending_award_front.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + +ending_award_front: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 316, height: 240, offset: 0x8000000, symbol: gEndingAwardFront } \ No newline at end of file diff --git a/assets/yaml/us/rev1/ast_ending_expert.yaml b/assets/yaml/us/rev1/ast_ending_expert.yaml new file mode 100644 index 00000000..7963c318 --- /dev/null +++ b/assets/yaml/us/rev1/ast_ending_expert.yaml @@ -0,0 +1,15 @@ +:config: + segments: + - [0x08, 0xD91F10] + header: + code: + - '#include "assets/ast_ending_expert.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + +ending_expert_reward: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 316, height: 240, offset: 0x8000000, symbol: gEndingExpertReward } + +ending_normal_reward: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 316, height: 240, offset: 0x8025080, symbol: gEndingNormalReward } \ No newline at end of file diff --git a/assets/yaml/us/rev1/ast_enmy_planet.yaml b/assets/yaml/us/rev1/ast_enmy_planet.yaml new file mode 100644 index 00000000..9ea49f50 --- /dev/null +++ b/assets/yaml/us/rev1/ast_enmy_planet.yaml @@ -0,0 +1,112 @@ +:config: + segments: + - [0x04, 0x918430] + header: + code: + - '#include "assets/ast_enmy_planet.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + +# Seems unused +D_ENMY_PLANET_4000290: + { type: GFX, offset: 0x4000290, symbol: D_ENMY_PLANET_4000290 } + +ast_enmy_planet_seg4_vtx_8F8: + { type: VTX, count: 90, offset: 0x40008F8, symbol: ast_enmy_planet_seg4_vtx_8F8 } + +D_ENMY_PLANET_40001A4: + { type: SF64:ANIM, offset: 0x40001A4, symbol: D_ENMY_PLANET_40001A4 } + +D_ENMY_PLANET_4000270: + { type: SF64:SKELETON, offset: 0x4000270, symbol: D_ENMY_PLANET_4000270 } + +D_ENMY_PLANET_4000710: + { type: GFX, offset: 0x4000710, symbol: D_ENMY_PLANET_4000710 } + +D_ENMY_PLANET_4001298: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x04001298, symbol: D_ENMY_PLANET_4001298 } + +D_ENMY_PLANET_4001698: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x04001698, symbol: D_ENMY_PLANET_4001698 } + +D_ENMY_PLANET_4000E98: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x04000E98, symbol: D_ENMY_PLANET_4000E98 } + +D_ENMY_PLANET_4001098: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x04001098, symbol: D_ENMY_PLANET_4001098 } + +D_ENMY_PLANET_4001498: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x04001498, symbol: D_ENMY_PLANET_4001498 } + +D_ENMY_PLANET_40018A0: + { type: GFX, offset: 0x40018A0, symbol: D_ENMY_PLANET_40018A0 } + +D_ENMY_PLANET_40024B8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x040024B8, symbol: D_ENMY_PLANET_40024B8 } + +D_ENMY_PLANET_4002538: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x04002538, symbol: D_ENMY_PLANET_4002538 } + +D_ENMY_PLANET_4002D38: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x04002D38, symbol: D_ENMY_PLANET_4002D38 } + +D_ENMY_PLANET_4003D38: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x04003D38, symbol: D_ENMY_PLANET_4003D38 } + +D_ENMY_PLANET_4004538: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x04004538, symbol: D_ENMY_PLANET_4004538 } + +D_ENMY_PLANET_4004D38: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x04004D38, symbol: D_ENMY_PLANET_4004D38 } + +D_ENMY_PLANET_40057AC: + { type: SF64:ANIM, offset: 0x40057AC, symbol: D_ENMY_PLANET_40057AC } + +D_ENMY_PLANET_40058B8: + { type: SF64:SKELETON, offset: 0x40058B8, symbol: D_ENMY_PLANET_40058B8 } + +D_ENMY_PLANET_4005E78: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x04005E78, symbol: D_ENMY_PLANET_4005E78 } + +D_ENMY_PLANET_4006078: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x04006078, symbol: D_ENMY_PLANET_4006078 } + +D_ENMY_PLANET_4006280: + { type: GFX, offset: 0x4006280, symbol: D_ENMY_PLANET_4006280 } + +D_ENMY_PLANET_40064E8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x040064E8, symbol: D_ENMY_PLANET_40064E8 } + +D_ENMY_PLANET_40066E8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x040066E8, symbol: D_ENMY_PLANET_40066E8 } + +D_ENMY_PLANET_40068F0: + { type: GFX, offset: 0x40068F0, symbol: D_ENMY_PLANET_40068F0 } + +D_ENMY_PLANET_4006E90: + { type: GFX, offset: 0x4006E90, symbol: D_ENMY_PLANET_4006E90 } + +D_ENMY_PLANET_40073C0: + { type: GFX, offset: 0x40073C0, symbol: D_ENMY_PLANET_40073C0 } + +D_ENMY_PLANET_4007AF0: + { type: GFX, offset: 0x4007AF0, symbol: D_ENMY_PLANET_4007AF0 } + +D_ENMY_PLANET_4008100: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x04008100, symbol: D_ENMY_PLANET_4008100 } + +D_ENMY_PLANET_4008CE0: + { type: GFX, offset: 0x4008CE0, symbol: D_ENMY_PLANET_4008CE0 } + +D_ENMY_PLANET_4008D68: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x04008D68, symbol: D_ENMY_PLANET_4008D68 } + +D_ENMY_PLANET_4008FF8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x04008FF8, symbol: D_ENMY_PLANET_4008FF8 } + +D_ENMY_PLANET_4008F70: + { type: GFX, offset: 0x4008F70, symbol: D_ENMY_PLANET_4008F70 } + +D_ENMY_PLANET_4009800: + { type: GFX, offset: 0x4009800, symbol: D_ENMY_PLANET_4009800 } diff --git a/assets/yaml/us/rev1/ast_enmy_space.yaml b/assets/yaml/us/rev1/ast_enmy_space.yaml new file mode 100644 index 00000000..9bfb991f --- /dev/null +++ b/assets/yaml/us/rev1/ast_enmy_space.yaml @@ -0,0 +1,134 @@ +:config: + segments: + - [0x04, 0x922730] + header: + code: + - '#include "assets/ast_enmy_space.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + +D_ENMY_SPACE_4000080: + { type: SF64:ANIM, offset: 0x4000080, symbol: D_ENMY_SPACE_4000080 } + +D_ENMY_SPACE_400014C: + { type: SF64:SKELETON, offset: 0x400014C, symbol: D_ENMY_SPACE_400014C } + +D_ENMY_SPACE_4000170: + { type: GFX, offset: 0x4000170, symbol: D_ENMY_SPACE_4000170 } + +D_ENMY_SPACE_4000650: + { type: GFX, offset: 0x4000650, symbol: D_ENMY_SPACE_4000650 } + +D_ENMY_SPACE_4000EC0: + { type: GFX, offset: 0x4000EC0, symbol: D_ENMY_SPACE_4000EC0 } + +D_ENMY_SPACE_4001108: + { type: TEXTURE, format: RGBA16, offset: 0x4001108, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4001108 } + +D_ENMY_SPACE_4001310: + { type: GFX, offset: 0x4001310, symbol: D_ENMY_SPACE_4001310 } + +D_ENMY_SPACE_4001A30: + { type: TEXTURE, format: RGBA16, offset: 0x4001A30, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4001A30 } + +D_ENMY_SPACE_4001C30: + { type: TEXTURE, format: RGBA16, offset: 0x04001C30, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4001C30 } + +D_ENMY_SPACE_4001E30: + { type: TEXTURE, format: RGBA16, offset: 0x04001E30, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4001E30 } + +D_ENMY_SPACE_4002030: + { type: TEXTURE, format: RGBA16, offset: 0x04002030, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4002030 } + +D_ENMY_SPACE_4002230: + { type: GFX, offset: 0x4002230, symbol: D_ENMY_SPACE_4002230 } + +D_ENMY_SPACE_4002C50: + { type: TEXTURE, format: RGBA16, offset: 0x04002C50, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4002C50 } + +D_ENMY_SPACE_4002E50: + { type: TEXTURE, format: RGBA16, offset: 0x04002E50, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4002E50 } + +D_ENMY_SPACE_4003050: + { type: TEXTURE, format: RGBA16, offset: 0x04003050, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4003050 } + +D_ENMY_SPACE_4003250: + { type: TEXTURE, format: RGBA16, offset: 0x04003250, width: 4, height: 4, ctype: u16, symbol: D_ENMY_SPACE_4003250 } + +D_ENMY_SPACE_4003270: + { type: TEXTURE, format: RGBA16, offset: 0x04003270, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4003270 } + +D_ENMY_SPACE_4003470: + { type: TEXTURE, format: RGBA16, offset: 0x04003470, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4003470 } + +D_ENMY_SPACE_4003670: + { type: TEXTURE, format: RGBA16, offset: 0x04003670, width: 8, height: 8, ctype: u16, symbol: D_ENMY_SPACE_4003670 } + +D_ENMY_SPACE_4003BD0: + { type: GFX, offset: 0x4003BD0, symbol: D_ENMY_SPACE_4003BD0 } + +D_ENMY_SPACE_40047E8: + { type: TEXTURE, format: RGBA16, offset: 0x40047E8, width: 32, height: 32, ctype: u16, symbol: D_ENMY_SPACE_40047E8 } + +D_ENMY_SPACE_4004FE8: + { type: TEXTURE, format: RGBA16, offset: 0x4004FE8, width: 64, height: 32, ctype: u16, symbol: D_ENMY_SPACE_4004FE8 } + +D_ENMY_SPACE_4005FE8: + { type: TEXTURE, format: RGBA16, offset: 0x4005FE8, width: 32, height: 32, ctype: u16, symbol: D_ENMY_SPACE_4005FE8 } + +D_ENMY_SPACE_40067E8: + { type: TEXTURE, format: RGBA16, offset: 0x40067E8, width: 32, height: 32, ctype: u16, symbol: D_ENMY_SPACE_40067E8 } + +D_ENMY_SPACE_40077E8: + { type: TEXTURE, format: RGBA16, offset: 0x40077E8, width: 8, height: 8, ctype: u16, symbol: D_ENMY_SPACE_40077E8 } + +D_ENMY_SPACE_4007870: + { type: GFX, offset: 0x4007870, symbol: D_ENMY_SPACE_4007870 } + +D_ENMY_SPACE_4006FE8: + { type: TEXTURE, format: RGBA16, offset: 0x4006FE8, width: 32, height: 32, ctype: u16, symbol: D_ENMY_SPACE_4006FE8 } + +D_ENMY_SPACE_40084D0: + { type: GFX, offset: 0x40084D0, symbol: D_ENMY_SPACE_40084D0 } + +D_ENMY_SPACE_4008550: + { type: TEXTURE, format: RGBA16, offset: 0x04008550, width: 32, height: 32, ctype: u16, symbol: D_ENMY_SPACE_4008550 } + +D_ENMY_SPACE_4008D50: + { type: GFX, offset: 0x4008D50, symbol: D_ENMY_SPACE_4008D50 } + +D_ENMY_SPACE_4008FA0: + { type: GFX, offset: 0x4008FA0, symbol: D_ENMY_SPACE_4008FA0 } + +D_ENMY_SPACE_40096B8: + { type: TEXTURE, format: RGBA16, offset: 0x040096B8, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_40096B8 } + +D_ENMY_SPACE_40098B8: + { type: TEXTURE, format: RGBA16, offset: 0x040098B8, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_40098B8 } + +D_ENMY_SPACE_4009AB8: + { type: TEXTURE, format: RGBA16, offset: 0x04009AB8, width: 32, height: 32, ctype: u16, symbol: D_ENMY_SPACE_4009AB8 } + +D_ENMY_SPACE_400A30C: + { type: SF64:ANIM, offset: 0x400A30C, symbol: D_ENMY_SPACE_400A30C } + +D_ENMY_SPACE_400A398: + { type: SF64:SKELETON, offset: 0x400A398, symbol: D_ENMY_SPACE_400A398 } + +D_ENMY_SPACE_400A630: + { type: GFX, offset: 0x400A630, symbol: D_ENMY_SPACE_400A630 } + + +D_ENMY_SPACE_400AAE0: + { type: GFX, offset: 0x400AAE0, symbol: D_ENMY_SPACE_400AAE0 } + + +D_ENMY_SPACE_400B390: + { type: GFX, offset: 0x400B390, symbol: D_ENMY_SPACE_400B390 } + + +D_ENMY_SPACE_400BD20: + { type: GFX, offset: 0x400BD20, symbol: D_ENMY_SPACE_400BD20 } + +# size = 0xC510 \ No newline at end of file diff --git a/assets/yaml/us/rev1/ast_font_3d.yaml b/assets/yaml/us/rev1/ast_font_3d.yaml new file mode 100644 index 00000000..745d6518 --- /dev/null +++ b/assets/yaml/us/rev1/ast_font_3d.yaml @@ -0,0 +1,128 @@ +:config: + segments: + - [0x09, 0xCDDCA0] + header: + code: + - '#include "assets/ast_font_3d.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + +D_FONT3D_9000000: + { type: GFX, offset: 0x9000000, symbol: D_FONT3D_9000000 } + +D_FONT3D_90001F0: + { type: GFX, offset: 0x90001F0, symbol: D_FONT3D_90001F0 } + +D_FONT3D_9000528: + { type: TEXTURE, ctype: u8, format: CI4, width: 8, height: 8, offset: 0x09000528, symbol: D_FONT3D_9000528, tlut: 0x09000548 } + +D_FONT3D_9000548: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x09000548, symbol: D_FONT3D_9000548 } + +D_FONT3D_9000570: + { type: GFX, offset: 0x9000570, symbol: D_FONT3D_9000570 } + +D_FONT3D_9000980: + { type: GFX, offset: 0x9000980, symbol: D_FONT3D_9000980 } + +D_FONT3D_9001120: + { type: GFX, offset: 0x9001120, symbol: D_FONT3D_9001120 } + +D_FONT3D_90014E0: + { type: GFX, offset: 0x90014E0, symbol: D_FONT3D_90014E0 } + +D_FONT3D_9001A10: + { type: GFX, offset: 0x9001A10, symbol: D_FONT3D_9001A10 } + +D_FONT3D_9001E90: + { type: GFX, offset: 0x9001E90, symbol: D_FONT3D_9001E90 } + +D_FONT3D_90022A0: + { type: GFX, offset: 0x90022A0, symbol: D_FONT3D_90022A0 } + +D_FONT3D_9002890: + { type: GFX, offset: 0x9002890, symbol: D_FONT3D_9002890 } + +D_FONT3D_9002EA0: + { type: GFX, offset: 0x9002EA0, symbol: D_FONT3D_9002EA0 } + +D_FONT3D_9003230: + { type: GFX, offset: 0x9003230, symbol: D_FONT3D_9003230 } + +D_FONT3D_9003620: + { type: GFX, offset: 0x9003620, symbol: D_FONT3D_9003620 } + +D_FONT3D_9003A30: + { type: GFX, offset: 0x9003A30, symbol: D_FONT3D_9003A30 } + +D_FONT3D_9004230: + { type: GFX, offset: 0x9004230, symbol: D_FONT3D_9004230 } + +D_FONT3D_9004920: + { type: GFX, offset: 0x9004920, symbol: D_FONT3D_9004920 } + +D_FONT3D_9004E10: + { type: GFX, offset: 0x9004E10, symbol: D_FONT3D_9004E10 } + +D_FONT3D_9005380: + { type: GFX, offset: 0x9005380, symbol: D_FONT3D_9005380 } + +D_FONT3D_9005980: + { type: GFX, offset: 0x9005980, symbol: D_FONT3D_9005980 } + +D_FONT3D_9005CA0: + { type: GFX, offset: 0x9005CA0, symbol: D_FONT3D_9005CA0 } + +D_FONT3D_90062D0: + { type: GFX, offset: 0x90062D0, symbol: D_FONT3D_90062D0 } + +D_FONT3D_9006500: + { type: GFX, offset: 0x9006500, symbol: D_FONT3D_9006500 } + +D_FONT3D_9006AE0: + { type: GFX, offset: 0x9006AE0, symbol: D_FONT3D_9006AE0 } + +D_FONT3D_90070C0: + { type: GFX, offset: 0x90070C0, symbol: D_FONT3D_90070C0 } + +D_FONT3D_90075A0: + { type: GFX, offset: 0x90075A0, symbol: D_FONT3D_90075A0 } + +D_FONT3D_9007BB0: + { type: GFX, offset: 0x9007BB0, symbol: D_FONT3D_9007BB0 } + +D_FONT3D_9007FD0: + { type: GFX, offset: 0x9007FD0, symbol: D_FONT3D_9007FD0 } + +D_FONT3D_90086F0: + { type: GFX, offset: 0x90086F0, symbol: D_FONT3D_90086F0 } + +D_FONT3D_9008C60: + { type: GFX, offset: 0x9008C60, symbol: D_FONT3D_9008C60 } + +D_FONT3D_9009280: + { type: GFX, offset: 0x9009280, symbol: D_FONT3D_9009280 } + +D_FONT3D_9009990: + { type: GFX, offset: 0x9009990, symbol: D_FONT3D_9009990 } + +D_FONT3D_9009CB0: + { type: GFX, offset: 0x9009CB0, symbol: D_FONT3D_9009CB0 } + +D_FONT3D_900A290: + { type: GFX, offset: 0x900A290, symbol: D_FONT3D_900A290 } + +D_FONT3D_900A870: + { type: GFX, offset: 0x900A870, symbol: D_FONT3D_900A870 } + +D_FONT3D_900AF60: + { type: GFX, offset: 0x900AF60, symbol: D_FONT3D_900AF60 } + +D_FONT3D_900B580: + { type: GFX, offset: 0x900B580, symbol: D_FONT3D_900B580 } + +D_FONT3D_900BB90: + { type: GFX, offset: 0x900BB90, symbol: D_FONT3D_900BB90 } + +# size = 0xC1D0 diff --git a/assets/yaml/us/rev1/ast_fortuna.yaml b/assets/yaml/us/rev1/ast_fortuna.yaml new file mode 100644 index 00000000..2c33e207 --- /dev/null +++ b/assets/yaml/us/rev1/ast_fortuna.yaml @@ -0,0 +1,183 @@ +:config: + segments: + - [0x6, 0xB1CA50] + header: + code: + - '#include "assets/ast_fortuna.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + - '#include "sf64level.h"' + - '#include "sf64event.h"' + - '#include "sf64player.h"' + - '#include "sf64audio_external.h"' + +# Fortuna +# Former Defense Post +D_FO_6000000: + { type: TEXTURE, format: IA8, width: 168, height: 28, offset: 0x6000000, ctype: u8, symbol: D_FO_6000000 } + +D_FO_6001260: + { type: TEXTURE, format: IA8, width: 16, height: 16, offset: 0x6001260, ctype: u8, symbol: D_FO_6001260 } + +D_FO_6001360: + { type: GFX, offset: 0x6001360, symbol: D_FO_6001360 } + +D_FO_6001890: + { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6001890, ctype: u16, symbol: D_FO_6001890 } + +D_FO_6002090: + { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6002090, ctype: u16, symbol: D_FO_6002090 } + +D_FO_6002890: + { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6002890, ctype: u16, symbol: D_FO_6002890 } + +D_FO_6003090: + { type: GFX, offset: 0x6003090, symbol: D_FO_6003090 } + +D_FO_6003EC0: + { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6003EC0, ctype: u16, symbol: D_FO_6003EC0 } + +D_FO_60046C0: + { type: TEXTURE, format: RGBA16, width: 16, height: 16, offset: 0x60046C0, ctype: u16, symbol: D_FO_60046C0 } + +D_FO_60048C0: + { type: TEXTURE, format: RGBA16, width: 16, height: 16, offset: 0x60048C0, ctype: u16, symbol: D_FO_60048C0 } + +D_FO_6004AC0: + { type: TEXTURE, format: RGBA16, width: 32, height: 64, offset: 0x6004AC0, ctype: u16, symbol: D_FO_6004AC0 } + +D_FO_6005AC0: + { type: TEXTURE, format: RGBA16, width: 16, height: 16, offset: 0x6005AC0, ctype: u16, symbol: D_FO_6005AC0 } + +D_FO_6005CC0: + { type: GFX, offset: 0x6005CC0, symbol: D_FO_6005CC0 } + +D_FO_6005F20: + { type: TEXTURE, format: RGBA16, width: 16, height: 16, offset: 0x6005F20, ctype: u16, symbol: D_FO_6005F20 } + +D_FO_6006120: + { type: TEXTURE, format: CI8, width: 16, height: 16, offset: 0x6006120, ctype: u8, symbol: D_FO_6006120 } + +D_FO_6006220: + { type: TEXTURE, format: TLUT, colors: 120, offset: 0x6006220, ctype: u16, symbol: D_FO_6006220 } + +D_FO_6006310: + { type: GFX, offset: 0x6006310, symbol: D_FO_6006310 } + +D_FO_60066E0: + { type: GFX, offset: 0x60066E0, symbol: D_FO_60066E0 } + +ast_fortuna_seg6_vtx_6898: + { type: VTX, count: 52, offset: 0x6006898, symbol: ast_fortuna_seg6_vtx_6898 } + +D_FO_6006BE0: + { type: GFX, offset: 0x6006BE0, symbol: D_FO_6006BE0 } + +ast_fortuna_seg6_vtx_6D00: + { type: VTX, count: 62, offset: 0x6006D00, symbol: ast_fortuna_seg6_vtx_6D00 } + +D_FO_60070E0: + { type: TEXTURE, format: RGBA16, width: 16, height: 16, offset: 0x60070E0, ctype: u16, symbol: D_FO_60070E0 } + +D_FO_60072E0: + { type: TEXTURE, format: RGBA16, width: 16, height: 16, offset: 0x60072E0, ctype: u16, symbol: D_FO_60072E0 } + +D_FO_60074E0: + { type: GFX, offset: 0x60074E0, symbol: D_FO_60074E0 } + +D_FO_6007590: + { type: GFX, offset: 0x6007590, symbol: D_FO_6007590 } + +D_FO_6007730: + { type: GFX, offset: 0x6007730, symbol: D_FO_6007730 } + +D_FO_6007854: + { type: SF64:ANIM, offset: 0x6007854, symbol: D_FO_6007854 } + +D_FO_6007980: + { type: SF64:SKELETON, offset: 0x6007980, symbol: D_FO_6007980 } + +D_FO_60079B0: + { type: GFX, offset: 0x60079B0, symbol: D_FO_60079B0 } + +D_FO_6007D80: + { type: GFX, offset: 0x6007D80, symbol: D_FO_6007D80 } + +D_FO_6008150: + { type: TEXTURE, format: RGBA16, width: 44, height: 44, offset: 0x6008150, ctype: u16, symbol: D_FO_6008150 } + +D_FO_6009070: + { type: TEXTURE, format: RGBA16, width: 44, height: 44, offset: 0x6009070, ctype: u16, symbol: D_FO_6009070 } + +D_FO_6009F90: + { type: GFX, offset: 0x6009F90, symbol: D_FO_6009F90 } + +D_FO_600A018: + { type: TEXTURE, format: IA8, width: 32, height: 32, offset: 0x600A018, ctype: u8, symbol: D_FO_600A018 } + +D_FO_600A420: + { type: GFX, offset: 0x600A420, symbol: D_FO_600A420 } + +D_FO_600A4A8: + { type: TEXTURE, format: RGBA16, width: 32, height: 64, offset: 0x600A4A8, ctype: u16, symbol: D_FO_600A4A8 } + +D_FO_600B4B0: + { type: GFX, offset: 0x600B4B0, symbol: D_FO_600B4B0 } + +D_FO_600B5C0: + { type: TEXTURE, format: RGBA16, width: 64, height: 32, offset: 0x600B5C0, ctype: u16, symbol: D_FO_600B5C0 } + +D_FO_600C5C0: + { type: TEXTURE, format: RGBA16, width: 64, height: 32, offset: 0x600C5C0, ctype: u16, symbol: D_FO_600C5C0 } + +D_FO_600D5C0: + { type: GFX, offset: 0x600D5C0, symbol: D_FO_600D5C0 } + +D_FO_600D7E8: + { type: TEXTURE, format: RGBA16, width: 16, height: 16, offset: 0x600D7E8, ctype: u16, symbol: D_FO_600D7E8 } + +D_FO_600D9F0: + { type: GFX, offset: 0x600D9F0, symbol: D_FO_600D9F0 } + +D_FO_600DA88: + { type: TEXTURE, format: RGBA16, width: 64, height: 32, offset: 0x600DA88, ctype: u16, symbol: D_FO_600DA88 } + +D_FO_600EA90: + { type: SF64:ENVIRONMENT, offset: 0x600EA90, symbol: D_FO_600EA90 } + +D_FO_600EAD4: + { type: SF64:OBJECT_INIT, offset: 0x600EAD4, symbol: D_FO_600EAD4 } + +D_FO_600F1DC: + { type: SF64:COLPOLY, offset: 0x600F1DC, count: 22, symbol: D_FO_600F1DC, mesh_symbol: D_FO_OFFSET } + +D_FO_600F3F4: + { type: SF64:COLPOLY, offset: 0x600F3F4, count: 22, symbol: D_FO_600F3F4, mesh_symbol: D_FO_OFFSET } + +D_FO_600F60C: + { type: SF64:COLPOLY, offset: 0x600F60C, count: 93, symbol: D_FO_600F60C, mesh_symbol: D_FO_OFFSET } + +D_FO_600FE9C: + { type: SF64:HITBOX, offset: 0x600FE9C, symbol: D_FO_600FE9C } + +D_FO_600FEB8: + { type: SF64:HITBOX, offset: 0x600FEB8, symbol: D_FO_600FEB8 } + +D_FO_600FF30: + { type: SF64:HITBOX, offset: 0x600FF30, symbol: D_FO_600FF30 } + +D_FO_600FF64: + { type: SF64:HITBOX, offset: 0x600FF64, symbol: D_FO_600FF64 } + +D_FO_600FF80: + { type: SF64:HITBOX, offset: 0x600FF80, symbol: D_FO_600FF80 } + +D_FO_600FFA0: + { type: SF64:HITBOX, offset: 0x600FFA0, symbol: D_FO_600FFA0 } + +D_FO_600FFC0: + { type: SF64:HITBOX, offset: 0x600FFC0, symbol: D_FO_600FFC0 } + +D_FO_600FFE0: + { type: SF64:HITBOX, offset: 0x600FFE0, symbol: D_FO_600FFE0 } \ No newline at end of file diff --git a/assets/yaml/us/rev1/ast_great_fox.yaml b/assets/yaml/us/rev1/ast_great_fox.yaml new file mode 100644 index 00000000..03ad5207 --- /dev/null +++ b/assets/yaml/us/rev1/ast_great_fox.yaml @@ -0,0 +1,93 @@ +:config: + segments: + - [0xE, 0x92EC40] + header: + code: + - '#include "assets/ast_great_fox.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + +# Great Fox Model +D_GREAT_FOX_E000000: + { type: GFX, offset: 0xE000000, symbol: D_GREAT_FOX_E000000 } + +D_GREAT_FOX_E0094B0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0E0094B0, symbol: D_GREAT_FOX_E0094B0 } + +D_GREAT_FOX_E009CB0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x0E009CB0, symbol: D_GREAT_FOX_E009CB0 } + +# Great Fox Logo +D_GREAT_FOX_E00ACB0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0E00ACB0, symbol: D_GREAT_FOX_E00ACB0 } + +D_GREAT_FOX_E00B4B0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x0E00B4B0, symbol: D_GREAT_FOX_E00B4B0 } + +# Yellow Square +D_GREAT_FOX_E00B530: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x0E00B530, symbol: D_GREAT_FOX_E00B530 } + +D_GREAT_FOX_E00B5B0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0E00B5B0, symbol: D_GREAT_FOX_E00B5B0 } + +# Great Fox Starfox Logo +D_GREAT_FOX_E00BDB0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x0E00BDB0, symbol: D_GREAT_FOX_E00BDB0 } + +D_GREAT_FOX_E00CDB0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x0E00CDB0, symbol: D_GREAT_FOX_E00CDB0 } + +D_GREAT_FOX_E00CFB0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0E00CFB0, symbol: D_GREAT_FOX_E00CFB0 } + +D_GREAT_FOX_E00D7B0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0E00D7B0, symbol: D_GREAT_FOX_E00D7B0 } + +# Black Square +D_GREAT_FOX_E007430: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x0E007430, symbol: D_GREAT_FOX_E007430 } + +# Great Fox Model (damaged) +D_GREAT_FOX_E003AB0: + { type: GFX, offset: 0xE003AB0, symbol: D_GREAT_FOX_E003AB0 } + +D_GREAT_FOX_E0074B0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x0E0074B0, symbol: D_GREAT_FOX_E0074B0 } + +D_GREAT_FOX_E0084B0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0E0084B0, symbol: D_GREAT_FOX_E0084B0 } + +D_GREAT_FOX_E008CB0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0E008CB0, symbol: D_GREAT_FOX_E008CB0 } + +D_GREAT_FOX_E00DFB0: + { type: GFX, offset: 0xE00DFB0, symbol: D_GREAT_FOX_E00DFB0 } + +D_GREAT_FOX_E00E078: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x0E00E078, symbol: D_GREAT_FOX_E00E078 } + +# Radio Face of ROB64 +D_GREAT_FOX_E00E100: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x0E00E100, symbol: D_GREAT_FOX_E00E100 } + +# Radio Face of ROB64 (talking) +D_GREAT_FOX_E00F020: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x0E00F020, symbol: D_GREAT_FOX_E00F020 } + +# Radio Face of General Pepper +D_GREAT_FOX_E00FF40: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x0E00FF40, symbol: D_GREAT_FOX_E00FF40 } + +# Radio Face of General Pepper (talking) +D_GREAT_FOX_E010E60: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x0E010E60, symbol: D_GREAT_FOX_E010E60 } + +D_GREAT_FOX_E011D80: + { type: GFX, offset: 0xE011D80, symbol: D_GREAT_FOX_E011D80 } + +D_GREAT_FOX_E011E08: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x0E011E08, symbol: D_GREAT_FOX_E011E08 } + +# size = 0x11E90 \ No newline at end of file diff --git a/assets/yaml/us/rev1/ast_katina.yaml b/assets/yaml/us/rev1/ast_katina.yaml new file mode 100644 index 00000000..09fe56ed --- /dev/null +++ b/assets/yaml/us/rev1/ast_katina.yaml @@ -0,0 +1,179 @@ +:config: + segments: + - [0x6, 0xBB11D0] + header: + code: + - '#include "assets/ast_katina.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + - '#include "sf64level.h"' + - '#include "sf64event.h"' + - '#include "sf64player.h"' + - '#include "sf64audio_external.h"' + +# Katina +# Frontline Base +D_KA_6000000: + { type: TEXTURE, format: IA8, width: 168, height: 28, offset: 0x6000000, ctype: u8, symbol: D_KA_6000000 } + +D_KA_6001260: + { type: TEXTURE, format: IA8, width: 8, height: 8, offset: 0x6001260, ctype: u8, symbol: D_KA_6001260 } + +aKaDestroyedHatchDL: + { type: GFX, offset: 0x60012A0, symbol: aKaDestroyedHatchDL } + +aKaEnemy1DL: + { type: GFX, offset: 0x6001530, symbol: aKaEnemy1DL } + +D_KA_6001968: + { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6001968, ctype: u16, symbol: D_KA_6001968 } + +# Mothership model +D_KA_6002170: + { type: GFX, offset: 0x6002170, symbol: D_KA_6002170 } + +D_KA_6004078: + { type: TEXTURE, format: RGBA16, width: 8, height: 8, offset: 0x6004078, ctype: u16, symbol: D_KA_6004078 } + +D_KA_60040F8: + { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x60040F8, ctype: u16, symbol: D_KA_60040F8 } + +D_KA_60048F8: + { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x60048F8, ctype: u16, symbol: D_KA_60048F8 } + +D_KA_60050F8: + { type: TEXTURE, format: RGBA16, width: 16, height: 16, offset: 0x60050F8, ctype: u16, symbol: D_KA_60050F8 } + +D_KA_60052F8: + { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x60052F8, ctype: u16, symbol: D_KA_60052F8 } + +D_KA_6005AF8: + { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6005AF8, ctype: u16, symbol: D_KA_6005AF8 } + +D_KA_60062F8: + { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x60062F8, ctype: u16, symbol: D_KA_60062F8 } + +D_KA_6006AF8: + { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6006AF8, ctype: u16, symbol: D_KA_6006AF8 } + +aKaDestroyedSaucererDL: + { type: GFX, offset: 0x6007300, symbol: aKaDestroyedSaucererDL } + +D_KA_6009250: + { type: GFX, offset: 0x6009250, symbol: D_KA_6009250 } + +D_KA_60094A8: + { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x60094A8, ctype: u16, symbol: D_KA_60094A8 } + +D_KA_6009CB0: + { type: TEXTURE, format: RGBA16, width: 44, height: 44, offset: 0x6009CB0, ctype: u16, symbol: D_KA_6009CB0 } + +D_KA_600ABD0: + { type: TEXTURE, format: RGBA16, width: 44, height: 44, offset: 0x600ABD0, ctype: u16, symbol: D_KA_600ABD0 } + +aKaFLBaseDL: + { type: GFX, offset: 0x600BAF0, symbol: aKaFLBaseDL } + +D_KA_600BDB0: + { type: TEXTURE, format: RGBA16, width: 16, height: 16, offset: 0x600BDB0, ctype: u16, symbol: D_KA_600BDB0 } + +D_KA_600C2D8: + { type: TEXTURE, format: RGBA16, width: 16, height: 16, offset: 0x600C2D8, ctype: u16, symbol: D_KA_600C2D8 } + +aKaFLBaseDestroyedDL: + { type: GFX, offset: 0x600C4E0, symbol: aKaFLBaseDestroyedDL } + +D_KA_600C760: + { type: TEXTURE, format: RGBA16, width: 16, height: 16, offset: 0x600C760, ctype: u16, symbol: D_KA_600C760 } + +D_KA_600C960: + { type: TEXTURE, format: RGBA16, width: 16, height: 16, offset: 0x600C960, ctype: u16, symbol: D_KA_600C960 } + +# Mothership Core +D_KA_600CB60: + { type: GFX, offset: 0x600CB60, symbol: D_KA_600CB60 } + +D_KA_600BFB0: + { type: GFX, offset: 0x600BFB0, symbol: D_KA_600BFB0 } + +aDestroyedHatch2DL: + { type: GFX, offset: 0x600CDC0, symbol: aDestroyedHatch2DL } + +aDestroyedCoreDL: + { type: GFX, offset: 0x600D090, symbol: aDestroyedCoreDL } + +aDestroyedHatch4DL: + { type: GFX, offset: 0x600D290, symbol: aDestroyedHatch4DL } + +aDestroyedHatch3DL: + { type: GFX, offset: 0x600D4E0, symbol: aDestroyedHatch3DL } + +D_KA_600D730: + { type: GFX, offset: 0x600D730, symbol: D_KA_600D730 } + +D_KA_600D7B8: + { type: TEXTURE, format: IA8, width: 32, height: 32, offset: 0x600D7B8, ctype: u8, symbol: D_KA_600D7B8 } + +D_KA_600DBC0: + { type: GFX, offset: 0x600DBC0, symbol: D_KA_600DBC0 } + +D_KA_600DC48: + { type: TEXTURE, format: IA8, width: 32, height: 32, offset: 0x600DC48, ctype: u8, symbol: D_KA_600DC48 } + +aKaCornerianFighterDL: + { type: GFX, offset: 0x600E050, symbol: aKaCornerianFighterDL } + +D_KA_600E7E8: + { type: TEXTURE, format: RGBA16, width: 16, height: 16, offset: 0x600E7E8, ctype: u16, symbol: D_KA_600E7E8 } + +D_KA_600E9E8: + { type: TEXTURE, format: RGBA16, width: 16, height: 16, offset: 0x600E9E8, ctype: u16, symbol: D_KA_600E9E8 } + +D_KA_600EBE8: + { type: TEXTURE, format: RGBA16, width: 16, height: 16, offset: 0x600EBE8, ctype: u16, symbol: D_KA_600EBE8 } + +D_KA_600EDE8: + { type: TEXTURE, format: RGBA16, width: 16, height: 16, offset: 0x600EDE8, ctype: u16, symbol: D_KA_600EDE8 } + +aKaEnemy1LowPolyDL: + { type: GFX, offset: 0x600EFF0, symbol: aKaEnemy1LowPolyDL } + +D_KA_600F1D0: + { type: GFX, offset: 0x600F1D0, symbol: D_KA_600F1D0 } + +D_KA_600F260: + { type: TEXTURE, format: RGBA16, width: 64, height: 32, offset: 0x600F260, ctype: u16, symbol: D_KA_600F260 } + +D_KA_6010260: + { type: GFX, offset: 0x6010260, symbol: D_KA_6010260 } + +D_KA_60105D8: + { type: SF64:ANIM, offset: 0x60105D8, symbol: D_KA_60105D8 } + +D_KA_6010A60: + { type: GFX, offset: 0x6010A60, symbol: D_KA_6010A60 } + +D_KA_6010D20: + { type: GFX, offset: 0x6010D20, symbol: D_KA_6010D20 } + +D_KA_6010744: + { type: SF64:SKELETON, offset: 0x6010744, symbol: D_KA_6010744 } + +D_KA_6010780: + { type: GFX, offset: 0x6010780, symbol: D_KA_6010780 } + +D_KA_6011000: + { type: SF64:ENVIRONMENT, offset: 0x6011000, symbol: D_KA_6011000 } + +D_KA_6011044: + { type: SF64:OBJECT_INIT, offset: 0x6011044, symbol: D_KA_6011044 } + +D_KA_6011058: + { type: SF64:HITBOX, offset: 0x6011058, symbol: D_KA_6011058 } + +D_KA_601115C: + { type: SF64:HITBOX, offset: 0x601115C, symbol: D_KA_601115C } + +D_KA_60111D8: + { type: SF64:HITBOX, offset: 0x60111D8, symbol: D_KA_60111D8 } \ No newline at end of file diff --git a/assets/yaml/us/rev1/ast_landmaster.yaml b/assets/yaml/us/rev1/ast_landmaster.yaml new file mode 100644 index 00000000..ff5ebaa7 --- /dev/null +++ b/assets/yaml/us/rev1/ast_landmaster.yaml @@ -0,0 +1,78 @@ +:config: + segments: + - [0x3, 0x8D99F0] + header: + code: + - '#include "assets/ast_landmaster.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + +D_landmaster_3000000: + { type: TEXTURE, format: CI4, offset: 0x3000000, width: 16, height: 16, ctype: u8, tlut: 0x3000080, symbol: D_landmaster_3000000 } + +D_landmaster_3000080: + { type: TEXTURE, format: TLUT, offset: 0x3000080, colors: 8, ctype: u16, symbol: D_landmaster_3000080 } + +D_landmaster_3000090: + { type: GFX, offset: 0x3000090, symbol: D_landmaster_3000090 } + +D_landmaster_3004CA8: + { type: TEXTURE, format: RGBA16, offset: 0x3004CA8, width: 32, height: 32, ctype: u16, symbol: D_landmaster_3004CA8 } + +D_landmaster_30054A8: + { type: TEXTURE, format: RGBA16, offset: 0x30054A8, width: 32, height: 32, ctype: u16, symbol: D_landmaster_30054A8 } + +D_landmaster_3005CA8: + { type: TEXTURE, format: RGBA16, offset: 0x3005CA8, width: 16, height: 16, ctype: u16, symbol: D_landmaster_3005CA8 } + +D_landmaster_3005EA8: + { type: TEXTURE, format: RGBA16, offset: 0x3005EA8, width: 32, height: 32, ctype: u16, symbol: D_landmaster_3005EA8 } + +D_landmaster_3002680: + { type: TEXTURE, format: RGBA16, offset: 0x3002680, width: 32, height: 32, ctype: u16, symbol: D_landmaster_3002680 } + +D_landmaster_3002E80: + { type: TEXTURE, format: RGBA16, offset: 0x3002E80, width: 32, height: 32, ctype: u16, symbol: D_landmaster_3002E80 } + +D_landmaster_3003680: + { type: TEXTURE, format: RGBA16, offset: 0x3003680, width: 64, height: 32, ctype: u16, symbol: D_landmaster_3003680 } + +D_landmaster_3001680: + { type: TEXTURE, format: RGBA16, offset: 0x3001680, width: 32, height: 32, ctype: u16, symbol: D_landmaster_3001680 } + +D_landmaster_3001E80: + { type: TEXTURE, format: RGBA16, offset: 0x3001E80, width: 32, height: 32, ctype: u16, symbol: D_landmaster_3001E80 } + +D_landmaster_3004680: + { type: GFX, offset: 0x3004680, symbol: D_landmaster_3004680 } + +D_landmaster_30066B0: + { type: GFX, offset: 0x30066B0, symbol: D_landmaster_30066B0 } + +D_landmaster_3006738: + { type: TEXTURE, format: IA8, offset: 0x3006738, width: 16, height: 32, ctype: u8, symbol: D_landmaster_3006738 } + +D_landmaster_3006940: + { type: GFX, offset: 0x3006940, symbol: D_landmaster_3006940 } + +D_landmaster_30069D8: + { type: TEXTURE, format: IA8, offset: 0x030069D8, width: 32, height: 32, ctype: u8, symbol: D_landmaster_30069D8 } + +D_landmaster_3006DE0: + { type: GFX, offset: 0x3006DE0, symbol: D_landmaster_3006DE0 } + +D_landmaster_3006E68: + { type: TEXTURE, format: RGBA32, offset: 0x3006E68, width: 32, height: 32, ctype: u32, symbol: D_landmaster_3006E68 } + +D_landmaster_3007E70: + { type: GFX, offset: 0x3007E70, symbol: D_landmaster_3007E70 } + +D_landmaster_3007EF8: + { type: TEXTURE, format: RGBA16, offset: 0x3007EF8, width: 16, height: 16, ctype: u16, symbol: D_landmaster_3007EF8 } + +D_landmaster_3008100: + { type: GFX, offset: 0x3008100, symbol: D_landmaster_3008100 } + +D_landmaster_3008188: + { type: TEXTURE, format: IA8, offset: 0x03008188, width: 32, height: 32, ctype: u8, symbol: D_landmaster_3008188 } diff --git a/assets/yaml/us/rev1/ast_logo.yml b/assets/yaml/us/rev1/ast_logo.yml new file mode 100644 index 00000000..7cfee369 --- /dev/null +++ b/assets/yaml/us/rev1/ast_logo.yml @@ -0,0 +1,18 @@ +:config: + segments: + - [0x0F, 0xD25100] + header: + code: + - '#include "assets/ast_logo.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + +nintendo_logo: + type: TEXTURE + offset: 0xF000000 + format: IA8 + width: 128 + height: 74 + ctype: u8 + symbol: gNintendoLogo \ No newline at end of file diff --git a/assets/yaml/us/rev1/ast_macbeth.yaml b/assets/yaml/us/rev1/ast_macbeth.yaml new file mode 100644 index 00000000..20650095 --- /dev/null +++ b/assets/yaml/us/rev1/ast_macbeth.yaml @@ -0,0 +1,938 @@ +:config: + segments: + - [0x06, 0xBC23D0] + header: + code: + - '#include "assets/ast_macbeth.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + - '#include "sf64level.h"' + - '#include "sf64event.h"' + - '#include "sf64player.h"' + - '#include "sf64audio_external.h"' + - '#include "sf64mesg.h"' + +D_MA_6000000: + {type: TEXTURE, format: IA8, ctype: u8, width: 160, height: 28, offset: 0x6000000, symbol: D_MA_6000000} + +D_MA_6001180: + {type: GFX, offset: 0x6001180, symbol: D_MA_6001180} + +D_MA_60012A0: + { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x60012A0, symbol: D_MA_60012A0, tlut: 0x60013A0} + +D_MA_60013A0: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 128, offset: 0x60013A0, symbol: D_MA_60013A0} + +D_MA_60014A0: + {type: GFX, offset: 0x60014A0, symbol: D_MA_60014A0} + +D_MA_6001578: + { type: TEXTURE, format: CI8, ctype: u8, width: 32, height: 32, offset: 0x6001578, symbol: D_MA_6001578, tlut: 0x6001978} + +D_MA_6001978: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 112, offset: 0x6001978, symbol: D_MA_6001978} + +D_MA_6001A60: + {type: GFX, offset: 0x6001A60, symbol: D_MA_6001A60} + +D_MA_6001B38: + { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x6001B38, symbol: D_MA_6001B38, tlut: 0x6001C38} + +D_MA_6001C38: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 32, offset: 0x6001C38, symbol: D_MA_6001C38} + +D_MA_6001C78: + { type: TEXTURE, format: CI8, ctype: u8, width: 32, height: 32, offset: 0x6001C78, symbol: D_MA_6001C78, tlut: 0x6002078} + +D_MA_6002078: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 80, offset: 0x6002078, symbol: D_MA_6002078} + +D_MA_6002118: + { type: TEXTURE, format: CI8, ctype: u8, width: 32, height: 32, offset: 0x6002118, symbol: D_MA_6002118, tlut: 0x6002518} + +D_MA_6002518: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 240, offset: 0x6002518, symbol: D_MA_6002518} + +D_MA_60026F8: + { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x60026F8, symbol: D_MA_60026F8, tlut: 0x60027F8} + +D_MA_60027F8: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 72, offset: 0x60027F8, symbol: D_MA_60027F8} + +D_MA_6002890: + {type: GFX, offset: 0x6002890, symbol: D_MA_6002890} + +D_MA_6002C20: + { type: TEXTURE, format: CI8, ctype: u8, width: 32, height: 16, offset: 0x6002C20, symbol: D_MA_6002C20, tlut: 0x6002E20} + +D_MA_6002E20: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 32, offset: 0x6002E20, symbol: D_MA_6002E20} + +D_MA_6002E60: + { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x6002E60, symbol: D_MA_6002E60, tlut: 0x6002F60} + +D_MA_6002F60: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 72, offset: 0x6002F60, symbol: D_MA_6002F60} + +D_MA_6002FF0: + { type: TEXTURE, format: CI8, ctype: u8, width: 8, height: 8, offset: 0x6002FF0, symbol: D_MA_6002FF0, tlut: 0x6003030} + +D_MA_6003030: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 32, offset: 0x6003030, symbol: D_MA_6003030} + +D_MA_6003070: + {type: GFX, offset: 0x6003070, symbol: D_MA_6003070} + +D_MA_6003138: + { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x6003138, symbol: D_MA_6003138, tlut: 0x6003238} + +D_MA_6003238: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 152, offset: 0x6003238, symbol: D_MA_6003238} + +D_MA_6003370: + {type: GFX, offset: 0x6003370, symbol: D_MA_6003370} + +D_MA_6003B58: + { type: TEXTURE, format: CI8, ctype: u8, width: 32, height: 32, offset: 0x6003B58, symbol: D_MA_6003B58, tlut: 0x6003F58} + +D_MA_6003F58: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 56, offset: 0x6003F58, symbol: D_MA_6003F58} + +D_MA_6003FC8: + { type: TEXTURE, format: CI8, ctype: u8, width: 32, height: 32, offset: 0x6003FC8, symbol: D_MA_6003FC8, tlut: 0x60043C8} + +D_MA_60043C8: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 56, offset: 0x60043C8, symbol: D_MA_60043C8} + +D_MA_6004440: + {type: GFX, offset: 0x6004440, symbol: D_MA_6004440} + +D_MA_6004640: + { type: TEXTURE, format: CI8, ctype: u8, width: 32, height: 32, offset: 0x6004640, symbol: D_MA_6004640, tlut: 0x6004A40} + +D_MA_6004A40: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 256, offset: 0x6004A40, symbol: D_MA_6004A40} + +D_MA_60050F8: + { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x60050F8, symbol: D_MA_60050F8, tlut: 0x60051F8} + +D_MA_60051F8: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 32, offset: 0x60051F8, symbol: D_MA_60051F8} + +D_MA_6005238: + { type: TEXTURE, format: CI8, ctype: u8, width: 32, height: 32, offset: 0x6005238, symbol: D_MA_6005238, tlut: 0x6005638} + +D_MA_6005638: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 248, offset: 0x6005638, symbol: D_MA_6005638} + +D_MA_6005828: + { type: TEXTURE, format: RGBA16, ctype: u16, width: 32, height: 32, offset: 0x6005828, symbol: D_MA_6005828} + +D_MA_6006030: + {type: GFX, offset: 0x6006030, symbol: D_MA_6006030} + +D_MA_60066A0: + {type: GFX, offset: 0x60066A0, symbol: D_MA_60066A0} + +D_MA_60069A8: + { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x60069A8, symbol: D_MA_60069A8, tlut: 0x6006AA8} + +D_MA_6006AA8: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 160, offset: 0x6006AA8, symbol: D_MA_6006AA8} + +D_MA_6006BE8: + { type: TEXTURE, format: CI8, ctype: u8, width: 32, height: 32, offset: 0x6006BE8, symbol: D_MA_6006BE8, tlut: 0x6006FE8} + +D_MA_6006FE8: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 232, offset: 0x6006FE8, symbol: D_MA_6006FE8} + +D_MA_60071C0: + {type: GFX, offset: 0x60071C0, symbol: D_MA_60071C0} + +D_MA_6007290: + {type: GFX, offset: 0x6007290, symbol: D_MA_6007290} + +D_MA_6007360: + {type: GFX, offset: 0x6007360, symbol: D_MA_6007360} + +D_MA_6007430: + {type: GFX, offset: 0x6007430, symbol: D_MA_6007430} + +D_MA_6007500: + {type: GFX, offset: 0x6007500, symbol: D_MA_6007500} + +D_MA_60075D0: + {type: GFX, offset: 0x60075D0, symbol: D_MA_60075D0} + +D_MA_60092E0: + { type: TEXTURE, format: RGBA16, ctype: u16, width: 32, height: 32, offset: 0x60092E0, symbol: D_MA_60092E0} + +D_MA_6009AE0: + { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x6009AE0, symbol: D_MA_6009AE0, tlut: 0x6009BE0} + +D_MA_6009BE0: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 56, offset: 0x6009BE0, symbol: D_MA_6009BE0} + +D_MA_6009C50: + {type: GFX, offset: 0x6009C50, symbol: D_MA_6009C50} + +D_MA_6009D18: + { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x6009D18, symbol: D_MA_6009D18, tlut: 0x6009E18} + +D_MA_6009E18: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 120, offset: 0x6009E18, symbol: D_MA_6009E18} + +D_MA_6009F10: + {type: GFX, offset: 0x6009F10, symbol: D_MA_6009F10} + +D_MA_6009FD8: + { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x6009FD8, symbol: D_MA_6009FD8, tlut: 0x600A0D8} + +D_MA_600A0D8: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 136, offset: 0x600A0D8, symbol: D_MA_600A0D8} + +D_MA_600A1F0: + {type: GFX, offset: 0x600A1F0, symbol: D_MA_600A1F0} + +D_MA_600A2B8: + { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x600A2B8, symbol: D_MA_600A2B8, tlut: 0x600A3B8} + +D_MA_600A3B8: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 136, offset: 0x600A3B8, symbol: D_MA_600A3B8} + +D_MA_600A4D0: + {type: GFX, offset: 0x600A4D0, symbol: D_MA_600A4D0} + +D_MA_600A598: + { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x600A598, symbol: D_MA_600A598, tlut: 0x600A698} + +D_MA_600A698: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 152, offset: 0x600A698, symbol: D_MA_600A698} + +D_MA_600A7D0: + {type: GFX, offset: 0x600A7D0, symbol: D_MA_600A7D0} + +D_MA_600A898: + { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x600A898, symbol: D_MA_600A898, tlut: 0x600A998} + +D_MA_600A998: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 104, offset: 0x600A998, symbol: D_MA_600A998} + +D_MA_600AA70: + {type: GFX, offset: 0x600AA70, symbol: D_MA_600AA70} + +D_MA_600AB38: + { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x600AB38, symbol: D_MA_600AB38, tlut: 0x600AC38} + +D_MA_600AC38: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 136, offset: 0x600AC38, symbol: D_MA_600AC38} + +D_MA_600AD50: + {type: GFX, offset: 0x600AD50, symbol: D_MA_600AD50} + +D_MA_600AE18: + { type: TEXTURE, format: CI8, ctype: u8, width: 8, height: 16, offset: 0x600AE18, symbol: D_MA_600AE18, tlut: 0x600AE98} + +D_MA_600AE98: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 80, offset: 0x600AE98, symbol: D_MA_600AE98} + +D_MA_600AF40: + {type: GFX, offset: 0x600AF40, symbol: D_MA_600AF40} + +D_MA_600B2E0: + { type: TEXTURE, format: RGBA16, ctype: u16, width: 32, height: 64, offset: 0x600B2E0, symbol: D_MA_600B2E0} + +D_MA_600C2E0: + { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x600C2E0, symbol: D_MA_600C2E0, tlut: 0x600C3E0} + +D_MA_600C3E0: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 40, offset: 0x600C3E0, symbol: D_MA_600C3E0} + +D_MA_600C4D0: + {type: SF64:ANIM, offset: 0x600C4D0, symbol: D_MA_600C4D0} + +D_MA_600C65C: + {type: SF64:SKELETON, offset: 0x600C65C, symbol: D_MA_600C65C} + +D_MA_600CD18: + {type: SF64:ANIM, offset: 0x600CD18, symbol: D_MA_600CD18} + +D_MA_600D1E4: + {type: SF64:SKELETON, offset: 0x600D1E4, symbol: D_MA_600D1E4} + +D_MA_600D280: + { type: TEXTURE, format: IA16, ctype: u16, width: 16, height: 16, offset: 0x600D280, symbol: D_MA_600D280} + +D_MA_600D480: + {type: GFX, offset: 0x600D480, symbol: D_MA_600D480} + +D_MA_600D878: + { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x600D878, symbol: D_MA_600D878, tlut: 0x600D978} + +D_MA_600D978: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 72, offset: 0x600D978, symbol: D_MA_600D978} + +D_MA_600DA10: + {type: GFX, offset: 0x600DA10, symbol: D_MA_600DA10} + +D_MA_600DF60: + { type: TEXTURE, format: CI8, ctype: u8, width: 32, height: 32, offset: 0x600DF60, symbol: D_MA_600DF60, tlut: 0x600E360} + +D_MA_600E360: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 128, offset: 0x600E360, symbol: D_MA_600E360} + +D_MA_600E460: + { type: TEXTURE, format: RGBA16, ctype: u16, width: 4, height: 4, offset: 0x600E460, symbol: D_MA_600E460} + +D_MA_600E480: + { type: TEXTURE, format: CI8, ctype: u8, width: 32, height: 32, offset: 0x600E480, symbol: D_MA_600E480, tlut: 0x600E880} + +D_MA_600E880: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 232, offset: 0x600E880, symbol: D_MA_600E880} + +D_MA_600EE38: + { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x600EE38, symbol: D_MA_600EE38, tlut: 0x600EF38} + +D_MA_600EF38: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 48, offset: 0x600EF38, symbol: D_MA_600EF38} + +D_MA_600EF98: + { type: TEXTURE, format: CI4, ctype: u8, width: 16, height: 16, offset: 0x600EF98, symbol: D_MA_600EF98, tlut: 0x600F018} + +D_MA_600F018: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 8, offset: 0x600F018, symbol: D_MA_600F018} + +D_MA_600F028: + { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x600F028, symbol: D_MA_600F028, tlut: 0x600F128} + +D_MA_600F128: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 24, offset: 0x600F128, symbol: D_MA_600F128} + +D_MA_600F160: + {type: GFX, offset: 0x600F160, symbol: D_MA_600F160} + +D_MA_600F2F0: + {type: GFX, offset: 0x600F2F0, symbol: D_MA_600F2F0} + +D_MA_600F3D0: + {type: GFX, offset: 0x600F3D0, symbol: D_MA_600F3D0} + +D_MA_600F6C0: + {type: GFX, offset: 0x600F6C0, symbol: D_MA_600F6C0} + +D_MA_600F9B0: + {type: GFX, offset: 0x600F9B0, symbol: D_MA_600F9B0} + +D_MA_600FEC4: + {type: SF64:ANIM, offset: 0x600FEC4, symbol: D_MA_600FEC4} + +D_MA_6010144: + {type: SF64:ANIM, offset: 0x6010144, symbol: D_MA_6010144} + +D_MA_6010220: + {type: SF64:ANIM, offset: 0x6010220, symbol: D_MA_6010220} + +D_MA_601042C: + {type: SF64:SKELETON, offset: 0x601042C, symbol: D_MA_601042C} + +D_MA_6010470: + {type: GFX, offset: 0x6010470, symbol: D_MA_6010470} + +D_MA_6010700: + {type: GFX, offset: 0x6010700, symbol: D_MA_6010700} + +D_MA_6010C20: + { type: TEXTURE, format: RGBA16, ctype: u16, width: 44, height: 44, offset: 0x6010C20, symbol: D_MA_6010C20} + +D_MA_6011B40: + { type: TEXTURE, format: RGBA16, ctype: u16, width: 44, height: 44, offset: 0x6011B40, symbol: D_MA_6011B40} + +D_MA_6012A60: + {type: GFX, offset: 0x6012A60, symbol: D_MA_6012A60} + +D_MA_6012BC0: + { type: TEXTURE, format: IA8, ctype: u8, width: 8, height: 8, offset: 0x6012BC0, symbol: D_MA_6012BC0} + +D_MA_6012C00: + {type: GFX, offset: 0x6012C00, symbol: D_MA_6012C00} + +D_MA_6012C98: + { type: TEXTURE, format: RGBA16, ctype: u16, width: 4, height: 8, offset: 0x6012C98, symbol: D_MA_6012C98} + +D_MA_6012F50: + {type: GFX, offset: 0x6012F50, symbol: D_MA_6012F50} + +D_MA_6012FE0: + { type: TEXTURE, format: IA8, ctype: u8, width: 16, height: 8, offset: 0x6012FE0, symbol: D_MA_6012FE0} + +D_MA_6013060: + {type: GFX, offset: 0x6013060, symbol: D_MA_6013060} + +D_MA_6013158: + { type: TEXTURE, format: IA16, ctype: u16, width: 32, height: 32, offset: 0x6013158, symbol: D_MA_6013158} + +D_MA_6013960: + {type: GFX, offset: 0x6013960, symbol: D_MA_6013960} + +D_MA_6013F58: + { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x6013F58, symbol: D_MA_6013F58, tlut: 0x6014058} + +D_MA_6014058: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 88, offset: 0x6014058, symbol: D_MA_6014058} + +D_MA_6014458: + { type: TEXTURE, format: RGBA16, ctype: u16, width: 64, height: 32, offset: 0x6014458, symbol: D_MA_6014458} + +D_MA_6015494: + {type: SF64:ANIM, offset: 0x6015494, symbol: D_MA_6015494} + +D_MA_6015500: + {type: SF64:SKELETON, offset: 0x6015500, symbol: D_MA_6015500} + +D_MA_6015510: + {type: GFX, offset: 0x6015510, symbol: D_MA_6015510} + +D_MA_6015C24: + {type: SF64:ANIM, offset: 0x6015C24, symbol: D_MA_6015C24} + +D_MA_6016040: + {type: SF64:ANIM, offset: 0x6016040, symbol: D_MA_6016040} + +D_MA_60163F0: + {type: SF64:ANIM, offset: 0x60163F0, symbol: D_MA_60163F0} + +D_MA_6016B2C: + {type: SF64:ANIM, offset: 0x6016B2C, symbol: D_MA_6016B2C} + +D_MA_6017714: + {type: SF64:ANIM, offset: 0x6017714, symbol: D_MA_6017714} + +D_MA_6017720: + {type: GFX, offset: 0x6017720, symbol: D_MA_6017720} + +D_MA_6017EB8: + { type: TEXTURE, format: RGBA16, ctype: u16, width: 32, height: 32, offset: 0x6017EB8, symbol: D_MA_6017EB8} + +D_MA_60186B8: + { type: TEXTURE, format: CI8, ctype: u8, width: 32, height: 32, offset: 0x60186B8, symbol: D_MA_60186B8, tlut: 0x6018AB8} + +D_MA_6018AB8: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 232, offset: 0x6018AB8, symbol: D_MA_6018AB8} + +D_MA_6019028: + { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x6019028, symbol: D_MA_6019028, tlut: 0x6019128} + +D_MA_6019128: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 120, offset: 0x6019128, symbol: D_MA_6019128} + +D_MA_6019220: + {type: GFX, offset: 0x6019220, symbol: D_MA_6019220} + +D_MA_60192B0: + {type: TEXTURE, format: RGBA16, ctype: u16, width: 64, height: 32, offset: 0x60192B0, symbol: D_MA_60192B0} + +D_MA_601A2B0: + {type: GFX, offset: 0x601A2B0, symbol: D_MA_601A2B0} + +D_MA_601A5E8: + { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x601A5E8, symbol: D_MA_601A5E8, tlut: 0x601A6E8} + +D_MA_601A6E8: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 88, offset: 0x601A6E8, symbol: D_MA_601A6E8} + +D_MA_601A7A0: + {type: GFX, offset: 0x601A7A0, symbol: D_MA_601A7A0} + +D_MA_601A840: + {type: GFX, offset: 0x601A840, symbol: D_MA_601A840} + +D_MA_601A8C8: + { type: TEXTURE, format: RGBA16, ctype: u16, width: 32, height: 32, offset: 0x601A8C8, symbol: D_MA_601A8C8} + +D_MA_601B0D0: + {type: GFX, offset: 0x601B0D0, symbol: D_MA_601B0D0} + +D_MA_601B7C0: + {type: GFX, offset: 0x601B7C0, symbol: D_MA_601B7C0} + +D_MA_601BB78: + { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x601BB78, symbol: D_MA_601BB78, tlut: 0x601BC78} + +D_MA_601BC78: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 72, offset: 0x601BC78, symbol: D_MA_601BC78} + +D_MA_601BD08: + { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x601BD08, symbol: D_MA_601BD08, tlut: 0x601BE08} + +D_MA_601BE08: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 64, offset: 0x601BE08, symbol: D_MA_601BE08} + +D_MA_601BE90: + {type: GFX, offset: 0x601BE90, symbol: D_MA_601BE90} + +D_MA_601C000: + {type: GFX, offset: 0x601C000, symbol: D_MA_601C000} + +D_MA_601C170: + {type: GFX, offset: 0x601C170, symbol: D_MA_601C170} + +D_MA_601C520: + {type: GFX, offset: 0x601C520, symbol: D_MA_601C520} + +D_MA_601D188: + {type: SF64:ANIM, offset: 0x601D188, symbol: D_MA_601D188} + +D_MA_601EA28: + {type: SF64:ANIM, offset: 0x601EA28, symbol: D_MA_601EA28} + +D_MA_601EAB0: + {type: SF64:ANIM, offset: 0x601EAB0, symbol: D_MA_601EAB0} + +D_MA_601EBBC: + {type: SF64:SKELETON, offset: 0x601EBBC, symbol: D_MA_601EBBC} + +D_MA_601F1D0: + {type: GFX, offset: 0x601F1D0, symbol: D_MA_601F1D0} + +D_MA_601F270: + {type: GFX, offset: 0x601F270, symbol: D_MA_601F270} + +D_MA_6020A30: + {type: GFX, offset: 0x6020A30, symbol: D_MA_6020A30} + +D_MA_60200E0: + {type: GFX, offset: 0x60200E0, symbol: D_MA_60200E0} + +D_MA_6020E600: + {type: GFX, offset: 0x6020E60, symbol: D_MA_6020E60} + +D_MA_6022200: + {type: GFX, offset: 0x6022200, symbol: D_MA_6022200} + +D_MA_60223C0: + {type: GFX, offset: 0x60223C0, symbol: D_MA_60223C0} + +D_MA_6022450: + { type: GFX, offset: 0x6022450, symbol: D_MA_6022450} + +D_MA_6022530: + {type: GFX, offset: 0x6022530, symbol: D_MA_6022530} + +D_MA_6022610: + {type: GFX, offset: 0x6022610, symbol: D_MA_6022610} + +D_MA_60227F0: + {type: GFX, offset: 0x60227F0, symbol: D_MA_60227F0} + +D_MA_6022B68: + { type: TEXTURE, format: CI8, ctype: u8, width: 32, height: 32, offset: 0x6022B68, symbol: D_MA_6022B68, tlut: 0x6022F68} + +D_MA_6022F68: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 176, offset: 0x6022F68, symbol: D_MA_6022F68} + +D_MA_60230C8: + { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x60230C8, symbol: D_MA_60230C8, tlut: 0x60231C8} + +D_MA_60231C8: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 48, offset: 0x60231C8, symbol: D_MA_60231C8} + +D_MA_6023228: + { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x6023228, symbol: D_MA_6023228, tlut: 0x6023328} + +D_MA_6023328: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 48, offset: 0x6023328, symbol: D_MA_6023328} + +D_MA_6023388: + { type: TEXTURE, format: CI8, ctype: u8, width: 32, height: 32, offset: 0x6023388, symbol: D_MA_6023388, tlut: 0x6023788} + +D_MA_6023788: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 176, offset: 0x6023788, symbol: D_MA_6023788} + +D_MA_60238F0: + {type: GFX, offset: 0x60238F0, symbol: D_MA_60238F0} + +D_MA_60239D0: + {type: GFX, offset: 0x60239D0, symbol: D_MA_60239D0} + +D_MA_6024010: + {type: GFX, offset: 0x6024010, symbol: D_MA_6024010} + +D_MA_6024230: + { type: TEXTURE, format: CI8, ctype: u8, width: 32, height: 32, offset: 0x6024230, symbol: D_MA_6024230, tlut: 0x6024630} + +D_MA_6024630: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 32, offset: 0x6024630, symbol: D_MA_6024630} + +D_MA_6024670: + {type: GFX, offset: 0x6024670, symbol: D_MA_6024670} + +D_MA_60251A0: + {type: GFX, offset: 0x60251A0, symbol: D_MA_60251A0} + +D_MA_60253E0: + {type: GFX, offset: 0x60253E0, symbol: D_MA_60253E0} + +D_MA_60257B0: + {type: GFX, offset: 0x60257B0, symbol: D_MA_60257B0} + +D_MA_6025850: + {type: GFX, offset: 0x6025850, symbol: D_MA_6025850} + +D_MA_6025A70: + {type: GFX, offset: 0x6025A70, symbol: D_MA_6025A70} + +D_MA_6025B50: + { type: GFX, offset: 0x6025B50, symbol: D_MA_6025B50} + +D_MA_6025CA0: + {type: SF64:ANIM, offset: 0x6025CA0, symbol: D_MA_6025CA0} + +D_MA_6025DAC: + {type: SF64:SKELETON, offset: 0x6025DAC, symbol: D_MA_6025DAC} + +D_MA_6026860: + {type: GFX, offset: 0x6026860, symbol: D_MA_6026860} + +D_MA_60269E0: + {type: GFX, offset: 0x60269E0, symbol: D_MA_60269E0} + +D_MA_6026C00: + { type: TEXTURE, format: CI8, ctype: u8, width: 32, height: 32, offset: 0x6026C00, symbol: D_MA_6026C00, tlut: 0x6027000} + +D_MA_6027000: + { type: TEXTURE, format: TLUT, ctype: u16, colors: 112, offset: 0x6027000, symbol: D_MA_6027000} + +D_MA_60270E0: + {type: GFX, offset: 0x60270E0, symbol: D_MA_60270E0} + +D_MA_6027180: + { type: GFX, offset: 0x6027180, symbol: D_MA_6027180} + +D_MA_6027320: + {type: SF64:ANIM, offset: 0x6027320, symbol: D_MA_6027320} + +D_MA_602742C: + {type: SF64:SKELETON, offset: 0x602742C, symbol: D_MA_602742C} + +D_MA_6027900: + {type: GFX, offset: 0x6027900, symbol: D_MA_6027900} + +D_MA_6027A04: + {type: SF64:ANIM, offset: 0x6027A04, symbol: D_MA_6027A04} + +D_MA_6027AF0: + {type: SF64:SKELETON, offset: 0x6027AF0, symbol: D_MA_6027AF0} + +D_MA_6027BF0: + {type: GFX, offset: 0x6027BF0, symbol: D_MA_6027BF0} + +D_MA_6027D40: + {type: GFX, offset: 0x6027D40, symbol: D_MA_6027D40} + +D_MA_6027EB0: + {type: GFX, offset: 0x6027EB0, symbol: D_MA_6027EB0} + +D_MA_60288A0: + {type: GFX, offset: 0x60288A0, symbol: D_MA_60288A0} + +D_MA_6029890: + {type: GFX, offset: 0x6029890, symbol: D_MA_6029890} + +D_MA_VTX_602A0D0: + {type: VTX, count: 395, offset: 0x602A0D0, symbol: D_MA_VTX_602A0D0} + +D_MA_602B980: + {type: TEXTURE, format: RGBA16, ctype: u16, width: 16, height: 16, offset: 0x602B980, symbol: D_MA_602B980} + +D_MA_602BB80: + {type: TEXTURE, format: RGBA16, ctype: u16, width: 32, height: 32, offset: 0x602BB80, symbol: D_MA_602BB80} + +D_MA_602C380: + {type: TEXTURE, format: RGBA16, ctype: u16, width: 32, height: 32, offset: 0x602C380, symbol: D_MA_602C380} + +D_MA_602CB80: + {type: TEXTURE, format: RGBA16, ctype: u16, width: 32, height: 32, offset: 0x602CB80, symbol: D_MA_602CB80} + +D_MA_602D380: + {type: GFX, offset: 0x602D380, symbol: D_MA_602D380} + +D_MA_602DAE0: + {type: GFX, offset: 0x602DAE0, symbol: D_MA_602DAE0} + +D_MA_602DB80: + {type: GFX, offset: 0x602DB80, symbol: D_MA_602DB80} + +D_MA_602DC20: + {type: GFX, offset: 0x602DC20, symbol: D_MA_602DC20} + +D_MA_602DCB8: + {type: TEXTURE, format: RGBA16, ctype: u16, width: 32, height: 32, offset: 0x602DCB8, symbol: D_MA_602DCB8} + +D_MA_602EA0C: + {type: SF64:ANIM, offset: 0x602EA0C, symbol: D_MA_602EA0C} + +D_MA_602EBB8: + {type: SF64:SKELETON, offset: 0x602EBB8, symbol: D_MA_602EBB8} + +D_MA_602F098: + {type: SF64:ANIM, offset: 0x602F098, symbol: D_MA_602F098} + +D_MA_602F264: + {type: SF64:SKELETON, offset: 0x602F264, symbol: D_MA_602F264} + +D_MA_602F2E0: + {type: SF64:ANIM, offset: 0x602F2E0, symbol: D_MA_602F2E0} + +D_MA_602F36C: + {type: SF64:SKELETON, offset: 0x602F36C, symbol: D_MA_602F36C} + +D_MA_602F380: + {type: GFX, offset: 0x602F380, symbol: D_MA_602F380} + +D_MA_602FBF0: + {type: GFX, offset: 0x602FBF0, symbol: D_MA_602FBF0} + +D_MA_602FEB4: + {type: SF64:ANIM, offset: 0x602FEB4, symbol: D_MA_602FEB4} + +D_MA_602FFA0: + {type: SF64:SKELETON, offset: 0x602FFA0, symbol: D_MA_602FFA0} + +D_MA_602FFC0: + {type: GFX, offset: 0x602FFC0, symbol: D_MA_602FFC0} + +D_MA_6030500: + {type: GFX, offset: 0x6030500, symbol: D_MA_6030500} + +D_MA_6030630: + {type: GFX, offset: 0x6030630, symbol: D_MA_6030630} + +D_MA_60306D0: + {type: GFX, offset: 0x60306D0, symbol: D_MA_60306D0} + +D_MA_6030750: + {type: GFX, offset: 0x6030750, symbol: D_MA_6030750} + +D_MA_60309D0: + {type: GFX, offset: 0x60309D0, symbol: D_MA_60309D0} + +D_MA_6030C50: + {type: GFX, offset: 0x6030C50, symbol: D_MA_6030C50} + +D_MA_6030E30: + {type: SF64:ENVIRONMENT, offset: 0x6030E30, symbol: D_MA_6030E30} + +D_MA_6030E74: + {type: SF64:TRIANGLE, count: 2, offset: 0x6030E74, symbol: D_MA_6030E74, mesh_symbol: D_MA_OFFSET} + +D_MA_6030EB0: + {type: SF64:TRIANGLE, count: 2, offset: 0x6030EB0, symbol: D_MA_6030EB0, mesh_symbol: D_MA_OFFSET} + +D_MA_6030EEC: + {type: SF64:TRIANGLE, count: 2, offset: 0x6030EEC, symbol: D_MA_6030EEC, mesh_symbol: D_MA_OFFSET} + +D_MA_6030F28: + {type: SF64:TRIANGLE, count: 2, offset: 0x6030F28, symbol: D_MA_6030F28, mesh_symbol: D_MA_OFFSET} + +D_MA_6030F64: + {type: SF64:TRIANGLE, count: 4, offset: 0x6030F64, symbol: D_MA_6030F64, mesh_symbol: D_MA_OFFSET} + +D_MA_6030FC4: + {type: SF64:TRIANGLE, count: 2, offset: 0x6030FC4, symbol: D_MA_6030FC4, mesh_symbol: D_MA_OFFSET} + +D_MA_6031000: + {type: SF64:OBJECT_INIT, offset: 0x6031000, symbol: D_MA_6031000} + +D_MA_6035678: + {type: SF64:OBJECT_INIT, offset: 0x6035678, symbol: D_MA_6035678} + +D_MA_60357CC: + {type: SF64:OBJECT_INIT, offset: 0x60357CC, symbol: D_MA_60357CC} + +D_MA_6035920: + {type: SF64:OBJECT_INIT, offset: 0x6035920, symbol: D_MA_6035920} + +D_MA_60359AC: + {type: SF64:HITBOX, offset: 0x60359AC, symbol: D_MA_60359AC} + +D_MA_60359C8: + {type: SF64:HITBOX, offset: 0x60359C8, symbol: D_MA_60359C8} + +D_MA_6035A14: + {type: SF64:HITBOX, offset: 0x6035A14, symbol: D_MA_6035A14} + +D_MA_6035A48: + {type: SF64:HITBOX, offset: 0x6035A48, symbol: D_MA_6035A48} + +D_MA_6035A94: + {type: SF64:HITBOX, offset: 0x6035A94, symbol: D_MA_6035A94} + +D_MA_6035AE0: + {type: SF64:HITBOX, offset: 0x6035AE0, symbol: D_MA_6035AE0} + +D_MA_6035B44: + {type: SF64:HITBOX, offset: 0x6035B44, symbol: D_MA_6035B44} + +D_MA_6035BA8: + {type: SF64:HITBOX, offset: 0x6035BA8, symbol: D_MA_6035BA8} + +D_MA_6035C0C: + {type: SF64:HITBOX, offset: 0x6035C0C, symbol: D_MA_6035C0C} + +D_MA_6035C70: + {type: SF64:HITBOX, offset: 0x6035C70, symbol: D_MA_6035C70} + +D_MA_6035CD4: + {type: SF64:HITBOX, offset: 0x6035CD4, symbol: D_MA_6035CD4} + +D_MA_6035D38: + {type: SF64:HITBOX, offset: 0x6035D38, symbol: D_MA_6035D38} + +D_MA_6035D9C: + {type: SF64:HITBOX, offset: 0x6035D9C, symbol: D_MA_6035D9C} + +D_MA_6035DD0: + {type: SF64:HITBOX, offset: 0x6035DD0, symbol: D_MA_6035DD0} + +D_MA_6035E04: + {type: SF64:HITBOX, offset: 0x6035E04, symbol: D_MA_6035E04} + +D_MA_6035E68: + {type: SF64:HITBOX, offset: 0x6035E68, symbol: D_MA_6035E68} + +D_MA_6035ECC: + {type: SF64:HITBOX, offset: 0x6035ECC, symbol: D_MA_6035ECC} + +D_MA_6035F30: + {type: SF64:HITBOX, offset: 0x6035F30, symbol: D_MA_6035F30} + +D_MA_6035F94: + {type: SF64:HITBOX, offset: 0x6035F94, symbol: D_MA_6035F94} + +D_MA_6035FF8: + {type: SF64:HITBOX, offset: 0x6035FF8, symbol: D_MA_6035FF8} + +D_MA_603605C: + {type: SF64:HITBOX, offset: 0x603605C, symbol: D_MA_603605C} + +D_MA_60360C0: + {type: SF64:HITBOX, offset: 0x60360C0, symbol: D_MA_60360C0} + +D_MA_6036154: + {type: SF64:HITBOX, offset: 0x6036154, symbol: D_MA_6036154} + +D_MA_6036188: + {type: SF64:HITBOX, offset: 0x6036188, symbol: D_MA_6036188} + +D_MA_6036204: + {type: SF64:HITBOX, offset: 0x6036204, symbol: D_MA_6036204} + +D_MA_6036250: + {type: SF64:HITBOX, offset: 0x6036250, symbol: D_MA_6036250} + +D_MA_603626C: + {type: SF64:HITBOX, offset: 0x603626C, symbol: D_MA_603626C} + +D_MA_6036288: + {type: SF64:HITBOX, offset: 0x6036288, symbol: D_MA_6036288} + +D_MA_60362A4: + {type: SF64:HITBOX, offset: 0x60362A4, symbol: D_MA_60362A4} + +D_MA_60362D8: + {type: SF64:HITBOX, offset: 0x60362D8, symbol: D_MA_60362D8} + +D_MA_60362F4: + {type: SF64:HITBOX, offset: 0x60362F4, symbol: D_MA_60362F4} + +D_MA_6036328: + {type: SF64:HITBOX, offset: 0x6036328, symbol: D_MA_6036328} + +D_MA_6036344: + {type: SF64:HITBOX, offset: 0x6036344, symbol: D_MA_6036344} + +D_MA_6036370: + {type: SF64:HITBOX, offset: 0x6036370, symbol: D_MA_6036370} + +D_MA_603638C: + {type: SF64:HITBOX, offset: 0x603638C, symbol: D_MA_603638C} + +D_MA_60363B8: + {type: SF64:HITBOX, offset: 0x60363B8, symbol: D_MA_60363B8} + +D_MA_60363E4: + {type: SF64:HITBOX, offset: 0x60363E4, symbol: D_MA_60363E4} + +D_MA_6036410: + {type: SF64:HITBOX, offset: 0x6036410, symbol: D_MA_6036410} + +D_MA_603643C: + {type: SF64:HITBOX, offset: 0x603643C, symbol: D_MA_603643C} + +D_MA_6036458: + {type: SF64:HITBOX, offset: 0x6036458, symbol: D_MA_6036458} + +D_MA_603648C: + {type: SF64:HITBOX, offset: 0x603648C, symbol: D_MA_603648C} + +D_MA_60364C0: + {type: SF64:HITBOX, offset: 0x60364C0, symbol: D_MA_60364C0} + +D_MA_60364DC: + {type: SF64:HITBOX, offset: 0x60364DC, symbol: D_MA_60364DC} + +D_MA_6036520: + {type: SF64:HITBOX, offset: 0x6036520, symbol: D_MA_6036520} + +D_MA_6036594: + {type: SF64:HITBOX, offset: 0x6036594, symbol: D_MA_6036594} + +D_MA_6036668: + {type: SF64:HITBOX, offset: 0x6036668, symbol: D_MA_6036668} + +D_MA_60366EC: + {type: SF64:HITBOX, offset: 0x60366EC, symbol: D_MA_60366EC} + +D_MA_6036708: + {type: SF64:HITBOX, offset: 0x6036708, symbol: D_MA_6036708} + +D_MA_6036724: + {type: SF64:HITBOX, offset: 0x6036724, symbol: D_MA_6036724} + +D_MA_6036728: + {type: SF64:HITBOX, offset: 0x6036728, symbol: D_MA_6036728} + +D_MA_6036744: + {type: SF64:HITBOX, offset: 0x6036744, symbol: D_MA_6036744} + +D_MA_6036760: + {type: SF64:HITBOX, offset: 0x6036760, symbol: D_MA_6036760} + +D_MA_603677C: + {type: SF64:HITBOX, offset: 0x603677C, symbol: D_MA_603677C} + +D_MA_6036818: + {type: SF64:HITBOX, offset: 0x6036818, symbol: D_MA_6036818} + +D_MA_6036894: + {type: SF64:HITBOX, offset: 0x6036894, symbol: D_MA_6036894} + +D_MA_60368E0: + {type: SF64:HITBOX, offset: 0x60368E0, symbol: D_MA_60368E0} + +D_MA_60368FC: + {type: SF64:HITBOX, offset: 0x60368FC, symbol: D_MA_60368FC} + +D_MA_6036930: + {type: SF64:HITBOX, offset: 0x6036930, symbol: D_MA_6036930} + +D_MA_603694C: + {type: SF64:HITBOX, offset: 0x603694C, symbol: D_MA_603694C} + +D_MA_6036968: + {type: SF64:HITBOX, offset: 0x6036968, symbol: D_MA_6036968} + +D_MA_60381D8: + {type: SF64:SCRIPT, offset: 0x60381D8, symbol: D_MA_60381D8} diff --git a/assets/yaml/us/rev1/ast_map.yaml b/assets/yaml/us/rev1/ast_map.yaml new file mode 100644 index 00000000..44747cae --- /dev/null +++ b/assets/yaml/us/rev1/ast_map.yaml @@ -0,0 +1,574 @@ +:config: + segments: + - [0x06, 0xC48F40] + header: + code: + - '#include "assets/ast_map.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + +# Restart Game (Game Over) +D_MAP_6000000: + { type: TEXTURE, format: IA8, offset: 0x6000000, width: 96, height: 22, ctype: u8, symbol: D_MAP_6000000 } + +# Proceed to Next Course +D_MAP_6000840: + { type: TEXTURE, format: IA8, offset: 0x6000840, width: 96, height: 22, ctype: u8, symbol: D_MAP_6000840 } + +# Retry Course (Lose 1 Arwing) +D_MAP_6001080: + { type: TEXTURE, format: IA8, offset: 0x6001080, width: 96, height: 22, ctype: u8, symbol: D_MAP_6001080 } + +# Change Course +D_MAP_60018C0: + { type: TEXTURE, format: IA8, offset: 0x60018C0, width: 96, height: 10, ctype: u8, symbol: D_MAP_60018C0 } + +# Aquas Ocean +D_MAP_6001C80: + { type: TEXTURE, format: IA8, offset: 0x6001C80, width: 96, height: 13, ctype: u8, symbol: D_MAP_6001C80 } + +# Terror of the Deep +D_MAP_6002160: + { type: TEXTURE, format: IA8, offset: 0x6002160, width: 208, height: 19, ctype: u8, symbol: D_MAP_6002160 } + +# Meteo +# Asteroid Field +D_MAP_60030D0: + { type: TEXTURE, format: IA8, offset: 0x60030D0, width: 96, height: 28, ctype: u8, symbol: D_MAP_60030D0 } + +# Into the Asteroid Field +D_MAP_6003B50: + { type: TEXTURE, format: IA8, offset: 0x6003B50, width: 208, height: 19, ctype: u8, symbol: D_MAP_6003B50 } + +# Bolse Defense Outpost +D_MAP_6004AC0: + { type: TEXTURE, format: IA8, offset: 0x6004AC0, width: 168, height: 19, ctype: u8, symbol: D_MAP_6004AC0 } + +# The Last Hurrah +D_MAP_6005740: + { type: TEXTURE, format: IA8, offset: 0x6005740, width: 160, height: 19, ctype: u8, symbol: D_MAP_6005740 } + +# Area 6 +# Defense Station +D_MAP_6006320: + { type: TEXTURE, format: IA8, offset: 0x6006320, width: 104, height: 28, ctype: u8, symbol: D_MAP_6006320 } + +# Through the Middle +D_MAP_6006E80: + { type: TEXTURE, format: IA8, offset: 0x6006E80, width: 176, height: 19, ctype: u8, symbol: D_MAP_6006E80 } + +# Corneria +# Former Army Base +D_MAP_6007B90: + { type: TEXTURE, format: IA8, offset: 0x6007B90, width: 128, height: 28, ctype: u8, symbol: D_MAP_6007B90 } + +# Enter Star Fox +D_MAP_6008990: + { type: TEXTURE, format: IA8, offset: 0x6008990, width: 232, height: 19, ctype: u8, symbol: D_MAP_6008990 } + +# Fortuna +# Former Defense Post +D_MAP_6009AD0: + { type: TEXTURE, format: IA8, offset: 0x6009AD0, width: 168, height: 28, ctype: u8, symbol: D_MAP_6009AD0 } + +# Enter Star Wolf +D_MAP_600AD30: + { type: TEXTURE, format: IA8, offset: 0x600AD30, width: 168, height: 19, ctype: u8, symbol: D_MAP_600AD30 } + +# Katina +# Frontline Base +D_MAP_600B9B0: + { type: TEXTURE, format: IA8, offset: 0x600B9B0, width: 168, height: 28, ctype: u8, symbol: D_MAP_600B9B0 } + +# Reunion +D_MAP_600CC10: + { type: TEXTURE, format: IA8, offset: 0x600CC10, width: 128, height: 19, ctype: u8, symbol: D_MAP_600CC10 } + +# The Lylat System +D_MAP_600D590: + { type: TEXTURE, format: IA8, offset: 0x600D590, width: 168, height: 19, ctype: u8, symbol: D_MAP_600D590 } + +# Macbeth +# Venom Army Supply Base +D_MAP_600E210: + { type: TEXTURE, format: IA8, offset: 0x600E210, width: 160, height: 28, ctype: u8, symbol: D_MAP_600E210 } + +# The Forever Train +D_MAP_600F390: + { type: TEXTURE, format: IA8, offset: 0x600F390, width: 168, height: 19, ctype: u8, symbol: D_MAP_600F390 } + +# Solar +D_MAP_6010010: + { type: TEXTURE, format: IA8, offset: 0x6010010, width: 112, height: 13, ctype: u8, symbol: D_MAP_6010010 } + +# Out of the Frying Pan. +D_MAP_60105C0: + { type: TEXTURE, format: IA8, offset: 0x60105C0, width: 224, height: 19, ctype: u8, symbol: D_MAP_60105C0 } + +# Sector X Combat Zone +D_MAP_6011660: + { type: TEXTURE, format: IA8, offset: 0x6011660, width: 176, height: 12, ctype: u8, symbol: D_MAP_6011660 } + +# Mystery of the Space Base +D_MAP_6011EA0: + { type: TEXTURE, format: IA8, offset: 0x6011EA0, width: 256, height: 19, ctype: u8, symbol: D_MAP_6011EA0 } + +# Sector Y Combat Zone +D_MAP_60131A0: + { type: TEXTURE, format: IA8, offset: 0x60131A0, width: 176, height: 12, ctype: u8, symbol: D_MAP_60131A0 } + +# Fierce Melee +D_MAP_60139E0: + { type: TEXTURE, format: IA8, offset: 0x60139E0, width: 128, height: 19, ctype: u8, symbol: D_MAP_60139E0 } + +# Sector Z Combat Zone +D_MAP_6014360: + { type: TEXTURE, format: IA8, offset: 0x6014360, width: 176, height: 12, ctype: u8, symbol: D_MAP_6014360 } + +# The Ambush of Great Fox +D_MAP_6014BA0: + { type: TEXTURE, format: IA8, offset: 0x6014BA0, width: 232, height: 19, ctype: u8, symbol: D_MAP_6014BA0 } + +# Titania +# Arid Desert +D_MAP_6015CE0: + { type: TEXTURE, format: IA8, offset: 0x6015CE0, width: 96, height: 28, ctype: u8, symbol: D_MAP_6015CE0 } + +# The Search for Slippy +D_MAP_6016760: + { type: TEXTURE, format: IA8, offset: 0x6016760, width: 200, height: 19, ctype: u8, symbol: D_MAP_6016760 } + +# Zones +# Toxic Waste Area +D_MAP_6017640: + { type: TEXTURE, format: IA8, offset: 0x6017640, width: 112, height: 28, ctype: u8, symbol: D_MAP_6017640 } + +# Invasion Aftermath +D_MAP_6018280: + { type: TEXTURE, format: IA8, offset: 0x6018280, width: 184, height: 19, ctype: u8, symbol: D_MAP_6018280 } + +D_MAP_6019030: + { type: TEXTURE, format: IA8, offset: 0x6019030, width: 8, height: 16, ctype: u8, symbol: D_MAP_6019030 } + +# Clouds ? +D_MAP_60190B0: + { type: TEXTURE, format: IA8, offset: 0x60190B0, width: 96, height: 96, ctype: u8, symbol: D_MAP_60190B0 } + +D_MAP_601B4B0: + { type: TEXTURE, format: IA8, offset: 0x601B4B0, width: 32, height: 32, ctype: u8, symbol: D_MAP_601B4B0 } + +# Some text in japanese +D_MAP_601B8B0: + { type: TEXTURE, format: IA8, offset: 0x601B8B0, width: 80, height: 26, ctype: u8, symbol: D_MAP_1B8B0 } + +D_MAP_601C0D0: + { type: GFX, offset: 0x601C0D0, symbol: D_MAP_601C0D0 } + +D_MAP_601C160: + { type: TEXTURE, format: RGBA16, offset: 0x0601C160, width: 32, height: 32, ctype: u16, symbol: D_MAP_601C160 } + +D_MAP_601C960: + { type: GFX, offset: 0x601C960, symbol: D_MAP_601C960 } + +D_MAP_601C9F0: + { type: TEXTURE, format: RGBA16, offset: 0x0601C9F0, width: 32, height: 32, ctype: u16, symbol: D_MAP_601C9F0 } + +D_MAP_601D1F0: + { type: GFX, offset: 0x601D1F0, symbol: D_MAP_601D1F0 } + +D_MAP_601D2F0: + { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x0601D2F0, symbol: D_MAP_601D2F0, tlut: 0x0601DAF0 } + +D_MAP_601DAF0: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 144, offset: 0x0601DAF0, symbol: D_MAP_601DAF0 } + +D_MAP_601DC10: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0601DC10, symbol: D_MAP_601DC10, tlut: 0x0601DC90 } + +D_MAP_601DC90: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x0601DC90, symbol: D_MAP_601DC90 } + +D_MAP_601DCA0: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 7, offset: 0x0601DCA0, symbol: D_MAP_601DCA0, tlut: 0x0601DCD8 } + +D_MAP_601DCD8: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 5, offset: 0x0601DCD8, symbol: D_MAP_601DCD8 } + +D_MAP_601DCF0: + { type: GFX, offset: 0x601DCF0, symbol: D_MAP_601DCF0 } + +D_MAP_601DDE8: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0601DDE8, symbol: D_MAP_601DDE8, tlut: 0x0601DE68 } + +D_MAP_601DE68: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 12, offset: 0x0601DE68, symbol: D_MAP_601DE68 } + +D_MAP_601DE80: + { type: GFX, offset: 0x601DE80, symbol: D_MAP_601DE80 } + +D_MAP_601F2B0: + { type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 32, offset: 0x0601F2B0, symbol: D_MAP_601F2B0, tlut: 0x0601F4B0 } + +D_MAP_601F4B0: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x0601F4B0, symbol: D_MAP_601F4B0 } + +D_MAP_601E8F8: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0601E8F8, symbol: D_MAP_601E8F8, tlut: 0x0601E978 } + +D_MAP_601E978: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x0601E978, symbol: D_MAP_601E978 } + +D_MAP_601E9A0: + { type: GFX, offset: 0x601E9A0, symbol: D_MAP_601E9A0 } + +D_MAP_601F4D0: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0601F4D0, symbol: D_MAP_601F4D0, tlut: 0x0601F550 } + +D_MAP_601F550: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x0601F550, symbol: D_MAP_601F550 } + +D_MAP_601F570: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0601F570, symbol: D_MAP_601F570, tlut: 0x0601F5F0 } + +D_MAP_601F5F0: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x0601F5F0, symbol: D_MAP_601F5F0 } + +D_MAP_601F610: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0601F610, symbol: D_MAP_601F610, tlut: 0x0601F690 } + +D_MAP_601F690: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x0601F690, symbol: D_MAP_601F690 } + +D_MAP_601F6B0: + { type: GFX, offset: 0x601F6B0, symbol: D_MAP_601F6B0 } + +D_MAP_601F740: + { type: TEXTURE, format: RGBA16, offset: 0x0601F740, width: 32, height: 32, ctype: u16, symbol: D_MAP_601F740 } + +# Looks like Aquas +D_MAP_601FF40: + { type: TEXTURE, format: CI8, offset: 0x601FF40, width: 96, height: 96, ctype: u8, symbol: D_MAP_601FF40, tlut: 0x06022340 } + +D_MAP_6022340: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 75, offset: 0x06022340, symbol: D_MAP_6022340 } + +# Looks like Venom +D_MAP_60223E0: + { type: TEXTURE, format: CI8, offset: 0x60223E0, width: 96, height: 96, ctype: u8, symbol: D_MAP_60223E0, tlut: 0x060247E0 } + +D_MAP_60247E0: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 84, offset: 0x060247E0, symbol: D_MAP_60247E0 } + +# Looks like Corneria +D_MAP_6024890: + { type: TEXTURE, format: CI8, offset: 0x6024890, width: 96, height: 96, ctype: u8, symbol: D_MAP_6024890, tlut: 0x06026C90 } + +D_MAP_6026C90: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 108, offset: 0x06026C90, symbol: D_MAP_6026C90 } + +# Looks like Zones +D_MAP_6026D70: + { type: TEXTURE, format: CI8, offset: 0x6026D70, width: 96, height: 96, ctype: u8, symbol: D_MAP_6026D70, tlut: 0x06029170 } + +D_MAP_6029170: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 84, offset: 0x06029170, symbol: D_MAP_6029170 } + +# Looks like Solar +D_MAP_6029220: + { type: TEXTURE, format: CI8, offset: 0x6029220, width: 96, height: 96, ctype: u8, symbol: D_MAP_6029220, tlut: 0x0602B620 } + +D_MAP_602B620: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 84, offset: 0x0602B620, symbol: D_MAP_602B620 } + +# Looks like Macbeth +D_MAP_602B6D0: + { type: TEXTURE, format: CI8, offset: 0x602B6D0, width: 96, height: 96, ctype: u8, symbol: D_MAP_602B6D0, tlut: 0x0602DAD0 } + +D_MAP_602DAD0: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 68, offset: 0x0602DAD0, symbol: D_MAP_602DAD0 } + +# Looks like Sector Z +D_MAP_602DB60: + { type: TEXTURE, format: CI8, offset: 0x602DB60, width: 96, height: 96, ctype: u8, symbol: D_MAP_602DB60, tlut: 0x0602FF60 } + +D_MAP_602FF60: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 56, offset: 0x0602FF60, symbol: D_MAP_602FF60 } + +D_MAP_602FFD0: + { type: TEXTURE, format: CI8, offset: 0x602FFD0, width: 96, height: 96, ctype: u8, symbol: D_MAP_602FFD0, tlut: 0x060323D0 } + +D_MAP_60323D0: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 52, offset: 0x060323D0, symbol: D_MAP_60323D0 } + +# Portrait of Falco +D_MAP_6032440: + { type: TEXTURE, format: RGBA16, offset: 0x06032440, width: 28, height: 28, ctype: u16, symbol: D_MAP_6032440 } + +# Portrait of Peppy +D_MAP_6032A60: + { type: TEXTURE, format: RGBA16, offset: 0x06032A60, width: 28, height: 28, ctype: u16, symbol: D_MAP_6032A60 } + +# Picture of Peppy, James and Pigma used in the narrated intro. +D_MAP_6033080: + { type: TEXTURE, format: RGBA16, offset: 0x06033080, width: 96, height: 52, ctype: u16, symbol: D_MAP_6033080 } + +# Picture of Andross, General Pepper and Venom in the background, used in the narrated intro. +D_MAP_6035780: + { type: TEXTURE, format: RGBA16, offset: 0x06035780, width: 96, height: 52, ctype: u16, symbol: D_MAP_6035780 } + +# Picture of Andross, hands open, Corneria in the middle, used in the narrated intro. +D_MAP_6037E80: + { type: TEXTURE, format: RGBA16, offset: 0x06037E80, width: 96, height: 52, ctype: u16, symbol: D_MAP_6037E80 } + +# Picture of an Arwing dodging attacks from enemies, used in the narrated intro. +D_MAP_603A580: + { type: TEXTURE, format: RGBA16, offset: 0x0603A580, width: 96, height: 52, ctype: u16, symbol: D_MAP_603A580 } + +# Picture of Slippy, Peppy, Fox and Falco, used in the narrated intro. +D_MAP_603CC80: + { type: TEXTURE, format: RGBA16, offset: 0x0603CC80, width: 96, height: 52, ctype: u16, symbol: D_MAP_603CC80 } + +# Picture of Peppy returning from Vemon, used in the narrated intro. +D_MAP_603F380: + { type: TEXTURE, format: RGBA16, offset: 0x0603F380, width: 96, height: 52, ctype: u16, symbol: D_MAP_603F380 } + +# Picture of Corneria, used in the narrated intro. +D_MAP_6041A80: + { type: TEXTURE, format: RGBA16, offset: 0x06041A80, width: 96, height: 52, ctype: u16, symbol: D_MAP_6041A80 } + +# Portrait of Slippy +D_MAP_6044180: + { type: TEXTURE, format: RGBA16, offset: 0x06044180, width: 28, height: 28, ctype: u16, symbol: D_MAP_6044180 } + +# White Square ? +D_MAP_60447A0: + { type: TEXTURE, format: RGBA16, offset: 0x060447A0, width: 8, height: 8, ctype: u16, symbol: D_MAP_60447A0 } + +# Picture of Fox receiving orders from General Pepper, used in the map (briefing) +D_MAP_6044820: + { type: TEXTURE, format: RGBA16, offset: 0x06044820, width: 92, height: 51, ctype: u16, symbol: D_MAP_6044820 } + +# Fox face talking during briefing. +D_MAP_6046CD0: + { type: TEXTURE, format: RGBA16, offset: 0x06046CD0, width: 32, height: 34, ctype: u16, symbol: D_MAP_6046CD0 } + +# Black Square with borders. +D_MAP_6047550: + { type: TEXTURE, format: RGBA16, offset: 0x06047550, width: 24, height: 24, ctype: u16, symbol: D_MAP_6047550 } + +D_MAP_60479D0: + { type: GFX, offset: 0x60479D0, symbol: D_MAP_60479D0 } + +D_MAP_6047A68: + { type: TEXTURE, format: IA8, offset: 0x06047A68, width: 32, height: 32, ctype: u8, symbol: D_MAP_6047A68 } + +D_MAP_6047E70: + { type: GFX, offset: 0x6047E70, symbol: D_MAP_6047E70 } + +D_MAP_6047F80: + { type: TEXTURE, format: IA8, offset: 0x06047F80, width: 64, height: 64, ctype: u8, symbol: D_MAP_6047F80 } + +D_MAP_6048F80: + { type: TEXTURE, format: IA8, offset: 0x06048F80, width: 64, height: 64, ctype: u8, symbol: D_MAP_6048F80 } + +D_MAP_6049F80: + { type: GFX, offset: 0x6049F80, symbol: D_MAP_6049F80 } + +D_MAP_604A048: + { type: TEXTURE, format: CI8, offset: 0x0604A048, width: 16, height: 16, ctype: u8, symbol: D_MAP_604A048, tlut: 0x0602FF60 } + +D_MAP_604A148: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 32, offset: 0x0604A148, symbol: D_MAP_604A148 } + +D_MAP_604A190: + { type: GFX, offset: 0x604A190, symbol: D_MAP_604A190 } + +D_MAP_604A258: + { type: TEXTURE, format: CI8, offset: 0x0604A258, width: 16, height: 16, ctype: u8, symbol: D_MAP_604A258, tlut: 0x0604A358 } + +D_MAP_604A358: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 80, offset: 0x0604A358, symbol: D_MAP_604A358 } + +D_MAP_604A400: + { type: GFX, offset: 0x604A400, symbol: D_MAP_604A400 } + +D_MAP_604A4C8: + { type: TEXTURE, format: CI8, offset: 0x0604A4C8, width: 16, height: 16, ctype: u8, symbol: D_MAP_604A4C8, tlut: 0x0604A5C8 } + +D_MAP_604A5C8: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 160, offset: 0x0604A5C8, symbol: D_MAP_604A5C8 } + +D_MAP_604A710: + { type: GFX, offset: 0x604A710, symbol: D_MAP_604A710 } + +D_MAP_604A7D8: + { type: TEXTURE, format: CI8, offset: 0x0604A7D8, width: 16, height: 16, ctype: u8, symbol: D_MAP_604A7D8, tlut: 0x0604A8D8 } + +D_MAP_604A8D8: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 136, offset: 0x0604A8D8, symbol: D_MAP_604A8D8 } + +# Arwing Model, used in the map. +D_MAP_604A9F0: + { type: GFX, offset: 0x604A9F0, symbol: D_MAP_604A9F0 } + +ast_map_seg6_vtx_4AD50: + { type: VTX, offset: 0x604AD50, count: 124, symbol: ast_map_seg6_vtx_4AD50 } + +D_MAP_604B510: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0604B510, symbol: D_MAP_604B510, tlut: 0x0604B590 } + +D_MAP_604B590: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x0604B590, symbol: D_MAP_604B590 } + +D_MAP_604B5B0: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0604B5B0, symbol: D_MAP_604B5B0, tlut: 0x0604B630 } + +D_MAP_604B630: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x0604B630, symbol: D_MAP_604B630 } + +D_MAP_604B650: + { type: TEXTURE, format: RGBA16, offset: 0x0604B650, width: 8, height: 16, ctype: u16, symbol: D_MAP_604B650 } + +# Model of Bolse +D_MAP_604B750: + { type: GFX, offset: 0x604B750, symbol: D_MAP_604B750 } + +D_MAP_604BC48: + { type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 32, offset: 0x0604BC48, symbol: D_MAP_604BC48, tlut: 0x0604BC48 } + +D_MAP_604BE48: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x0604BE48, symbol: D_MAP_604BE48 } + +D_MAP_604BE68: + { type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 32, offset: 0x0604BE68, symbol: D_MAP_604BE68, tlut: 0x0604C068 } + +D_MAP_604C068: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x0604C068, symbol: D_MAP_604C068 } + +D_MAP_604C088: + { type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 32, offset: 0x0604C088, symbol: D_MAP_604C088, tlut: 0x0604C288 } + +D_MAP_604C288: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x0604C288, symbol: D_MAP_604C288 } + +D_MAP_604C2A8: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0604C2A8, symbol: D_MAP_604C2A8, tlut: 0x0604C328 } + +D_MAP_604C328: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x0604C328, symbol: D_MAP_604C328 } + +# Television outcoming light Model, used during briefing. +D_MAP_604C350: + { type: GFX, offset: 0x604C350, symbol: D_MAP_604C350 } + +D_MAP_604C4C0: + { type: TEXTURE, format: IA8, offset: 0x0604C4C0, width: 8, height: 16, ctype: u8, symbol: D_MAP_604C4C0 } + +D_MAP_604C540: + { type: GFX, offset: 0x604C540, symbol: D_MAP_604C540 } + +D_MAP_604C5D8: + { type: TEXTURE, format: IA8, offset: 0x0604C5D8, width: 32, height: 64, ctype: u8, symbol: D_MAP_604C5D8 } + +D_MAP_604CDE0: + { type: GFX, offset: 0x604CDE0, symbol: D_MAP_604CDE0 } + +D_MAP_604CE78: + { type: TEXTURE, format: IA8, offset: 0x0604CE78, width: 32, height: 64, ctype: u8, symbol: D_MAP_604CE78 } + +D_MAP_604D680: + { type: GFX, offset: 0x604D680, symbol: D_MAP_604D680 } + +D_MAP_604D708: + { type: TEXTURE, format: IA8, offset: 0x0604D708, width: 32, height: 32, ctype: u8, symbol: D_MAP_604D708 } + +# Solar Rays +D_MAP_604DB10: + { type: GFX, offset: 0x604DB10, symbol: D_MAP_604DB10 } + +D_MAP_604DD20: + { type: TEXTURE, format: IA8, offset: 0x0604DD20, width: 128, height: 32, ctype: u8, symbol: D_MAP_604DD20 } + +D_MAP_604ED20: + { type: TEXTURE, format: IA8, offset: 0x0604ED20, width: 128, height: 32, ctype: u8, symbol: D_MAP_604ED20 } + +D_MAP_604FD20: + { type: TEXTURE, format: IA8, offset: 0x0604FD20, width: 128, height: 32, ctype: u8, symbol: D_MAP_604FD20 } + +D_MAP_6050D20: + { type: TEXTURE, format: IA8, offset: 0x06050D20, width: 128, height: 32, ctype: u8, symbol: D_MAP_6050D20 } + +D_MAP_6051D20: + { type: GFX, offset: 0x6051D20, symbol: D_MAP_6051D20 } + +D_MAP_6051F20: + { type: TEXTURE, format: RGBA16, offset: 0x06051F20, width: 64, height: 32, ctype: u16, symbol: D_MAP_6051F20 } + +D_MAP_6052F20: + { type: TEXTURE, format: RGBA16, offset: 0x06052F20, width: 64, height: 32, ctype: u16, symbol: D_MAP_6052F20 } + +D_MAP_6053F20: + { type: TEXTURE, format: RGBA16, offset: 0x06053F20, width: 64, height: 32, ctype: u16, symbol: D_MAP_6053F20 } + +D_MAP_6054F20: + { type: TEXTURE, format: RGBA16, offset: 0x06054F20, width: 64, height: 32, ctype: u16, symbol: D_MAP_6054F20 } + +D_MAP_6055F20: + { type: GFX, offset: 0x6055F20, symbol: D_MAP_6055F20 } + +D_MAP_6056120: + { type: TEXTURE, format: RGBA16, offset: 0x06056120, width: 64, height: 32, ctype: u16, symbol: D_MAP_6056120 } + +D_MAP_6057120: + { type: TEXTURE, format: RGBA16, offset: 0x06057120, width: 64, height: 32, ctype: u16, symbol: D_MAP_6057120 } + +D_MAP_6058120: + { type: TEXTURE, format: RGBA16, offset: 0x06058120, width: 64, height: 32, ctype: u16, symbol: D_MAP_6058120 } + +D_MAP_6059120: + { type: TEXTURE, format: RGBA16, offset: 0x06059120, width: 64, height: 32, ctype: u16, symbol: D_MAP_6059120 } + +D_MAP_605A120: + { type: GFX, offset: 0x605A120, symbol: D_MAP_605A120 } + +D_MAP_605A230: + { type: TEXTURE, format: RGBA16, offset: 0x0605A230, width: 64, height: 32, ctype: u16, symbol: D_MAP_605A230 } + +D_MAP_605B230: + { type: TEXTURE, format: RGBA16, offset: 0x0605B230, width: 64, height: 32, ctype: u16, symbol: D_MAP_605B230 } + +D_MAP_605C230: + { type: GFX, offset: 0x605C230, symbol: D_MAP_605C230 } + +D_MAP_605C610: + { type: TEXTURE, format: IA8, offset: 0x0605C610, width: 64, height: 32, ctype: u8, symbol: D_MAP_605C610 } + +D_MAP_605CE10: + { type: TEXTURE, format: IA8, offset: 0x0605CE10, width: 64, height: 32, ctype: u8, symbol: D_MAP_605CE10 } + +D_MAP_605D610: + { type: TEXTURE, format: IA8, offset: 0x0605D610, width: 64, height: 32, ctype: u8, symbol: D_MAP_605D610 } + +D_MAP_605DE10: + { type: TEXTURE, format: IA8, offset: 0x0605DE10, width: 64, height: 32, ctype: u8, symbol: D_MAP_605DE10 } + +D_MAP_605E610: + { type: TEXTURE, format: IA8, offset: 0x0605E610, width: 64, height: 32, ctype: u8, symbol: D_MAP_605E610 } + +D_MAP_605EE10: + { type: TEXTURE, format: IA8, offset: 0x0605EE10, width: 64, height: 32, ctype: u8, symbol: D_MAP_605EE10 } + +D_MAP_605F610: + { type: TEXTURE, format: IA8, offset: 0x0605F610, width: 64, height: 32, ctype: u8, symbol: D_MAP_605F610 } + +D_MAP_605FE10: + { type: TEXTURE, format: IA8, offset: 0x0605FE10, width: 64, height: 32, ctype: u8, symbol: D_MAP_605FE10 } + +D_MAP_6060610: + { type: GFX, offset: 0x6060610, symbol: D_MAP_6060610 } + +D_MAP_6060698: + { type: TEXTURE, format: RGBA16, offset: 0x06060698, width: 32, height: 32, ctype: u16, symbol: D_MAP_6060698 } + +# size = 0x60EA0 \ No newline at end of file diff --git a/assets/yaml/us/rev1/ast_meteo.yaml b/assets/yaml/us/rev1/ast_meteo.yaml new file mode 100644 index 00000000..16a3ac8b --- /dev/null +++ b/assets/yaml/us/rev1/ast_meteo.yaml @@ -0,0 +1,320 @@ +:config: + segments: + - [0x06, 0x9A1460] + header: + code: + - '#include "assets/ast_meteo.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + - '#include "sf64level.h"' + - '#include "sf64event.h"' + - '#include "sf64player.h"' + - '#include "sf64audio_external.h"' + - '#include "sf64mesg.h"' +# Meteo +# Asteroid Field +D_ME_6000000: + { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 28, offset: 0x6000000, symbol: D_ME_6000000 } + +D_ME_6000A80: + { type: GFX, offset: 0x6000A80, symbol: D_ME_6000A80 } + +D_ME_6000B10: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06000B10, symbol: D_ME_6000B10 } + +D_ME_6001310: + { type: GFX, offset: 0x6001310, symbol: D_ME_6001310 } + +D_ME_6004738: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06004738, symbol: D_ME_6004738 } + +D_ME_6004F38: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06004F38, symbol: D_ME_6004F38 } + +D_ME_6005738: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06005738, symbol: D_ME_6005738 } + +D_ME_6005F38: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06005F38, symbol: D_ME_6005F38 } + +D_ME_6006738: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06006738, symbol: D_ME_6006738 } + +D_ME_6006F38: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x06006F38, symbol: D_ME_6006F38 } + +D_ME_6006FB8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x06006FB8, symbol: D_ME_6006FB8 } + +D_ME_6007038: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06007038, symbol: D_ME_6007038 } + +D_ME_6007838: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x06007838, symbol: D_ME_6007838 } + +D_ME_60078B8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x060078B8, symbol: D_ME_60078B8 } + +D_ME_60080C0: + { type: GFX, offset: 0x60080C0, symbol: D_ME_60080C0 } + +D_ME_6008A18: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x06008A18, symbol: D_ME_6008A18 } + +D_ME_6008AA0: + { type: GFX, offset: 0x6008AA0, symbol: D_ME_6008AA0 } + +D_ME_6009228: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06009228, symbol: D_ME_6009228 } + +D_ME_6009A28: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06009A28, symbol: D_ME_6009A28 } + +D_ME_6009C28: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06009C28, symbol: D_ME_6009C28 } + +D_ME_6009E30: + { type: GFX, offset: 0x6009E30, symbol: D_ME_6009E30 } + +D_ME_6009F50: + { type: GFX, offset: 0x6009F50, symbol: D_ME_6009F50 } + +D_ME_600AC70: + { type: GFX, offset: 0x600AC70, symbol: D_ME_600AC70 } + +D_ME_600B540: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0600B540, symbol: D_ME_600B540 } + +D_ME_600BD40: + { type: GFX, offset: 0x600BD40, symbol: D_ME_600BD40 } + +D_ME_600BF30: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x0600BF30, symbol: D_ME_600BF30 } + +D_ME_600C130: + { type: GFX, offset: 0x600C130, symbol: D_ME_600C130 } + +D_ME_600C2A0: + { type: GFX, offset: 0x600C2A0, symbol: D_ME_600C2A0 } + +D_ME_600C740: + { type: GFX, offset: 0x600C740, symbol: D_ME_600C740 } + +D_ME_600CAA0: + { type: GFX, offset: 0x600CAA0, symbol: D_ME_600CAA0 } + +D_ME_600CD60: + { type: GFX, offset: 0x600CD60, symbol: D_ME_600CD60 } + +D_ME_600CDE8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x0600CDE8, symbol: D_ME_600CDE8 } + +D_ME_600DDF0: + { type: GFX, offset: 0x600DDF0, symbol: D_ME_600DDF0 } + +D_ME_600E238: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x0600E238, symbol: D_ME_600E238 } + +D_ME_600F238: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x0600F238, symbol: D_ME_600F238 } + +D_ME_6010238: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x06010238, symbol: D_ME_6010238 } + +D_ME_6011238: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x06011238, symbol: D_ME_6011238 } + +D_ME_6012238: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x06012238, symbol: D_ME_6012238 } + +D_ME_6013238: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x06013238, symbol: D_ME_6013238 } + +D_ME_6014238: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x06014238, symbol: D_ME_6014238 } + +D_ME_6015238: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x06015238, symbol: D_ME_6015238 } + +D_ME_6016240: + { type: GFX, offset: 0x6016240, symbol: D_ME_6016240 } + +D_ME_60162C8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x060162C8, symbol: D_ME_60162C8 } + +D_ME_60172C8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x060172C8, symbol: D_ME_60172C8 } + +D_ME_6017AD0: + { type: GFX, offset: 0x06017AD0, symbol: D_ME_6017AD0 } + +D_ME_6017B60: + { type: GFX, offset: 0x06017B60, symbol: D_ME_6017B60 } + +D_ME_6018450: + { type: GFX, offset: 0x06018450, symbol: D_ME_6018450 } + +D_ME_6018960: + { type: GFX, offset: 0x06018960, symbol: D_ME_6018960 } + +D_ME_6018C00: + { type: GFX, offset: 0x06018C00, symbol: D_ME_6018C00 } + +D_ME_6019430: + { type: GFX, offset: 0x06019430, symbol: D_ME_6019430 } + +D_ME_6019880: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06019880, symbol: D_ME_6019880 } + +D_ME_601A080: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601A080, symbol: D_ME_601A080 } + +D_ME_601A880: + { type: GFX, offset: 0x0601A880, symbol: D_ME_601A880 } + +D_ME_601AE40: + { type: GFX, offset: 0x0601AE40, symbol: D_ME_601AE40 } + +D_ME_601C8E0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x0601C8E0, symbol: D_ME_601C8E0 } + +D_ME_601D800: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x0601D800, symbol: D_ME_601D800 } + +D_ME_601E8C4: + { type: SF64:ANIM, offset: 0x601E8C4, symbol: D_ME_601E8C4 } + +D_ME_601E9D0: + { type: SF64:SKELETON, offset: 0x601E9D0, symbol: D_ME_601E9D0 } + +# Beta Meteo background, unused +D_ME_601EA00: + { type: GFX, offset: 0x0601EA00, symbol: D_ME_601EA00 } + +D_ME_601EA98: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601EA98, symbol: D_ME_601EA98 } + +D_ME_601F2A0: + { type: GFX, offset: 0x0601F2A0, symbol: D_ME_601F2A0 } + +D_ME_601F778: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601F778, symbol: D_ME_601F778 } + +D_ME_601FF80: + { type: GFX, offset: 0x0601FF80, symbol: D_ME_601FF80 } + +D_ME_6020008: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06020008, symbol: D_ME_6020008 } + +D_ME_6020810: + { type: GFX, offset: 0x06020810, symbol: D_ME_6020810 } + +D_ME_6020920: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06020920, symbol: D_ME_6020920 } + +D_ME_6021920: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06021920, symbol: D_ME_6021920 } + +D_ME_6022920: + { type: GFX, offset: 0x06022920, symbol: D_ME_6022920 } + +D_ME_6022E50: + { type: GFX, offset: 0x06022E50, symbol: D_ME_6022E50 } + +D_ME_60236F0: + { type: GFX, offset: 0x060236F0, symbol: D_ME_60236F0 } + +D_ME_6023788: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x06023788, symbol: D_ME_6023788 } + +D_ME_60231C0: + { type: GFX, offset: 0x060231C0, symbol: D_ME_60231C0 } + +D_ME_6023290: + { type: GFX, offset: 0x06023290, symbol: D_ME_6023290 } + +D_ME_6023360: + { type: GFX, offset: 0x06023360, symbol: D_ME_6023360 } + +D_ME_6023810: + { type: GFX, offset: 0x06023810, symbol: D_ME_6023810 } + +D_ME_60238A8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x060238A8, symbol: D_ME_60238A8 } + +D_ME_60240B0: + { type: GFX, offset: 0x060240B0, symbol: D_ME_60240B0 } + +D_ME_6024AD0: + { type: GFX, offset: 0x06024AD0, symbol: D_ME_6024AD0 } + +D_ME_6024B60: + { type: GFX, offset: 0x06024B60, symbol: D_ME_6024B60 } + +# Unused Meteo Ball +D_ME_6025B50: + { type: GFX, offset: 0x06025B50, symbol: D_ME_6025B50 } + +D_ME_6025350: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6025350, symbol: D_ME_6025350 } + +D_ME_6025BE8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06025BE8, symbol: D_ME_6025BE8 } + +D_ME_60263F0: + { type: GFX, offset: 0x060263F0, symbol: D_ME_60263F0 } + +D_ME_6026478: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06026478, symbol: D_ME_6026478 } + +D_ME_6026CC4: + { type: SF64:OBJECT_INIT, offset: 0x6026CC4, symbol: D_ME_6026CC4 } + +D_ME_6026C80: + { type: SF64:ENVIRONMENT, offset: 0x6026C80, symbol: D_ME_6026C80 } + +D_ME_602B148: + { type: SF64:OBJECT_INIT, offset: 0x602B148, symbol: D_ME_602B148 } + +D_ME_602F3AC: + { type: SF64:SCRIPT, offset: 0x602F3AC, symbol: D_ME_602F3AC } + +D_ME_602F604: + { type: SF64:HITBOX, offset: 0x602F604, symbol: D_ME_602F604 } + +D_ME_602F638: + { type: SF64:HITBOX, offset: 0x602F638, symbol: D_ME_602F638 } + +D_ME_602F684: + { type: SF64:HITBOX, offset: 0x602F684, symbol: D_ME_602F684 } + +D_ME_602F6A0: + { type: SF64:HITBOX, offset: 0x602F6A0, symbol: D_ME_602F6A0 } + +D_ME_602F6EC: + { type: SF64:HITBOX, offset: 0x602F6EC, symbol: D_ME_602F6EC } + +D_ME_602F708: + { type: SF64:HITBOX, offset: 0x602F708, symbol: D_ME_602F708 } + +D_ME_602F724: + { type: SF64:HITBOX, offset: 0x602F724, symbol: D_ME_602F724 } + +D_ME_602F740: + { type: SF64:HITBOX, offset: 0x602F740, symbol: D_ME_602F740 } + +D_ME_602F75C: + { type: SF64:HITBOX, offset: 0x602F75C, symbol: D_ME_602F75C } + +D_ME_602FA50: + { type: SF64:HITBOX, offset: 0x602FA50, symbol: D_ME_602FA50 } + +D_ME_602FA9C: + {type: SF64:COLPOLY, count: 79, offset: 0x602FA9C, symbol: D_ME_602FA9C, mesh_symbol: D_ME_OFFSET } + +D_ME_6030208: + {type: SF64:COLPOLY, count: 42, offset: 0x6030208, symbol: D_ME_6030208, mesh_symbol: D_ME_OFFSET } + +D_ME_60305DC: + {type: SF64:COLPOLY, count: 236, offset: 0x60305DC, symbol: D_ME_60305DC, mesh_symbol: D_ME_OFFSET } diff --git a/assets/yaml/us/rev1/ast_option.yaml b/assets/yaml/us/rev1/ast_option.yaml new file mode 100644 index 00000000..b3f3637a --- /dev/null +++ b/assets/yaml/us/rev1/ast_option.yaml @@ -0,0 +1,249 @@ +:config: + segments: + - [0x08, 0xCA9DE0] + header: + code: + - '#include "assets/ast_option.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + +# Invoice +D_OPT_8000000: + { type: TEXTURE, ctype: u8, format: CI4, width: 128, height: 26, offset: 0x8000000, symbol: D_OPT_8000000, tlut: 0x8000680 } + +D_OPT_8000680: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x8000680, symbol: D_OPT_8000680 } + +# Cornerian army attn: +D_OPT_80006A0: + { type: TEXTURE, ctype: u8, format: CI4, width: 256, height: 34, offset: 0x80006A0, symbol: D_OPT_80006A0, tlut: 0x80017A0 } + +D_OPT_80017A0: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x80017A0, symbol: D_OPT_80017A0 } + +# Venomian units destroyed +D_OPT_80017C0: + { type: TEXTURE, ctype: u8, format: CI4, width: 256, height: 66, offset: 0x80017C0, symbol: D_OPT_80017C0, tlut: 0x80038C0 } + +D_OPT_80038C0: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x80038C0, symbol: D_OPT_80038C0 } + +# nd +D_OPT_80038E0: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 10, offset: 0x80038E0, symbol: D_OPT_80038E0, tlut: 0x8003930 } + +D_OPT_8003930: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x8003930, symbol: D_OPT_8003930 } + +# rd +D_OPT_8003950: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 11, offset: 0x8003950, symbol: D_OPT_8003950, tlut: 0x80039A8 } + +D_OPT_80039A8: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x80039A8, symbol: D_OPT_80039A8 } + +# +D_OPT_80039D0: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x80039D0 , symbol: D_OPT_80039D0, tlut: 0x8003A50 } + +D_OPT_8003A50: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x8003A50, symbol: D_OPT_8003A50 } + +# st +D_OPT_8003A70: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 9, offset: 0x8003A70, symbol: D_OPT_8003A70, tlut: 0x8003AB8 } + +D_OPT_8003AB8: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x8003AB8, symbol: D_OPT_8003AB8 } + +# th +D_OPT_8003AE0: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 9, offset: 0x8003AE0, symbol: D_OPT_8003AE0, tlut: 0x8003B28 } + +D_OPT_8003B28: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x8003B28, symbol: D_OPT_8003B28 } + +# Option Title Cards + +# Main Game +D_OPT_8003B50: + { type: TEXTURE, ctype: u8, format: IA8, width: 72, height: 12, offset: 0x8003B50, symbol: D_OPT_8003B50 } + +# Training +D_OPT_8003EB0: + { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 12, offset: 0x8003EB0, symbol: D_OPT_8003EB0 } + +# Vs. +D_OPT_8004270: + { type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 10, offset: 0x8004270, symbol: D_OPT_8004270 } + +# Ranking +D_OPT_80043B0: + { type: TEXTURE, ctype: u8, format: IA8, width: 64, height: 12, offset: 0x80043B0, symbol: D_OPT_80043B0 } + +# Sound +D_OPT_80046B0: + { type: TEXTURE, ctype: u8, format: IA8, width: 64, height: 10, offset: 0x80046B0, symbol: D_OPT_80046B0 } + +# Data +D_OPT_8004930: + { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 10, offset: 0x8004930, symbol: D_OPT_8004930 } + +D_OPT_8004C50: + { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 12, offset: 0x8004C50, symbol: D_OPT_8004C50 } + +# Option VS Cards + +# Point Match +D_OPT_8005010: + { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 13, offset: 0x8005010, symbol: D_OPT_8005010 } + +# Battle Royal +D_OPT_80054F0: + { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 11, offset: 0x80054F0, symbol: D_OPT_80054F0 } + +# Time Trial +D_OPT_8005910: + { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 10, offset: 0x8005910, symbol: D_OPT_8005910 } + +# Sound Options + +# Press R to test +D_OPT_8005CD0: + { type: TEXTURE, ctype: u8, format: IA8, width: 112, height: 13, offset: 0x8005CD0, symbol: D_OPT_8005CD0 } + +# Mode +D_OPT_8006280: + { type: TEXTURE, ctype: u8, format: IA8, width: 48, height: 13, offset: 0x8006280, symbol: D_OPT_8006280 } + +# Music +D_OPT_80064F0: + { type: TEXTURE, ctype: u8, format: IA8, width: 88, height: 14, offset: 0x80064F0, symbol: D_OPT_80064F0 } + +# Voice +D_OPT_80069C0: + { type: TEXTURE, ctype: u8, format: IA8, width: 56, height: 15, offset: 0x80069C0, symbol: D_OPT_80069C0 } + +# SE +D_OPT_8006D10: + { type: TEXTURE, ctype: u8, format: IA8, width: 24, height: 13, offset: 0x8006D10, symbol: D_OPT_8006D10 } + +# B to cancel +D_OPT_8006E50: + { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 10, offset: 0x8006E50, symbol: D_OPT_8006E50 } + +# Headphone +D_OPT_8007210: + { type: TEXTURE, ctype: u8, format: IA8, width: 88, height: 14, offset: 0x8007210, symbol: D_OPT_8007210 } + +# Mono +D_OPT_80076E0: + { type: TEXTURE, ctype: u8, format: IA8, width: 56, height: 14, offset: 0x80076E0, symbol: D_OPT_80076E0 } + +# Soundtrack +D_OPT_80079F0: + { type: TEXTURE, ctype: u8, format: IA8, width: 128, height: 14, offset: 0x80079F0, symbol: D_OPT_80079F0 } + +# A to confirm +D_OPT_80080F0: + { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 10, offset: 0x80080F0, symbol: D_OPT_80080F0 } + +# Clear Saved Data +D_OPT_80084B0: + { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 13, offset: 0x80084B0, symbol: D_OPT_80084B0 } + +# Are you sure? +D_OPT_8008DA0: + { type: TEXTURE, ctype: u8, format: IA8, width: 160, height: 19, offset: 0x8008DA0, symbol: D_OPT_8008DA0 } + +# Yes +D_OPT_8009980: + { type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 12, offset: 0x8009980, symbol: D_OPT_8009980 } + +# No +D_OPT_8009B00: + { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 12, offset: 0x8009B00, symbol: D_OPT_8009B00 } + +# Are you REALLY sure? +D_OPT_8009CE0: + { type: TEXTURE, ctype: u8, format: IA8, width: 160, height: 41, offset: 0x8009CE0, symbol: D_OPT_8009CE0 } + +# Data erased +D_OPT_800B680: + { type: TEXTURE, ctype: u8, format: IA8, width: 144, height: 41, offset: 0x800B680, symbol: D_OPT_800B680 } + +# Stereo +D_OPT_800CD90: + { type: TEXTURE, ctype: u8, format: IA8, width: 56, height: 13, offset: 0x800CD90, symbol: D_OPT_800CD90 } + +# UNK: Triangle shape, it's mirrored to form a diamond shape +D_OPT_800D070: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x800D070, symbol: D_OPT_800D070 } + +# UNK: +D_OPT_800D170: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 16, offset: 0x800D170, symbol: D_OPT_800D170 } + +# Seal +D_OPT_800D1F0: + { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 48, offset: 0x800D1F0, symbol: D_OPT_800D1F0 } + +# UNK: +D_OPT_800E0F0: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x800E0F0, symbol: D_OPT_800E0F0 } + +D_OPT_800E130: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x800E130, symbol: D_OPT_800E130 } + +# Mercenary Unit STARFOX Fox Mccloud +D_OPT_800E170: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 188, height: 60, offset: 0x800E170, symbol: D_OPT_800E170 } + +# ScrollBar +D_OPT_8013990: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 104, height: 10, offset: 0x8013990, symbol: D_OPT_8013990 } + +# ScrollBar Indicator +D_OPT_80141B0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x80141B0, symbol: D_OPT_80141B0 } + +# Speaker +D_OPT_80143B0: + { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x80143B0, symbol: D_OPT_80143B0, tlut: 0x80147B0 } + +D_OPT_80147B0: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 32, offset: 0x80147B0, symbol: D_OPT_80147B0 } + +D_OPT_80147F0: + { type: GFX, offset: 0x80147F0, symbol: D_OPT_80147F0 } + +ast_option_seg8_vtx_00014B50: + { type: VTX, count: 124, offset: 0x8014B50, symbol: ast_option_seg8_vtx_00014B50 } + +D_OPT_8015310: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x8015310, symbol: D_OPT_8015310, tlut: 0x08015390 } + +D_OPT_8015390: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x8015390, symbol: D_OPT_8015390 } + +D_OPT_80153B0: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x80153B0, symbol: D_OPT_80153B0, tlut: 0x08015430 } + +D_OPT_8015430: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x8015430, symbol: D_OPT_8015430 } + +D_OPT_8015450: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 16, offset: 0x08015450, symbol: D_OPT_8015450 } + +D_OPT_8015550: + { type: GFX, offset: 0x8015550, symbol: D_OPT_8015550 } + +D_OPT_80155E8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x080155E8, symbol: D_OPT_80155E8 } + +D_OPT_8015DF0: + { type: GFX, offset: 0x8015DF0, symbol: D_OPT_8015DF0 } + +D_OPT_8015E88: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x08015E88, symbol: D_OPT_8015E88 } diff --git a/assets/yaml/us/rev1/ast_radio.yaml b/assets/yaml/us/rev1/ast_radio.yaml new file mode 100644 index 00000000..bb2bb02b --- /dev/null +++ b/assets/yaml/us/rev1/ast_radio.yaml @@ -0,0 +1,101 @@ +:config: + segments: + - [0x8, 0xDE5D50] + tables: + gTextCharTextures: + range: [0x0, 0x958] + mode: APPEND + header: + code: + - '#include "sf64mesg.h"' + - '' + - '// clang-format off' + - 'typedef enum {' + - ' END, NWL, NP2, NP3, NP4, NP5, NP6, NP7,' + - ' PRI0, PRI1, PRI2, PRI3, SPC, HSP, QSP, NXT,' + - ' CLF, CUP, CRT, CDN, AUP, ALF, ADN, ART,' + - ' _A, _B, _C, _D, _E, _F, _G, _H,' + - ' _I, _J, _K, _L, _M, _N, _O, _P,' + - ' _Q, _R, _S, _T, _U, _V, _W, _X,' + - ' _Y, _Z, _a, _b, _c, _d, _e, _f,' + - ' _g, _h, _i, _j, _k, _l, _m, _n,' + - ' _o, _p, _q, _r, _s, _t, _u, _v,' + - ' _w, _x, _y, _z, EXM, QST, DSH, CMA,' + - ' PRD, _0, _1, _2, _3, _4, _5, _6,' + - ' _7, _8, _9, APS, LPR, RPR, CLN, PIP,' + - '} CharCode;' + +text_char_special_0: + { type: TEXTURE, offset: 0x0, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharSpecial0 } + +text_char_special_4: + { type: TEXTURE, offset: 0x68, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharSpecial4 } + +text_char_special_8: + { type: TEXTURE, offset: 0xD0, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharSpecial8 } + +text_char_special_12: + { type: TEXTURE, offset: 0x138, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharSpecial12 } + +text_char_cdir: + { type: TEXTURE, offset: 0x1A0, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharCDIR } + +text_char_adir: + { type: TEXTURE, offset: 0x208, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharADIR } + +text_char_abcd_upper: + { type: TEXTURE, offset: 0x270, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharABCD } + +text_char_efgh_upper: + { type: TEXTURE, offset: 0x2D8, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharEFGH } + +text_char_ijkl_upper: + { type: TEXTURE, offset: 0x340, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharIJKL } + +text_char_mnop_upper: + { type: TEXTURE, offset: 0x3A8, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharMNOP } + +text_char_qrst_upper: + { type: TEXTURE, offset: 0x410, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharQRST } + +text_char_uvwx_upper: + { type: TEXTURE, offset: 0x478, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharUVWX } + +text_char_yzab_both: + { type: TEXTURE, offset: 0x4E0, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharYZABBoth } + +text_char_cdef_lower: + { type: TEXTURE, offset: 0x548, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharCDEFLower } + +text_char_ghij_lower: + { type: TEXTURE, offset: 0x5B0, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharGHIJLower } + +text_char_klmn_lower: + { type: TEXTURE, offset: 0x618, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharKLMNLower } + +text_char_opqr_lower: + { type: TEXTURE, offset: 0x680, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharOPQRLower } + +text_char_stuv_lower: + { type: TEXTURE, offset: 0x6E8, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharSTUVLower } + +text_char_wxyz_lower: + { type: TEXTURE, offset: 0x750, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharWXYZLower } + +text_char_pidc: + { type: TEXTURE, offset: 0x7B8, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharPIDC } + +text_char_p012: + { type: TEXTURE, offset: 0x820, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharP012 } + +text_char_3456: + { type: TEXTURE, offset: 0x888, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextChar3456 } + +text_char_789a: + { type: TEXTURE, offset: 0x8F0, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextChar789A } + +text_char_ppdp: + { type: TEXTURE, offset: 0x958, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharPPDP } + +message_table: + { type: SF64:MSG_TABLE, offset: 0xCCAC, vram: 0x80179010, ctype: u8, symbol: gMsgLookup } \ No newline at end of file diff --git a/assets/yaml/us/rev1/ast_sector_x.yaml b/assets/yaml/us/rev1/ast_sector_x.yaml new file mode 100644 index 00000000..2f2d2754 --- /dev/null +++ b/assets/yaml/us/rev1/ast_sector_x.yaml @@ -0,0 +1,298 @@ +:config: + segments: + - [0x06, 0xA1D0F0] + header: + code: + - '#include "assets/ast_sector_x.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + - '#include "sf64level.h"' + - '#include "sf64event.h"' + - '#include "sf64player.h"' + - '#include "sf64audio_external.h"' + - '#include "sf64mesg.h"' + +D_SX_6000000: + { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 12, offset: 0x6000000, symbol: D_SX_6000000 } + +D_SX_6000840: + { type: GFX, offset: 0x6000840, symbol: D_SX_6000840 } + +# Flying mine +D_SX_60008C0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60008C0, symbol: D_SX_60008C0 } + +D_SX_60010C0: + { type: GFX, offset: 0x60010C0, symbol: D_SX_60010C0 } + +# Texture of Planet Titania, seen when Slippy gets thrown by Spyborg +D_SX_6001150: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6001150, symbol: D_SX_6001150 } + +D_SX_6001950: + { type: GFX, offset: 0x6001950, symbol: D_SX_6001950 } + +D_SX_6001AD8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6001AD8, symbol: D_SX_6001AD8 } + +D_SX_6001CE0: + { type: GFX, offset: 0x6001CE0, symbol: D_SX_6001CE0 } + +D_SX_60020C0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x60020C0, symbol: D_SX_60020C0 } + +D_SX_60022C0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x60022C0, symbol: D_SX_60022C0 } + +D_SX_60024C0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x60024C0, symbol: D_SX_60024C0 } + +D_SX_60026C0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x60026C0, symbol: D_SX_60026C0 } + +D_SX_60028C0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x60028C0, symbol: D_SX_60028C0 } + +D_SX_6002AC0: + { type: GFX, offset: 0x6002AC0, symbol: D_SX_6002AC0 } + +ast_sector_x_seg6_vtx_2E88: + { type: VTX, count: 134, offset: 0x6002E88, symbol: ast_sector_x_seg6_vtx_2E88 } + +D_SX_60036E8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60036E8, symbol: D_SX_60036E8 } + +D_SX_6003EE8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6003EE8, symbol: D_SX_6003EE8 } + +D_SX_60046E8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60046E8, symbol: D_SX_60046E8 } + +D_SX_6004EE8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x6004EE8, symbol: D_SX_6004EE8 } + +D_SX_6005EE8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6005EE8, symbol: D_SX_6005EE8 } + +D_SX_60066F0: + { type: GFX, offset: 0x60066F0, symbol: D_SX_60066F0 } + +D_SX_6006810: + { type: GFX, offset: 0x6006810, symbol: D_SX_6006810 } + +D_SX_6007128: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6007128, symbol: D_SX_6007128 } + +D_SX_6007928: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6007928, symbol: D_SX_6007928 } + +D_SX_6008128: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6008128, symbol: D_SX_6008128 } + +D_SX_6008928: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6008928, symbol: D_SX_6008928 } + +D_SX_6008B30: + { type: GFX, offset: 0x6008B30, symbol: D_SX_6008B30 } + +D_SX_6009548: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6009548, symbol: D_SX_6009548 } + +D_SX_6009748: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6009748, symbol: D_SX_6009748 } + +D_SX_6009950: + { type: GFX, offset: 0x6009950, symbol: D_SX_6009950 } + +D_SX_6009C30: + { type: GFX, offset: 0x6009C30, symbol: D_SX_6009C30 } + +D_SX_6009CC0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x6009CC0, symbol: D_SX_6009CC0 } + +D_SX_6009FF8: + { type: SF64:ANIM, offset: 0x6009FF8, symbol: D_SX_6009FF8 } + +D_SX_600A2D4: + { type: SF64:ANIM, offset: 0x600A2D4, symbol: D_SX_600A2D4 } + +D_SX_600A2E0: + { type: GFX, offset: 0x600A2E0, symbol: D_SX_600A2E0 } + +D_SX_600A570: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x600A570, symbol: D_SX_600A570 } + +D_SX_600AD70: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x600AD70, symbol: D_SX_600AD70 } + +D_SX_600AF70: + { type: GFX, offset: 0x600AF70, symbol: D_SX_600AF70 } + +D_SX_600B2B0: + { type: GFX, offset: 0x600B2B0, symbol: D_SX_600B2B0 } + +D_SX_600B540: + { type: GFX, offset: 0x600B540, symbol: D_SX_600B540 } + +D_SX_600B830: + { type: GFX, offset: 0x600B830, symbol: D_SX_600B830 } + +D_SX_600C000: + { type: GFX, offset: 0x600C000, symbol: D_SX_600C000 } + +D_SX_600C5A0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x600C5A0, symbol: D_SX_600C5A0 } + +D_SX_600F890: + { type: SF64:ANIM, offset: 0x600F890, symbol: D_SX_600F890 } + +D_SX_600F8A0: + { type: GFX, offset: 0x600F8A0, symbol: D_SX_600F8A0 } + +D_SX_600F938: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0600F938, symbol: D_SX_600F938 } + +D_SX_6010140: + { type: GFX, offset: 0x6010140, symbol: D_SX_6010140 } + +D_SX_60105A0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60105A0, symbol: D_SX_60105A0 } + +D_SX_60123BC: + { type: SF64:ANIM, offset: 0x60123BC, symbol: D_SX_60123BC } + +D_SX_6013798: + { type: SF64:ANIM, offset: 0x6013798, symbol: D_SX_6013798 } + +D_SX_6013820: + { type: SF64:ANIM, offset: 0x6013820, symbol: D_SX_6013820 } + +D_SX_601390C: + { type: SF64:SKELETON, offset: 0x601390C, symbol: D_SX_601390C } + +D_SX_60158C4: + { type: SF64:ANIM, offset: 0x60158C4, symbol: D_SX_60158C4 } + +D_SX_6016E28: + { type: SF64:ANIM, offset: 0x6016E28, symbol: D_SX_6016E28 } + +D_SX_601AA28: + { type: SF64:ANIM, offset: 0x601AA28, symbol: D_SX_601AA28 } + +D_SX_601C690: + { type: SF64:ANIM, offset: 0x601C690, symbol: D_SX_601C690 } + +D_SX_60206DC: + { type: SF64:ANIM, offset: 0x60206DC, symbol: D_SX_60206DC } + +D_SX_6020C68: + { type: SF64:SKELETON, offset: 0x6020C68, symbol: D_SX_6020C68 } + +D_SX_6020D20: + { type: GFX, offset: 0x6020D20, symbol: D_SX_6020D20 } + +# Spyborg Radio +D_SX_6020FB0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x06020FB0, symbol: D_SX_6020FB0 } + +D_SX_6021ED0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x06021ED0, symbol: D_SX_6021ED0 } + +D_SX_6022DF0: + { type: GFX, offset: 0x6022DF0, symbol: D_SX_6022DF0 } + +D_SX_6023500: + { type: GFX, offset: 0x6023500, symbol: D_SX_6023500 } + +D_SX_6023C30: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06023C30, symbol: D_SX_6023C30 } + +D_SX_6023E30: + { type: GFX, offset: 0x6023E30, symbol: D_SX_6023E30 } + +D_SX_60285F0: + { type: GFX, offset: 0x60285F0, symbol: D_SX_60285F0 } + +D_SX_6029098: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06029098, symbol: D_SX_6029098 } + +D_SX_60292A0: + { type: GFX, offset: 0x60292A0, symbol: D_SX_60292A0 } + +D_SX_6029890: + { type: GFX, offset: 0x6029890, symbol: D_SX_6029890 } + +D_SX_6029918: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x029918, symbol: D_SX_6029918 } + +D_SX_602A120: + { type: SF64:ENVIRONMENT, offset: 0x602A120, symbol: D_SX_602A120 } + +D_SX_602A164: + { type: SF64:OBJECT_INIT, count: 1026, offset: 0x602A164, symbol: D_SX_602A164 } + +D_SX_602F18C: + { type: SF64:OBJECT_INIT, count: 167, offset: 0x602F18C, symbol: D_SX_602F18C } + +D_SX_60320D0: + { type: SF64:SCRIPT, offset: 0x60320D0, symbol: D_SX_60320D0 } + +D_SX_6032328: + { type: SF64:HITBOX, offset: 0x6032328, symbol: D_SX_6032328 } + +D_SX_603238C: + { type: SF64:HITBOX, offset: 0x603238C, symbol: D_SX_603238C } + +D_SX_6032408: + { type: SF64:HITBOX, offset: 0x6032408, symbol: D_SX_6032408 } + +D_SX_6032488: + { type: SF64:HITBOX, offset: 0x6032488, symbol: D_SX_6032488 } + +D_SX_60324EC: + { type: SF64:HITBOX, offset: 0x60324EC, symbol: D_SX_60324EC } + +D_SX_6032550: + { type: SF64:HITBOX, offset: 0x6032550, symbol: D_SX_6032550 } + +D_SX_603285C: + { type: SF64:HITBOX, offset: 0x603285C, symbol: D_SX_603285C } + +D_SX_6032878: + { type: SF64:HITBOX, offset: 0x6032878, symbol: D_SX_6032878 } + +D_SX_6032894: + { type: SF64:HITBOX, offset: 0x6032894, symbol: D_SX_6032894 } + +D_SX_60328B0: + { type: SF64:HITBOX, offset: 0x60328B0, symbol: D_SX_60328B0 } + +D_SX_60328CC: + { type: SF64:HITBOX, offset: 0x60328CC, symbol: D_SX_60328CC } + +D_SX_603265C: + { type: SF64:HITBOX, offset: 0x603265C, symbol: D_SX_603265C } + +D_SX_6032768: + { type: SF64:HITBOX, offset: 0x6032768, symbol: D_SX_6032768 } + +D_SX_60328E8: + { type: SF64:HITBOX, offset: 0x60328E8, symbol: D_SX_60328E8 } + +D_SX_6032904: + { type: SF64:HITBOX, offset: 0x6032904, symbol: D_SX_6032904 } + +D_SX_6032938: + { type: SF64:HITBOX, offset: 0x6032938, symbol: D_SX_6032938 } + +D_SX_6032954: + { type: SF64:HITBOX, offset: 0x6032954, symbol: D_SX_6032954 } + +D_SX_6032970: + { type: SF64:HITBOX, offset: 0x6032970, symbol: D_SX_6032970 } + +D_SX_603298C: + { type: SF64:HITBOX, offset: 0x603298C, symbol: D_SX_603298C } + +# size = 0x32AC0 \ No newline at end of file diff --git a/assets/yaml/us/rev1/ast_sector_y.yaml b/assets/yaml/us/rev1/ast_sector_y.yaml new file mode 100644 index 00000000..8ca9f1ef --- /dev/null +++ b/assets/yaml/us/rev1/ast_sector_y.yaml @@ -0,0 +1,362 @@ +:config: + segments: + - [0x06, 0xB2CA50] + header: + code: + - '#include "assets/ast_sector_y.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + - '#include "sf64level.h"' + - '#include "sf64event.h"' + - '#include "sf64player.h"' + - '#include "sf64audio_external.h"' + - '#include "sf64mesg.h"' + - '#include "sf64mesg.h"' + +# Sector Y: Combat Zone +D_SY_6000000: + { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 12, offset: 0x6000000, symbol: D_SY_6000000 } + +# Saruzin flagship icon in radar +D_SY_6000840: + { type: TEXTURE, ctype: u8, format: IA8, width: 64, height: 64, offset: 0x6000840, symbol: D_SY_6000840 } + +D_SY_6001840: + { type: GFX, offset: 0x6001840, symbol: D_SY_6001840 } + +# Sector Y Background +D_SY_60018D0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x060018D0, symbol: D_SY_60018D0 } + +D_SY_6003348: + { type: SF64:ANIM, offset: 0x6003348, symbol: D_SY_6003348 } + +D_SY_60034C4: + { type: SF64:ANIM, offset: 0x60034C4, symbol: D_SY_60034C4 } + +D_SY_60034D0: + { type: GFX, offset: 0x60034D0, symbol: D_SY_60034D0 } + +D_SY_60036A0: + { type: GFX, offset: 0x60036A0, symbol: D_SY_60036A0 } + +D_SY_6004958: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06004958, symbol: D_SY_6004958 } + +D_SY_6005158: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06005158, symbol: D_SY_6005158 } + +D_SY_6005360: + { type: GFX, offset: 0x6005360, symbol: D_SY_6005360 } + +D_SY_6005BE0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06005BE0, symbol: D_SY_6005BE0 } + +D_SY_60063E0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x060063E0, symbol: D_SY_60063E0 } + +D_SY_6006BE0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06006BE0, symbol: D_SY_6006BE0 } + +D_SY_6006DE0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 24, offset: 0x06006DE0, symbol: D_SY_6006DE0 } + +D_SY_60073E0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x060073E0, symbol: D_SY_60073E0 } + +D_SY_60083E0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x060083E0, symbol: D_SY_60083E0 } + +D_SY_6008BE0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 16, offset: 0x06008BE0, symbol: D_SY_6008BE0 } + +D_SY_6008FE0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06008FE0, symbol: D_SY_6008FE0 } + +D_SY_60097E0: + { type: GFX, offset: 0x060097E0, symbol: D_SY_60097E0 } + +D_SY_600AAC0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x0600AAC0, symbol: D_SY_600AAC0 } + +D_SY_600BAC0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x0600BAC0, symbol: D_SY_600BAC0 } + +D_SY_600CAC0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x0600CAC0, symbol: D_SY_600CAC0 } + +D_SY_600DAC0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0600DAC0, symbol: D_SY_600DAC0 } + +D_SY_600E2C0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0600E2C0, symbol: D_SY_600E2C0 } + +D_SY_600EAC0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0600EAC0, symbol: D_SY_600EAC0 } + +D_SY_600F2C0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 32, offset: 0x0600F2C0, symbol: D_SY_600F2C0 } + +D_SY_600F6C0: + { type: GFX, offset: 0x600F6C0, symbol: D_SY_600F6C0 } + +D_SY_60102C0: + { type: GFX, offset: 0x60102C0, symbol: D_SY_60102C0 } + +D_SY_6011758: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x06011758, symbol: D_SY_6011758 } + +D_SY_60117D8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x060117D8, symbol: D_SY_60117D8 } + +D_SY_60119D8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x060119D8, symbol: D_SY_60119D8 } + +D_SY_60132A0: + { type: GFX, offset: 0x60132A0, symbol: D_SY_60132A0 } + +D_SY_6015D60: + { type: GFX, offset: 0x6015D60, symbol: D_SY_6015D60 } + +D_SY_601F3D0: + { type: GFX, offset: 0x601F3D0, symbol: D_SY_601F3D0 } + +D_SY_60121E0: + { type: GFX, offset: 0x60121E0, symbol: D_SY_60121E0 } + +D_SY_60128A0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x060128A0, symbol: D_SY_60128A0 } + +D_SY_60130A0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x060130A0, symbol: D_SY_60130A0 } + +D_SY_6013600: + { type: GFX, offset: 0x6013600, symbol: D_SY_6013600 } + +D_SY_6013840: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06013840, symbol: D_SY_6013840 } + +D_SY_6014040: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06014040, symbol: D_SY_6014040 } + +D_SY_6014240: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06014240, symbol: D_SY_6014240 } + +D_SY_6014A40: + { type: GFX, offset: 0x6014A40, symbol: D_SY_6014A40 } + +D_SY_6014B48: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x06014B48, symbol: D_SY_6014B48 } + +D_SY_6014BD0: + { type: GFX, offset: 0x6014BD0, symbol: D_SY_6014BD0 } + +D_SY_6015960: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06015960, symbol: D_SY_6015960 } + +D_SY_6015B60: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06015B60, symbol: D_SY_6015B60 } + +D_SY_60188D0: + { type: GFX, offset: 0x60188D0, symbol: D_SY_60188D0 } + +D_SY_60183B0: + { type: GFX, offset: 0x60183B0, symbol: D_SY_60183B0 } + +D_SY_6018F30: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x06018F30, symbol: D_SY_6018F30 } + +D_SY_6019E50: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x06019E50, symbol: D_SY_6019E50 } + +D_SY_601AD70: + { type: GFX, offset: 0x601AD70, symbol: D_SY_601AD70 } + +D_SY_601AE08: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601AE08, symbol: D_SY_601AE08 } + +D_SY_601B610: + { type: GFX, offset: 0x601B610, symbol: D_SY_601B610 } + +D_SY_601B6A0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x0601B6A0, symbol: D_SY_601B6A0 } + +D_SY_601C6A0: + { type: GFX, offset: 0x601C6A0, symbol: D_SY_601C6A0 } + +D_SY_601C730: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x0601C730, symbol: D_SY_601C730 } + +D_SY_601D730: + { type: GFX, offset: 0x601D730, symbol: D_SY_601D730 } + +D_SY_601F3B8: + { type: SF64:ANIM, offset: 0x601F3B8, symbol: D_SY_601F3B8 } + +D_SY_60205D0: + { type: GFX, offset: 0x60205D0, symbol: D_SY_60205D0 } + +D_SY_60209F0: + { type: GFX, offset: 0x60209F0, symbol: D_SY_60209F0 } + +D_SY_6020B08: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06020B08, symbol: D_SY_6020B08 } + +D_SY_6021B08: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06021B08, symbol: D_SY_6021B08 } + +D_SY_6022B10: + { type: GFX, offset: 0x6022B10, symbol: D_SY_6022B10 } + +D_SY_6022C28: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06022C28, symbol: D_SY_6022C28 } + +D_SY_6023C28: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06023C28, symbol: D_SY_6023C28 } + +D_SY_60258A0: + { type: SF64:ANIM, offset: 0x60258A0, symbol: D_SY_60258A0 } + +D_SY_602645C: + { type: SF64:ANIM, offset: 0x602645C, symbol: D_SY_602645C } + +D_SY_60265B4: + { type: SF64:ANIM, offset: 0x60265B4, symbol: D_SY_60265B4 } + +D_SY_602738C: + { type: SF64:ANIM, offset: 0x602738C, symbol: D_SY_602738C } + +D_SY_60273A0: + { type: GFX, offset: 0x60273A0, symbol: D_SY_60273A0 } + +D_SY_6027960: + { type: GFX, offset: 0x6027960, symbol: D_SY_6027960 } + +D_SY_6028668: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06028668, symbol: D_SY_6028668 } + +D_SY_6028E70: + { type: GFX, offset: 0x6028E70, symbol: D_SY_6028E70 } + +D_SY_6029B48: + { type: SF64:ANIM, offset: 0x6029B48, symbol: D_SY_6029B48 } + +D_SY_602A2CC: + { type: SF64:ANIM, offset: 0x602A2CC, symbol: D_SY_602A2CC } + +D_SY_602A2E0: + { type: GFX, offset: 0x602A2E0, symbol: D_SY_602A2E0 } + +D_SY_602A720: + { type: GFX, offset: 0x602A720, symbol: D_SY_602A720 } + +D_SY_602A8C0: + { type: GFX, offset: 0x602A8C0, symbol: D_SY_602A8C0 } + +D_SY_602AFF8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x0602AFF8, symbol: D_SY_602AFF8 } + +D_SY_602B778: + { type: SF64:ANIM, offset: 0x602B778, symbol: D_SY_602B778 } + +D_SY_602B8DC: + { type: SF64:ANIM, offset: 0x602B8DC, symbol: D_SY_602B8DC } + +D_SY_602B8F0: + { type: GFX, offset: 0x602B8F0, symbol: D_SY_602B8F0 } + +D_SY_602CEB4: + { type: SF64:ANIM, offset: 0x602CEB4, symbol: D_SY_602CEB4 } + +D_SY_602D340: + { type: GFX, offset: 0x602D340, symbol: D_SY_602D340 } + +D_SY_602D830: + { type: GFX, offset: 0x602D830, symbol: D_SY_602D830 } + +D_SY_602DC40: + { type: GFX, offset: 0x602DC40, symbol: D_SY_602DC40 } + +D_SY_602DE70: + { type: GFX, offset: 0x602DE70, symbol: D_SY_602DE70 } + +D_SY_602E0A0: + { type: GFX, offset: 0x602E0A0, symbol: D_SY_602E0A0 } + +D_SY_602D140: + { type: SF64:SKELETON, offset: 0x602D140, symbol: D_SY_602D140 } + +D_SY_602D194: + { type: GFX, offset: 0x602D1A0, symbol: D_SY_602D194 } + +D_SY_602D238: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 16, offset: 0x0602D238, symbol: D_SY_602D238 } + +D_SY_602E4B0: + { type: SF64:ENVIRONMENT, offset: 0x602E4B0, symbol: D_SY_602E4B0 } + +D_SY_602E4F4: + { type: SF64:OBJECT_INIT, offset: 0x602E4F4, symbol: D_SY_602E4F4 } + +D_SY_6030B14: + { type: SF64:OBJECT_INIT, offset: 0x6030B14, symbol: D_SY_6030B14 } + +D_SY_6032E18: + { type: SF64:SCRIPT, offset: 0x6032E18, symbol: D_SY_6032E18 } + +D_SY_6033070: + {type: SF64:COLPOLY, count: 174, offset: 0x6033070, symbol: D_SY_6033070, mesh_symbol: D_SY_6033E08 } + +D_SY_603405C: + { type: SF64:HITBOX, offset: 0x603405C, symbol: D_SY_603405C } + +D_SY_60340C0: + { type: SF64:HITBOX, offset: 0x60340C0, symbol: D_SY_60340C0 } + +D_SY_6034124: + { type: SF64:HITBOX, offset: 0x6034124, symbol: D_SY_6034124 } + +D_SY_60341A8: + { type: SF64:HITBOX, offset: 0x60341A8, symbol: D_SY_60341A8 } + +D_SY_603421C: + { type: SF64:HITBOX, offset: 0x603421C, symbol: D_SY_603421C } + +D_SY_60342A0: + { type: SF64:HITBOX, offset: 0x60342A0, symbol: D_SY_60342A0 } + +D_SY_6034304: + { type: SF64:HITBOX, offset: 0x6034304, symbol: D_SY_6034304 } + +D_SY_6034368: + { type: SF64:HITBOX, offset: 0x6034368, symbol: D_SY_6034368 } + +D_SY_603445C: + { type: SF64:HITBOX, offset: 0x603445C, symbol: D_SY_603445C } + +D_SY_6034478: + { type: SF64:HITBOX, offset: 0x6034478, symbol: D_SY_6034478 } + +D_SY_603450C: + { type: SF64:HITBOX, offset: 0x603450C, symbol: D_SY_603450C } + +D_SY_6034588: + { type: SF64:HITBOX, offset: 0x6034588, symbol: D_SY_6034588 } + +D_SY_6034664: + { type: SF64:HITBOX, offset: 0x6034664, symbol: D_SY_6034664 } + +D_SY_6034770: + { type: SF64:HITBOX, offset: 0x6034770, symbol: D_SY_6034770 } + +D_SY_60347D4: + { type: SF64:HITBOX, offset: 0x60347D4, symbol: D_SY_60347D4 } + +D_SY_60347F0: + { type: SF64:HITBOX, offset: 0x60347F0, symbol: D_SY_60347F0 } + +D_SY_603486C: + { type: SF64:HITBOX, offset: 0x603486C, symbol: D_SY_603486C } + +# size = 0x34890 \ No newline at end of file diff --git a/assets/yaml/us/rev1/ast_sector_z.yaml b/assets/yaml/us/rev1/ast_sector_z.yaml new file mode 100644 index 00000000..bd532e3f --- /dev/null +++ b/assets/yaml/us/rev1/ast_sector_z.yaml @@ -0,0 +1,172 @@ +:config: + segments: + - [0x06, 0xA4FBB0] + header: + code: + - '#include "assets/ast_sector_z.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + - '#include "sf64level.h"' + - '#include "sf64event.h"' + - '#include "sf64player.h"' + - '#include "sf64audio_external.h"' + - '#include "sf64mesg.h"' + +# Sector Z: Combat Zone +D_SZ_6000000: + { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 12, offset: 0x6000000, symbol: D_SZ_6000000 } + +# One of the so called "Boss titles", unused in the game. A version of the same thing +# seems to have been implemented in the 3DS version. +# The text in japanese translates to: + +# Interspace anti-ship missile +# Macbeth B +D_SZ_6000840: + { type: TEXTURE, ctype: u8, format: IA8, width: 104, height: 26, offset: 0x6000840, symbol: D_SZ_6000840 } + +# Great Fox icon showed in the Radar +D_SZ_60012D0: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 9, offset: 0x60012D0, symbol: D_SZ_60012D0 } + +D_SZ_6001360: + { type: GFX, offset: 0x6001360, symbol: D_SZ_6001360 } + +D_SZ_6001A10: + { type: GFX, offset: 0x6001A10, symbol: D_SZ_6001A10 } + +D_SZ_6001C80: + { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x06001C80, symbol: D_SZ_6001C80, tlut: 0x06001D80 } + +D_SZ_6001D80: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x06001D80, symbol: D_SZ_6001D80 } + +D_SZ_6001DA0: + { type: GFX, offset: 0x6001DA0, symbol: D_SZ_6001DA0 } + +D_SZ_60025F0: + { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x60025F0, symbol: D_SZ_60025F0, tlut: 0x060029F0 } + +D_SZ_60029F0: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 240, offset: 0x060029F0, symbol: D_SZ_60029F0 } + +D_SZ_6002BD0: + { type: TEXTURE, ctype: u8, format: CI8, width: 8, height: 8, offset: 0x06002BD0, symbol: D_SZ_6002BD0, tlut: 0x06002C10 } + +D_SZ_6002C10: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x06002C10, symbol: D_SZ_6002C10 } + +D_SZ_6002C30: + { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x06002C30, symbol: D_SZ_6002C30, tlut: 0x06002D30 } + +D_SZ_6002D30: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 88, offset: 0x06002D30, symbol: D_SZ_6002D30 } + +D_SZ_6002DE0: + { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x06002DE0, symbol: D_SZ_6002DE0, tlut: 0x06002EE0 } + +D_SZ_6002EE0: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 80, offset: 0x06002EE0, symbol: D_SZ_6002EE0 } + +D_SZ_6002F80: + { type: GFX, offset: 0x6002F80, symbol: D_SZ_6002F80 } + +# Sector Z Background +D_SZ_6003010: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06003010, symbol: D_SZ_6003010 } + +D_SZ_6004010: + { type: GFX, offset: 0x6004010, symbol: D_SZ_6004010 } + +D_SZ_60041F8: + { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x060041F8, symbol: D_SZ_60041F8, tlut: 0x060042F8 } + +D_SZ_60042F8: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 24, offset: 0x060042F8, symbol: D_SZ_60042F8 } + +D_SZ_6004330: + { type: GFX, offset: 0x6004330, symbol: D_SZ_6004330 } + +D_SZ_6004458: + { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 8, offset: 0x06004458, symbol: D_SZ_6004458, tlut: 0x06004558 } + +D_SZ_6004558: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x06004558, symbol: D_SZ_6004558 } + +D_SZ_6004570: + { type: GFX, offset: 0x6004570, symbol: D_SZ_6004570 } + +D_SZ_60045E0: + { type: GFX, offset: 0x60045E0, symbol: D_SZ_60045E0 } + +D_SZ_60047E0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60047E0, symbol: D_SZ_60047E0 } + +D_SZ_6004FE0: + { type: GFX, offset: 0x6004FE0, symbol: D_SZ_6004FE0 } + +D_SZ_60054E0: + { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x060054E0, symbol: D_SZ_60054E0, tlut: 0x060058E0 } + +D_SZ_60058E0: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 240, offset: 0x060058E0, symbol: D_SZ_60058E0 } + +D_SZ_6005AC0: + { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x06005AC0, symbol: D_SZ_6005AC0, tlut: 0x06005BC0 } + +D_SZ_6005BC0: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 24, offset: 0x06005BC0, symbol: D_SZ_6005BC0 } + +D_SZ_6005BF0: + { type: GFX, offset: 0x6005BF0, symbol: D_SZ_6005BF0 } + +D_SZ_6006090: + { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x06006090, symbol: D_SZ_6006090, tlut: 0x06006490 } + +D_SZ_6006490: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 232, offset: 0x06006490, symbol: D_SZ_6006490 } + +D_SZ_6006660: + { type: GFX, offset: 0x6006660, symbol: D_SZ_6006660 } + +D_SZ_6006780: + { type: GFX, offset: 0x6006780, symbol: D_SZ_6006780 } + +D_SZ_6006A30: + { type: GFX, offset: 0x6006A30, symbol: D_SZ_6006A30 } + +D_SZ_6006BD8: + { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x06006BD8, symbol: D_SZ_6006BD8, tlut: 0x06006CD8 } + +D_SZ_6006CD8: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x06006CD8, symbol: D_SZ_6006CD8 } + +D_SZ_6006D64: + { type: SF64:ANIM, offset: 0x6006D64, symbol: D_SZ_6006D64 } + +D_SZ_6006E50: + { type: SF64:SKELETON, offset: 0x6006E50, symbol: D_SZ_6006E50 } + +D_SZ_6006E70: + { type: SF64:ENVIRONMENT, offset: 0x6006E70, symbol: D_SZ_6006E70 } + +D_SZ_6006EB4: + { type: SF64:OBJECT_INIT, offset: 0x6006EB4, symbol: D_SZ_6006EB4 } + +D_SZ_6007558: + {type: SF64:COLPOLY, count: 316, offset: 0x6007558, symbol: D_SZ_6007558, mesh_symbol: D_SZ_OFFSET } + +D_SZ_6009230: + { type: SF64:HITBOX, offset: 0x6009230, symbol: D_SZ_6009230 } + +D_SZ_600924C: + { type: SF64:HITBOX, offset: 0x600924C, symbol: D_SZ_600924C } + +D_SZ_60092E8: + { type: SF64:HITBOX, offset: 0x60092E8, symbol: D_SZ_60092E8 } + +D_SZ_6009388: + { type: SF64:HITBOX, offset: 0x6009388, symbol: D_SZ_6009388 } + +# size = 0x93B0 \ No newline at end of file diff --git a/assets/yaml/us/rev1/ast_solar.yaml b/assets/yaml/us/rev1/ast_solar.yaml new file mode 100644 index 00000000..3e2cee43 --- /dev/null +++ b/assets/yaml/us/rev1/ast_solar.yaml @@ -0,0 +1,227 @@ +:config: + segments: + - [0x06, 0xB612E0] + header: + code: + - '#include "assets/ast_solar.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + - '#include "sf64level.h"' + - '#include "sf64event.h"' + - '#include "sf64player.h"' + - '#include "sf64audio_external.h"' + - '#include "sf64mesg.h"' + +D_SO_6000000: + { type: TEXTURE, ctype: u8, format: IA8, width: 112, height: 13, offset: 0x6000000, symbol: D_SO_6000000} + +D_SO_60005B0: + { type: GFX, offset: 0x60005B0, symbol: D_SO_60005B0} + +D_SO_6001C50: + { type: VTX, count: 289, offset: 0x6001C50, symbol: D_SO_6001C50} + +D_SO_6002E60: + { type: GFX, offset: 0x6002E60, symbol: D_SO_6002E60} + +D_SO_6004500: + { type: VTX, count: 289, offset: 0x6004500, symbol: D_SO_6004500} + +D_SO_6005710: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6005710, symbol: D_SO_6005710} + +D_SO_600636C: + { type: SF64:ANIM, offset: 0x600636C, symbol: D_SO_600636C} + +D_SO_6006558: + { type: SF64:SKELETON, offset: 0x6006558, symbol: D_SO_6006558} + +D_SO_6006DD8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6006DD8, symbol: D_SO_6006DD8} + +D_SO_6007C40: + { type: GFX, offset: 0x6007C40, symbol: D_SO_6007C40} + +D_SO_6007CC0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6007CC0, symbol: D_SO_6007CC0} + +D_SO_60084C0: + { type: GFX, offset: 0x60084C0, symbol: D_SO_60084C0} + +D_SO_6008540: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6008540, symbol: D_SO_6008540} + +D_SO_6008D40: + { type: GFX, offset: 0x6008D40, symbol: D_SO_6008D40} + +D_SO_6008DC0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6008DC0, symbol: D_SO_6008DC0} + +D_SO_6009D30: + { type: SF64:ANIM, offset: 0x6009D30, symbol: D_SO_6009D30} + +D_SO_600B1B4: + { type: SF64:ANIM, offset: 0x600B1B4, symbol: D_SO_600B1B4} + +D_SO_600C15C: + { type: SF64:ANIM, offset: 0x600C15C, symbol: D_SO_600C15C} + +D_SO_600D3DC: + { type: SF64:ANIM, offset: 0x600D3DC, symbol: D_SO_600D3DC} + +D_SO_600E2C4: + { type: SF64:ANIM, offset: 0x600E2C4, symbol: D_SO_600E2C4} + +D_SO_600E470: + { type: SF64:SKELETON, offset: 0x600E470, symbol: D_SO_600E470} + +D_SO_600F744: + { type: SF64:ANIM, offset: 0x600F744, symbol: D_SO_600F744} + +D_SO_600F750: + { type: GFX, offset: 0x600F750, symbol: D_SO_600F750} + +D_SO_6010198: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6010198, symbol: D_SO_6010198} + +D_SO_6010998: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6010998, symbol: D_SO_6010998} + +D_SO_6011198: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6011198, symbol: D_SO_6011198} + +D_SO_6011398: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6011398, symbol: D_SO_6011398} + +D_SO_6012C00: + { type: SF64:ANIM, offset: 0x6012C00, symbol: D_SO_6012C00} + +D_SO_601388C: + { type: SF64:ANIM, offset: 0x601388C, symbol: D_SO_601388C} + +D_SO_60138A0: + { type: GFX, offset: 0x60138A0, symbol: D_SO_60138A0} + +D_SO_6013C70: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6013C70, symbol: D_SO_6013C70} + +D_SO_6014470: + { type: GFX, offset: 0x6014470, symbol: D_SO_6014470} + +D_SO_60146D0: + { type: GFX, offset: 0x60146D0, symbol: D_SO_60146D0} + +D_SO_6014930: + { type: GFX, offset: 0x6014930, symbol: D_SO_6014930} + +D_SO_6014B80: + { type: GFX, offset: 0x6014B80, symbol: D_SO_6014B80} + +D_SO_6014DB0: + { type: GFX, offset: 0x6014DB0, symbol: D_SO_6014DB0} + +D_SO_60151A0: + { type: GFX, offset: 0x60151A0, symbol: D_SO_60151A0} + +D_SO_6015810: + { type: GFX, offset: 0x6015810, symbol: D_SO_6015810} + +D_SO_6016CF0: + { type: GFX, offset: 0x6016CF0, symbol: D_SO_6016CF0} + +D_SO_6016F08: + { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x6016F08, symbol: D_SO_6016F08} + +D_SO_6017008: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 64, offset: 0x6017008, symbol: D_SO_6017008} + +D_SO_6017090: + { type: GFX, offset: 0x6017090, symbol: D_SO_6017090} + +D_SO_6017200: + { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x6017200, symbol: D_SO_6017200} + +D_SO_6017300: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 56, offset: 0x6017300, symbol: D_SO_6017300} + +D_SO_6017370: + { type: GFX, offset: 0x6017370, symbol: D_SO_6017370} + +D_SO_60174E0: + { type: TEXTURE, ctype: u8, format: CI8, width: 8, height: 8, offset: 0x60174E0, symbol: D_SO_60174E0} + +D_SO_6017520: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 24, offset: 0x6017520, symbol: D_SO_6017520} + +D_SO_6017550: + { type: GFX, offset: 0x6017550, symbol: D_SO_6017550} + +D_SO_60175D8: + { type: TEXTURE, ctype: u32, format: RGBA32, width: 32, height: 32, offset: 0x60175D8, symbol: D_SO_60175D8} + +D_SO_60185E0: + { type: GFX, offset: 0x60185E0, symbol: D_SO_60185E0} + +D_SO_6018668: + { type: TEXTURE, ctype: u32, format: RGBA32, width: 32, height: 32, offset: 0x6018668, symbol: D_SO_6018668} + +D_SO_6019670: + { type: GFX, offset: 0x6019670, symbol: D_SO_6019670} + +D_SO_60196F8: + { type: TEXTURE, ctype: u32, format: RGBA32, width: 32, height: 32, offset: 0x60196F8, symbol: D_SO_60196F8} + +D_SO_601A700: + { type: GFX, offset: 0x601A700, symbol: D_SO_601A700} + +D_SO_601A788: + { type: TEXTURE, ctype: u32, format: RGBA32, width: 32, height: 32, offset: 0x601A788, symbol: D_SO_601A788} + +D_SO_601B790: + { type: GFX, offset: 0x601B790, symbol: D_SO_601B790} + +D_SO_601B818: + { type: TEXTURE, ctype: u32, format: RGBA32, width: 32, height: 32, offset: 0x601B818, symbol: D_SO_601B818} + +D_SO_601C820: + { type: GFX, offset: 0x601C820, symbol: D_SO_601C820} + +D_SO_601C8A8: + { type: TEXTURE, ctype: u32, format: RGBA32, width: 32, height: 32, offset: 0x601C8A8, symbol: D_SO_601C8A8} + +D_SO_601D8B0: + { type: GFX, offset: 0x601D8B0, symbol: D_SO_601D8B0} + +D_SO_601D948: + { type: TEXTURE, ctype: u16, format: IA16, width: 32, height: 32, offset: 0x601D948, symbol: D_SO_601D948} + +D_SO_601E150: + { type: GFX, offset: 0x601E150, symbol: D_SO_601E150} + +D_SO_601E1E8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x601E1E8, symbol: D_SO_601E1E8} + +D_SO_601F1F0: + { type: SF64:ENVIRONMENT, offset: 0x601F1F0, symbol: D_SO_601F1F0} + +D_SO_601F234: + { type: SF64:OBJECT_INIT, offset: 0x601F234, symbol: D_SO_601F234} + +D_SO_6020DD0: + { type: SF64:SCRIPT, offset: 0x6020DD0, symbol: D_SO_6020DD0} + +D_SO_6020F60: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x6020F60, symbol: D_SO_6020F60} + +D_SO_6021F60: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6021F60, symbol: D_SO_6021F60} + +D_SO_6022760: + { type: ARRAY, count: 289, array_type: u16, offset: 0x6022760, symbol: D_SO_6022760} + +D_SO_60229A4: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60229A4, symbol: D_SO_60229A4} + +D_SO_60231A4: + { type: SF64:HITBOX, offset: 0x60231A4, symbol: D_SO_60231A4} \ No newline at end of file diff --git a/assets/yaml/us/rev1/ast_star_wolf.yaml b/assets/yaml/us/rev1/ast_star_wolf.yaml new file mode 100644 index 00000000..3bdb8ae4 --- /dev/null +++ b/assets/yaml/us/rev1/ast_star_wolf.yaml @@ -0,0 +1,102 @@ +:config: + segments: + - [0x0F, 0x940AD0] + header: + code: + - '#include "assets/ast_star_wolf.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + +D_STAR_WOLF_F000000: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x0F000000, symbol: D_STAR_WOLF_F000000 } + +D_STAR_WOLF_F000F20: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x0F000F20, symbol: D_STAR_WOLF_F000F20 } + +D_STAR_WOLF_F001E40: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x0F001E40, symbol: D_STAR_WOLF_F001E40 } + +D_STAR_WOLF_F002D60: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x0F002D60, symbol: D_STAR_WOLF_F002D60 } + +D_STAR_WOLF_F003C80: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x0F003C80, symbol: D_STAR_WOLF_F003C80 } + +D_STAR_WOLF_F004BA0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x0F004BA0, symbol: D_STAR_WOLF_F004BA0 } + +D_STAR_WOLF_F005AC0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x0F005AC0, symbol: D_STAR_WOLF_F005AC0 } + +D_STAR_WOLF_F0069E0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x0F0069E0, symbol: D_STAR_WOLF_F0069E0 } + +D_STAR_WOLF_F007900: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x0F007900, symbol: D_STAR_WOLF_F007900 } + +D_STAR_WOLF_F008820: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x0F008820, symbol: D_STAR_WOLF_F008820 } + +D_STAR_WOLF_F009740: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x0F009740, symbol: D_STAR_WOLF_F009740 } + +D_STAR_WOLF_F00A660: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x0F00A660, symbol: D_STAR_WOLF_F00A660 } + +D_STAR_WOLF_F00B580: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x0F00B580, symbol: D_STAR_WOLF_F00B580 } + +D_STAR_WOLF_F00C4A0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x0F00C4A0, symbol: D_STAR_WOLF_F00C4A0 } + +D_STAR_WOLF_F00D3C0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x0F00D3C0, symbol: D_STAR_WOLF_F00D3C0 } + +D_STAR_WOLF_F00E2E0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x0F00E2E0, symbol: D_STAR_WOLF_F00E2E0 } + +D_STAR_WOLF_F00F200: + { type: GFX, offset: 0xF00F200, symbol: D_STAR_WOLF_F00F200 } + +D_STAR_WOLF_F0101D0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x0F0101D0, symbol: D_STAR_WOLF_F0101D0 } + +D_STAR_WOLF_F011E80: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x0F011E80, symbol: D_STAR_WOLF_F011E80 } + +D_STAR_WOLF_F011680: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0F011680, symbol: D_STAR_WOLF_F011680 } + +D_STAR_WOLF_F0103D0: + { type: GFX, offset: 0xF0103D0, symbol: D_STAR_WOLF_F0103D0 } + +D_STAR_WOLF_F011F00: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0F011F00, symbol: D_STAR_WOLF_F011F00 } + +D_STAR_WOLF_F012700: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0F012700, symbol: D_STAR_WOLF_F012700 } + +D_STAR_WOLF_F012F00: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x0F012F00, symbol: D_STAR_WOLF_F012F00 } + +D_STAR_WOLF_F013100: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x0F013100, symbol: D_STAR_WOLF_F013100 } + +D_STAR_WOLF_F013180: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0F013180, symbol: D_STAR_WOLF_F013180 } + +D_STAR_WOLF_F013980: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0F013980, symbol: D_STAR_WOLF_F013980 } + +D_STAR_WOLF_F014180: + { type: GFX, offset: 0xF014180, symbol: D_STAR_WOLF_F014180 } + +D_STAR_WOLF_F014208: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x0F014208, symbol: D_STAR_WOLF_F014208 } + +D_STAR_WOLF_F014310: + { type: GFX, offset: 0xF014310, symbol: D_STAR_WOLF_F014310 } + +D_STAR_WOLF_F014398: + { type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 32, offset: 0x0F014398, symbol: D_STAR_WOLF_F014398 } diff --git a/assets/yaml/us/rev1/ast_text.yaml b/assets/yaml/us/rev1/ast_text.yaml new file mode 100644 index 00000000..faaadd71 --- /dev/null +++ b/assets/yaml/us/rev1/ast_text.yaml @@ -0,0 +1,421 @@ +:config: + segments: + - [0x05, 0xCD2410] + header: + code: + - '#include "assets/ast_text.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + +# 0 (small) +aSmallText_0: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 8, offset: 0x5000000, symbol: aSmallText_0 } + +# 1 (small) +aSmallText_1: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 8, offset: 0x5000080, symbol: aSmallText_1 } + +# 2 (small) +aSmallText_2: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 8, offset: 0x5000100, symbol: aSmallText_2 } + +# 3 (small) +aSmallText_3: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 8, offset: 0x5000180, symbol: aSmallText_3 } + +# 4 (small) +aSmallText_4: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 8, offset: 0x5000200, symbol: aSmallText_4 } + +# 5 (small) +aSmallText_5: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 8, offset: 0x5000280, symbol: aSmallText_5 } + +# 6 (small) +aSmallText_6: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 8, offset: 0x5000300, symbol: aSmallText_6 } + +# 7 (small) +aSmallText_7: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 8, offset: 0x5000380, symbol: aSmallText_7 } + +# 8 (small) +aSmallText_8: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 8, offset: 0x5000400, symbol: aSmallText_8 } + +# 9 (small) +aSmallText_9: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 8, offset: 0x5000480, symbol: aSmallText_9 } + +# Mission No. +aTextMissionNo: + { type: TEXTURE, ctype: u8, format: IA8, width: 112, height: 19, offset: 0x5000500, symbol: aTextMissionNo } + +# Training +aTextTraining: + { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 12, offset: 0x5000D50, symbol: aTextTraining } + +# Enemies Down +aTextEnemiesDown: + { type: TEXTURE, ctype: u8, format: IA8, width: 64, height: 25, offset: 0x5001110, symbol: aTextEnemiesDown } + +# Accumulated Total +aTextAccumTotal: + { type: TEXTURE, ctype: u8, format: IA8, width: 128, height: 10, offset: 0x5001750, symbol: aTextAccumTotal } + +# Status of Team +aTextStatusOfTeam: + { type: TEXTURE, ctype: u8, format: IA8, width: 120, height: 12, offset: 0x5001C50, symbol: aTextStatusOfTeam } + +# End +aTextEnd: + { type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 8, offset: 0x50021F0, symbol: aTextEnd } + +# ACCOM +aTextACCOM: + { type: TEXTURE, ctype: u8, format: IA8, width: 120, height: 23, offset: 0x50022F0, symbol: aTextACCOM } + +# PLISHED +aTextPLISHED: + { type: TEXTURE, ctype: u8, format: IA8, width: 136, height: 23, offset: 0x5002DC0, symbol: aTextPLISHED } + +# MISSION +aTextMISSION: + { type: TEXTURE, ctype: u8, format: IA8, width: 128, height: 23, offset: 0x5003A00, symbol: aTextMISSION } + +# COMP +aTextCOMP: + { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 23, offset: 0x5004580, symbol: aTextCOMP } + +# LETE +aTextLETE: + { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 21, offset: 0x5004E20, symbol: aTextLETE } + +# THE END +aText_THE_END: + { type: TEXTURE, ctype: u8, format: IA8, width: 192, height: 30, offset: 0x50054B0, symbol: aText_THE_END } + +# Falco +aTextFalco: + { type: TEXTURE, ctype: u8, format: IA8, width: 48, height: 8, offset: 0x5006B30, symbol: aTextFalco } + +# Peppy +aTextPeppy: + { type: TEXTURE, ctype: u8, format: IA8, width: 48, height: 10, offset: 0x5006CB0, symbol: aTextPeppy } + +# Slippy +aTextSlippy: + { type: TEXTURE, ctype: u8, format: IA8, width: 56, height: 10, offset: 0x5006E90, symbol: aTextSlippy } + +# A (small) +aSmallText_A: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x50070C0, symbol: aSmallText_A } + +# B (small) +aSmallText_B: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5007100, symbol: aSmallText_B } + +# ! (small) +aSmallTextExclamMark: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5007140, symbol: aSmallTextExclamMark } + +# C (small) +aSmallText_C: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5007180, symbol: aSmallText_C } + +# D (small) +aSmallText_D: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x50071C0, symbol: aSmallText_D } + +# E (small) +aSmallText_E: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5007200, symbol: aSmallText_E } + +# 1 (large) Used in the ending: 1997 +sLargeText_1997_1: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5007240, symbol: sLargeText_1997_1 } + +# 7 (large) Used in the ending: 1997 +sLargeText_1997_7: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5007330, symbol: sLargeText_1997_7 } + +# 9 (large) Used in the ending: 1997 +sLargeText_1997_9: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5007420, symbol: sLargeText_1997_9 } + +# F (small) +aSmallText_F: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5007510, symbol: aSmallText_F } + +# G (small) +aSmallText_G: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5007550, symbol: aSmallText_G } + +# H (small) +aSmallText_H: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5007590, symbol: aSmallText_H } + +# I (small) +aSmallText_I: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x50075D0, symbol: aSmallText_I } + +# J (small) +aSmallText_J: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5007610, symbol: aSmallText_J } + +# K (small) +aSmallText_K: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5007650, symbol: aSmallText_K } + +# 完 (Japanese kanji meaning COMPLETE) +aTextKanjiCOMPLETE: + { type: TEXTURE, ctype: u8, format: IA8, width: 48, height: 47, offset: 0x5007690, symbol: aTextKanjiCOMPLETE } + +# L (small) +aSmallText_L: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5007F60, symbol: aSmallText_L } + +# M (small) +aSmallText_M: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5007FA0, symbol: aSmallText_M } + +# N (small) +aSmallText_N: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5007FE0, symbol: aSmallText_N } + +# A (large) +aLargeText_A: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5008020, symbol: aLargeText_A } + +# B (large) +aLargeText_B: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5008110, symbol: aLargeText_B } + +# C (large) +aLargeText_C: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5008200, symbol: aLargeText_C } + +# D (large) +aLargeText_D: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x50082F0, symbol: aLargeText_D } + +# E (large) +aLargeText_E: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x50083E0, symbol: aLargeText_E } + +# F (large) +aLargeText_F: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x50084D0, symbol: aLargeText_F } + +# G (large) +aLargeText_G: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x50085C0, symbol: aLargeText_G } + +# H (large) +aLargeText_H: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x50086B0, symbol: aLargeText_H } + +# I (large) +aLargeText_I: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x50087A0, symbol: aLargeText_I } + +# J (large) +aLargeText_J: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5008890, symbol: aLargeText_J } + +# K (large) +aLargeText_K: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5008980, symbol: aLargeText_K } + +# L (large) +aLargeText_L: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5008A70, symbol: aLargeText_L } + +# M (large) +aLargeText_M: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5008B60, symbol: aLargeText_M } + +# N (large) +aLargeText_N: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5008C50, symbol: aLargeText_N } + +# O (large) +aSmallText_O: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5008D40, symbol: aSmallText_O } + +# P (large) +aLargeText_P: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5008E30, symbol: aLargeText_P } + +# Q (large) +aLargeText_Q: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5008F20, symbol: aLargeText_Q } + +# R (large) +aLargeText_R: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5009010, symbol: aLargeText_R } + +# S (large) +aLargeText_S: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5009100, symbol: aLargeText_S } + +# T (large) +aLargeText_T: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x50091F0, symbol: aLargeText_T } + +# U (large) +aLargeText_U: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x50092E0, symbol: aLargeText_U } + +# V (large) +aLargeText_V: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x50093D0, symbol: aLargeText_V } + +# W (large) +aLargeText_W: + { type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 15, offset: 0x50094C0, symbol: aLargeText_W } + +# X (large) +aLargeText_X: + { type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 15, offset: 0x50096A0, symbol: aLargeText_X } + +# Y (large) +aLargeText_Y: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5009880, symbol: aLargeText_Y } + +# - (large) +aLargeText_HYPHEN: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5009970, symbol: aLargeText_HYPHEN } + +# Z (large) +aLargeText_Z: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5009A60, symbol: aLargeText_Z } + +# s (large) +aLargeText_s_: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5009B50, symbol: aLargeText_s_ } + +# t (large) +aLargeText_t_: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5009C40, symbol: aLargeText_t_ } + +# o (small) +aSmallText_o_: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5009D30, symbol: aSmallText_o_ } + +# p (small) +aSmallText_p: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5009D70, symbol: aSmallText_p } + +# . (large) +aLargeText_DOT: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5009DB0, symbol: aLargeText_DOT } + +# q (small) +aSmallText_q: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5009EA0, symbol: aSmallText_q } + +# r (small) +aSmallText_r: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5009EE0, symbol: aSmallText_r } + +# s (small) +aSmallText_s: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x5009F20, symbol: aSmallText_s } + +# 0 (large) +aLargeText_0: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x5009F60, symbol: aLargeText_0 } + +# 1 (large) +aLargeText_1: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x500A050, symbol: aLargeText_1 } + +# 2 (large) +aLargeText_2: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x500A140, symbol: aLargeText_2 } + +# 3 (large) +aLargeText_3: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x500A230, symbol: aLargeText_3 } + +# 4 (large) +aLargeText_4: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x500A320, symbol: aLargeText_4 } + +# 5 (large) +aLargeText_5: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x500A410, symbol: aLargeText_5 } + +# 6 (large) +aLargeText_6: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x500A500, symbol: aLargeText_6 } + +# 7 (large) +aLargeText_7: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x500A5F0, symbol: aLargeText_7 } + +# 8 (large) +aLargeText_8: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x500A6E0, symbol: aLargeText_8 } + +# 9 (large) +aLargeText_9: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 15, offset: 0x500A7D0, symbol: aLargeText_9 } + +# 終 (Japanese kanji meaning END) +aTextKanji_END: + { type: TEXTURE, ctype: u8, format: IA8, width: 56, height: 49, offset: 0x500A8C0, symbol: aTextKanji_END } + +# T (small) +aSmallText_T: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x500B380, symbol: aSmallText_T } + +# . (small) +aSmallText_DOT: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x500B3C0, symbol: aSmallText_DOT } + +# : (small) +aSmallText_COLON: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x500B400, symbol: aSmallText_COLON } + +# U (small) +aSmallText_U: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x500B440, symbol: aSmallText_U } + +# V (small) +aSmallText_V: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x500B480, symbol: aSmallText_V } + +# W (small) +aSmallText_W: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x500B4C0, symbol: aSmallText_W } + +# X (small) +aSmallText_X: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x500B500, symbol: aSmallText_X } + +# Y (small) +aSmallText_Y: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x500B540, symbol: aSmallText_Y } + +# - (small) +aSmallText_HYPHEN: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x500B580, symbol: aSmallText_HYPHEN } + +# Z (small) +aSmallText_Z: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x500B5C0, symbol: aSmallText_Z } + +# Wrench DisplayList (Teammate in maintenance state) +aDownWrenchDL: + { type: GFX, offset: 0x500B600, symbol: aDownWrenchDL } + +# Wrench Texture +aDownWrenchTexture: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 32, offset: 0x0500B768, tlut: 0x0500B868, symbol: aDownWrenchTexture } + +# Wrench TLUT +aDownWrenchTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x0500B868, symbol: aDownWrenchTLUT } \ No newline at end of file diff --git a/assets/yaml/us/rev1/ast_titania.yaml b/assets/yaml/us/rev1/ast_titania.yaml new file mode 100644 index 00000000..63bf8435 --- /dev/null +++ b/assets/yaml/us/rev1/ast_titania.yaml @@ -0,0 +1,188 @@ +:config: + segments: + - [0x06, 0x9D2FD0] + header: + code: + - '#include "assets/ast_titania.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + - '#include "sf64level.h"' + - '#include "sf64event.h"' + - '#include "sf64player.h"' + - '#include "sf64audio_external.h"' + - '#include "sf64mesg.h"' + +D_TI_6000000: + {type: TEXTURE, format: IA8, ctype: u8, width: 96, height: 28, offset: 0x6000000, symbol: D_TI_6000000} + +D_TI_6000A80: + {type: GFX, offset: 0x6000A80, symbol: D_TI_6000A80} + +D_TI_6000B10: + {type: TEXTURE, format: RGBA16, ctype: u16, width: 64, height: 32, offset: 0x6000B10, symbol: D_TI_6000B10} + +D_TI_6001B10: + {type: GFX, offset: 0x6001B10, symbol: D_TI_6001B10} + +D_TI_6001BA8: + {type: TEXTURE, format: RGBA16, ctype: u16, width: 32, height: 32, offset: 0x6001BA8, symbol: D_TI_6001BA8} + +D_TI_60023B0: + {type: GFX, offset: 0x60023B0, symbol: D_TI_60023B0} + +D_TI_6002438: + {type: TEXTURE, format: RGBA16, ctype: u16, width: 32, height: 64, offset: 0x6002438, symbol: D_TI_6002438} + +D_TI_6003440: + {type: GFX, offset: 0x6003440, symbol: D_TI_6003440} + +D_TI_60034E0: + {type: GFX, offset: 0x60034E0, symbol: D_TI_60034E0} + +D_TI_6003580: + {type: GFX, offset: 0x6003580, symbol: D_TI_6003580} + +D_TI_6003620: + {type: GFX, offset: 0x6003620, symbol: D_TI_6003620} + +D_TI_60036C0: + {type: GFX, offset: 0x60036C0, symbol: D_TI_60036C0} + +D_TI_6003760: + {type: GFX, offset: 0x6003760, symbol: D_TI_6003760} + +D_TI_6003800: + {type: TEXTURE, format: IA8, ctype: u8, width: 32, height: 32, offset: 0x6003800, symbol: D_TI_6003800} + +D_TI_6003C00: + {type: TEXTURE, format: IA8, ctype: u8, width: 32, height: 32, offset: 0x6003C00, symbol: D_TI_6003C00} + +D_TI_6004000: + {type: TEXTURE, format: IA8, ctype: u8, width: 32, height: 32, offset: 0x6004000, symbol: D_TI_6004000} + +D_TI_6004400: + {type: TEXTURE, format: IA8, ctype: u8, width: 32, height: 32, offset: 0x6004400, symbol: D_TI_6004400} + +D_TI_6004800: + {type: TEXTURE, format: IA8, ctype: u8, width: 32, height: 32, offset: 0x6004800, symbol: D_TI_6004800} + +D_TI_6004C00: + {type: TEXTURE, format: IA8, ctype: u8, width: 32, height: 32, offset: 0x6004C00, symbol: D_TI_6004C00} + +D_TI_6005000: + {type: SF64:ENVIRONMENT, offset: 0x6005000, symbol: D_TI_6005000} + +D_TI_600631C: + {type: SF64:SCRIPT, offset: 0x600631C, symbol: D_TI_600631C} + +D_TI_60064AC: + {type: SF64:HITBOX, offset: 0x60064AC, symbol: D_TI_60064AC} + +D_TI_60064C8: + {type: SF64:HITBOX, offset: 0x60064C8, symbol: D_TI_60064C8} + +D_TI_60064FC: + {type: SF64:HITBOX, offset: 0x60064FC, symbol: D_TI_60064FC} + +D_TI_6006518: + {type: SF64:HITBOX, offset: 0x6006518, symbol: D_TI_6006518} + +D_TI_6006564: + {type: SF64:HITBOX, offset: 0x6006564, symbol: D_TI_6006564} + +D_TI_60065B0: + {type: SF64:HITBOX, offset: 0x60065B0, symbol: D_TI_60065B0} + +D_TI_60065FC: + {type: SF64:HITBOX, offset: 0x60065FC, symbol: D_TI_60065FC} + +D_TI_6006648: + {type: SF64:HITBOX, offset: 0x6006648, symbol: D_TI_6006648} + +D_TI_6006694: + {type: SF64:HITBOX, offset: 0x6006694, symbol: D_TI_6006694} + +D_TI_60066E0: + {type: SF64:HITBOX, offset: 0x60066E0, symbol: D_TI_60066E0} + +D_TI_600672C: + {type: SF64:HITBOX, offset: 0x600672C, symbol: D_TI_600672C} + +D_TI_6006778: + {type: SF64:HITBOX, offset: 0x6006778, symbol: D_TI_6006778} + +D_TI_60067C4: + {type: SF64:HITBOX, offset: 0x60067C4, symbol: D_TI_60067C4} + +D_TI_6006808: + {type: SF64:HITBOX, offset: 0x6006808, symbol: D_TI_6006808} + +D_TI_6006A3C: + {type: SF64:HITBOX, offset: 0x6006A3C, symbol: D_TI_6006A3C} + +D_TI_600683C: + {type: SF64:HITBOX, offset: 0x600683C, symbol: D_TI_600683C} + +D_TI_6006858: + {type: SF64:HITBOX, offset: 0x6006858, symbol: D_TI_6006858} + +D_TI_6006874: + {type: SF64:HITBOX, offset: 0x6006874, symbol: D_TI_6006874} + +D_TI_6006890: + {type: SF64:HITBOX, offset: 0x6006890, symbol: D_TI_6006890} + +D_TI_60068BC: + {type: SF64:HITBOX, offset: 0x60068BC, symbol: D_TI_60068BC} + +D_TI_60068F0: + {type: SF64:HITBOX, offset: 0x60068F0, symbol: D_TI_60068F0} + +D_TI_6006940: + {type: SF64:HITBOX, offset: 0x6006940, symbol: D_TI_6006940} + +D_TI_600695C: + {type: SF64:HITBOX, offset: 0x600695C, symbol: D_TI_600695C} + +D_TI_6006978: + {type: SF64:HITBOX, offset: 0x6006978, symbol: D_TI_6006978} + +D_TI_6006994: + {type: SF64:HITBOX, offset: 0x6006994, symbol: D_TI_6006994} + +D_TI_60069B0: + {type: SF64:HITBOX, offset: 0x60069B0, symbol: D_TI_60069B0} + +D_TI_60069CC: + {type: SF64:HITBOX, offset: 0x60069CC, symbol: D_TI_60069CC} + +D_TI_60069E8: + {type: SF64:HITBOX, offset: 0x60069E8, symbol: D_TI_60069E8} + +D_TI_6006A04: + {type: SF64:HITBOX, offset: 0x6006A04, symbol: D_TI_6006A04} + +D_TI_6006A20: + {type: SF64:HITBOX, offset: 0x6006A20, symbol: D_TI_6006A20} + +D_TI_6006BF0: + {type: SF64:HITBOX, offset: 0x6006BF0, symbol: D_TI_6006BF0} + +D_TI_6006924: + {type: SF64:HITBOX, offset: 0x6006924, symbol: D_TI_6006924} + +D_TI_6006C0C: + {type: SF64:HITBOX, offset: 0x6006C0C, symbol: D_TI_6006C0C} + +D_TI_6006C28: + {type: SF64:HITBOX, offset: 0x6006C28, symbol: D_TI_6006C28} + +D_TI_6006C44: + {type: SF64:HITBOX, offset: 0x6006C44, symbol: D_TI_6006C44} + +D_TI_6006C60: + {type: SF64:OBJECT_INIT, offset: 0x6006C60, symbol: D_TI_6006C60} + +D_TI_6009BB8: + {type: TEXTURE, format: RGBA16, ctype: u16, width: 32, height: 32, offset: 0x6009BB8, symbol: D_TI_6009BB8} diff --git a/assets/yaml/us/rev1/ast_title.yaml b/assets/yaml/us/rev1/ast_title.yaml new file mode 100644 index 00000000..a369b62e --- /dev/null +++ b/assets/yaml/us/rev1/ast_title.yaml @@ -0,0 +1,263 @@ +:config: + segments: + - [0x06, 0xBFC510] + header: + code: + - '#include "assets/ast_title.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + +starfox_logo: { type: TEXTURE, ctype: u16, format: RGBA16, width: 236, height: 60, offset: 0x6000000, symbol: gTitleStarfoxLogo } + +nintendo64_logo: { type: TEXTURE, ctype: u16, format: RGBA16, width: 128, height: 88, offset: 0x6006EA0, symbol: gTitleNintendo64Logo } + +radio_static: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x600C6A0, symbol: gTitleRadioStatic } + +sun_beam: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x600D5C0, symbol: gTitleSunBeam } + +nintendo_copyright: { type: TEXTURE, ctype: u8, format: IA8, width: 120, height: 12, offset: 0x600DDC0, symbol: gTitleNintendoCopyright } + +press_start: { type: TEXTURE, ctype: u8, format: IA8, width: 120, height: 13, offset: 0x600E360, symbol: gTitlePressStart } + +great_fox_card: { type: TEXTURE, ctype: u8, format: IA8, width: 144, height: 28, offset: 0x600E980, symbol: gTitleGreatFoxCard } + +slippy_card: { type: TEXTURE, ctype: u8, format: IA8, width: 144, height: 13, offset: 0x600F940, symbol: gTitleSlippyCard } + +peppy_card: { type: TEXTURE, ctype: u8, format: IA8, width: 120, height: 13, offset: 0x6010090, symbol: gTitlePeppyCard } + +falco_card: { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 13, offset: 0x60106B0, symbol: gTitleFalcoCard } + +fox_card: { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 13, offset: 0x6010FA0, symbol: gTitleFoxCard } + +arwing_card: { type: TEXTURE, ctype: u8, format: IA8, width: 112, height: 26, offset: 0x6011890, symbol: gTitleArwingCard } + +no_controller: { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 24, offset: 0x60123F0, symbol: gTitleNoController } + +copyright_symbol: { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x6013470, symbol: gTitleCopyrightSymbol } + +unused_nintendo_copyright: { type: TEXTURE, ctype: u8, format: IA8, width: 168, height: 18, offset: 0x6013570, symbol: gTitleUnusedNintendoCopyright } + +starfox_text_intro: { type: TEXTURE, ctype: u8, format: CI4, width: 256, height: 13, offset: 0x6014140, tlut: 0x60147C0, symbol: gTextIntroStarfox } + +starfox_text_intro_palette: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x60147C0, symbol: gTextIntroStarfoxPalette } + +in_text_intro: { type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 13, offset: 0x60147E0, tlut: 0x60147C0, symbol: gTextIntroIn } + +in_text_intro_palette: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x60148B0, symbol: gTextIntroInPalette } + +D_TITLE_60148D0: { type: GFX, offset: 0x60148D0, symbol: D_TITLE_60148D0 } + +D_TITLE_6014DE8: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x6014DE8, tlut: 0x60155E8, symbol: D_TITLE_6014DE8 } + +D_TITLE_60155E8: { type: TEXTURE, ctype: u16, format: TLUT, colors: 152, offset: 0x60155E8, symbol: D_TITLE_60155E8 } + +D_TITLE_6015718: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 63, offset: 0x6015718, tlut: 0x6015EF8, symbol: D_TITLE_6015718 } + +D_TITLE_6015EF8: { type: TEXTURE, ctype: u16, format: TLUT, colors: 64, offset: 0x6015EF8, symbol: D_TITLE_6015EF8 } + +D_TITLE_6015F78: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x6015F78, tlut: 0x6016778, symbol: D_TITLE_6015F78 } + +D_TITLE_6016778: { type: TEXTURE, ctype: u16, format: TLUT, colors: 200, offset: 0x6016778, symbol: D_TITLE_6016778 } + +D_TITLE_6016908: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 63, offset: 0x6016908, tlut: 0x60170E8, symbol: D_TITLE_6016908 } + +D_TITLE_60170E8: { type: TEXTURE, ctype: u16, format: TLUT, colors: 144, offset: 0x60170E8, symbol: D_TITLE_60170E8 } + +D_TITLE_6017208: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x6017208, tlut: 0x6017A08, symbol: D_TITLE_6017208 } + +D_TITLE_6017A08: { type: TEXTURE, ctype: u16, format: TLUT, colors: 136, offset: 0x6017A08, symbol: D_TITLE_6017A08 } + +D_TITLE_6017B18: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x6017B18, tlut: 0x6018318, symbol: D_TITLE_6017B18 } + +D_TITLE_6018318: { type: TEXTURE, ctype: u16, format: TLUT, colors: 200, offset: 0x6018318, symbol: D_TITLE_6018318 } + +D_TITLE_60184A8: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x60184A8, tlut: 0x6018CA8, symbol: D_TITLE_60184A8 } + +D_TITLE_6018CA8: { type: TEXTURE, ctype: u16, format: TLUT, colors: 76, offset: 0x6018CA8, symbol: D_TITLE_6018CA8 } + +D_TITLE_6018D40: { type: GFX, offset: 0x6018D40, symbol: D_TITLE_6018D40 } + +D_TITLE_60195C0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60195C0, symbol: D_TITLE_60195C0 } + +D_TITLE_6019DC0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6019DC0, symbol: D_TITLE_6019DC0 } + +D_TITLE_601A5C0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x601A5C0, symbol: D_TITLE_601A5C0 } + +D_TITLE_601B5C0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x601B5C0, symbol: D_TITLE_601B5C0 } + +D_TITLE_601B7C0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x601B7C0, symbol: D_TITLE_601B7C0 } + +D_TITLE_601BFC0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x601BFC0, symbol: D_TITLE_601BFC0 } + +D_TITLE_601C7C0: { type: GFX, offset: 0x601C7C0, symbol: D_TITLE_601C7C0 } + +D_TITLE_601CCD0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x601CCD0, symbol: D_TITLE_601CCD0 } + +D_TITLE_601CED0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x601CED0, symbol: D_TITLE_601CED0 } + +D_TITLE_601CF50: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x601CF50, symbol: D_TITLE_601CF50 } + +D_TITLE_601D750: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x601D750, tlut: 0x601DB50, symbol: D_TITLE_601D750 } + +D_TITLE_601DB50: { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x601DB50, symbol: D_TITLE_601DB50 } + +D_TITLE_601E424: { type: SF64:ANIM, offset: 0x601E424, symbol: D_TITLE_601E424 } + +D_TITLE_601E430: { type: GFX, offset: 0x601E430, symbol: D_TITLE_601E430 } + +D_TITLE_601E720: { type: GFX, offset: 0x601E720, symbol: D_TITLE_601E720 } + +D_TITLE_601EA00: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x601EA00, symbol: D_TITLE_601EA00 } + +D_TITLE_601F200: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x601F200, symbol: D_TITLE_601F200 } + +D_TITLE_601F400: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x601F400, symbol: D_TITLE_601F400 } + +D_TITLE_601F8E0: { type: SF64:ANIM, offset: 0x601F8E0, symbol: D_TITLE_601F8E0 } + +D_TITLE_6020058: { type: SF64:ANIM, offset: 0x6020058, symbol: D_TITLE_6020058 } + +D_TITLE_60214F8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x60214F8, symbol: D_TITLE_60214F8 } + +D_TITLE_6021D10: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6021D10, symbol: D_TITLE_6021D10 } + +D_TITLE_6021F10: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6021F10, symbol: D_TITLE_6021F10 } + +D_TITLE_6022B40: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6022B40, symbol: D_TITLE_6022B40 } + +D_TITLE_6023340: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6023340, symbol: D_TITLE_6023340 } + +D_TITLE_6023B40: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6023B40, symbol: D_TITLE_6023B40 } + +D_TITLE_6024340: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6024340, symbol: D_TITLE_6024340 } + +D_TITLE_60246F8: { type: SF64:ANIM, offset: 0x60246F8, symbol: D_TITLE_60246F8 } + +D_TITLE_60257A8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x60257A8, symbol: D_TITLE_60257A8 } + +D_TITLE_60259A8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x60259A8, symbol: D_TITLE_60259A8 } + +D_TITLE_6025BA8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6025BA8, symbol: D_TITLE_6025BA8 } + +D_TITLE_6025DA8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6025DA8, symbol: D_TITLE_6025DA8 } + +D_TITLE_6025FA8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6025FA8, symbol: D_TITLE_6025FA8 } + +D_TITLE_6026D28: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6026D28, symbol: D_TITLE_6026D28 } + +D_TITLE_6026F28: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6026F28, symbol: D_TITLE_6026F28 } + +D_TITLE_6028508: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6028508, symbol: D_TITLE_6028508 } + +D_TITLE_6028708: { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x6028708, symbol: D_TITLE_6028708 } + +D_TITLE_6028788: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6028788, symbol: D_TITLE_6028788 } + +D_TITLE_6028988: { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x6028988, symbol: D_TITLE_6028988 } + +D_TITLE_6028A08: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6028A08, symbol: D_TITLE_6028A08 } + +D_TITLE_6028C08: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6028C08, symbol: D_TITLE_6028C08 } + +D_TITLE_6029BE4: { type: SF64:ANIM, offset: 0x6029BE4, symbol: D_TITLE_6029BE4 } + +D_TITLE_602A710: { type: SF64:ANIM, offset: 0x602A710, symbol: D_TITLE_602A710 } + +D_TITLE_602A720: { type: GFX, offset: 0x602A720, symbol: D_TITLE_602A720 } + +D_TITLE_602A8C0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x602A8C0, symbol: D_TITLE_602A8C0 } + +D_TITLE_602B8C0: { type: GFX, offset: 0x602B8C0, symbol: D_TITLE_602B8C0 } + +D_TITLE_602D930: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x602D930, symbol: D_TITLE_602D930 } + +D_TITLE_602DB30: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x602DB30, symbol: D_TITLE_602DB30 } + +D_TITLE_602DD30: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x602DD30, symbol: D_TITLE_602DD30 } + +D_TITLE_602DF30: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x602DF30, symbol: D_TITLE_602DF30 } + +D_TITLE_602E380: { type: GFX, offset: 0x602E380, symbol: D_TITLE_602E380 } + +D_TITLE_602E550: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x602E550, symbol: D_TITLE_602E550 } + +D_TITLE_602F8E0: { type: SF64:ANIM, offset: 0x602F8E0, symbol: D_TITLE_602F8E0 } + +D_TITLE_602FBAC: {type: SF64:SKELETON, offset: 0x602FBAC, symbol: D_TITLE_602FBAC} + +D_TITLE_60305C0: { type: SF64:ANIM, offset: 0x60305C0, symbol: D_TITLE_60305C0 } + +D_TITLE_603088C: {type: SF64:SKELETON, offset: 0x603088C, symbol: D_TITLE_603088C} + +D_TITLE_6031120: { type: SF64:ANIM, offset: 0x6031120, symbol: D_TITLE_6031120 } + +D_TITLE_60313AC: {type: SF64:SKELETON, offset: 0x60313AC, symbol: D_TITLE_60313AC} + +D_TITLE_6031DB8: { type: SF64:ANIM, offset: 0x6031DB8, symbol: D_TITLE_6031DB8 } + +D_TITLE_6032084: {type: SF64:SKELETON, offset: 0x6032084, symbol: D_TITLE_6032084} + +D_TITLE_60320E0: { type: GFX, offset: 0x60320E0, symbol: D_TITLE_60320E0 } + +D_TITLE_6032178: {type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 32, offset: 0x6032178, symbol: D_TITLE_6032178} + +D_TITLE_6032580: { type: GFX, offset: 0x6032580, symbol: D_TITLE_6032580 } + +D_TITLE_6032608: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6032608, symbol: D_TITLE_6032608 } + +D_TITLE_60338DC: { type: SF64:ANIM, offset: 0x60338DC, symbol: D_TITLE_60338DC } + +D_TITLE_6035024: { type: SF64:ANIM, offset: 0x6035024, symbol: D_TITLE_6035024 } + +D_TITLE_603531C: { type: SF64:ANIM, offset: 0x603531C, symbol: D_TITLE_603531C } + +D_TITLE_6036278: { type: SF64:ANIM, offset: 0x6036278, symbol: D_TITLE_6036278 } + +D_TITLE_6036290: { type: GFX, offset: 0x6036290, symbol: D_TITLE_6036290 } + +D_TITLE_6036328: { type: TEXTURE, ctype: u16, format: IA16, width: 32, height: 32, offset: 0x6036328, symbol: D_TITLE_6036328 } + +D_TITLE_6036B30: { type: GFX, offset: 0x6036B30, symbol: D_TITLE_6036B30 } + +D_TITLE_6036BC8: { type: TEXTURE, ctype: u16, format: IA16, width: 32, height: 32, offset: 0x6036BC8, symbol: D_TITLE_6036BC8 } + +D_TITLE_6037CF0: { type: GFX, offset: 0x6037CF0, symbol: D_TITLE_6037CF0 } + +D_TITLE_60380D0: {type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x60380D0, symbol: D_TITLE_60380D0} + +D_TITLE_60390D0: {type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x60390D0, symbol: D_TITLE_60390D0} + +D_TITLE_603A0D0: {type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x603A0D0, symbol: D_TITLE_603A0D0} + +D_TITLE_603B0D0: {type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x603B0D0, symbol: D_TITLE_603B0D0} + +D_TITLE_603C0D0: {type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x603C0D0, symbol: D_TITLE_603C0D0} + +D_TITLE_603D0D0: {type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x603D0D0, symbol: D_TITLE_603D0D0} + +D_TITLE_603E0D0: {type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x603E0D0, symbol: D_TITLE_603E0D0} + +D_TITLE_603F0D0: {type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x603F0D0, symbol: D_TITLE_603F0D0} + +D_TITLE_60408C0: { type: GFX, offset: 0x60408C0, symbol: D_TITLE_60408C0 } + +D_TITLE_6041070: { type: GFX, offset: 0x6041070, symbol: D_TITLE_6041070 } + +D_TITLE_60410F8: {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60410F8, symbol: D_TITLE_60410F8} + +D_TITLE_6041CF0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6041CF0, symbol: D_TITLE_6041CF0 } + +D_TITLE_60426E0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x60426E0, symbol: D_TITLE_60426E0 } + +D_TITLE_6043F68: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6043F68, symbol: D_TITLE_6043F68 } + +D_TITLE_60456C0: { type: GFX, offset: 0x60456C0, symbol: D_TITLE_60456C0 } + +D_TITLE_6045A28: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x6045A28, symbol: D_TITLE_6045A28} +D_TITLE_6046A28: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x6046A28, symbol: D_TITLE_6046A28} +D_TITLE_6047A28: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x6047A28, symbol: D_TITLE_6047A28} +D_TITLE_6048A28: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x6048A28, symbol: D_TITLE_6048A28} +D_TITLE_6049A28: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x6049A28, symbol: D_TITLE_6049A28} +D_TITLE_604AA28: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x604AA28, symbol: D_TITLE_604AA28} +D_TITLE_604BA28: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x604BA28, symbol: D_TITLE_604BA28} \ No newline at end of file diff --git a/assets/yaml/us/rev1/ast_training.yaml b/assets/yaml/us/rev1/ast_training.yaml new file mode 100644 index 00000000..3a064e81 --- /dev/null +++ b/assets/yaml/us/rev1/ast_training.yaml @@ -0,0 +1,88 @@ +:config: + segments: + - [0x6, 0xDDC010] + header: + code: + - '#include "assets/ast_training.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + - '#include "sf64level.h"' + - '#include "sf64event.h"' + - '#include "sf64player.h"' + - '#include "sf64audio_external.h"' + - '#include "sf64mesg.h"' + +D_TR_6000000: + { type: TEXTURE, format: IA8, offset: 0x6000000, width: 96, height: 12, ctype: u8, symbol: D_TR_6000000 } + +D_TR_6000480: + { type: TEXTURE, format: IA8, offset: 0x6000480, width: 96, height: 12, ctype: u8, symbol: D_TR_6000480 } + +D_TR_6000900: + { type: TEXTURE, format: RGBA16, offset: 0x6000900, width: 44, height: 44, ctype: u16, symbol: D_TR_6000900 } + +D_TR_6001820: + { type: TEXTURE, format: RGBA16, offset: 0x6001820, width: 44, height: 44, ctype: u16, symbol: D_TR_6001820 } + +D_TR_6002740: + { type: GFX, offset: 0x6002740, symbol: D_TR_6002740 } + +D_TR_60028F0: + { type: TEXTURE, format: RGBA16, offset: 0x060028F0, width: 32, height: 32, ctype: u16, symbol: D_TR_60028F0 } + +D_TR_60030F0: + { type: GFX, offset: 0x60030F0, symbol: D_TR_60030F0 } + +D_TR_6003360: + { type: TEXTURE, format: RGBA16, offset: 0x06003360, width: 16, height: 16, ctype: u16, symbol: D_TR_6003360 } + +D_TR_6003560: + { type: TEXTURE, format: RGBA16, offset: 0x06003560, width: 16, height: 16, ctype: u16, symbol: D_TR_6003560 } + +D_TR_6003760: + { type: GFX, offset: 0x6003760, symbol: D_TR_6003760 } + +D_TR_6003878: + { type: TEXTURE, format: RGBA16, offset: 0x06003878, width: 64, height: 32, ctype: u16, symbol: D_TR_6003878 } + +D_TR_6004878: + { type: TEXTURE, format: RGBA16, offset: 0x06004878, width: 64, height: 32, ctype: u16, symbol: D_TR_6004878 } + +D_TR_6005880: + { type: GFX, offset: 0x6005880, symbol: D_TR_6005880 } + +D_TR_6005938: + { type: TEXTURE, format: RGBA16, offset: 0x06005938, width: 32, height: 32, ctype: u16, symbol: D_TR_6005938 } + +gItemTrainingRingDL: + { type: GFX, offset: 0x6006140, symbol: gItemTrainingRingDL } + +D_TR_6006958: + { type: TEXTURE, format: RGBA16, offset: 0x06006958, width: 8, height: 8, ctype: u16, symbol: D_TR_6006958 } + +D_TR_60069D8: + { type: TEXTURE, format: RGBA16, offset: 0x060069D8, width: 8, height: 8, ctype: u16, symbol: D_TR_60069D8 } + +D_TR_6006A60: + { type: SF64:ENVIRONMENT, offset: 0x6006A60, symbol: D_TR_6006A60 } + +D_TR_6006AA4: + { type: SF64:OBJECT_INIT, offset: 0x6006AA4, symbol: D_TR_6006AA4 } + +D_TR_6008EF8: + { type: SF64:OBJECT_INIT, offset: 0x6008EF8, symbol: D_TR_6008EF8 } + +D_TR_6009B34: + { type: SF64:SCRIPT, offset: 0x6009B34, symbol: D_TR_6009B34 } + +D_TR_6009CC4: + { type: SF64:HITBOX, offset: 0x6009CC4, symbol: D_TR_6009CC4 } + +D_TR_6009CFC: + { type: SF64:HITBOX, offset: 0x6009CFC, symbol: D_TR_6009CFC } + +D_TR_6009D18: + { type: SF64:HITBOX, offset: 0x6009D18, symbol: D_TR_6009D18 } + +# size = 0x9D40 \ No newline at end of file diff --git a/assets/yaml/us/rev1/ast_ve1_boss.yaml b/assets/yaml/us/rev1/ast_ve1_boss.yaml new file mode 100644 index 00000000..14a29c08 --- /dev/null +++ b/assets/yaml/us/rev1/ast_ve1_boss.yaml @@ -0,0 +1,243 @@ +:config: + segments: + - [0x09, 0xAE60A0] + header: + code: + - '#include "assets/ast_ve1_boss.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + +D_VE1_9000000: + {type: GFX, offset: 0x9000000, symbol: D_VE1_9000000} + +D_VE1_90003E8: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x90003E8, symbol: D_VE1_90003E8} + +D_VE1_90005E8: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x90005E8, symbol: D_VE1_90005E8} + +D_VE1_90007F0: + {type: GFX, offset: 0x90007F0, symbol: D_VE1_90007F0} + +D_VE1_9000AF0: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x9000AF0, symbol: D_VE1_9000AF0} + +D_VE1_90012F0: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x90012F0, symbol: D_VE1_90012F0} + +D_VE1_9002CD8: + {type: SF64:ANIM, offset: 0x9002CD8, symbol: D_VE1_9002CD8} + +D_VE1_9002CF0: + {type: GFX, offset: 0x9002CF0, symbol: D_VE1_9002CF0} + +D_VE1_9002F30: + {type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x9002F30, symbol: D_VE1_9002F30, tlut: 0x9003330} + +D_VE1_9003330: + {type: TEXTURE, ctype: u16, format: TLUT, colors: 176, offset: 0x9003330, symbol: D_VE1_9003330} + +D_VE1_9003490: + {type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x9003490, symbol: D_VE1_9003490, tlut: 0x9003890} + +D_VE1_9003890: + {type: TEXTURE, ctype: u16, format: TLUT, colors: 176, offset: 0x9003890, symbol: D_VE1_9003890} + +D_VE1_90039F0: + {type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x90039F0, symbol: D_VE1_90039F0, tlut: 0x9003DF0} + +D_VE1_9003DF0: + {type: TEXTURE, ctype: u16, format: TLUT, colors: 176, offset: 0x9003DF0, symbol: D_VE1_9003DF0} + +D_VE1_9003F50: + {type: GFX, offset: 0x9003F50, symbol: D_VE1_9003F50} + +D_VE1_9004478: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 32, offset: 0x9004478, symbol: D_VE1_9004478} + +D_VE1_9004878: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x9004878, symbol: D_VE1_9004878} + +D_VE1_9005078: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 32, offset: 0x9005078, symbol: D_VE1_9005078} + +D_VE1_9005478: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x9005478, symbol: D_VE1_9005478} + +D_VE1_9005C80: + {type: GFX, offset: 0x9005C80, symbol: D_VE1_9005C80} + +D_VE1_9009700: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x9009700, symbol: D_VE1_9009700} + +D_VE1_9009F00: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 32, offset: 0x9009F00, symbol: D_VE1_9009F00} + +D_VE1_900A300: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x900A300, symbol: D_VE1_900A300} + +D_VE1_900AB00: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 32, offset: 0x900AB00, symbol: D_VE1_900AB00} + +D_VE1_900AF00: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x900AF00, symbol: D_VE1_900AF00} + +D_VE1_900B700: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x900B700, symbol: D_VE1_900B700} + +D_VE1_900BF00: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x900BF00, symbol: D_VE1_900BF00} + +D_VE1_900C700: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x900C700, symbol: D_VE1_900C700} + +D_VE1_900D098: + {type: SF64:ANIM, offset: 0x900D098, symbol: D_VE1_900D098} + +D_VE1_900D164: + {type: SF64:SKELETON, offset: 0x900D164, symbol: D_VE1_900D164} + +D_VE1_900D180: + {type: GFX, offset: 0x900D180, symbol: D_VE1_900D180} + +D_VE1_900D520: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x900D520, symbol: D_VE1_900D520} + +D_VE1_900DD20: + {type: GFX, offset: 0x900DD20, symbol: D_VE1_900DD20} + +D_VE1_900DF20: + {type: GFX, offset: 0x900DF20, symbol: D_VE1_900DF20} + +D_VE1_900DFB8: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x900DFB8, symbol: D_VE1_900DFB8} + +D_VE1_900EFC0: + {type: GFX, offset: 0x900EFC0, symbol: D_VE1_900EFC0} + +D_VE1_900F060: + {type: GFX, offset: 0x900F060, symbol: D_VE1_900F060} + +D_VE1_900F1D0: + {type: GFX, offset: 0x900F1D0, symbol: D_VE1_900F1D0} + +D_VE1_9010FC4: + {type: SF64:ANIM, offset: 0x9010FC4, symbol: D_VE1_9010FC4} + +D_VE1_9010FD0: + {type: GFX, offset: 0x9010FD0, symbol: D_VE1_9010FD0} + +D_VE1_9011200: + {type: GFX, offset: 0x9011200, symbol: D_VE1_9011200} + +D_VE1_9011980: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x9011980, symbol: D_VE1_9011980} + +D_VE1_9012180: + {type: GFX, offset: 0x9012180, symbol: D_VE1_9012180} + +D_VE1_90123C0: + {type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 16, offset: 0x90123C0, symbol: D_VE1_90123C0, tlut: 0x90125C0} + +D_VE1_90125C0: + {type: TEXTURE, ctype: u16, format: TLUT, colors: 160, offset: 0x90125C0, symbol: D_VE1_90125C0} + +D_VE1_9013880: + {type: GFX, offset: 0x9013880, symbol: D_VE1_9013880} + +D_VE1_9013C20: + {type: GFX, offset: 0x9013C20, symbol: D_VE1_9013C20} + +D_VE1_9014DF0: + {type: GFX, offset: 0x9014DF0, symbol: D_VE1_9014DF0} + +D_VE1_90150A0: + {type: GFX, offset: 0x90150A0, symbol: D_VE1_90150A0} + +D_VE1_9015480: + {type: GFX, offset: 0x9015480, symbol: D_VE1_9015480} + +D_VE1_9015900: + {type: GFX, offset: 0x9015900, symbol: D_VE1_9015900} + +D_VE1_9015BB0: + {type: GFX, offset: 0x9015BB0, symbol: D_VE1_9015BB0} + +D_VE1_9018BD0: + {type: SF64:ANIM, offset: 0x9018BD0, symbol: D_VE1_9018BD0} + +D_VE1_901A4B8: + {type: SF64:ANIM, offset: 0x901A4B8, symbol: D_VE1_901A4B8} + +D_VE1_901BDA8: + {type: SF64:ANIM, offset: 0x901BDA8, symbol: D_VE1_901BDA8} + +D_VE1_901C0F4: + {type: SF64:SKELETON, offset: 0x901C0F4, symbol: D_VE1_901C0F4} + +D_VE1_901DA38: + {type: SF64:ANIM, offset: 0x901DA38, symbol: D_VE1_901DA38} + +D_VE1_901DA50: + {type: GFX, offset: 0x901DA50, symbol: D_VE1_901DA50} + +D_VE1_901DC90: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 32, offset: 0x901DC90, symbol: D_VE1_901DC90} + +D_VE1_901E350: + {type: GFX, offset: 0x901E350, symbol: D_VE1_901E350} + +D_VE1_901F6D0: + {type: GFX, offset: 0x901F6D0, symbol: D_VE1_901F6D0} + +D_VE1_901F990: + {type: GFX, offset: 0x901F990, symbol: D_VE1_901F990} + +D_VE1_901FC40: + {type: GFX, offset: 0x901FC40, symbol: D_VE1_901FC40} + +D_VE1_901FFB0: + {type: GFX, offset: 0x901FFB0, symbol: D_VE1_901FFB0} + +D_VE1_9020E30: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x9020E30, symbol: D_VE1_9020E30} + +D_VE1_9021630: + {type: GFX, offset: 0x9021630, symbol: D_VE1_9021630} + +D_VE1_9021900: + {type: GFX, offset: 0x9021900, symbol: D_VE1_9021900} + +D_VE1_9021B80: + {type: GFX, offset: 0x9021B80, symbol: D_VE1_9021B80} + +D_VE1_9022820: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x9022820, symbol: D_VE1_9022820} + +D_VE1_9022A20: + {type: GFX, offset: 0x9022A20, symbol: D_VE1_9022A20} + +D_VE1_9022D80: + {type: GFX, offset: 0x9022D80, symbol: D_VE1_9022D80} + +D_VE1_9023290: + {type: GFX, offset: 0x9023290, symbol: D_VE1_9023290} + +D_VE1_90234D0: + {type: GFX, offset: 0x90234D0, symbol: D_VE1_90234D0} + +D_VE1_9023880: + {type: GFX, offset: 0x9023880, symbol: D_VE1_9023880} + +D_VE1_9023AD0: + {type: GFX, offset: 0x9023AD0, symbol: D_VE1_9023AD0} + +D_VE1_9024738: + {type: SF64:ANIM, offset: 0x9024738, symbol: D_VE1_9024738} + +D_VE1_9024750: + {type: GFX, offset: 0x9024750, symbol: D_VE1_9024750} + +D_VE1_9024940: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 4, height: 4, offset: 0x9024940, symbol: D_VE1_9024940} diff --git a/assets/yaml/us/rev1/ast_venom_1.yaml b/assets/yaml/us/rev1/ast_venom_1.yaml new file mode 100644 index 00000000..96722e97 --- /dev/null +++ b/assets/yaml/us/rev1/ast_venom_1.yaml @@ -0,0 +1,182 @@ +:config: + segments: + - [0x6, 0xAB4000] + header: + code: + - '#include "assets/ast_venom_1.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + - '#include "sf64level.h"' + - '#include "sf64event.h"' + - '#include "sf64player.h"' + - '#include "sf64audio_external.h"' + - '#include "sf64mesg.h"' + +D_VE1_6000000: + { type: TEXTURE, format: IA8, width: 96, height: 28, offset: 0x6000000, ctype: u8, symbol: D_VE1_6000000 } + +D_VE1_6000A80: + { type: TEXTURE, format: IA8, width: 40, height: 19, offset: 0x6000A80, ctype: u8, symbol: D_VE1_6000A80 } + +D_VE1_6000D80: + { type: TEXTURE, format: IA8, width: 128, height: 28, offset: 0x6000D80, ctype: u8, symbol: D_VE1_6000D80 } + +D_VE1_6001B80: + { type: TEXTURE, format: IA8, width: 128, height: 19, offset: 0x6001B80, ctype: u8, symbol: D_VE1_6001B80 } + +D_VE1_6002500: + { type: GFX, offset: 0x6002500, symbol: D_VE1_6002500 } + +D_VE1_60029F8: + { type: TEXTURE, format: CI8, width: 8, height: 16, offset: 0x60029F8, tlut: 0x6002A78, ctype: u8, symbol: D_VE1_60029F8 } + +D_VE1_6002A78: + { type: TEXTURE, format: TLUT, colors: 24, offset: 0x6002A78, ctype: u16, symbol: D_VE1_6002A78 } + +D_VE1_6002AA8: + { type: TEXTURE, format: CI8, width: 32, height: 32, offset: 0x6002AA8, tlut: 0x6002EA8, ctype: u8, symbol: D_VE1_6002AA8 } + +D_VE1_6002EA8: + { type: TEXTURE, format: TLUT, colors: 232, offset: 0x6002EA8, ctype: u16, symbol: D_VE1_6002EA8 } + +D_VE1_6003078: + { type: TEXTURE, format: CI8, width: 32, height: 32, offset: 0x6003078, tlut: 0x6003478, ctype: u8, symbol: D_VE1_6003078 } + +D_VE1_6003478: + { type: TEXTURE, format: TLUT, colors: 204, offset: 0x6003478, ctype: u16, symbol: D_VE1_6003478 } + +D_VE1_6003610: + { type: GFX, offset: 0x6003610, symbol: D_VE1_6003610 } + +D_VE1_6003B10: + { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6003B10, ctype: u16, symbol: D_VE1_6003B10 } + +D_VE1_6004310: + { type: GFX, offset: 0x6004310, symbol: D_VE1_6004310 } + +D_VE1_60043F0: + { type: GFX, offset: 0x60043F0, symbol: D_VE1_60043F0 } + +D_VE1_60044D0: + { type: TEXTURE, format: CI8, width: 16, height: 16, offset: 0x60044D0, tlut: 0x60045D0, ctype: u8, symbol: D_VE1_60044D0 } + +D_VE1_60045D0: + { type: TEXTURE, format: TLUT, colors: 144, offset: 0x60045D0, ctype: u16, symbol: D_VE1_60045D0 } + +D_VE1_60046F0: + { type: GFX, offset: 0x60046F0, symbol: D_VE1_60046F0 } + +D_VE1_6004780: + { type: TEXTURE, format: RGBA16, width: 64, height: 32, offset: 0x6004780, ctype: u16, symbol: D_VE1_6004780 } + +D_VE1_6005780: + { type: GFX, offset: 0x6005780, symbol: D_VE1_6005780 } + +D_VE1_6005E50: + { type: TEXTURE, format: TLUT, colors: 160, offset: 0x6005E50, ctype: u16, symbol: D_VE1_6005E50 } + +D_VE1_6005D50: + { type: TEXTURE, format: CI8, width: 16, height: 16, offset: 0x6005D50, tlut: 0x6005E50, ctype: u8, symbol: D_VE1_6005D50 } + +D_VE1_6005F90: + { type: TEXTURE, format: CI8, width: 32, height: 32, offset: 0x6005F90, tlut: 0x6006390, ctype: u8, symbol: D_VE1_6005F90 } + +D_VE1_6006390: + { type: TEXTURE, format: TLUT, colors: 208, offset: 0x6006390, ctype: u16, symbol: D_VE1_6006390 } + +D_VE1_6006530: + { type: TEXTURE, format: CI8, width: 16, height: 16, offset: 0x6006530, ctype: u8, symbol: D_VE1_6006530 } + +D_VE1_6006630: + { type: TEXTURE, format: TLUT, colors: 80, offset: 0x6006630, ctype: u16, symbol: D_VE1_6006630 } + +D_VE1_60066D0: + { type: GFX, offset: 0x60066D0, symbol: D_VE1_60066D0 } + +D_VE1_6006750: + { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6006750, ctype: u16, symbol: D_VE1_6006750 } + +D_VE1_6006F50: + { type: GFX, offset: 0x6006F50, symbol: D_VE1_6006F50 } + +D_VE1_6007410: + { type: GFX, offset: 0x6007410, symbol: D_VE1_6007410 } + +D_VE1_60074E8: + { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x60074E8, ctype: u16, symbol: D_VE1_60074E8 } + +D_VE1_6007CF0: + { type: GFX, offset: 0x6007CF0, symbol: D_VE1_6007CF0 } + +D_VE1_6007D90: + { type: GFX, offset: 0x6007D90, symbol: D_VE1_6007D90 } + +D_VE1_6007E30: + { type: SF64:ENVIRONMENT, offset: 0x6007E30, symbol: D_VE1_6007E30 } + +D_VE1_6007E74: + { type: SF64:OBJECT_INIT, offset: 0x6007E74, symbol: D_VE1_6007E74 } + +D_VE1_601B1E4: + { type: SF64:SCRIPT, offset: 0x601B1E4, symbol: D_VE1_601B1E4 } + +D_VE1_6010088: + { type: SF64:OBJECT_INIT, offset: 0x6010088, symbol: D_VE1_6010088 } + +D_VE1_601B43C: + { type: SF64:HITBOX, offset: 0x601B43C, symbol: D_VE1_601B43C } + +D_VE1_601B474: + { type: SF64:HITBOX, offset: 0x601B474, symbol: D_VE1_601B474 } + +D_VE1_601B4C4: + { type: SF64:HITBOX, offset: 0x601B4C4, symbol: D_VE1_601B4C4 } + +D_VE1_601B4E0: + { type: SF64:HITBOX, offset: 0x601B4E0, symbol: D_VE1_601B4E0 } + +D_VE1_601B4FC: + { type: SF64:HITBOX, offset: 0x601B4FC, symbol: D_VE1_601B4FC } + +D_VE1_601B518: + { type: SF64:HITBOX, offset: 0x601B518, symbol: D_VE1_601B518 } + +D_VE1_601B584: + { type: SF64:HITBOX, offset: 0x601B584, symbol: D_VE1_601B584 } + +D_VE1_601B5F4: + { type: SF64:HITBOX, offset: 0x601B5F4, symbol: D_VE1_601B5F4 } + +D_VE1_601B644: + { type: SF64:HITBOX, offset: 0x601B644, symbol: D_VE1_601B644 } + +D_VE1_601B678: + { type: SF64:HITBOX, offset: 0x601B678, symbol: D_VE1_601B678 } + +D_VE1_601B6C4: + { type: SF64:HITBOX, offset: 0x601B6C4, symbol: D_VE1_601B6C4 } + +D_VE1_601B710: + { type: SF64:HITBOX, offset: 0x601B710, symbol: D_VE1_601B710 } + +D_VE1_601B75C: + { type: SF64:HITBOX, offset: 0x601B75C, symbol: D_VE1_601B75C } + +D_VE1_601B7F8: + { type: SF64:HITBOX, offset: 0x601B7F8, symbol: D_VE1_601B7F8 } + +D_VE1_601B830: + { type: SF64:HITBOX, offset: 0x601B830, symbol: D_VE1_601B830 } + +D_VE1_601B868: + { type: SF64:HITBOX, offset: 0x601B868, symbol: D_VE1_601B868 } + +D_VE1_601B8A0: + { type: SF64:HITBOX, offset: 0x601B8A0, symbol: D_VE1_601B8A0 } + +D_VE1_601B8D8: + { type: SF64:HITBOX, offset: 0x601B8D8, symbol: D_VE1_601B8D8 } + +D_VE1_601B944: + { type: SF64:HITBOX, offset: 0x601B944, symbol: D_VE1_601B944 } \ No newline at end of file diff --git a/assets/yaml/us/rev1/ast_venom_2.yaml b/assets/yaml/us/rev1/ast_venom_2.yaml new file mode 100644 index 00000000..26d37d60 --- /dev/null +++ b/assets/yaml/us/rev1/ast_venom_2.yaml @@ -0,0 +1,205 @@ +:config: + segments: + - [0x6, 0xACF960] + header: + code: + - '#include "assets/ast_venom_2.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + - '#include "sf64level.h"' + - '#include "sf64event.h"' + - '#include "sf64player.h"' + - '#include "sf64audio_external.h"' + +D_VE2_6000000: + { type: TEXTURE, format: IA8, width: 96, height: 28, offset: 0x6000000, ctype: u8, symbol: D_VE2_6000000 } + +D_VE2_6000A80: + { type: TEXTURE, format: IA8, width: 112, height: 19, offset: 0x6000A80, ctype: u8, symbol: D_VE2_6000A80 } + +D_VE2_60012D0: + { type: TEXTURE, format: IA8, width: 128, height: 28, offset: 0x60012D0, ctype: u8, symbol: D_VE2_60012D0 } + +D_VE2_60020D0: + { type: TEXTURE, format: IA8, width: 104, height: 19, offset: 0x60020D0, ctype: u8, symbol: D_VE2_60020D0 } + +D_VE2_6002890: + { type: TEXTURE, format: IA8, width: 16, height: 16, offset: 0x6002890, ctype: u8, symbol: D_VE2_6002890 } + +D_VE2_6002990: + { type: GFX, offset: 0x6002990, symbol: D_VE2_6002990 } + +D_VE2_6003000: + { type: GFX, offset: 0x6003000, symbol: D_VE2_6003000 } + +D_VE2_60038E0: + { type: GFX, offset: 0x60038E0, symbol: D_VE2_60038E0 } + +D_VE2_6003970: + { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6003970, ctype: u16, symbol: D_VE2_6003970 } + +D_VE2_6004170: + { type: GFX, offset: 0x6004170, symbol: D_VE2_6004170 } + +D_VE2_6004888: + { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6004888, ctype: u16, symbol: D_VE2_6004888 } + +D_VE2_6005088: + { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6005088, ctype: u16, symbol: D_VE2_6005088 } + +D_VE2_6005888: + { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6005888, ctype: u16, symbol: D_VE2_6005888 } + +D_VE2_6006088: + { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6006088, ctype: u16, symbol: D_VE2_6006088 } + +D_VE2_60030D8: + { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x60030D8, ctype: u16, symbol: D_VE2_60030D8 } + +D_VE2_6006890: + { type: GFX, offset: 0x6006890, symbol: D_VE2_6006890 } + +D_VE2_6006E20: + { type: GFX, offset: 0x6006E20, symbol: D_VE2_6006E20 } + +D_VE2_6007650: + { type: GFX, offset: 0x6007650, symbol: D_VE2_6007650 } + +D_VE2_6007E20: + { type: GFX, offset: 0x6007E20, symbol: D_VE2_6007E20 } + +D_VE2_6008170: + { type: TEXTURE, format: RGBA16, width: 16, height: 16, offset: 0x6008170, ctype: u16, symbol: D_VE2_6008170 } + +D_VE2_6008370: + { type: GFX, offset: 0x6008370, symbol: D_VE2_6008370 } + +D_VE2_6008AF8: + { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6008AF8, ctype: u16, symbol: D_VE2_6008AF8 } + +D_VE2_6009300: + { type: GFX, offset: 0x6009300, symbol: D_VE2_6009300 } + +D_VE2_6009390: + { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6009390, ctype: u16, symbol: D_VE2_6009390 } + +D_VE2_6009B90: + { type: GFX, offset: 0x6009B90, symbol: D_VE2_6009B90 } + +D_VE2_6009E80: + { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6009E80, ctype: u16, symbol: D_VE2_6009E80 } + +D_VE2_600A680: + { type: GFX, offset: 0x600A680, symbol: D_VE2_600A680 } + +D_VE2_600B708: + { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x600B708, ctype: u16, symbol: D_VE2_600B708 } + +D_VE2_600C038: + { type: SF64:ANIM, offset: 0x600C038, symbol: D_VE2_600C038 } + +D_VE2_600C0A4: + { type: SF64:SKELETON, offset: 0x600C0A4, symbol: D_VE2_600C0A4 } + +D_VE2_600C200: + { type: SF64:ANIM, offset: 0x600C200, symbol: D_VE2_600C200 } + +D_VE2_600C2AC: + { type: SF64:SKELETON, offset: 0x600C2AC, symbol: D_VE2_600C2AC } + +D_VE2_600C2D0: + { type: GFX, offset: 0x600C2D0, symbol: D_VE2_600C2D0 } + +D_VE2_600C360: + { type: TEXTURE, format: RGBA16, width: 16, height: 16, offset: 0x600C360, ctype: u16, symbol: D_VE2_600C360 } + +D_VE2_600C560: + { type: GFX, offset: 0x600C560, symbol: D_VE2_600C560 } + +D_VE2_600C5F0: + { type: TEXTURE, format: RGBA16, width: 16, height: 16, offset: 0x600C5F0, ctype: u16, symbol: D_VE2_600C5F0 } + +D_VE2_600C7F0: + { type: GFX, offset: 0x600C7F0, symbol: D_VE2_600C7F0 } + +D_VE2_600C8F0: + { type: GFX, offset: 0x600C8F0, symbol: D_VE2_600C8F0 } + +D_VE2_600CA50: + { type: GFX, offset: 0x600CA50, symbol: D_VE2_600CA50 } + +D_VE2_600CBB0: + { type: GFX, offset: 0x600CBB0, symbol: D_VE2_600CBB0 } + +D_VE2_600D7F0: + { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x600D7F0, ctype: u16, symbol: D_VE2_600D7F0 } + +D_VE2_600DFF0: + { type: GFX, offset: 0x600DFF0, symbol: D_VE2_600DFF0 } + +D_VE2_600E3E0: + { type: GFX, offset: 0x600E3E0, symbol: D_VE2_600E3E0 } + +D_VE2_600E780: + { type: GFX, offset: 0x600E780, symbol: D_VE2_600E780 } + +D_VE2_600EB40: + { type: GFX, offset: 0x600EB40, symbol: D_VE2_600EB40 } + +D_VE2_600EEF0: + { type: GFX, offset: 0x600EEF0, symbol: D_VE2_600EEF0 } + +D_VE2_600F290: + { type: GFX, offset: 0x600F290, symbol: D_VE2_600F290 } + +D_VE2_600F670: + { type: GFX, offset: 0x600F670, symbol: D_VE2_600F670 } + +D_VE2_600F700: + { type: TEXTURE, format: RGBA16, width: 64, height: 32, offset: 0x600F700, ctype: u16, symbol: D_VE2_600F700 } + +D_VE2_6010700: + { type: GFX, offset: 0x6010700, symbol: D_VE2_6010700 } + +D_VE2_6010960: + { type: GFX, offset: 0x6010960, symbol: D_VE2_6010960 } + +D_VE2_6010CA0: + { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6010CA0, ctype: u16, symbol: D_VE2_6010CA0 } + +D_VE2_60114A0: + { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x60114A0, ctype: u16, symbol: D_VE2_60114A0 } + +D_VE2_6013AF8: + { type: TEXTURE, format: RGBA16, width: 16, height: 16, offset: 0x6013AF8, ctype: u16, symbol: D_VE2_6013AF8 } + +D_VE2_6014658: + { type: SF64:ANIM, offset: 0x6014658, symbol: D_VE2_6014658 } + +D_VE2_6014844: + { type: SF64:SKELETON, offset: 0x6014844, symbol: D_VE2_6014844 } + +D_VE2_6014904: + { type: SF64:ANIM, offset: 0x6014904, symbol: D_VE2_6014904 } + +D_VE2_60149D0: + { type: SF64:SKELETON, offset: 0x60149D0, symbol: D_VE2_60149D0 } + +D_VE2_6014D50: + { type: SF64:ENVIRONMENT, offset: 0x6014D50, symbol: D_VE2_6014D50 } + +D_VE2_6014D94: + { type: SF64:OBJECT_INIT, offset: 0x6014D94, symbol: D_VE2_6014D94 } + +D_VE2_6014FEC: + { type: SF64:COLPOLY, count: 250, offset: 0x6014FEC, symbol: D_VE2_6014FEC, mesh_symbol: D_VE2_OFFSET } + +D_VE2_601668C: + { type: SF64:HITBOX, offset: 0x601668C, symbol: D_VE2_601668C } + +D_VE2_60166F4: + { type: SF64:HITBOX, offset: 0x60166F4, symbol: D_VE2_60166F4 } + +D_VE2_6016714: + { type: SF64:HITBOX, offset: 0x6016714, symbol: D_VE2_6016714 } \ No newline at end of file diff --git a/assets/yaml/us/rev1/ast_versus.yaml b/assets/yaml/us/rev1/ast_versus.yaml new file mode 100644 index 00000000..f5961866 --- /dev/null +++ b/assets/yaml/us/rev1/ast_versus.yaml @@ -0,0 +1,763 @@ +:config: + segments: + - [0x03, 0x8E92D0] + header: + code: + - '#include "assets/ast_versus.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + - '#include "sf64level.h"' + - '#include "sf64event.h"' + - '#include "sf64player.h"' + - '#include "sf64audio_external.h"' + - '#include "sf64mesg.h"' + +D_versus_3000000: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x3000000, symbol: D_versus_3000000, tlut: 0x3000080 } +D_versus_3000080: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x3000080, symbol: D_versus_3000080 } + +D_versus_30000A0: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x30000A0, symbol: D_versus_30000A0, tlut: 0x30000A0 } +D_versus_3000120: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x3000120, symbol: D_versus_3000120 } + +D_versus_3000140: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x3000140, symbol: D_versus_3000140, tlut: 0x30001C0 } +D_versus_30001C0: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x30001C0, symbol: D_versus_30001C0 } + +D_versus_30001E0: + { type: TEXTURE, ctype: u8, format: CI4, width: 64, height: 13, offset: 0x30001E0, symbol: D_versus_30001E0, tlut: 0x3000380 } +D_versus_3000380: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x3000380, symbol: D_versus_3000380 } + +D_versus_30003A0: + { type: TEXTURE, ctype: u8, format: CI4, width: 64, height: 10, offset: 0x30003A0, symbol: D_versus_30003A0, tlut: 0x30004E0 } +D_versus_30004E0: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x30004E0, symbol: D_versus_30004E0 } + +BLOB_3000500: + { type: BLOB, size: 0x10, offset: 0x3000500, symbol: BLOB_3000500} # 17th color for D_versus_30004E0? + +D_versus_3000510: + { type: TEXTURE, ctype: u8, format: CI4, width: 80, height: 10, offset: 0x3000510, symbol: D_versus_3000510, tlut: 0x30006A0 } +D_versus_30006A0: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x30006A0, symbol: D_versus_30006A0 } + +BLOB_30006C0: + { type: BLOB, size: 0x10, offset: 0x30006C0, symbol: BLOB_30006C0} # 17th color for D_versus_30006A0? + +D_versus_30006D0: + { type: TEXTURE, ctype: u8, format: CI4, width: 64, height: 10, offset: 0x30006D0, symbol: D_versus_30006D0, tlut: 0x3000810 } +D_versus_3000810: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x3000810, symbol: D_versus_3000810 } + +BLOB_3000830: + { type: BLOB, size: 0x10, offset: 0x3000830, symbol: BLOB_3000830} # 17th color for D_versus_3000810? + +D_versus_3000840: + { type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 10, offset: 0x3000840, symbol: D_versus_3000840, tlut: 0x30008E0 } +D_versus_30008E0: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x30008E0, symbol: D_versus_30008E0 } + +D_versus_3000900: + { type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 15, offset: 0x3000900, symbol: D_versus_3000900, tlut: 0x30009F0 } +D_versus_30009F0: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x30009F0, symbol: D_versus_30009F0 } + +D_versus_3000A10: + { type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 15, offset: 0x3000A10, symbol: D_versus_3000A10, tlut: 0x3000B00 } +D_versus_3000B00: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x3000B00, symbol: D_versus_3000B00 } + +D_versus_3000B20: + { type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 5, offset: 0x3000B20, symbol: D_versus_3000B20 } + +D_versus_3000BC0: + { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 26, offset: 0x3000BC0, symbol: D_versus_3000BC0 } + +D_versus_30013E0: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x30013E0, symbol: D_versus_30013E0 } + +D_versus_3001420: + { type: TEXTURE, ctype: u8, format: CI8, width: 256, height: 42, offset: 0x3001420, symbol: D_versus_3001420, tlut: 0x3003E20 } +D_versus_3003E20: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 248, offset: 0x3003E20, symbol: D_versus_3003E20 } + +D_versus_3004010: + { type: TEXTURE, ctype: u8, format: CI8, width: 136, height: 25, offset: 0x3004010, symbol: D_versus_3004010, tlut: 0x3004D58 } +D_versus_3004D58: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 256, offset: 0x3004D58, symbol: D_versus_3004D58 } + +D_versus_3004F60: + { type: TEXTURE, ctype: u8, format: CI8, width: 152, height: 25, offset: 0x3004F60, symbol: D_versus_3004F60, tlut: 0x3005E38 } +D_versus_3005E38: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 256, offset: 0x3005E38, symbol: D_versus_3005E38 } + +D_versus_3006040: + { type: TEXTURE, ctype: u8, format: CI8, width: 104, height: 25, offset: 0x3006040, symbol: D_versus_3006040, tlut: 0x3006A68 } +D_versus_3006A68: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 248, offset: 0x3006A68, symbol: D_versus_3006A68 } + +D_versus_3006C60: + { type: TEXTURE, ctype: u8, format: CI8, width: 96, height: 23, offset: 0x3006C60, symbol: D_versus_3006C60, tlut: 0x3007500 } +D_versus_3007500: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 224, offset: 0x3007500, symbol: D_versus_3007500 } + +D_versus_30076C0: + { type: TEXTURE, ctype: u8, format: CI8, width: 152, height: 25, offset: 0x30076C0, symbol: D_versus_30076C0, tlut: 0x3008598 } +D_versus_3008598: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 256, offset: 0x3008598, symbol: D_versus_3008598 } + +D_versus_30087A0: + { type: TEXTURE, ctype: u8, format: CI8, width: 40, height: 40, offset: 0x30087A0, symbol: D_versus_30087A0, tlut: 0x3008DE0 } +D_versus_3008DE0: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 112, offset: 0x3008DE0, symbol: D_versus_3008DE0 } + +D_versus_3008EC0: + { type: TEXTURE, ctype: u8, format: CI8, width: 64, height: 40, offset: 0x3008EC0, symbol: D_versus_3008EC0, tlut: 0x30098C0 } +D_versus_30098C0: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 104, offset: 0x30098C0, symbol: D_versus_30098C0 } + +D_versus_3009990: + { type: TEXTURE, ctype: u8, format: CI8, width: 64, height: 40, offset: 0x3009990, symbol: D_versus_3009990, tlut: 0x300A390 } +D_versus_300A390: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 112, offset: 0x300A390, symbol: D_versus_300A390 } + +D_versus_300A470: + { type: TEXTURE, ctype: u8, format: CI8, width: 152, height: 23, offset: 0x300A470, symbol: D_versus_300A470, tlut: 0x300B218 } +D_versus_300B218: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 232, offset: 0x300B218, symbol: D_versus_300B218 } + +D_versus_300B3F0: + { type: TEXTURE, ctype: u8, format: CI8, width: 168, height: 25, offset: 0x300B3F0, symbol: D_versus_300B3F0, tlut: 0x300C458 } +D_versus_300C458: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 256, offset: 0x300C458, symbol: D_versus_300C458 } + +D_versus_300C660: + {type: TEXTURE, ctype: u8, format: CI8, width: 112, height: 25, offset: 0x300C660, symbol: D_versus_300C660, tlut: 0x300D150 } +D_versus_300D150: + {type: TEXTURE, ctype: u16, format: TLUT, colors: 251, offset: 0x300D150, symbol: D_versus_300D150 } + +D_versus_300D350: + { type: TEXTURE, ctype: u8, format: CI8, width: 24, height: 3, offset: 0x300D350, symbol: D_versus_300D350, tlut: 0x300D398 } +D_versus_300D398: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x300D398, symbol: D_versus_300D398 } + +D_versus_300D3C0: + { type: TEXTURE, ctype: u8, format: CI8, width: 24, height: 3, offset: 0x300D3C0, symbol: D_versus_300D3C0, tlut: 0x300D408 } +D_versus_300D408: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 24, offset: 0x300D408, symbol: D_versus_300D408 } + +D_versus_300D440: + { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 4, offset: 0x300D440, symbol: D_versus_300D440, tlut: 0x300D500 } +D_versus_300D500: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 40, offset: 0x300D500, symbol: D_versus_300D500 } + +D_versus_300D550: + { type: GFX, offset: 0x300D550, symbol: D_versus_300D550} +D_versus_300DE80: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x300DE80, symbol: D_versus_300DE80 } + +D_versus_300E080: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x300E080, symbol: D_versus_300E080 } + +D_versus_300E280: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 16, offset: 0x300E280, symbol: D_versus_300E280 } + +D_versus_300E680: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x300E680, symbol: D_versus_300E680 } + +D_versus_300E880: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x300E880, symbol: D_versus_300E880 } + +D_versus_300EA80: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x300EA80, symbol: D_versus_300EA80 } + +D_versus_300EC80: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x300EC80, symbol: D_versus_300EC80 } + +D_versus_300EE80: + { type: GFX, offset: 0x300EE80, symbol: D_versus_300EE80} + +D_versus_300FB80: + { type: GFX, offset: 0x300FB80, symbol: D_versus_300FB80} + +D_versus_3010690: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x3010690, symbol: D_versus_3010690 } + +D_versus_3010890: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x3010890, symbol: D_versus_3010890 } + +D_versus_3010A90: + { type: GFX, offset: 0x3010A90, symbol: D_versus_3010A90} + +D_versus_3011470: + { type: GFX, offset: 0x3011470, symbol: D_versus_3011470} + +D_versus_3011E40: + { type: GFX, offset: 0x3011E40, symbol: D_versus_3011E40} + +D_versus_3011ED0: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x3011ED0, symbol: D_versus_3011ED0 } + +D_versus_3012ED0: + { type: GFX, offset: 0x3012ED0, symbol: D_versus_3012ED0} + +D_versus_3013580: + { type: GFX, offset: 0x3013580, symbol: D_versus_3013580} + +D_versus_3013780: + { type: GFX, offset: 0x3013780, symbol: D_versus_3013780} + +D_versus_3013F50: + {type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x3013F50, symbol: D_versus_3013F50, tlut: 0x3014350 } +D_versus_3014350: + {type: TEXTURE, ctype: u16, format: TLUT, colors: 224, offset: 0x3014350, symbol: D_versus_3014350} + +D_versus_3014510: + {type: TEXTURE, ctype: u8, format: CI8, width: 8, height: 8, offset: 0x3014510, symbol: D_versus_3014510, tlut: 0x3014550 } +D_versus_3014550: + {type: TEXTURE, ctype: u16, format: TLUT, colors: 32, offset: 0x3014550, symbol: D_versus_3014550} + +D_versus_3014590: + {type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x3014590, symbol: D_versus_3014590, tlut: 0x3014690 } +D_versus_3014690: + {type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x3014690, symbol: D_versus_3014690} + +D_versus_30146B0: + { type: GFX, offset: 0x30146B0, symbol: D_versus_30146B0} + +D_versus_3014740: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x3014740, symbol: D_versus_3014740 } + +D_versus_3015740: + { type: GFX, offset: 0x3015740, symbol: D_versus_3015740} + +D_versus_3015898: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x3015898, symbol: D_versus_3015898 } + +D_versus_30160A0: + { type: GFX, offset: 0x30160A0, symbol: D_versus_30160A0} + +D_versus_30162F8: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x30162F8, symbol: D_versus_30162F8 } + +D_versus_3016B00: + { type: GFX, offset: 0x3016B00, symbol: D_versus_3016B00} + +D_versus_3016DC0: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x3016DC0, symbol: D_versus_3016DC0 } + +D_versus_3016FC0: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x3016FC0, symbol: D_versus_3016FC0 } + +D_versus_30171C0: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x30171C0, symbol: D_versus_30171C0 } + +D_versus_30173C0: + { type: GFX, offset: 0x30173C0, symbol: D_versus_30173C0} + +D_versus_30174E0: + { type: GFX, offset: 0x30174E0, symbol: D_versus_30174E0} + +D_versus_3017600: + { type: GFX, offset: 0x3017600, symbol: D_versus_3017600} + +D_versus_3017800: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x3017800, symbol: D_versus_3017800 } + +D_versus_3018000: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x3018000, symbol: D_versus_3018000 } + +D_versus_3018800: + { type: GFX, offset: 0x3018800, symbol: D_versus_3018800} + +D_versus_3018D60: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x3018D60, symbol: D_versus_3018D60 } + +D_versus_3019560: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x3019560, symbol: D_versus_3019560 } + +D_versus_3019D60: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x3019D60, symbol: D_versus_3019D60 } + +D_versus_301A560: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x301A560, symbol: D_versus_301A560 } + +D_versus_301AD60: + { type: GFX, offset: 0x301AD60, symbol: D_versus_301AD60} + +D_versus_301ADE8: + {type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x301ADE8, symbol: D_versus_301ADE8 } + +D_versus_301AEF0: + { type: GFX, offset: 0x301AEF0, symbol: D_versus_301AEF0} + +D_versus_301AF78: + {type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x301AF78, symbol: D_versus_301AF78 } + +D_versus_301B080: + { type: GFX, offset: 0x301B080, symbol: D_versus_301B080} + +D_versus_301B438: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x301B438, symbol: D_versus_301B438 } + +D_versus_301B640: + { type: GFX, offset: 0x301B640, symbol: D_versus_301B640} + +D_versus_301B6E0: + { type: GFX, offset: 0x301B6E0, symbol: D_versus_301B6E0} + +D_versus_301B768: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x301B768, symbol: D_versus_301B768 } + +D_versus_301C0A4: + { type: SF64:ANIM, offset: 0x301C0A4, symbol: D_versus_301C0A4} + +D_versus_301C3A8: + { type: SF64:ANIM, offset: 0x301C3A8, symbol: D_versus_301C3A8} + +D_versus_301C614: + { type: SF64:SKELETON, offset: 0x301C614, symbol: D_versus_301C614 } + +D_versus_301C79C: + { type: SF64:ANIM, offset: 0x301C79C, symbol: D_versus_301C79C } + +D_versus_301C9B0: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x301C9B0, symbol: D_versus_301C9B0 } + +D_versus_301CCE4: + { type: SF64:ANIM, offset: 0x301CCE4, symbol: D_versus_301CCE4} + +D_versus_301CFEC: + { type: SF64:ANIM, offset: 0x301CFEC, symbol: D_versus_301CFEC} + +D_versus_301D258: + { type: SF64:SKELETON, offset: 0x301D258, symbol: D_versus_301D258 } + +D_versus_301D3DC: + { type: SF64:ANIM, offset: 0x301D3DC, symbol: D_versus_301D3DC } + +D_versus_301D568: + { type: SF64:ANIM, offset: 0x301D568, symbol: D_versus_301D568 } + +D_versus_301D888: + { type: SF64:ANIM, offset: 0x301D888, symbol: D_versus_301D888} + +D_versus_301DB94: + { type: SF64:SKELETON, offset: 0x301DB94, symbol: D_versus_301DB94 } + +D_versus_301DD6C: + { type: SF64:ANIM, offset: 0x301DD6C, symbol: D_versus_301DD6C } + +D_versus_301DEA4: + { type: SF64:ANIM, offset: 0x301DEA4, symbol: D_versus_301DEA4} + +D_versus_301E19C: + { type: SF64:ANIM, offset: 0x301E19C, symbol: D_versus_301E19C} + +D_versus_301E3E8: + { type: SF64:SKELETON, offset: 0x301E3E8, symbol: D_versus_301E3E8 } + +D_versus_301E560: + { type: SF64:ANIM, offset: 0x301E560, symbol: D_versus_301E560} + +D_versus_301E570: + { type: GFX, offset: 0x301E570, symbol: D_versus_301E570} + +D_versus_301E5F8: + {type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x301E5F8, symbol: D_versus_301E5F8 } + +D_versus_301E700: + { type: GFX, offset: 0x301E700, symbol: D_versus_301E700} + +D_versus_301E788: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x301E788, symbol: D_versus_301E788 } + +D_versus_301E990: + { type: GFX, offset: 0x301E990, symbol: D_versus_301E990} + +D_versus_301EA18: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x301EA18, symbol: D_versus_301EA18 } + +D_versus_301EC20: + { type: GFX, offset: 0x301EC20, symbol: D_versus_301EC20} + +D_versus_301ECA8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x301ECA8, symbol: D_versus_301ECA8 } + +D_versus_301EEB0: + { type: GFX, offset: 0x301EEB0, symbol: D_versus_301EEB0} + +D_versus_301EF38: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x301EF38, symbol: D_versus_301EF38 } + +D_versus_301F140: + { type: GFX, offset: 0x301F140, symbol: D_versus_301F140} + +D_versus_301F2E0: + { type: GFX, offset: 0x301F2E0, symbol: D_versus_301F2E0} + +D_versus_301F368: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x301F368, symbol: D_versus_301F368 } + +D_versus_301F570: + { type: GFX, offset: 0x301F570, symbol: D_versus_301F570} + +D_versus_301F5F8: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x301F5F8, symbol: D_versus_301F5F8 } + +D_versus_301F800: + { type: GFX, offset: 0x301F800, symbol: D_versus_301F800} + +D_versus_301F888: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x301F888, symbol: D_versus_301F888 } + +D_versus_301FA90: + { type: GFX, offset: 0x301FA90, symbol: D_versus_301FA90} + +D_versus_301FB18: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x301FB18, symbol: D_versus_301FB18 } + +D_versus_301FD20: + { type: GFX, offset: 0x301FD20, symbol: D_versus_301FD20} + +D_versus_301FDA8: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x301FDA8, symbol: D_versus_301FDA8 } + +D_versus_301FFB0: + { type: GFX, offset: 0x301FFB0, symbol: D_versus_301FFB0} + +D_versus_3020048: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x3020048, symbol: D_versus_3020048 } + +D_versus_3020850: + { type: GFX, offset: 0x3020850, symbol: D_versus_3020850} + +D_versus_30208D8: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x30208D8, symbol: D_versus_30208D8 } + +D_versus_3020AE0: + { type: GFX, offset: 0x3020AE0, symbol: D_versus_3020AE0} + +D_versus_3020B78: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x3020B78, symbol: D_versus_3020B78 } + +D_versus_3020D80: + { type: GFX, offset: 0x3020D80, symbol: D_versus_3020D80} + +D_versus_3020E18: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x3020E18, symbol: D_versus_3020E18 } + +D_versus_3021620: + { type: GFX, offset: 0x3021620, symbol: D_versus_3021620} + +D_versus_30216B8: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x30216B8, symbol: D_versus_30216B8 } + +D_versus_30218C0: + { type: GFX, offset: 0x30218C0, symbol: D_versus_30218C0} + +D_versus_3021958: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x3021958, symbol: D_versus_3021958 } + +D_versus_3022160: + { type: GFX, offset: 0x3022160, symbol: D_versus_3022160} + +D_versus_30221E8: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x30221E8, symbol: D_versus_30221E8 } + +D_versus_30223F0: + { type: GFX, offset: 0x30223F0, symbol: D_versus_30223F0} + +D_versus_30226D0: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x30226D0, symbol: D_versus_30226D0 } + +D_versus_3022DE0: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x3022DE0, symbol: D_versus_3022DE0 } + +D_versus_3022E60: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x3022E60, symbol: D_versus_3022E60 } + +D_versus_3023238: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x3023238, symbol: D_versus_3023238 } + +D_versus_3023F68: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x3023F68, symbol: D_versus_3023F68 } + +D_versus_30242D0: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x30242D0, symbol: D_versus_30242D0 } + +D_versus_30246E8: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x30246E8, symbol: D_versus_30246E8 } + +D_versus_3024C30: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x3024C30, symbol: D_versus_3024C30 } + +D_versus_3025138: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x3025138, symbol: D_versus_3025138 } + +D_versus_3025938: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x3025938, symbol: D_versus_3025938 } + +D_versus_3025C68: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x3025C68, symbol: D_versus_3025C68 } + +D_versus_30261A0: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x30261A0, symbol: D_versus_30261A0 } + +D_versus_3026A38: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x3026A38, symbol: D_versus_3026A38 } + +D_versus_3026AB8: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x3026AB8, symbol: D_versus_3026AB8 } + +D_versus_3026B38: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x3026B38, symbol: D_versus_3026B38 } + +D_versus_3026BB8: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x3026BB8, symbol: D_versus_3026BB8 } + +D_versus_3026C38: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x3026C38, symbol: D_versus_3026C38 } + +D_versus_3026CB8: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 8, offset: 0x3026CB8, symbol: D_versus_3026CB8 } + +D_versus_3026DB8: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 8, offset: 0x3026DB8, symbol: D_versus_3026DB8 } + +D_versus_3026EB8: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x3026EB8, symbol: D_versus_3026EB8 } + +D_versus_3027268: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x3027268, symbol: D_versus_3027268 } + +D_versus_3028130: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 16, offset: 0x3028130, symbol: D_versus_3028130 } + +D_versus_3028230: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 16, offset: 0x3028230, symbol: D_versus_3028230 } + +D_versus_3028C60: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x3028C60, symbol: D_versus_3028C60 } + +D_versus_3028CE0: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x3028CE0, symbol: D_versus_3028CE0 } + +D_versus_3029160: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x3029160, symbol: D_versus_3029160 } + +D_versus_3029388: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x3029388, symbol: D_versus_3029388 } + +D_versus_302A0A0: + { type: GFX, offset: 0x302A0A0, symbol: D_versus_302A0A0} + +D_versus_302A138: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x302A138, symbol: D_versus_302A138 } + +D_versus_302A940: + { type: GFX, offset: 0x302A940, symbol: D_versus_302A940} + +D_versus_302A9C8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x302A9C8, symbol: D_versus_302A9C8 } + +D_versus_302ABD0: + { type: GFX, offset: 0x302ABD0, symbol: D_versus_302ABD0} + +D_versus_302AC68: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x302AC68, symbol: D_versus_302AC68 } + +D_versus_302B470: + { type: GFX, offset: 0x302B470, symbol: D_versus_302B470} + +D_versus_302B4F8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x302B4F8, symbol: D_versus_302B4F8 } + +D_versus_302B700: + { type: GFX, offset: 0x302B700, symbol: D_versus_302B700} + +D_versus_302B788: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x302B788, symbol: D_versus_302B788 } + +D_versus_302B890: + { type: GFX, offset: 0x302B890, symbol: D_versus_302B890} + +D_versus_302B918: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x302B918, symbol: D_versus_302B918 } + +D_versus_302BA20: + { type: GFX, offset: 0x302BA20, symbol: D_versus_302BA20} + +D_versus_302BAA8: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x302BAA8, symbol: D_versus_302BAA8 } + +D_versus_302BBB0: + { type: GFX, offset: 0x302BBB0, symbol: D_versus_302BBB0} + +D_versus_302BC38: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x302BC38, symbol: D_versus_302BC38 } + +D_versus_302BD40: + { type: GFX, offset: 0x302BD40, symbol: D_versus_302BD40} + +D_versus_302BDC8: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x302BDC8, symbol: D_versus_302BDC8 } + +D_versus_302BED0: + { type: GFX, offset: 0x302BED0, symbol: D_versus_302BED0} + +D_versus_302BF88: + { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x302BF88, symbol: D_versus_302BF88, tlut: 0x302C088 } + +D_versus_302C088: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 34, offset: 0x302C088, symbol: D_versus_302C088 } + +D_versus_302C0D0: + { type: GFX, offset: 0x302C0D0, symbol: D_versus_302C0D0} + +D_versus_302C188: + { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x302C188, symbol: D_versus_302C188, tlut: 0x302C288 } +D_versus_302C288: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 94, offset: 0x302C288, symbol: D_versus_302C288 } + +D_versus_302C350: + { type: GFX, offset: 0x302C350, symbol: D_versus_302C350} + +D_versus_302C408: + { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x302C408, symbol: D_versus_302C408, tlut: 0x302C508 } +D_versus_302C508: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 76, offset: 0x302C508, symbol: D_versus_302C508 } + +D_versus_302C5A0: + { type: GFX, offset: 0x302C5A0, symbol: D_versus_302C5A0} + +D_versus_302C658: + { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x302C658, symbol: D_versus_302C658, tlut: 0x302C758 } +D_versus_302C758: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 101, offset: 0x302C758, symbol: D_versus_302C758 } + +D_versus_302C830: + { type: GFX, offset: 0x302C830, symbol: D_versus_302C830} + +D_versus_302C8E8: + { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x302C8E8, symbol: D_versus_302C8E8, tlut: 0x302C9E8 } +D_versus_302C9E8: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 165, offset: 0x302C9E8, symbol: D_versus_302C9E8 } + +D_versus_302CB40: + { type: GFX, offset: 0x302CB40, symbol: D_versus_302CB40} + +D_versus_302CBF8: + { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x302CBF8, symbol: D_versus_302CBF8, tlut: 0x302CCF8 } +D_versus_302CCF8: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 158, offset: 0x302CCF8, symbol: D_versus_302CCF8 } + +D_versus_302CE40: + { type: GFX, offset: 0x302CE40, symbol: D_versus_302CE40} + +D_versus_302CEF8: + { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x302CEF8, symbol: D_versus_302CEF8, tlut: 0x302CFF8 } +D_versus_302CFF8: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 146, offset: 0x302CFF8, symbol: D_versus_302CFF8} + +D_versus_302D120: + { type: GFX, offset: 0x302D120, symbol: D_versus_302D120} + +D_versus_302D1B8: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x302D1B8, symbol: D_versus_302D1B8 } + +D_versus_302D240: + { type: GFX, offset: 0x302D240, symbol: D_versus_302D240} + +D_versus_302D2C8: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x302D2C8, symbol: D_versus_302D2C8 } + +D_versus_302D4D0: + { type: GFX, offset: 0x302D4D0, symbol: D_versus_302D4D0} + +D_versus_302D568: + {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x302D568, symbol: D_versus_302D568 } + +D_versus_302DD70: + { type: SF64:ENVIRONMENT, offset: 0x302DD70, symbol: D_versus_302DD70} + +D_versus_302DDB4: + { type: SF64:ENVIRONMENT, offset: 0x302DDB4, symbol: D_versus_302DDB4} + +D_versus_302DDF8: + { type: SF64:ENVIRONMENT, offset: 0x302DDF8, symbol: D_versus_302DDF8} + +D_versus_302DE3C: + { type: SF64:OBJECT_INIT, offset: 0x302DE3C, symbol: D_versus_302DE3C} + +D_versus_302E0E4: + { type: SF64:OBJECT_INIT, offset: 0x302E0E4, symbol: D_versus_302E0E4} + +D_versus_302E170: + { type: SF64:OBJECT_INIT, offset: 0x302E170, symbol: D_versus_302E170} + +D_versus_302E378: + { type: SF64:OBJECT_INIT, offset: 0x302E378, symbol: D_versus_302E378} + +D_versus_302ED4C: + { type: SF64:HITBOX, offset: 0x302ED4C, symbol: D_versus_302ED4C} + +D_versus_302ED98: + { type: SF64:HITBOX, offset: 0x302ED98, symbol: D_versus_302ED98} + +D_versus_302EDB4: + { type: SF64:HITBOX, offset: 0x302EDB4, symbol: D_versus_302EDB4} + +D_versus_302EE00: + { type: SF64:HITBOX, offset: 0x302EE00, symbol: D_versus_302EE00} + +D_versus_302EE64: + { type: SF64:HITBOX, offset: 0x302EE64, symbol: D_versus_302EE64} + +D_versus_302EE80: + { type: SF64:HITBOX, offset: 0x302EE80, symbol: D_versus_302EE80} + +D_versus_302EE9C: + { type: SF64:HITBOX, offset: 0x302EE9C, symbol: D_versus_302EE9C} + +D_versus_302EEE8: + { type: SF64:TRIANGLE, count: 4, offset: 0x302EEE8, symbol: D_versus_302EEE8, mesh_symbol: D_versus_OFFSET} + +D_versus_302EF6C: + { type: SF64:TRIANGLE, count: 4, offset: 0x302EF6C, symbol: D_versus_302EF6C, mesh_symbol: D_versus_OFFSET} + +D_versus_302EFF0: + { type: SF64:TRIANGLE, count: 4, offset: 0x302EFF0, symbol: D_versus_302EFF0, mesh_symbol: D_versus_OFFSET} + +D_versus_302F044: + { type: SF64:TRIANGLE, count: 14, offset: 0x302F044, symbol: D_versus_302F044, mesh_symbol: D_versus_OFFSET} + +D_versus_302E56C: + {type: VEC3F, count: 20, offset: 0x302E56C, symbol: D_versus_302E56C} + +D_versus_302E65C: + {type: VEC3F, count: 20, offset: 0x302E65C, symbol: D_versus_302E65C} + +D_versus_302E74C: + {type: VEC3F, count: 19, offset: 0x302E74C, symbol: D_versus_302E74C} + +D_versus_302E830: + {type: VEC3F, count: 25, offset: 0x302E830, symbol: D_versus_302E830} + +D_versus_302E95C: + {type: VEC3F, count: 20, offset: 0x302E95C, symbol: D_versus_302E95C} + +D_versus_302EA4C: + {type: VEC3F, count: 20, offset: 0x302EA4C, symbol: D_versus_302EA4C} + +D_versus_302EB3C: + {type: VEC3F, count: 19, offset: 0x302EB3C, symbol: D_versus_302EB3C} + +D_versus_302EC20: + {type: VEC3F, count: 25, offset: 0x302EC20, symbol: D_versus_302EC20} + \ No newline at end of file diff --git a/assets/yaml/us/rev1/ast_vs_menu.yaml b/assets/yaml/us/rev1/ast_vs_menu.yaml new file mode 100644 index 00000000..28cd189e --- /dev/null +++ b/assets/yaml/us/rev1/ast_vs_menu.yaml @@ -0,0 +1,207 @@ +:config: + segments: + - [0x07, 0xCBFE70] + header: + code: + - '#include "assets/ast_vs_menu.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + +D_VS_MENU_7000000: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 13, offset: 0x7000000, symbol: D_VS_MENU_7000000} + +D_VS_MENU_70000D0: + { type: TEXTURE, ctype: u8, format: IA8, width: 24, height: 13, offset: 0x70000D0, symbol: D_VS_MENU_70000D0} + +D_VS_MENU_7000210: + { type: TEXTURE, ctype: u8, format: IA8, width: 24, height: 13, offset: 0x7000210, symbol: D_VS_MENU_7000210} + +D_VS_MENU_7000350: + { type: TEXTURE, ctype: u8, format: IA8, width: 24, height: 13, offset: 0x7000350, symbol: D_VS_MENU_7000350} + +D_VS_MENU_7000490: + { type: TEXTURE, ctype: u8, format: IA8, width: 64, height: 42, offset: 0x7000490, symbol: D_VS_MENU_7000490} + +D_VS_MENU_7000F10: + { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 7, offset: 0x7000F10, symbol: D_VS_MENU_7000F10} + +D_VS_MENU_7001030: + { type: TEXTURE, ctype: u8, format: IA8, width: 64, height: 9, offset: 0x7001030, symbol: D_VS_MENU_7001030} + +D_VS_MENU_7001270: + { type: TEXTURE, ctype: u8, format: IA8, width: 112, height: 12, offset: 0x7001270, symbol: D_VS_MENU_7001270} + +D_VS_MENU_70017B0: + { type: TEXTURE, ctype: u8, format: IA8, width: 56, height: 10, offset: 0x70017B0, symbol: D_VS_MENU_70017B0} + +D_VS_MENU_70019E0: + { type: TEXTURE, ctype: u8, format: IA8, width: 56, height: 10, offset: 0x70019E0, symbol: D_VS_MENU_70019E0} + +D_VS_MENU_7001C10: + { type: TEXTURE, ctype: u8, format: IA8, width: 48, height: 10, offset: 0x7001C10, symbol: D_VS_MENU_7001C10} + +D_VS_MENU_7001DF0: + { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 10, offset: 0x7001DF0, symbol: D_VS_MENU_7001DF0} + +D_VS_MENU_7002110: + { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 12, offset: 0x7002110, symbol: D_VS_MENU_7002110} + +D_VS_MENU_70024D0: + { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 15, offset: 0x70024D0, symbol: D_VS_MENU_70024D0} + +D_VS_MENU_7002730: + { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 15, offset: 0x7002730, symbol: D_VS_MENU_7002730} + +D_VS_MENU_7002990: + { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 15, offset: 0x7002990, symbol: D_VS_MENU_7002990} + +D_VS_MENU_7002BF0: + { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 15, offset: 0x7002BF0, symbol: D_VS_MENU_7002BF0} + +D_VS_MENU_7002E50: + { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 15, offset: 0x7002E50, symbol: D_VS_MENU_7002E50} + +D_VS_MENU_70030B0: + { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 12, offset: 0x70030B0, symbol: D_VS_MENU_70030B0} + +D_VS_MENU_7003290: + { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 12, offset: 0x7003290, symbol: D_VS_MENU_7003290} + +D_VS_MENU_7003470: + { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 12, offset: 0x7003470, symbol: D_VS_MENU_7003470} + +D_VS_MENU_7003650: + { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 12, offset: 0x7003650, symbol: D_VS_MENU_7003650} + +D_VS_MENU_7003830: + { type: TEXTURE, ctype: u8, format: IA8, width: 64, height: 17, offset: 0x7003830, symbol: D_VS_MENU_7003830} + +D_VS_MENU_7003C70: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x7003C70, symbol: D_VS_MENU_7003C70} + +D_VS_MENU_7003D70: + { type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 5, offset: 0x7003D70, symbol: D_VS_MENU_7003D70} + +D_VS_MENU_7003E10: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x7003E10, symbol: D_VS_MENU_7003E10} + +D_VS_MENU_7003F10: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x7003F10, symbol: D_VS_MENU_7003F10} + +D_VS_MENU_7004010: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x7004010, symbol: D_VS_MENU_7004010} + +D_VS_MENU_7004050: + { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x7004050, symbol: D_VS_MENU_7004050, tlut: 0x7004150} + +D_VS_MENU_7004150: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 76, offset: 0x7004150, symbol: D_VS_MENU_7004150} + +D_VS_MENU_70041F0: + { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x70041F0, symbol: D_VS_MENU_70041F0, tlut: 0x70042F0} + +D_VS_MENU_70042F0: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 53, offset: 0x70042F0, symbol: D_VS_MENU_70042F0} + +D_VS_MENU_7004360: + { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x7004360, symbol: D_VS_MENU_7004360, tlut: 0x7004460} + +D_VS_MENU_7004460: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 50, offset: 0x7004460, symbol: D_VS_MENU_7004460} + +D_VS_MENU_70044D0: + { type: TEXTURE, ctype: u8, format: CI8, width: 64, height: 19, offset: 0x70044D0, symbol: D_VS_MENU_70044D0, tlut: 0x7004990} + +D_VS_MENU_7004990: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 17, offset: 0x7004990, symbol: D_VS_MENU_7004990} + +D_VS_MENU_70049C0: + { type: TEXTURE, ctype: u8, format: CI8, width: 56, height: 8, offset: 0x70049C0, symbol: D_VS_MENU_70049C0, tlut: 0x7004B80} + +D_VS_MENU_7004B80: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 18, offset: 0x7004B80, symbol: D_VS_MENU_7004B80} + +D_VS_MENU_7004BB0: + { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 10, offset: 0x7004BB0, symbol: D_VS_MENU_7004BB0, tlut: 0x7004D90} + +D_VS_MENU_7004D90: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 18, offset: 0x7004D90, symbol: D_VS_MENU_7004D90} + +D_VS_MENU_7004DC0: + { type: TEXTURE, ctype: u8, format: CI8, width: 56, height: 10, offset: 0x7004DC0, symbol: D_VS_MENU_7004DC0, tlut: 0x7004FF0} + +D_VS_MENU_7004FF0: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 18, offset: 0x7004FF0, symbol: D_VS_MENU_7004FF0} + +D_VS_MENU_7005020: + { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 8, offset: 0x7005020, symbol: D_VS_MENU_7005020, tlut: 0x70051A0} + +D_VS_MENU_70051A0: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 18, offset: 0x70051A0, symbol: D_VS_MENU_70051A0} + +D_VS_MENU_70051D0: + { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x70051D0, symbol: D_VS_MENU_70051D0, tlut: 0x70055D0} + +D_VS_MENU_70055D0: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 20, offset: 0x70055D0, symbol: D_VS_MENU_70055D0} + +D_VS_MENU_7005600: + { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 38, offset: 0x7005600, symbol: D_VS_MENU_7005600, tlut: 0x7005D20} + +D_VS_MENU_7005D20: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 248, offset: 0x7005D20, symbol: D_VS_MENU_7005D20} + +D_VS_MENU_7005F10: + { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 38, offset: 0x7005F10, symbol: D_VS_MENU_7005F10, tlut: 0x7006630} + +D_VS_MENU_7006630: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 168, offset: 0x7006630, symbol: D_VS_MENU_7006630} + +D_VS_MENU_7006780: + { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 38, offset: 0x7006780, symbol: D_VS_MENU_7006780, tlut: 0x7006EA0} + +D_VS_MENU_7006EA0: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 256, offset: 0x7006EA0, symbol: D_VS_MENU_7006EA0} + +D_VS_MENU_70070A0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x70070A0, symbol: D_VS_MENU_70070A0} + +D_VS_MENU_7007FC0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x7007FC0, symbol: D_VS_MENU_7007FC0} + +D_VS_MENU_7008EE0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x7008EE0, symbol: D_VS_MENU_7008EE0} + +D_VS_MENU_7009E00: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x7009E00, symbol: D_VS_MENU_7009E00} + +D_VS_MENU_700AD20: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x700AD20, symbol: D_VS_MENU_700AD20} + +D_VS_MENU_700BC40: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x700BC40, symbol: D_VS_MENU_700BC40} + +D_VS_MENU_700CB60: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x700CB60, symbol: D_VS_MENU_700CB60} + +D_VS_MENU_700DA80: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x700DA80, symbol: D_VS_MENU_700DA80} + +D_VS_MENU_700E9A0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 144, height: 42, offset: 0x700E9A0, symbol: D_VS_MENU_700E9A0} + +D_VS_MENU_70118E0: + { type: TEXTURE, ctype: u8, format: CI4, width: 80, height: 71, offset: 0x70118E0, symbol: D_VS_MENU_70118E0, tlut: 0x70123F8} + +D_VS_MENU_70123F8: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 5, offset: 0x70123F8, symbol: D_VS_MENU_70123F8} + +D_VS_MENU_7012410: + { type: GFX, offset: 0x7012410, symbol: D_VS_MENU_7012410} + +D_VS_MENU_70124E8: + { type: TEXTURE, ctype: u8, format: CI8, width: 8, height: 16, offset: 0x70124E8, symbol: D_VS_MENU_70124E8, tlut: 0x7012568} + +D_VS_MENU_7012568: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 24, offset: 0x7012568, symbol: D_VS_MENU_7012568} diff --git a/assets/yaml/us/rev1/ast_warp_zone.yaml b/assets/yaml/us/rev1/ast_warp_zone.yaml new file mode 100644 index 00000000..67dc362d --- /dev/null +++ b/assets/yaml/us/rev1/ast_warp_zone.yaml @@ -0,0 +1,42 @@ +:config: + segments: + - [0x07, 0xBFA740] + header: + code: + - '#include "assets/ast_warp_zone.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + +D_WZ_7000000: + { type: GFX, offset: 0x7000000, symbol: D_WZ_7000000 } + +D_WZ_7000280: + { type: GFX, offset: 0x7000280, symbol: D_WZ_7000280 } + +D_WZ_70008F0: + { type: GFX, offset: 0x70008F0, symbol: D_WZ_70008F0 } + +D_WZ_7000260: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 4, height: 4, offset: 0x7000260, symbol: D_WZ_7000260 } + +D_WZ_7000A30: + { type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 32, offset: 0x7000A30, symbol: D_WZ_7000A30, tlut: 0x7000C30 } + +D_WZ_7000C30: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x7000C30, symbol: D_WZ_7000C30 } + +D_WZ_7000C40: + { type: GFX, offset: 0x7000C40, symbol: D_WZ_7000C40 } + +D_WZ_7000E80: + { type: GFX, offset: 0x7000E80, symbol: D_WZ_7000E80 } + +D_WZ_70010E0: + { type: GFX, offset: 0x70010E0, symbol: D_WZ_70010E0 } + +D_WZ_7001540: + { type: GFX, offset: 0x7001540, symbol: D_WZ_7001540 } + +D_WZ_70015D0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x70015D0, symbol: D_WZ_70015D0 } \ No newline at end of file diff --git a/assets/yaml/us/rev1/ast_zoness.yaml b/assets/yaml/us/rev1/ast_zoness.yaml new file mode 100644 index 00000000..9a7e21ee --- /dev/null +++ b/assets/yaml/us/rev1/ast_zoness.yaml @@ -0,0 +1,566 @@ +:config: + segments: + - [0x06, 0xB84560] + header: + code: + - '#include "assets/ast_zoness.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + - '#include "sf64level.h"' + - '#include "sf64event.h"' + - '#include "sf64player.h"' + - '#include "sf64audio_external.h"' + - '#include "sf64mesg.h"' +D_ZO_6000000: + { type: TEXTURE, ctype: u8, format: IA8, width: 112, height: 28, offset: 0x6000000, symbol: D_ZO_6000000} + +D_ZO_6000C40: + { type: GFX, offset: 0x6000C40, symbol: D_ZO_6000C40} + +D_ZO_6000E98: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6000E98, symbol: D_ZO_6000E98} + +D_ZO_6001098: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6001098, symbol: D_ZO_6001098} + +D_ZO_60012A0: + { type: GFX, offset: 0x60012A0, symbol: D_ZO_60012A0} + +D_ZO_6001810: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6001810, symbol: D_ZO_6001810} + +D_ZO_6002010: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6002010, symbol: D_ZO_6002010} + +D_ZO_6002210: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6002210, symbol: D_ZO_6002210} + +D_ZO_6002410: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6002410, symbol: D_ZO_6002410} + +D_ZO_6002610: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6002610, symbol: D_ZO_6002610} + +D_ZO_6002810: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6002810, symbol: D_ZO_6002810} + +D_ZO_6002A10: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 16, offset: 0x6002A10, symbol: D_ZO_6002A10} + +D_ZO_6002E10: + { type: GFX, offset: 0x6002E10, symbol: D_ZO_6002E10} + +D_ZO_6003288: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6003288, symbol: D_ZO_6003288} + +D_ZO_6003488: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6003488, symbol: D_ZO_6003488} + +D_ZO_6003690: + { type: GFX, offset: 0x6003690, symbol: D_ZO_6003690} + +D_ZO_6003930: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6003930, symbol: D_ZO_6003930} + +D_ZO_6003B30: + { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x6003B30, symbol: D_ZO_6003B30} + +D_ZO_6004330: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 40, offset: 0x6004330, symbol: D_ZO_6004330} + +D_ZO_6004380: + { type: GFX, offset: 0x6004380, symbol: D_ZO_6004380} + +D_ZO_6004450: + { type: GFX, offset: 0x6004450, symbol: D_ZO_6004450} + +D_ZO_6004970: + { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x6004970, symbol: D_ZO_6004970} + +D_ZO_6004A70: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 72, offset: 0x6004A70, symbol: D_ZO_6004A70} + +D_ZO_6004B00: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6004B00, symbol: D_ZO_6004B00} + +D_ZO_6004D00: + { type: GFX, offset: 0x6004D00, symbol: D_ZO_6004D00} + +D_ZO_6005958: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6005958, symbol: D_ZO_6005958} + +D_ZO_6005B58: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6005B58, symbol: D_ZO_6005B58} + +D_ZO_6006360: + { type: GFX, offset: 0x6006360, symbol: D_ZO_6006360} + +D_ZO_6007230: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6007230, symbol: D_ZO_6007230} + +D_ZO_6007430: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6007430, symbol: D_ZO_6007430} + +D_ZO_6007C30: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6007C30, symbol: D_ZO_6007C30} + +D_ZO_6007E30: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6007E30, symbol: D_ZO_6007E30} + +D_ZO_6008030: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6008030, symbol: D_ZO_6008030} + +D_ZO_6008230: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6008230, symbol: D_ZO_6008230} + +D_ZO_6008430: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6008430, symbol: D_ZO_6008430} + +D_ZO_6008630: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6008630, symbol: D_ZO_6008630} + +D_ZO_6008830: + { type: GFX, offset: 0x6008830, symbol: D_ZO_6008830} + +D_ZO_6009ED0: + { type: VTX, count: 289, offset: 0x6009ED0, symbol: D_ZO_6009ED0} + +D_ZO_600B0E0: + { type: GFX, offset: 0x600B0E0, symbol: D_ZO_600B0E0} + +D_ZO_600C780: + { type: VTX, count: 289, offset: 0x600C780, symbol: D_ZO_600C780} + +D_ZO_600D990: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x600D990, symbol: D_ZO_600D990} + +D_ZO_600E5EC: + { type: SF64:ANIM, offset: 0x600E5EC, symbol: D_ZO_600E5EC} + +D_ZO_600E7D8: + { type: SF64:SKELETON, offset: 0x600E7D8, symbol: D_ZO_600E7D8} + +D_ZO_600E820: + { type: GFX, offset: 0x600E820, symbol: D_ZO_600E820} + +D_ZO_600EC90: + { type: GFX, offset: 0x600EC90, symbol: D_ZO_600EC90} + +D_ZO_600F560: + { type: GFX, offset: 0x600F560, symbol: D_ZO_600F560} + +D_ZO_600FE58: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x600FE58, symbol: D_ZO_600FE58} + +D_ZO_6010658: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6010658, symbol: D_ZO_6010658} + +D_ZO_6010E58: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6010E58, symbol: D_ZO_6010E58} + +D_ZO_6011660: + { type: GFX, offset: 0x6011660, symbol: D_ZO_6011660} + +D_ZO_6011928: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6011928, symbol: D_ZO_6011928} + +D_ZO_6012128: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6012128, symbol: D_ZO_6012128} + +D_ZO_6012930: + { type: GFX, offset: 0x6012930, symbol: D_ZO_6012930} + +D_ZO_6013010: + { type: GFX, offset: 0x6013010, symbol: D_ZO_6013010} + +D_ZO_6013330: + { type: GFX, offset: 0x6013330, symbol: D_ZO_6013330} + +D_ZO_6013480: + { type: GFX, offset: 0x6013480, symbol: D_ZO_6013480} + +D_ZO_6013510: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x6013510, symbol: D_ZO_6013510} + +D_ZO_6014510: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x6014510, symbol: D_ZO_6014510} + +D_ZO_6015430: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x6015430, symbol: D_ZO_6015430} + +D_ZO_6016350: + { type: GFX, offset: 0x6016350, symbol: D_ZO_6016350} + +D_ZO_60163E0: + { type: GFX, offset: 0x60163E0, symbol: D_ZO_60163E0} + +D_ZO_60165D0: + { type: GFX, offset: 0x60165D0, symbol: D_ZO_60165D0} + +D_ZO_6016880: + { type: GFX, offset: 0x6016880, symbol: D_ZO_6016880} + +D_ZO_6016B50: + { type: GFX, offset: 0x6016B50, symbol: D_ZO_6016B50} + +D_ZO_6016D90: + { type: GFX, offset: 0x6016D90, symbol: D_ZO_6016D90} + +D_ZO_6016E30: + { type: GFX, offset: 0x6016E30, symbol: D_ZO_6016E30} + +D_ZO_6016EC8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6016EC8, symbol: D_ZO_6016EC8} + +D_ZO_60176D0: + { type: GFX, offset: 0x60176D0, symbol: D_ZO_60176D0} + +D_ZO_6017770: + { type: GFX, offset: 0x6017770, symbol: D_ZO_6017770} + +D_ZO_6017810: + { type: GFX, offset: 0x6017810, symbol: D_ZO_6017810} + +D_ZO_60178B0: + { type: GFX, offset: 0x60178B0, symbol: D_ZO_60178B0} + +D_ZO_6017950: + { type: GFX, offset: 0x6017950, symbol: D_ZO_6017950} + +D_ZO_60179D8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60179D8, symbol: D_ZO_60179D8} + +D_ZO_60181E0: + { type: GFX, offset: 0x60181E0, symbol: D_ZO_60181E0} + +D_ZO_60182E0: + { type: TEXTURE, ctype: u16, format: IA16, width: 16, height: 16, offset: 0x60182E0, symbol: D_ZO_60182E0} + +D_ZO_6018550: + { type: SF64:ANIM, offset: 0x6018550, symbol: D_ZO_6018550} + +D_ZO_601863C: + { type: SF64:SKELETON, offset: 0x601863C, symbol: D_ZO_601863C} + +D_ZO_6018660: + { type: GFX, offset: 0x6018660, symbol: D_ZO_6018660} + +D_ZO_60186E8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 32, offset: 0x60186E8, symbol: D_ZO_60186E8} + +D_ZO_6018AF0: + { type: GFX, offset: 0x6018AF0, symbol: D_ZO_6018AF0} + +D_ZO_6018B78: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x6018B78, symbol: D_ZO_6018B78} + +D_ZO_6018C80: + { type: GFX, offset: 0x6018C80, symbol: D_ZO_6018C80} + +D_ZO_6018E80: + { type: GFX, offset: 0x6018E80, symbol: D_ZO_6018E80} + +D_ZO_6019040: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6019040, symbol: D_ZO_6019040} + +D_ZO_60195EC: + { type: SF64:ANIM, offset: 0x60195EC, symbol: D_ZO_60195EC} + +D_ZO_6019738: + { type: SF64:SKELETON, offset: 0x6019738, symbol: D_ZO_6019738} + +D_ZO_601996C: + { type: SF64:ANIM, offset: 0x601996C, symbol: D_ZO_601996C} + +D_ZO_6019E18: + { type: SF64:SKELETON, offset: 0x6019E18, symbol: D_ZO_6019E18} + +D_ZO_6019EB0: + { type: GFX, offset: 0x6019EB0, symbol: D_ZO_6019EB0} + +D_ZO_601A340: + { type: GFX, offset: 0x601A340, symbol: D_ZO_601A340} + +D_ZO_601AA48: + { type: SF64:ANIM, offset: 0x601AA48, symbol: D_ZO_601AA48} + +D_ZO_601AB14: + { type: SF64:SKELETON, offset: 0x601AB14, symbol: D_ZO_601AB14} + +D_ZO_601AFB8: + { type: SF64:ANIM, offset: 0x601AFB8, symbol: D_ZO_601AFB8} + +D_ZO_601B184: + { type: SF64:SKELETON, offset: 0x601B184, symbol: D_ZO_601B184} + +D_ZO_601B1C0: + { type: GFX, offset: 0x601B1C0, symbol: D_ZO_601B1C0} + +D_ZO_601B3B0: + { type: GFX, offset: 0x601B3B0, symbol: D_ZO_601B3B0} + +D_ZO_601B570: + { type: GFX, offset: 0x601B570, symbol: D_ZO_601B570} + +D_ZO_601B710: + { type: GFX, offset: 0x601B710, symbol: D_ZO_601B710} + +D_ZO_601B8F0: + { type: GFX, offset: 0x601B8F0, symbol: D_ZO_601B8F0} + +D_ZO_601BAD0: + { type: GFX, offset: 0x601BAD0, symbol: D_ZO_601BAD0} + +D_ZO_601BBB8: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x601BBB8, symbol: D_ZO_601BBB8} + +D_ZO_601BCC0: + { type: GFX, offset: 0x601BCC0, symbol: D_ZO_601BCC0} + +D_ZO_601C390: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x601C390, symbol: D_ZO_601C390} + +D_ZO_601C590: + { type: GFX, offset: 0x601C590, symbol: D_ZO_601C590} + +D_ZO_601C8E0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x601C8E0, symbol: D_ZO_601C8E0} + +D_ZO_601D0E0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x601D0E0, symbol: D_ZO_601D0E0} + +D_ZO_601D2E0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x601D2E0, symbol: D_ZO_601D2E0} + +D_ZO_601D5B0: + { type: GFX, offset: 0x601D5B0, symbol: D_ZO_601D5B0} + +D_ZO_601D680: + { type: GFX, offset: 0x601D680, symbol: D_ZO_601D680} + +D_ZO_601E618: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x601E618, symbol: D_ZO_601E618} + +D_ZO_601F260: + { type: GFX, offset: 0x601F260, symbol: D_ZO_601F260} + +D_ZO_601F420: + { type: GFX, offset: 0x601F420, symbol: D_ZO_601F420} + +D_ZO_601F620: + { type: GFX, offset: 0x601F620, symbol: D_ZO_601F620} + +D_ZO_601F874: + { type: SF64:ANIM, offset: 0x601F874, symbol: D_ZO_601F874} + +D_ZO_601F920: + { type: SF64:SKELETON, offset: 0x601F920, symbol: D_ZO_601F920} + +D_ZO_601F940: + { type: GFX, offset: 0x601F940, symbol: D_ZO_601F940} + +D_ZO_601FBC4: + { type: SF64:ANIM, offset: 0x601FBC4, symbol: D_ZO_601FBC4} + +D_ZO_601FC90: + { type: SF64:SKELETON, offset: 0x601FC90, symbol: D_ZO_601FC90} + +D_ZO_601FCB0: + { type: GFX, offset: 0x601FCB0, symbol: D_ZO_601FCB0} + +D_ZO_60201B0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60201B0, symbol: D_ZO_60201B0} + +D_ZO_60209B0: + { type: GFX, offset: 0x60209B0, symbol: D_ZO_60209B0} + +D_ZO_6020B70: + { type: GFX, offset: 0x6020B70, symbol: D_ZO_6020B70} + +D_ZO_6020D50: + { type: GFX, offset: 0x6020D50, symbol: D_ZO_6020D50} + +D_ZO_6020F10: + { type: GFX, offset: 0x6020F10, symbol: D_ZO_6020F10} + +D_ZO_6021100: + { type: GFX, offset: 0x6021100, symbol: D_ZO_6021100} + +D_ZO_60214B0: + { type: GFX, offset: 0x60214B0, symbol: D_ZO_60214B0} + +D_ZO_60212B0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x60212B0, symbol: D_ZO_60212B0} + +D_ZO_60216A8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x60216A8, symbol: D_ZO_60216A8} + +D_ZO_6021ABC: + { type: SF64:ANIM, offset: 0x6021ABC, symbol: D_ZO_6021ABC} + +D_ZO_6021B88: + { type: SF64:SKELETON, offset: 0x6021B88, symbol: D_ZO_6021B88} + +D_ZO_6021BB0: + { type: GFX, offset: 0x6021BB0, symbol: D_ZO_6021BB0} + +D_ZO_6021C50: + { type: GFX, offset: 0x6021C50, symbol: D_ZO_6021C50} + +D_ZO_6021CE0: + { type: GFX, offset: 0x6021CE0, symbol: D_ZO_6021CE0} + +D_ZO_6021D80: + { type: GFX, offset: 0x6021D80, symbol: D_ZO_6021D80} + +D_ZO_6021E20: + { type: GFX, offset: 0x6021E20, symbol: D_ZO_6021E20} + +D_ZO_60220A0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x60220A0, symbol: D_ZO_60220A0} + +D_ZO_60222A0: + { type: GFX, offset: 0x60222A0, symbol: D_ZO_60222A0} + +D_ZO_60227D8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x60227D8, symbol: D_ZO_60227D8} + +D_ZO_60229D8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x60229D8, symbol: D_ZO_60229D8} + +D_ZO_6022BE0: + { type: GFX, offset: 0x6022BE0, symbol: D_ZO_6022BE0} + +D_ZO_6022D70: + { type: GFX, offset: 0x6022D70, symbol: D_ZO_6022D70} + +D_ZO_6022F00: + { type: GFX, offset: 0x6022F00, symbol: D_ZO_6022F00} + +D_ZO_6023088: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6023088, symbol: D_ZO_6023088} + +D_ZO_6023288: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6023288, symbol: D_ZO_6023288} + +D_ZO_6023488: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6023488, symbol: D_ZO_6023488} + +D_ZO_6023690: + { type: GFX, offset: 0x6023690, symbol: D_ZO_6023690} + +D_ZO_6023730: + { type: GFX, offset: 0x6023730, symbol: D_ZO_6023730} + +D_ZO_60237E0: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x60237E0, symbol: D_ZO_60237E0} + +D_ZO_60239E0: + { type: GFX, offset: 0x60239E0, symbol: D_ZO_60239E0} + +D_ZO_6023D50: + { type: GFX, offset: 0x6023D50, symbol: D_ZO_6023D50} + +D_ZO_6024018: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6024018, symbol: D_ZO_6024018} + +D_ZO_6024220: + { type: GFX, offset: 0x6024220, symbol: D_ZO_6024220} + +D_ZO_60242B8: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60242B8, symbol: D_ZO_60242B8} + +D_ZO_6024AC0: + { type: GFX, offset: 0x6024AC0, symbol: D_ZO_6024AC0} + +D_ZO_6024D60: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6024D60, symbol: D_ZO_6024D60} + +D_ZO_6025658: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6025658, symbol: D_ZO_6025658} + +D_ZO_6025E60: + { type: GFX, offset: 0x6025E60, symbol: D_ZO_6025E60} + +D_ZO_6025F98: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6025F98, symbol: D_ZO_6025F98} + +D_ZO_60266D0: + { type: SF64:ENVIRONMENT, offset: 0x60266D0, symbol: D_ZO_60266D0} + +D_ZO_6026714: + { type: SF64:OBJECT_INIT, offset: 0x6026714, symbol: D_ZO_6026714} + +D_ZO_602AAC0: + { type: SF64:SCRIPT, offset: 0x602AAC0, symbol: D_ZO_602AAC0} + +D_ZO_602AC50: + { type: ARRAY, count: 289, array_type: u16, offset: 0x602AC50, symbol: D_ZO_602AC50} + +# Unused +D_ZO_602AE94: + { type: ARRAY, count: 242, array_type: Vec3f, offset: 0x602AE94, symbol: D_ZO_602AE94} + +D_ZO_602B9EC: + { type: SF64:HITBOX, offset: 0x602B9EC, symbol: D_ZO_602B9EC} + +D_ZO_602BA20: + { type: SF64:HITBOX, offset: 0x602BA20, symbol: D_ZO_602BA20} + +D_ZO_602BAE4: + { type: SF64:HITBOX, offset: 0x602BAE4, symbol: D_ZO_602BAE4} + +D_ZO_602BBD8: + { type: SF64:HITBOX, offset: 0x602BBD8, symbol: D_ZO_602BBD8} + +D_ZO_602BC54: + { type: SF64:HITBOX, offset: 0x602BC54, symbol: D_ZO_602BC54} + +D_ZO_602BC58: + { type: SF64:HITBOX, offset: 0x602BC58, symbol: D_ZO_602BC58} + +D_ZO_602BE3C: + { type: SF64:HITBOX, offset: 0x602BE3C, symbol: D_ZO_602BE3C} + +D_ZO_602BE58: + { type: SF64:HITBOX, offset: 0x602BE58, symbol: D_ZO_602BE58} + +D_ZO_602BFC4: + { type: SF64:HITBOX, offset: 0x602BFC4, symbol: D_ZO_602BFC4} + +D_ZO_602C028: + { type: SF64:HITBOX, offset: 0x602C028, symbol: D_ZO_602C028} + +D_ZO_602C044: + { type: SF64:HITBOX, offset: 0x602C044, symbol: D_ZO_602C044} + +D_ZO_602C1A0: + { type: SF64:HITBOX, offset: 0x602C1A0, symbol: D_ZO_602C1A0} + +D_ZO_602C1D4: + { type: SF64:HITBOX, offset: 0x602C1D4, symbol: D_ZO_602C1D4} + +D_ZO_602C218: + { type: SF64:HITBOX, offset: 0x602C218, symbol: D_ZO_602C218} + +D_ZO_602C234: + { type: SF64:HITBOX, offset: 0x602C234, symbol: D_ZO_602C234} + +D_ZO_602C250: + { type: SF64:HITBOX, offset: 0x602C250, symbol: D_ZO_602C250} + +D_ZO_602C294: + { type: SF64:HITBOX, offset: 0x602C294, symbol: D_ZO_602C294} + +D_ZO_602C2B0: + { type: SF64:HITBOX, offset: 0x602C2B0, symbol: D_ZO_602C2B0} + +D_ZO_602C2CC: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x602C2CC, symbol: D_ZO_602C2CC} + +D_ZO_602CACC: + {type: SF64:TRIANGLE, count: 30, offset: 0x602CACC, symbol: D_ZO_602CACC, mesh_symbol: D_ZO_OFFSET} + + + diff --git a/config.yml b/config.yml index 619255b9..6f35fa48 100644 --- a/config.yml +++ b/config.yml @@ -1,14 +1,34 @@ -# Supported Star Fox 64 Versions: US +# Supported Star Fox 64 Versions: US, JP f7475fb11e7e6830f82883412638e8390791ab87: name: Star Fox 64 (U) (V1.1) - path: assets/yaml/us + path: assets/yaml/us/rev1 config: gbi: F3DEX sort: OFFSET logging: ERROR output: - binary: lylat.otr + binary: starship.otr + code: src/assets + headers: include/assets + modding: src/assets + enums: + - include/sf64object.h + - include/sf64level.h + - include/sf64mesg.h + - include/sf64audio_external.h + - include/sf64event.h + - include/sf64player.h + +d064229a32cc05ab85e2381ce07744eb3ffaf530: + name: Star Fox 64 (JP) (V1.0) + path: assets/yaml/jp/rev0 + config: + gbi: F3DEX + sort: OFFSET + logging: ERROR + output: + binary: starship.otr code: src/assets headers: include/assets modding: src/assets diff --git a/tools/Torch b/tools/Torch index 45e6853e..311638a3 160000 --- a/tools/Torch +++ b/tools/Torch @@ -1 +1 @@ -Subproject commit 45e6853e315933d57a0e7213a2d5590fb74f628a +Subproject commit 311638a3bff9ea8af6799dc20ae4abf8c8a52ad1 From cf51ec5332cdb57aa82ad7918d6ad7a78ef91fde Mon Sep 17 00:00:00 2001 From: petrie911 <69443847+petrie911@users.noreply.github.com> Date: Tue, 14 May 2024 11:54:13 -0500 Subject: [PATCH 088/151] Updates to sf64Mesg and a couple global names (#247) * id start * stuff * comp and cam * add errors * names and such * message fixes and names --- include/sf64mesg.h | 239 ++++------ include/variables.h | 2 +- linker_scripts/us/rev1/symbol_addrs.txt | 2 +- .../us/rev1/symbol_addrs_engine.txt | 2 +- src/engine/fox_boss.c | 4 +- src/engine/fox_demo.c | 164 +++---- src/engine/fox_hud.c | 6 +- src/engine/fox_play.c | 10 +- src/engine/fox_radio.c | 102 ++-- src/overlays/ovl_i2/fox_me.c | 2 +- src/overlays/ovl_i2/fox_sx.c | 4 +- src/overlays/ovl_i6/fox_andross.c | 2 +- src/overlays/ovl_menu/fox_option.c | 442 ++++++++---------- 13 files changed, 446 insertions(+), 535 deletions(-) diff --git a/include/sf64mesg.h b/include/sf64mesg.h index aa5146cd..d116b71c 100644 --- a/include/sf64mesg.h +++ b/include/sf64mesg.h @@ -18,189 +18,154 @@ bool Message_DisplayText(Gfx** gfxPtr, u16* msgPtr, s32 xPos, s32 yPos, s32 len) void Message_DisplayScrollingText(Gfx** gfxPtr, u16* msgPtr, s32 xPos, s32 yPos, s32 yRangeHi, s32 yRangeLo, s32 len); bool Message_IsPrintingChar(u16* msgPtr, s32 charPos); + // Id + 1 gives the other frame of the animation typedef enum RadioCharacterId { RCID_FOX = 0, - RCID_FOX_OPEN, RCID_STATIC = 2, - RCID_STATIC_FLIP, RCID_FOX_RED = 5, - RCID_FOX_RED_OPEN, RCID_FALCO = 10, - RCID_FALCO_OPEN, RCID_FALCO_RED = 15, - RCID_FALCO_RED_OPEN, RCID_SLIPPY = 20, - RCID_SLIPPY_OPEN, RCID_SLIPPY_RED = 25, - RCID_SLIPPY_RED_OPEN, RCID_PEPPY = 30, - RCID_PEPPY_OPEN, RCID_PEPPY_RED = 35, - RCID_PEPPY_RED_OPEN, RCID_KATT = 40, - RCID_KATT_OPEN, RCID_ANDROSS = 50, - RCID_ANDROSS_OPEN, RCID_ANDROSS_RED = 55, - RCID_ANDROSS_RED_OPEN, RCID_JAMES = 60, - RCID_JAMES_OPEN, RCID_GEN_PEPPER = 70, - RCID_GEN_PEPPER_OPEN, RCID_BOSS_CORNERIA = 80, - RCID_BOSS_CORNERIA_OPEN, RCID_ROB64 = 90, - RCID_ROB64_OPEN, RCID_ROB64_RED = 95, - RCID_ROB64_RED_OPEN, RCID_BOSS_METEO = 100, - RCID_BOSS_METEO_OPEN, RCID_BOSS_CORNERIA2 = 110, - RCID_BOSS_CORNERIA2_OPEN, RCID_BOSS_AREA6 = 120, - RCID_BOSS_AREA6_OPEN, RCID_BOSS_ZONESS = 130, - RCID_BOSS_ZONESS_OPEN, RCID_ROB64_2 = 140, - RCID_ROB64_2_OPEN, RCID_BOSS_SECTORX = 150, - RCID_BOSS_SECTORX_OPEN, RCID_BOSS_SECTORY = 160, - RCID_BOSS_SECTORY_OPEN, RCID_BILL = 170, - RCID_BILL_OPEN, RCID_CAIMAN_AREA6 = 180, - RCID_CAIMAN_AREA6_OPEN, RCID_BOSS_MACBETH = 190, - RCID_BOSS_MACBETH_OPEN, RCID_WOLF = 200, - RCID_WOLF_OPEN, RCID_PIGMA = 210, - RCID_PIGMA_OPEN, RCID_LEON = 220, - RCID_LEON_OPEN, RCID_ANDREW = 230, - RCID_ANDREW_OPEN, RCID_WOLF_2 = 240, - RCID_WOLF_2_OPEN, RCID_PIGMA_2 = 250, - RCID_PIGMA_2_OPEN, RCID_LEON_2 = 260, - RCID_LEON_2_OPEN, RCID_ANDREW_2 = 270, - RCID_ANDREW_2_OPEN, RCID_ROB64_TITLE = 300, - RCID_ROB64_TITLE_OPEN, RCID_GEN_PEPPER_TITLE = 310, - RCID_GEN_PEPPER_TITLE_OPEN, RCID_TR = 350, - RCID_TR_OPEN, RCID_FOX_EXPERT = 400, - RCID_FOX_EXPERT_OPEN, RCID_1000 = 1000, } RadioCharacterId; -void Radio_PlayMessage(u16*, enum RadioCharacterId); +void Radio_PlayMessage(u16*, RadioCharacterId); void func_radio_800BB388(void); void Radio_Draw(void); -typedef enum { - MSGCHAR_END, - MSGCHAR_NWL, - MSGCHAR_NP2, - MSGCHAR_NP3, - MSGCHAR_NP4, - MSGCHAR_NP5, - MSGCHAR_NP6, - MSGCHAR_NP7, - MSGCHAR_PRI0, - MSGCHAR_PRI1, - MSGCHAR_PRI2, - MSGCHAR_PRI3, - MSGCHAR_SPC, - MSGCHAR_QSP, - MSGCHAR_HSP, - MSGCHAR_NXT, - MSGCHAR_CLF, - MSGCHAR_CUP, - MSGCHAR_CRT, - MSGCHAR_CDN, - MSGCHAR_AUP, - MSGCHAR_ALF, - MSGCHAR_ADN, - MSGCHAR_ART, - MSGCHAR_A, - MSGCHAR_B, - MSGCHAR_C, - MSGCHAR_D, - MSGCHAR_E, - MSGCHAR_F, - MSGCHAR_G, - MSGCHAR_H, - MSGCHAR_I, - MSGCHAR_J, - MSGCHAR_K, - MSGCHAR_L, - MSGCHAR_M, - MSGCHAR_N, - MSGCHAR_O, - MSGCHAR_P, - MSGCHAR_Q, - MSGCHAR_R, - MSGCHAR_S, - MSGCHAR_T, - MSGCHAR_U, - MSGCHAR_V, - MSGCHAR_W, - MSGCHAR_X, - MSGCHAR_Y, - MSGCHAR_Z, - MSGCHAR_a, - MSGCHAR_b, - MSGCHAR_c, - MSGCHAR_d, - MSGCHAR_e, - MSGCHAR_f, - MSGCHAR_g, - MSGCHAR_h, - MSGCHAR_i, - MSGCHAR_j, - MSGCHAR_k, - MSGCHAR_l, - MSGCHAR_m, - MSGCHAR_n, - MSGCHAR_o, - MSGCHAR_p, - MSGCHAR_q, - MSGCHAR_r, - MSGCHAR_s, - MSGCHAR_t, - MSGCHAR_u, - MSGCHAR_v, - MSGCHAR_w, - MSGCHAR_x, - MSGCHAR_y, - MSGCHAR_z, - MSGCHAR_EXM, - MSGCHAR_QST, - MSGCHAR_DSH, - MSGCHAR_CMA, - MSGCHAR_PRD, - MSGCHAR_0, - MSGCHAR_1, - MSGCHAR_2, - MSGCHAR_3, - MSGCHAR_4, - MSGCHAR_5, - MSGCHAR_6, - MSGCHAR_7, - MSGCHAR_8, - MSGCHAR_9, - MSGCHAR_APS, - MSGCHAR_LPR, - MSGCHAR_RPR, - MSGCHAR_CLN, - MSGCHAR_PIP, +typedef enum MsgCharCode { + // Non-printing and whitespace + MSGCHAR_END, // End message + MSGCHAR_NWL, // New line + MSGCHAR_NP2, // No effect + MSGCHAR_NP3, // No effect + MSGCHAR_NP4, // No effect + MSGCHAR_NP5, // No effect + MSGCHAR_NP6, // No effect + MSGCHAR_NP7, // No effect + MSGCHAR_PRI0, // Set message priority + MSGCHAR_PRI1, // Set message priority + MSGCHAR_PRI2, // Set message priority + MSGCHAR_PRI3, // Set message priority + MSGCHAR_SPC, // Space + MSGCHAR_QSP, // Quarter space + MSGCHAR_HSP, // Half Space + MSGCHAR_NXT, // Next text box + + // printing characters + MSGCHAR_CLF, // C-Left + MSGCHAR_CUP, // C-Up + MSGCHAR_CRT, // C-Right + MSGCHAR_CDN, // C-Down + MSGCHAR_AUP, // Up arrow + MSGCHAR_ALF, // Left arrow + MSGCHAR_ADN, // Down arrow + MSGCHAR_ART, // Right arrow + MSGCHAR_A, // A + MSGCHAR_B, // B + MSGCHAR_C, // C + MSGCHAR_D, // D + MSGCHAR_E, // E + MSGCHAR_F, // F + MSGCHAR_G, // G + MSGCHAR_H, // H + MSGCHAR_I, // I + MSGCHAR_J, // J + MSGCHAR_K, // K + MSGCHAR_L, // L + MSGCHAR_M, // M + MSGCHAR_N, // N + MSGCHAR_O, // O + MSGCHAR_P, // P + MSGCHAR_Q, // Q + MSGCHAR_R, // R + MSGCHAR_S, // S + MSGCHAR_T, // T + MSGCHAR_U, // U + MSGCHAR_V, // V + MSGCHAR_W, // W + MSGCHAR_X, // X + MSGCHAR_Y, // Y + MSGCHAR_Z, // Z + MSGCHAR_a, // a + MSGCHAR_b, // b + MSGCHAR_c, // c + MSGCHAR_d, // d + MSGCHAR_e, // e + MSGCHAR_f, // f + MSGCHAR_g, // g + MSGCHAR_h, // h + MSGCHAR_i, // i + MSGCHAR_j, // j + MSGCHAR_k, // k + MSGCHAR_l, // l + MSGCHAR_m, // m + MSGCHAR_n, // n + MSGCHAR_o, // o + MSGCHAR_p, // p + MSGCHAR_q, // q + MSGCHAR_r, // r + MSGCHAR_s, // s + MSGCHAR_t, // t + MSGCHAR_u, // u + MSGCHAR_v, // v + MSGCHAR_w, // w + MSGCHAR_x, // x + MSGCHAR_y, // y + MSGCHAR_z, // z + MSGCHAR_EXM, // ! + MSGCHAR_QST, // ? + MSGCHAR_DSH, // - + MSGCHAR_CMA, // , + MSGCHAR_PRD, // . + MSGCHAR_0, // 0 + MSGCHAR_1, // 1 + MSGCHAR_2, // 2 + MSGCHAR_3, // 3 + MSGCHAR_4, // 4 + MSGCHAR_5, // 5 + MSGCHAR_6, // 6 + MSGCHAR_7, // 7 + MSGCHAR_8, // 8 + MSGCHAR_9, // 9 + MSGCHAR_APS, // ' + MSGCHAR_LPR, // ( + MSGCHAR_RPR, // ) + MSGCHAR_CLN, // : + MSGCHAR_PIP, // | } MsgCharCode; #endif diff --git a/include/variables.h b/include/variables.h index 0cf15223..c9a13bfc 100644 --- a/include/variables.h +++ b/include/variables.h @@ -13,7 +13,7 @@ extern s32 gAllRangeSpawnEvent; extern u16 gStarColors[16]; // fox_boss -extern s32 D_boss_800C9E90[]; +extern s32 gBossBgms[]; // fox_tank extern Vec3f D_tank_800C9F2C; diff --git a/linker_scripts/us/rev1/symbol_addrs.txt b/linker_scripts/us/rev1/symbol_addrs.txt index 74125aff..ba745dd6 100644 --- a/linker_scripts/us/rev1/symbol_addrs.txt +++ b/linker_scripts/us/rev1/symbol_addrs.txt @@ -68,7 +68,7 @@ D_display_800CA26C = 0x800CA26C;//size:0x20 D_800CA260 = 0x800CA260;//size:0xC D_display_801613E0 = 0x801613E0;//size:0x18 gObjectInfo = 0x800CC124;//type:u8 -D_boss_800C9E90 = 0x800C9E90;//size:0x70 +gBossBgms = 0x800C9E90;//size:0x70 gLeveLClearStatus = 0x800D3180; // size:0x20 gRcpSetupDLs = 0x800D31B0; // size:0x18C0 diff --git a/linker_scripts/us/rev1/symbol_addrs_engine.txt b/linker_scripts/us/rev1/symbol_addrs_engine.txt index 73707f79..26590f58 100644 --- a/linker_scripts/us/rev1/symbol_addrs_engine.txt +++ b/linker_scripts/us/rev1/symbol_addrs_engine.txt @@ -402,7 +402,7 @@ gArwingSpeed = 0x80161A54; D_play_80161A5C = 0x80161A5C; gScreenFlashTimer = 0x80161A60; gDropHitCountItem = 0x80161A62; -sPlayWingSplash = 0x80161A64; +sPlayWingSplashSfx = 0x80161A64; sEnvironment = 0x80161A68; gVenomHardClear = 0x800D2F68; //type:u8 diff --git a/src/engine/fox_boss.c b/src/engine/fox_boss.c index 6d5d0858..722f116f 100644 --- a/src/engine/fox_boss.c +++ b/src/engine/fox_boss.c @@ -2,14 +2,14 @@ s32 gBossFrameCount; -s32 D_boss_800C9E90[] = { +s32 gBossBgms[] = { NA_BGM_BOSS_CO, NA_BGM_BOSS_ME, NA_BGM_BOSS_SX, NA_BGM_BOSS_A6, NA_BGM_BOSS_SB, NA_BGM_BOSS_SY, NA_BGM_BOSS_VE, NA_BGM_BOSS_SO, NA_BGM_BOSS_ZO, NA_BGM_BOSS_VE, NA_BGM_BOSS_CO, NA_BGM_BOSS_MA, NA_BGM_BOSS_TI, NA_BGM_BOSS_AQ, }; s32 PAD_boss_C9EC4[14] = { 0 }; -const f32 D_boss_800D55D0[] = { 6000.0f, 18000.0f, -6000.0f, -18000.0f }; +const f32 D_boss_800D55D0[] = { 6000.0f, 18000.0f, -6000.0f, -18000.0f }; // unused? void Boss_AwardBonus(Boss* boss) { s32 bonus; diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index 663d910d..bf8ad01b 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -19,97 +19,6 @@ #include "assets/ast_katina.h" #include "assets/ast_allies.h" -static Vec3f D_demo_800C9F60[] = { - { 2000.0f, 2000.0f, 2000.0f }, - { -2000.0f, 2000.0f, 2000.0f }, - { 0.0f, -3000.0f, 3000.0f }, - { 5000.0f, -3000.0f, -3000.0f }, -}; - -static f32 D_demo_800C9F90[] = { 75.0f, -80.0f, 85.0f, 0.0f }; - -static Vec3f D_demo_800C9FA0[] = { - { 200.0f, -10.0f, 200.0f }, - { -200.0f, 20.0f, 200.0f }, - { 0.0f, 50.0f, 400.0f }, - { -2000.0f, -1000.0f, 0.0f }, -}; - -static f32 D_demo_800C9FD0[] = { -1200.0f, 1200.0f, 0.0f, 0.0f }; - -static f32 D_demo_800C9FE0[] = { 0.0f, 0.0f, 600.0f, 2000.0f }; - -static f32 D_demo_800C9FF0[] = { -100.0f, 0.0f, 100.0f, 500.0f }; - -static f32 D_demo_800CA000[] = { -150.0f, 150.0f, 0.0f, 0.0f }; - -static f32 D_demo_800CA010[] = { 0.0f, 0.0f, 80.0f, 1000.0f }; - -static f32 D_demo_800CA020[] = { 45.0f, -45.0f, 10.0f, 0.0f }; - -static s32 D_demo_800CA030[] = { 0, 0, 0, 1 }; - -static s32 D_demo_800CA040[] = { 0, 0, 0, 0 }; - -static f32 D_demo_800CA050[] = { 210.0f, -210.0f, 0.0f }; - -static f32 D_demo_800CA05C[] = { -60.0f, -60.0f, -120.0f }; - -static f32 D_demo_800CA068[] = { -150.0f, -150.0f, -300.0f }; - -static f32 D_demo_800CA074[] = { 360.0f, -360.0f, 0.0f }; - -static f32 D_demo_800CA080[] = { -400.0f, 0.0f, 400.0f }; - -static f32 D_demo_800CA08C[] = { 0.0f, 200.0f, 0.0f }; - -static f32 D_demo_800CA098[] = { 1.0f, -0.9f, 0.7f }; - -static f32 D_demo_800CA0A4[] = { 150.0f, 100.0f, 200.0f }; - -static f32 D_demo_800CA0B0[] = { 200.0f, 300.0f, 500.0f }; - -static Vec3f D_demo_800CA0BC[] = { - { -1373.0, 484.0, -374.0 }, - { 1373.0, 484.0, -374.0 }, - { -1373.0, -704.0, -374.0 }, - { 1373.0, -704.0, -374.0 }, -}; - -static Vec3f D_demo_800CA0EC[] = { - { 0.0, 40.0, -2278.0 }, - { 295.0, -92.0, -1301.0 }, - { -295.0, -92.0, -1301.0 }, -}; - -static Vec3f D_demo_800CA110[8] = { - { 170.0f, -35.0f, -380.0f }, { -170.0f, -40.0f, -380.0f }, { 170.0f, -130.0f, -380.0f }, - { -170.0f, -140.0f, -380.0f }, { 140.0f, 40.0f, -250.0f }, { -150.0f, 40.0f, -250.0f }, - { 140.0f, 0.0f, -250.0f }, { -150.0f, 0.0f, -250.0f }, -}; - -static f32 D_demo_800CA170[] = { - 0.15f, 0.45f, 0.75f, 1.3f, 0.75f, 0.45f, 0.15f, 0.0f, -}; - -static f32 D_demo_800CA190[] = { 5.0f, 5.2f }; - -static f32 D_demo_800CA198[] = { - 0.5f, 1.5f, 2.5f, 1.5f, 0.5f, 0.2f, 0.2f, -}; - -static f32 D_demo_800CA1B4[] = { - -30.0f, -60.0f, -90.0f, -120.0f, -150.0f, -180.0f, -200.0, -210.0, -}; - -static f32 D_demo_800CA1D4[] = { - 1.5f, 0.87f, 0.83f, 0.75f, 0.7f, 0.6f, 0.4f, 0.1f, -}; - -static Animation* D_demo_800CA1F4[] = { - &D_SY_60265B4, &D_SY_602B8DC, &D_SY_60034C4, &D_SY_602A2CC, &D_SY_602CEB4, &D_SY_602B778, &D_SY_601F3B8, -}; - void func_demo_80048AC0(TeamId teamId) { s32 teamShield; @@ -162,6 +71,14 @@ void func_demo_80048AC0(TeamId teamId) { } } +static Vec3f D_demo_800C9F60[] = { + { 2000.0f, 2000.0f, 2000.0f }, + { -2000.0f, 2000.0f, 2000.0f }, + { 0.0f, -3000.0f, 3000.0f }, + { 5000.0f, -3000.0f, -3000.0f }, +}; +static f32 D_demo_800C9F90[] = { 75.0f, -80.0f, 85.0f, 0.0f }; + void func_demo_80048CC4(Actor* actor, s32 arg1) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; @@ -338,6 +255,13 @@ void Cutscene_WarpZoneComplete(Player* player) { player->rockAngle = SIN_DEG(player->rockPhase); } +static Vec3f D_demo_800C9FA0[] = { + { 200.0f, -10.0f, 200.0f }, + { -200.0f, 20.0f, 200.0f }, + { 0.0f, 50.0f, 400.0f }, + { -2000.0f, -1000.0f, 0.0f }, +}; + void func_demo_80049630(ActorCutscene* this) { Vec3f sp3C; Vec3f sp30; @@ -395,6 +319,15 @@ void func_demo_8004990C(Player* player) { player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; } +static f32 D_demo_800C9FD0[] = { -1200.0f, 1200.0f, 0.0f, 0.0f }; +static f32 D_demo_800C9FE0[] = { 0.0f, 0.0f, 600.0f, 2000.0f }; +static f32 D_demo_800C9FF0[] = { -100.0f, 0.0f, 100.0f, 500.0f }; +static f32 D_demo_800CA000[] = { -150.0f, 150.0f, 0.0f, 0.0f }; +static f32 D_demo_800CA010[] = { 0.0f, 0.0f, 80.0f, 1000.0f }; +static f32 D_demo_800CA020[] = { 45.0f, -45.0f, 10.0f, 0.0f }; +static s32 D_demo_800CA030[] = { 0, 0, 0, 1 }; +static s32 D_demo_800CA040[] = { 0, 0, 0, 0 }; + void func_demo_80049968(Actor* actor, s32 arg1) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; @@ -721,6 +654,11 @@ void Cutscene_LevelStart(Player* player) { } } +static f32 D_demo_800CA050[] = { 210.0f, -210.0f, 0.0f }; +static f32 D_demo_800CA05C[] = { -60.0f, -60.0f, -120.0f }; +static f32 D_demo_800CA068[] = { -150.0f, -150.0f, -300.0f }; +static f32 D_demo_800CA074[] = { 360.0f, -360.0f, 0.0f }; + void func_demo_8004A700(Actor* actor, s32 arg1) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; @@ -795,6 +733,9 @@ void func_demo_8004AA84(void) { } } +static f32 D_demo_800CA080[] = { -400.0f, 0.0f, 400.0f }; +static f32 D_demo_800CA08C[] = { 0.0f, 200.0f, 0.0f }; + void Cutscene_AllRangeMode(Player* player) { s32 pad; Vec3f sp70; @@ -817,9 +758,9 @@ void Cutscene_AllRangeMode(Player* player) { } else if (gCurrentLevel != LEVEL_TRAINING) { Radio_PlayMessage(gMsg_ID_20180, RCID_FOX); if (gCurrentLevel == LEVEL_SECTOR_Y) { - Audio_PlaySequence(SEQ_PLAYER_BGM, D_boss_800C9E90[gCurrentLevel], 0, 2); + Audio_PlaySequence(SEQ_PLAYER_BGM, gBossBgms[gCurrentLevel], 0, 2); } else { - AUDIO_PLAY_BGM(D_boss_800C9E90[gCurrentLevel]); + AUDIO_PLAY_BGM(gBossBgms[gCurrentLevel]); } } } @@ -1923,6 +1864,10 @@ void Cutscene_PlayerDown(Player* player) { } } +static f32 D_demo_800CA098[] = { 1.0f, -0.9f, 0.7f }; +static f32 D_demo_800CA0A4[] = { 150.0f, 100.0f, 200.0f }; +static f32 D_demo_800CA0B0[] = { 200.0f, 300.0f, 500.0f }; + void func_demo_8004E4D4(ActorCutscene* this) { Vec3f sp54; Vec3f sp48; @@ -2482,6 +2427,39 @@ void ActorCutscene_Update(ActorCutscene* this) { } } +static Vec3f D_demo_800CA0BC[] = { + { -1373.0, 484.0, -374.0 }, + { 1373.0, 484.0, -374.0 }, + { -1373.0, -704.0, -374.0 }, + { 1373.0, -704.0, -374.0 }, +}; +static Vec3f D_demo_800CA0EC[] = { + { 0.0, 40.0, -2278.0 }, + { 295.0, -92.0, -1301.0 }, + { -295.0, -92.0, -1301.0 }, +}; +static Vec3f D_demo_800CA110[8] = { + { 170.0f, -35.0f, -380.0f }, { -170.0f, -40.0f, -380.0f }, { 170.0f, -130.0f, -380.0f }, + { -170.0f, -140.0f, -380.0f }, { 140.0f, 40.0f, -250.0f }, { -150.0f, 40.0f, -250.0f }, + { 140.0f, 0.0f, -250.0f }, { -150.0f, 0.0f, -250.0f }, +}; +static f32 D_demo_800CA170[] = { + 0.15f, 0.45f, 0.75f, 1.3f, 0.75f, 0.45f, 0.15f, 0.0f, +}; +static f32 D_demo_800CA190[] = { 5.0f, 5.2f }; +static f32 D_demo_800CA198[] = { + 0.5f, 1.5f, 2.5f, 1.5f, 0.5f, 0.2f, 0.2f, +}; +static f32 D_demo_800CA1B4[] = { + -30.0f, -60.0f, -90.0f, -120.0f, -150.0f, -180.0f, -200.0, -210.0, +}; +static f32 D_demo_800CA1D4[] = { + 1.5f, 0.87f, 0.83f, 0.75f, 0.7f, 0.6f, 0.4f, 0.1f, +}; +static Animation* D_demo_800CA1F4[] = { + &D_SY_60265B4, &D_SY_602B8DC, &D_SY_60034C4, &D_SY_602A2CC, &D_SY_602CEB4, &D_SY_602B778, &D_SY_601F3B8, +}; + void func_demo_8004FCB8(Actor* actor, s32 arg1) { f32 angle; f32 scale; diff --git a/src/engine/fox_hud.c b/src/engine/fox_hud.c index fc3a41c8..29467f71 100644 --- a/src/engine/fox_hud.c +++ b/src/engine/fox_hud.c @@ -1538,7 +1538,7 @@ void func_hud_80088970(void) { gFillScreenAlpha += 32; if (gFillScreenAlpha > 255) { gFillScreenAlpha = 255; - }; + } if (D_80161838[0] < 160) { break; } @@ -2523,7 +2523,7 @@ void func_hud_8008B9E8(void) { if ((D_80161788 == 0) && (D_8016178C == 0)) { if ((gRadioState >= 4) && (gCurrentRadioPortrait != RCID_STATIC) && - (gCurrentRadioPortrait != RCID_STATIC_FLIP)) { + (gCurrentRadioPortrait != RCID_STATIC + 1)) { temp = func_hud_8008B774(); if (temp == 1) { D_80161788 = 20; @@ -2536,7 +2536,7 @@ void func_hud_8008B9E8(void) { } } - if ((gCurrentRadioPortrait == RCID_STATIC) || (gCurrentRadioPortrait == RCID_STATIC_FLIP)) { + if ((gCurrentRadioPortrait == RCID_STATIC) || (gCurrentRadioPortrait == RCID_STATIC + 1)) { D_80161788 = 0; D_8016178C = 0; } diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index 5949dd79..af3dd807 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -42,7 +42,7 @@ s32 D_play_80161A58; // unused s32 D_play_80161A5C; // saved hit count for venom -> andross u16 gScreenFlashTimer; u16 gDropHitCountItem; -s32 sPlayWingSplash; +s32 sPlayWingSplashSfx; Environment* sEnvironment; #define MEM_ARRAY_ALLOCATE(arr, count) ((arr) = Memory_Allocate((count) * sizeof(*(arr)))) @@ -245,7 +245,7 @@ void Player_WaterEffects(Player* player) { Matrix_MultVec3f(gCalcMatrix, &sp48, &sp30); if (player->pos.y < (gGroundHeight + 100.0f)) { if ((sp3C.y < gGroundHeight + 80.0f) && ((gGameFrameCount % 2) == 0)) { - if (sPlayWingSplash) {} + if (sPlayWingSplashSfx) {} func_effect_8007ACE0(sp3C.x, gGroundHeight, sp3C.z, 0.1f, 2.0f, player->rot.y + player->yRot_114 + 20.0f); } @@ -255,12 +255,12 @@ void Player_WaterEffects(Player* player) { } } if ((sp30.y < gGroundHeight + 80.0f) || (sp3C.y < gGroundHeight + 80.0f)) { - if (!sPlayWingSplash) { - sPlayWingSplash = true; + if (!sPlayWingSplashSfx) { + sPlayWingSplashSfx = true; AUDIO_PLAY_SFX(NA_SE_SPLASH_LEVEL_S, player->sfxSource, 0); } } else { - sPlayWingSplash = false; + sPlayWingSplashSfx = false; Audio_KillSfxBySourceAndId(player->sfxSource, NA_SE_SPLASH_LEVEL_S); } } diff --git a/src/engine/fox_radio.c b/src/engine/fox_radio.c index 0840ead8..b579fc2d 100644 --- a/src/engine/fox_radio.c +++ b/src/engine/fox_radio.c @@ -171,16 +171,16 @@ void func_radio_800BAAE8(void) { case RCID_FOX: radioPortraitTex = D_10050E0; break; - case RCID_FOX_RED_OPEN: + case RCID_FOX_RED + 1: sRadioUseRedBox = true; /* fallthrough */ - case RCID_FOX_OPEN: + case RCID_FOX + 1: radioPortraitTex = D_1006000; break; case RCID_FOX_EXPERT: radioPortraitTex = D_1006F20; break; - case RCID_FOX_EXPERT_OPEN: + case RCID_FOX_EXPERT + 1: radioPortraitTex = D_1007E40; break; case RCID_FALCO_RED: @@ -189,10 +189,10 @@ void func_radio_800BAAE8(void) { case RCID_FALCO: radioPortraitTex = D_10032A0; break; - case RCID_FALCO_RED_OPEN: + case RCID_FALCO_RED + 1: sRadioUseRedBox = true; /* fallthrough */ - case RCID_FALCO_OPEN: + case RCID_FALCO + 1: radioPortraitTex = D_10041C0; break; case RCID_SLIPPY_RED: @@ -201,10 +201,10 @@ void func_radio_800BAAE8(void) { case RCID_SLIPPY: radioPortraitTex = D_100D900; break; - case RCID_SLIPPY_RED_OPEN: + case RCID_SLIPPY_RED + 1: sRadioUseRedBox = true; /* fallthrough */ - case RCID_SLIPPY_OPEN: + case RCID_SLIPPY + 1: radioPortraitTex = D_100E820; break; case RCID_PEPPY_RED: @@ -213,112 +213,112 @@ void func_radio_800BAAE8(void) { case RCID_PEPPY: radioPortraitTex = D_100BAC0; break; - case RCID_PEPPY_RED_OPEN: + case RCID_PEPPY_RED + 1: sRadioUseRedBox = true; /* fallthrough */ - case RCID_PEPPY_OPEN: + case RCID_PEPPY + 1: radioPortraitTex = D_100C9E0; break; case RCID_WOLF: radioPortraitTex = D_STAR_WOLF_F00B580; break; - case RCID_WOLF_OPEN: + case RCID_WOLF + 1: radioPortraitTex = D_STAR_WOLF_F00C4A0; break; case RCID_PIGMA: radioPortraitTex = D_STAR_WOLF_F003C80; break; - case RCID_PIGMA_OPEN: + case RCID_PIGMA + 1: radioPortraitTex = D_STAR_WOLF_F004BA0; break; case RCID_LEON: radioPortraitTex = D_STAR_WOLF_F007900; break; - case RCID_LEON_OPEN: + case RCID_LEON + 1: radioPortraitTex = D_STAR_WOLF_F008820; break; case RCID_ANDREW: radioPortraitTex = D_STAR_WOLF_F000000; break; - case RCID_ANDREW_OPEN: + case RCID_ANDREW + 1: radioPortraitTex = D_STAR_WOLF_F000F20; break; case RCID_WOLF_2: radioPortraitTex = D_STAR_WOLF_F00D3C0; break; - case RCID_WOLF_2_OPEN: + case RCID_WOLF_2 + 1: radioPortraitTex = D_STAR_WOLF_F00E2E0; break; case RCID_PIGMA_2: radioPortraitTex = D_STAR_WOLF_F005AC0; break; - case RCID_PIGMA_2_OPEN: + case RCID_PIGMA_2 + 1: radioPortraitTex = D_STAR_WOLF_F0069E0; break; case RCID_LEON_2: radioPortraitTex = D_STAR_WOLF_F009740; break; - case RCID_LEON_2_OPEN: + case RCID_LEON_2 + 1: radioPortraitTex = D_STAR_WOLF_F00A660; break; case RCID_ANDREW_2: radioPortraitTex = D_STAR_WOLF_F001E40; break; - case RCID_ANDREW_2_OPEN: + case RCID_ANDREW_2 + 1: radioPortraitTex = D_STAR_WOLF_F002D60; break; case RCID_BOSS_CORNERIA: radioPortraitTex = D_CO_6026420; break; - case RCID_BOSS_CORNERIA_OPEN: + case RCID_BOSS_CORNERIA + 1: radioPortraitTex = D_CO_6027340; break; case RCID_BOSS_CORNERIA2: radioPortraitTex = D_CO_60245E0; break; - case RCID_BOSS_CORNERIA2_OPEN: + case RCID_BOSS_CORNERIA2 + 1: radioPortraitTex = D_CO_6025500; break; case RCID_BOSS_METEO: radioPortraitTex = D_ME_601C8E0; break; - case RCID_BOSS_METEO_OPEN: + case RCID_BOSS_METEO + 1: radioPortraitTex = D_ME_601D800; break; case RCID_BOSS_AREA6: radioPortraitTex = D_A6_60047E0; break; - case RCID_BOSS_AREA6_OPEN: + case RCID_BOSS_AREA6 + 1: radioPortraitTex = D_A6_6005700; break; case RCID_CAIMAN_AREA6: radioPortraitTex = D_A6_60029A0; break; - case RCID_CAIMAN_AREA6_OPEN: + case RCID_CAIMAN_AREA6 + 1: radioPortraitTex = D_A6_60038C0; break; case RCID_BOSS_ZONESS: radioPortraitTex = D_ZO_6014510; break; - case RCID_BOSS_ZONESS_OPEN: + case RCID_BOSS_ZONESS + 1: radioPortraitTex = D_ZO_6015430; break; case RCID_BOSS_SECTORX: radioPortraitTex = D_SX_6020FB0; break; - case RCID_BOSS_SECTORX_OPEN: + case RCID_BOSS_SECTORX + 1: radioPortraitTex = D_SX_6021ED0; break; case RCID_BOSS_SECTORY: radioPortraitTex = D_SY_6018F30; break; - case RCID_BOSS_SECTORY_OPEN: + case RCID_BOSS_SECTORY + 1: radioPortraitTex = D_SY_6019E50; break; case RCID_BOSS_MACBETH: radioPortraitTex = D_MA_6010C20; break; - case RCID_BOSS_MACBETH_OPEN: + case RCID_BOSS_MACBETH + 1: radioPortraitTex = D_MA_6011B40; break; case RCID_ROB64_RED: @@ -328,17 +328,17 @@ void func_radio_800BAAE8(void) { case RCID_ROB64_2: radioPortraitTex = D_1009C80; break; - case RCID_ROB64_RED_OPEN: + case RCID_ROB64_RED + 1: sRadioUseRedBox = true; /* fallthrough */ - case RCID_ROB64_OPEN: - case RCID_ROB64_2_OPEN: + case RCID_ROB64 + 1: + case RCID_ROB64_2 + 1: radioPortraitTex = D_100ABA0; break; case RCID_KATT: radioPortraitTex = D_D003DF0; break; - case RCID_KATT_OPEN: + case RCID_KATT + 1: radioPortraitTex = D_D004D10; break; case RCID_ANDROSS_RED: @@ -349,8 +349,8 @@ void func_radio_800BAAE8(void) { } sRadioUseRedBox = true; break; - case RCID_ANDROSS_RED_OPEN: - case RCID_ANDROSS_OPEN: + case RCID_ANDROSS_RED + 1: + case RCID_ANDROSS + 1: radioPortraitTex = D_D001090; if ((gGameState == GSTATE_PLAY) && (gCurrentLevel == LEVEL_AREA_6)) { radioPortraitTex = D_A6_6001A80; @@ -360,40 +360,40 @@ void func_radio_800BAAE8(void) { case RCID_JAMES: radioPortraitTex = D_D005C30; break; - case RCID_JAMES_OPEN: + case RCID_JAMES + 1: radioPortraitTex = D_D006B50; break; case RCID_BILL: radioPortraitTex = D_D001FB0; break; - case RCID_BILL_OPEN: + case RCID_BILL + 1: radioPortraitTex = D_D002ED0; break; case RCID_GEN_PEPPER: radioPortraitTex = D_D007A70; break; - case RCID_GEN_PEPPER_OPEN: + case RCID_GEN_PEPPER + 1: radioPortraitTex = D_D008990; break; case RCID_ROB64_TITLE: radioPortraitTex = D_GREAT_FOX_E00E100; break; - case RCID_ROB64_TITLE_OPEN: + case RCID_ROB64_TITLE + 1: radioPortraitTex = D_GREAT_FOX_E00F020; break; case RCID_GEN_PEPPER_TITLE: radioPortraitTex = D_GREAT_FOX_E00FF40; break; - case RCID_GEN_PEPPER_TITLE_OPEN: + case RCID_GEN_PEPPER_TITLE + 1: radioPortraitTex = D_GREAT_FOX_E010E60; break; case RCID_TR: radioPortraitTex = D_TR_6000900; break; - case RCID_TR_OPEN: + case RCID_TR + 1: radioPortraitTex = D_TR_6001820; break; - case RCID_STATIC_FLIP: + case RCID_STATIC + 1: mirror = true; /* fallthrough */ case RCID_STATIC: @@ -541,7 +541,7 @@ void Radio_Draw(void) { } gCurrentRadioPortrait = RCID_STATIC; if ((gGameFrameCount % 2) != 0) { - gCurrentRadioPortrait = RCID_STATIC_FLIP; + gCurrentRadioPortrait = RCID_STATIC + 1; } break; @@ -552,7 +552,7 @@ void Radio_Draw(void) { } gCurrentRadioPortrait = RCID_STATIC; if ((gGameFrameCount % 2) != 0) { - gCurrentRadioPortrait = RCID_STATIC_FLIP; + gCurrentRadioPortrait = RCID_STATIC + 1; } break; @@ -659,7 +659,7 @@ void Radio_Draw(void) { } gCurrentRadioPortrait = RCID_STATIC; if ((gGameFrameCount % 2) != 0) { - gCurrentRadioPortrait = RCID_STATIC_FLIP; + gCurrentRadioPortrait = RCID_STATIC + 1; } gRadioTextBoxScaleY -= 0.26f; if (gRadioTextBoxScaleY < 0.0f) { @@ -676,7 +676,7 @@ void Radio_Draw(void) { } gCurrentRadioPortrait = RCID_STATIC; if ((gGameFrameCount % 2) != 0) { - gCurrentRadioPortrait = RCID_STATIC_FLIP; + gCurrentRadioPortrait = RCID_STATIC + 1; } break; @@ -707,14 +707,14 @@ void Radio_Draw(void) { idx = TEAM_ID_PEPPY; } if ((gTeamShields[idx] <= 0) && (gGameFrameCount & 4) && (gTeamShields[idx] != -2) && - (gCurrentRadioPortrait != RCID_STATIC) && (gCurrentRadioPortrait != RCID_STATIC_FLIP) && + (gCurrentRadioPortrait != RCID_STATIC) && (gCurrentRadioPortrait != RCID_STATIC + 1) && (gCurrentRadioPortrait != RCID_1000)) { RCP_SetupDL(&gMasterDisp, 0x4C); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255); Graphics_DisplaySmallText(31, 167, 1.0f, 1.0f, "DOWN"); func_hud_80084B94(1); } - if (((gCurrentRadioPortrait != RCID_STATIC) && (gCurrentRadioPortrait != RCID_STATIC_FLIP)) && + if (((gCurrentRadioPortrait != RCID_STATIC) && (gCurrentRadioPortrait != RCID_STATIC + 1)) && (gCurrentRadioPortrait != RCID_1000)) { func_hud_80086110(22.0f, 165.0f, gTeamShields[idx]); } @@ -757,17 +757,17 @@ void Radio_Draw(void) { if ((gActors[idx].obj.status != OBJ_ACTIVE) && (gGameFrameCount & 4) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (gCurrentRadioPortrait != RCID_STATIC) && - (gCurrentRadioPortrait != RCID_STATIC_FLIP) && (gCurrentRadioPortrait != RCID_1000)) { + (gCurrentRadioPortrait != RCID_STATIC + 1) && (gCurrentRadioPortrait != RCID_1000)) { RCP_SetupDL(&gMasterDisp, 0x4C); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255); Graphics_DisplaySmallText(31, 167, 1.0f, 1.0f, "DOWN"); } - if (((gCurrentRadioPortrait != RCID_STATIC) && (gCurrentRadioPortrait != RCID_STATIC_FLIP)) && + if (((gCurrentRadioPortrait != RCID_STATIC) && (gCurrentRadioPortrait != RCID_STATIC + 1)) && (gCurrentRadioPortrait != RCID_1000)) { func_hud_80086110(22.0f, 165.0f, gActors[idx].health * 2.55f); } } - if (((gCurrentRadioPortrait != RCID_STATIC) && (gCurrentRadioPortrait != RCID_STATIC_FLIP)) && + if (((gCurrentRadioPortrait != RCID_STATIC) && (gCurrentRadioPortrait != RCID_STATIC + 1)) && (gCurrentRadioPortrait != RCID_1000)) { func_hud_8008AD94(); } @@ -816,7 +816,7 @@ void func_radio_800BC040(void) { gCurrentRadioPortrait = RCID_STATIC; if ((gGameFrameCount % 2) != 0) { - gCurrentRadioPortrait = RCID_STATIC_FLIP; + gCurrentRadioPortrait = RCID_STATIC + 1; } break; @@ -862,7 +862,7 @@ void func_radio_800BC040(void) { gCurrentRadioPortrait = RCID_STATIC; if ((gGameFrameCount % 2) != 0) { - gCurrentRadioPortrait = RCID_STATIC_FLIP; + gCurrentRadioPortrait = RCID_STATIC + 1; } gRadioTextBoxScaleY -= 0.015f; @@ -880,7 +880,7 @@ void func_radio_800BC040(void) { } gCurrentRadioPortrait = RCID_STATIC; if ((gGameFrameCount % 2) != 0) { - gCurrentRadioPortrait = RCID_STATIC_FLIP; + gCurrentRadioPortrait = RCID_STATIC + 1; } break; diff --git a/src/overlays/ovl_i2/fox_me.c b/src/overlays/ovl_i2/fox_me.c index 16b1e285..97262c6a 100644 --- a/src/overlays/ovl_i2/fox_me.c +++ b/src/overlays/ovl_i2/fox_me.c @@ -504,7 +504,7 @@ void Meteo_801887D0(Boss* boss) { void Meteo_Boss297_Init(Boss297* this) { s32 i; - AUDIO_PLAY_BGM(D_boss_800C9E90[gCurrentLevel]); + AUDIO_PLAY_BGM(gBossBgms[gCurrentLevel]); gBossActive = true; diff --git a/src/overlays/ovl_i2/fox_sx.c b/src/overlays/ovl_i2/fox_sx.c index 6412593b..2e859f6c 100644 --- a/src/overlays/ovl_i2/fox_sx.c +++ b/src/overlays/ovl_i2/fox_sx.c @@ -512,7 +512,7 @@ void SectorX_80190078(Boss* boss) { boss->health = 300; boss->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SX_6032550); gBossActive = true; - AUDIO_PLAY_BGM(D_boss_800C9E90[gCurrentLevel]); + AUDIO_PLAY_BGM(gBossBgms[gCurrentLevel]); boss->swork[6] = 1; boss->fwork[44] = 5.0f; boss->fwork[43] = 5.0f; @@ -838,7 +838,7 @@ void SectorX_80190078(Boss* boss) { boss->fwork[0] = 0.0f; boss->unk_04C = 0; boss->health = 300; - Audio_PlaySequenceDistorted(0, D_boss_800C9E90[gCurrentLevel], 1121, 25, -1); + Audio_PlaySequenceDistorted(0, gBossBgms[gCurrentLevel], 1121, 25, -1); Radio_PlayMessage(gMsg_ID_19205, RCID_FOX); boss->timer_052 = 100; } diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index f628037c..b3e62057 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -1020,7 +1020,7 @@ void Andross_80189B70(Boss* boss) { gPlayer[0].unk_014 = 1.0f; Camera_Update360(gPlayer, 1); Audio_StartPlayerNoise(0); - AUDIO_PLAY_BGM(D_boss_800C9E90[gCurrentLevel]); + AUDIO_PLAY_BGM(gBossBgms[gCurrentLevel]); AUDIO_PLAY_SFX(NA_SE_OB_ROUTE_EXPLOSION1, gDefaultSfxSource, 0); D_ctx_80177CA4 = gHitCount; diff --git a/src/overlays/ovl_menu/fox_option.c b/src/overlays/ovl_menu/fox_option.c index ea79f4fd..0f8e5633 100644 --- a/src/overlays/ovl_menu/fox_option.c +++ b/src/overlays/ovl_menu/fox_option.c @@ -68,7 +68,7 @@ s32 D_menu_801B91B8; s32 D_menu_801B91BC; s32 D_menu_801B91C0; s32 D_menu_801B91C4; -s32 D_menu_801B91C8; +bool D_menu_801B91C8; s32 D_menu_801B91CC; s32 D_menu_801B91D0; f32 D_menu_801B91D4; @@ -467,43 +467,41 @@ void Option_Setup(void) { } else { D_menu_801B9124 = 300; } - } else { - if (D_game_800D2870) { - D_menu_801B91A4 = 2; - D_menu_801B91A8 = gVsMatchType; - for (i = 0; i < OPTION_COUNT; i++) { - if (i == 2) { - continue; - } - sOptionCardList[i].unk_38.unk_0C = 0.01f; - sOptionCardList[i].unk_38.unk_10 = 0.21f; - sOptionCardList[i].unk_38.unk_04 = sOptionCardPosY[i]; - sOptionCardList[i].unk_38.unk_00 = 0.0f; - sOptionCardList[i].unk_38.unk_08 = 0.0f; - sOptionCardList[i].unk_5C = 0; - - sOptionCardList[i].unk_00.unk_20 = 0.01f; - sOptionCardList[i].unk_00.unk_24 = 1.0f; - sOptionCardList[i].unk_00.unk_18 = 158.0f; - sOptionCardList[i].unk_00.unk_1C = sOptionCardCurTextPosY[i]; - sOptionCardList[i].unk_58 = 0; + } else if (D_game_800D2870) { + D_menu_801B91A4 = 2; + D_menu_801B91A8 = gVsMatchType; + for (i = 0; i < OPTION_COUNT; i++) { + if (i == 2) { + continue; } - sOptionCardList[2].unk_38.unk_00 = 0.0f; - sOptionCardList[2].unk_38.unk_08 = 0.0f; - sOptionCardList[2].unk_38.unk_04 = 90.0f; - sOptionCardList[2].unk_38.unk_0C = 0.4f; - sOptionCardList[2].unk_38.unk_10 = 0.21f; - sOptionCardList[2].unk_5C = 1; - sOptionCardList[2].unk_00.unk_20 = 1.0f; - sOptionCardList[2].unk_00.unk_24 = 1.0f; - sOptionCardList[2].unk_00.unk_18 = 145.0f; - sOptionCardList[2].unk_00.unk_1C = 25.0f; - sOptionCardList[2].unk_58 = 1; + sOptionCardList[i].unk_38.unk_0C = 0.01f; + sOptionCardList[i].unk_38.unk_10 = 0.21f; + sOptionCardList[i].unk_38.unk_04 = sOptionCardPosY[i]; + sOptionCardList[i].unk_38.unk_00 = 0.0f; + sOptionCardList[i].unk_38.unk_08 = 0.0f; + sOptionCardList[i].unk_5C = 0; - D_menu_801B9124 = OPTION_VERSUS; - } else { - D_menu_801B9124 = OPTION_MAIN_MENU; + sOptionCardList[i].unk_00.unk_20 = 0.01f; + sOptionCardList[i].unk_00.unk_24 = 1.0f; + sOptionCardList[i].unk_00.unk_18 = 158.0f; + sOptionCardList[i].unk_00.unk_1C = sOptionCardCurTextPosY[i]; + sOptionCardList[i].unk_58 = 0; } + sOptionCardList[2].unk_38.unk_00 = 0.0f; + sOptionCardList[2].unk_38.unk_08 = 0.0f; + sOptionCardList[2].unk_38.unk_04 = 90.0f; + sOptionCardList[2].unk_38.unk_0C = 0.4f; + sOptionCardList[2].unk_38.unk_10 = 0.21f; + sOptionCardList[2].unk_5C = 1; + sOptionCardList[2].unk_00.unk_20 = 1.0f; + sOptionCardList[2].unk_00.unk_24 = 1.0f; + sOptionCardList[2].unk_00.unk_18 = 145.0f; + sOptionCardList[2].unk_00.unk_1C = 25.0f; + sOptionCardList[2].unk_58 = 1; + + D_menu_801B9124 = OPTION_VERSUS; + } else { + D_menu_801B9124 = OPTION_MAIN_MENU; } D_menu_801B912C = 0; @@ -866,8 +864,6 @@ void Option_MainMenuUpdate(void) { s32 i; f32 var_fs0; f32 var_fs1; - s32 temp1; - s32 temp2; switch (D_menu_801B912C) { case 0: @@ -919,49 +915,46 @@ void Option_MainMenuUpdate(void) { break; case 1: - temp1 = - Option_8019C418(&D_menu_801B91A4, OPTION_COUNT - 1, 1, 0, 20, 5, 4, gMainController, &D_menu_801B9180); // clang-format off - if (temp1 != 0) { AUDIO_PLAY_SFX(NA_SE_ARWING_CURSOR, gDefaultSfxSource, 4); } + if (Option_8019C418(&D_menu_801B91A4, OPTION_COUNT - 1, 1, 0, 20, 5, 4, gMainController, &D_menu_801B9180)) {\ + AUDIO_PLAY_SFX(NA_SE_ARWING_CURSOR, gDefaultSfxSource, 4);\ + } // clang-format on - if ((D_menu_801B91A4 == 0) && (D_menu_801B91C8 != 0)) { - temp2 = Option_8019C418(&D_menu_801B91B0, 1, 0, 0, 20, 5, 4, gMainController, &D_menu_801B9190); - if (temp2 != 0) { - AUDIO_PLAY_SFX(NA_SE_ARWING_CURSOR, gDefaultSfxSource, 4); - if (D_menu_801B91B0) { - sOptionCardList[0].unk_00.unk_08 = D_OPT_8004C50; - sOptionCardList[0].unk_00.unk_10 = 80; - sOptionCardList[0].unk_00.unk_14 = 12; - sOptionCardList[0].unk_00.unk_18 = 125.0f; - sOptionCardList[0].unk_00.unk_1C = 55.0f; - } else { - sOptionCardList[0].unk_00.unk_08 = D_OPT_8003B50; - sOptionCardList[0].unk_00.unk_10 = 72; - sOptionCardList[0].unk_00.unk_14 = 12; - sOptionCardList[0].unk_00.unk_18 = 124.0f; - sOptionCardList[0].unk_00.unk_1C = 54.0f; - } - gExpertMode = D_menu_801B91B0; + if ((D_menu_801B91A4 == 0) && D_menu_801B91C8 && + Option_8019C418(&D_menu_801B91B0, 1, 0, 0, 20, 5, 4, gMainController, &D_menu_801B9190)) { + AUDIO_PLAY_SFX(NA_SE_ARWING_CURSOR, gDefaultSfxSource, 4); + if (D_menu_801B91B0) { + sOptionCardList[0].unk_00.unk_08 = D_OPT_8004C50; + sOptionCardList[0].unk_00.unk_10 = 80; + sOptionCardList[0].unk_00.unk_14 = 12; + sOptionCardList[0].unk_00.unk_18 = 125.0f; + sOptionCardList[0].unk_00.unk_1C = 55.0f; + } else { + sOptionCardList[0].unk_00.unk_08 = D_OPT_8003B50; + sOptionCardList[0].unk_00.unk_10 = 72; + sOptionCardList[0].unk_00.unk_14 = 12; + sOptionCardList[0].unk_00.unk_18 = 124.0f; + sOptionCardList[0].unk_00.unk_1C = 54.0f; } + gExpertMode = D_menu_801B91B0; } - if ((D_menu_801B91A4 == 4) && (D_menu_801B91C8 != 0)) { - temp2 = Option_8019C418(&D_menu_801B91AC, 1, 0, 0, 20, 5, 4, gMainController, &D_menu_801B9198); - if (temp2 != 0) { - AUDIO_PLAY_SFX(NA_SE_ARWING_CURSOR, gDefaultSfxSource, 4); - if (D_menu_801B91AC) { - sOptionCardList[4].unk_00.unk_08 = D_OPT_8004C50; - sOptionCardList[4].unk_00.unk_10 = 80; - sOptionCardList[4].unk_00.unk_14 = 12; - sOptionCardList[4].unk_00.unk_18 = 125.0f; - sOptionCardList[4].unk_00.unk_1C = 151.0f; - } else { - sOptionCardList[4].unk_00.unk_08 = D_OPT_80046B0; - sOptionCardList[4].unk_00.unk_10 = 64; - sOptionCardList[4].unk_00.unk_14 = 10; - sOptionCardList[4].unk_00.unk_18 = 133.0f; - sOptionCardList[4].unk_00.unk_1C = 151.0f; - } + + if ((D_menu_801B91A4 == 4) && D_menu_801B91C8 && + Option_8019C418(&D_menu_801B91AC, 1, 0, 0, 20, 5, 4, gMainController, &D_menu_801B9198)) { + AUDIO_PLAY_SFX(NA_SE_ARWING_CURSOR, gDefaultSfxSource, 4); + if (D_menu_801B91AC) { + sOptionCardList[4].unk_00.unk_08 = D_OPT_8004C50; + sOptionCardList[4].unk_00.unk_10 = 80; + sOptionCardList[4].unk_00.unk_14 = 12; + sOptionCardList[4].unk_00.unk_18 = 125.0f; + sOptionCardList[4].unk_00.unk_1C = 151.0f; + } else { + sOptionCardList[4].unk_00.unk_08 = D_OPT_80046B0; + sOptionCardList[4].unk_00.unk_10 = 64; + sOptionCardList[4].unk_00.unk_14 = 10; + sOptionCardList[4].unk_00.unk_18 = 133.0f; + sOptionCardList[4].unk_00.unk_1C = 151.0f; } } @@ -1016,33 +1009,31 @@ void Option_MainMenuUpdate(void) { } } - if (D_menu_801B917C != 0) { - break; - } + if (D_menu_801B917C == 0) { + var_fs0 = 25.0f; + var_fs1 = 90.0f; - var_fs0 = 25.0f; - var_fs1 = 90.0f; - - if ((D_menu_801B91A4 == 0) || (D_menu_801B91A4 == 1)) { - var_fs0 = 0.0f; - var_fs1 = 120.0f; - } - - Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_00.unk_1C, var_fs0, 0.25f, 100.0f, 0.1f); - Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_38.unk_04, var_fs1, 0.25f, 100.0f, 0.1f); - - gBlurAlpha += 4; - - if ((sOptionCardList[D_menu_801B91A4].unk_00.unk_1C == var_fs0) && - (sOptionCardList[D_menu_801B91A4].unk_38.unk_04 == var_fs1)) { - gBlurAlpha += 255; - D_menu_801B9124 = D_menu_801B91A4; - - if (D_menu_801B91A4 == 4 && D_menu_801B91AC) { - D_menu_801B9124 = 6; + if ((D_menu_801B91A4 == 0) || (D_menu_801B91A4 == 1)) { + var_fs0 = 0.0f; + var_fs1 = 120.0f; } - Option_InitEntry(); + Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_00.unk_1C, var_fs0, 0.25f, 100.0f, 0.1f); + Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_38.unk_04, var_fs1, 0.25f, 100.0f, 0.1f); + + gBlurAlpha += 4; + + if ((sOptionCardList[D_menu_801B91A4].unk_00.unk_1C == var_fs0) && + (sOptionCardList[D_menu_801B91A4].unk_38.unk_04 == var_fs1)) { + gBlurAlpha += 255; + D_menu_801B9124 = D_menu_801B91A4; + + if (D_menu_801B91A4 == 4 && D_menu_801B91AC) { + D_menu_801B9124 = 6; + } + + Option_InitEntry(); + } } break; @@ -1082,10 +1073,10 @@ void Option_MainMenuDraw(void) { if (!(sOptionCardList[i].unk_58) || (sOptionCardList[i].unk_00.unk_20) <= 0.0f) { continue; } - if ((i == 0) && (D_menu_801B91C8 != 0) && ((D_menu_801B912C == 0) || (D_menu_801B912C == 1))) { + if ((i == 0) && D_menu_801B91C8 && ((D_menu_801B912C == 0) || (D_menu_801B912C == 1))) { Option_8019B6D8(106.0f, 56.0f, 98.0f, 20, 0, 75); } - if ((i == 4) && (D_menu_801B91C8 != 0) && ((D_menu_801B912C == 0) || (D_menu_801B912C == 1))) { + if ((i == 4) && D_menu_801B91C8 && ((D_menu_801B912C == 0) || (D_menu_801B912C == 1))) { Option_8019B6D8(106.0f, 152.0f, 98.0f, 20, 0, 75); } Option_DrawCardLabel(sOptionCardList[i].unk_00); @@ -1363,12 +1354,9 @@ void Option_SoundInit(void) { } void Option_SoundUpdate(void) { - s32 sp34; - s32 temp; + s32 sp34 = D_menu_801B9288; - sp34 = D_menu_801B9288; - temp = Option_8019C418(&D_menu_801B9288, 3, 1, 0, 20, 5, 4, gMainController, &D_menu_801B9250); - if (temp != 0) { + if (Option_8019C418(&D_menu_801B9288, 3, 1, 0, 20, 5, 4, gMainController, &D_menu_801B9250)) { D_menu_801B9270[sp34] = 255.0f; AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); } @@ -1540,7 +1528,7 @@ void Option_801952B4(void) { case 1: if (D_menu_801B9178 != 0) { - break; // investigate + break; // looks fake, but isn't } for (i = 2; i < 4; i++) { @@ -1554,17 +1542,14 @@ void Option_801952B4(void) { break; case 2: - if (D_menu_801B9178 != 0) { - break; // investigate + if (D_menu_801B9178 == 0) { + for (i = 2; i < 4; i++) { + D_menu_801AE9C0[i].unk_20 -= 0.02f; + D_menu_801AE9C0[i].unk_24 -= 0.02f; + D_menu_801AE9C0[i].unk_18 += 0.1f; + } + D_menu_801B914C++; } - - for (i = 2; i < 4; i++) { - D_menu_801AE9C0[i].unk_20 -= 0.02f; - D_menu_801AE9C0[i].unk_24 -= 0.02f; - D_menu_801AE9C0[i].unk_18 += 0.1f; - } - - D_menu_801B914C++; break; case 3: @@ -1575,45 +1560,40 @@ void Option_801952B4(void) { switch (D_menu_801B9158) { case 0: - if (D_menu_801B917C != 0) { - break; // investigate - } + if (D_menu_801B917C == 0) { + for (i = 0; i < 4; i++) { + D_menu_801AE9C0[i].unk_20 += 0.08f; + D_menu_801AE9C0[i].unk_24 += 0.08f; + D_menu_801AE9C0[i].unk_18 -= 0.4f; + D_menu_801AE9C0[i].unk_1C -= 0.4f; + } - for (i = 0; i < 4; i++) { - D_menu_801AE9C0[i].unk_20 += 0.08f; - D_menu_801AE9C0[i].unk_24 += 0.08f; - D_menu_801AE9C0[i].unk_18 -= 0.4f; - D_menu_801AE9C0[i].unk_1C -= 0.4f; + D_menu_801B917C = 2; + D_menu_801B9158++; } - - D_menu_801B917C = 2; - D_menu_801B9158++; break; case 1: - if (D_menu_801B917C != 0) { - break; // investigate - } + if (D_menu_801B917C == 0) { - for (i = 0; i < 4; i++) { - D_menu_801AE9C0[i].unk_20 -= 0.08f; - D_menu_801AE9C0[i].unk_24 -= 0.08f; - D_menu_801AE9C0[i].unk_18 += 0.4f; - D_menu_801AE9C0[i].unk_1C += 0.4f; - } + for (i = 0; i < 4; i++) { + D_menu_801AE9C0[i].unk_20 -= 0.08f; + D_menu_801AE9C0[i].unk_24 -= 0.08f; + D_menu_801AE9C0[i].unk_18 += 0.4f; + D_menu_801AE9C0[i].unk_1C += 0.4f; + } - D_menu_801B917C = 2; - D_menu_801B9158++; + D_menu_801B917C = 2; + D_menu_801B9158++; + } break; case 2: - if (D_menu_801B917C != 0) { - break; + if (D_menu_801B917C == 0) { + D_menu_801B917C = RAND_INT(30.0f); + D_menu_801B9158 = 0; } - - D_menu_801B917C = RAND_INT(30.0f); - D_menu_801B9158 = 0; - break; // investigate + break; } } else { @@ -1838,7 +1818,7 @@ void Option_DataUpdate(void) { case 2: if (D_menu_801B9330[D_menu_801B91C0] != 0) { - break; + break; // looks fake, but isn't } D_menu_801B91CC = 0; D_menu_801B91C0 = 0; @@ -1846,74 +1826,71 @@ void Option_DataUpdate(void) { break; case 3: - if (D_menu_801B9330[D_menu_801B91C0]) { - break; + if (D_menu_801B9330[D_menu_801B91C0] == 0) { + gDrawMode = DRAW_NONE; + D_menu_801B9124 = 1000; + D_menu_801B912C = 0; + D_menu_801B9244 = 1; } - gDrawMode = DRAW_NONE; - D_menu_801B9124 = 1000; - D_menu_801B912C = 0; - D_menu_801B9244 = 1; break; case 4: - if (D_menu_801B9330[D_menu_801B91C0]) { - break; - } + if (D_menu_801B9330[D_menu_801B91C0] == 0) { + switch (D_menu_801B91CC) { + case 0: + D_menu_801B91CC = 1; + D_menu_801B91C0 = 0; + D_menu_801B912C = 0; + break; - switch (D_menu_801B91CC) { - case 0: - D_menu_801B91CC = 1; - D_menu_801B91C0 = 0; - D_menu_801B912C = 0; - break; + case 1: + D_menu_801B91CC = 2; + AUDIO_PLAY_SFX(NA_SE_BACKUP_CLEAR, gDefaultSfxSource, 4); + D_ctx_801779A8[gMainController] = 50.0f; + D_ctx_80177990[gMainController] = 0; + break; - case 1: - D_menu_801B91CC = 2; - AUDIO_PLAY_SFX(NA_SE_BACKUP_CLEAR, gDefaultSfxSource, 4); - D_ctx_801779A8[gMainController] = 50.0f; - D_ctx_80177990[gMainController] = 0; - break; + case 2: + D_ctx_80177990[gMainController] += (s32) D_ctx_801779A8[gMainController]; + temp_fv0 = Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 100.0f, 0.05f, 100.0f, 0.1f); - case 2: - D_ctx_80177990[gMainController] += (s32) D_ctx_801779A8[gMainController]; - temp_fv0 = Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 100.0f, 0.05f, 100.0f, 0.1f); - - if (D_ctx_80177990[gMainController] >= 100) { - D_ctx_80177990[gMainController] -= 100; - gControllerRumbleFlags[gMainController] = 1; - } - - if (temp_fv0 == 0.0f) { - D_menu_801B91CC = 3; - - gSaveFile = *(SaveFile*) &gDefaultSave; - - Save_Write(); - - D_menu_801B91AC = 0; - D_menu_801B91B0 = 0; - D_menu_801B91C8 = 0; - - gExpertMode = false; - - sOptionCardList[0].unk_00.unk_08 = D_OPT_8003B50; - sOptionCardList[0].unk_00.unk_10 = 72; - sOptionCardList[0].unk_00.unk_14 = 12; - sOptionCardList[4].unk_00.unk_08 = D_OPT_80046B0; - sOptionCardList[4].unk_00.unk_10 = 64; - sOptionCardList[4].unk_00.unk_14 = 10; - - for (i = 0; i < OPTION_COUNT; i++) { - sOptionCardCurTextPosX[i] = sOptionCardTextPosX[i]; - sOptionCardCurTextPosY[i] = sOptionCardTextPosY[i]; + if (D_ctx_80177990[gMainController] >= 100) { + D_ctx_80177990[gMainController] -= 100; + gControllerRumbleFlags[gMainController] = 1; } - Title_80188010(); - } - break; - case 3: - D_menu_801B912C = 0; - break; + if (temp_fv0 == 0.0f) { + D_menu_801B91CC = 3; + + gSaveFile = *(SaveFile*) &gDefaultSave; + + Save_Write(); + + D_menu_801B91AC = 0; + D_menu_801B91B0 = 0; + D_menu_801B91C8 = false; + + gExpertMode = false; + + sOptionCardList[0].unk_00.unk_08 = D_OPT_8003B50; + sOptionCardList[0].unk_00.unk_10 = 72; + sOptionCardList[0].unk_00.unk_14 = 12; + sOptionCardList[4].unk_00.unk_08 = D_OPT_80046B0; + sOptionCardList[4].unk_00.unk_10 = 64; + sOptionCardList[4].unk_00.unk_14 = 10; + + for (i = 0; i < OPTION_COUNT; i++) { + sOptionCardCurTextPosX[i] = sOptionCardTextPosX[i]; + sOptionCardCurTextPosY[i] = sOptionCardTextPosY[i]; + } + Title_80188010(); + } + break; + + case 3: + D_menu_801B912C = 0; + break; + } } break; } @@ -3983,14 +3960,12 @@ void Option_8019CBC0(void) { void Option_8019CD54(void) { switch (D_menu_801B9128) { case 0: - if (D_menu_801B9138 == 0) { - if (Option_8019C418(&D_menu_801B90A0[D_menu_801B9098], 36, 0, 0, 50, 5, 10, gMainController, - &D_menu_801B9160[D_menu_801B9098])) { - AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); - D_menu_801B9150[D_menu_801B9098][0] = D_menu_801AEF5C[D_menu_801B90A0[D_menu_801B9098]]; - D_menu_801B90D0[D_menu_801B9098] = 0.0f; - D_menu_801B9100[D_menu_801B9098] = 0.0f; - } + if ((D_menu_801B9138 == 0) && (Option_8019C418(&D_menu_801B90A0[D_menu_801B9098], 36, 0, 0, 50, 5, 10, + gMainController, &D_menu_801B9160[D_menu_801B9098]))) { + AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); + D_menu_801B9150[D_menu_801B9098][0] = D_menu_801AEF5C[D_menu_801B90A0[D_menu_801B9098]]; + D_menu_801B90D0[D_menu_801B9098] = 0.0f; + D_menu_801B9100[D_menu_801B9098] = 0.0f; } if (gControllerPress[gMainController].button & A_BUTTON) { @@ -4003,15 +3978,13 @@ void Option_8019CD54(void) { D_menu_801B9138 = -1; D_menu_801B9128 = 2; break; - - } else { - if (D_menu_801B9098 < 3) { - AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); - D_menu_801B90D0[D_menu_801B9098] = 0.0f; - D_menu_801B9140[D_menu_801B9098] = 15; - D_menu_801B9128 = 1; - break; - } + } + if (D_menu_801B9098 < 3) { + AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); + D_menu_801B90D0[D_menu_801B9098] = 0.0f; + D_menu_801B9140[D_menu_801B9098] = 15; + D_menu_801B9128 = 1; + break; } } @@ -4028,25 +4001,21 @@ void Option_8019CD54(void) { case 10: D_menu_801B9140[D_menu_801B9098]--; - if (D_menu_801B9140[D_menu_801B9098] != 0) { - break; + if (D_menu_801B9140[D_menu_801B9098] == 0) { + D_menu_801B9128 = 0; } - - D_menu_801B9128 = 0; break; case 1: D_menu_801B9140[D_menu_801B9098]--; - if (D_menu_801B9140[D_menu_801B9098] != 0) { - break; - } + if (D_menu_801B9140[D_menu_801B9098] == 0) { + if ((D_menu_801B9098 + 1) > 2) { + D_menu_801B9138 = 1; + } - if ((D_menu_801B9098 + 1) > 2) { - D_menu_801B9138 = 1; + D_menu_801B9098++; + D_menu_801B9128 = 0; } - - D_menu_801B9098++; - D_menu_801B9128 = 0; break; case 2: @@ -4055,9 +4024,8 @@ void Option_8019CD54(void) { D_menu_801B9140[2]--; if (D_menu_801B9140[0] != 0) { - break; + break; // looks fake } - D_menu_801B917C = 20; D_menu_801B9128 = 3; break; @@ -4065,8 +4033,8 @@ void Option_8019CD54(void) { case 3: if (D_menu_801B917C == 0) { D_menu_801B912C = 2; - break; } + break; } } From 3ec7a180b19219d86b6f6c4185ac6d7765443f20 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Tue, 14 May 2024 15:04:04 -0300 Subject: [PATCH 089/151] clean recipe --- Makefile | 8 ++++---- tools/comptool.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index c7927711..c41b8795 100644 --- a/Makefile +++ b/Makefile @@ -450,10 +450,10 @@ assets: clean: rm -f torch.hash.yml - @git clean -fdx asm/$(VERSION) - @git clean -fdx bin/$(VERSION) - @git clean -fdx build/$(VERSION) - @git clean -fdx src/assets/ + @git clean -fdx asm/$(VERSION)/$(REV) + @git clean -fdx bin/$(VERSION)/$(REV) + @git clean -fdx build/ + @git clean -fdx src/assets/$(VERSION)/$(REV) @git clean -fdx include/assets/ @git clean -fdx linker_scripts/$(VERSION)/$(REV)/*.ld diff --git a/tools/comptool.py b/tools/comptool.py index 5054175f..b3c48485 100644 --- a/tools/comptool.py +++ b/tools/comptool.py @@ -6,7 +6,7 @@ import struct import argparse import sys -file_table_dict = {0xDE480:"US1.1", 0xD9A90:"US1.0", 0xE93C0:"JP1.0"} +file_table_dict = {0xDE480:"US 1.1", 0xD9A90:"US 1.0", 0xE93C0:"JP 1.0"} file_names_us = [ "makerom", "main", "dma_table", "audio_seq", "audio_bank", "audio_table", "ast_common", "ast_bg_space", "ast_bg_planet", From a1afe21820932d9bb0823a59c4b0c7549ee33c14 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Tue, 14 May 2024 15:04:49 -0300 Subject: [PATCH 090/151] whoops --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c41b8795..a2ce966d 100644 --- a/Makefile +++ b/Makefile @@ -453,7 +453,7 @@ clean: @git clean -fdx asm/$(VERSION)/$(REV) @git clean -fdx bin/$(VERSION)/$(REV) @git clean -fdx build/ - @git clean -fdx src/assets/$(VERSION)/$(REV) + @git clean -fdx src/assets/ @git clean -fdx include/assets/ @git clean -fdx linker_scripts/$(VERSION)/$(REV)/*.ld From 33d566b3bedd6ff146fabd6f75ee566525059e34 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Tue, 14 May 2024 15:06:35 -0300 Subject: [PATCH 091/151] use TOOLS var in relevant places --- Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index a2ce966d..2e783a95 100644 --- a/Makefile +++ b/Makefile @@ -79,8 +79,8 @@ ifeq ($(COMPILER),gcc) CC := $(MIPS_BINUTILS_PREFIX)gcc else ifeq ($(COMPILER),ido) - CC := tools/ido_recomp/$(DETECTED_OS)/7.1/cc - CC_OLD := tools/ido_recomp/$(DETECTED_OS)/5.3/cc + CC := $(TOOLS)/ido_recomp/$(DETECTED_OS)/7.1/cc + CC_OLD := $(TOOLS)/ido_recomp/$(DETECTED_OS)/5.3/cc else $(error Unsupported compiler. Please use either ido or gcc as the COMPILER variable.) endif @@ -194,7 +194,7 @@ OBJDUMP := $(MIPS_BINUTILS_PREFIX)objdump ICONV := iconv ASM_PROC := $(PYTHON) $(TOOLS)/asm-processor/build.py CAT := cat -TORCH := tools/Torch/cmake-build-release/torch +TORCH := $(TOOLS)/Torch/cmake-build-release/torch # Prefer clang as C preprocessor if installed on the system ifneq (,$(call find-command,clang)) @@ -389,10 +389,10 @@ endif all: uncompressed toolchain: - @$(MAKE) -s -C tools + @$(MAKE) -s -C $(TOOLS) torch: - @$(MAKE) -s -C tools torch + @$(MAKE) -s -C $(TOOLS) torch rm -f torch.hash.yml init: @@ -471,7 +471,7 @@ expected: context: @echo "Generating ctx.c ..." - @$(PYTHON) ./tools/m2ctx.py $(filter-out $@, $(MAKECMDGOALS)) + @$(PYTHON) ./$(TOOLS)/m2ctx.py $(filter-out $@, $(MAKECMDGOALS)) disasm: @$(RM) -r asm/$(VERSION)/$(REV) bin/$(VERSION)/$(REV) @@ -528,7 +528,7 @@ build/src/libultra/libc/ll.o: src/libultra/libc/ll.c $(call print,Patching:,$<,$@) @$(CC_CHECK) $(CC_CHECK_FLAGS) $(IINC) -I $(dir $*) $(CHECK_WARNINGS) $(BUILD_DEFINES) $(COMMON_DEFINES) $(RELEASE_DEFINES) $(GBI_DEFINES) $(C_DEFINES) $(MIPS_BUILTIN_DEFS) -o $@ $< $(V)$(CC) -c $(CFLAGS) $(BUILD_DEFINES) $(IINC) $(WARNINGS) $(MIPS_VERSION) $(ENDIAN) $(COMMON_DEFINES) $(RELEASE_DEFINES) $(GBI_DEFINES) $(C_DEFINES) $(OPTFLAGS) -o $@ $< - $(V)$(PYTHON) tools/set_o32abi_bit.py $@ + $(V)$(PYTHON) $(TOOLS)/set_o32abi_bit.py $@ $(V)$(OBJDUMP_CMD) $(V)$(RM_MDEBUG) From eb35be895aa35c3925b03bb57c9e8f7595ea01d6 Mon Sep 17 00:00:00 2001 From: petrie911 <69443847+petrie911@users.noreply.github.com> Date: Tue, 14 May 2024 13:22:18 -0500 Subject: [PATCH 092/151] bss (#248) --- tools/comptool.py | 8 +- yamls/jp/rev0/assets.yaml | 441 ++++++++++++++++++++++++++++++++++++ yamls/jp/rev0/main.yaml | 7 +- yamls/jp/rev0/overlays.yaml | 76 +++++-- 4 files changed, 506 insertions(+), 26 deletions(-) diff --git a/tools/comptool.py b/tools/comptool.py index b3c48485..8d324876 100644 --- a/tools/comptool.py +++ b/tools/comptool.py @@ -14,8 +14,8 @@ file_names_us = [ "ast_star_wolf", "ast_allies", "ast_corneria", "ast_meteo", "ast_titania", "ast_7_ti_2", "ast_8_ti", "ast_9_ti", "ast_A_ti", "ast_7_ti_1", "ast_sector_x", "ast_sector_z", "ast_aquas", "ast_area_6", "ast_venom_1", "ast_venom_2", "ast_ve1_boss", "ast_bolse", "ast_fortuna", "ast_sector_y", "ast_solar", "ast_zoness", "ast_katina", "ast_macbeth", "ast_warp_zone", - "ast_title", "ast_map", "ast_option", "ast_vs_menu", "ast_font", "ast_font_3d", "ast_andross", "ast_logo", "ast_ending", - "ast_ending_award_front", "ast_ending_award_back", "ast_reward", "ast_training", "ast_radio", "ovl_i1", "ovl_i2", + "ast_title", "ast_map", "ast_option", "ast_vs_menu", "ast_text", "ast_font_3d", "ast_andross", "ast_logo", "ast_ending", + "ast_ending_award_front", "ast_ending_award_back", "ast_ending_expert", "ast_training", "ast_radio", "ovl_i1", "ovl_i2", "ovl_i3", "ovl_i4", "ovl_i5", "ovl_i6", "ovl_menu", "ovl_ending", "ovl_unused" ] @@ -25,8 +25,8 @@ file_names_jp = [ "ast_star_wolf", "ast_allies", "ast_corneria", "ast_meteo", "ast_titania", "ast_7_ti_2", "ast_8_ti", "ast_9_ti", "ast_A_ti", "ast_7_ti_1", "ast_sector_x", "ast_sector_z", "ast_aquas", "ast_area_6", "ast_venom_1", "ast_venom_2", "ast_ve1_boss", "ast_bolse", "ast_fortuna", "ast_sector_y", "ast_solar", "ast_zoness", "ast_katina", "ast_macbeth", "ast_warp_zone", - "ast_title", "ast_map", "ast_option", "ast_vs_menu", "ast_font", "ast_font_3d", "ast_andross", "ast_logo", "ast_ending", - "ast_ending_award_front", "ast_ending_award_back", "ast_reward", "ast_training", "ovl_i1", "ovl_i2", + "ast_title", "ast_map", "ast_option", "ast_vs_menu", "ast_text", "ast_font_3d", "ast_andross", "ast_logo", "ast_ending", + "ast_ending_award_front", "ast_ending_award_back", "ast_ending_expert", "ast_training", "ovl_i1", "ovl_i2", "ovl_i3", "ovl_i4", "ovl_i5", "ovl_i6", "ovl_menu", "ovl_ending", "ovl_unused" ] diff --git a/yamls/jp/rev0/assets.yaml b/yamls/jp/rev0/assets.yaml index e1b4d396..89e749c1 100644 --- a/yamls/jp/rev0/assets.yaml +++ b/yamls/jp/rev0/assets.yaml @@ -1,3 +1,444 @@ - name: audio_seq type: bin start: 0xE9950 + + - name: audio_bank + type: bin + start: 0x124920 + + - name: audio_table + type: bin + start: 0x143A40 + + - name: ast_common + exclusive_ram_id: segment_01 + type: code + dir: assets + start: 0x844660 + vram: 0x01000000 + subsegments: + - [0x844660, bin, ast_common/ast_common] + + - name: ast_bg_space + exclusive_ram_id: segment_02 + type: code + dir: assets + start: 0x8763F0 + vram: 0x02000000 + subsegments: + - [0x8763F0, bin, ast_bg_space/ast_bg_space] + + - name: ast_bg_planet + exclusive_ram_id: segment_02 + type: code + dir: assets + start: 0x87DBD0 + vram: 0x02000000 + subsegments: + - [0x87DBD0, bin, ast_bg_planet/ast_bg_planet] + + - name: ast_arwing + exclusive_ram_id: segment_03 + type: code + dir: assets + start: 0x88F730 + vram: 0x03000000 + subsegments: + - [0x88F730, bin, ast_arwing/ast_arwing] + + - name: ast_landmaster + exclusive_ram_id: segment_03 + type: code + dir: assets + start: 0x8A9520 + vram: 0x03000000 + subsegments: + - [0x8A9520, bin, ast_landmaster/ast_landmaster] + + - name: ast_blue_marine + exclusive_ram_id: segment_03 + type: code + dir: assets + start: 0x8B1AB0 + vram: 0x03000000 + subsegments: + - [0x8B1AB0, bin, ast_blue_marine/ast_blue_marine] + + - name: ast_versus + exclusive_ram_id: segment_03 + type: code + dir: assets + start: 0x8B8E00 + vram: 0x03000000 + subsegments: + - [0x8B8E00, bin, ast_versus/ast_versus] + + - name: ast_enmy_planet + exclusive_ram_id: segment_04 + type: code + dir: assets + start: 0x8E8AE0 + vram: 0x04000000 + subsegments: + - [0x8E8AE0, bin, ast_enmy_planet/ast_enmy_planet] + + - name: ast_enmy_space + exclusive_ram_id: segment_04 + type: code + dir: assets + start: 0x8F2DE0 + vram: 0x04000000 + subsegments: + - [0x8F2DE0, bin, ast_enmy_space/ast_enmy_space] + + - name: ast_great_fox + exclusive_ram_id: segment_0E + type: code + dir: assets + start: 0x8FF2F0 + vram: 0x0E000000 + subsegments: + - [0x8FF2F0, bin, ast_great_fox/ast_great_fox] + + - name: ast_star_wolf + exclusive_ram_id: segment_0F + type: code + dir: assets + start: 0x911000 + vram: 0x0F000000 + subsegments: + - [0x911000, bin, ast_star_wolf/ast_star_wolf] + + - name: ast_allies + exclusive_ram_id: segment_0D + type: code + dir: assets + start: 0x9257A0 + vram: 0x0D000000 + subsegments: + - [0x9257A0, bin, ast_allies/ast_allies] + + - name: ast_corneria + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0x932200 + vram: 0x06000000 + subsegments: + - [0x932200, bin, ast_corneria/ast_corneria] + + - name: ast_meteo + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0x971980 + vram: 0x06000000 + subsegments: + - [0x971980, bin, ast_meteo/ast_meteo] + + - name: ast_titania + exclusive_ram_id: segment_06 + type: code + dir: assets + vram: 0x06000000 + start: 0x9A3370 + subsegments: + - [0x9A3370, bin, ast_titania/ast_titania] + + - name: ast_7_ti_2 + exclusive_ram_id: segment_07 + type: code + dir: assets + vram: 0x07000000 + start: 0x9AD730 + subsegments: + - [0x9AD730, bin, ast_7_ti_2/ast_7_ti_2] + + - name: ast_8_ti + exclusive_ram_id: segment_08 + type: code + dir: assets + start: 0x9BB980 + vram: 0x08000000 + subsegments: + - [0x9BB980, bin, ast_8_ti/ast_8_ti] + + - name: ast_9_ti + exclusive_ram_id: segment_09 + type: code + dir: assets + start: 0x9C4C20 + vram: 0x09000000 + subsegments: + - [0x9C4C20, bin, ast_9_ti/ast_9_ti] + + - name: ast_A_ti + type: code + dir: assets + exclusive_ram_id: segment_0A + start: 0x9D4D40 + vram: 0x0A000000 + subsegments: + - [0x9D4D40, bin, ast_A_ti/ast_A_ti] + + - name: ast_7_ti_1 + exclusive_ram_id: segment_07 + type: code + dir: assets + start: 0x9DE6E0 + vram: 0x07000000 + subsegments: + - [0x9DE6E0, bin, ast_7_ti_1/ast_7_ti_1] + + - name: ast_sector_x + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0x9ED490 + vram: 0x06000000 + subsegments: + - [0x9ED490, bin, ast_sector_x/ast_sector_x] + + - name: ast_sector_z + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0xA1FCD0 + vram: 0x06000000 + subsegments: + - [0xA1FCD0, bin, ast_sector_z/ast_sector_z] + + - name: ast_aquas + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0xA28E60 + vram: 0x06000000 + subsegments: + - [0xA28E60, bin, ast_aquas/ast_aquas] + + - name: ast_area_6 + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0xA5B8F0 + vram: 0x06000000 + subsegments: + - [0xA5B8F0, bin, ast_area_6/ast_area_6] + + - name: ast_venom_1 + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0xA84390 + vram: 0x06000000 + subsegments: + - [0xA84390, bin, ast_venom_1/ast_venom_1] + + - name: ast_venom_2 + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0xA9E570 + vram: 0x06000000 + subsegments: + - [0xA9E570, bin, ast_venom_2/ast_venom_2] + + - name: ast_ve1_boss + # exclusive_ram_id: segment_06 + exclusive_ram_id: segment_09 + type: code + dir: assets + start: 0xAB36F0 + vram: 0x09000000 + subsegments: + - [0xAB36F0, bin, ast_ve1_boss/ast_ve1_boss] + + - name: ast_bolse + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0xAD8050 + vram: 0x06000000 + subsegments: + - [0xAD8050, bin, ast_bolse/ast_bolse] + + - name: ast_fortuna + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0xAE9DC0 + vram: 0x06000000 + subsegments: + - [0xAE9DC0, bin, ast_fortuna/ast_fortuna] + + - name: ast_sector_y + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0xAF9DC0 + vram: 0x06000000 + subsegments: + - [0xAF9DC0, bin, ast_sector_y/ast_sector_y] + + - name: ast_solar + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0xB2E3F0 + vram: 0x06000000 + subsegments: + - [0xB2E3F0, bin, ast_solar/ast_solar] + + - name: ast_zoness + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0xB51670 + vram: 0x06000000 + subsegments: + - [0xB51670, bin, ast_zoness/ast_zoness] + + - name: ast_katina + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0xB7E0B0 + vram: 0x06000000 + subsegments: + - [0xB7E0B0, bin, ast_katina/ast_katina] + + - name: ast_macbeth + exclusive_ram_id: segment_06 + type: code + dir: assets + vram: 0x06000000 + start: 0xB8F2B0 + subsegments: + - [0xB8F2B0, bin, ast_macbeth/ast_macbeth] + + - name: ast_warp_zone + exclusive_ram_id: segment_07 + type: code + dir: assets + start: 0xBC7460 + vram: 0x07000000 + subsegments: + - [0xBC7460, bin, ast_warp_zone/ast_warp_zone] + + - name: ast_title + exclusive_ram_id: segment_06 + type: code + dir: assets + vram: 0x06000000 + start: 0xBC9230 + subsegments: + - [0xBC9230, bin, ast_title/ast_title] + + - name: ast_map + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0xC12690 + vram: 0x06000000 + subsegments: + - [0xC12690, bin, ast_map/ast_map] + + - name: ast_option + exclusive_ram_id: segment_08 + type: code + dir: assets + start: 0xC6FA00 + vram: 0x08000000 + subsegments: + - [0xC6FA00, bin, ast_option/ast_option] + + - name: ast_vs_menu + exclusive_ram_id: segment_07 + type: code + dir: assets + start: 0xC83960 + vram: 0x07000000 + subsegments: + - [0xC83960, bin, ast_vs_menu/ast_vs_menu] + + - name: ast_text + exclusive_ram_id: segment_05 + type: code + dir: assets + vram: 0x05000000 + start: 0xC98590 + subsegments: + - [0xC98590, bin, ast_text/ast_text] + + - name: ast_font_3d + exclusive_ram_id: segment_09 + type: code + dir: assets + vram: 0x09000000 + start: 0xCA2860 + subsegments: + - [0xCA2860, bin, ast_font_3d/ast_font_3d] + + - name: ast_andross + exclusive_ram_id: segment_0C + type: code + dir: assets + vram: 0x0C000000 + start: 0xCAEA30 + subsegments: + - [0xCAEA30, bin, ast_andross/ast_andross] + + - name: ast_logo + exclusive_ram_id: segment_0F + type: code + dir: assets + start: 0xCE8EC0 + vram: 0x0F000000 + subsegments: + - [0xCE8EC0, bin, ast_logo/ast_logo] + + - name: ast_ending + exclusive_ram_id: segment_07 + type: code + dir: assets + start: 0xCEB3C0 + vram: 0x07000000 + subsegments: + - [0xCEB3C0, bin, ast_ending/ast_ending] + + - name: ast_ending_award_front + exclusive_ram_id: segment_08 + type: code + dir: assets + start: 0xD071C0 + vram: 0x08000000 + subsegments: + - [0xD071C0, bin, ast_ending_award_front/ast_ending_award_front] + + - name: ast_ending_award_back + exclusive_ram_id: segment_08 + type: code + dir: assets + start: 0xD2C240 + vram: 0x08000000 + subsegments: + - [0xD2C240, bin, ast_ending_award_back/ast_ending_award_back] + + - name: ast_ending_expert + exclusive_ram_id: segment_08 + type: code + dir: assets + start: 0xD55CD0 + vram: 0x08000000 + subsegments: + - [0xD55CD0, bin, ast_ending_expert/ast_ending_expert] + + - name: ast_training + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0xD9FDD0 + vram: 0x06000000 + subsegments: + - [0xD9FDD0, bin, ast_training/ast_training] diff --git a/yamls/jp/rev0/main.yaml b/yamls/jp/rev0/main.yaml index 5a107e16..754a6248 100644 --- a/yamls/jp/rev0/main.yaml +++ b/yamls/jp/rev0/main.yaml @@ -10,7 +10,7 @@ type: code start: 0x1050 vram: 0x80000450 - #bss_size: 0x9B1F0 + bss_size: 0x95A50 subsegments: # Microcode - [0x01050, textbin, rspboot] @@ -260,11 +260,14 @@ - [0xE7650, data, wave_samples] - [0xE8270, data, note_data] + # bss + - { start: 0xE93C0, type: bss, vram: 0x800E87C0, name: main } + - name: dma_table type: code start: 0xE93C0 vram: 0x8017E210 - #follows_vram: main + follows_vram: main subsegments: - [0xE93C0, data, dmatable] diff --git a/yamls/jp/rev0/overlays.yaml b/yamls/jp/rev0/overlays.yaml index 13aec004..0ba6e18d 100644 --- a/yamls/jp/rev0/overlays.yaml +++ b/yamls/jp/rev0/overlays.yaml @@ -4,8 +4,8 @@ dir: overlays/ovl_i1 start: 0xDA9680 vram: 0x8017E7A0 - #follows_vram: ast_radio - #bss_size: 0xA10 + follows_vram: dma_table + bss_size: 0xA10 symbol_name_format: i1_$VRAM subsegments: - [0xDA9680, c, fox_i1] @@ -21,15 +21,18 @@ - [0xDBD410, .rodata, fox_ve1] - [0xDBD7A0, .rodata, fox_tr] - [0xDBD7E0, .rodata, fox_tr360] - + - { start: 0xDBD820, type: bss, vram: 0x80192940, name: fox_i1 } + - { start: 0xDBD820, type: bss, vram: 0x80192950, name: fox_co } + - { start: 0xDBD820, type: bss, vram: 0x80192A70, name: fox_ve1 } + - name: ovl_i2 exclusive_ram_id: overlay type: code dir: overlays/ovl_i2 start: 0xDBD820 vram: 0x8017E7A0 - #follows_vram: ast_radio - #bss_size: 0x40 + follows_vram: dma_table + bss_size: 0x30 symbol_name_format: i2_$VRAM subsegments: - [0xDBD820, c, fox_i2] @@ -40,6 +43,8 @@ - [0xDCB8F0, data, fox_sx] - [0xDCBA40, .rodata, fox_me] - [0xDCBD00, .rodata, fox_sx] + - { start: 0xDCC020, type: bss, vram: 0x8018CFA0, name: fox_i2 } + - { start: 0xDCC020, type: bss, vram: 0x8018CFB0, name: fox_sx } - name: ovl_i3 exclusive_ram_id: overlay @@ -47,8 +52,8 @@ dir: overlays/ovl_i3 start: 0xDCC020 vram: 0x8017E7A0 - #follows_vram: ast_radio - #bss_size: 0x2220 + follows_vram: dma_table + bss_size: 0x2220 symbol_name_format: i3_$VRAM subsegments: - [0xDCC020, c, fox_i3] @@ -65,6 +70,12 @@ - [0xE058E0, .rodata, fox_zo] - [0xE06000, .rodata, fox_so] - [0xE06560, .rodata, fox_aq] + - { start: 0xE06D70, type: bss, vram: 0x801B94F0, name: fox_i3 } + - { start: 0xE06D70, type: bss, vram: 0x801B9500, name: fox_a6 } + - { start: 0xE06D70, type: bss, vram: 0x801B95E0, name: fox_zo } + - { start: 0xE06D70, type: bss, vram: 0x801B99F0, name: fox_so } + - { start: 0xE06D70, type: bss, vram: 0x801B9A70, name: fox_aq } + - name: ovl_i4 exclusive_ram_id: overlay @@ -72,8 +83,8 @@ dir: overlays/ovl_i4 start: 0xE06D70 vram: 0x8017E7A0 - #follows_vram: ast_radio - #bss_size: 0x1B0 + follows_vram: dma_table + bss_size: 0x1B0 symbol_name_format: i4_$VRAM subsegments: - [0xE06D70, c, fox_i4] @@ -91,6 +102,11 @@ - [0xE1EDE0, .rodata, fox_bo] - [0xE1F1E0, .rodata, fox_ka] - [0xE1F570, .rodata, fox_sz] + - { start: 0xE1F870, type: bss, vram: 0x801972A0, name: fox_i4 } + - { start: 0xE1F870, type: bss, vram: 0x801972B0, name: fox_bo } + - { start: 0xE1F870, type: bss, vram: 0x80197420, name: fox_ka } + - { start: 0xE1F870, type: bss, vram: 0x80197440, name: fox_sz } + - name: ovl_i5 exclusive_ram_id: overlay @@ -98,8 +114,8 @@ dir: overlays/ovl_i5 start: 0xE1F870 vram: 0x8017E7A0 - #follows_vram: ast_radio - #bss_size: 0xAF80 + follows_vram: dma_table + bss_size: 0xAF70 symbol_name_format: i5_$VRAM subsegments: - [0xE1F870, c, fox_i5] @@ -109,11 +125,19 @@ - [0xE4CDB0, c, fox_ground] - [0xE4F670, data, fox_i5] - [0xE4F680, data, fox_ti_cs] + - [0xE4F740, data, fox_ti] + - [0xE51230, data, fox_ma] + - [0xE52CF0, data, fox_ground] - [0xE52DC0, .rodata, fox_i5] - [0xE52DD0, .rodata, fox_ti_cs] - [0xE52E30, .rodata, fox_ti] - [0xE53690, .rodata, fox_ma] - [0xE541D0, .rodata, fox_ground] + - { start: 0xE542C0, type: bss, vram: 0x801B31F0, name: fox_i5 } + - { start: 0xE542C0, type: bss, vram: 0x801B3200, name: fox_ti } + - { start: 0xE542C0, type: bss, vram: 0x801B5540, name: fox_ma } + - { start: 0xE542C0, type: bss, vram: 0x801B5A40, name: fox_ground } + - name: ovl_i6 exclusive_ram_id: overlay @@ -121,8 +145,8 @@ dir: overlays/ovl_i6 start: 0xE542C0 vram: 0x8017E7A0 - #follows_vram: ast_radio - #bss_size: 0x520 + follows_vram: dma_table + bss_size: 0x520 symbol_name_format: i6_$VRAM subsegments: - [0xE542C0, c, fox_i6] @@ -140,6 +164,10 @@ - [0xE74210, .rodata, fox_ve2] - [0xE74250, .rodata, fox_sy] - [0xE74CA0, .rodata, fox_turret] + - { start: 0xE74D00, type: bss, vram: 0x8019F1E0, name: fox_i6 } + - { start: 0xE74D00, type: bss, vram: 0x8019F1F0, name: fox_andross } + - { start: 0xE74D00, type: bss, vram: 0x8019F6E0, name: fox_sy } + - name: ovl_menu exclusive_ram_id: overlay @@ -147,8 +175,8 @@ dir: overlays/ovl_menu start: 0xE74D00 vram: 0x8017E7A0 - #follows_vram: ast_radio - #bss_size: 0x17590 + follows_vram: dma_table + bss_size: 0x17570 symbol_name_format: menu_$VRAM subsegments: - [0xE74D00, c, fox_i_menu] @@ -163,6 +191,11 @@ - [0xEA4760, .rodata, fox_title] - [0xEA4B00, .rodata, fox_option] - [0xEA4F00, .rodata, fox_map] + - { start: 0xEA5610, type: bss, vram: 0x801AF0B0, name: fox_menu } + - { start: 0xEA5610, type: bss, vram: 0x801AF0C0, name: fox_title } + - { start: 0xEA5610, type: bss, vram: 0x801B05A0, name: fox_option } + - { start: 0xEA5610, type: bss, vram: 0x801B0910, name: fox_map } + - name: ovl_ending exclusive_ram_id: overlay @@ -170,8 +203,8 @@ dir: overlays/ovl_ending start: 0xEA5610 vram: 0x8017E7A0 - #follows_vram: ast_radio - #bss_size: 0x2710 + follows_vram: dma_table + bss_size: 0x2710 symbol_name_format: ending_$VRAM subsegments: - [0xEA5610, c, fox_end1] @@ -180,6 +213,9 @@ - [0xEB0E50, data, fox_end2] - [0xEB41A0, .rodata, fox_end1] - [0xEB45A0, .rodata, fox_end2] + - { start: 0xEB4C00, type: bss, vram: 0x8018DD90, name: fox_end1 } + - { type: bss, vram: 0x8018F620, name: fox_end2 } + - name: ovl_unused exclusive_ram_id: overlay @@ -187,12 +223,12 @@ dir: overlays/ovl_unused start: 0xEB4C00 vram: 0x8017E7A0 - #follows_vram: ast_radio - #bss_size: 0x10 + follows_vram: dma_table + bss_size: 0x10 symbol_name_format: unused_$VRAM subsegments: - [0xEB4C00, c, fox_unused] - [0xEB4C10, data, fox_unused] + - { start: 0xEB4CA0, type: bss, vram: 0x8017E840, name: fox_unused } - - [0xEB4CA0] \ No newline at end of file From fdef9d6246f7c48cb3aece7ce8c31073bed6bb88 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Tue, 14 May 2024 22:29:21 -0300 Subject: [PATCH 093/151] version check for EU --- Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 2e783a95..d2163b20 100644 --- a/Makefile +++ b/Makefile @@ -86,7 +86,6 @@ $(error Unsupported compiler. Please use either ido or gcc as the COMPILER varia endif endif -# ditch g3, we aren't using that in GCC ifeq ($(COMPILER),gcc) OPTFLAGS := -Os else @@ -120,12 +119,17 @@ endif BUILD_DEFINES ?= +# Version check +ifeq ($(VERSION),jp) + BUILD_DEFINES += -DVERSION_JP=1 +endif + ifeq ($(VERSION),us) BUILD_DEFINES += -DVERSION_US=1 endif -ifeq ($(VERSION),jp) - BUILD_DEFINES += -DVERSION_JP=1 +ifeq ($(VERSION),eu) + BUILD_DEFINES += -DVERSION_EU=1 endif ifeq ($(NON_MATCHING),1) From 6dd8ceb9233395a65286aad73732941eb0e8a0bd Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Wed, 15 May 2024 13:39:32 -0300 Subject: [PATCH 094/151] more version checks --- Makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Makefile b/Makefile index d2163b20..af00a638 100644 --- a/Makefile +++ b/Makefile @@ -130,6 +130,17 @@ endif ifeq ($(VERSION),eu) BUILD_DEFINES += -DVERSION_EU=1 + REV := rev0 +endif + +ifeq ($(VERSION),au) + BUILD_DEFINES += -DVERSION_AU=1 + REV := rev0 +endif + +ifeq ($(VERSION),ln) + BUILD_DEFINES += -DVERSION_LN=1 + REV := rev0 endif ifeq ($(NON_MATCHING),1) From 1a5569bef573af78a6b723d052e0631329f82f6c Mon Sep 17 00:00:00 2001 From: petrie911 <69443847+petrie911@users.noreply.github.com> Date: Wed, 15 May 2024 13:41:15 -0500 Subject: [PATCH 095/151] Comptool support for byteswapped ROMs (#249) * comptool update * further updates * lodgenet * comptool and main split * one last thing --- .gitignore | 2 + Makefile | 2 +- include/sf64mesg.h | 192 +++++++++++++-------------- src/engine/fox_hud.c | 10 +- src/overlays/ovl_menu/fox_map.c | 4 +- tools/comptool.py | 223 +++++++++++++++++++++++++------- yamls/jp/rev0/main.yaml | 39 +++++- yamls/jp/rev0/overlays.yaml | 42 +++--- yamls/us/rev1/main.yaml | 2 +- yamls/us/rev1/overlays.yaml | 22 ++-- 10 files changed, 351 insertions(+), 187 deletions(-) diff --git a/.gitignore b/.gitignore index aa907133..d4735450 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,8 @@ ctx.c.m2c *_auto.ld *.n64 *.z64 +*.v64 +*.u64 *.bin *.otr *.eeprom diff --git a/Makefile b/Makefile index af00a638..e1e65dfa 100644 --- a/Makefile +++ b/Makefile @@ -444,7 +444,7 @@ endif decompress: $(BASEROM) @echo "Decompressing ROM..." - @$(PYTHON) $(COMPTOOL) $(DECOMPRESS_OPT) -de $(COMPTOOL_DIR) -m $(MIO0) $(BASEROM) $(BASEROM_UNCOMPRESSED) + @$(PYTHON) $(COMPTOOL) $(DECOMPRESS_OPT) -dse $(COMPTOOL_DIR) -m $(MIO0) $(BASEROM) $(BASEROM_UNCOMPRESSED) compress: $(BASEROM) @echo "Compressing ROM..." diff --git a/include/sf64mesg.h b/include/sf64mesg.h index d116b71c..3f7ded2c 100644 --- a/include/sf64mesg.h +++ b/include/sf64mesg.h @@ -68,104 +68,104 @@ void Radio_Draw(void); typedef enum MsgCharCode { // Non-printing and whitespace - MSGCHAR_END, // End message - MSGCHAR_NWL, // New line - MSGCHAR_NP2, // No effect - MSGCHAR_NP3, // No effect - MSGCHAR_NP4, // No effect - MSGCHAR_NP5, // No effect - MSGCHAR_NP6, // No effect - MSGCHAR_NP7, // No effect - MSGCHAR_PRI0, // Set message priority - MSGCHAR_PRI1, // Set message priority - MSGCHAR_PRI2, // Set message priority - MSGCHAR_PRI3, // Set message priority - MSGCHAR_SPC, // Space - MSGCHAR_QSP, // Quarter space - MSGCHAR_HSP, // Half Space - MSGCHAR_NXT, // Next text box + /* 0 */ MSGCHAR_END, // End message + /* 1 */ MSGCHAR_NWL, // New line + /* 2 */ MSGCHAR_NP2, // No effect + /* 3 */ MSGCHAR_NP3, // No effect + /* 4 */ MSGCHAR_NP4, // No effect + /* 5 */ MSGCHAR_NP5, // No effect + /* 6 */ MSGCHAR_NP6, // No effect + /* 7 */ MSGCHAR_NP7, // No effect + /* 8 */ MSGCHAR_PRI0, // Set message priority + /* 9 */ MSGCHAR_PRI1, // Set message priority + /* 10 */ MSGCHAR_PRI2, // Set message priority + /* 11 */ MSGCHAR_PRI3, // Set message priority + /* 12 */ MSGCHAR_SPC, // Space + /* 13 */ MSGCHAR_QSP, // Quarter space + /* 14 */ MSGCHAR_HSP, // Half Space + /* 15 */ MSGCHAR_NXT, // Next text box // printing characters - MSGCHAR_CLF, // C-Left - MSGCHAR_CUP, // C-Up - MSGCHAR_CRT, // C-Right - MSGCHAR_CDN, // C-Down - MSGCHAR_AUP, // Up arrow - MSGCHAR_ALF, // Left arrow - MSGCHAR_ADN, // Down arrow - MSGCHAR_ART, // Right arrow - MSGCHAR_A, // A - MSGCHAR_B, // B - MSGCHAR_C, // C - MSGCHAR_D, // D - MSGCHAR_E, // E - MSGCHAR_F, // F - MSGCHAR_G, // G - MSGCHAR_H, // H - MSGCHAR_I, // I - MSGCHAR_J, // J - MSGCHAR_K, // K - MSGCHAR_L, // L - MSGCHAR_M, // M - MSGCHAR_N, // N - MSGCHAR_O, // O - MSGCHAR_P, // P - MSGCHAR_Q, // Q - MSGCHAR_R, // R - MSGCHAR_S, // S - MSGCHAR_T, // T - MSGCHAR_U, // U - MSGCHAR_V, // V - MSGCHAR_W, // W - MSGCHAR_X, // X - MSGCHAR_Y, // Y - MSGCHAR_Z, // Z - MSGCHAR_a, // a - MSGCHAR_b, // b - MSGCHAR_c, // c - MSGCHAR_d, // d - MSGCHAR_e, // e - MSGCHAR_f, // f - MSGCHAR_g, // g - MSGCHAR_h, // h - MSGCHAR_i, // i - MSGCHAR_j, // j - MSGCHAR_k, // k - MSGCHAR_l, // l - MSGCHAR_m, // m - MSGCHAR_n, // n - MSGCHAR_o, // o - MSGCHAR_p, // p - MSGCHAR_q, // q - MSGCHAR_r, // r - MSGCHAR_s, // s - MSGCHAR_t, // t - MSGCHAR_u, // u - MSGCHAR_v, // v - MSGCHAR_w, // w - MSGCHAR_x, // x - MSGCHAR_y, // y - MSGCHAR_z, // z - MSGCHAR_EXM, // ! - MSGCHAR_QST, // ? - MSGCHAR_DSH, // - - MSGCHAR_CMA, // , - MSGCHAR_PRD, // . - MSGCHAR_0, // 0 - MSGCHAR_1, // 1 - MSGCHAR_2, // 2 - MSGCHAR_3, // 3 - MSGCHAR_4, // 4 - MSGCHAR_5, // 5 - MSGCHAR_6, // 6 - MSGCHAR_7, // 7 - MSGCHAR_8, // 8 - MSGCHAR_9, // 9 - MSGCHAR_APS, // ' - MSGCHAR_LPR, // ( - MSGCHAR_RPR, // ) - MSGCHAR_CLN, // : - MSGCHAR_PIP, // | + /* 16 */ MSGCHAR_CLF, // C-Left + /* 17 */ MSGCHAR_CUP, // C-Up + /* 18 */ MSGCHAR_CRT, // C-Right + /* 19 */ MSGCHAR_CDN, // C-Down + /* 20 */ MSGCHAR_AUP, // Up arrow + /* 21 */ MSGCHAR_ALF, // Left arrow + /* 22 */ MSGCHAR_ADN, // Down arrow + /* 23 */ MSGCHAR_ART, // Right arrow + /* 24 */ MSGCHAR_A, // A + /* 25 */ MSGCHAR_B, // B + /* 26 */ MSGCHAR_C, // C + /* 27 */ MSGCHAR_D, // D + /* 28 */ MSGCHAR_E, // E + /* 29 */ MSGCHAR_F, // F + /* 30 */ MSGCHAR_G, // G + /* 31 */ MSGCHAR_H, // H + /* 32 */ MSGCHAR_I, // I + /* 33 */ MSGCHAR_J, // J + /* 34 */ MSGCHAR_K, // K + /* 35 */ MSGCHAR_L, // L + /* 36 */ MSGCHAR_M, // M + /* 37 */ MSGCHAR_N, // N + /* 38 */ MSGCHAR_O, // O + /* 39 */ MSGCHAR_P, // P + /* 40 */ MSGCHAR_Q, // Q + /* 41 */ MSGCHAR_R, // R + /* 42 */ MSGCHAR_S, // S + /* 43 */ MSGCHAR_T, // T + /* 44 */ MSGCHAR_U, // U + /* 45 */ MSGCHAR_V, // V + /* 46 */ MSGCHAR_W, // W + /* 47 */ MSGCHAR_X, // X + /* 48 */ MSGCHAR_Y, // Y + /* 49 */ MSGCHAR_Z, // Z + /* 50 */ MSGCHAR_a, // a + /* 51 */ MSGCHAR_b, // b + /* 52 */ MSGCHAR_c, // c + /* 53 */ MSGCHAR_d, // d + /* 54 */ MSGCHAR_e, // e + /* 55 */ MSGCHAR_f, // f + /* 56 */ MSGCHAR_g, // g + /* 57 */ MSGCHAR_h, // h + /* 58 */ MSGCHAR_i, // i + /* 59 */ MSGCHAR_j, // j + /* 60 */ MSGCHAR_k, // k + /* 61 */ MSGCHAR_l, // l + /* 62 */ MSGCHAR_m, // m + /* 63 */ MSGCHAR_n, // n + /* 64 */ MSGCHAR_o, // o + /* 65 */ MSGCHAR_p, // p + /* 66 */ MSGCHAR_q, // q + /* 67 */ MSGCHAR_r, // r + /* 68 */ MSGCHAR_s, // s + /* 69 */ MSGCHAR_t, // t + /* 70 */ MSGCHAR_u, // u + /* 71 */ MSGCHAR_v, // v + /* 72 */ MSGCHAR_w, // w + /* 73 */ MSGCHAR_x, // x + /* 74 */ MSGCHAR_y, // y + /* 75 */ MSGCHAR_z, // z + /* 76 */ MSGCHAR_EXM, // ! + /* 77 */ MSGCHAR_QST, // ? + /* 78 */ MSGCHAR_DSH, // - + /* 79 */ MSGCHAR_CMA, // , + /* 80 */ MSGCHAR_PRD, // . + /* 81 */ MSGCHAR_0, // 0 + /* 82 */ MSGCHAR_1, // 1 + /* 83 */ MSGCHAR_2, // 2 + /* 84 */ MSGCHAR_3, // 3 + /* 85 */ MSGCHAR_4, // 4 + /* 86 */ MSGCHAR_5, // 5 + /* 87 */ MSGCHAR_6, // 6 + /* 88 */ MSGCHAR_7, // 7 + /* 89 */ MSGCHAR_8, // 8 + /* 90 */ MSGCHAR_9, // 9 + /* 91 */ MSGCHAR_APS, // ' + /* 92 */ MSGCHAR_LPR, // ( + /* 93 */ MSGCHAR_RPR, // ) + /* 94 */ MSGCHAR_CLN, // : + /* 95 */ MSGCHAR_PIP, // | } MsgCharCode; #endif diff --git a/src/engine/fox_hud.c b/src/engine/fox_hud.c index 29467f71..818a08fd 100644 --- a/src/engine/fox_hud.c +++ b/src/engine/fox_hud.c @@ -756,7 +756,7 @@ void HUD_DrawLevelClearScreen(void) { f32 x; f32 y; - if ((gPlayState != PLAY_PAUSE) && (gLevelClearScreenTimer)) { + if ((gPlayState != PLAY_PAUSE) && (gLevelClearScreenTimer != 0)) { gLevelClearScreenTimer--; } @@ -1057,7 +1057,7 @@ void HUD_DrawLevelClearStatusScreen(void) { D_801617C0[0] = 0; } - if ((gPlayState != PLAY_PAUSE) && (gShowLevelClearStatusScreen == 1) && (!D_801617E8[0])) { + if ((gPlayState != PLAY_PAUSE) && (gShowLevelClearStatusScreen == 1) && (D_801617E8[0] == 0)) { switch (D_801617C0[0]) { case 0: D_801617C0[5] = gHitCount; @@ -1415,7 +1415,7 @@ void func_hud_80088970(void) { player = &gPlayer[gPlayerNum]; - if ((gPlayState == PLAY_PAUSE) && !gLevelStartStatusScreenTimer && !gVersusMode) { + if ((gPlayState == PLAY_PAUSE) && (gLevelStartStatusScreenTimer == 0) && !gVersusMode) { switch (D_80161810[0]) { case 0: D_80161838[0] = 0; @@ -2014,7 +2014,7 @@ s32 func_hud_8008A4DC(void) { return 0; } - if (gLevelStartStatusScreenTimer) { + if (gLevelStartStatusScreenTimer != 0) { D_800D1E10 = 60.0f; } else { Math_SmoothStepToF(&D_800D1E10, 0.0f, 0.3f, 10.0f, 0.1f); @@ -2478,7 +2478,7 @@ s32 func_hud_8008B774(void) { switch (i) { case 0: - if (gPlayer[0].radioDamageTimer) { + if (gPlayer[0].radioDamageTimer != 0) { ret = 1; } break; diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index 32cb4948..2d22e6a0 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -5812,7 +5812,7 @@ void Map_801AB300(void) { break; case 210: - if (gRadioStateTimer) { + if (gRadioStateTimer != 0) { break; } @@ -5886,7 +5886,7 @@ void Map_801AB300(void) { break; case 41: - if (gRadioStateTimer) { + if (gRadioStateTimer != 0) { break; } diff --git a/tools/comptool.py b/tools/comptool.py index 8d324876..4bb3ff2a 100644 --- a/tools/comptool.py +++ b/tools/comptool.py @@ -6,18 +6,7 @@ import struct import argparse import sys -file_table_dict = {0xDE480:"US 1.1", 0xD9A90:"US 1.0", 0xE93C0:"JP 1.0"} - -file_names_us = [ - "makerom", "main", "dma_table", "audio_seq", "audio_bank", "audio_table", "ast_common", "ast_bg_space", "ast_bg_planet", - "ast_arwing", "ast_landmaster", "ast_blue_marine", "ast_versus", "ast_enmy_planet", "ast_enmy_space", "ast_great_fox", - "ast_star_wolf", "ast_allies", "ast_corneria", "ast_meteo", "ast_titania", "ast_7_ti_2", "ast_8_ti", "ast_9_ti", "ast_A_ti", - "ast_7_ti_1", "ast_sector_x", "ast_sector_z", "ast_aquas", "ast_area_6", "ast_venom_1", "ast_venom_2", "ast_ve1_boss", - "ast_bolse", "ast_fortuna", "ast_sector_y", "ast_solar", "ast_zoness", "ast_katina", "ast_macbeth", "ast_warp_zone", - "ast_title", "ast_map", "ast_option", "ast_vs_menu", "ast_text", "ast_font_3d", "ast_andross", "ast_logo", "ast_ending", - "ast_ending_award_front", "ast_ending_award_back", "ast_ending_expert", "ast_training", "ast_radio", "ovl_i1", "ovl_i2", - "ovl_i3", "ovl_i4", "ovl_i5", "ovl_i6", "ovl_menu", "ovl_ending", "ovl_unused" - ] +file_table_dict = {"US 1.1":0xDE480, "US 1.0":0xD9A90, "JP 1.0":0xE93C0, "JP 1.1":0xF2A10, "EU 1.0":0xE0570, "AU 1.0":0xE0470, "LN 1.0":0xE44F0} file_names_jp = [ "makerom", "main", "dma_table", "audio_seq", "audio_bank", "audio_table", "ast_common", "ast_bg_space", "ast_bg_planet", @@ -30,7 +19,63 @@ file_names_jp = [ "ovl_i3", "ovl_i4", "ovl_i5", "ovl_i6", "ovl_menu", "ovl_ending", "ovl_unused" ] -file_names_critical = {"makerom", "main", "dma_table", "audio_seq", "audio_bank", "audio_table"} +file_names_us = [ + "makerom", "main", "dma_table", "audio_seq", "audio_bank", "audio_table", "ast_common", "ast_bg_space", "ast_bg_planet", + "ast_arwing", "ast_landmaster", "ast_blue_marine", "ast_versus", "ast_enmy_planet", "ast_enmy_space", "ast_great_fox", + "ast_star_wolf", "ast_allies", "ast_corneria", "ast_meteo", "ast_titania", "ast_7_ti_2", "ast_8_ti", "ast_9_ti", "ast_A_ti", + "ast_7_ti_1", "ast_sector_x", "ast_sector_z", "ast_aquas", "ast_area_6", "ast_venom_1", "ast_venom_2", "ast_ve1_boss", + "ast_bolse", "ast_fortuna", "ast_sector_y", "ast_solar", "ast_zoness", "ast_katina", "ast_macbeth", "ast_warp_zone", + "ast_title", "ast_map", "ast_option", "ast_vs_menu", "ast_text", "ast_font_3d", "ast_andross", "ast_logo", "ast_ending", + "ast_ending_award_front", "ast_ending_award_back", "ast_ending_expert", "ast_training", "ast_radio", "ovl_i1", "ovl_i2", + "ovl_i3", "ovl_i4", "ovl_i5", "ovl_i6", "ovl_menu", "ovl_ending", "ovl_unused" + ] + +file_names_pal = [ + "makerom", "main", "dma_table", "audio_seq", "audio_bank", "audio_table", "ast_common", "ast_bg_space", "ast_bg_planet", + "ast_arwing", "ast_landmaster", "ast_blue_marine", "ast_versus", "ast_enmy_planet", "ast_enmy_space", "ast_great_fox", + "ast_star_wolf", "ast_allies", "ast_corneria", "ast_meteo", "ast_titania", "ast_7_ti_2", "ast_8_ti", "ast_9_ti", "ast_A_ti", + "ast_7_ti_1", "ast_sector_x", "ast_sector_z", "ast_aquas", "ast_area_6", "ast_venom_1", "ast_venom_2", "ast_ve1_boss", + "ast_bolse", "ast_fortuna", "ast_sector_y", "ast_solar", "ast_zoness", "ast_katina", "ast_macbeth", "ast_warp_zone", + "ast_title", "ast_map", "ast_option", "ast_vs_menu", "ast_text", "ast_unk_1", "ast_unk_2", "ast_unk_3", + "ast_unk_4", "ast_unk_5", "ast_unk_6", "ast_unk_7", "ast_unk_8", "ast_unk_9", "ast_font_3d", "ast_andross","ast_logo", "ast_ending", + "ast_ending_award_front", "ast_ending_award_back", "ast_ending_expert", "ast_training", "ast_radio_de", "ovl_i1", "ovl_i2", "ovl_i3", + "ovl_i4", "ovl_i5", "ovl_i6", "ovl_menu", "ovl_ending", "ovl_unused", "ast_radio_en", "ast_radio_fr" + ] + +file_names_critical = ["makerom", "main", "dma_table", "audio_seq", "audio_bank", "audio_table"] + +decomp_inds_ntsc = [0, 1, 2, 3, 4, 5, 15, 16, 21, 22, 23, 24, 48] +decomp_inds_pal = [0, 1, 2, 3, 4, 5, 15, 16, 21, 22, 23, 24, 57] + +def get_version_info(ROM): + with open(ROM, "rb") as ROMfile: + ROMfile.seek(0x3E, 0) + region = ROMfile.read(1).decode() + rev =" 1.%d" % int.from_bytes(ROMfile.read(1), 'big') + + + if region == "J": + file_names = file_names_jp + decomp_inds = decomp_inds_ntsc + version = "JP" + elif region == "E" or region == "G": + file_names = file_names_us + decomp_inds = decomp_inds_ntsc + version = "LN" if region == "G" else "US" + elif region == "P" or region == "U": + print("Warning: PAL menu assets are not fully documented.") + file_names = file_names_pal + decomp_inds = decomp_inds_pal + version = "AU" if region == "U" else "EU" + else: + file_names = "file_%d_%X" + decomp_inds = None + version = "Unknown" + + if version != "Unknown": + version += rev + + return (version, file_names, decomp_inds) def int32(x): return x & 0xFFFFFFFF @@ -101,35 +146,102 @@ def mio0_dec_bytes(comp_bytes, mio0): return decomp_bytes +swap_backup = False + +def fix_byte_swap(ROM, outROM): + with open(ROM, 'rb') as ROMfile: + ROMfile.seek(0x20,0) + + game_str = ROMfile.read(4).decode() + + if game_str == "STAR": + print("Provided ROM is big endian.") + return ROM + + ROMfile.seek(0,0) + + ROM_bytes = ROMfile.read() + + s = game_str.find("S") + t = game_str.find("T") + a = game_str.find("A") + r = game_str.find("R") + + if(s == -1 or t == -1 or a == -1 or r==-1): + print('Name string absent. There may be a problem with your ROM.') + sys.exit(2) + + if game_str == "RATS": + print("Provided ROM is little endian.") + byte_order = "LE" + suffix = ".LE.n64" + elif game_str == "TSRA": + print("Provided ROM is byteswapped.") + byte_order = "BS" + suffix = ".BS.v64" + else: + byte_order = "%d%d%d%d" % (s, t, a, r) + suffix = "." + byte_order + ".u64" + print("Provided ROM has unusual byte order " + byte_order) + if swap_backup: + backup = os.path.splitext(ROM)[0] + suffix + with open(backup, "wb") as bakfile: + print("Writing backup file " + backup) + bakfile.write(ROM_bytes) + outROM = ROM + + ROM_array = [bytearray([ROM_bytes[4*x + s], ROM_bytes[4*x + t], ROM_bytes[4*x + a], ROM_bytes[4*x + r]]) + for x in range(len(ROM_bytes) // 4) + ] + + with open(outROM, 'wb') as tempROMfile: + tempROMfile.write(b''.join(ROM_array)) + + return outROM + + def find_file_table(ROM): with open(ROM, 'rb') as ROMfile: ROMfile.seek(0,0) - main_area = ROMfile.read(0x100000) + main_area = ROMfile.read() file_table_start = main_area.find(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x50\x00\x00\x00\x00') + if file_table_start == -1: + file_table_start = main_area.find(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x60\x00\x00\x00\x00') - if(file_table_start == -1): + if file_table_start == -1: print('File table not found.') sys.exit(2) - elif(file_table_start > 0x100000): + elif file_table_start > 0x100000: print("Warning: Detected file table offset 0x%X is larger than expected." % file_table_start) # print(file_table_start) return file_table_start -decomp_inds = [0, 1, 2, 3, 4, 5, 15, 16, 21, 22, 23, 24, 48] def compress(baserom, comprom, mio0, dma_table=None, verbose=False): if dma_table: file_table = int(dma_table, 0) - print("Using provided DMA table offset 0x%X" % file_table) + if verbose: + print("Using provided DMA table offset 0x%X" % file_table) else: file_table = find_file_table(baserom) - print("DMA table found at 0x%X" % file_table) + if verbose: + print("DMA table found at 0x%X" % file_table) - print("Detected ROM version is " + file_table_dict.get(file_table, "Unknown")) + + (version, file_names, decomp_inds) = get_version_info(baserom) + ft_version = file_table_dict.get(version) + + if version == "Unknown": + print("Unknown version. Unable to determine compression scheme.") + sys.exit(2) + elif ft_version and ft_version != file_table: + print("Warning: No record of DMA table at 0x%X for %s" % (file_table, version)) + elif verbose: + print("Detected ROM version is " + version) # comp_const = 0xFFFEFFFFFE1E7FC0 @@ -137,7 +249,6 @@ def compress(baserom, comprom, mio0, dma_table=None, verbose=False): file_count = 0 p_file_begin = 0 - while True: file_entry = file_table + 0x10 * file_count basefile.seek(file_entry + 4) @@ -147,7 +258,7 @@ def compress(baserom, comprom, mio0, dma_table=None, verbose=False): v_file_size = v_file_end - v_file_begin - if(v_file_begin == 0 and v_file_end == 0): + if v_file_begin == 0 and v_file_end == 0: break basefile.seek(v_file_begin) @@ -155,10 +266,7 @@ def compress(baserom, comprom, mio0, dma_table=None, verbose=False): file_bytes = basefile.read(v_file_size) - if file_table_dict.get(file_table).startswith("JP"): - file_name = file_names_jp[file_count] - else: - file_name = file_names_us[file_count] + file_name = file_names[file_count] if (file_count in decomp_inds) or (file_name in file_names_critical): # if (1 << file_count) & comp_flags: @@ -210,20 +318,26 @@ def compress(baserom, comprom, mio0, dma_table=None, verbose=False): return def decompress(baserom, decomprom, mio0, extract_dest=None, dma_table=None, print_inds=False, verbose=False): + baserom = fix_byte_swap(baserom, baserom + "zxqj") + if dma_table: file_table = int(dma_table, 0) print("Using provided DMA table offset 0x%X" % file_table) else: file_table = find_file_table(baserom) print("DMA table found at 0x%X" % file_table) + + (version, file_names, decomp_inds) = get_version_info(baserom) + ft_version = file_table_dict.get(version) + - if file_table_dict.get(file_table): - version = file_table_dict.get(file_table) - print("Detected ROM version is " + version) + if version == "Unknown": + print("Could not detect version") + elif ft_version and ft_version != file_table: + print("Warning: No record of DMA table at 0x%X for %s" % (file_table, version)) else: - print("Could not detect version.") - version = "Unknown" - + print("Detected ROM version is " + version) + with open(decomprom, 'w+b') as decompfile, open(baserom, 'rb') as basefile: file_count = 0 decomp_file_inds = [] @@ -241,7 +355,7 @@ def decompress(baserom, decomprom, mio0, extract_dest=None, dma_table=None, prin #print(v_file_begin, p_file_begin, p_file_end, comp_flag) - if(v_file_begin == 0 and p_file_end == 0): + if v_file_begin == 0 and p_file_end == 0: break decompfile.truncate(v_file_begin) @@ -254,6 +368,7 @@ def decompress(baserom, decomprom, mio0, extract_dest=None, dma_table=None, prin v_file_size = p_file_size decomp_file_inds += [file_count] dec_msg = 'uncompressed' + elif comp_flag == 1: file_bytes = mio0_dec_bytes(file_bytes, mio0) dec_msg = 'compressed' @@ -268,14 +383,15 @@ def decompress(baserom, decomprom, mio0, extract_dest=None, dma_table=None, prin v_file_end = v_file_begin + v_file_size - if file_table_dict.get(file_table).startswith("JP"): - file_name = file_names_jp[file_count] + if decomp_inds: + file_name = file_names[file_count] else: - file_name = file_names_us[file_count] - - if(verbose): + file_name = file_names % (file_count, v_file_begin) + + if verbose: print("name: " + file_name) print("start: 0x%X" % v_file_begin) + # print("index", file_count, dec_msg, "; size: 0x%X" % v_file_size) if extract_dest is not None: if not os.path.exists(extract_dest): @@ -284,7 +400,7 @@ def decompress(baserom, decomprom, mio0, extract_dest=None, dma_table=None, prin if version == "Unknown": suffix = "%X" % file_table else: - suffix = version.replace("1.", ".rev").lower() + suffix = version.replace(" 1.", ".rev").lower() out_file_name = file_name + "." + suffix + ".bin" with open(extract_dest + os.sep + out_file_name, 'wb') as extract_file: @@ -312,21 +428,25 @@ def decompress(baserom, decomprom, mio0, extract_dest=None, dma_table=None, prin elif decomp_file_inds != decomp_inds: print("Warning: Unusual compression scheme. These files were uncompressed:") print(decomp_file_inds) + + if baserom.endswith("zxqj"): + run(["rm", baserom]) + return parser = argparse.ArgumentParser(description='Compress or decompress a Star Fox 64 ROM') -parser.add_argument('inROM', help="ROM file to compress or decompress") -parser.add_argument('outROM', help="output file for processed ROM.") -parser.add_argument('-c', action='store_true',help='compress provided ROM') -parser.add_argument('-d', action='store_true',help='decompress provided ROM') -parser.add_argument('-e', metavar='extract',dest='extract',help='directory for extracted decompressed files. Use with -d') -parser.add_argument('-r', action="store_true",help='Fix crc without compressing or decompressing') -parser.add_argument('-m', metavar='mio0',dest='mio0',help='Path to mio0 tool if not in same directory') +parser.add_argument('inROM', help="ROM file to process") +parser.add_argument('outROM', help="Output file for processed ROM.") +parser.add_argument('-c', action='store_true',help='Compress a big endian uncompressed Star Fox 64 ROM') +parser.add_argument('-d', action='store_true',help='Decompress a Star Fox 64 ROM. Use with -s to also make a big endian compressed ROM.') +parser.add_argument('-e', metavar='extract',dest='extract',help='Directory for extracted decompressed files. Use with -d') +parser.add_argument('-r', action="store_true",help='Fix crc of Star Fox 64 ROM without compressing or decompressing') +parser.add_argument('-s', action='store_true',help='Swap a Star Fox 64 ROM to big endian (.z64). Use . as second argument to swap in-place or .b to also make a backup') +parser.add_argument('-m', metavar='mio0',dest='mio0',help='Path to mio0 tool if not named "mio0" and in same directory') parser.add_argument('-i', action='store_true',help='Print indices of uncompressed files during decompression.') parser.add_argument('-v', action='store_true',help='Print details about the ROM files.') parser.add_argument('-t', metavar='dma_table', dest='dma_table',help='Provide DMA table explicitly instead of autodetecting') - if __name__ == '__main__': args = parser.parse_args() @@ -340,7 +460,14 @@ if __name__ == '__main__': elif args.c: compress(args.inROM, args.outROM, mio0, dma_table=args.dma_table, verbose=args.v) elif args.d or args.extract: + swap_backup = args.s decompress(args.inROM, args.outROM, mio0, extract_dest=args.extract, dma_table=args.dma_table, print_inds=args.i, verbose=args.v) + elif args.s: + if args.outROM[0] == ".": + args.outRom = args.inRom + if args.outROM == ".b": + swap_backup = True + fix_byte_swap(args.inROM, args.outROM) else: - print("Something went wrong.") + print("No action specified. Use -c, -d, -e, -r, or -s to specify an action") diff --git a/yamls/jp/rev0/main.yaml b/yamls/jp/rev0/main.yaml index 754a6248..9bbb4b9f 100644 --- a/yamls/jp/rev0/main.yaml +++ b/yamls/jp/rev0/main.yaml @@ -260,8 +260,43 @@ - [0xE7650, data, wave_samples] - [0xE8270, data, note_data] - # bss - - { start: 0xE93C0, type: bss, vram: 0x800E87C0, name: main } + # Nintendo Library bss + - { type: bss, vram: 0x800E87C0, name: sys_joybus } + - { type: bss, vram: 0x800E89E0, name: sys_main } + - { type: bss, vram: 0x801462E0, name: sys_math } + - { type: bss, vram: 0x80146300, name: sys_matrix } + - { type: bss, vram: 0x80147310, name: sys_memory } + - { type: bss, vram: 0x8014FB20, name: sys_timer } + - { type: bss, vram: 0x8014FEA0, name: sys_save } + - { type: bss, vram: 0x801502A0, name: sys_fault } + - { type: bss, vram: 0x80150C80, name: audio/audio_synthesis } + - { type: bss, vram: 0x80151CC0, name: audio/audio_load } + - { type: bss, vram: 0x80151DA0, name: audio/audio_general } + - { type: bss, vram: 0x80156980, name: audio/audio_context } + - { type: bss, vram: 0x80160CE0, name: audio/audio_thread } + + # Libultra bss + - { type: bss, vram: 0x80161560, name: libultra } + + # Game engine bss + - { type: .bss, vram: 0x801650A0, name: engine/fox_360 } + - { type: .bss, vram: 0x801650F0, name: engine/fox_beam } + - { type: .bss, vram: 0x80165100, name: engine/fox_bg } + - { type: .bss, vram: 0x80166B40, name: engine/fox_boss } + - { type: .bss, vram: 0x80166B50, name: engine/fox_display } + - { type: .bss, vram: 0x80166D70, name: engine/fox_edisplay } + - { type: .bss, vram: 0x80166E10, name: engine/fox_enmy } + - { type: .bss, vram: 0x80166E30, name: engine/fox_enmy2 } + - { type: .bss, vram: 0x80166E40, name: engine/fox_hud } + - { type: .bss, vram: 0x801670F0, name: engine/fox_col1 } + - { type: .bss, vram: 0x80167140, name: engine/fox_std_lib } + - { type: .bss, vram: 0x801671B0, name: engine/fox_game } + - { type: .bss, vram: 0x801671F0, name: engine/fox_play } + - { type: .bss, vram: 0x80167210, name: engine/fox_context} + - { type: .bss, vram: 0x8017DD20, name: engine/fox_rcp } + - { type: .bss, vram: 0x8017DEC0, name: engine/fox_radio } + - { type: .bss, vram: 0x8017DEF0, name: engine/fox_versus } + - { type: .bss, vram: 0x8017E010, name: engine/fox_save } - name: dma_table type: code diff --git a/yamls/jp/rev0/overlays.yaml b/yamls/jp/rev0/overlays.yaml index 0ba6e18d..8f59011c 100644 --- a/yamls/jp/rev0/overlays.yaml +++ b/yamls/jp/rev0/overlays.yaml @@ -21,9 +21,9 @@ - [0xDBD410, .rodata, fox_ve1] - [0xDBD7A0, .rodata, fox_tr] - [0xDBD7E0, .rodata, fox_tr360] - - { start: 0xDBD820, type: bss, vram: 0x80192940, name: fox_i1 } - - { start: 0xDBD820, type: bss, vram: 0x80192950, name: fox_co } - - { start: 0xDBD820, type: bss, vram: 0x80192A70, name: fox_ve1 } + - { type: bss, vram: 0x80192940, name: fox_i1 } + - { type: bss, vram: 0x80192950, name: fox_co } + - { type: bss, vram: 0x80192A70, name: fox_ve1 } - name: ovl_i2 exclusive_ram_id: overlay @@ -43,8 +43,8 @@ - [0xDCB8F0, data, fox_sx] - [0xDCBA40, .rodata, fox_me] - [0xDCBD00, .rodata, fox_sx] - - { start: 0xDCC020, type: bss, vram: 0x8018CFA0, name: fox_i2 } - - { start: 0xDCC020, type: bss, vram: 0x8018CFB0, name: fox_sx } + - { type: bss, vram: 0x8018CFA0, name: fox_i2 } + - { type: bss, vram: 0x8018CFB0, name: fox_sx } - name: ovl_i3 exclusive_ram_id: overlay @@ -70,11 +70,11 @@ - [0xE058E0, .rodata, fox_zo] - [0xE06000, .rodata, fox_so] - [0xE06560, .rodata, fox_aq] - - { start: 0xE06D70, type: bss, vram: 0x801B94F0, name: fox_i3 } - - { start: 0xE06D70, type: bss, vram: 0x801B9500, name: fox_a6 } - - { start: 0xE06D70, type: bss, vram: 0x801B95E0, name: fox_zo } - - { start: 0xE06D70, type: bss, vram: 0x801B99F0, name: fox_so } - - { start: 0xE06D70, type: bss, vram: 0x801B9A70, name: fox_aq } + - { type: bss, vram: 0x801B94F0, name: fox_i3 } + - { type: bss, vram: 0x801B9500, name: fox_a6 } + - { type: bss, vram: 0x801B95E0, name: fox_zo } + - { type: bss, vram: 0x801B99F0, name: fox_so } + - { type: bss, vram: 0x801B9A70, name: fox_aq } - name: ovl_i4 @@ -102,10 +102,10 @@ - [0xE1EDE0, .rodata, fox_bo] - [0xE1F1E0, .rodata, fox_ka] - [0xE1F570, .rodata, fox_sz] - - { start: 0xE1F870, type: bss, vram: 0x801972A0, name: fox_i4 } - - { start: 0xE1F870, type: bss, vram: 0x801972B0, name: fox_bo } - - { start: 0xE1F870, type: bss, vram: 0x80197420, name: fox_ka } - - { start: 0xE1F870, type: bss, vram: 0x80197440, name: fox_sz } + - { type: bss, vram: 0x801972A0, name: fox_i4 } + - { type: bss, vram: 0x801972B0, name: fox_bo } + - { type: bss, vram: 0x80197420, name: fox_ka } + - { type: bss, vram: 0x80197440, name: fox_sz } - name: ovl_i5 @@ -133,10 +133,10 @@ - [0xE52E30, .rodata, fox_ti] - [0xE53690, .rodata, fox_ma] - [0xE541D0, .rodata, fox_ground] - - { start: 0xE542C0, type: bss, vram: 0x801B31F0, name: fox_i5 } - - { start: 0xE542C0, type: bss, vram: 0x801B3200, name: fox_ti } - - { start: 0xE542C0, type: bss, vram: 0x801B5540, name: fox_ma } - - { start: 0xE542C0, type: bss, vram: 0x801B5A40, name: fox_ground } + - { type: bss, vram: 0x801B31F0, name: fox_i5 } + - { type: bss, vram: 0x801B3200, name: fox_ti } + - { type: bss, vram: 0x801B5540, name: fox_ma } + - { type: bss, vram: 0x801B5A40, name: fox_ground } - name: ovl_i6 @@ -164,9 +164,9 @@ - [0xE74210, .rodata, fox_ve2] - [0xE74250, .rodata, fox_sy] - [0xE74CA0, .rodata, fox_turret] - - { start: 0xE74D00, type: bss, vram: 0x8019F1E0, name: fox_i6 } - - { start: 0xE74D00, type: bss, vram: 0x8019F1F0, name: fox_andross } - - { start: 0xE74D00, type: bss, vram: 0x8019F6E0, name: fox_sy } + - { type: bss, vram: 0x8019F1E0, name: fox_i6 } + - { type: bss, vram: 0x8019F1F0, name: fox_andross } + - { type: bss, vram: 0x8019F6E0, name: fox_sy } - name: ovl_menu diff --git a/yamls/us/rev1/main.yaml b/yamls/us/rev1/main.yaml index d570589c..bd7b919c 100644 --- a/yamls/us/rev1/main.yaml +++ b/yamls/us/rev1/main.yaml @@ -340,7 +340,7 @@ - [0xDD330, .data, audio/note_data] # Nintendo Library bss - - { start: 0xDE480, type: .bss, vram: 0x800DD880, name: sys/sys_joybus } + - { type: .bss, vram: 0x800DD880, name: sys/sys_joybus } - { type: .bss, vram: 0x800DDAA0, name: sys/sys_main } - { type: .bss, vram: 0x8013B3A0, name: sys/sys_math } - { type: .bss, vram: 0x8013B3C0, name: sys/sys_matrix } diff --git a/yamls/us/rev1/overlays.yaml b/yamls/us/rev1/overlays.yaml index 3c868211..c4947cd6 100644 --- a/yamls/us/rev1/overlays.yaml +++ b/yamls/us/rev1/overlays.yaml @@ -21,7 +21,7 @@ - [0xE07FF0, .rodata, fox_ve1] - [0xE08380, .rodata, fox_tr] - [0xE083C0, .rodata, fox_tr360] - - { start: 0xE08400, type: .bss, vram: 0x8019B6C0, name: fox_i1 } + - { type: .bss, vram: 0x8019B6C0, name: fox_i1 } - { type: .bss, vram: 0x8019B6D0, name: fox_co } - { type: .bss, vram: 0x8019B7F0, name: fox_ve1 } @@ -43,7 +43,7 @@ - [0xE16520, .data, fox_sx] - [0xE16670, .rodata, fox_me] - [0xE16930, .rodata, fox_sx] - - { start: 0xE16C50, type: .bss, vram: 0x80195D70, name: fox_i2 } + - { type: .bss, vram: 0x80195D70, name: fox_i2 } - { type: .bss, vram: 0x80195D80, name: fox_sx } - name: ovl_i3 @@ -70,7 +70,7 @@ - [0xE504E0, .rodata, fox_zo] - [0xE50C00, .rodata, fox_so] - [0xE51160, .rodata, fox_aq] - - { start: 0xE51970, type: .bss, vram: 0x801C2240, name: fox_i3 } + - { type: .bss, vram: 0x801C2240, name: fox_i3 } - { type: .bss, vram: 0x801C2250, name: fox_a6 } - { type: .bss, vram: 0x801C2330, name: fox_zo } - { type: .bss, vram: 0x801C2740, name: fox_so } @@ -101,7 +101,7 @@ - [0xE69D70, .rodata, fox_bo] - [0xE6A170, .rodata, fox_ka] - [0xE6A510, .rodata, fox_sz] - - { start: 0xE6A810, type: .bss, vram: 0x801A03C0, name: fox_i4 } + - { type: .bss, vram: 0x801A03C0, name: fox_i4 } - { type: .bss, vram: 0x801A03D0, name: fox_bo } - { type: .bss, vram: 0x801A0540, name: fox_ka } - { type: .bss, vram: 0x801A0560, name: fox_sz } @@ -112,7 +112,7 @@ dir: overlays/ovl_i5 start: 0xE6A810 vram: 0x80187520 - follows_vram: ast_radio + # follows_vram: ast_radio bss_size: 0xAF80 symbol_name_format: i5_$VRAM subsegments: @@ -131,7 +131,7 @@ - [0xE9DD40, .rodata, fox_ti] - [0xE9E5A0, .rodata, fox_ma] - [0xE9F0E0, .rodata, fox_ground] - - { start: 0xE9F1D0, type: .bss, vram: 0x801BBEE0, name: fox_i5 } + - { type: .bss, vram: 0x801BBEE0, name: fox_i5 } - { type: .bss, vram: 0x801BBEF0, name: fox_ti } - { type: .bss, vram: 0x801BE240, name: fox_ma } - { type: .bss, vram: 0x801BE740, name: fox_ground } @@ -161,7 +161,7 @@ - [0xEBF0F0, .rodata, fox_ve2] - [0xEBF130, .rodata, fox_sy] - [0xEBFB80, .rodata, fox_turret] - - { start: 0xEBFBE0, type: .bss, vram: 0x801A7F30, name: fox_i6 } + - { type: .bss, vram: 0x801A7F30, name: fox_i6 } - { type: .bss, vram: 0x801A7F40, name: fox_andross } - { type: .bss, vram: 0x801A8440, name: fox_sy } @@ -187,7 +187,7 @@ - [0xEEF430, .rodata, fox_title] - [0xEEF7D0, .rodata, fox_option] - [0xEEFB80, .rodata, fox_map] - - { start: 0xEF0260, type: .bss, vram: 0x801B7BA0, name: fox_i_menu } + - { type: .bss, vram: 0x801B7BA0, name: fox_i_menu } - { type: .bss, vram: 0x801B7BB0, name: fox_title } - { type: .bss, vram: 0x801B9090, name: fox_option } - { type: .bss, vram: 0x801B9410, name: fox_map } @@ -208,7 +208,7 @@ - [0xEFBBB0, .data, fox_end2] - [0xEFEF80, .rodata, fox_end1] - [0xEFF380, .rodata, fox_end2] - - { start: 0xEFFA40, type: .bss, vram: 0x80196D00, name: fox_end1 } + - { type: .bss, vram: 0x80196D00, name: fox_end1 } - { type: .bss, vram: 0x80198590, name: fox_end2 } - name: ovl_unused @@ -223,7 +223,7 @@ subsegments: - [0xEFFA40, c, fox_unused] - [0xEFFA50, .data, fox_unused] - - { start: 0xEFFAE0, type: .bss, vram: 0x801875C0, name: fox_unused } + - { type: .bss, vram: 0x801875C0, name: fox_unused } - name: buffers exclusive_ram_id: buffer @@ -232,6 +232,6 @@ vram: 0x80281000 bss_size: 0x17F000 subsegments: - - { start: 0xEFFAE0, type: .bss, vram: 0x80281000, name: buffers } + - { type: .bss, vram: 0x80281000, name: buffers } - [0xEFFAE0] \ No newline at end of file From 8019fb0fe26d91e81eda3b703429fed878161b5f Mon Sep 17 00:00:00 2001 From: Lywx Date: Wed, 15 May 2024 19:26:19 -0600 Subject: [PATCH 096/151] Updated segment offsets to match real jp ones (#250) --- assets/yaml/jp/rev0/ast_7_ti_1.yaml | 4 +- assets/yaml/jp/rev0/ast_7_ti_2.yaml | 2 +- assets/yaml/jp/rev0/ast_8_ti.yaml | 2 +- assets/yaml/jp/rev0/ast_9_ti.yaml | 2 +- assets/yaml/jp/rev0/ast_A_ti.yaml | 5 +- assets/yaml/jp/rev0/ast_allies.yaml | 2 +- assets/yaml/jp/rev0/ast_andross.yaml | 5 +- assets/yaml/jp/rev0/ast_aquas.yaml | 4 +- assets/yaml/jp/rev0/ast_area_6.yaml | 2 +- assets/yaml/jp/rev0/ast_arwing.yaml | 2 +- assets/yaml/jp/rev0/ast_bg_planet.yaml | 2 +- assets/yaml/jp/rev0/ast_bg_space.yaml | 2 +- assets/yaml/jp/rev0/ast_blue_marine.yaml | 2 +- assets/yaml/jp/rev0/ast_bolse.yaml | 24 +- assets/yaml/jp/rev0/ast_common.yaml | 2 +- assets/yaml/jp/rev0/ast_corneria.yaml | 244 +++++++++--------- assets/yaml/jp/rev0/ast_ending.yaml | 2 +- .../yaml/jp/rev0/ast_ending_award_back.yaml | 3 +- .../yaml/jp/rev0/ast_ending_award_front.yaml | 2 +- assets/yaml/jp/rev0/ast_ending_expert.yaml | 2 +- assets/yaml/jp/rev0/ast_enmy_planet.yaml | 6 +- assets/yaml/jp/rev0/ast_enmy_space.yaml | 12 +- assets/yaml/jp/rev0/ast_font_3d.yaml | 2 +- assets/yaml/jp/rev0/ast_fortuna.yaml | 2 +- assets/yaml/jp/rev0/ast_great_fox.yaml | 2 +- assets/yaml/jp/rev0/ast_katina.yaml | 2 +- assets/yaml/jp/rev0/ast_landmaster.yaml | 2 +- assets/yaml/jp/rev0/ast_logo.yml | 2 +- assets/yaml/jp/rev0/ast_macbeth.yaml | 22 +- assets/yaml/jp/rev0/ast_map.yaml | 24 +- assets/yaml/jp/rev0/ast_meteo.yaml | 100 +++---- assets/yaml/jp/rev0/ast_option.yaml | 2 +- assets/yaml/jp/rev0/ast_radio.yaml | 101 -------- assets/yaml/jp/rev0/ast_sector_x.yaml | 2 +- assets/yaml/jp/rev0/ast_sector_y.yaml | 20 +- assets/yaml/jp/rev0/ast_sector_z.yaml | 4 +- assets/yaml/jp/rev0/ast_solar.yaml | 4 +- assets/yaml/jp/rev0/ast_star_wolf.yaml | 4 +- assets/yaml/jp/rev0/ast_text.yaml | 2 +- assets/yaml/jp/rev0/ast_titania.yaml | 2 +- assets/yaml/jp/rev0/ast_title.yaml | 2 +- assets/yaml/jp/rev0/ast_training.yaml | 2 +- assets/yaml/jp/rev0/ast_ve1_boss.yaml | 2 +- assets/yaml/jp/rev0/ast_venom_1.yaml | 2 +- assets/yaml/jp/rev0/ast_venom_2.yaml | 2 +- assets/yaml/jp/rev0/ast_versus.yaml | 17 +- assets/yaml/jp/rev0/ast_vs_menu.yaml | 2 +- assets/yaml/jp/rev0/ast_warp_zone.yaml | 2 +- assets/yaml/jp/rev0/ast_zoness.yaml | 7 +- config.yml | 1 - 50 files changed, 280 insertions(+), 391 deletions(-) delete mode 100644 assets/yaml/jp/rev0/ast_radio.yaml diff --git a/assets/yaml/jp/rev0/ast_7_ti_1.yaml b/assets/yaml/jp/rev0/ast_7_ti_1.yaml index 011b4ff0..e1f11466 100644 --- a/assets/yaml/jp/rev0/ast_7_ti_1.yaml +++ b/assets/yaml/jp/rev0/ast_7_ti_1.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x07, 0xA0E340] + - [0x07, 0x9DE6E0] header: code: - '#include "assets/ast_7_ti_1.h"' @@ -254,7 +254,7 @@ D_TI1_700DF70: D_TI1_700E030: { type: GFX, offset: 0x700E030, symbol: D_TI1_700E030 } -D_TI1_700E1E8: +D_TI1_700E1E8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x0700E1E8, symbol: D_TI1_700E1E8 } D_TI1_700E3F0: diff --git a/assets/yaml/jp/rev0/ast_7_ti_2.yaml b/assets/yaml/jp/rev0/ast_7_ti_2.yaml index 8d2238e2..a11ccf22 100644 --- a/assets/yaml/jp/rev0/ast_7_ti_2.yaml +++ b/assets/yaml/jp/rev0/ast_7_ti_2.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x07, 0x9DD390] + - [0x07, 0x9AD730] header: code: - '#include "assets/ast_7_ti_2.h"' diff --git a/assets/yaml/jp/rev0/ast_8_ti.yaml b/assets/yaml/jp/rev0/ast_8_ti.yaml index cbf2016a..e09bf8b2 100644 --- a/assets/yaml/jp/rev0/ast_8_ti.yaml +++ b/assets/yaml/jp/rev0/ast_8_ti.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x08, 0x9EB5E0] + - [0x08, 0x9BB980] header: code: - '#include "assets/ast_8_ti.h"' diff --git a/assets/yaml/jp/rev0/ast_9_ti.yaml b/assets/yaml/jp/rev0/ast_9_ti.yaml index 913cf7cb..e9a716a8 100644 --- a/assets/yaml/jp/rev0/ast_9_ti.yaml +++ b/assets/yaml/jp/rev0/ast_9_ti.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x09, 0x9F4880] + - [0x09, 0x9C4C20] header: code: - '#include "assets/ast_9_ti.h"' diff --git a/assets/yaml/jp/rev0/ast_A_ti.yaml b/assets/yaml/jp/rev0/ast_A_ti.yaml index e4fcb1ab..c02dc4e5 100644 --- a/assets/yaml/jp/rev0/ast_A_ti.yaml +++ b/assets/yaml/jp/rev0/ast_A_ti.yaml @@ -1,13 +1,13 @@ :config: segments: - - [0x0A, 0xA049A0] + - [0x0A, 0x9D4D40] header: code: - '#include "assets/ast_A_ti.h"' header: - '#include "gfx.h"' - '#include "sf64object.h"' - + D_TI_A000000: {type: GFX, offset: 0xA000000, symbol: D_TI_A000000} @@ -58,4 +58,3 @@ D_TI_A002170: D_TI_A009990: {type: SF64:ANIM, offset: 0xA009990, symbol: D_TI_A009990} - diff --git a/assets/yaml/jp/rev0/ast_allies.yaml b/assets/yaml/jp/rev0/ast_allies.yaml index 3f9594f5..0574dedf 100644 --- a/assets/yaml/jp/rev0/ast_allies.yaml +++ b/assets/yaml/jp/rev0/ast_allies.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x0D, 0x955270] + - [0x0D, 0x9257A0] header: code: - '#include "assets/ast_allies.h"' diff --git a/assets/yaml/jp/rev0/ast_andross.yaml b/assets/yaml/jp/rev0/ast_andross.yaml index 673b0167..00111e67 100644 --- a/assets/yaml/jp/rev0/ast_andross.yaml +++ b/assets/yaml/jp/rev0/ast_andross.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x0C, 0xCE9E70] + - [0x0C, 0xCAEA30] header: code: - '#include "assets/ast_andross.h"' @@ -267,6 +267,3 @@ D_ANDROSS_C039290: D_ANDROSS_C03A290: {type: TEXTURE, ctype: u32, format: RGBA32, width: 32, height: 32, offset: 0xC03A290, symbol: D_ANDROSS_C03A290} - - - diff --git a/assets/yaml/jp/rev0/ast_aquas.yaml b/assets/yaml/jp/rev0/ast_aquas.yaml index d78d5c3b..b83eba47 100644 --- a/assets/yaml/jp/rev0/ast_aquas.yaml +++ b/assets/yaml/jp/rev0/ast_aquas.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x06, 0xA58F60] + - [0x06, 0xA28E60] header: code: - '#include "assets/ast_aquas.h"' @@ -34,7 +34,7 @@ D_AQ_6002628: D_AQ_6002874: { type: SF64:SKELETON, offset: 0x6002874, symbol: D_AQ_6002874 } -# +# D_AQ_6002C10: { type: GFX, offset: 0x6002C10, symbol: D_AQ_6002C10 } diff --git a/assets/yaml/jp/rev0/ast_area_6.yaml b/assets/yaml/jp/rev0/ast_area_6.yaml index 100e6e03..6584145f 100644 --- a/assets/yaml/jp/rev0/ast_area_6.yaml +++ b/assets/yaml/jp/rev0/ast_area_6.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x06, 0xA8B470] + - [0x06, 0xA5B8F0] header: code: - '#include "assets/ast_area_6.h"' diff --git a/assets/yaml/jp/rev0/ast_arwing.yaml b/assets/yaml/jp/rev0/ast_arwing.yaml index 43443489..45a7f400 100644 --- a/assets/yaml/jp/rev0/ast_arwing.yaml +++ b/assets/yaml/jp/rev0/ast_arwing.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x3, 0x8BFC00] + - [0x3, 0x88F730] header: code: - '#include "assets/ast_arwing.h"' diff --git a/assets/yaml/jp/rev0/ast_bg_planet.yaml b/assets/yaml/jp/rev0/ast_bg_planet.yaml index 69ee7ae3..46aaff6b 100644 --- a/assets/yaml/jp/rev0/ast_bg_planet.yaml +++ b/assets/yaml/jp/rev0/ast_bg_planet.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x02, 0x8AE0A0] + - [0x02, 0x87DBD0] header: code: - '#include "assets/ast_bg_planet.h"' diff --git a/assets/yaml/jp/rev0/ast_bg_space.yaml b/assets/yaml/jp/rev0/ast_bg_space.yaml index 32f1e5c8..bac9dc73 100644 --- a/assets/yaml/jp/rev0/ast_bg_space.yaml +++ b/assets/yaml/jp/rev0/ast_bg_space.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x02, 0x8A68C0] + - [0x02, 0x8763F0] header: code: - '#include "assets/ast_bg_space.h"' diff --git a/assets/yaml/jp/rev0/ast_blue_marine.yaml b/assets/yaml/jp/rev0/ast_blue_marine.yaml index 8889e909..4d0809de 100644 --- a/assets/yaml/jp/rev0/ast_blue_marine.yaml +++ b/assets/yaml/jp/rev0/ast_blue_marine.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x03, 0x8E1F80] + - [0x03, 0x8B1AB0] header: code: - '#include "assets/ast_blue_marine.h"' diff --git a/assets/yaml/jp/rev0/ast_bolse.yaml b/assets/yaml/jp/rev0/ast_bolse.yaml index 78e5c128..64f49f89 100644 --- a/assets/yaml/jp/rev0/ast_bolse.yaml +++ b/assets/yaml/jp/rev0/ast_bolse.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x06, 0xB0AA00] + - [0x06, 0xAD8050] header: code: - '#include "assets/ast_bolse.h"' @@ -15,7 +15,7 @@ # Bolse Defense Outpost D_BO_6000000: { type: TEXTURE, ctype: u8, format: IA8, width: 168, height: 19, offset: 0x6000000, symbol: D_BO_6000000 } - + D_BO_6000C80: { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x6000C80, symbol: D_BO_6000C80 } @@ -27,8 +27,8 @@ D_BO_6001908: D_BO_6001C64: { type: SF64:ANIM, offset: 0x6001C64, symbol: D_BO_6001C64 } - -D_BO_6001FB0: + +D_BO_6001FB0: { type: SF64:SKELETON, offset: 0x6001FB0, symbol: D_BO_6001FB0 } D_BO_6002020: @@ -74,19 +74,19 @@ D_BO_6008440: { type: TEXTURE, format: RGBA16, offset: 0x06008440, width: 16, height: 16, ctype: u16, symbol: D_BO_6008440 } # Unused Animation -D_BO_6008668: +D_BO_6008668: { type: SF64:ANIM, offset: 0x6008668, symbol: D_BO_6008668 } # Unused Skeleton -D_BO_60086B4: +D_BO_60086B4: { type: SF64:SKELETON, offset: 0x60086B4, symbol: D_BO_60086B4 } # Unused Animation -D_BO_60086F4: +D_BO_60086F4: { type: SF64:ANIM, offset: 0x60086F4, symbol: D_BO_60086F4 } # Unused Skeleton -D_BO_6008760: +D_BO_6008760: { type: SF64:SKELETON, offset: 0x6008760, symbol: D_BO_6008760 } D_BO_6008770: @@ -150,13 +150,13 @@ D_BO_600E2A0: D_BO_600F2E0: { type: SF64:ANIM, offset: 0x600F2E0, symbol: D_BO_600F2E0 } - -D_BO_600F36C: + +D_BO_600F36C: { type: SF64:SKELETON, offset: 0x600F36C, symbol: D_BO_600F36C } D_BO_600F3D8: { type: SF64:ANIM, offset: 0x600F3D8, symbol: D_BO_600F3D8 } - + D_BO_600F4A4: { type: SF64:SKELETON, offset: 0x600F4A4, symbol: D_BO_600F4A4 } @@ -169,7 +169,7 @@ D_BO_600F728: D_BO_600FF30: { type: SF64:ENVIRONMENT, offset: 0x600FF30, symbol: D_BO_600FF30 } -D_BO_600FF74: +D_BO_600FF74: { type: SF64:OBJECT_INIT, offset: 0x600FF74, symbol: D_BO_600FF74 } D_BO_6010294: diff --git a/assets/yaml/jp/rev0/ast_common.yaml b/assets/yaml/jp/rev0/ast_common.yaml index 5717aba9..00250513 100644 --- a/assets/yaml/jp/rev0/ast_common.yaml +++ b/assets/yaml/jp/rev0/ast_common.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x1, 0x873CB0] + - [0x1, 0x844660] header: code: - '#include "assets/ast_common.h"' diff --git a/assets/yaml/jp/rev0/ast_corneria.yaml b/assets/yaml/jp/rev0/ast_corneria.yaml index cec3e86c..5f7be606 100644 --- a/assets/yaml/jp/rev0/ast_corneria.yaml +++ b/assets/yaml/jp/rev0/ast_corneria.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x06, 0x961CE0] + - [0x06, 0x932200] header: code: - '#include "assets/ast_corneria.h"' @@ -17,7 +17,7 @@ # Former Army Base D_CO_6000000: { type: TEXTURE, ctype: u8, format: IA8, width: 128, height: 28, offset: 0x6000000, symbol: D_CO_6000000 } - + D_CO_6000E00: { type: GFX, offset: 0x6000E00, symbol: D_CO_6000E00 } @@ -38,7 +38,7 @@ D_CO_60040F8: D_CO_60049F0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x060049F0, symbol: D_CO_60049F0 } - + D_CO_6004900: { type: GFX, offset: 0x6004900, symbol: D_CO_6004900 } @@ -47,7 +47,7 @@ D_CO_60059F0: D_CO_6005A80: { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06005A80, symbol: D_CO_6005A80 } - + D_CO_6006A80: { type: GFX, offset: 0x6006A80, symbol: D_CO_6006A80 } @@ -57,16 +57,16 @@ D_CO_6006E08: D_CO_6007610: { type: GFX, offset: 0x6007610, symbol: D_CO_6007610 } -D_CO_60091C8: +D_CO_60091C8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x060091C8, symbol: D_CO_60091C8 } -D_CO_60099C8: +D_CO_60099C8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x060099C8, symbol: D_CO_60099C8 } -D_CO_6009BC8: +D_CO_6009BC8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06009BC8, symbol: D_CO_6009BC8 } -D_CO_600A3C8: +D_CO_600A3C8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0600A3C8, symbol: D_CO_600A3C8 } D_CO_600ABC8: @@ -78,24 +78,24 @@ D_CO_600B3C8: D_CO_600C3D8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0600C3D8, symbol: D_CO_600C3D8 } -D_CO_600CBD8: +D_CO_600CBD8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x0600CBD8, symbol: D_CO_600CBD8 } D_CO_600DBD8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0600DBD8, symbol: D_CO_600DBD8 } - -D_CO_600E3D8: + +D_CO_600E3D8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0600E3D8, symbol: D_CO_600E3D8 } -D_CO_600EBD8: +D_CO_600EBD8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0600EBD8, symbol: D_CO_600EBD8 } - -D_CO_600F3D8: + +D_CO_600F3D8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0600F3D8, symbol: D_CO_600F3D8 } D_CO_6010050: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06010050, symbol: D_CO_6010050 } - + D_CO_6010250: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06010250, symbol: D_CO_6010250 } @@ -116,107 +116,107 @@ D_CO_6011F90: D_CO_6012640: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06012640, symbol: D_CO_6012640 } - -D_CO_6012840: + +D_CO_6012840: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06012840, symbol: D_CO_6012840 } - + D_CO_6012D00: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06012D00, symbol: D_CO_6012D00 } -D_CO_60132B0: +D_CO_60132B0: { type: GFX, offset: 0x60132B0, symbol: D_CO_60132B0 } D_CO_60137B0: { type: GFX, offset: 0x60137B0, symbol: D_CO_60137B0 } -D_CO_6013B50: +D_CO_6013B50: { type: GFX, offset: 0x6013B50, symbol: D_CO_6013B50 } D_CO_6013BE0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06013BE0, symbol: D_CO_6013BE0 } -D_CO_60143E0: +D_CO_60143E0: { type: GFX, offset: 0x60143E0, symbol: D_CO_60143E0 } -D_CO_6014500: +D_CO_6014500: { type: GFX, offset: 0x6014500, symbol: D_CO_6014500 } -D_CO_6014670: +D_CO_6014670: { type: GFX, offset: 0x6014670, symbol: D_CO_6014670 } -D_CO_6014A20: +D_CO_6014A20: { type: GFX, offset: 0x6014A20, symbol: D_CO_6014A20 } -D_CO_6014B50: +D_CO_6014B50: { type: GFX, offset: 0x6014B50, symbol: D_CO_6014B50 } - -D_CO_60151A8: + +D_CO_60151A8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x060151A8, symbol: D_CO_60151A8 } -D_CO_60153B0: +D_CO_60153B0: { type: GFX, offset: 0x60153B0, symbol: D_CO_60153B0 } -D_CO_6015F00: +D_CO_6015F00: { type: GFX, offset: 0x6015F00, symbol: D_CO_6015F00 } D_CO_6015700: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06015700, symbol: D_CO_6015700 } -D_CO_6016270: +D_CO_6016270: { type: GFX, offset: 0x6016270, symbol: D_CO_6016270 } -D_CO_60164F0: +D_CO_60164F0: { type: GFX, offset: 0x60164F0, symbol: D_CO_60164F0 } -D_CO_6016580: +D_CO_6016580: { type: GFX, offset: 0x6016580, symbol: D_CO_6016580 } -D_CO_6017F10: +D_CO_6017F10: { type: GFX, offset: 0x6017F10, symbol: D_CO_6017F10 } -D_CO_60186E0: +D_CO_60186E0: { type: GFX, offset: 0x60186E0, symbol: D_CO_60186E0 } -D_CO_6018E80: +D_CO_6018E80: { type: GFX, offset: 0x6018E80, symbol: D_CO_6018E80 } - + D_CO_60191C8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x060191C8, symbol: D_CO_60191C8 } - -D_CO_60199D0: + +D_CO_60199D0: { type: GFX, offset: 0x60199D0, symbol: D_CO_60199D0 } -D_CO_6019C60: +D_CO_6019C60: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06019C60, symbol: D_CO_6019C60 } -D_CO_6019E60: +D_CO_6019E60: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06019E60, symbol: D_CO_6019E60 } -D_CO_601FF58: +D_CO_601FF58: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601FF58, symbol: D_CO_601FF58 } - -D_CO_601A7D0: + +D_CO_601A7D0: { type: GFX, offset: 0x601A7D0, symbol: D_CO_601A7D0 } -D_CO_601AD60: +D_CO_601AD60: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601AD60, symbol: D_CO_601AD60 } - -D_CO_601B560: + +D_CO_601B560: { type: GFX, offset: 0x601B560, symbol: D_CO_601B560 } - -D_CO_601B640: + +D_CO_601B640: { type: GFX, offset: 0x601B640, symbol: D_CO_601B640 } -D_CO_601B6C0: +D_CO_601B6C0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601B6C0, symbol: D_CO_601B6C0 } - -D_CO_601BEC0: + +D_CO_601BEC0: { type: GFX, offset: 0x601BEC0, symbol: D_CO_601BEC0 } -D_CO_601C1A8: +D_CO_601C1A8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601C1A8, symbol: D_CO_601C1A8 } - -D_CO_601C9B0: + +D_CO_601C9B0: { type: GFX, offset: 0x601C9B0, symbol: D_CO_601C9B0 } D_CO_601CAA0: @@ -224,52 +224,52 @@ D_CO_601CAA0: D_CO_601DAA0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x0601DAA0, symbol: D_CO_601DAA0 } - -D_CO_601EAA0: + +D_CO_601EAA0: { type: GFX, offset: 0x601EAA0, symbol: D_CO_601EAA0 } D_CO_601ED00: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601ED00, symbol: D_CO_601ED00 } - -D_CO_601F500: + +D_CO_601F500: { type: GFX, offset: 0x601F500, symbol: D_CO_601F500 } - -D_CO_601F5A0: + +D_CO_601F5A0: { type: GFX, offset: 0x601F5A0, symbol: D_CO_601F5A0 } - -D_CO_6020760: + +D_CO_6020760: { type: GFX, offset: 0x6020760, symbol: D_CO_6020760 } - -D_CO_6020B40: + +D_CO_6020B40: { type: GFX, offset: 0x6020B40, symbol: D_CO_6020B40 } -D_CO_6021188: +D_CO_6021188: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06021188, symbol: D_CO_6021188 } -D_CO_60220D0: +D_CO_60220D0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x060220D0, symbol: D_CO_60220D0 } - -D_CO_6023AC0: + +D_CO_6023AC0: { type: GFX, offset: 0x6023AC0, symbol: D_CO_6023AC0 } -D_CO_6023DE8: +D_CO_6023DE8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06023DE8, symbol: D_CO_6023DE8 } - -D_CO_6024160: + +D_CO_6024160: { type: GFX, offset: 0x6024160, symbol: D_CO_6024160 } - -D_CO_60244A0: + +D_CO_60244A0: { type: GFX, offset: 0x60244A0, symbol: D_CO_60244A0 } D_CO_60245E0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x060245E0, symbol: D_CO_60245E0 } - + D_CO_6025500: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x06025500, symbol: D_CO_6025500 } - + D_CO_6026420: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x06026420, symbol: D_CO_6026420 } - + D_CO_6027340: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x06027340, symbol: D_CO_6027340 } @@ -278,7 +278,7 @@ D_CO_6028260: D_CO_6028A60: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06028A60, symbol: D_CO_6028A60 } - + D_CO_6029528: { type: SF64:ANIM, offset: 0x6029528, symbol: D_CO_6029528 } @@ -287,7 +287,7 @@ D_CO_6029674: D_CO_602991C: { type: SF64:ANIM, offset: 0x602991C, symbol: D_CO_602991C } - + D_CO_6029A48: { type: SF64:SKELETON, offset: 0x6029A48, symbol: D_CO_6029A48 } @@ -297,58 +297,58 @@ D_CO_602A520: D_CO_602AA04: { type: SF64:ANIM, offset: 0x602AA04, symbol: D_CO_602AA04 } -D_CO_602AA7C: +D_CO_602AA7C: { type: SF64:ANIM, offset: 0x602AA7C, symbol: D_CO_602AA7C } - -D_CO_602AB48: + +D_CO_602AB48: { type: SF64:SKELETON, offset: 0x602AB48, symbol: D_CO_602AB48 } D_CO_602BC18: { type: SF64:ANIM, offset: 0x602BC18, symbol: D_CO_602BC18 } - -D_CO_602BE64: + +D_CO_602BE64: { type: SF64:SKELETON, offset: 0x602BE64, symbol: D_CO_602BE64 } D_CO_602C0D0: { type: SF64:ANIM, offset: 0x602C0D0, symbol: D_CO_602C0D0 } -D_CO_602D31C: +D_CO_602D31C: { type: SF64:ANIM, offset: 0x602D31C, symbol: D_CO_602D31C } D_CO_602D400: { type: SF64:ANIM, offset: 0x602D400, symbol: D_CO_602D400 } - + D_CO_602D5AC: { type: SF64:SKELETON, offset: 0x602D5AC, symbol: D_CO_602D5AC } - + D_CO_602D5F0: { type: GFX, offset: 0x602D5F0, symbol: D_CO_602D5F0 } - + D_CO_602DA20: { type: GFX, offset: 0x602DA20, symbol: D_CO_602DA20 } - + D_CO_602DCA0: { type: GFX, offset: 0x602DCA0, symbol: D_CO_602DCA0 } - + D_CO_602DD40: { type: GFX, offset: 0x602DD40, symbol: D_CO_602DD40 } - + D_CO_602E080: { type: GFX, offset: 0x602E080, symbol: D_CO_602E080 } - + D_CO_602E570: { type: GFX, offset: 0x602E570, symbol: D_CO_602E570 } - + D_CO_602E7A0: { type: GFX, offset: 0x602E7A0, symbol: D_CO_602E7A0 } - + D_CO_602E9E0: { type: GFX, offset: 0x602E9E0, symbol: D_CO_602E9E0 } - + D_CO_602ECB0: { type: GFX, offset: 0x602ECB0, symbol: D_CO_602ECB0 } - -D_CO_602ED50: + +D_CO_602ED50: { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 16, offset: 0x0602ED50, symbol: D_CO_602ED50 } D_CO_602F7C0: @@ -371,74 +371,74 @@ D_CO_6031280: D_CO_60329C0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x060329C0, symbol: D_CO_60329C0 } - + D_CO_6032BC0: { type: GFX, offset: 0x6032BC0, symbol: D_CO_6032BC0 } - + D_CO_6033000: { type: GFX, offset: 0x6033000, symbol: D_CO_6033000 } D_CO_6033088: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06033088, symbol: D_CO_6033088 } - + D_CO_6033290: { type: GFX, offset: 0x6033290, symbol: D_CO_6033290 } - + D_CO_6033AF0: { type: GFX, offset: 0x6033AF0, symbol: D_CO_6033AF0 } -D_CO_6034388: +D_CO_6034388: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06034388, symbol: D_CO_6034388 } - -D_CO_6034B90: + +D_CO_6034B90: { type: GFX, offset: 0x6034B90, symbol: D_CO_6034B90 } -D_CO_6034C28: +D_CO_6034C28: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06034C28, symbol: D_CO_6034C28 } - -D_CO_6035430: + +D_CO_6035430: { type: GFX, offset: 0x6035430, symbol: D_CO_6035430 } - -D_CO_60354F0: + +D_CO_60354F0: { type: GFX, offset: 0x60354F0, symbol: D_CO_60354F0 } -D_CO_60355A0: +D_CO_60355A0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x060355A0, symbol: D_CO_60355A0 } - -D_CO_6035DA0: + +D_CO_6035DA0: { type: GFX, offset: 0x6035DA0, symbol: D_CO_6035DA0 } - -D_CO_6035F10: + +D_CO_6035F10: { type: GFX, offset: 0x6035F10, symbol: D_CO_6035F10 } - -D_CO_60361F0: + +D_CO_60361F0: { type: GFX, offset: 0x60361F0, symbol: D_CO_60361F0 } -D_CO_60363B0: +D_CO_60363B0: { type: GFX, offset: 0x60363B0, symbol: D_CO_60363B0 } D_CO_6036438: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 32, offset: 0x06036438, symbol: D_CO_6036438 } -D_CO_6036840: +D_CO_6036840: { type: GFX, offset: 0x6036840, symbol: D_CO_6036840 } -D_CO_60368C8: +D_CO_60368C8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 32, offset: 0x060368C8, symbol: D_CO_60368C8 } -D_CO_6036CD0: +D_CO_6036CD0: { type: GFX, offset: 0x6036CD0, symbol: D_CO_6036CD0 } -D_CO_6036D58: +D_CO_6036D58: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 32, offset: 0x06036D58, symbol: D_CO_6036D58 } D_CO_6037160: { type: SF64:ENVIRONMENT, offset: 0x6037160, symbol: D_CO_6037160 } -D_CO_60371A4: +D_CO_60371A4: { type: SF64:OBJECT_INIT, offset: 0x60371A4, symbol: D_CO_60371A4 } -D_CO_603B074: +D_CO_603B074: { type: SF64:OBJECT_INIT, offset: 0x603B074, symbol: D_CO_603B074 } D_CO_603D9E8: diff --git a/assets/yaml/jp/rev0/ast_ending.yaml b/assets/yaml/jp/rev0/ast_ending.yaml index 4bd1b0b2..a7b2657e 100644 --- a/assets/yaml/jp/rev0/ast_ending.yaml +++ b/assets/yaml/jp/rev0/ast_ending.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x07, 0xD27600] + - [0x07, 0xCEB3C0] header: code: - '#include "assets/ast_ending.h"' diff --git a/assets/yaml/jp/rev0/ast_ending_award_back.yaml b/assets/yaml/jp/rev0/ast_ending_award_back.yaml index 4cc3746f..ceb8fe30 100644 --- a/assets/yaml/jp/rev0/ast_ending_award_back.yaml +++ b/assets/yaml/jp/rev0/ast_ending_award_back.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x08, 0xD68480] + - [0x08, 0xD2C240] header: code: - '#include "assets/ast_ending_award_back.h"' @@ -10,4 +10,3 @@ ending_award_back: { type: TEXTURE, ctype: u16, format: RGBA16, width: 316, height: 270, offset: 0x8000000, symbol: gEndingAwardBack } - diff --git a/assets/yaml/jp/rev0/ast_ending_award_front.yaml b/assets/yaml/jp/rev0/ast_ending_award_front.yaml index 81908bf9..1a2829c0 100644 --- a/assets/yaml/jp/rev0/ast_ending_award_front.yaml +++ b/assets/yaml/jp/rev0/ast_ending_award_front.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x08, 0xD43400] + - [0x08, 0xD071C0] header: code: - '#include "assets/ast_ending_award_front.h"' diff --git a/assets/yaml/jp/rev0/ast_ending_expert.yaml b/assets/yaml/jp/rev0/ast_ending_expert.yaml index 7963c318..78ae5476 100644 --- a/assets/yaml/jp/rev0/ast_ending_expert.yaml +++ b/assets/yaml/jp/rev0/ast_ending_expert.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x08, 0xD91F10] + - [0x08, 0xD55CD0] header: code: - '#include "assets/ast_ending_expert.h"' diff --git a/assets/yaml/jp/rev0/ast_enmy_planet.yaml b/assets/yaml/jp/rev0/ast_enmy_planet.yaml index 9ea49f50..87e949c1 100644 --- a/assets/yaml/jp/rev0/ast_enmy_planet.yaml +++ b/assets/yaml/jp/rev0/ast_enmy_planet.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x04, 0x918430] + - [0x04, 0x8E8AE0] header: code: - '#include "assets/ast_enmy_planet.h"' @@ -18,7 +18,7 @@ ast_enmy_planet_seg4_vtx_8F8: D_ENMY_PLANET_40001A4: { type: SF64:ANIM, offset: 0x40001A4, symbol: D_ENMY_PLANET_40001A4 } -D_ENMY_PLANET_4000270: +D_ENMY_PLANET_4000270: { type: SF64:SKELETON, offset: 0x4000270, symbol: D_ENMY_PLANET_4000270 } D_ENMY_PLANET_4000710: @@ -63,7 +63,7 @@ D_ENMY_PLANET_4004D38: D_ENMY_PLANET_40057AC: { type: SF64:ANIM, offset: 0x40057AC, symbol: D_ENMY_PLANET_40057AC } -D_ENMY_PLANET_40058B8: +D_ENMY_PLANET_40058B8: { type: SF64:SKELETON, offset: 0x40058B8, symbol: D_ENMY_PLANET_40058B8 } D_ENMY_PLANET_4005E78: diff --git a/assets/yaml/jp/rev0/ast_enmy_space.yaml b/assets/yaml/jp/rev0/ast_enmy_space.yaml index 9bfb991f..3ad506ea 100644 --- a/assets/yaml/jp/rev0/ast_enmy_space.yaml +++ b/assets/yaml/jp/rev0/ast_enmy_space.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x04, 0x922730] + - [0x04, 0x8F2DE0] header: code: - '#include "assets/ast_enmy_space.h"' @@ -11,7 +11,7 @@ D_ENMY_SPACE_4000080: { type: SF64:ANIM, offset: 0x4000080, symbol: D_ENMY_SPACE_4000080 } -D_ENMY_SPACE_400014C: +D_ENMY_SPACE_400014C: { type: SF64:SKELETON, offset: 0x400014C, symbol: D_ENMY_SPACE_400014C } D_ENMY_SPACE_4000170: @@ -119,15 +119,15 @@ D_ENMY_SPACE_400A398: D_ENMY_SPACE_400A630: { type: GFX, offset: 0x400A630, symbol: D_ENMY_SPACE_400A630 } - + D_ENMY_SPACE_400AAE0: { type: GFX, offset: 0x400AAE0, symbol: D_ENMY_SPACE_400AAE0 } - + D_ENMY_SPACE_400B390: { type: GFX, offset: 0x400B390, symbol: D_ENMY_SPACE_400B390 } - - + + D_ENMY_SPACE_400BD20: { type: GFX, offset: 0x400BD20, symbol: D_ENMY_SPACE_400BD20 } diff --git a/assets/yaml/jp/rev0/ast_font_3d.yaml b/assets/yaml/jp/rev0/ast_font_3d.yaml index 745d6518..56c601e3 100644 --- a/assets/yaml/jp/rev0/ast_font_3d.yaml +++ b/assets/yaml/jp/rev0/ast_font_3d.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x09, 0xCDDCA0] + - [0x09, 0xCA2860] header: code: - '#include "assets/ast_font_3d.h"' diff --git a/assets/yaml/jp/rev0/ast_fortuna.yaml b/assets/yaml/jp/rev0/ast_fortuna.yaml index 2c33e207..a6d15d0f 100644 --- a/assets/yaml/jp/rev0/ast_fortuna.yaml +++ b/assets/yaml/jp/rev0/ast_fortuna.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x6, 0xB1CA50] + - [0x6, 0xAE9DC0] header: code: - '#include "assets/ast_fortuna.h"' diff --git a/assets/yaml/jp/rev0/ast_great_fox.yaml b/assets/yaml/jp/rev0/ast_great_fox.yaml index 03ad5207..eecfe756 100644 --- a/assets/yaml/jp/rev0/ast_great_fox.yaml +++ b/assets/yaml/jp/rev0/ast_great_fox.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0xE, 0x92EC40] + - [0xE, 0x8FF2F0] header: code: - '#include "assets/ast_great_fox.h"' diff --git a/assets/yaml/jp/rev0/ast_katina.yaml b/assets/yaml/jp/rev0/ast_katina.yaml index 09fe56ed..30d5e698 100644 --- a/assets/yaml/jp/rev0/ast_katina.yaml +++ b/assets/yaml/jp/rev0/ast_katina.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x6, 0xBB11D0] + - [0x6, 0xB7E0B0] header: code: - '#include "assets/ast_katina.h"' diff --git a/assets/yaml/jp/rev0/ast_landmaster.yaml b/assets/yaml/jp/rev0/ast_landmaster.yaml index ff5ebaa7..2d126597 100644 --- a/assets/yaml/jp/rev0/ast_landmaster.yaml +++ b/assets/yaml/jp/rev0/ast_landmaster.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x3, 0x8D99F0] + - [0x3, 0x8A9520] header: code: - '#include "assets/ast_landmaster.h"' diff --git a/assets/yaml/jp/rev0/ast_logo.yml b/assets/yaml/jp/rev0/ast_logo.yml index 7cfee369..67da0dc1 100644 --- a/assets/yaml/jp/rev0/ast_logo.yml +++ b/assets/yaml/jp/rev0/ast_logo.yml @@ -1,6 +1,6 @@ :config: segments: - - [0x0F, 0xD25100] + - [0x0F, 0xCE8EC0] header: code: - '#include "assets/ast_logo.h"' diff --git a/assets/yaml/jp/rev0/ast_macbeth.yaml b/assets/yaml/jp/rev0/ast_macbeth.yaml index 20650095..289d4ccd 100644 --- a/assets/yaml/jp/rev0/ast_macbeth.yaml +++ b/assets/yaml/jp/rev0/ast_macbeth.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x06, 0xBC23D0] + - [0x06, 0xB8F2B0] header: code: - '#include "assets/ast_macbeth.h"' @@ -309,19 +309,19 @@ D_MA_600F028: D_MA_600F128: { type: TEXTURE, format: TLUT, ctype: u16, colors: 24, offset: 0x600F128, symbol: D_MA_600F128} - + D_MA_600F160: {type: GFX, offset: 0x600F160, symbol: D_MA_600F160} - + D_MA_600F2F0: {type: GFX, offset: 0x600F2F0, symbol: D_MA_600F2F0} - + D_MA_600F3D0: {type: GFX, offset: 0x600F3D0, symbol: D_MA_600F3D0} - + D_MA_600F6C0: {type: GFX, offset: 0x600F6C0, symbol: D_MA_600F6C0} - + D_MA_600F9B0: {type: GFX, offset: 0x600F9B0, symbol: D_MA_600F9B0} @@ -360,19 +360,19 @@ D_MA_6012C00: D_MA_6012C98: { type: TEXTURE, format: RGBA16, ctype: u16, width: 4, height: 8, offset: 0x6012C98, symbol: D_MA_6012C98} - + D_MA_6012F50: {type: GFX, offset: 0x6012F50, symbol: D_MA_6012F50} - + D_MA_6012FE0: { type: TEXTURE, format: IA8, ctype: u8, width: 16, height: 8, offset: 0x6012FE0, symbol: D_MA_6012FE0} - + D_MA_6013060: {type: GFX, offset: 0x6013060, symbol: D_MA_6013060} - + D_MA_6013158: { type: TEXTURE, format: IA16, ctype: u16, width: 32, height: 32, offset: 0x6013158, symbol: D_MA_6013158} - + D_MA_6013960: {type: GFX, offset: 0x6013960, symbol: D_MA_6013960} diff --git a/assets/yaml/jp/rev0/ast_map.yaml b/assets/yaml/jp/rev0/ast_map.yaml index 44747cae..6f4f4692 100644 --- a/assets/yaml/jp/rev0/ast_map.yaml +++ b/assets/yaml/jp/rev0/ast_map.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x06, 0xC48F40] + - [0x06, 0xC12690] header: code: - '#include "assets/ast_map.h"' @@ -141,25 +141,25 @@ D_MAP_6016760: # Zones # Toxic Waste Area -D_MAP_6017640: +D_MAP_6017640: { type: TEXTURE, format: IA8, offset: 0x6017640, width: 112, height: 28, ctype: u8, symbol: D_MAP_6017640 } # Invasion Aftermath -D_MAP_6018280: +D_MAP_6018280: { type: TEXTURE, format: IA8, offset: 0x6018280, width: 184, height: 19, ctype: u8, symbol: D_MAP_6018280 } -D_MAP_6019030: +D_MAP_6019030: { type: TEXTURE, format: IA8, offset: 0x6019030, width: 8, height: 16, ctype: u8, symbol: D_MAP_6019030 } # Clouds ? -D_MAP_60190B0: +D_MAP_60190B0: { type: TEXTURE, format: IA8, offset: 0x60190B0, width: 96, height: 96, ctype: u8, symbol: D_MAP_60190B0 } -D_MAP_601B4B0: +D_MAP_601B4B0: { type: TEXTURE, format: IA8, offset: 0x601B4B0, width: 32, height: 32, ctype: u8, symbol: D_MAP_601B4B0 } # Some text in japanese -D_MAP_601B8B0: +D_MAP_601B8B0: { type: TEXTURE, format: IA8, offset: 0x601B8B0, width: 80, height: 26, ctype: u8, symbol: D_MAP_1B8B0 } D_MAP_601C0D0: @@ -418,7 +418,7 @@ ast_map_seg6_vtx_4AD50: D_MAP_604B510: { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0604B510, symbol: D_MAP_604B510, tlut: 0x0604B590 } -D_MAP_604B590: +D_MAP_604B590: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x0604B590, symbol: D_MAP_604B590 } D_MAP_604B5B0: @@ -437,25 +437,25 @@ D_MAP_604B750: D_MAP_604BC48: { type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 32, offset: 0x0604BC48, symbol: D_MAP_604BC48, tlut: 0x0604BC48 } -D_MAP_604BE48: +D_MAP_604BE48: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x0604BE48, symbol: D_MAP_604BE48 } D_MAP_604BE68: { type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 32, offset: 0x0604BE68, symbol: D_MAP_604BE68, tlut: 0x0604C068 } -D_MAP_604C068: +D_MAP_604C068: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x0604C068, symbol: D_MAP_604C068 } D_MAP_604C088: { type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 32, offset: 0x0604C088, symbol: D_MAP_604C088, tlut: 0x0604C288 } -D_MAP_604C288: +D_MAP_604C288: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x0604C288, symbol: D_MAP_604C288 } D_MAP_604C2A8: { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0604C2A8, symbol: D_MAP_604C2A8, tlut: 0x0604C328 } -D_MAP_604C328: +D_MAP_604C328: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x0604C328, symbol: D_MAP_604C328 } # Television outcoming light Model, used during briefing. diff --git a/assets/yaml/jp/rev0/ast_meteo.yaml b/assets/yaml/jp/rev0/ast_meteo.yaml index 16a3ac8b..242222db 100644 --- a/assets/yaml/jp/rev0/ast_meteo.yaml +++ b/assets/yaml/jp/rev0/ast_meteo.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x06, 0x9A1460] + - [0x06, 0x971980] header: code: - '#include "assets/ast_meteo.h"' @@ -16,7 +16,7 @@ # Asteroid Field D_ME_6000000: { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 28, offset: 0x6000000, symbol: D_ME_6000000 } - + D_ME_6000A80: { type: GFX, offset: 0x6000A80, symbol: D_ME_6000A80 } @@ -55,86 +55,86 @@ D_ME_6007838: D_ME_60078B8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x060078B8, symbol: D_ME_60078B8 } - -D_ME_60080C0: + +D_ME_60080C0: { type: GFX, offset: 0x60080C0, symbol: D_ME_60080C0 } D_ME_6008A18: { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x06008A18, symbol: D_ME_6008A18 } - -D_ME_6008AA0: + +D_ME_6008AA0: { type: GFX, offset: 0x6008AA0, symbol: D_ME_6008AA0 } -D_ME_6009228: +D_ME_6009228: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06009228, symbol: D_ME_6009228 } -D_ME_6009A28: +D_ME_6009A28: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06009A28, symbol: D_ME_6009A28 } -D_ME_6009C28: +D_ME_6009C28: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06009C28, symbol: D_ME_6009C28 } - -D_ME_6009E30: + +D_ME_6009E30: { type: GFX, offset: 0x6009E30, symbol: D_ME_6009E30 } - -D_ME_6009F50: + +D_ME_6009F50: { type: GFX, offset: 0x6009F50, symbol: D_ME_6009F50 } - -D_ME_600AC70: + +D_ME_600AC70: { type: GFX, offset: 0x600AC70, symbol: D_ME_600AC70 } -D_ME_600B540: +D_ME_600B540: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0600B540, symbol: D_ME_600B540 } -D_ME_600BD40: +D_ME_600BD40: { type: GFX, offset: 0x600BD40, symbol: D_ME_600BD40 } D_ME_600BF30: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x0600BF30, symbol: D_ME_600BF30 } - + D_ME_600C130: { type: GFX, offset: 0x600C130, symbol: D_ME_600C130 } - + D_ME_600C2A0: { type: GFX, offset: 0x600C2A0, symbol: D_ME_600C2A0 } - + D_ME_600C740: { type: GFX, offset: 0x600C740, symbol: D_ME_600C740 } - + D_ME_600CAA0: { type: GFX, offset: 0x600CAA0, symbol: D_ME_600CAA0 } - + D_ME_600CD60: { type: GFX, offset: 0x600CD60, symbol: D_ME_600CD60 } D_ME_600CDE8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x0600CDE8, symbol: D_ME_600CDE8 } - -D_ME_600DDF0: + +D_ME_600DDF0: { type: GFX, offset: 0x600DDF0, symbol: D_ME_600DDF0 } -D_ME_600E238: +D_ME_600E238: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x0600E238, symbol: D_ME_600E238 } -D_ME_600F238: +D_ME_600F238: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x0600F238, symbol: D_ME_600F238 } -D_ME_6010238: +D_ME_6010238: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x06010238, symbol: D_ME_6010238 } -D_ME_6011238: +D_ME_6011238: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x06011238, symbol: D_ME_6011238 } -D_ME_6012238: +D_ME_6012238: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x06012238, symbol: D_ME_6012238 } -D_ME_6013238: +D_ME_6013238: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x06013238, symbol: D_ME_6013238 } -D_ME_6014238: +D_ME_6014238: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x06014238, symbol: D_ME_6014238 } -D_ME_6015238: +D_ME_6015238: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x06015238, symbol: D_ME_6015238 } D_ME_6016240: @@ -142,7 +142,7 @@ D_ME_6016240: D_ME_60162C8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x060162C8, symbol: D_ME_60162C8 } - + D_ME_60172C8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x060172C8, symbol: D_ME_60172C8 } @@ -167,7 +167,7 @@ D_ME_6019430: D_ME_6019880: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06019880, symbol: D_ME_6019880 } -D_ME_601A080: +D_ME_601A080: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601A080, symbol: D_ME_601A080 } D_ME_601A880: @@ -176,44 +176,44 @@ D_ME_601A880: D_ME_601AE40: { type: GFX, offset: 0x0601AE40, symbol: D_ME_601AE40 } -D_ME_601C8E0: +D_ME_601C8E0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x0601C8E0, symbol: D_ME_601C8E0 } -D_ME_601D800: +D_ME_601D800: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x0601D800, symbol: D_ME_601D800 } -D_ME_601E8C4: +D_ME_601E8C4: { type: SF64:ANIM, offset: 0x601E8C4, symbol: D_ME_601E8C4 } -D_ME_601E9D0: +D_ME_601E9D0: { type: SF64:SKELETON, offset: 0x601E9D0, symbol: D_ME_601E9D0 } # Beta Meteo background, unused -D_ME_601EA00: +D_ME_601EA00: { type: GFX, offset: 0x0601EA00, symbol: D_ME_601EA00 } -D_ME_601EA98: +D_ME_601EA98: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601EA98, symbol: D_ME_601EA98 } -D_ME_601F2A0: +D_ME_601F2A0: { type: GFX, offset: 0x0601F2A0, symbol: D_ME_601F2A0 } -D_ME_601F778: +D_ME_601F778: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601F778, symbol: D_ME_601F778 } D_ME_601FF80: { type: GFX, offset: 0x0601FF80, symbol: D_ME_601FF80 } -D_ME_6020008: +D_ME_6020008: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06020008, symbol: D_ME_6020008 } D_ME_6020810: { type: GFX, offset: 0x06020810, symbol: D_ME_6020810 } -D_ME_6020920: +D_ME_6020920: { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06020920, symbol: D_ME_6020920 } -D_ME_6021920: +D_ME_6021920: { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06021920, symbol: D_ME_6021920 } D_ME_6022920: @@ -256,25 +256,25 @@ D_ME_6024B60: D_ME_6025B50: { type: GFX, offset: 0x06025B50, symbol: D_ME_6025B50 } -D_ME_6025350: +D_ME_6025350: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6025350, symbol: D_ME_6025350 } -D_ME_6025BE8: +D_ME_6025BE8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06025BE8, symbol: D_ME_6025BE8 } D_ME_60263F0: { type: GFX, offset: 0x060263F0, symbol: D_ME_60263F0 } -D_ME_6026478: +D_ME_6026478: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06026478, symbol: D_ME_6026478 } -D_ME_6026CC4: +D_ME_6026CC4: { type: SF64:OBJECT_INIT, offset: 0x6026CC4, symbol: D_ME_6026CC4 } D_ME_6026C80: { type: SF64:ENVIRONMENT, offset: 0x6026C80, symbol: D_ME_6026C80 } -D_ME_602B148: +D_ME_602B148: { type: SF64:OBJECT_INIT, offset: 0x602B148, symbol: D_ME_602B148 } D_ME_602F3AC: diff --git a/assets/yaml/jp/rev0/ast_option.yaml b/assets/yaml/jp/rev0/ast_option.yaml index b3f3637a..cb92e731 100644 --- a/assets/yaml/jp/rev0/ast_option.yaml +++ b/assets/yaml/jp/rev0/ast_option.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x08, 0xCA9DE0] + - [0x08, 0xC6FA00] header: code: - '#include "assets/ast_option.h"' diff --git a/assets/yaml/jp/rev0/ast_radio.yaml b/assets/yaml/jp/rev0/ast_radio.yaml deleted file mode 100644 index bb2bb02b..00000000 --- a/assets/yaml/jp/rev0/ast_radio.yaml +++ /dev/null @@ -1,101 +0,0 @@ -:config: - segments: - - [0x8, 0xDE5D50] - tables: - gTextCharTextures: - range: [0x0, 0x958] - mode: APPEND - header: - code: - - '#include "sf64mesg.h"' - - '' - - '// clang-format off' - - 'typedef enum {' - - ' END, NWL, NP2, NP3, NP4, NP5, NP6, NP7,' - - ' PRI0, PRI1, PRI2, PRI3, SPC, HSP, QSP, NXT,' - - ' CLF, CUP, CRT, CDN, AUP, ALF, ADN, ART,' - - ' _A, _B, _C, _D, _E, _F, _G, _H,' - - ' _I, _J, _K, _L, _M, _N, _O, _P,' - - ' _Q, _R, _S, _T, _U, _V, _W, _X,' - - ' _Y, _Z, _a, _b, _c, _d, _e, _f,' - - ' _g, _h, _i, _j, _k, _l, _m, _n,' - - ' _o, _p, _q, _r, _s, _t, _u, _v,' - - ' _w, _x, _y, _z, EXM, QST, DSH, CMA,' - - ' PRD, _0, _1, _2, _3, _4, _5, _6,' - - ' _7, _8, _9, APS, LPR, RPR, CLN, PIP,' - - '} CharCode;' - -text_char_special_0: - { type: TEXTURE, offset: 0x0, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharSpecial0 } - -text_char_special_4: - { type: TEXTURE, offset: 0x68, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharSpecial4 } - -text_char_special_8: - { type: TEXTURE, offset: 0xD0, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharSpecial8 } - -text_char_special_12: - { type: TEXTURE, offset: 0x138, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharSpecial12 } - -text_char_cdir: - { type: TEXTURE, offset: 0x1A0, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharCDIR } - -text_char_adir: - { type: TEXTURE, offset: 0x208, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharADIR } - -text_char_abcd_upper: - { type: TEXTURE, offset: 0x270, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharABCD } - -text_char_efgh_upper: - { type: TEXTURE, offset: 0x2D8, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharEFGH } - -text_char_ijkl_upper: - { type: TEXTURE, offset: 0x340, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharIJKL } - -text_char_mnop_upper: - { type: TEXTURE, offset: 0x3A8, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharMNOP } - -text_char_qrst_upper: - { type: TEXTURE, offset: 0x410, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharQRST } - -text_char_uvwx_upper: - { type: TEXTURE, offset: 0x478, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharUVWX } - -text_char_yzab_both: - { type: TEXTURE, offset: 0x4E0, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharYZABBoth } - -text_char_cdef_lower: - { type: TEXTURE, offset: 0x548, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharCDEFLower } - -text_char_ghij_lower: - { type: TEXTURE, offset: 0x5B0, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharGHIJLower } - -text_char_klmn_lower: - { type: TEXTURE, offset: 0x618, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharKLMNLower } - -text_char_opqr_lower: - { type: TEXTURE, offset: 0x680, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharOPQRLower } - -text_char_stuv_lower: - { type: TEXTURE, offset: 0x6E8, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharSTUVLower } - -text_char_wxyz_lower: - { type: TEXTURE, offset: 0x750, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharWXYZLower } - -text_char_pidc: - { type: TEXTURE, offset: 0x7B8, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharPIDC } - -text_char_p012: - { type: TEXTURE, offset: 0x820, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharP012 } - -text_char_3456: - { type: TEXTURE, offset: 0x888, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextChar3456 } - -text_char_789a: - { type: TEXTURE, offset: 0x8F0, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextChar789A } - -text_char_ppdp: - { type: TEXTURE, offset: 0x958, width: 16, height: 13, format: CI4, ctype: u8, symbol: gTextCharPPDP } - -message_table: - { type: SF64:MSG_TABLE, offset: 0xCCAC, vram: 0x80179010, ctype: u8, symbol: gMsgLookup } \ No newline at end of file diff --git a/assets/yaml/jp/rev0/ast_sector_x.yaml b/assets/yaml/jp/rev0/ast_sector_x.yaml index 2f2d2754..44423c6f 100644 --- a/assets/yaml/jp/rev0/ast_sector_x.yaml +++ b/assets/yaml/jp/rev0/ast_sector_x.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x06, 0xA1D0F0] + - [0x06, 0x9ED490] header: code: - '#include "assets/ast_sector_x.h"' diff --git a/assets/yaml/jp/rev0/ast_sector_y.yaml b/assets/yaml/jp/rev0/ast_sector_y.yaml index 8ca9f1ef..8384bd9b 100644 --- a/assets/yaml/jp/rev0/ast_sector_y.yaml +++ b/assets/yaml/jp/rev0/ast_sector_y.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x06, 0xB2CA50] + - [0x06, 0xAF9DC0] header: code: - '#include "assets/ast_sector_y.h"' @@ -170,34 +170,34 @@ D_SY_6018F30: D_SY_6019E50: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x06019E50, symbol: D_SY_6019E50 } -D_SY_601AD70: +D_SY_601AD70: { type: GFX, offset: 0x601AD70, symbol: D_SY_601AD70 } D_SY_601AE08: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601AE08, symbol: D_SY_601AE08 } -D_SY_601B610: +D_SY_601B610: { type: GFX, offset: 0x601B610, symbol: D_SY_601B610 } -D_SY_601B6A0: +D_SY_601B6A0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x0601B6A0, symbol: D_SY_601B6A0 } -D_SY_601C6A0: +D_SY_601C6A0: { type: GFX, offset: 0x601C6A0, symbol: D_SY_601C6A0 } -D_SY_601C730: +D_SY_601C730: { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x0601C730, symbol: D_SY_601C730 } -D_SY_601D730: +D_SY_601D730: { type: GFX, offset: 0x601D730, symbol: D_SY_601D730 } D_SY_601F3B8: { type: SF64:ANIM, offset: 0x601F3B8, symbol: D_SY_601F3B8 } -D_SY_60205D0: +D_SY_60205D0: { type: GFX, offset: 0x60205D0, symbol: D_SY_60205D0 } -D_SY_60209F0: +D_SY_60209F0: { type: GFX, offset: 0x60209F0, symbol: D_SY_60209F0 } D_SY_6020B08: @@ -284,7 +284,7 @@ D_SY_602DE70: D_SY_602E0A0: { type: GFX, offset: 0x602E0A0, symbol: D_SY_602E0A0 } -D_SY_602D140: +D_SY_602D140: { type: SF64:SKELETON, offset: 0x602D140, symbol: D_SY_602D140 } D_SY_602D194: diff --git a/assets/yaml/jp/rev0/ast_sector_z.yaml b/assets/yaml/jp/rev0/ast_sector_z.yaml index bd532e3f..4fb35bc7 100644 --- a/assets/yaml/jp/rev0/ast_sector_z.yaml +++ b/assets/yaml/jp/rev0/ast_sector_z.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x06, 0xA4FBB0] + - [0x06, 0xA1FCD0] header: code: - '#include "assets/ast_sector_z.h"' @@ -145,7 +145,7 @@ D_SZ_6006CD8: D_SZ_6006D64: { type: SF64:ANIM, offset: 0x6006D64, symbol: D_SZ_6006D64 } -D_SZ_6006E50: +D_SZ_6006E50: { type: SF64:SKELETON, offset: 0x6006E50, symbol: D_SZ_6006E50 } D_SZ_6006E70: diff --git a/assets/yaml/jp/rev0/ast_solar.yaml b/assets/yaml/jp/rev0/ast_solar.yaml index 3e2cee43..610b9598 100644 --- a/assets/yaml/jp/rev0/ast_solar.yaml +++ b/assets/yaml/jp/rev0/ast_solar.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x06, 0xB612E0] + - [0x06, 0xB2E3F0] header: code: - '#include "assets/ast_solar.h"' @@ -135,7 +135,7 @@ D_SO_6016F08: D_SO_6017008: { type: TEXTURE, ctype: u16, format: TLUT, colors: 64, offset: 0x6017008, symbol: D_SO_6017008} - + D_SO_6017090: { type: GFX, offset: 0x6017090, symbol: D_SO_6017090} diff --git a/assets/yaml/jp/rev0/ast_star_wolf.yaml b/assets/yaml/jp/rev0/ast_star_wolf.yaml index 3bdb8ae4..d7225ceb 100644 --- a/assets/yaml/jp/rev0/ast_star_wolf.yaml +++ b/assets/yaml/jp/rev0/ast_star_wolf.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x0F, 0x940AD0] + - [0x0F, 0x911000] header: code: - '#include "assets/ast_star_wolf.h"' @@ -65,7 +65,7 @@ D_STAR_WOLF_F0101D0: D_STAR_WOLF_F011E80: { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x0F011E80, symbol: D_STAR_WOLF_F011E80 } -D_STAR_WOLF_F011680: +D_STAR_WOLF_F011680: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0F011680, symbol: D_STAR_WOLF_F011680 } D_STAR_WOLF_F0103D0: diff --git a/assets/yaml/jp/rev0/ast_text.yaml b/assets/yaml/jp/rev0/ast_text.yaml index faaadd71..5177eab1 100644 --- a/assets/yaml/jp/rev0/ast_text.yaml +++ b/assets/yaml/jp/rev0/ast_text.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x05, 0xCD2410] + - [0x05, 0xC98590] header: code: - '#include "assets/ast_text.h"' diff --git a/assets/yaml/jp/rev0/ast_titania.yaml b/assets/yaml/jp/rev0/ast_titania.yaml index 63bf8435..1e1210f4 100644 --- a/assets/yaml/jp/rev0/ast_titania.yaml +++ b/assets/yaml/jp/rev0/ast_titania.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x06, 0x9D2FD0] + - [0x06, 0x9A3370] header: code: - '#include "assets/ast_titania.h"' diff --git a/assets/yaml/jp/rev0/ast_title.yaml b/assets/yaml/jp/rev0/ast_title.yaml index a369b62e..34b389fa 100644 --- a/assets/yaml/jp/rev0/ast_title.yaml +++ b/assets/yaml/jp/rev0/ast_title.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x06, 0xBFC510] + - [0x06, 0xBC9230] header: code: - '#include "assets/ast_title.h"' diff --git a/assets/yaml/jp/rev0/ast_training.yaml b/assets/yaml/jp/rev0/ast_training.yaml index 3a064e81..8b141c42 100644 --- a/assets/yaml/jp/rev0/ast_training.yaml +++ b/assets/yaml/jp/rev0/ast_training.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x6, 0xDDC010] + - [0x6, 0xD9FDD0] header: code: - '#include "assets/ast_training.h"' diff --git a/assets/yaml/jp/rev0/ast_ve1_boss.yaml b/assets/yaml/jp/rev0/ast_ve1_boss.yaml index 14a29c08..4fd6bcc5 100644 --- a/assets/yaml/jp/rev0/ast_ve1_boss.yaml +++ b/assets/yaml/jp/rev0/ast_ve1_boss.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x09, 0xAE60A0] + - [0x09, 0xAB36F0] header: code: - '#include "assets/ast_ve1_boss.h"' diff --git a/assets/yaml/jp/rev0/ast_venom_1.yaml b/assets/yaml/jp/rev0/ast_venom_1.yaml index 96722e97..a533e8fb 100644 --- a/assets/yaml/jp/rev0/ast_venom_1.yaml +++ b/assets/yaml/jp/rev0/ast_venom_1.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x6, 0xAB4000] + - [0x6, 0xA84390] header: code: - '#include "assets/ast_venom_1.h"' diff --git a/assets/yaml/jp/rev0/ast_venom_2.yaml b/assets/yaml/jp/rev0/ast_venom_2.yaml index 26d37d60..fd597c94 100644 --- a/assets/yaml/jp/rev0/ast_venom_2.yaml +++ b/assets/yaml/jp/rev0/ast_venom_2.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x6, 0xACF960] + - [0x6, 0xA9E570] header: code: - '#include "assets/ast_venom_2.h"' diff --git a/assets/yaml/jp/rev0/ast_versus.yaml b/assets/yaml/jp/rev0/ast_versus.yaml index f5961866..1e778a7f 100644 --- a/assets/yaml/jp/rev0/ast_versus.yaml +++ b/assets/yaml/jp/rev0/ast_versus.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x03, 0x8E92D0] + - [0x03, 0x8B8E00] header: code: - '#include "assets/ast_versus.h"' @@ -739,25 +739,24 @@ D_versus_302F044: D_versus_302E56C: {type: VEC3F, count: 20, offset: 0x302E56C, symbol: D_versus_302E56C} - + D_versus_302E65C: {type: VEC3F, count: 20, offset: 0x302E65C, symbol: D_versus_302E65C} - + D_versus_302E74C: {type: VEC3F, count: 19, offset: 0x302E74C, symbol: D_versus_302E74C} - + D_versus_302E830: {type: VEC3F, count: 25, offset: 0x302E830, symbol: D_versus_302E830} - + D_versus_302E95C: {type: VEC3F, count: 20, offset: 0x302E95C, symbol: D_versus_302E95C} - + D_versus_302EA4C: {type: VEC3F, count: 20, offset: 0x302EA4C, symbol: D_versus_302EA4C} - + D_versus_302EB3C: {type: VEC3F, count: 19, offset: 0x302EB3C, symbol: D_versus_302EB3C} - + D_versus_302EC20: {type: VEC3F, count: 25, offset: 0x302EC20, symbol: D_versus_302EC20} - \ No newline at end of file diff --git a/assets/yaml/jp/rev0/ast_vs_menu.yaml b/assets/yaml/jp/rev0/ast_vs_menu.yaml index 28cd189e..a736b7c6 100644 --- a/assets/yaml/jp/rev0/ast_vs_menu.yaml +++ b/assets/yaml/jp/rev0/ast_vs_menu.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x07, 0xCBFE70] + - [0x07, 0xC83960] header: code: - '#include "assets/ast_vs_menu.h"' diff --git a/assets/yaml/jp/rev0/ast_warp_zone.yaml b/assets/yaml/jp/rev0/ast_warp_zone.yaml index 67dc362d..87af0cb6 100644 --- a/assets/yaml/jp/rev0/ast_warp_zone.yaml +++ b/assets/yaml/jp/rev0/ast_warp_zone.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x07, 0xBFA740] + - [0x07, 0xBC7460] header: code: - '#include "assets/ast_warp_zone.h"' diff --git a/assets/yaml/jp/rev0/ast_zoness.yaml b/assets/yaml/jp/rev0/ast_zoness.yaml index 9a7e21ee..3961d8fb 100644 --- a/assets/yaml/jp/rev0/ast_zoness.yaml +++ b/assets/yaml/jp/rev0/ast_zoness.yaml @@ -1,6 +1,6 @@ :config: segments: - - [0x06, 0xB84560] + - [0x06, 0xB51670] header: code: - '#include "assets/ast_zoness.h"' @@ -552,7 +552,7 @@ D_ZO_602C250: D_ZO_602C294: { type: SF64:HITBOX, offset: 0x602C294, symbol: D_ZO_602C294} - + D_ZO_602C2B0: { type: SF64:HITBOX, offset: 0x602C2B0, symbol: D_ZO_602C2B0} @@ -561,6 +561,3 @@ D_ZO_602C2CC: D_ZO_602CACC: {type: SF64:TRIANGLE, count: 30, offset: 0x602CACC, symbol: D_ZO_602CACC, mesh_symbol: D_ZO_OFFSET} - - - diff --git a/config.yml b/config.yml index 6f35fa48..05d52cf1 100644 --- a/config.yml +++ b/config.yml @@ -26,7 +26,6 @@ d064229a32cc05ab85e2381ce07744eb3ffaf530: config: gbi: F3DEX sort: OFFSET - logging: ERROR output: binary: starship.otr code: src/assets From 9da16399089a23acee5544f6302b945d1f619096 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Thu, 16 May 2024 11:05:21 -0300 Subject: [PATCH 097/151] fox_co spacing and generic vars --- src/overlays/ovl_i1/fox_co.c | 579 ++++++++++++++++++++++++++++++----- 1 file changed, 497 insertions(+), 82 deletions(-) diff --git a/src/overlays/ovl_i1/fox_co.c b/src/overlays/ovl_i1/fox_co.c index c3f5493e..cd7b7fa4 100644 --- a/src/overlays/ovl_i1/fox_co.c +++ b/src/overlays/ovl_i1/fox_co.c @@ -8,7 +8,6 @@ #include "assets/ast_arwing.h" #include "assets/ast_corneria.h" -// bss u8 D_i1_8019B6D0; f32 D_i1_8019B6D8[68]; @@ -16,7 +15,6 @@ void Corneria_80187530(Scenery* scenery) { } void Corneria_8018753C(Scenery* scenery) { - gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_CO_60199D0); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); @@ -37,7 +35,6 @@ void Corneria_801875A4(Sprite* sprite) { void Corneria_80187670(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 arg4, f32 xRot, f32 yRot, s32 arg7, s32 arg8, ObjectId objId) { - Actor_Initialize(actor); actor->obj.status = OBJ_INIT; actor->obj.id = objId; @@ -58,37 +55,40 @@ void Corneria_80187710(f32 xPos, f32 yPos, f32 zPos, f32 arg3, f32 xRot, f32 yRo for (i = 0; i < ARRAY_COUNT(gActors); i++) { if (gActors[i].obj.status == OBJ_FREE) { - (void) "Enms[1].obj.mode %d\n"; + PRINTF("Enms[1].obj.mode %d\n"); Corneria_80187670(&gActors[i], xPos, yPos, zPos, arg3, xRot, yRot, arg6, arg7, objId); return; } } } -void Corneria_801877A0(Boss* boss, f32 arg1, f32 arg2, f32 arg3) { - Vec3f sp2C; - Vec3f sp20; +void Corneria_801877A0(Boss* boss, f32 x, f32 y, f32 z) { + Vec3f src; + Vec3f dest; - sp2C.x = arg1; - sp2C.y = arg2; - sp2C.z = arg3; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp2C, &sp20); - func_effect_8007F11C(OBJ_EFFECT_353, boss->obj.pos.x + sp20.x, boss->obj.pos.y + sp20.y, boss->obj.pos.z + sp20.z, + src.x = x; + src.y = y; + src.z = z; + + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + + func_effect_8007F11C(OBJ_EFFECT_353, boss->obj.pos.x + dest.x, boss->obj.pos.y + dest.y, boss->obj.pos.z + dest.z, 100.0f); } -void Corneria_80187838(s32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg4) { +// Maybe Corneria_SpawnItem +void Corneria_80187838(s32 arg0, f32 x, f32 y, f32 z, ObjectId item) { s32 i; for (i = 0; i < ARRAY_COUNT(gItems); i++) { if (gItems[i].obj.status == OBJ_FREE) { Item_Initialize(&gItems[i]); gItems[i].obj.status = OBJ_INIT; - gItems[i].obj.id = arg4; + gItems[i].obj.id = item; gItems[i].timer_4A = 8; - gItems[i].obj.pos.x = arg1; - gItems[i].obj.pos.y = arg2; - gItems[i].obj.pos.z = arg3; + gItems[i].obj.pos.x = x; + gItems[i].obj.pos.y = y; + gItems[i].obj.pos.z = z; Object_SetInfo(&gItems[i].info, gItems[i].obj.id); return; } @@ -99,6 +99,7 @@ void Corneria_Boss292_Init(Boss292* this) { s32 i; gBossFrameCount = 0; + if (gLevelMode == LEVELMODE_ON_RAILS) { if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_START_360; @@ -140,35 +141,47 @@ f32 Corneria_80187A88(s32 arg0) { void Corneria_80187AC8(Boss* boss) { Sprite* sprite; - s32 var_v0; + s32 item; s32 var_s1; s32 var_s1_2; if (boss->dmgType != DMG_NONE) { boss->dmgType = DMG_NONE; + if (boss->dmgPart == 0) { boss->swork[10] = 15; boss->swork[29] -= boss->damage; + Corneria_80187A38(boss, D_i1_8019B6D8[62], D_i1_8019B6D8[63], D_i1_8019B6D8[64], 0.2f, 20); + if (boss->swork[29] < 30) { func_effect_8007A6F0(&boss->obj.pos, NA_SE_EN_KNOCK_DOWN); } else { func_effect_8007A6F0(&boss->obj.pos, NA_SE_OB_DAMAGE_M); } + Radio_PlayMessage(gMsg_ID_2270, RCID_BOSS_CORNERIA); + if (boss->swork[29] <= 0) { boss->swork[10] = 1000; boss->info.hitbox[1 + 0] = 100000.0f; + Corneria_8018798C(boss, D_i1_8019B6D8[62], D_i1_8019B6D8[63], D_i1_8019B6D8[64], 10.0f); + AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, boss->sfxSource, 4); + gScreenFlashTimer = 8; + if (fabsf(boss->obj.rot.x) < 20.0f) { boss->swork[32] = 1; } + boss->state = 7; boss->timer_050 = 100; + SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 80); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 80); + gCsFrameCount = 0; if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || @@ -176,6 +189,7 @@ void Corneria_80187AC8(Boss* boss) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].csState = gPlayer[0].csTimer = 0; gPlayer[0].rot.y += gPlayer[0].yRot_114; + if (gPlayer[0].rot.y > 360.0f) { gPlayer[0].rot.y -= 360.0f; } @@ -184,8 +198,11 @@ void Corneria_80187AC8(Boss* boss) { } gPlayer[0].yRot_114 = 0.0f; } + Radio_PlayMessage(gMsg_ID_2280, RCID_BOSS_CORNERIA); + Boss_AwardBonus(boss); + gBossFrameCount = 100000; return; } @@ -193,9 +210,11 @@ void Corneria_80187AC8(Boss* boss) { boss->swork[3] = 15; boss->swork[20] = 30; boss->swork[28] -= boss->damage; + Corneria_801879F0(boss, D_i1_8019B6D8[12] + RAND_FLOAT_CENTERED(60.0f), D_i1_8019B6D8[13], D_i1_8019B6D8[14] + RAND_FLOAT_CENTERED(60.0f), 2.0f); Corneria_80187A38(boss, D_i1_8019B6D8[12], D_i1_8019B6D8[13], D_i1_8019B6D8[14], 0.1f, 20); + if (boss->swork[28] <= 0) { boss->swork[3] = 1000; boss->info.hitbox[1 + 18] = 100000.0f; @@ -211,6 +230,7 @@ void Corneria_80187AC8(Boss* boss) { Corneria_801879F0(boss, D_i1_8019B6D8[6] + RAND_FLOAT_CENTERED(60.0f), D_i1_8019B6D8[7], D_i1_8019B6D8[8] + RAND_FLOAT_CENTERED(60.0f), 2.0f); Corneria_80187A38(boss, D_i1_8019B6D8[6], D_i1_8019B6D8[7], D_i1_8019B6D8[8], 0.1f, 20); + if (boss->swork[26] <= 0) { boss->swork[2] = 1000; boss->info.hitbox[1 + 6] = 100000.0f; @@ -220,9 +240,11 @@ void Corneria_80187AC8(Boss* boss) { boss->swork[1] = 15; boss->swork[22] = 30; boss->swork[27] -= boss->damage; + Corneria_801879F0(boss, D_i1_8019B6D8[0] + RAND_FLOAT_CENTERED(60.0f), D_i1_8019B6D8[1], D_i1_8019B6D8[2] + RAND_FLOAT_CENTERED(60.0f), 2.0f); Corneria_80187A38(boss, D_i1_8019B6D8[0], D_i1_8019B6D8[1], D_i1_8019B6D8[2], 0.1f, 20); + if (boss->swork[27] <= 0) { boss->swork[1] = 1000; boss->info.hitbox[1 + 12] = 100000.0f; @@ -231,19 +253,23 @@ void Corneria_80187AC8(Boss* boss) { } else if ((boss->dmgPart == 4) || (boss->dmgPart == 5)) { AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, boss->sfxSource, 4); boss->swork[23] = 200; + if (boss->dmgPart == 4) { boss->swork[24] -= boss->damage; boss->swork[7] = boss->swork[8] = boss->swork[9] = 5; boss->swork[18] = 30; + if (boss->swork[24] <= 0) { boss->swork[7] = boss->swork[8] = boss->swork[9] = 1000; boss->info.hitbox[1 + 24] = 100000.0f; + for (var_s1 = 3; var_s1 < 6; var_s1++) { Boss_SpawnDebris(D_i1_8019B6D8[18 + var_s1 + 2], D_i1_8019B6D8[24 + var_s1 + 2], D_i1_8019B6D8[30 + var_s1 + 2], D_i1_8019B6D8[36 + var_s1 + 2], D_i1_8019B6D8[42 + var_s1 + 2], D_i1_8019B6D8[48 + var_s1 + 2], 0.0f, RAND_FLOAT(20.0f), 0.0f, 5.5f, var_s1 + 28, RAND_INT(30.0f) + 60.0f); } + if (boss->state < 5) { boss->state = 5; boss->timer_050 = 60; @@ -253,6 +279,7 @@ void Corneria_80187AC8(Boss* boss) { boss->swork[25] -= boss->damage; boss->swork[4] = boss->swork[5] = boss->swork[6] = 5; boss->swork[19] = 30; + if (boss->swork[25] <= 0) { boss->swork[4] = boss->swork[5] = boss->swork[6] = 1000; boss->info.hitbox[1 + 30] = 100000.0f; @@ -263,6 +290,7 @@ void Corneria_80187AC8(Boss* boss) { D_i1_8019B6D8[42 + var_s1 + 2], D_i1_8019B6D8[48 + var_s1 + 2], 0.0f, RAND_FLOAT(20.0f), 0.0f, 5.5f, var_s1 + 28, RAND_INT(30.0f) + 60.0f); } + if (boss->state < 5) { boss->state = 6; boss->timer_050 = 60; @@ -276,15 +304,18 @@ void Corneria_80187AC8(Boss* boss) { if ((boss->state != 0) && (boss->state < 5)) { boss->fwork[14] = 0.0f; + if (Rand_ZeroOne() < 0.5f) { - var_v0 = OBJ_ITEM_SILVER_RING; + item = OBJ_ITEM_SILVER_RING; } else { - var_v0 = OBJ_ITEM_BOMB; + item = OBJ_ITEM_BOMB; } - Corneria_80187838(boss, boss->obj.pos.x, boss->obj.pos.y + 100.0f, boss->obj.pos.z, var_v0); + Corneria_80187838(boss, boss->obj.pos.x, boss->obj.pos.y + 100.0f, boss->obj.pos.z, item); } + if (boss->state < 5) { boss->state = 0; + switch (RAND_INT(5.0f)) { case 0: boss->swork[31] = 2; @@ -305,9 +336,7 @@ void Corneria_80187AC8(Boss* boss) { } if (!(D_edisplay_801615D0.y < 0.0f)) { - - sprite = gSprites; - for (var_s1 = 0; var_s1 < ARRAY_COUNT(gSprites); var_s1++, sprite++) { + for (sprite = gSprites, var_s1 = 0; var_s1 < ARRAY_COUNT(gSprites); var_s1++, sprite++) { if ((sprite->obj.status == OBJ_ACTIVE) && (sprite->obj.id == OBJ_SPRITE_CO_TREE)) { if ((fabsf(sprite->obj.pos.x - D_i1_8019B6D8[20]) < 90.0f) && (fabsf(sprite->obj.pos.z - D_i1_8019B6D8[32]) < 90.0f)) { @@ -320,6 +349,7 @@ void Corneria_80187AC8(Boss* boss) { } } } + if ((boss->swork[1] == 1000) && ((gGameFrameCount % 4) == 0)) { func_effect_8007BFFC(D_i1_8019B6D8[3], D_i1_8019B6D8[4], D_i1_8019B6D8[5], (D_i1_8019B6D8[3] - boss->obj.pos.x) * 0.1f, 0.0f, @@ -344,6 +374,7 @@ void Corneria_80187AC8(Boss* boss) { ObjectId Corneria_80188750(Boss* boss) { boss->swork[35]++; + if (boss->swork[35] >= 5) { boss->swork[35] = 0; return OBJ_ACTOR_191; @@ -356,42 +387,49 @@ ObjectId Corneria_80188750(Boss* boss) { void Corneria_801887AC(Boss* boss) { Vec3f sp3C; - ObjectId sp38; + ObjectId objId; if ((gBossFrameCount < 500)) { return; } + switch (boss->swork[30]) { case 0: break; + case 1: - sp38 = Corneria_80188750(boss); - if (sp38 != 0) { + objId = Corneria_80188750(boss); + if (objId != 0) { if (boss->swork[1] != 1000) { Corneria_80187710(D_i1_8019B6D8[0], D_i1_8019B6D8[1], D_i1_8019B6D8[2], 65.0f, 0.0f, - D_i1_8019B6D8[16] + boss->obj.rot.y, 0, 0, sp38); + D_i1_8019B6D8[16] + boss->obj.rot.y, 0, 0, objId); } if (boss->swork[2] != 1000) { Corneria_80187710(D_i1_8019B6D8[6], D_i1_8019B6D8[7], D_i1_8019B6D8[8], 65.0f, 0.0f, - D_i1_8019B6D8[16] + boss->obj.rot.y, 0, 0, sp38); + D_i1_8019B6D8[16] + boss->obj.rot.y, 0, 0, objId); } } boss->swork[30] = 0; break; + case 2: Corneria_801877A0(boss, 40.0f, 228.0f, 212.0f); Corneria_801877A0(boss, -40.0f, 228.0f, 212.0f); boss->swork[30] = 0; break; + case 3: if (boss->swork[3] != 1000) { sp3C.x = gPlayer[0].pos.x; sp3C.y = gPlayer[0].pos.y; sp3C.z = gPlayer[0].trueZpos; + gPlayer[0].pos.x += RAND_FLOAT_CENTERED(300.0f); gPlayer[0].pos.y += RAND_FLOAT_CENTERED(300.0f); gPlayer[0].trueZpos += RAND_FLOAT_CENTERED(300.0f); + func_effect_8007F11C(OBJ_EFFECT_376, D_i1_8019B6D8[12], D_i1_8019B6D8[13], D_i1_8019B6D8[14], 60.0f); + gPlayer[0].pos.x = sp3C.x; gPlayer[0].pos.y = sp3C.y; gPlayer[0].trueZpos = sp3C.z; @@ -412,10 +450,12 @@ void Corneria_80188A18(Boss* boss) { case 1: boss->swork[31] = 1; break; + case 2: case 3: boss->swork[31] = 2; break; + case 4: if (D_edisplay_801615D0.y < 0.0f) { boss->swork[31] = 4; @@ -423,6 +463,7 @@ void Corneria_80188A18(Boss* boss) { boss->swork[31] = 3; } break; + case 5: case 6: case 7: @@ -438,6 +479,7 @@ void Corneria_80188A18(Boss* boss) { } } } + if ((gBossFrameCount > 800) && ((gBossFrameCount % 512) == 0)) { if (gCoUturnCount < 2) { Radio_PlayMessage(gMsg_ID_20237, RCID_PEPPY); @@ -469,9 +511,9 @@ void Corneria_80188C7C(Boss* boss) { void Corneria_80188D50(Boss* boss) { static s32 D_i1_801997E0 = 0; s32 i; - Vec3f sp48; - Vec3f sp3C; - s32 temp_ft3; + Vec3f src; + Vec3f dest; + s32 rnd; if (boss->swork[36] == 0) { if (gPlayer[0].hitTimer != 0) { @@ -485,16 +527,18 @@ void Corneria_80188D50(Boss* boss) { (fabsf(boss->obj.pos.z - gPlayer[0].trueZpos) < 200.0f) && (gPlayer[0].aerobaticPitch > 180.0f)) { boss->swork[36]++; D_i1_801997E0 = 20; + AUDIO_PLAY_SFX(NA_SE_RING_PASS, gDefaultSfxSource, 4); + if ((gTeamShields[TEAM_ID_FALCO] > 0) || (gTeamShields[TEAM_ID_SLIPPY] > 0) || (gTeamShields[TEAM_ID_PEPPY] > 0)) { - do { - do { - temp_ft3 = RAND_INT(2.9f) + 1; - } while (gTeamShields[temp_ft3] <= 0); - } while (0); + if (0) {}; - switch (temp_ft3) { + do { + rnd = RAND_INT(2.9f) + 1; + } while (gTeamShields[rnd] <= 0); + + switch (rnd) { case 1: Radio_PlayMessage(gMsg_ID_7100, RCID_FALCO); break; @@ -506,20 +550,26 @@ void Corneria_80188D50(Boss* boss) { break; } } + Matrix_RotateY(gCalcMatrix, (gPlayer[0].yRot_114 + gPlayer[0].rot.y) * M_DTOR, MTXF_NEW); - sp48.x = 0.0f; - sp48.y = 0.0f; - sp48.z = -2500.0f; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp48, &sp3C); + + src.x = 0.0f; + src.y = 0.0f; + src.z = -2500.0f; + + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + for (i = 0; i < ARRAY_COUNT(gItems); i++) { if (gItems[i].obj.status == OBJ_FREE) { Item_Initialize(&gItems[i]); + gItems[i].obj.status = OBJ_INIT; gItems[i].obj.id = OBJ_ITEM_1UP; - gItems[i].obj.pos.x = gPlayer[0].pos.x + sp3C.x; + gItems[i].obj.pos.x = gPlayer[0].pos.x + dest.x; gItems[i].obj.pos.y = gPlayer[0].pos.y + 100.0f; - gItems[i].obj.pos.z = gPlayer[0].trueZpos + sp3C.z; + gItems[i].obj.pos.z = gPlayer[0].trueZpos + dest.z; gItems[i].timer_4A = 8; + Object_SetInfo(&gItems[i].info, gItems[i].obj.id); func_effect_8007B344(gItems[i].obj.pos.x, gItems[i].obj.pos.y, gItems[i].obj.pos.z, 5.0f, 0); break; @@ -552,25 +602,32 @@ void Corneria_80189058(Boss* boss) { gBossActive = 2; boss->drawShadow = true; + boss->swork[24] = 150; boss->swork[25] = 150; boss->swork[26] = 40; boss->swork[27] = 40; boss->swork[28] = 40; boss->swork[29] = 130; + boss->info.hitbox[1 + 0] = -241.0f; boss->info.hitbox[1 + 6] = 0.0f; boss->info.hitbox[1 + 12] = 0.0f; boss->info.hitbox[1 + 18] = 0.0f; boss->info.hitbox[1 + 24] = 0.0f; boss->info.hitbox[1 + 30] = 0.0f; + boss->timer_052 = 100; boss->state = 0; boss->swork[31] = 1; + D_i1_8019B6D8[66] = 0.0f; D_i1_8019B6D8[67] = 10000.0f; + boss->timer_050 = 30; + Animation_GetFrameData(&D_CO_602C0D0, 0, boss->vwork); + gBossFrameCount = 0; } gBossFrameCount++; @@ -581,7 +638,9 @@ void Corneria_80189058(Boss* boss) { gRadarMarks[59].pos.z = boss->obj.pos.z; gRadarMarks[59].yRot = boss->obj.rot.y + 180.0f; + Corneria_80188D50(boss); + if (D_edisplay_801615D0.z > 0.0f) { if (D_edisplay_801615D0.x > 0.0f) { gPlayer[0].flags_228 = PFLAG_228_4; @@ -621,13 +680,13 @@ void Corneria_80189058(Boss* boss) { } for (sp218 = 0; sp218 < 24; sp218++) { - if ((boss->swork[sp218] != 0) && (boss->swork[sp218] < 1000)) { boss->swork[sp218]--; } } Corneria_80187AC8(boss); + boss->fwork[0] = SIN_DEG(boss->swork[18] * 50.0f) * Corneria_80187A88(boss->swork[18]); boss->fwork[1] = SIN_DEG(boss->swork[19] * 50.0f) * Corneria_80187A88(boss->swork[19]); boss->fwork[2] = SIN_DEG(boss->swork[20] * 50.0f) * Corneria_80187A88(boss->swork[20]); @@ -638,12 +697,15 @@ void Corneria_80189058(Boss* boss) { sp5C = SIN_DEG(boss->swork[23] * 12.0f) * Corneria_80187A88(boss->swork[23]) * 0.3f; Math_SmoothStepToF(&boss->obj.rot.z, sp5C, 0.2f, 100.0f, 0.001f); } + if (boss->obj.pos.y <= 10.0f) { boss->obj.pos.y = 10.0f; } + sp214 = D_i1_8019B6D8[17] - boss->obj.pos.x; sp210 = D_i1_8019B6D8[18] - (boss->obj.pos.y + 300.0f); sp20C = D_i1_8019B6D8[19] - boss->obj.pos.z; + sp1FC = Math_RadToDeg(Math_Atan2F(sp214, sp20C)); sp204 = sqrtf((sp214 * sp214) + (sp20C * sp20C)); sp200 = Math_RadToDeg(-Math_Atan2F(sp210, sp204)); @@ -654,6 +716,7 @@ void Corneria_80189058(Boss* boss) { if ((sp200 < 310.0f) && (sp200 > 180.0f)) { sp200 = 310.0f; } + sp1FC -= boss->obj.rot.y; if (sp1FC > 360.0f) { sp1FC -= 360.0f; @@ -670,11 +733,13 @@ void Corneria_80189058(Boss* boss) { Math_SmoothStepToAngle(&D_i1_8019B6D8[16], sp1FC, 0.1f, 3.0f, 0.0f); Math_SmoothStepToAngle(&D_i1_8019B6D8[15], sp200, 0.1f, 3.0f, 0.0f); + if (boss->state != 0) { sp1F8 = Math_RadToDeg(Math_Atan2F(D_i1_8019B6D8[66] - boss->obj.pos.x, D_i1_8019B6D8[67] - boss->obj.pos.z)); Math_SmoothStepToAngle(&boss->obj.rot.y, sp1F8, 0.1f, 3.0f, 0.0f); } + Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, 0U); switch (boss->state) { @@ -683,6 +748,7 @@ void Corneria_80189058(Boss* boss) { D_i1_8019B6D8[17] = gPlayer[0].pos.x; D_i1_8019B6D8[18] = gPlayer[0].pos.y; D_i1_8019B6D8[19] = gPlayer[0].trueZpos; + if (boss->timer_050 == 0) { switch (boss->swork[31]) { case 1: @@ -690,6 +756,7 @@ void Corneria_80189058(Boss* boss) { boss->timer_050 = RAND_INT(50.0f) + 50; boss->fwork[14] = 0.0f; break; + case 2: boss->state = 2; boss->timer_050 = RAND_INT(100.0f) + 150; @@ -697,6 +764,7 @@ void Corneria_80189058(Boss* boss) { boss->timer_054 = 40; boss->fwork[14] = 0.07f; break; + case 4: boss->state = 4; boss->timer_050 = RAND_INT(70.0f) + 100; @@ -705,6 +773,7 @@ void Corneria_80189058(Boss* boss) { D_i1_8019B6D8[67] = RAND_FLOAT_CENTERED(6000.0f); boss->fwork[14] = 0.07f; break; + case 3: boss->state = 3; boss->timer_050 = RAND_INT(100.0f) + 150; @@ -712,12 +781,15 @@ void Corneria_80189058(Boss* boss) { break; } } + Animation_GetFrameData(&D_CO_602C0D0, boss->unk_04C, sp84); + if (boss->timer_052 == 0) { boss->timer_052 = 150; boss->swork[30] = 1; } break; + case 1: D_i1_8019B6D8[17] = D_i1_8019B6D8[66] = gPlayer[0].pos.x; D_i1_8019B6D8[18] = gPlayer[0].pos.y; @@ -727,14 +799,18 @@ void Corneria_80189058(Boss* boss) { if (boss->unk_04C >= Animation_GetFrameCount(&D_CO_602BC18)) { boss->unk_04C = 0; } + Animation_GetFrameData(&D_CO_602BC18, boss->unk_04C, sp84); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp1EC, &sp21C); + if (boss->timer_052 == 0) { boss->timer_052 = 150; boss->swork[30] = 1; } + Corneria_80188A18(boss); break; + case 2: D_i1_8019B6D8[17] = D_i1_8019B6D8[66] = gPlayer[0].pos.x; D_i1_8019B6D8[18] = gPlayer[0].pos.y; @@ -744,8 +820,10 @@ void Corneria_80189058(Boss* boss) { if (boss->unk_04C < 0) { boss->unk_04C = 100; } + Animation_GetFrameData(&D_CO_602BC18, boss->unk_04C, sp84); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp6C, &sp21C); + if (boss->timer_052 == 0) { boss->timer_052 = 30; boss->swork[30] = 2; @@ -754,8 +832,10 @@ void Corneria_80189058(Boss* boss) { boss->timer_054 = 9; boss->swork[30] = 3; } + Corneria_80188A18(boss); break; + case 3: D_i1_8019B6D8[17] = D_i1_8019B6D8[66] = gPlayer[0].pos.x; D_i1_8019B6D8[18] = gPlayer[0].pos.y; @@ -765,8 +845,10 @@ void Corneria_80189058(Boss* boss) { if (boss->unk_04C > 100) { boss->unk_04C = 0; } + Animation_GetFrameData(&D_CO_602BC18, boss->unk_04C, sp84); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp78, &sp21C); + if (boss->timer_052 == 0) { boss->timer_052 = 30; boss->swork[30] = 2; @@ -775,8 +857,10 @@ void Corneria_80189058(Boss* boss) { boss->timer_054 = 9; boss->swork[30] = 3; } + Corneria_80188A18(boss); break; + case 4: D_i1_8019B6D8[17] = gPlayer[0].pos.x; D_i1_8019B6D8[18] = gPlayer[0].pos.y; @@ -786,20 +870,26 @@ void Corneria_80189058(Boss* boss) { if (boss->unk_04C > 100) { boss->unk_04C = 0; } + Animation_GetFrameData(&D_CO_602BC18, boss->unk_04C, sp84); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp78, &sp21C); + Corneria_80188A18(boss); break; + case 5: case 6: boss->drawShadow = false; gGroundClipMode = 1; + if (((gGameFrameCount % 8) == 0)) { D_i1_8019B6D8[17] = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(2000.0f); D_i1_8019B6D8[18] = gPlayer[0].pos.y; D_i1_8019B6D8[19] = gPlayer[0].trueZpos + RAND_FLOAT_CENTERED(2000.0f); } + boss->fwork[12] += 0.05f; + if (boss->state == 6) { boss->obj.rot.z += boss->fwork[12]; if (boss->obj.rot.z > 60.0f) { @@ -830,6 +920,7 @@ void Corneria_80189058(Boss* boss) { } boss->obj.rot.x = -boss->obj.rot.z; } + if (boss->timer_050 == 0) { ObjectId objId; @@ -843,12 +934,15 @@ void Corneria_80189058(Boss* boss) { } boss->yOffset = SIN_DEG(boss->obj.rot.z) * 30.0f; + if (((gGameFrameCount % 16) == 0)) { boss->unk_04C = RAND_INT(100.0f); } + Animation_GetFrameData(&D_CO_602BC18, boss->unk_04C, sp84); boss->fwork[14] = 0.03f; break; + case 7: if (boss->swork[32] != 0) { boss->fwork[12] += 0.05f; @@ -871,9 +965,11 @@ void Corneria_80189058(Boss* boss) { Object_Kill(&gEffects[sp218].obj, gEffects[sp218].sfxSource); } } + func_effect_8007A568(D_i1_8019B6D8[62], D_i1_8019B6D8[63] - 100.0f, D_i1_8019B6D8[64], 40.0f); func_effect_8007D0E0(D_i1_8019B6D8[62], D_i1_8019B6D8[63] - 100.0f, D_i1_8019B6D8[64], 30.0f); func_enmy_80062B60(D_i1_8019B6D8[62], D_i1_8019B6D8[64], 0, 120.0f); + gCameraShake = 25; gShowBossHealth = 0; @@ -883,6 +979,7 @@ void Corneria_80189058(Boss* boss) { D_i1_8019B6D8[64] + RAND_FLOAT_CENTERED(600.0f), 2.0f); } } + if (boss->timer_050 < 50) { boss->dmgPart = boss->timer_050 % 8U; @@ -892,6 +989,7 @@ void Corneria_80189058(Boss* boss) { boss->dmgType = DMG_BEAM; } break; + case 2: if (boss->swork[1] != 1000) { boss->dmgType = DMG_BEAM; @@ -901,6 +999,7 @@ void Corneria_80189058(Boss* boss) { boss->dmgType = DMG_BEAM; } break; + case 4: if (boss->swork[7] != 1000) { boss->dmgType = DMG_BEAM; @@ -912,18 +1011,23 @@ void Corneria_80189058(Boss* boss) { break; } } + if (boss->timer_050 == 0) { Object_Kill(&boss->obj, boss->sfxSource); } Animation_GetFrameData(&D_CO_602BC18, 0, sp84); break; + default: Animation_GetFrameData(&D_CO_602C0D0, boss->unk_04C, sp84); break; } + Math_SmoothStepToF(&boss->vel.x, sp21C.x, 0.3f, 5.0f, 0.0f); Math_SmoothStepToF(&boss->vel.z, sp21C.z, 0.3f, 5.0f, 0.0f); + Corneria_801887AC(boss); + Math_SmoothStepToVec3fArray(sp84, boss->vwork, 1, 19, boss->fwork[14], 100.0f, 0.0f); Math_SmoothStepToF(&boss->fwork[14], 1.0f, 1.0f, 0.01f, 0.0f); @@ -935,9 +1039,11 @@ void Corneria_80189058(Boss* boss) { D_i1_8019B6D8[67] = 0.0f; boss->swork[31] = 0; } + if ((boss->state != 0) && ((boss->unk_04C == 0) || (boss->unk_04C == 52))) { AUDIO_PLAY_SFX(NA_SE_EN_HEAVY_WALK, boss->sfxSource, 4); } + if (gPlayer[0].somersault && (boss->state != 0)) { boss->state = 0; boss->swork[31] = 1; @@ -956,54 +1062,65 @@ bool Corneria_8018A434(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* } RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, 1001); + switch (limbIndex) { case 6: rot->x += boss->fwork[1]; rot->y += boss->fwork[1]; rot->y -= boss->fwork[13] * 0.6f; break; + case 5: rot->x -= boss->fwork[1]; rot->y -= boss->fwork[1]; rot->z += boss->fwork[1]; break; + case 4: rot->x += boss->fwork[1]; rot->y += boss->fwork[1]; rot->z -= boss->fwork[1]; break; + case 9: rot->x -= boss->fwork[0]; rot->y -= boss->fwork[0]; rot->y += boss->fwork[13]; break; + case 8: rot->x += boss->fwork[0]; rot->y += boss->fwork[0]; rot->z -= boss->fwork[0]; break; + case 7: rot->x -= boss->fwork[0]; rot->y -= boss->fwork[0]; rot->z += boss->fwork[0]; break; + case 3: rot->x += boss->fwork[2]; rot->y += boss->fwork[2]; rot->z += D_i1_8019B6D8[15]; break; + case 1: rot->x += boss->fwork[4] - D_i1_8019B6D8[15]; rot->y += boss->fwork[4]; break; + case 2: rot->x += boss->fwork[3] + D_i1_8019B6D8[15]; rot->y += boss->fwork[3]; break; + case 16: rot->x += D_i1_8019B6D8[16]; break; } + if (((boss->swork[limbIndex] % 2) != 0) || ((boss->timer_05C % 2) != 0)) { RCP_SetupDL_64(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 64, 64, 255, 255); @@ -1028,11 +1145,14 @@ void Corneria_8018A730(s32 limbIndex, Vec3f* rot, void* data) { D_i1_8019B6D8[limbIndex + 16] = sp74.x; D_i1_8019B6D8[limbIndex + 22] = sp74.y; D_i1_8019B6D8[limbIndex + 28] = sp74.z; + Matrix_GetYRPAngles(gCalcMatrix, &sp74); + D_i1_8019B6D8[limbIndex + 34] = sp74.x; D_i1_8019B6D8[limbIndex + 40] = sp74.y; D_i1_8019B6D8[limbIndex + 46] = sp74.z; } + switch (limbIndex) { case 1: Matrix_MultVec3f(gCalcMatrix, &sp68, &sp74); @@ -1044,6 +1164,7 @@ void Corneria_8018A730(s32 limbIndex, Vec3f* rot, void* data) { D_i1_8019B6D8[1] = sp74.y; D_i1_8019B6D8[2] = sp74.z; break; + case 2: Matrix_MultVec3f(gCalcMatrix, &sp68, &sp74); D_i1_8019B6D8[9] = sp74.x; @@ -1054,12 +1175,14 @@ void Corneria_8018A730(s32 limbIndex, Vec3f* rot, void* data) { D_i1_8019B6D8[7] = sp74.y; D_i1_8019B6D8[8] = sp74.z; break; + case 3: Matrix_MultVec3f(gCalcMatrix, &sp50, &sp74); D_i1_8019B6D8[12] = sp74.x; D_i1_8019B6D8[13] = sp74.y; D_i1_8019B6D8[14] = sp74.z; break; + case 17: Matrix_MultVec3f(gCalcMatrix, &sp44, &sp74); D_i1_8019B6D8[56] = sp74.x; @@ -1070,12 +1193,14 @@ void Corneria_8018A730(s32 limbIndex, Vec3f* rot, void* data) { D_i1_8019B6D8[60] = sp74.y; D_i1_8019B6D8[61] = sp74.z; break; + case 10: Matrix_MultVec3f(gCalcMatrix, &sp2C, &sp74); D_i1_8019B6D8[62] = sp74.x; D_i1_8019B6D8[63] = sp74.y; D_i1_8019B6D8[64] = sp74.z; break; + default: break; } @@ -1113,6 +1238,7 @@ s32 Corneria_8018AB64(Actor* actor) { sp7C.x = sp60[i] + actor->obj.pos.x; sp7C.y = actor->obj.pos.y; sp7C.z = sp50[i] + actor->obj.pos.z; + temp_v0 = Object_CheckCollision(actor->index, &sp7C, &sp70, 1); if ((temp_v0 != 0) && (temp_v0 >= 10)) { if ((gScenery[temp_v0 - 10].obj.status == OBJ_ACTIVE) && @@ -1125,15 +1251,16 @@ s32 Corneria_8018AB64(Actor* actor) { } void Corneria_8018ACE0(Actor* actor) { - if (actor->dmgType != DMG_NONE) { actor->dmgType = DMG_NONE; + if (actor->dmgPart == 0) { AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, actor->sfxSource, 4); func_effect_8007C120(actor->obj.pos.x, actor->obj.pos.y + 200.0f, actor->obj.pos.z, actor->vel.x, actor->vel.y, actor->vel.z, 0.1f, 20); actor->timer_0C6 = 15; actor->health -= actor->damage; + if (actor->health <= 0) { actor->obj.id = OBJ_ACTOR_179; Object_SetInfo(&actor->info, actor->obj.id); @@ -1144,6 +1271,7 @@ void Corneria_8018ACE0(Actor* actor) { } } } + if ((actor->health < 11) && ((gGameFrameCount % 4) == 0)) { func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(100.0f), actor->obj.pos.y + 200.0f + RAND_FLOAT_CENTERED(100.0f), @@ -1159,17 +1287,21 @@ void Corneria_8018AED0(Actor* actor) { f32 temp_cos; Corneria_8018ACE0(actor); + Math_SmoothStepToVec3fArray(sp40, actor->vwork, 0, Animation_GetFrameData(&D_CO_602991C, actor->animFrame, sp40), 1.0f, 1.0f, 1.0f); + temp_sin = SIN_DEG(actor->obj.rot.y); actor->vel.x = actor->fwork[0] * temp_sin; temp_cos = COS_DEG(actor->obj.rot.y); actor->vel.z = actor->fwork[0] * temp_cos; + switch (actor->state) { case 0: actor->fwork[1] += 20.0f; Texture_Scroll(D_CO_60329C0, 16, 16, 1); actor->animFrame = 0; + actor->fwork[0] += 1.0f; if (actor->fwork[0] > 10.0f) { actor->fwork[0] = 10.0f; @@ -1178,13 +1310,14 @@ void Corneria_8018AED0(Actor* actor) { actor->iwork[0] = Corneria_8018AB64(actor); if (actor->iwork[0] != 0) { actor->state++; - return; } - return; + break; + case 1: actor->animFrame++; actor->fwork[1] += 20.0f; actor->fwork[0] = 0.0f; + if (actor->animFrame == 50) { gScenery[actor->iwork[0] - 1].state = 1; } @@ -1192,6 +1325,7 @@ void Corneria_8018AED0(Actor* actor) { actor->state++; } break; + case 2: actor->animFrame = 0; actor->fwork[1] += 20.0f; @@ -1229,6 +1363,7 @@ void Corneria_8018B15C(Actor* actor) { Corneria_8018ACE0(actor); scenery = &gScenery[actor->iwork[0]]; + temp_sin = SIN_DEG(actor->obj.rot.y); actor->vel.x = actor->fwork[0] * temp_sin; temp_cos = COS_DEG(actor->obj.rot.y); @@ -1356,7 +1491,6 @@ void Corneria_8018B58C(Actor* actor) { } if (actor->timer_0BC == 0) { - for (i = 0; i < 4; i++) { Boss_SpawnDebris(actor->fwork[2 + i], actor->fwork[6 + i], actor->fwork[10 + i], 0.0f, 0.0f, 0.0f, @@ -1375,12 +1509,14 @@ void Corneria_8018B58C(Actor* actor) { actor->state = 101; actor->timer_0BE = 50; } + if (actor->timer_0BC == 8) { func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y + 200.0f, actor->obj.pos.z + 50.0f, 0.0f, 0.0f, 0.0f, 5.0f, 30); AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, actor->sfxSource, 4); } break; + case 101: if ((actor->timer_0BE != 0) && ((gGameFrameCount % 2) == 0)) { func_effect_8007797C(actor->obj.pos.x, actor->obj.pos.y + 150.0f, actor->obj.pos.z, 0.0f, 10.0f, 0.0f, @@ -1429,31 +1565,35 @@ bool Corneria_8018BC50(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* void Corneria_8018BC84(s32 limbIndex, Vec3f* rot, void* data) { Actor* actor = (Actor*) data; - Vec3f sp28 = { 0.0f, 0.0f, 0.0f }; - Vec3f sp1C; + Vec3f src = { 0.0f, 0.0f, 0.0f }; + Vec3f dest; + + Matrix_MultVec3f(gCalcMatrix, &src, &dest); - Matrix_MultVec3f(gCalcMatrix, &sp28, &sp1C); switch (limbIndex) { case 1: - actor->fwork[2] = sp1C.x; - actor->fwork[6] = sp1C.y; - actor->fwork[10] = sp1C.z; - return; + actor->fwork[2] = dest.x; + actor->fwork[6] = dest.y; + actor->fwork[10] = dest.z; + break; + case 2: - actor->fwork[3] = sp1C.x; - actor->fwork[7] = sp1C.y; - actor->fwork[11] = sp1C.z; - return; + actor->fwork[3] = dest.x; + actor->fwork[7] = dest.y; + actor->fwork[11] = dest.z; + break; + case 3: - actor->fwork[4] = sp1C.x; - actor->fwork[8] = sp1C.y; - actor->fwork[12] = sp1C.z; - return; + actor->fwork[4] = dest.x; + actor->fwork[8] = dest.y; + actor->fwork[12] = dest.z; + break; + case 4: - actor->fwork[5] = sp1C.x; - actor->fwork[9] = sp1C.y; - actor->fwork[13] = sp1C.z; - return; + actor->fwork[5] = dest.x; + actor->fwork[9] = dest.y; + actor->fwork[13] = dest.z; + break; } } @@ -1461,14 +1601,14 @@ void Corneria_8018BD7C(Actor* actor) { Animation_DrawSkeleton(3, D_CO_6029A48, actor->vwork, Corneria_8018BC50, Corneria_8018BC84, actor, gCalcMatrix); } -void Corneria_8018BDD4(Boss* boss, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5, s32 arg6) { +void Corneria_8018BDD4(Boss* boss, f32 xPos, f32 yPos, f32 zPos, f32 arg4, s32 arg5, s32 arg6) { ObjectId objId = OBJ_ACTOR_191; if (func_hud_8008AC54(0) < 4) { objId = OBJ_ACTOR_190; } - Corneria_80187710(boss->obj.pos.x + arg1, boss->obj.pos.y + arg2, boss->obj.pos.z + arg3, arg4, boss->obj.rot.x, + Corneria_80187710(boss->obj.pos.x + xPos, boss->obj.pos.y + yPos, boss->obj.pos.z + zPos, arg4, boss->obj.rot.x, boss->obj.rot.y, arg5, arg6, objId); } @@ -1478,10 +1618,12 @@ void Corneria_Boss293_Init(Boss293* this) { gBossActive = 1; gBossFrameCount = 0; + this->drawShadow = true; this->timer_050 = 354; this->health = 601; this->fwork[18] = -gArwingSpeed - 10.0f; + if (fabsf(gPlayer[0].xPath) < 1.0f) { this->timer_05A = 30000; this->obj.pos.z = (gPlayer[0].cam.eye.z - gPathProgress) - 2000.0f; @@ -1569,9 +1711,11 @@ void Corneria_8018C19C(Boss* boss) { f32* temp_a1; gBossFrameCount++; + Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, boss->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, MTXF_APPLY); + if (D_i1_8019B6D0 == 0) { if (boss->obj.pos.x > 6000.0f) { Object_Kill(&boss->obj, boss->sfxSource); @@ -1580,14 +1724,19 @@ void Corneria_8018C19C(Boss* boss) { } return; } + sp78.x = 0.0f; sp78.y = 0.0f; sp78.z = 60.0f; + Matrix_MultVec3f(gCalcMatrix, &sp78, &sp6C); + boss->vel.x = sp6C.x; boss->vel.y = sp6C.y; boss->vel.z = sp6C.z - gPathVelZ; + boss->fwork[16] = 4.0f; + if (((gGameFrameCount % 2) == 0)) { Matrix_MultVec3f(gCalcMatrix, &D_i1_80199914[0], &sp84[6]); Matrix_MultVec3f(gCalcMatrix, &D_i1_80199914[1], &sp84[7]); @@ -1631,6 +1780,7 @@ void Corneria_8018C19C(Boss* boss) { } } } + if (boss->dmgType != DMG_NONE) { boss->dmgType = DMG_NONE; if ((gBosses[1].state != 0) && (gBosses[2].state != 0) && (gBosses[3].state != 0)) { @@ -1648,32 +1798,40 @@ void Corneria_8018C19C(Boss* boss) { AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, boss->sfxSource, 4); } } + boss->vel.z = boss->fwork[18]; + if (boss->state > 0) { boss->fwork[3] = (gPlayer[0].cam.eye.z - gPathProgress) - 2500.0f; } + if (boss->state != 7) { Math_SmoothStepToF(&boss->fwork[4], boss->fwork[5], 0.1f, 2.0f, 0.00001f); Math_SmoothStepToF(&boss->obj.pos.z, boss->fwork[3], 0.1f, boss->fwork[4], 0.00001f); } + Math_SmoothStepToF(&boss->obj.pos.y, boss->fwork[6], 0.02f, 2.0f, 0.00001f); Math_SmoothStepToAngle(&boss->fwork[0], boss->fwork[9], 0.2f, 5.0f, 0.00001f); Math_SmoothStepToAngle(&boss->fwork[1], boss->fwork[10], 0.2f, 5.0f, 0.00001f); Math_SmoothStepToAngle(&boss->fwork[2], boss->fwork[11], 0.2f, 5.0f, 0.00001f); + if (boss->state < 6) { Math_SmoothStepToAngle(&boss->obj.rot.y, boss->fwork[13], 0.03f, boss->fwork[8], 0.00001f); Math_SmoothStepToF(&boss->fwork[8], boss->fwork[12], 0.1f, 0.02f, 0.001f); Math_SmoothStepToAngle(&boss->obj.rot.z, boss->fwork[14], 0.03f, boss->fwork[15], 0.00001f); + if (boss->timer_056 == 1) { boss->fwork[14] = 0.0f; boss->fwork[15] = 0.5f; } } + if ((gBosses[1].state != 0) && ((gGameFrameCount % 16) == 0)) { Matrix_MultVec3f(gCalcMatrix, &D_i1_80199908, &sp84[5]); func_effect_8007D0E0(gBosses[0].obj.pos.x + sp84[5].x, gBosses[0].obj.pos.y + sp84[5].y, gBosses[0].obj.pos.z + sp84[5].z, 5.0f); } + if (gBosses[2].state != 0) { gBosses[3].drawShadow = true; if (gBosses[3].state != 0) { @@ -1688,6 +1846,7 @@ void Corneria_8018C19C(Boss* boss) { gBosses[0].obj.pos.z + sp84[9].z, 5.0f); } } + if ((gBosses[3].state != 0) && (gBosses[2].state == 0) && ((gGameFrameCount % 16) == 0)) { Matrix_MultVec3f(gCalcMatrix, &D_i1_80199944, &sp84[10]); func_effect_8007D0E0(gBosses[0].obj.pos.x + sp84[10].x, gBosses[0].obj.pos.y + sp84[10].y, @@ -1698,6 +1857,7 @@ void Corneria_8018C19C(Boss* boss) { Matrix_MultVec3f(gCalcMatrix, &D_i1_80199914[0], &sp84[6]); Matrix_MultVec3f(gCalcMatrix, &D_i1_80199914[1], &sp84[7]); Matrix_MultVec3f(gCalcMatrix, &D_i1_8019992C, &sp84[8]); + func_effect_8007BC7C(sp84[6].x + boss->obj.pos.x, sp84[6].y + boss->obj.pos.y, sp84[6].z + boss->obj.pos.z, 20.0f); func_effect_8007BC7C(sp84[7].x + boss->obj.pos.x, sp84[7].y + boss->obj.pos.y, sp84[7].z + boss->obj.pos.z, @@ -1705,6 +1865,7 @@ void Corneria_8018C19C(Boss* boss) { func_effect_8007BC7C(sp84[8].x + boss->obj.pos.x, sp84[8].y + boss->obj.pos.y, sp84[8].z + boss->obj.pos.z, 10.0f); } + if (boss->timer_052 != 0) { Math_SmoothStepToF(&D_ctx_801779A8[0], 50.0f, 1.0f, 1.6f, 0.0001f); } @@ -1712,15 +1873,18 @@ void Corneria_8018C19C(Boss* boss) { switch (boss->state) { case 0: boss->fwork[3] = gPlayer[0].trueZpos + 1500.0f; + if (boss->timer_050 == 350) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 40); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 40); Radio_PlayMessage(gMsg_ID_2290, RCID_BOSS_CORNERIA2); } + if (boss->timer_050 == 180) { Radio_PlayMessage(gMsg_ID_2298, RCID_PEPPY); boss->timer_052 = 350; } + if (boss->timer_050 == 0) { boss->obj.pos.y = 900.0f; boss->state = 1; @@ -1733,6 +1897,7 @@ void Corneria_8018C19C(Boss* boss) { boss->timer_050 = 40; } break; + case 1: if (boss->timer_050 == 0) { boss->state = 2; @@ -1741,6 +1906,7 @@ void Corneria_8018C19C(Boss* boss) { boss->timer_050 = 250; } break; + case 2: if (boss->timer_050 == 0) { boss->state = 3; @@ -1752,12 +1918,14 @@ void Corneria_8018C19C(Boss* boss) { boss->swork[4]++; } break; + case 3: boss->fwork[12] = 1.5f; boss->fwork[11] = 0.0f; boss->fwork[9] = 0.0f; boss->fwork[10] = 0.0f; boss->fwork[13] = 0.0f; + if (boss->timer_050 == 0) { boss->state = boss->swork[0]; boss->timer_050 = 60; @@ -1765,43 +1933,53 @@ void Corneria_8018C19C(Boss* boss) { AUDIO_PLAY_SFX(NA_SE_EN_HATCH, boss->sfxSource, 4); } break; + case 4: boss->fwork[11] = 120.0f; boss->fwork[13] = 340.0f; + if ((boss->timer_050 == 0) || (gBosses[1].state != 0)) { boss->state = 3; boss->swork[0] = 5; boss->timer_050 = 20; boss->fwork[8] = 0.0f; + if (gBosses[1].state == 0) { AUDIO_PLAY_SFX(NA_SE_EN_HATCH, boss->sfxSource, 4); } + if ((boss->swork[5] == 0) && ((gBosses[2].state == 0) || (gBosses[3].state == 0))) { Radio_PlayMessage(gMsg_ID_2292, RCID_BOSS_CORNERIA2); } + boss->swork[5]++; boss->swork[5] &= 3; + } else if ((boss->fwork[2] > 60.0f) && (boss->timer_054 == 0)) { boss->timer_054 = 20; Corneria_8018BDD4(boss, sp84[0].x, sp84[0].y, sp84[0].z, 30.0f, 0, 1); } break; + case 5: boss->fwork[9] = 120.0f; boss->fwork[10] = 120.0f; boss->fwork[13] = 20.0f; + if ((boss->fwork[0] > 60.0f) && (gBosses[2].state == 0) && (boss->swork[1] == 0)) { Corneria_8018BDD4(boss, sp84[1].x, sp84[1].y + 50.0f, sp84[1].z, 45.0f, 0, 0); AUDIO_PLAY_SFX(NA_SE_EN_BARREL_SHOT, boss->sfxSource, 4); Corneria_8018BDD4(boss, sp84[1].x, sp84[1].y - 50.0f, sp84[1].z, 40.0f, 0, 0); boss->swork[1] = 1; } + if ((boss->fwork[1] > 60.0f) && (gBosses[3].state == 0) && (boss->swork[2] == 0)) { Corneria_8018BDD4(boss, sp84[2].x, sp84[2].y + 50.0f, sp84[2].z, 35.0f, 0, 0); AUDIO_PLAY_SFX(NA_SE_EN_BARREL_SHOT, boss->sfxSource, 4); Corneria_8018BDD4(boss, sp84[2].x, sp84[2].y - 50.0f, sp84[2].z, 30.0f, 0, 0); boss->swork[2] = 1; } + if ((boss->timer_050 == 0) || ((gBosses[3].state != 0) && (gBosses[2].state != 0))) { boss->state = 3; boss->swork[0] = 4; @@ -1809,24 +1987,30 @@ void Corneria_8018C19C(Boss* boss) { boss->swork[1] = 0; boss->swork[2] = 0; boss->fwork[8] = 0.0f; + if ((boss->swork[4] == 0) && (gBosses[1].state == 0)) { Radio_PlayMessage(gMsg_ID_2291, RCID_BOSS_CORNERIA2); } + if ((boss->swork[4] == 2) && (boss->swork[7] == 0) && ((gBosses[3].state == 0) || (gBosses[2].state == 0) || (gBosses[1].state == 0))) { Radio_PlayMessage(gMsg_ID_2299, RCID_PEPPY); boss->swork[7]++; } + boss->swork[4]++; boss->swork[4] &= 3; + if ((gBosses[3].state == 0) && (gBosses[2].state == 0)) { AUDIO_PLAY_SFX(NA_SE_EN_HATCH, boss->sfxSource, 4); } } break; + case 6: Math_SmoothStepToAngle(&boss->obj.rot.y, boss->fwork[13], 0.1f, 5.0f, 0.01f); Math_SmoothStepToAngle(&boss->obj.rot.z, boss->fwork[14], 0.1f, 5.0f, 0.01f); + if ((boss->obj.rot.y == 0.0f) || (boss->timer_058 == 0)) { boss->timer_058 = 0; boss->state = 7; @@ -1834,11 +2018,12 @@ void Corneria_8018C19C(Boss* boss) { boss->obj.rot.y = 0.0f; } break; + case 7: boss->fwork[3] = (gPlayer[0].cam.eye.z - gPathProgress) - 4000.0f; Math_SmoothStepToF(&boss->obj.pos.z, boss->fwork[3], 0.1f, 15.0f, 0.00001f); - if (boss->timer_058 == 0) { + if (boss->timer_058 == 0) { boss->timer_058 = D_i1_80199A4C[boss->swork[3]]; boss->fwork[20] = D_i1_80199A5C[boss->swork[3]]; boss->swork[3]++; @@ -1852,7 +2037,6 @@ void Corneria_8018C19C(Boss* boss) { } if ((boss->swork[3] == 0) || (boss->swork[3] == 2)) { - if ((boss->obj.rot.y < 20.0f) && (boss->obj.rot.y > -20.0f)) { if (boss->swork[9] == 0) { boss->swork[9]++; @@ -1863,12 +2047,13 @@ void Corneria_8018C19C(Boss* boss) { boss->swork[6]++; boss->swork[6] &= 1; } + if (((gGameFrameCount % 8) == 0)) { if (fabsf(boss->obj.pos.z - gPlayer[0].trueZpos) > 700.0f) { Matrix_MultVec3f(gCalcMatrix, &D_i1_801998F0[0], &sp84[3]); - effect = gEffects; - for (i = 0; i < ARRAY_COUNT(gEffects); i++, effect++) { + + for (effect = gEffects, i = 0; i < ARRAY_COUNT(gEffects); i++, effect++) { if (effect->obj.status == OBJ_FREE) { Effect_Initialize(effect); effect->obj.status = OBJ_INIT; @@ -1892,14 +2077,20 @@ void Corneria_8018C19C(Boss* boss) { } } } + if (boss->health < 2) { gTeamLowHealthMsgTimer = -1; + Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_ZOBOSS_BEAM); + SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 40); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 40); + AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, boss->sfxSource, 4); + gScreenFlashTimer = 8; gShowBossHealth = false; + Radio_PlayMessage(gMsg_ID_2294, RCID_BOSS_CORNERIA2); boss->health = 1; boss->timer_056 = 150; @@ -1908,6 +2099,7 @@ void Corneria_8018C19C(Boss* boss) { } else { Math_SmoothStepToF(&boss->fwork[8], 3.0f, 0.1f, 0.5f, 0.001f); Math_SmoothStepToAngle(&boss->obj.rot.z, boss->fwork[14], 0.1f, 3.0f, 0.00001f); + temp_fv0_2 = Math_SmoothStepToF(&boss->obj.rot.y, boss->fwork[20], 0.1f, boss->fwork[8], 0.00001f); boss->fwork[14] = 0.0f; if (temp_fv0_2 < -1.0f) { @@ -1916,27 +2108,34 @@ void Corneria_8018C19C(Boss* boss) { if (temp_fv0_2 > 1.0f) { boss->fwork[14] = 335.0f; } + sp78.x = 0.0f; sp78.y = 0.0f; sp78.z = 40.0f; + Matrix_MultVec3f(gCalcMatrix, &sp78, &sp6C); + boss->vel.x = sp6C.x; boss->vel.y = sp6C.y; boss->vel.z = sp6C.z - gPathVelZ; } break; + case 8: D_ctx_801779A8[0] = 20.0f; + if (((gGameFrameCount % 32) == 0)) { for (i = 0; i < 10; i++) { func_effect_80079618(RAND_FLOAT_CENTERED(300.0f) + boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 1.0f); } } + Math_SmoothStepToF(&boss->obj.pos.x, boss->fwork[7], 1.0f, 10.0f, 0.00001f); Math_SmoothStepToF(&boss->vel.x, 0.0f, 0.1f, 2.0f, 0.00001f); Math_SmoothStepToF(&boss->vel.y, 0.0f, 0.1f, 2.0f, 0.00001f); Math_SmoothStepToF(&boss->vel.z, 0.0f, 0.1f, 2.0f, 0.00001f); + if (boss->obj.rot.z == boss->fwork[14]) { if (boss->fwork[14] == boss->fwork[19]) { boss->fwork[14] = 360.0f - boss->fwork[19]; @@ -1944,17 +2143,21 @@ void Corneria_8018C19C(Boss* boss) { boss->fwork[14] = boss->fwork[19]; } } + Math_SmoothStepToAngle(&boss->obj.rot.z, boss->fwork[14], 1.0f, 1.0f, 0.001f); + if (boss->health != 0) { if (boss->timer_056 == 0) { Boss_AwardBonus(boss); boss->fwork[17] = 10.0f; boss->vel.y *= 1.5f; gMissionStatus = MISSION_ACCOMPLISHED; + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { Boss_CompleteLevel(gPlayer, boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z); } + boss->health--; boss->fwork[8] = 0.0f; Radio_PlayMessage(gMsg_ID_2296, RCID_BOSS_CORNERIA2); @@ -1975,6 +2178,7 @@ void Corneria_8018C19C(Boss* boss) { boss->state = 9; } break; + case 9: if (((gGameFrameCount % 16) == 0)) { for (i = 0; i < 10; i++) { @@ -1985,8 +2189,10 @@ void Corneria_8018C19C(Boss* boss) { Math_SmoothStepToF(&boss->vel.x, 0.0f, 0.1f, 2.0f, 0.00001f); Math_SmoothStepToF(&boss->vel.y, 0.0f, 0.1f, 2.0f, 0.00001f); Math_SmoothStepToF(&boss->vel.z, 0.0f, 0.1f, 2.0f, 0.00001f); + boss->obj.rot.z -= 2.0f; boss->gravity = 1.0f; + if (boss->obj.pos.y < (gGroundHeight + 150.0f)) { gCameraShake = 100; func_effect_80081A8C(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 40.0f, 12); @@ -1998,6 +2204,7 @@ void Corneria_8018C19C(Boss* boss) { boss->state = 10; } break; + case 10: if (((gGameFrameCount % 8) == 0)) { for (i = 0; i < 10; i++) { @@ -2005,27 +2212,33 @@ void Corneria_8018C19C(Boss* boss) { boss->obj.pos.z, 1.0f); } } + if (boss->timer_050 == 0) { func_effect_8007A568(boss->obj.pos.x, boss->obj.pos.y + 500.0f, boss->obj.pos.z, 120.0f); Object_Kill(&boss->obj, boss->sfxSource); } break; } + temp_a0 = SEGMENTED_TO_VIRTUAL(D_CO_603E748); temp_a1 = SEGMENTED_TO_VIRTUAL(D_CO_603E7C4); temp_a0[9] = -100000.0f; temp_a0[3] = 172.0f; temp_a1[9] = -100000.0f; temp_a1[3] = -150.0f; + if (boss->fwork[0] > 60.0f) { temp_a0[3] = -100000.0f; temp_a0[9] = 543.0f; } + if (boss->fwork[1] > 60.0f) { temp_a1[3] = -100000.0f; temp_a1[9] = -557.0f; } + boss->fwork[16] = 4.0f; + if ((boss->swork[10] == 0) && (boss->state < 6)) { boss->fwork[17] = 1.8f; AUDIO_PLAY_SFX(NA_SE_EXPLOSION_DEMO6, boss->sfxSource, 4); @@ -2074,10 +2287,14 @@ void Corneria_8018DDAC(Boss* boss) { } else { Radio_PlayMessage(gMsg_ID_7085, RCID_FALCO); } + boss->info.cullDistance = 300.0f; + gBosses[0].fwork[14] = 25.0f; gBosses[0].fwork[15] = 0.0f; + AUDIO_PLAY_SFX(NA_SE_EN_PARTS_BROKEN, boss->sfxSource, 4); + if (gBosses[0].swork[10] != 0) { gBosses[0].swork[10]--; } @@ -2103,15 +2320,20 @@ void Corneria_8018DDAC(Boss* boss) { boss->obj.rot.x = gBosses[0].obj.rot.x; boss->obj.rot.y = gBosses[0].obj.rot.y; boss->obj.rot.z = gBosses[0].obj.rot.z; + Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, boss->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_MultVec3f(gCalcMatrix, &D_i1_80199A78, &sp40); + boss->obj.pos.x = gBosses[0].obj.pos.x + sp40.x; boss->obj.pos.y = gBosses[0].obj.pos.y + sp40.y; boss->obj.pos.z = gBosses[0].obj.pos.z + sp40.z; + boss->fwork[2] = gBosses[0].fwork[2]; break; + case 1: Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, MTXF_NEW); gBosses[0].fwork[15] += 0.5f; @@ -2159,29 +2381,40 @@ void Corneria_8018E290(Boss* boss) { if (boss->health != 0) { boss->timer_05C = 15; boss->health -= boss->damage; + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, boss->sfxSource, 4); + if (boss->health <= 0) { gBosses[0].swork[8]--; + if (gBosses[0].swork[8] != 0) { Radio_PlayMessage(gMsg_ID_15130, RCID_FALCO); } else { Radio_PlayMessage(gMsg_ID_7085, RCID_FALCO); } + boss->info.cullDistance = 300.0f; + gBosses[0].fwork[15] = 0.0f; gBosses[0].fwork[14] = 335.0f; boss->health = 0; + AUDIO_PLAY_SFX(NA_SE_EN_PARTS_BROKEN, boss->sfxSource, 4); + if (gBosses[0].swork[10] != 0) { gBosses[0].swork[10]--; } + gBosses[0].timer_056 = 30; boss->state = 1; + Matrix_MultVec3f(gCalcMatrix, &D_i1_80199A84, &sp4C); + for (i = 0; i < 10; i++) { func_effect_80079618(boss->obj.pos.x + sp4C.x, boss->obj.pos.y + sp4C.y, boss->obj.pos.z + sp4C.z, 1.0f); } + if (gBosses[1].state == 1) { gBosses[0].fwork[14] = 25.0f; } @@ -2195,15 +2428,20 @@ void Corneria_8018E290(Boss* boss) { boss->obj.rot.x = gBosses[0].obj.rot.x; boss->obj.rot.y = gBosses[0].obj.rot.y; boss->obj.rot.z = gBosses[0].obj.rot.z; + Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, boss->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_MultVec3f(gCalcMatrix, &D_i1_80199A90, &sp40); + boss->obj.pos.x = gBosses[0].obj.pos.x + sp40.x; boss->obj.pos.y = gBosses[0].obj.pos.y + sp40.y; boss->obj.pos.z = gBosses[0].obj.pos.z + sp40.z; + boss->fwork[0] = gBosses[0].fwork[0]; break; + case 1: Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, MTXF_NEW); gBosses[0].fwork[15] += 0.5f; @@ -2251,7 +2489,9 @@ void Corneria_8018E76C(Boss* boss) { if (boss->health != 0) { boss->timer_05C = 15; boss->health -= boss->damage; + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, boss->sfxSource, 4); + if (boss->health <= 0) { gBosses[0].swork[8]--; if (gBosses[0].swork[8] != 0) { @@ -2259,17 +2499,24 @@ void Corneria_8018E76C(Boss* boss) { } else { Radio_PlayMessage(gMsg_ID_7085, RCID_FALCO); } + boss->info.cullDistance = 300.0f; + gBosses[0].fwork[15] = 0.0f; gBosses[0].fwork[14] = 335.0f; + boss->health = 0; + AUDIO_PLAY_SFX(NA_SE_EN_PARTS_BROKEN, boss->sfxSource, 4); + if (gBosses[0].swork[10] != 0) { gBosses[0].swork[10]--; } + gBosses[0].timer_056 = 30; boss->state = 1; gBosses[0].fwork[6] = 500.0f; + Matrix_MultVec3f(gCalcMatrix, &D_i1_80199A9C, &sp4C); for (i = 0; i < 10; i++) { @@ -2290,26 +2537,35 @@ void Corneria_8018E76C(Boss* boss) { boss->obj.rot.x = gBosses[0].obj.rot.x; boss->obj.rot.y = gBosses[0].obj.rot.y; boss->obj.rot.z = gBosses[0].obj.rot.z; + Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, boss->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_MultVec3f(gCalcMatrix, &D_i1_80199AA8, &sp40); + boss->obj.pos.x = gBosses[0].obj.pos.x + sp40.x; boss->obj.pos.y = gBosses[0].obj.pos.y + sp40.y; boss->obj.pos.z = gBosses[0].obj.pos.z + sp40.z; + boss->fwork[1] = gBosses[0].fwork[1]; break; + case 1: Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, MTXF_NEW); + gBosses[0].fwork[15] += 0.5f; + if (((gGameFrameCount % 8) == 0) && (Rand_ZeroOne() < 0.5f)) { boss->timer_05C = 4; } + if (((gGameFrameCount % 2) == 0)) { Matrix_MultVec3f(gCalcMatrix, &D_i1_80199A9C, &sp4C); func_effect_8007C120(boss->obj.pos.x + sp4C.x, boss->obj.pos.y + sp4C.y, boss->obj.pos.z + sp4C.z, boss->vel.x, boss->vel.y, boss->vel.z, 0.2f, 10); } + if (boss->obj.pos.y < (gGroundHeight + 150.0f)) { if (boss->swork[0] == 0) { boss->vel.y = -5.0f; @@ -2337,7 +2593,6 @@ bool Corneria_8018EC54(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* } void Corneria_8018ECAC(Boss* boss) { - Animation_GetFrameData(&D_CO_602D400, 0, boss->vwork); Animation_DrawSkeleton(1, D_CO_602D5AC, boss->vwork, Corneria_8018EC54, NULL, &boss->index, &gIdentityMatrix); } @@ -2353,7 +2608,6 @@ bool Corneria_8018ED1C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* } void Corneria_8018ED78(Boss* boss) { - Matrix_Translate(gGfxMatrix, -D_i1_80199A78.x, -D_i1_80199A78.y, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); Animation_GetFrameData(&D_CO_602D400, 0, boss->vwork); @@ -2371,7 +2625,6 @@ bool Corneria_8018EE2C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* } void Corneria_8018EE84(Boss* boss) { - Matrix_Translate(gGfxMatrix, -D_i1_80199A90.x, -D_i1_80199A90.y, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); Animation_GetFrameData(&D_CO_602D400, 0, boss->vwork); @@ -2389,7 +2642,6 @@ bool Corneria_8018EF38(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* } void Corneria_8018EF90(Boss* boss) { - Matrix_Translate(gGfxMatrix, -D_i1_80199AA8.x, -D_i1_80199AA8.y, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); Animation_GetFrameData(&D_CO_602D400, 0, boss->vwork); @@ -2397,7 +2649,6 @@ void Corneria_8018EF90(Boss* boss) { } void Corneria_8018F044(Scenery* scenery) { - switch (scenery->state) { case 0: if (scenery->dmgType != DMG_NONE) { @@ -2417,6 +2668,7 @@ void Corneria_8018F044(Scenery* scenery) { } } break; + case 1: Math_SmoothStepToF(&scenery->vel.x, 80.0f, 0.2f, 10.0f, 0.0f); Math_SmoothStepToF(&scenery->vel.y, 80.0f, 0.2f, 10.0f, 0.0f); @@ -2428,6 +2680,7 @@ bool Corneria_8018F1C8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* Scenery* scenery = (Scenery*) data; RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); + switch (limbIndex) { case 1: rot->y -= scenery->vel.x; @@ -2435,6 +2688,7 @@ bool Corneria_8018F1C8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } break; + case 2: rot->y += scenery->vel.y; if ((scenery->timer_4C % 2) != 0) { @@ -2455,12 +2709,15 @@ void Corneria_8018F31C(Scenery* scenery) { void Corneria_8018F3BC(Scenery* scenery, f32 arg1) { Scenery_Initialize(scenery); + scenery->obj.status = OBJ_INIT; scenery->obj.pos.x = RAND_FLOAT_CENTERED(1000.0f) + arg1; scenery->obj.rot.y = RAND_FLOAT(90.0f) + 45.0f; + if (arg1 > 0.0f) { scenery->obj.rot.y *= -1.0f; } + scenery->obj.pos.y = 0.0f; scenery->obj.id = OBJ_SCENERY_1; scenery->effectVel.z = 60.0f; @@ -2501,9 +2758,11 @@ void Corneria_8018F55C(Effect* effect) { effect->obj.pos.z = -4000.0f; effect->vel.z = 60.0f; effect->scale2 = 10.0f + RAND_FLOAT(15.0f); + if (Rand_ZeroOne() < 0.5f) { effect->obj.rot.z = 180.0f; } + Object_SetInfo(&effect->info, effect->obj.id); } @@ -2511,7 +2770,6 @@ void Corneria_8018F678(void) { s32 i; if (((gGameFrameCount % 32) == 0) && gPlayer[0].pos.x == 0.0f) { - for (i = 0; i < ARRAY_COUNT(gEffects); i++) { if (gEffects[i].obj.status == OBJ_FREE) { Corneria_8018F55C(&gEffects[i]); @@ -2533,17 +2791,23 @@ void Corneria_8018F6F8(Actor* actor, s32 arg1) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; actor->obj.id = OBJ_ACTOR_CUTSCENE; + actor->obj.pos.x = (D_i1_80199AB4[arg1] * 4.0f) + gPlayer[0].pos.x; actor->obj.pos.y = (D_i1_80199AC0[arg1] * 2.0f) + gPlayer[0].pos.y; actor->obj.pos.z = (D_i1_80199ACC[arg1] * 3.0f) + gPlayer[0].trueZpos; + actor->vwork[20].x = D_i1_80199AB4[arg1] + gPlayer[0].pos.x; actor->vwork[20].y = gPlayer[0].pos.y; actor->vwork[20].z = D_i1_80199ACC[arg1] + gPlayer[0].trueZpos; + actor->obj.rot.z = D_i1_80199AD8[arg1]; - actor->state = 100; actor->obj.rot.y = 180.0f; + + actor->state = 100; actor->fwork[0] = RAND_FLOAT(360.0f); + Object_SetInfo(&actor->info, actor->obj.id); + actor->drawShadow = true; actor->iwork[11] = 1; actor->info.cullDistance = 200.0f; @@ -2587,6 +2851,7 @@ void Corneria_LevelStart(Player* player) { sp30 = -Math_Atan2F(player->cam.eye.y - sp38, sqrtf(SQ(player->cam.eye.z - sp34) + SQ(player->cam.eye.x - sp3C))); sp44 = Math_RadToDeg(sp2C) - D_ctx_80177A48[4]; sp40 = Math_RadToDeg(sp30) - D_ctx_80177A48[5]; + if (sp44 > 180.0f) { sp44 -= 360.0f; } @@ -2629,11 +2894,14 @@ void Corneria_LevelStart(Player* player) { D_ctx_80177A48[4] = Math_RadToDeg(sp2C); D_ctx_80177A48[5] = Math_RadToDeg(sp30); + player->flags_228 = 0; + D_ctx_80177950 = -1.0f; if ((Math_RadToDeg(gPlayer[0].camYaw) < 90.0f) || (Math_RadToDeg(gPlayer[0].camYaw) > 270.0f)) { D_ctx_80177950 = 1.0f; } + player->vel.z = 0.0f; player->pos.z = player->pos.z; player->trueZpos = player->pos.z + player->camDist; @@ -2641,7 +2909,9 @@ void Corneria_LevelStart(Player* player) { player->yBob = -SIN_DEG(player->bobPhase) * 0.5f; player->rockPhase += 3.0f; player->rockAngle = SIN_DEG(player->rockPhase) * 1.5f; + Corneria_8018F678(); + player->wings.unk_30 = 0; switch (player->csState) { @@ -2651,80 +2921,103 @@ void Corneria_LevelStart(Player* player) { player->csTimer = 600; player->pos.y = 6000.0f; player->pos.x = 0.1f; + Corneria_8018F6F8(&gActors[0], 0); Corneria_8018F6F8(&gActors[1], 1); Corneria_8018F6F8(&gActors[2], 2); + actor0->iwork[14] = 2; actor1->iwork[14] = 3; actor2->iwork[14] = 4; + player->cam.eye.x = gCsCamEyeX = player->pos.x - 400.0f; gPlayer[0].cam.eye.y = gCsCamEyeY = player->pos.y + 600.0f; player->cam.eye.z = gCsCamEyeZ = player->trueZpos + 2000.0f; + player->cam.at.x = gCsCamAtX = player->pos.x; player->cam.at.y = gCsCamAtY = player->pos.y; player->cam.at.z = gCsCamAtZ = player->trueZpos + 300.0f; + D_ctx_80177A48[0] = 0; D_ctx_80177A48[1] = D_ctx_80177A48[2] = 0; + gFillScreenAlphaTarget = 255; gFillScreenAlpha = 255; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; break; + case 1: if (player->csTimer < 550) { gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 3; Math_SmoothStepToF(&D_ctx_80177A48[0], 0.01f, 1.0f, 0.0005f, 0.0f); } + gCsCamEyeX = player->pos.x - 150.0f; gCsCamEyeY = player->pos.y - 70.0f; gCsCamEyeZ = player->trueZpos + 150.0f; + gCsCamAtX = player->pos.x; gCsCamAtY = player->pos.y; gCsCamAtZ = player->trueZpos; + if (player->csTimer == 0) { player->csState = 2; player->csTimer = 130; D_ctx_80177A48[0] = 0.0f; } + if (player->csTimer == 315) { player->pos.x = 0.0f; } + if (player->csTimer == 270) { gHideRadio = false; Radio_PlayMessage(gMsg_ID_2005, RCID_FOX); } + if (player->csTimer == 180) { AUDIO_PLAY_SFX(NA_SE_WING_OPEN, player->sfxSource, 0); } + if (player->csTimer == 120) { AUDIO_PLAY_SFX(NA_SE_WING_OPEN_END, player->sfxSource, 0); } + if ((player->csTimer < 190) && (player->csTimer > 150)) { Math_SmoothStepToF(&player->wings.unk_24, 2.0f, 0.2f, 0.5f, 0.0f); } + if (player->csTimer < 150) { player->unk_204 = 0; } + if ((player->csTimer < 120) && ((player->csTimer % 16) == 0)) { D_ctx_80177A48[1] = RAND_FLOAT_CENTERED(60.0f); D_ctx_80177A48[2] = RAND_FLOAT_CENTERED(60.0f); } + if (player->csTimer == 0) { D_ctx_80177A48[1] = 0.0f; D_ctx_80177A48[2] = D_ctx_80177A48[1]; } break; + case 2: Math_SmoothStepToF(&D_ctx_80177A48[0], 0.1f, 1.0f, 0.001f, 0.0f); + gCsCamEyeX = player->pos.x - 50.0f; gCsCamEyeY = player->pos.y + 10.0f; gCsCamEyeZ = player->trueZpos - 10.0f; + gCsCamAtX = player->pos.x; gCsCamAtY = player->pos.y + 10.0f; gCsCamAtZ = player->trueZpos + 10.0f; + if (player->csTimer == 20) { Radio_PlayMessage(gMsg_ID_2010, RCID_FOX); } + if (player->csTimer == 0) { player->csState = 3; player->csTimer = 180; @@ -2735,50 +3028,65 @@ void Corneria_LevelStart(Player* player) { actor0->obj.pos.y = player->pos.y + 80.0f; actor0->obj.pos.z += 100.0f; } - if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) { + + if (gMsgCharIsPrinting && (gGameFrameCount & 2)) { player->wings.unk_30 = 5.0f; } break; + case 3: if (fabsf(Math_SmoothStepToF(&actor0->obj.pos.z, player->pos.z + 100.0f, 0.05f, 5.0f, 0.0f)) < 1.0f) { player->csState = 4; D_ctx_80177A48[0] = 0.0f; player->csTimer = 190; } + if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) { player->wings.unk_30 = 5.0f; } + gCsCamEyeY = player->pos.y + 10.0f; gCsCamAtY = player->pos.y + 10.0f; break; + case 4: if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) { player->wings.unk_30 = 5.0f; } + Math_SmoothStepToF(&D_ctx_80177A48[0], 0.1f, 1.0f, 0.001f, 0.0f); + gCsCamEyeX = actor0->obj.pos.x - 50.0f; gCsCamEyeY = actor0->obj.pos.y + 10.0f; gCsCamEyeZ = actor0->obj.pos.z - 10.0f; + gCsCamAtX = actor0->obj.pos.x; gCsCamAtY = actor0->obj.pos.y + 10.0f; gCsCamAtZ = actor0->obj.pos.z + 10.0f; + if (player->csTimer == 0) { player->csState = 5; player->csTimer = 5; } + if (player->csTimer == 80) { Radio_PlayMessage(gMsg_ID_2020, RCID_FALCO); } + if (player->csTimer < 100) { Math_SmoothStepToF(&actor0->fwork[19], 50.0f, 0.1f, 3.0f, 0.01f); } + actor0->fwork[20] = 0.0f; + if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) { actor0->fwork[20] = 5.0f; } break; + case 5: Math_SmoothStepToF(&actor0->fwork[19], 0, 0.1f, 3.0f, 0.01f); + if (player->csTimer == 0) { player->csState = 6; D_ctx_80177A48[0] = 0.0f; @@ -2788,6 +3096,7 @@ void Corneria_LevelStart(Player* player) { gCsCamEyeY = actor0->obj.pos.y + 10.0f; gCsCamAtY = actor0->obj.pos.y + 10.0f; break; + case 6: Math_SmoothStepToF(&actor0->fwork[19], 0.0f, 0.1f, 3.0f, 0.01f); Math_SmoothStepToF(&D_ctx_80177A48[0], 0.1f, 1.0f, 0.001f, 0.0f); @@ -2809,22 +3118,29 @@ void Corneria_LevelStart(Player* player) { actor0->obj.pos.y = player->pos.y; actor0->obj.pos.z = player->trueZpos + 240.0f; } + if (player->csTimer == 80) { Radio_PlayMessage(gMsg_ID_2030, RCID_PEPPY); } + actor2->fwork[20] = 0.0f; + if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) { actor2->fwork[20] = 5.0f; } break; + case 7: Math_SmoothStepToF(&D_ctx_80177A48[0], 0.1f, 1.0f, 0.001f, 0.0f); + gCsCamEyeX = actor1->obj.pos.x + 20.0f; gCsCamEyeY = actor1->obj.pos.y + 10.0f; gCsCamEyeZ = actor1->obj.pos.z - 50.0f; + gCsCamAtX = actor1->obj.pos.x + 10.0f; gCsCamAtY = actor1->obj.pos.y + 10.0f; gCsCamAtZ = actor1->obj.pos.z + 10.0f; + if (player->csTimer == 0) { player->csState = 8; D_ctx_80177A48[0] = 0.0f; @@ -2832,20 +3148,26 @@ void Corneria_LevelStart(Player* player) { D_ctx_80177A48[8] = 50.0f; D_ctx_80177A48[3] = 0.0f; } + if (player->csTimer == 80) { Radio_PlayMessage(gMsg_ID_2040, RCID_SLIPPY); player->pos.x = 0.1f; } + if (player->csTimer < 100) { Math_SmoothStepToF(&actor1->fwork[19], -20.0f, 0.1f, 3.0f, 0.01f); } + actor1->fwork[20] = 0.0f; + if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) { actor1->fwork[20] = 5.0f; } break; + case 8: Math_SmoothStepToF(&D_ctx_80177A48[0], 0.1f, 1.0f, 0.001f, 0.0f); + if (player->csTimer < 150) { D_ctx_80177A48[3] += player->unk_004; Math_SmoothStepToF(&player->unk_004, 2.0f, 1.0f, 0.2f, 0.0f); @@ -2853,49 +3175,64 @@ void Corneria_LevelStart(Player* player) { gCsCamEyeX = player->pos.x; gCsCamEyeZ = (player->trueZpos - 600.0f) + D_ctx_80177A48[3]; gCsCamEyeY = player->pos.y + D_ctx_80177A48[8]; + gCsCamAtX = player->pos.x; gCsCamAtY = player->pos.y + 20.0f; gCsCamAtZ = player->trueZpos + 100.0f; + if (player->csTimer < 100) { Math_SmoothStepToF(&D_ctx_80177A48[8], 10.0f, 0.1f, 0.7f, 0.0f); } + if (player->csTimer == 200) { Radio_PlayMessage(gMsg_ID_2050, RCID_FOX); } + player->wings.unk_30 = 0.0f; + if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) { player->wings.unk_30 = 5.0f; } + if (player->csTimer == 80) { actor0->fwork[29] = 5.0f; } + if (player->csTimer == 60) { actor1->fwork[29] = 5.0f; } + if (player->csTimer == 40) { actor2->fwork[29] = 5.0f; } + if ((player->csTimer > 70) && (player->csTimer < 80)) { actor0->iwork[11] = 2; } + if ((player->csTimer > 50) && (player->csTimer < 60)) { actor1->iwork[11] = 2; } + if ((player->csTimer > 30) && (player->csTimer < 40)) { actor2->iwork[11] = 2; } + if (player->csTimer == 70) { actor0->state = 1; Play_PlaySfxFirstPlayer(player->sfxSource, NA_SE_ARWING_BOOST); } + if (player->csTimer == 50) { actor1->state = 2; Play_PlaySfxFirstPlayer(player->sfxSource, NA_SE_ARWING_BOOST); } + if (player->csTimer == 30) { actor2->state = 3; Play_PlaySfxFirstPlayer(player->sfxSource, NA_SE_ARWING_BOOST); } + if (player->csTimer == 0) { player->csState = 9; Play_PlaySfxFirstPlayer(player->sfxSource, NA_SE_ARWING_BOOST); @@ -2904,27 +3241,35 @@ void Corneria_LevelStart(Player* player) { player->unk_190 = 5.0f; } break; + case 9: gCsCamEyeX = player->pos.x; gCsCamEyeY = player->pos.y; gCsCamEyeZ = player->trueZpos + 1000.0f; + gCsCamAtX = player->pos.x; gCsCamAtY = player->pos.y; gCsCamAtZ = player->trueZpos + 1100.0f; + D_ctx_80177A48[0] = 0.03f; + player->unk_190 = 2.0f; + if (player->csTimer == 0) { gFillScreenAlphaTarget = 255; gFillScreenAlphaStep = 48; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; } + if (gFillScreenAlpha == 255) { AUDIO_PLAY_BGM(gBgmSeqId); + Object_Kill(&actor0->obj, actor0->sfxSource); Object_Kill(&actor1->obj, actor1->sfxSource); Object_Kill(&actor2->obj, actor2->sfxSource); gLevelStartStatusScreenTimer = 80; + player->pos.y = 350.0f; player->cam.eye.x = player->pos.x; player->cam.eye.y = (player->pos.y * player->unk_148) + 50.0f; @@ -2934,29 +3279,38 @@ void Corneria_LevelStart(Player* player) { player->cam.at.x = player->pos.x; player->cam.at.y = (player->pos.y * player->unk_148) + 20.0f; player->cam.at.z = player->trueZpos; + D_ctx_80177950 = 1.0f; + gPlayerGlareAlphas[0] = gPlayerGlareAlphas[1] = gPlayerGlareAlphas[2] = gPlayerGlareAlphas[3] = 0; gLoadLevelObjects = 1; gFillScreenAlphaTarget = 0; player->csTimer = 15; } break; + case 10: break; } + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 20000.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.y, player->yBob + gCsCamEyeY, D_ctx_80177A48[0], 20000.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 20000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 20000.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY - player->yBob, D_ctx_80177A48[0], 20000.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 20000.0f, 0.0f); + Math_SmoothStepToF(&player->wings.unk_04, D_ctx_80177A48[1], 0.2f, 1.0f, 0.0f); Math_SmoothStepToF(&player->wings.unk_0C, D_ctx_80177A48[2], 0.2f, 1.0f, 0.0f); + player->wings.unk_08 = player->wings.unk_04; player->wings.unk_10 = player->wings.unk_0C; + player->cam.eye.y -= 3.0f; player->cam.at.y -= 3.0f; player->pos.y -= 3.0f; + actor0->vwork[20].y -= 3.0f; actor0->obj.pos.y -= 3.0f; actor2->vwork[20].y -= 3.0f; @@ -2990,27 +3344,37 @@ void Corneria_80190F74(Actor* actor, s32 arg1) { sp5C.x = D_i1_80199AE4[arg1]; sp5C.y = D_i1_80199AF0[arg1]; sp5C.z = D_i1_80199AFC[arg1]; + sp44.x = D_i1_80199B08[arg1]; sp44.y = D_i1_80199B14[arg1]; sp44.z = D_i1_80199B20[arg1]; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp5C, &sp50); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); + Actor_Initialize(actor); + actor->obj.pos.x = player->pos.x + sp50.x; actor->obj.pos.y = player->pos.y + sp50.y; actor->obj.pos.z = player->pos.z + sp50.z; + actor->fwork[0] = sp38.x; actor->fwork[1] = sp38.y; actor->fwork[2] = sp38.z; + actor->fwork[7] = RAND_FLOAT(360.0f); actor->fwork[8] = RAND_FLOAT(360.0f); + actor->vel.x = player->vel.x; actor->vel.y = player->vel.y; actor->vel.z = player->vel.z; + actor->obj.status = OBJ_INIT; actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->obj.rot.z = D_i1_80199B2C[arg1]; + Object_SetInfo(&actor->info, actor->obj.id); + actor->iwork[11] = 1; AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } @@ -3026,11 +3390,13 @@ void Corneria_LevelComplete1(Player* player) { f32 temp_deg; player->wings.unk_04 = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = 0.0f; + Math_SmoothStepToF(&player->zRotBarrelRoll, 0.0f, 0.1f, 15.0f, 0.0f); Math_SmoothStepToF(&player->zRotBank, 0.0f, 0.1f, 15.0f, 0.0f); Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f); Math_SmoothStepToAngle(&player->aerobaticPitch, 0.0f, 0.1f, 20.0f, 0.0f); Math_SmoothStepToF(&player->boostSpeed, 0.0f, 0.1f, 3.0f, 0.0f); + if (player->csState >= 3) { player->cam.eye.y += 3.0f; player->cam.at.y += 3.0f; @@ -3045,12 +3411,15 @@ void Corneria_LevelComplete1(Player* player) { switch (player->csState) { case 0: Audio_StopSfxByBankAndSource(1, player->sfxSource); + sp54 = player->cam.eye.x - D_i1_8019B6D8[62]; sp4C = player->cam.eye.z - D_i1_8019B6D8[64]; D_ctx_80177A48[0] = Math_RadToDeg(Math_Atan2F(sp54, sp4C)); D_ctx_80177A48[1] = sqrtf(SQ(sp54) + SQ(sp4C)); + player->csState++; + D_ctx_80177A48[5] = 0.0f; D_ctx_80177A48[4] = D_ctx_80177A48[5]; D_ctx_80177A48[2] = D_ctx_80177A48[5]; @@ -3059,24 +3428,31 @@ void Corneria_LevelComplete1(Player* player) { Math_SmoothStepToF(&player->rot.x, 0.0f, 0.1f, 5.0f, 0.0f); Math_SmoothStepToF(&player->pos.y, 400.0f, 0.05f, 3.0f, 0.0f); Math_SmoothStepToF(&D_ctx_80177A48[1], 1300.0f, 0.05f, 1000.0f, 0.0f); + if (player->rot.y > 180.0f) { D_ctx_80177A48[0] += 0.5f; } else { D_ctx_80177A48[0] -= 0.5f; } + Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[0] * M_DTOR, MTXF_NEW); + sp64.x = 0.0f; sp64.y = 0.0f; sp64.z = D_ctx_80177A48[1]; + Matrix_MultVec3f(gCalcMatrix, &sp64, &sp58); + Math_SmoothStepToF(&player->cam.eye.x, D_i1_8019B6D8[62] + sp58.x, 0.05f, 500.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.y, D_i1_8019B6D8[63] + 100.0f, 0.05f, 500.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.z, D_i1_8019B6D8[64] + sp58.z, 0.05f, 500.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.x, D_i1_8019B6D8[62], 0.05f, 500.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.y, D_i1_8019B6D8[63], 0.05f, 500.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.z, D_i1_8019B6D8[64], 0.05f, 500.0f, 0.0f); + temp_fa0 = player->pos.x - D_i1_8019B6D8[62]; temp_fa1 = player->pos.z - D_i1_8019B6D8[64]; + if (gCsFrameCount < 30) { temp_deg = Math_RadToDeg(-Math_Atan2F(temp_fa0, temp_fa1)); var_fv1 = Math_SmoothStepToAngle(&player->rot.y, temp_deg, 0.5f, 4.0f, 0.0001f) * 20.0f; @@ -3084,51 +3460,69 @@ void Corneria_LevelComplete1(Player* player) { temp_deg = Math_RadToDeg(Math_Atan2F(temp_fa0, temp_fa1)); var_fv1 = Math_SmoothStepToAngle(&player->rot.y, temp_deg, 0.5f, 2.0f, 0.0001f) * 30.0f; } + Math_SmoothStepToAngle(&player->rot.z, var_fv1, 0.1f, 5.0f, 0.0001f); + if (gCsFrameCount == 220) { player->csState++; } break; + case 2: Math_SmoothStepToAngle(&player->rot.x, 20.0f, 0.1f, 0.5f, 0.0001f); Math_SmoothStepToAngle(&player->rot.z, 0.0f, 0.1f, 1.0f, 0.0001f); + Math_SmoothStepToF(&D_ctx_80177A48[2], 0.05f, 1.0f, 0.005f, 0.0001f); + Math_SmoothStepToF(&player->cam.at.x, player->pos.x, D_ctx_80177A48[2], 500.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.y, player->pos.y, D_ctx_80177A48[2], 500.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.z, player->pos.z, D_ctx_80177A48[2], 500.0f, 0.0f); + if (gCsFrameCount == 350) { player->csState++; D_ctx_80177A48[2] = 0.0f; D_ctx_80177A48[3] = 0.05f; } break; + case 3: if ((gCsFrameCount > 700) && (gCsFrameCount < 1000)) { func_demo_8004AA84(); } Math_SmoothStepToAngle(&player->rot.x, 20.0f, 0.1f, 0.5f, 0); Math_SmoothStepToAngle(&player->rot.z, 0.0f, 0.1f, 1.0f, 0); + Math_SmoothStepToF(&player->baseSpeed, 0.0f, 0.1f, 2.0f, 0.0f); + Math_SmoothStepToF(&D_ctx_80177A48[2], 0.1f, 1.0f, 0.002f, 0); Math_SmoothStepToF(&D_ctx_80177A48[3], 0.1f, 1.0f, 0.002f, 0); + Matrix_RotateY(gCalcMatrix, player->rot.y * M_DTOR, MTXF_NEW); Matrix_Push(&gCalcMatrix); Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[5] * M_DTOR, MTXF_APPLY); + sp64.x = 0.0f; sp64.y = -200.0f; sp64.z = 800.0f; + Matrix_MultVec3f(gCalcMatrix, &sp64, &sp58); + Math_SmoothStepToF(&player->cam.eye.x, player->pos.x + sp58.x, D_ctx_80177A48[2], 500.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.y, player->pos.y + sp58.y, D_ctx_80177A48[2], 500.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.z, player->pos.z + sp58.z, D_ctx_80177A48[2], 500.0f, 0.0f); + Matrix_Pop(&gCalcMatrix); + sp64.x = 0.0f; sp64.y = 0; sp64.z = 150.0f; + Matrix_MultVec3f(gCalcMatrix, &sp64, &sp58); + Math_SmoothStepToF(&player->cam.at.x, player->pos.x + sp58.x, D_ctx_80177A48[3], 500.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.y, player->pos.y + sp58.y, D_ctx_80177A48[3], 500.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.z, player->pos.z + sp58.z, D_ctx_80177A48[3], 500.0f, 0.0f); + D_ctx_80177A48[5] += D_ctx_80177A48[4]; if ((gCsFrameCount > 400) && (gCsFrameCount < 1000)) { @@ -3147,6 +3541,7 @@ void Corneria_LevelComplete1(Player* player) { player->unk_190 = 5.0f; } break; + case 4: if (gCsFrameCount >= 1270) { player->baseSpeed *= 1.2f; @@ -3156,13 +3551,16 @@ void Corneria_LevelComplete1(Player* player) { } player->unk_190 = 2.0f; } + if (gCsFrameCount == 1290) { Audio_FadeOutAll(50); } + if (gCsFrameCount > 1300) { gFillScreenAlphaTarget = 255; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; gFillScreenAlphaStep = 8; + if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->csTimer = 0; @@ -3177,15 +3575,19 @@ void Corneria_LevelComplete1(Player* player) { case 981: gShowLevelClearStatusScreen = 1; break; + case 1181: gShowLevelClearStatusScreen = 0; break; + case 240: AUDIO_PLAY_BGM(NA_BGM_COURSE_CLEAR); break; + case 330: gLevelClearScreenTimer = 100; break; + case 470: Play_ClearObjectData(); if (gTeamShields[TEAM_ID_FALCO] > 0) { @@ -3198,9 +3600,11 @@ void Corneria_LevelComplete1(Player* player) { Corneria_80190F74(&gActors[2], 2); } break; + case 410: Radio_PlayMessage(gMsg_ID_2335, RCID_FOX); break; + case 550: if ((gTeamShields[TEAM_ID_SLIPPY] == -1) || (gTeamShields[TEAM_ID_SLIPPY] == 0)) { Radio_PlayMessage(gMsg_ID_20333, RCID_ROB64); @@ -3208,6 +3612,7 @@ void Corneria_LevelComplete1(Player* player) { Radio_PlayMessage(gMsg_ID_2300, RCID_SLIPPY); } break; + case 682: if ((gTeamShields[TEAM_ID_PEPPY] == -1) || (gTeamShields[TEAM_ID_PEPPY] == 0)) { Radio_PlayMessage(gMsg_ID_20332, RCID_ROB64); @@ -3215,6 +3620,7 @@ void Corneria_LevelComplete1(Player* player) { Radio_PlayMessage(gMsg_ID_2310, RCID_PEPPY); } break; + case 816: if ((gTeamShields[TEAM_ID_FALCO] == -1) || (gTeamShields[TEAM_ID_FALCO] == 0)) { Radio_PlayMessage(gMsg_ID_20331, RCID_ROB64); @@ -3222,6 +3628,7 @@ void Corneria_LevelComplete1(Player* player) { Radio_PlayMessage(gMsg_ID_2320, RCID_FALCO); } break; + case 1150: if (gTeamShields[TEAM_ID_FALCO] > 0) { gActors[0].state = 1; @@ -3231,6 +3638,7 @@ void Corneria_LevelComplete1(Player* player) { gActors[0].fwork[29] = 5.0f; } break; + case 1190: if (gTeamShields[TEAM_ID_SLIPPY] > 0) { gActors[1].state = 1; @@ -3240,6 +3648,7 @@ void Corneria_LevelComplete1(Player* player) { gActors[1].fwork[29] = 5.0f; } break; + case 1230: if (gTeamShields[TEAM_ID_PEPPY] > 0) { gActors[2].state = 1; @@ -3250,18 +3659,24 @@ void Corneria_LevelComplete1(Player* player) { } break; } + Matrix_RotateY(gCalcMatrix, (player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -((player->rot.x + player->aerobaticPitch) * M_DTOR), MTXF_APPLY); + sp64.x = 0.0f; sp64.y = 0.0f; sp64.z = player->baseSpeed + player->boostSpeed; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp64, &sp58); + player->vel.x = sp58.x; player->vel.z = sp58.z; player->vel.y = sp58.y; + player->pos.x += player->vel.x; player->pos.y += player->vel.y; player->pos.z += player->vel.z; + player->trueZpos = player->pos.z; player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; player->bobPhase += 10.0f; From 27c77ddeba131274c9f0babf7d6130c67f6343d2 Mon Sep 17 00:00:00 2001 From: Lywx Date: Thu, 16 May 2024 08:08:02 -0600 Subject: [PATCH 098/151] Bump torch and added mod step (#251) * Bump torch and added mod step * Bump torch * Fixed torch crash --- Makefile | 5 ++++- tools/Torch | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e1e65dfa..e0d95896 100644 --- a/Makefile +++ b/Makefile @@ -295,7 +295,7 @@ $(shell mkdir -p asm bin linker_scripts/$(VERSION)/$(REV)/auto) SRC_DIRS := $(shell find src -type d) # Temporary, until we decide how we're gonna handle other versions -ifeq ($(VERSION), jp) +ifeq ($(VERSION), jp) SRC_DIRS := $(shell find srcjp -type d) endif ASM_DIRS := $(shell find asm/$(VERSION)/$(REV) -type d -not -path "asm/$(VERSION)/$(REV)/nonmatchings/*") @@ -463,6 +463,9 @@ assets: @$(TORCH) header $(BASEROM_UNCOMPRESSED) @$(TORCH) modding export $(BASEROM_UNCOMPRESSED) +mod: + @$(TORCH) modding import code $(BASEROM_UNCOMPRESSED) + clean: rm -f torch.hash.yml @git clean -fdx asm/$(VERSION)/$(REV) diff --git a/tools/Torch b/tools/Torch index 311638a3..572ea9d0 160000 --- a/tools/Torch +++ b/tools/Torch @@ -1 +1 @@ -Subproject commit 311638a3bff9ea8af6799dc20ae4abf8c8a52ad1 +Subproject commit 572ea9d09643c7584e40a5b952e7fad8590661f3 From 9ac44723887fcdd11a9884487f312d9539d4aec8 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Thu, 16 May 2024 11:13:04 -0300 Subject: [PATCH 099/151] fox_tr spacing --- src/overlays/ovl_i1/fox_tr.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/overlays/ovl_i1/fox_tr.c b/src/overlays/ovl_i1/fox_tr.c index bed35c4e..2dd64071 100644 --- a/src/overlays/ovl_i1/fox_tr.c +++ b/src/overlays/ovl_i1/fox_tr.c @@ -22,12 +22,14 @@ void Training_ItemRing_Update(ItemTrainingRing* this) { case 0: this->obj.rot.z += 1.0f; Math_SmoothStepToF(&this->width, 1.0f, 1.0f, 0.05f, 0.0f); + if ((this->unk_44 == 0) && !gPlayer[0].somersault) { if (this->obj.rot.y == 0.0f) { var_fv0 = 550.0f; } else { var_fv0 = 1000.0f; } + if (this->obj.pos.z > (gPlayer[0].trueZpos + var_fv0)) { this->unk_44 = 1; PRINTF("♪:リング未通過音\n"); // Ring not passed sound @@ -35,29 +37,38 @@ void Training_ItemRing_Update(ItemTrainingRing* this) { gRingPassCount = 0; } } + if (this->collected) { this->state = 1; this->timer_48 = 50; this->info.cullDistance = 10000.0f; + PRINTF("♪:リング通過音\n"); // Ring passing sound AUDIO_PLAY_SFX(NA_SE_RING_PASS, gDefaultSfxSource, 4); + gRingPassCount++; + if ((this->obj.rot.x != 0.0f) && (gRingPassCount >= 100)) { Radio_PlayMessage(gMsg_ID_20330, RCID_ROB64); } } break; + case 1: this->obj.pos.x += ((gPlayer[this->playerNum].pos.x - this->obj.pos.x) * 0.05f); this->obj.pos.y += ((gPlayer[this->playerNum].pos.y - this->obj.pos.y) * 0.05f); + if (gPlayer[0].alternateView) { this->obj.pos.z += (gPlayer[this->playerNum].trueZpos - 300.0f - this->obj.pos.z) * 0.05f; } else { this->obj.pos.z += ((gPlayer[this->playerNum].trueZpos - this->obj.pos.z) * 0.05f); } + this->obj.rot.z += 22.0f; + Math_SmoothStepToAngle(&this->obj.rot.y, Math_RadToDeg(-gPlayer[this->playerNum].camYaw), 0.2f, 10.0f, 0.0f); + if (this->timer_48 == 0) { Object_Kill(&this->obj, this->sfxSource); } From ae294ef6897dded244ef4d2eb411d8f28402947c Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Thu, 16 May 2024 11:29:16 -0300 Subject: [PATCH 100/151] fox_tr360 & fox_ve1 spacing --- src/overlays/ovl_i1/fox_tr360.c | 21 ++++++++++++++++++++- src/overlays/ovl_i1/fox_ve1.c | 11 +++++------ 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/src/overlays/ovl_i1/fox_tr360.c b/src/overlays/ovl_i1/fox_tr360.c index da0500e6..c2527c7d 100644 --- a/src/overlays/ovl_i1/fox_tr360.c +++ b/src/overlays/ovl_i1/fox_tr360.c @@ -12,9 +12,11 @@ void Training_Setup360(void) { s32 i; gLevelObjects = SEGMENTED_TO_VIRTUAL(D_TR_6008EF8); + Rand_SetSeed(1, 29000, 9876); scenery360 = gScenery360; + for (i = 0; i < 1000; i++) { if (gLevelObjects[i].id <= OBJ_INVALID) { break; @@ -100,6 +102,7 @@ void Training_80199024(Actor* actor) { cosRotX = COS_DEG(actor->obj.rot.x); sinRotY = SIN_DEG(actor->obj.rot.y); cosRotY = COS_DEG(actor->obj.rot.y); + sp54.z = actor->fwork[4] - actor->obj.pos.x; sp54.y = actor->fwork[5] - actor->obj.pos.y; sp54.x = actor->fwork[6] - actor->obj.pos.z; @@ -110,6 +113,7 @@ void Training_80199024(Actor* actor) { } var_fv0 = actor->fwork[20]; + temp_v0 = Training_80198DCC(actor, sinRotY, cosRotY); if (temp_v0 != 0) { var_fv0 += 40.0f * (f32) temp_v0; @@ -134,19 +138,25 @@ void Training_80199024(Actor* actor) { } Math_SmoothStepToAngle(&actor->obj.rot.z, var_fv0_2, 0.1f, 3.0f, 0.01f); + actor->obj.rot.x = -actor->rot_0F4.x; actor->obj.rot.y = actor->rot_0F4.y; + actor->vel.x = actor->fwork[13] + (sinRotY * (cosRotX * 35.0f)); actor->vel.y = actor->fwork[14] + (-sinRotX * 35.0f); actor->vel.z = actor->fwork[12] + (cosRotY * (cosRotX * 35.0f)); + actor->fwork[13] -= (actor->fwork[13] * 0.1f); actor->fwork[14] -= (actor->fwork[14] * 0.1f); actor->fwork[12] -= (actor->fwork[12] * 0.1f); + if ((actor->obj.pos.y < gGroundHeight + 40.0f) && (actor->vel.y < 0.0f)) { actor->obj.pos.y = gGroundHeight + 40.0f; actor->vel.y = 0.0f; } + ActorAllRange_ApplyDamage(actor); + radarMark = &gRadarMarks[actor->index]; radarMark->status = 1; radarMark->type = actor->aiType; @@ -154,6 +164,7 @@ void Training_80199024(Actor* actor) { radarMark->pos.y = actor->obj.pos.y; radarMark->pos.z = actor->obj.pos.z; radarMark->yRot = actor->rot_0F4.y + 180.0f; + if (actor->iwork[8] != 0) { actor->iwork[8]--; } @@ -187,23 +198,32 @@ void Training_8019949C(void) { sp44.x = 0.0f; sp44.y = 0.0f; sp44.z = -15000.0f; + for (i = var_v1, actor = &gActors[i + 10]; i < 16; i++, actor++) { if (actor->obj.status == OBJ_FREE) { Actor_Initialize(actor); + actor->obj.status = OBJ_ACTIVE; actor->obj.id = OBJ_ACTOR_ALLRANGE; + Matrix_RotateY(gCalcMatrix, gGameFrameCount * 6.0f * M_DTOR, MTXF_NEW); + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); + actor->obj.pos.x = sp38.x; actor->obj.pos.y = 2000.0f; actor->obj.pos.z = sp38.z; + actor->rot_0F4.y = gGameFrameCount * 6.0f; actor->aiType = i + AI360_10; actor->health = 24; actor->drawShadow = actor->iwork[11] = 1; actor->timer_0C2 = 30; + Object_SetInfo(&actor->info, actor->obj.id); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); + if ((i + 10) == 10) { actor->aiIndex = AI360_FOX; actor->health = 50; @@ -238,7 +258,6 @@ void Training_8019949C(void) { Audio_SetUnkVoiceParam(0); gCallVoiceParam = 0; gCallTimer = 0; - // This is ROB 64. Keep up the good work. Radio_PlayMessage(gMsg_ID_20329, RCID_ROB64); } } diff --git a/src/overlays/ovl_i1/fox_ve1.c b/src/overlays/ovl_i1/fox_ve1.c index 9837c871..188738c2 100644 --- a/src/overlays/ovl_i1/fox_ve1.c +++ b/src/overlays/ovl_i1/fox_ve1.c @@ -216,11 +216,8 @@ f32 Venom1_801920F0(f32* arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32* arg5 if ((arg4 <= temp) || ((temp <= -arg4))) { if (arg3 < temp) { temp = arg3; - } else { - - if (-arg3 > temp) { - temp = -arg3; - } + } else if (-arg3 > temp) { + temp = -arg3; } *arg0 += temp; } else { @@ -640,8 +637,10 @@ void Venom1_80192CD4(Actor* actor) { actor->state++; } break; + case 3: actor->state++; + case 4: actor->fwork[0] += 0.05f; actor->obj.rot.x += actor->fwork[0]; @@ -655,9 +654,9 @@ void Venom1_80192CD4(Actor* actor) { actor->state++; } break; + case 0: case 5: - default: break; } } From 21ad1bc22ea1c10693069a3f2c43cb684f38ad00 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Thu, 16 May 2024 15:28:47 -0300 Subject: [PATCH 101/151] styling on fox_a6 --- src/overlays/ovl_i3/fox_a6.c | 367 ++++++++++++++++++++++++----------- 1 file changed, 259 insertions(+), 108 deletions(-) diff --git a/src/overlays/ovl_i3/fox_a6.c b/src/overlays/ovl_i3/fox_a6.c index 014b8565..47ca2dc8 100644 --- a/src/overlays/ovl_i3/fox_a6.c +++ b/src/overlays/ovl_i3/fox_a6.c @@ -12,87 +12,6 @@ void Area6_8018A2C4(Boss* bossA6); void Area6_8018A464(Boss* bossA6, s32 arg1); void Area6_8018B9BC(Boss* bossA6); -// f32 bossA6hit1[] = { -// 10.0f, -// { { 455.0f, 108.0f }, { 0.0f, 120.0f }, { 0.0f, 120.0f } }, -// { -// { { 0.0f, 195.0f }, { 0.0f, 147.0f }, { 0.0f, 153.0f } }, -// { { 0.0f, 195.0f }, { 0.0f, 147.0f }, { 0.0f, 153.0f } }, -// { { 0.0f, 195.0f }, { 0.0f, 147.0f }, { 0.0f, 153.0f } }, -// }, -// { -// { { 0.0f, 50.0f }, { 0.0f, 110.0f }, { 0.0f, 107.0f } }, -// { { 0.0f, 50.0f }, { 0.0f, 110.0f }, { 0.0f, 107.0f } }, -// { { 0.0f, 50.0f }, { 0.0f, 110.0f }, { 0.0f, 107.0f } }, -// }, -// { { -// 200000.0f, -// { 0.0f, 0.0f, 330.0f }, -// { { 317.0f, 282.0f }, { -10.0f, 325.0f }, { -217.0f, 187.0f } }, -// }, -// { -// 200000.0f, -// { 0.0f, 0.0f, 90.0f }, -// { { 317.0f, 282.0f }, { -10.0f, 325.0f }, { -217.0f, 187.0f } }, -// }, -// { -// 200000.0f, -// { 0.0f, 0.0f, 210.0f }, -// { { 317.0f, 282.0f }, { -10.0f, 325.0f }, { -217.0f, 187.0f } }, -// } }, -// }; - -// f32 bossA6hit2[] = { -// 15.0f, -// { { 455.0f, 108.0f }, { 0.0f, 120.0f }, { 0.0f, 120.0f } }, -// { -// { { 0.0f, 195.0f }, { 0.0f, 147.0f }, { 0.0f, 153.0f } }, -// { { 0.0f, 195.0f }, { 0.0f, 147.0f }, { 0.0f, 153.0f } }, -// { { 0.0f, 195.0f }, { 0.0f, 147.0f }, { 0.0f, 153.0f } }, -// }, -// { -// { { 0.0f, 50.0f }, { 0.0f, 110.0f }, { 0.0f, 107.0f } }, -// { { 0.0f, 50.0f }, { 0.0f, 110.0f }, { 0.0f, 107.0f } }, -// { { 0.0f, 50.0f }, { 0.0f, 110.0f }, { 0.0f, 107.0f } }, -// }, -// { { 93.0f, 262.0f }, { 0.0f, 330.0f }, { 0.0f, 341.0f } }, -// { { -// 200000.0f, -// { 0.0f, 0.0f, 330.0f }, -// { { -188.0f, 90.0f }, { 0.0f, 332.0f }, { -960.0f, 302.0f } }, -// }, -// { -// 200000.0f, -// { 0.0f, 0.0f, 90.0f }, -// { { -188.0f, 90.0f }, { 0.0f, 332.0f }, { -960.0f, 302.0f } }, -// }, -// { -// 200000.0f, -// { 0.0f, 0.0f, 210.0f }, -// { { -188.0f, 90.0f }, { 0.0f, 332.0f }, { -960.0f, 302.0f } }, -// } }, -// { { -// 200000.0f, -// { 0.0f, 0.0f, 330.0f }, -// { { -192.0f, 67.0f }, { 0.0f, 90.0f }, { -575.0f, 187.0f } }, -// }, -// { -// 200000.0f, -// { 0.0f, 0.0f, 90.0f }, -// { { -192.0f, 67.0f }, { 0.0f, 90.0f }, { -575.0f, 187.0f } }, -// }, -// { -// 200000.0f, -// { 0.0f, 0.0f, 210.0f }, -// { { -192.0f, 67.0f }, { 0.0f, 90.0f }, { -575.0f, 187.0f } }, -// } }, -// { -// 200000.0f, -// { 0.0f, 0.0f, 0.0f }, -// { { 74.0f, 12.0f }, { -2.0f, 25.0f }, { -1.0f, 26.0f } }, -// }, -// }; - #define A6_HITBOX_COUNT ((s32) (bossA6)->info.hitbox[0]) #define A6_HIT_0(bossA6) ((Hitbox*) ((bossA6)->info.hitbox + 1)) #define A6_HIT_1(bossA6, index) ((Hitbox*) ((f32*) (A6_HIT_0(bossA6) + 1) + 6 * (index))) @@ -438,7 +357,6 @@ f32 D_i3_801BF494[12] = { void Area6_80187530(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 fwork6, f32 xRot, f32 yRot, s32 timer0BC, s32 unk0B4) { - PRINTF("おん\n"); // On PRINTF("おふ\n"); // Off Actor_Initialize(actor); @@ -500,32 +418,42 @@ void Area6_BossA6_Init(BossA6* this) { gBossActive = true; gProjectFar = 25000.0f; gBossFrameCount = 0; + this->health = 780; + this->fwork[A6_FWK_2] = this->fwork[A6_FWK_34] = 2.0f; this->fwork[A6_FWK_35] = 1.2f; + this->swork[A6_SWK_25] = 3; this->swork[A6_SWK_15 + 0] = this->swork[A6_SWK_15 + 1] = this->swork[A6_SWK_15 + 2] = 40; this->swork[A6_SWK_18 + 0] = this->swork[A6_SWK_18 + 1] = this->swork[A6_SWK_18 + 2] = 3; + for (i = 0; i < A6_BSS_MAX; i++) { D_i3_801C2250[i] = 0; } + D_i3_801C22F0.unk_24 = D_i3_801C22F0.unk_28[0] = D_i3_801C22F0.unk_28[2] = D_i3_801C22F0.unk_28[1] = 255.0f; D_i3_801C22F0.unk_34 = 0.0f; + this->swork[A6_SWK_27 + 0] = this->swork[A6_SWK_27 + 1] = this->swork[A6_SWK_27 + 2] = 0; this->swork[A6_SWK_22] = 32; this->swork[A6_SWK_23] = 32; this->swork[A6_SWK_24] = 255; - this->fwork[A6_FWK_29] = 255.0f; + this->fwork[A6_FWK_29] = 255.0f; this->fwork[A6_FWK_3] = -1700.0f; this->fwork[A6_FWK_5] = 30.0f; this->fwork[A6_FWK_32] = 1.0f; + this->timer_050 = 500; + A6_HIT_1(this, 0)->z.size = A6_HIT_1(this, 1)->z.size = A6_HIT_1(this, 2)->z.size = 195.0f; A6_HIT_1(this, 0)->y.size = A6_HIT_1(this, 1)->y.size = A6_HIT_1(this, 2)->y.size = 147.0f; A6_HIT_1(this, 0)->x.size = A6_HIT_1(this, 1)->x.size = A6_HIT_1(this, 2)->x.size = 153.0f; + SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 40); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 40); + AUDIO_PLAY_SFX(NA_SE_EN_SHIELD_ROLL_LEVEL, this->sfxSource, 4); } @@ -565,6 +493,7 @@ void Area6_Boss_Update(Boss* bossA6) { if ((bossA6->dmgType != DMG_NONE) && (bossA6->health > 0)) { bossA6->dmgType = DMG_NONE; + if (bossA6->fwork[A6_FWK_0] > 5.0f) { if ((bossA6->dmgPart == 0) && (bossA6->swork[A6_SWK_25] == 0) && (bossA6->fwork[A6_FWK_29] < 30.0f)) { bossA6->timer_05C = 15; @@ -610,8 +539,11 @@ void Area6_Boss_Update(Boss* bossA6) { D_i3_801C2250[A6_BSS_2_0] = D_i3_801C2250[A6_BSS_2_1] = D_i3_801C2250[A6_BSS_2_2] = bossA6->swork[A6_SWK_33 + 0] = bossA6->swork[A6_SWK_33 + 1] = bossA6->swork[A6_SWK_33 + 2] = 0; + gScreenFlashTimer = 4; + bossA6->state = 11; + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_L, bossA6->sfxSource, 4); AUDIO_PLAY_SFX(NA_SE_EXPLOSION_DEMO5, bossA6->sfxSource, 4); } @@ -820,8 +752,11 @@ void Area6_Boss_Update(Boss* bossA6) { Math_SmoothStepToF(&D_i3_801C22F0.unk_24, 0.0f, 0.1f, 1.0f, 0); if (D_i3_801C22F0.unk_24 < 1.0f) { D_i3_801C22F0.unk_24 = 0.0f; + Audio_KillSfxBySource(bossA6->sfxSource); + AUDIO_PLAY_SFX(NA_SE_EN_SHIELD_ROLL_STOP, bossA6->sfxSource, 4); + bossA6->timer_050 = 20; bossA6->obj.pos.z = gPlayer[0].cam.eye.z - gPathProgress + bossA6->fwork[A6_FWK_3]; bossA6->fwork[A6_FWK_6] = bossA6->obj.pos.x = gPlayer[0].cam.eye.x; @@ -875,10 +810,14 @@ void Area6_Boss_Update(Boss* bossA6) { bossA6->fwork[A6_FWK_6] = bossA6->obj.pos.x = gPlayer[0].cam.eye.x; bossA6->fwork[A6_FWK_7] = bossA6->obj.pos.y = gPlayer[0].cam.eye.y; } + D_i3_801C22F0.unk_24 = 0.0f; + bossA6->timer_050 = 50; bossA6->state = 2; + D_i3_801C2250[A6_BSS_8] = 0; + AUDIO_PLAY_SFX(NA_SE_EN_WARP_OUT, bossA6->sfxSource, 4); } } @@ -920,6 +859,7 @@ void Area6_Boss_Update(Boss* bossA6) { bossA6->swork[A6_SWK_38] = 0; D_i3_801C2250[A6_BSS_28] = 1; + bossA6->state = 4; if (bossA6->swork[A6_SWK_37] != 0) { @@ -978,6 +918,7 @@ void Area6_Boss_Update(Boss* bossA6) { D_i3_801C2250[A6_BSS_29]++; D_i3_801C2250[A6_BSS_29] &= 1; } + if ((bossA6->swork[A6_SWK_30 + 0] != 0) && (bossA6->swork[A6_SWK_30 + 1] != 0) && (bossA6->swork[A6_SWK_30 + 2] != 0)) { bossA6->timer_050 = 1500; @@ -1032,6 +973,7 @@ void Area6_Boss_Update(Boss* bossA6) { (bossA6->swork[A6_SWK_33 + 2] == 0) && (bossA6->swork[A6_SWK_27 + 0] == 0) && (bossA6->swork[A6_SWK_27 + 1] == 0) && (bossA6->swork[A6_SWK_27 + 2] == 0))) { bossA6->swork[A6_SWK_37] = 1; + if (D_i3_801C2250[A6_BSS_6] != 0) { bossA6->state = 1; D_i3_801C2250[A6_BSS_27] = 0; @@ -1096,14 +1038,18 @@ void Area6_Boss_Update(Boss* bossA6) { Math_SmoothStepToF(&bossA6->fwork[A6_FWK_37], 0.0f, 1.0f, 10.0f, 0.00001f); Math_SmoothStepToF(&bossA6->fwork[A6_FWK_3], -6000.0f, 10.0f, 100.0f, 0.00001f); + var_s0 = D_i3_801C2250[A6_BSS_9] * 4; + Math_SmoothStepToF(&D_i3_801C22F0.unk_28[0], D_i3_801BF454[var_s0], 0.5f, 100.0f, 0.00001f); Math_SmoothStepToF(&D_i3_801C22F0.unk_28[2], D_i3_801BF454[var_s0 + 1], 0.5f, 100.0f, 0.00001f); Math_SmoothStepToF(&D_i3_801C22F0.unk_28[1], D_i3_801BF454[var_s0 + 2], 0.5f, 100.0f, 0.00001f); + if (((gGameFrameCount % 16) == 0)) { D_i3_801C2250[A6_BSS_9]++; D_i3_801C2250[A6_BSS_9] &= 3; } + if (bossA6->timer_050 == 0) { bossA6->fwork[A6_FWK_1] = 0.0f; bossA6->state = 7; @@ -1126,6 +1072,7 @@ void Area6_Boss_Update(Boss* bossA6) { Math_SmoothStepToF(&effect->unk_60.x, 0.0f, 0.1f, 1.0f, 0.00001f); Math_SmoothStepToF(&effect->unk_60.y, 0.0f, 0.1f, 1.0f, 0.00001f); Math_SmoothStepToF(&effect->unk_60.z, 0.0f, 1.0f, 2.0f, 0.00001f); + if (effect->unk_60.z < 0.2f) { D_i3_801C2250[A6_BSS_0] = 2; bossA6->swork[A6_SWK_37] = 1; @@ -1174,12 +1121,16 @@ void Area6_Boss_Update(Boss* bossA6) { for (var_s0 = 0; var_s0 < sp128; var_s0++) { Matrix_RotateZ(gCalcMatrix, (360.0f / sp128) * M_DTOR, MTXF_APPLY); + sp98.x = 0.0f; sp98.y = 400.0f; sp98.z = 0.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp98, &sp8C); + yaw_10C = Math_Atan2F(sp8C.x, sp8C.z); yaw_10C = Math_RadToDeg(yaw_10C); + pitch_110 = Math_Atan2F(sp8C.y, sqrtf(SQ(sp8C.x) + SQ(sp8C.z))); pitch_110 = Math_RadToDeg(-pitch_110); @@ -1191,12 +1142,16 @@ void Area6_Boss_Update(Boss* bossA6) { if ((gActors[spf124].obj.status == OBJ_FREE) || (gActors[spf124].obj.id != OBJ_ACTOR_191) || (D_i3_801C2250[A6_BSS_24] == 0)) { D_i3_801C2250[A6_BSS_12_0 + var_s0] = 0; + spf124 = 0; + if (bossA6->swork[A6_SWK_25] == 1) { spf124 = 1; } + Area6_801875E4(bossA6->obj.pos.x + sp8C.x, bossA6->obj.pos.y + sp8C.y, bossA6->obj.pos.z + sp8C.z, 25.0f, pitch_110, yaw_10C, 10, spf124); + D_i3_801C2250[A6_BSS_12_0 + var_s0] = D_i3_801C2250[A6_BSS_11]; } } @@ -1231,11 +1186,13 @@ void Area6_Boss_Update(Boss* bossA6) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].csState = 0; } + if (bossA6->timer_052 < 50) { D_ctx_801779A8[0] = 50.0f; } else { D_ctx_801779A8[0] = 20.0f; } + if (bossA6->timer_052 == 0) { gShowBossHealth = 0; Object_Kill(&bossA6->obj, bossA6->sfxSource); @@ -1343,24 +1300,28 @@ void Area6_8018A2C4(Boss* bossA6) { bossA6->swork[A6_SWK_0 + i] = 15; bossA6->swork[A6_SWK_3 + i] = 40; bossA6->swork[A6_SWK_33 + i] -= bossA6->damage; + if (i == 0) { sp58.x = D_i3_801BF334[0]; sp58.y = D_i3_801BF3C4[0]; sp58.z = bossA6->obj.pos.z; func_effect_8007A6F0(&sp58, NA_SE_OB_DAMAGE_M); } + if (i == 1) { sp58.x = D_i3_801BF364[0]; sp58.y = D_i3_801BF3F4[0]; sp58.z = bossA6->obj.pos.z; func_effect_8007A6F0(&sp58, NA_SE_OB_DAMAGE_M); } + if (i == 2) { sp58.x = D_i3_801BF394[0]; sp58.y = D_i3_801BF424[0]; sp58.z = bossA6->obj.pos.z; func_effect_8007A6F0(&sp58, NA_SE_OB_DAMAGE_M); } + if (bossA6->swork[A6_SWK_33 + i] < 0) { bossA6->swork[A6_SWK_33 + i] = 0; } @@ -1390,18 +1351,21 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { bossA6->timer_050 = 202; bossA6->timer_056 = 0; } - switch (bossA6->swork[A6_SWK_18 + arg1]) { /* irregular */ + switch (bossA6->swork[A6_SWK_18 + arg1]) { case 0: Math_SmoothStepToF(&bossA6->fwork[A6_FWK_25 + arg1], -90.0f, 0.05f, 2.0f, 0.00001f); Math_SmoothStepToF(&bossA6->fwork[A6_FWK_22 + arg1], 0.0f, 0.1f, 10.0f, 0.00001f); + switch (arg1) { case 0: if (bossA6->swork[A6_SWK_33] != 0) { for (i = 1; i < 12; i++) { D_i3_801BEE90[i] = 3.0f; D_i3_801BEEC0[i] = 3.0f; + if ((bossA6->swork[A6_SWK_6] == 0) && (bossA6->state != 3)) { bossA6->swork[A6_SWK_6] = 20; + D_i3_801BEE00[0].y = RAND_FLOAT_CENTERED(720.0f); if (D_i3_801BEE00[0].y < -20.0f) { D_i3_801BEE00[0].y = -20.0f; @@ -1413,8 +1377,8 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { } else if ((bossA6->swork[A6_SWK_6] & 3) == 0) { D_i3_801BF3C4[i] = D_i3_801BEE00[i].y; D_i3_801BEE00[i].y = D_i3_801BF3C4[i - 1]; - // temp_ft2; } + if (bossA6->swork[A6_SWK_9] == 0) { if ((D_i3_801BEE00[0].y < -20.0f) || (D_i3_801BEE00[0].y > 20.0f)) { for (i = 0; i < 12; i++) { @@ -1428,9 +1392,9 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { } else if ((bossA6->swork[A6_SWK_9] % 8) == 0) { D_i3_801BF334[i] = D_i3_801BEE00[i].x; D_i3_801BEE00[i].x = D_i3_801BF334[i - 1]; - // temp_ft2; } } + for (i = 0; i < 12; i++) { Math_SmoothStepToF(&D_i3_801BED70[i].y, D_i3_801BEE00[i].y, 0.05f, D_i3_801BEEC0[i], 0.001f); @@ -1441,13 +1405,16 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { } } break; + case 1: if (bossA6->swork[A6_SWK_34] != 0) { for (i = 1; i < 12; i++) { D_i3_801BF010[i] = 3.0f; D_i3_801BF040[i] = 3.0f; + if (bossA6->swork[A6_SWK_7] == 0) { bossA6->swork[A6_SWK_7] = 20; + D_i3_801BEF80[0].y = RAND_FLOAT_CENTERED(720.0f); if (D_i3_801BEF80[0].y < -20.0f) { D_i3_801BEF80[0].y = -20.0f; @@ -1460,6 +1427,7 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { D_i3_801BF3F4[i] = D_i3_801BEF80[i].y; D_i3_801BEF80[i].y = D_i3_801BF3F4[i - 1]; } + if (bossA6->swork[A6_SWK_10] == 0) { if ((D_i3_801BEF80[0].y < -20.0f) || (D_i3_801BEF80[0].y > 20.0f)) { for (i = 0; i < 12; i++) { @@ -1475,6 +1443,7 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { D_i3_801BEF80[i].x = D_i3_801BF364[i - 1]; } } + for (i = 0; i < 12; i++) { Math_SmoothStepToF(&D_i3_801BEEF0[i].y, D_i3_801BEF80[i].y, 0.05f, D_i3_801BF040[i], 0.001f); @@ -1485,13 +1454,16 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { } } break; + case 2: if (bossA6->swork[A6_SWK_35] != 0) { for (i = 1; i < 12; i++) { D_i3_801BF190[i] = 3.0f; D_i3_801BF1C0[i] = 3.0f; + if (bossA6->swork[A6_SWK_8] == 0) { bossA6->swork[A6_SWK_8] = 20; + D_i3_801BF100[0].y = RAND_FLOAT_CENTERED(720.0f); if (D_i3_801BF100[0].y < -20.0f) { D_i3_801BF100[0].y = -20.0f; @@ -1503,8 +1475,8 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { } else if ((bossA6->swork[A6_SWK_8] & 3) == 0) { D_i3_801BF424[i] = D_i3_801BF100[i].y; D_i3_801BF100[i].y = D_i3_801BF424[i - 1]; - // temp_ft2; } + if (bossA6->swork[A6_SWK_11] == 0) { if ((D_i3_801BF100[0].y < -20.0f) || (D_i3_801BF100[0].y > 20.0f)) { for (i = 0; i < 12; i++) { @@ -1518,9 +1490,9 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { } else if ((bossA6->swork[A6_SWK_11] % 8) == 0) { D_i3_801BF394[i] = D_i3_801BF100[i].x; D_i3_801BF100[i].x = D_i3_801BF394[i - 1]; - // temp_ft2; } } + for (i = 0; i < 12; i++) { Math_SmoothStepToF(&D_i3_801BF070[i].y, D_i3_801BF100[i].y, 0.05f, D_i3_801BF1C0[i], 0.001f); @@ -1532,6 +1504,7 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { } break; } + if ((bossA6->state >= 3) && (bossA6->fwork[A6_FWK_0] == 0) && ((bossA6->swork[A6_SWK_33] != 0) || (bossA6->swork[A6_SWK_34] != 0) || (bossA6->swork[A6_SWK_35] != 0)) && @@ -1540,6 +1513,7 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { if (bossA6->swork[A6_SWK_25] < 2) { var_fs0 = 0.7f; } + if (((gGameFrameCount % 32) == 0) && (Rand_ZeroOne() < var_fs0) && (D_i3_801C2250[A6_BSS_5] == 0) && (bossA6->swork[A6_SWK_33 + arg1] != 0)) { if ((Rand_ZeroOne() < 0.2f) || (bossA6->swork[A6_SWK_25] < 2)) { @@ -1552,6 +1526,7 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { if (bossA6->swork[A6_SWK_20] == 0) { bossA6->swork[A6_SWK_20] = 1; } + bossA6->swork[A6_SWK_12] = 30; if (bossA6->swork[A6_SWK_33] != 0) { bossA6->swork[A6_SWK_13] = bossA6->swork[A6_SWK_12] + 50; @@ -1575,8 +1550,10 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { } } break; + case 1: D_i3_801C2250[A6_BSS_5] = 50; + for (i = 0; i < 12; i++) { if (arg1 == 0) { D_i3_801BEE00[i].x = i * -3.0f; @@ -1584,12 +1561,14 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { Math_SmoothStepToF(&D_i3_801BED70[i].x, D_i3_801BEE00[i].x, 0.1f, 10.0f, 0.001f); Math_SmoothStepToF(&D_i3_801BED70[i].y, D_i3_801BEE00[i].y, 0.1f, 10.0f, 0.001f); } + if (arg1 == 1) { D_i3_801BEF80[i].x = i * -3.0f; D_i3_801BEF80[i].y = 0.0f; Math_SmoothStepToF(&D_i3_801BEEF0[i].x, D_i3_801BEF80[i].x, 0.1f, 10.0f, 0.001f); Math_SmoothStepToF(&D_i3_801BEEF0[i].y, D_i3_801BEF80[i].y, 0.1f, 10.0f, 0.001f); } + if (arg1 == 2) { D_i3_801BF100[i].x = i * -3.0f; D_i3_801BF100[i].y = 0.0f; @@ -1597,6 +1576,7 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { Math_SmoothStepToF(&D_i3_801BF070[i].y, D_i3_801BF100[i].y, 0.1f, 10.0f, 0.001f); } } + if (bossA6->swork[A6_SWK_12 + arg1] == 0) { bossA6->swork[A6_SWK_12 + arg1] = 40.0f - ((20.0f - ((bossA6->fwork[A6_FWK_3] * -1.0f) / 150.0f)) * 3.0f); @@ -1606,12 +1586,14 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { spE0.z = bossA6->obj.pos.z; func_effect_8007A6F0(&spE0, NA_SE_EN_ARM_SWING); } + if (arg1 == 1) { spE0.x = D_i3_801BF364[0]; spE0.y = D_i3_801BF3F4[0]; spE0.z = bossA6->obj.pos.z; func_effect_8007A6F0(&spE0, NA_SE_EN_ARM_SWING); } + if (arg1 == 2) { spE0.x = D_i3_801BF394[0]; spE0.y = D_i3_801BF424[0]; @@ -1621,6 +1603,7 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { bossA6->swork[A6_SWK_18 + arg1] = 2; } break; + case 2: D_i3_801C2250[A6_BSS_5] = 50; Math_SmoothStepToF(&bossA6->fwork[A6_FWK_25 + arg1], 0.0f, 0.4f, 100.0f, 0.00001f); @@ -1634,16 +1617,19 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { D_i3_801BEE90[i] = 0.0f; D_i3_801BEEC0[i] = 0.0f; } + if (arg1 == 1) { D_i3_801BF010[i] = 0.0f; D_i3_801BF040[i] = 0.0f; } + if (arg1 == 2) { D_i3_801BF190[i] = 0.0f; D_i3_801BF1C0[i] = 0.0f; } } } + for (i = 0; i < 12; i++) { if (arg1 == 0) { D_i3_801BEE00[i].y = 0.0f; @@ -1651,12 +1637,14 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { Math_SmoothStepToF(&D_i3_801BED70[i].y, D_i3_801BEE00[i].y, 0.3f, 100.0f, 0.00001f); Math_SmoothStepToF(&D_i3_801BED70[i].x, D_i3_801BEE00[i].x, 0.3f, 100.0f, 0.00001f); } + if (arg1 == 1) { D_i3_801BEF80[i].y = 0.0f; D_i3_801BEF80[i].x = D_i3_801BF494[i]; Math_SmoothStepToF(&D_i3_801BEEF0[i].y, D_i3_801BEF80[i].y, 0.3f, 100.0f, 0.001f); Math_SmoothStepToF(&D_i3_801BEEF0[i].x, D_i3_801BEF80[i].x, 0.3f, 100.0f, 0.001f); } + if (arg1 == 2) { D_i3_801BF100[i].y = 0.0f; D_i3_801BF100[i].x = D_i3_801BF494[i]; @@ -1665,6 +1653,7 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { } } break; + case 3: for (i = 0; i < 12; i++) { Math_SmoothStepToF(&D_i3_801BEE00[i].y, 0.0f, 0.5f, 50.0f, 0.001f); @@ -1674,6 +1663,7 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { Math_SmoothStepToF(&D_i3_801BF100[i].y, 0.0f, 0.5f, 50.0f, 0.001f); Math_SmoothStepToF(&D_i3_801BF100[i].x, 0.0f, 0.5f, 50.0f, 0.001f); } + bossA6->timer_050 = 0; bossA6->swork[A6_SWK_18] = bossA6->swork[A6_SWK_19] = bossA6->swork[A6_SWK_20] = 4; bossA6->fwork[A6_FWK_13] = bossA6->fwork[A6_FWK_14] = bossA6->fwork[A6_FWK_15] = bossA6->fwork[A6_FWK_22] = @@ -1683,6 +1673,7 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { bossA6->fwork[A6_FWK_28] = 0.0f; bossA6->fwork[A6_FWK_25] = bossA6->fwork[A6_FWK_26] = bossA6->fwork[A6_FWK_27] = -90.0f; + for (i = 0; i < 12; i++) { D_i3_801BEE00[i].x = 0.0f; D_i3_801BEE00[i].y = 0.0f; @@ -1711,8 +1702,8 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { void Area6_8018B9BC(Boss* bossA6) { s32 i; s32 j; - Vec3f sp94; - Vec3f sp88; + Vec3f dest; + Vec3f sfxPos; if (D_i3_801C2250[A6_BSS_0] == 0) { for (i = 3, j = 15; j < 18; j++, i++) { @@ -1727,28 +1718,36 @@ void Area6_8018B9BC(Boss* bossA6) { D_i3_801C2250[A6_BSS_25] = 20; } } + AUDIO_PLAY_SFX(NA_SE_EN_SPARK_DAMAGE_M, bossA6->sfxSource, 4); + if (bossA6->swork[A6_SWK_0 + j] <= 0) { bossA6->swork[A6_SWK_0 + j] = 0; - Matrix_MultVec3f(gCalcMatrix, &bossA6->vwork[A6_VWK_1 + i], &sp94); - func_effect_8007D0E0(bossA6->obj.pos.x + sp94.x, bossA6->obj.pos.y + sp94.y, - bossA6->obj.pos.z + sp94.z, 10.0f); - sp88.x = bossA6->obj.pos.x + sp94.x; - sp88.y = bossA6->obj.pos.y + sp94.y; - sp88.z = bossA6->obj.pos.z + sp94.z; - func_effect_8007A6F0(&sp88, NA_SE_EN_EXPLOSION_M); + + Matrix_MultVec3f(gCalcMatrix, &bossA6->vwork[A6_VWK_1 + i], &dest); + func_effect_8007D0E0(bossA6->obj.pos.x + dest.x, bossA6->obj.pos.y + dest.y, + bossA6->obj.pos.z + dest.z, 10.0f); + + sfxPos.x = bossA6->obj.pos.x + dest.x; + sfxPos.y = bossA6->obj.pos.y + dest.y; + sfxPos.z = bossA6->obj.pos.z + dest.z; + + func_effect_8007A6F0(&sfxPos, NA_SE_EN_EXPLOSION_M); func_effect_8007C120(bossA6->obj.pos.x, bossA6->obj.pos.y, bossA6->obj.pos.z + 150.0f, bossA6->vel.x, bossA6->vel.y, bossA6->vel.z, 0.2f, 50); } + if ((bossA6->swork[A6_SWK_15] == 0) && (bossA6->swork[A6_SWK_16] == 0) && (bossA6->swork[A6_SWK_17] == 0)) { Audio_KillSfxBySource(bossA6->sfxSource); + if (bossA6->swork[A6_SWK_25] != 0) { bossA6->swork[A6_SWK_25]--; if (bossA6->swork[A6_SWK_25] != 0) { bossA6->health -= 60; } } + if (bossA6->swork[A6_SWK_25] != 0) { bossA6->timer_058 = 50; } else { @@ -1778,15 +1777,18 @@ void Area6_8018BCD4(Vec3f* arg0, f32 arg1, f32 arg2, Vec3f* arg3, s32 arg4, f32 gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255); } } + Matrix_Push(&gGfxMatrix); Matrix_Push(&gCalcMatrix); Matrix_Copy(gCalcMatrix, &gIdentityMatrix); Matrix_RotateZ(gCalcMatrix, M_DTOR * arg1, MTXF_APPLY); Matrix_Translate(gCalcMatrix, 0.0f, 100.0f, -223.0f, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, M_DTOR * arg2, MTXF_APPLY); + for (i = 0; i < arg6; i++) { Matrix_Push(&gGfxMatrix); Matrix_Push(&gCalcMatrix); + if (i == 11) { Matrix_Scale(gCalcMatrix, 1.5f, 1.5f, 1.5f, MTXF_APPLY); Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); @@ -1798,8 +1800,10 @@ void Area6_8018BCD4(Vec3f* arg0, f32 arg1, f32 arg2, Vec3f* arg3, s32 arg4, f32 Matrix_Scale(gCalcMatrix, 2.0f, 2.0f, 2.0f, MTXF_APPLY); Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); + gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_A6_6015EE0); + if (arg6 != 12) { Matrix_MultVec3f(gCalcMatrix, &sp90, arg3); } @@ -1826,18 +1830,23 @@ void Area6_8018C0D0(f32* arg0, f32 arg1, Vec3f* arg2, f32 arg3, s32 arg4) { spAC = 180.0f; var_fs3 = 5.0f - (2.0f * (var_fs3 / 10.0f)); } + Matrix_Push(&gGfxMatrix); Matrix_Push(&gCalcMatrix); Matrix_Copy(gCalcMatrix, &gIdentityMatrix); + gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); + Matrix_RotateZ(gCalcMatrix, (D_i3_801C22F0.unk_34 + arg1) * M_DTOR, MTXF_APPLY); Matrix_Translate(gCalcMatrix, 0.0f, -360.0f, 120.0f, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, -(90.0f - arg3) * M_DTOR, MTXF_APPLY); Matrix_Scale(gCalcMatrix, 0.7f, 0.7f, 0.7f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); + for (i = 0; i < 5; i++) { Matrix_Push(&gGfxMatrix); Matrix_Push(&gCalcMatrix); + if (i == 4) { Matrix_RotateX(gCalcMatrix, 80.0f * M_DTOR, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, (90.0f - arg3) * M_DTOR, MTXF_APPLY); @@ -1871,7 +1880,7 @@ void Area6_8018C0D0(f32* arg0, f32 arg1, Vec3f* arg2, f32 arg3, s32 arg4) { } void Area6_Boss_Draw(Boss* bossA6) { - Vec3f spD0[30]; + Vec3f jointTable[30]; Vec3f spC4; Vec3f spB8; Vec3f spAC; @@ -1887,7 +1896,8 @@ void Area6_Boss_Draw(Boss* bossA6) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_101C2E0); } else if (D_i3_801C22F0.unk_24 != 0.0f) { - Animation_GetFrameData(&D_A6_6018994, 0, spD0); + Animation_GetFrameData(&D_A6_6018994, 0, jointTable); + if (D_i3_801C22F0.unk_24 != 255.0f) { RCP_SetupDL(&gMasterDisp, 0x47); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) D_i3_801C22F0.unk_24); @@ -1899,6 +1909,7 @@ void Area6_Boss_Draw(Boss* bossA6) { spAC.x = 0.0f; } spAC.y = spAC.z = 0.0f; + Matrix_RotateZ(gCalcMatrix, gGameFrameCount * 6.0f * M_DTOR, MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, &spAC, &spB8); Matrix_Translate(gGfxMatrix, spB8.x, spB8.y, 0.0f, MTXF_APPLY); @@ -1916,10 +1927,13 @@ void Area6_Boss_Draw(Boss* bossA6) { (s32) D_i3_801C22F0.unk_28[1], 255); } } - spD0[3].z -= bossA6->fwork[A6_FWK_0]; - spD0[4].z -= bossA6->fwork[A6_FWK_0]; - spD0[5].z -= bossA6->fwork[A6_FWK_0]; - Animation_DrawSkeleton(1, D_A6_6018BA0, spD0, NULL, NULL, &bossA6->index, &gIdentityMatrix); + + jointTable[3].z -= bossA6->fwork[A6_FWK_0]; + jointTable[4].z -= bossA6->fwork[A6_FWK_0]; + jointTable[5].z -= bossA6->fwork[A6_FWK_0]; + + Animation_DrawSkeleton(1, D_A6_6018BA0, jointTable, NULL, NULL, &bossA6->index, &gIdentityMatrix); + if (bossA6->scale >= 1.0f) { for (i = 0; i < 3; i++) { if ((bossA6->swork[A6_SWK_33 + i] == 0) && (bossA6->state != 3) && @@ -1928,19 +1942,27 @@ void Area6_Boss_Draw(Boss* bossA6) { Matrix_RotateY(gCalcMatrix, bossA6->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, bossA6->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, bossA6->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_MultVec3f(gCalcMatrix, &bossA6->vwork[A6_VWK_1] + i, &spC4); + func_effect_8007D0E0(bossA6->obj.pos.x + spC4.x, bossA6->obj.pos.y + spC4.y, bossA6->obj.pos.z + spC4.z, 20.0f); + spB8.x = bossA6->obj.pos.x + spC4.x; spB8.y = bossA6->obj.pos.y + spC4.y; spB8.z = bossA6->obj.pos.z + spC4.z; + if ((!bossA6) && (!bossA6)) {} // fake + if (D_i3_801C2250[A6_BSS_26] == 0) { func_effect_8007A6F0(&spB8, NA_SE_EN_EXPLOSION_M); } + D_i3_801C2250[A6_BSS_26]++; D_i3_801C2250[A6_BSS_26] &= 1; + bossA6->swork[A6_SWK_27 + i]--; + if (bossA6->swork[A6_SWK_27 + i] <= 0) { bossA6->swork[A6_SWK_18 + i] = 4; bossA6->swork[A6_SWK_38] = 1; @@ -1955,12 +1977,14 @@ void Area6_Boss_Draw(Boss* bossA6) { D_i3_801BEE90[j] = 3.0f; D_i3_801BEEC0[j] = 3.0f; } + if (i == 1) { D_i3_801BEEF0[j].y = D_i3_801BEEF0[j].x = D_i3_801BEF80[j].y = D_i3_801BEF80[j].x = 0.0f; D_i3_801BF010[j] = 3.0f; D_i3_801BF040[j] = 3.0f; } + if (i == 2) { D_i3_801BF070[j].y = D_i3_801BF070[j].x = D_i3_801BF100[j].y = D_i3_801BF100[j].x = 0.0f; @@ -1980,23 +2004,29 @@ void Area6_Boss_Draw(Boss* bossA6) { Area6_8018BCD4(D_i3_801BF070, 120.0f, bossA6->fwork[A6_FWK_27], &bossA6->vwork[A6_VWK_3], bossA6->swork[A6_SWK_2] & 1, bossA6->fwork[A6_FWK_12] + bossA6->fwork[A6_FWK_21], bossA6->swork[A6_SWK_29], bossA6->fwork[A6_FWK_0]); + if ((bossA6->swork[A6_SWK_15] != 0) && (bossA6->state >= 3) && (D_i3_801C22F0.unk_24 == 255.0f) && (D_i3_801C2250[A6_BSS_0] == 0)) { Area6_8018C0D0(D_i3_801BF1F0, 0.0f, &bossA6->vwork[A6_VWK_4], bossA6->fwork[A6_FWK_0], 0); } + if ((bossA6->swork[A6_SWK_16] != 0) && (bossA6->state >= 3) && (D_i3_801C22F0.unk_24 == 255.0f) && (D_i3_801C2250[A6_BSS_0] == 0)) { Area6_8018C0D0(D_i3_801BF220, -120.0f, &bossA6->vwork[A6_VWK_5], bossA6->fwork[A6_FWK_0], 1); } + if ((bossA6->swork[A6_SWK_17] != 0) && (bossA6->state >= 3) && (D_i3_801C22F0.unk_24 == 255.0f) && (D_i3_801C2250[A6_BSS_0] == 0)) { Area6_8018C0D0(D_i3_801BF250, 120.0f, &bossA6->vwork[A6_VWK_6], bossA6->fwork[A6_FWK_0], 2); } + if (bossA6->swork[A6_SWK_25] != 0) { j = bossA6->swork[A6_SWK_25] - 1; + if ((bossA6->timer_058 != 0) && !(bossA6->timer_058 & 3)) { AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, bossA6->sfxSource, 4); } + if (bossA6->timer_058 == 1) { if (bossA6->swork[A6_SWK_25] == 2) { Radio_PlayMessage(gMsg_ID_7085, RCID_FALCO); @@ -2004,6 +2034,7 @@ void Area6_Boss_Draw(Boss* bossA6) { Radio_PlayMessage(gMsg_ID_7086, RCID_SLIPPY); } } + if (bossA6->swork[A6_SWK_22] != D_i3_801BF310[j]) { if (bossA6->swork[A6_SWK_22] < D_i3_801BF310[j]) { bossA6->swork[A6_SWK_22]++; @@ -2011,6 +2042,7 @@ void Area6_Boss_Draw(Boss* bossA6) { bossA6->swork[A6_SWK_22]--; } } + if (bossA6->swork[A6_SWK_23] != D_i3_801BF31C[j]) { if (bossA6->swork[A6_SWK_23] < D_i3_801BF31C[j]) { bossA6->swork[A6_SWK_23]++; @@ -2018,6 +2050,7 @@ void Area6_Boss_Draw(Boss* bossA6) { bossA6->swork[A6_SWK_23]--; } } + if (bossA6->swork[A6_SWK_24] != D_i3_801BF328[j]) { if (bossA6->swork[A6_SWK_24] < D_i3_801BF328[j]) { bossA6->swork[A6_SWK_24]++; @@ -2039,13 +2072,17 @@ void Area6_Boss_Draw(Boss* bossA6) { RCP_SetupDL(&gMasterDisp, 0x47); Matrix_Translate(gGfxMatrix, 0.0f, 2.0f, 70.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.7f, MTXF_APPLY); + if (bossA6->timer_05C & 1) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) D_i3_801C22F0.unk_24); } + Matrix_SetGfxMtx(&gMasterDisp); + gSPDisplayList(gMasterDisp++, D_A6_601B2B0); + Matrix_Pop(&gGfxMatrix); RCP_SetupDL(&gMasterDisp, 0x47); if (D_i3_801C22F0.unk_24 != 255.0f) { @@ -2097,7 +2134,9 @@ void Area6_8018D4E0(Actor* actor) { func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, 4.0f, 20); func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 7.0f); func_effect_8007B344(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 6.0f, 5); + Object_Kill(&actor->obj, actor->sfxSource); + for (i = 0; i < 15; i++) { func_effect_800794CC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 1.0f); } @@ -2176,9 +2215,11 @@ void Area6_8018D920(Vec3f* pos) { Matrix_RotateY(gCalcMatrix, M_DTOR * yRot, MTXF_NEW); Matrix_RotateX(gCalcMatrix, M_DTOR * xRot, MTXF_APPLY); + speed.x = 0.0f; speed.y = 0.0f; speed.z = 100.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &speed, &vel); Area6_8018D3CC(CS_SHOT_ID, pos->x, pos->y, pos->z, vel.x, vel.y, vel.z, xRot, yRot, 0.0f); } @@ -2193,7 +2234,7 @@ void Area6_8018DA58(Actor* actor) { f32 sp3C; f32 sp38; - switch (actor->state) { /* irregular */ + switch (actor->state) { case 1: actor->fwork[7] += 2.5f; actor->rot_0F4.z = SIN_DEG(actor->fwork[7]) * 10.0f; @@ -2202,15 +2243,18 @@ void Area6_8018DA58(Actor* actor) { actor->fwork[9] += 1.0f; actor->obj.pos.z += COS_DEG(actor->fwork[9]) * 1.5f; break; + case 2: Math_SmoothStepToF(&actor->rot_0F4.z, -180.0f, 0.1f, 3.0f, 0.0f); break; + case 3: Math_SmoothStepToF(&actor->rot_0F4.z, -45.0f, 0.05f, 2.0f, 0.0f); Math_SmoothStepToAngle(&actor->rot_0F4.y, 340.0f, 0.05f, 2.4f, 0.0f); Math_SmoothStepToF(&actor->rot_0F4.x, 3.0f, 0.05f, 1.0f, 0.0f); Math_SmoothStepToF(&actor->fwork[0], 30.0f, 0.1f, 3.0f, 0.0f); break; + case 6: case 11: case 16: @@ -2223,6 +2267,7 @@ void Area6_8018DA58(Actor* actor) { case 17: actor->iwork[11] = 2; Math_SmoothStepToF(&actor->fwork[0], 50.0f, 0.1f, 3.0f, 0.01f); + switch (actor->state) { case 7: sp48 = -100.0f; @@ -2240,34 +2285,44 @@ void Area6_8018DA58(Actor* actor) { sp44 = -999.0f; break; } + sp3C = Math_RadToDeg(Math_Atan2F(sp4C, sp44)); sp40 = Math_RadToDeg(-Math_Atan2F(sp48, sqrtf((sp4C * sp4C) + (sp44 * sp44)))); + if ((sp40 + 40.0f) >= 360.0f) { sp40 -= 360.0f; } if (sp40 > 180.0f) { sp40 = 0.0f; } + sp38 = Math_SmoothStepToAngle(&actor->rot_0F4.y, sp3C, 0.5f, 2.0f, 0.0001f) * 30.0f; Math_SmoothStepToAngle(&actor->rot_0F4.x, sp40, 0.5f, 2.0f, 0.0001f); Math_SmoothStepToAngle(&actor->rot_0F4.z, sp38, 0.1f, 5.0f, 0.0001f); break; + case 91: Math_SmoothStepToF(&actor->obj.pos.y, 0.0f, 0.1f, 5.0f, 0.1f); Math_SmoothStepToF(&actor->obj.pos.z, 0.0f, 1.0f, 20.0f, 20.0f); break; + case 90: break; } + Matrix_RotateY(gCalcMatrix, (actor->rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -(actor->rot_0F4.x * M_DTOR), MTXF_APPLY); + sp5C.x = 0.0f; sp5C.y = 0.0f; sp5C.z = actor->fwork[0]; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp5C, &sp50); + actor->vel.x = sp50.x; actor->vel.y = sp50.y; actor->vel.z = sp50.z; + actor->obj.rot.x = -actor->rot_0F4.x; actor->obj.rot.y = actor->rot_0F4.y + 180.0f; actor->obj.rot.z = -actor->rot_0F4.z; @@ -2277,26 +2332,31 @@ void Area6_LevelStart(Player* player) { Vec3f sp74; Vec3f sp68; Vec3f sp5C; - f32 temp1; // 58 - f32 temp2; // 54 - f32 temp3; // 50 - f32 temp4; // 4C + f32 temp1; + f32 temp2; + f32 temp3; + f32 temp4; switch (player->csState) { case 0: gCsFrameCount = 0; + player->csState = 1; + Rand_SetSeed(1, 29000, 9876); + Area6_8018D694(&gActors[1], 0); Area6_8018D694(&gActors[2], 1); Area6_8018D694(&gActors[6], 2); Area6_8018D694(&gActors[7], 3); Area6_8018D694(&gActors[8], 4); Area6_8018D5C8(); + player->pos.x = 0.0f; player->pos.y = 350.0f; player->pos.z = 16000.0f; player->baseSpeed = 30.0f; + if (gTeamShields[TEAM_ID_FALCO] > 0) { Area6_8018D804(&gActors[3], 0); } @@ -2317,16 +2377,20 @@ void Area6_LevelStart(Player* player) { /* fallthrough */ case 1: Math_SmoothStepToF(&gActors[0].obj.pos.y, 0.0f, 0.01f, 10.0f, 0.001f); + if (gCsFrameCount < 490) { sp74.x = 0.0f; sp74.y = 0.0f; sp74.z = D_ctx_80177A48[5]; + Matrix_Translate(gCalcMatrix, 0.0f, 350.0f, D_ctx_80177A48[6], MTXF_NEW); Matrix_RotateY(gCalcMatrix, -(D_ctx_80177A48[4] * M_DTOR), MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &sp74, &sp68); + gCsCamEyeX = sp68.x; gCsCamEyeY = sp68.y; gCsCamEyeZ = sp68.z; + if (gCsFrameCount < 200) { Math_SmoothStepToF(&D_ctx_80177A48[4], 0.0f, 0.05f, 0.56f, 0.001f); gCsCamAtX = gActors[1].obj.pos.x; @@ -2348,29 +2412,37 @@ void Area6_LevelStart(Player* player) { temp1 = fabsf(player->pos.x - gCsCamEyeX) * D_ctx_80177A48[3]; temp2 = fabsf(player->pos.y * player->unk_148 + 50.0f - gCsCamEyeY) * D_ctx_80177A48[3]; temp3 = fabsf(player->pos.z + 400.0f - gCsCamEyeZ) * D_ctx_80177A48[3]; + gCsCamEyeX += temp1; gCsCamEyeY -= temp2; gCsCamEyeZ -= temp3; + temp1 = fabsf(player->pos.x - gCsCamAtX) * D_ctx_80177A48[3]; temp2 = fabsf(player->pos.y * player->unk_148 + 20.0f - gCsCamAtY) * D_ctx_80177A48[3]; temp3 = fabsf(player->pos.z - 51.0f - gCsCamAtZ) * D_ctx_80177A48[3]; + gCsCamAtX += temp1; gCsCamAtY -= temp2; gCsCamAtZ -= temp3; + D_ctx_80177A48[0] = 1.0f; D_ctx_80177A48[1] = 1.0f; } + if (gCsFrameCount == 460) { player->unk_190 = 2.0f; player->unk_194 = 5.0f; AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, player->sfxSource, 0); } + if (gCsFrameCount >= 460) { Math_SmoothStepToF(&player->baseSpeed, 50.0f, 0.1f, 3.0f, 0.01f); } + if (player->pos.z < 30.0f) { player->baseSpeed = player->pos.z = 0.0f; } + if (gCsFrameCount == 540) { gLoadLevelObjects = 1; gLevelStartStatusScreenTimer = 50; @@ -2386,87 +2458,112 @@ void Area6_LevelStart(Player* player) { } break; } + switch (gCsFrameCount) { case 280: AUDIO_PLAY_BGM(NA_BGM_A6_START_DEMO); break; + case 40: Radio_PlayMessage(gMsg_ID_7005, RCID_CAIMAN_AREA6); break; + case 155: sp5C.x = player->pos.x; sp5C.y = player->pos.y; sp5C.z = player->pos.z; Area6_8018D920(&sp5C); break; + case 176: if (gTeamShields[TEAM_ID_FALCO] > 0) { Area6_8018D920(&gActors[3].obj.pos); } break; + case 187: if (gTeamShields[TEAM_ID_SLIPPY] > 0) { Area6_8018D920(&gActors[4].obj.pos); } break; + case 198: if (gTeamShields[TEAM_ID_PEPPY] > 0) { Area6_8018D920(&gActors[5].obj.pos); } break; + case 199: Area6_8018D4E0(&gActors[1]); break; + case 210: Radio_PlayMessage(gMsg_ID_7006, RCID_CAIMAN_AREA6); break; + case 240: gActors[2].state = 3; break; + case 250: gActors[6].state = 3; break; + case 260: gActors[7].state = 3; break; + case 270: gActors[8].state = 3; break; + case 360: Radio_PlayMessage(gMsg_ID_7011, RCID_FALCO); break; + case 430: gActors[5].state = 16; break; + case 440: gActors[4].state = 11; break; + case 450: gActors[3].state = 6; break; + case 480: Play_ClearObjectData(); break; } + Matrix_RotateY(gCalcMatrix, (player->rot.y + player->yRot_114 + 180.0f) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -(player->rot.x * M_DTOR), MTXF_APPLY); + if (player->state_1C8 != PLAYERSTATE_1C8_ACTIVE) { sp74.x = 0.0f; sp74.y = 0.0f; sp74.z = player->baseSpeed; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp74, &sp68); + player->vel.x = sp68.x; player->vel.z = sp68.z; player->vel.y = sp68.y; + player->pos.x += player->vel.x; player->pos.y += player->vel.y; player->pos.z += player->vel.z; player->trueZpos = player->pos.z; } + player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0.001f); Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0.001f); Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0.001f); + Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[1], 50000.0f, 0.001f); Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[1], 50000.0f, 0.001f); Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[1], 50000.0f, 0.001f); @@ -2523,15 +2620,20 @@ void Area6_8018EC38(Actor* actor, s32 arg1) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; actor->obj.id = OBJ_ACTOR_CUTSCENE; + actor->obj.pos.x = sp2C[arg1].x + player->pos.x; actor->obj.pos.y = sp2C[arg1].y + player->pos.y; actor->obj.pos.z = sp2C[arg1].z + player->pos.z; + actor->state = 100; + actor->iwork[11] = 1; actor->fwork[0] = 0.0f; + if (arg1 + 1 != 3) { actor->iwork[14] = arg1 + 2; } + Object_SetInfo(&actor->info, actor->obj.id); AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } @@ -2564,6 +2666,7 @@ void Area6_LevelComplete(Player* player) { Math_SmoothStepToAngle(&player->zRotBank, 0.0f, 0.05f, 1.2f, 0.0001f); Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f); Math_SmoothStepToAngle(&player->aerobaticPitch, 0.0f, 0.1f, 20.0f, 0.0f); + if (gCsFrameCount < 60) { spf90.x = -100.0f; spf90.y = -100.0f; @@ -2581,13 +2684,16 @@ void Area6_LevelComplete(Player* player) { Math_SmoothStepToAngle(&player->rot.x, sp88, 0.1f, 5.0f, 0.0001f); Math_SmoothStepToAngle(&player->rot.z, sp84, 0.1f, 5.0f, 0.0001f); } + if (gCsFrameCount == 60) { player->unk_234 = 0; player->baseSpeed = 0.0f; } + Math_SmoothStepToF(&gCsCamEyeX, gBosses[0].obj.pos.x, 0.05f, 1000.0f, 0.001f); Math_SmoothStepToF(&gCsCamEyeY, gBosses[0].obj.pos.y, 0.05f, 1000.0f, 0.001f); Math_SmoothStepToF(&gCsCamEyeZ, gBosses[0].obj.pos.z + gPathProgress, 0.05f, 10.0f, 0.0001f); + player->cam.eye.x = gCsCamEyeX; player->cam.eye.y = gCsCamEyeY; player->cam.eye.z = gCsCamEyeZ; @@ -2595,13 +2701,16 @@ void Area6_LevelComplete(Player* player) { gCsCamAtX = gBosses[0].obj.pos.x; gCsCamAtY = gBosses[0].obj.pos.y; gCsCamAtZ = gBosses[0].obj.pos.z + gPathProgress; + D_ctx_80177A48[0] = 0.04f; + if (gCsFrameCount == 140) { Area6_8018EA88(actor4); Area6_8018EA88(&gActors[5]); Area6_8018EA88(&gActors[6]); actor4->fwork[4] = 0.5f; } + if (gCsFrameCount >= 200) { if (gFillScreenAlpha == 255) { player->csState = 2; @@ -2617,9 +2726,11 @@ void Area6_LevelComplete(Player* player) { } else { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 0; } + if ((gCsFrameCount == 146) || (gCsFrameCount == 150)) { AUDIO_PLAY_SFX(NA_SE_EN_STAR_EXPLOSION, gActors[5].sfxSource, 4); } + if (gCsFrameCount > 146) { actor4->iwork[3] -= 4; if (actor4->iwork[3] < 0) { @@ -2632,10 +2743,12 @@ void Area6_LevelComplete(Player* player) { Math_SmoothStepToF(&gActors[5].fwork[4], 450.0f, 0.03f, 1000.0f, 1.0f); Math_SmoothStepToF(&gActors[5].scale, 450.0f, 0.03f, 1000.0f, 1.0f); } + if (gCsFrameCount > 160) { Math_SmoothStepToF(&gActors[6].fwork[4], 350.0f, 0.03f, 1000.0f, 1.0f); Math_SmoothStepToF(&gActors[6].scale, 350.0f, 0.03f, 1000.0f, 1.0f); } + if (gCsFrameCount > 140) { actor4->obj.pos.x = gActors[5].obj.pos.x = gActors[6].obj.pos.x = gBosses[0].obj.pos.x; actor4->obj.pos.y = gActors[5].obj.pos.y = gActors[6].obj.pos.y = gBosses[0].obj.pos.y; @@ -2643,6 +2756,7 @@ void Area6_LevelComplete(Player* player) { Math_SmoothStepToF(&actor4->scale, 600.0f, 0.03f, 1000.0f, 0.01f); } break; + case 2: if (gCsFrameCount < 300) { break; @@ -2650,44 +2764,54 @@ void Area6_LevelComplete(Player* player) { if (gCsFrameCount == 300) { player->unk_234 = 1; + player->pos.x = 0.0f; player->pos.y = 200.0f; player->pos.z = 1000.0f; + player->camDist = player->rot.z = player->rot.y = player->rot.x = player->baseSpeed = player->boostSpeed = player->camRoll = player->zRotBank = player->zRotBarrelRoll = player->aerobaticPitch = 0.0f; D_bg_8015F984 = (gPathProgress * 0.00004f) + 0.5f; + Area6_8018EC38(&gActors[1], 0); Area6_8018EC38(&gActors[2], 1); Area6_8018EC38(&gActors[3], 2); Area6_8018EB3C(&gActors[0]); + D_ctx_80177A48[5] = 300.0f; D_ctx_80177A48[4] = 0.0f; D_ctx_80177A48[9] = 50.0f; + player->cam.at.x = gCsCamAtX = player->pos.x; player->cam.at.y = gCsCamAtY = 0.0f; player->cam.at.z = gCsCamAtZ = player->pos.z + 50.0f + gPathProgress; } + if (gFillScreenAlpha != 0) { gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 4; } else { player->csState = 3; } + case 3: Math_SmoothStepToF(&player->pos.y, 0.0f, 0.01f, 10.0f, 0.001f); Math_SmoothStepToF(&gActors[1].obj.pos.y, 40.0f, 0.01f, 10.0f, 0.001f); Math_SmoothStepToF(&gActors[2].obj.pos.y, 40.0f, 0.01f, 10.0f, 0.001f); Math_SmoothStepToF(&gActors[3].obj.pos.y, 88.0f, 0.01f, 10.0f, 0.001f); Math_SmoothStepToF(&gActors[0].obj.pos.y, 60.0f, 0.01f, 2.0f, 0.001f); + if (gCsFrameCount < 1077) { D_ctx_80177A48[1] = player->pos.x; D_ctx_80177A48[3] = player->pos.z; } + if (gCsFrameCount >= 940) { Math_SmoothStepToF(&D_ctx_80177A48[9], 0.0f, 0.01f, 1000.0f, 0.001f); } + if (gCsFrameCount < 1077) { D_ctx_80177A48[4] = D_ctx_80177A48[4] + 0.3f; if (D_ctx_80177A48[4] >= 360.0f) { @@ -2709,12 +2833,15 @@ void Area6_LevelComplete(Player* player) { player->cam.at.y = gCsCamAtY = 0.0f; player->cam.at.z = gCsCamAtZ = D_ctx_80177A48[9] + player->pos.z + gPathProgress; } + sp78.x = 0.0f; sp78.y = 0.0f; sp78.z = D_ctx_80177A48[5]; + Matrix_Translate(gCalcMatrix, D_ctx_80177A48[1], 0.0f, D_ctx_80177A48[3] + gPathProgress, MTXF_NEW); Matrix_RotateY(gCalcMatrix, -(D_ctx_80177A48[4] * M_DTOR), MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &sp78, &sp6C); + player->cam.eye.x = gCsCamEyeX = sp6C.x; player->cam.eye.y = gCsCamEyeY = sp6C.y; player->cam.eye.z = gCsCamEyeZ = sp6C.z; @@ -2725,12 +2852,15 @@ void Area6_LevelComplete(Player* player) { player->unk_194 = 5.0f; AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, player->sfxSource, 0); } + if (gCsFrameCount >= 1090) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; gFillScreenAlphaTarget = 255; gFillScreenAlphaStep = 8; + if (gFillScreenAlpha == 255) { gLeveLClearStatus[LEVEL_AREA_6] = Play_CheckMedalStatus(300) + 1; + for (i = TEAM_ID_FALCO; i < TEAM_ID_MAX; i++) { gPrevPlanetTeamShields[i] = gTeamShields[i]; gPrevPlanetSavedTeamShields[i] = gSavedTeamShields[i]; @@ -2742,49 +2872,63 @@ void Area6_LevelComplete(Player* player) { } } gSavedGoldRingCount[0] = gGoldRingCount[0]; + Audio_StopPlayerNoise(0); Audio_KillSfxBySource(player->sfxSource); + Play_ClearObjectData(); + gNextGameState = GSTATE_PLAY; gNextLevel = LEVEL_VENOM_2; + func_hud_80088564(); } } + if (gCsFrameCount == 1040) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 80); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 80); } break; } + switch (gCsFrameCount) { case 380: AUDIO_PLAY_BGM(NA_BGM_COURSE_CLEAR); break; + case 550: gLevelClearScreenTimer = 100; break; + case 700: gShowLevelClearStatusScreen = 1; break; + case 900: gShowLevelClearStatusScreen = 0; break; + case 940: Radio_PlayMessage(gMsg_ID_7093, RCID_FOX); break; + case 1070: gActors[1].fwork[29] = 5.0f; AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, gActors[1].sfxSource, 0); break; + case 1072: gActors[2].fwork[29] = 5.0f; AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, gActors[2].sfxSource, 0); break; + case 1074: gActors[3].fwork[29] = 5.0f; AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, gActors[3].sfxSource, 0); break; } + if (gCsFrameCount >= 1070) { Math_SmoothStepToF(&gActors[1].fwork[0], 50.0f, 0.1f, 1000.0f, 0.001f); } @@ -2797,23 +2941,30 @@ void Area6_LevelComplete(Player* player) { if (gCsFrameCount >= 1076) { Math_SmoothStepToF(&player->baseSpeed, 50.0f, 0.1f, 1000.0f, 0.001f); } + Matrix_RotateY(gCalcMatrix, (player->rot.y + player->yRot_114 + 180.0f) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -(player->rot.x * M_DTOR), MTXF_APPLY); + sp78.x = 0.0f; sp78.y = 0.0f; sp78.z = player->baseSpeed; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp78, &sp6C); + player->vel.x = sp6C.x; player->vel.z = sp6C.z; player->vel.y = sp6C.y; + player->pos.x += player->vel.x; player->pos.y += player->vel.y; player->pos.z += player->vel.z; player->trueZpos = player->pos.z; player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0.0001f); Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0.0001f); Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0.0001f); + Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0.0001f); Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0.0001f); Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0.0001f); From 837ac7ea83e7655242e23df1b251f69fbc178bc4 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Thu, 16 May 2024 16:08:58 -0300 Subject: [PATCH 102/151] fox_aq styling --- include/sfx.h | 2 +- src/overlays/ovl_i3/fox_aq.c | 243 +++++++++++++++++++++++++++++++---- 2 files changed, 220 insertions(+), 25 deletions(-) diff --git a/include/sfx.h b/include/sfx.h index 45631aff..df789369 100644 --- a/include/sfx.h +++ b/include/sfx.h @@ -371,7 +371,7 @@ typedef enum SfxBankId { #define NA_SE_EN_SHELL_BEAT 0x3140904D #define NA_SE_EN_SHELL_DAMAGE 0x2940804E #define NA_SE_EN_SHELL_DOWN 0x2940A04F -#define NA_SE_EN_KAIBASHIRA_DAMEGE 0x29036050 +#define NA_SE_EN_KAIBASHIRA_DAMAGE 0x29036050 #define NA_SE_EN_EYEFILM_REVIVAL 0x29409051 #define NA_SE_EN_P_GUN_APPEAR 0x29400052 #define NA_SE_EN_P_GUN_DISAPPEAR 0x29000053 // Unreferenced. diff --git a/src/overlays/ovl_i3/fox_aq.c b/src/overlays/ovl_i3/fox_aq.c index 68e1361f..07ca21af 100644 --- a/src/overlays/ovl_i3/fox_aq.c +++ b/src/overlays/ovl_i3/fox_aq.c @@ -206,7 +206,9 @@ s32 D_i3_801C4450; s32 D_i3_801C4454; f32 D_i3_801C4458; f32 D_i3_801C445C; + #include "prevent_bss_reordering.h" + f32 D_i3_801BFB60 = 0.0f; s32 D_i3_801BFB64[11] = { 0, 30, 27, 24, 21, 18, 15, 12, 9, 6, 3, @@ -366,9 +368,8 @@ void Aquas_SpawnDebris(Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32 } void Aquas_801A94EC(Vec3f* pos, ObjectId objId) { - Item* sp18; - Item* item; s32 i; + Item* item; for (i = 0, item = gItems; i < ARRAY_COUNT(gItems); i++, item++) { if (item->obj.status == OBJ_FREE) { @@ -431,18 +432,23 @@ void Aquas_801A9824(void) { s32* var_v0_3; gTeamShields[TEAM_ID_FALCO] = gTeamShields[TEAM_ID_SLIPPY] = gTeamShields[TEAM_ID_PEPPY] = 255; + for (i = 0; i < ARRAY_COUNT(D_i3_801C4190); i++) { D_i3_801C4190[i] = 0; } + for (i = 0; i < ARRAY_COUNT(D_i3_801C41B8); i++) { D_i3_801C41B8[i] = 0.0f; } + for (i = 0; i < AQ_LIMB_MAX; i++) { sBossAQlimbTimers[i] = 0; } + for (i = 0; i < ARRAY_COUNT(D_i3_801C42A0); i++) { D_i3_801C42A0[i] = 0; } + for (i = 0; i < ARRAY_COUNT(D_i3_801C4308); i++) { D_i3_801C4308[i] = 0; } @@ -487,26 +493,32 @@ void Aquas_801A99D4(Player* player) { if (D_i3_801C41B8[25] > 4600.0f) { D_i3_801C41B8[25] = 4600.0f; } + D_i3_801C41B8[12] -= 2.0f; if (D_i3_801C41B8[12] < 0.0f) { D_i3_801C41B8[12] = 0.0f; } + D_i3_801C41B8[13] -= 6.0f; if (D_i3_801C41B8[13] < 3.0f) { D_i3_801C41B8[13] = 3.0f; } + D_i3_801C41B8[14] -= 6.0f; if (D_i3_801C41B8[14] < 5.0f) { D_i3_801C41B8[14] = 5.0f; } + D_i3_801C41B8[15] -= 1.0f; if (D_i3_801C41B8[15] < 0.0f) { D_i3_801C41B8[15] = 0.0f; } + D_i3_801C41B8[16] -= 1.5f; if (D_i3_801C41B8[16] < 0.0f) { D_i3_801C41B8[16] = 0.0f; } + D_i3_801C41B8[17] -= 2.5f; if (D_i3_801C41B8[17] < 0.0f) { D_i3_801C41B8[17] = 0.0f; @@ -611,6 +623,7 @@ void Aquas_801A9ED0(Player* player) { D_i3_801C4190[4] = i; D_i3_801C4190[1] = OBJ_BOSS_AQ; } + if (((j == 129) && (gBosses[0].swork[AQ_SWK_8] == 0)) || ((j == 139) && (gBosses[0].swork[AQ_SWK_9] == 0)) || ((j == 119) && (gBosses[0].swork[AQ_SWK_12] == 0))) { @@ -620,6 +633,7 @@ void Aquas_801A9ED0(Player* player) { } } } + if ((sp8C != D_i3_801C4190[4]) && (D_i3_801C41B8[5] == 3.0f)) { AUDIO_PLAY_SFX(NA_SE_MAR_LOCKON, gDefaultSfxSource, 4); D_i3_801C41B8[5] = 20.0f; @@ -638,6 +652,7 @@ void Aquas_801AA20C(void) { Matrix_Push(&gGfxMatrix); Math_SmoothStepToF(&D_i3_801C41B8[5], 3.0f, 1.0f, 4.0f, 0.0001f); RCP_SetupDL(&gMasterDisp, 0x3D); + if (D_i3_801C4190[3] == 0) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); var_fs1 = -10.0f; @@ -748,6 +763,7 @@ void Aquas_801AA4BC(Player* player) { if (player->barrelInputTimerR != 0) { player->barrelInputTimerR--; } + if (player->timer_214 != 0) { player->timer_214--; } @@ -762,6 +778,7 @@ void Aquas_801AA4BC(Player* player) { player->barrelInputTimerL = player->barrelInputTimerR = 0; player->unk_150 = 1.5f; player->zRotBarrelRoll += player->rollRate; + if (player->timer_1E8 == 0) { if (player->rollRate > 0) { player->rollRate -= 5; @@ -803,13 +820,16 @@ void Aquas_UpdateCamera(Player* player) { gCsCamEyeX = (player->pos.x - player->xPath) * (600.0f / player->pathWidth); gCsCamEyeX -= player->unk_030 * 1.5f; gCsCamEyeX += player->xPath + D_i3_801C41B8[9]; + gCsCamEyeY = player->pos.y * (740.0f / player->pathHeight); gCsCamEyeY -= player->unk_02C - 50.0f; gCsCamEyeY += player->yPath; + gCsCamAtX = (player->pos.x - player->xPath - D_i3_801C41B8[9]) * (600.0f / player->pathWidth); gCsCamAtX += player->xShake * -2.0f; gCsCamAtX -= player->unk_030 * 0.5f; gCsCamAtX += player->xPath; + gCsCamAtY = (player->pos.y - player->yPath) * (750.0f / player->pathHeight); gCsCamAtY += player->xRock * 10.0f; gCsCamAtY -= player->unk_02C * -0.55f; @@ -1031,9 +1051,12 @@ void Aquas_BlueMarineMove(Player* player) { if (player->pos.y < (gWaterLevel + 50.0f)) { Matrix_RotateY(gCalcMatrix, (player->rot.y + player->yRot_114) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, player->rot.x * M_DTOR, MTXF_APPLY); + sp8C.x = sp8C.y = 0.0f; sp8C.z = 70.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp8C, &sp80); + if (player->boostSpeed > 1.0f) { player->unk_178 -= 30.0f; Aquas_801AC8A8(player->pos.x + RAND_FLOAT_CENTERED(10.0f) + sp80.x, @@ -1100,6 +1123,7 @@ void Aquas_801ABA40(PlayerShot* shot) { shot->vec_2C.x = (shot->obj.pos.y * 0.01f) + 1.2f; shot->vec_2C.y = (shot->obj.pos.y * 0.003f) + 0.6f; shot->vec_2C.z = (shot->obj.pos.y * 0.001f) + 0.6f; + shot->unk_58 = (shot->obj.pos.y * -0.24f) + 150.0f; if (shot->unk_58 < 30) { shot->unk_58 = 30; @@ -1118,10 +1142,13 @@ void Aquas_801ABA40(PlayerShot* shot) { sp7C = shot->obj.pos.x - D_i3_801C41B8[0]; sp78 = shot->obj.pos.y - D_i3_801C41B8[1]; sp74 = shot->obj.pos.z - D_i3_801C41B8[2]; + sp6C = Math_RadToDeg(Math_Atan2F(sp7C, sp74)); sp70 = Math_RadToDeg(-Math_Atan2F(sp78, sqrtf(SQ(sp7C) + SQ(sp74)))); + Math_SmoothStepToAngle(&shot->obj.rot.y, sp6C, 1.0f, 100.0f, 0.00001f); Math_SmoothStepToAngle(&shot->obj.rot.x, sp70, 1.0f, 100.0f, 0.00001f); + if (shot->timer < 2) { if (D_i3_801C4458 < -30.0f) { D_i3_801C4458 += 20.0f; @@ -1136,18 +1163,23 @@ void Aquas_801ABA40(PlayerShot* shot) { if (shot->unk_54 == 0) { shot->unk_54 = -30.0f; } - if (((gGameFrameCount % 4) == 0)) { + + if ((gGameFrameCount % 4) == 0) { Math_SmoothStepToF(&shot->unk_54, D_i3_801C4458, 0.1f, 50.0f, 0.0001f); } Matrix_RotateY(gCalcMatrix, shot->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, shot->obj.rot.x * M_DTOR, MTXF_APPLY); + sp60.x = sp60.y = 0.0f; sp60.z = shot->unk_54; + Matrix_MultVec3f(gCalcMatrix, &sp60, &sp54); + shot->vel.x = sp54.x; shot->vel.y = sp54.y; shot->vel.z = sp54.z; + if ((shot->obj.pos.y < (gGroundHeight + 30.0f)) && (shot->vel.y < 0.0f) && (D_i3_801C4190[3] != 0)) { shot->vel.y = 0.0f; } @@ -1304,6 +1336,7 @@ void Aquas_BlueMarineShoot(Player* player) { gLight3R += 4; gLight3G += 3; gLight3B += 2; + if (gLight3R >= 255) { gLight3R = 255; } @@ -1330,6 +1363,7 @@ void Aquas_801AC7C8(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2, s3 effect->scale2 = scale2 * 0.2f; effect->unk_46 = 50; effect->unk_60.y = gPlayer[0].rot.y + gPlayer[0].yRot_114; + if (effect->state == 2) { effect->unk_46 = 100; } @@ -1480,21 +1514,27 @@ void Aquas_BlueMarineBoost(Player* player) { if (player->boostMeter == 0) { AUDIO_PLAY_SFX(NA_SE_MARINE_BOOST, player->sfxSource, 4); } + player->boostMeter += 3.0f; if (player->boostMeter > 90.0f) { player->boostMeter = 90.0f; player->boostCooldown = 1; } + player->boostSpeed += 2.0f; if (player->boostSpeed > 10.0f) { player->boostSpeed = 10.0f; } + Math_SmoothStepToF(&D_i3_801C41B8[27], 10.0f, 0.1f, 2.0f, 0.00001f); Math_SmoothStepToF(&player->camDist, -200.0f, 0.1f, D_i3_801C41B8[27], 0.00001f); + player->sfx.boost = 1; + Math_SmoothStepToF(&D_ctx_801779A8[0], 50.0f, 1.0f, 10.0f, 0.0f); } else { D_i3_801C41B8[27] = 0.0f; + if (player->boostMeter > 0.0f) { player->boostMeter -= 0.50f; if (player->boostMeter <= 0.0f) { @@ -1502,6 +1542,7 @@ void Aquas_BlueMarineBoost(Player* player) { player->boostCooldown = 0; } } + if (player->boostSpeed > 0.0f) { player->boostSpeed -= 1.0f; if (player->boostSpeed < 0.0f) { @@ -1515,23 +1556,29 @@ void Aquas_BlueMarineBoost(Player* player) { void Aquas_BlueMarineBrake(Player* player) { player->sfx.brake = 0; + if ((gBrakeButton[player->num] & gInputHold->button) && (player->unk_230 == 0) && (player->state_1C8 != PLAYERSTATE_1C8_U_TURN) && (player->boostCooldown == 0)) { if (player->boostMeter == 0) { AUDIO_PLAY_SFX(NA_SE_MARINE_BRAKE, player->sfxSource, 4); } + player->boostMeter += 3.0f; if (player->boostMeter > 90.0f) { player->boostMeter = 90.0f; player->boostCooldown = 1; } + player->boostSpeed -= 1.0f; if (player->boostSpeed < -20.0f) { player->boostSpeed = -20.0f; } + Math_SmoothStepToF(&D_i3_801C41B8[28], 10.0f, 1.0f, 2.0f, 0.00001f); Math_SmoothStepToF(&player->camDist, 180.0f, 0.1f, D_i3_801C41B8[28], 0.0f); + player->sfx.brake = 1; + Math_SmoothStepToF(&D_ctx_801779A8[0], 25.0f, 1.0f, 5.0f, 0.0f); } else { if (player->boostMeter > 0.0f) { @@ -1630,7 +1677,9 @@ void Aquas_801AD6C0(Actor* actor) { actor->dmgType = DMG_NONE; actor->timer_0C6 = 15; actor->health -= actor->damage; + AUDIO_PLAY_SFX(NA_SE_EN_SANADA_DAMAGE, actor->sfxSource, 4); + if (actor->health <= 0) { actor->timer_0C2 = 30000; actor->state = 2; @@ -1655,10 +1704,12 @@ void Aquas_801AD6C0(Actor* actor) { Math_RadToDeg(Math_Atan2F(sp80, sp78)); sp70 = sqrtf(SQ(sp80) + SQ(sp78)); Math_RadToDeg(-Math_Atan2F(sp7C, sp70)); + actor->fwork[0] += (actor->iwork[0] + 1) * 5.0f; actor->fwork[1] += 10.0f + (actor->iwork[0] + 1) * 5.0f; actor->fwork[5] = (actor->iwork[0] + 1) * 0.2f; actor->fwork[6] = (actor->iwork[0] + 1) * 0.2f; + sp7C = SIN_DEG(actor->fwork[0]) * sp70 * actor->fwork[5]; sp74 = COS_DEG(actor->fwork[1]) * sp70 * actor->fwork[6]; sp80 = COS_DEG(actor->rot_0F4.y) * sp74; @@ -1733,9 +1784,11 @@ void Aquas_801AD6C0(Actor* actor) { break; } D_i3_801C27C0 = &D_i3_801C27C8[50 * actor->iwork[0] + actor->counter_04E]; + D_i3_801C27C0->pos.x = actor->obj.pos.x; D_i3_801C27C0->pos.y = actor->obj.pos.y; D_i3_801C27C0->pos.z = actor->obj.pos.z; + D_i3_801C27C0->rot.x = actor->rot_0F4.x; D_i3_801C27C0->rot.y = actor->rot_0F4.y; D_i3_801C27C0->rot.z = actor->rot_0F4.z; @@ -1843,6 +1896,7 @@ void Aquas_801AE3D8(Actor* actor) { if (actor->scale <= 0.5f) { actor->scale = 0.5f; } + if (gBosses[0].timer_052 == 0) { actor->health = 0; if (actor->info.hitbox[10] != 116.0f) { @@ -1857,7 +1911,8 @@ void Aquas_801AE3D8(Actor* actor) { actor->timer_0C6 = 30; actor->iwork[1] = 0; D_i3_801C4308[79] -= 5.0f; - AUDIO_PLAY_SFX(NA_SE_EN_KAIBASHIRA_DAMEGE, actor->sfxSource, 4); + + AUDIO_PLAY_SFX(NA_SE_EN_KAIBASHIRA_DAMAGE, actor->sfxSource, 4); if (D_i3_801C4308[79] <= -28.0f) { D_i3_801C4308[79] = -28.0f; @@ -1866,7 +1921,9 @@ void Aquas_801AE3D8(Actor* actor) { if (D_i3_801C4308[10] <= -23.0f) { if (gBosses[0].timer_052 == 0) { gBosses[0].timer_052 = 72; + actor->health = 10; + for (i = 0; i < ARRAY_COUNT(gActors); i++) { if ((gActors[i].obj.id == OBJ_ACTOR_256) && (actor->index != gActors[i].index)) { gActors[i].health = 10; @@ -1887,7 +1944,9 @@ void Aquas_801AE3D8(Actor* actor) { actor->iwork[23] &= 1; } else if (actor->damage == 31) { actor->health -= actor->damage; + Radio_PlayMessage(gMsg_ID_15130, RCID_FALCO); + if (actor->health <= 0) { gBosses[0].swork[AQ_SWK_0] = 2; actor->health = 0; @@ -1903,7 +1962,7 @@ void Aquas_801AE3D8(Actor* actor) { break; case 1: - if (((gGameFrameCount % 2) == 0)) { + if ((gGameFrameCount % 2) == 0) { func_effect_8007C120(actor->obj.pos.x, actor->fwork[0] + actor->obj.pos.y, actor->obj.pos.z, actor->vel.x, actor->vel.y, actor->vel.z, 0.1f, 10); func_effect_8007C120(actor->obj.pos.x, actor->obj.pos.y + (actor->fwork[0] * -1.0f), @@ -1934,6 +1993,7 @@ void Aquas_801AE3D8(Actor* actor) { if (actor->timer_0BC == 0) { Math_SmoothStepToF(&actor->fwork[3], 0.0f, 0.1f, 2.0f, 0); Math_SmoothStepToF(&actor->scale, 0.0f, actor->fwork[3], 10.0f, 0); + if (actor->scale <= 0.2f) { func_effect_8007BC7C(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 50.0f); func_effect_8007BC7C(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 50.0f); @@ -1998,7 +2058,7 @@ void Aquas_801AEB44(Actor* actor) { for (i = 0; i < 28; i += 1) { D_i3_801C3A88[actor->iwork[0]][gSysFrameCount % 2][i].n.ob[0] = - temp_v1_2[i].v.ob[0] + (s16) ((((var_t5[i].n.ob[0] - temp_v1_2[i].n.ob[0]) * var_t1) / 2) * var_fv0); + temp_v1_2[i].n.ob[0] + (s16) ((((var_t5[i].n.ob[0] - temp_v1_2[i].n.ob[0]) * var_t1) / 2) * var_fv0); D_i3_801C3A88[actor->iwork[0]][gSysFrameCount % 2][i].n.ob[1] = temp_v1_2[i].n.ob[1] + (((var_t5[i].n.ob[1] - temp_v1_2[i].n.ob[1]) * var_t1) / 2); D_i3_801C3A88[actor->iwork[0]][gSysFrameCount % 2][i].n.ob[2] = @@ -2019,6 +2079,7 @@ void Aquas_801AEB44(Actor* actor) { Matrix_Scale(gGfxMatrix, actor->fwork[1] - 0.25f + ((1.5f - actor->scale) * 0.5f), actor->scale, actor->fwork[1], MTXF_APPLY); + if (actor->state != 0) { RCP_SetupDL(&gMasterDisp, 0x20); } else if (gBosses[0].swork[AQ_SWK_0] == 1) { @@ -2031,6 +2092,7 @@ void Aquas_801AEB44(Actor* actor) { } Matrix_SetGfxMtx(&gMasterDisp); + gDPSetTextureLUT(gMasterDisp++, G_TT_RGBA16); gDPLoadTLUT_pal256(gMasterDisp++, D_AQ_6008FC8); gDPLoadTextureBlock(gMasterDisp++, D_AQ_6008EC8, G_IM_FMT_CI, G_IM_SIZ_8b, 16, 16, 0, G_TX_NOMIRROR | G_TX_WRAP, @@ -2106,9 +2168,11 @@ void Aquas_801AFA5C(Actor* actor) { if (actor->state < 4) { i = actor->iwork[0]; + actor->obj.pos.x = D_i3_801C4308[1 + i]; actor->obj.pos.y = D_i3_801C4308[4 + i]; actor->obj.pos.z = D_i3_801C4308[7 + i]; + actor->obj.rot.x = D_i3_801BFBBC[i] + D_i3_801C4308[10]; if (actor->obj.rot.x < 0.0f) { actor->obj.rot.x += 359.0f; @@ -2119,15 +2183,20 @@ void Aquas_801AFA5C(Actor* actor) { actor->obj.rot.y = D_i3_801BFBC8[i]; actor->obj.rot.z = D_i3_801BFBD4[i]; } + if (actor->dmgType != DMG_NONE) { actor->dmgType = DMG_NONE; + if ((gBosses[0].state >= 10) && (actor->health != 0) && (actor->damage == 31)) { actor->timer_0BE = 70; actor->health -= actor->damage; + AUDIO_PLAY_SFX(NA_SE_EN_WT_DAMAGE_S, actor->sfxSource, 4); + if (actor->timer_0C6 == 0) { actor->timer_0C6 = 70; } + if (actor->health <= 0) { actor->health = actor->timer_0BE = 0; BonusText_Display(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 200.0f, 3); @@ -2138,13 +2207,16 @@ void Aquas_801AFA5C(Actor* actor) { } } } + if (D_i3_801C42A0[23] == 0) { Object_Kill(&actor->obj, actor->sfxSource); } + if (actor->timer_0C6 & 1) { func_effect_8007C120(actor->obj.pos.x, actor->obj.pos.y + 100.0f, actor->obj.pos.z + RAND_FLOAT(500.0f), actor->vel.x, actor->vel.y, actor->vel.z, actor->scale * 0.2f, 10); } + switch (actor->state) { case 0: if (gBosses[0].state >= 10) { @@ -2153,6 +2225,7 @@ void Aquas_801AFA5C(Actor* actor) { actor->state++; } break; + case 1: if ((actor->timer_0BC == 0) && (fabsf(D_i3_801C4308[10]) < 5.0f) && (actor->timer_0C6 == 0)) { i = actor->iwork[3] - 1; @@ -2168,6 +2241,7 @@ void Aquas_801AFA5C(Actor* actor) { } } break; + case 2: Math_SmoothStepToF(&actor->fwork[0], 1.0f, 0.2f, 0.5f, 0.01f); actor->fwork[2] = actor->fwork[1] = actor->fwork[0]; @@ -2175,6 +2249,7 @@ void Aquas_801AFA5C(Actor* actor) { actor->state = 3; } break; + case 3: i = actor->iwork[2] * 4; Math_SmoothStepToF(&actor->fwork[0], D_i3_801BFBE0[i], D_i3_801BFBE0[i + 1], D_i3_801BFBE0[i + 2], @@ -2191,6 +2266,7 @@ void Aquas_801AFA5C(Actor* actor) { actor->iwork[3] = 0; i = -1; } + if ((actor->iwork[1] == 13) && (i < 0)) { AUDIO_PLAY_SFX(NA_SE_EN_SANADA_APPEAR, actor->sfxSource, 4); for (i = 0, sp48 = gActors; i < ARRAY_COUNT(gActors); i++, sp48++) { @@ -2229,6 +2305,7 @@ void Aquas_801AFA5C(Actor* actor) { sp48->obj.status = OBJ_FREE; } } + if (actor->iwork[1] == D_i3_801BFC70[actor->iwork[2]]) { actor->iwork[2]++; if (actor->iwork[2] >= 3) { @@ -2239,12 +2316,14 @@ void Aquas_801AFA5C(Actor* actor) { } } break; + case 4: actor->state = 5; actor->vel.y = 10.0f; actor->vel.z = 5.0f; AUDIO_PLAY_SFX(NA_SE_EN_WT_BROKEN, actor->sfxSource, 4); break; + case 5: if (actor->obj.pos.y > (gGroundHeight + 70.0f)) { Math_SmoothStepToF(&actor->fwork[0], 1.0f, 0.1f, 0.2f, 0.0001f); @@ -2252,10 +2331,12 @@ void Aquas_801AFA5C(Actor* actor) { Math_SmoothStepToF(&actor->fwork[2], 1.0f, 0.1f, 0.2f, 0.0001f); Math_SmoothStepToF(&actor->vel.y, -10.0f, 0.1f, 1.0f, 0.001f); Math_SmoothStepToAngle(&actor->obj.rot.x, 80.0f, 0.1f, 1.0f, 0.001f); + if (((gGameFrameCount % 2) == 0)) { Aquas_801AC8A8(actor->obj.pos.x + RAND_FLOAT_CENTERED(300.0f), actor->obj.pos.y + RAND_FLOAT_CENTERED(200.0f), actor->obj.pos.z, 4.0f, 2); } + if (actor->timer_0C6 == 0) { actor->timer_0C6 = 70; } @@ -2264,6 +2345,7 @@ void Aquas_801AFA5C(Actor* actor) { } else { Math_SmoothStepToF(&actor->fwork[6], 30.0f, 0.1f, 12.0f, 0.1f); sp70 = RAND_FLOAT(30.0f); + if (((gGameFrameCount % 4) == 0)) { for (i = 0; i < 36; i += 2) { sp6C = __sinf(sp70 + (i * 10.0f * M_DTOR)) * actor->fwork[6] * 10.0f; @@ -2272,27 +2354,33 @@ void Aquas_801AFA5C(Actor* actor) { func_effect_8007B8F8(actor->obj.pos.x + sp6C, pad64, actor->obj.pos.z + sp68, 20.0f); } } + if (actor->vel.z != 0) { actor->vel.y = actor->vel.z = 0.0f; AUDIO_PLAY_SFX(NA_SE_EN_WT_BOUND_M, actor->sfxSource, 4); } + if (actor->timer_0C0 == 1) { AUDIO_PLAY_SFX(NA_SE_EN_WT_DISAPPEAR_S, actor->sfxSource, 4); } + if (actor->timer_0C0 == 0) { if (actor->timer_0BE == 0) { actor->timer_0BE = 10; } + Math_SmoothStepToF(&actor->fwork[0], 0.0f, 0.05f, 0.1f, 0.001f); Math_SmoothStepToF(&actor->fwork[1], 0.0f, 0.05f, 0.1f, 0.001f); Math_SmoothStepToF(&actor->fwork[2], 0.0f, 0.05f, 0.1f, 0.001f); Math_SmoothStepToF(&actor->obj.pos.y, -300.0f, 0.1f, 1.0f, 0.001f); + if (actor->fwork[0] <= 0.2f) { for (i = 0; i < 5; i++) { func_effect_8007BC7C(actor->obj.pos.x, gGroundHeight + 50.0f, actor->obj.pos.z, 20.0f); Aquas_801AC8A8(actor->obj.pos.x + RAND_FLOAT_CENTERED(300.0f), gGroundHeight + (i * 20.0f), actor->obj.pos.z, 5.0f, 2); } + if (gBosses[0].state < 13) { gBosses[0].state++; if (gBosses[0].state == 13) { @@ -2305,6 +2393,7 @@ void Aquas_801AFA5C(Actor* actor) { } break; } + if (actor->timer_0BE != 0) { actor->fwork[3] = SIN_DEG(actor->timer_0BE * 20.0f) * Aquas_801A958C(actor->timer_0BE, 20.0f); actor->fwork[4] = SIN_DEG(actor->timer_0BE * 20.0f) * Aquas_801A958C(actor->timer_0BE, 20.0f); @@ -2319,6 +2408,7 @@ void Aquas_801B099C(Actor* actor) { Matrix_RotateZ(gGfxMatrix, (actor->obj.rot.z + actor->fwork[5]) * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, actor->fwork[0], actor->fwork[1], actor->fwork[2], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); + if ((actor->timer_0C6 % 2) == 0) { RCP_SetupDL(&gMasterDisp, 0x39); } else { @@ -2405,6 +2495,7 @@ void Aquas_801B0B60(Actor* actor) { func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_SEA_EXPLOSION_S); break; } + if (((gGameFrameCount % 16) == 0)) { Aquas_801AC8A8(actor->obj.pos.x + RAND_FLOAT_CENTERED(10.0f), actor->obj.pos.y + RAND_FLOAT_CENTERED(10.0f), actor->obj.pos.z + RAND_FLOAT_CENTERED(10.0f), 2.0f, 1); @@ -2462,7 +2553,9 @@ void Aquas_BossAq_Init(BossAQ* this) { gBossActive = true; gBossFrameCount = 0; + this->health = 150; + for (i = 0, actor = gActors; i < 2; actor++) { if (actor->obj.status == OBJ_FREE) { Actor_Initialize(actor); @@ -2476,6 +2569,7 @@ void Aquas_BossAq_Init(BossAQ* this) { Object_SetInfo(&actor->info, actor->obj.id); } } + D_i3_801C42A0[23] = 2; D_i3_801C42A0[0] = 255; D_i3_801C42A0[9] = D_i3_801C0058; @@ -2485,21 +2579,28 @@ void Aquas_BossAq_Init(BossAQ* this) { D_i3_801C42A0[14] = 11; this->fwork[AQ_FWK_1] = 10.0f; + D_i3_801C4308[79] = D_i3_801C4308[10] = D_i3_801C4308[80] = D_i3_801C4308[11] = 0.0f; D_i3_801C4308[58] = D_i3_801C4308[65] = D_i3_801C4308[72] = 1.0f; + this->fwork[AQ_FWK_8] = this->fwork[AQ_FWK_9] = this->fwork[AQ_FWK_10] = 1.0f; this->swork[AQ_SWK_14] = this->swork[AQ_SWK_15] = this->swork[AQ_SWK_16] = 255; this->swork[AQ_SWK_17] = 10; + D_i3_801C42A0[1] = D_i3_801C42A0[2] = D_i3_801C42A0[4] = D_i3_801C42A0[5] = (D_i3_801C42A0[6] = D_i3_801C42A0[7] = 0) ^ 0; // fake for (i = 0; i < AQ_LIMB_MAX; i++) { sBossAQlimbTimers[i] = 0; } + this->obj.pos.y += 400.0f; + this->info.hitbox[119] = 1028.0f; this->info.hitbox[169] = 800.0f; + this->swork[AQ_SWK_8] = this->swork[AQ_SWK_9] = 2; + AUDIO_PLAY_SFX(NA_SE_EN_SHELL_BEAT, this->sfxSource, 4); } @@ -3612,30 +3713,37 @@ void Aquas_801B4E94(s32 limbIndex, Vec3f* rot, void* thisx) { Matrix_MultVec3f(gCalcMatrix, &sp24, this->vwork); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[8]); break; + case 2: Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[1]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[9]); break; + case 3: Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[2]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[10]); break; + case 4: Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[3]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[11]); break; + case 5: Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[4]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[12]); break; + case 6: Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[5]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[13]); break; + case 7: Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[6]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[14]); break; + case 8: Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[7]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[15]); @@ -3646,11 +3754,11 @@ void Aquas_801B4E94(s32 limbIndex, Vec3f* rot, void* thisx) { // OBJ_ACTOR_261 draw void Aquas_801B504C(Actor* actor) { - Vec3f sp30[30]; + Vec3f jointTable[30]; Matrix_Scale(gCalcMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY); - Animation_GetFrameData(&D_AQ_6005954, actor->animFrame, sp30); - Animation_DrawSkeleton(3, D_AQ_6005A80, sp30, Aquas_801B4DDC, Aquas_801B4E94, actor, gCalcMatrix); + Animation_GetFrameData(&D_AQ_6005954, actor->animFrame, jointTable); + Animation_DrawSkeleton(3, D_AQ_6005A80, jointTable, Aquas_801B4DDC, Aquas_801B4E94, actor, gCalcMatrix); } f32 D_i3_801C025C[2] = { 120.0f, 0.0f }; @@ -3852,9 +3960,11 @@ bool Aquas_801B5C18(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th if (sp6C != 1.0f) { Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, MTXF_APPLY); + if (*dList != NULL) { Matrix_MultVec3f(gCalcMatrix, &sp4C, &sp58); Display_SetSecondLight(&sp58); @@ -3882,26 +3992,32 @@ void Aquas_801B5F68(s32 limbIndex, Vec3f* rot, void* thisx) { Matrix_MultVec3f(gCalcMatrix, &sp3C, &this->vwork[0]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[9]); break; + case 2: Matrix_MultVec3f(gCalcMatrix, &sp3C, &this->vwork[1]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[10]); break; + case 3: Matrix_MultVec3f(gCalcMatrix, &sp3C, &this->vwork[2]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[11]); break; + case 4: Matrix_MultVec3f(gCalcMatrix, &sp3C, &this->vwork[3]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[12]); break; + case 5: Matrix_MultVec3f(gCalcMatrix, &sp3C, &this->vwork[4]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[13]); break; + case 6: Matrix_MultVec3f(gCalcMatrix, &sp3C, &this->vwork[5]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[14]); break; + case 7: sp30.x = this->fwork[11]; sp30.y = 0.0f; @@ -3911,14 +4027,17 @@ void Aquas_801B5F68(s32 limbIndex, Vec3f* rot, void* thisx) { this->fwork[9] = gGroundHeight; this->fwork[10] = sp24.z; break; + case 8: Matrix_MultVec3f(gCalcMatrix, &sp3C, &this->vwork[6]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[15]); break; + case 9: Matrix_MultVec3f(gCalcMatrix, &sp3C, &this->vwork[7]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[16]); break; + case 16: Matrix_MultVec3f(gCalcMatrix, &sp3C, &this->vwork[8]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[17]); @@ -3991,6 +4110,7 @@ void Aquas_801B638C(Actor* actor) { func_effect_80081A8C(actor->obj.pos.x + RAND_FLOAT(i * 15.0f), actor->obj.pos.y + RAND_FLOAT(i * 3.0f), actor->obj.pos.z + RAND_FLOAT(i * 5.0f), 1.0f + RAND_FLOAT(1.0f), 7); } + actor->itemDrop = DROP_SILVER_RING_50p; if (actor->iwork[16] != 0) { actor->itemDrop = DROP_GOLD_RING_1; @@ -4005,13 +4125,16 @@ void Aquas_801B638C(Actor* actor) { actor->fwork[5] = (actor->obj.pos.y * 0.01f) + 2.5f; actor->fwork[6] = (actor->obj.pos.y * 0.003f) + 0.8f; actor->fwork[7] = (actor->obj.pos.y * 0.001f) + 0.8f; + actor->iwork[12] = (actor->obj.pos.y * -0.24f) + 150.0f; if (actor->iwork[12] < 30.0f) { actor->iwork[12] = 30; } + actor->fwork[1] = (actor->obj.pos.y * 0.0032f) + 1.0f; actor->fwork[2] = (actor->obj.pos.y * 0.0032f) + 1.5f; actor->fwork[3] = (actor->obj.pos.y * 0.0032f) + 2.0f; + actor->fwork[11] = actor->obj.pos.y + 300.0f; if (actor->fwork[11] > 1200.0f) { actor->fwork[11] = 1200.0f; @@ -4032,15 +4155,21 @@ void Aquas_801B638C(Actor* actor) { actor->vwork[9 + i].y = actor->obj.rot.y; actor->vwork[9 + i].z = actor->obj.rot.z; } + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + sp8C.x = sp8C.y = 0.0f; sp8C.z = -1400.0f; + if (actor->iwork[14] != 0) { sp8C.z = -5000.0f; } + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp8C, &sp80); + actor->fwork[15] = actor->obj.pos.x + sp80.x; actor->fwork[16] = actor->obj.pos.z + sp80.z; + actor->state = 1; break; @@ -4120,7 +4249,9 @@ void Aquas_801B638C(Actor* actor) { if ((actor->health != 0) && (actor->dmgPart == 0)) { actor->health -= actor->damage; actor->timer_0C6 = 30; + AUDIO_PLAY_SFX(NA_SE_EN_AQ_ZAKO_DAMAGE, actor->sfxSource, 4); + if (actor->health <= 0) { actor->health = 0; BonusText_Display(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 200.0f, 3); @@ -4138,6 +4269,7 @@ void Aquas_801B6E54(Actor* actor) { actor->vwork[0 + i].x = actor->obj.pos.x; actor->vwork[0 + i].y = actor->obj.pos.y; actor->vwork[0 + i].z = actor->obj.pos.z; + actor->vwork[15 + i].x = actor->obj.rot.x; actor->vwork[15 + i].y = actor->obj.rot.y; actor->vwork[15 + i].z = actor->obj.rot.z; @@ -4180,28 +4312,34 @@ void Aquas_801B6FF8(Actor* actor) { case 0: if (actor->timer_0BC == 0) { actor->timer_0BC = 200; + actor->fwork[1] = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(800.0f); actor->fwork[2] = gPlayer[0].pos.y + 50.0f + RAND_FLOAT(100.0f); actor->fwork[3] = gPlayer[0].trueZpos - 1500.0f; + if (actor->fwork[1] > 700.0f) { actor->fwork[1] = 700.0f; } if (actor->fwork[1] < -700.0f) { actor->fwork[1] = -700.0f; } + if (Rand_ZeroOne() < 0.2f) { actor->fwork[3] = gPlayer[0].trueZpos - 800.0f; actor->fwork[1] = gPlayer[0].pos.x; actor->fwork[2] = gPlayer[0].pos.y + 50.0f; } + if (fabsf(actor->fwork[4] - actor->obj.pos.z) >= 20000.0f) { actor->fwork[3] = -10000.0f; } } actor->fwork[3] += gPlayer[0].vel.z; + temp_dx = actor->fwork[1] - actor->obj.pos.x; temp_dy = actor->fwork[2] - actor->obj.pos.y; temp_dz = actor->fwork[3] - actor->obj.pos.z; + spA8 = Math_RadToDeg(Math_Atan2F(temp_dx, temp_dz)); temp_dz = Math_RadToDeg(-Math_Atan2F(temp_dy, sqrtf(SQ(temp_dx) + SQ(temp_dz)))); temp_dy = Math_SmoothStepToAngle(&actor->obj.rot.y, spA8, 0.1f, 1.0f, 0); @@ -4211,27 +4349,36 @@ void Aquas_801B6FF8(Actor* actor) { if (temp_dy < 0.0f) { temp_dz = 20.0f; } + Math_SmoothStepToAngle(&actor->obj.rot.z, temp_dz, 0.1f, 1.0f, 0.f); Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); + sp9C.x = sp9C.y = 0.0f; sp9C.z = 10.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp9C, &sp90); + actor->vel.x = sp90.x; actor->vel.y = sp90.y; actor->vel.z = sp90.z - 20.0f; break; + case 1: Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); + sp9C.y = sp9C.x = 0.0f; sp9C.z = 19.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp9C, &sp90); + actor->vel.x = sp90.x; actor->vel.y = sp90.y; actor->vel.z = sp90.z; break; } + if (((gGameFrameCount % 4) == 0)) { for (i = 0; i < 3; i++) { func_effect_80081A8C(actor->obj.pos.x + RAND_FLOAT_CENTERED(70.0f), @@ -4283,59 +4430,73 @@ void Aquas_801B7754(s32 limbIndex, Vec3f* rot, void* thisx) { case 1: Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[0]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[15]); - return; + break; + case 2: Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[1]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[16]); - return; + break; + case 3: Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[2]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[17]); - return; + break; + case 4: Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[3]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[18]); - return; + break; + case 5: Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[4]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[19]); - return; + break; + case 6: Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[5]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[20]); - return; + break; + case 7: Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[6]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[21]); - return; + break; + case 8: Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[7]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[22]); - return; + break; + case 9: Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[8]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[23]); - return; + break; + case 10: Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[9]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[24]); - return; + break; + case 11: Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[10]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[25]); - return; + break; + case 12: Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[11]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[26]); - return; + break; + case 13: Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[12]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[27]); - return; + break; + case 22: Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[13]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[28]); - return; + break; + case 23: Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[14]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[29]); @@ -4363,15 +4524,19 @@ void Aquas_801B7AF0(Actor* actor) { actor->fwork[4] = 10.0f; actor->fwork[3] = -1000.0f; actor->fwork[2] = 30.0f; + actor->obj.pos.y = 150.0f; + actor->fwork[5] = 20.0f; actor->fwork[6] = 20.0f; + actor->health = 60; for (i = 0; i < 10; i++) { actor->vwork[0 + i].x = actor->obj.pos.x; actor->vwork[0 + i].y = actor->obj.pos.y; actor->vwork[0 + i].z = actor->obj.pos.z; + actor->vwork[10 + i].x = actor->obj.rot.x; actor->vwork[10 + i].y = actor->obj.rot.y; actor->vwork[10 + i].z = actor->obj.rot.z; @@ -4794,6 +4959,7 @@ void Aquas_801B90DC(Actor* actor) { } else { Animation_GetFrameData(&D_AQ_6024F80, actor->animFrame, sp30); } + Matrix_Translate(gCalcMatrix, 0.0f, -150.0f, 100.0f, MTXF_APPLY); Animation_DrawSkeleton(3, D_AQ_602512C, sp30, Aquas_801B8C50, Aquas_801B8D7C, actor, gCalcMatrix); } @@ -4907,13 +5073,18 @@ void Aquas_801B91A4(Actor* actor) { spfA4 = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(200.0f) - actor->vwork[26].x; spA0 = gPlayer[0].pos.y + RAND_FLOAT_CENTERED(200.0f) - actor->vwork[26].y; spf9C = gPlayer[0].trueZpos + RAND_FLOAT_CENTERED(200.0f) - actor->vwork[26].z; + sp94 = Math_RadToDeg(Math_Atan2F(spfA4, spf9C)); spf98 = Math_RadToDeg(-Math_Atan2F(spA0, sqrtf(SQ(spfA4) + SQ(spf9C)))); + Matrix_RotateY(gCalcMatrix, M_DTOR * sp94, MTXF_NEW); Matrix_RotateX(gCalcMatrix, M_DTOR * spf98, MTXF_APPLY); + spC4.x = spC4.y = 0.0f; spC4.z = 70.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &spC4, &spAC); + func_effect_8007F04C(OBJ_EFFECT_353, actor->vwork[26].x + RAND_FLOAT_CENTERED(200.0f), actor->vwork[26].y + RAND_FLOAT_CENTERED(200.0f), actor->vwork[26].z, spf98, sp94, 0.0f, 0.0f, 0.0f, 0.0f, spAC.x, spAC.y, spAC.z, 1.0f); @@ -5027,6 +5198,7 @@ void Aquas_801B9DB0(s32 limbIndex, Vec3f* rot, void* thisx) { Matrix_MultVec3f(gCalcMatrix, &sp34, &this->vwork[10]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[23]); break; + case 12: Matrix_MultVec3f(gCalcMatrix, &sp34, &this->vwork[11]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[24]); @@ -5049,6 +5221,7 @@ void Aquas_801B9DB0(s32 limbIndex, Vec3f* rot, void* thisx) { Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[27]); Matrix_Pop(&gCalcMatrix); break; + case 21: Matrix_MultVec3f(gCalcMatrix, &sp34, &this->vwork[12]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[25]); @@ -5385,6 +5558,7 @@ void Aquas_801BB26C(Actor* actor) { actor->iwork[7] = RAND_INT(120.0f); actor->iwork[8] = RAND_INT(120.0f); actor->iwork[9] = RAND_INT(120.0f); + actor->animFrame = RAND_INT(Animation_GetFrameCount(&D_AQ_6023780)); if (actor->iwork[2] == 0) { @@ -5401,6 +5575,7 @@ void Aquas_801BB26C(Actor* actor) { sp54.z = 0.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48); + for (sp64 = 0, actor267 = gActors; sp64 < ARRAY_COUNT(gActors); sp64++, actor267++) { if (actor267->obj.status == OBJ_FREE) { Actor_Initialize(actor267); @@ -5427,6 +5602,7 @@ void Aquas_801BB26C(Actor* actor) { sp54.z = 0.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48); + for (sp60 = 0, actor267_2 = gActors; sp60 < ARRAY_COUNT(gActors); sp60++, actor267_2++) { if (actor267_2->obj.status == OBJ_FREE) { Actor_Initialize(actor267_2); @@ -5551,6 +5727,7 @@ void Aquas_801BB79C(Actor* actor) { sp70->timer_0C6 = actor->timer_0C6; } } + if (((gGameFrameCount % 8) == 0)) { func_effect_8007A6F0(&sp70->obj.pos, NA_SE_EN_WT_SPARK_BEAM); } @@ -5620,6 +5797,7 @@ void Aquas_801BB79C(Actor* actor) { sp70->timer_0C6 = actor->timer_0C6; } } + if (((gGameFrameCount % 16) == 0)) { func_effect_8007A6F0(&sp70->obj.pos, NA_SE_EN_WT_SPARK_BEAM); } @@ -5627,6 +5805,7 @@ void Aquas_801BB79C(Actor* actor) { Aquas_801A92EC(actor, sp70->obj.pos.x, sp70->obj.pos.y, sp70->obj.pos.z, actor->iwork[13] + 2, i); } } + if (((gGameFrameCount % 4) == 0)) { func_effect_8007C120(actor->obj.pos.x + RAND_FLOAT_CENTERED(100.0f), actor->obj.pos.y + RAND_FLOAT_CENTERED(100.0f), @@ -5763,6 +5942,7 @@ bool Aquas_801BC530(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th Actor* this = (Actor*) thisx; RCP_SetupDL(&gMasterDisp, 0x29); + if ((this->timer_0C6 % 2) == 0) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 191, 255, 223, (s32) this->fwork[1]); } else { @@ -5821,8 +6001,9 @@ bool Aquas_801BC530(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th Matrix_Pop(&gGfxMatrix); } return true; + } else { + return false; } - return false; } void Aquas_801BC91C(s32 limbIndex, Vec3f* rot, void* thisx) { @@ -5916,7 +6097,9 @@ void Aquas_801BC9A0(Actor* actor) { actor269->obj.pos.y = actor->vwork[i].y; actor269->obj.pos.z = actor->vwork[i].z; actor269->iwork[0] = i + 1; + Object_SetInfo(&actor269->info, actor269->obj.id); + if (i == 0) { actor269->fwork[0] = RAND_FLOAT(360.0f); Matrix_RotateY(gCalcMatrix, actor269->fwork[0] * M_DTOR, MTXF_NEW); @@ -6050,19 +6233,24 @@ void Aquas_801BD3B0(Actor* actor, f32 x, f32 y, f32 z) { Math_SmoothStepToAngle(&actor->obj.rot.y, actor->fwork[6], 0.1f, 100.0f, 0.00001f); Math_SmoothStepToAngle(&actor->obj.rot.x, actor->fwork[7], 0.1f, 100.0f, 0.00001f); + if (((gGameFrameCount % 4) == 0)) { actor->fwork[6] = Math_RadToDeg(Math_Atan2F(x, z)); temp = sqrtf(SQ(x) + SQ(z)); actor->fwork[7] = Math_RadToDeg(-Math_Atan2F(y, temp)); + Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); Math_SmoothStepToF(&actor->fwork[4], 5.0f, 0.1f, 10.0f, 0); + sp38.z = actor->fwork[4]; if (actor->iwork[2] != 0) { sp38.z = 50.0f; } sp38.x = sp38.y = 0.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp38, &sp2C); + actor->vel.x = sp2C.x; actor->vel.y = sp2C.y; actor->vel.z = sp2C.z; @@ -6114,11 +6302,14 @@ void Aquas_801BD54C(Actor* actor) { actor268->iwork[4] = sp64; actor268->iwork[0] = sp68 + 1; actor268->iwork[3] = actor->iwork[3]; + sp64 = sp6C; + var_fs0 = 100.0f; if (Rand_ZeroOne() < 0.5f) { var_fs0 = -100.0f; } + actor268->obj.pos.x = actor->obj.pos.x + ((s32) (sp68 % 8U) * var_fs0) + RAND_FLOAT(50.0f); actor268->obj.pos.y = actor->obj.pos.y + ((s32) (sp68 % 8U) * (var_fs0 / 2.0f)) + RAND_FLOAT(30.0f); @@ -6126,6 +6317,7 @@ void Aquas_801BD54C(Actor* actor) { actor268->animFrame = RAND_FLOAT(20.0f); actor268->fwork[5] = actor->fwork[5]; actor268->state = 2; + Object_SetInfo(&actor268->info, actor268->obj.id); break; } @@ -6416,9 +6608,12 @@ void Aquas_801BE3F8(Actor* actor) { sp68 = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(200.0f) - actor->obj.pos.x; sp64 = gPlayer[0].pos.y + RAND_FLOAT_CENTERED(200.0f) - actor->obj.pos.y; sp60 = gPlayer[0].trueZpos - actor->obj.pos.z; + sp58 = Math_RadToDeg(Math_Atan2F(sp68, sp60)); sp5C = Math_RadToDeg(-Math_Atan2F(sp64, sqrtf(SQ(sp68) + SQ(sp60)))); + Aquas_801BE274(actor, sp58, sp5C); + if (actor->timer_0BC == 0) { actor->timer_0BC = 40.0f + RAND_FLOAT(30.0f); } From 13f3bb1bafbbdee6819fb5ad5e4bc38fefea4421 Mon Sep 17 00:00:00 2001 From: petrie911 <69443847+petrie911@users.noreply.github.com> Date: Thu, 16 May 2024 18:45:47 -0500 Subject: [PATCH 103/151] cleanup (#252) --- .gitignore | 1 - linker_scripts/jp/rev0/symbol_addrs.txt | 7281 +++++++++++++++++ linker_scripts/jp/rev0/symbol_addrs_fix.txt | 81 + .../jp/rev0/symbol_addrs_migrate.txt | 27 - linker_scripts/jp/rev0/undefined_syms.ld | 2404 +----- src/overlays/ovl_i3/fox_zo.c | 39 - srcjp/1FA60.c | 3 + srcjp/audio/audio_effects.c | 19 + srcjp/audio/audio_general.c | 204 + srcjp/audio/audio_heap.c | 67 + srcjp/audio/audio_load.c | 97 + srcjp/audio/audio_playback.c | 59 + srcjp/audio/audio_seqplayer.c | 51 + srcjp/audio/audio_synthesis.c | 41 + srcjp/audio/audio_thread.c | 39 + srcjp/buffers.c | 10 + srcjp/engine/fox_360.c | 73 + srcjp/engine/fox_beam.c | 75 + srcjp/engine/fox_bg.c | 21 + srcjp/engine/fox_blur.c | 3 + srcjp/engine/fox_boss.c | 25 + srcjp/engine/fox_col1.c | 31 + srcjp/engine/fox_col2.c | 7 + srcjp/engine/fox_demo.c | 71 + srcjp/engine/fox_display.c | 75 + srcjp/engine/fox_edata.c | 7 + srcjp/engine/fox_edisplay.c | 131 + srcjp/engine/fox_effect.c | 345 + srcjp/engine/fox_enmy.c | 191 + srcjp/engine/fox_enmy2.c | 125 + srcjp/engine/fox_fade.c | 11 + srcjp/engine/fox_game.c | 23 + srcjp/engine/fox_hud.c | 259 + srcjp/engine/fox_load.c | 11 + srcjp/engine/fox_message.c | 17 + srcjp/engine/fox_pause.c | 5 + srcjp/engine/fox_play.c | 204 + srcjp/engine/fox_radio.c | 15 + srcjp/engine/fox_rcp.c | 109 + srcjp/engine/fox_reset.c | 3 + srcjp/engine/fox_save.c | 9 + srcjp/engine/fox_std_lib.c | 91 + srcjp/engine/fox_tank.c | 55 + srcjp/engine/fox_versus.c | 158 + srcjp/libc_sprintf.c | 7 + srcjp/overlays/ovl_ending/fox_end1.c | 67 + srcjp/overlays/ovl_ending/fox_end2.c | 207 + srcjp/overlays/ovl_i1/fox_co.c | 129 + srcjp/overlays/ovl_i1/fox_i1.c | 3 + srcjp/overlays/ovl_i1/fox_tr.c | 7 + srcjp/overlays/ovl_i1/fox_tr360.c | 9 + srcjp/overlays/ovl_i1/fox_ve1.c | 61 + srcjp/overlays/ovl_i2/fox_i2.c | 3 + srcjp/overlays/ovl_i2/fox_me.c | 97 + srcjp/overlays/ovl_i2/fox_sx.c | 47 + srcjp/overlays/ovl_i3/fox_a6.c | 53 + srcjp/overlays/ovl_i3/fox_aq.c | 213 + srcjp/overlays/ovl_i3/fox_i3.c | 3 + srcjp/overlays/ovl_i3/fox_so.c | 105 + srcjp/overlays/ovl_i3/fox_zo.c | 177 + srcjp/overlays/ovl_i4/fox_bo.c | 91 + srcjp/overlays/ovl_i4/fox_fo.c | 29 + srcjp/overlays/ovl_i4/fox_i4.c | 5 + srcjp/overlays/ovl_i4/fox_ka.c | 61 + srcjp/overlays/ovl_i4/fox_sz.c | 55 + srcjp/overlays/ovl_i5/fox_ground.c | 27 + srcjp/overlays/ovl_i5/fox_i5.c | 5 + srcjp/overlays/ovl_i5/fox_ma.c | 279 + srcjp/overlays/ovl_i5/fox_ti.c | 143 + srcjp/overlays/ovl_i5/fox_ti_cs.c | 11 + srcjp/overlays/ovl_i6/fox_andross.c | 125 + srcjp/overlays/ovl_i6/fox_i6.c | 5 + srcjp/overlays/ovl_i6/fox_sy.c | 105 + srcjp/overlays/ovl_i6/fox_turret.c | 13 + srcjp/overlays/ovl_i6/fox_ve2.c | 17 + srcjp/overlays/ovl_menu/fox_i_menu.c | 3 + srcjp/overlays/ovl_menu/fox_map.c | 241 + srcjp/overlays/ovl_menu/fox_option.c | 251 + srcjp/overlays/ovl_menu/fox_title.c | 135 + srcjp/overlays/ovl_unused/fox_unused.c | 3 + srcjp/sys/sys_fault.c | 73 + srcjp/sys/sys_joybus.c | 15 + srcjp/sys/sys_lib.c | 17 + srcjp/sys/sys_lights.c | 7 + srcjp/sys/sys_main.c | 33 + srcjp/sys/sys_math.c | 35 + srcjp/sys/sys_matrix.c | 37 + srcjp/sys/sys_memory.c | 5 + srcjp/sys/sys_save.c | 11 + srcjp/sys/sys_timer.c | 13 + yamls/jp/rev0/header.yaml | 12 +- yamls/jp/rev0/main.yaml | 46 +- yamls/jp/rev0/overlays.yaml | 2 +- yamls/us/rev1/main.yaml | 8 + yamls/us/rev1/overlays.yaml | 11 +- 95 files changed, 13180 insertions(+), 2510 deletions(-) create mode 100644 linker_scripts/jp/rev0/symbol_addrs.txt create mode 100644 linker_scripts/jp/rev0/symbol_addrs_fix.txt delete mode 100644 linker_scripts/jp/rev0/symbol_addrs_migrate.txt create mode 100644 srcjp/1FA60.c create mode 100644 srcjp/audio/audio_effects.c create mode 100644 srcjp/audio/audio_general.c create mode 100644 srcjp/audio/audio_heap.c create mode 100644 srcjp/audio/audio_load.c create mode 100644 srcjp/audio/audio_playback.c create mode 100644 srcjp/audio/audio_seqplayer.c create mode 100644 srcjp/audio/audio_synthesis.c create mode 100644 srcjp/audio/audio_thread.c create mode 100644 srcjp/buffers.c create mode 100644 srcjp/engine/fox_360.c create mode 100644 srcjp/engine/fox_beam.c create mode 100644 srcjp/engine/fox_bg.c create mode 100644 srcjp/engine/fox_blur.c create mode 100644 srcjp/engine/fox_boss.c create mode 100644 srcjp/engine/fox_col1.c create mode 100644 srcjp/engine/fox_col2.c create mode 100644 srcjp/engine/fox_demo.c create mode 100644 srcjp/engine/fox_display.c create mode 100644 srcjp/engine/fox_edata.c create mode 100644 srcjp/engine/fox_edisplay.c create mode 100644 srcjp/engine/fox_effect.c create mode 100644 srcjp/engine/fox_enmy.c create mode 100644 srcjp/engine/fox_enmy2.c create mode 100644 srcjp/engine/fox_fade.c create mode 100644 srcjp/engine/fox_game.c create mode 100644 srcjp/engine/fox_hud.c create mode 100644 srcjp/engine/fox_load.c create mode 100644 srcjp/engine/fox_message.c create mode 100644 srcjp/engine/fox_pause.c create mode 100644 srcjp/engine/fox_play.c create mode 100644 srcjp/engine/fox_radio.c create mode 100644 srcjp/engine/fox_rcp.c create mode 100644 srcjp/engine/fox_reset.c create mode 100644 srcjp/engine/fox_save.c create mode 100644 srcjp/engine/fox_std_lib.c create mode 100644 srcjp/engine/fox_tank.c create mode 100644 srcjp/engine/fox_versus.c create mode 100644 srcjp/libc_sprintf.c create mode 100644 srcjp/overlays/ovl_ending/fox_end1.c create mode 100644 srcjp/overlays/ovl_ending/fox_end2.c create mode 100644 srcjp/overlays/ovl_i1/fox_co.c create mode 100644 srcjp/overlays/ovl_i1/fox_i1.c create mode 100644 srcjp/overlays/ovl_i1/fox_tr.c create mode 100644 srcjp/overlays/ovl_i1/fox_tr360.c create mode 100644 srcjp/overlays/ovl_i1/fox_ve1.c create mode 100644 srcjp/overlays/ovl_i2/fox_i2.c create mode 100644 srcjp/overlays/ovl_i2/fox_me.c create mode 100644 srcjp/overlays/ovl_i2/fox_sx.c create mode 100644 srcjp/overlays/ovl_i3/fox_a6.c create mode 100644 srcjp/overlays/ovl_i3/fox_aq.c create mode 100644 srcjp/overlays/ovl_i3/fox_i3.c create mode 100644 srcjp/overlays/ovl_i3/fox_so.c create mode 100644 srcjp/overlays/ovl_i3/fox_zo.c create mode 100644 srcjp/overlays/ovl_i4/fox_bo.c create mode 100644 srcjp/overlays/ovl_i4/fox_fo.c create mode 100644 srcjp/overlays/ovl_i4/fox_i4.c create mode 100644 srcjp/overlays/ovl_i4/fox_ka.c create mode 100644 srcjp/overlays/ovl_i4/fox_sz.c create mode 100644 srcjp/overlays/ovl_i5/fox_ground.c create mode 100644 srcjp/overlays/ovl_i5/fox_i5.c create mode 100644 srcjp/overlays/ovl_i5/fox_ma.c create mode 100644 srcjp/overlays/ovl_i5/fox_ti.c create mode 100644 srcjp/overlays/ovl_i5/fox_ti_cs.c create mode 100644 srcjp/overlays/ovl_i6/fox_andross.c create mode 100644 srcjp/overlays/ovl_i6/fox_i6.c create mode 100644 srcjp/overlays/ovl_i6/fox_sy.c create mode 100644 srcjp/overlays/ovl_i6/fox_turret.c create mode 100644 srcjp/overlays/ovl_i6/fox_ve2.c create mode 100644 srcjp/overlays/ovl_menu/fox_i_menu.c create mode 100644 srcjp/overlays/ovl_menu/fox_map.c create mode 100644 srcjp/overlays/ovl_menu/fox_option.c create mode 100644 srcjp/overlays/ovl_menu/fox_title.c create mode 100644 srcjp/overlays/ovl_unused/fox_unused.c create mode 100644 srcjp/sys/sys_fault.c create mode 100644 srcjp/sys/sys_joybus.c create mode 100644 srcjp/sys/sys_lib.c create mode 100644 srcjp/sys/sys_lights.c create mode 100644 srcjp/sys/sys_main.c create mode 100644 srcjp/sys/sys_math.c create mode 100644 srcjp/sys/sys_matrix.c create mode 100644 srcjp/sys/sys_memory.c create mode 100644 srcjp/sys/sys_save.c create mode 100644 srcjp/sys/sys_timer.c diff --git a/.gitignore b/.gitignore index d4735450..d3d884a2 100644 --- a/.gitignore +++ b/.gitignore @@ -27,4 +27,3 @@ debug/ m2cfiles/ TempComp.bin.mio0 torch.hash.yml -srcjp \ No newline at end of file diff --git a/linker_scripts/jp/rev0/symbol_addrs.txt b/linker_scripts/jp/rev0/symbol_addrs.txt new file mode 100644 index 00000000..a9059a64 --- /dev/null +++ b/linker_scripts/jp/rev0/symbol_addrs.txt @@ -0,0 +1,7281 @@ +D_80000450 = 0x80000450; +D_80000520 = 0x80000520; +D_80001420 = 0x80001420; +func_80002850 = 0x80002850; +func_8000292C = 0x8000292C; +func_800029B8 = 0x800029B8; +func_80002B04 = 0x80002B04; +func_80002BF8 = 0x80002BF8; +func_80002C60 = 0x80002C60; +func_80002CC8 = 0x80002CC8; +func_80002E90 = 0x80002E90; +func_80002EB0 = 0x80002EB0; +func_80002EF4 = 0x80002EF4; +func_80002F98 = 0x80002F98; +func_8000317C = 0x8000317C; +func_800032C4 = 0x800032C4; +func_800033F0 = 0x800033F0; +func_800034F8 = 0x800034F8; +func_800035E0 = 0x800035E0; +func_8000373C = 0x8000373C; +func_800038BC = 0x800038BC; +func_80003A60 = 0x80003A60; +func_80003B58 = 0x80003B58; +func_80003C60 = 0x80003C60; +func_80003DD0 = 0x80003DD0; +func_80003EF0 = 0x80003EF0; +func_80003FFC = 0x80003FFC; +func_800040E4 = 0x800040E4; +func_80004154 = 0x80004154; +func_80004570 = 0x80004570; +func_80004724 = 0x80004724; +func_800047A8 = 0x800047A8; +func_80004834 = 0x80004834; +func_800049E4 = 0x800049E4; +func_80004ACC = 0x80004ACC; +func_80004D10 = 0x80004D10; +func_80004DB8 = 0x80004DB8; +func_80004E30 = 0x80004E30; +func_80004E5C = 0x80004E5C; +func_80004E8C = 0x80004E8C; +func_80004EF0 = 0x80004EF0; +func_80005008 = 0x80005008; +func_80005028 = 0x80005028; +func_80005140 = 0x80005140; +func_80005220 = 0x80005220; +func_80005298 = 0x80005298; +func_80005380 = 0x80005380; +func_80005498 = 0x80005498; +func_80005540 = 0x80005540; +func_80005574 = 0x80005574; +func_8000559C = 0x8000559C; +func_8000569C = 0x8000569C; +func_800057B0 = 0x800057B0; +func_800057D8 = 0x800057D8; +func_80005860 = 0x80005860; +func_800058E8 = 0x800058E8; +func_80005920 = 0x80005920; +func_80005934 = 0x80005934; +func_80005CE0 = 0x80005CE0; +func_80005E14 = 0x80005E14; +func_80005F24 = 0x80005F24; +func_80006070 = 0x80006070; +func_800061C0 = 0x800061C0; +func_8000630C = 0x8000630C; +func_800066E0 = 0x800066E0; +func_800068FC = 0x800068FC; +func_80006B50 = 0x80006B50; +func_80006C00 = 0x80006C00; +func_80006C98 = 0x80006C98; +func_80006E5C = 0x80006E5C; +func_8000701C = 0x8000701C; +func_80007098 = 0x80007098; +func_80007100 = 0x80007100; +func_80007118 = 0x80007118; +func_80007140 = 0x80007140; +func_800071B8 = 0x800071B8; +func_80007248 = 0x80007248; +func_8000725C = 0x8000725C; +func_80007268 = 0x80007268; +func_800072A8 = 0x800072A8; +func_80007310 = 0x80007310; +func_8000734C = 0x8000734C; +func_800073CC = 0x800073CC; +func_800074B0 = 0x800074B0; +func_80007590 = 0x80007590; +func_8000767C = 0x8000767C; +func_800077D4 = 0x800077D4; +func_800077FC = 0x800077FC; +func_800078DC = 0x800078DC; +func_800079B0 = 0x800079B0; +func_80007A38 = 0x80007A38; +func_80007AC8 = 0x80007AC8; +func_80007EA4 = 0x80007EA4; +func_80007F10 = 0x80007F10; +func_80008194 = 0x80008194; +func_800081C8 = 0x800081C8; +func_80008270 = 0x80008270; +func_80008514 = 0x80008514; +func_80008930 = 0x80008930; +func_800092D4 = 0x800092D4; +func_800096B4 = 0x800096B4; +func_8000982C = 0x8000982C; +func_80009958 = 0x80009958; +func_80009A8C = 0x80009A8C; +func_80009B34 = 0x80009B34; +func_80009BDC = 0x80009BDC; +func_80009C5C = 0x80009C5C; +func_80009D14 = 0x80009D14; +func_80009F28 = 0x80009F28; +func_8000A2D8 = 0x8000A2D8; +func_8000A40C = 0x8000A40C; +func_8000A8B0 = 0x8000A8B0; +func_8000B5A0 = 0x8000B5A0; +func_8000B630 = 0x8000B630; +func_8000B6CC = 0x8000B6CC; +func_8000BB3C = 0x8000BB3C; +func_8000BE20 = 0x8000BE20; +func_8000BEE8 = 0x8000BEE8; +func_8000BFD4 = 0x8000BFD4; +func_8000C044 = 0x8000C044; +func_8000C0C4 = 0x8000C0C4; +func_8000C11C = 0x8000C11C; +func_8000C144 = 0x8000C144; +func_8000C158 = 0x8000C158; +func_8000C188 = 0x8000C188; +func_8000C198 = 0x8000C198; +func_8000C1F4 = 0x8000C1F4; +func_8000C270 = 0x8000C270; +func_8000C2EC = 0x8000C2EC; +func_8000C3A8 = 0x8000C3A8; +func_8000C464 = 0x8000C464; +func_8000CB40 = 0x8000CB40; +func_8000CB98 = 0x8000CB98; +func_8000CCA4 = 0x8000CCA4; +func_8000D078 = 0x8000D078; +func_8000D23C = 0x8000D23C; +func_8000D2B4 = 0x8000D2B4; +func_8000D658 = 0x8000D658; +func_8000DCBC = 0x8000DCBC; +func_8000DD14 = 0x8000DD14; +func_8000DD94 = 0x8000DD94; +func_8000DDE4 = 0x8000DDE4; +func_8000DE34 = 0x8000DE34; +func_8000DE84 = 0x8000DE84; +func_8000DF18 = 0x8000DF18; +func_8000E1AC = 0x8000E1AC; +func_8000E374 = 0x8000E374; +func_8000E3B8 = 0x8000E3B8; +func_8000E440 = 0x8000E440; +func_8000E650 = 0x8000E650; +func_8000E758 = 0x8000E758; +func_8000EA90 = 0x8000EA90; +func_8000ED64 = 0x8000ED64; +func_8000EDC4 = 0x8000EDC4; +func_8000EE70 = 0x8000EE70; +func_8000EED8 = 0x8000EED8; +func_8000EFC4 = 0x8000EFC4; +func_8000F094 = 0x8000F094; +func_8000F0F8 = 0x8000F0F8; +func_8000F1C0 = 0x8000F1C0; +func_8000F228 = 0x8000F228; +func_8000F308 = 0x8000F308; +func_8000F3B0 = 0x8000F3B0; +func_8000F3D0 = 0x8000F3D0; +func_8000F504 = 0x8000F504; +func_8000F538 = 0x8000F538; +func_8000F628 = 0x8000F628; +func_8000F6F8 = 0x8000F6F8; +func_8000F934 = 0x8000F934; +func_8000F970 = 0x8000F970; +func_8000F9C4 = 0x8000F9C4; +func_8000FA08 = 0x8000FA08; +func_8000FBCC = 0x8000FBCC; +func_8000FC68 = 0x8000FC68; +func_8000FCC0 = 0x8000FCC0; +func_8000FD94 = 0x8000FD94; +func_8000FDA4 = 0x8000FDA4; +func_8000FDB8 = 0x8000FDB8; +func_8000FDD8 = 0x8000FDD8; +func_800100B4 = 0x800100B4; +func_800100E4 = 0x800100E4; +func_80010704 = 0x80010704; +func_800108B4 = 0x800108B4; +func_80010920 = 0x80010920; +func_80010988 = 0x80010988; +func_80010B14 = 0x80010B14; +func_80010B98 = 0x80010B98; +func_80010BF0 = 0x80010BF0; +func_80010D08 = 0x80010D08; +func_80010D78 = 0x80010D78; +func_80011014 = 0x80011014; +func_800110A4 = 0x800110A4; +func_800110FC = 0x800110FC; +func_80011238 = 0x80011238; +func_80011664 = 0x80011664; +func_80011828 = 0x80011828; +func_80011870 = 0x80011870; +func_800119B0 = 0x800119B0; +func_80011D78 = 0x80011D78; +func_80011E30 = 0x80011E30; +func_80011E6C = 0x80011E6C; +func_80011F1C = 0x80011F1C; +func_80011FD8 = 0x80011FD8; +func_8001206C = 0x8001206C; +func_800120C8 = 0x800120C8; +func_80012558 = 0x80012558; +func_8001278C = 0x8001278C; +func_800127AC = 0x800127AC; +func_800127CC = 0x800127CC; +func_800128D0 = 0x800128D0; +func_80012974 = 0x80012974; +func_80012984 = 0x80012984; +func_800129D4 = 0x800129D4; +func_80012A84 = 0x80012A84; +func_80012BE4 = 0x80012BE4; +func_80012D20 = 0x80012D20; +func_80012D60 = 0x80012D60; +func_80012D8C = 0x80012D8C; +func_80012E0C = 0x80012E0C; +func_80012F48 = 0x80012F48; +func_80012F7C = 0x80012F7C; +func_80012FA8 = 0x80012FA8; +func_80012FF4 = 0x80012FF4; +func_80013044 = 0x80013044; +func_8001313C = 0x8001313C; +func_80013408 = 0x80013408; +func_80013520 = 0x80013520; +func_800136C8 = 0x800136C8; +func_80013828 = 0x80013828; +func_800138FC = 0x800138FC; +func_80013940 = 0x80013940; +func_80013B38 = 0x80013B38; +func_80013BA4 = 0x80013BA4; +func_80013C8C = 0x80013C8C; +func_80013CB0 = 0x80013CB0; +func_80013FC0 = 0x80013FC0; +func_800140E4 = 0x800140E4; +func_800141F0 = 0x800141F0; +func_8001422C = 0x8001422C; +func_8001427C = 0x8001427C; +func_800142E8 = 0x800142E8; +func_80014364 = 0x80014364; +func_80014490 = 0x80014490; +func_80014560 = 0x80014560; +func_80014604 = 0x80014604; +func_800146DC = 0x800146DC; +func_8001471C = 0x8001471C; +func_8001475C = 0x8001475C; +func_800147E0 = 0x800147E0; +func_800147F4 = 0x800147F4; +func_80014824 = 0x80014824; +func_80014868 = 0x80014868; +func_800153E0 = 0x800153E0; +func_80015450 = 0x80015450; +func_800154E4 = 0x800154E4; +func_80015508 = 0x80015508; +func_800160F4 = 0x800160F4; +func_800168AC = 0x800168AC; +func_80016924 = 0x80016924; +func_800169DC = 0x800169DC; +func_80016B70 = 0x80016B70; +func_80016B78 = 0x80016B78; +func_80016CE0 = 0x80016CE0; +func_80016DFC = 0x80016DFC; +func_80017004 = 0x80017004; +func_80017110 = 0x80017110; +func_80017480 = 0x80017480; +func_800175B4 = 0x800175B4; +func_80017670 = 0x80017670; +func_800176A8 = 0x800176A8; +func_80017720 = 0x80017720; +func_80017880 = 0x80017880; +func_800178E8 = 0x800178E8; +func_80018414 = 0x80018414; +func_8001843C = 0x8001843C; +func_800184BC = 0x800184BC; +func_80018530 = 0x80018530; +func_80018590 = 0x80018590; +func_800185F4 = 0x800185F4; +func_8001860C = 0x8001860C; +func_800186C0 = 0x800186C0; +func_80018718 = 0x80018718; +func_80018FBC = 0x80018FBC; +func_80019000 = 0x80019000; +func_800190C4 = 0x800190C4; +func_80019188 = 0x80019188; +func_80019204 = 0x80019204; +func_80019278 = 0x80019278; +func_800192DC = 0x800192DC; +func_80019338 = 0x80019338; +func_800193B0 = 0x800193B0; +func_80019554 = 0x80019554; +func_800198CC = 0x800198CC; +func_800199E0 = 0x800199E0; +func_8001A13C = 0x8001A13C; +func_8001A3B0 = 0x8001A3B0; +func_8001A4AC = 0x8001A4AC; +func_8001A5D8 = 0x8001A5D8; +func_8001A620 = 0x8001A620; +func_8001A67C = 0x8001A67C; +func_8001A7E4 = 0x8001A7E4; +func_8001A958 = 0x8001A958; +func_8001AAA8 = 0x8001AAA8; +func_8001AB0C = 0x8001AB0C; +func_8001ABB0 = 0x8001ABB0; +func_8001AC04 = 0x8001AC04; +func_8001AC70 = 0x8001AC70; +func_8001ADFC = 0x8001ADFC; +func_8001AE20 = 0x8001AE20; +func_8001AE64 = 0x8001AE64; +func_8001AF78 = 0x8001AF78; +func_8001AF98 = 0x8001AF98; +func_8001AFF4 = 0x8001AFF4; +func_8001B004 = 0x8001B004; +func_8001B050 = 0x8001B050; +func_8001B0C8 = 0x8001B0C8; +func_8001B508 = 0x8001B508; +func_8001B828 = 0x8001B828; +func_8001BAF4 = 0x8001BAF4; +func_8001BC28 = 0x8001BC28; +func_8001BCD4 = 0x8001BCD4; +func_8001BCFC = 0x8001BCFC; +func_8001BDC0 = 0x8001BDC0; +func_8001C074 = 0x8001C074; +func_8001C4A0 = 0x8001C4A0; +func_8001C96C = 0x8001C96C; +func_8001CAD8 = 0x8001CAD8; +func_8001CC50 = 0x8001CC50; +func_8001CDAC = 0x8001CDAC; +func_8001CEF8 = 0x8001CEF8; +func_8001CFCC = 0x8001CFCC; +func_8001D030 = 0x8001D030; +func_8001D078 = 0x8001D078; +func_8001D104 = 0x8001D104; +func_8001D184 = 0x8001D184; +func_8001D1DC = 0x8001D1DC; +func_8001D22C = 0x8001D22C; +func_8001D298 = 0x8001D298; +func_8001D3CC = 0x8001D3CC; +func_8001D470 = 0x8001D470; +func_8001D4D0 = 0x8001D4D0; +func_8001D4E0 = 0x8001D4E0; +func_8001D514 = 0x8001D514; +func_8001D57C = 0x8001D57C; +func_8001D5F8 = 0x8001D5F8; +func_8001D710 = 0x8001D710; +func_8001D7B4 = 0x8001D7B4; +func_8001D858 = 0x8001D858; +func_8001D980 = 0x8001D980; +func_8001D9CC = 0x8001D9CC; +func_8001DAB8 = 0x8001DAB8; +func_8001DB68 = 0x8001DB68; +func_8001DCA8 = 0x8001DCA8; +func_8001DD04 = 0x8001DD04; +func_8001DD44 = 0x8001DD44; +func_8001DD8C = 0x8001DD8C; +func_8001DDB8 = 0x8001DDB8; +func_8001DE18 = 0x8001DE18; +func_8001DEF4 = 0x8001DEF4; +func_8001DFA4 = 0x8001DFA4; +func_8001E030 = 0x8001E030; +func_8001E524 = 0x8001E524; +func_8001E800 = 0x8001E800; +func_8001E858 = 0x8001E858; +func_8001E8A8 = 0x8001E8A8; +func_8001E930 = 0x8001E930; +func_8001E988 = 0x8001E988; +func_8001E9AC = 0x8001E9AC; +func_8001E9D0 = 0x8001E9D0; +func_8001EA00 = 0x8001EA00; +func_8001EA78 = 0x8001EA78; +func_8001EA8C = 0x8001EA8C; +func_8001ED8C = 0x8001ED8C; +func_8001EDF4 = 0x8001EDF4; +func_8001EE14 = 0x8001EE14; +func_8001EE6C = 0x8001EE6C; +func_8001EEE0 = 0x8001EEE0; +func_8001EF1C = 0x8001EF1C; +func_8001EF40 = 0x8001EF40; +func_8001EF50 = 0x8001EF50; +func_8001EFF0 = 0x8001EFF0; +altIPL3Start = 0x8001F0A0; +func_8001FAC0 = 0x8001FAC0; +func_8001FAE4 = 0x8001FAE4; +func_8001FB34 = 0x8001FB34; +func_8001FB60 = 0x8001FB60; +func_8001FCA4 = 0x8001FCA4; +func_8001FE3C = 0x8001FE3C; +func_8001FF64 = 0x8001FF64; +func_80020090 = 0x80020090; +func_80020288 = 0x80020288; +func_80020358 = 0x80020358; +func_80020450 = 0x80020450; +func_80020514 = 0x80020514; +func_800205BC = 0x800205BC; +func_800206B0 = 0x800206B0; +func_800207F0 = 0x800207F0; +func_80020940 = 0x80020940; +func_800209C4 = 0x800209C4; +func_800209F0 = 0x800209F0; +func_80020C20 = 0x80020C20; +func_80020C80 = 0x80020C80; +func_80020F38 = 0x80020F38; +func_80020FB0 = 0x80020FB0; +func_80021104 = 0x80021104; +func_80021170 = 0x80021170; +func_800211F0 = 0x800211F0; +func_800212A0 = 0x800212A0; +func_800213B0 = 0x800213B0; +func_80021420 = 0x80021420; +func_80021450 = 0x80021450; +func_800214A0 = 0x800214A0; +func_80021550 = 0x80021550; +func_800215C0 = 0x800215C0; +func_80021780 = 0x80021780; +func_800217B0 = 0x800217B0; +func_80021820 = 0x80021820; +func_80021890 = 0x80021890; +func_80021910 = 0x80021910; +func_80021930 = 0x80021930; +func_80021A3C = 0x80021A3C; +func_80021BA4 = 0x80021BA4; +func_80021BF0 = 0x80021BF0; +func_80021C00 = 0x80021C00; +func_80021D50 = 0x80021D50; +func_80021EA0 = 0x80021EA0; +func_80022028 = 0x80022028; +func_80022200 = 0x80022200; +func_80022390 = 0x80022390; +func_80022470 = 0x80022470; +func_80022710 = 0x80022710; +func_800227A0 = 0x800227A0; +func_800227B0 = 0x800227B0; +func_80022970 = 0x80022970; +func_80022AE0 = 0x80022AE0; +func_80022BC0 = 0x80022BC0; +func_80022DB0 = 0x80022DB0; +func_80022EC0 = 0x80022EC0; +func_80023070 = 0x80023070; +func_8002317C = 0x8002317C; +func_800233A0 = 0x800233A0; +func_800233CC = 0x800233CC; +func_80023408 = 0x80023408; +func_80023444 = 0x80023444; +func_80023470 = 0x80023470; +func_800234AC = 0x800234AC; +func_80023508 = 0x80023508; +func_80023538 = 0x80023538; +func_80023598 = 0x80023598; +func_80023634 = 0x80023634; +func_80023660 = 0x80023660; +func_800236D0 = 0x800236D0; +func_800236FC = 0x800236FC; +func_80023724 = 0x80023724; +func_80023770 = 0x80023770; +func_80023DE0 = 0x80023DE0; +func_80024430 = 0x80024430; +func_80024460 = 0x80024460; +func_80024470 = 0x80024470; +func_800245D0 = 0x800245D0; +func_800246A0 = 0x800246A0; +func_80024780 = 0x80024780; +func_80024790 = 0x80024790; +func_80024840 = 0x80024840; +func_80024850 = 0x80024850; +func_800249E4 = 0x800249E4; +func_80024AC4 = 0x80024AC4; +func_80024B80 = 0x80024B80; +func_80024BD0 = 0x80024BD0; +func_80024C14 = 0x80024C14; +func_80024C40 = 0x80024C40; +func_80024CF0 = 0x80024CF0; +func_80024DA0 = 0x80024DA0; +func_80024E70 = 0x80024E70; +func_8002506C = 0x8002506C; +func_800251E0 = 0x800251E0; +func_800253F4 = 0x800253F4; +func_80025550 = 0x80025550; +func_80025570 = 0x80025570; +func_80025590 = 0x80025590; +func_800255D0 = 0x800255D0; +__osException = 0x800255E0; +func_80025AFC = 0x80025AFC; +func_80025BE4 = 0x80025BE4; +func_80025CE4 = 0x80025CE4; +func_80025D2C = 0x80025D2C; +func_80025D3C = 0x80025D3C; +__osCleanupThread = 0x80025EB8; +func_80025EC0 = 0x80025EC0; +func_80025FC0 = 0x80025FC0; +func_80026048 = 0x80026048; +func_80026078 = 0x80026078; +func_80026130 = 0x80026130; +func_80026280 = 0x80026280; +func_800262B0 = 0x800262B0; +func_80026400 = 0x80026400; +func_80026410 = 0x80026410; +func_80026420 = 0x80026420; +func_80026730 = 0x80026730; +func_800267B0 = 0x800267B0; +func_80026830 = 0x80026830; +func_80026870 = 0x80026870; +func_80026900 = 0x80026900; +func_80026930 = 0x80026930; +func_800269BC = 0x800269BC; +func_80026B34 = 0x80026B34; +func_80026BA8 = 0x80026BA8; +func_80026D30 = 0x80026D30; +func_80026D50 = 0x80026D50; +func_80026D60 = 0x80026D60; +func_800270C0 = 0x800270C0; +func_80027110 = 0x80027110; +func_80027154 = 0x80027154; +func_80027180 = 0x80027180; +func_80027260 = 0x80027260; +func_80027340 = 0x80027340; +func_800277D0 = 0x800277D0; +func_800277E0 = 0x800277E0; +func_800277F0 = 0x800277F0; +func_80027800 = 0x80027800; +func_80027850 = 0x80027850; +func_800278A0 = 0x800278A0; +func_80027900 = 0x80027900; +func_80027960 = 0x80027960; +func_80027A00 = 0x80027A00; +func_80027A50 = 0x80027A50; +func_800280A0 = 0x800280A0; +func_80028188 = 0x80028188; +func_80028280 = 0x80028280; +func_80028520 = 0x80028520; +func_80028A90 = 0x80028A90; +func_80028FE0 = 0x80028FE0; +func_80029010 = 0x80029010; +func_80029040 = 0x80029040; +func_80029244 = 0x80029244; +func_800292E4 = 0x800292E4; +func_800293C0 = 0x800293C0; +func_800295D0 = 0x800295D0; +func_80029670 = 0x80029670; +func_80029770 = 0x80029770; +func_80029830 = 0x80029830; +func_80029840 = 0x80029840; +func_800298A0 = 0x800298A0; +func_800298F0 = 0x800298F0; +func_80029940 = 0x80029940; +func_80029990 = 0x80029990; +func_800299E0 = 0x800299E0; +func_80029AD0 = 0x80029AD0; +func_80029BD0 = 0x80029BD0; +func_80029C60 = 0x80029C60; +func_80029CDC = 0x80029CDC; +func_80029DD8 = 0x80029DD8; +func_8002A124 = 0x8002A124; +func_8002A288 = 0x8002A288; +func_8002A48C = 0x8002A48C; +func_8002A5A4 = 0x8002A5A4; +func_8002A840 = 0x8002A840; +func_8002A8B0 = 0x8002A8B0; +func_8002AE9C = 0x8002AE9C; +func_8002B180 = 0x8002B180; +func_8002B320 = 0x8002B320; +func_8002B438 = 0x8002B438; +func_8002B488 = 0x8002B488; +func_8002B520 = 0x8002B520; +func_8002B544 = 0x8002B544; +func_8002B568 = 0x8002B568; +func_8002B58C = 0x8002B58C; +func_8002B5B0 = 0x8002B5B0; +func_8002B5D4 = 0x8002B5D4; +func_8002B5F8 = 0x8002B5F8; +func_8002B61C = 0x8002B61C; +func_8002B640 = 0x8002B640; +func_8002BCA0 = 0x8002BCA0; +func_8002BD74 = 0x8002BD74; +func_8002BDA4 = 0x8002BDA4; +func_8002C0C0 = 0x8002C0C0; +func_8002C324 = 0x8002C324; +func_8002C538 = 0x8002C538; +func_8002C590 = 0x8002C590; +func_8002C5E0 = 0x8002C5E0; +func_8002CA90 = 0x8002CA90; +func_8002CB44 = 0x8002CB44; +func_8002CDB8 = 0x8002CDB8; +func_8002CE34 = 0x8002CE34; +func_8002D050 = 0x8002D050; +func_8002D138 = 0x8002D138; +func_8002D3E0 = 0x8002D3E0; +func_8002D7D0 = 0x8002D7D0; +func_8002E6C8 = 0x8002E6C8; +func_8002E770 = 0x8002E770; +func_8002E81C = 0x8002E81C; +func_80031CD4 = 0x80031CD4; +func_80031F08 = 0x80031F08; +func_80032150 = 0x80032150; +func_800322B8 = 0x800322B8; +func_80032BA0 = 0x80032BA0; +func_80032C5C = 0x80032C5C; +func_80032CB8 = 0x80032CB8; +func_80032CE8 = 0x80032CE8; +func_80033188 = 0x80033188; +func_80033398 = 0x80033398; +func_80033454 = 0x80033454; +func_8003353C = 0x8003353C; +func_800335E0 = 0x800335E0; +func_800336E4 = 0x800336E4; +func_80033DF8 = 0x80033DF8; +func_800342A8 = 0x800342A8; +func_80034508 = 0x80034508; +func_800345BC = 0x800345BC; +func_80034B64 = 0x80034B64; +func_80034FB0 = 0x80034FB0; +func_80035DA4 = 0x80035DA4; +func_80036080 = 0x80036080; +func_800368C0 = 0x800368C0; +func_80037DF8 = 0x80037DF8; +func_80037E48 = 0x80037E48; +func_80037E7C = 0x80037E7C; +func_800383CC = 0x800383CC; +func_800388F0 = 0x800388F0; +func_80038910 = 0x80038910; +func_8003893C = 0x8003893C; +func_800389BC = 0x800389BC; +func_80038D64 = 0x80038D64; +func_80038E78 = 0x80038E78; +func_80039248 = 0x80039248; +func_80039340 = 0x80039340; +func_80039A78 = 0x80039A78; +func_80039E00 = 0x80039E00; +func_8003A3BC = 0x8003A3BC; +func_8003A6C4 = 0x8003A6C4; +func_8003A828 = 0x8003A828; +func_8003A87C = 0x8003A87C; +func_8003A960 = 0x8003A960; +func_8003ACD8 = 0x8003ACD8; +func_8003B050 = 0x8003B050; +func_8003B058 = 0x8003B058; +func_8003D2C0 = 0x8003D2C0; +func_8003D7C4 = 0x8003D7C4; +func_8003DB4C = 0x8003DB4C; +func_8003DB54 = 0x8003DB54; +func_8003FBB8 = 0x8003FBB8; +func_8003FD40 = 0x8003FD40; +func_8003FE2C = 0x8003FE2C; +func_8003FE38 = 0x8003FE38; +func_8003FE44 = 0x8003FE44; +func_8003FE50 = 0x8003FE50; +func_8003FE5C = 0x8003FE5C; +func_8003FE68 = 0x8003FE68; +func_8003FE74 = 0x8003FE74; +func_8003FF5C = 0x8003FF5C; +func_80040008 = 0x80040008; +func_8004001C = 0x8004001C; +func_80040100 = 0x80040100; +func_800402EC = 0x800402EC; +func_80040764 = 0x80040764; +func_80040924 = 0x80040924; +func_80040990 = 0x80040990; +func_8004099C = 0x8004099C; +func_80040FA4 = 0x80040FA4; +func_8004104C = 0x8004104C; +func_80041260 = 0x80041260; +func_80041340 = 0x80041340; +func_800416EC = 0x800416EC; +func_80041FB4 = 0x80041FB4; +func_800421CC = 0x800421CC; +func_800424FC = 0x800424FC; +func_80042D00 = 0x80042D00; +func_80042F64 = 0x80042F64; +func_800430E4 = 0x800430E4; +func_800431DC = 0x800431DC; +func_800432A0 = 0x800432A0; +func_80043588 = 0x80043588; +func_80043CC4 = 0x80043CC4; +func_80044388 = 0x80044388; +func_800445D8 = 0x800445D8; +func_80044BBC = 0x80044BBC; +func_80044D00 = 0x80044D00; +func_80044E40 = 0x80044E40; +func_80045078 = 0x80045078; +func_80045940 = 0x80045940; +func_80045B44 = 0x80045B44; +func_80045CC0 = 0x80045CC0; +func_800464B0 = 0x800464B0; +func_8004678C = 0x8004678C; +func_800467E8 = 0x800467E8; +func_8004691C = 0x8004691C; +func_800469C4 = 0x800469C4; +func_80046A8C = 0x80046A8C; +func_800473AC = 0x800473AC; +func_80047580 = 0x80047580; +func_800476C0 = 0x800476C0; +func_80047708 = 0x80047708; +func_80047904 = 0x80047904; +func_80047974 = 0x80047974; +func_800481E8 = 0x800481E8; +func_8004978C = 0x8004978C; +func_800497B0 = 0x800497B0; +func_80049B40 = 0x80049B40; +func_8004A248 = 0x8004A248; +func_8004A254 = 0x8004A254; +func_8004A2C0 = 0x8004A2C0; +func_8004A5B8 = 0x8004A5B8; +func_8004A6A8 = 0x8004A6A8; +func_8004AD50 = 0x8004AD50; +func_8004B230 = 0x8004B230; +func_8004B32C = 0x8004B32C; +func_8004BA28 = 0x8004BA28; +func_8004BEB4 = 0x8004BEB4; +func_8004C5F0 = 0x8004C5F0; +func_8004C704 = 0x8004C704; +func_8004CB10 = 0x8004CB10; +func_8004CD18 = 0x8004CD18; +func_8004E41C = 0x8004E41C; +func_8004E980 = 0x8004E980; +func_8004EF4C = 0x8004EF4C; +func_8004F1F8 = 0x8004F1F8; +func_8004F270 = 0x8004F270; +func_8004F2E8 = 0x8004F2E8; +func_8004F35C = 0x8004F35C; +func_8004F3D4 = 0x8004F3D4; +func_8004F508 = 0x8004F508; +func_8004F6D4 = 0x8004F6D4; +func_8004F9D0 = 0x8004F9D0; +func_8004FB98 = 0x8004FB98; +func_8004FF9C = 0x8004FF9C; +func_8004FFF4 = 0x8004FFF4; +func_800504A8 = 0x800504A8; +func_80050950 = 0x80050950; +func_80050968 = 0x80050968; +func_80050A88 = 0x80050A88; +func_80050DCC = 0x80050DCC; +func_800510D0 = 0x800510D0; +func_80051150 = 0x80051150; +func_800514AC = 0x800514AC; +func_800515DC = 0x800515DC; +func_80051764 = 0x80051764; +func_80051AF4 = 0x80051AF4; +func_80051CD0 = 0x80051CD0; +func_800525D8 = 0x800525D8; +func_800529A8 = 0x800529A8; +func_80052CE8 = 0x80052CE8; +func_80053080 = 0x80053080; +func_80053204 = 0x80053204; +func_80053310 = 0x80053310; +func_80053C7C = 0x80053C7C; +func_80054098 = 0x80054098; +func_80054354 = 0x80054354; +func_80054664 = 0x80054664; +func_80054714 = 0x80054714; +func_80054B50 = 0x80054B50; +func_800559D0 = 0x800559D0; +func_80055A98 = 0x80055A98; +func_80055D64 = 0x80055D64; +func_800562E8 = 0x800562E8; +func_80056320 = 0x80056320; +func_80056400 = 0x80056400; +func_800564E0 = 0x800564E0; +func_800564F0 = 0x800564F0; +func_800565F0 = 0x800565F0; +func_8005663C = 0x8005663C; +func_80056680 = 0x80056680; +func_8005670C = 0x8005670C; +func_80056718 = 0x80056718; +func_800567D4 = 0x800567D4; +func_80056854 = 0x80056854; +func_8005691C = 0x8005691C; +func_80056950 = 0x80056950; +func_800569E0 = 0x800569E0; +func_800569EC = 0x800569EC; +func_80056A20 = 0x80056A20; +func_80056A58 = 0x80056A58; +func_80056A64 = 0x80056A64; +func_80056A70 = 0x80056A70; +func_80056D98 = 0x80056D98; +func_80056E0C = 0x80056E0C; +func_80056E40 = 0x80056E40; +func_80056EAC = 0x80056EAC; +func_80056EB8 = 0x80056EB8; +func_80056EC4 = 0x80056EC4; +func_80057BDC = 0x80057BDC; +func_80058018 = 0x80058018; +func_8005819C = 0x8005819C; +func_8005846C = 0x8005846C; +func_800584E4 = 0x800584E4; +func_80058594 = 0x80058594; +func_80058610 = 0x80058610; +func_8005876C = 0x8005876C; +func_800587F8 = 0x800587F8; +func_8005887C = 0x8005887C; +func_800593B8 = 0x800593B8; +func_800596C8 = 0x800596C8; +func_80059788 = 0x80059788; +func_80059848 = 0x80059848; +func_8005990C = 0x8005990C; +func_80059A64 = 0x80059A64; +func_80059B70 = 0x80059B70; +func_80059DD0 = 0x80059DD0; +func_80059FB8 = 0x80059FB8; +func_8005A194 = 0x8005A194; +func_8005A41C = 0x8005A41C; +func_8005A680 = 0x8005A680; +func_8005A71C = 0x8005A71C; +func_8005A988 = 0x8005A988; +func_8005AF80 = 0x8005AF80; +func_8005B21C = 0x8005B21C; +func_8005B300 = 0x8005B300; +func_8005B580 = 0x8005B580; +func_8005B7EC = 0x8005B7EC; +func_8005BAA0 = 0x8005BAA0; +func_8005BDF8 = 0x8005BDF8; +func_8005BEB0 = 0x8005BEB0; +func_8005BFB4 = 0x8005BFB4; +func_8005C058 = 0x8005C058; +func_8005C0BC = 0x8005C0BC; +func_8005C438 = 0x8005C438; +func_8005C7A4 = 0x8005C7A4; +func_8005C938 = 0x8005C938; +func_8005D22C = 0x8005D22C; +func_8005D4D4 = 0x8005D4D4; +func_8005D65C = 0x8005D65C; +func_8005D728 = 0x8005D728; +func_8005DB54 = 0x8005DB54; +func_8005DCF0 = 0x8005DCF0; +func_8005DD7C = 0x8005DD7C; +func_8005DDA4 = 0x8005DDA4; +func_8005DF08 = 0x8005DF08; +func_8005E078 = 0x8005E078; +func_8005E128 = 0x8005E128; +func_8005E158 = 0x8005E158; +func_8005E188 = 0x8005E188; +func_8005E1C8 = 0x8005E1C8; +func_8005E208 = 0x8005E208; +func_8005E238 = 0x8005E238; +func_8005E278 = 0x8005E278; +func_8005E364 = 0x8005E364; +func_8005E450 = 0x8005E450; +func_8005E53C = 0x8005E53C; +func_8005E628 = 0x8005E628; +func_8005E71C = 0x8005E71C; +func_8005E810 = 0x8005E810; +func_8005E92C = 0x8005E92C; +func_8005EA94 = 0x8005EA94; +func_8005EC0C = 0x8005EC0C; +func_8005ECD0 = 0x8005ECD0; +func_8005EF44 = 0x8005EF44; +func_8005F32C = 0x8005F32C; +func_8005F42C = 0x8005F42C; +func_8005F944 = 0x8005F944; +func_8005FA1C = 0x8005FA1C; +func_8005FAE8 = 0x8005FAE8; +func_8005FBA0 = 0x8005FBA0; +func_8005FF8C = 0x8005FF8C; +func_80060050 = 0x80060050; +func_80060300 = 0x80060300; +func_80060A7C = 0x80060A7C; +func_80060B28 = 0x80060B28; +func_80060C2C = 0x80060C2C; +func_80060D20 = 0x80060D20; +func_80060D2C = 0x80060D2C; +func_80060D48 = 0x80060D48; +func_80060D64 = 0x80060D64; +func_800620A0 = 0x800620A0; +func_80062154 = 0x80062154; +func_80062240 = 0x80062240; +func_800622B8 = 0x800622B8; +func_8006239C = 0x8006239C; +func_80062440 = 0x80062440; +func_800624A8 = 0x800624A8; +func_80062EC4 = 0x80062EC4; +func_80063028 = 0x80063028; +func_80063320 = 0x80063320; +func_80063620 = 0x80063620; +func_80063774 = 0x80063774; +func_80063854 = 0x80063854; +func_80063860 = 0x80063860; +func_800639D4 = 0x800639D4; +func_80063B30 = 0x80063B30; +func_80063C54 = 0x80063C54; +func_80063C60 = 0x80063C60; +func_80063C7C = 0x80063C7C; +func_80063CB8 = 0x80063CB8; +func_80063CC4 = 0x80063CC4; +func_80063FA4 = 0x80063FA4; +func_8006411C = 0x8006411C; +func_80064288 = 0x80064288; +func_80064310 = 0x80064310; +func_80064648 = 0x80064648; +func_80064814 = 0x80064814; +func_800648F0 = 0x800648F0; +func_800649C0 = 0x800649C0; +func_80064D40 = 0x80064D40; +func_80064DF4 = 0x80064DF4; +func_800653AC = 0x800653AC; +func_800653CC = 0x800653CC; +func_800653EC = 0x800653EC; +func_8006545C = 0x8006545C; +func_800656E8 = 0x800656E8; +func_80065A1C = 0x80065A1C; +func_80065A5C = 0x80065A5C; +func_80065DB4 = 0x80065DB4; +func_80065EA4 = 0x80065EA4; +func_800661BC = 0x800661BC; +func_8006642C = 0x8006642C; +func_800664CC = 0x800664CC; +func_8006662C = 0x8006662C; +func_800666F8 = 0x800666F8; +func_800667E4 = 0x800667E4; +func_80066880 = 0x80066880; +func_80066A90 = 0x80066A90; +func_80066BC8 = 0x80066BC8; +func_80066C5C = 0x80066C5C; +func_80066D04 = 0x80066D04; +func_80066DA8 = 0x80066DA8; +func_80066E40 = 0x80066E40; +func_80067158 = 0x80067158; +func_800671B4 = 0x800671B4; +func_80067590 = 0x80067590; +func_800675E0 = 0x800675E0; +func_800676E0 = 0x800676E0; +func_8006774C = 0x8006774C; +func_80067758 = 0x80067758; +func_80067764 = 0x80067764; +func_8006781C = 0x8006781C; +func_80067878 = 0x80067878; +func_80067984 = 0x80067984; +func_800679E8 = 0x800679E8; +func_80067AF8 = 0x80067AF8; +func_80067E74 = 0x80067E74; +func_80067E80 = 0x80067E80; +func_8006824C = 0x8006824C; +func_8006852C = 0x8006852C; +func_8006873C = 0x8006873C; +func_80068844 = 0x80068844; +func_800688FC = 0x800688FC; +func_80068958 = 0x80068958; +func_80068D5C = 0x80068D5C; +func_80068DE8 = 0x80068DE8; +func_80069ED4 = 0x80069ED4; +func_8006A130 = 0x8006A130; +func_8006A14C = 0x8006A14C; +func_8006B7F0 = 0x8006B7F0; +func_8006B864 = 0x8006B864; +func_8006B904 = 0x8006B904; +func_8006B960 = 0x8006B960; +func_8006BA00 = 0x8006BA00; +func_8006BA5C = 0x8006BA5C; +func_8006BC9C = 0x8006BC9C; +func_8006BD40 = 0x8006BD40; +func_8006BDE4 = 0x8006BDE4; +func_8006BE78 = 0x8006BE78; +func_8006BEE0 = 0x8006BEE0; +func_8006BF8C = 0x8006BF8C; +func_8006BFF4 = 0x8006BFF4; +func_8006C1AC = 0x8006C1AC; +func_8006CBC8 = 0x8006CBC8; +func_8006CC8C = 0x8006CC8C; +func_8006CE44 = 0x8006CE44; +func_8006CF80 = 0x8006CF80; +func_8006D948 = 0x8006D948; +func_8006DA8C = 0x8006DA8C; +func_8006DAE4 = 0x8006DAE4; +func_8006EB60 = 0x8006EB60; +func_8006EE88 = 0x8006EE88; +func_8006F090 = 0x8006F090; +func_8006F1B0 = 0x8006F1B0; +func_8006F218 = 0x8006F218; +func_8006F338 = 0x8006F338; +func_800719A0 = 0x800719A0; +func_800719E8 = 0x800719E8; +func_80071BE0 = 0x80071BE0; +func_80071CA8 = 0x80071CA8; +func_80071D34 = 0x80071D34; +func_80071D94 = 0x80071D94; +func_80073148 = 0x80073148; +func_80073F20 = 0x80073F20; +func_80073F70 = 0x80073F70; +func_80073FBC = 0x80073FBC; +func_80073FE0 = 0x80073FE0; +func_8007403C = 0x8007403C; +func_800741A4 = 0x800741A4; +func_80074530 = 0x80074530; +func_800745DC = 0x800745DC; +func_80074664 = 0x80074664; +func_8007471C = 0x8007471C; +func_800747A0 = 0x800747A0; +func_8007481C = 0x8007481C; +func_80074918 = 0x80074918; +func_80074924 = 0x80074924; +func_80074DD8 = 0x80074DD8; +func_80074E98 = 0x80074E98; +func_80075160 = 0x80075160; +func_800751D8 = 0x800751D8; +func_80075254 = 0x80075254; +func_800752F0 = 0x800752F0; +func_800753A4 = 0x800753A4; +func_8007542C = 0x8007542C; +func_8007553C = 0x8007553C; +func_80075650 = 0x80075650; +func_80075804 = 0x80075804; +func_80075880 = 0x80075880; +func_8007588C = 0x8007588C; +func_8007592C = 0x8007592C; +func_80075980 = 0x80075980; +func_80075A24 = 0x80075A24; +func_80075A88 = 0x80075A88; +func_80075B00 = 0x80075B00; +func_80075BF0 = 0x80075BF0; +func_80075C5C = 0x80075C5C; +func_80075D18 = 0x80075D18; +func_80075DFC = 0x80075DFC; +func_8007626C = 0x8007626C; +func_800762DC = 0x800762DC; +func_8007634C = 0x8007634C; +func_800763B8 = 0x800763B8; +func_8007642C = 0x8007642C; +func_80076664 = 0x80076664; +func_80076690 = 0x80076690; +func_8007702C = 0x8007702C; +func_80077160 = 0x80077160; +func_80077258 = 0x80077258; +func_80077308 = 0x80077308; +func_80077398 = 0x80077398; +func_80077490 = 0x80077490; +func_800774E8 = 0x800774E8; +func_80077514 = 0x80077514; +func_800775B8 = 0x800775B8; +func_800776A0 = 0x800776A0; +func_80077734 = 0x80077734; +func_80077800 = 0x80077800; +func_800778F0 = 0x800778F0; +func_800779AC = 0x800779AC; +func_80077A80 = 0x80077A80; +func_80077AF8 = 0x80077AF8; +func_80077B94 = 0x80077B94; +func_80077CD0 = 0x80077CD0; +func_80077D70 = 0x80077D70; +func_80077DE0 = 0x80077DE0; +func_80077E94 = 0x80077E94; +func_80077F20 = 0x80077F20; +func_80077FC8 = 0x80077FC8; +func_8007805C = 0x8007805C; +func_800780E4 = 0x800780E4; +func_80078158 = 0x80078158; +func_80078234 = 0x80078234; +func_800782F0 = 0x800782F0; +func_80078360 = 0x80078360; +func_800783CC = 0x800783CC; +func_80078410 = 0x80078410; +func_8007841C = 0x8007841C; +func_800784F8 = 0x800784F8; +func_80078588 = 0x80078588; +func_80078698 = 0x80078698; +func_80078700 = 0x80078700; +func_8007877C = 0x8007877C; +func_800788B4 = 0x800788B4; +func_80078A1C = 0x80078A1C; +func_80078A88 = 0x80078A88; +func_80078B80 = 0x80078B80; +func_80078BF4 = 0x80078BF4; +func_80078C88 = 0x80078C88; +func_80078D04 = 0x80078D04; +func_80078D9C = 0x80078D9C; +func_80078E28 = 0x80078E28; +func_80078EC0 = 0x80078EC0; +func_80078F4C = 0x80078F4C; +func_80078FF0 = 0x80078FF0; +func_80079154 = 0x80079154; +func_80079224 = 0x80079224; +func_800792AC = 0x800792AC; +func_800793A8 = 0x800793A8; +func_80079428 = 0x80079428; +func_8007949C = 0x8007949C; +func_800795FC = 0x800795FC; +func_80079664 = 0x80079664; +func_80079780 = 0x80079780; +func_80079890 = 0x80079890; +func_800799A0 = 0x800799A0; +func_80079A5C = 0x80079A5C; +func_80079B1C = 0x80079B1C; +func_80079C5C = 0x80079C5C; +func_80079CD0 = 0x80079CD0; +func_80079D3C = 0x80079D3C; +func_80079DA8 = 0x80079DA8; +func_80079E14 = 0x80079E14; +func_80079E80 = 0x80079E80; +func_80079EAC = 0x80079EAC; +func_80079ED8 = 0x80079ED8; +func_80079F80 = 0x80079F80; +func_80079FEC = 0x80079FEC; +func_8007A068 = 0x8007A068; +func_8007A094 = 0x8007A094; +func_8007A2FC = 0x8007A2FC; +func_8007A4E8 = 0x8007A4E8; +func_8007A648 = 0x8007A648; +func_8007A6EC = 0x8007A6EC; +func_8007A77C = 0x8007A77C; +func_8007A7F8 = 0x8007A7F8; +func_8007A884 = 0x8007A884; +func_8007A910 = 0x8007A910; +func_8007AC74 = 0x8007AC74; +func_8007ADB4 = 0x8007ADB4; +func_8007AFF8 = 0x8007AFF8; +func_8007B038 = 0x8007B038; +func_8007B0D0 = 0x8007B0D0; +func_8007B184 = 0x8007B184; +func_8007B1FC = 0x8007B1FC; +func_8007B36C = 0x8007B36C; +func_8007B3E8 = 0x8007B3E8; +func_8007B458 = 0x8007B458; +func_8007B6DC = 0x8007B6DC; +func_8007B958 = 0x8007B958; +func_8007BA54 = 0x8007BA54; +func_8007BAF4 = 0x8007BAF4; +func_8007BC08 = 0x8007BC08; +func_8007BDEC = 0x8007BDEC; +func_8007BEBC = 0x8007BEBC; +func_8007BFAC = 0x8007BFAC; +func_8007C09C = 0x8007C09C; +func_8007C1D8 = 0x8007C1D8; +func_8007C34C = 0x8007C34C; +func_8007C450 = 0x8007C450; +func_8007C6F8 = 0x8007C6F8; +func_8007C980 = 0x8007C980; +func_8007CB24 = 0x8007CB24; +func_8007CC28 = 0x8007CC28; +func_8007D058 = 0x8007D058; +func_8007D078 = 0x8007D078; +func_8007D098 = 0x8007D098; +func_8007D100 = 0x8007D100; +func_8007D1AC = 0x8007D1AC; +func_8007D6CC = 0x8007D6CC; +func_8007D86C = 0x8007D86C; +func_8007DAA4 = 0x8007DAA4; +func_8007E37C = 0x8007E37C; +func_8007E3FC = 0x8007E3FC; +func_8007E82C = 0x8007E82C; +func_8007E8C4 = 0x8007E8C4; +func_8007E98C = 0x8007E98C; +func_8007E9FC = 0x8007E9FC; +func_8007FD18 = 0x8007FD18; +func_80080460 = 0x80080460; +func_8008051C = 0x8008051C; +func_8008058C = 0x8008058C; +func_8008092C = 0x8008092C; +func_80080A10 = 0x80080A10; +func_80080ACC = 0x80080ACC; +func_80080D48 = 0x80080D48; +func_80080F34 = 0x80080F34; +func_80081110 = 0x80081110; +func_8008119C = 0x8008119C; +func_80081228 = 0x80081228; +func_80081428 = 0x80081428; +func_80081490 = 0x80081490; +func_800816D0 = 0x800816D0; +func_80081934 = 0x80081934; +func_80081C18 = 0x80081C18; +func_80082144 = 0x80082144; +func_800821A4 = 0x800821A4; +func_80082204 = 0x80082204; +func_8008225C = 0x8008225C; +func_800822B4 = 0x800822B4; +func_8008230C = 0x8008230C; +func_80082364 = 0x80082364; +func_800823B8 = 0x800823B8; +func_8008240C = 0x8008240C; +func_80082460 = 0x80082460; +func_800824E0 = 0x800824E0; +func_8008257C = 0x8008257C; +func_80082630 = 0x80082630; +func_800826E4 = 0x800826E4; +func_80082EB0 = 0x80082EB0; +func_80083168 = 0x80083168; +func_800831E4 = 0x800831E4; +func_80083404 = 0x80083404; +func_80083744 = 0x80083744; +func_800839AC = 0x800839AC; +func_80083A6C = 0x80083A6C; +func_80083B70 = 0x80083B70; +func_8008444C = 0x8008444C; +func_800846A4 = 0x800846A4; +func_80084A38 = 0x80084A38; +func_8008545C = 0x8008545C; +func_800854DC = 0x800854DC; +func_800855D4 = 0x800855D4; +func_80085630 = 0x80085630; +func_800856FC = 0x800856FC; +func_800858E8 = 0x800858E8; +func_800865B8 = 0x800865B8; +func_80086658 = 0x80086658; +func_800866F8 = 0x800866F8; +func_80086798 = 0x80086798; +func_80086838 = 0x80086838; +func_800868DC = 0x800868DC; +func_80086A3C = 0x80086A3C; +func_80086ADC = 0x80086ADC; +func_80086B80 = 0x80086B80; +func_80086C70 = 0x80086C70; +func_80086DE0 = 0x80086DE0; +func_80086FC4 = 0x80086FC4; +func_80087188 = 0x80087188; +func_80087424 = 0x80087424; +func_80087B9C = 0x80087B9C; +func_80087CDC = 0x80087CDC; +func_80087F60 = 0x80087F60; +func_800880CC = 0x800880CC; +func_800881C0 = 0x800881C0; +func_8008820C = 0x8008820C; +func_800884CC = 0x800884CC; +func_80088650 = 0x80088650; +func_80088690 = 0x80088690; +func_80088904 = 0x80088904; +func_80088A00 = 0x80088A00; +func_80088B9C = 0x80088B9C; +func_80088BD8 = 0x80088BD8; +func_80088C1C = 0x80088C1C; +func_80089024 = 0x80089024; +func_800892B4 = 0x800892B4; +func_800894EC = 0x800894EC; +func_80089618 = 0x80089618; +func_80089968 = 0x80089968; +func_80089AB0 = 0x80089AB0; +func_80089ABC = 0x80089ABC; +func_80089B08 = 0x80089B08; +func_80089EDC = 0x80089EDC; +func_8008A000 = 0x8008A000; +func_8008A114 = 0x8008A114; +func_8008A174 = 0x8008A174; +func_8008A240 = 0x8008A240; +func_8008A414 = 0x8008A414; +func_8008A718 = 0x8008A718; +func_8008A8A8 = 0x8008A8A8; +func_8008AB58 = 0x8008AB58; +func_8008ABD4 = 0x8008ABD4; +func_8008AC9C = 0x8008AC9C; +func_8008AD8C = 0x8008AD8C; +func_8008B1EC = 0x8008B1EC; +func_8008B440 = 0x8008B440; +func_8008B50C = 0x8008B50C; +func_8008B544 = 0x8008B544; +func_8008B910 = 0x8008B910; +func_8008B938 = 0x8008B938; +func_8008C870 = 0x8008C870; +func_8008C890 = 0x8008C890; +func_8008C9A8 = 0x8008C9A8; +func_8008CD9C = 0x8008CD9C; +func_8008CF14 = 0x8008CF14; +func_8008D124 = 0x8008D124; +func_8008D6E8 = 0x8008D6E8; +func_8008D850 = 0x8008D850; +func_8008D924 = 0x8008D924; +func_8008DBF0 = 0x8008DBF0; +func_8008DDB0 = 0x8008DDB0; +func_8008DFE4 = 0x8008DFE4; +func_8008E178 = 0x8008E178; +func_8008E1BC = 0x8008E1BC; +func_8008E28C = 0x8008E28C; +func_8008E420 = 0x8008E420; +func_8008E520 = 0x8008E520; +func_8008E788 = 0x8008E788; +func_8008EAB4 = 0x8008EAB4; +func_8008EC1C = 0x8008EC1C; +func_8008ED18 = 0x8008ED18; +func_8008EE24 = 0x8008EE24; +func_8008F168 = 0x8008F168; +func_8008F218 = 0x8008F218; +func_8008F404 = 0x8008F404; +func_8008F6C4 = 0x8008F6C4; +func_8008FC6C = 0x8008FC6C; +func_8008FDE4 = 0x8008FDE4; +func_80090088 = 0x80090088; +func_80090234 = 0x80090234; +func_800902FC = 0x800902FC; +func_8009050C = 0x8009050C; +func_80091878 = 0x80091878; +func_80091AE0 = 0x80091AE0; +func_80091C44 = 0x80091C44; +func_80092274 = 0x80092274; +func_800922C4 = 0x800922C4; +func_80092390 = 0x80092390; +func_8009245C = 0x8009245C; +func_80092528 = 0x80092528; +func_80093998 = 0x80093998; +func_800942A0 = 0x800942A0; +func_80094478 = 0x80094478; +func_80094650 = 0x80094650; +func_800947E4 = 0x800947E4; +func_80094908 = 0x80094908; +func_80094BA8 = 0x80094BA8; +func_80094FAC = 0x80094FAC; +func_800954EC = 0x800954EC; +func_80095780 = 0x80095780; +func_800957D4 = 0x800957D4; +func_80095818 = 0x80095818; +func_8009585C = 0x8009585C; +func_800958A0 = 0x800958A0; +func_80096174 = 0x80096174; +func_80096820 = 0x80096820; +func_800968A0 = 0x800968A0; +func_800968F8 = 0x800968F8; +func_8009694C = 0x8009694C; +func_80096D4C = 0x80096D4C; +func_80097328 = 0x80097328; +func_80097368 = 0x80097368; +func_80097658 = 0x80097658; +func_80097954 = 0x80097954; +func_80097C18 = 0x80097C18; +func_80097C58 = 0x80097C58; +func_80098694 = 0x80098694; +func_800986CC = 0x800986CC; +func_80098B7C = 0x80098B7C; +func_80098C88 = 0x80098C88; +func_80098E3C = 0x80098E3C; +func_80099074 = 0x80099074; +func_80099270 = 0x80099270; +func_800995C4 = 0x800995C4; +func_80099918 = 0x80099918; +func_80099C8C = 0x80099C8C; +func_8009A00C = 0x8009A00C; +func_8009A368 = 0x8009A368; +func_8009A61C = 0x8009A61C; +func_8009A8E4 = 0x8009A8E4; +func_8009AB9C = 0x8009AB9C; +func_8009AE64 = 0x8009AE64; +func_8009B138 = 0x8009B138; +func_8009B400 = 0x8009B400; +func_8009B6D4 = 0x8009B6D4; +func_8009B988 = 0x8009B988; +func_8009BC54 = 0x8009BC54; +func_8009BF2C = 0x8009BF2C; +func_8009C210 = 0x8009C210; +func_8009C4C4 = 0x8009C4C4; +func_8009C61C = 0x8009C61C; +func_8009C6B8 = 0x8009C6B8; +func_8009C704 = 0x8009C704; +func_8009CB5C = 0x8009CB5C; +func_8009CDF0 = 0x8009CDF0; +func_8009D454 = 0x8009D454; +func_8009DD68 = 0x8009DD68; +func_8009DF5C = 0x8009DF5C; +func_8009E148 = 0x8009E148; +func_8009E29C = 0x8009E29C; +func_8009E524 = 0x8009E524; +func_8009E880 = 0x8009E880; +func_8009E950 = 0x8009E950; +func_8009EB3C = 0x8009EB3C; +func_8009EBE4 = 0x8009EBE4; +func_8009EE38 = 0x8009EE38; +func_8009EF14 = 0x8009EF14; +func_8009EF80 = 0x8009EF80; +func_8009F4AC = 0x8009F4AC; +func_8009F5AC = 0x8009F5AC; +func_8009F690 = 0x8009F690; +func_800A05C8 = 0x800A05C8; +func_800A0650 = 0x800A0650; +func_800A06C0 = 0x800A06C0; +func_800A0A3C = 0x800A0A3C; +func_800A0C60 = 0x800A0C60; +func_800A0DC0 = 0x800A0DC0; +func_800A0F10 = 0x800A0F10; +func_800A0F70 = 0x800A0F70; +func_800A0F84 = 0x800A0F84; +func_800A0FAC = 0x800A0FAC; +func_800A1430 = 0x800A1430; +func_800A1670 = 0x800A1670; +func_800A1BF8 = 0x800A1BF8; +func_800A1F04 = 0x800A1F04; +func_800A1F34 = 0x800A1F34; +func_800A22F8 = 0x800A22F8; +func_800A2300 = 0x800A2300; +func_800A257C = 0x800A257C; +func_800A27B0 = 0x800A27B0; +func_800A2814 = 0x800A2814; +func_800A291C = 0x800A291C; +func_800A2D50 = 0x800A2D50; +func_800A2EA0 = 0x800A2EA0; +func_800A2F84 = 0x800A2F84; +func_800A300C = 0x800A300C; +func_800A3054 = 0x800A3054; +func_800A309C = 0x800A309C; +func_800A30CC = 0x800A30CC; +func_800A30FC = 0x800A30FC; +func_800A312C = 0x800A312C; +func_800A3574 = 0x800A3574; +func_800A366C = 0x800A366C; +func_800A36EC = 0x800A36EC; +func_800A39D8 = 0x800A39D8; +func_800A3A54 = 0x800A3A54; +func_800A3AA0 = 0x800A3AA0; +func_800A3CB0 = 0x800A3CB0; +func_800A427C = 0x800A427C; +func_800A43C4 = 0x800A43C4; +func_800A48AC = 0x800A48AC; +func_800A495C = 0x800A495C; +func_800A503C = 0x800A503C; +func_800A52EC = 0x800A52EC; +func_800A56CC = 0x800A56CC; +func_800A57EC = 0x800A57EC; +func_800A5864 = 0x800A5864; +func_800A5B8C = 0x800A5B8C; +func_800A77EC = 0x800A77EC; +func_800A8298 = 0x800A8298; +func_800A82F0 = 0x800A82F0; +func_800A8320 = 0x800A8320; +func_800A895C = 0x800A895C; +func_800A8A00 = 0x800A8A00; +func_800A8AAC = 0x800A8AAC; +func_800A9278 = 0x800A9278; +func_800A9638 = 0x800A9638; +func_800A9A28 = 0x800A9A28; +func_800A9AA4 = 0x800A9AA4; +func_800A9C64 = 0x800A9C64; +func_800A9DA8 = 0x800A9DA8; +func_800AA07C = 0x800AA07C; +func_800AA100 = 0x800AA100; +func_800AA1DC = 0x800AA1DC; +func_800AA7D8 = 0x800AA7D8; +func_800AAA10 = 0x800AAA10; +func_800AAD80 = 0x800AAD80; +func_800AAF40 = 0x800AAF40; +func_800AB260 = 0x800AB260; +func_800AB48C = 0x800AB48C; +func_800ABC98 = 0x800ABC98; +func_800AC068 = 0x800AC068; +func_800AC914 = 0x800AC914; +func_800AD0AC = 0x800AD0AC; +func_800AD180 = 0x800AD180; +func_800ADF5C = 0x800ADF5C; +func_800AF150 = 0x800AF150; +func_800AF2E0 = 0x800AF2E0; +func_800AF594 = 0x800AF594; +func_800AFC00 = 0x800AFC00; +func_800AFC20 = 0x800AFC20; +func_800B0030 = 0x800B0030; +func_800B0338 = 0x800B0338; +func_800B0A04 = 0x800B0A04; +func_800B10D0 = 0x800B10D0; +func_800B1180 = 0x800B1180; +func_800B1204 = 0x800B1204; +func_800B1210 = 0x800B1210; +func_800B12D4 = 0x800B12D4; +func_800B14E8 = 0x800B14E8; +func_800B171C = 0x800B171C; +func_800B18E0 = 0x800B18E0; +func_800B26E0 = 0x800B26E0; +func_800B2D54 = 0x800B2D54; +func_800B2FE0 = 0x800B2FE0; +func_800B33E0 = 0x800B33E0; +func_800B386C = 0x800B386C; +func_800B3C20 = 0x800B3C20; +func_800B3F74 = 0x800B3F74; +func_800B41A8 = 0x800B41A8; +func_800B4208 = 0x800B4208; +func_800B4404 = 0x800B4404; +func_800B49D4 = 0x800B49D4; +func_800B5350 = 0x800B5350; +func_800B5550 = 0x800B5550; +func_800B56C8 = 0x800B56C8; +func_800B56F0 = 0x800B56F0; +func_800B5DE0 = 0x800B5DE0; +func_800B5E24 = 0x800B5E24; +func_800B5F28 = 0x800B5F28; +func_800B5F58 = 0x800B5F58; +func_800B5F88 = 0x800B5F88; +func_800B5FB8 = 0x800B5FB8; +func_800B5FE8 = 0x800B5FE8; +func_800B6018 = 0x800B6018; +func_800B6130 = 0x800B6130; +func_800B6160 = 0x800B6160; +func_800B6190 = 0x800B6190; +func_800B62A8 = 0x800B62A8; +func_800B62D8 = 0x800B62D8; +func_800B6308 = 0x800B6308; +func_800B6338 = 0x800B6338; +func_800B6368 = 0x800B6368; +func_800B6398 = 0x800B6398; +func_800B64B0 = 0x800B64B0; +func_800B64E0 = 0x800B64E0; +func_800B65F8 = 0x800B65F8; +func_800B6628 = 0x800B6628; +func_800B6740 = 0x800B6740; +func_800B6770 = 0x800B6770; +func_800B67A0 = 0x800B67A0; +func_800B68B8 = 0x800B68B8; +func_800B69D0 = 0x800B69D0; +func_800B6A00 = 0x800B6A00; +func_800B6A30 = 0x800B6A30; +func_800B6B48 = 0x800B6B48; +func_800B6C60 = 0x800B6C60; +func_800B6D78 = 0x800B6D78; +func_800B6E90 = 0x800B6E90; +func_800B6EC0 = 0x800B6EC0; +func_800B6FD8 = 0x800B6FD8; +func_800B70F0 = 0x800B70F0; +func_800B7120 = 0x800B7120; +func_800B7150 = 0x800B7150; +func_800B7180 = 0x800B7180; +func_800B71B0 = 0x800B71B0; +func_800B71E0 = 0x800B71E0; +func_800B72F8 = 0x800B72F8; +func_800B7410 = 0x800B7410; +func_800B7440 = 0x800B7440; +func_800B7470 = 0x800B7470; +func_800B74A0 = 0x800B74A0; +func_800B74D0 = 0x800B74D0; +func_800B7500 = 0x800B7500; +func_800B7530 = 0x800B7530; +func_800B7560 = 0x800B7560; +func_800B7590 = 0x800B7590; +func_800B75C0 = 0x800B75C0; +func_800B75F0 = 0x800B75F0; +func_800B7620 = 0x800B7620; +func_800B7650 = 0x800B7650; +func_800B7770 = 0x800B7770; +func_800B77CC = 0x800B77CC; +func_800B7818 = 0x800B7818; +func_800B7AF8 = 0x800B7AF8; +func_800B8398 = 0x800B8398; +func_800B85E0 = 0x800B85E0; +func_800B9024 = 0x800B9024; +func_800B94A0 = 0x800B94A0; +func_800B9750 = 0x800B9750; +func_800B987C = 0x800B987C; +func_800B98C8 = 0x800B98C8; +func_800B99CC = 0x800B99CC; +func_800B9B34 = 0x800B9B34; +func_800B9C38 = 0x800B9C38; +func_800B9E14 = 0x800B9E14; +func_800B9EE8 = 0x800B9EE8; +func_800B9FEC = 0x800B9FEC; +func_800BA04C = 0x800BA04C; +func_800BA0A4 = 0x800BA0A4; +func_800BA0FC = 0x800BA0FC; +func_800BA154 = 0x800BA154; +func_800BA1A0 = 0x800BA1A0; +func_800BA1EC = 0x800BA1EC; +func_800BA238 = 0x800BA238; +func_800BA290 = 0x800BA290; +func_800BA2E8 = 0x800BA2E8; +func_800BA340 = 0x800BA340; +func_800BA398 = 0x800BA398; +func_800BA4C4 = 0x800BA4C4; +func_800BA710 = 0x800BA710; +func_800BA75C = 0x800BA75C; +func_800BA7B4 = 0x800BA7B4; +func_800BA884 = 0x800BA884; +func_800BAABC = 0x800BAABC; +func_800BAB14 = 0x800BAB14; +func_800BAB60 = 0x800BAB60; +func_800BAEFC = 0x800BAEFC; +func_800BAF04 = 0x800BAF04; +func_800BB138 = 0x800BB138; +func_800BB3A8 = 0x800BB3A8; +func_800BB60C = 0x800BB60C; +func_800BB9CC = 0x800BB9CC; +func_800BBD50 = 0x800BBD50; +func_800BBE20 = 0x800BBE20; +func_800BBE84 = 0x800BBE84; +func_800BBFA8 = 0x800BBFA8; +func_800BC08C = 0x800BC08C; +func_800BC224 = 0x800BC224; +func_800BC644 = 0x800BC644; +func_800BC7F8 = 0x800BC7F8; +func_800BCA54 = 0x800BCA54; +func_800BD2F4 = 0x800BD2F4; +func_800BD33C = 0x800BD33C; +func_800BD584 = 0x800BD584; +func_800BD804 = 0x800BD804; +func_800BD86C = 0x800BD86C; +func_800BD978 = 0x800BD978; +func_800BDA18 = 0x800BDA18; +func_800BDAAC = 0x800BDAAC; +func_800BDBB4 = 0x800BDBB4; +func_800BDD2C = 0x800BDD2C; +func_800BDDB8 = 0x800BDDB8; +func_800BDF20 = 0x800BDF20; +func_800BE124 = 0x800BE124; +func_800BE1E0 = 0x800BE1E0; +func_800BE410 = 0x800BE410; +func_800BE680 = 0x800BE680; +func_800BE738 = 0x800BE738; +func_800BE748 = 0x800BE748; +func_800BE778 = 0x800BE778; +func_800BE7A8 = 0x800BE7A8; +func_800BE804 = 0x800BE804; +func_800BE80C = 0x800BE80C; +func_800BE8B8 = 0x800BE8B8; +func_800BEFE8 = 0x800BEFE8; +func_800BF020 = 0x800BF020; +func_800BF1FC = 0x800BF1FC; +func_800BF2DC = 0x800BF2DC; +func_800BF2E4 = 0x800BF2E4; +func_800BF390 = 0x800BF390; +func_800BF814 = 0x800BF814; +func_800BF980 = 0x800BF980; +func_800BF9E0 = 0x800BF9E0; +func_800BFA2C = 0x800BFA2C; +func_800BFA78 = 0x800BFA78; +func_800BFAAC = 0x800BFAAC; +func_800BFC38 = 0x800BFC38; +func_800BFEA0 = 0x800BFEA0; +func_800C007C = 0x800C007C; +func_800C0100 = 0x800C0100; +func_800C01D4 = 0x800C01D4; +func_800C02E4 = 0x800C02E4; +D_800C0430 = 0x800C0430; +D_800C0760 = 0x800C0760; +D_800C07B0 = 0x800C07B0; +D_800C0BE0 = 0x800C0BE0; +D_800C0E00 = 0x800C0E00; +D_800C0F20 = 0x800C0F20; +D_800C1720 = 0x800C1720; +D_800C1730 = 0x800C1730; +D_800C1770 = 0x800C1770; +D_800C17B0 = 0x800C17B0; +D_800C17F0 = 0x800C17F0; +D_800C17FC = 0x800C17FC; +D_800C1808 = 0x800C1808; +D_800C1814 = 0x800C1814; +D_800C1820 = 0x800C1820; +D_800C182C = 0x800C182C; +D_800C1840 = 0x800C1840; +D_800C18C0 = 0x800C18C0; +D_800C19C0 = 0x800C19C0; +D_800C1A08 = 0x800C1A08; +D_800C1A20 = 0x800C1A20; +D_800C1B00 = 0x800C1B00; +D_800C20A0 = 0x800C20A0; +D_800C20BC = 0x800C20BC; +D_800C2238 = 0x800C2238; +D_800C2460 = 0x800C2460; +D_800C2518 = 0x800C2518; +D_800C2690 = 0x800C2690; +D_800C2958 = 0x800C2958; +D_800C2A70 = 0x800C2A70; +D_800C2A90 = 0x800C2A90; +D_800C2E50 = 0x800C2E50; +D_800C2E6C = 0x800C2E6C; +D_800C2E88 = 0x800C2E88; +D_800C2E8C = 0x800C2E8C; +D_800C2E90 = 0x800C2E90; +D_800C2E94 = 0x800C2E94; +D_800C2E98 = 0x800C2E98; +D_800C2EA4 = 0x800C2EA4; +D_800C2EAC = 0x800C2EAC; +D_800C2EB0 = 0x800C2EB0; +D_800C2EB4 = 0x800C2EB4; +D_800C2EB8 = 0x800C2EB8; +D_800C2EBC = 0x800C2EBC; +D_800C2EC0 = 0x800C2EC0; +D_800C2EC4 = 0x800C2EC4; +D_800C2EC8 = 0x800C2EC8; +D_800C2ED0 = 0x800C2ED0; +D_800C2ED4 = 0x800C2ED4; +D_800C2ED8 = 0x800C2ED8; +D_800C2EDC = 0x800C2EDC; +D_800C2FA8 = 0x800C2FA8; +D_800C2FC8 = 0x800C2FC8; +D_800C2FE0 = 0x800C2FE0; +D_800C2FE4 = 0x800C2FE4; +D_800C2FE8 = 0x800C2FE8; +D_800C2FEC = 0x800C2FEC; +D_800C2FF0 = 0x800C2FF0; +D_800C2FF4 = 0x800C2FF4; +D_800C2FF8 = 0x800C2FF8; +D_800C3054 = 0x800C3054; +D_800C3164 = 0x800C3164; +D_800C316C = 0x800C316C; +D_800C44F4 = 0x800C44F4; +D_800C44F8 = 0x800C44F8; +D_800C44FC = 0x800C44FC; +D_800C4500 = 0x800C4500; +D_800C4504 = 0x800C4504; +D_800C4508 = 0x800C4508; +D_800C4588 = 0x800C4588; +D_800C458C = 0x800C458C; +D_800C460C = 0x800C460C; +D_800C4640 = 0x800C4640; +D_800C4650 = 0x800C4650; +D_800C4660 = 0x800C4660; +D_800C4670 = 0x800C4670; +D_800C4680 = 0x800C4680; +D_800C4690 = 0x800C4690; +D_800C46A0 = 0x800C46A0; +D_800C46B0 = 0x800C46B0; +D_800C46C0 = 0x800C46C0; +D_800C46D0 = 0x800C46D0; +D_800C46E0 = 0x800C46E0; +D_800C46F0 = 0x800C46F0; +D_800C4700 = 0x800C4700; +D_800C4710 = 0x800C4710; +D_800C4720 = 0x800C4720; +D_800C4730 = 0x800C4730; +D_800C4748 = 0x800C4748; +D_800C4758 = 0x800C4758; +D_800C4768 = 0x800C4768; +D_800C4778 = 0x800C4778; +D_800C4788 = 0x800C4788; +D_800C4798 = 0x800C4798; +D_800C47A8 = 0x800C47A8; +D_800C47B8 = 0x800C47B8; +D_800C47C8 = 0x800C47C8; +D_800C47D8 = 0x800C47D8; +D_800C47E8 = 0x800C47E8; +D_800C47F8 = 0x800C47F8; +D_800C4828 = 0x800C4828; +D_800C4D9C = 0x800C4D9C; +D_800C4DA0 = 0x800C4DA0; +D_800C4DA4 = 0x800C4DA4; +D_800C4DA8 = 0x800C4DA8; +D_800C4DAC = 0x800C4DAC; +D_800C4DB0 = 0x800C4DB0; +D_800C4DB4 = 0x800C4DB4; +D_800C4DC0 = 0x800C4DC0; +D_800C4DC4 = 0x800C4DC4; +D_800C4DC8 = 0x800C4DC8; +D_800C4DCC = 0x800C4DCC; +D_800C4DD0 = 0x800C4DD0; +D_800C4DD4 = 0x800C4DD4; +D_800C4DD8 = 0x800C4DD8; +D_800C4DDC = 0x800C4DDC; +D_800C4DE0 = 0x800C4DE0; +D_800C4DE4 = 0x800C4DE4; +D_800C4DE8 = 0x800C4DE8; +D_800C4DF0 = 0x800C4DF0; +D_800C4E00 = 0x800C4E00; +D_800C4E50 = 0x800C4E50; +D_800C4EA0 = 0x800C4EA0; +D_800C4EF0 = 0x800C4EF0; +D_800C4EF4 = 0x800C4EF4; +D_800C4EF8 = 0x800C4EF8; +D_800C4EFC = 0x800C4EFC; +D_800C4F00 = 0x800C4F00; +D_800C4F04 = 0x800C4F04; +D_800C4F08 = 0x800C4F08; +D_800C4F10 = 0x800C4F10; +D_800C4F14 = 0x800C4F14; +D_800C4F18 = 0x800C4F18; +D_800C4F1C = 0x800C4F1C; +D_800C4F20 = 0x800C4F20; +D_800C4F24 = 0x800C4F24; +D_800C4F28 = 0x800C4F28; +D_800C4F2C = 0x800C4F2C; +D_800C4F30 = 0x800C4F30; +D_800C4F34 = 0x800C4F34; +D_800C4F38 = 0x800C4F38; +D_800C4F3C = 0x800C4F3C; +D_800C4F40 = 0x800C4F40; +D_800C4F50 = 0x800C4F50; +D_800C4F74 = 0x800C4F74; +D_800C4FA0 = 0x800C4FA0; +D_800C4FB0 = 0x800C4FB0; +D_800C4FC0 = 0x800C4FC0; +D_800C4FC8 = 0x800C4FC8; +D_800C4FCC = 0x800C4FCC; +D_800C4FD0 = 0x800C4FD0; +D_800C4FD4 = 0x800C4FD4; +D_800C4FE0 = 0x800C4FE0; +D_800C5000 = 0x800C5000; +D_800C5030 = 0x800C5030; +D_800C5060 = 0x800C5060; +D_800C5064 = 0x800C5064; +D_800C5068 = 0x800C5068; +D_800C5070 = 0x800C5070; +D_800C5080 = 0x800C5080; +D_800C5090 = 0x800C5090; +D_800C50A4 = 0x800C50A4; +D_800C6630 = 0x800C6630; +D_800C663C = 0x800C663C; +D_800C666C = 0x800C666C; +D_800C667C = 0x800C667C; +D_800C668C = 0x800C668C; +D_800C669C = 0x800C669C; +D_800C66CC = 0x800C66CC; +D_800C66DC = 0x800C66DC; +D_800C66EC = 0x800C66EC; +D_800C66F0 = 0x800C66F0; +D_800C6738 = 0x800C6738; +D_800C6744 = 0x800C6744; +D_800C6750 = 0x800C6750; +D_800C6760 = 0x800C6760; +D_800C676C = 0x800C676C; +D_800C6778 = 0x800C6778; +D_800C67A0 = 0x800C67A0; +D_800C67A4 = 0x800C67A4; +D_800C67A8 = 0x800C67A8; +D_800C67AC = 0x800C67AC; +D_800C67B8 = 0x800C67B8; +D_800C67BC = 0x800C67BC; +D_800C67C0 = 0x800C67C0; +D_800C67C4 = 0x800C67C4; +D_800C67D0 = 0x800C67D0; +D_800C67D4 = 0x800C67D4; +D_800C67DC = 0x800C67DC; +D_800C67FC = 0x800C67FC; +D_800C6810 = 0x800C6810; +D_800C6830 = 0x800C6830; +D_800C6844 = 0x800C6844; +D_800C6878 = 0x800C6878; +D_800C68AC = 0x800C68AC; +D_800C68CC = 0x800C68CC; +D_800C68E0 = 0x800C68E0; +D_800C6900 = 0x800C6900; +D_800C6914 = 0x800C6914; +D_800C6934 = 0x800C6934; +D_800C6943 = 0x800C6943; +D_800C695C = 0x800C695C; +D_800C696B = 0x800C696B; +D_800C6984 = 0x800C6984; +D_800C6998 = 0x800C6998; +D_800C69B8 = 0x800C69B8; +D_800C69CC = 0x800C69CC; +D_800C69EC = 0x800C69EC; +D_800C69F4 = 0x800C69F4; +D_800C69FC = 0x800C69FC; +D_800C6A04 = 0x800C6A04; +D_800C6A14 = 0x800C6A14; +D_800C6A24 = 0x800C6A24; +D_800C6A30 = 0x800C6A30; +D_800C6A32 = 0x800C6A32; +D_800C6AA0 = 0x800C6AA0; +D_800C6AA4 = 0x800C6AA4; +D_800C6AA8 = 0x800C6AA8; +D_800C6AB0 = 0x800C6AB0; +D_800C6AB4 = 0x800C6AB4; +D_800C6AC0 = 0x800C6AC0; +D_800C6AC4 = 0x800C6AC4; +D_800C6AC8 = 0x800C6AC8; +D_800C6ACC = 0x800C6ACC; +D_800C6ADC = 0x800C6ADC; +D_800C6AE0 = 0x800C6AE0; +D_800C6AEC = 0x800C6AEC; +D_800C6B00 = 0x800C6B00; +D_800C6B30 = 0x800C6B30; +D_800C6B3C = 0x800C6B3C; +D_800C6B40 = 0x800C6B40; +D_800C6B70 = 0x800C6B70; +D_800C6B80 = 0x800C6B80; +D_800C6B90 = 0x800C6B90; +D_800C6BA0 = 0x800C6BA0; +D_800C6BB0 = 0x800C6BB0; +D_800C6BC0 = 0x800C6BC0; +D_800C6BD0 = 0x800C6BD0; +D_800C6BE0 = 0x800C6BE0; +D_800C6BF0 = 0x800C6BF0; +D_800C6BFC = 0x800C6BFC; +D_800C6C08 = 0x800C6C08; +D_800C6C14 = 0x800C6C14; +D_800C6C20 = 0x800C6C20; +D_800C6C2C = 0x800C6C2C; +D_800C6C38 = 0x800C6C38; +D_800C6C44 = 0x800C6C44; +D_800C6C50 = 0x800C6C50; +D_800C6C5C = 0x800C6C5C; +D_800C6C8C = 0x800C6C8C; +D_800C6CB0 = 0x800C6CB0; +D_800C6D10 = 0x800C6D10; +D_800C6D30 = 0x800C6D30; +D_800C6D38 = 0x800C6D38; +D_800C6D54 = 0x800C6D54; +D_800C6D74 = 0x800C6D74; +D_800C6D94 = 0x800C6D94; +D_800C6DB0 = 0x800C6DB0; +D_800C6DB4 = 0x800C6DB4; +D_800C6DB8 = 0x800C6DB8; +D_800C6DC0 = 0x800C6DC0; +D_800C6DC4 = 0x800C6DC4; +D_800C6DC8 = 0x800C6DC8; +D_800C6DCC = 0x800C6DCC; +D_800C6DD0 = 0x800C6DD0; +D_800C6DD4 = 0x800C6DD4; +D_800C6DD8 = 0x800C6DD8; +D_800C6DE4 = 0x800C6DE4; +D_800C6DF4 = 0x800C6DF4; +D_800C6E00 = 0x800C6E00; +D_800C6E08 = 0x800C6E08; +D_800C6E18 = 0x800C6E18; +D_800C6E2C = 0x800C6E2C; +D_800C6E30 = 0x800C6E30; +D_800C6E34 = 0x800C6E34; +D_800C6E38 = 0x800C6E38; +D_800C6E48 = 0x800C6E48; +D_800C6E4C = 0x800C6E4C; +D_800C6E58 = 0x800C6E58; +D_800C6E64 = 0x800C6E64; +D_800C6E70 = 0x800C6E70; +D_800C6E7C = 0x800C6E7C; +D_800C6EC8 = 0x800C6EC8; +D_800C6ED4 = 0x800C6ED4; +D_800C6EF4 = 0x800C6EF4; +D_800C6F20 = 0x800C6F20; +D_800C6F24 = 0x800C6F24; +D_800C6F28 = 0x800C6F28; +D_800C6F2C = 0x800C6F2C; +D_800C6F3C = 0x800C6F3C; +D_800C6F50 = 0x800C6F50; +D_800C6F54 = 0x800C6F54; +D_800C6FEC = 0x800C6FEC; +D_800C737C = 0x800C737C; +D_800C7414 = 0x800C7414; +D_800C74AC = 0x800C74AC; +D_800C7544 = 0x800C7544; +D_800C75DC = 0x800C75DC; +D_800C7674 = 0x800C7674; +D_800C77A4 = 0x800C77A4; +D_800C7B34 = 0x800C7B34; +D_800C7C64 = 0x800C7C64; +D_800C7CFC = 0x800C7CFC; +D_800C7D94 = 0x800C7D94; +D_800C7E2C = 0x800C7E2C; +D_800C7F5C = 0x800C7F5C; +D_800C7FF4 = 0x800C7FF4; +D_800C808C = 0x800C808C; +D_800C8124 = 0x800C8124; +D_800C81BC = 0x800C81BC; +D_800C8254 = 0x800C8254; +D_800C82EC = 0x800C82EC; +D_800C841C = 0x800C841C; +D_800C84B4 = 0x800C84B4; +D_800C854C = 0x800C854C; +D_800C85E4 = 0x800C85E4; +D_800C8714 = 0x800C8714; +D_800C87AC = 0x800C87AC; +D_800C8974 = 0x800C8974; +D_800C8978 = 0x800C8978; +D_800C8994 = 0x800C8994; +D_800C8A10 = 0x800C8A10; +D_800C8A2C = 0x800C8A2C; +D_800C8A48 = 0x800C8A48; +D_800C8A64 = 0x800C8A64; +D_800C8AB8 = 0x800C8AB8; +D_800C8AD4 = 0x800C8AD4; +D_800C8AD8 = 0x800C8AD8; +D_800C8AF4 = 0x800C8AF4; +D_800C8B10 = 0x800C8B10; +D_800C8B2C = 0x800C8B2C; +D_800C8B48 = 0x800C8B48; +D_800C8B68 = 0x800C8B68; +D_800C8B84 = 0x800C8B84; +D_800C8BA0 = 0x800C8BA0; +D_800C8BBC = 0x800C8BBC; +D_800C8BD8 = 0x800C8BD8; +D_800C8CC4 = 0x800C8CC4; +D_800CC504 = 0x800CC504; +D_800CC510 = 0x800CC510; +D_800CC550 = 0x800CC550; +D_800CC558 = 0x800CC558; +D_800CC5CC = 0x800CC5CC; +D_800CC664 = 0x800CC664; +D_800CC67C = 0x800CC67C; +D_800CC6A8 = 0x800CC6A8; +D_800CC6B4 = 0x800CC6B4; +D_800CC6C8 = 0x800CC6C8; +D_800CC6E0 = 0x800CC6E0; +D_800CC704 = 0x800CC704; +D_800CC728 = 0x800CC728; +D_800CC748 = 0x800CC748; +D_800CC784 = 0x800CC784; +D_800CC7AC = 0x800CC7AC; +D_800CC7E0 = 0x800CC7E0; +D_800CC7F0 = 0x800CC7F0; +D_800CC804 = 0x800CC804; +D_800CC81C = 0x800CC81C; +D_800CC838 = 0x800CC838; +D_800CC860 = 0x800CC860; +D_800CC86C = 0x800CC86C; +D_800CC88C = 0x800CC88C; +D_800CC898 = 0x800CC898; +D_800CC8A4 = 0x800CC8A4; +D_800CC8B0 = 0x800CC8B0; +D_800CC8BC = 0x800CC8BC; +D_800CC8C8 = 0x800CC8C8; +D_800CC8D4 = 0x800CC8D4; +D_800CC8E0 = 0x800CC8E0; +D_800CC920 = 0x800CC920; +D_800CC940 = 0x800CC940; +D_800CC994 = 0x800CC994; +D_800CC9FC = 0x800CC9FC; +D_800CCA64 = 0x800CCA64; +D_800CCAAC = 0x800CCAAC; +D_800CCAF4 = 0x800CCAF4; +D_800CCB20 = 0x800CCB20; +D_800CCB24 = 0x800CCB24; +D_800CCB30 = 0x800CCB30; +D_800CCB34 = 0x800CCB34; +D_800CCB54 = 0x800CCB54; +D_800CCB64 = 0x800CCB64; +D_800CCBA4 = 0x800CCBA4; +D_800CCBB0 = 0x800CCBB0; +D_800CCBBC = 0x800CCBBC; +D_800CCBD0 = 0x800CCBD0; +D_800CCBDC = 0x800CCBDC; +D_800CD95C = 0x800CD95C; +D_800CD95F = 0x800CD95F; +D_800CD974 = 0x800CD974; +D_800CDC14 = 0x800CDC14; +D_800CDD34 = 0x800CDD34; +D_800CDE30 = 0x800CDE30; +D_800CE06C = 0x800CE06C; +D_800CE080 = 0x800CE080; +D_800CE09C = 0x800CE09C; +D_800CE0C8 = 0x800CE0C8; +D_800CE0D4 = 0x800CE0D4; +D_800CE2DC = 0x800CE2DC; +D_800CE32C = 0x800CE32C; +D_800CE344 = 0x800CE344; +D_800CE398 = 0x800CE398; +D_800CE3EC = 0x800CE3EC; +D_800CE440 = 0x800CE440; +D_800CE478 = 0x800CE478; +D_800CE484 = 0x800CE484; +D_800CE488 = 0x800CE488; +D_800CE48C = 0x800CE48C; +D_800CE490 = 0x800CE490; +D_800CE4F0 = 0x800CE4F0; +D_800CE510 = 0x800CE510; +D_800CE54C = 0x800CE54C; +D_800CE580 = 0x800CE580; +D_800CE590 = 0x800CE590; +D_800CE594 = 0x800CE594; +D_800CE598 = 0x800CE598; +D_800CE5A0 = 0x800CE5A0; +D_800CE5E0 = 0x800CE5E0; +D_800CE5F8 = 0x800CE5F8; +D_800CE604 = 0x800CE604; +D_800CE610 = 0x800CE610; +D_800CE634 = 0x800CE634; +D_800CE664 = 0x800CE664; +D_800CE678 = 0x800CE678; +D_800CE68C = 0x800CE68C; +D_800CE69C = 0x800CE69C; +D_800CE83C = 0x800CE83C; +D_800CE844 = 0x800CE844; +D_800CE84C = 0x800CE84C; +D_800CE854 = 0x800CE854; +D_800CE85C = 0x800CE85C; +D_800CE864 = 0x800CE864; +D_800CE86C = 0x800CE86C; +D_800CE874 = 0x800CE874; +D_800CE89C = 0x800CE89C; +D_800CE8A0 = 0x800CE8A0; +D_800CE8AC = 0x800CE8AC; +D_800CE8B8 = 0x800CE8B8; +D_800CE8C8 = 0x800CE8C8; +D_800CE8D4 = 0x800CE8D4; +D_800CE8E0 = 0x800CE8E0; +D_800CE928 = 0x800CE928; +D_800CE95C = 0x800CE95C; +D_800CE9A4 = 0x800CE9A4; +D_800CE9A8 = 0x800CE9A8; +D_800CEA28 = 0x800CEA28; +D_800CEA38 = 0x800CEA38; +D_800CEA48 = 0x800CEA48; +D_800CEA4C = 0x800CEA4C; +D_800CEA50 = 0x800CEA50; +D_800CEA54 = 0x800CEA54; +D_800CEA7C = 0x800CEA7C; +D_800CEA8C = 0x800CEA8C; +D_800CEABC = 0x800CEABC; +D_800CEAEC = 0x800CEAEC; +D_800CEB1C = 0x800CEB1C; +D_800CEB4C = 0x800CEB4C; +D_800CEB7C = 0x800CEB7C; +D_800CEBAC = 0x800CEBAC; +D_800CEBDC = 0x800CEBDC; +D_800CEC0C = 0x800CEC0C; +D_800CEC1C = 0x800CEC1C; +D_800CEC2C = 0x800CEC2C; +D_800CEC3C = 0x800CEC3C; +D_800CEC4C = 0x800CEC4C; +D_800CEC5C = 0x800CEC5C; +D_800CEC6C = 0x800CEC6C; +D_800CEC7C = 0x800CEC7C; +D_800CEC8C = 0x800CEC8C; +D_800CEC9C = 0x800CEC9C; +D_800CECB0 = 0x800CECB0; +D_800CECC4 = 0x800CECC4; +D_800CECD4 = 0x800CECD4; +D_800CECE4 = 0x800CECE4; +D_800CECF4 = 0x800CECF4; +D_800CED04 = 0x800CED04; +D_800CED14 = 0x800CED14; +D_800CED24 = 0x800CED24; +D_800CED34 = 0x800CED34; +D_800CED38 = 0x800CED38; +D_800CED3C = 0x800CED3C; +D_800CED4C = 0x800CED4C; +D_800CED5C = 0x800CED5C; +D_800CEE3C = 0x800CEE3C; +D_800CEE58 = 0x800CEE58; +D_800CEE5C = 0x800CEE5C; +D_800CEE60 = 0x800CEE60; +D_800CEE6C = 0x800CEE6C; +D_800CEE90 = 0x800CEE90; +D_800CEEB4 = 0x800CEEB4; +D_800CF070 = 0x800CF070; +D_800CF098 = 0x800CF098; +D_800CF0A4 = 0x800CF0A4; +D_800CF0D4 = 0x800CF0D4; +D_800CF110 = 0x800CF110; +D_800CF160 = 0x800CF160; +D_800CF16C = 0x800CF16C; +D_800CF178 = 0x800CF178; +D_800CF1A0 = 0x800CF1A0; +D_800CF1C8 = 0x800CF1C8; +D_800CF1E6 = 0x800CF1E6; +D_800CF1F4 = 0x800CF1F4; +D_800CF220 = 0x800CF220; +D_800CF248 = 0x800CF248; +D_800CF2E8 = 0x800CF2E8; +D_800CF310 = 0x800CF310; +D_800CF388 = 0x800CF388; +D_800CF38C = 0x800CF38C; +D_800CF3B4 = 0x800CF3B4; +D_800CF440 = 0x800CF440; +D_800CF560 = 0x800CF560; +D_800CF570 = 0x800CF570; +D_800CF574 = 0x800CF574; +D_800CF584 = 0x800CF584; +D_800CF594 = 0x800CF594; +D_800CF5A4 = 0x800CF5A4; +D_800CF5B4 = 0x800CF5B4; +D_800CF608 = 0x800CF608; +D_800CF60C = 0x800CF60C; +D_800CF610 = 0x800CF610; +D_800CF614 = 0x800CF614; +D_800CF620 = 0x800CF620; +D_800CF6E0 = 0x800CF6E0; +D_800CF764 = 0x800CF764; +D_800CF7B4 = 0x800CF7B4; +D_800CF838 = 0x800CF838; +D_800CF9A0 = 0x800CF9A0; +D_800CFC50 = 0x800CFC50; +D_800CFC54 = 0x800CFC54; +D_800CFC58 = 0x800CFC58; +D_800CFC5C = 0x800CFC5C; +D_800CFC60 = 0x800CFC60; +D_800CFC64 = 0x800CFC64; +D_800CFC68 = 0x800CFC68; +D_800CFC6C = 0x800CFC6C; +D_800CFC80 = 0x800CFC80; +D_800CFC8C = 0x800CFC8C; +D_800CFC98 = 0x800CFC98; +D_800CFCEC = 0x800CFCEC; +D_800CFD00 = 0x800CFD00; +D_800CFD40 = 0x800CFD40; +D_800CFD88 = 0x800CFD88; +D_800CFDB8 = 0x800CFDB8; +D_800CFDE8 = 0x800CFDE8; +D_800CFDF4 = 0x800CFDF4; +D_800CFE04 = 0x800CFE04; +D_800CFE14 = 0x800CFE14; +D_800CFE24 = 0x800CFE24; +D_800CFE54 = 0x800CFE54; +D_800CFE64 = 0x800CFE64; +D_800CFE7C = 0x800CFE7C; +D_800CFE80 = 0x800CFE80; +D_800CFE81 = 0x800CFE81; +D_800CFE82 = 0x800CFE82; +D_800CFE83 = 0x800CFE83; +D_800CFE85 = 0x800CFE85; +D_800CFE87 = 0x800CFE87; +D_800CFE88 = 0x800CFE88; +D_800CFE89 = 0x800CFE89; +D_800CFE8B = 0x800CFE8B; +D_800CFE8C = 0x800CFE8C; +D_800CFE8D = 0x800CFE8D; +D_800CFE8E = 0x800CFE8E; +D_800CFE90 = 0x800CFE90; +D_800CFE91 = 0x800CFE91; +D_800CFE92 = 0x800CFE92; +D_800CFE9E = 0x800CFE9E; +D_800CFEB0 = 0x800CFEB0; +D_800CFEF8 = 0x800CFEF8; +D_800CFF40 = 0x800CFF40; +D_800CFF88 = 0x800CFF88; +D_800CFFD0 = 0x800CFFD0; +D_800D00A8 = 0x800D00A8; +D_800D00C8 = 0x800D00C8; +D_800D00F0 = 0x800D00F0; +D_800D0138 = 0x800D0138; +D_800D01C8 = 0x800D01C8; +D_800D0210 = 0x800D0210; +D_800D0258 = 0x800D0258; +D_800D02A0 = 0x800D02A0; +D_800D0378 = 0x800D0378; +D_800D03C0 = 0x800D03C0; +D_800D0408 = 0x800D0408; +D_800D0450 = 0x800D0450; +D_800D0498 = 0x800D0498; +D_800D0528 = 0x800D0528; +D_800D0648 = 0x800D0648; +D_800D06D8 = 0x800D06D8; +D_800D0720 = 0x800D0720; +D_800D07B0 = 0x800D07B0; +D_800D07F8 = 0x800D07F8; +D_800D0840 = 0x800D0840; +D_800D08D0 = 0x800D08D0; +D_800D0918 = 0x800D0918; +D_800D09F0 = 0x800D09F0; +D_800D0A38 = 0x800D0A38; +D_800D0A80 = 0x800D0A80; +D_800D0AC8 = 0x800D0AC8; +D_800D0B10 = 0x800D0B10; +D_800D0B58 = 0x800D0B58; +D_800D0BA0 = 0x800D0BA0; +D_800D0BE8 = 0x800D0BE8; +D_800D0C30 = 0x800D0C30; +D_800D0C78 = 0x800D0C78; +D_800D0CC0 = 0x800D0CC0; +D_800D0D50 = 0x800D0D50; +D_800D0E28 = 0x800D0E28; +D_800D0EB8 = 0x800D0EB8; +D_800D0F90 = 0x800D0F90; +D_800D0FD8 = 0x800D0FD8; +D_800D1020 = 0x800D1020; +D_800D10B0 = 0x800D10B0; +D_800D1140 = 0x800D1140; +D_800D11D0 = 0x800D11D0; +D_800D1338 = 0x800D1338; +D_800D1380 = 0x800D1380; +D_800D1410 = 0x800D1410; +D_800D14A0 = 0x800D14A0; +D_800D1578 = 0x800D1578; +D_800D1770 = 0x800D1770; +D_800D1774 = 0x800D1774; +D_800D1778 = 0x800D1778; +D_800D1780 = 0x800D1780; +D_800D1790 = 0x800D1790; +D_800D1794 = 0x800D1794; +D_800D1798 = 0x800D1798; +D_800D179C = 0x800D179C; +D_800D17A0 = 0x800D17A0; +D_800D17A4 = 0x800D17A4; +D_800D17B0 = 0x800D17B0; +D_800D17BC = 0x800D17BC; +D_800D17C8 = 0x800D17C8; +D_800D17D8 = 0x800D17D8; +D_800D17E8 = 0x800D17E8; +D_800D17F8 = 0x800D17F8; +D_800D1820 = 0x800D1820; +D_800D1848 = 0x800D1848; +D_800D1870 = 0x800D1870; +D_800D1880 = 0x800D1880; +D_800D1890 = 0x800D1890; +D_800D18A0 = 0x800D18A0; +D_800D18B0 = 0x800D18B0; +D_800D18C0 = 0x800D18C0; +D_800D18D0 = 0x800D18D0; +D_800D18E0 = 0x800D18E0; +D_800D18F0 = 0x800D18F0; +D_800D18FC = 0x800D18FC; +D_800D190C = 0x800D190C; +D_800D191C = 0x800D191C; +D_800D192C = 0x800D192C; +D_800D193C = 0x800D193C; +D_800D194C = 0x800D194C; +D_800D195C = 0x800D195C; +D_800D196C = 0x800D196C; +D_800D1980 = 0x800D1980; +D_800D1990 = 0x800D1990; +D_800D19A4 = 0x800D19A4; +D_800D19B8 = 0x800D19B8; +D_800D19C8 = 0x800D19C8; +D_800D19D8 = 0x800D19D8; +D_800D19E8 = 0x800D19E8; +D_800D19F8 = 0x800D19F8; +D_800D1A10 = 0x800D1A10; +D_800D1DA0 = 0x800D1DA0; +D_800D1DD0 = 0x800D1DD0; +D_800D1DF8 = 0x800D1DF8; +D_800D1E28 = 0x800D1E28; +D_800D1E64 = 0x800D1E64; +D_800D1EA8 = 0x800D1EA8; +D_800D1EE4 = 0x800D1EE4; +D_800D1F2C = 0x800D1F2C; +D_800D1F70 = 0x800D1F70; +D_800D1FC8 = 0x800D1FC8; +D_800D1FDC = 0x800D1FDC; +D_800D2014 = 0x800D2014; +D_800D2040 = 0x800D2040; +D_800D2094 = 0x800D2094; +D_800D20B0 = 0x800D20B0; +D_800D20E8 = 0x800D20E8; +D_800D2100 = 0x800D2100; +D_800D2150 = 0x800D2150; +D_800D2164 = 0x800D2164; +D_800D21B8 = 0x800D21B8; +D_800D21CC = 0x800D21CC; +D_800D2214 = 0x800D2214; +D_800D2228 = 0x800D2228; +D_800D2268 = 0x800D2268; +D_800D227C = 0x800D227C; +D_800D22C0 = 0x800D22C0; +D_800D22E8 = 0x800D22E8; +D_800D2314 = 0x800D2314; +D_800D2328 = 0x800D2328; +D_800D2378 = 0x800D2378; +D_800D238C = 0x800D238C; +D_800D23D8 = 0x800D23D8; +D_800D23F0 = 0x800D23F0; +D_800D2440 = 0x800D2440; +D_800D245C = 0x800D245C; +D_800D2470 = 0x800D2470; +D_800D249C = 0x800D249C; +D_800D24CC = 0x800D24CC; +D_800D24F8 = 0x800D24F8; +D_800D2524 = 0x800D2524; +D_800D2554 = 0x800D2554; +D_800D2580 = 0x800D2580; +D_800D259C = 0x800D259C; +D_800D25CC = 0x800D25CC; +D_800D25E4 = 0x800D25E4; +D_800D2610 = 0x800D2610; +D_800D2620 = 0x800D2620; +D_800D2648 = 0x800D2648; +D_800D2678 = 0x800D2678; +D_800D2690 = 0x800D2690; +D_800D26C0 = 0x800D26C0; +D_800D26EC = 0x800D26EC; +D_800D271C = 0x800D271C; +D_800D274C = 0x800D274C; +D_800D277C = 0x800D277C; +D_800D27A4 = 0x800D27A4; +D_800D27D0 = 0x800D27D0; +D_800D27F8 = 0x800D27F8; +D_800D2828 = 0x800D2828; +D_800D2848 = 0x800D2848; +D_800D2858 = 0x800D2858; +D_800D2870 = 0x800D2870; +D_800D28A0 = 0x800D28A0; +D_800D28B4 = 0x800D28B4; +D_800D28E0 = 0x800D28E0; +D_800D2908 = 0x800D2908; +D_800D2938 = 0x800D2938; +D_800D2954 = 0x800D2954; +D_800D2984 = 0x800D2984; +D_800D29B0 = 0x800D29B0; +D_800D29C8 = 0x800D29C8; +D_800D29DC = 0x800D29DC; +D_800D2A08 = 0x800D2A08; +D_800D2A38 = 0x800D2A38; +D_800D2A68 = 0x800D2A68; +D_800D2A7C = 0x800D2A7C; +D_800D2A94 = 0x800D2A94; +D_800D2AA4 = 0x800D2AA4; +D_800D2AC0 = 0x800D2AC0; +D_800D2AD8 = 0x800D2AD8; +D_800D2AF4 = 0x800D2AF4; +D_800D2B20 = 0x800D2B20; +D_800D2B48 = 0x800D2B48; +D_800D2B74 = 0x800D2B74; +D_800D2B90 = 0x800D2B90; +D_800D2BB4 = 0x800D2BB4; +D_800D2BD8 = 0x800D2BD8; +D_800D2C08 = 0x800D2C08; +D_800D2C38 = 0x800D2C38; +D_800D2C68 = 0x800D2C68; +D_800D2C98 = 0x800D2C98; +D_800D2CC4 = 0x800D2CC4; +D_800D2CF4 = 0x800D2CF4; +D_800D2D18 = 0x800D2D18; +D_800D2D30 = 0x800D2D30; +D_800D2D48 = 0x800D2D48; +D_800D2D70 = 0x800D2D70; +D_800D2D94 = 0x800D2D94; +D_800D2DC0 = 0x800D2DC0; +D_800D2DDC = 0x800D2DDC; +D_800D2E08 = 0x800D2E08; +D_800D2E38 = 0x800D2E38; +D_800D2E4C = 0x800D2E4C; +D_800D2E74 = 0x800D2E74; +D_800D2E9C = 0x800D2E9C; +D_800D2EC8 = 0x800D2EC8; +D_800D2EF4 = 0x800D2EF4; +D_800D2F18 = 0x800D2F18; +D_800D2F48 = 0x800D2F48; +D_800D2F78 = 0x800D2F78; +D_800D2FA4 = 0x800D2FA4; +D_800D2FBC = 0x800D2FBC; +D_800D2FD8 = 0x800D2FD8; +D_800D2FFC = 0x800D2FFC; +D_800D3020 = 0x800D3020; +D_800D303C = 0x800D303C; +D_800D306C = 0x800D306C; +D_800D309C = 0x800D309C; +D_800D30B8 = 0x800D30B8; +D_800D30E4 = 0x800D30E4; +D_800D3104 = 0x800D3104; +D_800D3130 = 0x800D3130; +D_800D3154 = 0x800D3154; +D_800D3168 = 0x800D3168; +D_800D3190 = 0x800D3190; +D_800D31B8 = 0x800D31B8; +D_800D31E4 = 0x800D31E4; +D_800D31F4 = 0x800D31F4; +D_800D3210 = 0x800D3210; +D_800D3224 = 0x800D3224; +D_800D3250 = 0x800D3250; +D_800D3268 = 0x800D3268; +D_800D3294 = 0x800D3294; +D_800D32C4 = 0x800D32C4; +D_800D32F4 = 0x800D32F4; +D_800D3308 = 0x800D3308; +D_800D3338 = 0x800D3338; +D_800D3368 = 0x800D3368; +D_800D3398 = 0x800D3398; +D_800D33C8 = 0x800D33C8; +D_800D33EC = 0x800D33EC; +D_800D341C = 0x800D341C; +D_800D3440 = 0x800D3440; +D_800D3464 = 0x800D3464; +D_800D3490 = 0x800D3490; +D_800D34C0 = 0x800D34C0; +D_800D34EC = 0x800D34EC; +D_800D3518 = 0x800D3518; +D_800D3548 = 0x800D3548; +D_800D3564 = 0x800D3564; +D_800D3594 = 0x800D3594; +D_800D35B8 = 0x800D35B8; +D_800D35DC = 0x800D35DC; +D_800D35F0 = 0x800D35F0; +D_800D3614 = 0x800D3614; +D_800D3644 = 0x800D3644; +D_800D365C = 0x800D365C; +D_800D3688 = 0x800D3688; +D_800D36A0 = 0x800D36A0; +D_800D36C8 = 0x800D36C8; +D_800D36F8 = 0x800D36F8; +D_800D3724 = 0x800D3724; +D_800D3740 = 0x800D3740; +D_800D3770 = 0x800D3770; +D_800D37A0 = 0x800D37A0; +D_800D37BC = 0x800D37BC; +D_800D37EC = 0x800D37EC; +D_800D381C = 0x800D381C; +D_800D3844 = 0x800D3844; +D_800D3874 = 0x800D3874; +D_800D38A4 = 0x800D38A4; +D_800D38CC = 0x800D38CC; +D_800D38F0 = 0x800D38F0; +D_800D3920 = 0x800D3920; +D_800D393C = 0x800D393C; +D_800D396C = 0x800D396C; +D_800D3984 = 0x800D3984; +D_800D39A0 = 0x800D39A0; +D_800D39C4 = 0x800D39C4; +D_800D39DC = 0x800D39DC; +D_800D3A00 = 0x800D3A00; +D_800D3A24 = 0x800D3A24; +D_800D3A3C = 0x800D3A3C; +D_800D3A50 = 0x800D3A50; +D_800D3A78 = 0x800D3A78; +D_800D3AA8 = 0x800D3AA8; +D_800D3AD0 = 0x800D3AD0; +D_800D3AF8 = 0x800D3AF8; +D_800D3B28 = 0x800D3B28; +D_800D3B44 = 0x800D3B44; +D_800D3B74 = 0x800D3B74; +D_800D3BA4 = 0x800D3BA4; +D_800D3BD4 = 0x800D3BD4; +D_800D3C04 = 0x800D3C04; +D_800D3C20 = 0x800D3C20; +D_800D3C48 = 0x800D3C48; +D_800D3C64 = 0x800D3C64; +D_800D3C90 = 0x800D3C90; +D_800D3CB4 = 0x800D3CB4; +D_800D3CC8 = 0x800D3CC8; +D_800D3CEC = 0x800D3CEC; +D_800D3D1C = 0x800D3D1C; +D_800D3D4C = 0x800D3D4C; +D_800D3D60 = 0x800D3D60; +D_800D3D90 = 0x800D3D90; +D_800D3DA8 = 0x800D3DA8; +D_800D3DD4 = 0x800D3DD4; +D_800D3DEC = 0x800D3DEC; +D_800D3E1C = 0x800D3E1C; +D_800D3E48 = 0x800D3E48; +D_800D3E60 = 0x800D3E60; +D_800D3E70 = 0x800D3E70; +D_800D3E94 = 0x800D3E94; +D_800D3EC0 = 0x800D3EC0; +D_800D3EF0 = 0x800D3EF0; +D_800D3F04 = 0x800D3F04; +D_800D3F34 = 0x800D3F34; +D_800D3F64 = 0x800D3F64; +D_800D3F8C = 0x800D3F8C; +D_800D3FBC = 0x800D3FBC; +D_800D3FEC = 0x800D3FEC; +D_800D4014 = 0x800D4014; +D_800D4040 = 0x800D4040; +D_800D4070 = 0x800D4070; +D_800D4088 = 0x800D4088; +D_800D409C = 0x800D409C; +D_800D40CC = 0x800D40CC; +D_800D40EC = 0x800D40EC; +D_800D4118 = 0x800D4118; +D_800D4134 = 0x800D4134; +D_800D4164 = 0x800D4164; +D_800D4194 = 0x800D4194; +D_800D41C0 = 0x800D41C0; +D_800D41E4 = 0x800D41E4; +D_800D4208 = 0x800D4208; +D_800D422C = 0x800D422C; +D_800D4254 = 0x800D4254; +D_800D4268 = 0x800D4268; +D_800D4298 = 0x800D4298; +D_800D42C0 = 0x800D42C0; +D_800D42DC = 0x800D42DC; +D_800D4308 = 0x800D4308; +D_800D431C = 0x800D431C; +D_800D4334 = 0x800D4334; +D_800D4360 = 0x800D4360; +D_800D4390 = 0x800D4390; +D_800D43BC = 0x800D43BC; +D_800D43E8 = 0x800D43E8; +D_800D440C = 0x800D440C; +D_800D443C = 0x800D443C; +D_800D446C = 0x800D446C; +D_800D4498 = 0x800D4498; +D_800D44C0 = 0x800D44C0; +D_800D44D8 = 0x800D44D8; +D_800D4508 = 0x800D4508; +D_800D4530 = 0x800D4530; +D_800D4560 = 0x800D4560; +D_800D4588 = 0x800D4588; +D_800D45B0 = 0x800D45B0; +D_800D45CC = 0x800D45CC; +D_800D45F8 = 0x800D45F8; +D_800D4620 = 0x800D4620; +D_800D4630 = 0x800D4630; +D_800D4660 = 0x800D4660; +D_800D468C = 0x800D468C; +D_800D46BC = 0x800D46BC; +D_800D46EC = 0x800D46EC; +D_800D4718 = 0x800D4718; +D_800D4738 = 0x800D4738; +D_800D4750 = 0x800D4750; +D_800D4768 = 0x800D4768; +D_800D4798 = 0x800D4798; +D_800D47C4 = 0x800D47C4; +D_800D47D8 = 0x800D47D8; +D_800D4808 = 0x800D4808; +D_800D481C = 0x800D481C; +D_800D4834 = 0x800D4834; +D_800D484C = 0x800D484C; +D_800D4878 = 0x800D4878; +D_800D489C = 0x800D489C; +D_800D48B0 = 0x800D48B0; +D_800D48C4 = 0x800D48C4; +D_800D48D8 = 0x800D48D8; +D_800D4908 = 0x800D4908; +D_800D4938 = 0x800D4938; +D_800D4964 = 0x800D4964; +D_800D4994 = 0x800D4994; +D_800D49C0 = 0x800D49C0; +D_800D49E0 = 0x800D49E0; +D_800D4A10 = 0x800D4A10; +D_800D4A40 = 0x800D4A40; +D_800D4A70 = 0x800D4A70; +D_800D4A9C = 0x800D4A9C; +D_800D4ACC = 0x800D4ACC; +D_800D4AF8 = 0x800D4AF8; +D_800D4B20 = 0x800D4B20; +D_800D4B4C = 0x800D4B4C; +D_800D4B70 = 0x800D4B70; +D_800D4B9C = 0x800D4B9C; +D_800D4BC8 = 0x800D4BC8; +D_800D4BF4 = 0x800D4BF4; +D_800D4C24 = 0x800D4C24; +D_800D4C40 = 0x800D4C40; +D_800D4C6C = 0x800D4C6C; +D_800D4C98 = 0x800D4C98; +D_800D4CB0 = 0x800D4CB0; +D_800D4CC4 = 0x800D4CC4; +D_800D4CD8 = 0x800D4CD8; +D_800D4CF4 = 0x800D4CF4; +D_800D4D08 = 0x800D4D08; +D_800D4D1C = 0x800D4D1C; +D_800D4D30 = 0x800D4D30; +D_800D4D44 = 0x800D4D44; +D_800D4D74 = 0x800D4D74; +D_800D4DA0 = 0x800D4DA0; +D_800D4DD0 = 0x800D4DD0; +D_800D4DF8 = 0x800D4DF8; +D_800D4E28 = 0x800D4E28; +D_800D4E58 = 0x800D4E58; +D_800D4E80 = 0x800D4E80; +D_800D4EB0 = 0x800D4EB0; +D_800D4ED4 = 0x800D4ED4; +D_800D4F04 = 0x800D4F04; +D_800D4F34 = 0x800D4F34; +D_800D4F60 = 0x800D4F60; +D_800D4F90 = 0x800D4F90; +D_800D4FC0 = 0x800D4FC0; +D_800D4FE8 = 0x800D4FE8; +D_800D5014 = 0x800D5014; +D_800D5040 = 0x800D5040; +D_800D5070 = 0x800D5070; +D_800D50A0 = 0x800D50A0; +D_800D50D0 = 0x800D50D0; +D_800D50FC = 0x800D50FC; +D_800D5124 = 0x800D5124; +D_800D5140 = 0x800D5140; +D_800D5150 = 0x800D5150; +D_800D517C = 0x800D517C; +D_800D51AC = 0x800D51AC; +D_800D51D8 = 0x800D51D8; +D_800D5208 = 0x800D5208; +D_800D5234 = 0x800D5234; +D_800D5260 = 0x800D5260; +D_800D5290 = 0x800D5290; +D_800D52B4 = 0x800D52B4; +D_800D52DC = 0x800D52DC; +D_800D52F0 = 0x800D52F0; +D_800D5320 = 0x800D5320; +D_800D5348 = 0x800D5348; +D_800D5360 = 0x800D5360; +D_800D538C = 0x800D538C; +D_800D53B0 = 0x800D53B0; +D_800D53DC = 0x800D53DC; +D_800D5408 = 0x800D5408; +D_800D5434 = 0x800D5434; +D_800D5460 = 0x800D5460; +D_800D5484 = 0x800D5484; +D_800D54B0 = 0x800D54B0; +D_800D54D8 = 0x800D54D8; +D_800D5500 = 0x800D5500; +D_800D5520 = 0x800D5520; +D_800D554C = 0x800D554C; +D_800D5570 = 0x800D5570; +D_800D5580 = 0x800D5580; +D_800D55B0 = 0x800D55B0; +D_800D55DC = 0x800D55DC; +D_800D5608 = 0x800D5608; +D_800D5630 = 0x800D5630; +D_800D5640 = 0x800D5640; +D_800D5668 = 0x800D5668; +D_800D5698 = 0x800D5698; +D_800D56BC = 0x800D56BC; +D_800D56EC = 0x800D56EC; +D_800D5718 = 0x800D5718; +D_800D5734 = 0x800D5734; +D_800D5764 = 0x800D5764; +D_800D5794 = 0x800D5794; +D_800D57C4 = 0x800D57C4; +D_800D57F4 = 0x800D57F4; +D_800D581C = 0x800D581C; +D_800D5848 = 0x800D5848; +D_800D586C = 0x800D586C; +D_800D5898 = 0x800D5898; +D_800D58BC = 0x800D58BC; +D_800D58EC = 0x800D58EC; +D_800D591C = 0x800D591C; +D_800D594C = 0x800D594C; +D_800D5978 = 0x800D5978; +D_800D59A4 = 0x800D59A4; +D_800D59D4 = 0x800D59D4; +D_800D59FC = 0x800D59FC; +D_800D5A28 = 0x800D5A28; +D_800D5A58 = 0x800D5A58; +D_800D5A88 = 0x800D5A88; +D_800D5AA8 = 0x800D5AA8; +D_800D5AC0 = 0x800D5AC0; +D_800D5ADC = 0x800D5ADC; +D_800D5B0C = 0x800D5B0C; +D_800D5B28 = 0x800D5B28; +D_800D5B44 = 0x800D5B44; +D_800D5B74 = 0x800D5B74; +D_800D5BA4 = 0x800D5BA4; +D_800D5BD4 = 0x800D5BD4; +D_800D5C04 = 0x800D5C04; +D_800D5C34 = 0x800D5C34; +D_800D5C60 = 0x800D5C60; +D_800D5C90 = 0x800D5C90; +D_800D5CBC = 0x800D5CBC; +D_800D5CDC = 0x800D5CDC; +D_800D5CF4 = 0x800D5CF4; +D_800D5D24 = 0x800D5D24; +D_800D5D50 = 0x800D5D50; +D_800D5D6C = 0x800D5D6C; +D_800D5D9C = 0x800D5D9C; +D_800D5DC4 = 0x800D5DC4; +D_800D5DF4 = 0x800D5DF4; +D_800D5E1C = 0x800D5E1C; +D_800D5E48 = 0x800D5E48; +D_800D5E6C = 0x800D5E6C; +D_800D5E84 = 0x800D5E84; +D_800D5EB0 = 0x800D5EB0; +D_800D5ED8 = 0x800D5ED8; +D_800D5F08 = 0x800D5F08; +D_800D5F20 = 0x800D5F20; +D_800D5F50 = 0x800D5F50; +D_800D5F68 = 0x800D5F68; +D_800D5F7C = 0x800D5F7C; +D_800D5FAC = 0x800D5FAC; +D_800D5FD8 = 0x800D5FD8; +D_800D6004 = 0x800D6004; +D_800D6034 = 0x800D6034; +D_800D6048 = 0x800D6048; +D_800D6078 = 0x800D6078; +D_800D60A4 = 0x800D60A4; +D_800D60D0 = 0x800D60D0; +D_800D6100 = 0x800D6100; +D_800D6130 = 0x800D6130; +D_800D6144 = 0x800D6144; +D_800D615C = 0x800D615C; +D_800D6174 = 0x800D6174; +D_800D6198 = 0x800D6198; +D_800D61B4 = 0x800D61B4; +D_800D61C8 = 0x800D61C8; +D_800D61EC = 0x800D61EC; +D_800D621C = 0x800D621C; +D_800D624C = 0x800D624C; +D_800D6278 = 0x800D6278; +D_800D62A8 = 0x800D62A8; +D_800D62D8 = 0x800D62D8; +D_800D6304 = 0x800D6304; +D_800D6314 = 0x800D6314; +D_800D6344 = 0x800D6344; +D_800D635C = 0x800D635C; +D_800D638C = 0x800D638C; +D_800D63A4 = 0x800D63A4; +D_800D63CC = 0x800D63CC; +D_800D63F4 = 0x800D63F4; +D_800D6420 = 0x800D6420; +D_800D6450 = 0x800D6450; +D_800D6480 = 0x800D6480; +D_800D6490 = 0x800D6490; +D_800D64B8 = 0x800D64B8; +D_800D64E8 = 0x800D64E8; +D_800D6514 = 0x800D6514; +D_800D6538 = 0x800D6538; +D_800D6568 = 0x800D6568; +D_800D6598 = 0x800D6598; +D_800D65C4 = 0x800D65C4; +D_800D65F0 = 0x800D65F0; +D_800D6608 = 0x800D6608; +D_800D6638 = 0x800D6638; +D_800D6668 = 0x800D6668; +D_800D6694 = 0x800D6694; +D_800D66C0 = 0x800D66C0; +D_800D66D8 = 0x800D66D8; +D_800D66F0 = 0x800D66F0; +D_800D6708 = 0x800D6708; +D_800D6738 = 0x800D6738; +D_800D6750 = 0x800D6750; +D_800D6778 = 0x800D6778; +D_800D6790 = 0x800D6790; +D_800D67BC = 0x800D67BC; +D_800D67E8 = 0x800D67E8; +D_800D680C = 0x800D680C; +D_800D6834 = 0x800D6834; +D_800D6864 = 0x800D6864; +D_800D6894 = 0x800D6894; +D_800D68C4 = 0x800D68C4; +D_800D68F4 = 0x800D68F4; +D_800D6924 = 0x800D6924; +D_800D6948 = 0x800D6948; +D_800D6970 = 0x800D6970; +D_800D69A0 = 0x800D69A0; +D_800D69D0 = 0x800D69D0; +D_800D6A00 = 0x800D6A00; +D_800D6A2C = 0x800D6A2C; +D_800D6A5C = 0x800D6A5C; +D_800D6A74 = 0x800D6A74; +D_800D6A9C = 0x800D6A9C; +D_800D6AC8 = 0x800D6AC8; +D_800D6AF4 = 0x800D6AF4; +D_800D6B1C = 0x800D6B1C; +D_800D6B4C = 0x800D6B4C; +D_800D6B7C = 0x800D6B7C; +D_800D6BA8 = 0x800D6BA8; +D_800D6BD0 = 0x800D6BD0; +D_800D6BFC = 0x800D6BFC; +D_800D6C0C = 0x800D6C0C; +D_800D6C28 = 0x800D6C28; +D_800D6C58 = 0x800D6C58; +D_800D6C88 = 0x800D6C88; +D_800D6CA0 = 0x800D6CA0; +D_800D6CB0 = 0x800D6CB0; +D_800D6CCC = 0x800D6CCC; +D_800D6CE8 = 0x800D6CE8; +D_800D6CFC = 0x800D6CFC; +D_800D6D18 = 0x800D6D18; +D_800D6D34 = 0x800D6D34; +D_800D6D58 = 0x800D6D58; +D_800D6D88 = 0x800D6D88; +D_800D6DB0 = 0x800D6DB0; +D_800D6DC0 = 0x800D6DC0; +D_800D6DF0 = 0x800D6DF0; +D_800D6E18 = 0x800D6E18; +D_800D6E44 = 0x800D6E44; +D_800D6E70 = 0x800D6E70; +D_800D6E9C = 0x800D6E9C; +D_800D6ECC = 0x800D6ECC; +D_800D6EFC = 0x800D6EFC; +D_800D6F28 = 0x800D6F28; +D_800D6F58 = 0x800D6F58; +D_800D6F70 = 0x800D6F70; +D_800D6F84 = 0x800D6F84; +D_800D6F9C = 0x800D6F9C; +D_800D6FC4 = 0x800D6FC4; +D_800D6FE8 = 0x800D6FE8; +D_800D7018 = 0x800D7018; +D_800D7048 = 0x800D7048; +D_800D706C = 0x800D706C; +D_800D709C = 0x800D709C; +D_800D70CC = 0x800D70CC; +D_800D70FC = 0x800D70FC; +D_800D7110 = 0x800D7110; +D_800D7140 = 0x800D7140; +D_800D7170 = 0x800D7170; +D_800D718C = 0x800D718C; +D_800D71B8 = 0x800D71B8; +D_800D71E0 = 0x800D71E0; +D_800D71FC = 0x800D71FC; +D_800D7228 = 0x800D7228; +D_800D7250 = 0x800D7250; +D_800D7280 = 0x800D7280; +D_800D72AC = 0x800D72AC; +D_800D72D4 = 0x800D72D4; +D_800D7304 = 0x800D7304; +D_800D732C = 0x800D732C; +D_800D7344 = 0x800D7344; +D_800D7374 = 0x800D7374; +D_800D73A4 = 0x800D73A4; +D_800D73D0 = 0x800D73D0; +D_800D7400 = 0x800D7400; +D_800D7430 = 0x800D7430; +D_800D7460 = 0x800D7460; +D_800D748C = 0x800D748C; +D_800D74BC = 0x800D74BC; +D_800D74EC = 0x800D74EC; +D_800D7518 = 0x800D7518; +D_800D7534 = 0x800D7534; +D_800D754C = 0x800D754C; +D_800D757C = 0x800D757C; +D_800D75A4 = 0x800D75A4; +D_800D75CC = 0x800D75CC; +D_800D75F8 = 0x800D75F8; +D_800D7628 = 0x800D7628; +D_800D7654 = 0x800D7654; +D_800D767C = 0x800D767C; +D_800D76A4 = 0x800D76A4; +D_800D76C8 = 0x800D76C8; +D_800D76EC = 0x800D76EC; +D_800D771C = 0x800D771C; +D_800D7738 = 0x800D7738; +D_800D7768 = 0x800D7768; +D_800D7790 = 0x800D7790; +D_800D77C0 = 0x800D77C0; +D_800D77E8 = 0x800D77E8; +D_800D7814 = 0x800D7814; +D_800D7828 = 0x800D7828; +D_800D7858 = 0x800D7858; +D_800D786C = 0x800D786C; +D_800D789C = 0x800D789C; +D_800D78CC = 0x800D78CC; +D_800D78FC = 0x800D78FC; +D_800D7918 = 0x800D7918; +D_800D7940 = 0x800D7940; +D_800D7970 = 0x800D7970; +D_800D79A0 = 0x800D79A0; +D_800D79C8 = 0x800D79C8; +D_800D79E0 = 0x800D79E0; +D_800D79F8 = 0x800D79F8; +D_800D7A10 = 0x800D7A10; +D_800D7A28 = 0x800D7A28; +D_800D7A54 = 0x800D7A54; +D_800D7A70 = 0x800D7A70; +D_800D7A98 = 0x800D7A98; +D_800D7AC8 = 0x800D7AC8; +D_800D7AF8 = 0x800D7AF8; +D_800D7B28 = 0x800D7B28; +D_800D7B3C = 0x800D7B3C; +D_800D7B6C = 0x800D7B6C; +D_800D7B98 = 0x800D7B98; +D_800D7BC0 = 0x800D7BC0; +D_800D7BEC = 0x800D7BEC; +D_800D7C08 = 0x800D7C08; +D_800D7C24 = 0x800D7C24; +D_800D7C50 = 0x800D7C50; +D_800D7C7C = 0x800D7C7C; +D_800D7C94 = 0x800D7C94; +D_800D7CAC = 0x800D7CAC; +D_800D7CC4 = 0x800D7CC4; +D_800D7CF0 = 0x800D7CF0; +D_800D7D1C = 0x800D7D1C; +D_800D7D48 = 0x800D7D48; +D_800D7D70 = 0x800D7D70; +D_800D7DA0 = 0x800D7DA0; +D_800D7DC8 = 0x800D7DC8; +D_800D7DE4 = 0x800D7DE4; +D_800D7E14 = 0x800D7E14; +D_800D7E40 = 0x800D7E40; +D_800D7E6C = 0x800D7E6C; +D_800D7E98 = 0x800D7E98; +D_800D7EC8 = 0x800D7EC8; +D_800D7EF8 = 0x800D7EF8; +D_800D7F28 = 0x800D7F28; +D_800D7F58 = 0x800D7F58; +D_800D7F88 = 0x800D7F88; +D_800D7FB4 = 0x800D7FB4; +D_800D7FE4 = 0x800D7FE4; +D_800D8014 = 0x800D8014; +D_800D8044 = 0x800D8044; +D_800D8064 = 0x800D8064; +D_800D808C = 0x800D808C; +D_800D80BC = 0x800D80BC; +D_800D80D8 = 0x800D80D8; +D_800D80E8 = 0x800D80E8; +D_800D80F8 = 0x800D80F8; +D_800D810C = 0x800D810C; +D_800D8138 = 0x800D8138; +D_800D8164 = 0x800D8164; +D_800D8194 = 0x800D8194; +D_800D81A4 = 0x800D81A4; +D_800D81B4 = 0x800D81B4; +D_800D81C4 = 0x800D81C4; +D_800D81F0 = 0x800D81F0; +D_800D8220 = 0x800D8220; +D_800D824C = 0x800D824C; +D_800D8278 = 0x800D8278; +D_800D82A8 = 0x800D82A8; +D_800D82D0 = 0x800D82D0; +D_800D8300 = 0x800D8300; +D_800D832C = 0x800D832C; +D_800D8358 = 0x800D8358; +D_800D8388 = 0x800D8388; +D_800D83B4 = 0x800D83B4; +D_800D83E4 = 0x800D83E4; +D_800D8414 = 0x800D8414; +D_800D8434 = 0x800D8434; +D_800D8464 = 0x800D8464; +D_800D8494 = 0x800D8494; +D_800D84AC = 0x800D84AC; +D_800D84D4 = 0x800D84D4; +D_800D84F8 = 0x800D84F8; +D_800D8520 = 0x800D8520; +D_800D8534 = 0x800D8534; +D_800D8548 = 0x800D8548; +D_800D855C = 0x800D855C; +D_800D858C = 0x800D858C; +D_800D85B4 = 0x800D85B4; +D_800D85E4 = 0x800D85E4; +D_800D8614 = 0x800D8614; +D_800D863C = 0x800D863C; +D_800D866C = 0x800D866C; +D_800D8698 = 0x800D8698; +D_800D86C8 = 0x800D86C8; +D_800D86F4 = 0x800D86F4; +D_800D8718 = 0x800D8718; +D_800D873C = 0x800D873C; +D_800D8760 = 0x800D8760; +D_800D8784 = 0x800D8784; +D_800D87B0 = 0x800D87B0; +D_800D87C0 = 0x800D87C0; +D_800D87D4 = 0x800D87D4; +D_800D87E8 = 0x800D87E8; +D_800D8814 = 0x800D8814; +D_800D8844 = 0x800D8844; +D_800D8860 = 0x800D8860; +D_800D887C = 0x800D887C; +D_800D8898 = 0x800D8898; +D_800D88AC = 0x800D88AC; +D_800D88C0 = 0x800D88C0; +D_800D88D4 = 0x800D88D4; +D_800D88E8 = 0x800D88E8; +D_800D8910 = 0x800D8910; +D_800D8930 = 0x800D8930; +D_800D8954 = 0x800D8954; +D_800D8978 = 0x800D8978; +D_800D899C = 0x800D899C; +D_800D89C4 = 0x800D89C4; +D_800D89D8 = 0x800D89D8; +D_800D8A08 = 0x800D8A08; +D_800D8A38 = 0x800D8A38; +D_800D8A68 = 0x800D8A68; +D_800D8A98 = 0x800D8A98; +D_800D8AC4 = 0x800D8AC4; +D_800D8AE4 = 0x800D8AE4; +D_800D8B04 = 0x800D8B04; +D_800D8B24 = 0x800D8B24; +D_800D8B50 = 0x800D8B50; +D_800D8B7C = 0x800D8B7C; +D_800D8BA8 = 0x800D8BA8; +D_800D8BD4 = 0x800D8BD4; +D_800D8C00 = 0x800D8C00; +D_800D8C30 = 0x800D8C30; +D_800D8C5C = 0x800D8C5C; +D_800D8C88 = 0x800D8C88; +D_800D8CB8 = 0x800D8CB8; +D_800D8CE8 = 0x800D8CE8; +D_800D8D18 = 0x800D8D18; +D_800D8D48 = 0x800D8D48; +D_800D8D70 = 0x800D8D70; +D_800D8D8C = 0x800D8D8C; +D_800D8DA4 = 0x800D8DA4; +D_800D8DBC = 0x800D8DBC; +D_800D8DD4 = 0x800D8DD4; +D_800D8DEC = 0x800D8DEC; +D_800D8E08 = 0x800D8E08; +D_800D8E24 = 0x800D8E24; +D_800D8E40 = 0x800D8E40; +D_800D8E5C = 0x800D8E5C; +D_800D8E74 = 0x800D8E74; +D_800D8E8C = 0x800D8E8C; +D_800D8EA4 = 0x800D8EA4; +D_800D8EBC = 0x800D8EBC; +D_800D8EE8 = 0x800D8EE8; +D_800D8F14 = 0x800D8F14; +D_800D8F44 = 0x800D8F44; +D_800D8F74 = 0x800D8F74; +D_800D8FA4 = 0x800D8FA4; +D_800D8FD8 = 0x800D8FD8; +D_800D9008 = 0x800D9008; +D_800D9038 = 0x800D9038; +D_800D9064 = 0x800D9064; +D_800D9094 = 0x800D9094; +D_800D90C4 = 0x800D90C4; +D_800D90F4 = 0x800D90F4; +D_800D9124 = 0x800D9124; +D_800D9154 = 0x800D9154; +D_800D9184 = 0x800D9184; +D_800D91B0 = 0x800D91B0; +D_800D91DC = 0x800D91DC; +D_800D920C = 0x800D920C; +D_800D923C = 0x800D923C; +D_800D926C = 0x800D926C; +D_800D929C = 0x800D929C; +D_800D92C4 = 0x800D92C4; +D_800D92EC = 0x800D92EC; +D_800D9314 = 0x800D9314; +D_800D9344 = 0x800D9344; +D_800D9374 = 0x800D9374; +D_800D93A4 = 0x800D93A4; +D_800D93D4 = 0x800D93D4; +D_800D9400 = 0x800D9400; +D_800D9428 = 0x800D9428; +D_800D9458 = 0x800D9458; +D_800D9488 = 0x800D9488; +D_800D94B4 = 0x800D94B4; +D_800DAD00 = 0x800DAD00; +D_800DF360 = 0x800DF360; +D_800E43E0 = 0x800E43E0; +D_800E4410 = 0x800E4410; +D_800E4428 = 0x800E4428; +D_800E4598 = 0x800E4598; +D_800E45C8 = 0x800E45C8; +D_800E45E0 = 0x800E45E0; +D_800E46A0 = 0x800E46A0; +D_800E4850 = 0x800E4850; +D_800E4890 = 0x800E4890; +D_800E4938 = 0x800E4938; +D_800E5138 = 0x800E5138; +D_800E5998 = 0x800E5998; +D_800E5A38 = 0x800E5A38; +D_800E5A80 = 0x800E5A80; +D_800E5B20 = 0x800E5B20; +D_800E5B60 = 0x800E5B60; +D_800E5BC0 = 0x800E5BC0; +D_800E5BF8 = 0x800E5BF8; +D_800E63F8 = 0x800E63F8; +D_800E6960 = 0x800E6960; +D_800E69E0 = 0x800E69E0; +D_800E6A50 = 0x800E6A50; +D_800E6C50 = 0x800E6C50; +D_800E6E50 = 0x800E6E50; +D_800E7050 = 0x800E7050; +D_800E7250 = 0x800E7250; +D_800E7450 = 0x800E7450; +D_800E7658 = 0x800E7658; +D_800E7670 = 0x800E7670; +D_800E7870 = 0x800E7870; +D_800E7A70 = 0x800E7A70; +D_800E7E70 = 0x800E7E70; +D_800E8070 = 0x800E8070; +D_800E8080 = 0x800E8080; +D_800E8090 = 0x800E8090; +D_800E80A0 = 0x800E80A0; +D_800E80B0 = 0x800E80B0; +D_800E80C0 = 0x800E80C0; +D_800E813E = 0x800E813E; +D_800E8142 = 0x800E8142; +D_800E8144 = 0x800E8144; +D_800E81C0 = 0x800E81C0; +D_800E83BC = 0x800E83BC; +D_800E83C0 = 0x800E83C0; +D_800E85BC = 0x800E85BC; +D_800E85C0 = 0x800E85C0; +D_800E87BC = 0x800E87BC; +D_800E87C0 = 0x800E87C0; +D_800E87D2 = 0x800E87D2; +D_800E87D8 = 0x800E87D8; +D_800E87DA = 0x800E87DA; +D_800E87DB = 0x800E87DB; +D_800E87EA = 0x800E87EA; +D_800E87F0 = 0x800E87F0; +D_800E87F1 = 0x800E87F1; +D_800E87F2 = 0x800E87F2; +D_800E87F3 = 0x800E87F3; +D_800E87F4 = 0x800E87F4; +D_800E87F8 = 0x800E87F8; +D_800E87F9 = 0x800E87F9; +D_800E87FA = 0x800E87FA; +D_800E87FB = 0x800E87FB; +D_800E87FC = 0x800E87FC; +D_800E8800 = 0x800E8800; +D_800E8802 = 0x800E8802; +D_800E8803 = 0x800E8803; +D_800E8804 = 0x800E8804; +D_800E8806 = 0x800E8806; +D_800E8808 = 0x800E8808; +D_800E8809 = 0x800E8809; +D_800E880A = 0x800E880A; +D_800E880C = 0x800E880C; +D_800E880E = 0x800E880E; +D_800E880F = 0x800E880F; +D_800E8810 = 0x800E8810; +D_800E8812 = 0x800E8812; +D_800E8814 = 0x800E8814; +D_800E8815 = 0x800E8815; +D_800E8816 = 0x800E8816; +D_800E8818 = 0x800E8818; +D_800E8830 = 0x800E8830; +D_800E8840 = 0x800E8840; +D_800E89E0 = 0x800E89E0; +D_800E99E0 = 0x800E99E0; +D_800EAB90 = 0x800EAB90; +D_800EBD40 = 0x800EBD40; +D_800ECEF0 = 0x800ECEF0; +D_800ECEF4 = 0x800ECEF4; +D_800ECEF8 = 0x800ECEF8; +D_800ECF00 = 0x800ECF00; +D_800ECF08 = 0x800ECF08; +D_800ECF10 = 0x800ECF10; +D_800ECF50 = 0x800ECF50; +D_800ECF68 = 0x800ECF68; +D_800ED030 = 0x800ED030; +D_800ED048 = 0x800ED048; +D_800ED050 = 0x800ED050; +D_800ED068 = 0x800ED068; +D_800ED080 = 0x800ED080; +D_800ED088 = 0x800ED088; +D_800ED0A0 = 0x800ED0A0; +D_800ED120 = 0x800ED120; +D_800ED138 = 0x800ED138; +D_800ED178 = 0x800ED178; +D_800ED190 = 0x800ED190; +D_800ED198 = 0x800ED198; +D_800ED1B0 = 0x800ED1B0; +D_800ED1B8 = 0x800ED1B8; +D_800ED1D0 = 0x800ED1D0; +D_800ED1E0 = 0x800ED1E0; +D_800ED1F8 = 0x800ED1F8; +D_800ED200 = 0x800ED200; +D_800ED218 = 0x800ED218; +D_800ED238 = 0x800ED238; +D_800ED250 = 0x800ED250; +D_800ED258 = 0x800ED258; +D_800ED270 = 0x800ED270; +D_800ED278 = 0x800ED278; +D_800ED290 = 0x800ED290; +D_800ED2D0 = 0x800ED2D0; +D_800ED2E8 = 0x800ED2E8; +D_800ED2F0 = 0x800ED2F0; +D_80142D90 = 0x80142D90; +D_80142D94 = 0x80142D94; +D_80142D98 = 0x80142D98; +D_80142D9C = 0x80142D9C; +D_80142DA0 = 0x80142DA0; +D_80142DA4 = 0x80142DA4; +D_80142DA8 = 0x80142DA8; +D_80142DAC = 0x80142DAC; +D_80142DB0 = 0x80142DB0; +D_80142DB4 = 0x80142DB4; +D_80142DB8 = 0x80142DB8; +D_80142DBC = 0x80142DBC; +D_80142DC0 = 0x80142DC0; +D_80142DC1 = 0x80142DC1; +D_80142DC4 = 0x80142DC4; +D_80142DC5 = 0x80142DC5; +D_80142DC6 = 0x80142DC6; +D_80142DC7 = 0x80142DC7; +D_80142DC8 = 0x80142DC8; +D_80142DCA = 0x80142DCA; +D_80143DD0 = 0x80143DD0; +D_80144A30 = 0x80144A30; +D_80144F80 = 0x80144F80; +D_80146130 = 0x80146130; +D_801462E0 = 0x801462E0; +D_801462E4 = 0x801462E4; +D_801462E8 = 0x801462E8; +D_801462EC = 0x801462EC; +D_801462F0 = 0x801462F0; +D_801462F4 = 0x801462F4; +D_80146300 = 0x80146300; +D_80146308 = 0x80146308; +D_80146B08 = 0x80146B08; +D_80146B10 = 0x80146B10; +D_80147310 = 0x80147310; +D_8014FB10 = 0x8014FB10; +D_8014FB20 = 0x8014FB20; +D_8014FEA0 = 0x8014FEA0; +D_801500A0 = 0x801500A0; +D_801502A0 = 0x801502A0; +D_80150C50 = 0x80150C50; +D_80150C68 = 0x80150C68; +D_80150C6C = 0x80150C6C; +D_80150C70 = 0x80150C70; +D_80150C80 = 0x80150C80; +D_80150C88 = 0x80150C88; +D_80151084 = 0x80151084; +D_80151088 = 0x80151088; +D_80151488 = 0x80151488; +D_80151C94 = 0x80151C94; +D_80151C98 = 0x80151C98; +D_80151C9C = 0x80151C9C; +D_80151CA0 = 0x80151CA0; +D_80151CA4 = 0x80151CA4; +D_80151CA8 = 0x80151CA8; +D_80151CAC = 0x80151CAC; +D_80151CB0 = 0x80151CB0; +D_80151CC0 = 0x80151CC0; +D_80151CD0 = 0x80151CD0; +D_80151D90 = 0x80151D90; +D_80151DA0 = 0x80151DA0; +D_801535A0 = 0x801535A0; +D_801535AC = 0x801535AC; +D_80154860 = 0x80154860; +D_80154868 = 0x80154868; +D_80154870 = 0x80154870; +D_80154878 = 0x80154878; +D_801549B8 = 0x801549B8; +D_801549C0 = 0x801549C0; +D_80154DC0 = 0x80154DC0; +D_80154DC8 = 0x80154DC8; +D_801551C8 = 0x801551C8; +D_80155218 = 0x80155218; +D_80155818 = 0x80155818; +D_80155898 = 0x80155898; +D_801558B8 = 0x801558B8; +D_801558E0 = 0x801558E0; +D_801558E8 = 0x801558E8; +D_80155CE8 = 0x80155CE8; +D_80155F30 = 0x80155F30; +D_80156648 = 0x80156648; +D_80156650 = 0x80156650; +D_801566D0 = 0x801566D0; +D_80156790 = 0x80156790; +D_80156950 = 0x80156950; +D_80156960 = 0x80156960; +D_80156964 = 0x80156964; +D_80156968 = 0x80156968; +D_80156980 = 0x80156980; +D_80156990 = 0x80156990; +D_80156D90 = 0x80156D90; +D_80156DF0 = 0x80156DF0; +D_801570E0 = 0x801570E0; +D_801570E6 = 0x801570E6; +D_801570F0 = 0x801570F0; +D_801570F2 = 0x801570F2; +D_801570F3 = 0x801570F3; +D_801570F4 = 0x801570F4; +D_801570F8 = 0x801570F8; +D_80157100 = 0x80157100; +D_80157108 = 0x80157108; +D_80157110 = 0x80157110; +D_80157120 = 0x80157120; +D_80157150 = 0x80157150; +D_80157160 = 0x80157160; +D_80157170 = 0x80157170; +D_80157180 = 0x80157180; +D_80157184 = 0x80157184; +D_80157314 = 0x80157314; +D_80157318 = 0x80157318; +D_80157350 = 0x80157350; +D_80157354 = 0x80157354; +D_801574E4 = 0x801574E4; +D_801574E8 = 0x801574E8; +D_80157502 = 0x80157502; +D_8015750E = 0x8015750E; +D_80157520 = 0x80157520; +D_80157524 = 0x80157524; +D_801576B4 = 0x801576B4; +D_801576B8 = 0x801576B8; +D_801576F0 = 0x801576F0; +D_801576FC = 0x801576FC; +D_80157880 = 0x80157880; +D_80157888 = 0x80157888; +D_80157890 = 0x80157890; +D_80157D90 = 0x80157D90; +D_80157D98 = 0x80157D98; +D_80157D9C = 0x80157D9C; +D_80157DA0 = 0x80157DA0; +D_801582A8 = 0x801582A8; +D_801582B0 = 0x801582B0; +D_801582C0 = 0x801582C0; +D_801582C8 = 0x801582C8; +D_801582D8 = 0x801582D8; +D_801582E8 = 0x801582E8; +D_80158328 = 0x80158328; +D_80158368 = 0x80158368; +D_80158468 = 0x80158468; +D_80158469 = 0x80158469; +D_8015846C = 0x8015846C; +D_80159470 = 0x80159470; +D_80159478 = 0x80159478; +D_80159510 = 0x80159510; +D_801595C4 = 0x801595C4; +D_80159710 = 0x80159710; +D_80159744 = 0x80159744; +D_8015985C = 0x8015985C; +D_801598CC = 0x801598CC; +D_801599A8 = 0x801599A8; +D_8015BF28 = 0x8015BF28; +D_8015BF94 = 0x8015BF94; +D_8015DF28 = 0x8015DF28; +D_8015DF94 = 0x8015DF94; +D_8015DFF0 = 0x8015DFF0; +D_8015E000 = 0x8015E000; +D_8015E010 = 0x8015E010; +D_8015E020 = 0x8015E020; +D_8015E030 = 0x8015E030; +D_8015E040 = 0x8015E040; +D_8015E240 = 0x8015E240; +D_8015EC40 = 0x8015EC40; +D_8015EC44 = 0x8015EC44; +D_8015EC48 = 0x8015EC48; +D_8015F188 = 0x8015F188; +D_8015F1A0 = 0x8015F1A0; +D_8015F1E0 = 0x8015F1E0; +D_8015F1F8 = 0x8015F1F8; +D_8015F238 = 0x8015F238; +D_8015F250 = 0x8015F250; +D_8015F350 = 0x8015F350; +D_8015F950 = 0x8015F950; +D_8015F968 = 0x8015F968; +D_8015F970 = 0x8015F970; +D_8015F988 = 0x8015F988; +D_80160988 = 0x80160988; +D_8016098C = 0x8016098C; +D_80160990 = 0x80160990; +D_80160998 = 0x80160998; +D_80160A98 = 0x80160A98; +D_80160B98 = 0x80160B98; +D_80160B99 = 0x80160B99; +D_80160B9A = 0x80160B9A; +D_80160B9B = 0x80160B9B; +D_80160B9C = 0x80160B9C; +D_80160BA0 = 0x80160BA0; +D_80160BA4 = 0x80160BA4; +D_80160BA8 = 0x80160BA8; +D_80160BAC = 0x80160BAC; +D_80160BB0 = 0x80160BB0; +D_80160BB8 = 0x80160BB8; +D_80160BC2 = 0x80160BC2; +D_80160BD0 = 0x80160BD0; +D_80160BD4 = 0x80160BD4; +D_80160BD8 = 0x80160BD8; +D_80160BDC = 0x80160BDC; +D_80160BE0 = 0x80160BE0; +D_80160BE4 = 0x80160BE4; +D_80160BE6 = 0x80160BE6; +D_80160BE8 = 0x80160BE8; +D_80160BEC = 0x80160BEC; +D_80160BF0 = 0x80160BF0; +D_80160BF4 = 0x80160BF4; +D_80160BF8 = 0x80160BF8; +D_80160C00 = 0x80160C00; +D_80160C04 = 0x80160C04; +D_80160C08 = 0x80160C08; +D_80160CA8 = 0x80160CA8; +D_80160CAC = 0x80160CAC; +D_80160CB0 = 0x80160CB0; +D_80160CBC = 0x80160CBC; +D_80160CC2 = 0x80160CC2; +D_80160CC4 = 0x80160CC4; +D_80160CC8 = 0x80160CC8; +D_80160CCC = 0x80160CCC; +D_80160CD0 = 0x80160CD0; +D_80160CE0 = 0x80160CE0; +D_80160CF8 = 0x80160CF8; +D_80160D10 = 0x80160D10; +D_80160D28 = 0x80160D28; +D_80160D40 = 0x80160D40; +D_80161540 = 0x80161540; +D_80161548 = 0x80161548; +D_80161558 = 0x80161558; +D_8016155C = 0x8016155C; +D_80161560 = 0x80161560; +D_80161660 = 0x80161660; +D_80161760 = 0x80161760; +D_80161780 = 0x80161780; +D_801617A0 = 0x801617A0; +D_801617DC = 0x801617DC; +D_801617E0 = 0x801617E0; +D_801617E1 = 0x801617E1; +D_80161808 = 0x80161808; +D_80161820 = 0x80161820; +D_80161830 = 0x80161830; +D_801618B0 = 0x801618B0; +D_801618C0 = 0x801618C0; +D_801618C8 = 0x801618C8; +D_801618D0 = 0x801618D0; +D_801618D8 = 0x801618D8; +D_801618DC = 0x801618DC; +D_801618E0 = 0x801618E0; +D_801618E8 = 0x801618E8; +D_801618F0 = 0x801618F0; +D_80161AA0 = 0x80161AA0; +D_80162AA0 = 0x80162AA0; +D_80162AB8 = 0x80162AB8; +D_80162AD0 = 0x80162AD0; +D_80162AD2 = 0x80162AD2; +D_80162AD4 = 0x80162AD4; +D_80162AE8 = 0x80162AE8; +D_80162AEA = 0x80162AEA; +D_80162AEC = 0x80162AEC; +D_80162B00 = 0x80162B00; +D_80162B10 = 0x80162B10; +D_80162CC0 = 0x80162CC0; +D_80163CC0 = 0x80163CC0; +D_80163CD8 = 0x80163CD8; +D_80163CE0 = 0x80163CE0; +D_80163CF0 = 0x80163CF0; +D_80163D2C = 0x80163D2C; +D_80163D30 = 0x80163D30; +D_80163D34 = 0x80163D34; +D_80163D35 = 0x80163D35; +D_80163D36 = 0x80163D36; +D_80163D37 = 0x80163D37; +D_80163D38 = 0x80163D38; +D_80163D3C = 0x80163D3C; +D_80163DB0 = 0x80163DB0; +D_80163DF0 = 0x80163DF0; +D_80163DF8 = 0x80163DF8; +D_80163E10 = 0x80163E10; +D_80163E30 = 0x80163E30; +D_80163E34 = 0x80163E34; +D_80163E38 = 0x80163E38; +D_80163E3C = 0x80163E3C; +D_80163E40 = 0x80163E40; +D_80163E50 = 0x80163E50; +D_80163E58 = 0x80163E58; +D_80163E70 = 0x80163E70; +D_80164E70 = 0x80164E70; +D_80165020 = 0x80165020; +D_80165024 = 0x80165024; +D_80165025 = 0x80165025; +D_80165026 = 0x80165026; +D_80165028 = 0x80165028; +D_8016502C = 0x8016502C; +D_80165094 = 0x80165094; +D_801650A0 = 0x801650A0; +D_801650A4 = 0x801650A4; +D_801650A8 = 0x801650A8; +D_801650AC = 0x801650AC; +D_801650B0 = 0x801650B0; +D_801650B4 = 0x801650B4; +D_801650B8 = 0x801650B8; +D_801650BC = 0x801650BC; +D_801650C0 = 0x801650C0; +D_801650C1 = 0x801650C1; +D_801650C4 = 0x801650C4; +D_801650C8 = 0x801650C8; +D_801650D0 = 0x801650D0; +D_801650DC = 0x801650DC; +D_801650E0 = 0x801650E0; +D_801650E4 = 0x801650E4; +D_801650F0 = 0x801650F0; +D_80165100 = 0x80165100; +D_80165104 = 0x80165104; +D_80165108 = 0x80165108; +D_8016510C = 0x8016510C; +D_80165110 = 0x80165110; +D_80165114 = 0x80165114; +D_80165118 = 0x80165118; +D_8016511C = 0x8016511C; +D_80165120 = 0x80165120; +D_80165124 = 0x80165124; +D_80165128 = 0x80165128; +D_80166B40 = 0x80166B40; +D_80166B50 = 0x80166B50; +D_80166B80 = 0x80166B80; +D_80166B8C = 0x80166B8C; +D_80166B98 = 0x80166B98; +D_80166BB0 = 0x80166BB0; +D_80166BB8 = 0x80166BB8; +D_80166CB8 = 0x80166CB8; +D_80166CE8 = 0x80166CE8; +D_80166D18 = 0x80166D18; +D_80166D20 = 0x80166D20; +D_80166D48 = 0x80166D48; +D_80166D58 = 0x80166D58; +D_80166D70 = 0x80166D70; +D_80166D74 = 0x80166D74; +D_80166D78 = 0x80166D78; +D_80166D80 = 0x80166D80; +D_80166D88 = 0x80166D88; +D_80166D8C = 0x80166D8C; +D_80166D90 = 0x80166D90; +D_80166DD0 = 0x80166DD0; +D_80166E10 = 0x80166E10; +D_80166E14 = 0x80166E14; +D_80166E18 = 0x80166E18; +D_80166E1C = 0x80166E1C; +D_80166E20 = 0x80166E20; +D_80166E24 = 0x80166E24; +D_80166E30 = 0x80166E30; +D_80166E40 = 0x80166E40; +D_80166E44 = 0x80166E44; +D_80166E48 = 0x80166E48; +D_80166E4C = 0x80166E4C; +D_80166E50 = 0x80166E50; +D_80166E54 = 0x80166E54; +D_80166E58 = 0x80166E58; +D_80166E5C = 0x80166E5C; +D_80166E60 = 0x80166E60; +D_80166E88 = 0x80166E88; +D_80166E9C = 0x80166E9C; +D_80166EB0 = 0x80166EB0; +D_80166EB4 = 0x80166EB4; +D_80166ED8 = 0x80166ED8; +D_80166EDC = 0x80166EDC; +D_80166F00 = 0x80166F00; +D_80166F04 = 0x80166F04; +D_80166F08 = 0x80166F08; +D_80166F0C = 0x80166F0C; +D_80166F10 = 0x80166F10; +D_80166F50 = 0x80166F50; +D_80166F54 = 0x80166F54; +D_80166F58 = 0x80166F58; +D_80166F5C = 0x80166F5C; +D_80166F60 = 0x80166F60; +D_80166F64 = 0x80166F64; +D_80166F68 = 0x80166F68; +D_80166FA0 = 0x80166FA0; +D_80166FA4 = 0x80166FA4; +D_80166FA8 = 0x80166FA8; +D_80166FAC = 0x80166FAC; +D_80166FB0 = 0x80166FB0; +D_80166FF0 = 0x80166FF0; +D_80166FF4 = 0x80166FF4; +D_80166FF8 = 0x80166FF8; +D_80167000 = 0x80167000; +D_8016700C = 0x8016700C; +D_80167010 = 0x80167010; +D_80167014 = 0x80167014; +D_80167018 = 0x80167018; +D_80167054 = 0x80167054; +D_80167058 = 0x80167058; +D_8016705C = 0x8016705C; +D_80167060 = 0x80167060; +D_80167064 = 0x80167064; +D_80167068 = 0x80167068; +D_8016706C = 0x8016706C; +D_80167070 = 0x80167070; +D_80167074 = 0x80167074; +D_80167078 = 0x80167078; +D_8016707C = 0x8016707C; +D_80167080 = 0x80167080; +D_80167084 = 0x80167084; +D_80167088 = 0x80167088; +D_8016708C = 0x8016708C; +D_80167090 = 0x80167090; +D_80167094 = 0x80167094; +D_80167098 = 0x80167098; +D_8016709C = 0x8016709C; +D_801670A0 = 0x801670A0; +D_801670A4 = 0x801670A4; +D_801670A8 = 0x801670A8; +D_801670B0 = 0x801670B0; +D_801670B4 = 0x801670B4; +D_801670B8 = 0x801670B8; +D_801670BC = 0x801670BC; +D_801670C0 = 0x801670C0; +D_801670C4 = 0x801670C4; +D_801670C8 = 0x801670C8; +D_801670CC = 0x801670CC; +D_801670D0 = 0x801670D0; +D_801670D4 = 0x801670D4; +D_801670D8 = 0x801670D8; +D_801670DC = 0x801670DC; +D_801670E0 = 0x801670E0; +D_801670E4 = 0x801670E4; +D_801670E8 = 0x801670E8; +D_801670F0 = 0x801670F0; +D_801670F4 = 0x801670F4; +D_801670F8 = 0x801670F8; +D_801670FC = 0x801670FC; +D_80167100 = 0x80167100; +D_80167104 = 0x80167104; +D_80167108 = 0x80167108; +D_8016710C = 0x8016710C; +D_80167110 = 0x80167110; +D_80167114 = 0x80167114; +D_80167118 = 0x80167118; +D_8016711C = 0x8016711C; +D_80167120 = 0x80167120; +D_80167124 = 0x80167124; +D_80167128 = 0x80167128; +D_8016712C = 0x8016712C; +D_80167130 = 0x80167130; +D_80167134 = 0x80167134; +D_80167138 = 0x80167138; +D_8016713C = 0x8016713C; +D_80167140 = 0x80167140; +D_801671B0 = 0x801671B0; +D_801671B2 = 0x801671B2; +D_801671B3 = 0x801671B3; +D_801671B4 = 0x801671B4; +D_801671B8 = 0x801671B8; +D_801671BC = 0x801671BC; +D_801671C0 = 0x801671C0; +D_801671C4 = 0x801671C4; +D_801671C8 = 0x801671C8; +D_801671CC = 0x801671CC; +D_801671D0 = 0x801671D0; +D_801671D4 = 0x801671D4; +D_801671D8 = 0x801671D8; +D_801671DC = 0x801671DC; +D_801671DE = 0x801671DE; +D_801671E0 = 0x801671E0; +D_801671E2 = 0x801671E2; +D_801671E4 = 0x801671E4; +D_801671F0 = 0x801671F0; +D_801671F4 = 0x801671F4; +D_801671F8 = 0x801671F8; +D_801671FA = 0x801671FA; +D_801671FC = 0x801671FC; +D_80167200 = 0x80167200; +D_80167204 = 0x80167204; +D_80167210 = 0x80167210; +D_80167214 = 0x80167214; +D_80167218 = 0x80167218; +D_8016721C = 0x8016721C; +D_80167220 = 0x80167220; +D_80167224 = 0x80167224; +D_80167228 = 0x80167228; +D_8016722C = 0x8016722C; +D_80167230 = 0x80167230; +D_80167231 = 0x80167231; +D_80167234 = 0x80167234; +D_80167238 = 0x80167238; +D_8016723C = 0x8016723C; +D_80167240 = 0x80167240; +D_80167248 = 0x80167248; +D_8016724B = 0x8016724B; +D_80167258 = 0x80167258; +D_801672A0 = 0x801672A0; +D_80168BA0 = 0x80168BA0; +D_80169780 = 0x80169780; +D_80169782 = 0x80169782; +D_80169784 = 0x80169784; +D_80169788 = 0x80169788; +D_8016978C = 0x8016978C; +D_8016979C = 0x8016979C; +D_801697D0 = 0x801697D0; +D_801697D8 = 0x801697D8; +D_801697E8 = 0x801697E8; +D_80169836 = 0x80169836; +D_80169838 = 0x80169838; +D_80169846 = 0x80169846; +D_80169849 = 0x80169849; +D_8016984E = 0x8016984E; +D_80169864 = 0x80169864; +D_80169866 = 0x80169866; +D_80169878 = 0x80169878; +D_80169880 = 0x80169880; +D_80169890 = 0x80169890; +D_80169894 = 0x80169894; +D_80169898 = 0x80169898; +D_8016989C = 0x8016989C; +D_801698A0 = 0x801698A0; +D_801698A4 = 0x801698A4; +D_801698A8 = 0x801698A8; +D_801698AC = 0x801698AC; +D_801698B0 = 0x801698B0; +D_80169A74 = 0x80169A74; +D_80169B2C = 0x80169B2C; +D_80169B74 = 0x80169B74; +D_80169D68 = 0x80169D68; +D_80169E20 = 0x80169E20; +D_80169E68 = 0x80169E68; +D_8016A05C = 0x8016A05C; +D_8016A114 = 0x8016A114; +D_8016A15C = 0x8016A15C; +D_8016A350 = 0x8016A350; +D_8016AF20 = 0x8016AF20; +D_8016B214 = 0x8016B214; +D_8016B508 = 0x8016B508; +D_8016D290 = 0x8016D290; +D_80172834 = 0x80172834; +D_801745BC = 0x801745BC; +D_801748B0 = 0x801748B0; +D_801748B2 = 0x801748B2; +D_801748B4 = 0x801748B4; +D_801748B8 = 0x801748B8; +D_801748BC = 0x801748BC; +D_801748C0 = 0x801748C0; +D_801748C4 = 0x801748C4; +D_801748C8 = 0x801748C8; +D_801748CC = 0x801748CC; +D_801748FE = 0x801748FE; +D_80174900 = 0x80174900; +D_80174986 = 0x80174986; +D_80174994 = 0x80174994; +D_80174CB8 = 0x80174CB8; +D_80174CBA = 0x80174CBA; +D_80174CBC = 0x80174CBC; +D_80174CC0 = 0x80174CC0; +D_80174CC4 = 0x80174CC4; +D_80174CD4 = 0x80174CD4; +D_80174D5E = 0x80174D5E; +D_801750C0 = 0x801750C0; +D_801750C2 = 0x801750C2; +D_801750C4 = 0x801750C4; +D_801750C8 = 0x801750C8; +D_801750CC = 0x801750CC; +D_801750DC = 0x801750DC; +D_80175190 = 0x80175190; +D_801758D0 = 0x801758D0; +D_8017591E = 0x8017591E; +D_80176A50 = 0x80176A50; +D_80177428 = 0x80177428; +D_80178404 = 0x80178404; +D_80178490 = 0x80178490; +D_80178CC4 = 0x80178CC4; +D_80178EF4 = 0x80178EF4; +D_80178F80 = 0x80178F80; +D_80178FEC = 0x80178FEC; +D_801797F0 = 0x801797F0; +D_80179C50 = 0x80179C50; +D_80179DA0 = 0x80179DA0; +D_80179E10 = 0x80179E10; +D_80179E80 = 0x80179E80; +D_80179EB8 = 0x80179EB8; +D_80179EC8 = 0x80179EC8; +D_80179EE0 = 0x80179EE0; +D_80179EF0 = 0x80179EF0; +D_8017B1B0 = 0x8017B1B0; +D_8017BBB0 = 0x8017BBB0; +D_8017BBD8 = 0x8017BBD8; +D_8017BCF0 = 0x8017BCF0; +D_8017BCF8 = 0x8017BCF8; +D_8017C018 = 0x8017C018; +D_8017C338 = 0x8017C338; +D_8017C658 = 0x8017C658; +D_8017C978 = 0x8017C978; +D_8017CC98 = 0x8017CC98; +D_8017CCA0 = 0x8017CCA0; +D_8017CFC0 = 0x8017CFC0; +D_8017CFC4 = 0x8017CFC4; +D_8017CFC8 = 0x8017CFC8; +D_8017CFCC = 0x8017CFCC; +D_8017CFD0 = 0x8017CFD0; +D_8017CFD4 = 0x8017CFD4; +D_8017CFD8 = 0x8017CFD8; +D_8017CFDC = 0x8017CFDC; +D_8017CFE0 = 0x8017CFE0; +D_8017CFE4 = 0x8017CFE4; +D_8017CFE8 = 0x8017CFE8; +D_8017CFEC = 0x8017CFEC; +D_8017CFF0 = 0x8017CFF0; +D_8017CFF4 = 0x8017CFF4; +D_8017CFF8 = 0x8017CFF8; +D_8017D008 = 0x8017D008; +D_8017D010 = 0x8017D010; +D_8017D014 = 0x8017D014; +D_8017D018 = 0x8017D018; +D_8017D01C = 0x8017D01C; +D_8017D020 = 0x8017D020; +D_8017D028 = 0x8017D028; +D_8017D038 = 0x8017D038; +D_8017D03C = 0x8017D03C; +D_8017D040 = 0x8017D040; +D_8017D043 = 0x8017D043; +D_8017D044 = 0x8017D044; +D_8017D048 = 0x8017D048; +D_8017D04B = 0x8017D04B; +D_8017D04C = 0x8017D04C; +D_8017D050 = 0x8017D050; +D_8017D054 = 0x8017D054; +D_8017D058 = 0x8017D058; +D_8017D05C = 0x8017D05C; +D_8017D060 = 0x8017D060; +D_8017D068 = 0x8017D068; +D_8017D070 = 0x8017D070; +D_8017D074 = 0x8017D074; +D_8017D080 = 0x8017D080; +D_8017D088 = 0x8017D088; +D_8017D094 = 0x8017D094; +D_8017D0A8 = 0x8017D0A8; +D_8017D0B0 = 0x8017D0B0; +D_8017D0B4 = 0x8017D0B4; +D_8017D0C0 = 0x8017D0C0; +D_8017D0C8 = 0x8017D0C8; +D_8017D0D0 = 0x8017D0D0; +D_8017D0D8 = 0x8017D0D8; +D_8017D0E0 = 0x8017D0E0; +D_8017D0E8 = 0x8017D0E8; +D_8017D0F0 = 0x8017D0F0; +D_8017D0F8 = 0x8017D0F8; +D_8017D108 = 0x8017D108; +D_8017D10C = 0x8017D10C; +D_8017D110 = 0x8017D110; +D_8017D114 = 0x8017D114; +D_8017D118 = 0x8017D118; +D_8017D11C = 0x8017D11C; +D_8017D120 = 0x8017D120; +D_8017D124 = 0x8017D124; +D_8017D128 = 0x8017D128; +D_8017D130 = 0x8017D130; +D_8017D140 = 0x8017D140; +D_8017D148 = 0x8017D148; +D_8017D158 = 0x8017D158; +D_8017D15C = 0x8017D15C; +D_8017D160 = 0x8017D160; +D_8017D168 = 0x8017D168; +D_8017D178 = 0x8017D178; +D_8017D184 = 0x8017D184; +D_8017D188 = 0x8017D188; +D_8017D194 = 0x8017D194; +D_8017D198 = 0x8017D198; +D_8017D1A0 = 0x8017D1A0; +D_8017D1B0 = 0x8017D1B0; +D_8017D1B4 = 0x8017D1B4; +D_8017D1B8 = 0x8017D1B8; +D_8017D1C8 = 0x8017D1C8; +D_8017D1CC = 0x8017D1CC; +D_8017D1D0 = 0x8017D1D0; +D_8017D1D8 = 0x8017D1D8; +D_8017D1E8 = 0x8017D1E8; +D_8017D1EC = 0x8017D1EC; +D_8017D1F0 = 0x8017D1F0; +D_8017D1F4 = 0x8017D1F4; +D_8017D1F8 = 0x8017D1F8; +D_8017D1FC = 0x8017D1FC; +D_8017D200 = 0x8017D200; +D_8017D204 = 0x8017D204; +D_8017D208 = 0x8017D208; +D_8017D20C = 0x8017D20C; +D_8017D210 = 0x8017D210; +D_8017D220 = 0x8017D220; +D_8017D228 = 0x8017D228; +D_8017D238 = 0x8017D238; +D_8017D240 = 0x8017D240; +D_8017D250 = 0x8017D250; +D_8017D258 = 0x8017D258; +D_8017D268 = 0x8017D268; +D_8017D270 = 0x8017D270; +D_8017D280 = 0x8017D280; +D_8017D288 = 0x8017D288; +D_8017D298 = 0x8017D298; +D_8017D2A0 = 0x8017D2A0; +D_8017D2E0 = 0x8017D2E0; +D_8017D2E4 = 0x8017D2E4; +D_8017D2E8 = 0x8017D2E8; +D_8017D2EC = 0x8017D2EC; +D_8017D2F0 = 0x8017D2F0; +D_8017D30C = 0x8017D30C; +D_8017D310 = 0x8017D310; +D_8017D32C = 0x8017D32C; +D_8017D34C = 0x8017D34C; +D_8017D350 = 0x8017D350; +D_8017D370 = 0x8017D370; +D_8017D3D0 = 0x8017D3D0; +D_8017D3D8 = 0x8017D3D8; +D_8017D3DC = 0x8017D3DC; +D_8017D3F0 = 0x8017D3F0; +D_8017D410 = 0x8017D410; +D_8017D414 = 0x8017D414; +D_8017D418 = 0x8017D418; +D_8017D420 = 0x8017D420; +D_8017D42C = 0x8017D42C; +D_8017D430 = 0x8017D430; +D_8017D434 = 0x8017D434; +D_8017D438 = 0x8017D438; +D_8017D43C = 0x8017D43C; +D_8017D440 = 0x8017D440; +D_8017D444 = 0x8017D444; +D_8017D44C = 0x8017D44C; +D_8017D450 = 0x8017D450; +D_8017D454 = 0x8017D454; +D_8017D45C = 0x8017D45C; +D_8017D460 = 0x8017D460; +D_8017D464 = 0x8017D464; +D_8017D468 = 0x8017D468; +D_8017D470 = 0x8017D470; +D_8017D474 = 0x8017D474; +D_8017D478 = 0x8017D478; +D_8017D47C = 0x8017D47C; +D_8017D488 = 0x8017D488; +D_8017D490 = 0x8017D490; +D_8017D494 = 0x8017D494; +D_8017D4A8 = 0x8017D4A8; +D_8017D4B0 = 0x8017D4B0; +D_8017D4C0 = 0x8017D4C0; +D_8017D4C8 = 0x8017D4C8; +D_8017D4D8 = 0x8017D4D8; +D_8017D4E0 = 0x8017D4E0; +D_8017D4F0 = 0x8017D4F0; +D_8017D4F8 = 0x8017D4F8; +D_8017D508 = 0x8017D508; +D_8017D510 = 0x8017D510; +D_8017D528 = 0x8017D528; +D_8017D540 = 0x8017D540; +D_8017D548 = 0x8017D548; +D_8017D550 = 0x8017D550; +D_8017D558 = 0x8017D558; +D_8017D568 = 0x8017D568; +D_8017D570 = 0x8017D570; +D_8017D610 = 0x8017D610; +D_8017D614 = 0x8017D614; +D_8017D618 = 0x8017D618; +D_8017D61C = 0x8017D61C; +D_8017D620 = 0x8017D620; +D_8017D624 = 0x8017D624; +D_8017D628 = 0x8017D628; +D_8017D62C = 0x8017D62C; +D_8017D630 = 0x8017D630; +D_8017D638 = 0x8017D638; +D_8017D6B0 = 0x8017D6B0; +D_8017D6C4 = 0x8017D6C4; +D_8017D7CC = 0x8017D7CC; +D_8017D8CC = 0x8017D8CC; +D_8017D8D4 = 0x8017D8D4; +D_8017D9D4 = 0x8017D9D4; +D_8017D9D9 = 0x8017D9D9; +D_8017DA1C = 0x8017DA1C; +D_8017DA20 = 0x8017DA20; +D_8017DA24 = 0x8017DA24; +D_8017DA28 = 0x8017DA28; +D_8017DA2C = 0x8017DA2C; +D_8017DA30 = 0x8017DA30; +D_8017DA34 = 0x8017DA34; +D_8017DA38 = 0x8017DA38; +D_8017DA3C = 0x8017DA3C; +D_8017DA44 = 0x8017DA44; +D_8017DA48 = 0x8017DA48; +D_8017DA4C = 0x8017DA4C; +D_8017DA54 = 0x8017DA54; +D_8017DA58 = 0x8017DA58; +D_8017DA5C = 0x8017DA5C; +D_8017DA60 = 0x8017DA60; +D_8017DA64 = 0x8017DA64; +D_8017DA68 = 0x8017DA68; +D_8017DA6C = 0x8017DA6C; +D_8017DA70 = 0x8017DA70; +D_8017DA74 = 0x8017DA74; +D_8017DA78 = 0x8017DA78; +D_8017DA7C = 0x8017DA7C; +D_8017DA84 = 0x8017DA84; +D_8017DA88 = 0x8017DA88; +D_8017DA8C = 0x8017DA8C; +D_8017DA98 = 0x8017DA98; +D_8017DA9C = 0x8017DA9C; +D_8017DAA0 = 0x8017DAA0; +D_8017DAA8 = 0x8017DAA8; +D_8017DAB0 = 0x8017DAB0; +D_8017DAC0 = 0x8017DAC0; +D_8017DAC8 = 0x8017DAC8; +D_8017DAD0 = 0x8017DAD0; +D_8017DAD8 = 0x8017DAD8; +D_8017DAE0 = 0x8017DAE0; +D_8017DAE8 = 0x8017DAE8; +D_8017DAF0 = 0x8017DAF0; +D_8017DAF4 = 0x8017DAF4; +D_8017DAF8 = 0x8017DAF8; +D_8017DAFC = 0x8017DAFC; +D_8017DB00 = 0x8017DB00; +D_8017DB04 = 0x8017DB04; +D_8017DB08 = 0x8017DB08; +D_8017DB0C = 0x8017DB0C; +D_8017DB10 = 0x8017DB10; +D_8017DB14 = 0x8017DB14; +D_8017DB18 = 0x8017DB18; +D_8017DB1C = 0x8017DB1C; +D_8017DB20 = 0x8017DB20; +D_8017DB30 = 0x8017DB30; +D_8017DB40 = 0x8017DB40; +D_8017DB50 = 0x8017DB50; +D_8017DB60 = 0x8017DB60; +D_8017DB70 = 0x8017DB70; +D_8017DB74 = 0x8017DB74; +D_8017DB78 = 0x8017DB78; +D_8017DB7C = 0x8017DB7C; +D_8017DBB0 = 0x8017DBB0; +D_8017DBB4 = 0x8017DBB4; +D_8017DBB8 = 0x8017DBB8; +D_8017DBC0 = 0x8017DBC0; +D_8017DBC4 = 0x8017DBC4; +D_8017DBC8 = 0x8017DBC8; +D_8017DBCC = 0x8017DBCC; +D_8017DBD0 = 0x8017DBD0; +D_8017DBE0 = 0x8017DBE0; +D_8017DBE4 = 0x8017DBE4; +D_8017DBE8 = 0x8017DBE8; +D_8017DBF0 = 0x8017DBF0; +D_8017DBF4 = 0x8017DBF4; +D_8017DBF8 = 0x8017DBF8; +D_8017DC00 = 0x8017DC00; +D_8017DC04 = 0x8017DC04; +D_8017DC08 = 0x8017DC08; +D_8017DC10 = 0x8017DC10; +D_8017DC14 = 0x8017DC14; +D_8017DC18 = 0x8017DC18; +D_8017DC1C = 0x8017DC1C; +D_8017DC20 = 0x8017DC20; +D_8017DC24 = 0x8017DC24; +D_8017DC28 = 0x8017DC28; +D_8017DC34 = 0x8017DC34; +D_8017DC38 = 0x8017DC38; +D_8017DC3C = 0x8017DC3C; +D_8017DC40 = 0x8017DC40; +D_8017DC44 = 0x8017DC44; +D_8017DC4C = 0x8017DC4C; +D_8017DC58 = 0x8017DC58; +D_8017DC5C = 0x8017DC5C; +D_8017DC60 = 0x8017DC60; +D_8017DC64 = 0x8017DC64; +D_8017DC68 = 0x8017DC68; +D_8017DC6C = 0x8017DC6C; +D_8017DC70 = 0x8017DC70; +D_8017DC74 = 0x8017DC74; +D_8017DC78 = 0x8017DC78; +D_8017DC7C = 0x8017DC7C; +D_8017DC80 = 0x8017DC80; +D_8017DC84 = 0x8017DC84; +D_8017DC88 = 0x8017DC88; +D_8017DC8C = 0x8017DC8C; +D_8017DC90 = 0x8017DC90; +D_8017DC94 = 0x8017DC94; +D_8017DC98 = 0x8017DC98; +D_8017DC9C = 0x8017DC9C; +D_8017DCA0 = 0x8017DCA0; +D_8017DCA4 = 0x8017DCA4; +D_8017DCA8 = 0x8017DCA8; +D_8017DCAC = 0x8017DCAC; +D_8017DCB0 = 0x8017DCB0; +D_8017DCC0 = 0x8017DCC0; +D_8017DCC4 = 0x8017DCC4; +D_8017DCC8 = 0x8017DCC8; +D_8017DCD8 = 0x8017DCD8; +D_8017DCDC = 0x8017DCDC; +D_8017DCE0 = 0x8017DCE0; +D_8017DCE4 = 0x8017DCE4; +D_8017DCE8 = 0x8017DCE8; +D_8017DCEC = 0x8017DCEC; +D_8017DCF0 = 0x8017DCF0; +D_8017DCF4 = 0x8017DCF4; +D_8017DCF8 = 0x8017DCF8; +D_8017DCFC = 0x8017DCFC; +D_8017DD04 = 0x8017DD04; +D_8017DD08 = 0x8017DD08; +D_8017DD0C = 0x8017DD0C; +D_8017DD10 = 0x8017DD10; +D_8017DD14 = 0x8017DD14; +D_8017DD18 = 0x8017DD18; +D_8017DD20 = 0x8017DD20; +D_8017DEB0 = 0x8017DEB0; +D_8017DEC0 = 0x8017DEC0; +D_8017DEC4 = 0x8017DEC4; +D_8017DEC8 = 0x8017DEC8; +D_8017DECC = 0x8017DECC; +D_8017DED0 = 0x8017DED0; +D_8017DED4 = 0x8017DED4; +D_8017DED8 = 0x8017DED8; +D_8017DEDC = 0x8017DEDC; +D_8017DEE0 = 0x8017DEE0; +D_8017DEE4 = 0x8017DEE4; +D_8017DEE8 = 0x8017DEE8; +D_8017DEF0 = 0x8017DEF0; +D_8017DEF4 = 0x8017DEF4; +D_8017DEF8 = 0x8017DEF8; +D_8017DEFC = 0x8017DEFC; +D_8017DF00 = 0x8017DF00; +D_8017DF08 = 0x8017DF08; +D_8017DF18 = 0x8017DF18; +D_8017DF20 = 0x8017DF20; +D_8017DF24 = 0x8017DF24; +D_8017DF28 = 0x8017DF28; +D_8017DF2C = 0x8017DF2C; +D_8017DF30 = 0x8017DF30; +D_8017DF34 = 0x8017DF34; +D_8017DF38 = 0x8017DF38; +D_8017DF3C = 0x8017DF3C; +D_8017DF40 = 0x8017DF40; +D_8017DF44 = 0x8017DF44; +D_8017DF48 = 0x8017DF48; +D_8017DF4C = 0x8017DF4C; +D_8017DF50 = 0x8017DF50; +D_8017DF54 = 0x8017DF54; +D_8017DF58 = 0x8017DF58; +D_8017DF5C = 0x8017DF5C; +D_8017DF60 = 0x8017DF60; +D_8017DF64 = 0x8017DF64; +D_8017DF68 = 0x8017DF68; +D_8017DF6C = 0x8017DF6C; +D_8017DF70 = 0x8017DF70; +D_8017DF78 = 0x8017DF78; +D_8017DF88 = 0x8017DF88; +D_8017DF98 = 0x8017DF98; +D_8017DF9C = 0x8017DF9C; +D_8017DFA0 = 0x8017DFA0; +D_8017DFA4 = 0x8017DFA4; +D_8017DFA8 = 0x8017DFA8; +D_8017DFB0 = 0x8017DFB0; +D_8017DFC0 = 0x8017DFC0; +D_8017DFD0 = 0x8017DFD0; +D_8017DFD8 = 0x8017DFD8; +D_8017DFF0 = 0x8017DFF0; +D_8017E000 = 0x8017E000; +D_8017E004 = 0x8017E004; +D_8017E008 = 0x8017E008; +D_8017E00C = 0x8017E00C; +D_8017E010 = 0x8017E010; +D_8017E011 = 0x8017E011; +D_8017E012 = 0x8017E012; +D_8017E013 = 0x8017E013; +D_8017E01F = 0x8017E01F; +D_8017E10F = 0x8017E10F; +D_8017E110 = 0x8017E110; +D_8017E111 = 0x8017E111; +D_8017E112 = 0x8017E112; +D_8017E210 = 0x8017E210; +D_8017E218 = 0x8017E218; + +func_i1_8017E7A0 = 0x8017E7A0; //segment:ovl_i1 +func_i1_8017E7B0 = 0x8017E7B0; //segment:ovl_i1 +func_i1_8017E7BC = 0x8017E7BC; //segment:ovl_i1 +func_i1_8017E824 = 0x8017E824; //segment:ovl_i1 +func_i1_8017E8F0 = 0x8017E8F0; //segment:ovl_i1 +func_i1_8017E990 = 0x8017E990; //segment:ovl_i1 +func_i1_8017EA20 = 0x8017EA20; //segment:ovl_i1 +func_i1_8017EAB8 = 0x8017EAB8; //segment:ovl_i1 +func_i1_8017EB58 = 0x8017EB58; //segment:ovl_i1 +func_i1_8017EC0C = 0x8017EC0C; //segment:ovl_i1 +func_i1_8017EC70 = 0x8017EC70; //segment:ovl_i1 +func_i1_8017ECB8 = 0x8017ECB8; //segment:ovl_i1 +func_i1_8017ED08 = 0x8017ED08; //segment:ovl_i1 +func_i1_8017ED48 = 0x8017ED48; //segment:ovl_i1 +func_i1_8017F9D0 = 0x8017F9D0; //segment:ovl_i1 +func_i1_8017FA2C = 0x8017FA2C; //segment:ovl_i1 +func_i1_8017FC98 = 0x8017FC98; //segment:ovl_i1 +func_i1_8017FEFC = 0x8017FEFC; //segment:ovl_i1 +func_i1_8017FFD0 = 0x8017FFD0; //segment:ovl_i1 +func_i1_801802D8 = 0x801802D8; //segment:ovl_i1 +func_i1_801816B4 = 0x801816B4; //segment:ovl_i1 +func_i1_801819B0 = 0x801819B0; //segment:ovl_i1 +func_i1_80181CF4 = 0x80181CF4; //segment:ovl_i1 +func_i1_80181D88 = 0x80181D88; //segment:ovl_i1 +func_i1_80181DE4 = 0x80181DE4; //segment:ovl_i1 +func_i1_80181F60 = 0x80181F60; //segment:ovl_i1 +func_i1_80182150 = 0x80182150; //segment:ovl_i1 +func_i1_80182334 = 0x80182334; //segment:ovl_i1 +func_i1_801823DC = 0x801823DC; //segment:ovl_i1 +func_i1_80182698 = 0x80182698; //segment:ovl_i1 +func_i1_8018280C = 0x8018280C; //segment:ovl_i1 +func_i1_80182D2C = 0x80182D2C; //segment:ovl_i1 +func_i1_80182D7C = 0x80182D7C; //segment:ovl_i1 +func_i1_80182E24 = 0x80182E24; //segment:ovl_i1 +func_i1_80182E78 = 0x80182E78; //segment:ovl_i1 +func_i1_80182ED0 = 0x80182ED0; //segment:ovl_i1 +func_i1_80182F04 = 0x80182F04; //segment:ovl_i1 +func_i1_80182FFC = 0x80182FFC; //segment:ovl_i1 +func_i1_80183054 = 0x80183054; //segment:ovl_i1 +func_i1_801830FC = 0x801830FC; //segment:ovl_i1 +func_i1_80183320 = 0x80183320; //segment:ovl_i1 +func_i1_8018340C = 0x8018340C; //segment:ovl_i1 +func_i1_8018501C = 0x8018501C; //segment:ovl_i1 +func_i1_80185500 = 0x80185500; //segment:ovl_i1 +func_i1_801859DC = 0x801859DC; //segment:ovl_i1 +func_i1_80185EC4 = 0x80185EC4; //segment:ovl_i1 +func_i1_80185F1C = 0x80185F1C; //segment:ovl_i1 +func_i1_80185F8C = 0x80185F8C; //segment:ovl_i1 +func_i1_80185FE8 = 0x80185FE8; //segment:ovl_i1 +func_i1_8018609C = 0x8018609C; //segment:ovl_i1 +func_i1_801860F4 = 0x801860F4; //segment:ovl_i1 +func_i1_801861A8 = 0x801861A8; //segment:ovl_i1 +func_i1_80186200 = 0x80186200; //segment:ovl_i1 +func_i1_801862B4 = 0x801862B4; //segment:ovl_i1 +func_i1_8018643C = 0x8018643C; //segment:ovl_i1 +func_i1_80186590 = 0x80186590; //segment:ovl_i1 +func_i1_80186630 = 0x80186630; //segment:ovl_i1 +func_i1_80186718 = 0x80186718; //segment:ovl_i1 +func_i1_801867D0 = 0x801867D0; //segment:ovl_i1 +func_i1_801868EC = 0x801868EC; //segment:ovl_i1 +func_i1_8018696C = 0x8018696C; //segment:ovl_i1 +func_i1_80186AF4 = 0x80186AF4; //segment:ovl_i1 +func_i1_801881E8 = 0x801881E8; //segment:ovl_i1 +func_i1_801883D4 = 0x801883D4; //segment:ovl_i1 +func_i1_80189360 = 0x80189360; //segment:ovl_i1 +func_i1_8018954C = 0x8018954C; //segment:ovl_i1 +func_i1_801895C8 = 0x801895C8; //segment:ovl_i1 +func_i1_80189630 = 0x80189630; //segment:ovl_i1 +func_i1_801896AC = 0x801896AC; //segment:ovl_i1 +func_i1_80189718 = 0x80189718; //segment:ovl_i1 +func_i1_8018977C = 0x8018977C; //segment:ovl_i1 +func_i1_80189788 = 0x80189788; //segment:ovl_i1 +func_i1_80189D14 = 0x80189D14; //segment:ovl_i1 +func_i1_80189F20 = 0x80189F20; //segment:ovl_i1 +func_i1_80189F44 = 0x80189F44; //segment:ovl_i1 +func_i1_8018A09C = 0x8018A09C; //segment:ovl_i1 +func_i1_8018A114 = 0x8018A114; //segment:ovl_i1 +func_i1_8018A120 = 0x8018A120; //segment:ovl_i1 +func_i1_8018A624 = 0x8018A624; //segment:ovl_i1 +func_i1_8018A64C = 0x8018A64C; //segment:ovl_i1 +func_i1_8018A740 = 0x8018A740; //segment:ovl_i1 +func_i1_8018A7B0 = 0x8018A7B0; //segment:ovl_i1 +func_i1_8018A83C = 0x8018A83C; //segment:ovl_i1 +func_i1_8018AA64 = 0x8018AA64; //segment:ovl_i1 +func_i1_8018AFD4 = 0x8018AFD4; //segment:ovl_i1 +func_i1_8018B608 = 0x8018B608; //segment:ovl_i1 +func_i1_8018B674 = 0x8018B674; //segment:ovl_i1 +func_i1_8018F598 = 0x8018F598; //segment:ovl_i1 +func_i1_8018F69C = 0x8018F69C; //segment:ovl_i1 +func_i1_8018F81C = 0x8018F81C; //segment:ovl_i1 +func_i1_8018F86C = 0x8018F86C; //segment:ovl_i1 +func_i1_8018F8D4 = 0x8018F8D4; //segment:ovl_i1 +func_i1_8018FB40 = 0x8018FB40; //segment:ovl_i1 +func_i1_8018FB60 = 0x8018FB60; //segment:ovl_i1 +func_i1_8018FBE8 = 0x8018FBE8; //segment:ovl_i1 +func_i1_8018FED0 = 0x8018FED0; //segment:ovl_i1 +func_i1_80190050 = 0x80190050; //segment:ovl_i1 +func_i1_801902A8 = 0x801902A8; //segment:ovl_i1 +func_i1_80190720 = 0x80190720; //segment:ovl_i1 +D_i1_80190A50 = 0x80190A50; //segment:ovl_i1 +D_i1_80190A60 = 0x80190A60; //segment:ovl_i1 +D_i1_80190A64 = 0x80190A64; //segment:ovl_i1 +D_i1_80190A70 = 0x80190A70; //segment:ovl_i1 +D_i1_80190A7C = 0x80190A7C; //segment:ovl_i1 +D_i1_80190A88 = 0x80190A88; //segment:ovl_i1 +D_i1_80190A94 = 0x80190A94; //segment:ovl_i1 +D_i1_80190AA0 = 0x80190AA0; //segment:ovl_i1 +D_i1_80190AAC = 0x80190AAC; //segment:ovl_i1 +D_i1_80190AB8 = 0x80190AB8; //segment:ovl_i1 +D_i1_80190AC4 = 0x80190AC4; //segment:ovl_i1 +D_i1_80190AD0 = 0x80190AD0; //segment:ovl_i1 +D_i1_80190ADC = 0x80190ADC; //segment:ovl_i1 +D_i1_80190AE8 = 0x80190AE8; //segment:ovl_i1 +D_i1_80190AF4 = 0x80190AF4; //segment:ovl_i1 +D_i1_80190B04 = 0x80190B04; //segment:ovl_i1 +D_i1_80190B14 = 0x80190B14; //segment:ovl_i1 +D_i1_80190B24 = 0x80190B24; //segment:ovl_i1 +D_i1_80190B34 = 0x80190B34; //segment:ovl_i1 +D_i1_80190B40 = 0x80190B40; //segment:ovl_i1 +D_i1_80190B4C = 0x80190B4C; //segment:ovl_i1 +D_i1_80190B58 = 0x80190B58; //segment:ovl_i1 +D_i1_80190B64 = 0x80190B64; //segment:ovl_i1 +D_i1_80190B70 = 0x80190B70; //segment:ovl_i1 +D_i1_80190B88 = 0x80190B88; //segment:ovl_i1 +D_i1_80190B94 = 0x80190B94; //segment:ovl_i1 +D_i1_80190BA0 = 0x80190BA0; //segment:ovl_i1 +D_i1_80190BAC = 0x80190BAC; //segment:ovl_i1 +D_i1_80190BB8 = 0x80190BB8; //segment:ovl_i1 +D_i1_80190BC4 = 0x80190BC4; //segment:ovl_i1 +D_i1_80190BD0 = 0x80190BD0; //segment:ovl_i1 +D_i1_80190BDC = 0x80190BDC; //segment:ovl_i1 +D_i1_80190CCC = 0x80190CCC; //segment:ovl_i1 +D_i1_80190CDC = 0x80190CDC; //segment:ovl_i1 +D_i1_80190CEC = 0x80190CEC; //segment:ovl_i1 +D_i1_80190CF8 = 0x80190CF8; //segment:ovl_i1 +D_i1_80190D04 = 0x80190D04; //segment:ovl_i1 +D_i1_80190D10 = 0x80190D10; //segment:ovl_i1 +D_i1_80190D1C = 0x80190D1C; //segment:ovl_i1 +D_i1_80190D28 = 0x80190D28; //segment:ovl_i1 +D_i1_80190D34 = 0x80190D34; //segment:ovl_i1 +D_i1_80190D40 = 0x80190D40; //segment:ovl_i1 +D_i1_80190D4C = 0x80190D4C; //segment:ovl_i1 +D_i1_80190D58 = 0x80190D58; //segment:ovl_i1 +D_i1_80190D64 = 0x80190D64; //segment:ovl_i1 +D_i1_80190D70 = 0x80190D70; //segment:ovl_i1 +D_i1_80190D7C = 0x80190D7C; //segment:ovl_i1 +D_i1_80190D88 = 0x80190D88; //segment:ovl_i1 +D_i1_80190D94 = 0x80190D94; //segment:ovl_i1 +D_i1_80190DA0 = 0x80190DA0; //segment:ovl_i1 +D_i1_80190DAC = 0x80190DAC; //segment:ovl_i1 +D_i1_80190DC0 = 0x80190DC0; //segment:ovl_i1 +D_i1_80190F50 = 0x80190F50; //segment:ovl_i1 +D_i1_801910E0 = 0x801910E0; //segment:ovl_i1 +D_i1_801910EC = 0x801910EC; //segment:ovl_i1 +D_i1_8019127C = 0x8019127C; //segment:ovl_i1 +D_i1_80191288 = 0x80191288; //segment:ovl_i1 +D_i1_801912CC = 0x801912CC; //segment:ovl_i1 +D_i1_801912CE = 0x801912CE; //segment:ovl_i1 +D_i1_801912D8 = 0x801912D8; //segment:ovl_i1 +D_i1_801914E8 = 0x801914E8; //segment:ovl_i1 +D_i1_801916F8 = 0x801916F8; //segment:ovl_i1 +D_i1_80191780 = 0x80191780; //segment:ovl_i1 +D_i1_801917C2 = 0x801917C2; //segment:ovl_i1 +D_i1_801917C4 = 0x801917C4; //segment:ovl_i1 +D_i1_801919C8 = 0x801919C8; //segment:ovl_i1 +D_i1_80191A7C = 0x80191A7C; //segment:ovl_i1 +D_i1_80191AA0 = 0x80191AA0; //segment:ovl_i1 +D_i1_80191AA2 = 0x80191AA2; //segment:ovl_i1 +D_i1_80191AB8 = 0x80191AB8; //segment:ovl_i1 +D_i1_80191C38 = 0x80191C38; //segment:ovl_i1 +D_i1_80191F54 = 0x80191F54; //segment:ovl_i1 +D_i1_80191F78 = 0x80191F78; //segment:ovl_i1 +D_i1_80191F80 = 0x80191F80; //segment:ovl_i1 +D_i1_80191F90 = 0x80191F90; //segment:ovl_i1 +D_i1_80191F9C = 0x80191F9C; //segment:ovl_i1 +D_i1_80191FA4 = 0x80191FA4; //segment:ovl_i1 +D_i1_80191FAC = 0x80191FAC; //segment:ovl_i1 +D_i1_80191FBC = 0x80191FBC; //segment:ovl_i1 +D_i1_80191FC4 = 0x80191FC4; //segment:ovl_i1 +D_i1_80191FCC = 0x80191FCC; //segment:ovl_i1 +D_i1_80191FD4 = 0x80191FD4; //segment:ovl_i1 +D_i1_80191FDC = 0x80191FDC; //segment:ovl_i1 +D_i1_80191FE8 = 0x80191FE8; //segment:ovl_i1 +D_i1_80192000 = 0x80192000; //segment:ovl_i1 +D_i1_80192080 = 0x80192080; //segment:ovl_i1 +D_i1_801920B8 = 0x801920B8; //segment:ovl_i1 +D_i1_801920D0 = 0x801920D0; //segment:ovl_i1 +D_i1_801920D4 = 0x801920D4; //segment:ovl_i1 +D_i1_80192940 = 0x80192940; +D_i1_80192950 = 0x80192950; //segment:ovl_i1 +D_i1_80192964 = 0x80192964; //segment:ovl_i1 +D_i1_80192994 = 0x80192994; //segment:ovl_i1 +D_i1_80192998 = 0x80192998; //segment:ovl_i1 +D_i1_80192A50 = 0x80192A50; //segment:ovl_i1 +D_i1_80192A54 = 0x80192A54; //segment:ovl_i1 +D_i1_80192A58 = 0x80192A58; //segment:ovl_i1 +D_i1_80192A68 = 0x80192A68; //segment:ovl_i1 +D_i1_80192A70 = 0x80192A70; //segment:ovl_i1 +D_i1_80192AB8 = 0x80192AB8; //segment:ovl_i1 +D_i1_80192B1C = 0x80192B1C; //segment:ovl_i1 +D_i1_80192B24 = 0x80192B24; //segment:ovl_i1 +D_i1_80192B2C = 0x80192B2C; //segment:ovl_i1 +D_i1_80192B34 = 0x80192B34; //segment:ovl_i1 +D_i1_80192B38 = 0x80192B38; //segment:ovl_i1 +D_i1_801931B8 = 0x801931B8; //segment:ovl_i1 +D_i1_80193240 = 0x80193240; //segment:ovl_i1 +D_i1_80193242 = 0x80193242; //segment:ovl_i1 +D_i1_801932B4 = 0x801932B4; //segment:ovl_i1 +D_i1_80193338 = 0x80193338; //segment:ovl_i1 +D_i1_8019333C = 0x8019333C; //segment:ovl_i1 +D_i1_80193340 = 0x80193340; //segment:ovl_i1 + +func_i2_8017E7A0 = 0x8017E7A0; //segment:ovl_i2 +func_i2_8017E7B0 = 0x8017E7B0; //segment:ovl_i2 +func_i2_8017E7EC = 0x8017E7EC; //segment:ovl_i2 +func_i2_8017E8D0 = 0x8017E8D0; //segment:ovl_i2 +func_i2_8017EA44 = 0x8017EA44; //segment:ovl_i2 +func_i2_8017EBDC = 0x8017EBDC; //segment:ovl_i2 +func_i2_8017ED88 = 0x8017ED88; //segment:ovl_i2 +func_i2_8017EEE8 = 0x8017EEE8; //segment:ovl_i2 +func_i2_8017EF88 = 0x8017EF88; //segment:ovl_i2 +func_i2_8017F018 = 0x8017F018; //segment:ovl_i2 +func_i2_8017F0B8 = 0x8017F0B8; //segment:ovl_i2 +func_i2_8017F278 = 0x8017F278; //segment:ovl_i2 +func_i2_8017F308 = 0x8017F308; //segment:ovl_i2 +func_i2_8017F428 = 0x8017F428; //segment:ovl_i2 +func_i2_8017F4A8 = 0x8017F4A8; //segment:ovl_i2 +func_i2_8017F518 = 0x8017F518; //segment:ovl_i2 +func_i2_8017F5C4 = 0x8017F5C4; //segment:ovl_i2 +func_i2_8017FA50 = 0x8017FA50; //segment:ovl_i2 +func_i2_8017FCC0 = 0x8017FCC0; //segment:ovl_i2 +func_i2_8017FE04 = 0x8017FE04; //segment:ovl_i2 +func_i2_8017FEAC = 0x8017FEAC; //segment:ovl_i2 +func_i2_8017FF2C = 0x8017FF2C; //segment:ovl_i2 +func_i2_8018010C = 0x8018010C; //segment:ovl_i2 +func_i2_801801AC = 0x801801AC; //segment:ovl_i2 +func_i2_8018022C = 0x8018022C; //segment:ovl_i2 +func_i2_80180394 = 0x80180394; //segment:ovl_i2 +func_i2_80180570 = 0x80180570; //segment:ovl_i2 +func_i2_801808A4 = 0x801808A4; //segment:ovl_i2 +func_i2_80180A0C = 0x80180A0C; //segment:ovl_i2 +func_i2_801829FC = 0x801829FC; //segment:ovl_i2 +func_i2_80182D04 = 0x80182D04; //segment:ovl_i2 +func_i2_801839B4 = 0x801839B4; //segment:ovl_i2 +func_i2_80183B2C = 0x80183B2C; //segment:ovl_i2 +func_i2_80183C48 = 0x80183C48; //segment:ovl_i2 +func_i2_80183D10 = 0x80183D10; //segment:ovl_i2 +func_i2_80183D88 = 0x80183D88; //segment:ovl_i2 +func_i2_80183F30 = 0x80183F30; //segment:ovl_i2 +func_i2_80183FC4 = 0x80183FC4; //segment:ovl_i2 +func_i2_80184C00 = 0x80184C00; //segment:ovl_i2 +func_i2_80184C80 = 0x80184C80; //segment:ovl_i2 +func_i2_80184D00 = 0x80184D00; //segment:ovl_i2 +func_i2_80184D80 = 0x80184D80; //segment:ovl_i2 +func_i2_80184E00 = 0x80184E00; //segment:ovl_i2 +func_i2_80184EF8 = 0x80184EF8; //segment:ovl_i2 +func_i2_80185028 = 0x80185028; //segment:ovl_i2 +func_i2_8018511C = 0x8018511C; //segment:ovl_i2 +func_i2_80185298 = 0x80185298; //segment:ovl_i2 +func_i2_80185FB0 = 0x80185FB0; //segment:ovl_i2 +func_i2_80186250 = 0x80186250; //segment:ovl_i2 +func_i2_80186344 = 0x80186344; //segment:ovl_i2 +func_i2_801863FC = 0x801863FC; //segment:ovl_i2 +func_i2_80186550 = 0x80186550; //segment:ovl_i2 +func_i2_80186AA4 = 0x80186AA4; //segment:ovl_i2 +func_i2_80186C24 = 0x80186C24; //segment:ovl_i2 +func_i2_80186DE0 = 0x80186DE0; //segment:ovl_i2 +func_i2_8018705C = 0x8018705C; //segment:ovl_i2 +func_i2_80187144 = 0x80187144; //segment:ovl_i2 +func_i2_80187164 = 0x80187164; //segment:ovl_i2 +func_i2_801871A8 = 0x801871A8; //segment:ovl_i2 +func_i2_80187200 = 0x80187200; //segment:ovl_i2 +func_i2_80187244 = 0x80187244; //segment:ovl_i2 +func_i2_8018729C = 0x8018729C; //segment:ovl_i2 +func_i2_80189D18 = 0x80189D18; //segment:ovl_i2 +func_i2_8018A430 = 0x8018A430; //segment:ovl_i2 +func_i2_8018A65C = 0x8018A65C; //segment:ovl_i2 +func_i2_8018AA28 = 0x8018AA28; //segment:ovl_i2 +func_i2_8018AB00 = 0x8018AB00; //segment:ovl_i2 +func_i2_8018AC58 = 0x8018AC58; //segment:ovl_i2 +func_i2_8018B6FC = 0x8018B6FC; //segment:ovl_i2 +func_i2_8018B950 = 0x8018B950; //segment:ovl_i2 +D_i2_8018C650 = 0x8018C650; //segment:ovl_i2 +D_i2_8018C660 = 0x8018C660; //segment:ovl_i2 +D_i2_8018C750 = 0x8018C750; //segment:ovl_i2 +D_i2_8018C764 = 0x8018C764; //segment:ovl_i2 +D_i2_8018C784 = 0x8018C784; //segment:ovl_i2 +D_i2_8018C7B4 = 0x8018C7B4; //segment:ovl_i2 +D_i2_8018C7C4 = 0x8018C7C4; //segment:ovl_i2 +D_i2_8018C7D4 = 0x8018C7D4; //segment:ovl_i2 +D_i2_8018C7E4 = 0x8018C7E4; //segment:ovl_i2 +D_i2_8018C7F4 = 0x8018C7F4; //segment:ovl_i2 +D_i2_8018C800 = 0x8018C800; //segment:ovl_i2 +D_i2_8018C830 = 0x8018C830; //segment:ovl_i2 +D_i2_8018C83C = 0x8018C83C; //segment:ovl_i2 +D_i2_8018C840 = 0x8018C840; //segment:ovl_i2 +D_i2_8018C870 = 0x8018C870; //segment:ovl_i2 +D_i2_8018C874 = 0x8018C874; //segment:ovl_i2 +D_i2_8018C880 = 0x8018C880; //segment:ovl_i2 +D_i2_8018C88C = 0x8018C88C; //segment:ovl_i2 +D_i2_8018C898 = 0x8018C898; //segment:ovl_i2 +D_i2_8018C89C = 0x8018C89C; //segment:ovl_i2 +D_i2_8018C8A0 = 0x8018C8A0; //segment:ovl_i2 +D_i2_8018C8A4 = 0x8018C8A4; //segment:ovl_i2 +D_i2_8018C8B0 = 0x8018C8B0; //segment:ovl_i2 +D_i2_8018C8BC = 0x8018C8BC; //segment:ovl_i2 +D_i2_8018C8C8 = 0x8018C8C8; //segment:ovl_i2 +D_i2_8018C8D4 = 0x8018C8D4; //segment:ovl_i2 +D_i2_8018C8E0 = 0x8018C8E0; //segment:ovl_i2 +D_i2_8018C91C = 0x8018C91C; //segment:ovl_i2 +D_i2_8018C940 = 0x8018C940; //segment:ovl_i2 +D_i2_8018C950 = 0x8018C950; //segment:ovl_i2 +D_i2_8018C960 = 0x8018C960; //segment:ovl_i2 +D_i2_8018C970 = 0x8018C970; //segment:ovl_i2 +D_i2_8018C980 = 0x8018C980; //segment:ovl_i2 +D_i2_8018C990 = 0x8018C990; //segment:ovl_i2 +D_i2_8018C9A0 = 0x8018C9A0; //segment:ovl_i2 +D_i2_8018C9AC = 0x8018C9AC; //segment:ovl_i2 +D_i2_8018CFA0 = 0x8018CFA0; +D_i2_8018CFB0 = 0x8018CFB0; //segment:ovl_i2 +D_i2_8018CFC0 = 0x8018CFC0; //segment:ovl_i2 + +func_i3_8017E7A0 = 0x8017E7A0; //segment:ovl_i3 +func_i3_8017E7B0 = 0x8017E7B0; //segment:ovl_i3 +func_i3_8017E864 = 0x8017E864; //segment:ovl_i3 +func_i3_8017E8FC = 0x8017E8FC; //segment:ovl_i3 +func_i3_8017E984 = 0x8017E984; //segment:ovl_i3 +func_i3_8017E9D4 = 0x8017E9D4; //segment:ovl_i3 +func_i3_8017EBC4 = 0x8017EBC4; //segment:ovl_i3 +func_i3_8018143C = 0x8018143C; //segment:ovl_i3 +func_i3_80181550 = 0x80181550; //segment:ovl_i3 +func_i3_801816F0 = 0x801816F0; //segment:ovl_i3 +func_i3_80182C48 = 0x80182C48; //segment:ovl_i3 +func_i3_80182F60 = 0x80182F60; //segment:ovl_i3 +func_i3_8018335C = 0x8018335C; //segment:ovl_i3 +func_i3_801837D8 = 0x801837D8; //segment:ovl_i3 +func_i3_80184658 = 0x80184658; //segment:ovl_i3 +func_i3_8018476C = 0x8018476C; //segment:ovl_i3 +func_i3_80184854 = 0x80184854; //segment:ovl_i3 +func_i3_80184920 = 0x80184920; //segment:ovl_i3 +func_i3_80184A90 = 0x80184A90; //segment:ovl_i3 +func_i3_80184BAC = 0x80184BAC; //segment:ovl_i3 +func_i3_80184CE4 = 0x80184CE4; //segment:ovl_i3 +func_i3_80185200 = 0x80185200; //segment:ovl_i3 +func_i3_80185D14 = 0x80185D14; //segment:ovl_i3 +func_i3_80185DC8 = 0x80185DC8; //segment:ovl_i3 +func_i3_80185EC4 = 0x80185EC4; //segment:ovl_i3 +func_i3_80186004 = 0x80186004; //segment:ovl_i3 +func_i3_801871D0 = 0x801871D0; //segment:ovl_i3 +func_i3_801872A8 = 0x801872A8; //segment:ovl_i3 +func_i3_8018737C = 0x8018737C; //segment:ovl_i3 +func_i3_8018741C = 0x8018741C; //segment:ovl_i3 +func_i3_80187484 = 0x80187484; //segment:ovl_i3 +func_i3_801876B0 = 0x801876B0; //segment:ovl_i3 +func_i3_8018774C = 0x8018774C; //segment:ovl_i3 +func_i3_80187A10 = 0x80187A10; //segment:ovl_i3 +func_i3_80187C80 = 0x80187C80; //segment:ovl_i3 +func_i3_80187DCC = 0x80187DCC; //segment:ovl_i3 +func_i3_80187F8C = 0x80187F8C; //segment:ovl_i3 +func_i3_8018818C = 0x8018818C; //segment:ovl_i3 +func_i3_801881AC = 0x801881AC; //segment:ovl_i3 +func_i3_80188294 = 0x80188294; //segment:ovl_i3 +func_i3_80188748 = 0x80188748; //segment:ovl_i3 +func_i3_80188828 = 0x80188828; //segment:ovl_i3 +func_i3_80188904 = 0x80188904; //segment:ovl_i3 +func_i3_80188DD0 = 0x80188DD0; //segment:ovl_i3 +func_i3_80188E3C = 0x80188E3C; //segment:ovl_i3 +func_i3_80188E48 = 0x80188E48; //segment:ovl_i3 +func_i3_80189034 = 0x80189034; //segment:ovl_i3 +func_i3_80189118 = 0x80189118; //segment:ovl_i3 +func_i3_80189280 = 0x80189280; //segment:ovl_i3 +func_i3_80189318 = 0x80189318; //segment:ovl_i3 +func_i3_80189978 = 0x80189978; //segment:ovl_i3 +func_i3_80189AB8 = 0x80189AB8; //segment:ovl_i3 +func_i3_80189E9C = 0x80189E9C; //segment:ovl_i3 +func_i3_80189F08 = 0x80189F08; //segment:ovl_i3 +func_i3_8018A0E8 = 0x8018A0E8; //segment:ovl_i3 +func_i3_8018A4C4 = 0x8018A4C4; //segment:ovl_i3 +func_i3_8018A530 = 0x8018A530; //segment:ovl_i3 +func_i3_8018A8AC = 0x8018A8AC; //segment:ovl_i3 +func_i3_8018AA5C = 0x8018AA5C; //segment:ovl_i3 +func_i3_8018AB8C = 0x8018AB8C; //segment:ovl_i3 +func_i3_8018ABF4 = 0x8018ABF4; //segment:ovl_i3 +func_i3_8018AD1C = 0x8018AD1C; //segment:ovl_i3 +func_i3_8018AD8C = 0x8018AD8C; //segment:ovl_i3 +func_i3_8018AEE0 = 0x8018AEE0; //segment:ovl_i3 +func_i3_8018AF4C = 0x8018AF4C; //segment:ovl_i3 +func_i3_8018AF8C = 0x8018AF8C; //segment:ovl_i3 +func_i3_8018B618 = 0x8018B618; //segment:ovl_i3 +func_i3_8018BC60 = 0x8018BC60; //segment:ovl_i3 +func_i3_8018BD08 = 0x8018BD08; //segment:ovl_i3 +func_i3_8018F980 = 0x8018F980; //segment:ovl_i3 +func_i3_8018FC80 = 0x8018FC80; //segment:ovl_i3 +func_i3_8018FE6C = 0x8018FE6C; //segment:ovl_i3 +func_i3_80190150 = 0x80190150; //segment:ovl_i3 +func_i3_801901C0 = 0x801901C0; //segment:ovl_i3 +func_i3_80190300 = 0x80190300; //segment:ovl_i3 +func_i3_801903D0 = 0x801903D0; //segment:ovl_i3 +func_i3_80190454 = 0x80190454; //segment:ovl_i3 +func_i3_80190618 = 0x80190618; //segment:ovl_i3 +func_i3_801906F4 = 0x801906F4; //segment:ovl_i3 +func_i3_801908B0 = 0x801908B0; //segment:ovl_i3 +func_i3_80190920 = 0x80190920; //segment:ovl_i3 +func_i3_80190AC0 = 0x80190AC0; //segment:ovl_i3 +func_i3_80190B64 = 0x80190B64; //segment:ovl_i3 +func_i3_80190C50 = 0x80190C50; //segment:ovl_i3 +func_i3_80190CAC = 0x80190CAC; //segment:ovl_i3 +func_i3_801910A8 = 0x801910A8; //segment:ovl_i3 +func_i3_80191120 = 0x80191120; //segment:ovl_i3 +func_i3_80191194 = 0x80191194; //segment:ovl_i3 +func_i3_80191480 = 0x80191480; //segment:ovl_i3 +func_i3_80191764 = 0x80191764; //segment:ovl_i3 +func_i3_80191858 = 0x80191858; //segment:ovl_i3 +func_i3_80191F50 = 0x80191F50; //segment:ovl_i3 +func_i3_80192474 = 0x80192474; //segment:ovl_i3 +func_i3_801927CC = 0x801927CC; //segment:ovl_i3 +func_i3_80192A60 = 0x80192A60; //segment:ovl_i3 +func_i3_80192A94 = 0x80192A94; //segment:ovl_i3 +func_i3_80192AD8 = 0x80192AD8; //segment:ovl_i3 +func_i3_80192EFC = 0x80192EFC; //segment:ovl_i3 +func_i3_80193064 = 0x80193064; //segment:ovl_i3 +func_i3_801930CC = 0x801930CC; //segment:ovl_i3 +func_i3_80193450 = 0x80193450; //segment:ovl_i3 +func_i3_80193484 = 0x80193484; //segment:ovl_i3 +func_i3_801936D8 = 0x801936D8; //segment:ovl_i3 +func_i3_80193AC0 = 0x80193AC0; //segment:ovl_i3 +func_i3_80193E70 = 0x80193E70; //segment:ovl_i3 +func_i3_801940DC = 0x801940DC; //segment:ovl_i3 +func_i3_801942E4 = 0x801942E4; //segment:ovl_i3 +func_i3_801943E4 = 0x801943E4; //segment:ovl_i3 +func_i3_801945C8 = 0x801945C8; //segment:ovl_i3 +func_i3_8019464C = 0x8019464C; //segment:ovl_i3 +func_i3_801946B0 = 0x801946B0; //segment:ovl_i3 +func_i3_801949F4 = 0x801949F4; //segment:ovl_i3 +func_i3_80195878 = 0x80195878; //segment:ovl_i3 +func_i3_80195A80 = 0x80195A80; //segment:ovl_i3 +func_i3_80195B48 = 0x80195B48; //segment:ovl_i3 +func_i3_80195BB0 = 0x80195BB0; //segment:ovl_i3 +func_i3_80195C84 = 0x80195C84; //segment:ovl_i3 +func_i3_80195D0C = 0x80195D0C; //segment:ovl_i3 +func_i3_801961C0 = 0x801961C0; //segment:ovl_i3 +func_i3_801962C8 = 0x801962C8; //segment:ovl_i3 +func_i3_80196340 = 0x80196340; //segment:ovl_i3 +func_i3_80196424 = 0x80196424; //segment:ovl_i3 +func_i3_8019649C = 0x8019649C; //segment:ovl_i3 +func_i3_80196A3C = 0x80196A3C; //segment:ovl_i3 +func_i3_80196C2C = 0x80196C2C; //segment:ovl_i3 +func_i3_80196D34 = 0x80196D34; //segment:ovl_i3 +func_i3_80197070 = 0x80197070; //segment:ovl_i3 +func_i3_80197178 = 0x80197178; //segment:ovl_i3 +func_i3_801971D4 = 0x801971D4; //segment:ovl_i3 +func_i3_80197250 = 0x80197250; //segment:ovl_i3 +func_i3_801972CC = 0x801972CC; //segment:ovl_i3 +func_i3_801973B0 = 0x801973B0; //segment:ovl_i3 +func_i3_80197D80 = 0x80197D80; //segment:ovl_i3 +func_i3_80197F7C = 0x80197F7C; //segment:ovl_i3 +func_i3_80198020 = 0x80198020; //segment:ovl_i3 +func_i3_80198088 = 0x80198088; //segment:ovl_i3 +func_i3_80198264 = 0x80198264; //segment:ovl_i3 +func_i3_80198384 = 0x80198384; //segment:ovl_i3 +func_i3_80198F68 = 0x80198F68; //segment:ovl_i3 +func_i3_801990A4 = 0x801990A4; //segment:ovl_i3 +func_i3_80199140 = 0x80199140; //segment:ovl_i3 +func_i3_80199210 = 0x80199210; //segment:ovl_i3 +func_i3_80199630 = 0x80199630; //segment:ovl_i3 +func_i3_80199688 = 0x80199688; //segment:ovl_i3 +func_i3_80199ED0 = 0x80199ED0; //segment:ovl_i3 +func_i3_80199F2C = 0x80199F2C; //segment:ovl_i3 +func_i3_8019A360 = 0x8019A360; //segment:ovl_i3 +func_i3_8019A3BC = 0x8019A3BC; //segment:ovl_i3 +func_i3_8019A6FC = 0x8019A6FC; //segment:ovl_i3 +func_i3_8019A7A4 = 0x8019A7A4; //segment:ovl_i3 +func_i3_8019AEE0 = 0x8019AEE0; //segment:ovl_i3 +func_i3_8019B4AC = 0x8019B4AC; //segment:ovl_i3 +func_i3_8019BB50 = 0x8019BB50; //segment:ovl_i3 +func_i3_8019BCCC = 0x8019BCCC; //segment:ovl_i3 +func_i3_8019C158 = 0x8019C158; //segment:ovl_i3 +func_i3_8019C190 = 0x8019C190; //segment:ovl_i3 +func_i3_8019C950 = 0x8019C950; //segment:ovl_i3 +func_i3_8019CDD4 = 0x8019CDD4; //segment:ovl_i3 +func_i3_8019DB40 = 0x8019DB40; //segment:ovl_i3 +func_i3_8019DE74 = 0x8019DE74; //segment:ovl_i3 +func_i3_8019E450 = 0x8019E450; //segment:ovl_i3 +func_i3_8019E9E8 = 0x8019E9E8; //segment:ovl_i3 +func_i3_8019EBC8 = 0x8019EBC8; //segment:ovl_i3 +func_i3_8019FE80 = 0x8019FE80; //segment:ovl_i3 +func_i3_801A0050 = 0x801A0050; //segment:ovl_i3 +func_i3_801A00C0 = 0x801A00C0; //segment:ovl_i3 +func_i3_801A0580 = 0x801A0580; //segment:ovl_i3 +func_i3_801A0608 = 0x801A0608; //segment:ovl_i3 +func_i3_801A06DC = 0x801A06DC; //segment:ovl_i3 +func_i3_801A0780 = 0x801A0780; //segment:ovl_i3 +func_i3_801A0820 = 0x801A0820; //segment:ovl_i3 +func_i3_801A085C = 0x801A085C; //segment:ovl_i3 +func_i3_801A0970 = 0x801A0970; //segment:ovl_i3 +func_i3_801A09BC = 0x801A09BC; //segment:ovl_i3 +func_i3_801A0AB8 = 0x801A0AB8; //segment:ovl_i3 +func_i3_801A0C68 = 0x801A0C68; //segment:ovl_i3 +func_i3_801A0F2C = 0x801A0F2C; //segment:ovl_i3 +func_i3_801A1078 = 0x801A1078; //segment:ovl_i3 +func_i3_801A1164 = 0x801A1164; //segment:ovl_i3 +func_i3_801A14A0 = 0x801A14A0; //segment:ovl_i3 +func_i3_801A1750 = 0x801A1750; //segment:ovl_i3 +func_i3_801A1B7C = 0x801A1B7C; //segment:ovl_i3 +func_i3_801A1F8C = 0x801A1F8C; //segment:ovl_i3 +func_i3_801A2C44 = 0x801A2C44; //segment:ovl_i3 +func_i3_801A2CD4 = 0x801A2CD4; //segment:ovl_i3 +func_i3_801A3330 = 0x801A3330; //segment:ovl_i3 +func_i3_801A3420 = 0x801A3420; //segment:ovl_i3 +func_i3_801A3508 = 0x801A3508; //segment:ovl_i3 +func_i3_801A3A5C = 0x801A3A5C; //segment:ovl_i3 +func_i3_801A3B3C = 0x801A3B3C; //segment:ovl_i3 +func_i3_801A3BAC = 0x801A3BAC; //segment:ovl_i3 +func_i3_801A3E48 = 0x801A3E48; //segment:ovl_i3 +func_i3_801A40E4 = 0x801A40E4; //segment:ovl_i3 +func_i3_801A45BC = 0x801A45BC; //segment:ovl_i3 +func_i3_801A482C = 0x801A482C; //segment:ovl_i3 +func_i3_801A491C = 0x801A491C; //segment:ovl_i3 +func_i3_801A4954 = 0x801A4954; //segment:ovl_i3 +func_i3_801A5210 = 0x801A5210; //segment:ovl_i3 +func_i3_801A53FC = 0x801A53FC; //segment:ovl_i3 +func_i3_801A5640 = 0x801A5640; //segment:ovl_i3 +func_i3_801A566C = 0x801A566C; //segment:ovl_i3 +func_i3_801A5DD8 = 0x801A5DD8; //segment:ovl_i3 +func_i3_801A6C94 = 0x801A6C94; //segment:ovl_i3 +func_i3_801A6CF4 = 0x801A6CF4; //segment:ovl_i3 +func_i3_801A7C34 = 0x801A7C34; //segment:ovl_i3 +func_i3_801A7DF8 = 0x801A7DF8; //segment:ovl_i3 +func_i3_801A8158 = 0x801A8158; //segment:ovl_i3 +func_i3_801A8220 = 0x801A8220; //segment:ovl_i3 +func_i3_801A8264 = 0x801A8264; //segment:ovl_i3 +func_i3_801A82A0 = 0x801A82A0; //segment:ovl_i3 +func_i3_801A8390 = 0x801A8390; //segment:ovl_i3 +func_i3_801A85E4 = 0x801A85E4; //segment:ovl_i3 +func_i3_801AB544 = 0x801AB544; //segment:ovl_i3 +func_i3_801ABC74 = 0x801ABC74; //segment:ovl_i3 +func_i3_801AC01C = 0x801AC01C; //segment:ovl_i3 +func_i3_801AC074 = 0x801AC074; //segment:ovl_i3 +func_i3_801AC12C = 0x801AC12C; //segment:ovl_i3 +func_i3_801AC2E4 = 0x801AC2E4; //segment:ovl_i3 +func_i3_801AC380 = 0x801AC380; //segment:ovl_i3 +func_i3_801ACEB0 = 0x801ACEB0; //segment:ovl_i3 +func_i3_801AD200 = 0x801AD200; //segment:ovl_i3 +func_i3_801AD434 = 0x801AD434; //segment:ovl_i3 +func_i3_801AD5DC = 0x801AD5DC; //segment:ovl_i3 +func_i3_801AD624 = 0x801AD624; //segment:ovl_i3 +func_i3_801AE0EC = 0x801AE0EC; //segment:ovl_i3 +func_i3_801AE290 = 0x801AE290; //segment:ovl_i3 +func_i3_801AE984 = 0x801AE984; //segment:ovl_i3 +func_i3_801AE9EC = 0x801AE9EC; //segment:ovl_i3 +func_i3_801AECBC = 0x801AECBC; //segment:ovl_i3 +func_i3_801AED88 = 0x801AED88; //segment:ovl_i3 +func_i3_801AEF10 = 0x801AEF10; //segment:ovl_i3 +func_i3_801AFEE8 = 0x801AFEE8; //segment:ovl_i3 +func_i3_801B0014 = 0x801B0014; //segment:ovl_i3 +func_i3_801B0374 = 0x801B0374; //segment:ovl_i3 +func_i3_801B043C = 0x801B043C; //segment:ovl_i3 +func_i3_801B104C = 0x801B104C; //segment:ovl_i3 +func_i3_801B13A4 = 0x801B13A4; //segment:ovl_i3 +func_i3_801B1508 = 0x801B1508; //segment:ovl_i3 +func_i3_801B1780 = 0x801B1780; //segment:ovl_i3 +func_i3_801B1818 = 0x801B1818; //segment:ovl_i3 +func_i3_801B1944 = 0x801B1944; //segment:ovl_i3 +func_i3_801B201C = 0x801B201C; //segment:ovl_i3 +func_i3_801B2098 = 0x801B2098; //segment:ovl_i3 +func_i3_801B2364 = 0x801B2364; //segment:ovl_i3 +func_i3_801B24A4 = 0x801B24A4; //segment:ovl_i3 +func_i3_801B250C = 0x801B250C; //segment:ovl_i3 +func_i3_801B2A3C = 0x801B2A3C; //segment:ovl_i3 +func_i3_801B37D0 = 0x801B37D0; //segment:ovl_i3 +func_i3_801B3BBC = 0x801B3BBC; //segment:ovl_i3 +func_i3_801B3BD0 = 0x801B3BD0; //segment:ovl_i3 +func_i3_801B3C40 = 0x801B3C40; //segment:ovl_i3 +func_i3_801B4424 = 0x801B4424; //segment:ovl_i3 +func_i3_801B450C = 0x801B450C; //segment:ovl_i3 +func_i3_801B4658 = 0x801B4658; //segment:ovl_i3 +func_i3_801B47F4 = 0x801B47F4; //segment:ovl_i3 +func_i3_801B50A4 = 0x801B50A4; //segment:ovl_i3 +func_i3_801B5114 = 0x801B5114; //segment:ovl_i3 +func_i3_801B51BC = 0x801B51BC; //segment:ovl_i3 +func_i3_801B52DC = 0x801B52DC; //segment:ovl_i3 +func_i3_801B5398 = 0x801B5398; //segment:ovl_i3 +func_i3_801B54A4 = 0x801B54A4; //segment:ovl_i3 +func_i3_801B551C = 0x801B551C; //segment:ovl_i3 +func_i3_801B56A0 = 0x801B56A0; //segment:ovl_i3 +func_i3_801B5DCC = 0x801B5DCC; //segment:ovl_i3 +func_i3_801B5F00 = 0x801B5F00; //segment:ovl_i3 +func_i3_801B5F0C = 0x801B5F0C; //segment:ovl_i3 +func_i3_801B5F18 = 0x801B5F18; //segment:ovl_i3 +func_i3_801B5F24 = 0x801B5F24; //segment:ovl_i3 +func_i3_801B5F30 = 0x801B5F30; //segment:ovl_i3 +func_i3_801B5F3C = 0x801B5F3C; //segment:ovl_i3 +D_i3_801B5F50 = 0x801B5F50; //segment:ovl_i3 +D_i3_801B5F60 = 0x801B5F60; //segment:ovl_i3 +D_i3_801B5F90 = 0x801B5F90; //segment:ovl_i3 +D_i3_801B5F9C = 0x801B5F9C; //segment:ovl_i3 +D_i3_801B5FA8 = 0x801B5FA8; //segment:ovl_i3 +D_i3_801B5FB4 = 0x801B5FB4; //segment:ovl_i3 +D_i3_801B5FC0 = 0x801B5FC0; //segment:ovl_i3 +D_i3_801B5FCC = 0x801B5FCC; //segment:ovl_i3 +D_i3_801B5FD8 = 0x801B5FD8; //segment:ovl_i3 +D_i3_801B5FE4 = 0x801B5FE4; //segment:ovl_i3 +D_i3_801B6020 = 0x801B6020; //segment:ovl_i3 +D_i3_801B6024 = 0x801B6024; //segment:ovl_i3 +D_i3_801B60B0 = 0x801B60B0; //segment:ovl_i3 +D_i3_801B60B4 = 0x801B60B4; //segment:ovl_i3 +D_i3_801B6140 = 0x801B6140; //segment:ovl_i3 +D_i3_801B6170 = 0x801B6170; //segment:ovl_i3 +D_i3_801B61A0 = 0x801B61A0; //segment:ovl_i3 +D_i3_801B61A4 = 0x801B61A4; //segment:ovl_i3 +D_i3_801B6230 = 0x801B6230; //segment:ovl_i3 +D_i3_801B6234 = 0x801B6234; //segment:ovl_i3 +D_i3_801B62C0 = 0x801B62C0; //segment:ovl_i3 +D_i3_801B62F0 = 0x801B62F0; //segment:ovl_i3 +D_i3_801B6320 = 0x801B6320; //segment:ovl_i3 +D_i3_801B6324 = 0x801B6324; //segment:ovl_i3 +D_i3_801B63B0 = 0x801B63B0; //segment:ovl_i3 +D_i3_801B63B4 = 0x801B63B4; //segment:ovl_i3 +D_i3_801B6440 = 0x801B6440; //segment:ovl_i3 +D_i3_801B6444 = 0x801B6444; //segment:ovl_i3 +D_i3_801B6470 = 0x801B6470; //segment:ovl_i3 +D_i3_801B64A0 = 0x801B64A0; //segment:ovl_i3 +D_i3_801B64D0 = 0x801B64D0; //segment:ovl_i3 +D_i3_801B6500 = 0x801B6500; //segment:ovl_i3 +D_i3_801B6514 = 0x801B6514; //segment:ovl_i3 +D_i3_801B6530 = 0x801B6530; //segment:ovl_i3 +D_i3_801B6560 = 0x801B6560; //segment:ovl_i3 +D_i3_801B6590 = 0x801B6590; //segment:ovl_i3 +D_i3_801B65C0 = 0x801B65C0; //segment:ovl_i3 +D_i3_801B65CC = 0x801B65CC; //segment:ovl_i3 +D_i3_801B65D8 = 0x801B65D8; //segment:ovl_i3 +D_i3_801B65E4 = 0x801B65E4; //segment:ovl_i3 +D_i3_801B6614 = 0x801B6614; //segment:ovl_i3 +D_i3_801B6644 = 0x801B6644; //segment:ovl_i3 +D_i3_801B6674 = 0x801B6674; //segment:ovl_i3 +D_i3_801B66A4 = 0x801B66A4; //segment:ovl_i3 +D_i3_801B66D4 = 0x801B66D4; //segment:ovl_i3 +D_i3_801B6704 = 0x801B6704; //segment:ovl_i3 +D_i3_801B6744 = 0x801B6744; //segment:ovl_i3 +D_i3_801B6774 = 0x801B6774; //segment:ovl_i3 +D_i3_801B6780 = 0x801B6780; //segment:ovl_i3 +D_i3_801B678C = 0x801B678C; //segment:ovl_i3 +D_i3_801B67C8 = 0x801B67C8; //segment:ovl_i3 +D_i3_801B67EC = 0x801B67EC; //segment:ovl_i3 +D_i3_801B6810 = 0x801B6810; //segment:ovl_i3 +D_i3_801B681C = 0x801B681C; //segment:ovl_i3 +D_i3_801B6844 = 0x801B6844; //segment:ovl_i3 +D_i3_801B6858 = 0x801B6858; //segment:ovl_i3 +D_i3_801B6864 = 0x801B6864; //segment:ovl_i3 +D_i3_801B6870 = 0x801B6870; //segment:ovl_i3 +D_i3_801B687C = 0x801B687C; //segment:ovl_i3 +D_i3_801B6888 = 0x801B6888; //segment:ovl_i3 +D_i3_801B6894 = 0x801B6894; //segment:ovl_i3 +D_i3_801B68A0 = 0x801B68A0; //segment:ovl_i3 +D_i3_801B68B8 = 0x801B68B8; //segment:ovl_i3 +D_i3_801B68D0 = 0x801B68D0; //segment:ovl_i3 +D_i3_801B68DC = 0x801B68DC; //segment:ovl_i3 +D_i3_801B68E8 = 0x801B68E8; //segment:ovl_i3 +D_i3_801B68F4 = 0x801B68F4; //segment:ovl_i3 +D_i3_801B6900 = 0x801B6900; //segment:ovl_i3 +D_i3_801B690C = 0x801B690C; //segment:ovl_i3 +D_i3_801B6918 = 0x801B6918; //segment:ovl_i3 +D_i3_801B6924 = 0x801B6924; //segment:ovl_i3 +D_i3_801B6930 = 0x801B6930; //segment:ovl_i3 +D_i3_801B693C = 0x801B693C; //segment:ovl_i3 +D_i3_801B6948 = 0x801B6948; //segment:ovl_i3 +D_i3_801B6954 = 0x801B6954; //segment:ovl_i3 +D_i3_801B6960 = 0x801B6960; //segment:ovl_i3 +D_i3_801B696C = 0x801B696C; //segment:ovl_i3 +D_i3_801B6974 = 0x801B6974; //segment:ovl_i3 +D_i3_801B697C = 0x801B697C; //segment:ovl_i3 +D_i3_801B6984 = 0x801B6984; //segment:ovl_i3 +D_i3_801B698C = 0x801B698C; //segment:ovl_i3 +D_i3_801B6998 = 0x801B6998; //segment:ovl_i3 +D_i3_801B69A4 = 0x801B69A4; //segment:ovl_i3 +D_i3_801B69B0 = 0x801B69B0; //segment:ovl_i3 +D_i3_801B69BC = 0x801B69BC; //segment:ovl_i3 +D_i3_801B69C8 = 0x801B69C8; //segment:ovl_i3 +D_i3_801B69D4 = 0x801B69D4; //segment:ovl_i3 +D_i3_801B69E0 = 0x801B69E0; //segment:ovl_i3 +D_i3_801B69EC = 0x801B69EC; //segment:ovl_i3 +D_i3_801B69F4 = 0x801B69F4; //segment:ovl_i3 +D_i3_801B6A18 = 0x801B6A18; //segment:ovl_i3 +D_i3_801B6A3C = 0x801B6A3C; //segment:ovl_i3 +D_i3_801B6AB4 = 0x801B6AB4; //segment:ovl_i3 +D_i3_801B6AD4 = 0x801B6AD4; //segment:ovl_i3 +D_i3_801B6AFC = 0x801B6AFC; //segment:ovl_i3 +D_i3_801B6B44 = 0x801B6B44; //segment:ovl_i3 +D_i3_801B6B50 = 0x801B6B50; //segment:ovl_i3 +D_i3_801B6B5C = 0x801B6B5C; //segment:ovl_i3 +D_i3_801B6B68 = 0x801B6B68; //segment:ovl_i3 +D_i3_801B6B74 = 0x801B6B74; //segment:ovl_i3 +D_i3_801B6B78 = 0x801B6B78; //segment:ovl_i3 +D_i3_801B6B7C = 0x801B6B7C; //segment:ovl_i3 +D_i3_801B6B90 = 0x801B6B90; //segment:ovl_i3 +D_i3_801B6BA0 = 0x801B6BA0; //segment:ovl_i3 +D_i3_801B6BD0 = 0x801B6BD0; //segment:ovl_i3 +D_i3_801B6BDC = 0x801B6BDC; //segment:ovl_i3 +D_i3_801B6BF4 = 0x801B6BF4; //segment:ovl_i3 +D_i3_801B6C0C = 0x801B6C0C; //segment:ovl_i3 +D_i3_801B6C30 = 0x801B6C30; //segment:ovl_i3 +D_i3_801B6C54 = 0x801B6C54; //segment:ovl_i3 +D_i3_801B6C60 = 0x801B6C60; //segment:ovl_i3 +D_i3_801B6C6C = 0x801B6C6C; //segment:ovl_i3 +D_i3_801B6C78 = 0x801B6C78; //segment:ovl_i3 +D_i3_801B6C84 = 0x801B6C84; //segment:ovl_i3 +D_i3_801B6C90 = 0x801B6C90; //segment:ovl_i3 +D_i3_801B6C9C = 0x801B6C9C; //segment:ovl_i3 +D_i3_801B6CA8 = 0x801B6CA8; //segment:ovl_i3 +D_i3_801B6CB4 = 0x801B6CB4; //segment:ovl_i3 +D_i3_801B6CC0 = 0x801B6CC0; //segment:ovl_i3 +D_i3_801B6CCC = 0x801B6CCC; //segment:ovl_i3 +D_i3_801B6CD8 = 0x801B6CD8; //segment:ovl_i3 +D_i3_801B6CE4 = 0x801B6CE4; //segment:ovl_i3 +D_i3_801B6CF0 = 0x801B6CF0; //segment:ovl_i3 +D_i3_801B6D5C = 0x801B6D5C; //segment:ovl_i3 +D_i3_801B6D80 = 0x801B6D80; //segment:ovl_i3 +D_i3_801B6DE0 = 0x801B6DE0; //segment:ovl_i3 +D_i3_801B6E10 = 0x801B6E10; //segment:ovl_i3 +D_i3_801B6E14 = 0x801B6E14; //segment:ovl_i3 +D_i3_801B6E40 = 0x801B6E40; //segment:ovl_i3 +D_i3_801B6E4C = 0x801B6E4C; //segment:ovl_i3 +D_i3_801B6E58 = 0x801B6E58; //segment:ovl_i3 +D_i3_801B6E60 = 0x801B6E60; //segment:ovl_i3 +D_i3_801B6E6C = 0x801B6E6C; //segment:ovl_i3 +D_i3_801B6E78 = 0x801B6E78; //segment:ovl_i3 +D_i3_801B6E84 = 0x801B6E84; //segment:ovl_i3 +D_i3_801B6E90 = 0x801B6E90; //segment:ovl_i3 +D_i3_801B6EC0 = 0x801B6EC0; //segment:ovl_i3 +D_i3_801B6EF0 = 0x801B6EF0; //segment:ovl_i3 +D_i3_801B6F20 = 0x801B6F20; //segment:ovl_i3 +D_i3_801B6F2C = 0x801B6F2C; //segment:ovl_i3 +D_i3_801B6F38 = 0x801B6F38; //segment:ovl_i3 +D_i3_801B6F44 = 0x801B6F44; //segment:ovl_i3 +D_i3_801B7064 = 0x801B7064; //segment:ovl_i3 +D_i3_801B70C8 = 0x801B70C8; //segment:ovl_i3 +D_i3_801B71E8 = 0x801B71E8; //segment:ovl_i3 +D_i3_801B7308 = 0x801B7308; //segment:ovl_i3 +D_i3_801B730C = 0x801B730C; //segment:ovl_i3 +D_i3_801B7310 = 0x801B7310; //segment:ovl_i3 +D_i3_801B7348 = 0x801B7348; //segment:ovl_i3 +D_i3_801B7360 = 0x801B7360; //segment:ovl_i3 +D_i3_801B7390 = 0x801B7390; //segment:ovl_i3 +D_i3_801B73A0 = 0x801B73A0; //segment:ovl_i3 +D_i3_801B73D0 = 0x801B73D0; //segment:ovl_i3 +D_i3_801B7400 = 0x801B7400; //segment:ovl_i3 +D_i3_801B7440 = 0x801B7440; //segment:ovl_i3 +D_i3_801B7454 = 0x801B7454; //segment:ovl_i3 +D_i3_801B7460 = 0x801B7460; //segment:ovl_i3 +D_i3_801B746C = 0x801B746C; //segment:ovl_i3 +D_i3_801B7478 = 0x801B7478; //segment:ovl_i3 +D_i3_801B7484 = 0x801B7484; //segment:ovl_i3 +D_i3_801B7490 = 0x801B7490; //segment:ovl_i3 +D_i3_801B749C = 0x801B749C; //segment:ovl_i3 +D_i3_801B74A8 = 0x801B74A8; //segment:ovl_i3 +D_i3_801B74D4 = 0x801B74D4; //segment:ovl_i3 +D_i3_801B7500 = 0x801B7500; //segment:ovl_i3 +D_i3_801B750C = 0x801B750C; //segment:ovl_i3 +D_i3_801B7560 = 0x801B7560; //segment:ovl_i3 +D_i3_801B756C = 0x801B756C; //segment:ovl_i3 +D_i3_801B7588 = 0x801B7588; //segment:ovl_i3 +D_i3_801B7594 = 0x801B7594; //segment:ovl_i3 +D_i3_801B75A0 = 0x801B75A0; //segment:ovl_i3 +D_i3_801B75AC = 0x801B75AC; //segment:ovl_i3 +D_i3_801B75B8 = 0x801B75B8; //segment:ovl_i3 +D_i3_801B75C4 = 0x801B75C4; //segment:ovl_i3 +D_i3_801B75D0 = 0x801B75D0; //segment:ovl_i3 +D_i3_801B75DC = 0x801B75DC; //segment:ovl_i3 +D_i3_801B75E8 = 0x801B75E8; //segment:ovl_i3 +D_i3_801B75F4 = 0x801B75F4; //segment:ovl_i3 +D_i3_801B7624 = 0x801B7624; //segment:ovl_i3 +D_i3_801B76F0 = 0x801B76F0; //segment:ovl_i3 +D_i3_801B7750 = 0x801B7750; //segment:ovl_i3 +D_i3_801B7768 = 0x801B7768; //segment:ovl_i3 +D_i3_801B7774 = 0x801B7774; //segment:ovl_i3 +D_i3_801B7798 = 0x801B7798; //segment:ovl_i3 +D_i3_801B77A4 = 0x801B77A4; //segment:ovl_i3 +D_i3_801B77B4 = 0x801B77B4; //segment:ovl_i3 +D_i3_801B7A0C = 0x801B7A0C; //segment:ovl_i3 +D_i3_801B7AD8 = 0x801B7AD8; //segment:ovl_i3 +D_i3_801B7BA4 = 0x801B7BA4; //segment:ovl_i3 +D_i3_801B94F0 = 0x801B94F0; +D_i3_801B9500 = 0x801B9500; //segment:ovl_i3 +D_i3_801B9508 = 0x801B9508; //segment:ovl_i3 +D_i3_801B9514 = 0x801B9514; //segment:ovl_i3 +D_i3_801B952C = 0x801B952C; //segment:ovl_i3 +D_i3_801B9568 = 0x801B9568; //segment:ovl_i3 +D_i3_801B95A0 = 0x801B95A0; //segment:ovl_i3 +D_i3_801B95AC = 0x801B95AC; //segment:ovl_i3 +D_i3_801B95B8 = 0x801B95B8; //segment:ovl_i3 +D_i3_801B95C4 = 0x801B95C4; //segment:ovl_i3 +D_i3_801B95C8 = 0x801B95C8; //segment:ovl_i3 +D_i3_801B95CC = 0x801B95CC; //segment:ovl_i3 +D_i3_801B95D0 = 0x801B95D0; //segment:ovl_i3 +D_i3_801B95D4 = 0x801B95D4; //segment:ovl_i3 +D_i3_801B95E0 = 0x801B95E0; //segment:ovl_i3 +D_i3_801B95E8 = 0x801B95E8; //segment:ovl_i3 +D_i3_801B95FC = 0x801B95FC; //segment:ovl_i3 +D_i3_801B9608 = 0x801B9608; //segment:ovl_i3 +D_i3_801B960C = 0x801B960C; //segment:ovl_i3 +D_i3_801B9634 = 0x801B9634; //segment:ovl_i3 +D_i3_801B9638 = 0x801B9638; //segment:ovl_i3 +D_i3_801B963C = 0x801B963C; //segment:ovl_i3 +D_i3_801B9640 = 0x801B9640; //segment:ovl_i3 +D_i3_801B9644 = 0x801B9644; //segment:ovl_i3 +D_i3_801B9670 = 0x801B9670; //segment:ovl_i3 +D_i3_801B9680 = 0x801B9680; //segment:ovl_i3 +D_i3_801B96A0 = 0x801B96A0; //segment:ovl_i3 +D_i3_801B96B4 = 0x801B96B4; //segment:ovl_i3 +D_i3_801B96C0 = 0x801B96C0; //segment:ovl_i3 +D_i3_801B96D0 = 0x801B96D0; //segment:ovl_i3 +D_i3_801B9714 = 0x801B9714; //segment:ovl_i3 +D_i3_801B9744 = 0x801B9744; //segment:ovl_i3 +D_i3_801B9798 = 0x801B9798; //segment:ovl_i3 +D_i3_801B979C = 0x801B979C; //segment:ovl_i3 +D_i3_801B97A4 = 0x801B97A4; //segment:ovl_i3 +D_i3_801B97A8 = 0x801B97A8; //segment:ovl_i3 +D_i3_801B97AC = 0x801B97AC; //segment:ovl_i3 +D_i3_801B97B0 = 0x801B97B0; //segment:ovl_i3 +D_i3_801B97B4 = 0x801B97B4; //segment:ovl_i3 +D_i3_801B97B8 = 0x801B97B8; //segment:ovl_i3 +D_i3_801B97BC = 0x801B97BC; //segment:ovl_i3 +D_i3_801B97C0 = 0x801B97C0; //segment:ovl_i3 +D_i3_801B97C4 = 0x801B97C4; //segment:ovl_i3 +D_i3_801B97C8 = 0x801B97C8; //segment:ovl_i3 +D_i3_801B97CC = 0x801B97CC; //segment:ovl_i3 +D_i3_801B97D0 = 0x801B97D0; //segment:ovl_i3 +D_i3_801B97D4 = 0x801B97D4; //segment:ovl_i3 +D_i3_801B97D8 = 0x801B97D8; //segment:ovl_i3 +D_i3_801B97E4 = 0x801B97E4; //segment:ovl_i3 +D_i3_801B97EC = 0x801B97EC; //segment:ovl_i3 +D_i3_801B97F8 = 0x801B97F8; //segment:ovl_i3 +D_i3_801B9804 = 0x801B9804; //segment:ovl_i3 +D_i3_801B9824 = 0x801B9824; //segment:ovl_i3 +D_i3_801B9828 = 0x801B9828; //segment:ovl_i3 +D_i3_801B9888 = 0x801B9888; //segment:ovl_i3 +D_i3_801B988C = 0x801B988C; //segment:ovl_i3 +D_i3_801B98CC = 0x801B98CC; //segment:ovl_i3 +D_i3_801B98D4 = 0x801B98D4; //segment:ovl_i3 +D_i3_801B9958 = 0x801B9958; //segment:ovl_i3 +D_i3_801B99F0 = 0x801B99F0; //segment:ovl_i3 +D_i3_801B9A18 = 0x801B9A18; //segment:ovl_i3 +D_i3_801B9A1C = 0x801B9A1C; //segment:ovl_i3 +D_i3_801B9A24 = 0x801B9A24; //segment:ovl_i3 +D_i3_801B9A3C = 0x801B9A3C; //segment:ovl_i3 +D_i3_801B9A4C = 0x801B9A4C; //segment:ovl_i3 +D_i3_801B9A70 = 0x801B9A70; //segment:ovl_i3 +D_i3_801B9A78 = 0x801B9A78; //segment:ovl_i3 +D_i3_801BAD38 = 0x801BAD38; //segment:ovl_i3 +D_i3_801BB438 = 0x801BB438; //segment:ovl_i3 +D_i3_801BB440 = 0x801BB440; //segment:ovl_i3 +D_i3_801BB44C = 0x801BB44C; //segment:ovl_i3 +D_i3_801BB450 = 0x801BB450; //segment:ovl_i3 +D_i3_801BB454 = 0x801BB454; //segment:ovl_i3 +D_i3_801BB458 = 0x801BB458; //segment:ovl_i3 +D_i3_801BB45C = 0x801BB45C; //segment:ovl_i3 +D_i3_801BB468 = 0x801BB468; //segment:ovl_i3 +D_i3_801BB46C = 0x801BB46C; //segment:ovl_i3 +D_i3_801BB470 = 0x801BB470; //segment:ovl_i3 +D_i3_801BB474 = 0x801BB474; //segment:ovl_i3 +D_i3_801BB478 = 0x801BB478; //segment:ovl_i3 +D_i3_801BB47C = 0x801BB47C; //segment:ovl_i3 +D_i3_801BB48C = 0x801BB48C; //segment:ovl_i3 +D_i3_801BB490 = 0x801BB490; //segment:ovl_i3 +D_i3_801BB4C8 = 0x801BB4C8; //segment:ovl_i3 +D_i3_801BB4CC = 0x801BB4CC; //segment:ovl_i3 +D_i3_801BB4D0 = 0x801BB4D0; //segment:ovl_i3 +D_i3_801BB4D4 = 0x801BB4D4; //segment:ovl_i3 +D_i3_801BB4D8 = 0x801BB4D8; //segment:ovl_i3 +D_i3_801BB4E0 = 0x801BB4E0; //segment:ovl_i3 +D_i3_801BB4FC = 0x801BB4FC; //segment:ovl_i3 +D_i3_801BB500 = 0x801BB500; //segment:ovl_i3 +D_i3_801BB504 = 0x801BB504; //segment:ovl_i3 +D_i3_801BB550 = 0x801BB550; //segment:ovl_i3 +D_i3_801BB554 = 0x801BB554; //segment:ovl_i3 +D_i3_801BB558 = 0x801BB558; //segment:ovl_i3 +D_i3_801BB55C = 0x801BB55C; //segment:ovl_i3 +D_i3_801BB560 = 0x801BB560; //segment:ovl_i3 +D_i3_801BB564 = 0x801BB564; //segment:ovl_i3 +D_i3_801BB568 = 0x801BB568; //segment:ovl_i3 +D_i3_801BB56C = 0x801BB56C; //segment:ovl_i3 +D_i3_801BB574 = 0x801BB574; //segment:ovl_i3 +D_i3_801BB578 = 0x801BB578; //segment:ovl_i3 +D_i3_801BB57C = 0x801BB57C; //segment:ovl_i3 +D_i3_801BB590 = 0x801BB590; //segment:ovl_i3 +D_i3_801BB594 = 0x801BB594; //segment:ovl_i3 +D_i3_801BB5A8 = 0x801BB5A8; //segment:ovl_i3 +D_i3_801BB5AC = 0x801BB5AC; //segment:ovl_i3 +D_i3_801BB5B4 = 0x801BB5B4; //segment:ovl_i3 +D_i3_801BB5B8 = 0x801BB5B8; //segment:ovl_i3 +D_i3_801BB5BC = 0x801BB5BC; //segment:ovl_i3 +D_i3_801BB5C0 = 0x801BB5C0; //segment:ovl_i3 +D_i3_801BB5E0 = 0x801BB5E0; //segment:ovl_i3 +D_i3_801BB5E4 = 0x801BB5E4; //segment:ovl_i3 +D_i3_801BB5E8 = 0x801BB5E8; //segment:ovl_i3 +D_i3_801BB5EC = 0x801BB5EC; //segment:ovl_i3 +D_i3_801BB5F0 = 0x801BB5F0; //segment:ovl_i3 +D_i3_801BB5F4 = 0x801BB5F4; //segment:ovl_i3 +D_i3_801BB5F8 = 0x801BB5F8; //segment:ovl_i3 +D_i3_801BB5FC = 0x801BB5FC; //segment:ovl_i3 +D_i3_801BB600 = 0x801BB600; //segment:ovl_i3 +D_i3_801BB604 = 0x801BB604; //segment:ovl_i3 +D_i3_801BB688 = 0x801BB688; //segment:ovl_i3 +D_i3_801BB690 = 0x801BB690; //segment:ovl_i3 +D_i3_801BB6A0 = 0x801BB6A0; //segment:ovl_i3 +D_i3_801BB6AC = 0x801BB6AC; //segment:ovl_i3 +D_i3_801BB6DC = 0x801BB6DC; //segment:ovl_i3 +D_i3_801BB6E0 = 0x801BB6E0; //segment:ovl_i3 +D_i3_801BB6E4 = 0x801BB6E4; //segment:ovl_i3 +D_i3_801BB6E8 = 0x801BB6E8; //segment:ovl_i3 +D_i3_801BB6EC = 0x801BB6EC; //segment:ovl_i3 +D_i3_801BB6F0 = 0x801BB6F0; //segment:ovl_i3 +D_i3_801BB6F4 = 0x801BB6F4; //segment:ovl_i3 +D_i3_801BB6F8 = 0x801BB6F8; //segment:ovl_i3 +D_i3_801BB700 = 0x801BB700; //segment:ovl_i3 +D_i3_801BB704 = 0x801BB704; //segment:ovl_i3 +D_i3_801BB708 = 0x801BB708; //segment:ovl_i3 +D_i3_801BB70C = 0x801BB70C; //segment:ovl_i3 + +func_i4_8017E7A0 = 0x8017E7A0; //segment:ovl_i4 +func_i4_8017E870 = 0x8017E870; //segment:ovl_i4 +func_i4_8017EB04 = 0x8017EB04; //segment:ovl_i4 +func_i4_8017EBE0 = 0x8017EBE0; //segment:ovl_i4 +func_i4_8017FB28 = 0x8017FB28; //segment:ovl_i4 +func_i4_8017FCB0 = 0x8017FCB0; //segment:ovl_i4 +func_i4_8017FD38 = 0x8017FD38; //segment:ovl_i4 +func_i4_8018000C = 0x8018000C; //segment:ovl_i4 +func_i4_80180174 = 0x80180174; //segment:ovl_i4 +func_i4_80180250 = 0x80180250; //segment:ovl_i4 +func_i4_801802D8 = 0x801802D8; //segment:ovl_i4 +func_i4_80180358 = 0x80180358; //segment:ovl_i4 +func_i4_801804E8 = 0x801804E8; //segment:ovl_i4 +func_i4_80182C78 = 0x80182C78; //segment:ovl_i4 +func_i4_80182FB0 = 0x80182FB0; //segment:ovl_i4 +func_i4_80183148 = 0x80183148; //segment:ovl_i4 +func_i4_801833A8 = 0x801833A8; //segment:ovl_i4 +func_i4_80183E84 = 0x80183E84; //segment:ovl_i4 +func_i4_80183F0C = 0x80183F0C; //segment:ovl_i4 +func_i4_80184080 = 0x80184080; //segment:ovl_i4 +func_i4_8018422C = 0x8018422C; //segment:ovl_i4 +func_i4_80184348 = 0x80184348; //segment:ovl_i4 +func_i4_8018449C = 0x8018449C; //segment:ovl_i4 +func_i4_801845B8 = 0x801845B8; //segment:ovl_i4 +func_i4_80184638 = 0x80184638; //segment:ovl_i4 +func_i4_80184678 = 0x80184678; //segment:ovl_i4 +func_i4_80184714 = 0x80184714; //segment:ovl_i4 +func_i4_801847A8 = 0x801847A8; //segment:ovl_i4 +func_i4_80184A18 = 0x80184A18; //segment:ovl_i4 +func_i4_80184A9C = 0x80184A9C; //segment:ovl_i4 +func_i4_80184B88 = 0x80184B88; //segment:ovl_i4 +func_i4_80184BF4 = 0x80184BF4; //segment:ovl_i4 +func_i4_801850B8 = 0x801850B8; //segment:ovl_i4 +func_i4_80185288 = 0x80185288; //segment:ovl_i4 +func_i4_80185628 = 0x80185628; //segment:ovl_i4 +func_i4_8018593C = 0x8018593C; //segment:ovl_i4 +func_i4_80185A9C = 0x80185A9C; //segment:ovl_i4 +func_i4_80185D18 = 0x80185D18; //segment:ovl_i4 +func_i4_80185E48 = 0x80185E48; //segment:ovl_i4 +func_i4_80185EE0 = 0x80185EE0; //segment:ovl_i4 +func_i4_80185F70 = 0x80185F70; //segment:ovl_i4 +func_i4_80186078 = 0x80186078; //segment:ovl_i4 +func_i4_80186198 = 0x80186198; //segment:ovl_i4 +func_i4_80186A5C = 0x80186A5C; //segment:ovl_i4 +func_i4_80186B6C = 0x80186B6C; //segment:ovl_i4 +func_i4_80187FB8 = 0x80187FB8; //segment:ovl_i4 +func_i4_80188104 = 0x80188104; //segment:ovl_i4 +func_i4_80188178 = 0x80188178; //segment:ovl_i4 +func_i4_80188208 = 0x80188208; //segment:ovl_i4 +func_i4_80188274 = 0x80188274; //segment:ovl_i4 +func_i4_801883A0 = 0x801883A0; //segment:ovl_i4 +func_i4_8018851C = 0x8018851C; //segment:ovl_i4 +func_i4_80188B04 = 0x80188B04; //segment:ovl_i4 +func_i4_80188C8C = 0x80188C8C; //segment:ovl_i4 +func_i4_80188D1C = 0x80188D1C; //segment:ovl_i4 +func_i4_80188DCC = 0x80188DCC; //segment:ovl_i4 +func_i4_80188FD0 = 0x80188FD0; //segment:ovl_i4 +func_i4_801890F8 = 0x801890F8; //segment:ovl_i4 +func_i4_80189488 = 0x80189488; //segment:ovl_i4 +func_i4_80189A00 = 0x80189A00; //segment:ovl_i4 +func_i4_80189B28 = 0x80189B28; //segment:ovl_i4 +func_i4_80189BA4 = 0x80189BA4; //segment:ovl_i4 +func_i4_80189C88 = 0x80189C88; //segment:ovl_i4 +func_i4_80189D6C = 0x80189D6C; //segment:ovl_i4 +func_i4_80189E28 = 0x80189E28; //segment:ovl_i4 +func_i4_80189EAC = 0x80189EAC; //segment:ovl_i4 +func_i4_8018A040 = 0x8018A040; //segment:ovl_i4 +func_i4_8018A938 = 0x8018A938; //segment:ovl_i4 +func_i4_8018AD3C = 0x8018AD3C; //segment:ovl_i4 +func_i4_8018AEC4 = 0x8018AEC4; //segment:ovl_i4 +func_i4_8018AF04 = 0x8018AF04; //segment:ovl_i4 +func_i4_8018B110 = 0x8018B110; //segment:ovl_i4 +func_i4_8018B678 = 0x8018B678; //segment:ovl_i4 +func_i4_8018B840 = 0x8018B840; //segment:ovl_i4 +func_i4_8018B908 = 0x8018B908; //segment:ovl_i4 +func_i4_8018D7C4 = 0x8018D7C4; //segment:ovl_i4 +func_i4_8018DB10 = 0x8018DB10; //segment:ovl_i4 +func_i4_8018E04C = 0x8018E04C; //segment:ovl_i4 +func_i4_8018E15C = 0x8018E15C; //segment:ovl_i4 +func_i4_8018E240 = 0x8018E240; //segment:ovl_i4 +func_i4_8018E4AC = 0x8018E4AC; //segment:ovl_i4 +func_i4_8018F12C = 0x8018F12C; //segment:ovl_i4 +func_i4_8018F414 = 0x8018F414; //segment:ovl_i4 +func_i4_8018F6D0 = 0x8018F6D0; //segment:ovl_i4 +func_i4_8018F7D8 = 0x8018F7D8; //segment:ovl_i4 +func_i4_8018FB74 = 0x8018FB74; //segment:ovl_i4 +func_i4_8018FC38 = 0x8018FC38; //segment:ovl_i4 +func_i4_8018FCE4 = 0x8018FCE4; //segment:ovl_i4 +func_i4_80190800 = 0x80190800; //segment:ovl_i4 +func_i4_80190A18 = 0x80190A18; //segment:ovl_i4 +func_i4_80190ADC = 0x80190ADC; //segment:ovl_i4 +func_i4_80190B60 = 0x80190B60; //segment:ovl_i4 +func_i4_80190EBC = 0x80190EBC; //segment:ovl_i4 +func_i4_80190FEC = 0x80190FEC; //segment:ovl_i4 +func_i4_801910C4 = 0x801910C4; //segment:ovl_i4 +func_i4_801911E8 = 0x801911E8; //segment:ovl_i4 +func_i4_801912DC = 0x801912DC; //segment:ovl_i4 +func_i4_80191990 = 0x80191990; //segment:ovl_i4 +func_i4_80191A80 = 0x80191A80; //segment:ovl_i4 +func_i4_80192380 = 0x80192380; //segment:ovl_i4 +func_i4_8019245C = 0x8019245C; //segment:ovl_i4 +func_i4_80192524 = 0x80192524; //segment:ovl_i4 +func_i4_80192650 = 0x80192650; //segment:ovl_i4 +func_i4_80192778 = 0x80192778; //segment:ovl_i4 +func_i4_80192958 = 0x80192958; //segment:ovl_i4 +func_i4_80193468 = 0x80193468; //segment:ovl_i4 +func_i4_80193600 = 0x80193600; //segment:ovl_i4 +func_i4_80193750 = 0x80193750; //segment:ovl_i4 +func_i4_80194C14 = 0x80194C14; //segment:ovl_i4 +func_i4_80195128 = 0x80195128; //segment:ovl_i4 +func_i4_8019529C = 0x8019529C; //segment:ovl_i4 +func_i4_80195348 = 0x80195348; //segment:ovl_i4 +func_i4_80195880 = 0x80195880; //segment:ovl_i4 +func_i4_8019595C = 0x8019595C; //segment:ovl_i4 +D_i4_80195CD0 = 0x80195CD0; //segment:ovl_i4 +D_i4_80195CE0 = 0x80195CE0; //segment:ovl_i4 +D_i4_80195CF8 = 0x80195CF8; //segment:ovl_i4 +D_i4_80195D1C = 0x80195D1C; //segment:ovl_i4 +D_i4_80195D34 = 0x80195D34; //segment:ovl_i4 +D_i4_80195D40 = 0x80195D40; //segment:ovl_i4 +D_i4_80195D4C = 0x80195D4C; //segment:ovl_i4 +D_i4_80195D5C = 0x80195D5C; //segment:ovl_i4 +D_i4_80195D6C = 0x80195D6C; //segment:ovl_i4 +D_i4_80195D78 = 0x80195D78; //segment:ovl_i4 +D_i4_80195D80 = 0x80195D80; //segment:ovl_i4 +D_i4_80195DC0 = 0x80195DC0; //segment:ovl_i4 +D_i4_80195DC4 = 0x80195DC4; //segment:ovl_i4 +D_i4_80195DD4 = 0x80195DD4; //segment:ovl_i4 +D_i4_80195DE4 = 0x80195DE4; //segment:ovl_i4 +D_i4_80195DF8 = 0x80195DF8; //segment:ovl_i4 +D_i4_80195E94 = 0x80195E94; //segment:ovl_i4 +D_i4_80195EAC = 0x80195EAC; //segment:ovl_i4 +D_i4_80195EC4 = 0x80195EC4; //segment:ovl_i4 +D_i4_80195EDC = 0x80195EDC; //segment:ovl_i4 +D_i4_80195EE8 = 0x80195EE8; //segment:ovl_i4 +D_i4_80195EF4 = 0x80195EF4; //segment:ovl_i4 +D_i4_80195F00 = 0x80195F00; //segment:ovl_i4 +D_i4_80195F0C = 0x80195F0C; //segment:ovl_i4 +D_i4_80195F18 = 0x80195F18; //segment:ovl_i4 +D_i4_80195F30 = 0x80195F30; //segment:ovl_i4 +D_i4_80195F54 = 0x80195F54; //segment:ovl_i4 +D_i4_80195F6C = 0x80195F6C; //segment:ovl_i4 +D_i4_80195F78 = 0x80195F78; //segment:ovl_i4 +D_i4_80195F84 = 0x80195F84; //segment:ovl_i4 +D_i4_80195F90 = 0x80195F90; //segment:ovl_i4 +D_i4_80195F9C = 0x80195F9C; //segment:ovl_i4 +D_i4_80195FCC = 0x80195FCC; //segment:ovl_i4 +D_i4_80195FD8 = 0x80195FD8; //segment:ovl_i4 +D_i4_80195FF0 = 0x80195FF0; //segment:ovl_i4 +D_i4_80196014 = 0x80196014; //segment:ovl_i4 +D_i4_80196038 = 0x80196038; //segment:ovl_i4 +D_i4_8019605C = 0x8019605C; //segment:ovl_i4 +D_i4_80196074 = 0x80196074; //segment:ovl_i4 +D_i4_8019608E = 0x8019608E; //segment:ovl_i4 +D_i4_80196090 = 0x80196090; //segment:ovl_i4 +D_i4_80196098 = 0x80196098; //segment:ovl_i4 +D_i4_8019609C = 0x8019609C; //segment:ovl_i4 +D_i4_80196164 = 0x80196164; //segment:ovl_i4 +D_i4_80196170 = 0x80196170; //segment:ovl_i4 +D_i4_8019617C = 0x8019617C; //segment:ovl_i4 +D_i4_80196188 = 0x80196188; //segment:ovl_i4 +D_i4_80196194 = 0x80196194; //segment:ovl_i4 +D_i4_801961A0 = 0x801961A0; //segment:ovl_i4 +D_i4_801961B0 = 0x801961B0; //segment:ovl_i4 +D_i4_801961C0 = 0x801961C0; //segment:ovl_i4 +D_i4_801961D0 = 0x801961D0; //segment:ovl_i4 +D_i4_801961E0 = 0x801961E0; //segment:ovl_i4 +D_i4_801961F0 = 0x801961F0; //segment:ovl_i4 +D_i4_80196240 = 0x80196240; //segment:ovl_i4 +D_i4_80196330 = 0x80196330; //segment:ovl_i4 +D_i4_80196344 = 0x80196344; //segment:ovl_i4 +D_i4_80196394 = 0x80196394; //segment:ovl_i4 +D_i4_801963B0 = 0x801963B0; //segment:ovl_i4 +D_i4_801963D4 = 0x801963D4; //segment:ovl_i4 +D_i4_80196404 = 0x80196404; //segment:ovl_i4 +D_i4_80196418 = 0x80196418; //segment:ovl_i4 +D_i4_8019646C = 0x8019646C; //segment:ovl_i4 +D_i4_8019649C = 0x8019649C; //segment:ovl_i4 +D_i4_801964AC = 0x801964AC; //segment:ovl_i4 +D_i4_801964DC = 0x801964DC; //segment:ovl_i4 +D_i4_8019650C = 0x8019650C; //segment:ovl_i4 +D_i4_8019651C = 0x8019651C; //segment:ovl_i4 +D_i4_8019652C = 0x8019652C; //segment:ovl_i4 +D_i4_80196538 = 0x80196538; //segment:ovl_i4 +D_i4_8019653C = 0x8019653C; //segment:ovl_i4 +D_i4_801972A0 = 0x801972A0; +D_i4_801972B0 = 0x801972B0; //segment:ovl_i4 +D_i4_801972B4 = 0x801972B4; //segment:ovl_i4 +D_i4_801972B8 = 0x801972B8; //segment:ovl_i4 +D_i4_801972BC = 0x801972BC; //segment:ovl_i4 +D_i4_801972C0 = 0x801972C0; //segment:ovl_i4 +D_i4_80197368 = 0x80197368; //segment:ovl_i4 +D_i4_80197380 = 0x80197380; //segment:ovl_i4 +D_i4_80197410 = 0x80197410; //segment:ovl_i4 +D_i4_80197420 = 0x80197420; //segment:ovl_i4 +D_i4_80197424 = 0x80197424; //segment:ovl_i4 +D_i4_80197428 = 0x80197428; //segment:ovl_i4 +D_i4_8019742C = 0x8019742C; //segment:ovl_i4 +D_i4_80197430 = 0x80197430; //segment:ovl_i4 +D_i4_80197434 = 0x80197434; //segment:ovl_i4 +D_i4_80197438 = 0x80197438; //segment:ovl_i4 +D_i4_80197440 = 0x80197440; //segment:ovl_i4 +D_i4_80197444 = 0x80197444; //segment:ovl_i4 + +func_i5_8017E7A0 = 0x8017E7A0; //segment:ovl_i5 +func_i5_8017E7B0 = 0x8017E7B0; //segment:ovl_i5 +func_i5_8017E850 = 0x8017E850; //segment:ovl_i5 +func_i5_8017E91C = 0x8017E91C; //segment:ovl_i5 +func_i5_8017F388 = 0x8017F388; //segment:ovl_i5 +func_i5_8017F54C = 0x8017F54C; //segment:ovl_i5 +func_i5_801801B0 = 0x801801B0; //segment:ovl_i5 +func_i5_801801E0 = 0x801801E0; //segment:ovl_i5 +func_i5_80180228 = 0x80180228; //segment:ovl_i5 +func_i5_80180310 = 0x80180310; //segment:ovl_i5 +func_i5_801803A0 = 0x801803A0; //segment:ovl_i5 +func_i5_80180414 = 0x80180414; //segment:ovl_i5 +func_i5_80180434 = 0x80180434; //segment:ovl_i5 +func_i5_80180474 = 0x80180474; //segment:ovl_i5 +func_i5_80180600 = 0x80180600; //segment:ovl_i5 +func_i5_80180838 = 0x80180838; //segment:ovl_i5 +func_i5_80180D78 = 0x80180D78; //segment:ovl_i5 +func_i5_80180DFC = 0x80180DFC; //segment:ovl_i5 +func_i5_80180F48 = 0x80180F48; //segment:ovl_i5 +func_i5_80181444 = 0x80181444; //segment:ovl_i5 +func_i5_8018156C = 0x8018156C; //segment:ovl_i5 +func_i5_8018167C = 0x8018167C; //segment:ovl_i5 +func_i5_801816FC = 0x801816FC; //segment:ovl_i5 +func_i5_801817CC = 0x801817CC; //segment:ovl_i5 +func_i5_80181D44 = 0x80181D44; //segment:ovl_i5 +func_i5_80181DCC = 0x80181DCC; //segment:ovl_i5 +func_i5_8018204C = 0x8018204C; //segment:ovl_i5 +func_i5_8018225C = 0x8018225C; //segment:ovl_i5 +func_i5_80182278 = 0x80182278; //segment:ovl_i5 +func_i5_801823CC = 0x801823CC; //segment:ovl_i5 +func_i5_8018243C = 0x8018243C; //segment:ovl_i5 +func_i5_801824F4 = 0x801824F4; //segment:ovl_i5 +func_i5_80182938 = 0x80182938; //segment:ovl_i5 +func_i5_801829AC = 0x801829AC; //segment:ovl_i5 +func_i5_80182BFC = 0x80182BFC; //segment:ovl_i5 +func_i5_80182C60 = 0x80182C60; //segment:ovl_i5 +func_i5_80183114 = 0x80183114; //segment:ovl_i5 +func_i5_80183240 = 0x80183240; //segment:ovl_i5 +func_i5_801833A8 = 0x801833A8; //segment:ovl_i5 +func_i5_801833C4 = 0x801833C4; //segment:ovl_i5 +func_i5_80183600 = 0x80183600; //segment:ovl_i5 +func_i5_80183668 = 0x80183668; //segment:ovl_i5 +func_i5_801839BC = 0x801839BC; //segment:ovl_i5 +func_i5_80183B38 = 0x80183B38; //segment:ovl_i5 +func_i5_80185568 = 0x80185568; //segment:ovl_i5 +func_i5_80185640 = 0x80185640; //segment:ovl_i5 +func_i5_8018565C = 0x8018565C; //segment:ovl_i5 +func_i5_801857DC = 0x801857DC; //segment:ovl_i5 +func_i5_80185844 = 0x80185844; //segment:ovl_i5 +func_i5_80185878 = 0x80185878; //segment:ovl_i5 +func_i5_80185888 = 0x80185888; //segment:ovl_i5 +func_i5_801861A4 = 0x801861A4; //segment:ovl_i5 +func_i5_80186280 = 0x80186280; //segment:ovl_i5 +func_i5_801862C8 = 0x801862C8; //segment:ovl_i5 +func_i5_80186368 = 0x80186368; //segment:ovl_i5 +func_i5_801863C4 = 0x801863C4; //segment:ovl_i5 +func_i5_80186768 = 0x80186768; //segment:ovl_i5 +func_i5_80186B54 = 0x80186B54; //segment:ovl_i5 +func_i5_80186CE4 = 0x80186CE4; //segment:ovl_i5 +func_i5_80186F10 = 0x80186F10; //segment:ovl_i5 +func_i5_801872CC = 0x801872CC; //segment:ovl_i5 +func_i5_80187640 = 0x80187640; //segment:ovl_i5 +func_i5_80187ABC = 0x80187ABC; //segment:ovl_i5 +func_i5_80187CA8 = 0x80187CA8; //segment:ovl_i5 +func_i5_80188D88 = 0x80188D88; //segment:ovl_i5 +func_i5_801893B8 = 0x801893B8; //segment:ovl_i5 +func_i5_8018ADD0 = 0x8018ADD0; //segment:ovl_i5 +func_i5_8018B090 = 0x8018B090; //segment:ovl_i5 +func_i5_8018ED34 = 0x8018ED34; //segment:ovl_i5 +func_i5_8018F548 = 0x8018F548; //segment:ovl_i5 +func_i5_8019037C = 0x8019037C; //segment:ovl_i5 +func_i5_80190BC0 = 0x80190BC0; //segment:ovl_i5 +func_i5_80190CE0 = 0x80190CE0; //segment:ovl_i5 +func_i5_80190EC4 = 0x80190EC4; //segment:ovl_i5 +func_i5_80191030 = 0x80191030; //segment:ovl_i5 +func_i5_80191238 = 0x80191238; //segment:ovl_i5 +func_i5_801913D4 = 0x801913D4; //segment:ovl_i5 +func_i5_80191444 = 0x80191444; //segment:ovl_i5 +func_i5_801915A0 = 0x801915A0; //segment:ovl_i5 +func_i5_801919D4 = 0x801919D4; //segment:ovl_i5 +func_i5_80191ADC = 0x80191ADC; //segment:ovl_i5 +func_i5_80191B28 = 0x80191B28; //segment:ovl_i5 +func_i5_80191B74 = 0x80191B74; //segment:ovl_i5 +func_i5_801921E0 = 0x801921E0; //segment:ovl_i5 +func_i5_8019282C = 0x8019282C; //segment:ovl_i5 +func_i5_80192B5C = 0x80192B5C; //segment:ovl_i5 +func_i5_80192E98 = 0x80192E98; //segment:ovl_i5 +func_i5_801930FC = 0x801930FC; //segment:ovl_i5 +func_i5_80193798 = 0x80193798; //segment:ovl_i5 +func_i5_80193864 = 0x80193864; //segment:ovl_i5 +func_i5_80193970 = 0x80193970; //segment:ovl_i5 +func_i5_80193A24 = 0x80193A24; //segment:ovl_i5 +func_i5_80194134 = 0x80194134; //segment:ovl_i5 +func_i5_801942F4 = 0x801942F4; //segment:ovl_i5 +func_i5_80194878 = 0x80194878; //segment:ovl_i5 +func_i5_80194920 = 0x80194920; //segment:ovl_i5 +func_i5_801949B0 = 0x801949B0; //segment:ovl_i5 +func_i5_80194BC0 = 0x80194BC0; //segment:ovl_i5 +func_i5_801956DC = 0x801956DC; //segment:ovl_i5 +func_i5_801958F0 = 0x801958F0; //segment:ovl_i5 +func_i5_80195D30 = 0x80195D30; //segment:ovl_i5 +func_i5_80195EC8 = 0x80195EC8; //segment:ovl_i5 +func_i5_8019613C = 0x8019613C; //segment:ovl_i5 +func_i5_80196438 = 0x80196438; //segment:ovl_i5 +func_i5_80196F28 = 0x80196F28; //segment:ovl_i5 +func_i5_80197274 = 0x80197274; //segment:ovl_i5 +func_i5_80197434 = 0x80197434; //segment:ovl_i5 +func_i5_801975E0 = 0x801975E0; //segment:ovl_i5 +func_i5_80197D4C = 0x80197D4C; //segment:ovl_i5 +func_i5_80197DD8 = 0x80197DD8; //segment:ovl_i5 +func_i5_80197DF8 = 0x80197DF8; //segment:ovl_i5 +func_i5_80197EB0 = 0x80197EB0; //segment:ovl_i5 +func_i5_801980B0 = 0x801980B0; //segment:ovl_i5 +func_i5_80198104 = 0x80198104; //segment:ovl_i5 +func_i5_80198190 = 0x80198190; //segment:ovl_i5 +func_i5_80198540 = 0x80198540; //segment:ovl_i5 +func_i5_8019859C = 0x8019859C; //segment:ovl_i5 +func_i5_80199684 = 0x80199684; //segment:ovl_i5 +func_i5_80199D50 = 0x80199D50; //segment:ovl_i5 +func_i5_80199DFC = 0x80199DFC; //segment:ovl_i5 +func_i5_8019A0B0 = 0x8019A0B0; //segment:ovl_i5 +func_i5_8019A390 = 0x8019A390; //segment:ovl_i5 +func_i5_8019A518 = 0x8019A518; //segment:ovl_i5 +func_i5_8019A5D8 = 0x8019A5D8; //segment:ovl_i5 +func_i5_8019AA68 = 0x8019AA68; //segment:ovl_i5 +func_i5_8019AEF8 = 0x8019AEF8; //segment:ovl_i5 +func_i5_8019B148 = 0x8019B148; //segment:ovl_i5 +func_i5_8019B170 = 0x8019B170; //segment:ovl_i5 +func_i5_8019B48C = 0x8019B48C; //segment:ovl_i5 +func_i5_8019B698 = 0x8019B698; //segment:ovl_i5 +func_i5_8019B93C = 0x8019B93C; //segment:ovl_i5 +func_i5_8019B97C = 0x8019B97C; //segment:ovl_i5 +func_i5_8019BC94 = 0x8019BC94; //segment:ovl_i5 +func_i5_8019BD40 = 0x8019BD40; //segment:ovl_i5 +func_i5_8019BDD4 = 0x8019BDD4; //segment:ovl_i5 +func_i5_8019BE00 = 0x8019BE00; //segment:ovl_i5 +func_i5_8019C408 = 0x8019C408; //segment:ovl_i5 +func_i5_8019C790 = 0x8019C790; //segment:ovl_i5 +func_i5_8019C7CC = 0x8019C7CC; //segment:ovl_i5 +func_i5_8019C8B8 = 0x8019C8B8; //segment:ovl_i5 +func_i5_8019CAB4 = 0x8019CAB4; //segment:ovl_i5 +func_i5_8019CDD4 = 0x8019CDD4; //segment:ovl_i5 +func_i5_8019CE30 = 0x8019CE30; //segment:ovl_i5 +func_i5_8019D04C = 0x8019D04C; //segment:ovl_i5 +func_i5_8019D110 = 0x8019D110; //segment:ovl_i5 +func_i5_8019D138 = 0x8019D138; //segment:ovl_i5 +func_i5_8019D274 = 0x8019D274; //segment:ovl_i5 +func_i5_8019D2A8 = 0x8019D2A8; //segment:ovl_i5 +func_i5_8019D2B4 = 0x8019D2B4; //segment:ovl_i5 +func_i5_8019D3E4 = 0x8019D3E4; //segment:ovl_i5 +func_i5_8019D418 = 0x8019D418; //segment:ovl_i5 +func_i5_8019D428 = 0x8019D428; //segment:ovl_i5 +func_i5_8019D824 = 0x8019D824; //segment:ovl_i5 +func_i5_8019D8C4 = 0x8019D8C4; //segment:ovl_i5 +func_i5_8019D8EC = 0x8019D8EC; //segment:ovl_i5 +func_i5_8019DAA0 = 0x8019DAA0; //segment:ovl_i5 +func_i5_8019DAAC = 0x8019DAAC; //segment:ovl_i5 +func_i5_8019DBD0 = 0x8019DBD0; //segment:ovl_i5 +func_i5_8019DBDC = 0x8019DBDC; //segment:ovl_i5 +func_i5_8019DC68 = 0x8019DC68; //segment:ovl_i5 +func_i5_8019DF5C = 0x8019DF5C; //segment:ovl_i5 +func_i5_8019E298 = 0x8019E298; //segment:ovl_i5 +func_i5_8019E5C0 = 0x8019E5C0; //segment:ovl_i5 +func_i5_8019E7A8 = 0x8019E7A8; //segment:ovl_i5 +func_i5_8019EB94 = 0x8019EB94; //segment:ovl_i5 +func_i5_8019ED14 = 0x8019ED14; //segment:ovl_i5 +func_i5_8019EF90 = 0x8019EF90; //segment:ovl_i5 +func_i5_8019F07C = 0x8019F07C; //segment:ovl_i5 +func_i5_8019F164 = 0x8019F164; //segment:ovl_i5 +func_i5_801A2F10 = 0x801A2F10; //segment:ovl_i5 +func_i5_801A34BC = 0x801A34BC; //segment:ovl_i5 +func_i5_801A3590 = 0x801A3590; //segment:ovl_i5 +func_i5_801A3728 = 0x801A3728; //segment:ovl_i5 +func_i5_801A3734 = 0x801A3734; //segment:ovl_i5 +func_i5_801A38AC = 0x801A38AC; //segment:ovl_i5 +func_i5_801A39B4 = 0x801A39B4; //segment:ovl_i5 +func_i5_801A3A54 = 0x801A3A54; //segment:ovl_i5 +func_i5_801A4148 = 0x801A4148; //segment:ovl_i5 +func_i5_801A4274 = 0x801A4274; //segment:ovl_i5 +func_i5_801A42C4 = 0x801A42C4; //segment:ovl_i5 +func_i5_801A438C = 0x801A438C; //segment:ovl_i5 +func_i5_801A4454 = 0x801A4454; //segment:ovl_i5 +func_i5_801A4864 = 0x801A4864; //segment:ovl_i5 +func_i5_801A4934 = 0x801A4934; //segment:ovl_i5 +func_i5_801A4A00 = 0x801A4A00; //segment:ovl_i5 +func_i5_801A4DD8 = 0x801A4DD8; //segment:ovl_i5 +func_i5_801A4F18 = 0x801A4F18; //segment:ovl_i5 +func_i5_801A4FFC = 0x801A4FFC; //segment:ovl_i5 +func_i5_801A5078 = 0x801A5078; //segment:ovl_i5 +func_i5_801A55D0 = 0x801A55D0; //segment:ovl_i5 +func_i5_801A57DC = 0x801A57DC; //segment:ovl_i5 +func_i5_801A5920 = 0x801A5920; //segment:ovl_i5 +func_i5_801A59A4 = 0x801A59A4; //segment:ovl_i5 +func_i5_801A5B10 = 0x801A5B10; //segment:ovl_i5 +func_i5_801A5B8C = 0x801A5B8C; //segment:ovl_i5 +func_i5_801A5DB0 = 0x801A5DB0; //segment:ovl_i5 +func_i5_801A5F14 = 0x801A5F14; //segment:ovl_i5 +func_i5_801A620C = 0x801A620C; //segment:ovl_i5 +func_i5_801A6444 = 0x801A6444; //segment:ovl_i5 +func_i5_801A6510 = 0x801A6510; //segment:ovl_i5 +func_i5_801A658C = 0x801A658C; //segment:ovl_i5 +func_i5_801A675C = 0x801A675C; //segment:ovl_i5 +func_i5_801A6938 = 0x801A6938; //segment:ovl_i5 +func_i5_801A6A1C = 0x801A6A1C; //segment:ovl_i5 +func_i5_801A6C04 = 0x801A6C04; //segment:ovl_i5 +func_i5_801A9BD0 = 0x801A9BD0; //segment:ovl_i5 +func_i5_801AA868 = 0x801AA868; //segment:ovl_i5 +func_i5_801AAA2C = 0x801AAA2C; //segment:ovl_i5 +func_i5_801AABF4 = 0x801AABF4; //segment:ovl_i5 +func_i5_801AB018 = 0x801AB018; //segment:ovl_i5 +func_i5_801ABCE0 = 0x801ABCE0; //segment:ovl_i5 +func_i5_801ABD64 = 0x801ABD64; //segment:ovl_i5 +func_i5_801ABDB8 = 0x801ABDB8; //segment:ovl_i5 +func_i5_801AC420 = 0x801AC420; //segment:ovl_i5 +func_i5_801AC554 = 0x801AC554; //segment:ovl_i5 +func_i5_801ACBBC = 0x801ACBBC; //segment:ovl_i5 +func_i5_801AD2F0 = 0x801AD2F0; //segment:ovl_i5 +func_i5_801ADBB8 = 0x801ADBB8; //segment:ovl_i5 +func_i5_801ADDFC = 0x801ADDFC; //segment:ovl_i5 +func_i5_801ADE50 = 0x801ADE50; //segment:ovl_i5 +func_i5_801AE130 = 0x801AE130; //segment:ovl_i5 +func_i5_801AE550 = 0x801AE550; //segment:ovl_i5 +D_i5_801AE5A0 = 0x801AE5A0; //segment:ovl_i5 +D_i5_801AE5B0 = 0x801AE5B0; //segment:ovl_i5 +D_i5_801AE5C8 = 0x801AE5C8; //segment:ovl_i5 +D_i5_801AE628 = 0x801AE628; //segment:ovl_i5 +D_i5_801AE638 = 0x801AE638; //segment:ovl_i5 +D_i5_801AE648 = 0x801AE648; //segment:ovl_i5 +D_i5_801AE654 = 0x801AE654; //segment:ovl_i5 +D_i5_801AE658 = 0x801AE658; //segment:ovl_i5 +D_i5_801AE670 = 0x801AE670; //segment:ovl_i5 +D_i5_801AE800 = 0x801AE800; //segment:ovl_i5 +D_i5_801AE81B = 0x801AE81B; //segment:ovl_i5 +D_i5_801AE81C = 0x801AE81C; //segment:ovl_i5 +D_i5_801AE828 = 0x801AE828; //segment:ovl_i5 +D_i5_801AE830 = 0x801AE830; //segment:ovl_i5 +D_i5_801AE83C = 0x801AE83C; //segment:ovl_i5 +D_i5_801AE848 = 0x801AE848; //segment:ovl_i5 +D_i5_801AE854 = 0x801AE854; //segment:ovl_i5 +D_i5_801AE860 = 0x801AE860; //segment:ovl_i5 +D_i5_801AE864 = 0x801AE864; //segment:ovl_i5 +D_i5_801AE868 = 0x801AE868; //segment:ovl_i5 +D_i5_801AE86C = 0x801AE86C; //segment:ovl_i5 +D_i5_801AE878 = 0x801AE878; //segment:ovl_i5 +D_i5_801AE894 = 0x801AE894; //segment:ovl_i5 +D_i5_801AE8BC = 0x801AE8BC; //segment:ovl_i5 +D_i5_801AE8C8 = 0x801AE8C8; //segment:ovl_i5 +D_i5_801AE8D4 = 0x801AE8D4; //segment:ovl_i5 +D_i5_801AE8E0 = 0x801AE8E0; //segment:ovl_i5 +D_i5_801AE8F4 = 0x801AE8F4; //segment:ovl_i5 +D_i5_801AE918 = 0x801AE918; //segment:ovl_i5 +D_i5_801AE940 = 0x801AE940; //segment:ovl_i5 +D_i5_801AE942 = 0x801AE942; //segment:ovl_i5 +D_i5_801AE964 = 0x801AE964; //segment:ovl_i5 +D_i5_801AE970 = 0x801AE970; //segment:ovl_i5 +D_i5_801AE97C = 0x801AE97C; //segment:ovl_i5 +D_i5_801AE988 = 0x801AE988; //segment:ovl_i5 +D_i5_801AE9A0 = 0x801AE9A0; //segment:ovl_i5 +D_i5_801AE9AC = 0x801AE9AC; //segment:ovl_i5 +D_i5_801AEA48 = 0x801AEA48; //segment:ovl_i5 +D_i5_801AEA80 = 0x801AEA80; //segment:ovl_i5 +D_i5_801AEC14 = 0x801AEC14; //segment:ovl_i5 +D_i5_801AEC70 = 0x801AEC70; //segment:ovl_i5 +D_i5_801AED80 = 0x801AED80; //segment:ovl_i5 +D_i5_801AF2E0 = 0x801AF2E0; //segment:ovl_i5 +D_i5_801AF448 = 0x801AF448; //segment:ovl_i5 +D_i5_801AF45A = 0x801AF45A; //segment:ovl_i5 +D_i5_801AF45C = 0x801AF45C; //segment:ovl_i5 +D_i5_801AF46E = 0x801AF46E; //segment:ovl_i5 +D_i5_801AF470 = 0x801AF470; //segment:ovl_i5 +D_i5_801AF4A8 = 0x801AF4A8; //segment:ovl_i5 +D_i5_801AF4B0 = 0x801AF4B0; //segment:ovl_i5 +D_i5_801AF4B8 = 0x801AF4B8; //segment:ovl_i5 +D_i5_801AF6B8 = 0x801AF6B8; //segment:ovl_i5 +D_i5_801AF6BC = 0x801AF6BC; //segment:ovl_i5 +D_i5_801AFECC = 0x801AFECC; //segment:ovl_i5 +D_i5_801AFF1C = 0x801AFF1C; //segment:ovl_i5 +D_i5_801AFF34 = 0x801AFF34; //segment:ovl_i5 +D_i5_801AFF74 = 0x801AFF74; //segment:ovl_i5 +D_i5_801AFFE4 = 0x801AFFE4; //segment:ovl_i5 +D_i5_801B0004 = 0x801B0004; //segment:ovl_i5 +D_i5_801B0010 = 0x801B0010; //segment:ovl_i5 +D_i5_801B001C = 0x801B001C; //segment:ovl_i5 +D_i5_801B0028 = 0x801B0028; //segment:ovl_i5 +D_i5_801B0034 = 0x801B0034; //segment:ovl_i5 +D_i5_801B0040 = 0x801B0040; //segment:ovl_i5 +D_i5_801B004C = 0x801B004C; //segment:ovl_i5 +D_i5_801B0058 = 0x801B0058; //segment:ovl_i5 +D_i5_801B005C = 0x801B005C; //segment:ovl_i5 +D_i5_801B0064 = 0x801B0064; //segment:ovl_i5 +D_i5_801B006C = 0x801B006C; //segment:ovl_i5 +D_i5_801B009C = 0x801B009C; //segment:ovl_i5 +D_i5_801B00A0 = 0x801B00A0; //segment:ovl_i5 +D_i5_801B0134 = 0x801B0134; //segment:ovl_i5 +D_i5_801B0154 = 0x801B0154; //segment:ovl_i5 +D_i5_801B0160 = 0x801B0160; //segment:ovl_i5 +D_i5_801B0174 = 0x801B0174; //segment:ovl_i5 +D_i5_801B0D90 = 0x801B0D90; //segment:ovl_i5 +D_i5_801B0DA4 = 0x801B0DA4; //segment:ovl_i5 +D_i5_801B1448 = 0x801B1448; //segment:ovl_i5 +D_i5_801B14E8 = 0x801B14E8; //segment:ovl_i5 +D_i5_801B14EC = 0x801B14EC; //segment:ovl_i5 +D_i5_801B14F0 = 0x801B14F0; //segment:ovl_i5 +D_i5_801B14F4 = 0x801B14F4; //segment:ovl_i5 +D_i5_801B14F8 = 0x801B14F8; //segment:ovl_i5 +D_i5_801B14FC = 0x801B14FC; //segment:ovl_i5 +D_i5_801B1880 = 0x801B1880; //segment:ovl_i5 +D_i5_801B1948 = 0x801B1948; //segment:ovl_i5 +D_i5_801B1A18 = 0x801B1A18; //segment:ovl_i5 +D_i5_801B1A1C = 0x801B1A1C; //segment:ovl_i5 +D_i5_801B1A20 = 0x801B1A20; //segment:ovl_i5 +D_i5_801B1A24 = 0x801B1A24; //segment:ovl_i5 +D_i5_801B1A30 = 0x801B1A30; //segment:ovl_i5 +D_i5_801B1A3C = 0x801B1A3C; //segment:ovl_i5 +D_i5_801B1A48 = 0x801B1A48; //segment:ovl_i5 +D_i5_801B1A54 = 0x801B1A54; //segment:ovl_i5 +D_i5_801B1A60 = 0x801B1A60; //segment:ovl_i5 +D_i5_801B1A6C = 0x801B1A6C; //segment:ovl_i5 +D_i5_801B1A78 = 0x801B1A78; //segment:ovl_i5 +D_i5_801B1A7C = 0x801B1A7C; //segment:ovl_i5 +D_i5_801B1A88 = 0x801B1A88; //segment:ovl_i5 +D_i5_801B1AF4 = 0x801B1AF4; //segment:ovl_i5 +D_i5_801B1B04 = 0x801B1B04; //segment:ovl_i5 +D_i5_801B1B08 = 0x801B1B08; //segment:ovl_i5 +D_i5_801B1B18 = 0x801B1B18; //segment:ovl_i5 +D_i5_801B1B1C = 0x801B1B1C; //segment:ovl_i5 +D_i5_801B1B28 = 0x801B1B28; //segment:ovl_i5 +D_i5_801B1B2C = 0x801B1B2C; //segment:ovl_i5 +D_i5_801B1B30 = 0x801B1B30; //segment:ovl_i5 +D_i5_801B1B44 = 0x801B1B44; //segment:ovl_i5 +D_i5_801B1B5C = 0x801B1B5C; //segment:ovl_i5 +D_i5_801B1B64 = 0x801B1B64; //segment:ovl_i5 +D_i5_801B1B74 = 0x801B1B74; //segment:ovl_i5 +D_i5_801B1B7C = 0x801B1B7C; //segment:ovl_i5 +D_i5_801B1B84 = 0x801B1B84; //segment:ovl_i5 +D_i5_801B1B94 = 0x801B1B94; //segment:ovl_i5 +D_i5_801B1B98 = 0x801B1B98; //segment:ovl_i5 +D_i5_801B1B9C = 0x801B1B9C; //segment:ovl_i5 +D_i5_801B1BA4 = 0x801B1BA4; //segment:ovl_i5 +D_i5_801B1BB4 = 0x801B1BB4; //segment:ovl_i5 +D_i5_801B1BC4 = 0x801B1BC4; //segment:ovl_i5 +D_i5_801B1BD4 = 0x801B1BD4; //segment:ovl_i5 +D_i5_801B1BD8 = 0x801B1BD8; //segment:ovl_i5 +D_i5_801B1BE8 = 0x801B1BE8; //segment:ovl_i5 +D_i5_801B1BEC = 0x801B1BEC; //segment:ovl_i5 +D_i5_801B1BF8 = 0x801B1BF8; //segment:ovl_i5 +D_i5_801B1BFC = 0x801B1BFC; //segment:ovl_i5 +D_i5_801B1C00 = 0x801B1C00; //segment:ovl_i5 +D_i5_801B1C10 = 0x801B1C10; //segment:ovl_i5 +D_i5_801B1C20 = 0x801B1C20; //segment:ovl_i5 +D_i5_801B1C60 = 0x801B1C60; //segment:ovl_i5 +D_i5_801B1C80 = 0x801B1C80; //segment:ovl_i5 +D_i5_801B1C8C = 0x801B1C8C; //segment:ovl_i5 +D_i5_801B1CA4 = 0x801B1CA4; //segment:ovl_i5 +D_i5_801B1CBC = 0x801B1CBC; //segment:ovl_i5 +D_i5_801B1CD4 = 0x801B1CD4; //segment:ovl_i5 +D_i5_801B31F0 = 0x801B31F0; +D_i5_801B3200 = 0x801B3200; //segment:ovl_i5 +D_i5_801B3218 = 0x801B3218; //segment:ovl_i5 +D_i5_801B32E4 = 0x801B32E4; //segment:ovl_i5 +D_i5_801B32F8 = 0x801B32F8; //segment:ovl_i5 +D_i5_801B34F8 = 0x801B34F8; //segment:ovl_i5 +D_i5_801B35E8 = 0x801B35E8; //segment:ovl_i5 +D_i5_801B3CFC = 0x801B3CFC; //segment:ovl_i5 +D_i5_801B3D00 = 0x801B3D00; //segment:ovl_i5 +D_i5_801B3D04 = 0x801B3D04; //segment:ovl_i5 +D_i5_801B3D08 = 0x801B3D08; //segment:ovl_i5 +D_i5_801B3D20 = 0x801B3D20; //segment:ovl_i5 +D_i5_801B3D24 = 0x801B3D24; //segment:ovl_i5 +D_i5_801B3D28 = 0x801B3D28; //segment:ovl_i5 +D_i5_801B3D2C = 0x801B3D2C; //segment:ovl_i5 +D_i5_801B3D2E = 0x801B3D2E; //segment:ovl_i5 +D_i5_801B3D48 = 0x801B3D48; //segment:ovl_i5 +D_i5_801B3D4C = 0x801B3D4C; //segment:ovl_i5 +D_i5_801B3D50 = 0x801B3D50; //segment:ovl_i5 +D_i5_801B3D54 = 0x801B3D54; //segment:ovl_i5 +D_i5_801B3D56 = 0x801B3D56; //segment:ovl_i5 +D_i5_801B3D70 = 0x801B3D70; //segment:ovl_i5 +D_i5_801B3D74 = 0x801B3D74; //segment:ovl_i5 +D_i5_801B3D78 = 0x801B3D78; //segment:ovl_i5 +D_i5_801B3D7C = 0x801B3D7C; //segment:ovl_i5 +D_i5_801B3D7E = 0x801B3D7E; //segment:ovl_i5 +D_i5_801B3D80 = 0x801B3D80; //segment:ovl_i5 +D_i5_801B4780 = 0x801B4780; //segment:ovl_i5 +D_i5_801B47E0 = 0x801B47E0; //segment:ovl_i5 +D_i5_801B4840 = 0x801B4840; //segment:ovl_i5 +D_i5_801B4BD0 = 0x801B4BD0; //segment:ovl_i5 +D_i5_801B4C30 = 0x801B4C30; //segment:ovl_i5 +D_i5_801B4C90 = 0x801B4C90; //segment:ovl_i5 +D_i5_801B5020 = 0x801B5020; //segment:ovl_i5 +D_i5_801B5470 = 0x801B5470; //segment:ovl_i5 +D_i5_801B54B8 = 0x801B54B8; //segment:ovl_i5 +D_i5_801B5540 = 0x801B5540; //segment:ovl_i5 +D_i5_801B5544 = 0x801B5544; //segment:ovl_i5 +D_i5_801B5548 = 0x801B5548; //segment:ovl_i5 +D_i5_801B554C = 0x801B554C; //segment:ovl_i5 +D_i5_801B5558 = 0x801B5558; //segment:ovl_i5 +D_i5_801B5560 = 0x801B5560; //segment:ovl_i5 +D_i5_801B5564 = 0x801B5564; //segment:ovl_i5 +D_i5_801B557C = 0x801B557C; //segment:ovl_i5 +D_i5_801B5588 = 0x801B5588; //segment:ovl_i5 +D_i5_801B558C = 0x801B558C; //segment:ovl_i5 +D_i5_801B55A4 = 0x801B55A4; //segment:ovl_i5 +D_i5_801B55AC = 0x801B55AC; //segment:ovl_i5 +D_i5_801B5602 = 0x801B5602; //segment:ovl_i5 +D_i5_801B5550 = 0x801B5550; //segment:ovl_i5 +D_i5_801B55B4 = 0x801B55B4; //segment:ovl_i5 +D_i5_801B55F8 = 0x801B55F8; //segment:ovl_i5 +D_i5_801B560F = 0x801B560F; //segment:ovl_i5 +D_i5_801B5610 = 0x801B5610; //segment:ovl_i5 +D_i5_801B5618 = 0x801B5618; //segment:ovl_i5 +D_i5_801B561A = 0x801B561A; //segment:ovl_i5 +D_i5_801B561B = 0x801B561B; //segment:ovl_i5 +D_i5_801B561C = 0x801B561C; //segment:ovl_i5 +D_i5_801B561E = 0x801B561E; //segment:ovl_i5 +D_i5_801B5620 = 0x801B5620; //segment:ovl_i5 +D_i5_801B5628 = 0x801B5628; //segment:ovl_i5 +D_i5_801B562C = 0x801B562C; //segment:ovl_i5 +D_i5_801B562E = 0x801B562E; //segment:ovl_i5 +D_i5_801B563A = 0x801B563A; //segment:ovl_i5 +D_i5_801B563C = 0x801B563C; //segment:ovl_i5 +D_i5_801B564C = 0x801B564C; //segment:ovl_i5 +D_i5_801B5670 = 0x801B5670; //segment:ovl_i5 +D_i5_801B5674 = 0x801B5674; //segment:ovl_i5 +D_i5_801B5678 = 0x801B5678; //segment:ovl_i5 +D_i5_801B568C = 0x801B568C; //segment:ovl_i5 +D_i5_801B5690 = 0x801B5690; //segment:ovl_i5 +D_i5_801B56C0 = 0x801B56C0; //segment:ovl_i5 +D_i5_801B56C4 = 0x801B56C4; //segment:ovl_i5 +D_i5_801B56C8 = 0x801B56C8; //segment:ovl_i5 +D_i5_801B56CC = 0x801B56CC; //segment:ovl_i5 +D_i5_801B56F0 = 0x801B56F0; //segment:ovl_i5 +D_i5_801B56F4 = 0x801B56F4; //segment:ovl_i5 +D_i5_801B56F8 = 0x801B56F8; //segment:ovl_i5 +D_i5_801B5738 = 0x801B5738; //segment:ovl_i5 +D_i5_801B5990 = 0x801B5990; //segment:ovl_i5 +D_i5_801B599C = 0x801B599C; //segment:ovl_i5 +D_i5_801B59A8 = 0x801B59A8; //segment:ovl_i5 +D_i5_801B59B4 = 0x801B59B4; //segment:ovl_i5 +D_i5_801B59C0 = 0x801B59C0; //segment:ovl_i5 +D_i5_801B59CC = 0x801B59CC; //segment:ovl_i5 +D_i5_801B59D8 = 0x801B59D8; //segment:ovl_i5 +D_i5_801B59E4 = 0x801B59E4; //segment:ovl_i5 +D_i5_801B59F0 = 0x801B59F0; //segment:ovl_i5 +D_i5_801B59FC = 0x801B59FC; //segment:ovl_i5 +D_i5_801B5A08 = 0x801B5A08; //segment:ovl_i5 +D_i5_801B5A14 = 0x801B5A14; //segment:ovl_i5 +D_i5_801B5A20 = 0x801B5A20; //segment:ovl_i5 +D_i5_801B5A2C = 0x801B5A2C; //segment:ovl_i5 +D_i5_801B5A40 = 0x801B5A40; //segment:ovl_i5 +D_i5_801B5A44 = 0x801B5A44; //segment:ovl_i5 +D_i5_801B5A48 = 0x801B5A48; //segment:ovl_i5 +D_i5_801B9048 = 0x801B9048; //segment:ovl_i5 +D_i5_801B9748 = 0x801B9748; //segment:ovl_i5 +D_i5_801B97B8 = 0x801B97B8; //segment:ovl_i5 +D_i5_801B9828 = 0x801B9828; //segment:ovl_i5 +D_i5_801BCF00 = 0x801BCF00; //segment:ovl_i5 +D_i5_801BCF04 = 0x801BCF04; //segment:ovl_i5 +D_i5_801BCF08 = 0x801BCF08; //segment:ovl_i5 +D_i5_801BCF0C = 0x801BCF0C; //segment:ovl_i5 +D_i5_801BCF10 = 0x801BCF10; //segment:ovl_i5 +D_i5_801BCF14 = 0x801BCF14; //segment:ovl_i5 +D_i5_801BCF18 = 0x801BCF18; //segment:ovl_i5 +D_i5_801BD5D8 = 0x801BD5D8; //segment:ovl_i5 +D_i5_801BD5E0 = 0x801BD5E0; //segment:ovl_i5 +D_i5_801BD5E8 = 0x801BD5E8; //segment:ovl_i5 +D_i5_801BD8B8 = 0x801BD8B8; //segment:ovl_i5 +D_i5_801BDB88 = 0x801BDB88; //segment:ovl_i5 +D_i5_801BDE58 = 0x801BDE58; //segment:ovl_i5 +D_i5_801BE128 = 0x801BE128; //segment:ovl_i5 +D_i5_801BE134 = 0x801BE134; //segment:ovl_i5 +D_i5_801BE158 = 0x801BE158; //segment:ovl_i5 + +func_i6_8017E7A0 = 0x8017E7A0; //segment:ovl_i6 +func_i6_8017E7B0 = 0x8017E7B0; //segment:ovl_i6 +func_i6_8017E900 = 0x8017E900; //segment:ovl_i6 +func_i6_8017E920 = 0x8017E920; //segment:ovl_i6 +func_i6_8017E980 = 0x8017E980; //segment:ovl_i6 +func_i6_8017EB30 = 0x8017EB30; //segment:ovl_i6 +func_i6_8017EEE8 = 0x8017EEE8; //segment:ovl_i6 +func_i6_8017F380 = 0x8017F380; //segment:ovl_i6 +func_i6_8017F6E4 = 0x8017F6E4; //segment:ovl_i6 +func_i6_8017F704 = 0x8017F704; //segment:ovl_i6 +func_i6_8017F7C4 = 0x8017F7C4; //segment:ovl_i6 +func_i6_8017F8FC = 0x8017F8FC; //segment:ovl_i6 +func_i6_8017FA4C = 0x8017FA4C; //segment:ovl_i6 +func_i6_8017FB18 = 0x8017FB18; //segment:ovl_i6 +func_i6_8017FB90 = 0x8017FB90; //segment:ovl_i6 +func_i6_8017FCE8 = 0x8017FCE8; //segment:ovl_i6 +func_i6_8017FF54 = 0x8017FF54; //segment:ovl_i6 +func_i6_80180334 = 0x80180334; //segment:ovl_i6 +func_i6_801804B4 = 0x801804B4; //segment:ovl_i6 +func_i6_801805DC = 0x801805DC; //segment:ovl_i6 +func_i6_80180658 = 0x80180658; //segment:ovl_i6 +func_i6_80180710 = 0x80180710; //segment:ovl_i6 +func_i6_801809C4 = 0x801809C4; //segment:ovl_i6 +func_i6_80180C84 = 0x80180C84; //segment:ovl_i6 +func_i6_80180DA0 = 0x80180DA0; //segment:ovl_i6 +func_i6_80180E10 = 0x80180E10; //segment:ovl_i6 +func_i6_8018272C = 0x8018272C; //segment:ovl_i6 +func_i6_80182B70 = 0x80182B70; //segment:ovl_i6 +func_i6_80183088 = 0x80183088; //segment:ovl_i6 +func_i6_80183644 = 0x80183644; //segment:ovl_i6 +func_i6_80183914 = 0x80183914; //segment:ovl_i6 +func_i6_801839E8 = 0x801839E8; //segment:ovl_i6 +func_i6_80183A54 = 0x80183A54; //segment:ovl_i6 +func_i6_80183B88 = 0x80183B88; //segment:ovl_i6 +func_i6_80183C0C = 0x80183C0C; //segment:ovl_i6 +func_i6_80183D04 = 0x80183D04; //segment:ovl_i6 +func_i6_80183D88 = 0x80183D88; //segment:ovl_i6 +func_i6_8018424C = 0x8018424C; //segment:ovl_i6 +func_i6_8018438C = 0x8018438C; //segment:ovl_i6 +func_i6_80184420 = 0x80184420; //segment:ovl_i6 +func_i6_80184564 = 0x80184564; //segment:ovl_i6 +func_i6_80184C74 = 0x80184C74; //segment:ovl_i6 +func_i6_80184D48 = 0x80184D48; //segment:ovl_i6 +func_i6_80184EA4 = 0x80184EA4; //segment:ovl_i6 +func_i6_80188AA4 = 0x80188AA4; //segment:ovl_i6 +func_i6_80189768 = 0x80189768; //segment:ovl_i6 +func_i6_80189B7C = 0x80189B7C; //segment:ovl_i6 +func_i6_8018A148 = 0x8018A148; //segment:ovl_i6 +func_i6_8018A4F8 = 0x8018A4F8; //segment:ovl_i6 +func_i6_8018A634 = 0x8018A634; //segment:ovl_i6 +func_i6_8018A7A4 = 0x8018A7A4; //segment:ovl_i6 +func_i6_8018A7C4 = 0x8018A7C4; //segment:ovl_i6 +func_i6_8018A824 = 0x8018A824; //segment:ovl_i6 +func_i6_8018A86C = 0x8018A86C; //segment:ovl_i6 +func_i6_8018A88C = 0x8018A88C; //segment:ovl_i6 +func_i6_8018A920 = 0x8018A920; //segment:ovl_i6 +func_i6_8018A9C8 = 0x8018A9C8; //segment:ovl_i6 +func_i6_8018AC5C = 0x8018AC5C; //segment:ovl_i6 +func_i6_8018ADA0 = 0x8018ADA0; //segment:ovl_i6 +func_i6_8018AF08 = 0x8018AF08; //segment:ovl_i6 +func_i6_8018D100 = 0x8018D100; //segment:ovl_i6 +func_i6_8018D468 = 0x8018D468; //segment:ovl_i6 +func_i6_8018D4D0 = 0x8018D4D0; //segment:ovl_i6 +func_i6_8018D50C = 0x8018D50C; //segment:ovl_i6 +func_i6_8018D548 = 0x8018D548; //segment:ovl_i6 +func_i6_8018D5B4 = 0x8018D5B4; //segment:ovl_i6 +func_i6_8018D5D4 = 0x8018D5D4; //segment:ovl_i6 +func_i6_8018DC28 = 0x8018DC28; //segment:ovl_i6 +func_i6_8018DEBC = 0x8018DEBC; //segment:ovl_i6 +func_i6_8018E04C = 0x8018E04C; //segment:ovl_i6 +func_i6_8018EDD0 = 0x8018EDD0; //segment:ovl_i6 +func_i6_8018EF04 = 0x8018EF04; //segment:ovl_i6 +func_i6_8018EF58 = 0x8018EF58; //segment:ovl_i6 +func_i6_8018EF64 = 0x8018EF64; //segment:ovl_i6 +func_i6_8018F1C0 = 0x8018F1C0; //segment:ovl_i6 +func_i6_8018F22C = 0x8018F22C; //segment:ovl_i6 +func_i6_8018F4E0 = 0x8018F4E0; //segment:ovl_i6 +func_i6_8018F4EC = 0x8018F4EC; //segment:ovl_i6 +func_i6_8018F68C = 0x8018F68C; //segment:ovl_i6 +func_i6_8018FD64 = 0x8018FD64; //segment:ovl_i6 +func_i6_8018FF8C = 0x8018FF8C; //segment:ovl_i6 +func_i6_80190204 = 0x80190204; //segment:ovl_i6 +func_i6_801906E8 = 0x801906E8; //segment:ovl_i6 +func_i6_80191018 = 0x80191018; //segment:ovl_i6 +func_i6_80191060 = 0x80191060; //segment:ovl_i6 +func_i6_801916E8 = 0x801916E8; //segment:ovl_i6 +func_i6_801917D4 = 0x801917D4; //segment:ovl_i6 +func_i6_801918F4 = 0x801918F4; //segment:ovl_i6 +func_i6_80191920 = 0x80191920; //segment:ovl_i6 +func_i6_80191AE0 = 0x80191AE0; //segment:ovl_i6 +func_i6_80191B4C = 0x80191B4C; //segment:ovl_i6 +func_i6_80191CBC = 0x80191CBC; //segment:ovl_i6 +func_i6_80191DA4 = 0x80191DA4; //segment:ovl_i6 +func_i6_80192174 = 0x80192174; //segment:ovl_i6 +func_i6_801921A0 = 0x801921A0; //segment:ovl_i6 +func_i6_801927DC = 0x801927DC; //segment:ovl_i6 +func_i6_80192880 = 0x80192880; //segment:ovl_i6 +func_i6_8019299C = 0x8019299C; //segment:ovl_i6 +func_i6_80192E70 = 0x80192E70; //segment:ovl_i6 +func_i6_80192EC8 = 0x80192EC8; //segment:ovl_i6 +func_i6_80193448 = 0x80193448; //segment:ovl_i6 +func_i6_80193B3C = 0x80193B3C; //segment:ovl_i6 +func_i6_80194F00 = 0x80194F00; //segment:ovl_i6 +func_i6_801950C4 = 0x801950C4; //segment:ovl_i6 +func_i6_801952C8 = 0x801952C8; //segment:ovl_i6 +func_i6_80195578 = 0x80195578; //segment:ovl_i6 +func_i6_80195E34 = 0x80195E34; //segment:ovl_i6 +func_i6_80196114 = 0x80196114; //segment:ovl_i6 +func_i6_801971B4 = 0x801971B4; //segment:ovl_i6 +func_i6_801977C4 = 0x801977C4; //segment:ovl_i6 +func_i6_80197958 = 0x80197958; //segment:ovl_i6 +func_i6_80197AB0 = 0x80197AB0; //segment:ovl_i6 +func_i6_80197CBC = 0x80197CBC; //segment:ovl_i6 +func_i6_80197D74 = 0x80197D74; //segment:ovl_i6 +func_i6_8019ACB0 = 0x8019ACB0; //segment:ovl_i6 +func_i6_8019AE04 = 0x8019AE04; //segment:ovl_i6 +func_i6_8019AE88 = 0x8019AE88; //segment:ovl_i6 +func_i6_8019BCD0 = 0x8019BCD0; //segment:ovl_i6 +func_i6_8019BEEC = 0x8019BEEC; //segment:ovl_i6 +func_i6_8019BF68 = 0x8019BF68; //segment:ovl_i6 +func_i6_8019C0FC = 0x8019C0FC; //segment:ovl_i6 +func_i6_8019C570 = 0x8019C570; //segment:ovl_i6 +func_i6_8019C810 = 0x8019C810; //segment:ovl_i6 +func_i6_8019CACC = 0x8019CACC; //segment:ovl_i6 +func_i6_8019CB58 = 0x8019CB58; //segment:ovl_i6 +func_i6_8019CD84 = 0x8019CD84; //segment:ovl_i6 +func_i6_8019D270 = 0x8019D270; //segment:ovl_i6 +func_i6_8019D414 = 0x8019D414; //segment:ovl_i6 +D_i6_8019DA00 = 0x8019DA00; //segment:ovl_i6 +D_i6_8019DA10 = 0x8019DA10; //segment:ovl_i6 +D_i6_8019DA40 = 0x8019DA40; //segment:ovl_i6 +D_i6_8019DA68 = 0x8019DA68; //segment:ovl_i6 +D_i6_8019DA74 = 0x8019DA74; //segment:ovl_i6 +D_i6_8019DA80 = 0x8019DA80; //segment:ovl_i6 +D_i6_8019DA84 = 0x8019DA84; //segment:ovl_i6 +D_i6_8019DA88 = 0x8019DA88; //segment:ovl_i6 +D_i6_8019DA8C = 0x8019DA8C; //segment:ovl_i6 +D_i6_8019DA98 = 0x8019DA98; //segment:ovl_i6 +D_i6_8019DA9C = 0x8019DA9C; //segment:ovl_i6 +D_i6_8019DAA0 = 0x8019DAA0; //segment:ovl_i6 +D_i6_8019DAA4 = 0x8019DAA4; //segment:ovl_i6 +D_i6_8019DAB0 = 0x8019DAB0; //segment:ovl_i6 +D_i6_8019DABC = 0x8019DABC; //segment:ovl_i6 +D_i6_8019DAC8 = 0x8019DAC8; //segment:ovl_i6 +D_i6_8019DAD4 = 0x8019DAD4; //segment:ovl_i6 +D_i6_8019DAE0 = 0x8019DAE0; //segment:ovl_i6 +D_i6_8019DAEC = 0x8019DAEC; //segment:ovl_i6 +D_i6_8019DAF8 = 0x8019DAF8; //segment:ovl_i6 +D_i6_8019DB04 = 0x8019DB04; //segment:ovl_i6 +D_i6_8019DB10 = 0x8019DB10; //segment:ovl_i6 +D_i6_8019DB1C = 0x8019DB1C; //segment:ovl_i6 +D_i6_8019DB28 = 0x8019DB28; //segment:ovl_i6 +D_i6_8019DB60 = 0x8019DB60; //segment:ovl_i6 +D_i6_8019DB6C = 0x8019DB6C; //segment:ovl_i6 +D_i6_8019DBAC = 0x8019DBAC; //segment:ovl_i6 +D_i6_8019DBB8 = 0x8019DBB8; //segment:ovl_i6 +D_i6_8019DBC0 = 0x8019DBC0; //segment:ovl_i6 +D_i6_8019DBF0 = 0x8019DBF0; //segment:ovl_i6 +D_i6_8019DBFC = 0x8019DBFC; //segment:ovl_i6 +D_i6_8019DC08 = 0x8019DC08; //segment:ovl_i6 +D_i6_8019DC14 = 0x8019DC14; //segment:ovl_i6 +D_i6_8019DC20 = 0x8019DC20; //segment:ovl_i6 +D_i6_8019DC2C = 0x8019DC2C; //segment:ovl_i6 +D_i6_8019DC38 = 0x8019DC38; //segment:ovl_i6 +D_i6_8019DC44 = 0x8019DC44; //segment:ovl_i6 +D_i6_8019DC50 = 0x8019DC50; //segment:ovl_i6 +D_i6_8019DC5C = 0x8019DC5C; //segment:ovl_i6 +D_i6_8019DCAC = 0x8019DCAC; //segment:ovl_i6 +D_i6_8019DD24 = 0x8019DD24; //segment:ovl_i6 +D_i6_8019DD9C = 0x8019DD9C; //segment:ovl_i6 +D_i6_8019DDD8 = 0x8019DDD8; //segment:ovl_i6 +D_i6_8019DDE4 = 0x8019DDE4; //segment:ovl_i6 +D_i6_8019DDF0 = 0x8019DDF0; //segment:ovl_i6 +D_i6_8019DE08 = 0x8019DE08; //segment:ovl_i6 +D_i6_8019DE14 = 0x8019DE14; //segment:ovl_i6 +D_i6_8019DE30 = 0x8019DE30; //segment:ovl_i6 +D_i6_8019F1E0 = 0x8019F1E0; +D_i6_8019F1F0 = 0x8019F1F0; //segment:ovl_i6 +D_i6_8019F1F4 = 0x8019F1F4; //segment:ovl_i6 +D_i6_8019F1F8 = 0x8019F1F8; //segment:ovl_i6 +D_i6_8019F1FC = 0x8019F1FC; //segment:ovl_i6 +D_i6_8019F200 = 0x8019F200; //segment:ovl_i6 +D_i6_8019F204 = 0x8019F204; //segment:ovl_i6 +D_i6_8019F208 = 0x8019F208; //segment:ovl_i6 +D_i6_8019F20C = 0x8019F20C; //segment:ovl_i6 +D_i6_8019F210 = 0x8019F210; //segment:ovl_i6 +D_i6_8019F218 = 0x8019F218; //segment:ovl_i6 +D_i6_8019F220 = 0x8019F220; //segment:ovl_i6 +D_i6_8019F228 = 0x8019F228; //segment:ovl_i6 +D_i6_8019F214 = 0x8019F214; //segment:ovl_i6 +D_i6_8019F21C = 0x8019F21C; //segment:ovl_i6 +D_i6_8019F224 = 0x8019F224; //segment:ovl_i6 +D_i6_8019F22C = 0x8019F22C; //segment:ovl_i6 +D_i6_8019F230 = 0x8019F230; //segment:ovl_i6 +D_i6_8019F6E0 = 0x8019F6E0; //segment:ovl_i6 +D_i6_8019F6F0 = 0x8019F6F0; //segment:ovl_i6 + +func_menu_8017E7A0 = 0x8017E7A0; //segment:ovl_menu +func_menu_8017E860 = 0x8017E860; //segment:ovl_menu +func_menu_8017E9D4 = 0x8017E9D4; //segment:ovl_menu +func_menu_8017EA70 = 0x8017EA70; //segment:ovl_menu +func_menu_8017EB58 = 0x8017EB58; //segment:ovl_menu +func_menu_8017ED44 = 0x8017ED44; //segment:ovl_menu +func_menu_8017ED88 = 0x8017ED88; //segment:ovl_menu +func_menu_8017EF30 = 0x8017EF30; //segment:ovl_menu +func_menu_8017F0B0 = 0x8017F0B0; //segment:ovl_menu +func_menu_8017F298 = 0x8017F298; //segment:ovl_menu +func_menu_8017F484 = 0x8017F484; //segment:ovl_menu +func_menu_8017FB70 = 0x8017FB70; //segment:ovl_menu +func_menu_80180490 = 0x80180490; //segment:ovl_menu +func_menu_80180770 = 0x80180770; //segment:ovl_menu +func_menu_80180BD4 = 0x80180BD4; //segment:ovl_menu +func_menu_80181568 = 0x80181568; //segment:ovl_menu +func_menu_801815A8 = 0x801815A8; //segment:ovl_menu +func_menu_801818B4 = 0x801818B4; //segment:ovl_menu +func_menu_80181C00 = 0x80181C00; //segment:ovl_menu +func_menu_80181E30 = 0x80181E30; //segment:ovl_menu +func_menu_80181F5C = 0x80181F5C; //segment:ovl_menu +func_menu_801822A8 = 0x801822A8; //segment:ovl_menu +func_menu_801822C8 = 0x801822C8; //segment:ovl_menu +func_menu_80182834 = 0x80182834; //segment:ovl_menu +func_menu_80183384 = 0x80183384; //segment:ovl_menu +func_menu_80183430 = 0x80183430; //segment:ovl_menu +func_menu_801838B4 = 0x801838B4; //segment:ovl_menu +func_menu_80183E00 = 0x80183E00; //segment:ovl_menu +func_menu_80183EA0 = 0x80183EA0; //segment:ovl_menu +func_menu_8018400C = 0x8018400C; //segment:ovl_menu +func_menu_80184528 = 0x80184528; //segment:ovl_menu +func_menu_80184780 = 0x80184780; //segment:ovl_menu +func_menu_80184A7C = 0x80184A7C; //segment:ovl_menu +func_menu_80185028 = 0x80185028; //segment:ovl_menu +func_menu_8018517C = 0x8018517C; //segment:ovl_menu +func_menu_801852C8 = 0x801852C8; //segment:ovl_menu +func_menu_80185470 = 0x80185470; //segment:ovl_menu +func_menu_801858EC = 0x801858EC; //segment:ovl_menu +func_menu_80185CE8 = 0x80185CE8; //segment:ovl_menu +func_menu_80186038 = 0x80186038; //segment:ovl_menu +func_menu_801866A8 = 0x801866A8; //segment:ovl_menu +func_menu_801868F0 = 0x801868F0; //segment:ovl_menu +func_menu_801869E8 = 0x801869E8; //segment:ovl_menu +func_menu_80186AC8 = 0x80186AC8; //segment:ovl_menu +func_menu_80186BCC = 0x80186BCC; //segment:ovl_menu +func_menu_80186C60 = 0x80186C60; //segment:ovl_menu +func_menu_80186FAC = 0x80186FAC; //segment:ovl_menu +func_menu_801870A0 = 0x801870A0; //segment:ovl_menu +func_menu_8018730C = 0x8018730C; //segment:ovl_menu +func_menu_801874DC = 0x801874DC; //segment:ovl_menu +func_menu_80187750 = 0x80187750; //segment:ovl_menu +func_menu_80187A38 = 0x80187A38; //segment:ovl_menu +func_menu_80187CE8 = 0x80187CE8; //segment:ovl_menu +func_menu_80187E30 = 0x80187E30; //segment:ovl_menu +func_menu_80187EC8 = 0x80187EC8; //segment:ovl_menu +func_menu_80188034 = 0x80188034; //segment:ovl_menu +func_menu_801881FC = 0x801881FC; //segment:ovl_menu +func_menu_8018823C = 0x8018823C; //segment:ovl_menu +func_menu_80188368 = 0x80188368; //segment:ovl_menu +func_menu_801884B4 = 0x801884B4; //segment:ovl_menu +func_menu_80188638 = 0x80188638; //segment:ovl_menu +func_menu_801886B8 = 0x801886B8; //segment:ovl_menu +func_menu_80188844 = 0x80188844; //segment:ovl_menu +func_menu_80188A0C = 0x80188A0C; //segment:ovl_menu +func_menu_80188B30 = 0x80188B30; //segment:ovl_menu +func_menu_80188BDC = 0x80188BDC; //segment:ovl_menu +func_menu_80188C94 = 0x80188C94; //segment:ovl_menu +func_menu_80188D5C = 0x80188D5C; //segment:ovl_menu +func_menu_80188EB0 = 0x80188EB0; //segment:ovl_menu +func_menu_80189454 = 0x80189454; //segment:ovl_menu +func_menu_80189520 = 0x80189520; //segment:ovl_menu +func_menu_801896D0 = 0x801896D0; //segment:ovl_menu +func_menu_80189854 = 0x80189854; //segment:ovl_menu +func_menu_80189928 = 0x80189928; //segment:ovl_menu +func_menu_80189AD4 = 0x80189AD4; //segment:ovl_menu +func_menu_80189C64 = 0x80189C64; //segment:ovl_menu +func_menu_80189CE0 = 0x80189CE0; //segment:ovl_menu +func_menu_80189D98 = 0x80189D98; //segment:ovl_menu +func_menu_8018A100 = 0x8018A100; //segment:ovl_menu +func_menu_8018AC08 = 0x8018AC08; //segment:ovl_menu +func_menu_8018AEA8 = 0x8018AEA8; //segment:ovl_menu +func_menu_8018AFF0 = 0x8018AFF0; //segment:ovl_menu +func_menu_8018B868 = 0x8018B868; //segment:ovl_menu +func_menu_8018B9F0 = 0x8018B9F0; //segment:ovl_menu +func_menu_8018BC20 = 0x8018BC20; //segment:ovl_menu +func_menu_8018BE64 = 0x8018BE64; //segment:ovl_menu +func_menu_8018BF48 = 0x8018BF48; //segment:ovl_menu +func_menu_8018C05C = 0x8018C05C; //segment:ovl_menu +func_menu_8018C62C = 0x8018C62C; //segment:ovl_menu +func_menu_8018CC54 = 0x8018CC54; //segment:ovl_menu +func_menu_8018CCBC = 0x8018CCBC; //segment:ovl_menu +func_menu_8018CEEC = 0x8018CEEC; //segment:ovl_menu +func_menu_8018D5D8 = 0x8018D5D8; //segment:ovl_menu +func_menu_8018D61C = 0x8018D61C; //segment:ovl_menu +func_menu_8018DA14 = 0x8018DA14; //segment:ovl_menu +func_menu_8018DC0C = 0x8018DC0C; //segment:ovl_menu +func_menu_8018E1CC = 0x8018E1CC; //segment:ovl_menu +func_menu_8018E274 = 0x8018E274; //segment:ovl_menu +func_menu_8018E314 = 0x8018E314; //segment:ovl_menu +func_menu_8018E33C = 0x8018E33C; //segment:ovl_menu +func_menu_8018E3EC = 0x8018E3EC; //segment:ovl_menu +func_menu_8018E4D4 = 0x8018E4D4; //segment:ovl_menu +func_menu_8018E738 = 0x8018E738; //segment:ovl_menu +func_menu_8018E8A4 = 0x8018E8A4; //segment:ovl_menu +func_menu_8018EC8C = 0x8018EC8C; //segment:ovl_menu +func_menu_8018EDB4 = 0x8018EDB4; //segment:ovl_menu +func_menu_8018F0A8 = 0x8018F0A8; //segment:ovl_menu +func_menu_8018F15C = 0x8018F15C; //segment:ovl_menu +func_menu_8018F2EC = 0x8018F2EC; //segment:ovl_menu +func_menu_8018F4DC = 0x8018F4DC; //segment:ovl_menu +func_menu_8018F628 = 0x8018F628; //segment:ovl_menu +func_menu_8018F848 = 0x8018F848; //segment:ovl_menu +func_menu_8018F980 = 0x8018F980; //segment:ovl_menu +func_menu_8018FBA4 = 0x8018FBA4; //segment:ovl_menu +func_menu_8018FCD8 = 0x8018FCD8; //segment:ovl_menu +func_menu_80190504 = 0x80190504; //segment:ovl_menu +func_menu_801905F0 = 0x801905F0; //segment:ovl_menu +func_menu_80190630 = 0x80190630; //segment:ovl_menu +func_menu_80190790 = 0x80190790; //segment:ovl_menu +func_menu_80190808 = 0x80190808; //segment:ovl_menu +func_menu_80190AF8 = 0x80190AF8; //segment:ovl_menu +func_menu_80190B8C = 0x80190B8C; //segment:ovl_menu +func_menu_8019120C = 0x8019120C; //segment:ovl_menu +func_menu_8019130C = 0x8019130C; //segment:ovl_menu +func_menu_801913E4 = 0x801913E4; //segment:ovl_menu +func_menu_8019141C = 0x8019141C; //segment:ovl_menu +func_menu_80191488 = 0x80191488; //segment:ovl_menu +func_menu_8019150C = 0x8019150C; //segment:ovl_menu +func_menu_80191578 = 0x80191578; //segment:ovl_menu +func_menu_801915FC = 0x801915FC; //segment:ovl_menu +func_menu_80191644 = 0x80191644; //segment:ovl_menu +func_menu_80191840 = 0x80191840; //segment:ovl_menu +func_menu_80191A40 = 0x80191A40; //segment:ovl_menu +func_menu_80191CB8 = 0x80191CB8; //segment:ovl_menu +func_menu_80191E18 = 0x80191E18; //segment:ovl_menu +func_menu_80191E94 = 0x80191E94; //segment:ovl_menu +func_menu_801920E8 = 0x801920E8; //segment:ovl_menu +func_menu_8019236C = 0x8019236C; //segment:ovl_menu +func_menu_80192534 = 0x80192534; //segment:ovl_menu +func_menu_80192718 = 0x80192718; //segment:ovl_menu +func_menu_801928E8 = 0x801928E8; //segment:ovl_menu +func_menu_80192A14 = 0x80192A14; //segment:ovl_menu +func_menu_80192B10 = 0x80192B10; //segment:ovl_menu +func_menu_80192BDC = 0x80192BDC; //segment:ovl_menu +func_menu_80192C04 = 0x80192C04; //segment:ovl_menu +func_menu_80192CFC = 0x80192CFC; //segment:ovl_menu +func_menu_80192DF4 = 0x80192DF4; //segment:ovl_menu +func_menu_80192EE0 = 0x80192EE0; //segment:ovl_menu +func_menu_80192F80 = 0x80192F80; //segment:ovl_menu +func_menu_8019312C = 0x8019312C; //segment:ovl_menu +func_menu_801931B8 = 0x801931B8; //segment:ovl_menu +func_menu_80193270 = 0x80193270; //segment:ovl_menu +func_menu_80193388 = 0x80193388; //segment:ovl_menu +func_menu_8019345C = 0x8019345C; //segment:ovl_menu +func_menu_80193754 = 0x80193754; //segment:ovl_menu +func_menu_801938DC = 0x801938DC; //segment:ovl_menu +func_menu_801939A8 = 0x801939A8; //segment:ovl_menu +func_menu_80193B60 = 0x80193B60; //segment:ovl_menu +func_menu_80193C00 = 0x80193C00; //segment:ovl_menu +func_menu_80193E1C = 0x80193E1C; //segment:ovl_menu +func_menu_80193EFC = 0x80193EFC; //segment:ovl_menu +func_menu_80194090 = 0x80194090; //segment:ovl_menu +func_menu_80194454 = 0x80194454; //segment:ovl_menu +func_menu_80194960 = 0x80194960; //segment:ovl_menu +func_menu_80194E5C = 0x80194E5C; //segment:ovl_menu +func_menu_80195024 = 0x80195024; //segment:ovl_menu +func_menu_80195080 = 0x80195080; //segment:ovl_menu +func_menu_801951B0 = 0x801951B0; //segment:ovl_menu +func_menu_801952A0 = 0x801952A0; //segment:ovl_menu +func_menu_8019536C = 0x8019536C; //segment:ovl_menu +func_menu_801955C0 = 0x801955C0; //segment:ovl_menu +func_menu_80195BA4 = 0x80195BA4; //segment:ovl_menu +func_menu_80195C00 = 0x80195C00; //segment:ovl_menu +func_menu_80195C6C = 0x80195C6C; //segment:ovl_menu +func_menu_80195C80 = 0x80195C80; //segment:ovl_menu +func_menu_80195D4C = 0x80195D4C; //segment:ovl_menu +func_menu_80196518 = 0x80196518; //segment:ovl_menu +func_menu_801967E0 = 0x801967E0; //segment:ovl_menu +func_menu_801969B4 = 0x801969B4; //segment:ovl_menu +func_menu_80196BF0 = 0x80196BF0; //segment:ovl_menu +func_menu_80196CC4 = 0x80196CC4; //segment:ovl_menu +func_menu_80196D30 = 0x80196D30; //segment:ovl_menu +func_menu_80196DD0 = 0x80196DD0; //segment:ovl_menu +func_menu_80196FB8 = 0x80196FB8; //segment:ovl_menu +func_menu_801970D0 = 0x801970D0; //segment:ovl_menu +func_menu_801972FC = 0x801972FC; //segment:ovl_menu +func_menu_8019755C = 0x8019755C; //segment:ovl_menu +func_menu_80197974 = 0x80197974; //segment:ovl_menu +func_menu_80197B48 = 0x80197B48; //segment:ovl_menu +func_menu_80197BA8 = 0x80197BA8; //segment:ovl_menu +func_menu_80197D14 = 0x80197D14; //segment:ovl_menu +func_menu_801980E0 = 0x801980E0; //segment:ovl_menu +func_menu_80198558 = 0x80198558; //segment:ovl_menu +func_menu_80198914 = 0x80198914; //segment:ovl_menu +func_menu_80198D94 = 0x80198D94; //segment:ovl_menu +func_menu_80198ED4 = 0x80198ED4; //segment:ovl_menu +func_menu_80199000 = 0x80199000; //segment:ovl_menu +func_menu_801995E4 = 0x801995E4; //segment:ovl_menu +func_menu_801998A8 = 0x801998A8; //segment:ovl_menu +func_menu_80199954 = 0x80199954; //segment:ovl_menu +func_menu_80199AFC = 0x80199AFC; //segment:ovl_menu +func_menu_80199E6C = 0x80199E6C; //segment:ovl_menu +func_menu_8019A198 = 0x8019A198; //segment:ovl_menu +func_menu_8019A720 = 0x8019A720; //segment:ovl_menu +func_menu_8019A830 = 0x8019A830; //segment:ovl_menu +func_menu_8019A988 = 0x8019A988; //segment:ovl_menu +func_menu_8019ACE0 = 0x8019ACE0; //segment:ovl_menu +func_menu_8019B674 = 0x8019B674; //segment:ovl_menu +func_menu_8019B930 = 0x8019B930; //segment:ovl_menu +func_menu_8019BBA0 = 0x8019BBA0; //segment:ovl_menu +func_menu_8019BD18 = 0x8019BD18; //segment:ovl_menu +func_menu_8019BDC8 = 0x8019BDC8; //segment:ovl_menu +func_menu_8019BFEC = 0x8019BFEC; //segment:ovl_menu +func_menu_8019C05C = 0x8019C05C; //segment:ovl_menu +func_menu_8019C26C = 0x8019C26C; //segment:ovl_menu +func_menu_8019C2A4 = 0x8019C2A4; //segment:ovl_menu +func_menu_8019C6A8 = 0x8019C6A8; //segment:ovl_menu +func_menu_8019CA50 = 0x8019CA50; //segment:ovl_menu +func_menu_8019CB14 = 0x8019CB14; //segment:ovl_menu +func_menu_8019CF58 = 0x8019CF58; //segment:ovl_menu +func_menu_8019D148 = 0x8019D148; //segment:ovl_menu +func_menu_8019D484 = 0x8019D484; //segment:ovl_menu +func_menu_8019D5CC = 0x8019D5CC; //segment:ovl_menu +func_menu_8019D638 = 0x8019D638; //segment:ovl_menu +func_menu_8019D750 = 0x8019D750; //segment:ovl_menu +func_menu_8019D82C = 0x8019D82C; //segment:ovl_menu +func_menu_8019D86C = 0x8019D86C; //segment:ovl_menu +func_menu_8019D8F8 = 0x8019D8F8; //segment:ovl_menu +func_menu_8019D964 = 0x8019D964; //segment:ovl_menu +func_menu_8019DBB4 = 0x8019DBB4; //segment:ovl_menu +func_menu_8019DCF4 = 0x8019DCF4; //segment:ovl_menu +func_menu_8019DD68 = 0x8019DD68; //segment:ovl_menu +func_menu_8019E07C = 0x8019E07C; //segment:ovl_menu +func_menu_8019E190 = 0x8019E190; //segment:ovl_menu +func_menu_8019E500 = 0x8019E500; //segment:ovl_menu +func_menu_8019E7C4 = 0x8019E7C4; //segment:ovl_menu +func_menu_8019E954 = 0x8019E954; //segment:ovl_menu +func_menu_8019EA80 = 0x8019EA80; //segment:ovl_menu +func_menu_8019EBEC = 0x8019EBEC; //segment:ovl_menu +func_menu_8019ED54 = 0x8019ED54; //segment:ovl_menu +func_menu_8019EEBC = 0x8019EEBC; //segment:ovl_menu +func_menu_8019F00C = 0x8019F00C; //segment:ovl_menu +func_menu_8019F1EC = 0x8019F1EC; //segment:ovl_menu +func_menu_8019F36C = 0x8019F36C; //segment:ovl_menu +func_menu_8019FA08 = 0x8019FA08; //segment:ovl_menu +func_menu_8019FC8C = 0x8019FC8C; //segment:ovl_menu +func_menu_801A0210 = 0x801A0210; //segment:ovl_menu +func_menu_801A041C = 0x801A041C; //segment:ovl_menu +func_menu_801A04F4 = 0x801A04F4; //segment:ovl_menu +func_menu_801A0718 = 0x801A0718; //segment:ovl_menu +func_menu_801A0AE4 = 0x801A0AE4; //segment:ovl_menu +func_menu_801A0BE0 = 0x801A0BE0; //segment:ovl_menu +func_menu_801A0D5C = 0x801A0D5C; //segment:ovl_menu +func_menu_801A10B0 = 0x801A10B0; //segment:ovl_menu +func_menu_801A11AC = 0x801A11AC; //segment:ovl_menu +func_menu_801A129C = 0x801A129C; //segment:ovl_menu +func_menu_801A1494 = 0x801A1494; //segment:ovl_menu +func_menu_801A16FC = 0x801A16FC; //segment:ovl_menu +func_menu_801A1A28 = 0x801A1A28; //segment:ovl_menu +func_menu_801A242C = 0x801A242C; //segment:ovl_menu +func_menu_801A2534 = 0x801A2534; //segment:ovl_menu +func_menu_801A2578 = 0x801A2578; //segment:ovl_menu +func_menu_801A25F4 = 0x801A25F4; //segment:ovl_menu +func_menu_801A2C10 = 0x801A2C10; //segment:ovl_menu +func_menu_801A2F74 = 0x801A2F74; //segment:ovl_menu +func_menu_801A31B4 = 0x801A31B4; //segment:ovl_menu +func_menu_801A3498 = 0x801A3498; //segment:ovl_menu +func_menu_801A37C8 = 0x801A37C8; //segment:ovl_menu +func_menu_801A3AA4 = 0x801A3AA4; //segment:ovl_menu +func_menu_801A3C38 = 0x801A3C38; //segment:ovl_menu +func_menu_801A4028 = 0x801A4028; //segment:ovl_menu +func_menu_801A42E0 = 0x801A42E0; //segment:ovl_menu +func_menu_801A43B4 = 0x801A43B4; //segment:ovl_menu +func_menu_801A49B0 = 0x801A49B0; //segment:ovl_menu +func_menu_801A4A84 = 0x801A4A84; //segment:ovl_menu +func_menu_801A4C84 = 0x801A4C84; //segment:ovl_menu +D_menu_801A4E80 = 0x801A4E80; //segment:ovl_menu +D_menu_801A4E90 = 0x801A4E90; //segment:ovl_menu +D_menu_801A4E94 = 0x801A4E94; //segment:ovl_menu +D_menu_801A4E98 = 0x801A4E98; //segment:ovl_menu +D_menu_801A4EC0 = 0x801A4EC0; //segment:ovl_menu +D_menu_801A4ED4 = 0x801A4ED4; //segment:ovl_menu +D_menu_801A4EF4 = 0x801A4EF4; //segment:ovl_menu +D_menu_801A4F04 = 0x801A4F04; //segment:ovl_menu +D_menu_801A4F14 = 0x801A4F14; //segment:ovl_menu +D_menu_801A4F24 = 0x801A4F24; //segment:ovl_menu +D_menu_801A53D4 = 0x801A53D4; //segment:ovl_menu +D_menu_801A53E4 = 0x801A53E4; //segment:ovl_menu +D_menu_801A5414 = 0x801A5414; //segment:ovl_menu +D_menu_801A58C4 = 0x801A58C4; //segment:ovl_menu +D_menu_801A58D4 = 0x801A58D4; //segment:ovl_menu +D_menu_801A58E4 = 0x801A58E4; //segment:ovl_menu +D_menu_801A58F4 = 0x801A58F4; //segment:ovl_menu +D_menu_801A58F8 = 0x801A58F8; //segment:ovl_menu +D_menu_801A58FC = 0x801A58FC; //segment:ovl_menu +D_menu_801A5900 = 0x801A5900; //segment:ovl_menu +D_menu_801A5904 = 0x801A5904; //segment:ovl_menu +D_menu_801A5908 = 0x801A5908; //segment:ovl_menu +D_menu_801A590C = 0x801A590C; //segment:ovl_menu +D_menu_801A591C = 0x801A591C; //segment:ovl_menu +D_menu_801A592C = 0x801A592C; //segment:ovl_menu +D_menu_801A5944 = 0x801A5944; //segment:ovl_menu +D_menu_801A594C = 0x801A594C; //segment:ovl_menu +D_menu_801A595C = 0x801A595C; //segment:ovl_menu +D_menu_801A597C = 0x801A597C; //segment:ovl_menu +D_menu_801A598C = 0x801A598C; //segment:ovl_menu +D_menu_801A59AC = 0x801A59AC; //segment:ovl_menu +D_menu_801A59B0 = 0x801A59B0; //segment:ovl_menu +D_menu_801A59B8 = 0x801A59B8; //segment:ovl_menu +D_menu_801A59C8 = 0x801A59C8; //segment:ovl_menu +D_menu_801A59E8 = 0x801A59E8; //segment:ovl_menu +D_menu_801A59EC = 0x801A59EC; //segment:ovl_menu +D_menu_801A59F0 = 0x801A59F0; //segment:ovl_menu +D_menu_801A59F4 = 0x801A59F4; //segment:ovl_menu +D_menu_801A59F8 = 0x801A59F8; //segment:ovl_menu +D_menu_801A5A00 = 0x801A5A00; //segment:ovl_menu +D_menu_801A5A04 = 0x801A5A04; //segment:ovl_menu +D_menu_801A5A18 = 0x801A5A18; //segment:ovl_menu +D_menu_801A5A1C = 0x801A5A1C; //segment:ovl_menu +D_menu_801A5A30 = 0x801A5A30; //segment:ovl_menu +D_menu_801A5A34 = 0x801A5A34; //segment:ovl_menu +D_menu_801A5A48 = 0x801A5A48; //segment:ovl_menu +D_menu_801A5A4C = 0x801A5A4C; //segment:ovl_menu +D_menu_801A5A54 = 0x801A5A54; //segment:ovl_menu +D_menu_801A5A60 = 0x801A5A60; //segment:ovl_menu +D_menu_801A5A64 = 0x801A5A64; //segment:ovl_menu +D_menu_801A5A78 = 0x801A5A78; //segment:ovl_menu +D_menu_801A5A80 = 0x801A5A80; //segment:ovl_menu +D_menu_801A5A88 = 0x801A5A88; //segment:ovl_menu +D_menu_801A5A90 = 0x801A5A90; //segment:ovl_menu +D_menu_801A5AA8 = 0x801A5AA8; //segment:ovl_menu +D_menu_801A5AC0 = 0x801A5AC0; //segment:ovl_menu +D_menu_801A5AD8 = 0x801A5AD8; //segment:ovl_menu +D_menu_801A5ADC = 0x801A5ADC; //segment:ovl_menu +D_menu_801A5AE0 = 0x801A5AE0; //segment:ovl_menu +D_menu_801A5AE4 = 0x801A5AE4; //segment:ovl_menu +D_menu_801A5AFC = 0x801A5AFC; //segment:ovl_menu +D_menu_801A5B00 = 0x801A5B00; //segment:ovl_menu +D_menu_801A5B04 = 0x801A5B04; //segment:ovl_menu +D_menu_801A5B08 = 0x801A5B08; //segment:ovl_menu +D_menu_801A5B18 = 0x801A5B18; //segment:ovl_menu +D_menu_801A5B1C = 0x801A5B1C; //segment:ovl_menu +D_menu_801A5B38 = 0x801A5B38; //segment:ovl_menu +D_menu_801A5B3C = 0x801A5B3C; //segment:ovl_menu +D_menu_801A5B40 = 0x801A5B40; //segment:ovl_menu +D_menu_801A5B44 = 0x801A5B44; //segment:ovl_menu +D_menu_801A5B5C = 0x801A5B5C; //segment:ovl_menu +D_menu_801A5B60 = 0x801A5B60; //segment:ovl_menu +D_menu_801A5B64 = 0x801A5B64; //segment:ovl_menu +D_menu_801A5B68 = 0x801A5B68; //segment:ovl_menu +D_menu_801A5B78 = 0x801A5B78; //segment:ovl_menu +D_menu_801A5B7C = 0x801A5B7C; //segment:ovl_menu +D_menu_801A5BE0 = 0x801A5BE0; //segment:ovl_menu +D_menu_801A5C18 = 0x801A5C18; //segment:ovl_menu +D_menu_801A5C40 = 0x801A5C40; //segment:ovl_menu +D_menu_801A5D00 = 0x801A5D00; //segment:ovl_menu +D_menu_801A5D18 = 0x801A5D18; //segment:ovl_menu +D_menu_801A5D1C = 0x801A5D1C; //segment:ovl_menu +D_menu_801A5D3C = 0x801A5D3C; //segment:ovl_menu +D_menu_801A5E20 = 0x801A5E20; //segment:ovl_menu +D_menu_801A5E23 = 0x801A5E23; //segment:ovl_menu +D_menu_801A5E28 = 0x801A5E28; //segment:ovl_menu +D_menu_801A5E2C = 0x801A5E2C; //segment:ovl_menu +D_menu_801A5E30 = 0x801A5E30; //segment:ovl_menu +D_menu_801A5E34 = 0x801A5E34; //segment:ovl_menu +D_menu_801A5E38 = 0x801A5E38; //segment:ovl_menu +D_menu_801A5E3C = 0x801A5E3C; //segment:ovl_menu +D_menu_801A5E40 = 0x801A5E40; //segment:ovl_menu +D_menu_801A5E44 = 0x801A5E44; //segment:ovl_menu +D_menu_801A5E48 = 0x801A5E48; //segment:ovl_menu +D_menu_801A5E60 = 0x801A5E60; //segment:ovl_menu +D_menu_801A5E64 = 0x801A5E64; //segment:ovl_menu +D_menu_801A5E68 = 0x801A5E68; //segment:ovl_menu +D_menu_801A5E6C = 0x801A5E6C; //segment:ovl_menu +D_menu_801A5E98 = 0x801A5E98; //segment:ovl_menu +D_menu_801A5E9C = 0x801A5E9C; //segment:ovl_menu +D_menu_801A5EA0 = 0x801A5EA0; //segment:ovl_menu +D_menu_801A5EA4 = 0x801A5EA4; //segment:ovl_menu +D_menu_801A5EB8 = 0x801A5EB8; //segment:ovl_menu +D_menu_801A5ED0 = 0x801A5ED0; //segment:ovl_menu +D_menu_801A5ED4 = 0x801A5ED4; //segment:ovl_menu +D_menu_801A5ED8 = 0x801A5ED8; //segment:ovl_menu +D_menu_801A5EDC = 0x801A5EDC; //segment:ovl_menu +D_menu_801A5F08 = 0x801A5F08; //segment:ovl_menu +D_menu_801A5F0C = 0x801A5F0C; //segment:ovl_menu +D_menu_801A5F10 = 0x801A5F10; //segment:ovl_menu +D_menu_801A5F14 = 0x801A5F14; //segment:ovl_menu +D_menu_801A5F28 = 0x801A5F28; //segment:ovl_menu +D_menu_801A5FB0 = 0x801A5FB0; //segment:ovl_menu +D_menu_801A5FD0 = 0x801A5FD0; //segment:ovl_menu +D_menu_801A6078 = 0x801A6078; //segment:ovl_menu +D_menu_801A60B8 = 0x801A60B8; //segment:ovl_menu +D_menu_801A60D0 = 0x801A60D0; //segment:ovl_menu +D_menu_801A6110 = 0x801A6110; //segment:ovl_menu +D_menu_801A6128 = 0x801A6128; //segment:ovl_menu +D_menu_801A6168 = 0x801A6168; //segment:ovl_menu +D_menu_801A6180 = 0x801A6180; //segment:ovl_menu +D_menu_801A6184 = 0x801A6184; //segment:ovl_menu +D_menu_801A61A8 = 0x801A61A8; //segment:ovl_menu +D_menu_801A61AC = 0x801A61AC; //segment:ovl_menu +D_menu_801A61C4 = 0x801A61C4; //segment:ovl_menu +D_menu_801A61D4 = 0x801A61D4; //segment:ovl_menu +D_menu_801A62F4 = 0x801A62F4; //segment:ovl_menu +D_menu_801A6310 = 0x801A6310; //segment:ovl_menu +D_menu_801A6320 = 0x801A6320; //segment:ovl_menu +D_menu_801A6330 = 0x801A6330; //segment:ovl_menu +D_menu_801A6334 = 0x801A6334; //segment:ovl_menu +D_menu_801A6378 = 0x801A6378; //segment:ovl_menu +D_menu_801A63B8 = 0x801A63B8; //segment:ovl_menu +D_menu_801A63E4 = 0x801A63E4; //segment:ovl_menu +D_menu_801A640C = 0x801A640C; //segment:ovl_menu +D_menu_801A6418 = 0x801A6418; //segment:ovl_menu +D_menu_801A6424 = 0x801A6424; //segment:ovl_menu +D_menu_801A6430 = 0x801A6430; //segment:ovl_menu +D_menu_801A645C = 0x801A645C; //segment:ovl_menu +D_menu_801A6488 = 0x801A6488; //segment:ovl_menu +D_menu_801A648C = 0x801A648C; //segment:ovl_menu +D_menu_801A6490 = 0x801A6490; //segment:ovl_menu +D_menu_801A6494 = 0x801A6494; //segment:ovl_menu +D_menu_801A6498 = 0x801A6498; //segment:ovl_menu +D_menu_801A649C = 0x801A649C; //segment:ovl_menu +D_menu_801A64AC = 0x801A64AC; //segment:ovl_menu +D_menu_801A64BC = 0x801A64BC; //segment:ovl_menu +D_menu_801A64CC = 0x801A64CC; //segment:ovl_menu +D_menu_801A64DC = 0x801A64DC; //segment:ovl_menu +D_menu_801A64E0 = 0x801A64E0; //segment:ovl_menu +D_menu_801A64E4 = 0x801A64E4; //segment:ovl_menu +D_menu_801A64E8 = 0x801A64E8; //segment:ovl_menu +D_menu_801A64EC = 0x801A64EC; //segment:ovl_menu +D_menu_801A64F0 = 0x801A64F0; //segment:ovl_menu +D_menu_801A64F4 = 0x801A64F4; //segment:ovl_menu +D_menu_801A6500 = 0x801A6500; //segment:ovl_menu +D_menu_801A650C = 0x801A650C; //segment:ovl_menu +D_menu_801A6514 = 0x801A6514; //segment:ovl_menu +D_menu_801A651C = 0x801A651C; //segment:ovl_menu +D_menu_801A653C = 0x801A653C; //segment:ovl_menu +D_menu_801A655C = 0x801A655C; //segment:ovl_menu +D_menu_801A6568 = 0x801A6568; //segment:ovl_menu +D_menu_801A6574 = 0x801A6574; //segment:ovl_menu +D_menu_801A6580 = 0x801A6580; //segment:ovl_menu +D_menu_801A658C = 0x801A658C; //segment:ovl_menu +D_menu_801A6590 = 0x801A6590; //segment:ovl_menu +D_menu_801A6598 = 0x801A6598; //segment:ovl_menu +D_menu_801A65B0 = 0x801A65B0; //segment:ovl_menu +D_menu_801A65C8 = 0x801A65C8; //segment:ovl_menu +D_menu_801A65CC = 0x801A65CC; //segment:ovl_menu +D_menu_801A65D0 = 0x801A65D0; //segment:ovl_menu +D_menu_801A65D4 = 0x801A65D4; //segment:ovl_menu +D_menu_801A65D8 = 0x801A65D8; //segment:ovl_menu +D_menu_801A65DC = 0x801A65DC; //segment:ovl_menu +D_menu_801A65E0 = 0x801A65E0; //segment:ovl_menu +D_menu_801A65F0 = 0x801A65F0; //segment:ovl_menu +D_menu_801A6600 = 0x801A6600; //segment:ovl_menu +D_menu_801A6610 = 0x801A6610; //segment:ovl_menu +D_menu_801A6620 = 0x801A6620; //segment:ovl_menu +D_menu_801A6624 = 0x801A6624; //segment:ovl_menu +D_menu_801A6634 = 0x801A6634; //segment:ovl_menu +D_menu_801A6638 = 0x801A6638; //segment:ovl_menu +D_menu_801A663C = 0x801A663C; //segment:ovl_menu +D_menu_801A6640 = 0x801A6640; //segment:ovl_menu +D_menu_801A6644 = 0x801A6644; //segment:ovl_menu +D_menu_801A6648 = 0x801A6648; //segment:ovl_menu +D_menu_801A664C = 0x801A664C; //segment:ovl_menu +D_menu_801A6650 = 0x801A6650; //segment:ovl_menu +D_menu_801A6654 = 0x801A6654; //segment:ovl_menu +D_menu_801A6658 = 0x801A6658; //segment:ovl_menu +D_menu_801A665C = 0x801A665C; //segment:ovl_menu +D_menu_801A6660 = 0x801A6660; //segment:ovl_menu +D_menu_801A6664 = 0x801A6664; //segment:ovl_menu +D_menu_801A6668 = 0x801A6668; //segment:ovl_menu +D_menu_801A6674 = 0x801A6674; //segment:ovl_menu +D_menu_801A6684 = 0x801A6684; //segment:ovl_menu +D_menu_801A6694 = 0x801A6694; //segment:ovl_menu +D_menu_801A66A4 = 0x801A66A4; //segment:ovl_menu +D_menu_801A66B4 = 0x801A66B4; //segment:ovl_menu +D_menu_801A66C4 = 0x801A66C4; //segment:ovl_menu +D_menu_801A66D4 = 0x801A66D4; //segment:ovl_menu +D_menu_801A66E4 = 0x801A66E4; //segment:ovl_menu +D_menu_801A66E8 = 0x801A66E8; //segment:ovl_menu +D_menu_801A66FC = 0x801A66FC; //segment:ovl_menu +D_menu_801A6700 = 0x801A6700; //segment:ovl_menu +D_menu_801A6714 = 0x801A6714; //segment:ovl_menu +D_menu_801A6728 = 0x801A6728; //segment:ovl_menu +D_menu_801A672C = 0x801A672C; //segment:ovl_menu +D_menu_801A6730 = 0x801A6730; //segment:ovl_menu +D_menu_801A6734 = 0x801A6734; //segment:ovl_menu +D_menu_801A6738 = 0x801A6738; //segment:ovl_menu +D_menu_801A673C = 0x801A673C; //segment:ovl_menu +D_menu_801A6744 = 0x801A6744; //segment:ovl_menu +D_menu_801A674C = 0x801A674C; //segment:ovl_menu +D_menu_801A6754 = 0x801A6754; //segment:ovl_menu +D_menu_801A675C = 0x801A675C; //segment:ovl_menu +D_menu_801A6760 = 0x801A6760; //segment:ovl_menu +D_menu_801A6764 = 0x801A6764; //segment:ovl_menu +D_menu_801A6768 = 0x801A6768; //segment:ovl_menu +D_menu_801A6770 = 0x801A6770; //segment:ovl_menu +D_menu_801A6778 = 0x801A6778; //segment:ovl_menu +D_menu_801A6780 = 0x801A6780; //segment:ovl_menu +D_menu_801A6788 = 0x801A6788; //segment:ovl_menu +D_menu_801A6794 = 0x801A6794; //segment:ovl_menu +D_menu_801A67AC = 0x801A67AC; //segment:ovl_menu +D_menu_801A67C4 = 0x801A67C4; //segment:ovl_menu +D_menu_801A6858 = 0x801A6858; //segment:ovl_menu +D_menu_801A6878 = 0x801A6878; //segment:ovl_menu +D_menu_801A68A0 = 0x801A68A0; //segment:ovl_menu +D_menu_801A68A8 = 0x801A68A8; //segment:ovl_menu +D_menu_801A6920 = 0x801A6920; //segment:ovl_menu +D_menu_801A6944 = 0x801A6944; //segment:ovl_menu +D_menu_801A694C = 0x801A694C; //segment:ovl_menu +D_menu_801A6950 = 0x801A6950; //segment:ovl_menu +D_menu_801A6954 = 0x801A6954; //segment:ovl_menu +D_menu_801A6958 = 0x801A6958; //segment:ovl_menu +D_menu_801A697C = 0x801A697C; //segment:ovl_menu +D_menu_801A6990 = 0x801A6990; //segment:ovl_menu +D_menu_801A69B4 = 0x801A69B4; //segment:ovl_menu +D_menu_801A69C8 = 0x801A69C8; //segment:ovl_menu +D_menu_801A6A00 = 0x801A6A00; //segment:ovl_menu +D_menu_801A6A38 = 0x801A6A38; //segment:ovl_menu +D_menu_801A6AA8 = 0x801A6AA8; //segment:ovl_menu +D_menu_801A6B88 = 0x801A6B88; //segment:ovl_menu +D_menu_801A6BF8 = 0x801A6BF8; //segment:ovl_menu +D_menu_801A6C1C = 0x801A6C1C; //segment:ovl_menu +D_menu_801A6C68 = 0x801A6C68; //segment:ovl_menu +D_menu_801A6CA4 = 0x801A6CA4; //segment:ovl_menu +D_menu_801A6CB4 = 0x801A6CB4; //segment:ovl_menu +D_menu_801A6D94 = 0x801A6D94; //segment:ovl_menu +D_menu_801A6E74 = 0x801A6E74; //segment:ovl_menu +D_menu_801A6EB0 = 0x801A6EB0; //segment:ovl_menu +D_menu_801A6EB8 = 0x801A6EB8; //segment:ovl_menu +D_menu_801A7158 = 0x801A7158; //segment:ovl_menu +D_menu_801A7198 = 0x801A7198; //segment:ovl_menu +D_menu_801A71AC = 0x801A71AC; //segment:ovl_menu +D_menu_801A71B0 = 0x801A71B0; //segment:ovl_menu +D_menu_801A7438 = 0x801A7438; //segment:ovl_menu +D_menu_801A7474 = 0x801A7474; //segment:ovl_menu +D_menu_801A7478 = 0x801A7478; //segment:ovl_menu +D_menu_801A747C = 0x801A747C; //segment:ovl_menu +D_menu_801A7480 = 0x801A7480; //segment:ovl_menu +D_menu_801A7484 = 0x801A7484; //segment:ovl_menu +D_menu_801A7540 = 0x801A7540; //segment:ovl_menu +D_menu_801ABBC0 = 0x801ABBC0; //segment:ovl_menu +D_menu_801ABCC0 = 0x801ABCC0; //segment:ovl_menu +D_menu_801ABDC0 = 0x801ABDC0; //segment:ovl_menu +D_menu_801ABEC0 = 0x801ABEC0; //segment:ovl_menu +D_menu_801AC1F0 = 0x801AC1F0; //segment:ovl_menu +D_menu_801AC558 = 0x801AC558; //segment:ovl_menu +D_menu_801AC8C0 = 0x801AC8C0; //segment:ovl_menu +D_menu_801ACC28 = 0x801ACC28; //segment:ovl_menu +D_menu_801ACF90 = 0x801ACF90; //segment:ovl_menu +D_menu_801AD2F8 = 0x801AD2F8; //segment:ovl_menu +D_menu_801AD660 = 0x801AD660; //segment:ovl_menu +D_menu_801AD9C8 = 0x801AD9C8; //segment:ovl_menu +D_menu_801ADD30 = 0x801ADD30; //segment:ovl_menu +D_menu_801ADD34 = 0x801ADD34; //segment:ovl_menu +D_menu_801ADD50 = 0x801ADD50; //segment:ovl_menu +D_menu_801ADD54 = 0x801ADD54; //segment:ovl_menu +D_menu_801ADD58 = 0x801ADD58; //segment:ovl_menu +D_menu_801ADD74 = 0x801ADD74; //segment:ovl_menu +D_menu_801ADD78 = 0x801ADD78; //segment:ovl_menu +D_menu_801ADDB4 = 0x801ADDB4; //segment:ovl_menu +D_menu_801ADDCC = 0x801ADDCC; //segment:ovl_menu +D_menu_801ADDD0 = 0x801ADDD0; //segment:ovl_menu +D_menu_801ADDD4 = 0x801ADDD4; //segment:ovl_menu +D_menu_801ADDF0 = 0x801ADDF0; //segment:ovl_menu +D_menu_801ADDF4 = 0x801ADDF4; //segment:ovl_menu +D_menu_801ADE14 = 0x801ADE14; //segment:ovl_menu +D_menu_801ADE34 = 0x801ADE34; //segment:ovl_menu +D_menu_801ADE54 = 0x801ADE54; //segment:ovl_menu +D_menu_801ADE74 = 0x801ADE74; //segment:ovl_menu +D_menu_801ADE94 = 0x801ADE94; //segment:ovl_menu +D_menu_801ADEB4 = 0x801ADEB4; //segment:ovl_menu +D_menu_801ADEB8 = 0x801ADEB8; //segment:ovl_menu +D_menu_801ADEBC = 0x801ADEBC; //segment:ovl_menu +D_menu_801ADEC0 = 0x801ADEC0; //segment:ovl_menu +D_menu_801ADEC4 = 0x801ADEC4; //segment:ovl_menu +D_menu_801ADEC8 = 0x801ADEC8; //segment:ovl_menu +D_menu_801ADECC = 0x801ADECC; //segment:ovl_menu +D_menu_801ADEEC = 0x801ADEEC; //segment:ovl_menu +D_menu_801ADEF4 = 0x801ADEF4; //segment:ovl_menu +D_menu_801ADEF8 = 0x801ADEF8; //segment:ovl_menu +D_menu_801ADEFC = 0x801ADEFC; //segment:ovl_menu +D_menu_801ADF00 = 0x801ADF00; //segment:ovl_menu +D_menu_801ADF04 = 0x801ADF04; //segment:ovl_menu +D_menu_801ADF40 = 0x801ADF40; //segment:ovl_menu +D_menu_801ADF4C = 0x801ADF4C; //segment:ovl_menu +D_menu_801ADF58 = 0x801ADF58; //segment:ovl_menu +D_menu_801ADF64 = 0x801ADF64; //segment:ovl_menu +D_menu_801ADF70 = 0x801ADF70; //segment:ovl_menu +D_menu_801ADF74 = 0x801ADF74; //segment:ovl_menu +D_menu_801ADF78 = 0x801ADF78; //segment:ovl_menu +D_menu_801ADF7C = 0x801ADF7C; //segment:ovl_menu +D_menu_801ADF88 = 0x801ADF88; //segment:ovl_menu +D_menu_801ADF94 = 0x801ADF94; //segment:ovl_menu +D_menu_801ADFA0 = 0x801ADFA0; //segment:ovl_menu +D_menu_801ADFA4 = 0x801ADFA4; //segment:ovl_menu +D_menu_801ADFD0 = 0x801ADFD0; //segment:ovl_menu +D_menu_801AE0F0 = 0x801AE0F0; //segment:ovl_menu +D_menu_801AF0B0 = 0x801AF0B0; +D_menu_801AF0C0 = 0x801AF0C0; //segment:ovl_menu +D_menu_801AF0C4 = 0x801AF0C4; //segment:ovl_menu +D_menu_801AF0C8 = 0x801AF0C8; //segment:ovl_menu +D_menu_801AF0CC = 0x801AF0CC; //segment:ovl_menu +D_menu_801AF0D0 = 0x801AF0D0; //segment:ovl_menu +D_menu_801AF0D4 = 0x801AF0D4; //segment:ovl_menu +D_menu_801AF0D8 = 0x801AF0D8; //segment:ovl_menu +D_menu_801AF0DC = 0x801AF0DC; //segment:ovl_menu +D_menu_801AF0E0 = 0x801AF0E0; //segment:ovl_menu +D_menu_801AF0E4 = 0x801AF0E4; //segment:ovl_menu +D_menu_801AF0E8 = 0x801AF0E8; //segment:ovl_menu +D_menu_801AF0EC = 0x801AF0EC; //segment:ovl_menu +D_menu_801AF0F0 = 0x801AF0F0; //segment:ovl_menu +D_menu_801AF0F4 = 0x801AF0F4; //segment:ovl_menu +D_menu_801AF0F8 = 0x801AF0F8; //segment:ovl_menu +D_menu_801AF0FC = 0x801AF0FC; //segment:ovl_menu +D_menu_801AF100 = 0x801AF100; //segment:ovl_menu +D_menu_801AF104 = 0x801AF104; //segment:ovl_menu +D_menu_801AF108 = 0x801AF108; //segment:ovl_menu +D_menu_801AF10C = 0x801AF10C; //segment:ovl_menu +D_menu_801AF110 = 0x801AF110; //segment:ovl_menu +D_menu_801AF114 = 0x801AF114; //segment:ovl_menu +D_menu_801AF118 = 0x801AF118; //segment:ovl_menu +D_menu_801AF11C = 0x801AF11C; //segment:ovl_menu +D_menu_801AF120 = 0x801AF120; //segment:ovl_menu +D_menu_801AF124 = 0x801AF124; //segment:ovl_menu +D_menu_801AF128 = 0x801AF128; //segment:ovl_menu +D_menu_801AF12C = 0x801AF12C; //segment:ovl_menu +D_menu_801AF130 = 0x801AF130; //segment:ovl_menu +D_menu_801AF134 = 0x801AF134; //segment:ovl_menu +D_menu_801AF138 = 0x801AF138; //segment:ovl_menu +D_menu_801AF13C = 0x801AF13C; //segment:ovl_menu +D_menu_801AF140 = 0x801AF140; //segment:ovl_menu +D_menu_801AF144 = 0x801AF144; //segment:ovl_menu +D_menu_801AF148 = 0x801AF148; //segment:ovl_menu +D_menu_801AF14C = 0x801AF14C; //segment:ovl_menu +D_menu_801AF150 = 0x801AF150; //segment:ovl_menu +D_menu_801AF154 = 0x801AF154; //segment:ovl_menu +D_menu_801AF158 = 0x801AF158; //segment:ovl_menu +D_menu_801AF15C = 0x801AF15C; //segment:ovl_menu +D_menu_801AF160 = 0x801AF160; //segment:ovl_menu +D_menu_801AF164 = 0x801AF164; //segment:ovl_menu +D_menu_801AF168 = 0x801AF168; //segment:ovl_menu +D_menu_801AF16C = 0x801AF16C; //segment:ovl_menu +D_menu_801AF170 = 0x801AF170; //segment:ovl_menu +D_menu_801AF174 = 0x801AF174; //segment:ovl_menu +D_menu_801AF178 = 0x801AF178; //segment:ovl_menu +D_menu_801AF17C = 0x801AF17C; //segment:ovl_menu +D_menu_801AF180 = 0x801AF180; //segment:ovl_menu +D_menu_801AF1A8 = 0x801AF1A8; //segment:ovl_menu +D_menu_801AF1AC = 0x801AF1AC; //segment:ovl_menu +D_menu_801AF1B0 = 0x801AF1B0; //segment:ovl_menu +D_menu_801AF1B4 = 0x801AF1B4; //segment:ovl_menu +D_menu_801AF1B8 = 0x801AF1B8; //segment:ovl_menu +D_menu_801AF1BC = 0x801AF1BC; //segment:ovl_menu +D_menu_801AF1C0 = 0x801AF1C0; //segment:ovl_menu +D_menu_801AF1C4 = 0x801AF1C4; //segment:ovl_menu +D_menu_801AF1C8 = 0x801AF1C8; //segment:ovl_menu +D_menu_801AF1CC = 0x801AF1CC; //segment:ovl_menu +D_menu_801AF1D0 = 0x801AF1D0; //segment:ovl_menu +D_menu_801AF1D8 = 0x801AF1D8; //segment:ovl_menu +D_menu_801AF200 = 0x801AF200; //segment:ovl_menu +D_menu_801AF240 = 0x801AF240; //segment:ovl_menu +D_menu_801AF300 = 0x801AF300; //segment:ovl_menu +D_menu_801AF304 = 0x801AF304; //segment:ovl_menu +D_menu_801AF308 = 0x801AF308; //segment:ovl_menu +D_menu_801AF318 = 0x801AF318; //segment:ovl_menu +D_menu_801AF31C = 0x801AF31C; //segment:ovl_menu +D_menu_801AF344 = 0x801AF344; //segment:ovl_menu +D_menu_801AF354 = 0x801AF354; //segment:ovl_menu +D_menu_801AF35C = 0x801AF35C; //segment:ovl_menu +D_menu_801AF360 = 0x801AF360; //segment:ovl_menu +D_menu_801AF3B0 = 0x801AF3B0; //segment:ovl_menu +D_menu_801AF3B8 = 0x801AF3B8; //segment:ovl_menu +D_menu_801AF3BC = 0x801AF3BC; //segment:ovl_menu +D_menu_801AF40C = 0x801AF40C; //segment:ovl_menu +D_menu_801AF414 = 0x801AF414; //segment:ovl_menu +D_menu_801AF418 = 0x801AF418; //segment:ovl_menu +D_menu_801AF42C = 0x801AF42C; //segment:ovl_menu +D_menu_801AF434 = 0x801AF434; //segment:ovl_menu +D_menu_801AF468 = 0x801AF468; //segment:ovl_menu +D_menu_801AF470 = 0x801AF470; //segment:ovl_menu +D_menu_801AF474 = 0x801AF474; //segment:ovl_menu +D_menu_801AF47C = 0x801AF47C; //segment:ovl_menu +D_menu_801AF488 = 0x801AF488; //segment:ovl_menu +D_menu_801AF4AC = 0x801AF4AC; //segment:ovl_menu +D_menu_801AF4B8 = 0x801AF4B8; //segment:ovl_menu +D_menu_801AF4C0 = 0x801AF4C0; //segment:ovl_menu +D_menu_801AF4C4 = 0x801AF4C4; //segment:ovl_menu +D_menu_801AF4C8 = 0x801AF4C8; //segment:ovl_menu +D_menu_801AF4CC = 0x801AF4CC; //segment:ovl_menu +D_menu_801AF4D0 = 0x801AF4D0; //segment:ovl_menu +D_menu_801AF4D4 = 0x801AF4D4; //segment:ovl_menu +D_menu_801AF4D8 = 0x801AF4D8; //segment:ovl_menu +D_menu_801AF4DC = 0x801AF4DC; //segment:ovl_menu +D_menu_801AF4E0 = 0x801AF4E0; //segment:ovl_menu +D_menu_801AF4E4 = 0x801AF4E4; //segment:ovl_menu +D_menu_801AF4E8 = 0x801AF4E8; //segment:ovl_menu +D_menu_801AF4EC = 0x801AF4EC; //segment:ovl_menu +D_menu_801AF4F0 = 0x801AF4F0; //segment:ovl_menu +D_menu_801AF4F4 = 0x801AF4F4; //segment:ovl_menu +D_menu_801AF4F8 = 0x801AF4F8; //segment:ovl_menu +D_menu_801AF4FC = 0x801AF4FC; //segment:ovl_menu +D_menu_801AF500 = 0x801AF500; //segment:ovl_menu +D_menu_801AF504 = 0x801AF504; //segment:ovl_menu +D_menu_801AF508 = 0x801AF508; //segment:ovl_menu +D_menu_801AF50C = 0x801AF50C; //segment:ovl_menu +D_menu_801AF510 = 0x801AF510; //segment:ovl_menu +D_menu_801AFE70 = 0x801AFE70; //segment:ovl_menu +D_menu_801AFE74 = 0x801AFE74; //segment:ovl_menu +D_menu_801AFE78 = 0x801AFE78; //segment:ovl_menu +D_menu_801AFE7C = 0x801AFE7C; //segment:ovl_menu +D_menu_801AFE80 = 0x801AFE80; //segment:ovl_menu +D_menu_801AFE84 = 0x801AFE84; //segment:ovl_menu +D_menu_801AFE88 = 0x801AFE88; //segment:ovl_menu +D_menu_801AFE8C = 0x801AFE8C; //segment:ovl_menu +D_menu_801AFE90 = 0x801AFE90; //segment:ovl_menu +D_menu_801AFE94 = 0x801AFE94; //segment:ovl_menu +D_menu_801AFE98 = 0x801AFE98; //segment:ovl_menu +D_menu_801AFE9C = 0x801AFE9C; //segment:ovl_menu +D_menu_801AFEA0 = 0x801AFEA0; //segment:ovl_menu +D_menu_801AFEA4 = 0x801AFEA4; //segment:ovl_menu +D_menu_801AFEA8 = 0x801AFEA8; //segment:ovl_menu +D_menu_801AFEAC = 0x801AFEAC; //segment:ovl_menu +D_menu_801AFEB0 = 0x801AFEB0; //segment:ovl_menu +D_menu_801AFEB4 = 0x801AFEB4; //segment:ovl_menu +D_menu_801AFEB8 = 0x801AFEB8; //segment:ovl_menu +D_menu_801AFEBC = 0x801AFEBC; //segment:ovl_menu +D_menu_801AFEC0 = 0x801AFEC0; //segment:ovl_menu +D_menu_801AFEC4 = 0x801AFEC4; //segment:ovl_menu +D_menu_801AFEC8 = 0x801AFEC8; //segment:ovl_menu +D_menu_801AFECC = 0x801AFECC; //segment:ovl_menu +D_menu_801AFED0 = 0x801AFED0; //segment:ovl_menu +D_menu_801AFED4 = 0x801AFED4; //segment:ovl_menu +D_menu_801AFED8 = 0x801AFED8; //segment:ovl_menu +D_menu_801AFEDC = 0x801AFEDC; //segment:ovl_menu +D_menu_801AFEE0 = 0x801AFEE0; //segment:ovl_menu +D_menu_801AFEE4 = 0x801AFEE4; //segment:ovl_menu +D_menu_801AFEE8 = 0x801AFEE8; //segment:ovl_menu +D_menu_801AFEEC = 0x801AFEEC; //segment:ovl_menu +D_menu_801AFEF0 = 0x801AFEF0; //segment:ovl_menu +D_menu_801AFEF4 = 0x801AFEF4; //segment:ovl_menu +D_menu_801AFEF8 = 0x801AFEF8; //segment:ovl_menu +D_menu_801AFF00 = 0x801AFF00; //segment:ovl_menu +D_menu_801AFF28 = 0x801AFF28; //segment:ovl_menu +D_menu_801AFF50 = 0x801AFF50; //segment:ovl_menu +D_menu_801AFF78 = 0x801AFF78; //segment:ovl_menu +D_menu_801AFFA0 = 0x801AFFA0; //segment:ovl_menu +D_menu_801AFFA8 = 0x801AFFA8; //segment:ovl_menu +D_menu_801AFFD0 = 0x801AFFD0; //segment:ovl_menu +D_menu_801AFFF8 = 0x801AFFF8; //segment:ovl_menu +D_menu_801B0020 = 0x801B0020; //segment:ovl_menu +D_menu_801B0048 = 0x801B0048; //segment:ovl_menu +D_menu_801B00E8 = 0x801B00E8; //segment:ovl_menu +D_menu_801B0188 = 0x801B0188; //segment:ovl_menu +D_menu_801B0228 = 0x801B0228; //segment:ovl_menu +D_menu_801B02C8 = 0x801B02C8; //segment:ovl_menu +D_menu_801B0368 = 0x801B0368; //segment:ovl_menu +D_menu_801B0408 = 0x801B0408; //segment:ovl_menu +D_menu_801B0410 = 0x801B0410; //segment:ovl_menu +D_menu_801B04B0 = 0x801B04B0; //segment:ovl_menu +D_menu_801B0528 = 0x801B0528; //segment:ovl_menu +D_menu_801B052C = 0x801B052C; //segment:ovl_menu +D_menu_801B0530 = 0x801B0530; //segment:ovl_menu +D_menu_801B0550 = 0x801B0550; //segment:ovl_menu +D_menu_801B0584 = 0x801B0584; //segment:ovl_menu +D_menu_801B0588 = 0x801B0588; //segment:ovl_menu +D_menu_801B058C = 0x801B058C; //segment:ovl_menu +D_menu_801B0590 = 0x801B0590; //segment:ovl_menu +D_menu_801B05A0 = 0x801B05A0; //segment:ovl_menu +D_menu_801B05A8 = 0x801B05A8; //segment:ovl_menu +D_menu_801B0628 = 0x801B0628; //segment:ovl_menu +D_menu_801B062C = 0x801B062C; //segment:ovl_menu +D_menu_801B062F = 0x801B062F; //segment:ovl_menu +D_menu_801B0630 = 0x801B0630; //segment:ovl_menu +D_menu_801B0638 = 0x801B0638; //segment:ovl_menu +D_menu_801B0640 = 0x801B0640; //segment:ovl_menu +D_menu_801B0644 = 0x801B0644; //segment:ovl_menu +D_menu_801B0648 = 0x801B0648; //segment:ovl_menu +D_menu_801B0658 = 0x801B0658; //segment:ovl_menu +D_menu_801B065C = 0x801B065C; //segment:ovl_menu +D_menu_801B0660 = 0x801B0660; //segment:ovl_menu +D_menu_801B0664 = 0x801B0664; //segment:ovl_menu +D_menu_801B0668 = 0x801B0668; //segment:ovl_menu +D_menu_801B066C = 0x801B066C; //segment:ovl_menu +D_menu_801B0670 = 0x801B0670; //segment:ovl_menu +D_menu_801B0674 = 0x801B0674; //segment:ovl_menu +D_menu_801B0678 = 0x801B0678; //segment:ovl_menu +D_menu_801B067C = 0x801B067C; //segment:ovl_menu +D_menu_801B0680 = 0x801B0680; //segment:ovl_menu +D_menu_801B0684 = 0x801B0684; //segment:ovl_menu +D_menu_801B0688 = 0x801B0688; //segment:ovl_menu +D_menu_801B068C = 0x801B068C; //segment:ovl_menu +D_menu_801B0690 = 0x801B0690; //segment:ovl_menu +D_menu_801B0694 = 0x801B0694; //segment:ovl_menu +D_menu_801B0698 = 0x801B0698; //segment:ovl_menu +D_menu_801B069C = 0x801B069C; //segment:ovl_menu +D_menu_801B06A0 = 0x801B06A0; //segment:ovl_menu +D_menu_801B06C0 = 0x801B06C0; //segment:ovl_menu +D_menu_801B06C4 = 0x801B06C4; //segment:ovl_menu +D_menu_801B06C8 = 0x801B06C8; //segment:ovl_menu +D_menu_801B06CC = 0x801B06CC; //segment:ovl_menu +D_menu_801B06D0 = 0x801B06D0; //segment:ovl_menu +D_menu_801B06D4 = 0x801B06D4; //segment:ovl_menu +D_menu_801B06D8 = 0x801B06D8; //segment:ovl_menu +D_menu_801B06DC = 0x801B06DC; //segment:ovl_menu +D_menu_801B06E0 = 0x801B06E0; //segment:ovl_menu +D_menu_801B06E4 = 0x801B06E4; //segment:ovl_menu +D_menu_801B06E8 = 0x801B06E8; //segment:ovl_menu +D_menu_801B06EC = 0x801B06EC; //segment:ovl_menu +D_menu_801B06F0 = 0x801B06F0; //segment:ovl_menu +D_menu_801B06F8 = 0x801B06F8; //segment:ovl_menu +D_menu_801B0700 = 0x801B0700; //segment:ovl_menu +D_menu_801B0704 = 0x801B0704; //segment:ovl_menu +D_menu_801B0708 = 0x801B0708; //segment:ovl_menu +D_menu_801B0710 = 0x801B0710; //segment:ovl_menu +D_menu_801B0720 = 0x801B0720; //segment:ovl_menu +D_menu_801B072C = 0x801B072C; //segment:ovl_menu +D_menu_801B0730 = 0x801B0730; //segment:ovl_menu +D_menu_801B0740 = 0x801B0740; //segment:ovl_menu +D_menu_801B0750 = 0x801B0750; //segment:ovl_menu +D_menu_801B0760 = 0x801B0760; //segment:ovl_menu +D_menu_801B0770 = 0x801B0770; //segment:ovl_menu +D_menu_801B0780 = 0x801B0780; //segment:ovl_menu +D_menu_801B078C = 0x801B078C; //segment:ovl_menu +D_menu_801B0790 = 0x801B0790; //segment:ovl_menu +D_menu_801B0794 = 0x801B0794; //segment:ovl_menu +D_menu_801B0798 = 0x801B0798; //segment:ovl_menu +D_menu_801B079C = 0x801B079C; //segment:ovl_menu +D_menu_801B07A0 = 0x801B07A0; //segment:ovl_menu +D_menu_801B07A4 = 0x801B07A4; //segment:ovl_menu +D_menu_801B07A8 = 0x801B07A8; //segment:ovl_menu +D_menu_801B07B0 = 0x801B07B0; //segment:ovl_menu +D_menu_801B07BC = 0x801B07BC; //segment:ovl_menu +D_menu_801B07C0 = 0x801B07C0; //segment:ovl_menu +D_menu_801B07C8 = 0x801B07C8; //segment:ovl_menu +D_menu_801B07D0 = 0x801B07D0; //segment:ovl_menu +D_menu_801B07E8 = 0x801B07E8; //segment:ovl_menu +D_menu_801B07EC = 0x801B07EC; //segment:ovl_menu +D_menu_801B07F0 = 0x801B07F0; //segment:ovl_menu +D_menu_801B07F8 = 0x801B07F8; //segment:ovl_menu +D_menu_801B0800 = 0x801B0800; //segment:ovl_menu +D_menu_801B0808 = 0x801B0808; //segment:ovl_menu +D_menu_801B0810 = 0x801B0810; //segment:ovl_menu +D_menu_801B0818 = 0x801B0818; //segment:ovl_menu +D_menu_801B081C = 0x801B081C; //segment:ovl_menu +D_menu_801B0820 = 0x801B0820; //segment:ovl_menu +D_menu_801B0824 = 0x801B0824; //segment:ovl_menu +D_menu_801B0828 = 0x801B0828; //segment:ovl_menu +D_menu_801B082C = 0x801B082C; //segment:ovl_menu +D_menu_801B0830 = 0x801B0830; //segment:ovl_menu +D_menu_801B0834 = 0x801B0834; //segment:ovl_menu +D_menu_801B0838 = 0x801B0838; //segment:ovl_menu +D_menu_801B083C = 0x801B083C; //segment:ovl_menu +D_menu_801B0840 = 0x801B0840; //segment:ovl_menu +D_menu_801B0844 = 0x801B0844; //segment:ovl_menu +D_menu_801B0848 = 0x801B0848; //segment:ovl_menu +D_menu_801B084C = 0x801B084C; //segment:ovl_menu +D_menu_801B0850 = 0x801B0850; //segment:ovl_menu +D_menu_801B0854 = 0x801B0854; //segment:ovl_menu +D_menu_801B0858 = 0x801B0858; //segment:ovl_menu +D_menu_801B085C = 0x801B085C; //segment:ovl_menu +D_menu_801B0860 = 0x801B0860; //segment:ovl_menu +D_menu_801B0864 = 0x801B0864; //segment:ovl_menu +D_menu_801B0868 = 0x801B0868; //segment:ovl_menu +D_menu_801B086C = 0x801B086C; //segment:ovl_menu +D_menu_801B0870 = 0x801B0870; //segment:ovl_menu +D_menu_801B0874 = 0x801B0874; //segment:ovl_menu +D_menu_801B0878 = 0x801B0878; //segment:ovl_menu +D_menu_801B087C = 0x801B087C; //segment:ovl_menu +D_menu_801B0880 = 0x801B0880; //segment:ovl_menu +D_menu_801B0884 = 0x801B0884; //segment:ovl_menu +D_menu_801B0888 = 0x801B0888; //segment:ovl_menu +D_menu_801B088C = 0x801B088C; //segment:ovl_menu +D_menu_801B0890 = 0x801B0890; //segment:ovl_menu +D_menu_801B0894 = 0x801B0894; //segment:ovl_menu +D_menu_801B0898 = 0x801B0898; //segment:ovl_menu +D_menu_801B089C = 0x801B089C; //segment:ovl_menu +D_menu_801B08A0 = 0x801B08A0; //segment:ovl_menu +D_menu_801B08A4 = 0x801B08A4; //segment:ovl_menu +D_menu_801B08A8 = 0x801B08A8; //segment:ovl_menu +D_menu_801B08AC = 0x801B08AC; //segment:ovl_menu +D_menu_801B08B0 = 0x801B08B0; //segment:ovl_menu +D_menu_801B08B4 = 0x801B08B4; //segment:ovl_menu +D_menu_801B08B8 = 0x801B08B8; //segment:ovl_menu +D_menu_801B08BC = 0x801B08BC; //segment:ovl_menu +D_menu_801B08C0 = 0x801B08C0; //segment:ovl_menu +D_menu_801B08C4 = 0x801B08C4; //segment:ovl_menu +D_menu_801B08C8 = 0x801B08C8; //segment:ovl_menu +D_menu_801B08D0 = 0x801B08D0; //segment:ovl_menu +D_menu_801B08D8 = 0x801B08D8; //segment:ovl_menu +D_menu_801B08E0 = 0x801B08E0; //segment:ovl_menu +D_menu_801B08E8 = 0x801B08E8; //segment:ovl_menu +D_menu_801B08EC = 0x801B08EC; //segment:ovl_menu +D_menu_801B08F0 = 0x801B08F0; //segment:ovl_menu +D_menu_801B08F4 = 0x801B08F4; //segment:ovl_menu +D_menu_801B08FC = 0x801B08FC; //segment:ovl_menu +D_menu_801B0900 = 0x801B0900; //segment:ovl_menu +D_menu_801B0910 = 0x801B0910; //segment:ovl_menu +D_menu_801B0C10 = 0x801B0C10; //segment:ovl_menu +D_menu_801B0F10 = 0x801B0F10; //segment:ovl_menu +D_menu_801B1210 = 0x801B1210; //segment:ovl_menu +D_menu_801B1510 = 0x801B1510; //segment:ovl_menu +D_menu_801B1810 = 0x801B1810; //segment:ovl_menu +D_menu_801B1B10 = 0x801B1B10; //segment:ovl_menu +D_menu_801B1E10 = 0x801B1E10; //segment:ovl_menu +D_menu_801B2110 = 0x801B2110; //segment:ovl_menu +D_menu_801B2410 = 0x801B2410; //segment:ovl_menu +D_menu_801B2710 = 0x801B2710; //segment:ovl_menu +D_menu_801B2A10 = 0x801B2A10; //segment:ovl_menu +D_menu_801B2D10 = 0x801B2D10; //segment:ovl_menu +D_menu_801B3010 = 0x801B3010; //segment:ovl_menu +D_menu_801B3310 = 0x801B3310; //segment:ovl_menu +D_menu_801B3610 = 0x801B3610; //segment:ovl_menu +D_menu_801B3910 = 0x801B3910; //segment:ovl_menu +D_menu_801B3C10 = 0x801B3C10; //segment:ovl_menu +D_menu_801B3F10 = 0x801B3F10; //segment:ovl_menu +D_menu_801B4210 = 0x801B4210; //segment:ovl_menu +D_menu_801B4510 = 0x801B4510; //segment:ovl_menu +D_menu_801B4810 = 0x801B4810; //segment:ovl_menu +D_menu_801B4B10 = 0x801B4B10; //segment:ovl_menu +D_menu_801B4E10 = 0x801B4E10; //segment:ovl_menu +D_menu_801B5110 = 0x801B5110; //segment:ovl_menu +D_menu_801B5410 = 0x801B5410; //segment:ovl_menu +D_menu_801B5710 = 0x801B5710; //segment:ovl_menu +D_menu_801B5A10 = 0x801B5A10; //segment:ovl_menu +D_menu_801B5D10 = 0x801B5D10; //segment:ovl_menu +D_menu_801B6010 = 0x801B6010; //segment:ovl_menu +D_menu_801B6310 = 0x801B6310; //segment:ovl_menu +D_menu_801B6610 = 0x801B6610; //segment:ovl_menu +D_menu_801B6910 = 0x801B6910; //segment:ovl_menu +D_menu_801B6C10 = 0x801B6C10; //segment:ovl_menu +D_menu_801B6F10 = 0x801B6F10; //segment:ovl_menu +D_menu_801B7210 = 0x801B7210; //segment:ovl_menu +D_menu_801B7510 = 0x801B7510; //segment:ovl_menu +D_menu_801B7810 = 0x801B7810; //segment:ovl_menu +D_menu_801B7B10 = 0x801B7B10; //segment:ovl_menu +D_menu_801B7E10 = 0x801B7E10; //segment:ovl_menu +D_menu_801B8110 = 0x801B8110; //segment:ovl_menu +D_menu_801B8410 = 0x801B8410; //segment:ovl_menu +D_menu_801B8710 = 0x801B8710; //segment:ovl_menu +D_menu_801B8A10 = 0x801B8A10; //segment:ovl_menu +D_menu_801B8D10 = 0x801B8D10; //segment:ovl_menu +D_menu_801B9010 = 0x801B9010; //segment:ovl_menu +D_menu_801B9310 = 0x801B9310; //segment:ovl_menu +D_menu_801B9610 = 0x801B9610; //segment:ovl_menu +D_menu_801B9910 = 0x801B9910; //segment:ovl_menu +D_menu_801B9C10 = 0x801B9C10; //segment:ovl_menu +D_menu_801B9F10 = 0x801B9F10; //segment:ovl_menu +D_menu_801BA210 = 0x801BA210; //segment:ovl_menu +D_menu_801BA510 = 0x801BA510; //segment:ovl_menu +D_menu_801BA810 = 0x801BA810; //segment:ovl_menu +D_menu_801BAB10 = 0x801BAB10; //segment:ovl_menu +D_menu_801BAE10 = 0x801BAE10; //segment:ovl_menu +D_menu_801BB110 = 0x801BB110; //segment:ovl_menu +D_menu_801BB410 = 0x801BB410; //segment:ovl_menu +D_menu_801BB710 = 0x801BB710; //segment:ovl_menu +D_menu_801BBA10 = 0x801BBA10; //segment:ovl_menu +D_menu_801BBD10 = 0x801BBD10; //segment:ovl_menu +D_menu_801BC010 = 0x801BC010; //segment:ovl_menu +D_menu_801BC310 = 0x801BC310; //segment:ovl_menu +D_menu_801BC610 = 0x801BC610; //segment:ovl_menu +D_menu_801BC910 = 0x801BC910; //segment:ovl_menu +D_menu_801BCC10 = 0x801BCC10; //segment:ovl_menu +D_menu_801BCF10 = 0x801BCF10; //segment:ovl_menu +D_menu_801BD210 = 0x801BD210; //segment:ovl_menu +D_menu_801BD510 = 0x801BD510; //segment:ovl_menu +D_menu_801BD810 = 0x801BD810; //segment:ovl_menu +D_menu_801BDB10 = 0x801BDB10; //segment:ovl_menu +D_menu_801BDE10 = 0x801BDE10; //segment:ovl_menu +D_menu_801BE110 = 0x801BE110; //segment:ovl_menu +D_menu_801BE410 = 0x801BE410; //segment:ovl_menu +D_menu_801BE710 = 0x801BE710; //segment:ovl_menu +D_menu_801BEA10 = 0x801BEA10; //segment:ovl_menu +D_menu_801BED10 = 0x801BED10; //segment:ovl_menu +D_menu_801BF010 = 0x801BF010; //segment:ovl_menu +D_menu_801BF310 = 0x801BF310; //segment:ovl_menu +D_menu_801BF610 = 0x801BF610; //segment:ovl_menu +D_menu_801BF910 = 0x801BF910; //segment:ovl_menu +D_menu_801BFC10 = 0x801BFC10; //segment:ovl_menu +D_menu_801BFF10 = 0x801BFF10; //segment:ovl_menu +D_menu_801C0210 = 0x801C0210; //segment:ovl_menu +D_menu_801C0510 = 0x801C0510; //segment:ovl_menu +D_menu_801C0810 = 0x801C0810; //segment:ovl_menu +D_menu_801C0B10 = 0x801C0B10; //segment:ovl_menu +D_menu_801C0E10 = 0x801C0E10; //segment:ovl_menu +D_menu_801C1110 = 0x801C1110; //segment:ovl_menu +D_menu_801C1410 = 0x801C1410; //segment:ovl_menu +D_menu_801C1710 = 0x801C1710; //segment:ovl_menu +D_menu_801C1A10 = 0x801C1A10; //segment:ovl_menu +D_menu_801C1D10 = 0x801C1D10; //segment:ovl_menu +D_menu_801C2010 = 0x801C2010; //segment:ovl_menu +D_menu_801C2310 = 0x801C2310; //segment:ovl_menu +D_menu_801C2610 = 0x801C2610; //segment:ovl_menu +D_menu_801C2910 = 0x801C2910; //segment:ovl_menu +D_menu_801C2C10 = 0x801C2C10; //segment:ovl_menu +D_menu_801C2F10 = 0x801C2F10; //segment:ovl_menu +D_menu_801C3210 = 0x801C3210; //segment:ovl_menu +D_menu_801C3510 = 0x801C3510; //segment:ovl_menu +D_menu_801C3810 = 0x801C3810; //segment:ovl_menu +D_menu_801C3B10 = 0x801C3B10; //segment:ovl_menu +D_menu_801C3E10 = 0x801C3E10; //segment:ovl_menu +D_menu_801C4110 = 0x801C4110; //segment:ovl_menu +D_menu_801C4410 = 0x801C4410; //segment:ovl_menu +D_menu_801C4710 = 0x801C4710; //segment:ovl_menu +D_menu_801C4A10 = 0x801C4A10; //segment:ovl_menu +D_menu_801C4D10 = 0x801C4D10; //segment:ovl_menu +D_menu_801C4D14 = 0x801C4D14; //segment:ovl_menu +D_menu_801C4D18 = 0x801C4D18; //segment:ovl_menu +D_menu_801C4D1C = 0x801C4D1C; //segment:ovl_menu +D_menu_801C4D20 = 0x801C4D20; //segment:ovl_menu +D_menu_801C4D24 = 0x801C4D24; //segment:ovl_menu +D_menu_801C4D28 = 0x801C4D28; //segment:ovl_menu +D_menu_801C4D2C = 0x801C4D2C; //segment:ovl_menu +D_menu_801C4D30 = 0x801C4D30; //segment:ovl_menu +D_menu_801C4D34 = 0x801C4D34; //segment:ovl_menu +D_menu_801C4D38 = 0x801C4D38; //segment:ovl_menu +D_menu_801C4D3C = 0x801C4D3C; //segment:ovl_menu +D_menu_801C4D40 = 0x801C4D40; //segment:ovl_menu +D_menu_801C4D44 = 0x801C4D44; //segment:ovl_menu +D_menu_801C4D78 = 0x801C4D78; //segment:ovl_menu +D_menu_801C4D7C = 0x801C4D7C; //segment:ovl_menu +D_menu_801C4D80 = 0x801C4D80; //segment:ovl_menu +D_menu_801C4D84 = 0x801C4D84; //segment:ovl_menu +D_menu_801C4DB4 = 0x801C4DB4; //segment:ovl_menu +D_menu_801C4DB8 = 0x801C4DB8; //segment:ovl_menu +D_menu_801C4DBC = 0x801C4DBC; //segment:ovl_menu +D_menu_801C4DC0 = 0x801C4DC0; //segment:ovl_menu +D_menu_801C4DC8 = 0x801C4DC8; //segment:ovl_menu +D_menu_801C4DCC = 0x801C4DCC; //segment:ovl_menu +D_menu_801C4DD0 = 0x801C4DD0; //segment:ovl_menu +D_menu_801C4DD8 = 0x801C4DD8; //segment:ovl_menu +D_menu_801C4E50 = 0x801C4E50; //segment:ovl_menu +D_menu_801C4EC8 = 0x801C4EC8; //segment:ovl_menu +D_menu_801C4F40 = 0x801C4F40; //segment:ovl_menu +D_menu_801C4FB8 = 0x801C4FB8; //segment:ovl_menu +D_menu_801C5030 = 0x801C5030; //segment:ovl_menu +D_menu_801C5058 = 0x801C5058; //segment:ovl_menu +D_menu_801C50A8 = 0x801C50A8; //segment:ovl_menu +D_menu_801C5120 = 0x801C5120; //segment:ovl_menu +D_menu_801C5124 = 0x801C5124; //segment:ovl_menu +D_menu_801C5128 = 0x801C5128; //segment:ovl_menu +D_menu_801C512C = 0x801C512C; //segment:ovl_menu +D_menu_801C5130 = 0x801C5130; //segment:ovl_menu +D_menu_801C513C = 0x801C513C; //segment:ovl_menu +D_menu_801C5140 = 0x801C5140; //segment:ovl_menu +D_menu_801C5144 = 0x801C5144; //segment:ovl_menu +D_menu_801C5148 = 0x801C5148; //segment:ovl_menu +D_menu_801C514C = 0x801C514C; //segment:ovl_menu +D_menu_801C5150 = 0x801C5150; //segment:ovl_menu +D_menu_801C5154 = 0x801C5154; //segment:ovl_menu +D_menu_801C5158 = 0x801C5158; //segment:ovl_menu +D_menu_801C515C = 0x801C515C; //segment:ovl_menu +D_menu_801C5160 = 0x801C5160; //segment:ovl_menu +D_menu_801C5168 = 0x801C5168; //segment:ovl_menu +D_menu_801C5180 = 0x801C5180; //segment:ovl_menu +D_menu_801C5184 = 0x801C5184; //segment:ovl_menu +D_menu_801C5188 = 0x801C5188; //segment:ovl_menu +D_menu_801C51B0 = 0x801C51B0; //segment:ovl_menu +D_menu_801C51B4 = 0x801C51B4; //segment:ovl_menu +D_menu_801C51B8 = 0x801C51B8; //segment:ovl_menu +D_menu_801C51D8 = 0x801C51D8; //segment:ovl_menu +D_menu_801C5244 = 0x801C5244; //segment:ovl_menu +D_menu_801C5248 = 0x801C5248; //segment:ovl_menu +D_menu_801C524C = 0x801C524C; //segment:ovl_menu +D_menu_801C5250 = 0x801C5250; //segment:ovl_menu +D_menu_801C5254 = 0x801C5254; //segment:ovl_menu +D_menu_801C5258 = 0x801C5258; //segment:ovl_menu +D_menu_801C525C = 0x801C525C; //segment:ovl_menu +D_menu_801C5260 = 0x801C5260; //segment:ovl_menu +D_menu_801C5268 = 0x801C5268; //segment:ovl_menu +D_menu_801C5274 = 0x801C5274; //segment:ovl_menu +D_menu_801C5278 = 0x801C5278; //segment:ovl_menu +D_menu_801C5280 = 0x801C5280; //segment:ovl_menu +D_menu_801C528C = 0x801C528C; //segment:ovl_menu +D_menu_801C5290 = 0x801C5290; //segment:ovl_menu +D_menu_801C5294 = 0x801C5294; //segment:ovl_menu +D_menu_801C5298 = 0x801C5298; //segment:ovl_menu +D_menu_801C52A0 = 0x801C52A0; //segment:ovl_menu +D_menu_801C52C0 = 0x801C52C0; //segment:ovl_menu +D_menu_801C52E0 = 0x801C52E0; //segment:ovl_menu +D_menu_801C5300 = 0x801C5300; //segment:ovl_menu +D_menu_801C5308 = 0x801C5308; //segment:ovl_menu +D_menu_801C5328 = 0x801C5328; //segment:ovl_menu +D_menu_801C5348 = 0x801C5348; //segment:ovl_menu +D_menu_801C534C = 0x801C534C; //segment:ovl_menu +D_menu_801C5350 = 0x801C5350; //segment:ovl_menu +D_menu_801C5358 = 0x801C5358; //segment:ovl_menu +D_menu_801C5378 = 0x801C5378; //segment:ovl_menu +D_menu_801C5398 = 0x801C5398; //segment:ovl_menu +D_menu_801C539C = 0x801C539C; //segment:ovl_menu +D_menu_801C53A0 = 0x801C53A0; //segment:ovl_menu +D_menu_801C53A4 = 0x801C53A4; //segment:ovl_menu +D_menu_801C53A8 = 0x801C53A8; //segment:ovl_menu +D_menu_801C53C8 = 0x801C53C8; //segment:ovl_menu +D_menu_801C53CC = 0x801C53CC; //segment:ovl_menu +D_menu_801C53D0 = 0x801C53D0; //segment:ovl_menu +D_menu_801C5430 = 0x801C5430; //segment:ovl_menu +D_menu_801C546C = 0x801C546C; //segment:ovl_menu +D_menu_801C5470 = 0x801C5470; //segment:ovl_menu +D_menu_801C548C = 0x801C548C; //segment:ovl_menu +D_menu_801C5490 = 0x801C5490; //segment:ovl_menu +D_menu_801C5494 = 0x801C5494; //segment:ovl_menu +D_menu_801C5498 = 0x801C5498; //segment:ovl_menu +D_menu_801C549C = 0x801C549C; //segment:ovl_menu +D_menu_801C54A0 = 0x801C54A0; //segment:ovl_menu +D_menu_801C54A4 = 0x801C54A4; //segment:ovl_menu +D_menu_801C54CC = 0x801C54CC; //segment:ovl_menu +D_menu_801C54D0 = 0x801C54D0; //segment:ovl_menu +D_menu_801C54D4 = 0x801C54D4; //segment:ovl_menu +D_menu_801C54D8 = 0x801C54D8; //segment:ovl_menu +D_menu_801C54DC = 0x801C54DC; //segment:ovl_menu +D_menu_801C54E0 = 0x801C54E0; //segment:ovl_menu +D_menu_801C54E4 = 0x801C54E4; //segment:ovl_menu +D_menu_801C54E8 = 0x801C54E8; //segment:ovl_menu +D_menu_801C54EC = 0x801C54EC; //segment:ovl_menu +D_menu_801C54F0 = 0x801C54F0; //segment:ovl_menu +D_menu_801C54F4 = 0x801C54F4; //segment:ovl_menu +D_menu_801C54F8 = 0x801C54F8; //segment:ovl_menu +D_menu_801C54FC = 0x801C54FC; //segment:ovl_menu +D_menu_801C5500 = 0x801C5500; //segment:ovl_menu +D_menu_801C5504 = 0x801C5504; //segment:ovl_menu +D_menu_801C5508 = 0x801C5508; //segment:ovl_menu +D_menu_801C550C = 0x801C550C; //segment:ovl_menu +D_menu_801C5510 = 0x801C5510; //segment:ovl_menu +D_menu_801C5514 = 0x801C5514; //segment:ovl_menu +D_menu_801C5518 = 0x801C5518; //segment:ovl_menu +D_menu_801C551C = 0x801C551C; //segment:ovl_menu +D_menu_801C5520 = 0x801C5520; //segment:ovl_menu +D_menu_801C5524 = 0x801C5524; //segment:ovl_menu +D_menu_801C5528 = 0x801C5528; //segment:ovl_menu +D_menu_801C552C = 0x801C552C; //segment:ovl_menu +D_menu_801C5530 = 0x801C5530; //segment:ovl_menu +D_menu_801C5534 = 0x801C5534; //segment:ovl_menu +D_menu_801C5538 = 0x801C5538; //segment:ovl_menu +D_menu_801C553C = 0x801C553C; //segment:ovl_menu +D_menu_801C5540 = 0x801C5540; //segment:ovl_menu +D_menu_801C5544 = 0x801C5544; //segment:ovl_menu +D_menu_801C5548 = 0x801C5548; //segment:ovl_menu +D_menu_801C554C = 0x801C554C; //segment:ovl_menu +D_menu_801C5550 = 0x801C5550; //segment:ovl_menu +D_menu_801C5554 = 0x801C5554; //segment:ovl_menu +D_menu_801C5558 = 0x801C5558; //segment:ovl_menu +D_menu_801C555C = 0x801C555C; //segment:ovl_menu +D_menu_801C5560 = 0x801C5560; //segment:ovl_menu +D_menu_801C5564 = 0x801C5564; //segment:ovl_menu +D_menu_801C5568 = 0x801C5568; //segment:ovl_menu +D_menu_801C556C = 0x801C556C; //segment:ovl_menu +D_menu_801C5570 = 0x801C5570; //segment:ovl_menu +D_menu_801C5574 = 0x801C5574; //segment:ovl_menu +D_menu_801C5578 = 0x801C5578; //segment:ovl_menu +D_menu_801C557C = 0x801C557C; //segment:ovl_menu +D_menu_801C5580 = 0x801C5580; //segment:ovl_menu +D_menu_801C5584 = 0x801C5584; //segment:ovl_menu +D_menu_801C5588 = 0x801C5588; //segment:ovl_menu +D_menu_801C558C = 0x801C558C; //segment:ovl_menu +D_menu_801C5590 = 0x801C5590; //segment:ovl_menu +D_menu_801C5594 = 0x801C5594; //segment:ovl_menu +D_menu_801C5598 = 0x801C5598; //segment:ovl_menu +D_menu_801C559C = 0x801C559C; //segment:ovl_menu +D_menu_801C55A0 = 0x801C55A0; //segment:ovl_menu +D_menu_801C55A4 = 0x801C55A4; //segment:ovl_menu +D_menu_801C55A8 = 0x801C55A8; //segment:ovl_menu +D_menu_801C55AC = 0x801C55AC; //segment:ovl_menu +D_menu_801C55B0 = 0x801C55B0; //segment:ovl_menu +D_menu_801C55B4 = 0x801C55B4; //segment:ovl_menu +D_menu_801C55B8 = 0x801C55B8; //segment:ovl_menu +D_menu_801C55BC = 0x801C55BC; //segment:ovl_menu +D_menu_801C55C0 = 0x801C55C0; //segment:ovl_menu +D_menu_801C55C4 = 0x801C55C4; //segment:ovl_menu +D_menu_801C55C8 = 0x801C55C8; //segment:ovl_menu +D_menu_801C55D0 = 0x801C55D0; //segment:ovl_menu +D_menu_801C55D4 = 0x801C55D4; //segment:ovl_menu +D_menu_801C55D8 = 0x801C55D8; //segment:ovl_menu +D_menu_801C55E0 = 0x801C55E0; //segment:ovl_menu +D_menu_801C55F0 = 0x801C55F0; //segment:ovl_menu +D_menu_801C59B0 = 0x801C59B0; //segment:ovl_menu +D_menu_801C5B70 = 0x801C5B70; //segment:ovl_menu +D_menu_801C5BB0 = 0x801C5BB0; //segment:ovl_menu +D_menu_801C5BF0 = 0x801C5BF0; //segment:ovl_menu +D_menu_801C5C30 = 0x801C5C30; //segment:ovl_menu +D_menu_801C5CF0 = 0x801C5CF0; //segment:ovl_menu +D_menu_801C5D70 = 0x801C5D70; //segment:ovl_menu +D_menu_801C6130 = 0x801C6130; //segment:ovl_menu +D_menu_801C64F0 = 0x801C64F0; //segment:ovl_menu +D_menu_801C64F8 = 0x801C64F8; //segment:ovl_menu +D_menu_801C65A4 = 0x801C65A4; //segment:ovl_menu +D_menu_801C65A8 = 0x801C65A8; //segment:ovl_menu +D_menu_801C65E4 = 0x801C65E4; //segment:ovl_menu +D_menu_801C65E8 = 0x801C65E8; //segment:ovl_menu +D_menu_801C65EC = 0x801C65EC; //segment:ovl_menu +D_menu_801C65F0 = 0x801C65F0; //segment:ovl_menu +D_menu_801C65F4 = 0x801C65F4; //segment:ovl_menu +D_menu_801C65F8 = 0x801C65F8; //segment:ovl_menu +D_menu_801C65FC = 0x801C65FC; //segment:ovl_menu +D_menu_801C6600 = 0x801C6600; //segment:ovl_menu +D_menu_801C6604 = 0x801C6604; //segment:ovl_menu +D_menu_801C6608 = 0x801C6608; //segment:ovl_menu +D_menu_801C660C = 0x801C660C; //segment:ovl_menu +D_menu_801C6610 = 0x801C6610; //segment:ovl_menu +D_menu_801C6614 = 0x801C6614; //segment:ovl_menu +D_menu_801C6618 = 0x801C6618; //segment:ovl_menu + +func_ending_8017E7A0 = 0x8017E7A0; //segment:ovl_ending +func_ending_8017E924 = 0x8017E924; //segment:ovl_ending +func_ending_8017EAE0 = 0x8017EAE0; //segment:ovl_ending +func_ending_8017EFBC = 0x8017EFBC; //segment:ovl_ending +func_ending_8017F2B0 = 0x8017F2B0; //segment:ovl_ending +func_ending_8017F614 = 0x8017F614; //segment:ovl_ending +func_ending_8017F6DC = 0x8017F6DC; //segment:ovl_ending +func_ending_8017F8B4 = 0x8017F8B4; //segment:ovl_ending +func_ending_8017F974 = 0x8017F974; //segment:ovl_ending +func_ending_8017FB74 = 0x8017FB74; //segment:ovl_ending +func_ending_80180034 = 0x80180034; //segment:ovl_ending +func_ending_80180388 = 0x80180388; //segment:ovl_ending +func_ending_80180EE4 = 0x80180EE4; //segment:ovl_ending +func_ending_801812A4 = 0x801812A4; //segment:ovl_ending +func_ending_801813A4 = 0x801813A4; //segment:ovl_ending +func_ending_80181528 = 0x80181528; //segment:ovl_ending +func_ending_801817F0 = 0x801817F0; //segment:ovl_ending +func_ending_80181AA8 = 0x80181AA8; //segment:ovl_ending +func_ending_80181B7C = 0x80181B7C; //segment:ovl_ending +func_ending_80181BEC = 0x80181BEC; //segment:ovl_ending +func_ending_80181D44 = 0x80181D44; //segment:ovl_ending +func_ending_80181E68 = 0x80181E68; //segment:ovl_ending +func_ending_801823F4 = 0x801823F4; //segment:ovl_ending +func_ending_80182658 = 0x80182658; //segment:ovl_ending +func_ending_80182668 = 0x80182668; //segment:ovl_ending +func_ending_801827AC = 0x801827AC; //segment:ovl_ending +func_ending_801828A4 = 0x801828A4; //segment:ovl_ending +func_ending_80182958 = 0x80182958; //segment:ovl_ending +func_ending_80182AE0 = 0x80182AE0; //segment:ovl_ending +func_ending_80182D50 = 0x80182D50; //segment:ovl_ending +func_ending_80182F30 = 0x80182F30; //segment:ovl_ending +func_ending_8018349C = 0x8018349C; //segment:ovl_ending +func_ending_801840A0 = 0x801840A0; //segment:ovl_ending +func_ending_801843C8 = 0x801843C8; //segment:ovl_ending +func_ending_80184404 = 0x80184404; //segment:ovl_ending +func_ending_80184440 = 0x80184440; //segment:ovl_ending +func_ending_80184510 = 0x80184510; //segment:ovl_ending +func_ending_80184634 = 0x80184634; //segment:ovl_ending +func_ending_801847B0 = 0x801847B0; //segment:ovl_ending +func_ending_8018498C = 0x8018498C; //segment:ovl_ending +func_ending_80184B84 = 0x80184B84; //segment:ovl_ending +func_ending_80184E2C = 0x80184E2C; //segment:ovl_ending +func_ending_80185330 = 0x80185330; //segment:ovl_ending +func_ending_80185930 = 0x80185930; //segment:ovl_ending +func_ending_80185F30 = 0x80185F30; //segment:ovl_ending +func_ending_80186420 = 0x80186420; //segment:ovl_ending +func_ending_801867C4 = 0x801867C4; //segment:ovl_ending +func_ending_80186DD8 = 0x80186DD8; //segment:ovl_ending +func_ending_801873EC = 0x801873EC; //segment:ovl_ending +func_ending_801877C0 = 0x801877C0; //segment:ovl_ending +func_ending_801878F0 = 0x801878F0; //segment:ovl_ending +func_ending_80187E68 = 0x80187E68; //segment:ovl_ending +func_ending_801883AC = 0x801883AC; //segment:ovl_ending +func_ending_8018840C = 0x8018840C; //segment:ovl_ending +func_ending_80188878 = 0x80188878; //segment:ovl_ending +func_ending_80188888 = 0x80188888; //segment:ovl_ending +func_ending_80188DD0 = 0x80188DD0; //segment:ovl_ending +func_ending_80188DF4 = 0x80188DF4; //segment:ovl_ending +func_ending_801892DC = 0x801892DC; //segment:ovl_ending +func_ending_80189408 = 0x80189408; //segment:ovl_ending +func_ending_801894F4 = 0x801894F4; //segment:ovl_ending +func_ending_80189664 = 0x80189664; //segment:ovl_ending +func_ending_8018984C = 0x8018984C; //segment:ovl_ending +D_ending_80189990 = 0x80189990; //segment:ovl_ending +D_ending_801899A0 = 0x801899A0; //segment:ovl_ending +D_ending_801899AC = 0x801899AC; //segment:ovl_ending +D_ending_80189AAC = 0x80189AAC; //segment:ovl_ending +D_ending_80189BAC = 0x80189BAC; //segment:ovl_ending +D_ending_80189C2C = 0x80189C2C; //segment:ovl_ending +D_ending_80189C38 = 0x80189C38; //segment:ovl_ending +D_ending_80189D78 = 0x80189D78; //segment:ovl_ending +D_ending_80189D84 = 0x80189D84; //segment:ovl_ending +D_ending_80189D90 = 0x80189D90; //segment:ovl_ending +D_ending_80189D9C = 0x80189D9C; //segment:ovl_ending +D_ending_80189DA8 = 0x80189DA8; //segment:ovl_ending +D_ending_80189DB0 = 0x80189DB0; //segment:ovl_ending +D_ending_80189DC8 = 0x80189DC8; //segment:ovl_ending +D_ending_80189DE0 = 0x80189DE0; //segment:ovl_ending +D_ending_80189E04 = 0x80189E04; //segment:ovl_ending +D_ending_80189E28 = 0x80189E28; //segment:ovl_ending +D_ending_80189E34 = 0x80189E34; //segment:ovl_ending +D_ending_80189E40 = 0x80189E40; //segment:ovl_ending +D_ending_80189E88 = 0x80189E88; //segment:ovl_ending +D_ending_80189ED0 = 0x80189ED0; //segment:ovl_ending +D_ending_80189EE8 = 0x80189EE8; //segment:ovl_ending +D_ending_80189EF4 = 0x80189EF4; //segment:ovl_ending +D_ending_80189F00 = 0x80189F00; //segment:ovl_ending +D_ending_80189F0C = 0x80189F0C; //segment:ovl_ending +D_ending_80189F18 = 0x80189F18; //segment:ovl_ending +D_ending_80189F24 = 0x80189F24; //segment:ovl_ending +D_ending_80189F30 = 0x80189F30; //segment:ovl_ending +D_ending_80189F3C = 0x80189F3C; //segment:ovl_ending +D_ending_80189F48 = 0x80189F48; //segment:ovl_ending +D_ending_80189F54 = 0x80189F54; //segment:ovl_ending +D_ending_80189F80 = 0x80189F80; //segment:ovl_ending +D_ending_80189FA4 = 0x80189FA4; //segment:ovl_ending +D_ending_80189FBC = 0x80189FBC; //segment:ovl_ending +D_ending_80189FE0 = 0x80189FE0; //segment:ovl_ending +D_ending_80189FE4 = 0x80189FE4; //segment:ovl_ending +D_ending_8018A598 = 0x8018A598; //segment:ovl_ending +D_ending_8018D030 = 0x8018D030; //segment:ovl_ending +D_ending_8018DD90 = 0x8018DD90; //segment:ovl_ending +D_ending_8018DD94 = 0x8018DD94; //segment:ovl_ending +D_ending_8018DD98 = 0x8018DD98; //segment:ovl_ending +D_ending_8018DDA0 = 0x8018DDA0; //segment:ovl_ending +D_ending_8018DDB0 = 0x8018DDB0; //segment:ovl_ending +D_ending_8018DDB4 = 0x8018DDB4; //segment:ovl_ending +D_ending_8018DE98 = 0x8018DE98; //segment:ovl_ending +D_ending_8018DED0 = 0x8018DED0; //segment:ovl_ending +D_ending_8018E018 = 0x8018E018; //segment:ovl_ending +D_ending_8018E01C = 0x8018E01C; //segment:ovl_ending +D_ending_8018E020 = 0x8018E020; //segment:ovl_ending +D_ending_8018E024 = 0x8018E024; //segment:ovl_ending +D_ending_8018E028 = 0x8018E028; //segment:ovl_ending +D_ending_8018E02C = 0x8018E02C; //segment:ovl_ending +D_ending_8018E030 = 0x8018E030; //segment:ovl_ending +D_ending_8018E03C = 0x8018E03C; //segment:ovl_ending +D_ending_8018E288 = 0x8018E288; //segment:ovl_ending +D_ending_8018E290 = 0x8018E290; //segment:ovl_ending +D_ending_8018E294 = 0x8018E294; //segment:ovl_ending +D_ending_8018E29C = 0x8018E29C; //segment:ovl_ending +D_ending_8018E2C4 = 0x8018E2C4; //segment:ovl_ending +D_ending_8018E2CC = 0x8018E2CC; //segment:ovl_ending +D_ending_8018E4E0 = 0x8018E4E0; //segment:ovl_ending +D_ending_8018E4E4 = 0x8018E4E4; //segment:ovl_ending +D_ending_8018E4E8 = 0x8018E4E8; //segment:ovl_ending +D_ending_8018E500 = 0x8018E500; //segment:ovl_ending +D_ending_8018E52C = 0x8018E52C; //segment:ovl_ending +D_ending_8018E738 = 0x8018E738; //segment:ovl_ending +D_ending_8018E990 = 0x8018E990; //segment:ovl_ending +D_ending_8018E99C = 0x8018E99C; //segment:ovl_ending +D_ending_8018F2F0 = 0x8018F2F0; //segment:ovl_ending +D_ending_8018F610 = 0x8018F610; //segment:ovl_ending +D_ending_8018F614 = 0x8018F614; //segment:ovl_ending +D_ending_8018F618 = 0x8018F618; //segment:ovl_ending +D_ending_8018F61C = 0x8018F61C; //segment:ovl_ending +D_ending_8018F620 = 0x8018F620; //segment:ovl_ending +D_ending_80190430 = 0x80190430; //segment:ovl_ending +D_ending_80190470 = 0x80190470; //segment:ovl_ending +D_ending_80190478 = 0x80190478; //segment:ovl_ending +D_ending_80190480 = 0x80190480; //segment:ovl_ending +D_ending_80190490 = 0x80190490; //segment:ovl_ending +D_ending_80190494 = 0x80190494; //segment:ovl_ending +D_ending_80190498 = 0x80190498; //segment:ovl_ending + +func_unused_8017E7A0 = 0x8017E7A0; //segment:ovl_unused +D_unused_8017E7B0 = 0x8017E7B0; //segment:ovl_unused +D_unused_8017E840 = 0x8017E840; + +gDramStack = 0x80281000; //size:0x400 segment:buffers defined:true +gOSYieldData = 0x80281400; //size:0xC00 segment:buffers defined:true +gZBuffer = 0x80282000; //size:0x25800 segment:buffers defined:true +gTaskOutputBuffer = 0x802A7800; //size:0x30000 name_end:gTaskOutputBufferEnd segment:buffers defined:true +gAudioHeap = 0x802D7800; //size:0xB0000 segment:buffers defined:true +gTextureRenderBuffer = 0x80387800; //size:0x7880 segment:buffers defined:true +gFillBuffer = 0x8038F080; //size:0x780 segment:buffers defined:true +gFrameBuffers = 0x8038F800; //size:0x70800 segment:buffers defined:true +D_8038F300 = 0x8038F300; //ignore:true diff --git a/linker_scripts/jp/rev0/symbol_addrs_fix.txt b/linker_scripts/jp/rev0/symbol_addrs_fix.txt new file mode 100644 index 00000000..a3b653f0 --- /dev/null +++ b/linker_scripts/jp/rev0/symbol_addrs_fix.txt @@ -0,0 +1,81 @@ +// hallucinated symbols +D_7FFFFFFE = 0x7FFFFFFE; //ignore:true +D_80000000 = 0x80000000; //ignore:true +D_80000001 = 0x80000001; //ignore:true +D_80000002 = 0x80000002; //ignore:true +D_80000003 = 0x80000003; //ignore:true +D_80000004 = 0x80000004; //ignore:true +D_80000006 = 0x80000006; //ignore:true +D_80000008 = 0x80000008; //ignore:true +D_8000000A = 0x8000000A; //ignore:true +D_8000000C = 0x8000000C; //ignore:true +D_8000000D = 0x8000000D; //ignore:true +D_8000000E = 0x8000000E; //ignore:true +D_8000000F = 0x8000000F; //ignore:true +D_80000014 = 0x80000014; //ignore:true +D_80000018 = 0x80000018; //ignore:true +D_8000001C = 0x8000001C; //ignore:true +D_80000024 = 0x80000024; //ignore:true +D_800D0000 = 0x800D0000; //ignore:true +D_800F0032 = 0x800F0032; //ignore:true +D_80100032 = 0x80100032; //ignore:true +D_80110000 = 0x80110000; //ignore:true +D_80110001 = 0x80110001; //ignore:true +D_801100C8 = 0x801100C8; //ignore:true +D_80120000 = 0x80120000; //ignore:true +D_80120001 = 0x80120001; //ignore:true +D_801200C8 = 0x801200C8; //ignore:true +D_80130001 = 0x80130001; //ignore:true +D_801300C8 = 0x801300C8; //ignore:true +D_80180000 = 0x80180000; //ignore:true +D_80140001 = 0x80140001; //ignore:true +D_80150000 = 0x80150000; //ignore:true +D_80160000 = 0x80160000; //ignore:true +D_80170000 = 0x80170000; //ignore:true +D_80170001 = 0x80170001; //ignore:true +D_80180000 = 0x80180000; //ignore:true +D_80180001 = 0x80180001; //ignore:true +D_801B0130 = 0x801B0130; //ignore:true +D_801C0001 = 0x801C0001; //ignore:true + +// mirage symbols +D_6000000 = 0x0A000000; //ignore:true +D_7000000 = 0x0A000000; //ignore:true +D_8000000 = 0x0A000000; //ignore:true +D_A000000 = 0x0A000000; //ignore:true +D_F000000 = 0x0F000000; //ignore:true + +// redundant rodata +D_800DB02C = 0x800DB02C; // force_migration:True +D_800DB24C = 0x800DB24C; // force_migration:True +D_800DB238 = 0x800DB238; // force_migration:True +D_800DE430 = 0x800DE430; // force_migration:True +D_800DE440 = 0x800DE440; // force_migration:True +D_800DE464 = 0x800DE464; // force_migration:True +D_800DF21C = 0x800DF21C; // force_migration:True +D_i1_80192474 = 0x80192474; // force_migration:True segment:ovl_i1 +D_i3_801B89CC = 0x801B89CC; // force_migration:True segment:ovl_i3 +D_i3_801B89D8 = 0x801B89D8; // force_migration:True segment:ovl_i3 +D_i3_801B89E0 = 0x801B89E0; // force_migration:True segment:ovl_i3 +D_i3_801B8A08 = 0x801B8A08; // force_migration:True segment:ovl_i3 +D_i4_80196D64 = 0x80196D64; // force_migration:True segment:ovl_i4 +D_i5_801B2B18 = 0x801B2B18; // force_migration:True segment:ovl_i5 +D_i5_801B2B4C = 0x801B2B4C; // force_migration:True segment:ovl_i5 +D_i5_801B2DE0 = 0x801B2DE0; // force_migration:True segment:ovl_i5 +D_i5_801B2DF4 = 0x801B2DF4; // force_migration:True segment:ovl_i5 +D_i6_8019E810 = 0x8019E810; // force_migration:True segment:ovl_i6 + +// symbol collisions +D_i1_80192958 = 0x80192958; //segment:ovl_i1 // i4 func collision +D_menu_801AE894 = 0x801AE894; // force_migration:True segment:ovl_menu // i5 data collision +jtbl_menu_801AED88 = 0x801AED88; // force_migration:True segment:ovl_menu // i3 func collision +D_ending_8018D5D4 = 0x8018D5D4; // force_migration:True segment:ovl_ending // i6 func collision +D_ending_8018DC28 = 0x8018DC28; // force_migration:True segment:ovl_ending // i6 func collision + +// hidden vars +D_800C5118 = 0x800C5118; +D_800DB5D4 = 0x800DB5D4; +D_i5_801B1E6C = 0x801B1E6C; // segment:ovl_i5 + +// that stupid thing where i6 sets a value in ending +D_i6_8018DD90 = 0x8018DD90; //ignore:true segment:ovl_i6 diff --git a/linker_scripts/jp/rev0/symbol_addrs_migrate.txt b/linker_scripts/jp/rev0/symbol_addrs_migrate.txt deleted file mode 100644 index fe7b30ec..00000000 --- a/linker_scripts/jp/rev0/symbol_addrs_migrate.txt +++ /dev/null @@ -1,27 +0,0 @@ -D_800DB02C = 0x800DB02C; // force_migration:True -D_800DB24C = 0x800DB24C; // force_migration:True -D_800DB238 = 0x800DB238; // force_migration:True -D_800DE430 = 0x800DE430; // force_migration:True -D_800DE440 = 0x800DE440; // force_migration:True -D_800DE464 = 0x800DE464; // force_migration:True -D_800DF21C = 0x800DF21C; // force_migration:True -D_i1_80192474 = 0x80192474; // force_migration:True segment:ovl_i1 -D_i3_801B89CC = 0x801B89CC; // force_migration:True segment:ovl_i3 -D_i3_801B89D8 = 0x801B89D8; // force_migration:True segment:ovl_i3 -D_i3_801B89E0 = 0x801B89E0; // force_migration:True segment:ovl_i3 -D_i3_801B8A08 = 0x801B8A08; // force_migration:True segment:ovl_i3 -D_i4_80196D64 = 0x80196D64; // force_migration:True segment:ovl_i4 -D_i5_801B1E6C = 0x801B1E6C; // segment:ovl_i5 -D_i5_801B2B18 = 0x801B2B18; // force_migration:True segment:ovl_i5 -D_i5_801B2B4C = 0x801B2B4C; // force_migration:True segment:ovl_i5 -D_i5_801B2DE0 = 0x801B2DE0; // force_migration:True segment:ovl_i5 -D_i5_801B2DF4 = 0x801B2DF4; // force_migration:True segment:ovl_i5 -D_i6_8019E810 = 0x8019E810; // force_migration:True segment:ovl_i6 -D_menu_801AE890 = 0x801AE890; // force_migration:True segment:ovl_menu -jtbl_menu_801AED88 = 0x801AED88; // force_migration:True segment:ovl_menu -D_ending_8018D5D0 = 0x8018D5D0; // force_migration:True segment:ovl_ending -D_ending_8018DC24 = 0x8018DC24; // force_migration:True segment:ovl_ending -D_ending_801B2B18 = 0x801B2B18; // force_migration:True segment:ovl_ending - -D_800C5118 = 0x800C5118; -D_800DB5D4 = 0x800DB5D4; diff --git a/linker_scripts/jp/rev0/undefined_syms.ld b/linker_scripts/jp/rev0/undefined_syms.ld index 2956b524..90349f3e 100644 --- a/linker_scripts/jp/rev0/undefined_syms.ld +++ b/linker_scripts/jp/rev0/undefined_syms.ld @@ -1,9 +1,8 @@ -D_1 = 0x1; D_E93C0 = 0xE93C0; D_E9950 = 0xE9950; -D_FFFFF = 0xFFFFF; D_124920 = 0x124920; D_143A40 = 0x143A40; + D_1000170 = 0x1000170; D_1001090 = 0x1001090; D_1001FB0 = 0x1001FB0; @@ -44,7 +43,6 @@ D_100F858 = 0x100F858; D_100F890 = 0x100F890; D_100FF60 = 0x100FF60; D_1010040 = 0x1010040; -D_1010101 = 0x1010101; D_1010440 = 0x1010440; D_1010450 = 0x1010450; D_10105D0 = 0x10105D0; @@ -1098,2405 +1096,7 @@ D_F00F200 = 0xF00F200; D_F0103D0 = 0xF0103D0; D_F014180 = 0xF014180; D_F014310 = 0xF014310; -D_7FFFFFFE = 0x7FFFFFFE; -D_80000000 = 0x80000000; -D_80000002 = 0x80000002; -D_80000003 = 0x80000003; -D_80000004 = 0x80000004; -D_80000006 = 0x80000006; -D_80000008 = 0x80000008; -D_8000000A = 0x8000000A; -D_8000000C = 0x8000000C; -D_8000000D = 0x8000000D; -D_8000000E = 0x8000000E; -D_8000000F = 0x8000000F; -D_80000014 = 0x80000014; -D_80000018 = 0x80000018; -D_8000001C = 0x8000001C; -D_80000024 = 0x80000024; -D_80004DB8 = 0x80004DB8; -D_8001F0A0 = 0x8001F0A0; -D_8001F4F0 = 0x8001F4F0; -D_8001F6BC = 0x8001F6BC; -D_800255E0 = 0x800255E0; -D_80025EB8 = 0x80025EB8; -D_800C6943 = 0x800C6943; -D_800C696B = 0x800C696B; -D_800CD95F = 0x800CD95F; -D_800CF1E6 = 0x800CF1E6; -D_800CFC68 = 0x800CFC68; -D_800CFE89 = 0x800CFE89; -D_800CFE8D = 0x800CFE8D; -D_800CFE9E = 0x800CFE9E; -D_800E4410 = 0x800E4410; -D_800E63F8 = 0x800E63F8; -D_800E813E = 0x800E813E; -D_800E8142 = 0x800E8142; -D_800E87C0 = 0x800E87C0; -D_800E87CC = 0x800E87CC; -D_800E87D2 = 0x800E87D2; -D_800E87D8 = 0x800E87D8; -D_800E87DA = 0x800E87DA; -D_800E87DB = 0x800E87DB; -D_800E87EA = 0x800E87EA; -D_800E87F0 = 0x800E87F0; -D_800E87F1 = 0x800E87F1; -D_800E87F2 = 0x800E87F2; -D_800E87F3 = 0x800E87F3; -D_800E87F4 = 0x800E87F4; -D_800E87F8 = 0x800E87F8; -D_800E87F9 = 0x800E87F9; -D_800E87FA = 0x800E87FA; -D_800E87FB = 0x800E87FB; -D_800E87FC = 0x800E87FC; -D_800E8800 = 0x800E8800; -D_800E8802 = 0x800E8802; -D_800E8803 = 0x800E8803; -D_800E8804 = 0x800E8804; -D_800E8806 = 0x800E8806; -D_800E8808 = 0x800E8808; -D_800E8809 = 0x800E8809; -D_800E880A = 0x800E880A; -D_800E880C = 0x800E880C; -D_800E880E = 0x800E880E; -D_800E880F = 0x800E880F; -D_800E8810 = 0x800E8810; -D_800E8812 = 0x800E8812; -D_800E8814 = 0x800E8814; -D_800E8815 = 0x800E8815; -D_800E8816 = 0x800E8816; -D_800E8818 = 0x800E8818; -D_800E8830 = 0x800E8830; -D_800E8840 = 0x800E8840; -D_800E99E0 = 0x800E99E0; -D_800EAB90 = 0x800EAB90; -D_800EBD40 = 0x800EBD40; -D_800ECEF0 = 0x800ECEF0; -D_800ECEF4 = 0x800ECEF4; -D_800ECEF8 = 0x800ECEF8; -D_800ECF00 = 0x800ECF00; -D_800ECF08 = 0x800ECF08; -D_800ECF10 = 0x800ECF10; -D_800ECF50 = 0x800ECF50; -D_800ECF68 = 0x800ECF68; -D_800ED030 = 0x800ED030; -D_800ED048 = 0x800ED048; -D_800ED050 = 0x800ED050; -D_800ED068 = 0x800ED068; -D_800ED080 = 0x800ED080; -D_800ED088 = 0x800ED088; -D_800ED0A0 = 0x800ED0A0; -D_800ED120 = 0x800ED120; -D_800ED138 = 0x800ED138; -D_800ED178 = 0x800ED178; -D_800ED190 = 0x800ED190; -D_800ED198 = 0x800ED198; -D_800ED1B0 = 0x800ED1B0; -D_800ED1B8 = 0x800ED1B8; -D_800ED1D0 = 0x800ED1D0; -D_800ED1E0 = 0x800ED1E0; -D_800ED1F8 = 0x800ED1F8; -D_800ED200 = 0x800ED200; -D_800ED218 = 0x800ED218; -D_800ED238 = 0x800ED238; -D_800ED250 = 0x800ED250; -D_800ED258 = 0x800ED258; -D_800ED270 = 0x800ED270; -D_800ED278 = 0x800ED278; -D_800ED290 = 0x800ED290; -D_800ED2D0 = 0x800ED2D0; -D_800ED2E8 = 0x800ED2E8; -D_800ED2F0 = 0x800ED2F0; -D_80140000 = 0x80140000; -D_80142D90 = 0x80142D90; -D_80142D94 = 0x80142D94; -D_80142D98 = 0x80142D98; -D_80142D9C = 0x80142D9C; -D_80142DA0 = 0x80142DA0; -D_80142DA4 = 0x80142DA4; -D_80142DA8 = 0x80142DA8; -D_80142DAC = 0x80142DAC; -D_80142DB0 = 0x80142DB0; -D_80142DB4 = 0x80142DB4; -D_80142DB8 = 0x80142DB8; -D_80142DBC = 0x80142DBC; -D_80142DC0 = 0x80142DC0; -D_80142DC1 = 0x80142DC1; -D_80142DC4 = 0x80142DC4; -D_80142DC5 = 0x80142DC5; -D_80142DC6 = 0x80142DC6; -D_80142DC7 = 0x80142DC7; -D_80142DC8 = 0x80142DC8; -D_80142DCA = 0x80142DCA; -D_80143DD0 = 0x80143DD0; -D_80144F80 = 0x80144F80; -D_80146130 = 0x80146130; -D_801462E0 = 0x801462E0; -D_801462E4 = 0x801462E4; -D_801462E8 = 0x801462E8; -D_801462EC = 0x801462EC; -D_801462F0 = 0x801462F0; -D_801462F4 = 0x801462F4; -D_80146300 = 0x80146300; -D_80146308 = 0x80146308; -D_80146B08 = 0x80146B08; -D_80146B10 = 0x80146B10; -D_80147310 = 0x80147310; -D_8014FB10 = 0x8014FB10; -D_8014FB20 = 0x8014FB20; -D_8014FEA0 = 0x8014FEA0; -D_801500A0 = 0x801500A0; -D_801502A0 = 0x801502A0; -D_80150C50 = 0x80150C50; -D_80150C68 = 0x80150C68; -D_80150C6C = 0x80150C6C; -D_80150C70 = 0x80150C70; -D_80150C88 = 0x80150C88; -D_80151084 = 0x80151084; -D_80151088 = 0x80151088; -D_80151488 = 0x80151488; -D_80151C94 = 0x80151C94; -D_80151C98 = 0x80151C98; -D_80151C9C = 0x80151C9C; -D_80151CA0 = 0x80151CA0; -D_80151CA4 = 0x80151CA4; -D_80151CA8 = 0x80151CA8; -D_80151CAC = 0x80151CAC; -D_80151CB0 = 0x80151CB0; -D_80151CC0 = 0x80151CC0; -D_80151CD0 = 0x80151CD0; -D_80151D90 = 0x80151D90; -D_80151DA0 = 0x80151DA0; -D_801535A0 = 0x801535A0; -D_801535AC = 0x801535AC; -D_80154860 = 0x80154860; -D_80154868 = 0x80154868; -D_80154870 = 0x80154870; -D_80154878 = 0x80154878; -D_801549B8 = 0x801549B8; -D_801549C0 = 0x801549C0; -D_80154DC0 = 0x80154DC0; -D_80154DC8 = 0x80154DC8; -D_801551C8 = 0x801551C8; -D_80155218 = 0x80155218; -D_80155818 = 0x80155818; -D_80155898 = 0x80155898; -D_801558B8 = 0x801558B8; -D_801558E0 = 0x801558E0; -D_801558E8 = 0x801558E8; -D_80155CE8 = 0x80155CE8; -D_80155F30 = 0x80155F30; -D_80156648 = 0x80156648; -D_80156650 = 0x80156650; -D_801566D0 = 0x801566D0; -D_80156790 = 0x80156790; -D_80156950 = 0x80156950; -D_80156960 = 0x80156960; -D_80156964 = 0x80156964; -D_80156968 = 0x80156968; -D_80156980 = 0x80156980; -D_80156990 = 0x80156990; -D_80156D90 = 0x80156D90; -D_80156DF0 = 0x80156DF0; -D_801570E0 = 0x801570E0; -D_801570E6 = 0x801570E6; -D_801570F0 = 0x801570F0; -D_801570F2 = 0x801570F2; -D_801570F3 = 0x801570F3; -D_801570F4 = 0x801570F4; -D_801570F8 = 0x801570F8; -D_80157100 = 0x80157100; -D_80157108 = 0x80157108; -D_80157110 = 0x80157110; -D_80157120 = 0x80157120; -D_80157150 = 0x80157150; -D_80157160 = 0x80157160; -D_80157170 = 0x80157170; -D_80157180 = 0x80157180; -D_80157184 = 0x80157184; -D_80157314 = 0x80157314; -D_80157318 = 0x80157318; -D_80157350 = 0x80157350; -D_80157354 = 0x80157354; -D_801574E4 = 0x801574E4; -D_801574E8 = 0x801574E8; -D_80157502 = 0x80157502; -D_8015750E = 0x8015750E; -D_80157520 = 0x80157520; -D_80157524 = 0x80157524; -D_801576B4 = 0x801576B4; -D_801576B8 = 0x801576B8; -D_801576F0 = 0x801576F0; -D_801576FC = 0x801576FC; -D_80157880 = 0x80157880; -D_80157888 = 0x80157888; -D_80157890 = 0x80157890; -D_80157D90 = 0x80157D90; -D_80157D98 = 0x80157D98; -D_80157D9C = 0x80157D9C; -D_80157DA0 = 0x80157DA0; -D_801582A8 = 0x801582A8; -D_801582B0 = 0x801582B0; -D_801582C0 = 0x801582C0; -D_801582C8 = 0x801582C8; -D_801582D8 = 0x801582D8; -D_801582E8 = 0x801582E8; -D_80158328 = 0x80158328; -D_80158368 = 0x80158368; -D_80158468 = 0x80158468; -D_80158469 = 0x80158469; -D_8015846C = 0x8015846C; -D_80159470 = 0x80159470; -D_80159478 = 0x80159478; -D_80159510 = 0x80159510; -D_801595C4 = 0x801595C4; -D_80159710 = 0x80159710; -D_80159744 = 0x80159744; -D_8015985C = 0x8015985C; -D_801598CC = 0x801598CC; -D_801599A8 = 0x801599A8; -D_8015BF28 = 0x8015BF28; -D_8015BF94 = 0x8015BF94; -D_8015DF28 = 0x8015DF28; -D_8015DF94 = 0x8015DF94; -D_8015DFF0 = 0x8015DFF0; -D_8015E000 = 0x8015E000; -D_8015E010 = 0x8015E010; -D_8015E020 = 0x8015E020; -D_8015E030 = 0x8015E030; -D_8015E040 = 0x8015E040; -D_8015E240 = 0x8015E240; -D_8015EC40 = 0x8015EC40; -D_8015EC44 = 0x8015EC44; -D_8015EC48 = 0x8015EC48; -D_8015F188 = 0x8015F188; -D_8015F1A0 = 0x8015F1A0; -D_8015F1E0 = 0x8015F1E0; -D_8015F1F8 = 0x8015F1F8; -D_8015F238 = 0x8015F238; -D_8015F250 = 0x8015F250; -D_8015F350 = 0x8015F350; -D_8015F950 = 0x8015F950; -D_8015F968 = 0x8015F968; -D_8015F970 = 0x8015F970; -D_8015F988 = 0x8015F988; -D_80160000 = 0x80160000; -D_80160988 = 0x80160988; -D_8016098C = 0x8016098C; -D_80160990 = 0x80160990; -D_80160998 = 0x80160998; -D_80160A98 = 0x80160A98; -D_80160B98 = 0x80160B98; -D_80160B99 = 0x80160B99; -D_80160B9A = 0x80160B9A; -D_80160B9B = 0x80160B9B; -D_80160B9C = 0x80160B9C; -D_80160BA0 = 0x80160BA0; -D_80160BA4 = 0x80160BA4; -D_80160BA8 = 0x80160BA8; -D_80160BAC = 0x80160BAC; -D_80160BB0 = 0x80160BB0; -D_80160BB8 = 0x80160BB8; -D_80160BC2 = 0x80160BC2; -D_80160BD0 = 0x80160BD0; -D_80160BD4 = 0x80160BD4; -D_80160BD8 = 0x80160BD8; -D_80160BDC = 0x80160BDC; -D_80160BE0 = 0x80160BE0; -D_80160BE4 = 0x80160BE4; -D_80160BE6 = 0x80160BE6; -D_80160BE8 = 0x80160BE8; -D_80160BEC = 0x80160BEC; -D_80160BF0 = 0x80160BF0; -D_80160BF4 = 0x80160BF4; -D_80160BF8 = 0x80160BF8; -D_80160C00 = 0x80160C00; -D_80160C04 = 0x80160C04; -D_80160C08 = 0x80160C08; -D_80160CA8 = 0x80160CA8; -D_80160CAC = 0x80160CAC; -D_80160CB0 = 0x80160CB0; -D_80160CBC = 0x80160CBC; -D_80160CC2 = 0x80160CC2; -D_80160CC4 = 0x80160CC4; -D_80160CC8 = 0x80160CC8; -D_80160CCC = 0x80160CCC; -D_80160CD0 = 0x80160CD0; -D_80160D40 = 0x80160D40; -D_80161540 = 0x80161540; -D_80161548 = 0x80161548; -D_80161558 = 0x80161558; -D_8016155C = 0x8016155C; -D_80161560 = 0x80161560; -D_80161660 = 0x80161660; -D_80161760 = 0x80161760; -D_80161780 = 0x80161780; -D_801617A0 = 0x801617A0; -D_801617DC = 0x801617DC; -D_801617E0 = 0x801617E0; -D_801617E1 = 0x801617E1; -D_80161808 = 0x80161808; -D_80161820 = 0x80161820; -D_80161830 = 0x80161830; -D_801618B0 = 0x801618B0; -D_801618C0 = 0x801618C0; -D_801618C8 = 0x801618C8; -D_801618D0 = 0x801618D0; -D_801618D8 = 0x801618D8; -D_801618DC = 0x801618DC; -D_801618E0 = 0x801618E0; -D_801618E8 = 0x801618E8; -D_801618F0 = 0x801618F0; -D_80161AA0 = 0x80161AA0; -D_80162AA0 = 0x80162AA0; -D_80162AB8 = 0x80162AB8; -D_80162AD0 = 0x80162AD0; -D_80162AD2 = 0x80162AD2; -D_80162AD4 = 0x80162AD4; -D_80162AE8 = 0x80162AE8; -D_80162AEA = 0x80162AEA; -D_80162AEC = 0x80162AEC; -D_80162B00 = 0x80162B00; -D_80162B10 = 0x80162B10; -D_80162CC0 = 0x80162CC0; -D_80163CC0 = 0x80163CC0; -D_80163CD8 = 0x80163CD8; -D_80163CE0 = 0x80163CE0; -D_80163CF0 = 0x80163CF0; -D_80163D2C = 0x80163D2C; -D_80163D30 = 0x80163D30; -D_80163D34 = 0x80163D34; -D_80163D35 = 0x80163D35; -D_80163D36 = 0x80163D36; -D_80163D37 = 0x80163D37; -D_80163D38 = 0x80163D38; -D_80163D3C = 0x80163D3C; -D_80163DB0 = 0x80163DB0; -D_80163DF0 = 0x80163DF0; -D_80163DF8 = 0x80163DF8; -D_80163E30 = 0x80163E30; -D_80163E34 = 0x80163E34; -D_80163E38 = 0x80163E38; -D_80163E3C = 0x80163E3C; -D_80163E40 = 0x80163E40; -D_80163E50 = 0x80163E50; -D_80163E58 = 0x80163E58; -D_80163E70 = 0x80163E70; -D_80164E70 = 0x80164E70; -D_80165020 = 0x80165020; -D_80165024 = 0x80165024; -D_80165025 = 0x80165025; -D_80165026 = 0x80165026; -D_80165028 = 0x80165028; -D_8016502C = 0x8016502C; -D_80165094 = 0x80165094; -D_801650A0 = 0x801650A0; -D_801650A4 = 0x801650A4; -D_801650A8 = 0x801650A8; -D_801650AC = 0x801650AC; -D_801650B0 = 0x801650B0; -D_801650B4 = 0x801650B4; -D_801650B8 = 0x801650B8; -D_801650BC = 0x801650BC; -D_801650C0 = 0x801650C0; -D_801650C1 = 0x801650C1; -D_801650C4 = 0x801650C4; -D_801650C8 = 0x801650C8; -D_801650D0 = 0x801650D0; -D_801650DC = 0x801650DC; -D_801650E0 = 0x801650E0; -D_801650E4 = 0x801650E4; -D_801650F0 = 0x801650F0; -D_80165100 = 0x80165100; -D_80165104 = 0x80165104; -D_80165108 = 0x80165108; -D_8016510C = 0x8016510C; -D_80165110 = 0x80165110; -D_80165114 = 0x80165114; -D_80165118 = 0x80165118; -D_8016511C = 0x8016511C; -D_80165120 = 0x80165120; -D_80165124 = 0x80165124; -D_80165128 = 0x80165128; -D_80166B40 = 0x80166B40; -D_80166B50 = 0x80166B50; -D_80166B80 = 0x80166B80; -D_80166B8C = 0x80166B8C; -D_80166B98 = 0x80166B98; -D_80166BB0 = 0x80166BB0; -D_80166BB8 = 0x80166BB8; -D_80166CB8 = 0x80166CB8; -D_80166CE8 = 0x80166CE8; -D_80166D18 = 0x80166D18; -D_80166D20 = 0x80166D20; -D_80166D48 = 0x80166D48; -D_80166D58 = 0x80166D58; -D_80166D70 = 0x80166D70; -D_80166D74 = 0x80166D74; -D_80166D78 = 0x80166D78; -D_80166D80 = 0x80166D80; -D_80166D88 = 0x80166D88; -D_80166D8C = 0x80166D8C; -D_80166D90 = 0x80166D90; -D_80166DD0 = 0x80166DD0; -D_80166E10 = 0x80166E10; -D_80166E14 = 0x80166E14; -D_80166E18 = 0x80166E18; -D_80166E1C = 0x80166E1C; -D_80166E20 = 0x80166E20; -D_80166E24 = 0x80166E24; -D_80166E30 = 0x80166E30; -D_80166E40 = 0x80166E40; -D_80166E44 = 0x80166E44; -D_80166E48 = 0x80166E48; -D_80166E4C = 0x80166E4C; -D_80166E50 = 0x80166E50; -D_80166E54 = 0x80166E54; -D_80166E58 = 0x80166E58; -D_80166E5C = 0x80166E5C; -D_80166E60 = 0x80166E60; -D_80166E88 = 0x80166E88; -D_80166E9C = 0x80166E9C; -D_80166EB0 = 0x80166EB0; -D_80166EB4 = 0x80166EB4; -D_80166ED8 = 0x80166ED8; -D_80166EDC = 0x80166EDC; -D_80166F00 = 0x80166F00; -D_80166F04 = 0x80166F04; -D_80166F08 = 0x80166F08; -D_80166F0C = 0x80166F0C; -D_80166F10 = 0x80166F10; -D_80166F50 = 0x80166F50; -D_80166F54 = 0x80166F54; -D_80166F58 = 0x80166F58; -D_80166F5C = 0x80166F5C; -D_80166F60 = 0x80166F60; -D_80166F64 = 0x80166F64; -D_80166F68 = 0x80166F68; -D_80166FA0 = 0x80166FA0; -D_80166FA4 = 0x80166FA4; -D_80166FA8 = 0x80166FA8; -D_80166FAC = 0x80166FAC; -D_80166FB0 = 0x80166FB0; -D_80166FF0 = 0x80166FF0; -D_80166FF4 = 0x80166FF4; -D_80166FF8 = 0x80166FF8; -D_80167000 = 0x80167000; -D_8016700C = 0x8016700C; -D_80167010 = 0x80167010; -D_80167014 = 0x80167014; -D_80167018 = 0x80167018; -D_80167054 = 0x80167054; -D_80167058 = 0x80167058; -D_8016705C = 0x8016705C; -D_80167060 = 0x80167060; -D_80167064 = 0x80167064; -D_80167068 = 0x80167068; -D_8016706C = 0x8016706C; -D_80167070 = 0x80167070; -D_80167074 = 0x80167074; -D_80167078 = 0x80167078; -D_8016707C = 0x8016707C; -D_80167080 = 0x80167080; -D_80167084 = 0x80167084; -D_80167088 = 0x80167088; -D_8016708C = 0x8016708C; -D_80167090 = 0x80167090; -D_80167094 = 0x80167094; -D_80167098 = 0x80167098; -D_8016709C = 0x8016709C; -D_801670A0 = 0x801670A0; -D_801670A4 = 0x801670A4; -D_801670A8 = 0x801670A8; -D_801670B0 = 0x801670B0; -D_801670B4 = 0x801670B4; -D_801670B8 = 0x801670B8; -D_801670BC = 0x801670BC; -D_801670C0 = 0x801670C0; -D_801670C4 = 0x801670C4; -D_801670C8 = 0x801670C8; -D_801670CC = 0x801670CC; -D_801670D0 = 0x801670D0; -D_801670D4 = 0x801670D4; -D_801670D8 = 0x801670D8; -D_801670DC = 0x801670DC; -D_801670E0 = 0x801670E0; -D_801670E4 = 0x801670E4; -D_801670E8 = 0x801670E8; -D_801670F0 = 0x801670F0; -D_801670F4 = 0x801670F4; -D_801670F8 = 0x801670F8; -D_801670FC = 0x801670FC; -D_80167100 = 0x80167100; -D_80167104 = 0x80167104; -D_80167108 = 0x80167108; -D_8016710C = 0x8016710C; -D_80167110 = 0x80167110; -D_80167114 = 0x80167114; -D_80167118 = 0x80167118; -D_8016711C = 0x8016711C; -D_80167120 = 0x80167120; -D_80167124 = 0x80167124; -D_80167128 = 0x80167128; -D_8016712C = 0x8016712C; -D_80167130 = 0x80167130; -D_80167134 = 0x80167134; -D_80167138 = 0x80167138; -D_8016713C = 0x8016713C; -D_80167140 = 0x80167140; -D_801671B0 = 0x801671B0; -D_801671B2 = 0x801671B2; -D_801671B3 = 0x801671B3; -D_801671B4 = 0x801671B4; -D_801671B8 = 0x801671B8; -D_801671BC = 0x801671BC; -D_801671C0 = 0x801671C0; -D_801671C4 = 0x801671C4; -D_801671C8 = 0x801671C8; -D_801671CC = 0x801671CC; -D_801671D0 = 0x801671D0; -D_801671D4 = 0x801671D4; -D_801671D8 = 0x801671D8; -D_801671DC = 0x801671DC; -D_801671DE = 0x801671DE; -D_801671E0 = 0x801671E0; -D_801671E2 = 0x801671E2; -D_801671E4 = 0x801671E4; -D_801671F4 = 0x801671F4; -D_801671F8 = 0x801671F8; -D_801671FA = 0x801671FA; -D_801671FC = 0x801671FC; -D_80167200 = 0x80167200; -D_80167204 = 0x80167204; -D_80167210 = 0x80167210; -D_80167214 = 0x80167214; -D_80167218 = 0x80167218; -D_8016721C = 0x8016721C; -D_80167220 = 0x80167220; -D_80167224 = 0x80167224; -D_80167228 = 0x80167228; -D_8016722C = 0x8016722C; -D_80167230 = 0x80167230; -D_80167231 = 0x80167231; -D_80167234 = 0x80167234; -D_80167238 = 0x80167238; -D_8016723C = 0x8016723C; -D_80167240 = 0x80167240; -D_80167248 = 0x80167248; -D_8016724B = 0x8016724B; -D_80167258 = 0x80167258; -D_80167268 = 0x80167268; -D_801672A0 = 0x801672A0; -D_801672B0 = 0x801672B0; -D_80168BA0 = 0x80168BA0; -D_80169780 = 0x80169780; -D_80169782 = 0x80169782; -D_80169784 = 0x80169784; -D_80169788 = 0x80169788; -D_8016978C = 0x8016978C; -D_80169794 = 0x80169794; -D_80169798 = 0x80169798; -D_8016979C = 0x8016979C; -D_801697D0 = 0x801697D0; -D_801697D4 = 0x801697D4; -D_801697D8 = 0x801697D8; -D_801697E8 = 0x801697E8; -D_801697FC = 0x801697FC; -D_80169808 = 0x80169808; -D_80169836 = 0x80169836; -D_80169838 = 0x80169838; -D_80169846 = 0x80169846; -D_80169849 = 0x80169849; -D_8016984E = 0x8016984E; -D_80169864 = 0x80169864; -D_80169866 = 0x80169866; -D_80169868 = 0x80169868; -D_8016986C = 0x8016986C; -D_80169870 = 0x80169870; -D_80169878 = 0x80169878; -D_80169880 = 0x80169880; -D_80169890 = 0x80169890; -D_80169894 = 0x80169894; -D_80169898 = 0x80169898; -D_8016989C = 0x8016989C; -D_801698A0 = 0x801698A0; -D_801698A4 = 0x801698A4; -D_801698A8 = 0x801698A8; -D_801698AC = 0x801698AC; -D_801698B0 = 0x801698B0; -D_801698E0 = 0x801698E0; -D_801698E4 = 0x801698E4; -D_80169908 = 0x80169908; -D_80169A00 = 0x80169A00; -D_80169A74 = 0x80169A74; -D_80169A78 = 0x80169A78; -D_80169A7C = 0x80169A7C; -D_80169A80 = 0x80169A80; -D_80169AF0 = 0x80169AF0; -D_80169AFC = 0x80169AFC; -D_80169B2C = 0x80169B2C; -D_80169B5A = 0x80169B5A; -D_80169B60 = 0x80169B60; -D_80169B64 = 0x80169B64; -D_80169B6C = 0x80169B6C; -D_80169B70 = 0x80169B70; -D_80169B74 = 0x80169B74; -D_80169B88 = 0x80169B88; -D_80169BD4 = 0x80169BD4; -D_80169BD8 = 0x80169BD8; -D_80169BFC = 0x80169BFC; -D_80169CF4 = 0x80169CF4; -D_80169D68 = 0x80169D68; -D_80169D6C = 0x80169D6C; -D_80169D70 = 0x80169D70; -D_80169D74 = 0x80169D74; -D_80169D80 = 0x80169D80; -D_80169DE4 = 0x80169DE4; -D_80169DF0 = 0x80169DF0; -D_80169E20 = 0x80169E20; -D_80169E4E = 0x80169E4E; -D_80169E54 = 0x80169E54; -D_80169E58 = 0x80169E58; -D_80169E68 = 0x80169E68; -D_80169E7C = 0x80169E7C; -D_80169ECC = 0x80169ECC; -D_80169EF0 = 0x80169EF0; -D_80169FE8 = 0x80169FE8; -D_8016A05C = 0x8016A05C; -D_8016A060 = 0x8016A060; -D_8016A064 = 0x8016A064; -D_8016A068 = 0x8016A068; -D_8016A06C = 0x8016A06C; -D_8016A098 = 0x8016A098; -D_8016A114 = 0x8016A114; -D_8016A142 = 0x8016A142; -D_8016A148 = 0x8016A148; -D_8016A14C = 0x8016A14C; -D_8016A15C = 0x8016A15C; -D_8016A170 = 0x8016A170; -D_8016A1E4 = 0x8016A1E4; -D_8016A350 = 0x8016A350; -D_8016A354 = 0x8016A354; -D_8016A358 = 0x8016A358; -D_8016A35C = 0x8016A35C; -D_8016A3AC = 0x8016A3AC; -D_8016A3BC = 0x8016A3BC; -D_8016A408 = 0x8016A408; -D_8016A438 = 0x8016A438; -D_8016A43C = 0x8016A43C; -D_8016A440 = 0x8016A440; -D_8016A44C = 0x8016A44C; -D_8016A450 = 0x8016A450; -D_8016A460 = 0x8016A460; -D_8016A464 = 0x8016A464; -D_8016A474 = 0x8016A474; -D_8016A644 = 0x8016A644; -D_8016A648 = 0x8016A648; -D_8016A64C = 0x8016A64C; -D_8016A650 = 0x8016A650; -D_8016A654 = 0x8016A654; -D_8016A658 = 0x8016A658; -D_8016A65C = 0x8016A65C; -D_8016A6FC = 0x8016A6FC; -D_8016A72C = 0x8016A72C; -D_8016A734 = 0x8016A734; -D_8016A744 = 0x8016A744; -D_8016A754 = 0x8016A754; -D_8016A758 = 0x8016A758; -D_8016A768 = 0x8016A768; -D_8016A938 = 0x8016A938; -D_8016A93C = 0x8016A93C; -D_8016A940 = 0x8016A940; -D_8016A944 = 0x8016A944; -D_8016A948 = 0x8016A948; -D_8016A94C = 0x8016A94C; -D_8016A950 = 0x8016A950; -D_8016A9F0 = 0x8016A9F0; -D_8016AA20 = 0x8016AA20; -D_8016AA28 = 0x8016AA28; -D_8016AA38 = 0x8016AA38; -D_8016AA48 = 0x8016AA48; -D_8016AA50 = 0x8016AA50; -D_8016AA5C = 0x8016AA5C; -D_8016AC2C = 0x8016AC2C; -D_8016AC30 = 0x8016AC30; -D_8016AC34 = 0x8016AC34; -D_8016AC38 = 0x8016AC38; -D_8016AC44 = 0x8016AC44; -D_8016ACE4 = 0x8016ACE4; -D_8016AD14 = 0x8016AD14; -D_8016AD1C = 0x8016AD1C; -D_8016AD2C = 0x8016AD2C; -D_8016AF20 = 0x8016AF20; -D_8016AF22 = 0x8016AF22; -D_8016AF24 = 0x8016AF24; -D_8016AF28 = 0x8016AF28; -D_8016AF2C = 0x8016AF2C; -D_8016AF30 = 0x8016AF30; -D_8016AF34 = 0x8016AF34; -D_8016AF38 = 0x8016AF38; -D_8016AF3C = 0x8016AF3C; -D_8016AF58 = 0x8016AF58; -D_8016AF9C = 0x8016AF9C; -D_8016AFD6 = 0x8016AFD6; -D_8016AFD8 = 0x8016AFD8; -D_8016AFDC = 0x8016AFDC; -D_8016AFEE = 0x8016AFEE; -D_8016B004 = 0x8016B004; -D_8016B006 = 0x8016B006; -D_8016B008 = 0x8016B008; -D_8016B00C = 0x8016B00C; -D_8016B010 = 0x8016B010; -D_8016B014 = 0x8016B014; -D_8016B018 = 0x8016B018; -D_8016B01C = 0x8016B01C; -D_8016B020 = 0x8016B020; -D_8016B034 = 0x8016B034; -D_8016B040 = 0x8016B040; -D_8016B050 = 0x8016B050; -D_8016B054 = 0x8016B054; -D_8016B058 = 0x8016B058; -D_8016B214 = 0x8016B214; -D_8016B216 = 0x8016B216; -D_8016B218 = 0x8016B218; -D_8016B21C = 0x8016B21C; -D_8016B230 = 0x8016B230; -D_8016B24C = 0x8016B24C; -D_8016B250 = 0x8016B250; -D_8016B290 = 0x8016B290; -D_8016B2CA = 0x8016B2CA; -D_8016B2CC = 0x8016B2CC; -D_8016B2D6 = 0x8016B2D6; -D_8016B2DD = 0x8016B2DD; -D_8016B2E2 = 0x8016B2E2; -D_8016B2E4 = 0x8016B2E4; -D_8016B2F8 = 0x8016B2F8; -D_8016B2FA = 0x8016B2FA; -D_8016B314 = 0x8016B314; -D_8016B508 = 0x8016B508; -D_8016B50A = 0x8016B50A; -D_8016B50C = 0x8016B50C; -D_8016B510 = 0x8016B510; -D_8016B514 = 0x8016B514; -D_8016B524 = 0x8016B524; -D_8016B530 = 0x8016B530; -D_8016B5C0 = 0x8016B5C0; -D_8016B5C4 = 0x8016B5C4; -D_8016B5D6 = 0x8016B5D6; -D_8016B5D8 = 0x8016B5D8; -D_8016B5EC = 0x8016B5EC; -D_8016B5EE = 0x8016B5EE; -D_8016B604 = 0x8016B604; -D_8016B608 = 0x8016B608; -D_8016B620 = 0x8016B620; -D_8016B668 = 0x8016B668; -D_8016B66C = 0x8016B66C; -D_8016B690 = 0x8016B690; -D_8016B7FC = 0x8016B7FC; -D_8016B8B4 = 0x8016B8B4; -D_8016B8E2 = 0x8016B8E2; -D_8016B8FC = 0x8016B8FC; -D_8016BAF0 = 0x8016BAF0; -D_8016BDE4 = 0x8016BDE4; -D_8016C0D8 = 0x8016C0D8; -D_8016C3CC = 0x8016C3CC; -D_8016C6C0 = 0x8016C6C0; -D_8016C9B4 = 0x8016C9B4; -D_8016CF9C = 0x8016CF9C; -D_8016CF9E = 0x8016CF9E; -D_8016CFA0 = 0x8016CFA0; -D_8016CFB8 = 0x8016CFB8; -D_8016D054 = 0x8016D054; -D_8016D080 = 0x8016D080; -D_8016D090 = 0x8016D090; -D_8016D094 = 0x8016D094; -D_8016D0B0 = 0x8016D0B0; -D_8016D0B4 = 0x8016D0B4; -D_8016D290 = 0x8016D290; -D_8016ED24 = 0x8016ED24; -D_8016F018 = 0x8016F018; -D_8016F028 = 0x8016F028; -D_8016F030 = 0x8016F030; -D_8016F100 = 0x8016F100; -D_8016F104 = 0x8016F104; -D_8016F118 = 0x8016F118; -D_8016F30C = 0x8016F30C; -D_8016F600 = 0x8016F600; -D_8016F8F4 = 0x8016F8F4; -D_8016FC00 = 0x8016FC00; -D_8016FCE8 = 0x8016FCE8; -D_80171780 = 0x80171780; -D_80172834 = 0x80172834; -D_80172B28 = 0x80172B28; -D_80172B2A = 0x80172B2A; -D_80172B2C = 0x80172B2C; -D_80172B30 = 0x80172B30; -D_80172B34 = 0x80172B34; -D_80172B44 = 0x80172B44; -D_80172B54 = 0x80172B54; -D_80172B64 = 0x80172B64; -D_80172B6E = 0x80172B6E; -D_80172BDE = 0x80172BDE; -D_80172C28 = 0x80172C28; -D_80172C38 = 0x80172C38; -D_80172C8C = 0x80172C8C; -D_801743D8 = 0x801743D8; -D_801745BC = 0x801745BC; -D_801745C4 = 0x801745C4; -D_801746AC = 0x801746AC; -D_801746BC = 0x801746BC; -D_801746D0 = 0x801746D0; -D_801748B0 = 0x801748B0; -D_801748B2 = 0x801748B2; -D_801748B4 = 0x801748B4; -D_801748B8 = 0x801748B8; -D_801748BC = 0x801748BC; -D_801748C0 = 0x801748C0; -D_801748C4 = 0x801748C4; -D_801748C8 = 0x801748C8; -D_801748CC = 0x801748CC; -D_801748D8 = 0x801748D8; -D_801748FA = 0x801748FA; -D_801748FE = 0x801748FE; -D_80174900 = 0x80174900; -D_80174902 = 0x80174902; -D_80174910 = 0x80174910; -D_80174912 = 0x80174912; -D_80174924 = 0x80174924; -D_80174928 = 0x80174928; -D_8017492C = 0x8017492C; -D_80174930 = 0x80174930; -D_80174938 = 0x80174938; -D_80174944 = 0x80174944; -D_8017495E = 0x8017495E; -D_8017496A = 0x8017496A; -D_80174986 = 0x80174986; -D_80174988 = 0x80174988; -D_8017498C = 0x8017498C; -D_80174990 = 0x80174990; -D_80174994 = 0x80174994; -D_801749B0 = 0x801749B0; -D_80174CAC = 0x80174CAC; -D_80174CB8 = 0x80174CB8; -D_80174CBA = 0x80174CBA; -D_80174CBC = 0x80174CBC; -D_80174CC0 = 0x80174CC0; -D_80174CC4 = 0x80174CC4; -D_80174CC8 = 0x80174CC8; -D_80174CD4 = 0x80174CD4; -D_80174D06 = 0x80174D06; -D_80174D08 = 0x80174D08; -D_80174D18 = 0x80174D18; -D_80174D42 = 0x80174D42; -D_80174D5E = 0x80174D5E; -D_80174D60 = 0x80174D60; -D_801750B0 = 0x801750B0; -D_801750B4 = 0x801750B4; -D_801750C0 = 0x801750C0; -D_801750C2 = 0x801750C2; -D_801750C4 = 0x801750C4; -D_801750C8 = 0x801750C8; -D_801750CC = 0x801750CC; -D_801750DC = 0x801750DC; -D_8017510E = 0x8017510E; -D_80175120 = 0x80175120; -D_80175190 = 0x80175190; -D_801758D0 = 0x801758D0; -D_8017591E = 0x8017591E; -D_80175950 = 0x80175950; -D_801759E8 = 0x801759E8; -D_80175CCC = 0x80175CCC; -D_80176A50 = 0x80176A50; -D_80176ADC = 0x80176ADC; -D_80177428 = 0x80177428; -D_80177F18 = 0x80177F18; -D_80178404 = 0x80178404; -D_80178490 = 0x80178490; -D_80178CC4 = 0x80178CC4; -D_80178EF4 = 0x80178EF4; -D_80178F80 = 0x80178F80; -D_80178FEC = 0x80178FEC; -D_80179000 = 0x80179000; -D_80179780 = 0x80179780; -D_801797F0 = 0x801797F0; -D_80179828 = 0x80179828; -D_80179940 = 0x80179940; -D_80179C50 = 0x80179C50; -D_80179CC0 = 0x80179CC0; -D_80179DA0 = 0x80179DA0; -D_80179E10 = 0x80179E10; -D_80179E80 = 0x80179E80; -D_80179EB8 = 0x80179EB8; -D_80179EC0 = 0x80179EC0; -D_80179EC8 = 0x80179EC8; -D_80179EE0 = 0x80179EE0; -D_80179EF0 = 0x80179EF0; -D_8017A370 = 0x8017A370; -D_8017B1B0 = 0x8017B1B0; -D_8017BBB0 = 0x8017BBB0; -D_8017BBD8 = 0x8017BBD8; -D_8017BCF0 = 0x8017BCF0; -D_8017BCF8 = 0x8017BCF8; -D_8017C018 = 0x8017C018; -D_8017C338 = 0x8017C338; -D_8017C658 = 0x8017C658; -D_8017C978 = 0x8017C978; -D_8017CC98 = 0x8017CC98; -D_8017CCA0 = 0x8017CCA0; -D_8017CFC0 = 0x8017CFC0; -D_8017CFC4 = 0x8017CFC4; -D_8017CFC8 = 0x8017CFC8; -D_8017CFCC = 0x8017CFCC; -D_8017CFD0 = 0x8017CFD0; -D_8017CFD4 = 0x8017CFD4; -D_8017CFD8 = 0x8017CFD8; -D_8017CFDC = 0x8017CFDC; -D_8017CFE0 = 0x8017CFE0; -D_8017CFE4 = 0x8017CFE4; -D_8017CFE8 = 0x8017CFE8; -D_8017CFEC = 0x8017CFEC; -D_8017CFF0 = 0x8017CFF0; -D_8017CFF4 = 0x8017CFF4; -D_8017CFF8 = 0x8017CFF8; -D_8017D008 = 0x8017D008; -D_8017D010 = 0x8017D010; -D_8017D014 = 0x8017D014; -D_8017D018 = 0x8017D018; -D_8017D01C = 0x8017D01C; -D_8017D020 = 0x8017D020; -D_8017D028 = 0x8017D028; -D_8017D038 = 0x8017D038; -D_8017D03C = 0x8017D03C; -D_8017D040 = 0x8017D040; -D_8017D043 = 0x8017D043; -D_8017D044 = 0x8017D044; -D_8017D048 = 0x8017D048; -D_8017D04B = 0x8017D04B; -D_8017D04C = 0x8017D04C; -D_8017D050 = 0x8017D050; -D_8017D054 = 0x8017D054; -D_8017D058 = 0x8017D058; -D_8017D05C = 0x8017D05C; -D_8017D060 = 0x8017D060; -D_8017D068 = 0x8017D068; -D_8017D070 = 0x8017D070; -D_8017D074 = 0x8017D074; -D_8017D07C = 0x8017D07C; -D_8017D080 = 0x8017D080; -D_8017D088 = 0x8017D088; -D_8017D090 = 0x8017D090; -D_8017D094 = 0x8017D094; -D_8017D0A8 = 0x8017D0A8; -D_8017D0B0 = 0x8017D0B0; -D_8017D0B4 = 0x8017D0B4; -D_8017D0C0 = 0x8017D0C0; -D_8017D0C8 = 0x8017D0C8; -D_8017D0D0 = 0x8017D0D0; -D_8017D0D8 = 0x8017D0D8; -D_8017D0E0 = 0x8017D0E0; -D_8017D0E8 = 0x8017D0E8; -D_8017D0F0 = 0x8017D0F0; -D_8017D0F8 = 0x8017D0F8; -D_8017D108 = 0x8017D108; -D_8017D10C = 0x8017D10C; -D_8017D110 = 0x8017D110; -D_8017D114 = 0x8017D114; -D_8017D118 = 0x8017D118; -D_8017D11C = 0x8017D11C; -D_8017D120 = 0x8017D120; -D_8017D124 = 0x8017D124; -D_8017D128 = 0x8017D128; -D_8017D130 = 0x8017D130; -D_8017D140 = 0x8017D140; -D_8017D148 = 0x8017D148; -D_8017D158 = 0x8017D158; -D_8017D15C = 0x8017D15C; -D_8017D160 = 0x8017D160; -D_8017D168 = 0x8017D168; -D_8017D178 = 0x8017D178; -D_8017D184 = 0x8017D184; -D_8017D188 = 0x8017D188; -D_8017D194 = 0x8017D194; -D_8017D198 = 0x8017D198; -D_8017D1A0 = 0x8017D1A0; -D_8017D1B0 = 0x8017D1B0; -D_8017D1B4 = 0x8017D1B4; -D_8017D1B8 = 0x8017D1B8; -D_8017D1C8 = 0x8017D1C8; -D_8017D1CC = 0x8017D1CC; -D_8017D1D0 = 0x8017D1D0; -D_8017D1D4 = 0x8017D1D4; -D_8017D1D8 = 0x8017D1D8; -D_8017D1E8 = 0x8017D1E8; -D_8017D1EC = 0x8017D1EC; -D_8017D1F0 = 0x8017D1F0; -D_8017D1F4 = 0x8017D1F4; -D_8017D1F8 = 0x8017D1F8; -D_8017D1FC = 0x8017D1FC; -D_8017D200 = 0x8017D200; -D_8017D204 = 0x8017D204; -D_8017D208 = 0x8017D208; -D_8017D20C = 0x8017D20C; -D_8017D210 = 0x8017D210; -D_8017D220 = 0x8017D220; -D_8017D228 = 0x8017D228; -D_8017D238 = 0x8017D238; -D_8017D240 = 0x8017D240; -D_8017D250 = 0x8017D250; -D_8017D258 = 0x8017D258; -D_8017D268 = 0x8017D268; -D_8017D270 = 0x8017D270; -D_8017D280 = 0x8017D280; -D_8017D288 = 0x8017D288; -D_8017D298 = 0x8017D298; -D_8017D2A0 = 0x8017D2A0; -D_8017D2E0 = 0x8017D2E0; -D_8017D2E4 = 0x8017D2E4; -D_8017D2E8 = 0x8017D2E8; -D_8017D2EC = 0x8017D2EC; -D_8017D2F0 = 0x8017D2F0; -D_8017D30C = 0x8017D30C; -D_8017D310 = 0x8017D310; -D_8017D32C = 0x8017D32C; -D_8017D330 = 0x8017D330; -D_8017D334 = 0x8017D334; -D_8017D338 = 0x8017D338; -D_8017D34C = 0x8017D34C; -D_8017D350 = 0x8017D350; -D_8017D354 = 0x8017D354; -D_8017D358 = 0x8017D358; -D_8017D370 = 0x8017D370; -D_8017D378 = 0x8017D378; -D_8017D3D0 = 0x8017D3D0; -D_8017D3D8 = 0x8017D3D8; -D_8017D3DC = 0x8017D3DC; -D_8017D3E8 = 0x8017D3E8; -D_8017D3F0 = 0x8017D3F0; -D_8017D3F8 = 0x8017D3F8; -D_8017D3FC = 0x8017D3FC; -D_8017D410 = 0x8017D410; -D_8017D414 = 0x8017D414; -D_8017D418 = 0x8017D418; -D_8017D41C = 0x8017D41C; -D_8017D420 = 0x8017D420; -D_8017D42C = 0x8017D42C; -D_8017D430 = 0x8017D430; -D_8017D434 = 0x8017D434; -D_8017D438 = 0x8017D438; -D_8017D43C = 0x8017D43C; -D_8017D440 = 0x8017D440; -D_8017D444 = 0x8017D444; -D_8017D44C = 0x8017D44C; -D_8017D450 = 0x8017D450; -D_8017D454 = 0x8017D454; -D_8017D45C = 0x8017D45C; -D_8017D460 = 0x8017D460; -D_8017D464 = 0x8017D464; -D_8017D468 = 0x8017D468; -D_8017D470 = 0x8017D470; -D_8017D474 = 0x8017D474; -D_8017D478 = 0x8017D478; -D_8017D47C = 0x8017D47C; -D_8017D488 = 0x8017D488; -D_8017D490 = 0x8017D490; -D_8017D494 = 0x8017D494; -D_8017D4A8 = 0x8017D4A8; -D_8017D4B0 = 0x8017D4B0; -D_8017D4C0 = 0x8017D4C0; -D_8017D4C8 = 0x8017D4C8; -D_8017D4D8 = 0x8017D4D8; -D_8017D4E0 = 0x8017D4E0; -D_8017D4F0 = 0x8017D4F0; -D_8017D4F8 = 0x8017D4F8; -D_8017D508 = 0x8017D508; -D_8017D510 = 0x8017D510; -D_8017D528 = 0x8017D528; -D_8017D540 = 0x8017D540; -D_8017D548 = 0x8017D548; -D_8017D550 = 0x8017D550; -D_8017D558 = 0x8017D558; -D_8017D568 = 0x8017D568; -D_8017D570 = 0x8017D570; -D_8017D610 = 0x8017D610; -D_8017D614 = 0x8017D614; -D_8017D618 = 0x8017D618; -D_8017D61C = 0x8017D61C; -D_8017D620 = 0x8017D620; -D_8017D624 = 0x8017D624; -D_8017D628 = 0x8017D628; -D_8017D62C = 0x8017D62C; -D_8017D630 = 0x8017D630; -D_8017D638 = 0x8017D638; -D_8017D6B0 = 0x8017D6B0; -D_8017D6C4 = 0x8017D6C4; -D_8017D7CC = 0x8017D7CC; -D_8017D8CC = 0x8017D8CC; -D_8017D8D4 = 0x8017D8D4; -D_8017D9D4 = 0x8017D9D4; -D_8017D9D9 = 0x8017D9D9; -D_8017DA1C = 0x8017DA1C; -D_8017DA20 = 0x8017DA20; -D_8017DA24 = 0x8017DA24; -D_8017DA28 = 0x8017DA28; -D_8017DA2C = 0x8017DA2C; -D_8017DA30 = 0x8017DA30; -D_8017DA34 = 0x8017DA34; -D_8017DA38 = 0x8017DA38; -D_8017DA3C = 0x8017DA3C; -D_8017DA44 = 0x8017DA44; -D_8017DA48 = 0x8017DA48; -D_8017DA4C = 0x8017DA4C; -D_8017DA54 = 0x8017DA54; -D_8017DA58 = 0x8017DA58; -D_8017DA5C = 0x8017DA5C; -D_8017DA60 = 0x8017DA60; -D_8017DA64 = 0x8017DA64; -D_8017DA68 = 0x8017DA68; -D_8017DA6C = 0x8017DA6C; -D_8017DA70 = 0x8017DA70; -D_8017DA74 = 0x8017DA74; -D_8017DA78 = 0x8017DA78; -D_8017DA7C = 0x8017DA7C; -D_8017DA84 = 0x8017DA84; -D_8017DA88 = 0x8017DA88; -D_8017DA8C = 0x8017DA8C; -D_8017DA98 = 0x8017DA98; -D_8017DA9C = 0x8017DA9C; -D_8017DAA0 = 0x8017DAA0; -D_8017DAA8 = 0x8017DAA8; -D_8017DAB0 = 0x8017DAB0; -D_8017DAC0 = 0x8017DAC0; -D_8017DAC8 = 0x8017DAC8; -D_8017DAD0 = 0x8017DAD0; -D_8017DAD8 = 0x8017DAD8; -D_8017DAE0 = 0x8017DAE0; -D_8017DAE8 = 0x8017DAE8; -D_8017DAF0 = 0x8017DAF0; -D_8017DAF4 = 0x8017DAF4; -D_8017DAF8 = 0x8017DAF8; -D_8017DAFC = 0x8017DAFC; -D_8017DB00 = 0x8017DB00; -D_8017DB04 = 0x8017DB04; -D_8017DB08 = 0x8017DB08; -D_8017DB0C = 0x8017DB0C; -D_8017DB10 = 0x8017DB10; -D_8017DB14 = 0x8017DB14; -D_8017DB18 = 0x8017DB18; -D_8017DB1C = 0x8017DB1C; -D_8017DB20 = 0x8017DB20; -D_8017DB30 = 0x8017DB30; -D_8017DB40 = 0x8017DB40; -D_8017DB50 = 0x8017DB50; -D_8017DB60 = 0x8017DB60; -D_8017DB70 = 0x8017DB70; -D_8017DB74 = 0x8017DB74; -D_8017DB78 = 0x8017DB78; -D_8017DB7C = 0x8017DB7C; -D_8017DBB0 = 0x8017DBB0; -D_8017DBB4 = 0x8017DBB4; -D_8017DBB8 = 0x8017DBB8; -D_8017DBC0 = 0x8017DBC0; -D_8017DBC4 = 0x8017DBC4; -D_8017DBC8 = 0x8017DBC8; -D_8017DBCC = 0x8017DBCC; -D_8017DBD0 = 0x8017DBD0; -D_8017DBE0 = 0x8017DBE0; -D_8017DBE4 = 0x8017DBE4; -D_8017DBE8 = 0x8017DBE8; -D_8017DBF0 = 0x8017DBF0; -D_8017DBF4 = 0x8017DBF4; -D_8017DBF8 = 0x8017DBF8; -D_8017DC00 = 0x8017DC00; -D_8017DC04 = 0x8017DC04; -D_8017DC08 = 0x8017DC08; -D_8017DC10 = 0x8017DC10; -D_8017DC14 = 0x8017DC14; -D_8017DC18 = 0x8017DC18; -D_8017DC1C = 0x8017DC1C; -D_8017DC20 = 0x8017DC20; -D_8017DC24 = 0x8017DC24; -D_8017DC28 = 0x8017DC28; -D_8017DC34 = 0x8017DC34; -D_8017DC38 = 0x8017DC38; -D_8017DC3C = 0x8017DC3C; -D_8017DC40 = 0x8017DC40; -D_8017DC44 = 0x8017DC44; -D_8017DC4C = 0x8017DC4C; -D_8017DC58 = 0x8017DC58; -D_8017DC5C = 0x8017DC5C; -D_8017DC60 = 0x8017DC60; -D_8017DC64 = 0x8017DC64; -D_8017DC68 = 0x8017DC68; -D_8017DC6C = 0x8017DC6C; -D_8017DC70 = 0x8017DC70; -D_8017DC74 = 0x8017DC74; -D_8017DC78 = 0x8017DC78; -D_8017DC7C = 0x8017DC7C; -D_8017DC80 = 0x8017DC80; -D_8017DC84 = 0x8017DC84; -D_8017DC88 = 0x8017DC88; -D_8017DC8C = 0x8017DC8C; -D_8017DC90 = 0x8017DC90; -D_8017DC94 = 0x8017DC94; -D_8017DC98 = 0x8017DC98; -D_8017DC9C = 0x8017DC9C; -D_8017DCA0 = 0x8017DCA0; -D_8017DCA4 = 0x8017DCA4; -D_8017DCA8 = 0x8017DCA8; -D_8017DCAC = 0x8017DCAC; -D_8017DCB0 = 0x8017DCB0; -D_8017DCC0 = 0x8017DCC0; -D_8017DCC4 = 0x8017DCC4; -D_8017DCC8 = 0x8017DCC8; -D_8017DCD8 = 0x8017DCD8; -D_8017DCDC = 0x8017DCDC; -D_8017DCE0 = 0x8017DCE0; -D_8017DCE4 = 0x8017DCE4; -D_8017DCE8 = 0x8017DCE8; -D_8017DCEC = 0x8017DCEC; -D_8017DCF0 = 0x8017DCF0; -D_8017DCF4 = 0x8017DCF4; -D_8017DCF8 = 0x8017DCF8; -D_8017DCFC = 0x8017DCFC; -D_8017DD04 = 0x8017DD04; -D_8017DD08 = 0x8017DD08; -D_8017DD0C = 0x8017DD0C; -D_8017DD10 = 0x8017DD10; -D_8017DD14 = 0x8017DD14; -D_8017DD18 = 0x8017DD18; -D_8017DD20 = 0x8017DD20; -D_8017DEB0 = 0x8017DEB0; -D_8017DEC0 = 0x8017DEC0; -D_8017DEC4 = 0x8017DEC4; -D_8017DEC8 = 0x8017DEC8; -D_8017DECC = 0x8017DECC; -D_8017DED0 = 0x8017DED0; -D_8017DED4 = 0x8017DED4; -D_8017DED8 = 0x8017DED8; -D_8017DEDC = 0x8017DEDC; -D_8017DEE0 = 0x8017DEE0; -D_8017DEE4 = 0x8017DEE4; -D_8017DEE8 = 0x8017DEE8; -D_8017DEF0 = 0x8017DEF0; -D_8017DEF4 = 0x8017DEF4; -D_8017DEF8 = 0x8017DEF8; -D_8017DEFC = 0x8017DEFC; -D_8017DF00 = 0x8017DF00; -D_8017DF08 = 0x8017DF08; -D_8017DF18 = 0x8017DF18; -D_8017DF20 = 0x8017DF20; -D_8017DF24 = 0x8017DF24; -D_8017DF28 = 0x8017DF28; -D_8017DF2C = 0x8017DF2C; -D_8017DF30 = 0x8017DF30; -D_8017DF34 = 0x8017DF34; -D_8017DF38 = 0x8017DF38; -D_8017DF3C = 0x8017DF3C; -D_8017DF40 = 0x8017DF40; -D_8017DF44 = 0x8017DF44; -D_8017DF48 = 0x8017DF48; -D_8017DF4C = 0x8017DF4C; -D_8017DF50 = 0x8017DF50; -D_8017DF54 = 0x8017DF54; -D_8017DF58 = 0x8017DF58; -D_8017DF5C = 0x8017DF5C; -D_8017DF60 = 0x8017DF60; -D_8017DF64 = 0x8017DF64; -D_8017DF68 = 0x8017DF68; -D_8017DF6C = 0x8017DF6C; -D_8017DF70 = 0x8017DF70; -D_8017DF78 = 0x8017DF78; -D_8017DF88 = 0x8017DF88; -D_8017DF98 = 0x8017DF98; -D_8017DF9C = 0x8017DF9C; -D_8017DFA0 = 0x8017DFA0; -D_8017DFA4 = 0x8017DFA4; -D_8017DFA8 = 0x8017DFA8; -D_8017DFB0 = 0x8017DFB0; -D_8017DFC0 = 0x8017DFC0; -D_8017DFD0 = 0x8017DFD0; -D_8017DFD8 = 0x8017DFD8; -D_8017DFF0 = 0x8017DFF0; -D_8017E000 = 0x8017E000; -D_8017E004 = 0x8017E004; -D_8017E008 = 0x8017E008; -D_8017E00C = 0x8017E00C; -D_8017E010 = 0x8017E010; -D_8017E011 = 0x8017E011; -D_8017E012 = 0x8017E012; -D_8017E013 = 0x8017E013; -D_8017E01A = 0x8017E01A; -D_8017E01F = 0x8017E01F; -D_8017E024 = 0x8017E024; -D_8017E025 = 0x8017E025; -D_8017E026 = 0x8017E026; -D_8017E027 = 0x8017E027; -D_8017E046 = 0x8017E046; -D_8017E06E = 0x8017E06E; -D_8017E06F = 0x8017E06F; -D_8017E09C = 0x8017E09C; -D_8017E0FA = 0x8017E0FA; -D_8017E10F = 0x8017E10F; -D_8017E110 = 0x8017E110; -D_8017E111 = 0x8017E111; -D_8017E112 = 0x8017E112; -D_8017E210 = 0x8017E210; -D_8017E218 = 0x8017E218; -D_80180001 = 0x80180001; -D_80180058 = 0x80180058; -D_8018CFB0 = 0x8018CFB0; -D_8018CFC0 = 0x8018CFC0; -D_i6_8018DD90 = 0x8018DD90; -D_8018DD90 = 0x8018DD90; -D_8018DD94 = 0x8018DD94; -D_8018DD98 = 0x8018DD98; -D_8018DDA0 = 0x8018DDA0; -D_8018DDB0 = 0x8018DDB0; -D_8018DDB4 = 0x8018DDB4; -D_8018DE98 = 0x8018DE98; -D_8018DED0 = 0x8018DED0; -D_8018E018 = 0x8018E018; -D_8018E01C = 0x8018E01C; -D_8018E020 = 0x8018E020; -D_8018E024 = 0x8018E024; -D_8018E028 = 0x8018E028; -D_8018E02C = 0x8018E02C; -D_8018E030 = 0x8018E030; -D_8018E03C = 0x8018E03C; -D_8018E288 = 0x8018E288; -D_8018E290 = 0x8018E290; -D_8018E294 = 0x8018E294; -D_8018E29C = 0x8018E29C; -D_8018E2C4 = 0x8018E2C4; -D_8018E2CC = 0x8018E2CC; -D_8018E4E0 = 0x8018E4E0; -D_8018E4E4 = 0x8018E4E4; -D_8018E4E8 = 0x8018E4E8; -D_8018E500 = 0x8018E500; -D_8018E52C = 0x8018E52C; -D_8018E738 = 0x8018E738; -D_8018E990 = 0x8018E990; -D_8018E99C = 0x8018E99C; -D_8018F2F0 = 0x8018F2F0; -D_8018F610 = 0x8018F610; -D_8018F614 = 0x8018F614; -D_8018F618 = 0x8018F618; -D_8018F61C = 0x8018F61C; -D_8018F620 = 0x8018F620; -D_80190430 = 0x80190430; -D_80190470 = 0x80190470; -D_80190478 = 0x80190478; -D_80190480 = 0x80190480; -D_80190490 = 0x80190490; -D_80190494 = 0x80190494; -D_80190498 = 0x80190498; -D_80191288 = 0x80191288; -D_i1_801912CE = 0x801912CE; -D_i1_801917C2 = 0x801917C2; -D_i1_80191AA2 = 0x80191AA2; -D_80192950 = 0x80192950; -D_80192964 = 0x80192964; -D_80192994 = 0x80192994; -D_80192998 = 0x80192998; -D_80192A50 = 0x80192A50; -D_80192A54 = 0x80192A54; -D_80192A58 = 0x80192A58; -D_80192A68 = 0x80192A68; -D_80192A70 = 0x80192A70; -D_80192AB8 = 0x80192AB8; -D_80192B1C = 0x80192B1C; -D_80192B24 = 0x80192B24; -D_80192B2C = 0x80192B2C; -D_80192B34 = 0x80192B34; -D_80192B38 = 0x80192B38; -D_801931B8 = 0x801931B8; -D_80193240 = 0x80193240; -D_80193242 = 0x80193242; -D_801932B4 = 0x801932B4; -D_80193338 = 0x80193338; -D_8019333C = 0x8019333C; -D_80193340 = 0x80193340; -D_80195D80 = 0x80195D80; -D_i4_8019608E = 0x8019608E; -D_801972B0 = 0x801972B0; -D_801972B4 = 0x801972B4; -D_801972B8 = 0x801972B8; -D_801972BC = 0x801972BC; -D_801972C0 = 0x801972C0; -D_80197368 = 0x80197368; -D_80197380 = 0x80197380; -D_80197410 = 0x80197410; -D_80197420 = 0x80197420; -D_80197424 = 0x80197424; -D_80197428 = 0x80197428; -D_8019742C = 0x8019742C; -D_80197430 = 0x80197430; -D_80197434 = 0x80197434; -D_80197438 = 0x80197438; -D_80197440 = 0x80197440; -D_80197444 = 0x80197444; -D_8019F1F0 = 0x8019F1F0; -D_8019F1F4 = 0x8019F1F4; -D_8019F1F8 = 0x8019F1F8; -D_8019F1FC = 0x8019F1FC; -D_8019F200 = 0x8019F200; -D_8019F204 = 0x8019F204; -D_8019F208 = 0x8019F208; -D_8019F20C = 0x8019F20C; -D_8019F210 = 0x8019F210; -D_8019F214 = 0x8019F214; -D_8019F218 = 0x8019F218; -D_8019F21C = 0x8019F21C; -D_8019F220 = 0x8019F220; -D_8019F224 = 0x8019F224; -D_8019F228 = 0x8019F228; -D_8019F22C = 0x8019F22C; -D_8019F230 = 0x8019F230; -D_8019F6E0 = 0x8019F6E0; -D_8019F6F0 = 0x8019F6F0; -D_menu_801A5E23 = 0x801A5E23; -D_i5_801AE81B = 0x801AE81B; -D_801AE894 = 0x801AE894; -D_801AE918 = 0x801AE918; -D_i5_801AE942 = 0x801AE942; -D_801AE9AC = 0x801AE9AC; -D_801AF0C0 = 0x801AF0C0; -D_801AF0C4 = 0x801AF0C4; -D_801AF0C8 = 0x801AF0C8; -D_801AF0CC = 0x801AF0CC; -D_801AF0D0 = 0x801AF0D0; -D_801AF0D4 = 0x801AF0D4; -D_801AF0D8 = 0x801AF0D8; -D_801AF0DC = 0x801AF0DC; -D_801AF0E0 = 0x801AF0E0; -D_801AF0E4 = 0x801AF0E4; -D_801AF0E8 = 0x801AF0E8; -D_801AF0EC = 0x801AF0EC; -D_801AF0F0 = 0x801AF0F0; -D_801AF0F4 = 0x801AF0F4; -D_801AF0F8 = 0x801AF0F8; -D_801AF0FC = 0x801AF0FC; -D_801AF100 = 0x801AF100; -D_801AF104 = 0x801AF104; -D_801AF108 = 0x801AF108; -D_801AF10C = 0x801AF10C; -D_801AF110 = 0x801AF110; -D_801AF114 = 0x801AF114; -D_801AF118 = 0x801AF118; -D_801AF11C = 0x801AF11C; -D_801AF120 = 0x801AF120; -D_801AF124 = 0x801AF124; -D_801AF128 = 0x801AF128; -D_801AF12C = 0x801AF12C; -D_801AF130 = 0x801AF130; -D_801AF134 = 0x801AF134; -D_801AF138 = 0x801AF138; -D_801AF13C = 0x801AF13C; -D_801AF140 = 0x801AF140; -D_801AF144 = 0x801AF144; -D_801AF148 = 0x801AF148; -D_801AF14C = 0x801AF14C; -D_801AF150 = 0x801AF150; -D_801AF154 = 0x801AF154; -D_801AF158 = 0x801AF158; -D_801AF15C = 0x801AF15C; -D_801AF160 = 0x801AF160; -D_801AF164 = 0x801AF164; -D_801AF168 = 0x801AF168; -D_801AF16C = 0x801AF16C; -D_801AF170 = 0x801AF170; -D_801AF174 = 0x801AF174; -D_801AF178 = 0x801AF178; -D_801AF17C = 0x801AF17C; -D_801AF180 = 0x801AF180; -D_801AF1A8 = 0x801AF1A8; -D_801AF1AC = 0x801AF1AC; -D_801AF1B0 = 0x801AF1B0; -D_801AF1B4 = 0x801AF1B4; -D_801AF1B8 = 0x801AF1B8; -D_801AF1BC = 0x801AF1BC; -D_801AF1C0 = 0x801AF1C0; -D_801AF1C4 = 0x801AF1C4; -D_801AF1C8 = 0x801AF1C8; -D_801AF1CC = 0x801AF1CC; -D_801AF1D0 = 0x801AF1D0; -D_801AF1D8 = 0x801AF1D8; -D_801AF200 = 0x801AF200; -D_801AF240 = 0x801AF240; -D_801AF300 = 0x801AF300; -D_801AF304 = 0x801AF304; -D_801AF308 = 0x801AF308; -D_801AF318 = 0x801AF318; -D_801AF31C = 0x801AF31C; -D_801AF344 = 0x801AF344; -D_801AF354 = 0x801AF354; -D_801AF35C = 0x801AF35C; -D_801AF360 = 0x801AF360; -D_801AF3B0 = 0x801AF3B0; -D_801AF3B8 = 0x801AF3B8; -D_801AF3BC = 0x801AF3BC; -D_801AF40C = 0x801AF40C; -D_801AF414 = 0x801AF414; -D_801AF418 = 0x801AF418; -D_801AF42C = 0x801AF42C; -D_801AF434 = 0x801AF434; -D_i5_801AF45A = 0x801AF45A; -D_801AF468 = 0x801AF468; -D_i5_801AF46E = 0x801AF46E; -D_801AF470 = 0x801AF470; -D_801AF474 = 0x801AF474; -D_801AF47C = 0x801AF47C; -D_801AF488 = 0x801AF488; -D_801AF4AC = 0x801AF4AC; -D_801AF4B8 = 0x801AF4B8; -D_801AF4C0 = 0x801AF4C0; -D_801AF4C4 = 0x801AF4C4; -D_801AF4C8 = 0x801AF4C8; -D_801AF4CC = 0x801AF4CC; -D_801AF4D0 = 0x801AF4D0; -D_801AF4D4 = 0x801AF4D4; -D_801AF4D8 = 0x801AF4D8; -D_801AF4DC = 0x801AF4DC; -D_801AF4E0 = 0x801AF4E0; -D_801AF4E4 = 0x801AF4E4; -D_801AF4E8 = 0x801AF4E8; -D_801AF4EC = 0x801AF4EC; -D_801AF4F0 = 0x801AF4F0; -D_801AF4F4 = 0x801AF4F4; -D_801AF4F8 = 0x801AF4F8; -D_801AF4FC = 0x801AF4FC; -D_801AF500 = 0x801AF500; -D_801AF504 = 0x801AF504; -D_801AF508 = 0x801AF508; -D_801AF50C = 0x801AF50C; -D_801AF510 = 0x801AF510; -D_801AFE70 = 0x801AFE70; -D_801AFE74 = 0x801AFE74; -D_801AFE78 = 0x801AFE78; -D_801AFE7C = 0x801AFE7C; -D_801AFE80 = 0x801AFE80; -D_801AFE84 = 0x801AFE84; -D_801AFE88 = 0x801AFE88; -D_801AFE8C = 0x801AFE8C; -D_801AFE90 = 0x801AFE90; -D_801AFE94 = 0x801AFE94; -D_801AFE98 = 0x801AFE98; -D_801AFE9C = 0x801AFE9C; -D_801AFEA0 = 0x801AFEA0; -D_801AFEA4 = 0x801AFEA4; -D_801AFEA8 = 0x801AFEA8; -D_801AFEAC = 0x801AFEAC; -D_801AFEB0 = 0x801AFEB0; -D_801AFEB4 = 0x801AFEB4; -D_801AFEB8 = 0x801AFEB8; -D_801AFEBC = 0x801AFEBC; -D_801AFEC0 = 0x801AFEC0; -D_801AFEC4 = 0x801AFEC4; -D_801AFEC8 = 0x801AFEC8; -D_801AFECC = 0x801AFECC; -D_801AFED0 = 0x801AFED0; -D_801AFED4 = 0x801AFED4; -D_801AFED8 = 0x801AFED8; -D_801AFEDC = 0x801AFEDC; -D_801AFEE0 = 0x801AFEE0; -D_801AFEE4 = 0x801AFEE4; -D_801AFEE8 = 0x801AFEE8; -D_801AFEEC = 0x801AFEEC; -D_801AFEF0 = 0x801AFEF0; -D_801AFEF4 = 0x801AFEF4; -D_801AFEF8 = 0x801AFEF8; -D_801AFF00 = 0x801AFF00; -D_801AFF28 = 0x801AFF28; -D_801AFF50 = 0x801AFF50; -D_801AFF78 = 0x801AFF78; -D_801AFFA0 = 0x801AFFA0; -D_801AFFA8 = 0x801AFFA8; -D_801AFFD0 = 0x801AFFD0; -D_801AFFF8 = 0x801AFFF8; -D_801B0020 = 0x801B0020; -D_801B0048 = 0x801B0048; -D_801B00E8 = 0x801B00E8; -D_i3_801B0130 = 0x801B0130; -D_801B0188 = 0x801B0188; -D_801B0228 = 0x801B0228; -D_801B02C8 = 0x801B02C8; -D_801B0368 = 0x801B0368; -D_801B0408 = 0x801B0408; -D_801B0410 = 0x801B0410; -D_801B04B0 = 0x801B04B0; -D_801B0528 = 0x801B0528; -D_801B052C = 0x801B052C; -D_801B0530 = 0x801B0530; -D_801B0550 = 0x801B0550; -D_801B0584 = 0x801B0584; -D_801B0588 = 0x801B0588; -D_801B058C = 0x801B058C; -D_801B0590 = 0x801B0590; -D_801B05A0 = 0x801B05A0; -D_801B05A8 = 0x801B05A8; -D_801B0628 = 0x801B0628; -D_801B062C = 0x801B062C; -D_801B062F = 0x801B062F; -D_801B0630 = 0x801B0630; -D_801B0638 = 0x801B0638; -D_801B0640 = 0x801B0640; -D_801B0644 = 0x801B0644; -D_801B0648 = 0x801B0648; -D_801B0658 = 0x801B0658; -D_801B065C = 0x801B065C; -D_801B0660 = 0x801B0660; -D_801B0664 = 0x801B0664; -D_801B0668 = 0x801B0668; -D_801B066C = 0x801B066C; -D_801B0670 = 0x801B0670; -D_801B0674 = 0x801B0674; -D_801B0678 = 0x801B0678; -D_801B067C = 0x801B067C; -D_801B0680 = 0x801B0680; -D_801B0684 = 0x801B0684; -D_801B0688 = 0x801B0688; -D_801B068C = 0x801B068C; -D_801B0690 = 0x801B0690; -D_801B0694 = 0x801B0694; -D_801B0698 = 0x801B0698; -D_801B069C = 0x801B069C; -D_801B06A0 = 0x801B06A0; -D_801B06C0 = 0x801B06C0; -D_801B06C4 = 0x801B06C4; -D_801B06C8 = 0x801B06C8; -D_801B06CC = 0x801B06CC; -D_801B06D0 = 0x801B06D0; -D_801B06D4 = 0x801B06D4; -D_801B06D8 = 0x801B06D8; -D_801B06DC = 0x801B06DC; -D_801B06E0 = 0x801B06E0; -D_801B06E4 = 0x801B06E4; -D_801B06E8 = 0x801B06E8; -D_801B06EC = 0x801B06EC; -D_801B06F0 = 0x801B06F0; -D_801B06F8 = 0x801B06F8; -D_801B0700 = 0x801B0700; -D_801B0704 = 0x801B0704; -D_801B0708 = 0x801B0708; -D_801B0710 = 0x801B0710; -D_801B0720 = 0x801B0720; -D_801B072C = 0x801B072C; -D_801B0730 = 0x801B0730; -D_801B0740 = 0x801B0740; -D_801B0750 = 0x801B0750; -D_801B0760 = 0x801B0760; -D_801B0770 = 0x801B0770; -D_801B0780 = 0x801B0780; -D_801B078C = 0x801B078C; -D_801B0790 = 0x801B0790; -D_801B0794 = 0x801B0794; -D_801B0798 = 0x801B0798; -D_801B079C = 0x801B079C; -D_801B07A0 = 0x801B07A0; -D_801B07A4 = 0x801B07A4; -D_801B07A8 = 0x801B07A8; -D_801B07B0 = 0x801B07B0; -D_801B07BC = 0x801B07BC; -D_801B07C0 = 0x801B07C0; -D_801B07C8 = 0x801B07C8; -D_801B07D0 = 0x801B07D0; -D_801B07E8 = 0x801B07E8; -D_801B07EC = 0x801B07EC; -D_801B07F0 = 0x801B07F0; -D_801B07F8 = 0x801B07F8; -D_801B0800 = 0x801B0800; -D_801B0808 = 0x801B0808; -D_801B0810 = 0x801B0810; -D_801B0818 = 0x801B0818; -D_801B081C = 0x801B081C; -D_801B0820 = 0x801B0820; -D_801B0824 = 0x801B0824; -D_801B0828 = 0x801B0828; -D_801B082C = 0x801B082C; -D_801B0830 = 0x801B0830; -D_801B0834 = 0x801B0834; -D_801B0838 = 0x801B0838; -D_801B083C = 0x801B083C; -D_801B0840 = 0x801B0840; -D_801B0844 = 0x801B0844; -D_801B0848 = 0x801B0848; -D_801B084C = 0x801B084C; -D_801B0850 = 0x801B0850; -D_801B0854 = 0x801B0854; -D_801B0858 = 0x801B0858; -D_801B085C = 0x801B085C; -D_801B0860 = 0x801B0860; -D_801B0864 = 0x801B0864; -D_801B0868 = 0x801B0868; -D_801B086C = 0x801B086C; -D_801B0870 = 0x801B0870; -D_801B0874 = 0x801B0874; -D_801B0878 = 0x801B0878; -D_801B087C = 0x801B087C; -D_801B0880 = 0x801B0880; -D_801B0884 = 0x801B0884; -D_801B0888 = 0x801B0888; -D_801B088C = 0x801B088C; -D_801B0890 = 0x801B0890; -D_801B0894 = 0x801B0894; -D_801B0898 = 0x801B0898; -D_801B089C = 0x801B089C; -D_801B08A0 = 0x801B08A0; -D_801B08A4 = 0x801B08A4; -D_801B08A8 = 0x801B08A8; -D_801B08AC = 0x801B08AC; -D_801B08B0 = 0x801B08B0; -D_801B08B4 = 0x801B08B4; -D_801B08B8 = 0x801B08B8; -D_801B08BC = 0x801B08BC; -D_801B08C0 = 0x801B08C0; -D_801B08C4 = 0x801B08C4; -D_801B08C8 = 0x801B08C8; -D_801B08D0 = 0x801B08D0; -D_801B08D8 = 0x801B08D8; -D_801B08E0 = 0x801B08E0; -D_801B08E8 = 0x801B08E8; -D_801B08EC = 0x801B08EC; -D_801B08F0 = 0x801B08F0; -D_801B08F4 = 0x801B08F4; -D_801B08FC = 0x801B08FC; -D_801B0900 = 0x801B0900; -D_801B0910 = 0x801B0910; -D_801B14F8 = 0x801B14F8; -D_i5_801B1D62 = 0x801B1D62; -D_i5_801B1D66 = 0x801B1D66; -D_i5_801B1D86 = 0x801B1D86; -D_801B2D10 = 0x801B2D10; -D_801B3200 = 0x801B3200; -D_801B3218 = 0x801B3218; -D_801B32E4 = 0x801B32E4; -D_801B32F8 = 0x801B32F8; -D_801B34F8 = 0x801B34F8; -D_801B35E8 = 0x801B35E8; -D_801B3CFC = 0x801B3CFC; -D_801B3D00 = 0x801B3D00; -D_801B3D04 = 0x801B3D04; -D_801B3D08 = 0x801B3D08; -D_801B3D20 = 0x801B3D20; -D_801B3D24 = 0x801B3D24; -D_801B3D28 = 0x801B3D28; -D_801B3D2C = 0x801B3D2C; -D_801B3D2E = 0x801B3D2E; -D_801B3D48 = 0x801B3D48; -D_801B3D4C = 0x801B3D4C; -D_801B3D50 = 0x801B3D50; -D_801B3D54 = 0x801B3D54; -D_801B3D56 = 0x801B3D56; -D_801B3D70 = 0x801B3D70; -D_801B3D74 = 0x801B3D74; -D_801B3D78 = 0x801B3D78; -D_801B3D7C = 0x801B3D7C; -D_801B3D7E = 0x801B3D7E; -D_801B3D80 = 0x801B3D80; -D_801B4780 = 0x801B4780; -D_801B47E0 = 0x801B47E0; -D_801B4840 = 0x801B4840; -D_801B4BD0 = 0x801B4BD0; -D_801B4C30 = 0x801B4C30; -D_801B4C90 = 0x801B4C90; -D_801B5020 = 0x801B5020; -D_801B5110 = 0x801B5110; -D_801B5470 = 0x801B5470; -D_801B54B8 = 0x801B54B8; -D_801B5540 = 0x801B5540; -D_801B5544 = 0x801B5544; -D_801B5548 = 0x801B5548; -D_801B554C = 0x801B554C; -D_801B5550 = 0x801B5550; -D_801B5558 = 0x801B5558; -D_801B5560 = 0x801B5560; -D_801B5564 = 0x801B5564; -D_801B557C = 0x801B557C; -D_801B5588 = 0x801B5588; -D_801B558C = 0x801B558C; -D_801B55A4 = 0x801B55A4; -D_801B55AC = 0x801B55AC; -D_801B55B4 = 0x801B55B4; -D_801B55F8 = 0x801B55F8; -D_801B5602 = 0x801B5602; -D_801B560F = 0x801B560F; -D_801B5610 = 0x801B5610; -D_801B5618 = 0x801B5618; -D_801B561A = 0x801B561A; -D_801B561B = 0x801B561B; -D_801B561C = 0x801B561C; -D_801B561E = 0x801B561E; -D_801B5620 = 0x801B5620; -D_801B5628 = 0x801B5628; -D_801B562C = 0x801B562C; -D_801B562E = 0x801B562E; -D_801B563A = 0x801B563A; -D_801B563C = 0x801B563C; -D_801B564C = 0x801B564C; -D_801B5670 = 0x801B5670; -D_801B5674 = 0x801B5674; -D_801B5678 = 0x801B5678; -D_801B568C = 0x801B568C; -D_801B5690 = 0x801B5690; -D_801B56C0 = 0x801B56C0; -D_801B56C4 = 0x801B56C4; -D_801B56C8 = 0x801B56C8; -D_801B56CC = 0x801B56CC; -D_801B56F0 = 0x801B56F0; -D_801B56F4 = 0x801B56F4; -D_801B56F8 = 0x801B56F8; -D_801B5738 = 0x801B5738; -D_801B5990 = 0x801B5990; -D_801B599C = 0x801B599C; -D_801B59A8 = 0x801B59A8; -D_801B59B4 = 0x801B59B4; -D_801B59C0 = 0x801B59C0; -D_801B59CC = 0x801B59CC; -D_801B59D8 = 0x801B59D8; -D_801B59E4 = 0x801B59E4; -D_801B59F0 = 0x801B59F0; -D_801B59FC = 0x801B59FC; -D_801B5A08 = 0x801B5A08; -D_801B5A14 = 0x801B5A14; -D_801B5A20 = 0x801B5A20; -D_801B5A2C = 0x801B5A2C; -D_801B5A40 = 0x801B5A40; -D_801B5A44 = 0x801B5A44; -D_801B5A48 = 0x801B5A48; -D_801B7510 = 0x801B7510; -D_801B9048 = 0x801B9048; -D_801B9500 = 0x801B9500; -D_801B9508 = 0x801B9508; -D_801B9514 = 0x801B9514; -D_801B952C = 0x801B952C; -D_801B9568 = 0x801B9568; -D_801B95A0 = 0x801B95A0; -D_801B95AC = 0x801B95AC; -D_801B95B8 = 0x801B95B8; -D_801B95C4 = 0x801B95C4; -D_801B95C8 = 0x801B95C8; -D_801B95CC = 0x801B95CC; -D_801B95D0 = 0x801B95D0; -D_801B95D4 = 0x801B95D4; -D_801B95E0 = 0x801B95E0; -D_801B95E8 = 0x801B95E8; -D_801B95FC = 0x801B95FC; -D_801B9608 = 0x801B9608; -D_801B960C = 0x801B960C; -D_801B9634 = 0x801B9634; -D_801B9638 = 0x801B9638; -D_801B963C = 0x801B963C; -D_801B9640 = 0x801B9640; -D_801B9644 = 0x801B9644; -D_801B9670 = 0x801B9670; -D_801B9680 = 0x801B9680; -D_801B96A0 = 0x801B96A0; -D_801B96B4 = 0x801B96B4; -D_801B96C0 = 0x801B96C0; -D_801B96D0 = 0x801B96D0; -D_801B9714 = 0x801B9714; -D_801B9744 = 0x801B9744; -D_801B9748 = 0x801B9748; -D_801B9798 = 0x801B9798; -D_801B979C = 0x801B979C; -D_801B97A4 = 0x801B97A4; -D_801B97A8 = 0x801B97A8; -D_801B97AC = 0x801B97AC; -D_801B97B0 = 0x801B97B0; -D_801B97B4 = 0x801B97B4; -D_801B97B8 = 0x801B97B8; -D_801B97BC = 0x801B97BC; -D_801B97C0 = 0x801B97C0; -D_801B97C4 = 0x801B97C4; -D_801B97C8 = 0x801B97C8; -D_801B97CC = 0x801B97CC; -D_801B97D0 = 0x801B97D0; -D_801B97D4 = 0x801B97D4; -D_801B97D8 = 0x801B97D8; -D_801B97E4 = 0x801B97E4; -D_801B97EC = 0x801B97EC; -D_801B97F8 = 0x801B97F8; -D_801B9804 = 0x801B9804; -D_801B9824 = 0x801B9824; -D_801B9828 = 0x801B9828; -D_801B9888 = 0x801B9888; -D_801B988C = 0x801B988C; -D_801B98CC = 0x801B98CC; -D_801B98D4 = 0x801B98D4; -D_801B9910 = 0x801B9910; -D_801B9958 = 0x801B9958; -D_801B99F0 = 0x801B99F0; -D_801B9A18 = 0x801B9A18; -D_801B9A1C = 0x801B9A1C; -D_801B9A24 = 0x801B9A24; -D_801B9A3C = 0x801B9A3C; -D_801B9A4C = 0x801B9A4C; -D_801B9A70 = 0x801B9A70; -D_801B9A78 = 0x801B9A78; -D_801BAD38 = 0x801BAD38; -D_801BB438 = 0x801BB438; -D_801BB440 = 0x801BB440; -D_801BB44C = 0x801BB44C; -D_801BB450 = 0x801BB450; -D_801BB454 = 0x801BB454; -D_801BB458 = 0x801BB458; -D_801BB45C = 0x801BB45C; -D_801BB468 = 0x801BB468; -D_801BB46C = 0x801BB46C; -D_801BB470 = 0x801BB470; -D_801BB474 = 0x801BB474; -D_801BB478 = 0x801BB478; -D_801BB47C = 0x801BB47C; -D_801BB48C = 0x801BB48C; -D_801BB490 = 0x801BB490; -D_801BB4C8 = 0x801BB4C8; -D_801BB4CC = 0x801BB4CC; -D_801BB4D0 = 0x801BB4D0; -D_801BB4D4 = 0x801BB4D4; -D_801BB4D8 = 0x801BB4D8; -D_801BB4E0 = 0x801BB4E0; -D_801BB4FC = 0x801BB4FC; -D_801BB500 = 0x801BB500; -D_801BB504 = 0x801BB504; -D_801BB550 = 0x801BB550; -D_801BB554 = 0x801BB554; -D_801BB558 = 0x801BB558; -D_801BB55C = 0x801BB55C; -D_801BB560 = 0x801BB560; -D_801BB564 = 0x801BB564; -D_801BB568 = 0x801BB568; -D_801BB56C = 0x801BB56C; -D_801BB574 = 0x801BB574; -D_801BB578 = 0x801BB578; -D_801BB57C = 0x801BB57C; -D_801BB590 = 0x801BB590; -D_801BB594 = 0x801BB594; -D_801BB5A8 = 0x801BB5A8; -D_801BB5AC = 0x801BB5AC; -D_801BB5B4 = 0x801BB5B4; -D_801BB5B8 = 0x801BB5B8; -D_801BB5BC = 0x801BB5BC; -D_801BB5C0 = 0x801BB5C0; -D_801BB5E0 = 0x801BB5E0; -D_801BB5E4 = 0x801BB5E4; -D_801BB5E8 = 0x801BB5E8; -D_801BB5EC = 0x801BB5EC; -D_801BB5F0 = 0x801BB5F0; -D_801BB5F4 = 0x801BB5F4; -D_801BB5F8 = 0x801BB5F8; -D_801BB5FC = 0x801BB5FC; -D_801BB600 = 0x801BB600; -D_801BB604 = 0x801BB604; -D_801BB688 = 0x801BB688; -D_801BB690 = 0x801BB690; -D_801BB6A0 = 0x801BB6A0; -D_801BB6AC = 0x801BB6AC; -D_801BB6DC = 0x801BB6DC; -D_801BB6E0 = 0x801BB6E0; -D_801BB6E4 = 0x801BB6E4; -D_801BB6E8 = 0x801BB6E8; -D_801BB6EC = 0x801BB6EC; -D_801BB6F0 = 0x801BB6F0; -D_801BB6F4 = 0x801BB6F4; -D_801BB6F8 = 0x801BB6F8; -D_801BB700 = 0x801BB700; -D_801BB704 = 0x801BB704; -D_801BB708 = 0x801BB708; -D_801BB70C = 0x801BB70C; -D_801BBD10 = 0x801BBD10; -D_801BCF00 = 0x801BCF00; -D_801BCF04 = 0x801BCF04; -D_801BCF08 = 0x801BCF08; -D_801BCF0C = 0x801BCF0C; -D_801BCF10 = 0x801BCF10; -D_801BCF14 = 0x801BCF14; -D_801BCF18 = 0x801BCF18; -D_801BD5D8 = 0x801BD5D8; -D_801BD5E0 = 0x801BD5E0; -D_801BD5E8 = 0x801BD5E8; -D_801BD8B8 = 0x801BD8B8; -D_801BDB88 = 0x801BDB88; -D_801BDE58 = 0x801BDE58; -D_801BE110 = 0x801BE110; -D_801BE128 = 0x801BE128; -D_801BE134 = 0x801BE134; -D_801BE158 = 0x801BE158; -D_801C0001 = 0x801C0001; -D_801C0510 = 0x801C0510; -D_801C2910 = 0x801C2910; -D_801C4D10 = 0x801C4D10; -D_801C4D14 = 0x801C4D14; -D_801C4D18 = 0x801C4D18; -D_801C4D1C = 0x801C4D1C; -D_801C4D20 = 0x801C4D20; -D_801C4D24 = 0x801C4D24; -D_801C4D28 = 0x801C4D28; -D_801C4D2C = 0x801C4D2C; -D_801C4D30 = 0x801C4D30; -D_801C4D34 = 0x801C4D34; -D_801C4D38 = 0x801C4D38; -D_801C4D3C = 0x801C4D3C; -D_801C4D40 = 0x801C4D40; -D_801C4D44 = 0x801C4D44; -D_801C4D78 = 0x801C4D78; -D_801C4D7C = 0x801C4D7C; -D_801C4D80 = 0x801C4D80; -D_801C4D84 = 0x801C4D84; -D_801C4DB4 = 0x801C4DB4; -D_801C4DB8 = 0x801C4DB8; -D_801C4DBC = 0x801C4DBC; -D_801C4DC0 = 0x801C4DC0; -D_801C4DC8 = 0x801C4DC8; -D_801C4DCC = 0x801C4DCC; -D_801C4DD0 = 0x801C4DD0; -D_801C4DD8 = 0x801C4DD8; -D_801C4E50 = 0x801C4E50; -D_801C4EC8 = 0x801C4EC8; -D_801C4F40 = 0x801C4F40; -D_801C4FB8 = 0x801C4FB8; -D_801C5030 = 0x801C5030; -D_801C5058 = 0x801C5058; -D_801C50A8 = 0x801C50A8; -D_801C5120 = 0x801C5120; -D_801C5124 = 0x801C5124; -D_801C5128 = 0x801C5128; -D_801C512C = 0x801C512C; -D_801C5130 = 0x801C5130; -D_801C513C = 0x801C513C; -D_801C5140 = 0x801C5140; -D_801C5144 = 0x801C5144; -D_801C5148 = 0x801C5148; -D_801C514C = 0x801C514C; -D_801C5150 = 0x801C5150; -D_801C5154 = 0x801C5154; -D_801C5158 = 0x801C5158; -D_801C515C = 0x801C515C; -D_801C5160 = 0x801C5160; -D_801C5168 = 0x801C5168; -D_801C5180 = 0x801C5180; -D_801C5184 = 0x801C5184; -D_801C5188 = 0x801C5188; -D_801C51B0 = 0x801C51B0; -D_801C51B4 = 0x801C51B4; -D_801C51B8 = 0x801C51B8; -D_801C51D8 = 0x801C51D8; -D_801C5244 = 0x801C5244; -D_801C5248 = 0x801C5248; -D_801C524C = 0x801C524C; -D_801C5250 = 0x801C5250; -D_801C5254 = 0x801C5254; -D_801C5258 = 0x801C5258; -D_801C525C = 0x801C525C; -D_801C5260 = 0x801C5260; -D_801C5268 = 0x801C5268; -D_801C5274 = 0x801C5274; -D_801C5278 = 0x801C5278; -D_801C5280 = 0x801C5280; -D_801C528C = 0x801C528C; -D_801C5290 = 0x801C5290; -D_801C5294 = 0x801C5294; -D_801C5298 = 0x801C5298; -D_801C52A0 = 0x801C52A0; -D_801C52C0 = 0x801C52C0; -D_801C52E0 = 0x801C52E0; -D_801C5300 = 0x801C5300; -D_801C5308 = 0x801C5308; -D_801C5328 = 0x801C5328; -D_801C5348 = 0x801C5348; -D_801C534C = 0x801C534C; -D_801C5350 = 0x801C5350; -D_801C5358 = 0x801C5358; -D_801C5378 = 0x801C5378; -D_801C5398 = 0x801C5398; -D_801C539C = 0x801C539C; -D_801C53A0 = 0x801C53A0; -D_801C53A4 = 0x801C53A4; -D_801C53A8 = 0x801C53A8; -D_801C53C8 = 0x801C53C8; -D_801C53CC = 0x801C53CC; -D_801C53D0 = 0x801C53D0; -D_801C5430 = 0x801C5430; -D_801C546C = 0x801C546C; -D_801C5470 = 0x801C5470; -D_801C548C = 0x801C548C; -D_801C5490 = 0x801C5490; -D_801C5494 = 0x801C5494; -D_801C5498 = 0x801C5498; -D_801C549C = 0x801C549C; -D_801C54A0 = 0x801C54A0; -D_801C54A4 = 0x801C54A4; -D_801C54CC = 0x801C54CC; -D_801C54D0 = 0x801C54D0; -D_801C54D4 = 0x801C54D4; -D_801C54D8 = 0x801C54D8; -D_801C54DC = 0x801C54DC; -D_801C54E0 = 0x801C54E0; -D_801C54E4 = 0x801C54E4; -D_801C54E8 = 0x801C54E8; -D_801C54EC = 0x801C54EC; -D_801C54F0 = 0x801C54F0; -D_801C54F4 = 0x801C54F4; -D_801C54F8 = 0x801C54F8; -D_801C54FC = 0x801C54FC; -D_801C5500 = 0x801C5500; -D_801C5504 = 0x801C5504; -D_801C5508 = 0x801C5508; -D_801C550C = 0x801C550C; -D_801C5510 = 0x801C5510; -D_801C5514 = 0x801C5514; -D_801C5518 = 0x801C5518; -D_801C551C = 0x801C551C; -D_801C5520 = 0x801C5520; -D_801C5524 = 0x801C5524; -D_801C5528 = 0x801C5528; -D_801C552C = 0x801C552C; -D_801C5530 = 0x801C5530; -D_801C5534 = 0x801C5534; -D_801C5538 = 0x801C5538; -D_801C553C = 0x801C553C; -D_801C5540 = 0x801C5540; -D_801C5544 = 0x801C5544; -D_801C5548 = 0x801C5548; -D_801C554C = 0x801C554C; -D_801C5550 = 0x801C5550; -D_801C5554 = 0x801C5554; -D_801C5558 = 0x801C5558; -D_801C555C = 0x801C555C; -D_801C5560 = 0x801C5560; -D_801C5564 = 0x801C5564; -D_801C5568 = 0x801C5568; -D_801C556C = 0x801C556C; -D_801C5570 = 0x801C5570; -D_801C5574 = 0x801C5574; -D_801C5578 = 0x801C5578; -D_801C557C = 0x801C557C; -D_801C5580 = 0x801C5580; -D_801C5584 = 0x801C5584; -D_801C5588 = 0x801C5588; -D_801C558C = 0x801C558C; -D_801C5590 = 0x801C5590; -D_801C5594 = 0x801C5594; -D_801C5598 = 0x801C5598; -D_801C559C = 0x801C559C; -D_801C55A0 = 0x801C55A0; -D_801C55A4 = 0x801C55A4; -D_801C55A8 = 0x801C55A8; -D_801C55AC = 0x801C55AC; -D_801C55B0 = 0x801C55B0; -D_801C55B4 = 0x801C55B4; -D_801C55B8 = 0x801C55B8; -D_801C55BC = 0x801C55BC; -D_801C55C0 = 0x801C55C0; -D_801C55C4 = 0x801C55C4; -D_801C55C8 = 0x801C55C8; -D_801C55D0 = 0x801C55D0; -D_801C55D4 = 0x801C55D4; -D_801C55D8 = 0x801C55D8; -D_801C55E0 = 0x801C55E0; -D_801C55F0 = 0x801C55F0; -D_801C59B0 = 0x801C59B0; -D_801C5B70 = 0x801C5B70; -D_801C5BB0 = 0x801C5BB0; -D_801C5BF0 = 0x801C5BF0; -D_801C5C30 = 0x801C5C30; -D_801C5CF0 = 0x801C5CF0; -D_801C5D70 = 0x801C5D70; -D_801C6130 = 0x801C6130; -D_801C64F0 = 0x801C64F0; -D_801C64F8 = 0x801C64F8; -D_801C65A4 = 0x801C65A4; -D_801C65A8 = 0x801C65A8; -D_801C65E4 = 0x801C65E4; -D_801C65E8 = 0x801C65E8; -D_801C65EC = 0x801C65EC; -D_801C65F0 = 0x801C65F0; -D_801C65F4 = 0x801C65F4; -D_801C65F8 = 0x801C65F8; -D_801C65FC = 0x801C65FC; -D_801C6600 = 0x801C6600; -D_801C6604 = 0x801C6604; -D_801C6608 = 0x801C6608; -D_801C660C = 0x801C660C; -D_801C6610 = 0x801C6610; -D_801C6614 = 0x801C6614; -D_801C6618 = 0x801C6618; -D_80281000 = 0x80281000; -D_80281400 = 0x80281400; -D_80282000 = 0x80282000; -D_802A7800 = 0x802A7800; -D_802D7800 = 0x802D7800; -D_80387800 = 0x80387800; -D_8038F080 = 0x8038F080; -D_8038F300 = 0x8038F300; -D_8038F800 = 0x8038F800; + D_A0000000 = 0xA0000000; D_A0300000 = 0xA0300000; -D_A3F0000C = 0xA3F0000C; -D_A3F80004 = 0xA3F80004; -D_A3F80008 = 0xA3F80008; -D_A3F80014 = 0xA3F80014; D_A4000000 = 0xA4000000; -D_A4001000 = 0xA4001000; -D_A6000000 = 0xA6000000; -D_B0000000 = 0xB0000000; -jtbl_B0000008_main = 0xB0000008; - -func_80025AFC = 0x80025AFC; -func_800BE804 = 0x800BE804; -func_8017E7A0 = 0x8017E7A0; -func_8017E7B0 = 0x8017E7B0; -func_8017E91C = 0x8017E91C; -func_8017E920 = 0x8017E920; -func_8017E9D4 = 0x8017E9D4; -func_8017EB30 = 0x8017EB30; -func_8017EB58 = 0x8017EB58; -func_8017EBE0 = 0x8017EBE0; -func_8017ED88 = 0x8017ED88; -func_8017F54C = 0x8017F54C; -func_8017FB90 = 0x8017FB90; -func_8017FCC0 = 0x8017FCC0; -func_801801B0 = 0x801801B0; -func_801803A0 = 0x801803A0; -func_801804B4 = 0x801804B4; -func_80180DFC = 0x80180DFC; -func_80181BEC = 0x80181BEC; -func_80181D44 = 0x80181D44; -func_8018204C = 0x8018204C; -func_80182334 = 0x80182334; -func_801829AC = 0x801829AC; -func_80182BFC = 0x80182BFC; -func_80182C78 = 0x80182C78; -func_80183088 = 0x80183088; -func_801830FC = 0x801830FC; -func_80183240 = 0x80183240; -func_801833A8 = 0x801833A8; -func_80183644 = 0x80183644; -func_80183F30 = 0x80183F30; -func_80183FC4 = 0x80183FC4; -func_80184420 = 0x80184420; -func_80184CE4 = 0x80184CE4; -func_80185200 = 0x80185200; -func_80185298 = 0x80185298; -func_80185640 = 0x80185640; -func_8018565C = 0x8018565C; -func_80185878 = 0x80185878; -func_80185FB0 = 0x80185FB0; -func_80186004 = 0x80186004; -func_80186198 = 0x80186198; -func_80186280 = 0x80186280; -func_80186368 = 0x80186368; -func_80186AF4 = 0x80186AF4; -func_80186B6C = 0x80186B6C; -func_80186CE4 = 0x80186CE4; -func_8018737C = 0x8018737C; -func_801876B0 = 0x801876B0; -func_8018818C = 0x8018818C; -func_801883D4 = 0x801883D4; -func_80188828 = 0x80188828; -func_80188E3C = 0x80188E3C; -func_801890F8 = 0x801890F8; -func_80189488 = 0x80189488; -func_8018977C = 0x8018977C; -func_80189F20 = 0x80189F20; -func_8018A040 = 0x8018A040; -func_8018A114 = 0x8018A114; -func_8018A530 = 0x8018A530; -func_8018A624 = 0x8018A624; -func_8018A83C = 0x8018A83C; -func_8018AC58 = 0x8018AC58; -func_8018AEC4 = 0x8018AEC4; -func_8018AF08 = 0x8018AF08; -func_8018B950 = 0x8018B950; -func_8018D100 = 0x8018D100; -func_8018D468 = 0x8018D468; -func_8018D5D4 = 0x8018D5D4; -func_8018DC28 = 0x8018DC28; -func_8018DEBC = 0x8018DEBC; -func_8018E04C = 0x8018E04C; -func_8018E4AC = 0x8018E4AC; -func_8018EF64 = 0x8018EF64; -func_8018F12C = 0x8018F12C; -func_8018F598 = 0x8018F598; -func_8018F7D8 = 0x8018F7D8; -func_8018F81C = 0x8018F81C; -func_8018F8D4 = 0x8018F8D4; -func_8018FB40 = 0x8018FB40; -func_8018FB60 = 0x8018FB60; -func_8018FB74 = 0x8018FB74; -func_8018FED0 = 0x8018FED0; -func_8019037C = 0x8019037C; -func_80190720 = 0x80190720; -func_80190800 = 0x80190800; -func_80190B60 = 0x80190B60; -func_80190BC0 = 0x80190BC0; -func_80191238 = 0x80191238; -func_80191A80 = 0x80191A80; -func_80192958 = 0x80192958; -func_80192A94 = 0x80192A94; -func_80193484 = 0x80193484; -func_80193750 = 0x80193750; -func_801942E4 = 0x801942E4; -func_801946B0 = 0x801946B0; -func_801949F4 = 0x801949F4; -func_80194C14 = 0x80194C14; -func_80195878 = 0x80195878; -func_8019595C = 0x8019595C; -func_80195B48 = 0x80195B48; -func_80195C80 = 0x80195C80; -func_80195C84 = 0x80195C84; -func_80196114 = 0x80196114; -func_801971B4 = 0x801971B4; -func_80197D74 = 0x80197D74; -func_80198384 = 0x80198384; -func_8019A5D8 = 0x8019A5D8; -func_8019AA68 = 0x8019AA68; -func_8019AE88 = 0x8019AE88; -func_8019AEF8 = 0x8019AEF8; -func_8019B148 = 0x8019B148; -func_8019B93C = 0x8019B93C; -func_8019BDD4 = 0x8019BDD4; -func_8019BF68 = 0x8019BF68; -func_8019C8B8 = 0x8019C8B8; -func_8019CD84 = 0x8019CD84; -func_8019D110 = 0x8019D110; -func_8019D270 = 0x8019D270; -func_8019D414 = 0x8019D414; -func_8019D418 = 0x8019D418; -func_8019D8C4 = 0x8019D8C4; -func_8019EBC8 = 0x8019EBC8; -func_8019F07C = 0x8019F07C; -func_8019FE80 = 0x8019FE80; -func_801A0AB8 = 0x801A0AB8; -func_801A14A0 = 0x801A14A0; -func_801A1B7C = 0x801A1B7C; -func_801A1F8C = 0x801A1F8C; -func_801A2C44 = 0x801A2C44; -func_801A2CD4 = 0x801A2CD4; -func_801A3508 = 0x801A3508; -func_801A3A54 = 0x801A3A54; -func_801A3B3C = 0x801A3B3C; -func_801A3E48 = 0x801A3E48; -func_801A40E4 = 0x801A40E4; -func_801A42C4 = 0x801A42C4; -func_801A438C = 0x801A438C; -func_801A4454 = 0x801A4454; -func_801A45BC = 0x801A45BC; -func_801A491C = 0x801A491C; -func_801A5640 = 0x801A5640; -func_801A6C04 = 0x801A6C04; -func_801A6C94 = 0x801A6C94; -func_801A8390 = 0x801A8390; -func_801A9BD0 = 0x801A9BD0; -func_801AB018 = 0x801AB018; -func_801AC420 = 0x801AC420; -func_801ACBBC = 0x801ACBBC; -func_801AD5DC = 0x801AD5DC; -func_801ADDFC = 0x801ADDFC; -func_801AE0EC = 0x801AE0EC; -func_801AE130 = 0x801AE130; -func_801B1818 = 0x801B1818; -func_801B250C = 0x801B250C; -func_801B51BC = 0x801B51BC; -func_801B52DC = 0x801B52DC; -func_801B5398 = 0x801B5398; -func_801B5F30 = 0x801B5F30; diff --git a/src/overlays/ovl_i3/fox_zo.c b/src/overlays/ovl_i3/fox_zo.c index 8141629c..a0f8c21b 100644 --- a/src/overlays/ovl_i3/fox_zo.c +++ b/src/overlays/ovl_i3/fox_zo.c @@ -42,45 +42,6 @@ void Zoness_80199394(Boss* bossZO, s32 arg1); void Zoness_80199470(Boss* bossZO, s32 arg1); void Zoness_8019962C(Boss* bossZO, f32 arg1); -// typedef struct { -// /* 0 */ char pad0[4]; -// /* 4 */ f32 unk_4; -// /* 8 */ char pad8[36]; -// /* 44 */ f32 unk_2C; -// /* 48 */ char pad30[44]; -// /* 92 */ f32 unk_5C; -// /* 96 */ char pad60[4]; -// /* 100 */ f32 unk_64; -// /* 104 */ f32 unk_68; -// /* 108 */ char pad6C[4]; -// /* 112 */ f32 unk_70; -// /* 116 */ Vec3f unk_74; -// /* 128 */ Vec3f unk_80; -// /* 140 */ char pad8C[8]; -// /* 148 */ Vec3f unk_94; -// /* 160 */ Vec3f unk_A0; -// /* 172 */ Vec3f unk_AC; -// /* 184 */ Vec3f unk_B8; -// /* 196 */ Vec3f unk_C4; -// /* 208 */ Vec3f unk_D0; -// /* 220 */ Vec3f unk_DC; -// /* 232 */ char padE8[8]; -// /* 240 */ Vec3f unk_F0; -// /* 252 */ char padFC[8]; -// /* 260 */ Vec3f rot_104.x; -// /* 272 */ Vec3f boostSpeed; -// /* 284 */ Vec3f yRotVel_11C; -// /* 296 */ char pad128[76]; -// /* 372 */ Vec3f unk_174; -// /* 384 */ Vec3f unk_180; -// /* 396 */ Vec3f unk_18C; -// /* 408 */ Vec3f unk_198; -// /* 420 */ char pad1A4[4]; -// /* 424 */ Vec3f unk_1A8; -// /* 436 */ Vec3f turretActor; -// /* 448 */ char pad1C0[152]; -// } UnkStruct_1C24E8; /* size = 600 */ - typedef enum { /* 0 */ ZO_LIMB_0, /* 1 */ ZO_LIMB_1, diff --git a/srcjp/1FA60.c b/srcjp/1FA60.c new file mode 100644 index 00000000..96122084 --- /dev/null +++ b/srcjp/1FA60.c @@ -0,0 +1,3 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/1FA60/func_8001EF40.s") diff --git a/srcjp/audio/audio_effects.c b/srcjp/audio/audio_effects.c new file mode 100644 index 00000000..f1143c66 --- /dev/null +++ b/srcjp/audio/audio_effects.c @@ -0,0 +1,19 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_effects/func_80013520.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_effects/func_800136C8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_effects/func_80013828.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_effects/func_800138FC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_effects/func_80013940.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_effects/func_80013B38.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_effects/func_80013BA4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_effects/func_80013C8C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_effects/func_80013CB0.s") diff --git a/srcjp/audio/audio_general.c b/srcjp/audio/audio_general.c new file mode 100644 index 00000000..03277d0e --- /dev/null +++ b/srcjp/audio/audio_general.c @@ -0,0 +1,204 @@ +#include "common.h" + +void func_80016B70(void) { +} + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_80016B78.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_80016CE0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_80016DFC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_80017004.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_80017110.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_80017480.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_800175B4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_80017670.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_800176A8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_80017720.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_80017880.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_800178E8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_80018414.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001843C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_800184BC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_80018530.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_80018590.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_800185F4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001860C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_800186C0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_80018718.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_80018FBC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_80019000.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_800190C4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_80019188.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_80019204.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_80019278.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_800192DC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_80019338.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_800193B0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_80019554.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_800198CC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_800199E0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001A13C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001A3B0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001A4AC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001A5D8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001A620.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001A67C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001A7E4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001A958.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001AAA8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001AB0C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001ABB0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001AC04.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001AC70.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001ADFC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001AE20.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001AE64.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001AF78.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001AF98.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001AFF4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001B004.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001B050.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001B0C8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001B508.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001B828.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001BAF4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001BC28.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001BCD4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001BCFC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001BDC0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001C074.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001C4A0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001C96C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001CAD8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001CC50.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001CDAC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001CEF8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001CFCC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001D030.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001D078.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001D104.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001D184.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001D1DC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001D22C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001D298.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001D3CC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001D470.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001D4D0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001D4E0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001D514.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001D57C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001D5F8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001D710.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001D7B4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001D858.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001D980.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001D9CC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001DAB8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001DB68.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001DCA8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001DD04.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001DD44.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001DD8C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001DDB8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001DE18.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001DEF4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/func_8001DFA4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_general/D_800C5DE0.s") diff --git a/srcjp/audio/audio_heap.c b/srcjp/audio/audio_heap.c new file mode 100644 index 00000000..186cb572 --- /dev/null +++ b/srcjp/audio/audio_heap.c @@ -0,0 +1,67 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_heap/func_8000BE20.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_heap/func_8000BEE8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_heap/func_8000BFD4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_heap/func_8000C044.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_heap/func_8000C0C4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_heap/func_8000C11C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_heap/func_8000C144.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_heap/func_8000C158.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_heap/func_8000C188.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_heap/func_8000C198.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_heap/func_8000C1F4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_heap/func_8000C270.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_heap/func_8000C2EC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_heap/func_8000C3A8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_heap/func_8000C464.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_heap/func_8000CB40.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_heap/func_8000CB98.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_heap/func_8000CCA4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_heap/func_8000D078.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_heap/func_8000D23C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_heap/func_8000D2B4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_heap/func_8000D658.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_heap/func_8000DCBC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_heap/func_8000DD14.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_heap/func_8000DD94.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_heap/func_8000DDE4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_heap/func_8000DE34.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_heap/func_8000DE84.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_heap/func_8000DF18.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_heap/func_8000E1AC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_heap/func_8000E374.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_heap/func_8000E3B8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_heap/func_8000E440.s") diff --git a/srcjp/audio/audio_load.c b/srcjp/audio/audio_load.c new file mode 100644 index 00000000..b30085b5 --- /dev/null +++ b/srcjp/audio/audio_load.c @@ -0,0 +1,97 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_8000E650.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_8000E758.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_8000EA90.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_8000ED64.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_8000EDC4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_8000EE70.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_8000EED8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_8000EFC4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_8000F094.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_8000F0F8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_8000F1C0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_8000F228.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_8000F308.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_8000F3B0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_8000F3D0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_8000F504.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_8000F538.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_8000F628.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_8000F6F8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_8000F934.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_8000F970.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_8000F9C4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_8000FA08.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_8000FBCC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_8000FC68.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_8000FCC0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_8000FD94.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_8000FDA4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_8000FDB8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_8000FDD8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_800100B4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_800100E4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_80010704.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_800108B4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_80010920.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_80010988.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_80010B14.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_80010B98.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_80010BF0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_80010D08.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_80010D78.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_80011014.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_800110A4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_800110FC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_80011238.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_80011664.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_80011828.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_load/func_80011870.s") diff --git a/srcjp/audio/audio_playback.c b/srcjp/audio/audio_playback.c new file mode 100644 index 00000000..208c2b90 --- /dev/null +++ b/srcjp/audio/audio_playback.c @@ -0,0 +1,59 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_playback/func_800119B0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_playback/func_80011D78.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_playback/func_80011E30.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_playback/func_80011E6C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_playback/func_80011F1C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_playback/func_80011FD8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_playback/func_8001206C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_playback/func_800120C8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_playback/func_80012558.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_playback/func_8001278C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_playback/func_800127AC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_playback/func_800127CC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_playback/func_800128D0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_playback/func_80012974.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_playback/func_80012984.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_playback/func_800129D4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_playback/func_80012A84.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_playback/func_80012BE4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_playback/func_80012D20.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_playback/func_80012D60.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_playback/func_80012D8C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_playback/func_80012E0C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_playback/func_80012F48.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_playback/func_80012F7C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_playback/func_80012FA8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_playback/func_80012FF4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_playback/func_80013044.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_playback/func_8001313C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_playback/func_80013408.s") diff --git a/srcjp/audio/audio_seqplayer.c b/srcjp/audio/audio_seqplayer.c new file mode 100644 index 00000000..f1863a96 --- /dev/null +++ b/srcjp/audio/audio_seqplayer.c @@ -0,0 +1,51 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_seqplayer/func_80013FC0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_seqplayer/func_800140E4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_seqplayer/func_800141F0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_seqplayer/func_8001422C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_seqplayer/func_8001427C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_seqplayer/func_800142E8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_seqplayer/func_80014364.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_seqplayer/func_80014490.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_seqplayer/func_80014560.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_seqplayer/func_80014604.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_seqplayer/func_800146DC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_seqplayer/func_8001471C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_seqplayer/func_8001475C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_seqplayer/func_800147E0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_seqplayer/func_800147F4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_seqplayer/func_80014824.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_seqplayer/func_80014868.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_seqplayer/func_800153E0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_seqplayer/func_80015450.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_seqplayer/func_800154E4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_seqplayer/func_80015508.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_seqplayer/func_800160F4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_seqplayer/func_800168AC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_seqplayer/func_80016924.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_seqplayer/func_800169DC.s") diff --git a/srcjp/audio/audio_synthesis.c b/srcjp/audio/audio_synthesis.c new file mode 100644 index 00000000..69be1ce2 --- /dev/null +++ b/srcjp/audio/audio_synthesis.c @@ -0,0 +1,41 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_synthesis/func_80008270.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_synthesis/func_80008514.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_synthesis/func_80008930.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_synthesis/func_800092D4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_synthesis/func_800096B4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_synthesis/func_8000982C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_synthesis/func_80009958.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_synthesis/func_80009A8C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_synthesis/func_80009B34.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_synthesis/func_80009BDC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_synthesis/func_80009C5C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_synthesis/func_80009D14.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_synthesis/func_80009F28.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_synthesis/func_8000A2D8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_synthesis/func_8000A40C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_synthesis/func_8000A8B0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_synthesis/func_8000B5A0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_synthesis/func_8000B630.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_synthesis/func_8000B6CC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_synthesis/func_8000BB3C.s") diff --git a/srcjp/audio/audio_thread.c b/srcjp/audio/audio_thread.c new file mode 100644 index 00000000..654e32ed --- /dev/null +++ b/srcjp/audio/audio_thread.c @@ -0,0 +1,39 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_thread/func_8001E030.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_thread/func_8001E524.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_thread/func_8001E800.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_thread/func_8001E858.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_thread/func_8001E8A8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_thread/func_8001E930.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_thread/func_8001E988.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_thread/func_8001E9AC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_thread/func_8001E9D0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_thread/func_8001EA00.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_thread/func_8001EA78.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_thread/func_8001EA8C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_thread/func_8001ED8C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_thread/func_8001EDF4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_thread/func_8001EE14.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_thread/func_8001EE6C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_thread/func_8001EEE0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_thread/func_8001EF1C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/audio/audio_thread/D_800C6100.s") diff --git a/srcjp/buffers.c b/srcjp/buffers.c new file mode 100644 index 00000000..3ca949c8 --- /dev/null +++ b/srcjp/buffers.c @@ -0,0 +1,10 @@ +#include "global.h" + +u64 gDramStack[SP_DRAM_STACK_SIZE64]; +u8 gOSYieldData[OS_YIELD_DATA_SIZE]; +FrameBuffer gZBuffer; // z buffer +u8 gTaskOutputBuffer[0x30000]; +u8 gAudioHeap[0xB0000]; +u16 gTextureRenderBuffer[0x3C40]; +u16 gFillBuffer[3 * SCREEN_WIDTH]; +FrameBuffer gFrameBuffers[3]; diff --git a/srcjp/engine/fox_360.c b/srcjp/engine/fox_360.c new file mode 100644 index 00000000..b7cccd16 --- /dev/null +++ b/srcjp/engine/fox_360.c @@ -0,0 +1,73 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_360/func_8002B320.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_360/func_8002B438.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_360/func_8002B488.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_360/func_8002B520.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_360/func_8002B544.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_360/func_8002B568.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_360/func_8002B58C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_360/func_8002B5B0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_360/func_8002B5D4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_360/func_8002B5F8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_360/func_8002B61C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_360/func_8002B640.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_360/func_8002BCA0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_360/func_8002BD74.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_360/func_8002BDA4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_360/func_8002C0C0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_360/func_8002C324.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_360/func_8002C538.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_360/func_8002C590.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_360/func_8002C5E0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_360/func_8002CA90.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_360/func_8002CB44.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_360/func_8002CDB8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_360/func_8002CE34.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_360/func_8002D050.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_360/func_8002D138.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_360/func_8002D3E0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_360/func_8002D7D0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_360/func_8002E6C8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_360/func_8002E770.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_360/func_8002E81C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_360/func_80031CD4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_360/func_80031F08.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_360/func_80032150.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_360/func_800322B8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_360/D_800DAE00.s") diff --git a/srcjp/engine/fox_beam.c b/srcjp/engine/fox_beam.c new file mode 100644 index 00000000..40b9e3a7 --- /dev/null +++ b/srcjp/engine/fox_beam.c @@ -0,0 +1,75 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_beam/func_80032BA0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_beam/func_80032C5C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_beam/func_80032CB8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_beam/func_80032CE8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_beam/func_80033188.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_beam/func_80033398.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_beam/func_80033454.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_beam/func_8003353C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_beam/func_800335E0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_beam/func_800336E4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_beam/func_80033DF8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_beam/func_800342A8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_beam/func_80034508.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_beam/func_800345BC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_beam/func_80034B64.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_beam/func_80034FB0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_beam/func_80035DA4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_beam/func_80036080.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_beam/func_800368C0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_beam/func_80037DF8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_beam/func_80037E48.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_beam/func_80037E7C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_beam/func_800383CC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_beam/func_800388F0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_beam/func_80038910.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_beam/func_8003893C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_beam/func_800389BC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_beam/func_80038D64.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_beam/func_80038E78.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_beam/func_80039248.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_beam/func_80039340.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_beam/func_80039A78.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_beam/func_80039E00.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_beam/func_8003A3BC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_beam/func_8003A6C4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_beam/func_8003A828.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_beam/func_8003A87C.s") diff --git a/srcjp/engine/fox_bg.c b/srcjp/engine/fox_bg.c new file mode 100644 index 00000000..64fa3115 --- /dev/null +++ b/srcjp/engine/fox_bg.c @@ -0,0 +1,21 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_bg/func_8003A960.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_bg/func_8003ACD8.s") + +void func_8003B050(void) { +} + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_bg/func_8003B058.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_bg/func_8003D2C0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_bg/func_8003D7C4.s") + +void func_8003DB4C(void) { +} + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_bg/func_8003DB54.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_bg/func_8003FBB8.s") diff --git a/srcjp/engine/fox_blur.c b/srcjp/engine/fox_blur.c new file mode 100644 index 00000000..ade26286 --- /dev/null +++ b/srcjp/engine/fox_blur.c @@ -0,0 +1,3 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_blur/func_80081490.s") diff --git a/srcjp/engine/fox_boss.c b/srcjp/engine/fox_boss.c new file mode 100644 index 00000000..5f8bc1b3 --- /dev/null +++ b/srcjp/engine/fox_boss.c @@ -0,0 +1,25 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_boss/func_8003FD40.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_boss/func_8003FE2C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_boss/func_8003FE38.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_boss/func_8003FE44.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_boss/func_8003FE50.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_boss/func_8003FE5C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_boss/func_8003FE68.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_boss/func_8003FE74.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_boss/func_8003FF5C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_boss/func_80040008.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_boss/func_8004001C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_boss/D_800DB5C0.s") diff --git a/srcjp/engine/fox_col1.c b/srcjp/engine/fox_col1.c new file mode 100644 index 00000000..0f427983 --- /dev/null +++ b/srcjp/engine/fox_col1.c @@ -0,0 +1,31 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_col1/func_800942A0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_col1/func_80094478.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_col1/func_80094650.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_col1/func_800947E4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_col1/func_80094908.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_col1/func_80094BA8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_col1/func_80094FAC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_col1/func_800954EC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_col1/func_80095780.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_col1/func_800957D4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_col1/func_80095818.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_col1/func_8009585C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_col1/func_800958A0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_col1/func_80096174.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_col1/func_80096820.s") diff --git a/srcjp/engine/fox_col2.c b/srcjp/engine/fox_col2.c new file mode 100644 index 00000000..e76c2d09 --- /dev/null +++ b/srcjp/engine/fox_col2.c @@ -0,0 +1,7 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_col2/func_800A0650.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_col2/func_800A06C0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_col2/func_800A0A3C.s") diff --git a/srcjp/engine/fox_demo.c b/srcjp/engine/fox_demo.c new file mode 100644 index 00000000..65a314f6 --- /dev/null +++ b/srcjp/engine/fox_demo.c @@ -0,0 +1,71 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_demo/func_80045940.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_demo/func_80045B44.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_demo/func_80045CC0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_demo/func_800464B0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_demo/func_8004678C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_demo/func_800467E8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_demo/func_8004691C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_demo/func_800469C4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_demo/func_80046A8C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_demo/func_800473AC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_demo/func_80047580.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_demo/func_800476C0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_demo/func_80047708.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_demo/func_80047904.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_demo/func_80047974.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_demo/func_800481E8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_demo/func_8004978C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_demo/func_800497B0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_demo/func_80049B40.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_demo/func_8004A248.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_demo/func_8004A254.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_demo/func_8004A2C0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_demo/func_8004A5B8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_demo/func_8004A6A8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_demo/func_8004AD50.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_demo/func_8004B230.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_demo/func_8004B32C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_demo/func_8004BA28.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_demo/func_8004BEB4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_demo/func_8004C5F0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_demo/func_8004C704.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_demo/func_8004CB10.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_demo/func_8004CD18.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_demo/func_8004E41C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_demo/D_800DB740.s") diff --git a/srcjp/engine/fox_display.c b/srcjp/engine/fox_display.c new file mode 100644 index 00000000..9c9b9bcc --- /dev/null +++ b/srcjp/engine/fox_display.c @@ -0,0 +1,75 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_display/func_8004E980.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_display/func_8004EF4C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_display/func_8004F1F8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_display/func_8004F270.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_display/func_8004F2E8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_display/func_8004F35C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_display/func_8004F3D4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_display/func_8004F508.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_display/func_8004F6D4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_display/func_8004F9D0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_display/func_8004FB98.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_display/func_8004FF9C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_display/func_8004FFF4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_display/func_800504A8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_display/func_80050950.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_display/func_80050968.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_display/func_80050A88.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_display/func_80050DCC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_display/func_800510D0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_display/func_80051150.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_display/func_800514AC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_display/func_800515DC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_display/func_80051764.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_display/func_80051AF4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_display/func_80051CD0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_display/func_800525D8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_display/func_800529A8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_display/func_80052CE8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_display/func_80053080.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_display/func_80053204.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_display/func_80053310.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_display/func_80053C7C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_display/func_80054098.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_display/func_80054354.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_display/func_80054664.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_display/func_80054714.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_display/func_80054B50.s") diff --git a/srcjp/engine/fox_edata.c b/srcjp/engine/fox_edata.c new file mode 100644 index 00000000..9955856a --- /dev/null +++ b/srcjp/engine/fox_edata.c @@ -0,0 +1,7 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edata/func_80056320.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edata/func_80056400.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edata/func_800564E0.s") diff --git a/srcjp/engine/fox_edisplay.c b/srcjp/engine/fox_edisplay.c new file mode 100644 index 00000000..d7c50d47 --- /dev/null +++ b/srcjp/engine/fox_edisplay.c @@ -0,0 +1,131 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_800564F0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_800565F0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_8005663C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_80056680.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_8005670C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_80056718.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_800567D4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_80056854.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_8005691C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_80056950.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_800569E0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_800569EC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_80056A20.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_80056A58.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_80056A64.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_80056A70.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_80056D98.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_80056E0C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_80056E40.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_80056EAC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_80056EB8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_80056EC4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_80057BDC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_80058018.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_8005819C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_8005846C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_800584E4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_80058594.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_80058610.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_8005876C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_800587F8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_8005887C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_800593B8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_800596C8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_80059788.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_80059848.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_8005990C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_80059A64.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_80059B70.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_80059DD0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_80059FB8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_8005A194.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_8005A41C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_8005A680.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_8005A71C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_8005A988.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_8005AF80.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_8005B21C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_8005B300.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_8005B580.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_8005B7EC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_8005BAA0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_8005BDF8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_8005BEB0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_8005BFB4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_8005C058.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_8005C0BC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_8005C438.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_8005C7A4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_8005C938.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_8005D22C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_8005D4D4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_8005D65C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_8005D728.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_edisplay/func_8005DB54.s") diff --git a/srcjp/engine/fox_effect.c b/srcjp/engine/fox_effect.c new file mode 100644 index 00000000..0bbf9fb7 --- /dev/null +++ b/srcjp/engine/fox_effect.c @@ -0,0 +1,345 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80073FE0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007403C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_800741A4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80074530.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_800745DC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80074664.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007471C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_800747A0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007481C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80074918.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80074924.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80074DD8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80074E98.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80075160.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_800751D8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80075254.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_800752F0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_800753A4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007542C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007553C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80075650.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80075804.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80075880.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007588C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007592C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80075980.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80075A24.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80075A88.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80075B00.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80075BF0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80075C5C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80075D18.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80075DFC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007626C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_800762DC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007634C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_800763B8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007642C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80076664.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80076690.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007702C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80077160.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80077258.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80077308.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80077398.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80077490.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_800774E8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80077514.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_800775B8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_800776A0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80077734.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80077800.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_800778F0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_800779AC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80077A80.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80077AF8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80077B94.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80077CD0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80077D70.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80077DE0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80077E94.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80077F20.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80077FC8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007805C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_800780E4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80078158.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80078234.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_800782F0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80078360.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_800783CC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80078410.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007841C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_800784F8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80078588.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80078698.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80078700.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007877C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_800788B4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80078A1C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80078A88.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80078B80.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80078BF4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80078C88.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80078D04.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80078D9C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80078E28.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80078EC0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80078F4C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80078FF0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80079154.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80079224.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_800792AC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_800793A8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80079428.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007949C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_800795FC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80079664.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80079780.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80079890.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_800799A0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80079A5C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80079B1C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80079C5C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80079CD0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80079D3C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80079DA8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80079E14.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80079E80.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80079EAC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80079ED8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80079F80.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80079FEC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007A068.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007A094.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007A2FC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007A4E8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007A648.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007A6EC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007A77C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007A7F8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007A884.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007A910.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007AC74.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007ADB4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007AFF8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007B038.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007B0D0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007B184.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007B1FC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007B36C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007B3E8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007B458.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007B6DC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007B958.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007BA54.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007BAF4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007BC08.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007BDEC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007BEBC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007BFAC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007C09C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007C1D8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007C34C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007C450.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007C6F8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007C980.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007CB24.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007CC28.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007D058.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007D078.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007D098.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007D100.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007D1AC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007D6CC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007D86C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007DAA4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007E37C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007E3FC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007E82C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007E8C4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007E98C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007E9FC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8007FD18.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80080460.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8008051C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8008058C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_8008092C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80080A10.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80080ACC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80080D48.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/func_80080F34.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_effect/D_800DD220.s") diff --git a/srcjp/engine/fox_enmy.c b/srcjp/engine/fox_enmy.c new file mode 100644 index 00000000..b6de922b --- /dev/null +++ b/srcjp/engine/fox_enmy.c @@ -0,0 +1,191 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_8005DCF0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_8005DD7C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_8005DDA4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_8005DF08.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_8005E078.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_8005E128.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_8005E158.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_8005E188.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_8005E1C8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_8005E208.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_8005E238.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_8005E278.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_8005E364.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_8005E450.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_8005E53C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_8005E628.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_8005E71C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_8005E810.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_8005E92C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_8005EA94.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_8005EC0C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_8005ECD0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_8005EF44.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_8005F32C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_8005F42C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_8005F944.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_8005FA1C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_8005FAE8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_8005FBA0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_8005FF8C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80060050.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80060300.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80060A7C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80060B28.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80060C2C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80060D20.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80060D2C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80060D48.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80060D64.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_800620A0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80062154.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80062240.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_800622B8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_8006239C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80062440.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_800624A8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80062EC4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80063028.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80063320.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80063620.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80063774.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80063854.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80063860.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_800639D4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80063B30.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80063C54.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80063C60.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80063C7C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80063CB8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80063CC4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80063FA4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_8006411C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80064288.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80064310.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80064648.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80064814.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_800648F0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_800649C0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80064D40.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80064DF4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_800653AC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_800653CC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_800653EC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_8006545C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_800656E8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80065A1C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80065A5C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80065DB4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80065EA4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_800661BC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_8006642C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_800664CC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_8006662C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_800666F8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_800667E4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80066880.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80066A90.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80066BC8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80066C5C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80066D04.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80066DA8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80066E40.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_80067158.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/func_800671B4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy/D_800DC3C0.s") diff --git a/srcjp/engine/fox_enmy2.c b/srcjp/engine/fox_enmy2.c new file mode 100644 index 00000000..92c22e8c --- /dev/null +++ b/srcjp/engine/fox_enmy2.c @@ -0,0 +1,125 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_80067590.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_800675E0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_800676E0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_8006774C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_80067758.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_80067764.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_8006781C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_80067878.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_80067984.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_800679E8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_80067AF8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_80067E74.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_80067E80.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_8006824C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_8006852C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_8006873C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_80068844.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_800688FC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_80068958.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_80068D5C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_80068DE8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_80069ED4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_8006A130.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_8006A14C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_8006B7F0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_8006B864.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_8006B904.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_8006B960.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_8006BA00.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_8006BA5C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_8006BC9C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_8006BD40.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_8006BDE4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_8006BE78.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_8006BEE0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_8006BF8C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_8006BFF4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_8006C1AC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_8006CBC8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_8006CC8C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_8006CE44.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_8006CF80.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_8006D948.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_8006DA8C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_8006DAE4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_8006EB60.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_8006EE88.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_8006F090.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_8006F1B0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_8006F218.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_8006F338.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_800719A0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_800719E8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_80071BE0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_80071CA8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_80071D34.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_80071D94.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_80073148.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_80073F20.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_80073F70.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/func_80073FBC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_enmy2/D_800DCA40.s") diff --git a/srcjp/engine/fox_fade.c b/srcjp/engine/fox_fade.c new file mode 100644 index 00000000..e7789be9 --- /dev/null +++ b/srcjp/engine/fox_fade.c @@ -0,0 +1,11 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_fade/func_80081110.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_fade/func_8008119C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_fade/func_80081228.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_fade/func_80081428.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_fade/D_800DD6E0.s") diff --git a/srcjp/engine/fox_game.c b/srcjp/engine/fox_game.c new file mode 100644 index 00000000..792dddd4 --- /dev/null +++ b/srcjp/engine/fox_game.c @@ -0,0 +1,23 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_game/func_8009E880.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_game/func_8009E950.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_game/func_8009EB3C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_game/func_8009EBE4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_game/func_8009EE38.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_game/func_8009EF14.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_game/func_8009EF80.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_game/func_8009F4AC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_game/func_8009F5AC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_game/func_8009F690.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_game/func_800A05C8.s") diff --git a/srcjp/engine/fox_hud.c b/srcjp/engine/fox_hud.c new file mode 100644 index 00000000..17e1bd33 --- /dev/null +++ b/srcjp/engine/fox_hud.c @@ -0,0 +1,259 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_800816D0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80081934.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80081C18.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80082144.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_800821A4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80082204.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008225C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_800822B4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008230C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80082364.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_800823B8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008240C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80082460.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_800824E0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008257C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80082630.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_800826E4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80082EB0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80083168.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_800831E4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80083404.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80083744.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_800839AC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80083A6C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80083B70.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008444C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_800846A4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80084A38.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008545C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_800854DC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_800855D4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80085630.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_800856FC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_800858E8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_800865B8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80086658.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_800866F8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80086798.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80086838.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_800868DC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80086A3C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80086ADC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80086B80.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80086C70.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80086DE0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80086FC4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80087188.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80087424.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80087B9C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80087CDC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80087F60.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_800880CC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_800881C0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008820C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_800884CC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80088650.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80088690.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80088904.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80088A00.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80088B9C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80088BD8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80088C1C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80089024.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_800892B4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_800894EC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80089618.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80089968.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80089AB0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80089ABC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80089B08.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80089EDC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008A000.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008A114.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008A174.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008A240.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008A414.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008A718.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008A8A8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008AB58.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008ABD4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008AC9C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008AD8C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008B1EC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008B440.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008B50C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008B544.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008B910.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008B938.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008C870.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008C890.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008C9A8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008CD9C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008CF14.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008D124.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008D6E8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008D850.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008D924.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008DBF0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008DDB0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008DFE4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008E178.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008E1BC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008E28C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008E420.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008E520.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008E788.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008EAB4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008EC1C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008ED18.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008EE24.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008F168.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008F218.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008F404.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008F6C4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008FC6C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8008FDE4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80090088.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80090234.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_800902FC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8009050C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80091878.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80091AE0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80091C44.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80092274.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_800922C4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80092390.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_8009245C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80092528.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_hud/func_80093998.s") diff --git a/srcjp/engine/fox_load.c b/srcjp/engine/fox_load.c new file mode 100644 index 00000000..f3617dd4 --- /dev/null +++ b/srcjp/engine/fox_load.c @@ -0,0 +1,11 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_load/func_800559D0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_load/func_80055A98.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_load/func_80055D64.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_load/func_800562E8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_load/D_800DBF90.s") diff --git a/srcjp/engine/fox_message.c b/srcjp/engine/fox_message.c new file mode 100644 index 00000000..6a5f90c6 --- /dev/null +++ b/srcjp/engine/fox_message.c @@ -0,0 +1,17 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_message/func_800BF980.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_message/func_800BF9E0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_message/func_800BFA2C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_message/func_800BFA78.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_message/func_800BFAAC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_message/func_800BFC38.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_message/func_800BFEA0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_message/func_800C007C.s") diff --git a/srcjp/engine/fox_pause.c b/srcjp/engine/fox_pause.c new file mode 100644 index 00000000..c093f15c --- /dev/null +++ b/srcjp/engine/fox_pause.c @@ -0,0 +1,5 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_pause/func_800A0C60.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_pause/func_800A0DC0.s") diff --git a/srcjp/engine/fox_play.c b/srcjp/engine/fox_play.c new file mode 100644 index 00000000..086c9a75 --- /dev/null +++ b/srcjp/engine/fox_play.c @@ -0,0 +1,204 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A0F10.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A0F70.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A0F84.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A0FAC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A1430.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A1670.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A1BF8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A1F04.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A1F34.s") + +void func_800A22F8(void) { +} + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A2300.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A257C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A27B0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A2814.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A291C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A2D50.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A2EA0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A2F84.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A300C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A3054.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A309C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A30CC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A30FC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A312C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A3574.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A366C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A36EC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A39D8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A3A54.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A3AA0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A3CB0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A427C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A43C4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A48AC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A495C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A503C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A52EC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A56CC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A57EC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A5864.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A5B8C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A77EC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A8298.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A82F0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A8320.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A895C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A8A00.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A8AAC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A9278.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A9638.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A9A28.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A9AA4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A9C64.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800A9DA8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800AA07C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800AA100.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800AA1DC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800AA7D8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800AAA10.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800AAD80.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800AAF40.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800AB260.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800AB48C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800ABC98.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800AC068.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800AC914.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800AD0AC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800AD180.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800ADF5C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800AF150.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800AF2E0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800AF594.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800AFC00.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800AFC20.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800B0030.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800B0338.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800B0A04.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800B10D0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800B1180.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800B1204.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800B1210.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800B12D4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800B14E8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800B171C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800B18E0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800B26E0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800B2D54.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800B2FE0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800B33E0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800B386C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800B3C20.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800B3F74.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800B41A8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800B4208.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800B4404.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800B49D4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800B5350.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800B5550.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800B56C8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/func_800B56F0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_play/D_800DE1C0.s") diff --git a/srcjp/engine/fox_radio.c b/srcjp/engine/fox_radio.c new file mode 100644 index 00000000..b2f52f2a --- /dev/null +++ b/srcjp/engine/fox_radio.c @@ -0,0 +1,15 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_radio/func_800B7770.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_radio/func_800B77CC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_radio/func_800B7818.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_radio/func_800B7AF8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_radio/func_800B8398.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_radio/func_800B85E0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_radio/func_800B9024.s") diff --git a/srcjp/engine/fox_rcp.c b/srcjp/engine/fox_rcp.c new file mode 100644 index 00000000..ded50299 --- /dev/null +++ b/srcjp/engine/fox_rcp.c @@ -0,0 +1,109 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B5DE0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B5E24.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B5F28.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B5F58.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B5F88.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B5FB8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B5FE8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B6018.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B6130.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B6160.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B6190.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B62A8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B62D8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B6308.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B6338.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B6368.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B6398.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B64B0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B64E0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B65F8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B6628.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B6740.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B6770.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B67A0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B68B8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B69D0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B6A00.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B6A30.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B6B48.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B6C60.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B6D78.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B6E90.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B6EC0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B6FD8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B70F0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B7120.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B7150.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B7180.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B71B0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B71E0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B72F8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B7410.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B7440.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B7470.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B74A0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B74D0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B7500.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B7530.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B7560.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B7590.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B75C0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B75F0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B7620.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_rcp/func_800B7650.s") diff --git a/srcjp/engine/fox_reset.c b/srcjp/engine/fox_reset.c new file mode 100644 index 00000000..c4a0f795 --- /dev/null +++ b/srcjp/engine/fox_reset.c @@ -0,0 +1,3 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_reset/func_800B94A0.s") diff --git a/srcjp/engine/fox_save.c b/srcjp/engine/fox_save.c new file mode 100644 index 00000000..ff701b74 --- /dev/null +++ b/srcjp/engine/fox_save.c @@ -0,0 +1,9 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_save/func_800C0100.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_save/func_800C01D4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_save/func_800C02E4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_save/D_800DF2F0.s") diff --git a/srcjp/engine/fox_std_lib.c b/srcjp/engine/fox_std_lib.c new file mode 100644 index 00000000..7c112124 --- /dev/null +++ b/srcjp/engine/fox_std_lib.c @@ -0,0 +1,91 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_800968A0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_800968F8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_8009694C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_80096D4C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_80097328.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_80097368.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_80097658.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_80097954.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_80097C18.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_80097C58.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_80098694.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_800986CC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_80098B7C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_80098C88.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_80098E3C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_80099074.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_80099270.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_800995C4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_80099918.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_80099C8C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_8009A00C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_8009A368.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_8009A61C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_8009A8E4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_8009AB9C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_8009AE64.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_8009B138.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_8009B400.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_8009B6D4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_8009B988.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_8009BC54.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_8009BF2C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_8009C210.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_8009C4C4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_8009C61C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_8009C6B8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_8009C704.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_8009CB5C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_8009CDF0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_8009D454.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_8009DD68.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_8009DF5C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_8009E148.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_8009E29C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_std_lib/func_8009E524.s") diff --git a/srcjp/engine/fox_tank.c b/srcjp/engine/fox_tank.c new file mode 100644 index 00000000..a166297e --- /dev/null +++ b/srcjp/engine/fox_tank.c @@ -0,0 +1,55 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_tank/func_80040100.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_tank/func_800402EC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_tank/func_80040764.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_tank/func_80040924.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_tank/func_80040990.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_tank/func_8004099C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_tank/func_80040FA4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_tank/func_8004104C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_tank/func_80041260.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_tank/func_80041340.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_tank/func_800416EC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_tank/func_80041FB4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_tank/func_800421CC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_tank/func_800424FC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_tank/func_80042D00.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_tank/func_80042F64.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_tank/func_800430E4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_tank/func_800431DC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_tank/func_800432A0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_tank/func_80043588.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_tank/func_80043CC4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_tank/func_80044388.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_tank/func_800445D8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_tank/func_80044BBC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_tank/func_80044D00.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_tank/func_80044E40.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_tank/func_80045078.s") diff --git a/srcjp/engine/fox_versus.c b/srcjp/engine/fox_versus.c new file mode 100644 index 00000000..129fe0e4 --- /dev/null +++ b/srcjp/engine/fox_versus.c @@ -0,0 +1,158 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800B9750.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800B987C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800B98C8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800B99CC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800B9B34.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800B9C38.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800B9E14.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800B9EE8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800B9FEC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BA04C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BA0A4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BA0FC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BA154.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BA1A0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BA1EC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BA238.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BA290.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BA2E8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BA340.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BA398.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BA4C4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BA710.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BA75C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BA7B4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BA884.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BAABC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BAB14.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BAB60.s") + +void func_800BAEFC(void) { +} + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BAF04.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BB138.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BB3A8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BB60C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BB9CC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BBD50.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BBE20.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BBE84.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BBFA8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BC08C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BC224.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BC644.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BC7F8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BCA54.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BD2F4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BD33C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BD584.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BD804.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BD86C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BD978.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BDA18.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BDAAC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BDBB4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BDD2C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BDDB8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BDF20.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BE124.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BE1E0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BE410.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BE680.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BE738.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BE748.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BE778.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BE7A8.s") + +void func_800BE804(void) { +} + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BE80C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BE8B8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BEFE8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BF020.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BF1FC.s") + +void func_800BF2DC(void) { +} + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BF2E4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BF390.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/func_800BF814.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/D_800DF130.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/D_800DF134.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/D_800DF13C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_versus/D_800DF144.s") diff --git a/srcjp/libc_sprintf.c b/srcjp/libc_sprintf.c new file mode 100644 index 00000000..fc6b414f --- /dev/null +++ b/srcjp/libc_sprintf.c @@ -0,0 +1,7 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/libc_sprintf/func_8001FAC0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/libc_sprintf/func_8001FAE4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/libc_sprintf/func_8001FB34.s") diff --git a/srcjp/overlays/ovl_ending/fox_end1.c b/srcjp/overlays/ovl_ending/fox_end1.c new file mode 100644 index 00000000..82d01d21 --- /dev/null +++ b/srcjp/overlays/ovl_ending/fox_end1.c @@ -0,0 +1,67 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end1/func_ending_8017E7A0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end1/func_ending_8017E924.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end1/func_ending_8017EAE0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end1/func_ending_8017EFBC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end1/func_ending_8017F2B0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end1/func_ending_8017F614.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end1/func_ending_8017F6DC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end1/func_ending_8017F8B4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end1/func_ending_8017F974.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end1/func_ending_8017FB74.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end1/func_ending_80180034.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end1/func_ending_80180388.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end1/func_ending_80180EE4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end1/func_ending_801812A4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end1/func_ending_801813A4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end1/func_ending_80181528.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end1/func_ending_801817F0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end1/func_ending_80181AA8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end1/func_ending_80181B7C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end1/func_ending_80181BEC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end1/func_ending_80181D44.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end1/func_ending_80181E68.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end1/func_ending_801823F4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end1/func_ending_80182658.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end1/func_ending_80182668.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end1/func_ending_801827AC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end1/func_ending_801828A4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end1/func_ending_80182958.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end1/func_ending_80182AE0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end1/func_ending_80182D50.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end1/func_ending_80182F30.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end1/func_ending_8018349C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end1/D_ending_8018D330.s") diff --git a/srcjp/overlays/ovl_ending/fox_end2.c b/srcjp/overlays/ovl_ending/fox_end2.c new file mode 100644 index 00000000..51163824 --- /dev/null +++ b/srcjp/overlays/ovl_ending/fox_end2.c @@ -0,0 +1,207 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/func_ending_801840A0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/func_ending_801843C8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/func_ending_80184404.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/func_ending_80184440.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/func_ending_80184510.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/func_ending_80184634.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/func_ending_801847B0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/func_ending_8018498C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D730.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D73C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D750.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D75C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D76C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D77C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D78C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D7A0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D7B0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D7C0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D7CC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D7DC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D7F8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D808.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D81C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D830.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D840.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D850.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D864.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D878.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D888.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D89C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D8B0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D8C0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D8CC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D8DC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D8EC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D8F8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D908.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D91C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D928.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D93C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D94C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D95C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D96C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D980.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D994.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D9A4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D9B0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D9C0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D9D4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D9E0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018D9F4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018DA08.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018DA20.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018DA30.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018DA44.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018DA54.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018DA6C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018DA78.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018DA8C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018DAA0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018DAB8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018DAC8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018DAD8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018DAE8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018DB00.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018DB14.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018DB28.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018DB38.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018DB44.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018DB54.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018DB68.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018DB7C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018DB8C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018DB98.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018DBAC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018DBC0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018DBD0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018DBD8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018DBEC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/D_ending_8018DC00.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/func_ending_80184B84.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/func_ending_80184E2C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/func_ending_80185330.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/func_ending_80185930.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/func_ending_80185F30.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/func_ending_80186420.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/func_ending_801867C4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/func_ending_80186DD8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/func_ending_801873EC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/func_ending_801877C0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/func_ending_801878F0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/func_ending_80187E68.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/func_ending_801883AC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/func_ending_8018840C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/func_ending_80188878.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/func_ending_80188888.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/func_ending_80188DD0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/func_ending_80188DF4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/func_ending_801892DC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/func_ending_80189408.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/func_ending_801894F4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/func_ending_80189664.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_ending/fox_end2/func_ending_8018984C.s") diff --git a/srcjp/overlays/ovl_i1/fox_co.c b/srcjp/overlays/ovl_i1/fox_co.c new file mode 100644 index 00000000..783dfab4 --- /dev/null +++ b/srcjp/overlays/ovl_i1/fox_co.c @@ -0,0 +1,129 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8017E7B0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8017E7BC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8017E824.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8017E8F0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8017E990.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8017EA20.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8017EAB8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8017EB58.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8017EC0C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8017EC70.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8017ECB8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8017ED08.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8017ED48.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8017F9D0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8017FA2C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8017FC98.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8017FEFC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8017FFD0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_801802D8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_801816B4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_801819B0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_80181CF4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_80181D88.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_80181DE4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_80181F60.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_80182150.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_80182334.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_801823DC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_80182698.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018280C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_80182D2C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_80182D7C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_80182E24.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_80182E78.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_80182ED0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_80182F04.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_80182FFC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_80183054.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_801830FC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_80183320.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018340C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018501C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_80185500.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_801859DC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_80185EC4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_80185F1C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_80185F8C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_80185FE8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018609C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_801860F4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_801861A8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_80186200.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_801862B4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018643C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_80186590.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_80186630.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_80186718.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_801867D0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_801868EC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018696C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_80186AF4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_801881E8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_801883D4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_co/D_i1_80192170.s") diff --git a/srcjp/overlays/ovl_i1/fox_i1.c b/srcjp/overlays/ovl_i1/fox_i1.c new file mode 100644 index 00000000..76e6764e --- /dev/null +++ b/srcjp/overlays/ovl_i1/fox_i1.c @@ -0,0 +1,3 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_i1/func_i1_8017E7A0.s") diff --git a/srcjp/overlays/ovl_i1/fox_tr.c b/srcjp/overlays/ovl_i1/fox_tr.c new file mode 100644 index 00000000..5d85461d --- /dev/null +++ b/srcjp/overlays/ovl_i1/fox_tr.c @@ -0,0 +1,7 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_tr/func_i1_8018FB60.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_tr/func_i1_8018FBE8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_tr/D_i1_801928C0.s") diff --git a/srcjp/overlays/ovl_i1/fox_tr360.c b/srcjp/overlays/ovl_i1/fox_tr360.c new file mode 100644 index 00000000..fc591988 --- /dev/null +++ b/srcjp/overlays/ovl_i1/fox_tr360.c @@ -0,0 +1,9 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_tr360/func_i1_8018FED0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_tr360/func_i1_80190050.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_tr360/func_i1_801902A8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_tr360/func_i1_80190720.s") diff --git a/srcjp/overlays/ovl_i1/fox_ve1.c b/srcjp/overlays/ovl_i1/fox_ve1.c new file mode 100644 index 00000000..a84e3a30 --- /dev/null +++ b/srcjp/overlays/ovl_i1/fox_ve1.c @@ -0,0 +1,61 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_80189360.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_8018954C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_801895C8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_80189630.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_801896AC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_80189718.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_8018977C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_80189788.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_80189D14.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_80189F20.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_80189F44.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_8018A09C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_8018A114.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_8018A120.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_8018A624.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_8018A64C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_8018A740.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_8018A7B0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_8018A83C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_8018AA64.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_8018AFD4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_8018B608.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_8018B674.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_8018F598.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_8018F69C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_8018F81C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_8018F86C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_8018F8D4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_8018FB40.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/D_i1_80192530.s") diff --git a/srcjp/overlays/ovl_i2/fox_i2.c b/srcjp/overlays/ovl_i2/fox_i2.c new file mode 100644 index 00000000..c1baa1b5 --- /dev/null +++ b/srcjp/overlays/ovl_i2/fox_i2.c @@ -0,0 +1,3 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_i2/func_i2_8017E7A0.s") diff --git a/srcjp/overlays/ovl_i2/fox_me.c b/srcjp/overlays/ovl_i2/fox_me.c new file mode 100644 index 00000000..07682483 --- /dev/null +++ b/srcjp/overlays/ovl_i2/fox_me.c @@ -0,0 +1,97 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8017E7B0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8017E7EC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8017E8D0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8017EA44.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8017EBDC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8017ED88.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8017EEE8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8017EF88.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8017F018.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8017F0B8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8017F278.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8017F308.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8017F428.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8017F4A8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8017F518.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8017F5C4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8017FA50.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8017FCC0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8017FE04.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8017FEAC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8017FF2C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8018010C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_801801AC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8018022C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_80180394.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_80180570.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_801808A4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_80180A0C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_801829FC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_80182D04.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_801839B4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_80183B2C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_80183C48.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_80183D10.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_80183D88.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_80183F30.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_80183FC4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_80184C00.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_80184C80.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_80184D00.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_80184D80.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_80184E00.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_80184EF8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_80185028.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8018511C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_80185298.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_80185FB0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_me/D_i2_8018C9C0.s") diff --git a/srcjp/overlays/ovl_i2/fox_sx.c b/srcjp/overlays/ovl_i2/fox_sx.c new file mode 100644 index 00000000..d4dac83e --- /dev/null +++ b/srcjp/overlays/ovl_i2/fox_sx.c @@ -0,0 +1,47 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_80186250.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_80186344.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_801863FC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_80186550.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_80186AA4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_80186C24.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_80186DE0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_8018705C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_80187144.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_80187164.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_801871A8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_80187200.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_80187244.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_8018729C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_80189D18.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_8018A430.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_8018A65C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_8018AA28.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_8018AB00.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_8018AC58.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_8018B6FC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_8018B950.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i2/fox_sx/D_i2_8018CC80.s") diff --git a/srcjp/overlays/ovl_i3/fox_a6.c b/srcjp/overlays/ovl_i3/fox_a6.c new file mode 100644 index 00000000..fc3a7e47 --- /dev/null +++ b/srcjp/overlays/ovl_i3/fox_a6.c @@ -0,0 +1,53 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_8017E7B0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_8017E864.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_8017E8FC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_8017E984.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_8017E9D4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_8017EBC4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_8018143C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_80181550.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_801816F0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_80182C48.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_80182F60.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_8018335C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_801837D8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_80184658.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_8018476C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_80184854.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_80184920.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_80184A90.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_80184BAC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_80184CE4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_80185200.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_80185D14.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_80185DC8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_80185EC4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_80186004.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_a6/D_i3_801B7BB0.s") diff --git a/srcjp/overlays/ovl_i3/fox_aq.c b/srcjp/overlays/ovl_i3/fox_aq.c new file mode 100644 index 00000000..eefaebc2 --- /dev/null +++ b/srcjp/overlays/ovl_i3/fox_aq.c @@ -0,0 +1,213 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A00C0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A0580.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A0608.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A06DC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A0780.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A0820.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A085C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A0970.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A09BC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A0AB8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A0C68.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A0F2C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A1078.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A1164.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A14A0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A1750.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A1B7C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A1F8C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A2C44.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A2CD4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A3330.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A3420.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A3508.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A3A5C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A3B3C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A3BAC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A3E48.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A40E4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A45BC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A482C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A491C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A4954.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A5210.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A53FC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A5640.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A566C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A5DD8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A6C94.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A6CF4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A7C34.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A7DF8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A8158.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A8220.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A8264.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A82A0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A8390.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801A85E4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801AB544.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801ABC74.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801AC01C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801AC074.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801AC12C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801AC2E4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801AC380.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801ACEB0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801AD200.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801AD434.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801AD5DC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801AD624.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801AE0EC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801AE290.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801AE984.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801AE9EC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801AECBC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801AED88.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801AEF10.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801AFEE8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B0014.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B0374.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B043C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B104C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B13A4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B1508.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B1780.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B1818.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B1944.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B201C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B2098.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B2364.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B24A4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B250C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B2A3C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B37D0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B3BBC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B3BD0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B3C40.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B4424.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B450C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B4658.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B47F4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B50A4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B5114.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B51BC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B52DC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B5398.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B54A4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B551C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B56A0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B5DCC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B5F00.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B5F0C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B5F18.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B5F24.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B5F30.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B5F3C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_aq/D_i3_801B8CE0.s") diff --git a/srcjp/overlays/ovl_i3/fox_i3.c b/srcjp/overlays/ovl_i3/fox_i3.c new file mode 100644 index 00000000..357f1d2f --- /dev/null +++ b/srcjp/overlays/ovl_i3/fox_i3.c @@ -0,0 +1,3 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_i3/func_i3_8017E7A0.s") diff --git a/srcjp/overlays/ovl_i3/fox_so.c b/srcjp/overlays/ovl_i3/fox_so.c new file mode 100644 index 00000000..0f4c3580 --- /dev/null +++ b/srcjp/overlays/ovl_i3/fox_so.c @@ -0,0 +1,105 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_80195A80.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_80195B48.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_80195BB0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_80195C84.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_80195D0C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801961C0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801962C8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_80196340.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_80196424.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_8019649C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_80196A3C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_80196C2C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_80196D34.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_80197070.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_80197178.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801971D4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_80197250.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801972CC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801973B0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_80197D80.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_80197F7C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_80198020.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_80198088.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_80198264.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_80198384.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_80198F68.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801990A4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_80199140.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_80199210.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_80199630.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_80199688.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_80199ED0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_80199F2C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_8019A360.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_8019A3BC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_8019A6FC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_8019A7A4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_8019AEE0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_8019B4AC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_8019BB50.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_8019BCCC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_8019C158.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_8019C190.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_8019C950.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_8019CDD4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_8019DB40.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_8019DE74.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_8019E450.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_8019E9E8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_8019EBC8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_8019FE80.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A0050.s") diff --git a/srcjp/overlays/ovl_i3/fox_zo.c b/srcjp/overlays/ovl_i3/fox_zo.c new file mode 100644 index 00000000..9bb8be3f --- /dev/null +++ b/srcjp/overlays/ovl_i3/fox_zo.c @@ -0,0 +1,177 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_801871D0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_801872A8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8018737C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8018741C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80187484.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_801876B0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8018774C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80187A10.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80187C80.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80187DCC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80187F8C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8018818C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_801881AC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80188294.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80188748.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80188828.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80188904.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80188DD0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80188E3C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80188E48.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80189034.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80189118.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80189280.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80189318.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80189978.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80189AB8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80189E9C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80189F08.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8018A0E8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8018A4C4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8018A530.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8018A8AC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8018AA5C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8018AB8C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8018ABF4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8018AD1C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8018AD8C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8018AEE0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8018AF4C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8018AF8C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8018B618.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8018BC60.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8018BD08.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8018F980.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8018FC80.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8018FE6C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80190150.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_801901C0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80190300.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_801903D0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80190454.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80190618.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_801906F4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_801908B0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80190920.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80190AC0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80190B64.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80190C50.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80190CAC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_801910A8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80191120.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80191194.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80191480.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80191764.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80191858.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80191F50.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80192474.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_801927CC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80192A60.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80192A94.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80192AD8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80192EFC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80193064.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_801930CC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80193450.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80193484.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_801936D8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80193AC0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80193E70.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_801940DC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_801942E4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_801943E4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_801945C8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8019464C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_801946B0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_801949F4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80195878.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i3/fox_zo/D_i3_801B8060.s") diff --git a/srcjp/overlays/ovl_i4/fox_bo.c b/srcjp/overlays/ovl_i4/fox_bo.c new file mode 100644 index 00000000..e2af943e --- /dev/null +++ b/srcjp/overlays/ovl_i4/fox_bo.c @@ -0,0 +1,91 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80182FB0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80183148.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_801833A8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80183E84.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80183F0C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80184080.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_8018422C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80184348.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_8018449C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_801845B8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80184638.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80184678.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80184714.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_801847A8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80184A18.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80184A9C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80184B88.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80184BF4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_801850B8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80185288.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80185628.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_8018593C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80185A9C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80185D18.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80185E48.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80185EE0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80185F70.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80186078.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80186198.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80186A5C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80186B6C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80187FB8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80188104.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80188178.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80188208.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80188274.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_801883A0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_8018851C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80188B04.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80188C8C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80188D1C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80188DCC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80188FD0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_801890F8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80189488.s") diff --git a/srcjp/overlays/ovl_i4/fox_fo.c b/srcjp/overlays/ovl_i4/fox_fo.c new file mode 100644 index 00000000..c06527ba --- /dev/null +++ b/srcjp/overlays/ovl_i4/fox_fo.c @@ -0,0 +1,29 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_fo/func_i4_8017E870.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_fo/func_i4_8017EB04.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_fo/func_i4_8017EBE0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_fo/func_i4_8017FB28.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_fo/func_i4_8017FCB0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_fo/func_i4_8017FD38.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_fo/func_i4_8018000C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_fo/func_i4_80180174.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_fo/func_i4_80180250.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_fo/func_i4_801802D8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_fo/func_i4_80180358.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_fo/func_i4_801804E8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_fo/func_i4_80182C78.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_fo/D_i4_80196610.s") diff --git a/srcjp/overlays/ovl_i4/fox_i4.c b/srcjp/overlays/ovl_i4/fox_i4.c new file mode 100644 index 00000000..cf3ae96e --- /dev/null +++ b/srcjp/overlays/ovl_i4/fox_i4.c @@ -0,0 +1,5 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_i4/func_i4_8017E7A0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_i4/D_i4_801965D0.s") diff --git a/srcjp/overlays/ovl_i4/fox_ka.c b/srcjp/overlays/ovl_i4/fox_ka.c new file mode 100644 index 00000000..dff7c340 --- /dev/null +++ b/srcjp/overlays/ovl_i4/fox_ka.c @@ -0,0 +1,61 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_80189A00.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_80189B28.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_80189BA4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_80189C88.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_80189D6C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_80189E28.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_80189EAC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_8018A040.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_8018A938.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_8018AD3C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_8018AEC4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_8018AF04.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_8018B110.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_8018B678.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_8018B840.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_8018B908.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_8018D7C4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_8018DB10.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_8018E04C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_8018E15C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_8018E240.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_8018E4AC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_8018F12C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_8018F414.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_8018F6D0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_8018F7D8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_8018FB74.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_8018FC38.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_8018FCE4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_ka/D_i4_80196C10.s") diff --git a/srcjp/overlays/ovl_i4/fox_sz.c b/srcjp/overlays/ovl_i4/fox_sz.c new file mode 100644 index 00000000..0f93357d --- /dev/null +++ b/srcjp/overlays/ovl_i4/fox_sz.c @@ -0,0 +1,55 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_80190800.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_80190A18.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_80190ADC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_80190B60.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_80190EBC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_80190FEC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_801910C4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_801911E8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_801912DC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_80191990.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_80191A80.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_80192380.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_8019245C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_80192524.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_80192650.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_80192778.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_80192958.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_80193468.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_80193600.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_80193750.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_80194C14.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_80195128.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_8019529C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_80195348.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_80195880.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_8019595C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i4/fox_sz/D_i4_80196FA0.s") diff --git a/srcjp/overlays/ovl_i5/fox_ground.c b/srcjp/overlays/ovl_i5/fox_ground.c new file mode 100644 index 00000000..b6427d6f --- /dev/null +++ b/srcjp/overlays/ovl_i5/fox_ground.c @@ -0,0 +1,27 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ground/func_i5_801ABCE0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ground/func_i5_801ABD64.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ground/func_i5_801ABDB8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ground/func_i5_801AC420.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ground/func_i5_801AC554.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ground/func_i5_801ACBBC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ground/func_i5_801AD2F0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ground/func_i5_801ADBB8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ground/func_i5_801ADDFC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ground/func_i5_801ADE50.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ground/func_i5_801AE130.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ground/func_i5_801AE550.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ground/D_i5_801B3100.s") diff --git a/srcjp/overlays/ovl_i5/fox_i5.c b/srcjp/overlays/ovl_i5/fox_i5.c new file mode 100644 index 00000000..950e55ad --- /dev/null +++ b/srcjp/overlays/ovl_i5/fox_i5.c @@ -0,0 +1,5 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_i5/func_i5_8017E7A0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_i5/D_i5_801B1CF0.s") diff --git a/srcjp/overlays/ovl_i5/fox_ma.c b/srcjp/overlays/ovl_i5/fox_ma.c new file mode 100644 index 00000000..abdc3f8f --- /dev/null +++ b/srcjp/overlays/ovl_i5/fox_ma.c @@ -0,0 +1,279 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_80190BC0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_80190CE0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_80190EC4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_80191030.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_80191238.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801913D4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_80191444.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801915A0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801919D4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_80191ADC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_80191B28.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_80191B74.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801921E0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019282C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_80192B5C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_80192E98.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801930FC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_80193798.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_80193864.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_80193970.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_80193A24.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_80194134.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801942F4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_80194878.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_80194920.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801949B0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_80194BC0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801956DC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801958F0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_80195D30.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_80195EC8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019613C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_80196438.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_80196F28.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_80197274.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_80197434.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801975E0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_80197D4C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_80197DD8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_80197DF8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_80197EB0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801980B0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_80198104.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_80198190.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_80198540.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019859C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_80199684.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_80199D50.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_80199DFC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019A0B0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019A390.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019A518.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019A5D8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019AA68.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019AEF8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019B148.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019B170.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019B48C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019B698.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019B93C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019B97C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019BC94.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019BD40.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019BDD4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019BE00.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019C408.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019C790.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019C7CC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019C8B8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019CAB4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019CDD4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019CE30.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019D04C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019D110.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019D138.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019D274.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019D2A8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019D2B4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019D3E4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019D418.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019D428.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019D824.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019D8C4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019D8EC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019DAA0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019DAAC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019DBD0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019DBDC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019DC68.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019DF5C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019E298.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019E5C0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019E7A8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019EB94.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019ED14.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019EF90.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019F07C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019F164.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A2F10.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A34BC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A3590.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A3728.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A3734.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A38AC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A39B4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A3A54.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A4148.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A4274.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A42C4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A438C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A4454.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A4864.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A4934.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A4A00.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A4DD8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A4F18.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A4FFC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A5078.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A55D0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A57DC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A5920.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A59A4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A5B10.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A5B8C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A5DB0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A5F14.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A620C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A6444.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A6510.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A658C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A675C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A6938.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A6A1C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A6C04.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A9BD0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801AA868.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801AAA2C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801AABF4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801AB018.s") diff --git a/srcjp/overlays/ovl_i5/fox_ti.c b/srcjp/overlays/ovl_i5/fox_ti.c new file mode 100644 index 00000000..264e9976 --- /dev/null +++ b/srcjp/overlays/ovl_i5/fox_ti.c @@ -0,0 +1,143 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_801801B0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_801801E0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80180228.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80180310.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_801803A0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80180414.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80180434.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80180474.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80180600.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80180838.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80180D78.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80180DFC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80180F48.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80181444.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018156C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018167C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_801816FC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_801817CC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80181D44.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80181DCC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018204C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018225C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80182278.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_801823CC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018243C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_801824F4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80182938.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_801829AC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80182BFC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80182C60.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80183114.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80183240.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_801833A8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_801833C4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80183600.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80183668.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_801839BC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80183B38.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80185568.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80185640.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018565C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_801857DC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80185844.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80185878.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80185888.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_801861A4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80186280.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_801862C8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80186368.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_801863C4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80186768.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80186B54.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80186CE4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80186F10.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_801872CC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80187640.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80187ABC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80187CA8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80188D88.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_801893B8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018ADD0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018B090.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018ED34.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018F548.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8019037C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/D_i5_801B1D60.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/D_i5_801B1D64.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/D_i5_801B1D88.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/D_i5_801B1DCC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/D_i5_801B1E1C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti/D_i5_801B1E6C.s") diff --git a/srcjp/overlays/ovl_i5/fox_ti_cs.c b/srcjp/overlays/ovl_i5/fox_ti_cs.c new file mode 100644 index 00000000..45d60cdb --- /dev/null +++ b/srcjp/overlays/ovl_i5/fox_ti_cs.c @@ -0,0 +1,11 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti_cs/func_i5_8017E7B0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti_cs/func_i5_8017E850.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti_cs/func_i5_8017E91C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti_cs/func_i5_8017F388.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i5/fox_ti_cs/func_i5_8017F54C.s") diff --git a/srcjp/overlays/ovl_i6/fox_andross.c b/srcjp/overlays/ovl_i6/fox_andross.c new file mode 100644 index 00000000..17ac0742 --- /dev/null +++ b/srcjp/overlays/ovl_i6/fox_andross.c @@ -0,0 +1,125 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8017E7B0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8017E900.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8017E920.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8017E980.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8017EB30.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8017EEE8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8017F380.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8017F6E4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8017F704.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8017F7C4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8017F8FC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8017FA4C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8017FB18.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8017FB90.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8017FCE8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8017FF54.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80180334.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_801804B4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_801805DC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80180658.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80180710.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_801809C4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80180C84.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80180DA0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80180E10.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018272C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80182B70.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80183088.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80183644.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80183914.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_801839E8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80183A54.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80183B88.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80183C0C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80183D04.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80183D88.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018424C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018438C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80184420.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80184564.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80184C74.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80184D48.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80184EA4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80188AA4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80189768.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80189B7C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018A148.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018A4F8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018A634.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018A7A4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018A7C4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018A824.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018A86C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018A88C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018A920.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018A9C8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018AC5C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018ADA0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018AF08.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018D100.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018D468.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_andross/D_i6_8019DE50.s") diff --git a/srcjp/overlays/ovl_i6/fox_i6.c b/srcjp/overlays/ovl_i6/fox_i6.c new file mode 100644 index 00000000..ca01ad1c --- /dev/null +++ b/srcjp/overlays/ovl_i6/fox_i6.c @@ -0,0 +1,5 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_i6/func_i6_8017E7A0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_i6/D_i6_8019DE40.s") diff --git a/srcjp/overlays/ovl_i6/fox_sy.c b/srcjp/overlays/ovl_i6/fox_sy.c new file mode 100644 index 00000000..8f959b0e --- /dev/null +++ b/srcjp/overlays/ovl_i6/fox_sy.c @@ -0,0 +1,105 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8018EDD0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8018EF04.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8018EF58.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8018EF64.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8018F1C0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8018F22C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8018F4E0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8018F4EC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8018F68C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8018FD64.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8018FF8C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_80190204.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_801906E8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_80191018.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_80191060.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_801916E8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_801917D4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_801918F4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_80191920.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_80191AE0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_80191B4C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_80191CBC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_80191DA4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_80192174.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_801921A0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_801927DC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_80192880.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8019299C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_80192E70.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_80192EC8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_80193448.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_80193B3C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_80194F00.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_801950C4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_801952C8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_80195578.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_80195E34.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_80196114.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_801971B4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_801977C4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_80197958.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_80197AB0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_80197CBC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_80197D74.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8019ACB0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8019AE04.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8019AE88.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8019BCD0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8019BEEC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8019BF68.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8019C0FC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8019C570.s") diff --git a/srcjp/overlays/ovl_i6/fox_turret.c b/srcjp/overlays/ovl_i6/fox_turret.c new file mode 100644 index 00000000..59eb3272 --- /dev/null +++ b/srcjp/overlays/ovl_i6/fox_turret.c @@ -0,0 +1,13 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_turret/func_i6_8019C810.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_turret/func_i6_8019CACC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_turret/func_i6_8019CB58.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_turret/func_i6_8019CD84.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_turret/func_i6_8019D270.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_turret/func_i6_8019D414.s") diff --git a/srcjp/overlays/ovl_i6/fox_ve2.c b/srcjp/overlays/ovl_i6/fox_ve2.c new file mode 100644 index 00000000..cb8a9ed2 --- /dev/null +++ b/srcjp/overlays/ovl_i6/fox_ve2.c @@ -0,0 +1,17 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_ve2/func_i6_8018D4D0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_ve2/func_i6_8018D50C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_ve2/func_i6_8018D548.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_ve2/func_i6_8018D5B4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_ve2/func_i6_8018D5D4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_ve2/func_i6_8018DC28.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_ve2/func_i6_8018DEBC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_i6/fox_ve2/func_i6_8018E04C.s") diff --git a/srcjp/overlays/ovl_menu/fox_i_menu.c b/srcjp/overlays/ovl_menu/fox_i_menu.c new file mode 100644 index 00000000..a277588e --- /dev/null +++ b/srcjp/overlays/ovl_menu/fox_i_menu.c @@ -0,0 +1,3 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_i_menu/func_menu_8017E7A0.s") diff --git a/srcjp/overlays/ovl_menu/fox_map.c b/srcjp/overlays/ovl_menu/fox_map.c new file mode 100644 index 00000000..90d3e44b --- /dev/null +++ b/srcjp/overlays/ovl_menu/fox_map.c @@ -0,0 +1,241 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_80195C80.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_80195D4C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_80196518.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801967E0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801969B4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_80196BF0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_80196CC4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_80196D30.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_80196DD0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_80196FB8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801970D0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801972FC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019755C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_80197974.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_80197B48.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_80197BA8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_80197D14.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801980E0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_80198558.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_80198914.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_80198D94.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_80198ED4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_80199000.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801995E4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801998A8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_80199954.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_80199AFC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_80199E6C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019A198.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019A720.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019A830.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019A988.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019ACE0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019B674.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019B930.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019BBA0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019BD18.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019BDC8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019BFEC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019C05C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019C26C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019C2A4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019C6A8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019CA50.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019CB14.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019CF58.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019D148.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019D484.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019D5CC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019D638.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019D750.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019D82C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019D86C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019D8F8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019D964.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019DBB4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019DCF4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019DD68.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019E07C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019E190.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019E500.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019E7C4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019E954.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019EA80.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019EBEC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019ED54.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019EEBC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019F00C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019F1EC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019F36C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019FA08.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_8019FC8C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A0210.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A041C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A04F4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A0718.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A0AE4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A0BE0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A0D5C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A10B0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801AE9A0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801AE9A8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801AE9B4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801AE9BC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801AE9C8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801AE9D4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801AE9E0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801AE9EC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801AE9F8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801AEA00.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801AEA0C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801AEA18.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801AEA24.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801AEA30.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801AEA38.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A11AC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A129C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A1494.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A16FC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A1A28.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A242C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A2534.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A2578.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A25F4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801AEA50.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801AEA54.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801AEA58.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A2C10.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A2F74.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A31B4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A3498.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A37C8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A3AA4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A3C38.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A4028.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A42E0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A43B4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A49B0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A4A84.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A4C84.s") diff --git a/srcjp/overlays/ovl_menu/fox_option.c b/srcjp/overlays/ovl_menu/fox_option.c new file mode 100644 index 00000000..cb4851ed --- /dev/null +++ b/srcjp/overlays/ovl_menu/fox_option.c @@ -0,0 +1,251 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80188EB0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80189454.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80189520.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801896D0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80189854.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80189928.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80189AD4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80189C64.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80189CE0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80189D98.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8018A100.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8018AC08.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8018AEA8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8018AFF0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8018B868.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8018B9F0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8018BC20.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8018BE64.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8018BF48.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8018C05C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8018C62C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8018CC54.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8018CCBC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8018CEEC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8018D5D8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8018D61C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8018DA14.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8018DC0C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8018E1CC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8018E274.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8018E314.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8018E33C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8018E3EC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8018E4D4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801AE5A0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801AE5A8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801AE5B4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801AE5BC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801AE5C8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801AE5D4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801AE5E0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801AE5EC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801AE5F8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801AE600.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801AE60C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801AE618.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801AE624.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801AE630.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801AE638.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801AE640.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801AE648.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801AE64C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801AE650.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8018E738.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8018E8A4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8018EC8C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8018EDB4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8018F0A8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8018F15C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8018F2EC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8018F4DC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8018F628.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8018F848.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8018F980.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8018FBA4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8018FCD8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80190504.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801905F0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80190630.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80190790.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80190808.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80190AF8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80190B8C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019120C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019130C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801913E4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019141C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80191488.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019150C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80191578.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801915FC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80191644.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80191840.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80191A40.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80191CB8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80191E18.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80191E94.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801920E8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019236C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80192534.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80192718.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801928E8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80192A14.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80192B10.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80192BDC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80192C04.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80192CFC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80192DF4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80192EE0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80192F80.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019312C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801931B8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80193270.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80193388.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019345C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80193754.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801938DC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801939A8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80193B60.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80193C00.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80193E1C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80193EFC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80194090.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80194454.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80194960.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80194E5C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80195024.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80195080.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801951B0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801952A0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019536C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801955C0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80195BA4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80195C00.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80195C6C.s") diff --git a/srcjp/overlays/ovl_menu/fox_title.c b/srcjp/overlays/ovl_menu/fox_title.c new file mode 100644 index 00000000..23338d81 --- /dev/null +++ b/srcjp/overlays/ovl_menu/fox_title.c @@ -0,0 +1,135 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_8017E860.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_8017E9D4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_8017EA70.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_8017EB58.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_8017ED44.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_8017ED88.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_8017EF30.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_8017F0B0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_8017F298.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_8017F484.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_8017FB70.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80180490.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80180770.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80180BD4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80181568.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_801815A8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_801818B4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80181C00.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80181E30.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80181F5C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_801822A8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_801822C8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80182834.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80183384.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80183430.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_801838B4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80183E00.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80183EA0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_8018400C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80184528.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80184780.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80184A7C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80185028.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_8018517C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_801852C8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80185470.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_801858EC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80185CE8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80186038.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_801866A8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_801868F0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_801869E8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80186AC8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80186BCC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80186C60.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80186FAC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_801870A0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_8018730C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_801874DC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80187750.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80187A38.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80187CE8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80187E30.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80187EC8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80188034.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_801881FC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_8018823C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80188368.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_801884B4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80188638.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_801886B8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80188844.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80188A0C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80188B30.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80188BDC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80188C94.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80188D5C.s") diff --git a/srcjp/overlays/ovl_unused/fox_unused.c b/srcjp/overlays/ovl_unused/fox_unused.c new file mode 100644 index 00000000..ebc7874e --- /dev/null +++ b/srcjp/overlays/ovl_unused/fox_unused.c @@ -0,0 +1,3 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/overlays/ovl_unused/fox_unused/func_unused_8017E7A0.s") diff --git a/srcjp/sys/sys_fault.c b/srcjp/sys/sys_fault.c new file mode 100644 index 00000000..96fd32d9 --- /dev/null +++ b/srcjp/sys/sys_fault.c @@ -0,0 +1,73 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_fault/func_80007590.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_fault/func_8000767C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_fault/func_800077D4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_fault/func_800077FC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_fault/func_800078DC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_fault/D_800C5250.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_fault/D_800C525C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_fault/D_800C5270.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_fault/D_800C5288.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_fault/D_800C52A0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_fault/D_800C52B8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_fault/D_800C52D0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_fault/D_800C52E4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_fault/D_800C52F8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_fault/D_800C5310.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_fault/D_800C5328.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_fault/D_800C5340.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_fault/D_800C5358.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_fault/D_800C536C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_fault/D_800C537C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_fault/D_800C5398.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_fault/D_800C53B4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_fault/D_800C53CC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_fault/D_800C53E8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_fault/D_800C5400.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_fault/D_800C5414.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_fault/D_800C5428.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_fault/D_800C5434.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_fault/D_800C5440.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_fault/func_800079B0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_fault/func_80007A38.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_fault/func_80007AC8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_fault/func_80007EA4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_fault/func_80007F10.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_fault/func_80008194.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_fault/func_800081C8.s") diff --git a/srcjp/sys/sys_joybus.c b/srcjp/sys/sys_joybus.c new file mode 100644 index 00000000..96567378 --- /dev/null +++ b/srcjp/sys/sys_joybus.c @@ -0,0 +1,15 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_joybus/func_80002850.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_joybus/func_8000292C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_joybus/func_800029B8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_joybus/func_80002B04.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_joybus/func_80002BF8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_joybus/func_80002C60.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_joybus/func_80002CC8.s") diff --git a/srcjp/sys/sys_lib.c b/srcjp/sys/sys_lib.c new file mode 100644 index 00000000..ee09530a --- /dev/null +++ b/srcjp/sys/sys_lib.c @@ -0,0 +1,17 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_lib/func_80002E90.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_lib/func_80002EB0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_lib/func_80002EF4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_lib/func_80002F98.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_lib/func_8000317C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_lib/func_800032C4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_lib/func_800033F0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_lib/func_800034F8.s") diff --git a/srcjp/sys/sys_lights.c b/srcjp/sys/sys_lights.c new file mode 100644 index 00000000..94b4761d --- /dev/null +++ b/srcjp/sys/sys_lights.c @@ -0,0 +1,7 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_lights/func_800035E0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_lights/func_8000373C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_lights/func_800038BC.s") diff --git a/srcjp/sys/sys_main.c b/srcjp/sys/sys_main.c new file mode 100644 index 00000000..91369a51 --- /dev/null +++ b/srcjp/sys/sys_main.c @@ -0,0 +1,33 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_main/func_80003A60.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_main/func_80003B58.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_main/func_80003C60.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_main/func_80003DD0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_main/func_80003EF0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_main/func_80003FFC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_main/func_800040E4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_main/func_80004154.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_main/func_80004570.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_main/func_80004724.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_main/func_800047A8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_main/func_80004834.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_main/func_800049E4.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_main/func_80004ACC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_main/func_80004D10.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_main/func_80004DB8.s") diff --git a/srcjp/sys/sys_math.c b/srcjp/sys/sys_math.c new file mode 100644 index 00000000..b7b78b05 --- /dev/null +++ b/srcjp/sys/sys_math.c @@ -0,0 +1,35 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_math/func_80004E30.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_math/func_80004E5C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_math/func_80004E8C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_math/func_80004EF0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_math/func_80005008.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_math/func_80005028.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_math/func_80005140.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_math/func_80005220.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_math/func_80005298.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_math/func_80005380.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_math/func_80005498.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_math/func_80005540.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_math/func_80005574.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_math/func_8000559C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_math/func_8000569C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_math/func_800057B0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_math/func_800057D8.s") diff --git a/srcjp/sys/sys_matrix.c b/srcjp/sys/sys_matrix.c new file mode 100644 index 00000000..ffefc98f --- /dev/null +++ b/srcjp/sys/sys_matrix.c @@ -0,0 +1,37 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_matrix/func_80005860.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_matrix/func_800058E8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_matrix/func_80005920.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_matrix/func_80005934.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_matrix/func_80005CE0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_matrix/func_80005E14.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_matrix/func_80005F24.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_matrix/func_80006070.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_matrix/func_800061C0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_matrix/func_8000630C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_matrix/func_800066E0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_matrix/func_800068FC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_matrix/func_80006B50.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_matrix/func_80006C00.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_matrix/func_80006C98.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_matrix/func_80006E5C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_matrix/func_8000701C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_matrix/func_80007098.s") diff --git a/srcjp/sys/sys_memory.c b/srcjp/sys/sys_memory.c new file mode 100644 index 00000000..2a216cbf --- /dev/null +++ b/srcjp/sys/sys_memory.c @@ -0,0 +1,5 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_memory/func_80007100.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_memory/func_80007118.s") diff --git a/srcjp/sys/sys_save.c b/srcjp/sys/sys_save.c new file mode 100644 index 00000000..30302b46 --- /dev/null +++ b/srcjp/sys/sys_save.c @@ -0,0 +1,11 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_save/func_80007310.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_save/func_8000734C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_save/func_800073CC.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_save/func_800074B0.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_save/D_800C5130.s") diff --git a/srcjp/sys/sys_timer.c b/srcjp/sys/sys_timer.c new file mode 100644 index 00000000..971f7ad1 --- /dev/null +++ b/srcjp/sys/sys_timer.c @@ -0,0 +1,13 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_timer/func_80007140.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_timer/func_800071B8.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_timer/func_80007248.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_timer/func_8000725C.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_timer/func_80007268.s") + +#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/sys/sys_timer/func_800072A8.s") diff --git a/yamls/jp/rev0/header.yaml b/yamls/jp/rev0/header.yaml index 5abb2ced..4067e70d 100644 --- a/yamls/jp/rev0/header.yaml +++ b/yamls/jp/rev0/header.yaml @@ -14,18 +14,8 @@ options: undefined_syms_auto_path: linker_scripts/jp/rev0/auto/undefined_syms_auto.ld symbol_addrs_path: - - linker_scripts/jp/rev0/symbol_addrs_migrate.txt - linker_scripts/jp/rev0/symbol_addrs.txt - - linker_scripts/jp/rev0/symbol_addrs_engine.txt - - linker_scripts/jp/rev0/symbol_addrs_libultra.txt - - linker_scripts/jp/rev0/symbol_addrs_nlib_funcs.txt - - linker_scripts/jp/rev0/symbol_addrs_nlib_vars.txt - - linker_scripts/jp/rev0/symbol_addrs_assets.txt - - linker_scripts/jp/rev0/symbol_addrs_mesg.txt - - linker_scripts/jp/rev0/symbol_addrs_audio.txt - - linker_scripts/jp/rev0/symbol_addrs_overlays.txt - - linker_scripts/jp/rev0/symbol_addrs_EBFBE0.txt - - linker_scripts/jp/rev0/ignored_addresses.txt + - linker_scripts/jp/rev0/symbol_addrs_fix.txt asm_path: asm/jp/rev0 src_path: srcjp diff --git a/yamls/jp/rev0/main.yaml b/yamls/jp/rev0/main.yaml index 9bbb4b9f..42ba3be6 100644 --- a/yamls/jp/rev0/main.yaml +++ b/yamls/jp/rev0/main.yaml @@ -86,6 +86,8 @@ - [0x258F0, asm] - [0x25DE0, asm] - [0x26190, asm] + - [0x261D0, asm] # exceptasm + - [0x26AC0, asm] - [0x26D30, asm] - [0x26EB0, asm] - [0x27000, asm] @@ -279,24 +281,24 @@ - { type: bss, vram: 0x80161560, name: libultra } # Game engine bss - - { type: .bss, vram: 0x801650A0, name: engine/fox_360 } - - { type: .bss, vram: 0x801650F0, name: engine/fox_beam } - - { type: .bss, vram: 0x80165100, name: engine/fox_bg } - - { type: .bss, vram: 0x80166B40, name: engine/fox_boss } - - { type: .bss, vram: 0x80166B50, name: engine/fox_display } - - { type: .bss, vram: 0x80166D70, name: engine/fox_edisplay } - - { type: .bss, vram: 0x80166E10, name: engine/fox_enmy } - - { type: .bss, vram: 0x80166E30, name: engine/fox_enmy2 } - - { type: .bss, vram: 0x80166E40, name: engine/fox_hud } - - { type: .bss, vram: 0x801670F0, name: engine/fox_col1 } - - { type: .bss, vram: 0x80167140, name: engine/fox_std_lib } - - { type: .bss, vram: 0x801671B0, name: engine/fox_game } - - { type: .bss, vram: 0x801671F0, name: engine/fox_play } - - { type: .bss, vram: 0x80167210, name: engine/fox_context} - - { type: .bss, vram: 0x8017DD20, name: engine/fox_rcp } - - { type: .bss, vram: 0x8017DEC0, name: engine/fox_radio } - - { type: .bss, vram: 0x8017DEF0, name: engine/fox_versus } - - { type: .bss, vram: 0x8017E010, name: engine/fox_save } + - { type: bss, vram: 0x801650A0, name: engine/fox_360 } + - { type: bss, vram: 0x801650F0, name: engine/fox_beam } + - { type: bss, vram: 0x80165100, name: engine/fox_bg } + - { type: bss, vram: 0x80166B40, name: engine/fox_boss } + - { type: bss, vram: 0x80166B50, name: engine/fox_display } + - { type: bss, vram: 0x80166D70, name: engine/fox_edisplay } + - { type: bss, vram: 0x80166E10, name: engine/fox_enmy } + - { type: bss, vram: 0x80166E30, name: engine/fox_enmy2 } + - { type: bss, vram: 0x80166E40, name: engine/fox_hud } + - { type: bss, vram: 0x801670F0, name: engine/fox_col1 } + - { type: bss, vram: 0x80167140, name: engine/fox_std_lib } + - { type: bss, vram: 0x801671B0, name: engine/fox_game } + - { type: bss, vram: 0x801671F0, name: engine/fox_play } + - { type: bss, vram: 0x80167210, name: engine/fox_context} + - { type: bss, vram: 0x8017DD20, name: engine/fox_rcp } + - { type: bss, vram: 0x8017DEC0, name: engine/fox_radio } + - { type: bss, vram: 0x8017DEF0, name: engine/fox_versus } + - { type: bss, vram: 0x8017E010, name: engine/fox_save } - name: dma_table type: code @@ -306,4 +308,10 @@ subsegments: - [0xE93C0, data, dmatable] - + - name: buffers + exclusive_ram_id: buffer + type: code + vram: 0x80281000 + bss_size: 0x17F000 + subsegments: + - { type: .bss, vram: 0x80281000, name: buffers } diff --git a/yamls/jp/rev0/overlays.yaml b/yamls/jp/rev0/overlays.yaml index 8f59011c..fa0e6732 100644 --- a/yamls/jp/rev0/overlays.yaml +++ b/yamls/jp/rev0/overlays.yaml @@ -94,7 +94,7 @@ - [0xE18DD0, c, fox_sz] - [0xE1E2A0, data, fox_i4] - [0xE1E2B0, data, fox_fo] - - [0xE1E390, data, fox_bo] + - [0xE1E350, data, fox_bo] - [0xE1E5C0, data, fox_ka] - [0xE1E980, data, fox_sz] - [0xE1EBA0, .rodata, fox_i4] diff --git a/yamls/us/rev1/main.yaml b/yamls/us/rev1/main.yaml index bd7b919c..3e497baf 100644 --- a/yamls/us/rev1/main.yaml +++ b/yamls/us/rev1/main.yaml @@ -407,3 +407,11 @@ follows_vram: main subsegments: - [0xDE480, .data, dmatable] + + - name: buffers + exclusive_ram_id: buffer + type: code + vram: 0x80281000 + bss_size: 0x17F000 + subsegments: + - { type: .bss, vram: 0x80281000, name: buffers } diff --git a/yamls/us/rev1/overlays.yaml b/yamls/us/rev1/overlays.yaml index c4947cd6..08c83365 100644 --- a/yamls/us/rev1/overlays.yaml +++ b/yamls/us/rev1/overlays.yaml @@ -225,13 +225,4 @@ - [0xEFFA50, .data, fox_unused] - { type: .bss, vram: 0x801875C0, name: fox_unused } - - name: buffers - exclusive_ram_id: buffer - type: code - start: 0xEFFAE0 - vram: 0x80281000 - bss_size: 0x17F000 - subsegments: - - { type: .bss, vram: 0x80281000, name: buffers } - - - [0xEFFAE0] \ No newline at end of file + - [0xEFFAE0] From ea1349aabefb362384f8a0370524da134235ee68 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Fri, 17 May 2024 11:09:49 -0300 Subject: [PATCH 104/151] fox_so styling --- src/overlays/ovl_i3/fox_so.c | 408 +++++++++++++++++++++++++++++++++-- 1 file changed, 391 insertions(+), 17 deletions(-) diff --git a/src/overlays/ovl_i3/fox_so.c b/src/overlays/ovl_i3/fox_so.c index 2c28819b..97e08d68 100644 --- a/src/overlays/ovl_i3/fox_so.c +++ b/src/overlays/ovl_i3/fox_so.c @@ -182,9 +182,11 @@ void Solar_8019E7F0(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { effect->obj.pos.y = yPos; effect->obj.pos.z = zPos; effect->obj.rot.z = 180.0f; + if (Rand_ZeroOne() < 0.5f) { effect->obj.rot.y = 180.0f; } + effect->unk_44 = 112; effect->scale2 = scale2; effect->vel.y = 5.0f; @@ -250,11 +252,13 @@ void Solar_8019EA7C(Actor* actor) { actor->fwork[0] = 14.0f; } } + if ((actor->unk_046 == 0) || (actor->unk_046 == 1)) { actor->unk_046 = 3; Object_SetSfxSourceToPos(actor->sfxSource, &actor->obj.pos); AUDIO_PLAY_SFX(NA_SE_OB_MAGMA_WAVE, actor->sfxSource, 0); } + if (Play_CheckDynaFloorCollision(&sp34, &sp30, actor->obj.pos.x, -100.0f, actor->obj.pos.z)) { D_ctx_801782EC[sp30] = actor->fwork[0]; D_ctx_801782EC[sp30 + 1] = actor->fwork[0] * 0.95f; @@ -263,6 +267,7 @@ void Solar_8019EA7C(Actor* actor) { D_ctx_801782EC[sp30 - 2] = actor->fwork[0] * 0.9f; D_ctx_801782EC[sp30 + 3] = actor->fwork[0] * 0.8f; D_ctx_801782EC[sp30 - 3] = actor->fwork[0] * 0.8f; + if (actor->state != 2) { D_ctx_801782EC[sp30 + 4] = actor->fwork[0] * 0.65f; D_ctx_801782EC[sp30 - 4] = actor->fwork[0] * 0.65f; @@ -293,6 +298,7 @@ void Solar_8019EA7C(Actor* actor) { D_ctx_801782EC[sp30 - 12] = actor->fwork[0] * 0.1f; } } + switch (actor->dmgType) { case 3: Solar_801A8DB8(&actor->obj.pos, NA_SE_OB_MAGMA_WAVE, actor->vel.z); @@ -357,7 +363,9 @@ void Solar_8019F0B0(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yV actor->vel.z = zVel; actor->state = 2; actor->timer_0C2 = 8; + Object_SetInfo(&actor->info, actor->obj.id); + if (gBossActive) { actor->info.bonus = 0; } @@ -411,6 +419,7 @@ void Solar_8019F20C(Actor* actor) { actor->rot_0F4.x += 3.3f; actor->rot_0F4.y += 2.0f; } + switch (actor->state) { case 0: actor->fwork[0] = actor->obj.pos.y * 0.05f; @@ -428,6 +437,7 @@ void Solar_8019F20C(Actor* actor) { actor->timer_0C2 = 5; AUDIO_PLAY_SFX(NA_SE_OB_SOROCK_APPEAR, actor->sfxSource, 0); break; + case 2: actor->gravity = 0.5f; if (Play_CheckDynaFloorCollision(&sp8C, &sp88, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z)) { @@ -438,11 +448,13 @@ void Solar_8019F20C(Actor* actor) { RAND_FLOAT(10.0f) + 10.0f, 0.0f, actor->scale * 5.0f, 1); } } + if (actor->timer_0BC == 0) { actor->timer_0BC = 5; Solar_8019E9F4(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, actor->scale * 6.5f, 2); } + if ((actor->dmgType != DMG_NONE) || ((actor->obj.id == OBJ_ACTOR_277) && (actor->vel.y < 0.0f))) { func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, actor->scale * 4.0f); Object_Kill(&actor->obj, actor->sfxSource); @@ -461,7 +473,9 @@ void Solar_8019F20C(Actor* actor) { actor->itemDrop = DROP_SILVER_STAR; } } + Actor_Despawn(actor); + for (i = 0; i < 3; i++) { func_effect_800794CC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 0.3f); } @@ -473,8 +487,10 @@ void Solar_8019F20C(Actor* actor) { } break; } + actor->obj.rot.y = RAD_TO_DEG(-gPlayer[0].camYaw); actor->obj.rot.x = RAD_TO_DEG(gPlayer[0].camPitch); + if (((gGameFrameCount % 2) == 0)) { actor->animFrame++; if (actor->animFrame >= 3) { @@ -489,10 +505,12 @@ void Solar_8019F7AC(Actor* actor) { Matrix_RotateY(gGfxMatrix, actor->rot_0F4.y * M_DTOR, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, actor->rot_0F4.x * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); + switch (actor->obj.id) { case OBJ_ACTOR_275: gSPDisplayList(gMasterDisp++, D_SO_6017370); break; + case OBJ_ACTOR_276: if (((gGameFrameCount % 2) == 0)) { RCP_SetupDL(&gMasterDisp, 0x29); @@ -500,6 +518,7 @@ void Solar_8019F7AC(Actor* actor) { } gSPDisplayList(gMasterDisp++, D_SO_6017090); break; + case OBJ_ACTOR_277: gSPDisplayList(gMasterDisp++, D_SO_6016CF0); break; @@ -524,10 +543,12 @@ void Solar_8019F99C(Actor* actor, Effect* effect, f32 scale1) { effect->scale1 = scale1; effect->unk_60.y = actor->obj.rot.y; effect->obj.rot.z = RAND_FLOAT(360.0f); + effect->unk_44 = 255 - (actor->counter_04E * 8); if (effect->unk_44 < 0) { effect->unk_44 = 0; } + effect->scale2 = 20.0f - (actor->counter_04E * 0.5f); effect->unk_48 = 1; Object_SetInfo(&effect->info, effect->obj.id); @@ -552,25 +573,33 @@ void Solar_8019FAA4(Boss* bossSO, Effect* effect, f32 xPos, f32 yPos, f32 zPos, if (gBosses[0].fwork[SO_FWK_31] > 0.0f) { if (gBosses[0].swork[SO_SWK_0] != 7) { Matrix_RotateY(gCalcMatrix, gBosses[0].obj.rot.y * M_DTOR, MTXF_NEW); + sp44.y = 0.0f; sp44.z = 0.0f; sp44.x = gBosses[0].fwork[SO_FWK_31] * 5.0f; + Matrix_MultVec3f(gCalcMatrix, &sp44, &sp38); + effect->vel.x = sp38.x * hVelMod; effect->vel.z = gPlayer[0].vel.z + (sp38.z * hVelMod); } else { Matrix_RotateZ(gCalcMatrix, bossSO->obj.rot.z * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, gBosses[0].obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, gBosses[0].rot_078.y * M_DTOR, MTXF_APPLY); + sp44.x = effect->obj.pos.x - bossSO->obj.pos.x; sp44.y = effect->obj.pos.y - bossSO->obj.pos.y; sp44.z = effect->obj.pos.z - bossSO->obj.pos.z; + Matrix_MultVec3f(gCalcMatrix, &sp44, &sp38); + effect->obj.pos.x = bossSO->obj.pos.x + sp38.x; effect->obj.pos.y = bossSO->obj.pos.y + sp38.y; effect->obj.pos.z = bossSO->obj.pos.z + sp38.z; + effect->vel.z = gPlayer[0].vel.z; effect->vel.y = yVel; + if (gBosses[0].state >= 2) { effect->scale2 = 15.0f; } @@ -596,9 +625,11 @@ void Solar_8019FDE0(Boss* bossSO, Effect* effect, f32 xPos, f32 yPos, f32 zPos, Effect_Initialize(effect); effect->obj.status = OBJ_ACTIVE; effect->obj.id = OBJ_EFFECT_392; + effect->obj.pos.x = xPos; effect->obj.pos.y = yPos; effect->obj.pos.z = zPos; + if (state != 0) { effect->vel.z = gPlayer[0].vel.z + 80.0f; } else { @@ -660,6 +691,7 @@ void Solar_801A003C(Actor* actor) { actor->counter_04E++; } break; + case 1: if (actor->timer_0BE == 0) { actor->state = 0; @@ -686,24 +718,32 @@ void Solar_801A0120(Effect* effect) { Matrix_Translate(gCalcMatrix, effect->vel.x, effect->vel.y, effect->vel.z, MTXF_NEW); Matrix_RotateY(gCalcMatrix, effect->unk_60.y * M_DTOR, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, effect->unk_60.x * M_DTOR, MTXF_APPLY); + sp3C.x = 0.0f; sp3C.y = 0.0f; sp3C.z = -effect->scale1; + Matrix_MultVec3f(gCalcMatrix, &sp3C, &effect->obj.pos); + effect->unk_60.x += 5.0f; - if (((gGameFrameCount % 2) == 0)) { + + if ((gGameFrameCount % 2) == 0) { effect->unk_4C++; if (effect->unk_4C > 2) { effect->unk_4C = 0; } } + if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) { func_effect_8007A774(&gPlayer[0], effect, effect->scale2 * 12.0f); } + if (effect->unk_60.x > 190.0f) { Object_Kill(&effect->obj, effect->sfxSource); } + sp48 = effect->unk_48; + if (Play_CheckDynaFloorCollision(&sp5C, &sp4C, effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z)) { effect->unk_48 = 1; if (effect->scale2 == 20.0f) { @@ -712,21 +752,25 @@ void Solar_801A0120(Effect* effect) { } else { effect->unk_48 = 0; } + if (sp48 != effect->unk_48) { if (effect->unk_48 != 0) { sp54 = 50.0f; } else { sp54 = -50.0f; } + if ((effect->index % 2) != 0) { sp58 = 100.0f; } else { sp58 = -100.0f; } + Solar_8019E9F4(effect->obj.pos.x + sp58, effect->obj.pos.y + sp54, effect->obj.pos.z, sp58 * 0.25f, RAND_FLOAT(10.0f) + 20.0f, sp58 * 0.25f, 20.0f, 1); } break; + case 1: if (effect->timer_50 == 0) { effect->timer_50 = 4; @@ -736,12 +780,14 @@ void Solar_801A0120(Effect* effect) { Object_Kill(&effect->obj, effect->sfxSource); } } + if (effect->scale2 > 10.0f) { effect->vel.y -= 2.5f; } else if (effect->scale2 > 4.0f) { effect->vel.y -= 1.0f; } break; + case 2: if (effect->timer_50 == 0) { Object_Kill(&effect->obj, effect->sfxSource); @@ -750,6 +796,7 @@ void Solar_801A0120(Effect* effect) { effect->obj.rot.z += 3.0f; effect->vel.y -= 0.3f; break; + case 3: Math_SmoothStepToF(&effect->obj.rot.z, -190.0f, 1.0f, 10.0f, 0.0f); effect->vel.y -= 0.3f; @@ -757,6 +804,7 @@ void Solar_801A0120(Effect* effect) { Object_Kill(&effect->obj, effect->sfxSource); } break; + case 4: if (gBosses[0].swork[SO_SWK_0] != 7) { Math_SmoothStepToF(&effect->vel.y, -40.0f, 1.0f, 1.0f, 1.0f); @@ -764,17 +812,22 @@ void Solar_801A0120(Effect* effect) { effect->vel.z = gPlayer[0].vel.z; Math_SmoothStepToF(&effect->vel.y, -65.0f, 2.0f, 1.0f, 0.5f); } + if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) { func_effect_8007A774(&gPlayer[0], effect, effect->scale2 * 12.0f); } + if (effect->obj.pos.y < -20.0f) { Object_Kill(&effect->obj, effect->sfxSource); } + effect->obj.rot.z += 6.0f; if (effect->obj.rot.z >= 360.0f) { effect->obj.rot.z = 0.0f; } + sp48 = effect->unk_48; + if (Play_CheckDynaFloorCollision(&sp5C, &sp4C, effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z)) { effect->unk_48 = 1; if (effect->scale2 == 20.0f) { @@ -783,6 +836,7 @@ void Solar_801A0120(Effect* effect) { } else { effect->unk_48 = 0; } + if ((sp48 != effect->unk_48) && (effect->unk_48 != 0)) { if ((effect->index % 2) != 0) { sp58 = 100.0f; @@ -793,18 +847,22 @@ void Solar_801A0120(Effect* effect) { RAND_FLOAT(10.0f) + 20.0f, sp58 * 0.25f, 20.0f, 1); } break; + case 5: effect->unk_4C++; if (effect->unk_4C > 2) { effect->unk_4C = 0; } + if (effect->unk_60.x < 7.5f) { effect->unk_60.x += 0.25f; } effect->unk_60.z += 10.0f; + effect->vel.x = SIN_DEG(effect->unk_60.z) * (effect->unk_60.x * 10.0f); effect->vel.y = COS_DEG(effect->unk_60.z) * (effect->unk_60.x * 10.0f); effect->vel.z = gPlayer[0].vel.z + 15.0f; + if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) { func_effect_8007A774(&gPlayer[0], effect, effect->scale2 * 18.0f); if ((effect->unk_4C == 0) && ((effect->scale2 >= 9.8f) || (effect->scale2 <= 4.4f))) { @@ -817,6 +875,7 @@ void Solar_801A0120(Effect* effect) { } } break; + case 6: sp50 = -1.0f; /* fallthrough */ @@ -825,10 +884,13 @@ void Solar_801A0120(Effect* effect) { if (effect->unk_4C > 2) { effect->unk_4C = 0; } + effect->unk_60.z += 20.0f; + effect->vel.x = SIN_DEG(effect->unk_60.z) * sp50 * 50.0f; effect->vel.y = COS_DEG(effect->unk_60.z) * sp50 * 50.0f; effect->vel.z = gPlayer[0].vel.z + 80.0f; + if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) { func_effect_8007A774(&gPlayer[0], effect, effect->scale2 * 18.0f); if ((effect->unk_4C == 0) && ((effect->scale2 >= 9.8f) || (effect->scale2 <= 4.4f))) { @@ -922,13 +984,17 @@ void Solar_801A0DF8(f32 xPos, f32 zPos, f32 yRot, s32 index, f32 yPos) { break; } Actor_Initialize(&gActors[sp2C]); + gActors[sp2C].obj.status = OBJ_ACTIVE; gActors[sp2C].obj.id = OBJ_ACTOR_279; + Object_SetInfo(&gActors[sp2C].info, gActors[sp2C].obj.id); + gActors[sp2C].state = 0; gActors[sp2C].obj.pos.x = xPos; gActors[sp2C].obj.pos.z = zPos; gActors[sp2C].obj.rot.y = yRot; + if (index != 4) { gActors[sp2C].obj.pos.y = -80.0f * yPos; } else { @@ -971,6 +1037,7 @@ void Solar_LevelStart(Player* player) { if (D_ctx_80177A10[1] != 0) { D_ctx_80177A10[1]--; } + switch (player->csState) { case 0: gCsFrameCount = 0; @@ -997,14 +1064,17 @@ void Solar_LevelStart(Player* player) { Solar_801A0DF8(-750.0f, -2600.0f, 300.0f, 2, 1.0f); AUDIO_PLAY_SFX(NA_SE_OB_MAGMA_BUBBLE, player->sfxSource, 0); break; + case 1: gPathTexScroll += 30.0f; + if (gCsFrameCount == 140) { Solar_801A0DF8(-400.0f, -2000.0f, 45.0f, 3, 1.0f); } if (gCsFrameCount == 280) { Solar_801A0DF8(-1730.0f, -2300.0f, 250.0f, 1, 1.0f); } + if (gCsFrameCount == 100) { Object_Kill(&gActors[4].obj, gActors[4].sfxSource); } @@ -1014,9 +1084,11 @@ void Solar_LevelStart(Player* player) { if (gCsFrameCount == 380) { Object_Kill(&gActors[6].obj, gActors[6].sfxSource); } + if (gCsFrameCount < 3) { gFillScreenAlpha = 255; } + if (gCsFrameCount == 370) { gFillScreenAlphaTarget = 255; gFillScreenRed = 255; @@ -1024,16 +1096,19 @@ void Solar_LevelStart(Player* player) { gFillScreenBlue = 255; gFillScreenAlphaStep = 8; } - if (((gGameFrameCount % 8) == 0)) { + + if ((gGameFrameCount % 8) == 0) { Solar_8019E8B8(RAND_FLOAT_CENTERED(6000.0f), RAND_FLOAT_CENTERED(5.0f) - 90.0f, RAND_FLOAT(2000.0f) - 6000.0f + gPathProgress, RAND_FLOAT(20.0f) + 20.0f); } + if (gCsFrameCount == 380) { for (i = 0; i < ARRAY_COUNT(gEffects); i++) { Object_Kill(&gEffects[i].obj, gEffects[i].sfxSource); } Solar_801A0DF8(400.0f, -2800.0f, 340.0f, 1, 1.0f); } + if (gCsFrameCount == 410) { player->csState++; player->cam.eye.x = 200.0f; @@ -1050,23 +1125,32 @@ void Solar_LevelStart(Player* player) { player->pos.y = 1200.0f; player->pos.z = -2500.0f; + Solar_801A0FD4(&gActors[0], 0); Solar_801A0FD4(&gActors[1], 1); Solar_801A0FD4(&gActors[2], 2); + gCsCamAtZ = -3000.0f; gCsCamEyeZ = -3400.0f; + Audio_KillSfxBySourceAndId(player->sfxSource, NA_SE_OB_MAGMA_BUBBLE); + AUDIO_PLAY_BGM(NA_BGM_SO_START_DEMO); + func_display_80057814(player); Audio_StartPlayerNoise(gPlayerNum); + D_ctx_80177A48[0] = 0.01f; } break; + case 2: gPathTexScroll += 60.0f; gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 8; + Math_SmoothStepToF(D_ctx_80177A48, 0.02f, 1.0f, 0.0000003f, 0.0f); + if (gCsFrameCount == 525) { Radio_PlayMessage(gMsg_ID_10010, RCID_FOX); } @@ -1074,6 +1158,7 @@ void Solar_LevelStart(Player* player) { Object_Kill(&gActors[5].obj, gActors[5].sfxSource); Solar_801A0DF8(30.0f, -1500.0f, 160.0f, 3, 2.0f); } + if (player->cam.eye.z <= -2465.0f) { player->csState++; gCsCamEyeY = player->pos.y + 180.0f; @@ -1083,12 +1168,15 @@ void Solar_LevelStart(Player* player) { D_ctx_80177A48[0] = 0.06f; } break; + case 3: gPathTexScroll += 60.0f; - if (((gGameFrameCount % 4) == 0)) { + + if ((gGameFrameCount % 4) == 0) { Solar_8019E8B8(RAND_FLOAT_CENTERED(6000.0f), -400.0f - ((player->cam.eye.y - 1380.0f) * 0.3f), RAND_FLOAT_CENTERED(2000.0f) + 500.0f + gPathProgress, RAND_FLOAT(20.0f) + 20.0f); } + if (gCsFrameCount == 615) { Play_PlaySfxFirstPlayer(player->sfxSource, NA_SE_ARWING_BOOST); gActors[0].fwork[29] = gActors[1].fwork[29] = gActors[2].fwork[29] = 5.0f; @@ -1101,21 +1189,27 @@ void Solar_LevelStart(Player* player) { player->unk_194 = 5.0f; } break; + case 4: gCsCamEyeX = player->pos.x; gCsCamEyeY = player->pos.y; gCsCamEyeZ = player->trueZpos + 1000.0f; + gCsCamAtX = player->pos.x; gCsCamAtY = player->pos.y; gCsCamAtZ = player->trueZpos + 1100.0f; + D_ctx_80177A48[0] = 0.03f; D_ctx_801779A8[gMainController] = 60.0f; + player->unk_190 = 2.0f; + if (player->csTimer == 0) { gFillScreenAlphaTarget = 255; gFillScreenAlphaStep = 24; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; } + if (gFillScreenAlpha == 255) { AUDIO_PLAY_BGM(NA_BGM_STAGE_SO); player->pos.z = 0.0f; @@ -1143,6 +1237,7 @@ void Solar_LevelStart(Player* player) { gPlayer[0].shields = 255; } break; + case 10: gPathTexScroll += 60.0f; break; @@ -1150,18 +1245,24 @@ void Solar_LevelStart(Player* player) { Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 20000.0f, 0); Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 20000.0f, 0); Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 20000.0f, 0); + Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 20000.0f, 0); Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 20000.0f, 0); Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 20000.0f, 0); + Matrix_RotateY(gCalcMatrix, (player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -(player->rot.x * M_DTOR), MTXF_APPLY); + sp50.x = 0.f; sp50.y = 0.0f; sp50.z = player->baseSpeed; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp50, &sp44); + player->vel.x = sp44.x; player->vel.z = sp44.z; player->vel.y = sp44.y; + player->pos.x += player->vel.x; player->pos.y += player->vel.y; player->pos.z += player->vel.z; @@ -1176,15 +1277,19 @@ void Solar_801A1CD8(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yR actor->state = 40; actor->unk_046 = unk46; actor->unk_04A = 3; + actor->obj.pos.x = xPos; actor->obj.pos.y = yPos; actor->obj.pos.z = zPos; + actor->obj.rot.x = xRot; actor->obj.rot.y = yRot; actor->obj.rot.z = zRot; + actor->vel.x = xVel; actor->vel.y = yVel; actor->vel.z = zVel; + actor->iwork[0] = 3; actor->fwork[0] = RAND_FLOAT_CENTERED(25.0f); @@ -1217,6 +1322,7 @@ void Solar_801A1F80(Boss* bossSO) { if (gBossActive) { bossSO->scale = 5.5f; } + if (bossSO->health == 0) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 20); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 20); @@ -1231,6 +1337,7 @@ void Solar_801A1F80(Boss* bossSO) { bossSO->obj.pos.y = -3000.0f; Solar_801A0CEC(&gActors[10], bossSO->obj.pos.x, bossSO->obj.pos.z + 2000.0f, 20.0f, 1); + D_ctx_801779A8[gMainController] = 10.0f; gCameraShake = 120; bossSO->fwork[SO_FWK_3] = 2400.0f; @@ -1251,8 +1358,11 @@ void Solar_801A1F80(Boss* bossSO) { D_i3_801C2768[7] = D_i3_801C2768[8] = D_i3_801C2768[9] = D_i3_801C2768[10] = D_i3_801C2768[11] = D_i3_801C2768[12] = D_i3_801C2768[13] = 0.0f; } + gActors[10].obj.pos.z = bossSO->obj.pos.z + 2000.0f; + Math_SmoothStepToF(&bossSO->obj.pos.y, 180.0f, 0.1f, 30.0f, 0.1f); + if (gFogRed > 96) { gFogRed--; } @@ -1262,24 +1372,30 @@ void Solar_801A1F80(Boss* bossSO) { if (gFogBlue > 64) { gFogBlue--; } + if (gBossFrameCount == 30) { AUDIO_PLAY_BGM(NA_BGM_BOSS_SO); } + if (gBossFrameCount <= 60) { Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 120.0f, 1.0f, 3.5f, 0.0f); } + if (gBossFrameCount == 60) { gActors[10].dmgType = DMG_COLLISION; AUDIO_PLAY_SFX(NA_SE_EN_OUT_MAGMA, bossSO->sfxSource, 4); } + if (bossSO->timer_050 == 100) { bossSO->unk_04C = 0; bossSO->swork[SO_SWK_1] = 1; } + if (gBossFrameCount == 150) { Solar_801A239C(bossSO); bossSO->fwork[SO_FWK_0] = 0.01f; } + if ((gBossFrameCount == 100) && (gTeamShields[TEAM_ID_PEPPY] != 0)) { Radio_PlayMessage(gMsg_ID_10300, RCID_PEPPY); } @@ -1324,24 +1440,29 @@ void Solar_801A23F4(Boss* bossSO) { bossSO->swork[SO_SWK_1] = 5; } } + if (bossSO->unk_04C >= 28) { bossSO->info.hitbox[38] = 715.0f; bossSO->info.hitbox[40] = 440.0f; bossSO->info.hitbox[42] = 110.0f; } + if (bossSO->unk_04C == 29) { Object_SetSfxSourceToPos(bossSO->sfxSource, &bossSO->obj.pos); AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, bossSO->sfxSource, 4); } + if (bossSO->unk_04C == 80) { AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_SWING, bossSO->sfxSource, 4); } + if (bossSO->unk_04C >= 94) { bossSO->info.hitbox[38] = 220.0f; bossSO->info.hitbox[40] = 715.0f; bossSO->info.hitbox[42] = 220.0f; } break; + case 4: if ((bossSO->unk_04C == 99) || (bossSO->swork[SO_SWK_2] == 0)) { bossSO->unk_04C = 0; @@ -1351,27 +1472,34 @@ void Solar_801A23F4(Boss* bossSO) { bossSO->swork[SO_SWK_1] = 7; } } + if (bossSO->unk_04C > 20) { bossSO->info.hitbox[20] = 715.0f; bossSO->info.hitbox[22] = 110.0f; bossSO->info.hitbox[24] = 275.0f; } + if (bossSO->unk_04C == 10) { Object_SetSfxSourceToPos(bossSO->sfxSource, &bossSO->obj.pos); AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, bossSO->sfxSource, 4); } + if (bossSO->unk_04C == 50) { AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_SWING, bossSO->sfxSource, 4); } + if (bossSO->unk_04C >= 85) { bossSO->info.hitbox[20] = 220.0f; bossSO->info.hitbox[22] = 715.0f; bossSO->info.hitbox[24] = 220.0f; } break; + case 5: bossSO->fwork[SO_FWK_3] = 2600.0f; + Math_SmoothStepToAngle(&bossSO->obj.rot.y, 0.0f, 1.0f, 1.5f, 1.0f); + if (bossSO->unk_04C == 65) { Matrix_RotateX(gCalcMatrix, D_i3_801C2768[0] * M_DTOR, MTXF_NEW); Matrix_RotateY(gCalcMatrix, D_i3_801C2768[1] * M_DTOR, MTXF_APPLY); @@ -1379,6 +1507,7 @@ void Solar_801A23F4(Boss* bossSO) { sp40.y = -200.0f; sp40.z = 1100.0f; Matrix_MultVec3f(gCalcMatrix, &sp40, &sp34); + for (i = 0; i < 4; i++) { sp58.x = D_i3_801BF8F0[i].x + RAND_FLOAT_CENTERED(2.0f); sp58.y = RAND_FLOAT_CENTERED(2.0f); @@ -1388,6 +1517,7 @@ void Solar_801A23F4(Boss* bossSO) { bossSO->fwork[SO_FWK_6] + sp34.z, sp4C.x, sp4C.y, sp4C.z); } } + if (bossSO->unk_04C == 99) { if ((bossSO->swork[SO_SWK_2] != 0) || (bossSO->swork[SO_SWK_3] != 0)) { Solar_801A2C3C(bossSO); @@ -1396,6 +1526,7 @@ void Solar_801A23F4(Boss* bossSO) { } } break; + case 7: if (bossSO->unk_04C < 50) { if (bossSO->fwork[SO_FWK_31] < 22.0f) { @@ -1403,16 +1534,19 @@ void Solar_801A23F4(Boss* bossSO) { } bossSO->obj.rot.y += bossSO->fwork[SO_FWK_31]; } + if ((bossSO->unk_04C >= 50) && (bossSO->unk_04C <= 100)) { if (bossSO->fwork[SO_FWK_31] > 0.0f) { bossSO->fwork[SO_FWK_31] -= 0.5f; } bossSO->obj.rot.y += bossSO->fwork[SO_FWK_31]; } + if (bossSO->obj.rot.y >= 360.0f) { bossSO->obj.rot.y -= 360.0f; AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_ROLL, bossSO->sfxSource, 4); } + if (bossSO->unk_04C == 1) { AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_ROLL, bossSO->sfxSource, 4); } @@ -1420,21 +1554,25 @@ void Solar_801A23F4(Boss* bossSO) { Math_SmoothStepToAngle(&bossSO->obj.rot.y, 0.0f, 1.0f, 2.0f, 1.0f); bossSO->fwork[SO_FWK_31] = 0.0f; } + if (bossSO->unk_04C == 120) { bossSO->swork[SO_SWK_1] = 5; bossSO->unk_04C = 0; bossSO->fwork[SO_FWK_0] = 0.1f; } break; + case 2: if (((bossSO->unk_04C == 89) && (bossSO->state == 2)) || (bossSO->swork[SO_SWK_2] == 0)) { bossSO->unk_04C = 0; + if ((bossSO->swork[SO_SWK_3] != 0) || (bossSO->swork[SO_SWK_2] != 0)) { bossSO->swork[SO_SWK_1] = 5; } else { bossSO->swork[SO_SWK_1] = 7; } } + if (bossSO->unk_04C == 80) { bossSO->rot_078.y += 15.0f; bossSO->state++; @@ -1442,19 +1580,24 @@ void Solar_801A23F4(Boss* bossSO) { bossSO->rot_078.y = 0.0f; } } + Math_SmoothStepToAngle(&bossSO->obj.rot.y, bossSO->rot_078.y, 1.0f, 1.5f, 1.0f); + if (bossSO->unk_04C >= 19) { bossSO->info.hitbox[20] = 715.0f; bossSO->info.hitbox[22] = 440.0f; bossSO->info.hitbox[24] = 110.0f; } + if (bossSO->unk_04C == 5) { Object_SetSfxSourceToPos(bossSO->sfxSource, &bossSO->obj.pos); AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, bossSO->sfxSource, 4); } + if (bossSO->unk_04C == 20) { AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_SWING, bossSO->sfxSource, 4); } + if (bossSO->unk_04C > 36) { bossSO->info.hitbox[20] = 220.0f; bossSO->info.hitbox[22] = 715.0f; @@ -1479,16 +1622,20 @@ void Solar_801A2C98(Boss* bossSO) { if (bossSO->swork[SO_SWK_11] != 0) { bossSO->swork[SO_SWK_11]--; } + if (bossSO->state == 0) { if (bossSO->swork[SO_SWK_11] == 0) { bossSO->unk_04C -= 2; + Math_SmoothStepToF(&bossSO->obj.pos.y, -1000.0f, 0.1f, 10.0f, 0.1f); Math_SmoothStepToAngle(&bossSO->obj.rot.y, 181.0f, 1.0f, 3.0f, 1.0f); + if (bossSO->unk_04C == 50) { Solar_801A0CEC(&gActors[10], bossSO->obj.pos.x, bossSO->obj.pos.z + 1000.0f, 20.0f, 1); gControllerRumbleFlags[gMainController] = 1; gControllerRumbleTimers[gMainController] = 70; } + if (bossSO->unk_04C == 60) { for (i = 0; i < 4; i++) { Solar_8019F038(bossSO->obj.pos.x + 100.0f, 100.0f, bossSO->obj.pos.z + 1100.0f, @@ -1499,10 +1646,12 @@ void Solar_801A2C98(Boss* bossSO) { D_i3_801BF8F0[i].y + 10.0f + RAND_FLOAT_CENTERED(2.0f), RAND_FLOAT(-10.0f) - 10.0f); } } + if (bossSO->unk_04C == 20) { gActors[10].dmgType = DMG_COLLISION; AUDIO_PLAY_SFX(NA_SE_EN_IN_MAGMA, bossSO->sfxSource, 4); } + if (bossSO->unk_04C == 0) { bossSO->state++; bossSO->swork[SO_SWK_11] = 100; @@ -1516,23 +1665,29 @@ void Solar_801A2C98(Boss* bossSO) { } } else { Math_SmoothStepToAngle(&bossSO->obj.rot.y, 0.0f, 1.0f, 1.5f, 1.0f); + if (bossSO->swork[SO_SWK_11] == 80) { Solar_801A0CEC(&gActors[9], bossSO->obj.pos.x, bossSO->obj.pos.z + 1000.0f, 20.0f, 1); } + if (bossSO->swork[SO_SWK_11] == 0) { bossSO->swork[SO_SWK_11] = 220; } + if (bossSO->swork[SO_SWK_11] == 210) { bossSO->unk_04C = 0; bossSO->swork[SO_SWK_1] = 1; bossSO->fwork[SO_FWK_0] = 0.05f; } + if (bossSO->swork[SO_SWK_11] >= 100) { Math_SmoothStepToF(&bossSO->obj.pos.y, 180.0f, 0.1f, 10.0f, 0.1f); } + if (bossSO->swork[SO_SWK_11] == 150) { Solar_801A3468(bossSO); } + if (bossSO->swork[SO_SWK_11] == 50) { gActors[9].dmgType = DMG_COLLISION; AUDIO_PLAY_SFX(NA_SE_EN_OUT_MAGMA, bossSO->sfxSource, 4); @@ -1553,17 +1708,22 @@ void Solar_801A3128(Boss* bossSO) { if (bossSO->swork[SO_SWK_11] != 0) { bossSO->swork[SO_SWK_11]--; } + if (bossSO->state == 0) { if (bossSO->swork[SO_SWK_11] == 0) { bossSO->unk_04C -= 2; + Math_SmoothStepToF(&bossSO->obj.pos.y, -1000.0f, 0.1f, 10.0f, 0.1f); + if (bossSO->unk_04C == 50) { Solar_801A0CEC(&gActors[10], bossSO->obj.pos.x, bossSO->obj.pos.z + 2000.0f, 10.0f, 1); } + if (bossSO->unk_04C == 40) { gActors[10].dmgType = DMG_COLLISION; AUDIO_PLAY_SFX(NA_SE_EN_IN_MAGMA, bossSO->sfxSource, 4); } + if (bossSO->unk_04C == 0) { bossSO->state++; bossSO->swork[SO_SWK_11] = 100; @@ -1577,9 +1737,12 @@ void Solar_801A3128(Boss* bossSO) { } else { if (bossSO->swork[SO_SWK_11] == 80) { Solar_801A0CEC(&gActors[9], bossSO->obj.pos.x, bossSO->obj.pos.z + 850.0f, 20.0f, 1); + gControllerRumbleFlags[gMainController] = 1; gControllerRumbleTimers[gMainController] = 70; + D_i3_801C2740[2]++; + if ((D_i3_801C2740[2] % 2) != 0) { if ((D_i3_801C2740[2] & 2) != 0) { if (gTeamShields[TEAM_ID_PEPPY] > 0) { @@ -1592,16 +1755,20 @@ void Solar_801A3128(Boss* bossSO) { } } } + if (bossSO->swork[SO_SWK_11] == 0) { bossSO->swork[SO_SWK_11] = 220; } + if (bossSO->swork[SO_SWK_11] == 210) { bossSO->unk_04C = 0; bossSO->swork[SO_SWK_1] = 1; } + if (bossSO->swork[SO_SWK_11] >= 100) { Math_SmoothStepToF(&bossSO->obj.pos.y, 180.0f, 0.1f, 20.0f, 0.1f); } + if (bossSO->swork[SO_SWK_11] == 150) { Solar_801A239C(bossSO); bossSO->fwork[SO_FWK_0] = 0.01f; @@ -1610,6 +1777,7 @@ void Solar_801A3128(Boss* bossSO) { Radio_PlayMessage(gMsg_ID_10320, RCID_PEPPY); } } + if (bossSO->swork[SO_SWK_11] == 50) { gActors[9].dmgType = DMG_COLLISION; AUDIO_PLAY_SFX(NA_SE_EN_OUT_MAGMA, bossSO->sfxSource, 4); @@ -1620,6 +1788,7 @@ void Solar_801A3128(Boss* bossSO) { void Solar_801A3468(Boss* bossSO) { bossSO->swork[SO_SWK_0] = 4; bossSO->unk_048 = 0; + if ((bossSO->swork[SO_SWK_2] != 0) || (bossSO->swork[SO_SWK_3] != 0)) { if (bossSO->swork[SO_SWK_3] != 0) { bossSO->swork[SO_SWK_1] = 3; @@ -1652,37 +1821,46 @@ void Solar_801A3510(Boss* bossSO) { bossSO->swork[SO_SWK_1] = 5; } } + if (bossSO->unk_04C == 29) { Object_SetSfxSourceToPos(bossSO->sfxSource, &bossSO->obj.pos); AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, bossSO->sfxSource, 4); } + if (bossSO->unk_04C == 80) { AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_SWING, bossSO->sfxSource, 4); } + if (bossSO->unk_04C == 94) { Solar_801A0DF8(bossSO->fwork[SO_FWK_13], bossSO->fwork[SO_FWK_15], RAND_FLOAT_CENTERED(60.0f), 4, 2.0f); bossSO->timer_050 = 90; } break; + case 4: if ((bossSO->unk_04C == 99) || (bossSO->swork[SO_SWK_2] == 0)) { bossSO->unk_04C = 0; bossSO->swork[SO_SWK_1] = 5; } + Math_SmoothStepToAngle(&bossSO->obj.rot.x, 20.0f, 0.1f, 10.0f, 0.1f); + if (bossSO->unk_04C == 10) { Object_SetSfxSourceToPos(bossSO->sfxSource, &bossSO->obj.pos); AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, bossSO->sfxSource, 4); } + if (bossSO->unk_04C == 50) { AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_SWING, bossSO->sfxSource, 4); } + if (bossSO->unk_04C == 60) { Solar_801A0D90(bossSO->obj.pos.x, bossSO->obj.pos.z + 1600.0f, 80.0f, 2); gControllerRumbleFlags[gMainController] = 1; gControllerRumbleTimers[gMainController] = 100; } break; + case 5: Math_SmoothStepToAngle(&bossSO->obj.rot.x, 0.0f, 0.1f, 10.0f, 0.1f); if (bossSO->unk_04C == 65) { @@ -1692,29 +1870,35 @@ void Solar_801A3510(Boss* bossSO) { D_i3_801BF8F0[i].y + RAND_FLOAT_CENTERED(0.25f), RAND_FLOAT(10.0f) + 100.0f); } } + if ((bossSO->unk_048 != 0) && (bossSO->unk_04C == 68)) { bossSO->swork[SO_SWK_1] = 9; bossSO->fwork[SO_FWK_0] = 0.01f; bossSO->unk_04C = 20; } + if (bossSO->unk_04C == 99) { Solar_801A30CC(bossSO); } break; + case 8: if (bossSO->unk_04C == 65) { AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_BREATH, bossSO->sfxSource, 4); bossSO->timer_050 = 30; } + if (bossSO->timer_050 != 0) { bossSO->unk_04C = 65; } - if ((bossSO->unk_04C == 65) && ((gGameFrameCount % 2) == 0)) { + + if ((bossSO->unk_04C == 65) && (gGameFrameCount % 2) == 0) { Solar_8019FFC0(bossSO, bossSO->fwork[SO_FWK_4], bossSO->fwork[SO_FWK_5] - 100.0f, bossSO->fwork[SO_FWK_6] + 600.0f, (bossSO->timer_050 * 0.2f) + 4.0f, 0); Solar_801A1EB0(bossSO, bossSO->fwork[SO_FWK_4], 25.0f, bossSO->fwork[SO_FWK_5] - 100.0f, bossSO->fwork[SO_FWK_6] + 300.0f); } + if (bossSO->unk_04C == 75) { Audio_KillSfxBySourceAndId(bossSO->sfxSource, NA_SE_EN_SOBOSS_BREATH); } @@ -1723,15 +1907,18 @@ void Solar_801A3510(Boss* bossSO) { bossSO->unk_04C = 0; } break; + case 9: bossSO->unk_04C++; if (bossSO->unk_04C == 66) { AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_BREATH, bossSO->sfxSource, 4); bossSO->timer_050 = 30; } + if (bossSO->timer_050 != 0) { bossSO->unk_04C = 66; } + if ((bossSO->unk_04C == 66) && ((gGameFrameCount % 2) == 0)) { Solar_8019FFC0(bossSO, bossSO->fwork[SO_FWK_4] + 125.0f, bossSO->fwork[SO_FWK_5] - 100.0f, bossSO->fwork[SO_FWK_6] + 600.0f, (bossSO->timer_050 * 0.2f) + 4.0f, 1); @@ -1740,14 +1927,17 @@ void Solar_801A3510(Boss* bossSO) { Solar_801A1EB0(bossSO, bossSO->fwork[SO_FWK_4], 25.0f, bossSO->fwork[SO_FWK_5] - 100.0f, bossSO->fwork[SO_FWK_6] + 300.0f); } + if (bossSO->unk_04C == 76) { Audio_KillSfxBySourceAndId(bossSO->sfxSource, NA_SE_EN_SOBOSS_BREATH); } + if (bossSO->unk_04C >= 99) { Solar_801A30CC(bossSO); } break; } + if (bossSO->timer_050 == 0) { Object_Kill(&gActors[6].obj, gActors[6].sfxSource); } else { @@ -1771,9 +1961,12 @@ void Solar_801A3C4C(Boss* bossSO) { } if (bossSO) {} } + bossSO->timer_058 = 20; + if ((bossSO->dmgPart >= 1) && (bossSO->dmgPart <= 3) && (bossSO->swork[SO_SWK_2] != 0)) { AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_DAMAGE, bossSO->sfxSource, 4); + bossSO->swork[SO_SWK_2] -= bossSO->damage; if (bossSO->swork[SO_SWK_2] < 0) { bossSO->swork[SO_SWK_2] = 0; @@ -1788,8 +1981,10 @@ void Solar_801A3C4C(Boss* bossSO) { bossSO->swork[SO_SWK_8] = 20; } } + if ((bossSO->dmgPart >= 4) && (bossSO->dmgPart <= 6) && (bossSO->swork[SO_SWK_3] != 0)) { AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_DAMAGE, bossSO->sfxSource, 4); + bossSO->swork[SO_SWK_3] -= bossSO->damage; if (bossSO->swork[SO_SWK_3] < 0) { bossSO->swork[SO_SWK_3] = 0; @@ -1804,6 +1999,7 @@ void Solar_801A3C4C(Boss* bossSO) { bossSO->swork[SO_SWK_9] = 20; } } + if (bossSO->health <= 0) { bossSO->unk_04C = 21; bossSO->state = 0; @@ -1811,21 +2007,30 @@ void Solar_801A3C4C(Boss* bossSO) { bossSO->fwork[SO_FWK_0] = 0.01f; bossSO->info.hitbox = SEGMENTED_TO_VIRTUAL(gNoHitbox); bossSO->timer_058 = 20000; + gTeamLowHealthMsgTimer = -1; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 255; gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 255; + gCsFrameCount = 0; + gControllerRumbleFlags[gMainController] = 1; gControllerRumbleTimers[gMainController] = 10; + SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); + Audio_KillSfxById(NA_SE_OVERHEAT_ALARM); + AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, bossSO->sfxSource, 4); + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].csTimer = 0; gPlayer[0].csState = gPlayer[0].csTimer; + gPlayer[0].rot.y += gPlayer[0].yRot_114; if (gPlayer[0].rot.y > 360.0f) { gPlayer[0].rot.y -= 360.0f; @@ -1849,56 +2054,75 @@ void Solar_801A4214(Boss* bossSO) { if (bossSO->health > 0) { return; } + Math_SmoothStepToAngle(&bossSO->obj.rot.y, 0.0f, 0.1f, 3.0f, 0.0f); Math_SmoothStepToAngle(&bossSO->obj.rot.x, 0.0f, 0.1f, 3.0f, 0.0f); + if ((bossSO->unk_04C == 52) && (bossSO->swork[SO_SWK_1] == 5)) { bossSO->unk_04C = 38; bossSO->fwork[SO_FWK_0] = 0.05f; } + Matrix_RotateX(gCalcMatrix, bossSO->fwork[SO_FWK_1] * M_DTOR, MTXF_NEW); Matrix_RotateY(gCalcMatrix, -bossSO->fwork[SO_FWK_2] * M_DTOR, MTXF_APPLY); + sp50.x = 0.0f; sp50.y = 200.0f; sp50.z = 1100.0f; + Matrix_MultVec3f(gCalcMatrix, &sp50, &sp44); + if (bossSO->state >= 2) { Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 30.0f, 1.0f, 2.5f, 0.0f); } + switch (bossSO->state) { case 0: if (D_i3_801C2740[0] >= 33) { D_i3_801C2740[0] -= 3; } + if (bossSO->timer_058 == 19910) { bossSO->state++; bossSO->swork[SO_SWK_1] = 5; bossSO->unk_04C = 0; bossSO->fwork[SO_FWK_0] = 0.05f; } + Math_SmoothStepToF(&bossSO->obj.pos.y, 180.0f, 0.1f, 10.0f, 0.1f); break; + case 1: if (bossSO->unk_04C == 51) { bossSO->unk_04C = 50; bossSO->state++; + gShowBossHealth = false; + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_DOWN, bossSO->sfxSource, 4); + Solar_801A1E14(bossSO->fwork[SO_FWK_4], bossSO->fwork[SO_FWK_5] + 300.0f, bossSO->fwork[SO_FWK_6], bossSO->fwork[SO_FWK_1], bossSO->fwork[SO_FWK_2], 73.0f, RAND_FLOAT_CENTERED(50.0f), 80.0f, 40.0f, 8); + D_i3_801C2768[3] = 6.0f; D_i3_801C2768[2] = 100.0f; + gFillScreenAlpha = 255; gFillScreenRed = 255; gFillScreenGreen = 255; gFillScreenBlue = 255; gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 4; + Boss_AwardBonus(bossSO); + bossSO->swork[SO_SWK_4]++; + Math_SmoothStepToF(&bossSO->obj.pos.y, 180.0f, 0.1f, 10.0f, 0.1f); } break; + case 2: if (D_i3_801C2740[0] >= 33) { D_i3_801C2740[0] -= 3; @@ -1910,6 +2134,7 @@ void Solar_801A4214(Boss* bossSO) { bossSO->state++; } break; + case 3: if ((gCsFrameCount >= 205) && (D_i3_801C2768[5] < 1.0f)) { D_i3_801C2768[5] += 0.1f; @@ -1944,10 +2169,12 @@ void Solar_801A4214(Boss* bossSO) { if (gCsFrameCount >= 238) { D_i3_801C2768[13] = 0.0f; } + if (gCsFrameCount == 230) { AUDIO_PLAY_SFX(NA_SE_EN_STAR_EXPLOSION, gActors[5].sfxSource, 4); D_ctx_801779A8[gMainController] = 120.0f; } + if (gCsFrameCount == 250) { bossSO->state++; bossSO->obj.pos.y = -1600.0f; @@ -1959,6 +2186,7 @@ void Solar_801A4214(Boss* bossSO) { bossSO->timer_058 = 100; } break; + case 4: if (bossSO->timer_058 == 1) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 80); @@ -1973,13 +2201,16 @@ void Solar_801A48B8(Boss* bossSO) { s32 i; AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_BROKEN, bossSO->sfxSource, 4); + gControllerRumbleFlags[gMainController] = 1; gControllerRumbleTimers[gMainController] = 10; + if (bossSO->swork[SO_SWK_0] != 6) { bossSO->swork[SO_SWK_5] = bossSO->swork[SO_SWK_0]; bossSO->swork[SO_SWK_6] = bossSO->swork[SO_SWK_1]; bossSO->swork[SO_SWK_7] = bossSO->unk_04C; } + if ((bossSO->swork[SO_SWK_0] == 4) && (bossSO->unk_04C >= 60) && (bossSO->unk_04C < 67)) { for (i = 4; i < ARRAY_COUNT(gActors); i++) { if (gActors[i].obj.id == OBJ_ACTOR_278) { @@ -1991,10 +2222,12 @@ void Solar_801A48B8(Boss* bossSO) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 255; gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 64; + bossSO->swork[SO_SWK_0] = 6; bossSO->swork[SO_SWK_1] = 6; bossSO->unk_04C = 0; bossSO->fwork[SO_FWK_0] = 0.01f; + if (((bossSO->swork[SO_SWK_2] > 0) || (bossSO->swork[SO_SWK_3] > 0)) && (gTeamShields[TEAM_ID_SLIPPY] > 0)) { Radio_PlayMessage(gMsg_ID_7086, RCID_SLIPPY); } @@ -2013,6 +2246,7 @@ void Solar_801A4A34(Boss* bossSO) { bossSO->fwork[SO_FWK_35], bossSO->fwork[SO_FWK_36], bossSO->fwork[SO_FWK_37], RAND_FLOAT(-25.0f) - 10.0f, RAND_FLOAT(25.0f) + 30.0f, RAND_FLOAT_CENTERED(25.0f) - 50.0f, 2); } + if (bossSO->swork[SO_SWK_3] < 0) { bossSO->swork[SO_SWK_3] = 0; Solar_801A1E14(bossSO->fwork[SO_FWK_25], bossSO->fwork[SO_FWK_26], bossSO->fwork[SO_FWK_27], @@ -2025,6 +2259,7 @@ void Solar_801A4A34(Boss* bossSO) { bossSO->fwork[SO_FWK_32], bossSO->fwork[SO_FWK_33], bossSO->fwork[SO_FWK_34], RAND_FLOAT(25.0f) + 10.0f, RAND_FLOAT(25.0f) + 30.0f, RAND_FLOAT_CENTERED(25.0f) - 50.0f, 3); } + switch (bossSO->unk_04C) { case 30: AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_DAMAGE, bossSO->sfxSource, 4); @@ -2034,6 +2269,7 @@ void Solar_801A4A34(Boss* bossSO) { AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_BROKEN, bossSO->sfxSource, 4); break; } + if (bossSO->unk_04C == 119) { bossSO->swork[SO_SWK_0] = bossSO->swork[SO_SWK_5]; bossSO->swork[SO_SWK_1] = bossSO->swork[SO_SWK_6]; @@ -2061,6 +2297,7 @@ void Solar_801A4EF8(Boss* bossSO) { if (bossSO->swork[SO_SWK_11] != 0) { bossSO->swork[SO_SWK_11]--; } + switch (bossSO->state) { case 0: bossSO->unk_04C = 0; @@ -2070,9 +2307,11 @@ void Solar_801A4EF8(Boss* bossSO) { bossSO->fwork[SO_FWK_0] = 0.01f; bossSO->unk_04C = 56; } + if (bossSO->obj.rot.y == 0.0f) { AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_ROLL, bossSO->sfxSource, 4); } + bossSO->fwork[SO_FWK_31] += 0.5f; bossSO->obj.rot.y += bossSO->fwork[SO_FWK_31]; if (bossSO->obj.rot.y >= 360.0f) { @@ -2081,6 +2320,7 @@ void Solar_801A4EF8(Boss* bossSO) { } bossSO->rot_078.y = bossSO->obj.rot.y; break; + case 1: bossSO->obj.rot.y += bossSO->fwork[SO_FWK_31]; bossSO->unk_04C = 56; @@ -2088,13 +2328,17 @@ void Solar_801A4EF8(Boss* bossSO) { bossSO->obj.rot.y -= 360.0f; AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_ROLL, bossSO->sfxSource, 4); } + if (bossSO->swork[SO_SWK_11] <= 45) { Math_SmoothStepToF(&bossSO->obj.pos.y, -1000.0f, 0.1f, 20.0f, 0.1f); } + if (bossSO->swork[SO_SWK_11] == 30) { Solar_801A0CEC(&gActors[10], bossSO->obj.pos.x, bossSO->obj.pos.z + 1000.0f, 20.0f, 1); + gControllerRumbleFlags[gMainController] = 1; gControllerRumbleTimers[gMainController] = 70; + for (i = 0; i < 4; i++) { Solar_8019F038(bossSO->obj.pos.x + 100.0f, 100.0f, bossSO->obj.pos.z + 1100.0f, D_i3_801BF8F0[i].x + RAND_FLOAT_CENTERED(2.0f), @@ -2104,6 +2348,7 @@ void Solar_801A4EF8(Boss* bossSO) { D_i3_801BF8F0[i].y + 10.0f + RAND_FLOAT_CENTERED(2.0f), RAND_FLOAT(-10.0f) - 10.0f); } } + if (bossSO->swork[SO_SWK_11] == 16) { gActors[10].dmgType = DMG_EXPLOSION; } @@ -2120,37 +2365,46 @@ void Solar_801A4EF8(Boss* bossSO) { } bossSO->rot_078.y = bossSO->obj.rot.y; break; + case 2: bossSO->unk_04C = 0; + if (bossSO->swork[SO_SWK_11] == 300) { gControllerRumbleFlags[gMainController] = 1; gControllerRumbleTimers[gMainController] = 170; gCameraShake = 130; } + if (bossSO->swork[SO_SWK_11] == 200) { Solar_801A0CEC(&gActors[9], bossSO->obj.pos.x, bossSO->obj.pos.z + 1000.0f, 20.0f, 1); } + if (bossSO->swork[SO_SWK_11] < 200) { bossSO->unk_04C = 98; bossSO->rot_078.y += bossSO->fwork[SO_FWK_31]; + if (bossSO->swork[SO_SWK_11] == 170) { AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_CRY, bossSO->sfxSource, 4); bossSO->obj.pos.y = -500.0f; gActors[9].dmgType = DMG_EXPLOSION; } + if (bossSO->swork[SO_SWK_11] <= 170) { bossSO->vel.y = COS_DEG(bossSO->obj.rot.x) * 80.0f; bossSO->vel.z = (SIN_DEG(bossSO->obj.rot.x) * 30.0f) + gPlayer[0].vel.z; } + if (bossSO->obj.rot.x < 190.0f) { bossSO->obj.rot.x += 1.0f; } + if (bossSO->swork[SO_SWK_11] == 50) { Solar_801A0CEC(&gActors[10], bossSO->obj.pos.x, bossSO->obj.pos.z + 1000.0f, 80.0f, 2); gControllerRumbleFlags[gMainController] = 1; gControllerRumbleTimers[gMainController] = 100; gCameraShake = 10; } + if (bossSO->obj.pos.y < -1500.0f) { bossSO->state++; bossSO->swork[SO_SWK_11] = 100; @@ -2164,6 +2418,7 @@ void Solar_801A4EF8(Boss* bossSO) { } } break; + case 3: Math_SmoothStepToAngle(&bossSO->obj.rot.y, 0.0f, 1.0f, 1.5f, 1.0f); if (bossSO->swork[SO_SWK_11] == 65) { @@ -2202,7 +2457,9 @@ void Solar_801A56B8(Boss* bossSO) { bossSO->state++; bossSO->rot_078.y += 15.0f; } + Math_SmoothStepToAngle(&bossSO->obj.rot.y, bossSO->rot_078.y, 1.0f, 3.0f, 1.0f); + if (bossSO->unk_04C > 18) { bossSO->info.hitbox[20] = 715.0f; bossSO->info.hitbox[22] = 440.0f; @@ -2214,6 +2471,7 @@ void Solar_801A56B8(Boss* bossSO) { bossSO->info.hitbox[24] = 220.0f; } break; + case 4: if ((bossSO->unk_04C == 99) || (bossSO->swork[SO_SWK_2] == 0)) { bossSO->unk_04C = 0; @@ -2223,6 +2481,7 @@ void Solar_801A56B8(Boss* bossSO) { bossSO->swork[SO_SWK_1] = 7; } } + if (bossSO->unk_04C > 20) { bossSO->info.hitbox[20] = 715.0f; bossSO->info.hitbox[22] = 110.0f; @@ -2234,14 +2493,18 @@ void Solar_801A56B8(Boss* bossSO) { bossSO->info.hitbox[24] = 220.0f; } break; + case 5: bossSO->fwork[SO_FWK_3] = 4800.0f; + if (bossSO->unk_04C == 65) { bossSO->timer_050 = 30; } + if (bossSO->timer_050 != 0) { bossSO->unk_04C = 65; } + if ((bossSO->unk_04C == 65) && ((gGameFrameCount % 4) == 0)) { Solar_8019FFC0(bossSO, bossSO->fwork[SO_FWK_4] + 125.0f, bossSO->fwork[SO_FWK_5] - 100.0f, bossSO->fwork[SO_FWK_6] + 600.0f, ((f32) bossSO->timer_050 * 0.2f) + 4.0f, 1); @@ -2251,6 +2514,7 @@ void Solar_801A56B8(Boss* bossSO) { bossSO->fwork[SO_FWK_6] + 300.0f); } break; + case 7: if (bossSO->unk_04C < 50) { if (bossSO->fwork[SO_FWK_31] < 22.0f) { @@ -2304,6 +2568,7 @@ void Solar_Boss_Update(Boss* bossSO) { if (bossSO->swork[SO_SWK_10] != 0) { bossSO->swork[SO_SWK_10]--; } + if ((gBossFrameCount == 200) && (gTeamShields[TEAM_ID_FALCO] != 0)) { Radio_PlayMessage(gMsg_ID_10310, RCID_FALCO); } @@ -2313,11 +2578,13 @@ void Solar_Boss_Update(Boss* bossSO) { if ((gBossFrameCount == 450) && (gTeamShields[TEAM_ID_PEPPY] != 0)) { Radio_PlayMessage(gMsg_ID_10320, RCID_PEPPY); } + if (bossSO->health != 0) { Math_SmoothStepToF(&bossSO->obj.pos.z, gPlayer[0].trueZpos - bossSO->fwork[SO_FWK_3], 1.0f, 60.0f, 1.0f); } else { Math_SmoothStepToF(&bossSO->obj.pos.z, -(gPathProgress + 2600.0f), 1.0f, 40.0f, 1.0f); } + if (bossSO->swork[SO_SWK_2] != 0) { bossSO->info.hitbox[7] = bossSO->fwork[SO_FWK_12] - bossSO->obj.pos.z; bossSO->info.hitbox[9] = bossSO->fwork[SO_FWK_11] - bossSO->obj.pos.y; @@ -2325,11 +2592,15 @@ void Solar_Boss_Update(Boss* bossSO) { bossSO->info.hitbox[13] = bossSO->fwork[SO_FWK_24] - bossSO->obj.pos.z; bossSO->info.hitbox[15] = bossSO->fwork[SO_FWK_23] - bossSO->obj.pos.y; bossSO->info.hitbox[17] = bossSO->fwork[SO_FWK_22] - bossSO->obj.pos.x; + Matrix_RotateY(gCalcMatrix, -bossSO->obj.rot.y * M_DTOR, MTXF_NEW); + sp44.x = bossSO->fwork[SO_FWK_28] - bossSO->obj.pos.x; sp44.y = bossSO->fwork[SO_FWK_29] - bossSO->obj.pos.y; sp44.z = bossSO->fwork[SO_FWK_30] - bossSO->obj.pos.z; + Matrix_MultVec3f(gCalcMatrix, &sp44, &sp38); + bossSO->info.hitbox[19] = sp38.z; bossSO->info.hitbox[21] = sp38.y; bossSO->info.hitbox[23] = sp38.x; @@ -2345,22 +2616,26 @@ void Solar_Boss_Update(Boss* bossSO) { bossSO->info.hitbox[39] = bossSO->fwork[SO_FWK_26] - bossSO->obj.pos.y; bossSO->info.hitbox[41] = bossSO->fwork[SO_FWK_25] - bossSO->obj.pos.x; } + if (((gGameFrameCount % 8) == 0) && (bossSO->fwork[SO_FWK_3] < 4800.0f)) { if (Play_CheckDynaFloorCollision(&sp1C0, &sp1B8, bossSO->obj.pos.x, bossSO->obj.pos.y - 160.0f, bossSO->obj.pos.z)) { Solar_801A1EB0(bossSO, bossSO->obj.pos.x, 50.0f, sp1C0 - 170.0f, bossSO->obj.pos.z + 100.0f); } + if ((bossSO->swork[SO_SWK_2] != 0) && Play_CheckDynaFloorCollision(&sp1C0, &sp1B8, bossSO->fwork[SO_FWK_16], bossSO->fwork[SO_FWK_17], bossSO->fwork[SO_FWK_18])) { Solar_801A1EB0(bossSO, bossSO->fwork[SO_FWK_16], 50.0f, sp1C0 - 150.f, bossSO->fwork[SO_FWK_18] + 150.0f); } + if ((bossSO->swork[SO_SWK_3] != 0) && Play_CheckDynaFloorCollision(&sp1C0, &sp1B8, bossSO->fwork[SO_FWK_13], bossSO->fwork[SO_FWK_14], bossSO->fwork[SO_FWK_15])) { Solar_801A1EB0(bossSO, bossSO->fwork[SO_FWK_13], 50.0f, sp1C0 - 150.0f, bossSO->fwork[SO_FWK_15] + 150.0f); } } + if ((((gGameFrameCount % 4) == 0) || (bossSO->fwork[SO_FWK_31] != 0.0f)) && ((bossSO->swork[SO_SWK_0] != 7) || ((gGameFrameCount % 2) == 0))) { if ((bossSO->swork[SO_SWK_2] == 0) && ((bossSO->health > 0) || (bossSO->state < 2))) { @@ -2372,13 +2647,17 @@ void Solar_Boss_Update(Boss* bossSO) { bossSO->fwork[SO_FWK_31] - 20.0f, 1.0f); } } + Math_SmoothStepToF(&bossSO->fwork[0], 1.0f, 0.01f, 0.01f, 0.0f); + if ((bossSO->health > 0) || (bossSO->swork[SO_SWK_0] == 0)) { D_i3_801BF980[bossSO->swork[SO_SWK_0]](bossSO); } + if (bossSO->timer_058 != 0) { Solar_801A4214(bossSO); } + switch (bossSO->swork[SO_SWK_1]) { case 0: bossSO->unk_04C++; @@ -2396,6 +2675,7 @@ void Solar_Boss_Update(Boss* bossSO) { } sp1BC = Animation_GetFrameData(&D_SO_601388C, bossSO->unk_04C, sp50); break; + case 1: bossSO->unk_04C++; if (bossSO->unk_04C >= Animation_GetFrameCount(&D_SO_600D3DC)) { @@ -2403,6 +2683,7 @@ void Solar_Boss_Update(Boss* bossSO) { } sp1BC = Animation_GetFrameData(&D_SO_600D3DC, bossSO->unk_04C, sp50); break; + case 2: bossSO->unk_04C++; if (bossSO->unk_04C >= Animation_GetFrameCount(&D_SO_600E2C4)) { @@ -2410,6 +2691,7 @@ void Solar_Boss_Update(Boss* bossSO) { } sp1BC = Animation_GetFrameData(&D_SO_600E2C4, bossSO->unk_04C, sp50); break; + case 3: bossSO->unk_04C++; if (bossSO->unk_04C >= Animation_GetFrameCount(&D_SO_600F744)) { @@ -2417,6 +2699,7 @@ void Solar_Boss_Update(Boss* bossSO) { } sp1BC = Animation_GetFrameData(&D_SO_600F744, bossSO->unk_04C, sp50); break; + case 4: bossSO->unk_04C++; if (bossSO->unk_04C >= Animation_GetFrameCount(&D_SO_600C15C)) { @@ -2424,6 +2707,7 @@ void Solar_Boss_Update(Boss* bossSO) { } sp1BC = Animation_GetFrameData(&D_SO_600C15C, bossSO->unk_04C, sp50); break; + case 5: case 8: case 9: @@ -2436,6 +2720,7 @@ void Solar_Boss_Update(Boss* bossSO) { } sp1BC = Animation_GetFrameData(&D_SO_6012C00, bossSO->unk_04C, sp50); break; + case 6: bossSO->unk_04C++; if (bossSO->unk_04C >= Animation_GetFrameCount(&D_SO_600B1B4)) { @@ -2443,6 +2728,7 @@ void Solar_Boss_Update(Boss* bossSO) { } sp1BC = Animation_GetFrameData(&D_SO_600B1B4, bossSO->unk_04C, sp50); break; + case 7: bossSO->unk_04C++; if (bossSO->unk_04C >= Animation_GetFrameCount(&D_SO_6009D30)) { @@ -2454,17 +2740,22 @@ void Solar_Boss_Update(Boss* bossSO) { Matrix_RotateZ(gCalcMatrix, -bossSO->vwork[SO_VWK_29].z * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -bossSO->vwork[SO_VWK_29].x * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, -bossSO->vwork[SO_VWK_29].y * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -bossSO->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, -bossSO->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, -bossSO->obj.rot.y * M_DTOR, MTXF_APPLY); + if ((bossSO->health > 0) && (bossSO->swork[SO_SWK_0] == 1)) { sp44.x = gPlayer[0].pos.x - bossSO->obj.pos.x; sp44.y = gPlayer[0].pos.y - bossSO->obj.pos.y; sp44.z = gPlayer[0].pos.z - bossSO->obj.pos.z; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); + sp1C4 = Math_RadToDeg(Math_Atan2F(sp38.x, sp38.z)); sp1CC = sqrtf(SQ(sp38.x) + SQ(sp38.z)); sp1C8 = Math_RadToDeg(-Math_Atan2F(sp38.y, sp1CC)); + if ((sp1C8 > 30.0f) && (sp1C8 <= 180.0f)) { sp1C8 = 30.0f; } @@ -2483,7 +2774,9 @@ void Solar_Boss_Update(Boss* bossSO) { Math_SmoothStepToAngle(&D_i3_801C2768[1], 0.0f, 0.2f, 4.0f, 0.1f); Math_SmoothStepToAngle(&D_i3_801C2768[0], 0.0f, 0.2f, 4.0f, 0.1f); } + Math_SmoothStepToVec3fArray(sp50, bossSO->vwork, 1, sp1BC, bossSO->fwork[SO_FWK_0], 100.0f, 0.0f); + if ((bossSO->dmgType != DMG_NONE) && (bossSO->health > 0)) { bossSO->dmgType = DMG_NONE; AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, bossSO->sfxSource, 4); @@ -2501,17 +2794,19 @@ void Solar_Boss_Update(Boss* bossSO) { } bool Solar_801A68A8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { - Boss* this = thisx; + Boss* this = (Boss*) thisx; Vec3f sp58 = { 0.0f, 0.0f, 0.0f }; Vec3f sp4C = { 10.0f, 0.0f, 0.0f }; Vec3f sp40 = { -10.0f, 0.0f, 0.0f }; gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, D_i3_801C2740[1], D_i3_801C2740[0], D_i3_801C2740[0], 255); + if (this->fwork[SO_FWK_3] < 4800.0f) { RCP_SetupDL_30(64, 32, 32, gFogAlpha, gFogNear, gFogFar); } else { RCP_SetupDL_30(16, 16, 16, gFogAlpha, gFogNear, gFogFar); } + switch (limbIndex) { case 11: rot->y -= D_i3_801C2768[1]; @@ -2529,12 +2824,14 @@ bool Solar_801A68A8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th } } break; + case 2: case 3: case 4: if (this->swork[SO_SWK_2] == 0) { *dList = NULL; } + if ((this->swork[SO_SWK_8] % 2U) != 0) { if ((this->swork[SO_SWK_8] % 2U) != 0) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 32, 32, 128, 255); @@ -2544,6 +2841,7 @@ bool Solar_801A68A8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th } } break; + case 5: case 6: case 7: @@ -2587,6 +2885,7 @@ void Solar_801A6BDC(s32 limbIndex, Vec3f* rot, void* thisx) { this->fwork[SO_FWK_1] = sp28.x; this->fwork[SO_FWK_2] = sp28.y; break; + case 2: if (this->swork[SO_SWK_2] > 0) { Matrix_Push(&gCalcMatrix); @@ -2600,6 +2899,7 @@ void Solar_801A6BDC(s32 limbIndex, Vec3f* rot, void* thisx) { this->fwork[SO_FWK_17] = sp28.y; this->fwork[SO_FWK_18] = sp28.z; } + if (this->swork[SO_SWK_2] < 0) { Matrix_MultVec3f(gCalcMatrix, &sp34, &sp28); this->fwork[SO_FWK_28] = sp28.x; @@ -2608,8 +2908,7 @@ void Solar_801A6BDC(s32 limbIndex, Vec3f* rot, void* thisx) { Matrix_GetYRPAngles(gCalcMatrix, (Vec3f*) &this->fwork[SO_FWK_41]); } break; - default: - break; + case 3: if (this->swork[SO_SWK_2] > 0) { Matrix_MultVec3f(gCalcMatrix, &sp7C, &sp28); @@ -2625,6 +2924,7 @@ void Solar_801A6BDC(s32 limbIndex, Vec3f* rot, void* thisx) { Matrix_GetYRPAngles(gCalcMatrix, (Vec3f*) &this->fwork[SO_FWK_47]); } break; + case 4: if (this->swork[SO_SWK_2] > 0) { Matrix_MultVec3f(gCalcMatrix, &sp70, &sp28); @@ -2643,6 +2943,7 @@ void Solar_801A6BDC(s32 limbIndex, Vec3f* rot, void* thisx) { this->fwork[SO_FWK_12] = sp28.z; } break; + case 5: if (this->swork[SO_SWK_3] > 0) { Matrix_Push(&gCalcMatrix); @@ -2664,6 +2965,7 @@ void Solar_801A6BDC(s32 limbIndex, Vec3f* rot, void* thisx) { this->fwork[SO_FWK_27] = sp28.z; } break; + case 6: if (this->swork[SO_SWK_3] > 0) { Matrix_MultVec3f(gCalcMatrix, &sp7C, &sp28); @@ -2679,6 +2981,7 @@ void Solar_801A6BDC(s32 limbIndex, Vec3f* rot, void* thisx) { Matrix_GetYRPAngles(gCalcMatrix, (Vec3f*) &this->fwork[SO_FWK_44]); } break; + case 7: if (this->swork[SO_SWK_3] > 0) { Matrix_MultVec3f(gCalcMatrix, &sp70, &sp28); @@ -2715,9 +3018,11 @@ void Solar_Boss_Draw(Boss* bossSO) { }; Matrix_Scale(gCalcMatrix, bossSO->scale, bossSO->scale, bossSO->scale, MTXF_APPLY); + if (gBossActive) { Animation_DrawSkeleton(2, D_SO_600E470, bossSO->vwork, Solar_801A68A8, Solar_801A6BDC, bossSO, gCalcMatrix); } + if (bossSO->health <= 0) { RCP_SetupDL_49(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); @@ -2729,6 +3034,7 @@ void Solar_Boss_Draw(Boss* bossSO) { Matrix_Scale(gGfxMatrix, D_i3_801C2768[3], D_i3_801C2768[2], 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); + for (i = 0; i < 9; i++) { Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); @@ -2740,6 +3046,7 @@ void Solar_Boss_Draw(Boss* bossSO) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); } + if (D_i3_801C2768[13] > 0.0f) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 192, 64, 255); Matrix_Pop(&gGfxMatrix); @@ -2829,21 +3136,27 @@ void Solar_LevelComplete(Player* player) { player->wings.unk_04 = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = player->zRotBarrelRoll = player->zRotBank = player->boostSpeed = 0.0f; player->unk_234 = 1; + gCsCamEyeX = player->cam.eye.x; gCsCamEyeY = player->cam.eye.y; gCsCamEyeZ = player->cam.eye.z; + gCsCamAtX = player->cam.at.x; gCsCamAtY = player->cam.at.y; gCsCamAtZ = player->cam.at.z; + for (i = 10; i < ARRAY_COUNT(gActors); i++) { if (gActors[i].animFrame == 0) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); } } + Object_Kill(&gActors[2].obj, gActors[2].sfxSource); Object_Kill(&gActors[3].obj, gActors[3].sfxSource); Object_Kill(&gActors[4].obj, gActors[4].sfxSource); + player->csState = 1; + D_ctx_80177A48[0] = 0.1f; if (Rand_ZeroOne() > 0.5f) { D_ctx_80177A48[9] = -1.0f; @@ -2851,16 +3164,22 @@ void Solar_LevelComplete(Player* player) { D_ctx_80177A48[9] = 1.0f; } break; + case 1: gPathTexScroll += 30.0f; + Math_SmoothStepToF(&player->rot.x, 0.0f, 0.1f, 5.0f, 0.0f); Math_SmoothStepToF(&player->pos.y, 200.0f, 0.05f, 10.0f, 0.0f); + dx = player->pos.x - bossSO->obj.pos.x; dz = (player->pos.z - bossSO->obj.pos.z) * 0.05f; sp78 = Math_RadToDeg(-Math_Atan2F(dx, dz)); + Math_SmoothStepToF(&gCsCamEyeY, 300.0f, 1.0f, 20.0f, 0.0f); Math_SmoothStepToF(&gCsCamAtY, 290.0f, 1.0f, 20.0f, 0.0f); + sp74 = Math_SmoothStepToAngle(&player->rot.y, sp78, 0.5f, 2.0f, 0.0001f) * 30.0f; + if (gCsFrameCount >= 14) { Math_SmoothStepToAngle(&player->rot.z, sp74, 0.1f, 5.0f, 0.0001f); gCsCamAtX = 0.0f; @@ -2870,19 +3189,23 @@ void Solar_LevelComplete(Player* player) { } else { player->rot.z += 30.0f; } + if (gCsFrameCount >= 200) { player->rot.x += 1.0f; player->rot.y += 1.0f; player->rot.z += 1.0f; } + if (gCsFrameCount >= 230) { gFillScreenAlphaTarget = 255; gFillScreenRed = gFillScreenBlue = gFillScreenGreen = 255; } + if (gCsFrameCount == 230) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); } + if (gCsFrameCount == 400) { player->csState++; Play_ClearObjectData(); @@ -2896,6 +3219,7 @@ void Solar_LevelComplete(Player* player) { player->rot.z = 0.0f; } break; + case 2: gPathTexScroll += 60.0f; if (player->csTimer == 0) { @@ -2904,50 +3228,67 @@ void Solar_LevelComplete(Player* player) { player->pos.z = -(gPathProgress - 500.0f); player->csState++; player->wings.modelId = 1; + Audio_StartPlayerNoise(0); + AUDIO_PLAY_BGM(NA_BGM_COURSE_CLEAR); + gDrawGround = true; + Play_ClearObjectData(); + D_ctx_80177A48[1] = 0.0f; D_ctx_80177A48[2] = 0.0f; + player->cam.eye.x = 0.0f; player->cam.eye.y = player->pos.y + 80.0f; player->cam.eye.z = player->pos.z + gPathProgress - 4000.0f; + gCsCamEyeZ = player->pos.z + gPathProgress - 4900.0f; + player->cam.at.x = gCsCamAtX = 0.0f; player->cam.at.y = gCsCamAtY = 200.0f; player->cam.at.z = gCsCamAtZ = player->pos.z + gPathProgress; + D_ctx_80177A48[0] = 0.0f; Object_Kill(&gActors[4].obj, gActors[4].sfxSource); Object_Kill(&gActors[5].obj, gActors[5].sfxSource); } break; + case 3: gPathTexScroll += 60.0f; gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 4; + if (gMsgCharIsPrinting) { player->wings.unk_30 = (s32) (gGameFrameCount % 2U) * 5.0f; } + switch (gCsFrameCount) { case 450: Solar_801A0DF8(-1200.0f, -(gPathProgress + 2500.0f), 90.0f, 2, 1.0f); break; + case 545: Solar_801A0DF8(1400.0f, -(gPathProgress + 3250.0f), -90.0f, 3, 1.0f); break; + case 550: Object_Kill(&gActors[4].obj, gActors[4].sfxSource); break; + case 645: Object_Kill(&gActors[5].obj, gActors[5].sfxSource); break; + case 700: player->csState++; Solar_801A7750(); D_i3_801C2768[3] = 1000.0f; break; } + if ((gCsFrameCount >= 520) && (gCsFrameCount < 605)) { Math_SmoothStepToF(&player->pos.x, 400.0f, 0.1f, 10.0f, 0.1f); } @@ -2972,7 +3313,9 @@ void Solar_LevelComplete(Player* player) { if (gCsFrameCount >= 600) { Math_SmoothStepToF(&player->pos.y, 950.0f, 0.1f, 10.0f, 0.0001f); } + Math_SmoothStepToF(&player->pos.z, -(gPathProgress + 4350.0f), 1.0f, 20.0f, 0.0001f); + if (gCsFrameCount >= 620) { Math_SmoothStepToF(&player->cam.eye.x, 0.0f, 1.0f, 10.0f, 0); Math_SmoothStepToF(&player->cam.eye.y, player->pos.y + 52.0f, 1.0f, 16.0f, 0.0f); @@ -2982,16 +3325,23 @@ void Solar_LevelComplete(Player* player) { player->cam.at.y = gCsCamAtY = player->pos.y; player->cam.at.z = gCsCamAtZ = player->pos.z + gPathProgress; break; + case 4: gPathTexScroll += 60.0f; + gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 4; + D_ctx_80177A48[1] += D_ctx_80177A48[2] * 0.8f; + Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, MTXF_NEW); + sp60.x = 0.0f; sp60.y = 0.0f; sp60.z = -700.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp60, &sp54); + if (gCsFrameCount < 1440) { gCsCamEyeX = sp54.x; gCsCamEyeY = D_i3_801C2768[3] + sp54.y; @@ -3000,6 +3350,7 @@ void Solar_LevelComplete(Player* player) { gCsCamAtY = player->pos.y + 75.0f; Math_SmoothStepToF(&D_i3_801C2768[3], 500.0f, 0.1f, 1.0f, 0.0001f); gCsCamAtZ = player->pos.z + gPathProgress + 200.0f; + if (gCsFrameCount >= 1400) { gCsCamAtZ -= (gCsFrameCount * 8) - 11200; } @@ -3009,6 +3360,7 @@ void Solar_LevelComplete(Player* player) { gCsCamAtY = player->pos.y + 75.0f; gCsCamAtZ = player->pos.z + gPathProgress + 200.0f - ((gCsFrameCount * 8) - 11200); } + if (gCsFrameCount > 1460) { player->baseSpeed += 2.0f; player->rot.x += 0.2f; @@ -3018,9 +3370,11 @@ void Solar_LevelComplete(Player* player) { Math_SmoothStepToF(&D_ctx_80177A48[2], 0.23f, 1.0f, 0.001f, 0.0f); Math_SmoothStepToF(&D_ctx_80177A48[0], 0.5f, 0.1f, 0.0005f, 0.0f); } + if (gCsFrameCount == 1560) { Play_ClearObjectData(); } + if (gCsFrameCount > 1530) { gFillScreenAlphaTarget = 255; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; @@ -3036,13 +3390,16 @@ void Solar_LevelComplete(Player* player) { } break; } + switch (gCsFrameCount) { case 440: gLevelClearScreenTimer = 100; break; + case 640: Radio_PlayMessage(gMsg_ID_20010, RCID_FOX); break; + case 728: switch (gTeamShields[TEAM_ID_SLIPPY]) { case 0: @@ -3056,6 +3413,7 @@ void Solar_LevelComplete(Player* player) { break; } break; + case 875: switch (gTeamShields[TEAM_ID_PEPPY]) { case 0: @@ -3069,6 +3427,7 @@ void Solar_LevelComplete(Player* player) { break; } break; + case 1021: switch (gTeamShields[TEAM_ID_FALCO]) { case 0: @@ -3082,30 +3441,37 @@ void Solar_LevelComplete(Player* player) { break; } break; + case 1186: gShowLevelClearStatusScreen = 1; break; + case 1386: gShowLevelClearStatusScreen = 0; break; + case 1460: AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, player->sfxSource, 0); player->unk_190 = player->unk_194 = 5.0f; break; + case 1400: if (gTeamShields[TEAM_ID_PEPPY] > 0) { gActors[0].state = 2; } break; + case 1500: SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); break; + case 1420: if (gTeamShields[TEAM_ID_SLIPPY] > 0) { gActors[1].state = 2; } break; + case 1440: if (gTeamShields[TEAM_ID_FALCO] > 0) { gActors[2].state = 2; @@ -3114,10 +3480,13 @@ void Solar_LevelComplete(Player* player) { } Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -((player->xRot_120 + player->rot.x) * M_DTOR), MTXF_APPLY); + sp60.x = 0.0f; sp60.y = 0.0f; sp60.z = player->baseSpeed; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp60, &sp54); + player->vel.x = sp54.x; player->vel.z = sp54.z; player->vel.y = sp54.y; @@ -3128,9 +3497,11 @@ void Solar_LevelComplete(Player* player) { player->trueZpos = player->pos.z; player->bankAngle = player->rot.z; + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 50000.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 50000.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 50000.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0.0f); @@ -3141,8 +3512,8 @@ void Solar_LevelComplete(Player* player) { } void Solar_801A8BE8(Actor* actor) { - Vec3f sp3C; - Vec3f sp30; + Vec3f src; + Vec3f dest; switch (actor->state) { case 4: @@ -3165,16 +3536,19 @@ void Solar_801A8BE8(Actor* actor) { } Matrix_RotateY(gCalcMatrix, (actor->rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -(actor->rot_0F4.x * M_DTOR), MTXF_APPLY); - sp3C.x = 0.0f; - sp3C.y = 0.0f; - sp3C.z = actor->fwork[0]; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp3C, &sp30); - actor->vel.x = sp30.x; - actor->vel.y = sp30.y; - actor->vel.z = sp30.z; + + src.x = 0.0f; + src.y = 0.0f; + src.z = actor->fwork[0]; + + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + + actor->vel.x = dest.x; + actor->vel.y = dest.y; + actor->vel.z = dest.z; + actor->obj.rot.x = -actor->rot_0F4.x; actor->obj.rot.y = actor->rot_0F4.y + 180.0f; - actor->obj.rot.z = -actor->rot_0F4.z; } From acead8f2717e77a11bb7f4ae563a8125303015cd Mon Sep 17 00:00:00 2001 From: petrie911 <69443847+petrie911@users.noreply.github.com> Date: Fri, 17 May 2024 10:33:44 -0500 Subject: [PATCH 105/151] Header fix for buffers.h (#253) * cleanup * buffers --- src/buffers.c | 2 +- srcjp/buffers.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/buffers.c b/src/buffers.c index 3ca949c8..6cbe0b8a 100644 --- a/src/buffers.c +++ b/src/buffers.c @@ -1,4 +1,4 @@ -#include "global.h" +#include "sys.h" u64 gDramStack[SP_DRAM_STACK_SIZE64]; u8 gOSYieldData[OS_YIELD_DATA_SIZE]; diff --git a/srcjp/buffers.c b/srcjp/buffers.c index 3ca949c8..6cbe0b8a 100644 --- a/srcjp/buffers.c +++ b/srcjp/buffers.c @@ -1,4 +1,4 @@ -#include "global.h" +#include "sys.h" u64 gDramStack[SP_DRAM_STACK_SIZE64]; u8 gOSYieldData[OS_YIELD_DATA_SIZE]; From 2c98d106a1c9765d8a9d45989db835b72ad3d17d Mon Sep 17 00:00:00 2001 From: petrie911 <69443847+petrie911@users.noreply.github.com> Date: Fri, 17 May 2024 12:22:51 -0500 Subject: [PATCH 106/151] Fix some names, use setup DL enum, add dma offsets to srcjp (#254) * cleanup * buffers * setupDLs and such --- .vscode/settings.json | 3 +- include/gfx.h | 34 +- include/sf64dma.h | 4 +- include/sys.h | 2 +- linker_scripts/jp/rev0/symbol_addrs.txt | 75 +- linker_scripts/jp/rev0/symbol_addrs_fix.txt | 7 + linker_scripts/jp/rev0/undefined_syms.ld | 5 - .../us/rev1/symbol_addrs_engine.txt | 34 +- src/1FA60.c | 4 - src/audio/audio_load.c | 2 +- src/driverominit.c | 4 + src/engine/fox_360.c | 12 +- src/engine/fox_beam.c | 18 +- src/engine/fox_bg.c | 12 +- src/engine/fox_demo.c | 6 +- src/engine/fox_display.c | 44 +- src/engine/fox_edisplay.c | 68 +- src/engine/fox_effect.c | 130 +-- src/engine/fox_enmy2.c | 22 +- src/engine/fox_game.c | 24 +- src/engine/fox_hud.c | 322 ++++--- src/engine/fox_load.c | 2 - src/engine/fox_radio.c | 36 +- src/engine/fox_std_lib.c | 82 +- src/engine/fox_versus.c | 151 ++-- src/mods/fpscounter.c | 2 +- src/mods/levelselect.c | 2 +- src/mods/object_ram.c | 2 +- src/mods/sfxjukebox.c | 2 +- src/mods/sfxjukebox2.c | 2 +- src/overlays/ovl_ending/fox_end1.c | 40 +- src/overlays/ovl_ending/fox_end2.c | 56 +- src/overlays/ovl_i1/fox_tr.c | 2 +- src/overlays/ovl_i1/fox_ve1.c | 22 +- src/overlays/ovl_i2/fox_sx.c | 8 +- src/overlays/ovl_i3/fox_a6.c | 20 +- src/overlays/ovl_i3/fox_aq.c | 76 +- src/overlays/ovl_i3/fox_so.c | 8 +- src/overlays/ovl_i3/fox_zo.c | 6 +- src/overlays/ovl_i4/fox_bo.c | 22 +- src/overlays/ovl_i4/fox_ka.c | 38 +- src/overlays/ovl_i4/fox_sz.c | 2 +- src/overlays/ovl_i5/fox_ma.c | 108 +-- src/overlays/ovl_i5/fox_ti.c | 62 +- src/overlays/ovl_i6/fox_andross.c | 46 +- src/overlays/ovl_i6/fox_sy.c | 2 +- src/overlays/ovl_menu/fox_map.c | 177 ++-- src/overlays/ovl_menu/fox_option.c | 358 ++++---- src/overlays/ovl_menu/fox_title.c | 128 +-- srcjp/1FA60.c | 3 - srcjp/dmatable.c | 86 ++ srcjp/driverominit.c | 4 + srcjp/engine/fox_load.c | 25 +- srcjp/engine/fox_load_inits.c | 810 ++++++++++++++++++ yamls/jp/rev0/main.yaml | 6 +- yamls/us/rev1/main.yaml | 2 +- 56 files changed, 2072 insertions(+), 1158 deletions(-) delete mode 100644 src/1FA60.c create mode 100644 src/driverominit.c delete mode 100644 srcjp/1FA60.c create mode 100644 srcjp/dmatable.c create mode 100644 srcjp/driverominit.c create mode 100644 srcjp/engine/fox_load_inits.c diff --git a/.vscode/settings.json b/.vscode/settings.json index 8d3a478f..d4e21e0e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -145,7 +145,8 @@ "semaphore": "c", "bgm.h": "c", "*.tcc": "c", - "object_ram.h": "c" + "object_ram.h": "c", + "sf64dma.h": "c" }, "C_Cpp_Runner.msvcBatchPath": "" } \ No newline at end of file diff --git a/include/gfx.h b/include/gfx.h index 249861e1..de8ba7ad 100644 --- a/include/gfx.h +++ b/include/gfx.h @@ -128,23 +128,23 @@ s32 Animation_GetFrameCount(Animation *animationSegment); void Animation_FindBoundingBox(Gfx* dList, s32 len, Vec3f *min, Vec3f *max, s32 *vtxFound, s32 *vtxCount, Vtx* *vtxList); void Animation_GetDListBoundingBox(Gfx *dList, s32 len, Vec3f *min, Vec3f *max); void Animation_GetSkeletonBoundingBox(Limb** skeletonSegment, Animation *animationSegment, s32 frame, Vec3f *min, Vec3f* max); -void TextureRect_4bCI(Gfx **gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_4bCI_Flip(Gfx **gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_4bCI_MirX(Gfx **gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_4bCI_MirY(Gfx **gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_8bCI(Gfx **gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_16bRGBA(Gfx **gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_16bRGBA_MirX(Gfx **gfxPtr, u16* 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); -void TextureRect_8bIA_FilpMirX(Gfx **gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_8bIA_FilpMirY(Gfx **gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_8bIA_MirX(Gfx **gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_8bIA_MirY(Gfx **gfxPtr, u8* 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); -void TextureRect_16bIA_MirX(Gfx **gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_16bIA_MirY(Gfx **gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_16bIA_MirXY(Gfx **gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_32bRGBA(Gfx **gfxPtr, u32* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void TextureRect_CI4(Gfx **gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void TextureRect_CI4_Flip(Gfx **gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void TextureRect_CI4_MirX(Gfx **gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void TextureRect_CI4_MirY(Gfx **gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void TextureRect_CI8(Gfx **gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void TextureRect_RGBA16(Gfx **gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void TextureRect_RGBA16_MirX(Gfx **gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void TextureRect_IA8(Gfx **gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void TextureRect_IA8_FlipMirX(Gfx **gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void TextureRect_IA8_FlipMirY(Gfx **gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void TextureRect_IA8_MirX(Gfx **gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void TextureRect_IA8_MirY(Gfx **gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void TextureRect_IA16(Gfx **gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void TextureRect_IA16_MirX(Gfx **gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void TextureRect_IA16_MirY(Gfx **gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void TextureRect_IA16_MirXY(Gfx **gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void TextureRect_RGBA32(Gfx **gfxPtr, u32* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); void Graphics_FillRectangle(Gfx **gfxPtr, s32 ulx, s32 uly, s32 lrx, s32 lry, u8 r, u8 g, u8 b, u8 a); u16* Graphics_SetupTextureRender(Gfx **gfxPtr, u8 width, u8 height); void Graphics_DisplayHUDNumber(s32 xPos, s32 yPos, s32 number); diff --git a/include/sf64dma.h b/include/sf64dma.h index 07b63739..97f4c48f 100644 --- a/include/sf64dma.h +++ b/include/sf64dma.h @@ -72,6 +72,8 @@ typedef struct { /* 0x4 */ void* end; } SegmentOffset; // size = 0x8 +#define SEGMENT_SIZE(segment) ((ptrdiff_t) ((uintptr_t) (segment).end - (uintptr_t) (segment).start)) + typedef struct { /* 0x00 */ SegmentOffset rom; /* 0x08 */ SegmentOffset bss; @@ -87,7 +89,7 @@ typedef struct { typedef struct { /* 0x0 */ void* vRomAddress; /* 0x4 */ SegmentOffset pRom; - /* 0xC */ s32 compFlag; + /* 0xC */ bool compFlag; } DmaEntry; // size = 0x10; extern DmaEntry gDmaTable[]; // 178A70 diff --git a/include/sys.h b/include/sys.h index 9c22f97c..fa45f79f 100644 --- a/include/sys.h +++ b/include/sys.h @@ -32,7 +32,7 @@ void Lib_FillScreen(u8 setFill); void Memory_FreeAll(void); void* Memory_Allocate(s32); -OSPiHandle * func_8001EE60(void); +OSPiHandle * osDriveRomInit(void); void RdRam_CheckIPL3(void); void Mio0_Decompress(void* header, u8* dst); s32 vsprintf(char* dst, const char* fmt, va_list args); diff --git a/linker_scripts/jp/rev0/symbol_addrs.txt b/linker_scripts/jp/rev0/symbol_addrs.txt index a9059a64..4160dfdf 100644 --- a/linker_scripts/jp/rev0/symbol_addrs.txt +++ b/linker_scripts/jp/rev0/symbol_addrs.txt @@ -376,10 +376,12 @@ func_8001EE14 = 0x8001EE14; func_8001EE6C = 0x8001EE6C; func_8001EEE0 = 0x8001EEE0; func_8001EF1C = 0x8001EF1C; -func_8001EF40 = 0x8001EF40; -func_8001EF50 = 0x8001EF50; -func_8001EFF0 = 0x8001EFF0; +osDriveRomInit = 0x8001EF40; + +Mio0_Decompress = 0x8001EF50; +RdRam_CheckIPL3 = 0x8001EFF0; altIPL3Start = 0x8001F0A0; + func_8001FAC0 = 0x8001FAC0; func_8001FAE4 = 0x8001FAE4; func_8001FB34 = 0x8001FB34; @@ -1892,37 +1894,38 @@ D_800C6F24 = 0x800C6F24; D_800C6F28 = 0x800C6F28; D_800C6F2C = 0x800C6F2C; D_800C6F3C = 0x800C6F3C; -D_800C6F50 = 0x800C6F50; -D_800C6F54 = 0x800C6F54; -D_800C6FEC = 0x800C6FEC; -D_800C737C = 0x800C737C; -D_800C7414 = 0x800C7414; -D_800C74AC = 0x800C74AC; -D_800C7544 = 0x800C7544; -D_800C75DC = 0x800C75DC; -D_800C7674 = 0x800C7674; -D_800C77A4 = 0x800C77A4; -D_800C7B34 = 0x800C7B34; -D_800C7C64 = 0x800C7C64; -D_800C7CFC = 0x800C7CFC; -D_800C7D94 = 0x800C7D94; -D_800C7E2C = 0x800C7E2C; -D_800C7F5C = 0x800C7F5C; -D_800C7FF4 = 0x800C7FF4; -D_800C808C = 0x800C808C; -D_800C8124 = 0x800C8124; -D_800C81BC = 0x800C81BC; -D_800C8254 = 0x800C8254; -D_800C82EC = 0x800C82EC; -D_800C841C = 0x800C841C; -D_800C84B4 = 0x800C84B4; -D_800C854C = 0x800C854C; -D_800C85E4 = 0x800C85E4; -D_800C8714 = 0x800C8714; -D_800C87AC = 0x800C87AC; -D_800C8974 = 0x800C8974; -D_800C8978 = 0x800C8978; -D_800C8994 = 0x800C8994; + +// fox_load data +sFillTimer = 0x800C6F50; +sNoOvl_Logo = 0x800C6F54; +sOvlending_Ending = 0x800C6FEC; +sOvlmenu_Title = 0x800C737C; +sOvlmenu_Option = 0x800C7414; +sOvlmenu_Map = 0x800C74AC; +sOvlmenu_GameOver = 0x800C7544; +sOvli1_Corneria = 0x800C75DC; +sOvli2_Meteo = 0x800C7674; +sOvli5_Titania = 0x800C77A4; +sOvli2_SectorX = 0x800C7B34; +sOvli4_SectorZ = 0x800C7C64; +sOvli3_Aquas = 0x800C7CFC; +sOvli3_Area6 = 0x800C7D94; +sOvli4_Fortuna = 0x800C7E2C; +sOvli3_Unk4 = 0x800C7F5C; +sOvli6_SectorY = 0x800C7FF4; +sOvli3_Solar = 0x800C808C; +sOvli3_Zoness = 0x800C8124; +sOvli1_Venom1 = 0x800C81BC; +sOvli6_Andross = 0x800C8254; +sOvli6_Venom2 = 0x800C82EC; +sOvli2_Setup20 = 0x800C841C; +sOvli4_Bolse = 0x800C84B4; +sOvli4_Katina = 0x800C854C; +sOvli5_Macbeth = 0x800C85E4; +sOvli1_Training = 0x800C8714; +sOvli2_Versus = 0x800C87AC; +sCurrentScene = 0x800C8974;//size:0x98 + D_800C8A10 = 0x800C8A10; D_800C8A2C = 0x800C8A2C; D_800C8A48 = 0x800C8A48; @@ -4124,8 +4127,7 @@ D_8017E10F = 0x8017E10F; D_8017E110 = 0x8017E110; D_8017E111 = 0x8017E111; D_8017E112 = 0x8017E112; -D_8017E210 = 0x8017E210; -D_8017E218 = 0x8017E218; +gDmaTable = 0x8017E210; //size:0x590 func_i1_8017E7A0 = 0x8017E7A0; //segment:ovl_i1 func_i1_8017E7B0 = 0x8017E7B0; //segment:ovl_i1 @@ -7279,3 +7281,4 @@ gTextureRenderBuffer = 0x80387800; //size:0x7880 segment:buffers defined:true gFillBuffer = 0x8038F080; //size:0x780 segment:buffers defined:true gFrameBuffers = 0x8038F800; //size:0x70800 segment:buffers defined:true D_8038F300 = 0x8038F300; //ignore:true + diff --git a/linker_scripts/jp/rev0/symbol_addrs_fix.txt b/linker_scripts/jp/rev0/symbol_addrs_fix.txt index a3b653f0..d91222db 100644 --- a/linker_scripts/jp/rev0/symbol_addrs_fix.txt +++ b/linker_scripts/jp/rev0/symbol_addrs_fix.txt @@ -75,7 +75,14 @@ D_ending_8018DC28 = 0x8018DC28; // force_migration:True segment:ovl_ending // i // hidden vars D_800C5118 = 0x800C5118; D_800DB5D4 = 0x800DB5D4; +sOvlUnused_Unk = 0x800C88DC; D_i5_801B1E6C = 0x801B1E6C; // segment:ovl_i5 // that stupid thing where i6 sets a value in ending D_i6_8018DD90 = 0x8018DD90; //ignore:true segment:ovl_i6 + +// dma symbols +dma_table_ROM_START = 0xE93C0; +audio_seq_ROM_START = 0xE9950; +audio_bank_ROM_START = 0x124920; +audio_table_ROM_START = 0x143A40; diff --git a/linker_scripts/jp/rev0/undefined_syms.ld b/linker_scripts/jp/rev0/undefined_syms.ld index 90349f3e..3091640e 100644 --- a/linker_scripts/jp/rev0/undefined_syms.ld +++ b/linker_scripts/jp/rev0/undefined_syms.ld @@ -1,8 +1,3 @@ -D_E93C0 = 0xE93C0; -D_E9950 = 0xE9950; -D_124920 = 0x124920; -D_143A40 = 0x143A40; - D_1000170 = 0x1000170; D_1001090 = 0x1001090; D_1001FB0 = 0x1001FB0; diff --git a/linker_scripts/us/rev1/symbol_addrs_engine.txt b/linker_scripts/us/rev1/symbol_addrs_engine.txt index 26590f58..961bd9ae 100644 --- a/linker_scripts/us/rev1/symbol_addrs_engine.txt +++ b/linker_scripts/us/rev1/symbol_addrs_engine.txt @@ -20,23 +20,23 @@ Math_SmoothStepToF = 0x8009BC2C; Math_SmoothStepToAngle = 0x8009BD38; Math_SmoothStepToVec3fArray = 0x8009BEEC; Math_PursueVec3f = 0x8009C124; -TextureRect_4bCI = 0x8009C320; -TextureRect_4bCI_Flip = 0x8009C674; -TextureRect_4bCI_MirX = 0x8009C9C8; -TextureRect_4bCI_MirY = 0x8009CD3C; -TextureRect_8bCI = 0x8009D0BC; -TextureRect_16bRGBA = 0x8009D418; -TextureRect_16bRGBA_MirX = 0x8009D6CC; -TextureRect_8bIA = 0x8009D994; -TextureRect_8bIA_FilpMirX = 0x8009DC4C; -TextureRect_8bIA_FilpMirY = 0x8009DF14; -TextureRect_8bIA_MirX = 0x8009E1E8; -TextureRect_8bIA_MirY = 0x8009E4B0; -TextureRect_16bIA = 0x8009E784; -TextureRect_16bIA_MirX = 0x8009EA38; -TextureRect_16bIA_MirY = 0x8009ED04; -TextureRect_16bIA_MirXY = 0x8009EFDC; -TextureRect_32bRGBA = 0x8009F2C0; +TextureRect_CI4 = 0x8009C320; +TextureRect_CI4_Flip = 0x8009C674; +TextureRect_CI4_MirX = 0x8009C9C8; +TextureRect_CI4_MirY = 0x8009CD3C; +TextureRect_CI8 = 0x8009D0BC; +TextureRect_RGBA16 = 0x8009D418; +TextureRect_RGBA16_MirX = 0x8009D6CC; +TextureRect_IA8 = 0x8009D994; +TextureRect_IA8_FlipMirX = 0x8009DC4C; +TextureRect_IA8_FlipMirY = 0x8009DF14; +TextureRect_IA8_MirX = 0x8009E1E8; +TextureRect_IA8_MirY = 0x8009E4B0; +TextureRect_IA16 = 0x8009E784; +TextureRect_IA16_MirX = 0x8009EA38; +TextureRect_IA16_MirY = 0x8009ED04; +TextureRect_IA16_MirXY = 0x8009EFDC; +TextureRect_RGBA32 = 0x8009F2C0; Graphics_FillRectangle = 0x8009F574; Math_Vec3fFromAngles = 0x8009F6CC; Math_RadToDeg = 0x8009F768; diff --git a/src/1FA60.c b/src/1FA60.c deleted file mode 100644 index d0808f93..00000000 --- a/src/1FA60.c +++ /dev/null @@ -1,4 +0,0 @@ -#include "sys.h" - -OSPiHandle* func_8001EE60(void) { -} diff --git a/src/audio/audio_load.c b/src/audio/audio_load.c index eb82eaf2..74e791c2 100644 --- a/src/audio/audio_load.c +++ b/src/audio/audio_load.c @@ -672,7 +672,7 @@ s32 AudioLoad_Dma(OSIoMesg* mesg, u32 priority, s32 direction, u32 devAddr, void handle = osCartRomInit(); break; case MEDIUM_DISK_DRIVE: - handle = func_8001EE60(); + handle = osDriveRomInit(); break; default: return 0; diff --git a/src/driverominit.c b/src/driverominit.c new file mode 100644 index 00000000..f0051b54 --- /dev/null +++ b/src/driverominit.c @@ -0,0 +1,4 @@ +#include "sys.h" + +OSPiHandle* osDriveRomInit(void) { +} diff --git a/src/engine/fox_360.c b/src/engine/fox_360.c index e026dd71..04935130 100644 --- a/src/engine/fox_360.c +++ b/src/engine/fox_360.c @@ -2135,7 +2135,7 @@ void ActorAllRange_DrawShield(Actor* this) { Matrix_Scale(gGfxMatrix, sp24, sp24 * 0.5f, sp24, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, gGameFrameCount * 3.0f * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - RCP_SetupDL(&gMasterDisp, 0x29); + RCP_SetupDL(&gMasterDisp, SETUPDL_41); if (gCurrentLevel == LEVEL_KATINA) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 128, 255, 255, sp20); } else if (gCurrentLevel == LEVEL_BOLSE) { @@ -2165,7 +2165,7 @@ void ActorAllRange_DrawBarrelRoll(Actor* this) { } Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, alpha); gDPSetEnvColor(gMasterDisp++, 0, 0, 160, alpha); gSPDisplayList(gMasterDisp++, D_101DC10); @@ -2177,16 +2177,16 @@ bool ActorAllRange_MissileOverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* po Actor* this = thisx; if ((this->timer_0C6 % 2) != 0) { - RCP_SetupDL(&gMasterDisp, 0x22); + RCP_SetupDL(&gMasterDisp, SETUPDL_34); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 128, 128, 255); } else { - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); } if ((limbIndex == 1) || (limbIndex == 3)) { rot->z += gGameFrameCount * 3.0f; } if ((limbIndex == 1) || (limbIndex == 2)) { - RCP_SetupDL(&gMasterDisp, 0x22); + RCP_SetupDL(&gMasterDisp, SETUPDL_34); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, (s32) gSzMissileR, (s32) gSzMissileG, (s32) gSzMissileB, 255); } return false; @@ -2209,7 +2209,7 @@ void ActorAllRange_Draw(ActorAllRange* this) { Matrix_SetGfxMtx(&gMasterDisp); } if ((this->timer_0C6 % 2) == 0) { - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); gSPFogPosition(gMasterDisp++, gFogNear, 1005); } switch (this->aiType) { diff --git a/src/engine/fox_beam.c b/src/engine/fox_beam.c index 5160d6f1..53b5276a 100644 --- a/src/engine/fox_beam.c +++ b/src/engine/fox_beam.c @@ -1259,7 +1259,7 @@ void PlayerShot_DrawShot(PlayerShot* shot) { break; case PLAYERSHOT_BOMB: if (shot->unk_5C == 0) { - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); gSPDisplayList(gMasterDisp++, D_10231A0); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); @@ -1273,7 +1273,7 @@ void PlayerShot_DrawShot(PlayerShot* shot) { } else { Matrix_Scale(gGfxMatrix, 1.2f, 1.2f, 1.2f, MTXF_APPLY); } - RCP_SetupDL(&gMasterDisp, 0x31); + RCP_SetupDL(&gMasterDisp, SETUPDL_49); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); if (gVersusMode) { switch (shot->sourceId) { @@ -1329,7 +1329,7 @@ void PlayerShot_DrawShot(PlayerShot* shot) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, D_800C9C00[shot->sourceId], D_800C9C04[shot->sourceId], D_800C9C08[shot->sourceId], 255); - RCP_SetupDL(&gMasterDisp, 0x31); + RCP_SetupDL(&gMasterDisp, SETUPDL_49); if (gLaserStrength[shot->sourceId] != LASERS_SINGLE) { Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 48.0f * M_DTOR, MTXF_APPLY); Matrix_Push(&gGfxMatrix); @@ -1377,7 +1377,7 @@ void PlayerShot_DrawShot(PlayerShot* shot) { case PLAYERSHOT_7: Matrix_Scale(gGfxMatrix, shot->scale, shot->scale, shot->scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - RCP_SetupDL(&gMasterDisp, 0x31); + RCP_SetupDL(&gMasterDisp, SETUPDL_49); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, D_800C9C00[shot->sourceId], D_800C9C04[shot->sourceId], D_800C9C08[shot->sourceId], 255); @@ -1399,14 +1399,14 @@ void PlayerShot_DrawShot(PlayerShot* shot) { Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if (gCurrentLevel == LEVEL_AQUAS) { - RCP_SetupDL(&gMasterDisp, 0x3C); + RCP_SetupDL(&gMasterDisp, SETUPDL_60); gSPDisplayList(gMasterDisp++, D_AQ_600DB80); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, shot->obj.pos.x, gGroundHeight, shot->obj.pos.z + gPathProgress, MTXF_APPLY); Matrix_Scale(gGfxMatrix, shot->vec_2C.x, shot->vec_2C.y, shot->vec_2C.z, MTXF_APPLY); - RCP_SetupDL(&gMasterDisp, 0x31); + RCP_SetupDL(&gMasterDisp, SETUPDL_49); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 32, 32, 0, shot->unk_58); gDPSetEnvColor(gMasterDisp++, 32, 16, 16, shot->unk_58); Matrix_SetGfxMtx(&gMasterDisp); @@ -1423,7 +1423,7 @@ void PlayerShot_DrawShot(PlayerShot* shot) { Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].camPitch, MTXF_APPLY); Matrix_Push(&gGfxMatrix); Matrix_Scale(gGfxMatrix, 20.0f, 20.0f, 20.0f, MTXF_APPLY); - RCP_SetupDL(&gMasterDisp, 0x31); + RCP_SetupDL(&gMasterDisp, SETUPDL_49); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); if (gVersusMode) { switch (shot->sourceId) { @@ -1458,7 +1458,7 @@ void PlayerShot_DrawShot(PlayerShot* shot) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); } else { - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); gSPDisplayList(gMasterDisp++, D_10231A0); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); @@ -1471,7 +1471,7 @@ void PlayerShot_DrawShot(PlayerShot* shot) { } else { Matrix_Scale(gGfxMatrix, 1.5f, 1.5f, 1.5f, MTXF_APPLY); } - RCP_SetupDL(&gMasterDisp, 0x31); + RCP_SetupDL(&gMasterDisp, SETUPDL_49); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255); gDPSetEnvColor(gMasterDisp++, 255, 128, 128, 255); Matrix_SetGfxMtx(&gMasterDisp); diff --git a/src/engine/fox_bg.c b/src/engine/fox_bg.c index dbded0a9..0fd101f0 100644 --- a/src/engine/fox_bg.c +++ b/src/engine/fox_bg.c @@ -267,7 +267,7 @@ void Background_DrawBackdrop(void) { } switch (levelType) { case LEVELTYPE_PLANET: - RCP_SetupDL(&gMasterDisp, 0x11); + RCP_SetupDL(&gMasterDisp, SETUPDL_17); switch (levelId) { case LEVEL_FORTUNA: case LEVEL_KATINA: @@ -360,7 +360,7 @@ void Background_DrawBackdrop(void) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_VE2_600F670); } else if ((gDrawBackdrop == 3) || (gDrawBackdrop == 4)) { - RCP_SetupDL(&gMasterDisp, 0x3E); + RCP_SetupDL(&gMasterDisp, SETUPDL_62); if (gDrawBackdrop == 4) { if ((gGameFrameCount & 8) == 0) { Math_SmoothStepToF(&gAndrossUnkBrightness, 0.0f, 1.0f, 30.0f, 0); @@ -386,7 +386,7 @@ void Background_DrawBackdrop(void) { gSPDisplayList(gMasterDisp++, D_VE2_60038E0); } else { fake_label: // fake - RCP_SetupDL(&gMasterDisp, 0x3E); + RCP_SetupDL(&gMasterDisp, SETUPDL_62); if (gDrawBackdrop == 5) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 64); } else { @@ -1003,7 +1003,7 @@ void Background_DrawGround(void) { } break; case LEVEL_AQUAS: - RCP_SetupDL(&gMasterDisp, 0x14); + RCP_SetupDL(&gMasterDisp, SETUPDL_20); sp1C0 = D_AQ_600AB10; gSPFogPosition(gMasterDisp++, gFogNear, gFogFar); if ((D_bg_8015F964 == 0) && ((gAqDrawMode == 0) || (gAqDrawMode == 2))) { @@ -1038,9 +1038,9 @@ void Background_DrawGround(void) { gDPSetupTile(gMasterDisp++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32, temp_fv0, temp_s0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD); if (gAqDrawMode != 0) { - RCP_SetupDL(&gMasterDisp, 0x2F); + RCP_SetupDL(&gMasterDisp, SETUPDL_47); } else { - RCP_SetupDL(&gMasterDisp, 0x25); + RCP_SetupDL(&gMasterDisp, SETUPDL_37); } if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && (gPlayer[0].csState < 2)) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index bf8ad01b..7b01c79f 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -2514,7 +2514,7 @@ void ActorCutscene_Draw(Actor* actor) { switch (actor->animFrame) { case 1000: - RCP_SetupDL(&gMasterDisp, 0x2D); + RCP_SetupDL(&gMasterDisp, SETUPDL_45); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, actor->unk_046); gSPDisplayList(gMasterDisp++, D_ENMY_PLANET_40018A0); @@ -2589,7 +2589,7 @@ void ActorCutscene_Draw(Actor* actor) { Display_SetSecondLight(&actor->obj.pos); if (actor->unk_046 != 0) { - RCP_SetupDL(&gMasterDisp, 0x37); + RCP_SetupDL(&gMasterDisp, SETUPDL_55); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); Rand_SetSeed(1, 29000, 9876); @@ -2650,7 +2650,7 @@ void ActorCutscene_Draw(Actor* actor) { Matrix_Push(&gGfxMatrix); - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); switch ((gGameFrameCount >> 3) % 4U) { case 0: diff --git a/src/engine/fox_display.c b/src/engine/fox_display.c index a2209ff1..db098152 100644 --- a/src/engine/fox_display.c +++ b/src/engine/fox_display.c @@ -58,7 +58,7 @@ void Display_DrawHelpAlert(void) { if ((sp5C.z < 0.0f) && (sp5C.z > -12000.0f) && (fabsf(sp5C.x) < fabsf(sp5C.z * 0.4f))) { sp7C = 1; } - RCP_SetupDL(&gMasterDisp, 0xC); + RCP_SetupDL(&gMasterDisp, SETUPDL_12); switch (gTeamHelpActor->aiType) { case AI360_PEPPY: gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 30, 0, 255); @@ -107,7 +107,7 @@ void Display_DrawHelpAlert(void) { } switch (sp7C) { case 0: - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255); if (sp78 < 0.0f) { Graphics_DisplaySmallText(43 - 19, 106, 1.0f, 1.0f, "HELP!!"); @@ -116,7 +116,7 @@ void Display_DrawHelpAlert(void) { } break; case 1: - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255); Graphics_DisplaySmallText(43 - 19, 106, 1.0f, 1.0f, "HELP!!"); Graphics_DisplaySmallText(SCREEN_WIDTH - 43 - 19, 106, 1.0f, 1.0f, "HELP!!"); @@ -336,7 +336,7 @@ void func_display_80052B80(Player* player) { } else { Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 0, 255, 0, 255); gSPDisplayList(gMasterDisp++, D_1024AC0); @@ -356,7 +356,7 @@ void func_display_80052D48(Player* player) { } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 192); gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 192); - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); } sp2C = player->unk_16C; if (sp2C > 0.2f) { @@ -418,7 +418,7 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, WingInfo* wings = (WingInfo*) wingData; if ((D_display_800CA22C != 0) && (gPlayer[0].unk_200 == 0)) { - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); func_display_8005314C(); } switch (limbIndex) { @@ -430,7 +430,7 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, *gfxPtr = D_arwing_3015120; } if ((D_display_800CA22C != 0) && ((gRightWingFlashTimer[0] % 2) != 0)) { - RCP_SetupDL(&gMasterDisp, 0x22); + RCP_SetupDL(&gMasterDisp, SETUPDL_34); func_display_8005314C(); if (gRightWingFlashTimer[0] > 1000) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 32, 32, 255, 255); @@ -445,7 +445,7 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, *gfxPtr = NULL; } if ((D_display_800CA22C != 0) && ((gRightWingFlashTimer[0] % 2) != 0)) { - RCP_SetupDL(&gMasterDisp, 0x22); + RCP_SetupDL(&gMasterDisp, SETUPDL_34); func_display_8005314C(); if (gRightWingFlashTimer[0] > 1000) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 32, 32, 255, 255); @@ -462,7 +462,7 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, *gfxPtr = D_arwing_3014BF0; } if ((D_display_800CA22C != 0) && ((gLeftWingFlashTimer[0] % 2) != 0)) { - RCP_SetupDL(&gMasterDisp, 0x22); + RCP_SetupDL(&gMasterDisp, SETUPDL_34); func_display_8005314C(); if (gLeftWingFlashTimer[0] > 1000) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 32, 32, 255, 255); @@ -477,7 +477,7 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, *gfxPtr = NULL; } if ((D_display_800CA22C != 0) && ((gLeftWingFlashTimer[0] % 2) != 0)) { - RCP_SetupDL(&gMasterDisp, 0x22); + RCP_SetupDL(&gMasterDisp, SETUPDL_34); func_display_8005314C(); if (gLeftWingFlashTimer[0] > 1000) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 32, 32, 255, 255); @@ -664,7 +664,7 @@ void func_display_80053F7C(Player* player) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, translate->x, translate->y, translate->z, MTXF_APPLY); if (gChargeTimers[player->num] >= 20) { - RCP_SetupDL(&gMasterDisp, 0x3F); + RCP_SetupDL(&gMasterDisp, SETUPDL_63); if (i == 1) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 255); @@ -708,7 +708,7 @@ void func_display_80054280(Player* player, s32 arg1) { void func_display_80054300(Player* player) { Math_SmoothStepToF(&sPlayerShadowing, player->shadowing, 1.0f, 10.0f, 0.0f); - RCP_SetupDL(&gMasterDisp, 0x42); + RCP_SetupDL(&gMasterDisp, SETUPDL_66); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, (s32) sPlayerShadowing); if (player->groundPos.y > 30.0f) { gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); @@ -732,7 +732,7 @@ void func_display_80054300(Player* player) { Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 20.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if (gCurrentLevel == LEVEL_MACBETH) { - RCP_SetupDL(&gMasterDisp, 0x41); + RCP_SetupDL(&gMasterDisp, SETUPDL_65); } if (!gVersusMode) { gSPDisplayList(gMasterDisp++, D_landmaster_3008100); @@ -757,7 +757,7 @@ void func_display_80054300(Player* player) { } void Play_DrawEngineGlow(s32 levelType) { - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); switch (levelType) { @@ -838,7 +838,7 @@ void func_display_80054914(Player* player) { Matrix_RotateX(gGfxMatrix, M_PI, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, player->barrelRollAlpha); gDPSetEnvColor(gMasterDisp++, 0, 0, 160, player->barrelRollAlpha); gSPDisplayList(gMasterDisp++, D_101DC10); @@ -853,7 +853,7 @@ void func_display_80054CA4(Player* player) { Matrix_Translate(gGfxMatrix, 0.0f, -5.0f, 10.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 2.5f, 1.6f, 2.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - RCP_SetupDL(&gMasterDisp, 0x44); + RCP_SetupDL(&gMasterDisp, SETUPDL_68); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 255, 255, (s32) gShieldAlpha[player->num]); gDPSetEnvColor(gMasterDisp++, 255, 0, 255, (s32) gShieldAlpha[player->num]); gSPDisplayList(gMasterDisp++, D_101CD70); @@ -874,7 +874,7 @@ void func_display_80054E80(Player* player) { f32 sp80; if (gChargeTimers[player->num] > 10) { - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); Matrix_Copy(gCalcMatrix, &D_display_80161418[player->num]); if (player->alternateView && (gLevelMode == LEVELMODE_ON_RAILS)) { Matrix_MultVec3f(gCalcMatrix, &spB8, &sp94); @@ -891,7 +891,7 @@ void func_display_80054E80(Player* player) { } else { Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 10.0f, MTXF_APPLY); } - RCP_SetupDL(&gMasterDisp, 0x31); + RCP_SetupDL(&gMasterDisp, SETUPDL_49); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 128); if (gVersusMode) { switch (player->num) { @@ -933,7 +933,7 @@ void func_display_80054E80(Player* player) { } if (gMuzzleFlashScale[player->num] > 0.1f) { Matrix_Push(&gGfxMatrix); - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); Matrix_Copy(gCalcMatrix, &D_display_80161418[player->num]); laserStrength = gLaserStrength[player->num]; if (player->wings.unk_14 > -8.0f) { @@ -991,7 +991,7 @@ void func_display_80055788(Player* player) { f32 sp54; if (gChargeTimers[player->num] > 10) { - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); Matrix_Push(&gGfxMatrix); sp54 = gChargeTimers[player->num] / 20.0f; Matrix_Translate(gGfxMatrix, D_display_80161548[player->num].x, D_display_80161548[player->num].y, @@ -999,7 +999,7 @@ void func_display_80055788(Player* player) { Matrix_Scale(gGfxMatrix, sp54, sp54, 1.0f, MTXF_APPLY); Matrix_Push(&gGfxMatrix); Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 10.0f, MTXF_APPLY); - RCP_SetupDL(&gMasterDisp, 0x31); + RCP_SetupDL(&gMasterDisp, SETUPDL_49); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 128); if (gVersusMode) { switch (player->num) { @@ -1443,7 +1443,7 @@ void func_display_80057504(void) { Matrix_Scale(gGfxMatrix, var_fs0 * 1.5f, var_fs0 * 1.5f, 1.0f, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, D_display_801615A8[i] * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 255); gSPDisplayList(gMasterDisp++, D_1024F60); diff --git a/src/engine/fox_edisplay.c b/src/engine/fox_edisplay.c index 56d9ac26..5a5e4c85 100644 --- a/src/engine/fox_edisplay.c +++ b/src/engine/fox_edisplay.c @@ -51,7 +51,7 @@ void Graphics_SetScaleMtx(f32 scale) { } void Sprite168_Draw(Sprite168* this) { - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 60); RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } @@ -276,26 +276,26 @@ void ActorDebris_Draw(ActorDebris* this) { case 0: break; case 1: - RCP_SetupDL(&gMasterDisp, 0x3D); + RCP_SetupDL(&gMasterDisp, SETUPDL_61); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); break; case 2: - RCP_SetupDL(&gMasterDisp, 0x39); + RCP_SetupDL(&gMasterDisp, SETUPDL_57); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); break; case 3: - RCP_SetupDL(&gMasterDisp, 0x21); + RCP_SetupDL(&gMasterDisp, SETUPDL_33); break; } if (gCurrentLevel != LEVEL_SOLAR) { gSPDisplayList(gMasterDisp++, D_TI_801B769C[this->unk_046]); } else { if (gBosses[0].fwork[3] < 4800.0f) { - RCP_SetupDL(&gMasterDisp, 0x1E); + RCP_SetupDL(&gMasterDisp, SETUPDL_30); gDPSetFogColor(gMasterDisp++, 64, 32, 32, gFogAlpha); gSPFogPosition(gMasterDisp++, gFogNear, gFogFar); } else { - RCP_SetupDL(&gMasterDisp, 0x1E); + RCP_SetupDL(&gMasterDisp, SETUPDL_30); gDPSetFogColor(gMasterDisp++, 16, 16, 16, gFogAlpha); gSPFogPosition(gMasterDisp++, gFogNear, gFogFar); } @@ -324,7 +324,7 @@ void ActorDebris_Draw(ActorDebris* this) { break; case 46: if ((this->unk_048 == 2) || (this->unk_048 == 3) || (this->unk_048 == 4)) { - RCP_SetupDL(&gMasterDisp, 0x21); + RCP_SetupDL(&gMasterDisp, SETUPDL_33); } gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_TI_801B7584[this->unk_048]); @@ -343,10 +343,10 @@ void ActorDebris_Draw(ActorDebris* this) { case 50: Graphics_SetScaleMtx(0.7f); if (this->iwork[1] == 1) { - RCP_SetupDL(&gMasterDisp, 0x1E); + RCP_SetupDL(&gMasterDisp, SETUPDL_30); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } else if (this->iwork[1] == 2) { - RCP_SetupDL(&gMasterDisp, 0x1E); + RCP_SetupDL(&gMasterDisp, SETUPDL_30); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); Graphics_SetScaleMtx(0.7f); } @@ -365,7 +365,7 @@ void ActorDebris_Draw(ActorDebris* this) { break; } if (this->iwork[1] != 0) { - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); Graphics_SetScaleMtx(0.7f); } break; @@ -391,7 +391,7 @@ void ActorDebris_Draw(ActorDebris* this) { break; case 56: Graphics_SetScaleMtx(this->scale); - RCP_SetupDL(&gMasterDisp, 0x29); + RCP_SetupDL(&gMasterDisp, SETUPDL_41); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 191, 255, 223, 255); gSPDisplayList(gMasterDisp++, D_edisplay_800CFC64[this->unk_048]); @@ -633,7 +633,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_102A8A0); } - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); break; case OBJ_ACTOR_CUTSCENE: case OBJ_ACTOR_TEAM_BOSS: @@ -646,7 +646,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { gSPDisplayList(gMasterDisp++, D_102A010); break; case EVID_81: - RCP_SetupDL(&gMasterDisp, 0x30); + RCP_SetupDL(&gMasterDisp, SETUPDL_48); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 255); temp_fv0 = gActors[index].fwork[15] * 3.0f; @@ -672,7 +672,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { break; case OBJ_BOSS_KA: if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) { - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 200); } Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); @@ -710,7 +710,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { break; case OBJ_ACTOR_230: RCP_SetupDL_48(); - RCP_SetupDL(&gMasterDisp, 0x45); + RCP_SetupDL(&gMasterDisp, SETUPDL_69); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 0); @@ -722,7 +722,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { gSPDisplayList(gMasterDisp++, D_1024AC0); break; case OBJ_ACTOR_229: - RCP_SetupDL(&gMasterDisp, 0x44); + RCP_SetupDL(&gMasterDisp, SETUPDL_68); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 0); @@ -736,7 +736,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { gSPDisplayList(gMasterDisp++, D_1024AC0); break; case OBJ_ACTOR_231: - RCP_SetupDL(&gMasterDisp, 0x45); + RCP_SetupDL(&gMasterDisp, SETUPDL_69); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 0); Matrix_RotateX(gGfxMatrix, gActors[index].fwork[1], MTXF_APPLY); @@ -766,7 +766,7 @@ void ItemCheckpoint_Draw(ItemCheckpoint* this) { if (((gGameFrameCount & 0x18) != 0) && (this->state == 0)) { Matrix_Push(&gGfxMatrix); - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255); Matrix_Scale(gGfxMatrix, 3.2f, 3.2f, 3.2f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -775,7 +775,7 @@ void ItemCheckpoint_Draw(ItemCheckpoint* this) { gDPSetTextureFilter(gMasterDisp++, G_TF_BILERP); Matrix_Pop(&gGfxMatrix); } - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); gSPTexture(gMasterDisp++, 2000, 2000, 0, G_TX_RENDERTILE, G_ON); gSPSetGeometryMode(gMasterDisp++, G_TEXTURE_GEN); Matrix_RotateZ(gGfxMatrix, this->unk_58 * M_DTOR, MTXF_APPLY); @@ -793,7 +793,7 @@ void ItemCheckpoint_Draw(ItemCheckpoint* this) { } void ItemSilverRing_Draw(ItemSilverRing* this) { - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); gSPTexture(gMasterDisp++, 3000, 0, 0, G_TX_RENDERTILE, G_ON); gSPSetGeometryMode(gMasterDisp++, G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR); Graphics_SetScaleMtx(this->width); @@ -802,7 +802,7 @@ void ItemSilverRing_Draw(ItemSilverRing* this) { } void ItemSilverStar_Draw(ItemSilverStar* this) { - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); gSPTexture(gMasterDisp++, 3000, 0, 0, G_TX_RENDERTILE, G_ON); gSPSetGeometryMode(gMasterDisp++, G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR); Graphics_SetScaleMtx(this->width); @@ -811,7 +811,7 @@ void ItemSilverStar_Draw(ItemSilverStar* this) { } void ItemGoldRing_Draw(ItemGoldRing* this) { - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); gSPTexture(gMasterDisp++, 1900, 1700, 0, G_TX_RENDERTILE, G_ON); gSPSetGeometryMode(gMasterDisp++, G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR); Graphics_SetScaleMtx(this->width); @@ -825,12 +825,12 @@ void ItemBomb_Draw(ItemBomb* this) { gSPDisplayList(gMasterDisp++, D_blue_marine_3005980); } else { Graphics_SetScaleMtx(this->width * 0.1f); - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); gSPTexture(gMasterDisp++, 2000, 2000, 0, G_TX_RENDERTILE, G_ON); gSPSetGeometryMode(gMasterDisp++, G_TEXTURE_GEN); gSPDisplayList(gMasterDisp++, D_10231A0); gSPClearGeometryMode(gMasterDisp++, G_TEXTURE_GEN); - RCP_SetupDL(&gMasterDisp, 0x1B); + RCP_SetupDL(&gMasterDisp, SETUPDL_27); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); gSPDisplayList(gMasterDisp++, D_1022E80); } @@ -838,12 +838,12 @@ void ItemBomb_Draw(ItemBomb* this) { void ItemLasers_Draw(ItemLasers* this) { Graphics_SetScaleMtx(this->width * 0.1f); - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); gSPTexture(gMasterDisp++, 2000, 2000, 0, G_TX_RENDERTILE, G_ON); gSPSetGeometryMode(gMasterDisp++, G_TEXTURE_GEN); gSPDisplayList(gMasterDisp++, D_1019820); gSPClearGeometryMode(gMasterDisp++, G_TEXTURE_GEN); - RCP_SetupDL(&gMasterDisp, 0x1B); + RCP_SetupDL(&gMasterDisp, SETUPDL_27); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); gSPDisplayList(gMasterDisp++, D_101A8E0); } @@ -856,7 +856,7 @@ void ItemMeteoWarp_Draw(ItemMeteoWarp* this) { 180.0f) / M_PI; if (this->state != 0) { - RCP_SetupDL(&gMasterDisp, 0x29); + RCP_SetupDL(&gMasterDisp, SETUPDL_41); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, this->unk_44); } else { RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); @@ -1315,7 +1315,7 @@ void ActorAllRange_DrawShadow(Actor* actor) { } void Object_DrawShadow(s32 index, Object* obj) { - RCP_SetupDL(&gMasterDisp, 0x42); + RCP_SetupDL(&gMasterDisp, SETUPDL_66); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 180); if (obj->id == OBJ_ACTOR_ALLRANGE) { ActorAllRange_DrawShadow(&gActors[index]); @@ -1668,7 +1668,7 @@ void Object_DrawAll(s32 arg0) { for (i = 0, item = gItems; i < ARRAY_COUNT(gItems); i++, item++) { if (item->obj.status >= OBJ_ACTIVE) { Matrix_Push(&gGfxMatrix); - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); Object_SetCullDirection(arg0); Item_Draw(item, arg0); Matrix_Pop(&gGfxMatrix); @@ -1683,7 +1683,7 @@ void Effect_DrawAll(s32 arg0) { Boss* boss; Effect* effect; - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); for (i = 0, effect = gEffects; i < ARRAY_COUNT(gEffects); i++, effect++) { if (effect->obj.status >= OBJ_ACTIVE) { if (effect->info.unk_14 == 1) { @@ -1768,10 +1768,10 @@ void TexturedLine_Draw(void) { s32 i; if (gCurrentLevel == LEVEL_MACBETH) { - RCP_SetupDL(&gMasterDisp, 0x21); + RCP_SetupDL(&gMasterDisp, SETUPDL_33); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); } else if ((gCurrentLevel == LEVEL_AQUAS) || (gCurrentLevel == LEVEL_VENOM_ANDROSS)) { - RCP_SetupDL(&gMasterDisp, 0x29); + RCP_SetupDL(&gMasterDisp, SETUPDL_41); } else { RCP_SetupDL_14(); } @@ -1823,9 +1823,9 @@ void TexturedLine_DrawPath(s32 index) { TexturedLine* texLine = &gTexturedLines[index]; if (texLine->prim.a == 255) { - RCP_SetupDL(&gMasterDisp, 5); + RCP_SetupDL(&gMasterDisp, SETUPDL_5); } else { - RCP_SetupDL(&gMasterDisp, 0xE); + RCP_SetupDL(&gMasterDisp, SETUPDL_14); } gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, texLine->prim.r, texLine->prim.g, texLine->prim.b, texLine->prim.a); Matrix_Push(&gGfxMatrix); diff --git a/src/engine/fox_effect.c b/src/engine/fox_effect.c index 385455c4..ac5711fd 100644 --- a/src/engine/fox_effect.c +++ b/src/engine/fox_effect.c @@ -133,7 +133,7 @@ void BonusText_DrawAll(void) { BonusText* bonus; s32 i; - RCP_SetupDL(&gMasterDisp, 0x3E); + RCP_SetupDL(&gMasterDisp, SETUPDL_62); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); for (i = 0, bonus = gBonusText; i < ARRAY_COUNT(gBonusText); i++, bonus++) { @@ -210,7 +210,7 @@ void func_effect_80077A7C(Effect* effect) { Matrix_Translate(gGfxMatrix, 0.0f, 20.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ZO_6024220); - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); } void func_effect_80077B78(Effect* effect) { @@ -221,9 +221,9 @@ void func_effect_80077B84(Effect* effect) { if ((effect->scale1 == 71.0f) || ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) && (gCurrentLevel == LEVEL_CORNERIA))) { - RCP_SetupDL(&gMasterDisp, 0x26); + RCP_SetupDL(&gMasterDisp, SETUPDL_38); } else { - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); } gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_44); @@ -250,7 +250,7 @@ void func_effect_80077B84(Effect* effect) { break; case 6: if (gCurrentLevel == LEVEL_BOLSE) { - RCP_SetupDL(&gMasterDisp, 0x26); + RCP_SetupDL(&gMasterDisp, SETUPDL_38); } switch ((effect->index + gGameFrameCount) % 4U) { case 0: @@ -286,17 +286,17 @@ void func_effect_80077B84(Effect* effect) { } gSPDisplayList(gMasterDisp++, D_1024AC0); - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); } void func_effect_80078038(Effect* effect) { Graphics_SetScaleMtx(effect->scale2); RCP_SetupDL_49(); - RCP_SetupDL(&gMasterDisp, 0x26); + RCP_SetupDL(&gMasterDisp, SETUPDL_38); gDPSetPrimColor(gMasterDisp++, 0, 0, 64, 192, 255, effect->unk_44); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, effect->unk_44); gSPDisplayList(gMasterDisp++, D_1024AC0); - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); } // Possibly the little sparks of electricity that come off the arwing and landmaster when low on health @@ -381,12 +381,12 @@ void func_effect_800784B4(Effect* effect) { } void func_effect_80078550(Effect* effect) { - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); Graphics_SetScaleMtx(effect->scale2); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_4A); gDPSetEnvColor(gMasterDisp++, 101, 138, 153, 255); gSPDisplayList(gMasterDisp++, D_blue_marine_3000660); - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); } void func_effect_80078604(Effect* effect) { @@ -406,7 +406,7 @@ void func_effect_8007868C(Effect* effect) { } Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1029780); - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); } void func_effect_8007879C(Effect* effect) { @@ -416,7 +416,7 @@ void func_effect_8007879C(Effect* effect) { Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1029780); - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); } static s32 D_800D173C[] = { 255, 255, 255, 0, 0, 0, 255, 0, 255, 0, 0, 0, 255, 255, 0, 0, 0, 255, 0, 0 }; @@ -433,14 +433,14 @@ void func_effect_800788B0(Effect* effect) { break; case LEVEL_AQUAS: - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); temp_ft3 = Math_ModF(effect->index, 4.0f); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, (s32) effect->scale1); tmp = temp_ft3 * 4.0f; gDPSetEnvColor(gMasterDisp++, D_800D173C[tmp + 0], D_800D173C[tmp + 1], D_800D173C[tmp + 2], 255); Graphics_SetScaleMtx(effect->scale2); gSPDisplayList(gMasterDisp++, D_1024AC0); - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); break; } } @@ -463,7 +463,7 @@ void func_effect_80078AEC(Effect* effect) { void func_effect_80078B8C(Effect* effect) { RCP_SetupDL_21(); gSPDisplayList(gMasterDisp++, D_101ABD0); - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); } void func_effect_80078BE0(Effect* effect) { @@ -548,15 +548,15 @@ void func_effect_80078EBC(Effect* effect) { void func_effect_80078F78(Effect* effect) { if (effect->state != 0) { - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); } else { - RCP_SetupDL(&gMasterDisp, 0x3F); + RCP_SetupDL(&gMasterDisp, SETUPDL_63); } gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 255, 255, 0, 255); Graphics_SetScaleMtx(effect->scale2 * effect->scale1); gSPDisplayList(gMasterDisp++, D_101C2E0); - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); } void func_effect_8007905C(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2, u8 arg5) { @@ -716,7 +716,7 @@ void func_effect_800798F0(Effect* effect) { Display_SetSecondLight(&effect->obj.pos); } - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); if (gCurrentLevel == LEVEL_KATINA) { gSPFogPosition(gMasterDisp++, gFogNear, 1005); @@ -736,13 +736,13 @@ void func_effect_800798F0(Effect* effect) { break; case 2: - RCP_SetupDL(&gMasterDisp, 0x39); + RCP_SetupDL(&gMasterDisp, SETUPDL_57); if ((effect->index % 2) != 0) { gSPDisplayList(gMasterDisp++, D_MA_601A7A0); } else { gSPDisplayList(gMasterDisp++, D_MA_60223C0); } - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); break; case 7: @@ -764,7 +764,7 @@ void func_effect_800798F0(Effect* effect) { break; case 10: - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 255, 80, 0, 255); Graphics_SetScaleMtx(effect->scale1); @@ -825,7 +825,7 @@ void func_effect_800798F0(Effect* effect) { case LEVEL_AQUAS: Matrix_SetGfxMtx(&gMasterDisp); - RCP_SetupDL(&gMasterDisp, 0x3C); + RCP_SetupDL(&gMasterDisp, SETUPDL_60); gSPDisplayList(gMasterDisp++, D_AQ_600A220); break; @@ -855,16 +855,16 @@ void func_effect_800798F0(Effect* effect) { break; } Matrix_SetGfxMtx(&gMasterDisp); - RCP_SetupDL(&gMasterDisp, 0x39); + RCP_SetupDL(&gMasterDisp, SETUPDL_57); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_1021E20); - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); break; } break; } - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); if (gCurrentLevel == LEVEL_KATINA) { gSPFogPosition(gMasterDisp++, gFogNear, gFogFar); @@ -1045,14 +1045,14 @@ void func_effect_8007A994(Effect* effect) { static Gfx* D_800D178C[] = { D_TI_6003440, D_TI_60034E0, D_TI_6003580, D_TI_6003620, D_TI_60036C0, D_TI_6003760 }; void func_effect_8007AA60(Effect* effect) { - RCP_SetupDL(&gMasterDisp, 0x44); + RCP_SetupDL(&gMasterDisp, SETUPDL_68); gDPSetPrimColor(gMasterDisp++, 0, 0, 31, 10, 00, effect->unk_44); gDPSetEnvColor(gMasterDisp++, 141, 73, 5, 0); Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_800D178C[effect->unk_4C]); effect->unk_4C = effect->unk_48; - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); } void func_effect_8007AB50(Effect* effect) { @@ -1403,7 +1403,7 @@ void func_effect_8007B960(Effect* effect) { void func_effect_8007B9DC(Effect* effect) { //! DEBUG: Hold Z on controller 4 to set up a display list. if (gControllerHold[3].button & Z_TRIG) { - RCP_SetupDL(&gMasterDisp, 4); + RCP_SetupDL(&gMasterDisp, SETUPDL_4); } Graphics_SetScaleMtx(effect->scale2); @@ -1420,7 +1420,7 @@ void func_effect_8007B9DC(Effect* effect) { } //! DEBUG: Hold Z on controller 4 to set up a display list. if (gControllerHold[3].button & Z_TRIG) { - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); } } @@ -2166,7 +2166,7 @@ void func_effect_8007DAE4(Effect* effect) { Graphics_SetScaleMtx(effect->scale2); RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gSPDisplayList(gMasterDisp++, D_CO_6004900); - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); } void func_effect_8007DB70(Effect* effect) { @@ -2226,7 +2226,7 @@ void func_effect_8007DED4(Effect* effect) { Graphics_SetScaleMtx(effect->scale2); RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gSPDisplayList(gMasterDisp++, D_ENMY_PLANET_4008CE0); - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); break; case 1: @@ -2235,7 +2235,7 @@ void func_effect_8007DED4(Effect* effect) { RCP_SetupDL_40(); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_ENMY_PLANET_4008F70); - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); break; } } @@ -3050,7 +3050,7 @@ void func_effect_8008040C(Effect* effect) { void func_effect_8008092C(Effect* effect) { switch (effect->unk_44) { case 0: - RCP_SetupDL(&gMasterDisp, 0x31); + RCP_SetupDL(&gMasterDisp, SETUPDL_49); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 255); Matrix_Scale(gGfxMatrix, 4.0f, 2.0f, 4.0f, MTXF_APPLY); @@ -3059,7 +3059,7 @@ void func_effect_8008092C(Effect* effect) { break; case 1: - RCP_SetupDL(&gMasterDisp, 0x31); + RCP_SetupDL(&gMasterDisp, SETUPDL_49); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 255); Matrix_RotateZ(gGfxMatrix, 30.0f * M_DTOR, MTXF_APPLY); @@ -3148,7 +3148,7 @@ void func_effect_80080D04(Effect* effect) { } gSPDisplayList(gMasterDisp++, effect->unk_74); if (effect->unk_44 != 64) { - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); } break; @@ -3174,60 +3174,60 @@ void func_effect_80080D04(Effect* effect) { } if (effect->unk_44 != 64) { - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); } break; case 10: - RCP_SetupDL(&gMasterDisp, 0x41); + RCP_SetupDL(&gMasterDisp, SETUPDL_65); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_48); Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, effect->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_TI_A000000); - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); break; case 11: - RCP_SetupDL(&gMasterDisp, 0x44); + RCP_SetupDL(&gMasterDisp, SETUPDL_68); Graphics_SetScaleMtx(effect->scale2); gDPSetPrimColor(gMasterDisp++, 0, 0, 120, 60, 0, effect->unk_44); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 0); gSPDisplayList(gMasterDisp++, D_1023750); - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); break; case 12: Graphics_SetScaleMtx(effect->scale2); - RCP_SetupDL(&gMasterDisp, 0x17); + RCP_SetupDL(&gMasterDisp, SETUPDL_23); gSPDisplayList(gMasterDisp++, D_VE1_9013C20); - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); break; case 13: Graphics_SetScaleMtx(effect->scale2); - RCP_SetupDL(&gMasterDisp, 0x44); + RCP_SetupDL(&gMasterDisp, SETUPDL_68); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_44); gDPSetEnvColor(gMasterDisp++, 36, 45, 28, 0); gSPDisplayList(gMasterDisp++, D_1023750); - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); break; case 14: Graphics_SetScaleMtx(effect->scale2); - RCP_SetupDL(&gMasterDisp, 0x44); + RCP_SetupDL(&gMasterDisp, SETUPDL_68); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_44); gDPSetEnvColor(gMasterDisp++, 255, 255, 255, 0); gSPDisplayList(gMasterDisp++, D_1023750); - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); break; case 15: Graphics_SetScaleMtx(effect->scale2); - RCP_SetupDL(&gMasterDisp, 0x44); + RCP_SetupDL(&gMasterDisp, SETUPDL_68); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_4A); gDPSetEnvColor(gMasterDisp++, 36, 45, 28, 0); gSPDisplayList(gMasterDisp++, D_1023750); - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); break; case 16: @@ -3283,7 +3283,7 @@ void func_effect_80080D04(Effect* effect) { break; case 18: - RCP_SetupDL(&gMasterDisp, 0x30); + RCP_SetupDL(&gMasterDisp, SETUPDL_48); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 190, 255); gDPSetEnvColor(gMasterDisp++, 239, 15, 0, 255); Graphics_SetScaleMtx(effect->scale2); @@ -3858,7 +3858,7 @@ void func_effect_80082F78(Effect* effect) { switch (effect->state) { case 0: - RCP_SetupDL(&gMasterDisp, 0x31); + RCP_SetupDL(&gMasterDisp, SETUPDL_49); Matrix_Scale(gGfxMatrix, 0.7f, 0.7f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); @@ -3867,14 +3867,14 @@ void func_effect_80082F78(Effect* effect) { break; case 1: - RCP_SetupDL(&gMasterDisp, 0x29); + RCP_SetupDL(&gMasterDisp, SETUPDL_41); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); Graphics_SetScaleMtx(effect->scale2); gSPDisplayList(gMasterDisp++, D_101C2E0); break; case 2: - RCP_SetupDL(&gMasterDisp, 0x31); + RCP_SetupDL(&gMasterDisp, SETUPDL_49); Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); @@ -3889,7 +3889,7 @@ void func_effect_80082F78(Effect* effect) { case 4: Graphics_SetScaleMtx(effect->scale2); - RCP_SetupDL(&gMasterDisp, 0x44); + RCP_SetupDL(&gMasterDisp, SETUPDL_68); gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 0, effect->unk_4A); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 0); gSPDisplayList(gMasterDisp++, D_1023750); @@ -3898,7 +3898,7 @@ void func_effect_80082F78(Effect* effect) { case 5: case 7: Graphics_SetScaleMtx(effect->scale2); - RCP_SetupDL(&gMasterDisp, 0x3C); + RCP_SetupDL(&gMasterDisp, SETUPDL_60); if (gCurrentLevel == LEVEL_AQUAS) { gSPDisplayList(gMasterDisp++, D_AQ_600A220); } @@ -3912,13 +3912,13 @@ void func_effect_80082F78(Effect* effect) { if (gCurrentLevel == LEVEL_ZONESS) { Graphics_SetScaleMtx(effect->scale2); } - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 255, 0, effect->unk_4A); gSPDisplayList(gMasterDisp++, D_1023750); break; case 8: - RCP_SetupDL(&gMasterDisp, 0x31); + RCP_SetupDL(&gMasterDisp, SETUPDL_49); Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); @@ -3927,7 +3927,7 @@ void func_effect_80082F78(Effect* effect) { break; case 9: - RCP_SetupDL(&gMasterDisp, 0x31); + RCP_SetupDL(&gMasterDisp, SETUPDL_49); Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->scale1); @@ -3939,7 +3939,7 @@ void func_effect_80082F78(Effect* effect) { if (gPlayState != PLAY_PAUSE) { Texture_Scroll(D_A6_6012840, 16, 16, 0); } - RCP_SetupDL(&gMasterDisp, 0x35); + RCP_SetupDL(&gMasterDisp, SETUPDL_53); Matrix_Scale(gGfxMatrix, effect->unk_60.x, effect->unk_60.y, effect->unk_60.z, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); @@ -3947,7 +3947,7 @@ void func_effect_80082F78(Effect* effect) { break; case 11: - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0, 0, 111, 111, 111, (s32) effect->scale1); gDPSetEnvColor(gMasterDisp++, 255, 255, 255, 255); Graphics_SetScaleMtx(effect->scale2); @@ -3959,7 +3959,7 @@ void func_effect_80082F78(Effect* effect) { break; } - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); } void func_effect_800836C0(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 arg4, f32 scale) { @@ -4056,7 +4056,7 @@ void func_effect_80083B8C(Effect* effect) { Matrix_Scale(gGfxMatrix, effect->unk_60.x, effect->scale2 * effect->unk_60.y, effect->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ZO_601BAD0); - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); } void func_effect_80083C70(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 arg7, @@ -4190,19 +4190,19 @@ void func_effect_80084194(Effect* effect) { s32 tmp; if (gCurrentLevel != LEVEL_AQUAS) { - RCP_SetupDL(&gMasterDisp, 0x31); + RCP_SetupDL(&gMasterDisp, SETUPDL_49); Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); tmp = effect->unk_44 * 4; gDPSetEnvColor(gMasterDisp++, D_800D18F0[tmp + 0], D_800D18F0[tmp + 1], D_800D18F0[tmp + 2], 255); } else { - RCP_SetupDL(&gMasterDisp, 0x31); + RCP_SetupDL(&gMasterDisp, SETUPDL_49); Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, D_800D1950[effect->unk_44]); gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 255); } gSPDisplayList(gMasterDisp++, D_1024AC0); - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); } diff --git a/src/engine/fox_enmy2.c b/src/engine/fox_enmy2.c index 2628bb02..9be372f4 100644 --- a/src/engine/fox_enmy2.c +++ b/src/engine/fox_enmy2.c @@ -3812,7 +3812,7 @@ bool ActorEvent_OverrideLimbDraw2(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* Matrix_SetGfxMtx(&gMasterDisp); if (*dList != NULL) { - RCP_SetupDL(&gMasterDisp, 0x22); + RCP_SetupDL(&gMasterDisp, SETUPDL_34); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, var_s1, var_s1, 255); gSPDisplayList(gMasterDisp++, *dList); RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); @@ -3842,9 +3842,9 @@ bool ActorEvent_OverrideLimbDraw3(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* } s32 Scenery111_Draw(Scenery_111* this) { - RCP_SetupDL(&gMasterDisp, 0x3C); + RCP_SetupDL(&gMasterDisp, SETUPDL_60); gSPDisplayList(gMasterDisp++, D_SY_601AD70); - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); return 0; } @@ -3886,9 +3886,9 @@ void ActorEvent_Draw(ActorEvent* this) { } else if ((this->eventType == EVID_82) || (this->eventType == EVID_90) || ((this->eventType == EVID_6) && (gCurrentLevel == LEVEL_SOLAR))) { if ((this->timer_0C6 % 2) == 0) { - RCP_SetupDL(&gMasterDisp, 0x39); + RCP_SetupDL(&gMasterDisp, SETUPDL_57); } else { - RCP_SetupDL(&gMasterDisp, 0x3D); + RCP_SetupDL(&gMasterDisp, SETUPDL_61); } } @@ -3898,7 +3898,7 @@ void ActorEvent_Draw(ActorEvent* this) { case EVID_94: case EVID_95: case EVID_96: - RCP_SetupDL(&gMasterDisp, 0x22); + RCP_SetupDL(&gMasterDisp, SETUPDL_34); gDPSetTextureFilter(gMasterDisp++, G_TF_POINT); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, (s32) this->fwork[15], (s32) this->fwork[16], (s32) this->fwork[17], 255); @@ -4024,7 +4024,7 @@ void ActorEvent_Draw(ActorEvent* this) { RAND_FLOAT_CENTERED(200.0f) + this->obj.pos.z, RAND_FLOAT(1.5f) + 2.5f); } - RCP_SetupDL(&gMasterDisp, 0x39); + RCP_SetupDL(&gMasterDisp, SETUPDL_57); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_SX_6001950); } else { @@ -4090,7 +4090,7 @@ void ActorEvent_Draw(ActorEvent* this) { case EVID_METEO_PYRAMID_SHIP: gSPDisplayList(gMasterDisp++, D_ME_6008AA0); - RCP_SetupDL(&gMasterDisp, 0x35); + RCP_SetupDL(&gMasterDisp, SETUPDL_53); gSPDisplayList(gMasterDisp++, D_ME_6009E30); break; @@ -4143,13 +4143,13 @@ void ActorEvent_Draw(ActorEvent* this) { break; case EVID_AQ_STARFISH: - RCP_SetupDL(&gMasterDisp, 0x16); + RCP_SetupDL(&gMasterDisp, SETUPDL_22); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, this->unk_046, this->unk_046, this->unk_046, 255); gSPDisplayList(gMasterDisp++, D_AQ_6008970); break; case EVID_89: - RCP_SetupDL(&gMasterDisp, 0x15); + RCP_SetupDL(&gMasterDisp, SETUPDL_21); gSPDisplayList(gMasterDisp++, D_AQ_6000E10); break; @@ -4159,7 +4159,7 @@ void ActorEvent_Draw(ActorEvent* this) { break; case EVID_SX_WARP_ENMY: - RCP_SetupDL(&gMasterDisp, 0x23); + RCP_SetupDL(&gMasterDisp, SETUPDL_35); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 143); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 0); gSPDisplayList(gMasterDisp++, D_WZ_7000000); diff --git a/src/engine/fox_game.c b/src/engine/fox_game.c index cffc4ae4..6e3ea8bb 100644 --- a/src/engine/fox_game.c +++ b/src/engine/fox_game.c @@ -366,13 +366,13 @@ void Game_Update(void) { } break; case GSTATE_SHOW_LOGO: - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); - TextureRect_8bIA(&gMasterDisp, &gNintendoLogo[128 * 16 * 0], 128, 16, 100.0f, 86.0f, 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, &gNintendoLogo[128 * 16 * 1], 128, 16, 100.0f, 102.0f, 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, &gNintendoLogo[128 * 16 * 2], 128, 16, 100.0f, 118.0f, 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, &gNintendoLogo[128 * 16 * 3], 128, 16, 100.0f, 134.0f, 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, &gNintendoLogo[128 * 16 * 4], 128, 10, 100.0f, 150.0f, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 0], 128, 16, 100.0f, 86.0f, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 1], 128, 16, 100.0f, 102.0f, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 2], 128, 16, 100.0f, 118.0f, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 3], 128, 16, 100.0f, 134.0f, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 4], 128, 10, 100.0f, 150.0f, 1.0f, 1.0f); gGameState++; break; case GSTATE_CHECK_SAVE: @@ -389,13 +389,13 @@ void Game_Update(void) { Timer_CreateTask(MSEC_TO_CYCLES(1000), Timer_Increment, (s32*) &gGameState, 1); /* fallthrough */ case GSTATE_LOGO_WAIT: - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); - TextureRect_8bIA(&gMasterDisp, &gNintendoLogo[128 * 16 * 0], 128, 16, 100.0f, 86.0f, 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, &gNintendoLogo[128 * 16 * 1], 128, 16, 100.0f, 102.0f, 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, &gNintendoLogo[128 * 16 * 2], 128, 16, 100.0f, 118.0f, 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, &gNintendoLogo[128 * 16 * 3], 128, 16, 100.0f, 134.0f, 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, &gNintendoLogo[128 * 16 * 4], 128, 10, 100.0f, 150.0f, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 0], 128, 16, 100.0f, 86.0f, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 1], 128, 16, 100.0f, 102.0f, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 2], 128, 16, 100.0f, 118.0f, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 3], 128, 16, 100.0f, 134.0f, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 4], 128, 10, 100.0f, 150.0f, 1.0f, 1.0f); break; case GSTATE_START: gGameState = GSTATE_INIT; diff --git a/src/engine/fox_hud.c b/src/engine/fox_hud.c index 818a08fd..3f1d24fd 100644 --- a/src/engine/fox_hud.c +++ b/src/engine/fox_hud.c @@ -139,7 +139,7 @@ void func_hud_80084930(f32 arg0, f32 arg1, s32 arg2) { s32 var_v0; s32 i; - RCP_SetupDL(&gMasterDisp, 0x4E); + RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); player = gPlayer; @@ -157,14 +157,14 @@ void func_hud_80084930(f32 arg0, f32 arg1, s32 arg2) { break; } - TextureRect_4bCI(&gMasterDisp, D_800D1A58[var_t0], D_800D1A64[var_t0], 16, 16, arg0, arg1 - 2.0f, 1.0f, 1.0f); - TextureRect_4bCI(&gMasterDisp, D_1011ED0, D_1011F08, 16, 7, arg0 + 16.0f, arg1 + 7.0f, 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_800D1A58[var_t0], D_800D1A64[var_t0], 16, 16, arg0, arg1 - 2.0f, 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_1011ED0, D_1011F08, 16, 7, arg0 + 16.0f, arg1 + 7.0f, 1.0f, 1.0f); if (arg2 >= 0) { arg0 += 11.0f; arg1 -= 1.0f; - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); var_v0 = 10; @@ -194,7 +194,7 @@ void func_hud_80084B94(s32 arg0) { { -191.0f, -129.0f, -600.0f }, }; - RCP_SetupDL(&gMasterDisp, 0x24); + RCP_SetupDL(&gMasterDisp, SETUPDL_36); if (arg0 == 0) { for (i = 1; i < 4; i++) { if (((gTeamShields[i] != 0) || (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) && @@ -237,39 +237,39 @@ void func_hud_80084E78(Gfx** gfxP, u8* texture, u16* palette, u32 tWidth, u32 tH } void func_hud_800853A4(f32 xPos, f32 yPos, f32 xScale, f32 yScale) { - TextureRect_8bCI(&gMasterDisp, D_1013170, D_1013570, 24, 17, xPos, yPos, xScale, yScale); + TextureRect_CI8(&gMasterDisp, D_1013170, D_1013570, 24, 17, xPos, yPos, xScale, yScale); } void func_hud_80085404(f32 xPos, f32 yPos, f32 xScale, f32 yScale) { - TextureRect_4bCI(&gMasterDisp, D_1011280, D_10116A0, 48, 44, xPos, yPos, xScale, yScale); + TextureRect_CI4(&gMasterDisp, D_1011280, D_10116A0, 48, 44, xPos, yPos, xScale, yScale); } void func_hud_80085464(f32 arg0, f32 arg1) { - TextureRect_4bCI(&gMasterDisp, D_1011AC0, D_1011B90, 16, 26, arg0, arg1, 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_1011AC0, D_1011B90, 16, 26, arg0, arg1, 1.0f, 1.0f); } void func_hud_800854BC(f32 arg0, f32 arg1) { - TextureRect_4bCI(&gMasterDisp, D_1011BB0, D_1011C80, 16, 26, arg0, arg1, 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_1011BB0, D_1011C80, 16, 26, arg0, arg1, 1.0f, 1.0f); } void func_hud_80085514(f32 arg0, f32 arg1) { - TextureRect_4bCI(&gMasterDisp, D_1011CA0, D_1011D70, 16, 26, arg0, arg1, 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_1011CA0, D_1011D70, 16, 26, arg0, arg1, 1.0f, 1.0f); } void func_hud_8008556C(f32 arg0, f32 arg1) { - TextureRect_4bCI(&gMasterDisp, D_1011D90, D_1011E60, 16, 26, arg0, arg1, 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_1011D90, D_1011E60, 16, 26, arg0, arg1, 1.0f, 1.0f); } void func_hud_800855C4(f32 arg0, f32 arg1, f32 arg2, f32 arg3) { - TextureRect_8bIA_MirX(&gMasterDisp, D_1002280, 8, 12, arg0, arg1, arg2, arg3); + TextureRect_IA8_MirX(&gMasterDisp, D_1002280, 8, 12, arg0, arg1, arg2, arg3); } void func_hud_80085618(f32 arg0, f32 arg1, f32 arg2, f32 arg3) { - TextureRect_8bIA(&gMasterDisp, D_1002280, 8, 12, arg0, arg1, arg2, arg3); + TextureRect_IA8(&gMasterDisp, D_1002280, 8, 12, arg0, arg1, arg2, arg3); } void func_hud_8008566C(f32 x, f32 y, f32 arg2, f32 arg3) { - TextureRect_8bIA(&gMasterDisp, D_10030D0, 8, 12, x, y, arg2, arg3); + TextureRect_IA8(&gMasterDisp, D_10030D0, 8, 12, x, y, arg2, arg3); } void func_hud_800856C0(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4) { @@ -278,25 +278,25 @@ void func_hud_800856C0(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4) { void func_hud_80085740(f32 arg0, f32 arg1, f32 arg2, f32 arg3) { if (gVersusMode) { - TextureRect_8bIA(&gMasterDisp, D_versus_3000B20, 32, 5, arg0, arg1, arg2, arg3); + TextureRect_IA8(&gMasterDisp, D_versus_3000B20, 32, 5, arg0, arg1, arg2, arg3); } else { - TextureRect_8bIA(&gMasterDisp, D_1000E80, 48, 9, arg0, arg1, arg2, arg3); + TextureRect_IA8(&gMasterDisp, D_1000E80, 48, 9, arg0, arg1, arg2, arg3); } } void func_hud_800857DC(f32 arg0, f32 arg1, f32 arg2, f32 arg3) { if (gVersusMode) { - TextureRect_8bCI(&gMasterDisp, D_versus_300D3C0, D_versus_300D408, 24, 3, arg0, arg1, arg2, arg3); + TextureRect_CI8(&gMasterDisp, D_versus_300D3C0, D_versus_300D408, 24, 3, arg0, arg1, arg2, arg3); } else { - TextureRect_8bCI(&gMasterDisp, D_10128C0, D_1012988, 40, 5, arg0, arg1, arg2, arg3); + TextureRect_CI8(&gMasterDisp, D_10128C0, D_1012988, 40, 5, arg0, arg1, arg2, arg3); } } void func_hud_80085890(f32 arg0, f32 arg1, f32 arg2, f32 arg3) { if (gVersusMode) { - TextureRect_8bCI(&gMasterDisp, D_versus_300D350, D_versus_300D398, 24, 3, arg0, arg1, arg2, arg3); + TextureRect_CI8(&gMasterDisp, D_versus_300D350, D_versus_300D398, 24, 3, arg0, arg1, arg2, arg3); } else { - TextureRect_8bCI(&gMasterDisp, D_10127D0, D_1012898, 40, 5, arg0, arg1, arg2, arg3); + TextureRect_CI8(&gMasterDisp, D_10127D0, D_1012898, 40, 5, arg0, arg1, arg2, arg3); } } @@ -352,7 +352,7 @@ void func_hud_80085944(void) { for (i = 0; i < 3; i++) { switch (D_80161860[i + 1]) { case 0: - RCP_SetupDL(&gMasterDisp, 0x3E); + RCP_SetupDL(&gMasterDisp, SETUPDL_62); Matrix_Push(&gGfxMatrix); x = D_800D1AC4[i + 1]; @@ -382,7 +382,7 @@ void func_hud_80085944(void) { D_801618B0[i + 2] -= 0.15f; } - RCP_SetupDL(&gMasterDisp, 0x3E); + RCP_SetupDL(&gMasterDisp, SETUPDL_62); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); Matrix_Push(&gGfxMatrix); @@ -397,9 +397,9 @@ void func_hud_80085944(void) { if (D_80161900[i] < 7) { if (D_80161860[i + 1] == 2) { - RCP_SetupDL(&gMasterDisp, 0x3E); + RCP_SetupDL(&gMasterDisp, SETUPDL_62); } else { - RCP_SetupDL(&gMasterDisp, 0x24); + RCP_SetupDL(&gMasterDisp, SETUPDL_36); } Matrix_Push(&gGfxMatrix); @@ -456,7 +456,7 @@ void func_hud_80086110(f32 arg0, f32 arg1, s32 arg2) { f32 temp = 0.82f; s32 pad; - RCP_SetupDL(&gMasterDisp, 0x4B); + RCP_SetupDL(&gMasterDisp, SETUPDL_75); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); if (arg2 != 0) { @@ -465,7 +465,7 @@ void func_hud_80086110(f32 arg0, f32 arg1, s32 arg2) { if ((arg2 <= 0) && (arg2 != -2) && ((gPlayState == PLAY_PAUSE) || (gShowLevelClearStatusScreen == 1) || (gLevelStartStatusScreenTimer != 0))) { - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); if ((arg2 == 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { Graphics_DisplaySmallText(arg0 + (8.0f * temp) + 4.0f, arg1 + 2.0f, 1.0f, 1.0f, " OK "); @@ -474,7 +474,7 @@ void func_hud_80086110(f32 arg0, f32 arg1, s32 arg2) { } } - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); func_hud_80085618(arg0, arg1, temp, 1.0f); func_hud_800855C4(arg0 + (7.0f * temp) + (temp * 6.0f) * 8.0f, arg1, 1.0f, 1.0f); @@ -580,12 +580,12 @@ void func_hud_80086444(void) { } if (i != 9) { - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); for (j = 0; j < 19; j++) { - TextureRect_8bIA(&gMasterDisp, D_800D1C9C[i] + (D_800D1CA4[i] * j), D_800D1CA4[i], 1, D_800D1CB4[i], - D_800D1CBC[i] + j - 28.0f, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_800D1C9C[i] + (D_800D1CA4[i] * j), D_800D1CA4[i], 1, D_800D1CB4[i], + D_800D1CBC[i] + j - 28.0f, 1.0f, 1.0f); } } } @@ -652,21 +652,21 @@ void func_hud_80086664(f32 x, f32 y) { break; } - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); if ((j != 14) && (j != 15)) { - TextureRect_8bIA(&gMasterDisp, aTextMissionNo, 112, 19, x0 - 12.0f, y0 + 4.0f, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, aTextMissionNo, 112, 19, x0 - 12.0f, y0 + 4.0f, 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, D_800D1AEC[j].unk_00, D_800D1AEC[j].width, D_800D1AEC[j].height, x1 + 28.0f, - y1 + 4.0f, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_800D1AEC[j].unk_00, D_800D1AEC[j].width, D_800D1AEC[j].height, x1 + 28.0f, + y1 + 4.0f, 1.0f, 1.0f); } else { func_hud_80086444(); } for (i = 0; i < D_800D1AEC[j].unk_14; i++) { - TextureRect_8bIA(&gMasterDisp, D_800D1AEC[j].unk_0C + (D_800D1AEC[j].unk_10 * i), D_800D1AEC[j].unk_10, 1, x2, - y2 + i, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_800D1AEC[j].unk_0C + (D_800D1AEC[j].unk_10 * i), D_800D1AEC[j].unk_10, 1, x2, + y2 + i, 1.0f, 1.0f); } if ((gSavedObjectLoadIndex == 0) && (gAllRangeCheckpoint == 0) && (gCurrentLevel != LEVEL_VENOM_ANDROSS) && @@ -702,20 +702,20 @@ void func_hud_800869A0(f32 arg0, f32 arg1, s32 k, f32 arg3, s32 arg4, s32 arg5) for (i /= 10; i != 1; i /= 10) { j = k / i; if ((j != 0) || (var_s2 == true)) { - TextureRect_8bIA(&gMasterDisp, D_800D1CD4[j], 16, 15, arg0, arg1, arg3, arg3); + TextureRect_IA8(&gMasterDisp, D_800D1CD4[j], 16, 15, arg0, arg1, arg3, arg3); arg0 += 13.0f * arg3; k %= i; var_s2 = true; } } - TextureRect_8bIA(&gMasterDisp, D_800D1CD4[k], 16, 15, arg0, arg1, arg3, arg3); + TextureRect_IA8(&gMasterDisp, D_800D1CD4[k], 16, 15, arg0, arg1, arg3, arg3); } void func_hud_80086C08(f32 xPos, f32 yPos, f32 xScale, f32 yScale) { - RCP_SetupDL(&gMasterDisp, 0x4E); + RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, 60, 60, 128, 96); gDPSetAlphaDither(gMasterDisp++, G_AD_DISABLE); - TextureRect_8bCI(&gMasterDisp, D_1013170, D_1013570, 24, 17, xPos, yPos, xScale, yScale); + TextureRect_CI8(&gMasterDisp, D_1013170, D_1013570, 24, 17, xPos, yPos, xScale, yScale); } void HUD_DrawLevelStartStatusScreen(void) { @@ -854,7 +854,7 @@ void HUD_DrawLevelClearScreen(void) { j = func_hud_800863C8(); if (temp != 0) { - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); x = 98.0f; y = 64.0f; @@ -864,44 +864,44 @@ void HUD_DrawLevelClearScreen(void) { case 1: if (boolTemp) { for (i = 0; i < 11; i++) { - TextureRect_8bIA(&gMasterDisp, aTextPLISHED + (136 * 2 * i), 136, 2, x + 50.0f, y + 50.0f + (2 * i), - 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, aTextPLISHED + (136 * 2 * i), 136, 2, x + 50.0f, y + 50.0f + (2 * i), + 1.0f, 1.0f); } - TextureRect_8bIA(&gMasterDisp, aTextPLISHED + (136 * 2 * i), 136, 1, x + 50.0f, y + 50.0f + (2 * i), - 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, aTextPLISHED + (136 * 2 * i), 136, 1, x + 50.0f, y + 50.0f + (2 * i), + 1.0f, 1.0f); } else { for (i = 0; i < 10; i++) { - TextureRect_8bIA(&gMasterDisp, aTextLETE + (80 * 2 * i), 80, 2, x + 66.0f, y + 50.0f + (2 * i), - 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, aTextLETE + (80 * 2 * i), 80, 2, x + 66.0f, y + 50.0f + (2 * i), 1.0f, + 1.0f); } - TextureRect_8bIA(&gMasterDisp, aTextLETE + (80 * 2 * i), 80, 1, x + 66.0f, y + 50.0f + (2 * i), 1.0f, - 1.0f); + TextureRect_IA8(&gMasterDisp, aTextLETE + (80 * 2 * i), 80, 1, x + 66.0f, y + 50.0f + (2 * i), 1.0f, + 1.0f); } case 2: if (boolTemp) { for (i = 0; i < 11; i++) { - TextureRect_8bIA(&gMasterDisp, aTextACCOM + (120 * 2 * i), 120, 2, x - 62.0f, y + 50.0f + (2 * i), - 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, aTextACCOM + (120 * 2 * i), 120, 2, x - 62.0f, y + 50.0f + (2 * i), + 1.0f, 1.0f); } - TextureRect_8bIA(&gMasterDisp, aTextACCOM + (120 * 2 * i), 120, 1, x - 62.0f, y + 50.0f + (2 * i), 1.0f, - 1.0f); + TextureRect_IA8(&gMasterDisp, aTextACCOM + (120 * 2 * i), 120, 1, x - 62.0f, y + 50.0f + (2 * i), 1.0f, + 1.0f); } else { for (i = 0; i < 11; i++) { - TextureRect_8bIA(&gMasterDisp, aTextCOMP + (96 * 2 * i), 96, 2, x - 22.0f, y + 50.0f + (2 * i), - 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, aTextCOMP + (96 * 2 * i), 96, 2, x - 22.0f, y + 50.0f + (2 * i), 1.0f, + 1.0f); } - TextureRect_8bIA(&gMasterDisp, aTextCOMP + (96 * 2 * i), 96, 1, x - 22.0f, y + 50.0f + (2 * i), 1.0f, - 1.0f); + TextureRect_IA8(&gMasterDisp, aTextCOMP + (96 * 2 * i), 96, 1, x - 22.0f, y + 50.0f + (2 * i), 1.0f, + 1.0f); } case 3: - TextureRect_8bIA(&gMasterDisp, aTextMISSION, 128, 23, x, y + 25.0f, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, aTextMISSION, 128, 23, x, y + 25.0f, 1.0f, 1.0f); case 4: - TextureRect_8bIA(&gMasterDisp, aTextMissionNo, 112, 19, x, y, 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, D_800D1AEC[j].unk_00, D_800D1AEC[j].width, D_800D1AEC[j].height, x + 112.0f, - y, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, aTextMissionNo, 112, 19, x, y, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_800D1AEC[j].unk_00, D_800D1AEC[j].width, D_800D1AEC[j].height, x + 112.0f, + y, 1.0f, 1.0f); case 5: func_hud_80086C08(30.0f + D_800D1CFC, 60.0f, 10.97f, 4.78f); @@ -926,7 +926,7 @@ void func_hud_80087530(f32 x, f32 y, s32 number) { s32 i; s32 form; - RCP_SetupDL(&gMasterDisp, 0x4E); + RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); form = FORM_ARWING; @@ -968,8 +968,8 @@ void func_hud_80087530(f32 x, f32 y, s32 number) { } x2 += (2 - i) * 4; - TextureRect_4bCI(&gMasterDisp, D_800D1D00[form], D_800D1D0C[form], 16, 16, x0, y0, 1.0f, 1.0f); - TextureRect_4bCI(&gMasterDisp, D_1011ED0, D_1011F08, 16, 7, x1, y1, 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_800D1D00[form], D_800D1D0C[form], 16, 16, x0, y0, 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_1011ED0, D_1011F08, 16, 7, x1, y1, 1.0f, 1.0f); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); Graphics_DisplayHUDNumber(x2, y2, number); @@ -1010,11 +1010,11 @@ void func_hud_80087788(void) { func_hud_80086C08(x[j][0] - 6.0f, y[j][1] - 1.0f, 2.4f, 0.7f); - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_8bIA(&gMasterDisp, D_800D1D28[j], D_800D1D34[j], D_800D1D40[j], x[j][1], y[j][1], 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_800D1D28[j], D_800D1D34[j], D_800D1D40[j], x[j][1], y[j][1], 1.0f, 1.0f); - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); shield = gTeamShields[3 - j]; if (shield <= 0) { @@ -1024,11 +1024,11 @@ void func_hud_80087788(void) { } for (i = 0; i < 2; i++) { - TextureRect_16bRGBA(&gMasterDisp, D_800D1D18[j + 1] + (44 * 20 * i), 44, 20, x[j][0], - y[j][0] + (f32) (20 * i), 1.0f, 1.0f); + TextureRect_RGBA16(&gMasterDisp, D_800D1D18[j + 1] + (44 * 20 * i), 44, 20, x[j][0], + y[j][0] + (f32) (20 * i), 1.0f, 1.0f); } - TextureRect_16bRGBA(&gMasterDisp, D_800D1D18[j + 1] + (44 * 20 * 2), 44, 4, x[j][0], y[j][0] + 40.0f, 1.0f, - 1.0f); + TextureRect_RGBA16(&gMasterDisp, D_800D1D18[j + 1] + (44 * 20 * 2), 44, 4, x[j][0], y[j][0] + 40.0f, 1.0f, + 1.0f); func_hud_80086110(x[j][2], y[j][2], shield); } @@ -1226,17 +1226,17 @@ void HUD_DrawLevelClearStatusScreen(void) { } x4 += (4 - i) * 8; - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 90, 160, 200, 255); func_hud_800869A0(24.0f, 30.0f + 3.0f, D_801617C0[5], 1.0f, 0, 999); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_8bIA(&gMasterDisp, aTextEnemiesDown, 64, 25, x0, y0 + 4.0f, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, aTextEnemiesDown, 64, 25, x0, y0 + 4.0f, 1.0f, 1.0f); func_hud_800869A0(x1, y1 + 12.0f, D_801617C0[1], 1.0f, 1, 999); - TextureRect_8bIA(&gMasterDisp, aTextAccumTotal, 128, 10, x3, y3, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, aTextAccumTotal, 128, 10, x3, y3, 1.0f, 1.0f); func_hud_800869A0(x4 + 4.0f, y4 + 3.0f, D_801617C0[2], 1.00f, 1, 9999); @@ -1244,10 +1244,10 @@ void HUD_DrawLevelClearStatusScreen(void) { func_hud_80087530(232.0f, 90.0f, D_801617C0[3]); } - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_8bIA(&gMasterDisp, aTextStatusOfTeam, 120, 12, x6 - 8.0f, y6 + 10.0f, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, aTextStatusOfTeam, 120, 12, x6 - 8.0f, y6 + 10.0f, 1.0f, 1.0f); func_hud_80087788(); func_hud_80084B94(0); @@ -1367,7 +1367,7 @@ void func_hud_80088784(s32 arg0) { if (arg0 != 0) { arg0--; - RCP_SetupDL(&gMasterDisp, 0x24); + RCP_SetupDL(&gMasterDisp, SETUPDL_36); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, D_800D1DC8[arg0]); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 3.9f, -3.3f, -100.0f, MTXF_NEW); @@ -1637,17 +1637,17 @@ void func_hud_80088970(void) { break; } - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); for (i = 0; i < D_800D1AEC[j].unk_14; i++) { - TextureRect_8bIA(&gMasterDisp, D_800D1AEC[j].unk_0C + (D_800D1AEC[j].unk_10 * i), - D_800D1AEC[j].unk_10, 1, x2, y2 + i, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_800D1AEC[j].unk_0C + (D_800D1AEC[j].unk_10 * i), + D_800D1AEC[j].unk_10, 1, x2, y2 + i, 1.0f, 1.0f); } func_hud_80086C08(x1 - 10.0f, y0 - 4.0f, 4.7f, 2.8f); - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); if (D_80161810[1] == 0) { temp = (D_80161838[0] % 20); @@ -1662,7 +1662,7 @@ void func_hud_80088970(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 64, 64, 64, 255); } - TextureRect_8bIA(&gMasterDisp, D_1000000, 64, 10, x0 - 12.0f, y0, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_1000000, 64, 10, x0 - 12.0f, y0, 1.0f, 1.0f); if (D_80161810[1] == 1) { temp = (D_80161838[0] % 20); @@ -1678,12 +1678,12 @@ void func_hud_80088970(void) { } if (gCurrentLevel == LEVEL_TRAINING) { - TextureRect_8bIA(&gMasterDisp, D_TR_6000000, 96, 12, x1, y1, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_TR_6000000, 96, 12, x1, y1, 1.0f, 1.0f); } else { if (gLifeCount[gPlayerNum]) { - TextureRect_8bIA(&gMasterDisp, D_1000280, 96, 10, x1, y1, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_1000280, 96, 10, x1, y1, 1.0f, 1.0f); } else { - TextureRect_8bIA(&gMasterDisp, D_1000640, 96, 22, x1, y1, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_1000640, 96, 22, x1, y1, 1.0f, 1.0f); } } @@ -1708,7 +1708,7 @@ void func_hud_80088970(void) { } void func_hud_80089670(void) { - RCP_SetupDL(&gMasterDisp, 0x3E); + RCP_SetupDL(&gMasterDisp, SETUPDL_62); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); Matrix_Scale(gGfxMatrix, 18.64f, 21.04f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -1716,7 +1716,7 @@ void func_hud_80089670(void) { } void func_hud_80089710(void) { - RCP_SetupDL(&gMasterDisp, 0x3E); + RCP_SetupDL(&gMasterDisp, SETUPDL_62); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); Matrix_Scale(gGfxMatrix, 11.0f, 11.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -1724,7 +1724,7 @@ void func_hud_80089710(void) { } void func_hud_800897B0(void) { - RCP_SetupDL(&gMasterDisp, 0x3E); + RCP_SetupDL(&gMasterDisp, SETUPDL_62); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); Matrix_Scale(gGfxMatrix, 130.0f, 130.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -1732,7 +1732,7 @@ void func_hud_800897B0(void) { } void func_hud_80089850(void) { - RCP_SetupDL(&gMasterDisp, 0x3E); + RCP_SetupDL(&gMasterDisp, SETUPDL_62); gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 0, 255); Matrix_Scale(gGfxMatrix, 125.0f, 125.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -1740,7 +1740,7 @@ void func_hud_80089850(void) { } void func_hud_800898F0(void) { - RCP_SetupDL(&gMasterDisp, 1); + RCP_SetupDL(&gMasterDisp, SETUPDL_1); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 208, 80, 255); Matrix_Scale(gGfxMatrix, 30.0f, 30.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -1765,7 +1765,7 @@ void func_hud_80089994(s32 arg0) { var_fv2 = 54.0f; } - RCP_SetupDL(&gMasterDisp, 0x3E); + RCP_SetupDL(&gMasterDisp, SETUPDL_62); gDPSetPrimColor(gMasterDisp++, 0, 0, D_800D1E14[arg0][0], D_800D1E14[arg0][1], D_800D1E14[arg0][2], D_800D1E14[arg0][3]); Matrix_Scale(gGfxMatrix, var_fv1, var_fv2, 1.0f, MTXF_APPLY); @@ -1774,7 +1774,7 @@ void func_hud_80089994(s32 arg0) { } void func_hud_80089AF4(void) { - RCP_SetupDL(&gMasterDisp, 0x3E); + RCP_SetupDL(&gMasterDisp, SETUPDL_62); gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 0, 255); Matrix_Scale(gGfxMatrix, 54.0f, 54.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -1782,7 +1782,7 @@ void func_hud_80089AF4(void) { } void func_hud_80089B94(void) { - RCP_SetupDL(&gMasterDisp, 0x3E); + RCP_SetupDL(&gMasterDisp, SETUPDL_62); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 92, 92, 255); Matrix_Scale(gGfxMatrix, 54.0f, 54.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -1792,7 +1792,7 @@ void func_hud_80089B94(void) { void func_hud_80089C38(void) { s32 alpha; - RCP_SetupDL(&gMasterDisp, 0xC); + RCP_SetupDL(&gMasterDisp, SETUPDL_12); alpha = gGameFrameCount % 21; @@ -1810,7 +1810,7 @@ void func_hud_80089C38(void) { void func_hud_80089D28(void) { s32 gb; - RCP_SetupDL(&gMasterDisp, 1); + RCP_SetupDL(&gMasterDisp, SETUPDL_1); gb = gGameFrameCount % 21; @@ -1935,7 +1935,7 @@ void func_hud_8008A07C(f32 x, f32 y) { yScale1 = 1.70f; } - RCP_SetupDL(&gMasterDisp, 0x4E); + RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, 60, 60, 255, 170); func_hud_800853A4(xPos + 1.0f, yPos + 1.0f, xScale, yScale); @@ -2084,20 +2084,20 @@ s32 func_hud_8008A4DC(void) { ((gCurrentLevel == LEVEL_SECTOR_Z) || (gCurrentLevel == LEVEL_FORTUNA) || (gCurrentLevel == LEVEL_VENOM_2) || (gCurrentLevel == LEVEL_BOLSE) || (gCurrentLevel == LEVEL_SECTOR_Y) || (gCurrentLevel == LEVEL_KATINA))) { - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 128, 128, 128, 255); switch (gCurrentLevel) { case LEVEL_SECTOR_Z: - TextureRect_8bIA(&gMasterDisp, D_SZ_60012D0, 16, 9, 251.0f + D_800D1E10, 181.0f, 1.00f, 1.00f); + TextureRect_IA8(&gMasterDisp, D_SZ_60012D0, 16, 9, 251.0f + D_800D1E10, 181.0f, 1.00f, 1.00f); break; case LEVEL_FORTUNA: - TextureRect_8bIA(&gMasterDisp, D_FO_6001260, 16, 16, 251.0f + D_800D1E10, 178.0f, 1.00f, 1.00f); + TextureRect_IA8(&gMasterDisp, D_FO_6001260, 16, 16, 251.0f + D_800D1E10, 178.0f, 1.00f, 1.00f); break; case LEVEL_BOLSE: - TextureRect_8bIA(&gMasterDisp, D_BO_6000C80, 16, 16, 251.0f + D_800D1E10, 178.0f, 1.00f, 1.00f); + TextureRect_IA8(&gMasterDisp, D_BO_6000C80, 16, 16, 251.0f + D_800D1E10, 178.0f, 1.00f, 1.00f); break; case LEVEL_SECTOR_Y: @@ -2108,16 +2108,16 @@ s32 func_hud_8008A4DC(void) { if ((y < 150.0f) || (y > 206.0f)) { break; } - TextureRect_8bIA(&gMasterDisp, D_SY_6000840, 64, 64, 250.0f + D_800D1E10, temp, 0.25f, 0.25f); + TextureRect_IA8(&gMasterDisp, D_SY_6000840, 64, 64, 250.0f + D_800D1E10, temp, 0.25f, 0.25f); } break; case LEVEL_KATINA: - TextureRect_8bIA(&gMasterDisp, D_KA_6001260, 8, 8, 254.0f + D_800D1E10, 182.0f, 1.00f, 1.00f); + TextureRect_IA8(&gMasterDisp, D_KA_6001260, 8, 8, 254.0f + D_800D1E10, 182.0f, 1.00f, 1.00f); break; case LEVEL_VENOM_2: - TextureRect_8bIA(&gMasterDisp, D_VE2_6002890, 16, 16, 251.0f + D_800D1E10, 178.0f, 1.00f, 1.00f); + TextureRect_IA8(&gMasterDisp, D_VE2_6002890, 16, 16, 251.0f + D_800D1E10, 178.0f, 1.00f, 1.00f); break; } } @@ -2192,7 +2192,7 @@ s32 func_hud_8008AC54(s32 arg0) { void func_hud_8008AD94(void) { if (gGameState == GSTATE_PLAY) { - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); switch ((s32) gRadioMsgRadioId) { @@ -2283,7 +2283,7 @@ void func_hud_8008B1B0(void) { f32 temp = 142.0f; f32 temp2 = 18.0f; - RCP_SetupDL(&gMasterDisp, 0x4E); + RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); switch (D_80161790 / 2) { @@ -2377,10 +2377,10 @@ void func_hud_8008B2F0(void) { } void func_hud_8008B5B0(f32 x, f32 y) { - RCP_SetupDL(&gMasterDisp, 0x4B); + RCP_SetupDL(&gMasterDisp, SETUPDL_75); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); func_hud_800856C0(x + 8.0f, y + 2.0f, D_801617A8, 1.0f, D_801617AC); - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, D_800D1EB4, D_800D1EB8, D_800D1EBC, 255); func_hud_80085618(x, y, 1.0f, 1.0f); func_hud_800855C4(x + 7.0f + (D_801617A8 * 6.0f * 8.0f), y, 1.0f, 1.0f); @@ -2559,7 +2559,7 @@ void func_hud_8008BAE4(void) { } if ((D_80161788 != 0) || (D_8016178C != 0)) { - RCP_SetupDL(&gMasterDisp, 0xC); + RCP_SetupDL(&gMasterDisp, SETUPDL_12); gDPSetPrimColor(gMasterDisp++, 0, 0, r, g, b, alpha); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, -53.9f, -38.5f, -139.4f, MTXF_APPLY); @@ -2702,14 +2702,14 @@ void HUD_DisplaySmallNumber(f32 xPos, f32 yPos, f32 scale, s32 number) { for (i = 10; i != 1; i /= 10) { if ((xPos > 0.0f) && (yPos > 0.0f)) { - TextureRect_8bIA(&gMasterDisp, sSmallNumberTex[number / i], 16, 8, xPos, yPos, scale, scale); + TextureRect_IA8(&gMasterDisp, sSmallNumberTex[number / i], 16, 8, xPos, yPos, scale, scale); } xPos += 9.0f * scale; number %= i; } if ((xPos > 0.0f) && (yPos > 0.0f)) { - TextureRect_8bIA(&gMasterDisp, sSmallNumberTex[number / i], 16, 8, xPos, yPos, scale, scale); + TextureRect_IA8(&gMasterDisp, sSmallNumberTex[number / i], 16, 8, xPos, yPos, scale, scale); } } @@ -2723,10 +2723,10 @@ void func_hud_8008C5C8(f32 arg0, f32 arg1, f32 arg2, s32 arg3) { s32 i; for (i = 0; i < 2; i++) { - TextureRect_16bRGBA(&gMasterDisp, D_800D1EE8[arg3] + (44 * 20 * i), 44, 20, arg0, (20 * i * arg2) + arg1, arg2, - arg2); + TextureRect_RGBA16(&gMasterDisp, D_800D1EE8[arg3] + (44 * 20 * i), 44, 20, arg0, (20 * i * arg2) + arg1, arg2, + arg2); } - TextureRect_16bRGBA(&gMasterDisp, D_800D1EE8[arg3] + 44 * 20 * 2, 44, 4, arg0, (40.0f * arg2) + arg1, arg2, arg2); + TextureRect_RGBA16(&gMasterDisp, D_800D1EE8[arg3] + 44 * 20 * 2, 44, 4, arg0, (40.0f * arg2) + arg1, arg2, arg2); } void func_hud_8008C6F4(s32 idx, s32 arg1) { @@ -2761,7 +2761,7 @@ void func_hud_8008C6F4(s32 idx, s32 arg1) { Matrix_Scale(gGfxMatrix, 0.026f, 0.026f, 0.026f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - RCP_SetupDL(&gMasterDisp, 0x3E); + RCP_SetupDL(&gMasterDisp, SETUPDL_62); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 150); gSPDisplayList(gMasterDisp++, D_1024990); @@ -2802,7 +2802,7 @@ s32 HUD_dummy_8008CB8C(void) { } void func_hud_8008CB98(f32 arg0, f32 arg1, f32 arg2) { - TextureRect_8bIA(&gMasterDisp, D_versus_30013E0, 8, 8, arg0, arg1, arg2, arg2); + TextureRect_IA8(&gMasterDisp, D_versus_30013E0, 8, 8, arg0, arg1, arg2, arg2); } void func_hud_8008CBE4(void) { @@ -2861,7 +2861,7 @@ void func_hud_8008CBE4(void) { j = gVsKills[gPlayerNum][i]; - RCP_SetupDL(&gMasterDisp, 0x4D); + RCP_SetupDL(&gMasterDisp, SETUPDL_77); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, D_800D2098[j], D_800D20A8[j], D_800D20B8[j], 0); @@ -2876,11 +2876,11 @@ void func_hud_8008CFB8(f32 arg0, f32 arg1, f32 arg2, f32 arg3) { s32 i; for (i = 0; i < 3; i++) { - TextureRect_8bIA(&gMasterDisp, D_versus_3000BC0 + 2 * ((80 * 8 * i) / 2), 80, 8, arg0, (8 * i * arg3) + arg1, - arg2, arg3); + TextureRect_IA8(&gMasterDisp, D_versus_3000BC0 + 2 * ((80 * 8 * i) / 2), 80, 8, arg0, (8 * i * arg3) + arg1, + arg2, arg3); } - TextureRect_8bIA(&gMasterDisp, D_versus_3000BC0 + 2 * ((80 * 8 * i) / 2), 80, 2, arg0, (8 * i * arg3) + arg1, arg2, - arg3); + TextureRect_IA8(&gMasterDisp, D_versus_3000BC0 + 2 * ((80 * 8 * i) / 2), 80, 2, arg0, (8 * i * arg3) + arg1, arg2, + arg3); } void func_hud_8008D0DC(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4) { @@ -2890,14 +2890,14 @@ void func_hud_8008D0DC(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4) { } void func_hud_8008D1F0(f32 arg0, f32 arg1, f32 arg2, f32 arg3) { - TextureRect_4bCI(&gMasterDisp, D_10116B0, D_1011730, 16, 16, arg0, arg1, arg2, arg3); + TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, arg0, arg1, arg2, arg3); } void func_hud_8008D250(void) { f32 D_800D20C8[] = { 113.0f, 273.0f, 113.0f, 273.0f }; f32 D_800D20D8[] = { 79.0f, 79.0f, 199.0f, 199.0f }; - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); func_hud_8008C5C8(D_800D20C8[gPlayerNum], D_800D20D8[gPlayerNum], 0.54f, gPlayerNum); } @@ -2907,12 +2907,12 @@ void func_hud_8008D31C(void) { f32 D_800D20F8[] = { 78.0f, 78.0f, 198.0f, 198.0f }; Math_SmoothStepToF(&D_800D19E0[gPlayerNum], gPlayer[gPlayerNum].shields * (1.0f / 255.0f), 0.3f, 10.0f, 0.01f); - RCP_SetupDL(&gMasterDisp, 0x4E); + RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); func_hud_8008D0DC(D_800D20E8[gPlayerNum] + 3.0f, D_800D20F8[gPlayerNum] + 18.0f, 1.0f, 1.0f, D_800D19E0[gPlayerNum]); - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); @@ -2962,7 +2962,7 @@ void func_hud_8008D4F0(f32 arg0, f32 arg1) { temp_t9 = D_800D19AC[var_v1]; - RCP_SetupDL(&gMasterDisp, 0x4E); + RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, temp_t9, temp_t9, temp_t9, 255); @@ -2972,7 +2972,7 @@ void func_hud_8008D4F0(f32 arg0, f32 arg1) { if (temp_fs0 > 0.01f) { func_hud_800857DC(D_800D2108[var_v1] + temp + 1.0f, D_800D211C[var_v1] + sp60, temp_fs0, 1.0f); } - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); func_hud_80085740(D_800D2108[var_v1], D_800D211C[var_v1], 1.0f, 1.0f); } @@ -2984,7 +2984,7 @@ void func_hud_8008D7F4(void) { s32 D_800D2160[] = { 242, 30, 179, 30 }; s32 D_800D2170[] = { 12, 0, 67, 255 }; - RCP_SetupDL(&gMasterDisp, 0x4E); + RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, D_800D2150[gPlayerNum], D_800D2160[gPlayerNum], D_800D2170[gPlayerNum], 255); Graphics_DisplayHUDNumber(D_800D2130[gPlayerNum], D_800D2140[gPlayerNum], gPlayerNum + 1); } @@ -3046,7 +3046,7 @@ void func_hud_8008DC34(void) { void func_hud_8008DCB0(f32 arg0, f32 arg1, s32 arg2, s32 arg3, s32 arg4) { RCP_SetupDL_78(); gDPSetPrimColor(gMasterDisp++, 0, 0, arg2, arg3, arg4, D_hud_80161708); - TextureRect_4bCI(&gMasterDisp, D_1011ED0, D_1011F08, 16, 7, arg0, arg1, 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_1011ED0, D_1011F08, 16, 7, arg0, arg1, 1.0f, 1.0f); } void func_hud_8008DD78(f32 arg0, f32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5) { @@ -3086,24 +3086,24 @@ void HUD_DrawBossHealth(void) { temp4 = sp3C + 6.0f; temp5 = temp1 + 10.0f; - RCP_SetupDL(&gMasterDisp, 0x4E); + RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_4bCI(&gMasterDisp, D_1011A40, D_1011AB0, 32, 7, temp2, temp3, 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_1011A40, D_1011AB0, 32, 7, temp2, temp3, 1.0f, 1.0f); - RCP_SetupDL(&gMasterDisp, 0x4C); - TextureRect_8bIA(&gMasterDisp, D_1002040, 40, 12, sp3C, temp1, 1.0f, 1.0f); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); + TextureRect_IA8(&gMasterDisp, D_1002040, 40, 12, sp3C, temp1, 1.0f, 1.0f); if (sp3C >= 25.0f) { Math_SmoothStepToF(&D_801616C4, 0.88f, 0.3f, 0.2f, 0.1f); } if ((D_801616C4 >= 0.1f) && (sp3C >= 25.0f)) { - RCP_SetupDL(&gMasterDisp, 0x4E); + RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_8bCI(&gMasterDisp, D_10129C0, D_1013090, 16, 109, temp4, temp5, 1.0f, D_801616C4); + TextureRect_CI8(&gMasterDisp, D_10129C0, D_1013090, 16, 109, temp4, temp5, 1.0f, D_801616C4); } - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 0, 255); if (D_801616BC > 0.0f) { @@ -3123,7 +3123,7 @@ void HUD_DrawBossHealth(void) { temp6 = sp3C + 8.0f; temp7 = 101.0f - ((2200.0f / 69.0f) * D_801616C8) + temp1; if (D_801616C8 > 0.0f) { - TextureRect_16bRGBA(&gMasterDisp, D_Tex_800D99F8, 32, 32, temp6, temp7, 0.2f, D_801616C8); + TextureRect_RGBA16(&gMasterDisp, D_Tex_800D99F8, 32, 32, temp6, temp7, 0.2f, D_801616C8); } } } else { @@ -3154,7 +3154,7 @@ void HUD_DisplayCountdown(f32 xPos, f32 yPos, s32* countdown, f32 scale) { if ((i % 2) != 0) { RCP_SetupDL_78(); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_4bCI(&gMasterDisp, D_1011E80, D_1011EC0, 16, 8, (var_fs0 * scale) + xPos, yPos, scale, scale); + TextureRect_CI4(&gMasterDisp, D_1011E80, D_1011EC0, 16, 8, (var_fs0 * scale) + xPos, yPos, scale, scale); } else { RCP_SetupDL_76(); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); @@ -3298,7 +3298,7 @@ void func_hud_8008E620(f32 arg0, f32 arg1) { b = 200; } } - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, r, g, b, 255); func_hud_80094D20(arg0, arg1); } @@ -3443,21 +3443,21 @@ void func_hud_8008EA14(f32 x, f32 y) { switch (sp68) { case 0: if (D_800D19F4 >= 5) { - TextureRect_4bCI(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x, y, 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x, y, 1.0f, 1.0f); func_hud_8008DCB0(x + 14.0f, y + 2.0f, D_8016177C, D_80161780, D_80161784); func_hud_8008DD78(x + 29.0f, y + 1.0f, D_800D19F4, D_8016177C, D_80161780, D_80161784); } else { for (i = (D_800D19F4 - 1); i >= 0; i--) { - TextureRect_4bCI(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + (30.0f - (i * 10)), y, 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + (30.0f - (i * 10)), y, 1.0f, 1.0f); } } break; case 1: - TextureRect_4bCI(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + (D_800D19F0 * 3.0f), y, 1.0f, 1.0f); - TextureRect_4bCI(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + (D_800D19F0 * 2.0f), y, 1.0f, 1.0f); - TextureRect_4bCI(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + (D_800D19F0 * 1.0f), y, 1.0f, 1.0f); - TextureRect_4bCI(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + (D_800D19F0 * 0.0f), y, 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + (D_800D19F0 * 3.0f), y, 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + (D_800D19F0 * 2.0f), y, 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + (D_800D19F0 * 1.0f), y, 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + (D_800D19F0 * 0.0f), y, 1.0f, 1.0f); break; case 2: @@ -3467,39 +3467,35 @@ void func_hud_8008EA14(f32 x, f32 y) { } else { temp = D_800D19F0; } - TextureRect_4bCI(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + (30.0f - (i * 10)) + temp, y, 1.0f, - 1.0f); + TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + (30.0f - (i * 10)) + temp, y, 1.0f, + 1.0f); } break; case 3: for (i = (D_800D19F4 - 2); i >= 0; i--) { - TextureRect_4bCI(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + (30.0f - (i * 10)), y, 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + (30.0f - (i * 10)), y, 1.0f, 1.0f); } - TextureRect_4bCI(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + 50.0f - D_800D19F0, y, 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + 50.0f - D_800D19F0, y, 1.0f, 1.0f); break; case 4: - TextureRect_4bCI(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + 30.0f - (D_800D19F0 * 3.0f), y, 1.0f, - 1.0f); - TextureRect_4bCI(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + 20.0f - (D_800D19F0 * 2.0f), y, 1.0f, - 1.0f); - TextureRect_4bCI(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + 10.0f - (D_800D19F0 * 1.0f), y, 1.0f, - 1.0f); - TextureRect_4bCI(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x, y, 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + 30.0f - (D_800D19F0 * 3.0f), y, 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + 20.0f - (D_800D19F0 * 2.0f), y, 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + 10.0f - (D_800D19F0 * 1.0f), y, 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x, y, 1.0f, 1.0f); break; case 5: func_hud_8008DCB0(x + D_800D19F0, y + 2.0f, D_8016177C, D_80161780, D_80161784); func_hud_8008DD78(x + 15.0f + D_800D19F0, y + 1.0f, D_800D19F4, D_8016177C, D_80161780, D_80161784); - TextureRect_4bCI(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x, y, 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x, y, 1.0f, 1.0f); break; case 6: - RCP_SetupDL(&gMasterDisp, 0x4E); + RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_4bCI(&gMasterDisp, D_blue_marine_3000090, D_blue_marine_3000120, 32, 9, x + 1.0f, y, 1.0f, - 1.0f); + TextureRect_CI4(&gMasterDisp, D_blue_marine_3000090, D_blue_marine_3000120, 32, 9, x + 1.0f, y, 1.0f, 1.0f); break; } } @@ -5370,7 +5366,7 @@ void func_hud_80094954(Effect* effect) { void func_hud_80094BBC(Effect* effect) { if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && (gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].csState < 2)) { - RCP_SetupDL(&gMasterDisp, 0x44); + RCP_SetupDL(&gMasterDisp, SETUPDL_68); gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 21, 34, effect->unk_4A); gDPSetEnvColor(gMasterDisp++, 255, 255, 251, 0); Graphics_SetScaleMtx(effect->scale2); @@ -5457,13 +5453,13 @@ void func_hud_80094D20(f32 x, f32 y) { } if (xScale != 0.0f) { - TextureRect_8bIA(&gMasterDisp, D_800D24DC[temp], 16, 15, x1, y1, xScale, 1.0f); + TextureRect_IA8(&gMasterDisp, D_800D24DC[temp], 16, 15, x1, y1, xScale, 1.0f); } boolTemp = true; } if (!boolTemp && (xScale != 0.0f)) { - TextureRect_8bIA(&gMasterDisp, D_800D24DC[0], 16, 15, x1, y1, xScale, 1.0f); + TextureRect_IA8(&gMasterDisp, D_800D24DC[0], 16, 15, x1, y1, xScale, 1.0f); } x += 13.0f; @@ -5508,7 +5504,7 @@ void func_hud_80094D20(f32 x, f32 y) { } if (xScale != 0.0f) { - TextureRect_8bIA(&gMasterDisp, D_800D24DC[temp3], 16, 15, x1, y1, xScale, 1.0f); + TextureRect_IA8(&gMasterDisp, D_800D24DC[temp3], 16, 15, x1, y1, xScale, 1.0f); } if ((gHitCount != gDisplayedHitCount) && (D_hud_80161720[0] == 0.0f) && (D_hud_80161720[1] == 0.0f) && diff --git a/src/engine/fox_load.c b/src/engine/fox_load.c index 2d233fc8..4f05552d 100644 --- a/src/engine/fox_load.c +++ b/src/engine/fox_load.c @@ -1,8 +1,6 @@ #include "global.h" #include "sf64dma.h" -#define SEGMENT_SIZE(segment) ((ptrdiff_t) ((uintptr_t) (segment).end - (uintptr_t) (segment).start)) - u8 sFillTimer = 3; #include "fox_load_inits.c" diff --git a/src/engine/fox_radio.c b/src/engine/fox_radio.c index b579fc2d..645ba22d 100644 --- a/src/engine/fox_radio.c +++ b/src/engine/fox_radio.c @@ -428,22 +428,22 @@ void func_radio_800BAAE8(void) { if (mirror) { for (i = 0, j = 0; i < 2; i++, j += 44 * 20) { - TextureRect_16bRGBA_MirX(&gMasterDisp, &radioPortraitTex[j], 44, 20, gRadioPortraitPosX, - gRadioPortraitPosY + 20.0f + sp38 + (i * 20.0f * gRadioPortraitScaleY), 1.0f, - gRadioPortraitScaleY); + TextureRect_RGBA16_MirX(&gMasterDisp, &radioPortraitTex[j], 44, 20, gRadioPortraitPosX, + gRadioPortraitPosY + 20.0f + sp38 + (i * 20.0f * gRadioPortraitScaleY), 1.0f, + gRadioPortraitScaleY); } - TextureRect_16bRGBA_MirX(&gMasterDisp, &radioPortraitTex[44 * 20 * 2], 44, 4, gRadioPortraitPosX, - gRadioPortraitPosY + 20.0f + sp38 + (40.0f * gRadioPortraitScaleY), 1.0f, - gRadioPortraitScaleY); + TextureRect_RGBA16_MirX(&gMasterDisp, &radioPortraitTex[44 * 20 * 2], 44, 4, gRadioPortraitPosX, + gRadioPortraitPosY + 20.0f + sp38 + (40.0f * gRadioPortraitScaleY), 1.0f, + gRadioPortraitScaleY); } else { for (i = 0, j = 0; i < 2; i++, j += 44 * 20) { - TextureRect_16bRGBA(&gMasterDisp, &radioPortraitTex[j], 44, 20, gRadioPortraitPosX, - gRadioPortraitPosY + 20.0f + sp38 + (i * 20.0f * gRadioPortraitScaleY), 1.0f, - gRadioPortraitScaleY); + TextureRect_RGBA16(&gMasterDisp, &radioPortraitTex[j], 44, 20, gRadioPortraitPosX, + gRadioPortraitPosY + 20.0f + sp38 + (i * 20.0f * gRadioPortraitScaleY), 1.0f, + gRadioPortraitScaleY); } - TextureRect_16bRGBA(&gMasterDisp, &radioPortraitTex[44 * 20 * 2], 44, 4, gRadioPortraitPosX, - gRadioPortraitPosY + 20.0f + sp38 + (40.0f * gRadioPortraitScaleY), 1.0f, - gRadioPortraitScaleY); + TextureRect_RGBA16(&gMasterDisp, &radioPortraitTex[44 * 20 * 2], 44, 4, gRadioPortraitPosX, + gRadioPortraitPosY + 20.0f + sp38 + (40.0f * gRadioPortraitScaleY), 1.0f, + gRadioPortraitScaleY); } } } @@ -466,7 +466,7 @@ void func_radio_800BB388(void) { sp30 = temp_fa0 * D_800D4A78; - RCP_SetupDL(&gMasterDisp, 0x55); + RCP_SetupDL(&gMasterDisp, SETUPDL_85); switch (gGameState) { case GSTATE_TITLE: @@ -487,12 +487,12 @@ void func_radio_800BB388(void) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 60, 60, 255, 170); } - TextureRect_8bCI(&gMasterDisp, texture, palette, 32, 32, gRadioTextBoxPosX, gRadioTextBoxPosY + 16.0f + sp30, - gRadioTextBoxScaleX, gRadioTextBoxScaleY); + TextureRect_CI8(&gMasterDisp, texture, palette, 32, 32, gRadioTextBoxPosX, gRadioTextBoxPosY + 16.0f + sp30, + gRadioTextBoxScaleX, gRadioTextBoxScaleY); } if (gRadioTextBoxScaleY == 1.3f) { - RCP_SetupDL(&gMasterDisp, 0x55); + RCP_SetupDL(&gMasterDisp, SETUPDL_85); gMsgCharIsPrinting = Message_DisplayText(&gMasterDisp, gRadioMsg, gRadioPrintPosX, gRadioPrintPosY, gRadioMsgCharIndex); } @@ -709,7 +709,7 @@ void Radio_Draw(void) { if ((gTeamShields[idx] <= 0) && (gGameFrameCount & 4) && (gTeamShields[idx] != -2) && (gCurrentRadioPortrait != RCID_STATIC) && (gCurrentRadioPortrait != RCID_STATIC + 1) && (gCurrentRadioPortrait != RCID_1000)) { - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255); Graphics_DisplaySmallText(31, 167, 1.0f, 1.0f, "DOWN"); func_hud_80084B94(1); @@ -758,7 +758,7 @@ void Radio_Draw(void) { if ((gActors[idx].obj.status != OBJ_ACTIVE) && (gGameFrameCount & 4) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (gCurrentRadioPortrait != RCID_STATIC) && (gCurrentRadioPortrait != RCID_STATIC + 1) && (gCurrentRadioPortrait != RCID_1000)) { - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255); Graphics_DisplaySmallText(31, 167, 1.0f, 1.0f, "DOWN"); } diff --git a/src/engine/fox_std_lib.c b/src/engine/fox_std_lib.c index a2bffd40..c9d49019 100644 --- a/src/engine/fox_std_lib.c +++ b/src/engine/fox_std_lib.c @@ -538,8 +538,8 @@ s32 Math_PursueVec3f(Vec3f* pos, Vec3f* target, Vec3f* rot, f32 stepSize, f32 sc return (VEC3F_MAG(&diff)) < dist; } -void TextureRect_4bCI(Gfx** gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, - f32 yScale) { +void TextureRect_CI4(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, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); @@ -548,8 +548,8 @@ void TextureRect_4bCI(Gfx** gfxPtr, u8* texture, u16* palette, u32 width, u32 he (s32) (1.0f / yScale * 1024.0f)); } -void TextureRect_4bCI_Flip(Gfx** gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, - f32 xScale, f32 yScale) { +void TextureRect_CI4_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, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); @@ -558,8 +558,8 @@ void TextureRect_4bCI_Flip(Gfx** gfxPtr, u8* texture, u16* palette, u32 width, u G_TX_RENDERTILE, 0, 0, (s32) (1.0f / xScale * 1024.0f), (s32) (1.0f / yScale * 1024.0f)); } -void TextureRect_4bCI_MirX(Gfx** gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, - f32 xScale, f32 yScale) { +void TextureRect_CI4_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, G_TX_MIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); @@ -568,8 +568,8 @@ void TextureRect_4bCI_MirX(Gfx** gfxPtr, u8* texture, u16* palette, u32 width, u (u16) (s32) (-1.0f / xScale * 1024.0f), (s32) (1.0f / yScale * 1024.0f)); } -void TextureRect_4bCI_MirY(Gfx** gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, - f32 xScale, f32 yScale) { +void TextureRect_CI4_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, G_TX_MIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); @@ -578,8 +578,8 @@ void TextureRect_4bCI_MirY(Gfx** gfxPtr, u8* texture, u16* palette, u32 width, u (s32) (1.0f / xScale * 1024.0f), (u16) (s32) (-1.0f / yScale * 1024.0f)); } -void TextureRect_8bCI(Gfx** gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, - f32 yScale) { +void TextureRect_CI8(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, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); @@ -588,8 +588,7 @@ void TextureRect_8bCI(Gfx** gfxPtr, u8* texture, u16* palette, u32 width, u32 he (s32) (1.0f / yScale * 1024.0f)); } -void TextureRect_16bRGBA(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, - f32 yScale) { +void TextureRect_RGBA16(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), @@ -597,8 +596,8 @@ void TextureRect_16bRGBA(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f32 (s32) (1.0f / yScale * 1024.0f)); } -void TextureRect_16bRGBA_MirX(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, - f32 yScale) { +void TextureRect_RGBA16_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); gSPTextureRectangle((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), (s32) ((xPos + width * xScale) * 4.0f), @@ -606,7 +605,7 @@ void TextureRect_16bRGBA_MirX(Gfx** gfxPtr, u16* texture, u32 width, u32 height, (u16) (s32) (-1.0f / xScale * 1024.0f), (s32) (1.0f / yScale * 1024.0f)); } -void TextureRect_8bIA(Gfx** gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale) { +void TextureRect_IA8(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), @@ -614,8 +613,8 @@ void TextureRect_8bIA(Gfx** gfxPtr, u8* texture, u32 width, u32 height, f32 xPos (s32) (1.0f / yScale * 1024.0f)); } -void TextureRect_8bIA_FilpMirX(Gfx** gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, - f32 yScale) { +void TextureRect_IA8_FlipMirX(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); gSPTextureRectangleFlip((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), @@ -624,8 +623,8 @@ void TextureRect_8bIA_FilpMirX(Gfx** gfxPtr, u8* texture, u32 width, u32 height, (s32) (1.0f / xScale * 1024.0f)); } -void TextureRect_8bIA_FilpMirY(Gfx** gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, - f32 yScale) { +void TextureRect_IA8_FlipMirY(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); gSPTextureRectangleFlip((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), @@ -634,8 +633,8 @@ void TextureRect_8bIA_FilpMirY(Gfx** gfxPtr, u8* texture, u32 width, u32 height, (u16) (s32) (-1.0f / xScale * 1024.0f)); } -void TextureRect_8bIA_MirX(Gfx** gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, - f32 yScale) { +void TextureRect_IA8_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); gSPTextureRectangle((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), (s32) ((xPos + width * xScale) * 4.0f), @@ -643,8 +642,8 @@ void TextureRect_8bIA_MirX(Gfx** gfxPtr, u8* texture, u32 width, u32 height, f32 (u16) (s32) (-1.0f / xScale * 1024.0f), (s32) (1.0f / yScale * 1024.0f)); } -void TextureRect_8bIA_MirY(Gfx** gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, - f32 yScale) { +void TextureRect_IA8_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); gSPTextureRectangle((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), (s32) ((xPos + width * xScale) * 4.0f), @@ -652,7 +651,7 @@ void TextureRect_8bIA_MirY(Gfx** gfxPtr, u8* texture, u32 width, u32 height, f32 (s32) (1.0f / xScale * 1024.0f), (u16) (s32) (-1.0f / yScale * 1024.0f)); } -void TextureRect_16bIA(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale) { +void TextureRect_IA16(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,8 +659,8 @@ void TextureRect_16bIA(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f32 xP (s32) (1.0f / yScale * 1024.0f)); } -void TextureRect_16bIA_MirX(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, - f32 yScale) { +void TextureRect_IA16_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); gSPTextureRectangle((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), (s32) ((xPos + width * xScale) * 4.0f), @@ -669,8 +668,8 @@ void TextureRect_16bIA_MirX(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f (u16) (s32) (-1.0f / xScale * 1024.0f), (s32) (1.0f / yScale * 1024.0f)); } -void TextureRect_16bIA_MirY(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, - f32 yScale) { +void TextureRect_IA16_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); gSPTextureRectangle((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), (s32) ((xPos + width * xScale) * 4.0f), @@ -678,8 +677,8 @@ void TextureRect_16bIA_MirY(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f (s32) (1.0f / xScale * 1024.0f), (u16) (s32) (-1.0f / yScale * 1024.0f)); } -void TextureRect_16bIA_MirXY(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, - f32 yScale) { +void TextureRect_IA16_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); gSPTextureRectangle((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), (s32) ((xPos + width * xScale) * 4.0f), @@ -687,8 +686,7 @@ void TextureRect_16bIA_MirXY(Gfx** gfxPtr, u16* texture, u32 width, u32 height, (u16) (s32) (-1.0f / xScale * 1024.0f), (u16) (s32) (-1.0f / yScale * 1024.0f)); } -void TextureRect_32bRGBA(Gfx** gfxPtr, u32* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, - f32 yScale) { +void TextureRect_RGBA32(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); gSPTextureRectangle((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), (s32) ((xPos + width * xScale) * 4.0f), @@ -783,15 +781,15 @@ void Graphics_DisplayHUDNumber(s32 xPos, s32 yPos, s32 number) { place = 1000000; for (place = 1000000; place != 1; place /= 10) { if ((number / place != 0) || (startNumber == true)) { - TextureRect_4bCI(&gMasterDisp, hudNumberTex[number / place], hudNumberPal[number / place], 16, 8, xPos, - yPos, 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, hudNumberTex[number / place], hudNumberPal[number / place], 16, 8, xPos, yPos, + 1.0f, 1.0f); startNumber = true; xPos += 9; number %= place; } } - TextureRect_4bCI(&gMasterDisp, hudNumberTex[number / place], hudNumberPal[number / place], 16, 8, xPos, yPos, 1.0f, - 1.0f); + TextureRect_CI4(&gMasterDisp, hudNumberTex[number / place], hudNumberPal[number / place], 16, 8, xPos, yPos, 1.0f, + 1.0f); } u8* sSmallNumberTex[] = { aSmallText_0, aSmallText_1, aSmallText_2, aSmallText_3, aSmallText_4, @@ -805,13 +803,13 @@ void Graphics_DisplaySmallNumber(s32 xPos, s32 yPos, s32 number) { place = 1000000; for (place = 1000000; place != 1; place /= 10) { if ((number / place != 0) || (startNumber == true)) { - TextureRect_8bIA(&gMasterDisp, sSmallNumberTex[number / place], 16, 8, xPos, yPos, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, sSmallNumberTex[number / place], 16, 8, xPos, yPos, 1.0f, 1.0f); startNumber = true; xPos += 9; number %= place; } } - TextureRect_8bIA(&gMasterDisp, sSmallNumberTex[number / place], 16, 8, xPos, yPos, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, sSmallNumberTex[number / place], 16, 8, xPos, yPos, 1.0f, 1.0f); } char sSmallChars[] = " ABCDEFGHIJKLMNOPQRSTUVWXYZ!:-.0123456789"; @@ -963,7 +961,7 @@ void Graphics_DisplayLargeText(s32 xPos, s32 yPos, f32 xScale, f32 yScale, char* if ((text[0] == 'W') || (text[0] == 'X')) { width = 32; } - TextureRect_8bIA(&gMasterDisp, sLargeCharTex[charIndex], width, 15, xPosCurrent, yPos, xScale, yScale); + TextureRect_IA8(&gMasterDisp, sLargeCharTex[charIndex], width, 15, xPosCurrent, yPos, xScale, yScale); } startPrint = true; xPosCurrent += (sLargeCharWidths[charIndex] * xScale) + 2.0f; @@ -1104,13 +1102,13 @@ void Graphics_DisplayLargeNumber(s32 xPos, s32 yPos, s32 number) { place = 1000000; for (place = 1000000; place != 1; place /= 10) { if ((number / place != 0) || (startNumber == true)) { - TextureRect_8bIA(&gMasterDisp, sLargeNumberTex[number / place], 16, 15, xPos, yPos, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, sLargeNumberTex[number / place], 16, 15, xPos, yPos, 1.0f, 1.0f); startNumber = true; xPos += 13; number %= place; } } - TextureRect_8bIA(&gMasterDisp, sLargeNumberTex[number / place], 16, 15, xPos, yPos, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, sLargeNumberTex[number / place], 16, 15, xPos, yPos, 1.0f, 1.0f); } void Graphics_DisplaySmallText(s32 xPos, s32 yPos, f32 xScale, f32 yScale, char* text) { @@ -1129,7 +1127,7 @@ void Graphics_DisplaySmallText(s32 xPos, s32 yPos, f32 xScale, f32 yScale, char* if (var_t0 > 30) { width = 16; } - TextureRect_8bIA(&gMasterDisp, sSmallCharTex[var_t0], width, 8, xPosCurrent, yPos, xScale, yScale); + TextureRect_IA8(&gMasterDisp, sSmallCharTex[var_t0], width, 8, xPosCurrent, yPos, xScale, yScale); if (1) {} } switch (text[0]) { diff --git a/src/engine/fox_versus.c b/src/engine/fox_versus.c index c7cb3406..10892059 100644 --- a/src/engine/fox_versus.c +++ b/src/engine/fox_versus.c @@ -81,19 +81,19 @@ void func_versus_800BC760(void) { } void func_versus_800BC88C(f32 xPos, f32 yPos, f32 scale) { - TextureRect_8bIA(&gMasterDisp, D_VS_MENU_7003830, 64, 17, xPos, yPos, scale, scale); + TextureRect_IA8(&gMasterDisp, D_VS_MENU_7003830, 64, 17, xPos, yPos, scale, scale); } void func_versus_800BC8D8(f32 xPos, f32 yPos, f32 scale) { s32 i; for (i = 0; i < 2; i++) { - TextureRect_8bCI(&gMasterDisp, D_versus_300A470 + (152 * 8 * i), D_versus_300B218, 152, 8, xPos, - yPos + (8 * i * scale), scale, scale); + TextureRect_CI8(&gMasterDisp, D_versus_300A470 + (152 * 8 * i), D_versus_300B218, 152, 8, xPos, + yPos + (8 * i * scale), scale, scale); } - TextureRect_8bCI(&gMasterDisp, D_versus_300A470 + (152 * 8 * i), D_versus_300B218, 152, 7, xPos, - yPos + (8 * i * scale), scale, scale); + TextureRect_CI8(&gMasterDisp, D_versus_300A470 + (152 * 8 * i), D_versus_300B218, 152, 7, xPos, + yPos + (8 * i * scale), scale, scale); } void func_versus_800BC9DC(f32 xPos, f32 yPos, f32 scale, s32 yScale) { @@ -103,8 +103,8 @@ void func_versus_800BC9DC(f32 xPos, f32 yPos, f32 scale, s32 yScale) { s32 i; for (i = 0; i < 5; i++) { - TextureRect_8bCI(&gMasterDisp, D_800D4ABC[yScale] + (D_800D4AB0[yScale] * 8 * i), D_800D4AA4[yScale], - D_800D4AB0[yScale], 8, xPos, yPos + (8 * i * scale), scale, scale); + TextureRect_CI8(&gMasterDisp, D_800D4ABC[yScale] + (D_800D4AB0[yScale] * 8 * i), D_800D4AA4[yScale], + D_800D4AB0[yScale], 8, xPos, yPos + (8 * i * scale), scale, scale); } } @@ -112,11 +112,11 @@ void func_versus_800BCB44(f32 xPos, f32 yPos, f32 scale) { s32 i; for (i = 0; i < 2; i++) { - TextureRect_8bCI(&gMasterDisp, D_versus_3006C60 + (96 * 8 * i), D_versus_3007500, 96, 8, xPos, - yPos + (8 * i * scale), scale, scale); + TextureRect_CI8(&gMasterDisp, D_versus_3006C60 + (96 * 8 * i), D_versus_3007500, 96, 8, xPos, + yPos + (8 * i * scale), scale, scale); } - TextureRect_8bCI(&gMasterDisp, D_versus_3006C60 + (96 * 8 * i), D_versus_3007500, 96, 7, xPos, - yPos + (8 * i * scale), scale, scale); + TextureRect_CI8(&gMasterDisp, D_versus_3006C60 + (96 * 8 * i), D_versus_3007500, 96, 7, xPos, + yPos + (8 * i * scale), scale, scale); } void func_versus_800BCC48(f32 xPos, f32 yPos, f32 xScale, f32 yScale, s32 arg4) { @@ -126,19 +126,19 @@ void func_versus_800BCC48(f32 xPos, f32 yPos, f32 xScale, f32 yScale, s32 arg4) s32 i; for (i = 0; i < 3; i++) { - TextureRect_8bCI(&gMasterDisp, D_800D4AD8[arg4] + (D_800D4AE8[arg4] * 8 * i), D_800D4AC8[arg4], - D_800D4AE8[arg4], 8, xPos, yPos + (8 * i * yScale), xScale, yScale); + TextureRect_CI8(&gMasterDisp, D_800D4AD8[arg4] + (D_800D4AE8[arg4] * 8 * i), D_800D4AC8[arg4], D_800D4AE8[arg4], + 8, xPos, yPos + (8 * i * yScale), xScale, yScale); } - TextureRect_8bCI(&gMasterDisp, D_800D4AD8[arg4] + (D_800D4AE8[arg4] * 8 * i), D_800D4AC8[arg4], D_800D4AE8[arg4], 1, - xPos, yPos + (8 * i * yScale), xScale, yScale); + TextureRect_CI8(&gMasterDisp, D_800D4AD8[arg4] + (D_800D4AE8[arg4] * 8 * i), D_800D4AC8[arg4], D_800D4AE8[arg4], 1, + xPos, yPos + (8 * i * yScale), xScale, yScale); } void func_versus_800BCE24(f32 xPos, f32 yPos, f32 xScale, f32 yScale) { s32 i; for (i = 0; i < 6; i++) { - TextureRect_8bCI(&gMasterDisp, D_versus_3001420 + (256 * 7 * i), D_versus_3003E20, 256, 7, xPos, - yPos + (7 * i * yScale), xScale, yScale); + TextureRect_CI8(&gMasterDisp, D_versus_3001420 + (256 * 7 * i), D_versus_3003E20, 256, 7, xPos, + yPos + (7 * i * yScale), xScale, yScale); } } @@ -146,66 +146,66 @@ void func_versus_800BCEF8(f32 xPos, f32 yPos, f32 scale) { s32 i; for (i = 0; i < 12; i++) { - TextureRect_8bCI(&gMasterDisp, D_versus_3004010 + (136 * 2 * i), D_versus_3004D58, 136, 2, xPos, - yPos + (2 * i * scale), scale, scale); + TextureRect_CI8(&gMasterDisp, D_versus_3004010 + (136 * 2 * i), D_versus_3004D58, 136, 2, xPos, + yPos + (2 * i * scale), scale, scale); } - TextureRect_8bCI(&gMasterDisp, D_versus_3004010 + (136 * 2 * i), D_versus_3004D58, 136, 1, xPos, - yPos + (2 * i * scale), scale, scale); + TextureRect_CI8(&gMasterDisp, D_versus_3004010 + (136 * 2 * i), D_versus_3004D58, 136, 1, xPos, + yPos + (2 * i * scale), scale, scale); } void func_versus_800BCFFC(f32 xPos, f32 yPos, f32 xScale, f32 yScale) { - TextureRect_8bCI(&gMasterDisp, D_1013170, D_1013570, 24, 17, xPos, yPos, xScale, yScale); + TextureRect_CI8(&gMasterDisp, D_1013170, D_1013570, 24, 17, xPos, yPos, xScale, yScale); } void func_versus_800BD05C(f32 xPos, f32 yPos, f32 scale) { - TextureRect_4bCI(&gMasterDisp, D_versus_30003A0, D_versus_30004E0, 64, 10, xPos, yPos, scale, scale); + TextureRect_CI4(&gMasterDisp, D_versus_30003A0, D_versus_30004E0, 64, 10, xPos, yPos, scale, scale); } void func_versus_800BD0B4(f32 xPos, f32 yPos, f32 scale) { - TextureRect_4bCI(&gMasterDisp, D_versus_3000510, D_versus_30006A0, 80, 10, xPos, yPos, scale, scale); + TextureRect_CI4(&gMasterDisp, D_versus_3000510, D_versus_30006A0, 80, 10, xPos, yPos, scale, scale); } void func_versus_800BD10C(f32 xPos, f32 yPos, f32 scale) { - TextureRect_4bCI(&gMasterDisp, D_versus_30006D0, D_versus_3000810, 64, 10, xPos, yPos, scale, scale); + TextureRect_CI4(&gMasterDisp, D_versus_30006D0, D_versus_3000810, 64, 10, xPos, yPos, scale, scale); } void func_versus_800BD164(f32 xPos, f32 yPos) { - TextureRect_8bIA(&gMasterDisp, D_VS_MENU_7003C70, 16, 16, xPos, yPos, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_VS_MENU_7003C70, 16, 16, xPos, yPos, 1.0f, 1.0f); } void func_versus_800BD1B0(f32 xPos, f32 yPos) { - TextureRect_8bIA(&gMasterDisp, D_VS_MENU_7003F10, 16, 16, xPos, yPos, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_VS_MENU_7003F10, 16, 16, xPos, yPos, 1.0f, 1.0f); } void func_versus_800BD1FC(f32 xPos, f32 yPos) { - TextureRect_8bIA(&gMasterDisp, D_VS_MENU_7003E10, 16, 16, xPos, yPos, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_VS_MENU_7003E10, 16, 16, xPos, yPos, 1.0f, 1.0f); } void func_versus_800BD248(f32 xPos, f32 yPos) { - TextureRect_8bCI(&gMasterDisp, D_VS_MENU_7004050, D_VS_MENU_7004150, 16, 16, xPos, yPos, 1.0f, 1.0f); + TextureRect_CI8(&gMasterDisp, D_VS_MENU_7004050, D_VS_MENU_7004150, 16, 16, xPos, yPos, 1.0f, 1.0f); } void func_versus_800BD2A0(f32 xPos, f32 yPos) { - TextureRect_8bCI(&gMasterDisp, D_VS_MENU_70041F0, D_VS_MENU_70042F0, 16, 16, xPos, yPos, 1.0f, 1.0f); + TextureRect_CI8(&gMasterDisp, D_VS_MENU_70041F0, D_VS_MENU_70042F0, 16, 16, xPos, yPos, 1.0f, 1.0f); } void func_versus_800BD2F8(f32 xPos, f32 yPos) { - TextureRect_8bCI(&gMasterDisp, D_VS_MENU_7004360, D_VS_MENU_7004460, 16, 16, xPos, yPos, 1.0f, 1.0f); + TextureRect_CI8(&gMasterDisp, D_VS_MENU_7004360, D_VS_MENU_7004460, 16, 16, xPos, yPos, 1.0f, 1.0f); } void func_versus_800BD350(f32 xPos, f32 yPos) { - TextureRect_8bCI(&gMasterDisp, D_VS_MENU_70044D0, D_VS_MENU_7004990, 64, 19, xPos, yPos, 1.0f, 1.0f); + TextureRect_CI8(&gMasterDisp, D_VS_MENU_70044D0, D_VS_MENU_7004990, 64, 19, xPos, yPos, 1.0f, 1.0f); } void func_versus_800BD3A8(f32 xPos, f32 yPos) { s32 i; for (i = 0; i < 8; i++) { - TextureRect_4bCI(&gMasterDisp, D_VS_MENU_70118E0 + ((80 * 8 * i) / 2), D_VS_MENU_70123F8, 80, 8, xPos, - yPos + (i * 8), 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_VS_MENU_70118E0 + ((80 * 8 * i) / 2), D_VS_MENU_70123F8, 80, 8, xPos, + yPos + (i * 8), 1.0f, 1.0f); } - TextureRect_4bCI(&gMasterDisp, D_VS_MENU_70118E0 + ((80 * 8 * i) / 2), D_VS_MENU_70123F8, 80, 7, xPos, - yPos + (i * 8), 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_VS_MENU_70118E0 + ((80 * 8 * i) / 2), D_VS_MENU_70123F8, 80, 7, xPos, + yPos + (i * 8), 1.0f, 1.0f); } void func_versus_800BD4D4(f32 xPos, f32 yPos, s32 arg2) { @@ -220,21 +220,21 @@ void func_versus_800BD4D4(f32 xPos, f32 yPos, s32 arg2) { for (i /= 10; i != 1; i /= 10) { j = arg2 / i; if (j || (var_s2 == true)) { - TextureRect_8bIA(&gMasterDisp, D_800D4AF8[j / i], 16, 8, xPos, yPos, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_800D4AF8[j / i], 16, 8, xPos, yPos, 1.0f, 1.0f); xPos += 9.0f; arg2 %= i; var_s2 = true; } } - TextureRect_8bIA(&gMasterDisp, D_800D4AF8[arg2 / i], 16, 8, xPos, yPos, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_800D4AF8[arg2 / i], 16, 8, xPos, yPos, 1.0f, 1.0f); } void func_versus_800BD720(f32 xPos, f32 yPos) { - TextureRect_8bIA(&gMasterDisp, D_versus_30013E0, 8, 8, xPos, yPos, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_versus_30013E0, 8, 8, xPos, yPos, 1.0f, 1.0f); } void func_versus_800BD76C(f32 xPos, f32 yPos) { - TextureRect_4bCI(&gMasterDisp, D_versus_30001E0, D_versus_3000380, 64, 13, xPos, yPos, 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_versus_30001E0, D_versus_3000380, 64, 13, xPos, yPos, 1.0f, 1.0f); } void func_versus_800BD7C4(f32 xPos, f32 yPos, s32 arg2) { @@ -244,23 +244,23 @@ void func_versus_800BD7C4(f32 xPos, f32 yPos, s32 arg2) { for (i = 10; i != 1; i /= 10) { if (xPos > 0 && (yPos > 0)) { - TextureRect_8bIA(&gMasterDisp, D_800D4B20[arg2 / i], 16, 8, xPos, yPos, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_800D4B20[arg2 / i], 16, 8, xPos, yPos, 1.0f, 1.0f); } xPos += 9.0f; arg2 %= i; } if ((xPos > 0) && (yPos > 0)) { - TextureRect_8bIA(&gMasterDisp, D_800D4B20[arg2 / i], 16, 8, xPos, yPos, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_800D4B20[arg2 / i], 16, 8, xPos, yPos, 1.0f, 1.0f); } } void func_versus_800BD9FC(f32 xPos, f32 yPos) { - TextureRect_4bCI(&gMasterDisp, D_1011E80, D_1011EC0, 16, 8, xPos, yPos, 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_1011E80, D_1011EC0, 16, 8, xPos, yPos, 1.0f, 1.0f); } void func_versus_800BDA54(f32 xPos, f32 yPos) { - TextureRect_8bIA(&gMasterDisp, aSmallText_L, 8, 8, xPos, yPos, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, aSmallText_L, 8, 8, xPos, yPos, 1.0f, 1.0f); } void func_versus_800BDAA0(f32 xPos, f32 yPos, s32 arg2, s32 arg3, s32 arg4) { @@ -279,18 +279,15 @@ void func_versus_800BDAA0(f32 xPos, f32 yPos, s32 arg2, s32 arg3, s32 arg4) { temp1 = arg2 / i; temp2 = arg3 / i; if (temp1 == temp2) { - TextureRect_8bIA(&gMasterDisp, D_800D4B48[temp1], 16, 15, xPos, yPos, 0.7f, 0.7f); + TextureRect_IA8(&gMasterDisp, D_800D4B48[temp1], 16, 15, xPos, yPos, 0.7f, 0.7f); } else { if (temp3 > y3) { - TextureRect_8bIA(&gMasterDisp, D_800D4B48[temp2] + (16 * arg4), 16, 15 - arg4, xPos, yPos, 0.7f, 0.7f); - TextureRect_8bIA(&gMasterDisp, D_800D4B48[temp1], 16, arg4, xPos, yPos + (15 - arg4) * 0.7f, 0.7f, - 0.7f); + TextureRect_IA8(&gMasterDisp, D_800D4B48[temp2] + (16 * arg4), 16, 15 - arg4, xPos, yPos, 0.7f, 0.7f); + TextureRect_IA8(&gMasterDisp, D_800D4B48[temp1], 16, arg4, xPos, yPos + (15 - arg4) * 0.7f, 0.7f, 0.7f); } if (temp3 < y3) { - TextureRect_8bIA(&gMasterDisp, D_800D4B48[temp2], 16, 15 - arg4, xPos, yPos + (arg4 * 0.7f), 0.7f, - 0.7f); - TextureRect_8bIA(&gMasterDisp, D_800D4B48[temp1] + (16 * (15 - arg4)), 16, arg4, xPos, yPos, 0.7f, - 0.7f); + TextureRect_IA8(&gMasterDisp, D_800D4B48[temp2], 16, 15 - arg4, xPos, yPos + (arg4 * 0.7f), 0.7f, 0.7f); + TextureRect_IA8(&gMasterDisp, D_800D4B48[temp1] + (16 * (15 - arg4)), 16, arg4, xPos, yPos, 0.7f, 0.7f); } } xPos += 13.0f * 0.7f; @@ -317,7 +314,7 @@ void func_versus_800BDE44(void) { 202.0f, }; - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); for (i = 0; i < 4; i++) { @@ -393,10 +390,10 @@ s32 func_versus_800BE300(f32 xPos, f32 yPos, s32* arg2) { f32 y; s32 temp; - RCP_SetupDL(&gMasterDisp, 0x4E); + RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 0, 255); - TextureRect_8bCI(&gMasterDisp, D_1013170, D_1013570, 24, 17, 120.0f, 115.0f, 3.33f, 0.53f); + TextureRect_CI8(&gMasterDisp, D_1013170, D_1013570, 24, 17, 120.0f, 115.0f, 3.33f, 0.53f); xTemp = 0.0f; @@ -413,10 +410,10 @@ s32 func_versus_800BE300(f32 xPos, f32 yPos, s32* arg2) { } if ((i % 2) == 1) { - RCP_SetupDL(&gMasterDisp, 0x4E); + RCP_SetupDL(&gMasterDisp, SETUPDL_78); func_versus_800BD9FC(x + xTemp, y); } else { - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); func_versus_800BD7C4(x + xTemp, y, temp); xTemp += 9.0f; @@ -505,37 +502,37 @@ void func_versus_800BE924(s32 index) { f32 D_800D4B90[] = { 40.0f, 200.0f, 40.0f, 200.0f }; f32 D_800D4BA0[] = { 20.0f, 20.0f, 140.0f, 140.0f }; - RCP_SetupDL(&gMasterDisp, 0x4E); + RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); func_versus_800BD3A8(D_800D4B90[index] + 0.0f, D_800D4BA0[index] + 10.0f); func_versus_800BD350(D_800D4B90[index] + 5.0f, D_800D4BA0[index] + 0.0f); if (sUnlockLandmaster && sUnlockOnFoot) { - RCP_SetupDL(&gMasterDisp, 0x4E); + RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); func_versus_800BD248(D_800D4B90[index] + 15.0f, D_800D4BA0[index] + 22.0f); func_versus_800BD2A0(D_800D4B90[index] + 15.0f, D_800D4BA0[index] + 40.0f); func_versus_800BD2F8(D_800D4B90[index] + 15.0f, D_800D4BA0[index] + 58.0f); - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); func_versus_800BD164(D_800D4B90[index] + 43.0f, D_800D4BA0[index] + 22.0f); func_versus_800BD1B0(D_800D4B90[index] + 43.0f, D_800D4BA0[index] + 40.0f); func_versus_800BD1FC(D_800D4B90[index] + 43.0f, D_800D4BA0[index] + 58.0f); } if (sUnlockLandmaster && !sUnlockOnFoot) { - RCP_SetupDL(&gMasterDisp, 0x4E); + RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); func_versus_800BD248(D_800D4B90[index] + 15.0f, D_800D4BA0[index] + 29.0f); func_versus_800BD2A0(D_800D4B90[index] + 15.0f, D_800D4BA0[index] + 51.0f); - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); func_versus_800BD164(D_800D4B90[index] + 43.0f, D_800D4BA0[index] + 29.0f); func_versus_800BD1B0(D_800D4B90[index] + 43.0f, D_800D4BA0[index] + 51.0f); } - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); func_versus_800BD4D4(D_800D4B90[index] + 32.0f, D_800D4BA0[index] + 84.0f, (D_801787F8[index] / 30) + 1); } @@ -543,13 +540,13 @@ void func_versus_800BECA8(s32 index) { f32 D_800D4BB0[] = { 40.0f, 200.0f, 40.0f, 200.0f }; f32 D_800D4BC0[] = { 40.0f, 40.0f, 160.0f, 160.0f }; - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 30, 0, 255); func_versus_800BC88C(D_800D4BB0[index], D_800D4BC0[index], 1.0f); } void func_versus_800BED78(void) { - RCP_SetupDL(&gMasterDisp, 0x4E); + RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); func_versus_800BC8D8(84.0f, 108.0f, 1.0f); } @@ -616,7 +613,7 @@ s32 func_versus_800BEFE4(void) { f32 D_800D4BF0[] = { 12.0f, 0.0f, 0.0f }; s32 i; - RCP_SetupDL(&gMasterDisp, 0x4E); + RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); for (i = 0; i < 4; i++) { @@ -732,7 +729,7 @@ s32 func_versus_800BF59C(void) { s32 colorGB; for (i = 0; i < 4; i++) { - RCP_SetupDL(&gMasterDisp, 0x4E); + RCP_SetupDL(&gMasterDisp, SETUPDL_78); if (D_80178850[i] == 0) { continue; @@ -761,7 +758,7 @@ void func_versus_800BF750(void) { s32 D_800D4C5C[] = { 12, 0, 67, 255 }; s32 temp; - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); for (i = 0; i < 4; i++) { if (gPlayer[i].state_1C8 != PLAYERSTATE_1C8_ACTIVE) { @@ -1068,11 +1065,11 @@ s32 func_versus_800C04DC(f32 xPos, f32 scale, s32 arg2) { x = 118.0f; y = 110.0f; - RCP_SetupDL(&gMasterDisp, 0x4E); + RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 0, 200); func_versus_800BCFFC(98.0f, 100.0f, 5.2f, 2.98f); - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); Graphics_DisplaySmallText(x, y, 1.0f, 1.0f, "TOTAL"); @@ -1082,11 +1079,11 @@ s32 func_versus_800C04DC(f32 xPos, f32 scale, s32 arg2) { func_hud_800869A0(x + 18.0f, y + 16.0f, D_800D4A94, 1.0f, 0, 9999); } else { if (arg2 < 4) { - RCP_SetupDL(&gMasterDisp, 0x4E); + RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); func_versus_800BCC48(xPos, 100.0f, scale, 1.0f, arg2); } else { - RCP_SetupDL(&gMasterDisp, 0x4E); + RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); func_versus_800BCE24(xPos, 104.0f, scale, 1.0f); } @@ -1096,7 +1093,7 @@ s32 func_versus_800C04DC(f32 xPos, f32 scale, s32 arg2) { } s32 func_versus_800C075C(void) { - RCP_SetupDL(&gMasterDisp, 0x4E); + RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); func_versus_800BCEF8(94.0f, 126.0f, 1.0f); return 0; @@ -1151,7 +1148,7 @@ bool func_versus_800C08D0(void) { } void func_versus_800C0970(f32 yScale1, f32 yScale2) { - RCP_SetupDL(&gMasterDisp, 0x4E); + RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 0, 255); func_versus_800BCFFC(98.0f, 72.0f, 5.19f, yScale1); func_versus_800BCFFC(98.0f, 152.0f, 5.19f, yScale2); @@ -1191,7 +1188,7 @@ s32 func_versus_800C0B0C(void) { s32 i; s32 colorGB[3]; - RCP_SetupDL(&gMasterDisp, 0x4E); + RCP_SetupDL(&gMasterDisp, SETUPDL_78); for (i = 0; i < 3; i++) { if (i == D_801787A4) { @@ -1293,7 +1290,7 @@ s32 func_versus_800C0E78(void) { for (i = 0; i < 4; i++) { if (gControllerPlugged[i] == true) { - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); Graphics_DisplaySmallText(D_800D4C90[i], D_800D4CA4[i], 1.0f, 1.0f, D_800D4C80[i]); @@ -1330,7 +1327,7 @@ s32 func_versus_800C1138(s32 max, s32 arg1) { s32 j; for (i = 0; i < max; i++) { - RCP_SetupDL(&gMasterDisp, 0x4D); + RCP_SetupDL(&gMasterDisp, SETUPDL_77); j = gVsKills[arg1][i]; gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, D_800D4CD8[j], D_800D4CE8[j], D_800D4CF8[j], 0); diff --git a/src/mods/fpscounter.c b/src/mods/fpscounter.c index 2be76dff..033c2fbd 100644 --- a/src/mods/fpscounter.c +++ b/src/mods/fpscounter.c @@ -38,7 +38,7 @@ static void Play_RenderFps(void) { } /* Draw */ - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); Graphics_DisplaySmallText(FPS_COUNTER_X_POS, FPS_COUNTER_Y_POS, 1.0f, 1.0f, "FPS:"); Graphics_DisplaySmallNumber(FPS_COUNTER_X_POS + 35, FPS_COUNTER_Y_POS, gFPS); diff --git a/src/mods/levelselect.c b/src/mods/levelselect.c index 22496015..f386ebd4 100644 --- a/src/mods/levelselect.c +++ b/src/mods/levelselect.c @@ -93,7 +93,7 @@ void Map_LevelSelect(void) { /* Draw */ if ((sCurrentPlanetId >= 0) && (sCurrentPlanetId < PLANET_MAX)) { - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); Graphics_DisplaySmallText(20, 200, 1.0f, 1.0f, "PLANET:"); diff --git a/src/mods/object_ram.c b/src/mods/object_ram.c index 653d103d..a9078167 100644 --- a/src/mods/object_ram.c +++ b/src/mods/object_ram.c @@ -366,7 +366,7 @@ void ObjectRam_Update(void) { // break; } } - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); // Graphics_DisplaySmallText(20, 50, 1.0f, 1.0f, omStr[editMode]); for (i = 0; i < ARRAY_COUNT(oRamEntries); i++) { diff --git a/src/mods/sfxjukebox.c b/src/mods/sfxjukebox.c index 1252834e..40303f94 100644 --- a/src/mods/sfxjukebox.c +++ b/src/mods/sfxjukebox.c @@ -118,7 +118,7 @@ void Option_ExpertSoundUpdate(void) { /* Draw */ - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); Graphics_DisplaySmallText(20, 50, 1.0f, 1.0f, "SFX ID:"); diff --git a/src/mods/sfxjukebox2.c b/src/mods/sfxjukebox2.c index 22b25449..3ac9d414 100644 --- a/src/mods/sfxjukebox2.c +++ b/src/mods/sfxjukebox2.c @@ -197,7 +197,7 @@ void Jukebox_Update(void) { /* Draw */ - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); Graphics_Printf("SFX ID: %08X", sfx); diff --git a/src/overlays/ovl_ending/fox_end1.c b/src/overlays/ovl_ending/fox_end1.c index 9b4777b2..6e2c1447 100644 --- a/src/overlays/ovl_ending/fox_end1.c +++ b/src/overlays/ovl_ending/fox_end1.c @@ -75,20 +75,20 @@ void Ending_80187520(s32 arg0) { s32 i; s32 j; - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); switch (arg0) { case 0: for (j = 0, i = 0; i < 67; j += 316 * 4, i++) { - TextureRect_16bRGBA(&gMasterDisp, gEndingAwardBack + j, 316, 4, 0.0f, 4 * i, 1.0f, 1.0f); + TextureRect_RGBA16(&gMasterDisp, gEndingAwardBack + j, 316, 4, 0.0f, 4 * i, 1.0f, 1.0f); } - TextureRect_16bRGBA(&gMasterDisp, gEndingAwardBack + j, 316, 3, 0.0f, 4 * i, 1.0f, 1.0f); + TextureRect_RGBA16(&gMasterDisp, gEndingAwardBack + j, 316, 3, 0.0f, 4 * i, 1.0f, 1.0f); break; case 1: for (j = 0, i = 0; i < 60; j += 316 * 4, i++) { - TextureRect_16bRGBA(&gMasterDisp, gEndingAwardFront + j, 316, 4, 0.0f, 4 * i, 1.0f, 1.0f); + TextureRect_RGBA16(&gMasterDisp, gEndingAwardFront + j, 316, 4, 0.0f, 4 * i, 1.0f, 1.0f); } break; } @@ -99,7 +99,7 @@ void Ending_801876A4(void) { for (i = 0; i < 4; i++) { Matrix_Push(&gGfxMatrix); - RCP_SetupDL(&gMasterDisp, 0x3E); + RCP_SetupDL(&gMasterDisp, SETUPDL_62); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 240); Matrix_Translate(gGfxMatrix, D_ending_80196D08[i].pos.x, D_ending_80196D08[i].pos.y, D_ending_80196D08[i].pos.z, MTXF_APPLY); @@ -424,21 +424,21 @@ void Ending_801886F4(void) { return; } - RCP_SetupDL(&gMasterDisp, 0x4E); + RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); switch ((D_ending_80196F90 % 8) / 2) { case 3: - TextureRect_4bCI(&gMasterDisp, D_END_70110E0, D_END_70111B0, 16, 26, temp + 31.0f, 18.0f, 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_END_70110E0, D_END_70111B0, 16, 26, temp + 31.0f, 18.0f, 1.0f, 1.0f); /* fallthrough */ case 2: - TextureRect_4bCI(&gMasterDisp, D_END_7010FF0, D_END_70110C0, 16, 26, temp + 24.0f, 18.0f, 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_END_7010FF0, D_END_70110C0, 16, 26, temp + 24.0f, 18.0f, 1.0f, 1.0f); /* fallthrough */ case 1: - TextureRect_4bCI(&gMasterDisp, D_END_7010F00, D_END_7010FD0, 16, 26, temp + 18.0f, 18.0f, 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_END_7010F00, D_END_7010FD0, 16, 26, temp + 18.0f, 18.0f, 1.0f, 1.0f); /* fallthrough */ case 0: - TextureRect_4bCI(&gMasterDisp, D_END_7010E10, D_END_7010EE0, 16, 26, temp, 18.0f, 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_END_7010E10, D_END_7010EE0, 16, 26, temp, 18.0f, 1.0f, 1.0f); } } @@ -1733,14 +1733,14 @@ void Ending_8018C21C(void) { if (gCsFrameCount < 780) { Matrix_Push(&gGfxMatrix); - RCP_SetupDL(&gMasterDisp, 0x11); + RCP_SetupDL(&gMasterDisp, SETUPDL_17); Matrix_Translate(gGfxMatrix, 0.0f, -1200.0f, -6000.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_END_700C8B0); Matrix_Pop(&gGfxMatrix); } else { Matrix_Push(&gGfxMatrix); - RCP_SetupDL(&gMasterDisp, 0x11); + RCP_SetupDL(&gMasterDisp, SETUPDL_17); Matrix_Translate(gGfxMatrix, -2000.0f, -3000.0f, 3000.0f, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, 110.0f * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -1756,7 +1756,7 @@ void Ending_8018C21C(void) { switch (gActors[i].obj.id) { case 0: if (gActors[i].state == 0) { - RCP_SetupDL(&gMasterDisp, 0x17); + RCP_SetupDL(&gMasterDisp, SETUPDL_23); Matrix_Translate(gGfxMatrix, gActors[i].obj.pos.x, gActors[i].obj.pos.y, gActors[i].obj.pos.z, MTXF_APPLY); Matrix_Scale(gGfxMatrix, gActors[i].scale, gActors[i].scale, gActors[i].scale, MTXF_APPLY); @@ -1773,7 +1773,7 @@ void Ending_8018C21C(void) { gSPDisplayList(gMasterDisp++, D_GREAT_FOX_E003AB0); } - RCP_SetupDL(&gMasterDisp, 0x31); + RCP_SetupDL(&gMasterDisp, SETUPDL_49); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 64); gDPSetEnvColor(gMasterDisp++, 255, 255, 0, 64); @@ -1797,7 +1797,7 @@ void Ending_8018C21C(void) { Matrix_Pop(&gGfxMatrix); } } else { - RCP_SetupDL(&gMasterDisp, 0x17); + RCP_SetupDL(&gMasterDisp, SETUPDL_23); Matrix_Translate(gGfxMatrix, gActors[i].obj.pos.x, gActors[i].obj.pos.y, gActors[i].obj.pos.z, MTXF_APPLY); Matrix_Scale(gGfxMatrix, gActors[i].scale, gActors[i].scale, gActors[i].scale, MTXF_APPLY); @@ -1810,7 +1810,7 @@ void Ending_8018C21C(void) { break; case 1: - RCP_SetupDL(&gMasterDisp, 0x17); + RCP_SetupDL(&gMasterDisp, SETUPDL_23); Matrix_Translate(gGfxMatrix, gActors[i].obj.pos.x, gActors[i].obj.pos.y, gActors[i].obj.pos.z, MTXF_APPLY); Matrix_Scale(gGfxMatrix, gActors[i].scale, gActors[i].scale, gActors[i].scale, MTXF_APPLY); @@ -1822,7 +1822,7 @@ void Ending_8018C21C(void) { break; case 2: - RCP_SetupDL(&gMasterDisp, 0x17); + RCP_SetupDL(&gMasterDisp, SETUPDL_23); Matrix_Translate(gGfxMatrix, gActors[i].obj.pos.x, gActors[i].obj.pos.y, gActors[i].obj.pos.z, MTXF_APPLY); Matrix_Scale(gGfxMatrix, gActors[i].scale, gActors[i].scale, gActors[i].scale, MTXF_APPLY); @@ -1834,7 +1834,7 @@ void Ending_8018C21C(void) { break; case 3: - RCP_SetupDL(&gMasterDisp, 0x17); + RCP_SetupDL(&gMasterDisp, SETUPDL_23); Matrix_Translate(gGfxMatrix, gActors[i].obj.pos.x, gActors[i].obj.pos.y, gActors[i].obj.pos.z, MTXF_APPLY); Matrix_Scale(gGfxMatrix, gActors[i].scale, gActors[i].scale, gActors[i].scale, MTXF_APPLY); @@ -1844,7 +1844,7 @@ void Ending_8018C21C(void) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_D00B880); Matrix_Push(&gGfxMatrix); - RCP_SetupDL(&gMasterDisp, 0x31); + RCP_SetupDL(&gMasterDisp, SETUPDL_49); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 64); gDPSetEnvColor(gMasterDisp++, 0, 255, 0, 64); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -66.0f, MTXF_APPLY); @@ -1854,7 +1854,7 @@ void Ending_8018C21C(void) { gSPDisplayList(gMasterDisp++, D_END_7010970); Matrix_Pop(&gGfxMatrix); spE4 = gActors[i].fwork[1]; - RCP_SetupDL(&gMasterDisp, 0x29); + RCP_SetupDL(&gMasterDisp, SETUPDL_41); switch (gActors[i].unk_046) { case 0: diff --git a/src/overlays/ovl_ending/fox_end2.c b/src/overlays/ovl_ending/fox_end2.c index 6c1a24ae..71f44963 100644 --- a/src/overlays/ovl_ending/fox_end2.c +++ b/src/overlays/ovl_ending/fox_end2.c @@ -34,31 +34,31 @@ void Ending_8018CE20(u32 arg0) { if ((D_ending_80192E74[i].unk_11 == 0) || (gVenomHardClear == 1)) { if (D_ending_80192E74[i].unk_10 == 1) { xPos = (SCREEN_WIDTH - Graphics_GetLargeTextWidth(D_ending_80192E74[i].unk_00)) / 2; - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetTextureFilter(gMasterDisp++, G_TF_POINT); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, alpha); Graphics_DisplayLargeText(xPos, D_ending_80192E74[i].unk_0E, 1.0f, 1.0f, D_ending_80192E74[i].unk_00); } else if (D_ending_80192E74[i].unk_10 == 2) { - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetTextureFilter(gMasterDisp++, G_TF_POINT); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, alpha); - TextureRect_8bIA(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 0, 192, 5, 64.0f, 105.0f, - 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 1, 192, 5, 64.0f, 110.0f, - 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 2, 192, 5, 64.0f, 115.0f, - 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 3, 192, 5, 64.0f, 120.0f, - 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 4, 192, 5, 64.0f, 125.0f, - 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 5, 192, 5, 64.0f, 130.0f, - 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 0, 192, 5, 64.0f, 105.0f, + 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 1, 192, 5, 64.0f, 110.0f, + 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 2, 192, 5, 64.0f, 115.0f, + 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 3, 192, 5, 64.0f, 120.0f, + 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 4, 192, 5, 64.0f, 125.0f, + 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 5, 192, 5, 64.0f, 130.0f, + 1.0f, 1.0f); } else { xPos = (320 - Graphics_GetSmallTextWidth(D_ending_80192E74[i].unk_00)) / 2; - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetTextureFilter(gMasterDisp++, G_TF_POINT); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 155, 155, alpha); Graphics_DisplaySmallText(xPos, D_ending_80192E74[i].unk_0E, 1.0f, 1.0f, @@ -151,16 +151,16 @@ void Ending_8018D638(u32 arg0, AssetInfo* asset) { gFillScreenAlpha = gFillScreenAlphaTarget = alpha; gFillScreenAlphaStep = 0; - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); if (gExpertMode != 0) { for (i = 0; i < 240; i += 4) { if (gVenomHardClear == 0) { - TextureRect_16bRGBA(&gMasterDisp, gEndingNormalReward + 316 * i, 316, 4, 0.0f, i, 1.0f, 1.0f); + TextureRect_RGBA16(&gMasterDisp, gEndingNormalReward + 316 * i, 316, 4, 0.0f, i, 1.0f, 1.0f); } else { - TextureRect_16bRGBA(&gMasterDisp, gEndingExpertReward + 316 * i, 316, 4, 0.0f, i, 1.0f, 1.0f); + TextureRect_RGBA16(&gMasterDisp, gEndingExpertReward + 316 * i, 316, 4, 0.0f, i, 1.0f, 1.0f); } } } else { @@ -183,10 +183,10 @@ void Ending_8018D814(u32 arg0, AssetInfo* asset) { gDPSetPrimColor(gMasterDisp++, 0, 0, asset->prim.r, asset->prim.g, asset->prim.b, alpha); - TextureRect_8bIA(&gMasterDisp, sLargeText_1997_1, 16, 15, asset->unk_18.x, asset->unk_18.y, 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, sLargeText_1997_9, 16, 15, asset->unk_18.x + 16.0f * 1, asset->unk_18.y, 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, sLargeText_1997_9, 16, 15, asset->unk_18.x + 16.0f * 2, asset->unk_18.y, 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, sLargeText_1997_7, 16, 15, asset->unk_18.x + 16.0f * 3, asset->unk_18.y, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, sLargeText_1997_1, 16, 15, asset->unk_18.x, asset->unk_18.y, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, sLargeText_1997_9, 16, 15, asset->unk_18.x + 16.0f * 1, asset->unk_18.y, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, sLargeText_1997_9, 16, 15, asset->unk_18.x + 16.0f * 2, asset->unk_18.y, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, sLargeText_1997_7, 16, 15, asset->unk_18.x + 16.0f * 3, asset->unk_18.y, 1.0f, 1.0f); } void Ending_8018DA0C(u32 arg0, AssetInfo* asset) { @@ -312,9 +312,9 @@ void Ending_8018E1B8(u32 arg0, AssetInfo* asset) { f32 temp; if ((asset->unk_18.z + (arg0 - asset->unk_0C) * asset->unk_3C.z) < D_ending_801985D0.z) { - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); } else { - RCP_SetupDL(&gMasterDisp, 0x3F); + RCP_SetupDL(&gMasterDisp, SETUPDL_63); } gSPFogPosition(gMasterDisp++, asset->fogNear, asset->fogFar); @@ -371,9 +371,9 @@ void Ending_8018E7B8(u32 arg0, AssetInfo* asset) { f32 temp; if ((asset->unk_18.z + (arg0 - asset->unk_0C) * asset->unk_3C.z) < D_ending_801985D0.z) { - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); } else { - RCP_SetupDL(&gMasterDisp, 0x3F); + RCP_SetupDL(&gMasterDisp, SETUPDL_63); } gSPFogPosition(gMasterDisp++, asset->fogNear, asset->fogFar); @@ -556,7 +556,7 @@ void Ending_8018F64C(u32 arg0, AssetInfo* asset) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_D009A40); - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.8f + (arg0 % 3) * 0.01f, 0.3f + (arg0 % 3) * 0.01f, 0.8f + (arg0 % 3) * 0.01f, @@ -623,7 +623,7 @@ void Ending_8018FC60(u32 arg0, AssetInfo* asset) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_D00B880); - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -50.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.5f + (arg0 % 3) * 0.01f, 0.3f + (arg0 % 3) * 0.01f, 0.5f + (arg0 % 3) * 0.01f, diff --git a/src/overlays/ovl_i1/fox_tr.c b/src/overlays/ovl_i1/fox_tr.c index 2dd64071..7ce67fdf 100644 --- a/src/overlays/ovl_i1/fox_tr.c +++ b/src/overlays/ovl_i1/fox_tr.c @@ -9,7 +9,7 @@ void Training_801988E0(void) { if (gRingPassCount != 0) { - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); func_hud_800869A0(250.0f, 50.0f, gRingPassCount, 1.0f, 0, 999); } diff --git a/src/overlays/ovl_i1/fox_ve1.c b/src/overlays/ovl_i1/fox_ve1.c index 188738c2..71be172f 100644 --- a/src/overlays/ovl_i1/fox_ve1.c +++ b/src/overlays/ovl_i1/fox_ve1.c @@ -891,20 +891,20 @@ bool Venom1_801937F4(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* t if (!(D_i1_8019B838[D_i1_8019A748[i].index].unk_7C & 1)) { if (D_i1_8019B838[D_i1_8019A748[i].index].unk_00 > 0) { if ((D_i1_8019B838[D_i1_8019A748[i].index].unk_02[2] & 2) == 2) { - RCP_SetupDL(&gMasterDisp, 0x1E); + RCP_SetupDL(&gMasterDisp, SETUPDL_30); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); if (*dList != NULL) { gSPDisplayList(gMasterDisp++, *dList); } - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); } else if (i == 15) { - RCP_SetupDL(&gMasterDisp, 0x1E); + RCP_SetupDL(&gMasterDisp, SETUPDL_30); blue = 255 - (s32) this->fwork[16]; gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, blue, blue, 255); if (*dList != NULL) { gSPDisplayList(gMasterDisp++, *dList); } - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); } else { if (*dList != NULL) { gSPDisplayList(gMasterDisp++, *dList); @@ -916,7 +916,7 @@ bool Venom1_801937F4(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* t green = D_i1_8019B838[D_i1_8019A748[i].index].unk_6C; red = D_i1_8019B838[D_i1_8019A748[i].index].unk_64; if (*dList != NULL) { - RCP_SetupDL(&gMasterDisp, 0x1F); + RCP_SetupDL(&gMasterDisp, SETUPDL_31); if (blue > 128) { blue = 128; } @@ -929,18 +929,18 @@ bool Venom1_801937F4(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* t gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, red, green, blue, 255); gDPSetEnvColor(gMasterDisp++, 255, 255, 255, 0); gSPDisplayList(gMasterDisp++, D_i1_8019A748[i].dList); - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); } } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); gSPDisplayList(gMasterDisp++, D_i1_8019A748[i].dList); } } else { - RCP_SetupDL(&gMasterDisp, 0x22); + RCP_SetupDL(&gMasterDisp, SETUPDL_34); lum = D_i1_8019AD68[(s32) this->fwork[8]]; gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, lum, lum, lum, 255); gSPDisplayList(gMasterDisp++, D_i1_8019A748[i].dList); - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); } } override = true; @@ -1040,7 +1040,7 @@ void Venom1_80193D64(s32 limbIndex, Vec3f* rot, void* thisx) { } break; } - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); var_s6 = D_i1_8019A820; var_s7 = D_i1_8019B838; @@ -1068,7 +1068,7 @@ void Venom1_80193D64(s32 limbIndex, Vec3f* rot, void* thisx) { } } } - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); } #ifdef NON_MATCHING @@ -2320,7 +2320,7 @@ void Venom1_Boss_Update(Boss* boss); #endif void Venom1_80198310(Boss* boss) { - RCP_SetupDL(&gMasterDisp, 0x41); + RCP_SetupDL(&gMasterDisp, SETUPDL_65); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 0); Matrix_Translate(gGfxMatrix, 0.0f, -5.0f + gCameraShakeY, 0.0f, MTXF_APPLY); diff --git a/src/overlays/ovl_i2/fox_sx.c b/src/overlays/ovl_i2/fox_sx.c index 2e859f6c..64319094 100644 --- a/src/overlays/ovl_i2/fox_sx.c +++ b/src/overlays/ovl_i2/fox_sx.c @@ -166,7 +166,7 @@ void SectorX_8018F884(Actor* actor) { case -1: actor->obj.rot.y = RAD_TO_DEG(-gPlayer[gPlayerNum].camYaw); actor->obj.rot.x = RAD_TO_DEG(gPlayer[gPlayerNum].camPitch); - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); gDPSetPrimColor(gMasterDisp++, 0, 0, 220, 70, 30, 255); Matrix_Scale(gGfxMatrix, 70.0f, 70.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -1154,9 +1154,9 @@ bool SectorX_80192AF0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* } if ((boss->timer_05C % 2) == 0) { - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); } else { - RCP_SetupDL(&gMasterDisp, 0x1B); + RCP_SetupDL(&gMasterDisp, SETUPDL_27); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 0, 0, 255); } @@ -1188,7 +1188,7 @@ bool SectorX_80192AF0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, *dList); if (boss->swork[4] == 0) { - RCP_SetupDL(&gMasterDisp, 0x29); + RCP_SetupDL(&gMasterDisp, SETUPDL_41); if (((gGameFrameCount % 2) == 0)) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); } else { diff --git a/src/overlays/ovl_i3/fox_a6.c b/src/overlays/ovl_i3/fox_a6.c index 47ca2dc8..676906c8 100644 --- a/src/overlays/ovl_i3/fox_a6.c +++ b/src/overlays/ovl_i3/fox_a6.c @@ -1765,12 +1765,12 @@ void Area6_8018BCD4(Vec3f* arg0, f32 arg1, f32 arg2, Vec3f* arg3, s32 arg4, f32 Vec3f sp90 = { 0.0f, 0.0f, 0.0f }; if (D_i3_801C22F0.unk_24 != 0.0f) { - RCP_SetupDL(&gMasterDisp, 0x17); + RCP_SetupDL(&gMasterDisp, SETUPDL_23); if (D_i3_801C22F0.unk_24 != 255.0f) { - RCP_SetupDL(&gMasterDisp, 0x47); + RCP_SetupDL(&gMasterDisp, SETUPDL_71); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) D_i3_801C22F0.unk_24); } else if (arg4 != 0) { - RCP_SetupDL(&gMasterDisp, 0x1B); + RCP_SetupDL(&gMasterDisp, SETUPDL_27); if (arg7 < 18.0f) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 255, 255); } else { @@ -1853,14 +1853,14 @@ void Area6_8018C0D0(f32* arg0, f32 arg1, Vec3f* arg2, f32 arg3, s32 arg4) { Matrix_Scale(gCalcMatrix, var_fs3, var_fs3, 1.0f, MTXF_APPLY); Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - RCP_SetupDL(&gMasterDisp, 0x31); + RCP_SetupDL(&gMasterDisp, SETUPDL_49); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, (s32) D_i3_801C22F0.r[arg4], (s32) D_i3_801C22F0.g[arg4], (s32) D_i3_801C22F0.b[arg4], 255); gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 255); gSPDisplayList(gMasterDisp++, D_1024AC0); Matrix_MultVec3f(gCalcMatrix, &spB0, arg2); } else { - RCP_SetupDL(&gMasterDisp, 0x2F); + RCP_SetupDL(&gMasterDisp, SETUPDL_47); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 64, 64, 192); Matrix_Translate(gCalcMatrix, 0.0f, -60.0f, 0.0f, MTXF_APPLY); Matrix_Scale(gCalcMatrix, 2.0f, 3.0f, 1.0f, MTXF_APPLY); @@ -1888,7 +1888,7 @@ void Area6_Boss_Draw(Boss* bossA6) { s32 j; if (bossA6->state == 0) { - RCP_SetupDL(&gMasterDisp, 0x31); + RCP_SetupDL(&gMasterDisp, SETUPDL_49); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) D_i3_801C22F0.unk_24); gDPSetEnvColor(gMasterDisp++, 255, 255, 0, 255); Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 10.0f, MTXF_APPLY); @@ -1899,7 +1899,7 @@ void Area6_Boss_Draw(Boss* bossA6) { Animation_GetFrameData(&D_A6_6018994, 0, jointTable); if (D_i3_801C22F0.unk_24 != 255.0f) { - RCP_SetupDL(&gMasterDisp, 0x47); + RCP_SetupDL(&gMasterDisp, SETUPDL_71); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) D_i3_801C22F0.unk_24); spAC.x = 0.0f; @@ -1919,7 +1919,7 @@ void Area6_Boss_Draw(Boss* bossA6) { Matrix_RotateZ(gGfxMatrix, -(f32) gGameFrameCount * 10.0f * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, bossA6->fwork[A6_FWK_34], bossA6->fwork[A6_FWK_35], 1.0f, MTXF_APPLY); } else { - RCP_SetupDL(&gMasterDisp, 0x1B); + RCP_SetupDL(&gMasterDisp, SETUPDL_27); if (bossA6->timer_05C & 1) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } else { @@ -2069,7 +2069,7 @@ void Area6_Boss_Draw(Boss* bossA6) { } } Matrix_Push(&gGfxMatrix); - RCP_SetupDL(&gMasterDisp, 0x47); + RCP_SetupDL(&gMasterDisp, SETUPDL_71); Matrix_Translate(gGfxMatrix, 0.0f, 2.0f, 70.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.7f, MTXF_APPLY); @@ -2084,7 +2084,7 @@ void Area6_Boss_Draw(Boss* bossA6) { gSPDisplayList(gMasterDisp++, D_A6_601B2B0); Matrix_Pop(&gGfxMatrix); - RCP_SetupDL(&gMasterDisp, 0x47); + RCP_SetupDL(&gMasterDisp, SETUPDL_71); if (D_i3_801C22F0.unk_24 != 255.0f) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, bossA6->swork[A6_SWK_22], bossA6->swork[A6_SWK_23], bossA6->swork[A6_SWK_24], (s32) D_i3_801C22F0.unk_28[-1]); diff --git a/src/overlays/ovl_i3/fox_aq.c b/src/overlays/ovl_i3/fox_aq.c index 07ca21af..98c3fb2c 100644 --- a/src/overlays/ovl_i3/fox_aq.c +++ b/src/overlays/ovl_i3/fox_aq.c @@ -651,7 +651,7 @@ void Aquas_801AA20C(void) { if (gPlayer[0].unk_234 != 0) { Matrix_Push(&gGfxMatrix); Math_SmoothStepToF(&D_i3_801C41B8[5], 3.0f, 1.0f, 4.0f, 0.0001f); - RCP_SetupDL(&gMasterDisp, 0x3D); + RCP_SetupDL(&gMasterDisp, SETUPDL_61); if (D_i3_801C4190[3] == 0) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); @@ -1807,16 +1807,16 @@ void Aquas_801ADF7C(f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 zRot, if (index < 2) { if (!flag) { - RCP_SetupDL(&gMasterDisp, 0x39); + RCP_SetupDL(&gMasterDisp, SETUPDL_57); } else { - RCP_SetupDL(&gMasterDisp, 0x3D); + RCP_SetupDL(&gMasterDisp, SETUPDL_61); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } } else { if (!flag) { - RCP_SetupDL(&gMasterDisp, 0x39); + RCP_SetupDL(&gMasterDisp, SETUPDL_57); } else { - RCP_SetupDL(&gMasterDisp, 0x3D); + RCP_SetupDL(&gMasterDisp, SETUPDL_61); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } } @@ -2081,13 +2081,13 @@ void Aquas_801AEB44(Actor* actor) { MTXF_APPLY); if (actor->state != 0) { - RCP_SetupDL(&gMasterDisp, 0x20); + RCP_SetupDL(&gMasterDisp, SETUPDL_32); } else if (gBosses[0].swork[AQ_SWK_0] == 1) { - RCP_SetupDL(&gMasterDisp, 4); + RCP_SetupDL(&gMasterDisp, SETUPDL_4); } else if ((actor->timer_0C6 % 2) == 0) { - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); } else { - RCP_SetupDL(&gMasterDisp, 0x16); + RCP_SetupDL(&gMasterDisp, SETUPDL_22); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } @@ -2410,9 +2410,9 @@ void Aquas_801B099C(Actor* actor) { Matrix_SetGfxMtx(&gMasterDisp); if ((actor->timer_0C6 % 2) == 0) { - RCP_SetupDL(&gMasterDisp, 0x39); + RCP_SetupDL(&gMasterDisp, SETUPDL_57); } else { - RCP_SetupDL(&gMasterDisp, 0x3D); + RCP_SetupDL(&gMasterDisp, SETUPDL_61); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } @@ -2507,7 +2507,7 @@ void Aquas_801B0B60(Actor* actor) { void Aquas_801B0EC0(Actor* actor) { if (actor->timer_0BC == 0) { Graphics_SetScaleMtx(0.8f); - RCP_SetupDL(&gMasterDisp, 0x3D); + RCP_SetupDL(&gMasterDisp, SETUPDL_61); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, actor->iwork[1], actor->iwork[2], actor->iwork[3], 255); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_AQ_6024A50); @@ -3431,13 +3431,13 @@ bool Aquas_801B42AC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); if ((D_i3_801C42A0[0] != 255) && (limbIndex != 27)) { - RCP_SetupDL(&gMasterDisp, 0x3A); + RCP_SetupDL(&gMasterDisp, SETUPDL_58); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, D_i3_801C42A0[0]); } else if ((sBossAQlimbTimers[limbIndex] % 2) == 0) { - RCP_SetupDL(&gMasterDisp, 0x39); + RCP_SetupDL(&gMasterDisp, SETUPDL_57); } else { sp50 = true; - RCP_SetupDL(&gMasterDisp, 0x3D); + RCP_SetupDL(&gMasterDisp, SETUPDL_61); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } @@ -3450,7 +3450,7 @@ bool Aquas_801B42AC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th break; case AQ_LIMB_5: - RCP_SetupDL(&gMasterDisp, 0x3D); + RCP_SetupDL(&gMasterDisp, SETUPDL_61); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, gBosses[0].swork[AQ_SWK_14], gBosses[0].swork[AQ_SWK_15], gBosses[0].swork[AQ_SWK_16], 255); rot->x = D_i3_801C4308[14]; @@ -3500,7 +3500,7 @@ bool Aquas_801B42AC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th sp54 = D_i3_801C4308[68]; if (sp50) { - RCP_SetupDL(&gMasterDisp, 0x3D); + RCP_SetupDL(&gMasterDisp, SETUPDL_61); if (gBosses[0].health != 0) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } else { @@ -3692,12 +3692,12 @@ bool Aquas_801B4DDC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th Actor* this = (Actor*) thisx; if ((this->timer_0C6 % 2) == 0) { - RCP_SetupDL(&gMasterDisp, 0x39); + RCP_SetupDL(&gMasterDisp, SETUPDL_57); if ((limbIndex > 0) && (limbIndex < 5)) { - RCP_SetupDL(&gMasterDisp, 0x3C); + RCP_SetupDL(&gMasterDisp, SETUPDL_60); } } else { - RCP_SetupDL(&gMasterDisp, 0x3D); + RCP_SetupDL(&gMasterDisp, SETUPDL_61); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } return false; @@ -3937,15 +3937,15 @@ bool Aquas_801B5C18(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th Actor* this = (Actor*) thisx; if ((this->timer_0C6 % 2) == 0) { - RCP_SetupDL(&gMasterDisp, 0x39); + RCP_SetupDL(&gMasterDisp, SETUPDL_57); } else if ((limbIndex < 7) || (limbIndex >= 9)) { - RCP_SetupDL(&gMasterDisp, 0x3D); + RCP_SetupDL(&gMasterDisp, SETUPDL_61); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } switch (limbIndex) { case 7: - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) this->fwork[4]); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); sp6C = this->fwork[1]; @@ -3953,7 +3953,7 @@ bool Aquas_801B5C18(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th sp64 = this->fwork[3]; break; case 8: - RCP_SetupDL(&gMasterDisp, 0x3D); + RCP_SetupDL(&gMasterDisp, SETUPDL_61); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) this->fwork[4]); break; } @@ -4063,7 +4063,7 @@ void Aquas_801B619C(Actor* actor) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, actor->fwork[8], actor->fwork[9], actor->fwork[10], MTXF_APPLY); Matrix_Scale(gGfxMatrix, actor->fwork[5], actor->fwork[6], actor->fwork[7], MTXF_APPLY); - RCP_SetupDL(&gMasterDisp, 0x31); + RCP_SetupDL(&gMasterDisp, SETUPDL_49); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) actor->iwork[12]); gDPSetEnvColor(gMasterDisp++, 127, 127, 0, (s32) actor->iwork[12]); Matrix_SetGfxMtx(&gMasterDisp); @@ -4509,9 +4509,9 @@ void Aquas_801B7754(s32 limbIndex, Vec3f* rot, void* thisx) { void Aquas_801B7A24(Actor* actor) { Vec3f sp30[30]; - RCP_SetupDL(&gMasterDisp, 0x39); + RCP_SetupDL(&gMasterDisp, SETUPDL_57); if ((actor->timer_0C6 % 2) != 0) { - RCP_SetupDL(&gMasterDisp, 0x3D); + RCP_SetupDL(&gMasterDisp, SETUPDL_61); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } Animation_GetFrameData(&D_AQ_60260EC, actor->animFrame, sp30); @@ -4847,14 +4847,14 @@ void Aquas_801B7C78(Actor* actor) { bool Aquas_801B8C50(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { Actor* this = thisx; - RCP_SetupDL(&gMasterDisp, 0x3A); + RCP_SetupDL(&gMasterDisp, SETUPDL_58); if ((this->timer_0C6 % 2) != 0) { - RCP_SetupDL(&gMasterDisp, 0x22); + RCP_SetupDL(&gMasterDisp, SETUPDL_34); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } if ((this->timer_0C6 == 0) && ((this->fwork[6] <= 254.0f) || (this->state >= 4))) { - RCP_SetupDL(&gMasterDisp, 0x22); + RCP_SetupDL(&gMasterDisp, SETUPDL_34); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, (s32) this->fwork[4], (s32) this->fwork[5], (s32) this->fwork[6], 255); } @@ -5234,12 +5234,12 @@ void Aquas_801B9DB0(s32 limbIndex, Vec3f* rot, void* thisx) { void Aquas_801BA108(Actor* actor) { Vec3f sp40[30]; - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); if ((actor->timer_0C6 % 2) != 0) { - RCP_SetupDL(&gMasterDisp, 0x1E); + RCP_SetupDL(&gMasterDisp, SETUPDL_30); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } else if (actor->state == 2) { - RCP_SetupDL(&gMasterDisp, 0x1E); + RCP_SetupDL(&gMasterDisp, SETUPDL_30); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 95, 31, 255); } @@ -5941,7 +5941,7 @@ bool Aquas_801BC530(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th f32 sp4C = 0.0f; Actor* this = (Actor*) thisx; - RCP_SetupDL(&gMasterDisp, 0x29); + RCP_SetupDL(&gMasterDisp, SETUPDL_41); if ((this->timer_0C6 % 2) == 0) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 191, 255, 223, (s32) this->fwork[1]); @@ -6204,7 +6204,7 @@ void Aquas_801BD264(Actor* actor) { Vec3f sp40[30]; if (actor->state != 0) { - RCP_SetupDL(&gMasterDisp, 0x37); + RCP_SetupDL(&gMasterDisp, SETUPDL_55); switch (actor->iwork[0]) { case 0: if (actor->state != 0) { @@ -6520,7 +6520,7 @@ void Aquas_801BE034(Actor* actor) { } void Aquas_801BE0F0(Actor* actor) { - RCP_SetupDL(&gMasterDisp, 0x3D); + RCP_SetupDL(&gMasterDisp, SETUPDL_61); Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 255, 255, 255); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); @@ -6668,13 +6668,13 @@ void Aquas_801BE3F8(Actor* actor) { // OBJ_ACTOR_270 draw void Aquas_801BEB1C(Actor* actor) { Graphics_SetScaleMtx(3.0f); - RCP_SetupDL(&gMasterDisp, 0x38); + RCP_SetupDL(&gMasterDisp, SETUPDL_56); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 143, 143, 255); Animation_GetFrameData(&D_AQ_602201C, actor->animFrame, actor->vwork); Animation_DrawSkeleton(1, D_AQ_60220E8, actor->vwork, NULL, NULL, &actor->index, &gIdentityMatrix); if (actor->health != 0) { - RCP_SetupDL(&gMasterDisp, 0x37); + RCP_SetupDL(&gMasterDisp, SETUPDL_55); Matrix_Scale(gGfxMatrix, actor->fwork[0], actor->fwork[1], actor->fwork[2], MTXF_APPLY); Matrix_Translate(gGfxMatrix, 0.0f, -8.0f, 51.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); diff --git a/src/overlays/ovl_i3/fox_so.c b/src/overlays/ovl_i3/fox_so.c index 97e08d68..3d6fd0a6 100644 --- a/src/overlays/ovl_i3/fox_so.c +++ b/src/overlays/ovl_i3/fox_so.c @@ -513,7 +513,7 @@ void Solar_8019F7AC(Actor* actor) { case OBJ_ACTOR_276: if (((gGameFrameCount % 2) == 0)) { - RCP_SetupDL(&gMasterDisp, 0x29); + RCP_SetupDL(&gMasterDisp, SETUPDL_41); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255); } gSPDisplayList(gMasterDisp++, D_SO_6017090); @@ -526,7 +526,7 @@ void Solar_8019F7AC(Actor* actor) { Matrix_Pop(&gGfxMatrix); Graphics_SetScaleMtx(actor->scale * 3.5f); - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 128, 128, 160); gSPDisplayList(gMasterDisp++, D_i3_801BF92C[actor->animFrame]); } @@ -923,10 +923,10 @@ void Solar_801A0AF0(Effect* effect) { case 5: case 6: case 7: - RCP_SetupDL(&gMasterDisp, 0x35); + RCP_SetupDL(&gMasterDisp, SETUPDL_53); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 128, 128, effect->unk_44); gSPDisplayList(gMasterDisp++, D_i3_801BF92C[effect->unk_4C]); - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); break; } } diff --git a/src/overlays/ovl_i3/fox_zo.c b/src/overlays/ovl_i3/fox_zo.c index a0f8c21b..861fd3d3 100644 --- a/src/overlays/ovl_i3/fox_zo.c +++ b/src/overlays/ovl_i3/fox_zo.c @@ -3300,7 +3300,7 @@ void Zoness_8019969C(Actor* actor) { } void Zoness_8019983C(Actor* actor) { - RCP_SetupDL(&gMasterDisp, 70); + RCP_SetupDL(&gMasterDisp, SETUPDL_70); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); Matrix_Scale(gGfxMatrix, 2.6f, 2.6f, 2.6f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -3727,7 +3727,7 @@ void Zoness_8019ACCC(Actor* actor) { Matrix_RotateX(gGfxMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 2.6f, 2.6f, 2.6f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - RCP_SetupDL(&gMasterDisp, 70); + RCP_SetupDL(&gMasterDisp, SETUPDL_70); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); gSPDisplayList(gMasterDisp++, D_ZO_6004380); Matrix_RotateY(gGfxMatrix, sZoFwork[ZO_BSF_19] * M_DTOR, MTXF_APPLY); @@ -4300,7 +4300,7 @@ void Zoness_8019CE58(Actor* actor) { Gfx* temp_v0_8; Gfx* temp_v0_9; - RCP_SetupDL(&gMasterDisp, 72); + RCP_SetupDL(&gMasterDisp, SETUPDL_72); if (actor->iwork[0] != 0) { Matrix_Translate(gGfxMatrix, 0.0f, actor->fwork[0], 0.0f, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, (actor->fwork[4] + actor->obj.rot.z) * M_DTOR, MTXF_APPLY); diff --git a/src/overlays/ovl_i4/fox_bo.c b/src/overlays/ovl_i4/fox_bo.c index b7767f44..34d86853 100644 --- a/src/overlays/ovl_i4/fox_bo.c +++ b/src/overlays/ovl_i4/fox_bo.c @@ -753,9 +753,9 @@ void Bolse_8018D7F0(Actor* actor) { bool Bolse_8018D874(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* this) { Actor* actor = (Actor*) this; - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); if (((limbIndex == 1) || (limbIndex == 2)) && ((actor->timer_0C6 % 2) != 0)) { - RCP_SetupDL(&gMasterDisp, 0x29); + RCP_SetupDL(&gMasterDisp, SETUPDL_41); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 64, 64, 255); } if (((limbIndex == 1) || (limbIndex == 2)) && ((actor->health >= 100) || (gAllRangeCheckpoint != 0))) { @@ -1002,7 +1002,7 @@ void Bolse_8018E870(Boss* boss) { continue; } Matrix_Push(&gGfxMatrix); - RCP_SetupDL(&gMasterDisp, 0x31); + RCP_SetupDL(&gMasterDisp, SETUPDL_49); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, alpha); gDPSetEnvColor(gMasterDisp++, 255, 56, 56, alpha); Matrix_Translate(gGfxMatrix, D_i4_801A0488[i].unk_0C, D_i4_801A0488[i].unk_10, D_i4_801A0488[i].unk_14, @@ -1838,13 +1838,13 @@ void Bolse_80191180(Effect* effect) { break; case 1: - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_44); gDPSetEnvColor(gMasterDisp++, 0, 128, 255, effect->unk_44); Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); break; } } @@ -1969,7 +1969,7 @@ void Bolse_801912FC(Boss* boss) { bool Bolse_801918E4(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* this) { Boss* boss = (Boss*) this; - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); switch (limbIndex) { case 1: @@ -1980,7 +1980,7 @@ bool Bolse_801918E4(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th case 6: case 7: case 8: - RCP_SetupDL(&gMasterDisp, 0x29); + RCP_SetupDL(&gMasterDisp, SETUPDL_41); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, (s32) D_i4_8019EEC0, 255); if (boss->swork[limbIndex - 1] <= 0) { *dList = NULL; @@ -1996,7 +1996,7 @@ bool Bolse_801918E4(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th case 15: case 16: if ((boss->swork[3 + limbIndex] % 2) != 0) { - RCP_SetupDL(&gMasterDisp, 0x29); + RCP_SetupDL(&gMasterDisp, SETUPDL_41); if (boss->swork[3 + limbIndex] > 1000) { gDPSetPrimColor(gMasterDisp++, 0, 0, 64, 64, 255, 255); } else { @@ -2093,7 +2093,7 @@ void Bolse_80191DB0(Boss* boss) { if (((gGameFrameCount % 2) == 0)) { alpha *= 1.7f; } - RCP_SetupDL(&gMasterDisp, 0x29); + RCP_SetupDL(&gMasterDisp, SETUPDL_41); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, alpha); Matrix_Scale(gGfxMatrix, 1.2f, 0.55f, 1.2f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -2185,14 +2185,14 @@ void Bolse_DrawDynamicGround(void) { gSPFogPosition(gMasterDisp++, gFogNear, gFogFar); if (gBosses[1].obj.status == OBJ_ACTIVE) { - RCP_SetupDL(&gMasterDisp, 0x22); + RCP_SetupDL(&gMasterDisp, SETUPDL_34); if ((gGameFrameCount % 2) != 0) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 128, 160, 255); } else { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 192, 224, 255); } } else { - RCP_SetupDL(&gMasterDisp, 0x21); + RCP_SetupDL(&gMasterDisp, SETUPDL_33); } Matrix_Push(&gGfxMatrix); diff --git a/src/overlays/ovl_i4/fox_ka.c b/src/overlays/ovl_i4/fox_ka.c index 079d5a0b..ea4f24c9 100644 --- a/src/overlays/ovl_i4/fox_ka.c +++ b/src/overlays/ovl_i4/fox_ka.c @@ -264,7 +264,7 @@ void Katina_LaserEnergyParticlesUpdate(Effect358* this) { } void Katina_LaserEnergyParticlesDraw(Effect358* this) { - RCP_SetupDL(&gMasterDisp, 67); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0, 0, 48, 48, 255, this->unk_44); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, this->unk_44); @@ -274,7 +274,7 @@ void Katina_LaserEnergyParticlesDraw(Effect358* this) { gSPDisplayList(gMasterDisp++, D_1024AC0); - RCP_SetupDL(&gMasterDisp, 64); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); } // Explosion/Fire effect with smoke. @@ -600,7 +600,7 @@ void Katina_Base_Draw(Frontlinebase* this) { if (this->state == KA_BOSS_BASE_IDLE) { gSPDisplayList(gMasterDisp++, aKaFLBaseDL); } else { - RCP_SetupDL(&gMasterDisp, 57); + RCP_SetupDL(&gMasterDisp, SETUPDL_57); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, aKaFLBaseDestroyedDL); } @@ -1551,7 +1551,7 @@ void Katina_BossUpdate(Saucerer* this) { bool Katina_BossOverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { Saucerer* boss = (Saucerer*) data; - RCP_SetupDL(&gMasterDisp, 29); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); gDPSetPrimColor(gMasterDisp++, 0, 0, 40, 40, 255, 255); switch (limbIndex) { @@ -1559,11 +1559,11 @@ bool Katina_BossOverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot->y += boss->fwork[BOSS_HATCH_1_ANGLE]; if ((boss->swork[BOSS_HATCH_1_FLASH_TIMER] % 2) != 0) { - RCP_SetupDL(&gMasterDisp, 30); + RCP_SetupDL(&gMasterDisp, SETUPDL_30); } if (boss->swork[BOSS_HATCH_1_HP] <= 0) { - RCP_SetupDL(&gMasterDisp, 57); + RCP_SetupDL(&gMasterDisp, SETUPDL_57); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); *dList = aKaDestroyedHatchDL; } @@ -1573,11 +1573,11 @@ bool Katina_BossOverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot->y += boss->fwork[BOSS_HATCH_2_ANGLE]; if ((boss->swork[BOSS_HATCH_2_FLASH_TIMER] % 2) != 0) { - RCP_SetupDL(&gMasterDisp, 30); + RCP_SetupDL(&gMasterDisp, SETUPDL_30); } if (boss->swork[BOSS_HATCH_2_HP] <= 0) { - RCP_SetupDL(&gMasterDisp, 57); + RCP_SetupDL(&gMasterDisp, SETUPDL_57); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); *dList = aDestroyedHatch2DL; } @@ -1587,11 +1587,11 @@ bool Katina_BossOverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot->y += boss->fwork[BOSS_HATCH_3_ANGLE]; if ((boss->swork[BOSS_HATCH_3_FLASH_TIMER] % 2) != 0) { - RCP_SetupDL(&gMasterDisp, 30); + RCP_SetupDL(&gMasterDisp, SETUPDL_30); } if (boss->swork[BOSS_HATCH_3_HP] <= 0) { - RCP_SetupDL(&gMasterDisp, 57); + RCP_SetupDL(&gMasterDisp, SETUPDL_57); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); *dList = aDestroyedHatch3DL; } @@ -1601,11 +1601,11 @@ bool Katina_BossOverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot->y -= boss->fwork[BOSS_HATCH_4_ANGLE]; if ((boss->swork[BOSS_HATCH_4_FLASH_TIMER] % 2) != 0) { - RCP_SetupDL(&gMasterDisp, 30); + RCP_SetupDL(&gMasterDisp, SETUPDL_30); } if (boss->swork[BOSS_HATCH_4_HP] <= 0) { - RCP_SetupDL(&gMasterDisp, 57); + RCP_SetupDL(&gMasterDisp, SETUPDL_57); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); *dList = aDestroyedHatch4DL; } @@ -1615,11 +1615,11 @@ bool Katina_BossOverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* pos->x -= boss->fwork[BOSS_CORE_LEVEL]; if ((boss->swork[BOSS_CORE_FLASH_TIMER] % 2) != 0) { - RCP_SetupDL(&gMasterDisp, 30); + RCP_SetupDL(&gMasterDisp, SETUPDL_30); } if (boss->swork[BOSS_CORE_HP] <= 0) { - RCP_SetupDL(&gMasterDisp, 57); + RCP_SetupDL(&gMasterDisp, SETUPDL_57); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); *dList = aDestroyedCoreDL; } @@ -1627,7 +1627,7 @@ bool Katina_BossOverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* case 10: if (boss->health < 0) { - RCP_SetupDL(&gMasterDisp, 57); + RCP_SetupDL(&gMasterDisp, SETUPDL_57); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); *dList = aKaDestroyedSaucererDL; } @@ -1654,7 +1654,7 @@ void Katina_BossDraw(Saucerer* this) { gSPFogPosition(gMasterDisp++, gFogNear, gFogFar); if (this->fwork[BOSS_LASER_LIGHT_SCALE] > 0.0f) { - RCP_SetupDL(&gMasterDisp, 67); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); Matrix_Push(&gGfxMatrix); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 0, 255, 255, 255); @@ -1680,7 +1680,7 @@ void Katina_BossDraw(Saucerer* this) { } if (this->fwork[BOSS_LASER_LENGTH] > 0.0f) { - RCP_SetupDL(&gMasterDisp, 41); + RCP_SetupDL(&gMasterDisp, SETUPDL_41); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 128); Matrix_RotateX(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.3f, this->fwork[BOSS_LASER_LENGTH], 0.3f, MTXF_APPLY); @@ -2628,10 +2628,10 @@ void Katina_EnemyDraw(ActorAllRange* this) { } if (this->iwork[KA_ACTOR_LOW_POLY]) { - RCP_SetupDL(&gMasterDisp, 34); + RCP_SetupDL(&gMasterDisp, SETUPDL_34); gDPSetPrimColor(gMasterDisp++, 0, 0, 80, 64, 64, 255); } else { - RCP_SetupDL(&gMasterDisp, 29); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); } if ((this->timer_0C6 % 2) == 0) { diff --git a/src/overlays/ovl_i4/fox_sz.c b/src/overlays/ovl_i4/fox_sz.c index 6a0f87cd..1594e92b 100644 --- a/src/overlays/ovl_i4/fox_sz.c +++ b/src/overlays/ovl_i4/fox_sz.c @@ -1700,7 +1700,7 @@ void SectorZ_8019E234(Actor* actor) { void SectorZ_8019E3A8(Actor* actor) { gSPDisplayList(gMasterDisp++, D_SZ_6001A10); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - RCP_SetupDL(&gMasterDisp, 0x39); + RCP_SetupDL(&gMasterDisp, SETUPDL_57); gSPDisplayList(gMasterDisp++, D_SZ_60045E0); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); } diff --git a/src/overlays/ovl_i5/fox_ma.c b/src/overlays/ovl_i5/fox_ma.c index fa3fd441..0d7349ce 100644 --- a/src/overlays/ovl_i5/fox_ma.c +++ b/src/overlays/ovl_i5/fox_ma.c @@ -2005,7 +2005,7 @@ void Macbeth_801A0E2C(s32 limbIndex, Vec3f* rot, void* data) { bool Macbeth_801A0EB8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { Actor* actor = (Actor*) data; - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); gSPClearGeometryMode(gMasterDisp++, G_TEXTURE_GEN); if ((limbIndex == 3) || (limbIndex == 6) || (limbIndex == 9)) { gSPTexture(gMasterDisp++, 3000, 3000, 0, G_TX_RENDERTILE, G_ON); @@ -2021,10 +2021,10 @@ bool Macbeth_801A0EB8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* } rot->x += actor->fwork[2]; if (limbIndex == 5) { - RCP_SetupDL(&gMasterDisp, 0x22); + RCP_SetupDL(&gMasterDisp, SETUPDL_34); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, D_i5_801BE368[20], D_i5_801BE368[21], D_i5_801BE368[22], 255); gSPDisplayList(gMasterDisp++, D_MA_6010470); - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); } } switch (limbIndex) { @@ -2144,10 +2144,10 @@ void Macbeth_801A12C4(Actor* actor) { gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_MA_6004440); } else { - RCP_SetupDL(&gMasterDisp, 0x39); + RCP_SetupDL(&gMasterDisp, SETUPDL_57); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_MA_6022200); - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); } RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } @@ -2156,7 +2156,7 @@ void Macbeth_801A12C4(Actor* actor) { if (actor->iwork[13] < 2) { Matrix_Translate(gGfxMatrix, 0.0f, -5.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - RCP_SetupDL(&gMasterDisp, 0x39); + RCP_SetupDL(&gMasterDisp, SETUPDL_57); if ((actor->iwork[7] % 2) != 0) { RCP_SetupDL_27(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); @@ -2165,7 +2165,7 @@ void Macbeth_801A12C4(Actor* actor) { actor->iwork[7]--; } gSPDisplayList(gMasterDisp++, D_MA_6024670); - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); } break; case OBJ_ACTOR_208: @@ -2204,7 +2204,7 @@ void Macbeth_801A12C4(Actor* actor) { } Animation_DrawSkeleton(1, D_MA_601042C, spD0, Macbeth_801A0EB8, Macbeth_801A1268, actor, &gIdentityMatrix); if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) { - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); gSPClearGeometryMode(gMasterDisp++, G_TEXTURE_GEN); gSPDisplayList(gMasterDisp++, D_MA_6003370); } @@ -2231,7 +2231,7 @@ void Macbeth_801A12C4(Actor* actor) { Matrix_RotateX(gGfxMatrix, actor->fwork[28] * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); if ((gPlayer[0].trueZpos - actor->obj.pos.z) > 3000.0f) { gSPDisplayList(gMasterDisp++, D_MA_6027D40); } else if (actor->vel.z > -2.0f) { @@ -2259,10 +2259,10 @@ void Macbeth_801A12C4(Actor* actor) { gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_MA_6004440); } else { - RCP_SetupDL(&gMasterDisp, 0x39); + RCP_SetupDL(&gMasterDisp, SETUPDL_57); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_MA_6022200); - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); } RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); Matrix_Pop(&gGfxMatrix); @@ -2284,10 +2284,10 @@ void Macbeth_801A12C4(Actor* actor) { gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_MA_6004440); } else { - RCP_SetupDL(&gMasterDisp, 0x39); + RCP_SetupDL(&gMasterDisp, SETUPDL_57); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_MA_6022200); - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); } RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); Matrix_Pop(&gGfxMatrix); @@ -2298,7 +2298,7 @@ void Macbeth_801A12C4(Actor* actor) { void Macbeth_801A23AC(Scenery* scenery) { Vec3f sp78[50]; - RCP_SetupDL(&gMasterDisp, 0x39); + RCP_SetupDL(&gMasterDisp, SETUPDL_57); switch (scenery->obj.id) { case OBJ_SCENERY_94: case OBJ_SCENERY_97: @@ -2329,7 +2329,7 @@ void Macbeth_801A23AC(Scenery* scenery) { gSPDisplayList(gMasterDisp++, D_MA_6030750); break; case OBJ_SCENERY_105: - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); gSPDisplayList(gMasterDisp++, D_MA_602D380); break; case OBJ_SCENERY_104: @@ -2357,7 +2357,7 @@ void Macbeth_801A23AC(Scenery* scenery) { Matrix_Scale(gGfxMatrix, scenery->vel.z, scenery->vel.z / 2, scenery->vel.z, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); Matrix_Pop(&gGfxMatrix); } else if (scenery->state == 2) { Matrix_Push(&gGfxMatrix); @@ -2370,7 +2370,7 @@ void Macbeth_801A23AC(Scenery* scenery) { Matrix_Scale(gGfxMatrix, scenery->vel.z, scenery->vel.z / 2, scenery->vel.z, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); Matrix_Pop(&gGfxMatrix); } if (D_MA_801BE2F0[5] != 0) { @@ -2395,23 +2395,23 @@ void Macbeth_801A23AC(Scenery* scenery) { gSPDisplayList(gMasterDisp++, D_MA_6001180); break; } - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); } void Macbeth_801A2A78(Scenery* scenery) { - RCP_SetupDL(&gMasterDisp, 0x39); + RCP_SetupDL(&gMasterDisp, SETUPDL_57); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_MA_60253E0); gSPDisplayList(gMasterDisp++, D_MA_601C000); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); } void Macbeth_801A2B24(Scenery* scenery) { if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) { Object_Kill(&scenery->obj, scenery->sfxSource); } - RCP_SetupDL(&gMasterDisp, 0x39); + RCP_SetupDL(&gMasterDisp, SETUPDL_57); switch (scenery->obj.id) { case OBJ_SCENERY_77: gSPDisplayList(gMasterDisp++, D_MA_60066A0); @@ -2456,7 +2456,7 @@ void Macbeth_801A2B24(Scenery* scenery) { gSPDisplayList(gMasterDisp++, D_MA_6009C50); break; } - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); } void Macbeth_801A2DD8(Scenery* scenery) { @@ -2524,7 +2524,7 @@ void Macbeth_801A30B8(s32 limbIndex, Vec3f* rot, void* data) { void Macbeth_801A3240(Scenery* scenery) { Vec3f sp38[50]; - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); Animation_GetFrameData(&D_MA_600C4D0, 0, sp38); Animation_DrawSkeleton(1, D_MA_600C65C, sp38, NULL, Macbeth_801A30B8, scenery, &gIdentityMatrix); @@ -2832,10 +2832,10 @@ void Macbeth_801A3E98(Actor* actor) { bool Macbeth_801A41B0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { Actor* actor = (Actor*) data; - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); gDPSetTextureFilter(gMasterDisp++, G_TF_BILERP); if (limbIndex == 2) { - RCP_SetupDL(&gMasterDisp, 0x22); + RCP_SetupDL(&gMasterDisp, SETUPDL_34); gDPSetTextureFilter(gMasterDisp++, G_TF_POINT); if (actor->state >= 2) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, actor->fwork[0], actor->fwork[4], 255); @@ -2854,14 +2854,14 @@ void Macbeth_801A43BC(Actor* actor) { Animation_GetFrameData(&D_MA_602FEB4, 0, sp50); Animation_DrawSkeleton(1, D_MA_602FFA0, sp50, Macbeth_801A41B0, NULL, actor, &gIdentityMatrix); Matrix_Pop(&gGfxMatrix); - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, actor->fwork[2] + 204.0f, 0.0f, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, actor->fwork[1] * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_MA_602FFC0); Matrix_Pop(&gGfxMatrix); - RCP_SetupDL(&gMasterDisp, 0x22); + RCP_SetupDL(&gMasterDisp, SETUPDL_34); gDPSetTextureFilter(gMasterDisp++, G_TF_POINT); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, actor->fwork[0], 0, 0, 255); Matrix_Push(&gGfxMatrix); @@ -3085,13 +3085,13 @@ void Macbeth_801A4B24(Actor* actor) { bool Macbeth_801A5124(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { Actor* actor = (Actor*) data; - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); gDPSetTextureFilter(gMasterDisp++, G_TF_BILERP); if ((limbIndex == 9) || (limbIndex == 10)) { - RCP_SetupDL(&gMasterDisp, 0x39); + RCP_SetupDL(&gMasterDisp, SETUPDL_57); } if ((limbIndex > 0) && (limbIndex < 9)) { - RCP_SetupDL(&gMasterDisp, 0x22); + RCP_SetupDL(&gMasterDisp, SETUPDL_34); gDPSetTextureFilter(gMasterDisp++, G_TF_POINT); if (D_i5_801BE308[limbIndex - 1] != 0) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, actor->fwork[0], actor->fwork[4], 255); @@ -3131,7 +3131,7 @@ void Macbeth_801A54E8(Actor* actor) { Animation_GetFrameData(&D_MA_602F098, 0, sp28); Animation_DrawSkeleton(1, D_MA_602F264, sp28, Macbeth_801A5124, NULL, actor, &gIdentityMatrix); Matrix_Pop(&gGfxMatrix); - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); } s32 Macbeth_801A55D4(s32 arg0, Vec3f* arg1, Vec3f* arg2, s32 arg3) { @@ -3221,9 +3221,9 @@ void Macbeth_801A57D0(Effect* effect) { } void Macbeth_801A5AF0(Effect* effect) { - RCP_SetupDL(&gMasterDisp, 0x3C); + RCP_SetupDL(&gMasterDisp, SETUPDL_60); gSPDisplayList(gMasterDisp++, D_MA_601A840); - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); } void Macbeth_801A5B4C(Effect* effect) { @@ -3261,12 +3261,12 @@ void Macbeth_801A5B4C(Effect* effect) { } void Macbeth_801A5D68(Effect* effect) { - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 112, 255, 243, effect->unk_44); gDPSetEnvColor(gMasterDisp++, 255, 255, 255, effect->unk_44); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_MA_6012A60); - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); } void Macbeth_801A5E2C(Actor* actor) { @@ -3371,13 +3371,13 @@ void Macbeth_801A6144(Actor* actor) { } void Macbeth_801A6540(Actor* actor) { - RCP_SetupDL(&gMasterDisp, 0x39); + RCP_SetupDL(&gMasterDisp, SETUPDL_57); if ((actor->timer_0C6 % 2) != 0) { - RCP_SetupDL(&gMasterDisp, 0x3A); + RCP_SetupDL(&gMasterDisp, SETUPDL_58); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } gSPDisplayList(gMasterDisp++, D_MA_60257B0); - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); } void Macbeth_801A65E0(Scenery* scenery) { @@ -3395,11 +3395,11 @@ void Macbeth_801A6608(Scenery* scenery) { scenery->vel.x = 255.0f; } } - RCP_SetupDL(&gMasterDisp, 0x22); + RCP_SetupDL(&gMasterDisp, SETUPDL_34); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, scenery->vel.x, 0, 0, 255); } gSPDisplayList(gMasterDisp++, D_MA_6010700); - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); gSPDisplayList(gMasterDisp++, D_MA_601F270); } @@ -4706,7 +4706,7 @@ bool Macbeth_801ABC14(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* Actor* actor = (Actor*) data; s16 sp62; - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); gSPClearGeometryMode(gMasterDisp++, G_TEXTURE_GEN); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); switch (limbIndex) { @@ -4743,7 +4743,7 @@ bool Macbeth_801ABC14(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* gSPSetGeometryMode(gMasterDisp++, G_TEXTURE_GEN); break; case 8: - RCP_SetupDL(&gMasterDisp, 0x22); + RCP_SetupDL(&gMasterDisp, SETUPDL_34); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, D_i5_801BE368[20], D_i5_801BE368[21], D_i5_801BE368[22], 255); break; case 2: @@ -4784,7 +4784,7 @@ bool Macbeth_801ABC14(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* switch (limbIndex) { case 14: if ((actor->iwork[7] % 2) != 0) { - RCP_SetupDL(&gMasterDisp, 0x1C); + RCP_SetupDL(&gMasterDisp, SETUPDL_28); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } if (D_i5_801BE320[9] <= 0) { @@ -4799,7 +4799,7 @@ bool Macbeth_801ABC14(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* case 19: case 20: if ((actor->iwork[8] % 2) != 0) { - RCP_SetupDL(&gMasterDisp, 0x1C); + RCP_SetupDL(&gMasterDisp, SETUPDL_28); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } if (D_i5_801BE320[10] <= 0) { @@ -4811,7 +4811,7 @@ bool Macbeth_801ABC14(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* } if ((actor->iwork[9] % 2) != 0) { - RCP_SetupDL(&gMasterDisp, 0x1C); + RCP_SetupDL(&gMasterDisp, SETUPDL_28); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } return false; @@ -4890,7 +4890,7 @@ void Macbeth_801AC438(Actor* actor) { } bool Macbeth_801AC5AC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); gSPClearGeometryMode(gMasterDisp++, G_TEXTURE_GEN); if ((limbIndex == 1) || (limbIndex == 3)) { gSPTexture(gMasterDisp++, 3000, 3000, 0, G_TX_RENDERTILE, G_ON); @@ -5262,7 +5262,7 @@ void Macbeth_801ADAC8(Actor* actor) { Graphics_SetScaleMtx(actor->scale); RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gSPDisplayList(gMasterDisp++, D_ENMY_PLANET_4008CE0); - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); break; case 1: Matrix_Scale(gGfxMatrix, actor->fwork[0], actor->scale, 2.5f, MTXF_APPLY); @@ -5270,7 +5270,7 @@ void Macbeth_801ADAC8(Actor* actor) { RCP_SetupDL_40(); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_ENMY_PLANET_4008F70); - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); break; } } @@ -5410,18 +5410,18 @@ void Macbeth_801AE2C0(Actor* actor) { if (actor->state < 2) { Graphics_SetScaleMtx(actor->scale); if (actor->iwork[0] >= 128) { - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, actor->iwork[0]); gDPSetEnvColor(gMasterDisp++, 255, 48, 0, actor->iwork[0]); Matrix_Scale(gGfxMatrix, 1.0f, actor->fwork[2], 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_MA_6013060); - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); Matrix_Scale(gGfxMatrix, 1.0f, actor->fwork[2], 1.0f, MTXF_APPLY); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 53, 53, 53, 255 - actor->iwork[0]); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, actor->iwork[0]); } else { - RCP_SetupDL(&gMasterDisp, 0x17); + RCP_SetupDL(&gMasterDisp, SETUPDL_23); if ((actor->iwork[7] % 2) != 0) { RCP_SetupDL_27(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); @@ -5558,7 +5558,7 @@ void Macbeth_801AE87C(Effect* effect) { } void Macbeth_801AEAA0(Effect* effect) { - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); if (effect->scale2 >= 3.0f) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, effect->unk_44); gDPSetEnvColor(gMasterDisp++, 255, 0, 0, effect->unk_44); @@ -5569,7 +5569,7 @@ void Macbeth_801AEAA0(Effect* effect) { Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); } void Macbeth_801AEC04(Actor* actor) { @@ -5635,7 +5635,7 @@ void Macbeth_801AEEFC(Actor* actor) { Matrix_Scale(gGfxMatrix, actor->fwork[0], actor->fwork[2], 1.0f, MTXF_APPLY); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, -10.0f, 0.0f, MTXF_APPLY); - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 111, 175, 64, actor->fwork[1]); gDPSetEnvColor(gMasterDisp++, 255, 255, 208, actor->fwork[1]); Matrix_SetGfxMtx(&gMasterDisp); diff --git a/src/overlays/ovl_i5/fox_ti.c b/src/overlays/ovl_i5/fox_ti.c index e90c1ad5..9c784c0e 100644 --- a/src/overlays/ovl_i5/fox_ti.c +++ b/src/overlays/ovl_i5/fox_ti.c @@ -433,7 +433,7 @@ void Titania_8018A1C0(Actor* actor) { Matrix_SetGfxMtx(&gMasterDisp); if (actor->health != 0) { gSPDisplayList(gMasterDisp++, D_TI1_700B9C0); - RCP_SetupDL(&gMasterDisp, 0x21); + RCP_SetupDL(&gMasterDisp, SETUPDL_33); gSPDisplayList(gMasterDisp++, D_TI1_700C980); } } @@ -725,9 +725,9 @@ bool Titania_8018AFF0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, MTXF_APPLY); Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - RCP_SetupDL(&gMasterDisp, 0x21); + RCP_SetupDL(&gMasterDisp, SETUPDL_33); gSPDisplayList(gMasterDisp++, *dList); - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); return true; } else { return false; @@ -1048,12 +1048,12 @@ Gfx* D_TI_801B7608[10] = { void Titania_8018BE84(Actor* actor) { s32 index; - RCP_SetupDL(&gMasterDisp, 0x1E); + RCP_SetupDL(&gMasterDisp, SETUPDL_30); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); Matrix_Scale(gGfxMatrix, 1.5f, 1.5f, 1.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_TI1_7009D60); - RCP_SetupDL(&gMasterDisp, 0x22); + RCP_SetupDL(&gMasterDisp, SETUPDL_34); index = actor->iwork[0]; gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, D_i5_801B75E4[0][index], D_i5_801B75E4[1][index], D_i5_801B75E4[2][index], 255); @@ -1120,10 +1120,10 @@ bool Titania_8018C134(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if ((limbIndex == 13) && (actor->iwork[5] & 2) && (actor->iwork[6] == 0)) { - RCP_SetupDL(&gMasterDisp, 0x1E); + RCP_SetupDL(&gMasterDisp, SETUPDL_30); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); gSPDisplayList(gMasterDisp++, *dList); - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); } else { gSPDisplayList(gMasterDisp++, *dList); } @@ -1690,7 +1690,7 @@ void Titania_8018E2D8(Actor* actor) { f32 sp34; if ((actor->iwork[6] % 2) != 0) { - RCP_SetupDL(&gMasterDisp, 0x1F); + RCP_SetupDL(&gMasterDisp, SETUPDL_31); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 127, 0, 0, 255); gDPSetEnvColor(gMasterDisp++, 255, 255, 255, 255); } @@ -1978,10 +1978,10 @@ void Titania_8018EF14(Actor* actor) { gSPDisplayList(gMasterDisp++, D_TI1_7008930); if ((actor->timer_0C6 % 2) == 0) { - RCP_SetupDL(&gMasterDisp, 0x22); + RCP_SetupDL(&gMasterDisp, SETUPDL_34); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 220, 220, 220, 255); } else { - RCP_SetupDL(&gMasterDisp, 0x16); + RCP_SetupDL(&gMasterDisp, SETUPDL_22); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255); } gSPDisplayList(gMasterDisp++, D_TI1_7009510); @@ -2263,7 +2263,7 @@ bool Titania_8018FC70(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* case 2: case 3: case 7: - RCP_SetupDL(&gMasterDisp, 0x1E); + RCP_SetupDL(&gMasterDisp, SETUPDL_30); if ((D_i5_801BBEF0[30] % 2) != 0) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } else { @@ -2277,7 +2277,7 @@ bool Titania_8018FC70(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* case 9: case 10: case 11: - RCP_SetupDL(&gMasterDisp, 0x3D); + RCP_SetupDL(&gMasterDisp, SETUPDL_61); if ((D_i5_801BBEF0[30] % 2) != 0) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } else { @@ -2287,7 +2287,7 @@ bool Titania_8018FC70(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* if (*dList != NULL) { gSPDisplayList(gMasterDisp++, *dList); } - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); break; } return true; @@ -2510,11 +2510,11 @@ void Titania_8019002C(s32 limbIndex, Vec3f* rot, void* data) { Matrix_RotateY(gGfxMatrix, -sp64.y * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_i5_801BBEF4[74], D_i5_801BBEF4[74], 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - RCP_SetupDL(&gMasterDisp, 0x48); + RCP_SetupDL(&gMasterDisp, SETUPDL_72); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 255); gSPDisplayList(gMasterDisp++, D_1024AC0); - RCP_SetupDL(&gMasterDisp, 0x1E); + RCP_SetupDL(&gMasterDisp, SETUPDL_30); Matrix_Pop(&gGfxMatrix); Matrix_MultVec3f(gCalcMatrix, &D_i5_801B8D3C, (Vec3f*) &boss->fwork[29]); } @@ -2555,7 +2555,7 @@ bool Titania_801903A0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* switch (limbIndex) { case 1: case 2: - RCP_SetupDL(&gMasterDisp, 0x1E); + RCP_SetupDL(&gMasterDisp, SETUPDL_30); if ((sp20 % 2) != 0) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } else { @@ -2569,7 +2569,7 @@ bool Titania_801903A0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* case 4: case 5: case 6: - RCP_SetupDL(&gMasterDisp, 0x3D); + RCP_SetupDL(&gMasterDisp, SETUPDL_61); if ((sp20 % 2) != 0) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } else { @@ -2579,7 +2579,7 @@ bool Titania_801903A0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* if (*dList != NULL) { gSPDisplayList(gMasterDisp++, *dList); } - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); break; } return true; @@ -2879,15 +2879,15 @@ bool Titania_80190A08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* case 0: break; case 1: - RCP_SetupDL(&gMasterDisp, 0x3D); + RCP_SetupDL(&gMasterDisp, SETUPDL_61); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); break; case 2: - RCP_SetupDL(&gMasterDisp, 0x3A); + RCP_SetupDL(&gMasterDisp, SETUPDL_58); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); break; case 3: - RCP_SetupDL(&gMasterDisp, 0x22); + RCP_SetupDL(&gMasterDisp, SETUPDL_34); break; } if ((boss->swork[22] & 1) || @@ -2899,7 +2899,7 @@ bool Titania_80190A08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* gSPDisplayList(gMasterDisp++, *dList); } if (D_i5_801B7770[i][1] > 0) { - RCP_SetupDL(&gMasterDisp, 0x1E); + RCP_SetupDL(&gMasterDisp, SETUPDL_30); } else { gDPPipeSync(gMasterDisp++); } @@ -3024,11 +3024,11 @@ void Titania_80191AE8(s32 limbIndex, Vec3f* rot, void* data) { Matrix_RotateY(gGfxMatrix, -sp78.y * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_i5_801BBEF4[74], D_i5_801BBEF4[74], 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - RCP_SetupDL(&gMasterDisp, 0x48); + RCP_SetupDL(&gMasterDisp, SETUPDL_72); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 255); gSPDisplayList(gMasterDisp++, D_1024AC0); - RCP_SetupDL(&gMasterDisp, 0x1E); + RCP_SetupDL(&gMasterDisp, SETUPDL_30); Matrix_Pop(&gGfxMatrix); Matrix_MultVec3f(gCalcMatrix, &D_i5_801B8D3C, (Vec3f*) &boss->fwork[29]); break; @@ -4949,7 +4949,7 @@ void Titania_Boss_Draw(Boss* boss) { s32 temp; Matrix_Push(&gGfxMatrix); - RCP_SetupDL(&gMasterDisp, 0x1E); + RCP_SetupDL(&gMasterDisp, SETUPDL_30); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); switch (boss->state) { @@ -4996,7 +4996,7 @@ void Titania_Boss_Draw(Boss* boss) { switch (boss->state) { case 6: Matrix_Push(&gGfxMatrix); - RCP_SetupDL(&gMasterDisp, 0x45); + RCP_SetupDL(&gMasterDisp, SETUPDL_69); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 0); Matrix_RotateX(gGfxMatrix, -M_PI / 2, MTXF_APPLY); @@ -5013,7 +5013,7 @@ void Titania_Boss_Draw(Boss* boss) { case 12: case 13: Matrix_Push(&gGfxMatrix); - RCP_SetupDL(&gMasterDisp, 0x45); + RCP_SetupDL(&gMasterDisp, SETUPDL_69); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 0); Matrix_RotateX(gGfxMatrix, -M_PI / 2, MTXF_APPLY); @@ -5051,7 +5051,7 @@ void Titania_Boss_Draw(Boss* boss) { if (D_i5_801BBEF0[7] != 0) { Matrix_Push(&gGfxMatrix); sp120 = D_i5_801BBEF0[7] * 16.0f; - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_Push(&gGfxMatrix); Matrix_Scale(gGfxMatrix, sp120, 1.0f, sp120, MTXF_APPLY); @@ -5078,7 +5078,7 @@ void Titania_Boss_Draw(Boss* boss) { Matrix_Scale(gGfxMatrix, D_i5_801B8D5C[temp], D_i5_801B8D5C[temp], D_i5_801B8D5C[temp + 25], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - RCP_SetupDL(&gMasterDisp, 0x31); + RCP_SetupDL(&gMasterDisp, SETUPDL_49); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 178); gDPSetEnvColor(gMasterDisp++, 0, 128, 60, 0); gSPDisplayList(gMasterDisp++, D_TI2_7005300); @@ -5092,7 +5092,7 @@ void Titania_Boss_Draw(Boss* boss) { MTXF_APPLY); Matrix_Scale(gGfxMatrix, 4.0f, 4.0f, 4.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - RCP_SetupDL(&gMasterDisp, 0x31); + RCP_SetupDL(&gMasterDisp, SETUPDL_49); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) ((D_i5_801BBEF0[17] * 89.0f) / 3.0f)); gDPSetEnvColor(gMasterDisp++, 0, 128, 60, 0); gSPDisplayList(gMasterDisp++, D_TI2_7005300); @@ -5109,7 +5109,7 @@ void Titania_Boss_Draw(Boss* boss) { Matrix_Push(&gGfxMatrix); Matrix_Scale(gGfxMatrix, half * sp120, half * sp120, temp_fs2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - RCP_SetupDL(&gMasterDisp, 0x48); + RCP_SetupDL(&gMasterDisp, SETUPDL_72); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 178); gDPSetEnvColor(gMasterDisp++, 0, 128, 60, 0); gSPDisplayList(gMasterDisp++, D_TI_8000D90); diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index b3e62057..faf8c4ca 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -337,7 +337,7 @@ void Andross_80188528(Actor* actor) { } void Andross_80188660(Actor* actor) { - RCP_SetupDL(&gMasterDisp, 0x3D); + RCP_SetupDL(&gMasterDisp, SETUPDL_61); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); Matrix_RotateZ(gGfxMatrix, actor->rot_0F4.z * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 1.1f, 0.9f, 1.0f, MTXF_APPLY); @@ -1145,13 +1145,13 @@ bool Andross_8018B47C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* if (boss->fwork[21] >= 254.0f) { if (limbIndex == 2) { - RCP_SetupDL(&gMasterDisp, 0x16); + RCP_SetupDL(&gMasterDisp, SETUPDL_22); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, (s32) boss->fwork[25], 255, 255, 255); } else { - RCP_SetupDL(&gMasterDisp, 0x17); + RCP_SetupDL(&gMasterDisp, SETUPDL_23); } } else { - RCP_SetupDL(&gMasterDisp, 0x33); + RCP_SetupDL(&gMasterDisp, SETUPDL_51); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) boss->fwork[21]); } if ((limbIndex == 2) && (boss->swork[6] != 0)) { @@ -1179,7 +1179,7 @@ bool Andross_8018B47C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* } Matrix_SetGfxMtx(&gMasterDisp); if (((boss->swork[3] % 2) != 0) && (boss->fwork[21] >= 254.0f)) { - RCP_SetupDL(&gMasterDisp, 0x1B); + RCP_SetupDL(&gMasterDisp, SETUPDL_27); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } @@ -1208,10 +1208,10 @@ void Andross_8018B8C0(Boss* boss) { Matrix_Scale(gGfxMatrix, boss->scale, boss->scale, boss->scale, MTXF_APPLY); Animation_DrawSkeleton(0, D_VE2_600C0A4, boss->vwork, Andross_8018B47C, NULL, boss, &gIdentityMatrix); if (boss->fwork[21] >= 254) { - RCP_SetupDL(&gMasterDisp, 0x36); + RCP_SetupDL(&gMasterDisp, SETUPDL_54); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 64, 64, 255); } else { - RCP_SetupDL(&gMasterDisp, 0x46); + RCP_SetupDL(&gMasterDisp, SETUPDL_70); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 64, 64, (s32) boss->fwork[21]); } gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); @@ -1539,13 +1539,13 @@ void Andross_8018CF98(Effect* effect) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_BG_PLANET_2010A30); } else { - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); if (effect->unk_4C < 8) { Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); } gSPDisplayList(gMasterDisp++, D_i6_801A6790[effect->unk_4C]); - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); } } @@ -2822,27 +2822,27 @@ bool Andross_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* if (boss->state < 2) { *dList = NULL; } else { - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); gSPTexture(gMasterDisp++, 6600, 6600, 0, G_TX_RENDERTILE, G_ON); gSPSetGeometryMode(gMasterDisp++, G_TEXTURE_GEN); if (((limbIndex >= 23) && (limbIndex <= 32)) || (limbIndex == 50)) { if (boss->swork[5] < 0) { *dList = NULL; } else if ((boss->swork[3] % 2) != 0) { - RCP_SetupDL(&gMasterDisp, 0x1B); + RCP_SetupDL(&gMasterDisp, SETUPDL_27); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } } else if (boss->swork[4] < 0) { *dList = NULL; } else if ((boss->swork[2] % 2) != 0) { - RCP_SetupDL(&gMasterDisp, 0x1B); + RCP_SetupDL(&gMasterDisp, SETUPDL_27); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } } } else if ((boss->timer_05C % 2) == 0) { - RCP_SetupDL(&gMasterDisp, 0x1D); + RCP_SetupDL(&gMasterDisp, SETUPDL_29); } else { - RCP_SetupDL(&gMasterDisp, 0x1B); + RCP_SetupDL(&gMasterDisp, SETUPDL_27); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } @@ -2859,12 +2859,12 @@ bool Andross_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* rot->z -= boss->vwork[4].x; rot->y -= boss->vwork[4].y; if ((boss->swork[0] % 2) != 0) { - RCP_SetupDL(&gMasterDisp, 0x1B); + RCP_SetupDL(&gMasterDisp, SETUPDL_27); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } if (boss->swork[11] != 0) { *dList = D_ANDROSS_C0043D0; - RCP_SetupDL(&gMasterDisp, 0x15); + RCP_SetupDL(&gMasterDisp, SETUPDL_21); } scale = boss->fwork[17]; break; @@ -2872,12 +2872,12 @@ bool Andross_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* rot->z -= boss->vwork[5].x; rot->y -= boss->vwork[5].y; if ((boss->swork[1] % 2) != 0) { - RCP_SetupDL(&gMasterDisp, 0x1B); + RCP_SetupDL(&gMasterDisp, SETUPDL_27); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } if (boss->swork[12] != 0) { *dList = D_ANDROSS_C015740; - RCP_SetupDL(&gMasterDisp, 0x15); + RCP_SetupDL(&gMasterDisp, SETUPDL_21); } scale = boss->fwork[17]; break; @@ -2957,7 +2957,7 @@ bool Andross_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, *dList); - RCP_SetupDL(&gMasterDisp, 0x29); + RCP_SetupDL(&gMasterDisp, SETUPDL_41); switch (gGameFrameCount % 4U) { case 0: gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); @@ -2996,7 +2996,7 @@ bool Andross_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, *dList); - RCP_SetupDL(&gMasterDisp, 0x29); + RCP_SetupDL(&gMasterDisp, SETUPDL_41); switch (gGameFrameCount % 4U) { case 0: gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); @@ -3144,7 +3144,7 @@ void Andross_801928C8(Boss* boss) { MTXF_APPLY); if (boss->fwork[21] > 0.05f) { Matrix_Push(&gGfxMatrix); - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 192); gDPSetEnvColor(gMasterDisp++, 255, 0, 128, 192); Matrix_Scale(gGfxMatrix, boss->fwork[21] * 7.0f, boss->fwork[21] * 7.0f, boss->fwork[21] * 7.0f, @@ -3159,7 +3159,7 @@ void Andross_801928C8(Boss* boss) { Matrix_Scale(gGfxMatrix, boss->fwork[20] * 10.0f, boss->fwork[20] * 10.0f, boss->fwork[20] * 10.0f, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, boss->fwork[19] * M_DTOR, MTXF_APPLY); - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); if ((gGameFrameCount % 2) != 0) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 128); } else { @@ -3274,7 +3274,7 @@ void Andross_80193244(Actor* actor) { Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, alpha); gDPSetEnvColor(gMasterDisp++, 255, 128, 128, alpha); gSPDisplayList(gMasterDisp++, D_1024AC0); diff --git a/src/overlays/ovl_i6/fox_sy.c b/src/overlays/ovl_i6/fox_sy.c index 837f56fc..a7bf0db3 100644 --- a/src/overlays/ovl_i6/fox_sy.c +++ b/src/overlays/ovl_i6/fox_sy.c @@ -47,7 +47,7 @@ void SectorY_80197B30(Actor* actor, s32 timer) { void SectorY_80197C64(Effect* effect) { RCP_SetupDL_21(); gSPDisplayList(gMasterDisp++, D_SY_6014A40); - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); } void SectorY_80197CB8(Scenery* scenery) { diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index 2d22e6a0..7e392b91 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -2166,38 +2166,38 @@ void Map_801A0D14(void) { Map_801A116C(); - RCP_SetupDL(&gMasterDisp, 0x51); + RCP_SetupDL(&gMasterDisp, SETUPDL_81); gDPSetPrimColor(gMasterDisp++, 0, 0, 180, 180, 180, 255); Message_DisplayScrollingText(&gMasterDisp, gMsg_ID_1, D_menu_801CD9DC, D_menu_801CD9E0, 218, 70, Message_GetCharCount(gMsg_ID_1)); - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_8bIA(&gMasterDisp, D_MAP_6019030, 8, 16, 0.0f, D_menu_801B694C, 40.0f, 1.66f); - TextureRect_8bIA_MirY(&gMasterDisp, D_MAP_6019030, 8, 16, 0.0f, D_menu_801B6950, 40.0f, 1.68f); + TextureRect_IA8(&gMasterDisp, D_MAP_6019030, 8, 16, 0.0f, D_menu_801B694C, 40.0f, 1.66f); + TextureRect_IA8_MirY(&gMasterDisp, D_MAP_6019030, 8, 16, 0.0f, D_menu_801B6950, 40.0f, 1.68f); Background_DrawPartialStarfield(71, 118); Background_DrawPartialStarfield(205, 239); - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, D_menu_801CD9E8); for (i = 0; i < 13; i++) { - TextureRect_16bRGBA(&gMasterDisp, D_menu_801B6954[D_menu_801CD9F0] + (96 * 4 * i), 96, 4, 109.0f, - 24.0f + (4.0f * i), 1.0f, 1.0f); + TextureRect_RGBA16(&gMasterDisp, D_menu_801B6954[D_menu_801CD9F0] + (96 * 4 * i), 96, 4, 109.0f, + 24.0f + (4.0f * i), 1.0f, 1.0f); } if ((D_menu_801CD9E4 != 0) && (D_menu_801CD9F0 + 1 < 7)) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, D_menu_801CD9E4); for (i = 0; i < 13; i++) { - TextureRect_16bRGBA(&gMasterDisp, D_menu_801B6954[D_menu_801CD9F0 + 1] + (96 * 4 * i), 96, 4, 109.0f, - 24.0f + (i * 4.0f), 1.0f, 1.0f); + TextureRect_RGBA16(&gMasterDisp, D_menu_801B6954[D_menu_801CD9F0 + 1] + (96 * 4 * i), 96, 4, 109.0f, + 24.0f + (i * 4.0f), 1.0f, 1.0f); } if (D_menu_801CD9E4 == 255) { @@ -2239,10 +2239,10 @@ void Map_801A116C(void) { colB = 0; } - RCP_SetupDL(&gMasterDisp, 0x2E); + RCP_SetupDL(&gMasterDisp, SETUPDL_46); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, D_menu_801CD9E8); } else { - RCP_SetupDL(&gMasterDisp, 0x17); + RCP_SetupDL(&gMasterDisp, SETUPDL_23); } if ((D_menu_801CD948 < 2) || (D_menu_801CD9E8 != 0)) { @@ -2374,14 +2374,14 @@ void Map_801A1528(void) { void Map_801A19A8(void) { s32 i; - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, (s32) D_menu_801CEA9C); for (i = 0; i < 4; i++) { - TextureRect_8bIA(&gMasterDisp, D_MAP_600D590 + (168 * 4 * i), 168, 4, 72.0f, 104.0f + (4.0f * i), 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_MAP_600D590 + (168 * 4 * i), 168, 4, 72.0f, 104.0f + (4.0f * i), 1.0f, 1.0f); } - TextureRect_8bIA(&gMasterDisp, D_MAP_600D590 + (168 * 4 * 4), 168, 3, 72.0f, 104.0f + 16.0f, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_MAP_600D590 + (168 * 4 * 4), 168, 3, 72.0f, 104.0f + 16.0f, 1.0f, 1.0f); } void Map_801A1AE8(void) { @@ -3409,7 +3409,7 @@ void Map_801A4650(void) { Lights_SetOneLight(&gMasterDisp, 0, 0, 127, 28, 58, 105, 65, 70, 48); - RCP_SetupDL(&gMasterDisp, 0x17); + RCP_SetupDL(&gMasterDisp, SETUPDL_23); gSPTexture(gMasterDisp++, 2500, 200, 0, G_TX_RENDERTILE, G_ON); gSPSetGeometryMode(gMasterDisp++, G_TEXTURE_GEN); @@ -3828,11 +3828,11 @@ void Map_801A5834(void) { texture = D_MAP_6000000; } - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 60, 60, 255, 170); - TextureRect_8bIA(&gMasterDisp, D_MAP_601B4B0, 24, 17, x, y, 4.6f, D_menu_801B6A6C[var_t0]); + TextureRect_IA8(&gMasterDisp, D_MAP_601B4B0, 24, 17, x, y, 4.6f, D_menu_801B6A6C[var_t0]); mask = 0xFFFFFFFF; if (D_menu_801CF000[colorIndex] != 0) { @@ -3841,9 +3841,9 @@ void Map_801A5834(void) { } if (gGameFrameCount & mask) { // can't be != 0? - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, r[colorIndex], g[colorIndex], b[colorIndex], 255); - TextureRect_8bIA(&gMasterDisp, D_MAP_6000840, 96, 22, x + 11.0f, y + 3.0f, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_MAP_6000840, 96, 22, x + 11.0f, y + 3.0f, 1.0f, 1.0f); } z = 24.0f; colorIndex++; @@ -3857,7 +3857,7 @@ void Map_801A5834(void) { if (gGameFrameCount & mask) { // can't be != 0? gDPSetPrimColor(gMasterDisp++, 0, 0, r[colorIndex], g[colorIndex], b[colorIndex], 255); - TextureRect_8bIA(&gMasterDisp, D_MAP_60018C0, 96, 10, x + 10.0f, y + z + 8.0f, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_MAP_60018C0, 96, 10, x + 10.0f, y + z + 8.0f, 1.0f, 1.0f); } z += 18.0f; colorIndex++; @@ -3871,7 +3871,7 @@ void Map_801A5834(void) { if ((gGameFrameCount & mask) != 0) { gDPSetPrimColor(gMasterDisp++, 0, 0, r[colorIndex], g[colorIndex], b[colorIndex], 255); - TextureRect_8bIA(&gMasterDisp, texture, 96, 22, x + 9.0f, y + z + 5.0f, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, texture, 96, 22, x + 9.0f, y + z + 5.0f, 1.0f, 1.0f); } } @@ -3913,7 +3913,7 @@ void Map_801A5C90(void) { Matrix_SetGfxMtx(&gMasterDisp); - RCP_SetupDL(&gMasterDisp, 0x35); + RCP_SetupDL(&gMasterDisp, SETUPDL_53); Matrix_Push(&gGfxMatrix); @@ -4565,9 +4565,9 @@ void Map_801A7230(PlanetId planetId) { case PL_ANIM_STATIC: if (((D_menu_801CD944 == 3) || (planetId == sCurrentPlanetId) || (planetId == sNextPlanetId)) && D_menu_801CD944 != 1 && D_menu_801CD944 != 7) { - RCP_SetupDL(&gMasterDisp, 0x35); + RCP_SetupDL(&gMasterDisp, SETUPDL_53); } else { - RCP_SetupDL(&gMasterDisp, 0x29); + RCP_SetupDL(&gMasterDisp, SETUPDL_41); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sPlanets[planetId].alpha); } break; @@ -4575,22 +4575,22 @@ void Map_801A7230(PlanetId planetId) { case PL_ANIM_ROTATE_Y: if (((D_menu_801CD944 == 3) || (planetId == sCurrentPlanetId) || (planetId == sNextPlanetId)) && D_menu_801CD944 != 1 && D_menu_801CD944 != 7) { - RCP_SetupDL(&gMasterDisp, 0x17); + RCP_SetupDL(&gMasterDisp, SETUPDL_23); } else { - RCP_SetupDL(&gMasterDisp, 0x2E); + RCP_SetupDL(&gMasterDisp, SETUPDL_46); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sPlanets[planetId].alpha); } break; case PL_ANIM_BILLBOARD: case PL_ANIM_SPIN: - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sPlanets[planetId].alpha); break; case PL_ANIM_ROTATE_Z: - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0, 0, 240, 0, 0, sPlanets[planetId].alpha); gDPSetEnvColor(gMasterDisp++, 31, 0, 0, 0); @@ -4617,7 +4617,7 @@ void Map_801A74F4(PlanetId planetId) { alpha = 128; } - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, alpha); gDPSetEnvColor(gMasterDisp++, 31, 0, 0, 0); @@ -4648,7 +4648,7 @@ void Map_801A7684(PlanetId planetId) { r = g = b = 64; } - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); gDPSetPrimColor(gMasterDisp++, 0, 0, r, g, b, sPlanets[planetId].alpha); @@ -4662,7 +4662,7 @@ void Map_801A7684(PlanetId planetId) { } void Map_801A77B0(PlanetId planetId) { - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sPlanets[planetId].alpha); @@ -4685,7 +4685,7 @@ void Map_801A77B0(PlanetId planetId) { } void Map_801A791C(PlanetId planetId) { - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 175, 175, sPlanets[planetId].alpha); gDPSetEnvColor(gMasterDisp++, 73, 31, 15, 0); @@ -4707,7 +4707,7 @@ void Map_801A791C(PlanetId planetId) { } void Map_801A7A84(PlanetId planetId) { - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 175, 175, sPlanets[planetId].alpha); gDPSetEnvColor(gMasterDisp++, 73, 31, 15, 0); @@ -4733,7 +4733,7 @@ void Map_801A7BEC(f32* zAngle, f32 next, f32 scale) { alpha = 128; } - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0, 0, 63, 95, 30, alpha); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 0); @@ -4798,7 +4798,7 @@ void Map_801A7F1C(PlanetId planetId) { } if (alpha != 0) { - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, alpha); gDPSetEnvColor(gMasterDisp++, 80, 80, 0, 0); @@ -4839,7 +4839,7 @@ void Map_801A809C(PlanetId planetId) { if (D_menu_801CD98C == 1) { switch (D_menu_801CD990) { case 0: - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, alpha); gDPSetEnvColor(gMasterDisp++, 80, 80, 0, 0); @@ -4870,7 +4870,7 @@ void Map_801A809C(PlanetId planetId) { Math_SmoothStepToF(&D_menu_801CD99C, 150.0f, 0.09f, 100.0f, 0.1f); - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, D_menu_801CD994); gDPSetEnvColor(gMasterDisp++, 80, 80, 0, 0); @@ -4899,7 +4899,7 @@ void Map_801A809C(PlanetId planetId) { D_menu_801CD994 = 0; } - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); gDPSetTextureFilter(gMasterDisp++, G_TF_POINT); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, D_menu_801CD998); @@ -4937,7 +4937,7 @@ void Map_801A809C(PlanetId planetId) { break; } } else { - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); gDPSetTextureFilter(gMasterDisp++, G_TF_POINT); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, alpha); @@ -4960,7 +4960,7 @@ void Map_801A809C(PlanetId planetId) { void Map_801A8738(void) { if (D_menu_801CEB34 >= 0) { - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 0); @@ -5031,7 +5031,7 @@ void Map_801A89BC(PlanetId planetId, s32 arg1) { temp2 = 5; } - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 0); @@ -5106,7 +5106,7 @@ void Map_801A8F40(void) { if (D_menu_801CD97C != 0) { Lights_SetOneLight(&gMasterDisp, 0, 0, 127, 80, 80, 60, 50, 50, 50); - RCP_SetupDL(&gMasterDisp, 0x17); + RCP_SetupDL(&gMasterDisp, SETUPDL_23); temp = Math_SmoothStepToF(&D_menu_801CEAA8, D_menu_801CEAB0, 0.1f, 100.0f, 1.0f); @@ -5180,9 +5180,9 @@ void Map_801A9224(void) { } if ((D_menu_801CD944 == 3) || ((sCurrentPlanetId == PLANET_METEO) && (D_menu_801CD944 != 7))) { - RCP_SetupDL(&gMasterDisp, 0x35); + RCP_SetupDL(&gMasterDisp, SETUPDL_53); } else { - RCP_SetupDL(&gMasterDisp, 0x40); + RCP_SetupDL(&gMasterDisp, SETUPDL_64); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sPlanets[PLANET_METEO].alpha); } @@ -5232,9 +5232,9 @@ void Map_801A9448(void) { } if ((D_menu_801CD944 == 3) || (sCurrentPlanetId == PLANET_AREA_6)) { - RCP_SetupDL(&gMasterDisp, 0x17); + RCP_SetupDL(&gMasterDisp, SETUPDL_23); } else { - RCP_SetupDL(&gMasterDisp, 0x2E); + RCP_SetupDL(&gMasterDisp, SETUPDL_46); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sPlanets[PLANET_AREA_6].alpha); } @@ -5301,14 +5301,13 @@ void Map_801A9910(void) { s32 i; s32 var_s0 = D_menu_801B6A84[sCurrentPlanetId]; - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, (s32) D_menu_801CEA6C); for (i = 0; i < D_menu_801AF834[var_s0].height; i++) { - TextureRect_8bIA(&gMasterDisp, D_menu_801AF834[var_s0].texture + (D_menu_801AF834[var_s0].width * i), - D_menu_801AF834[var_s0].width, 1, D_menu_801AF834[var_s0].xPos, 20.0f + (1.0f * i), 1.0f, - 1.0f); + TextureRect_IA8(&gMasterDisp, D_menu_801AF834[var_s0].texture + (D_menu_801AF834[var_s0].width * i), + D_menu_801AF834[var_s0].width, 1, D_menu_801AF834[var_s0].xPos, 20.0f + (1.0f * i), 1.0f, 1.0f); } Math_SmoothStepToF(&D_menu_801CEA6C, 255.0f, D_menu_801CEA70, 10.0f, 1.0f); @@ -5395,7 +5394,7 @@ void Map_801A9A8C(void) { break; } - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); #if MODS_LEVEL_SELECT == 1 @@ -5404,17 +5403,17 @@ void Map_801A9A8C(void) { } #endif - TextureRect_8bIA(&gMasterDisp, aTextMissionNo, 112, 19, D_menu_801B6AC0[0], D_menu_801B6AC8[0], 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, missionNoTex, 16, 15, D_menu_801B6AC0[1], D_menu_801B6AC8[1], 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, aTextMissionNo, 112, 19, D_menu_801B6AC0[0], D_menu_801B6AC8[0], 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, missionNoTex, 16, 15, D_menu_801B6AC0[1], D_menu_801B6AC8[1], 1.0f, 1.0f); for (i = 0; i < D_menu_801AF834[sp58].height; i++) { - TextureRect_8bIA(&gMasterDisp, D_menu_801AF834[sp58].texture + (D_menu_801AF834[sp58].width * i), - D_menu_801AF834[sp58].width, 1, D_menu_801AF834[sp58].xPos, 94.0f + (1.0f * i), 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_menu_801AF834[sp58].texture + (D_menu_801AF834[sp58].width * i), + D_menu_801AF834[sp58].width, 1, D_menu_801AF834[sp58].xPos, 94.0f + (1.0f * i), 1.0f, 1.0f); } for (i = 0; i < D_menu_801AF914[sp58].height; i++) { - TextureRect_8bIA(&gMasterDisp, D_menu_801AF914[sp58].texture + (D_menu_801AF914[sp58].width * i), - D_menu_801AF914[sp58].width, 1, D_menu_801AF914[sp58].xPos, 140.0f + (1.0f * i), 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_menu_801AF914[sp58].texture + (D_menu_801AF914[sp58].width * i), + D_menu_801AF914[sp58].width, 1, D_menu_801AF914[sp58].xPos, 140.0f + (1.0f * i), 1.0f, 1.0f); } } @@ -5446,7 +5445,7 @@ void Map_801A9DE8(void) { } void Map_801A9EE4(void) { - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); @@ -5512,7 +5511,7 @@ void Map_801AA1CC(s32 arg0) { PlanetId* ptr = &gMissionPlanet[0]; for (x = 0.0f, i = 0; i < 7; i++, x += 24.0f + x2, ptr++) { - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); if (i < 6) { r = g = b = 255; @@ -5541,10 +5540,10 @@ void Map_801AA1CC(s32 arg0) { } else { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); } - TextureRect_16bRGBA(&gMasterDisp, D_MAP_60447A0, 8, 8, 28.0f + x + 24.0f, y + 11.0f, 2.0f, 0.2f); + TextureRect_RGBA16(&gMasterDisp, D_MAP_60447A0, 8, 8, 28.0f + x + 24.0f, y + 11.0f, 2.0f, 0.2f); } gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_16bRGBA(&gMasterDisp, D_MAP_6047550, 24, 24, 28.0f + x, y, 1.0f, 1.0f); + TextureRect_RGBA16(&gMasterDisp, D_MAP_6047550, 24, 24, 28.0f + x, y, 1.0f, 1.0f); } } @@ -5559,7 +5558,7 @@ void Map_801AA434(s32 arg0, f32 x, f32 y, s32 idx) { static s32 D_menu_801B6AE8[] = { 30, 179, 30 }; static s32 D_menu_801B6AF4[] = { 0, 67, 255 }; - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); Graphics_DisplaySmallText(x + 12.0f - Graphics_GetSmallTextWidth(sPlanetNames[idx]) * 0.5f, y - 8.0f, 1.0f, 1.0f, @@ -5580,7 +5579,7 @@ void Map_801AA434(s32 arg0, f32 x, f32 y, s32 idx) { x2 = 0.0f; for (i = 0; i < 3; i++, x2 += 9.0f) { if ((gMissionTeamStatus[arg0] & mask)) { - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, D_menu_801B6ADC[i], D_menu_801B6AE8[i], D_menu_801B6AF4[i], 255); Graphics_DisplaySmallText((s32) x + x2 - 1.0f, (s32) y + 24.0f + 8.0f + 2.0f, 1.0f, 1.0f, D_menu_801B6AD0[i]); @@ -5600,7 +5599,7 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { switch (planetId) { case PLANET_SOLAR: if ((gGameFrameCount & mask) != 0) { - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0, 0, 240, 0, 0, 255); gDPSetEnvColor(gMasterDisp++, 31, 0, 0, 0); @@ -5627,7 +5626,7 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { case PLANET_METEO: if ((gGameFrameCount & mask) != 0) { - RCP_SetupDL(&gMasterDisp, 0x3E); + RCP_SetupDL(&gMasterDisp, SETUPDL_62); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); @@ -5654,7 +5653,7 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { case PLANET_SECTOR_Y: case PLANET_SECTOR_Z: if ((gGameFrameCount & mask) != 0) { - RCP_SetupDL(&gMasterDisp, 0x3E); + RCP_SetupDL(&gMasterDisp, SETUPDL_62); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 144); @@ -5674,7 +5673,7 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { case PLANET_BOLSE: if ((gGameFrameCount & mask) != 0) { - RCP_SetupDL(&gMasterDisp, 0x17); + RCP_SetupDL(&gMasterDisp, SETUPDL_23); Lights_SetOneLight(&gMasterDisp, 0, 0, 100, 50, 50, 40, 100, 100, 100); @@ -5696,7 +5695,7 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { case PLANET_AREA_6: if ((gGameFrameCount & mask) != 0) { - RCP_SetupDL(&gMasterDisp, 0x17); + RCP_SetupDL(&gMasterDisp, SETUPDL_23); Lights_SetOneLight(&gMasterDisp, 0, 0, 100, 50, 50, 40, 100, 100, 100); @@ -5718,7 +5717,7 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { default: if ((gGameFrameCount & mask) != 0) { - RCP_SetupDL(&gMasterDisp, 0x3E); + RCP_SetupDL(&gMasterDisp, SETUPDL_62); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); @@ -5761,7 +5760,7 @@ void Map_801AB17C(f32 x, f32 y, f32 z) { static f32 xPos = 4.4f; static f32 yPos = 1.0f; - RCP_SetupDL(&gMasterDisp, 0x35); + RCP_SetupDL(&gMasterDisp, SETUPDL_53); gDPSetTextureFilter(gMasterDisp++, G_TF_POINT); Matrix_Push(&gGfxMatrix); @@ -5958,19 +5957,19 @@ void Map_801AB978(s32 arg0) { case 20: case 21: if (D_menu_801CEA74 != 0) { - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, D_menu_801CEA74); xPos = 205.0f; yPos = 77.0f; for (i = 0; i < 12; i++) { - TextureRect_16bRGBA(&gMasterDisp, D_MAP_6044820 + (92 * 4 * i), 92, 4, xPos, yPos + (i * 4.0f), - 1.0f, 1.0f); + TextureRect_RGBA16(&gMasterDisp, D_MAP_6044820 + (92 * 4 * i), 92, 4, xPos, yPos + (i * 4.0f), 1.0f, + 1.0f); } - TextureRect_16bRGBA(&gMasterDisp, D_MAP_6044820 + (92 * 4 * 12), 92, 3, xPos, yPos + 48.0f, 1.0f, 1.0f); + TextureRect_RGBA16(&gMasterDisp, D_MAP_6044820 + (92 * 4 * 12), 92, 3, xPos, yPos + 48.0f, 1.0f, 1.0f); if (arg0 == 21) { - TextureRect_16bRGBA(&gMasterDisp, D_MAP_6046CD0, 32, 34, xPos + 47.0, yPos, 1.0f, 1.0f); + TextureRect_RGBA16(&gMasterDisp, D_MAP_6046CD0, 32, 34, xPos + 47.0, yPos, 1.0f, 1.0f); } for (i = 0; i < 3; i++) { @@ -5985,7 +5984,7 @@ void Map_801AB978(s32 arg0) { break; case 0: - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); if ((gGameFrameCount & 0x10) != 0) { Graphics_DisplaySmallText(D_menu_801B6B0C[i], 131 + 28, 1.0f, 1.0f, "OK !"); @@ -5998,10 +5997,10 @@ void Map_801AB978(s32 arg0) { break; } - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sp90[i]); - TextureRect_16bRGBA(&gMasterDisp, D_menu_801B6B18[i], 28, 28, D_menu_801B6B0C[i], 131.0f, 1.0f, - 1.0f); + TextureRect_RGBA16(&gMasterDisp, D_menu_801B6B18[i], 28, 28, D_menu_801B6B0C[i], 131.0f, 1.0f, + 1.0f); if ((gSavedTeamShields[3 - i] < 0) && (gSavedTeamShields[3 - i] != -2)) { Map_801ABCDC(i, D_menu_801CEA74); @@ -6020,7 +6019,7 @@ void Map_801ABCDC(s32 arg0, s32 alpha) { Matrix_SetGfxMtx(&gMasterDisp); - RCP_SetupDL(&gMasterDisp, 0x29); + RCP_SetupDL(&gMasterDisp, SETUPDL_41); gDPSetTextureFilter(gMasterDisp++, G_TF_POINT); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, alpha); @@ -6057,7 +6056,7 @@ void Map_801ABF1C(void) { Matrix_SetGfxMtx(&gMasterDisp); - RCP_SetupDL(&gMasterDisp, 0x15); + RCP_SetupDL(&gMasterDisp, SETUPDL_21); Matrix_Push(&gGfxMatrix); { @@ -6078,7 +6077,7 @@ void Map_801ABF1C(void) { } Matrix_Pop(&gGfxMatrix); - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0, 0, 32, 32, 255, D_menu_801CEA98); gDPSetEnvColor(gMasterDisp++, 207, 207, 255, 0); @@ -6208,9 +6207,9 @@ void Map_801AC530(s32 index) { src.z = 0.0f; if (D_menu_801CEEA8 == 255) { - RCP_SetupDL(&gMasterDisp, 0x17); + RCP_SetupDL(&gMasterDisp, SETUPDL_23); } else { - RCP_SetupDL(&gMasterDisp, 0x2E); + RCP_SetupDL(&gMasterDisp, SETUPDL_46); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, D_menu_801CEEA8); } @@ -6270,7 +6269,7 @@ void Map_801AC80C(PathType pathType) { b = 0; } - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 80, D_menu_801CEEAC); gDPSetEnvColor(gMasterDisp++, r, g, b, 0); @@ -6708,17 +6707,17 @@ void Map_801AD718(f32 arg0, f32 arg1, f32 arg2, f32* arg3, f32* arg4, f32* arg5, } void Map_801AD7EC(s32 xPos, s32 yPos, s32 number) { - RCP_SetupDL(&gMasterDisp, 0x55); + RCP_SetupDL(&gMasterDisp, SETUPDL_85); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_4bCI(&gMasterDisp, D_MAP_601DC10, D_MAP_601DC90, 16, 16, xPos, yPos, 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_MAP_601DC10, D_MAP_601DC90, 16, 16, xPos, yPos, 1.0f, 1.0f); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); - TextureRect_4bCI(&gMasterDisp, D_MAP_601DCA0, D_MAP_601DCD8, 16, 7, xPos + 18.0f, yPos + 9.0f, 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_MAP_601DCA0, D_MAP_601DCD8, 16, 7, xPos + 18.0f, yPos + 9.0f, 1.0f, 1.0f); - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); diff --git a/src/overlays/ovl_menu/fox_option.c b/src/overlays/ovl_menu/fox_option.c index 0f8e5633..612278b8 100644 --- a/src/overlays/ovl_menu/fox_option.c +++ b/src/overlays/ovl_menu/fox_option.c @@ -1454,14 +1454,14 @@ void Option_SoundDraw(void) { Option_801952B4(); - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_16bRGBA(&gMasterDisp, D_MAP_60447A0, 8, 8, D_menu_801AEFA8[0], D_menu_801AEFD4[0], D_menu_801AF000, - 0.2f); + TextureRect_RGBA16(&gMasterDisp, D_MAP_60447A0, 8, 8, D_menu_801AEFA8[0], D_menu_801AEFD4[0], D_menu_801AF000, + 0.2f); - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_8bIA(&gMasterDisp, D_OPT_8005CD0, 112, 13, D_menu_801AEFA8[1], D_menu_801AEFD4[1], 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_OPT_8005CD0, 112, 13, D_menu_801AEFA8[1], D_menu_801AEFD4[1], 1.0f, 1.0f); for (i = 0; i < 4; i++) { if (D_menu_801B9288 == i) { @@ -1473,43 +1473,43 @@ void Option_SoundDraw(void) { colorGB = D_menu_801B9270[0]; gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); - TextureRect_8bIA(&gMasterDisp, D_OPT_8006280, 48, 13, D_menu_801AEFA8[2], D_menu_801AEFD4[2], 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_OPT_8006280, 48, 13, D_menu_801AEFA8[2], D_menu_801AEFD4[2], 1.0f, 1.0f); colorGB = D_menu_801B9270[1]; gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); - TextureRect_8bIA(&gMasterDisp, D_OPT_80064F0, 88, 14, D_menu_801AEFA8[3], D_menu_801AEFD4[3], 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_OPT_80064F0, 88, 14, D_menu_801AEFA8[3], D_menu_801AEFD4[3], 1.0f, 1.0f); colorGB = D_menu_801B9270[2]; gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); - TextureRect_8bIA(&gMasterDisp, D_OPT_80069C0, 56, 15, D_menu_801AEFA8[4], D_menu_801AEFD4[4], 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_OPT_80069C0, 56, 15, D_menu_801AEFA8[4], D_menu_801AEFD4[4], 1.0f, 1.0f); colorGB = D_menu_801B9270[3]; gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); - TextureRect_8bIA(&gMasterDisp, D_OPT_8006D10, 24, 13, D_menu_801AEFA8[5], D_menu_801AEFD4[5], 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_OPT_8006D10, 24, 13, D_menu_801AEFA8[5], D_menu_801AEFD4[5], 1.0f, 1.0f); if (D_menu_801B9288 == 0) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_8bIA_MirX(&gMasterDisp, D_OPT_800E130, 8, 8, D_menu_801AEFA8[6], D_menu_801AEFD4[6], 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, D_OPT_800E130, 8, 8, D_menu_801AEFA8[7], D_menu_801AEFD4[7], 1.0f, 1.0f); + TextureRect_IA8_MirX(&gMasterDisp, D_OPT_800E130, 8, 8, D_menu_801AEFA8[6], D_menu_801AEFD4[6], 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_OPT_800E130, 8, 8, D_menu_801AEFA8[7], D_menu_801AEFD4[7], 1.0f, 1.0f); } gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); switch (gOptionSoundMode) { case OPTIONSOUND_STEREO: - TextureRect_8bIA(&gMasterDisp, D_OPT_800CD90, 56, 13, D_menu_801AEFA8[8], D_menu_801AEFD4[8], 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_OPT_800CD90, 56, 13, D_menu_801AEFA8[8], D_menu_801AEFD4[8], 1.0f, 1.0f); break; case OPTIONSOUND_MONO: - TextureRect_8bIA(&gMasterDisp, D_OPT_80076E0, 56, 14, D_menu_801AEFA8[9], D_menu_801AEFD4[9], 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_OPT_80076E0, 56, 14, D_menu_801AEFA8[9], D_menu_801AEFD4[9], 1.0f, 1.0f); break; case OPTIONSOUND_HEADSET: - TextureRect_8bIA(&gMasterDisp, D_OPT_8007210, 88, 14, D_menu_801AEFA8[10], D_menu_801AEFD4[10], 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_OPT_8007210, 88, 14, D_menu_801AEFA8[10], D_menu_801AEFD4[10], 1.0f, 1.0f); break; } - TextureRect_8bIA(&gMasterDisp, D_OPT_8006E50, 96, 10, 166.0f, 213.0f, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_OPT_8006E50, 96, 10, 166.0f, 213.0f, 1.0f, 1.0f); for (i = 0; i < 3; i++) { Option_DrawCardLabel(D_menu_801AEAA0[i]); @@ -1722,16 +1722,16 @@ void Option_ExpertSoundDraw(void) { if (!showJukebox) { #endif - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_8bIA(&gMasterDisp, D_OPT_80079F0, 128, 14, 49.0f, 81.0f, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_OPT_80079F0, 128, 14, 49.0f, 81.0f, 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, D_menu_801AECF8[D_menu_801B931C / 10], 16, 15, 230.0f, 82.0f, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_menu_801AECF8[D_menu_801B931C / 10], 16, 15, 230.0f, 82.0f, 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, D_menu_801AECF8[D_menu_801B931C % 10], 16, 15, 244.0f, 82.0f, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_menu_801AECF8[D_menu_801B931C % 10], 16, 15, 244.0f, 82.0f, 1.0f, 1.0f); #if MODS_SFX_JUKEBOX == 1 } @@ -1739,13 +1739,13 @@ void Option_ExpertSoundDraw(void) { Option_8019B7D4(); - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 50, 50, 200, 255); for (i = 0; i < 4; i++) { - TextureRect_16bRGBA(&gMasterDisp, D_MAP_60447A0, 8, 8, D_menu_801AF014[i], D_menu_801AF024[i], - D_menu_801AF034[i], D_menu_801AF044[i]); + TextureRect_RGBA16(&gMasterDisp, D_MAP_60447A0, 8, 8, D_menu_801AF014[i], D_menu_801AF024[i], + D_menu_801AF034[i], D_menu_801AF044[i]); } if (D_menu_801B9320 != 0) { @@ -1771,7 +1771,7 @@ void Option_ExpertSoundDraw(void) { Lib_InitOrtho(&gMasterDisp); - RCP_SetupDL(&gMasterDisp, 5); + RCP_SetupDL(&gMasterDisp, SETUPDL_5); Matrix_Push(&gGfxMatrix); Matrix_LookAt(gGfxMatrix, 0.0f, 0.0f, 100.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, MTXF_APPLY); @@ -1946,20 +1946,20 @@ void Option_DataDraw(void) { Option_DrawMenuLabel(); - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); for (i = 0; i < 2; i++) { - TextureRect_8bIA(&gMasterDisp, D_OPT_80084B0 + (176 * 4 * i), 176, 4, D_menu_801AF094[0], - D_menu_801AF0AC[0] + (4.0f * i), 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_OPT_80084B0 + (176 * 4 * i), 176, 4, D_menu_801AF094[0], + D_menu_801AF0AC[0] + (4.0f * i), 1.0f, 1.0f); } - TextureRect_8bIA(&gMasterDisp, D_OPT_80084B0 + 176 * 4 * 2, 176, 5, D_menu_801AF094[0], D_menu_801AF0AC[0] + 8.0f, - 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_OPT_80084B0 + 176 * 4 * 2, 176, 5, D_menu_801AF094[0], D_menu_801AF0AC[0] + 8.0f, + 1.0f, 1.0f); if (D_menu_801B91CC < 2) { - TextureRect_8bIA_MirX(&gMasterDisp, D_OPT_800E130, 8, 8, D_menu_801AF084[D_menu_801B91C0], 140.0f, 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, D_OPT_800E130, 8, 8, D_menu_801AF08C[D_menu_801B91C0], 140.0f, 1.0f, 1.0f); + TextureRect_IA8_MirX(&gMasterDisp, D_OPT_800E130, 8, 8, D_menu_801AF084[D_menu_801B91C0], 140.0f, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_OPT_800E130, 8, 8, D_menu_801AF08C[D_menu_801B91C0], 140.0f, 1.0f, 1.0f); Option_8019C824(&D_menu_801AED20[D_menu_801B91C0]); D_menu_801AED20[!D_menu_801B91C0] = 255.0f; @@ -1977,13 +1977,13 @@ void Option_DataDraw(void) { if ((gGameFrameCount & sp74[1]) != 0) { sp7C[1] = D_menu_801AED20[1]; gDPSetPrimColor(gMasterDisp++, 0, 0, 255, sp7C[1], sp7C[1], 255); - TextureRect_8bIA(&gMasterDisp, D_OPT_8009980, 32, 12, D_menu_801AF094[1], D_menu_801AF0AC[1], 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_OPT_8009980, 32, 12, D_menu_801AF094[1], D_menu_801AF0AC[1], 1.0f, 1.0f); } if ((gGameFrameCount & sp74[0]) != 0) { sp7C[0] = D_menu_801AED20[0]; gDPSetPrimColor(gMasterDisp++, 0, 0, 255, sp7C[0], sp7C[0], 255); - TextureRect_8bIA(&gMasterDisp, D_OPT_8009B00, 40, 12, D_menu_801AF094[2], D_menu_801AF0AC[2], 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_OPT_8009B00, 40, 12, D_menu_801AF094[2], D_menu_801AF0AC[2], 1.0f, 1.0f); } } @@ -1992,11 +1992,11 @@ void Option_DataDraw(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); for (i = 0; i < 9; i++) { - TextureRect_8bIA(&gMasterDisp, D_OPT_8008DA0 + (160 * 2 * i), 160, 2, D_menu_801AF094[3], - D_menu_801AF0AC[3] + (2.0f * i), 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_OPT_8008DA0 + (160 * 2 * i), 160, 2, D_menu_801AF094[3], + D_menu_801AF0AC[3] + (2.0f * i), 1.0f, 1.0f); } - TextureRect_8bIA(&gMasterDisp, D_OPT_8008DA0 + 160 * 2 * 9, 160, 1, D_menu_801AF094[3], - D_menu_801AF0AC[3] + 18.0f, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_OPT_8008DA0 + 160 * 2 * 9, 160, 1, D_menu_801AF094[3], + D_menu_801AF0AC[3] + 18.0f, 1.0f, 1.0f); break; case 1: @@ -2004,19 +2004,19 @@ void Option_DataDraw(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); for (i = 0; i < 20; i++) { - TextureRect_8bIA(&gMasterDisp, D_OPT_8009CE0 + (160 * 2 * i), 160, 2, D_menu_801AF094[4], - D_menu_801AF0AC[4] + (2.0f * i), 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_OPT_8009CE0 + (160 * 2 * i), 160, 2, D_menu_801AF094[4], + D_menu_801AF0AC[4] + (2.0f * i), 1.0f, 1.0f); } - TextureRect_8bIA(&gMasterDisp, D_OPT_8009CE0 + 160 * 2 * 20, 160, 1, D_menu_801AF094[4], - D_menu_801AF0AC[4] + 40.0f, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_OPT_8009CE0 + 160 * 2 * 20, 160, 1, D_menu_801AF094[4], + D_menu_801AF0AC[4] + 40.0f, 1.0f, 1.0f); break; case 3: gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 32, 32, 255); - TextureRect_8bIA(&gMasterDisp, D_OPT_800B680, 144, 28, D_menu_801AF094[5], D_menu_801AF0AC[5], 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, D_OPT_800B680 + 4032, 144, 13, D_menu_801AF094[5], - D_menu_801AF0AC[5] + 28.0f, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_OPT_800B680, 144, 28, D_menu_801AF094[5], D_menu_801AF0AC[5], 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_OPT_800B680 + 4032, 144, 13, D_menu_801AF094[5], D_menu_801AF0AC[5] + 28.0f, + 1.0f, 1.0f); break; } @@ -2143,13 +2143,13 @@ void Option_RankingMenuDraw(void) { Option_8019752C(); } else { Title_80187E28(); - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); Option_8019C824(&D_menu_801B93F0); temp_t0 = D_menu_801B93F0; gDPSetPrimColor(gMasterDisp++, 0, 0, 255, temp_t0, temp_t0, 255); - TextureRect_8bIA(&gMasterDisp, D_VS_MENU_7004010, 8, 8, 70.0f, (D_menu_801B93E4 * 17.0f) + 55.0f, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_VS_MENU_7004010, 8, 8, 70.0f, (D_menu_801B93E4 * 17.0f) + 55.0f, 1.0f, 1.0f); } - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); Graphics_DisplaySmallText(242, 215, 1.0f, 1.0f, "PUSH A"); } @@ -2182,16 +2182,16 @@ void Option_8019752C(void) { Option_80197914(); Matrix_Pop(&gGfxMatrix); - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_8bIA(&gMasterDisp, D_OPT_800D170, 8, 16, 0.0f, D_menu_801AF0F8[0], 40.0f, 1.5f); - TextureRect_8bIA_MirY(&gMasterDisp, D_OPT_800D170, 8, 16, 0.0f, D_menu_801AF0F8[1], 40.0f, 1.5f); + TextureRect_IA8(&gMasterDisp, D_OPT_800D170, 8, 16, 0.0f, D_menu_801AF0F8[0], 40.0f, 1.5f); + TextureRect_IA8_MirY(&gMasterDisp, D_OPT_800D170, 8, 16, 0.0f, D_menu_801AF0F8[1], 40.0f, 1.5f); Background_DrawPartialStarfield(0, 70); Background_DrawPartialStarfield(170, 239); - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); if (D_menu_801B91D4 >= 114.0f) { gDPSetPrimColor(gMasterDisp++, 0, 0, 32, 32, 32, 255); @@ -2201,7 +2201,7 @@ void Option_8019752C(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, temp_a0, temp_a0, 255); } - TextureRect_8bIA(&gMasterDisp, D_OPT_800D070, 16, 16, 150.0f, 44.0f, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_OPT_800D070, 16, 16, 150.0f, 44.0f, 1.0f, 1.0f); if (D_menu_801B91D4 <= -1055.0f) { gDPSetPrimColor(gMasterDisp++, 0, 0, 32, 32, 32, 255); @@ -2211,7 +2211,7 @@ void Option_8019752C(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, temp_a0, temp_a0, 255); } - TextureRect_8bIA_MirY(&gMasterDisp, D_OPT_800D070, 16, 16, 150.0f, 200.0f, 1.0f, 1.0f); + TextureRect_IA8_MirY(&gMasterDisp, D_OPT_800D070, 16, 16, 150.0f, 200.0f, 1.0f, 1.0f); } static Vec3f D_menu_801AF100[2] = { { 0.0f, 167.0f, 0.0f }, { 0.0f, -167.0f, 0.0f } }; @@ -2222,7 +2222,7 @@ void Option_80197914(void) { Vec3f* vec2; s32 i; - RCP_SetupDL(&gMasterDisp, 0); + RCP_SetupDL(&gMasterDisp, SETUPDL_0); for (i = 0, vec1 = D_menu_801AF100, vec2 = D_menu_801AF118; i < 2; i++, vec1++, vec2++) { Matrix_Push(&gGfxMatrix); @@ -2235,38 +2235,36 @@ void Option_80197914(void) { } void Option_80197A3C(s32 arg0, s32 arg1, s32 arg2) { - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); if (arg0 != 9) { - TextureRect_8bIA(&gMasterDisp, D_menu_801AECF8[arg0 + 1], 16, 15, arg1, arg2 - 25.0f, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_menu_801AECF8[arg0 + 1], 16, 15, arg1, arg2 - 25.0f, 1.0f, 1.0f); } else { - TextureRect_8bIA(&gMasterDisp, aLargeText_1, 16, 15, arg1 - 14.0f, arg2 - 25.0f, 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, aLargeText_0, 16, 15, arg1, arg2 - 25.0f, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, aLargeText_1, 16, 15, arg1 - 14.0f, arg2 - 25.0f, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, aLargeText_0, 16, 15, arg1, arg2 - 25.0f, 1.0f, 1.0f); } - RCP_SetupDL(&gMasterDisp, 0x55); + RCP_SetupDL(&gMasterDisp, SETUPDL_85); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); switch (arg0) { case 0: - TextureRect_4bCI(&gMasterDisp, D_OPT_8003A70, D_OPT_8003AB8, 16, 9, arg1 + 17.0f, arg2 - 19.0f, 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_OPT_8003A70, D_OPT_8003AB8, 16, 9, arg1 + 17.0f, arg2 - 19.0f, 1.0f, 1.0f); break; case 1: - TextureRect_4bCI(&gMasterDisp, D_OPT_80038E0, D_OPT_8003930, 16, 10, arg1 + 17.0f, arg2 - 19.0f, 1.0f, - 1.0f); + TextureRect_CI4(&gMasterDisp, D_OPT_80038E0, D_OPT_8003930, 16, 10, arg1 + 17.0f, arg2 - 19.0f, 1.0f, 1.0f); break; case 2: - TextureRect_4bCI(&gMasterDisp, D_OPT_8003950, D_OPT_80039A8, 16, 11, arg1 + 17.0f, arg2 - 20.0f, 1.0f, - 1.0f); + TextureRect_CI4(&gMasterDisp, D_OPT_8003950, D_OPT_80039A8, 16, 11, arg1 + 17.0f, arg2 - 20.0f, 1.0f, 1.0f); break; default: - TextureRect_4bCI(&gMasterDisp, D_OPT_8003AE0, D_OPT_8003B28, 16, 9, arg1 + 17.0f, arg2 - 19.0f, 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_OPT_8003AE0, D_OPT_8003B28, 16, 9, arg1 + 17.0f, arg2 - 19.0f, 1.0f, 1.0f); break; } } @@ -2274,7 +2272,7 @@ void Option_80197A3C(s32 arg0, s32 arg1, s32 arg2) { void Option_80197D30(s32 arg0, s32 arg1, s32 arg2) { char temp[4]; - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); @@ -2287,9 +2285,9 @@ void Option_80197D30(s32 arg0, s32 arg1, s32 arg2) { } void Option_80197DE4(s32 arg0, s32 arg1, s32 arg2) { - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 60, 60, 255, 170); - TextureRect_8bIA(&gMasterDisp, D_MAP_601B4B0, 24, 17, arg1, arg2, 3.17f, 1.05f); + TextureRect_IA8(&gMasterDisp, D_MAP_601B4B0, 24, 17, arg1, arg2, 3.17f, 1.05f); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); Graphics_DisplaySmallText(arg1, arg2, 1.0f, 1.0f, "TOTAL HITS"); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); @@ -2301,7 +2299,7 @@ void Option_80197F74(s32 arg0, s32 arg1, s32 arg2) { f32 temp_fs1; s32 i; - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); for (temp_fs1 = 0.0f, i = 0; i < 3; i++, temp_fs1 += 12.0f) { gDPSetPrimColor(gMasterDisp++, 0, 0, D_menu_801AF0D0[i], D_menu_801AF0DC[i], D_menu_801AF0E8[i], 255); @@ -2341,7 +2339,7 @@ void Option_801982B0(s32 arg0, s32 arg1, f32 arg2, f32 arg3, s32 arg4) { PlanetId end; if ((arg3 > 30.0f) && (arg3 < 200.0f)) { - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); if (arg1 < 6) { b = 255; g = 255; @@ -2376,10 +2374,10 @@ void Option_801982B0(s32 arg0, s32 arg1, f32 arg2, f32 arg3, s32 arg4) { } } gDPSetPrimColor(gMasterDisp++, 0, 0, r, g, b, 255); - TextureRect_16bRGBA(&gMasterDisp, D_MAP_60447A0, 8, 8, arg2 + 24.0f, arg3 + 11.0f, 2.0f, 0.2f); + TextureRect_RGBA16(&gMasterDisp, D_MAP_60447A0, 8, 8, arg2 + 24.0f, arg3 + 11.0f, 2.0f, 0.2f); } gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_16bRGBA(&gMasterDisp, D_MAP_6047550, 24, 24, arg2, arg3, 1.0f, 1.0f); + TextureRect_RGBA16(&gMasterDisp, D_MAP_6047550, 24, 24, arg2, arg3, 1.0f, 1.0f); } } @@ -2387,7 +2385,7 @@ void Option_801984D0(s32 arg0, s32 arg1, f32 arg2, f32 arg3) { s32 sp1C; if ((arg3 > 22.0f) && (arg3 < 162.0f)) { - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); sp1C = (gSaveFile.save.data.unk_5E[arg0][arg1].unk_C & 1) << 8; sp1C |= gSaveFile.save.data.unk_5E[arg0][arg1].unk_0; @@ -2401,7 +2399,7 @@ void Option_80198608(s32 arg0, s32 arg1, f32 arg2, f32 arg3) { s32 i; if ((arg3 > 12.0f) && (arg3 < 154.0f)) { - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); sp90[0] = gSaveFile.save.data.unk_5E[arg0][arg1].unk_D & 1; sp90[1] = gSaveFile.save.data.unk_5E[arg0][arg1].unk_F & 1; @@ -2426,7 +2424,7 @@ void Option_8019882C(s32 arg0, s32 arg1, f32 arg2, f32 arg3) { if ((arg3 > 58.0f) && (arg3 < 197.0f)) { temp = gSaveFile.save.data.unk_5E[arg0][arg1].unk_8 & 0xF; sp20 = D_menu_801AEEAC[temp]; - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); temp2 = Graphics_GetSmallTextWidth(sp20) / 2.0f; Graphics_DisplaySmallText(arg2 + 12.0f - temp2, arg3 - 8.0f, 1.0f, 1.0f, sp20); @@ -2456,7 +2454,7 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) { switch (planet) { case SAVE_SLOT_SOLAR: - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0, 0, 240, 0, 0, 255); gDPSetEnvColor(gMasterDisp++, 31, 0, 0, 0); @@ -2477,7 +2475,7 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) { break; case PLANET_METEO: - RCP_SetupDL(&gMasterDisp, 0x3E); + RCP_SetupDL(&gMasterDisp, SETUPDL_62); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); @@ -2499,7 +2497,7 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) { case PLANET_SECTOR_X: case PLANET_SECTOR_Y: case PLANET_SECTOR_Z: - RCP_SetupDL(&gMasterDisp, 0x3E); + RCP_SetupDL(&gMasterDisp, SETUPDL_62); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 144); @@ -2514,7 +2512,7 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) { break; case PLANET_BOLSE: - RCP_SetupDL(&gMasterDisp, 0x17); + RCP_SetupDL(&gMasterDisp, SETUPDL_23); Lights_SetOneLight(&gMasterDisp, 0, 0, 100, 100, 100, 70, 100, 100, 100); Matrix_Push(&gGfxMatrix); @@ -2529,7 +2527,7 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) { break; case PLANET_AREA_6: - RCP_SetupDL(&gMasterDisp, 0x17); + RCP_SetupDL(&gMasterDisp, SETUPDL_23); Lights_SetOneLight(&gMasterDisp, 0, 0, 100, 100, 100, 70, 100, 100, 100); Matrix_Push(&gGfxMatrix); @@ -2544,7 +2542,7 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) { break; default: - RCP_SetupDL(&gMasterDisp, 0x3E); + RCP_SetupDL(&gMasterDisp, SETUPDL_62); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); @@ -2593,7 +2591,7 @@ static f32 D_menu_801AF140 = 11.0f; static f32 D_menu_801AF144 = 2.7f; void Option_80199198(f32 arg0, f32 arg1, f32 arg2) { - RCP_SetupDL(&gMasterDisp, 0x35); + RCP_SetupDL(&gMasterDisp, SETUPDL_53); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, arg0 - D_menu_801AF140, arg1 + D_menu_801AF144, arg2, MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_menu_801AF13C, D_menu_801AF13C, D_menu_801AF13C, MTXF_APPLY); @@ -2785,25 +2783,25 @@ void Option_80199820(s32 arg0) { static s32 D_menu_801AF23C[4] = { 242, 30, 255, 30 }; static s32 D_menu_801AF24C[4] = { 12, 0, 67, 255 }; - RCP_SetupDL(&gMasterDisp, 0x55); + RCP_SetupDL(&gMasterDisp, SETUPDL_85); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); for (i = 0; i < 4; i++) { - TextureRect_4bCI(&gMasterDisp, D_VS_MENU_70118E0 + (80 * 16 * i) / 2, D_VS_MENU_70123F8, 80, 16, - D_menu_801AF148[arg0], D_menu_801AF158[arg0] + (16.0f * i), 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_VS_MENU_70118E0 + (80 * 16 * i) / 2, D_VS_MENU_70123F8, 80, 16, + D_menu_801AF148[arg0], D_menu_801AF158[arg0] + (16.0f * i), 1.0f, 1.0f); } - TextureRect_4bCI(&gMasterDisp, D_VS_MENU_70118E0 + (80 * 16 * 4) / 2, D_VS_MENU_70123F8, 80, 7, - D_menu_801AF148[arg0], D_menu_801AF158[arg0] + (16.0f * 4), 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_VS_MENU_70118E0 + (80 * 16 * 4) / 2, D_VS_MENU_70123F8, 80, 7, + D_menu_801AF148[arg0], D_menu_801AF158[arg0] + (16.0f * 4), 1.0f, 1.0f); gDPSetPrimColor(gMasterDisp++, 0, 0, D_menu_801AF22C[arg0], D_menu_801AF23C[arg0], D_menu_801AF24C[arg0], 255); - TextureRect_8bCI(&gMasterDisp, D_menu_801AF1EC[arg0], D_menu_801AF1FC[arg0], D_menu_801AF168[arg0], - D_menu_801AF178[arg0], D_menu_801AF148[arg0] + D_menu_801AF188[arg0], - D_menu_801AF158[arg0] + D_menu_801AF198, 1.0f, 1.0f); + TextureRect_CI8(&gMasterDisp, D_menu_801AF1EC[arg0], D_menu_801AF1FC[arg0], D_menu_801AF168[arg0], + D_menu_801AF178[arg0], D_menu_801AF148[arg0] + D_menu_801AF188[arg0], + D_menu_801AF158[arg0] + D_menu_801AF198, 1.0f, 1.0f); - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); var_v0 = 0xFFFFFFFF; if (D_menu_801B9348[arg0] != 0) { @@ -2816,37 +2814,37 @@ void Option_80199820(s32 arg0) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); - TextureRect_8bIA(&gMasterDisp, D_VS_MENU_7001030, 64, 9, D_menu_801AF148[arg0] + D_menu_801AF1BC, - D_menu_801AF158[arg0] + D_menu_801AF1C0, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_VS_MENU_7001030, 64, 9, D_menu_801AF148[arg0] + D_menu_801AF1BC, + D_menu_801AF158[arg0] + D_menu_801AF1C0, 1.0f, 1.0f); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); - TextureRect_8bIA(&gMasterDisp, D_menu_801AF1E0[D_menu_801AED3C[arg0]], 40, 12, - D_menu_801AF148[arg0] + D_menu_801AF1C4, D_menu_801AF158[arg0] + D_menu_801AF1C8, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_menu_801AF1E0[D_menu_801AED3C[arg0]], 40, 12, + D_menu_801AF148[arg0] + D_menu_801AF1C4, D_menu_801AF158[arg0] + D_menu_801AF1C8, 1.0f, 1.0f); } gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_8bIA_MirX(&gMasterDisp, D_OPT_800E130, 8, 8, D_menu_801AF148[arg0] + D_menu_801AF1D4, - D_menu_801AF158[arg0] + D_menu_801AF1DC, 1.0f, 1.0f); + TextureRect_IA8_MirX(&gMasterDisp, D_OPT_800E130, 8, 8, D_menu_801AF148[arg0] + D_menu_801AF1D4, + D_menu_801AF158[arg0] + D_menu_801AF1DC, 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, D_OPT_800E130, 8, 8, D_menu_801AF148[arg0] + D_menu_801AF1D8, - D_menu_801AF158[arg0] + D_menu_801AF1DC, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_OPT_800E130, 8, 8, D_menu_801AF148[arg0] + D_menu_801AF1D8, + D_menu_801AF158[arg0] + D_menu_801AF1DC, 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, D_VS_MENU_7000F10, 40, 7, D_menu_801AF148[arg0] + D_menu_801AF1CC, - D_menu_801AF158[arg0] + D_menu_801AF1D0, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_VS_MENU_7000F10, 40, 7, D_menu_801AF148[arg0] + D_menu_801AF1CC, + D_menu_801AF158[arg0] + D_menu_801AF1D0, 1.0f, 1.0f); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); for (i = 0; i < 2; i++) { - TextureRect_16bRGBA(&gMasterDisp, D_menu_801AF20C[arg0] + (44 * 20 * i), 44, 20, - D_menu_801AF148[arg0] + D_menu_801AF1B4, - D_menu_801AF158[arg0] + D_menu_801AF1B8 + (i * 20.0f * 0.7f), 0.7f, 0.7f); + TextureRect_RGBA16(&gMasterDisp, D_menu_801AF20C[arg0] + (44 * 20 * i), 44, 20, + D_menu_801AF148[arg0] + D_menu_801AF1B4, + D_menu_801AF158[arg0] + D_menu_801AF1B8 + (i * 20.0f * 0.7f), 0.7f, 0.7f); } - TextureRect_16bRGBA(&gMasterDisp, D_menu_801AF20C[arg0] + 44 * 20 * 2, 44, 4, - D_menu_801AF148[arg0] + D_menu_801AF1B4, D_menu_801AF158[arg0] + D_menu_801AF1B8 + 28.0f, 0.7f, - 0.7f); + TextureRect_RGBA16(&gMasterDisp, D_menu_801AF20C[arg0] + 44 * 20 * 2, 44, 4, + D_menu_801AF148[arg0] + D_menu_801AF1B4, D_menu_801AF158[arg0] + D_menu_801AF1B8 + 28.0f, 0.7f, + 0.7f); var_a2 = 24; if (arg0 == 0) { @@ -2855,8 +2853,8 @@ void Option_80199820(s32 arg0) { gDPSetPrimColor(gMasterDisp++, 0, 0, D_menu_801AF22C[arg0], D_menu_801AF23C[arg0], D_menu_801AF24C[arg0], 255); - TextureRect_8bIA(&gMasterDisp, D_menu_801AF21C[arg0], var_a2, 13, D_menu_801AF148[arg0] + D_menu_801AF19C[arg0], - D_menu_801AF158[arg0] + D_menu_801AF1AC, D_menu_801AF1B0, D_menu_801AF1B0); + TextureRect_IA8(&gMasterDisp, D_menu_801AF21C[arg0], var_a2, 13, D_menu_801AF148[arg0] + D_menu_801AF19C[arg0], + D_menu_801AF158[arg0] + D_menu_801AF1AC, D_menu_801AF1B0, D_menu_801AF1B0); } void Option_80199EA8(void) { @@ -2867,8 +2865,8 @@ void Option_80199EA8(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); for (i = 0; i < 3; i++) { - TextureRect_16bRGBA(&gMasterDisp, D_VS_MENU_700E9A0 + (144 * 14 * i), 144, 14, 87.0f, 84 + (i * 14.0f), 1.0f, - 1.0f); + TextureRect_RGBA16(&gMasterDisp, D_VS_MENU_700E9A0 + (144 * 14 * i), 144, 14, 87.0f, 84 + (i * 14.0f), 1.0f, + 1.0f); } } @@ -3185,11 +3183,11 @@ void Option_8019AB30(void) { s32 sp44 = gVsPointsToWin; s32 var_v0; - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 60, 60, 255, 190); - TextureRect_8bIA(&gMasterDisp, D_MAP_601B4B0, 24, 17, 94.0f, 43.0f, 5.0f, 1.1f); + TextureRect_IA8(&gMasterDisp, D_MAP_601B4B0, 24, 17, 94.0f, 43.0f, 5.0f, 1.1f); if (D_menu_801B912C == 0) { Option_8019B6D8(97.0f, 50.0f, 107.0f, 255, 255, 255); @@ -3212,15 +3210,15 @@ void Option_8019AB30(void) { } if ((gGameFrameCount & var_v0) != 0) { - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); - TextureRect_8bIA(&gMasterDisp, D_menu_801AECF8[sp44], 16, 15, 109.0f, 45.0f, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_menu_801AECF8[sp44], 16, 15, 109.0f, 45.0f, 1.0f, 1.0f); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); - TextureRect_8bIA(&gMasterDisp, D_VS_MENU_7001DF0, 80, 10, 122.0f, 49.0f, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_VS_MENU_7001DF0, 80, 10, 122.0f, 49.0f, 1.0f, 1.0f); } } @@ -3237,11 +3235,11 @@ void Option_8019AD84(void) { static u8* sTimeTrialMinuteTextures[] = { D_VS_MENU_70024D0, D_VS_MENU_7002730, D_VS_MENU_7002990, D_VS_MENU_7002BF0, D_VS_MENU_7002E50 }; - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 60, 60, 255, 190); - TextureRect_8bIA(&gMasterDisp, D_MAP_601B4B0, 24, 17, 93.0f, 42.0f, 5.1f, 1.1f); + TextureRect_IA8(&gMasterDisp, D_MAP_601B4B0, 24, 17, 93.0f, 42.0f, 5.1f, 1.1f); if (D_menu_801B912C == 0) { D_menu_801B9324 = 97.0f; @@ -3267,16 +3265,16 @@ void Option_8019AD84(void) { } if ((gGameFrameCount & var_v0) != 0) { - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); - TextureRect_8bIA(&gMasterDisp, sTimeTrialMinuteTextures[D_menu_801B9340], 40, 15, - D_menu_801AF25C[D_menu_801B9340 + 1], D_menu_801AF274[D_menu_801B9340 + 1], 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, sTimeTrialMinuteTextures[D_menu_801B9340], 40, 15, + D_menu_801AF25C[D_menu_801B9340 + 1], D_menu_801AF274[D_menu_801B9340 + 1], 1.0f, 1.0f); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); - TextureRect_8bIA(&gMasterDisp, D_VS_MENU_7002110, 80, 12, D_menu_801AF25C[0], D_menu_801AF274[0], 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_VS_MENU_7002110, 80, 12, D_menu_801AF25C[0], D_menu_801AF274[0], 1.0f, 1.0f); } } @@ -3294,7 +3292,7 @@ void Option_8019AFFC(void) { D_menu_801B93C8 = 88.0f; D_menu_801B93CC = 114.0f; - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); Option_8019B6D8(D_menu_801B93C0, D_menu_801B93C8, D_menu_801B93CC, 255, 255, 255); Option_8019C824(&D_menu_801B9370); @@ -3315,11 +3313,11 @@ void Option_8019AFFC(void) { } if ((gGameFrameCount & var_v0) != 0) { - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); - TextureRect_8bIA(&gMasterDisp, D_VS_MENU_7001270, 112, 12, D_menu_801AF2A0, D_menu_801AF2A4, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_VS_MENU_7001270, 112, 12, D_menu_801AF2A0, D_menu_801AF2A4, 1.0f, 1.0f); } if (D_menu_801B93D0 == 30) { @@ -3349,21 +3347,21 @@ void Option_8019B1F8(void) { sp8C[i] = 32; } - RCP_SetupDL(&gMasterDisp, 0x55); + RCP_SetupDL(&gMasterDisp, SETUPDL_85); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sp8C[i]); - TextureRect_8bCI(&gMasterDisp, D_menu_801AF2C4[i], D_menu_801AF2CC[i], 48, 38, xPos, D_menu_801AF2AC, 1.0f, - 1.0f); + TextureRect_CI8(&gMasterDisp, D_menu_801AF2C4[i], D_menu_801AF2CC[i], 48, 38, xPos, D_menu_801AF2AC, 1.0f, + 1.0f); width = 48; if (i == 1) { width = 56; } - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sp8C[i]); - TextureRect_8bIA(&gMasterDisp, D_menu_801AF2BC[i], width, 10, D_menu_801AF2B4[i], D_menu_801AF2AC + 40.0f, 1.0f, - 1.0f); + TextureRect_IA8(&gMasterDisp, D_menu_801AF2BC[i], width, 10, D_menu_801AF2B4[i], D_menu_801AF2AC + 40.0f, 1.0f, + 1.0f); } } @@ -3395,19 +3393,19 @@ void Option_8019B3DC(void) { sp8C[i] = 32; } - RCP_SetupDL(&gMasterDisp, 0x55); + RCP_SetupDL(&gMasterDisp, SETUPDL_85); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sp8C[i]); - TextureRect_8bCI(&gMasterDisp, D_menu_801AF2F0[i], D_menu_801AF2F8[i], 48, 38, xPos, D_menu_801AF2D8, 1.0f, - 1.0f); + TextureRect_CI8(&gMasterDisp, D_menu_801AF2F0[i], D_menu_801AF2F8[i], 48, 38, xPos, D_menu_801AF2D8, 1.0f, + 1.0f); - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sp8C[i]); - TextureRect_8bIA(&gMasterDisp, D_menu_801AF2E8[i], 56, 10, D_menu_801AF2E0[i], D_menu_801AF2D8 + 40.0f, 1.0f, - 1.0f); + TextureRect_IA8(&gMasterDisp, D_menu_801AF2E8[i], 56, 10, D_menu_801AF2E0[i], D_menu_801AF2D8 + 40.0f, 1.0f, + 1.0f); } } @@ -3431,24 +3429,24 @@ void Option_8019B5AC(void) { } if ((gGameFrameCount & var_v0) != 0) { - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); - TextureRect_8bIA(&gMasterDisp, D_VS_MENU_7003650, 40, 12, 143.0f, 210.0f, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_VS_MENU_7003650, 40, 12, 143.0f, 210.0f, 1.0f, 1.0f); } } void Option_8019B6D8(f32 xPos, f32 yPos, f32 offset, s32 r, s32 g, s32 b) { - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, r, g, b, 255); - TextureRect_8bIA_MirX(&gMasterDisp, D_VS_MENU_7004010, 8, 8, xPos, yPos, 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, D_VS_MENU_7004010, 8, 8, xPos + offset, yPos, 1.0f, 1.0f); + TextureRect_IA8_MirX(&gMasterDisp, D_VS_MENU_7004010, 8, 8, xPos, yPos, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_VS_MENU_7004010, 8, 8, xPos + offset, yPos, 1.0f, 1.0f); } void Option_8019B7D4(void) { - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_8bIA(&gMasterDisp, D_OPT_80080F0, 96, 10, 62.0f, 213.0f, 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, D_OPT_8006E50, 96, 10, 166.0f, 213.0f, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_OPT_80080F0, 96, 10, 62.0f, 213.0f, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_OPT_8006E50, 96, 10, 166.0f, 213.0f, 1.0f, 1.0f); } void Option_8019B8A0(s32 arg0) { @@ -3473,7 +3471,7 @@ void Option_DrawMenuLabel(void) { } void Option_DrawMenuCard(MenuContext_38 arg0) { - RCP_SetupDL(&gMasterDisp, 0x11); + RCP_SetupDL(&gMasterDisp, SETUPDL_17); Lib_InitOrtho(&gMasterDisp); @@ -3577,7 +3575,7 @@ void Option_8019BF34(void) { } void Option_8019C04C(void) { - RCP_SetupDL(&gMasterDisp, 0x24); + RCP_SetupDL(&gMasterDisp, SETUPDL_36); Lib_InitOrtho(&gMasterDisp); @@ -3599,31 +3597,31 @@ void Option_DrawCardLabel(OptionTexture arg0) { if (!(arg0.unk_20 <= 0.0f) && !(arg0.unk_24 <= 0.0f)) { switch (arg0.unk_00) { case 1: - RCP_SetupDL(&gMasterDisp, 0x4E); + RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, arg0.unk_28, arg0.unk_2C, arg0.unk_30, arg0.unk_34); - TextureRect_4bCI(&gMasterDisp, arg0.unk_08, arg0.unk_0C, arg0.unk_10, arg0.unk_14, arg0.unk_18, - arg0.unk_1C, arg0.unk_20, arg0.unk_24); + TextureRect_CI4(&gMasterDisp, arg0.unk_08, arg0.unk_0C, arg0.unk_10, arg0.unk_14, arg0.unk_18, + arg0.unk_1C, arg0.unk_20, arg0.unk_24); break; case 2: - RCP_SetupDL(&gMasterDisp, 0x4E); + RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, arg0.unk_28, arg0.unk_2C, arg0.unk_30, arg0.unk_34); - TextureRect_8bCI(&gMasterDisp, arg0.unk_08, arg0.unk_0C, arg0.unk_10, arg0.unk_14, arg0.unk_18, - arg0.unk_1C, arg0.unk_20, arg0.unk_24); + TextureRect_CI8(&gMasterDisp, arg0.unk_08, arg0.unk_0C, arg0.unk_10, arg0.unk_14, arg0.unk_18, + arg0.unk_1C, arg0.unk_20, arg0.unk_24); break; case 0: - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, arg0.unk_28, arg0.unk_2C, arg0.unk_30, arg0.unk_34); - TextureRect_8bIA(&gMasterDisp, arg0.unk_08, arg0.unk_10, arg0.unk_14, arg0.unk_18, arg0.unk_1C, - arg0.unk_20, arg0.unk_24); + TextureRect_IA8(&gMasterDisp, arg0.unk_08, arg0.unk_10, arg0.unk_14, arg0.unk_18, arg0.unk_1C, + arg0.unk_20, arg0.unk_24); break; case 3: - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, arg0.unk_28, arg0.unk_2C, arg0.unk_30, arg0.unk_34); - TextureRect_16bRGBA(&gMasterDisp, arg0.unk_08, arg0.unk_10, arg0.unk_14, arg0.unk_18, arg0.unk_1C, - arg0.unk_20, arg0.unk_24); + TextureRect_RGBA16(&gMasterDisp, arg0.unk_08, arg0.unk_10, arg0.unk_14, arg0.unk_18, arg0.unk_1C, + arg0.unk_20, arg0.unk_24); break; } } @@ -4048,7 +4046,7 @@ void Option_8019D118(void) { static f32 D_menu_801AF30C[6] = { 51.0f, 138.0f, 118.0f, 166.0f, 138.0f, 267.0f }; static f32 D_menu_801AF324[6] = { 29.0f, 49.0f, 145.0f, 155.0f, 87.0f, 127.0f }; - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); if (gLastGameState == GSTATE_ENDING) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); @@ -4066,13 +4064,13 @@ void Option_8019D118(void) { if (D_menu_801B9138 == 1) { if ((gGameFrameCount & 0x10) != 0) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); - TextureRect_8bIA(&gMasterDisp, aTextEnd, 32, 8, D_menu_801AF30C[5], D_menu_801AF324[5], 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, aTextEnd, 32, 8, D_menu_801AF30C[5], D_menu_801AF324[5], 1.0f, 1.0f); } } Option_80197A3C(D_menu_801B9094, D_menu_801AF30C[4], D_menu_801AF324[4]); - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); @@ -4251,7 +4249,7 @@ void Option_8019DB20(s32 character, f32 x, f32 y, f32 z, f32 scale, f32 xAngle, return; } - RCP_SetupDL(&gMasterDisp, 0x17); + RCP_SetupDL(&gMasterDisp, SETUPDL_23); gSPTexture(gMasterDisp++, 2500, 200, 0, G_TX_RENDERTILE, G_ON); gSPSetGeometryMode(gMasterDisp++, G_TEXTURE_GEN); @@ -4411,39 +4409,39 @@ void Option_InvoiceDraw(void) { Graphics_FillRectangle(&gMasterDisp, 25, 18, SCREEN_WIDTH - 25, SCREEN_HEIGHT - 18, 255, 255, 255, 255); - RCP_SetupDL(&gMasterDisp, 0x4E); + RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_4bCI(&gMasterDisp, D_OPT_8000000, D_OPT_8000680, 128, 16, D_menu_801AF3D0[0], D_menu_801AF3F0[0], 1.0f, - 1.0f); + TextureRect_CI4(&gMasterDisp, D_OPT_8000000, D_OPT_8000680, 128, 16, D_menu_801AF3D0[0], D_menu_801AF3F0[0], 1.0f, + 1.0f); - TextureRect_4bCI(&gMasterDisp, D_OPT_8000000 + 128 * 16 / 2, D_OPT_8000680, 128, 10, D_menu_801AF3D0[0], - D_menu_801AF3F0[0] + 16.0f, 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_OPT_8000000 + 128 * 16 / 2, D_OPT_8000680, 128, 10, D_menu_801AF3D0[0], + D_menu_801AF3F0[0] + 16.0f, 1.0f, 1.0f); for (i = 0; i < 2; i++) { - TextureRect_4bCI(&gMasterDisp, D_OPT_80006A0 + (256 * 16 * i) / 2, D_OPT_80017A0, 256, 16, D_menu_801AF3D0[1], - D_menu_801AF3F0[1] + (16 * i), 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_OPT_80006A0 + (256 * 16 * i) / 2, D_OPT_80017A0, 256, 16, D_menu_801AF3D0[1], + D_menu_801AF3F0[1] + (16 * i), 1.0f, 1.0f); } - TextureRect_4bCI(&gMasterDisp, D_OPT_80006A0 + 256 * 32 / 2, D_OPT_80017A0, 256, 2, D_menu_801AF3D0[1], - D_menu_801AF3F0[1] + 32.0f, 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_OPT_80006A0 + 256 * 32 / 2, D_OPT_80017A0, 256, 2, D_menu_801AF3D0[1], + D_menu_801AF3F0[1] + 32.0f, 1.0f, 1.0f); for (i = 0; i < 4; i++) { - TextureRect_4bCI(&gMasterDisp, D_OPT_80017C0 + (256 * 16 * i) / 2, D_OPT_80038C0, 256, 16, D_menu_801AF3D0[2], - D_menu_801AF3F0[2] + (16 * i), 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_OPT_80017C0 + (256 * 16 * i) / 2, D_OPT_80038C0, 256, 16, D_menu_801AF3D0[2], + D_menu_801AF3F0[2] + (16 * i), 1.0f, 1.0f); } - TextureRect_4bCI(&gMasterDisp, D_OPT_80017C0 + 256 * 16 * 4 / 2, D_OPT_80038C0, 256, 2, D_menu_801AF3D0[2], - D_menu_801AF3F0[2] + 64.0f, 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, D_OPT_80017C0 + 256 * 16 * 4 / 2, D_OPT_80038C0, 256, 2, D_menu_801AF3D0[2], + D_menu_801AF3F0[2] + 64.0f, 1.0f, 1.0f); - RCP_SetupDL(&gMasterDisp, 0x4C); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); for (i = 0; i < 30; i++) { - TextureRect_16bRGBA(&gMasterDisp, D_OPT_800E170 + (188 * 2 * i), 188, 2, D_menu_801AF3D0[3], - D_menu_801AF3F0[3] + (2.0f * i), 1.0f, 1.0f); + TextureRect_RGBA16(&gMasterDisp, D_OPT_800E170 + (188 * 2 * i), 188, 2, D_menu_801AF3D0[3], + D_menu_801AF3F0[3] + (2.0f * i), 1.0f, 1.0f); } gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 0, 255); @@ -4459,8 +4457,8 @@ void Option_InvoiceDraw(void) { if (D_menu_801B9090) { gDPSetPrimColor(gMasterDisp++, 0, 0, 120, 0, 0, 192); for (i = 0; i < 3; i++) { - TextureRect_8bIA(&gMasterDisp, D_OPT_800D1F0 + (80 * 16 * i), 80, 16, D_menu_801AF3D0[5], - D_menu_801AF3F0[5] + (16.0f * i), 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, D_OPT_800D1F0 + (80 * 16 * i), 80, 16, D_menu_801AF3D0[5], + D_menu_801AF3F0[5] + (16.0f * i), 1.0f, 1.0f); } } diff --git a/src/overlays/ovl_menu/fox_title.c b/src/overlays/ovl_menu/fox_title.c index 4063d6ca..a0eade0d 100644 --- a/src/overlays/ovl_menu/fox_title.c +++ b/src/overlays/ovl_menu/fox_title.c @@ -399,7 +399,7 @@ void Title_80187CA8(void) { s32 temp = 20; s32 temp2 = 36; - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); @@ -407,14 +407,14 @@ void Title_80187CA8(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_8bIA(&gMasterDisp, aSmallText_6, 16, 8, 148.0f, temp, 1.0f, 1.0f); - TextureRect_8bIA(&gMasterDisp, aSmallText_4, 16, 8, 164, temp, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, aSmallText_6, 16, 8, 148.0f, temp, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, aSmallText_4, 16, 8, 164, temp, 1.0f, 1.0f); - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_8bIA(&gMasterDisp, &aTextKanjiCOMPLETE[48 * 6], 16, 2, 36, 32, 15.2f, 1.0f); + TextureRect_IA8(&gMasterDisp, &aTextKanjiCOMPLETE[48 * 6], 16, 2, 36, 32, 15.2f, 1.0f); Title_80187E28(); } @@ -422,7 +422,7 @@ void Title_80187E28(void) { s32 temp; s32 i; - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); @@ -2238,7 +2238,7 @@ void Title_8018D2B8(s32 arg0) { Lights_SetOneLight(&gMasterDisp, D_menu_801B82E0, D_menu_801B82E4, D_menu_801B82E8, gLight1R, gLight1G, gLight1B, gAmbientR, gAmbientG, gAmbientB); - RCP_SetupDL(&gMasterDisp, 0x17); + RCP_SetupDL(&gMasterDisp, SETUPDL_23); Matrix_Push(&gGfxMatrix); @@ -2291,7 +2291,7 @@ void Title_8018D510(s32 arg0) { f32 var_fa0; f32 temp; - RCP_SetupDL(&gMasterDisp, 0x43); + RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); if (D_menu_801B84E8[arg0].unk_40 == 1) { @@ -2378,7 +2378,7 @@ void Title_8018D80C(s32 arg0) { temp = sqrtf(SQ(gCsCamEyeZ - D_menu_801B84E8[arg0].unk_00.z) + SQ(gCsCamEyeX - D_menu_801B84E8[arg0].unk_00.x)); sp70 = Math_Atan2F(gCsCamEyeY - D_menu_801B84E8[arg0].unk_00.y, temp); - RCP_SetupDL(&gMasterDisp, 0x31); + RCP_SetupDL(&gMasterDisp, SETUPDL_49); gDPSetPrimColor(gMasterDisp++, 0, 0, 253, 253, 255, 255); gDPSetEnvColor(gMasterDisp++, 251, 251, 255, 255); @@ -2430,7 +2430,7 @@ void Title_8018DF0C(f32 arg0) { f32 sp30; Title_80191798(&sp34, &sp30); - RCP_SetupDL(&gMasterDisp, 0x35); + RCP_SetupDL(&gMasterDisp, SETUPDL_53); if (arg0 != 0.0f) { D_menu_801B8688.pos.z = gCsCamEyeZ - arg0; @@ -2463,7 +2463,7 @@ void Title_8018E058(void) { Matrix_Scale(gGfxMatrix, D_menu_801B8658.scale, D_menu_801B8658.scale, D_menu_801B8658.scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - RCP_SetupDL(&gMasterDisp, 0x17); + RCP_SetupDL(&gMasterDisp, SETUPDL_23); gGreatFoxIntact = true; @@ -2521,7 +2521,7 @@ void Title_8018E200(void) { } } - RCP_SetupDL(&gMasterDisp, 0x31); + RCP_SetupDL(&gMasterDisp, SETUPDL_49); for (i = 0; i < D_menu_801B7C98; i++) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 200, 200, D_menu_801B7CC8[i]); @@ -2614,7 +2614,7 @@ void Title_8018EA78(s32 arg0) { sp44 = D_menu_801B8350[arg0].unk_58 % Animation_GetFrameCount(D_menu_801ADA00[arg0].unk_4); - RCP_SetupDL(&gMasterDisp, 0x17); + RCP_SetupDL(&gMasterDisp, SETUPDL_23); Lights_SetOneLight(&gMasterDisp, D_menu_801B82E0, D_menu_801B82E4, D_menu_801B82E8, gLight1R, gLight1G, gLight1B, gAmbientR, gAmbientG, gAmbientB); @@ -2815,17 +2815,17 @@ void Title_8018F438(void) { void Title_8018F680(void) { s32 i; - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); for (i = 0; i < 30; i++) { - TextureRect_16bRGBA(&gMasterDisp, gTitleStarfoxLogo + (236 * 2 * i), 236, 2, D_menu_801B9054, - D_menu_801B9058 + (i * 2.0f), 1.0f, 1.0f); + TextureRect_RGBA16(&gMasterDisp, gTitleStarfoxLogo + (236 * 2 * i), 236, 2, D_menu_801B9054, + D_menu_801B9058 + (i * 2.0f), 1.0f, 1.0f); } } void Title_8018F77C(void) { - RCP_SetupDL(&gMasterDisp, 0x35); + RCP_SetupDL(&gMasterDisp, SETUPDL_53); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, D_menu_801B905C, D_menu_801B9060, D_menu_801B9064, MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_menu_801B9068, D_menu_801B906C, 1.0f, MTXF_APPLY); @@ -2836,9 +2836,9 @@ void Title_8018F77C(void) { } void Title_8018F85C(void) { - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_8bIA(&gMasterDisp, gTitleCopyrightSymbol, 16, 16, 234.0f, 20.0f, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, gTitleCopyrightSymbol, 16, 16, 234.0f, 20.0f, 1.0f, 1.0f); } void Title_8018F8E4(void) { @@ -2863,29 +2863,29 @@ void Title_8018F8E4(void) { } if (gMainController < 0) { - RCP_SetupDL(&gMasterDisp, 0x55); + RCP_SetupDL(&gMasterDisp, SETUPDL_85); gDPSetPrimColor(gMasterDisp++, 0, 0, 60, 60, 255, 200); - TextureRect_8bCI(&gMasterDisp, D_TITLE_601D750, D_TITLE_601DB50, 32, 32, D_menu_801AE464, D_menu_801AE468, - D_menu_801AE46C, D_menu_801AE470); - RCP_SetupDL(&gMasterDisp, 0x53); + TextureRect_CI8(&gMasterDisp, D_TITLE_601D750, D_TITLE_601DB50, 32, 32, D_menu_801AE464, D_menu_801AE468, + D_menu_801AE46C, D_menu_801AE470); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, (s32) D_menu_801B7BC8, (s32) D_menu_801B7BC8, 255); for (i = 0; i < 6; i++) { - TextureRect_8bIA(&gMasterDisp, gTitleNoController + (176 * 4 * i), 176, 4, D_menu_801AE474, - D_menu_801AE478 + (i * 4.0f), 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, gTitleNoController + (176 * 4 * i), 176, 4, D_menu_801AE474, + D_menu_801AE478 + (i * 4.0f), 1.0f, 1.0f); } } else { - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, (s32) D_menu_801B7BC8, (s32) D_menu_801B7BC8, 255); for (i = 0; i < 2; i++) { - TextureRect_8bIA(&gMasterDisp, gTitlePressStart + (120 * 6 * i), 120, 6, 101.0f, temp2 + (i * 6.0f), - 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, gTitlePressStart + (120 * 6 * i), 120, 6, 101.0f, temp2 + (i * 6.0f), + 1.0f, 1.0f); } - TextureRect_8bIA(&gMasterDisp, gTitlePressStart + 120 * 6 * 2, 120, 1, 101.0f, temp2 + 12, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, gTitlePressStart + 120 * 6 * 2, 120, 1, 101.0f, temp2 + 12, 1.0f, 1.0f); } } } @@ -2893,12 +2893,12 @@ void Title_8018F8E4(void) { void Title_8018FC14(void) { s32 i; - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); for (i = 0; i < 2; i++) { - TextureRect_8bIA(&gMasterDisp, gTitleNintendoCopyright + (120 * 6 * i), 120, 6, 102.0f, 209.0f + (i * 6.0f), - 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, gTitleNintendoCopyright + (120 * 6 * i), 120, 6, 102.0f, 209.0f + (i * 6.0f), + 1.0f, 1.0f); } } @@ -2914,33 +2914,33 @@ void Title_8018FD08(void) { temp_fs2 = D_menu_801AE47C[D_menu_801B8340]; temp = 210.0f; - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); switch (D_menu_801B8340) { case 0: - TextureRect_8bIA(&gMasterDisp, gTitleSlippyCard, 144, 13, temp_fs2, temp, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, gTitleSlippyCard, 144, 13, temp_fs2, temp, 1.0f, 1.0f); break; case 1: - TextureRect_8bIA(&gMasterDisp, gTitlePeppyCard, 120, 13, temp_fs2, temp, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, gTitlePeppyCard, 120, 13, temp_fs2, temp, 1.0f, 1.0f); break; case 2: for (i = 0; i < 3; i++) { - TextureRect_8bIA(&gMasterDisp, gTitleFalcoCard + (176 * 4 * i), 176, 4, temp_fs2, temp + (i * 4), 1.0f, - 1.0f); + TextureRect_IA8(&gMasterDisp, gTitleFalcoCard + (176 * 4 * i), 176, 4, temp_fs2, temp + (i * 4), 1.0f, + 1.0f); } - TextureRect_8bIA(&gMasterDisp, gTitleFalcoCard + 176 * 4 * 3, 176, 1, temp_fs2, temp + 12.0f, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, gTitleFalcoCard + 176 * 4 * 3, 176, 1, temp_fs2, temp + 12.0f, 1.0f, 1.0f); break; case 3: for (i = 0; i < 3; i++) { - TextureRect_8bIA(&gMasterDisp, gTitleFoxCard + (176 * 4 * i), 176, 4, temp_fs2, temp + (i * 4), 1.0f, - 1.0f); + TextureRect_IA8(&gMasterDisp, gTitleFoxCard + (176 * 4 * i), 176, 4, temp_fs2, temp + (i * 4), 1.0f, + 1.0f); } - TextureRect_8bIA(&gMasterDisp, gTitleFoxCard + 176 * 4 * 3, 176, 1, temp_fs2, temp + 12, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, gTitleFoxCard + 176 * 4 * 3, 176, 1, temp_fs2, temp + 12, 1.0f, 1.0f); break; } } @@ -2976,14 +2976,14 @@ void Title_8018FF74(void) { D_menu_801B7BD0 -= 2; } - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetAlphaDither(gMasterDisp++, G_AD_NOISE); gDPSetColorDither(gMasterDisp++, G_CD_NOISE); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, D_menu_801B7BD0); - TextureRect_16bRGBA(&gMasterDisp, gTitleSunBeam, 32, 32, D_menu_801B9080, D_menu_801B9084, D_menu_801B7BB0, - D_menu_801B7BB4); + TextureRect_RGBA16(&gMasterDisp, gTitleSunBeam, 32, 32, D_menu_801B9080, D_menu_801B9084, D_menu_801B7BB0, + D_menu_801B7BB4); D_menu_801B9080 += 1.66f; } @@ -3018,7 +3018,7 @@ void Title_80190144(void) { } if (gFillScreenAlpha > 0) { - RCP_SetupDL(&gMasterDisp, 0x3E); + RCP_SetupDL(&gMasterDisp, SETUPDL_62); gDPSetAlphaDither(gMasterDisp++, G_AD_NOISE); gDPSetColorDither(gMasterDisp++, G_CD_NOISE); @@ -3049,7 +3049,7 @@ void Title_801903B8(void) { f32 temp; s32 i; - RCP_SetupDL(&gMasterDisp, 0x3E); + RCP_SetupDL(&gMasterDisp, SETUPDL_62); gDPSetAlphaDither(gMasterDisp++, G_AD_NOISE); gDPSetColorDither(gMasterDisp++, G_CD_NOISE); @@ -3096,24 +3096,24 @@ void Title_801906A0(void) { switch (D_menu_801B7BD4) { case 0: - RCP_SetupDL(&gMasterDisp, 0x55); + RCP_SetupDL(&gMasterDisp, SETUPDL_85); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, (s32) D_menu_801B7BDC); - TextureRect_4bCI(&gMasterDisp, gTextIntroStarfox, gTextIntroStarfoxPalette, 256, 13, 90.0f, 110.0f, 1.0f, - 1.0f); + TextureRect_CI4(&gMasterDisp, gTextIntroStarfox, gTextIntroStarfoxPalette, 256, 13, 90.0f, 110.0f, 1.0f, + 1.0f); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, (s32) D_menu_801B7BE0); - TextureRect_4bCI(&gMasterDisp, gTextIntroIn, gTextIntroInPalette, 32, 13, 150.0f, 110.0f, 1.0f, 1.0f); + TextureRect_CI4(&gMasterDisp, gTextIntroIn, gTextIntroInPalette, 32, 13, 150.0f, 110.0f, 1.0f, 1.0f); break; case 1: - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, (s32) D_menu_801B7BDC); for (i = 0; i < 5; i++) { - TextureRect_16bRGBA(&gMasterDisp, gTitleNintendo64Logo + (128 * 16 * i), 128, 16, D_menu_801B9070, - D_menu_801B9074 + (16 * i * D_menu_801B907C), D_menu_801B9078, D_menu_801B907C); + TextureRect_RGBA16(&gMasterDisp, gTitleNintendo64Logo + (128 * 16 * i), 128, 16, D_menu_801B9070, + D_menu_801B9074 + (16 * i * D_menu_801B907C), D_menu_801B9078, D_menu_801B907C); } - TextureRect_16bRGBA(&gMasterDisp, gTitleNintendo64Logo + (128 * 16 * 5), 128, 8, D_menu_801B9070, - (80.0f * D_menu_801B907C) + D_menu_801B9074, D_menu_801B9078, D_menu_801B907C); + TextureRect_RGBA16(&gMasterDisp, gTitleNintendo64Logo + (128 * 16 * 5), 128, 8, D_menu_801B9070, + (80.0f * D_menu_801B907C) + D_menu_801B9074, D_menu_801B9078, D_menu_801B907C); case -1: break; @@ -3123,7 +3123,7 @@ void Title_801906A0(void) { void Title_80190950(void) { Lights_SetOneLight(&gMasterDisp, D_menu_801B82E0, D_menu_801B82E4, D_menu_801B82E8, 0, 0, 0, gAmbientR, gAmbientG, gAmbientB); - RCP_SetupDL(&gMasterDisp, 0x17); + RCP_SetupDL(&gMasterDisp, SETUPDL_23); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, D_menu_801B9048, D_menu_801B904C, MTXF_APPLY); @@ -3149,7 +3149,7 @@ void Title_80190A98(void) { void Title_80190B30(s32 arg0) { Lights_SetOneLight(&gMasterDisp, D_menu_801B82E0, D_menu_801B82E4, D_menu_801B82E8, gLight1R, gLight1G, gLight1B, gAmbientR, gAmbientG, gAmbientB); - RCP_SetupDL(&gMasterDisp, 0x17); + RCP_SetupDL(&gMasterDisp, SETUPDL_23); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, D_menu_801B84E8[arg0].unk_00.x, -12.8f, D_menu_801B9044, MTXF_APPLY); @@ -3173,21 +3173,21 @@ void Title_80190C9C(void) { break; case 1: - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_8bIA(&gMasterDisp, gTitleGreatFoxCard, 144, 28, D_menu_801AE55C, D_menu_801AE560, 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, gTitleGreatFoxCard, 144, 28, D_menu_801AE55C, D_menu_801AE560, 1.0f, 1.0f); break; case 2: - RCP_SetupDL(&gMasterDisp, 0x53); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); for (i = 0; i < 4; i++) { - TextureRect_8bIA(&gMasterDisp, gTitleArwingCard + (112 * 6 * i), 112, 6, D_menu_801AE564, - D_menu_801AE568 + (6.0f * i), 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, gTitleArwingCard + (112 * 6 * i), 112, 6, D_menu_801AE564, + D_menu_801AE568 + (6.0f * i), 1.0f, 1.0f); } - TextureRect_8bIA(&gMasterDisp, gTitleArwingCard + (112 * 6 * 4), 112, 2, D_menu_801AE564, - D_menu_801AE568 + (6.0f * 4), 1.0f, 1.0f); + TextureRect_IA8(&gMasterDisp, gTitleArwingCard + (112 * 6 * 4), 112, 2, D_menu_801AE564, + D_menu_801AE568 + (6.0f * 4), 1.0f, 1.0f); } } diff --git a/srcjp/1FA60.c b/srcjp/1FA60.c deleted file mode 100644 index 96122084..00000000 --- a/srcjp/1FA60.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "common.h" - -#pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/1FA60/func_8001EF40.s") diff --git a/srcjp/dmatable.c b/srcjp/dmatable.c new file mode 100644 index 00000000..9f4a4bf4 --- /dev/null +++ b/srcjp/dmatable.c @@ -0,0 +1,86 @@ +#include "sf64dma.h" + +#define DMA_ENTRY(file) \ + { file##_ROM_START, { file##_ROM_START, file##_ROM_END }, false } +#define DMA_ENTRY_NONE \ + { NULL, { NULL, NULL }, false } + +DmaEntry gDmaTable[89] = { + { SEGMENT_ROM_START(makerom), { SEGMENT_ROM_START(makerom), SEGMENT_ROM_END(makerom) }, false }, + { SEGMENT_ROM_START(main), { SEGMENT_ROM_START(main), SEGMENT_ROM_END(main) }, false }, + { SEGMENT_ROM_START(dma_table), { SEGMENT_ROM_START(dma_table), SEGMENT_ROM_END(dma_table) }, false }, + { SEGMENT_ROM_START(audio_seq), { SEGMENT_ROM_START(audio_seq), SEGMENT_ROM_END(audio_seq) }, false }, + { SEGMENT_ROM_START(audio_bank), { SEGMENT_ROM_START(audio_bank), SEGMENT_ROM_END(audio_bank) }, false }, + { SEGMENT_ROM_START(audio_table), { SEGMENT_ROM_START(audio_table), SEGMENT_ROM_END(audio_table) }, false }, + { SEGMENT_ROM_START(ast_common), { SEGMENT_ROM_START(ast_common), SEGMENT_ROM_END(ast_common) }, false }, + { SEGMENT_ROM_START(ast_bg_space), { SEGMENT_ROM_START(ast_bg_space), SEGMENT_ROM_END(ast_bg_space) }, false }, + { SEGMENT_ROM_START(ast_bg_planet), { SEGMENT_ROM_START(ast_bg_planet), SEGMENT_ROM_END(ast_bg_planet) }, false }, + { SEGMENT_ROM_START(ast_arwing), { SEGMENT_ROM_START(ast_arwing), SEGMENT_ROM_END(ast_arwing) }, false }, + { SEGMENT_ROM_START(ast_landmaster), + { SEGMENT_ROM_START(ast_landmaster), SEGMENT_ROM_END(ast_landmaster) }, + false }, + { SEGMENT_ROM_START(ast_blue_marine), + { SEGMENT_ROM_START(ast_blue_marine), SEGMENT_ROM_END(ast_blue_marine) }, + false }, + { SEGMENT_ROM_START(ast_versus), { SEGMENT_ROM_START(ast_versus), SEGMENT_ROM_END(ast_versus) }, false }, + { SEGMENT_ROM_START(ast_enmy_planet), + { SEGMENT_ROM_START(ast_enmy_planet), SEGMENT_ROM_END(ast_enmy_planet) }, + false }, + { SEGMENT_ROM_START(ast_enmy_space), + { SEGMENT_ROM_START(ast_enmy_space), SEGMENT_ROM_END(ast_enmy_space) }, + false }, + { SEGMENT_ROM_START(ast_great_fox), { SEGMENT_ROM_START(ast_great_fox), SEGMENT_ROM_END(ast_great_fox) }, false }, + { SEGMENT_ROM_START(ast_star_wolf), { SEGMENT_ROM_START(ast_star_wolf), SEGMENT_ROM_END(ast_star_wolf) }, false }, + { SEGMENT_ROM_START(ast_allies), { SEGMENT_ROM_START(ast_allies), SEGMENT_ROM_END(ast_allies) }, false }, + { SEGMENT_ROM_START(ast_corneria), { SEGMENT_ROM_START(ast_corneria), SEGMENT_ROM_END(ast_corneria) }, false }, + { SEGMENT_ROM_START(ast_meteo), { SEGMENT_ROM_START(ast_meteo), SEGMENT_ROM_END(ast_meteo) }, false }, + { SEGMENT_ROM_START(ast_titania), { SEGMENT_ROM_START(ast_titania), SEGMENT_ROM_END(ast_titania) }, false }, + { SEGMENT_ROM_START(ast_7_ti_2), { SEGMENT_ROM_START(ast_7_ti_2), SEGMENT_ROM_END(ast_7_ti_2) }, false }, + { SEGMENT_ROM_START(ast_8_ti), { SEGMENT_ROM_START(ast_8_ti), SEGMENT_ROM_END(ast_8_ti) }, false }, + { SEGMENT_ROM_START(ast_9_ti), { SEGMENT_ROM_START(ast_9_ti), SEGMENT_ROM_END(ast_9_ti) }, false }, + { SEGMENT_ROM_START(ast_A_ti), { SEGMENT_ROM_START(ast_A_ti), SEGMENT_ROM_END(ast_A_ti) }, false }, + { SEGMENT_ROM_START(ast_7_ti_1), { SEGMENT_ROM_START(ast_7_ti_1), SEGMENT_ROM_END(ast_7_ti_1) }, false }, + { SEGMENT_ROM_START(ast_sector_x), { SEGMENT_ROM_START(ast_sector_x), SEGMENT_ROM_END(ast_sector_x) }, false }, + { SEGMENT_ROM_START(ast_sector_z), { SEGMENT_ROM_START(ast_sector_z), SEGMENT_ROM_END(ast_sector_z) }, false }, + { SEGMENT_ROM_START(ast_aquas), { SEGMENT_ROM_START(ast_aquas), SEGMENT_ROM_END(ast_aquas) }, false }, + { SEGMENT_ROM_START(ast_area_6), { SEGMENT_ROM_START(ast_area_6), SEGMENT_ROM_END(ast_area_6) }, false }, + { SEGMENT_ROM_START(ast_venom_1), { SEGMENT_ROM_START(ast_venom_1), SEGMENT_ROM_END(ast_venom_1) }, false }, + { SEGMENT_ROM_START(ast_venom_2), { SEGMENT_ROM_START(ast_venom_2), SEGMENT_ROM_END(ast_venom_2) }, false }, + { SEGMENT_ROM_START(ast_ve1_boss), { SEGMENT_ROM_START(ast_ve1_boss), SEGMENT_ROM_END(ast_ve1_boss) }, false }, + { SEGMENT_ROM_START(ast_bolse), { SEGMENT_ROM_START(ast_bolse), SEGMENT_ROM_END(ast_bolse) }, false }, + { SEGMENT_ROM_START(ast_fortuna), { SEGMENT_ROM_START(ast_fortuna), SEGMENT_ROM_END(ast_fortuna) }, false }, + { SEGMENT_ROM_START(ast_sector_y), { SEGMENT_ROM_START(ast_sector_y), SEGMENT_ROM_END(ast_sector_y) }, false }, + { SEGMENT_ROM_START(ast_solar), { SEGMENT_ROM_START(ast_solar), SEGMENT_ROM_END(ast_solar) }, false }, + { SEGMENT_ROM_START(ast_zoness), { SEGMENT_ROM_START(ast_zoness), SEGMENT_ROM_END(ast_zoness) }, false }, + { SEGMENT_ROM_START(ast_katina), { SEGMENT_ROM_START(ast_katina), SEGMENT_ROM_END(ast_katina) }, false }, + { SEGMENT_ROM_START(ast_macbeth), { SEGMENT_ROM_START(ast_macbeth), SEGMENT_ROM_END(ast_macbeth) }, false }, + { SEGMENT_ROM_START(ast_warp_zone), { SEGMENT_ROM_START(ast_warp_zone), SEGMENT_ROM_END(ast_warp_zone) }, false }, + { SEGMENT_ROM_START(ast_title), { SEGMENT_ROM_START(ast_title), SEGMENT_ROM_END(ast_title) }, false }, + { SEGMENT_ROM_START(ast_map), { SEGMENT_ROM_START(ast_map), SEGMENT_ROM_END(ast_map) }, false }, + { SEGMENT_ROM_START(ast_option), { SEGMENT_ROM_START(ast_option), SEGMENT_ROM_END(ast_option) }, false }, + { SEGMENT_ROM_START(ast_vs_menu), { SEGMENT_ROM_START(ast_vs_menu), SEGMENT_ROM_END(ast_vs_menu) }, false }, + { SEGMENT_ROM_START(ast_text), { SEGMENT_ROM_START(ast_text), SEGMENT_ROM_END(ast_text) }, false }, + { SEGMENT_ROM_START(ast_font_3d), { SEGMENT_ROM_START(ast_font_3d), SEGMENT_ROM_END(ast_font_3d) }, false }, + { SEGMENT_ROM_START(ast_andross), { SEGMENT_ROM_START(ast_andross), SEGMENT_ROM_END(ast_andross) }, false }, + { SEGMENT_ROM_START(ast_logo), { SEGMENT_ROM_START(ast_logo), SEGMENT_ROM_END(ast_logo) }, false }, + { SEGMENT_ROM_START(ast_ending), { SEGMENT_ROM_START(ast_ending), SEGMENT_ROM_END(ast_ending) }, false }, + { SEGMENT_ROM_START(ast_ending_award_front), + { SEGMENT_ROM_START(ast_ending_award_front), SEGMENT_ROM_END(ast_ending_award_front) }, + false }, + { SEGMENT_ROM_START(ast_ending_award_back), + { SEGMENT_ROM_START(ast_ending_award_back), SEGMENT_ROM_END(ast_ending_award_back) }, + false }, + { SEGMENT_ROM_START(ast_ending_expert), + { SEGMENT_ROM_START(ast_ending_expert), SEGMENT_ROM_END(ast_ending_expert) }, + false }, + { SEGMENT_ROM_START(ast_training), { SEGMENT_ROM_START(ast_training), SEGMENT_ROM_END(ast_training) }, false }, + { SEGMENT_ROM_START(ovl_i1), { SEGMENT_ROM_START(ovl_i1), SEGMENT_ROM_END(ovl_i1) }, false }, + { SEGMENT_ROM_START(ovl_i2), { SEGMENT_ROM_START(ovl_i2), SEGMENT_ROM_END(ovl_i2) }, false }, + { SEGMENT_ROM_START(ovl_i3), { SEGMENT_ROM_START(ovl_i3), SEGMENT_ROM_END(ovl_i3) }, false }, + { SEGMENT_ROM_START(ovl_i4), { SEGMENT_ROM_START(ovl_i4), SEGMENT_ROM_END(ovl_i4) }, false }, + { SEGMENT_ROM_START(ovl_i5), { SEGMENT_ROM_START(ovl_i5), SEGMENT_ROM_END(ovl_i5) }, false }, + { SEGMENT_ROM_START(ovl_i6), { SEGMENT_ROM_START(ovl_i6), SEGMENT_ROM_END(ovl_i6) }, false }, + { SEGMENT_ROM_START(ovl_menu), { SEGMENT_ROM_START(ovl_menu), SEGMENT_ROM_END(ovl_menu) }, false }, + { SEGMENT_ROM_START(ovl_ending), { SEGMENT_ROM_START(ovl_ending), SEGMENT_ROM_END(ovl_ending) }, false }, + { SEGMENT_ROM_START(ovl_unused), { SEGMENT_ROM_START(ovl_unused), SEGMENT_ROM_END(ovl_unused) }, false }, +}; diff --git a/srcjp/driverominit.c b/srcjp/driverominit.c new file mode 100644 index 00000000..f0051b54 --- /dev/null +++ b/srcjp/driverominit.c @@ -0,0 +1,4 @@ +#include "sys.h" + +OSPiHandle* osDriveRomInit(void) { +} diff --git a/srcjp/engine/fox_load.c b/srcjp/engine/fox_load.c index f3617dd4..4e3532a2 100644 --- a/srcjp/engine/fox_load.c +++ b/srcjp/engine/fox_load.c @@ -1,4 +1,27 @@ -#include "common.h" +#include "sf64dma.h" + +u8 sFillTimer = 3; + +#include "fox_load_inits.c" + +Scene sCurrentScene = { + NO_OVERLAY, + { /* 0x1 */ NO_SEGMENT, + /* 0x2 */ NO_SEGMENT, + /* 0x3 */ NO_SEGMENT, + /* 0x4 */ NO_SEGMENT, + /* 0x5 */ NO_SEGMENT, + /* 0x6 */ NO_SEGMENT, + /* 0x7 */ NO_SEGMENT, + /* 0x8 */ NO_SEGMENT, + /* 0x9 */ NO_SEGMENT, + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ NO_SEGMENT, + /* 0xE */ NO_SEGMENT, + /* 0xF */ NO_SEGMENT }, +}; #pragma GLOBAL_ASM("asm/jp/rev0/nonmatchings/engine/fox_load/func_800559D0.s") diff --git a/srcjp/engine/fox_load_inits.c b/srcjp/engine/fox_load_inits.c new file mode 100644 index 00000000..392e45dd --- /dev/null +++ b/srcjp/engine/fox_load_inits.c @@ -0,0 +1,810 @@ +#include "sf64dma.h" + +#define NO_SEGMENT \ + { NULL, NULL } + +#define OVERLAY_OFFSETS(file) \ + { \ + { SEGMENT_ROM_START(file), SEGMENT_ROM_END(file) }, { SEGMENT_BSS_START(file), SEGMENT_BSS_END(file) }, \ + { SEGMENT_TEXT_START(file), SEGMENT_TEXT_END(file) }, { \ + SEGMENT_DATA_START(file), SEGMENT_RODATA_END(file) \ + } \ + } + +#define NO_OVERLAY \ + { \ + { NULL, NULL }, { NULL, NULL }, { NULL, NULL }, { \ + NULL, NULL \ + } \ + } + +#define ROM_SEGMENT(file) \ + { SEGMENT_ROM_START(file), SEGMENT_ROM_END(file) } + +Scene sNoOvl_Logo[1] = { + { NO_OVERLAY, + { /* 0x1 */ NO_SEGMENT, + /* 0x2 */ NO_SEGMENT, + /* 0x3 */ NO_SEGMENT, + /* 0x4 */ NO_SEGMENT, + /* 0x5 */ NO_SEGMENT, + /* 0x6 */ NO_SEGMENT, + /* 0x7 */ NO_SEGMENT, + /* 0x8 */ NO_SEGMENT, + /* 0x9 */ NO_SEGMENT, + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ NO_SEGMENT, + /* 0xE */ NO_SEGMENT, + /* 0xF */ ROM_SEGMENT(ast_logo) } }, +}; + +Scene sOvlending_Ending[6] = { + { OVERLAY_OFFSETS(ovl_ending), + { /* 0x1 */ NO_SEGMENT, + /* 0x2 */ NO_SEGMENT, + /* 0x3 */ ROM_SEGMENT(ast_arwing), + /* 0x4 */ NO_SEGMENT, + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ NO_SEGMENT, + /* 0x7 */ ROM_SEGMENT(ast_ending), + /* 0x8 */ NO_SEGMENT, + /* 0x9 */ NO_SEGMENT, + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ ROM_SEGMENT(ast_allies), + /* 0xE */ ROM_SEGMENT(ast_great_fox), + /* 0xF */ NO_SEGMENT } }, + { OVERLAY_OFFSETS(ovl_ending), + { /* 0x1 */ NO_SEGMENT, + /* 0x2 */ NO_SEGMENT, + /* 0x3 */ NO_SEGMENT, + /* 0x4 */ NO_SEGMENT, + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ ROM_SEGMENT(ast_title), + /* 0x7 */ ROM_SEGMENT(ast_ending), + /* 0x8 */ ROM_SEGMENT(ast_ending_award_front), + /* 0x9 */ NO_SEGMENT, + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ NO_SEGMENT, + /* 0xE */ NO_SEGMENT, + /* 0xF */ NO_SEGMENT } }, + { OVERLAY_OFFSETS(ovl_ending), + { /* 0x1 */ NO_SEGMENT, + /* 0x2 */ NO_SEGMENT, + /* 0x3 */ NO_SEGMENT, + /* 0x4 */ NO_SEGMENT, + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ ROM_SEGMENT(ast_title), + /* 0x7 */ ROM_SEGMENT(ast_ending), + /* 0x8 */ ROM_SEGMENT(ast_ending_award_back), + /* 0x9 */ NO_SEGMENT, + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ NO_SEGMENT, + /* 0xE */ NO_SEGMENT, + /* 0xF */ NO_SEGMENT } }, + { OVERLAY_OFFSETS(ovl_ending), + { /* 0x1 */ NO_SEGMENT, + /* 0x2 */ NO_SEGMENT, + /* 0x3 */ NO_SEGMENT, + /* 0x4 */ NO_SEGMENT, + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ ROM_SEGMENT(ast_title), + /* 0x7 */ ROM_SEGMENT(ast_ending), + /* 0x8 */ ROM_SEGMENT(ast_ending_expert), + /* 0x9 */ NO_SEGMENT, + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ NO_SEGMENT, + /* 0xE */ NO_SEGMENT, + /* 0xF */ NO_SEGMENT } }, + { OVERLAY_OFFSETS(ovl_ending), + { /* 0x1 */ NO_SEGMENT, + /* 0x2 */ NO_SEGMENT, + /* 0x3 */ NO_SEGMENT, + /* 0x4 */ NO_SEGMENT, + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ ROM_SEGMENT(ast_title), + /* 0x7 */ ROM_SEGMENT(ast_ending), + /* 0x8 */ NO_SEGMENT, + /* 0x9 */ NO_SEGMENT, + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ NO_SEGMENT, + /* 0xE */ ROM_SEGMENT(ast_great_fox), + /* 0xF */ NO_SEGMENT } }, + { OVERLAY_OFFSETS(ovl_ending), + { /* 0x1 */ NO_SEGMENT, + /* 0x2 */ NO_SEGMENT, + /* 0x3 */ ROM_SEGMENT(ast_arwing), + /* 0x4 */ NO_SEGMENT, + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ NO_SEGMENT, + /* 0x7 */ ROM_SEGMENT(ast_ending), + /* 0x8 */ ROM_SEGMENT(ast_ending_expert), + /* 0x9 */ ROM_SEGMENT(ast_font_3d), + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ NO_SEGMENT, + /* 0xE */ ROM_SEGMENT(ast_great_fox), + /* 0xF */ NO_SEGMENT } }, +}; + +Scene sOvlmenu_Title[1] = { + { OVERLAY_OFFSETS(ovl_menu), + { /* 0x1 */ NO_SEGMENT, + /* 0x2 */ NO_SEGMENT, + /* 0x3 */ ROM_SEGMENT(ast_arwing), + /* 0x4 */ NO_SEGMENT, + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ ROM_SEGMENT(ast_title), + /* 0x7 */ NO_SEGMENT, + /* 0x8 */ NO_SEGMENT, + /* 0x9 */ NO_SEGMENT, + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ NO_SEGMENT, + /* 0xE */ ROM_SEGMENT(ast_great_fox), + /* 0xF */ NO_SEGMENT } }, +}; + +Scene sOvlmenu_Option[1] = { + { OVERLAY_OFFSETS(ovl_menu), + { /* 0x1 */ NO_SEGMENT, + /* 0x2 */ NO_SEGMENT, + /* 0x3 */ NO_SEGMENT, + /* 0x4 */ NO_SEGMENT, + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ ROM_SEGMENT(ast_map), + /* 0x7 */ ROM_SEGMENT(ast_vs_menu), + /* 0x8 */ ROM_SEGMENT(ast_option), + /* 0x9 */ ROM_SEGMENT(ast_font_3d), + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ NO_SEGMENT, + /* 0xE */ NO_SEGMENT, + /* 0xF */ NO_SEGMENT } }, +}; + +Scene sOvlmenu_Map[1] = { + { OVERLAY_OFFSETS(ovl_menu), + { /* 0x1 */ NO_SEGMENT, + /* 0x2 */ NO_SEGMENT, + /* 0x3 */ ROM_SEGMENT(ast_arwing), + /* 0x4 */ NO_SEGMENT, + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ ROM_SEGMENT(ast_map), + /* 0x7 */ NO_SEGMENT, + /* 0x8 */ NO_SEGMENT, + /* 0x9 */ ROM_SEGMENT(ast_font_3d), + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ NO_SEGMENT, + /* 0xE */ NO_SEGMENT, + /* 0xF */ NO_SEGMENT } }, +}; + +Scene sOvlmenu_GameOver[1] = { + { OVERLAY_OFFSETS(ovl_menu), + { /* 0x1 */ NO_SEGMENT, + /* 0x2 */ NO_SEGMENT, + /* 0x3 */ NO_SEGMENT, + /* 0x4 */ NO_SEGMENT, + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ NO_SEGMENT, + /* 0x7 */ NO_SEGMENT, + /* 0x8 */ NO_SEGMENT, + /* 0x9 */ NO_SEGMENT, + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ ROM_SEGMENT(ast_andross), + /* 0xD */ NO_SEGMENT, + /* 0xE */ NO_SEGMENT, + /* 0xF */ NO_SEGMENT } }, +}; + +Scene sOvli1_Corneria[1] = { + { OVERLAY_OFFSETS(ovl_i1), + { /* 0x1 */ ROM_SEGMENT(ast_common), + /* 0x2 */ ROM_SEGMENT(ast_bg_planet), + /* 0x3 */ ROM_SEGMENT(ast_arwing), + /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ ROM_SEGMENT(ast_corneria), + /* 0x7 */ NO_SEGMENT, + /* 0x8 */ NO_SEGMENT, + /* 0x9 */ NO_SEGMENT, + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ NO_SEGMENT, + /* 0xE */ NO_SEGMENT, + /* 0xF */ NO_SEGMENT } }, +}; + +Scene sOvli2_Meteo[2] = { + { OVERLAY_OFFSETS(ovl_i2), + { /* 0x1 */ ROM_SEGMENT(ast_common), + /* 0x2 */ ROM_SEGMENT(ast_bg_space), + /* 0x3 */ ROM_SEGMENT(ast_arwing), + /* 0x4 */ ROM_SEGMENT(ast_enmy_space), + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ ROM_SEGMENT(ast_meteo), + /* 0x7 */ ROM_SEGMENT(ast_warp_zone), + /* 0x8 */ NO_SEGMENT, + /* 0x9 */ NO_SEGMENT, + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ NO_SEGMENT, + /* 0xE */ ROM_SEGMENT(ast_great_fox), + /* 0xF */ NO_SEGMENT } }, + { OVERLAY_OFFSETS(ovl_i2), + { /* 0x1 */ ROM_SEGMENT(ast_common), + /* 0x2 */ ROM_SEGMENT(ast_bg_space), + /* 0x3 */ ROM_SEGMENT(ast_arwing), + /* 0x4 */ ROM_SEGMENT(ast_enmy_space), + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ ROM_SEGMENT(ast_meteo), + /* 0x7 */ ROM_SEGMENT(ast_warp_zone), + /* 0x8 */ NO_SEGMENT, + /* 0x9 */ NO_SEGMENT, + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ NO_SEGMENT, + /* 0xE */ ROM_SEGMENT(ast_great_fox), + /* 0xF */ NO_SEGMENT } }, +}; + +Scene sOvli5_Titania[6] = { + { OVERLAY_OFFSETS(ovl_i5), + { /* 0x1 */ ROM_SEGMENT(ast_common), + /* 0x2 */ ROM_SEGMENT(ast_bg_planet), + /* 0x3 */ ROM_SEGMENT(ast_landmaster), + /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ ROM_SEGMENT(ast_titania), + /* 0x7 */ ROM_SEGMENT(ast_7_ti_1), + /* 0x8 */ NO_SEGMENT, + /* 0x9 */ NO_SEGMENT, + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ NO_SEGMENT, + /* 0xE */ ROM_SEGMENT(ast_great_fox), + /* 0xF */ NO_SEGMENT } }, + { OVERLAY_OFFSETS(ovl_i5), + { /* 0x1 */ ROM_SEGMENT(ast_common), + /* 0x2 */ ROM_SEGMENT(ast_bg_planet), + /* 0x3 */ ROM_SEGMENT(ast_landmaster), + /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ ROM_SEGMENT(ast_titania), + /* 0x7 */ ROM_SEGMENT(ast_7_ti_2), + /* 0x8 */ NO_SEGMENT, + /* 0x9 */ NO_SEGMENT, + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ NO_SEGMENT, + /* 0xE */ NO_SEGMENT, + /* 0xF */ NO_SEGMENT } }, + { OVERLAY_OFFSETS(ovl_i5), + { /* 0x1 */ ROM_SEGMENT(ast_common), + /* 0x2 */ ROM_SEGMENT(ast_bg_planet), + /* 0x3 */ ROM_SEGMENT(ast_landmaster), + /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ ROM_SEGMENT(ast_titania), + /* 0x7 */ ROM_SEGMENT(ast_7_ti_2), + /* 0x8 */ ROM_SEGMENT(ast_8_ti), + /* 0x9 */ NO_SEGMENT, + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ NO_SEGMENT, + /* 0xE */ NO_SEGMENT, + /* 0xF */ NO_SEGMENT } }, + { OVERLAY_OFFSETS(ovl_i5), + { /* 0x1 */ ROM_SEGMENT(ast_common), + /* 0x2 */ ROM_SEGMENT(ast_bg_planet), + /* 0x3 */ ROM_SEGMENT(ast_landmaster), + /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ ROM_SEGMENT(ast_titania), + /* 0x7 */ ROM_SEGMENT(ast_7_ti_2), + /* 0x8 */ ROM_SEGMENT(ast_8_ti), + /* 0x9 */ ROM_SEGMENT(ast_9_ti), + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ NO_SEGMENT, + /* 0xE */ NO_SEGMENT, + /* 0xF */ NO_SEGMENT } }, + { OVERLAY_OFFSETS(ovl_i5), + { /* 0x1 */ ROM_SEGMENT(ast_common), + /* 0x2 */ ROM_SEGMENT(ast_bg_planet), + /* 0x3 */ ROM_SEGMENT(ast_landmaster), + /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ ROM_SEGMENT(ast_titania), + /* 0x7 */ ROM_SEGMENT(ast_7_ti_2), + /* 0x8 */ ROM_SEGMENT(ast_8_ti), + /* 0x9 */ ROM_SEGMENT(ast_9_ti), + /* 0xA */ ROM_SEGMENT(ast_A_ti), + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ NO_SEGMENT, + /* 0xE */ NO_SEGMENT, + /* 0xF */ NO_SEGMENT } }, + { OVERLAY_OFFSETS(ovl_i5), + { /* 0x1 */ ROM_SEGMENT(ast_common), + /* 0x2 */ ROM_SEGMENT(ast_bg_planet), + /* 0x3 */ ROM_SEGMENT(ast_landmaster), + /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ ROM_SEGMENT(ast_titania), + /* 0x7 */ ROM_SEGMENT(ast_7_ti_2), + /* 0x8 */ ROM_SEGMENT(ast_8_ti), + /* 0x9 */ ROM_SEGMENT(ast_9_ti), + /* 0xA */ ROM_SEGMENT(ast_A_ti), + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ NO_SEGMENT, + /* 0xE */ ROM_SEGMENT(ast_great_fox), + /* 0xF */ NO_SEGMENT } }, +}; + +Scene sOvli2_SectorX[2] = { + { OVERLAY_OFFSETS(ovl_i2), + { /* 0x1 */ ROM_SEGMENT(ast_common), + /* 0x2 */ ROM_SEGMENT(ast_bg_space), + /* 0x3 */ ROM_SEGMENT(ast_arwing), + /* 0x4 */ ROM_SEGMENT(ast_enmy_space), + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ ROM_SEGMENT(ast_sector_x), + /* 0x7 */ ROM_SEGMENT(ast_warp_zone), + /* 0x8 */ NO_SEGMENT, + /* 0x9 */ NO_SEGMENT, + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ ROM_SEGMENT(ast_allies), + /* 0xE */ NO_SEGMENT, + /* 0xF */ NO_SEGMENT } }, + { OVERLAY_OFFSETS(ovl_i2), + { /* 0x1 */ ROM_SEGMENT(ast_common), + /* 0x2 */ ROM_SEGMENT(ast_bg_space), + /* 0x3 */ ROM_SEGMENT(ast_arwing), + /* 0x4 */ ROM_SEGMENT(ast_enmy_space), + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ ROM_SEGMENT(ast_sector_x), + /* 0x7 */ ROM_SEGMENT(ast_warp_zone), + /* 0x8 */ NO_SEGMENT, + /* 0x9 */ NO_SEGMENT, + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ ROM_SEGMENT(ast_allies), + /* 0xE */ ROM_SEGMENT(ast_great_fox), + /* 0xF */ NO_SEGMENT } }, +}; + +Scene sOvli4_SectorZ[1] = { + { OVERLAY_OFFSETS(ovl_i4), + { /* 0x1 */ ROM_SEGMENT(ast_common), + /* 0x2 */ ROM_SEGMENT(ast_bg_space), + /* 0x3 */ ROM_SEGMENT(ast_arwing), + /* 0x4 */ ROM_SEGMENT(ast_enmy_space), + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ ROM_SEGMENT(ast_sector_z), + /* 0x7 */ NO_SEGMENT, + /* 0x8 */ NO_SEGMENT, + /* 0x9 */ NO_SEGMENT, + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ ROM_SEGMENT(ast_allies), + /* 0xE */ ROM_SEGMENT(ast_great_fox), + /* 0xF */ NO_SEGMENT } }, +}; + +Scene sOvli3_Aquas[1] = { + { OVERLAY_OFFSETS(ovl_i3), + { /* 0x1 */ ROM_SEGMENT(ast_common), + /* 0x2 */ ROM_SEGMENT(ast_bg_planet), + /* 0x3 */ ROM_SEGMENT(ast_blue_marine), + /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ ROM_SEGMENT(ast_aquas), + /* 0x7 */ NO_SEGMENT, + /* 0x8 */ NO_SEGMENT, + /* 0x9 */ NO_SEGMENT, + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ NO_SEGMENT, + /* 0xE */ ROM_SEGMENT(ast_great_fox), + /* 0xF */ NO_SEGMENT } }, +}; + +Scene sOvli3_Area6[1] = { + { OVERLAY_OFFSETS(ovl_i3), + { /* 0x1 */ ROM_SEGMENT(ast_common), + /* 0x2 */ ROM_SEGMENT(ast_bg_space), + /* 0x3 */ ROM_SEGMENT(ast_arwing), + /* 0x4 */ ROM_SEGMENT(ast_enmy_space), + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ ROM_SEGMENT(ast_area_6), + /* 0x7 */ NO_SEGMENT, + /* 0x8 */ NO_SEGMENT, + /* 0x9 */ NO_SEGMENT, + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ NO_SEGMENT, + /* 0xE */ ROM_SEGMENT(ast_great_fox), + /* 0xF */ NO_SEGMENT } }, +}; + +Scene sOvli4_Fortuna[2] = { + { OVERLAY_OFFSETS(ovl_i4), + { /* 0x1 */ ROM_SEGMENT(ast_common), + /* 0x2 */ ROM_SEGMENT(ast_bg_planet), + /* 0x3 */ ROM_SEGMENT(ast_arwing), + /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ ROM_SEGMENT(ast_fortuna), + /* 0x7 */ NO_SEGMENT, + /* 0x8 */ NO_SEGMENT, + /* 0x9 */ NO_SEGMENT, + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ NO_SEGMENT, + /* 0xE */ NO_SEGMENT, + /* 0xF */ ROM_SEGMENT(ast_star_wolf) } }, + { OVERLAY_OFFSETS(ovl_i4), + { /* 0x1 */ ROM_SEGMENT(ast_common), + /* 0x2 */ ROM_SEGMENT(ast_bg_planet), + /* 0x3 */ ROM_SEGMENT(ast_arwing), + /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ ROM_SEGMENT(ast_fortuna), + /* 0x7 */ NO_SEGMENT, + /* 0x8 */ NO_SEGMENT, + /* 0x9 */ NO_SEGMENT, + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ NO_SEGMENT, + /* 0xE */ ROM_SEGMENT(ast_great_fox), + /* 0xF */ NO_SEGMENT } }, +}; + +Scene sOvli3_Unk4[1] = { + { OVERLAY_OFFSETS(ovl_i3), + { /* 0x1 */ ROM_SEGMENT(ast_common), + /* 0x2 */ ROM_SEGMENT(ast_bg_space), + /* 0x3 */ ROM_SEGMENT(ast_arwing), + /* 0x4 */ ROM_SEGMENT(ast_enmy_space), + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ ROM_SEGMENT(ast_area_6), + /* 0x7 */ NO_SEGMENT, + /* 0x8 */ NO_SEGMENT, + /* 0x9 */ NO_SEGMENT, + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ NO_SEGMENT, + /* 0xE */ ROM_SEGMENT(ast_great_fox), + /* 0xF */ NO_SEGMENT } }, +}; + +Scene sOvli6_SectorY[1] = { + { OVERLAY_OFFSETS(ovl_i6), + { /* 0x1 */ ROM_SEGMENT(ast_common), + /* 0x2 */ ROM_SEGMENT(ast_bg_space), + /* 0x3 */ ROM_SEGMENT(ast_arwing), + /* 0x4 */ ROM_SEGMENT(ast_enmy_space), + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ ROM_SEGMENT(ast_sector_y), + /* 0x7 */ NO_SEGMENT, + /* 0x8 */ NO_SEGMENT, + /* 0x9 */ NO_SEGMENT, + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ NO_SEGMENT, + /* 0xE */ NO_SEGMENT, + /* 0xF */ NO_SEGMENT } }, +}; + +Scene sOvli3_Solar[1] = { + { OVERLAY_OFFSETS(ovl_i3), + { /* 0x1 */ ROM_SEGMENT(ast_common), + /* 0x2 */ ROM_SEGMENT(ast_bg_planet), + /* 0x3 */ ROM_SEGMENT(ast_arwing), + /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ ROM_SEGMENT(ast_solar), + /* 0x7 */ NO_SEGMENT, + /* 0x8 */ NO_SEGMENT, + /* 0x9 */ NO_SEGMENT, + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ ROM_SEGMENT(ast_allies), + /* 0xE */ NO_SEGMENT, + /* 0xF */ NO_SEGMENT } }, +}; + +Scene sOvli3_Zoness[1] = { + { OVERLAY_OFFSETS(ovl_i3), + { /* 0x1 */ ROM_SEGMENT(ast_common), + /* 0x2 */ ROM_SEGMENT(ast_bg_planet), + /* 0x3 */ ROM_SEGMENT(ast_arwing), + /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ ROM_SEGMENT(ast_zoness), + /* 0x7 */ NO_SEGMENT, + /* 0x8 */ NO_SEGMENT, + /* 0x9 */ NO_SEGMENT, + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ ROM_SEGMENT(ast_allies), + /* 0xE */ NO_SEGMENT, + /* 0xF */ NO_SEGMENT } }, +}; + +Scene sOvli1_Venom1[1] = { + { OVERLAY_OFFSETS(ovl_i1), + { /* 0x1 */ ROM_SEGMENT(ast_common), + /* 0x2 */ ROM_SEGMENT(ast_bg_planet), + /* 0x3 */ ROM_SEGMENT(ast_arwing), + /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ ROM_SEGMENT(ast_venom_1), + /* 0x7 */ NO_SEGMENT, + /* 0x8 */ NO_SEGMENT, + /* 0x9 */ ROM_SEGMENT(ast_ve1_boss), + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ ROM_SEGMENT(ast_allies), + /* 0xE */ NO_SEGMENT, + /* 0xF */ NO_SEGMENT } }, +}; + +Scene sOvli6_Andross[1] = { + { OVERLAY_OFFSETS(ovl_i6), + { /* 0x1 */ ROM_SEGMENT(ast_common), + /* 0x2 */ ROM_SEGMENT(ast_bg_planet), + /* 0x3 */ ROM_SEGMENT(ast_arwing), + /* 0x4 */ NO_SEGMENT, + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ ROM_SEGMENT(ast_venom_2), + /* 0x7 */ NO_SEGMENT, + /* 0x8 */ NO_SEGMENT, + /* 0x9 */ NO_SEGMENT, + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ ROM_SEGMENT(ast_andross), + /* 0xD */ ROM_SEGMENT(ast_allies), + /* 0xE */ NO_SEGMENT, + /* 0xF */ NO_SEGMENT } }, +}; + +Scene sOvli6_Venom2[2] = { + { OVERLAY_OFFSETS(ovl_i6), + { /* 0x1 */ ROM_SEGMENT(ast_common), + /* 0x2 */ ROM_SEGMENT(ast_bg_planet), + /* 0x3 */ ROM_SEGMENT(ast_arwing), + /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ ROM_SEGMENT(ast_venom_2), + /* 0x7 */ NO_SEGMENT, + /* 0x8 */ NO_SEGMENT, + /* 0x9 */ NO_SEGMENT, + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ NO_SEGMENT, + /* 0xE */ NO_SEGMENT, + /* 0xF */ ROM_SEGMENT(ast_star_wolf) } }, + { OVERLAY_OFFSETS(ovl_i6), + { /* 0x1 */ ROM_SEGMENT(ast_common), + /* 0x2 */ ROM_SEGMENT(ast_bg_planet), + /* 0x3 */ ROM_SEGMENT(ast_arwing), + /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ ROM_SEGMENT(ast_venom_2), + /* 0x7 */ NO_SEGMENT, + /* 0x8 */ NO_SEGMENT, + /* 0x9 */ NO_SEGMENT, + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ NO_SEGMENT, + /* 0xE */ ROM_SEGMENT(ast_great_fox), + /* 0xF */ NO_SEGMENT } }, +}; + +Scene sOvli2_Setup20[1] = { + { OVERLAY_OFFSETS(ovl_i2), + { /* 0x1 */ ROM_SEGMENT(ast_common), + /* 0x2 */ ROM_SEGMENT(ast_bg_planet), + /* 0x3 */ ROM_SEGMENT(ast_arwing), + /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ ROM_SEGMENT(ast_ve1_boss), + /* 0x7 */ NO_SEGMENT, + /* 0x8 */ NO_SEGMENT, + /* 0x9 */ NO_SEGMENT, + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ NO_SEGMENT, + /* 0xE */ NO_SEGMENT, + /* 0xF */ NO_SEGMENT } }, +}; + +Scene sOvli4_Bolse[1] = { + { OVERLAY_OFFSETS(ovl_i4), + { /* 0x1 */ ROM_SEGMENT(ast_common), + /* 0x2 */ ROM_SEGMENT(ast_bg_space), + /* 0x3 */ ROM_SEGMENT(ast_arwing), + /* 0x4 */ ROM_SEGMENT(ast_enmy_space), + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ ROM_SEGMENT(ast_bolse), + /* 0x7 */ NO_SEGMENT, + /* 0x8 */ NO_SEGMENT, + /* 0x9 */ NO_SEGMENT, + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ NO_SEGMENT, + /* 0xE */ NO_SEGMENT, + /* 0xF */ ROM_SEGMENT(ast_star_wolf) } }, +}; + +Scene sOvli4_Katina[1] = { + { OVERLAY_OFFSETS(ovl_i4), + { /* 0x1 */ ROM_SEGMENT(ast_common), + /* 0x2 */ ROM_SEGMENT(ast_bg_planet), + /* 0x3 */ ROM_SEGMENT(ast_arwing), + /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ ROM_SEGMENT(ast_katina), + /* 0x7 */ NO_SEGMENT, + /* 0x8 */ NO_SEGMENT, + /* 0x9 */ NO_SEGMENT, + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ ROM_SEGMENT(ast_allies), + /* 0xE */ NO_SEGMENT, + /* 0xF */ ROM_SEGMENT(ast_star_wolf) } }, +}; + +Scene sOvli5_Macbeth[2] = { + { OVERLAY_OFFSETS(ovl_i5), + { /* 0x1 */ ROM_SEGMENT(ast_common), + /* 0x2 */ ROM_SEGMENT(ast_bg_planet), + /* 0x3 */ ROM_SEGMENT(ast_landmaster), + /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ ROM_SEGMENT(ast_macbeth), + /* 0x7 */ NO_SEGMENT, + /* 0x8 */ NO_SEGMENT, + /* 0x9 */ NO_SEGMENT, + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ ROM_SEGMENT(ast_allies), + /* 0xE */ NO_SEGMENT, + /* 0xF */ NO_SEGMENT } }, + { OVERLAY_OFFSETS(ovl_i5), + { /* 0x1 */ ROM_SEGMENT(ast_common), + /* 0x2 */ ROM_SEGMENT(ast_bg_planet), + /* 0x3 */ ROM_SEGMENT(ast_landmaster), + /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ ROM_SEGMENT(ast_macbeth), + /* 0x7 */ NO_SEGMENT, + /* 0x8 */ NO_SEGMENT, + /* 0x9 */ NO_SEGMENT, + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ NO_SEGMENT, + /* 0xE */ ROM_SEGMENT(ast_great_fox), + /* 0xF */ NO_SEGMENT } }, +}; + +Scene sOvli1_Training[1] = { + { OVERLAY_OFFSETS(ovl_i1), + { /* 0x1 */ ROM_SEGMENT(ast_common), + /* 0x2 */ ROM_SEGMENT(ast_bg_planet), + /* 0x3 */ ROM_SEGMENT(ast_arwing), + /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ ROM_SEGMENT(ast_training), + /* 0x7 */ NO_SEGMENT, + /* 0x8 */ NO_SEGMENT, + /* 0x9 */ NO_SEGMENT, + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ NO_SEGMENT, + /* 0xE */ NO_SEGMENT, + /* 0xF */ ROM_SEGMENT(ast_star_wolf) } }, +}; + +Scene sOvli2_Versus[2] = { + { OVERLAY_OFFSETS(ovl_i2), + { /* 0x1 */ ROM_SEGMENT(ast_common), + /* 0x2 */ ROM_SEGMENT(ast_bg_planet), + /* 0x3 */ ROM_SEGMENT(ast_versus), + /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ NO_SEGMENT, + /* 0x7 */ ROM_SEGMENT(ast_vs_menu), + /* 0x8 */ NO_SEGMENT, + /* 0x9 */ NO_SEGMENT, + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ NO_SEGMENT, + /* 0xE */ NO_SEGMENT, + /* 0xF */ NO_SEGMENT } }, + { OVERLAY_OFFSETS(ovl_i2), + { /* 0x1 */ ROM_SEGMENT(ast_common), + /* 0x2 */ ROM_SEGMENT(ast_bg_space), + /* 0x3 */ ROM_SEGMENT(ast_versus), + /* 0x4 */ ROM_SEGMENT(ast_enmy_space), + /* 0x5 */ ROM_SEGMENT(ast_text), + /* 0x6 */ NO_SEGMENT, + /* 0x7 */ ROM_SEGMENT(ast_vs_menu), + /* 0x8 */ NO_SEGMENT, + /* 0x9 */ NO_SEGMENT, + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ NO_SEGMENT, + /* 0xE */ NO_SEGMENT, + /* 0xF */ NO_SEGMENT } }, +}; + +Scene sOvlUnused_Unk[1] = { + { OVERLAY_OFFSETS(ovl_unused), + { /* 0x1 */ NO_SEGMENT, + /* 0x2 */ NO_SEGMENT, + /* 0x3 */ NO_SEGMENT, + /* 0x4 */ NO_SEGMENT, + /* 0x5 */ NO_SEGMENT, + /* 0x6 */ NO_SEGMENT, + /* 0x7 */ NO_SEGMENT, + /* 0x8 */ NO_SEGMENT, + /* 0x9 */ NO_SEGMENT, + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ NO_SEGMENT, + /* 0xE */ NO_SEGMENT, + /* 0xF */ NO_SEGMENT } }, +}; diff --git a/yamls/jp/rev0/main.yaml b/yamls/jp/rev0/main.yaml index 42ba3be6..62427694 100644 --- a/yamls/jp/rev0/main.yaml +++ b/yamls/jp/rev0/main.yaml @@ -36,7 +36,7 @@ - [0x14BC0, c, audio/audio_seqplayer] - [0x17770, c, audio/audio_general] - [0x1EC30, c, audio/audio_thread] - - [0x1FB40, c, 1FA60] + - [0x1FB40, c, driverominit] - [0x1FB50, hasm, mio0] - [0x1FBF0, hasm, rdramcheck] - [0x1FCA0, textbin, alt_ipl3] @@ -208,7 +208,7 @@ - [0xC76A0, data, engine/fox_tank] - [0xC7700, data, engine/fox_demo] - [0xC79C0, data, engine/fox_display] - - [0xC7B50, data, engine/fox_load] + - [0xC7B50, .data, engine/fox_load] - [0xC9610, data, engine/fox_edata] - [0xCD110, data, engine/fox_edisplay] - [0xCD540, data, engine/fox_enmy] @@ -306,7 +306,7 @@ vram: 0x8017E210 follows_vram: main subsegments: - - [0xE93C0, data, dmatable] + - [0xE93C0, .data, dmatable] - name: buffers exclusive_ram_id: buffer diff --git a/yamls/us/rev1/main.yaml b/yamls/us/rev1/main.yaml index 3e497baf..17b83f8c 100644 --- a/yamls/us/rev1/main.yaml +++ b/yamls/us/rev1/main.yaml @@ -38,7 +38,7 @@ - [0x17650, c, audio/audio_general] - [0x1EB50, c, audio/audio_thread] - - [0x1FA60, c, 1FA60] # May be blanked out osDriveRomInit + - [0x1FA60, c, driverominit] - [0x1FA70, hasm, mio0] - [0x1FB10, hasm, rdramcheck] - [0x1FBC0, textbin, alt_ipl3] From 8045b688acef6b86425aa58a794349301d153425 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Fri, 17 May 2024 20:21:04 -0300 Subject: [PATCH 107/151] fox_end1 details --- src/overlays/ovl_ending/fox_end1.c | 62 +++++++++++++++--------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/src/overlays/ovl_ending/fox_end1.c b/src/overlays/ovl_ending/fox_end1.c index 9b4777b2..cf34c568 100644 --- a/src/overlays/ovl_ending/fox_end1.c +++ b/src/overlays/ovl_ending/fox_end1.c @@ -831,35 +831,35 @@ void Ending_8018A024(void) { } void Ending_8018A124(s32 arg0) { - f32 sp2C[3] = { 0.0f, 0.0f, 0.0f }; - f32 sp20[3] = { 0.0f, 0.0f, -100.0f }; - s32 sp14[3] = { 110, 80, 40 }; - s32 sp8[3] = { 0, 0, 0 }; - f32 sp0[2] = { -22.0f, 204.0f }; + f32 sp2C[1][3] = { 0.0f, 0.0f, 0.0f }; + f32 sp20[1][3] = { 0.0f, 0.0f, -100.0f }; + s32 sp14[1][3] = { 110, 80, 40 }; + s32 sp8[1][3] = { 0, 0, 0 }; + f32 sp0[1][2] = { -22.0f, 204.0f }; // not fake, but weird. - gCsCamEyeX = (&sp2C)[arg0][0]; - gCsCamEyeY = (&sp2C)[arg0][1]; - gCsCamEyeZ = (&sp2C)[arg0][2]; - gCsCamAtX = (&sp20)[arg0][0]; - gCsCamAtY = (&sp20)[arg0][1]; - gCsCamAtZ = (&sp20)[arg0][2]; + gCsCamEyeX = sp2C[arg0][0]; + gCsCamEyeY = sp2C[arg0][1]; + gCsCamEyeZ = sp2C[arg0][2]; + gCsCamAtX = sp20[arg0][0]; + gCsCamAtY = sp20[arg0][1]; + gCsCamAtZ = sp20[arg0][2]; - gLight1R = (&sp14)[arg0][0]; - gLight1G = (&sp14)[arg0][1]; - gLight1B = (&sp14)[arg0][2]; + gLight1R = sp14[arg0][0]; + gLight1G = sp14[arg0][1]; + gLight1B = sp14[arg0][2]; - gAmbientR = (&sp8)[arg0][0]; - gAmbientG = (&sp8)[arg0][1]; - gAmbientB = (&sp8)[arg0][2]; + gAmbientR = sp8[arg0][0]; + gAmbientG = sp8[arg0][1]; + gAmbientB = sp8[arg0][2]; - gEnvLightxRot = (&sp0)[arg0][0]; - gEnvLightyRot = (&sp0)[arg0][1]; + gEnvLightxRot = sp0[arg0][0]; + gEnvLightyRot = sp0[arg0][1]; } void Ending_8018A2A8(void) { s32 i; - Vec3f sp6C[50]; + Vec3f frameTable[50]; for (i = 0; i < D_ending_80196F88; i++) { Matrix_Push(&gGfxMatrix); @@ -881,8 +881,8 @@ void Ending_8018A2A8(void) { Animation_GetFrameData(D_ending_80196D08[i].anim, (u32) (D_ending_80196D08[i].unk_34 * D_ending_80196D08[i].unk_30) % Animation_GetFrameCount(D_ending_80196D08[i].anim), - sp6C); - Animation_DrawSkeleton(0, D_ending_80196D08[i].skeleton, sp6C, NULL, NULL, NULL, &gIdentityMatrix); + frameTable); + Animation_DrawSkeleton(0, D_ending_80196D08[i].skeleton, frameTable, NULL, NULL, NULL, &gIdentityMatrix); } Matrix_Pop(&gGfxMatrix); } @@ -1562,8 +1562,8 @@ f32 D_ending_80192DF0[8] = { bool Ending_8018BCB0(void) { s32 i; - Vec3f sp78; - Vec3f sp6C; + Vec3f src; + Vec3f dest; s32 pad68; s32 pad64; // Vec3f? s32 pad60; @@ -1648,15 +1648,15 @@ bool Ending_8018BCB0(void) { Matrix_RotateY(gCalcMatrix, (gActors[i].rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -(gActors[i].rot_0F4.x * M_DTOR), MTXF_APPLY); - sp78.x = 0.0f; - sp78.y = 0.0f; - sp78.z = gActors[i].fwork[0]; + src.x = 0.0f; + src.y = 0.0f; + src.z = gActors[i].fwork[0]; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp78, &sp6C); + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - gActors[i].vel.x = sp6C.x; - gActors[i].vel.y = sp6C.y; - gActors[i].vel.z = sp6C.z; + gActors[i].vel.x = dest.x; + gActors[i].vel.y = dest.y; + gActors[i].vel.z = dest.z; if (0) {} // some sort of vec_set macro? From 188b40cb8b13456502791ed91ad28c6e8909ea6c Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Sat, 18 May 2024 10:25:01 -0300 Subject: [PATCH 108/151] limbCount --- src/engine/fox_std_lib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/engine/fox_std_lib.c b/src/engine/fox_std_lib.c index c9d49019..2e678ca7 100644 --- a/src/engine/fox_std_lib.c +++ b/src/engine/fox_std_lib.c @@ -256,7 +256,7 @@ void Animation_DrawSkeleton(s32 mode, Limb** skeletonSegment, Vec3f* jointTable, s16 Animation_GetFrameData(Animation* animationSegmemt, s32 frame, Vec3f* frameTable) { Animation* animation = SEGMENTED_TO_VIRTUAL(animationSegmemt); - u16 var4 = animation->limbCount; + u16 limbCount = animation->limbCount; JointKey* key = SEGMENTED_TO_VIRTUAL(animation->jointKey); u16* frameData = SEGMENTED_TO_VIRTUAL(animation->frameData); s32 i; @@ -270,7 +270,7 @@ s16 Animation_GetFrameData(Animation* animationSegmemt, s32 frame, Vec3f* frameT frameTable->z = (s16) temp; frameTable++, key++; - for (i = 1; i <= var4; i++, key++, frameTable++) { + for (i = 1; i <= limbCount; i++, key++, frameTable++) { temp = (frame < key->xLen) ? frameData[key->x + frame] : frameData[key->x]; frameTable->x = temp * 360.0f / 65536.0f; temp = (frame < key->yLen) ? frameData[key->y + frame] : frameData[key->y]; @@ -278,7 +278,7 @@ s16 Animation_GetFrameData(Animation* animationSegmemt, s32 frame, Vec3f* frameT temp = (frame < key->zLen) ? frameData[key->z + frame] : frameData[key->z]; frameTable->z = temp * 360.0f / 65536.0f; } - return var4 + 1; + return limbCount + 1; } s32 Animation_GetFrameCount(Animation* animationSegment) { From 7d1b8dc54b294737fc35d8cd6f4f99ee39e81608 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Sat, 18 May 2024 11:11:05 -0300 Subject: [PATCH 109/151] variables --- src/overlays/ovl_ending/fox_end1.c | 61 ++++++++++++++++-------------- 1 file changed, 32 insertions(+), 29 deletions(-) diff --git a/src/overlays/ovl_ending/fox_end1.c b/src/overlays/ovl_ending/fox_end1.c index ad63abbd..7f9d4d3c 100644 --- a/src/overlays/ovl_ending/fox_end1.c +++ b/src/overlays/ovl_ending/fox_end1.c @@ -115,9 +115,9 @@ void Ending_801876A4(void) { } void Ending_80187860(s32 arg0, s32 arg1) { - Vec3f sp88[50]; + Vec3f frameTable[50]; s32 i; - s32 sp80; + s32 limbCount; Animation* sp70[4] = { &D_TITLE_60246F8, &D_TITLE_60338DC, &D_TITLE_6036278, &D_TITLE_603531C }; s32 pad; @@ -138,28 +138,30 @@ void Ending_80187860(s32 arg0, s32 arg1) { D_ending_80196D08[i].pos.z, MTXF_APPLY); break; } + Matrix_Scale(gGfxMatrix, D_ending_80196D08[i].scale.x, D_ending_80196D08[i].scale.y, D_ending_80196D08[i].scale.z, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, D_ending_80196D08[i].rot.y * M_DTOR, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, D_ending_80196D08[i].rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, D_ending_80196D08[i].rot.z * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); + if ((arg1 != 0) && (gCsFrameCount >= 394)) { switch (i) { case 0: - sp80 = Animation_GetFrameData(&D_TITLE_60246F8, 0, sp88); + limbCount = Animation_GetFrameData(&D_TITLE_60246F8, 0, frameTable); break; case 1: - sp80 = Animation_GetFrameData(&D_TITLE_60338DC, 0, sp88); + limbCount = Animation_GetFrameData(&D_TITLE_60338DC, 0, frameTable); break; case 2: - sp80 = Animation_GetFrameData(&D_TITLE_6036278, 0, sp88); + limbCount = Animation_GetFrameData(&D_TITLE_6036278, 0, frameTable); break; case 3: - sp80 = Animation_GetFrameData(&D_TITLE_603531C, 0, sp88); + limbCount = Animation_GetFrameData(&D_TITLE_603531C, 0, frameTable); break; } - Math_SmoothStepToVec3fArray(sp88, D_ending_80197900[i], 1, sp80, 0.1f, 100.0f, 0.01f); + Math_SmoothStepToVec3fArray(frameTable, D_ending_80197900[i], 1, limbCount, 0.1f, 100.0f, 0.01f); } else { Animation_GetFrameData(D_ending_80196D08[i].anim, (u32) (D_ending_80196D08[i].unk_34 * D_ending_80196D08[i].unk_30) % @@ -270,6 +272,7 @@ void Ending_80187D3C(s32 arg0) { } D_ending_80196F9C = 0.004f; break; + case 1: for (i = 0; i < D_ending_80196F88; i++) { D_ending_80196D08[i] = sp3C[i]; @@ -445,7 +448,7 @@ void Ending_801886F4(void) { void Ending_801888F4(void) { s32 sp29C = 4; s32 temp_s0_5; - s32 sp294; + s32 frame; Vec3f sp3C[50]; Matrix_Push(&gGfxMatrix); @@ -460,24 +463,24 @@ void Ending_801888F4(void) { switch (D_ending_80196D08[sp29C].unk_38) { case 0: - sp294 = (u32) (D_ending_80196D08[sp29C].unk_34 * D_ending_80196D08[sp29C].unk_30) % + frame = (u32) (D_ending_80196D08[sp29C].unk_34 * D_ending_80196D08[sp29C].unk_30) % Animation_GetFrameCount(D_ending_80196D08[sp29C].anim); - Animation_GetFrameData(D_ending_80196D08[sp29C].anim, sp294, D_ending_80197900[0]); + Animation_GetFrameData(D_ending_80196D08[sp29C].anim, frame, D_ending_80197900[0]); break; case 1: - sp294 = D_ending_80196D08[sp29C].unk_34 * D_ending_80196D08[sp29C].unk_30; - if (sp294 >= Animation_GetFrameCount(&D_TITLE_601F8E0)) { - sp294 = Animation_GetFrameCount(&D_TITLE_601F8E0) - 1; + frame = D_ending_80196D08[sp29C].unk_34 * D_ending_80196D08[sp29C].unk_30; + if (frame >= Animation_GetFrameCount(&D_TITLE_601F8E0)) { + frame = Animation_GetFrameCount(&D_TITLE_601F8E0) - 1; } Math_SmoothStepToVec3fArray(sp3C, D_ending_80197900[0], 1, - Animation_GetFrameData(&D_TITLE_601F8E0, sp294, sp3C), 0.2f, 100.0f, 0.01f); + Animation_GetFrameData(&D_TITLE_601F8E0, frame, sp3C), 0.2f, 100.0f, 0.01f); break; case 2: - sp294 = (u32) (D_ending_80196D08[sp29C].unk_34 * D_ending_80196D08[sp29C].unk_30) % + frame = (u32) (D_ending_80196D08[sp29C].unk_34 * D_ending_80196D08[sp29C].unk_30) % Animation_GetFrameCount(D_ending_80196D08[sp29C].anim); - temp_s0_5 = Animation_GetFrameData(&D_TITLE_60246F8, sp294, sp3C); + temp_s0_5 = Animation_GetFrameData(&D_TITLE_60246F8, frame, sp3C); Math_SmoothStepToF(&D_ending_80198580, 1.0f, 0.01f, 1.0f, 0.05f); Math_SmoothStepToVec3fArray(sp3C, D_ending_80197900[0], 1, temp_s0_5, D_ending_80198580, 100.0f, 0.01f); break; @@ -565,7 +568,7 @@ void Ending_80188DB4(void) { } void Ending_80189108(void) { - u32 temp_a0; + u32 frame; switch (D_ending_80196D08[4].unk_38) { case 0: @@ -605,12 +608,12 @@ void Ending_80189108(void) { gCallTimer = 0; } - temp_a0 = (u32) (D_ending_80196D08[4].unk_34 * D_ending_80196D08[4].unk_30) % - Animation_GetFrameCount(D_ending_80196D08[4].anim); + frame = (u32) (D_ending_80196D08[4].unk_34 * D_ending_80196D08[4].unk_30) % + Animation_GetFrameCount(D_ending_80196D08[4].anim); if (((gCsFrameCount >= 30) && (gCsFrameCount < 41)) || ((gCsFrameCount >= 60) && (gCsFrameCount < 111))) { D_ending_80196D08[4].unk_34++; - } else if (temp_a0 != 0) { + } else if (frame != 0) { D_ending_80196D08[4].unk_34++; } break; @@ -639,12 +642,12 @@ void Ending_80189108(void) { break; } - temp_a0 = (u32) (D_ending_80196D08[4].unk_34 * D_ending_80196D08[4].unk_30) % - Animation_GetFrameCount(D_ending_80196D08[4].anim); + frame = (u32) (D_ending_80196D08[4].unk_34 * D_ending_80196D08[4].unk_30) % + Animation_GetFrameCount(D_ending_80196D08[4].anim); if ((gCsFrameCount >= 20) && (gCsFrameCount < 51)) { D_ending_80196D08[4].unk_34++; - } else if (temp_a0 != 0) { + } else if (frame != 0) { D_ending_80196D08[4].unk_34++; } break; @@ -689,9 +692,9 @@ void Ending_80189108(void) { } if ((D_ending_80196F98 == 0) && (D_ending_80196D08[4].unk_38 != 2)) { - temp_a0 = (u32) (D_ending_80196D08[3].unk_34 * D_ending_80196D08[3].unk_30) % - Animation_GetFrameCount(D_ending_80196D08[3].anim); - if (temp_a0 != 0) { + frame = (u32) (D_ending_80196D08[3].unk_34 * D_ending_80196D08[3].unk_30) % + Animation_GetFrameCount(D_ending_80196D08[3].anim); + if (frame != 0) { D_ending_80196D08[3].unk_34 += 2; } } @@ -730,9 +733,9 @@ void Ending_80189108(void) { if (gCsFrameCount < 91) { D_ending_80196D08[3].unk_34 += 2; } else { - temp_a0 = ((u32) (D_ending_80196D08[3].unk_34 * D_ending_80196D08[3].unk_30) % - Animation_GetFrameCount(D_ending_80196D08[3].anim)); - if (temp_a0 != 0) { + frame = ((u32) (D_ending_80196D08[3].unk_34 * D_ending_80196D08[3].unk_30) % + Animation_GetFrameCount(D_ending_80196D08[3].anim)); + if (frame != 0) { D_ending_80196D08[3].unk_34 += 2; } } From 6b5a48ce130f043ebd861b49fd69585c69a8f311 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Sat, 18 May 2024 11:47:14 -0300 Subject: [PATCH 110/151] MATCH Ending_8018845C --- src/overlays/ovl_ending/fox_end1.c | 54 ++++++++++++++---------------- 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/src/overlays/ovl_ending/fox_end1.c b/src/overlays/ovl_ending/fox_end1.c index 7f9d4d3c..a223715d 100644 --- a/src/overlays/ovl_ending/fox_end1.c +++ b/src/overlays/ovl_ending/fox_end1.c @@ -367,15 +367,17 @@ s32 Ending_80188394(void) { } } -// fake match we can't use here: https://decomp.me/scratch/OKs3B -// stupid loop thing https://decomp.me/scratch/cyOva -#ifdef NON_MATCHING void Ending_8018845C(void) { - s32 var_a2; - u32 temp_a3; + s32 i; + u32 frame; - for (var_a2 = 0; var_a2 < 2; var_a2++) { - if (var_a2 != D_ending_8019858C) {} + for (i = 0; i < 2; i++) { + //! FAKE: + if ((i == D_ending_8019858C) || (D_ending_8019858C == 2)) { + if (D_ending_8019858C == 2) { + if (D_ending_8019858C == 2) {} + } + } } gHideRadio = true; @@ -389,20 +391,16 @@ void Ending_8018845C(void) { break; } - temp_a3 = (u32) (D_ending_80196D08[1].unk_34 * D_ending_80196D08[var_a2].unk_30) % - Animation_GetFrameCount(D_ending_80196D08[1].anim); + frame = (u32) (D_ending_80196D08[1].unk_34 * D_ending_80196D08[i].unk_30) % + Animation_GetFrameCount(D_ending_80196D08[1].anim); if (((gCsFrameCount >= 20) && (gCsFrameCount < 31)) || ((gCsFrameCount >= 50) && (gCsFrameCount < 71)) || ((gCsFrameCount >= 110) && (gCsFrameCount < 141)) || ((gCsFrameCount >= 160) && (gCsFrameCount < 191))) { D_ending_80196D08[1].unk_34++; - } else if (temp_a3 != 0) { + } else if (frame != 0) { D_ending_80196D08[1].unk_34++; } } -#else -void Ending_8018845C(void); -#pragma GLOBAL_ASM("asm/us/rev1/nonmatchings/overlays/ovl_ending/fox_end1/Ending_8018845C.s") -#endif s32 Ending_80188634(void) { if (gCallTimer != 0) { @@ -1303,17 +1301,17 @@ void Ending_8018ABE8(void) { void Ending_8018B16C(void) { } -void Ending_8018B174(Vec3f* arg0, Vec3f* arg1, f32* arg2) { - f32 sp4C; +void Ending_8018B174(Vec3f* actorPos, Vec3f* actorRot, f32* actorScale) { + f32 scale; f32 var_fv0 = 0.0f; f32 var_fv1 = 0.0f; f32 var_fa0 = 0.0f; f32 var_fa1 = 0.0f; f32 var_ft4 = 0.0f; f32 var_ft5 = 0.0f; - Vec3f sp28 = *arg0; - Vec3f sp1C = *arg1; - sp4C = *arg2; + Vec3f pos = *actorPos; + Vec3f sp1C = *actorRot; + scale = *actorScale; if (gControllerHold[2].button & Z_TRIG) { if (gControllerHold[2].button & R_CBUTTONS) { @@ -1362,20 +1360,20 @@ void Ending_8018B174(Vec3f* arg0, Vec3f* arg1, f32* arg2) { var_fv0 -= 0.01f; } - sp4C += var_fv0; - if (sp4C < 0.01f) { - sp4C = 0.01f; + scale += var_fv0; + if (scale < 0.01f) { + scale = 0.01f; } - sp28.x += var_fa1; - sp28.y += var_fa0; - sp28.z -= var_fv1; + pos.x += var_fa1; + pos.y += var_fa0; + pos.z -= var_fv1; sp1C.x += var_ft5; sp1C.y += var_ft4; - *arg0 = sp28; - *arg1 = sp1C; - *arg2 = sp4C; + *actorPos = pos; + *actorRot = sp1C; + *actorScale = scale; } void Ending_8018B3D8(void) { From 36ac4066c9d9542ef3e65f260c1fd60a12f12619 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Sat, 18 May 2024 12:24:10 -0300 Subject: [PATCH 111/151] makes more sense this way, still fake tho --- src/overlays/ovl_ending/fox_end1.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/overlays/ovl_ending/fox_end1.c b/src/overlays/ovl_ending/fox_end1.c index a223715d..4079df32 100644 --- a/src/overlays/ovl_ending/fox_end1.c +++ b/src/overlays/ovl_ending/fox_end1.c @@ -373,9 +373,9 @@ void Ending_8018845C(void) { for (i = 0; i < 2; i++) { //! FAKE: - if ((i == D_ending_8019858C) || (D_ending_8019858C == 2)) { - if (D_ending_8019858C == 2) { - if (D_ending_8019858C == 2) {} + if ((i == D_ending_8019858C) || (D_ending_8019858C != 2)) { + if (D_ending_8019858C != 2) { + if (D_ending_8019858C) {} } } } From 80eaf7d2e53fd328ed2e76d39e3d634ae920931f Mon Sep 17 00:00:00 2001 From: petrie911 <69443847+petrie911@users.noreply.github.com> Date: Sat, 18 May 2024 17:49:49 -0500 Subject: [PATCH 112/151] support for EU rev 0, updates to tools, other cleanup (#255) * srceu * remove warning * and some cleanup --- Makefile | 3 + include/sf64dma.h | 16 + linker_scripts/eu/rev0/hardware_regs.ld | 120 ++ linker_scripts/eu/rev0/pif_syms.ld | 10 + linker_scripts/eu/rev0/symbol_addrs_fix.txt | 119 ++ linker_scripts/eu/rev0/undefined_syms.ld | 1237 +++++++++++++++++++ linker_scripts/jp/rev0/symbol_addrs.txt | 5 - linker_scripts/jp/rev0/symbol_addrs_fix.txt | 39 +- linker_scripts/jp/rev0/undefined_syms.ld | 9 - linker_scripts/us/rev1/symbol_addrs.txt | 11 +- src/dmatable.c | 142 +-- src/engine/fox_reset.c | 6 +- srceu/audio/audio_effects.c | 19 + srceu/audio/audio_general.c | 208 ++++ srceu/audio/audio_heap.c | 67 + srceu/audio/audio_load.c | 97 ++ srceu/audio/audio_playback.c | 59 + srceu/audio/audio_seqplayer.c | 51 + srceu/audio/audio_synthesis.c | 41 + srceu/audio/audio_thread.c | 39 + srceu/buffers.c | 9 + srceu/dmatable.c | 84 ++ srceu/driverominit.c | 3 + srceu/engine/fox_360.c | 73 ++ srceu/engine/fox_beam.c | 75 ++ srceu/engine/fox_bg.c | 21 + srceu/engine/fox_blur.c | 3 + srceu/engine/fox_boss.c | 25 + srceu/engine/fox_col1.c | 31 + srceu/engine/fox_col2.c | 7 + srceu/engine/fox_demo.c | 71 ++ srceu/engine/fox_display.c | 75 ++ srceu/engine/fox_edata.c | 7 + srceu/engine/fox_edisplay.c | 131 ++ srceu/engine/fox_effect.c | 345 ++++++ srceu/engine/fox_enmy.c | 191 +++ srceu/engine/fox_enmy2.c | 125 ++ srceu/engine/fox_fade.c | 11 + srceu/engine/fox_game.c | 23 + srceu/engine/fox_hud.c | 259 ++++ srceu/engine/fox_load.c | 36 + srceu/engine/fox_load_inits.c | 869 +++++++++++++ srceu/engine/fox_message.c | 17 + srceu/engine/fox_pause.c | 5 + srceu/engine/fox_play.c | 204 +++ srceu/engine/fox_radio.c | 13 + srceu/engine/fox_rcp.c | 109 ++ srceu/engine/fox_reset.c | 3 + srceu/engine/fox_save.c | 9 + srceu/engine/fox_std_lib.c | 91 ++ srceu/engine/fox_tank.c | 55 + srceu/engine/fox_versus.c | 151 +++ srceu/libc_math64.c | 25 + srceu/libc_sprintf.c | 7 + srceu/overlays/ovl_ending/end1.c | 61 + srceu/overlays/ovl_ending/end2.c | 243 ++++ srceu/overlays/ovl_i1/fox_co.c | 129 ++ srceu/overlays/ovl_i1/fox_i1.c | 3 + srceu/overlays/ovl_i1/fox_tr.c | 7 + srceu/overlays/ovl_i1/fox_tr360.c | 9 + srceu/overlays/ovl_i1/fox_ve1.c | 59 + srceu/overlays/ovl_i2/fox_i2.c | 3 + srceu/overlays/ovl_i2/fox_me.c | 97 ++ srceu/overlays/ovl_i2/fox_sx.c | 47 + srceu/overlays/ovl_i3/fox_a6.c | 53 + srceu/overlays/ovl_i3/fox_aq.c | 213 ++++ srceu/overlays/ovl_i3/fox_i3.c | 3 + srceu/overlays/ovl_i3/fox_so.c | 105 ++ srceu/overlays/ovl_i3/fox_zo.c | 177 +++ srceu/overlays/ovl_i4/fox_bo.c | 91 ++ srceu/overlays/ovl_i4/fox_fo.c | 29 + srceu/overlays/ovl_i4/fox_i4.c | 5 + srceu/overlays/ovl_i4/fox_ka.c | 63 + srceu/overlays/ovl_i4/fox_sz.c | 55 + srceu/overlays/ovl_i5/fox_ground.c | 27 + srceu/overlays/ovl_i5/fox_i5.c | 5 + srceu/overlays/ovl_i5/fox_ma.c | 279 +++++ srceu/overlays/ovl_i5/fox_ti.c | 143 +++ srceu/overlays/ovl_i5/fox_ti_cs.c | 11 + srceu/overlays/ovl_i6/fox_andross.c | 125 ++ srceu/overlays/ovl_i6/fox_i6.c | 5 + srceu/overlays/ovl_i6/fox_sy.c | 105 ++ srceu/overlays/ovl_i6/fox_turret.c | 13 + srceu/overlays/ovl_i6/fox_ve2.c | 17 + srceu/overlays/ovl_menu/fox_i_menu.c | 3 + srceu/overlays/ovl_menu/fox_map.c | 256 ++++ srceu/overlays/ovl_menu/fox_option.c | 291 +++++ srceu/overlays/ovl_menu/fox_title.c | 157 +++ srceu/overlays/ovl_unused/fox_unused.c | 3 + srceu/sys/sys_fault.c | 73 ++ srceu/sys/sys_joybus.c | 15 + srceu/sys/sys_lib.c | 17 + srceu/sys/sys_lights.c | 7 + srceu/sys/sys_main.c | 33 + srceu/sys/sys_math.c | 25 + srceu/sys/sys_matrix.c | 37 + srceu/sys/sys_memory.c | 5 + srceu/sys/sys_save.c | 11 + srceu/sys/sys_timer.c | 13 + srcjp/dmatable.c | 140 +-- starfox64.eu.rev0.uncompressed.md5 | 1 + tools/comptool.py | 5 +- tools/format.py | 3 +- tools/requirements-python.txt | 4 +- tools/splat | 2 +- yamls/eu/rev0/assets.yaml | 507 ++++++++ yamls/eu/rev0/header.yaml | 69 ++ yamls/eu/rev0/main.yaml | 335 +++++ yamls/eu/rev0/overlays.yaml | 265 ++++ yamls/jp/rev0/overlays.yaml | 12 +- 110 files changed, 9734 insertions(+), 198 deletions(-) create mode 100644 linker_scripts/eu/rev0/hardware_regs.ld create mode 100644 linker_scripts/eu/rev0/pif_syms.ld create mode 100644 linker_scripts/eu/rev0/symbol_addrs_fix.txt create mode 100644 linker_scripts/eu/rev0/undefined_syms.ld create mode 100644 srceu/audio/audio_effects.c create mode 100644 srceu/audio/audio_general.c create mode 100644 srceu/audio/audio_heap.c create mode 100644 srceu/audio/audio_load.c create mode 100644 srceu/audio/audio_playback.c create mode 100644 srceu/audio/audio_seqplayer.c create mode 100644 srceu/audio/audio_synthesis.c create mode 100644 srceu/audio/audio_thread.c create mode 100644 srceu/buffers.c create mode 100644 srceu/dmatable.c create mode 100644 srceu/driverominit.c create mode 100644 srceu/engine/fox_360.c create mode 100644 srceu/engine/fox_beam.c create mode 100644 srceu/engine/fox_bg.c create mode 100644 srceu/engine/fox_blur.c create mode 100644 srceu/engine/fox_boss.c create mode 100644 srceu/engine/fox_col1.c create mode 100644 srceu/engine/fox_col2.c create mode 100644 srceu/engine/fox_demo.c create mode 100644 srceu/engine/fox_display.c create mode 100644 srceu/engine/fox_edata.c create mode 100644 srceu/engine/fox_edisplay.c create mode 100644 srceu/engine/fox_effect.c create mode 100644 srceu/engine/fox_enmy.c create mode 100644 srceu/engine/fox_enmy2.c create mode 100644 srceu/engine/fox_fade.c create mode 100644 srceu/engine/fox_game.c create mode 100644 srceu/engine/fox_hud.c create mode 100644 srceu/engine/fox_load.c create mode 100644 srceu/engine/fox_load_inits.c create mode 100644 srceu/engine/fox_message.c create mode 100644 srceu/engine/fox_pause.c create mode 100644 srceu/engine/fox_play.c create mode 100644 srceu/engine/fox_radio.c create mode 100644 srceu/engine/fox_rcp.c create mode 100644 srceu/engine/fox_reset.c create mode 100644 srceu/engine/fox_save.c create mode 100644 srceu/engine/fox_std_lib.c create mode 100644 srceu/engine/fox_tank.c create mode 100644 srceu/engine/fox_versus.c create mode 100644 srceu/libc_math64.c create mode 100644 srceu/libc_sprintf.c create mode 100644 srceu/overlays/ovl_ending/end1.c create mode 100644 srceu/overlays/ovl_ending/end2.c create mode 100644 srceu/overlays/ovl_i1/fox_co.c create mode 100644 srceu/overlays/ovl_i1/fox_i1.c create mode 100644 srceu/overlays/ovl_i1/fox_tr.c create mode 100644 srceu/overlays/ovl_i1/fox_tr360.c create mode 100644 srceu/overlays/ovl_i1/fox_ve1.c create mode 100644 srceu/overlays/ovl_i2/fox_i2.c create mode 100644 srceu/overlays/ovl_i2/fox_me.c create mode 100644 srceu/overlays/ovl_i2/fox_sx.c create mode 100644 srceu/overlays/ovl_i3/fox_a6.c create mode 100644 srceu/overlays/ovl_i3/fox_aq.c create mode 100644 srceu/overlays/ovl_i3/fox_i3.c create mode 100644 srceu/overlays/ovl_i3/fox_so.c create mode 100644 srceu/overlays/ovl_i3/fox_zo.c create mode 100644 srceu/overlays/ovl_i4/fox_bo.c create mode 100644 srceu/overlays/ovl_i4/fox_fo.c create mode 100644 srceu/overlays/ovl_i4/fox_i4.c create mode 100644 srceu/overlays/ovl_i4/fox_ka.c create mode 100644 srceu/overlays/ovl_i4/fox_sz.c create mode 100644 srceu/overlays/ovl_i5/fox_ground.c create mode 100644 srceu/overlays/ovl_i5/fox_i5.c create mode 100644 srceu/overlays/ovl_i5/fox_ma.c create mode 100644 srceu/overlays/ovl_i5/fox_ti.c create mode 100644 srceu/overlays/ovl_i5/fox_ti_cs.c create mode 100644 srceu/overlays/ovl_i6/fox_andross.c create mode 100644 srceu/overlays/ovl_i6/fox_i6.c create mode 100644 srceu/overlays/ovl_i6/fox_sy.c create mode 100644 srceu/overlays/ovl_i6/fox_turret.c create mode 100644 srceu/overlays/ovl_i6/fox_ve2.c create mode 100644 srceu/overlays/ovl_menu/fox_i_menu.c create mode 100644 srceu/overlays/ovl_menu/fox_map.c create mode 100644 srceu/overlays/ovl_menu/fox_option.c create mode 100644 srceu/overlays/ovl_menu/fox_title.c create mode 100644 srceu/overlays/ovl_unused/fox_unused.c create mode 100644 srceu/sys/sys_fault.c create mode 100644 srceu/sys/sys_joybus.c create mode 100644 srceu/sys/sys_lib.c create mode 100644 srceu/sys/sys_lights.c create mode 100644 srceu/sys/sys_main.c create mode 100644 srceu/sys/sys_math.c create mode 100644 srceu/sys/sys_matrix.c create mode 100644 srceu/sys/sys_memory.c create mode 100644 srceu/sys/sys_save.c create mode 100644 srceu/sys/sys_timer.c create mode 100644 starfox64.eu.rev0.uncompressed.md5 create mode 100644 yamls/eu/rev0/assets.yaml create mode 100644 yamls/eu/rev0/header.yaml create mode 100644 yamls/eu/rev0/main.yaml create mode 100644 yamls/eu/rev0/overlays.yaml diff --git a/Makefile b/Makefile index e0d95896..907eb133 100644 --- a/Makefile +++ b/Makefile @@ -298,6 +298,9 @@ SRC_DIRS := $(shell find src -type d) ifeq ($(VERSION), jp) SRC_DIRS := $(shell find srcjp -type d) endif +ifeq ($(VERSION), eu) +SRC_DIRS := $(shell find srceu -type d) +endif ASM_DIRS := $(shell find asm/$(VERSION)/$(REV) -type d -not -path "asm/$(VERSION)/$(REV)/nonmatchings/*") BIN_DIRS := $(shell find bin -type d) diff --git a/include/sf64dma.h b/include/sf64dma.h index 97f4c48f..10be747f 100644 --- a/include/sf64dma.h +++ b/include/sf64dma.h @@ -137,8 +137,17 @@ DECLARE_SEGMENT(ast_macbeth); DECLARE_SEGMENT(ast_warp_zone); DECLARE_SEGMENT(ast_title); DECLARE_SEGMENT(ast_map); +DECLARE_SEGMENT(ast_map_en); +DECLARE_SEGMENT(ast_map_fr); +DECLARE_SEGMENT(ast_map_de); DECLARE_SEGMENT(ast_option); +DECLARE_SEGMENT(ast_option_en); +DECLARE_SEGMENT(ast_option_fr); +DECLARE_SEGMENT(ast_option_de); DECLARE_SEGMENT(ast_vs_menu); +DECLARE_SEGMENT(ast_vs_menu_en); +DECLARE_SEGMENT(ast_vs_menu_fr); +DECLARE_SEGMENT(ast_vs_menu_de); DECLARE_SEGMENT(ast_text); DECLARE_SEGMENT(ast_font_3d); DECLARE_SEGMENT(ast_andross); @@ -149,6 +158,9 @@ DECLARE_SEGMENT(ast_ending_award_back); DECLARE_SEGMENT(ast_ending_expert); DECLARE_SEGMENT(ast_training); DECLARE_SEGMENT(ast_radio); +DECLARE_SEGMENT(ast_radio_en); +DECLARE_SEGMENT(ast_radio_fr); +DECLARE_SEGMENT(ast_radio_de); DECLARE_SEGMENT(ovl_i1); DECLARE_SEGMENT(ovl_i2); DECLARE_SEGMENT(ovl_i3); @@ -159,4 +171,8 @@ DECLARE_SEGMENT(ovl_menu); DECLARE_SEGMENT(ovl_ending); DECLARE_SEGMENT(ovl_unused); + + + + #endif diff --git a/linker_scripts/eu/rev0/hardware_regs.ld b/linker_scripts/eu/rev0/hardware_regs.ld new file mode 100644 index 00000000..489e4fae --- /dev/null +++ b/linker_scripts/eu/rev0/hardware_regs.ld @@ -0,0 +1,120 @@ +// Signal Processor Registers +SP_MEM_ADDR_REG = 0xA4040000; // defined:True +SP_DRAM_ADDR_REG = 0xA4040004; // defined:True +SP_RD_LEN_REG = 0xA4040008; // defined:True +SP_WR_LEN_REG = 0xA404000C; // defined:True +SP_STATUS_REG = 0xA4040010; // defined:True +SP_DMA_FULL_REG = 0xA4040014; // defined:True +SP_DMA_BUSY_REG = 0xA4040018; // defined:True +SP_SEMAPHORE_REG = 0xA404001C; // defined:True + +SP_PC = 0xA4080000; // defined:True + +// Display Processor Command Registers / Rasterizer Interface +DPC_START_REG = 0xA4100000; // defined:True +DPC_END_REG = 0xA4100004; // defined:True +DPC_CURRENT_REG = 0xA4100008; // defined:True +DPC_STATUS_REG = 0xA410000C; // defined:True +DPC_CLOCK_REG = 0xA4100010; // defined:True +DPC_BUFBUSY_REG = 0xA4100014; // defined:True +DPC_PIPEBUSY_REG = 0xA4100018; // defined:True +DPC_TMEM_REG = 0xA410001C; // defined:True + +// Display Processor Span Registers +DPS_TBIST_REG = 0xA4200000; // defined:True // DPS_TBIST_REG / DP_TMEM_BIST +DPS_TEST_MODE_REG = 0xA4200004; // defined:True +DPS_BUFTEST_ADDR_REG = 0xA4200008; // defined:True +DPS_BUFTEST_DATA_REG = 0xA420000C; // defined:True + +// MIPS Interface Registers +MI_MODE_REG = 0xA4300000; // defined:True // MI_MODE_REG / MI_INIT_MODE_REG +MI_VERSION_REG = 0xA4300004; // defined:True +MI_INTR_REG = 0xA4300008; // defined:True +MI_INTR_MASK_REG = 0xA430000C; // defined:True + +// Video Interface Registers +VI_STATUS_REG = 0xA4400000; // defined:True // VI_STATUS_REG / VI_CONTROL_REG +VI_DRAM_ADDR_REG = 0xA4400004; // defined:True // VI_DRAM_ADDR_REG / VI_ORIGIN_REG +VI_WIDTH_REG = 0xA4400008; // defined:True +VI_INTR_REG = 0xA440000C; // defined:True +VI_CURRENT_REG = 0xA4400010; // defined:True +VI_BURST_REG = 0xA4400014; // defined:True // VI_BURST_REG / VI_TIMING_REG +VI_V_SYNC_REG = 0xA4400018; // defined:True +VI_H_SYNC_REG = 0xA440001C; // defined:True +VI_LEAP_REG = 0xA4400020; // defined:True +VI_H_START_REG = 0xA4400024; // defined:True +VI_V_START_REG = 0xA4400028; // defined:True +VI_V_BURST_REG = 0xA440002C; // defined:True +VI_X_SCALE_REG = 0xA4400030; // defined:True +VI_Y_SCALE_REG = 0xA4400034; // defined:True + +// Audio Interface Registers +AI_DRAM_ADDR_REG = 0xA4500000; // defined:True +AI_LEN_REG = 0xA4500004; // defined:True +AI_CONTROL_REG = 0xA4500008; // defined:True +AI_STATUS_REG = 0xA450000C; // defined:True +AI_DACRATE_REG = 0xA4500010; // defined:True +AI_BITRATE_REG = 0xA4500014; // defined:True + +// Peripheral/Parallel Interface Registers +PI_DRAM_ADDR_REG = 0xA4600000; // defined:True +PI_CART_ADDR_REG = 0xA4600004; // defined:True +D_A4600005 = 0xA4600005; // defined:True // TODO figure out its name +D_A4600006 = 0xA4600006; // defined:True // TODO figure out its name +D_A4600007 = 0xA4600007; // defined:True // TODO figure out its name +PI_RD_LEN_REG = 0xA4600008; // defined:True +PI_WR_LEN_REG = 0xA460000C; // defined:True +PI_STATUS_REG = 0xA4600010; // defined:True +PI_BSD_DOM1_LAT_REG = 0xA4600014; // defined:True // PI dom1 latency +PI_BSD_DOM1_PWD_REG = 0xA4600018; // defined:True // PI dom1 pulse width +PI_BSD_DOM1_PGS_REG = 0xA460001C; // defined:True // PI dom1 page size +PI_BSD_DOM1_RLS_REG = 0xA4600020; // defined:True // PI dom1 release +PI_BSD_DOM2_LAT_REG = 0xA4600024; // defined:True // PI dom2 latency +PI_BSD_DOM2_LWD_REG = 0xA4600028; // defined:True // PI dom2 pulse width +PI_BSD_DOM2_PGS_REG = 0xA460002C; // defined:True // PI dom2 page size +PI_BSD_DOM2_RLS_REG = 0xA4600030; // defined:True // PI dom2 release + +// RDRAM Interface Registers +RI_MODE_REG = 0xA4700000; // defined:True +RI_CONFIG_REG = 0xA4700004; // defined:True +RI_CURRENT_LOAD_REG = 0xA4700008; // defined:True +RI_SELECT_REG = 0xA470000C; // defined:True +RI_REFRESH_REG = 0xA4700010; // defined:True +RI_LATENCY_REG = 0xA4700014; // defined:True +RI_RERROR_REG = 0xA4700018; // defined:True +RI_WERROR_REG = 0xA470001C; // defined:True + +// Serial Interface Registers +SI_DRAM_ADDR_REG = 0xA4800000; // defined:True +SI_PIF_ADDR_RD64B_REG = 0xA4800004; // defined:True +D_A4800008 = 0xA4800008; // defined:True // reserved +D_A480000C = 0xA480000C; // defined:True // reserved +SI_PIF_ADDR_WR64B_REG = 0xA4800010; // defined:True +D_A4800014 = 0xA4800014; // defined:True // reserved +SI_STATUS_REG = 0xA4800018; // defined:True + +LEO_CMD = 0xA5000508; +LEO_STATUS = 0xA5000508; +LEO_BM_CTL = 0xA5000510; +LEO_BM_STATUS = 0xA5000510; +LEO_SEQ_CTL = 0xA5000518; +LEO_SEQ_STATUS = 0xA5000518; +LEO_C2_BUFF = 0xA5000000; +LEO_SECTOR_BUFF = 0xA5000400; +LEO_DATA = 0xA5000500; +LEO_MISC_REG = 0xA5000504; +LEO_CUR_TK = 0xA500050C; +LEO_ERR_SECTOR = 0xA5000514; +LEO_CUR_SECTOR = 0xA500051C; +LEO_HARD_RESET = 0xA5000520; +LEO_C1_S0 = 0xA5000524; +LEO_HOST_SECBYTE = 0xA5000528; +LEO_C1_S2 = 0xA500052C; +LEO_SEC_BYTE = 0xA5000530; +LEO_C1_S4 = 0xA5000534; +LEO_C1_S6 = 0xA5000538; +LEO_CUR_ADDR = 0xA500053C; +LEO_ID_REG = 0xA5000540; +LEO_TEST_REG = 0xA5000544; +LEO_TEST_PIN_SEL = 0xA5000548; +LEO_RAM_ADDR = 0xA5000580; \ No newline at end of file diff --git a/linker_scripts/eu/rev0/pif_syms.ld b/linker_scripts/eu/rev0/pif_syms.ld new file mode 100644 index 00000000..a0e8bcb2 --- /dev/null +++ b/linker_scripts/eu/rev0/pif_syms.ld @@ -0,0 +1,10 @@ +// libultra OS symbols + +osTvType = 0x80000300; +osRomType = 0x80000304; +osRomBase = 0x80000308; +osResetType = 0x8000030C; +osCicId = 0x80000310; +osVersion = 0x80000314; +osMemSize = 0x80000318; +osAppNMIBuffer = 0x8000031C; \ No newline at end of file diff --git a/linker_scripts/eu/rev0/symbol_addrs_fix.txt b/linker_scripts/eu/rev0/symbol_addrs_fix.txt new file mode 100644 index 00000000..0dd634bf --- /dev/null +++ b/linker_scripts/eu/rev0/symbol_addrs_fix.txt @@ -0,0 +1,119 @@ + +// hallucinated symbols +D_400001 = 0x400001; //ignore:true +D_7FFFFFFE = 0x7FFFFFFE; //ignore:True +D_80000000 = 0x80000000; //ignore:True +D_80000001 = 0x80000001; //ignore:true +D_80000002 = 0x80000002; //ignore:True +D_80000003 = 0x80000003; //ignore:True +D_80000004 = 0x80000004; //ignore:True +D_80000006 = 0x80000006; //ignore:True +D_80000008 = 0x80000008; //ignore:True +D_8000000A = 0x8000000A; //ignore:True +D_8000000C = 0x8000000C; //ignore:True +D_8000000D = 0x8000000D; //ignore:True +D_8000000E = 0x8000000E; //ignore:True +D_8000000F = 0x8000000F; //ignore:True +D_80000014 = 0x80000014; //ignore:True +D_80000018 = 0x80000018; //ignore:True +D_8000001C = 0x8000001C; //ignore:True +D_80000024 = 0x80000024; //ignore:True +D_800F0032 = 0x800F0032; //ignore:True +D_80100032 = 0x80100032; //ignore:True +D_80110000 = 0x80110000; //ignore:True +D_801100C8 = 0x801100C8; //ignore:True +D_80120000 = 0x80120000; //ignore:True +D_801200C8 = 0x801200C8; //ignore:True +D_80130001 = 0x80130001; //ignore:True +D_801300C8 = 0x801300C8; //ignore:True +D_80140001 = 0x80140001; //ignore:true +D_80150000 = 0x80150000; //ignore:true +D_80160000 = 0x80160000; //ignore:true +D_80170000 = 0x80170000; //ignore:true +D_80170001 = 0x80170001; //ignore:true +D_80180001 = 0x80180001; //ignore:True +D_80180058 = 0x80180058; //ignore:True + +// mirage symbols +D_3000000 = 0x3000000; //ignore:true +D_6000000 = 0x6000000; //ignore:true +D_7000000 = 0x7000000; //ignore:true +D_8000000 = 0x8000000; //ignore:true +D_A000000 = 0xA000000; //ignore:true +D_C000000 = 0xC000000; //ignore:true + +// rsp +rspbootTextStart = 0x800004D0;//name_end:rspbootTextEnd +aspMainTextStart = 0x800005A0;//name_end:aspMainTextEnd +gspF3DEX_fifoTextStart = 0x80001490;//name_end:gspF3DEX_fifoTextEnd +gspF3DEX_fifoDataStart = 0x800C4980; //name_end:gspF3DEX_fifoDataEnd +aspMainDataStart = 0x800C3E70; //name_end:aspMainDataEnd + +// redundant rodata +D_800D63EC = 0x800D63EC; //force_migration:true +D_800D65F8 = 0x800D65F8; //force_migration:true +D_800D660C = 0x800D660C; //force_migration:true +D_800D99D0 = 0x800D99D0; //force_migration:true +D_800D99E0 = 0x800D99E0; //force_migration:true +D_800D9A04 = 0x800D9A04; //force_migration:true +D_800DA7B0 = 0x800DA7B0; //force_migration:true +D_i3_801C517C = 0x801C517C; //force_migration:true segment:ovl_i3 +D_i3_801C5188 = 0x801C5188; //force_migration:true segment:ovl_i3 +D_i3_801C5190 = 0x801C5190; //force_migration:true segment:ovl_i3 +D_i3_801C51B8 = 0x801C51B8; //force_migration:true segment:ovl_i3 +D_i4_801A3754 = 0x801A3754; //force_migration:true segment:ovl_i4 +D_i5_801BF248 = 0x801BF248; //force_migration:true segment:ovl_i5 +D_i5_801BF27C = 0x801BF27C; //force_migration:true segment:ovl_i5 +D_i5_801BF510 = 0x801BF510; //force_migration:true segment:ovl_i5 +D_i5_801BF524 = 0x801BF524; //force_migration:true segment:ovl_i5 +D_i6_801AAF70 = 0x801AAF70; //force_migration:true segment:ovl_i6 + +// constant for K1 access +D_A0000000 = 0xA0000000;//ignore:true + +// hardcoded address used in sys_rdram +D_A0300000 = 0xA0300000;//ignore:true +D_A4000000 = 0xA4000000;//ignore:true + +// hardcoded addresses in libultra +D_BFF00000 = 0xBFF00000;//ignore:true +D_BFF08000 = 0xBFF08000;//ignore:true +D_BFF08004 = 0xBFF08004;//ignore:true + +// RDB regs used only in exceptasm. Also -2.0f +D_C0000000 = 0xC0000000;//ignore:true +D_C0000008 = 0xC0000008;//ignore:true +D_C000000C = 0xC000000C;//ignore:true + +// hidden symbols +sSamplesPerWavePeriod = 0x800C63E8; //size:0x4 type:u8 +sOvlUnused_Unk = 0x800CCBAC; +D_800D6994 = 0x800D6994; +D_80161A91 = 0x80161A91; +D_801BE59C = 0x801BE59C; //segment:ovl_i5 + +// fake symbol removal +D_800CCC44 = 0x800CCC44; //size:0x98 +gDmaTable = 0x8017ABE0; //size:0x650 + +// dma symbols +dma_table_ROM_START = 0xE0570; +audio_seq_ROM_START = 0xE0BC0; +audio_bank_ROM_START = 0x127F50; +audio_table_ROM_START = 0x1471E0; +ast_radio_de_ROM_START = 0xDE12C0; +ast_radio_de_VRAM = 0x8017B230; +ast_radio_de_ROM_END = 0xDF10B0; +ast_radio_en_ROM_START = 0xEFB1A0; +ast_radio_fr_ROM_START = 0xF08CF0; +ast_radio_fr_ROM_END = 0xF17200; + +// buffers +gDramStack = 0x80289000; //size:0x400 segment:buffers defined:true +gOSYieldData = 0x80289400; //size:0xC00 segment:buffers defined:true +gZBuffer = 0x8028A000; //size:0x25800 segment:buffers defined:true +gTaskOutputBuffer = 0x802AF800; //size:0x30000 name_end:gTaskOutputBufferEnd segment:buffers defined:true +gAudioHeap = 0x802DF800; //size:0xB0000 segment:buffers defined:true +gFillBuffer = 0x8038F800; //size:0x780 segment:buffers defined:true +D_8038FA80 = 0x8038FA80;//ignore:true segment:buffers +gFrameBuffers = 0x8038FF80; //size:0x70800 segment:buffers defined:true diff --git a/linker_scripts/eu/rev0/undefined_syms.ld b/linker_scripts/eu/rev0/undefined_syms.ld new file mode 100644 index 00000000..e8ec3377 --- /dev/null +++ b/linker_scripts/eu/rev0/undefined_syms.ld @@ -0,0 +1,1237 @@ +D_1002A20 = 0x1002A20; +D_1003BE0 = 0x1003BE0; +D_1003E20 = 0x1003E20; +D_1003EE0 = 0x1003EE0; +D_10040B0 = 0x10040B0; +D_1004FD0 = 0x1004FD0; +D_1005EF0 = 0x1005EF0; +D_1006E10 = 0x1006E10; +D_1007D30 = 0x1007D30; +D_1008C50 = 0x1008C50; +D_1009B70 = 0x1009B70; +D_100AA90 = 0x100AA90; +D_100B9B0 = 0x100B9B0; +D_100C8D0 = 0x100C8D0; +D_100D7F0 = 0x100D7F0; +D_100E710 = 0x100E710; +D_100F630 = 0x100F630; +D_1012090 = 0x1012090; +D_10124B0 = 0x10124B0; +D_10124C0 = 0x10124C0; +D_1012540 = 0x1012540; +D_1012850 = 0x1012850; +D_10128C0 = 0x10128C0; +D_10128D0 = 0x10128D0; +D_10129A0 = 0x10129A0; +D_10129C0 = 0x10129C0; +D_1012A90 = 0x1012A90; +D_1012AB0 = 0x1012AB0; +D_1012B80 = 0x1012B80; +D_1012BA0 = 0x1012BA0; +D_1012C70 = 0x1012C70; +D_1012C90 = 0x1012C90; +D_1012CD0 = 0x1012CD0; +D_1012CE0 = 0x1012CE0; +D_1012D18 = 0x1012D18; +D_1012D30 = 0x1012D30; +D_1012F20 = 0x1012F20; +D_10135E0 = 0x10135E0; +D_10136A8 = 0x10136A8; +D_10136D0 = 0x10136D0; +D_1013798 = 0x1013798; +D_10137D0 = 0x10137D0; +D_1013EA0 = 0x1013EA0; +D_1013F80 = 0x1013F80; +D_1014380 = 0x1014380; +D_1014390 = 0x1014390; +D_1014510 = 0x1014510; +D_1016320 = 0x1016320; +D_1016790 = 0x1016790; +D_1017390 = 0x1017390; +D_1017680 = 0x1017680; +D_10185D0 = 0x10185D0; +D_10190D0 = 0x10190D0; +D_1019ED0 = 0x1019ED0; +D_101A2D0 = 0x101A2D0; +D_101A630 = 0x101A630; +D_101AAB0 = 0x101AAB0; +D_101B380 = 0x101B380; +D_101B6F0 = 0x101B6F0; +D_101B9E0 = 0x101B9E0; +D_101BB30 = 0x101BB30; +D_101BCE0 = 0x101BCE0; +D_101D0F0 = 0x101D0F0; +D_101D8F0 = 0x101D8F0; +D_101DB80 = 0x101DB80; +D_101DE80 = 0x101DE80; +D_101EA20 = 0x101EA20; +D_1022C30 = 0x1022C30; +D_1023C90 = 0x1023C90; +D_1023FB0 = 0x1023FB0; +D_1024510 = 0x1024510; +D_1024560 = 0x1024560; +D_1024A90 = 0x1024A90; +D_1025040 = 0x1025040; +D_10250A0 = 0x10250A0; +D_1025640 = 0x1025640; +D_10257A0 = 0x10257A0; +D_1025868 = 0x1025868; +D_10258D0 = 0x10258D0; +D_1025D70 = 0x1025D70; +D_1026610 = 0x1026610; +D_1026EA0 = 0x1026EA0; +D_1029040 = 0x1029040; +D_102A590 = 0x102A590; +D_102AE20 = 0x102AE20; +D_102B6B0 = 0x102B6B0; +D_102FB60 = 0x102FB60; +D_10303F0 = 0x10303F0; +D_1030C90 = 0x1030C90; +D_1030D18 = 0x1030D18; +D_1032440 = 0x1032440; +D_1032CD0 = 0x1032CD0; +D_1033590 = 0x1033590; +D_20031B0 = 0x20031B0; +D_2006F50 = 0x2006F50; +D_200D750 = 0x200D750; +D_2010A30 = 0x2010A30; +D_20112C0 = 0x20112C0; +D_3000090 = 0x3000090; +D_3000100 = 0x3000100; +D_3000120 = 0x3000120; +D_3000130 = 0x3000130; +D_30001A0 = 0x30001A0; +D_30002A0 = 0x30002A0; +D_3000310 = 0x3000310; +D_3000410 = 0x3000410; +D_3000470 = 0x3000470; +D_3000480 = 0x3000480; +D_3000660 = 0x3000660; +D_3000940 = 0x3000940; +D_3000970 = 0x3000970; +D_3000AF0 = 0x3000AF0; +D_3000C70 = 0x3000C70; +D_3001848 = 0x3001848; +D_3001A50 = 0x3001A50; +D_3002E80 = 0x3002E80; +D_3004450 = 0x3004450; +D_3004640 = 0x3004640; +D_3004680 = 0x3004680; +D_3005980 = 0x3005980; +D_3005AB0 = 0x3005AB0; +D_3005EA8 = 0x3005EA8; +D_30066B0 = 0x30066B0; +D_3006940 = 0x3006940; +D_3006AF0 = 0x3006AF0; +D_3006C70 = 0x3006C70; +D_3006DE0 = 0x3006DE0; +D_3007040 = 0x3007040; +D_3007240 = 0x3007240; +D_3007C50 = 0x3007C50; +D_3007E50 = 0x3007E50; +D_3007E70 = 0x3007E70; +D_3008100 = 0x3008100; +D_3008B40 = 0x3008B40; +D_3008D40 = 0x3008D40; +D_3009200 = 0x3009200; +D_3009230 = 0x3009230; +D_3009F78 = 0x3009F78; +D_300A180 = 0x300A180; +D_300A640 = 0x300A640; +D_300A670 = 0x300A670; +D_300B548 = 0x300B548; +D_300D450 = 0x300D450; +D_300EF50 = 0x300EF50; +D_300F140 = 0x300F140; +D_300FA48 = 0x300FA48; +D_300FC50 = 0x300FC50; +D_3010970 = 0x3010970; +D_3010B70 = 0x3010B70; +D_3011410 = 0x3011410; +D_3011720 = 0x3011720; +D_30131F0 = 0x30131F0; +D_3014380 = 0x3014380; +D_3014BF0 = 0x3014BF0; +D_3015120 = 0x3015120; +D_3015128 = 0x3015128; +D_30155E0 = 0x30155E0; +D_3015AF4 = 0x3015AF4; +D_3015C28 = 0x3015C28; +D_3015D80 = 0x3015D80; +D_30163C4 = 0x30163C4; +D_3016570 = 0x3016570; +D_30165B8 = 0x30165B8; +D_30165E0 = 0x30165E0; +D_3016610 = 0x3016610; +D_3016628 = 0x3016628; +D_3016660 = 0x3016660; +D_3016720 = 0x3016720; +D_3016770 = 0x3016770; +D_3016B30 = 0x3016B30; +D_3016BB0 = 0x3016BB0; +D_3017080 = 0x3017080; +D_30174C0 = 0x30174C0; +D_30175C0 = 0x30175C0; +D_3017660 = 0x3017660; +D_3017760 = 0x3017760; +D_3017F80 = 0x3017F80; +D_3018080 = 0x3018080; +D_30182A0 = 0x30182A0; +D_30183D0 = 0x30183D0; +D_3018440 = 0x3018440; +D_30184D8 = 0x30184D8; +D_30189C0 = 0x30189C0; +D_3018B60 = 0x3018B60; +D_3018FF0 = 0x3018FF0; +D_3019190 = 0x3019190; +D_30194E0 = 0x30194E0; +D_30199F0 = 0x30199F0; +D_301B320 = 0x301B320; +D_301C020 = 0x301C020; +D_301CF30 = 0x301CF30; +D_301D910 = 0x301D910; +D_301E2E0 = 0x301E2E0; +D_3020B50 = 0x3020B50; +D_3021BE0 = 0x3021BE0; +D_3022540 = 0x3022540; +D_3024CA0 = 0x3024CA0; +D_3027200 = 0x3027200; +D_3027390 = 0x3027390; +D_3027B80 = 0x3027B80; +D_3028848 = 0x3028848; +D_3028AB4 = 0x3028AB4; +D_302948C = 0x302948C; +D_30296F8 = 0x30296F8; +D_3029D28 = 0x3029D28; +D_302A034 = 0x302A034; +D_302A63C = 0x302A63C; +D_302A888 = 0x302A888; +D_302AA10 = 0x302AA10; +D_302B5E0 = 0x302B5E0; +D_302C1C0 = 0x302C1C0; +D_30395C0 = 0x30395C0; +D_30396E0 = 0x30396E0; +D_3039970 = 0x3039970; +D_303A210 = 0x303A210; +D_303A254 = 0x303A254; +D_303A298 = 0x303A298; +D_303A2DC = 0x303A2DC; +D_303A584 = 0x303A584; +D_303A610 = 0x303A610; +D_303A818 = 0x303A818; +D_303AA0C = 0x303AA0C; +D_303AAFC = 0x303AAFC; +D_303ABEC = 0x303ABEC; +D_303ACD0 = 0x303ACD0; +D_303ADFC = 0x303ADFC; +D_303AEEC = 0x303AEEC; +D_303AFDC = 0x303AFDC; +D_303B0C0 = 0x303B0C0; +D_4000080 = 0x4000080; +D_400014C = 0x400014C; +D_40001A4 = 0x40001A4; +D_4000270 = 0x4000270; +D_40018A0 = 0x40018A0; +D_4003BD0 = 0x4003BD0; +D_40057AC = 0x40057AC; +D_40058B8 = 0x40058B8; +D_40068F0 = 0x40068F0; +D_4007870 = 0x4007870; +D_4007AF0 = 0x4007AF0; +D_4008CE0 = 0x4008CE0; +D_4008F70 = 0x4008F70; +D_400A30C = 0x400A30C; +D_400A398 = 0x400A398; +D_400AAE0 = 0x400AAE0; +D_400B390 = 0x400B390; +D_5005450 = 0x5005450; +D_500C3A0 = 0x500C3A0; +D_5013550 = 0x5013550; +D_50153A0 = 0x50153A0; +D_5015490 = 0x5015490; +D_5015580 = 0x5015580; +D_50157F0 = 0x50157F0; +D_5017200 = 0x5017200; +D_50177F0 = 0x50177F0; +D_50178E0 = 0x50178E0; +D_50179D0 = 0x50179D0; +D_5017AC0 = 0x5017AC0; +D_5017BB0 = 0x5017BB0; +D_5017CA0 = 0x5017CA0; +D_5017D90 = 0x5017D90; +D_50183D0 = 0x50183D0; +D_6000D80 = 0x6000D80; +D_6001110 = 0x6001110; +D_6001574 = 0x6001574; +D_6001840 = 0x6001840; +D_60018A0 = 0x60018A0; +D_6001920 = 0x6001920; +D_6001CA0 = 0x6001CA0; +D_6001F40 = 0x6001F40; +D_6001F80 = 0x6001F80; +D_6002040 = 0x6002040; +D_6002100 = 0x6002100; +D_60021A0 = 0x60021A0; +D_60023B0 = 0x60023B0; +D_6002440 = 0x6002440; +D_6002480 = 0x6002480; +D_60024C0 = 0x60024C0; +D_6002500 = 0x6002500; +D_60027B0 = 0x60027B0; +D_6002920 = 0x6002920; +D_6002990 = 0x6002990; +D_6002A30 = 0x6002A30; +D_6002AF0 = 0x6002AF0; +D_6002E80 = 0x6002E80; +D_6002F24 = 0x6002F24; +D_60030A8 = 0x60030A8; +D_60030B8 = 0x60030B8; +D_6003270 = 0x6003270; +D_60032E0 = 0x60032E0; +D_6003304 = 0x6003304; +D_6003420 = 0x6003420; +D_6003640 = 0x6003640; +D_60036A0 = 0x60036A0; +D_6003720 = 0x6003720; +D_6003760 = 0x6003760; +D_6003820 = 0x6003820; +D_6003960 = 0x6003960; +D_60039A0 = 0x60039A0; +D_60039C0 = 0x60039C0; +D_60039F0 = 0x60039F0; +D_6003BE0 = 0x6003BE0; +D_6003DE0 = 0x6003DE0; +D_6003F20 = 0x6003F20; +D_6004060 = 0x6004060; +D_6004340 = 0x6004340; +D_60043C0 = 0x60043C0; +D_6004428 = 0x6004428; +D_6004440 = 0x6004440; +D_6004450 = 0x6004450; +D_6004488 = 0x6004488; +D_60044A0 = 0x60044A0; +D_60045A4 = 0x60045A4; +D_6004A10 = 0x6004A10; +D_6004E30 = 0x6004E30; +D_6005060 = 0x6005060; +D_6005150 = 0x6005150; +D_6005260 = 0x6005260; +D_6005410 = 0x6005410; +D_6005478 = 0x6005478; +D_6005530 = 0x6005530; +D_6005550 = 0x6005550; +D_6005650 = 0x6005650; +D_60056C0 = 0x60056C0; +D_6005830 = 0x6005830; +D_6005D00 = 0x6005D00; +D_6005F80 = 0x6005F80; +D_60060C0 = 0x60060C0; +D_6006180 = 0x6006180; +D_6006270 = 0x6006270; +D_60063E4 = 0x60063E4; +D_6006480 = 0x6006480; +D_6006510 = 0x6006510; +D_6006900 = 0x6006900; +D_6006960 = 0x6006960; +D_6006ECC = 0x6006ECC; +D_60070A0 = 0x60070A0; +D_60070B8 = 0x60070B8; +D_6007570 = 0x6007570; +D_60077D0 = 0x60077D0; +D_600781C = 0x600781C; +D_60078F0 = 0x60078F0; +D_6007BD0 = 0x6007BD0; +D_6007DF0 = 0x6007DF0; +D_6007E24 = 0x6007E24; +D_6007E40 = 0x6007E40; +D_6007E44 = 0x6007E44; +D_6007E5C = 0x6007E5C; +D_6007E78 = 0x6007E78; +D_6007E94 = 0x6007E94; +D_6007EB0 = 0x6007EB0; +D_6007ECC = 0x6007ECC; +D_6007EE8 = 0x6007EE8; +D_6007F04 = 0x6007F04; +D_6007F20 = 0x6007F20; +D_6007F30 = 0x6007F30; +D_6007F60 = 0x6007F60; +D_60080F0 = 0x60080F0; +D_600810C = 0x600810C; +D_6008128 = 0x6008128; +D_6008940 = 0x6008940; +D_60089C0 = 0x60089C0; +D_6008B60 = 0x6008B60; +D_6008BA0 = 0x6008BA0; +D_60090A0 = 0x60090A0; +D_6009370 = 0x6009370; +D_6009378 = 0x6009378; +D_6009400 = 0x6009400; +D_6009680 = 0x6009680; +D_6009750 = 0x6009750; +D_60097C0 = 0x60097C0; +D_6009820 = 0x6009820; +D_60098F0 = 0x60098F0; +D_6009958 = 0x6009958; +D_60099C0 = 0x60099C0; +D_6009A30 = 0x6009A30; +D_6009A58 = 0x6009A58; +D_6009D14 = 0x6009D14; +D_6009E40 = 0x6009E40; +D_6009E78 = 0x6009E78; +D_6009F60 = 0x6009F60; +D_6009FB4 = 0x6009FB4; +D_600A000 = 0x600A000; +D_600A120 = 0x600A120; +D_600A310 = 0x600A310; +D_600A430 = 0x600A430; +D_600A850 = 0x600A850; +D_600A890 = 0x600A890; +D_600A8C0 = 0x600A8C0; +D_600ACB0 = 0x600ACB0; +D_600AD10 = 0x600AD10; +D_600AE80 = 0x600AE80; +D_600B0B8 = 0x600B0B8; +D_600B0D8 = 0x600B0D8; +D_600B3B4 = 0x600B3B4; +D_600B4B0 = 0x600B4B0; +D_600B5A0 = 0x600B5A0; +D_600B5F8 = 0x600B5F8; +D_600B710 = 0x600B710; +D_600BAD0 = 0x600BAD0; +D_600BD14 = 0x600BD14; +D_600C040 = 0x600C040; +D_600C110 = 0x600C110; +D_600C3D0 = 0x600C3D0; +D_600C450 = 0x600C450; +D_600C6B0 = 0x600C6B0; +D_600C990 = 0x600C990; +D_600CC90 = 0x600CC90; +D_600CCBC = 0x600CCBC; +D_600CCE0 = 0x600CCE0; +D_600CD60 = 0x600CD60; +D_600CF30 = 0x600CF30; +D_600D180 = 0x600D180; +D_600D1F0 = 0x600D1F0; +D_600D210 = 0x600D210; +D_600D378 = 0x600D378; +D_600D588 = 0x600D588; +D_600D5F4 = 0x600D5F4; +D_600D750 = 0x600D750; +D_600D7A0 = 0x600D7A0; +D_600D7B0 = 0x600D7B0; +D_600D7FC = 0x600D7FC; +D_600D820 = 0x600D820; +D_600D970 = 0x600D970; +D_600DAB0 = 0x600DAB0; +D_600DDC0 = 0x600DDC0; +D_600DF3C = 0x600DF3C; +D_600DFB0 = 0x600DFB0; +D_600E120 = 0x600E120; +D_600E248 = 0x600E248; +D_600E380 = 0x600E380; +D_600E3E0 = 0x600E3E0; +D_600E450 = 0x600E450; +D_600E470 = 0x600E470; +D_600E610 = 0x600E610; +D_600E758 = 0x600E758; +D_600E990 = 0x600E990; +D_600E9A0 = 0x600E9A0; +D_600EB1C = 0x600EB1C; +D_600EE24 = 0x600EE24; +D_600EFD0 = 0x600EFD0; +D_600F1D8 = 0x600F1D8; +D_600F280 = 0x600F280; +D_600F470 = 0x600F470; +D_600F550 = 0x600F550; +D_600F590 = 0x600F590; +D_600F6A4 = 0x600F6A4; +D_600F750 = 0x600F750; +D_600F940 = 0x600F940; +D_600F980 = 0x600F980; +D_600F9A0 = 0x600F9A0; +D_600FA60 = 0x600FA60; +D_600FA80 = 0x600FA80; +D_600FBF0 = 0x600FBF0; +D_600FEB0 = 0x600FEB0; +D_600FED0 = 0x600FED0; +D_6010080 = 0x6010080; +D_60101EC = 0x60101EC; +D_60102A4 = 0x60102A4; +D_60103D8 = 0x60103D8; +D_6010510 = 0x6010510; +D_60105A0 = 0x60105A0; +D_601062C = 0x601062C; +D_6010698 = 0x6010698; +D_6010764 = 0x6010764; +D_6010970 = 0x6010970; +D_6010980 = 0x6010980; +D_6010B90 = 0x6010B90; +D_6010BC0 = 0x6010BC0; +D_6010CF8 = 0x6010CF8; +D_60114B0 = 0x60114B0; +D_6011620 = 0x6011620; +D_6011690 = 0x6011690; +D_60117B0 = 0x60117B0; +D_6011890 = 0x6011890; +D_6011B80 = 0x6011B80; +D_6011C50 = 0x6011C50; +D_6011E70 = 0x6011E70; +D_60122F8 = 0x60122F8; +D_6012384 = 0x6012384; +D_6012424 = 0x6012424; +D_6012430 = 0x6012430; +D_6012508 = 0x6012508; +D_6012604 = 0x6012604; +D_60126B0 = 0x60126B0; +D_60126E0 = 0x60126E0; +D_60127F0 = 0x60127F0; +D_60128EC = 0x60128EC; +D_6012930 = 0x6012930; +D_6012A98 = 0x6012A98; +D_6012BC0 = 0x6012BC0; +D_6012C04 = 0x6012C04; +D_6012E64 = 0x6012E64; +D_60130E0 = 0x60130E0; +D_60130E8 = 0x60130E8; +D_60132B0 = 0x60132B0; +D_601349C = 0x601349C; +D_6013760 = 0x6013760; +D_6013EF0 = 0x6013EF0; +D_6014000 = 0x6014000; +D_6014070 = 0x6014070; +D_601415C = 0x601415C; +D_60141E0 = 0x60141E0; +D_601425C = 0x601425C; +D_6014280 = 0x6014280; +D_6014380 = 0x6014380; +D_60143EC = 0x60143EC; +D_60146E0 = 0x60146E0; +D_6014878 = 0x6014878; +D_6014900 = 0x6014900; +D_60149EC = 0x60149EC; +D_6014AC0 = 0x6014AC0; +D_6014EC8 = 0x6014EC8; +D_6014F20 = 0x6014F20; +D_6014F30 = 0x6014F30; +D_6014F94 = 0x6014F94; +D_6014FB0 = 0x6014FB0; +D_6015080 = 0x6015080; +D_60150C0 = 0x60150C0; +D_6015158 = 0x6015158; +D_6015340 = 0x6015340; +D_6015410 = 0x6015410; +D_6015520 = 0x6015520; +D_6015A60 = 0x6015A60; +D_6015B20 = 0x6015B20; +D_6015BA8 = 0x6015BA8; +D_6015CB0 = 0x6015CB0; +D_6015D94 = 0x6015D94; +D_6015E54 = 0x6015E54; +D_6015F20 = 0x6015F20; +D_6016110 = 0x6016110; +D_60169A4 = 0x60169A4; +D_6017030 = 0x6017030; +D_6017610 = 0x6017610; +D_6017850 = 0x6017850; +D_6017880 = 0x6017880; +D_60178C0 = 0x60178C0; +D_60179D0 = 0x60179D0; +D_6017BF0 = 0x6017BF0; +D_6017ED0 = 0x6017ED0; +D_6017F08 = 0x6017F08; +D_60180E4 = 0x60180E4; +D_6018480 = 0x6018480; +D_6018500 = 0x6018500; +D_60188B0 = 0x60188B0; +D_6018FEC = 0x6018FEC; +D_6019150 = 0x6019150; +D_6019308 = 0x6019308; +D_6019550 = 0x6019550; +D_6019708 = 0x6019708; +D_6019B08 = 0x6019B08; +D_6019BD4 = 0x6019BD4; +D_6019BE0 = 0x6019BE0; +D_6019CC8 = 0x6019CC8; +D_6019DC8 = 0x6019DC8; +D_6019DE0 = 0x6019DE0; +D_6019F60 = 0x6019F60; +D_601A010 = 0x601A010; +D_601A150 = 0x601A150; +D_601A23C = 0x601A23C; +D_601A260 = 0x601A260; +D_601A280 = 0x601A280; +D_601A310 = 0x601A310; +D_601A334 = 0x601A334; +D_601A540 = 0x601A540; +D_601A590 = 0x601A590; +D_601A6F0 = 0x601A6F0; +D_601A910 = 0x601A910; +D_601AF30 = 0x601AF30; +D_601B0D0 = 0x601B0D0; +D_601B1EC = 0x601B1EC; +D_601B338 = 0x601B338; +D_601B550 = 0x601B550; +D_601B56C = 0x601B56C; +D_601B6E0 = 0x601B6E0; +D_601BA18 = 0x601BA18; +D_601BA80 = 0x601BA80; +D_601BAB0 = 0x601BAB0; +D_601BAC0 = 0x601BAC0; +D_601BB08 = 0x601BB08; +D_601BE50 = 0x601BE50; +D_601BF40 = 0x601BF40; +D_601C4C0 = 0x601C4C0; +D_601C610 = 0x601C610; +D_601C648 = 0x601C648; +D_601C714 = 0x601C714; +D_601C770 = 0x601C770; +D_601CB10 = 0x601CB10; +D_601CBB8 = 0x601CBB8; +D_601CC50 = 0x601CC50; +D_601CC60 = 0x601CC60; +D_601CD00 = 0x601CD00; +D_601CD84 = 0x601CD84; +D_601CE10 = 0x601CE10; +D_601D1C0 = 0x601D1C0; +D_601D240 = 0x601D240; +D_601D380 = 0x601D380; +D_601D454 = 0x601D454; +D_601D4E0 = 0x601D4E0; +D_601D6D0 = 0x601D6D0; +D_601D734 = 0x601D734; +D_601D770 = 0x601D770; +D_601D8C0 = 0x601D8C0; +D_601DD30 = 0x601DD30; +D_601DF60 = 0x601DF60; +D_601E190 = 0x601E190; +D_601E350 = 0x601E350; +D_601E4C0 = 0x601E4C0; +D_601E630 = 0x601E630; +D_601E810 = 0x601E810; +D_601E8E0 = 0x601E8E0; +D_601E8F0 = 0x601E8F0; +D_601ECB0 = 0x601ECB0; +D_601ED48 = 0x601ED48; +D_601EE80 = 0x601EE80; +D_601F280 = 0x601F280; +D_601F648 = 0x601F648; +D_601F6F8 = 0x601F6F8; +D_601F844 = 0x601F844; +D_601FF44 = 0x601FF44; +D_6020050 = 0x6020050; +D_60204B0 = 0x60204B0; +D_6020620 = 0x6020620; +D_6020EE8 = 0x6020EE8; +D_6020F70 = 0x6020F70; +D_602107C = 0x602107C; +D_6021474 = 0x6021474; +D_60214D0 = 0x60214D0; +D_6021520 = 0x6021520; +D_6021600 = 0x6021600; +D_60216FC = 0x60216FC; +D_6021730 = 0x6021730; +D_60217BC = 0x60217BC; +D_60217C4 = 0x60217C4; +D_6021890 = 0x6021890; +D_6021930 = 0x6021930; +D_6021AC0 = 0x6021AC0; +D_6021D48 = 0x6021D48; +D_6021E00 = 0x6021E00; +D_6021E90 = 0x6021E90; +D_6022090 = 0x6022090; +D_60222E0 = 0x60222E0; +D_60225A0 = 0x60225A0; +D_60225C0 = 0x60225C0; +D_60226C0 = 0x60226C0; +D_6022AAC = 0x6022AAC; +D_6022B78 = 0x6022B78; +D_6022EF0 = 0x6022EF0; +D_6022FB0 = 0x6022FB0; +D_60232C0 = 0x60232C0; +D_6023320 = 0x6023320; +D_6023504 = 0x6023504; +D_60236BC = 0x60236BC; +D_6023788 = 0x6023788; +D_6023D04 = 0x6023D04; +D_6023FA0 = 0x6023FA0; +D_6024210 = 0x6024210; +D_602439C = 0x602439C; +D_60246C0 = 0x60246C0; +D_6024880 = 0x6024880; +D_6024910 = 0x6024910; +D_60249F0 = 0x60249F0; +D_6024AD0 = 0x6024AD0; +D_6024CB0 = 0x6024CB0; +D_6024D70 = 0x6024D70; +D_6024E90 = 0x6024E90; +D_60254E0 = 0x60254E0; +D_6025640 = 0x6025640; +D_60256E8 = 0x60256E8; +D_6025730 = 0x6025730; +D_6025848 = 0x6025848; +D_6025950 = 0x6025950; +D_6025A10 = 0x6025A10; +D_6025BBC = 0x6025BBC; +D_6025E20 = 0x6025E20; +D_6025E90 = 0x6025E90; +D_6026150 = 0x6026150; +D_6026160 = 0x6026160; +D_60261E0 = 0x60261E0; +D_6026980 = 0x6026980; +D_6026B30 = 0x6026B30; +D_6026B7C = 0x6026B7C; +D_6026E88 = 0x6026E88; +D_6027080 = 0x6027080; +D_60271D0 = 0x60271D0; +D_6027230 = 0x6027230; +D_602753C = 0x602753C; +D_6027660 = 0x6027660; +D_6027694 = 0x6027694; +D_60278A0 = 0x60278A0; +D_6027A60 = 0x6027A60; +D_6027A70 = 0x6027A70; +D_6027C70 = 0x6027C70; +D_6027D10 = 0x6027D10; +D_6027FA0 = 0x6027FA0; +D_6028160 = 0x6028160; +D_602826C = 0x602826C; +D_602846C = 0x602846C; +D_6028D20 = 0x6028D20; +D_6028EA0 = 0x6028EA0; +D_6028EC0 = 0x6028EC0; +D_60297E0 = 0x60297E0; +D_60298EC = 0x60298EC; +D_60298F0 = 0x60298F0; +D_6029DE0 = 0x6029DE0; +D_6029DF4 = 0x6029DF4; +D_6029EC4 = 0x6029EC4; +D_6029F18 = 0x6029F18; +D_6029FB0 = 0x6029FB0; +D_602A0B0 = 0x602A0B0; +D_602A200 = 0x602A200; +D_602A370 = 0x602A370; +D_602A39C = 0x602A39C; +D_602A5E0 = 0x602A5E0; +D_602A970 = 0x602A970; +D_602AC28 = 0x602AC28; +D_602ACB0 = 0x602ACB0; +D_602AD60 = 0x602AD60; +D_602AF50 = 0x602AF50; +D_602AFD0 = 0x602AFD0; +D_602B0A8 = 0x602B0A8; +D_602B1F4 = 0x602B1F4; +D_602B3AC = 0x602B3AC; +D_602B49C = 0x602B49C; +D_602B5C8 = 0x602B5C8; +D_602B6B8 = 0x602B6B8; +D_602B6D0 = 0x602B6D0; +D_602B750 = 0x602B750; +D_602BC40 = 0x602BC40; +D_602BD50 = 0x602BD50; +D_602BF50 = 0x602BF50; +D_602C040 = 0x602C040; +D_602C0A0 = 0x602C0A0; +D_602C584 = 0x602C584; +D_602C5FC = 0x602C5FC; +D_602C6C0 = 0x602C6C0; +D_602C6C8 = 0x602C6C8; +D_602C7C8 = 0x602C7C8; +D_602C7F0 = 0x602C7F0; +D_602C850 = 0x602C850; +D_602C858 = 0x602C858; +D_602C9BC = 0x602C9BC; +D_602CAC0 = 0x602CAC0; +D_602CB18 = 0x602CB18; +D_602D250 = 0x602D250; +D_602D480 = 0x602D480; +D_602D798 = 0x602D798; +D_602D858 = 0x602D858; +D_602D9E4 = 0x602D9E4; +D_602DC28 = 0x602DC28; +D_602DC50 = 0x602DC50; +D_602DD00 = 0x602DD00; +D_602DDD0 = 0x602DDD0; +D_602DECC = 0x602DECC; +D_602DF94 = 0x602DF94; +D_602E180 = 0x602E180; +D_602E220 = 0x602E220; +D_602E620 = 0x602E620; +D_602E730 = 0x602E730; +D_602EF80 = 0x602EF80; +D_602F014 = 0x602F014; +D_602F12C = 0x602F12C; +D_602F5A0 = 0x602F5A0; +D_602F730 = 0x602F730; +D_602F840 = 0x602F840; +D_6030178 = 0x6030178; +D_603026C = 0x603026C; +D_6030A2C = 0x6030A2C; +D_6030CB8 = 0x6030CB8; +D_6030ECC = 0x6030ECC; +D_6031078 = 0x6031078; +D_60311A0 = 0x60311A0; +D_6031348 = 0x6031348; +D_6031558 = 0x6031558; +D_6031724 = 0x6031724; +D_60317A0 = 0x60317A0; +D_60317CC = 0x60317CC; +D_60317E8 = 0x60317E8; +D_603182C = 0x603182C; +D_6031840 = 0x6031840; +D_6031BF4 = 0x6031BF4; +D_6031F3C = 0x6031F3C; +D_6031F74 = 0x6031F74; +D_6031FAC = 0x6031FAC; +D_603201C = 0x603201C; +D_60320B0 = 0x60320B0; +D_6032374 = 0x6032374; +D_6032460 = 0x6032460; +D_6032480 = 0x6032480; +D_6032820 = 0x6032820; +D_6032B00 = 0x6032B00; +D_6032B90 = 0x6032B90; +D_6032BE8 = 0x6032BE8; +D_6032C10 = 0x6032C10; +D_6032CF0 = 0x6032CF0; +D_6032E90 = 0x6032E90; +D_60331B0 = 0x60331B0; +D_6033408 = 0x6033408; +D_60334E8 = 0x60334E8; +D_6033590 = 0x6033590; +D_6033630 = 0x6033630; +D_603373C = 0x603373C; +D_6033848 = 0x6033848; +D_60339AC = 0x60339AC; +D_6033E30 = 0x6033E30; +D_6033EF8 = 0x6033EF8; +D_6034540 = 0x6034540; +D_6034740 = 0x6034740; +D_6034B80 = 0x6034B80; +D_603513C = 0x603513C; +D_60351A0 = 0x60351A0; +D_6035204 = 0x6035204; +D_6035288 = 0x6035288; +D_60352FC = 0x60352FC; +D_6035380 = 0x6035380; +D_60353E4 = 0x60353E4; +D_6036710 = 0x6036710; +D_6037920 = 0x6037920; +D_6037B38 = 0x6037B38; +D_6037C8C = 0x6037C8C; +D_6037D70 = 0x6037D70; +D_6037DE0 = 0x6037DE0; +D_6037E6C = 0x6037E6C; +D_6037F30 = 0x6037F30; +D_6037F54 = 0x6037F54; +D_6038290 = 0x6038290; +D_6038328 = 0x6038328; +D_603838C = 0x603838C; +D_60383C0 = 0x60383C0; +D_60383F0 = 0x60383F0; +D_6038454 = 0x6038454; +D_60384B8 = 0x60384B8; +D_603851C = 0x603851C; +D_6038850 = 0x6038850; +D_603894C = 0x603894C; +D_60389E0 = 0x60389E0; +D_6038C10 = 0x6038C10; +D_6038C3C = 0x6038C3C; +D_6038CD8 = 0x6038CD8; +D_603A698 = 0x603A698; +D_603C870 = 0x603C870; +D_603CBF4 = 0x603CBF4; +D_603F568 = 0x603F568; +D_60402C8 = 0x60402C8; +D_6040344 = 0x6040344; +D_60404A4 = 0x60404A4; +D_60405D0 = 0x60405D0; +D_60406B8 = 0x60406B8; +D_60408D0 = 0x60408D0; +D_6040A70 = 0x6040A70; +D_6041DCC = 0x6041DCC; +D_60429E0 = 0x60429E0; +D_604380C = 0x604380C; +D_6044768 = 0x6044768; +D_60461E0 = 0x60461E0; +D_604F560 = 0x604F560; +D_7000490 = 0x7000490; +D_7000B50 = 0x7000B50; +D_7000D30 = 0x7000D30; +D_7001540 = 0x7001540; +D_7001F80 = 0x7001F80; +D_7002120 = 0x7002120; +D_7003770 = 0x7003770; +D_7003990 = 0x7003990; +D_7003EE8 = 0x7003EE8; +D_7004240 = 0x7004240; +D_7005300 = 0x7005300; +D_7007CC4 = 0x7007CC4; +D_7007E90 = 0x7007E90; +D_7008474 = 0x7008474; +D_70084CC = 0x70084CC; +D_7008630 = 0x7008630; +D_7008734 = 0x7008734; +D_700883C = 0x700883C; +D_7008850 = 0x7008850; +D_70096EC = 0x70096EC; +D_7009A80 = 0x7009A80; +D_7009E30 = 0x7009E30; +D_700A110 = 0x700A110; +D_700AA10 = 0x700AA10; +D_700ADE0 = 0x700ADE0; +D_700B260 = 0x700B260; +D_700BE90 = 0x700BE90; +D_700C620 = 0x700C620; +D_700C8B0 = 0x700C8B0; +D_700CEC0 = 0x700CEC0; +D_700D010 = 0x700D010; +D_700D050 = 0x700D050; +D_700D9B0 = 0x700D9B0; +D_700DA50 = 0x700DA50; +D_700DB68 = 0x700DB68; +D_700DDD8 = 0x700DDD8; +D_700DE64 = 0x700DE64; +D_700DE80 = 0x700DE80; +D_700DFF4 = 0x700DFF4; +D_700E060 = 0x700E060; +D_700E244 = 0x700E244; +D_700E9E0 = 0x700E9E0; +D_700EA34 = 0x700EA34; +D_700EA38 = 0x700EA38; +D_700EC00 = 0x700EC00; +D_700F240 = 0x700F240; +D_700F320 = 0x700F320; +D_700F8F0 = 0x700F8F0; +D_7010970 = 0x7010970; +D_7010E10 = 0x7010E10; +D_7010EE0 = 0x7010EE0; +D_7010F00 = 0x7010F00; +D_7010FD0 = 0x7010FD0; +D_7010FF0 = 0x7010FF0; +D_70110C0 = 0x70110C0; +D_70110E0 = 0x70110E0; +D_70111B0 = 0x70111B0; +D_8000100 = 0x8000100; +D_8000180 = 0x8000180; +D_8000708 = 0x8000708; +D_8000D80 = 0x8000D80; +D_8000D90 = 0x8000D90; +D_8000FC0 = 0x8000FC0; +D_80010C0 = 0x80010C0; +D_8001100 = 0x8001100; +D_8001150 = 0x8001150; +D_8001170 = 0x8001170; +D_80011C8 = 0x80011C8; +D_8001290 = 0x8001290; +D_80012D8 = 0x80012D8; +D_8001300 = 0x8001300; +D_8001348 = 0x8001348; +D_8002F30 = 0x8002F30; +D_80037D0 = 0x80037D0; +D_8008FE8 = 0x8008FE8; +D_8025080 = 0x8025080; +D_9002CF0 = 0x9002CF0; +D_9003330 = 0x9003330; +D_9003890 = 0x9003890; +D_9003DF0 = 0x9003DF0; +D_9004288 = 0x9004288; +D_900D098 = 0x900D098; +D_900D164 = 0x900D164; +D_900D180 = 0x900D180; +D_900DF20 = 0x900DF20; +D_900FC4C = 0x900FC4C; +D_9010FD0 = 0x9010FD0; +D_9011200 = 0x9011200; +D_9013C20 = 0x9013C20; +D_901C0F4 = 0x901C0F4; +D_901DA50 = 0x901DA50; +D_9023290 = 0x9023290; +D_90234D0 = 0x90234D0; +D_A0002BC = 0xA0002BC; +D_A00047C = 0xA00047C; +D_A000568 = 0xA000568; +D_A000858 = 0xA000858; +D_A000934 = 0xA000934; +D_A000D50 = 0xA000D50; +D_A000EDC = 0xA000EDC; +D_A001A70 = 0xA001A70; +D_A009990 = 0xA009990; +D_C00308C = 0xC00308C; +D_C003654 = 0xC003654; +D_C003B08 = 0xC003B08; +D_C003B20 = 0xC003B20; +D_C003F00 = 0xC003F00; +D_C0053D0 = 0xC0053D0; +D_C005860 = 0xC005860; +D_C007F08 = 0xC007F08; +D_C00EE48 = 0xC00EE48; +D_C00F598 = 0xC00F598; +D_C016740 = 0xC016740; +D_C018050 = 0xC018050; +D_C018430 = 0xC018430; +D_C018440 = 0xC018440; +D_C018598 = 0xC018598; +D_C019BC4 = 0xC019BC4; +D_C01DC3C = 0xC01DC3C; +D_C023520 = 0xC023520; +D_C024B54 = 0xC024B54; +D_C0250D0 = 0xC0250D0; +D_C026C00 = 0xC026C00; +D_C02AF74 = 0xC02AF74; +D_C02F494 = 0xC02F494; +D_C02FDA0 = 0xC02FDA0; +D_C031244 = 0xC031244; +D_C034780 = 0xC034780; +D_C034D98 = 0xC034D98; +D_C0366A4 = 0xC0366A4; +D_C0366CC = 0xC0366CC; +D_C037310 = 0xC037310; +D_C037B6C = 0xC037B6C; +D_C03833C = 0xC03833C; +D_C038E3C = 0xC038E3C; +D_C039AC4 = 0xC039AC4; +D_C039CCC = 0xC039CCC; +D_C039F24 = 0xC039F24; +D_C039FE8 = 0xC039FE8; +D_C03A208 = 0xC03A208; +D_C03A290 = 0xC03A290; +D_C03B290 = 0xC03B290; +D_D000170 = 0xD000170; +D_D001090 = 0xD001090; +D_D001FB0 = 0xD001FB0; +D_D002ED0 = 0xD002ED0; +D_D003DF0 = 0xD003DF0; +D_D004D10 = 0xD004D10; +D_D005C30 = 0xD005C30; +D_D006B50 = 0xD006B50; +D_D007A70 = 0xD007A70; +D_D008990 = 0xD008990; +D_D0098B0 = 0xD0098B0; +D_D009A40 = 0xD009A40; +D_D00B880 = 0xD00B880; +D_E000000 = 0xE000000; +D_E003AB0 = 0xE003AB0; +D_E00DFB0 = 0xE00DFB0; +D_E00E100 = 0xE00E100; +D_E00F020 = 0xE00F020; +D_E00FF40 = 0xE00FF40; +D_E010E60 = 0xE010E60; +D_F000000 = 0xF000000; +D_F000F20 = 0xF000F20; +D_F001E40 = 0xF001E40; +D_F002500 = 0xF002500; +D_F002D00 = 0xF002D00; +D_F002D60 = 0xF002D60; +D_F003500 = 0xF003500; +D_F003C80 = 0xF003C80; +D_F003D00 = 0xF003D00; +D_F004500 = 0xF004500; +D_F004BA0 = 0xF004BA0; +D_F005AC0 = 0xF005AC0; +D_F0069E0 = 0xF0069E0; +D_F007900 = 0xF007900; +D_F008820 = 0xF008820; +D_F009740 = 0xF009740; +D_F00A660 = 0xF00A660; +D_F00B580 = 0xF00B580; +D_F00C4A0 = 0xF00C4A0; +D_F00D3C0 = 0xF00D3C0; +D_F00E2E0 = 0xF00E2E0; +D_F00F200 = 0xF00F200; +D_F0103D0 = 0xF0103D0; +D_F014180 = 0xF014180; +D_F014310 = 0xF014310; + +D_8018751C = 0x8018751C; +D_80187ED8 = 0x80187ED8; +D_801897B4 = 0x801897B4; +D_8019DA68 = 0x8019DA68; +D_801A27E0 = 0x801A27E0; +D_801A3CC0 = 0x801A3CC0; +D_801AB968 = 0x801AB968; +D_801AB970 = 0x801AB970; +D_801AB978 = 0x801AB978; +D_801AB980 = 0x801AB980; +D_801AB988 = 0x801AB988; +D_801BAE4C = 0x801BAE4C; +D_801BAFC4 = 0x801BAFC4; +D_801BB048 = 0x801BB048; +D_801BB0DC = 0x801BB0DC; +D_801BDC28 = 0x801BDC28; +D_801C1C88 = 0x801C1C88; +D_801C1C90 = 0x801C1C90; +D_801C1C94 = 0x801C1C94; +D_801C1CAC = 0x801C1CAC; +D_801C1CB8 = 0x801C1CB8; +D_801C1CBC = 0x801C1CBC; +D_801C1CD4 = 0x801C1CD4; +D_801C1CDC = 0x801C1CDC; +D_801C1D32 = 0x801C1D32; +D_801C7BE8 = 0x801C7BE8; +D_801D1BC8 = 0x801D1BC8; +D_801D1BD0 = 0x801D1BD0; +D_801D1BD4 = 0x801D1BD4; +D_801D1BD8 = 0x801D1BD8; +D_801D1BDC = 0x801D1BDC; + +func_80025E38 = 0x80025E38; +func_800C227C = 0x800C227C; +func_800C2284 = 0x800C2284; +func_8018B020 = 0x8018B020; +func_8018B030 = 0x8018B030; +func_8018B19C = 0x8018B19C; +func_8018B254 = 0x8018B254; +func_8018B3A8 = 0x8018B3A8; +func_8018B3D8 = 0x8018B3D8; +func_8018B460 = 0x8018B460; +func_8018B608 = 0x8018B608; +func_8018BDC8 = 0x8018BDC8; +func_8018C3F4 = 0x8018C3F4; +func_8018C53C = 0x8018C53C; +func_8018CA10 = 0x8018CA10; +func_8018CC00 = 0x8018CC00; +func_8018CD14 = 0x8018CD14; +func_8018D660 = 0x8018D660; +func_8018E458 = 0x8018E458; +func_8018E5D8 = 0x8018E5D8; +func_8018E8A4 = 0x8018E8A4; +func_8018EB6C = 0x8018EB6C; +func_8018F200 = 0x8018F200; +func_8018F44C = 0x8018F44C; +func_8018F494 = 0x8018F494; +func_8018F8AC = 0x8018F8AC; +func_8018F934 = 0x8018F934; +func_8018FA90 = 0x8018FA90; +func_8018FBB8 = 0x8018FBB8; +func_8018FE64 = 0x8018FE64; +func_801907C8 = 0x801907C8; +func_8019085C = 0x8019085C; +func_80190C40 = 0x80190C40; +func_80191534 = 0x80191534; +func_80191A50 = 0x80191A50; +func_80191B88 = 0x80191B88; +func_80191E90 = 0x80191E90; +func_80191EAC = 0x80191EAC; +func_801920C8 = 0x801920C8; +func_8019284C = 0x8019284C; +func_80192890 = 0x80192890; +func_80192998 = 0x80192998; +func_80192AD0 = 0x80192AD0; +func_80192BB8 = 0x80192BB8; +func_801932F4 = 0x801932F4; +func_8019337C = 0x8019337C; +func_80193528 = 0x80193528; +func_80193BCC = 0x80193BCC; +func_80193F00 = 0x80193F00; +func_801949D8 = 0x801949D8; +func_80194BE0 = 0x80194BE0; +func_80195074 = 0x80195074; +func_80195688 = 0x80195688; +func_801958F8 = 0x801958F8; +func_80195C84 = 0x80195C84; +func_80195F7C = 0x80195F7C; +func_80196720 = 0x80196720; +func_80196840 = 0x80196840; +func_80196914 = 0x80196914; +func_80196D7C = 0x80196D7C; +func_80196E24 = 0x80196E24; +func_8019703C = 0x8019703C; +func_801974FC = 0x801974FC; +func_801976C0 = 0x801976C0; +func_8019771C = 0x8019771C; +func_801981F4 = 0x801981F4; +func_801998F4 = 0x801998F4; +func_80199C5C = 0x80199C5C; +func_80199DC4 = 0x80199DC4; +func_8019A3FC = 0x8019A3FC; +func_8019A68C = 0x8019A68C; +func_8019A81C = 0x8019A81C; +func_8019ACBC = 0x8019ACBC; +func_8019B744 = 0x8019B744; +func_8019B930 = 0x8019B930; +func_8019BD70 = 0x8019BD70; +func_8019BFE8 = 0x8019BFE8; +func_8019BFF4 = 0x8019BFF4; +func_8019C0AC = 0x8019C0AC; +func_8019C318 = 0x8019C318; +func_8019C340 = 0x8019C340; +func_8019C360 = 0x8019C360; +func_8019C6B0 = 0x8019C6B0; +func_8019CB88 = 0x8019CB88; +func_8019CEFC = 0x8019CEFC; +func_8019D2D0 = 0x8019D2D0; +func_8019D3D0 = 0x8019D3D0; +func_8019D630 = 0x8019D630; +func_8019DA3C = 0x8019DA3C; +func_8019E548 = 0x8019E548; +func_8019EC80 = 0x8019EC80; +func_8019F2A0 = 0x8019F2A0; +func_8019F408 = 0x8019F408; +func_8019FC90 = 0x8019FC90; +func_801A01F8 = 0x801A01F8; +func_801A0AF0 = 0x801A0AF0; +func_801A0EB8 = 0x801A0EB8; +func_801A1204 = 0x801A1204; +func_801A1680 = 0x801A1680; +func_801A2070 = 0x801A2070; +func_801A2338 = 0x801A2338; +func_801A23C0 = 0x801A23C0; +func_801A2474 = 0x801A2474; +func_801A2898 = 0x801A2898; +func_801A391C = 0x801A391C; +func_801A3ED0 = 0x801A3ED0; +func_801A44DC = 0x801A44DC; +func_801A4B74 = 0x801A4B74; +func_801A6DA0 = 0x801A6DA0; +func_801A7230 = 0x801A7230; +func_801A75F0 = 0x801A75F0; +func_801A76C0 = 0x801A76C0; +func_801A7910 = 0x801A7910; +func_801A8100 = 0x801A8100; +func_801A8598 = 0x801A8598; +func_801A86CC = 0x801A86CC; +func_801A906C = 0x801A906C; +func_801A94E4 = 0x801A94E4; +func_801A98C4 = 0x801A98C4; +func_801A99D0 = 0x801A99D0; +func_801A9B74 = 0x801A9B74; +func_801A9BCC = 0x801A9BCC; +func_801AA078 = 0x801AA078; +func_801AB3C8 = 0x801AB3C8; +func_801AB830 = 0x801AB830; +func_801AC670 = 0x801AC670; +func_801AD2A4 = 0x801AD2A4; +func_801ADC8C = 0x801ADC8C; +func_801AE368 = 0x801AE368; +func_801AE778 = 0x801AE778; +func_801AF430 = 0x801AF430; +func_801AF4C0 = 0x801AF4C0; +func_801AFCF4 = 0x801AFCF4; +func_801B01D4 = 0x801B01D4; +func_801B0328 = 0x801B0328; +func_801B0634 = 0x801B0634; +func_801B08D0 = 0x801B08D0; +func_801B0A3C = 0x801B0A3C; +func_801B0B00 = 0x801B0B00; +func_801B0BC4 = 0x801B0BC4; +func_801B0DA8 = 0x801B0DA8; +func_801B1108 = 0x801B1108; +func_801B1E2C = 0x801B1E2C; +func_801B3374 = 0x801B3374; +func_801B3474 = 0x801B3474; +func_801B4B6C = 0x801B4B6C; +func_801B6314 = 0x801B6314; +func_801B775C = 0x801B775C; +func_801B8B50 = 0x801B8B50; +func_801B92EC = 0x801B92EC; +func_801B9DA4 = 0x801B9DA4; +func_801BA52C = 0x801BA52C; +func_801BA860 = 0x801BA860; +func_801BA8B4 = 0x801BA8B4; +func_801BB550 = 0x801BB550; +func_801BDFDC = 0x801BDFDC; +func_801BECCC = 0x801BECCC; +func_801C1974 = 0x801C1974; +func_801C1A94 = 0x801C1A94; +func_801C1B50 = 0x801C1B50; +func_801C26E0 = 0x801C26E0; diff --git a/linker_scripts/jp/rev0/symbol_addrs.txt b/linker_scripts/jp/rev0/symbol_addrs.txt index 4160dfdf..1cfe2ab6 100644 --- a/linker_scripts/jp/rev0/symbol_addrs.txt +++ b/linker_scripts/jp/rev0/symbol_addrs.txt @@ -1,6 +1,3 @@ -D_80000450 = 0x80000450; -D_80000520 = 0x80000520; -D_80001420 = 0x80001420; func_80002850 = 0x80002850; func_8000292C = 0x8000292C; func_800029B8 = 0x800029B8; @@ -1604,12 +1601,10 @@ func_800C007C = 0x800C007C; func_800C0100 = 0x800C0100; func_800C01D4 = 0x800C01D4; func_800C02E4 = 0x800C02E4; -D_800C0430 = 0x800C0430; D_800C0760 = 0x800C0760; D_800C07B0 = 0x800C07B0; D_800C0BE0 = 0x800C0BE0; D_800C0E00 = 0x800C0E00; -D_800C0F20 = 0x800C0F20; D_800C1720 = 0x800C1720; D_800C1730 = 0x800C1730; D_800C1770 = 0x800C1770; diff --git a/linker_scripts/jp/rev0/symbol_addrs_fix.txt b/linker_scripts/jp/rev0/symbol_addrs_fix.txt index d91222db..042590cb 100644 --- a/linker_scripts/jp/rev0/symbol_addrs_fix.txt +++ b/linker_scripts/jp/rev0/symbol_addrs_fix.txt @@ -35,16 +35,37 @@ D_80170000 = 0x80170000; //ignore:true D_80170001 = 0x80170001; //ignore:true D_80180000 = 0x80180000; //ignore:true D_80180001 = 0x80180001; //ignore:true +D_80180058 = 0x80180058; //ignore:true D_801B0130 = 0x801B0130; //ignore:true D_801C0001 = 0x801C0001; //ignore:true // mirage symbols -D_6000000 = 0x0A000000; //ignore:true -D_7000000 = 0x0A000000; //ignore:true -D_8000000 = 0x0A000000; //ignore:true +D_6000000 = 0x06000000; //ignore:true +D_7000000 = 0x07000000; //ignore:true +D_8000000 = 0x08000000; //ignore:true D_A000000 = 0x0A000000; //ignore:true D_F000000 = 0x0F000000; //ignore:true +// rsp +rspbootTextStart = 0x80000450;//name_end:rspbootTextEnd +aspMainTextStart = 0x80000520;//name_end:aspMainTextEnd +gspF3DEX_fifoTextStart = 0x80001420;//name_end:gspF3DEX_fifoTextEnd +gspF3DEX_fifoDataStart = 0x800C0F20; //name_end:gspF3DEX_fifoDataEnd +aspMainDataStart = 0x800C0430; //name_end:aspMainDataEnd + +// constant for K1 access +D_A0000000 = 0xA0000000;//ignore:true + +// hardcoded addresses in libultra +D_BFF00000 = 0xBFF00000;//ignore:true +D_BFF08000 = 0xBFF08000;//ignore:true +D_BFF08004 = 0xBFF08004;//ignore:true + +// RDB regs used only in exceptasm. Also -2.0f +D_C0000000 = 0xC0000000;//ignore:true +D_C0000008 = 0xC0000008;//ignore:true +D_C000000C = 0xC000000C;//ignore:true + // redundant rodata D_800DB02C = 0x800DB02C; // force_migration:True D_800DB24C = 0x800DB24C; // force_migration:True @@ -65,12 +86,12 @@ D_i5_801B2DE0 = 0x801B2DE0; // force_migration:True segment:ovl_i5 D_i5_801B2DF4 = 0x801B2DF4; // force_migration:True segment:ovl_i5 D_i6_8019E810 = 0x8019E810; // force_migration:True segment:ovl_i6 -// symbol collisions -D_i1_80192958 = 0x80192958; //segment:ovl_i1 // i4 func collision -D_menu_801AE894 = 0x801AE894; // force_migration:True segment:ovl_menu // i5 data collision -jtbl_menu_801AED88 = 0x801AED88; // force_migration:True segment:ovl_menu // i3 func collision -D_ending_8018D5D4 = 0x8018D5D4; // force_migration:True segment:ovl_ending // i6 func collision -D_ending_8018DC28 = 0x8018DC28; // force_migration:True segment:ovl_ending // i6 func collision +// constant for K1 access +D_A0000000 = 0xA0000000;//ignore:true + +// hardcoded address used in sys_rdram +D_A0300000 = 0xA0300000;//ignore:true +D_A4000000 = 0xA4000000;//ignore:true // hidden vars D_800C5118 = 0x800C5118; diff --git a/linker_scripts/jp/rev0/undefined_syms.ld b/linker_scripts/jp/rev0/undefined_syms.ld index 3091640e..1491e6d7 100644 --- a/linker_scripts/jp/rev0/undefined_syms.ld +++ b/linker_scripts/jp/rev0/undefined_syms.ld @@ -243,7 +243,6 @@ D_50070A0 = 0x50070A0; D_5007770 = 0x5007770; D_5008A50 = 0x5008A50; D_500A040 = 0x500A040; -D_6000000 = 0x6000000; D_6000290 = 0x6000290; D_6000320 = 0x6000320; D_6000604 = 0x6000604; @@ -849,7 +848,6 @@ D_60492B0 = 0x60492B0; D_6049B50 = 0x6049B50; D_60565F0 = 0x60565F0; D_6058700 = 0x6058700; -D_7000000 = 0x7000000; D_7001540 = 0x7001540; D_70017F0 = 0x70017F0; D_7001A10 = 0x7001A10; @@ -922,7 +920,6 @@ D_7011DB0 = 0x7011DB0; D_7011EB0 = 0x7011EB0; D_7012B00 = 0x7012B00; D_7012FC0 = 0x7012FC0; -D_8000000 = 0x8000000; D_8000708 = 0x8000708; D_8000D80 = 0x8000D80; D_8000D90 = 0x8000D90; @@ -997,7 +994,6 @@ D_901C0F4 = 0x901C0F4; D_901DA50 = 0x901DA50; D_9023290 = 0x9023290; D_90234D0 = 0x90234D0; -D_A000000 = 0xA000000; D_A0002BC = 0xA0002BC; D_A00047C = 0xA00047C; D_A000568 = 0xA000568; @@ -1067,7 +1063,6 @@ D_E00DF80 = 0xE00DF80; D_E00EEA0 = 0xE00EEA0; D_E00FDC0 = 0xE00FDC0; D_E010CE0 = 0xE010CE0; -D_F000000 = 0xF000000; D_F000800 = 0xF000800; D_F000F20 = 0xF000F20; D_F001000 = 0xF001000; @@ -1091,7 +1086,3 @@ D_F00F200 = 0xF00F200; D_F0103D0 = 0xF0103D0; D_F014180 = 0xF014180; D_F014310 = 0xF014310; - -D_A0000000 = 0xA0000000; -D_A0300000 = 0xA0300000; -D_A4000000 = 0xA4000000; diff --git a/linker_scripts/us/rev1/symbol_addrs.txt b/linker_scripts/us/rev1/symbol_addrs.txt index ba745dd6..3e708ccf 100644 --- a/linker_scripts/us/rev1/symbol_addrs.txt +++ b/linker_scripts/us/rev1/symbol_addrs.txt @@ -29,9 +29,11 @@ D_80180000 = 0x80180000;//ignore:true D_80160000 = 0x80160000;//ignore:true D_800D0000 = 0x800D0000;//ignore:true D_7FFFFFFE = 0x7FFFFFFE;//ignore:true -D_1000000 = 0x01000000;//ignore:true -D_TI_A000000 = 0x0A000000;//ignore:true -D_ENMY_PLANET_4000000 = 0x04000000;//ignore:true +D_1000000 = 0x01000000;//ignore:true + +// mirage symbols +D_A000000 = 0x0A000000;//ignore:true +D_4000000 = 0x04000000;//ignore:true // constant for K1 access D_TI_A0000000 = 0xA0000000;//ignore:true @@ -41,13 +43,14 @@ D_BFF00000 = 0xBFF00000;//ignore:true D_BFF08000 = 0xBFF08000;//ignore:true D_BFF08004 = 0xBFF08004;//ignore:true -// RDB regs used only in exceptasm. Also 2.0f +// RDB regs used only in exceptasm. Also -2.0f D_C0000000 = 0xC0000000;//ignore:true D_C0000008 = 0xC0000008;//ignore:true D_C000000C = 0xC000000C;//ignore:true D_80151650 = 0x80151650; //ignore:true +// dma symbols dma_table_ROM_START = 0xDE480; //defined:true audio_seq_ROM_START = 0xDEA20; //defined:true audio_bank_ROM_START = 0x119710; //defined:true diff --git a/src/dmatable.c b/src/dmatable.c index fbe9e2d0..51a54aa3 100644 --- a/src/dmatable.c +++ b/src/dmatable.c @@ -6,82 +6,68 @@ { NULL, { NULL, NULL }, false } DmaEntry gDmaTable[90] = { - { SEGMENT_ROM_START(makerom), { SEGMENT_ROM_START(makerom), SEGMENT_ROM_END(makerom) }, false }, - { SEGMENT_ROM_START(main), { SEGMENT_ROM_START(main), SEGMENT_ROM_END(main) }, false }, - { SEGMENT_ROM_START(dma_table), { SEGMENT_ROM_START(dma_table), SEGMENT_ROM_END(dma_table) }, false }, - { SEGMENT_ROM_START(audio_seq), { SEGMENT_ROM_START(audio_seq), SEGMENT_ROM_END(audio_seq) }, false }, - { SEGMENT_ROM_START(audio_bank), { SEGMENT_ROM_START(audio_bank), SEGMENT_ROM_END(audio_bank) }, false }, - { SEGMENT_ROM_START(audio_table), { SEGMENT_ROM_START(audio_table), SEGMENT_ROM_END(audio_table) }, false }, - { SEGMENT_ROM_START(ast_common), { SEGMENT_ROM_START(ast_common), SEGMENT_ROM_END(ast_common) }, false }, - { SEGMENT_ROM_START(ast_bg_space), { SEGMENT_ROM_START(ast_bg_space), SEGMENT_ROM_END(ast_bg_space) }, false }, - { SEGMENT_ROM_START(ast_bg_planet), { SEGMENT_ROM_START(ast_bg_planet), SEGMENT_ROM_END(ast_bg_planet) }, false }, - { SEGMENT_ROM_START(ast_arwing), { SEGMENT_ROM_START(ast_arwing), SEGMENT_ROM_END(ast_arwing) }, false }, - { SEGMENT_ROM_START(ast_landmaster), - { SEGMENT_ROM_START(ast_landmaster), SEGMENT_ROM_END(ast_landmaster) }, - false }, - { SEGMENT_ROM_START(ast_blue_marine), - { SEGMENT_ROM_START(ast_blue_marine), SEGMENT_ROM_END(ast_blue_marine) }, - false }, - { SEGMENT_ROM_START(ast_versus), { SEGMENT_ROM_START(ast_versus), SEGMENT_ROM_END(ast_versus) }, false }, - { SEGMENT_ROM_START(ast_enmy_planet), - { SEGMENT_ROM_START(ast_enmy_planet), SEGMENT_ROM_END(ast_enmy_planet) }, - false }, - { SEGMENT_ROM_START(ast_enmy_space), - { SEGMENT_ROM_START(ast_enmy_space), SEGMENT_ROM_END(ast_enmy_space) }, - false }, - { SEGMENT_ROM_START(ast_great_fox), { SEGMENT_ROM_START(ast_great_fox), SEGMENT_ROM_END(ast_great_fox) }, false }, - { SEGMENT_ROM_START(ast_star_wolf), { SEGMENT_ROM_START(ast_star_wolf), SEGMENT_ROM_END(ast_star_wolf) }, false }, - { SEGMENT_ROM_START(ast_allies), { SEGMENT_ROM_START(ast_allies), SEGMENT_ROM_END(ast_allies) }, false }, - { SEGMENT_ROM_START(ast_corneria), { SEGMENT_ROM_START(ast_corneria), SEGMENT_ROM_END(ast_corneria) }, false }, - { SEGMENT_ROM_START(ast_meteo), { SEGMENT_ROM_START(ast_meteo), SEGMENT_ROM_END(ast_meteo) }, false }, - { SEGMENT_ROM_START(ast_titania), { SEGMENT_ROM_START(ast_titania), SEGMENT_ROM_END(ast_titania) }, false }, - { SEGMENT_ROM_START(ast_7_ti_2), { SEGMENT_ROM_START(ast_7_ti_2), SEGMENT_ROM_END(ast_7_ti_2) }, false }, - { SEGMENT_ROM_START(ast_8_ti), { SEGMENT_ROM_START(ast_8_ti), SEGMENT_ROM_END(ast_8_ti) }, false }, - { SEGMENT_ROM_START(ast_9_ti), { SEGMENT_ROM_START(ast_9_ti), SEGMENT_ROM_END(ast_9_ti) }, false }, - { SEGMENT_ROM_START(ast_A_ti), { SEGMENT_ROM_START(ast_A_ti), SEGMENT_ROM_END(ast_A_ti) }, false }, - { SEGMENT_ROM_START(ast_7_ti_1), { SEGMENT_ROM_START(ast_7_ti_1), SEGMENT_ROM_END(ast_7_ti_1) }, false }, - { SEGMENT_ROM_START(ast_sector_x), { SEGMENT_ROM_START(ast_sector_x), SEGMENT_ROM_END(ast_sector_x) }, false }, - { SEGMENT_ROM_START(ast_sector_z), { SEGMENT_ROM_START(ast_sector_z), SEGMENT_ROM_END(ast_sector_z) }, false }, - { SEGMENT_ROM_START(ast_aquas), { SEGMENT_ROM_START(ast_aquas), SEGMENT_ROM_END(ast_aquas) }, false }, - { SEGMENT_ROM_START(ast_area_6), { SEGMENT_ROM_START(ast_area_6), SEGMENT_ROM_END(ast_area_6) }, false }, - { SEGMENT_ROM_START(ast_venom_1), { SEGMENT_ROM_START(ast_venom_1), SEGMENT_ROM_END(ast_venom_1) }, false }, - { SEGMENT_ROM_START(ast_venom_2), { SEGMENT_ROM_START(ast_venom_2), SEGMENT_ROM_END(ast_venom_2) }, false }, - { SEGMENT_ROM_START(ast_ve1_boss), { SEGMENT_ROM_START(ast_ve1_boss), SEGMENT_ROM_END(ast_ve1_boss) }, false }, - { SEGMENT_ROM_START(ast_bolse), { SEGMENT_ROM_START(ast_bolse), SEGMENT_ROM_END(ast_bolse) }, false }, - { SEGMENT_ROM_START(ast_fortuna), { SEGMENT_ROM_START(ast_fortuna), SEGMENT_ROM_END(ast_fortuna) }, false }, - { SEGMENT_ROM_START(ast_sector_y), { SEGMENT_ROM_START(ast_sector_y), SEGMENT_ROM_END(ast_sector_y) }, false }, - { SEGMENT_ROM_START(ast_solar), { SEGMENT_ROM_START(ast_solar), SEGMENT_ROM_END(ast_solar) }, false }, - { SEGMENT_ROM_START(ast_zoness), { SEGMENT_ROM_START(ast_zoness), SEGMENT_ROM_END(ast_zoness) }, false }, - { SEGMENT_ROM_START(ast_katina), { SEGMENT_ROM_START(ast_katina), SEGMENT_ROM_END(ast_katina) }, false }, - { SEGMENT_ROM_START(ast_macbeth), { SEGMENT_ROM_START(ast_macbeth), SEGMENT_ROM_END(ast_macbeth) }, false }, - { SEGMENT_ROM_START(ast_warp_zone), { SEGMENT_ROM_START(ast_warp_zone), SEGMENT_ROM_END(ast_warp_zone) }, false }, - { SEGMENT_ROM_START(ast_title), { SEGMENT_ROM_START(ast_title), SEGMENT_ROM_END(ast_title) }, false }, - { SEGMENT_ROM_START(ast_map), { SEGMENT_ROM_START(ast_map), SEGMENT_ROM_END(ast_map) }, false }, - { SEGMENT_ROM_START(ast_option), { SEGMENT_ROM_START(ast_option), SEGMENT_ROM_END(ast_option) }, false }, - { SEGMENT_ROM_START(ast_vs_menu), { SEGMENT_ROM_START(ast_vs_menu), SEGMENT_ROM_END(ast_vs_menu) }, false }, - { SEGMENT_ROM_START(ast_text), { SEGMENT_ROM_START(ast_text), SEGMENT_ROM_END(ast_text) }, false }, - { SEGMENT_ROM_START(ast_font_3d), { SEGMENT_ROM_START(ast_font_3d), SEGMENT_ROM_END(ast_font_3d) }, false }, - { SEGMENT_ROM_START(ast_andross), { SEGMENT_ROM_START(ast_andross), SEGMENT_ROM_END(ast_andross) }, false }, - { SEGMENT_ROM_START(ast_logo), { SEGMENT_ROM_START(ast_logo), SEGMENT_ROM_END(ast_logo) }, false }, - { SEGMENT_ROM_START(ast_ending), { SEGMENT_ROM_START(ast_ending), SEGMENT_ROM_END(ast_ending) }, false }, - { SEGMENT_ROM_START(ast_ending_award_front), - { SEGMENT_ROM_START(ast_ending_award_front), SEGMENT_ROM_END(ast_ending_award_front) }, - false }, - { SEGMENT_ROM_START(ast_ending_award_back), - { SEGMENT_ROM_START(ast_ending_award_back), SEGMENT_ROM_END(ast_ending_award_back) }, - false }, - { SEGMENT_ROM_START(ast_ending_expert), - { SEGMENT_ROM_START(ast_ending_expert), SEGMENT_ROM_END(ast_ending_expert) }, - false }, - { SEGMENT_ROM_START(ast_training), { SEGMENT_ROM_START(ast_training), SEGMENT_ROM_END(ast_training) }, false }, - { SEGMENT_ROM_START(ast_radio), { SEGMENT_ROM_START(ast_radio), SEGMENT_ROM_END(ast_radio) }, false }, - { SEGMENT_ROM_START(ovl_i1), { SEGMENT_ROM_START(ovl_i1), SEGMENT_ROM_END(ovl_i1) }, false }, - { SEGMENT_ROM_START(ovl_i2), { SEGMENT_ROM_START(ovl_i2), SEGMENT_ROM_END(ovl_i2) }, false }, - { SEGMENT_ROM_START(ovl_i3), { SEGMENT_ROM_START(ovl_i3), SEGMENT_ROM_END(ovl_i3) }, false }, - { SEGMENT_ROM_START(ovl_i4), { SEGMENT_ROM_START(ovl_i4), SEGMENT_ROM_END(ovl_i4) }, false }, - { SEGMENT_ROM_START(ovl_i5), { SEGMENT_ROM_START(ovl_i5), SEGMENT_ROM_END(ovl_i5) }, false }, - { SEGMENT_ROM_START(ovl_i6), { SEGMENT_ROM_START(ovl_i6), SEGMENT_ROM_END(ovl_i6) }, false }, - { SEGMENT_ROM_START(ovl_menu), { SEGMENT_ROM_START(ovl_menu), SEGMENT_ROM_END(ovl_menu) }, false }, - { SEGMENT_ROM_START(ovl_ending), { SEGMENT_ROM_START(ovl_ending), SEGMENT_ROM_END(ovl_ending) }, false }, - { SEGMENT_ROM_START(ovl_unused), { SEGMENT_ROM_START(ovl_unused), SEGMENT_ROM_END(ovl_unused) }, false }, + DMA_ENTRY(makerom), + DMA_ENTRY(main), + DMA_ENTRY(dma_table), + DMA_ENTRY(audio_seq), + DMA_ENTRY(audio_bank), + DMA_ENTRY(audio_table), + DMA_ENTRY(ast_common), + DMA_ENTRY(ast_bg_space), + DMA_ENTRY(ast_bg_planet), + DMA_ENTRY(ast_arwing), + DMA_ENTRY(ast_landmaster), + DMA_ENTRY(ast_blue_marine), + DMA_ENTRY(ast_versus), + DMA_ENTRY(ast_enmy_planet), + DMA_ENTRY(ast_enmy_space), + DMA_ENTRY(ast_great_fox), + DMA_ENTRY(ast_star_wolf), + DMA_ENTRY(ast_allies), + DMA_ENTRY(ast_corneria), + DMA_ENTRY(ast_meteo), + DMA_ENTRY(ast_titania), + DMA_ENTRY(ast_7_ti_2), + DMA_ENTRY(ast_8_ti), + DMA_ENTRY(ast_9_ti), + DMA_ENTRY(ast_A_ti), + DMA_ENTRY(ast_7_ti_1), + DMA_ENTRY(ast_sector_x), + DMA_ENTRY(ast_sector_z), + DMA_ENTRY(ast_aquas), + DMA_ENTRY(ast_area_6), + DMA_ENTRY(ast_venom_1), + DMA_ENTRY(ast_venom_2), + DMA_ENTRY(ast_ve1_boss), + DMA_ENTRY(ast_bolse), + DMA_ENTRY(ast_fortuna), + DMA_ENTRY(ast_sector_y), + DMA_ENTRY(ast_solar), + DMA_ENTRY(ast_zoness), + DMA_ENTRY(ast_katina), + DMA_ENTRY(ast_macbeth), + DMA_ENTRY(ast_warp_zone), + DMA_ENTRY(ast_title), + DMA_ENTRY(ast_map), + DMA_ENTRY(ast_option), + DMA_ENTRY(ast_vs_menu), + DMA_ENTRY(ast_text), + DMA_ENTRY(ast_font_3d), + DMA_ENTRY(ast_andross), + DMA_ENTRY(ast_logo), + DMA_ENTRY(ast_ending), + DMA_ENTRY(ast_ending_award_front), + DMA_ENTRY(ast_ending_award_back), + DMA_ENTRY(ast_ending_expert), + DMA_ENTRY(ast_training), + DMA_ENTRY(ast_radio), + DMA_ENTRY(ovl_i1), + DMA_ENTRY(ovl_i2), + DMA_ENTRY(ovl_i3), + DMA_ENTRY(ovl_i4), + DMA_ENTRY(ovl_i5), + DMA_ENTRY(ovl_i6), + DMA_ENTRY(ovl_menu), + DMA_ENTRY(ovl_ending), + DMA_ENTRY(ovl_unused), }; diff --git a/src/engine/fox_reset.c b/src/engine/fox_reset.c index f5a9ab35..f61236b1 100644 --- a/src/engine/fox_reset.c +++ b/src/engine/fox_reset.c @@ -20,9 +20,9 @@ void Graphics_NMIWipe(void) { Graphics_FillRectangle(&gMasterDisp, SCREEN_MARGIN, SCREEN_MARGIN, MIN(SCREEN_WIDTH - 2 * SCREEN_MARGIN, sWipeBarLength) + SCREEN_MARGIN, SCREEN_HEIGHT / 4 + SCREEN_MARGIN / 2, 0, 0, 0, 255); - Graphics_FillRectangle(&gMasterDisp, - SCREEN_WIDTH - SCREEN_MARGIN - MIN(SCREEN_WIDTH - 2 * SCREEN_MARGIN, sWipeBarLength), - SCREEN_HEIGHT / 4 + SCREEN_MARGIN / 2, SCREEN_WIDTH - 8, SCREEN_HEIGHT / 2, 0, 0, 0, 255); + Graphics_FillRectangle( + &gMasterDisp, SCREEN_WIDTH - SCREEN_MARGIN - MIN(SCREEN_WIDTH - 2 * SCREEN_MARGIN, sWipeBarLength), + SCREEN_HEIGHT / 4 + SCREEN_MARGIN / 2, SCREEN_WIDTH - SCREEN_MARGIN, SCREEN_HEIGHT / 2, 0, 0, 0, 255); Graphics_FillRectangle(&gMasterDisp, SCREEN_MARGIN, SCREEN_HEIGHT / 2, MIN(SCREEN_WIDTH - 2 * SCREEN_MARGIN, sWipeBarLength) + SCREEN_MARGIN, 3 * SCREEN_HEIGHT / 4 - SCREEN_MARGIN / 2, 0, 0, 0, 255); diff --git a/srceu/audio/audio_effects.c b/srceu/audio/audio_effects.c new file mode 100644 index 00000000..1463f7ee --- /dev/null +++ b/srceu/audio/audio_effects.c @@ -0,0 +1,19 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_effects/func_800133E0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_effects/func_80013588.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_effects/func_800136E8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_effects/func_800137BC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_effects/func_80013800.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_effects/func_800139F8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_effects/func_80013A64.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_effects/func_80013B4C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_effects/func_80013B70.s") diff --git a/srceu/audio/audio_general.c b/srceu/audio/audio_general.c new file mode 100644 index 00000000..8346c82d --- /dev/null +++ b/srceu/audio/audio_general.c @@ -0,0 +1,208 @@ +#include "common.h" + +void func_80016A30(void) { +} + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_80016A38.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_80016BA0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_80016CBC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_80016EC4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_80016FD0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001737C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_800174B0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001756C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_800175A4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001761C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001777C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_800177E4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_80018310.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_80018338.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_800183B8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001842C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001848C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_800184F0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_80018508.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_800185BC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_80018614.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_80018EB8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_80018EFC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_80018FC0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_80019084.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_80019100.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_80019174.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_800191D8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_80019234.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_800192AC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_80019450.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_800197C8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_800198DC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001A038.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001A2AC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001A3A8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001A4D4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001A51C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001A578.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001A6E0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001A854.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001A9A4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001AA08.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001AAAC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001AB00.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001AB6C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001ACF8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001AD1C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001AD60.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001AE74.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001AE94.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001AEF0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001AF5C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001AF6C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001AFB8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001B030.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001B470.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001B790.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001BA5C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001BB90.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001BC3C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001BC64.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001BD28.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001BFDC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001C408.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001C8D4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001CA40.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001CBB8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001CD14.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001CE60.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001CF34.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001CF98.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001CFE0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001D06C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001D0EC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001D144.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001D194.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001D200.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001D334.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001D3D8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001D438.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001D448.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001D47C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001D4E4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001D558.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001D670.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001D714.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001D7B8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001D8E0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001D92C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001DA18.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001DAC8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001DC08.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001DC64.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001DCA4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001DD04.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001DD4C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001DD78.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001DDE8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001DEEC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/func_8001DF9C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_general/D_800C99E0.s") diff --git a/srceu/audio/audio_heap.c b/srceu/audio/audio_heap.c new file mode 100644 index 00000000..d80417b2 --- /dev/null +++ b/srceu/audio/audio_heap.c @@ -0,0 +1,67 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_heap/func_8000BCE0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_heap/func_8000BDA8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_heap/func_8000BE94.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_heap/func_8000BF04.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_heap/func_8000BF84.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_heap/func_8000BFDC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_heap/func_8000C004.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_heap/func_8000C018.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_heap/func_8000C048.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_heap/func_8000C058.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_heap/func_8000C0B4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_heap/func_8000C130.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_heap/func_8000C1AC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_heap/func_8000C268.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_heap/func_8000C324.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_heap/func_8000CA00.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_heap/func_8000CA58.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_heap/func_8000CB64.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_heap/func_8000CF38.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_heap/func_8000D0FC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_heap/func_8000D174.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_heap/func_8000D518.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_heap/func_8000DB64.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_heap/func_8000DBBC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_heap/func_8000DC3C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_heap/func_8000DC8C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_heap/func_8000DCDC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_heap/func_8000DD2C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_heap/func_8000DDC0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_heap/func_8000E054.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_heap/func_8000E21C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_heap/func_8000E260.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_heap/func_8000E2E8.s") diff --git a/srceu/audio/audio_load.c b/srceu/audio/audio_load.c new file mode 100644 index 00000000..e37dcd74 --- /dev/null +++ b/srceu/audio/audio_load.c @@ -0,0 +1,97 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_8000E4F0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_8000E5F8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_8000E930.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_8000EC04.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_8000EC64.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_8000ED10.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_8000ED78.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_8000EE64.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_8000EF34.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_8000EF98.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_8000F060.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_8000F0C8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_8000F1A8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_8000F250.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_8000F270.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_8000F3A4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_8000F3D8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_8000F4C8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_8000F5A4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_8000F7E0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_8000F81C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_8000F870.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_8000F8B4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_8000FA78.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_8000FBA0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_8000FBF8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_8000FCCC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_8000FCDC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_8000FCF0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_8000FD10.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_8000FFEC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_8001001C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_800105D0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_80010780.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_800107EC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_80010854.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_800109E0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_80010A64.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_80010ABC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_80010BD4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_80010C44.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_80010EE0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_80010F70.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_80010FC8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_80011104.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_80011530.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_800116F4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_load/func_8001173C.s") diff --git a/srceu/audio/audio_playback.c b/srceu/audio/audio_playback.c new file mode 100644 index 00000000..19da37c8 --- /dev/null +++ b/srceu/audio/audio_playback.c @@ -0,0 +1,59 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_playback/func_80011870.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_playback/func_80011C38.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_playback/func_80011CF0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_playback/func_80011D2C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_playback/func_80011DDC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_playback/func_80011E98.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_playback/func_80011F2C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_playback/func_80011F88.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_playback/func_80012418.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_playback/func_8001264C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_playback/func_8001266C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_playback/func_8001268C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_playback/func_80012790.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_playback/func_80012834.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_playback/func_80012844.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_playback/func_80012894.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_playback/func_80012944.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_playback/func_80012AA4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_playback/func_80012BE0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_playback/func_80012C20.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_playback/func_80012C4C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_playback/func_80012CCC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_playback/func_80012E08.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_playback/func_80012E3C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_playback/func_80012E68.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_playback/func_80012EB4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_playback/func_80012F04.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_playback/func_80012FFC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_playback/func_800132C8.s") diff --git a/srceu/audio/audio_seqplayer.c b/srceu/audio/audio_seqplayer.c new file mode 100644 index 00000000..88ff98c9 --- /dev/null +++ b/srceu/audio/audio_seqplayer.c @@ -0,0 +1,51 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_seqplayer/func_80013E80.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_seqplayer/func_80013FA4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_seqplayer/func_800140B0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_seqplayer/func_800140EC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_seqplayer/func_8001413C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_seqplayer/func_800141A8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_seqplayer/func_80014224.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_seqplayer/func_80014350.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_seqplayer/func_80014420.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_seqplayer/func_800144C4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_seqplayer/func_8001459C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_seqplayer/func_800145DC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_seqplayer/func_8001461C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_seqplayer/func_800146A0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_seqplayer/func_800146B4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_seqplayer/func_800146E4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_seqplayer/func_80014728.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_seqplayer/func_800152A0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_seqplayer/func_80015310.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_seqplayer/func_800153A4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_seqplayer/func_800153C8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_seqplayer/func_80015FB4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_seqplayer/func_8001676C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_seqplayer/func_800167E4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_seqplayer/func_8001689C.s") diff --git a/srceu/audio/audio_synthesis.c b/srceu/audio/audio_synthesis.c new file mode 100644 index 00000000..7683e1d2 --- /dev/null +++ b/srceu/audio/audio_synthesis.c @@ -0,0 +1,41 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_synthesis/func_80008130.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_synthesis/func_800083D4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_synthesis/func_800087F0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_synthesis/func_80009194.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_synthesis/func_80009574.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_synthesis/func_800096EC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_synthesis/func_80009818.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_synthesis/func_8000994C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_synthesis/func_800099F4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_synthesis/func_80009A9C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_synthesis/func_80009B1C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_synthesis/func_80009BD4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_synthesis/func_80009DE8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_synthesis/func_8000A198.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_synthesis/func_8000A2CC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_synthesis/func_8000A770.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_synthesis/func_8000B460.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_synthesis/func_8000B4F0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_synthesis/func_8000B58C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_synthesis/func_8000B9FC.s") diff --git a/srceu/audio/audio_thread.c b/srceu/audio/audio_thread.c new file mode 100644 index 00000000..cb7862fe --- /dev/null +++ b/srceu/audio/audio_thread.c @@ -0,0 +1,39 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_thread/func_8001E020.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_thread/func_8001E514.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_thread/func_8001E7F0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_thread/func_8001E848.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_thread/func_8001E898.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_thread/func_8001E920.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_thread/func_8001E978.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_thread/func_8001E99C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_thread/func_8001E9C0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_thread/func_8001E9F0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_thread/func_8001EA68.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_thread/func_8001EA7C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_thread/func_8001ED7C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_thread/func_8001EDE4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_thread/func_8001EE04.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_thread/func_8001EE5C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_thread/func_8001EED0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_thread/func_8001EF0C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/audio/audio_thread/D_800C9D00.s") diff --git a/srceu/buffers.c b/srceu/buffers.c new file mode 100644 index 00000000..f293f667 --- /dev/null +++ b/srceu/buffers.c @@ -0,0 +1,9 @@ +#include "sys.h" + +u64 gDramStack[SP_DRAM_STACK_SIZE64]; +u8 gOSYieldData[OS_YIELD_DATA_SIZE]; +FrameBuffer gZBuffer; // z buffer +u8 gTaskOutputBuffer[0x30000]; +u8 gAudioHeap[0xB0000]; +u16 gFillBuffer[3 * SCREEN_WIDTH]; +FrameBuffer gFrameBuffers[3]; diff --git a/srceu/dmatable.c b/srceu/dmatable.c new file mode 100644 index 00000000..62b2e999 --- /dev/null +++ b/srceu/dmatable.c @@ -0,0 +1,84 @@ +#include "sf64dma.h" + +#define DMA_ENTRY(file) \ + { file##_ROM_START, { file##_ROM_START, file##_ROM_END }, false } +#define DMA_ENTRY_NONE \ + { NULL, { NULL, NULL }, false } + +DmaEntry gDmaTable[101] = { + DMA_ENTRY(makerom), + DMA_ENTRY(main), + DMA_ENTRY(dma_table), + DMA_ENTRY(audio_seq), + DMA_ENTRY(audio_bank), + DMA_ENTRY(audio_table), + DMA_ENTRY(ast_common), + DMA_ENTRY(ast_bg_space), + DMA_ENTRY(ast_bg_planet), + DMA_ENTRY(ast_arwing), + DMA_ENTRY(ast_landmaster), + DMA_ENTRY(ast_blue_marine), + DMA_ENTRY(ast_versus), + DMA_ENTRY(ast_enmy_planet), + DMA_ENTRY(ast_enmy_space), + DMA_ENTRY(ast_great_fox), + DMA_ENTRY(ast_star_wolf), + DMA_ENTRY(ast_allies), + DMA_ENTRY(ast_corneria), + DMA_ENTRY(ast_meteo), + DMA_ENTRY(ast_titania), + DMA_ENTRY(ast_7_ti_2), + DMA_ENTRY(ast_8_ti), + DMA_ENTRY(ast_9_ti), + DMA_ENTRY(ast_A_ti), + DMA_ENTRY(ast_7_ti_1), + DMA_ENTRY(ast_sector_x), + DMA_ENTRY(ast_sector_z), + DMA_ENTRY(ast_aquas), + DMA_ENTRY(ast_area_6), + DMA_ENTRY(ast_venom_1), + DMA_ENTRY(ast_venom_2), + DMA_ENTRY(ast_ve1_boss), + DMA_ENTRY(ast_bolse), + DMA_ENTRY(ast_fortuna), + DMA_ENTRY(ast_sector_y), + DMA_ENTRY(ast_solar), + DMA_ENTRY(ast_zoness), + DMA_ENTRY(ast_katina), + DMA_ENTRY(ast_macbeth), + DMA_ENTRY(ast_warp_zone), + DMA_ENTRY(ast_title), + DMA_ENTRY(ast_map), + DMA_ENTRY(ast_map_en), + DMA_ENTRY(ast_map_fr), + DMA_ENTRY(ast_map_de), + DMA_ENTRY(ast_option), + DMA_ENTRY(ast_option_en), + DMA_ENTRY(ast_option_fr), + DMA_ENTRY(ast_option_de), + DMA_ENTRY(ast_vs_menu), + DMA_ENTRY(ast_vs_menu_en), + DMA_ENTRY(ast_vs_menu_fr), + DMA_ENTRY(ast_vs_menu_de), + DMA_ENTRY(ast_text), + DMA_ENTRY(ast_font_3d), + DMA_ENTRY(ast_andross), + DMA_ENTRY(ast_logo), + DMA_ENTRY(ast_ending), + DMA_ENTRY(ast_ending_award_front), + DMA_ENTRY(ast_ending_award_back), + DMA_ENTRY(ast_ending_expert), + DMA_ENTRY(ast_training), + DMA_ENTRY(ast_radio_de), + DMA_ENTRY(ovl_i1), + DMA_ENTRY(ovl_i2), + DMA_ENTRY(ovl_i3), + DMA_ENTRY(ovl_i4), + DMA_ENTRY(ovl_i5), + DMA_ENTRY(ovl_i6), + DMA_ENTRY(ovl_menu), + DMA_ENTRY(ovl_ending), + DMA_ENTRY(ovl_unused), + DMA_ENTRY(ast_radio_en), + DMA_ENTRY(ast_radio_fr), +}; diff --git a/srceu/driverominit.c b/srceu/driverominit.c new file mode 100644 index 00000000..37d8cf13 --- /dev/null +++ b/srceu/driverominit.c @@ -0,0 +1,3 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/driverominit/func_8001EF30.s") diff --git a/srceu/engine/fox_360.c b/srceu/engine/fox_360.c new file mode 100644 index 00000000..41d13129 --- /dev/null +++ b/srceu/engine/fox_360.c @@ -0,0 +1,73 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_360/func_8002E510.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_360/func_8002E628.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_360/func_8002E684.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_360/func_8002E71C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_360/func_8002E740.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_360/func_8002E764.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_360/func_8002E788.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_360/func_8002E7AC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_360/func_8002E7D0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_360/func_8002E7F4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_360/func_8002E818.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_360/func_8002E83C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_360/func_8002EE9C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_360/func_8002EF70.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_360/func_8002EFA0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_360/func_8002F2BC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_360/func_8002F51C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_360/func_8002F730.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_360/func_8002F794.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_360/func_8002F7F0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_360/func_8002FC90.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_360/func_8002FD44.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_360/func_8002FFAC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_360/func_80030028.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_360/func_80030240.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_360/func_80030328.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_360/func_800305D0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_360/func_800309C0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_360/func_800318FC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_360/func_800319A4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_360/func_80031A50.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_360/func_80034E24.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_360/func_80035058.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_360/func_800352A0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_360/func_80035408.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_360/D_800D61C0.s") diff --git a/srceu/engine/fox_beam.c b/srceu/engine/fox_beam.c new file mode 100644 index 00000000..dd574567 --- /dev/null +++ b/srceu/engine/fox_beam.c @@ -0,0 +1,75 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_beam/func_80035CF0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_beam/func_80035DAC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_beam/func_80035E08.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_beam/func_80035E38.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_beam/func_800362D8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_beam/func_800364E8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_beam/func_800365A4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_beam/func_8003668C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_beam/func_80036730.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_beam/func_80036834.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_beam/func_80036F48.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_beam/func_800373F8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_beam/func_80037658.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_beam/func_8003770C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_beam/func_80037CB4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_beam/func_80038100.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_beam/func_80038EF4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_beam/func_800391D0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_beam/func_80039A10.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_beam/func_8003AF48.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_beam/func_8003AF98.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_beam/func_8003AFCC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_beam/func_8003B51C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_beam/func_8003BA40.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_beam/func_8003BA60.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_beam/func_8003BA8C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_beam/func_8003BB0C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_beam/func_8003BEB4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_beam/func_8003BFC8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_beam/func_8003C398.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_beam/func_8003C490.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_beam/func_8003CBE0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_beam/func_8003CF68.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_beam/func_8003D524.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_beam/func_8003D820.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_beam/func_8003D984.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_beam/func_8003D9D8.s") diff --git a/srceu/engine/fox_bg.c b/srceu/engine/fox_bg.c new file mode 100644 index 00000000..bda93be9 --- /dev/null +++ b/srceu/engine/fox_bg.c @@ -0,0 +1,21 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_bg/func_8003DAC0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_bg/func_8003DE38.s") + +void func_8003E1B0(void) { +} + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_bg/func_8003E1B8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_bg/func_80040420.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_bg/func_80040924.s") + +void func_80040CAC(void) { +} + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_bg/func_80040CB4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_bg/func_80042D08.s") diff --git a/srceu/engine/fox_blur.c b/srceu/engine/fox_blur.c new file mode 100644 index 00000000..9a9b456d --- /dev/null +++ b/srceu/engine/fox_blur.c @@ -0,0 +1,3 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_blur/func_80084700.s") diff --git a/srceu/engine/fox_boss.c b/srceu/engine/fox_boss.c new file mode 100644 index 00000000..e9d8c6e8 --- /dev/null +++ b/srceu/engine/fox_boss.c @@ -0,0 +1,25 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_boss/func_80042E90.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_boss/func_80042F7C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_boss/func_80042F88.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_boss/func_80042F94.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_boss/func_80042FA0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_boss/func_80042FAC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_boss/func_80042FB8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_boss/func_80042FC4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_boss/func_800430AC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_boss/func_80043158.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_boss/func_8004316C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_boss/D_800D6980.s") diff --git a/srceu/engine/fox_col1.c b/srceu/engine/fox_col1.c new file mode 100644 index 00000000..2b716f92 --- /dev/null +++ b/srceu/engine/fox_col1.c @@ -0,0 +1,31 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_col1/func_80097D50.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_col1/func_80097F28.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_col1/func_80098100.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_col1/func_80098294.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_col1/func_800983B8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_col1/func_80098658.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_col1/func_80098A5C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_col1/func_80098F9C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_col1/func_80099230.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_col1/func_80099284.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_col1/func_800992C8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_col1/func_8009930C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_col1/func_80099350.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_col1/func_80099C24.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_col1/func_8009A2CC.s") diff --git a/srceu/engine/fox_col2.c b/srceu/engine/fox_col2.c new file mode 100644 index 00000000..15a8a72e --- /dev/null +++ b/srceu/engine/fox_col2.c @@ -0,0 +1,7 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_col2/func_800A3D50.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_col2/func_800A3DBC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_col2/func_800A4134.s") diff --git a/srceu/engine/fox_demo.c b/srceu/engine/fox_demo.c new file mode 100644 index 00000000..f1e67fc6 --- /dev/null +++ b/srceu/engine/fox_demo.c @@ -0,0 +1,71 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_demo/func_80048A90.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_demo/func_80048C6C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_demo/func_80048DE8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_demo/func_800495D8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_demo/func_800498B4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_demo/func_80049910.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_demo/func_80049A44.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_demo/func_80049AEC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_demo/func_80049BB4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_demo/func_8004A4D4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_demo/func_8004A6A8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_demo/func_8004A7E8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_demo/func_8004A830.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_demo/func_8004AA2C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_demo/func_8004AA9C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_demo/func_8004B308.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_demo/func_8004C89C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_demo/func_8004C8C0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_demo/func_8004CC50.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_demo/func_8004D358.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_demo/func_8004D364.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_demo/func_8004D3D0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_demo/func_8004D6BC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_demo/func_8004D7AC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_demo/func_8004DE7C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_demo/func_8004E35C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_demo/func_8004E458.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_demo/func_8004EB54.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_demo/func_8004EFE0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_demo/func_8004F71C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_demo/func_8004F830.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_demo/func_8004FC3C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_demo/func_8004FE44.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_demo/func_80051548.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_demo/D_800D6B00.s") diff --git a/srceu/engine/fox_display.c b/srceu/engine/fox_display.c new file mode 100644 index 00000000..60b5267c --- /dev/null +++ b/srceu/engine/fox_display.c @@ -0,0 +1,75 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_display/func_80051AB0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_display/func_8005207C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_display/func_80052328.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_display/func_800523A0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_display/func_80052418.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_display/func_8005248C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_display/func_80052504.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_display/func_80052638.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_display/func_80052804.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_display/func_80052B00.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_display/func_80052CC8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_display/func_800530CC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_display/func_80053124.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_display/func_800535D8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_display/func_80053A80.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_display/func_80053A98.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_display/func_80053BB8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_display/func_80053EFC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_display/func_80054200.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_display/func_80054280.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_display/func_800545DC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_display/func_8005470C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_display/func_80054894.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_display/func_80054C24.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_display/func_80054E00.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_display/func_80055708.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_display/func_80055AD8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_display/func_80055E18.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_display/func_800561B0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_display/func_80056334.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_display/func_80056440.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_display/func_80056DAC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_display/func_800571C8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_display/func_80057484.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_display/func_80057794.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_display/func_80057844.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_display/func_80057C80.s") diff --git a/srceu/engine/fox_edata.c b/srceu/engine/fox_edata.c new file mode 100644 index 00000000..1f33bd54 --- /dev/null +++ b/srceu/engine/fox_edata.c @@ -0,0 +1,7 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edata/func_80059530.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edata/func_80059610.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edata/func_800596F0.s") diff --git a/srceu/engine/fox_edisplay.c b/srceu/engine/fox_edisplay.c new file mode 100644 index 00000000..34792103 --- /dev/null +++ b/srceu/engine/fox_edisplay.c @@ -0,0 +1,131 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_80059700.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_80059800.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005984C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_80059890.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005991C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_80059928.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_800599E4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_80059A64.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_80059B2C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_80059B60.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_80059BF0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_80059BFC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_80059C30.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_80059C68.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_80059C74.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_80059C80.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_80059FA8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005A01C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005A050.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005A0BC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005A0C8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005A0D4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005ADEC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005B228.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005B3C8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005B6E4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005B75C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005B80C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005B888.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005B9E4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005BA70.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005BAF4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005C630.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005C940.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005CA00.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005CAC0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005CB84.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005CCDC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005CDE8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005D048.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005D230.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005D40C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005D694.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005D8F8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005D994.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005DC00.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005E1F8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005E494.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005E578.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005E7F8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005EA64.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005ED18.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005F070.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005F128.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005F22C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005F2D0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005F334.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005F6B0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005FA1C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_8005FBB0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_800604AC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_80060754.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_800608DC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_800609A8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_edisplay/func_80060DD4.s") diff --git a/srceu/engine/fox_effect.c b/srceu/engine/fox_effect.c new file mode 100644 index 00000000..40e28686 --- /dev/null +++ b/srceu/engine/fox_effect.c @@ -0,0 +1,345 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_80077250.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_800772AC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_80077414.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_800777A0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007784C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_800778D4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007798C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_80077A10.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_80077A8C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_80077B88.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_80077B94.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_80078048.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_80078108.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_800783D0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_80078448.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_800784C4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_80078560.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_80078614.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007869C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_800787AC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_800788C0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_80078A74.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_80078AF0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_80078AFC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_80078B9C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_80078BF0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_80078C94.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_80078CF8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_80078D70.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_80078E60.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_80078ECC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_80078F88.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007906C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_800794DC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007954C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_800795BC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_80079628.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007969C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_800798D4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_80079900.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007A29C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007A3D0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007A4C8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007A578.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007A608.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007A700.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007A758.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007A784.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007A828.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007A910.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007A9A4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007AA70.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007AB60.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007AC1C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007ACF0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007AD68.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007AE04.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007AF40.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007AFE0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007B050.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007B104.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007B190.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007B238.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007B2CC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007B354.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007B3C8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007B4A4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007B560.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007B5D0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007B63C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007B680.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007B68C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007B768.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007B7F8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007B908.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007B970.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007B9EC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007BB24.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007BC8C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007BCF8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007BDF0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007BE64.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007BEF8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007BF74.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007C00C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007C098.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007C130.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007C1BC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007C260.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007C3C4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007C494.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007C51C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007C618.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007C698.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007C70C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007C86C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007C8D4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007C9F0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007CB00.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007CC10.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007CCCC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007CD8C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007CECC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007CF40.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007CFAC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007D018.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007D084.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007D0F0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007D11C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007D148.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007D1F0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007D25C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007D2D8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007D304.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007D56C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007D758.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007D8B8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007D95C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007D9EC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007DA68.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007DAF4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007DB80.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007DEE4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007E024.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007E268.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007E2A8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007E340.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007E3F4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007E46C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007E5DC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007E658.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007E6C8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007E94C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007EBC8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007ECC4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007ED64.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007EE78.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007F05C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007F12C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007F21C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007F30C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007F448.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007F5BC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007F6C0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007F968.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007FBF0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007FD94.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8007FE98.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_800802C8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_800802E8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_80080308.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_80080370.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8008041C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8008093C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_80080ADC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_80080D14.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_800815EC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8008166C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_80081A9C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_80081B34.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_80081BFC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_80081C6C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_80082F88.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_800836D0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_8008378C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_800837FC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_80083B9C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_80083C80.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_80083D3C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_80083FB8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/func_800841A4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_effect/D_800D85E0.s") diff --git a/srceu/engine/fox_enmy.c b/srceu/engine/fox_enmy.c new file mode 100644 index 00000000..98ebe58c --- /dev/null +++ b/srceu/engine/fox_enmy.c @@ -0,0 +1,191 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80060F70.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80060FFC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80061024.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80061188.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_800612F8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_800613A4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_800613D4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80061404.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80061444.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80061484.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_800614B4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_800614F4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_800615E0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_800616CC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_800617B8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_800618A4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80061998.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80061A8C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80061BA8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80061D10.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80061E88.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80061F4C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_800621C0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_800625A8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_800626A4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80062BA0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80062C78.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80062D44.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80062DFC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_800631E8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_800632AC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_8006355C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80063CEC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80063D98.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80063E9C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80063F8C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80063F98.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80063FB4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80063FD0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_8006530C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_800653C0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_800654AC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80065524.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80065608.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_800656AC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80065714.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80066130.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80066294.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_8006657C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_8006687C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_800669D0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80066AB0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80066ABC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80066C30.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80066D8C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80066EB0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80066EBC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80066ED8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80066F14.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80066F20.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80067200.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80067378.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_800674E4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_8006756C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_800678A4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80067A70.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80067B4C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80067C1C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80067F9C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80068050.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80068608.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80068628.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80068648.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_800686B8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80068944.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80068C78.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80068CB8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80069010.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80069100.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80069418.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80069688.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80069728.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80069888.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80069954.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80069A40.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80069ADC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80069CEC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80069E24.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80069EB8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_80069F60.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_8006A004.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_8006A09C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_8006A3B4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/func_8006A410.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy/D_800D7780.s") diff --git a/srceu/engine/fox_enmy2.c b/srceu/engine/fox_enmy2.c new file mode 100644 index 00000000..f2479e31 --- /dev/null +++ b/srceu/engine/fox_enmy2.c @@ -0,0 +1,125 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8006A7E0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8006A83C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8006A93C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8006A9A8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8006A9B4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8006A9C0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8006AA78.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8006AAD4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8006ABE0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8006AC44.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8006AD54.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8006B0D0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8006B0DC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8006B4A8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8006B788.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8006B998.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8006BAA0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8006BB58.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8006BBB4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8006BFB8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8006C044.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8006D130.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8006D38C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8006D3A8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8006EA8C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8006EB00.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8006EBA0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8006EBFC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8006EC9C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8006ECF8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8006EF38.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8006EFDC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8006F080.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8006F114.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8006F17C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8006F228.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8006F290.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8006F448.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8006FE64.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8006FF28.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_800700E0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_80070214.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_80070BBC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_80070D00.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_80070D58.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_80071DD4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_800720FC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_80072300.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_80072420.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_80072488.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_800725A8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_80074C10.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_80074C58.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_80074E50.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_80074F18.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_80074FA4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_80075004.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_800763B8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_80077190.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_800771E0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/func_8007722C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_enmy2/D_800D7E00.s") diff --git a/srceu/engine/fox_fade.c b/srceu/engine/fox_fade.c new file mode 100644 index 00000000..c10637a5 --- /dev/null +++ b/srceu/engine/fox_fade.c @@ -0,0 +1,11 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_fade/func_80084380.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_fade/func_8008440C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_fade/func_80084498.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_fade/func_80084698.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_fade/D_800D8AA0.s") diff --git a/srceu/engine/fox_game.c b/srceu/engine/fox_game.c new file mode 100644 index 00000000..30185877 --- /dev/null +++ b/srceu/engine/fox_game.c @@ -0,0 +1,23 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_game/func_800A1EC0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_game/func_800A1F90.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_game/func_800A217C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_game/func_800A2224.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_game/func_800A2478.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_game/func_800A2554.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_game/func_800A25C0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_game/func_800A2AEC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_game/func_800A2BEC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_game/func_800A2CE0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_game/func_800A3CC4.s") diff --git a/srceu/engine/fox_hud.c b/srceu/engine/fox_hud.c new file mode 100644 index 00000000..bba7ea21 --- /dev/null +++ b/srceu/engine/fox_hud.c @@ -0,0 +1,259 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80084940.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80084BA4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80084E88.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_800853B4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80085414.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80085474.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_800854CC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80085524.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008557C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_800855D4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80085628.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008567C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_800856D0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80085750.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_800857EC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_800858A0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80085954.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80086120.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80086440.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_800864BC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80086744.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80086AD4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80086D3C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80086DFC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80086F50.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80087B10.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80087D68.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80088168.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80088C18.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80088C98.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80088D90.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80088DEC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80088EB8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_800890A4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80089F78.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008A018.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008A0B8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008A158.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008A1F8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008A29C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008A3FC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008A49C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008A540.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008A630.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008A7A0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008A984.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008AB48.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008ADE4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008B55C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008B69C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008B94C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008BAB8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008BBAC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008BBF8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008BEB8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008C03C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008C07C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008C2F0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008C3EC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008C588.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008C5C4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008C608.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008CA0C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008CC98.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008CED0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008CFFC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008D34C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008D494.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008D4A0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008D4EC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008D8C0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008D9E4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008DAF8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008DB58.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008DC24.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008DDF8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008E0FC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008E28C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008E53C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008E5B8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008E680.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008E770.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008EBD0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008EE24.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008EEF0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008EF28.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008F2F4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8008F31C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80090254.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80090274.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8009038C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80090780.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_800908F8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80090B08.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_800910CC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80091234.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80091308.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_800915D4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80091794.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_800919C8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80091B5C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80091BA0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80091C70.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80091DF8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80091EF8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80092160.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8009248C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_800925F4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_800926F0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_800927FC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80092B1C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80092BCC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80092DB8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80093078.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80093620.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80093798.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80093A3C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80093BE8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80093CB0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80093EC0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80095340.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_800955A8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_8009570C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80095D3C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80095D8C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80095E58.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80095F24.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80095FF0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_hud/func_80097448.s") diff --git a/srceu/engine/fox_load.c b/srceu/engine/fox_load.c new file mode 100644 index 00000000..8a9ccc7e --- /dev/null +++ b/srceu/engine/fox_load.c @@ -0,0 +1,36 @@ +#include "sf64dma.h" + +u8 D_800CAFC0 = 3; + +#include "fox_load_inits.c" + +Scene D_800CCC44 = { + NO_OVERLAY, + { /* 0x1 */ NO_SEGMENT, + /* 0x2 */ NO_SEGMENT, + /* 0x3 */ NO_SEGMENT, + /* 0x4 */ NO_SEGMENT, + /* 0x5 */ NO_SEGMENT, + /* 0x6 */ NO_SEGMENT, + /* 0x7 */ NO_SEGMENT, + /* 0x8 */ NO_SEGMENT, + /* 0x9 */ NO_SEGMENT, + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ NO_SEGMENT, + /* 0xE */ NO_SEGMENT, + /* 0xF */ NO_SEGMENT }, +}; + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_load/func_80058B10.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_load/func_80058BD8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_load/func_80058EA4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_load/func_80059428.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_load/func_80059470.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_load/D_800D7350.s") diff --git a/srceu/engine/fox_load_inits.c b/srceu/engine/fox_load_inits.c new file mode 100644 index 00000000..d6d2fe40 --- /dev/null +++ b/srceu/engine/fox_load_inits.c @@ -0,0 +1,869 @@ +#include "sf64dma.h" + +#define NO_SEGMENT \ + { NULL, NULL } + +#define OVERLAY_OFFSETS(file) \ + { \ + { SEGMENT_ROM_START(file), SEGMENT_ROM_END(file) }, { SEGMENT_BSS_START(file), SEGMENT_BSS_END(file) }, \ + { SEGMENT_TEXT_START(file), SEGMENT_TEXT_END(file) }, \ + { SEGMENT_DATA_START(file), SEGMENT_RODATA_END(file) }, \ + } + +#define NO_OVERLAY \ + { NO_SEGMENT, NO_SEGMENT, NO_SEGMENT, NO_SEGMENT } + +#define ROM_SEGMENT(file) \ + { SEGMENT_ROM_START(file), SEGMENT_ROM_END(file) } + +Scene D_800CAFC4[1] = { + { NO_OVERLAY, + { /* 1 */ NO_SEGMENT, + /* 2 */ NO_SEGMENT, + /* 3 */ NO_SEGMENT, + /* 4 */ NO_SEGMENT, + /* 5 */ NO_SEGMENT, + /* 6 */ NO_SEGMENT, + /* 7 */ NO_SEGMENT, + /* 8 */ NO_SEGMENT, + /* 9 */ NO_SEGMENT, + /* A */ NO_SEGMENT, + /* B */ NO_SEGMENT, + /* C */ NO_SEGMENT, + /* D */ NO_SEGMENT, + /* E */ NO_SEGMENT, + /* F */ ROM_SEGMENT(ast_logo) } }, +}; + +Scene D_800CB05C[6] = { + { OVERLAY_OFFSETS(ovl_ending), + { /* 1 */ NO_SEGMENT, + /* 2 */ NO_SEGMENT, + /* 3 */ ROM_SEGMENT(ast_arwing), + /* 4 */ NO_SEGMENT, + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ NO_SEGMENT, + /* 7 */ ROM_SEGMENT(ast_ending), + /* 8 */ NO_SEGMENT, + /* 9 */ NO_SEGMENT, + /* A */ NO_SEGMENT, + /* B */ NO_SEGMENT, + /* C */ NO_SEGMENT, + /* D */ ROM_SEGMENT(ast_allies), + /* E */ ROM_SEGMENT(ast_great_fox), + /* F */ NO_SEGMENT } }, + { OVERLAY_OFFSETS(ovl_ending), + { /* 1 */ NO_SEGMENT, + /* 2 */ NO_SEGMENT, + /* 3 */ NO_SEGMENT, + /* 4 */ NO_SEGMENT, + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_title), + /* 7 */ ROM_SEGMENT(ast_ending), + /* 8 */ ROM_SEGMENT(ast_ending_award_front), + /* 9 */ NO_SEGMENT, + /* A */ NO_SEGMENT, + /* B */ NO_SEGMENT, + /* C */ NO_SEGMENT, + /* D */ NO_SEGMENT, + /* E */ NO_SEGMENT, + /* F */ NO_SEGMENT } }, + { OVERLAY_OFFSETS(ovl_ending), + { /* 1 */ NO_SEGMENT, + /* 2 */ NO_SEGMENT, + /* 3 */ NO_SEGMENT, + /* 4 */ NO_SEGMENT, + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_title), + /* 7 */ ROM_SEGMENT(ast_ending), + /* 8 */ ROM_SEGMENT(ast_ending_award_back), + /* 9 */ NO_SEGMENT, + /* A */ NO_SEGMENT, + /* B */ NO_SEGMENT, + /* C */ NO_SEGMENT, + /* D */ NO_SEGMENT, + /* E */ NO_SEGMENT, + /* F */ NO_SEGMENT } }, + { OVERLAY_OFFSETS(ovl_ending), + { /* 1 */ NO_SEGMENT, + /* 2 */ NO_SEGMENT, + /* 3 */ NO_SEGMENT, + /* 4 */ NO_SEGMENT, + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_title), + /* 7 */ ROM_SEGMENT(ast_ending), + /* 8 */ ROM_SEGMENT(ast_ending_expert), + /* 9 */ NO_SEGMENT, + /* A */ NO_SEGMENT, + /* B */ NO_SEGMENT, + /* C */ NO_SEGMENT, + /* D */ NO_SEGMENT, + /* E */ NO_SEGMENT, + /* F */ NO_SEGMENT } }, + { OVERLAY_OFFSETS(ovl_ending), + { /* 1 */ NO_SEGMENT, + /* 2 */ NO_SEGMENT, + /* 3 */ NO_SEGMENT, + /* 4 */ NO_SEGMENT, + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_title), + /* 7 */ ROM_SEGMENT(ast_ending), + /* 8 */ NO_SEGMENT, + /* 9 */ NO_SEGMENT, + /* A */ NO_SEGMENT, + /* B */ NO_SEGMENT, + /* C */ NO_SEGMENT, + /* D */ NO_SEGMENT, + /* E */ ROM_SEGMENT(ast_great_fox), + /* F */ NO_SEGMENT } }, + { OVERLAY_OFFSETS(ovl_ending), + { /* 1 */ NO_SEGMENT, + /* 2 */ NO_SEGMENT, + /* 3 */ ROM_SEGMENT(ast_arwing), + /* 4 */ NO_SEGMENT, + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ NO_SEGMENT, + /* 7 */ ROM_SEGMENT(ast_ending), + /* 8 */ ROM_SEGMENT(ast_ending_expert), + /* 9 */ ROM_SEGMENT(ast_font_3d), + /* A */ NO_SEGMENT, + /* B */ NO_SEGMENT, + /* C */ NO_SEGMENT, + /* D */ NO_SEGMENT, + /* E */ ROM_SEGMENT(ast_great_fox), + /* F */ NO_SEGMENT } }, +}; + +Scene D_800CB3EC[1] = { + { OVERLAY_OFFSETS(ovl_menu), + { /* 1 */ NO_SEGMENT, + /* 2 */ NO_SEGMENT, + /* 3 */ ROM_SEGMENT(ast_arwing), + /* 4 */ NO_SEGMENT, + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_title), + /* 7 */ NO_SEGMENT, + /* 8 */ NO_SEGMENT, + /* 9 */ NO_SEGMENT, + /* A */ NO_SEGMENT, + /* B */ NO_SEGMENT, + /* C */ NO_SEGMENT, + /* D */ NO_SEGMENT, + /* E */ ROM_SEGMENT(ast_great_fox), + /* F */ NO_SEGMENT } }, +}; + +Scene D_800CB484[3] = { + { OVERLAY_OFFSETS(ovl_menu), + { /* 1 */ NO_SEGMENT, + /* 2 */ NO_SEGMENT, + /* 3 */ NO_SEGMENT, + /* 4 */ NO_SEGMENT, + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_map), + /* 7 */ ROM_SEGMENT(ast_vs_menu), + /* 8 */ ROM_SEGMENT(ast_option), + /* 9 */ ROM_SEGMENT(ast_font_3d), + /* A */ ROM_SEGMENT(ast_option_en), + /* B */ ROM_SEGMENT(ast_map_en), + /* C */ ROM_SEGMENT(ast_vs_menu_en), + /* D */ NO_SEGMENT, + /* E */ NO_SEGMENT, + /* F */ NO_SEGMENT } }, + { OVERLAY_OFFSETS(ovl_menu), + { /* 1 */ NO_SEGMENT, + /* 2 */ NO_SEGMENT, + /* 3 */ NO_SEGMENT, + /* 4 */ NO_SEGMENT, + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_map), + /* 7 */ ROM_SEGMENT(ast_vs_menu), + /* 8 */ ROM_SEGMENT(ast_option), + /* 9 */ ROM_SEGMENT(ast_font_3d), + /* A */ ROM_SEGMENT(ast_option_fr), + /* B */ ROM_SEGMENT(ast_map_fr), + /* C */ ROM_SEGMENT(ast_vs_menu_fr), + /* D */ NO_SEGMENT, + /* E */ NO_SEGMENT, + /* F */ NO_SEGMENT } }, + { OVERLAY_OFFSETS(ovl_menu), + { /* 1 */ NO_SEGMENT, + /* 2 */ NO_SEGMENT, + /* 3 */ NO_SEGMENT, + /* 4 */ NO_SEGMENT, + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_map), + /* 7 */ ROM_SEGMENT(ast_vs_menu), + /* 8 */ ROM_SEGMENT(ast_option), + /* 9 */ ROM_SEGMENT(ast_font_3d), + /* A */ ROM_SEGMENT(ast_option_de), + /* B */ ROM_SEGMENT(ast_map_de), + /* C */ ROM_SEGMENT(ast_vs_menu_de), + /* D */ NO_SEGMENT, + /* E */ NO_SEGMENT, + /* F */ NO_SEGMENT } }, +}; + +Scene D_800CB64C[3] = { + { OVERLAY_OFFSETS(ovl_menu), + { /* 1 */ NO_SEGMENT, + /* 2 */ NO_SEGMENT, + /* 3 */ ROM_SEGMENT(ast_arwing), + /* 4 */ NO_SEGMENT, + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_map), + /* 7 */ NO_SEGMENT, + /* 8 */ NO_SEGMENT, + /* 9 */ ROM_SEGMENT(ast_font_3d), + /* A */ NO_SEGMENT, + /* B */ ROM_SEGMENT(ast_map_en), + /* C */ NO_SEGMENT, + /* D */ NO_SEGMENT, + /* E */ NO_SEGMENT, + /* F */ NO_SEGMENT } }, + { OVERLAY_OFFSETS(ovl_menu), + { /* 1 */ NO_SEGMENT, + /* 2 */ NO_SEGMENT, + /* 3 */ ROM_SEGMENT(ast_arwing), + /* 4 */ NO_SEGMENT, + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_map), + /* 7 */ NO_SEGMENT, + /* 8 */ NO_SEGMENT, + /* 9 */ ROM_SEGMENT(ast_font_3d), + /* A */ NO_SEGMENT, + /* B */ ROM_SEGMENT(ast_map_fr), + /* C */ NO_SEGMENT, + /* D */ NO_SEGMENT, + /* E */ NO_SEGMENT, + /* F */ NO_SEGMENT } }, + { OVERLAY_OFFSETS(ovl_menu), + { /* 1 */ NO_SEGMENT, + /* 2 */ NO_SEGMENT, + /* 3 */ ROM_SEGMENT(ast_arwing), + /* 4 */ NO_SEGMENT, + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_map), + /* 7 */ NO_SEGMENT, + /* 8 */ NO_SEGMENT, + /* 9 */ ROM_SEGMENT(ast_font_3d), + /* A */ NO_SEGMENT, + /* B */ ROM_SEGMENT(ast_map_de), + /* C */ NO_SEGMENT, + /* D */ NO_SEGMENT, + /* E */ NO_SEGMENT, + /* F */ NO_SEGMENT } }, +}; + +Scene D_800CB814[1] = { + { OVERLAY_OFFSETS(ovl_menu), + { /* 1 */ NO_SEGMENT, + /* 2 */ NO_SEGMENT, + /* 3 */ NO_SEGMENT, + /* 4 */ NO_SEGMENT, + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ NO_SEGMENT, + /* 7 */ NO_SEGMENT, + /* 8 */ NO_SEGMENT, + /* 9 */ NO_SEGMENT, + /* A */ NO_SEGMENT, + /* B */ NO_SEGMENT, + /* C */ ROM_SEGMENT(ast_andross), + /* D */ NO_SEGMENT, + /* E */ NO_SEGMENT, + /* F */ NO_SEGMENT } }, +}; + +Scene D_800CB8AC[1] = { + { OVERLAY_OFFSETS(ovl_i1), + { /* 1 */ ROM_SEGMENT(ast_common), + /* 2 */ ROM_SEGMENT(ast_bg_planet), + /* 3 */ ROM_SEGMENT(ast_arwing), + /* 4 */ ROM_SEGMENT(ast_enmy_planet), + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_corneria), + /* 7 */ NO_SEGMENT, + /* 8 */ NO_SEGMENT, + /* 9 */ NO_SEGMENT, + /* A */ NO_SEGMENT, + /* B */ NO_SEGMENT, + /* C */ NO_SEGMENT, + /* D */ NO_SEGMENT, + /* E */ NO_SEGMENT, + /* F */ NO_SEGMENT } }, +}; + +Scene D_800CB944[2] = { + { OVERLAY_OFFSETS(ovl_i2), + { /* 1 */ ROM_SEGMENT(ast_common), + /* 2 */ ROM_SEGMENT(ast_bg_space), + /* 3 */ ROM_SEGMENT(ast_arwing), + /* 4 */ ROM_SEGMENT(ast_enmy_space), + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_meteo), + /* 7 */ ROM_SEGMENT(ast_warp_zone), + /* 8 */ NO_SEGMENT, + /* 9 */ NO_SEGMENT, + /* A */ NO_SEGMENT, + /* B */ NO_SEGMENT, + /* C */ NO_SEGMENT, + /* D */ NO_SEGMENT, + /* E */ ROM_SEGMENT(ast_great_fox), + /* F */ NO_SEGMENT } }, + { OVERLAY_OFFSETS(ovl_i2), + { /* 1 */ ROM_SEGMENT(ast_common), + /* 2 */ ROM_SEGMENT(ast_bg_space), + /* 3 */ ROM_SEGMENT(ast_arwing), + /* 4 */ ROM_SEGMENT(ast_enmy_space), + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_meteo), + /* 7 */ ROM_SEGMENT(ast_warp_zone), + /* 8 */ NO_SEGMENT, + /* 9 */ NO_SEGMENT, + /* A */ NO_SEGMENT, + /* B */ NO_SEGMENT, + /* C */ NO_SEGMENT, + /* D */ NO_SEGMENT, + /* E */ ROM_SEGMENT(ast_great_fox), + /* F */ NO_SEGMENT } }, +}; + +Scene D_800CBA74[6] = { + { OVERLAY_OFFSETS(ovl_i5), + { /* 1 */ ROM_SEGMENT(ast_common), + /* 2 */ ROM_SEGMENT(ast_bg_planet), + /* 3 */ ROM_SEGMENT(ast_landmaster), + /* 4 */ ROM_SEGMENT(ast_enmy_planet), + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_titania), + /* 7 */ ROM_SEGMENT(ast_7_ti_1), + /* 8 */ NO_SEGMENT, + /* 9 */ NO_SEGMENT, + /* A */ NO_SEGMENT, + /* B */ NO_SEGMENT, + /* C */ NO_SEGMENT, + /* D */ NO_SEGMENT, + /* E */ ROM_SEGMENT(ast_great_fox), + /* F */ NO_SEGMENT } }, + { OVERLAY_OFFSETS(ovl_i5), + { /* 1 */ ROM_SEGMENT(ast_common), + /* 2 */ ROM_SEGMENT(ast_bg_planet), + /* 3 */ ROM_SEGMENT(ast_landmaster), + /* 4 */ ROM_SEGMENT(ast_enmy_planet), + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_titania), + /* 7 */ ROM_SEGMENT(ast_7_ti_2), + /* 8 */ NO_SEGMENT, + /* 9 */ NO_SEGMENT, + /* A */ NO_SEGMENT, + /* B */ NO_SEGMENT, + /* C */ NO_SEGMENT, + /* D */ NO_SEGMENT, + /* E */ NO_SEGMENT, + /* F */ NO_SEGMENT } }, + { OVERLAY_OFFSETS(ovl_i5), + { /* 1 */ ROM_SEGMENT(ast_common), + /* 2 */ ROM_SEGMENT(ast_bg_planet), + /* 3 */ ROM_SEGMENT(ast_landmaster), + /* 4 */ ROM_SEGMENT(ast_enmy_planet), + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_titania), + /* 7 */ ROM_SEGMENT(ast_7_ti_2), + /* 8 */ ROM_SEGMENT(ast_8_ti), + /* 9 */ NO_SEGMENT, + /* A */ NO_SEGMENT, + /* B */ NO_SEGMENT, + /* C */ NO_SEGMENT, + /* D */ NO_SEGMENT, + /* E */ NO_SEGMENT, + /* F */ NO_SEGMENT } }, + { OVERLAY_OFFSETS(ovl_i5), + { /* 1 */ ROM_SEGMENT(ast_common), + /* 2 */ ROM_SEGMENT(ast_bg_planet), + /* 3 */ ROM_SEGMENT(ast_landmaster), + /* 4 */ ROM_SEGMENT(ast_enmy_planet), + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_titania), + /* 7 */ ROM_SEGMENT(ast_7_ti_2), + /* 8 */ ROM_SEGMENT(ast_8_ti), + /* 9 */ ROM_SEGMENT(ast_9_ti), + /* A */ NO_SEGMENT, + /* B */ NO_SEGMENT, + /* C */ NO_SEGMENT, + /* D */ NO_SEGMENT, + /* E */ NO_SEGMENT, + /* F */ NO_SEGMENT } }, + { OVERLAY_OFFSETS(ovl_i5), + { /* 1 */ ROM_SEGMENT(ast_common), + /* 2 */ ROM_SEGMENT(ast_bg_planet), + /* 3 */ ROM_SEGMENT(ast_landmaster), + /* 4 */ ROM_SEGMENT(ast_enmy_planet), + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_titania), + /* 7 */ ROM_SEGMENT(ast_7_ti_2), + /* 8 */ ROM_SEGMENT(ast_8_ti), + /* 9 */ ROM_SEGMENT(ast_9_ti), + /* A */ ROM_SEGMENT(ast_A_ti), + /* B */ NO_SEGMENT, + /* C */ NO_SEGMENT, + /* D */ NO_SEGMENT, + /* E */ NO_SEGMENT, + /* F */ NO_SEGMENT } }, + { OVERLAY_OFFSETS(ovl_i5), + { /* 1 */ ROM_SEGMENT(ast_common), + /* 2 */ ROM_SEGMENT(ast_bg_planet), + /* 3 */ ROM_SEGMENT(ast_landmaster), + /* 4 */ ROM_SEGMENT(ast_enmy_planet), + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_titania), + /* 7 */ ROM_SEGMENT(ast_7_ti_2), + /* 8 */ ROM_SEGMENT(ast_8_ti), + /* 9 */ ROM_SEGMENT(ast_9_ti), + /* A */ ROM_SEGMENT(ast_A_ti), + /* B */ NO_SEGMENT, + /* C */ NO_SEGMENT, + /* D */ NO_SEGMENT, + /* E */ ROM_SEGMENT(ast_great_fox), + /* F */ NO_SEGMENT } }, +}; + +Scene D_800CBE04[2] = { + { OVERLAY_OFFSETS(ovl_i2), + { /* 1 */ ROM_SEGMENT(ast_common), + /* 2 */ ROM_SEGMENT(ast_bg_space), + /* 3 */ ROM_SEGMENT(ast_arwing), + /* 4 */ ROM_SEGMENT(ast_enmy_space), + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_sector_x), + /* 7 */ ROM_SEGMENT(ast_warp_zone), + /* 8 */ NO_SEGMENT, + /* 9 */ NO_SEGMENT, + /* A */ NO_SEGMENT, + /* B */ NO_SEGMENT, + /* C */ NO_SEGMENT, + /* D */ ROM_SEGMENT(ast_allies), + /* E */ NO_SEGMENT, + /* F */ NO_SEGMENT } }, + { OVERLAY_OFFSETS(ovl_i2), + { /* 1 */ ROM_SEGMENT(ast_common), + /* 2 */ ROM_SEGMENT(ast_bg_space), + /* 3 */ ROM_SEGMENT(ast_arwing), + /* 4 */ ROM_SEGMENT(ast_enmy_space), + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_sector_x), + /* 7 */ ROM_SEGMENT(ast_warp_zone), + /* 8 */ NO_SEGMENT, + /* 9 */ NO_SEGMENT, + /* A */ NO_SEGMENT, + /* B */ NO_SEGMENT, + /* C */ NO_SEGMENT, + /* D */ ROM_SEGMENT(ast_allies), + /* E */ ROM_SEGMENT(ast_great_fox), + /* F */ NO_SEGMENT } }, +}; + +Scene D_800CBF34[1] = { + { OVERLAY_OFFSETS(ovl_i4), + { /* 1 */ ROM_SEGMENT(ast_common), + /* 2 */ ROM_SEGMENT(ast_bg_space), + /* 3 */ ROM_SEGMENT(ast_arwing), + /* 4 */ ROM_SEGMENT(ast_enmy_space), + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_sector_z), + /* 7 */ NO_SEGMENT, + /* 8 */ NO_SEGMENT, + /* 9 */ NO_SEGMENT, + /* A */ NO_SEGMENT, + /* B */ NO_SEGMENT, + /* C */ NO_SEGMENT, + /* D */ ROM_SEGMENT(ast_allies), + /* E */ ROM_SEGMENT(ast_great_fox), + /* F */ NO_SEGMENT } }, +}; + +Scene D_800CBFCC[1] = { + { OVERLAY_OFFSETS(ovl_i3), + { /* 1 */ ROM_SEGMENT(ast_common), + /* 2 */ ROM_SEGMENT(ast_bg_planet), + /* 3 */ ROM_SEGMENT(ast_blue_marine), + /* 4 */ ROM_SEGMENT(ast_enmy_planet), + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_aquas), + /* 7 */ NO_SEGMENT, + /* 8 */ NO_SEGMENT, + /* 9 */ NO_SEGMENT, + /* A */ NO_SEGMENT, + /* B */ NO_SEGMENT, + /* C */ NO_SEGMENT, + /* D */ NO_SEGMENT, + /* E */ ROM_SEGMENT(ast_great_fox), + /* F */ NO_SEGMENT } }, +}; + +Scene D_800CC064[1] = { + { OVERLAY_OFFSETS(ovl_i3), + { /* 1 */ ROM_SEGMENT(ast_common), + /* 2 */ ROM_SEGMENT(ast_bg_space), + /* 3 */ ROM_SEGMENT(ast_arwing), + /* 4 */ ROM_SEGMENT(ast_enmy_space), + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_area_6), + /* 7 */ NO_SEGMENT, + /* 8 */ NO_SEGMENT, + /* 9 */ NO_SEGMENT, + /* A */ NO_SEGMENT, + /* B */ NO_SEGMENT, + /* C */ NO_SEGMENT, + /* D */ NO_SEGMENT, + /* E */ ROM_SEGMENT(ast_great_fox), + /* F */ NO_SEGMENT } }, +}; + +Scene D_800CC0FC[2] = { + { OVERLAY_OFFSETS(ovl_i4), + { /* 1 */ ROM_SEGMENT(ast_common), + /* 2 */ ROM_SEGMENT(ast_bg_planet), + /* 3 */ ROM_SEGMENT(ast_arwing), + /* 4 */ ROM_SEGMENT(ast_enmy_planet), + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_fortuna), + /* 7 */ NO_SEGMENT, + /* 8 */ NO_SEGMENT, + /* 9 */ NO_SEGMENT, + /* A */ NO_SEGMENT, + /* B */ NO_SEGMENT, + /* C */ NO_SEGMENT, + /* D */ NO_SEGMENT, + /* E */ NO_SEGMENT, + /* F */ ROM_SEGMENT(ast_star_wolf) } }, + { OVERLAY_OFFSETS(ovl_i4), + { /* 1 */ ROM_SEGMENT(ast_common), + /* 2 */ ROM_SEGMENT(ast_bg_planet), + /* 3 */ ROM_SEGMENT(ast_arwing), + /* 4 */ ROM_SEGMENT(ast_enmy_planet), + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_fortuna), + /* 7 */ NO_SEGMENT, + /* 8 */ NO_SEGMENT, + /* 9 */ NO_SEGMENT, + /* A */ NO_SEGMENT, + /* B */ NO_SEGMENT, + /* C */ NO_SEGMENT, + /* D */ NO_SEGMENT, + /* E */ ROM_SEGMENT(ast_great_fox), + /* F */ NO_SEGMENT } }, +}; + +Scene D_800CC22C[1] = { + { OVERLAY_OFFSETS(ovl_i3), + { /* 1 */ ROM_SEGMENT(ast_common), + /* 2 */ ROM_SEGMENT(ast_bg_space), + /* 3 */ ROM_SEGMENT(ast_arwing), + /* 4 */ ROM_SEGMENT(ast_enmy_space), + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_area_6), + /* 7 */ NO_SEGMENT, + /* 8 */ NO_SEGMENT, + /* 9 */ NO_SEGMENT, + /* A */ NO_SEGMENT, + /* B */ NO_SEGMENT, + /* C */ NO_SEGMENT, + /* D */ NO_SEGMENT, + /* E */ ROM_SEGMENT(ast_great_fox), + /* F */ NO_SEGMENT } }, +}; + +Scene D_800CC2C4[1] = { + { OVERLAY_OFFSETS(ovl_i6), + { /* 1 */ ROM_SEGMENT(ast_common), + /* 2 */ ROM_SEGMENT(ast_bg_space), + /* 3 */ ROM_SEGMENT(ast_arwing), + /* 4 */ ROM_SEGMENT(ast_enmy_space), + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_sector_y), + /* 7 */ NO_SEGMENT, + /* 8 */ NO_SEGMENT, + /* 9 */ NO_SEGMENT, + /* A */ NO_SEGMENT, + /* B */ NO_SEGMENT, + /* C */ NO_SEGMENT, + /* D */ NO_SEGMENT, + /* E */ NO_SEGMENT, + /* F */ NO_SEGMENT } }, +}; + +Scene D_800CC35C[1] = { + { OVERLAY_OFFSETS(ovl_i3), + { /* 1 */ ROM_SEGMENT(ast_common), + /* 2 */ ROM_SEGMENT(ast_bg_planet), + /* 3 */ ROM_SEGMENT(ast_arwing), + /* 4 */ ROM_SEGMENT(ast_enmy_planet), + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_solar), + /* 7 */ NO_SEGMENT, + /* 8 */ NO_SEGMENT, + /* 9 */ NO_SEGMENT, + /* A */ NO_SEGMENT, + /* B */ NO_SEGMENT, + /* C */ NO_SEGMENT, + /* D */ ROM_SEGMENT(ast_allies), + /* E */ NO_SEGMENT, + /* F */ NO_SEGMENT } }, +}; + +Scene D_800CC3F4[1] = { + { OVERLAY_OFFSETS(ovl_i3), + { /* 1 */ ROM_SEGMENT(ast_common), + /* 2 */ ROM_SEGMENT(ast_bg_planet), + /* 3 */ ROM_SEGMENT(ast_arwing), + /* 4 */ ROM_SEGMENT(ast_enmy_planet), + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_zoness), + /* 7 */ NO_SEGMENT, + /* 8 */ NO_SEGMENT, + /* 9 */ NO_SEGMENT, + /* A */ NO_SEGMENT, + /* B */ NO_SEGMENT, + /* C */ NO_SEGMENT, + /* D */ ROM_SEGMENT(ast_allies), + /* E */ NO_SEGMENT, + /* F */ NO_SEGMENT } }, +}; + +Scene D_800CC48C[1] = { + { OVERLAY_OFFSETS(ovl_i1), + { /* 1 */ ROM_SEGMENT(ast_common), + /* 2 */ ROM_SEGMENT(ast_bg_planet), + /* 3 */ ROM_SEGMENT(ast_arwing), + /* 4 */ ROM_SEGMENT(ast_enmy_planet), + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_venom_1), + /* 7 */ NO_SEGMENT, + /* 8 */ NO_SEGMENT, + /* 9 */ ROM_SEGMENT(ast_ve1_boss), + /* A */ NO_SEGMENT, + /* B */ NO_SEGMENT, + /* C */ NO_SEGMENT, + /* D */ ROM_SEGMENT(ast_allies), + /* E */ NO_SEGMENT, + /* F */ NO_SEGMENT } }, +}; + +Scene D_800CC524[1] = { + { OVERLAY_OFFSETS(ovl_i6), + { /* 1 */ ROM_SEGMENT(ast_common), + /* 2 */ ROM_SEGMENT(ast_bg_planet), + /* 3 */ ROM_SEGMENT(ast_arwing), + /* 4 */ NO_SEGMENT, + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_venom_2), + /* 7 */ NO_SEGMENT, + /* 8 */ NO_SEGMENT, + /* 9 */ NO_SEGMENT, + /* A */ NO_SEGMENT, + /* B */ NO_SEGMENT, + /* C */ ROM_SEGMENT(ast_andross), + /* D */ ROM_SEGMENT(ast_allies), + /* E */ NO_SEGMENT, + /* F */ NO_SEGMENT } }, +}; + +Scene D_800CC5BC[2] = { + { OVERLAY_OFFSETS(ovl_i6), + { /* 1 */ ROM_SEGMENT(ast_common), + /* 2 */ ROM_SEGMENT(ast_bg_planet), + /* 3 */ ROM_SEGMENT(ast_arwing), + /* 4 */ ROM_SEGMENT(ast_enmy_planet), + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_venom_2), + /* 7 */ NO_SEGMENT, + /* 8 */ NO_SEGMENT, + /* 9 */ NO_SEGMENT, + /* A */ NO_SEGMENT, + /* B */ NO_SEGMENT, + /* C */ NO_SEGMENT, + /* D */ NO_SEGMENT, + /* E */ NO_SEGMENT, + /* F */ ROM_SEGMENT(ast_star_wolf) } }, + { OVERLAY_OFFSETS(ovl_i6), + { /* 1 */ ROM_SEGMENT(ast_common), + /* 2 */ ROM_SEGMENT(ast_bg_planet), + /* 3 */ ROM_SEGMENT(ast_arwing), + /* 4 */ ROM_SEGMENT(ast_enmy_planet), + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_venom_2), + /* 7 */ NO_SEGMENT, + /* 8 */ NO_SEGMENT, + /* 9 */ NO_SEGMENT, + /* A */ NO_SEGMENT, + /* B */ NO_SEGMENT, + /* C */ NO_SEGMENT, + /* D */ NO_SEGMENT, + /* E */ ROM_SEGMENT(ast_great_fox), + /* F */ NO_SEGMENT } }, +}; + +Scene D_800CC6EC[1] = { + { OVERLAY_OFFSETS(ovl_i2), + { /* 1 */ ROM_SEGMENT(ast_common), + /* 2 */ ROM_SEGMENT(ast_bg_planet), + /* 3 */ ROM_SEGMENT(ast_arwing), + /* 4 */ ROM_SEGMENT(ast_enmy_planet), + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_ve1_boss), + /* 7 */ NO_SEGMENT, + /* 8 */ NO_SEGMENT, + /* 9 */ NO_SEGMENT, + /* A */ NO_SEGMENT, + /* B */ NO_SEGMENT, + /* C */ NO_SEGMENT, + /* D */ NO_SEGMENT, + /* E */ NO_SEGMENT, + /* F */ NO_SEGMENT } }, +}; + +Scene D_800CC784[1] = { + { OVERLAY_OFFSETS(ovl_i4), + { /* 1 */ ROM_SEGMENT(ast_common), + /* 2 */ ROM_SEGMENT(ast_bg_space), + /* 3 */ ROM_SEGMENT(ast_arwing), + /* 4 */ ROM_SEGMENT(ast_enmy_space), + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_bolse), + /* 7 */ NO_SEGMENT, + /* 8 */ NO_SEGMENT, + /* 9 */ NO_SEGMENT, + /* A */ NO_SEGMENT, + /* B */ NO_SEGMENT, + /* C */ NO_SEGMENT, + /* D */ NO_SEGMENT, + /* E */ NO_SEGMENT, + /* F */ ROM_SEGMENT(ast_star_wolf) } }, +}; + +Scene D_800CC81C[1] = { + { OVERLAY_OFFSETS(ovl_i4), + { /* 1 */ ROM_SEGMENT(ast_common), + /* 2 */ ROM_SEGMENT(ast_bg_planet), + /* 3 */ ROM_SEGMENT(ast_arwing), + /* 4 */ ROM_SEGMENT(ast_enmy_planet), + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_katina), + /* 7 */ NO_SEGMENT, + /* 8 */ NO_SEGMENT, + /* 9 */ NO_SEGMENT, + /* A */ NO_SEGMENT, + /* B */ NO_SEGMENT, + /* C */ NO_SEGMENT, + /* D */ ROM_SEGMENT(ast_allies), + /* E */ NO_SEGMENT, + /* F */ ROM_SEGMENT(ast_star_wolf) } }, +}; + +Scene D_800CC8B4[2] = { + { OVERLAY_OFFSETS(ovl_i5), + { /* 1 */ ROM_SEGMENT(ast_common), + /* 2 */ ROM_SEGMENT(ast_bg_planet), + /* 3 */ ROM_SEGMENT(ast_landmaster), + /* 4 */ ROM_SEGMENT(ast_enmy_planet), + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_macbeth), + /* 7 */ NO_SEGMENT, + /* 8 */ NO_SEGMENT, + /* 9 */ NO_SEGMENT, + /* A */ NO_SEGMENT, + /* B */ NO_SEGMENT, + /* C */ NO_SEGMENT, + /* D */ ROM_SEGMENT(ast_allies), + /* E */ NO_SEGMENT, + /* F */ NO_SEGMENT } }, + { OVERLAY_OFFSETS(ovl_i5), + { /* 1 */ ROM_SEGMENT(ast_common), + /* 2 */ ROM_SEGMENT(ast_bg_planet), + /* 3 */ ROM_SEGMENT(ast_landmaster), + /* 4 */ ROM_SEGMENT(ast_enmy_planet), + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_macbeth), + /* 7 */ NO_SEGMENT, + /* 8 */ NO_SEGMENT, + /* 9 */ NO_SEGMENT, + /* A */ NO_SEGMENT, + /* B */ NO_SEGMENT, + /* C */ NO_SEGMENT, + /* D */ NO_SEGMENT, + /* E */ ROM_SEGMENT(ast_great_fox), + /* F */ NO_SEGMENT } }, +}; + +Scene D_800CC9E4[1] = { + { OVERLAY_OFFSETS(ovl_i1), + { /* 1 */ ROM_SEGMENT(ast_common), + /* 2 */ ROM_SEGMENT(ast_bg_planet), + /* 3 */ ROM_SEGMENT(ast_arwing), + /* 4 */ ROM_SEGMENT(ast_enmy_planet), + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ ROM_SEGMENT(ast_training), + /* 7 */ NO_SEGMENT, + /* 8 */ NO_SEGMENT, + /* 9 */ NO_SEGMENT, + /* A */ NO_SEGMENT, + /* B */ NO_SEGMENT, + /* C */ NO_SEGMENT, + /* D */ NO_SEGMENT, + /* E */ NO_SEGMENT, + /* F */ ROM_SEGMENT(ast_star_wolf) } }, +}; + +Scene D_800CCA7C[2] = { + { OVERLAY_OFFSETS(ovl_i2), + { /* 1 */ ROM_SEGMENT(ast_common), + /* 2 */ ROM_SEGMENT(ast_bg_planet), + /* 3 */ ROM_SEGMENT(ast_versus), + /* 4 */ ROM_SEGMENT(ast_enmy_planet), + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ NO_SEGMENT, + /* 7 */ ROM_SEGMENT(ast_vs_menu), + /* 8 */ NO_SEGMENT, + /* 9 */ NO_SEGMENT, + /* A */ NO_SEGMENT, + /* B */ NO_SEGMENT, + /* C */ NO_SEGMENT, + /* D */ NO_SEGMENT, + /* E */ NO_SEGMENT, + /* F */ NO_SEGMENT } }, + { OVERLAY_OFFSETS(ovl_i2), + { /* 1 */ ROM_SEGMENT(ast_common), + /* 2 */ ROM_SEGMENT(ast_bg_space), + /* 3 */ ROM_SEGMENT(ast_versus), + /* 4 */ ROM_SEGMENT(ast_enmy_space), + /* 5 */ ROM_SEGMENT(ast_text), + /* 6 */ NO_SEGMENT, + /* 7 */ ROM_SEGMENT(ast_vs_menu), + /* 8 */ NO_SEGMENT, + /* 9 */ NO_SEGMENT, + /* A */ NO_SEGMENT, + /* B */ NO_SEGMENT, + /* C */ NO_SEGMENT, + /* D */ NO_SEGMENT, + /* E */ NO_SEGMENT, + /* F */ NO_SEGMENT } }, +}; + +Scene sOvlUnused_Unk[1] = { + { OVERLAY_OFFSETS(ovl_unused), + { /* 0x1 */ NO_SEGMENT, + /* 0x2 */ NO_SEGMENT, + /* 0x3 */ NO_SEGMENT, + /* 0x4 */ NO_SEGMENT, + /* 0x5 */ NO_SEGMENT, + /* 0x6 */ NO_SEGMENT, + /* 0x7 */ NO_SEGMENT, + /* 0x8 */ NO_SEGMENT, + /* 0x9 */ NO_SEGMENT, + /* 0xA */ NO_SEGMENT, + /* 0xB */ NO_SEGMENT, + /* 0xC */ NO_SEGMENT, + /* 0xD */ NO_SEGMENT, + /* 0xE */ NO_SEGMENT, + /* 0xF */ NO_SEGMENT } }, +}; diff --git a/srceu/engine/fox_message.c b/srceu/engine/fox_message.c new file mode 100644 index 00000000..8bab23a1 --- /dev/null +++ b/srceu/engine/fox_message.c @@ -0,0 +1,17 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_message/func_800C3350.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_message/func_800C33E4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_message/func_800C3468.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_message/func_800C34B4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_message/func_800C34E8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_message/func_800C367C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_message/func_800C38C8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_message/func_800C3ABC.s") diff --git a/srceu/engine/fox_pause.c b/srceu/engine/fox_pause.c new file mode 100644 index 00000000..d77e832f --- /dev/null +++ b/srceu/engine/fox_pause.c @@ -0,0 +1,5 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_pause/func_800A4360.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_pause/func_800A44C0.s") diff --git a/srceu/engine/fox_play.c b/srceu/engine/fox_play.c new file mode 100644 index 00000000..4a88d529 --- /dev/null +++ b/srceu/engine/fox_play.c @@ -0,0 +1,204 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800A4610.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800A4670.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800A4684.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800A46AC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800A4B20.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800A4D60.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800A5300.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800A560C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800A563C.s") + +void func_800A59F0(void) { +} + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800A59F8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800A5C70.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800A5EA0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800A5F04.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800A600C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800A642C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800A657C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800A6660.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800A66E8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800A6730.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800A6778.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800A67A8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800A67D8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800A6808.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800A6C50.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800A6D4C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800A6DCC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800A70B8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800A7134.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800A7180.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800A7390.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800A795C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800A7AA4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800A7F84.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800A8034.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800A8714.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800A89C4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800A8DA4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800A8EC4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800A8F3C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800A9264.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800AAEBC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800AB968.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800AB9C0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800AB9F0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800AC020.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800AC0C4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800AC170.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800AC95C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800ACD1C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800AD10C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800AD188.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800AD348.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800AD48C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800AD760.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800AD7E4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800AD8C0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800ADEBC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800AE0F4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800AE464.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800AE624.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800AE944.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800AEB70.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800AF3AC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800AF77C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800B005C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800B07F4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800B08C8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800B1684.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800B2864.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800B29F4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800B2CA8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800B3314.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800B3334.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800B3744.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800B3A48.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800B4114.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800B47E0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800B4890.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800B4914.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800B4920.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800B49E4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800B4BF8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800B4E2C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800B4FE4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800B5DE4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800B6458.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800B66E4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800B6AE4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800B6F70.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800B7324.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800B7678.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800B78AC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800B790C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800B7B08.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800B80D8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800B8A54.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800B8C54.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800B8DCC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/func_800B8DF4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_play/D_800D9760.s") diff --git a/srceu/engine/fox_radio.c b/srceu/engine/fox_radio.c new file mode 100644 index 00000000..5fdc76d3 --- /dev/null +++ b/srceu/engine/fox_radio.c @@ -0,0 +1,13 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_radio/func_800BAE90.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_radio/func_800BAEEC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_radio/func_800BAF38.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_radio/func_800BB230.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_radio/func_800BBAD0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_radio/func_800BBD18.s") diff --git a/srceu/engine/fox_rcp.c b/srceu/engine/fox_rcp.c new file mode 100644 index 00000000..2534959b --- /dev/null +++ b/srceu/engine/fox_rcp.c @@ -0,0 +1,109 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800B9500.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800B9544.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800B9648.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800B9678.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800B96A8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800B96D8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800B9708.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800B9738.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800B9850.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800B9880.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800B98B0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800B99C8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800B99F8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800B9A28.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800B9A58.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800B9A88.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800B9AB8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800B9BD0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800B9C00.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800B9D18.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800B9D48.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800B9E60.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800B9E90.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800B9EC0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800B9FD8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800BA0F0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800BA120.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800BA150.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800BA268.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800BA380.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800BA498.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800BA5B0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800BA5E0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800BA6F8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800BA810.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800BA840.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800BA870.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800BA8A0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800BA8D0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800BA900.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800BAA18.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800BAB30.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800BAB60.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800BAB90.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800BABC0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800BABF0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800BAC20.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800BAC50.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800BAC80.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800BACB0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800BACE0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800BAD10.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800BAD40.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_rcp/func_800BAD70.s") diff --git a/srceu/engine/fox_reset.c b/srceu/engine/fox_reset.c new file mode 100644 index 00000000..908eebae --- /dev/null +++ b/srceu/engine/fox_reset.c @@ -0,0 +1,3 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_reset/func_800BC830.s") diff --git a/srceu/engine/fox_save.c b/srceu/engine/fox_save.c new file mode 100644 index 00000000..0d112d1f --- /dev/null +++ b/srceu/engine/fox_save.c @@ -0,0 +1,9 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_save/func_800C3B40.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_save/func_800C3C14.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_save/func_800C3D24.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_save/D_800DA8A0.s") diff --git a/srceu/engine/fox_std_lib.c b/srceu/engine/fox_std_lib.c new file mode 100644 index 00000000..cbcae9f7 --- /dev/null +++ b/srceu/engine/fox_std_lib.c @@ -0,0 +1,91 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_8009A350.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_8009A3A8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_8009A3FC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_8009A7F8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_8009ADD0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_8009AE10.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_8009B0FC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_8009B3F0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_8009B6AC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_8009B6E8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_8009C11C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_8009C154.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_8009C5FC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_8009C708.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_8009C8BC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_8009CAF4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_8009CCF0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_8009D044.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_8009D398.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_8009D70C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_8009DA8C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_8009DDE8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_8009E09C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_8009E364.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_8009E61C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_8009E8E4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_8009EBB8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_8009EE80.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_8009F154.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_8009F408.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_8009F6D4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_8009F9AC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_8009FC90.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_8009FF44.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_800A009C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_800A0138.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_800A0184.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_800A0418.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_800A0AC4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_800A13D8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_800A15CC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_800A17C0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_800A1A04.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_800A1B58.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_std_lib/func_800A1B70.s") diff --git a/srceu/engine/fox_tank.c b/srceu/engine/fox_tank.c new file mode 100644 index 00000000..44d7bc52 --- /dev/null +++ b/srceu/engine/fox_tank.c @@ -0,0 +1,55 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_tank/func_80043250.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_tank/func_80043438.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_tank/func_800438B0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_tank/func_80043A70.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_tank/func_80043ADC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_tank/func_80043AE8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_tank/func_800440F0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_tank/func_80044198.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_tank/func_800443AC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_tank/func_8004448C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_tank/func_80044838.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_tank/func_80045100.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_tank/func_80045318.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_tank/func_80045648.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_tank/func_80045E4C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_tank/func_800460B0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_tank/func_80046230.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_tank/func_80046328.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_tank/func_800463EC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_tank/func_800466D4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_tank/func_80046E10.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_tank/func_800474D4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_tank/func_80047724.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_tank/func_80047D08.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_tank/func_80047E4C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_tank/func_80047F8C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_tank/func_800481C4.s") diff --git a/srceu/engine/fox_versus.c b/srceu/engine/fox_versus.c new file mode 100644 index 00000000..aed0ae3e --- /dev/null +++ b/srceu/engine/fox_versus.c @@ -0,0 +1,151 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800BCB00.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800BCC2C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800BCCF0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800BCEDC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800BD044.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800BD1EC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800BD3C8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800BD508.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800BD6F4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800BD754.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800BD870.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800BD8E8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800BD958.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800BD9A4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800BD9F0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800BDA3C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800BDA94.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800BDAEC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800BDB44.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800BDC08.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800BDD34.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800BDF80.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800BDFCC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800BE090.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800BE2C8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800BE320.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800BE36C.s") + +void func_800BE708(void) { +} + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800BE710.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800BE944.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800BEBCC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800BEE30.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800BF1F0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800BF574.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800BF604.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800BF67C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800BF7A0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800BF884.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800BFA9C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800BFEBC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800C0070.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800C02CC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800C0B6C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800C0BB4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800C0E64.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800C120C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800C12A8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800C13B4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800C1454.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800C14E8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800C15F0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800C17A4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800C1830.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800C1998.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800C1B9C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800C1C58.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800C1E88.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800C20F8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800C21B0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800C21C0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800C21F0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800C2220.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800C228C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800C29BC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800C29F4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800C2BD0.s") + +void func_800C2CB0(void) { +} + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800C2CB8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800C2D64.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800C31E8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/D_800DA6C0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/D_800DA6C4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/D_800DA6CC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/D_800DA6D4.s") diff --git a/srceu/libc_math64.c b/srceu/libc_math64.c new file mode 100644 index 00000000..b1753525 --- /dev/null +++ b/srceu/libc_math64.c @@ -0,0 +1,25 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/libc_math64/func_8001FB80.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/libc_math64/func_8001FBB4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/libc_math64/func_8001FBD4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/libc_math64/func_8001FBF4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/libc_math64/func_8001FC28.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/libc_math64/func_8001FC58.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/libc_math64/func_8001FC78.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/libc_math64/func_8001FC98.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/libc_math64/func_8001FCB8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/libc_math64/func_8001FDDC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/libc_math64/func_8001FED0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/libc_math64/func_8001FF00.s") diff --git a/srceu/libc_sprintf.c b/srceu/libc_sprintf.c new file mode 100644 index 00000000..560b0cdf --- /dev/null +++ b/srceu/libc_sprintf.c @@ -0,0 +1,7 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/libc_sprintf/func_8001FAB0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/libc_sprintf/func_8001FAD4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/libc_sprintf/func_8001FB24.s") diff --git a/srceu/overlays/ovl_ending/end1.c b/srceu/overlays/ovl_ending/end1.c new file mode 100644 index 00000000..cca56cac --- /dev/null +++ b/srceu/overlays/ovl_ending/end1.c @@ -0,0 +1,61 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end1/func_ending_8018B020.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end1/func_ending_8018B1A4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end1/func_ending_8018B360.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end1/func_ending_8018B83C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end1/func_ending_8018BB30.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end1/func_ending_8018BEA4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end1/func_ending_8018BF6C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end1/func_ending_8018C13C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end1/func_ending_8018C1FC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end1/func_ending_8018C3FC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end1/func_ending_8018C8BC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end1/func_ending_8018CC10.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end1/func_ending_8018D770.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end1/func_ending_8018DB30.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end1/func_ending_8018DC30.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end1/func_ending_8018DDB4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end1/func_ending_8018E07C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end1/func_ending_8018E314.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end1/func_ending_8018E3E8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end1/func_ending_8018E458.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end1/func_ending_8018E5D8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end1/func_ending_8018E7A4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end1/func_ending_8018E8E8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end1/func_ending_8018E9E0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end1/func_ending_8018EA94.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end1/func_ending_8018EC1C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end1/func_ending_8018EE8C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end1/func_ending_8018F06C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end1/func_ending_8018F500.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end1/D_ending_80199A70.s") diff --git a/srceu/overlays/ovl_ending/end2.c b/srceu/overlays/ovl_ending/end2.c new file mode 100644 index 00000000..b8f36d7b --- /dev/null +++ b/srceu/overlays/ovl_ending/end2.c @@ -0,0 +1,243 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/func_ending_80190100.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/func_ending_80190918.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/func_ending_80190954.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/func_ending_80190990.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/func_ending_80190A60.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/func_ending_80190B84.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/func_ending_80190D00.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/func_ending_80190EE0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/func_ending_801910D8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/func_ending_801913A0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/func_ending_801918A4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/func_ending_80191EA4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/func_ending_801924A4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/func_ending_80192994.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/func_ending_80192D38.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/func_ending_8019334C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/func_ending_80193960.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/func_ending_80193D34.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/func_ending_80193E64.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/func_ending_801943DC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/func_ending_80194920.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/func_ending_80194980.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/func_ending_80194E14.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/func_ending_80194E24.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/func_ending_8019536C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/func_ending_80195390.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/func_ending_80195878.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/func_ending_801959A4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/func_ending_80195A90.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/func_ending_80195C00.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/func_ending_80195DE8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199D30.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199D3C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199D50.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199D5C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199D6C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199D7C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199D8C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199DA0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199DB0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199DC0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199DCC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199DDC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199DF8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199E08.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199E1C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199E30.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199E40.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199E50.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199E64.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199E78.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199E88.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199E9C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199EB0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199EC0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199ECC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199EDC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199EEC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199EF8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199F08.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199F1C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199F28.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199F3C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199F4C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199F5C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199F6C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199F80.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199F94.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199FA0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199FAC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199FBC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199FD0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199FDC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199FE8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_80199FF4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A00C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A01C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A030.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A040.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A058.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A064.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A078.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A08C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A0A4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A0B4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A0C4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A0D4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A0EC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A100.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A114.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A124.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A130.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A140.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A154.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A168.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A178.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A184.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A198.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A1A8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A1BC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A1C8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A1D4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A1EC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A1F8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A204.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A214.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A224.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A230.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A244.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A250.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A260.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A26C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A280.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A294.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A2A8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A2B4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A2C0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A2CC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A2D8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A2E4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_ending/end2/D_ending_8019A2F4.s") diff --git a/srceu/overlays/ovl_i1/fox_co.c b/srceu/overlays/ovl_i1/fox_co.c new file mode 100644 index 00000000..2d262116 --- /dev/null +++ b/srceu/overlays/ovl_i1/fox_co.c @@ -0,0 +1,129 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018B030.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018B03C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018B0A4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018B170.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018B210.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018B2A0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018B338.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018B3D8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018B48C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018B4F0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018B538.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018B588.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018B5C8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018C248.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018C2A4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018C510.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018C768.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018C83C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018CB38.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018DEEC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018E1E8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018E52C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018E5C0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018E61C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018E798.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018E988.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018EB6C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018EC14.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018EED0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018F044.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018F564.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018F5B4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018F65C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018F6B0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018F708.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018F73C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018F834.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018F88C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018F934.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018FB68.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8018FC54.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_80191838.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_80191D14.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_801921E8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_801926C8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_80192720.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_80192790.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_801927EC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_801928A0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_801928F8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_801929AC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_80192A04.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_80192AB8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_80192C3C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_80192D90.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_80192E30.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_80192F18.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_80192FD0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_801930EC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_8019316C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_801932F4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_801949F4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/func_i1_80194BE0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_co/D_i1_8019E900.s") diff --git a/srceu/overlays/ovl_i1/fox_i1.c b/srceu/overlays/ovl_i1/fox_i1.c new file mode 100644 index 00000000..627edb7b --- /dev/null +++ b/srceu/overlays/ovl_i1/fox_i1.c @@ -0,0 +1,3 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_i1/func_i1_8018B020.s") diff --git a/srceu/overlays/ovl_i1/fox_tr.c b/srceu/overlays/ovl_i1/fox_tr.c new file mode 100644 index 00000000..dda3c955 --- /dev/null +++ b/srceu/overlays/ovl_i1/fox_tr.c @@ -0,0 +1,7 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_tr/func_i1_8019C340.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_tr/func_i1_8019C3C8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_tr/D_i1_8019F070.s") diff --git a/srceu/overlays/ovl_i1/fox_tr360.c b/srceu/overlays/ovl_i1/fox_tr360.c new file mode 100644 index 00000000..e0818041 --- /dev/null +++ b/srceu/overlays/ovl_i1/fox_tr360.c @@ -0,0 +1,9 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_tr360/func_i1_8019C6B0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_tr360/func_i1_8019C82C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_tr360/func_i1_8019CA84.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_tr360/func_i1_8019CEFC.s") diff --git a/srceu/overlays/ovl_i1/fox_ve1.c b/srceu/overlays/ovl_i1/fox_ve1.c new file mode 100644 index 00000000..ddec098a --- /dev/null +++ b/srceu/overlays/ovl_i1/fox_ve1.c @@ -0,0 +1,59 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_80195B60.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_80195D4C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_80195DC8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_80195E30.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_80195EAC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_80195F18.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_80195F7C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_80195F88.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_80196514.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_80196720.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_80196744.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_8019689C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_80196914.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_80196920.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_80196E24.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_80196E4C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_80196F40.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_80196FB0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_8019703C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_80197264.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_801977D4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_80197E08.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_8019BD70.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_8019BE74.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_8019BFF4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_8019C044.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_8019C0AC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/func_i1_8019C318.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i1/fox_ve1/D_i1_8019ECC0.s") diff --git a/srceu/overlays/ovl_i2/fox_i2.c b/srceu/overlays/ovl_i2/fox_i2.c new file mode 100644 index 00000000..65f6a2d4 --- /dev/null +++ b/srceu/overlays/ovl_i2/fox_i2.c @@ -0,0 +1,3 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_i2/func_i2_8018B020.s") diff --git a/srceu/overlays/ovl_i2/fox_me.c b/srceu/overlays/ovl_i2/fox_me.c new file mode 100644 index 00000000..01677f65 --- /dev/null +++ b/srceu/overlays/ovl_i2/fox_me.c @@ -0,0 +1,97 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8018B030.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8018B06C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8018B150.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8018B2C4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8018B45C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8018B608.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8018B768.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8018B808.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8018B898.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8018B938.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8018BAF8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8018BB88.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8018BCA8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8018BD28.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8018BD98.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8018BE44.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8018C2CC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8018C53C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8018C67C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8018C724.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8018C7A4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8018C984.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8018CA24.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8018CAA4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8018CC0C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8018CDE8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8018D11C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8018D284.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8018F294.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8018F59C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8019024C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_801903C4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_801904E0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_801905A8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_80190620.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_801907C8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_8019085C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_801914F0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_80191570.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_801915F0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_80191670.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_801916F0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_801917E8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_80191918.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_80191A0C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_80191B88.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/func_i2_80192890.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_me/D_i2_80199230.s") diff --git a/srceu/overlays/ovl_i2/fox_sx.c b/srceu/overlays/ovl_i2/fox_sx.c new file mode 100644 index 00000000..de30251b --- /dev/null +++ b/srceu/overlays/ovl_i2/fox_sx.c @@ -0,0 +1,47 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_80192B30.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_80192C20.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_80192CD8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_80192E2C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_8019337C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_801934FC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_801936B4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_80193930.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_80193A18.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_80193A38.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_80193A7C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_80193AD4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_80193B18.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_80193B70.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_801965BC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_80196CD4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_80196F00.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_801972CC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_801973A4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_801974FC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_80197FA0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_sx/func_i2_801981F4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i2/fox_sx/D_i2_801994F0.s") diff --git a/srceu/overlays/ovl_i3/fox_a6.c b/srceu/overlays/ovl_i3/fox_a6.c new file mode 100644 index 00000000..5b4a0cb0 --- /dev/null +++ b/srceu/overlays/ovl_i3/fox_a6.c @@ -0,0 +1,53 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_8018B030.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_8018B0E4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_8018B17C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_8018B204.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_8018B254.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_8018B444.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_8018DC94.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_8018DDA8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_8018DF48.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_8018F4A0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_8018F7B8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_8018FBB4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_80190030.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_80190EA8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_80190FBC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_801910A4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_80191170.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_801912E0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_801913FC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_80191534.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_80191A50.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_8019255C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_80192610.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_8019270C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_a6/func_i3_8019284C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_a6/D_i3_801C4360.s") diff --git a/srceu/overlays/ovl_i3/fox_aq.c b/srceu/overlays/ovl_i3/fox_aq.c new file mode 100644 index 00000000..97c7bf78 --- /dev/null +++ b/srceu/overlays/ovl_i3/fox_aq.c @@ -0,0 +1,213 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801AC8B0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801ACD6C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801ACDF4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801ACEC8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801ACF6C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801AD00C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801AD048.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801AD15C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801AD1A8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801AD2A4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801AD454.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801AD718.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801AD864.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801AD950.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801ADC8C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801ADF3C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801AE368.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801AE778.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801AF430.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801AF4C0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801AFB1C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801AFC0C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801AFCF4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B0248.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B0328.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B0398.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B0634.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B08D0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B0DA8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B1018.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B1108.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B1140.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B19FC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B1BE8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B1E2C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B1E58.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B25BC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B3474.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B34D4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B4414.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B45D8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B4938.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B4A00.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B4A44.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B4A80.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B4B6C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B4DC0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B7D0C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B843C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B87E4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B883C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B88F4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B8AAC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B8B48.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B9678.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B99C8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B9BFC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B9DA4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801B9DEC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801BA8B4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801BAA58.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801BB14C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801BB1B4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801BB484.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801BB550.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801BB6D8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801BC6B0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801BC7DC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801BCB3C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801BCC04.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801BD810.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801BDB68.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801BDCCC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801BDF44.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801BDFDC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801BE104.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801BE7DC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801BE858.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801BEB24.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801BEC64.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801BECCC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801BF1FC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801BFF90.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801C037C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801C0390.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801C0400.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801C0BDC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801C0CC4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801C0E10.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801C0FAC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801C185C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801C18CC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801C1974.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801C1A94.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801C1B50.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801C1C5C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801C1CD4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801C1E58.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801C257C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801C26B0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801C26BC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801C26C8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801C26D4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801C26E0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/func_i3_801C26EC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_aq/D_i3_801C5490.s") diff --git a/srceu/overlays/ovl_i3/fox_i3.c b/srceu/overlays/ovl_i3/fox_i3.c new file mode 100644 index 00000000..a8e43d32 --- /dev/null +++ b/srceu/overlays/ovl_i3/fox_i3.c @@ -0,0 +1,3 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_i3/func_i3_8018B020.s") diff --git a/srceu/overlays/ovl_i3/fox_so.c b/srceu/overlays/ovl_i3/fox_so.c new file mode 100644 index 00000000..4bd90ee1 --- /dev/null +++ b/srceu/overlays/ovl_i3/fox_so.c @@ -0,0 +1,105 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A2270.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A2338.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A23A0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A2474.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A24FC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A29B0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A2AB8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A2B30.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A2C14.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A2C8C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A322C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A341C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A3524.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A3860.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A3968.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A39C4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A3A40.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A3ABC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A3BA0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A4570.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A476C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A4810.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A4878.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A4A54.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A4B74.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A5794.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A58D0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A596C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A5A3C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A5E54.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A5EAC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A66F4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A6750.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A6B84.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A6BE0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A6F14.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A6FBC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A76F8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A7CBC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A8360.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A84D8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A8964.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A899C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A915C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801A95E0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801AA340.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801AA674.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801AAC50.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801AB1E8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801AB3C8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801AC670.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_so/func_i3_801AC840.s") diff --git a/srceu/overlays/ovl_i3/fox_zo.c b/srceu/overlays/ovl_i3/fox_zo.c new file mode 100644 index 00000000..b102ae6e --- /dev/null +++ b/srceu/overlays/ovl_i3/fox_zo.c @@ -0,0 +1,177 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80193A20.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80193AF8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80193BCC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80193C6C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80193CD4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80193F00.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80193F9C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80194260.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_801944D0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8019461C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_801947DC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_801949D8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_801949F8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80194AE0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80194F94.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80195074.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80195150.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8019561C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80195688.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80195694.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80195880.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80195964.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80195ACC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80195B64.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_801961C4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80196304.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_801966E8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80196754.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80196934.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80196D10.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80196D7C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_801970F8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_801972A8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_801973D8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80197440.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80197568.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_801975D8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8019772C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80197798.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_801977D8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80197E64.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_801984AC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_80198554.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8019C194.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8019C494.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8019C680.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8019C964.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8019C9D4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8019CB14.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8019CBDC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8019CC60.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8019CE24.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8019CF00.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8019D0BC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8019D12C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8019D2CC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8019D370.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8019D45C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8019D4B8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8019D8B4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8019D92C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8019D9A0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8019DC8C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8019DF70.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8019E064.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8019E75C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8019EC80.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8019EFD8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8019F26C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8019F2A0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8019F2E4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8019F708.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8019F870.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8019F8D8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8019FC5C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8019FC90.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_8019FEE4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_801A02CC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_801A067C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_801A08E8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_801A0AF0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_801A0BEC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_801A0DD0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_801A0E54.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_801A0EB8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_801A1204.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/func_i3_801A2070.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i3/fox_zo/D_i3_801C4810.s") diff --git a/srceu/overlays/ovl_i4/fox_bo.c b/srceu/overlays/ovl_i4/fox_bo.c new file mode 100644 index 00000000..9374f5a8 --- /dev/null +++ b/srceu/overlays/ovl_i4/fox_bo.c @@ -0,0 +1,91 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_8018F7C0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_8018F958.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_8018FBB8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_8019068C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80190714.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80190888.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80190A34.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80190B50.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80190CA4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80190DC0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80190E40.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80190E80.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80190F1C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80190FB0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_8019121C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_801912A0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_8019138C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_801913F8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_801918B8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80191A88.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80191E28.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_8019213C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_8019229C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80192518.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80192648.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_801926E0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80192770.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80192878.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80192998.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_8019326C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_8019337C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_801947C4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80194910.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80194984.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80194A14.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80194A80.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80194BAC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80194D28.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80195308.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80195490.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80195520.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_801955D0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_801957D0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_801958F8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_bo/func_i4_80195C84.s") diff --git a/srceu/overlays/ovl_i4/fox_fo.c b/srceu/overlays/ovl_i4/fox_fo.c new file mode 100644 index 00000000..646b3805 --- /dev/null +++ b/srceu/overlays/ovl_i4/fox_fo.c @@ -0,0 +1,29 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_fo/func_i4_8018B0F0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_fo/func_i4_8018B384.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_fo/func_i4_8018B460.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_fo/func_i4_8018C374.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_fo/func_i4_8018C4FC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_fo/func_i4_8018C584.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_fo/func_i4_8018C854.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_fo/func_i4_8018C9BC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_fo/func_i4_8018CA98.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_fo/func_i4_8018CB20.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_fo/func_i4_8018CBA0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_fo/func_i4_8018CD30.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_fo/func_i4_8018F494.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_fo/D_i4_801A3070.s") diff --git a/srceu/overlays/ovl_i4/fox_i4.c b/srceu/overlays/ovl_i4/fox_i4.c new file mode 100644 index 00000000..39d4e89b --- /dev/null +++ b/srceu/overlays/ovl_i4/fox_i4.c @@ -0,0 +1,5 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_i4/func_i4_8018B020.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_i4/D_i4_801A3030.s") diff --git a/srceu/overlays/ovl_i4/fox_ka.c b/srceu/overlays/ovl_i4/fox_ka.c new file mode 100644 index 00000000..61f78229 --- /dev/null +++ b/srceu/overlays/ovl_i4/fox_ka.c @@ -0,0 +1,63 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_80196200.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_80196328.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_801963A4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_80196488.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_8019656C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_80196628.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_801966AC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_80196840.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_80197134.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_80197538.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_801976C0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_80197700.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_8019790C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_80197E70.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_80198044.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_8019810C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_80199FD4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_8019A320.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_8019A85C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_8019A96C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_8019AA50.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_8019ACBC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_8019B930.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_8019BC18.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_8019BEE0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_8019BFE8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_8019C360.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_8019C424.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_8019C4D0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_ka/func_i4_8019CFE4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_ka/D_i4_801A3600.s") diff --git a/srceu/overlays/ovl_i4/fox_sz.c b/srceu/overlays/ovl_i4/fox_sz.c new file mode 100644 index 00000000..e8d117bb --- /dev/null +++ b/srceu/overlays/ovl_i4/fox_sz.c @@ -0,0 +1,55 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_8019D2D0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_8019D4E8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_8019D5AC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_8019D630.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_8019D990.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_8019DABC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_8019DB94.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_8019DCB8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_8019DDAC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_8019E458.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_8019E548.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_8019EE30.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_8019EF0C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_8019EFD4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_8019F100.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_8019F22C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_8019F408.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_8019FF10.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_801A00A8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_801A01F8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_801A1680.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_801A1B8C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_801A1D00.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_801A1DAC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_801A22E4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_sz/func_i4_801A23C0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i4/fox_sz/D_i4_801A39A0.s") diff --git a/srceu/overlays/ovl_i5/fox_ground.c b/srceu/overlays/ovl_i5/fox_ground.c new file mode 100644 index 00000000..5a554aaf --- /dev/null +++ b/srceu/overlays/ovl_i5/fox_ground.c @@ -0,0 +1,27 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ground/func_i5_801B8410.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ground/func_i5_801B8494.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ground/func_i5_801B84E8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ground/func_i5_801B8B50.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ground/func_i5_801B8C84.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ground/func_i5_801B92EC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ground/func_i5_801B9A20.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ground/func_i5_801BA2E8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ground/func_i5_801BA52C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ground/func_i5_801BA580.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ground/func_i5_801BA860.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ground/func_i5_801BAC80.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ground/D_i5_801BF830.s") diff --git a/srceu/overlays/ovl_i5/fox_i5.c b/srceu/overlays/ovl_i5/fox_i5.c new file mode 100644 index 00000000..bc1a7e3e --- /dev/null +++ b/srceu/overlays/ovl_i5/fox_i5.c @@ -0,0 +1,5 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_i5/func_i5_8018B020.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_i5/D_i5_801BE420.s") diff --git a/srceu/overlays/ovl_i5/fox_ma.c b/srceu/overlays/ovl_i5/fox_ma.c new file mode 100644 index 00000000..2a4ebefb --- /dev/null +++ b/srceu/overlays/ovl_i5/fox_ma.c @@ -0,0 +1,279 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019D3D0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019D4F0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019D6D0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019D838.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019DA3C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019DBD8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019DC48.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019DDA4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019E1D8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019E2DC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019E328.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019E374.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019E9E0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019F02C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019F35C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019F698.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019F8FC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_8019FF98.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A0064.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A0170.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A0224.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A092C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A0AEC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A1068.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A1110.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A11A0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A13B0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A1EB0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A20C4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A2500.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A2698.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A2908.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A2C04.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A36F4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A3A3C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A3BFC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A3DA8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A4514.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A45A0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A45C0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A4678.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A4878.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A48CC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A4958.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A4D08.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A4D64.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A5E4C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A6518.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A65C4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A6878.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A6B58.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A6CE0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A6DA0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A7230.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A76C0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A7910.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A7938.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A7C50.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A7E5C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A8100.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A8140.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A8458.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A8504.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A8598.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A85C4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A8BBC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A8F44.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A8F80.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A906C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A9268.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A9588.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A95E4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A9800.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A98C4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A98EC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A9A28.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A9A5C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A9A68.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A9B98.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A9BCC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A9BDC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801A9FD8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801AA078.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801AA0A0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801AA254.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801AA260.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801AA384.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801AA390.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801AA41C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801AA710.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801AAA4C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801AAD74.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801AAF5C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801AB348.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801AB4C8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801AB744.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801AB830.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801AB914.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801AF698.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801AFC44.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801AFD18.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801AFEB0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801AFEBC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801B002C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801B0134.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801B01D4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801B08C0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801B09EC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801B0A3C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801B0B00.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801B0BC4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801B0FD4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801B10A4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801B1170.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801B1548.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801B1688.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801B176C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801B17E8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801B1D40.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801B1F4C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801B2090.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801B2114.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801B2280.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801B22FC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801B2520.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801B2684.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801B297C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801B2BB4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801B2C80.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801B2CFC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801B2ECC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801B30A8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801B318C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801B3374.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801B6314.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801B6FAC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801B7170.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801B7338.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ma/func_i5_801B775C.s") diff --git a/srceu/overlays/ovl_i5/fox_ti.c b/srceu/overlays/ovl_i5/fox_ti.c new file mode 100644 index 00000000..83c67989 --- /dev/null +++ b/srceu/overlays/ovl_i5/fox_ti.c @@ -0,0 +1,143 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018CA10.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018CA40.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018CA88.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018CB70.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018CC00.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018CC74.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018CC94.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018CCD4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018CE60.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018D098.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018D5DC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018D660.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018D7A8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018DCA0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018DDC8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018DED4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018DF54.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018E024.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018E59C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018E624.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018E8A4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018EAB4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018EAD0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018EC24.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018EC94.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018ED48.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018F18C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018F200.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018F44C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018F4B0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018F964.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018FA90.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018FBF8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018FC14.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018FE50.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8018FEB8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8019020C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80190388.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80191DB8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80191E90.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80191EAC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8019202C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80192094.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_801920C8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_801920D8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_801929F4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80192AD0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80192B18.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80192BB8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80192C14.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80192FB8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80193398.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80193528.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80193750.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80193B0C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80193E80.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_801942FC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_801944E8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_801955C8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80195BF8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_80197610.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_801978D0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8019B56C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8019BD54.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/func_i5_8019CB88.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/D_i5_801BE490.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/D_i5_801BE494.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/D_i5_801BE4B8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/D_i5_801BE4FC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/D_i5_801BE54C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti/D_801BE59C.s") diff --git a/srceu/overlays/ovl_i5/fox_ti_cs.c b/srceu/overlays/ovl_i5/fox_ti_cs.c new file mode 100644 index 00000000..7bd01e0f --- /dev/null +++ b/srceu/overlays/ovl_i5/fox_ti_cs.c @@ -0,0 +1,11 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti_cs/func_i5_8018B030.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti_cs/func_i5_8018B0D0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti_cs/func_i5_8018B19C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti_cs/func_i5_8018BC04.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i5/fox_ti_cs/func_i5_8018BDC8.s") diff --git a/srceu/overlays/ovl_i6/fox_andross.c b/srceu/overlays/ovl_i6/fox_andross.c new file mode 100644 index 00000000..21296be3 --- /dev/null +++ b/srceu/overlays/ovl_i6/fox_andross.c @@ -0,0 +1,125 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018B030.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018B17C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018B19C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018B1FC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018B3A8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018B75C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018BBE4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018BF48.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018BF68.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018C028.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018C160.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018C2B0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018C37C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018C3F4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018C54C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018C7B8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018CB98.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018CD14.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018CE3C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018CEB8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018CF60.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018D210.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018D4D0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018D5EC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018D65C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018EF50.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018F394.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018F8AC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8018FE64.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80190134.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80190208.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80190274.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_801903A8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8019042C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80190524.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_801905A8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80190A6C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80190BAC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80190C40.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80190D84.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80191494.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80191568.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_801916C4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_801952C0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80195F84.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80196398.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80196964.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80196D14.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80196E50.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80196FBC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80196FDC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8019703C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80197084.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_801970A4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80197138.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_801971E0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80197470.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_801975B4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_8019771C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_801998F4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/func_i6_80199C5C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_andross/D_i6_801AA5B0.s") diff --git a/srceu/overlays/ovl_i6/fox_i6.c b/srceu/overlays/ovl_i6/fox_i6.c new file mode 100644 index 00000000..0b838ff4 --- /dev/null +++ b/srceu/overlays/ovl_i6/fox_i6.c @@ -0,0 +1,5 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_i6/func_i6_8018B020.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_i6/D_i6_801AA5A0.s") diff --git a/srceu/overlays/ovl_i6/fox_sy.c b/srceu/overlays/ovl_i6/fox_sy.c new file mode 100644 index 00000000..9bd19b8c --- /dev/null +++ b/srceu/overlays/ovl_i6/fox_sy.c @@ -0,0 +1,105 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8019B5B0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8019B6E4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8019B738.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8019B744.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8019B998.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8019BA04.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8019BCB8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8019BCC4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8019BE64.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8019C53C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8019C758.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8019C9D0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8019CEA8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8019D7C8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8019D810.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8019DE98.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8019DF84.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8019E0A4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8019E0D0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8019E28C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8019E2F4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8019E464.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8019E548.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8019E918.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8019E944.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8019EF78.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8019F01C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8019F138.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8019F60C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8019F664.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_8019FBE4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_801A02CC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_801A1684.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_801A1848.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_801A1A4C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_801A1CFC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_801A25B8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_801A2898.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_801A391C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_801A3F2C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_801A40C0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_801A4218.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_801A4424.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_801A44DC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_801A7418.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_801A756C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_801A75F0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_801A8434.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_801A8650.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_801A86CC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_801A8860.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_sy/func_i6_801A8CD4.s") diff --git a/srceu/overlays/ovl_i6/fox_turret.c b/srceu/overlays/ovl_i6/fox_turret.c new file mode 100644 index 00000000..af384487 --- /dev/null +++ b/srceu/overlays/ovl_i6/fox_turret.c @@ -0,0 +1,13 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_turret/func_i6_801A8F70.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_turret/func_i6_801A922C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_turret/func_i6_801A92B8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_turret/func_i6_801A94E4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_turret/func_i6_801A99D0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_turret/func_i6_801A9B74.s") diff --git a/srceu/overlays/ovl_i6/fox_ve2.c b/srceu/overlays/ovl_i6/fox_ve2.c new file mode 100644 index 00000000..bc5132fc --- /dev/null +++ b/srceu/overlays/ovl_i6/fox_ve2.c @@ -0,0 +1,17 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_ve2/func_i6_80199CC0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_ve2/func_i6_80199CFC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_ve2/func_i6_80199D38.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_ve2/func_i6_80199DA4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_ve2/func_i6_80199DC4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_ve2/func_i6_8019A3FC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_ve2/func_i6_8019A68C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_i6/fox_ve2/func_i6_8019A81C.s") diff --git a/srceu/overlays/ovl_menu/fox_i_menu.c b/srceu/overlays/ovl_menu/fox_i_menu.c new file mode 100644 index 00000000..2cd83bd0 --- /dev/null +++ b/srceu/overlays/ovl_menu/fox_i_menu.c @@ -0,0 +1,3 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_i_menu/func_menu_8018B020.s") diff --git a/srceu/overlays/ovl_menu/fox_map.c b/srceu/overlays/ovl_menu/fox_map.c new file mode 100644 index 00000000..1ba2325c --- /dev/null +++ b/srceu/overlays/ovl_menu/fox_map.c @@ -0,0 +1,256 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A3E00.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A3E5C.s") + +void func_menu_801A3EC8(void) { +} + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A3ED0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A3F9C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A4764.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A4A2C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A4C00.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A4E3C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A4F14.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A4F80.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A5020.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A5208.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A5320.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A554C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A57AC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A5BB8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A5D8C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A5DEC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A5F58.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A63B4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A6810.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A6BCC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A704C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A7238.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A7364.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A794C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A7C10.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A7CBC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A7E64.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A81D8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A8504.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A8A8C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A8B9C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A8CF4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A904C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A99E8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A9CA8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801A9F18.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801AA090.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801AA140.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801AA364.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801AA3D4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801AA5E4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801AA61C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801AAA20.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801AADCC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801AAE90.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801AB418.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801AB608.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801AB93C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801ABA84.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801ABAF0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801ABC08.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801ABCE4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801ABD24.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801ABDB0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801ABE1C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801AC06C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801AC1AC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801AC220.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801AC534.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801AC648.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801AC9B8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801ACC7C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801ACE0C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801ACF38.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801AD0A4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801AD20C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801AD374.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801AD4C4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801AD6A4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801AD824.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801ADEC0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801AE144.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801AE6C8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801AE8D4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801AE9AC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801AEBD0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801AEF9C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801AF098.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801AF23C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801AF600.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801AF6FC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801AF848.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801AFA40.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801AFCA8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801AFFF0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801B09F4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801B0AFC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801B0BB8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801BA140.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801BA144.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801BA148.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801BA14C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801BA150.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801BA154.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801BA158.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801BA15C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801BA160.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801BA164.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801BA168.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801BA16C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801BA170.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801BA174.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801BA178.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801BA17C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801BA188.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801BA198.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801BA1A0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801BA1A4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801BA1B4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801BA1C0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801BA1C4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/D_menu_801BA1C8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801B1258.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801B15BC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801B17FC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801B1AE0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801B1E10.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801B20EC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801B2280.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801B2670.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801B2938.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801B2A0C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801B3008.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_map/func_menu_801B30DC.s") diff --git a/srceu/overlays/ovl_menu/fox_option.c b/srceu/overlays/ovl_menu/fox_option.c new file mode 100644 index 00000000..4d2e2045 --- /dev/null +++ b/srceu/overlays/ovl_menu/fox_option.c @@ -0,0 +1,291 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80195880.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80195E4C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80195F18.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801960D8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019626C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80196408.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801964EC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019668C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80196810.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019688C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80196944.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80196D60.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801979D8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80197C78.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80197DE0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80198700.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80198888.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80198AB8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80198CFC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80198DE0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80198F04.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801996C0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80199CFC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80199D64.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_80199F94.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019A69C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019A724.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019A790.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019A930.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019AAC8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019AC74.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019B274.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019B490.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019B4D4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019B754.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019B970.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019BFF0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019C098.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019C138.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019C160.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019C210.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019C2F8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019C55C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019C6E8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019CAD0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019CBF8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019CF60.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801B9D20.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801B9D24.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801B9D28.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801B9D2C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801B9D30.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801B9D34.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801B9D38.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801B9D3C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801B9D40.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801B9D44.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801B9D48.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801B9D4C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801B9D50.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801B9D54.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801B9D58.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801B9D5C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801B9D60.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801B9D64.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801B9D68.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801B9D6C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801B9D74.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801B9D84.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801B9D90.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801B9D9C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801B9DA0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019D014.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019D2D8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019D4C8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019D614.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019D834.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019D96C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019DB98.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019DCD8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019E504.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019E5F0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019E630.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019E790.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019E808.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019EAF8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019EB8C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019F278.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019F378.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019F450.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019F47C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019F4E8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019F56C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019F5D8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019F65C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019F6A4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019F8A0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019FAA0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019FD18.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019FE78.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_8019FEF4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801A01AC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801A04CC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801A0710.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801A0944.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801A0B70.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801A0C9C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801A0D98.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801A0EBC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801A0EE4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801A0FE4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801A10E4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801A11D0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801A1270.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801A141C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801A14A8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801A1560.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801A1678.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801A174C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801A1A44.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801A1BCC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801A1C98.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801A1E54.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801A1EF4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801A2110.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801A21F0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801A2388.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801A275C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801A2C80.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801A317C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801A3344.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801A33A0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801A34E8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801A35D8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801A369C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/func_menu_801A38F0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801B9DBC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801B9DC4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801B9DCC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801B9DD4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801B9DE0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801B9DE8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801B9DF4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801B9E04.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_option/D_menu_801B9E14.s") diff --git a/srceu/overlays/ovl_menu/fox_title.c b/srceu/overlays/ovl_menu/fox_title.c new file mode 100644 index 00000000..1575083b --- /dev/null +++ b/srceu/overlays/ovl_menu/fox_title.c @@ -0,0 +1,157 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_8018B0E0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_8018B254.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_8018B2F0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_8018B3D8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_8018B5BC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_8018B600.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_8018B7A8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_8018B8B4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_8018BAFC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_8018BCE8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_8018C3C4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_8018CCE4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_8018CFC4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_8018D42C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_8018DE08.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_8018DE48.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_8018E154.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_8018E4A0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_8018E6D0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_8018E7FC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_8018EB48.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_8018EB68.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_8018F0D4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_8018FC58.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_8018FD04.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80190188.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_801906D4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80190774.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_801908E0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80190DFC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80191054.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80191350.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_801918D4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80191A28.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80191B74.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80191D1C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80192184.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80192580.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_801928D0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80192F40.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80193188.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80193280.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80193360.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_801933E8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_801937BC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_801938B0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80193B58.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80193D28.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80193F9C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80194284.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80194670.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_801947B8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80194850.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_801949BC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80194BA8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80194BE8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80194D14.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80194E60.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80194FE4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80195064.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_801951F0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_801953B8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_801954DC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80195588.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80195640.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/func_menu_80195708.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/D_menu_801B98D0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/D_menu_801B98F4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/D_menu_801B9918.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/D_menu_801B993C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/D_menu_801B9944.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/D_menu_801B994C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/D_menu_801B9954.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/D_menu_801B995C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/D_menu_801B9964.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/D_menu_801B996C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/D_menu_801B9974.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_menu/fox_title/D_menu_801B997C.s") diff --git a/srceu/overlays/ovl_unused/fox_unused.c b/srceu/overlays/ovl_unused/fox_unused.c new file mode 100644 index 00000000..0009bd8f --- /dev/null +++ b/srceu/overlays/ovl_unused/fox_unused.c @@ -0,0 +1,3 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/overlays/ovl_unused/fox_unused/func_unused_8018B020.s") diff --git a/srceu/sys/sys_fault.c b/srceu/sys/sys_fault.c new file mode 100644 index 00000000..b3dfd4cb --- /dev/null +++ b/srceu/sys/sys_fault.c @@ -0,0 +1,73 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_fault/func_80007430.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_fault/func_8000751C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_fault/func_80007674.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_fault/func_8000769C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_fault/func_8000777C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_fault/D_800C8E60.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_fault/D_800C8E6C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_fault/D_800C8E80.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_fault/D_800C8E98.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_fault/D_800C8EB0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_fault/D_800C8EC8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_fault/D_800C8EE0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_fault/D_800C8EF4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_fault/D_800C8F08.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_fault/D_800C8F20.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_fault/D_800C8F38.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_fault/D_800C8F50.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_fault/D_800C8F68.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_fault/D_800C8F7C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_fault/D_800C8F8C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_fault/D_800C8FA8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_fault/D_800C8FC4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_fault/D_800C8FDC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_fault/D_800C8FF8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_fault/D_800C9010.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_fault/D_800C9024.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_fault/D_800C9038.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_fault/D_800C9044.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_fault/D_800C9050.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_fault/func_80007868.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_fault/func_800078F0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_fault/func_80007980.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_fault/func_80007D5C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_fault/func_80007DC8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_fault/func_80008054.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_fault/func_80008088.s") diff --git a/srceu/sys/sys_joybus.c b/srceu/sys/sys_joybus.c new file mode 100644 index 00000000..0757caf8 --- /dev/null +++ b/srceu/sys/sys_joybus.c @@ -0,0 +1,15 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_joybus/func_800028C0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_joybus/func_8000299C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_joybus/func_80002A28.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_joybus/func_80002B74.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_joybus/func_80002C68.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_joybus/func_80002CD0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_joybus/func_80002D38.s") diff --git a/srceu/sys/sys_lib.c b/srceu/sys/sys_lib.c new file mode 100644 index 00000000..5cb3f11b --- /dev/null +++ b/srceu/sys/sys_lib.c @@ -0,0 +1,17 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_lib/func_80002F00.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_lib/func_80002F20.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_lib/func_80002F64.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_lib/func_80003008.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_lib/func_800031EC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_lib/func_80003334.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_lib/func_80003460.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_lib/func_800035A0.s") diff --git a/srceu/sys/sys_lights.c b/srceu/sys/sys_lights.c new file mode 100644 index 00000000..61be4632 --- /dev/null +++ b/srceu/sys/sys_lights.c @@ -0,0 +1,7 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_lights/func_800036A0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_lights/func_800037FC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_lights/func_8000397C.s") diff --git a/srceu/sys/sys_main.c b/srceu/sys/sys_main.c new file mode 100644 index 00000000..10cdd48e --- /dev/null +++ b/srceu/sys/sys_main.c @@ -0,0 +1,33 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_main/func_80003B20.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_main/func_80003C18.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_main/func_80003CE0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_main/func_80003E50.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_main/func_80003F60.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_main/func_8000406C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_main/func_80004164.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_main/func_800041D4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_main/func_800045D0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_main/func_80004784.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_main/func_80004808.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_main/func_80004894.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_main/func_80004A44.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_main/func_80004B2C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_main/func_80004D70.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_main/func_80004E18.s") diff --git a/srceu/sys/sys_math.c b/srceu/sys/sys_math.c new file mode 100644 index 00000000..70dbad16 --- /dev/null +++ b/srceu/sys/sys_math.c @@ -0,0 +1,25 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_math/func_80004E90.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_math/func_80004EBC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_math/func_80004F20.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_math/func_80005038.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_math/func_80005058.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_math/func_80005170.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_math/func_80005268.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_math/func_80005390.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_math/func_80005438.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_math/func_80005538.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_math/func_8000564C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_math/func_80005674.s") diff --git a/srceu/sys/sys_matrix.c b/srceu/sys/sys_matrix.c new file mode 100644 index 00000000..3726fbb5 --- /dev/null +++ b/srceu/sys/sys_matrix.c @@ -0,0 +1,37 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_matrix/func_800056F0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_matrix/func_80005778.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_matrix/func_800057B0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_matrix/func_800057C4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_matrix/func_80005B70.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_matrix/func_80005CA4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_matrix/func_80005DB4.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_matrix/func_80005F00.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_matrix/func_80006050.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_matrix/func_8000619C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_matrix/func_80006570.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_matrix/func_8000678C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_matrix/func_800069E0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_matrix/func_80006A90.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_matrix/func_80006B28.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_matrix/func_80006CEC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_matrix/func_80006EAC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_matrix/func_80006F28.s") diff --git a/srceu/sys/sys_memory.c b/srceu/sys/sys_memory.c new file mode 100644 index 00000000..81b978ea --- /dev/null +++ b/srceu/sys/sys_memory.c @@ -0,0 +1,5 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_memory/func_80006F90.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_memory/func_80006FA8.s") diff --git a/srceu/sys/sys_save.c b/srceu/sys/sys_save.c new file mode 100644 index 00000000..3a80128b --- /dev/null +++ b/srceu/sys/sys_save.c @@ -0,0 +1,11 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_save/func_800071A0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_save/func_800071DC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_save/func_8000726C.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_save/func_80007350.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_save/D_800C8D40.s") diff --git a/srceu/sys/sys_timer.c b/srceu/sys/sys_timer.c new file mode 100644 index 00000000..41617f4f --- /dev/null +++ b/srceu/sys/sys_timer.c @@ -0,0 +1,13 @@ +#include "common.h" + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_timer/func_80006FD0.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_timer/func_80007048.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_timer/func_800070D8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_timer/func_800070EC.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_timer/func_800070F8.s") + +#pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/sys/sys_timer/func_80007138.s") diff --git a/srcjp/dmatable.c b/srcjp/dmatable.c index 9f4a4bf4..435f9a43 100644 --- a/srcjp/dmatable.c +++ b/srcjp/dmatable.c @@ -6,81 +6,67 @@ { NULL, { NULL, NULL }, false } DmaEntry gDmaTable[89] = { - { SEGMENT_ROM_START(makerom), { SEGMENT_ROM_START(makerom), SEGMENT_ROM_END(makerom) }, false }, - { SEGMENT_ROM_START(main), { SEGMENT_ROM_START(main), SEGMENT_ROM_END(main) }, false }, - { SEGMENT_ROM_START(dma_table), { SEGMENT_ROM_START(dma_table), SEGMENT_ROM_END(dma_table) }, false }, - { SEGMENT_ROM_START(audio_seq), { SEGMENT_ROM_START(audio_seq), SEGMENT_ROM_END(audio_seq) }, false }, - { SEGMENT_ROM_START(audio_bank), { SEGMENT_ROM_START(audio_bank), SEGMENT_ROM_END(audio_bank) }, false }, - { SEGMENT_ROM_START(audio_table), { SEGMENT_ROM_START(audio_table), SEGMENT_ROM_END(audio_table) }, false }, - { SEGMENT_ROM_START(ast_common), { SEGMENT_ROM_START(ast_common), SEGMENT_ROM_END(ast_common) }, false }, - { SEGMENT_ROM_START(ast_bg_space), { SEGMENT_ROM_START(ast_bg_space), SEGMENT_ROM_END(ast_bg_space) }, false }, - { SEGMENT_ROM_START(ast_bg_planet), { SEGMENT_ROM_START(ast_bg_planet), SEGMENT_ROM_END(ast_bg_planet) }, false }, - { SEGMENT_ROM_START(ast_arwing), { SEGMENT_ROM_START(ast_arwing), SEGMENT_ROM_END(ast_arwing) }, false }, - { SEGMENT_ROM_START(ast_landmaster), - { SEGMENT_ROM_START(ast_landmaster), SEGMENT_ROM_END(ast_landmaster) }, - false }, - { SEGMENT_ROM_START(ast_blue_marine), - { SEGMENT_ROM_START(ast_blue_marine), SEGMENT_ROM_END(ast_blue_marine) }, - false }, - { SEGMENT_ROM_START(ast_versus), { SEGMENT_ROM_START(ast_versus), SEGMENT_ROM_END(ast_versus) }, false }, - { SEGMENT_ROM_START(ast_enmy_planet), - { SEGMENT_ROM_START(ast_enmy_planet), SEGMENT_ROM_END(ast_enmy_planet) }, - false }, - { SEGMENT_ROM_START(ast_enmy_space), - { SEGMENT_ROM_START(ast_enmy_space), SEGMENT_ROM_END(ast_enmy_space) }, - false }, - { SEGMENT_ROM_START(ast_great_fox), { SEGMENT_ROM_START(ast_great_fox), SEGMENT_ROM_END(ast_great_fox) }, false }, - { SEGMENT_ROM_START(ast_star_wolf), { SEGMENT_ROM_START(ast_star_wolf), SEGMENT_ROM_END(ast_star_wolf) }, false }, - { SEGMENT_ROM_START(ast_allies), { SEGMENT_ROM_START(ast_allies), SEGMENT_ROM_END(ast_allies) }, false }, - { SEGMENT_ROM_START(ast_corneria), { SEGMENT_ROM_START(ast_corneria), SEGMENT_ROM_END(ast_corneria) }, false }, - { SEGMENT_ROM_START(ast_meteo), { SEGMENT_ROM_START(ast_meteo), SEGMENT_ROM_END(ast_meteo) }, false }, - { SEGMENT_ROM_START(ast_titania), { SEGMENT_ROM_START(ast_titania), SEGMENT_ROM_END(ast_titania) }, false }, - { SEGMENT_ROM_START(ast_7_ti_2), { SEGMENT_ROM_START(ast_7_ti_2), SEGMENT_ROM_END(ast_7_ti_2) }, false }, - { SEGMENT_ROM_START(ast_8_ti), { SEGMENT_ROM_START(ast_8_ti), SEGMENT_ROM_END(ast_8_ti) }, false }, - { SEGMENT_ROM_START(ast_9_ti), { SEGMENT_ROM_START(ast_9_ti), SEGMENT_ROM_END(ast_9_ti) }, false }, - { SEGMENT_ROM_START(ast_A_ti), { SEGMENT_ROM_START(ast_A_ti), SEGMENT_ROM_END(ast_A_ti) }, false }, - { SEGMENT_ROM_START(ast_7_ti_1), { SEGMENT_ROM_START(ast_7_ti_1), SEGMENT_ROM_END(ast_7_ti_1) }, false }, - { SEGMENT_ROM_START(ast_sector_x), { SEGMENT_ROM_START(ast_sector_x), SEGMENT_ROM_END(ast_sector_x) }, false }, - { SEGMENT_ROM_START(ast_sector_z), { SEGMENT_ROM_START(ast_sector_z), SEGMENT_ROM_END(ast_sector_z) }, false }, - { SEGMENT_ROM_START(ast_aquas), { SEGMENT_ROM_START(ast_aquas), SEGMENT_ROM_END(ast_aquas) }, false }, - { SEGMENT_ROM_START(ast_area_6), { SEGMENT_ROM_START(ast_area_6), SEGMENT_ROM_END(ast_area_6) }, false }, - { SEGMENT_ROM_START(ast_venom_1), { SEGMENT_ROM_START(ast_venom_1), SEGMENT_ROM_END(ast_venom_1) }, false }, - { SEGMENT_ROM_START(ast_venom_2), { SEGMENT_ROM_START(ast_venom_2), SEGMENT_ROM_END(ast_venom_2) }, false }, - { SEGMENT_ROM_START(ast_ve1_boss), { SEGMENT_ROM_START(ast_ve1_boss), SEGMENT_ROM_END(ast_ve1_boss) }, false }, - { SEGMENT_ROM_START(ast_bolse), { SEGMENT_ROM_START(ast_bolse), SEGMENT_ROM_END(ast_bolse) }, false }, - { SEGMENT_ROM_START(ast_fortuna), { SEGMENT_ROM_START(ast_fortuna), SEGMENT_ROM_END(ast_fortuna) }, false }, - { SEGMENT_ROM_START(ast_sector_y), { SEGMENT_ROM_START(ast_sector_y), SEGMENT_ROM_END(ast_sector_y) }, false }, - { SEGMENT_ROM_START(ast_solar), { SEGMENT_ROM_START(ast_solar), SEGMENT_ROM_END(ast_solar) }, false }, - { SEGMENT_ROM_START(ast_zoness), { SEGMENT_ROM_START(ast_zoness), SEGMENT_ROM_END(ast_zoness) }, false }, - { SEGMENT_ROM_START(ast_katina), { SEGMENT_ROM_START(ast_katina), SEGMENT_ROM_END(ast_katina) }, false }, - { SEGMENT_ROM_START(ast_macbeth), { SEGMENT_ROM_START(ast_macbeth), SEGMENT_ROM_END(ast_macbeth) }, false }, - { SEGMENT_ROM_START(ast_warp_zone), { SEGMENT_ROM_START(ast_warp_zone), SEGMENT_ROM_END(ast_warp_zone) }, false }, - { SEGMENT_ROM_START(ast_title), { SEGMENT_ROM_START(ast_title), SEGMENT_ROM_END(ast_title) }, false }, - { SEGMENT_ROM_START(ast_map), { SEGMENT_ROM_START(ast_map), SEGMENT_ROM_END(ast_map) }, false }, - { SEGMENT_ROM_START(ast_option), { SEGMENT_ROM_START(ast_option), SEGMENT_ROM_END(ast_option) }, false }, - { SEGMENT_ROM_START(ast_vs_menu), { SEGMENT_ROM_START(ast_vs_menu), SEGMENT_ROM_END(ast_vs_menu) }, false }, - { SEGMENT_ROM_START(ast_text), { SEGMENT_ROM_START(ast_text), SEGMENT_ROM_END(ast_text) }, false }, - { SEGMENT_ROM_START(ast_font_3d), { SEGMENT_ROM_START(ast_font_3d), SEGMENT_ROM_END(ast_font_3d) }, false }, - { SEGMENT_ROM_START(ast_andross), { SEGMENT_ROM_START(ast_andross), SEGMENT_ROM_END(ast_andross) }, false }, - { SEGMENT_ROM_START(ast_logo), { SEGMENT_ROM_START(ast_logo), SEGMENT_ROM_END(ast_logo) }, false }, - { SEGMENT_ROM_START(ast_ending), { SEGMENT_ROM_START(ast_ending), SEGMENT_ROM_END(ast_ending) }, false }, - { SEGMENT_ROM_START(ast_ending_award_front), - { SEGMENT_ROM_START(ast_ending_award_front), SEGMENT_ROM_END(ast_ending_award_front) }, - false }, - { SEGMENT_ROM_START(ast_ending_award_back), - { SEGMENT_ROM_START(ast_ending_award_back), SEGMENT_ROM_END(ast_ending_award_back) }, - false }, - { SEGMENT_ROM_START(ast_ending_expert), - { SEGMENT_ROM_START(ast_ending_expert), SEGMENT_ROM_END(ast_ending_expert) }, - false }, - { SEGMENT_ROM_START(ast_training), { SEGMENT_ROM_START(ast_training), SEGMENT_ROM_END(ast_training) }, false }, - { SEGMENT_ROM_START(ovl_i1), { SEGMENT_ROM_START(ovl_i1), SEGMENT_ROM_END(ovl_i1) }, false }, - { SEGMENT_ROM_START(ovl_i2), { SEGMENT_ROM_START(ovl_i2), SEGMENT_ROM_END(ovl_i2) }, false }, - { SEGMENT_ROM_START(ovl_i3), { SEGMENT_ROM_START(ovl_i3), SEGMENT_ROM_END(ovl_i3) }, false }, - { SEGMENT_ROM_START(ovl_i4), { SEGMENT_ROM_START(ovl_i4), SEGMENT_ROM_END(ovl_i4) }, false }, - { SEGMENT_ROM_START(ovl_i5), { SEGMENT_ROM_START(ovl_i5), SEGMENT_ROM_END(ovl_i5) }, false }, - { SEGMENT_ROM_START(ovl_i6), { SEGMENT_ROM_START(ovl_i6), SEGMENT_ROM_END(ovl_i6) }, false }, - { SEGMENT_ROM_START(ovl_menu), { SEGMENT_ROM_START(ovl_menu), SEGMENT_ROM_END(ovl_menu) }, false }, - { SEGMENT_ROM_START(ovl_ending), { SEGMENT_ROM_START(ovl_ending), SEGMENT_ROM_END(ovl_ending) }, false }, - { SEGMENT_ROM_START(ovl_unused), { SEGMENT_ROM_START(ovl_unused), SEGMENT_ROM_END(ovl_unused) }, false }, + DMA_ENTRY(makerom), + DMA_ENTRY(main), + DMA_ENTRY(dma_table), + DMA_ENTRY(audio_seq), + DMA_ENTRY(audio_bank), + DMA_ENTRY(audio_table), + DMA_ENTRY(ast_common), + DMA_ENTRY(ast_bg_space), + DMA_ENTRY(ast_bg_planet), + DMA_ENTRY(ast_arwing), + DMA_ENTRY(ast_landmaster), + DMA_ENTRY(ast_blue_marine), + DMA_ENTRY(ast_versus), + DMA_ENTRY(ast_enmy_planet), + DMA_ENTRY(ast_enmy_space), + DMA_ENTRY(ast_great_fox), + DMA_ENTRY(ast_star_wolf), + DMA_ENTRY(ast_allies), + DMA_ENTRY(ast_corneria), + DMA_ENTRY(ast_meteo), + DMA_ENTRY(ast_titania), + DMA_ENTRY(ast_7_ti_2), + DMA_ENTRY(ast_8_ti), + DMA_ENTRY(ast_9_ti), + DMA_ENTRY(ast_A_ti), + DMA_ENTRY(ast_7_ti_1), + DMA_ENTRY(ast_sector_x), + DMA_ENTRY(ast_sector_z), + DMA_ENTRY(ast_aquas), + DMA_ENTRY(ast_area_6), + DMA_ENTRY(ast_venom_1), + DMA_ENTRY(ast_venom_2), + DMA_ENTRY(ast_ve1_boss), + DMA_ENTRY(ast_bolse), + DMA_ENTRY(ast_fortuna), + DMA_ENTRY(ast_sector_y), + DMA_ENTRY(ast_solar), + DMA_ENTRY(ast_zoness), + DMA_ENTRY(ast_katina), + DMA_ENTRY(ast_macbeth), + DMA_ENTRY(ast_warp_zone), + DMA_ENTRY(ast_title), + DMA_ENTRY(ast_map), + DMA_ENTRY(ast_option), + DMA_ENTRY(ast_vs_menu), + DMA_ENTRY(ast_text), + DMA_ENTRY(ast_font_3d), + DMA_ENTRY(ast_andross), + DMA_ENTRY(ast_logo), + DMA_ENTRY(ast_ending), + DMA_ENTRY(ast_ending_award_front), + DMA_ENTRY(ast_ending_award_back), + DMA_ENTRY(ast_ending_expert), + DMA_ENTRY(ast_training), + DMA_ENTRY(ovl_i1), + DMA_ENTRY(ovl_i2), + DMA_ENTRY(ovl_i3), + DMA_ENTRY(ovl_i4), + DMA_ENTRY(ovl_i5), + DMA_ENTRY(ovl_i6), + DMA_ENTRY(ovl_menu), + DMA_ENTRY(ovl_ending), + DMA_ENTRY(ovl_unused), }; diff --git a/starfox64.eu.rev0.uncompressed.md5 b/starfox64.eu.rev0.uncompressed.md5 new file mode 100644 index 00000000..8e3b48ab --- /dev/null +++ b/starfox64.eu.rev0.uncompressed.md5 @@ -0,0 +1 @@ +5541368ed41aee7c1612379aee2415bd baserom.eu.rev0.uncompressed.z64 diff --git a/tools/comptool.py b/tools/comptool.py index 4bb3ff2a..cc858e5d 100644 --- a/tools/comptool.py +++ b/tools/comptool.py @@ -36,8 +36,8 @@ file_names_pal = [ "ast_star_wolf", "ast_allies", "ast_corneria", "ast_meteo", "ast_titania", "ast_7_ti_2", "ast_8_ti", "ast_9_ti", "ast_A_ti", "ast_7_ti_1", "ast_sector_x", "ast_sector_z", "ast_aquas", "ast_area_6", "ast_venom_1", "ast_venom_2", "ast_ve1_boss", "ast_bolse", "ast_fortuna", "ast_sector_y", "ast_solar", "ast_zoness", "ast_katina", "ast_macbeth", "ast_warp_zone", - "ast_title", "ast_map", "ast_option", "ast_vs_menu", "ast_text", "ast_unk_1", "ast_unk_2", "ast_unk_3", - "ast_unk_4", "ast_unk_5", "ast_unk_6", "ast_unk_7", "ast_unk_8", "ast_unk_9", "ast_font_3d", "ast_andross","ast_logo", "ast_ending", + "ast_title", "ast_map", "ast_map_en", "ast_map_fr", "ast_map_de", "ast_option", "ast_option_en", "ast_option_fr", + "ast_option_de", "ast_vs_menu", "ast_vs_menu_en", "ast_vs_menu_fr", "ast_vs_menu_de", "ast_text", "ast_font_3d", "ast_andross","ast_logo", "ast_ending", "ast_ending_award_front", "ast_ending_award_back", "ast_ending_expert", "ast_training", "ast_radio_de", "ovl_i1", "ovl_i2", "ovl_i3", "ovl_i4", "ovl_i5", "ovl_i6", "ovl_menu", "ovl_ending", "ovl_unused", "ast_radio_en", "ast_radio_fr" ] @@ -63,7 +63,6 @@ def get_version_info(ROM): decomp_inds = decomp_inds_ntsc version = "LN" if region == "G" else "US" elif region == "P" or region == "U": - print("Warning: PAL menu assets are not fully documented.") file_names = file_names_pal decomp_inds = decomp_inds_pal version = "AU" if region == "U" else "EU" diff --git a/tools/format.py b/tools/format.py index 6a414fad..c7b51218 100755 --- a/tools/format.py +++ b/tools/format.py @@ -186,7 +186,8 @@ def main(): files = args.files extra_files = [] else: - files = glob.glob("src/**/*.c", recursive=True) + files = glob.glob("src*/**/*.c", recursive=True) + files = [x for x in files if "assets" not in x] extra_files = glob.glob("assets/**/*.xml", recursive=True) format_files(files, extra_files, nb_jobs) diff --git a/tools/requirements-python.txt b/tools/requirements-python.txt index 89c031b8..b9e6d519 100644 --- a/tools/requirements-python.txt +++ b/tools/requirements-python.txt @@ -1,5 +1,5 @@ -spimdisasm==1.24.2 -rabbitizer==1.7.0 +spimdisasm==1.25.1 +rabbitizer==1.10.0 PyYAML pylibyaml tqdm diff --git a/tools/splat b/tools/splat index 6bc689f2..441af8f6 160000 --- a/tools/splat +++ b/tools/splat @@ -1 +1 @@ -Subproject commit 6bc689f21dc3597799294942858ae914fadb6da9 +Subproject commit 441af8f682454154aae6d593d0938f23c747a1bc diff --git a/yamls/eu/rev0/assets.yaml b/yamls/eu/rev0/assets.yaml new file mode 100644 index 00000000..3109cab5 --- /dev/null +++ b/yamls/eu/rev0/assets.yaml @@ -0,0 +1,507 @@ + - name: audio_seq + type: bin + start: 0xE0BC0 + + - name: audio_bank + type: bin + start: 0x127F50 + + - name: audio_table + type: bin + start: 0x1471E0 + + - name: ast_common + exclusive_ram_id: segment_01 + type: bin + dir: assets + start: 0x7CCEE0 + vram: 0x01000000 + # subsegments: + # - [0x7CCEE0, bin, ast_common/ast_common] + + - name: ast_bg_space + exclusive_ram_id: segment_02 + type: bin + dir: assets + start: 0x800900 + vram: 0x02000000 + # subsegments: + # - [0x800900, bin, ast_bg_space/ast_bg_space] + + - name: ast_bg_planet + exclusive_ram_id: segment_02 + type: bin + dir: assets + start: 0x8080E0 + vram: 0x02000000 + # subsegments: + # - [0x8080E0, bin, ast_bg_planet/ast_bg_planet] + + - name: ast_arwing + exclusive_ram_id: segment_03 + type: bin + dir: assets + start: 0x819C40 + vram: 0x03000000 + # subsegments: + # - [0x819C40, bin, ast_arwing/ast_arwing] + + - name: ast_landmaster + exclusive_ram_id: segment_03 + type: bin + dir: assets + start: 0x833A30 + vram: 0x03000000 + # subsegments: + # - [0x833A30, bin, ast_landmaster/ast_landmaster] + + - name: ast_blue_marine + exclusive_ram_id: segment_03 + type: bin + dir: assets + start: 0x83BFC0 + vram: 0x03000000 + # subsegments: + # - [0x83BFC0, bin, ast_blue_marine/ast_blue_marine] + + - name: ast_versus + exclusive_ram_id: segment_03 + type: bin + dir: assets + start: 0x843310 + vram: 0x03000000 + # subsegments: + # - [0x843310, bin, ast_versus/ast_versus] + + - name: ast_enmy_planet + exclusive_ram_id: segment_04 + type: bin + dir: assets + start: 0x87E910 + vram: 0x04000000 + # subsegments: + # - [0x87E910, bin, ast_enmy_planet/ast_enmy_planet] + + - name: ast_enmy_space + exclusive_ram_id: segment_04 + type: bin + dir: assets + start: 0x888C10 + vram: 0x04000000 + # subsegments: + # - [0x888C10, bin, ast_enmy_space/ast_enmy_space] + + - name: ast_great_fox + exclusive_ram_id: segment_0E + type: bin + dir: assets + start: 0x895120 + vram: 0x0E000000 + # subsegments: + # - [0x895120, bin, ast_great_fox/ast_great_fox] + + - name: ast_star_wolf + exclusive_ram_id: segment_0F + type: bin + dir: assets + start: 0x8A6FB0 + vram: 0x0F000000 + # subsegments: + # - [0x8A6FB0, bin, ast_star_wolf/ast_star_wolf] + + - name: ast_allies + exclusive_ram_id: segment_0D + type: bin + dir: assets + start: 0x8BB750 + vram: 0x0D000000 + # subsegments: + # - [0x8BB750, bin, ast_allies/ast_allies] + + - name: ast_corneria + exclusive_ram_id: segment_06 + type: bin + dir: assets + start: 0x8C81C0 + vram: 0x06000000 + # subsegments: + # - [0x8C81C0, bin, ast_corneria/ast_corneria] + + - name: ast_meteo + exclusive_ram_id: segment_06 + type: bin + dir: assets + start: 0x9094C0 + vram: 0x06000000 + # subsegments: + # - [0x9094C0, bin, ast_meteo/ast_meteo] + + - name: ast_titania + exclusive_ram_id: segment_06 + type: bin + dir: assets + vram: 0x06000000 + start: 0x93C6B0 + # subsegments: + # - [0x93C6B0, bin, ast_titania/ast_titania] + + - name: ast_7_ti_2 + exclusive_ram_id: segment_07 + type: bin + dir: assets + vram: 0x07000000 + start: 0x947F70 + # subsegments: + # - [0x947F70, bin, ast_7_ti_2/ast_7_ti_2] + + - name: ast_8_ti + exclusive_ram_id: segment_08 + type: bin + dir: assets + start: 0x9561C0 + vram: 0x08000000 + # subsegments: + # - [0x9561C0, bin, ast_8_ti/ast_8_ti] + + - name: ast_9_ti + exclusive_ram_id: segment_09 + type: bin + dir: assets + start: 0x95F460 + vram: 0x09000000 + # subsegments: + # - [0x95F460, bin, ast_9_ti/ast_9_ti] + + - name: ast_A_ti + type: bin + dir: assets + exclusive_ram_id: segment_0A + start: 0x96F580 + vram: 0x0A000000 + # subsegments: + # - [0x96F580, bin, ast_A_ti/ast_A_ti] + + - name: ast_7_ti_1 + exclusive_ram_id: segment_07 + type: bin + dir: assets + start: 0x978F20 + vram: 0x07000000 + # subsegments: + # - [0x978F20, bin, ast_7_ti_1/ast_7_ti_1] + + - name: ast_sector_x + exclusive_ram_id: segment_06 + type: bin + dir: assets + start: 0x9891D0 + vram: 0x06000000 + # subsegments: + # - [0x9891D0, bin, ast_sector_x/ast_sector_x] + + - name: ast_sector_z + exclusive_ram_id: segment_06 + type: bin + dir: assets + start: 0x9BCD70 + vram: 0x06000000 + # subsegments: + # - [0x9BCD70, bin, ast_sector_z/ast_sector_z] + + - name: ast_aquas + exclusive_ram_id: segment_06 + type: bin + dir: assets + start: 0x9C7200 + vram: 0x06000000 + # subsegments: + # - [0x9C7200, bin, ast_aquas/ast_aquas] + + - name: ast_area_6 + exclusive_ram_id: segment_06 + type: bin + dir: assets + start: 0x9FA1A0 + vram: 0x06000000 + # subsegments: + # - [0x9FA1A0, bin, ast_area_6/ast_area_6] + + - name: ast_venom_1 + exclusive_ram_id: segment_06 + type: bin + dir: assets + start: 0xA246D0 + vram: 0x06000000 + # subsegments: + # - [0xA246D0, bin, ast_venom_1/ast_venom_1] + + - name: ast_venom_2 + exclusive_ram_id: segment_06 + type: bin + dir: assets + start: 0xA422A0 + vram: 0x06000000 + # subsegments: + # - [0xA422A0, bin, ast_venom_2/ast_venom_2] + + - name: ast_ve1_boss + # exclusive_ram_id: segment_06 + exclusive_ram_id: segment_09 + type: bin + dir: assets + start: 0xA59F30 + vram: 0x09000000 + # subsegments: + # - [0xA59F30, bin, ast_ve1_boss/ast_ve1_boss] + + - name: ast_bolse + exclusive_ram_id: segment_06 + type: bin + dir: assets + start: 0xA7E890 + vram: 0x06000000 + # subsegments: + # - [0xA7E890, bin, ast_bolse/ast_bolse] + + - name: ast_fortuna + exclusive_ram_id: segment_06 + type: bin + dir: assets + start: 0xA91BA0 + vram: 0x06000000 + # subsegments: + # - [0xA91BA0, bin, ast_fortuna/ast_fortuna] + + - name: ast_sector_y + exclusive_ram_id: segment_06 + type: bin + dir: assets + start: 0xAA4060 + vram: 0x06000000 + # subsegments: + # - [0xAA4060, bin, ast_sector_y/ast_sector_y] + + - name: ast_solar + exclusive_ram_id: segment_06 + type: bin + dir: assets + start: 0xAD99D0 + vram: 0x06000000 + # subsegments: + # - [0xAD99D0, bin, ast_solar/ast_solar] + + - name: ast_zoness + exclusive_ram_id: segment_06 + type: bin + dir: assets + start: 0xAFD7B0 + vram: 0x06000000 + # subsegments: + # - [0xAFD7B0, bin, ast_zoness/ast_zoness] + + - name: ast_katina + exclusive_ram_id: segment_06 + type: bin + dir: assets + start: 0xB2C020 + vram: 0x06000000 + # subsegments: + # - [0xB2C020, bin, ast_katina/ast_katina] + + - name: ast_macbeth + exclusive_ram_id: segment_06 + type: bin + dir: assets + vram: 0x06000000 + start: 0xB3F6E0 + # subsegments: + # - [0xB3F6E0, bin, ast_macbeth/ast_macbeth] + + - name: ast_warp_zone + exclusive_ram_id: segment_07 + type: bin + dir: assets + start: 0xB79F10 + vram: 0x07000000 + # subsegments: + # - [0xB79F10, bin, ast_warp_zone/ast_warp_zone] + + - name: ast_title + exclusive_ram_id: segment_06 + type: bin + dir: assets + vram: 0x06000000 + start: 0xB7BCE0 + # subsegments: + # - [0xB7BCE0, bin, ast_title/ast_title] + + - name: ast_map + exclusive_ram_id: segment_06 + type: bin + dir: assets + start: 0xBD6C00 + vram: 0x06000000 + # subsegments: + # - [0xBD6C00, bin, ast_map/ast_map] + + - name: ast_map_en + exclusive_ram_id: segment_0B + type: bin + dir: assets + start: 0xC1E250 + vram: 0x0B000000 + + - name: ast_map_fr + exclusive_ram_id: segment_0B + type: bin + dir: assets + start: 0xC37280 + vram: 0x0B000000 + + - name: ast_map_de + exclusive_ram_id: segment_0B + type: bin + dir: assets + start: 0xC4E8B0 + vram: 0x0B000000 + + - name: ast_option + exclusive_ram_id: segment_08 + type: bin + dir: assets + start: 0xC68500 + vram: 0x08000000 + # subsegments: + # - [0xC1E250, bin, ast_option/ast_option] + + - name: ast_option_en + exclusive_ram_id: segment_0A + type: bin + dir: assets + start: 0xC6BF70 + vram: 0x0A000000 + + - name: ast_option_fr + exclusive_ram_id: segment_0A + type: bin + dir: assets + start: 0xC7FC10 + vram: 0x0A000000 + + - name: ast_option_de + exclusive_ram_id: segment_0A + type: bin + dir: assets + start: 0xC93BD0 + vram: 0x0A000000 + + - name: ast_vs_menu + exclusive_ram_id: segment_07 + type: bin + dir: assets + start: 0xCA7CA0 + vram: 0x07000000 + # subsegments: + # - [0xC37280, bin, ast_vs_menu/ast_vs_menu] + + - name: ast_vs_menu_en + exclusive_ram_id: segment_0C + type: bin + dir: assets + start: 0xCB59B0 + vram: 0x0C000000 + + - name: ast_vs_menu_fr + exclusive_ram_id: segment_0C + type: bin + dir: assets + start: 0xCB8240 + vram: 0x0C000000 + + - name: ast_vs_menu_de + exclusive_ram_id: segment_0C + type: bin + dir: assets + start: 0xCBA7E0 + vram: 0x0C000000 + + - name: ast_text + exclusive_ram_id: segment_05 + type: bin + dir: assets + vram: 0x05000000 + start: 0xCBD230 + # subsegments: + # - [0xC4E8B0, bin, ast_text/ast_text] + + - name: ast_font_3d + exclusive_ram_id: segment_09 + type: bin + dir: assets + vram: 0x09000000 + start: 0xCD5890 + # subsegments: + # - [0xCD5890, bin, ast_font_3d/ast_font_3d] + + - name: ast_andross + exclusive_ram_id: segment_0C + type: bin + dir: assets + vram: 0x0C000000 + start: 0xCE1A60 + # subsegments: + # - [0xCE1A60, bin, ast_andross/ast_andross] + + - name: ast_logo + exclusive_ram_id: segment_0F + type: bin + dir: assets + start: 0xD1DCF0 + vram: 0x0F000000 + # subsegments: + # - [0xD1DCF0, bin, ast_logo/ast_logo] + + - name: ast_ending + exclusive_ram_id: segment_07 + type: bin + dir: assets + start: 0xD226F0 + vram: 0x07000000 + # subsegments: + # - [0xD226F0, bin, ast_ending/ast_ending] + + - name: ast_ending_award_front + exclusive_ram_id: segment_08 + type: bin + dir: assets + start: 0xD3E4F0 + vram: 0x08000000 + # subsegments: + # - [0xD3E4F0, bin, ast_ending_award_front/ast_ending_award_front] + + - name: ast_ending_award_back + exclusive_ram_id: segment_08 + type: bin + dir: assets + start: 0xD63570 + vram: 0x08000000 + # subsegments: + # - [0xD63570, bin, ast_ending_award_back/ast_ending_award_back] + + - name: ast_ending_expert + exclusive_ram_id: segment_08 + type: bin + dir: assets + start: 0xD8D000 + vram: 0x08000000 + # subsegments: + # - [0xD8D000, bin, ast_ending_expert/ast_ending_expert] + + - name: ast_training + exclusive_ram_id: segment_06 + type: bin + dir: assets + start: 0xDD7100 + vram: 0x06000000 + # subsegments: + # - [0xDD7100, bin, ast_training/ast_training] diff --git a/yamls/eu/rev0/header.yaml b/yamls/eu/rev0/header.yaml new file mode 100644 index 00000000..9b3c57ed --- /dev/null +++ b/yamls/eu/rev0/header.yaml @@ -0,0 +1,69 @@ +name: Starfox64 EU REV 0 (v1.0) +sha1: 09f5d5c14219fc77a36c5a6ad5e63f7abd8b3385 +options: + basename: starfox64 + target_path: baserom.eu.rev0.uncompressed.z64 + elf_path: build/starfox64.eu.rev0.elf + ld_script_path: linker_scripts/eu/rev0/starfox64.ld + base_path: . + compiler: IDO + find_file_boundaries: True + header_encoding: ASCII + platform: n64 + undefined_funcs_auto_path: linker_scripts/eu/rev0/auto/undefined_funcs_auto.ld + undefined_syms_auto_path: linker_scripts/eu/rev0/auto/undefined_syms_auto.ld + + symbol_addrs_path: + - linker_scripts/eu/rev0/symbol_addrs.txt + - linker_scripts/eu/rev0/symbol_addrs_fix.txt + + asm_path: asm/eu/rev0 + src_path: srceu + asset_path: bin/eu/rev0 + + build_path: build + + extensions_path: tools/splat_ext + mips_abi_float_regs: o32 + create_asm_dependencies: True + do_c_func_detection: True + o_as_suffix: True + gfx_ucode: f3dex + mnemonic_ljust: 12 + rom_address_padding: True + dump_symbols: True + include_macro_inc: False + libultra_symbols: True + hardware_regs: True + + ld_dependencies: True + + + use_legacy_include_asm: False + + asm_function_macro: glabel + asm_jtbl_label_macro: jlabel + asm_data_macro: dlabel + + ld_legacy_generation: True + check_consecutive_segment_types: False + + # section_order: [".text", ".data", ".rodata", ".bss"] + # auto_all_sections: [".data", ".rodata", ".bss"] + + + + + mips_abi_float_regs: o32 + + + disasm_unknown: True + # string_encoding: ASCII + # data_string_encoding: ASCII + rodata_string_guesser_level: 2 + data_string_guesser_level: 2 + # libultra_symbols: True + # hardware_regs: True + # gfx_ucode: # one of [f3d, f3db, f3dex, f3dexb, f3dex2] +segments: + diff --git a/yamls/eu/rev0/main.yaml b/yamls/eu/rev0/main.yaml new file mode 100644 index 00000000..f0cf1b4d --- /dev/null +++ b/yamls/eu/rev0/main.yaml @@ -0,0 +1,335 @@ + - name: makerom + type: code + start: 0x0 + subsegments: + - {start: 0x0, type: header, name: header} + - {start: 0x40, type: textbin, name: ipl3} + - {start: 0x1000, type: asm, vram: 0x80000400, name: entry} + + - name: main + type: code + start: 0x1050 + vram: 0x800004D0 + bss_size: 0x9B1F0 + subsegments: + # Microcode + - [0x01050, textbin, rspboot] + - [0x01120, textbin, aspmain] + - [0x02010, textbin, f3dex] + + # Nintendo libraries + - [0x03440, c, sys/sys_joybus] + - [0x03A80, c, sys/sys_lib] + - [0x04220, c, sys/sys_lights] + - [0x046A0, c, sys/sys_main] + - [0x05A10, c, sys/sys_math] + - [0x06270, c, sys/sys_matrix] + - [0x07B10, c, sys/sys_memory] + - [0x07B50, c, sys/sys_timer] + - [0x07D20, c, sys/sys_save] + - [0x07FB0, c, sys/sys_fault] + - [0x08CB0, c, audio/audio_synthesis] + - [0x0C860, c, audio/audio_heap] + - [0x0F070, c, audio/audio_load] + - [0x123F0, c, audio/audio_playback] + - [0x13F60, c, audio/audio_effects] + - [0x14A00, c, audio/audio_seqplayer] + - [0x175B0, c, audio/audio_general] + - [0x1EBA0, c, audio/audio_thread] + - [0x1FAB0, c, driverominit] + - [0x1FAC0, hasm, mio0] + - [0x1FB60, hasm, rdramcheck] + - [0x1FC10, textbin, alt_ipl3] + - [0x20630, c, libc_sprintf] + - [0x20700, c, libc_math64] + - [0x20AB0, hasm, libc_math64_fp] + + # Libultra + - [0x20C10, asm] + - [0x20FD0, asm] + - [0x21230, asm] + - [0x21370, asm] + - [0x214C0, asm] + - [0x21570, asm] + - [0x21B90, asm] + - [0x21E20, asm] + - [0x22310, asm] + - [0x22390, asm] + - [0x22440, asm] + - [0x22550, asm] + - [0x225F0, asm] + - [0x22770, asm] + - [0x227E0, asm] + - [0x229A0, asm] + - [0x229D0, asm] + - [0x22A40, asm] + - [0x22AB0, asm] + - [0x22E40, asm] + - [0x22E50, asm] + - [0x22FA0, asm] + - [0x23450, asm] + - [0x23730, asm] + - [0x23CB0, asm] + - [0x23D40, asm] + - [0x24070, asm] + - [0x24080, asm] + - [0x24160, asm] + - [0x24460, asm] + - [0x24C70, asm] + - [0x24D10, asm] + - [0x259D0, asm] + - [0x25A00, asm] + - [0x25A10, asm] + - [0x25C60, asm] + - [0x25D40, asm] + - [0x25D50, asm] + - [0x25E00, asm] + - [0x25E10, asm] + - [0x25EC0, asm] + - [0x25FC0, asm] + - [0x270F0, asm] + - [0x27980, asm] + - [0x27BF0, asm] + - [0x27D70, asm] + - [0x27EB0, asm] + - [0x27EC0, asm] + - [0x27ED0, asm] + - [0x281E0, asm] + - [0x28260, asm] + - [0x282E0, asm] + - [0x28320, asm] + - [0x283B0, asm] + - [0x283E0, asm] + - [0x288B0, asm] + - [0x288D0, asm] + - [0x288E0, asm] + - [0x28C40, asm] + - [0x28D40, asm] + - [0x29110, asm] + - [0x29860, asm] + - [0x29880, asm] + - [0x29930, asm] + - [0x29990, asm] + - [0x299F0, asm] + - [0x29A90, asm] + - [0x29D30, asm] + - [0x2A7F0, asm] + - [0x2A850, asm] + - [0x2AB60, asm] + - [0x2AE30, asm] + - [0x2AEC0, asm] + - [0x2B740, asm] + - [0x2B8E0, asm] + - [0x2B9F0, asm] + - [0x2BAB0, asm] + - [0x2BAC0, asm] + - [0x2BB20, asm] + - [0x2BB70, asm] + - [0x2BC10, asm] + - [0x2BC60, asm] + - [0x2BDF0, asm] + - [0x2BE00, asm] + - [0x2BEA0, asm] + - [0x2C7B0, asm] + - [0x2D3B0, asm] + - [0x2DFB0, asm] + - [0x2EA90, asm] + - [0x2EE90, asm] + - [0x2EEE0, asm] + + # Game engine + - [0x2F090, c, engine/fox_360] + - [0x36870, c, engine/fox_beam] + - [0x3E640, c, engine/fox_bg] + - [0x43A10, c, engine/fox_boss] + - [0x43DD0, c, engine/fox_tank] + - [0x49610, c, engine/fox_demo] + - [0x52630, c, engine/fox_display] + - [0x59690, c, engine/fox_load] + - [0x5A0B0, c, engine/fox_edata] + - [0x5A280, c, engine/fox_edisplay] + - [0x61AF0, c, engine/fox_enmy] + - [0x6B360, c, engine/fox_enmy2] + - [0x77DD0, c, engine/fox_effect] + - [0x84F00, c, engine/fox_fade] + - [0x85280, c, engine/fox_blur] + - [0x854C0, c, engine/fox_hud] + - [0x988D0, c, engine/fox_col1] + - [0x9AED0, c, engine/fox_std_lib] + - [0xA2A40, c, engine/fox_game] + - [0xA48D0, c, engine/fox_col2] + - [0xA4EE0, c, engine/fox_pause] + - [0xA5190, c, engine/fox_play] + - [0xBA080, c, engine/fox_rcp] + - [0xBBA10, c, engine/fox_radio] + - [0xBD3B0, c, engine/fox_reset] + - [0xBD680, c, engine/fox_versus] + - [0xC3ED0, c, engine/fox_message] + - [0xC46C0, c, engine/fox_save] + + # DATA - Microcode + - [0xC49F0, data, aspmain] + - [0xC4D20, data, audio/audio_tables] + - [0xC5500, data, f3dex] + + # DATA - Nintendo Libraries + - [0xC5D00, data, sys/sys_main] + - [0xC5D60, data, sys/sys_math] + - [0xC5DA0, data, sys/sys_matrix] + - [0xC5E70, data, sys/sys_fault] + - [0xC6050, data, audio] + - [0xC6050, data, audio/audio_synthesis] + - [0xC6130, data, audio/audio_heap] + - [0xC66D0, data, audio/audio_load] + - [0xC6CA0, data, audio/audio_playback] + - [0xC7080, data, audio/audio_effects] + - [0xC70A0, data, audio/audio_seqplayer] + - [0xC7460, data, audio/audio_general] + - [0xC8C60, data, audio/audio_context] + - [0xC93E0, data, audio/audio_thread] + - [0xC9410, data, libc_sprintf] + + # DATA - Libultra + - [0xC9450, data, libultra] + + # RODATA - Nintendo Libraries + - [0xC9860, .rodata, sys/sys_math] + - [0xC98B0, .rodata, sys/sys_matrix] + - [0xC98C0, .rodata, sys/sys_save] + - [0xC99E0, .rodata, sys/sys_fault] + - [0xC9DC0, .rodata, audio/audio_synthesis] + - [0xC9E00, .rodata, audio/audio_heap] + - [0xC9E20, .rodata, audio/audio_load] + - [0xC9E50, .rodata, audio/audio_playback] + - [0xC9E80, .rodata, audio/audio_effects] + - [0xC9EB0, .rodata, audio/audio_seqplayer] + - [0xCA560, .rodata, audio/audio_general] + - [0xCA880, .rodata, audio/audio_thread] + - [0xCAAA0, .rodata, libc_math64] + + # RODATA - Libultra + - [0xCAAC0, rodata] + - [0xCAAD0, rodata] + - [0xCAB20, rodata] + - [0xCAB70, rodata] + - [0xCAC70, rodata] + - [0xCACE0, rodata] + - [0xCAD00, rodata] + - [0xCAD10, rodata] + - [0xCAD70, rodata] + - [0xCB1E0, rodata] + + # DATA - Game engine + - [0xCB220, data, engine/fox_360] + - [0xCB350, data, engine/fox_beam] + - [0xCB3C0, data, engine/fox_bg] + - [0xCB620, data, engine/fox_boss] + - [0xCB690, data, engine/fox_tank] + - [0xCB6F0, data, engine/fox_demo] + - [0xCB9B0, data, engine/fox_display] + - [0xCBB40, .data, engine/fox_load] + - [0xCD860, data, engine/fox_edata] + - [0xD1360, data, engine/fox_edisplay] + - [0xD1790, data, engine/fox_enmy] + - [0xD1970, data, engine/fox_enmy2] + - [0xD2ED0, data, engine/fox_effect] + - [0xD3360, data, engine/fox_hud] + - [0xD4440, data, engine/fox_std_lib] + - [0xD46E0, data, engine/fox_game] + - [0xD47A0, data, engine/fox_col2] + - [0xD4DD0, data, engine/fox_play] + - [0xD5000, data, engine/fox_context] + - [0xD5030, data, engine/fox_rcp] + - [0xD68F0, data, engine/fox_radio] + - [0xD6900, data, engine/fox_reset] + - [0xD6910, data, engine/fox_versus] + - [0xD6C50, data, engine/fox_save] + + # RODATA - Game engine + - [0xD6D40, .rodata, engine/fox_360] + - [0xD7020, .rodata, engine/fox_beam] + - [0xD72C0, .rodata, engine/fox_bg] + - [0xD7500, .rodata, engine/fox_boss] + - [0xD7520, .rodata, engine/fox_tank] + - [0xD7680, .rodata, engine/fox_demo] + - [0xD7CD0, .rodata, engine/fox_display] + - [0xD7ED0, .rodata, engine/fox_load] + - [0xD7F50, .rodata, engine/fox_edisplay] + - [0xD8300, .rodata, engine/fox_enmy] + - [0xD8980, .rodata, engine/fox_enmy2] + - [0xD9160, .rodata, engine/fox_effect] + - [0xD9620, .rodata, engine/fox_fade] + - [0xD9650, .rodata, engine/fox_hud] + - [0xDA120, .rodata, engine/fox_col1] + - [0xDA130, .rodata, engine/fox_std_lib] + - [0xDA240, .rodata, engine/fox_game] + - [0xDA2C0, .rodata, engine/fox_col2] + - [0xDA2D0, .rodata, engine/fox_pause] + - [0xDA2E0, .rodata, engine/fox_play] + - [0xDABF0, .rodata, engine/fox_radio] + - [0xDB210, .rodata, engine/fox_versus] + - [0xDB350, .rodata, engine/fox_message] + - [0xDB420, .rodata, engine/fox_save] + + # Common assets + - [0xDB490, data, common] + - [0xDB490, data, fox_shapes] + - [0xDCC70, data, fox_wheels] + - [0xDDA10, data, fox_msg_textures] + - [0xDE790, data, fox_rcp_init] + - [0xDE800, data, wave_samples] + - [0xDF420, data, note_data] + + # Nintendo Library bss + - { type: bss, vram: 0x800DF9F0, name: sys/sys_joybus } + - { type: bss, vram: 0x800DFA70, name: sys/sys_main } + - { type: bss, vram: 0x8013D510, name: sys/sys_math } + - { type: bss, vram: 0x8013D530, name: sys/sys_matrix } + - { type: bss, vram: 0x8013E540, name: sys/sys_memory } + - { type: bss, vram: 0x80146D50, name: sys/sys_timer } + - { type: bss, vram: 0x801470D0, name: sys/sys_save } + - { type: bss, vram: 0x801474D0, name: sys/sys_fault } + - { type: bss, vram: 0x80147EB0, name: audio/audio_synthesis } + - { type: bss, vram: 0x80148EF0, name: audio/audio_load } + - { type: bss, vram: 0x80148FD0, name: audio/audio_general } + - { type: bss, vram: 0x8014DBB0, name: audio/audio_context } + - { type: bss, vram: 0x80157F10, name: audio/audio_thread } + + # Libultra bss + - { type: bss, vram: 0x80158790, name: libultra } + + # Game engine bss + - { type: bss, vram: 0x80161A70, name: engine/fox_360 } + - { type: bss, vram: 0x80161AC0, name: engine/fox_beam } + - { type: bss, vram: 0x80161AD0, name: engine/fox_bg } + - { type: bss, vram: 0x80163510, name: engine/fox_boss } + - { type: bss, vram: 0x80163520, name: engine/fox_display } + - { type: bss, vram: 0x80163740, name: engine/fox_edisplay } + - { type: bss, vram: 0x801637E0, name: engine/fox_enmy } + - { type: bss, vram: 0x80163800, name: engine/fox_enmy2 } + - { type: bss, vram: 0x80163810, name: engine/fox_hud } + - { type: bss, vram: 0x80163AC0, name: engine/fox_col1 } + - { type: bss, vram: 0x80163B10, name: engine/fox_std_lib } + - { type: bss, vram: 0x80163B80, name: engine/fox_game } + - { type: bss, vram: 0x80163BC0, name: engine/fox_play } + - { type: bss, vram: 0x80163BE0, name: engine/fox_context} + - { type: bss, vram: 0x8017A6F0, name: engine/fox_rcp } + - { type: bss, vram: 0x8017A890, name: engine/fox_radio } + - { type: bss, vram: 0x8017A8C0, name: engine/fox_versus } + - { type: bss, vram: 0x8017A9E0, name: engine/fox_save } + + - name: dma_table + type: code + start: 0xE0570 + vram: 0x8017ABE0 + follows_vram: main + subsegments: + - [0xE0570, .data, dmatable] + + - name: buffers + exclusive_ram_id: buffer + type: code + vram: 0x80289000 + bss_size: 0x177000 + subsegments: + - { type: .bss, vram: 0x80289000, name: buffers } diff --git a/yamls/eu/rev0/overlays.yaml b/yamls/eu/rev0/overlays.yaml new file mode 100644 index 00000000..21e1d23e --- /dev/null +++ b/yamls/eu/rev0/overlays.yaml @@ -0,0 +1,265 @@ + - name: ast_radio_de + exclusive_ram_id: radio + type: code + dir: assets + start: 0xDE12C0 + vram: 0x8017B230 + follows_vram: dma_table + symbol_name_format: de_$VRAM + subsegments: + - [0xDE12C0, data, ast_radio_de] + + - name: ovl_i1 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i1 + start: 0xDF10B0 + vram: 0x8018B020 + follows_vram: ast_radio_de + bss_size: 0xA10 + symbol_name_format: i1_$VRAM + subsegments: + - [0xDF10B0, c, fox_i1] + - [0xDF10C0, c, fox_co] + - [0xDFBBF0, c, fox_ve1] + - [0xE023D0, c, fox_tr] + - [0xE02740, c, fox_tr360] + - [0xE032C0, data, fox_i1] + - [0xE032D0, data, fox_co] + - [0xE03630, data, fox_ve1] + - [0xE04940, data, fox_tr360] + - [0xE04990, .rodata, fox_co] + - [0xE04D50, .rodata, fox_ve1] + - [0xE05100, .rodata, fox_tr] + - [0xE05140, .rodata, fox_tr360] + - { type: bss, vram: 0x8019F0F0, name: fox_i1 } + - { type: bss, vram: 0x8019F100, name: fox_co } + - { type: bss, vram: 0x8019FB20, name: fox_ve1 } + + - name: ovl_i2 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i2 + start: 0xE05180 + vram: 0x8018B020 + follows_vram: ast_radio_de + bss_size: 0x30 + symbol_name_format: i2_$VRAM + subsegments: + - [0xE05180, c, fox_i2] + - [0xE05190, c, fox_me] + - [0xE0CC90, c, fox_sx] + - [0xE13020, data, fox_i2] + - [0xE13030, data, fox_me] + - [0xE13240, data, fox_sx] + - [0xE13390, .rodata, fox_me] + - [0xE13650, .rodata, fox_sx] + - { type: bss, vram: 0x80199810, name: fox_i2 } + - { type: bss, vram: 0x80199820, name: fox_sx } + + - name: ovl_i3 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i3 + start: 0xE13970 + vram: 0x8018B020 + follows_vram: ast_radio_de + bss_size: 0x2220 + symbol_name_format: i3_$VRAM + subsegments: + - [0xE13970, c, fox_i3] + - [0xE13980, c, fox_a6] + - [0xE1C370, c, fox_zo] + - [0xE2ABC0, c, fox_so] + - [0xE35200, c, fox_aq] + - [0xE4B050, data, fox_i3] + - [0xE4B060, data, fox_a6] + - [0xE4B910, data, fox_zo] + - [0xE4BC90, data, fox_so] + - [0xE4BF10, data, fox_aq] + - [0xE4CCB0, .rodata, fox_a6] + - [0xE4D160, .rodata, fox_zo] + - [0xE4D880, .rodata, fox_so] + - [0xE4DDE0, .rodata, fox_aq] + - { type: bss, vram: 0x801C5CA0, name: fox_i3 } + - { type: bss, vram: 0x801C5CB0, name: fox_a6 } + - { type: bss, vram: 0x801C5D90, name: fox_zo } + - { type: bss, vram: 0x801C61A0, name: fox_so } + - { type: bss, vram: 0x801C6220, name: fox_aq } + + - name: ovl_i4 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i4 + start: 0xE4E5F0 + vram: 0x8018B020 + follows_vram: ast_radio_de + bss_size: 0x1B0 + symbol_name_format: i4_$VRAM + subsegments: + - [0xE4E5F0, c, fox_i4] + - [0xE4E6C0, c, fox_fo] + - [0xE52D90, c, fox_bo] + - [0xE597D0, c, fox_ka] + - [0xE608A0, c, fox_sz] + - [0xE65D00, data, fox_i4] + - [0xE65D10, data, fox_fo] + - [0xE65DF0, data, fox_bo] + - [0xE66020, data, fox_ka] + - [0xE663E0, data, fox_sz] + - [0xE66600, .rodata, fox_i4] + - [0xE66640, .rodata, fox_fo] + - [0xE66840, .rodata, fox_bo] + - [0xE66BD0, .rodata, fox_ka] + - [0xE66F70, .rodata, fox_sz] + - { type: bss, vram: 0x801A3CA0, name: fox_i4 } + - { type: bss, vram: 0x801A3CB0, name: fox_bo } + - { type: bss, vram: 0x801A3E20, name: fox_ka } + - { type: bss, vram: 0x801A3E40, name: fox_sz } + + - name: ovl_i5 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i5 + start: 0xE67270 + vram: 0x8018B020 + follows_vram: ast_radio_de + bss_size: 0xAF70 + symbol_name_format: i5_$VRAM + subsegments: + - [0xE67270, c, fox_i5] + - [0xE67280, c, fox_ti_cs] + - [0xE68C60, c, fox_ti] + - [0xE79620, c, fox_ma] + - [0xE94660, c, fox_ground] + - [0xE96F20, data, fox_i5] + - [0xE96F30, data, fox_ti_cs] + - [0xE96FF0, data, fox_ti] + - [0xE98AE0, data, fox_ma] + - [0xE9A5A0, data, fox_ground] + - [0xE9A670, .rodata, fox_i5] + - [0xE9A680, .rodata, fox_ti_cs] + - [0xE9A6E0, .rodata, fox_ti] + - [0xE9AF40, .rodata, fox_ma] + - [0xE9BA80, .rodata, fox_ground] + - { type: bss, vram: 0x801BF920, name: fox_i5 } + - { type: bss, vram: 0x801BF930, name: fox_ti } + - { type: bss, vram: 0x801C1C80, name: fox_ma } + - { type: bss, vram: 0x801C2170, name: fox_ground } + + - name: ovl_i6 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i6 + start: 0xE9BB70 + vram: 0x8018B020 + follows_vram: ast_radio_de + bss_size: 0x520 + symbol_name_format: i6_$VRAM + subsegments: + - [0xE9BB70, c, fox_i6] + - [0xE9BB80, c, fox_andross] + - [0xEAA810, c, fox_ve2] + - [0xEAC100, c, fox_sy] + - [0xEB9AC0, c, fox_turret] + - [0xEBACC0, data, fox_i6] + - [0xEBACD0, data, i6] + - [0xEBACD0, data, fox_andross] + - [0xEBAE10, data, fox_ve2] + - [0xEBAE70, data, fox_sy] + - [0xEBB0E0, data, fox_turret] + - [0xEBB0F0, .rodata, fox_i6] + - [0xEBB100, .rodata, fox_andross] + - [0xEBB9A0, .rodata, fox_ve2] + - [0xEBB9E0, .rodata, fox_sy] + - [0xEBC430, .rodata, fox_turret] + - { type: bss, vram: 0x801AB940, name: fox_i6 } + - { type: bss, vram: 0x801AB950, name: fox_andross } + - { type: bss, vram: 0x801ABE50, name: fox_sy } + + + - name: ovl_menu + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_menu + start: 0xEBC490 + vram: 0x8018B020 + follows_vram: ast_radio_de + bss_size: 0x173A0 + symbol_name_format: menu_$VRAM + subsegments: + - [0xEBC490, c, fox_i_menu] + - [0xEBC550, c, fox_title] + - [0xEC6CF0, c, fox_option] + - [0xED5270, c, fox_map] + - [0xEE4750, data, fox_i_menu] + - [0xEE4760, data, fox_title] + - [0xEE53B0, data, fox_option] + - [0xEE6880, data, fox_map] + - [0xEEAD20, .rodata, fox_i_menu] + - [0xEEAD40, .rodata, fox_title] + - [0xEEB190, .rodata, fox_option] + - [0xEEB5B0, .rodata, fox_map] + - { type: bss, vram: 0x801BA820, name: fox_i_menu } + - { type: bss, vram: 0x801BA830, name: fox_title } + - { type: bss, vram: 0x801BBC80, name: fox_option } + - { type: bss, vram: 0x801BBF50, name: fox_map } + + + - name: ovl_ending + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_ending + start: 0xEEBC90 + vram: 0x8018B020 + follows_vram: ast_radio_de + bss_size: 0x2720 + symbol_name_format: ending_$VRAM + subsegments: + - [0xEEBC90, c, end1] + - [0xEF0D70, c, end2] + - [0xEF6C40, data, fox_end1] + - [0xEF7290, data, fox_end2] + - [0xEFA6E0, .rodata, end1] + - [0xEFA9A0, .rodata, end2] + - { type: bss, vram: 0x8019A490, name: fox_end1 } + - { type: bss, vram: 0x8019BD30, name: fox_end2 } + + + - name: ovl_unused + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_unused + start: 0xEFB100 + vram: 0x8018B020 + follows_vram: ast_radio_de + bss_size: 0x10 + symbol_name_format: unused_$VRAM + subsegments: + - [0xEFB100, c, fox_unused] + - [0xEFB110, data, fox_unused] + - { type: bss, vram: 0x8018B0C0, name: fox_unused } + + - name: ast_radio_en + exclusive_ram_id: radio + type: code + dir: assets + start: 0xEFB1A0 + vram: 0x8017B230 + follows_vram: dma_table + symbol_name_format: en_$VRAM + subsegments: + - [0xEFB1A0, data, ast_radio_en] + + - name: ast_radio_fr + exclusive_ram_id: radio + type: code + dir: assets + start: 0xF08CF0 + vram: 0x8017B230 + follows_vram: dma_table + symbol_name_format: fr_$VRAM + subsegments: + - [0xF08CF0, data, ast_radio_fr] + + - [0xF17200] \ No newline at end of file diff --git a/yamls/jp/rev0/overlays.yaml b/yamls/jp/rev0/overlays.yaml index fa0e6732..925cc2db 100644 --- a/yamls/jp/rev0/overlays.yaml +++ b/yamls/jp/rev0/overlays.yaml @@ -191,10 +191,10 @@ - [0xEA4760, .rodata, fox_title] - [0xEA4B00, .rodata, fox_option] - [0xEA4F00, .rodata, fox_map] - - { start: 0xEA5610, type: bss, vram: 0x801AF0B0, name: fox_menu } - - { start: 0xEA5610, type: bss, vram: 0x801AF0C0, name: fox_title } - - { start: 0xEA5610, type: bss, vram: 0x801B05A0, name: fox_option } - - { start: 0xEA5610, type: bss, vram: 0x801B0910, name: fox_map } + - { type: bss, vram: 0x801AF0B0, name: fox_menu } + - { type: bss, vram: 0x801AF0C0, name: fox_title } + - { type: bss, vram: 0x801B05A0, name: fox_option } + - { type: bss, vram: 0x801B0910, name: fox_map } - name: ovl_ending @@ -213,7 +213,7 @@ - [0xEB0E50, data, fox_end2] - [0xEB41A0, .rodata, fox_end1] - [0xEB45A0, .rodata, fox_end2] - - { start: 0xEB4C00, type: bss, vram: 0x8018DD90, name: fox_end1 } + - { type: bss, vram: 0x8018DD90, name: fox_end1 } - { type: bss, vram: 0x8018F620, name: fox_end2 } @@ -229,6 +229,6 @@ subsegments: - [0xEB4C00, c, fox_unused] - [0xEB4C10, data, fox_unused] - - { start: 0xEB4CA0, type: bss, vram: 0x8017E840, name: fox_unused } + - { type: bss, vram: 0x8017E840, name: fox_unused } - [0xEB4CA0] \ No newline at end of file From 53c05e51a42d3da47d0f815ce5d350a1a1b0e5de Mon Sep 17 00:00:00 2001 From: petrie911 <69443847+petrie911@users.noreply.github.com> Date: Sat, 18 May 2024 23:27:17 -0500 Subject: [PATCH 113/151] give EU a symbol addrs file (#256) * srceu * remove warning * and some cleanup * symbol addrs for eu * data * one cleanup * move macros to header --- include/sf64dma.h | 15 + linker_scripts/eu/rev0/symbol_addrs.txt | 9161 +++++++++++++++++ .../eu/rev0/symbol_addrs_assets.txt | 1043 ++ linker_scripts/eu/rev0/symbol_addrs_fix.txt | 8 +- linker_scripts/eu/rev0/undefined_syms.ld | 194 - .../jp/rev0/symbol_addrs_assets.txt | 1088 ++ src/dmatable.c | 5 - src/engine/fox_load_inits.c | 21 - srceu/dmatable.c | 5 - srceu/engine/fox_load_inits.c | 16 - srceu/engine/fox_versus.c | 6 + srcjp/dmatable.c | 5 - srcjp/engine/fox_load_inits.c | 21 - yamls/eu/rev0/header.yaml | 1 + yamls/eu/rev0/main.yaml | 3 +- yamls/eu/rev0/overlays.yaml | 2 +- yamls/jp/rev0/header.yaml | 1 + 17 files changed, 11324 insertions(+), 271 deletions(-) create mode 100644 linker_scripts/eu/rev0/symbol_addrs.txt create mode 100644 linker_scripts/eu/rev0/symbol_addrs_assets.txt create mode 100644 linker_scripts/jp/rev0/symbol_addrs_assets.txt diff --git a/include/sf64dma.h b/include/sf64dma.h index 10be747f..19804fee 100644 --- a/include/sf64dma.h +++ b/include/sf64dma.h @@ -64,6 +64,18 @@ #define SEGMENT_BSS_END(segment) (segment ## _BSS_END) #define SEGMENT_BSS_SIZE(segment) ((uintptr_t)SEGMENT_BSS_END(segment) - (uintptr_t)SEGMENT_BSS_START(segment)) +#define ROM_SEGMENT(file) { SEGMENT_ROM_START(file), SEGMENT_ROM_END(file) } + +#define OVERLAY_OFFSETS(file) \ + { { SEGMENT_ROM_START(file), SEGMENT_ROM_END(file) }, \ + { SEGMENT_BSS_START(file), SEGMENT_BSS_END(file) }, \ + { SEGMENT_TEXT_START(file), SEGMENT_TEXT_END(file) }, \ + { SEGMENT_DATA_START(file), SEGMENT_RODATA_END(file) } } + +#define NO_SEGMENT { NULL, NULL } + +#define NO_OVERLAY { NO_SEGMENT, NO_SEGMENT, NO_SEGMENT, NO_SEGMENT } + u8 Load_SceneSetup(u8 sceneId, u8 sceneSetup); void Load_InitDmaAndMsg(void); @@ -92,6 +104,9 @@ typedef struct { /* 0xC */ bool compFlag; } DmaEntry; // size = 0x10; +#define DMA_ENTRY(file) { file##_ROM_START, { file##_ROM_START, file##_ROM_END }, false } +#define DMA_ENTRY_NONE { NULL, { NULL, NULL }, false } + extern DmaEntry gDmaTable[]; // 178A70 DECLARE_SEGMENT(makerom); diff --git a/linker_scripts/eu/rev0/symbol_addrs.txt b/linker_scripts/eu/rev0/symbol_addrs.txt new file mode 100644 index 00000000..c1c99525 --- /dev/null +++ b/linker_scripts/eu/rev0/symbol_addrs.txt @@ -0,0 +1,9161 @@ +func_800028C0 = 0x800028C0; +func_8000299C = 0x8000299C; +func_80002A28 = 0x80002A28; +func_80002B74 = 0x80002B74; +func_80002C68 = 0x80002C68; +func_80002CD0 = 0x80002CD0; +func_80002D38 = 0x80002D38; +func_80002F00 = 0x80002F00; +func_80002F20 = 0x80002F20; +func_80002F64 = 0x80002F64; +func_80003008 = 0x80003008; +func_800031EC = 0x800031EC; +func_80003334 = 0x80003334; +func_80003460 = 0x80003460; +func_800035A0 = 0x800035A0; +func_800036A0 = 0x800036A0; +func_800037FC = 0x800037FC; +func_8000397C = 0x8000397C; +func_80003B20 = 0x80003B20; +func_80003C18 = 0x80003C18; +func_80003CE0 = 0x80003CE0; +func_80003E50 = 0x80003E50; +func_80003F60 = 0x80003F60; +func_8000406C = 0x8000406C; +func_80004164 = 0x80004164; +func_800041D4 = 0x800041D4; +func_800045D0 = 0x800045D0; +func_80004784 = 0x80004784; +func_80004808 = 0x80004808; +func_80004894 = 0x80004894; +func_80004A44 = 0x80004A44; +func_80004B2C = 0x80004B2C; +func_80004D70 = 0x80004D70; +func_80004E18 = 0x80004E18; +func_80004E90 = 0x80004E90; +func_80004EBC = 0x80004EBC; +func_80004F20 = 0x80004F20; +func_80005038 = 0x80005038; +func_80005058 = 0x80005058; +func_80005170 = 0x80005170; +func_80005268 = 0x80005268; +func_80005390 = 0x80005390; +func_80005438 = 0x80005438; +func_80005538 = 0x80005538; +func_8000564C = 0x8000564C; +func_80005674 = 0x80005674; +func_800056F0 = 0x800056F0; +func_80005778 = 0x80005778; +func_800057B0 = 0x800057B0; +func_800057C4 = 0x800057C4; +func_80005B70 = 0x80005B70; +func_80005CA4 = 0x80005CA4; +func_80005DB4 = 0x80005DB4; +func_80005F00 = 0x80005F00; +func_80006050 = 0x80006050; +func_8000619C = 0x8000619C; +func_80006570 = 0x80006570; +func_8000678C = 0x8000678C; +func_800069E0 = 0x800069E0; +func_80006A90 = 0x80006A90; +func_80006B28 = 0x80006B28; +func_80006CEC = 0x80006CEC; +func_80006EAC = 0x80006EAC; +func_80006F28 = 0x80006F28; +func_80006F90 = 0x80006F90; +func_80006FA8 = 0x80006FA8; +func_80006FD0 = 0x80006FD0; +func_80007048 = 0x80007048; +func_800070D8 = 0x800070D8; +func_800070EC = 0x800070EC; +func_800070F8 = 0x800070F8; +func_80007138 = 0x80007138; +func_800071A0 = 0x800071A0; +func_800071DC = 0x800071DC; +func_8000726C = 0x8000726C; +func_80007350 = 0x80007350; +func_80007430 = 0x80007430; +func_8000751C = 0x8000751C; +func_80007674 = 0x80007674; +func_8000769C = 0x8000769C; +func_8000777C = 0x8000777C; +func_80007868 = 0x80007868; +func_800078F0 = 0x800078F0; +func_80007980 = 0x80007980; +func_80007D5C = 0x80007D5C; +func_80007DC8 = 0x80007DC8; +func_80008054 = 0x80008054; +func_80008088 = 0x80008088; +func_80008130 = 0x80008130; +func_800083D4 = 0x800083D4; +func_800087F0 = 0x800087F0; +func_80009194 = 0x80009194; +func_80009574 = 0x80009574; +func_800096EC = 0x800096EC; +func_80009818 = 0x80009818; +func_8000994C = 0x8000994C; +func_800099F4 = 0x800099F4; +func_80009A9C = 0x80009A9C; +func_80009B1C = 0x80009B1C; +func_80009BD4 = 0x80009BD4; +func_80009DE8 = 0x80009DE8; +func_8000A198 = 0x8000A198; +func_8000A2CC = 0x8000A2CC; +func_8000A770 = 0x8000A770; +func_8000B460 = 0x8000B460; +func_8000B4F0 = 0x8000B4F0; +func_8000B58C = 0x8000B58C; +func_8000B9FC = 0x8000B9FC; +func_8000BCE0 = 0x8000BCE0; +func_8000BDA8 = 0x8000BDA8; +func_8000BE94 = 0x8000BE94; +func_8000BF04 = 0x8000BF04; +func_8000BF84 = 0x8000BF84; +func_8000BFDC = 0x8000BFDC; +func_8000C004 = 0x8000C004; +func_8000C018 = 0x8000C018; +func_8000C048 = 0x8000C048; +func_8000C058 = 0x8000C058; +func_8000C0B4 = 0x8000C0B4; +func_8000C130 = 0x8000C130; +func_8000C1AC = 0x8000C1AC; +func_8000C268 = 0x8000C268; +func_8000C324 = 0x8000C324; +func_8000CA00 = 0x8000CA00; +func_8000CA58 = 0x8000CA58; +func_8000CB64 = 0x8000CB64; +func_8000CF38 = 0x8000CF38; +func_8000D0FC = 0x8000D0FC; +func_8000D174 = 0x8000D174; +func_8000D518 = 0x8000D518; +func_8000DB64 = 0x8000DB64; +func_8000DBBC = 0x8000DBBC; +func_8000DC3C = 0x8000DC3C; +func_8000DC8C = 0x8000DC8C; +func_8000DCDC = 0x8000DCDC; +func_8000DD2C = 0x8000DD2C; +func_8000DDC0 = 0x8000DDC0; +func_8000E054 = 0x8000E054; +func_8000E21C = 0x8000E21C; +func_8000E260 = 0x8000E260; +func_8000E2E8 = 0x8000E2E8; +func_8000E4F0 = 0x8000E4F0; +func_8000E5F8 = 0x8000E5F8; +func_8000E930 = 0x8000E930; +func_8000EC04 = 0x8000EC04; +func_8000EC64 = 0x8000EC64; +func_8000ED10 = 0x8000ED10; +func_8000ED78 = 0x8000ED78; +func_8000EE64 = 0x8000EE64; +func_8000EF34 = 0x8000EF34; +func_8000EF98 = 0x8000EF98; +func_8000F060 = 0x8000F060; +func_8000F0C8 = 0x8000F0C8; +func_8000F1A8 = 0x8000F1A8; +func_8000F250 = 0x8000F250; +func_8000F270 = 0x8000F270; +func_8000F3A4 = 0x8000F3A4; +func_8000F3D8 = 0x8000F3D8; +func_8000F4C8 = 0x8000F4C8; +func_8000F5A4 = 0x8000F5A4; +func_8000F7E0 = 0x8000F7E0; +func_8000F81C = 0x8000F81C; +func_8000F870 = 0x8000F870; +func_8000F8B4 = 0x8000F8B4; +func_8000FA78 = 0x8000FA78; +func_8000FBA0 = 0x8000FBA0; +func_8000FBF8 = 0x8000FBF8; +func_8000FCCC = 0x8000FCCC; +func_8000FCDC = 0x8000FCDC; +func_8000FCF0 = 0x8000FCF0; +func_8000FD10 = 0x8000FD10; +func_8000FFEC = 0x8000FFEC; +func_8001001C = 0x8001001C; +func_800105D0 = 0x800105D0; +func_80010780 = 0x80010780; +func_800107EC = 0x800107EC; +func_80010854 = 0x80010854; +func_800109E0 = 0x800109E0; +func_80010A64 = 0x80010A64; +func_80010ABC = 0x80010ABC; +func_80010BD4 = 0x80010BD4; +func_80010C44 = 0x80010C44; +func_80010EE0 = 0x80010EE0; +func_80010F70 = 0x80010F70; +func_80010FC8 = 0x80010FC8; +func_80011104 = 0x80011104; +func_80011530 = 0x80011530; +func_800116F4 = 0x800116F4; +func_8001173C = 0x8001173C; +func_80011870 = 0x80011870; +func_80011C38 = 0x80011C38; +func_80011CF0 = 0x80011CF0; +func_80011D2C = 0x80011D2C; +func_80011DDC = 0x80011DDC; +func_80011E98 = 0x80011E98; +func_80011F2C = 0x80011F2C; +func_80011F88 = 0x80011F88; +func_80012418 = 0x80012418; +func_8001264C = 0x8001264C; +func_8001266C = 0x8001266C; +func_8001268C = 0x8001268C; +func_80012790 = 0x80012790; +func_80012834 = 0x80012834; +func_80012844 = 0x80012844; +func_80012894 = 0x80012894; +func_80012944 = 0x80012944; +func_80012AA4 = 0x80012AA4; +func_80012BE0 = 0x80012BE0; +func_80012C20 = 0x80012C20; +func_80012C4C = 0x80012C4C; +func_80012CCC = 0x80012CCC; +func_80012E08 = 0x80012E08; +func_80012E3C = 0x80012E3C; +func_80012E68 = 0x80012E68; +func_80012EB4 = 0x80012EB4; +func_80012F04 = 0x80012F04; +func_80012FFC = 0x80012FFC; +func_800132C8 = 0x800132C8; +func_800133E0 = 0x800133E0; +func_80013588 = 0x80013588; +func_800136E8 = 0x800136E8; +func_800137BC = 0x800137BC; +func_80013800 = 0x80013800; +func_800139F8 = 0x800139F8; +func_80013A64 = 0x80013A64; +func_80013B4C = 0x80013B4C; +func_80013B70 = 0x80013B70; +func_80013E80 = 0x80013E80; +func_80013FA4 = 0x80013FA4; +func_800140B0 = 0x800140B0; +func_800140EC = 0x800140EC; +func_8001413C = 0x8001413C; +func_800141A8 = 0x800141A8; +func_80014224 = 0x80014224; +func_80014350 = 0x80014350; +func_80014420 = 0x80014420; +func_800144C4 = 0x800144C4; +func_8001459C = 0x8001459C; +func_800145DC = 0x800145DC; +func_8001461C = 0x8001461C; +func_800146A0 = 0x800146A0; +func_800146B4 = 0x800146B4; +func_800146E4 = 0x800146E4; +func_80014728 = 0x80014728; +func_800152A0 = 0x800152A0; +func_80015310 = 0x80015310; +func_800153A4 = 0x800153A4; +func_800153C8 = 0x800153C8; +func_80015FB4 = 0x80015FB4; +func_8001676C = 0x8001676C; +func_800167E4 = 0x800167E4; +func_8001689C = 0x8001689C; +func_80016A30 = 0x80016A30; +func_80016A38 = 0x80016A38; +func_80016BA0 = 0x80016BA0; +func_80016CBC = 0x80016CBC; +func_80016EC4 = 0x80016EC4; +func_80016FD0 = 0x80016FD0; +func_8001737C = 0x8001737C; +func_800174B0 = 0x800174B0; +func_8001756C = 0x8001756C; +func_800175A4 = 0x800175A4; +func_8001761C = 0x8001761C; +func_8001777C = 0x8001777C; +func_800177E4 = 0x800177E4; +func_80018310 = 0x80018310; +func_80018338 = 0x80018338; +func_800183B8 = 0x800183B8; +func_8001842C = 0x8001842C; +func_8001848C = 0x8001848C; +func_800184F0 = 0x800184F0; +func_80018508 = 0x80018508; +func_800185BC = 0x800185BC; +func_80018614 = 0x80018614; +func_80018EB8 = 0x80018EB8; +func_80018EFC = 0x80018EFC; +func_80018FC0 = 0x80018FC0; +func_80019084 = 0x80019084; +func_80019100 = 0x80019100; +func_80019174 = 0x80019174; +func_800191D8 = 0x800191D8; +func_80019234 = 0x80019234; +func_800192AC = 0x800192AC; +func_80019450 = 0x80019450; +func_800197C8 = 0x800197C8; +func_800198DC = 0x800198DC; +func_8001A038 = 0x8001A038; +func_8001A2AC = 0x8001A2AC; +func_8001A3A8 = 0x8001A3A8; +func_8001A4D4 = 0x8001A4D4; +func_8001A51C = 0x8001A51C; +func_8001A578 = 0x8001A578; +func_8001A6E0 = 0x8001A6E0; +func_8001A854 = 0x8001A854; +func_8001A9A4 = 0x8001A9A4; +func_8001AA08 = 0x8001AA08; +func_8001AAAC = 0x8001AAAC; +func_8001AB00 = 0x8001AB00; +func_8001AB6C = 0x8001AB6C; +func_8001ACF8 = 0x8001ACF8; +func_8001AD1C = 0x8001AD1C; +func_8001AD60 = 0x8001AD60; +func_8001AE74 = 0x8001AE74; +func_8001AE94 = 0x8001AE94; +func_8001AEF0 = 0x8001AEF0; +func_8001AF5C = 0x8001AF5C; +func_8001AF6C = 0x8001AF6C; +func_8001AFB8 = 0x8001AFB8; +func_8001B030 = 0x8001B030; +func_8001B470 = 0x8001B470; +func_8001B790 = 0x8001B790; +func_8001BA5C = 0x8001BA5C; +func_8001BB90 = 0x8001BB90; +func_8001BC3C = 0x8001BC3C; +func_8001BC64 = 0x8001BC64; +func_8001BD28 = 0x8001BD28; +func_8001BFDC = 0x8001BFDC; +func_8001C408 = 0x8001C408; +func_8001C8D4 = 0x8001C8D4; +func_8001CA40 = 0x8001CA40; +func_8001CBB8 = 0x8001CBB8; +func_8001CD14 = 0x8001CD14; +func_8001CE60 = 0x8001CE60; +func_8001CF34 = 0x8001CF34; +func_8001CF98 = 0x8001CF98; +func_8001CFE0 = 0x8001CFE0; +func_8001D06C = 0x8001D06C; +func_8001D0EC = 0x8001D0EC; +func_8001D144 = 0x8001D144; +func_8001D194 = 0x8001D194; +func_8001D200 = 0x8001D200; +func_8001D334 = 0x8001D334; +func_8001D3D8 = 0x8001D3D8; +func_8001D438 = 0x8001D438; +func_8001D448 = 0x8001D448; +func_8001D47C = 0x8001D47C; +func_8001D4E4 = 0x8001D4E4; +func_8001D558 = 0x8001D558; +func_8001D670 = 0x8001D670; +func_8001D714 = 0x8001D714; +func_8001D7B8 = 0x8001D7B8; +func_8001D8E0 = 0x8001D8E0; +func_8001D92C = 0x8001D92C; +func_8001DA18 = 0x8001DA18; +func_8001DAC8 = 0x8001DAC8; +func_8001DC08 = 0x8001DC08; +func_8001DC64 = 0x8001DC64; +func_8001DCA4 = 0x8001DCA4; +func_8001DD04 = 0x8001DD04; +func_8001DD4C = 0x8001DD4C; +func_8001DD78 = 0x8001DD78; +func_8001DDE8 = 0x8001DDE8; +func_8001DEEC = 0x8001DEEC; +func_8001DF9C = 0x8001DF9C; +func_8001E020 = 0x8001E020; +func_8001E514 = 0x8001E514; +func_8001E7F0 = 0x8001E7F0; +func_8001E848 = 0x8001E848; +func_8001E898 = 0x8001E898; +func_8001E920 = 0x8001E920; +func_8001E978 = 0x8001E978; +func_8001E99C = 0x8001E99C; +func_8001E9C0 = 0x8001E9C0; +func_8001E9F0 = 0x8001E9F0; +func_8001EA68 = 0x8001EA68; +func_8001EA7C = 0x8001EA7C; +func_8001ED7C = 0x8001ED7C; +func_8001EDE4 = 0x8001EDE4; +func_8001EE04 = 0x8001EE04; +func_8001EE5C = 0x8001EE5C; +func_8001EED0 = 0x8001EED0; +func_8001EF0C = 0x8001EF0C; +func_8001EF30 = 0x8001EF30; +func_8001EF40 = 0x8001EF40; +func_8001EFE0 = 0x8001EFE0; +func_8001FAB0 = 0x8001FAB0; +func_8001FAD4 = 0x8001FAD4; +func_8001FB24 = 0x8001FB24; +func_8001FB80 = 0x8001FB80; +func_8001FBB4 = 0x8001FBB4; +func_8001FBD4 = 0x8001FBD4; +func_8001FBF4 = 0x8001FBF4; +func_8001FC28 = 0x8001FC28; +func_8001FC58 = 0x8001FC58; +func_8001FC78 = 0x8001FC78; +func_8001FC98 = 0x8001FC98; +func_8001FCB8 = 0x8001FCB8; +func_8001FDDC = 0x8001FDDC; +func_8001FED0 = 0x8001FED0; +func_8001FF00 = 0x8001FF00; +func_8001FF30 = 0x8001FF30; +func_8001FF3C = 0x8001FF3C; +func_8001FF48 = 0x8001FF48; +func_8001FF58 = 0x8001FF58; +func_8001FF68 = 0x8001FF68; +func_8001FF74 = 0x8001FF74; +func_8001FF80 = 0x8001FF80; +func_8001FF90 = 0x8001FF90; +func_8001FFA0 = 0x8001FFA0; +func_8001FFAC = 0x8001FFAC; +func_8001FFB8 = 0x8001FFB8; +func_8001FFC8 = 0x8001FFC8; +func_8001FFD8 = 0x8001FFD8; +func_8001FFE4 = 0x8001FFE4; +func_8001FFF0 = 0x8001FFF0; +func_80020000 = 0x80020000; +func_80020010 = 0x80020010; +func_8002002C = 0x8002002C; +func_8002004C = 0x8002004C; +func_8002006C = 0x8002006C; +func_80020090 = 0x80020090; +func_80020288 = 0x80020288; +func_80020358 = 0x80020358; +func_80020450 = 0x80020450; +func_80020514 = 0x80020514; +func_800205BC = 0x800205BC; +func_800206B0 = 0x800206B0; +func_800207F0 = 0x800207F0; +func_80020940 = 0x80020940; +func_800209C4 = 0x800209C4; +func_800209F0 = 0x800209F0; +func_80020B58 = 0x80020B58; +func_80020CC4 = 0x80020CC4; +func_80020E40 = 0x80020E40; +func_80021010 = 0x80021010; +func_80021240 = 0x80021240; +func_800212A0 = 0x800212A0; +func_80021558 = 0x80021558; +func_800215D0 = 0x800215D0; +func_80021724 = 0x80021724; +func_80021790 = 0x80021790; +func_80021810 = 0x80021810; +func_800218C0 = 0x800218C0; +func_800219D0 = 0x800219D0; +func_80021A40 = 0x80021A40; +func_80021A70 = 0x80021A70; +func_80021AC0 = 0x80021AC0; +func_80021B30 = 0x80021B30; +func_80021BF0 = 0x80021BF0; +func_80021C60 = 0x80021C60; +func_80021E20 = 0x80021E20; +func_80021E50 = 0x80021E50; +func_80021EC0 = 0x80021EC0; +func_80021F30 = 0x80021F30; +func_80021FB0 = 0x80021FB0; +func_80021FD0 = 0x80021FD0; +func_800220EC = 0x800220EC; +func_8002227C = 0x8002227C; +func_800222C0 = 0x800222C0; +func_800222D0 = 0x800222D0; +func_80022420 = 0x80022420; +func_80022570 = 0x80022570; +func_800226F8 = 0x800226F8; +func_800228D0 = 0x800228D0; +func_80022A9C = 0x80022A9C; +func_80022BB0 = 0x80022BB0; +func_80022C90 = 0x80022C90; +func_80023130 = 0x80023130; +func_800231C0 = 0x800231C0; +func_80023380 = 0x80023380; +func_800234F0 = 0x800234F0; +func_80023500 = 0x80023500; +func_800235E0 = 0x800235E0; +func_800237D0 = 0x800237D0; +func_800238E0 = 0x800238E0; +func_80023A90 = 0x80023A90; +func_80023B9C = 0x80023B9C; +func_80023DC0 = 0x80023DC0; +func_80023DEC = 0x80023DEC; +func_80023E28 = 0x80023E28; +func_80023E64 = 0x80023E64; +func_80023E90 = 0x80023E90; +func_80023ECC = 0x80023ECC; +func_80023F28 = 0x80023F28; +func_80023F58 = 0x80023F58; +func_80023FB8 = 0x80023FB8; +func_80024054 = 0x80024054; +func_80024080 = 0x80024080; +func_800240F0 = 0x800240F0; +func_8002411C = 0x8002411C; +func_80024144 = 0x80024144; +func_80024190 = 0x80024190; +func_80024800 = 0x80024800; +func_80024E50 = 0x80024E50; +func_80024E80 = 0x80024E80; +func_80024E90 = 0x80024E90; +func_80024FF0 = 0x80024FF0; +func_800250E0 = 0x800250E0; +func_800251C0 = 0x800251C0; +func_800251D0 = 0x800251D0; +func_80025280 = 0x80025280; +func_80025290 = 0x80025290; +func_80025340 = 0x80025340; +func_80025390 = 0x80025390; +func_800253D4 = 0x800253D4; +func_80025400 = 0x80025400; +func_80025420 = 0x80025420; +func_80025440 = 0x80025440; +func_80025480 = 0x80025480; +__ptExceptionPreamble = 0x80025490; +__ptException = 0x800254B4; +func_80025E38 = 0x80025E38; +func_80025F20 = 0x80025F20; +func_80026020 = 0x80026020; +func_80026068 = 0x80026068; +func_80026078 = 0x80026078; +__osCleanupThread = 0x800261F4; +func_800263A0 = 0x800263A0; +func_8002649C = 0x8002649C; +func_80026570 = 0x80026570; +func_80026620 = 0x80026620; +func_800266F0 = 0x800266F0; +func_800268F4 = 0x800268F4; +func_80026A70 = 0x80026A70; +func_80026C8C = 0x80026C8C; +func_80026E00 = 0x80026E00; +func_80026F00 = 0x80026F00; +func_80026F88 = 0x80026F88; +func_80026FB8 = 0x80026FB8; +func_80027070 = 0x80027070; +func_800271C0 = 0x800271C0; +func_800271F0 = 0x800271F0; +func_80027330 = 0x80027330; +func_80027340 = 0x80027340; +func_80027350 = 0x80027350; +func_80027660 = 0x80027660; +func_800276E0 = 0x800276E0; +func_80027760 = 0x80027760; +func_800277A0 = 0x800277A0; +func_80027830 = 0x80027830; +func_80027860 = 0x80027860; +func_800278EC = 0x800278EC; +func_80027B30 = 0x80027B30; +func_80027BA4 = 0x80027BA4; +func_80027D30 = 0x80027D30; +func_80027D50 = 0x80027D50; +func_80027D60 = 0x80027D60; +func_800280C0 = 0x800280C0; +func_800281C0 = 0x800281C0; +func_80028210 = 0x80028210; +func_80028254 = 0x80028254; +func_80028280 = 0x80028280; +func_80028360 = 0x80028360; +func_80028590 = 0x80028590; +func_80028A20 = 0x80028A20; +func_80028CE0 = 0x80028CE0; +func_80028CF0 = 0x80028CF0; +func_80028D00 = 0x80028D00; +func_80028D10 = 0x80028D10; +func_80028D60 = 0x80028D60; +func_80028DB0 = 0x80028DB0; +func_80028E10 = 0x80028E10; +func_80028E70 = 0x80028E70; +func_80028F10 = 0x80028F10; +func_800291B0 = 0x800291B0; +func_80029720 = 0x80029720; +func_80029C70 = 0x80029C70; +func_80029CA0 = 0x80029CA0; +func_80029CD0 = 0x80029CD0; +func_80029D28 = 0x80029D28; +func_80029D9C = 0x80029D9C; +func_80029E08 = 0x80029E08; +func_80029ED8 = 0x80029ED8; +func_80029FE0 = 0x80029FE0; +func_8002A0B0 = 0x8002A0B0; +func_8002A124 = 0x8002A124; +func_8002A174 = 0x8002A174; +func_8002A1E0 = 0x8002A1E0; +func_8002A2B0 = 0x8002A2B0; +func_8002A340 = 0x8002A340; +func_8002A9E4 = 0x8002A9E4; +func_8002AACC = 0x8002AACC; +func_8002ABC0 = 0x8002ABC0; +func_8002AC60 = 0x8002AC60; +func_8002AD60 = 0x8002AD60; +func_8002AE70 = 0x8002AE70; +func_8002AF30 = 0x8002AF30; +func_8002AF40 = 0x8002AF40; +func_8002AFA0 = 0x8002AFA0; +func_8002AFF0 = 0x8002AFF0; +func_8002B040 = 0x8002B040; +func_8002B090 = 0x8002B090; +func_8002B0E0 = 0x8002B0E0; +func_8002B1E0 = 0x8002B1E0; +func_8002B270 = 0x8002B270; +func_8002B280 = 0x8002B280; +func_8002B28C = 0x8002B28C; +func_8002B320 = 0x8002B320; +func_8002B368 = 0x8002B368; +func_8002B3BC = 0x8002B3BC; +func_8002B3F0 = 0x8002B3F0; +func_8002B424 = 0x8002B424; +func_8002B460 = 0x8002B460; +func_8002B65C = 0x8002B65C; +func_8002B8A8 = 0x8002B8A8; +func_8002B928 = 0x8002B928; +func_8002B934 = 0x8002B934; +func_8002B9DC = 0x8002B9DC; +func_8002BA4C = 0x8002BA4C; +func_8002BC30 = 0x8002BC30; +func_8002BCAC = 0x8002BCAC; +func_8002BD2C = 0x8002BD2C; +func_8002BE34 = 0x8002BE34; +func_8002BF68 = 0x8002BF68; +func_8002C25C = 0x8002C25C; +func_8002C2C4 = 0x8002C2C4; +func_8002C40C = 0x8002C40C; +func_8002C6A0 = 0x8002C6A0; +func_8002C6EC = 0x8002C6EC; +func_8002C7C8 = 0x8002C7C8; +func_8002C7E8 = 0x8002C7E8; +func_8002C830 = 0x8002C830; +func_8002C8B4 = 0x8002C8B4; +func_8002C948 = 0x8002C948; +func_8002C9F0 = 0x8002C9F0; +func_8002CA98 = 0x8002CA98; +func_8002CBF4 = 0x8002CBF4; +func_8002CD44 = 0x8002CD44; +func_8002CDFC = 0x8002CDFC; +func_8002CEB0 = 0x8002CEB0; +func_8002CF14 = 0x8002CF14; +func_8002D074 = 0x8002D074; +func_8002D184 = 0x8002D184; +func_8002D29C = 0x8002D29C; +func_8002D360 = 0x8002D360; +func_8002D430 = 0x8002D430; +func_8002D4DC = 0x8002D4DC; +func_8002D5C4 = 0x8002D5C4; +func_8002D784 = 0x8002D784; +func_8002D790 = 0x8002D790; +func_8002D8EC = 0x8002D8EC; +func_8002DB14 = 0x8002DB14; +func_8002DBA8 = 0x8002DBA8; +func_8002DC6C = 0x8002DC6C; +func_8002DCAC = 0x8002DCAC; +func_8002DD68 = 0x8002DD68; +func_8002DD98 = 0x8002DD98; +func_8002DE00 = 0x8002DE00; +func_8002DE30 = 0x8002DE30; +func_8002DF10 = 0x8002DF10; +func_8002DFA8 = 0x8002DFA8; +func_8002E050 = 0x8002E050; +func_8002E170 = 0x8002E170; +func_8002E310 = 0x8002E310; +func_8002E360 = 0x8002E360; +func_8002E3B0 = 0x8002E3B0; +func_8002E470 = 0x8002E470; +func_8002E494 = 0x8002E494; +func_8002E4D8 = 0x8002E4D8; +func_8002E4EC = 0x8002E4EC; +func_8002E510 = 0x8002E510; +func_8002E628 = 0x8002E628; +func_8002E684 = 0x8002E684; +func_8002E71C = 0x8002E71C; +func_8002E740 = 0x8002E740; +func_8002E764 = 0x8002E764; +func_8002E788 = 0x8002E788; +func_8002E7AC = 0x8002E7AC; +func_8002E7D0 = 0x8002E7D0; +func_8002E7F4 = 0x8002E7F4; +func_8002E818 = 0x8002E818; +func_8002E83C = 0x8002E83C; +func_8002EE9C = 0x8002EE9C; +func_8002EF70 = 0x8002EF70; +func_8002EFA0 = 0x8002EFA0; +func_8002F2BC = 0x8002F2BC; +func_8002F51C = 0x8002F51C; +func_8002F730 = 0x8002F730; +func_8002F794 = 0x8002F794; +func_8002F7F0 = 0x8002F7F0; +func_8002FC90 = 0x8002FC90; +func_8002FD44 = 0x8002FD44; +func_8002FFAC = 0x8002FFAC; +func_80030028 = 0x80030028; +func_80030240 = 0x80030240; +func_80030328 = 0x80030328; +func_800305D0 = 0x800305D0; +func_800309C0 = 0x800309C0; +func_800318FC = 0x800318FC; +func_800319A4 = 0x800319A4; +func_80031A50 = 0x80031A50; +func_80034E24 = 0x80034E24; +func_80035058 = 0x80035058; +func_800352A0 = 0x800352A0; +func_80035408 = 0x80035408; +func_80035CF0 = 0x80035CF0; +func_80035DAC = 0x80035DAC; +func_80035E08 = 0x80035E08; +func_80035E38 = 0x80035E38; +func_800362D8 = 0x800362D8; +func_800364E8 = 0x800364E8; +func_800365A4 = 0x800365A4; +func_8003668C = 0x8003668C; +func_80036730 = 0x80036730; +func_80036834 = 0x80036834; +func_80036F48 = 0x80036F48; +func_800373F8 = 0x800373F8; +func_80037658 = 0x80037658; +func_8003770C = 0x8003770C; +func_80037CB4 = 0x80037CB4; +func_80038100 = 0x80038100; +func_80038EF4 = 0x80038EF4; +func_800391D0 = 0x800391D0; +func_80039A10 = 0x80039A10; +func_8003AF48 = 0x8003AF48; +func_8003AF98 = 0x8003AF98; +func_8003AFCC = 0x8003AFCC; +func_8003B51C = 0x8003B51C; +func_8003BA40 = 0x8003BA40; +func_8003BA60 = 0x8003BA60; +func_8003BA8C = 0x8003BA8C; +func_8003BB0C = 0x8003BB0C; +func_8003BEB4 = 0x8003BEB4; +func_8003BFC8 = 0x8003BFC8; +func_8003C398 = 0x8003C398; +func_8003C490 = 0x8003C490; +func_8003CBE0 = 0x8003CBE0; +func_8003CF68 = 0x8003CF68; +func_8003D524 = 0x8003D524; +func_8003D820 = 0x8003D820; +func_8003D984 = 0x8003D984; +func_8003D9D8 = 0x8003D9D8; +func_8003DAC0 = 0x8003DAC0; +func_8003DE38 = 0x8003DE38; +func_8003E1B0 = 0x8003E1B0; +func_8003E1B8 = 0x8003E1B8; +func_80040420 = 0x80040420; +func_80040924 = 0x80040924; +func_80040CAC = 0x80040CAC; +func_80040CB4 = 0x80040CB4; +func_80042D08 = 0x80042D08; +func_80042E90 = 0x80042E90; +func_80042F7C = 0x80042F7C; +func_80042F88 = 0x80042F88; +func_80042F94 = 0x80042F94; +func_80042FA0 = 0x80042FA0; +func_80042FAC = 0x80042FAC; +func_80042FB8 = 0x80042FB8; +func_80042FC4 = 0x80042FC4; +func_800430AC = 0x800430AC; +func_80043158 = 0x80043158; +func_8004316C = 0x8004316C; +func_80043250 = 0x80043250; +func_80043438 = 0x80043438; +func_800438B0 = 0x800438B0; +func_80043A70 = 0x80043A70; +func_80043ADC = 0x80043ADC; +func_80043AE8 = 0x80043AE8; +func_800440F0 = 0x800440F0; +func_80044198 = 0x80044198; +func_800443AC = 0x800443AC; +func_8004448C = 0x8004448C; +func_80044838 = 0x80044838; +func_80045100 = 0x80045100; +func_80045318 = 0x80045318; +func_80045648 = 0x80045648; +func_80045E4C = 0x80045E4C; +func_800460B0 = 0x800460B0; +func_80046230 = 0x80046230; +func_80046328 = 0x80046328; +func_800463EC = 0x800463EC; +func_800466D4 = 0x800466D4; +func_80046E10 = 0x80046E10; +func_800474D4 = 0x800474D4; +func_80047724 = 0x80047724; +func_80047D08 = 0x80047D08; +func_80047E4C = 0x80047E4C; +func_80047F8C = 0x80047F8C; +func_800481C4 = 0x800481C4; +func_80048A90 = 0x80048A90; +func_80048C6C = 0x80048C6C; +func_80048DE8 = 0x80048DE8; +func_800495D8 = 0x800495D8; +func_800498B4 = 0x800498B4; +func_80049910 = 0x80049910; +func_80049A44 = 0x80049A44; +func_80049AEC = 0x80049AEC; +func_80049BB4 = 0x80049BB4; +func_8004A4D4 = 0x8004A4D4; +func_8004A6A8 = 0x8004A6A8; +func_8004A7E8 = 0x8004A7E8; +func_8004A830 = 0x8004A830; +func_8004AA2C = 0x8004AA2C; +func_8004AA9C = 0x8004AA9C; +func_8004B308 = 0x8004B308; +func_8004C89C = 0x8004C89C; +func_8004C8C0 = 0x8004C8C0; +func_8004CC50 = 0x8004CC50; +func_8004D358 = 0x8004D358; +func_8004D364 = 0x8004D364; +func_8004D3D0 = 0x8004D3D0; +func_8004D6BC = 0x8004D6BC; +func_8004D7AC = 0x8004D7AC; +func_8004DE7C = 0x8004DE7C; +func_8004E35C = 0x8004E35C; +func_8004E458 = 0x8004E458; +func_8004EB54 = 0x8004EB54; +func_8004EFE0 = 0x8004EFE0; +func_8004F71C = 0x8004F71C; +func_8004F830 = 0x8004F830; +func_8004FC3C = 0x8004FC3C; +func_8004FE44 = 0x8004FE44; +func_80051548 = 0x80051548; +func_80051AB0 = 0x80051AB0; +func_8005207C = 0x8005207C; +func_80052328 = 0x80052328; +func_800523A0 = 0x800523A0; +func_80052418 = 0x80052418; +func_8005248C = 0x8005248C; +func_80052504 = 0x80052504; +func_80052638 = 0x80052638; +func_80052804 = 0x80052804; +func_80052B00 = 0x80052B00; +func_80052CC8 = 0x80052CC8; +func_800530CC = 0x800530CC; +func_80053124 = 0x80053124; +func_800535D8 = 0x800535D8; +func_80053A80 = 0x80053A80; +func_80053A98 = 0x80053A98; +func_80053BB8 = 0x80053BB8; +func_80053EFC = 0x80053EFC; +func_80054200 = 0x80054200; +func_80054280 = 0x80054280; +func_800545DC = 0x800545DC; +func_8005470C = 0x8005470C; +func_80054894 = 0x80054894; +func_80054C24 = 0x80054C24; +func_80054E00 = 0x80054E00; +func_80055708 = 0x80055708; +func_80055AD8 = 0x80055AD8; +func_80055E18 = 0x80055E18; +func_800561B0 = 0x800561B0; +func_80056334 = 0x80056334; +func_80056440 = 0x80056440; +func_80056DAC = 0x80056DAC; +func_800571C8 = 0x800571C8; +func_80057484 = 0x80057484; +func_80057794 = 0x80057794; +func_80057844 = 0x80057844; +func_80057C80 = 0x80057C80; +func_80058B10 = 0x80058B10; +func_80058BD8 = 0x80058BD8; +func_80058EA4 = 0x80058EA4; +func_80059428 = 0x80059428; +func_80059470 = 0x80059470; +func_80059530 = 0x80059530; +func_80059610 = 0x80059610; +func_800596F0 = 0x800596F0; +func_80059700 = 0x80059700; +func_80059800 = 0x80059800; +func_8005984C = 0x8005984C; +func_80059890 = 0x80059890; +func_8005991C = 0x8005991C; +func_80059928 = 0x80059928; +func_800599E4 = 0x800599E4; +func_80059A64 = 0x80059A64; +func_80059B2C = 0x80059B2C; +func_80059B60 = 0x80059B60; +func_80059BF0 = 0x80059BF0; +func_80059BFC = 0x80059BFC; +func_80059C30 = 0x80059C30; +func_80059C68 = 0x80059C68; +func_80059C74 = 0x80059C74; +func_80059C80 = 0x80059C80; +func_80059FA8 = 0x80059FA8; +func_8005A01C = 0x8005A01C; +func_8005A050 = 0x8005A050; +func_8005A0BC = 0x8005A0BC; +func_8005A0C8 = 0x8005A0C8; +func_8005A0D4 = 0x8005A0D4; +func_8005ADEC = 0x8005ADEC; +func_8005B228 = 0x8005B228; +func_8005B3C8 = 0x8005B3C8; +func_8005B6E4 = 0x8005B6E4; +func_8005B75C = 0x8005B75C; +func_8005B80C = 0x8005B80C; +func_8005B888 = 0x8005B888; +func_8005B9E4 = 0x8005B9E4; +func_8005BA70 = 0x8005BA70; +func_8005BAF4 = 0x8005BAF4; +func_8005C630 = 0x8005C630; +func_8005C940 = 0x8005C940; +func_8005CA00 = 0x8005CA00; +func_8005CAC0 = 0x8005CAC0; +func_8005CB84 = 0x8005CB84; +func_8005CCDC = 0x8005CCDC; +func_8005CDE8 = 0x8005CDE8; +func_8005D048 = 0x8005D048; +func_8005D230 = 0x8005D230; +func_8005D40C = 0x8005D40C; +func_8005D694 = 0x8005D694; +func_8005D8F8 = 0x8005D8F8; +func_8005D994 = 0x8005D994; +func_8005DC00 = 0x8005DC00; +func_8005E1F8 = 0x8005E1F8; +func_8005E494 = 0x8005E494; +func_8005E578 = 0x8005E578; +func_8005E7F8 = 0x8005E7F8; +func_8005EA64 = 0x8005EA64; +func_8005ED18 = 0x8005ED18; +func_8005F070 = 0x8005F070; +func_8005F128 = 0x8005F128; +func_8005F22C = 0x8005F22C; +func_8005F2D0 = 0x8005F2D0; +func_8005F334 = 0x8005F334; +func_8005F6B0 = 0x8005F6B0; +func_8005FA1C = 0x8005FA1C; +func_8005FBB0 = 0x8005FBB0; +func_800604AC = 0x800604AC; +func_80060754 = 0x80060754; +func_800608DC = 0x800608DC; +func_800609A8 = 0x800609A8; +func_80060DD4 = 0x80060DD4; +func_80060F70 = 0x80060F70; +func_80060FFC = 0x80060FFC; +func_80061024 = 0x80061024; +func_80061188 = 0x80061188; +func_800612F8 = 0x800612F8; +func_800613A4 = 0x800613A4; +func_800613D4 = 0x800613D4; +func_80061404 = 0x80061404; +func_80061444 = 0x80061444; +func_80061484 = 0x80061484; +func_800614B4 = 0x800614B4; +func_800614F4 = 0x800614F4; +func_800615E0 = 0x800615E0; +func_800616CC = 0x800616CC; +func_800617B8 = 0x800617B8; +func_800618A4 = 0x800618A4; +func_80061998 = 0x80061998; +func_80061A8C = 0x80061A8C; +func_80061BA8 = 0x80061BA8; +func_80061D10 = 0x80061D10; +func_80061E88 = 0x80061E88; +func_80061F4C = 0x80061F4C; +func_800621C0 = 0x800621C0; +func_800625A8 = 0x800625A8; +func_800626A4 = 0x800626A4; +func_80062BA0 = 0x80062BA0; +func_80062C78 = 0x80062C78; +func_80062D44 = 0x80062D44; +func_80062DFC = 0x80062DFC; +func_800631E8 = 0x800631E8; +func_800632AC = 0x800632AC; +func_8006355C = 0x8006355C; +func_80063CEC = 0x80063CEC; +func_80063D98 = 0x80063D98; +func_80063E9C = 0x80063E9C; +func_80063F8C = 0x80063F8C; +func_80063F98 = 0x80063F98; +func_80063FB4 = 0x80063FB4; +func_80063FD0 = 0x80063FD0; +func_8006530C = 0x8006530C; +func_800653C0 = 0x800653C0; +func_800654AC = 0x800654AC; +func_80065524 = 0x80065524; +func_80065608 = 0x80065608; +func_800656AC = 0x800656AC; +func_80065714 = 0x80065714; +func_80066130 = 0x80066130; +func_80066294 = 0x80066294; +func_8006657C = 0x8006657C; +func_8006687C = 0x8006687C; +func_800669D0 = 0x800669D0; +func_80066AB0 = 0x80066AB0; +func_80066ABC = 0x80066ABC; +func_80066C30 = 0x80066C30; +func_80066D8C = 0x80066D8C; +func_80066EB0 = 0x80066EB0; +func_80066EBC = 0x80066EBC; +func_80066ED8 = 0x80066ED8; +func_80066F14 = 0x80066F14; +func_80066F20 = 0x80066F20; +func_80067200 = 0x80067200; +func_80067378 = 0x80067378; +func_800674E4 = 0x800674E4; +func_8006756C = 0x8006756C; +func_800678A4 = 0x800678A4; +func_80067A70 = 0x80067A70; +func_80067B4C = 0x80067B4C; +func_80067C1C = 0x80067C1C; +func_80067F9C = 0x80067F9C; +func_80068050 = 0x80068050; +func_80068608 = 0x80068608; +func_80068628 = 0x80068628; +func_80068648 = 0x80068648; +func_800686B8 = 0x800686B8; +func_80068944 = 0x80068944; +func_80068C78 = 0x80068C78; +func_80068CB8 = 0x80068CB8; +func_80069010 = 0x80069010; +func_80069100 = 0x80069100; +func_80069418 = 0x80069418; +func_80069688 = 0x80069688; +func_80069728 = 0x80069728; +func_80069888 = 0x80069888; +func_80069954 = 0x80069954; +func_80069A40 = 0x80069A40; +func_80069ADC = 0x80069ADC; +func_80069CEC = 0x80069CEC; +func_80069E24 = 0x80069E24; +func_80069EB8 = 0x80069EB8; +func_80069F60 = 0x80069F60; +func_8006A004 = 0x8006A004; +func_8006A09C = 0x8006A09C; +func_8006A3B4 = 0x8006A3B4; +func_8006A410 = 0x8006A410; +func_8006A7E0 = 0x8006A7E0; +func_8006A83C = 0x8006A83C; +func_8006A93C = 0x8006A93C; +func_8006A9A8 = 0x8006A9A8; +func_8006A9B4 = 0x8006A9B4; +func_8006A9C0 = 0x8006A9C0; +func_8006AA78 = 0x8006AA78; +func_8006AAD4 = 0x8006AAD4; +func_8006ABE0 = 0x8006ABE0; +func_8006AC44 = 0x8006AC44; +func_8006AD54 = 0x8006AD54; +func_8006B0D0 = 0x8006B0D0; +func_8006B0DC = 0x8006B0DC; +func_8006B4A8 = 0x8006B4A8; +func_8006B788 = 0x8006B788; +func_8006B998 = 0x8006B998; +func_8006BAA0 = 0x8006BAA0; +func_8006BB58 = 0x8006BB58; +func_8006BBB4 = 0x8006BBB4; +func_8006BFB8 = 0x8006BFB8; +func_8006C044 = 0x8006C044; +func_8006D130 = 0x8006D130; +func_8006D38C = 0x8006D38C; +func_8006D3A8 = 0x8006D3A8; +func_8006EA8C = 0x8006EA8C; +func_8006EB00 = 0x8006EB00; +func_8006EBA0 = 0x8006EBA0; +func_8006EBFC = 0x8006EBFC; +func_8006EC9C = 0x8006EC9C; +func_8006ECF8 = 0x8006ECF8; +func_8006EF38 = 0x8006EF38; +func_8006EFDC = 0x8006EFDC; +func_8006F080 = 0x8006F080; +func_8006F114 = 0x8006F114; +func_8006F17C = 0x8006F17C; +func_8006F228 = 0x8006F228; +func_8006F290 = 0x8006F290; +func_8006F448 = 0x8006F448; +func_8006FE64 = 0x8006FE64; +func_8006FF28 = 0x8006FF28; +func_800700E0 = 0x800700E0; +func_80070214 = 0x80070214; +func_80070BBC = 0x80070BBC; +func_80070D00 = 0x80070D00; +func_80070D58 = 0x80070D58; +func_80071DD4 = 0x80071DD4; +func_800720FC = 0x800720FC; +func_80072300 = 0x80072300; +func_80072420 = 0x80072420; +func_80072488 = 0x80072488; +func_800725A8 = 0x800725A8; +func_80074C10 = 0x80074C10; +func_80074C58 = 0x80074C58; +func_80074E50 = 0x80074E50; +func_80074F18 = 0x80074F18; +func_80074FA4 = 0x80074FA4; +func_80075004 = 0x80075004; +func_800763B8 = 0x800763B8; +func_80077190 = 0x80077190; +func_800771E0 = 0x800771E0; +func_8007722C = 0x8007722C; +func_80077250 = 0x80077250; +func_800772AC = 0x800772AC; +func_80077414 = 0x80077414; +func_800777A0 = 0x800777A0; +func_8007784C = 0x8007784C; +func_800778D4 = 0x800778D4; +func_8007798C = 0x8007798C; +func_80077A10 = 0x80077A10; +func_80077A8C = 0x80077A8C; +func_80077B88 = 0x80077B88; +func_80077B94 = 0x80077B94; +func_80078048 = 0x80078048; +func_80078108 = 0x80078108; +func_800783D0 = 0x800783D0; +func_80078448 = 0x80078448; +func_800784C4 = 0x800784C4; +func_80078560 = 0x80078560; +func_80078614 = 0x80078614; +func_8007869C = 0x8007869C; +func_800787AC = 0x800787AC; +func_800788C0 = 0x800788C0; +func_80078A74 = 0x80078A74; +func_80078AF0 = 0x80078AF0; +func_80078AFC = 0x80078AFC; +func_80078B9C = 0x80078B9C; +func_80078BF0 = 0x80078BF0; +func_80078C94 = 0x80078C94; +func_80078CF8 = 0x80078CF8; +func_80078D70 = 0x80078D70; +func_80078E60 = 0x80078E60; +func_80078ECC = 0x80078ECC; +func_80078F88 = 0x80078F88; +func_8007906C = 0x8007906C; +func_800794DC = 0x800794DC; +func_8007954C = 0x8007954C; +func_800795BC = 0x800795BC; +func_80079628 = 0x80079628; +func_8007969C = 0x8007969C; +func_800798D4 = 0x800798D4; +func_80079900 = 0x80079900; +func_8007A29C = 0x8007A29C; +func_8007A3D0 = 0x8007A3D0; +func_8007A4C8 = 0x8007A4C8; +func_8007A578 = 0x8007A578; +func_8007A608 = 0x8007A608; +func_8007A700 = 0x8007A700; +func_8007A758 = 0x8007A758; +func_8007A784 = 0x8007A784; +func_8007A828 = 0x8007A828; +func_8007A910 = 0x8007A910; +func_8007A9A4 = 0x8007A9A4; +func_8007AA70 = 0x8007AA70; +func_8007AB60 = 0x8007AB60; +func_8007AC1C = 0x8007AC1C; +func_8007ACF0 = 0x8007ACF0; +func_8007AD68 = 0x8007AD68; +func_8007AE04 = 0x8007AE04; +func_8007AF40 = 0x8007AF40; +func_8007AFE0 = 0x8007AFE0; +func_8007B050 = 0x8007B050; +func_8007B104 = 0x8007B104; +func_8007B190 = 0x8007B190; +func_8007B238 = 0x8007B238; +func_8007B2CC = 0x8007B2CC; +func_8007B354 = 0x8007B354; +func_8007B3C8 = 0x8007B3C8; +func_8007B4A4 = 0x8007B4A4; +func_8007B560 = 0x8007B560; +func_8007B5D0 = 0x8007B5D0; +func_8007B63C = 0x8007B63C; +func_8007B680 = 0x8007B680; +func_8007B68C = 0x8007B68C; +func_8007B768 = 0x8007B768; +func_8007B7F8 = 0x8007B7F8; +func_8007B908 = 0x8007B908; +func_8007B970 = 0x8007B970; +func_8007B9EC = 0x8007B9EC; +func_8007BB24 = 0x8007BB24; +func_8007BC8C = 0x8007BC8C; +func_8007BCF8 = 0x8007BCF8; +func_8007BDF0 = 0x8007BDF0; +func_8007BE64 = 0x8007BE64; +func_8007BEF8 = 0x8007BEF8; +func_8007BF74 = 0x8007BF74; +func_8007C00C = 0x8007C00C; +func_8007C098 = 0x8007C098; +func_8007C130 = 0x8007C130; +func_8007C1BC = 0x8007C1BC; +func_8007C260 = 0x8007C260; +func_8007C3C4 = 0x8007C3C4; +func_8007C494 = 0x8007C494; +func_8007C51C = 0x8007C51C; +func_8007C618 = 0x8007C618; +func_8007C698 = 0x8007C698; +func_8007C70C = 0x8007C70C; +func_8007C86C = 0x8007C86C; +func_8007C8D4 = 0x8007C8D4; +func_8007C9F0 = 0x8007C9F0; +func_8007CB00 = 0x8007CB00; +func_8007CC10 = 0x8007CC10; +func_8007CCCC = 0x8007CCCC; +func_8007CD8C = 0x8007CD8C; +func_8007CECC = 0x8007CECC; +func_8007CF40 = 0x8007CF40; +func_8007CFAC = 0x8007CFAC; +func_8007D018 = 0x8007D018; +func_8007D084 = 0x8007D084; +func_8007D0F0 = 0x8007D0F0; +func_8007D11C = 0x8007D11C; +func_8007D148 = 0x8007D148; +func_8007D1F0 = 0x8007D1F0; +func_8007D25C = 0x8007D25C; +func_8007D2D8 = 0x8007D2D8; +func_8007D304 = 0x8007D304; +func_8007D56C = 0x8007D56C; +func_8007D758 = 0x8007D758; +func_8007D8B8 = 0x8007D8B8; +func_8007D95C = 0x8007D95C; +func_8007D9EC = 0x8007D9EC; +func_8007DA68 = 0x8007DA68; +func_8007DAF4 = 0x8007DAF4; +func_8007DB80 = 0x8007DB80; +func_8007DEE4 = 0x8007DEE4; +func_8007E024 = 0x8007E024; +func_8007E268 = 0x8007E268; +func_8007E2A8 = 0x8007E2A8; +func_8007E340 = 0x8007E340; +func_8007E3F4 = 0x8007E3F4; +func_8007E46C = 0x8007E46C; +func_8007E5DC = 0x8007E5DC; +func_8007E658 = 0x8007E658; +func_8007E6C8 = 0x8007E6C8; +func_8007E94C = 0x8007E94C; +func_8007EBC8 = 0x8007EBC8; +func_8007ECC4 = 0x8007ECC4; +func_8007ED64 = 0x8007ED64; +func_8007EE78 = 0x8007EE78; +func_8007F05C = 0x8007F05C; +func_8007F12C = 0x8007F12C; +func_8007F21C = 0x8007F21C; +func_8007F30C = 0x8007F30C; +func_8007F448 = 0x8007F448; +func_8007F5BC = 0x8007F5BC; +func_8007F6C0 = 0x8007F6C0; +func_8007F968 = 0x8007F968; +func_8007FBF0 = 0x8007FBF0; +func_8007FD94 = 0x8007FD94; +func_8007FE98 = 0x8007FE98; +func_800802C8 = 0x800802C8; +func_800802E8 = 0x800802E8; +func_80080308 = 0x80080308; +func_80080370 = 0x80080370; +func_8008041C = 0x8008041C; +func_8008093C = 0x8008093C; +func_80080ADC = 0x80080ADC; +func_80080D14 = 0x80080D14; +func_800815EC = 0x800815EC; +func_8008166C = 0x8008166C; +func_80081A9C = 0x80081A9C; +func_80081B34 = 0x80081B34; +func_80081BFC = 0x80081BFC; +func_80081C6C = 0x80081C6C; +func_80082F88 = 0x80082F88; +func_800836D0 = 0x800836D0; +func_8008378C = 0x8008378C; +func_800837FC = 0x800837FC; +func_80083B9C = 0x80083B9C; +func_80083C80 = 0x80083C80; +func_80083D3C = 0x80083D3C; +func_80083FB8 = 0x80083FB8; +func_800841A4 = 0x800841A4; +func_80084380 = 0x80084380; +func_8008440C = 0x8008440C; +func_80084498 = 0x80084498; +func_80084698 = 0x80084698; +func_80084700 = 0x80084700; +func_80084940 = 0x80084940; +func_80084BA4 = 0x80084BA4; +func_80084E88 = 0x80084E88; +func_800853B4 = 0x800853B4; +func_80085414 = 0x80085414; +func_80085474 = 0x80085474; +func_800854CC = 0x800854CC; +func_80085524 = 0x80085524; +func_8008557C = 0x8008557C; +func_800855D4 = 0x800855D4; +func_80085628 = 0x80085628; +func_8008567C = 0x8008567C; +func_800856D0 = 0x800856D0; +func_80085750 = 0x80085750; +func_800857EC = 0x800857EC; +func_800858A0 = 0x800858A0; +func_80085954 = 0x80085954; +func_80086120 = 0x80086120; +func_80086440 = 0x80086440; +func_800864BC = 0x800864BC; +func_80086744 = 0x80086744; +func_80086AD4 = 0x80086AD4; +func_80086D3C = 0x80086D3C; +func_80086DFC = 0x80086DFC; +func_80086F50 = 0x80086F50; +func_80087B10 = 0x80087B10; +func_80087D68 = 0x80087D68; +func_80088168 = 0x80088168; +func_80088C18 = 0x80088C18; +func_80088C98 = 0x80088C98; +func_80088D90 = 0x80088D90; +func_80088DEC = 0x80088DEC; +func_80088EB8 = 0x80088EB8; +func_800890A4 = 0x800890A4; +func_80089F78 = 0x80089F78; +func_8008A018 = 0x8008A018; +func_8008A0B8 = 0x8008A0B8; +func_8008A158 = 0x8008A158; +func_8008A1F8 = 0x8008A1F8; +func_8008A29C = 0x8008A29C; +func_8008A3FC = 0x8008A3FC; +func_8008A49C = 0x8008A49C; +func_8008A540 = 0x8008A540; +func_8008A630 = 0x8008A630; +func_8008A7A0 = 0x8008A7A0; +func_8008A984 = 0x8008A984; +func_8008AB48 = 0x8008AB48; +func_8008ADE4 = 0x8008ADE4; +func_8008B55C = 0x8008B55C; +func_8008B69C = 0x8008B69C; +func_8008B94C = 0x8008B94C; +func_8008BAB8 = 0x8008BAB8; +func_8008BBAC = 0x8008BBAC; +func_8008BBF8 = 0x8008BBF8; +func_8008BEB8 = 0x8008BEB8; +func_8008C03C = 0x8008C03C; +func_8008C07C = 0x8008C07C; +func_8008C2F0 = 0x8008C2F0; +func_8008C3EC = 0x8008C3EC; +func_8008C588 = 0x8008C588; +func_8008C5C4 = 0x8008C5C4; +func_8008C608 = 0x8008C608; +func_8008CA0C = 0x8008CA0C; +func_8008CC98 = 0x8008CC98; +func_8008CED0 = 0x8008CED0; +func_8008CFFC = 0x8008CFFC; +func_8008D34C = 0x8008D34C; +func_8008D494 = 0x8008D494; +func_8008D4A0 = 0x8008D4A0; +func_8008D4EC = 0x8008D4EC; +func_8008D8C0 = 0x8008D8C0; +func_8008D9E4 = 0x8008D9E4; +func_8008DAF8 = 0x8008DAF8; +func_8008DB58 = 0x8008DB58; +func_8008DC24 = 0x8008DC24; +func_8008DDF8 = 0x8008DDF8; +func_8008E0FC = 0x8008E0FC; +func_8008E28C = 0x8008E28C; +func_8008E53C = 0x8008E53C; +func_8008E5B8 = 0x8008E5B8; +func_8008E680 = 0x8008E680; +func_8008E770 = 0x8008E770; +func_8008EBD0 = 0x8008EBD0; +func_8008EE24 = 0x8008EE24; +func_8008EEF0 = 0x8008EEF0; +func_8008EF28 = 0x8008EF28; +func_8008F2F4 = 0x8008F2F4; +func_8008F31C = 0x8008F31C; +func_80090254 = 0x80090254; +func_80090274 = 0x80090274; +func_8009038C = 0x8009038C; +func_80090780 = 0x80090780; +func_800908F8 = 0x800908F8; +func_80090B08 = 0x80090B08; +func_800910CC = 0x800910CC; +func_80091234 = 0x80091234; +func_80091308 = 0x80091308; +func_800915D4 = 0x800915D4; +func_80091794 = 0x80091794; +func_800919C8 = 0x800919C8; +func_80091B5C = 0x80091B5C; +func_80091BA0 = 0x80091BA0; +func_80091C70 = 0x80091C70; +func_80091DF8 = 0x80091DF8; +func_80091EF8 = 0x80091EF8; +func_80092160 = 0x80092160; +func_8009248C = 0x8009248C; +func_800925F4 = 0x800925F4; +func_800926F0 = 0x800926F0; +func_800927FC = 0x800927FC; +func_80092B1C = 0x80092B1C; +func_80092BCC = 0x80092BCC; +func_80092DB8 = 0x80092DB8; +func_80093078 = 0x80093078; +func_80093620 = 0x80093620; +func_80093798 = 0x80093798; +func_80093A3C = 0x80093A3C; +func_80093BE8 = 0x80093BE8; +func_80093CB0 = 0x80093CB0; +func_80093EC0 = 0x80093EC0; +func_80095340 = 0x80095340; +func_800955A8 = 0x800955A8; +func_8009570C = 0x8009570C; +func_80095D3C = 0x80095D3C; +func_80095D8C = 0x80095D8C; +func_80095E58 = 0x80095E58; +func_80095F24 = 0x80095F24; +func_80095FF0 = 0x80095FF0; +func_80097448 = 0x80097448; +func_80097D50 = 0x80097D50; +func_80097F28 = 0x80097F28; +func_80098100 = 0x80098100; +func_80098294 = 0x80098294; +func_800983B8 = 0x800983B8; +func_80098658 = 0x80098658; +func_80098A5C = 0x80098A5C; +func_80098F9C = 0x80098F9C; +func_80099230 = 0x80099230; +func_80099284 = 0x80099284; +func_800992C8 = 0x800992C8; +func_8009930C = 0x8009930C; +func_80099350 = 0x80099350; +func_80099C24 = 0x80099C24; +func_8009A2CC = 0x8009A2CC; +func_8009A350 = 0x8009A350; +func_8009A3A8 = 0x8009A3A8; +func_8009A3FC = 0x8009A3FC; +func_8009A7F8 = 0x8009A7F8; +func_8009ADD0 = 0x8009ADD0; +func_8009AE10 = 0x8009AE10; +func_8009B0FC = 0x8009B0FC; +func_8009B3F0 = 0x8009B3F0; +func_8009B6AC = 0x8009B6AC; +func_8009B6E8 = 0x8009B6E8; +func_8009C11C = 0x8009C11C; +func_8009C154 = 0x8009C154; +func_8009C5FC = 0x8009C5FC; +func_8009C708 = 0x8009C708; +func_8009C8BC = 0x8009C8BC; +func_8009CAF4 = 0x8009CAF4; +func_8009CCF0 = 0x8009CCF0; +func_8009D044 = 0x8009D044; +func_8009D398 = 0x8009D398; +func_8009D70C = 0x8009D70C; +func_8009DA8C = 0x8009DA8C; +func_8009DDE8 = 0x8009DDE8; +func_8009E09C = 0x8009E09C; +func_8009E364 = 0x8009E364; +func_8009E61C = 0x8009E61C; +func_8009E8E4 = 0x8009E8E4; +func_8009EBB8 = 0x8009EBB8; +func_8009EE80 = 0x8009EE80; +func_8009F154 = 0x8009F154; +func_8009F408 = 0x8009F408; +func_8009F6D4 = 0x8009F6D4; +func_8009F9AC = 0x8009F9AC; +func_8009FC90 = 0x8009FC90; +func_8009FF44 = 0x8009FF44; +func_800A009C = 0x800A009C; +func_800A0138 = 0x800A0138; +func_800A0184 = 0x800A0184; +func_800A0418 = 0x800A0418; +func_800A0AC4 = 0x800A0AC4; +func_800A13D8 = 0x800A13D8; +func_800A15CC = 0x800A15CC; +func_800A17C0 = 0x800A17C0; +func_800A1A04 = 0x800A1A04; +func_800A1B58 = 0x800A1B58; +func_800A1B70 = 0x800A1B70; +func_800A1EC0 = 0x800A1EC0; +func_800A1F90 = 0x800A1F90; +func_800A217C = 0x800A217C; +func_800A2224 = 0x800A2224; +func_800A2478 = 0x800A2478; +func_800A2554 = 0x800A2554; +func_800A25C0 = 0x800A25C0; +func_800A2AEC = 0x800A2AEC; +func_800A2BEC = 0x800A2BEC; +func_800A2CE0 = 0x800A2CE0; +func_800A3CC4 = 0x800A3CC4; +func_800A3D50 = 0x800A3D50; +func_800A3DBC = 0x800A3DBC; +func_800A4134 = 0x800A4134; +func_800A4360 = 0x800A4360; +func_800A44C0 = 0x800A44C0; +func_800A4610 = 0x800A4610; +func_800A4670 = 0x800A4670; +func_800A4684 = 0x800A4684; +func_800A46AC = 0x800A46AC; +func_800A4B20 = 0x800A4B20; +func_800A4D60 = 0x800A4D60; +func_800A5300 = 0x800A5300; +func_800A560C = 0x800A560C; +func_800A563C = 0x800A563C; +func_800A59F0 = 0x800A59F0; +func_800A59F8 = 0x800A59F8; +func_800A5C70 = 0x800A5C70; +func_800A5EA0 = 0x800A5EA0; +func_800A5F04 = 0x800A5F04; +func_800A600C = 0x800A600C; +func_800A642C = 0x800A642C; +func_800A657C = 0x800A657C; +func_800A6660 = 0x800A6660; +func_800A66E8 = 0x800A66E8; +func_800A6730 = 0x800A6730; +func_800A6778 = 0x800A6778; +func_800A67A8 = 0x800A67A8; +func_800A67D8 = 0x800A67D8; +func_800A6808 = 0x800A6808; +func_800A6C50 = 0x800A6C50; +func_800A6D4C = 0x800A6D4C; +func_800A6DCC = 0x800A6DCC; +func_800A70B8 = 0x800A70B8; +func_800A7134 = 0x800A7134; +func_800A7180 = 0x800A7180; +func_800A7390 = 0x800A7390; +func_800A795C = 0x800A795C; +func_800A7AA4 = 0x800A7AA4; +func_800A7F84 = 0x800A7F84; +func_800A8034 = 0x800A8034; +func_800A8714 = 0x800A8714; +func_800A89C4 = 0x800A89C4; +func_800A8DA4 = 0x800A8DA4; +func_800A8EC4 = 0x800A8EC4; +func_800A8F3C = 0x800A8F3C; +func_800A9264 = 0x800A9264; +func_800AAEBC = 0x800AAEBC; +func_800AB968 = 0x800AB968; +func_800AB9C0 = 0x800AB9C0; +func_800AB9F0 = 0x800AB9F0; +func_800AC020 = 0x800AC020; +func_800AC0C4 = 0x800AC0C4; +func_800AC170 = 0x800AC170; +func_800AC95C = 0x800AC95C; +func_800ACD1C = 0x800ACD1C; +func_800AD10C = 0x800AD10C; +func_800AD188 = 0x800AD188; +func_800AD348 = 0x800AD348; +func_800AD48C = 0x800AD48C; +func_800AD760 = 0x800AD760; +func_800AD7E4 = 0x800AD7E4; +func_800AD8C0 = 0x800AD8C0; +func_800ADEBC = 0x800ADEBC; +func_800AE0F4 = 0x800AE0F4; +func_800AE464 = 0x800AE464; +func_800AE624 = 0x800AE624; +func_800AE944 = 0x800AE944; +func_800AEB70 = 0x800AEB70; +func_800AF3AC = 0x800AF3AC; +func_800AF77C = 0x800AF77C; +func_800B005C = 0x800B005C; +func_800B07F4 = 0x800B07F4; +func_800B08C8 = 0x800B08C8; +func_800B1684 = 0x800B1684; +func_800B2864 = 0x800B2864; +func_800B29F4 = 0x800B29F4; +func_800B2CA8 = 0x800B2CA8; +func_800B3314 = 0x800B3314; +func_800B3334 = 0x800B3334; +func_800B3744 = 0x800B3744; +func_800B3A48 = 0x800B3A48; +func_800B4114 = 0x800B4114; +func_800B47E0 = 0x800B47E0; +func_800B4890 = 0x800B4890; +func_800B4914 = 0x800B4914; +func_800B4920 = 0x800B4920; +func_800B49E4 = 0x800B49E4; +func_800B4BF8 = 0x800B4BF8; +func_800B4E2C = 0x800B4E2C; +func_800B4FE4 = 0x800B4FE4; +func_800B5DE4 = 0x800B5DE4; +func_800B6458 = 0x800B6458; +func_800B66E4 = 0x800B66E4; +func_800B6AE4 = 0x800B6AE4; +func_800B6F70 = 0x800B6F70; +func_800B7324 = 0x800B7324; +func_800B7678 = 0x800B7678; +func_800B78AC = 0x800B78AC; +func_800B790C = 0x800B790C; +func_800B7B08 = 0x800B7B08; +func_800B80D8 = 0x800B80D8; +func_800B8A54 = 0x800B8A54; +func_800B8C54 = 0x800B8C54; +func_800B8DCC = 0x800B8DCC; +func_800B8DF4 = 0x800B8DF4; +func_800B9500 = 0x800B9500; +func_800B9544 = 0x800B9544; +func_800B9648 = 0x800B9648; +func_800B9678 = 0x800B9678; +func_800B96A8 = 0x800B96A8; +func_800B96D8 = 0x800B96D8; +func_800B9708 = 0x800B9708; +func_800B9738 = 0x800B9738; +func_800B9850 = 0x800B9850; +func_800B9880 = 0x800B9880; +func_800B98B0 = 0x800B98B0; +func_800B99C8 = 0x800B99C8; +func_800B99F8 = 0x800B99F8; +func_800B9A28 = 0x800B9A28; +func_800B9A58 = 0x800B9A58; +func_800B9A88 = 0x800B9A88; +func_800B9AB8 = 0x800B9AB8; +func_800B9BD0 = 0x800B9BD0; +func_800B9C00 = 0x800B9C00; +func_800B9D18 = 0x800B9D18; +func_800B9D48 = 0x800B9D48; +func_800B9E60 = 0x800B9E60; +func_800B9E90 = 0x800B9E90; +func_800B9EC0 = 0x800B9EC0; +func_800B9FD8 = 0x800B9FD8; +func_800BA0F0 = 0x800BA0F0; +func_800BA120 = 0x800BA120; +func_800BA150 = 0x800BA150; +func_800BA268 = 0x800BA268; +func_800BA380 = 0x800BA380; +func_800BA498 = 0x800BA498; +func_800BA5B0 = 0x800BA5B0; +func_800BA5E0 = 0x800BA5E0; +func_800BA6F8 = 0x800BA6F8; +func_800BA810 = 0x800BA810; +func_800BA840 = 0x800BA840; +func_800BA870 = 0x800BA870; +func_800BA8A0 = 0x800BA8A0; +func_800BA8D0 = 0x800BA8D0; +func_800BA900 = 0x800BA900; +func_800BAA18 = 0x800BAA18; +func_800BAB30 = 0x800BAB30; +func_800BAB60 = 0x800BAB60; +func_800BAB90 = 0x800BAB90; +func_800BABC0 = 0x800BABC0; +func_800BABF0 = 0x800BABF0; +func_800BAC20 = 0x800BAC20; +func_800BAC50 = 0x800BAC50; +func_800BAC80 = 0x800BAC80; +func_800BACB0 = 0x800BACB0; +func_800BACE0 = 0x800BACE0; +func_800BAD10 = 0x800BAD10; +func_800BAD40 = 0x800BAD40; +func_800BAD70 = 0x800BAD70; +func_800BAE90 = 0x800BAE90; +func_800BAEEC = 0x800BAEEC; +func_800BAF38 = 0x800BAF38; +func_800BB230 = 0x800BB230; +func_800BBAD0 = 0x800BBAD0; +func_800BBD18 = 0x800BBD18; +func_800BC830 = 0x800BC830; +func_800BCB00 = 0x800BCB00; +func_800BCC2C = 0x800BCC2C; +func_800BCCF0 = 0x800BCCF0; +func_800BCEDC = 0x800BCEDC; +func_800BD044 = 0x800BD044; +func_800BD1EC = 0x800BD1EC; +func_800BD3C8 = 0x800BD3C8; +func_800BD508 = 0x800BD508; +func_800BD6F4 = 0x800BD6F4; +func_800BD754 = 0x800BD754; +func_800BD870 = 0x800BD870; +func_800BD8E8 = 0x800BD8E8; +func_800BD958 = 0x800BD958; +func_800BD9A4 = 0x800BD9A4; +func_800BD9F0 = 0x800BD9F0; +func_800BDA3C = 0x800BDA3C; +func_800BDA94 = 0x800BDA94; +func_800BDAEC = 0x800BDAEC; +func_800BDB44 = 0x800BDB44; +func_800BDC08 = 0x800BDC08; +func_800BDD34 = 0x800BDD34; +func_800BDF80 = 0x800BDF80; +func_800BDFCC = 0x800BDFCC; +func_800BE090 = 0x800BE090; +func_800BE2C8 = 0x800BE2C8; +func_800BE320 = 0x800BE320; +func_800BE36C = 0x800BE36C; +func_800BE708 = 0x800BE708; +func_800BE710 = 0x800BE710; +func_800BE944 = 0x800BE944; +func_800BEBCC = 0x800BEBCC; +func_800BEE30 = 0x800BEE30; +func_800BF1F0 = 0x800BF1F0; +func_800BF574 = 0x800BF574; +func_800BF604 = 0x800BF604; +func_800BF67C = 0x800BF67C; +func_800BF7A0 = 0x800BF7A0; +func_800BF884 = 0x800BF884; +func_800BFA9C = 0x800BFA9C; +func_800BFEBC = 0x800BFEBC; +func_800C0070 = 0x800C0070; +func_800C02CC = 0x800C02CC; +func_800C0B6C = 0x800C0B6C; +func_800C0BB4 = 0x800C0BB4; +func_800C0E64 = 0x800C0E64; +func_800C120C = 0x800C120C; +func_800C12A8 = 0x800C12A8; +func_800C13B4 = 0x800C13B4; +func_800C1454 = 0x800C1454; +func_800C14E8 = 0x800C14E8; +func_800C15F0 = 0x800C15F0; +func_800C17A4 = 0x800C17A4; +func_800C1830 = 0x800C1830; +func_800C1998 = 0x800C1998; +func_800C1B9C = 0x800C1B9C; +func_800C1C58 = 0x800C1C58; +func_800C1E88 = 0x800C1E88; +func_800C20F8 = 0x800C20F8; +func_800C21B0 = 0x800C21B0; +func_800C21C0 = 0x800C21C0; +func_800C21F0 = 0x800C21F0; +func_800C2220 = 0x800C2220; +func_800C227C = 0x800C227C; +func_800C2284 = 0x800C2284; +func_800C228C = 0x800C228C; +func_800C29BC = 0x800C29BC; +func_800C29F4 = 0x800C29F4; +func_800C2BD0 = 0x800C2BD0; +func_800C2CB0 = 0x800C2CB0; +func_800C2CB8 = 0x800C2CB8; +func_800C2D64 = 0x800C2D64; +func_800C31E8 = 0x800C31E8; +func_800C3350 = 0x800C3350; +func_800C33E4 = 0x800C33E4; +func_800C3468 = 0x800C3468; +func_800C34B4 = 0x800C34B4; +func_800C34E8 = 0x800C34E8; +func_800C367C = 0x800C367C; +func_800C38C8 = 0x800C38C8; +func_800C3ABC = 0x800C3ABC; +func_800C3B40 = 0x800C3B40; +func_800C3C14 = 0x800C3C14; +func_800C3D24 = 0x800C3D24; +D_800C41A0 = 0x800C41A0; +D_800C41F0 = 0x800C41F0; +D_800C4630 = 0x800C4630; +D_800C4860 = 0x800C4860; +D_800C5180 = 0x800C5180; +D_800C51D0 = 0x800C51D0; +D_800C51E0 = 0x800C51E0; +D_800C5220 = 0x800C5220; +D_800C5260 = 0x800C5260; +D_800C52A0 = 0x800C52A0; +D_800C52AC = 0x800C52AC; +D_800C52B8 = 0x800C52B8; +D_800C52C4 = 0x800C52C4; +D_800C52D0 = 0x800C52D0; +D_800C52DC = 0x800C52DC; +D_800C52F0 = 0x800C52F0; +D_800C5370 = 0x800C5370; +D_800C5470 = 0x800C5470; +D_800C54B8 = 0x800C54B8; +D_800C54D0 = 0x800C54D0; +D_800C55B0 = 0x800C55B0; +D_800C5B50 = 0x800C5B50; +D_800C5B6C = 0x800C5B6C; +D_800C5CE8 = 0x800C5CE8; +D_800C5CF4 = 0x800C5CF4; +D_800C5EF4 = 0x800C5EF4; +D_800C5FAC = 0x800C5FAC; +D_800C6120 = 0x800C6120; +D_800C63EC = 0x800C63EC; +D_800C6500 = 0x800C6500; +D_800C6520 = 0x800C6520; +D_800C68E0 = 0x800C68E0; +D_800C68FC = 0x800C68FC; +D_800C6918 = 0x800C6918; +D_800C691C = 0x800C691C; +D_800C6920 = 0x800C6920; +D_800C6924 = 0x800C6924; +D_800C6928 = 0x800C6928; +D_800C6934 = 0x800C6934; +D_800C693C = 0x800C693C; +D_800C6940 = 0x800C6940; +D_800C6944 = 0x800C6944; +D_800C6948 = 0x800C6948; +D_800C694C = 0x800C694C; +D_800C6950 = 0x800C6950; +D_800C6954 = 0x800C6954; +D_800C6958 = 0x800C6958; +D_800C6960 = 0x800C6960; +D_800C6964 = 0x800C6964; +D_800C6968 = 0x800C6968; +D_800C696C = 0x800C696C; +D_800C6A38 = 0x800C6A38; +D_800C6A58 = 0x800C6A58; +D_800C6A70 = 0x800C6A70; +D_800C6A74 = 0x800C6A74; +D_800C6A78 = 0x800C6A78; +D_800C6A7C = 0x800C6A7C; +D_800C6A80 = 0x800C6A80; +D_800C6A84 = 0x800C6A84; +D_800C6A88 = 0x800C6A88; +D_800C6A8C = 0x800C6A8C; +D_800C6AE8 = 0x800C6AE8; +D_800C6BF8 = 0x800C6BF8; +D_800C6C00 = 0x800C6C00; +D_800C7F88 = 0x800C7F88; +D_800C7F8C = 0x800C7F8C; +D_800C7F90 = 0x800C7F90; +D_800C7F94 = 0x800C7F94; +D_800C7F98 = 0x800C7F98; +D_800C7F9C = 0x800C7F9C; +D_800C801C = 0x800C801C; +D_800C8020 = 0x800C8020; +D_800C80A0 = 0x800C80A0; +D_800C80E0 = 0x800C80E0; +D_800C80F0 = 0x800C80F0; +D_800C8100 = 0x800C8100; +D_800C8110 = 0x800C8110; +D_800C8120 = 0x800C8120; +D_800C8130 = 0x800C8130; +D_800C8140 = 0x800C8140; +D_800C8150 = 0x800C8150; +D_800C8160 = 0x800C8160; +D_800C8170 = 0x800C8170; +D_800C8180 = 0x800C8180; +D_800C8190 = 0x800C8190; +D_800C81A0 = 0x800C81A0; +D_800C81B0 = 0x800C81B0; +D_800C81C0 = 0x800C81C0; +D_800C81D0 = 0x800C81D0; +D_800C81E8 = 0x800C81E8; +D_800C81F8 = 0x800C81F8; +D_800C8208 = 0x800C8208; +D_800C8218 = 0x800C8218; +D_800C8228 = 0x800C8228; +D_800C8238 = 0x800C8238; +D_800C8248 = 0x800C8248; +D_800C8258 = 0x800C8258; +D_800C8268 = 0x800C8268; +D_800C8278 = 0x800C8278; +D_800C8288 = 0x800C8288; +D_800C8298 = 0x800C8298; +D_800C82C8 = 0x800C82C8; +D_800C883C = 0x800C883C; +D_800C8840 = 0x800C8840; +D_800C8844 = 0x800C8844; +D_800C8848 = 0x800C8848; +D_800C884C = 0x800C884C; +D_800C8850 = 0x800C8850; +D_800C8854 = 0x800C8854; +D_800C8860 = 0x800C8860; +D_800C8864 = 0x800C8864; +D_800C8868 = 0x800C8868; +D_800C886C = 0x800C886C; +D_800C8870 = 0x800C8870; +D_800C8874 = 0x800C8874; +D_800C8878 = 0x800C8878; +D_800C887C = 0x800C887C; +D_800C8884 = 0x800C8884; +D_800C8888 = 0x800C8888; +D_800C888C = 0x800C888C; +D_800C8890 = 0x800C8890; +D_800C88D0 = 0x800C88D0; +D_800C88E0 = 0x800C88E0; +D_800C8930 = 0x800C8930; +D_800C8980 = 0x800C8980; +D_800C8984 = 0x800C8984; +D_800C8988 = 0x800C8988; +D_800C898C = 0x800C898C; +D_800C8990 = 0x800C8990; +D_800C8994 = 0x800C8994; +D_800C8998 = 0x800C8998; +D_800C89A0 = 0x800C89A0; +D_800C89A4 = 0x800C89A4; +D_800C89A8 = 0x800C89A8; +D_800C89AC = 0x800C89AC; +D_800C89B0 = 0x800C89B0; +D_800C89B4 = 0x800C89B4; +D_800C89B8 = 0x800C89B8; +D_800C89BC = 0x800C89BC; +D_800C89C0 = 0x800C89C0; +D_800C89D0 = 0x800C89D0; +D_800C89D4 = 0x800C89D4; +D_800C89D8 = 0x800C89D8; +D_800C89DC = 0x800C89DC; +D_800C89E0 = 0x800C89E0; +D_800C89F0 = 0x800C89F0; +D_800C8A14 = 0x800C8A14; +D_800C8A40 = 0x800C8A40; +D_800C8A50 = 0x800C8A50; +D_800C8A60 = 0x800C8A60; +D_800C8A68 = 0x800C8A68; +D_800C8A6C = 0x800C8A6C; +D_800C8A70 = 0x800C8A70; +D_800C8A74 = 0x800C8A74; +D_800C8A80 = 0x800C8A80; +D_800C8A94 = 0x800C8A94; +D_800C8A98 = 0x800C8A98; +D_800C8A9C = 0x800C8A9C; +D_800C8AA0 = 0x800C8AA0; +D_800C8AD0 = 0x800C8AD0; +D_800C8B00 = 0x800C8B00; +D_800C8B04 = 0x800C8B04; +D_800C8B10 = 0x800C8B10; +D_800C8B20 = 0x800C8B20; +D_800C8B30 = 0x800C8B30; +D_800C8B40 = 0x800C8B40; +D_800C8B54 = 0x800C8B54; +D_800C8B70 = 0x800C8B70; +D_800C8B80 = 0x800C8B80; +D_800C8B90 = 0x800C8B90; +D_800C8BE0 = 0x800C8BE0; +D_800C8CC0 = 0x800C8CC0; +D_800C8CD0 = 0x800C8CD0; +D_800CA6A0 = 0x800CA6A0; +D_800CA6AC = 0x800CA6AC; +D_800CA6DC = 0x800CA6DC; +D_800CA6EC = 0x800CA6EC; +D_800CA6FC = 0x800CA6FC; +D_800CA70C = 0x800CA70C; +D_800CA73C = 0x800CA73C; +D_800CA74C = 0x800CA74C; +D_800CA75C = 0x800CA75C; +D_800CA760 = 0x800CA760; +D_800CA7A8 = 0x800CA7A8; +D_800CA7B4 = 0x800CA7B4; +D_800CA7C0 = 0x800CA7C0; +D_800CA7D0 = 0x800CA7D0; +D_800CA7DC = 0x800CA7DC; +D_800CA7E8 = 0x800CA7E8; +D_800CA810 = 0x800CA810; +D_800CA814 = 0x800CA814; +D_800CA818 = 0x800CA818; +D_800CA81C = 0x800CA81C; +D_800CA828 = 0x800CA828; +D_800CA82C = 0x800CA82C; +D_800CA830 = 0x800CA830; +D_800CA834 = 0x800CA834; +D_800CA840 = 0x800CA840; +D_800CA844 = 0x800CA844; +D_800CA84C = 0x800CA84C; +D_800CA86C = 0x800CA86C; +D_800CA880 = 0x800CA880; +D_800CA8A0 = 0x800CA8A0; +D_800CA8B4 = 0x800CA8B4; +D_800CA8E8 = 0x800CA8E8; +D_800CA91C = 0x800CA91C; +D_800CA93C = 0x800CA93C; +D_800CA950 = 0x800CA950; +D_800CA970 = 0x800CA970; +D_800CA984 = 0x800CA984; +D_800CA9A4 = 0x800CA9A4; +D_800CA9B3 = 0x800CA9B3; +D_800CA9CC = 0x800CA9CC; +D_800CA9DB = 0x800CA9DB; +D_800CA9F4 = 0x800CA9F4; +D_800CAA08 = 0x800CAA08; +D_800CAA28 = 0x800CAA28; +D_800CAA3C = 0x800CAA3C; +D_800CAA5C = 0x800CAA5C; +D_800CAA64 = 0x800CAA64; +D_800CAA6C = 0x800CAA6C; +D_800CAA74 = 0x800CAA74; +D_800CAA84 = 0x800CAA84; +D_800CAA94 = 0x800CAA94; +D_800CAAA0 = 0x800CAAA0; +D_800CAAA2 = 0x800CAAA2; +D_800CAB10 = 0x800CAB10; +D_800CAB14 = 0x800CAB14; +D_800CAB18 = 0x800CAB18; +D_800CAB20 = 0x800CAB20; +D_800CAB24 = 0x800CAB24; +D_800CAB30 = 0x800CAB30; +D_800CAB34 = 0x800CAB34; +D_800CAB38 = 0x800CAB38; +D_800CAB3C = 0x800CAB3C; +D_800CAB4C = 0x800CAB4C; +D_800CAB50 = 0x800CAB50; +D_800CAB5C = 0x800CAB5C; +D_800CAB70 = 0x800CAB70; +D_800CABA0 = 0x800CABA0; +D_800CABAC = 0x800CABAC; +D_800CABB0 = 0x800CABB0; +D_800CABE0 = 0x800CABE0; +D_800CABF0 = 0x800CABF0; +D_800CAC00 = 0x800CAC00; +D_800CAC10 = 0x800CAC10; +D_800CAC20 = 0x800CAC20; +D_800CAC30 = 0x800CAC30; +D_800CAC40 = 0x800CAC40; +D_800CAC50 = 0x800CAC50; +D_800CAC60 = 0x800CAC60; +D_800CAC6C = 0x800CAC6C; +D_800CAC78 = 0x800CAC78; +D_800CAC84 = 0x800CAC84; +D_800CAC90 = 0x800CAC90; +D_800CAC9C = 0x800CAC9C; +D_800CACA8 = 0x800CACA8; +D_800CACB4 = 0x800CACB4; +D_800CACC0 = 0x800CACC0; +D_800CACCC = 0x800CACCC; +D_800CACFC = 0x800CACFC; +D_800CAD20 = 0x800CAD20; +D_800CAD80 = 0x800CAD80; +D_800CADA0 = 0x800CADA0; +D_800CADA8 = 0x800CADA8; +D_800CADC4 = 0x800CADC4; +D_800CADE4 = 0x800CADE4; +D_800CAE04 = 0x800CAE04; +D_800CAE20 = 0x800CAE20; +D_800CAE24 = 0x800CAE24; +D_800CAE28 = 0x800CAE28; +D_800CAE30 = 0x800CAE30; +D_800CAE34 = 0x800CAE34; +D_800CAE38 = 0x800CAE38; +D_800CAE3C = 0x800CAE3C; +D_800CAE40 = 0x800CAE40; +D_800CAE44 = 0x800CAE44; +D_800CAE48 = 0x800CAE48; +D_800CAE54 = 0x800CAE54; +D_800CAE64 = 0x800CAE64; +D_800CAE70 = 0x800CAE70; +D_800CAE78 = 0x800CAE78; +D_800CAE88 = 0x800CAE88; +D_800CAE9C = 0x800CAE9C; +D_800CAEA0 = 0x800CAEA0; +D_800CAEA4 = 0x800CAEA4; +D_800CAEA8 = 0x800CAEA8; +D_800CAEB8 = 0x800CAEB8; +D_800CAEBC = 0x800CAEBC; +D_800CAEC8 = 0x800CAEC8; +D_800CAED4 = 0x800CAED4; +D_800CAEE0 = 0x800CAEE0; +D_800CAEEC = 0x800CAEEC; +D_800CAF38 = 0x800CAF38; +D_800CAF44 = 0x800CAF44; +D_800CAF64 = 0x800CAF64; +D_800CAF90 = 0x800CAF90; +D_800CAF94 = 0x800CAF94; +D_800CAF98 = 0x800CAF98; +D_800CAF9C = 0x800CAF9C; +D_800CAFAC = 0x800CAFAC; +D_800CAFC0 = 0x800CAFC0; +D_800CAFC4 = 0x800CAFC4; +D_800CB05C = 0x800CB05C; +D_800CB3EC = 0x800CB3EC; +D_800CB484 = 0x800CB484; +D_800CB64C = 0x800CB64C; +D_800CB814 = 0x800CB814; +D_800CB8AC = 0x800CB8AC; +D_800CB944 = 0x800CB944; +D_800CBA74 = 0x800CBA74; +D_800CBE04 = 0x800CBE04; +D_800CBF34 = 0x800CBF34; +D_800CBFCC = 0x800CBFCC; +D_800CC064 = 0x800CC064; +D_800CC0FC = 0x800CC0FC; +D_800CC22C = 0x800CC22C; +D_800CC2C4 = 0x800CC2C4; +D_800CC35C = 0x800CC35C; +D_800CC3F4 = 0x800CC3F4; +D_800CC48C = 0x800CC48C; +D_800CC524 = 0x800CC524; +D_800CC5BC = 0x800CC5BC; +D_800CC6EC = 0x800CC6EC; +D_800CC784 = 0x800CC784; +D_800CC81C = 0x800CC81C; +D_800CC8B4 = 0x800CC8B4; +D_800CC9E4 = 0x800CC9E4; +D_800CCA7C = 0x800CCA7C; +D_800CCC44 = 0x800CCC44; //size:0x98 +D_800CCCDC = 0x800CCCDC; +D_800CCCE0 = 0x800CCCE0; +D_800CCCFC = 0x800CCCFC; +D_800CCD18 = 0x800CCD18; +D_800CCD34 = 0x800CCD34; +D_800CCD88 = 0x800CCD88; +D_800CCDA4 = 0x800CCDA4; +D_800CCDA8 = 0x800CCDA8; +D_800CCDC4 = 0x800CCDC4; +D_800CCDE0 = 0x800CCDE0; +D_800CCDFC = 0x800CCDFC; +D_800CCE18 = 0x800CCE18; +D_800CCE38 = 0x800CCE38; +D_800CCE54 = 0x800CCE54; +D_800CCE70 = 0x800CCE70; +D_800CCE8C = 0x800CCE8C; +D_800CCEA8 = 0x800CCEA8; +D_800CCF94 = 0x800CCF94; +D_800D0000 = 0x800D0000; +D_800D00C8 = 0x800D00C8; +D_800D07D4 = 0x800D07D4; +D_800D07E0 = 0x800D07E0; +D_800D0820 = 0x800D0820; +D_800D0828 = 0x800D0828; +D_800D089C = 0x800D089C; +D_800D0934 = 0x800D0934; +D_800D094C = 0x800D094C; +D_800D0978 = 0x800D0978; +D_800D0984 = 0x800D0984; +D_800D0998 = 0x800D0998; +D_800D09B0 = 0x800D09B0; +D_800D09D4 = 0x800D09D4; +D_800D09F8 = 0x800D09F8; +D_800D0A18 = 0x800D0A18; +D_800D0A54 = 0x800D0A54; +D_800D0A7C = 0x800D0A7C; +D_800D0AB0 = 0x800D0AB0; +D_800D0AC0 = 0x800D0AC0; +D_800D0AD4 = 0x800D0AD4; +D_800D0AEC = 0x800D0AEC; +D_800D0B08 = 0x800D0B08; +D_800D0B30 = 0x800D0B30; +D_800D0B3C = 0x800D0B3C; +D_800D0B5C = 0x800D0B5C; +D_800D0B68 = 0x800D0B68; +D_800D0B74 = 0x800D0B74; +D_800D0B80 = 0x800D0B80; +D_800D0B8C = 0x800D0B8C; +D_800D0B98 = 0x800D0B98; +D_800D0BA4 = 0x800D0BA4; +D_800D0BB0 = 0x800D0BB0; +D_800D0BF0 = 0x800D0BF0; +D_800D0C10 = 0x800D0C10; +D_800D0C64 = 0x800D0C64; +D_800D0CCC = 0x800D0CCC; +D_800D0D34 = 0x800D0D34; +D_800D0D7C = 0x800D0D7C; +D_800D0DC4 = 0x800D0DC4; +D_800D0DF0 = 0x800D0DF0; +D_800D0DF4 = 0x800D0DF4; +D_800D0E00 = 0x800D0E00; +D_800D0E04 = 0x800D0E04; +D_800D0E24 = 0x800D0E24; +D_800D0E34 = 0x800D0E34; +D_800D0E74 = 0x800D0E74; +D_800D0E80 = 0x800D0E80; +D_800D0E8C = 0x800D0E8C; +D_800D0EA0 = 0x800D0EA0; +D_800D0EAC = 0x800D0EAC; +D_800D1C2C = 0x800D1C2C; +D_800D1C2F = 0x800D1C2F; +D_800D1C44 = 0x800D1C44; +D_800D1EE4 = 0x800D1EE4; +D_800D2004 = 0x800D2004; +D_800D2100 = 0x800D2100; +D_800D233C = 0x800D233C; +D_800D2350 = 0x800D2350; +D_800D236C = 0x800D236C; +D_800D2398 = 0x800D2398; +D_800D23A4 = 0x800D23A4; +D_800D25AC = 0x800D25AC; +D_800D25FC = 0x800D25FC; +D_800D2614 = 0x800D2614; +D_800D2668 = 0x800D2668; +D_800D26BC = 0x800D26BC; +D_800D2710 = 0x800D2710; +D_800D2748 = 0x800D2748; +D_800D2754 = 0x800D2754; +D_800D2758 = 0x800D2758; +D_800D275C = 0x800D275C; +D_800D2760 = 0x800D2760; +D_800D27C0 = 0x800D27C0; +D_800D27E0 = 0x800D27E0; +D_800D281C = 0x800D281C; +D_800D2850 = 0x800D2850; +D_800D2860 = 0x800D2860; +D_800D286C = 0x800D286C; +D_800D2870 = 0x800D2870; +D_800D2874 = 0x800D2874; +D_800D2878 = 0x800D2878; +D_800D28B8 = 0x800D28B8; +D_800D28D0 = 0x800D28D0; +D_800D28DC = 0x800D28DC; +D_800D28E8 = 0x800D28E8; +D_800D290C = 0x800D290C; +D_800D293C = 0x800D293C; +D_800D2950 = 0x800D2950; +D_800D2964 = 0x800D2964; +D_800D2E74 = 0x800D2E74; +D_800D2E8C = 0x800D2E8C; +D_800D2EA4 = 0x800D2EA4; +D_800D2EAC = 0x800D2EAC; +D_800D2EB4 = 0x800D2EB4; +D_800D2EBC = 0x800D2EBC; +D_800D2EC4 = 0x800D2EC4; +D_800D2EEC = 0x800D2EEC; +D_800D2EF0 = 0x800D2EF0; +D_800D2EFC = 0x800D2EFC; +D_800D2F08 = 0x800D2F08; +D_800D2F14 = 0x800D2F14; +D_800D2F20 = 0x800D2F20; +D_800D2F2C = 0x800D2F2C; +D_800D2F38 = 0x800D2F38; +D_800D2F44 = 0x800D2F44; +D_800D2F50 = 0x800D2F50; +D_800D2F5C = 0x800D2F5C; +D_800D2F68 = 0x800D2F68; +D_800D2F74 = 0x800D2F74; +D_800D2F80 = 0x800D2F80; +D_800D2F90 = 0x800D2F90; +D_800D2FB4 = 0x800D2FB4; +D_800D2FC0 = 0x800D2FC0; +D_800D2FCC = 0x800D2FCC; +D_800D2FD8 = 0x800D2FD8; +D_800D2FE4 = 0x800D2FE4; +D_800D2FF0 = 0x800D2FF0; +D_800D3038 = 0x800D3038; +D_800D306C = 0x800D306C; +D_800D30B4 = 0x800D30B4; +D_800D30C0 = 0x800D30C0; +D_800D30CC = 0x800D30CC; +D_800D30D8 = 0x800D30D8; +D_800D30E4 = 0x800D30E4; +D_800D30F0 = 0x800D30F0; +D_800D30FC = 0x800D30FC; +D_800D3108 = 0x800D3108; +D_800D310C = 0x800D310C; +D_800D318C = 0x800D318C; +D_800D319C = 0x800D319C; +D_800D31AC = 0x800D31AC; +D_800D31B0 = 0x800D31B0; +D_800D31B4 = 0x800D31B4; +D_800D31B8 = 0x800D31B8; +D_800D31E0 = 0x800D31E0; +D_800D31F0 = 0x800D31F0; +D_800D3220 = 0x800D3220; +D_800D3250 = 0x800D3250; +D_800D3280 = 0x800D3280; +D_800D32B0 = 0x800D32B0; +D_800D32E0 = 0x800D32E0; +D_800D3310 = 0x800D3310; +D_800D3340 = 0x800D3340; +D_800D3370 = 0x800D3370; +D_800D3380 = 0x800D3380; +D_800D3390 = 0x800D3390; +D_800D33A0 = 0x800D33A0; +D_800D33B0 = 0x800D33B0; +D_800D33C0 = 0x800D33C0; +D_800D33D0 = 0x800D33D0; +D_800D33E0 = 0x800D33E0; +D_800D33F0 = 0x800D33F0; +D_800D3400 = 0x800D3400; +D_800D3414 = 0x800D3414; +D_800D3428 = 0x800D3428; +D_800D3438 = 0x800D3438; +D_800D3448 = 0x800D3448; +D_800D3458 = 0x800D3458; +D_800D3468 = 0x800D3468; +D_800D3478 = 0x800D3478; +D_800D3488 = 0x800D3488; +D_800D3498 = 0x800D3498; +D_800D349C = 0x800D349C; +D_800D34A0 = 0x800D34A0; +D_800D34B0 = 0x800D34B0; +D_800D34C0 = 0x800D34C0; +D_800D35A0 = 0x800D35A0; +D_800D35BC = 0x800D35BC; +D_800D35C0 = 0x800D35C0; +D_800D35C4 = 0x800D35C4; +D_800D35D0 = 0x800D35D0; +D_800D35F4 = 0x800D35F4; +D_800D3618 = 0x800D3618; +D_800D37D4 = 0x800D37D4; +D_800D37FC = 0x800D37FC; +D_800D3808 = 0x800D3808; +D_800D3838 = 0x800D3838; +D_800D3874 = 0x800D3874; +D_800D38C0 = 0x800D38C0; +D_800D38CC = 0x800D38CC; +D_800D38D8 = 0x800D38D8; +D_800D3900 = 0x800D3900; +D_800D3928 = 0x800D3928; +D_800D3946 = 0x800D3946; +D_800D3954 = 0x800D3954; +D_800D3980 = 0x800D3980; +D_800D39AC = 0x800D39AC; +D_800D3A58 = 0x800D3A58; +D_800D3A80 = 0x800D3A80; +D_800D3AA8 = 0x800D3AA8; +D_800D3B20 = 0x800D3B20; +D_800D3B2C = 0x800D3B2C; +D_800D3B60 = 0x800D3B60; +D_800D3B70 = 0x800D3B70; +D_800D3B74 = 0x800D3B74; +D_800D3B84 = 0x800D3B84; +D_800D3B94 = 0x800D3B94; +D_800D3BA4 = 0x800D3BA4; +D_800D3BB4 = 0x800D3BB4; +D_800D3C08 = 0x800D3C08; +D_800D3C0C = 0x800D3C0C; +D_800D3C10 = 0x800D3C10; +D_800D3C14 = 0x800D3C14; +D_800D3C20 = 0x800D3C20; +D_800D3CE0 = 0x800D3CE0; +D_800D3D64 = 0x800D3D64; +D_800D3DB4 = 0x800D3DB4; +D_800D3E38 = 0x800D3E38; +D_800D3FA0 = 0x800D3FA0; +D_800D4250 = 0x800D4250; +D_800D4254 = 0x800D4254; +D_800D4258 = 0x800D4258; +D_800D425C = 0x800D425C; +D_800D4260 = 0x800D4260; +D_800D4264 = 0x800D4264; +D_800D4268 = 0x800D4268; +D_800D426C = 0x800D426C; +D_800D4280 = 0x800D4280; +D_800D428C = 0x800D428C; +D_800D4298 = 0x800D4298; +D_800D42EC = 0x800D42EC; +D_800D4300 = 0x800D4300; +D_800D4340 = 0x800D4340; +D_800D4388 = 0x800D4388; +D_800D43B8 = 0x800D43B8; +D_800D43E8 = 0x800D43E8; +D_800D43F4 = 0x800D43F4; +D_800D4404 = 0x800D4404; +D_800D4414 = 0x800D4414; +D_800D4424 = 0x800D4424; +D_800D4454 = 0x800D4454; +D_800D4464 = 0x800D4464; +D_800D447C = 0x800D447C; +D_800D4480 = 0x800D4480; +D_800D4481 = 0x800D4481; +D_800D4482 = 0x800D4482; +D_800D4483 = 0x800D4483; +D_800D4485 = 0x800D4485; +D_800D4487 = 0x800D4487; +D_800D4488 = 0x800D4488; +D_800D4489 = 0x800D4489; +D_800D448B = 0x800D448B; +D_800D448C = 0x800D448C; +D_800D448D = 0x800D448D; +D_800D448E = 0x800D448E; +D_800D4490 = 0x800D4490; +D_800D4491 = 0x800D4491; +D_800D4492 = 0x800D4492; +D_800D449E = 0x800D449E; +D_800D44B0 = 0x800D44B0; +D_800D44F8 = 0x800D44F8; +D_800D4540 = 0x800D4540; +D_800D4588 = 0x800D4588; +D_800D45D0 = 0x800D45D0; +D_800D46A8 = 0x800D46A8; +D_800D46F0 = 0x800D46F0; +D_800D4738 = 0x800D4738; +D_800D47C8 = 0x800D47C8; +D_800D4810 = 0x800D4810; +D_800D4858 = 0x800D4858; +D_800D48A0 = 0x800D48A0; +D_800D4978 = 0x800D4978; +D_800D49C0 = 0x800D49C0; +D_800D4A08 = 0x800D4A08; +D_800D4A50 = 0x800D4A50; +D_800D4A98 = 0x800D4A98; +D_800D4B28 = 0x800D4B28; +D_800D4C48 = 0x800D4C48; +D_800D4CD8 = 0x800D4CD8; +D_800D4D20 = 0x800D4D20; +D_800D4DB0 = 0x800D4DB0; +D_800D4DF8 = 0x800D4DF8; +D_800D4E40 = 0x800D4E40; +D_800D4ED0 = 0x800D4ED0; +D_800D4F18 = 0x800D4F18; +D_800D4FF0 = 0x800D4FF0; +D_800D5038 = 0x800D5038; +D_800D5080 = 0x800D5080; +D_800D50C8 = 0x800D50C8; +D_800D5110 = 0x800D5110; +D_800D5158 = 0x800D5158; +D_800D51A0 = 0x800D51A0; +D_800D51E8 = 0x800D51E8; +D_800D5230 = 0x800D5230; +D_800D5278 = 0x800D5278; +D_800D52C0 = 0x800D52C0; +D_800D5350 = 0x800D5350; +D_800D5428 = 0x800D5428; +D_800D54B8 = 0x800D54B8; +D_800D5590 = 0x800D5590; +D_800D55D8 = 0x800D55D8; +D_800D5620 = 0x800D5620; +D_800D56B0 = 0x800D56B0; +D_800D5740 = 0x800D5740; +D_800D57D0 = 0x800D57D0; +D_800D5938 = 0x800D5938; +D_800D5980 = 0x800D5980; +D_800D5A10 = 0x800D5A10; +D_800D5AA0 = 0x800D5AA0; +D_800D5B78 = 0x800D5B78; +D_800D5D70 = 0x800D5D70; +D_800D5D74 = 0x800D5D74; +D_800D5D78 = 0x800D5D78; +D_800D5D80 = 0x800D5D80; +D_800D5D90 = 0x800D5D90; +D_800D5D94 = 0x800D5D94; +D_800D5D98 = 0x800D5D98; +D_800D5D9C = 0x800D5D9C; +D_800D5DA0 = 0x800D5DA0; +D_800D5DA4 = 0x800D5DA4; +D_800D5DB0 = 0x800D5DB0; +D_800D5DBC = 0x800D5DBC; +D_800D5DC8 = 0x800D5DC8; +D_800D5DD8 = 0x800D5DD8; +D_800D5DE8 = 0x800D5DE8; +D_800D5DF8 = 0x800D5DF8; +D_800D5E04 = 0x800D5E04; +D_800D5E10 = 0x800D5E10; +D_800D5E1C = 0x800D5E1C; +D_800D5E28 = 0x800D5E28; +D_800D5E34 = 0x800D5E34; +D_800D5E40 = 0x800D5E40; +D_800D5E4C = 0x800D5E4C; +D_800D5E74 = 0x800D5E74; +D_800D5E9C = 0x800D5E9C; +D_800D5EC4 = 0x800D5EC4; +D_800D5ED4 = 0x800D5ED4; +D_800D5EE4 = 0x800D5EE4; +D_800D5EF4 = 0x800D5EF4; +D_800D5F04 = 0x800D5F04; +D_800D5F34 = 0x800D5F34; +D_800D5F44 = 0x800D5F44; +D_800D5F50 = 0x800D5F50; +D_800D5F60 = 0x800D5F60; +D_800D5F70 = 0x800D5F70; +D_800D5F7C = 0x800D5F7C; +D_800D5F88 = 0x800D5F88; +D_800D5F98 = 0x800D5F98; +D_800D5FA8 = 0x800D5FA8; +D_800D5FB8 = 0x800D5FB8; +D_800D5FC8 = 0x800D5FC8; +D_800D5FD8 = 0x800D5FD8; +D_800D5FE8 = 0x800D5FE8; +D_800D5FF8 = 0x800D5FF8; +D_800D6008 = 0x800D6008; +D_800D6014 = 0x800D6014; +D_800D6020 = 0x800D6020; +D_800D602C = 0x800D602C; +D_800D6038 = 0x800D6038; +D_800D6044 = 0x800D6044; +D_800D6054 = 0x800D6054; +D_800D6068 = 0x800D6068; +D_800D607C = 0x800D607C; +D_800D608C = 0x800D608C; +D_800D609C = 0x800D609C; +D_800D60AC = 0x800D60AC; +D_800D60BC = 0x800D60BC; +D_800D60D0 = 0x800D60D0; +D_800DA910 = 0x800DA910; +D_800DA940 = 0x800DA940; +D_800DA958 = 0x800DA958; +D_800DAAC8 = 0x800DAAC8; +D_800DAAF8 = 0x800DAAF8; +D_800DAB10 = 0x800DAB10; +D_800DABD0 = 0x800DABD0; +D_800DAD80 = 0x800DAD80; +D_800DADC0 = 0x800DADC0; +D_800DAE68 = 0x800DAE68; +D_800DB668 = 0x800DB668; +D_800DBEC8 = 0x800DBEC8; +D_800DBF68 = 0x800DBF68; +D_800DBFB0 = 0x800DBFB0; +D_800DC050 = 0x800DC050; +D_800DC090 = 0x800DC090; +D_800DC0F0 = 0x800DC0F0; +D_800DC128 = 0x800DC128; +D_800DC928 = 0x800DC928; +D_800DCE90 = 0x800DCE90; +D_800DCF10 = 0x800DCF10; +D_800DDC10 = 0x800DDC10; +D_800DDC80 = 0x800DDC80; +D_800DDE80 = 0x800DDE80; +D_800DE080 = 0x800DE080; +D_800DE280 = 0x800DE280; +D_800DE480 = 0x800DE480; +D_800DE680 = 0x800DE680; +D_800DE888 = 0x800DE888; +D_800DE8A0 = 0x800DE8A0; +D_800DEAA0 = 0x800DEAA0; +D_800DECA0 = 0x800DECA0; +D_800DF0A0 = 0x800DF0A0; +D_800DF2A0 = 0x800DF2A0; +D_800DF2B0 = 0x800DF2B0; +D_800DF2C0 = 0x800DF2C0; +D_800DF2D0 = 0x800DF2D0; +D_800DF2E0 = 0x800DF2E0; +D_800DF2F0 = 0x800DF2F0; +D_800DF36E = 0x800DF36E; +D_800DF372 = 0x800DF372; +D_800DF374 = 0x800DF374; +D_800DF3F0 = 0x800DF3F0; +D_800DF5EC = 0x800DF5EC; +D_800DF5F0 = 0x800DF5F0; +D_800DF7EC = 0x800DF7EC; +D_800DF7F0 = 0x800DF7F0; +D_800DF9EC = 0x800DF9EC; +D_800DF9F0 = 0x800DF9F0; +D_800DFA02 = 0x800DFA02; +D_800DFA08 = 0x800DFA08; +D_800DFA0A = 0x800DFA0A; +D_800DFA0B = 0x800DFA0B; +D_800DFA1A = 0x800DFA1A; +D_800DFA20 = 0x800DFA20; +D_800DFA21 = 0x800DFA21; +D_800DFA22 = 0x800DFA22; +D_800DFA23 = 0x800DFA23; +D_800DFA24 = 0x800DFA24; +D_800DFA28 = 0x800DFA28; +D_800DFA29 = 0x800DFA29; +D_800DFA2A = 0x800DFA2A; +D_800DFA2B = 0x800DFA2B; +D_800DFA2C = 0x800DFA2C; +D_800DFA30 = 0x800DFA30; +D_800DFA32 = 0x800DFA32; +D_800DFA33 = 0x800DFA33; +D_800DFA34 = 0x800DFA34; +D_800DFA36 = 0x800DFA36; +D_800DFA38 = 0x800DFA38; +D_800DFA39 = 0x800DFA39; +D_800DFA3A = 0x800DFA3A; +D_800DFA3C = 0x800DFA3C; +D_800DFA3E = 0x800DFA3E; +D_800DFA3F = 0x800DFA3F; +D_800DFA40 = 0x800DFA40; +D_800DFA42 = 0x800DFA42; +D_800DFA44 = 0x800DFA44; +D_800DFA45 = 0x800DFA45; +D_800DFA46 = 0x800DFA46; +D_800DFA48 = 0x800DFA48; +D_800DFA60 = 0x800DFA60; +D_800DFA70 = 0x800DFA70; +D_800E0C10 = 0x800E0C10; +D_800E1DC0 = 0x800E1DC0; +D_800E2F70 = 0x800E2F70; +D_800E2F74 = 0x800E2F74; +D_800E2F78 = 0x800E2F78; +D_800E2F80 = 0x800E2F80; +D_800E2F88 = 0x800E2F88; +D_800E2F90 = 0x800E2F90; +D_800E2FD0 = 0x800E2FD0; +D_800E2FE8 = 0x800E2FE8; +D_800E30B0 = 0x800E30B0; +D_800E30C8 = 0x800E30C8; +D_800E30D0 = 0x800E30D0; +D_800E30E8 = 0x800E30E8; +D_800E3100 = 0x800E3100; +D_800E3108 = 0x800E3108; +D_800E3120 = 0x800E3120; +D_800E31A0 = 0x800E31A0; +D_800E31B8 = 0x800E31B8; +D_800E31F8 = 0x800E31F8; +D_800E3210 = 0x800E3210; +D_800E3218 = 0x800E3218; +D_800E3230 = 0x800E3230; +D_800E3238 = 0x800E3238; +D_800E3250 = 0x800E3250; +D_800E3260 = 0x800E3260; +D_800E3278 = 0x800E3278; +D_800E3280 = 0x800E3280; +D_800E3298 = 0x800E3298; +D_800E32B8 = 0x800E32B8; +D_800E32D0 = 0x800E32D0; +D_800E32D8 = 0x800E32D8; +D_800E32F0 = 0x800E32F0; +D_800E32F8 = 0x800E32F8; +D_800E3310 = 0x800E3310; +D_800E3350 = 0x800E3350; +D_800E3368 = 0x800E3368; +D_800E3370 = 0x800E3370; +D_80138E10 = 0x80138E10; +D_80138E14 = 0x80138E14; +D_80138E18 = 0x80138E18; +D_80138E1C = 0x80138E1C; +D_80138E20 = 0x80138E20; +D_80138E24 = 0x80138E24; +D_80138E28 = 0x80138E28; +D_80138E2C = 0x80138E2C; +D_80138E30 = 0x80138E30; +D_80138E34 = 0x80138E34; +D_80138E38 = 0x80138E38; +D_80138E3C = 0x80138E3C; +D_80138E3D = 0x80138E3D; +D_80138E40 = 0x80138E40; +D_80138E41 = 0x80138E41; +D_80138E42 = 0x80138E42; +D_80138E43 = 0x80138E43; +D_80138E44 = 0x80138E44; +D_80138E46 = 0x80138E46; +D_80139E48 = 0x80139E48; +D_8013AFF8 = 0x8013AFF8; +D_8013C1A8 = 0x8013C1A8; +D_8013D358 = 0x8013D358; +D_8013D510 = 0x8013D510; +D_8013D514 = 0x8013D514; +D_8013D518 = 0x8013D518; +D_8013D51C = 0x8013D51C; +D_8013D520 = 0x8013D520; +D_8013D524 = 0x8013D524; +D_8013D530 = 0x8013D530; +D_8013D538 = 0x8013D538; +D_8013DD38 = 0x8013DD38; +D_8013DD40 = 0x8013DD40; +D_8013E540 = 0x8013E540; +D_80146D40 = 0x80146D40; +D_80146D50 = 0x80146D50; +D_801470D0 = 0x801470D0; +D_801472D0 = 0x801472D0; +D_801474D0 = 0x801474D0; +D_80147E80 = 0x80147E80; +D_80147E98 = 0x80147E98; +D_80147E9C = 0x80147E9C; +D_80147EA0 = 0x80147EA0; +D_80147EB0 = 0x80147EB0; +D_80147EB8 = 0x80147EB8; +D_801482B4 = 0x801482B4; +D_801482B8 = 0x801482B8; +D_801486B8 = 0x801486B8; +D_80148EC4 = 0x80148EC4; +D_80148EC8 = 0x80148EC8; +D_80148ECC = 0x80148ECC; +D_80148ED0 = 0x80148ED0; +D_80148ED4 = 0x80148ED4; +D_80148ED8 = 0x80148ED8; +D_80148EDC = 0x80148EDC; +D_80148EE0 = 0x80148EE0; +D_80148EF0 = 0x80148EF0; +D_80148F00 = 0x80148F00; +D_80148FC0 = 0x80148FC0; +D_80148FD0 = 0x80148FD0; +D_8014A7D0 = 0x8014A7D0; +D_8014BA90 = 0x8014BA90; +D_8014BA98 = 0x8014BA98; +D_8014BAA0 = 0x8014BAA0; +D_8014BAA8 = 0x8014BAA8; +D_8014BBE8 = 0x8014BBE8; +D_8014BBEC = 0x8014BBEC; +D_8014BBF8 = 0x8014BBF8; +D_8014BC48 = 0x8014BC48; +D_8014C048 = 0x8014C048; +D_8014C448 = 0x8014C448; +D_8014CA48 = 0x8014CA48; +D_8014CAC8 = 0x8014CAC8; +D_8014CAF0 = 0x8014CAF0; +D_8014CB10 = 0x8014CB10; +D_8014CB18 = 0x8014CB18; +D_8014CF18 = 0x8014CF18; +D_8014D160 = 0x8014D160; +D_8014D878 = 0x8014D878; +D_8014D880 = 0x8014D880; +D_8014D900 = 0x8014D900; +D_8014D9C0 = 0x8014D9C0; +D_8014DB80 = 0x8014DB80; +D_8014DB90 = 0x8014DB90; +D_8014DB94 = 0x8014DB94; +D_8014DB98 = 0x8014DB98; +D_8014DBB0 = 0x8014DBB0; +D_8014DBC0 = 0x8014DBC0; +D_8014E310 = 0x8014E310; +D_8014E320 = 0x8014E320; +D_8014E322 = 0x8014E322; +D_8014E323 = 0x8014E323; +D_8014E324 = 0x8014E324; +D_8014E328 = 0x8014E328; +D_8014E330 = 0x8014E330; +D_8014E338 = 0x8014E338; +D_8014E340 = 0x8014E340; +D_8014E350 = 0x8014E350; +D_8014E380 = 0x8014E380; +D_8014E390 = 0x8014E390; +D_8014E3A0 = 0x8014E3A0; +D_8014E3B0 = 0x8014E3B0; +D_8014E3B4 = 0x8014E3B4; +D_8014E544 = 0x8014E544; +D_8014E548 = 0x8014E548; +D_8014E580 = 0x8014E580; +D_8014E584 = 0x8014E584; +D_8014E714 = 0x8014E714; +D_8014E718 = 0x8014E718; +D_8014E732 = 0x8014E732; +D_8014E73E = 0x8014E73E; +D_8014E750 = 0x8014E750; +D_8014E754 = 0x8014E754; +D_8014E8E4 = 0x8014E8E4; +D_8014E8E8 = 0x8014E8E8; +D_8014E920 = 0x8014E920; +D_8014E92C = 0x8014E92C; +D_8014EAB0 = 0x8014EAB0; +D_8014EAB8 = 0x8014EAB8; +D_8014EAC0 = 0x8014EAC0; +D_8014EFC0 = 0x8014EFC0; +D_8014EFC8 = 0x8014EFC8; +D_8014EFCC = 0x8014EFCC; +D_8014EFD0 = 0x8014EFD0; +D_8014F4D8 = 0x8014F4D8; +D_8014F4E0 = 0x8014F4E0; +D_8014F4F0 = 0x8014F4F0; +D_8014F4F8 = 0x8014F4F8; +D_8014F508 = 0x8014F508; +D_8014F518 = 0x8014F518; +D_8014F558 = 0x8014F558; +D_8014F598 = 0x8014F598; +D_8014F698 = 0x8014F698; +D_8014F699 = 0x8014F699; +D_8014F69C = 0x8014F69C; +D_801506A0 = 0x801506A0; +D_801506A8 = 0x801506A8; +D_80150740 = 0x80150740; +D_801507F4 = 0x801507F4; +D_80150940 = 0x80150940; +D_80150974 = 0x80150974; +D_80150A8C = 0x80150A8C; +D_80150AFC = 0x80150AFC; +D_80150BD8 = 0x80150BD8; +D_80153158 = 0x80153158; +D_801531C4 = 0x801531C4; +D_80153758 = 0x80153758; +D_801537B8 = 0x801537B8; +D_80153AAE = 0x80153AAE; +D_80155158 = 0x80155158; +D_801551C4 = 0x801551C4; +D_80155220 = 0x80155220; +D_80155230 = 0x80155230; +D_80155240 = 0x80155240; +D_80155250 = 0x80155250; +D_80155260 = 0x80155260; +D_80155270 = 0x80155270; +D_80155470 = 0x80155470; +D_80155E70 = 0x80155E70; +D_80155E74 = 0x80155E74; +D_80155E78 = 0x80155E78; +D_801563B8 = 0x801563B8; +D_801563D0 = 0x801563D0; +D_80156410 = 0x80156410; +D_80156428 = 0x80156428; +D_80156468 = 0x80156468; +D_80156480 = 0x80156480; +D_80156580 = 0x80156580; +D_80156B80 = 0x80156B80; +D_80156B98 = 0x80156B98; +D_80156BA0 = 0x80156BA0; +D_80156BB8 = 0x80156BB8; +D_80157BB8 = 0x80157BB8; +D_80157BBC = 0x80157BBC; +D_80157BC0 = 0x80157BC0; +D_80157BC8 = 0x80157BC8; +D_80157CC8 = 0x80157CC8; +D_80157DC8 = 0x80157DC8; +D_80157DC9 = 0x80157DC9; +D_80157DCA = 0x80157DCA; +D_80157DCB = 0x80157DCB; +D_80157DCC = 0x80157DCC; +D_80157DD0 = 0x80157DD0; +D_80157DD4 = 0x80157DD4; +D_80157DD8 = 0x80157DD8; +D_80157DDC = 0x80157DDC; +D_80157DE0 = 0x80157DE0; +D_80157DE8 = 0x80157DE8; +D_80157DF2 = 0x80157DF2; +D_80157E00 = 0x80157E00; +D_80157E04 = 0x80157E04; +D_80157E08 = 0x80157E08; +D_80157E0C = 0x80157E0C; +D_80157E10 = 0x80157E10; +D_80157E14 = 0x80157E14; +D_80157E16 = 0x80157E16; +D_80157E18 = 0x80157E18; +D_80157E1C = 0x80157E1C; +D_80157E20 = 0x80157E20; +D_80157E24 = 0x80157E24; +D_80157E28 = 0x80157E28; +D_80157E30 = 0x80157E30; +D_80157E34 = 0x80157E34; +D_80157E38 = 0x80157E38; +D_80157ED8 = 0x80157ED8; +D_80157EDC = 0x80157EDC; +D_80157EE0 = 0x80157EE0; +D_80157EEC = 0x80157EEC; +D_80157EF2 = 0x80157EF2; +D_80157EF4 = 0x80157EF4; +D_80157EF8 = 0x80157EF8; +D_80157EFC = 0x80157EFC; +D_80157F00 = 0x80157F00; +D_80157F10 = 0x80157F10; +D_80157F28 = 0x80157F28; +D_80157F40 = 0x80157F40; +D_80157F58 = 0x80157F58; +D_80157F70 = 0x80157F70; +D_80158770 = 0x80158770; +D_80158778 = 0x80158778; +D_80158788 = 0x80158788; +D_8015878C = 0x8015878C; +D_80158790 = 0x80158790; +D_801587CC = 0x801587CC; +D_801587D0 = 0x801587D0; +D_801587D1 = 0x801587D1; +D_801587F8 = 0x801587F8; +D_80158810 = 0x80158810; +D_80158820 = 0x80158820; +D_80158920 = 0x80158920; +D_80158A20 = 0x80158A20; +D_80158A40 = 0x80158A40; +D_80158A60 = 0x80158A60; +D_80158B20 = 0x80158B20; +D_80158B60 = 0x80158B60; +D_80158D10 = 0x80158D10; +D_80159D10 = 0x80159D10; +D_80159D28 = 0x80159D28; +D_80159D40 = 0x80159D40; +D_80159D42 = 0x80159D42; +D_80159D44 = 0x80159D44; +D_80159D58 = 0x80159D58; +D_80159D5A = 0x80159D5A; +D_80159D5C = 0x80159D5C; +D_80159D70 = 0x80159D70; +D_80159D80 = 0x80159D80; +D_80159F30 = 0x80159F30; +D_8015AF30 = 0x8015AF30; +D_8015B0E0 = 0x8015B0E0; +D_8015B4E0 = 0x8015B4E0; +D_8015B4F8 = 0x8015B4F8; +D_8015B500 = 0x8015B500; +D_8015B518 = 0x8015B518; +D_8015B520 = 0x8015B520; +D_8015B538 = 0x8015B538; +D_8015B540 = 0x8015B540; +D_8015B550 = 0x8015B550; +D_8015B58C = 0x8015B58C; +D_8015B590 = 0x8015B590; +D_8015B594 = 0x8015B594; +D_8015B595 = 0x8015B595; +D_8015B596 = 0x8015B596; +D_8015B597 = 0x8015B597; +D_8015B598 = 0x8015B598; +D_8015B599 = 0x8015B599; +D_8015B59C = 0x8015B59C; +D_8015B610 = 0x8015B610; +D_8015B618 = 0x8015B618; +D_8015B630 = 0x8015B630; +D_8015B66C = 0x8015B66C; +D_8015B670 = 0x8015B670; +D_8015B690 = 0x8015B690; +D_8015B694 = 0x8015B694; +D_8015B698 = 0x8015B698; +D_8015B69C = 0x8015B69C; +D_8015B6A0 = 0x8015B6A0; +D_8015B6A8 = 0x8015B6A8; +D_8015B6C0 = 0x8015B6C0; +D_8015B6C4 = 0x8015B6C4; +D_8015B6C8 = 0x8015B6C8; +D_8015B6D0 = 0x8015B6D0; +D_8015B6D4 = 0x8015B6D4; +D_8015B6D5 = 0x8015B6D5; +D_8015B6D6 = 0x8015B6D6; +D_8015B6D8 = 0x8015B6D8; +D_8015B6D9 = 0x8015B6D9; +D_8015B6DC = 0x8015B6DC; +D_8015B744 = 0x8015B744; +D_8015B750 = 0x8015B750; +D_8015B758 = 0x8015B758; +D_8015B770 = 0x8015B770; +D_8015B920 = 0x8015B920; +D_8015B930 = 0x8015B930; +D_8015B948 = 0x8015B948; +D_8015B94C = 0x8015B94C; +D_8015B950 = 0x8015B950; +D_8015B960 = 0x8015B960; +D_8015B978 = 0x8015B978; +D_8015B97C = 0x8015B97C; +D_8015B980 = 0x8015B980; +D_8015C180 = 0x8015C180; +D_8015C184 = 0x8015C184; +D_8015C188 = 0x8015C188; +D_8015C18C = 0x8015C18C; +D_8015C190 = 0x8015C190; +D_8015C1A0 = 0x8015C1A0; +D_8015D1A0 = 0x8015D1A0; +D_8015D2A0 = 0x8015D2A0; +D_8015D2B8 = 0x8015D2B8; +D_8015D468 = 0x8015D468; +D_8015D488 = 0x8015D488; +D_80161488 = 0x80161488; +D_801614A8 = 0x801614A8; +D_801614C0 = 0x801614C0; +D_801614C4 = 0x801614C4; +D_801614C8 = 0x801614C8; +D_801614E0 = 0x801614E0; +D_80161560 = 0x80161560; +D_80161564 = 0x80161564; +D_80161568 = 0x80161568; +D_801615E8 = 0x801615E8; +D_801615F0 = 0x801615F0; +D_801615F8 = 0x801615F8; +D_80161A58 = 0x80161A58; +D_80161A59 = 0x80161A59; +D_80161A5C = 0x80161A5C; +D_80161A60 = 0x80161A60; +D_80161A70 = 0x80161A70; +D_80161A74 = 0x80161A74; +D_80161A78 = 0x80161A78; +D_80161A7C = 0x80161A7C; +D_80161A80 = 0x80161A80; +D_80161A84 = 0x80161A84; +D_80161A88 = 0x80161A88; +D_80161A8C = 0x80161A8C; +D_80161A90 = 0x80161A90; +D_80161A91 = 0x80161A91; +D_80161A94 = 0x80161A94; +D_80161A98 = 0x80161A98; +D_80161AA0 = 0x80161AA0; +D_80161AAC = 0x80161AAC; +D_80161AB0 = 0x80161AB0; +D_80161AB4 = 0x80161AB4; +D_80161AC0 = 0x80161AC0; +D_80161AD0 = 0x80161AD0; +D_80161AD4 = 0x80161AD4; +D_80161AD8 = 0x80161AD8; +D_80161ADC = 0x80161ADC; +D_80161AE0 = 0x80161AE0; +D_80161AE4 = 0x80161AE4; +D_80161AE8 = 0x80161AE8; +D_80161AEC = 0x80161AEC; +D_80161AF0 = 0x80161AF0; +D_80161AF4 = 0x80161AF4; +D_80161AF8 = 0x80161AF8; +D_80163510 = 0x80163510; +D_80163520 = 0x80163520; +D_80163550 = 0x80163550; +D_8016355C = 0x8016355C; +D_80163568 = 0x80163568; +D_80163580 = 0x80163580; +D_80163588 = 0x80163588; +D_80163688 = 0x80163688; +D_801636B8 = 0x801636B8; +D_801636E8 = 0x801636E8; +D_801636F0 = 0x801636F0; +D_80163718 = 0x80163718; +D_80163728 = 0x80163728; +D_80163740 = 0x80163740; +D_80163744 = 0x80163744; +D_80163748 = 0x80163748; +D_80163750 = 0x80163750; +D_80163758 = 0x80163758; +D_8016375C = 0x8016375C; +D_80163760 = 0x80163760; +D_801637A0 = 0x801637A0; +D_801637E0 = 0x801637E0; +D_801637E4 = 0x801637E4; +D_801637E8 = 0x801637E8; +D_801637EC = 0x801637EC; +D_801637F0 = 0x801637F0; +D_801637F4 = 0x801637F4; +D_80163800 = 0x80163800; +D_80163810 = 0x80163810; +D_80163814 = 0x80163814; +D_80163818 = 0x80163818; +D_8016381C = 0x8016381C; +D_80163820 = 0x80163820; +D_80163824 = 0x80163824; +D_80163828 = 0x80163828; +D_8016382C = 0x8016382C; +D_80163830 = 0x80163830; +D_80163834 = 0x80163834; +D_80163838 = 0x80163838; +D_8016383C = 0x8016383C; +D_80163840 = 0x80163840; +D_80163844 = 0x80163844; +D_80163848 = 0x80163848; +D_8016384C = 0x8016384C; +D_80163850 = 0x80163850; +D_80163854 = 0x80163854; +D_80163858 = 0x80163858; +D_8016385C = 0x8016385C; +D_80163860 = 0x80163860; +D_80163864 = 0x80163864; +D_80163868 = 0x80163868; +D_80163870 = 0x80163870; +D_80163898 = 0x80163898; +D_801638AC = 0x801638AC; +D_801638C0 = 0x801638C0; +D_801638C4 = 0x801638C4; +D_801638E8 = 0x801638E8; +D_801638EC = 0x801638EC; +D_80163910 = 0x80163910; +D_80163914 = 0x80163914; +D_80163918 = 0x80163918; +D_8016391C = 0x8016391C; +D_80163920 = 0x80163920; +D_80163960 = 0x80163960; +D_80163964 = 0x80163964; +D_80163968 = 0x80163968; +D_8016396C = 0x8016396C; +D_80163970 = 0x80163970; +D_80163974 = 0x80163974; +D_80163978 = 0x80163978; +D_801639B0 = 0x801639B0; +D_801639B4 = 0x801639B4; +D_801639B8 = 0x801639B8; +D_801639BC = 0x801639BC; +D_801639C0 = 0x801639C0; +D_80163A00 = 0x80163A00; +D_80163A04 = 0x80163A04; +D_80163A08 = 0x80163A08; +D_80163A10 = 0x80163A10; +D_80163A1C = 0x80163A1C; +D_80163A20 = 0x80163A20; +D_80163A24 = 0x80163A24; +D_80163A28 = 0x80163A28; +D_80163A64 = 0x80163A64; +D_80163A68 = 0x80163A68; +D_80163A6C = 0x80163A6C; +D_80163A70 = 0x80163A70; +D_80163A74 = 0x80163A74; +D_80163A78 = 0x80163A78; +D_80163A7C = 0x80163A7C; +D_80163A80 = 0x80163A80; +D_80163A84 = 0x80163A84; +D_80163A88 = 0x80163A88; +D_80163A8C = 0x80163A8C; +D_80163A90 = 0x80163A90; +D_80163A94 = 0x80163A94; +D_80163A98 = 0x80163A98; +D_80163A9C = 0x80163A9C; +D_80163AA0 = 0x80163AA0; +D_80163AA4 = 0x80163AA4; +D_80163AA8 = 0x80163AA8; +D_80163AAC = 0x80163AAC; +D_80163AB0 = 0x80163AB0; +D_80163AB4 = 0x80163AB4; +D_80163AB8 = 0x80163AB8; +D_80163AC0 = 0x80163AC0; +D_80163AC4 = 0x80163AC4; +D_80163AC8 = 0x80163AC8; +D_80163ACC = 0x80163ACC; +D_80163AD0 = 0x80163AD0; +D_80163AD4 = 0x80163AD4; +D_80163AD8 = 0x80163AD8; +D_80163ADC = 0x80163ADC; +D_80163AE0 = 0x80163AE0; +D_80163AE4 = 0x80163AE4; +D_80163AE8 = 0x80163AE8; +D_80163AEC = 0x80163AEC; +D_80163AF0 = 0x80163AF0; +D_80163AF4 = 0x80163AF4; +D_80163AF8 = 0x80163AF8; +D_80163AFC = 0x80163AFC; +D_80163B00 = 0x80163B00; +D_80163B04 = 0x80163B04; +D_80163B08 = 0x80163B08; +D_80163B0C = 0x80163B0C; +D_80163B10 = 0x80163B10; +D_80163B80 = 0x80163B80; +D_80163B84 = 0x80163B84; +D_80163B88 = 0x80163B88; +D_80163B8C = 0x80163B8C; +D_80163B90 = 0x80163B90; +D_80163B94 = 0x80163B94; +D_80163B9C = 0x80163B9C; +D_80163B9E = 0x80163B9E; +D_80163BA0 = 0x80163BA0; +D_80163BA2 = 0x80163BA2; +D_80163BA4 = 0x80163BA4; +D_80163BA6 = 0x80163BA6; +D_80163BA8 = 0x80163BA8; +D_80163BA9 = 0x80163BA9; +D_80163BAC = 0x80163BAC; +D_80163BB0 = 0x80163BB0; +D_80163BB4 = 0x80163BB4; +D_80163BC0 = 0x80163BC0; +D_80163BC4 = 0x80163BC4; +D_80163BC8 = 0x80163BC8; +D_80163BCC = 0x80163BCC; +D_80163BCE = 0x80163BCE; +D_80163BD0 = 0x80163BD0; +D_80163BD4 = 0x80163BD4; +D_80163BD8 = 0x80163BD8; +D_80163BE0 = 0x80163BE0; +D_80163BE4 = 0x80163BE4; +D_80163BE8 = 0x80163BE8; +D_80163BEC = 0x80163BEC; +D_80163BF0 = 0x80163BF0; +D_80163BF4 = 0x80163BF4; +D_80163BF8 = 0x80163BF8; +D_80163BF9 = 0x80163BF9; +D_80163BFC = 0x80163BFC; +D_80163C00 = 0x80163C00; +D_80163C04 = 0x80163C04; +D_80163C08 = 0x80163C08; +D_80163C10 = 0x80163C10; +D_80163C13 = 0x80163C13; +D_80163C20 = 0x80163C20; +D_80163C68 = 0x80163C68; +D_80165568 = 0x80165568; +D_80166148 = 0x80166148; +D_8016614A = 0x8016614A; +D_8016614C = 0x8016614C; +D_80166150 = 0x80166150; +D_80166154 = 0x80166154; +D_80166164 = 0x80166164; +D_80166198 = 0x80166198; +D_801661A0 = 0x801661A0; +D_801661B0 = 0x801661B0; +D_801661FE = 0x801661FE; +D_80166200 = 0x80166200; +D_8016620E = 0x8016620E; +D_80166211 = 0x80166211; +D_80166216 = 0x80166216; +D_8016622C = 0x8016622C; +D_8016622E = 0x8016622E; +D_80166240 = 0x80166240; +D_80166248 = 0x80166248; +D_80166258 = 0x80166258; +D_8016625C = 0x8016625C; +D_80166260 = 0x80166260; +D_80166264 = 0x80166264; +D_80166268 = 0x80166268; +D_8016626C = 0x8016626C; +D_80166270 = 0x80166270; +D_80166274 = 0x80166274; +D_80166278 = 0x80166278; +D_8016643C = 0x8016643C; +D_801664F4 = 0x801664F4; +D_8016653C = 0x8016653C; +D_80166730 = 0x80166730; +D_801667E8 = 0x801667E8; +D_80166830 = 0x80166830; +D_80166A24 = 0x80166A24; +D_80166ADC = 0x80166ADC; +D_80166B24 = 0x80166B24; +D_80166D18 = 0x80166D18; +D_801678E8 = 0x801678E8; +D_80167BDC = 0x80167BDC; +D_80167ED0 = 0x80167ED0; +D_80169C58 = 0x80169C58; +D_8016F1FC = 0x8016F1FC; +D_80170F84 = 0x80170F84; +D_80171278 = 0x80171278; +D_8017127A = 0x8017127A; +D_8017127C = 0x8017127C; +D_80171280 = 0x80171280; +D_80171284 = 0x80171284; +D_80171288 = 0x80171288; +D_8017128C = 0x8017128C; +D_80171290 = 0x80171290; +D_80171294 = 0x80171294; +D_801712C6 = 0x801712C6; +D_801712C8 = 0x801712C8; +D_8017134E = 0x8017134E; +D_8017135C = 0x8017135C; +D_80171680 = 0x80171680; +D_80171682 = 0x80171682; +D_80171684 = 0x80171684; +D_80171688 = 0x80171688; +D_8017168C = 0x8017168C; +D_8017169C = 0x8017169C; +D_80171726 = 0x80171726; +D_80171A88 = 0x80171A88; +D_80171A8A = 0x80171A8A; +D_80171A8C = 0x80171A8C; +D_80171A90 = 0x80171A90; +D_80171A94 = 0x80171A94; +D_80171AA4 = 0x80171AA4; +D_80171B58 = 0x80171B58; +D_80172298 = 0x80172298; +D_801722E6 = 0x801722E6; +D_80172318 = 0x80172318; +D_80173418 = 0x80173418; +D_80173DF0 = 0x80173DF0; +D_80174DCC = 0x80174DCC; +D_80174E58 = 0x80174E58; +D_8017568C = 0x8017568C; +D_801758BC = 0x801758BC; +D_80175948 = 0x80175948; +D_801759B4 = 0x801759B4; +D_801759C8 = 0x801759C8; +D_801761B8 = 0x801761B8; +D_80176618 = 0x80176618; +D_80176768 = 0x80176768; +D_801767D8 = 0x801767D8; +D_80176848 = 0x80176848; +D_80176880 = 0x80176880; +D_80176890 = 0x80176890; +D_801768A8 = 0x801768A8; +D_801768B8 = 0x801768B8; +D_80177B78 = 0x80177B78; +D_80178578 = 0x80178578; +D_801785A0 = 0x801785A0; +D_801786B8 = 0x801786B8; +D_801786C0 = 0x801786C0; +D_801789E0 = 0x801789E0; +D_80178D00 = 0x80178D00; +D_80179020 = 0x80179020; +D_80179340 = 0x80179340; +D_80179660 = 0x80179660; +D_80179668 = 0x80179668; +D_80179988 = 0x80179988; +D_8017998C = 0x8017998C; +D_80179990 = 0x80179990; +D_80179994 = 0x80179994; +D_80179998 = 0x80179998; +D_8017999C = 0x8017999C; +D_801799A0 = 0x801799A0; +D_801799A4 = 0x801799A4; +D_801799A8 = 0x801799A8; +D_801799AC = 0x801799AC; +D_801799B0 = 0x801799B0; +D_801799B4 = 0x801799B4; +D_801799B8 = 0x801799B8; +D_801799BC = 0x801799BC; +D_801799C0 = 0x801799C0; +D_801799D0 = 0x801799D0; +D_801799D8 = 0x801799D8; +D_801799DC = 0x801799DC; +D_801799E0 = 0x801799E0; +D_801799E4 = 0x801799E4; +D_801799E8 = 0x801799E8; +D_801799F0 = 0x801799F0; +D_80179A00 = 0x80179A00; +D_80179A04 = 0x80179A04; +D_80179A08 = 0x80179A08; +D_80179A0B = 0x80179A0B; +D_80179A0C = 0x80179A0C; +D_80179A10 = 0x80179A10; +D_80179A13 = 0x80179A13; +D_80179A14 = 0x80179A14; +D_80179A18 = 0x80179A18; +D_80179A1C = 0x80179A1C; +D_80179A20 = 0x80179A20; +D_80179A24 = 0x80179A24; +D_80179A28 = 0x80179A28; +D_80179A30 = 0x80179A30; +D_80179A38 = 0x80179A38; +D_80179A3C = 0x80179A3C; +D_80179A48 = 0x80179A48; +D_80179A50 = 0x80179A50; +D_80179A5C = 0x80179A5C; +D_80179A70 = 0x80179A70; +D_80179A78 = 0x80179A78; +D_80179A7C = 0x80179A7C; +D_80179A88 = 0x80179A88; +D_80179A90 = 0x80179A90; +D_80179A98 = 0x80179A98; +D_80179AA0 = 0x80179AA0; +D_80179AA8 = 0x80179AA8; +D_80179AB0 = 0x80179AB0; +D_80179AB8 = 0x80179AB8; +D_80179AC0 = 0x80179AC0; +D_80179AD0 = 0x80179AD0; +D_80179AD4 = 0x80179AD4; +D_80179AD8 = 0x80179AD8; +D_80179ADC = 0x80179ADC; +D_80179AE0 = 0x80179AE0; +D_80179AE4 = 0x80179AE4; +D_80179AE8 = 0x80179AE8; +D_80179AEC = 0x80179AEC; +D_80179AF0 = 0x80179AF0; +D_80179AF8 = 0x80179AF8; +D_80179B08 = 0x80179B08; +D_80179B10 = 0x80179B10; +D_80179B20 = 0x80179B20; +D_80179B24 = 0x80179B24; +D_80179B28 = 0x80179B28; +D_80179B30 = 0x80179B30; +D_80179B40 = 0x80179B40; +D_80179B4C = 0x80179B4C; +D_80179B50 = 0x80179B50; +D_80179B5C = 0x80179B5C; +D_80179B60 = 0x80179B60; +D_80179B68 = 0x80179B68; +D_80179B78 = 0x80179B78; +D_80179B7C = 0x80179B7C; +D_80179B80 = 0x80179B80; +D_80179B90 = 0x80179B90; +D_80179B94 = 0x80179B94; +D_80179B98 = 0x80179B98; +D_80179BA0 = 0x80179BA0; +D_80179BB0 = 0x80179BB0; +D_80179BB4 = 0x80179BB4; +D_80179BB8 = 0x80179BB8; +D_80179BBC = 0x80179BBC; +D_80179BC0 = 0x80179BC0; +D_80179BC4 = 0x80179BC4; +D_80179BC8 = 0x80179BC8; +D_80179BCC = 0x80179BCC; +D_80179BD0 = 0x80179BD0; +D_80179BD4 = 0x80179BD4; +D_80179BD8 = 0x80179BD8; +D_80179BE8 = 0x80179BE8; +D_80179BF0 = 0x80179BF0; +D_80179C00 = 0x80179C00; +D_80179C08 = 0x80179C08; +D_80179C18 = 0x80179C18; +D_80179C20 = 0x80179C20; +D_80179C30 = 0x80179C30; +D_80179C38 = 0x80179C38; +D_80179C48 = 0x80179C48; +D_80179C50 = 0x80179C50; +D_80179C60 = 0x80179C60; +D_80179C68 = 0x80179C68; +D_80179CA8 = 0x80179CA8; +D_80179CAC = 0x80179CAC; +D_80179CB0 = 0x80179CB0; +D_80179CB4 = 0x80179CB4; +D_80179CB8 = 0x80179CB8; +D_80179CD4 = 0x80179CD4; +D_80179CD8 = 0x80179CD8; +D_80179CF4 = 0x80179CF4; +D_80179D14 = 0x80179D14; +D_80179D18 = 0x80179D18; +D_80179D38 = 0x80179D38; +D_80179D98 = 0x80179D98; +D_80179DA0 = 0x80179DA0; +D_80179DA4 = 0x80179DA4; +D_80179DB8 = 0x80179DB8; +D_80179DD8 = 0x80179DD8; +D_80179DDC = 0x80179DDC; +D_80179DE0 = 0x80179DE0; +D_80179DE8 = 0x80179DE8; +D_80179DF4 = 0x80179DF4; +D_80179DF8 = 0x80179DF8; +D_80179DFC = 0x80179DFC; +D_80179E00 = 0x80179E00; +D_80179E04 = 0x80179E04; +D_80179E08 = 0x80179E08; +D_80179E0C = 0x80179E0C; +D_80179E14 = 0x80179E14; +D_80179E18 = 0x80179E18; +D_80179E1C = 0x80179E1C; +D_80179E24 = 0x80179E24; +D_80179E28 = 0x80179E28; +D_80179E2C = 0x80179E2C; +D_80179E30 = 0x80179E30; +D_80179E38 = 0x80179E38; +D_80179E3C = 0x80179E3C; +D_80179E40 = 0x80179E40; +D_80179E44 = 0x80179E44; +D_80179E50 = 0x80179E50; +D_80179E58 = 0x80179E58; +D_80179E5C = 0x80179E5C; +D_80179E70 = 0x80179E70; +D_80179E78 = 0x80179E78; +D_80179E88 = 0x80179E88; +D_80179E90 = 0x80179E90; +D_80179EA0 = 0x80179EA0; +D_80179EA8 = 0x80179EA8; +D_80179EB8 = 0x80179EB8; +D_80179EC0 = 0x80179EC0; +D_80179ED0 = 0x80179ED0; +D_80179ED8 = 0x80179ED8; +D_80179EF0 = 0x80179EF0; +D_80179F08 = 0x80179F08; +D_80179F10 = 0x80179F10; +D_80179F18 = 0x80179F18; +D_80179F20 = 0x80179F20; +D_80179F30 = 0x80179F30; +D_80179F38 = 0x80179F38; +D_80179FD8 = 0x80179FD8; +D_80179FDC = 0x80179FDC; +D_80179FE0 = 0x80179FE0; +D_80179FE4 = 0x80179FE4; +D_80179FE8 = 0x80179FE8; +D_80179FEC = 0x80179FEC; +D_80179FF0 = 0x80179FF0; +D_80179FF4 = 0x80179FF4; +D_80179FF8 = 0x80179FF8; +D_8017A000 = 0x8017A000; +D_8017A078 = 0x8017A078; +D_8017A08C = 0x8017A08C; +D_8017A194 = 0x8017A194; +D_8017A294 = 0x8017A294; +D_8017A29C = 0x8017A29C; +D_8017A39C = 0x8017A39C; +D_8017A3A1 = 0x8017A3A1; +D_8017A3E4 = 0x8017A3E4; +D_8017A3E8 = 0x8017A3E8; +D_8017A3EC = 0x8017A3EC; +D_8017A3F0 = 0x8017A3F0; +D_8017A3F4 = 0x8017A3F4; +D_8017A3F8 = 0x8017A3F8; +D_8017A3FC = 0x8017A3FC; +D_8017A400 = 0x8017A400; +D_8017A404 = 0x8017A404; +D_8017A40C = 0x8017A40C; +D_8017A410 = 0x8017A410; +D_8017A414 = 0x8017A414; +D_8017A41C = 0x8017A41C; +D_8017A420 = 0x8017A420; +D_8017A424 = 0x8017A424; +D_8017A428 = 0x8017A428; +D_8017A42C = 0x8017A42C; +D_8017A430 = 0x8017A430; +D_8017A434 = 0x8017A434; +D_8017A438 = 0x8017A438; +D_8017A43C = 0x8017A43C; +D_8017A440 = 0x8017A440; +D_8017A444 = 0x8017A444; +D_8017A44C = 0x8017A44C; +D_8017A450 = 0x8017A450; +D_8017A454 = 0x8017A454; +D_8017A460 = 0x8017A460; +D_8017A464 = 0x8017A464; +D_8017A468 = 0x8017A468; +D_8017A470 = 0x8017A470; +D_8017A478 = 0x8017A478; +D_8017A488 = 0x8017A488; +D_8017A490 = 0x8017A490; +D_8017A498 = 0x8017A498; +D_8017A4A0 = 0x8017A4A0; +D_8017A4A8 = 0x8017A4A8; +D_8017A4B0 = 0x8017A4B0; +D_8017A4B8 = 0x8017A4B8; +D_8017A4BC = 0x8017A4BC; +D_8017A4C0 = 0x8017A4C0; +D_8017A4C4 = 0x8017A4C4; +D_8017A4C8 = 0x8017A4C8; +D_8017A4CC = 0x8017A4CC; +D_8017A4D0 = 0x8017A4D0; +D_8017A4D4 = 0x8017A4D4; +D_8017A4D8 = 0x8017A4D8; +D_8017A4DC = 0x8017A4DC; +D_8017A4E0 = 0x8017A4E0; +D_8017A4E4 = 0x8017A4E4; +D_8017A4E8 = 0x8017A4E8; +D_8017A4F8 = 0x8017A4F8; +D_8017A508 = 0x8017A508; +D_8017A518 = 0x8017A518; +D_8017A528 = 0x8017A528; +D_8017A538 = 0x8017A538; +D_8017A53C = 0x8017A53C; +D_8017A540 = 0x8017A540; +D_8017A544 = 0x8017A544; +D_8017A578 = 0x8017A578; +D_8017A57C = 0x8017A57C; +D_8017A580 = 0x8017A580; +D_8017A588 = 0x8017A588; +D_8017A58C = 0x8017A58C; +D_8017A590 = 0x8017A590; +D_8017A594 = 0x8017A594; +D_8017A598 = 0x8017A598; +D_8017A5A8 = 0x8017A5A8; +D_8017A5AC = 0x8017A5AC; +D_8017A5B0 = 0x8017A5B0; +D_8017A5B8 = 0x8017A5B8; +D_8017A5BC = 0x8017A5BC; +D_8017A5C0 = 0x8017A5C0; +D_8017A5C8 = 0x8017A5C8; +D_8017A5CC = 0x8017A5CC; +D_8017A5D0 = 0x8017A5D0; +D_8017A5D8 = 0x8017A5D8; +D_8017A5DC = 0x8017A5DC; +D_8017A5E0 = 0x8017A5E0; +D_8017A5E4 = 0x8017A5E4; +D_8017A5E8 = 0x8017A5E8; +D_8017A5EC = 0x8017A5EC; +D_8017A5F0 = 0x8017A5F0; +D_8017A5FC = 0x8017A5FC; +D_8017A600 = 0x8017A600; +D_8017A604 = 0x8017A604; +D_8017A608 = 0x8017A608; +D_8017A60C = 0x8017A60C; +D_8017A614 = 0x8017A614; +D_8017A620 = 0x8017A620; +D_8017A624 = 0x8017A624; +D_8017A628 = 0x8017A628; +D_8017A62C = 0x8017A62C; +D_8017A630 = 0x8017A630; +D_8017A634 = 0x8017A634; +D_8017A638 = 0x8017A638; +D_8017A63C = 0x8017A63C; +D_8017A640 = 0x8017A640; +D_8017A644 = 0x8017A644; +D_8017A648 = 0x8017A648; +D_8017A64C = 0x8017A64C; +D_8017A650 = 0x8017A650; +D_8017A654 = 0x8017A654; +D_8017A658 = 0x8017A658; +D_8017A65C = 0x8017A65C; +D_8017A660 = 0x8017A660; +D_8017A664 = 0x8017A664; +D_8017A668 = 0x8017A668; +D_8017A66C = 0x8017A66C; +D_8017A670 = 0x8017A670; +D_8017A674 = 0x8017A674; +D_8017A678 = 0x8017A678; +D_8017A688 = 0x8017A688; +D_8017A68C = 0x8017A68C; +D_8017A690 = 0x8017A690; +D_8017A6A0 = 0x8017A6A0; +D_8017A6A4 = 0x8017A6A4; +D_8017A6A8 = 0x8017A6A8; +D_8017A6AC = 0x8017A6AC; +D_8017A6B0 = 0x8017A6B0; +D_8017A6B4 = 0x8017A6B4; +D_8017A6B8 = 0x8017A6B8; +D_8017A6BC = 0x8017A6BC; +D_8017A6C0 = 0x8017A6C0; +D_8017A6C4 = 0x8017A6C4; +D_8017A6CC = 0x8017A6CC; +D_8017A6D0 = 0x8017A6D0; +D_8017A6D4 = 0x8017A6D4; +D_8017A6D8 = 0x8017A6D8; +D_8017A6DC = 0x8017A6DC; +D_8017A6E0 = 0x8017A6E0; +D_8017A6E4 = 0x8017A6E4; +D_8017A6E8 = 0x8017A6E8; +D_8017A6F0 = 0x8017A6F0; +D_8017A880 = 0x8017A880; +D_8017A890 = 0x8017A890; +D_8017A894 = 0x8017A894; +D_8017A898 = 0x8017A898; +D_8017A89C = 0x8017A89C; +D_8017A8A0 = 0x8017A8A0; +D_8017A8A4 = 0x8017A8A4; +D_8017A8A8 = 0x8017A8A8; +D_8017A8AC = 0x8017A8AC; +D_8017A8B0 = 0x8017A8B0; +D_8017A8B4 = 0x8017A8B4; +D_8017A8B8 = 0x8017A8B8; +D_8017A8BC = 0x8017A8BC; +D_8017A8C0 = 0x8017A8C0; +D_8017A8C4 = 0x8017A8C4; +D_8017A8C8 = 0x8017A8C8; +D_8017A8CC = 0x8017A8CC; +D_8017A8D0 = 0x8017A8D0; +D_8017A8D8 = 0x8017A8D8; +D_8017A8E8 = 0x8017A8E8; +D_8017A8F0 = 0x8017A8F0; +D_8017A8F4 = 0x8017A8F4; +D_8017A8F8 = 0x8017A8F8; +D_8017A8FC = 0x8017A8FC; +D_8017A900 = 0x8017A900; +D_8017A904 = 0x8017A904; +D_8017A908 = 0x8017A908; +D_8017A90C = 0x8017A90C; +D_8017A910 = 0x8017A910; +D_8017A914 = 0x8017A914; +D_8017A918 = 0x8017A918; +D_8017A91C = 0x8017A91C; +D_8017A920 = 0x8017A920; +D_8017A924 = 0x8017A924; +D_8017A928 = 0x8017A928; +D_8017A92C = 0x8017A92C; +D_8017A930 = 0x8017A930; +D_8017A934 = 0x8017A934; +D_8017A938 = 0x8017A938; +D_8017A93C = 0x8017A93C; +D_8017A940 = 0x8017A940; +D_8017A948 = 0x8017A948; +D_8017A958 = 0x8017A958; +D_8017A968 = 0x8017A968; +D_8017A96C = 0x8017A96C; +D_8017A970 = 0x8017A970; +D_8017A974 = 0x8017A974; +D_8017A978 = 0x8017A978; +D_8017A980 = 0x8017A980; +D_8017A990 = 0x8017A990; +D_8017A9A0 = 0x8017A9A0; +D_8017A9A8 = 0x8017A9A8; +D_8017A9C0 = 0x8017A9C0; +D_8017A9D0 = 0x8017A9D0; +D_8017A9D4 = 0x8017A9D4; +D_8017A9D8 = 0x8017A9D8; +D_8017A9DC = 0x8017A9DC; +D_8017A9E0 = 0x8017A9E0; +D_8017A9E1 = 0x8017A9E1; +D_8017A9E2 = 0x8017A9E2; +D_8017A9E3 = 0x8017A9E3; +D_8017A9EF = 0x8017A9EF; +D_8017AACB = 0x8017AACB; +D_8017AADF = 0x8017AADF; +D_8017AAE0 = 0x8017AAE0; +D_8017AAE1 = 0x8017AAE1; +D_8017AAE2 = 0x8017AAE2; + +func_i1_8018B020 = 0x8018B020; //segment:ovl_i1 +func_i1_8018B030 = 0x8018B030; //segment:ovl_i1 +func_i1_8018B03C = 0x8018B03C; //segment:ovl_i1 +func_i1_8018B0A4 = 0x8018B0A4; //segment:ovl_i1 +func_i1_8018B170 = 0x8018B170; //segment:ovl_i1 +func_i1_8018B210 = 0x8018B210; //segment:ovl_i1 +func_i1_8018B2A0 = 0x8018B2A0; //segment:ovl_i1 +func_i1_8018B338 = 0x8018B338; //segment:ovl_i1 +func_i1_8018B3D8 = 0x8018B3D8; //segment:ovl_i1 +func_i1_8018B48C = 0x8018B48C; //segment:ovl_i1 +func_i1_8018B4F0 = 0x8018B4F0; //segment:ovl_i1 +func_i1_8018B538 = 0x8018B538; //segment:ovl_i1 +func_i1_8018B588 = 0x8018B588; //segment:ovl_i1 +func_i1_8018B5C8 = 0x8018B5C8; //segment:ovl_i1 +func_i1_8018C248 = 0x8018C248; //segment:ovl_i1 +func_i1_8018C2A4 = 0x8018C2A4; //segment:ovl_i1 +func_i1_8018C510 = 0x8018C510; //segment:ovl_i1 +func_i1_8018C768 = 0x8018C768; //segment:ovl_i1 +func_i1_8018C83C = 0x8018C83C; //segment:ovl_i1 +func_i1_8018CB38 = 0x8018CB38; //segment:ovl_i1 +func_i1_8018DEEC = 0x8018DEEC; //segment:ovl_i1 +func_i1_8018E1E8 = 0x8018E1E8; //segment:ovl_i1 +func_i1_8018E52C = 0x8018E52C; //segment:ovl_i1 +func_i1_8018E5C0 = 0x8018E5C0; //segment:ovl_i1 +func_i1_8018E61C = 0x8018E61C; //segment:ovl_i1 +func_i1_8018E798 = 0x8018E798; //segment:ovl_i1 +func_i1_8018E988 = 0x8018E988; //segment:ovl_i1 +func_i1_8018EB6C = 0x8018EB6C; //segment:ovl_i1 +func_i1_8018EC14 = 0x8018EC14; //segment:ovl_i1 +func_i1_8018EED0 = 0x8018EED0; //segment:ovl_i1 +func_i1_8018F044 = 0x8018F044; //segment:ovl_i1 +func_i1_8018F564 = 0x8018F564; //segment:ovl_i1 +func_i1_8018F5B4 = 0x8018F5B4; //segment:ovl_i1 +func_i1_8018F65C = 0x8018F65C; //segment:ovl_i1 +func_i1_8018F6B0 = 0x8018F6B0; //segment:ovl_i1 +func_i1_8018F708 = 0x8018F708; //segment:ovl_i1 +func_i1_8018F73C = 0x8018F73C; //segment:ovl_i1 +func_i1_8018F834 = 0x8018F834; //segment:ovl_i1 +func_i1_8018F88C = 0x8018F88C; //segment:ovl_i1 +func_i1_8018F934 = 0x8018F934; //segment:ovl_i1 +func_i1_8018FB68 = 0x8018FB68; //segment:ovl_i1 +func_i1_8018FC54 = 0x8018FC54; //segment:ovl_i1 +func_i1_80191838 = 0x80191838; //segment:ovl_i1 +func_i1_80191D14 = 0x80191D14; //segment:ovl_i1 +func_i1_801921E8 = 0x801921E8; //segment:ovl_i1 +func_i1_801926C8 = 0x801926C8; //segment:ovl_i1 +func_i1_80192720 = 0x80192720; //segment:ovl_i1 +func_i1_80192790 = 0x80192790; //segment:ovl_i1 +func_i1_801927EC = 0x801927EC; //segment:ovl_i1 +func_i1_801928A0 = 0x801928A0; //segment:ovl_i1 +func_i1_801928F8 = 0x801928F8; //segment:ovl_i1 +func_i1_801929AC = 0x801929AC; //segment:ovl_i1 +func_i1_80192A04 = 0x80192A04; //segment:ovl_i1 +func_i1_80192AB8 = 0x80192AB8; //segment:ovl_i1 +func_i1_80192C3C = 0x80192C3C; //segment:ovl_i1 +func_i1_80192D90 = 0x80192D90; //segment:ovl_i1 +func_i1_80192E30 = 0x80192E30; //segment:ovl_i1 +func_i1_80192F18 = 0x80192F18; //segment:ovl_i1 +func_i1_80192FD0 = 0x80192FD0; //segment:ovl_i1 +func_i1_801930EC = 0x801930EC; //segment:ovl_i1 +func_i1_8019316C = 0x8019316C; //segment:ovl_i1 +func_i1_801932F4 = 0x801932F4; //segment:ovl_i1 +func_i1_801949F4 = 0x801949F4; //segment:ovl_i1 +func_i1_80194BE0 = 0x80194BE0; //segment:ovl_i1 +func_i1_80195B60 = 0x80195B60; //segment:ovl_i1 +func_i1_80195D4C = 0x80195D4C; //segment:ovl_i1 +func_i1_80195DC8 = 0x80195DC8; //segment:ovl_i1 +func_i1_80195E30 = 0x80195E30; //segment:ovl_i1 +func_i1_80195EAC = 0x80195EAC; //segment:ovl_i1 +func_i1_80195F18 = 0x80195F18; //segment:ovl_i1 +func_i1_80195F7C = 0x80195F7C; //segment:ovl_i1 +func_i1_80195F88 = 0x80195F88; //segment:ovl_i1 +func_i1_80196514 = 0x80196514; //segment:ovl_i1 +func_i1_80196720 = 0x80196720; //segment:ovl_i1 +func_i1_80196744 = 0x80196744; //segment:ovl_i1 +func_i1_8019689C = 0x8019689C; //segment:ovl_i1 +func_i1_80196914 = 0x80196914; //segment:ovl_i1 +func_i1_80196920 = 0x80196920; //segment:ovl_i1 +func_i1_80196E24 = 0x80196E24; //segment:ovl_i1 +func_i1_80196E4C = 0x80196E4C; //segment:ovl_i1 +func_i1_80196F40 = 0x80196F40; //segment:ovl_i1 +func_i1_80196FB0 = 0x80196FB0; //segment:ovl_i1 +func_i1_8019703C = 0x8019703C; //segment:ovl_i1 +func_i1_80197264 = 0x80197264; //segment:ovl_i1 +func_i1_801977D4 = 0x801977D4; //segment:ovl_i1 +func_i1_80197E08 = 0x80197E08; //segment:ovl_i1 +func_i1_8019BD70 = 0x8019BD70; //segment:ovl_i1 +func_i1_8019BE74 = 0x8019BE74; //segment:ovl_i1 +func_i1_8019BFF4 = 0x8019BFF4; //segment:ovl_i1 +func_i1_8019C044 = 0x8019C044; //segment:ovl_i1 +func_i1_8019C0AC = 0x8019C0AC; //segment:ovl_i1 +func_i1_8019C318 = 0x8019C318; //segment:ovl_i1 +func_i1_8019C340 = 0x8019C340; //segment:ovl_i1 +func_i1_8019C3C8 = 0x8019C3C8; //segment:ovl_i1 +func_i1_8019C6B0 = 0x8019C6B0; //segment:ovl_i1 +func_i1_8019C82C = 0x8019C82C; //segment:ovl_i1 +func_i1_8019CA84 = 0x8019CA84; //segment:ovl_i1 +func_i1_8019CEFC = 0x8019CEFC; //segment:ovl_i1 +D_i1_8019D230 = 0x8019D230; //segment:ovl_i1 +D_i1_8019D240 = 0x8019D240; //segment:ovl_i1 +D_i1_8019D244 = 0x8019D244; //segment:ovl_i1 +D_i1_8019D250 = 0x8019D250; //segment:ovl_i1 +D_i1_8019D25C = 0x8019D25C; //segment:ovl_i1 +D_i1_8019D268 = 0x8019D268; //segment:ovl_i1 +D_i1_8019D274 = 0x8019D274; //segment:ovl_i1 +D_i1_8019D280 = 0x8019D280; //segment:ovl_i1 +D_i1_8019D28C = 0x8019D28C; //segment:ovl_i1 +D_i1_8019D298 = 0x8019D298; //segment:ovl_i1 +D_i1_8019D2A4 = 0x8019D2A4; //segment:ovl_i1 +D_i1_8019D2B0 = 0x8019D2B0; //segment:ovl_i1 +D_i1_8019D2BC = 0x8019D2BC; //segment:ovl_i1 +D_i1_8019D2C8 = 0x8019D2C8; //segment:ovl_i1 +D_i1_8019D2D4 = 0x8019D2D4; //segment:ovl_i1 +D_i1_8019D2E4 = 0x8019D2E4; //segment:ovl_i1 +D_i1_8019D2F4 = 0x8019D2F4; //segment:ovl_i1 +D_i1_8019D304 = 0x8019D304; //segment:ovl_i1 +D_i1_8019D314 = 0x8019D314; //segment:ovl_i1 +D_i1_8019D320 = 0x8019D320; //segment:ovl_i1 +D_i1_8019D32C = 0x8019D32C; //segment:ovl_i1 +D_i1_8019D338 = 0x8019D338; //segment:ovl_i1 +D_i1_8019D344 = 0x8019D344; //segment:ovl_i1 +D_i1_8019D350 = 0x8019D350; //segment:ovl_i1 +D_i1_8019D368 = 0x8019D368; //segment:ovl_i1 +D_i1_8019D374 = 0x8019D374; //segment:ovl_i1 +D_i1_8019D380 = 0x8019D380; //segment:ovl_i1 +D_i1_8019D38C = 0x8019D38C; //segment:ovl_i1 +D_i1_8019D398 = 0x8019D398; //segment:ovl_i1 +D_i1_8019D3A4 = 0x8019D3A4; //segment:ovl_i1 +D_i1_8019D3B0 = 0x8019D3B0; //segment:ovl_i1 +D_i1_8019D3BC = 0x8019D3BC; //segment:ovl_i1 +D_i1_8019D4AC = 0x8019D4AC; //segment:ovl_i1 +D_i1_8019D4BC = 0x8019D4BC; //segment:ovl_i1 +D_i1_8019D4CC = 0x8019D4CC; //segment:ovl_i1 +D_i1_8019D4D8 = 0x8019D4D8; //segment:ovl_i1 +D_i1_8019D4E4 = 0x8019D4E4; //segment:ovl_i1 +D_i1_8019D4F0 = 0x8019D4F0; //segment:ovl_i1 +D_i1_8019D4FC = 0x8019D4FC; //segment:ovl_i1 +D_i1_8019D508 = 0x8019D508; //segment:ovl_i1 +D_i1_8019D514 = 0x8019D514; //segment:ovl_i1 +D_i1_8019D520 = 0x8019D520; //segment:ovl_i1 +D_i1_8019D52C = 0x8019D52C; //segment:ovl_i1 +D_i1_8019D538 = 0x8019D538; //segment:ovl_i1 +D_i1_8019D544 = 0x8019D544; //segment:ovl_i1 +D_i1_8019D550 = 0x8019D550; //segment:ovl_i1 +D_i1_8019D55C = 0x8019D55C; //segment:ovl_i1 +D_i1_8019D568 = 0x8019D568; //segment:ovl_i1 +D_i1_8019D574 = 0x8019D574; //segment:ovl_i1 +D_i1_8019D580 = 0x8019D580; //segment:ovl_i1 +D_i1_8019D58C = 0x8019D58C; //segment:ovl_i1 +D_i1_8019D5A0 = 0x8019D5A0; //segment:ovl_i1 +D_i1_8019D730 = 0x8019D730; //segment:ovl_i1 +D_i1_8019D8C0 = 0x8019D8C0; //segment:ovl_i1 +D_i1_8019D8CC = 0x8019D8CC; //segment:ovl_i1 +D_i1_8019DA5C = 0x8019DA5C; //segment:ovl_i1 +D_i1_8019DA68 = 0x8019DA68; //segment:ovl_i1 +D_i1_8019DAAC = 0x8019DAAC; //segment:ovl_i1 +D_i1_8019DAAE = 0x8019DAAE; //segment:ovl_i1 +D_i1_8019DAB8 = 0x8019DAB8; //segment:ovl_i1 +D_i1_8019DCC8 = 0x8019DCC8; //segment:ovl_i1 +D_i1_8019DED8 = 0x8019DED8; //segment:ovl_i1 +D_i1_8019DF60 = 0x8019DF60; //segment:ovl_i1 +D_i1_8019DFA2 = 0x8019DFA2; //segment:ovl_i1 +D_i1_8019DFA4 = 0x8019DFA4; //segment:ovl_i1 +D_i1_8019E1A8 = 0x8019E1A8; //segment:ovl_i1 +D_i1_8019E25C = 0x8019E25C; //segment:ovl_i1 +D_i1_8019E280 = 0x8019E280; //segment:ovl_i1 +D_i1_8019E282 = 0x8019E282; //segment:ovl_i1 +D_i1_8019E298 = 0x8019E298; //segment:ovl_i1 +D_i1_8019E418 = 0x8019E418; //segment:ovl_i1 +D_i1_8019E734 = 0x8019E734; //segment:ovl_i1 +D_i1_8019E758 = 0x8019E758; //segment:ovl_i1 +D_i1_8019E760 = 0x8019E760; //segment:ovl_i1 +D_i1_8019E770 = 0x8019E770; //segment:ovl_i1 +D_i1_8019E77C = 0x8019E77C; //segment:ovl_i1 +D_i1_8019E784 = 0x8019E784; //segment:ovl_i1 +D_i1_8019E78C = 0x8019E78C; //segment:ovl_i1 +D_i1_8019E79C = 0x8019E79C; //segment:ovl_i1 +D_i1_8019E7A4 = 0x8019E7A4; //segment:ovl_i1 +D_i1_8019E7AC = 0x8019E7AC; //segment:ovl_i1 +D_i1_8019E7B4 = 0x8019E7B4; //segment:ovl_i1 +D_i1_8019E7BC = 0x8019E7BC; //segment:ovl_i1 +D_i1_8019E7C8 = 0x8019E7C8; //segment:ovl_i1 +D_i1_8019E7E0 = 0x8019E7E0; //segment:ovl_i1 +D_i1_8019E860 = 0x8019E860; //segment:ovl_i1 +D_i1_8019E898 = 0x8019E898; //segment:ovl_i1 +D_i1_8019E8B0 = 0x8019E8B0; //segment:ovl_i1 +D_i1_8019E8B2 = 0x8019E8B2; //segment:ovl_i1 +D_8019F0F0 = 0x8019F0F0; //segment:ovl_i1 +D_i1_8019F100 = 0x8019F100; //segment:ovl_i1 +D_i1_8019F108 = 0x8019F108; //segment:ovl_i1 +D_i1_8019F114 = 0x8019F114; //segment:ovl_i1 +D_i1_8019F144 = 0x8019F144; //segment:ovl_i1 +D_i1_8019F148 = 0x8019F148; //segment:ovl_i1 +D_i1_8019F200 = 0x8019F200; //segment:ovl_i1 +D_i1_8019F204 = 0x8019F204; //segment:ovl_i1 +D_i1_8019F208 = 0x8019F208; //segment:ovl_i1 +D_i1_8019F218 = 0x8019F218; //segment:ovl_i1 +D_i1_8019F220 = 0x8019F220; //segment:ovl_i1 +D_i1_8019F268 = 0x8019F268; //segment:ovl_i1 +D_i1_8019F2CC = 0x8019F2CC; //segment:ovl_i1 +D_i1_8019F2D4 = 0x8019F2D4; //segment:ovl_i1 +D_i1_8019F2DC = 0x8019F2DC; //segment:ovl_i1 +D_i1_8019F2E4 = 0x8019F2E4; //segment:ovl_i1 +D_i1_8019F2E8 = 0x8019F2E8; //segment:ovl_i1 +D_i1_8019F968 = 0x8019F968; //segment:ovl_i1 +D_i1_8019F9F0 = 0x8019F9F0; //segment:ovl_i1 +D_i1_8019F9F2 = 0x8019F9F2; //segment:ovl_i1 +D_i1_8019FA64 = 0x8019FA64; //segment:ovl_i1 +D_i1_8019FAE8 = 0x8019FAE8; //segment:ovl_i1 +D_i1_8019FAEC = 0x8019FAEC; //segment:ovl_i1 +D_i1_8019FAF0 = 0x8019FAF0; //segment:ovl_i1 + +func_i2_8018B020 = 0x8018B020; //segment:ovl_i2 +func_i2_8018B030 = 0x8018B030; //segment:ovl_i2 +func_i2_8018B06C = 0x8018B06C; //segment:ovl_i2 +func_i2_8018B150 = 0x8018B150; //segment:ovl_i2 +func_i2_8018B2C4 = 0x8018B2C4; //segment:ovl_i2 +func_i2_8018B45C = 0x8018B45C; //segment:ovl_i2 +func_i2_8018B608 = 0x8018B608; //segment:ovl_i2 +func_i2_8018B768 = 0x8018B768; //segment:ovl_i2 +func_i2_8018B808 = 0x8018B808; //segment:ovl_i2 +func_i2_8018B898 = 0x8018B898; //segment:ovl_i2 +func_i2_8018B938 = 0x8018B938; //segment:ovl_i2 +func_i2_8018BAF8 = 0x8018BAF8; //segment:ovl_i2 +func_i2_8018BB88 = 0x8018BB88; //segment:ovl_i2 +func_i2_8018BCA8 = 0x8018BCA8; //segment:ovl_i2 +func_i2_8018BD28 = 0x8018BD28; //segment:ovl_i2 +func_i2_8018BD98 = 0x8018BD98; //segment:ovl_i2 +func_i2_8018BE44 = 0x8018BE44; //segment:ovl_i2 +func_i2_8018C2CC = 0x8018C2CC; //segment:ovl_i2 +func_i2_8018C53C = 0x8018C53C; //segment:ovl_i2 +func_i2_8018C67C = 0x8018C67C; //segment:ovl_i2 +func_i2_8018C724 = 0x8018C724; //segment:ovl_i2 +func_i2_8018C7A4 = 0x8018C7A4; //segment:ovl_i2 +func_i2_8018C984 = 0x8018C984; //segment:ovl_i2 +func_i2_8018CA24 = 0x8018CA24; //segment:ovl_i2 +func_i2_8018CAA4 = 0x8018CAA4; //segment:ovl_i2 +func_i2_8018CC0C = 0x8018CC0C; //segment:ovl_i2 +func_i2_8018CDE8 = 0x8018CDE8; //segment:ovl_i2 +func_i2_8018D11C = 0x8018D11C; //segment:ovl_i2 +func_i2_8018D284 = 0x8018D284; //segment:ovl_i2 +func_i2_8018F294 = 0x8018F294; //segment:ovl_i2 +func_i2_8018F59C = 0x8018F59C; //segment:ovl_i2 +func_i2_8019024C = 0x8019024C; //segment:ovl_i2 +func_i2_801903C4 = 0x801903C4; //segment:ovl_i2 +func_i2_801904E0 = 0x801904E0; //segment:ovl_i2 +func_i2_801905A8 = 0x801905A8; //segment:ovl_i2 +func_i2_80190620 = 0x80190620; //segment:ovl_i2 +func_i2_801907C8 = 0x801907C8; //segment:ovl_i2 +func_i2_8019085C = 0x8019085C; //segment:ovl_i2 +func_i2_801914F0 = 0x801914F0; //segment:ovl_i2 +func_i2_80191570 = 0x80191570; //segment:ovl_i2 +func_i2_801915F0 = 0x801915F0; //segment:ovl_i2 +func_i2_80191670 = 0x80191670; //segment:ovl_i2 +func_i2_801916F0 = 0x801916F0; //segment:ovl_i2 +func_i2_801917E8 = 0x801917E8; //segment:ovl_i2 +func_i2_80191918 = 0x80191918; //segment:ovl_i2 +func_i2_80191A0C = 0x80191A0C; //segment:ovl_i2 +func_i2_80191B88 = 0x80191B88; //segment:ovl_i2 +func_i2_80192890 = 0x80192890; //segment:ovl_i2 +func_i2_80192B30 = 0x80192B30; //segment:ovl_i2 +func_i2_80192C20 = 0x80192C20; //segment:ovl_i2 +func_i2_80192CD8 = 0x80192CD8; //segment:ovl_i2 +func_i2_80192E2C = 0x80192E2C; //segment:ovl_i2 +func_i2_8019337C = 0x8019337C; //segment:ovl_i2 +func_i2_801934FC = 0x801934FC; //segment:ovl_i2 +func_i2_801936B4 = 0x801936B4; //segment:ovl_i2 +func_i2_80193930 = 0x80193930; //segment:ovl_i2 +func_i2_80193A18 = 0x80193A18; //segment:ovl_i2 +func_i2_80193A38 = 0x80193A38; //segment:ovl_i2 +func_i2_80193A7C = 0x80193A7C; //segment:ovl_i2 +func_i2_80193AD4 = 0x80193AD4; //segment:ovl_i2 +func_i2_80193B18 = 0x80193B18; //segment:ovl_i2 +func_i2_80193B70 = 0x80193B70; //segment:ovl_i2 +func_i2_801965BC = 0x801965BC; //segment:ovl_i2 +func_i2_80196CD4 = 0x80196CD4; //segment:ovl_i2 +func_i2_80196F00 = 0x80196F00; //segment:ovl_i2 +func_i2_801972CC = 0x801972CC; //segment:ovl_i2 +func_i2_801973A4 = 0x801973A4; //segment:ovl_i2 +func_i2_801974FC = 0x801974FC; //segment:ovl_i2 +func_i2_80197FA0 = 0x80197FA0; //segment:ovl_i2 +func_i2_801981F4 = 0x801981F4; //segment:ovl_i2 +D_i2_80198EC0 = 0x80198EC0; //segment:ovl_i2 +D_i2_80198ED0 = 0x80198ED0; //segment:ovl_i2 +D_i2_80198FC0 = 0x80198FC0; //segment:ovl_i2 +D_i2_80198FD4 = 0x80198FD4; //segment:ovl_i2 +D_i2_80198FF4 = 0x80198FF4; //segment:ovl_i2 +D_i2_80199024 = 0x80199024; //segment:ovl_i2 +D_i2_80199034 = 0x80199034; //segment:ovl_i2 +D_i2_80199044 = 0x80199044; //segment:ovl_i2 +D_i2_80199054 = 0x80199054; //segment:ovl_i2 +D_i2_80199064 = 0x80199064; //segment:ovl_i2 +D_i2_80199070 = 0x80199070; //segment:ovl_i2 +D_i2_801990A0 = 0x801990A0; //segment:ovl_i2 +D_i2_801990AC = 0x801990AC; //segment:ovl_i2 +D_i2_801990B0 = 0x801990B0; //segment:ovl_i2 +D_i2_801990E0 = 0x801990E0; //segment:ovl_i2 +D_i2_801990E4 = 0x801990E4; //segment:ovl_i2 +D_i2_801990F0 = 0x801990F0; //segment:ovl_i2 +D_i2_801990FC = 0x801990FC; //segment:ovl_i2 +D_i2_80199108 = 0x80199108; //segment:ovl_i2 +D_i2_8019910C = 0x8019910C; //segment:ovl_i2 +D_i2_80199110 = 0x80199110; //segment:ovl_i2 +D_i2_80199114 = 0x80199114; //segment:ovl_i2 +D_i2_80199120 = 0x80199120; //segment:ovl_i2 +D_i2_8019912C = 0x8019912C; //segment:ovl_i2 +D_i2_80199138 = 0x80199138; //segment:ovl_i2 +D_i2_80199144 = 0x80199144; //segment:ovl_i2 +D_i2_80199150 = 0x80199150; //segment:ovl_i2 +D_i2_8019918C = 0x8019918C; //segment:ovl_i2 +D_i2_801991B0 = 0x801991B0; //segment:ovl_i2 +D_i2_801991C0 = 0x801991C0; //segment:ovl_i2 +D_i2_801991D0 = 0x801991D0; //segment:ovl_i2 +D_i2_801991E0 = 0x801991E0; //segment:ovl_i2 +D_i2_801991F0 = 0x801991F0; //segment:ovl_i2 +D_i2_80199200 = 0x80199200; //segment:ovl_i2 +D_i2_80199210 = 0x80199210; //segment:ovl_i2 +D_i2_8019921C = 0x8019921C; //segment:ovl_i2 +D_80199810 = 0x80199810; //segment:ovl_i2 +D_i2_80199820 = 0x80199820; //segment:ovl_i2 +D_i2_80199830 = 0x80199830; //segment:ovl_i2 + +func_i3_8018B020 = 0x8018B020; //segment:ovl_i3 +func_i3_8018B030 = 0x8018B030; //segment:ovl_i3 +func_i3_8018B0E4 = 0x8018B0E4; //segment:ovl_i3 +func_i3_8018B17C = 0x8018B17C; //segment:ovl_i3 +func_i3_8018B204 = 0x8018B204; //segment:ovl_i3 +func_i3_8018B254 = 0x8018B254; //segment:ovl_i3 +func_i3_8018B444 = 0x8018B444; //segment:ovl_i3 +func_i3_8018DC94 = 0x8018DC94; //segment:ovl_i3 +func_i3_8018DDA8 = 0x8018DDA8; //segment:ovl_i3 +func_i3_8018DF48 = 0x8018DF48; //segment:ovl_i3 +func_i3_8018F4A0 = 0x8018F4A0; //segment:ovl_i3 +func_i3_8018F7B8 = 0x8018F7B8; //segment:ovl_i3 +func_i3_8018FBB4 = 0x8018FBB4; //segment:ovl_i3 +func_i3_80190030 = 0x80190030; //segment:ovl_i3 +func_i3_80190EA8 = 0x80190EA8; //segment:ovl_i3 +func_i3_80190FBC = 0x80190FBC; //segment:ovl_i3 +func_i3_801910A4 = 0x801910A4; //segment:ovl_i3 +func_i3_80191170 = 0x80191170; //segment:ovl_i3 +func_i3_801912E0 = 0x801912E0; //segment:ovl_i3 +func_i3_801913FC = 0x801913FC; //segment:ovl_i3 +func_i3_80191534 = 0x80191534; //segment:ovl_i3 +func_i3_80191A50 = 0x80191A50; //segment:ovl_i3 +func_i3_8019255C = 0x8019255C; //segment:ovl_i3 +func_i3_80192610 = 0x80192610; //segment:ovl_i3 +func_i3_8019270C = 0x8019270C; //segment:ovl_i3 +func_i3_8019284C = 0x8019284C; //segment:ovl_i3 +func_i3_80193A20 = 0x80193A20; //segment:ovl_i3 +func_i3_80193AF8 = 0x80193AF8; //segment:ovl_i3 +func_i3_80193BCC = 0x80193BCC; //segment:ovl_i3 +func_i3_80193C6C = 0x80193C6C; //segment:ovl_i3 +func_i3_80193CD4 = 0x80193CD4; //segment:ovl_i3 +func_i3_80193F00 = 0x80193F00; //segment:ovl_i3 +func_i3_80193F9C = 0x80193F9C; //segment:ovl_i3 +func_i3_80194260 = 0x80194260; //segment:ovl_i3 +func_i3_801944D0 = 0x801944D0; //segment:ovl_i3 +func_i3_8019461C = 0x8019461C; //segment:ovl_i3 +func_i3_801947DC = 0x801947DC; //segment:ovl_i3 +func_i3_801949D8 = 0x801949D8; //segment:ovl_i3 +func_i3_801949F8 = 0x801949F8; //segment:ovl_i3 +func_i3_80194AE0 = 0x80194AE0; //segment:ovl_i3 +func_i3_80194F94 = 0x80194F94; //segment:ovl_i3 +func_i3_80195074 = 0x80195074; //segment:ovl_i3 +func_i3_80195150 = 0x80195150; //segment:ovl_i3 +func_i3_8019561C = 0x8019561C; //segment:ovl_i3 +func_i3_80195688 = 0x80195688; //segment:ovl_i3 +func_i3_80195694 = 0x80195694; //segment:ovl_i3 +func_i3_80195880 = 0x80195880; //segment:ovl_i3 +func_i3_80195964 = 0x80195964; //segment:ovl_i3 +func_i3_80195ACC = 0x80195ACC; //segment:ovl_i3 +func_i3_80195B64 = 0x80195B64; //segment:ovl_i3 +func_i3_801961C4 = 0x801961C4; //segment:ovl_i3 +func_i3_80196304 = 0x80196304; //segment:ovl_i3 +func_i3_801966E8 = 0x801966E8; //segment:ovl_i3 +func_i3_80196754 = 0x80196754; //segment:ovl_i3 +func_i3_80196934 = 0x80196934; //segment:ovl_i3 +func_i3_80196D10 = 0x80196D10; //segment:ovl_i3 +func_i3_80196D7C = 0x80196D7C; //segment:ovl_i3 +func_i3_801970F8 = 0x801970F8; //segment:ovl_i3 +func_i3_801972A8 = 0x801972A8; //segment:ovl_i3 +func_i3_801973D8 = 0x801973D8; //segment:ovl_i3 +func_i3_80197440 = 0x80197440; //segment:ovl_i3 +func_i3_80197568 = 0x80197568; //segment:ovl_i3 +func_i3_801975D8 = 0x801975D8; //segment:ovl_i3 +func_i3_8019772C = 0x8019772C; //segment:ovl_i3 +func_i3_80197798 = 0x80197798; //segment:ovl_i3 +func_i3_801977D8 = 0x801977D8; //segment:ovl_i3 +func_i3_80197E64 = 0x80197E64; //segment:ovl_i3 +func_i3_801984AC = 0x801984AC; //segment:ovl_i3 +func_i3_80198554 = 0x80198554; //segment:ovl_i3 +func_i3_8019C194 = 0x8019C194; //segment:ovl_i3 +func_i3_8019C494 = 0x8019C494; //segment:ovl_i3 +func_i3_8019C680 = 0x8019C680; //segment:ovl_i3 +func_i3_8019C964 = 0x8019C964; //segment:ovl_i3 +func_i3_8019C9D4 = 0x8019C9D4; //segment:ovl_i3 +func_i3_8019CB14 = 0x8019CB14; //segment:ovl_i3 +func_i3_8019CBDC = 0x8019CBDC; //segment:ovl_i3 +func_i3_8019CC60 = 0x8019CC60; //segment:ovl_i3 +func_i3_8019CE24 = 0x8019CE24; //segment:ovl_i3 +func_i3_8019CF00 = 0x8019CF00; //segment:ovl_i3 +func_i3_8019D0BC = 0x8019D0BC; //segment:ovl_i3 +func_i3_8019D12C = 0x8019D12C; //segment:ovl_i3 +func_i3_8019D2CC = 0x8019D2CC; //segment:ovl_i3 +func_i3_8019D370 = 0x8019D370; //segment:ovl_i3 +func_i3_8019D45C = 0x8019D45C; //segment:ovl_i3 +func_i3_8019D4B8 = 0x8019D4B8; //segment:ovl_i3 +func_i3_8019D8B4 = 0x8019D8B4; //segment:ovl_i3 +func_i3_8019D92C = 0x8019D92C; //segment:ovl_i3 +func_i3_8019D9A0 = 0x8019D9A0; //segment:ovl_i3 +func_i3_8019DC8C = 0x8019DC8C; //segment:ovl_i3 +func_i3_8019DF70 = 0x8019DF70; //segment:ovl_i3 +func_i3_8019E064 = 0x8019E064; //segment:ovl_i3 +func_i3_8019E75C = 0x8019E75C; //segment:ovl_i3 +func_i3_8019EC80 = 0x8019EC80; //segment:ovl_i3 +func_i3_8019EFD8 = 0x8019EFD8; //segment:ovl_i3 +func_i3_8019F26C = 0x8019F26C; //segment:ovl_i3 +func_i3_8019F2A0 = 0x8019F2A0; //segment:ovl_i3 +func_i3_8019F2E4 = 0x8019F2E4; //segment:ovl_i3 +func_i3_8019F708 = 0x8019F708; //segment:ovl_i3 +func_i3_8019F870 = 0x8019F870; //segment:ovl_i3 +func_i3_8019F8D8 = 0x8019F8D8; //segment:ovl_i3 +func_i3_8019FC5C = 0x8019FC5C; //segment:ovl_i3 +func_i3_8019FC90 = 0x8019FC90; //segment:ovl_i3 +func_i3_8019FEE4 = 0x8019FEE4; //segment:ovl_i3 +func_i3_801A02CC = 0x801A02CC; //segment:ovl_i3 +func_i3_801A067C = 0x801A067C; //segment:ovl_i3 +func_i3_801A08E8 = 0x801A08E8; //segment:ovl_i3 +func_i3_801A0AF0 = 0x801A0AF0; //segment:ovl_i3 +func_i3_801A0BEC = 0x801A0BEC; //segment:ovl_i3 +func_i3_801A0DD0 = 0x801A0DD0; //segment:ovl_i3 +func_i3_801A0E54 = 0x801A0E54; //segment:ovl_i3 +func_i3_801A0EB8 = 0x801A0EB8; //segment:ovl_i3 +func_i3_801A1204 = 0x801A1204; //segment:ovl_i3 +func_i3_801A2070 = 0x801A2070; //segment:ovl_i3 +func_i3_801A2270 = 0x801A2270; //segment:ovl_i3 +func_i3_801A2338 = 0x801A2338; //segment:ovl_i3 +func_i3_801A23A0 = 0x801A23A0; //segment:ovl_i3 +func_i3_801A2474 = 0x801A2474; //segment:ovl_i3 +func_i3_801A24FC = 0x801A24FC; //segment:ovl_i3 +func_i3_801A29B0 = 0x801A29B0; //segment:ovl_i3 +func_i3_801A2AB8 = 0x801A2AB8; //segment:ovl_i3 +func_i3_801A2B30 = 0x801A2B30; //segment:ovl_i3 +func_i3_801A2C14 = 0x801A2C14; //segment:ovl_i3 +func_i3_801A2C8C = 0x801A2C8C; //segment:ovl_i3 +func_i3_801A322C = 0x801A322C; //segment:ovl_i3 +func_i3_801A341C = 0x801A341C; //segment:ovl_i3 +func_i3_801A3524 = 0x801A3524; //segment:ovl_i3 +func_i3_801A3860 = 0x801A3860; //segment:ovl_i3 +func_i3_801A3968 = 0x801A3968; //segment:ovl_i3 +func_i3_801A39C4 = 0x801A39C4; //segment:ovl_i3 +func_i3_801A3A40 = 0x801A3A40; //segment:ovl_i3 +func_i3_801A3ABC = 0x801A3ABC; //segment:ovl_i3 +func_i3_801A3BA0 = 0x801A3BA0; //segment:ovl_i3 +func_i3_801A4570 = 0x801A4570; //segment:ovl_i3 +func_i3_801A476C = 0x801A476C; //segment:ovl_i3 +func_i3_801A4810 = 0x801A4810; //segment:ovl_i3 +func_i3_801A4878 = 0x801A4878; //segment:ovl_i3 +func_i3_801A4A54 = 0x801A4A54; //segment:ovl_i3 +func_i3_801A4B74 = 0x801A4B74; //segment:ovl_i3 +func_i3_801A5794 = 0x801A5794; //segment:ovl_i3 +func_i3_801A58D0 = 0x801A58D0; //segment:ovl_i3 +func_i3_801A596C = 0x801A596C; //segment:ovl_i3 +func_i3_801A5A3C = 0x801A5A3C; //segment:ovl_i3 +func_i3_801A5E54 = 0x801A5E54; //segment:ovl_i3 +func_i3_801A5EAC = 0x801A5EAC; //segment:ovl_i3 +func_i3_801A66F4 = 0x801A66F4; //segment:ovl_i3 +func_i3_801A6750 = 0x801A6750; //segment:ovl_i3 +func_i3_801A6B84 = 0x801A6B84; //segment:ovl_i3 +func_i3_801A6BE0 = 0x801A6BE0; //segment:ovl_i3 +func_i3_801A6F14 = 0x801A6F14; //segment:ovl_i3 +func_i3_801A6FBC = 0x801A6FBC; //segment:ovl_i3 +func_i3_801A76F8 = 0x801A76F8; //segment:ovl_i3 +func_i3_801A7CBC = 0x801A7CBC; //segment:ovl_i3 +func_i3_801A8360 = 0x801A8360; //segment:ovl_i3 +func_i3_801A84D8 = 0x801A84D8; //segment:ovl_i3 +func_i3_801A8964 = 0x801A8964; //segment:ovl_i3 +func_i3_801A899C = 0x801A899C; //segment:ovl_i3 +func_i3_801A915C = 0x801A915C; //segment:ovl_i3 +func_i3_801A95E0 = 0x801A95E0; //segment:ovl_i3 +func_i3_801AA340 = 0x801AA340; //segment:ovl_i3 +func_i3_801AA674 = 0x801AA674; //segment:ovl_i3 +func_i3_801AAC50 = 0x801AAC50; //segment:ovl_i3 +func_i3_801AB1E8 = 0x801AB1E8; //segment:ovl_i3 +func_i3_801AB3C8 = 0x801AB3C8; //segment:ovl_i3 +func_i3_801AC670 = 0x801AC670; //segment:ovl_i3 +func_i3_801AC840 = 0x801AC840; //segment:ovl_i3 +func_i3_801AC8B0 = 0x801AC8B0; //segment:ovl_i3 +func_i3_801ACD6C = 0x801ACD6C; //segment:ovl_i3 +func_i3_801ACDF4 = 0x801ACDF4; //segment:ovl_i3 +func_i3_801ACEC8 = 0x801ACEC8; //segment:ovl_i3 +func_i3_801ACF6C = 0x801ACF6C; //segment:ovl_i3 +func_i3_801AD00C = 0x801AD00C; //segment:ovl_i3 +func_i3_801AD048 = 0x801AD048; //segment:ovl_i3 +func_i3_801AD15C = 0x801AD15C; //segment:ovl_i3 +func_i3_801AD1A8 = 0x801AD1A8; //segment:ovl_i3 +func_i3_801AD2A4 = 0x801AD2A4; //segment:ovl_i3 +func_i3_801AD454 = 0x801AD454; //segment:ovl_i3 +func_i3_801AD718 = 0x801AD718; //segment:ovl_i3 +func_i3_801AD864 = 0x801AD864; //segment:ovl_i3 +func_i3_801AD950 = 0x801AD950; //segment:ovl_i3 +func_i3_801ADC8C = 0x801ADC8C; //segment:ovl_i3 +func_i3_801ADF3C = 0x801ADF3C; //segment:ovl_i3 +func_i3_801AE368 = 0x801AE368; //segment:ovl_i3 +func_i3_801AE778 = 0x801AE778; //segment:ovl_i3 +func_i3_801AF430 = 0x801AF430; //segment:ovl_i3 +func_i3_801AF4C0 = 0x801AF4C0; //segment:ovl_i3 +func_i3_801AFB1C = 0x801AFB1C; //segment:ovl_i3 +func_i3_801AFC0C = 0x801AFC0C; //segment:ovl_i3 +func_i3_801AFCF4 = 0x801AFCF4; //segment:ovl_i3 +func_i3_801B0248 = 0x801B0248; //segment:ovl_i3 +func_i3_801B0328 = 0x801B0328; //segment:ovl_i3 +func_i3_801B0398 = 0x801B0398; //segment:ovl_i3 +func_i3_801B0634 = 0x801B0634; //segment:ovl_i3 +func_i3_801B08D0 = 0x801B08D0; //segment:ovl_i3 +func_i3_801B0DA8 = 0x801B0DA8; //segment:ovl_i3 +func_i3_801B1018 = 0x801B1018; //segment:ovl_i3 +func_i3_801B1108 = 0x801B1108; //segment:ovl_i3 +func_i3_801B1140 = 0x801B1140; //segment:ovl_i3 +func_i3_801B19FC = 0x801B19FC; //segment:ovl_i3 +func_i3_801B1BE8 = 0x801B1BE8; //segment:ovl_i3 +func_i3_801B1E2C = 0x801B1E2C; //segment:ovl_i3 +func_i3_801B1E58 = 0x801B1E58; //segment:ovl_i3 +func_i3_801B25BC = 0x801B25BC; //segment:ovl_i3 +func_i3_801B3474 = 0x801B3474; //segment:ovl_i3 +func_i3_801B34D4 = 0x801B34D4; //segment:ovl_i3 +func_i3_801B4414 = 0x801B4414; //segment:ovl_i3 +func_i3_801B45D8 = 0x801B45D8; //segment:ovl_i3 +func_i3_801B4938 = 0x801B4938; //segment:ovl_i3 +func_i3_801B4A00 = 0x801B4A00; //segment:ovl_i3 +func_i3_801B4A44 = 0x801B4A44; //segment:ovl_i3 +func_i3_801B4A80 = 0x801B4A80; //segment:ovl_i3 +func_i3_801B4B6C = 0x801B4B6C; //segment:ovl_i3 +func_i3_801B4DC0 = 0x801B4DC0; //segment:ovl_i3 +func_i3_801B7D0C = 0x801B7D0C; //segment:ovl_i3 +func_i3_801B843C = 0x801B843C; //segment:ovl_i3 +func_i3_801B87E4 = 0x801B87E4; //segment:ovl_i3 +func_i3_801B883C = 0x801B883C; //segment:ovl_i3 +func_i3_801B88F4 = 0x801B88F4; //segment:ovl_i3 +func_i3_801B8AAC = 0x801B8AAC; //segment:ovl_i3 +func_i3_801B8B48 = 0x801B8B48; //segment:ovl_i3 +func_i3_801B9678 = 0x801B9678; //segment:ovl_i3 +func_i3_801B99C8 = 0x801B99C8; //segment:ovl_i3 +func_i3_801B9BFC = 0x801B9BFC; //segment:ovl_i3 +func_i3_801B9DA4 = 0x801B9DA4; //segment:ovl_i3 +func_i3_801B9DEC = 0x801B9DEC; //segment:ovl_i3 +func_i3_801BA8B4 = 0x801BA8B4; //segment:ovl_i3 +func_i3_801BAA58 = 0x801BAA58; //segment:ovl_i3 +func_i3_801BB14C = 0x801BB14C; //segment:ovl_i3 +func_i3_801BB1B4 = 0x801BB1B4; //segment:ovl_i3 +func_i3_801BB484 = 0x801BB484; //segment:ovl_i3 +func_i3_801BB550 = 0x801BB550; //segment:ovl_i3 +func_i3_801BB6D8 = 0x801BB6D8; //segment:ovl_i3 +func_i3_801BC6B0 = 0x801BC6B0; //segment:ovl_i3 +func_i3_801BC7DC = 0x801BC7DC; //segment:ovl_i3 +func_i3_801BCB3C = 0x801BCB3C; //segment:ovl_i3 +func_i3_801BCC04 = 0x801BCC04; //segment:ovl_i3 +func_i3_801BD810 = 0x801BD810; //segment:ovl_i3 +func_i3_801BDB68 = 0x801BDB68; //segment:ovl_i3 +func_i3_801BDCCC = 0x801BDCCC; //segment:ovl_i3 +func_i3_801BDF44 = 0x801BDF44; //segment:ovl_i3 +func_i3_801BDFDC = 0x801BDFDC; //segment:ovl_i3 +func_i3_801BE104 = 0x801BE104; //segment:ovl_i3 +func_i3_801BE7DC = 0x801BE7DC; //segment:ovl_i3 +func_i3_801BE858 = 0x801BE858; //segment:ovl_i3 +func_i3_801BEB24 = 0x801BEB24; //segment:ovl_i3 +func_i3_801BEC64 = 0x801BEC64; //segment:ovl_i3 +func_i3_801BECCC = 0x801BECCC; //segment:ovl_i3 +func_i3_801BF1FC = 0x801BF1FC; //segment:ovl_i3 +func_i3_801BFF90 = 0x801BFF90; //segment:ovl_i3 +func_i3_801C037C = 0x801C037C; //segment:ovl_i3 +func_i3_801C0390 = 0x801C0390; //segment:ovl_i3 +func_i3_801C0400 = 0x801C0400; //segment:ovl_i3 +func_i3_801C0BDC = 0x801C0BDC; //segment:ovl_i3 +func_i3_801C0CC4 = 0x801C0CC4; //segment:ovl_i3 +func_i3_801C0E10 = 0x801C0E10; //segment:ovl_i3 +func_i3_801C0FAC = 0x801C0FAC; //segment:ovl_i3 +func_i3_801C185C = 0x801C185C; //segment:ovl_i3 +func_i3_801C18CC = 0x801C18CC; //segment:ovl_i3 +func_i3_801C1974 = 0x801C1974; //segment:ovl_i3 +func_i3_801C1A94 = 0x801C1A94; //segment:ovl_i3 +func_i3_801C1B50 = 0x801C1B50; //segment:ovl_i3 +func_i3_801C1C5C = 0x801C1C5C; //segment:ovl_i3 +func_i3_801C1CD4 = 0x801C1CD4; //segment:ovl_i3 +func_i3_801C1E58 = 0x801C1E58; //segment:ovl_i3 +func_i3_801C257C = 0x801C257C; //segment:ovl_i3 +func_i3_801C26B0 = 0x801C26B0; //segment:ovl_i3 +func_i3_801C26BC = 0x801C26BC; //segment:ovl_i3 +func_i3_801C26C8 = 0x801C26C8; //segment:ovl_i3 +func_i3_801C26D4 = 0x801C26D4; //segment:ovl_i3 +func_i3_801C26E0 = 0x801C26E0; //segment:ovl_i3 +func_i3_801C26EC = 0x801C26EC; //segment:ovl_i3 +D_i3_801C2700 = 0x801C2700; //segment:ovl_i3 +D_i3_801C2710 = 0x801C2710; //segment:ovl_i3 +D_i3_801C2740 = 0x801C2740; //segment:ovl_i3 +D_i3_801C274C = 0x801C274C; //segment:ovl_i3 +D_i3_801C2758 = 0x801C2758; //segment:ovl_i3 +D_i3_801C2764 = 0x801C2764; //segment:ovl_i3 +D_i3_801C2770 = 0x801C2770; //segment:ovl_i3 +D_i3_801C277C = 0x801C277C; //segment:ovl_i3 +D_i3_801C2788 = 0x801C2788; //segment:ovl_i3 +D_i3_801C2794 = 0x801C2794; //segment:ovl_i3 +D_i3_801C27D0 = 0x801C27D0; //segment:ovl_i3 +D_i3_801C27D4 = 0x801C27D4; //segment:ovl_i3 +D_i3_801C2860 = 0x801C2860; //segment:ovl_i3 +D_i3_801C2864 = 0x801C2864; //segment:ovl_i3 +D_i3_801C28F0 = 0x801C28F0; //segment:ovl_i3 +D_i3_801C2920 = 0x801C2920; //segment:ovl_i3 +D_i3_801C2950 = 0x801C2950; //segment:ovl_i3 +D_i3_801C2954 = 0x801C2954; //segment:ovl_i3 +D_i3_801C29E0 = 0x801C29E0; //segment:ovl_i3 +D_i3_801C29E4 = 0x801C29E4; //segment:ovl_i3 +D_i3_801C2A70 = 0x801C2A70; //segment:ovl_i3 +D_i3_801C2AA0 = 0x801C2AA0; //segment:ovl_i3 +D_i3_801C2AD0 = 0x801C2AD0; //segment:ovl_i3 +D_i3_801C2AD4 = 0x801C2AD4; //segment:ovl_i3 +D_i3_801C2B60 = 0x801C2B60; //segment:ovl_i3 +D_i3_801C2B64 = 0x801C2B64; //segment:ovl_i3 +D_i3_801C2BF0 = 0x801C2BF0; //segment:ovl_i3 +D_i3_801C2BF4 = 0x801C2BF4; //segment:ovl_i3 +D_i3_801C2C20 = 0x801C2C20; //segment:ovl_i3 +D_i3_801C2C50 = 0x801C2C50; //segment:ovl_i3 +D_i3_801C2C80 = 0x801C2C80; //segment:ovl_i3 +D_i3_801C2CB0 = 0x801C2CB0; //segment:ovl_i3 +D_i3_801C2CC4 = 0x801C2CC4; //segment:ovl_i3 +D_i3_801C2CE0 = 0x801C2CE0; //segment:ovl_i3 +D_i3_801C2D10 = 0x801C2D10; //segment:ovl_i3 +D_i3_801C2D40 = 0x801C2D40; //segment:ovl_i3 +D_i3_801C2D70 = 0x801C2D70; //segment:ovl_i3 +D_i3_801C2D7C = 0x801C2D7C; //segment:ovl_i3 +D_i3_801C2D88 = 0x801C2D88; //segment:ovl_i3 +D_i3_801C2D94 = 0x801C2D94; //segment:ovl_i3 +D_i3_801C2DC4 = 0x801C2DC4; //segment:ovl_i3 +D_i3_801C2DF4 = 0x801C2DF4; //segment:ovl_i3 +D_i3_801C2E24 = 0x801C2E24; //segment:ovl_i3 +D_i3_801C2E54 = 0x801C2E54; //segment:ovl_i3 +D_i3_801C2E84 = 0x801C2E84; //segment:ovl_i3 +D_i3_801C2EB4 = 0x801C2EB4; //segment:ovl_i3 +D_i3_801C2EF4 = 0x801C2EF4; //segment:ovl_i3 +D_i3_801C2F24 = 0x801C2F24; //segment:ovl_i3 +D_i3_801C2F30 = 0x801C2F30; //segment:ovl_i3 +D_i3_801C2F3C = 0x801C2F3C; //segment:ovl_i3 +D_i3_801C2F78 = 0x801C2F78; //segment:ovl_i3 +D_i3_801C2F9C = 0x801C2F9C; //segment:ovl_i3 +D_i3_801C2FC0 = 0x801C2FC0; //segment:ovl_i3 +D_i3_801C2FCC = 0x801C2FCC; //segment:ovl_i3 +D_i3_801C2FF4 = 0x801C2FF4; //segment:ovl_i3 +D_i3_801C3008 = 0x801C3008; //segment:ovl_i3 +D_i3_801C3014 = 0x801C3014; //segment:ovl_i3 +D_i3_801C3020 = 0x801C3020; //segment:ovl_i3 +D_i3_801C302C = 0x801C302C; //segment:ovl_i3 +D_i3_801C3038 = 0x801C3038; //segment:ovl_i3 +D_i3_801C3044 = 0x801C3044; //segment:ovl_i3 +D_i3_801C3050 = 0x801C3050; //segment:ovl_i3 +D_i3_801C3068 = 0x801C3068; //segment:ovl_i3 +D_i3_801C3080 = 0x801C3080; //segment:ovl_i3 +D_i3_801C308C = 0x801C308C; //segment:ovl_i3 +D_i3_801C3098 = 0x801C3098; //segment:ovl_i3 +D_i3_801C30A4 = 0x801C30A4; //segment:ovl_i3 +D_i3_801C30B0 = 0x801C30B0; //segment:ovl_i3 +D_i3_801C30BC = 0x801C30BC; //segment:ovl_i3 +D_i3_801C30C8 = 0x801C30C8; //segment:ovl_i3 +D_i3_801C30D4 = 0x801C30D4; //segment:ovl_i3 +D_i3_801C30E0 = 0x801C30E0; //segment:ovl_i3 +D_i3_801C30EC = 0x801C30EC; //segment:ovl_i3 +D_i3_801C30F8 = 0x801C30F8; //segment:ovl_i3 +D_i3_801C3104 = 0x801C3104; //segment:ovl_i3 +D_i3_801C3110 = 0x801C3110; //segment:ovl_i3 +D_i3_801C311C = 0x801C311C; //segment:ovl_i3 +D_i3_801C3124 = 0x801C3124; //segment:ovl_i3 +D_i3_801C312C = 0x801C312C; //segment:ovl_i3 +D_i3_801C3134 = 0x801C3134; //segment:ovl_i3 +D_i3_801C313C = 0x801C313C; //segment:ovl_i3 +D_i3_801C3148 = 0x801C3148; //segment:ovl_i3 +D_i3_801C3154 = 0x801C3154; //segment:ovl_i3 +D_i3_801C3160 = 0x801C3160; //segment:ovl_i3 +D_i3_801C316C = 0x801C316C; //segment:ovl_i3 +D_i3_801C3178 = 0x801C3178; //segment:ovl_i3 +D_i3_801C3184 = 0x801C3184; //segment:ovl_i3 +D_i3_801C3190 = 0x801C3190; //segment:ovl_i3 +D_i3_801C319C = 0x801C319C; //segment:ovl_i3 +D_i3_801C31A4 = 0x801C31A4; //segment:ovl_i3 +D_i3_801C31C8 = 0x801C31C8; //segment:ovl_i3 +D_i3_801C31EC = 0x801C31EC; //segment:ovl_i3 +D_i3_801C3264 = 0x801C3264; //segment:ovl_i3 +D_i3_801C3284 = 0x801C3284; //segment:ovl_i3 +D_i3_801C32AC = 0x801C32AC; //segment:ovl_i3 +D_i3_801C32F4 = 0x801C32F4; //segment:ovl_i3 +D_i3_801C3300 = 0x801C3300; //segment:ovl_i3 +D_i3_801C330C = 0x801C330C; //segment:ovl_i3 +D_i3_801C3318 = 0x801C3318; //segment:ovl_i3 +D_i3_801C3324 = 0x801C3324; //segment:ovl_i3 +D_i3_801C3328 = 0x801C3328; //segment:ovl_i3 +D_i3_801C332C = 0x801C332C; //segment:ovl_i3 +D_i3_801C3340 = 0x801C3340; //segment:ovl_i3 +D_i3_801C3350 = 0x801C3350; //segment:ovl_i3 +D_i3_801C3380 = 0x801C3380; //segment:ovl_i3 +D_i3_801C338C = 0x801C338C; //segment:ovl_i3 +D_i3_801C33A4 = 0x801C33A4; //segment:ovl_i3 +D_i3_801C33BC = 0x801C33BC; //segment:ovl_i3 +D_i3_801C33E0 = 0x801C33E0; //segment:ovl_i3 +D_i3_801C3404 = 0x801C3404; //segment:ovl_i3 +D_i3_801C3410 = 0x801C3410; //segment:ovl_i3 +D_i3_801C341C = 0x801C341C; //segment:ovl_i3 +D_i3_801C3428 = 0x801C3428; //segment:ovl_i3 +D_i3_801C3434 = 0x801C3434; //segment:ovl_i3 +D_i3_801C3440 = 0x801C3440; //segment:ovl_i3 +D_i3_801C344C = 0x801C344C; //segment:ovl_i3 +D_i3_801C3458 = 0x801C3458; //segment:ovl_i3 +D_i3_801C3464 = 0x801C3464; //segment:ovl_i3 +D_i3_801C3470 = 0x801C3470; //segment:ovl_i3 +D_i3_801C347C = 0x801C347C; //segment:ovl_i3 +D_i3_801C3488 = 0x801C3488; //segment:ovl_i3 +D_i3_801C3494 = 0x801C3494; //segment:ovl_i3 +D_i3_801C34A0 = 0x801C34A0; //segment:ovl_i3 +D_i3_801C350C = 0x801C350C; //segment:ovl_i3 +D_i3_801C3530 = 0x801C3530; //segment:ovl_i3 +D_i3_801C3590 = 0x801C3590; //segment:ovl_i3 +D_i3_801C35C0 = 0x801C35C0; //segment:ovl_i3 +D_i3_801C35C4 = 0x801C35C4; //segment:ovl_i3 +D_i3_801C35F0 = 0x801C35F0; //segment:ovl_i3 +D_i3_801C35FC = 0x801C35FC; //segment:ovl_i3 +D_i3_801C3608 = 0x801C3608; //segment:ovl_i3 +D_i3_801C3610 = 0x801C3610; //segment:ovl_i3 +D_i3_801C361C = 0x801C361C; //segment:ovl_i3 +D_i3_801C3628 = 0x801C3628; //segment:ovl_i3 +D_i3_801C3634 = 0x801C3634; //segment:ovl_i3 +D_i3_801C3640 = 0x801C3640; //segment:ovl_i3 +D_i3_801C3670 = 0x801C3670; //segment:ovl_i3 +D_i3_801C36A0 = 0x801C36A0; //segment:ovl_i3 +D_i3_801C36D0 = 0x801C36D0; //segment:ovl_i3 +D_i3_801C36DC = 0x801C36DC; //segment:ovl_i3 +D_i3_801C36E8 = 0x801C36E8; //segment:ovl_i3 +D_i3_801C36F4 = 0x801C36F4; //segment:ovl_i3 +D_i3_801C3814 = 0x801C3814; //segment:ovl_i3 +D_i3_801C3878 = 0x801C3878; //segment:ovl_i3 +D_i3_801C3998 = 0x801C3998; //segment:ovl_i3 +D_i3_801C3AB8 = 0x801C3AB8; //segment:ovl_i3 +D_i3_801C3ABC = 0x801C3ABC; //segment:ovl_i3 +D_i3_801C3AC0 = 0x801C3AC0; //segment:ovl_i3 +D_i3_801C3AF8 = 0x801C3AF8; //segment:ovl_i3 +D_i3_801C3B10 = 0x801C3B10; //segment:ovl_i3 +D_i3_801C3B40 = 0x801C3B40; //segment:ovl_i3 +D_i3_801C3B50 = 0x801C3B50; //segment:ovl_i3 +D_i3_801C3B80 = 0x801C3B80; //segment:ovl_i3 +D_i3_801C3BB0 = 0x801C3BB0; //segment:ovl_i3 +D_i3_801C3BF0 = 0x801C3BF0; //segment:ovl_i3 +D_i3_801C3C04 = 0x801C3C04; //segment:ovl_i3 +D_i3_801C3C10 = 0x801C3C10; //segment:ovl_i3 +D_i3_801C3C1C = 0x801C3C1C; //segment:ovl_i3 +D_i3_801C3C28 = 0x801C3C28; //segment:ovl_i3 +D_i3_801C3C34 = 0x801C3C34; //segment:ovl_i3 +D_i3_801C3C40 = 0x801C3C40; //segment:ovl_i3 +D_i3_801C3C4C = 0x801C3C4C; //segment:ovl_i3 +D_i3_801C3C58 = 0x801C3C58; //segment:ovl_i3 +D_i3_801C3C84 = 0x801C3C84; //segment:ovl_i3 +D_i3_801C3CB0 = 0x801C3CB0; //segment:ovl_i3 +D_i3_801C3CBC = 0x801C3CBC; //segment:ovl_i3 +D_i3_801C3D10 = 0x801C3D10; //segment:ovl_i3 +D_i3_801C3D1C = 0x801C3D1C; //segment:ovl_i3 +D_i3_801C3D38 = 0x801C3D38; //segment:ovl_i3 +D_i3_801C3D44 = 0x801C3D44; //segment:ovl_i3 +D_i3_801C3D50 = 0x801C3D50; //segment:ovl_i3 +D_i3_801C3D5C = 0x801C3D5C; //segment:ovl_i3 +D_i3_801C3D68 = 0x801C3D68; //segment:ovl_i3 +D_i3_801C3D74 = 0x801C3D74; //segment:ovl_i3 +D_i3_801C3D80 = 0x801C3D80; //segment:ovl_i3 +D_i3_801C3D8C = 0x801C3D8C; //segment:ovl_i3 +D_i3_801C3D98 = 0x801C3D98; //segment:ovl_i3 +D_i3_801C3DA4 = 0x801C3DA4; //segment:ovl_i3 +D_i3_801C3DD4 = 0x801C3DD4; //segment:ovl_i3 +D_i3_801C3EA0 = 0x801C3EA0; //segment:ovl_i3 +D_i3_801C3F00 = 0x801C3F00; //segment:ovl_i3 +D_i3_801C3F18 = 0x801C3F18; //segment:ovl_i3 +D_i3_801C3F24 = 0x801C3F24; //segment:ovl_i3 +D_i3_801C3F48 = 0x801C3F48; //segment:ovl_i3 +D_i3_801C3F54 = 0x801C3F54; //segment:ovl_i3 +D_i3_801C3F64 = 0x801C3F64; //segment:ovl_i3 +D_i3_801C41BC = 0x801C41BC; //segment:ovl_i3 +D_i3_801C4288 = 0x801C4288; //segment:ovl_i3 +D_i3_801C4354 = 0x801C4354; //segment:ovl_i3 +D_801C5CA0 = 0x801C5CA0; //segment:ovl_i3 +D_i3_801C5CB0 = 0x801C5CB0; //segment:ovl_i3 +D_i3_801C5CB8 = 0x801C5CB8; //segment:ovl_i3 +D_i3_801C5CC4 = 0x801C5CC4; //segment:ovl_i3 +D_i3_801C5CDC = 0x801C5CDC; //segment:ovl_i3 +D_i3_801C5D18 = 0x801C5D18; //segment:ovl_i3 +D_i3_801C5D50 = 0x801C5D50; //segment:ovl_i3 +D_i3_801C5D5C = 0x801C5D5C; //segment:ovl_i3 +D_i3_801C5D68 = 0x801C5D68; //segment:ovl_i3 +D_i3_801C5D74 = 0x801C5D74; //segment:ovl_i3 +D_i3_801C5D78 = 0x801C5D78; //segment:ovl_i3 +D_i3_801C5D7C = 0x801C5D7C; //segment:ovl_i3 +D_i3_801C5D80 = 0x801C5D80; //segment:ovl_i3 +D_i3_801C5D84 = 0x801C5D84; //segment:ovl_i3 +D_i3_801C5D90 = 0x801C5D90; //segment:ovl_i3 +D_i3_801C5D98 = 0x801C5D98; //segment:ovl_i3 +D_i3_801C5DAC = 0x801C5DAC; //segment:ovl_i3 +D_i3_801C5DB8 = 0x801C5DB8; //segment:ovl_i3 +D_i3_801C5DBC = 0x801C5DBC; //segment:ovl_i3 +D_i3_801C5DE4 = 0x801C5DE4; //segment:ovl_i3 +D_i3_801C5DE8 = 0x801C5DE8; //segment:ovl_i3 +D_i3_801C5DEC = 0x801C5DEC; //segment:ovl_i3 +D_i3_801C5DF0 = 0x801C5DF0; //segment:ovl_i3 +D_i3_801C5DF4 = 0x801C5DF4; //segment:ovl_i3 +D_i3_801C5E20 = 0x801C5E20; //segment:ovl_i3 +D_i3_801C5E30 = 0x801C5E30; //segment:ovl_i3 +D_i3_801C5E50 = 0x801C5E50; //segment:ovl_i3 +D_i3_801C5E64 = 0x801C5E64; //segment:ovl_i3 +D_i3_801C5E70 = 0x801C5E70; //segment:ovl_i3 +D_i3_801C5E80 = 0x801C5E80; //segment:ovl_i3 +D_i3_801C5EC4 = 0x801C5EC4; //segment:ovl_i3 +D_i3_801C5EF4 = 0x801C5EF4; //segment:ovl_i3 +D_i3_801C5F48 = 0x801C5F48; //segment:ovl_i3 +D_i3_801C5F4C = 0x801C5F4C; //segment:ovl_i3 +D_i3_801C5F54 = 0x801C5F54; //segment:ovl_i3 +D_i3_801C5F58 = 0x801C5F58; //segment:ovl_i3 +D_i3_801C5F5C = 0x801C5F5C; //segment:ovl_i3 +D_i3_801C5F60 = 0x801C5F60; //segment:ovl_i3 +D_i3_801C5F64 = 0x801C5F64; //segment:ovl_i3 +D_i3_801C5F68 = 0x801C5F68; //segment:ovl_i3 +D_i3_801C5F6C = 0x801C5F6C; //segment:ovl_i3 +D_i3_801C5F70 = 0x801C5F70; //segment:ovl_i3 +D_i3_801C5F74 = 0x801C5F74; //segment:ovl_i3 +D_i3_801C5F78 = 0x801C5F78; //segment:ovl_i3 +D_i3_801C5F7C = 0x801C5F7C; //segment:ovl_i3 +D_i3_801C5F80 = 0x801C5F80; //segment:ovl_i3 +D_i3_801C5F84 = 0x801C5F84; //segment:ovl_i3 +D_i3_801C5F88 = 0x801C5F88; //segment:ovl_i3 +D_i3_801C5F94 = 0x801C5F94; //segment:ovl_i3 +D_i3_801C5F9C = 0x801C5F9C; //segment:ovl_i3 +D_i3_801C5FA8 = 0x801C5FA8; //segment:ovl_i3 +D_i3_801C5FB4 = 0x801C5FB4; //segment:ovl_i3 +D_i3_801C5FD4 = 0x801C5FD4; //segment:ovl_i3 +D_i3_801C5FD8 = 0x801C5FD8; //segment:ovl_i3 +D_i3_801C6038 = 0x801C6038; //segment:ovl_i3 +D_i3_801C603C = 0x801C603C; //segment:ovl_i3 +D_i3_801C607C = 0x801C607C; //segment:ovl_i3 +D_i3_801C6084 = 0x801C6084; //segment:ovl_i3 +D_i3_801C6108 = 0x801C6108; //segment:ovl_i3 +D_i3_801C61A0 = 0x801C61A0; //segment:ovl_i3 +D_i3_801C61C8 = 0x801C61C8; //segment:ovl_i3 +D_i3_801C61CC = 0x801C61CC; //segment:ovl_i3 +D_i3_801C61D4 = 0x801C61D4; //segment:ovl_i3 +D_i3_801C61EC = 0x801C61EC; //segment:ovl_i3 +D_i3_801C61FC = 0x801C61FC; //segment:ovl_i3 +D_i3_801C6220 = 0x801C6220; //segment:ovl_i3 +D_i3_801C6228 = 0x801C6228; //segment:ovl_i3 +D_i3_801C74E8 = 0x801C74E8; //segment:ovl_i3 +D_i3_801C7BE8 = 0x801C7BE8; //segment:ovl_i3 +D_i3_801C7BF0 = 0x801C7BF0; //segment:ovl_i3 +D_i3_801C7BFC = 0x801C7BFC; //segment:ovl_i3 +D_i3_801C7C00 = 0x801C7C00; //segment:ovl_i3 +D_i3_801C7C04 = 0x801C7C04; //segment:ovl_i3 +D_i3_801C7C08 = 0x801C7C08; //segment:ovl_i3 +D_i3_801C7C0C = 0x801C7C0C; //segment:ovl_i3 +D_i3_801C7C18 = 0x801C7C18; //segment:ovl_i3 +D_i3_801C7C1C = 0x801C7C1C; //segment:ovl_i3 +D_i3_801C7C20 = 0x801C7C20; //segment:ovl_i3 +D_i3_801C7C24 = 0x801C7C24; //segment:ovl_i3 +D_i3_801C7C28 = 0x801C7C28; //segment:ovl_i3 +D_i3_801C7C2C = 0x801C7C2C; //segment:ovl_i3 +D_i3_801C7C3C = 0x801C7C3C; //segment:ovl_i3 +D_i3_801C7C40 = 0x801C7C40; //segment:ovl_i3 +D_i3_801C7C78 = 0x801C7C78; //segment:ovl_i3 +D_i3_801C7C7C = 0x801C7C7C; //segment:ovl_i3 +D_i3_801C7C80 = 0x801C7C80; //segment:ovl_i3 +D_i3_801C7C84 = 0x801C7C84; //segment:ovl_i3 +D_i3_801C7C88 = 0x801C7C88; //segment:ovl_i3 +D_i3_801C7C90 = 0x801C7C90; //segment:ovl_i3 +D_i3_801C7CAC = 0x801C7CAC; //segment:ovl_i3 +D_i3_801C7CB0 = 0x801C7CB0; //segment:ovl_i3 +D_i3_801C7CB4 = 0x801C7CB4; //segment:ovl_i3 +D_i3_801C7D00 = 0x801C7D00; //segment:ovl_i3 +D_i3_801C7D04 = 0x801C7D04; //segment:ovl_i3 +D_i3_801C7D08 = 0x801C7D08; //segment:ovl_i3 +D_i3_801C7D0C = 0x801C7D0C; //segment:ovl_i3 +D_i3_801C7D10 = 0x801C7D10; //segment:ovl_i3 +D_i3_801C7D14 = 0x801C7D14; //segment:ovl_i3 +D_i3_801C7D18 = 0x801C7D18; //segment:ovl_i3 +D_i3_801C7D1C = 0x801C7D1C; //segment:ovl_i3 +D_i3_801C7D24 = 0x801C7D24; //segment:ovl_i3 +D_i3_801C7D28 = 0x801C7D28; //segment:ovl_i3 +D_i3_801C7D2C = 0x801C7D2C; //segment:ovl_i3 +D_i3_801C7D40 = 0x801C7D40; //segment:ovl_i3 +D_i3_801C7D44 = 0x801C7D44; //segment:ovl_i3 +D_i3_801C7D58 = 0x801C7D58; //segment:ovl_i3 +D_i3_801C7D5C = 0x801C7D5C; //segment:ovl_i3 +D_i3_801C7D64 = 0x801C7D64; //segment:ovl_i3 +D_i3_801C7D68 = 0x801C7D68; //segment:ovl_i3 +D_i3_801C7D6C = 0x801C7D6C; //segment:ovl_i3 +D_i3_801C7D70 = 0x801C7D70; //segment:ovl_i3 +D_i3_801C7D90 = 0x801C7D90; //segment:ovl_i3 +D_i3_801C7D94 = 0x801C7D94; //segment:ovl_i3 +D_i3_801C7D98 = 0x801C7D98; //segment:ovl_i3 +D_i3_801C7D9C = 0x801C7D9C; //segment:ovl_i3 +D_i3_801C7DA0 = 0x801C7DA0; //segment:ovl_i3 +D_i3_801C7DA4 = 0x801C7DA4; //segment:ovl_i3 +D_i3_801C7DA8 = 0x801C7DA8; //segment:ovl_i3 +D_i3_801C7DAC = 0x801C7DAC; //segment:ovl_i3 +D_i3_801C7DB0 = 0x801C7DB0; //segment:ovl_i3 +D_i3_801C7DB4 = 0x801C7DB4; //segment:ovl_i3 +D_i3_801C7E38 = 0x801C7E38; //segment:ovl_i3 +D_i3_801C7E40 = 0x801C7E40; //segment:ovl_i3 +D_i3_801C7E50 = 0x801C7E50; //segment:ovl_i3 +D_i3_801C7E5C = 0x801C7E5C; //segment:ovl_i3 +D_i3_801C7E8C = 0x801C7E8C; //segment:ovl_i3 +D_i3_801C7E90 = 0x801C7E90; //segment:ovl_i3 +D_i3_801C7E94 = 0x801C7E94; //segment:ovl_i3 +D_i3_801C7E98 = 0x801C7E98; //segment:ovl_i3 +D_i3_801C7E9C = 0x801C7E9C; //segment:ovl_i3 +D_i3_801C7EA0 = 0x801C7EA0; //segment:ovl_i3 +D_i3_801C7EA4 = 0x801C7EA4; //segment:ovl_i3 +D_i3_801C7EA8 = 0x801C7EA8; //segment:ovl_i3 +D_i3_801C7EB0 = 0x801C7EB0; //segment:ovl_i3 +D_i3_801C7EB4 = 0x801C7EB4; //segment:ovl_i3 +D_i3_801C7EB8 = 0x801C7EB8; //segment:ovl_i3 +D_i3_801C7EBC = 0x801C7EBC; //segment:ovl_i3 + +func_i4_8018B020 = 0x8018B020; //segment:ovl_i4 +func_i4_8018B0F0 = 0x8018B0F0; //segment:ovl_i4 +func_i4_8018B384 = 0x8018B384; //segment:ovl_i4 +func_i4_8018B460 = 0x8018B460; //segment:ovl_i4 +func_i4_8018C374 = 0x8018C374; //segment:ovl_i4 +func_i4_8018C4FC = 0x8018C4FC; //segment:ovl_i4 +func_i4_8018C584 = 0x8018C584; //segment:ovl_i4 +func_i4_8018C854 = 0x8018C854; //segment:ovl_i4 +func_i4_8018C9BC = 0x8018C9BC; //segment:ovl_i4 +func_i4_8018CA98 = 0x8018CA98; //segment:ovl_i4 +func_i4_8018CB20 = 0x8018CB20; //segment:ovl_i4 +func_i4_8018CBA0 = 0x8018CBA0; //segment:ovl_i4 +func_i4_8018CD30 = 0x8018CD30; //segment:ovl_i4 +func_i4_8018F494 = 0x8018F494; //segment:ovl_i4 +func_i4_8018F7C0 = 0x8018F7C0; //segment:ovl_i4 +func_i4_8018F958 = 0x8018F958; //segment:ovl_i4 +func_i4_8018FBB8 = 0x8018FBB8; //segment:ovl_i4 +func_i4_8019068C = 0x8019068C; //segment:ovl_i4 +func_i4_80190714 = 0x80190714; //segment:ovl_i4 +func_i4_80190888 = 0x80190888; //segment:ovl_i4 +func_i4_80190A34 = 0x80190A34; //segment:ovl_i4 +func_i4_80190B50 = 0x80190B50; //segment:ovl_i4 +func_i4_80190CA4 = 0x80190CA4; //segment:ovl_i4 +func_i4_80190DC0 = 0x80190DC0; //segment:ovl_i4 +func_i4_80190E40 = 0x80190E40; //segment:ovl_i4 +func_i4_80190E80 = 0x80190E80; //segment:ovl_i4 +func_i4_80190F1C = 0x80190F1C; //segment:ovl_i4 +func_i4_80190FB0 = 0x80190FB0; //segment:ovl_i4 +func_i4_8019121C = 0x8019121C; //segment:ovl_i4 +func_i4_801912A0 = 0x801912A0; //segment:ovl_i4 +func_i4_8019138C = 0x8019138C; //segment:ovl_i4 +func_i4_801913F8 = 0x801913F8; //segment:ovl_i4 +func_i4_801918B8 = 0x801918B8; //segment:ovl_i4 +func_i4_80191A88 = 0x80191A88; //segment:ovl_i4 +func_i4_80191E28 = 0x80191E28; //segment:ovl_i4 +func_i4_8019213C = 0x8019213C; //segment:ovl_i4 +func_i4_8019229C = 0x8019229C; //segment:ovl_i4 +func_i4_80192518 = 0x80192518; //segment:ovl_i4 +func_i4_80192648 = 0x80192648; //segment:ovl_i4 +func_i4_801926E0 = 0x801926E0; //segment:ovl_i4 +func_i4_80192770 = 0x80192770; //segment:ovl_i4 +func_i4_80192878 = 0x80192878; //segment:ovl_i4 +func_i4_80192998 = 0x80192998; //segment:ovl_i4 +func_i4_8019326C = 0x8019326C; //segment:ovl_i4 +func_i4_8019337C = 0x8019337C; //segment:ovl_i4 +func_i4_801947C4 = 0x801947C4; //segment:ovl_i4 +func_i4_80194910 = 0x80194910; //segment:ovl_i4 +func_i4_80194984 = 0x80194984; //segment:ovl_i4 +func_i4_80194A14 = 0x80194A14; //segment:ovl_i4 +func_i4_80194A80 = 0x80194A80; //segment:ovl_i4 +func_i4_80194BAC = 0x80194BAC; //segment:ovl_i4 +func_i4_80194D28 = 0x80194D28; //segment:ovl_i4 +func_i4_80195308 = 0x80195308; //segment:ovl_i4 +func_i4_80195490 = 0x80195490; //segment:ovl_i4 +func_i4_80195520 = 0x80195520; //segment:ovl_i4 +func_i4_801955D0 = 0x801955D0; //segment:ovl_i4 +func_i4_801957D0 = 0x801957D0; //segment:ovl_i4 +func_i4_801958F8 = 0x801958F8; //segment:ovl_i4 +func_i4_80195C84 = 0x80195C84; //segment:ovl_i4 +func_i4_80196200 = 0x80196200; //segment:ovl_i4 +func_i4_80196328 = 0x80196328; //segment:ovl_i4 +func_i4_801963A4 = 0x801963A4; //segment:ovl_i4 +func_i4_80196488 = 0x80196488; //segment:ovl_i4 +func_i4_8019656C = 0x8019656C; //segment:ovl_i4 +func_i4_80196628 = 0x80196628; //segment:ovl_i4 +func_i4_801966AC = 0x801966AC; //segment:ovl_i4 +func_i4_80196840 = 0x80196840; //segment:ovl_i4 +func_i4_80197134 = 0x80197134; //segment:ovl_i4 +func_i4_80197538 = 0x80197538; //segment:ovl_i4 +func_i4_801976C0 = 0x801976C0; //segment:ovl_i4 +func_i4_80197700 = 0x80197700; //segment:ovl_i4 +func_i4_8019790C = 0x8019790C; //segment:ovl_i4 +func_i4_80197E70 = 0x80197E70; //segment:ovl_i4 +func_i4_80198044 = 0x80198044; //segment:ovl_i4 +func_i4_8019810C = 0x8019810C; //segment:ovl_i4 +func_i4_80199FD4 = 0x80199FD4; //segment:ovl_i4 +func_i4_8019A320 = 0x8019A320; //segment:ovl_i4 +func_i4_8019A85C = 0x8019A85C; //segment:ovl_i4 +func_i4_8019A96C = 0x8019A96C; //segment:ovl_i4 +func_i4_8019AA50 = 0x8019AA50; //segment:ovl_i4 +func_i4_8019ACBC = 0x8019ACBC; //segment:ovl_i4 +func_i4_8019B930 = 0x8019B930; //segment:ovl_i4 +func_i4_8019BC18 = 0x8019BC18; //segment:ovl_i4 +func_i4_8019BEE0 = 0x8019BEE0; //segment:ovl_i4 +func_i4_8019BFE8 = 0x8019BFE8; //segment:ovl_i4 +func_i4_8019C360 = 0x8019C360; //segment:ovl_i4 +func_i4_8019C424 = 0x8019C424; //segment:ovl_i4 +func_i4_8019C4D0 = 0x8019C4D0; //segment:ovl_i4 +func_i4_8019CFE4 = 0x8019CFE4; //segment:ovl_i4 +func_i4_8019D2D0 = 0x8019D2D0; //segment:ovl_i4 +func_i4_8019D4E8 = 0x8019D4E8; //segment:ovl_i4 +func_i4_8019D5AC = 0x8019D5AC; //segment:ovl_i4 +func_i4_8019D630 = 0x8019D630; //segment:ovl_i4 +func_i4_8019D990 = 0x8019D990; //segment:ovl_i4 +func_i4_8019DABC = 0x8019DABC; //segment:ovl_i4 +func_i4_8019DB94 = 0x8019DB94; //segment:ovl_i4 +func_i4_8019DCB8 = 0x8019DCB8; //segment:ovl_i4 +func_i4_8019DDAC = 0x8019DDAC; //segment:ovl_i4 +func_i4_8019E458 = 0x8019E458; //segment:ovl_i4 +func_i4_8019E548 = 0x8019E548; //segment:ovl_i4 +func_i4_8019EE30 = 0x8019EE30; //segment:ovl_i4 +func_i4_8019EF0C = 0x8019EF0C; //segment:ovl_i4 +func_i4_8019EFD4 = 0x8019EFD4; //segment:ovl_i4 +func_i4_8019F100 = 0x8019F100; //segment:ovl_i4 +func_i4_8019F22C = 0x8019F22C; //segment:ovl_i4 +func_i4_8019F408 = 0x8019F408; //segment:ovl_i4 +func_i4_8019FF10 = 0x8019FF10; //segment:ovl_i4 +func_i4_801A00A8 = 0x801A00A8; //segment:ovl_i4 +func_i4_801A01F8 = 0x801A01F8; //segment:ovl_i4 +func_i4_801A1680 = 0x801A1680; //segment:ovl_i4 +func_i4_801A1B8C = 0x801A1B8C; //segment:ovl_i4 +func_i4_801A1D00 = 0x801A1D00; //segment:ovl_i4 +func_i4_801A1DAC = 0x801A1DAC; //segment:ovl_i4 +func_i4_801A22E4 = 0x801A22E4; //segment:ovl_i4 +func_i4_801A23C0 = 0x801A23C0; //segment:ovl_i4 +D_i4_801A2730 = 0x801A2730; //segment:ovl_i4 +D_i4_801A2740 = 0x801A2740; //segment:ovl_i4 +D_i4_801A2758 = 0x801A2758; //segment:ovl_i4 +D_i4_801A277C = 0x801A277C; //segment:ovl_i4 +D_i4_801A2794 = 0x801A2794; //segment:ovl_i4 +D_i4_801A27A0 = 0x801A27A0; //segment:ovl_i4 +D_i4_801A27AC = 0x801A27AC; //segment:ovl_i4 +D_i4_801A27BC = 0x801A27BC; //segment:ovl_i4 +D_i4_801A27CC = 0x801A27CC; //segment:ovl_i4 +D_i4_801A27D8 = 0x801A27D8; //segment:ovl_i4 +D_i4_801A27E0 = 0x801A27E0; //segment:ovl_i4 +D_i4_801A2820 = 0x801A2820; //segment:ovl_i4 +D_i4_801A2824 = 0x801A2824; //segment:ovl_i4 +D_i4_801A2834 = 0x801A2834; //segment:ovl_i4 +D_i4_801A2844 = 0x801A2844; //segment:ovl_i4 +D_i4_801A2858 = 0x801A2858; //segment:ovl_i4 +D_i4_801A28F4 = 0x801A28F4; //segment:ovl_i4 +D_i4_801A290C = 0x801A290C; //segment:ovl_i4 +D_i4_801A2924 = 0x801A2924; //segment:ovl_i4 +D_i4_801A293C = 0x801A293C; //segment:ovl_i4 +D_i4_801A2948 = 0x801A2948; //segment:ovl_i4 +D_i4_801A2954 = 0x801A2954; //segment:ovl_i4 +D_i4_801A2960 = 0x801A2960; //segment:ovl_i4 +D_i4_801A296C = 0x801A296C; //segment:ovl_i4 +D_i4_801A2978 = 0x801A2978; //segment:ovl_i4 +D_i4_801A2990 = 0x801A2990; //segment:ovl_i4 +D_i4_801A29B4 = 0x801A29B4; //segment:ovl_i4 +D_i4_801A29CC = 0x801A29CC; //segment:ovl_i4 +D_i4_801A29D8 = 0x801A29D8; //segment:ovl_i4 +D_i4_801A29E4 = 0x801A29E4; //segment:ovl_i4 +D_i4_801A29F0 = 0x801A29F0; //segment:ovl_i4 +D_i4_801A29FC = 0x801A29FC; //segment:ovl_i4 +D_i4_801A2A2C = 0x801A2A2C; //segment:ovl_i4 +D_i4_801A2A38 = 0x801A2A38; //segment:ovl_i4 +D_i4_801A2A50 = 0x801A2A50; //segment:ovl_i4 +D_i4_801A2A74 = 0x801A2A74; //segment:ovl_i4 +D_i4_801A2A98 = 0x801A2A98; //segment:ovl_i4 +D_i4_801A2ABC = 0x801A2ABC; //segment:ovl_i4 +D_i4_801A2AD4 = 0x801A2AD4; //segment:ovl_i4 +D_i4_801A2AEE = 0x801A2AEE; //segment:ovl_i4 +D_i4_801A2AF0 = 0x801A2AF0; //segment:ovl_i4 +D_i4_801A2AF8 = 0x801A2AF8; //segment:ovl_i4 +D_i4_801A2AFC = 0x801A2AFC; //segment:ovl_i4 +D_i4_801A2BC4 = 0x801A2BC4; //segment:ovl_i4 +D_i4_801A2BD0 = 0x801A2BD0; //segment:ovl_i4 +D_i4_801A2BDC = 0x801A2BDC; //segment:ovl_i4 +D_i4_801A2BE8 = 0x801A2BE8; //segment:ovl_i4 +D_i4_801A2BF4 = 0x801A2BF4; //segment:ovl_i4 +D_i4_801A2C00 = 0x801A2C00; //segment:ovl_i4 +D_i4_801A2C10 = 0x801A2C10; //segment:ovl_i4 +D_i4_801A2C20 = 0x801A2C20; //segment:ovl_i4 +D_i4_801A2C30 = 0x801A2C30; //segment:ovl_i4 +D_i4_801A2C40 = 0x801A2C40; //segment:ovl_i4 +D_i4_801A2C50 = 0x801A2C50; //segment:ovl_i4 +D_i4_801A2CA0 = 0x801A2CA0; //segment:ovl_i4 +D_i4_801A2D90 = 0x801A2D90; //segment:ovl_i4 +D_i4_801A2DA4 = 0x801A2DA4; //segment:ovl_i4 +D_i4_801A2DF4 = 0x801A2DF4; //segment:ovl_i4 +D_i4_801A2E10 = 0x801A2E10; //segment:ovl_i4 +D_i4_801A2E34 = 0x801A2E34; //segment:ovl_i4 +D_i4_801A2E64 = 0x801A2E64; //segment:ovl_i4 +D_i4_801A2E78 = 0x801A2E78; //segment:ovl_i4 +D_i4_801A2ECC = 0x801A2ECC; //segment:ovl_i4 +D_i4_801A2EFC = 0x801A2EFC; //segment:ovl_i4 +D_i4_801A2F0C = 0x801A2F0C; //segment:ovl_i4 +D_i4_801A2F3C = 0x801A2F3C; //segment:ovl_i4 +D_i4_801A2F6C = 0x801A2F6C; //segment:ovl_i4 +D_i4_801A2F7C = 0x801A2F7C; //segment:ovl_i4 +D_i4_801A2F8C = 0x801A2F8C; //segment:ovl_i4 +D_i4_801A2F98 = 0x801A2F98; //segment:ovl_i4 +D_i4_801A2F9C = 0x801A2F9C; //segment:ovl_i4 +D_801A3CA0 = 0x801A3CA0; //segment:ovl_i4 +D_i4_801A3CB0 = 0x801A3CB0; //segment:ovl_i4 +D_i4_801A3CB4 = 0x801A3CB4; //segment:ovl_i4 +D_i4_801A3CB8 = 0x801A3CB8; //segment:ovl_i4 +D_i4_801A3CBC = 0x801A3CBC; //segment:ovl_i4 +D_i4_801A3CC0 = 0x801A3CC0; //segment:ovl_i4 +D_i4_801A3CC8 = 0x801A3CC8; //segment:ovl_i4 +D_i4_801A3D70 = 0x801A3D70; //segment:ovl_i4 +D_i4_801A3D88 = 0x801A3D88; //segment:ovl_i4 +D_i4_801A3E18 = 0x801A3E18; //segment:ovl_i4 +D_i4_801A3E20 = 0x801A3E20; //segment:ovl_i4 +D_i4_801A3E24 = 0x801A3E24; //segment:ovl_i4 +D_i4_801A3E28 = 0x801A3E28; //segment:ovl_i4 +D_i4_801A3E2C = 0x801A3E2C; //segment:ovl_i4 +D_i4_801A3E30 = 0x801A3E30; //segment:ovl_i4 +D_i4_801A3E34 = 0x801A3E34; //segment:ovl_i4 +D_i4_801A3E38 = 0x801A3E38; //segment:ovl_i4 +D_i4_801A3E40 = 0x801A3E40; //segment:ovl_i4 +D_i4_801A3E44 = 0x801A3E44; //segment:ovl_i4 + +func_i5_8018B020 = 0x8018B020; //segment:ovl_i5 +func_i5_8018B030 = 0x8018B030; //segment:ovl_i5 +func_i5_8018B0D0 = 0x8018B0D0; //segment:ovl_i5 +func_i5_8018B19C = 0x8018B19C; //segment:ovl_i5 +func_i5_8018BC04 = 0x8018BC04; //segment:ovl_i5 +func_i5_8018BDC8 = 0x8018BDC8; //segment:ovl_i5 +func_i5_8018CA10 = 0x8018CA10; //segment:ovl_i5 +func_i5_8018CA40 = 0x8018CA40; //segment:ovl_i5 +func_i5_8018CA88 = 0x8018CA88; //segment:ovl_i5 +func_i5_8018CB70 = 0x8018CB70; //segment:ovl_i5 +func_i5_8018CC00 = 0x8018CC00; //segment:ovl_i5 +func_i5_8018CC74 = 0x8018CC74; //segment:ovl_i5 +func_i5_8018CC94 = 0x8018CC94; //segment:ovl_i5 +func_i5_8018CCD4 = 0x8018CCD4; //segment:ovl_i5 +func_i5_8018CE60 = 0x8018CE60; //segment:ovl_i5 +func_i5_8018D098 = 0x8018D098; //segment:ovl_i5 +func_i5_8018D5DC = 0x8018D5DC; //segment:ovl_i5 +func_i5_8018D660 = 0x8018D660; //segment:ovl_i5 +func_i5_8018D7A8 = 0x8018D7A8; //segment:ovl_i5 +func_i5_8018DCA0 = 0x8018DCA0; //segment:ovl_i5 +func_i5_8018DDC8 = 0x8018DDC8; //segment:ovl_i5 +func_i5_8018DED4 = 0x8018DED4; //segment:ovl_i5 +func_i5_8018DF54 = 0x8018DF54; //segment:ovl_i5 +func_i5_8018E024 = 0x8018E024; //segment:ovl_i5 +func_i5_8018E59C = 0x8018E59C; //segment:ovl_i5 +func_i5_8018E624 = 0x8018E624; //segment:ovl_i5 +func_i5_8018E8A4 = 0x8018E8A4; //segment:ovl_i5 +func_i5_8018EAB4 = 0x8018EAB4; //segment:ovl_i5 +func_i5_8018EAD0 = 0x8018EAD0; //segment:ovl_i5 +func_i5_8018EC24 = 0x8018EC24; //segment:ovl_i5 +func_i5_8018EC94 = 0x8018EC94; //segment:ovl_i5 +func_i5_8018ED48 = 0x8018ED48; //segment:ovl_i5 +func_i5_8018F18C = 0x8018F18C; //segment:ovl_i5 +func_i5_8018F200 = 0x8018F200; //segment:ovl_i5 +func_i5_8018F44C = 0x8018F44C; //segment:ovl_i5 +func_i5_8018F4B0 = 0x8018F4B0; //segment:ovl_i5 +func_i5_8018F964 = 0x8018F964; //segment:ovl_i5 +func_i5_8018FA90 = 0x8018FA90; //segment:ovl_i5 +func_i5_8018FBF8 = 0x8018FBF8; //segment:ovl_i5 +func_i5_8018FC14 = 0x8018FC14; //segment:ovl_i5 +func_i5_8018FE50 = 0x8018FE50; //segment:ovl_i5 +func_i5_8018FEB8 = 0x8018FEB8; //segment:ovl_i5 +func_i5_8019020C = 0x8019020C; //segment:ovl_i5 +func_i5_80190388 = 0x80190388; //segment:ovl_i5 +func_i5_80191DB8 = 0x80191DB8; //segment:ovl_i5 +func_i5_80191E90 = 0x80191E90; //segment:ovl_i5 +func_i5_80191EAC = 0x80191EAC; //segment:ovl_i5 +func_i5_8019202C = 0x8019202C; //segment:ovl_i5 +func_i5_80192094 = 0x80192094; //segment:ovl_i5 +func_i5_801920C8 = 0x801920C8; //segment:ovl_i5 +func_i5_801920D8 = 0x801920D8; //segment:ovl_i5 +func_i5_801929F4 = 0x801929F4; //segment:ovl_i5 +func_i5_80192AD0 = 0x80192AD0; //segment:ovl_i5 +func_i5_80192B18 = 0x80192B18; //segment:ovl_i5 +func_i5_80192BB8 = 0x80192BB8; //segment:ovl_i5 +func_i5_80192C14 = 0x80192C14; //segment:ovl_i5 +func_i5_80192FB8 = 0x80192FB8; //segment:ovl_i5 +func_i5_80193398 = 0x80193398; //segment:ovl_i5 +func_i5_80193528 = 0x80193528; //segment:ovl_i5 +func_i5_80193750 = 0x80193750; //segment:ovl_i5 +func_i5_80193B0C = 0x80193B0C; //segment:ovl_i5 +func_i5_80193E80 = 0x80193E80; //segment:ovl_i5 +func_i5_801942FC = 0x801942FC; //segment:ovl_i5 +func_i5_801944E8 = 0x801944E8; //segment:ovl_i5 +func_i5_801955C8 = 0x801955C8; //segment:ovl_i5 +func_i5_80195BF8 = 0x80195BF8; //segment:ovl_i5 +func_i5_80197610 = 0x80197610; //segment:ovl_i5 +func_i5_801978D0 = 0x801978D0; //segment:ovl_i5 +func_i5_8019B56C = 0x8019B56C; //segment:ovl_i5 +func_i5_8019BD54 = 0x8019BD54; //segment:ovl_i5 +func_i5_8019CB88 = 0x8019CB88; //segment:ovl_i5 +func_i5_8019D3D0 = 0x8019D3D0; //segment:ovl_i5 +func_i5_8019D4F0 = 0x8019D4F0; //segment:ovl_i5 +func_i5_8019D6D0 = 0x8019D6D0; //segment:ovl_i5 +func_i5_8019D838 = 0x8019D838; //segment:ovl_i5 +func_i5_8019DA3C = 0x8019DA3C; //segment:ovl_i5 +func_i5_8019DBD8 = 0x8019DBD8; //segment:ovl_i5 +func_i5_8019DC48 = 0x8019DC48; //segment:ovl_i5 +func_i5_8019DDA4 = 0x8019DDA4; //segment:ovl_i5 +func_i5_8019E1D8 = 0x8019E1D8; //segment:ovl_i5 +func_i5_8019E2DC = 0x8019E2DC; //segment:ovl_i5 +func_i5_8019E328 = 0x8019E328; //segment:ovl_i5 +func_i5_8019E374 = 0x8019E374; //segment:ovl_i5 +func_i5_8019E9E0 = 0x8019E9E0; //segment:ovl_i5 +func_i5_8019F02C = 0x8019F02C; //segment:ovl_i5 +func_i5_8019F35C = 0x8019F35C; //segment:ovl_i5 +func_i5_8019F698 = 0x8019F698; //segment:ovl_i5 +func_i5_8019F8FC = 0x8019F8FC; //segment:ovl_i5 +func_i5_8019FF98 = 0x8019FF98; //segment:ovl_i5 +func_i5_801A0064 = 0x801A0064; //segment:ovl_i5 +func_i5_801A0170 = 0x801A0170; //segment:ovl_i5 +func_i5_801A0224 = 0x801A0224; //segment:ovl_i5 +func_i5_801A092C = 0x801A092C; //segment:ovl_i5 +func_i5_801A0AEC = 0x801A0AEC; //segment:ovl_i5 +func_i5_801A1068 = 0x801A1068; //segment:ovl_i5 +func_i5_801A1110 = 0x801A1110; //segment:ovl_i5 +func_i5_801A11A0 = 0x801A11A0; //segment:ovl_i5 +func_i5_801A13B0 = 0x801A13B0; //segment:ovl_i5 +func_i5_801A1EB0 = 0x801A1EB0; //segment:ovl_i5 +func_i5_801A20C4 = 0x801A20C4; //segment:ovl_i5 +func_i5_801A2500 = 0x801A2500; //segment:ovl_i5 +func_i5_801A2698 = 0x801A2698; //segment:ovl_i5 +func_i5_801A2908 = 0x801A2908; //segment:ovl_i5 +func_i5_801A2C04 = 0x801A2C04; //segment:ovl_i5 +func_i5_801A36F4 = 0x801A36F4; //segment:ovl_i5 +func_i5_801A3A3C = 0x801A3A3C; //segment:ovl_i5 +func_i5_801A3BFC = 0x801A3BFC; //segment:ovl_i5 +func_i5_801A3DA8 = 0x801A3DA8; //segment:ovl_i5 +func_i5_801A4514 = 0x801A4514; //segment:ovl_i5 +func_i5_801A45A0 = 0x801A45A0; //segment:ovl_i5 +func_i5_801A45C0 = 0x801A45C0; //segment:ovl_i5 +func_i5_801A4678 = 0x801A4678; //segment:ovl_i5 +func_i5_801A4878 = 0x801A4878; //segment:ovl_i5 +func_i5_801A48CC = 0x801A48CC; //segment:ovl_i5 +func_i5_801A4958 = 0x801A4958; //segment:ovl_i5 +func_i5_801A4D08 = 0x801A4D08; //segment:ovl_i5 +func_i5_801A4D64 = 0x801A4D64; //segment:ovl_i5 +func_i5_801A5E4C = 0x801A5E4C; //segment:ovl_i5 +func_i5_801A6518 = 0x801A6518; //segment:ovl_i5 +func_i5_801A65C4 = 0x801A65C4; //segment:ovl_i5 +func_i5_801A6878 = 0x801A6878; //segment:ovl_i5 +func_i5_801A6B58 = 0x801A6B58; //segment:ovl_i5 +func_i5_801A6CE0 = 0x801A6CE0; //segment:ovl_i5 +func_i5_801A6DA0 = 0x801A6DA0; //segment:ovl_i5 +func_i5_801A7230 = 0x801A7230; //segment:ovl_i5 +func_i5_801A76C0 = 0x801A76C0; //segment:ovl_i5 +func_i5_801A7910 = 0x801A7910; //segment:ovl_i5 +func_i5_801A7938 = 0x801A7938; //segment:ovl_i5 +func_i5_801A7C50 = 0x801A7C50; //segment:ovl_i5 +func_i5_801A7E5C = 0x801A7E5C; //segment:ovl_i5 +func_i5_801A8100 = 0x801A8100; //segment:ovl_i5 +func_i5_801A8140 = 0x801A8140; //segment:ovl_i5 +func_i5_801A8458 = 0x801A8458; //segment:ovl_i5 +func_i5_801A8504 = 0x801A8504; //segment:ovl_i5 +func_i5_801A8598 = 0x801A8598; //segment:ovl_i5 +func_i5_801A85C4 = 0x801A85C4; //segment:ovl_i5 +func_i5_801A8BBC = 0x801A8BBC; //segment:ovl_i5 +func_i5_801A8F44 = 0x801A8F44; //segment:ovl_i5 +func_i5_801A8F80 = 0x801A8F80; //segment:ovl_i5 +func_i5_801A906C = 0x801A906C; //segment:ovl_i5 +func_i5_801A9268 = 0x801A9268; //segment:ovl_i5 +func_i5_801A9588 = 0x801A9588; //segment:ovl_i5 +func_i5_801A95E4 = 0x801A95E4; //segment:ovl_i5 +func_i5_801A9800 = 0x801A9800; //segment:ovl_i5 +func_i5_801A98C4 = 0x801A98C4; //segment:ovl_i5 +func_i5_801A98EC = 0x801A98EC; //segment:ovl_i5 +func_i5_801A9A28 = 0x801A9A28; //segment:ovl_i5 +func_i5_801A9A5C = 0x801A9A5C; //segment:ovl_i5 +func_i5_801A9A68 = 0x801A9A68; //segment:ovl_i5 +func_i5_801A9B98 = 0x801A9B98; //segment:ovl_i5 +func_i5_801A9BCC = 0x801A9BCC; //segment:ovl_i5 +func_i5_801A9BDC = 0x801A9BDC; //segment:ovl_i5 +func_i5_801A9FD8 = 0x801A9FD8; //segment:ovl_i5 +func_i5_801AA078 = 0x801AA078; //segment:ovl_i5 +func_i5_801AA0A0 = 0x801AA0A0; //segment:ovl_i5 +func_i5_801AA254 = 0x801AA254; //segment:ovl_i5 +func_i5_801AA260 = 0x801AA260; //segment:ovl_i5 +func_i5_801AA384 = 0x801AA384; //segment:ovl_i5 +func_i5_801AA390 = 0x801AA390; //segment:ovl_i5 +func_i5_801AA41C = 0x801AA41C; //segment:ovl_i5 +func_i5_801AA710 = 0x801AA710; //segment:ovl_i5 +func_i5_801AAA4C = 0x801AAA4C; //segment:ovl_i5 +func_i5_801AAD74 = 0x801AAD74; //segment:ovl_i5 +func_i5_801AAF5C = 0x801AAF5C; //segment:ovl_i5 +func_i5_801AB348 = 0x801AB348; //segment:ovl_i5 +func_i5_801AB4C8 = 0x801AB4C8; //segment:ovl_i5 +func_i5_801AB744 = 0x801AB744; //segment:ovl_i5 +func_i5_801AB830 = 0x801AB830; //segment:ovl_i5 +func_i5_801AB914 = 0x801AB914; //segment:ovl_i5 +func_i5_801AF698 = 0x801AF698; //segment:ovl_i5 +func_i5_801AFC44 = 0x801AFC44; //segment:ovl_i5 +func_i5_801AFD18 = 0x801AFD18; //segment:ovl_i5 +func_i5_801AFEB0 = 0x801AFEB0; //segment:ovl_i5 +func_i5_801AFEBC = 0x801AFEBC; //segment:ovl_i5 +func_i5_801B002C = 0x801B002C; //segment:ovl_i5 +func_i5_801B0134 = 0x801B0134; //segment:ovl_i5 +func_i5_801B01D4 = 0x801B01D4; //segment:ovl_i5 +func_i5_801B08C0 = 0x801B08C0; //segment:ovl_i5 +func_i5_801B09EC = 0x801B09EC; //segment:ovl_i5 +func_i5_801B0A3C = 0x801B0A3C; //segment:ovl_i5 +func_i5_801B0B00 = 0x801B0B00; //segment:ovl_i5 +func_i5_801B0BC4 = 0x801B0BC4; //segment:ovl_i5 +func_i5_801B0FD4 = 0x801B0FD4; //segment:ovl_i5 +func_i5_801B10A4 = 0x801B10A4; //segment:ovl_i5 +func_i5_801B1170 = 0x801B1170; //segment:ovl_i5 +func_i5_801B1548 = 0x801B1548; //segment:ovl_i5 +func_i5_801B1688 = 0x801B1688; //segment:ovl_i5 +func_i5_801B176C = 0x801B176C; //segment:ovl_i5 +func_i5_801B17E8 = 0x801B17E8; //segment:ovl_i5 +func_i5_801B1D40 = 0x801B1D40; //segment:ovl_i5 +func_i5_801B1F4C = 0x801B1F4C; //segment:ovl_i5 +func_i5_801B2090 = 0x801B2090; //segment:ovl_i5 +func_i5_801B2114 = 0x801B2114; //segment:ovl_i5 +func_i5_801B2280 = 0x801B2280; //segment:ovl_i5 +func_i5_801B22FC = 0x801B22FC; //segment:ovl_i5 +func_i5_801B2520 = 0x801B2520; //segment:ovl_i5 +func_i5_801B2684 = 0x801B2684; //segment:ovl_i5 +func_i5_801B297C = 0x801B297C; //segment:ovl_i5 +func_i5_801B2BB4 = 0x801B2BB4; //segment:ovl_i5 +func_i5_801B2C80 = 0x801B2C80; //segment:ovl_i5 +func_i5_801B2CFC = 0x801B2CFC; //segment:ovl_i5 +func_i5_801B2ECC = 0x801B2ECC; //segment:ovl_i5 +func_i5_801B30A8 = 0x801B30A8; //segment:ovl_i5 +func_i5_801B318C = 0x801B318C; //segment:ovl_i5 +func_i5_801B3374 = 0x801B3374; //segment:ovl_i5 +func_i5_801B6314 = 0x801B6314; //segment:ovl_i5 +func_i5_801B6FAC = 0x801B6FAC; //segment:ovl_i5 +func_i5_801B7170 = 0x801B7170; //segment:ovl_i5 +func_i5_801B7338 = 0x801B7338; //segment:ovl_i5 +func_i5_801B775C = 0x801B775C; //segment:ovl_i5 +func_i5_801B8410 = 0x801B8410; //segment:ovl_i5 +func_i5_801B8494 = 0x801B8494; //segment:ovl_i5 +func_i5_801B84E8 = 0x801B84E8; //segment:ovl_i5 +func_i5_801B8B50 = 0x801B8B50; //segment:ovl_i5 +func_i5_801B8C84 = 0x801B8C84; //segment:ovl_i5 +func_i5_801B92EC = 0x801B92EC; //segment:ovl_i5 +func_i5_801B9A20 = 0x801B9A20; //segment:ovl_i5 +func_i5_801BA2E8 = 0x801BA2E8; //segment:ovl_i5 +func_i5_801BA52C = 0x801BA52C; //segment:ovl_i5 +func_i5_801BA580 = 0x801BA580; //segment:ovl_i5 +func_i5_801BA860 = 0x801BA860; //segment:ovl_i5 +func_i5_801BAC80 = 0x801BAC80; //segment:ovl_i5 +D_i5_801BACD0 = 0x801BACD0; //segment:ovl_i5 +D_i5_801BACE0 = 0x801BACE0; //segment:ovl_i5 +D_i5_801BACF8 = 0x801BACF8; //segment:ovl_i5 +D_i5_801BAD58 = 0x801BAD58; //segment:ovl_i5 +D_i5_801BAD68 = 0x801BAD68; //segment:ovl_i5 +D_i5_801BAD78 = 0x801BAD78; //segment:ovl_i5 +D_i5_801BAD84 = 0x801BAD84; //segment:ovl_i5 +D_i5_801BAD88 = 0x801BAD88; //segment:ovl_i5 +D_i5_801BADA0 = 0x801BADA0; //segment:ovl_i5 +D_i5_801BAF30 = 0x801BAF30; //segment:ovl_i5 +D_i5_801BAF4B = 0x801BAF4B; //segment:ovl_i5 +D_i5_801BAF4C = 0x801BAF4C; //segment:ovl_i5 +D_i5_801BAF58 = 0x801BAF58; //segment:ovl_i5 +D_i5_801BAF60 = 0x801BAF60; //segment:ovl_i5 +D_i5_801BAF6C = 0x801BAF6C; //segment:ovl_i5 +D_i5_801BAF78 = 0x801BAF78; //segment:ovl_i5 +D_i5_801BAF84 = 0x801BAF84; //segment:ovl_i5 +D_i5_801BAF90 = 0x801BAF90; //segment:ovl_i5 +D_i5_801BAF94 = 0x801BAF94; //segment:ovl_i5 +D_i5_801BAF98 = 0x801BAF98; //segment:ovl_i5 +D_i5_801BAF9C = 0x801BAF9C; //segment:ovl_i5 +D_i5_801BAFA8 = 0x801BAFA8; //segment:ovl_i5 +D_i5_801BAFC4 = 0x801BAFC4; //segment:ovl_i5 +D_i5_801BAFEC = 0x801BAFEC; //segment:ovl_i5 +D_i5_801BAFF8 = 0x801BAFF8; //segment:ovl_i5 +D_i5_801BB004 = 0x801BB004; //segment:ovl_i5 +D_i5_801BB010 = 0x801BB010; //segment:ovl_i5 +D_i5_801BB024 = 0x801BB024; //segment:ovl_i5 +D_i5_801BB048 = 0x801BB048; //segment:ovl_i5 +D_i5_801BB070 = 0x801BB070; //segment:ovl_i5 +D_i5_801BB072 = 0x801BB072; //segment:ovl_i5 +D_i5_801BB094 = 0x801BB094; //segment:ovl_i5 +D_i5_801BB0A0 = 0x801BB0A0; //segment:ovl_i5 +D_i5_801BB0AC = 0x801BB0AC; //segment:ovl_i5 +D_i5_801BB0B8 = 0x801BB0B8; //segment:ovl_i5 +D_i5_801BB0D0 = 0x801BB0D0; //segment:ovl_i5 +D_i5_801BB0DC = 0x801BB0DC; //segment:ovl_i5 +D_i5_801BB178 = 0x801BB178; //segment:ovl_i5 +D_i5_801BB1B0 = 0x801BB1B0; //segment:ovl_i5 +D_i5_801BB344 = 0x801BB344; //segment:ovl_i5 +D_i5_801BB3A0 = 0x801BB3A0; //segment:ovl_i5 +D_i5_801BB4B0 = 0x801BB4B0; //segment:ovl_i5 +D_i5_801BBA10 = 0x801BBA10; //segment:ovl_i5 +D_i5_801BBB78 = 0x801BBB78; //segment:ovl_i5 +D_i5_801BBB8A = 0x801BBB8A; //segment:ovl_i5 +D_i5_801BBB8C = 0x801BBB8C; //segment:ovl_i5 +D_i5_801BBB9E = 0x801BBB9E; //segment:ovl_i5 +D_i5_801BBBA0 = 0x801BBBA0; //segment:ovl_i5 +D_i5_801BBBD8 = 0x801BBBD8; //segment:ovl_i5 +D_i5_801BBBE0 = 0x801BBBE0; //segment:ovl_i5 +D_i5_801BBBE8 = 0x801BBBE8; //segment:ovl_i5 +D_i5_801BBDE8 = 0x801BBDE8; //segment:ovl_i5 +D_i5_801BBDEC = 0x801BBDEC; //segment:ovl_i5 +D_i5_801BC5FC = 0x801BC5FC; //segment:ovl_i5 +D_i5_801BC64C = 0x801BC64C; //segment:ovl_i5 +D_i5_801BC664 = 0x801BC664; //segment:ovl_i5 +D_i5_801BC6A4 = 0x801BC6A4; //segment:ovl_i5 +D_i5_801BC714 = 0x801BC714; //segment:ovl_i5 +D_i5_801BC734 = 0x801BC734; //segment:ovl_i5 +D_i5_801BC740 = 0x801BC740; //segment:ovl_i5 +D_i5_801BC74C = 0x801BC74C; //segment:ovl_i5 +D_i5_801BC758 = 0x801BC758; //segment:ovl_i5 +D_i5_801BC764 = 0x801BC764; //segment:ovl_i5 +D_i5_801BC770 = 0x801BC770; //segment:ovl_i5 +D_i5_801BC77C = 0x801BC77C; //segment:ovl_i5 +D_i5_801BC788 = 0x801BC788; //segment:ovl_i5 +D_i5_801BC794 = 0x801BC794; //segment:ovl_i5 +D_i5_801BC79C = 0x801BC79C; //segment:ovl_i5 +D_i5_801BC864 = 0x801BC864; //segment:ovl_i5 +D_i5_801BC884 = 0x801BC884; //segment:ovl_i5 +D_i5_801BC890 = 0x801BC890; //segment:ovl_i5 +D_i5_801BC8A4 = 0x801BC8A4; //segment:ovl_i5 +D_i5_801BD4C0 = 0x801BD4C0; //segment:ovl_i5 +D_i5_801BD4D4 = 0x801BD4D4; //segment:ovl_i5 +D_i5_801BDB78 = 0x801BDB78; //segment:ovl_i5 +D_i5_801BDC18 = 0x801BDC18; //segment:ovl_i5 +D_i5_801BDC1C = 0x801BDC1C; //segment:ovl_i5 +D_i5_801BDC20 = 0x801BDC20; //segment:ovl_i5 +D_i5_801BDC24 = 0x801BDC24; //segment:ovl_i5 +D_i5_801BDC28 = 0x801BDC28; //segment:ovl_i5 +D_i5_801BDC2C = 0x801BDC2C; //segment:ovl_i5 +D_i5_801BDFB0 = 0x801BDFB0; //segment:ovl_i5 +D_i5_801BE078 = 0x801BE078; //segment:ovl_i5 +D_i5_801BE148 = 0x801BE148; //segment:ovl_i5 +D_i5_801BE14C = 0x801BE14C; //segment:ovl_i5 +D_i5_801BE150 = 0x801BE150; //segment:ovl_i5 +D_i5_801BE154 = 0x801BE154; //segment:ovl_i5 +D_i5_801BE160 = 0x801BE160; //segment:ovl_i5 +D_i5_801BE16C = 0x801BE16C; //segment:ovl_i5 +D_i5_801BE178 = 0x801BE178; //segment:ovl_i5 +D_i5_801BE184 = 0x801BE184; //segment:ovl_i5 +D_i5_801BE190 = 0x801BE190; //segment:ovl_i5 +D_i5_801BE19C = 0x801BE19C; //segment:ovl_i5 +D_i5_801BE1A8 = 0x801BE1A8; //segment:ovl_i5 +D_i5_801BE1AC = 0x801BE1AC; //segment:ovl_i5 +D_i5_801BE1B8 = 0x801BE1B8; //segment:ovl_i5 +D_i5_801BE224 = 0x801BE224; //segment:ovl_i5 +D_i5_801BE234 = 0x801BE234; //segment:ovl_i5 +D_i5_801BE238 = 0x801BE238; //segment:ovl_i5 +D_i5_801BE248 = 0x801BE248; //segment:ovl_i5 +D_i5_801BE24C = 0x801BE24C; //segment:ovl_i5 +D_i5_801BE258 = 0x801BE258; //segment:ovl_i5 +D_i5_801BE25C = 0x801BE25C; //segment:ovl_i5 +D_i5_801BE260 = 0x801BE260; //segment:ovl_i5 +D_i5_801BE274 = 0x801BE274; //segment:ovl_i5 +D_i5_801BE28C = 0x801BE28C; //segment:ovl_i5 +D_i5_801BE294 = 0x801BE294; //segment:ovl_i5 +D_i5_801BE2A4 = 0x801BE2A4; //segment:ovl_i5 +D_i5_801BE2AC = 0x801BE2AC; //segment:ovl_i5 +D_i5_801BE2B4 = 0x801BE2B4; //segment:ovl_i5 +D_i5_801BE2C4 = 0x801BE2C4; //segment:ovl_i5 +D_i5_801BE2C8 = 0x801BE2C8; //segment:ovl_i5 +D_i5_801BE2CC = 0x801BE2CC; //segment:ovl_i5 +D_i5_801BE2D4 = 0x801BE2D4; //segment:ovl_i5 +D_i5_801BE2E4 = 0x801BE2E4; //segment:ovl_i5 +D_i5_801BE2F4 = 0x801BE2F4; //segment:ovl_i5 +D_i5_801BE304 = 0x801BE304; //segment:ovl_i5 +D_i5_801BE308 = 0x801BE308; //segment:ovl_i5 +D_i5_801BE318 = 0x801BE318; //segment:ovl_i5 +D_i5_801BE31C = 0x801BE31C; //segment:ovl_i5 +D_i5_801BE328 = 0x801BE328; //segment:ovl_i5 +D_i5_801BE32C = 0x801BE32C; //segment:ovl_i5 +D_i5_801BE330 = 0x801BE330; //segment:ovl_i5 +D_i5_801BE340 = 0x801BE340; //segment:ovl_i5 +D_i5_801BE350 = 0x801BE350; //segment:ovl_i5 +D_i5_801BE390 = 0x801BE390; //segment:ovl_i5 +D_i5_801BE3B0 = 0x801BE3B0; //segment:ovl_i5 +D_i5_801BE3BC = 0x801BE3BC; //segment:ovl_i5 +D_i5_801BE3D4 = 0x801BE3D4; //segment:ovl_i5 +D_i5_801BE3EC = 0x801BE3EC; //segment:ovl_i5 +D_i5_801BE404 = 0x801BE404; //segment:ovl_i5 +D_801BF920 = 0x801BF920; //segment:ovl_i5 +D_i5_801BF930 = 0x801BF930; //segment:ovl_i5 +D_i5_801BF948 = 0x801BF948; //segment:ovl_i5 +D_i5_801BFA14 = 0x801BFA14; //segment:ovl_i5 +D_i5_801BFA28 = 0x801BFA28; //segment:ovl_i5 +D_i5_801BFC28 = 0x801BFC28; //segment:ovl_i5 +D_i5_801BFD18 = 0x801BFD18; //segment:ovl_i5 +D_i5_801C0058 = 0x801C0058; //segment:ovl_i5 +D_i5_801C005C = 0x801C005C; //segment:ovl_i5 +D_i5_801C006C = 0x801C006C; //segment:ovl_i5 +D_i5_801C009C = 0x801C009C; //segment:ovl_i5 +D_i5_801C00A0 = 0x801C00A0; //segment:ovl_i5 +D_i5_801C042C = 0x801C042C; //segment:ovl_i5 +D_i5_801C0430 = 0x801C0430; //segment:ovl_i5 +D_i5_801C0434 = 0x801C0434; //segment:ovl_i5 +D_i5_801C0438 = 0x801C0438; //segment:ovl_i5 +D_i5_801C0450 = 0x801C0450; //segment:ovl_i5 +D_i5_801C0454 = 0x801C0454; //segment:ovl_i5 +D_i5_801C0458 = 0x801C0458; //segment:ovl_i5 +D_i5_801C045C = 0x801C045C; //segment:ovl_i5 +D_i5_801C045E = 0x801C045E; //segment:ovl_i5 +D_i5_801C0478 = 0x801C0478; //segment:ovl_i5 +D_i5_801C047C = 0x801C047C; //segment:ovl_i5 +D_i5_801C0480 = 0x801C0480; //segment:ovl_i5 +D_i5_801C0484 = 0x801C0484; //segment:ovl_i5 +D_i5_801C0486 = 0x801C0486; //segment:ovl_i5 +D_i5_801C04A0 = 0x801C04A0; //segment:ovl_i5 +D_i5_801C04A4 = 0x801C04A4; //segment:ovl_i5 +D_i5_801C04A8 = 0x801C04A8; //segment:ovl_i5 +D_i5_801C04AC = 0x801C04AC; //segment:ovl_i5 +D_i5_801C04AE = 0x801C04AE; //segment:ovl_i5 +D_i5_801C04B0 = 0x801C04B0; //segment:ovl_i5 +D_i5_801C0EB0 = 0x801C0EB0; //segment:ovl_i5 +D_i5_801C0F10 = 0x801C0F10; //segment:ovl_i5 +D_i5_801C0F70 = 0x801C0F70; //segment:ovl_i5 +D_i5_801C1300 = 0x801C1300; //segment:ovl_i5 +D_i5_801C1360 = 0x801C1360; //segment:ovl_i5 +D_i5_801C13C0 = 0x801C13C0; //segment:ovl_i5 +D_i5_801C1750 = 0x801C1750; //segment:ovl_i5 +D_i5_801C1BA0 = 0x801C1BA0; //segment:ovl_i5 +D_i5_801C1BE8 = 0x801C1BE8; //segment:ovl_i5 +D_i5_801C1C70 = 0x801C1C70; //segment:ovl_i5 +D_i5_801C1C74 = 0x801C1C74; //segment:ovl_i5 +D_i5_801C1C78 = 0x801C1C78; //segment:ovl_i5 +D_i5_801C1C7C = 0x801C1C7C; //segment:ovl_i5 +D_i5_801C1C80 = 0x801C1C80; //segment:ovl_i5 +D_i5_801C1C88 = 0x801C1C88; //segment:ovl_i5 +D_i5_801C1C90 = 0x801C1C90; //segment:ovl_i5 +D_i5_801C1C94 = 0x801C1C94; //segment:ovl_i5 +D_i5_801C1CAC = 0x801C1CAC; //segment:ovl_i5 +D_i5_801C1CB8 = 0x801C1CB8; //segment:ovl_i5 +D_i5_801C1CBC = 0x801C1CBC; //segment:ovl_i5 +D_i5_801C1CD4 = 0x801C1CD4; //segment:ovl_i5 +D_i5_801C1CDC = 0x801C1CDC; //segment:ovl_i5 +D_i5_801C1CE4 = 0x801C1CE4; //segment:ovl_i5 +D_i5_801C1D28 = 0x801C1D28; //segment:ovl_i5 +D_i5_801C1D32 = 0x801C1D32; //segment:ovl_i5 +D_i5_801C1D3F = 0x801C1D3F; //segment:ovl_i5 +D_i5_801C1D40 = 0x801C1D40; //segment:ovl_i5 +D_i5_801C1D48 = 0x801C1D48; //segment:ovl_i5 +D_i5_801C1D4A = 0x801C1D4A; //segment:ovl_i5 +D_i5_801C1D4B = 0x801C1D4B; //segment:ovl_i5 +D_i5_801C1D4C = 0x801C1D4C; //segment:ovl_i5 +D_i5_801C1D4E = 0x801C1D4E; //segment:ovl_i5 +D_i5_801C1D50 = 0x801C1D50; //segment:ovl_i5 +D_i5_801C1D58 = 0x801C1D58; //segment:ovl_i5 +D_i5_801C1D5C = 0x801C1D5C; //segment:ovl_i5 +D_i5_801C1D5E = 0x801C1D5E; //segment:ovl_i5 +D_i5_801C1D6A = 0x801C1D6A; //segment:ovl_i5 +D_i5_801C1D6C = 0x801C1D6C; //segment:ovl_i5 +D_i5_801C1D7C = 0x801C1D7C; //segment:ovl_i5 +D_i5_801C1DA0 = 0x801C1DA0; //segment:ovl_i5 +D_i5_801C1DA4 = 0x801C1DA4; //segment:ovl_i5 +D_i5_801C1DA8 = 0x801C1DA8; //segment:ovl_i5 +D_i5_801C1DBC = 0x801C1DBC; //segment:ovl_i5 +D_i5_801C1DC0 = 0x801C1DC0; //segment:ovl_i5 +D_i5_801C1DF0 = 0x801C1DF0; //segment:ovl_i5 +D_i5_801C1DF4 = 0x801C1DF4; //segment:ovl_i5 +D_i5_801C1DF8 = 0x801C1DF8; //segment:ovl_i5 +D_i5_801C1DFC = 0x801C1DFC; //segment:ovl_i5 +D_i5_801C1E20 = 0x801C1E20; //segment:ovl_i5 +D_i5_801C1E24 = 0x801C1E24; //segment:ovl_i5 +D_i5_801C1E28 = 0x801C1E28; //segment:ovl_i5 +D_i5_801C1E68 = 0x801C1E68; //segment:ovl_i5 +D_i5_801C20C0 = 0x801C20C0; //segment:ovl_i5 +D_i5_801C20CC = 0x801C20CC; //segment:ovl_i5 +D_i5_801C20D8 = 0x801C20D8; //segment:ovl_i5 +D_i5_801C20E4 = 0x801C20E4; //segment:ovl_i5 +D_i5_801C20F0 = 0x801C20F0; //segment:ovl_i5 +D_i5_801C20FC = 0x801C20FC; //segment:ovl_i5 +D_i5_801C2108 = 0x801C2108; //segment:ovl_i5 +D_i5_801C2114 = 0x801C2114; //segment:ovl_i5 +D_i5_801C2120 = 0x801C2120; //segment:ovl_i5 +D_i5_801C212C = 0x801C212C; //segment:ovl_i5 +D_i5_801C2138 = 0x801C2138; //segment:ovl_i5 +D_i5_801C2144 = 0x801C2144; //segment:ovl_i5 +D_i5_801C2150 = 0x801C2150; //segment:ovl_i5 +D_i5_801C215C = 0x801C215C; //segment:ovl_i5 +D_i5_801C2170 = 0x801C2170; //segment:ovl_i5 +D_i5_801C2174 = 0x801C2174; //segment:ovl_i5 +D_i5_801C2178 = 0x801C2178; //segment:ovl_i5 +D_i5_801C5778 = 0x801C5778; //segment:ovl_i5 +D_i5_801C5E78 = 0x801C5E78; //segment:ovl_i5 +D_i5_801C5EE8 = 0x801C5EE8; //segment:ovl_i5 +D_i5_801C5F58 = 0x801C5F58; //segment:ovl_i5 +D_i5_801C9630 = 0x801C9630; //segment:ovl_i5 +D_i5_801C9634 = 0x801C9634; //segment:ovl_i5 +D_i5_801C9638 = 0x801C9638; //segment:ovl_i5 +D_i5_801C963C = 0x801C963C; //segment:ovl_i5 +D_i5_801C9640 = 0x801C9640; //segment:ovl_i5 +D_i5_801C9644 = 0x801C9644; //segment:ovl_i5 +D_i5_801C9648 = 0x801C9648; //segment:ovl_i5 +D_i5_801C9D08 = 0x801C9D08; //segment:ovl_i5 +D_i5_801C9D10 = 0x801C9D10; //segment:ovl_i5 +D_i5_801C9D18 = 0x801C9D18; //segment:ovl_i5 +D_i5_801C9FE8 = 0x801C9FE8; //segment:ovl_i5 +D_i5_801CA2B8 = 0x801CA2B8; //segment:ovl_i5 +D_i5_801CA588 = 0x801CA588; //segment:ovl_i5 +D_i5_801CA858 = 0x801CA858; //segment:ovl_i5 +D_i5_801CA864 = 0x801CA864; //segment:ovl_i5 +D_i5_801CA888 = 0x801CA888; //segment:ovl_i5 + +func_i6_8018B020 = 0x8018B020; //segment:ovl_i6 +func_i6_8018B030 = 0x8018B030; //segment:ovl_i6 +func_i6_8018B17C = 0x8018B17C; //segment:ovl_i6 +func_i6_8018B19C = 0x8018B19C; //segment:ovl_i6 +func_i6_8018B1FC = 0x8018B1FC; //segment:ovl_i6 +func_i6_8018B3A8 = 0x8018B3A8; //segment:ovl_i6 +func_i6_8018B75C = 0x8018B75C; //segment:ovl_i6 +func_i6_8018BBE4 = 0x8018BBE4; //segment:ovl_i6 +func_i6_8018BF48 = 0x8018BF48; //segment:ovl_i6 +func_i6_8018BF68 = 0x8018BF68; //segment:ovl_i6 +func_i6_8018C028 = 0x8018C028; //segment:ovl_i6 +func_i6_8018C160 = 0x8018C160; //segment:ovl_i6 +func_i6_8018C2B0 = 0x8018C2B0; //segment:ovl_i6 +func_i6_8018C37C = 0x8018C37C; //segment:ovl_i6 +func_i6_8018C3F4 = 0x8018C3F4; //segment:ovl_i6 +func_i6_8018C54C = 0x8018C54C; //segment:ovl_i6 +func_i6_8018C7B8 = 0x8018C7B8; //segment:ovl_i6 +func_i6_8018CB98 = 0x8018CB98; //segment:ovl_i6 +func_i6_8018CD14 = 0x8018CD14; //segment:ovl_i6 +func_i6_8018CE3C = 0x8018CE3C; //segment:ovl_i6 +func_i6_8018CEB8 = 0x8018CEB8; //segment:ovl_i6 +func_i6_8018CF60 = 0x8018CF60; //segment:ovl_i6 +func_i6_8018D210 = 0x8018D210; //segment:ovl_i6 +func_i6_8018D4D0 = 0x8018D4D0; //segment:ovl_i6 +func_i6_8018D5EC = 0x8018D5EC; //segment:ovl_i6 +func_i6_8018D65C = 0x8018D65C; //segment:ovl_i6 +func_i6_8018EF50 = 0x8018EF50; //segment:ovl_i6 +func_i6_8018F394 = 0x8018F394; //segment:ovl_i6 +func_i6_8018F8AC = 0x8018F8AC; //segment:ovl_i6 +func_i6_8018FE64 = 0x8018FE64; //segment:ovl_i6 +func_i6_80190134 = 0x80190134; //segment:ovl_i6 +func_i6_80190208 = 0x80190208; //segment:ovl_i6 +func_i6_80190274 = 0x80190274; //segment:ovl_i6 +func_i6_801903A8 = 0x801903A8; //segment:ovl_i6 +func_i6_8019042C = 0x8019042C; //segment:ovl_i6 +func_i6_80190524 = 0x80190524; //segment:ovl_i6 +func_i6_801905A8 = 0x801905A8; //segment:ovl_i6 +func_i6_80190A6C = 0x80190A6C; //segment:ovl_i6 +func_i6_80190BAC = 0x80190BAC; //segment:ovl_i6 +func_i6_80190C40 = 0x80190C40; //segment:ovl_i6 +func_i6_80190D84 = 0x80190D84; //segment:ovl_i6 +func_i6_80191494 = 0x80191494; //segment:ovl_i6 +func_i6_80191568 = 0x80191568; //segment:ovl_i6 +func_i6_801916C4 = 0x801916C4; //segment:ovl_i6 +func_i6_801952C0 = 0x801952C0; //segment:ovl_i6 +func_i6_80195F84 = 0x80195F84; //segment:ovl_i6 +func_i6_80196398 = 0x80196398; //segment:ovl_i6 +func_i6_80196964 = 0x80196964; //segment:ovl_i6 +func_i6_80196D14 = 0x80196D14; //segment:ovl_i6 +func_i6_80196E50 = 0x80196E50; //segment:ovl_i6 +func_i6_80196FBC = 0x80196FBC; //segment:ovl_i6 +func_i6_80196FDC = 0x80196FDC; //segment:ovl_i6 +func_i6_8019703C = 0x8019703C; //segment:ovl_i6 +func_i6_80197084 = 0x80197084; //segment:ovl_i6 +func_i6_801970A4 = 0x801970A4; //segment:ovl_i6 +func_i6_80197138 = 0x80197138; //segment:ovl_i6 +func_i6_801971E0 = 0x801971E0; //segment:ovl_i6 +func_i6_80197470 = 0x80197470; //segment:ovl_i6 +func_i6_801975B4 = 0x801975B4; //segment:ovl_i6 +func_i6_8019771C = 0x8019771C; //segment:ovl_i6 +func_i6_801998F4 = 0x801998F4; //segment:ovl_i6 +func_i6_80199C5C = 0x80199C5C; //segment:ovl_i6 +func_i6_80199CC0 = 0x80199CC0; //segment:ovl_i6 +func_i6_80199CFC = 0x80199CFC; //segment:ovl_i6 +func_i6_80199D38 = 0x80199D38; //segment:ovl_i6 +func_i6_80199DA4 = 0x80199DA4; //segment:ovl_i6 +func_i6_80199DC4 = 0x80199DC4; //segment:ovl_i6 +func_i6_8019A3FC = 0x8019A3FC; //segment:ovl_i6 +func_i6_8019A68C = 0x8019A68C; //segment:ovl_i6 +func_i6_8019A81C = 0x8019A81C; //segment:ovl_i6 +func_i6_8019B5B0 = 0x8019B5B0; //segment:ovl_i6 +func_i6_8019B6E4 = 0x8019B6E4; //segment:ovl_i6 +func_i6_8019B738 = 0x8019B738; //segment:ovl_i6 +func_i6_8019B744 = 0x8019B744; //segment:ovl_i6 +func_i6_8019B998 = 0x8019B998; //segment:ovl_i6 +func_i6_8019BA04 = 0x8019BA04; //segment:ovl_i6 +func_i6_8019BCB8 = 0x8019BCB8; //segment:ovl_i6 +func_i6_8019BCC4 = 0x8019BCC4; //segment:ovl_i6 +func_i6_8019BE64 = 0x8019BE64; //segment:ovl_i6 +func_i6_8019C53C = 0x8019C53C; //segment:ovl_i6 +func_i6_8019C758 = 0x8019C758; //segment:ovl_i6 +func_i6_8019C9D0 = 0x8019C9D0; //segment:ovl_i6 +func_i6_8019CEA8 = 0x8019CEA8; //segment:ovl_i6 +func_i6_8019D7C8 = 0x8019D7C8; //segment:ovl_i6 +func_i6_8019D810 = 0x8019D810; //segment:ovl_i6 +func_i6_8019DE98 = 0x8019DE98; //segment:ovl_i6 +func_i6_8019DF84 = 0x8019DF84; //segment:ovl_i6 +func_i6_8019E0A4 = 0x8019E0A4; //segment:ovl_i6 +func_i6_8019E0D0 = 0x8019E0D0; //segment:ovl_i6 +func_i6_8019E28C = 0x8019E28C; //segment:ovl_i6 +func_i6_8019E2F4 = 0x8019E2F4; //segment:ovl_i6 +func_i6_8019E464 = 0x8019E464; //segment:ovl_i6 +func_i6_8019E548 = 0x8019E548; //segment:ovl_i6 +func_i6_8019E918 = 0x8019E918; //segment:ovl_i6 +func_i6_8019E944 = 0x8019E944; //segment:ovl_i6 +func_i6_8019EF78 = 0x8019EF78; //segment:ovl_i6 +func_i6_8019F01C = 0x8019F01C; //segment:ovl_i6 +func_i6_8019F138 = 0x8019F138; //segment:ovl_i6 +func_i6_8019F60C = 0x8019F60C; //segment:ovl_i6 +func_i6_8019F664 = 0x8019F664; //segment:ovl_i6 +func_i6_8019FBE4 = 0x8019FBE4; //segment:ovl_i6 +func_i6_801A02CC = 0x801A02CC; //segment:ovl_i6 +func_i6_801A1684 = 0x801A1684; //segment:ovl_i6 +func_i6_801A1848 = 0x801A1848; //segment:ovl_i6 +func_i6_801A1A4C = 0x801A1A4C; //segment:ovl_i6 +func_i6_801A1CFC = 0x801A1CFC; //segment:ovl_i6 +func_i6_801A25B8 = 0x801A25B8; //segment:ovl_i6 +func_i6_801A2898 = 0x801A2898; //segment:ovl_i6 +func_i6_801A391C = 0x801A391C; //segment:ovl_i6 +func_i6_801A3F2C = 0x801A3F2C; //segment:ovl_i6 +func_i6_801A40C0 = 0x801A40C0; //segment:ovl_i6 +func_i6_801A4218 = 0x801A4218; //segment:ovl_i6 +func_i6_801A4424 = 0x801A4424; //segment:ovl_i6 +func_i6_801A44DC = 0x801A44DC; //segment:ovl_i6 +func_i6_801A7418 = 0x801A7418; //segment:ovl_i6 +func_i6_801A756C = 0x801A756C; //segment:ovl_i6 +func_i6_801A75F0 = 0x801A75F0; //segment:ovl_i6 +func_i6_801A8434 = 0x801A8434; //segment:ovl_i6 +func_i6_801A8650 = 0x801A8650; //segment:ovl_i6 +func_i6_801A86CC = 0x801A86CC; //segment:ovl_i6 +func_i6_801A8860 = 0x801A8860; //segment:ovl_i6 +func_i6_801A8CD4 = 0x801A8CD4; //segment:ovl_i6 +func_i6_801A8F70 = 0x801A8F70; //segment:ovl_i6 +func_i6_801A922C = 0x801A922C; //segment:ovl_i6 +func_i6_801A92B8 = 0x801A92B8; //segment:ovl_i6 +func_i6_801A94E4 = 0x801A94E4; //segment:ovl_i6 +func_i6_801A99D0 = 0x801A99D0; //segment:ovl_i6 +func_i6_801A9B74 = 0x801A9B74; //segment:ovl_i6 +D_i6_801AA170 = 0x801AA170; //segment:ovl_i6 +D_i6_801AA180 = 0x801AA180; //segment:ovl_i6 +D_i6_801AA1A0 = 0x801AA1A0; //segment:ovl_i6 +D_i6_801AA1C8 = 0x801AA1C8; //segment:ovl_i6 +D_i6_801AA1D4 = 0x801AA1D4; //segment:ovl_i6 +D_i6_801AA1E0 = 0x801AA1E0; //segment:ovl_i6 +D_i6_801AA1E4 = 0x801AA1E4; //segment:ovl_i6 +D_i6_801AA1E8 = 0x801AA1E8; //segment:ovl_i6 +D_i6_801AA1EC = 0x801AA1EC; //segment:ovl_i6 +D_i6_801AA1F8 = 0x801AA1F8; //segment:ovl_i6 +D_i6_801AA1FC = 0x801AA1FC; //segment:ovl_i6 +D_i6_801AA200 = 0x801AA200; //segment:ovl_i6 +D_i6_801AA204 = 0x801AA204; //segment:ovl_i6 +D_i6_801AA210 = 0x801AA210; //segment:ovl_i6 +D_i6_801AA21C = 0x801AA21C; //segment:ovl_i6 +D_i6_801AA228 = 0x801AA228; //segment:ovl_i6 +D_i6_801AA234 = 0x801AA234; //segment:ovl_i6 +D_i6_801AA240 = 0x801AA240; //segment:ovl_i6 +D_i6_801AA24C = 0x801AA24C; //segment:ovl_i6 +D_i6_801AA258 = 0x801AA258; //segment:ovl_i6 +D_i6_801AA264 = 0x801AA264; //segment:ovl_i6 +D_i6_801AA270 = 0x801AA270; //segment:ovl_i6 +D_i6_801AA27C = 0x801AA27C; //segment:ovl_i6 +D_i6_801AA288 = 0x801AA288; //segment:ovl_i6 +D_i6_801AA2C0 = 0x801AA2C0; //segment:ovl_i6 +D_i6_801AA2CC = 0x801AA2CC; //segment:ovl_i6 +D_i6_801AA30C = 0x801AA30C; //segment:ovl_i6 +D_i6_801AA318 = 0x801AA318; //segment:ovl_i6 +D_i6_801AA320 = 0x801AA320; //segment:ovl_i6 +D_i6_801AA350 = 0x801AA350; //segment:ovl_i6 +D_i6_801AA35C = 0x801AA35C; //segment:ovl_i6 +D_i6_801AA368 = 0x801AA368; //segment:ovl_i6 +D_i6_801AA374 = 0x801AA374; //segment:ovl_i6 +D_i6_801AA380 = 0x801AA380; //segment:ovl_i6 +D_i6_801AA38C = 0x801AA38C; //segment:ovl_i6 +D_i6_801AA398 = 0x801AA398; //segment:ovl_i6 +D_i6_801AA3A4 = 0x801AA3A4; //segment:ovl_i6 +D_i6_801AA3B0 = 0x801AA3B0; //segment:ovl_i6 +D_i6_801AA3BC = 0x801AA3BC; //segment:ovl_i6 +D_i6_801AA40C = 0x801AA40C; //segment:ovl_i6 +D_i6_801AA484 = 0x801AA484; //segment:ovl_i6 +D_i6_801AA4FC = 0x801AA4FC; //segment:ovl_i6 +D_i6_801AA538 = 0x801AA538; //segment:ovl_i6 +D_i6_801AA544 = 0x801AA544; //segment:ovl_i6 +D_i6_801AA550 = 0x801AA550; //segment:ovl_i6 +D_i6_801AA568 = 0x801AA568; //segment:ovl_i6 +D_i6_801AA574 = 0x801AA574; //segment:ovl_i6 +D_i6_801AA590 = 0x801AA590; //segment:ovl_i6 +D_801AB940 = 0x801AB940; //segment:ovl_i6 +D_i6_801AB950 = 0x801AB950; //segment:ovl_i6 +D_i6_801AB954 = 0x801AB954; //segment:ovl_i6 +D_i6_801AB958 = 0x801AB958; //segment:ovl_i6 +D_i6_801AB95C = 0x801AB95C; //segment:ovl_i6 +D_i6_801AB960 = 0x801AB960; //segment:ovl_i6 +D_i6_801AB964 = 0x801AB964; //segment:ovl_i6 +D_i6_801AB968 = 0x801AB968; //segment:ovl_i6 +D_i6_801AB96C = 0x801AB96C; //segment:ovl_i6 +D_i6_801AB970 = 0x801AB970; //segment:ovl_i6 +D_i6_801AB974 = 0x801AB974; //segment:ovl_i6 +D_i6_801AB978 = 0x801AB978; //segment:ovl_i6 +D_i6_801AB97C = 0x801AB97C; //segment:ovl_i6 +D_i6_801AB980 = 0x801AB980; //segment:ovl_i6 +D_i6_801AB984 = 0x801AB984; //segment:ovl_i6 +D_i6_801AB988 = 0x801AB988; //segment:ovl_i6 +D_i6_801AB98C = 0x801AB98C; //segment:ovl_i6 +D_i6_801AB990 = 0x801AB990; //segment:ovl_i6 +D_i6_801ABE40 = 0x801ABE40; //segment:ovl_i6 +D_i6_801ABE50 = 0x801ABE50; //segment:ovl_i6 + +func_menu_8018B020 = 0x8018B020; //segment:ovl_menu +func_menu_8018B0E0 = 0x8018B0E0; //segment:ovl_menu +func_menu_8018B254 = 0x8018B254; //segment:ovl_menu +func_menu_8018B2F0 = 0x8018B2F0; //segment:ovl_menu +func_menu_8018B3D8 = 0x8018B3D8; //segment:ovl_menu +func_menu_8018B5BC = 0x8018B5BC; //segment:ovl_menu +func_menu_8018B600 = 0x8018B600; //segment:ovl_menu +func_menu_8018B7A8 = 0x8018B7A8; //segment:ovl_menu +func_menu_8018B8B4 = 0x8018B8B4; //segment:ovl_menu +func_menu_8018BAFC = 0x8018BAFC; //segment:ovl_menu +func_menu_8018BCE8 = 0x8018BCE8; //segment:ovl_menu +func_menu_8018C3C4 = 0x8018C3C4; //segment:ovl_menu +func_menu_8018CCE4 = 0x8018CCE4; //segment:ovl_menu +func_menu_8018CFC4 = 0x8018CFC4; //segment:ovl_menu +func_menu_8018D42C = 0x8018D42C; //segment:ovl_menu +func_menu_8018DE08 = 0x8018DE08; //segment:ovl_menu +func_menu_8018DE48 = 0x8018DE48; //segment:ovl_menu +func_menu_8018E154 = 0x8018E154; //segment:ovl_menu +func_menu_8018E4A0 = 0x8018E4A0; //segment:ovl_menu +func_menu_8018E6D0 = 0x8018E6D0; //segment:ovl_menu +func_menu_8018E7FC = 0x8018E7FC; //segment:ovl_menu +func_menu_8018EB48 = 0x8018EB48; //segment:ovl_menu +func_menu_8018EB68 = 0x8018EB68; //segment:ovl_menu +func_menu_8018F0D4 = 0x8018F0D4; //segment:ovl_menu +func_menu_8018FC58 = 0x8018FC58; //segment:ovl_menu +func_menu_8018FD04 = 0x8018FD04; //segment:ovl_menu +func_menu_80190188 = 0x80190188; //segment:ovl_menu +func_menu_801906D4 = 0x801906D4; //segment:ovl_menu +func_menu_80190774 = 0x80190774; //segment:ovl_menu +func_menu_801908E0 = 0x801908E0; //segment:ovl_menu +func_menu_80190DFC = 0x80190DFC; //segment:ovl_menu +func_menu_80191054 = 0x80191054; //segment:ovl_menu +func_menu_80191350 = 0x80191350; //segment:ovl_menu +func_menu_801918D4 = 0x801918D4; //segment:ovl_menu +func_menu_80191A28 = 0x80191A28; //segment:ovl_menu +func_menu_80191B74 = 0x80191B74; //segment:ovl_menu +func_menu_80191D1C = 0x80191D1C; //segment:ovl_menu +func_menu_80192184 = 0x80192184; //segment:ovl_menu +func_menu_80192580 = 0x80192580; //segment:ovl_menu +func_menu_801928D0 = 0x801928D0; //segment:ovl_menu +func_menu_80192F40 = 0x80192F40; //segment:ovl_menu +func_menu_80193188 = 0x80193188; //segment:ovl_menu +func_menu_80193280 = 0x80193280; //segment:ovl_menu +func_menu_80193360 = 0x80193360; //segment:ovl_menu +func_menu_801933E8 = 0x801933E8; //segment:ovl_menu +func_menu_801937BC = 0x801937BC; //segment:ovl_menu +func_menu_801938B0 = 0x801938B0; //segment:ovl_menu +func_menu_80193B58 = 0x80193B58; //segment:ovl_menu +func_menu_80193D28 = 0x80193D28; //segment:ovl_menu +func_menu_80193F9C = 0x80193F9C; //segment:ovl_menu +func_menu_80194284 = 0x80194284; //segment:ovl_menu +func_menu_80194670 = 0x80194670; //segment:ovl_menu +func_menu_801947B8 = 0x801947B8; //segment:ovl_menu +func_menu_80194850 = 0x80194850; //segment:ovl_menu +func_menu_801949BC = 0x801949BC; //segment:ovl_menu +func_menu_80194BA8 = 0x80194BA8; //segment:ovl_menu +func_menu_80194BE8 = 0x80194BE8; //segment:ovl_menu +func_menu_80194D14 = 0x80194D14; //segment:ovl_menu +func_menu_80194E60 = 0x80194E60; //segment:ovl_menu +func_menu_80194FE4 = 0x80194FE4; //segment:ovl_menu +func_menu_80195064 = 0x80195064; //segment:ovl_menu +func_menu_801951F0 = 0x801951F0; //segment:ovl_menu +func_menu_801953B8 = 0x801953B8; //segment:ovl_menu +func_menu_801954DC = 0x801954DC; //segment:ovl_menu +func_menu_80195588 = 0x80195588; //segment:ovl_menu +func_menu_80195640 = 0x80195640; //segment:ovl_menu +func_menu_80195708 = 0x80195708; //segment:ovl_menu +func_menu_80195880 = 0x80195880; //segment:ovl_menu +func_menu_80195E4C = 0x80195E4C; //segment:ovl_menu +func_menu_80195F18 = 0x80195F18; //segment:ovl_menu +func_menu_801960D8 = 0x801960D8; //segment:ovl_menu +func_menu_8019626C = 0x8019626C; //segment:ovl_menu +func_menu_80196408 = 0x80196408; //segment:ovl_menu +func_menu_801964EC = 0x801964EC; //segment:ovl_menu +func_menu_8019668C = 0x8019668C; //segment:ovl_menu +func_menu_80196810 = 0x80196810; //segment:ovl_menu +func_menu_8019688C = 0x8019688C; //segment:ovl_menu +func_menu_80196944 = 0x80196944; //segment:ovl_menu +func_menu_80196D60 = 0x80196D60; //segment:ovl_menu +func_menu_801979D8 = 0x801979D8; //segment:ovl_menu +func_menu_80197C78 = 0x80197C78; //segment:ovl_menu +func_menu_80197DE0 = 0x80197DE0; //segment:ovl_menu +func_menu_80198700 = 0x80198700; //segment:ovl_menu +func_menu_80198888 = 0x80198888; //segment:ovl_menu +func_menu_80198AB8 = 0x80198AB8; //segment:ovl_menu +func_menu_80198CFC = 0x80198CFC; //segment:ovl_menu +func_menu_80198DE0 = 0x80198DE0; //segment:ovl_menu +func_menu_80198F04 = 0x80198F04; //segment:ovl_menu +func_menu_801996C0 = 0x801996C0; //segment:ovl_menu +func_menu_80199CFC = 0x80199CFC; //segment:ovl_menu +func_menu_80199D64 = 0x80199D64; //segment:ovl_menu +func_menu_80199F94 = 0x80199F94; //segment:ovl_menu +func_menu_8019A69C = 0x8019A69C; //segment:ovl_menu +func_menu_8019A724 = 0x8019A724; //segment:ovl_menu +func_menu_8019A790 = 0x8019A790; //segment:ovl_menu +func_menu_8019A930 = 0x8019A930; //segment:ovl_menu +func_menu_8019AAC8 = 0x8019AAC8; //segment:ovl_menu +func_menu_8019AC74 = 0x8019AC74; //segment:ovl_menu +func_menu_8019B274 = 0x8019B274; //segment:ovl_menu +func_menu_8019B490 = 0x8019B490; //segment:ovl_menu +func_menu_8019B4D4 = 0x8019B4D4; //segment:ovl_menu +func_menu_8019B754 = 0x8019B754; //segment:ovl_menu +func_menu_8019B970 = 0x8019B970; //segment:ovl_menu +func_menu_8019BFF0 = 0x8019BFF0; //segment:ovl_menu +func_menu_8019C098 = 0x8019C098; //segment:ovl_menu +func_menu_8019C138 = 0x8019C138; //segment:ovl_menu +func_menu_8019C160 = 0x8019C160; //segment:ovl_menu +func_menu_8019C210 = 0x8019C210; //segment:ovl_menu +func_menu_8019C2F8 = 0x8019C2F8; //segment:ovl_menu +func_menu_8019C55C = 0x8019C55C; //segment:ovl_menu +func_menu_8019C6E8 = 0x8019C6E8; //segment:ovl_menu +func_menu_8019CAD0 = 0x8019CAD0; //segment:ovl_menu +func_menu_8019CBF8 = 0x8019CBF8; //segment:ovl_menu +func_menu_8019CF60 = 0x8019CF60; //segment:ovl_menu +func_menu_8019D014 = 0x8019D014; //segment:ovl_menu +func_menu_8019D2D8 = 0x8019D2D8; //segment:ovl_menu +func_menu_8019D4C8 = 0x8019D4C8; //segment:ovl_menu +func_menu_8019D614 = 0x8019D614; //segment:ovl_menu +func_menu_8019D834 = 0x8019D834; //segment:ovl_menu +func_menu_8019D96C = 0x8019D96C; //segment:ovl_menu +func_menu_8019DB98 = 0x8019DB98; //segment:ovl_menu +func_menu_8019DCD8 = 0x8019DCD8; //segment:ovl_menu +func_menu_8019E504 = 0x8019E504; //segment:ovl_menu +func_menu_8019E5F0 = 0x8019E5F0; //segment:ovl_menu +func_menu_8019E630 = 0x8019E630; //segment:ovl_menu +func_menu_8019E790 = 0x8019E790; //segment:ovl_menu +func_menu_8019E808 = 0x8019E808; //segment:ovl_menu +func_menu_8019EAF8 = 0x8019EAF8; //segment:ovl_menu +func_menu_8019EB8C = 0x8019EB8C; //segment:ovl_menu +func_menu_8019F278 = 0x8019F278; //segment:ovl_menu +func_menu_8019F378 = 0x8019F378; //segment:ovl_menu +func_menu_8019F450 = 0x8019F450; //segment:ovl_menu +func_menu_8019F47C = 0x8019F47C; //segment:ovl_menu +func_menu_8019F4E8 = 0x8019F4E8; //segment:ovl_menu +func_menu_8019F56C = 0x8019F56C; //segment:ovl_menu +func_menu_8019F5D8 = 0x8019F5D8; //segment:ovl_menu +func_menu_8019F65C = 0x8019F65C; //segment:ovl_menu +func_menu_8019F6A4 = 0x8019F6A4; //segment:ovl_menu +func_menu_8019F8A0 = 0x8019F8A0; //segment:ovl_menu +func_menu_8019FAA0 = 0x8019FAA0; //segment:ovl_menu +func_menu_8019FD18 = 0x8019FD18; //segment:ovl_menu +func_menu_8019FE78 = 0x8019FE78; //segment:ovl_menu +func_menu_8019FEF4 = 0x8019FEF4; //segment:ovl_menu +func_menu_801A01AC = 0x801A01AC; //segment:ovl_menu +func_menu_801A04CC = 0x801A04CC; //segment:ovl_menu +func_menu_801A0710 = 0x801A0710; //segment:ovl_menu +func_menu_801A0944 = 0x801A0944; //segment:ovl_menu +func_menu_801A0B70 = 0x801A0B70; //segment:ovl_menu +func_menu_801A0C9C = 0x801A0C9C; //segment:ovl_menu +func_menu_801A0D98 = 0x801A0D98; //segment:ovl_menu +func_menu_801A0EBC = 0x801A0EBC; //segment:ovl_menu +func_menu_801A0EE4 = 0x801A0EE4; //segment:ovl_menu +func_menu_801A0FE4 = 0x801A0FE4; //segment:ovl_menu +func_menu_801A10E4 = 0x801A10E4; //segment:ovl_menu +func_menu_801A11D0 = 0x801A11D0; //segment:ovl_menu +func_menu_801A1270 = 0x801A1270; //segment:ovl_menu +func_menu_801A141C = 0x801A141C; //segment:ovl_menu +func_menu_801A14A8 = 0x801A14A8; //segment:ovl_menu +func_menu_801A1560 = 0x801A1560; //segment:ovl_menu +func_menu_801A1678 = 0x801A1678; //segment:ovl_menu +func_menu_801A174C = 0x801A174C; //segment:ovl_menu +func_menu_801A1A44 = 0x801A1A44; //segment:ovl_menu +func_menu_801A1BCC = 0x801A1BCC; //segment:ovl_menu +func_menu_801A1C98 = 0x801A1C98; //segment:ovl_menu +func_menu_801A1E54 = 0x801A1E54; //segment:ovl_menu +func_menu_801A1EF4 = 0x801A1EF4; //segment:ovl_menu +func_menu_801A2110 = 0x801A2110; //segment:ovl_menu +func_menu_801A21F0 = 0x801A21F0; //segment:ovl_menu +func_menu_801A2388 = 0x801A2388; //segment:ovl_menu +func_menu_801A275C = 0x801A275C; //segment:ovl_menu +func_menu_801A2C80 = 0x801A2C80; //segment:ovl_menu +func_menu_801A317C = 0x801A317C; //segment:ovl_menu +func_menu_801A3344 = 0x801A3344; //segment:ovl_menu +func_menu_801A33A0 = 0x801A33A0; //segment:ovl_menu +func_menu_801A34E8 = 0x801A34E8; //segment:ovl_menu +func_menu_801A35D8 = 0x801A35D8; //segment:ovl_menu +func_menu_801A369C = 0x801A369C; //segment:ovl_menu +func_menu_801A38F0 = 0x801A38F0; //segment:ovl_menu +func_menu_801A3E00 = 0x801A3E00; //segment:ovl_menu +func_menu_801A3E5C = 0x801A3E5C; //segment:ovl_menu +func_menu_801A3EC8 = 0x801A3EC8; //segment:ovl_menu +func_menu_801A3ED0 = 0x801A3ED0; //segment:ovl_menu +func_menu_801A3F9C = 0x801A3F9C; //segment:ovl_menu +func_menu_801A4764 = 0x801A4764; //segment:ovl_menu +func_menu_801A4A2C = 0x801A4A2C; //segment:ovl_menu +func_menu_801A4C00 = 0x801A4C00; //segment:ovl_menu +func_menu_801A4E3C = 0x801A4E3C; //segment:ovl_menu +func_menu_801A4F14 = 0x801A4F14; //segment:ovl_menu +func_menu_801A4F80 = 0x801A4F80; //segment:ovl_menu +func_menu_801A5020 = 0x801A5020; //segment:ovl_menu +func_menu_801A5208 = 0x801A5208; //segment:ovl_menu +func_menu_801A5320 = 0x801A5320; //segment:ovl_menu +func_menu_801A554C = 0x801A554C; //segment:ovl_menu +func_menu_801A57AC = 0x801A57AC; //segment:ovl_menu +func_menu_801A5BB8 = 0x801A5BB8; //segment:ovl_menu +func_menu_801A5D8C = 0x801A5D8C; //segment:ovl_menu +func_menu_801A5DEC = 0x801A5DEC; //segment:ovl_menu +func_menu_801A5F58 = 0x801A5F58; //segment:ovl_menu +func_menu_801A63B4 = 0x801A63B4; //segment:ovl_menu +func_menu_801A6810 = 0x801A6810; //segment:ovl_menu +func_menu_801A6BCC = 0x801A6BCC; //segment:ovl_menu +func_menu_801A704C = 0x801A704C; //segment:ovl_menu +func_menu_801A7238 = 0x801A7238; //segment:ovl_menu +func_menu_801A7364 = 0x801A7364; //segment:ovl_menu +func_menu_801A794C = 0x801A794C; //segment:ovl_menu +func_menu_801A7C10 = 0x801A7C10; //segment:ovl_menu +func_menu_801A7CBC = 0x801A7CBC; //segment:ovl_menu +func_menu_801A7E64 = 0x801A7E64; //segment:ovl_menu +func_menu_801A81D8 = 0x801A81D8; //segment:ovl_menu +func_menu_801A8504 = 0x801A8504; //segment:ovl_menu +func_menu_801A8A8C = 0x801A8A8C; //segment:ovl_menu +func_menu_801A8B9C = 0x801A8B9C; //segment:ovl_menu +func_menu_801A8CF4 = 0x801A8CF4; //segment:ovl_menu +func_menu_801A904C = 0x801A904C; //segment:ovl_menu +func_menu_801A99E8 = 0x801A99E8; //segment:ovl_menu +func_menu_801A9CA8 = 0x801A9CA8; //segment:ovl_menu +func_menu_801A9F18 = 0x801A9F18; //segment:ovl_menu +func_menu_801AA090 = 0x801AA090; //segment:ovl_menu +func_menu_801AA140 = 0x801AA140; //segment:ovl_menu +func_menu_801AA364 = 0x801AA364; //segment:ovl_menu +func_menu_801AA3D4 = 0x801AA3D4; //segment:ovl_menu +func_menu_801AA5E4 = 0x801AA5E4; //segment:ovl_menu +func_menu_801AA61C = 0x801AA61C; //segment:ovl_menu +func_menu_801AAA20 = 0x801AAA20; //segment:ovl_menu +func_menu_801AADCC = 0x801AADCC; //segment:ovl_menu +func_menu_801AAE90 = 0x801AAE90; //segment:ovl_menu +func_menu_801AB418 = 0x801AB418; //segment:ovl_menu +func_menu_801AB608 = 0x801AB608; //segment:ovl_menu +func_menu_801AB93C = 0x801AB93C; //segment:ovl_menu +func_menu_801ABA84 = 0x801ABA84; //segment:ovl_menu +func_menu_801ABAF0 = 0x801ABAF0; //segment:ovl_menu +func_menu_801ABC08 = 0x801ABC08; //segment:ovl_menu +func_menu_801ABCE4 = 0x801ABCE4; //segment:ovl_menu +func_menu_801ABD24 = 0x801ABD24; //segment:ovl_menu +func_menu_801ABDB0 = 0x801ABDB0; //segment:ovl_menu +func_menu_801ABE1C = 0x801ABE1C; //segment:ovl_menu +func_menu_801AC06C = 0x801AC06C; //segment:ovl_menu +func_menu_801AC1AC = 0x801AC1AC; //segment:ovl_menu +func_menu_801AC220 = 0x801AC220; //segment:ovl_menu +func_menu_801AC534 = 0x801AC534; //segment:ovl_menu +func_menu_801AC648 = 0x801AC648; //segment:ovl_menu +func_menu_801AC9B8 = 0x801AC9B8; //segment:ovl_menu +func_menu_801ACC7C = 0x801ACC7C; //segment:ovl_menu +func_menu_801ACE0C = 0x801ACE0C; //segment:ovl_menu +func_menu_801ACF38 = 0x801ACF38; //segment:ovl_menu +func_menu_801AD0A4 = 0x801AD0A4; //segment:ovl_menu +func_menu_801AD20C = 0x801AD20C; //segment:ovl_menu +func_menu_801AD374 = 0x801AD374; //segment:ovl_menu +func_menu_801AD4C4 = 0x801AD4C4; //segment:ovl_menu +func_menu_801AD6A4 = 0x801AD6A4; //segment:ovl_menu +func_menu_801AD824 = 0x801AD824; //segment:ovl_menu +func_menu_801ADEC0 = 0x801ADEC0; //segment:ovl_menu +func_menu_801AE144 = 0x801AE144; //segment:ovl_menu +func_menu_801AE6C8 = 0x801AE6C8; //segment:ovl_menu +func_menu_801AE8D4 = 0x801AE8D4; //segment:ovl_menu +func_menu_801AE9AC = 0x801AE9AC; //segment:ovl_menu +func_menu_801AEBD0 = 0x801AEBD0; //segment:ovl_menu +func_menu_801AEF9C = 0x801AEF9C; //segment:ovl_menu +func_menu_801AF098 = 0x801AF098; //segment:ovl_menu +func_menu_801AF23C = 0x801AF23C; //segment:ovl_menu +func_menu_801AF600 = 0x801AF600; //segment:ovl_menu +func_menu_801AF6FC = 0x801AF6FC; //segment:ovl_menu +func_menu_801AF848 = 0x801AF848; //segment:ovl_menu +func_menu_801AFA40 = 0x801AFA40; //segment:ovl_menu +func_menu_801AFCA8 = 0x801AFCA8; //segment:ovl_menu +func_menu_801AFFF0 = 0x801AFFF0; //segment:ovl_menu +func_menu_801B09F4 = 0x801B09F4; //segment:ovl_menu +func_menu_801B0AFC = 0x801B0AFC; //segment:ovl_menu +func_menu_801B0BB8 = 0x801B0BB8; //segment:ovl_menu +func_menu_801B1258 = 0x801B1258; //segment:ovl_menu +func_menu_801B15BC = 0x801B15BC; //segment:ovl_menu +func_menu_801B17FC = 0x801B17FC; //segment:ovl_menu +func_menu_801B1AE0 = 0x801B1AE0; //segment:ovl_menu +func_menu_801B1E10 = 0x801B1E10; //segment:ovl_menu +func_menu_801B20EC = 0x801B20EC; //segment:ovl_menu +func_menu_801B2280 = 0x801B2280; //segment:ovl_menu +func_menu_801B2670 = 0x801B2670; //segment:ovl_menu +func_menu_801B2938 = 0x801B2938; //segment:ovl_menu +func_menu_801B2A0C = 0x801B2A0C; //segment:ovl_menu +func_menu_801B3008 = 0x801B3008; //segment:ovl_menu +func_menu_801B30DC = 0x801B30DC; //segment:ovl_menu +D_menu_801B32E0 = 0x801B32E0; //segment:ovl_menu +D_menu_801B32F0 = 0x801B32F0; //segment:ovl_menu +D_menu_801B32F4 = 0x801B32F4; //segment:ovl_menu +D_menu_801B32F8 = 0x801B32F8; //segment:ovl_menu +D_menu_801B3320 = 0x801B3320; //segment:ovl_menu +D_menu_801B332C = 0x801B332C; //segment:ovl_menu +D_menu_801B3338 = 0x801B3338; //segment:ovl_menu +D_menu_801B3344 = 0x801B3344; //segment:ovl_menu +D_menu_801B3350 = 0x801B3350; //segment:ovl_menu +D_menu_801B335C = 0x801B335C; //segment:ovl_menu +D_menu_801B3360 = 0x801B3360; //segment:ovl_menu +D_menu_801B3364 = 0x801B3364; //segment:ovl_menu +D_menu_801B3368 = 0x801B3368; //segment:ovl_menu +D_menu_801B3378 = 0x801B3378; //segment:ovl_menu +D_menu_801B3388 = 0x801B3388; //segment:ovl_menu +D_menu_801B338C = 0x801B338C; //segment:ovl_menu +D_menu_801B383C = 0x801B383C; //segment:ovl_menu +D_menu_801B3844 = 0x801B3844; //segment:ovl_menu +D_menu_801B3874 = 0x801B3874; //segment:ovl_menu +D_menu_801B3D24 = 0x801B3D24; //segment:ovl_menu +D_menu_801B3D34 = 0x801B3D34; //segment:ovl_menu +D_menu_801B3D44 = 0x801B3D44; //segment:ovl_menu +D_menu_801B3D54 = 0x801B3D54; //segment:ovl_menu +D_menu_801B3D60 = 0x801B3D60; //segment:ovl_menu +D_menu_801B3D68 = 0x801B3D68; //segment:ovl_menu +D_menu_801B3D74 = 0x801B3D74; //segment:ovl_menu +D_menu_801B3D80 = 0x801B3D80; //segment:ovl_menu +D_menu_801B3D90 = 0x801B3D90; //segment:ovl_menu +D_menu_801B3D9C = 0x801B3D9C; //segment:ovl_menu +D_menu_801B3DA8 = 0x801B3DA8; //segment:ovl_menu +D_menu_801B3DB4 = 0x801B3DB4; //segment:ovl_menu +D_menu_801B3DC0 = 0x801B3DC0; //segment:ovl_menu +D_menu_801B3DD0 = 0x801B3DD0; //segment:ovl_menu +D_menu_801B3DE8 = 0x801B3DE8; //segment:ovl_menu +D_menu_801B3DF0 = 0x801B3DF0; //segment:ovl_menu +D_menu_801B3E00 = 0x801B3E00; //segment:ovl_menu +D_menu_801B3E20 = 0x801B3E20; //segment:ovl_menu +D_menu_801B3E30 = 0x801B3E30; //segment:ovl_menu +D_menu_801B3E50 = 0x801B3E50; //segment:ovl_menu +D_menu_801B3E54 = 0x801B3E54; //segment:ovl_menu +D_menu_801B3E5C = 0x801B3E5C; //segment:ovl_menu +D_menu_801B3E6C = 0x801B3E6C; //segment:ovl_menu +D_menu_801B3E8C = 0x801B3E8C; //segment:ovl_menu +D_menu_801B3E90 = 0x801B3E90; //segment:ovl_menu +D_menu_801B3E9C = 0x801B3E9C; //segment:ovl_menu +D_menu_801B3EA8 = 0x801B3EA8; //segment:ovl_menu +D_menu_801B3EB4 = 0x801B3EB4; //segment:ovl_menu +D_menu_801B3EC0 = 0x801B3EC0; //segment:ovl_menu +D_menu_801B3EC8 = 0x801B3EC8; //segment:ovl_menu +D_menu_801B3ED0 = 0x801B3ED0; //segment:ovl_menu +D_menu_801B3EDC = 0x801B3EDC; //segment:ovl_menu +D_menu_801B3EE8 = 0x801B3EE8; //segment:ovl_menu +D_menu_801B3EF0 = 0x801B3EF0; //segment:ovl_menu +D_menu_801B3EF8 = 0x801B3EF8; //segment:ovl_menu +D_menu_801B3F04 = 0x801B3F04; //segment:ovl_menu +D_menu_801B3F10 = 0x801B3F10; //segment:ovl_menu +D_menu_801B3F14 = 0x801B3F14; //segment:ovl_menu +D_menu_801B3F18 = 0x801B3F18; //segment:ovl_menu +D_menu_801B3F1C = 0x801B3F1C; //segment:ovl_menu +D_menu_801B3F20 = 0x801B3F20; //segment:ovl_menu +D_menu_801B3F2C = 0x801B3F2C; //segment:ovl_menu +D_menu_801B3F40 = 0x801B3F40; //segment:ovl_menu +D_menu_801B3F5C = 0x801B3F5C; //segment:ovl_menu +D_menu_801B3FB0 = 0x801B3FB0; //segment:ovl_menu +D_menu_801B3FB4 = 0x801B3FB4; //segment:ovl_menu +D_menu_801B3FB8 = 0x801B3FB8; //segment:ovl_menu +D_menu_801B3FCC = 0x801B3FCC; //segment:ovl_menu +D_menu_801B4020 = 0x801B4020; //segment:ovl_menu +D_menu_801B4074 = 0x801B4074; //segment:ovl_menu +D_menu_801B407C = 0x801B407C; //segment:ovl_menu +D_menu_801B4080 = 0x801B4080; //segment:ovl_menu +D_menu_801B40C8 = 0x801B40C8; //segment:ovl_menu +D_menu_801B411C = 0x801B411C; //segment:ovl_menu +D_menu_801B4120 = 0x801B4120; //segment:ovl_menu +D_menu_801B4134 = 0x801B4134; //segment:ovl_menu +D_menu_801B4138 = 0x801B4138; //segment:ovl_menu +D_menu_801B414C = 0x801B414C; //segment:ovl_menu +D_menu_801B4150 = 0x801B4150; //segment:ovl_menu +D_menu_801B4164 = 0x801B4164; //segment:ovl_menu +D_menu_801B4168 = 0x801B4168; //segment:ovl_menu +D_menu_801B417C = 0x801B417C; //segment:ovl_menu +D_menu_801B418C = 0x801B418C; //segment:ovl_menu +D_menu_801B41D0 = 0x801B41D0; //segment:ovl_menu +D_menu_801B41D4 = 0x801B41D4; //segment:ovl_menu +D_menu_801B41E8 = 0x801B41E8; //segment:ovl_menu +D_menu_801B41EC = 0x801B41EC; //segment:ovl_menu +D_menu_801B4200 = 0x801B4200; //segment:ovl_menu +D_menu_801B420C = 0x801B420C; //segment:ovl_menu +D_menu_801B4210 = 0x801B4210; //segment:ovl_menu +D_menu_801B4214 = 0x801B4214; //segment:ovl_menu +D_menu_801B4228 = 0x801B4228; //segment:ovl_menu +D_menu_801B422C = 0x801B422C; //segment:ovl_menu +D_menu_801B4230 = 0x801B4230; //segment:ovl_menu +D_menu_801B4234 = 0x801B4234; //segment:ovl_menu +D_menu_801B4248 = 0x801B4248; //segment:ovl_menu +D_menu_801B424C = 0x801B424C; //segment:ovl_menu +D_menu_801B4250 = 0x801B4250; //segment:ovl_menu +D_menu_801B4254 = 0x801B4254; //segment:ovl_menu +D_menu_801B4258 = 0x801B4258; //segment:ovl_menu +D_menu_801B4268 = 0x801B4268; //segment:ovl_menu +D_menu_801B4269 = 0x801B4269; //segment:ovl_menu +D_menu_801B4280 = 0x801B4280; //segment:ovl_menu +D_menu_801B4284 = 0x801B4284; //segment:ovl_menu +D_menu_801B4288 = 0x801B4288; //segment:ovl_menu +D_menu_801B428C = 0x801B428C; //segment:ovl_menu +D_menu_801B42A4 = 0x801B42A4; //segment:ovl_menu +D_menu_801B42A8 = 0x801B42A8; //segment:ovl_menu +D_menu_801B42AC = 0x801B42AC; //segment:ovl_menu +D_menu_801B42B0 = 0x801B42B0; //segment:ovl_menu +D_menu_801B42C0 = 0x801B42C0; //segment:ovl_menu +D_menu_801B42C1 = 0x801B42C1; //segment:ovl_menu +D_menu_801B42D8 = 0x801B42D8; //segment:ovl_menu +D_menu_801B42DC = 0x801B42DC; //segment:ovl_menu +D_menu_801B42E0 = 0x801B42E0; //segment:ovl_menu +D_menu_801B42E4 = 0x801B42E4; //segment:ovl_menu +D_menu_801B42FC = 0x801B42FC; //segment:ovl_menu +D_menu_801B4300 = 0x801B4300; //segment:ovl_menu +D_menu_801B4304 = 0x801B4304; //segment:ovl_menu +D_menu_801B4308 = 0x801B4308; //segment:ovl_menu +D_menu_801B4318 = 0x801B4318; //segment:ovl_menu +D_menu_801B4319 = 0x801B4319; //segment:ovl_menu +D_menu_801B431C = 0x801B431C; //segment:ovl_menu +D_menu_801B4350 = 0x801B4350; //segment:ovl_menu +D_menu_801B4374 = 0x801B4374; //segment:ovl_menu +D_menu_801B447C = 0x801B447C; //segment:ovl_menu +D_menu_801B4488 = 0x801B4488; //segment:ovl_menu +D_menu_801B4490 = 0x801B4490; //segment:ovl_menu +D_menu_801B44AC = 0x801B44AC; //segment:ovl_menu +D_menu_801B44D0 = 0x801B44D0; //segment:ovl_menu +D_menu_801B44F4 = 0x801B44F4; //segment:ovl_menu +D_menu_801B4500 = 0x801B4500; //segment:ovl_menu +D_menu_801B450C = 0x801B450C; //segment:ovl_menu +D_menu_801B4520 = 0x801B4520; //segment:ovl_menu +D_menu_801B4524 = 0x801B4524; //segment:ovl_menu +D_menu_801B4544 = 0x801B4544; //segment:ovl_menu +D_menu_801B4614 = 0x801B4614; //segment:ovl_menu +D_menu_801B4617 = 0x801B4617; //segment:ovl_menu +D_menu_801B461C = 0x801B461C; //segment:ovl_menu +D_menu_801B4620 = 0x801B4620; //segment:ovl_menu +D_menu_801B4624 = 0x801B4624; //segment:ovl_menu +D_menu_801B4628 = 0x801B4628; //segment:ovl_menu +D_menu_801B462C = 0x801B462C; //segment:ovl_menu +D_menu_801B4630 = 0x801B4630; //segment:ovl_menu +D_menu_801B4634 = 0x801B4634; //segment:ovl_menu +D_menu_801B4638 = 0x801B4638; //segment:ovl_menu +D_menu_801B463C = 0x801B463C; //segment:ovl_menu +D_menu_801B4650 = 0x801B4650; //segment:ovl_menu +D_menu_801B4654 = 0x801B4654; //segment:ovl_menu +D_menu_801B4658 = 0x801B4658; //segment:ovl_menu +D_menu_801B465C = 0x801B465C; //segment:ovl_menu +D_menu_801B4684 = 0x801B4684; //segment:ovl_menu +D_menu_801B4688 = 0x801B4688; //segment:ovl_menu +D_menu_801B468C = 0x801B468C; //segment:ovl_menu +D_menu_801B4690 = 0x801B4690; //segment:ovl_menu +D_menu_801B46A4 = 0x801B46A4; //segment:ovl_menu +D_menu_801B46B8 = 0x801B46B8; //segment:ovl_menu +D_menu_801B46BC = 0x801B46BC; //segment:ovl_menu +D_menu_801B46C0 = 0x801B46C0; //segment:ovl_menu +D_menu_801B46C4 = 0x801B46C4; //segment:ovl_menu +D_menu_801B46EC = 0x801B46EC; //segment:ovl_menu +D_menu_801B46F0 = 0x801B46F0; //segment:ovl_menu +D_menu_801B46F4 = 0x801B46F4; //segment:ovl_menu +D_menu_801B46F8 = 0x801B46F8; //segment:ovl_menu +D_menu_801B470C = 0x801B470C; //segment:ovl_menu +D_menu_801B4788 = 0x801B4788; //segment:ovl_menu +D_menu_801B47A8 = 0x801B47A8; //segment:ovl_menu +D_menu_801B4844 = 0x801B4844; //segment:ovl_menu +D_menu_801B4848 = 0x801B4848; //segment:ovl_menu +D_menu_801B4888 = 0x801B4888; //segment:ovl_menu +D_menu_801B48A0 = 0x801B48A0; //segment:ovl_menu +D_menu_801B48E0 = 0x801B48E0; //segment:ovl_menu +D_menu_801B48F8 = 0x801B48F8; //segment:ovl_menu +D_menu_801B4938 = 0x801B4938; //segment:ovl_menu +D_menu_801B4950 = 0x801B4950; //segment:ovl_menu +D_menu_801B4954 = 0x801B4954; //segment:ovl_menu +D_menu_801B4978 = 0x801B4978; //segment:ovl_menu +D_menu_801B4980 = 0x801B4980; //segment:ovl_menu +D_menu_801B4990 = 0x801B4990; //segment:ovl_menu +D_menu_801B49D8 = 0x801B49D8; //segment:ovl_menu +D_menu_801B49F4 = 0x801B49F4; //segment:ovl_menu +D_menu_801B4A04 = 0x801B4A04; //segment:ovl_menu +D_menu_801B4A14 = 0x801B4A14; //segment:ovl_menu +D_menu_801B4A18 = 0x801B4A18; //segment:ovl_menu +D_menu_801B4A58 = 0x801B4A58; //segment:ovl_menu +D_menu_801B4A98 = 0x801B4A98; //segment:ovl_menu +D_menu_801B4AC4 = 0x801B4AC4; //segment:ovl_menu +D_menu_801B4AEC = 0x801B4AEC; //segment:ovl_menu +D_menu_801B4B58 = 0x801B4B58; //segment:ovl_menu +D_menu_801B4B74 = 0x801B4B74; //segment:ovl_menu +D_menu_801B4B90 = 0x801B4B90; //segment:ovl_menu +D_menu_801B4BF0 = 0x801B4BF0; //segment:ovl_menu +D_menu_801B4C10 = 0x801B4C10; //segment:ovl_menu +D_menu_801B4C14 = 0x801B4C14; //segment:ovl_menu +D_menu_801B4C18 = 0x801B4C18; //segment:ovl_menu +D_menu_801B4C1C = 0x801B4C1C; //segment:ovl_menu +D_menu_801B4C20 = 0x801B4C20; //segment:ovl_menu +D_menu_801B4C24 = 0x801B4C24; //segment:ovl_menu +D_menu_801B4C34 = 0x801B4C34; //segment:ovl_menu +D_menu_801B4C44 = 0x801B4C44; //segment:ovl_menu +D_menu_801B4C54 = 0x801B4C54; //segment:ovl_menu +D_menu_801B4C64 = 0x801B4C64; //segment:ovl_menu +D_menu_801B4C68 = 0x801B4C68; //segment:ovl_menu +D_menu_801B4C6C = 0x801B4C6C; //segment:ovl_menu +D_menu_801B4C70 = 0x801B4C70; //segment:ovl_menu +D_menu_801B4C74 = 0x801B4C74; //segment:ovl_menu +D_menu_801B4C78 = 0x801B4C78; //segment:ovl_menu +D_menu_801B4C7C = 0x801B4C7C; //segment:ovl_menu +D_menu_801B4C88 = 0x801B4C88; //segment:ovl_menu +D_menu_801B4C94 = 0x801B4C94; //segment:ovl_menu +D_menu_801B4CA0 = 0x801B4CA0; //segment:ovl_menu +D_menu_801B4CA4 = 0x801B4CA4; //segment:ovl_menu +D_menu_801B4CA8 = 0x801B4CA8; //segment:ovl_menu +D_menu_801B4CB4 = 0x801B4CB4; //segment:ovl_menu +D_menu_801B4CFC = 0x801B4CFC; //segment:ovl_menu +D_menu_801B4D00 = 0x801B4D00; //segment:ovl_menu +D_menu_801B4D04 = 0x801B4D04; //segment:ovl_menu +D_menu_801B4D08 = 0x801B4D08; //segment:ovl_menu +D_menu_801B4D0C = 0x801B4D0C; //segment:ovl_menu +D_menu_801B4D10 = 0x801B4D10; //segment:ovl_menu +D_menu_801B4D14 = 0x801B4D14; //segment:ovl_menu +D_menu_801B4D18 = 0x801B4D18; //segment:ovl_menu +D_menu_801B4D20 = 0x801B4D20; //segment:ovl_menu +D_menu_801B4D28 = 0x801B4D28; //segment:ovl_menu +D_menu_801B4D30 = 0x801B4D30; //segment:ovl_menu +D_menu_801B4D3C = 0x801B4D3C; //segment:ovl_menu +D_menu_801B4D48 = 0x801B4D48; //segment:ovl_menu +D_menu_801B4D54 = 0x801B4D54; //segment:ovl_menu +D_menu_801B4D58 = 0x801B4D58; //segment:ovl_menu +D_menu_801B4D64 = 0x801B4D64; //segment:ovl_menu +D_menu_801B4D68 = 0x801B4D68; //segment:ovl_menu +D_menu_801B4D6C = 0x801B4D6C; //segment:ovl_menu +D_menu_801B4D78 = 0x801B4D78; //segment:ovl_menu +D_menu_801B4D84 = 0x801B4D84; //segment:ovl_menu +D_menu_801B4D8C = 0x801B4D8C; //segment:ovl_menu +D_menu_801B4D94 = 0x801B4D94; //segment:ovl_menu +D_menu_801B4DAC = 0x801B4DAC; //segment:ovl_menu +D_menu_801B4DC4 = 0x801B4DC4; //segment:ovl_menu +D_menu_801B4E20 = 0x801B4E20; //segment:ovl_menu +D_menu_801B4E34 = 0x801B4E34; //segment:ovl_menu +D_menu_801B4E40 = 0x801B4E40; //segment:ovl_menu +D_menu_801B4E48 = 0x801B4E48; //segment:ovl_menu +D_menu_801B4E50 = 0x801B4E50; //segment:ovl_menu +D_menu_801B4E58 = 0x801B4E58; //segment:ovl_menu +D_menu_801B4E64 = 0x801B4E64; //segment:ovl_menu +D_menu_801B4E6C = 0x801B4E6C; //segment:ovl_menu +D_menu_801B4E70 = 0x801B4E70; //segment:ovl_menu +D_menu_801B4E78 = 0x801B4E78; //segment:ovl_menu +D_menu_801B4E90 = 0x801B4E90; //segment:ovl_menu +D_menu_801B4EA8 = 0x801B4EA8; //segment:ovl_menu +D_menu_801B4EB4 = 0x801B4EB4; //segment:ovl_menu +D_menu_801B4EB8 = 0x801B4EB8; //segment:ovl_menu +D_menu_801B4EBC = 0x801B4EBC; //segment:ovl_menu +D_menu_801B4EC0 = 0x801B4EC0; //segment:ovl_menu +D_menu_801B4EC4 = 0x801B4EC4; //segment:ovl_menu +D_menu_801B4EC8 = 0x801B4EC8; //segment:ovl_menu +D_menu_801B4ECC = 0x801B4ECC; //segment:ovl_menu +D_menu_801B4EDC = 0x801B4EDC; //segment:ovl_menu +D_menu_801B4EEC = 0x801B4EEC; //segment:ovl_menu +D_menu_801B4EF0 = 0x801B4EF0; //segment:ovl_menu +D_menu_801B4EF4 = 0x801B4EF4; //segment:ovl_menu +D_menu_801B4F04 = 0x801B4F04; //segment:ovl_menu +D_menu_801B4F08 = 0x801B4F08; //segment:ovl_menu +D_menu_801B4F18 = 0x801B4F18; //segment:ovl_menu +D_menu_801B4F1C = 0x801B4F1C; //segment:ovl_menu +D_menu_801B4F20 = 0x801B4F20; //segment:ovl_menu +D_menu_801B4F24 = 0x801B4F24; //segment:ovl_menu +D_menu_801B4F28 = 0x801B4F28; //segment:ovl_menu +D_menu_801B4F2C = 0x801B4F2C; //segment:ovl_menu +D_menu_801B4F30 = 0x801B4F30; //segment:ovl_menu +D_menu_801B4F34 = 0x801B4F34; //segment:ovl_menu +D_menu_801B4F38 = 0x801B4F38; //segment:ovl_menu +D_menu_801B4F3C = 0x801B4F3C; //segment:ovl_menu +D_menu_801B4F40 = 0x801B4F40; //segment:ovl_menu +D_menu_801B4F44 = 0x801B4F44; //segment:ovl_menu +D_menu_801B4F48 = 0x801B4F48; //segment:ovl_menu +D_menu_801B4F4C = 0x801B4F4C; //segment:ovl_menu +D_menu_801B4F64 = 0x801B4F64; //segment:ovl_menu +D_menu_801B4F94 = 0x801B4F94; //segment:ovl_menu +D_menu_801B4FC4 = 0x801B4FC4; //segment:ovl_menu +D_menu_801B4FD4 = 0x801B4FD4; //segment:ovl_menu +D_menu_801B4FE4 = 0x801B4FE4; //segment:ovl_menu +D_menu_801B4FF0 = 0x801B4FF0; //segment:ovl_menu +D_menu_801B5000 = 0x801B5000; //segment:ovl_menu +D_menu_801B5010 = 0x801B5010; //segment:ovl_menu +D_menu_801B5020 = 0x801B5020; //segment:ovl_menu +D_menu_801B502C = 0x801B502C; //segment:ovl_menu +D_menu_801B5030 = 0x801B5030; //segment:ovl_menu +D_menu_801B5034 = 0x801B5034; //segment:ovl_menu +D_menu_801B5040 = 0x801B5040; //segment:ovl_menu +D_menu_801B504C = 0x801B504C; //segment:ovl_menu +D_menu_801B5058 = 0x801B5058; //segment:ovl_menu +D_menu_801B5064 = 0x801B5064; //segment:ovl_menu +D_menu_801B5070 = 0x801B5070; //segment:ovl_menu +D_menu_801B507C = 0x801B507C; //segment:ovl_menu +D_menu_801B5088 = 0x801B5088; //segment:ovl_menu +D_menu_801B5094 = 0x801B5094; //segment:ovl_menu +D_menu_801B50A0 = 0x801B50A0; //segment:ovl_menu +D_menu_801B50AC = 0x801B50AC; //segment:ovl_menu +D_menu_801B50B8 = 0x801B50B8; //segment:ovl_menu +D_menu_801B50BC = 0x801B50BC; //segment:ovl_menu +D_menu_801B5100 = 0x801B5100; //segment:ovl_menu +D_menu_801B5104 = 0x801B5104; //segment:ovl_menu +D_menu_801B5148 = 0x801B5148; //segment:ovl_menu +D_menu_801B5184 = 0x801B5184; //segment:ovl_menu +D_menu_801B5190 = 0x801B5190; //segment:ovl_menu +D_menu_801B519C = 0x801B519C; //segment:ovl_menu +D_menu_801B51A0 = 0x801B51A0; //segment:ovl_menu +D_menu_801B51A4 = 0x801B51A4; //segment:ovl_menu +D_menu_801B51A8 = 0x801B51A8; //segment:ovl_menu +D_menu_801B51B0 = 0x801B51B0; //segment:ovl_menu +D_menu_801B51C8 = 0x801B51C8; //segment:ovl_menu +D_menu_801B51D0 = 0x801B51D0; //segment:ovl_menu +D_menu_801B51D8 = 0x801B51D8; //segment:ovl_menu +D_menu_801B51DC = 0x801B51DC; //segment:ovl_menu +D_menu_801B51E0 = 0x801B51E0; //segment:ovl_menu +D_menu_801B51E4 = 0x801B51E4; //segment:ovl_menu +D_menu_801B51EC = 0x801B51EC; //segment:ovl_menu +D_menu_801B5204 = 0x801B5204; //segment:ovl_menu +D_menu_801B520C = 0x801B520C; //segment:ovl_menu +D_menu_801B5214 = 0x801B5214; //segment:ovl_menu +D_menu_801B5220 = 0x801B5220; //segment:ovl_menu +D_menu_801B522C = 0x801B522C; //segment:ovl_menu +D_menu_801B5230 = 0x801B5230; //segment:ovl_menu +D_menu_801B5234 = 0x801B5234; //segment:ovl_menu +D_menu_801B5240 = 0x801B5240; //segment:ovl_menu +D_menu_801B524C = 0x801B524C; //segment:ovl_menu +D_menu_801B5258 = 0x801B5258; //segment:ovl_menu +D_menu_801B5264 = 0x801B5264; //segment:ovl_menu +D_menu_801B5270 = 0x801B5270; //segment:ovl_menu +D_menu_801B527C = 0x801B527C; //segment:ovl_menu +D_menu_801B5288 = 0x801B5288; //segment:ovl_menu +D_menu_801B5294 = 0x801B5294; //segment:ovl_menu +D_menu_801B52A0 = 0x801B52A0; //segment:ovl_menu +D_menu_801B52B8 = 0x801B52B8; //segment:ovl_menu +D_menu_801B52D0 = 0x801B52D0; //segment:ovl_menu +D_menu_801B52DC = 0x801B52DC; //segment:ovl_menu +D_menu_801B5370 = 0x801B5370; //segment:ovl_menu +D_menu_801B5390 = 0x801B5390; //segment:ovl_menu +D_menu_801B53B0 = 0x801B53B0; //segment:ovl_menu +D_menu_801B53D4 = 0x801B53D4; //segment:ovl_menu +D_menu_801B53F8 = 0x801B53F8; //segment:ovl_menu +D_menu_801B5410 = 0x801B5410; //segment:ovl_menu +D_menu_801B5414 = 0x801B5414; //segment:ovl_menu +D_menu_801B5450 = 0x801B5450; //segment:ovl_menu +D_menu_801B5474 = 0x801B5474; //segment:ovl_menu +D_menu_801B547C = 0x801B547C; //segment:ovl_menu +D_menu_801B5480 = 0x801B5480; //segment:ovl_menu +D_menu_801B5484 = 0x801B5484; //segment:ovl_menu +D_menu_801B5488 = 0x801B5488; //segment:ovl_menu +D_menu_801B54AC = 0x801B54AC; //segment:ovl_menu +D_menu_801B54C0 = 0x801B54C0; //segment:ovl_menu +D_menu_801B54E4 = 0x801B54E4; //segment:ovl_menu +D_menu_801B54F8 = 0x801B54F8; //segment:ovl_menu +D_menu_801B5530 = 0x801B5530; //segment:ovl_menu +D_menu_801B5568 = 0x801B5568; //segment:ovl_menu +D_menu_801B55D8 = 0x801B55D8; //segment:ovl_menu +D_menu_801B56B8 = 0x801B56B8; //segment:ovl_menu +D_menu_801B5728 = 0x801B5728; //segment:ovl_menu +D_menu_801B574C = 0x801B574C; //segment:ovl_menu +D_menu_801B5798 = 0x801B5798; //segment:ovl_menu +D_menu_801B57A8 = 0x801B57A8; //segment:ovl_menu +D_menu_801B59A0 = 0x801B59A0; //segment:ovl_menu +D_menu_801B5B98 = 0x801B5B98; //segment:ovl_menu +D_menu_801B5BD4 = 0x801B5BD4; //segment:ovl_menu +D_menu_801B5BDC = 0x801B5BDC; //segment:ovl_menu +D_menu_801B5E7C = 0x801B5E7C; //segment:ovl_menu +D_menu_801B5EBC = 0x801B5EBC; //segment:ovl_menu +D_menu_801B5EC1 = 0x801B5EC1; //segment:ovl_menu +D_menu_801B5EC4 = 0x801B5EC4; //segment:ovl_menu +D_menu_801B5FDC = 0x801B5FDC; //segment:ovl_menu +D_menu_801B6018 = 0x801B6018; //segment:ovl_menu +D_menu_801B601C = 0x801B601C; //segment:ovl_menu +D_menu_801B6020 = 0x801B6020; //segment:ovl_menu +D_menu_801B6024 = 0x801B6024; //segment:ovl_menu +D_menu_801B6028 = 0x801B6028; //segment:ovl_menu +D_menu_801B6058 = 0x801B6058; //segment:ovl_menu +D_menu_801B71F8 = 0x801B71F8; //segment:ovl_menu +D_menu_801B72F8 = 0x801B72F8; //segment:ovl_menu +D_menu_801B73F8 = 0x801B73F8; //segment:ovl_menu +D_menu_801B74F8 = 0x801B74F8; //segment:ovl_menu +D_menu_801B7828 = 0x801B7828; //segment:ovl_menu +D_menu_801B7B90 = 0x801B7B90; //segment:ovl_menu +D_menu_801B7EF8 = 0x801B7EF8; //segment:ovl_menu +D_menu_801B8260 = 0x801B8260; //segment:ovl_menu +D_menu_801B85C8 = 0x801B85C8; //segment:ovl_menu +D_menu_801B8930 = 0x801B8930; //segment:ovl_menu +D_menu_801B8C98 = 0x801B8C98; //segment:ovl_menu +D_menu_801B9000 = 0x801B9000; //segment:ovl_menu +D_menu_801B9368 = 0x801B9368; //segment:ovl_menu +D_menu_801B936C = 0x801B936C; //segment:ovl_menu +D_menu_801B9388 = 0x801B9388; //segment:ovl_menu +D_menu_801B938C = 0x801B938C; //segment:ovl_menu +D_menu_801B9390 = 0x801B9390; //segment:ovl_menu +D_menu_801B93AC = 0x801B93AC; //segment:ovl_menu +D_menu_801B93B0 = 0x801B93B0; //segment:ovl_menu +D_menu_801B93EC = 0x801B93EC; //segment:ovl_menu +D_menu_801B9404 = 0x801B9404; //segment:ovl_menu +D_menu_801B941C = 0x801B941C; //segment:ovl_menu +D_menu_801B9420 = 0x801B9420; //segment:ovl_menu +D_menu_801B9424 = 0x801B9424; //segment:ovl_menu +D_menu_801B9440 = 0x801B9440; //segment:ovl_menu +D_menu_801B9444 = 0x801B9444; //segment:ovl_menu +D_menu_801B9450 = 0x801B9450; //segment:ovl_menu +D_menu_801B9470 = 0x801B9470; //segment:ovl_menu +D_menu_801B9490 = 0x801B9490; //segment:ovl_menu +D_menu_801B94B0 = 0x801B94B0; //segment:ovl_menu +D_menu_801B94D0 = 0x801B94D0; //segment:ovl_menu +D_menu_801B94F0 = 0x801B94F0; //segment:ovl_menu +D_menu_801B9510 = 0x801B9510; //segment:ovl_menu +D_menu_801B9514 = 0x801B9514; //segment:ovl_menu +D_menu_801B9518 = 0x801B9518; //segment:ovl_menu +D_menu_801B951C = 0x801B951C; //segment:ovl_menu +D_menu_801B9520 = 0x801B9520; //segment:ovl_menu +D_menu_801B9524 = 0x801B9524; //segment:ovl_menu +D_menu_801B9528 = 0x801B9528; //segment:ovl_menu +D_menu_801B9548 = 0x801B9548; //segment:ovl_menu +D_menu_801B9550 = 0x801B9550; //segment:ovl_menu +D_menu_801B955C = 0x801B955C; //segment:ovl_menu +D_menu_801B9568 = 0x801B9568; //segment:ovl_menu +D_menu_801B9574 = 0x801B9574; //segment:ovl_menu +D_menu_801B9580 = 0x801B9580; //segment:ovl_menu +D_menu_801B958C = 0x801B958C; //segment:ovl_menu +D_menu_801B9598 = 0x801B9598; //segment:ovl_menu +D_menu_801B95A4 = 0x801B95A4; //segment:ovl_menu +D_menu_801B95B0 = 0x801B95B0; //segment:ovl_menu +D_menu_801B95BC = 0x801B95BC; //segment:ovl_menu +D_menu_801B95C8 = 0x801B95C8; //segment:ovl_menu +D_menu_801B95D4 = 0x801B95D4; //segment:ovl_menu +D_menu_801B95E0 = 0x801B95E0; //segment:ovl_menu +D_menu_801B95E4 = 0x801B95E4; //segment:ovl_menu +D_menu_801B95E8 = 0x801B95E8; //segment:ovl_menu +D_menu_801B95EC = 0x801B95EC; //segment:ovl_menu +D_menu_801B95F0 = 0x801B95F0; //segment:ovl_menu +D_menu_801B9600 = 0x801B9600; //segment:ovl_menu +D_menu_801B9608 = 0x801B9608; //segment:ovl_menu +D_menu_801B9610 = 0x801B9610; //segment:ovl_menu +D_menu_801B961C = 0x801B961C; //segment:ovl_menu +D_menu_801B9628 = 0x801B9628; //segment:ovl_menu +D_menu_801B9634 = 0x801B9634; //segment:ovl_menu +D_menu_801B963C = 0x801B963C; //segment:ovl_menu +D_menu_801B9644 = 0x801B9644; //segment:ovl_menu +D_menu_801B9650 = 0x801B9650; //segment:ovl_menu +D_menu_801B9658 = 0x801B9658; //segment:ovl_menu +D_menu_801B9660 = 0x801B9660; //segment:ovl_menu +D_menu_801B9668 = 0x801B9668; //segment:ovl_menu +D_menu_801B966C = 0x801B966C; //segment:ovl_menu +D_menu_801B9670 = 0x801B9670; //segment:ovl_menu +D_menu_801B9674 = 0x801B9674; //segment:ovl_menu +D_menu_801B9680 = 0x801B9680; //segment:ovl_menu +D_menu_801B968C = 0x801B968C; //segment:ovl_menu +D_menu_801B9698 = 0x801B9698; //segment:ovl_menu +D_menu_801B96A0 = 0x801B96A0; //segment:ovl_menu +D_menu_801B97C0 = 0x801B97C0; //segment:ovl_menu +D_801BA820 = 0x801BA820; //segment:ovl_menu +D_menu_801BA830 = 0x801BA830; //segment:ovl_menu +D_menu_801BA834 = 0x801BA834; //segment:ovl_menu +D_menu_801BA838 = 0x801BA838; //segment:ovl_menu +D_menu_801BA83C = 0x801BA83C; //segment:ovl_menu +D_menu_801BA840 = 0x801BA840; //segment:ovl_menu +D_menu_801BA844 = 0x801BA844; //segment:ovl_menu +D_menu_801BA848 = 0x801BA848; //segment:ovl_menu +D_menu_801BA84C = 0x801BA84C; //segment:ovl_menu +D_menu_801BA850 = 0x801BA850; //segment:ovl_menu +D_menu_801BA854 = 0x801BA854; //segment:ovl_menu +D_menu_801BA858 = 0x801BA858; //segment:ovl_menu +D_menu_801BA880 = 0x801BA880; //segment:ovl_menu +D_menu_801BA8A8 = 0x801BA8A8; //segment:ovl_menu +D_menu_801BA8D0 = 0x801BA8D0; //segment:ovl_menu +D_menu_801BA8F8 = 0x801BA8F8; //segment:ovl_menu +D_menu_801BA900 = 0x801BA900; //segment:ovl_menu +D_menu_801BA914 = 0x801BA914; //segment:ovl_menu +D_menu_801BA918 = 0x801BA918; //segment:ovl_menu +D_menu_801BA930 = 0x801BA930; //segment:ovl_menu +D_menu_801BA948 = 0x801BA948; //segment:ovl_menu +D_menu_801BA960 = 0x801BA960; //segment:ovl_menu +D_menu_801BAA00 = 0x801BAA00; //segment:ovl_menu +D_menu_801BAAA0 = 0x801BAAA0; //segment:ovl_menu +D_menu_801BAB40 = 0x801BAB40; //segment:ovl_menu +D_menu_801BABE0 = 0x801BABE0; //segment:ovl_menu +D_menu_801BAC80 = 0x801BAC80; //segment:ovl_menu +D_menu_801BAD20 = 0x801BAD20; //segment:ovl_menu +D_menu_801BAD28 = 0x801BAD28; //segment:ovl_menu +D_menu_801BAD78 = 0x801BAD78; //segment:ovl_menu +D_menu_801BADF0 = 0x801BADF0; //segment:ovl_menu +D_menu_801BADF4 = 0x801BADF4; //segment:ovl_menu +D_menu_801BADF8 = 0x801BADF8; //segment:ovl_menu +D_menu_801BAE18 = 0x801BAE18; //segment:ovl_menu +D_801BAE4C = 0x801BAE4C; //segment:ovl_menu +D_menu_801BAE50 = 0x801BAE50; //segment:ovl_menu +D_menu_801BAE54 = 0x801BAE54; //segment:ovl_menu +D_menu_801BAE58 = 0x801BAE58; //segment:ovl_menu +D_menu_801BAE5C = 0x801BAE5C; //segment:ovl_menu +D_menu_801BAE60 = 0x801BAE60; //segment:ovl_menu +D_menu_801BAE64 = 0x801BAE64; //segment:ovl_menu +D_menu_801BAE68 = 0x801BAE68; //segment:ovl_menu +D_menu_801BAE6C = 0x801BAE6C; //segment:ovl_menu +D_menu_801BAE70 = 0x801BAE70; //segment:ovl_menu +D_menu_801BAE74 = 0x801BAE74; //segment:ovl_menu +D_menu_801BAE78 = 0x801BAE78; //segment:ovl_menu +D_menu_801BAE7C = 0x801BAE7C; //segment:ovl_menu +D_menu_801BAE80 = 0x801BAE80; //segment:ovl_menu +D_menu_801BAE84 = 0x801BAE84; //segment:ovl_menu +D_menu_801BAE88 = 0x801BAE88; //segment:ovl_menu +D_menu_801BAE8C = 0x801BAE8C; //segment:ovl_menu +D_menu_801BAE90 = 0x801BAE90; //segment:ovl_menu +D_menu_801BAE94 = 0x801BAE94; //segment:ovl_menu +D_menu_801BAE98 = 0x801BAE98; //segment:ovl_menu +D_menu_801BAE9C = 0x801BAE9C; //segment:ovl_menu +D_menu_801BAEA0 = 0x801BAEA0; //segment:ovl_menu +D_menu_801BAEA4 = 0x801BAEA4; //segment:ovl_menu +D_menu_801BAEA8 = 0x801BAEA8; //segment:ovl_menu +D_menu_801BAEAC = 0x801BAEAC; //segment:ovl_menu +D_menu_801BAEB0 = 0x801BAEB0; //segment:ovl_menu +D_menu_801BAEB4 = 0x801BAEB4; //segment:ovl_menu +D_menu_801BAEB8 = 0x801BAEB8; //segment:ovl_menu +D_menu_801BAEBC = 0x801BAEBC; //segment:ovl_menu +D_menu_801BAEC0 = 0x801BAEC0; //segment:ovl_menu +D_menu_801BAEC4 = 0x801BAEC4; //segment:ovl_menu +D_menu_801BAEC8 = 0x801BAEC8; //segment:ovl_menu +D_menu_801BAECC = 0x801BAECC; //segment:ovl_menu +D_menu_801BAED0 = 0x801BAED0; //segment:ovl_menu +D_menu_801BAED4 = 0x801BAED4; //segment:ovl_menu +D_menu_801BAED8 = 0x801BAED8; //segment:ovl_menu +D_menu_801BAEDC = 0x801BAEDC; //segment:ovl_menu +D_menu_801BAEE0 = 0x801BAEE0; //segment:ovl_menu +D_menu_801BAEE4 = 0x801BAEE4; //segment:ovl_menu +D_menu_801BAEE8 = 0x801BAEE8; //segment:ovl_menu +D_menu_801BAEEC = 0x801BAEEC; //segment:ovl_menu +D_menu_801BAEF0 = 0x801BAEF0; //segment:ovl_menu +D_menu_801BAEF4 = 0x801BAEF4; //segment:ovl_menu +D_menu_801BAEF8 = 0x801BAEF8; //segment:ovl_menu +D_menu_801BAEFC = 0x801BAEFC; //segment:ovl_menu +D_menu_801BAF00 = 0x801BAF00; //segment:ovl_menu +D_menu_801BAF04 = 0x801BAF04; //segment:ovl_menu +D_menu_801BAF08 = 0x801BAF08; //segment:ovl_menu +D_menu_801BAF0C = 0x801BAF0C; //segment:ovl_menu +D_menu_801BAF10 = 0x801BAF10; //segment:ovl_menu +D_menu_801BAF14 = 0x801BAF14; //segment:ovl_menu +D_menu_801BAF18 = 0x801BAF18; //segment:ovl_menu +D_menu_801BAF20 = 0x801BAF20; //segment:ovl_menu +D_menu_801BAF48 = 0x801BAF48; //segment:ovl_menu +D_menu_801BAF4C = 0x801BAF4C; //segment:ovl_menu +D_menu_801BAF50 = 0x801BAF50; //segment:ovl_menu +D_menu_801BAF54 = 0x801BAF54; //segment:ovl_menu +D_menu_801BAF58 = 0x801BAF58; //segment:ovl_menu +D_menu_801BAF5C = 0x801BAF5C; //segment:ovl_menu +D_menu_801BAF60 = 0x801BAF60; //segment:ovl_menu +D_menu_801BAF64 = 0x801BAF64; //segment:ovl_menu +D_menu_801BAF68 = 0x801BAF68; //segment:ovl_menu +D_menu_801BAF6C = 0x801BAF6C; //segment:ovl_menu +D_menu_801BAF70 = 0x801BAF70; //segment:ovl_menu +D_menu_801BAF78 = 0x801BAF78; //segment:ovl_menu +D_menu_801BAFA0 = 0x801BAFA0; //segment:ovl_menu +D_menu_801BAFE0 = 0x801BAFE0; //segment:ovl_menu +D_menu_801BB0A0 = 0x801BB0A0; //segment:ovl_menu +D_menu_801BB0A4 = 0x801BB0A4; //segment:ovl_menu +D_menu_801BB0A8 = 0x801BB0A8; //segment:ovl_menu +D_menu_801BB0B8 = 0x801BB0B8; //segment:ovl_menu +D_menu_801BB0BC = 0x801BB0BC; //segment:ovl_menu +D_menu_801BB0E4 = 0x801BB0E4; //segment:ovl_menu +D_menu_801BB0F4 = 0x801BB0F4; //segment:ovl_menu +D_menu_801BB0FC = 0x801BB0FC; //segment:ovl_menu +D_menu_801BB100 = 0x801BB100; //segment:ovl_menu +D_menu_801BB150 = 0x801BB150; //segment:ovl_menu +D_menu_801BB158 = 0x801BB158; //segment:ovl_menu +D_menu_801BB15C = 0x801BB15C; //segment:ovl_menu +D_menu_801BB1AC = 0x801BB1AC; //segment:ovl_menu +D_menu_801BB1B4 = 0x801BB1B4; //segment:ovl_menu +D_menu_801BB1B8 = 0x801BB1B8; //segment:ovl_menu +D_menu_801BB1CC = 0x801BB1CC; //segment:ovl_menu +D_menu_801BB1D4 = 0x801BB1D4; //segment:ovl_menu +D_menu_801BB208 = 0x801BB208; //segment:ovl_menu +D_menu_801BB210 = 0x801BB210; //segment:ovl_menu +D_menu_801BB214 = 0x801BB214; //segment:ovl_menu +D_menu_801BB21C = 0x801BB21C; //segment:ovl_menu +D_menu_801BB228 = 0x801BB228; //segment:ovl_menu +D_menu_801BB24C = 0x801BB24C; //segment:ovl_menu +D_menu_801BB258 = 0x801BB258; //segment:ovl_menu +D_menu_801BB260 = 0x801BB260; //segment:ovl_menu +D_menu_801BB264 = 0x801BB264; //segment:ovl_menu +D_menu_801BB268 = 0x801BB268; //segment:ovl_menu +D_menu_801BB26C = 0x801BB26C; //segment:ovl_menu +D_menu_801BB270 = 0x801BB270; //segment:ovl_menu +D_menu_801BB274 = 0x801BB274; //segment:ovl_menu +D_menu_801BB278 = 0x801BB278; //segment:ovl_menu +D_menu_801BB27C = 0x801BB27C; //segment:ovl_menu +D_menu_801BB280 = 0x801BB280; //segment:ovl_menu +D_menu_801BB284 = 0x801BB284; //segment:ovl_menu +D_menu_801BB288 = 0x801BB288; //segment:ovl_menu +D_menu_801BB28C = 0x801BB28C; //segment:ovl_menu +D_menu_801BB290 = 0x801BB290; //segment:ovl_menu +D_menu_801BB294 = 0x801BB294; //segment:ovl_menu +D_menu_801BB298 = 0x801BB298; //segment:ovl_menu +D_menu_801BB29C = 0x801BB29C; //segment:ovl_menu +D_menu_801BB2A0 = 0x801BB2A0; //segment:ovl_menu +D_menu_801BB2A4 = 0x801BB2A4; //segment:ovl_menu +D_menu_801BB2A8 = 0x801BB2A8; //segment:ovl_menu +D_menu_801BB2AC = 0x801BB2AC; //segment:ovl_menu +D_menu_801BB2B0 = 0x801BB2B0; //segment:ovl_menu +D_menu_801BBC10 = 0x801BBC10; //segment:ovl_menu +D_menu_801BBC14 = 0x801BBC14; //segment:ovl_menu +D_menu_801BBC18 = 0x801BBC18; //segment:ovl_menu +D_menu_801BBC1C = 0x801BBC1C; //segment:ovl_menu +D_menu_801BBC20 = 0x801BBC20; //segment:ovl_menu +D_menu_801BBC24 = 0x801BBC24; //segment:ovl_menu +D_menu_801BBC28 = 0x801BBC28; //segment:ovl_menu +D_menu_801BBC2C = 0x801BBC2C; //segment:ovl_menu +D_menu_801BBC30 = 0x801BBC30; //segment:ovl_menu +D_menu_801BBC34 = 0x801BBC34; //segment:ovl_menu +D_menu_801BBC38 = 0x801BBC38; //segment:ovl_menu +D_menu_801BBC3C = 0x801BBC3C; //segment:ovl_menu +D_menu_801BBC40 = 0x801BBC40; //segment:ovl_menu +D_menu_801BBC44 = 0x801BBC44; //segment:ovl_menu +D_menu_801BBC48 = 0x801BBC48; //segment:ovl_menu +D_menu_801BBC4C = 0x801BBC4C; //segment:ovl_menu +D_menu_801BBC50 = 0x801BBC50; //segment:ovl_menu +D_menu_801BBC54 = 0x801BBC54; //segment:ovl_menu +D_menu_801BBC58 = 0x801BBC58; //segment:ovl_menu +D_menu_801BBC5C = 0x801BBC5C; //segment:ovl_menu +D_menu_801BBC60 = 0x801BBC60; //segment:ovl_menu +D_menu_801BBC64 = 0x801BBC64; //segment:ovl_menu +D_menu_801BBC68 = 0x801BBC68; //segment:ovl_menu +D_menu_801BBC6C = 0x801BBC6C; //segment:ovl_menu +D_menu_801BBC70 = 0x801BBC70; //segment:ovl_menu +D_menu_801BBC80 = 0x801BBC80; //segment:ovl_menu +D_menu_801BBC84 = 0x801BBC84; //segment:ovl_menu +D_menu_801BBC88 = 0x801BBC88; //segment:ovl_menu +D_menu_801BBC8C = 0x801BBC8C; //segment:ovl_menu +D_menu_801BBC90 = 0x801BBC90; //segment:ovl_menu +D_menu_801BBC94 = 0x801BBC94; //segment:ovl_menu +D_menu_801BBC98 = 0x801BBC98; //segment:ovl_menu +D_menu_801BBC9C = 0x801BBC9C; //segment:ovl_menu +D_menu_801BBCA0 = 0x801BBCA0; //segment:ovl_menu +D_menu_801BBCA4 = 0x801BBCA4; //segment:ovl_menu +D_menu_801BBCA8 = 0x801BBCA8; //segment:ovl_menu +D_menu_801BBCAC = 0x801BBCAC; //segment:ovl_menu +D_menu_801BBCAE = 0x801BBCAE; //segment:ovl_menu +D_menu_801BBCB0 = 0x801BBCB0; //segment:ovl_menu +D_menu_801BBCB4 = 0x801BBCB4; //segment:ovl_menu +D_menu_801BBCB8 = 0x801BBCB8; //segment:ovl_menu +D_menu_801BBCBC = 0x801BBCBC; //segment:ovl_menu +D_menu_801BBCC0 = 0x801BBCC0; //segment:ovl_menu +D_menu_801BBCC4 = 0x801BBCC4; //segment:ovl_menu +D_menu_801BBCC8 = 0x801BBCC8; //segment:ovl_menu +D_menu_801BBCCC = 0x801BBCCC; //segment:ovl_menu +D_menu_801BBCD0 = 0x801BBCD0; //segment:ovl_menu +D_menu_801BBCD4 = 0x801BBCD4; //segment:ovl_menu +D_menu_801BBCD8 = 0x801BBCD8; //segment:ovl_menu +D_menu_801BBCE4 = 0x801BBCE4; //segment:ovl_menu +D_menu_801BBCE8 = 0x801BBCE8; //segment:ovl_menu +D_menu_801BBCEE = 0x801BBCEE; //segment:ovl_menu +D_menu_801BBCF0 = 0x801BBCF0; //segment:ovl_menu +D_menu_801BBCF8 = 0x801BBCF8; //segment:ovl_menu +D_menu_801BBD04 = 0x801BBD04; //segment:ovl_menu +D_menu_801BBD08 = 0x801BBD08; //segment:ovl_menu +D_menu_801BBD14 = 0x801BBD14; //segment:ovl_menu +D_menu_801BBD18 = 0x801BBD18; //segment:ovl_menu +D_menu_801BBD24 = 0x801BBD24; //segment:ovl_menu +D_menu_801BBD28 = 0x801BBD28; //segment:ovl_menu +D_menu_801BBD34 = 0x801BBD34; //segment:ovl_menu +D_menu_801BBD38 = 0x801BBD38; //segment:ovl_menu +D_menu_801BBD44 = 0x801BBD44; //segment:ovl_menu +D_menu_801BBD48 = 0x801BBD48; //segment:ovl_menu +D_menu_801BBD54 = 0x801BBD54; //segment:ovl_menu +D_menu_801BBD58 = 0x801BBD58; //segment:ovl_menu +D_menu_801BBD5C = 0x801BBD5C; //segment:ovl_menu +D_menu_801BBD60 = 0x801BBD60; //segment:ovl_menu +D_menu_801BBD64 = 0x801BBD64; //segment:ovl_menu +D_menu_801BBD68 = 0x801BBD68; //segment:ovl_menu +D_menu_801BBD6C = 0x801BBD6C; //segment:ovl_menu +D_menu_801BBD70 = 0x801BBD70; //segment:ovl_menu +D_menu_801BBD74 = 0x801BBD74; //segment:ovl_menu +D_menu_801BBD78 = 0x801BBD78; //segment:ovl_menu +D_menu_801BBD7C = 0x801BBD7C; //segment:ovl_menu +D_menu_801BBD80 = 0x801BBD80; //segment:ovl_menu +D_menu_801BBD86 = 0x801BBD86; //segment:ovl_menu +D_menu_801BBD88 = 0x801BBD88; //segment:ovl_menu +D_menu_801BBD8C = 0x801BBD8C; //segment:ovl_menu +D_menu_801BBD94 = 0x801BBD94; //segment:ovl_menu +D_menu_801BBD98 = 0x801BBD98; //segment:ovl_menu +D_menu_801BBDA0 = 0x801BBDA0; //segment:ovl_menu +D_menu_801BBDA4 = 0x801BBDA4; //segment:ovl_menu +D_menu_801BBDA8 = 0x801BBDA8; //segment:ovl_menu +D_menu_801BBDAC = 0x801BBDAC; //segment:ovl_menu +D_menu_801BBDB0 = 0x801BBDB0; //segment:ovl_menu +D_menu_801BBDB4 = 0x801BBDB4; //segment:ovl_menu +D_menu_801BBDB8 = 0x801BBDB8; //segment:ovl_menu +D_menu_801BBDBC = 0x801BBDBC; //segment:ovl_menu +D_menu_801BBDC0 = 0x801BBDC0; //segment:ovl_menu +D_menu_801BBDC4 = 0x801BBDC4; //segment:ovl_menu +D_menu_801BBDC8 = 0x801BBDC8; //segment:ovl_menu +D_menu_801BBDCC = 0x801BBDCC; //segment:ovl_menu +D_menu_801BBDD0 = 0x801BBDD0; //segment:ovl_menu +D_menu_801BBDD4 = 0x801BBDD4; //segment:ovl_menu +D_menu_801BBDD8 = 0x801BBDD8; //segment:ovl_menu +D_menu_801BBDDC = 0x801BBDDC; //segment:ovl_menu +D_menu_801BBDE0 = 0x801BBDE0; //segment:ovl_menu +D_menu_801BBDE4 = 0x801BBDE4; //segment:ovl_menu +D_menu_801BBDE8 = 0x801BBDE8; //segment:ovl_menu +D_menu_801BBDEC = 0x801BBDEC; //segment:ovl_menu +D_menu_801BBDF0 = 0x801BBDF0; //segment:ovl_menu +D_menu_801BBDF4 = 0x801BBDF4; //segment:ovl_menu +D_menu_801BBDF8 = 0x801BBDF8; //segment:ovl_menu +D_menu_801BBDFC = 0x801BBDFC; //segment:ovl_menu +D_menu_801BBDFE = 0x801BBDFE; //segment:ovl_menu +D_menu_801BBE00 = 0x801BBE00; //segment:ovl_menu +D_menu_801BBE02 = 0x801BBE02; //segment:ovl_menu +D_menu_801BBE04 = 0x801BBE04; //segment:ovl_menu +D_menu_801BBE08 = 0x801BBE08; //segment:ovl_menu +D_menu_801BBE0C = 0x801BBE0C; //segment:ovl_menu +D_menu_801BBE10 = 0x801BBE10; //segment:ovl_menu +D_menu_801BBE14 = 0x801BBE14; //segment:ovl_menu +D_menu_801BBE1C = 0x801BBE1C; //segment:ovl_menu +D_menu_801BBE20 = 0x801BBE20; //segment:ovl_menu +D_menu_801BBE24 = 0x801BBE24; //segment:ovl_menu +D_menu_801BBE28 = 0x801BBE28; //segment:ovl_menu +D_menu_801BBEA8 = 0x801BBEA8; //segment:ovl_menu +D_menu_801BBEAC = 0x801BBEAC; //segment:ovl_menu +D_menu_801BBEAF = 0x801BBEAF; //segment:ovl_menu +D_menu_801BBEB0 = 0x801BBEB0; //segment:ovl_menu +D_menu_801BBEB4 = 0x801BBEB4; //segment:ovl_menu +D_menu_801BBEB8 = 0x801BBEB8; //segment:ovl_menu +D_menu_801BBEBC = 0x801BBEBC; //segment:ovl_menu +D_menu_801BBEC0 = 0x801BBEC0; //segment:ovl_menu +D_menu_801BBEC8 = 0x801BBEC8; //segment:ovl_menu +D_menu_801BBECC = 0x801BBECC; //segment:ovl_menu +D_menu_801BBED0 = 0x801BBED0; //segment:ovl_menu +D_menu_801BBED4 = 0x801BBED4; //segment:ovl_menu +D_menu_801BBED8 = 0x801BBED8; //segment:ovl_menu +D_menu_801BBEDC = 0x801BBEDC; //segment:ovl_menu +D_menu_801BBEE0 = 0x801BBEE0; //segment:ovl_menu +D_menu_801BBEE4 = 0x801BBEE4; //segment:ovl_menu +D_menu_801BBEE8 = 0x801BBEE8; //segment:ovl_menu +D_menu_801BBEEC = 0x801BBEEC; //segment:ovl_menu +D_menu_801BBEF0 = 0x801BBEF0; //segment:ovl_menu +D_menu_801BBEF1 = 0x801BBEF1; //segment:ovl_menu +D_menu_801BBEF2 = 0x801BBEF2; //segment:ovl_menu +D_menu_801BBEF3 = 0x801BBEF3; //segment:ovl_menu +D_menu_801BBEF4 = 0x801BBEF4; //segment:ovl_menu +D_menu_801BBEF5 = 0x801BBEF5; //segment:ovl_menu +D_menu_801BBEF6 = 0x801BBEF6; //segment:ovl_menu +D_menu_801BBEF7 = 0x801BBEF7; //segment:ovl_menu +D_menu_801BBEF8 = 0x801BBEF8; //segment:ovl_menu +D_menu_801BBF00 = 0x801BBF00; //segment:ovl_menu +D_menu_801BBF04 = 0x801BBF04; //segment:ovl_menu +D_menu_801BBF08 = 0x801BBF08; //segment:ovl_menu +D_menu_801BBF0C = 0x801BBF0C; //segment:ovl_menu +D_menu_801BBF10 = 0x801BBF10; //segment:ovl_menu +D_menu_801BBF14 = 0x801BBF14; //segment:ovl_menu +D_menu_801BBF16 = 0x801BBF16; //segment:ovl_menu +D_menu_801BBF18 = 0x801BBF18; //segment:ovl_menu +D_menu_801BBF1C = 0x801BBF1C; //segment:ovl_menu +D_menu_801BBF20 = 0x801BBF20; //segment:ovl_menu +D_menu_801BBF24 = 0x801BBF24; //segment:ovl_menu +D_menu_801BBF28 = 0x801BBF28; //segment:ovl_menu +D_menu_801BBF2C = 0x801BBF2C; //segment:ovl_menu +D_menu_801BBF30 = 0x801BBF30; //segment:ovl_menu +D_menu_801BBF34 = 0x801BBF34; //segment:ovl_menu +D_menu_801BBF38 = 0x801BBF38; //segment:ovl_menu +D_menu_801BBF3C = 0x801BBF3C; //segment:ovl_menu +D_menu_801BBF40 = 0x801BBF40; //segment:ovl_menu +D_menu_801BBF44 = 0x801BBF44; //segment:ovl_menu +D_menu_801BBF48 = 0x801BBF48; //segment:ovl_menu +D_menu_801BBF4C = 0x801BBF4C; //segment:ovl_menu +D_menu_801BBF4E = 0x801BBF4E; //segment:ovl_menu +D_menu_801BBF50 = 0x801BBF50; //segment:ovl_menu +D_menu_801BC250 = 0x801BC250; //segment:ovl_menu +D_menu_801BC550 = 0x801BC550; //segment:ovl_menu +D_menu_801BC850 = 0x801BC850; //segment:ovl_menu +D_menu_801BCB50 = 0x801BCB50; //segment:ovl_menu +D_menu_801BCE50 = 0x801BCE50; //segment:ovl_menu +D_menu_801BD150 = 0x801BD150; //segment:ovl_menu +D_menu_801BD450 = 0x801BD450; //segment:ovl_menu +D_menu_801BD750 = 0x801BD750; //segment:ovl_menu +D_menu_801BDA50 = 0x801BDA50; //segment:ovl_menu +D_menu_801BDD50 = 0x801BDD50; //segment:ovl_menu +D_menu_801BE050 = 0x801BE050; //segment:ovl_menu +D_menu_801BE350 = 0x801BE350; //segment:ovl_menu +D_menu_801BE650 = 0x801BE650; //segment:ovl_menu +D_menu_801BE950 = 0x801BE950; //segment:ovl_menu +D_menu_801BEC50 = 0x801BEC50; //segment:ovl_menu +D_menu_801BEF50 = 0x801BEF50; //segment:ovl_menu +D_menu_801BF250 = 0x801BF250; //segment:ovl_menu +D_menu_801BF550 = 0x801BF550; //segment:ovl_menu +D_menu_801BF850 = 0x801BF850; //segment:ovl_menu +D_menu_801BFB50 = 0x801BFB50; //segment:ovl_menu +D_menu_801BFE50 = 0x801BFE50; //segment:ovl_menu +D_menu_801C0150 = 0x801C0150; //segment:ovl_menu +D_menu_801C0450 = 0x801C0450; //segment:ovl_menu +D_menu_801C0750 = 0x801C0750; //segment:ovl_menu +D_menu_801C0A50 = 0x801C0A50; //segment:ovl_menu +D_menu_801C0D50 = 0x801C0D50; //segment:ovl_menu +D_menu_801C1050 = 0x801C1050; //segment:ovl_menu +D_menu_801C1350 = 0x801C1350; //segment:ovl_menu +D_menu_801C1650 = 0x801C1650; //segment:ovl_menu +D_menu_801C1950 = 0x801C1950; //segment:ovl_menu +D_menu_801C1C50 = 0x801C1C50; //segment:ovl_menu +D_menu_801C1F50 = 0x801C1F50; //segment:ovl_menu +D_menu_801C2250 = 0x801C2250; //segment:ovl_menu +D_menu_801C2550 = 0x801C2550; //segment:ovl_menu +D_menu_801C2850 = 0x801C2850; //segment:ovl_menu +D_menu_801C2B50 = 0x801C2B50; //segment:ovl_menu +D_menu_801C2E50 = 0x801C2E50; //segment:ovl_menu +D_menu_801C3150 = 0x801C3150; //segment:ovl_menu +D_menu_801C3450 = 0x801C3450; //segment:ovl_menu +D_menu_801C3750 = 0x801C3750; //segment:ovl_menu +D_menu_801C3A50 = 0x801C3A50; //segment:ovl_menu +D_menu_801C3D50 = 0x801C3D50; //segment:ovl_menu +D_menu_801C4050 = 0x801C4050; //segment:ovl_menu +D_menu_801C4350 = 0x801C4350; //segment:ovl_menu +D_menu_801C4650 = 0x801C4650; //segment:ovl_menu +D_menu_801C4950 = 0x801C4950; //segment:ovl_menu +D_menu_801C4C50 = 0x801C4C50; //segment:ovl_menu +D_menu_801C4F50 = 0x801C4F50; //segment:ovl_menu +D_menu_801C5250 = 0x801C5250; //segment:ovl_menu +D_menu_801C5550 = 0x801C5550; //segment:ovl_menu +D_menu_801C5850 = 0x801C5850; //segment:ovl_menu +D_menu_801C5B50 = 0x801C5B50; //segment:ovl_menu +D_menu_801C5E50 = 0x801C5E50; //segment:ovl_menu +D_menu_801C6150 = 0x801C6150; //segment:ovl_menu +D_menu_801C6450 = 0x801C6450; //segment:ovl_menu +D_menu_801C6750 = 0x801C6750; //segment:ovl_menu +D_menu_801C6A50 = 0x801C6A50; //segment:ovl_menu +D_menu_801C6D50 = 0x801C6D50; //segment:ovl_menu +D_menu_801C7050 = 0x801C7050; //segment:ovl_menu +D_menu_801C7350 = 0x801C7350; //segment:ovl_menu +D_menu_801C7650 = 0x801C7650; //segment:ovl_menu +D_menu_801C7950 = 0x801C7950; //segment:ovl_menu +D_menu_801C7C50 = 0x801C7C50; //segment:ovl_menu +D_menu_801C7F50 = 0x801C7F50; //segment:ovl_menu +D_menu_801C8250 = 0x801C8250; //segment:ovl_menu +D_menu_801C8550 = 0x801C8550; //segment:ovl_menu +D_menu_801C8850 = 0x801C8850; //segment:ovl_menu +D_menu_801C8B50 = 0x801C8B50; //segment:ovl_menu +D_menu_801C8E50 = 0x801C8E50; //segment:ovl_menu +D_menu_801C9150 = 0x801C9150; //segment:ovl_menu +D_menu_801C9450 = 0x801C9450; //segment:ovl_menu +D_menu_801C9750 = 0x801C9750; //segment:ovl_menu +D_menu_801C9A50 = 0x801C9A50; //segment:ovl_menu +D_menu_801C9D50 = 0x801C9D50; //segment:ovl_menu +D_menu_801CA050 = 0x801CA050; //segment:ovl_menu +D_menu_801CA350 = 0x801CA350; //segment:ovl_menu +D_menu_801CA650 = 0x801CA650; //segment:ovl_menu +D_menu_801CA950 = 0x801CA950; //segment:ovl_menu +D_menu_801CAC50 = 0x801CAC50; //segment:ovl_menu +D_menu_801CAF50 = 0x801CAF50; //segment:ovl_menu +D_menu_801CB250 = 0x801CB250; //segment:ovl_menu +D_menu_801CB550 = 0x801CB550; //segment:ovl_menu +D_menu_801CB850 = 0x801CB850; //segment:ovl_menu +D_menu_801CBB50 = 0x801CBB50; //segment:ovl_menu +D_menu_801CBE50 = 0x801CBE50; //segment:ovl_menu +D_menu_801CC150 = 0x801CC150; //segment:ovl_menu +D_menu_801CC450 = 0x801CC450; //segment:ovl_menu +D_menu_801CC750 = 0x801CC750; //segment:ovl_menu +D_menu_801CCA50 = 0x801CCA50; //segment:ovl_menu +D_menu_801CCD50 = 0x801CCD50; //segment:ovl_menu +D_menu_801CD050 = 0x801CD050; //segment:ovl_menu +D_menu_801CD350 = 0x801CD350; //segment:ovl_menu +D_menu_801CD650 = 0x801CD650; //segment:ovl_menu +D_menu_801CD950 = 0x801CD950; //segment:ovl_menu +D_menu_801CDC50 = 0x801CDC50; //segment:ovl_menu +D_menu_801CDF50 = 0x801CDF50; //segment:ovl_menu +D_menu_801CE250 = 0x801CE250; //segment:ovl_menu +D_menu_801CE550 = 0x801CE550; //segment:ovl_menu +D_menu_801CE850 = 0x801CE850; //segment:ovl_menu +D_menu_801CEB50 = 0x801CEB50; //segment:ovl_menu +D_menu_801CEE50 = 0x801CEE50; //segment:ovl_menu +D_menu_801CF150 = 0x801CF150; //segment:ovl_menu +D_menu_801CF450 = 0x801CF450; //segment:ovl_menu +D_menu_801CF750 = 0x801CF750; //segment:ovl_menu +D_menu_801CFA50 = 0x801CFA50; //segment:ovl_menu +D_menu_801CFD50 = 0x801CFD50; //segment:ovl_menu +D_menu_801D0050 = 0x801D0050; //segment:ovl_menu +D_menu_801D0350 = 0x801D0350; //segment:ovl_menu +D_menu_801D0358 = 0x801D0358; //segment:ovl_menu +D_menu_801D0378 = 0x801D0378; //segment:ovl_menu +D_menu_801D037C = 0x801D037C; //segment:ovl_menu +D_menu_801D0380 = 0x801D0380; //segment:ovl_menu +D_menu_801D03E0 = 0x801D03E0; //segment:ovl_menu +D_menu_801D041C = 0x801D041C; //segment:ovl_menu +D_menu_801D0420 = 0x801D0420; //segment:ovl_menu +D_menu_801D043C = 0x801D043C; //segment:ovl_menu +D_menu_801D0440 = 0x801D0440; //segment:ovl_menu +D_menu_801D0444 = 0x801D0444; //segment:ovl_menu +D_menu_801D0448 = 0x801D0448; //segment:ovl_menu +D_menu_801D044C = 0x801D044C; //segment:ovl_menu +D_menu_801D0450 = 0x801D0450; //segment:ovl_menu +D_menu_801D0454 = 0x801D0454; //segment:ovl_menu +D_menu_801D047C = 0x801D047C; //segment:ovl_menu +D_menu_801D0480 = 0x801D0480; //segment:ovl_menu +D_menu_801D0484 = 0x801D0484; //segment:ovl_menu +D_menu_801D0488 = 0x801D0488; //segment:ovl_menu +D_menu_801D048C = 0x801D048C; //segment:ovl_menu +D_menu_801D0490 = 0x801D0490; //segment:ovl_menu +D_menu_801D0494 = 0x801D0494; //segment:ovl_menu +D_menu_801D0498 = 0x801D0498; //segment:ovl_menu +D_menu_801D049C = 0x801D049C; //segment:ovl_menu +D_menu_801D04A0 = 0x801D04A0; //segment:ovl_menu +D_menu_801D04A4 = 0x801D04A4; //segment:ovl_menu +D_menu_801D04A8 = 0x801D04A8; //segment:ovl_menu +D_menu_801D04AC = 0x801D04AC; //segment:ovl_menu +D_menu_801D04B0 = 0x801D04B0; //segment:ovl_menu +D_menu_801D04B4 = 0x801D04B4; //segment:ovl_menu +D_menu_801D04B8 = 0x801D04B8; //segment:ovl_menu +D_menu_801D04BC = 0x801D04BC; //segment:ovl_menu +D_menu_801D04C0 = 0x801D04C0; //segment:ovl_menu +D_menu_801D04C4 = 0x801D04C4; //segment:ovl_menu +D_menu_801D04C8 = 0x801D04C8; //segment:ovl_menu +D_menu_801D04CC = 0x801D04CC; //segment:ovl_menu +D_menu_801D04D0 = 0x801D04D0; //segment:ovl_menu +D_menu_801D04D4 = 0x801D04D4; //segment:ovl_menu +D_menu_801D04D8 = 0x801D04D8; //segment:ovl_menu +D_menu_801D04DC = 0x801D04DC; //segment:ovl_menu +D_menu_801D04E0 = 0x801D04E0; //segment:ovl_menu +D_menu_801D04E4 = 0x801D04E4; //segment:ovl_menu +D_menu_801D04E8 = 0x801D04E8; //segment:ovl_menu +D_menu_801D04EC = 0x801D04EC; //segment:ovl_menu +D_menu_801D04F0 = 0x801D04F0; //segment:ovl_menu +D_menu_801D04F4 = 0x801D04F4; //segment:ovl_menu +D_menu_801D04F8 = 0x801D04F8; //segment:ovl_menu +D_menu_801D04FC = 0x801D04FC; //segment:ovl_menu +D_menu_801D0500 = 0x801D0500; //segment:ovl_menu +D_menu_801D0504 = 0x801D0504; //segment:ovl_menu +D_menu_801D0508 = 0x801D0508; //segment:ovl_menu +D_menu_801D050C = 0x801D050C; //segment:ovl_menu +D_menu_801D0510 = 0x801D0510; //segment:ovl_menu +D_menu_801D0514 = 0x801D0514; //segment:ovl_menu +D_menu_801D0518 = 0x801D0518; //segment:ovl_menu +D_menu_801D051C = 0x801D051C; //segment:ovl_menu +D_menu_801D0520 = 0x801D0520; //segment:ovl_menu +D_menu_801D0524 = 0x801D0524; //segment:ovl_menu +D_menu_801D0528 = 0x801D0528; //segment:ovl_menu +D_menu_801D052C = 0x801D052C; //segment:ovl_menu +D_menu_801D0530 = 0x801D0530; //segment:ovl_menu +D_menu_801D0534 = 0x801D0534; //segment:ovl_menu +D_menu_801D0538 = 0x801D0538; //segment:ovl_menu +D_menu_801D053C = 0x801D053C; //segment:ovl_menu +D_menu_801D0540 = 0x801D0540; //segment:ovl_menu +D_menu_801D0544 = 0x801D0544; //segment:ovl_menu +D_menu_801D0548 = 0x801D0548; //segment:ovl_menu +D_menu_801D054C = 0x801D054C; //segment:ovl_menu +D_menu_801D0550 = 0x801D0550; //segment:ovl_menu +D_menu_801D0554 = 0x801D0554; //segment:ovl_menu +D_menu_801D0558 = 0x801D0558; //segment:ovl_menu +D_menu_801D055C = 0x801D055C; //segment:ovl_menu +D_menu_801D0560 = 0x801D0560; //segment:ovl_menu +D_menu_801D0564 = 0x801D0564; //segment:ovl_menu +D_menu_801D0568 = 0x801D0568; //segment:ovl_menu +D_menu_801D056C = 0x801D056C; //segment:ovl_menu +D_menu_801D0570 = 0x801D0570; //segment:ovl_menu +D_menu_801D0574 = 0x801D0574; //segment:ovl_menu +D_menu_801D0578 = 0x801D0578; //segment:ovl_menu +D_menu_801D057C = 0x801D057C; //segment:ovl_menu +D_menu_801D0580 = 0x801D0580; //segment:ovl_menu +D_menu_801D0588 = 0x801D0588; //segment:ovl_menu +D_menu_801D058C = 0x801D058C; //segment:ovl_menu +D_menu_801D0590 = 0x801D0590; //segment:ovl_menu +D_menu_801D0598 = 0x801D0598; //segment:ovl_menu +D_menu_801D05A8 = 0x801D05A8; //segment:ovl_menu +D_menu_801D0968 = 0x801D0968; //segment:ovl_menu +D_menu_801D0B28 = 0x801D0B28; //segment:ovl_menu +D_menu_801D0B68 = 0x801D0B68; //segment:ovl_menu +D_menu_801D0BA8 = 0x801D0BA8; //segment:ovl_menu +D_menu_801D0BE8 = 0x801D0BE8; //segment:ovl_menu +D_menu_801D0CA8 = 0x801D0CA8; //segment:ovl_menu +D_menu_801D0D28 = 0x801D0D28; //segment:ovl_menu +D_menu_801D10E8 = 0x801D10E8; //segment:ovl_menu +D_menu_801D14A8 = 0x801D14A8; //segment:ovl_menu +D_menu_801D14B0 = 0x801D14B0; //segment:ovl_menu +D_menu_801D155C = 0x801D155C; //segment:ovl_menu +D_menu_801D1560 = 0x801D1560; //segment:ovl_menu +D_menu_801D159C = 0x801D159C; //segment:ovl_menu +D_menu_801D15A0 = 0x801D15A0; //segment:ovl_menu +D_menu_801D15A4 = 0x801D15A4; //segment:ovl_menu +D_menu_801D15A8 = 0x801D15A8; //segment:ovl_menu +D_menu_801D15AC = 0x801D15AC; //segment:ovl_menu +D_menu_801D15B0 = 0x801D15B0; //segment:ovl_menu +D_menu_801D15B4 = 0x801D15B4; //segment:ovl_menu +D_menu_801D15B8 = 0x801D15B8; //segment:ovl_menu +D_menu_801D15BC = 0x801D15BC; //segment:ovl_menu +D_menu_801D15C0 = 0x801D15C0; //segment:ovl_menu +D_menu_801D15C4 = 0x801D15C4; //segment:ovl_menu +D_menu_801D15C8 = 0x801D15C8; //segment:ovl_menu +D_menu_801D15CC = 0x801D15CC; //segment:ovl_menu +D_menu_801D15D0 = 0x801D15D0; //segment:ovl_menu +D_menu_801D15D4 = 0x801D15D4; //segment:ovl_menu +D_menu_801D15D8 = 0x801D15D8; //segment:ovl_menu +D_menu_801D15DC = 0x801D15DC; //segment:ovl_menu +D_menu_801D15E0 = 0x801D15E0; //segment:ovl_menu +D_menu_801D15E4 = 0x801D15E4; //segment:ovl_menu +D_menu_801D15E8 = 0x801D15E8; //segment:ovl_menu +D_menu_801D15EC = 0x801D15EC; //segment:ovl_menu +D_menu_801D15F0 = 0x801D15F0; //segment:ovl_menu +D_menu_801D15F4 = 0x801D15F4; //segment:ovl_menu +D_menu_801D15F8 = 0x801D15F8; //segment:ovl_menu +D_menu_801D15FC = 0x801D15FC; //segment:ovl_menu +D_menu_801D1600 = 0x801D1600; //segment:ovl_menu +D_menu_801D1604 = 0x801D1604; //segment:ovl_menu +D_menu_801D1608 = 0x801D1608; //segment:ovl_menu +D_menu_801D160C = 0x801D160C; //segment:ovl_menu +D_menu_801D1640 = 0x801D1640; //segment:ovl_menu +D_menu_801D1644 = 0x801D1644; //segment:ovl_menu +D_menu_801D1648 = 0x801D1648; //segment:ovl_menu +D_menu_801D164C = 0x801D164C; //segment:ovl_menu +D_menu_801D167C = 0x801D167C; //segment:ovl_menu +D_menu_801D1680 = 0x801D1680; //segment:ovl_menu +D_menu_801D1684 = 0x801D1684; //segment:ovl_menu +D_menu_801D1688 = 0x801D1688; //segment:ovl_menu +D_menu_801D168C = 0x801D168C; //segment:ovl_menu +D_menu_801D168D = 0x801D168D; //segment:ovl_menu +D_menu_801D168E = 0x801D168E; //segment:ovl_menu +D_menu_801D1690 = 0x801D1690; //segment:ovl_menu +D_menu_801D16B0 = 0x801D16B0; //segment:ovl_menu +D_menu_801D1728 = 0x801D1728; //segment:ovl_menu +D_menu_801D17A0 = 0x801D17A0; //segment:ovl_menu +D_menu_801D1818 = 0x801D1818; //segment:ovl_menu +D_menu_801D1890 = 0x801D1890; //segment:ovl_menu +D_menu_801D18B8 = 0x801D18B8; //segment:ovl_menu +D_menu_801D1908 = 0x801D1908; //segment:ovl_menu +D_menu_801D1980 = 0x801D1980; //segment:ovl_menu +D_menu_801D1984 = 0x801D1984; //segment:ovl_menu +D_menu_801D1988 = 0x801D1988; //segment:ovl_menu +D_menu_801D198C = 0x801D198C; //segment:ovl_menu +D_menu_801D1990 = 0x801D1990; //segment:ovl_menu +D_menu_801D199C = 0x801D199C; //segment:ovl_menu +D_menu_801D19A0 = 0x801D19A0; //segment:ovl_menu +D_menu_801D19A4 = 0x801D19A4; //segment:ovl_menu +D_menu_801D19A8 = 0x801D19A8; //segment:ovl_menu +D_menu_801D19AC = 0x801D19AC; //segment:ovl_menu +D_menu_801D19B0 = 0x801D19B0; //segment:ovl_menu +D_menu_801D19B4 = 0x801D19B4; //segment:ovl_menu +D_menu_801D19B8 = 0x801D19B8; //segment:ovl_menu +D_menu_801D19BC = 0x801D19BC; //segment:ovl_menu +D_menu_801D19C0 = 0x801D19C0; //segment:ovl_menu +D_menu_801D19C8 = 0x801D19C8; //segment:ovl_menu +D_menu_801D19E0 = 0x801D19E0; //segment:ovl_menu +D_menu_801D19E4 = 0x801D19E4; //segment:ovl_menu +D_menu_801D19E8 = 0x801D19E8; //segment:ovl_menu +D_menu_801D1A10 = 0x801D1A10; //segment:ovl_menu +D_menu_801D1A14 = 0x801D1A14; //segment:ovl_menu +D_menu_801D1A18 = 0x801D1A18; //segment:ovl_menu +D_menu_801D1A38 = 0x801D1A38; //segment:ovl_menu +D_menu_801D1AA4 = 0x801D1AA4; //segment:ovl_menu +D_menu_801D1AA8 = 0x801D1AA8; //segment:ovl_menu +D_menu_801D1AAC = 0x801D1AAC; //segment:ovl_menu +D_menu_801D1AB0 = 0x801D1AB0; //segment:ovl_menu +D_menu_801D1AB4 = 0x801D1AB4; //segment:ovl_menu +D_menu_801D1AB8 = 0x801D1AB8; //segment:ovl_menu +D_menu_801D1ABC = 0x801D1ABC; //segment:ovl_menu +D_menu_801D1AC0 = 0x801D1AC0; //segment:ovl_menu +D_menu_801D1AC8 = 0x801D1AC8; //segment:ovl_menu +D_menu_801D1AD4 = 0x801D1AD4; //segment:ovl_menu +D_menu_801D1AD8 = 0x801D1AD8; //segment:ovl_menu +D_menu_801D1AE0 = 0x801D1AE0; //segment:ovl_menu +D_menu_801D1AEC = 0x801D1AEC; //segment:ovl_menu +D_menu_801D1AF0 = 0x801D1AF0; //segment:ovl_menu +D_menu_801D1AF4 = 0x801D1AF4; //segment:ovl_menu +D_menu_801D1AF8 = 0x801D1AF8; //segment:ovl_menu +D_menu_801D1B00 = 0x801D1B00; //segment:ovl_menu +D_menu_801D1B20 = 0x801D1B20; //segment:ovl_menu +D_menu_801D1B40 = 0x801D1B40; //segment:ovl_menu +D_menu_801D1B60 = 0x801D1B60; //segment:ovl_menu +D_menu_801D1B68 = 0x801D1B68; //segment:ovl_menu +D_menu_801D1B88 = 0x801D1B88; //segment:ovl_menu +D_menu_801D1BA8 = 0x801D1BA8; //segment:ovl_menu +D_menu_801D1BAC = 0x801D1BAC; //segment:ovl_menu +D_menu_801D1BB0 = 0x801D1BB0; //segment:ovl_menu +D_menu_801D1BB8 = 0x801D1BB8; //segment:ovl_menu + +func_ending_8018B020 = 0x8018B020; //segment:ovl_ending +func_ending_8018B1A4 = 0x8018B1A4; //segment:ovl_ending +func_ending_8018B360 = 0x8018B360; //segment:ovl_ending +func_ending_8018B83C = 0x8018B83C; //segment:ovl_ending +func_ending_8018BB30 = 0x8018BB30; //segment:ovl_ending +func_ending_8018BEA4 = 0x8018BEA4; //segment:ovl_ending +func_ending_8018BF6C = 0x8018BF6C; //segment:ovl_ending +func_ending_8018C13C = 0x8018C13C; //segment:ovl_ending +func_ending_8018C1FC = 0x8018C1FC; //segment:ovl_ending +func_ending_8018C3FC = 0x8018C3FC; //segment:ovl_ending +func_ending_8018C8BC = 0x8018C8BC; //segment:ovl_ending +func_ending_8018CC10 = 0x8018CC10; //segment:ovl_ending +func_ending_8018D770 = 0x8018D770; //segment:ovl_ending +func_ending_8018DB30 = 0x8018DB30; //segment:ovl_ending +func_ending_8018DC30 = 0x8018DC30; //segment:ovl_ending +func_ending_8018DDB4 = 0x8018DDB4; //segment:ovl_ending +func_ending_8018E07C = 0x8018E07C; //segment:ovl_ending +func_ending_8018E314 = 0x8018E314; //segment:ovl_ending +func_ending_8018E3E8 = 0x8018E3E8; //segment:ovl_ending +func_ending_8018E458 = 0x8018E458; //segment:ovl_ending +func_ending_8018E5D8 = 0x8018E5D8; //segment:ovl_ending +func_ending_8018E7A4 = 0x8018E7A4; //segment:ovl_ending +func_ending_8018E8E8 = 0x8018E8E8; //segment:ovl_ending +func_ending_8018E9E0 = 0x8018E9E0; //segment:ovl_ending +func_ending_8018EA94 = 0x8018EA94; //segment:ovl_ending +func_ending_8018EC1C = 0x8018EC1C; //segment:ovl_ending +func_ending_8018EE8C = 0x8018EE8C; //segment:ovl_ending +func_ending_8018F06C = 0x8018F06C; //segment:ovl_ending +func_ending_8018F500 = 0x8018F500; //segment:ovl_ending +func_ending_80190100 = 0x80190100; //segment:ovl_ending +func_ending_80190918 = 0x80190918; //segment:ovl_ending +func_ending_80190954 = 0x80190954; //segment:ovl_ending +func_ending_80190990 = 0x80190990; //segment:ovl_ending +func_ending_80190A60 = 0x80190A60; //segment:ovl_ending +func_ending_80190B84 = 0x80190B84; //segment:ovl_ending +func_ending_80190D00 = 0x80190D00; //segment:ovl_ending +func_ending_80190EE0 = 0x80190EE0; //segment:ovl_ending +func_ending_801910D8 = 0x801910D8; //segment:ovl_ending +func_ending_801913A0 = 0x801913A0; //segment:ovl_ending +func_ending_801918A4 = 0x801918A4; //segment:ovl_ending +func_ending_80191EA4 = 0x80191EA4; //segment:ovl_ending +func_ending_801924A4 = 0x801924A4; //segment:ovl_ending +func_ending_80192994 = 0x80192994; //segment:ovl_ending +func_ending_80192D38 = 0x80192D38; //segment:ovl_ending +func_ending_8019334C = 0x8019334C; //segment:ovl_ending +func_ending_80193960 = 0x80193960; //segment:ovl_ending +func_ending_80193D34 = 0x80193D34; //segment:ovl_ending +func_ending_80193E64 = 0x80193E64; //segment:ovl_ending +func_ending_801943DC = 0x801943DC; //segment:ovl_ending +func_ending_80194920 = 0x80194920; //segment:ovl_ending +func_ending_80194980 = 0x80194980; //segment:ovl_ending +func_ending_80194E14 = 0x80194E14; //segment:ovl_ending +func_ending_80194E24 = 0x80194E24; //segment:ovl_ending +func_ending_8019536C = 0x8019536C; //segment:ovl_ending +func_ending_80195390 = 0x80195390; //segment:ovl_ending +func_ending_80195878 = 0x80195878; //segment:ovl_ending +func_ending_801959A4 = 0x801959A4; //segment:ovl_ending +func_ending_80195A90 = 0x80195A90; //segment:ovl_ending +func_ending_80195C00 = 0x80195C00; //segment:ovl_ending +func_ending_80195DE8 = 0x80195DE8; //segment:ovl_ending +D_ending_80195FD0 = 0x80195FD0; //segment:ovl_ending +D_ending_80195FE0 = 0x80195FE0; //segment:ovl_ending +D_ending_80195FEC = 0x80195FEC; //segment:ovl_ending +D_ending_801960EC = 0x801960EC; //segment:ovl_ending +D_ending_801961EC = 0x801961EC; //segment:ovl_ending +D_ending_8019626C = 0x8019626C; //segment:ovl_ending +D_ending_80196278 = 0x80196278; //segment:ovl_ending +D_ending_801963B8 = 0x801963B8; //segment:ovl_ending +D_ending_801963C4 = 0x801963C4; //segment:ovl_ending +D_ending_801963D0 = 0x801963D0; //segment:ovl_ending +D_ending_801963DC = 0x801963DC; //segment:ovl_ending +D_ending_801963E8 = 0x801963E8; //segment:ovl_ending +D_ending_801963F0 = 0x801963F0; //segment:ovl_ending +D_ending_80196408 = 0x80196408; //segment:ovl_ending +D_ending_80196420 = 0x80196420; //segment:ovl_ending +D_ending_80196444 = 0x80196444; //segment:ovl_ending +D_ending_80196468 = 0x80196468; //segment:ovl_ending +D_ending_80196474 = 0x80196474; //segment:ovl_ending +D_ending_80196480 = 0x80196480; //segment:ovl_ending +D_ending_801964C8 = 0x801964C8; //segment:ovl_ending +D_ending_80196510 = 0x80196510; //segment:ovl_ending +D_ending_80196528 = 0x80196528; //segment:ovl_ending +D_ending_80196534 = 0x80196534; //segment:ovl_ending +D_ending_80196540 = 0x80196540; //segment:ovl_ending +D_ending_8019654C = 0x8019654C; //segment:ovl_ending +D_ending_80196558 = 0x80196558; //segment:ovl_ending +D_ending_80196564 = 0x80196564; //segment:ovl_ending +D_ending_80196570 = 0x80196570; //segment:ovl_ending +D_ending_8019657C = 0x8019657C; //segment:ovl_ending +D_ending_80196588 = 0x80196588; //segment:ovl_ending +D_ending_80196594 = 0x80196594; //segment:ovl_ending +D_ending_801965C0 = 0x801965C0; //segment:ovl_ending +D_ending_801965E4 = 0x801965E4; //segment:ovl_ending +D_ending_801965FC = 0x801965FC; //segment:ovl_ending +D_ending_80196620 = 0x80196620; //segment:ovl_ending +D_ending_80196624 = 0x80196624; //segment:ovl_ending +D_ending_80196CC8 = 0x80196CC8; //segment:ovl_ending +D_ending_80196CD4 = 0x80196CD4; //segment:ovl_ending +D_ending_80196CE0 = 0x80196CE0; //segment:ovl_ending +D_ending_80199778 = 0x80199778; //segment:ovl_ending +D_ending_8019A490 = 0x8019A490; //segment:ovl_ending +D_ending_8019A494 = 0x8019A494; //segment:ovl_ending +D_ending_8019A498 = 0x8019A498; //segment:ovl_ending +D_ending_8019A4A0 = 0x8019A4A0; //segment:ovl_ending +D_ending_8019A4A8 = 0x8019A4A8; //segment:ovl_ending +D_ending_8019A4B8 = 0x8019A4B8; //segment:ovl_ending +D_ending_8019A4BC = 0x8019A4BC; //segment:ovl_ending +D_ending_8019A5A0 = 0x8019A5A0; //segment:ovl_ending +D_ending_8019A5D8 = 0x8019A5D8; //segment:ovl_ending +D_ending_8019A720 = 0x8019A720; //segment:ovl_ending +D_ending_8019A724 = 0x8019A724; //segment:ovl_ending +D_ending_8019A728 = 0x8019A728; //segment:ovl_ending +D_ending_8019A72C = 0x8019A72C; //segment:ovl_ending +D_ending_8019A730 = 0x8019A730; //segment:ovl_ending +D_ending_8019A734 = 0x8019A734; //segment:ovl_ending +D_ending_8019A738 = 0x8019A738; //segment:ovl_ending +D_ending_8019A744 = 0x8019A744; //segment:ovl_ending +D_ending_8019A990 = 0x8019A990; //segment:ovl_ending +D_ending_8019A998 = 0x8019A998; //segment:ovl_ending +D_ending_8019A99C = 0x8019A99C; //segment:ovl_ending +D_ending_8019A9A4 = 0x8019A9A4; //segment:ovl_ending +D_ending_8019A9CC = 0x8019A9CC; //segment:ovl_ending +D_ending_8019A9D4 = 0x8019A9D4; //segment:ovl_ending +D_ending_8019ABE8 = 0x8019ABE8; //segment:ovl_ending +D_ending_8019ABEC = 0x8019ABEC; //segment:ovl_ending +D_ending_8019ABF0 = 0x8019ABF0; //segment:ovl_ending +D_ending_8019AC08 = 0x8019AC08; //segment:ovl_ending +D_ending_8019AC34 = 0x8019AC34; //segment:ovl_ending +D_ending_8019AE40 = 0x8019AE40; //segment:ovl_ending +D_ending_8019B098 = 0x8019B098; //segment:ovl_ending +D_ending_8019B0A4 = 0x8019B0A4; //segment:ovl_ending +D_ending_8019B9F8 = 0x8019B9F8; //segment:ovl_ending +D_ending_8019BD18 = 0x8019BD18; //segment:ovl_ending +D_ending_8019BD24 = 0x8019BD24; //segment:ovl_ending +D_ending_8019BD30 = 0x8019BD30; //segment:ovl_ending +D_ending_8019CB40 = 0x8019CB40; //segment:ovl_ending +D_ending_8019CB80 = 0x8019CB80; //segment:ovl_ending +D_ending_8019CB88 = 0x8019CB88; //segment:ovl_ending +D_ending_8019CB90 = 0x8019CB90; //segment:ovl_ending +D_ending_8019CBA0 = 0x8019CBA0; //segment:ovl_ending +D_ending_8019CBA4 = 0x8019CBA4; //segment:ovl_ending +D_ending_8019CBA8 = 0x8019CBA8; //segment:ovl_ending + +func_unused_8018B020 = 0x8018B020; //segment:ovl_unused +D_unused_8018B030 = 0x8018B030; //segment:ovl_unused +D_8018B0C0 = 0x8018B0C0; //segment:ovl_unused + +D_fr_8017B230 = 0x8017B230; //segment:ast_radio_fr type:u16 +D_fr_8017B8CC = 0x8017B8CC; //segment:ast_radio_fr type:u16 +D_fr_8017B91C = 0x8017B91C; //segment:ast_radio_fr type:u16 +D_fr_8017B978 = 0x8017B978; //segment:ast_radio_fr type:u16 +D_fr_8017B9C4 = 0x8017B9C4; //segment:ast_radio_fr type:u16 +D_fr_8017BA24 = 0x8017BA24; //segment:ast_radio_fr type:u16 +D_fr_8017BA84 = 0x8017BA84; //segment:ast_radio_fr type:u16 +D_fr_8017BAF4 = 0x8017BAF4; //segment:ast_radio_fr type:u16 +D_fr_8017BB78 = 0x8017BB78; //segment:ast_radio_fr type:u16 +D_fr_8017BBE8 = 0x8017BBE8; //segment:ast_radio_fr type:u16 +D_fr_8017BC7C = 0x8017BC7C; //segment:ast_radio_fr type:u16 +D_fr_8017BCD4 = 0x8017BCD4; //segment:ast_radio_fr type:u16 +D_fr_8017BD40 = 0x8017BD40; //segment:ast_radio_fr type:u16 +D_fr_8017BD90 = 0x8017BD90; //segment:ast_radio_fr type:u16 +D_fr_8017BE14 = 0x8017BE14; //segment:ast_radio_fr type:u16 +D_fr_8017BE60 = 0x8017BE60; //segment:ast_radio_fr type:u16 +D_fr_8017BEC4 = 0x8017BEC4; //segment:ast_radio_fr type:u16 +D_fr_8017BEE4 = 0x8017BEE4; //segment:ast_radio_fr type:u16 +D_fr_8017BF6C = 0x8017BF6C; //segment:ast_radio_fr type:u16 +D_fr_8017BF90 = 0x8017BF90; //segment:ast_radio_fr type:u16 +D_fr_8017BFF8 = 0x8017BFF8; //segment:ast_radio_fr type:u16 +D_fr_8017C030 = 0x8017C030; //segment:ast_radio_fr type:u16 +D_fr_8017C0AC = 0x8017C0AC; //segment:ast_radio_fr type:u16 +D_fr_8017C0E4 = 0x8017C0E4; //segment:ast_radio_fr type:u16 +D_fr_8017C168 = 0x8017C168; //segment:ast_radio_fr type:u16 +D_fr_8017C19C = 0x8017C19C; //segment:ast_radio_fr type:u16 +D_fr_8017C218 = 0x8017C218; //segment:ast_radio_fr type:u16 +D_fr_8017C268 = 0x8017C268; //segment:ast_radio_fr type:u16 +D_fr_8017C2AC = 0x8017C2AC; //segment:ast_radio_fr type:u16 +D_fr_8017C2E0 = 0x8017C2E0; //segment:ast_radio_fr type:u16 +D_fr_8017C34C = 0x8017C34C; //segment:ast_radio_fr type:u16 +D_fr_8017C388 = 0x8017C388; //segment:ast_radio_fr type:u16 +D_fr_8017C3CC = 0x8017C3CC; //segment:ast_radio_fr type:u16 +D_fr_8017C3F8 = 0x8017C3F8; //segment:ast_radio_fr type:u16 +D_fr_8017C480 = 0x8017C480; //segment:ast_radio_fr type:u16 +D_fr_8017C4AC = 0x8017C4AC; //segment:ast_radio_fr type:u16 +D_fr_8017C4DC = 0x8017C4DC; //segment:ast_radio_fr type:u16 +D_fr_8017C518 = 0x8017C518; //segment:ast_radio_fr type:u16 +D_fr_8017C550 = 0x8017C550; //segment:ast_radio_fr type:u16 +D_fr_8017C584 = 0x8017C584; //segment:ast_radio_fr type:u16 +D_fr_8017C5C8 = 0x8017C5C8; //segment:ast_radio_fr type:u16 +D_fr_8017C628 = 0x8017C628; //segment:ast_radio_fr type:u16 +D_fr_8017C670 = 0x8017C670; //segment:ast_radio_fr type:u16 +D_fr_8017C698 = 0x8017C698; //segment:ast_radio_fr type:u16 +D_fr_8017C6DC = 0x8017C6DC; //segment:ast_radio_fr type:u16 +D_fr_8017C700 = 0x8017C700; //segment:ast_radio_fr type:u16 +D_fr_8017C720 = 0x8017C720; //segment:ast_radio_fr type:u16 +D_fr_8017C734 = 0x8017C734; //segment:ast_radio_fr type:u16 +D_fr_8017C768 = 0x8017C768; //segment:ast_radio_fr type:u16 +D_fr_8017C7B4 = 0x8017C7B4; //segment:ast_radio_fr type:u16 +D_fr_8017C7F4 = 0x8017C7F4; //segment:ast_radio_fr type:u16 +D_fr_8017C82C = 0x8017C82C; //segment:ast_radio_fr type:u16 +D_fr_8017C874 = 0x8017C874; //segment:ast_radio_fr type:u16 +D_fr_8017C8DC = 0x8017C8DC; //segment:ast_radio_fr type:u16 +D_fr_8017C91C = 0x8017C91C; //segment:ast_radio_fr type:u16 +D_fr_8017C964 = 0x8017C964; //segment:ast_radio_fr type:u16 +D_fr_8017C994 = 0x8017C994; //segment:ast_radio_fr type:u16 +D_fr_8017C9B8 = 0x8017C9B8; //segment:ast_radio_fr type:u16 +D_fr_8017C9E0 = 0x8017C9E0; //segment:ast_radio_fr type:u16 +D_fr_8017CA34 = 0x8017CA34; //segment:ast_radio_fr type:u16 +D_fr_8017CA70 = 0x8017CA70; //segment:ast_radio_fr type:u16 +D_fr_8017CA88 = 0x8017CA88; //segment:ast_radio_fr type:u16 +D_fr_8017CAC4 = 0x8017CAC4; //segment:ast_radio_fr type:u16 +D_fr_8017CB08 = 0x8017CB08; //segment:ast_radio_fr type:u16 +D_fr_8017CB38 = 0x8017CB38; //segment:ast_radio_fr type:u16 +D_fr_8017CB7C = 0x8017CB7C; //segment:ast_radio_fr type:u16 +D_fr_8017CBD4 = 0x8017CBD4; //segment:ast_radio_fr type:u16 +D_fr_8017CC0C = 0x8017CC0C; //segment:ast_radio_fr type:u16 +D_fr_8017CC50 = 0x8017CC50; //segment:ast_radio_fr type:u16 +D_fr_8017CCAC = 0x8017CCAC; //segment:ast_radio_fr type:u16 +D_fr_8017CD1C = 0x8017CD1C; //segment:ast_radio_fr type:u16 +D_fr_8017CD5C = 0x8017CD5C; //segment:ast_radio_fr type:u16 +D_fr_8017CD70 = 0x8017CD70; //segment:ast_radio_fr type:u16 +D_fr_8017CDDC = 0x8017CDDC; //segment:ast_radio_fr type:u16 +D_fr_8017CE28 = 0x8017CE28; //segment:ast_radio_fr type:u16 +D_fr_8017CE74 = 0x8017CE74; //segment:ast_radio_fr type:u16 +D_fr_8017CEB4 = 0x8017CEB4; //segment:ast_radio_fr type:u16 +D_fr_8017CEF8 = 0x8017CEF8; //segment:ast_radio_fr type:u16 +D_fr_8017CF08 = 0x8017CF08; //segment:ast_radio_fr type:u16 +D_fr_8017CF3C = 0x8017CF3C; //segment:ast_radio_fr type:u16 +D_fr_8017CF6C = 0x8017CF6C; //segment:ast_radio_fr type:u16 +D_fr_8017CFC8 = 0x8017CFC8; //segment:ast_radio_fr type:u16 +D_fr_8017D00C = 0x8017D00C; //segment:ast_radio_fr type:u16 +D_fr_8017D048 = 0x8017D048; //segment:ast_radio_fr type:u16 +D_fr_8017D0B0 = 0x8017D0B0; //segment:ast_radio_fr type:u16 +D_fr_8017D0CC = 0x8017D0CC; //segment:ast_radio_fr type:u16 +D_fr_8017D128 = 0x8017D128; //segment:ast_radio_fr type:u16 +D_fr_8017D170 = 0x8017D170; //segment:ast_radio_fr type:u16 +D_fr_8017D1B4 = 0x8017D1B4; //segment:ast_radio_fr type:u16 +D_fr_8017D1F8 = 0x8017D1F8; //segment:ast_radio_fr type:u16 +D_fr_8017D248 = 0x8017D248; //segment:ast_radio_fr type:u16 +D_fr_8017D298 = 0x8017D298; //segment:ast_radio_fr type:u16 +D_fr_8017D2D4 = 0x8017D2D4; //segment:ast_radio_fr type:u16 +D_fr_8017D318 = 0x8017D318; //segment:ast_radio_fr type:u16 +D_fr_8017D358 = 0x8017D358; //segment:ast_radio_fr type:u16 +D_fr_8017D398 = 0x8017D398; //segment:ast_radio_fr type:u16 +D_fr_8017D3D4 = 0x8017D3D4; //segment:ast_radio_fr type:u16 +D_fr_8017D3FC = 0x8017D3FC; //segment:ast_radio_fr type:u16 +D_fr_8017D434 = 0x8017D434; //segment:ast_radio_fr type:u16 +D_fr_8017D46C = 0x8017D46C; //segment:ast_radio_fr type:u16 +D_fr_8017D4A8 = 0x8017D4A8; //segment:ast_radio_fr type:u16 +D_fr_8017D500 = 0x8017D500; //segment:ast_radio_fr type:u16 +D_fr_8017D524 = 0x8017D524; //segment:ast_radio_fr type:u16 +D_fr_8017D544 = 0x8017D544; //segment:ast_radio_fr type:u16 +D_fr_8017D598 = 0x8017D598; //segment:ast_radio_fr type:u16 +D_fr_8017D5F0 = 0x8017D5F0; //segment:ast_radio_fr type:u16 +D_fr_8017D634 = 0x8017D634; //segment:ast_radio_fr type:u16 +D_fr_8017D66C = 0x8017D66C; //segment:ast_radio_fr type:u16 +D_fr_8017D6A4 = 0x8017D6A4; //segment:ast_radio_fr type:u16 +D_fr_8017D6FC = 0x8017D6FC; //segment:ast_radio_fr type:u16 +D_fr_8017D730 = 0x8017D730; //segment:ast_radio_fr type:u16 +D_fr_8017D77C = 0x8017D77C; //segment:ast_radio_fr type:u16 +D_fr_8017D7D4 = 0x8017D7D4; //segment:ast_radio_fr type:u16 +D_fr_8017D808 = 0x8017D808; //segment:ast_radio_fr type:u16 +D_fr_8017D84C = 0x8017D84C; //segment:ast_radio_fr type:u16 +D_fr_8017D8A8 = 0x8017D8A8; //segment:ast_radio_fr type:u16 +D_fr_8017D908 = 0x8017D908; //segment:ast_radio_fr type:u16 +D_fr_8017D958 = 0x8017D958; //segment:ast_radio_fr type:u16 +D_fr_8017D990 = 0x8017D990; //segment:ast_radio_fr type:u16 +D_fr_8017D9D4 = 0x8017D9D4; //segment:ast_radio_fr type:u16 +D_fr_8017DA28 = 0x8017DA28; //segment:ast_radio_fr type:u16 +D_fr_8017DA74 = 0x8017DA74; //segment:ast_radio_fr type:u16 +D_fr_8017DAAC = 0x8017DAAC; //segment:ast_radio_fr type:u16 +D_fr_8017DAF0 = 0x8017DAF0; //segment:ast_radio_fr type:u16 +D_fr_8017DB14 = 0x8017DB14; //segment:ast_radio_fr type:u16 +D_fr_8017DB54 = 0x8017DB54; //segment:ast_radio_fr type:u16 +D_fr_8017DB9C = 0x8017DB9C; //segment:ast_radio_fr type:u16 +D_fr_8017DBE0 = 0x8017DBE0; //segment:ast_radio_fr type:u16 +D_fr_8017DC00 = 0x8017DC00; //segment:ast_radio_fr type:u16 +D_fr_8017DC2C = 0x8017DC2C; //segment:ast_radio_fr type:u16 +D_fr_8017DC5C = 0x8017DC5C; //segment:ast_radio_fr type:u16 +D_fr_8017DCB0 = 0x8017DCB0; //segment:ast_radio_fr type:u16 +D_fr_8017DCD8 = 0x8017DCD8; //segment:ast_radio_fr type:u16 +D_fr_8017DCF0 = 0x8017DCF0; //segment:ast_radio_fr type:u16 +D_fr_8017DD24 = 0x8017DD24; //segment:ast_radio_fr type:u16 +D_fr_8017DD64 = 0x8017DD64; //segment:ast_radio_fr type:u16 +D_fr_8017DD90 = 0x8017DD90; //segment:ast_radio_fr type:u16 +D_fr_8017DDC8 = 0x8017DDC8; //segment:ast_radio_fr type:u16 +D_fr_8017DE00 = 0x8017DE00; //segment:ast_radio_fr type:u16 +D_fr_8017DE3C = 0x8017DE3C; //segment:ast_radio_fr type:u16 +D_fr_8017DE9C = 0x8017DE9C; //segment:ast_radio_fr type:u16 +D_fr_8017DED0 = 0x8017DED0; //segment:ast_radio_fr type:u16 +D_fr_8017DF20 = 0x8017DF20; //segment:ast_radio_fr type:u16 +D_fr_8017DF4C = 0x8017DF4C; //segment:ast_radio_fr type:u16 +D_fr_8017DFC4 = 0x8017DFC4; //segment:ast_radio_fr type:u16 +D_fr_8017E014 = 0x8017E014; //segment:ast_radio_fr type:u16 +D_fr_8017E058 = 0x8017E058; //segment:ast_radio_fr type:u16 +D_fr_8017E0B4 = 0x8017E0B4; //segment:ast_radio_fr type:u16 +D_fr_8017E0C8 = 0x8017E0C8; //segment:ast_radio_fr type:u16 +D_fr_8017E118 = 0x8017E118; //segment:ast_radio_fr type:u16 +D_fr_8017E14C = 0x8017E14C; //segment:ast_radio_fr type:u16 +D_fr_8017E1A8 = 0x8017E1A8; //segment:ast_radio_fr type:u16 +D_fr_8017E1EC = 0x8017E1EC; //segment:ast_radio_fr type:u16 +D_fr_8017E250 = 0x8017E250; //segment:ast_radio_fr type:u16 +D_fr_8017E29C = 0x8017E29C; //segment:ast_radio_fr type:u16 +D_fr_8017E2DC = 0x8017E2DC; //segment:ast_radio_fr type:u16 +D_fr_8017E320 = 0x8017E320; //segment:ast_radio_fr type:u16 +D_fr_8017E350 = 0x8017E350; //segment:ast_radio_fr type:u16 +D_fr_8017E3BC = 0x8017E3BC; //segment:ast_radio_fr type:u16 +D_fr_8017E3D8 = 0x8017E3D8; //segment:ast_radio_fr type:u16 +D_fr_8017E430 = 0x8017E430; //segment:ast_radio_fr type:u16 +D_fr_8017E498 = 0x8017E498; //segment:ast_radio_fr type:u16 +D_fr_8017E4E8 = 0x8017E4E8; //segment:ast_radio_fr type:u16 +D_fr_8017E514 = 0x8017E514; //segment:ast_radio_fr type:u16 +D_fr_8017E56C = 0x8017E56C; //segment:ast_radio_fr type:u16 +D_fr_8017E5CC = 0x8017E5CC; //segment:ast_radio_fr type:u16 +D_fr_8017E630 = 0x8017E630; //segment:ast_radio_fr type:u16 +D_fr_8017E668 = 0x8017E668; //segment:ast_radio_fr type:u16 +D_fr_8017E6B0 = 0x8017E6B0; //segment:ast_radio_fr type:u16 +D_fr_8017E704 = 0x8017E704; //segment:ast_radio_fr type:u16 +D_fr_8017E740 = 0x8017E740; //segment:ast_radio_fr type:u16 +D_fr_8017E76C = 0x8017E76C; //segment:ast_radio_fr type:u16 +D_fr_8017E7A0 = 0x8017E7A0; //segment:ast_radio_fr type:u16 +D_fr_8017E7DC = 0x8017E7DC; //segment:ast_radio_fr type:u16 +D_fr_8017E828 = 0x8017E828; //segment:ast_radio_fr type:u16 +D_fr_8017E86C = 0x8017E86C; //segment:ast_radio_fr type:u16 +D_fr_8017E8AC = 0x8017E8AC; //segment:ast_radio_fr type:u16 +D_fr_8017E8D4 = 0x8017E8D4; //segment:ast_radio_fr type:u16 +D_fr_8017E900 = 0x8017E900; //segment:ast_radio_fr type:u16 +D_fr_8017E94C = 0x8017E94C; //segment:ast_radio_fr type:u16 +D_fr_8017E97C = 0x8017E97C; //segment:ast_radio_fr type:u16 +D_fr_8017E9A8 = 0x8017E9A8; //segment:ast_radio_fr type:u16 +D_fr_8017E9E0 = 0x8017E9E0; //segment:ast_radio_fr type:u16 +D_fr_8017EA04 = 0x8017EA04; //segment:ast_radio_fr type:u16 +D_fr_8017EA2C = 0x8017EA2C; //segment:ast_radio_fr type:u16 +D_fr_8017EA5C = 0x8017EA5C; //segment:ast_radio_fr type:u16 +D_fr_8017EAC0 = 0x8017EAC0; //segment:ast_radio_fr type:u16 +D_fr_8017EB00 = 0x8017EB00; //segment:ast_radio_fr type:u16 +D_fr_8017EB38 = 0x8017EB38; //segment:ast_radio_fr type:u16 +D_fr_8017EB90 = 0x8017EB90; //segment:ast_radio_fr type:u16 +D_fr_8017EBBC = 0x8017EBBC; //segment:ast_radio_fr type:u16 +D_fr_8017EBEC = 0x8017EBEC; //segment:ast_radio_fr type:u16 +D_fr_8017EC24 = 0x8017EC24; //segment:ast_radio_fr type:u16 +D_fr_8017EC68 = 0x8017EC68; //segment:ast_radio_fr type:u16 +D_fr_8017EC90 = 0x8017EC90; //segment:ast_radio_fr type:u16 +D_fr_8017ECB4 = 0x8017ECB4; //segment:ast_radio_fr type:u16 +D_fr_8017ECF8 = 0x8017ECF8; //segment:ast_radio_fr type:u16 +D_fr_8017ED34 = 0x8017ED34; //segment:ast_radio_fr type:u16 +D_fr_8017ED70 = 0x8017ED70; //segment:ast_radio_fr type:u16 +D_fr_8017EDA0 = 0x8017EDA0; //segment:ast_radio_fr type:u16 +D_fr_8017EDDC = 0x8017EDDC; //segment:ast_radio_fr type:u16 +D_fr_8017EE10 = 0x8017EE10; //segment:ast_radio_fr type:u16 +D_fr_8017EE60 = 0x8017EE60; //segment:ast_radio_fr type:u16 +D_fr_8017EEC0 = 0x8017EEC0; //segment:ast_radio_fr type:u16 +D_fr_8017EED8 = 0x8017EED8; //segment:ast_radio_fr type:u16 +D_fr_8017EF28 = 0x8017EF28; //segment:ast_radio_fr type:u16 +D_fr_8017EF4C = 0x8017EF4C; //segment:ast_radio_fr type:u16 +D_fr_8017EFAC = 0x8017EFAC; //segment:ast_radio_fr type:u16 +D_fr_8017EFD0 = 0x8017EFD0; //segment:ast_radio_fr type:u16 +D_fr_8017F014 = 0x8017F014; //segment:ast_radio_fr type:u16 +D_fr_8017F054 = 0x8017F054; //segment:ast_radio_fr type:u16 +D_fr_8017F0A0 = 0x8017F0A0; //segment:ast_radio_fr type:u16 +D_fr_8017F0B4 = 0x8017F0B4; //segment:ast_radio_fr type:u16 +D_fr_8017F0DC = 0x8017F0DC; //segment:ast_radio_fr type:u16 +D_fr_8017F12C = 0x8017F12C; //segment:ast_radio_fr type:u16 +D_fr_8017F16C = 0x8017F16C; //segment:ast_radio_fr type:u16 +D_fr_8017F188 = 0x8017F188; //segment:ast_radio_fr type:u16 +D_fr_8017F1B4 = 0x8017F1B4; //segment:ast_radio_fr type:u16 +D_fr_8017F208 = 0x8017F208; //segment:ast_radio_fr type:u16 +D_fr_8017F260 = 0x8017F260; //segment:ast_radio_fr type:u16 +D_fr_8017F290 = 0x8017F290; //segment:ast_radio_fr type:u16 +D_fr_8017F2F8 = 0x8017F2F8; //segment:ast_radio_fr type:u16 +D_fr_8017F348 = 0x8017F348; //segment:ast_radio_fr type:u16 +D_fr_8017F394 = 0x8017F394; //segment:ast_radio_fr type:u16 +D_fr_8017F3E0 = 0x8017F3E0; //segment:ast_radio_fr type:u16 +D_fr_8017F3F8 = 0x8017F3F8; //segment:ast_radio_fr type:u16 +D_fr_8017F414 = 0x8017F414; //segment:ast_radio_fr type:u16 +D_fr_8017F478 = 0x8017F478; //segment:ast_radio_fr type:u16 +D_fr_8017F4D0 = 0x8017F4D0; //segment:ast_radio_fr type:u16 +D_fr_8017F504 = 0x8017F504; //segment:ast_radio_fr type:u16 +D_fr_8017F51C = 0x8017F51C; //segment:ast_radio_fr type:u16 +D_fr_8017F554 = 0x8017F554; //segment:ast_radio_fr type:u16 +D_fr_8017F588 = 0x8017F588; //segment:ast_radio_fr type:u16 +D_fr_8017F5C0 = 0x8017F5C0; //segment:ast_radio_fr type:u16 +D_fr_8017F604 = 0x8017F604; //segment:ast_radio_fr type:u16 +D_fr_8017F654 = 0x8017F654; //segment:ast_radio_fr type:u16 +D_fr_8017F6C8 = 0x8017F6C8; //segment:ast_radio_fr type:u16 +D_fr_8017F700 = 0x8017F700; //segment:ast_radio_fr type:u16 +D_fr_8017F74C = 0x8017F74C; //segment:ast_radio_fr type:u16 +D_fr_8017F7A0 = 0x8017F7A0; //segment:ast_radio_fr type:u16 +D_fr_8017F7E4 = 0x8017F7E4; //segment:ast_radio_fr type:u16 +D_fr_8017F81C = 0x8017F81C; //segment:ast_radio_fr type:u16 +D_fr_8017F878 = 0x8017F878; //segment:ast_radio_fr type:u16 +D_fr_8017F898 = 0x8017F898; //segment:ast_radio_fr type:u16 +D_fr_8017F8C8 = 0x8017F8C8; //segment:ast_radio_fr type:u16 +D_fr_8017F900 = 0x8017F900; //segment:ast_radio_fr type:u16 +D_fr_8017F960 = 0x8017F960; //segment:ast_radio_fr type:u16 +D_fr_8017F9B0 = 0x8017F9B0; //segment:ast_radio_fr type:u16 +D_fr_8017FA10 = 0x8017FA10; //segment:ast_radio_fr type:u16 +D_fr_8017FA7C = 0x8017FA7C; //segment:ast_radio_fr type:u16 +D_fr_8017FA9C = 0x8017FA9C; //segment:ast_radio_fr type:u16 +D_fr_8017FAF0 = 0x8017FAF0; //segment:ast_radio_fr type:u16 +D_fr_8017FB3C = 0x8017FB3C; //segment:ast_radio_fr type:u16 +D_fr_8017FB64 = 0x8017FB64; //segment:ast_radio_fr type:u16 +D_fr_8017FB84 = 0x8017FB84; //segment:ast_radio_fr type:u16 +D_fr_8017FBDC = 0x8017FBDC; //segment:ast_radio_fr type:u16 +D_fr_8017FC54 = 0x8017FC54; //segment:ast_radio_fr type:u16 +D_fr_8017FCA4 = 0x8017FCA4; //segment:ast_radio_fr type:u16 +D_fr_8017FCF0 = 0x8017FCF0; //segment:ast_radio_fr type:u16 +D_fr_8017FD3C = 0x8017FD3C; //segment:ast_radio_fr type:u16 +D_fr_8017FD74 = 0x8017FD74; //segment:ast_radio_fr type:u16 +D_fr_8017FDB4 = 0x8017FDB4; //segment:ast_radio_fr type:u16 +D_fr_8017FE00 = 0x8017FE00; //segment:ast_radio_fr type:u16 +D_fr_8017FE14 = 0x8017FE14; //segment:ast_radio_fr type:u16 +D_fr_8017FE70 = 0x8017FE70; //segment:ast_radio_fr type:u16 +D_fr_8017FEC8 = 0x8017FEC8; //segment:ast_radio_fr type:u16 +D_fr_8017FF0C = 0x8017FF0C; //segment:ast_radio_fr type:u16 +D_fr_8017FF64 = 0x8017FF64; //segment:ast_radio_fr type:u16 +D_fr_8017FFB0 = 0x8017FFB0; //segment:ast_radio_fr type:u16 +D_fr_8017FFCC = 0x8017FFCC; //segment:ast_radio_fr type:u16 +D_fr_80180008 = 0x80180008; //segment:ast_radio_fr type:u16 +D_fr_80180030 = 0x80180030; //segment:ast_radio_fr type:u16 +D_fr_80180064 = 0x80180064; //segment:ast_radio_fr type:u16 +D_fr_801800BC = 0x801800BC; //segment:ast_radio_fr type:u16 +D_fr_8018010C = 0x8018010C; //segment:ast_radio_fr type:u16 +D_fr_80180158 = 0x80180158; //segment:ast_radio_fr type:u16 +D_fr_8018018C = 0x8018018C; //segment:ast_radio_fr type:u16 +D_fr_801801CC = 0x801801CC; //segment:ast_radio_fr type:u16 +D_fr_8018021C = 0x8018021C; //segment:ast_radio_fr type:u16 +D_fr_80180270 = 0x80180270; //segment:ast_radio_fr type:u16 +D_fr_8018029C = 0x8018029C; //segment:ast_radio_fr type:u16 +D_fr_801802AC = 0x801802AC; //segment:ast_radio_fr type:u16 +D_fr_801802BC = 0x801802BC; //segment:ast_radio_fr type:u16 +D_fr_801802CC = 0x801802CC; //segment:ast_radio_fr type:u16 +D_fr_80180308 = 0x80180308; //segment:ast_radio_fr type:u16 +D_fr_8018036C = 0x8018036C; //segment:ast_radio_fr type:u16 +D_fr_801803B0 = 0x801803B0; //segment:ast_radio_fr type:u16 +D_fr_80180400 = 0x80180400; //segment:ast_radio_fr type:u16 +D_fr_8018042C = 0x8018042C; //segment:ast_radio_fr type:u16 +D_fr_80180464 = 0x80180464; //segment:ast_radio_fr type:u16 +D_fr_801804C4 = 0x801804C4; //segment:ast_radio_fr type:u16 +D_fr_8018050C = 0x8018050C; //segment:ast_radio_fr type:u16 +D_fr_8018056C = 0x8018056C; //segment:ast_radio_fr type:u16 +D_fr_801805B4 = 0x801805B4; //segment:ast_radio_fr type:u16 +D_fr_801805E0 = 0x801805E0; //segment:ast_radio_fr type:u16 +D_fr_8018062C = 0x8018062C; //segment:ast_radio_fr type:u16 +D_fr_80180664 = 0x80180664; //segment:ast_radio_fr type:u16 +D_fr_801806B8 = 0x801806B8; //segment:ast_radio_fr type:u16 +D_fr_80180704 = 0x80180704; //segment:ast_radio_fr type:u16 +D_fr_80180748 = 0x80180748; //segment:ast_radio_fr type:u16 +D_fr_80180780 = 0x80180780; //segment:ast_radio_fr type:u16 +D_fr_801807B4 = 0x801807B4; //segment:ast_radio_fr type:u16 +D_fr_80180800 = 0x80180800; //segment:ast_radio_fr type:u16 +D_fr_80180830 = 0x80180830; //segment:ast_radio_fr type:u16 +D_fr_80180880 = 0x80180880; //segment:ast_radio_fr type:u16 +D_fr_801808B8 = 0x801808B8; //segment:ast_radio_fr type:u16 +D_fr_80180910 = 0x80180910; //segment:ast_radio_fr type:u16 +D_fr_8018095C = 0x8018095C; //segment:ast_radio_fr type:u16 +D_fr_801809B0 = 0x801809B0; //segment:ast_radio_fr type:u16 +D_fr_801809D0 = 0x801809D0; //segment:ast_radio_fr type:u16 +D_fr_801809F4 = 0x801809F4; //segment:ast_radio_fr type:u16 +D_fr_80180A18 = 0x80180A18; //segment:ast_radio_fr type:u16 +D_fr_80180A34 = 0x80180A34; //segment:ast_radio_fr type:u16 +D_fr_80180A54 = 0x80180A54; //segment:ast_radio_fr type:u16 +D_fr_80180AC8 = 0x80180AC8; //segment:ast_radio_fr type:u16 +D_fr_80180B20 = 0x80180B20; //segment:ast_radio_fr type:u16 +D_fr_80180B7C = 0x80180B7C; //segment:ast_radio_fr type:u16 +D_fr_80180BB4 = 0x80180BB4; //segment:ast_radio_fr type:u16 +D_fr_80180C08 = 0x80180C08; //segment:ast_radio_fr type:u16 +D_fr_80180C60 = 0x80180C60; //segment:ast_radio_fr type:u16 +D_fr_80180CC0 = 0x80180CC0; //segment:ast_radio_fr type:u16 +D_fr_80180D14 = 0x80180D14; //segment:ast_radio_fr type:u16 +D_fr_80180D70 = 0x80180D70; //segment:ast_radio_fr type:u16 +D_fr_80180DB4 = 0x80180DB4; //segment:ast_radio_fr type:u16 +D_fr_80180E18 = 0x80180E18; //segment:ast_radio_fr type:u16 +D_fr_80180E54 = 0x80180E54; //segment:ast_radio_fr type:u16 +D_fr_80180EA0 = 0x80180EA0; //segment:ast_radio_fr type:u16 +D_fr_80180EF4 = 0x80180EF4; //segment:ast_radio_fr type:u16 +D_fr_80180F4C = 0x80180F4C; //segment:ast_radio_fr type:u16 +D_fr_80180FA8 = 0x80180FA8; //segment:ast_radio_fr type:u16 +D_fr_80180FF0 = 0x80180FF0; //segment:ast_radio_fr type:u16 +D_fr_80181038 = 0x80181038; //segment:ast_radio_fr type:u16 +D_fr_80181064 = 0x80181064; //segment:ast_radio_fr type:u16 +D_fr_801810A0 = 0x801810A0; //segment:ast_radio_fr type:u16 +D_fr_801810C4 = 0x801810C4; //segment:ast_radio_fr type:u16 +D_fr_80181104 = 0x80181104; //segment:ast_radio_fr type:u16 +D_fr_80181128 = 0x80181128; //segment:ast_radio_fr type:u16 +D_fr_80181150 = 0x80181150; //segment:ast_radio_fr type:u16 +D_fr_8018119C = 0x8018119C; //segment:ast_radio_fr type:u16 +D_fr_801811F4 = 0x801811F4; //segment:ast_radio_fr type:u16 +D_fr_80181238 = 0x80181238; //segment:ast_radio_fr type:u16 +D_fr_80181280 = 0x80181280; //segment:ast_radio_fr type:u16 +D_fr_801812C0 = 0x801812C0; //segment:ast_radio_fr type:u16 +D_fr_80181300 = 0x80181300; //segment:ast_radio_fr type:u16 +D_fr_80181348 = 0x80181348; //segment:ast_radio_fr type:u16 +D_fr_8018138C = 0x8018138C; //segment:ast_radio_fr type:u16 +D_fr_801813C4 = 0x801813C4; //segment:ast_radio_fr type:u16 +D_fr_801813F0 = 0x801813F0; //segment:ast_radio_fr type:u16 +D_fr_80181438 = 0x80181438; //segment:ast_radio_fr type:u16 +D_fr_80181470 = 0x80181470; //segment:ast_radio_fr type:u16 +D_fr_80181498 = 0x80181498; //segment:ast_radio_fr type:u16 +D_fr_801814D8 = 0x801814D8; //segment:ast_radio_fr type:u16 +D_fr_80181504 = 0x80181504; //segment:ast_radio_fr type:u16 +D_fr_80181548 = 0x80181548; //segment:ast_radio_fr type:u16 +D_fr_8018158C = 0x8018158C; //segment:ast_radio_fr type:u16 +D_fr_801815C8 = 0x801815C8; //segment:ast_radio_fr type:u16 +D_fr_80181608 = 0x80181608; //segment:ast_radio_fr type:u16 +D_fr_80181640 = 0x80181640; //segment:ast_radio_fr type:u16 +D_fr_80181678 = 0x80181678; //segment:ast_radio_fr type:u16 +D_fr_801816B0 = 0x801816B0; //segment:ast_radio_fr type:u16 +D_fr_801816F8 = 0x801816F8; //segment:ast_radio_fr type:u16 +D_fr_80181728 = 0x80181728; //segment:ast_radio_fr type:u16 +D_fr_80181740 = 0x80181740; //segment:ast_radio_fr type:u16 +D_fr_80181770 = 0x80181770; //segment:ast_radio_fr type:u16 +D_fr_801817C4 = 0x801817C4; //segment:ast_radio_fr type:u16 +D_fr_80181824 = 0x80181824; //segment:ast_radio_fr type:u16 +D_fr_80181848 = 0x80181848; //segment:ast_radio_fr type:u16 +D_fr_80181888 = 0x80181888; //segment:ast_radio_fr type:u16 +D_fr_8018189C = 0x8018189C; //segment:ast_radio_fr type:u16 +D_fr_801818FC = 0x801818FC; //segment:ast_radio_fr type:u16 +D_fr_80181930 = 0x80181930; //segment:ast_radio_fr type:u16 +D_fr_8018196C = 0x8018196C; //segment:ast_radio_fr type:u16 +D_fr_801819A8 = 0x801819A8; //segment:ast_radio_fr type:u16 +D_fr_801819F0 = 0x801819F0; //segment:ast_radio_fr type:u16 +D_fr_80181A44 = 0x80181A44; //segment:ast_radio_fr type:u16 +D_fr_80181A94 = 0x80181A94; //segment:ast_radio_fr type:u16 +D_fr_80181AD4 = 0x80181AD4; //segment:ast_radio_fr type:u16 +D_fr_80181B24 = 0x80181B24; //segment:ast_radio_fr type:u16 +D_fr_80181B7C = 0x80181B7C; //segment:ast_radio_fr type:u16 +D_fr_80181BD0 = 0x80181BD0; //segment:ast_radio_fr type:u16 +D_fr_80181C18 = 0x80181C18; //segment:ast_radio_fr type:u16 +D_fr_80181C40 = 0x80181C40; //segment:ast_radio_fr type:u16 +D_fr_80181C84 = 0x80181C84; //segment:ast_radio_fr type:u16 +D_fr_80181CCC = 0x80181CCC; //segment:ast_radio_fr type:u16 +D_fr_80181D0C = 0x80181D0C; //segment:ast_radio_fr type:u16 +D_fr_80181D44 = 0x80181D44; //segment:ast_radio_fr type:u16 +D_fr_80181D88 = 0x80181D88; //segment:ast_radio_fr type:u16 +D_fr_80181DF0 = 0x80181DF0; //segment:ast_radio_fr type:u16 +D_fr_80181E4C = 0x80181E4C; //segment:ast_radio_fr type:u16 +D_fr_80181E9C = 0x80181E9C; //segment:ast_radio_fr type:u16 +D_fr_80181ED8 = 0x80181ED8; //segment:ast_radio_fr type:u16 +D_fr_80181F04 = 0x80181F04; //segment:ast_radio_fr type:u16 +D_fr_80181F48 = 0x80181F48; //segment:ast_radio_fr type:u16 +D_fr_80181FA8 = 0x80181FA8; //segment:ast_radio_fr type:u16 +D_fr_80181FF0 = 0x80181FF0; //segment:ast_radio_fr type:u16 +D_fr_80182038 = 0x80182038; //segment:ast_radio_fr type:u16 +D_fr_80182094 = 0x80182094; //segment:ast_radio_fr type:u16 +D_fr_801820C4 = 0x801820C4; //segment:ast_radio_fr type:u16 +D_fr_801820F4 = 0x801820F4; //segment:ast_radio_fr type:u16 +D_fr_80182130 = 0x80182130; //segment:ast_radio_fr type:u16 +D_fr_80182198 = 0x80182198; //segment:ast_radio_fr type:u16 +D_fr_801821E8 = 0x801821E8; //segment:ast_radio_fr type:u16 +D_fr_80182230 = 0x80182230; //segment:ast_radio_fr type:u16 +D_fr_80182260 = 0x80182260; //segment:ast_radio_fr type:u16 +D_fr_801822A8 = 0x801822A8; //segment:ast_radio_fr type:u16 +D_fr_801822F8 = 0x801822F8; //segment:ast_radio_fr type:u16 +D_fr_80182340 = 0x80182340; //segment:ast_radio_fr type:u16 +D_fr_80182378 = 0x80182378; //segment:ast_radio_fr type:u16 +D_fr_801823A8 = 0x801823A8; //segment:ast_radio_fr type:u16 +D_fr_80182414 = 0x80182414; //segment:ast_radio_fr type:u16 +D_fr_8018244C = 0x8018244C; //segment:ast_radio_fr type:u16 +D_fr_80182488 = 0x80182488; //segment:ast_radio_fr type:u16 +D_fr_801824C4 = 0x801824C4; //segment:ast_radio_fr type:u16 +D_fr_80182508 = 0x80182508; //segment:ast_radio_fr type:u16 +D_fr_80182574 = 0x80182574; //segment:ast_radio_fr type:u16 +D_fr_801825A4 = 0x801825A4; //segment:ast_radio_fr type:u16 +D_fr_801825E4 = 0x801825E4; //segment:ast_radio_fr type:u16 +D_fr_8018261C = 0x8018261C; //segment:ast_radio_fr type:u16 +D_fr_80182650 = 0x80182650; //segment:ast_radio_fr type:u16 +D_fr_80182690 = 0x80182690; //segment:ast_radio_fr type:u16 +D_fr_801826EC = 0x801826EC; //segment:ast_radio_fr type:u16 +D_fr_80182718 = 0x80182718; //segment:ast_radio_fr type:u16 +D_fr_80182758 = 0x80182758; //segment:ast_radio_fr type:u16 +D_fr_801827B0 = 0x801827B0; //segment:ast_radio_fr type:u16 +D_fr_801827D8 = 0x801827D8; //segment:ast_radio_fr type:u16 +D_fr_801827FC = 0x801827FC; //segment:ast_radio_fr type:u16 +D_fr_80182830 = 0x80182830; //segment:ast_radio_fr type:u16 +D_fr_80182890 = 0x80182890; //segment:ast_radio_fr type:u16 +D_fr_801828E0 = 0x801828E0; //segment:ast_radio_fr type:u16 +D_fr_8018293C = 0x8018293C; //segment:ast_radio_fr type:u16 +D_fr_80182968 = 0x80182968; //segment:ast_radio_fr type:u16 +D_fr_801829AC = 0x801829AC; //segment:ast_radio_fr type:u16 +D_fr_801829E8 = 0x801829E8; //segment:ast_radio_fr type:u16 +D_fr_80182A34 = 0x80182A34; //segment:ast_radio_fr type:u16 +D_fr_80182A84 = 0x80182A84; //segment:ast_radio_fr type:u16 +D_fr_80182ABC = 0x80182ABC; //segment:ast_radio_fr type:u16 +D_fr_80182ADC = 0x80182ADC; //segment:ast_radio_fr type:u16 +D_fr_80182B20 = 0x80182B20; //segment:ast_radio_fr type:u16 +D_fr_80182B50 = 0x80182B50; //segment:ast_radio_fr type:u16 +D_fr_80182BA0 = 0x80182BA0; //segment:ast_radio_fr type:u16 +D_fr_80182BC4 = 0x80182BC4; //segment:ast_radio_fr type:u16 +D_fr_80182BEC = 0x80182BEC; //segment:ast_radio_fr type:u16 +D_fr_80182C20 = 0x80182C20; //segment:ast_radio_fr type:u16 +D_fr_80182C80 = 0x80182C80; //segment:ast_radio_fr type:u16 +D_fr_80182CA0 = 0x80182CA0; //segment:ast_radio_fr type:u16 +D_fr_80182CD0 = 0x80182CD0; //segment:ast_radio_fr type:u16 +D_fr_80182CF8 = 0x80182CF8; //segment:ast_radio_fr type:u16 +D_fr_80182D44 = 0x80182D44; //segment:ast_radio_fr type:u16 +D_fr_80182D8C = 0x80182D8C; //segment:ast_radio_fr type:u16 +D_fr_80182DBC = 0x80182DBC; //segment:ast_radio_fr type:u16 +D_fr_80182E18 = 0x80182E18; //segment:ast_radio_fr type:u16 +D_fr_80182E54 = 0x80182E54; //segment:ast_radio_fr type:u16 +D_fr_80182E7C = 0x80182E7C; //segment:ast_radio_fr type:u16 +D_fr_80182EC4 = 0x80182EC4; //segment:ast_radio_fr type:u16 +D_fr_80182EFC = 0x80182EFC; //segment:ast_radio_fr type:u16 +D_fr_80182F34 = 0x80182F34; //segment:ast_radio_fr type:u16 +D_fr_80182F6C = 0x80182F6C; //segment:ast_radio_fr type:u16 +D_fr_80182FA4 = 0x80182FA4; //segment:ast_radio_fr type:u16 +D_fr_80182FD8 = 0x80182FD8; //segment:ast_radio_fr type:u16 +D_fr_8018301C = 0x8018301C; //segment:ast_radio_fr type:u16 +D_fr_80183038 = 0x80183038; //segment:ast_radio_fr type:u16 +D_fr_80183080 = 0x80183080; //segment:ast_radio_fr type:u16 +D_fr_801830C8 = 0x801830C8; //segment:ast_radio_fr type:u16 +D_fr_80183110 = 0x80183110; //segment:ast_radio_fr type:u16 +D_fr_80183150 = 0x80183150; //segment:ast_radio_fr type:u16 +D_fr_80183194 = 0x80183194; //segment:ast_radio_fr type:u16 +D_fr_801831E0 = 0x801831E0; //segment:ast_radio_fr type:u16 +D_fr_80183240 = 0x80183240; //segment:ast_radio_fr type:u16 +D_fr_80183278 = 0x80183278; //segment:ast_radio_fr type:u16 +D_fr_801832BC = 0x801832BC; //segment:ast_radio_fr type:u16 +D_fr_80183308 = 0x80183308; //segment:ast_radio_fr type:u16 +D_fr_80183340 = 0x80183340; //segment:ast_radio_fr type:u16 +D_fr_8018338C = 0x8018338C; //segment:ast_radio_fr type:u16 +D_fr_801833C4 = 0x801833C4; //segment:ast_radio_fr type:u16 +D_fr_801833F4 = 0x801833F4; //segment:ast_radio_fr type:u16 +D_fr_80183420 = 0x80183420; //segment:ast_radio_fr type:u16 +D_fr_80183448 = 0x80183448; //segment:ast_radio_fr type:u16 +D_fr_801834A0 = 0x801834A0; //segment:ast_radio_fr type:u16 +D_fr_801834CC = 0x801834CC; //segment:ast_radio_fr type:u16 +D_fr_80183514 = 0x80183514; //segment:ast_radio_fr type:u16 +D_fr_80183560 = 0x80183560; //segment:ast_radio_fr type:u16 +D_fr_801835C8 = 0x801835C8; //segment:ast_radio_fr type:u16 +D_fr_801835E8 = 0x801835E8; //segment:ast_radio_fr type:u16 +D_fr_80183610 = 0x80183610; //segment:ast_radio_fr type:u16 +D_fr_80183634 = 0x80183634; //segment:ast_radio_fr type:u16 +D_fr_8018366C = 0x8018366C; //segment:ast_radio_fr type:u16 +D_fr_801836C8 = 0x801836C8; //segment:ast_radio_fr type:u16 +D_fr_80183728 = 0x80183728; //segment:ast_radio_fr type:u16 +D_fr_80183760 = 0x80183760; //segment:ast_radio_fr type:u16 +D_fr_801837C8 = 0x801837C8; //segment:ast_radio_fr type:u16 +D_fr_80183810 = 0x80183810; //segment:ast_radio_fr type:u16 +D_fr_80183848 = 0x80183848; //segment:ast_radio_fr type:u16 +D_fr_801838B8 = 0x801838B8; //segment:ast_radio_fr type:u16 +D_fr_80183914 = 0x80183914; //segment:ast_radio_fr type:u16 +D_fr_80183948 = 0x80183948; //segment:ast_radio_fr type:u16 +D_fr_801839B0 = 0x801839B0; //segment:ast_radio_fr type:u16 +D_fr_801839FC = 0x801839FC; //segment:ast_radio_fr type:u16 +D_fr_80183A20 = 0x80183A20; //segment:ast_radio_fr type:u16 +D_fr_80183A70 = 0x80183A70; //segment:ast_radio_fr type:u16 +D_fr_80183ACC = 0x80183ACC; //segment:ast_radio_fr type:u16 +D_fr_80183B14 = 0x80183B14; //segment:ast_radio_fr type:u16 +D_fr_80183B5C = 0x80183B5C; //segment:ast_radio_fr type:u16 +D_fr_80183BB8 = 0x80183BB8; //segment:ast_radio_fr type:u16 +D_fr_80183BEC = 0x80183BEC; //segment:ast_radio_fr type:u16 +D_fr_80183C24 = 0x80183C24; //segment:ast_radio_fr type:u16 +D_fr_80183C70 = 0x80183C70; //segment:ast_radio_fr type:u16 +D_fr_80183CB8 = 0x80183CB8; //segment:ast_radio_fr type:u16 +D_fr_80183CD4 = 0x80183CD4; //segment:ast_radio_fr type:u16 +D_fr_80183D20 = 0x80183D20; //segment:ast_radio_fr type:u16 +D_fr_80183D68 = 0x80183D68; //segment:ast_radio_fr type:u16 +D_fr_80183DC0 = 0x80183DC0; //segment:ast_radio_fr type:u16 +D_fr_80183DE4 = 0x80183DE4; //segment:ast_radio_fr type:u16 +D_fr_80183DFC = 0x80183DFC; //segment:ast_radio_fr type:u16 +D_fr_80183E20 = 0x80183E20; //segment:ast_radio_fr type:u16 +D_fr_80183E70 = 0x80183E70; //segment:ast_radio_fr type:u16 +D_fr_80183E84 = 0x80183E84; //segment:ast_radio_fr type:u16 +D_fr_80183EA8 = 0x80183EA8; //segment:ast_radio_fr type:u16 +D_fr_80183EF0 = 0x80183EF0; //segment:ast_radio_fr type:u16 +D_fr_80183F0C = 0x80183F0C; //segment:ast_radio_fr type:u16 +D_fr_80183F6C = 0x80183F6C; //segment:ast_radio_fr type:u16 +D_fr_80183FD0 = 0x80183FD0; //segment:ast_radio_fr type:u16 +D_fr_80183FFC = 0x80183FFC; //segment:ast_radio_fr type:u16 +D_fr_80184044 = 0x80184044; //segment:ast_radio_fr type:u16 +D_fr_8018407C = 0x8018407C; //segment:ast_radio_fr type:u16 +D_fr_801840E0 = 0x801840E0; //segment:ast_radio_fr type:u16 +D_fr_8018413C = 0x8018413C; //segment:ast_radio_fr type:u16 +D_fr_801841B4 = 0x801841B4; //segment:ast_radio_fr type:u16 +D_fr_801841E8 = 0x801841E8; //segment:ast_radio_fr type:u16 +D_fr_80184220 = 0x80184220; //segment:ast_radio_fr type:u16 +D_fr_80184264 = 0x80184264; //segment:ast_radio_fr type:u16 +D_fr_801842C0 = 0x801842C0; //segment:ast_radio_fr type:u16 +D_fr_801842EC = 0x801842EC; //segment:ast_radio_fr type:u16 +D_fr_80184340 = 0x80184340; //segment:ast_radio_fr type:u16 +D_fr_8018437C = 0x8018437C; //segment:ast_radio_fr type:u16 +D_fr_801843BC = 0x801843BC; //segment:ast_radio_fr type:u16 +D_fr_801843D8 = 0x801843D8; //segment:ast_radio_fr type:u16 +D_fr_8018442C = 0x8018442C; //segment:ast_radio_fr type:u16 +D_fr_80184464 = 0x80184464; //segment:ast_radio_fr type:u16 +D_fr_801844B0 = 0x801844B0; //segment:ast_radio_fr type:u16 +D_fr_80184510 = 0x80184510; //segment:ast_radio_fr type:u16 +D_fr_8018455C = 0x8018455C; //segment:ast_radio_fr type:u16 +D_fr_801845C4 = 0x801845C4; //segment:ast_radio_fr type:u16 +D_fr_801845FC = 0x801845FC; //segment:ast_radio_fr type:u16 +D_fr_8018463C = 0x8018463C; //segment:ast_radio_fr type:u16 +D_fr_8018468C = 0x8018468C; //segment:ast_radio_fr type:u16 +D_fr_801846AC = 0x801846AC; //segment:ast_radio_fr type:u16 +D_fr_801846EC = 0x801846EC; //segment:ast_radio_fr type:u16 +D_fr_80184724 = 0x80184724; //segment:ast_radio_fr type:u16 +D_fr_80184748 = 0x80184748; //segment:ast_radio_fr type:u16 +D_fr_801847A8 = 0x801847A8; //segment:ast_radio_fr type:u16 +D_fr_801847D0 = 0x801847D0; //segment:ast_radio_fr type:u16 +D_fr_8018481C = 0x8018481C; //segment:ast_radio_fr type:u16 +D_fr_8018485C = 0x8018485C; //segment:ast_radio_fr type:u16 +D_fr_801848B8 = 0x801848B8; //segment:ast_radio_fr type:u16 +D_fr_80184924 = 0x80184924; //segment:ast_radio_fr type:u16 +D_fr_80184960 = 0x80184960; //segment:ast_radio_fr type:u16 +D_fr_80184980 = 0x80184980; //segment:ast_radio_fr type:u16 +D_fr_801849E4 = 0x801849E4; //segment:ast_radio_fr type:u16 +D_fr_80184A58 = 0x80184A58; //segment:ast_radio_fr type:u16 +D_fr_80184ACC = 0x80184ACC; //segment:ast_radio_fr type:u16 +D_fr_80184B24 = 0x80184B24; //segment:ast_radio_fr type:u16 +D_fr_80184B70 = 0x80184B70; //segment:ast_radio_fr type:u16 +D_fr_80184BB8 = 0x80184BB8; //segment:ast_radio_fr type:u16 +D_fr_80184C08 = 0x80184C08; //segment:ast_radio_fr type:u16 +D_fr_80184C5C = 0x80184C5C; //segment:ast_radio_fr type:u16 +D_fr_80184CA8 = 0x80184CA8; //segment:ast_radio_fr type:u16 +D_fr_80184CCC = 0x80184CCC; //segment:ast_radio_fr type:u16 +D_fr_80184CE0 = 0x80184CE0; //segment:ast_radio_fr type:u16 +D_fr_80184D00 = 0x80184D00; //segment:ast_radio_fr type:u16 +D_fr_80184D5C = 0x80184D5C; //segment:ast_radio_fr type:u16 +D_fr_80184D9C = 0x80184D9C; //segment:ast_radio_fr type:u16 +D_fr_80184DC8 = 0x80184DC8; //segment:ast_radio_fr type:u16 +D_fr_80184DEC = 0x80184DEC; //segment:ast_radio_fr type:u16 +D_fr_80184E14 = 0x80184E14; //segment:ast_radio_fr type:u16 +D_fr_80184E3C = 0x80184E3C; //segment:ast_radio_fr type:u16 +D_fr_80184E6C = 0x80184E6C; //segment:ast_radio_fr type:u16 +D_fr_80184EC0 = 0x80184EC0; //segment:ast_radio_fr type:u16 +D_fr_80184EFC = 0x80184EFC; //segment:ast_radio_fr type:u16 +D_fr_80184F30 = 0x80184F30; //segment:ast_radio_fr type:u16 +D_fr_80184F90 = 0x80184F90; //segment:ast_radio_fr type:u16 +D_fr_80184FDC = 0x80184FDC; //segment:ast_radio_fr type:u16 +D_fr_80185038 = 0x80185038; //segment:ast_radio_fr type:u16 +D_fr_801850A0 = 0x801850A0; //segment:ast_radio_fr type:u16 +D_fr_801850E4 = 0x801850E4; //segment:ast_radio_fr type:u16 +D_fr_80185114 = 0x80185114; //segment:ast_radio_fr type:u16 +D_fr_8018513C = 0x8018513C; //segment:ast_radio_fr type:u16 +D_fr_80185168 = 0x80185168; //segment:ast_radio_fr type:u16 +D_fr_80185180 = 0x80185180; //segment:ast_radio_fr type:u16 +D_fr_801851DC = 0x801851DC; //segment:ast_radio_fr type:u16 +D_fr_8018520C = 0x8018520C; //segment:ast_radio_fr type:u16 +D_fr_80185244 = 0x80185244; //segment:ast_radio_fr type:u16 +D_fr_80185260 = 0x80185260; //segment:ast_radio_fr type:u16 +D_fr_801852BC = 0x801852BC; //segment:ast_radio_fr type:u16 +D_fr_801852F4 = 0x801852F4; //segment:ast_radio_fr type:u16 +D_fr_80185334 = 0x80185334; //segment:ast_radio_fr type:u16 +D_fr_80185364 = 0x80185364; //segment:ast_radio_fr type:u16 +D_fr_80185384 = 0x80185384; //segment:ast_radio_fr type:u16 +D_fr_801853A4 = 0x801853A4; //segment:ast_radio_fr type:u16 +D_fr_801853D8 = 0x801853D8; //segment:ast_radio_fr type:u16 +D_fr_80185414 = 0x80185414; //segment:ast_radio_fr type:u16 +D_fr_80185440 = 0x80185440; //segment:ast_radio_fr type:u16 +D_fr_80185488 = 0x80185488; //segment:ast_radio_fr type:u16 +D_fr_801854BC = 0x801854BC; //segment:ast_radio_fr type:u16 +D_fr_801854F8 = 0x801854F8; //segment:ast_radio_fr type:u16 +D_fr_80185534 = 0x80185534; //segment:ast_radio_fr type:u16 +D_fr_80185554 = 0x80185554; //segment:ast_radio_fr type:u16 +D_fr_80185584 = 0x80185584; //segment:ast_radio_fr type:u16 +D_fr_801855B4 = 0x801855B4; //segment:ast_radio_fr type:u16 +D_fr_801855E4 = 0x801855E4; //segment:ast_radio_fr type:u16 +D_fr_80185628 = 0x80185628; //segment:ast_radio_fr type:u16 +D_fr_8018564C = 0x8018564C; //segment:ast_radio_fr type:u16 +D_fr_8018568C = 0x8018568C; //segment:ast_radio_fr type:u16 +D_fr_801856E8 = 0x801856E8; //segment:ast_radio_fr type:u16 +D_fr_80185754 = 0x80185754; //segment:ast_radio_fr type:u16 +D_fr_80185768 = 0x80185768; //segment:ast_radio_fr type:u16 +D_fr_8018577C = 0x8018577C; //segment:ast_radio_fr type:u16 +D_fr_80185790 = 0x80185790; //segment:ast_radio_fr type:u16 +D_fr_801857B4 = 0x801857B4; //segment:ast_radio_fr type:u16 +D_fr_801857F0 = 0x801857F0; //segment:ast_radio_fr type:u16 +D_fr_80185838 = 0x80185838; //segment:ast_radio_fr type:u16 +D_fr_80185864 = 0x80185864; //segment:ast_radio_fr type:u16 +D_fr_801858AC = 0x801858AC; //segment:ast_radio_fr type:u16 +D_fr_801858E8 = 0x801858E8; //segment:ast_radio_fr type:u16 +D_fr_801858FC = 0x801858FC; //segment:ast_radio_fr type:u16 +D_fr_80185940 = 0x80185940; //segment:ast_radio_fr type:u16 +D_fr_801859A8 = 0x801859A8; //segment:ast_radio_fr type:u16 +D_fr_80185A1C = 0x80185A1C; //segment:ast_radio_fr type:u16 +D_fr_80185A6C = 0x80185A6C; //segment:ast_radio_fr type:u16 +D_fr_80185ABC = 0x80185ABC; //segment:ast_radio_fr type:u16 +D_fr_80185AFC = 0x80185AFC; //segment:ast_radio_fr type:u16 +D_fr_80185B40 = 0x80185B40; //segment:ast_radio_fr type:u16 +D_fr_80185B84 = 0x80185B84; //segment:ast_radio_fr type:u16 +D_fr_80185BC8 = 0x80185BC8; //segment:ast_radio_fr type:u16 +D_fr_80185C04 = 0x80185C04; //segment:ast_radio_fr type:u16 +D_fr_80185C2C = 0x80185C2C; //segment:ast_radio_fr type:u16 +D_fr_80185C60 = 0x80185C60; //segment:ast_radio_fr type:u16 +D_fr_80185CB0 = 0x80185CB0; //segment:ast_radio_fr type:u16 +D_fr_80185CCC = 0x80185CCC; //segment:ast_radio_fr type:u16 +D_fr_80185CE0 = 0x80185CE0; //segment:ast_radio_fr type:u16 +D_fr_80185CF4 = 0x80185CF4; //segment:ast_radio_fr type:u16 +D_fr_80185D08 = 0x80185D08; //segment:ast_radio_fr type:u16 +D_fr_80185D40 = 0x80185D40; //segment:ast_radio_fr type:u16 +D_fr_80185D80 = 0x80185D80; //segment:ast_radio_fr type:u16 +D_fr_80185DB8 = 0x80185DB8; //segment:ast_radio_fr type:u16 +D_fr_80185DD8 = 0x80185DD8; //segment:ast_radio_fr type:u16 +D_fr_80185DF4 = 0x80185DF4; //segment:ast_radio_fr type:u16 +D_fr_80185E24 = 0x80185E24; //segment:ast_radio_fr type:u16 +D_fr_80185E68 = 0x80185E68; //segment:ast_radio_fr type:u16 +D_fr_80185EA8 = 0x80185EA8; //segment:ast_radio_fr type:u16 +D_fr_80185EDC = 0x80185EDC; //segment:ast_radio_fr type:u16 +D_fr_80185F38 = 0x80185F38; //segment:ast_radio_fr type:u16 +D_fr_80185F94 = 0x80185F94; //segment:ast_radio_fr type:u16 +D_fr_80185FC0 = 0x80185FC0; //segment:ast_radio_fr type:u16 +D_fr_80186008 = 0x80186008; //segment:ast_radio_fr type:u16 +D_fr_8018604C = 0x8018604C; //segment:ast_radio_fr type:u16 +D_fr_80186084 = 0x80186084; //segment:ast_radio_fr type:u16 +D_fr_801860CC = 0x801860CC; //segment:ast_radio_fr type:u16 +D_fr_80186110 = 0x80186110; //segment:ast_radio_fr type:u16 +D_fr_8018615C = 0x8018615C; //segment:ast_radio_fr type:u16 +D_fr_801861CC = 0x801861CC; //segment:ast_radio_fr type:u16 +D_fr_80186210 = 0x80186210; //segment:ast_radio_fr type:u16 +D_fr_80186274 = 0x80186274; //segment:ast_radio_fr type:u16 +D_fr_801862B8 = 0x801862B8; //segment:ast_radio_fr type:u16 +D_fr_80186304 = 0x80186304; //segment:ast_radio_fr type:u16 +D_fr_80186370 = 0x80186370; //segment:ast_radio_fr type:u16 +D_fr_801863B0 = 0x801863B0; //segment:ast_radio_fr type:u16 +D_fr_80186410 = 0x80186410; //segment:ast_radio_fr type:u16 +D_fr_80186428 = 0x80186428; //segment:ast_radio_fr type:u16 +D_fr_8018646C = 0x8018646C; //segment:ast_radio_fr type:u16 +D_fr_8018648C = 0x8018648C; //segment:ast_radio_fr type:u16 +D_fr_801864C4 = 0x801864C4; //segment:ast_radio_fr type:u16 +D_fr_801864F0 = 0x801864F0; //segment:ast_radio_fr type:u16 +D_fr_80186538 = 0x80186538; //segment:ast_radio_fr type:u16 +D_fr_80186570 = 0x80186570; //segment:ast_radio_fr type:u16 +D_fr_80186590 = 0x80186590; //segment:ast_radio_fr type:u16 +D_fr_801865E8 = 0x801865E8; //segment:ast_radio_fr type:u16 +D_fr_80186648 = 0x80186648; //segment:ast_radio_fr type:u16 +D_fr_80186670 = 0x80186670; //segment:ast_radio_fr type:u16 +D_fr_8018668C = 0x8018668C; //segment:ast_radio_fr type:u16 +D_fr_801866AC = 0x801866AC; //segment:ast_radio_fr type:u16 +D_fr_801866DC = 0x801866DC; //segment:ast_radio_fr type:u16 +D_fr_80186710 = 0x80186710; //segment:ast_radio_fr type:u16 +D_fr_80186724 = 0x80186724; //segment:ast_radio_fr type:u16 +D_fr_80186738 = 0x80186738; //segment:ast_radio_fr type:u16 +D_fr_8018674C = 0x8018674C; //segment:ast_radio_fr type:u16 +D_fr_80186798 = 0x80186798; //segment:ast_radio_fr type:u16 +D_fr_80186800 = 0x80186800; //segment:ast_radio_fr type:u16 +D_fr_80186824 = 0x80186824; //segment:ast_radio_fr type:u16 +D_fr_80186848 = 0x80186848; //segment:ast_radio_fr type:u16 +D_fr_8018686C = 0x8018686C; //segment:ast_radio_fr type:u16 +D_fr_80186884 = 0x80186884; //segment:ast_radio_fr type:u16 +D_fr_8018689C = 0x8018689C; //segment:ast_radio_fr type:u16 +D_fr_801868B4 = 0x801868B4; //segment:ast_radio_fr type:u16 +D_fr_801868CC = 0x801868CC; //segment:ast_radio_fr type:u16 +D_fr_8018691C = 0x8018691C; //segment:ast_radio_fr type:u16 +D_fr_80186944 = 0x80186944; //segment:ast_radio_fr type:u16 +D_fr_80186954 = 0x80186954; //segment:ast_radio_fr type:u16 +D_fr_801869B0 = 0x801869B0; //segment:ast_radio_fr type:u16 +D_fr_801869F8 = 0x801869F8; //segment:ast_radio_fr type:u16 +D_fr_80186A4C = 0x80186A4C; //segment:ast_radio_fr type:u16 +D_fr_80186AA0 = 0x80186AA0; //segment:ast_radio_fr type:u16 +D_fr_80186AF4 = 0x80186AF4; //segment:ast_radio_fr type:u16 +D_fr_80186B40 = 0x80186B40; //segment:ast_radio_fr type:u16 +D_fr_80186B8C = 0x80186B8C; //segment:ast_radio_fr type:u16 +D_fr_80186BD8 = 0x80186BD8; //segment:ast_radio_fr type:u16 +D_fr_80186C30 = 0x80186C30; //segment:ast_radio_fr type:u16 +D_fr_80186C68 = 0x80186C68; //segment:ast_radio_fr type:u16 +D_fr_80186CA0 = 0x80186CA0; //segment:ast_radio_fr type:u16 +D_fr_80186CDC = 0x80186CDC; //segment:ast_radio_fr type:u16 +D_fr_80186D4C = 0x80186D4C; //segment:ast_radio_fr type:u16 +D_fr_80186DD0 = 0x80186DD0; //segment:ast_radio_fr type:u16 +D_fr_80186E4C = 0x80186E4C; //segment:ast_radio_fr type:u16 +D_fr_80186E90 = 0x80186E90; //segment:ast_radio_fr type:u16 +D_fr_80186ED4 = 0x80186ED4; //segment:ast_radio_fr type:u16 +D_fr_80186EFC = 0x80186EFC; //segment:ast_radio_fr type:u16 +D_fr_80186F24 = 0x80186F24; //segment:ast_radio_fr type:u16 +D_fr_80186F4C = 0x80186F4C; //segment:ast_radio_fr type:u16 +D_fr_80186F70 = 0x80186F70; //segment:ast_radio_fr type:u16 +D_fr_80186F98 = 0x80186F98; //segment:ast_radio_fr type:u16 +D_fr_80186FC0 = 0x80186FC0; //segment:ast_radio_fr type:u16 +D_fr_80186FE8 = 0x80186FE8; //segment:ast_radio_fr type:u16 +D_fr_8018700C = 0x8018700C; //segment:ast_radio_fr type:u16 +D_fr_80187034 = 0x80187034; //segment:ast_radio_fr type:u16 +D_fr_8018705C = 0x8018705C; //segment:ast_radio_fr type:u16 +D_fr_80187084 = 0x80187084; //segment:ast_radio_fr type:u16 +D_fr_801870A8 = 0x801870A8; //segment:ast_radio_fr type:u16 +D_fr_801870BC = 0x801870BC; //segment:ast_radio_fr type:u16 +D_fr_801870D0 = 0x801870D0; //segment:ast_radio_fr type:u16 +D_fr_801870E4 = 0x801870E4; //segment:ast_radio_fr type:u16 +D_fr_801870F0 = 0x801870F0; //segment:ast_radio_fr type:u16 +D_fr_80187108 = 0x80187108; //segment:ast_radio_fr type:u16 +D_fr_80187124 = 0x80187124; //segment:ast_radio_fr type:u16 +D_fr_80187134 = 0x80187134; //segment:ast_radio_fr type:u16 +D_fr_80187148 = 0x80187148; //segment:ast_radio_fr type:u16 +D_fr_8018715C = 0x8018715C; //segment:ast_radio_fr type:u16 +D_fr_80187178 = 0x80187178; //segment:ast_radio_fr type:u16 +D_fr_80187188 = 0x80187188; //segment:ast_radio_fr type:u16 +D_fr_801871E0 = 0x801871E0; //segment:ast_radio_fr type:u16 +D_fr_801871FC = 0x801871FC; //segment:ast_radio_fr type:u16 +D_fr_80187218 = 0x80187218; //segment:ast_radio_fr type:u16 +D_fr_80187228 = 0x80187228; //segment:ast_radio_fr type:u16 +D_fr_8018724C = 0x8018724C; //segment:ast_radio_fr type:u16 +D_fr_8018725C = 0x8018725C; //segment:ast_radio_fr type:u16 +D_fr_80187274 = 0x80187274; //segment:ast_radio_fr type:u16 +D_fr_801872A0 = 0x801872A0; //segment:ast_radio_fr type:u16 +D_fr_801872C4 = 0x801872C4; //segment:ast_radio_fr type:u16 +D_fr_801872E8 = 0x801872E8; //segment:ast_radio_fr type:u16 +D_fr_8018734C = 0x8018734C; //segment:ast_radio_fr type:u16 +D_fr_801873BC = 0x801873BC; //segment:ast_radio_fr type:u16 +D_fr_80187418 = 0x80187418; //segment:ast_radio_fr type:u16 +D_fr_80187488 = 0x80187488; //segment:ast_radio_fr type:u16 +D_fr_801874F4 = 0x801874F4; //segment:ast_radio_fr type:u16 +D_fr_8018753C = 0x8018753C; //segment:ast_radio_fr type:u16 +D_fr_80187590 = 0x80187590; //segment:ast_radio_fr type:u16 +D_fr_80187600 = 0x80187600; //segment:ast_radio_fr type:u16 +D_fr_80187678 = 0x80187678; //segment:ast_radio_fr type:u16 +D_fr_801876D0 = 0x801876D0; //segment:ast_radio_fr type:u16 +D_fr_80187734 = 0x80187734; //segment:ast_radio_fr type:u16 +D_fr_80187784 = 0x80187784; //segment:ast_radio_fr type:u16 +D_fr_801877D8 = 0x801877D8; //segment:ast_radio_fr type:u16 +D_fr_80187830 = 0x80187830; //segment:ast_radio_fr type:u16 +D_fr_80187894 = 0x80187894; //segment:ast_radio_fr type:u16 +D_fr_801878D8 = 0x801878D8; //segment:ast_radio_fr type:u16 +D_fr_80187918 = 0x80187918; //segment:ast_radio_fr type:u16 +D_fr_80187978 = 0x80187978; //segment:ast_radio_fr type:u16 +D_fr_801879E0 = 0x801879E0; //segment:ast_radio_fr type:u16 +D_fr_80187A34 = 0x80187A34; //segment:ast_radio_fr type:u16 +D_fr_80187A90 = 0x80187A90; //segment:ast_radio_fr type:u16 +D_fr_80187AF0 = 0x80187AF0; //segment:ast_radio_fr type:u16 +D_fr_80187B50 = 0x80187B50; //segment:ast_radio_fr type:u16 +D_fr_80187B94 = 0x80187B94; //segment:ast_radio_fr type:u16 +D_fr_80187BE8 = 0x80187BE8; //segment:ast_radio_fr type:u16 +D_fr_80187C4C = 0x80187C4C; //segment:ast_radio_fr type:u16 +D_fr_80187CBC = 0x80187CBC; //segment:ast_radio_fr type:u16 +D_fr_80187D14 = 0x80187D14; //segment:ast_radio_fr type:u16 +D_fr_80187D64 = 0x80187D64; //segment:ast_radio_fr type:u16 +D_fr_80187D9C = 0x80187D9C; //segment:ast_radio_fr type:u16 +D_fr_80187E0C = 0x80187E0C; //segment:ast_radio_fr type:u16 +D_fr_80187E74 = 0x80187E74; //segment:ast_radio_fr type:u16 +D_fr_80187ED8 = 0x80187ED8; //segment:ast_radio_fr + +D_en_8017B230 = 0x8017B230; //segment:ast_radio_en type:u16 +D_en_8017B954 = 0x8017B954; //segment:ast_radio_en type:u16 +D_en_8017B9B0 = 0x8017B9B0; //segment:ast_radio_en type:u16 +D_en_8017B9F0 = 0x8017B9F0; //segment:ast_radio_en type:u16 +D_en_8017BA2C = 0x8017BA2C; //segment:ast_radio_en type:u16 +D_en_8017BA70 = 0x8017BA70; //segment:ast_radio_en type:u16 +D_en_8017BAC0 = 0x8017BAC0; //segment:ast_radio_en type:u16 +D_en_8017BB28 = 0x8017BB28; //segment:ast_radio_en type:u16 +D_en_8017BBBC = 0x8017BBBC; //segment:ast_radio_en type:u16 +D_en_8017BC28 = 0x8017BC28; //segment:ast_radio_en type:u16 +D_en_8017BCC0 = 0x8017BCC0; //segment:ast_radio_en type:u16 +D_en_8017BCF8 = 0x8017BCF8; //segment:ast_radio_en type:u16 +D_en_8017BD58 = 0x8017BD58; //segment:ast_radio_en type:u16 +D_en_8017BD98 = 0x8017BD98; //segment:ast_radio_en type:u16 +D_en_8017BE1C = 0x8017BE1C; //segment:ast_radio_en type:u16 +D_en_8017BE44 = 0x8017BE44; //segment:ast_radio_en type:u16 +D_en_8017BE94 = 0x8017BE94; //segment:ast_radio_en type:u16 +D_en_8017BEB8 = 0x8017BEB8; //segment:ast_radio_en type:u16 +D_en_8017BF54 = 0x8017BF54; //segment:ast_radio_en type:u16 +D_en_8017BF6C = 0x8017BF6C; //segment:ast_radio_en type:u16 +D_en_8017BFF4 = 0x8017BFF4; //segment:ast_radio_en type:u16 +D_en_8017C01C = 0x8017C01C; //segment:ast_radio_en type:u16 +D_en_8017C09C = 0x8017C09C; //segment:ast_radio_en type:u16 +D_en_8017C0E4 = 0x8017C0E4; //segment:ast_radio_en type:u16 +D_en_8017C150 = 0x8017C150; //segment:ast_radio_en type:u16 +D_en_8017C180 = 0x8017C180; //segment:ast_radio_en type:u16 +D_en_8017C1F0 = 0x8017C1F0; //segment:ast_radio_en type:u16 +D_en_8017C238 = 0x8017C238; //segment:ast_radio_en type:u16 +D_en_8017C278 = 0x8017C278; //segment:ast_radio_en type:u16 +D_en_8017C2A8 = 0x8017C2A8; //segment:ast_radio_en type:u16 +D_en_8017C308 = 0x8017C308; //segment:ast_radio_en type:u16 +D_en_8017C330 = 0x8017C330; //segment:ast_radio_en type:u16 +D_en_8017C38C = 0x8017C38C; //segment:ast_radio_en type:u16 +D_en_8017C3AC = 0x8017C3AC; //segment:ast_radio_en type:u16 +D_en_8017C440 = 0x8017C440; //segment:ast_radio_en type:u16 +D_en_8017C464 = 0x8017C464; //segment:ast_radio_en type:u16 +D_en_8017C488 = 0x8017C488; //segment:ast_radio_en type:u16 +D_en_8017C4CC = 0x8017C4CC; //segment:ast_radio_en type:u16 +D_en_8017C500 = 0x8017C500; //segment:ast_radio_en type:u16 +D_en_8017C544 = 0x8017C544; //segment:ast_radio_en type:u16 +D_en_8017C574 = 0x8017C574; //segment:ast_radio_en type:u16 +D_en_8017C5CC = 0x8017C5CC; //segment:ast_radio_en type:u16 +D_en_8017C614 = 0x8017C614; //segment:ast_radio_en type:u16 +D_en_8017C640 = 0x8017C640; //segment:ast_radio_en type:u16 +D_en_8017C694 = 0x8017C694; //segment:ast_radio_en type:u16 +D_en_8017C6B8 = 0x8017C6B8; //segment:ast_radio_en type:u16 +D_en_8017C700 = 0x8017C700; //segment:ast_radio_en type:u16 +D_en_8017C714 = 0x8017C714; //segment:ast_radio_en type:u16 +D_en_8017C738 = 0x8017C738; //segment:ast_radio_en type:u16 +D_en_8017C780 = 0x8017C780; //segment:ast_radio_en type:u16 +D_en_8017C7CC = 0x8017C7CC; //segment:ast_radio_en type:u16 +D_en_8017C820 = 0x8017C820; //segment:ast_radio_en type:u16 +D_en_8017C870 = 0x8017C870; //segment:ast_radio_en type:u16 +D_en_8017C8CC = 0x8017C8CC; //segment:ast_radio_en type:u16 +D_en_8017C914 = 0x8017C914; //segment:ast_radio_en type:u16 +D_en_8017C968 = 0x8017C968; //segment:ast_radio_en type:u16 +D_en_8017C9A4 = 0x8017C9A4; //segment:ast_radio_en type:u16 +D_en_8017C9C8 = 0x8017C9C8; //segment:ast_radio_en type:u16 +D_en_8017C9FC = 0x8017C9FC; //segment:ast_radio_en type:u16 +D_en_8017CA48 = 0x8017CA48; //segment:ast_radio_en type:u16 +D_en_8017CA7C = 0x8017CA7C; //segment:ast_radio_en type:u16 +D_en_8017CA94 = 0x8017CA94; //segment:ast_radio_en type:u16 +D_en_8017CAD0 = 0x8017CAD0; //segment:ast_radio_en type:u16 +D_en_8017CB04 = 0x8017CB04; //segment:ast_radio_en type:u16 +D_en_8017CB2C = 0x8017CB2C; //segment:ast_radio_en type:u16 +D_en_8017CB7C = 0x8017CB7C; //segment:ast_radio_en type:u16 +D_en_8017CBC8 = 0x8017CBC8; //segment:ast_radio_en type:u16 +D_en_8017CC00 = 0x8017CC00; //segment:ast_radio_en type:u16 +D_en_8017CC34 = 0x8017CC34; //segment:ast_radio_en type:u16 +D_en_8017CC7C = 0x8017CC7C; //segment:ast_radio_en type:u16 +D_en_8017CCC4 = 0x8017CCC4; //segment:ast_radio_en type:u16 +D_en_8017CD08 = 0x8017CD08; //segment:ast_radio_en type:u16 +D_en_8017CD18 = 0x8017CD18; //segment:ast_radio_en type:u16 +D_en_8017CD68 = 0x8017CD68; //segment:ast_radio_en type:u16 +D_en_8017CDAC = 0x8017CDAC; //segment:ast_radio_en type:u16 +D_en_8017CDE8 = 0x8017CDE8; //segment:ast_radio_en type:u16 +D_en_8017CE24 = 0x8017CE24; //segment:ast_radio_en type:u16 +D_en_8017CE60 = 0x8017CE60; //segment:ast_radio_en type:u16 +D_en_8017CE70 = 0x8017CE70; //segment:ast_radio_en type:u16 +D_en_8017CE98 = 0x8017CE98; //segment:ast_radio_en type:u16 +D_en_8017CEBC = 0x8017CEBC; //segment:ast_radio_en type:u16 +D_en_8017CEFC = 0x8017CEFC; //segment:ast_radio_en type:u16 +D_en_8017CF5C = 0x8017CF5C; //segment:ast_radio_en type:u16 +D_en_8017CF90 = 0x8017CF90; //segment:ast_radio_en type:u16 +D_en_8017CFE8 = 0x8017CFE8; //segment:ast_radio_en type:u16 +D_en_8017D008 = 0x8017D008; //segment:ast_radio_en type:u16 +D_en_8017D05C = 0x8017D05C; //segment:ast_radio_en type:u16 +D_en_8017D0A8 = 0x8017D0A8; //segment:ast_radio_en type:u16 +D_en_8017D100 = 0x8017D100; //segment:ast_radio_en type:u16 +D_en_8017D14C = 0x8017D14C; //segment:ast_radio_en type:u16 +D_en_8017D190 = 0x8017D190; //segment:ast_radio_en type:u16 +D_en_8017D1D8 = 0x8017D1D8; //segment:ast_radio_en type:u16 +D_en_8017D214 = 0x8017D214; //segment:ast_radio_en type:u16 +D_en_8017D25C = 0x8017D25C; //segment:ast_radio_en type:u16 +D_en_8017D28C = 0x8017D28C; //segment:ast_radio_en type:u16 +D_en_8017D2C0 = 0x8017D2C0; //segment:ast_radio_en type:u16 +D_en_8017D2F8 = 0x8017D2F8; //segment:ast_radio_en type:u16 +D_en_8017D324 = 0x8017D324; //segment:ast_radio_en type:u16 +D_en_8017D360 = 0x8017D360; //segment:ast_radio_en type:u16 +D_en_8017D394 = 0x8017D394; //segment:ast_radio_en type:u16 +D_en_8017D3D8 = 0x8017D3D8; //segment:ast_radio_en type:u16 +D_en_8017D42C = 0x8017D42C; //segment:ast_radio_en type:u16 +D_en_8017D464 = 0x8017D464; //segment:ast_radio_en type:u16 +D_en_8017D480 = 0x8017D480; //segment:ast_radio_en type:u16 +D_en_8017D4D0 = 0x8017D4D0; //segment:ast_radio_en type:u16 +D_en_8017D50C = 0x8017D50C; //segment:ast_radio_en type:u16 +D_en_8017D55C = 0x8017D55C; //segment:ast_radio_en type:u16 +D_en_8017D594 = 0x8017D594; //segment:ast_radio_en type:u16 +D_en_8017D5B8 = 0x8017D5B8; //segment:ast_radio_en type:u16 +D_en_8017D5E8 = 0x8017D5E8; //segment:ast_radio_en type:u16 +D_en_8017D60C = 0x8017D60C; //segment:ast_radio_en type:u16 +D_en_8017D65C = 0x8017D65C; //segment:ast_radio_en type:u16 +D_en_8017D6B8 = 0x8017D6B8; //segment:ast_radio_en type:u16 +D_en_8017D6F0 = 0x8017D6F0; //segment:ast_radio_en type:u16 +D_en_8017D738 = 0x8017D738; //segment:ast_radio_en type:u16 +D_en_8017D788 = 0x8017D788; //segment:ast_radio_en type:u16 +D_en_8017D7D4 = 0x8017D7D4; //segment:ast_radio_en type:u16 +D_en_8017D818 = 0x8017D818; //segment:ast_radio_en type:u16 +D_en_8017D864 = 0x8017D864; //segment:ast_radio_en type:u16 +D_en_8017D8B0 = 0x8017D8B0; //segment:ast_radio_en type:u16 +D_en_8017D900 = 0x8017D900; //segment:ast_radio_en type:u16 +D_en_8017D94C = 0x8017D94C; //segment:ast_radio_en type:u16 +D_en_8017D998 = 0x8017D998; //segment:ast_radio_en type:u16 +D_en_8017D9E8 = 0x8017D9E8; //segment:ast_radio_en type:u16 +D_en_8017DA0C = 0x8017DA0C; //segment:ast_radio_en type:u16 +D_en_8017DA44 = 0x8017DA44; //segment:ast_radio_en type:u16 +D_en_8017DA78 = 0x8017DA78; //segment:ast_radio_en type:u16 +D_en_8017DAC4 = 0x8017DAC4; //segment:ast_radio_en type:u16 +D_en_8017DAE0 = 0x8017DAE0; //segment:ast_radio_en type:u16 +D_en_8017DB10 = 0x8017DB10; //segment:ast_radio_en type:u16 +D_en_8017DB28 = 0x8017DB28; //segment:ast_radio_en type:u16 +D_en_8017DB84 = 0x8017DB84; //segment:ast_radio_en type:u16 +D_en_8017DBB4 = 0x8017DBB4; //segment:ast_radio_en type:u16 +D_en_8017DBE0 = 0x8017DBE0; //segment:ast_radio_en type:u16 +D_en_8017DC08 = 0x8017DC08; //segment:ast_radio_en type:u16 +D_en_8017DC5C = 0x8017DC5C; //segment:ast_radio_en type:u16 +D_en_8017DC7C = 0x8017DC7C; //segment:ast_radio_en type:u16 +D_en_8017DCD4 = 0x8017DCD4; //segment:ast_radio_en type:u16 +D_en_8017DD0C = 0x8017DD0C; //segment:ast_radio_en type:u16 +D_en_8017DD54 = 0x8017DD54; //segment:ast_radio_en type:u16 +D_en_8017DDA4 = 0x8017DDA4; //segment:ast_radio_en type:u16 +D_en_8017DDE0 = 0x8017DDE0; //segment:ast_radio_en type:u16 +D_en_8017DE20 = 0x8017DE20; //segment:ast_radio_en type:u16 +D_en_8017DE58 = 0x8017DE58; //segment:ast_radio_en type:u16 +D_en_8017DEA8 = 0x8017DEA8; //segment:ast_radio_en type:u16 +D_en_8017DEF4 = 0x8017DEF4; //segment:ast_radio_en type:u16 +D_en_8017DF48 = 0x8017DF48; //segment:ast_radio_en type:u16 +D_en_8017DF94 = 0x8017DF94; //segment:ast_radio_en type:u16 +D_en_8017DFA8 = 0x8017DFA8; //segment:ast_radio_en type:u16 +D_en_8017DFE4 = 0x8017DFE4; //segment:ast_radio_en type:u16 +D_en_8017E018 = 0x8017E018; //segment:ast_radio_en type:u16 +D_en_8017E064 = 0x8017E064; //segment:ast_radio_en type:u16 +D_en_8017E09C = 0x8017E09C; //segment:ast_radio_en type:u16 +D_en_8017E0F4 = 0x8017E0F4; //segment:ast_radio_en type:u16 +D_en_8017E128 = 0x8017E128; //segment:ast_radio_en type:u16 +D_en_8017E170 = 0x8017E170; //segment:ast_radio_en type:u16 +D_en_8017E1C0 = 0x8017E1C0; //segment:ast_radio_en type:u16 +D_en_8017E1F8 = 0x8017E1F8; //segment:ast_radio_en type:u16 +D_en_8017E250 = 0x8017E250; //segment:ast_radio_en type:u16 +D_en_8017E270 = 0x8017E270; //segment:ast_radio_en type:u16 +D_en_8017E2C8 = 0x8017E2C8; //segment:ast_radio_en type:u16 +D_en_8017E318 = 0x8017E318; //segment:ast_radio_en type:u16 +D_en_8017E368 = 0x8017E368; //segment:ast_radio_en type:u16 +D_en_8017E390 = 0x8017E390; //segment:ast_radio_en type:u16 +D_en_8017E3D0 = 0x8017E3D0; //segment:ast_radio_en type:u16 +D_en_8017E420 = 0x8017E420; //segment:ast_radio_en type:u16 +D_en_8017E45C = 0x8017E45C; //segment:ast_radio_en type:u16 +D_en_8017E490 = 0x8017E490; //segment:ast_radio_en type:u16 +D_en_8017E4C8 = 0x8017E4C8; //segment:ast_radio_en type:u16 +D_en_8017E50C = 0x8017E50C; //segment:ast_radio_en type:u16 +D_en_8017E550 = 0x8017E550; //segment:ast_radio_en type:u16 +D_en_8017E57C = 0x8017E57C; //segment:ast_radio_en type:u16 +D_en_8017E5BC = 0x8017E5BC; //segment:ast_radio_en type:u16 +D_en_8017E608 = 0x8017E608; //segment:ast_radio_en type:u16 +D_en_8017E658 = 0x8017E658; //segment:ast_radio_en type:u16 +D_en_8017E69C = 0x8017E69C; //segment:ast_radio_en type:u16 +D_en_8017E6D4 = 0x8017E6D4; //segment:ast_radio_en type:u16 +D_en_8017E700 = 0x8017E700; //segment:ast_radio_en type:u16 +D_en_8017E728 = 0x8017E728; //segment:ast_radio_en type:u16 +D_en_8017E768 = 0x8017E768; //segment:ast_radio_en type:u16 +D_en_8017E790 = 0x8017E790; //segment:ast_radio_en type:u16 +D_en_8017E7C4 = 0x8017E7C4; //segment:ast_radio_en type:u16 +D_en_8017E7EC = 0x8017E7EC; //segment:ast_radio_en type:u16 +D_en_8017E818 = 0x8017E818; //segment:ast_radio_en type:u16 +D_en_8017E844 = 0x8017E844; //segment:ast_radio_en type:u16 +D_en_8017E870 = 0x8017E870; //segment:ast_radio_en type:u16 +D_en_8017E8C8 = 0x8017E8C8; //segment:ast_radio_en type:u16 +D_en_8017E904 = 0x8017E904; //segment:ast_radio_en type:u16 +D_en_8017E948 = 0x8017E948; //segment:ast_radio_en type:u16 +D_en_8017E998 = 0x8017E998; //segment:ast_radio_en type:u16 +D_en_8017E9C8 = 0x8017E9C8; //segment:ast_radio_en type:u16 +D_en_8017EA04 = 0x8017EA04; //segment:ast_radio_en type:u16 +D_en_8017EA38 = 0x8017EA38; //segment:ast_radio_en type:u16 +D_en_8017EA88 = 0x8017EA88; //segment:ast_radio_en type:u16 +D_en_8017EAAC = 0x8017EAAC; //segment:ast_radio_en type:u16 +D_en_8017EACC = 0x8017EACC; //segment:ast_radio_en type:u16 +D_en_8017EB10 = 0x8017EB10; //segment:ast_radio_en type:u16 +D_en_8017EB3C = 0x8017EB3C; //segment:ast_radio_en type:u16 +D_en_8017EB80 = 0x8017EB80; //segment:ast_radio_en type:u16 +D_en_8017EBB8 = 0x8017EBB8; //segment:ast_radio_en type:u16 +D_en_8017EBF8 = 0x8017EBF8; //segment:ast_radio_en type:u16 +D_en_8017EC40 = 0x8017EC40; //segment:ast_radio_en type:u16 +D_en_8017EC84 = 0x8017EC84; //segment:ast_radio_en type:u16 +D_en_8017ECCC = 0x8017ECCC; //segment:ast_radio_en type:u16 +D_en_8017ECE8 = 0x8017ECE8; //segment:ast_radio_en type:u16 +D_en_8017ED48 = 0x8017ED48; //segment:ast_radio_en type:u16 +D_en_8017ED68 = 0x8017ED68; //segment:ast_radio_en type:u16 +D_en_8017EDA0 = 0x8017EDA0; //segment:ast_radio_en type:u16 +D_en_8017EDE0 = 0x8017EDE0; //segment:ast_radio_en type:u16 +D_en_8017EE34 = 0x8017EE34; //segment:ast_radio_en type:u16 +D_en_8017EE88 = 0x8017EE88; //segment:ast_radio_en type:u16 +D_en_8017EEBC = 0x8017EEBC; //segment:ast_radio_en type:u16 +D_en_8017EED0 = 0x8017EED0; //segment:ast_radio_en type:u16 +D_en_8017EEF8 = 0x8017EEF8; //segment:ast_radio_en type:u16 +D_en_8017EF3C = 0x8017EF3C; //segment:ast_radio_en type:u16 +D_en_8017EF84 = 0x8017EF84; //segment:ast_radio_en type:u16 +D_en_8017EFAC = 0x8017EFAC; //segment:ast_radio_en type:u16 +D_en_8017EFEC = 0x8017EFEC; //segment:ast_radio_en type:u16 +D_en_8017F028 = 0x8017F028; //segment:ast_radio_en type:u16 +D_en_8017F064 = 0x8017F064; //segment:ast_radio_en type:u16 +D_en_8017F090 = 0x8017F090; //segment:ast_radio_en type:u16 +D_en_8017F0D4 = 0x8017F0D4; //segment:ast_radio_en type:u16 +D_en_8017F11C = 0x8017F11C; //segment:ast_radio_en type:u16 +D_en_8017F15C = 0x8017F15C; //segment:ast_radio_en type:u16 +D_en_8017F1AC = 0x8017F1AC; //segment:ast_radio_en type:u16 +D_en_8017F1C8 = 0x8017F1C8; //segment:ast_radio_en type:u16 +D_en_8017F1E8 = 0x8017F1E8; //segment:ast_radio_en type:u16 +D_en_8017F238 = 0x8017F238; //segment:ast_radio_en type:u16 +D_en_8017F27C = 0x8017F27C; //segment:ast_radio_en type:u16 +D_en_8017F2B4 = 0x8017F2B4; //segment:ast_radio_en type:u16 +D_en_8017F2D0 = 0x8017F2D0; //segment:ast_radio_en type:u16 +D_en_8017F320 = 0x8017F320; //segment:ast_radio_en type:u16 +D_en_8017F354 = 0x8017F354; //segment:ast_radio_en type:u16 +D_en_8017F38C = 0x8017F38C; //segment:ast_radio_en type:u16 +D_en_8017F3D4 = 0x8017F3D4; //segment:ast_radio_en type:u16 +D_en_8017F410 = 0x8017F410; //segment:ast_radio_en type:u16 +D_en_8017F458 = 0x8017F458; //segment:ast_radio_en type:u16 +D_en_8017F488 = 0x8017F488; //segment:ast_radio_en type:u16 +D_en_8017F4B4 = 0x8017F4B4; //segment:ast_radio_en type:u16 +D_en_8017F4FC = 0x8017F4FC; //segment:ast_radio_en type:u16 +D_en_8017F54C = 0x8017F54C; //segment:ast_radio_en type:u16 +D_en_8017F580 = 0x8017F580; //segment:ast_radio_en type:u16 +D_en_8017F5CC = 0x8017F5CC; //segment:ast_radio_en type:u16 +D_en_8017F5F0 = 0x8017F5F0; //segment:ast_radio_en type:u16 +D_en_8017F610 = 0x8017F610; //segment:ast_radio_en type:u16 +D_en_8017F648 = 0x8017F648; //segment:ast_radio_en type:u16 +D_en_8017F694 = 0x8017F694; //segment:ast_radio_en type:u16 +D_en_8017F6DC = 0x8017F6DC; //segment:ast_radio_en type:u16 +D_en_8017F72C = 0x8017F72C; //segment:ast_radio_en type:u16 +D_en_8017F77C = 0x8017F77C; //segment:ast_radio_en type:u16 +D_en_8017F7AC = 0x8017F7AC; //segment:ast_radio_en type:u16 +D_en_8017F800 = 0x8017F800; //segment:ast_radio_en type:u16 +D_en_8017F844 = 0x8017F844; //segment:ast_radio_en type:u16 +D_en_8017F874 = 0x8017F874; //segment:ast_radio_en type:u16 +D_en_8017F890 = 0x8017F890; //segment:ast_radio_en type:u16 +D_en_8017F8DC = 0x8017F8DC; //segment:ast_radio_en type:u16 +D_en_8017F934 = 0x8017F934; //segment:ast_radio_en type:u16 +D_en_8017F980 = 0x8017F980; //segment:ast_radio_en type:u16 +D_en_8017F9D4 = 0x8017F9D4; //segment:ast_radio_en type:u16 +D_en_8017FA1C = 0x8017FA1C; //segment:ast_radio_en type:u16 +D_en_8017FA4C = 0x8017FA4C; //segment:ast_radio_en type:u16 +D_en_8017FA7C = 0x8017FA7C; //segment:ast_radio_en type:u16 +D_en_8017FAC4 = 0x8017FAC4; //segment:ast_radio_en type:u16 +D_en_8017FAE0 = 0x8017FAE0; //segment:ast_radio_en type:u16 +D_en_8017FB28 = 0x8017FB28; //segment:ast_radio_en type:u16 +D_en_8017FB78 = 0x8017FB78; //segment:ast_radio_en type:u16 +D_en_8017FBCC = 0x8017FBCC; //segment:ast_radio_en type:u16 +D_en_8017FC04 = 0x8017FC04; //segment:ast_radio_en type:u16 +D_en_8017FC44 = 0x8017FC44; //segment:ast_radio_en type:u16 +D_en_8017FC74 = 0x8017FC74; //segment:ast_radio_en type:u16 +D_en_8017FCA0 = 0x8017FCA0; //segment:ast_radio_en type:u16 +D_en_8017FCCC = 0x8017FCCC; //segment:ast_radio_en type:u16 +D_en_8017FD04 = 0x8017FD04; //segment:ast_radio_en type:u16 +D_en_8017FD40 = 0x8017FD40; //segment:ast_radio_en type:u16 +D_en_8017FD88 = 0x8017FD88; //segment:ast_radio_en type:u16 +D_en_8017FDD4 = 0x8017FDD4; //segment:ast_radio_en type:u16 +D_en_8017FDF0 = 0x8017FDF0; //segment:ast_radio_en type:u16 +D_en_8017FE2C = 0x8017FE2C; //segment:ast_radio_en type:u16 +D_en_8017FE6C = 0x8017FE6C; //segment:ast_radio_en type:u16 +D_en_8017FEC4 = 0x8017FEC4; //segment:ast_radio_en type:u16 +D_en_8017FF00 = 0x8017FF00; //segment:ast_radio_en type:u16 +D_en_8017FF10 = 0x8017FF10; //segment:ast_radio_en type:u16 +D_en_8017FF20 = 0x8017FF20; //segment:ast_radio_en type:u16 +D_en_8017FF30 = 0x8017FF30; //segment:ast_radio_en type:u16 +D_en_8017FF80 = 0x8017FF80; //segment:ast_radio_en type:u16 +D_en_8017FFCC = 0x8017FFCC; //segment:ast_radio_en type:u16 +D_en_80180014 = 0x80180014; //segment:ast_radio_en type:u16 +D_en_80180060 = 0x80180060; //segment:ast_radio_en type:u16 +D_en_8018008C = 0x8018008C; //segment:ast_radio_en type:u16 +D_en_801800B8 = 0x801800B8; //segment:ast_radio_en type:u16 +D_en_80180108 = 0x80180108; //segment:ast_radio_en type:u16 +D_en_80180144 = 0x80180144; //segment:ast_radio_en type:u16 +D_en_80180194 = 0x80180194; //segment:ast_radio_en type:u16 +D_en_801801D4 = 0x801801D4; //segment:ast_radio_en type:u16 +D_en_8018020C = 0x8018020C; //segment:ast_radio_en type:u16 +D_en_8018025C = 0x8018025C; //segment:ast_radio_en type:u16 +D_en_80180294 = 0x80180294; //segment:ast_radio_en type:u16 +D_en_801802E8 = 0x801802E8; //segment:ast_radio_en type:u16 +D_en_8018032C = 0x8018032C; //segment:ast_radio_en type:u16 +D_en_80180350 = 0x80180350; //segment:ast_radio_en type:u16 +D_en_80180374 = 0x80180374; //segment:ast_radio_en type:u16 +D_en_801803A4 = 0x801803A4; //segment:ast_radio_en type:u16 +D_en_801803FC = 0x801803FC; //segment:ast_radio_en type:u16 +D_en_80180434 = 0x80180434; //segment:ast_radio_en type:u16 +D_en_80180484 = 0x80180484; //segment:ast_radio_en type:u16 +D_en_801804C0 = 0x801804C0; //segment:ast_radio_en type:u16 +D_en_8018050C = 0x8018050C; //segment:ast_radio_en type:u16 +D_en_80180554 = 0x80180554; //segment:ast_radio_en type:u16 +D_en_80180588 = 0x80180588; //segment:ast_radio_en type:u16 +D_en_801805B0 = 0x801805B0; //segment:ast_radio_en type:u16 +D_en_801805D0 = 0x801805D0; //segment:ast_radio_en type:u16 +D_en_801805FC = 0x801805FC; //segment:ast_radio_en type:u16 +D_en_80180618 = 0x80180618; //segment:ast_radio_en type:u16 +D_en_80180640 = 0x80180640; //segment:ast_radio_en type:u16 +D_en_80180688 = 0x80180688; //segment:ast_radio_en type:u16 +D_en_801806E0 = 0x801806E0; //segment:ast_radio_en type:u16 +D_en_8018073C = 0x8018073C; //segment:ast_radio_en type:u16 +D_en_80180774 = 0x80180774; //segment:ast_radio_en type:u16 +D_en_801807B0 = 0x801807B0; //segment:ast_radio_en type:u16 +D_en_80180800 = 0x80180800; //segment:ast_radio_en type:u16 +D_en_80180850 = 0x80180850; //segment:ast_radio_en type:u16 +D_en_801808A8 = 0x801808A8; //segment:ast_radio_en type:u16 +D_en_801808F0 = 0x801808F0; //segment:ast_radio_en type:u16 +D_en_80180934 = 0x80180934; //segment:ast_radio_en type:u16 +D_en_80180974 = 0x80180974; //segment:ast_radio_en type:u16 +D_en_801809A4 = 0x801809A4; //segment:ast_radio_en type:u16 +D_en_801809F4 = 0x801809F4; //segment:ast_radio_en type:u16 +D_en_80180A3C = 0x80180A3C; //segment:ast_radio_en type:u16 +D_en_80180A78 = 0x80180A78; //segment:ast_radio_en type:u16 +D_en_80180ACC = 0x80180ACC; //segment:ast_radio_en type:u16 +D_en_80180B04 = 0x80180B04; //segment:ast_radio_en type:u16 +D_en_80180B48 = 0x80180B48; //segment:ast_radio_en type:u16 +D_en_80180B7C = 0x80180B7C; //segment:ast_radio_en type:u16 +D_en_80180BA4 = 0x80180BA4; //segment:ast_radio_en type:u16 +D_en_80180BDC = 0x80180BDC; //segment:ast_radio_en type:u16 +D_en_80180C28 = 0x80180C28; //segment:ast_radio_en type:u16 +D_en_80180C4C = 0x80180C4C; //segment:ast_radio_en type:u16 +D_en_80180C70 = 0x80180C70; //segment:ast_radio_en type:u16 +D_en_80180CC0 = 0x80180CC0; //segment:ast_radio_en type:u16 +D_en_80180D08 = 0x80180D08; //segment:ast_radio_en type:u16 +D_en_80180D58 = 0x80180D58; //segment:ast_radio_en type:u16 +D_en_80180DA0 = 0x80180DA0; //segment:ast_radio_en type:u16 +D_en_80180DD8 = 0x80180DD8; //segment:ast_radio_en type:u16 +D_en_80180E10 = 0x80180E10; //segment:ast_radio_en type:u16 +D_en_80180E4C = 0x80180E4C; //segment:ast_radio_en type:u16 +D_en_80180E90 = 0x80180E90; //segment:ast_radio_en type:u16 +D_en_80180EE4 = 0x80180EE4; //segment:ast_radio_en type:u16 +D_en_80180F10 = 0x80180F10; //segment:ast_radio_en type:u16 +D_en_80180F5C = 0x80180F5C; //segment:ast_radio_en type:u16 +D_en_80180F8C = 0x80180F8C; //segment:ast_radio_en type:u16 +D_en_80180FB4 = 0x80180FB4; //segment:ast_radio_en type:u16 +D_en_80180FE0 = 0x80180FE0; //segment:ast_radio_en type:u16 +D_en_8018101C = 0x8018101C; //segment:ast_radio_en type:u16 +D_en_80181068 = 0x80181068; //segment:ast_radio_en type:u16 +D_en_801810A4 = 0x801810A4; //segment:ast_radio_en type:u16 +D_en_801810F4 = 0x801810F4; //segment:ast_radio_en type:u16 +D_en_80181128 = 0x80181128; //segment:ast_radio_en type:u16 +D_en_80181154 = 0x80181154; //segment:ast_radio_en type:u16 +D_en_80181180 = 0x80181180; //segment:ast_radio_en type:u16 +D_en_801811AC = 0x801811AC; //segment:ast_radio_en type:u16 +D_en_801811F8 = 0x801811F8; //segment:ast_radio_en type:u16 +D_en_80181238 = 0x80181238; //segment:ast_radio_en type:u16 +D_en_80181260 = 0x80181260; //segment:ast_radio_en type:u16 +D_en_80181288 = 0x80181288; //segment:ast_radio_en type:u16 +D_en_801812F4 = 0x801812F4; //segment:ast_radio_en type:u16 +D_en_8018133C = 0x8018133C; //segment:ast_radio_en type:u16 +D_en_80181374 = 0x80181374; //segment:ast_radio_en type:u16 +D_en_801813CC = 0x801813CC; //segment:ast_radio_en type:u16 +D_en_801813E0 = 0x801813E0; //segment:ast_radio_en type:u16 +D_en_8018142C = 0x8018142C; //segment:ast_radio_en type:u16 +D_en_80181460 = 0x80181460; //segment:ast_radio_en type:u16 +D_en_801814A0 = 0x801814A0; //segment:ast_radio_en type:u16 +D_en_801814E8 = 0x801814E8; //segment:ast_radio_en type:u16 +D_en_80181524 = 0x80181524; //segment:ast_radio_en type:u16 +D_en_80181570 = 0x80181570; //segment:ast_radio_en type:u16 +D_en_801815B0 = 0x801815B0; //segment:ast_radio_en type:u16 +D_en_801815FC = 0x801815FC; //segment:ast_radio_en type:u16 +D_en_80181650 = 0x80181650; //segment:ast_radio_en type:u16 +D_en_801816B0 = 0x801816B0; //segment:ast_radio_en type:u16 +D_en_801816F4 = 0x801816F4; //segment:ast_radio_en type:u16 +D_en_80181738 = 0x80181738; //segment:ast_radio_en type:u16 +D_en_80181768 = 0x80181768; //segment:ast_radio_en type:u16 +D_en_80181798 = 0x80181798; //segment:ast_radio_en type:u16 +D_en_801817EC = 0x801817EC; //segment:ast_radio_en type:u16 +D_en_8018182C = 0x8018182C; //segment:ast_radio_en type:u16 +D_en_8018186C = 0x8018186C; //segment:ast_radio_en type:u16 +D_en_801818C0 = 0x801818C0; //segment:ast_radio_en type:u16 +D_en_80181918 = 0x80181918; //segment:ast_radio_en type:u16 +D_en_8018195C = 0x8018195C; //segment:ast_radio_en type:u16 +D_en_80181998 = 0x80181998; //segment:ast_radio_en type:u16 +D_en_801819D8 = 0x801819D8; //segment:ast_radio_en type:u16 +D_en_80181A08 = 0x80181A08; //segment:ast_radio_en type:u16 +D_en_80181A4C = 0x80181A4C; //segment:ast_radio_en type:u16 +D_en_80181A98 = 0x80181A98; //segment:ast_radio_en type:u16 +D_en_80181AD8 = 0x80181AD8; //segment:ast_radio_en type:u16 +D_en_80181B04 = 0x80181B04; //segment:ast_radio_en type:u16 +D_en_80181B40 = 0x80181B40; //segment:ast_radio_en type:u16 +D_en_80181B7C = 0x80181B7C; //segment:ast_radio_en type:u16 +D_en_80181BC8 = 0x80181BC8; //segment:ast_radio_en type:u16 +D_en_80181C08 = 0x80181C08; //segment:ast_radio_en type:u16 +D_en_80181C60 = 0x80181C60; //segment:ast_radio_en type:u16 +D_en_80181CB8 = 0x80181CB8; //segment:ast_radio_en type:u16 +D_en_80181D0C = 0x80181D0C; //segment:ast_radio_en type:u16 +D_en_80181D4C = 0x80181D4C; //segment:ast_radio_en type:u16 +D_en_80181D8C = 0x80181D8C; //segment:ast_radio_en type:u16 +D_en_80181DD0 = 0x80181DD0; //segment:ast_radio_en type:u16 +D_en_80181E1C = 0x80181E1C; //segment:ast_radio_en type:u16 +D_en_80181E68 = 0x80181E68; //segment:ast_radio_en type:u16 +D_en_80181EA4 = 0x80181EA4; //segment:ast_radio_en type:u16 +D_en_80181F00 = 0x80181F00; //segment:ast_radio_en type:u16 +D_en_80181F3C = 0x80181F3C; //segment:ast_radio_en type:u16 +D_en_80181F6C = 0x80181F6C; //segment:ast_radio_en type:u16 +D_en_80181FAC = 0x80181FAC; //segment:ast_radio_en type:u16 +D_en_80181FE4 = 0x80181FE4; //segment:ast_radio_en type:u16 +D_en_80182038 = 0x80182038; //segment:ast_radio_en type:u16 +D_en_80182070 = 0x80182070; //segment:ast_radio_en type:u16 +D_en_801820B4 = 0x801820B4; //segment:ast_radio_en type:u16 +D_en_801820E4 = 0x801820E4; //segment:ast_radio_en type:u16 +D_en_8018212C = 0x8018212C; //segment:ast_radio_en type:u16 +D_en_80182160 = 0x80182160; //segment:ast_radio_en type:u16 +D_en_801821A8 = 0x801821A8; //segment:ast_radio_en type:u16 +D_en_801821E0 = 0x801821E0; //segment:ast_radio_en type:u16 +D_en_8018220C = 0x8018220C; //segment:ast_radio_en type:u16 +D_en_8018225C = 0x8018225C; //segment:ast_radio_en type:u16 +D_en_8018228C = 0x8018228C; //segment:ast_radio_en type:u16 +D_en_801822B0 = 0x801822B0; //segment:ast_radio_en type:u16 +D_en_801822FC = 0x801822FC; //segment:ast_radio_en type:u16 +D_en_8018234C = 0x8018234C; //segment:ast_radio_en type:u16 +D_en_80182398 = 0x80182398; //segment:ast_radio_en type:u16 +D_en_801823EC = 0x801823EC; //segment:ast_radio_en type:u16 +D_en_8018240C = 0x8018240C; //segment:ast_radio_en type:u16 +D_en_80182448 = 0x80182448; //segment:ast_radio_en type:u16 +D_en_80182498 = 0x80182498; //segment:ast_radio_en type:u16 +D_en_801824E8 = 0x801824E8; //segment:ast_radio_en type:u16 +D_en_80182548 = 0x80182548; //segment:ast_radio_en type:u16 +D_en_80182580 = 0x80182580; //segment:ast_radio_en type:u16 +D_en_801825A4 = 0x801825A4; //segment:ast_radio_en type:u16 +D_en_801825E0 = 0x801825E0; //segment:ast_radio_en type:u16 +D_en_80182618 = 0x80182618; //segment:ast_radio_en type:u16 +D_en_8018264C = 0x8018264C; //segment:ast_radio_en type:u16 +D_en_80182670 = 0x80182670; //segment:ast_radio_en type:u16 +D_en_80182698 = 0x80182698; //segment:ast_radio_en type:u16 +D_en_801826D0 = 0x801826D0; //segment:ast_radio_en type:u16 +D_en_80182724 = 0x80182724; //segment:ast_radio_en type:u16 +D_en_80182754 = 0x80182754; //segment:ast_radio_en type:u16 +D_en_80182790 = 0x80182790; //segment:ast_radio_en type:u16 +D_en_801827C8 = 0x801827C8; //segment:ast_radio_en type:u16 +D_en_80182810 = 0x80182810; //segment:ast_radio_en type:u16 +D_en_8018285C = 0x8018285C; //segment:ast_radio_en type:u16 +D_en_8018288C = 0x8018288C; //segment:ast_radio_en type:u16 +D_en_801828E0 = 0x801828E0; //segment:ast_radio_en type:u16 +D_en_80182910 = 0x80182910; //segment:ast_radio_en type:u16 +D_en_80182958 = 0x80182958; //segment:ast_radio_en type:u16 +D_en_80182994 = 0x80182994; //segment:ast_radio_en type:u16 +D_en_801829B4 = 0x801829B4; //segment:ast_radio_en type:u16 +D_en_801829FC = 0x801829FC; //segment:ast_radio_en type:u16 +D_en_80182A38 = 0x80182A38; //segment:ast_radio_en type:u16 +D_en_80182A80 = 0x80182A80; //segment:ast_radio_en type:u16 +D_en_80182ACC = 0x80182ACC; //segment:ast_radio_en type:u16 +D_en_80182B1C = 0x80182B1C; //segment:ast_radio_en type:u16 +D_en_80182B40 = 0x80182B40; //segment:ast_radio_en type:u16 +D_en_80182B88 = 0x80182B88; //segment:ast_radio_en type:u16 +D_en_80182BD0 = 0x80182BD0; //segment:ast_radio_en type:u16 +D_en_80182C10 = 0x80182C10; //segment:ast_radio_en type:u16 +D_en_80182C50 = 0x80182C50; //segment:ast_radio_en type:u16 +D_en_80182C98 = 0x80182C98; //segment:ast_radio_en type:u16 +D_en_80182CDC = 0x80182CDC; //segment:ast_radio_en type:u16 +D_en_80182D34 = 0x80182D34; //segment:ast_radio_en type:u16 +D_en_80182D64 = 0x80182D64; //segment:ast_radio_en type:u16 +D_en_80182D90 = 0x80182D90; //segment:ast_radio_en type:u16 +D_en_80182DE4 = 0x80182DE4; //segment:ast_radio_en type:u16 +D_en_80182E10 = 0x80182E10; //segment:ast_radio_en type:u16 +D_en_80182E6C = 0x80182E6C; //segment:ast_radio_en type:u16 +D_en_80182E9C = 0x80182E9C; //segment:ast_radio_en type:u16 +D_en_80182EC4 = 0x80182EC4; //segment:ast_radio_en type:u16 +D_en_80182EF8 = 0x80182EF8; //segment:ast_radio_en type:u16 +D_en_80182F28 = 0x80182F28; //segment:ast_radio_en type:u16 +D_en_80182F74 = 0x80182F74; //segment:ast_radio_en type:u16 +D_en_80182FA8 = 0x80182FA8; //segment:ast_radio_en type:u16 +D_en_80183000 = 0x80183000; //segment:ast_radio_en type:u16 +D_en_8018303C = 0x8018303C; //segment:ast_radio_en type:u16 +D_en_80183090 = 0x80183090; //segment:ast_radio_en type:u16 +D_en_801830AC = 0x801830AC; //segment:ast_radio_en type:u16 +D_en_801830D4 = 0x801830D4; //segment:ast_radio_en type:u16 +D_en_80183108 = 0x80183108; //segment:ast_radio_en type:u16 +D_en_80183154 = 0x80183154; //segment:ast_radio_en type:u16 +D_en_80183190 = 0x80183190; //segment:ast_radio_en type:u16 +D_en_801831E0 = 0x801831E0; //segment:ast_radio_en type:u16 +D_en_80183230 = 0x80183230; //segment:ast_radio_en type:u16 +D_en_80183284 = 0x80183284; //segment:ast_radio_en type:u16 +D_en_801832E0 = 0x801832E0; //segment:ast_radio_en type:u16 +D_en_80183318 = 0x80183318; //segment:ast_radio_en type:u16 +D_en_8018336C = 0x8018336C; //segment:ast_radio_en type:u16 +D_en_801833C0 = 0x801833C0; //segment:ast_radio_en type:u16 +D_en_801833F4 = 0x801833F4; //segment:ast_radio_en type:u16 +D_en_80183454 = 0x80183454; //segment:ast_radio_en type:u16 +D_en_80183490 = 0x80183490; //segment:ast_radio_en type:u16 +D_en_801834B8 = 0x801834B8; //segment:ast_radio_en type:u16 +D_en_80183514 = 0x80183514; //segment:ast_radio_en type:u16 +D_en_80183570 = 0x80183570; //segment:ast_radio_en type:u16 +D_en_801835B4 = 0x801835B4; //segment:ast_radio_en type:u16 +D_en_80183604 = 0x80183604; //segment:ast_radio_en type:u16 +D_en_80183660 = 0x80183660; //segment:ast_radio_en type:u16 +D_en_801836AC = 0x801836AC; //segment:ast_radio_en type:u16 +D_en_801836F8 = 0x801836F8; //segment:ast_radio_en type:u16 +D_en_8018373C = 0x8018373C; //segment:ast_radio_en type:u16 +D_en_80183788 = 0x80183788; //segment:ast_radio_en type:u16 +D_en_801837A4 = 0x801837A4; //segment:ast_radio_en type:u16 +D_en_801837EC = 0x801837EC; //segment:ast_radio_en type:u16 +D_en_80183838 = 0x80183838; //segment:ast_radio_en type:u16 +D_en_80183888 = 0x80183888; //segment:ast_radio_en type:u16 +D_en_801838B4 = 0x801838B4; //segment:ast_radio_en type:u16 +D_en_801838CC = 0x801838CC; //segment:ast_radio_en type:u16 +D_en_801838F0 = 0x801838F0; //segment:ast_radio_en type:u16 +D_en_80183930 = 0x80183930; //segment:ast_radio_en type:u16 +D_en_80183948 = 0x80183948; //segment:ast_radio_en type:u16 +D_en_8018397C = 0x8018397C; //segment:ast_radio_en type:u16 +D_en_801839A4 = 0x801839A4; //segment:ast_radio_en type:u16 +D_en_801839CC = 0x801839CC; //segment:ast_radio_en type:u16 +D_en_80183A08 = 0x80183A08; //segment:ast_radio_en type:u16 +D_en_80183A54 = 0x80183A54; //segment:ast_radio_en type:u16 +D_en_80183A70 = 0x80183A70; //segment:ast_radio_en type:u16 +D_en_80183ABC = 0x80183ABC; //segment:ast_radio_en type:u16 +D_en_80183AE4 = 0x80183AE4; //segment:ast_radio_en type:u16 +D_en_80183B38 = 0x80183B38; //segment:ast_radio_en type:u16 +D_en_80183B74 = 0x80183B74; //segment:ast_radio_en type:u16 +D_en_80183BCC = 0x80183BCC; //segment:ast_radio_en type:u16 +D_en_80183C10 = 0x80183C10; //segment:ast_radio_en type:u16 +D_en_80183C48 = 0x80183C48; //segment:ast_radio_en type:u16 +D_en_80183C84 = 0x80183C84; //segment:ast_radio_en type:u16 +D_en_80183CE4 = 0x80183CE4; //segment:ast_radio_en type:u16 +D_en_80183D0C = 0x80183D0C; //segment:ast_radio_en type:u16 +D_en_80183D64 = 0x80183D64; //segment:ast_radio_en type:u16 +D_en_80183DA4 = 0x80183DA4; //segment:ast_radio_en type:u16 +D_en_80183DE4 = 0x80183DE4; //segment:ast_radio_en type:u16 +D_en_80183E08 = 0x80183E08; //segment:ast_radio_en type:u16 +D_en_80183E60 = 0x80183E60; //segment:ast_radio_en type:u16 +D_en_80183E90 = 0x80183E90; //segment:ast_radio_en type:u16 +D_en_80183EE0 = 0x80183EE0; //segment:ast_radio_en type:u16 +D_en_80183F40 = 0x80183F40; //segment:ast_radio_en type:u16 +D_en_80183F88 = 0x80183F88; //segment:ast_radio_en type:u16 +D_en_80183FD4 = 0x80183FD4; //segment:ast_radio_en type:u16 +D_en_80184008 = 0x80184008; //segment:ast_radio_en type:u16 +D_en_80184044 = 0x80184044; //segment:ast_radio_en type:u16 +D_en_80184084 = 0x80184084; //segment:ast_radio_en type:u16 +D_en_801840A4 = 0x801840A4; //segment:ast_radio_en type:u16 +D_en_801840DC = 0x801840DC; //segment:ast_radio_en type:u16 +D_en_80184100 = 0x80184100; //segment:ast_radio_en type:u16 +D_en_80184128 = 0x80184128; //segment:ast_radio_en type:u16 +D_en_8018417C = 0x8018417C; //segment:ast_radio_en type:u16 +D_en_801841A0 = 0x801841A0; //segment:ast_radio_en type:u16 +D_en_801841E0 = 0x801841E0; //segment:ast_radio_en type:u16 +D_en_80184218 = 0x80184218; //segment:ast_radio_en type:u16 +D_en_8018425C = 0x8018425C; //segment:ast_radio_en type:u16 +D_en_801842B8 = 0x801842B8; //segment:ast_radio_en type:u16 +D_en_801842F4 = 0x801842F4; //segment:ast_radio_en type:u16 +D_en_80184310 = 0x80184310; //segment:ast_radio_en type:u16 +D_en_80184354 = 0x80184354; //segment:ast_radio_en type:u16 +D_en_801843AC = 0x801843AC; //segment:ast_radio_en type:u16 +D_en_80184400 = 0x80184400; //segment:ast_radio_en type:u16 +D_en_80184458 = 0x80184458; //segment:ast_radio_en type:u16 +D_en_801844AC = 0x801844AC; //segment:ast_radio_en type:u16 +D_en_801844E0 = 0x801844E0; //segment:ast_radio_en type:u16 +D_en_80184520 = 0x80184520; //segment:ast_radio_en type:u16 +D_en_80184574 = 0x80184574; //segment:ast_radio_en type:u16 +D_en_801845C8 = 0x801845C8; //segment:ast_radio_en type:u16 +D_en_801845EC = 0x801845EC; //segment:ast_radio_en type:u16 +D_en_80184604 = 0x80184604; //segment:ast_radio_en type:u16 +D_en_80184628 = 0x80184628; //segment:ast_radio_en type:u16 +D_en_80184678 = 0x80184678; //segment:ast_radio_en type:u16 +D_en_801846B8 = 0x801846B8; //segment:ast_radio_en type:u16 +D_en_801846DC = 0x801846DC; //segment:ast_radio_en type:u16 +D_en_80184700 = 0x80184700; //segment:ast_radio_en type:u16 +D_en_8018472C = 0x8018472C; //segment:ast_radio_en type:u16 +D_en_80184758 = 0x80184758; //segment:ast_radio_en type:u16 +D_en_80184794 = 0x80184794; //segment:ast_radio_en type:u16 +D_en_801847D4 = 0x801847D4; //segment:ast_radio_en type:u16 +D_en_80184808 = 0x80184808; //segment:ast_radio_en type:u16 +D_en_80184850 = 0x80184850; //segment:ast_radio_en type:u16 +D_en_80184888 = 0x80184888; //segment:ast_radio_en type:u16 +D_en_801848C8 = 0x801848C8; //segment:ast_radio_en type:u16 +D_en_80184910 = 0x80184910; //segment:ast_radio_en type:u16 +D_en_80184970 = 0x80184970; //segment:ast_radio_en type:u16 +D_en_801849AC = 0x801849AC; //segment:ast_radio_en type:u16 +D_en_801849EC = 0x801849EC; //segment:ast_radio_en type:u16 +D_en_80184A14 = 0x80184A14; //segment:ast_radio_en type:u16 +D_en_80184A4C = 0x80184A4C; //segment:ast_radio_en type:u16 +D_en_80184A64 = 0x80184A64; //segment:ast_radio_en type:u16 +D_en_80184AA4 = 0x80184AA4; //segment:ast_radio_en type:u16 +D_en_80184AE0 = 0x80184AE0; //segment:ast_radio_en type:u16 +D_en_80184B0C = 0x80184B0C; //segment:ast_radio_en type:u16 +D_en_80184B44 = 0x80184B44; //segment:ast_radio_en type:u16 +D_en_80184B98 = 0x80184B98; //segment:ast_radio_en type:u16 +D_en_80184BE0 = 0x80184BE0; //segment:ast_radio_en type:u16 +D_en_80184C20 = 0x80184C20; //segment:ast_radio_en type:u16 +D_en_80184C50 = 0x80184C50; //segment:ast_radio_en type:u16 +D_en_80184C7C = 0x80184C7C; //segment:ast_radio_en type:u16 +D_en_80184CA8 = 0x80184CA8; //segment:ast_radio_en type:u16 +D_en_80184CE8 = 0x80184CE8; //segment:ast_radio_en type:u16 +D_en_80184D34 = 0x80184D34; //segment:ast_radio_en type:u16 +D_en_80184D6C = 0x80184D6C; //segment:ast_radio_en type:u16 +D_en_80184DB8 = 0x80184DB8; //segment:ast_radio_en type:u16 +D_en_80184DFC = 0x80184DFC; //segment:ast_radio_en type:u16 +D_en_80184E30 = 0x80184E30; //segment:ast_radio_en type:u16 +D_en_80184E74 = 0x80184E74; //segment:ast_radio_en type:u16 +D_en_80184E90 = 0x80184E90; //segment:ast_radio_en type:u16 +D_en_80184ECC = 0x80184ECC; //segment:ast_radio_en type:u16 +D_en_80184EF0 = 0x80184EF0; //segment:ast_radio_en type:u16 +D_en_80184F10 = 0x80184F10; //segment:ast_radio_en type:u16 +D_en_80184F58 = 0x80184F58; //segment:ast_radio_en type:u16 +D_en_80184F84 = 0x80184F84; //segment:ast_radio_en type:u16 +D_en_80184FC0 = 0x80184FC0; //segment:ast_radio_en type:u16 +D_en_80185014 = 0x80185014; //segment:ast_radio_en type:u16 +D_en_80185058 = 0x80185058; //segment:ast_radio_en type:u16 +D_en_8018506C = 0x8018506C; //segment:ast_radio_en type:u16 +D_en_80185080 = 0x80185080; //segment:ast_radio_en type:u16 +D_en_80185094 = 0x80185094; //segment:ast_radio_en type:u16 +D_en_801850BC = 0x801850BC; //segment:ast_radio_en type:u16 +D_en_801850F8 = 0x801850F8; //segment:ast_radio_en type:u16 +D_en_8018513C = 0x8018513C; //segment:ast_radio_en type:u16 +D_en_80185160 = 0x80185160; //segment:ast_radio_en type:u16 +D_en_801851B0 = 0x801851B0; //segment:ast_radio_en type:u16 +D_en_801851EC = 0x801851EC; //segment:ast_radio_en type:u16 +D_en_80185218 = 0x80185218; //segment:ast_radio_en type:u16 +D_en_80185268 = 0x80185268; //segment:ast_radio_en type:u16 +D_en_801852C4 = 0x801852C4; //segment:ast_radio_en type:u16 +D_en_8018530C = 0x8018530C; //segment:ast_radio_en type:u16 +D_en_8018535C = 0x8018535C; //segment:ast_radio_en type:u16 +D_en_801853A0 = 0x801853A0; //segment:ast_radio_en type:u16 +D_en_801853E4 = 0x801853E4; //segment:ast_radio_en type:u16 +D_en_80185420 = 0x80185420; //segment:ast_radio_en type:u16 +D_en_80185460 = 0x80185460; //segment:ast_radio_en type:u16 +D_en_801854A8 = 0x801854A8; //segment:ast_radio_en type:u16 +D_en_801854E0 = 0x801854E0; //segment:ast_radio_en type:u16 +D_en_80185508 = 0x80185508; //segment:ast_radio_en type:u16 +D_en_80185550 = 0x80185550; //segment:ast_radio_en type:u16 +D_en_8018559C = 0x8018559C; //segment:ast_radio_en type:u16 +D_en_801855B8 = 0x801855B8; //segment:ast_radio_en type:u16 +D_en_801855CC = 0x801855CC; //segment:ast_radio_en type:u16 +D_en_801855E0 = 0x801855E0; //segment:ast_radio_en type:u16 +D_en_801855F4 = 0x801855F4; //segment:ast_radio_en type:u16 +D_en_80185628 = 0x80185628; //segment:ast_radio_en type:u16 +D_en_80185664 = 0x80185664; //segment:ast_radio_en type:u16 +D_en_801856B4 = 0x801856B4; //segment:ast_radio_en type:u16 +D_en_801856CC = 0x801856CC; //segment:ast_radio_en type:u16 +D_en_801856F0 = 0x801856F0; //segment:ast_radio_en type:u16 +D_en_80185708 = 0x80185708; //segment:ast_radio_en type:u16 +D_en_80185748 = 0x80185748; //segment:ast_radio_en type:u16 +D_en_80185788 = 0x80185788; //segment:ast_radio_en type:u16 +D_en_801857C4 = 0x801857C4; //segment:ast_radio_en type:u16 +D_en_80185810 = 0x80185810; //segment:ast_radio_en type:u16 +D_en_8018585C = 0x8018585C; //segment:ast_radio_en type:u16 +D_en_80185880 = 0x80185880; //segment:ast_radio_en type:u16 +D_en_801858CC = 0x801858CC; //segment:ast_radio_en type:u16 +D_en_80185908 = 0x80185908; //segment:ast_radio_en type:u16 +D_en_8018594C = 0x8018594C; //segment:ast_radio_en type:u16 +D_en_8018598C = 0x8018598C; //segment:ast_radio_en type:u16 +D_en_801859C8 = 0x801859C8; //segment:ast_radio_en type:u16 +D_en_80185A0C = 0x80185A0C; //segment:ast_radio_en type:u16 +D_en_80185A68 = 0x80185A68; //segment:ast_radio_en type:u16 +D_en_80185A98 = 0x80185A98; //segment:ast_radio_en type:u16 +D_en_80185AE8 = 0x80185AE8; //segment:ast_radio_en type:u16 +D_en_80185B30 = 0x80185B30; //segment:ast_radio_en type:u16 +D_en_80185B58 = 0x80185B58; //segment:ast_radio_en type:u16 +D_en_80185BA8 = 0x80185BA8; //segment:ast_radio_en type:u16 +D_en_80185BD8 = 0x80185BD8; //segment:ast_radio_en type:u16 +D_en_80185C10 = 0x80185C10; //segment:ast_radio_en type:u16 +D_en_80185C28 = 0x80185C28; //segment:ast_radio_en type:u16 +D_en_80185C68 = 0x80185C68; //segment:ast_radio_en type:u16 +D_en_80185C84 = 0x80185C84; //segment:ast_radio_en type:u16 +D_en_80185CD4 = 0x80185CD4; //segment:ast_radio_en type:u16 +D_en_80185D10 = 0x80185D10; //segment:ast_radio_en type:u16 +D_en_80185D4C = 0x80185D4C; //segment:ast_radio_en type:u16 +D_en_80185D88 = 0x80185D88; //segment:ast_radio_en type:u16 +D_en_80185DB8 = 0x80185DB8; //segment:ast_radio_en type:u16 +D_en_80185E08 = 0x80185E08; //segment:ast_radio_en type:u16 +D_en_80185E58 = 0x80185E58; //segment:ast_radio_en type:u16 +D_en_80185E80 = 0x80185E80; //segment:ast_radio_en type:u16 +D_en_80185EA4 = 0x80185EA4; //segment:ast_radio_en type:u16 +D_en_80185EC8 = 0x80185EC8; //segment:ast_radio_en type:u16 +D_en_80185F00 = 0x80185F00; //segment:ast_radio_en type:u16 +D_en_80185F38 = 0x80185F38; //segment:ast_radio_en type:u16 +D_en_80185F48 = 0x80185F48; //segment:ast_radio_en type:u16 +D_en_80185F5C = 0x80185F5C; //segment:ast_radio_en type:u16 +D_en_80185F78 = 0x80185F78; //segment:ast_radio_en type:u16 +D_en_80185FB8 = 0x80185FB8; //segment:ast_radio_en type:u16 +D_en_80186010 = 0x80186010; //segment:ast_radio_en type:u16 +D_en_80186034 = 0x80186034; //segment:ast_radio_en type:u16 +D_en_80186058 = 0x80186058; //segment:ast_radio_en type:u16 +D_en_8018607C = 0x8018607C; //segment:ast_radio_en type:u16 +D_en_80186094 = 0x80186094; //segment:ast_radio_en type:u16 +D_en_801860AC = 0x801860AC; //segment:ast_radio_en type:u16 +D_en_801860C4 = 0x801860C4; //segment:ast_radio_en type:u16 +D_en_801860DC = 0x801860DC; //segment:ast_radio_en type:u16 +D_en_80186118 = 0x80186118; //segment:ast_radio_en type:u16 +D_en_80186154 = 0x80186154; //segment:ast_radio_en type:u16 +D_en_8018616C = 0x8018616C; //segment:ast_radio_en type:u16 +D_en_801861C0 = 0x801861C0; //segment:ast_radio_en type:u16 +D_en_80186218 = 0x80186218; //segment:ast_radio_en type:u16 +D_en_80186264 = 0x80186264; //segment:ast_radio_en type:u16 +D_en_801862AC = 0x801862AC; //segment:ast_radio_en type:u16 +D_en_801862F4 = 0x801862F4; //segment:ast_radio_en type:u16 +D_en_80186340 = 0x80186340; //segment:ast_radio_en type:u16 +D_en_8018638C = 0x8018638C; //segment:ast_radio_en type:u16 +D_en_801863DC = 0x801863DC; //segment:ast_radio_en type:u16 +D_en_80186430 = 0x80186430; //segment:ast_radio_en type:u16 +D_en_8018647C = 0x8018647C; //segment:ast_radio_en type:u16 +D_en_801864C8 = 0x801864C8; //segment:ast_radio_en type:u16 +D_en_80186514 = 0x80186514; //segment:ast_radio_en type:u16 +D_en_80186558 = 0x80186558; //segment:ast_radio_en type:u16 +D_en_801865D8 = 0x801865D8; //segment:ast_radio_en type:u16 +D_en_8018663C = 0x8018663C; //segment:ast_radio_en type:u16 +D_en_80186678 = 0x80186678; //segment:ast_radio_en type:u16 +D_en_801866B8 = 0x801866B8; //segment:ast_radio_en type:u16 +D_en_801866E0 = 0x801866E0; //segment:ast_radio_en type:u16 +D_en_80186704 = 0x80186704; //segment:ast_radio_en type:u16 +D_en_80186724 = 0x80186724; //segment:ast_radio_en type:u16 +D_en_80186748 = 0x80186748; //segment:ast_radio_en type:u16 +D_en_80186770 = 0x80186770; //segment:ast_radio_en type:u16 +D_en_80186794 = 0x80186794; //segment:ast_radio_en type:u16 +D_en_801867B4 = 0x801867B4; //segment:ast_radio_en type:u16 +D_en_801867D8 = 0x801867D8; //segment:ast_radio_en type:u16 +D_en_80186800 = 0x80186800; //segment:ast_radio_en type:u16 +D_en_80186824 = 0x80186824; //segment:ast_radio_en type:u16 +D_en_80186844 = 0x80186844; //segment:ast_radio_en type:u16 +D_en_80186868 = 0x80186868; //segment:ast_radio_en type:u16 +D_en_8018687C = 0x8018687C; //segment:ast_radio_en type:u16 +D_en_80186890 = 0x80186890; //segment:ast_radio_en type:u16 +D_en_801868A4 = 0x801868A4; //segment:ast_radio_en type:u16 +D_en_801868B0 = 0x801868B0; //segment:ast_radio_en type:u16 +D_en_801868C8 = 0x801868C8; //segment:ast_radio_en type:u16 +D_en_801868E4 = 0x801868E4; //segment:ast_radio_en type:u16 +D_en_801868F4 = 0x801868F4; //segment:ast_radio_en type:u16 +D_en_80186908 = 0x80186908; //segment:ast_radio_en type:u16 +D_en_8018691C = 0x8018691C; //segment:ast_radio_en type:u16 +D_en_80186938 = 0x80186938; //segment:ast_radio_en type:u16 +D_en_80186948 = 0x80186948; //segment:ast_radio_en type:u16 +D_en_801869A0 = 0x801869A0; //segment:ast_radio_en type:u16 +D_en_801869B8 = 0x801869B8; //segment:ast_radio_en type:u16 +D_en_801869D4 = 0x801869D4; //segment:ast_radio_en type:u16 +D_en_801869EC = 0x801869EC; //segment:ast_radio_en type:u16 +D_en_80186A08 = 0x80186A08; //segment:ast_radio_en type:u16 +D_en_80186A24 = 0x80186A24; //segment:ast_radio_en type:u16 +D_en_80186A34 = 0x80186A34; //segment:ast_radio_en type:u16 +D_en_80186A50 = 0x80186A50; //segment:ast_radio_en type:u16 +D_en_80186A6C = 0x80186A6C; //segment:ast_radio_en type:u16 +D_en_80186A88 = 0x80186A88; //segment:ast_radio_en type:u16 +D_en_80186ACC = 0x80186ACC; //segment:ast_radio_en type:u16 +D_en_80186B34 = 0x80186B34; //segment:ast_radio_en type:u16 +D_en_80186B90 = 0x80186B90; //segment:ast_radio_en type:u16 +D_en_80186C08 = 0x80186C08; //segment:ast_radio_en type:u16 +D_en_80186C60 = 0x80186C60; //segment:ast_radio_en type:u16 +D_en_80186CB8 = 0x80186CB8; //segment:ast_radio_en type:u16 +D_en_80186D08 = 0x80186D08; //segment:ast_radio_en type:u16 +D_en_80186D58 = 0x80186D58; //segment:ast_radio_en type:u16 +D_en_80186DC4 = 0x80186DC4; //segment:ast_radio_en type:u16 +D_en_80186E1C = 0x80186E1C; //segment:ast_radio_en type:u16 +D_en_80186E7C = 0x80186E7C; //segment:ast_radio_en type:u16 +D_en_80186ED4 = 0x80186ED4; //segment:ast_radio_en type:u16 +D_en_80186F1C = 0x80186F1C; //segment:ast_radio_en type:u16 +D_en_80186F68 = 0x80186F68; //segment:ast_radio_en type:u16 +D_en_80186FB0 = 0x80186FB0; //segment:ast_radio_en type:u16 +D_en_80186FE0 = 0x80186FE0; //segment:ast_radio_en type:u16 +D_en_80187010 = 0x80187010; //segment:ast_radio_en type:u16 +D_en_80187058 = 0x80187058; //segment:ast_radio_en type:u16 +D_en_801870A0 = 0x801870A0; //segment:ast_radio_en type:u16 +D_en_801870DC = 0x801870DC; //segment:ast_radio_en type:u16 +D_en_80187128 = 0x80187128; //segment:ast_radio_en type:u16 +D_en_8018717C = 0x8018717C; //segment:ast_radio_en type:u16 +D_en_801871CC = 0x801871CC; //segment:ast_radio_en type:u16 +D_en_80187208 = 0x80187208; //segment:ast_radio_en type:u16 +D_en_80187268 = 0x80187268; //segment:ast_radio_en type:u16 +D_en_801872CC = 0x801872CC; //segment:ast_radio_en type:u16 +D_en_8018731C = 0x8018731C; //segment:ast_radio_en type:u16 +D_en_80187368 = 0x80187368; //segment:ast_radio_en type:u16 +D_en_801873A8 = 0x801873A8; //segment:ast_radio_en type:u16 +D_en_80187400 = 0x80187400; //segment:ast_radio_en type:u16 +D_en_80187460 = 0x80187460; //segment:ast_radio_en type:u16 +D_en_801874C8 = 0x801874C8; //segment:ast_radio_en type:u16 +D_en_8018751C = 0x8018751C; //segment:ast_radio_en + +D_de_8017B230 = 0x8017B230; //segment:ast_radio_de type:u16 +D_de_8017BA38 = 0x8017BA38; //segment:ast_radio_de type:u16 +D_de_8017BAA0 = 0x8017BAA0; //segment:ast_radio_de type:u16 +D_de_8017BAF0 = 0x8017BAF0; //segment:ast_radio_de type:u16 +D_de_8017BB3C = 0x8017BB3C; //segment:ast_radio_de type:u16 +D_de_8017BB9C = 0x8017BB9C; //segment:ast_radio_de type:u16 +D_de_8017BBF8 = 0x8017BBF8; //segment:ast_radio_de type:u16 +D_de_8017BC64 = 0x8017BC64; //segment:ast_radio_de type:u16 +D_de_8017BD04 = 0x8017BD04; //segment:ast_radio_de type:u16 +D_de_8017BD88 = 0x8017BD88; //segment:ast_radio_de type:u16 +D_de_8017BE04 = 0x8017BE04; //segment:ast_radio_de type:u16 +D_de_8017BE5C = 0x8017BE5C; //segment:ast_radio_de type:u16 +D_de_8017BEE4 = 0x8017BEE4; //segment:ast_radio_de type:u16 +D_de_8017BF3C = 0x8017BF3C; //segment:ast_radio_de type:u16 +D_de_8017BFC8 = 0x8017BFC8; //segment:ast_radio_de type:u16 +D_de_8017BFF8 = 0x8017BFF8; //segment:ast_radio_de type:u16 +D_de_8017C05C = 0x8017C05C; //segment:ast_radio_de type:u16 +D_de_8017C088 = 0x8017C088; //segment:ast_radio_de type:u16 +D_de_8017C0F8 = 0x8017C0F8; //segment:ast_radio_de type:u16 +D_de_8017C11C = 0x8017C11C; //segment:ast_radio_de type:u16 +D_de_8017C1AC = 0x8017C1AC; //segment:ast_radio_de type:u16 +D_de_8017C1E0 = 0x8017C1E0; //segment:ast_radio_de type:u16 +D_de_8017C260 = 0x8017C260; //segment:ast_radio_de type:u16 +D_de_8017C2B0 = 0x8017C2B0; //segment:ast_radio_de type:u16 +D_de_8017C320 = 0x8017C320; //segment:ast_radio_de type:u16 +D_de_8017C35C = 0x8017C35C; //segment:ast_radio_de type:u16 +D_de_8017C3C4 = 0x8017C3C4; //segment:ast_radio_de type:u16 +D_de_8017C404 = 0x8017C404; //segment:ast_radio_de type:u16 +D_de_8017C454 = 0x8017C454; //segment:ast_radio_de type:u16 +D_de_8017C478 = 0x8017C478; //segment:ast_radio_de type:u16 +D_de_8017C4DC = 0x8017C4DC; //segment:ast_radio_de type:u16 +D_de_8017C504 = 0x8017C504; //segment:ast_radio_de type:u16 +D_de_8017C554 = 0x8017C554; //segment:ast_radio_de type:u16 +D_de_8017C580 = 0x8017C580; //segment:ast_radio_de type:u16 +D_de_8017C608 = 0x8017C608; //segment:ast_radio_de type:u16 +D_de_8017C634 = 0x8017C634; //segment:ast_radio_de type:u16 +D_de_8017C65C = 0x8017C65C; //segment:ast_radio_de type:u16 +D_de_8017C69C = 0x8017C69C; //segment:ast_radio_de type:u16 +D_de_8017C6EC = 0x8017C6EC; //segment:ast_radio_de type:u16 +D_de_8017C740 = 0x8017C740; //segment:ast_radio_de type:u16 +D_de_8017C778 = 0x8017C778; //segment:ast_radio_de type:u16 +D_de_8017C7D8 = 0x8017C7D8; //segment:ast_radio_de type:u16 +D_de_8017C818 = 0x8017C818; //segment:ast_radio_de type:u16 +D_de_8017C84C = 0x8017C84C; //segment:ast_radio_de type:u16 +D_de_8017C8A8 = 0x8017C8A8; //segment:ast_radio_de type:u16 +D_de_8017C8CC = 0x8017C8CC; //segment:ast_radio_de type:u16 +D_de_8017C908 = 0x8017C908; //segment:ast_radio_de type:u16 +D_de_8017C91C = 0x8017C91C; //segment:ast_radio_de type:u16 +D_de_8017C950 = 0x8017C950; //segment:ast_radio_de type:u16 +D_de_8017C998 = 0x8017C998; //segment:ast_radio_de type:u16 +D_de_8017C9E8 = 0x8017C9E8; //segment:ast_radio_de type:u16 +D_de_8017CA48 = 0x8017CA48; //segment:ast_radio_de type:u16 +D_de_8017CA9C = 0x8017CA9C; //segment:ast_radio_de type:u16 +D_de_8017CB10 = 0x8017CB10; //segment:ast_radio_de type:u16 +D_de_8017CB6C = 0x8017CB6C; //segment:ast_radio_de type:u16 +D_de_8017CBC0 = 0x8017CBC0; //segment:ast_radio_de type:u16 +D_de_8017CBF8 = 0x8017CBF8; //segment:ast_radio_de type:u16 +D_de_8017CC1C = 0x8017CC1C; //segment:ast_radio_de type:u16 +D_de_8017CC5C = 0x8017CC5C; //segment:ast_radio_de type:u16 +D_de_8017CCCC = 0x8017CCCC; //segment:ast_radio_de type:u16 +D_de_8017CD08 = 0x8017CD08; //segment:ast_radio_de type:u16 +D_de_8017CD24 = 0x8017CD24; //segment:ast_radio_de type:u16 +D_de_8017CD54 = 0x8017CD54; //segment:ast_radio_de type:u16 +D_de_8017CDC8 = 0x8017CDC8; //segment:ast_radio_de type:u16 +D_de_8017CE04 = 0x8017CE04; //segment:ast_radio_de type:u16 +D_de_8017CE60 = 0x8017CE60; //segment:ast_radio_de type:u16 +D_de_8017CECC = 0x8017CECC; //segment:ast_radio_de type:u16 +D_de_8017CF1C = 0x8017CF1C; //segment:ast_radio_de type:u16 +D_de_8017CF5C = 0x8017CF5C; //segment:ast_radio_de type:u16 +D_de_8017CFC4 = 0x8017CFC4; //segment:ast_radio_de type:u16 +D_de_8017CFF4 = 0x8017CFF4; //segment:ast_radio_de type:u16 +D_de_8017D048 = 0x8017D048; //segment:ast_radio_de type:u16 +D_de_8017D05C = 0x8017D05C; //segment:ast_radio_de type:u16 +D_de_8017D0C8 = 0x8017D0C8; //segment:ast_radio_de type:u16 +D_de_8017D120 = 0x8017D120; //segment:ast_radio_de type:u16 +D_de_8017D16C = 0x8017D16C; //segment:ast_radio_de type:u16 +D_de_8017D1AC = 0x8017D1AC; //segment:ast_radio_de type:u16 +D_de_8017D1FC = 0x8017D1FC; //segment:ast_radio_de type:u16 +D_de_8017D218 = 0x8017D218; //segment:ast_radio_de type:u16 +D_de_8017D244 = 0x8017D244; //segment:ast_radio_de type:u16 +D_de_8017D280 = 0x8017D280; //segment:ast_radio_de type:u16 +D_de_8017D2D0 = 0x8017D2D0; //segment:ast_radio_de type:u16 +D_de_8017D32C = 0x8017D32C; //segment:ast_radio_de type:u16 +D_de_8017D370 = 0x8017D370; //segment:ast_radio_de type:u16 +D_de_8017D3DC = 0x8017D3DC; //segment:ast_radio_de type:u16 +D_de_8017D3F4 = 0x8017D3F4; //segment:ast_radio_de type:u16 +D_de_8017D454 = 0x8017D454; //segment:ast_radio_de type:u16 +D_de_8017D4A4 = 0x8017D4A4; //segment:ast_radio_de type:u16 +D_de_8017D50C = 0x8017D50C; //segment:ast_radio_de type:u16 +D_de_8017D574 = 0x8017D574; //segment:ast_radio_de type:u16 +D_de_8017D5D0 = 0x8017D5D0; //segment:ast_radio_de type:u16 +D_de_8017D61C = 0x8017D61C; //segment:ast_radio_de type:u16 +D_de_8017D660 = 0x8017D660; //segment:ast_radio_de type:u16 +D_de_8017D6B8 = 0x8017D6B8; //segment:ast_radio_de type:u16 +D_de_8017D6F4 = 0x8017D6F4; //segment:ast_radio_de type:u16 +D_de_8017D728 = 0x8017D728; //segment:ast_radio_de type:u16 +D_de_8017D768 = 0x8017D768; //segment:ast_radio_de type:u16 +D_de_8017D79C = 0x8017D79C; //segment:ast_radio_de type:u16 +D_de_8017D7E8 = 0x8017D7E8; //segment:ast_radio_de type:u16 +D_de_8017D820 = 0x8017D820; //segment:ast_radio_de type:u16 +D_de_8017D86C = 0x8017D86C; //segment:ast_radio_de type:u16 +D_de_8017D8BC = 0x8017D8BC; //segment:ast_radio_de type:u16 +D_de_8017D8F4 = 0x8017D8F4; //segment:ast_radio_de type:u16 +D_de_8017D928 = 0x8017D928; //segment:ast_radio_de type:u16 +D_de_8017D994 = 0x8017D994; //segment:ast_radio_de type:u16 +D_de_8017D9DC = 0x8017D9DC; //segment:ast_radio_de type:u16 +D_de_8017DA38 = 0x8017DA38; //segment:ast_radio_de type:u16 +D_de_8017DA74 = 0x8017DA74; //segment:ast_radio_de type:u16 +D_de_8017DAA0 = 0x8017DAA0; //segment:ast_radio_de type:u16 +D_de_8017DAE8 = 0x8017DAE8; //segment:ast_radio_de type:u16 +D_de_8017DB14 = 0x8017DB14; //segment:ast_radio_de type:u16 +D_de_8017DB78 = 0x8017DB78; //segment:ast_radio_de type:u16 +D_de_8017DBDC = 0x8017DBDC; //segment:ast_radio_de type:u16 +D_de_8017DC54 = 0x8017DC54; //segment:ast_radio_de type:u16 +D_de_8017DCB0 = 0x8017DCB0; //segment:ast_radio_de type:u16 +D_de_8017DD24 = 0x8017DD24; //segment:ast_radio_de type:u16 +D_de_8017DD78 = 0x8017DD78; //segment:ast_radio_de type:u16 +D_de_8017DDC8 = 0x8017DDC8; //segment:ast_radio_de type:u16 +D_de_8017DE1C = 0x8017DE1C; //segment:ast_radio_de type:u16 +D_de_8017DE60 = 0x8017DE60; //segment:ast_radio_de type:u16 +D_de_8017DEC0 = 0x8017DEC0; //segment:ast_radio_de type:u16 +D_de_8017DF1C = 0x8017DF1C; //segment:ast_radio_de type:u16 +D_de_8017DF6C = 0x8017DF6C; //segment:ast_radio_de type:u16 +D_de_8017DFCC = 0x8017DFCC; //segment:ast_radio_de type:u16 +D_de_8017DFF8 = 0x8017DFF8; //segment:ast_radio_de type:u16 +D_de_8017E030 = 0x8017E030; //segment:ast_radio_de type:u16 +D_de_8017E084 = 0x8017E084; //segment:ast_radio_de type:u16 +D_de_8017E0E0 = 0x8017E0E0; //segment:ast_radio_de type:u16 +D_de_8017E100 = 0x8017E100; //segment:ast_radio_de type:u16 +D_de_8017E154 = 0x8017E154; //segment:ast_radio_de type:u16 +D_de_8017E170 = 0x8017E170; //segment:ast_radio_de type:u16 +D_de_8017E1D8 = 0x8017E1D8; //segment:ast_radio_de type:u16 +D_de_8017E208 = 0x8017E208; //segment:ast_radio_de type:u16 +D_de_8017E234 = 0x8017E234; //segment:ast_radio_de type:u16 +D_de_8017E264 = 0x8017E264; //segment:ast_radio_de type:u16 +D_de_8017E2B8 = 0x8017E2B8; //segment:ast_radio_de type:u16 +D_de_8017E2E0 = 0x8017E2E0; //segment:ast_radio_de type:u16 +D_de_8017E338 = 0x8017E338; //segment:ast_radio_de type:u16 +D_de_8017E370 = 0x8017E370; //segment:ast_radio_de type:u16 +D_de_8017E3D0 = 0x8017E3D0; //segment:ast_radio_de type:u16 +D_de_8017E434 = 0x8017E434; //segment:ast_radio_de type:u16 +D_de_8017E46C = 0x8017E46C; //segment:ast_radio_de type:u16 +D_de_8017E4DC = 0x8017E4DC; //segment:ast_radio_de type:u16 +D_de_8017E51C = 0x8017E51C; //segment:ast_radio_de type:u16 +D_de_8017E57C = 0x8017E57C; //segment:ast_radio_de type:u16 +D_de_8017E5DC = 0x8017E5DC; //segment:ast_radio_de type:u16 +D_de_8017E650 = 0x8017E650; //segment:ast_radio_de type:u16 +D_de_8017E6B4 = 0x8017E6B4; //segment:ast_radio_de type:u16 +D_de_8017E6C8 = 0x8017E6C8; //segment:ast_radio_de type:u16 +D_de_8017E710 = 0x8017E710; //segment:ast_radio_de type:u16 +D_de_8017E748 = 0x8017E748; //segment:ast_radio_de type:u16 +D_de_8017E79C = 0x8017E79C; //segment:ast_radio_de type:u16 +D_de_8017E7D4 = 0x8017E7D4; //segment:ast_radio_de type:u16 +D_de_8017E848 = 0x8017E848; //segment:ast_radio_de type:u16 +D_de_8017E87C = 0x8017E87C; //segment:ast_radio_de type:u16 +D_de_8017E8B4 = 0x8017E8B4; //segment:ast_radio_de type:u16 +D_de_8017E920 = 0x8017E920; //segment:ast_radio_de type:u16 +D_de_8017E954 = 0x8017E954; //segment:ast_radio_de type:u16 +D_de_8017E9B8 = 0x8017E9B8; //segment:ast_radio_de type:u16 +D_de_8017E9D4 = 0x8017E9D4; //segment:ast_radio_de type:u16 +D_de_8017EA3C = 0x8017EA3C; //segment:ast_radio_de type:u16 +D_de_8017EAA8 = 0x8017EAA8; //segment:ast_radio_de type:u16 +D_de_8017EB04 = 0x8017EB04; //segment:ast_radio_de type:u16 +D_de_8017EB38 = 0x8017EB38; //segment:ast_radio_de type:u16 +D_de_8017EB8C = 0x8017EB8C; //segment:ast_radio_de type:u16 +D_de_8017EBF0 = 0x8017EBF0; //segment:ast_radio_de type:u16 +D_de_8017EC5C = 0x8017EC5C; //segment:ast_radio_de type:u16 +D_de_8017ECD4 = 0x8017ECD4; //segment:ast_radio_de type:u16 +D_de_8017ED20 = 0x8017ED20; //segment:ast_radio_de type:u16 +D_de_8017ED58 = 0x8017ED58; //segment:ast_radio_de type:u16 +D_de_8017ED88 = 0x8017ED88; //segment:ast_radio_de type:u16 +D_de_8017EDB0 = 0x8017EDB0; //segment:ast_radio_de type:u16 +D_de_8017EDE4 = 0x8017EDE4; //segment:ast_radio_de type:u16 +D_de_8017EE3C = 0x8017EE3C; //segment:ast_radio_de type:u16 +D_de_8017EE90 = 0x8017EE90; //segment:ast_radio_de type:u16 +D_de_8017EED0 = 0x8017EED0; //segment:ast_radio_de type:u16 +D_de_8017EF30 = 0x8017EF30; //segment:ast_radio_de type:u16 +D_de_8017EF68 = 0x8017EF68; //segment:ast_radio_de type:u16 +D_de_8017EF98 = 0x8017EF98; //segment:ast_radio_de type:u16 +D_de_8017EFE0 = 0x8017EFE0; //segment:ast_radio_de type:u16 +D_de_8017F008 = 0x8017F008; //segment:ast_radio_de type:u16 +D_de_8017F038 = 0x8017F038; //segment:ast_radio_de type:u16 +D_de_8017F064 = 0x8017F064; //segment:ast_radio_de type:u16 +D_de_8017F090 = 0x8017F090; //segment:ast_radio_de type:u16 +D_de_8017F0B8 = 0x8017F0B8; //segment:ast_radio_de type:u16 +D_de_8017F0F4 = 0x8017F0F4; //segment:ast_radio_de type:u16 +D_de_8017F15C = 0x8017F15C; //segment:ast_radio_de type:u16 +D_de_8017F1A8 = 0x8017F1A8; //segment:ast_radio_de type:u16 +D_de_8017F200 = 0x8017F200; //segment:ast_radio_de type:u16 +D_de_8017F258 = 0x8017F258; //segment:ast_radio_de type:u16 +D_de_8017F28C = 0x8017F28C; //segment:ast_radio_de type:u16 +D_de_8017F2CC = 0x8017F2CC; //segment:ast_radio_de type:u16 +D_de_8017F2FC = 0x8017F2FC; //segment:ast_radio_de type:u16 +D_de_8017F360 = 0x8017F360; //segment:ast_radio_de type:u16 +D_de_8017F384 = 0x8017F384; //segment:ast_radio_de type:u16 +D_de_8017F3B4 = 0x8017F3B4; //segment:ast_radio_de type:u16 +D_de_8017F414 = 0x8017F414; //segment:ast_radio_de type:u16 +D_de_8017F468 = 0x8017F468; //segment:ast_radio_de type:u16 +D_de_8017F4B0 = 0x8017F4B0; //segment:ast_radio_de type:u16 +D_de_8017F500 = 0x8017F500; //segment:ast_radio_de type:u16 +D_de_8017F544 = 0x8017F544; //segment:ast_radio_de type:u16 +D_de_8017F590 = 0x8017F590; //segment:ast_radio_de type:u16 +D_de_8017F5D4 = 0x8017F5D4; //segment:ast_radio_de type:u16 +D_de_8017F624 = 0x8017F624; //segment:ast_radio_de type:u16 +D_de_8017F65C = 0x8017F65C; //segment:ast_radio_de type:u16 +D_de_8017F6CC = 0x8017F6CC; //segment:ast_radio_de type:u16 +D_de_8017F710 = 0x8017F710; //segment:ast_radio_de type:u16 +D_de_8017F74C = 0x8017F74C; //segment:ast_radio_de type:u16 +D_de_8017F794 = 0x8017F794; //segment:ast_radio_de type:u16 +D_de_8017F7F4 = 0x8017F7F4; //segment:ast_radio_de type:u16 +D_de_8017F854 = 0x8017F854; //segment:ast_radio_de type:u16 +D_de_8017F894 = 0x8017F894; //segment:ast_radio_de type:u16 +D_de_8017F8A4 = 0x8017F8A4; //segment:ast_radio_de type:u16 +D_de_8017F8CC = 0x8017F8CC; //segment:ast_radio_de type:u16 +D_de_8017F91C = 0x8017F91C; //segment:ast_radio_de type:u16 +D_de_8017F974 = 0x8017F974; //segment:ast_radio_de type:u16 +D_de_8017F990 = 0x8017F990; //segment:ast_radio_de type:u16 +D_de_8017F9D4 = 0x8017F9D4; //segment:ast_radio_de type:u16 +D_de_8017FA18 = 0x8017FA18; //segment:ast_radio_de type:u16 +D_de_8017FA5C = 0x8017FA5C; //segment:ast_radio_de type:u16 +D_de_8017FA90 = 0x8017FA90; //segment:ast_radio_de type:u16 +D_de_8017FB00 = 0x8017FB00; //segment:ast_radio_de type:u16 +D_de_8017FB60 = 0x8017FB60; //segment:ast_radio_de type:u16 +D_de_8017FBA8 = 0x8017FBA8; //segment:ast_radio_de type:u16 +D_de_8017FC00 = 0x8017FC00; //segment:ast_radio_de type:u16 +D_de_8017FC20 = 0x8017FC20; //segment:ast_radio_de type:u16 +D_de_8017FC40 = 0x8017FC40; //segment:ast_radio_de type:u16 +D_de_8017FC84 = 0x8017FC84; //segment:ast_radio_de type:u16 +D_de_8017FCC4 = 0x8017FCC4; //segment:ast_radio_de type:u16 +D_de_8017FD00 = 0x8017FD00; //segment:ast_radio_de type:u16 +D_de_8017FD24 = 0x8017FD24; //segment:ast_radio_de type:u16 +D_de_8017FD78 = 0x8017FD78; //segment:ast_radio_de type:u16 +D_de_8017FDB0 = 0x8017FDB0; //segment:ast_radio_de type:u16 +D_de_8017FDF0 = 0x8017FDF0; //segment:ast_radio_de type:u16 +D_de_8017FE48 = 0x8017FE48; //segment:ast_radio_de type:u16 +D_de_8017FE8C = 0x8017FE8C; //segment:ast_radio_de type:u16 +D_de_8017FEFC = 0x8017FEFC; //segment:ast_radio_de type:u16 +D_de_8017FF40 = 0x8017FF40; //segment:ast_radio_de type:u16 +D_de_8017FF68 = 0x8017FF68; //segment:ast_radio_de type:u16 +D_de_8017FFC8 = 0x8017FFC8; //segment:ast_radio_de type:u16 +D_de_80180000 = 0x80180000; //segment:ast_radio_de type:u16 +D_de_80180040 = 0x80180040; //segment:ast_radio_de type:u16 +D_de_8018009C = 0x8018009C; //segment:ast_radio_de type:u16 +D_de_801800D0 = 0x801800D0; //segment:ast_radio_de type:u16 +D_de_801800F8 = 0x801800F8; //segment:ast_radio_de type:u16 +D_de_80180158 = 0x80180158; //segment:ast_radio_de type:u16 +D_de_801801BC = 0x801801BC; //segment:ast_radio_de type:u16 +D_de_80180210 = 0x80180210; //segment:ast_radio_de type:u16 +D_de_80180280 = 0x80180280; //segment:ast_radio_de type:u16 +D_de_801802E8 = 0x801802E8; //segment:ast_radio_de type:u16 +D_de_80180334 = 0x80180334; //segment:ast_radio_de type:u16 +D_de_8018039C = 0x8018039C; //segment:ast_radio_de type:u16 +D_de_801803E0 = 0x801803E0; //segment:ast_radio_de type:u16 +D_de_80180414 = 0x80180414; //segment:ast_radio_de type:u16 +D_de_80180430 = 0x80180430; //segment:ast_radio_de type:u16 +D_de_80180490 = 0x80180490; //segment:ast_radio_de type:u16 +D_de_801804E8 = 0x801804E8; //segment:ast_radio_de type:u16 +D_de_80180534 = 0x80180534; //segment:ast_radio_de type:u16 +D_de_801805A4 = 0x801805A4; //segment:ast_radio_de type:u16 +D_de_801805EC = 0x801805EC; //segment:ast_radio_de type:u16 +D_de_8018063C = 0x8018063C; //segment:ast_radio_de type:u16 +D_de_80180680 = 0x80180680; //segment:ast_radio_de type:u16 +D_de_801806D0 = 0x801806D0; //segment:ast_radio_de type:u16 +D_de_801806F4 = 0x801806F4; //segment:ast_radio_de type:u16 +D_de_8018075C = 0x8018075C; //segment:ast_radio_de type:u16 +D_de_801807C4 = 0x801807C4; //segment:ast_radio_de type:u16 +D_de_8018082C = 0x8018082C; //segment:ast_radio_de type:u16 +D_de_80180874 = 0x80180874; //segment:ast_radio_de type:u16 +D_de_801808C4 = 0x801808C4; //segment:ast_radio_de type:u16 +D_de_80180928 = 0x80180928; //segment:ast_radio_de type:u16 +D_de_80180974 = 0x80180974; //segment:ast_radio_de type:u16 +D_de_8018099C = 0x8018099C; //segment:ast_radio_de type:u16 +D_de_801809DC = 0x801809DC; //segment:ast_radio_de type:u16 +D_de_80180A14 = 0x80180A14; //segment:ast_radio_de type:u16 +D_de_80180A88 = 0x80180A88; //segment:ast_radio_de type:u16 +D_de_80180ADC = 0x80180ADC; //segment:ast_radio_de type:u16 +D_de_80180B10 = 0x80180B10; //segment:ast_radio_de type:u16 +D_de_80180B54 = 0x80180B54; //segment:ast_radio_de type:u16 +D_de_80180B9C = 0x80180B9C; //segment:ast_radio_de type:u16 +D_de_80180C00 = 0x80180C00; //segment:ast_radio_de type:u16 +D_de_80180C54 = 0x80180C54; //segment:ast_radio_de type:u16 +D_de_80180C64 = 0x80180C64; //segment:ast_radio_de type:u16 +D_de_80180C74 = 0x80180C74; //segment:ast_radio_de type:u16 +D_de_80180C84 = 0x80180C84; //segment:ast_radio_de type:u16 +D_de_80180CD4 = 0x80180CD4; //segment:ast_radio_de type:u16 +D_de_80180D2C = 0x80180D2C; //segment:ast_radio_de type:u16 +D_de_80180D78 = 0x80180D78; //segment:ast_radio_de type:u16 +D_de_80180DE4 = 0x80180DE4; //segment:ast_radio_de type:u16 +D_de_80180E14 = 0x80180E14; //segment:ast_radio_de type:u16 +D_de_80180E50 = 0x80180E50; //segment:ast_radio_de type:u16 +D_de_80180EC4 = 0x80180EC4; //segment:ast_radio_de type:u16 +D_de_80180F10 = 0x80180F10; //segment:ast_radio_de type:u16 +D_de_80180F74 = 0x80180F74; //segment:ast_radio_de type:u16 +D_de_80180FB8 = 0x80180FB8; //segment:ast_radio_de type:u16 +D_de_80181004 = 0x80181004; //segment:ast_radio_de type:u16 +D_de_8018106C = 0x8018106C; //segment:ast_radio_de type:u16 +D_de_801810C0 = 0x801810C0; //segment:ast_radio_de type:u16 +D_de_80181110 = 0x80181110; //segment:ast_radio_de type:u16 +D_de_80181154 = 0x80181154; //segment:ast_radio_de type:u16 +D_de_80181194 = 0x80181194; //segment:ast_radio_de type:u16 +D_de_801811CC = 0x801811CC; //segment:ast_radio_de type:u16 +D_de_80181218 = 0x80181218; //segment:ast_radio_de type:u16 +D_de_80181278 = 0x80181278; //segment:ast_radio_de type:u16 +D_de_801812B0 = 0x801812B0; //segment:ast_radio_de type:u16 +D_de_80181318 = 0x80181318; //segment:ast_radio_de type:u16 +D_de_80181374 = 0x80181374; //segment:ast_radio_de type:u16 +D_de_801813C4 = 0x801813C4; //segment:ast_radio_de type:u16 +D_de_80181414 = 0x80181414; //segment:ast_radio_de type:u16 +D_de_80181450 = 0x80181450; //segment:ast_radio_de type:u16 +D_de_8018147C = 0x8018147C; //segment:ast_radio_de type:u16 +D_de_801814A0 = 0x801814A0; //segment:ast_radio_de type:u16 +D_de_801814E8 = 0x801814E8; //segment:ast_radio_de type:u16 +D_de_80181520 = 0x80181520; //segment:ast_radio_de type:u16 +D_de_80181544 = 0x80181544; //segment:ast_radio_de type:u16 +D_de_80181598 = 0x80181598; //segment:ast_radio_de type:u16 +D_de_80181600 = 0x80181600; //segment:ast_radio_de type:u16 +D_de_80181660 = 0x80181660; //segment:ast_radio_de type:u16 +D_de_8018169C = 0x8018169C; //segment:ast_radio_de type:u16 +D_de_801816E8 = 0x801816E8; //segment:ast_radio_de type:u16 +D_de_80181744 = 0x80181744; //segment:ast_radio_de type:u16 +D_de_8018179C = 0x8018179C; //segment:ast_radio_de type:u16 +D_de_80181804 = 0x80181804; //segment:ast_radio_de type:u16 +D_de_8018185C = 0x8018185C; //segment:ast_radio_de type:u16 +D_de_8018189C = 0x8018189C; //segment:ast_radio_de type:u16 +D_de_801818EC = 0x801818EC; //segment:ast_radio_de type:u16 +D_de_80181908 = 0x80181908; //segment:ast_radio_de type:u16 +D_de_80181968 = 0x80181968; //segment:ast_radio_de type:u16 +D_de_801819BC = 0x801819BC; //segment:ast_radio_de type:u16 +D_de_80181A04 = 0x80181A04; //segment:ast_radio_de type:u16 +D_de_80181A64 = 0x80181A64; //segment:ast_radio_de type:u16 +D_de_80181AB0 = 0x80181AB0; //segment:ast_radio_de type:u16 +D_de_80181AFC = 0x80181AFC; //segment:ast_radio_de type:u16 +D_de_80181B48 = 0x80181B48; //segment:ast_radio_de type:u16 +D_de_80181B8C = 0x80181B8C; //segment:ast_radio_de type:u16 +D_de_80181BD0 = 0x80181BD0; //segment:ast_radio_de type:u16 +D_de_80181C20 = 0x80181C20; //segment:ast_radio_de type:u16 +D_de_80181C44 = 0x80181C44; //segment:ast_radio_de type:u16 +D_de_80181C68 = 0x80181C68; //segment:ast_radio_de type:u16 +D_de_80181CB8 = 0x80181CB8; //segment:ast_radio_de type:u16 +D_de_80181D08 = 0x80181D08; //segment:ast_radio_de type:u16 +D_de_80181D84 = 0x80181D84; //segment:ast_radio_de type:u16 +D_de_80181DD8 = 0x80181DD8; //segment:ast_radio_de type:u16 +D_de_80181E1C = 0x80181E1C; //segment:ast_radio_de type:u16 +D_de_80181E60 = 0x80181E60; //segment:ast_radio_de type:u16 +D_de_80181EA4 = 0x80181EA4; //segment:ast_radio_de type:u16 +D_de_80181EF4 = 0x80181EF4; //segment:ast_radio_de type:u16 +D_de_80181F4C = 0x80181F4C; //segment:ast_radio_de type:u16 +D_de_80181F8C = 0x80181F8C; //segment:ast_radio_de type:u16 +D_de_80181FF4 = 0x80181FF4; //segment:ast_radio_de type:u16 +D_de_80182028 = 0x80182028; //segment:ast_radio_de type:u16 +D_de_80182068 = 0x80182068; //segment:ast_radio_de type:u16 +D_de_80182090 = 0x80182090; //segment:ast_radio_de type:u16 +D_de_801820BC = 0x801820BC; //segment:ast_radio_de type:u16 +D_de_80182124 = 0x80182124; //segment:ast_radio_de type:u16 +D_de_80182168 = 0x80182168; //segment:ast_radio_de type:u16 +D_de_801821C0 = 0x801821C0; //segment:ast_radio_de type:u16 +D_de_801821F8 = 0x801821F8; //segment:ast_radio_de type:u16 +D_de_8018223C = 0x8018223C; //segment:ast_radio_de type:u16 +D_de_80182280 = 0x80182280; //segment:ast_radio_de type:u16 +D_de_801822C4 = 0x801822C4; //segment:ast_radio_de type:u16 +D_de_80182334 = 0x80182334; //segment:ast_radio_de type:u16 +D_de_80182394 = 0x80182394; //segment:ast_radio_de type:u16 +D_de_801823C0 = 0x801823C0; //segment:ast_radio_de type:u16 +D_de_801823F0 = 0x801823F0; //segment:ast_radio_de type:u16 +D_de_80182444 = 0x80182444; //segment:ast_radio_de type:u16 +D_de_801824B0 = 0x801824B0; //segment:ast_radio_de type:u16 +D_de_80182500 = 0x80182500; //segment:ast_radio_de type:u16 +D_de_80182558 = 0x80182558; //segment:ast_radio_de type:u16 +D_de_8018256C = 0x8018256C; //segment:ast_radio_de type:u16 +D_de_801825B4 = 0x801825B4; //segment:ast_radio_de type:u16 +D_de_80182604 = 0x80182604; //segment:ast_radio_de type:u16 +D_de_80182640 = 0x80182640; //segment:ast_radio_de type:u16 +D_de_80182698 = 0x80182698; //segment:ast_radio_de type:u16 +D_de_801826E0 = 0x801826E0; //segment:ast_radio_de type:u16 +D_de_80182750 = 0x80182750; //segment:ast_radio_de type:u16 +D_de_801827A0 = 0x801827A0; //segment:ast_radio_de type:u16 +D_de_801827F0 = 0x801827F0; //segment:ast_radio_de type:u16 +D_de_80182850 = 0x80182850; //segment:ast_radio_de type:u16 +D_de_801828C0 = 0x801828C0; //segment:ast_radio_de type:u16 +D_de_80182910 = 0x80182910; //segment:ast_radio_de type:u16 +D_de_8018295C = 0x8018295C; //segment:ast_radio_de type:u16 +D_de_80182998 = 0x80182998; //segment:ast_radio_de type:u16 +D_de_801829C4 = 0x801829C4; //segment:ast_radio_de type:u16 +D_de_80182A10 = 0x80182A10; //segment:ast_radio_de type:u16 +D_de_80182A4C = 0x80182A4C; //segment:ast_radio_de type:u16 +D_de_80182A90 = 0x80182A90; //segment:ast_radio_de type:u16 +D_de_80182AEC = 0x80182AEC; //segment:ast_radio_de type:u16 +D_de_80182B4C = 0x80182B4C; //segment:ast_radio_de type:u16 +D_de_80182BB0 = 0x80182BB0; //segment:ast_radio_de type:u16 +D_de_80182BF8 = 0x80182BF8; //segment:ast_radio_de type:u16 +D_de_80182C40 = 0x80182C40; //segment:ast_radio_de type:u16 +D_de_80182C6C = 0x80182C6C; //segment:ast_radio_de type:u16 +D_de_80182CD0 = 0x80182CD0; //segment:ast_radio_de type:u16 +D_de_80182D20 = 0x80182D20; //segment:ast_radio_de type:u16 +D_de_80182D64 = 0x80182D64; //segment:ast_radio_de type:u16 +D_de_80182DB0 = 0x80182DB0; //segment:ast_radio_de type:u16 +D_de_80182E10 = 0x80182E10; //segment:ast_radio_de type:u16 +D_de_80182E58 = 0x80182E58; //segment:ast_radio_de type:u16 +D_de_80182EA8 = 0x80182EA8; //segment:ast_radio_de type:u16 +D_de_80182EE8 = 0x80182EE8; //segment:ast_radio_de type:u16 +D_de_80182F44 = 0x80182F44; //segment:ast_radio_de type:u16 +D_de_80182F9C = 0x80182F9C; //segment:ast_radio_de type:u16 +D_de_80182FF0 = 0x80182FF0; //segment:ast_radio_de type:u16 +D_de_80183028 = 0x80183028; //segment:ast_radio_de type:u16 +D_de_80183068 = 0x80183068; //segment:ast_radio_de type:u16 +D_de_801830B0 = 0x801830B0; //segment:ast_radio_de type:u16 +D_de_801830F8 = 0x801830F8; //segment:ast_radio_de type:u16 +D_de_80183144 = 0x80183144; //segment:ast_radio_de type:u16 +D_de_80183198 = 0x80183198; //segment:ast_radio_de type:u16 +D_de_80183204 = 0x80183204; //segment:ast_radio_de type:u16 +D_de_8018325C = 0x8018325C; //segment:ast_radio_de type:u16 +D_de_80183290 = 0x80183290; //segment:ast_radio_de type:u16 +D_de_801832DC = 0x801832DC; //segment:ast_radio_de type:u16 +D_de_80183320 = 0x80183320; //segment:ast_radio_de type:u16 +D_de_80183378 = 0x80183378; //segment:ast_radio_de type:u16 +D_de_801833DC = 0x801833DC; //segment:ast_radio_de type:u16 +D_de_80183420 = 0x80183420; //segment:ast_radio_de type:u16 +D_de_80183450 = 0x80183450; //segment:ast_radio_de type:u16 +D_de_80183490 = 0x80183490; //segment:ast_radio_de type:u16 +D_de_801834D4 = 0x801834D4; //segment:ast_radio_de type:u16 +D_de_80183520 = 0x80183520; //segment:ast_radio_de type:u16 +D_de_8018355C = 0x8018355C; //segment:ast_radio_de type:u16 +D_de_80183598 = 0x80183598; //segment:ast_radio_de type:u16 +D_de_801835FC = 0x801835FC; //segment:ast_radio_de type:u16 +D_de_80183630 = 0x80183630; //segment:ast_radio_de type:u16 +D_de_80183654 = 0x80183654; //segment:ast_radio_de type:u16 +D_de_8018369C = 0x8018369C; //segment:ast_radio_de type:u16 +D_de_801836F4 = 0x801836F4; //segment:ast_radio_de type:u16 +D_de_8018374C = 0x8018374C; //segment:ast_radio_de type:u16 +D_de_801837B8 = 0x801837B8; //segment:ast_radio_de type:u16 +D_de_801837E4 = 0x801837E4; //segment:ast_radio_de type:u16 +D_de_80183828 = 0x80183828; //segment:ast_radio_de type:u16 +D_de_8018387C = 0x8018387C; //segment:ast_radio_de type:u16 +D_de_801838D4 = 0x801838D4; //segment:ast_radio_de type:u16 +D_de_80183930 = 0x80183930; //segment:ast_radio_de type:u16 +D_de_8018396C = 0x8018396C; //segment:ast_radio_de type:u16 +D_de_8018398C = 0x8018398C; //segment:ast_radio_de type:u16 +D_de_801839D0 = 0x801839D0; //segment:ast_radio_de type:u16 +D_de_80183A1C = 0x80183A1C; //segment:ast_radio_de type:u16 +D_de_80183A5C = 0x80183A5C; //segment:ast_radio_de type:u16 +D_de_80183A88 = 0x80183A88; //segment:ast_radio_de type:u16 +D_de_80183AB4 = 0x80183AB4; //segment:ast_radio_de type:u16 +D_de_80183B00 = 0x80183B00; //segment:ast_radio_de type:u16 +D_de_80183B60 = 0x80183B60; //segment:ast_radio_de type:u16 +D_de_80183B98 = 0x80183B98; //segment:ast_radio_de type:u16 +D_de_80183C04 = 0x80183C04; //segment:ast_radio_de type:u16 +D_de_80183C40 = 0x80183C40; //segment:ast_radio_de type:u16 +D_de_80183C90 = 0x80183C90; //segment:ast_radio_de type:u16 +D_de_80183CE4 = 0x80183CE4; //segment:ast_radio_de type:u16 +D_de_80183D28 = 0x80183D28; //segment:ast_radio_de type:u16 +D_de_80183D80 = 0x80183D80; //segment:ast_radio_de type:u16 +D_de_80183DC0 = 0x80183DC0; //segment:ast_radio_de type:u16 +D_de_80183E18 = 0x80183E18; //segment:ast_radio_de type:u16 +D_de_80183E4C = 0x80183E4C; //segment:ast_radio_de type:u16 +D_de_80183E78 = 0x80183E78; //segment:ast_radio_de type:u16 +D_de_80183EAC = 0x80183EAC; //segment:ast_radio_de type:u16 +D_de_80183EE0 = 0x80183EE0; //segment:ast_radio_de type:u16 +D_de_80183F24 = 0x80183F24; //segment:ast_radio_de type:u16 +D_de_80183F88 = 0x80183F88; //segment:ast_radio_de type:u16 +D_de_80183FE0 = 0x80183FE0; //segment:ast_radio_de type:u16 +D_de_80184000 = 0x80184000; //segment:ast_radio_de type:u16 +D_de_80184044 = 0x80184044; //segment:ast_radio_de type:u16 +D_de_80184088 = 0x80184088; //segment:ast_radio_de type:u16 +D_de_801840D8 = 0x801840D8; //segment:ast_radio_de type:u16 +D_de_80184120 = 0x80184120; //segment:ast_radio_de type:u16 +D_de_80184174 = 0x80184174; //segment:ast_radio_de type:u16 +D_de_801841BC = 0x801841BC; //segment:ast_radio_de type:u16 +D_de_8018421C = 0x8018421C; //segment:ast_radio_de type:u16 +D_de_80184260 = 0x80184260; //segment:ast_radio_de type:u16 +D_de_8018428C = 0x8018428C; //segment:ast_radio_de type:u16 +D_de_801842E4 = 0x801842E4; //segment:ast_radio_de type:u16 +D_de_80184324 = 0x80184324; //segment:ast_radio_de type:u16 +D_de_80184384 = 0x80184384; //segment:ast_radio_de type:u16 +D_de_801843B0 = 0x801843B0; //segment:ast_radio_de type:u16 +D_de_801843E0 = 0x801843E0; //segment:ast_radio_de type:u16 +D_de_80184410 = 0x80184410; //segment:ast_radio_de type:u16 +D_de_80184448 = 0x80184448; //segment:ast_radio_de type:u16 +D_de_8018449C = 0x8018449C; //segment:ast_radio_de type:u16 +D_de_801844CC = 0x801844CC; //segment:ast_radio_de type:u16 +D_de_80184518 = 0x80184518; //segment:ast_radio_de type:u16 +D_de_80184564 = 0x80184564; //segment:ast_radio_de type:u16 +D_de_801845C8 = 0x801845C8; //segment:ast_radio_de type:u16 +D_de_801845E4 = 0x801845E4; //segment:ast_radio_de type:u16 +D_de_80184618 = 0x80184618; //segment:ast_radio_de type:u16 +D_de_8018464C = 0x8018464C; //segment:ast_radio_de type:u16 +D_de_801846AC = 0x801846AC; //segment:ast_radio_de type:u16 +D_de_801846E8 = 0x801846E8; //segment:ast_radio_de type:u16 +D_de_80184738 = 0x80184738; //segment:ast_radio_de type:u16 +D_de_80184794 = 0x80184794; //segment:ast_radio_de type:u16 +D_de_801847F8 = 0x801847F8; //segment:ast_radio_de type:u16 +D_de_80184864 = 0x80184864; //segment:ast_radio_de type:u16 +D_de_801848B4 = 0x801848B4; //segment:ast_radio_de type:u16 +D_de_80184908 = 0x80184908; //segment:ast_radio_de type:u16 +D_de_80184980 = 0x80184980; //segment:ast_radio_de type:u16 +D_de_801849C0 = 0x801849C0; //segment:ast_radio_de type:u16 +D_de_80184A1C = 0x80184A1C; //segment:ast_radio_de type:u16 +D_de_80184A70 = 0x80184A70; //segment:ast_radio_de type:u16 +D_de_80184A98 = 0x80184A98; //segment:ast_radio_de type:u16 +D_de_80184AFC = 0x80184AFC; //segment:ast_radio_de type:u16 +D_de_80184B54 = 0x80184B54; //segment:ast_radio_de type:u16 +D_de_80184BBC = 0x80184BBC; //segment:ast_radio_de type:u16 +D_de_80184C34 = 0x80184C34; //segment:ast_radio_de type:u16 +D_de_80184CA0 = 0x80184CA0; //segment:ast_radio_de type:u16 +D_de_80184CF0 = 0x80184CF0; //segment:ast_radio_de type:u16 +D_de_80184D38 = 0x80184D38; //segment:ast_radio_de type:u16 +D_de_80184D90 = 0x80184D90; //segment:ast_radio_de type:u16 +D_de_80184DD4 = 0x80184DD4; //segment:ast_radio_de type:u16 +D_de_80184DEC = 0x80184DEC; //segment:ast_radio_de type:u16 +D_de_80184E44 = 0x80184E44; //segment:ast_radio_de type:u16 +D_de_80184E9C = 0x80184E9C; //segment:ast_radio_de type:u16 +D_de_80184F08 = 0x80184F08; //segment:ast_radio_de type:u16 +D_de_80184F34 = 0x80184F34; //segment:ast_radio_de type:u16 +D_de_80184F50 = 0x80184F50; //segment:ast_radio_de type:u16 +D_de_80184F84 = 0x80184F84; //segment:ast_radio_de type:u16 +D_de_80184FBC = 0x80184FBC; //segment:ast_radio_de type:u16 +D_de_80184FE4 = 0x80184FE4; //segment:ast_radio_de type:u16 +D_de_80185024 = 0x80185024; //segment:ast_radio_de type:u16 +D_de_80185064 = 0x80185064; //segment:ast_radio_de type:u16 +D_de_8018507C = 0x8018507C; //segment:ast_radio_de type:u16 +D_de_801850B8 = 0x801850B8; //segment:ast_radio_de type:u16 +D_de_80185114 = 0x80185114; //segment:ast_radio_de type:u16 +D_de_8018512C = 0x8018512C; //segment:ast_radio_de type:u16 +D_de_80185184 = 0x80185184; //segment:ast_radio_de type:u16 +D_de_801851C0 = 0x801851C0; //segment:ast_radio_de type:u16 +D_de_80185228 = 0x80185228; //segment:ast_radio_de type:u16 +D_de_80185260 = 0x80185260; //segment:ast_radio_de type:u16 +D_de_801852D4 = 0x801852D4; //segment:ast_radio_de type:u16 +D_de_80185338 = 0x80185338; //segment:ast_radio_de type:u16 +D_de_80185374 = 0x80185374; //segment:ast_radio_de type:u16 +D_de_801853C0 = 0x801853C0; //segment:ast_radio_de type:u16 +D_de_80185428 = 0x80185428; //segment:ast_radio_de type:u16 +D_de_80185460 = 0x80185460; //segment:ast_radio_de type:u16 +D_de_801854CC = 0x801854CC; //segment:ast_radio_de type:u16 +D_de_80185518 = 0x80185518; //segment:ast_radio_de type:u16 +D_de_80185560 = 0x80185560; //segment:ast_radio_de type:u16 +D_de_80185584 = 0x80185584; //segment:ast_radio_de type:u16 +D_de_801855E4 = 0x801855E4; //segment:ast_radio_de type:u16 +D_de_8018561C = 0x8018561C; //segment:ast_radio_de type:u16 +D_de_80185680 = 0x80185680; //segment:ast_radio_de type:u16 +D_de_801856EC = 0x801856EC; //segment:ast_radio_de type:u16 +D_de_80185744 = 0x80185744; //segment:ast_radio_de type:u16 +D_de_8018579C = 0x8018579C; //segment:ast_radio_de type:u16 +D_de_801857E4 = 0x801857E4; //segment:ast_radio_de type:u16 +D_de_8018581C = 0x8018581C; //segment:ast_radio_de type:u16 +D_de_8018584C = 0x8018584C; //segment:ast_radio_de type:u16 +D_de_8018586C = 0x8018586C; //segment:ast_radio_de type:u16 +D_de_801858A8 = 0x801858A8; //segment:ast_radio_de type:u16 +D_de_801858D0 = 0x801858D0; //segment:ast_radio_de type:u16 +D_de_801858F8 = 0x801858F8; //segment:ast_radio_de type:u16 +D_de_80185954 = 0x80185954; //segment:ast_radio_de type:u16 +D_de_80185988 = 0x80185988; //segment:ast_radio_de type:u16 +D_de_801859C8 = 0x801859C8; //segment:ast_radio_de type:u16 +D_de_801859F4 = 0x801859F4; //segment:ast_radio_de type:u16 +D_de_80185A34 = 0x80185A34; //segment:ast_radio_de type:u16 +D_de_80185AA4 = 0x80185AA4; //segment:ast_radio_de type:u16 +D_de_80185AF0 = 0x80185AF0; //segment:ast_radio_de type:u16 +D_de_80185B0C = 0x80185B0C; //segment:ast_radio_de type:u16 +D_de_80185B64 = 0x80185B64; //segment:ast_radio_de type:u16 +D_de_80185BCC = 0x80185BCC; //segment:ast_radio_de type:u16 +D_de_80185C3C = 0x80185C3C; //segment:ast_radio_de type:u16 +D_de_80185CA8 = 0x80185CA8; //segment:ast_radio_de type:u16 +D_de_80185D10 = 0x80185D10; //segment:ast_radio_de type:u16 +D_de_80185D4C = 0x80185D4C; //segment:ast_radio_de type:u16 +D_de_80185D9C = 0x80185D9C; //segment:ast_radio_de type:u16 +D_de_80185DFC = 0x80185DFC; //segment:ast_radio_de type:u16 +D_de_80185E5C = 0x80185E5C; //segment:ast_radio_de type:u16 +D_de_80185E80 = 0x80185E80; //segment:ast_radio_de type:u16 +D_de_80185E94 = 0x80185E94; //segment:ast_radio_de type:u16 +D_de_80185EC0 = 0x80185EC0; //segment:ast_radio_de type:u16 +D_de_80185F1C = 0x80185F1C; //segment:ast_radio_de type:u16 +D_de_80185F5C = 0x80185F5C; //segment:ast_radio_de type:u16 +D_de_80185F88 = 0x80185F88; //segment:ast_radio_de type:u16 +D_de_80185FAC = 0x80185FAC; //segment:ast_radio_de type:u16 +D_de_80185FE0 = 0x80185FE0; //segment:ast_radio_de type:u16 +D_de_80186008 = 0x80186008; //segment:ast_radio_de type:u16 +D_de_80186040 = 0x80186040; //segment:ast_radio_de type:u16 +D_de_8018607C = 0x8018607C; //segment:ast_radio_de type:u16 +D_de_801860C0 = 0x801860C0; //segment:ast_radio_de type:u16 +D_de_8018610C = 0x8018610C; //segment:ast_radio_de type:u16 +D_de_80186150 = 0x80186150; //segment:ast_radio_de type:u16 +D_de_80186198 = 0x80186198; //segment:ast_radio_de type:u16 +D_de_801861FC = 0x801861FC; //segment:ast_radio_de type:u16 +D_de_80186268 = 0x80186268; //segment:ast_radio_de type:u16 +D_de_801862B4 = 0x801862B4; //segment:ast_radio_de type:u16 +D_de_801862FC = 0x801862FC; //segment:ast_radio_de type:u16 +D_de_80186324 = 0x80186324; //segment:ast_radio_de type:u16 +D_de_80186368 = 0x80186368; //segment:ast_radio_de type:u16 +D_de_80186380 = 0x80186380; //segment:ast_radio_de type:u16 +D_de_801863C8 = 0x801863C8; //segment:ast_radio_de type:u16 +D_de_80186418 = 0x80186418; //segment:ast_radio_de type:u16 +D_de_80186458 = 0x80186458; //segment:ast_radio_de type:u16 +D_de_80186490 = 0x80186490; //segment:ast_radio_de type:u16 +D_de_801864F0 = 0x801864F0; //segment:ast_radio_de type:u16 +D_de_80186558 = 0x80186558; //segment:ast_radio_de type:u16 +D_de_80186594 = 0x80186594; //segment:ast_radio_de type:u16 +D_de_801865D0 = 0x801865D0; //segment:ast_radio_de type:u16 +D_de_80186604 = 0x80186604; //segment:ast_radio_de type:u16 +D_de_80186644 = 0x80186644; //segment:ast_radio_de type:u16 +D_de_8018668C = 0x8018668C; //segment:ast_radio_de type:u16 +D_de_801866FC = 0x801866FC; //segment:ast_radio_de type:u16 +D_de_80186744 = 0x80186744; //segment:ast_radio_de type:u16 +D_de_80186784 = 0x80186784; //segment:ast_radio_de type:u16 +D_de_801867C8 = 0x801867C8; //segment:ast_radio_de type:u16 +D_de_80186808 = 0x80186808; //segment:ast_radio_de type:u16 +D_de_8018686C = 0x8018686C; //segment:ast_radio_de type:u16 +D_de_80186888 = 0x80186888; //segment:ast_radio_de type:u16 +D_de_801868D8 = 0x801868D8; //segment:ast_radio_de type:u16 +D_de_80186910 = 0x80186910; //segment:ast_radio_de type:u16 +D_de_80186940 = 0x80186940; //segment:ast_radio_de type:u16 +D_de_801869A0 = 0x801869A0; //segment:ast_radio_de type:u16 +D_de_801869DC = 0x801869DC; //segment:ast_radio_de type:u16 +D_de_80186A2C = 0x80186A2C; //segment:ast_radio_de type:u16 +D_de_80186AA0 = 0x80186AA0; //segment:ast_radio_de type:u16 +D_de_80186AC8 = 0x80186AC8; //segment:ast_radio_de type:u16 +D_de_80186ADC = 0x80186ADC; //segment:ast_radio_de type:u16 +D_de_80186AF0 = 0x80186AF0; //segment:ast_radio_de type:u16 +D_de_80186B04 = 0x80186B04; //segment:ast_radio_de type:u16 +D_de_80186B34 = 0x80186B34; //segment:ast_radio_de type:u16 +D_de_80186B6C = 0x80186B6C; //segment:ast_radio_de type:u16 +D_de_80186BB4 = 0x80186BB4; //segment:ast_radio_de type:u16 +D_de_80186BEC = 0x80186BEC; //segment:ast_radio_de type:u16 +D_de_80186C40 = 0x80186C40; //segment:ast_radio_de type:u16 +D_de_80186C7C = 0x80186C7C; //segment:ast_radio_de type:u16 +D_de_80186CC4 = 0x80186CC4; //segment:ast_radio_de type:u16 +D_de_80186D20 = 0x80186D20; //segment:ast_radio_de type:u16 +D_de_80186D8C = 0x80186D8C; //segment:ast_radio_de type:u16 +D_de_80186E00 = 0x80186E00; //segment:ast_radio_de type:u16 +D_de_80186E50 = 0x80186E50; //segment:ast_radio_de type:u16 +D_de_80186EAC = 0x80186EAC; //segment:ast_radio_de type:u16 +D_de_80186F10 = 0x80186F10; //segment:ast_radio_de type:u16 +D_de_80186F70 = 0x80186F70; //segment:ast_radio_de type:u16 +D_de_80186FCC = 0x80186FCC; //segment:ast_radio_de type:u16 +D_de_80187024 = 0x80187024; //segment:ast_radio_de type:u16 +D_de_8018706C = 0x8018706C; //segment:ast_radio_de type:u16 +D_de_80187090 = 0x80187090; //segment:ast_radio_de type:u16 +D_de_801870F0 = 0x801870F0; //segment:ast_radio_de type:u16 +D_de_8018714C = 0x8018714C; //segment:ast_radio_de type:u16 +D_de_80187170 = 0x80187170; //segment:ast_radio_de type:u16 +D_de_80187184 = 0x80187184; //segment:ast_radio_de type:u16 +D_de_80187198 = 0x80187198; //segment:ast_radio_de type:u16 +D_de_801871AC = 0x801871AC; //segment:ast_radio_de type:u16 +D_de_801871DC = 0x801871DC; //segment:ast_radio_de type:u16 +D_de_80187244 = 0x80187244; //segment:ast_radio_de type:u16 +D_de_801872A4 = 0x801872A4; //segment:ast_radio_de type:u16 +D_de_801872D4 = 0x801872D4; //segment:ast_radio_de type:u16 +D_de_80187304 = 0x80187304; //segment:ast_radio_de type:u16 +D_de_80187334 = 0x80187334; //segment:ast_radio_de type:u16 +D_de_80187394 = 0x80187394; //segment:ast_radio_de type:u16 +D_de_801873EC = 0x801873EC; //segment:ast_radio_de type:u16 +D_de_80187438 = 0x80187438; //segment:ast_radio_de type:u16 +D_de_801874AC = 0x801874AC; //segment:ast_radio_de type:u16 +D_de_80187508 = 0x80187508; //segment:ast_radio_de type:u16 +D_de_80187530 = 0x80187530; //segment:ast_radio_de type:u16 +D_de_80187574 = 0x80187574; //segment:ast_radio_de type:u16 +D_de_801875C0 = 0x801875C0; //segment:ast_radio_de type:u16 +D_de_8018760C = 0x8018760C; //segment:ast_radio_de type:u16 +D_de_80187654 = 0x80187654; //segment:ast_radio_de type:u16 +D_de_801876B4 = 0x801876B4; //segment:ast_radio_de type:u16 +D_de_8018771C = 0x8018771C; //segment:ast_radio_de type:u16 +D_de_80187794 = 0x80187794; //segment:ast_radio_de type:u16 +D_de_801877E8 = 0x801877E8; //segment:ast_radio_de type:u16 +D_de_8018784C = 0x8018784C; //segment:ast_radio_de type:u16 +D_de_801878AC = 0x801878AC; //segment:ast_radio_de type:u16 +D_de_801878F0 = 0x801878F0; //segment:ast_radio_de type:u16 +D_de_80187958 = 0x80187958; //segment:ast_radio_de type:u16 +D_de_80187994 = 0x80187994; //segment:ast_radio_de type:u16 +D_de_801879D8 = 0x801879D8; //segment:ast_radio_de type:u16 +D_de_801879F0 = 0x801879F0; //segment:ast_radio_de type:u16 +D_de_80187A34 = 0x80187A34; //segment:ast_radio_de type:u16 +D_de_80187A54 = 0x80187A54; //segment:ast_radio_de type:u16 +D_de_80187AB8 = 0x80187AB8; //segment:ast_radio_de type:u16 +D_de_80187AF4 = 0x80187AF4; //segment:ast_radio_de type:u16 +D_de_80187B2C = 0x80187B2C; //segment:ast_radio_de type:u16 +D_de_80187B60 = 0x80187B60; //segment:ast_radio_de type:u16 +D_de_80187B94 = 0x80187B94; //segment:ast_radio_de type:u16 +D_de_80187BEC = 0x80187BEC; //segment:ast_radio_de type:u16 +D_de_80187C48 = 0x80187C48; //segment:ast_radio_de type:u16 +D_de_80187C74 = 0x80187C74; //segment:ast_radio_de type:u16 +D_de_80187CAC = 0x80187CAC; //segment:ast_radio_de type:u16 +D_de_80187CD4 = 0x80187CD4; //segment:ast_radio_de type:u16 +D_de_80187D0C = 0x80187D0C; //segment:ast_radio_de type:u16 +D_de_80187D64 = 0x80187D64; //segment:ast_radio_de type:u16 +D_de_80187D74 = 0x80187D74; //segment:ast_radio_de type:u16 +D_de_80187D8C = 0x80187D8C; //segment:ast_radio_de type:u16 +D_de_80187DA4 = 0x80187DA4; //segment:ast_radio_de type:u16 +D_de_80187E14 = 0x80187E14; //segment:ast_radio_de type:u16 +D_de_80187E78 = 0x80187E78; //segment:ast_radio_de type:u16 +D_de_80187E98 = 0x80187E98; //segment:ast_radio_de type:u16 +D_de_80187EB8 = 0x80187EB8; //segment:ast_radio_de type:u16 +D_de_80187ED8 = 0x80187ED8; //segment:ast_radio_de type:u16 +D_de_80187EF0 = 0x80187EF0; //segment:ast_radio_de type:u16 +D_de_80187F08 = 0x80187F08; //segment:ast_radio_de type:u16 +D_de_80187F20 = 0x80187F20; //segment:ast_radio_de type:u16 +D_de_80187F38 = 0x80187F38; //segment:ast_radio_de type:u16 +D_de_80187F70 = 0x80187F70; //segment:ast_radio_de type:u16 +D_de_80187FC4 = 0x80187FC4; //segment:ast_radio_de type:u16 +D_de_80187FE4 = 0x80187FE4; //segment:ast_radio_de type:u16 +D_de_80188030 = 0x80188030; //segment:ast_radio_de type:u16 +D_de_8018808C = 0x8018808C; //segment:ast_radio_de type:u16 +D_de_801880DC = 0x801880DC; //segment:ast_radio_de type:u16 +D_de_80188128 = 0x80188128; //segment:ast_radio_de type:u16 +D_de_80188170 = 0x80188170; //segment:ast_radio_de type:u16 +D_de_801881D4 = 0x801881D4; //segment:ast_radio_de type:u16 +D_de_80188238 = 0x80188238; //segment:ast_radio_de type:u16 +D_de_801882A0 = 0x801882A0; //segment:ast_radio_de type:u16 +D_de_80188308 = 0x80188308; //segment:ast_radio_de type:u16 +D_de_80188364 = 0x80188364; //segment:ast_radio_de type:u16 +D_de_801883C0 = 0x801883C0; //segment:ast_radio_de type:u16 +D_de_80188420 = 0x80188420; //segment:ast_radio_de type:u16 +D_de_8018847C = 0x8018847C; //segment:ast_radio_de type:u16 +D_de_8018852C = 0x8018852C; //segment:ast_radio_de type:u16 +D_de_801885B0 = 0x801885B0; //segment:ast_radio_de type:u16 +D_de_801885E8 = 0x801885E8; //segment:ast_radio_de type:u16 +D_de_8018862C = 0x8018862C; //segment:ast_radio_de type:u16 +D_de_80188660 = 0x80188660; //segment:ast_radio_de type:u16 +D_de_80188690 = 0x80188690; //segment:ast_radio_de type:u16 +D_de_801886C0 = 0x801886C0; //segment:ast_radio_de type:u16 +D_de_801886F4 = 0x801886F4; //segment:ast_radio_de type:u16 +D_de_80188728 = 0x80188728; //segment:ast_radio_de type:u16 +D_de_80188758 = 0x80188758; //segment:ast_radio_de type:u16 +D_de_80188788 = 0x80188788; //segment:ast_radio_de type:u16 +D_de_801887BC = 0x801887BC; //segment:ast_radio_de type:u16 +D_de_801887F0 = 0x801887F0; //segment:ast_radio_de type:u16 +D_de_80188820 = 0x80188820; //segment:ast_radio_de type:u16 +D_de_80188850 = 0x80188850; //segment:ast_radio_de type:u16 +D_de_80188884 = 0x80188884; //segment:ast_radio_de type:u16 +D_de_8018889C = 0x8018889C; //segment:ast_radio_de type:u16 +D_de_801888B4 = 0x801888B4; //segment:ast_radio_de type:u16 +D_de_801888CC = 0x801888CC; //segment:ast_radio_de type:u16 +D_de_801888D8 = 0x801888D8; //segment:ast_radio_de type:u16 +D_de_801888F0 = 0x801888F0; //segment:ast_radio_de type:u16 +D_de_8018890C = 0x8018890C; //segment:ast_radio_de type:u16 +D_de_8018891C = 0x8018891C; //segment:ast_radio_de type:u16 +D_de_80188930 = 0x80188930; //segment:ast_radio_de type:u16 +D_de_80188944 = 0x80188944; //segment:ast_radio_de type:u16 +D_de_80188960 = 0x80188960; //segment:ast_radio_de type:u16 +D_de_80188970 = 0x80188970; //segment:ast_radio_de type:u16 +D_de_801889D0 = 0x801889D0; //segment:ast_radio_de type:u16 +D_de_801889EC = 0x801889EC; //segment:ast_radio_de type:u16 +D_de_80188A08 = 0x80188A08; //segment:ast_radio_de type:u16 +D_de_80188A18 = 0x80188A18; //segment:ast_radio_de type:u16 +D_de_80188A34 = 0x80188A34; //segment:ast_radio_de type:u16 +D_de_80188A4C = 0x80188A4C; //segment:ast_radio_de type:u16 +D_de_80188A70 = 0x80188A70; //segment:ast_radio_de type:u16 +D_de_80188A8C = 0x80188A8C; //segment:ast_radio_de type:u16 +D_de_80188AB0 = 0x80188AB0; //segment:ast_radio_de type:u16 +D_de_80188AD0 = 0x80188AD0; //segment:ast_radio_de type:u16 +D_de_80188B28 = 0x80188B28; //segment:ast_radio_de type:u16 +D_de_80188BA0 = 0x80188BA0; //segment:ast_radio_de type:u16 +D_de_80188C18 = 0x80188C18; //segment:ast_radio_de type:u16 +D_de_80188C88 = 0x80188C88; //segment:ast_radio_de type:u16 +D_de_80188CE8 = 0x80188CE8; //segment:ast_radio_de type:u16 +D_de_80188D58 = 0x80188D58; //segment:ast_radio_de type:u16 +D_de_80188DC0 = 0x80188DC0; //segment:ast_radio_de type:u16 +D_de_80188E2C = 0x80188E2C; //segment:ast_radio_de type:u16 +D_de_80188E98 = 0x80188E98; //segment:ast_radio_de type:u16 +D_de_80188EFC = 0x80188EFC; //segment:ast_radio_de type:u16 +D_de_80188F68 = 0x80188F68; //segment:ast_radio_de type:u16 +D_de_80188FCC = 0x80188FCC; //segment:ast_radio_de type:u16 +D_de_8018903C = 0x8018903C; //segment:ast_radio_de type:u16 +D_de_80189088 = 0x80189088; //segment:ast_radio_de type:u16 +D_de_801890F4 = 0x801890F4; //segment:ast_radio_de type:u16 +D_de_80189148 = 0x80189148; //segment:ast_radio_de type:u16 +D_de_80189184 = 0x80189184; //segment:ast_radio_de type:u16 +D_de_801891DC = 0x801891DC; //segment:ast_radio_de type:u16 +D_de_8018923C = 0x8018923C; //segment:ast_radio_de type:u16 +D_de_80189284 = 0x80189284; //segment:ast_radio_de type:u16 +D_de_801892E8 = 0x801892E8; //segment:ast_radio_de type:u16 +D_de_80189348 = 0x80189348; //segment:ast_radio_de type:u16 +D_de_801893B4 = 0x801893B4; //segment:ast_radio_de type:u16 +D_de_8018941C = 0x8018941C; //segment:ast_radio_de type:u16 +D_de_8018948C = 0x8018948C; //segment:ast_radio_de type:u16 +D_de_80189500 = 0x80189500; //segment:ast_radio_de type:u16 +D_de_80189558 = 0x80189558; //segment:ast_radio_de type:u16 +D_de_801895C0 = 0x801895C0; //segment:ast_radio_de type:u16 +D_de_80189610 = 0x80189610; //segment:ast_radio_de type:u16 +D_de_80189678 = 0x80189678; //segment:ast_radio_de type:u16 +D_de_801896E8 = 0x801896E8; //segment:ast_radio_de type:u16 +D_de_8018974C = 0x8018974C; //segment:ast_radio_de type:u16 +D_de_801897B4 = 0x801897B4; //segment:ast_radio_de diff --git a/linker_scripts/eu/rev0/symbol_addrs_assets.txt b/linker_scripts/eu/rev0/symbol_addrs_assets.txt new file mode 100644 index 00000000..1b309c0d --- /dev/null +++ b/linker_scripts/eu/rev0/symbol_addrs_assets.txt @@ -0,0 +1,1043 @@ +D_1002A20 = 0x1002A20; +D_1003BE0 = 0x1003BE0; +D_1003E20 = 0x1003E20; +D_1003EE0 = 0x1003EE0; +D_10040B0 = 0x10040B0; +D_1004FD0 = 0x1004FD0; +D_1005EF0 = 0x1005EF0; +D_1006E10 = 0x1006E10; +D_1007D30 = 0x1007D30; +D_1008C50 = 0x1008C50; +D_1009B70 = 0x1009B70; +D_100AA90 = 0x100AA90; +D_100B9B0 = 0x100B9B0; +D_100C8D0 = 0x100C8D0; +D_100D7F0 = 0x100D7F0; +D_100E710 = 0x100E710; +D_100F630 = 0x100F630; +D_1012090 = 0x1012090; +D_10124B0 = 0x10124B0; +D_10124C0 = 0x10124C0; +D_1012540 = 0x1012540; +D_1012850 = 0x1012850; +D_10128C0 = 0x10128C0; +D_10128D0 = 0x10128D0; +D_10129A0 = 0x10129A0; +D_10129C0 = 0x10129C0; +D_1012A90 = 0x1012A90; +D_1012AB0 = 0x1012AB0; +D_1012B80 = 0x1012B80; +D_1012BA0 = 0x1012BA0; +D_1012C70 = 0x1012C70; +D_1012C90 = 0x1012C90; +D_1012CD0 = 0x1012CD0; +D_1012CE0 = 0x1012CE0; +D_1012D18 = 0x1012D18; +D_1012D30 = 0x1012D30; +D_1012F20 = 0x1012F20; +D_10135E0 = 0x10135E0; +D_10136A8 = 0x10136A8; +D_10136D0 = 0x10136D0; +D_1013798 = 0x1013798; +D_10137D0 = 0x10137D0; +D_1013EA0 = 0x1013EA0; +D_1013F80 = 0x1013F80; +D_1014380 = 0x1014380; +D_1014390 = 0x1014390; +D_1014510 = 0x1014510; +D_1016320 = 0x1016320; +D_1016790 = 0x1016790; +D_1017390 = 0x1017390; +D_1017680 = 0x1017680; +D_10185D0 = 0x10185D0; +D_10190D0 = 0x10190D0; +D_1019ED0 = 0x1019ED0; +D_101A2D0 = 0x101A2D0; +D_101A630 = 0x101A630; +D_101AAB0 = 0x101AAB0; +D_101B380 = 0x101B380; +D_101B6F0 = 0x101B6F0; +D_101B9E0 = 0x101B9E0; +D_101BB30 = 0x101BB30; +D_101BCE0 = 0x101BCE0; +D_101D0F0 = 0x101D0F0; +D_101D8F0 = 0x101D8F0; +D_101DB80 = 0x101DB80; +D_101DE80 = 0x101DE80; +D_101EA20 = 0x101EA20; +D_1022C30 = 0x1022C30; +D_1023C90 = 0x1023C90; +D_1023FB0 = 0x1023FB0; +D_1024510 = 0x1024510; +D_1024560 = 0x1024560; +D_1024A90 = 0x1024A90; +D_1025040 = 0x1025040; +D_10250A0 = 0x10250A0; +D_1025640 = 0x1025640; +D_10257A0 = 0x10257A0; +D_1025868 = 0x1025868; +D_10258D0 = 0x10258D0; +D_1025D70 = 0x1025D70; +D_1026610 = 0x1026610; +D_1026EA0 = 0x1026EA0; +D_1029040 = 0x1029040; +D_102A590 = 0x102A590; +D_102AE20 = 0x102AE20; +D_102B6B0 = 0x102B6B0; +D_102FB60 = 0x102FB60; +D_10303F0 = 0x10303F0; +D_1030C90 = 0x1030C90; +D_1030D18 = 0x1030D18; +D_1032440 = 0x1032440; +D_1032CD0 = 0x1032CD0; +D_1033590 = 0x1033590; +D_20031B0 = 0x20031B0; +D_2006F50 = 0x2006F50; +D_200D750 = 0x200D750; +D_2010A30 = 0x2010A30; +D_20112C0 = 0x20112C0; +D_3000090 = 0x3000090; +D_3000100 = 0x3000100; +D_3000120 = 0x3000120; +D_3000130 = 0x3000130; +D_30001A0 = 0x30001A0; +D_30002A0 = 0x30002A0; +D_3000310 = 0x3000310; +D_3000410 = 0x3000410; +D_3000470 = 0x3000470; +D_3000480 = 0x3000480; +D_3000660 = 0x3000660; +D_3000940 = 0x3000940; +D_3000970 = 0x3000970; +D_3000AF0 = 0x3000AF0; +D_3000C70 = 0x3000C70; +D_3001848 = 0x3001848; +D_3001A50 = 0x3001A50; +D_3002E80 = 0x3002E80; +D_3004450 = 0x3004450; +D_3004640 = 0x3004640; +D_3004680 = 0x3004680; +D_3005980 = 0x3005980; +D_3005AB0 = 0x3005AB0; +D_3005EA8 = 0x3005EA8; +D_30066B0 = 0x30066B0; +D_3006940 = 0x3006940; +D_3006AF0 = 0x3006AF0; +D_3006C70 = 0x3006C70; +D_3006DE0 = 0x3006DE0; +D_3007040 = 0x3007040; +D_3007240 = 0x3007240; +D_3007C50 = 0x3007C50; +D_3007E50 = 0x3007E50; +D_3007E70 = 0x3007E70; +D_3008100 = 0x3008100; +D_3008B40 = 0x3008B40; +D_3008D40 = 0x3008D40; +D_3009200 = 0x3009200; +D_3009230 = 0x3009230; +D_3009F78 = 0x3009F78; +D_300A180 = 0x300A180; +D_300A640 = 0x300A640; +D_300A670 = 0x300A670; +D_300B548 = 0x300B548; +D_300D450 = 0x300D450; +D_300EF50 = 0x300EF50; +D_300F140 = 0x300F140; +D_300FA48 = 0x300FA48; +D_300FC50 = 0x300FC50; +D_3010970 = 0x3010970; +D_3010B70 = 0x3010B70; +D_3011410 = 0x3011410; +D_3011720 = 0x3011720; +D_30131F0 = 0x30131F0; +D_3014380 = 0x3014380; +D_3014BF0 = 0x3014BF0; +D_3015120 = 0x3015120; +D_3015128 = 0x3015128; +D_30155E0 = 0x30155E0; +D_3015AF4 = 0x3015AF4; +D_3015C28 = 0x3015C28; +D_3015D80 = 0x3015D80; +D_30163C4 = 0x30163C4; +D_3016570 = 0x3016570; +D_30165B8 = 0x30165B8; +D_30165E0 = 0x30165E0; +D_3016610 = 0x3016610; +D_3016628 = 0x3016628; +D_3016660 = 0x3016660; +D_3016720 = 0x3016720; +D_3016770 = 0x3016770; +D_3016B30 = 0x3016B30; +D_3016BB0 = 0x3016BB0; +D_3017080 = 0x3017080; +D_30174C0 = 0x30174C0; +D_30175C0 = 0x30175C0; +D_3017660 = 0x3017660; +D_3017760 = 0x3017760; +D_3017F80 = 0x3017F80; +D_3018080 = 0x3018080; +D_30182A0 = 0x30182A0; +D_30183D0 = 0x30183D0; +D_3018440 = 0x3018440; +D_30184D8 = 0x30184D8; +D_30189C0 = 0x30189C0; +D_3018B60 = 0x3018B60; +D_3018FF0 = 0x3018FF0; +D_3019190 = 0x3019190; +D_30194E0 = 0x30194E0; +D_30199F0 = 0x30199F0; +D_301B320 = 0x301B320; +D_301C020 = 0x301C020; +D_301CF30 = 0x301CF30; +D_301D910 = 0x301D910; +D_301E2E0 = 0x301E2E0; +D_3020B50 = 0x3020B50; +D_3021BE0 = 0x3021BE0; +D_3022540 = 0x3022540; +D_3024CA0 = 0x3024CA0; +D_3027200 = 0x3027200; +D_3027390 = 0x3027390; +D_3027B80 = 0x3027B80; +D_3028848 = 0x3028848; +D_3028AB4 = 0x3028AB4; +D_302948C = 0x302948C; +D_30296F8 = 0x30296F8; +D_3029D28 = 0x3029D28; +D_302A034 = 0x302A034; +D_302A63C = 0x302A63C; +D_302A888 = 0x302A888; +D_302AA10 = 0x302AA10; +D_302B5E0 = 0x302B5E0; +D_302C1C0 = 0x302C1C0; +D_30395C0 = 0x30395C0; +D_30396E0 = 0x30396E0; +D_3039970 = 0x3039970; +D_303A210 = 0x303A210; +D_303A254 = 0x303A254; +D_303A298 = 0x303A298; +D_303A2DC = 0x303A2DC; +D_303A584 = 0x303A584; +D_303A610 = 0x303A610; +D_303A818 = 0x303A818; +D_303AA0C = 0x303AA0C; +D_303AAFC = 0x303AAFC; +D_303ABEC = 0x303ABEC; +D_303ACD0 = 0x303ACD0; +D_303ADFC = 0x303ADFC; +D_303AEEC = 0x303AEEC; +D_303AFDC = 0x303AFDC; +D_303B0C0 = 0x303B0C0; +D_4000080 = 0x4000080; +D_400014C = 0x400014C; +D_40001A4 = 0x40001A4; +D_4000270 = 0x4000270; +D_40018A0 = 0x40018A0; +D_4003BD0 = 0x4003BD0; +D_40057AC = 0x40057AC; +D_40058B8 = 0x40058B8; +D_40068F0 = 0x40068F0; +D_4007870 = 0x4007870; +D_4007AF0 = 0x4007AF0; +D_4008CE0 = 0x4008CE0; +D_4008F70 = 0x4008F70; +D_400A30C = 0x400A30C; +D_400A398 = 0x400A398; +D_400AAE0 = 0x400AAE0; +D_400B390 = 0x400B390; +D_5005450 = 0x5005450; +D_500C3A0 = 0x500C3A0; +D_5013550 = 0x5013550; +D_50153A0 = 0x50153A0; +D_5015490 = 0x5015490; +D_5015580 = 0x5015580; +D_50157F0 = 0x50157F0; +D_5017200 = 0x5017200; +D_50177F0 = 0x50177F0; +D_50178E0 = 0x50178E0; +D_50179D0 = 0x50179D0; +D_5017AC0 = 0x5017AC0; +D_5017BB0 = 0x5017BB0; +D_5017CA0 = 0x5017CA0; +D_5017D90 = 0x5017D90; +D_50183D0 = 0x50183D0; +D_6000D80 = 0x6000D80; +D_6001110 = 0x6001110; +D_6001574 = 0x6001574; +D_6001840 = 0x6001840; +D_60018A0 = 0x60018A0; +D_6001920 = 0x6001920; +D_6001CA0 = 0x6001CA0; +D_6001F40 = 0x6001F40; +D_6001F80 = 0x6001F80; +D_6002040 = 0x6002040; +D_6002100 = 0x6002100; +D_60021A0 = 0x60021A0; +D_60023B0 = 0x60023B0; +D_6002440 = 0x6002440; +D_6002480 = 0x6002480; +D_60024C0 = 0x60024C0; +D_6002500 = 0x6002500; +D_60027B0 = 0x60027B0; +D_6002920 = 0x6002920; +D_6002990 = 0x6002990; +D_6002A30 = 0x6002A30; +D_6002AF0 = 0x6002AF0; +D_6002E80 = 0x6002E80; +D_6002F24 = 0x6002F24; +D_60030A8 = 0x60030A8; +D_60030B8 = 0x60030B8; +D_6003270 = 0x6003270; +D_60032E0 = 0x60032E0; +D_6003304 = 0x6003304; +D_6003420 = 0x6003420; +D_6003640 = 0x6003640; +D_60036A0 = 0x60036A0; +D_6003720 = 0x6003720; +D_6003760 = 0x6003760; +D_6003820 = 0x6003820; +D_6003960 = 0x6003960; +D_60039A0 = 0x60039A0; +D_60039C0 = 0x60039C0; +D_60039F0 = 0x60039F0; +D_6003BE0 = 0x6003BE0; +D_6003DE0 = 0x6003DE0; +D_6003F20 = 0x6003F20; +D_6004060 = 0x6004060; +D_6004340 = 0x6004340; +D_60043C0 = 0x60043C0; +D_6004428 = 0x6004428; +D_6004440 = 0x6004440; +D_6004450 = 0x6004450; +D_6004488 = 0x6004488; +D_60044A0 = 0x60044A0; +D_60045A4 = 0x60045A4; +D_6004A10 = 0x6004A10; +D_6004E30 = 0x6004E30; +D_6005060 = 0x6005060; +D_6005150 = 0x6005150; +D_6005260 = 0x6005260; +D_6005410 = 0x6005410; +D_6005478 = 0x6005478; +D_6005530 = 0x6005530; +D_6005550 = 0x6005550; +D_6005650 = 0x6005650; +D_60056C0 = 0x60056C0; +D_6005830 = 0x6005830; +D_6005D00 = 0x6005D00; +D_6005F80 = 0x6005F80; +D_60060C0 = 0x60060C0; +D_6006180 = 0x6006180; +D_6006270 = 0x6006270; +D_60063E4 = 0x60063E4; +D_6006480 = 0x6006480; +D_6006510 = 0x6006510; +D_6006900 = 0x6006900; +D_6006960 = 0x6006960; +D_6006ECC = 0x6006ECC; +D_60070A0 = 0x60070A0; +D_60070B8 = 0x60070B8; +D_6007570 = 0x6007570; +D_60077D0 = 0x60077D0; +D_600781C = 0x600781C; +D_60078F0 = 0x60078F0; +D_6007BD0 = 0x6007BD0; +D_6007DF0 = 0x6007DF0; +D_6007E24 = 0x6007E24; +D_6007E40 = 0x6007E40; +D_6007E44 = 0x6007E44; +D_6007E5C = 0x6007E5C; +D_6007E78 = 0x6007E78; +D_6007E94 = 0x6007E94; +D_6007EB0 = 0x6007EB0; +D_6007ECC = 0x6007ECC; +D_6007EE8 = 0x6007EE8; +D_6007F04 = 0x6007F04; +D_6007F20 = 0x6007F20; +D_6007F30 = 0x6007F30; +D_6007F60 = 0x6007F60; +D_60080F0 = 0x60080F0; +D_600810C = 0x600810C; +D_6008128 = 0x6008128; +D_6008940 = 0x6008940; +D_60089C0 = 0x60089C0; +D_6008B60 = 0x6008B60; +D_6008BA0 = 0x6008BA0; +D_60090A0 = 0x60090A0; +D_6009370 = 0x6009370; +D_6009378 = 0x6009378; +D_6009400 = 0x6009400; +D_6009680 = 0x6009680; +D_6009750 = 0x6009750; +D_60097C0 = 0x60097C0; +D_6009820 = 0x6009820; +D_60098F0 = 0x60098F0; +D_6009958 = 0x6009958; +D_60099C0 = 0x60099C0; +D_6009A30 = 0x6009A30; +D_6009A58 = 0x6009A58; +D_6009D14 = 0x6009D14; +D_6009E40 = 0x6009E40; +D_6009E78 = 0x6009E78; +D_6009F60 = 0x6009F60; +D_6009FB4 = 0x6009FB4; +D_600A000 = 0x600A000; +D_600A120 = 0x600A120; +D_600A310 = 0x600A310; +D_600A430 = 0x600A430; +D_600A850 = 0x600A850; +D_600A890 = 0x600A890; +D_600A8C0 = 0x600A8C0; +D_600ACB0 = 0x600ACB0; +D_600AD10 = 0x600AD10; +D_600AE80 = 0x600AE80; +D_600B0B8 = 0x600B0B8; +D_600B0D8 = 0x600B0D8; +D_600B3B4 = 0x600B3B4; +D_600B4B0 = 0x600B4B0; +D_600B5A0 = 0x600B5A0; +D_600B5F8 = 0x600B5F8; +D_600B710 = 0x600B710; +D_600BAD0 = 0x600BAD0; +D_600BD14 = 0x600BD14; +D_600C040 = 0x600C040; +D_600C110 = 0x600C110; +D_600C3D0 = 0x600C3D0; +D_600C450 = 0x600C450; +D_600C6B0 = 0x600C6B0; +D_600C990 = 0x600C990; +D_600CC90 = 0x600CC90; +D_600CCBC = 0x600CCBC; +D_600CCE0 = 0x600CCE0; +D_600CD60 = 0x600CD60; +D_600CF30 = 0x600CF30; +D_600D180 = 0x600D180; +D_600D1F0 = 0x600D1F0; +D_600D210 = 0x600D210; +D_600D378 = 0x600D378; +D_600D588 = 0x600D588; +D_600D5F4 = 0x600D5F4; +D_600D750 = 0x600D750; +D_600D7A0 = 0x600D7A0; +D_600D7B0 = 0x600D7B0; +D_600D7FC = 0x600D7FC; +D_600D820 = 0x600D820; +D_600D970 = 0x600D970; +D_600DAB0 = 0x600DAB0; +D_600DDC0 = 0x600DDC0; +D_600DF3C = 0x600DF3C; +D_600DFB0 = 0x600DFB0; +D_600E120 = 0x600E120; +D_600E248 = 0x600E248; +D_600E380 = 0x600E380; +D_600E3E0 = 0x600E3E0; +D_600E450 = 0x600E450; +D_600E470 = 0x600E470; +D_600E610 = 0x600E610; +D_600E758 = 0x600E758; +D_600E990 = 0x600E990; +D_600E9A0 = 0x600E9A0; +D_600EB1C = 0x600EB1C; +D_600EE24 = 0x600EE24; +D_600EFD0 = 0x600EFD0; +D_600F1D8 = 0x600F1D8; +D_600F280 = 0x600F280; +D_600F470 = 0x600F470; +D_600F550 = 0x600F550; +D_600F590 = 0x600F590; +D_600F6A4 = 0x600F6A4; +D_600F750 = 0x600F750; +D_600F940 = 0x600F940; +D_600F980 = 0x600F980; +D_600F9A0 = 0x600F9A0; +D_600FA60 = 0x600FA60; +D_600FA80 = 0x600FA80; +D_600FBF0 = 0x600FBF0; +D_600FEB0 = 0x600FEB0; +D_600FED0 = 0x600FED0; +D_6010080 = 0x6010080; +D_60101EC = 0x60101EC; +D_60102A4 = 0x60102A4; +D_60103D8 = 0x60103D8; +D_6010510 = 0x6010510; +D_60105A0 = 0x60105A0; +D_601062C = 0x601062C; +D_6010698 = 0x6010698; +D_6010764 = 0x6010764; +D_6010970 = 0x6010970; +D_6010980 = 0x6010980; +D_6010B90 = 0x6010B90; +D_6010BC0 = 0x6010BC0; +D_6010CF8 = 0x6010CF8; +D_60114B0 = 0x60114B0; +D_6011620 = 0x6011620; +D_6011690 = 0x6011690; +D_60117B0 = 0x60117B0; +D_6011890 = 0x6011890; +D_6011B80 = 0x6011B80; +D_6011C50 = 0x6011C50; +D_6011E70 = 0x6011E70; +D_60122F8 = 0x60122F8; +D_6012384 = 0x6012384; +D_6012424 = 0x6012424; +D_6012430 = 0x6012430; +D_6012508 = 0x6012508; +D_6012604 = 0x6012604; +D_60126B0 = 0x60126B0; +D_60126E0 = 0x60126E0; +D_60127F0 = 0x60127F0; +D_60128EC = 0x60128EC; +D_6012930 = 0x6012930; +D_6012A98 = 0x6012A98; +D_6012BC0 = 0x6012BC0; +D_6012C04 = 0x6012C04; +D_6012E64 = 0x6012E64; +D_60130E0 = 0x60130E0; +D_60130E8 = 0x60130E8; +D_60132B0 = 0x60132B0; +D_601349C = 0x601349C; +D_6013760 = 0x6013760; +D_6013EF0 = 0x6013EF0; +D_6014000 = 0x6014000; +D_6014070 = 0x6014070; +D_601415C = 0x601415C; +D_60141E0 = 0x60141E0; +D_601425C = 0x601425C; +D_6014280 = 0x6014280; +D_6014380 = 0x6014380; +D_60143EC = 0x60143EC; +D_60146E0 = 0x60146E0; +D_6014878 = 0x6014878; +D_6014900 = 0x6014900; +D_60149EC = 0x60149EC; +D_6014AC0 = 0x6014AC0; +D_6014EC8 = 0x6014EC8; +D_6014F20 = 0x6014F20; +D_6014F30 = 0x6014F30; +D_6014F94 = 0x6014F94; +D_6014FB0 = 0x6014FB0; +D_6015080 = 0x6015080; +D_60150C0 = 0x60150C0; +D_6015158 = 0x6015158; +D_6015340 = 0x6015340; +D_6015410 = 0x6015410; +D_6015520 = 0x6015520; +D_6015A60 = 0x6015A60; +D_6015B20 = 0x6015B20; +D_6015BA8 = 0x6015BA8; +D_6015CB0 = 0x6015CB0; +D_6015D94 = 0x6015D94; +D_6015E54 = 0x6015E54; +D_6015F20 = 0x6015F20; +D_6016110 = 0x6016110; +D_60169A4 = 0x60169A4; +D_6017030 = 0x6017030; +D_6017610 = 0x6017610; +D_6017850 = 0x6017850; +D_6017880 = 0x6017880; +D_60178C0 = 0x60178C0; +D_60179D0 = 0x60179D0; +D_6017BF0 = 0x6017BF0; +D_6017ED0 = 0x6017ED0; +D_6017F08 = 0x6017F08; +D_60180E4 = 0x60180E4; +D_6018480 = 0x6018480; +D_6018500 = 0x6018500; +D_60188B0 = 0x60188B0; +D_6018FEC = 0x6018FEC; +D_6019150 = 0x6019150; +D_6019308 = 0x6019308; +D_6019550 = 0x6019550; +D_6019708 = 0x6019708; +D_6019B08 = 0x6019B08; +D_6019BD4 = 0x6019BD4; +D_6019BE0 = 0x6019BE0; +D_6019CC8 = 0x6019CC8; +D_6019DC8 = 0x6019DC8; +D_6019DE0 = 0x6019DE0; +D_6019F60 = 0x6019F60; +D_601A010 = 0x601A010; +D_601A150 = 0x601A150; +D_601A23C = 0x601A23C; +D_601A260 = 0x601A260; +D_601A280 = 0x601A280; +D_601A310 = 0x601A310; +D_601A334 = 0x601A334; +D_601A540 = 0x601A540; +D_601A590 = 0x601A590; +D_601A6F0 = 0x601A6F0; +D_601A910 = 0x601A910; +D_601AF30 = 0x601AF30; +D_601B0D0 = 0x601B0D0; +D_601B1EC = 0x601B1EC; +D_601B338 = 0x601B338; +D_601B550 = 0x601B550; +D_601B56C = 0x601B56C; +D_601B6E0 = 0x601B6E0; +D_601BA18 = 0x601BA18; +D_601BA80 = 0x601BA80; +D_601BAB0 = 0x601BAB0; +D_601BAC0 = 0x601BAC0; +D_601BB08 = 0x601BB08; +D_601BE50 = 0x601BE50; +D_601BF40 = 0x601BF40; +D_601C4C0 = 0x601C4C0; +D_601C610 = 0x601C610; +D_601C648 = 0x601C648; +D_601C714 = 0x601C714; +D_601C770 = 0x601C770; +D_601CB10 = 0x601CB10; +D_601CBB8 = 0x601CBB8; +D_601CC50 = 0x601CC50; +D_601CC60 = 0x601CC60; +D_601CD00 = 0x601CD00; +D_601CD84 = 0x601CD84; +D_601CE10 = 0x601CE10; +D_601D1C0 = 0x601D1C0; +D_601D240 = 0x601D240; +D_601D380 = 0x601D380; +D_601D454 = 0x601D454; +D_601D4E0 = 0x601D4E0; +D_601D6D0 = 0x601D6D0; +D_601D734 = 0x601D734; +D_601D770 = 0x601D770; +D_601D8C0 = 0x601D8C0; +D_601DD30 = 0x601DD30; +D_601DF60 = 0x601DF60; +D_601E190 = 0x601E190; +D_601E350 = 0x601E350; +D_601E4C0 = 0x601E4C0; +D_601E630 = 0x601E630; +D_601E810 = 0x601E810; +D_601E8E0 = 0x601E8E0; +D_601E8F0 = 0x601E8F0; +D_601ECB0 = 0x601ECB0; +D_601ED48 = 0x601ED48; +D_601EE80 = 0x601EE80; +D_601F280 = 0x601F280; +D_601F648 = 0x601F648; +D_601F6F8 = 0x601F6F8; +D_601F844 = 0x601F844; +D_601FF44 = 0x601FF44; +D_6020050 = 0x6020050; +D_60204B0 = 0x60204B0; +D_6020620 = 0x6020620; +D_6020EE8 = 0x6020EE8; +D_6020F70 = 0x6020F70; +D_602107C = 0x602107C; +D_6021474 = 0x6021474; +D_60214D0 = 0x60214D0; +D_6021520 = 0x6021520; +D_6021600 = 0x6021600; +D_60216FC = 0x60216FC; +D_6021730 = 0x6021730; +D_60217BC = 0x60217BC; +D_60217C4 = 0x60217C4; +D_6021890 = 0x6021890; +D_6021930 = 0x6021930; +D_6021AC0 = 0x6021AC0; +D_6021D48 = 0x6021D48; +D_6021E00 = 0x6021E00; +D_6021E90 = 0x6021E90; +D_6022090 = 0x6022090; +D_60222E0 = 0x60222E0; +D_60225A0 = 0x60225A0; +D_60225C0 = 0x60225C0; +D_60226C0 = 0x60226C0; +D_6022AAC = 0x6022AAC; +D_6022B78 = 0x6022B78; +D_6022EF0 = 0x6022EF0; +D_6022FB0 = 0x6022FB0; +D_60232C0 = 0x60232C0; +D_6023320 = 0x6023320; +D_6023504 = 0x6023504; +D_60236BC = 0x60236BC; +D_6023788 = 0x6023788; +D_6023D04 = 0x6023D04; +D_6023FA0 = 0x6023FA0; +D_6024210 = 0x6024210; +D_602439C = 0x602439C; +D_60246C0 = 0x60246C0; +D_6024880 = 0x6024880; +D_6024910 = 0x6024910; +D_60249F0 = 0x60249F0; +D_6024AD0 = 0x6024AD0; +D_6024CB0 = 0x6024CB0; +D_6024D70 = 0x6024D70; +D_6024E90 = 0x6024E90; +D_60254E0 = 0x60254E0; +D_6025640 = 0x6025640; +D_60256E8 = 0x60256E8; +D_6025730 = 0x6025730; +D_6025848 = 0x6025848; +D_6025950 = 0x6025950; +D_6025A10 = 0x6025A10; +D_6025BBC = 0x6025BBC; +D_6025E20 = 0x6025E20; +D_6025E90 = 0x6025E90; +D_6026150 = 0x6026150; +D_6026160 = 0x6026160; +D_60261E0 = 0x60261E0; +D_6026980 = 0x6026980; +D_6026B30 = 0x6026B30; +D_6026B7C = 0x6026B7C; +D_6026E88 = 0x6026E88; +D_6027080 = 0x6027080; +D_60271D0 = 0x60271D0; +D_6027230 = 0x6027230; +D_602753C = 0x602753C; +D_6027660 = 0x6027660; +D_6027694 = 0x6027694; +D_60278A0 = 0x60278A0; +D_6027A60 = 0x6027A60; +D_6027A70 = 0x6027A70; +D_6027C70 = 0x6027C70; +D_6027D10 = 0x6027D10; +D_6027FA0 = 0x6027FA0; +D_6028160 = 0x6028160; +D_602826C = 0x602826C; +D_602846C = 0x602846C; +D_6028D20 = 0x6028D20; +D_6028EA0 = 0x6028EA0; +D_6028EC0 = 0x6028EC0; +D_60297E0 = 0x60297E0; +D_60298EC = 0x60298EC; +D_60298F0 = 0x60298F0; +D_6029DE0 = 0x6029DE0; +D_6029DF4 = 0x6029DF4; +D_6029EC4 = 0x6029EC4; +D_6029F18 = 0x6029F18; +D_6029FB0 = 0x6029FB0; +D_602A0B0 = 0x602A0B0; +D_602A200 = 0x602A200; +D_602A370 = 0x602A370; +D_602A39C = 0x602A39C; +D_602A5E0 = 0x602A5E0; +D_602A970 = 0x602A970; +D_602AC28 = 0x602AC28; +D_602ACB0 = 0x602ACB0; +D_602AD60 = 0x602AD60; +D_602AF50 = 0x602AF50; +D_602AFD0 = 0x602AFD0; +D_602B0A8 = 0x602B0A8; +D_602B1F4 = 0x602B1F4; +D_602B3AC = 0x602B3AC; +D_602B49C = 0x602B49C; +D_602B5C8 = 0x602B5C8; +D_602B6B8 = 0x602B6B8; +D_602B6D0 = 0x602B6D0; +D_602B750 = 0x602B750; +D_602BC40 = 0x602BC40; +D_602BD50 = 0x602BD50; +D_602BF50 = 0x602BF50; +D_602C040 = 0x602C040; +D_602C0A0 = 0x602C0A0; +D_602C584 = 0x602C584; +D_602C5FC = 0x602C5FC; +D_602C6C0 = 0x602C6C0; +D_602C6C8 = 0x602C6C8; +D_602C7C8 = 0x602C7C8; +D_602C7F0 = 0x602C7F0; +D_602C850 = 0x602C850; +D_602C858 = 0x602C858; +D_602C9BC = 0x602C9BC; +D_602CAC0 = 0x602CAC0; +D_602CB18 = 0x602CB18; +D_602D250 = 0x602D250; +D_602D480 = 0x602D480; +D_602D798 = 0x602D798; +D_602D858 = 0x602D858; +D_602D9E4 = 0x602D9E4; +D_602DC28 = 0x602DC28; +D_602DC50 = 0x602DC50; +D_602DD00 = 0x602DD00; +D_602DDD0 = 0x602DDD0; +D_602DECC = 0x602DECC; +D_602DF94 = 0x602DF94; +D_602E180 = 0x602E180; +D_602E220 = 0x602E220; +D_602E620 = 0x602E620; +D_602E730 = 0x602E730; +D_602EF80 = 0x602EF80; +D_602F014 = 0x602F014; +D_602F12C = 0x602F12C; +D_602F5A0 = 0x602F5A0; +D_602F730 = 0x602F730; +D_602F840 = 0x602F840; +D_6030178 = 0x6030178; +D_603026C = 0x603026C; +D_6030A2C = 0x6030A2C; +D_6030CB8 = 0x6030CB8; +D_6030ECC = 0x6030ECC; +D_6031078 = 0x6031078; +D_60311A0 = 0x60311A0; +D_6031348 = 0x6031348; +D_6031558 = 0x6031558; +D_6031724 = 0x6031724; +D_60317A0 = 0x60317A0; +D_60317CC = 0x60317CC; +D_60317E8 = 0x60317E8; +D_603182C = 0x603182C; +D_6031840 = 0x6031840; +D_6031BF4 = 0x6031BF4; +D_6031F3C = 0x6031F3C; +D_6031F74 = 0x6031F74; +D_6031FAC = 0x6031FAC; +D_603201C = 0x603201C; +D_60320B0 = 0x60320B0; +D_6032374 = 0x6032374; +D_6032460 = 0x6032460; +D_6032480 = 0x6032480; +D_6032820 = 0x6032820; +D_6032B00 = 0x6032B00; +D_6032B90 = 0x6032B90; +D_6032BE8 = 0x6032BE8; +D_6032C10 = 0x6032C10; +D_6032CF0 = 0x6032CF0; +D_6032E90 = 0x6032E90; +D_60331B0 = 0x60331B0; +D_6033408 = 0x6033408; +D_60334E8 = 0x60334E8; +D_6033590 = 0x6033590; +D_6033630 = 0x6033630; +D_603373C = 0x603373C; +D_6033848 = 0x6033848; +D_60339AC = 0x60339AC; +D_6033E30 = 0x6033E30; +D_6033EF8 = 0x6033EF8; +D_6034540 = 0x6034540; +D_6034740 = 0x6034740; +D_6034B80 = 0x6034B80; +D_603513C = 0x603513C; +D_60351A0 = 0x60351A0; +D_6035204 = 0x6035204; +D_6035288 = 0x6035288; +D_60352FC = 0x60352FC; +D_6035380 = 0x6035380; +D_60353E4 = 0x60353E4; +D_6036710 = 0x6036710; +D_6037920 = 0x6037920; +D_6037B38 = 0x6037B38; +D_6037C8C = 0x6037C8C; +D_6037D70 = 0x6037D70; +D_6037DE0 = 0x6037DE0; +D_6037E6C = 0x6037E6C; +D_6037F30 = 0x6037F30; +D_6037F54 = 0x6037F54; +D_6038290 = 0x6038290; +D_6038328 = 0x6038328; +D_603838C = 0x603838C; +D_60383C0 = 0x60383C0; +D_60383F0 = 0x60383F0; +D_6038454 = 0x6038454; +D_60384B8 = 0x60384B8; +D_603851C = 0x603851C; +D_6038850 = 0x6038850; +D_603894C = 0x603894C; +D_60389E0 = 0x60389E0; +D_6038C10 = 0x6038C10; +D_6038C3C = 0x6038C3C; +D_6038CD8 = 0x6038CD8; +D_603A698 = 0x603A698; +D_603C870 = 0x603C870; +D_603CBF4 = 0x603CBF4; +D_603F568 = 0x603F568; +D_60402C8 = 0x60402C8; +D_6040344 = 0x6040344; +D_60404A4 = 0x60404A4; +D_60405D0 = 0x60405D0; +D_60406B8 = 0x60406B8; +D_60408D0 = 0x60408D0; +D_6040A70 = 0x6040A70; +D_6041DCC = 0x6041DCC; +D_60429E0 = 0x60429E0; +D_604380C = 0x604380C; +D_6044768 = 0x6044768; +D_60461E0 = 0x60461E0; +D_604F560 = 0x604F560; +D_7000490 = 0x7000490; +D_7000B50 = 0x7000B50; +D_7000D30 = 0x7000D30; +D_7001540 = 0x7001540; +D_7001F80 = 0x7001F80; +D_7002120 = 0x7002120; +D_7003770 = 0x7003770; +D_7003990 = 0x7003990; +D_7003EE8 = 0x7003EE8; +D_7004240 = 0x7004240; +D_7005300 = 0x7005300; +D_7007CC4 = 0x7007CC4; +D_7007E90 = 0x7007E90; +D_7008474 = 0x7008474; +D_70084CC = 0x70084CC; +D_7008630 = 0x7008630; +D_7008734 = 0x7008734; +D_700883C = 0x700883C; +D_7008850 = 0x7008850; +D_70096EC = 0x70096EC; +D_7009A80 = 0x7009A80; +D_7009E30 = 0x7009E30; +D_700A110 = 0x700A110; +D_700AA10 = 0x700AA10; +D_700ADE0 = 0x700ADE0; +D_700B260 = 0x700B260; +D_700BE90 = 0x700BE90; +D_700C620 = 0x700C620; +D_700C8B0 = 0x700C8B0; +D_700CEC0 = 0x700CEC0; +D_700D010 = 0x700D010; +D_700D050 = 0x700D050; +D_700D9B0 = 0x700D9B0; +D_700DA50 = 0x700DA50; +D_700DB68 = 0x700DB68; +D_700DDD8 = 0x700DDD8; +D_700DE64 = 0x700DE64; +D_700DE80 = 0x700DE80; +D_700DFF4 = 0x700DFF4; +D_700E060 = 0x700E060; +D_700E244 = 0x700E244; +D_700E9E0 = 0x700E9E0; +D_700EA34 = 0x700EA34; +D_700EA38 = 0x700EA38; +D_700EC00 = 0x700EC00; +D_700F240 = 0x700F240; +D_700F320 = 0x700F320; +D_700F8F0 = 0x700F8F0; +D_7010970 = 0x7010970; +D_7010E10 = 0x7010E10; +D_7010EE0 = 0x7010EE0; +D_7010F00 = 0x7010F00; +D_7010FD0 = 0x7010FD0; +D_7010FF0 = 0x7010FF0; +D_70110C0 = 0x70110C0; +D_70110E0 = 0x70110E0; +D_70111B0 = 0x70111B0; +D_8000100 = 0x8000100; +D_8000180 = 0x8000180; +D_8000708 = 0x8000708; +D_8000D80 = 0x8000D80; +D_8000D90 = 0x8000D90; +D_8000FC0 = 0x8000FC0; +D_80010C0 = 0x80010C0; +D_8001100 = 0x8001100; +D_8001150 = 0x8001150; +D_8001170 = 0x8001170; +D_80011C8 = 0x80011C8; +D_8001290 = 0x8001290; +D_80012D8 = 0x80012D8; +D_8001300 = 0x8001300; +D_8001348 = 0x8001348; +D_8002F30 = 0x8002F30; +D_80037D0 = 0x80037D0; +D_8008FE8 = 0x8008FE8; +D_8025080 = 0x8025080; +D_9002CF0 = 0x9002CF0; +D_9003330 = 0x9003330; +D_9003890 = 0x9003890; +D_9003DF0 = 0x9003DF0; +D_9004288 = 0x9004288; +D_900D098 = 0x900D098; +D_900D164 = 0x900D164; +D_900D180 = 0x900D180; +D_900DF20 = 0x900DF20; +D_900FC4C = 0x900FC4C; +D_9010FD0 = 0x9010FD0; +D_9011200 = 0x9011200; +D_9013C20 = 0x9013C20; +D_901C0F4 = 0x901C0F4; +D_901DA50 = 0x901DA50; +D_9023290 = 0x9023290; +D_90234D0 = 0x90234D0; +D_A0002BC = 0xA0002BC; +D_A00047C = 0xA00047C; +D_A000568 = 0xA000568; +D_A000858 = 0xA000858; +D_A000934 = 0xA000934; +D_A000D50 = 0xA000D50; +D_A000EDC = 0xA000EDC; +D_A001A70 = 0xA001A70; +D_A009990 = 0xA009990; +D_C00308C = 0xC00308C; +D_C003654 = 0xC003654; +D_C003B08 = 0xC003B08; +D_C003B20 = 0xC003B20; +D_C003F00 = 0xC003F00; +D_C0053D0 = 0xC0053D0; +D_C005860 = 0xC005860; +D_C007F08 = 0xC007F08; +D_C00EE48 = 0xC00EE48; +D_C00F598 = 0xC00F598; +D_C016740 = 0xC016740; +D_C018050 = 0xC018050; +D_C018430 = 0xC018430; +D_C018440 = 0xC018440; +D_C018598 = 0xC018598; +D_C019BC4 = 0xC019BC4; +D_C01DC3C = 0xC01DC3C; +D_C023520 = 0xC023520; +D_C024B54 = 0xC024B54; +D_C0250D0 = 0xC0250D0; +D_C026C00 = 0xC026C00; +D_C02AF74 = 0xC02AF74; +D_C02F494 = 0xC02F494; +D_C02FDA0 = 0xC02FDA0; +D_C031244 = 0xC031244; +D_C034780 = 0xC034780; +D_C034D98 = 0xC034D98; +D_C0366A4 = 0xC0366A4; +D_C0366CC = 0xC0366CC; +D_C037310 = 0xC037310; +D_C037B6C = 0xC037B6C; +D_C03833C = 0xC03833C; +D_C038E3C = 0xC038E3C; +D_C039AC4 = 0xC039AC4; +D_C039CCC = 0xC039CCC; +D_C039F24 = 0xC039F24; +D_C039FE8 = 0xC039FE8; +D_C03A208 = 0xC03A208; +D_C03A290 = 0xC03A290; +D_C03B290 = 0xC03B290; +D_D000170 = 0xD000170; +D_D001090 = 0xD001090; +D_D001FB0 = 0xD001FB0; +D_D002ED0 = 0xD002ED0; +D_D003DF0 = 0xD003DF0; +D_D004D10 = 0xD004D10; +D_D005C30 = 0xD005C30; +D_D006B50 = 0xD006B50; +D_D007A70 = 0xD007A70; +D_D008990 = 0xD008990; +D_D0098B0 = 0xD0098B0; +D_D009A40 = 0xD009A40; +D_D00B880 = 0xD00B880; +D_E000000 = 0xE000000; +D_E003AB0 = 0xE003AB0; +D_E00DFB0 = 0xE00DFB0; +D_E00E100 = 0xE00E100; +D_E00F020 = 0xE00F020; +D_E00FF40 = 0xE00FF40; +D_E010E60 = 0xE010E60; +D_F000000 = 0xF000000; +D_F000F20 = 0xF000F20; +D_F001E40 = 0xF001E40; +D_F002500 = 0xF002500; +D_F002D00 = 0xF002D00; +D_F002D60 = 0xF002D60; +D_F003500 = 0xF003500; +D_F003C80 = 0xF003C80; +D_F003D00 = 0xF003D00; +D_F004500 = 0xF004500; +D_F004BA0 = 0xF004BA0; +D_F005AC0 = 0xF005AC0; +D_F0069E0 = 0xF0069E0; +D_F007900 = 0xF007900; +D_F008820 = 0xF008820; +D_F009740 = 0xF009740; +D_F00A660 = 0xF00A660; +D_F00B580 = 0xF00B580; +D_F00C4A0 = 0xF00C4A0; +D_F00D3C0 = 0xF00D3C0; +D_F00E2E0 = 0xF00E2E0; +D_F00F200 = 0xF00F200; +D_F0103D0 = 0xF0103D0; +D_F014180 = 0xF014180; +D_F014310 = 0xF014310; diff --git a/linker_scripts/eu/rev0/symbol_addrs_fix.txt b/linker_scripts/eu/rev0/symbol_addrs_fix.txt index 0dd634bf..dfd4205c 100644 --- a/linker_scripts/eu/rev0/symbol_addrs_fix.txt +++ b/linker_scripts/eu/rev0/symbol_addrs_fix.txt @@ -33,6 +33,8 @@ D_80170000 = 0x80170000; //ignore:true D_80170001 = 0x80170001; //ignore:true D_80180001 = 0x80180001; //ignore:True D_80180058 = 0x80180058; //ignore:True +D_801D0001 = 0x801D0001; //ignore:True +D_801C0130 = 0x801C0130; //ignore:True // mirage symbols D_3000000 = 0x3000000; //ignore:true @@ -48,6 +50,7 @@ aspMainTextStart = 0x800005A0;//name_end:aspMainTextEnd gspF3DEX_fifoTextStart = 0x80001490;//name_end:gspF3DEX_fifoTextEnd gspF3DEX_fifoDataStart = 0x800C4980; //name_end:gspF3DEX_fifoDataEnd aspMainDataStart = 0x800C3E70; //name_end:aspMainDataEnd +altIPL3Start = 0x8001F090; // redundant rodata D_800D63EC = 0x800D63EC; //force_migration:true @@ -89,13 +92,14 @@ D_C000000C = 0xC000000C;//ignore:true sSamplesPerWavePeriod = 0x800C63E8; //size:0x4 type:u8 sOvlUnused_Unk = 0x800CCBAC; D_800D6994 = 0x800D6994; -D_80161A91 = 0x80161A91; D_801BE59C = 0x801BE59C; //segment:ovl_i5 // fake symbol removal -D_800CCC44 = 0x800CCC44; //size:0x98 gDmaTable = 0x8017ABE0; //size:0x650 +// that stupid thing where i6 sets a value in ending +D_i6_8019A490 = 0x8019A490; //ignore:true segment:ovl_i6 + // dma symbols dma_table_ROM_START = 0xE0570; audio_seq_ROM_START = 0xE0BC0; diff --git a/linker_scripts/eu/rev0/undefined_syms.ld b/linker_scripts/eu/rev0/undefined_syms.ld index e8ec3377..1b309c0d 100644 --- a/linker_scripts/eu/rev0/undefined_syms.ld +++ b/linker_scripts/eu/rev0/undefined_syms.ld @@ -1041,197 +1041,3 @@ D_F00F200 = 0xF00F200; D_F0103D0 = 0xF0103D0; D_F014180 = 0xF014180; D_F014310 = 0xF014310; - -D_8018751C = 0x8018751C; -D_80187ED8 = 0x80187ED8; -D_801897B4 = 0x801897B4; -D_8019DA68 = 0x8019DA68; -D_801A27E0 = 0x801A27E0; -D_801A3CC0 = 0x801A3CC0; -D_801AB968 = 0x801AB968; -D_801AB970 = 0x801AB970; -D_801AB978 = 0x801AB978; -D_801AB980 = 0x801AB980; -D_801AB988 = 0x801AB988; -D_801BAE4C = 0x801BAE4C; -D_801BAFC4 = 0x801BAFC4; -D_801BB048 = 0x801BB048; -D_801BB0DC = 0x801BB0DC; -D_801BDC28 = 0x801BDC28; -D_801C1C88 = 0x801C1C88; -D_801C1C90 = 0x801C1C90; -D_801C1C94 = 0x801C1C94; -D_801C1CAC = 0x801C1CAC; -D_801C1CB8 = 0x801C1CB8; -D_801C1CBC = 0x801C1CBC; -D_801C1CD4 = 0x801C1CD4; -D_801C1CDC = 0x801C1CDC; -D_801C1D32 = 0x801C1D32; -D_801C7BE8 = 0x801C7BE8; -D_801D1BC8 = 0x801D1BC8; -D_801D1BD0 = 0x801D1BD0; -D_801D1BD4 = 0x801D1BD4; -D_801D1BD8 = 0x801D1BD8; -D_801D1BDC = 0x801D1BDC; - -func_80025E38 = 0x80025E38; -func_800C227C = 0x800C227C; -func_800C2284 = 0x800C2284; -func_8018B020 = 0x8018B020; -func_8018B030 = 0x8018B030; -func_8018B19C = 0x8018B19C; -func_8018B254 = 0x8018B254; -func_8018B3A8 = 0x8018B3A8; -func_8018B3D8 = 0x8018B3D8; -func_8018B460 = 0x8018B460; -func_8018B608 = 0x8018B608; -func_8018BDC8 = 0x8018BDC8; -func_8018C3F4 = 0x8018C3F4; -func_8018C53C = 0x8018C53C; -func_8018CA10 = 0x8018CA10; -func_8018CC00 = 0x8018CC00; -func_8018CD14 = 0x8018CD14; -func_8018D660 = 0x8018D660; -func_8018E458 = 0x8018E458; -func_8018E5D8 = 0x8018E5D8; -func_8018E8A4 = 0x8018E8A4; -func_8018EB6C = 0x8018EB6C; -func_8018F200 = 0x8018F200; -func_8018F44C = 0x8018F44C; -func_8018F494 = 0x8018F494; -func_8018F8AC = 0x8018F8AC; -func_8018F934 = 0x8018F934; -func_8018FA90 = 0x8018FA90; -func_8018FBB8 = 0x8018FBB8; -func_8018FE64 = 0x8018FE64; -func_801907C8 = 0x801907C8; -func_8019085C = 0x8019085C; -func_80190C40 = 0x80190C40; -func_80191534 = 0x80191534; -func_80191A50 = 0x80191A50; -func_80191B88 = 0x80191B88; -func_80191E90 = 0x80191E90; -func_80191EAC = 0x80191EAC; -func_801920C8 = 0x801920C8; -func_8019284C = 0x8019284C; -func_80192890 = 0x80192890; -func_80192998 = 0x80192998; -func_80192AD0 = 0x80192AD0; -func_80192BB8 = 0x80192BB8; -func_801932F4 = 0x801932F4; -func_8019337C = 0x8019337C; -func_80193528 = 0x80193528; -func_80193BCC = 0x80193BCC; -func_80193F00 = 0x80193F00; -func_801949D8 = 0x801949D8; -func_80194BE0 = 0x80194BE0; -func_80195074 = 0x80195074; -func_80195688 = 0x80195688; -func_801958F8 = 0x801958F8; -func_80195C84 = 0x80195C84; -func_80195F7C = 0x80195F7C; -func_80196720 = 0x80196720; -func_80196840 = 0x80196840; -func_80196914 = 0x80196914; -func_80196D7C = 0x80196D7C; -func_80196E24 = 0x80196E24; -func_8019703C = 0x8019703C; -func_801974FC = 0x801974FC; -func_801976C0 = 0x801976C0; -func_8019771C = 0x8019771C; -func_801981F4 = 0x801981F4; -func_801998F4 = 0x801998F4; -func_80199C5C = 0x80199C5C; -func_80199DC4 = 0x80199DC4; -func_8019A3FC = 0x8019A3FC; -func_8019A68C = 0x8019A68C; -func_8019A81C = 0x8019A81C; -func_8019ACBC = 0x8019ACBC; -func_8019B744 = 0x8019B744; -func_8019B930 = 0x8019B930; -func_8019BD70 = 0x8019BD70; -func_8019BFE8 = 0x8019BFE8; -func_8019BFF4 = 0x8019BFF4; -func_8019C0AC = 0x8019C0AC; -func_8019C318 = 0x8019C318; -func_8019C340 = 0x8019C340; -func_8019C360 = 0x8019C360; -func_8019C6B0 = 0x8019C6B0; -func_8019CB88 = 0x8019CB88; -func_8019CEFC = 0x8019CEFC; -func_8019D2D0 = 0x8019D2D0; -func_8019D3D0 = 0x8019D3D0; -func_8019D630 = 0x8019D630; -func_8019DA3C = 0x8019DA3C; -func_8019E548 = 0x8019E548; -func_8019EC80 = 0x8019EC80; -func_8019F2A0 = 0x8019F2A0; -func_8019F408 = 0x8019F408; -func_8019FC90 = 0x8019FC90; -func_801A01F8 = 0x801A01F8; -func_801A0AF0 = 0x801A0AF0; -func_801A0EB8 = 0x801A0EB8; -func_801A1204 = 0x801A1204; -func_801A1680 = 0x801A1680; -func_801A2070 = 0x801A2070; -func_801A2338 = 0x801A2338; -func_801A23C0 = 0x801A23C0; -func_801A2474 = 0x801A2474; -func_801A2898 = 0x801A2898; -func_801A391C = 0x801A391C; -func_801A3ED0 = 0x801A3ED0; -func_801A44DC = 0x801A44DC; -func_801A4B74 = 0x801A4B74; -func_801A6DA0 = 0x801A6DA0; -func_801A7230 = 0x801A7230; -func_801A75F0 = 0x801A75F0; -func_801A76C0 = 0x801A76C0; -func_801A7910 = 0x801A7910; -func_801A8100 = 0x801A8100; -func_801A8598 = 0x801A8598; -func_801A86CC = 0x801A86CC; -func_801A906C = 0x801A906C; -func_801A94E4 = 0x801A94E4; -func_801A98C4 = 0x801A98C4; -func_801A99D0 = 0x801A99D0; -func_801A9B74 = 0x801A9B74; -func_801A9BCC = 0x801A9BCC; -func_801AA078 = 0x801AA078; -func_801AB3C8 = 0x801AB3C8; -func_801AB830 = 0x801AB830; -func_801AC670 = 0x801AC670; -func_801AD2A4 = 0x801AD2A4; -func_801ADC8C = 0x801ADC8C; -func_801AE368 = 0x801AE368; -func_801AE778 = 0x801AE778; -func_801AF430 = 0x801AF430; -func_801AF4C0 = 0x801AF4C0; -func_801AFCF4 = 0x801AFCF4; -func_801B01D4 = 0x801B01D4; -func_801B0328 = 0x801B0328; -func_801B0634 = 0x801B0634; -func_801B08D0 = 0x801B08D0; -func_801B0A3C = 0x801B0A3C; -func_801B0B00 = 0x801B0B00; -func_801B0BC4 = 0x801B0BC4; -func_801B0DA8 = 0x801B0DA8; -func_801B1108 = 0x801B1108; -func_801B1E2C = 0x801B1E2C; -func_801B3374 = 0x801B3374; -func_801B3474 = 0x801B3474; -func_801B4B6C = 0x801B4B6C; -func_801B6314 = 0x801B6314; -func_801B775C = 0x801B775C; -func_801B8B50 = 0x801B8B50; -func_801B92EC = 0x801B92EC; -func_801B9DA4 = 0x801B9DA4; -func_801BA52C = 0x801BA52C; -func_801BA860 = 0x801BA860; -func_801BA8B4 = 0x801BA8B4; -func_801BB550 = 0x801BB550; -func_801BDFDC = 0x801BDFDC; -func_801BECCC = 0x801BECCC; -func_801C1974 = 0x801C1974; -func_801C1A94 = 0x801C1A94; -func_801C1B50 = 0x801C1B50; -func_801C26E0 = 0x801C26E0; diff --git a/linker_scripts/jp/rev0/symbol_addrs_assets.txt b/linker_scripts/jp/rev0/symbol_addrs_assets.txt new file mode 100644 index 00000000..1491e6d7 --- /dev/null +++ b/linker_scripts/jp/rev0/symbol_addrs_assets.txt @@ -0,0 +1,1088 @@ +D_1000170 = 0x1000170; +D_1001090 = 0x1001090; +D_1001FB0 = 0x1001FB0; +D_1002ED0 = 0x1002ED0; +D_1003DF0 = 0x1003DF0; +D_1004D10 = 0x1004D10; +D_1005C30 = 0x1005C30; +D_1006B50 = 0x1006B50; +D_1007A70 = 0x1007A70; +D_1008990 = 0x1008990; +D_10098B0 = 0x10098B0; +D_100A7D0 = 0x100A7D0; +D_100B6F0 = 0x100B6F0; +D_100E150 = 0x100E150; +D_100E570 = 0x100E570; +D_100E580 = 0x100E580; +D_100E600 = 0x100E600; +D_100E910 = 0x100E910; +D_100E980 = 0x100E980; +D_100E990 = 0x100E990; +D_100EA60 = 0x100EA60; +D_100EA80 = 0x100EA80; +D_100EB50 = 0x100EB50; +D_100EB70 = 0x100EB70; +D_100EC40 = 0x100EC40; +D_100EC60 = 0x100EC60; +D_100ED30 = 0x100ED30; +D_100ED50 = 0x100ED50; +D_100ED90 = 0x100ED90; +D_100EDA0 = 0x100EDA0; +D_100EDD8 = 0x100EDD8; +D_100EDF0 = 0x100EDF0; +D_100EFE0 = 0x100EFE0; +D_100F6A0 = 0x100F6A0; +D_100F768 = 0x100F768; +D_100F790 = 0x100F790; +D_100F858 = 0x100F858; +D_100F890 = 0x100F890; +D_100FF60 = 0x100FF60; +D_1010040 = 0x1010040; +D_1010440 = 0x1010440; +D_1010450 = 0x1010450; +D_10105D0 = 0x10105D0; +D_10123E0 = 0x10123E0; +D_1012850 = 0x1012850; +D_1013450 = 0x1013450; +D_1013740 = 0x1013740; +D_1014690 = 0x1014690; +D_1015190 = 0x1015190; +D_1015F90 = 0x1015F90; +D_1016390 = 0x1016390; +D_10166F0 = 0x10166F0; +D_1016B70 = 0x1016B70; +D_1017440 = 0x1017440; +D_10177B0 = 0x10177B0; +D_1017AA0 = 0x1017AA0; +D_1017BF0 = 0x1017BF0; +D_1017DA0 = 0x1017DA0; +D_10191B0 = 0x10191B0; +D_101A370 = 0x101A370; +D_101A5B0 = 0x101A5B0; +D_101A670 = 0x101A670; +D_101A800 = 0x101A800; +D_101ABC0 = 0x101ABC0; +D_101B400 = 0x101B400; +D_101B460 = 0x101B460; +D_101BC60 = 0x101BC60; +D_101BEF0 = 0x101BEF0; +D_101C1F0 = 0x101C1F0; +D_101CD90 = 0x101CD90; +D_1020FA0 = 0x1020FA0; +D_1022000 = 0x1022000; +D_1022320 = 0x1022320; +D_1022880 = 0x1022880; +D_10228D0 = 0x10228D0; +D_1022E00 = 0x1022E00; +D_10233B0 = 0x10233B0; +D_1023410 = 0x1023410; +D_10239B0 = 0x10239B0; +D_1023B10 = 0x1023B10; +D_1023BD8 = 0x1023BD8; +D_1023C40 = 0x1023C40; +D_10240E0 = 0x10240E0; +D_1024980 = 0x1024980; +D_1025210 = 0x1025210; +D_10273B0 = 0x10273B0; +D_1028900 = 0x1028900; +D_1029190 = 0x1029190; +D_1029A20 = 0x1029A20; +D_102DED0 = 0x102DED0; +D_102E760 = 0x102E760; +D_102F000 = 0x102F000; +D_102F088 = 0x102F088; +D_10307B0 = 0x10307B0; +D_1031040 = 0x1031040; +D_1031900 = 0x1031900; +D_20031B0 = 0x20031B0; +D_2006F50 = 0x2006F50; +D_200D750 = 0x200D750; +D_2010A30 = 0x2010A30; +D_20112C0 = 0x20112C0; +D_3000090 = 0x3000090; +D_3000120 = 0x3000120; +D_3000130 = 0x3000130; +D_3000470 = 0x3000470; +D_30004C0 = 0x30004C0; +D_3000600 = 0x3000600; +D_3000620 = 0x3000620; +D_3000660 = 0x3000660; +D_30007B0 = 0x30007B0; +D_30007D0 = 0x30007D0; +D_3000910 = 0x3000910; +D_3000930 = 0x3000930; +D_3000AD0 = 0x3000AD0; +D_3000AF0 = 0x3000AF0; +D_3000C70 = 0x3000C70; +D_3002E80 = 0x3002E80; +D_30034F0 = 0x30034F0; +D_3004680 = 0x3004680; +D_30053E0 = 0x30053E0; +D_3005980 = 0x3005980; +D_3005AB0 = 0x3005AB0; +D_3005C80 = 0x3005C80; +D_3005EA8 = 0x3005EA8; +D_30066B0 = 0x30066B0; +D_3006940 = 0x3006940; +D_3006AF0 = 0x3006AF0; +D_3006C70 = 0x3006C70; +D_3006DE0 = 0x3006DE0; +D_3007E70 = 0x3007E70; +D_3008100 = 0x3008100; +D_3008BF0 = 0x3008BF0; +D_3009998 = 0x3009998; +D_300ADE0 = 0x300ADE0; +D_300B8D0 = 0x300B8D0; +D_300BAD0 = 0x300BAD0; +D_300BB18 = 0x300BB18; +D_300BB40 = 0x300BB40; +D_300BB88 = 0x300BB88; +D_300BBC0 = 0x300BBC0; +D_300BC80 = 0x300BC80; +D_300BCD0 = 0x300BCD0; +D_300D600 = 0x300D600; +D_300E300 = 0x300E300; +D_300F210 = 0x300F210; +D_300FBF0 = 0x300FBF0; +D_30105C0 = 0x30105C0; +D_3010660 = 0x3010660; +D_3011720 = 0x3011720; +D_3012160 = 0x3012160; +D_3012980 = 0x3012980; +D_30129C0 = 0x30129C0; +D_30131F0 = 0x30131F0; +D_3014BF0 = 0x3014BF0; +D_3015120 = 0x3015120; +D_3015230 = 0x3015230; +D_30155E0 = 0x30155E0; +D_3015AF4 = 0x3015AF4; +D_3015C28 = 0x3015C28; +D_3015D80 = 0x3015D80; +D_30162C0 = 0x30162C0; +D_30163C4 = 0x30163C4; +D_3016610 = 0x3016610; +D_3016660 = 0x3016660; +D_3016B30 = 0x3016B30; +D_3016C20 = 0x3016C20; +D_30183D0 = 0x30183D0; +D_30184D8 = 0x30184D8; +D_3019380 = 0x3019380; +D_30194E0 = 0x30194E0; +D_301B8E0 = 0x301B8E0; +D_301BA70 = 0x301BA70; +D_301C260 = 0x301C260; +D_301CF28 = 0x301CF28; +D_301D194 = 0x301D194; +D_301DB6C = 0x301DB6C; +D_301DDD8 = 0x301DDD8; +D_301E408 = 0x301E408; +D_301E714 = 0x301E714; +D_301ED1C = 0x301ED1C; +D_301EF68 = 0x301EF68; +D_301F0F0 = 0x301F0F0; +D_301FCC0 = 0x301FCC0; +D_30208A0 = 0x30208A0; +D_302DCA0 = 0x302DCA0; +D_302DDC0 = 0x302DDC0; +D_302E050 = 0x302E050; +D_302E8F0 = 0x302E8F0; +D_302E934 = 0x302E934; +D_302E978 = 0x302E978; +D_302E9BC = 0x302E9BC; +D_302EC64 = 0x302EC64; +D_302ECF0 = 0x302ECF0; +D_302EEF8 = 0x302EEF8; +D_302F0EC = 0x302F0EC; +D_302F1DC = 0x302F1DC; +D_302F2CC = 0x302F2CC; +D_302F3B0 = 0x302F3B0; +D_302F4DC = 0x302F4DC; +D_302F5CC = 0x302F5CC; +D_302F6BC = 0x302F6BC; +D_302F7A0 = 0x302F7A0; +D_4000080 = 0x4000080; +D_400014C = 0x400014C; +D_40001A4 = 0x40001A4; +D_4000270 = 0x4000270; +D_40018A0 = 0x40018A0; +D_4003BD0 = 0x4003BD0; +D_40057AC = 0x40057AC; +D_40058B8 = 0x40058B8; +D_40068F0 = 0x40068F0; +D_4007870 = 0x4007870; +D_4007AF0 = 0x4007AF0; +D_4008CE0 = 0x4008CE0; +D_4008F70 = 0x4008F70; +D_400A30C = 0x400A30C; +D_400A398 = 0x400A398; +D_400AAE0 = 0x400AAE0; +D_400B390 = 0x400B390; +D_5000200 = 0x5000200; +D_5000300 = 0x5000300; +D_5000500 = 0x5000500; +D_5000DA0 = 0x5000DA0; +D_5000E90 = 0x5000E90; +D_5000F80 = 0x5000F80; +D_5001130 = 0x5001130; +D_5001740 = 0x5001740; +D_5001930 = 0x5001930; +D_5001F50 = 0x5001F50; +D_5002070 = 0x5002070; +D_5002C20 = 0x5002C20; +D_5003070 = 0x5003070; +D_5005430 = 0x5005430; +D_5005CB0 = 0x5005CB0; +D_5005DA0 = 0x5005DA0; +D_5005E90 = 0x5005E90; +D_5005F80 = 0x5005F80; +D_5006070 = 0x5006070; +D_5006160 = 0x5006160; +D_5006250 = 0x5006250; +D_5006650 = 0x5006650; +D_50070A0 = 0x50070A0; +D_5007770 = 0x5007770; +D_5008A50 = 0x5008A50; +D_500A040 = 0x500A040; +D_6000290 = 0x6000290; +D_6000320 = 0x6000320; +D_6000604 = 0x6000604; +D_60006B0 = 0x60006B0; +D_6000880 = 0x6000880; +D_6000890 = 0x6000890; +D_60008D0 = 0x60008D0; +D_60008E0 = 0x60008E0; +D_6000930 = 0x6000930; +D_6000A40 = 0x6000A40; +D_6000F20 = 0x6000F20; +D_6001110 = 0x6001110; +D_6001120 = 0x6001120; +D_60012D0 = 0x60012D0; +D_60016A0 = 0x60016A0; +D_6001730 = 0x6001730; +D_6001984 = 0x6001984; +D_6001B08 = 0x6001B08; +D_6001BA0 = 0x6001BA0; +D_6001BA8 = 0x6001BA8; +D_6001C20 = 0x6001C20; +D_6001C84 = 0x6001C84; +D_6001CD0 = 0x6001CD0; +D_6001D40 = 0x6001D40; +D_6001E40 = 0x6001E40; +D_6001EF0 = 0x6001EF0; +D_6002148 = 0x6002148; +D_60021D0 = 0x60021D0; +D_60021F0 = 0x60021F0; +D_6002320 = 0x6002320; +D_6002394 = 0x6002394; +D_6002730 = 0x6002730; +D_60028B0 = 0x60028B0; +D_6002AF8 = 0x6002AF8; +D_6002D60 = 0x6002D60; +D_6002E60 = 0x6002E60; +D_6002F90 = 0x6002F90; +D_6003090 = 0x6003090; +D_60032C0 = 0x60032C0; +D_6003740 = 0x6003740; +D_6003B00 = 0x6003B00; +D_6003C80 = 0x6003C80; +D_6003D60 = 0x6003D60; +D_6003F50 = 0x6003F50; +D_6004110 = 0x6004110; +D_60041D0 = 0x60041D0; +D_6004250 = 0x6004250; +D_6004350 = 0x6004350; +D_60043C0 = 0x60043C0; +D_6004BA0 = 0x6004BA0; +D_6004BF0 = 0x6004BF0; +D_6004DC0 = 0x6004DC0; +D_6004F80 = 0x6004F80; +D_6005000 = 0x6005000; +D_6005160 = 0x6005160; +D_6005400 = 0x6005400; +D_6005474 = 0x6005474; +D_6005520 = 0x6005520; +D_60055A0 = 0x60055A0; +D_6005720 = 0x6005720; +D_60057F0 = 0x60057F0; +D_6005800 = 0x6005800; +D_6005EB0 = 0x6005EB0; +D_6006040 = 0x6006040; +D_6006060 = 0x6006060; +D_6006090 = 0x6006090; +D_6006110 = 0x6006110; +D_60061E0 = 0x60061E0; +D_60062B0 = 0x60062B0; +D_6006318 = 0x6006318; +D_600636C = 0x600636C; +D_6006380 = 0x6006380; +D_6006558 = 0x6006558; +D_60065F0 = 0x60065F0; +D_6006610 = 0x6006610; +D_6006630 = 0x6006630; +D_6006720 = 0x6006720; +D_6006860 = 0x6006860; +D_60068EC = 0x60068EC; +D_6006920 = 0x6006920; +D_600693C = 0x600693C; +D_6006958 = 0x6006958; +D_6006974 = 0x6006974; +D_6006990 = 0x6006990; +D_60069AC = 0x60069AC; +D_60069C8 = 0x60069C8; +D_60069E4 = 0x60069E4; +D_6006A00 = 0x6006A00; +D_6006A1C = 0x6006A1C; +D_6006B44 = 0x6006B44; +D_6006BE0 = 0x6006BE0; +D_6006BEC = 0x6006BEC; +D_6006C08 = 0x6006C08; +D_6006C24 = 0x6006C24; +D_6006C30 = 0x6006C30; +D_6007854 = 0x6007854; +D_6007980 = 0x6007980; +D_6007BF0 = 0x6007BF0; +D_6007D40 = 0x6007D40; +D_6007FA0 = 0x6007FA0; +D_6008020 = 0x6008020; +D_6008490 = 0x6008490; +D_60088D8 = 0x60088D8; +D_60089E8 = 0x60089E8; +D_6008A8C = 0x6008A8C; +D_6008AD0 = 0x6008AD0; +D_6008AE8 = 0x6008AE8; +D_6008D90 = 0x6008D90; +D_6009010 = 0x6009010; +D_6009070 = 0x6009070; +D_6009210 = 0x6009210; +D_6009250 = 0x6009250; +D_6009290 = 0x6009290; +D_6009350 = 0x6009350; +D_60093B0 = 0x60093B0; +D_6009650 = 0x6009650; +D_60096AC = 0x60096AC; +D_60098E0 = 0x60098E0; +D_60098F0 = 0x60098F0; +D_6009A10 = 0x6009A10; +D_6009BB4 = 0x6009BB4; +D_6009BD0 = 0x6009BD0; +D_6009D30 = 0x6009D30; +D_6009D40 = 0x6009D40; +D_6009DD8 = 0x6009DD8; +D_6009F90 = 0x6009F90; +D_600A0B4 = 0x600A0B4; +D_600A4A0 = 0x600A4A0; +D_600A530 = 0x600A530; +D_600A630 = 0x600A630; +D_600A688 = 0x600A688; +D_600AA78 = 0x600AA78; +D_600AAA0 = 0x600AAA0; +D_600AAE4 = 0x600AAE4; +D_600AC40 = 0x600AC40; +D_600ACEC = 0x600ACEC; +D_600AD10 = 0x600AD10; +D_600AFA0 = 0x600AFA0; +D_600B1B4 = 0x600B1B4; +D_600B350 = 0x600B350; +D_600B4B0 = 0x600B4B0; +D_600B4DC = 0x600B4DC; +D_600B6B0 = 0x600B6B0; +D_600B7C0 = 0x600B7C0; +D_600BAF0 = 0x600BAF0; +D_600BB40 = 0x600BB40; +D_600BB98 = 0x600BB98; +D_600BBE0 = 0x600BBE0; +D_600BC50 = 0x600BC50; +D_600BCC0 = 0x600BCC0; +D_600BDD8 = 0x600BDD8; +D_600BFB0 = 0x600BFB0; +D_600C020 = 0x600C020; +D_600C064 = 0x600C064; +D_600C15C = 0x600C15C; +D_600C200 = 0x600C200; +D_600C300 = 0x600C300; +D_600C4E0 = 0x600C4E0; +D_600C890 = 0x600C890; +D_600CCA8 = 0x600CCA8; +D_600CD50 = 0x600CD50; +D_600CD60 = 0x600CD60; +D_600CDC0 = 0x600CDC0; +D_600CEB0 = 0x600CEB0; +D_600D090 = 0x600D090; +D_600D290 = 0x600D290; +D_600D3DC = 0x600D3DC; +D_600D4E0 = 0x600D4E0; +D_600D560 = 0x600D560; +D_600D5C0 = 0x600D5C0; +D_600D6A0 = 0x600D6A0; +D_600D730 = 0x600D730; +D_600D9AC = 0x600D9AC; +D_600D9F0 = 0x600D9F0; +D_600DB98 = 0x600DB98; +D_600DBC0 = 0x600DBC0; +D_600DDF0 = 0x600DDF0; +D_600DF40 = 0x600DF40; +D_600DFE0 = 0x600DFE0; +D_600E050 = 0x600E050; +D_600E0B0 = 0x600E0B0; +D_600E170 = 0x600E170; +D_600E250 = 0x600E250; +D_600E2C4 = 0x600E2C4; +D_600E470 = 0x600E470; +D_600E540 = 0x600E540; +D_600E690 = 0x600E690; +D_600E740 = 0x600E740; +D_600E830 = 0x600E830; +D_600E908 = 0x600E908; +D_600EA10 = 0x600EA10; +D_600ED44 = 0x600ED44; +D_600EFC4 = 0x600EFC4; +D_600EFF0 = 0x600EFF0; +D_600F000 = 0x600F000; +D_600F08C = 0x600F08C; +D_600F0A0 = 0x600F0A0; +D_600F0F8 = 0x600F0F8; +D_600F140 = 0x600F140; +D_600F1C4 = 0x600F1C4; +D_600F1D0 = 0x600F1D0; +D_600F2AC = 0x600F2AC; +D_600F2F0 = 0x600F2F0; +D_600F580 = 0x600F580; +D_600F670 = 0x600F670; +D_600F680 = 0x600F680; +D_600F744 = 0x600F744; +D_600FAA0 = 0x600FAA0; +D_600FF64 = 0x600FF64; +D_6010198 = 0x6010198; +D_60105D8 = 0x60105D8; +D_6010744 = 0x6010744; +D_60109C0 = 0x60109C0; +D_6010DB0 = 0x6010DB0; +D_60114C0 = 0x60114C0; +D_6011598 = 0x6011598; +D_60118C4 = 0x60118C4; +D_60118E0 = 0x60118E0; +D_60119F0 = 0x60119F0; +D_6011A60 = 0x6011A60; +D_6011A80 = 0x6011A80; +D_6011B18 = 0x6011B18; +D_6011B48 = 0x6011B48; +D_6011CE0 = 0x6011CE0; +D_6011DC0 = 0x6011DC0; +D_6011DD0 = 0x6011DD0; +D_6011EE0 = 0x6011EE0; +D_601219C = 0x601219C; +D_60121C0 = 0x60121C0; +D_60126F0 = 0x60126F0; +D_6012840 = 0x6012840; +D_6012C00 = 0x6012C00; +D_6013098 = 0x6013098; +D_6013100 = 0x6013100; +D_6013150 = 0x6013150; +D_60131EC = 0x60131EC; +D_60131F0 = 0x60131F0; +D_6013200 = 0x6013200; +D_6013210 = 0x6013210; +D_6013284 = 0x6013284; +D_60132EC = 0x60132EC; +D_6013310 = 0x6013310; +D_6013344 = 0x6013344; +D_6013390 = 0x6013390; +D_6013410 = 0x6013410; +D_6013510 = 0x6013510; +D_6013530 = 0x6013530; +D_6013578 = 0x6013578; +D_6013600 = 0x6013600; +D_60136EC = 0x60136EC; +D_6013750 = 0x6013750; +D_6013770 = 0x6013770; +D_601388C = 0x601388C; +D_6013B50 = 0x6013B50; +D_6013DF0 = 0x6013DF0; +D_6013E10 = 0x6013E10; +D_6013EE0 = 0x6013EE0; +D_6013F00 = 0x6013F00; +D_6013F58 = 0x6013F58; +D_6014024 = 0x6014024; +D_6014040 = 0x6014040; +D_6014350 = 0x6014350; +D_6014390 = 0x6014390; +D_60143D0 = 0x60143D0; +D_60144A0 = 0x60144A0; +D_6014AA4 = 0x6014AA4; +D_6014AF0 = 0x6014AF0; +D_6014EC0 = 0x6014EC0; +D_6014F10 = 0x6014F10; +D_6014F20 = 0x6014F20; +D_6014F90 = 0x6014F90; +D_6015000 = 0x6015000; +D_6015270 = 0x6015270; +D_6015380 = 0x6015380; +D_60156A4 = 0x60156A4; +D_60159AC = 0x60159AC; +D_6015FC0 = 0x6015FC0; +D_6016240 = 0x6016240; +D_6016594 = 0x6016594; +D_60165A0 = 0x60165A0; +D_60166C0 = 0x60166C0; +D_6016C08 = 0x6016C08; +D_6016CF0 = 0x6016CF0; +D_6017040 = 0x6017040; +D_6017090 = 0x6017090; +D_6017370 = 0x6017370; +D_60175E0 = 0x60175E0; +D_60176B0 = 0x60176B0; +D_6017790 = 0x6017790; +D_6017AB0 = 0x6017AB0; +D_6017AD0 = 0x6017AD0; +D_6017D10 = 0x6017D10; +D_6018020 = 0x6018020; +D_60180A0 = 0x60180A0; +D_6018230 = 0x6018230; +D_6018390 = 0x6018390; +D_6018398 = 0x6018398; +D_601847C = 0x601847C; +D_60184A0 = 0x60184A0; +D_6018640 = 0x6018640; +D_6018798 = 0x6018798; +D_60188B4 = 0x60188B4; +D_6018930 = 0x6018930; +D_6018A70 = 0x6018A70; +D_6018AC0 = 0x6018AC0; +D_6018B10 = 0x6018B10; +D_6018B20 = 0x6018B20; +D_6018B98 = 0x6018B98; +D_6018C00 = 0x6018C00; +D_6018D10 = 0x6018D10; +D_6018D58 = 0x6018D58; +D_6018E58 = 0x6018E58; +D_6018E80 = 0x6018E80; +D_6018FF0 = 0x6018FF0; +D_6019130 = 0x6019130; +D_6019360 = 0x6019360; +D_60193A0 = 0x60193A0; +D_6019410 = 0x6019410; +D_601942C = 0x601942C; +D_6019578 = 0x6019578; +D_6019620 = 0x6019620; +D_6019650 = 0x6019650; +D_60196C0 = 0x60196C0; +D_60197AC = 0x60197AC; +D_60199A0 = 0x60199A0; +D_60199D0 = 0x60199D0; +D_6019A30 = 0x6019A30; +D_6019A58 = 0x6019A58; +D_6019C30 = 0x6019C30; +D_6019C58 = 0x6019C58; +D_6019CF0 = 0x6019CF0; +D_6019D38 = 0x6019D38; +D_601A040 = 0x601A040; +D_601A0E0 = 0x601A0E0; +D_601A160 = 0x601A160; +D_601A170 = 0x601A170; +D_601A180 = 0x601A180; +D_601A1A8 = 0x601A1A8; +D_601A1C0 = 0x601A1C0; +D_601A580 = 0x601A580; +D_601A808 = 0x601A808; +D_601A888 = 0x601A888; +D_601A954 = 0x601A954; +D_601AB10 = 0x601AB10; +D_601AB50 = 0x601AB50; +D_601AD10 = 0x601AD10; +D_601ADF8 = 0x601ADF8; +D_601AE40 = 0x601AE40; +D_601AE70 = 0x601AE70; +D_601AE80 = 0x601AE80; +D_601AFC4 = 0x601AFC4; +D_601AFF0 = 0x601AFF0; +D_601B1D0 = 0x601B1D0; +D_601B640 = 0x601B640; +D_601B6C0 = 0x601B6C0; +D_601B910 = 0x601B910; +D_601BA60 = 0x601BA60; +D_601BB00 = 0x601BB00; +D_601BBA0 = 0x601BBA0; +D_601C008 = 0x601C008; +D_601C310 = 0x601C310; +D_601C3D0 = 0x601C3D0; +D_601C470 = 0x601C470; +D_601C820 = 0x601C820; +D_601C8E0 = 0x601C8E0; +D_601D4C0 = 0x601D4C0; +D_601D510 = 0x601D510; +D_601D800 = 0x601D800; +D_601D8A8 = 0x601D8A8; +D_601D930 = 0x601D930; +D_601DA3C = 0x601DA3C; +D_601E0F0 = 0x601E0F0; +D_601E150 = 0x601E150; +D_601E1E8 = 0x601E1E8; +D_601E310 = 0x601E310; +D_601E320 = 0x601E320; +D_601E8C4 = 0x601E8C4; +D_601E9D0 = 0x601E9D0; +D_601EAA0 = 0x601EAA0; +D_601EF60 = 0x601EF60; +D_601F128 = 0x601F128; +D_601F1B0 = 0x601F1B0; +D_601F274 = 0x601F274; +D_601F6B4 = 0x601F6B4; +D_601F760 = 0x601F760; +D_601F8B0 = 0x601F8B0; +D_601FA04 = 0x601FA04; +D_601FAD0 = 0x601FAD0; +D_601FCE0 = 0x601FCE0; +D_601FF80 = 0x601FF80; +D_60204BC = 0x60204BC; +D_6020760 = 0x6020760; +D_6020810 = 0x6020810; +D_6020A48 = 0x6020A48; +D_6020B00 = 0x6020B00; +D_6020B40 = 0x6020B40; +D_6020D90 = 0x6020D90; +D_6020DD0 = 0x6020DD0; +D_6020F00 = 0x6020F00; +D_6020F60 = 0x6020F60; +D_6021080 = 0x6021080; +D_6021128 = 0x6021128; +D_602112C = 0x602112C; +D_6021240 = 0x6021240; +D_60212D0 = 0x60212D0; +D_60213B0 = 0x60213B0; +D_6021490 = 0x6021490; +D_60218FC = 0x60218FC; +D_60219C8 = 0x60219C8; +D_6021CB0 = 0x6021CB0; +D_60224DC = 0x60224DC; +D_60225A8 = 0x60225A8; +D_6022630 = 0x6022630; +D_6022760 = 0x6022760; +D_6022920 = 0x6022920; +D_60229A4 = 0x60229A4; +D_6023068 = 0x6023068; +D_60231A4 = 0x60231A4; +D_60231C8 = 0x60231C8; +D_60236F0 = 0x60236F0; +D_6023810 = 0x6023810; +D_6023AC0 = 0x6023AC0; +D_6023B90 = 0x6023B90; +D_6023C40 = 0x6023C40; +D_6023DCC = 0x6023DCC; +D_6024060 = 0x6024060; +D_60240B0 = 0x60240B0; +D_60244B0 = 0x60244B0; +D_60245E0 = 0x60245E0; +D_6024AD0 = 0x6024AD0; +D_6024B60 = 0x6024B60; +D_6024F10 = 0x6024F10; +D_6024FE0 = 0x6024FE0; +D_6025220 = 0x6025220; +D_6025440 = 0x6025440; +D_6025500 = 0x6025500; +D_60255EC = 0x60255EC; +D_60255F0 = 0x60255F0; +D_6025680 = 0x6025680; +D_6025690 = 0x6025690; +D_6025AE0 = 0x6025AE0; +D_6025B50 = 0x6025B50; +D_6025BEC = 0x6025BEC; +D_6025CA0 = 0x6025CA0; +D_602623C = 0x602623C; +D_6026394 = 0x6026394; +D_60263F0 = 0x60263F0; +D_6026420 = 0x6026420; +D_60265AC = 0x60265AC; +D_60266A0 = 0x60266A0; +D_6026820 = 0x6026820; +D_60268B8 = 0x60268B8; +D_6027150 = 0x6027150; +D_6027160 = 0x6027160; +D_602716C = 0x602716C; +D_602726C = 0x602726C; +D_6027340 = 0x6027340; +D_6027844 = 0x6027844; +D_6027930 = 0x6027930; +D_6027A30 = 0x6027A30; +D_6027B80 = 0x6027B80; +D_6027CF0 = 0x6027CF0; +D_6027E64 = 0x6027E64; +D_6028260 = 0x6028260; +D_6028368 = 0x6028368; +D_602848C = 0x602848C; +D_60286E0 = 0x60286E0; +D_602890C = 0x602890C; +D_6028A60 = 0x6028A60; +D_6029528 = 0x6029528; +D_6029670 = 0x6029670; +D_6029674 = 0x6029674; +D_60296D0 = 0x60296D0; +D_602991C = 0x602991C; +D_6029928 = 0x6029928; +D_6029A48 = 0x6029A48; +D_602A0AC = 0x602A0AC; +D_602A520 = 0x602A520; +D_602A888 = 0x602A888; +D_602AA04 = 0x602AA04; +D_602AA18 = 0x602AA18; +D_602AA7C = 0x602AA7C; +D_602AB48 = 0x602AB48; +D_602ADB0 = 0x602ADB0; +D_602B0E8 = 0x602B0E8; +D_602B100 = 0x602B100; +D_602B134 = 0x602B134; +D_602B180 = 0x602B180; +D_602B558 = 0x602B558; +D_602B6BC = 0x602B6BC; +D_602B980 = 0x602B980; +D_602BA20 = 0x602BA20; +D_602BC18 = 0x602BC18; +D_602BDF0 = 0x602BDF0; +D_602BE64 = 0x602BE64; +D_602C094 = 0x602C094; +D_602C0D0 = 0x602C0D0; +D_602C220 = 0x602C220; +D_602C4F0 = 0x602C4F0; +D_602C548 = 0x602C548; +D_602CC94 = 0x602CC94; +D_602CF20 = 0x602CF20; +D_602D1C0 = 0x602D1C0; +D_602D400 = 0x602D400; +D_602D5AC = 0x602D5AC; +D_602DA20 = 0x602DA20; +D_602DAF8 = 0x602DAF8; +D_602E84C = 0x602E84C; +D_602E9F8 = 0x602E9F8; +D_602EA44 = 0x602EA44; +D_602EB10 = 0x602EB10; +D_602EED8 = 0x602EED8; +D_602EF6C = 0x602EF6C; +D_602EFB0 = 0x602EFB0; +D_602F0A4 = 0x602F0A4; +D_602F120 = 0x602F120; +D_602F1AC = 0x602F1AC; +D_602F1C0 = 0x602F1C0; +D_602F22C = 0x602F22C; +D_602F4B8 = 0x602F4B8; +D_602FA30 = 0x602FA30; +D_602FCF4 = 0x602FCF4; +D_602FDE0 = 0x602FDE0; +D_602FE00 = 0x602FE00; +D_603030C = 0x603030C; +D_6030510 = 0x6030510; +D_6030590 = 0x6030590; +D_6030810 = 0x6030810; +D_60308F4 = 0x60308F4; +D_6030E40 = 0x6030E40; +D_60312C4 = 0x60312C4; +D_60312E0 = 0x60312E0; +D_6031A34 = 0x6031A34; +D_6031A6C = 0x6031A6C; +D_6031AA4 = 0x6031AA4; +D_6031B14 = 0x6031B14; +D_6031D4C = 0x6031D4C; +D_6031E4C = 0x6031E4C; +D_60320A4 = 0x60320A4; +D_6032184 = 0x6032184; +D_60322CC = 0x60322CC; +D_6032318 = 0x6032318; +D_60323D8 = 0x60323D8; +D_60324E4 = 0x60324E4; +D_6032648 = 0x6032648; +D_60329C0 = 0x60329C0; +D_6032BB8 = 0x6032BB8; +D_6032BC0 = 0x6032BC0; +D_6032CA8 = 0x6032CA8; +D_6033000 = 0x6033000; +D_6033DFC = 0x6033DFC; +D_6033E60 = 0x6033E60; +D_6033EC4 = 0x6033EC4; +D_6033F48 = 0x6033F48; +D_6033FBC = 0x6033FBC; +D_6034040 = 0x6034040; +D_60340A4 = 0x60340A4; +D_6034720 = 0x6034720; +D_6034B90 = 0x6034B90; +D_60354B8 = 0x60354B8; +D_603560C = 0x603560C; +D_6035760 = 0x6035760; +D_60357EC = 0x60357EC; +D_60358D4 = 0x60358D4; +D_6035C10 = 0x6035C10; +D_6035CA8 = 0x6035CA8; +D_6035D0C = 0x6035D0C; +D_6035D70 = 0x6035D70; +D_6035DA0 = 0x6035DA0; +D_6035DD4 = 0x6035DD4; +D_6035E38 = 0x6035E38; +D_6035E9C = 0x6035E9C; +D_60361F0 = 0x60361F0; +D_60362CC = 0x60362CC; +D_6036360 = 0x6036360; +D_60363B0 = 0x60363B0; +D_60365BC = 0x60365BC; +D_6036658 = 0x6036658; +D_6036840 = 0x6036840; +D_6036CD0 = 0x6036CD0; +D_6038018 = 0x6038018; +D_603B060 = 0x603B060; +D_603D9E8 = 0x603D9E8; +D_603DAA0 = 0x603DAA0; +D_603E748 = 0x603E748; +D_603E7C4 = 0x603E7C4; +D_603E924 = 0x603E924; +D_603EB38 = 0x603EB38; +D_6040C70 = 0x6040C70; +D_6040CF0 = 0x6040CF0; +D_60420F0 = 0x60420F0; +D_6042F70 = 0x6042F70; +D_60431A0 = 0x60431A0; +D_6043A20 = 0x6043A20; +D_6043EA0 = 0x6043EA0; +D_6044340 = 0x6044340; +D_6044450 = 0x6044450; +D_6045450 = 0x6045450; +D_6046EC0 = 0x6046EC0; +D_6048820 = 0x6048820; +D_6048A10 = 0x6048A10; +D_60492B0 = 0x60492B0; +D_6049B50 = 0x6049B50; +D_60565F0 = 0x60565F0; +D_6058700 = 0x6058700; +D_7001540 = 0x7001540; +D_70017F0 = 0x70017F0; +D_7001A10 = 0x7001A10; +D_7001C80 = 0x7001C80; +D_7002120 = 0x7002120; +D_7002340 = 0x7002340; +D_7002520 = 0x7002520; +D_7002960 = 0x7002960; +D_7002FF0 = 0x7002FF0; +D_70030F0 = 0x70030F0; +D_7003EE8 = 0x7003EE8; +D_7004240 = 0x7004240; +D_7004320 = 0x7004320; +D_7005300 = 0x7005300; +D_70054D0 = 0x70054D0; +D_7005A10 = 0x7005A10; +D_7005D44 = 0x7005D44; +D_7005E40 = 0x7005E40; +D_7005F10 = 0x7005F10; +D_70064E0 = 0x70064E0; +D_70064F4 = 0x70064F4; +D_70066B0 = 0x70066B0; +D_70067B4 = 0x70067B4; +D_70068BC = 0x70068BC; +D_70068D0 = 0x70068D0; +D_7007EB0 = 0x7007EB0; +D_70084CC = 0x70084CC; +D_7008A90 = 0x7008A90; +D_7008E60 = 0x7008E60; +D_70092E0 = 0x70092E0; +D_70096EC = 0x70096EC; +D_7009A80 = 0x7009A80; +D_7009F10 = 0x7009F10; +D_700B9C0 = 0x700B9C0; +D_700BB10 = 0x700BB10; +D_700C4B0 = 0x700C4B0; +D_700C620 = 0x700C620; +D_700C8B0 = 0x700C8B0; +D_700C8D8 = 0x700C8D8; +D_700C964 = 0x700C964; +D_700C980 = 0x700C980; +D_700CAF4 = 0x700CAF4; +D_700CB60 = 0x700CB60; +D_700D534 = 0x700D534; +D_700D700 = 0x700D700; +D_700E030 = 0x700E030; +D_700E244 = 0x700E244; +D_700E3F0 = 0x700E3F0; +D_700E9E0 = 0x700E9E0; +D_700EA38 = 0x700EA38; +D_700F240 = 0x700F240; +D_700F320 = 0x700F320; +D_7010970 = 0x7010970; +D_7010E10 = 0x7010E10; +D_7010EE0 = 0x7010EE0; +D_7010F00 = 0x7010F00; +D_7010F70 = 0x7010F70; +D_7010FD0 = 0x7010FD0; +D_7010FF0 = 0x7010FF0; +D_70110C0 = 0x70110C0; +D_70110E0 = 0x70110E0; +D_70111B0 = 0x70111B0; +D_7011970 = 0x7011970; +D_7011A88 = 0x7011A88; +D_7011AA0 = 0x7011AA0; +D_7011BA0 = 0x7011BA0; +D_7011C40 = 0x7011C40; +D_7011D40 = 0x7011D40; +D_7011DB0 = 0x7011DB0; +D_7011EB0 = 0x7011EB0; +D_7012B00 = 0x7012B00; +D_7012FC0 = 0x7012FC0; +D_8000708 = 0x8000708; +D_8000D80 = 0x8000D80; +D_8000D90 = 0x8000D90; +D_8000FC0 = 0x8000FC0; +D_8001000 = 0x8001000; +D_8001100 = 0x8001100; +D_8001120 = 0x8001120; +D_8001170 = 0x8001170; +D_8001190 = 0x8001190; +D_8003190 = 0x8003190; +D_8003290 = 0x8003290; +D_80032B0 = 0x80032B0; +D_8003308 = 0x8003308; +D_8003330 = 0x8003330; +D_8003DB0 = 0x8003DB0; +D_8003E10 = 0x8003E10; +D_8003E30 = 0x8003E30; +D_80041F0 = 0x80041F0; +D_80043A0 = 0x80043A0; +D_8004460 = 0x8004460; +D_80044A8 = 0x80044A8; +D_80044D0 = 0x80044D0; +D_8004518 = 0x8004518; +D_8004540 = 0x8004540; +D_8004860 = 0x8004860; +D_8004E00 = 0x8004E00; +D_80053A0 = 0x80053A0; +D_8005920 = 0x8005920; +D_80067A0 = 0x80067A0; +D_80068A0 = 0x80068A0; +D_8006BC0 = 0x8006BC0; +D_8006C40 = 0x8006C40; +D_8006DC0 = 0x8006DC0; +D_8007CC0 = 0x8007CC0; +D_8008120 = 0x8008120; +D_8008FE8 = 0x8008FE8; +D_8009A20 = 0x8009A20; +D_8009AC0 = 0x8009AC0; +D_8009CA0 = 0x8009CA0; +D_800AC60 = 0x800AC60; +D_800B3B0 = 0x800B3B0; +D_800B710 = 0x800B710; +D_800B980 = 0x800B980; +D_800BC90 = 0x800BC90; +D_800CC00 = 0x800CC00; +D_800CE80 = 0x800CE80; +D_800D430 = 0x800D430; +D_800DB30 = 0x800DB30; +D_800E590 = 0x800E590; +D_800E8E0 = 0x800E8E0; +D_800E920 = 0x800E920; +D_800F460 = 0x800F460; +D_8010360 = 0x8010360; +D_8012580 = 0x8012580; +D_8013420 = 0x8013420; +D_8013CC0 = 0x8013CC0; +D_8025080 = 0x8025080; +D_9002CF0 = 0x9002CF0; +D_9003330 = 0x9003330; +D_9003890 = 0x9003890; +D_9003DF0 = 0x9003DF0; +D_9004288 = 0x9004288; +D_900D098 = 0x900D098; +D_900D164 = 0x900D164; +D_900D180 = 0x900D180; +D_900DF20 = 0x900DF20; +D_900FC4C = 0x900FC4C; +D_9010FD0 = 0x9010FD0; +D_9011200 = 0x9011200; +D_9013C20 = 0x9013C20; +D_901C0F4 = 0x901C0F4; +D_901DA50 = 0x901DA50; +D_9023290 = 0x9023290; +D_90234D0 = 0x90234D0; +D_A0002BC = 0xA0002BC; +D_A00047C = 0xA00047C; +D_A000568 = 0xA000568; +D_A000858 = 0xA000858; +D_A000934 = 0xA000934; +D_A000D50 = 0xA000D50; +D_A000EDC = 0xA000EDC; +D_A001A70 = 0xA001A70; +D_A009990 = 0xA009990; +D_C00080C = 0xC00080C; +D_C000DD4 = 0xC000DD4; +D_C001D08 = 0xC001D08; +D_C001D20 = 0xC001D20; +D_C002100 = 0xC002100; +D_C0035D0 = 0xC0035D0; +D_C003A60 = 0xC003A60; +D_C006108 = 0xC006108; +D_C00D048 = 0xC00D048; +D_C00D798 = 0xC00D798; +D_C014940 = 0xC014940; +D_C016250 = 0xC016250; +D_C016630 = 0xC016630; +D_C016640 = 0xC016640; +D_C016798 = 0xC016798; +D_C017DC4 = 0xC017DC4; +D_C01BE3C = 0xC01BE3C; +D_C021720 = 0xC021720; +D_C022D54 = 0xC022D54; +D_C0232D0 = 0xC0232D0; +D_C024E00 = 0xC024E00; +D_C029174 = 0xC029174; +D_C02D694 = 0xC02D694; +D_C02DFA0 = 0xC02DFA0; +D_C02F444 = 0xC02F444; +D_C032980 = 0xC032980; +D_C032F98 = 0xC032F98; +D_C0348A4 = 0xC0348A4; +D_C0348CC = 0xC0348CC; +D_C035510 = 0xC035510; +D_C035D6C = 0xC035D6C; +D_C03653C = 0xC03653C; +D_C03703C = 0xC03703C; +D_C037CC4 = 0xC037CC4; +D_C037ECC = 0xC037ECC; +D_C038124 = 0xC038124; +D_C0381E8 = 0xC0381E8; +D_C038408 = 0xC038408; +D_C038490 = 0xC038490; +D_C039490 = 0xC039490; +D_D000000 = 0xD000000; +D_D000F20 = 0xD000F20; +D_D001E40 = 0xD001E40; +D_D002D60 = 0xD002D60; +D_D003C80 = 0xD003C80; +D_D004BA0 = 0xD004BA0; +D_D005AC0 = 0xD005AC0; +D_D0069E0 = 0xD0069E0; +D_D007900 = 0xD007900; +D_D008820 = 0xD008820; +D_D009740 = 0xD009740; +D_D0098D0 = 0xD0098D0; +D_D00B870 = 0xD00B870; +D_E000000 = 0xE000000; +D_E000150 = 0xE000150; +D_E00A660 = 0xE00A660; +D_E00DF80 = 0xE00DF80; +D_E00EEA0 = 0xE00EEA0; +D_E00FDC0 = 0xE00FDC0; +D_E010CE0 = 0xE010CE0; +D_F000800 = 0xF000800; +D_F000F20 = 0xF000F20; +D_F001000 = 0xF001000; +D_F001800 = 0xF001800; +D_F001E40 = 0xF001E40; +D_F002000 = 0xF002000; +D_F002D60 = 0xF002D60; +D_F003C80 = 0xF003C80; +D_F004BA0 = 0xF004BA0; +D_F005AC0 = 0xF005AC0; +D_F0069E0 = 0xF0069E0; +D_F007900 = 0xF007900; +D_F008820 = 0xF008820; +D_F009740 = 0xF009740; +D_F00A660 = 0xF00A660; +D_F00B580 = 0xF00B580; +D_F00C4A0 = 0xF00C4A0; +D_F00D3C0 = 0xF00D3C0; +D_F00E2E0 = 0xF00E2E0; +D_F00F200 = 0xF00F200; +D_F0103D0 = 0xF0103D0; +D_F014180 = 0xF014180; +D_F014310 = 0xF014310; diff --git a/src/dmatable.c b/src/dmatable.c index 51a54aa3..c79bff05 100644 --- a/src/dmatable.c +++ b/src/dmatable.c @@ -1,10 +1,5 @@ #include "sf64dma.h" -#define DMA_ENTRY(file) \ - { file##_ROM_START, { file##_ROM_START, file##_ROM_END }, false } -#define DMA_ENTRY_NONE \ - { NULL, { NULL, NULL }, false } - DmaEntry gDmaTable[90] = { DMA_ENTRY(makerom), DMA_ENTRY(main), diff --git a/src/engine/fox_load_inits.c b/src/engine/fox_load_inits.c index 392e45dd..db6f9e8c 100644 --- a/src/engine/fox_load_inits.c +++ b/src/engine/fox_load_inits.c @@ -1,26 +1,5 @@ #include "sf64dma.h" -#define NO_SEGMENT \ - { NULL, NULL } - -#define OVERLAY_OFFSETS(file) \ - { \ - { SEGMENT_ROM_START(file), SEGMENT_ROM_END(file) }, { SEGMENT_BSS_START(file), SEGMENT_BSS_END(file) }, \ - { SEGMENT_TEXT_START(file), SEGMENT_TEXT_END(file) }, { \ - SEGMENT_DATA_START(file), SEGMENT_RODATA_END(file) \ - } \ - } - -#define NO_OVERLAY \ - { \ - { NULL, NULL }, { NULL, NULL }, { NULL, NULL }, { \ - NULL, NULL \ - } \ - } - -#define ROM_SEGMENT(file) \ - { SEGMENT_ROM_START(file), SEGMENT_ROM_END(file) } - Scene sNoOvl_Logo[1] = { { NO_OVERLAY, { /* 0x1 */ NO_SEGMENT, diff --git a/srceu/dmatable.c b/srceu/dmatable.c index 62b2e999..355d3011 100644 --- a/srceu/dmatable.c +++ b/srceu/dmatable.c @@ -1,10 +1,5 @@ #include "sf64dma.h" -#define DMA_ENTRY(file) \ - { file##_ROM_START, { file##_ROM_START, file##_ROM_END }, false } -#define DMA_ENTRY_NONE \ - { NULL, { NULL, NULL }, false } - DmaEntry gDmaTable[101] = { DMA_ENTRY(makerom), DMA_ENTRY(main), diff --git a/srceu/engine/fox_load_inits.c b/srceu/engine/fox_load_inits.c index d6d2fe40..006614b9 100644 --- a/srceu/engine/fox_load_inits.c +++ b/srceu/engine/fox_load_inits.c @@ -1,21 +1,5 @@ #include "sf64dma.h" -#define NO_SEGMENT \ - { NULL, NULL } - -#define OVERLAY_OFFSETS(file) \ - { \ - { SEGMENT_ROM_START(file), SEGMENT_ROM_END(file) }, { SEGMENT_BSS_START(file), SEGMENT_BSS_END(file) }, \ - { SEGMENT_TEXT_START(file), SEGMENT_TEXT_END(file) }, \ - { SEGMENT_DATA_START(file), SEGMENT_RODATA_END(file) }, \ - } - -#define NO_OVERLAY \ - { NO_SEGMENT, NO_SEGMENT, NO_SEGMENT, NO_SEGMENT } - -#define ROM_SEGMENT(file) \ - { SEGMENT_ROM_START(file), SEGMENT_ROM_END(file) } - Scene D_800CAFC4[1] = { { NO_OVERLAY, { /* 1 */ NO_SEGMENT, diff --git a/srceu/engine/fox_versus.c b/srceu/engine/fox_versus.c index aed0ae3e..81a09f79 100644 --- a/srceu/engine/fox_versus.c +++ b/srceu/engine/fox_versus.c @@ -125,6 +125,12 @@ void func_800BE708(void) { #pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800C2220.s") +void func_800C227C(void) { +} + +void func_800C2284(void) { +} + #pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800C228C.s") #pragma GLOBAL_ASM("asm/eu/rev0/nonmatchings/engine/fox_versus/func_800C29BC.s") diff --git a/srcjp/dmatable.c b/srcjp/dmatable.c index 435f9a43..ee815a9a 100644 --- a/srcjp/dmatable.c +++ b/srcjp/dmatable.c @@ -1,10 +1,5 @@ #include "sf64dma.h" -#define DMA_ENTRY(file) \ - { file##_ROM_START, { file##_ROM_START, file##_ROM_END }, false } -#define DMA_ENTRY_NONE \ - { NULL, { NULL, NULL }, false } - DmaEntry gDmaTable[89] = { DMA_ENTRY(makerom), DMA_ENTRY(main), diff --git a/srcjp/engine/fox_load_inits.c b/srcjp/engine/fox_load_inits.c index 392e45dd..db6f9e8c 100644 --- a/srcjp/engine/fox_load_inits.c +++ b/srcjp/engine/fox_load_inits.c @@ -1,26 +1,5 @@ #include "sf64dma.h" -#define NO_SEGMENT \ - { NULL, NULL } - -#define OVERLAY_OFFSETS(file) \ - { \ - { SEGMENT_ROM_START(file), SEGMENT_ROM_END(file) }, { SEGMENT_BSS_START(file), SEGMENT_BSS_END(file) }, \ - { SEGMENT_TEXT_START(file), SEGMENT_TEXT_END(file) }, { \ - SEGMENT_DATA_START(file), SEGMENT_RODATA_END(file) \ - } \ - } - -#define NO_OVERLAY \ - { \ - { NULL, NULL }, { NULL, NULL }, { NULL, NULL }, { \ - NULL, NULL \ - } \ - } - -#define ROM_SEGMENT(file) \ - { SEGMENT_ROM_START(file), SEGMENT_ROM_END(file) } - Scene sNoOvl_Logo[1] = { { NO_OVERLAY, { /* 0x1 */ NO_SEGMENT, diff --git a/yamls/eu/rev0/header.yaml b/yamls/eu/rev0/header.yaml index 9b3c57ed..ac02251c 100644 --- a/yamls/eu/rev0/header.yaml +++ b/yamls/eu/rev0/header.yaml @@ -16,6 +16,7 @@ options: symbol_addrs_path: - linker_scripts/eu/rev0/symbol_addrs.txt - linker_scripts/eu/rev0/symbol_addrs_fix.txt + - linker_scripts/eu/rev0/symbol_addrs_assets.txt asm_path: asm/eu/rev0 src_path: srceu diff --git a/yamls/eu/rev0/main.yaml b/yamls/eu/rev0/main.yaml index f0cf1b4d..710243ae 100644 --- a/yamls/eu/rev0/main.yaml +++ b/yamls/eu/rev0/main.yaml @@ -87,6 +87,8 @@ - [0x25E10, asm] - [0x25EC0, asm] - [0x25FC0, asm] + - [0x26000, asm] # exceptasm + - [0x26D80, asm] - [0x270F0, asm] - [0x27980, asm] - [0x27BF0, asm] @@ -272,7 +274,6 @@ - [0xDB420, .rodata, engine/fox_save] # Common assets - - [0xDB490, data, common] - [0xDB490, data, fox_shapes] - [0xDCC70, data, fox_wheels] - [0xDDA10, data, fox_msg_textures] diff --git a/yamls/eu/rev0/overlays.yaml b/yamls/eu/rev0/overlays.yaml index 21e1d23e..4008c04c 100644 --- a/yamls/eu/rev0/overlays.yaml +++ b/yamls/eu/rev0/overlays.yaml @@ -185,7 +185,7 @@ start: 0xEBC490 vram: 0x8018B020 follows_vram: ast_radio_de - bss_size: 0x173A0 + bss_size: 0x173C0 symbol_name_format: menu_$VRAM subsegments: - [0xEBC490, c, fox_i_menu] diff --git a/yamls/jp/rev0/header.yaml b/yamls/jp/rev0/header.yaml index 4067e70d..aaa7d62b 100644 --- a/yamls/jp/rev0/header.yaml +++ b/yamls/jp/rev0/header.yaml @@ -16,6 +16,7 @@ options: symbol_addrs_path: - linker_scripts/jp/rev0/symbol_addrs.txt - linker_scripts/jp/rev0/symbol_addrs_fix.txt + - linker_scripts/jp/rev0/symbol_addrs_assets.txt asm_path: asm/jp/rev0 src_path: srcjp From 566f9db5a557f6f39e2a2bdfa6d1f99e62daa919 Mon Sep 17 00:00:00 2001 From: petrie911 <69443847+petrie911@users.noreply.github.com> Date: Mon, 20 May 2024 09:28:13 -0500 Subject: [PATCH 114/151] cheats (#257) --- .vscode/settings.json | 3 +- include/mods.h | 19 +- include/sf64level.h | 1 + include/sf64player.h | 4 + src/engine/fox_game.c | 6 +- src/mods/object_ram.c | 328 ++++++++++++++++++++++++++++++-- src/mods/object_ram.h | 56 +++++- src/overlays/ovl_menu/fox_map.c | 2 +- 8 files changed, 391 insertions(+), 28 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index d4e21e0e..2e1b9b70 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -146,7 +146,8 @@ "bgm.h": "c", "*.tcc": "c", "object_ram.h": "c", - "sf64dma.h": "c" + "sf64dma.h": "c", + "string": "c" }, "C_Cpp_Runner.msvcBatchPath": "" } \ No newline at end of file diff --git a/include/mods.h b/include/mods.h index 232bfb7c..823b36d9 100644 --- a/include/mods.h +++ b/include/mods.h @@ -40,14 +40,21 @@ #define MODS_FPS_COUNTER 0 /** - * Object Ram Watch: + * RAM modifier: + * Press C> while paused to cycle modes + * + * Cheats: + * Use D-Pad up and down to select a cheat + * Use D-Pad left and right to set its value + * Press L to set the value or twice to lock it + * + * Object Ram Editor: * Watch up to seven addresses from the player and object arrays - * Press C> while paused to enable/disable - * Use D-PAD to move the cursor and change values + * Use D-Pad to move the cursor and change values * Press L to edit the highlighted value */ -#define MODS_OBJECT_RAM 0 +#define MODS_RAM_MOD 0 /* ************************* */ @@ -59,8 +66,8 @@ void Map_LevelSelect(void); static void Play_RenderFps(void); #endif -#if MODS_OBJECT_RAM == 1 -void ObjectRam_Update(void); +#if MODS_RAM_MOD == 1 +void RamMod_Update(void); #endif #endif diff --git a/include/sf64level.h b/include/sf64level.h index b2195947..c644f77a 100644 --- a/include/sf64level.h +++ b/include/sf64level.h @@ -16,6 +16,7 @@ typedef enum MissionStatus { /* 0 */ MISSION_COMPLETE, /* 1 */ MISSION_ACCOMPLISHED, /* 2 */ MISSION_WARP, + /* 3 */ MISSION_MAX, } MissionStatus; typedef struct Environment { diff --git a/include/sf64player.h b/include/sf64player.h index 4a1a5de5..cbdc735a 100644 --- a/include/sf64player.h +++ b/include/sf64player.h @@ -48,12 +48,14 @@ typedef enum DrawMode { /* 6 */ DRAW_UNK_VS, /* 7 */ DRAW_UNK_7, /* 8 */ DRAW_ENDING, + /* 9 */ DRAW_MAX, } DrawMode; typedef enum LevelMode { /* 0 */ LEVELMODE_ON_RAILS, /* 1 */ LEVELMODE_ALL_RANGE, /* 2 */ LEVELMODE_UNK_2, + /* 3 */ LEVELMODE_MAX, } LevelMode; typedef enum PlayerState1C8 { @@ -71,6 +73,7 @@ typedef enum PlayerState1C8 { /* 11 */ PLAYERSTATE_1C8_ANDROSS_MOUTH, /* 12 */ PLAYERSTATE_1C8_12, /* 13 */ PLAYERSTATE_1C8_VS_STANDBY, + /* 14 */ PLAYERSTATE_1C8_MAX, } PlayerState1C8; typedef enum PlayerShotStatus { @@ -102,6 +105,7 @@ typedef enum LaserStrength { /* 1 */ LASERS_TWIN, /* 2 */ LASERS_HYPER, /* 3 */ LASERS_UNK_3, + /* 4 */ LASERS_MAX, } LaserStrength; typedef struct PlayerShot { diff --git a/src/engine/fox_game.c b/src/engine/fox_game.c index 6e3ea8bb..a676865a 100644 --- a/src/engine/fox_game.c +++ b/src/engine/fox_game.c @@ -579,8 +579,8 @@ void Game_Update(void) { gFillScreenGreen, gFillScreenBlue, gFillScreenAlpha); } Audio_dummy_80016A50(); -#if MODS_OBJECT_RAM == 1 - ObjectRam_Update(); +#if MODS_RAM_MOD == 1 + RamMod_Update(); #endif #if MODS_FPS_COUNTER == 1 Play_RenderFps(); @@ -591,7 +591,7 @@ void Game_Update(void) { #if MODS_FPS_COUNTER == 1 #include "../mods/fpscounter.c" #endif -#if MODS_OBJECT_RAM == 1 +#if MODS_RAM_MOD == 1 #include "../mods/object_ram.c" #endif diff --git a/src/mods/object_ram.c b/src/mods/object_ram.c index a9078167..9c748b7d 100644 --- a/src/mods/object_ram.c +++ b/src/mods/object_ram.c @@ -10,9 +10,10 @@ static RamEntry oRamEntries[7] = { ORAM_OFF, }; -static u32 selectNum = 0; -static s32 oRamActive = true; -static u32 editMode = EDM_TYPE; +static s32 holdTimer = 0; +static s32 selectNum = 0; +static RamModMode oRamActive = RAMMOD_OFF; +static s32 editMode = EDM_TYPE; static s32 editing = false; static s32 editingValue = false; static fu dataTemp; @@ -272,14 +273,14 @@ void ObjectRam_DrawEntry(RamEntry* entry, s32 num) { SET_DRAW_COLOR(EDM_INDEX) Graphics_Printf("%02d", index); - Graphics_DisplaySmallText(entry->x + 32, y, 1.0f, 1.0f, D_801619A0); + Graphics_DisplaySmallText(x + 32, y, 1.0f, 1.0f, D_801619A0); SET_DRAW_COLOR(EDM_MAX) Graphics_DisplaySmallText(x + 50, y, 1.0f, 1.0f, "."); SET_DRAW_COLOR(EDM_OFFSET) Graphics_Printf("%03X", offset); - Graphics_DisplaySmallText(entry->x + 56, y, 1.0f, 1.0f, D_801619A0); + Graphics_DisplaySmallText(x + 56, y, 1.0f, 1.0f, D_801619A0); SET_DRAW_COLOR(EDM_FORMAT) Graphics_DisplaySmallText(x + 90, y, 1.0f, 1.0f, fmtTypes[entry->fmt]); @@ -321,15 +322,7 @@ void ObjectRam_Update(void) { objArrays[ORAM_Player].ptr = gPlayer; objArrays[ORAM_Scenery360].ptr = gScenery360; objArrays[ORAM_Player].count = gCamCount; - contPress = &gControllerPress[gMainController]; - contHold = &gControllerHold[gMainController]; - if ((gPlayState == PLAY_PAUSE) && (contPress->button & R_CBUTTONS)) { - oRamActive = 1 - oRamActive; - } - if (!oRamActive || (gPlayState <= PLAY_INIT)) { - return; - } if (contPress->button & L_TRIG) { editing ^= 1; } @@ -391,3 +384,312 @@ void ObjectRam_Update(void) { gTexturedLines[99].posBB.z = oRamEntries[selectNum].objPtr->pos.z; } } + +bool sCheatSetup = false; + +s32 sCheatOptions[] = { 2, 5, 1, 2, 1, 4, 2, 1, 2 }; +s32 sCheatStates[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; + +CheatEntry cheats[CHEAT_MAX]; + +void CheatRam_Select(void) { + if (contPress->button & (U_JPAD | D_JPAD)) { + editMode += (contPress->button & D_JPAD) ? 1 : -1; + editMode = WRAP_MODE(editMode, ARRAY_COUNT(cheats)); + selectNum = cheats[editMode].option; + } else if (contPress->button & (L_JPAD | R_JPAD)) { + selectNum += (contPress->button & R_JPAD) ? 1 : -1; + } + selectNum = WRAP_MODE(selectNum, cheats[editMode].optionMax + 1); + cheats[editMode].option = selectNum; +} + +void CheatRam_RepairWings(void) { + if ((gPlayer[0].wings.rightState <= WINGSTATE_BROKEN) || (gPlayer[0].wings.leftState <= WINGSTATE_BROKEN)) { + func_enmy_80067A40(); + } +} + +void CheatRam_SpawnCheckpoint(void) { + static ItemCheckpoint* checkpoint = NULL; + s32 i; + + if ((gLevelMode != LEVELMODE_ON_RAILS) || (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_ACTIVE)) { + return; + } + + if ((checkpoint != NULL) && (checkpoint->obj.status != OBJ_FREE)) { + return; + } + for (i = 0; i < ARRAY_COUNT(gItems); i++) { + if (gItems[i].obj.status == OBJ_FREE) { + Item_Initialize(&gItems[i]); + gItems[i].obj.status = OBJ_ACTIVE; + gItems[i].obj.id = OBJ_ITEM_CHECKPOINT; + gItems[i].obj.pos.x = gPlayer[0].pos.x + gPlayer[0].vel.x; + gItems[i].obj.pos.y = gPlayer[0].pos.y + gPlayer[0].vel.y; + gItems[i].obj.pos.z = gPlayer[0].trueZpos + gPlayer[0].vel.z; + Object_SetInfo(&gItems[i].info, gItems[i].obj.id); + break; + } + } + if (i == ARRAY_COUNT(gItems)) { + checkpoint = NULL; + } +} + +void CheatRam_Setup(void) { + s32 i; + + for (i = 0; i < ARRAY_COUNT(cheats); i++) { + CheatEntry* cheat = &cheats[i]; + + cheat->mode = i; + switch (cheat->mode) { + case CHEAT_SHIELDS: + cheat->option = cheat->optionMax = 100; + SET_CHEAT_RAM(&cheat->ram[0], &gPlayer[0].shields, Play_GetMaxShields()) + break; + case CHEAT_LASERS: + cheat->option = LASERS_HYPER; + cheat->optionMax = LASERS_MAX - 1; + SET_CHEAT_RAM(&cheat->ram[0], &gLaserStrength[0], cheat->option) + cheat->ram[1].func = CheatRam_RepairWings; + break; + case CHEAT_BOMBS: + cheat->option = cheat->optionMax = 9; + SET_CHEAT_RAM(&cheat->ram[0], &gBombCount[0], cheat->option) + break; + case CHEAT_BOOST: + SET_CHEAT_RAM(&cheat->ram[0], &gPlayer[0].boostMeter, 0) + SET_CHEAT_RAM(&cheat->ram[1], &gPlayer[0].boostCooldown, false) + cheat->action = 1; + break; + case CHEAT_LIVES: + cheat->option = cheat->optionMax = 99; + SET_CHEAT_RAM(&cheat->ram[0], &gLifeCount[0], cheat->option) + break; + case CHEAT_TEAMMATES: + cheat->option = 0; + cheat->optionMax = 7; + SET_CHEAT_RAM(&cheat->ram[0], &gTeamShields[TEAM_ID_FALCO], 255) + SET_CHEAT_RAM(&cheat->ram[1], &gTeamShields[TEAM_ID_SLIPPY], 255) + SET_CHEAT_RAM(&cheat->ram[2], &gTeamShields[TEAM_ID_PEPPY], 255) + break; + case CHEAT_SPEED: + cheat->option = 60; + cheat->optionMax = 100; + cheat->action = 1; + SET_CHEAT_RAM(&cheat->ram[0], &gPlayer[0].baseSpeed, cheat->option) + break; + case CHEAT_HITS: + cheat->option = 500; + cheat->optionMax = 999; + SET_CHEAT_RAM(&cheat->ram[0], &gHitCount, cheat->option); + break; + case CHEAT_CHECKPOINT: + cheat->action = -1; + cheat->ram[0].func = CheatRam_SpawnCheckpoint; + break; + case CHEAT_COMPLETE: + cheat->option = MISSION_COMPLETE; + cheat->optionMax = MISSION_WARP; + cheat->action = 1; + if ((gCurrentLevel == LEVEL_METEO) || (gCurrentLevel == LEVEL_SECTOR_X)) {} + SET_CHEAT_RAM(&cheat->ram[0], &gMissionStatus, cheat->option) + break; + } + } +} + +void CheatRam_SetValues(CheatRamEntry* cheat) { + s32 i; + + for (i = 0; i < 4; i++) { + if (cheat[i].addr != NULL) { + switch (cheat[i].size) { + case 0: + cheat[i].func(); + break; + case 1: + *((u8*) cheat[i].addr) = cheat[i].data.i; + break; + case 2: + *((u16*) cheat[i].addr) = cheat[i].data.i; + break; + case 3: + break; + case 4: + *cheat[i].addr = cheat[i].data; + break; + } + } + } +} + +void CheatRam_UpdateEntry(CheatEntry* cheat) { + s32 teamnum; + s32 i; + s32 press = false; + s32 doublepress = false; + + if (holdTimer == 0) { + holdTimer = 10; + press = true; + } else if (holdTimer != 0) { + doublepress = true; + } + if (cheat->action == 0) { + cheat->hold ^= doublepress; + } else if (cheat->action == 1) { + cheat->hold ^= press; + } + + switch (editMode) { + case CHEAT_SHIELDS: + cheat->ram[0].data.i = (cheat->option / 100.0f) * Play_GetMaxShields(); + break; + case CHEAT_BOOST: + break; + case CHEAT_SPEED: + cheat->ram[0].data.f = cheat->hold ? cheat->option : 40.0f; + break; + case CHEAT_TEAMMATES: + teamnum = (cheat->option % 4) - 1; + for (i = 0; i < 3; i++) { + cheat->ram[i].data.i = (cheat->option > 3) ? -1 : 255; + cheat->ram[i].size = (teamnum == -1) ? 4 : 3; + } + if (teamnum != -1) { + cheat->ram[teamnum].size = 4; + } + break; + case CHEAT_COMPLETE: + if ((gCurrentLevel == LEVEL_CORNERIA) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) { + if ((gLevelMode == LEVELMODE_ON_RAILS) && (cheat->option == MISSION_COMPLETE)) { + gScenery360 = Memory_Allocate(200 * sizeof(Scenery360)); + gLevelMode = LEVELMODE_ALL_RANGE; + } else if ((gLevelMode == LEVELMODE_ALL_RANGE) && (cheat->option == MISSION_ACCOMPLISHED)) { + gLevelMode = LEVELMODE_ON_RAILS; + } + } + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; + default: + cheat->ram[0].data.i = cheat->option; + break; + } + + CheatRam_SetValues(cheat->ram); +} + +const char* cheatNames[] = { "SHIELDS", "LASERS", "BOMBS", "BOOST", "LIVES", + "TEAM", "SPEED", "HITS", "CHECKPOINT", "MISSION" }; +const char* laserNames[] = { "SINGLE", "TWIN", "HYPER", "UNUSED" }; +const char* teamNames[] = { "ALL", "FALCO", "SLIPPY", "PEPPY" }; +const char* statusNames[] = { "COMPLETE", "ACCOMPLISHED", "WARP" }; + +void CheatRam_DrawEntry(CheatMode mode, s32 x, s32 y, s32 option) { + switch (mode) { + case CHEAT_SHIELDS: + case CHEAT_HITS: + Graphics_Printf("%s: %3d", cheatNames[mode], option); + break; + case CHEAT_LASERS: + Graphics_Printf("%s: %s", cheatNames[mode], laserNames[option]); + break; + case CHEAT_COMPLETE: + Graphics_Printf("%s: %s", cheatNames[mode], statusNames[option]); + break; + case CHEAT_LIVES: + case CHEAT_BOMBS: + case CHEAT_SPEED: + Graphics_Printf("%s: %d", cheatNames[mode], option); + break; + case CHEAT_CHECKPOINT: + case CHEAT_BOOST: + Graphics_Printf("%s", cheatNames[mode]); + break; + case CHEAT_TEAMMATES: + Graphics_Printf("%s: %s %s", cheatNames[mode], (option > 3) ? "DOWN" : "HEAL", teamNames[option % 4]); + break; + } + Graphics_DisplaySmallText(x, y, 1.0f, 1.0f, D_801619A0); +} + +s32 medalCount[] = { 150, 200, 150, 300, 0, 200, 100, 250, 200, 0, 150, 100, 150, 50, 0, 150, 150, 100, 200 }; + +void CheatRam_Update(void) { + s32 i; + s32 x = 10; + s32 y = 50; + + if (!sCheatSetup) { + CheatRam_Setup(); + selectNum = cheats[editMode].option; + sCheatSetup = true; + } + CheatRam_Select(); + if (holdTimer != 0) { + holdTimer--; + } + if (contPress->button & L_TRIG) { + CheatRam_UpdateEntry(&cheats[editMode]); + } + for (i = 0; i < ARRAY_COUNT(cheats); i++) { + if ((cheats[i].action != -1) && (cheats[i].hold || ((i == editMode) && (holdTimer != 0)))) { + CheatRam_SetValues(cheats[i].ram); + } + } + RCP_SetupDL(&gMasterDisp, SETUPDL_76); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); + Graphics_DisplaySmallText(x, y, 1.0f, 1.0f, "CHEATS"); + y += 14; + for (i = 0; i < ARRAY_COUNT(cheats); i++) { + if (cheats[i].hold) { + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); + } else if (i == editMode) { + if (holdTimer == 0) { + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 170, 0, 255); + } else { + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 85, 0, 255); + } + } else { + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255); + } + + CheatRam_DrawEntry(cheats[i].mode, x, y + 11 * i, cheats[i].option); + } +} + +void RamMod_Update(void) { + contPress = &gControllerPress[gMainController]; + contHold = &gControllerHold[gMainController]; + + if ((gGameState != GSTATE_PLAY) || (gPlayState <= PLAY_INIT)) { + return; + } + + if ((contPress->button & START_BUTTON) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_NEXT; + Audio_FadeOutAll(10); + gFadeoutType = 4; + gLeveLClearStatus[gCurrentLevel] = Play_CheckMedalStatus(medalCount[gCurrentLevel]) + 1; + cheats[CHEAT_COMPLETE].hold = false; + } + + if ((gPlayState == PLAY_PAUSE) && (contPress->button & R_CBUTTONS)) { + oRamActive++; + oRamActive = WRAP_MODE(oRamActive, RAMMOD_MAX); + } + + switch (oRamActive) { + case RAMMOD_OFF: + break; + case RAMMOD_CHEAT: + CheatRam_Update(); + break; + case RAMMOD_OBJECT: + ObjectRam_Update(); + break; + } +} diff --git a/src/mods/object_ram.h b/src/mods/object_ram.h index 540919d3..2241a257 100644 --- a/src/mods/object_ram.h +++ b/src/mods/object_ram.h @@ -8,7 +8,7 @@ #define ORAM_OFF \ { 0, 0, 0, 0, 0, 0, 0, 0, 0 } -#define WRAP_MODE(val, max) ((u8) ((val) + (max)) % max) +#define WRAP_MODE(val, max) ((u8) ((val) + (max)) % (max)) #define OBJ_ARRAY_INFO(objarr, name) \ { objarr, sizeof(*objarr), ARRAY_COUNT(objarr), name } @@ -21,17 +21,65 @@ typedef struct ObjArrayInfo { } ObjArrayInfo; typedef struct RamEntry { - u8 type; - u8 index; + s16 type; + s16 index; s16 offset; Object* objPtr; void* dataPtr; - u8 fmt; + s16 fmt; u8 width; u16 x; u16 y; } RamEntry; +typedef enum RamModMode { + RAMMOD_OFF, + RAMMOD_CHEAT, + RAMMOD_OBJECT, + RAMMOD_MAX, +} RamModMode; + +typedef enum CheatMode { + CHEAT_SHIELDS, + CHEAT_LASERS, + CHEAT_BOMBS, + CHEAT_BOOST, + CHEAT_LIVES, + CHEAT_TEAMMATES, + CHEAT_SPEED, + CHEAT_HITS, + CHEAT_CHECKPOINT, + CHEAT_COMPLETE, + CHEAT_MAX, +} CheatMode; + +typedef struct CheatRamEntry { + union { + fu* addr; + void (*func)(void); + }; + s32 size; + fu data; +} CheatRamEntry; + +#define SET_CHEAT_RAM(ram, address, value) \ + { \ + (ram)->addr = (void*)(address); \ + (ram)->size = sizeof(*(address)); \ + (ram)->data.i = (value); \ + } + + + +typedef struct CheatEntry { + CheatMode mode; + CheatRamEntry ram[4]; + s32 option; + s32 optionMax; + s32 action; + bool hold; +} CheatEntry; + typedef enum ObjectRamType { ORAM_NONE, ORAM_Player, diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index 7e392b91..1bb2080a 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -2263,7 +2263,7 @@ void Map_801A116C(void) { Matrix_SetGfxMtx(&gMasterDisp); - wings.rightState = wings.leftState = 2; + wings.rightState = wings.leftState = WINGSTATE_INTACT; // clang-format off wings.unk_18 = wings.unk_1C = wings.unk_20 = wings.unk_24 = wings.unk_04 = wings.unk_08 = wings.unk_0C = wings.unk_10 = wings.unk_28 = 0.0f; From 6e833a28077b1cfc1a29f0e51e547628e2af5506 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Thu, 23 May 2024 00:02:10 -0300 Subject: [PATCH 115/151] MATCH: SectorZ_Missile_Update Yeah B#$"%, MAGNETS! OHHH --- src/overlays/ovl_i4/fox_sz.c | 98 +++++++++++++++++------------------- 1 file changed, 46 insertions(+), 52 deletions(-) diff --git a/src/overlays/ovl_i4/fox_sz.c b/src/overlays/ovl_i4/fox_sz.c index 1594e92b..cf9b21a7 100644 --- a/src/overlays/ovl_i4/fox_sz.c +++ b/src/overlays/ovl_i4/fox_sz.c @@ -25,11 +25,6 @@ Vec3f D_i4_8019F4E4[] = { void SectorZ_80199900(Actor* actor, s32 arg1) { s32 i; - PRINTF("MISS_MOVE_TIME %d\n"); - PRINTF("Enm->time0 %d\n"); - PRINTF("time0 %d\n"); - PRINTF("Demo_Time=%d\n"); - gScreenFlashTimer = 8; Object_Kill(&actor->obj, actor->sfxSource); @@ -99,23 +94,19 @@ void SectorZ_80199BDC(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel } } } -typedef enum { - MISSILE_TARGET_X = 4, - MISSILE_TARGET_Y = 5, - MISSILE_TARGET_Z = 6, -} MissileWork; -// https://decomp.me/scratch/7td7r -#ifdef NON_MATCHING void SectorZ_Missile_Update(Actor* this) { - f32 xDist; - f32 yDist; - f32 zDist; - f32 x; - f32 y; - s32 pad; + f32 sp2C; + f32 sp28; + f32 sp24; + f32 sp20; + f32 sp1C; - switch (++this->iwork[9]) { + this->iwork[9]++; + + PRINTF("MISS_MOVE_TIME %d\n", this->iwork[9]); + + switch (this->iwork[9]) { case 600: Radio_PlayMessage(gMsg_ID_16080, RCID_ROB64); break; @@ -129,55 +120,54 @@ void SectorZ_Missile_Update(Actor* this) { break; } - /* Distance between the Great Fox and the missile */ - xDist = gBosses[0].obj.pos.x - this->obj.pos.x; - zDist = gBosses[0].obj.pos.z - this->obj.pos.z; + sp2C = gBosses[0].obj.pos.x - this->obj.pos.x; - SIN_DEG(gGameFrameCount); // WTF + if (0) {} //! FAKE - if (xDist) {} - if (zDist) {} + sp24 = gBosses[0].obj.pos.z - this->obj.pos.z; - if (this->aiType < AI360_GREAT_FOX) { - xDist = SIN_DEG((this->index * 45) + gGameFrameCount) * 5000.0f; - zDist = COS_DEG((this->index * 45) + (gGameFrameCount * 2)) * 5000.0f; + __sinf((M_PI / 180.f) * (f32) gGameFrameCount); + + if (sp2C) {} //! FAKE + if (sp24) {} //! FAKE + + if (this->aiType < 100) { + if (sp24) {} //! FAKE + sp2C = fabsf(this->fwork[4] - this->obj.pos.x); //! FAKE + sp20 = SIN_DEG((this->index * 45) + gGameFrameCount) * 5000.0f; + sp1C = COS_DEG((this->index * 45) + (gGameFrameCount * 2)) * 5000.0f; } else { - zDist = 0.0f; - xDist = 0.0f; + sp20 = sp1C = 0.0f; } - this->fwork[MISSILE_TARGET_X] = (gBosses[0].obj.pos.x + xDist) + 400.0f; - this->fwork[MISSILE_TARGET_Y] = (gBosses[0].obj.pos.y + zDist) + 100.0f; - this->fwork[MISSILE_TARGET_Z] = gBosses[0].obj.pos.z; + this->fwork[4] = (gBosses->obj.pos.x + sp20) + 400.0f; + this->fwork[5] = (gBosses->obj.pos.y + sp1C) + 100.0f; + this->fwork[6] = gBosses->obj.pos.z; this->fwork[3] = 1.4f; - if (((fabsf(this->fwork[MISSILE_TARGET_X] - this->obj.pos.x) < 800.0f) && - (fabsf(this->fwork[MISSILE_TARGET_Y] - this->obj.pos.y) < 800.0f)) && - (fabsf(this->fwork[MISSILE_TARGET_Z] - this->obj.pos.z) < 800.0f)) { + if (((fabsf(this->fwork[4] - this->obj.pos.x) < 800.0f) && (fabsf(this->fwork[5] - this->obj.pos.y) < 800.0f)) && + (fabsf(this->fwork[6] - this->obj.pos.z) < 800.0f)) { SectorZ_80199900(this, 0); gCameraShake = 25; - gBosses[0].dmgType = DMG_UNK_100; - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; - gPlayer[0].csState = 0; - gActors[0].state = -31072; + gBosses->dmgType = 100; + if ((gPlayer->state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer->state_1C8 == PLAYERSTATE_1C8_U_TURN)) { + gPlayer->state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; + gPlayer->csState = 0; + gActors->state = -0x7960; return; } } - if (((fabsf(this->fwork[MISSILE_TARGET_Z] - this->obj.pos.z) < 2000.0f) && - (((gPlayer[0].cam.eye.z < 0.0f) || (D_edisplay_801615D0.y < 0.0f)) || - (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_GFOX_REPAIR))) && - (((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_GFOX_REPAIR)) || - (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN))) { - gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; - gPlayer[0].csState = 100; - gActors[0].state = -31072; + if (((fabsf(this->fwork[6] - this->obj.pos.z) < 2000.0f) && + (((gPlayer->cam.eye.z < 0.0f) || (D_edisplay_801615D0.y < 0.0f)) || + (gPlayer->state_1C8 == PLAYERSTATE_1C8_GFOX_REPAIR))) && + (((gPlayer->state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer->state_1C8 == PLAYERSTATE_1C8_GFOX_REPAIR)) || + (gPlayer->state_1C8 == PLAYERSTATE_1C8_U_TURN))) { + gPlayer->state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; + gPlayer->csState = 100; + gActors->state = -0x7960; } } -#else -#pragma GLOBAL_ASM("asm/us/rev1/nonmatchings/overlays/ovl_i4/fox_sz/SectorZ_Missile_Update.s") -#endif void SectorZ_80199FCC(Actor* actor, s32 arg1) { Actor_Initialize(actor); @@ -1104,6 +1094,10 @@ void SectorZ_LevelComplete(Player* player) { Boss* boss0 = &gBosses[0]; f32 var_fv1 = 1.0f; + PRINTF("Enm->time0 %d\n"); + PRINTF("time0 %d\n"); + PRINTF("Demo_Time=%d\n"); + if (!gGreatFoxIntact) { var_fv1 = -1.0f; } From ef4fa65cbda17ecb4da024ba007a4975a4b196d8 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Thu, 23 May 2024 00:08:52 -0300 Subject: [PATCH 116/151] gPlayer[0] --- src/overlays/ovl_i4/fox_sz.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/overlays/ovl_i4/fox_sz.c b/src/overlays/ovl_i4/fox_sz.c index cf9b21a7..9d166ea1 100644 --- a/src/overlays/ovl_i4/fox_sz.c +++ b/src/overlays/ovl_i4/fox_sz.c @@ -150,21 +150,21 @@ void SectorZ_Missile_Update(Actor* this) { SectorZ_80199900(this, 0); gCameraShake = 25; gBosses->dmgType = 100; - if ((gPlayer->state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer->state_1C8 == PLAYERSTATE_1C8_U_TURN)) { - gPlayer->state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; - gPlayer->csState = 0; + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; + gPlayer[0].csState = 0; gActors->state = -0x7960; return; } } if (((fabsf(this->fwork[6] - this->obj.pos.z) < 2000.0f) && - (((gPlayer->cam.eye.z < 0.0f) || (D_edisplay_801615D0.y < 0.0f)) || - (gPlayer->state_1C8 == PLAYERSTATE_1C8_GFOX_REPAIR))) && - (((gPlayer->state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer->state_1C8 == PLAYERSTATE_1C8_GFOX_REPAIR)) || - (gPlayer->state_1C8 == PLAYERSTATE_1C8_U_TURN))) { - gPlayer->state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; - gPlayer->csState = 100; + (((gPlayer[0].cam.eye.z < 0.0f) || (D_edisplay_801615D0.y < 0.0f)) || + (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_GFOX_REPAIR))) && + (((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_GFOX_REPAIR)) || + (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN))) { + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; + gPlayer[0].csState = 100; gActors->state = -0x7960; } } From c89498ad6b3069e7df1be3f0024697dbc15872f1 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Thu, 23 May 2024 00:09:52 -0300 Subject: [PATCH 117/151] gPlayer[0]. --- src/overlays/ovl_i4/fox_sz.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/overlays/ovl_i4/fox_sz.c b/src/overlays/ovl_i4/fox_sz.c index 9d166ea1..ba79696a 100644 --- a/src/overlays/ovl_i4/fox_sz.c +++ b/src/overlays/ovl_i4/fox_sz.c @@ -140,8 +140,8 @@ void SectorZ_Missile_Update(Actor* this) { sp20 = sp1C = 0.0f; } - this->fwork[4] = (gBosses->obj.pos.x + sp20) + 400.0f; - this->fwork[5] = (gBosses->obj.pos.y + sp1C) + 100.0f; + this->fwork[4] = gBosses->obj.pos.x + sp20 + 400.0f; + this->fwork[5] = gBosses->obj.pos.y + sp1C + 100.0f; this->fwork[6] = gBosses->obj.pos.z; this->fwork[3] = 1.4f; @@ -149,11 +149,11 @@ void SectorZ_Missile_Update(Actor* this) { (fabsf(this->fwork[6] - this->obj.pos.z) < 800.0f)) { SectorZ_80199900(this, 0); gCameraShake = 25; - gBosses->dmgType = 100; + gBosses->dmgType = DMG_UNK_100; if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].csState = 0; - gActors->state = -0x7960; + gActors->state = -31072; return; } } @@ -165,7 +165,7 @@ void SectorZ_Missile_Update(Actor* this) { (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN))) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].csState = 100; - gActors->state = -0x7960; + gActors->state = -31072; } } From be0bfa7711a0df95b48805cf9a65eab4134f9a54 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Thu, 23 May 2024 10:53:45 -0300 Subject: [PATCH 118/151] SIN_DEG --- src/overlays/ovl_i4/fox_sz.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/overlays/ovl_i4/fox_sz.c b/src/overlays/ovl_i4/fox_sz.c index ba79696a..d3842f11 100644 --- a/src/overlays/ovl_i4/fox_sz.c +++ b/src/overlays/ovl_i4/fox_sz.c @@ -126,7 +126,7 @@ void SectorZ_Missile_Update(Actor* this) { sp24 = gBosses[0].obj.pos.z - this->obj.pos.z; - __sinf((M_PI / 180.f) * (f32) gGameFrameCount); + SIN_DEG(gGameFrameCount); // Leftover from a test or commented out code? if (sp2C) {} //! FAKE if (sp24) {} //! FAKE From 03ce166cca2b9d71b13b9af40cf6875698d36136 Mon Sep 17 00:00:00 2001 From: petrie911 <69443847+petrie911@users.noreply.github.com> Date: Thu, 23 May 2024 18:40:42 -0500 Subject: [PATCH 119/151] Implement common data in EU and JP and clean up US data (#258) * data fixes * format * alignment * include --- include/sf64audio_provisional.h | 61 +- include/sf64mesg.h | 977 ++++++++++++++++-- linker_scripts/eu/rev0/symbol_addrs.txt | 69 +- linker_scripts/jp/rev0/symbol_addrs.txt | 65 +- .../us/rev1/symbol_addrs_assets.txt | 2 +- src/audio/audio_general.c | 106 +- src/audio/audio_heap.c | 13 +- src/audio/audio_playback.c | 435 ++++---- src/audio/audio_synthesis.c | 39 +- src/audio/note_data.c | 2 +- src/overlays/ovl_i4/fox_bo.c | 7 + src/overlays/ovl_i4/fox_fo.c | 7 - srceu/audio/note_data.c | 1 + srceu/audio/wave_samples.c | 1 + srceu/engine/fox_msg_palette.c | 1 + srceu/engine/fox_rcp_init.c | 1 + srceu/engine/fox_shapes.c | 1 + srceu/engine/fox_wheels.c | 1 + srcjp/audio/note_data.c | 1 + srcjp/audio/wave_samples.c | 1 + srcjp/engine/fox_load_inits.c | 790 +------------- srcjp/engine/fox_msg_palette.c | 1 + srcjp/engine/fox_rcp_init.c | 1 + srcjp/engine/fox_shapes.c | 1 + srcjp/engine/fox_wheels.c | 1 + yamls/eu/rev0/main.yaml | 14 +- yamls/eu/rev0/overlays.yaml | 2 +- yamls/jp/rev0/main.yaml | 12 +- yamls/us/rev1/main.yaml | 6 +- yamls/us/rev1/overlays.yaml | 2 +- 30 files changed, 1306 insertions(+), 1315 deletions(-) create mode 100644 srceu/audio/note_data.c create mode 100644 srceu/audio/wave_samples.c create mode 100644 srceu/engine/fox_msg_palette.c create mode 100644 srceu/engine/fox_rcp_init.c create mode 100644 srceu/engine/fox_shapes.c create mode 100644 srceu/engine/fox_wheels.c create mode 100644 srcjp/audio/note_data.c create mode 100644 srcjp/audio/wave_samples.c create mode 100644 srcjp/engine/fox_msg_palette.c create mode 100644 srcjp/engine/fox_rcp_init.c create mode 100644 srcjp/engine/fox_shapes.c create mode 100644 srcjp/engine/fox_wheels.c diff --git a/include/sf64audio_provisional.h b/include/sf64audio_provisional.h index 512c07c0..6e463203 100644 --- a/include/sf64audio_provisional.h +++ b/include/sf64audio_provisional.h @@ -179,15 +179,18 @@ typedef struct { /* 0x00 */ u32 start; /* 0x04 */ u32 end; /* 0x08 */ u32 count; - /* 0x0C */ char unk_0C[0x4]; - /* 0x10 */ s16 predictorState[16]; // only exists if count != 0. 8-byte aligned -} AdpcmLoop; // size = 0x30 (or 0x10) + /* 0x10 */ u64 predictorState[4]; // only exists if count != 0. 8-byte aligned +} AdpcmLoop; // size = 0x30 or 0x10, 0x8 aligned typedef struct { /* 0x00 */ s32 order; /* 0x04 */ s32 numPredictors; - /* 0x08 */ s16 book[1]; // size 8 * order * numPredictors. 8-byte aligned -} AdpcmBook; // size >= 0x8 + #ifdef AVOID_UB + /* 0x08 */ u64 book[]; // size 8 * order * numPredictors. + #else + /* 0x08 */ u64 book[1]; // size 8 * order * numPredictors. + #endif +} AdpcmBook; // size >= 8, 0x8 aligned typedef struct { /* 0x00 */ u32 codec : 4; // The state of compression or decompression @@ -261,10 +264,10 @@ typedef struct { /* 0x004 */ u8 downsampleRate; /* 0x005 */ s8 unk_05; /* 0x006 */ u16 windowSize; - /* 0x008 */ u16 unk_08; + /* 0x008 */ u16 decayRatio; // determines how much reverb persists /* 0x00A */ u16 unk_0A; - /* 0x00C */ u16 decayRatio; // determines how much reverb persists - /* 0x00E */ u16 unk_0E; + /* 0x00C */ u16 leakRtL; + /* 0x00E */ u16 leakLtR; /* 0x010 */ s32 nextRingBufPos; /* 0x014 */ s32 unk_20; /* 0x018 */ s32 bufSizePerChan; @@ -512,9 +515,7 @@ typedef struct { /* 0x0C */ NoteSynthesisBuffers* synthesisBuffers; /* 0x10 */ s16 curVolLeft; /* 0x12 */ s16 curVolRight; - /* 0x14 */ char unk_14[0x6]; - /* 0x1A */ u8 combFilterNeedsInit; - /* 0x1C */ char unk_1C[0x4]; + /* 0x14 */ char unk_14[0xC]; } NoteSynthesisState; // size = 0x20 typedef struct { @@ -563,17 +564,16 @@ typedef struct { struct { /* 0x01 */ u8 reverbIndex : 3; /* 0x01 */ u8 bookOffset : 3; - // /* 0x01 */ u8 isSyntheticWave : 1; /* 0x01 */ u8 isSyntheticWave : 1; /* 0x01 */ u8 hasTwoParts : 1; } bitField1; - /* 0x02 */ u8 unk_02; - /* 0x03 */ u8 unk_03; - /* 0x04 */ u8 unk_04; - /* 0x05 */ u8 unk_05; - /* 0x06 */ u16 unk_06; - /* 0x08 */ u16 unk_08; - /* 0x0A */ u16 unk_0A; + /* 0x02 */ u8 gain; + /* 0x03 */ u8 leftDelaySize; + /* 0x04 */ u8 rightDelaySize; + /* 0x05 */ u8 reverb; + /* 0x06 */ u16 panVolLeft; + /* 0x08 */ u16 panVolRight; + /* 0x0A */ u16 resampleRate; /* 0x0C */ s16* waveSampleAddr; } NoteSubEu; // size = 0x10 @@ -588,9 +588,9 @@ typedef struct Note { typedef struct { /* 0x00 */ u8 downsampleRate; /* 0x02 */ u8 windowSize; - /* 0x02 */ u16 unk_2; - /* 0x04 */ u16 decayRatio; // determines how much reverb persists - /* 0x06 */ u16 unk_6; + /* 0x02 */ u16 decayRatio; // determines how much reverb persists + /* 0x04 */ u16 leakRtL; + /* 0x06 */ u16 leakLtR; } ReverbSettings; // size = 0x8 /** @@ -816,13 +816,6 @@ typedef struct SampleDma { /* 0x0E */ u8 ttl; // duration after which the DMA can be discarded } SampleDma; // size = 0x10 -typedef struct { - /* 0x00 */ OSTask task; - /* 0x40 */ OSMesgQueue* mesgQueue; - /* 0x44 */ void* unk_44; // probably a message that gets unused. - /* 0x48 */ char unk_48[0x8]; -} AudioTask; // size = 0x50 - typedef struct { /* 0x00 */ u8 reverbVol; /* 0x01 */ u8 gain; // Increases volume by a multiplicative scaling factor. Represented as a UQ4.4 number @@ -873,7 +866,7 @@ typedef struct { typedef struct { /* 0x0 */ u16 seqId; - /* 0x2 */ u16 unk_2; + /* 0x2 */ u16 audioSpec; /* 0x4 */ u8 bgmParam; } SoundTestTrack; // size: 0x6 @@ -897,7 +890,7 @@ typedef struct { typedef struct { /* 0x00 */ u32 sfxId; - /* 0x04 */ f32* pos; + /* 0x04 */ f32* source; /* 0x08 */ u8 token; /* 0x0C */ f32* freqMod; /* 0x10 */ f32* volMod; @@ -1195,8 +1188,8 @@ extern EnvelopePoint gDefaultEnvelope[]; extern NoteSubEu gZeroNoteSub; extern NoteSubEu gDefaultNoteSub; extern s16 D_800DD200[]; -extern f32 gHeadsetPanVolume[]; -extern f32 gStereoPanVolume[]; -extern f32 gDefaultPanVolume[]; +extern f32 gHeadsetPanVolume[128]; +extern f32 gStereoPanVolume[128]; +extern f32 gDefaultPanVolume[128]; #endif diff --git a/include/sf64mesg.h b/include/sf64mesg.h index 3f7ded2c..c1bee19e 100644 --- a/include/sf64mesg.h +++ b/include/sf64mesg.h @@ -68,104 +68,889 @@ void Radio_Draw(void); typedef enum MsgCharCode { // Non-printing and whitespace - /* 0 */ MSGCHAR_END, // End message - /* 1 */ MSGCHAR_NWL, // New line - /* 2 */ MSGCHAR_NP2, // No effect - /* 3 */ MSGCHAR_NP3, // No effect - /* 4 */ MSGCHAR_NP4, // No effect - /* 5 */ MSGCHAR_NP5, // No effect - /* 6 */ MSGCHAR_NP6, // No effect - /* 7 */ MSGCHAR_NP7, // No effect - /* 8 */ MSGCHAR_PRI0, // Set message priority - /* 9 */ MSGCHAR_PRI1, // Set message priority - /* 10 */ MSGCHAR_PRI2, // Set message priority - /* 11 */ MSGCHAR_PRI3, // Set message priority - /* 12 */ MSGCHAR_SPC, // Space - /* 13 */ MSGCHAR_QSP, // Quarter space - /* 14 */ MSGCHAR_HSP, // Half Space - /* 15 */ MSGCHAR_NXT, // Next text box + /* 0 */ MSGCHAR_END, // End message + /* 1 */ MSGCHAR_NWL, // New line + /* 2 */ MSGCHAR_NP2, // No effect + /* 3 */ MSGCHAR_NP3, // No effect + /* 4 */ MSGCHAR_NP4, // No effect + /* 5 */ MSGCHAR_NP5, // No effect + /* 6 */ MSGCHAR_NP6, // No effect + /* 7 */ MSGCHAR_NP7, // No effect + /* 8 */ MSGCHAR_PRI0, // Set message priority + /* 9 */ MSGCHAR_PRI1, // Set message priority + /* 10 */ MSGCHAR_PRI2, // Set message priority + /* 11 */ MSGCHAR_PRI3, // Set message priority + /* 12 */ MSGCHAR_SPC, // Space + /* 13 */ MSGCHAR_QSP, // Quarter space + /* 14 */ MSGCHAR_HSP, // Half Space + /* 15 */ MSGCHAR_NXT, // Next text box // printing characters - /* 16 */ MSGCHAR_CLF, // C-Left - /* 17 */ MSGCHAR_CUP, // C-Up - /* 18 */ MSGCHAR_CRT, // C-Right - /* 19 */ MSGCHAR_CDN, // C-Down - /* 20 */ MSGCHAR_AUP, // Up arrow - /* 21 */ MSGCHAR_ALF, // Left arrow - /* 22 */ MSGCHAR_ADN, // Down arrow - /* 23 */ MSGCHAR_ART, // Right arrow - /* 24 */ MSGCHAR_A, // A - /* 25 */ MSGCHAR_B, // B - /* 26 */ MSGCHAR_C, // C - /* 27 */ MSGCHAR_D, // D - /* 28 */ MSGCHAR_E, // E - /* 29 */ MSGCHAR_F, // F - /* 30 */ MSGCHAR_G, // G - /* 31 */ MSGCHAR_H, // H - /* 32 */ MSGCHAR_I, // I - /* 33 */ MSGCHAR_J, // J - /* 34 */ MSGCHAR_K, // K - /* 35 */ MSGCHAR_L, // L - /* 36 */ MSGCHAR_M, // M - /* 37 */ MSGCHAR_N, // N - /* 38 */ MSGCHAR_O, // O - /* 39 */ MSGCHAR_P, // P - /* 40 */ MSGCHAR_Q, // Q - /* 41 */ MSGCHAR_R, // R - /* 42 */ MSGCHAR_S, // S - /* 43 */ MSGCHAR_T, // T - /* 44 */ MSGCHAR_U, // U - /* 45 */ MSGCHAR_V, // V - /* 46 */ MSGCHAR_W, // W - /* 47 */ MSGCHAR_X, // X - /* 48 */ MSGCHAR_Y, // Y - /* 49 */ MSGCHAR_Z, // Z - /* 50 */ MSGCHAR_a, // a - /* 51 */ MSGCHAR_b, // b - /* 52 */ MSGCHAR_c, // c - /* 53 */ MSGCHAR_d, // d - /* 54 */ MSGCHAR_e, // e - /* 55 */ MSGCHAR_f, // f - /* 56 */ MSGCHAR_g, // g - /* 57 */ MSGCHAR_h, // h - /* 58 */ MSGCHAR_i, // i - /* 59 */ MSGCHAR_j, // j - /* 60 */ MSGCHAR_k, // k - /* 61 */ MSGCHAR_l, // l - /* 62 */ MSGCHAR_m, // m - /* 63 */ MSGCHAR_n, // n - /* 64 */ MSGCHAR_o, // o - /* 65 */ MSGCHAR_p, // p - /* 66 */ MSGCHAR_q, // q - /* 67 */ MSGCHAR_r, // r - /* 68 */ MSGCHAR_s, // s - /* 69 */ MSGCHAR_t, // t - /* 70 */ MSGCHAR_u, // u - /* 71 */ MSGCHAR_v, // v - /* 72 */ MSGCHAR_w, // w - /* 73 */ MSGCHAR_x, // x - /* 74 */ MSGCHAR_y, // y - /* 75 */ MSGCHAR_z, // z - /* 76 */ MSGCHAR_EXM, // ! - /* 77 */ MSGCHAR_QST, // ? - /* 78 */ MSGCHAR_DSH, // - - /* 79 */ MSGCHAR_CMA, // , - /* 80 */ MSGCHAR_PRD, // . - /* 81 */ MSGCHAR_0, // 0 - /* 82 */ MSGCHAR_1, // 1 - /* 83 */ MSGCHAR_2, // 2 - /* 84 */ MSGCHAR_3, // 3 - /* 85 */ MSGCHAR_4, // 4 - /* 86 */ MSGCHAR_5, // 5 - /* 87 */ MSGCHAR_6, // 6 - /* 88 */ MSGCHAR_7, // 7 - /* 89 */ MSGCHAR_8, // 8 - /* 90 */ MSGCHAR_9, // 9 - /* 91 */ MSGCHAR_APS, // ' - /* 92 */ MSGCHAR_LPR, // ( - /* 93 */ MSGCHAR_RPR, // ) - /* 94 */ MSGCHAR_CLN, // : - /* 95 */ MSGCHAR_PIP, // | + /* 16 */ MSGCHAR_CLF, // C-Left + /* 17 */ MSGCHAR_CUP, // C-Up + /* 18 */ MSGCHAR_CRT, // C-Right + /* 19 */ MSGCHAR_CDN, // C-Down + /* 20 */ MSGCHAR_AUP, // Up arrow + /* 21 */ MSGCHAR_ALF, // Left arrow + /* 22 */ MSGCHAR_ADN, // Down arrow + /* 23 */ MSGCHAR_ART, // Right arrow + /* 24 */ MSGCHAR_A, // A + /* 25 */ MSGCHAR_B, // B + /* 26 */ MSGCHAR_C, // C + /* 27 */ MSGCHAR_D, // D + /* 28 */ MSGCHAR_E, // E + /* 29 */ MSGCHAR_F, // F + /* 30 */ MSGCHAR_G, // G + /* 31 */ MSGCHAR_H, // H + /* 32 */ MSGCHAR_I, // I + /* 33 */ MSGCHAR_J, // J + /* 34 */ MSGCHAR_K, // K + /* 35 */ MSGCHAR_L, // L + /* 36 */ MSGCHAR_M, // M + /* 37 */ MSGCHAR_N, // N + /* 38 */ MSGCHAR_O, // O + /* 39 */ MSGCHAR_P, // P + /* 40 */ MSGCHAR_Q, // Q + /* 41 */ MSGCHAR_R, // R + /* 42 */ MSGCHAR_S, // S + /* 43 */ MSGCHAR_T, // T + /* 44 */ MSGCHAR_U, // U + /* 45 */ MSGCHAR_V, // V + /* 46 */ MSGCHAR_W, // W + /* 47 */ MSGCHAR_X, // X + /* 48 */ MSGCHAR_Y, // Y + /* 49 */ MSGCHAR_Z, // Z + /* 50 */ MSGCHAR_a, // a + /* 51 */ MSGCHAR_b, // b + /* 52 */ MSGCHAR_c, // c + /* 53 */ MSGCHAR_d, // d + /* 54 */ MSGCHAR_e, // e + /* 55 */ MSGCHAR_f, // f + /* 56 */ MSGCHAR_g, // g + /* 57 */ MSGCHAR_h, // h + /* 58 */ MSGCHAR_i, // i + /* 59 */ MSGCHAR_j, // j + /* 60 */ MSGCHAR_k, // k + /* 61 */ MSGCHAR_l, // l + /* 62 */ MSGCHAR_m, // m + /* 63 */ MSGCHAR_n, // n + /* 64 */ MSGCHAR_o, // o + /* 65 */ MSGCHAR_p, // p + /* 66 */ MSGCHAR_q, // q + /* 67 */ MSGCHAR_r, // r + /* 68 */ MSGCHAR_s, // s + /* 69 */ MSGCHAR_t, // t + /* 70 */ MSGCHAR_u, // u + /* 71 */ MSGCHAR_v, // v + /* 72 */ MSGCHAR_w, // w + /* 73 */ MSGCHAR_x, // x + /* 74 */ MSGCHAR_y, // y + /* 75 */ MSGCHAR_z, // z + /* 76 */ MSGCHAR_EXM, // ! + /* 77 */ MSGCHAR_QST, // ? + /* 78 */ MSGCHAR_DSH, // - + /* 79 */ MSGCHAR_CMA, // , + /* 80 */ MSGCHAR_PRD, // . + /* 81 */ MSGCHAR_0, // 0 + /* 82 */ MSGCHAR_1, // 1 + /* 83 */ MSGCHAR_2, // 2 + /* 84 */ MSGCHAR_3, // 3 + /* 85 */ MSGCHAR_4, // 4 + /* 86 */ MSGCHAR_5, // 5 + /* 87 */ MSGCHAR_6, // 6 + /* 88 */ MSGCHAR_7, // 7 + /* 89 */ MSGCHAR_8, // 8 + /* 90 */ MSGCHAR_9, // 9 + /* 91 */ MSGCHAR_APS, // ' + /* 92 */ MSGCHAR_LPR, // ( + /* 93 */ MSGCHAR_RPR, // ) + /* 94 */ MSGCHAR_CLN, // : + + // PAL exclusive characters + /* 95 */ MSGCHAR_e_grave, // è, placeholder in US + /* 96 */ MSGCHAR_e_acute, // é + /* 97 */ MSGCHAR_a_grave, // à + /* 98 */ MSGCHAR_e_hat, // ê + /* 99 */ MSGCHAR_i_hat, // î + /*100 */ MSGCHAR_o_hat, // ô + /*101 */ MSGCHAR_i_umlaut, // ï + /*102 */ MSGCHAR_u_hat, // û + /*103 */ MSGCHAR_c_cedilla, // ç + /*104 */ MSGCHAR_a_hat, // â + /*105 */ MSGCHAR_u_grave, // ú + /*106 */ MSGCHAR_u_umlaut, // ü + /*107 */ MSGCHAR_o_umlaut, // ö + /*108 */ MSGCHAR_a_umlaut, // ä + /*109 */ MSGCHAR_eszett, // ß + /*110 */ MSGCHAR_U_UMLAUT, // Ü + + // PAL placeholder textures + /*111 */ MSGCHAR_111, + /*112 */ MSGCHAR_112, + /*113 */ MSGCHAR_113, + /*114 */ MSGCHAR_114, + /*115 */ MSGCHAR_115, + /*116 */ MSGCHAR_116, + /*117 */ MSGCHAR_117, + /*118 */ MSGCHAR_118, + /*119 */ MSGCHAR_119, + /*120 */ MSGCHAR_120, + /*121 */ MSGCHAR_121, + /*122 */ MSGCHAR_122, + /*123 */ MSGCHAR_123, + /*124 */ MSGCHAR_124, + /*125 */ MSGCHAR_125, + /*126 */ MSGCHAR_126, + /*127 */ MSGCHAR_127, } MsgCharCode; +typedef enum MsgMojiCode { + // Non-printing and whitespace + /* 0 */ MSGMOJI_0, + /* 1 */ MSGMOJI_1, + /* 2 */ MSGMOJI_2, + /* 3 */ MSGMOJI_3, + /* 4 */ MSGMOJI_4, + /* 5 */ MSGMOJI_5, + /* 6 */ MSGMOJI_6, + /* 7 */ MSGMOJI_7, + /* 8 */ MSGMOJI_8, + /* 9 */ MSGMOJI_9, + /* 10 */ MSGMOJI_10, + /* 11 */ MSGMOJI_11, + /* 12 */ MSGMOJI_12, + /* 13 */ MSGMOJI_13, + /* 14 */ MSGMOJI_14, + /* 15 */ MSGMOJI_15, + + // Hiragana + /* 16 */ MSGMOJI_16, // a + /* 17 */ MSGMOJI_17, // A + /* 18 */ MSGMOJI_18, // i + /* 19 */ MSGMOJI_19, // I + /* 20 */ MSGMOJI_20, // u + /* 21 */ MSGMOJI_21, // U + /* 22 */ MSGMOJI_22, // e + /* 23 */ MSGMOJI_23, // E + /* 24 */ MSGMOJI_24, // o + /* 25 */ MSGMOJI_25, // O + /* 26 */ MSGMOJI_26, // ga + /* 27 */ MSGMOJI_27, // ka + /* 28 */ MSGMOJI_28, // gi + /* 29 */ MSGMOJI_29, // ki + /* 30 */ MSGMOJI_30, // gu + /* 31 */ MSGMOJI_31, // ku + /* 32 */ MSGMOJI_32, // ge + /* 33 */ MSGMOJI_33, // ke + /* 34 */ MSGMOJI_34, // go + /* 35 */ MSGMOJI_35, // ko + /* 36 */ MSGMOJI_36, // za + /* 37 */ MSGMOJI_37, // sa + /* 38 */ MSGMOJI_38, // ji + /* 39 */ MSGMOJI_39, // shi + /* 40 */ MSGMOJI_40, // zu + /* 41 */ MSGMOJI_41, // su + /* 42 */ MSGMOJI_42, // ze + /* 43 */ MSGMOJI_43, // se + /* 44 */ MSGMOJI_44, // zo + /* 45 */ MSGMOJI_45, // so + /* 46 */ MSGMOJI_46, // da + /* 47 */ MSGMOJI_47, // ta + /* 48 */ MSGMOJI_48, // ji + /* 49 */ MSGMOJI_49, // chi + /* 50 */ MSGMOJI_50, // sokuon + /* 51 */ MSGMOJI_51, // zu + /* 52 */ MSGMOJI_52, // tsu + /* 53 */ MSGMOJI_53, // de + /* 54 */ MSGMOJI_54, // te + /* 55 */ MSGMOJI_55, // do + /* 56 */ MSGMOJI_56, // to + /* 57 */ MSGMOJI_57, // na + /* 58 */ MSGMOJI_58, // ni + /* 59 */ MSGMOJI_59, // nu + /* 60 */ MSGMOJI_60, // ne + /* 61 */ MSGMOJI_61, // no + /* 62 */ MSGMOJI_62, // ba + /* 63 */ MSGMOJI_63, // pa + /* 64 */ MSGMOJI_64, // ha + /* 65 */ MSGMOJI_65, // bi + /* 66 */ MSGMOJI_66, // pi + /* 67 */ MSGMOJI_67, // hi + /* 68 */ MSGMOJI_68, // bu + /* 69 */ MSGMOJI_69, // pu + /* 70 */ MSGMOJI_70, // fu + /* 71 */ MSGMOJI_71, // be + /* 72 */ MSGMOJI_72, // pe + /* 73 */ MSGMOJI_73, // he + /* 74 */ MSGMOJI_74, // bo + /* 75 */ MSGMOJI_75, // po + /* 76 */ MSGMOJI_76, // ho + /* 77 */ MSGMOJI_77, // ma + /* 78 */ MSGMOJI_78, // mi + /* 79 */ MSGMOJI_79, // mu + /* 80 */ MSGMOJI_80, // me + /* 81 */ MSGMOJI_81, // mo + /* 82 */ MSGMOJI_82, // ya + /* 83 */ MSGMOJI_83, // Ya + /* 84 */ MSGMOJI_84, // yu + /* 85 */ MSGMOJI_85, // Yu + /* 86 */ MSGMOJI_86, // yo + /* 87 */ MSGMOJI_87, // Yo + /* 88 */ MSGMOJI_88, // ra + /* 89 */ MSGMOJI_89, // ri + /* 90 */ MSGMOJI_90, // ru + /* 91 */ MSGMOJI_91, // re + /* 92 */ MSGMOJI_92, // ro + /* 93 */ MSGMOJI_93, // wa + /* 94 */ MSGMOJI_94, // wo + /* 95 */ MSGMOJI_95, // n + + // Katakana + /* 96 */ MSGMOJI_96, // a + /* 97 */ MSGMOJI_97, // A + /* 98 */ MSGMOJI_98, // i + /* 99 */ MSGMOJI_99, // I + /* 100 */ MSGMOJI_100, // u + /* 101 */ MSGMOJI_101, // U + /* 102 */ MSGMOJI_102, // e + /* 103 */ MSGMOJI_103, // E + /* 104 */ MSGMOJI_104, // o + /* 105 */ MSGMOJI_105, // O + /* 106 */ MSGMOJI_106, // ga + /* 107 */ MSGMOJI_107, // ka + /* 108 */ MSGMOJI_108, // gi + /* 109 */ MSGMOJI_109, // ki + /* 110 */ MSGMOJI_110, // gu + /* 111 */ MSGMOJI_111, // ku + /* 112 */ MSGMOJI_112, // ge + /* 113 */ MSGMOJI_113, // ke + /* 114 */ MSGMOJI_114, // go + /* 115 */ MSGMOJI_115, // ko + /* 116 */ MSGMOJI_116, // za + /* 117 */ MSGMOJI_117, // sa + /* 118 */ MSGMOJI_118, // ji + /* 119 */ MSGMOJI_119, // shi + /* 120 */ MSGMOJI_120, // zu + /* 121 */ MSGMOJI_121, // su + /* 122 */ MSGMOJI_122, // ze + /* 123 */ MSGMOJI_123, // se + /* 124 */ MSGMOJI_124, // zo + /* 125 */ MSGMOJI_125, // so + /* 126 */ MSGMOJI_126, // da + /* 127 */ MSGMOJI_127, // ta + /* 128 */ MSGMOJI_128, // dji + /* 129 */ MSGMOJI_129, // chi + /* 130 */ MSGMOJI_130, // sokuon + /* 131 */ MSGMOJI_131, // dzu + /* 132 */ MSGMOJI_132, // tsu + /* 133 */ MSGMOJI_133, // de + /* 134 */ MSGMOJI_134, // te + /* 135 */ MSGMOJI_135, // do + /* 136 */ MSGMOJI_136, // to + /* 137 */ MSGMOJI_137, // na + /* 138 */ MSGMOJI_138, // ni + /* 139 */ MSGMOJI_139, // nu + /* 140 */ MSGMOJI_140, // ne + /* 141 */ MSGMOJI_141, // no + /* 142 */ MSGMOJI_142, // ba + /* 143 */ MSGMOJI_143, // pa + /* 144 */ MSGMOJI_144, // ha + /* 145 */ MSGMOJI_145, // bi + /* 146 */ MSGMOJI_146, // pi + /* 147 */ MSGMOJI_147, // hi + /* 148 */ MSGMOJI_148, // bu + /* 149 */ MSGMOJI_149, // pu + /* 150 */ MSGMOJI_150, // fu + /* 151 */ MSGMOJI_151, // be + /* 152 */ MSGMOJI_152, // pe + /* 153 */ MSGMOJI_153, // he + /* 154 */ MSGMOJI_154, // bo + /* 155 */ MSGMOJI_155, // po + /* 156 */ MSGMOJI_156, // ho + /* 157 */ MSGMOJI_157, // ma + /* 158 */ MSGMOJI_158, // mi + /* 159 */ MSGMOJI_159, // mu + /* 160 */ MSGMOJI_160, // me + /* 161 */ MSGMOJI_161, // mo + /* 162 */ MSGMOJI_162, // ya + /* 163 */ MSGMOJI_163, // Ya + /* 164 */ MSGMOJI_164, // yu + /* 165 */ MSGMOJI_165, // Yu + /* 166 */ MSGMOJI_166, // yo + /* 167 */ MSGMOJI_167, // Yo + /* 168 */ MSGMOJI_168, // ra + /* 169 */ MSGMOJI_169, // ri + /* 170 */ MSGMOJI_170, // ru + /* 171 */ MSGMOJI_171, // re + /* 172 */ MSGMOJI_172, // ro + /* 173 */ MSGMOJI_173, // wa + /* 174 */ MSGMOJI_174, // wo + /* 175 */ MSGMOJI_175, // n + /* 176 */ MSGMOJI_176, // choonpu + + // Kanji and other symbols + + /* 177 */ MSGMOJI_177, // C-Left + /* 178 */ MSGMOJI_178, // C-Right + /* 179 */ MSGMOJI_179, // C-Down + /* 180 */ MSGMOJI_180, // C-Up + /* 181 */ MSGMOJI_181, + /* 182 */ MSGMOJI_182, + /* 183 */ MSGMOJI_183, // Numeral 4 + /* 184 */ MSGMOJI_184, + /* 185 */ MSGMOJI_185, + /* 186 */ MSGMOJI_186, // Center dot + /* 187 */ MSGMOJI_187, + /* 188 */ MSGMOJI_188, + /* 189 */ MSGMOJI_189, + /* 190 */ MSGMOJI_190, + /* 191 */ MSGMOJI_191, + /* 192 */ MSGMOJI_192, + /* 193 */ MSGMOJI_193, + /* 194 */ MSGMOJI_194, + /* 195 */ MSGMOJI_195, // Latin D + /* 196 */ MSGMOJI_196, // Latin r + /* 197 */ MSGMOJI_197, // Period + /* 198 */ MSGMOJI_198, + /* 199 */ MSGMOJI_199, + /* 200 */ MSGMOJI_200, + /* 201 */ MSGMOJI_201, + /* 202 */ MSGMOJI_202, + /* 203 */ MSGMOJI_203, + /* 204 */ MSGMOJI_204, + /* 205 */ MSGMOJI_205, + /* 206 */ MSGMOJI_206, + /* 207 */ MSGMOJI_207, + /* 208 */ MSGMOJI_208, + /* 209 */ MSGMOJI_209, + /* 210 */ MSGMOJI_210, + /* 211 */ MSGMOJI_211, + /* 212 */ MSGMOJI_212, + /* 213 */ MSGMOJI_213, + /* 214 */ MSGMOJI_214, + /* 215 */ MSGMOJI_215, + /* 216 */ MSGMOJI_216, + /* 217 */ MSGMOJI_217, // Numeral 5 + /* 218 */ MSGMOJI_218, + /* 219 */ MSGMOJI_219, + /* 220 */ MSGMOJI_220, + /* 221 */ MSGMOJI_221, + /* 222 */ MSGMOJI_222, + /* 223 */ MSGMOJI_223, + /* 224 */ MSGMOJI_224, + /* 225 */ MSGMOJI_225, + /* 226 */ MSGMOJI_226, // Numeral 3 + /* 227 */ MSGMOJI_227, + /* 228 */ MSGMOJI_228, + /* 229 */ MSGMOJI_229, + /* 230 */ MSGMOJI_230, + /* 231 */ MSGMOJI_231, + /* 232 */ MSGMOJI_232, + /* 233 */ MSGMOJI_233, + /* 234 */ MSGMOJI_234, + /* 235 */ MSGMOJI_235, + /* 236 */ MSGMOJI_236, + /* 237 */ MSGMOJI_237, + /* 238 */ MSGMOJI_238, + /* 239 */ MSGMOJI_239, + /* 240 */ MSGMOJI_240, + /* 241 */ MSGMOJI_241, + /* 242 */ MSGMOJI_242, + /* 243 */ MSGMOJI_243, + /* 244 */ MSGMOJI_244, + /* 245 */ MSGMOJI_245, + /* 246 */ MSGMOJI_246, + /* 247 */ MSGMOJI_247, + /* 248 */ MSGMOJI_248, + /* 249 */ MSGMOJI_249, + /* 250 */ MSGMOJI_250, + /* 251 */ MSGMOJI_251, + /* 252 */ MSGMOJI_252, + /* 253 */ MSGMOJI_253, + /* 254 */ MSGMOJI_254, + /* 255 */ MSGMOJI_255, + /* 256 */ MSGMOJI_256, + /* 257 */ MSGMOJI_257, + /* 258 */ MSGMOJI_258, + /* 259 */ MSGMOJI_259, + /* 260 */ MSGMOJI_260, + /* 261 */ MSGMOJI_261, + /* 262 */ MSGMOJI_262, + /* 263 */ MSGMOJI_263, + /* 264 */ MSGMOJI_264, + /* 265 */ MSGMOJI_265, + /* 266 */ MSGMOJI_266, + /* 267 */ MSGMOJI_267, // ! + /* 268 */ MSGMOJI_268, + /* 269 */ MSGMOJI_269, + /* 270 */ MSGMOJI_270, + /* 271 */ MSGMOJI_271, + /* 272 */ MSGMOJI_272, + /* 273 */ MSGMOJI_273, + /* 274 */ MSGMOJI_274, + /* 275 */ MSGMOJI_275, + /* 276 */ MSGMOJI_276, + /* 277 */ MSGMOJI_277, + /* 278 */ MSGMOJI_278, + /* 279 */ MSGMOJI_279, + /* 280 */ MSGMOJI_280, + /* 281 */ MSGMOJI_281, + /* 282 */ MSGMOJI_282, + /* 283 */ MSGMOJI_283, + /* 284 */ MSGMOJI_284, + /* 285 */ MSGMOJI_285, + /* 286 */ MSGMOJI_286, + /* 287 */ MSGMOJI_287, + /* 288 */ MSGMOJI_288, + /* 289 */ MSGMOJI_289, + /* 290 */ MSGMOJI_290, + /* 291 */ MSGMOJI_291, + /* 292 */ MSGMOJI_292, // ? + /* 293 */ MSGMOJI_293, + /* 294 */ MSGMOJI_294, + /* 295 */ MSGMOJI_295, + /* 296 */ MSGMOJI_296, + /* 297 */ MSGMOJI_297, + /* 298 */ MSGMOJI_298, + /* 299 */ MSGMOJI_299, + /* 300 */ MSGMOJI_300, + /* 301 */ MSGMOJI_301, + /* 302 */ MSGMOJI_302, + /* 303 */ MSGMOJI_303, + /* 304 */ MSGMOJI_304, + /* 305 */ MSGMOJI_305, + /* 306 */ MSGMOJI_306, + /* 307 */ MSGMOJI_307, + /* 308 */ MSGMOJI_308, + /* 309 */ MSGMOJI_309, + /* 310 */ MSGMOJI_310, + /* 311 */ MSGMOJI_311, + /* 312 */ MSGMOJI_312, + /* 313 */ MSGMOJI_313, + /* 314 */ MSGMOJI_314, + /* 315 */ MSGMOJI_315, + /* 316 */ MSGMOJI_316, + /* 317 */ MSGMOJI_317, + /* 318 */ MSGMOJI_318, + /* 319 */ MSGMOJI_319, + /* 320 */ MSGMOJI_320, + /* 321 */ MSGMOJI_321, + /* 322 */ MSGMOJI_322, + /* 323 */ MSGMOJI_323, + /* 324 */ MSGMOJI_324, + /* 325 */ MSGMOJI_325, + /* 326 */ MSGMOJI_326, + /* 327 */ MSGMOJI_327, + /* 328 */ MSGMOJI_328, + /* 329 */ MSGMOJI_329, + /* 330 */ MSGMOJI_330, + /* 331 */ MSGMOJI_331, + /* 332 */ MSGMOJI_332, + /* 333 */ MSGMOJI_333, + /* 334 */ MSGMOJI_334, + /* 335 */ MSGMOJI_335, + /* 336 */ MSGMOJI_336, + /* 337 */ MSGMOJI_337, + /* 338 */ MSGMOJI_338, + /* 339 */ MSGMOJI_339, + /* 340 */ MSGMOJI_340, + /* 341 */ MSGMOJI_341, + /* 342 */ MSGMOJI_342, + /* 343 */ MSGMOJI_343, // Latin Y + /* 344 */ MSGMOJI_344, + /* 345 */ MSGMOJI_345, + /* 346 */ MSGMOJI_346, + /* 347 */ MSGMOJI_347, + /* 348 */ MSGMOJI_348, + /* 349 */ MSGMOJI_349, + /* 350 */ MSGMOJI_350, + /* 351 */ MSGMOJI_351, + /* 352 */ MSGMOJI_352, + /* 353 */ MSGMOJI_353, + /* 354 */ MSGMOJI_354, + /* 355 */ MSGMOJI_355, + /* 356 */ MSGMOJI_356, + /* 357 */ MSGMOJI_357, + /* 358 */ MSGMOJI_358, + /* 359 */ MSGMOJI_359, + /* 360 */ MSGMOJI_360, // Latin G + /* 361 */ MSGMOJI_361, + /* 362 */ MSGMOJI_362, + /* 363 */ MSGMOJI_363, + /* 364 */ MSGMOJI_364, + /* 365 */ MSGMOJI_365, // Latin O + /* 366 */ MSGMOJI_366, // Latin K + /* 367 */ MSGMOJI_367, + /* 368 */ MSGMOJI_368, + /* 369 */ MSGMOJI_369, + /* 370 */ MSGMOJI_370, + /* 371 */ MSGMOJI_371, // ~ + /* 372 */ MSGMOJI_372, + /* 373 */ MSGMOJI_373, + /* 374 */ MSGMOJI_374, + /* 375 */ MSGMOJI_375, // Latin Z + /* 376 */ MSGMOJI_376, // Latin R + /* 377 */ MSGMOJI_377, // Numeral 2 + /* 378 */ MSGMOJI_378, + /* 379 */ MSGMOJI_379, + /* 380 */ MSGMOJI_380, + /* 381 */ MSGMOJI_381, // Latin C + /* 382 */ MSGMOJI_382, + /* 383 */ MSGMOJI_383, + /* 384 */ MSGMOJI_384, + /* 385 */ MSGMOJI_385, + /* 386 */ MSGMOJI_386, + /* 387 */ MSGMOJI_387, + /* 388 */ MSGMOJI_388, + /* 389 */ MSGMOJI_389, + /* 390 */ MSGMOJI_390, + /* 391 */ MSGMOJI_391, + /* 392 */ MSGMOJI_392, + /* 393 */ MSGMOJI_393, + /* 394 */ MSGMOJI_394, + /* 395 */ MSGMOJI_395, + /* 396 */ MSGMOJI_396, + /* 397 */ MSGMOJI_397, + /* 398 */ MSGMOJI_398, + /* 399 */ MSGMOJI_399, + /* 400 */ MSGMOJI_400, + /* 401 */ MSGMOJI_401, + /* 402 */ MSGMOJI_402, + /* 403 */ MSGMOJI_403, + /* 404 */ MSGMOJI_404, + /* 405 */ MSGMOJI_405, + /* 406 */ MSGMOJI_406, + /* 407 */ MSGMOJI_407, + /* 408 */ MSGMOJI_408, + /* 409 */ MSGMOJI_409, + /* 410 */ MSGMOJI_410, + /* 411 */ MSGMOJI_411, + /* 412 */ MSGMOJI_412, + /* 413 */ MSGMOJI_413, + /* 414 */ MSGMOJI_414, + /* 415 */ MSGMOJI_415, + /* 416 */ MSGMOJI_416, + /* 417 */ MSGMOJI_417, + /* 418 */ MSGMOJI_418, + /* 419 */ MSGMOJI_419, + /* 420 */ MSGMOJI_420, + /* 421 */ MSGMOJI_421, + /* 422 */ MSGMOJI_422, + /* 423 */ MSGMOJI_423, + /* 424 */ MSGMOJI_424, + /* 425 */ MSGMOJI_425, + /* 426 */ MSGMOJI_426, + /* 427 */ MSGMOJI_427, + /* 428 */ MSGMOJI_428, + /* 429 */ MSGMOJI_429, + /* 430 */ MSGMOJI_430, + /* 431 */ MSGMOJI_431, + /* 432 */ MSGMOJI_432, + /* 433 */ MSGMOJI_433, + /* 434 */ MSGMOJI_434, + /* 435 */ MSGMOJI_435, + /* 436 */ MSGMOJI_436, // Numeral 1 + /* 437 */ MSGMOJI_437, + /* 438 */ MSGMOJI_438, + /* 439 */ MSGMOJI_439, + /* 440 */ MSGMOJI_440, + /* 441 */ MSGMOJI_441, + /* 442 */ MSGMOJI_442, + /* 443 */ MSGMOJI_443, + /* 444 */ MSGMOJI_444, + /* 445 */ MSGMOJI_445, + /* 446 */ MSGMOJI_446, + /* 447 */ MSGMOJI_447, + /* 448 */ MSGMOJI_448, + /* 449 */ MSGMOJI_449, + /* 450 */ MSGMOJI_450, + /* 451 */ MSGMOJI_451, + /* 452 */ MSGMOJI_452, + /* 453 */ MSGMOJI_453, + /* 454 */ MSGMOJI_454, + /* 455 */ MSGMOJI_455, + /* 456 */ MSGMOJI_456, + /* 457 */ MSGMOJI_457, + /* 458 */ MSGMOJI_458, + /* 459 */ MSGMOJI_459, + /* 460 */ MSGMOJI_460, + /* 461 */ MSGMOJI_461, + /* 462 */ MSGMOJI_462, + /* 463 */ MSGMOJI_463, + /* 464 */ MSGMOJI_464, + /* 465 */ MSGMOJI_465, + /* 466 */ MSGMOJI_466, + /* 467 */ MSGMOJI_467, + /* 468 */ MSGMOJI_468, + /* 469 */ MSGMOJI_469, + /* 470 */ MSGMOJI_470, + /* 471 */ MSGMOJI_471, + /* 472 */ MSGMOJI_472, + /* 473 */ MSGMOJI_473, + /* 474 */ MSGMOJI_474, + /* 475 */ MSGMOJI_475, + /* 476 */ MSGMOJI_476, + /* 477 */ MSGMOJI_477, + /* 478 */ MSGMOJI_478, + /* 479 */ MSGMOJI_479, + /* 480 */ MSGMOJI_480, + /* 481 */ MSGMOJI_481, + /* 482 */ MSGMOJI_482, + /* 483 */ MSGMOJI_483, + /* 484 */ MSGMOJI_484, + /* 485 */ MSGMOJI_485, + /* 486 */ MSGMOJI_486, + /* 487 */ MSGMOJI_487, + /* 488 */ MSGMOJI_488, + /* 489 */ MSGMOJI_489, + /* 490 */ MSGMOJI_490, + /* 491 */ MSGMOJI_491, + /* 492 */ MSGMOJI_492, + /* 493 */ MSGMOJI_493, + /* 494 */ MSGMOJI_494, + /* 495 */ MSGMOJI_495, + /* 496 */ MSGMOJI_496, + /* 497 */ MSGMOJI_497, + /* 498 */ MSGMOJI_498, + /* 499 */ MSGMOJI_499, + /* 500 */ MSGMOJI_500, + /* 501 */ MSGMOJI_501, + /* 502 */ MSGMOJI_502, + /* 503 */ MSGMOJI_503, + /* 504 */ MSGMOJI_504, + /* 505 */ MSGMOJI_505, + /* 506 */ MSGMOJI_506, + /* 507 */ MSGMOJI_507, + /* 508 */ MSGMOJI_508, + /* 509 */ MSGMOJI_509, + /* 510 */ MSGMOJI_510, + /* 511 */ MSGMOJI_511, + /* 512 */ MSGMOJI_512, + /* 513 */ MSGMOJI_513, + /* 514 */ MSGMOJI_514, + /* 515 */ MSGMOJI_515, + /* 516 */ MSGMOJI_516, + /* 517 */ MSGMOJI_517, + /* 518 */ MSGMOJI_518, + /* 519 */ MSGMOJI_519, + /* 520 */ MSGMOJI_520, + /* 521 */ MSGMOJI_521, + /* 522 */ MSGMOJI_522, + /* 523 */ MSGMOJI_523, + /* 524 */ MSGMOJI_524, // Numeral 0 + /* 525 */ MSGMOJI_525, + /* 526 */ MSGMOJI_526, + /* 527 */ MSGMOJI_527, + /* 528 */ MSGMOJI_528, + /* 529 */ MSGMOJI_529, + /* 530 */ MSGMOJI_530, + /* 531 */ MSGMOJI_531, + /* 532 */ MSGMOJI_532, + /* 533 */ MSGMOJI_533, + /* 534 */ MSGMOJI_534, + /* 535 */ MSGMOJI_535, + /* 536 */ MSGMOJI_536, + /* 537 */ MSGMOJI_537, + /* 538 */ MSGMOJI_538, + /* 539 */ MSGMOJI_539, + /* 540 */ MSGMOJI_540, + /* 541 */ MSGMOJI_541, + /* 542 */ MSGMOJI_542, + /* 543 */ MSGMOJI_543, + /* 544 */ MSGMOJI_544, + /* 545 */ MSGMOJI_545, + /* 546 */ MSGMOJI_546, + /* 547 */ MSGMOJI_547, + /* 548 */ MSGMOJI_548, + /* 549 */ MSGMOJI_549, + /* 550 */ MSGMOJI_550, + /* 551 */ MSGMOJI_551, + /* 552 */ MSGMOJI_552, + /* 553 */ MSGMOJI_553, + /* 554 */ MSGMOJI_554, + /* 555 */ MSGMOJI_555, + /* 556 */ MSGMOJI_556, + /* 557 */ MSGMOJI_557, + /* 558 */ MSGMOJI_558, + /* 559 */ MSGMOJI_559, + /* 560 */ MSGMOJI_560, + /* 561 */ MSGMOJI_561, + /* 562 */ MSGMOJI_562, + /* 563 */ MSGMOJI_563, + /* 564 */ MSGMOJI_564, + /* 565 */ MSGMOJI_565, + /* 566 */ MSGMOJI_566, + /* 567 */ MSGMOJI_567, + /* 568 */ MSGMOJI_568, + /* 569 */ MSGMOJI_569, + /* 570 */ MSGMOJI_570, + /* 571 */ MSGMOJI_571, + /* 572 */ MSGMOJI_572, + /* 573 */ MSGMOJI_573, + /* 574 */ MSGMOJI_574, + /* 575 */ MSGMOJI_575, + /* 576 */ MSGMOJI_576, + /* 577 */ MSGMOJI_577, + /* 578 */ MSGMOJI_578, + /* 579 */ MSGMOJI_579, + /* 580 */ MSGMOJI_580, + /* 581 */ MSGMOJI_581, + /* 582 */ MSGMOJI_582, + /* 583 */ MSGMOJI_583, + /* 584 */ MSGMOJI_584, + /* 585 */ MSGMOJI_585, + /* 586 */ MSGMOJI_586, + /* 587 */ MSGMOJI_587, + /* 588 */ MSGMOJI_588, + /* 589 */ MSGMOJI_589, + /* 590 */ MSGMOJI_590, + /* 591 */ MSGMOJI_591, + /* 592 */ MSGMOJI_592, + /* 593 */ MSGMOJI_593, + /* 594 */ MSGMOJI_594, + /* 595 */ MSGMOJI_595, + /* 596 */ MSGMOJI_596, + /* 597 */ MSGMOJI_597, + /* 598 */ MSGMOJI_598, + /* 599 */ MSGMOJI_599, + /* 600 */ MSGMOJI_600, + /* 601 */ MSGMOJI_601, + /* 602 */ MSGMOJI_602, + /* 603 */ MSGMOJI_603, // Numeral 9 + /* 604 */ MSGMOJI_604, + /* 605 */ MSGMOJI_605, + /* 606 */ MSGMOJI_606, + /* 607 */ MSGMOJI_607, // Numeral 6 + /* 608 */ MSGMOJI_608, + /* 609 */ MSGMOJI_609, // Numeral 8 + /* 610 */ MSGMOJI_610, + /* 611 */ MSGMOJI_611, + /* 612 */ MSGMOJI_612, + /* 613 */ MSGMOJI_613, + /* 614 */ MSGMOJI_614, + /* 615 */ MSGMOJI_615, + /* 616 */ MSGMOJI_616, + /* 617 */ MSGMOJI_617, + /* 618 */ MSGMOJI_618, + /* 619 */ MSGMOJI_619, + /* 620 */ MSGMOJI_620, + /* 621 */ MSGMOJI_621, + /* 622 */ MSGMOJI_622, + /* 623 */ MSGMOJI_623, + /* 624 */ MSGMOJI_624, + /* 625 */ MSGMOJI_625, + /* 626 */ MSGMOJI_626, + /* 627 */ MSGMOJI_627, + /* 628 */ MSGMOJI_628, + /* 629 */ MSGMOJI_629, + /* 630 */ MSGMOJI_630, + /* 631 */ MSGMOJI_631, + /* 632 */ MSGMOJI_632, + /* 633 */ MSGMOJI_633, + /* 634 */ MSGMOJI_634, + /* 635 */ MSGMOJI_635, + /* 636 */ MSGMOJI_636, + /* 637 */ MSGMOJI_637, + /* 638 */ MSGMOJI_638, + /* 639 */ MSGMOJI_639, + /* 640 */ MSGMOJI_640, + /* 641 */ MSGMOJI_641, + /* 642 */ MSGMOJI_642, + /* 643 */ MSGMOJI_643, + /* 644 */ MSGMOJI_644, + /* 645 */ MSGMOJI_645, + /* 646 */ MSGMOJI_646, + /* 647 */ MSGMOJI_647, + /* 648 */ MSGMOJI_648, + /* 649 */ MSGMOJI_649, + /* 650 */ MSGMOJI_650, + /* 651 */ MSGMOJI_651, + /* 652 */ MSGMOJI_652, + /* 653 */ MSGMOJI_653, + /* 654 */ MSGMOJI_654, + /* 655 */ MSGMOJI_655, + /* 656 */ MSGMOJI_656, + /* 657 */ MSGMOJI_657, + /* 658 */ MSGMOJI_658, + /* 659 */ MSGMOJI_659, + /* 660 */ MSGMOJI_660, + /* 661 */ MSGMOJI_661, + /* 662 */ MSGMOJI_662, + /* 663 */ MSGMOJI_663, + /* 664 */ MSGMOJI_664, + /* 665 */ MSGMOJI_665, + /* 666 */ MSGMOJI_666, + /* 667 */ MSGMOJI_667, + /* 668 */ MSGMOJI_668, + /* 669 */ MSGMOJI_669, + /* 670 */ MSGMOJI_670, + /* 671 */ MSGMOJI_671, + /* 672 */ MSGMOJI_672, + /* 673 */ MSGMOJI_673, + /* 674 */ MSGMOJI_674, + /* 675 */ MSGMOJI_675, + /* 676 */ MSGMOJI_676, + /* 677 */ MSGMOJI_677, + /* 678 */ MSGMOJI_678, + /* 679 */ MSGMOJI_679, + /* 680 */ MSGMOJI_680, + /* 681 */ MSGMOJI_681, + /* 682 */ MSGMOJI_682, + /* 683 */ MSGMOJI_683, + /* 684 */ MSGMOJI_684, + /* 685 */ MSGMOJI_685, + /* 686 */ MSGMOJI_686, + /* 687 */ MSGMOJI_687, + /* 688 */ MSGMOJI_688, + /* 689 */ MSGMOJI_689, + /* 690 */ MSGMOJI_690, + /* 691 */ MSGMOJI_691, // Latin B + /* 692 */ MSGMOJI_692, + /* 693 */ MSGMOJI_693, + /* 694 */ MSGMOJI_694, + /* 695 */ MSGMOJI_695, + /* 696 */ MSGMOJI_696, + /* 697 */ MSGMOJI_697, + /* 698 */ MSGMOJI_698, + /* 699 */ MSGMOJI_699, + /* 700 */ MSGMOJI_700, // Latin A + /* 701 */ MSGMOJI_701, + /* 702 */ MSGMOJI_702, + /* 703 */ MSGMOJI_703, + /* 704 */ MSGMOJI_704, + /* 705 */ MSGMOJI_705, + /* 706 */ MSGMOJI_706, + /* 707 */ MSGMOJI_707, + /* 708 */ MSGMOJI_708, + /* 709 */ MSGMOJI_709, + /* 710 */ MSGMOJI_710, + /* 711 */ MSGMOJI_711, + /* 712 */ MSGMOJI_712, + /* 713 */ MSGMOJI_713, + /* 714 */ MSGMOJI_714, + /* 715 */ MSGMOJI_715, // Latin U + /* 716 */ MSGMOJI_716, + /* 717 */ MSGMOJI_717, + /* 718 */ MSGMOJI_718, + /* 719 */ MSGMOJI_719, + /* 720 */ MSGMOJI_720, + /* 721 */ MSGMOJI_721, + /* 722 */ MSGMOJI_722, + /* 723 */ MSGMOJI_723, + /* 724 */ MSGMOJI_724, // Latin P + /* 725 */ MSGMOJI_725, + /* 726 */ MSGMOJI_726, + + // Blank textures + /* 727 */ MSGMOJI_727, + /* 728 */ MSGMOJI_728, + /* 729 */ MSGMOJI_729, + /* 730 */ MSGMOJI_730, + /* 731 */ MSGMOJI_731, + /* 732 */ MSGMOJI_732, + /* 733 */ MSGMOJI_733, + /* 734 */ MSGMOJI_734, + /* 735 */ MSGMOJI_735, +} MsgMojiCode; + #endif diff --git a/linker_scripts/eu/rev0/symbol_addrs.txt b/linker_scripts/eu/rev0/symbol_addrs.txt index c1c99525..0a546268 100644 --- a/linker_scripts/eu/rev0/symbol_addrs.txt +++ b/linker_scripts/eu/rev0/symbol_addrs.txt @@ -2399,53 +2399,48 @@ D_800D60AC = 0x800D60AC; D_800D60BC = 0x800D60BC; D_800D60D0 = 0x800D60D0; D_800DA910 = 0x800DA910; -D_800DA940 = 0x800DA940; +D_Gfx_800D94D0 = 0x800DA940; D_800DA958 = 0x800DA958; D_800DAAC8 = 0x800DAAC8; -D_800DAAF8 = 0x800DAAF8; +D_Gfx_800D9688 = 0x800DAAF8; D_800DAB10 = 0x800DAB10; D_800DABD0 = 0x800DABD0; D_800DAD80 = 0x800DAD80; D_800DADC0 = 0x800DADC0; -D_800DAE68 = 0x800DAE68; +D_Tex_800D99F8 = 0x800DAE68; D_800DB668 = 0x800DB668; D_800DBEC8 = 0x800DBEC8; D_800DBF68 = 0x800DBF68; D_800DBFB0 = 0x800DBFB0; D_800DC050 = 0x800DC050; -D_800DC090 = 0x800DC090; +D_Gfx_800DAC20 = 0x800DC090; D_800DC0F0 = 0x800DC0F0; -D_800DC128 = 0x800DC128; -D_800DC928 = 0x800DC928; -D_800DCE90 = 0x800DCE90; +D_Tex_800DACB8 = 0x800DC128; +D_Tex_800DB4B8 = 0x800DC928; +gTextCharPalettes = 0x800DCE90; D_800DCF10 = 0x800DCF10; -D_800DDC10 = 0x800DDC10; -D_800DDC80 = 0x800DDC80; -D_800DDE80 = 0x800DDE80; -D_800DE080 = 0x800DE080; -D_800DE280 = 0x800DE280; -D_800DE480 = 0x800DE480; -D_800DE680 = 0x800DE680; -D_800DE888 = 0x800DE888; -D_800DE8A0 = 0x800DE8A0; -D_800DEAA0 = 0x800DEAA0; -D_800DECA0 = 0x800DECA0; -D_800DF0A0 = 0x800DF0A0; -D_800DF2A0 = 0x800DF2A0; -D_800DF2B0 = 0x800DF2B0; -D_800DF2C0 = 0x800DF2C0; -D_800DF2D0 = 0x800DF2D0; -D_800DF2E0 = 0x800DF2E0; -D_800DF2F0 = 0x800DF2F0; -D_800DF36E = 0x800DF36E; -D_800DF372 = 0x800DF372; -D_800DF374 = 0x800DF374; -D_800DF3F0 = 0x800DF3F0; -D_800DF5EC = 0x800DF5EC; -D_800DF5F0 = 0x800DF5F0; -D_800DF7EC = 0x800DF7EC; -D_800DF7F0 = 0x800DF7F0; -D_800DF9EC = 0x800DF9EC; +gRcpInitDL = 0x800DDC10; +gSawtoothWaveSample = 0x800DDC80; +gTriangleWaveSample = 0x800DDE80; +gSineWaveSample = 0x800DE080; +gSquareWaveSample = 0x800DE280; +gWhiteNoiseSample = 0x800DE480; +gUnkSample = 0x800DE680; +gWaveSamples = 0x800DE880; //size:0x18 +gBendPitchOneOctaveFrequencies = 0x800DE8A0; //size:0x400 +gBendPitchTwoSemitonesFrequencies = 0x800DECA0; //size:0x400 +gPitchFrequencies = 0x800DF0A0; +gDefaultShortNoteVelocityTable = 0x800DF2A0; +gDefaultShortNoteGateTimeTable = 0x800DF2B0; +gDefaultEnvelope = 0x800DF2C0; +gZeroNoteSub = 0x800DF2D0; +gDefaultNoteSub = 0x800DF2E0; +gHaasEffectDelaySizes = 0x800DF2F0; //size:0x80 +gD_800DD200 = 0x800DF370; //size:0x80 +gHeadsetPanVolume = 0x800DF3F0; //size:0x200 +gStereoPanVolume = 0x800DF5F0; //size:0x200 +gDefaultPanVolume = 0x800DF7F0; //size:0x200 + D_800DF9F0 = 0x800DF9F0; D_800DFA02 = 0x800DFA02; D_800DFA08 = 0x800DFA08; @@ -7596,7 +7591,7 @@ D_fr_80187D64 = 0x80187D64; //segment:ast_radio_fr type:u16 D_fr_80187D9C = 0x80187D9C; //segment:ast_radio_fr type:u16 D_fr_80187E0C = 0x80187E0C; //segment:ast_radio_fr type:u16 D_fr_80187E74 = 0x80187E74; //segment:ast_radio_fr type:u16 -D_fr_80187ED8 = 0x80187ED8; //segment:ast_radio_fr +gMsgLookupFr = 0x80187ED8; //segment:ast_radio_fr D_en_8017B230 = 0x8017B230; //segment:ast_radio_en type:u16 D_en_8017B954 = 0x8017B954; //segment:ast_radio_en type:u16 @@ -8377,7 +8372,7 @@ D_en_801873A8 = 0x801873A8; //segment:ast_radio_en type:u16 D_en_80187400 = 0x80187400; //segment:ast_radio_en type:u16 D_en_80187460 = 0x80187460; //segment:ast_radio_en type:u16 D_en_801874C8 = 0x801874C8; //segment:ast_radio_en type:u16 -D_en_8018751C = 0x8018751C; //segment:ast_radio_en +gMsgLookupEn = 0x8018751C; //segment:ast_radio_en D_de_8017B230 = 0x8017B230; //segment:ast_radio_de type:u16 D_de_8017BA38 = 0x8017BA38; //segment:ast_radio_de type:u16 @@ -9158,4 +9153,4 @@ D_de_80189610 = 0x80189610; //segment:ast_radio_de type:u16 D_de_80189678 = 0x80189678; //segment:ast_radio_de type:u16 D_de_801896E8 = 0x801896E8; //segment:ast_radio_de type:u16 D_de_8018974C = 0x8018974C; //segment:ast_radio_de type:u16 -D_de_801897B4 = 0x801897B4; //segment:ast_radio_de +gMsgLookupDe = 0x801897B4; //segment:ast_radio_de diff --git a/linker_scripts/jp/rev0/symbol_addrs.txt b/linker_scripts/jp/rev0/symbol_addrs.txt index 1cfe2ab6..0812be15 100644 --- a/linker_scripts/jp/rev0/symbol_addrs.txt +++ b/linker_scripts/jp/rev0/symbol_addrs.txt @@ -3037,56 +3037,51 @@ D_800D9400 = 0x800D9400; D_800D9428 = 0x800D9428; D_800D9458 = 0x800D9458; D_800D9488 = 0x800D9488; -D_800D94B4 = 0x800D94B4; +gMsgLookup = 0x800D94B4; D_800DAD00 = 0x800DAD00; D_800DF360 = 0x800DF360; D_800E43E0 = 0x800E43E0; -D_800E4410 = 0x800E4410; +D_Gfx_800D94D0 = 0x800E4410; D_800E4428 = 0x800E4428; D_800E4598 = 0x800E4598; -D_800E45C8 = 0x800E45C8; +D_Gfx_800D9688 = 0x800E45C8; D_800E45E0 = 0x800E45E0; D_800E46A0 = 0x800E46A0; D_800E4850 = 0x800E4850; D_800E4890 = 0x800E4890; -D_800E4938 = 0x800E4938; +D_Tex_800D99F8 = 0x800E4938; D_800E5138 = 0x800E5138; D_800E5998 = 0x800E5998; D_800E5A38 = 0x800E5A38; D_800E5A80 = 0x800E5A80; D_800E5B20 = 0x800E5B20; -D_800E5B60 = 0x800E5B60; +D_Gfx_800DAC20 = 0x800E5B60; D_800E5BC0 = 0x800E5BC0; -D_800E5BF8 = 0x800E5BF8; -D_800E63F8 = 0x800E63F8; -D_800E6960 = 0x800E6960; -D_800E69E0 = 0x800E69E0; -D_800E6A50 = 0x800E6A50; -D_800E6C50 = 0x800E6C50; -D_800E6E50 = 0x800E6E50; -D_800E7050 = 0x800E7050; -D_800E7250 = 0x800E7250; -D_800E7450 = 0x800E7450; -D_800E7658 = 0x800E7658; -D_800E7670 = 0x800E7670; -D_800E7870 = 0x800E7870; -D_800E7A70 = 0x800E7A70; -D_800E7E70 = 0x800E7E70; -D_800E8070 = 0x800E8070; -D_800E8080 = 0x800E8080; -D_800E8090 = 0x800E8090; -D_800E80A0 = 0x800E80A0; -D_800E80B0 = 0x800E80B0; -D_800E80C0 = 0x800E80C0; -D_800E813E = 0x800E813E; -D_800E8142 = 0x800E8142; -D_800E8144 = 0x800E8144; -D_800E81C0 = 0x800E81C0; -D_800E83BC = 0x800E83BC; -D_800E83C0 = 0x800E83C0; -D_800E85BC = 0x800E85BC; -D_800E85C0 = 0x800E85C0; -D_800E87BC = 0x800E87BC; +D_Tex_800DACB8 = 0x800E5BF8; +D_Tex_800DB4B8 = 0x800E63F8; +gTextCharPalettes = 0x800E6960; +gRcpInitDL = 0x800E69E0; +gSawtoothWaveSample =0x800E6A50; +gTriangleWaveSample =0x800E6C50; +gSineWaveSample =0x800E6E50; +gSquareWaveSample =0x800E7050; +gWhiteNoiseSample =0x800E7250; +gUnkSample =0x800E7450; +gWaveSamples =0x800E7650; //size:0x18 +gBendPitchOneOctaveFrequencies = 0x800E7670; //size:0x400 +gBendPitchTwoSemitonesFrequencies = 0x800E7A70; //size:0x400 +gPitchFrequencies = 0x800E7E70; +gDefaultShortNoteVelocityTable = 0x800E8070; +gDefaultShortNoteGateTimeTable = 0x800E8080; +gDefaultEnvelope = 0x800E8090; +gZeroNoteSub = 0x800E80A0; +gDefaultNoteSub = 0x800E80B0; +gHaasEffectDelaySizes = 0x800E80C0; //size:0x80 +gD_800DD200 = 0x800E8140; //size:0x80 +gHeadsetPanVolume = 0x800E81C0; //size:0x200 +gStereoPanVolume = 0x800E83C0; //size:0x200 +gDefaultPanVolume = 0x800E85C0; //size:0x200 + D_800E87C0 = 0x800E87C0; D_800E87D2 = 0x800E87D2; D_800E87D8 = 0x800E87D8; diff --git a/linker_scripts/us/rev1/symbol_addrs_assets.txt b/linker_scripts/us/rev1/symbol_addrs_assets.txt index 9ae8fb9b..f396714e 100644 --- a/linker_scripts/us/rev1/symbol_addrs_assets.txt +++ b/linker_scripts/us/rev1/symbol_addrs_assets.txt @@ -50,7 +50,7 @@ gDefaultEnvelope = 0x800DD150; gZeroNoteSub = 0x800DD160; gDefaultNoteSub = 0x800DD170; gHaasEffectDelaySizes = 0x800DD180; // size:0x80 type:u16 -D_800DD200 = 0x800DD200; // size:0x80 type:s16 +gD_800DD200 = 0x800DD200; // size:0x80 type:s16 gHeadsetPanVolume = 0x800DD280; // size:0x200 type:f32 gStereoPanVolume = 0x800DD480; // size:0x200 type:f32 gDefaultPanVolume = 0x800DD680; // size:0x200 type:f32 diff --git a/src/audio/audio_general.c b/src/audio/audio_general.c index c3e9360a..8701a594 100644 --- a/src/audio/audio_general.c +++ b/src/audio/audio_general.c @@ -126,51 +126,51 @@ u32 sEventSfx[] = { NA_SE_OB_PLATE_ROLL, }; SoundTestTrack sSoundTestTracks[] = { - /* 0 */ { NA_BGM_OPENING, 22, -1 }, - /* 1 */ { NA_BGM_TITLE, 23, -1 }, - /* 2 */ { NA_BGM_SELECT, 23, -1 }, - /* 3 */ { NA_BGM_MAP, 280, -1 }, - /* 4 */ { NA_BGM_START_DEMO, 0, -1 }, - /* 5 */ { NA_BGM_START_DEMO_S, 1, -1 }, - /* 6 */ { NA_BGM_START_DEMO_M, 1, -1 }, - /* 7 */ { NA_BGM_ME_START_DEMO, 1, -1 }, - /* 8 */ { NA_BGM_FO_START_DEMO, 8, -1 }, - /* 9 */ { NA_BGM_STAGE_CO, 0, -1 }, - /* 10 */ { NA_BGM_STAGE_ME, 1, -1 }, - /* 11 */ { NA_BGM_STAGE_TI, 2, -1 }, - /* 12 */ { NA_BGM_STAGE_SX, 3, -1 }, - /* 13 */ { NA_BGM_STAGE_ZO, 4, -1 }, - /* 14 */ { NA_BGM_STAGE_A6, 5, -1 }, - /* 15 */ { NA_BGM_STAGE_VE1, 6, -1 }, - /* 16 */ { NA_BGM_STAGE_SY, 7, -1 }, - /* 17 */ { NA_BGM_STAGE_FO, 8, -1 }, - /* 18 */ { NA_BGM_STAGE_BO, 10, -1 }, - /* 19 */ { NA_BGM_STAGE_KA, 11, -1 }, - /* 20 */ { NA_BGM_STAGE_AQ, 12, -1 }, - /* 21 */ { NA_BGM_STAGE_WZ, 1, -1 }, - /* 22 */ { NA_BGM_KATT, 13, -1 }, - /* 23 */ { NA_BGM_BILL, 11, -1 }, - /* 24 */ { NA_BGM_BOSS_CO, 0, -1 }, - /* 25 */ { NA_BGM_BOSS_ME, 1, 0 }, - /* 26 */ { NA_BGM_BOSS_ME, 1, -1 }, - /* 27 */ { NA_BGM_REAL_BOSS, 7, -1 }, - /* 28 */ { NA_BGM_BOSS_BO, 10, -1 }, - /* 29 */ { NA_BGM_STARWOLF, 6, -1 }, - /* 30 */ { NA_BGM_COURSE_CLEAR, 0, -1 }, - /* 31 */ { NA_BGM_COURSE_FAILURE, 0, -1 }, - /* 32 */ { NA_BGM_PLAYER_DOWN, 0, -1 }, - /* 33 */ { NA_BGM_GAME_OVER, 25, -1 }, - /* 34 */ { NA_BGM_TRAINING, 28, -1 }, - /* 35 */ { NA_BGM_BATTLE, 784, -1 }, - /* 36 */ { NA_BGM_BATTLE_LAST, 785, -1 }, - /* 37 */ { NA_BGM_VS_SELECT, 23, -1 }, - /* 38 */ { NA_BGM_DASH_INTO_BASE, 6, 0 }, - /* 39 */ { NA_BGM_STAGE_ANDROSS, 23, -1 }, - /* 40 */ { NA_BGM_BOSS_ANDROSS, 6, 0 }, - /* 41 */ { NA_BGM_BOSS_ANDROSS, 6, -1 }, - /* 42 */ { NA_BGM_ANDROSS_BRAIN, 6, -1 }, - /* 43 */ { NA_BGM_ALL_CLEAR, 6, -1 }, - /* 44 */ { NA_BGM_STAFF_ROLL, 27, -1 }, + /* 0 */ { NA_BGM_OPENING, AUDIOSPEC_22 | (SFXCHAN_0 << 8), -1 }, + /* 1 */ { NA_BGM_TITLE, AUDIOSPEC_23 | (SFXCHAN_0 << 8), -1 }, + /* 2 */ { NA_BGM_SELECT, AUDIOSPEC_23 | (SFXCHAN_0 << 8), -1 }, + /* 3 */ { NA_BGM_MAP, AUDIOSPEC_24 | (SFXCHAN_1 << 8), -1 }, + /* 4 */ { NA_BGM_START_DEMO, AUDIOSPEC_0 | (SFXCHAN_0 << 8), -1 }, + /* 5 */ { NA_BGM_START_DEMO_S, AUDIOSPEC_1 | (SFXCHAN_0 << 8), -1 }, + /* 6 */ { NA_BGM_START_DEMO_M, AUDIOSPEC_1 | (SFXCHAN_0 << 8), -1 }, + /* 7 */ { NA_BGM_ME_START_DEMO, AUDIOSPEC_1 | (SFXCHAN_0 << 8), -1 }, + /* 8 */ { NA_BGM_FO_START_DEMO, AUDIOSPEC_8 | (SFXCHAN_0 << 8), -1 }, + /* 9 */ { NA_BGM_STAGE_CO, AUDIOSPEC_0 | (SFXCHAN_0 << 8), -1 }, + /* 10 */ { NA_BGM_STAGE_ME, AUDIOSPEC_1 | (SFXCHAN_0 << 8), -1 }, + /* 11 */ { NA_BGM_STAGE_TI, AUDIOSPEC_2 | (SFXCHAN_0 << 8), -1 }, + /* 12 */ { NA_BGM_STAGE_SX, AUDIOSPEC_3 | (SFXCHAN_0 << 8), -1 }, + /* 13 */ { NA_BGM_STAGE_ZO, AUDIOSPEC_4 | (SFXCHAN_0 << 8), -1 }, + /* 14 */ { NA_BGM_STAGE_A6, AUDIOSPEC_5 | (SFXCHAN_0 << 8), -1 }, + /* 15 */ { NA_BGM_STAGE_VE1, AUDIOSPEC_6 | (SFXCHAN_0 << 8), -1 }, + /* 16 */ { NA_BGM_STAGE_SY, AUDIOSPEC_7 | (SFXCHAN_0 << 8), -1 }, + /* 17 */ { NA_BGM_STAGE_FO, AUDIOSPEC_8 | (SFXCHAN_0 << 8), -1 }, + /* 18 */ { NA_BGM_STAGE_BO, AUDIOSPEC_10 | (SFXCHAN_0 << 8), -1 }, + /* 19 */ { NA_BGM_STAGE_KA, AUDIOSPEC_11 | (SFXCHAN_0 << 8), -1 }, + /* 20 */ { NA_BGM_STAGE_AQ, AUDIOSPEC_12 | (SFXCHAN_0 << 8), -1 }, + /* 21 */ { NA_BGM_STAGE_WZ, AUDIOSPEC_1 | (SFXCHAN_0 << 8), -1 }, + /* 22 */ { NA_BGM_KATT, AUDIOSPEC_13 | (SFXCHAN_0 << 8), -1 }, + /* 23 */ { NA_BGM_BILL, AUDIOSPEC_11 | (SFXCHAN_0 << 8), -1 }, + /* 24 */ { NA_BGM_BOSS_CO, AUDIOSPEC_0 | (SFXCHAN_0 << 8), -1 }, + /* 25 */ { NA_BGM_BOSS_ME, AUDIOSPEC_1 | (SFXCHAN_0 << 8), 0 }, + /* 26 */ { NA_BGM_BOSS_ME, AUDIOSPEC_1 | (SFXCHAN_0 << 8), -1 }, + /* 27 */ { NA_BGM_REAL_BOSS, AUDIOSPEC_7 | (SFXCHAN_0 << 8), -1 }, + /* 28 */ { NA_BGM_BOSS_BO, AUDIOSPEC_10 | (SFXCHAN_0 << 8), -1 }, + /* 29 */ { NA_BGM_STARWOLF, AUDIOSPEC_6 | (SFXCHAN_0 << 8), -1 }, + /* 30 */ { NA_BGM_COURSE_CLEAR, AUDIOSPEC_0 | (SFXCHAN_0 << 8), -1 }, + /* 31 */ { NA_BGM_COURSE_FAILURE, AUDIOSPEC_0 | (SFXCHAN_0 << 8), -1 }, + /* 32 */ { NA_BGM_PLAYER_DOWN, AUDIOSPEC_0 | (SFXCHAN_0 << 8), -1 }, + /* 33 */ { NA_BGM_GAME_OVER, AUDIOSPEC_25 | (SFXCHAN_0 << 8), -1 }, + /* 34 */ { NA_BGM_TRAINING, AUDIOSPEC_28 | (SFXCHAN_0 << 8), -1 }, + /* 35 */ { NA_BGM_BATTLE, AUDIOSPEC_16 | (SFXCHAN_3 << 8), -1 }, + /* 36 */ { NA_BGM_BATTLE_LAST, AUDIOSPEC_17 | (SFXCHAN_3 << 8), -1 }, + /* 37 */ { NA_BGM_VS_SELECT, AUDIOSPEC_23 | (SFXCHAN_0 << 8), -1 }, + /* 38 */ { NA_BGM_DASH_INTO_BASE, AUDIOSPEC_6 | (SFXCHAN_0 << 8), 0 }, + /* 39 */ { NA_BGM_STAGE_ANDROSS, AUDIOSPEC_23 | (SFXCHAN_0 << 8), -1 }, + /* 40 */ { NA_BGM_BOSS_ANDROSS, AUDIOSPEC_6 | (SFXCHAN_0 << 8), 0 }, + /* 41 */ { NA_BGM_BOSS_ANDROSS, AUDIOSPEC_6 | (SFXCHAN_0 << 8), -1 }, + /* 42 */ { NA_BGM_ANDROSS_BRAIN, AUDIOSPEC_6 | (SFXCHAN_0 << 8), -1 }, + /* 43 */ { NA_BGM_ALL_CLEAR, AUDIOSPEC_6 | (SFXCHAN_0 << 8), -1 }, + /* 44 */ { NA_BGM_STAFF_ROLL, AUDIOSPEC_27 | (SFXCHAN_0 << 8), -1 }, }; PlaylistCmd sPlaylists[][100] = { @@ -1332,7 +1332,7 @@ void Audio_PlaySfx(u32 sfxId, f32* sfxSource, u8 token, f32* freqMod, f32* volMo SfxRequest* request = &sSfxRequests[sSfxRequestWriteIndex]; request->sfxId = sfxId; - request->pos = sfxSource; + request->source = sfxSource; request->token = token; request->freqMod = freqMod; request->volMod = volMod; @@ -1356,17 +1356,17 @@ void Audio_RemoveMatchingSfxRequests(u8 aspect, SfxBankEntry* data) { break; case 1: if (((request->sfxId & SFX_BANK_MASK) == (data->sfxId & SFX_BANK_MASK)) && - (&request->pos[0] == data->xPos)) { + (&request->source[0] == data->xPos)) { found = true; } break; case 2: - if (&request->pos[0] == data->xPos) { + if (&request->source[0] == data->xPos) { found = true; } break; case 3: - if ((&request->pos[0] == data->xPos) && (request->sfxId == data->sfxId)) { + if ((&request->source[0] == data->xPos) && (request->sfxId == data->sfxId)) { found = true; } break; @@ -1403,7 +1403,7 @@ void Audio_ProcessSfxRequest(void) { next = sSfxBanks[bankId][0].next; count = 0; while ((next != 0xFF) && (next != 0)) { - if (request->pos == sSfxBanks[bankId][next].xPos) { + if (&request->source[0] == sSfxBanks[bankId][next].xPos) { if (request->sfxId == sSfxBanks[bankId][next].sfxId) { count = sUsedChannelsPerBank[sSfxChannelLayout][bankId]; } else { @@ -1446,9 +1446,9 @@ void Audio_ProcessSfxRequest(void) { if ((sSfxBanks[bankId][sSfxBankFreeListStart[bankId]].next != 0xFF) && (next != 0)) { next = sSfxBankFreeListStart[bankId]; entry = &sSfxBanks[bankId][next]; - entry->xPos = &request->pos[0]; - entry->yPos = &request->pos[1]; - entry->zPos = &request->pos[2]; + entry->xPos = &request->source[0]; + entry->yPos = &request->source[1]; + entry->zPos = &request->source[2]; entry->token = request->token; entry->freqMod = request->freqMod; entry->volMod = request->volMod; diff --git a/src/audio/audio_heap.c b/src/audio/audio_heap.c index 91c1b56c..5ea0674d 100644 --- a/src/audio/audio_heap.c +++ b/src/audio/audio_heap.c @@ -95,7 +95,7 @@ void AudioHeap_DiscardFont(s32 fontId) { for (i = 0; i < gNumNotes; i++) { note = &gNotes[i]; if (fontId == note->playbackState.fontId) { - if (note->playbackState.unk_04 == 0 && note->playbackState.priority != 0) { + if ((note->playbackState.unk_04 == 0) && (note->playbackState.priority != 0)) { note->playbackState.parentLayer->enabled = false; note->playbackState.parentLayer->finished = true; } @@ -542,7 +542,7 @@ void AudioHeap_UpdateReverbs(void) { } for (reverbIndex = 0; reverbIndex < gNumSynthReverbs; reverbIndex++) { for (i = 0; i < count; i++) { - gSynthReverbs[reverbIndex].unk_08 -= gSynthReverbs[reverbIndex].unk_08 / 3; + gSynthReverbs[reverbIndex].decayRatio -= gSynthReverbs[reverbIndex].decayRatio / 3; } } } @@ -648,8 +648,7 @@ void AudioHeap_Init(void) { gSampleDmaCount = 0; gAudioBufferParams.samplingFrequency = spec->samplingFrequency; gAudioBufferParams.aiSamplingFrequency = osAiSetFrequency(gAudioBufferParams.samplingFrequency); - gAudioBufferParams.samplesPerFrameTarget = - ((gAudioBufferParams.samplingFrequency / gRefreshRate) + 0xF) & (u16) ~0xF; + gAudioBufferParams.samplesPerFrameTarget = ALIGN16(gAudioBufferParams.samplingFrequency / gRefreshRate); gAudioBufferParams.minAiBufferLength = gAudioBufferParams.samplesPerFrameTarget - 0x10; gAudioBufferParams.maxAiBufferLength = gAudioBufferParams.samplesPerFrameTarget + 0x10; @@ -673,7 +672,7 @@ void AudioHeap_Init(void) { if (gAudioBufferParams.count >= 2) { gAudioBufferParams.maxAiBufferLength -= 0x10; } - gMaxAudioCmds = (gNumNotes * 0x14 * gAudioBufferParams.ticksPerUpdate) + (spec->numReverbs * 0x20) + 0x1E0; + gMaxAudioCmds = (gNumNotes * 20 * gAudioBufferParams.ticksPerUpdate) + (spec->numReverbs * 32) + 480; persistentSize = spec->persistentSeqCacheSize + spec->persistentFontCacheSize + spec->persistentSampleBankCacheSize + spec->persistentSampleCacheSize + 0x10; temporarySize = spec->temporarySeqCacheSize + spec->temporaryFontCacheSize + spec->temporarySampleBankCacheSize + @@ -712,9 +711,9 @@ void AudioHeap_Init(void) { reverb = &gSynthReverbs[i]; reverb->downsampleRate = settings->downsampleRate; reverb->windowSize = settings->windowSize * 64; - reverb->unk_08 = settings->unk_2; reverb->decayRatio = settings->decayRatio; - reverb->unk_0E = settings->unk_6; + reverb->leakRtL = settings->leakRtL; + reverb->leakLtR = settings->leakLtR; reverb->useReverb = 8; reverb->leftRingBuf = AudioHeap_AllocZeroed(&gMiscPool, reverb->windowSize * 2); diff --git a/src/audio/audio_playback.c b/src/audio/audio_playback.c index a3d49541..fc858ae4 100644 --- a/src/audio/audio_playback.c +++ b/src/audio/audio_playback.c @@ -40,93 +40,93 @@ void func_80012C40(Note* note); void func_80012CEC(Note* note, SequenceLayer* layer); void func_80011890(Note* note, NoteAttributes* noteAttr) { - NoteSubEu* temp_v0; - f32 var_fa0; - f32 var_fa1; - f32 var_fv1; + NoteSubEu* noteSub; + f32 panVolumeLeft; + f32 pamVolumeRight; + f32 velocity; s32 temp_t0; s32 var_a0; - s32 var_a0_2; - s32 var_a1; - u8 sp27; - u8 sp26; - Stereo sp24; + s32 strongRight; + s32 strongLeft; + u8 pan; + u8 reverb; + Stereo stereo; func_80011C58(note, noteAttr->freqMod); - temp_v0 = ¬e->noteSubEu; - var_fv1 = noteAttr->velocity; - sp27 = noteAttr->pan; - sp26 = noteAttr->reverb; - sp24 = noteAttr->stereo; - sp27 &= 0x7F; - if ((temp_v0->bitField0.stereoHeadsetEffects) && (gAudioSoundMode == SOUNDMODE_HEADSET)) { - var_a0 = sp27 >> 1; - if (var_a0 >= 0x40) { - var_a0 = 0x3F; + noteSub = ¬e->noteSubEu; + velocity = noteAttr->velocity; + pan = noteAttr->pan; + reverb = noteAttr->reverb; + stereo = noteAttr->stereo; + pan %= ARRAY_COUNTU(gHeadsetPanVolume); + if ((noteSub->bitField0.stereoHeadsetEffects) && (gAudioSoundMode == SOUNDMODE_HEADSET)) { + var_a0 = pan >> 1; + if (var_a0 >= ARRAY_COUNT(gHaasEffectDelaySizes)) { + var_a0 = ARRAY_COUNT(gHaasEffectDelaySizes) - 1; } - temp_v0->unk_04 = gHaasEffectDelaySizes[var_a0]; - temp_v0->unk_03 = gHaasEffectDelaySizes[63 - var_a0]; - temp_v0->bitField0.stereoStrongRight = 0; - temp_v0->bitField0.stereoStrongLeft = 0; - temp_v0->bitField0.usesHeadsetPanEffects = 1; + noteSub->rightDelaySize = gHaasEffectDelaySizes[var_a0]; + noteSub->leftDelaySize = gHaasEffectDelaySizes[ARRAY_COUNT(gHaasEffectDelaySizes) - 1 - var_a0]; + noteSub->bitField0.stereoStrongRight = false; + noteSub->bitField0.stereoStrongLeft = false; + noteSub->bitField0.usesHeadsetPanEffects = true; - var_fa0 = gHeadsetPanVolume[sp27]; - var_fa1 = gHeadsetPanVolume[127 - sp27]; - } else if (temp_v0->bitField0.stereoHeadsetEffects && (gAudioSoundMode == SOUNDMODE_STEREO)) { - temp_v0->unk_03 = 0; - temp_v0->unk_04 = 0; - temp_v0->bitField0.usesHeadsetPanEffects = 0; + panVolumeLeft = gHeadsetPanVolume[pan]; + pamVolumeRight = gHeadsetPanVolume[ARRAY_COUNT(gHeadsetPanVolume) - 1 - pan]; + } else if (noteSub->bitField0.stereoHeadsetEffects && (gAudioSoundMode == SOUNDMODE_STEREO)) { + noteSub->leftDelaySize = 0; + noteSub->rightDelaySize = 0; + noteSub->bitField0.usesHeadsetPanEffects = false; - var_fa0 = gStereoPanVolume[sp27]; - var_fa1 = gStereoPanVolume[127 - sp27]; - var_a0_2 = 0; - var_a1 = 0; - if (sp27 < 0x20) { - var_a1 = 1; - } else if (sp27 > 0x60) { - var_a0_2 = 1; + panVolumeLeft = gStereoPanVolume[pan]; + pamVolumeRight = gStereoPanVolume[ARRAY_COUNT(gStereoPanVolume) - 1 - pan]; + strongRight = false; + strongLeft = false; + if (pan < 32) { + strongLeft = true; + } else if (pan > 96) { + strongRight = true; } - temp_v0->bitField0.stereoStrongRight = var_a0_2; - temp_v0->bitField0.stereoStrongLeft = var_a1; - switch (sp24.s.bit2) { + noteSub->bitField0.stereoStrongRight = strongRight; + noteSub->bitField0.stereoStrongLeft = strongLeft; + switch (stereo.s.bit2) { case 0: - temp_v0->bitField0.stereoStrongRight = sp24.s.strongRight; - temp_v0->bitField0.stereoStrongLeft = sp24.s.strongLeft; + noteSub->bitField0.stereoStrongRight = stereo.s.strongRight; + noteSub->bitField0.stereoStrongLeft = stereo.s.strongLeft; break; case 1: break; case 2: - temp_v0->bitField0.stereoStrongRight = sp24.s.strongRight | var_a0_2; - temp_v0->bitField0.stereoStrongLeft = sp24.s.strongLeft | var_a1; + noteSub->bitField0.stereoStrongRight = stereo.s.strongRight | strongRight; + noteSub->bitField0.stereoStrongLeft = stereo.s.strongLeft | strongLeft; break; case 3: - temp_v0->bitField0.stereoStrongRight = sp24.s.strongRight ^ var_a0_2; - temp_v0->bitField0.stereoStrongLeft = sp24.s.strongLeft ^ var_a1; + noteSub->bitField0.stereoStrongRight = stereo.s.strongRight ^ strongRight; + noteSub->bitField0.stereoStrongLeft = stereo.s.strongLeft ^ strongLeft; break; } } else if (gAudioSoundMode == SOUNDMODE_MONO) { - var_fa0 = 0.707f; - var_fa1 = 0.707f; + panVolumeLeft = 0.707f; + pamVolumeRight = 0.707f; } else { - var_fa0 = gDefaultPanVolume[sp27]; - var_fa1 = gDefaultPanVolume[127 - sp27]; + panVolumeLeft = gDefaultPanVolume[pan]; + pamVolumeRight = gDefaultPanVolume[ARRAY_COUNT(gDefaultPanVolume) - 1 - pan]; } - if (var_fv1 < 0.0f) { - var_fv1 = 0.0f; + if (velocity < 0.0f) { + velocity = 0.0f; } - if (var_fv1 > 1.0f) { - var_fv1 = 1.0f; + if (velocity > 1.0f) { + velocity = 1.0f; } - temp_v0->unk_06 = (s32) (var_fv1 * var_fa0 * 4095.999f); - temp_v0->unk_08 = (s32) (var_fv1 * var_fa1 * 4095.999f); - temp_v0->unk_02 = noteAttr->gain; - if (temp_v0->unk_05 != sp26) { - temp_v0->unk_05 = sp26; - temp_v0->bitField0.unused = 1; - } else if (temp_v0->bitField0.needsInit) { - temp_v0->bitField0.unused = 1; + noteSub->panVolLeft = (s32) (velocity * panVolumeLeft * 4095.999f); + noteSub->panVolRight = (s32) (velocity * pamVolumeRight * 4095.999f); + noteSub->gain = noteAttr->gain; + if (noteSub->reverb != reverb) { + noteSub->reverb = reverb; + noteSub->bitField0.unused = true; + } else if (noteSub->bitField0.needsInit) { + noteSub->bitField0.unused = true; } else { - temp_v0->bitField0.unused = 0; + noteSub->bitField0.unused = false; } } @@ -149,7 +149,7 @@ void func_80011C58(Note* note, f32 arg1) { var_fv0 = arg1 * 0.5f; } } - note->noteSubEu.unk_0A = (s32) (var_fv0 * 32768.0f); + note->noteSubEu.resampleRate = (s32) (var_fv0 * 32768.0f); } TunedSample* func_80011D10(Instrument* instrument, s32 arg1) { @@ -234,128 +234,128 @@ void func_80011F4C(Note* note) { void func_80011FA8(void) { s32 pad2; s32 pad; - Note* temp_s1; - NotePlaybackState* var_s0; + Note* note; + NotePlaybackState* playbackState; NoteSubEu* noteSub; NoteAttributes* attr; s32 i; NoteAttributes sp70; - u8 sp6F; + u8 bookOffset; f32 temp_fs0; for (i = 0; i < gNumNotes; i++) { - temp_s1 = &gNotes[i]; + note = &gNotes[i]; - var_s0 = &temp_s1->playbackState; - if ((var_s0->parentLayer != NO_LAYER)) { - if ((u32) var_s0->parentLayer < 0x7FFFFFFF) { + playbackState = ¬e->playbackState; + if ((playbackState->parentLayer != NO_LAYER)) { + if ((u32) playbackState->parentLayer < 0x7FFFFFFF) { continue; } - if ((temp_s1 != var_s0->parentLayer->note) && (var_s0->unk_04 == 0)) { - var_s0->adsr.action.asByte |= 0x10; - var_s0->adsr.fadeOutVel = gAudioBufferParams.ticksPerUpdateInv; - var_s0->priority = 1; - var_s0->unk_04 = 2; + if ((note != playbackState->parentLayer->note) && (playbackState->unk_04 == 0)) { + playbackState->adsr.action.asByte |= 0x10; + playbackState->adsr.fadeOutVel = gAudioBufferParams.ticksPerUpdateInv; + playbackState->priority = 1; + playbackState->unk_04 = 2; goto block_21; } else { - if ((var_s0->parentLayer->enabled) || (var_s0->unk_04 != 0) || (var_s0->priority <= 0)) { - if (var_s0->parentLayer->channel->seqPlayer == NULL) { - func_8001415C(var_s0->parentLayer->channel); - var_s0->priority = 1; - var_s0->unk_04 = 1; + if ((playbackState->parentLayer->enabled) || (playbackState->unk_04 != 0) || + (playbackState->priority <= 0)) { + if (playbackState->parentLayer->channel->seqPlayer == NULL) { + func_8001415C(playbackState->parentLayer->channel); + playbackState->priority = 1; + playbackState->unk_04 = 1; continue; } - if (!(var_s0->parentLayer->channel->seqPlayer->muted && - (var_s0->parentLayer->channel->muteBehavior & 0x40))) { + if (!(playbackState->parentLayer->channel->seqPlayer->muted && + (playbackState->parentLayer->channel->muteBehavior & 0x40))) { goto block_21; } } - func_8001268C(var_s0->parentLayer); - func_80012C40(temp_s1); - func_80012C00(&temp_s1->listItem.pool->decaying, &temp_s1->listItem); - var_s0->priority = 1; - var_s0->unk_04 = 2; + func_8001268C(playbackState->parentLayer); + func_80012C40(note); + func_80012C00(¬e->listItem.pool->decaying, ¬e->listItem); + playbackState->priority = 1; + playbackState->unk_04 = 2; } - } else if ((var_s0->unk_04 == 0) && (var_s0->priority > 0)) { + } else if ((playbackState->unk_04 == 0) && (playbackState->priority > 0)) { continue; } block_21: - if (var_s0->priority != 0) { + if (playbackState->priority != 0) { if (1) {} - noteSub = &temp_s1->noteSubEu; - if ((var_s0->unk_04 > 0) || noteSub->bitField0.finished) { - if ((var_s0->adsr.state == 0) || noteSub->bitField0.finished) { - if (var_s0->wantedParentLayer != NO_LAYER) { - func_80011F4C(temp_s1); - if (var_s0->wantedParentLayer->channel != NULL) { - func_80012CEC(temp_s1, var_s0->wantedParentLayer); - func_80013A84(temp_s1); - func_80012C40(temp_s1); - func_800145BC(&temp_s1->listItem.pool->active, &temp_s1->listItem); - var_s0->wantedParentLayer = NO_LAYER; + noteSub = ¬e->noteSubEu; + if ((playbackState->unk_04 > 0) || noteSub->bitField0.finished) { + if ((playbackState->adsr.state == 0) || noteSub->bitField0.finished) { + if (playbackState->wantedParentLayer != NO_LAYER) { + func_80011F4C(note); + if (playbackState->wantedParentLayer->channel != NULL) { + func_80012CEC(note, playbackState->wantedParentLayer); + func_80013A84(note); + func_80012C40(note); + func_800145BC(¬e->listItem.pool->active, ¬e->listItem); + playbackState->wantedParentLayer = NO_LAYER; } else { - func_80011F4C(temp_s1); - func_80012C40(temp_s1); - func_800145BC(&temp_s1->listItem.pool->disabled, &temp_s1->listItem); - var_s0->wantedParentLayer = NO_LAYER; + func_80011F4C(note); + func_80012C40(note); + func_800145BC(¬e->listItem.pool->disabled, ¬e->listItem); + playbackState->wantedParentLayer = NO_LAYER; goto next; } } else { - func_80011F4C(temp_s1); - func_80012C40(temp_s1); - func_800145BC(&temp_s1->listItem.pool->disabled, &temp_s1->listItem); + func_80011F4C(note); + func_80012C40(note); + func_800145BC(¬e->listItem.pool->disabled, ¬e->listItem); goto next; } } - } else if (var_s0->adsr.state == 0) { - func_80011F4C(temp_s1); - func_80012C40(temp_s1); - func_800145BC(&temp_s1->listItem.pool->disabled, &temp_s1->listItem); + } else if (playbackState->adsr.state == 0) { + func_80011F4C(note); + func_80012C40(note); + func_800145BC(¬e->listItem.pool->disabled, ¬e->listItem); goto next; } - temp_fs0 = func_80013B90(&var_s0->adsr); - func_80013A18(temp_s1); - attr = &var_s0->attributes; - if ((var_s0->unk_04 == 1) || (var_s0->unk_04 == 2)) { - + temp_fs0 = func_80013B90(&playbackState->adsr); + func_80013A18(note); + attr = &playbackState->attributes; + if ((playbackState->unk_04 == 1) || (playbackState->unk_04 == 2)) { sp70.freqMod = attr->freqMod; sp70.velocity = attr->velocity; sp70.pan = attr->pan; sp70.reverb = attr->reverb; sp70.stereo = attr->stereo; sp70.gain = attr->gain; - sp6F = noteSub->bitField1.bookOffset; + bookOffset = noteSub->bitField1.bookOffset; } else { - sp70.freqMod = var_s0->parentLayer->noteFreqMod; - sp70.velocity = var_s0->parentLayer->noteVelocity; - sp70.pan = var_s0->parentLayer->notePan; - sp70.stereo = var_s0->parentLayer->stereo; - sp70.reverb = var_s0->parentLayer->channel->targetReverbVol; - sp70.gain = var_s0->parentLayer->channel->reverbIndex; + sp70.freqMod = playbackState->parentLayer->noteFreqMod; + sp70.velocity = playbackState->parentLayer->noteVelocity; + sp70.pan = playbackState->parentLayer->notePan; + sp70.stereo = playbackState->parentLayer->stereo; + sp70.reverb = playbackState->parentLayer->channel->targetReverbVol; + sp70.gain = playbackState->parentLayer->channel->reverbIndex; - sp6F = var_s0->parentLayer->channel->bookOffset & 7; - if ((var_s0->parentLayer->channel->seqPlayer->muted) && - (var_s0->parentLayer->channel->muteBehavior & 8)) { + bookOffset = playbackState->parentLayer->channel->bookOffset % 8U; + if ((playbackState->parentLayer->channel->seqPlayer->muted) && + (playbackState->parentLayer->channel->muteBehavior & 8)) { sp70.freqMod = 0.0f; sp70.velocity = 0.0f; } } - sp70.freqMod *= (var_s0->vibratoFreqMod * var_s0->portamentoFreqMod); + sp70.freqMod *= playbackState->vibratoFreqMod * playbackState->portamentoFreqMod; sp70.freqMod *= gAudioBufferParams.resampleRate; sp70.velocity *= temp_fs0; - func_80011890(temp_s1, &sp70); - noteSub->bitField1.bookOffset = sp6F; + func_80011890(note, &sp70); + noteSub->bitField1.bookOffset = bookOffset; next:; } } } void func_80012438(SequenceLayer* layer, s32 arg1) { - Note* temp_v0; - NoteAttributes* temp_v0_3; + Note* note; + NoteAttributes* noteAttr; if (layer == NO_LAYER) { return; @@ -364,59 +364,58 @@ void func_80012438(SequenceLayer* layer, s32 arg1) { if (layer->note == NULL) { return; } - temp_v0 = layer->note; - if (layer == temp_v0->playbackState.wantedParentLayer) { - temp_v0->playbackState.wantedParentLayer = NO_LAYER; + note = layer->note; + if (layer == note->playbackState.wantedParentLayer) { + note->playbackState.wantedParentLayer = NO_LAYER; } - if (layer != temp_v0->playbackState.parentLayer) { - if ((temp_v0->playbackState.parentLayer == NO_LAYER) && - (temp_v0->playbackState.wantedParentLayer == NO_LAYER) && - (layer == temp_v0->playbackState.prevParentLayer) && (arg1 != 6)) { - temp_v0->playbackState.adsr.fadeOutVel = gAudioBufferParams.ticksPerUpdateInv; - temp_v0->playbackState.adsr.action.asByte |= 0x10; + if (layer != note->playbackState.parentLayer) { + if ((note->playbackState.parentLayer == NO_LAYER) && (note->playbackState.wantedParentLayer == NO_LAYER) && + (layer == note->playbackState.prevParentLayer) && (arg1 != 6)) { + note->playbackState.adsr.fadeOutVel = gAudioBufferParams.ticksPerUpdateInv; + note->playbackState.adsr.action.asByte |= 0x10; } return; } - temp_v0_3 = &temp_v0->playbackState.attributes; - if (temp_v0->playbackState.adsr.state != 6) { - temp_v0_3->freqMod = layer->noteFreqMod; - temp_v0_3->velocity = layer->noteVelocity; - temp_v0_3->pan = layer->notePan; - temp_v0_3->stereo = layer->stereo; + noteAttr = ¬e->playbackState.attributes; + if (note->playbackState.adsr.state != 6) { + noteAttr->freqMod = layer->noteFreqMod; + noteAttr->velocity = layer->noteVelocity; + noteAttr->pan = layer->notePan; + noteAttr->stereo = layer->stereo; if (layer->channel != NULL) { - temp_v0_3->reverb = layer->channel->targetReverbVol; - temp_v0_3->gain = layer->channel->reverbIndex; + noteAttr->reverb = layer->channel->targetReverbVol; + noteAttr->gain = layer->channel->reverbIndex; if (layer->channel->seqPlayer->muted && (layer->channel->muteBehavior & 8)) { - temp_v0->noteSubEu.bitField0.finished = 1; + note->noteSubEu.bitField0.finished = 1; } } - temp_v0->playbackState.priority = 1; - temp_v0->playbackState.prevParentLayer = temp_v0->playbackState.parentLayer; - temp_v0->playbackState.parentLayer = NO_LAYER; + note->playbackState.priority = 1; + note->playbackState.prevParentLayer = note->playbackState.parentLayer; + note->playbackState.parentLayer = NO_LAYER; if (arg1 == 7) { - temp_v0->playbackState.adsr.fadeOutVel = gAudioBufferParams.ticksPerUpdateInv; - temp_v0->playbackState.adsr.action.asByte |= 0x10; - temp_v0->playbackState.unk_04 = 2; + note->playbackState.adsr.fadeOutVel = gAudioBufferParams.ticksPerUpdateInv; + note->playbackState.adsr.action.asByte |= 0x10; + note->playbackState.unk_04 = 2; } else { - temp_v0->playbackState.unk_04 = 1; - temp_v0->playbackState.adsr.action.asByte |= 0x20; + note->playbackState.unk_04 = 1; + note->playbackState.adsr.action.asByte |= 0x20; if (layer->adsr.decayIndex == 0) { - temp_v0->playbackState.adsr.fadeOutVel = + note->playbackState.adsr.fadeOutVel = layer->channel->adsr.decayIndex * gAudioBufferParams.ticksPerUpdateInvScaled; } else { - temp_v0->playbackState.adsr.fadeOutVel = + note->playbackState.adsr.fadeOutVel = layer->adsr.decayIndex * gAudioBufferParams.ticksPerUpdateInvScaled; } - temp_v0->playbackState.adsr.sustain = - (s32) layer->channel->adsr.sustain * temp_v0->playbackState.adsr.current / 256.0f; + note->playbackState.adsr.sustain = + (s32) layer->channel->adsr.sustain * note->playbackState.adsr.current / 256.0f; } } if (arg1 == 6) { - func_80012C40(temp_v0); - func_80012C00(&temp_v0->listItem.pool->decaying, &temp_v0->listItem); + func_80012C40(note); + func_80012C00(¬e->listItem.pool->decaying, ¬e->listItem); } } @@ -460,17 +459,17 @@ s32 func_800126AC(Note* note, SequenceLayer* layer, s32 waveId) { } void func_800127B0(Note* note, SequenceLayer* layer) { - s32 sp1C; - s32 var_a2; + s32 harmonicIndex; + s32 waveId; - var_a2 = layer->instOrWave; - if (var_a2 == 0xFF) { - var_a2 = layer->channel->instOrWave; + waveId = layer->instOrWave; + if (waveId == 0xFF) { + waveId = layer->channel->instOrWave; } - sp1C = note->playbackState.harmonicIndex; + harmonicIndex = note->playbackState.harmonicIndex; note->synthesisState.samplePosInt = - (note->synthesisState.samplePosInt * sSamplesPerWavePeriod[func_800126AC(note, layer, var_a2)]) / - sSamplesPerWavePeriod[sp1C]; + (note->synthesisState.samplePosInt * sSamplesPerWavePeriod[func_800126AC(note, layer, waveId)]) / + sSamplesPerWavePeriod[harmonicIndex]; } void func_80012854(AudioListItem* item) { @@ -491,24 +490,24 @@ void func_80012864(NotePool* pool) { } void func_800128B4(void) { - s32 var_s1; + s32 i; func_80012864(&gNoteFreeLists); - for (var_s1 = 0; var_s1 < gNumNotes; var_s1++) { - gNotes[var_s1].listItem.u.value = &gNotes[var_s1]; - gNotes[var_s1].listItem.prev = NULL; - func_800145BC(&gNoteFreeLists.disabled, &gNotes[var_s1].listItem); + for (i = 0; i < gNumNotes; i++) { + gNotes[i].listItem.u.value = &gNotes[i]; + gNotes[i].listItem.prev = NULL; + func_800145BC(&gNoteFreeLists.disabled, &gNotes[i].listItem); } } void func_80012964(NotePool* pool) { - s32 var_s3; + s32 poolType; AudioListItem* sp48; AudioListItem* var_s0; AudioListItem* sp40; - for (var_s3 = 0; var_s3 < 4; var_s3++) { - switch (var_s3) { /* irregular */ + for (poolType = 0; poolType < 4; poolType++) { + switch (poolType) { case 0: sp48 = &pool->disabled; sp40 = &gNoteFreeLists.disabled; @@ -540,19 +539,19 @@ void func_80012964(NotePool* pool) { void func_80012AC4(NotePool* pool, s32 arg1) { s32 var_s0; - s32 var_s4; + s32 poolType; AudioListItem* temp_v0; AudioListItem* sp48; AudioListItem* sp44; func_80012964(pool); - var_s4 = 0; + poolType = 0; var_s0 = 0; while (var_s0 < arg1) { - if (var_s4 == 4) { + if (poolType == 4) { return; } - switch (var_s4) { + switch (poolType) { case 0: sp48 = &gNoteFreeLists.disabled; sp44 = &pool->disabled; @@ -578,7 +577,7 @@ void func_80012AC4(NotePool* pool, s32 arg1) { func_800145BC(sp44, temp_v0); var_s0++; } - var_s4++; + poolType++; } } @@ -588,7 +587,7 @@ void func_80012C00(AudioListItem* item1, AudioListItem* item2) { item2->next = item1->next; item1->next->prev = item2; item1->next = item2; - item1->u.count += 1; + item1->u.count++; item2->pool = item1->pool; } } @@ -602,34 +601,34 @@ void func_80012C40(Note* note) { } Note* func_80012C6C(AudioListItem* item, s32 priority) { - AudioListItem* var_v0; - AudioListItem* var_v1; - void* temp_a0; + AudioListItem* priorityItem; + AudioListItem* nextItem = item->next; - var_v0 = item->next; - if (var_v0 == item) { + if (nextItem == item) { return NULL; } - for (var_v1 = var_v0; var_v0 != item; var_v0 = var_v0->next) { - if (((Note*) var_v1->u.value)->playbackState.priority >= ((Note*) var_v0->u.value)->playbackState.priority) { - var_v1 = var_v0; + priorityItem = nextItem; + for (nextItem; nextItem != item; nextItem = nextItem->next) { + if (((Note*) nextItem->u.value)->playbackState.priority <= + ((Note*) priorityItem->u.value)->playbackState.priority) { + priorityItem = nextItem; } - // var_v0 = var_v0->next; } - if (var_v1 == NULL) { + + if (priorityItem == NULL) { return NULL; } - if (((Note*) var_v1->u.value)->playbackState.priority >= priority) { + if (((Note*) priorityItem->u.value)->playbackState.priority >= priority) { return NULL; } - return (Note*) var_v1->u.value; + return (Note*) priorityItem->u.value; } void func_80012CEC(Note* note, SequenceLayer* layer) { s32 pad[4]; s32 var_a2; - NoteSubEu* temp_v0; + NoteSubEu* noteSub; note->playbackState.prevParentLayer = NO_LAYER; note->playbackState.parentLayer = layer; @@ -642,22 +641,22 @@ void func_80012CEC(Note* note, SequenceLayer* layer) { layer->noteVelocity = 0.0f; func_80011EB8(note); var_a2 = layer->instOrWave; - temp_v0 = ¬e->noteSubEu; + noteSub = ¬e->noteSubEu; if (var_a2 == 0xFF) { var_a2 = layer->channel->instOrWave; } - temp_v0->waveSampleAddr = (s16*) layer->tunedSample; - if (var_a2 >= 0x80) { - temp_v0->bitField1.isSyntheticWave = 1; + noteSub->waveSampleAddr = (s16*) layer->tunedSample; + if (var_a2 >= 128) { + noteSub->bitField1.isSyntheticWave = true; } else { - temp_v0->bitField1.isSyntheticWave = 0; + noteSub->bitField1.isSyntheticWave = false; } - if (temp_v0->bitField1.isSyntheticWave) { + if (noteSub->bitField1.isSyntheticWave) { func_800126AC(note, layer, var_a2); } note->playbackState.fontId = layer->channel->fontId; - temp_v0->bitField0.stereoHeadsetEffects = layer->channel->stereoHeadsetEffects; - temp_v0->bitField1.reverbIndex = layer->channel->someOtherPriority & 3; + noteSub->bitField0.stereoHeadsetEffects = layer->channel->stereoHeadsetEffects; + noteSub->bitField1.reverbIndex = layer->channel->someOtherPriority & 3; } void func_80012E28(Note* note, SequenceLayer* layer) { @@ -673,23 +672,23 @@ void func_80012E5C(Note* note, SequenceLayer* layer) { } Note* func_80012E88(NotePool* pool, SequenceLayer* layer) { - Note* temp_v0 = func_800145FC(&pool->disabled); + Note* note = func_800145FC(&pool->disabled); - if (temp_v0 != NULL) { - func_80012CEC(temp_v0, layer); - func_80012C00(&pool->active, &temp_v0->listItem); + if (note != NULL) { + func_80012CEC(note, layer); + func_80012C00(&pool->active, ¬e->listItem); } - return temp_v0; + return note; } Note* func_80012ED4(NotePool* pool, SequenceLayer* layer) { - Note* sp1C = func_800145FC(&pool->decaying); + Note* note = func_800145FC(&pool->decaying); - if (sp1C != NULL) { - func_80012E5C(sp1C, layer); - func_800145BC(&pool->releasing, &sp1C->listItem); + if (note != NULL) { + func_80012E5C(note, layer); + func_800145BC(&pool->releasing, ¬e->listItem); } - return sp1C; + return note; } Note* func_80012F24(NotePool* pool, SequenceLayer* layer) { diff --git a/src/audio/audio_synthesis.c b/src/audio/audio_synthesis.c index 4411bc76..93b9ad60 100644 --- a/src/audio/audio_synthesis.c +++ b/src/audio/audio_synthesis.c @@ -680,7 +680,7 @@ Acmd* func_80009D78(Acmd* aList, s32 aiBufLen, s16 reverbIndex, s16 updateIndex) aList = func_800098DC(aList, sp64->lengthA + 0xC90, 0, sp64->lengthB, reverbIndex); } aAddMixer(aList++, 0x300, 0xC90, 0x990, 0x7FFF); - aMix(aList++, 0x30, gSynthReverbs[reverbIndex].unk_08 + 0x8000, 0xC90, 0xC90); + aMix(aList++, 0x30, gSynthReverbs[reverbIndex].decayRatio + 0x8000, 0xC90, 0xC90); } else { sp62 = (sp64->startPos & 7) * 2; sp60 = ALIGN16(sp62 + sp64->lengthA); @@ -695,13 +695,13 @@ Acmd* func_80009D78(Acmd* aList, s32 aiBufLen, s16 reverbIndex, s16 updateIndex) aResample(aList++, gSynthReverbs[reverbIndex].resampleFlags, gSynthReverbs[reverbIndex].unk_0A, OS_K0_TO_PHYSICAL(gSynthReverbs[reverbIndex].unk_34)); aAddMixer(aList++, 0x300, 0xC90, 0x990, 0x7FFF); - aMix(aList++, 0x30, gSynthReverbs[reverbIndex].unk_08 + 0x8000, 0xC90, 0xC90); + aMix(aList++, 0x30, gSynthReverbs[reverbIndex].decayRatio + 0x8000, 0xC90, 0xC90); } - if ((gSynthReverbs[reverbIndex].decayRatio != 0) || (gSynthReverbs[reverbIndex].unk_0E != 0)) { + if ((gSynthReverbs[reverbIndex].leakRtL != 0) || (gSynthReverbs[reverbIndex].leakLtR != 0)) { aDMEMMove(aList++, 0xC90, 0x470, 0x180); - aMix(aList++, 0x18, gSynthReverbs[reverbIndex].decayRatio, 0xE10, 0xC90); - aMix(aList++, 0x18, gSynthReverbs[reverbIndex].unk_0E, 0x470, 0xE10); + aMix(aList++, 0x18, gSynthReverbs[reverbIndex].leakRtL, 0xE10, 0xC90); + aMix(aList++, 0x18, gSynthReverbs[reverbIndex].leakLtR, 0x470, 0xE10); } return aList; } @@ -775,7 +775,7 @@ Acmd* func_8000A25C(s16* aiBuf, s32 aiBufLen, Acmd* aList, s32 updateIndex) { &gNotes[sp84[var_s1]].synthesisState, aiBuf, aiBufLen, aList, updateIndex); var_s1++; } - if (gSynthReverbs[var_s3].useReverb != 0) { + if (gSynthReverbs[var_s3].useReverb) { aList = func_8000A128(aList, var_s3, updateIndex); } } @@ -800,7 +800,7 @@ Acmd* func_8000A700(s32 noteIndex, NoteSubEu* noteSub, NoteSynthesisState* synth s32 pad114; Sample* bookSample; // sp110 AdpcmLoop* loopInfo; // sp10C - s16* currentBook; // sp108 + void* currentBook; // sp108 s32 pad104; s32 pad100; s32 noteFinished; // spFC @@ -877,7 +877,7 @@ Acmd* func_8000A700(s32 noteIndex, NoteSubEu* noteSub, NoteSynthesisState* synth synthState->numParts = 0; note->noteSubEu.bitField0.finished = 0; } - resampleRateFixedPoint = noteSub->unk_0A; + resampleRateFixedPoint = noteSub->resampleRate; nParts = noteSub->bitField1.hasTwoParts + 1; sampleslenFixedPoint = (resampleRateFixedPoint * aiBufLen * 2) + synthState->samplePosFrac; nSamplesToLoad = (sampleslenFixedPoint) >> 0x10; @@ -1116,16 +1116,16 @@ Acmd* func_8000A700(s32 noteIndex, NoteSubEu* noteSub, NoteSynthesisState* synth aUnkCmd19(aList++, 0, aiBufLen * 2, 0x450, 0x450); } - temp2 = noteSub->unk_02; + temp2 = noteSub->gain; if (temp2 != 0) { if (temp2 < 0x10) { temp2 = 0x10; } aHiLoGain(aList++, temp2, (aiBufLen + 0x10) * 2, 0x450, 0); } - if ((noteSub->unk_03 != 0) || (synthState->prevHaasEffectLeftDelaySize != 0)) { + if ((noteSub->leftDelaySize != 0) || (synthState->prevHaasEffectLeftDelaySize != 0)) { delaySide = 1; - } else if ((noteSub->unk_04 != 0) || (synthState->prevHaasEffectRightDelaySize != 0)) { + } else if ((noteSub->rightDelaySize != 0) || (synthState->prevHaasEffectRightDelaySize != 0)) { delaySide = 2; } else { delaySide = 0; @@ -1184,9 +1184,10 @@ Acmd* func_8000B51C(Acmd* aList, NoteSubEu* noteSub, NoteSynthesisState* synthSt temp_t1 = synthState->curVolLeft; temp_t2 = synthState->curVolRight; - temp_t7 = noteSub->unk_06; - temp_t9 = noteSub->unk_08; + temp_t7 = noteSub->panVolLeft; + temp_t9 = noteSub->panVolRight; + temp_t7 <<= 4; temp_t9 <<= 4; @@ -1203,10 +1204,10 @@ Acmd* func_8000B51C(Acmd* aList, NoteSubEu* noteSub, NoteSynthesisState* synthSt temp_a1 = synthState->reverbVol; - if (noteSub->unk_05 != temp_a1) { - temp = (((noteSub->unk_05 & 0x7F) - (temp_a1 & 0x7F)) << 8); + if (noteSub->reverb != temp_a1) { + temp = (((noteSub->reverb & 0x7F) - (temp_a1 & 0x7F)) << 8); var_a2 = temp / (aiBufLen >> 3); - synthState->reverbVol = noteSub->unk_05; + synthState->reverbVol = noteSub->reverb; } else { var_a2 = 0; } @@ -1248,17 +1249,17 @@ Acmd* func_8000B98C(Acmd* aList, NoteSubEu* noteSub, NoteSynthesisState* synthSt u8 var_v1; u16 temp; - switch (delaySide) { /* irregular */ + switch (delaySide) { case 1: var_t0 = 0x990; - var_a1 = noteSub->unk_03; + var_a1 = noteSub->leftDelaySize; synthState->prevHaasEffectRightDelaySize = 0; var_v1 = synthState->prevHaasEffectLeftDelaySize; synthState->prevHaasEffectLeftDelaySize = var_a1; break; case 2: var_t0 = 0xB10; - var_a1 = noteSub->unk_04; + var_a1 = noteSub->rightDelaySize; synthState->prevHaasEffectLeftDelaySize = 0; var_v1 = synthState->prevHaasEffectRightDelaySize; synthState->prevHaasEffectRightDelaySize = var_a1; diff --git a/src/audio/note_data.c b/src/audio/note_data.c index 20fd3353..c7e2574b 100644 --- a/src/audio/note_data.c +++ b/src/audio/note_data.c @@ -280,7 +280,7 @@ u16 gHaasEffectDelaySizes[64] = { }; // clang-format off -ALIGNED(16) s16 D_800DD200[] = { +ALIGNED(8) s16 gD_800DD200[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/src/overlays/ovl_i4/fox_bo.c b/src/overlays/ovl_i4/fox_bo.c index 34d86853..761c2328 100644 --- a/src/overlays/ovl_i4/fox_bo.c +++ b/src/overlays/ovl_i4/fox_bo.c @@ -86,6 +86,13 @@ UnkStruct_D_i4_801A03E0 D_i4_801A03E0[6]; UnkStruct_D_i4_801A03E0 D_i4_801A0488[6]; s32 D_i4_801A0530; +Matrix D_BO_8019EE80 = { { + { 0.0f, 0.0f, 0.0f, 0.0f }, + { 0.0f, 0.0f, 0.0f, 0.0f }, + { 0.0f, 0.0f, 0.0f, 0.0f }, + { 0.0f, 0.0f, 0.0f, 0.0f }, +} }; + f32 D_i4_8019EEC0 = 0.0f; void Bolse_8018BD60(Actor* this) { diff --git a/src/overlays/ovl_i4/fox_fo.c b/src/overlays/ovl_i4/fox_fo.c index 924f95d5..c42d3313 100644 --- a/src/overlays/ovl_i4/fox_fo.c +++ b/src/overlays/ovl_i4/fox_fo.c @@ -598,13 +598,6 @@ void Fortuna_8018906C(void) { f32 D_i4_8019EE4C[] = { -200.0f, 200.0f, -50.0f, -2000.0f }; f32 D_i4_8019EE5C[] = { 0.0f, 30.0f, -90.0f, 0.0f }; f32 D_i4_8019EE6C[] = { -100.0f, -200.0f, -300.0f, 0.0f }; -s32 D_i4_8019EE7C = 0; // padding for dword aligned matrix? -Matrix D_BO_8019EE80 = { { - { 0.0f, 0.0f, 0.0f, 0.0f }, - { 0.0f, 0.0f, 0.0f, 0.0f }, - { 0.0f, 0.0f, 0.0f, 0.0f }, - { 0.0f, 0.0f, 0.0f, 0.0f }, -} }; void Fortuna_801890EC(Actor* actor, s32 arg1) { Actor_Initialize(actor); diff --git a/srceu/audio/note_data.c b/srceu/audio/note_data.c new file mode 100644 index 00000000..6dc0e0c8 --- /dev/null +++ b/srceu/audio/note_data.c @@ -0,0 +1 @@ +#include "src/audio/note_data.c" diff --git a/srceu/audio/wave_samples.c b/srceu/audio/wave_samples.c new file mode 100644 index 00000000..61b15c1e --- /dev/null +++ b/srceu/audio/wave_samples.c @@ -0,0 +1 @@ +#include "src/audio/wave_samples.c" diff --git a/srceu/engine/fox_msg_palette.c b/srceu/engine/fox_msg_palette.c new file mode 100644 index 00000000..4693236f --- /dev/null +++ b/srceu/engine/fox_msg_palette.c @@ -0,0 +1 @@ +#include "src/engine/fox_msg_palette.c" diff --git a/srceu/engine/fox_rcp_init.c b/srceu/engine/fox_rcp_init.c new file mode 100644 index 00000000..0d224f92 --- /dev/null +++ b/srceu/engine/fox_rcp_init.c @@ -0,0 +1 @@ +#include "src/engine/fox_rcp_init.c" diff --git a/srceu/engine/fox_shapes.c b/srceu/engine/fox_shapes.c new file mode 100644 index 00000000..21f34f0f --- /dev/null +++ b/srceu/engine/fox_shapes.c @@ -0,0 +1 @@ +#include "src/engine/fox_shapes.c" diff --git a/srceu/engine/fox_wheels.c b/srceu/engine/fox_wheels.c new file mode 100644 index 00000000..fc67698b --- /dev/null +++ b/srceu/engine/fox_wheels.c @@ -0,0 +1 @@ +#include "src/engine/fox_wheels.c" diff --git a/srcjp/audio/note_data.c b/srcjp/audio/note_data.c new file mode 100644 index 00000000..6dc0e0c8 --- /dev/null +++ b/srcjp/audio/note_data.c @@ -0,0 +1 @@ +#include "src/audio/note_data.c" diff --git a/srcjp/audio/wave_samples.c b/srcjp/audio/wave_samples.c new file mode 100644 index 00000000..61b15c1e --- /dev/null +++ b/srcjp/audio/wave_samples.c @@ -0,0 +1 @@ +#include "src/audio/wave_samples.c" diff --git a/srcjp/engine/fox_load_inits.c b/srcjp/engine/fox_load_inits.c index db6f9e8c..a85dec43 100644 --- a/srcjp/engine/fox_load_inits.c +++ b/srcjp/engine/fox_load_inits.c @@ -1,789 +1 @@ -#include "sf64dma.h" - -Scene sNoOvl_Logo[1] = { - { NO_OVERLAY, - { /* 0x1 */ NO_SEGMENT, - /* 0x2 */ NO_SEGMENT, - /* 0x3 */ NO_SEGMENT, - /* 0x4 */ NO_SEGMENT, - /* 0x5 */ NO_SEGMENT, - /* 0x6 */ NO_SEGMENT, - /* 0x7 */ NO_SEGMENT, - /* 0x8 */ NO_SEGMENT, - /* 0x9 */ NO_SEGMENT, - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ NO_SEGMENT, - /* 0xE */ NO_SEGMENT, - /* 0xF */ ROM_SEGMENT(ast_logo) } }, -}; - -Scene sOvlending_Ending[6] = { - { OVERLAY_OFFSETS(ovl_ending), - { /* 0x1 */ NO_SEGMENT, - /* 0x2 */ NO_SEGMENT, - /* 0x3 */ ROM_SEGMENT(ast_arwing), - /* 0x4 */ NO_SEGMENT, - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ NO_SEGMENT, - /* 0x7 */ ROM_SEGMENT(ast_ending), - /* 0x8 */ NO_SEGMENT, - /* 0x9 */ NO_SEGMENT, - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ ROM_SEGMENT(ast_allies), - /* 0xE */ ROM_SEGMENT(ast_great_fox), - /* 0xF */ NO_SEGMENT } }, - { OVERLAY_OFFSETS(ovl_ending), - { /* 0x1 */ NO_SEGMENT, - /* 0x2 */ NO_SEGMENT, - /* 0x3 */ NO_SEGMENT, - /* 0x4 */ NO_SEGMENT, - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ ROM_SEGMENT(ast_title), - /* 0x7 */ ROM_SEGMENT(ast_ending), - /* 0x8 */ ROM_SEGMENT(ast_ending_award_front), - /* 0x9 */ NO_SEGMENT, - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ NO_SEGMENT, - /* 0xE */ NO_SEGMENT, - /* 0xF */ NO_SEGMENT } }, - { OVERLAY_OFFSETS(ovl_ending), - { /* 0x1 */ NO_SEGMENT, - /* 0x2 */ NO_SEGMENT, - /* 0x3 */ NO_SEGMENT, - /* 0x4 */ NO_SEGMENT, - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ ROM_SEGMENT(ast_title), - /* 0x7 */ ROM_SEGMENT(ast_ending), - /* 0x8 */ ROM_SEGMENT(ast_ending_award_back), - /* 0x9 */ NO_SEGMENT, - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ NO_SEGMENT, - /* 0xE */ NO_SEGMENT, - /* 0xF */ NO_SEGMENT } }, - { OVERLAY_OFFSETS(ovl_ending), - { /* 0x1 */ NO_SEGMENT, - /* 0x2 */ NO_SEGMENT, - /* 0x3 */ NO_SEGMENT, - /* 0x4 */ NO_SEGMENT, - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ ROM_SEGMENT(ast_title), - /* 0x7 */ ROM_SEGMENT(ast_ending), - /* 0x8 */ ROM_SEGMENT(ast_ending_expert), - /* 0x9 */ NO_SEGMENT, - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ NO_SEGMENT, - /* 0xE */ NO_SEGMENT, - /* 0xF */ NO_SEGMENT } }, - { OVERLAY_OFFSETS(ovl_ending), - { /* 0x1 */ NO_SEGMENT, - /* 0x2 */ NO_SEGMENT, - /* 0x3 */ NO_SEGMENT, - /* 0x4 */ NO_SEGMENT, - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ ROM_SEGMENT(ast_title), - /* 0x7 */ ROM_SEGMENT(ast_ending), - /* 0x8 */ NO_SEGMENT, - /* 0x9 */ NO_SEGMENT, - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ NO_SEGMENT, - /* 0xE */ ROM_SEGMENT(ast_great_fox), - /* 0xF */ NO_SEGMENT } }, - { OVERLAY_OFFSETS(ovl_ending), - { /* 0x1 */ NO_SEGMENT, - /* 0x2 */ NO_SEGMENT, - /* 0x3 */ ROM_SEGMENT(ast_arwing), - /* 0x4 */ NO_SEGMENT, - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ NO_SEGMENT, - /* 0x7 */ ROM_SEGMENT(ast_ending), - /* 0x8 */ ROM_SEGMENT(ast_ending_expert), - /* 0x9 */ ROM_SEGMENT(ast_font_3d), - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ NO_SEGMENT, - /* 0xE */ ROM_SEGMENT(ast_great_fox), - /* 0xF */ NO_SEGMENT } }, -}; - -Scene sOvlmenu_Title[1] = { - { OVERLAY_OFFSETS(ovl_menu), - { /* 0x1 */ NO_SEGMENT, - /* 0x2 */ NO_SEGMENT, - /* 0x3 */ ROM_SEGMENT(ast_arwing), - /* 0x4 */ NO_SEGMENT, - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ ROM_SEGMENT(ast_title), - /* 0x7 */ NO_SEGMENT, - /* 0x8 */ NO_SEGMENT, - /* 0x9 */ NO_SEGMENT, - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ NO_SEGMENT, - /* 0xE */ ROM_SEGMENT(ast_great_fox), - /* 0xF */ NO_SEGMENT } }, -}; - -Scene sOvlmenu_Option[1] = { - { OVERLAY_OFFSETS(ovl_menu), - { /* 0x1 */ NO_SEGMENT, - /* 0x2 */ NO_SEGMENT, - /* 0x3 */ NO_SEGMENT, - /* 0x4 */ NO_SEGMENT, - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ ROM_SEGMENT(ast_map), - /* 0x7 */ ROM_SEGMENT(ast_vs_menu), - /* 0x8 */ ROM_SEGMENT(ast_option), - /* 0x9 */ ROM_SEGMENT(ast_font_3d), - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ NO_SEGMENT, - /* 0xE */ NO_SEGMENT, - /* 0xF */ NO_SEGMENT } }, -}; - -Scene sOvlmenu_Map[1] = { - { OVERLAY_OFFSETS(ovl_menu), - { /* 0x1 */ NO_SEGMENT, - /* 0x2 */ NO_SEGMENT, - /* 0x3 */ ROM_SEGMENT(ast_arwing), - /* 0x4 */ NO_SEGMENT, - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ ROM_SEGMENT(ast_map), - /* 0x7 */ NO_SEGMENT, - /* 0x8 */ NO_SEGMENT, - /* 0x9 */ ROM_SEGMENT(ast_font_3d), - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ NO_SEGMENT, - /* 0xE */ NO_SEGMENT, - /* 0xF */ NO_SEGMENT } }, -}; - -Scene sOvlmenu_GameOver[1] = { - { OVERLAY_OFFSETS(ovl_menu), - { /* 0x1 */ NO_SEGMENT, - /* 0x2 */ NO_SEGMENT, - /* 0x3 */ NO_SEGMENT, - /* 0x4 */ NO_SEGMENT, - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ NO_SEGMENT, - /* 0x7 */ NO_SEGMENT, - /* 0x8 */ NO_SEGMENT, - /* 0x9 */ NO_SEGMENT, - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ ROM_SEGMENT(ast_andross), - /* 0xD */ NO_SEGMENT, - /* 0xE */ NO_SEGMENT, - /* 0xF */ NO_SEGMENT } }, -}; - -Scene sOvli1_Corneria[1] = { - { OVERLAY_OFFSETS(ovl_i1), - { /* 0x1 */ ROM_SEGMENT(ast_common), - /* 0x2 */ ROM_SEGMENT(ast_bg_planet), - /* 0x3 */ ROM_SEGMENT(ast_arwing), - /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ ROM_SEGMENT(ast_corneria), - /* 0x7 */ NO_SEGMENT, - /* 0x8 */ NO_SEGMENT, - /* 0x9 */ NO_SEGMENT, - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ NO_SEGMENT, - /* 0xE */ NO_SEGMENT, - /* 0xF */ NO_SEGMENT } }, -}; - -Scene sOvli2_Meteo[2] = { - { OVERLAY_OFFSETS(ovl_i2), - { /* 0x1 */ ROM_SEGMENT(ast_common), - /* 0x2 */ ROM_SEGMENT(ast_bg_space), - /* 0x3 */ ROM_SEGMENT(ast_arwing), - /* 0x4 */ ROM_SEGMENT(ast_enmy_space), - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ ROM_SEGMENT(ast_meteo), - /* 0x7 */ ROM_SEGMENT(ast_warp_zone), - /* 0x8 */ NO_SEGMENT, - /* 0x9 */ NO_SEGMENT, - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ NO_SEGMENT, - /* 0xE */ ROM_SEGMENT(ast_great_fox), - /* 0xF */ NO_SEGMENT } }, - { OVERLAY_OFFSETS(ovl_i2), - { /* 0x1 */ ROM_SEGMENT(ast_common), - /* 0x2 */ ROM_SEGMENT(ast_bg_space), - /* 0x3 */ ROM_SEGMENT(ast_arwing), - /* 0x4 */ ROM_SEGMENT(ast_enmy_space), - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ ROM_SEGMENT(ast_meteo), - /* 0x7 */ ROM_SEGMENT(ast_warp_zone), - /* 0x8 */ NO_SEGMENT, - /* 0x9 */ NO_SEGMENT, - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ NO_SEGMENT, - /* 0xE */ ROM_SEGMENT(ast_great_fox), - /* 0xF */ NO_SEGMENT } }, -}; - -Scene sOvli5_Titania[6] = { - { OVERLAY_OFFSETS(ovl_i5), - { /* 0x1 */ ROM_SEGMENT(ast_common), - /* 0x2 */ ROM_SEGMENT(ast_bg_planet), - /* 0x3 */ ROM_SEGMENT(ast_landmaster), - /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ ROM_SEGMENT(ast_titania), - /* 0x7 */ ROM_SEGMENT(ast_7_ti_1), - /* 0x8 */ NO_SEGMENT, - /* 0x9 */ NO_SEGMENT, - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ NO_SEGMENT, - /* 0xE */ ROM_SEGMENT(ast_great_fox), - /* 0xF */ NO_SEGMENT } }, - { OVERLAY_OFFSETS(ovl_i5), - { /* 0x1 */ ROM_SEGMENT(ast_common), - /* 0x2 */ ROM_SEGMENT(ast_bg_planet), - /* 0x3 */ ROM_SEGMENT(ast_landmaster), - /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ ROM_SEGMENT(ast_titania), - /* 0x7 */ ROM_SEGMENT(ast_7_ti_2), - /* 0x8 */ NO_SEGMENT, - /* 0x9 */ NO_SEGMENT, - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ NO_SEGMENT, - /* 0xE */ NO_SEGMENT, - /* 0xF */ NO_SEGMENT } }, - { OVERLAY_OFFSETS(ovl_i5), - { /* 0x1 */ ROM_SEGMENT(ast_common), - /* 0x2 */ ROM_SEGMENT(ast_bg_planet), - /* 0x3 */ ROM_SEGMENT(ast_landmaster), - /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ ROM_SEGMENT(ast_titania), - /* 0x7 */ ROM_SEGMENT(ast_7_ti_2), - /* 0x8 */ ROM_SEGMENT(ast_8_ti), - /* 0x9 */ NO_SEGMENT, - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ NO_SEGMENT, - /* 0xE */ NO_SEGMENT, - /* 0xF */ NO_SEGMENT } }, - { OVERLAY_OFFSETS(ovl_i5), - { /* 0x1 */ ROM_SEGMENT(ast_common), - /* 0x2 */ ROM_SEGMENT(ast_bg_planet), - /* 0x3 */ ROM_SEGMENT(ast_landmaster), - /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ ROM_SEGMENT(ast_titania), - /* 0x7 */ ROM_SEGMENT(ast_7_ti_2), - /* 0x8 */ ROM_SEGMENT(ast_8_ti), - /* 0x9 */ ROM_SEGMENT(ast_9_ti), - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ NO_SEGMENT, - /* 0xE */ NO_SEGMENT, - /* 0xF */ NO_SEGMENT } }, - { OVERLAY_OFFSETS(ovl_i5), - { /* 0x1 */ ROM_SEGMENT(ast_common), - /* 0x2 */ ROM_SEGMENT(ast_bg_planet), - /* 0x3 */ ROM_SEGMENT(ast_landmaster), - /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ ROM_SEGMENT(ast_titania), - /* 0x7 */ ROM_SEGMENT(ast_7_ti_2), - /* 0x8 */ ROM_SEGMENT(ast_8_ti), - /* 0x9 */ ROM_SEGMENT(ast_9_ti), - /* 0xA */ ROM_SEGMENT(ast_A_ti), - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ NO_SEGMENT, - /* 0xE */ NO_SEGMENT, - /* 0xF */ NO_SEGMENT } }, - { OVERLAY_OFFSETS(ovl_i5), - { /* 0x1 */ ROM_SEGMENT(ast_common), - /* 0x2 */ ROM_SEGMENT(ast_bg_planet), - /* 0x3 */ ROM_SEGMENT(ast_landmaster), - /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ ROM_SEGMENT(ast_titania), - /* 0x7 */ ROM_SEGMENT(ast_7_ti_2), - /* 0x8 */ ROM_SEGMENT(ast_8_ti), - /* 0x9 */ ROM_SEGMENT(ast_9_ti), - /* 0xA */ ROM_SEGMENT(ast_A_ti), - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ NO_SEGMENT, - /* 0xE */ ROM_SEGMENT(ast_great_fox), - /* 0xF */ NO_SEGMENT } }, -}; - -Scene sOvli2_SectorX[2] = { - { OVERLAY_OFFSETS(ovl_i2), - { /* 0x1 */ ROM_SEGMENT(ast_common), - /* 0x2 */ ROM_SEGMENT(ast_bg_space), - /* 0x3 */ ROM_SEGMENT(ast_arwing), - /* 0x4 */ ROM_SEGMENT(ast_enmy_space), - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ ROM_SEGMENT(ast_sector_x), - /* 0x7 */ ROM_SEGMENT(ast_warp_zone), - /* 0x8 */ NO_SEGMENT, - /* 0x9 */ NO_SEGMENT, - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ ROM_SEGMENT(ast_allies), - /* 0xE */ NO_SEGMENT, - /* 0xF */ NO_SEGMENT } }, - { OVERLAY_OFFSETS(ovl_i2), - { /* 0x1 */ ROM_SEGMENT(ast_common), - /* 0x2 */ ROM_SEGMENT(ast_bg_space), - /* 0x3 */ ROM_SEGMENT(ast_arwing), - /* 0x4 */ ROM_SEGMENT(ast_enmy_space), - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ ROM_SEGMENT(ast_sector_x), - /* 0x7 */ ROM_SEGMENT(ast_warp_zone), - /* 0x8 */ NO_SEGMENT, - /* 0x9 */ NO_SEGMENT, - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ ROM_SEGMENT(ast_allies), - /* 0xE */ ROM_SEGMENT(ast_great_fox), - /* 0xF */ NO_SEGMENT } }, -}; - -Scene sOvli4_SectorZ[1] = { - { OVERLAY_OFFSETS(ovl_i4), - { /* 0x1 */ ROM_SEGMENT(ast_common), - /* 0x2 */ ROM_SEGMENT(ast_bg_space), - /* 0x3 */ ROM_SEGMENT(ast_arwing), - /* 0x4 */ ROM_SEGMENT(ast_enmy_space), - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ ROM_SEGMENT(ast_sector_z), - /* 0x7 */ NO_SEGMENT, - /* 0x8 */ NO_SEGMENT, - /* 0x9 */ NO_SEGMENT, - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ ROM_SEGMENT(ast_allies), - /* 0xE */ ROM_SEGMENT(ast_great_fox), - /* 0xF */ NO_SEGMENT } }, -}; - -Scene sOvli3_Aquas[1] = { - { OVERLAY_OFFSETS(ovl_i3), - { /* 0x1 */ ROM_SEGMENT(ast_common), - /* 0x2 */ ROM_SEGMENT(ast_bg_planet), - /* 0x3 */ ROM_SEGMENT(ast_blue_marine), - /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ ROM_SEGMENT(ast_aquas), - /* 0x7 */ NO_SEGMENT, - /* 0x8 */ NO_SEGMENT, - /* 0x9 */ NO_SEGMENT, - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ NO_SEGMENT, - /* 0xE */ ROM_SEGMENT(ast_great_fox), - /* 0xF */ NO_SEGMENT } }, -}; - -Scene sOvli3_Area6[1] = { - { OVERLAY_OFFSETS(ovl_i3), - { /* 0x1 */ ROM_SEGMENT(ast_common), - /* 0x2 */ ROM_SEGMENT(ast_bg_space), - /* 0x3 */ ROM_SEGMENT(ast_arwing), - /* 0x4 */ ROM_SEGMENT(ast_enmy_space), - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ ROM_SEGMENT(ast_area_6), - /* 0x7 */ NO_SEGMENT, - /* 0x8 */ NO_SEGMENT, - /* 0x9 */ NO_SEGMENT, - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ NO_SEGMENT, - /* 0xE */ ROM_SEGMENT(ast_great_fox), - /* 0xF */ NO_SEGMENT } }, -}; - -Scene sOvli4_Fortuna[2] = { - { OVERLAY_OFFSETS(ovl_i4), - { /* 0x1 */ ROM_SEGMENT(ast_common), - /* 0x2 */ ROM_SEGMENT(ast_bg_planet), - /* 0x3 */ ROM_SEGMENT(ast_arwing), - /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ ROM_SEGMENT(ast_fortuna), - /* 0x7 */ NO_SEGMENT, - /* 0x8 */ NO_SEGMENT, - /* 0x9 */ NO_SEGMENT, - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ NO_SEGMENT, - /* 0xE */ NO_SEGMENT, - /* 0xF */ ROM_SEGMENT(ast_star_wolf) } }, - { OVERLAY_OFFSETS(ovl_i4), - { /* 0x1 */ ROM_SEGMENT(ast_common), - /* 0x2 */ ROM_SEGMENT(ast_bg_planet), - /* 0x3 */ ROM_SEGMENT(ast_arwing), - /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ ROM_SEGMENT(ast_fortuna), - /* 0x7 */ NO_SEGMENT, - /* 0x8 */ NO_SEGMENT, - /* 0x9 */ NO_SEGMENT, - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ NO_SEGMENT, - /* 0xE */ ROM_SEGMENT(ast_great_fox), - /* 0xF */ NO_SEGMENT } }, -}; - -Scene sOvli3_Unk4[1] = { - { OVERLAY_OFFSETS(ovl_i3), - { /* 0x1 */ ROM_SEGMENT(ast_common), - /* 0x2 */ ROM_SEGMENT(ast_bg_space), - /* 0x3 */ ROM_SEGMENT(ast_arwing), - /* 0x4 */ ROM_SEGMENT(ast_enmy_space), - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ ROM_SEGMENT(ast_area_6), - /* 0x7 */ NO_SEGMENT, - /* 0x8 */ NO_SEGMENT, - /* 0x9 */ NO_SEGMENT, - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ NO_SEGMENT, - /* 0xE */ ROM_SEGMENT(ast_great_fox), - /* 0xF */ NO_SEGMENT } }, -}; - -Scene sOvli6_SectorY[1] = { - { OVERLAY_OFFSETS(ovl_i6), - { /* 0x1 */ ROM_SEGMENT(ast_common), - /* 0x2 */ ROM_SEGMENT(ast_bg_space), - /* 0x3 */ ROM_SEGMENT(ast_arwing), - /* 0x4 */ ROM_SEGMENT(ast_enmy_space), - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ ROM_SEGMENT(ast_sector_y), - /* 0x7 */ NO_SEGMENT, - /* 0x8 */ NO_SEGMENT, - /* 0x9 */ NO_SEGMENT, - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ NO_SEGMENT, - /* 0xE */ NO_SEGMENT, - /* 0xF */ NO_SEGMENT } }, -}; - -Scene sOvli3_Solar[1] = { - { OVERLAY_OFFSETS(ovl_i3), - { /* 0x1 */ ROM_SEGMENT(ast_common), - /* 0x2 */ ROM_SEGMENT(ast_bg_planet), - /* 0x3 */ ROM_SEGMENT(ast_arwing), - /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ ROM_SEGMENT(ast_solar), - /* 0x7 */ NO_SEGMENT, - /* 0x8 */ NO_SEGMENT, - /* 0x9 */ NO_SEGMENT, - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ ROM_SEGMENT(ast_allies), - /* 0xE */ NO_SEGMENT, - /* 0xF */ NO_SEGMENT } }, -}; - -Scene sOvli3_Zoness[1] = { - { OVERLAY_OFFSETS(ovl_i3), - { /* 0x1 */ ROM_SEGMENT(ast_common), - /* 0x2 */ ROM_SEGMENT(ast_bg_planet), - /* 0x3 */ ROM_SEGMENT(ast_arwing), - /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ ROM_SEGMENT(ast_zoness), - /* 0x7 */ NO_SEGMENT, - /* 0x8 */ NO_SEGMENT, - /* 0x9 */ NO_SEGMENT, - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ ROM_SEGMENT(ast_allies), - /* 0xE */ NO_SEGMENT, - /* 0xF */ NO_SEGMENT } }, -}; - -Scene sOvli1_Venom1[1] = { - { OVERLAY_OFFSETS(ovl_i1), - { /* 0x1 */ ROM_SEGMENT(ast_common), - /* 0x2 */ ROM_SEGMENT(ast_bg_planet), - /* 0x3 */ ROM_SEGMENT(ast_arwing), - /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ ROM_SEGMENT(ast_venom_1), - /* 0x7 */ NO_SEGMENT, - /* 0x8 */ NO_SEGMENT, - /* 0x9 */ ROM_SEGMENT(ast_ve1_boss), - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ ROM_SEGMENT(ast_allies), - /* 0xE */ NO_SEGMENT, - /* 0xF */ NO_SEGMENT } }, -}; - -Scene sOvli6_Andross[1] = { - { OVERLAY_OFFSETS(ovl_i6), - { /* 0x1 */ ROM_SEGMENT(ast_common), - /* 0x2 */ ROM_SEGMENT(ast_bg_planet), - /* 0x3 */ ROM_SEGMENT(ast_arwing), - /* 0x4 */ NO_SEGMENT, - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ ROM_SEGMENT(ast_venom_2), - /* 0x7 */ NO_SEGMENT, - /* 0x8 */ NO_SEGMENT, - /* 0x9 */ NO_SEGMENT, - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ ROM_SEGMENT(ast_andross), - /* 0xD */ ROM_SEGMENT(ast_allies), - /* 0xE */ NO_SEGMENT, - /* 0xF */ NO_SEGMENT } }, -}; - -Scene sOvli6_Venom2[2] = { - { OVERLAY_OFFSETS(ovl_i6), - { /* 0x1 */ ROM_SEGMENT(ast_common), - /* 0x2 */ ROM_SEGMENT(ast_bg_planet), - /* 0x3 */ ROM_SEGMENT(ast_arwing), - /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ ROM_SEGMENT(ast_venom_2), - /* 0x7 */ NO_SEGMENT, - /* 0x8 */ NO_SEGMENT, - /* 0x9 */ NO_SEGMENT, - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ NO_SEGMENT, - /* 0xE */ NO_SEGMENT, - /* 0xF */ ROM_SEGMENT(ast_star_wolf) } }, - { OVERLAY_OFFSETS(ovl_i6), - { /* 0x1 */ ROM_SEGMENT(ast_common), - /* 0x2 */ ROM_SEGMENT(ast_bg_planet), - /* 0x3 */ ROM_SEGMENT(ast_arwing), - /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ ROM_SEGMENT(ast_venom_2), - /* 0x7 */ NO_SEGMENT, - /* 0x8 */ NO_SEGMENT, - /* 0x9 */ NO_SEGMENT, - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ NO_SEGMENT, - /* 0xE */ ROM_SEGMENT(ast_great_fox), - /* 0xF */ NO_SEGMENT } }, -}; - -Scene sOvli2_Setup20[1] = { - { OVERLAY_OFFSETS(ovl_i2), - { /* 0x1 */ ROM_SEGMENT(ast_common), - /* 0x2 */ ROM_SEGMENT(ast_bg_planet), - /* 0x3 */ ROM_SEGMENT(ast_arwing), - /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ ROM_SEGMENT(ast_ve1_boss), - /* 0x7 */ NO_SEGMENT, - /* 0x8 */ NO_SEGMENT, - /* 0x9 */ NO_SEGMENT, - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ NO_SEGMENT, - /* 0xE */ NO_SEGMENT, - /* 0xF */ NO_SEGMENT } }, -}; - -Scene sOvli4_Bolse[1] = { - { OVERLAY_OFFSETS(ovl_i4), - { /* 0x1 */ ROM_SEGMENT(ast_common), - /* 0x2 */ ROM_SEGMENT(ast_bg_space), - /* 0x3 */ ROM_SEGMENT(ast_arwing), - /* 0x4 */ ROM_SEGMENT(ast_enmy_space), - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ ROM_SEGMENT(ast_bolse), - /* 0x7 */ NO_SEGMENT, - /* 0x8 */ NO_SEGMENT, - /* 0x9 */ NO_SEGMENT, - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ NO_SEGMENT, - /* 0xE */ NO_SEGMENT, - /* 0xF */ ROM_SEGMENT(ast_star_wolf) } }, -}; - -Scene sOvli4_Katina[1] = { - { OVERLAY_OFFSETS(ovl_i4), - { /* 0x1 */ ROM_SEGMENT(ast_common), - /* 0x2 */ ROM_SEGMENT(ast_bg_planet), - /* 0x3 */ ROM_SEGMENT(ast_arwing), - /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ ROM_SEGMENT(ast_katina), - /* 0x7 */ NO_SEGMENT, - /* 0x8 */ NO_SEGMENT, - /* 0x9 */ NO_SEGMENT, - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ ROM_SEGMENT(ast_allies), - /* 0xE */ NO_SEGMENT, - /* 0xF */ ROM_SEGMENT(ast_star_wolf) } }, -}; - -Scene sOvli5_Macbeth[2] = { - { OVERLAY_OFFSETS(ovl_i5), - { /* 0x1 */ ROM_SEGMENT(ast_common), - /* 0x2 */ ROM_SEGMENT(ast_bg_planet), - /* 0x3 */ ROM_SEGMENT(ast_landmaster), - /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ ROM_SEGMENT(ast_macbeth), - /* 0x7 */ NO_SEGMENT, - /* 0x8 */ NO_SEGMENT, - /* 0x9 */ NO_SEGMENT, - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ ROM_SEGMENT(ast_allies), - /* 0xE */ NO_SEGMENT, - /* 0xF */ NO_SEGMENT } }, - { OVERLAY_OFFSETS(ovl_i5), - { /* 0x1 */ ROM_SEGMENT(ast_common), - /* 0x2 */ ROM_SEGMENT(ast_bg_planet), - /* 0x3 */ ROM_SEGMENT(ast_landmaster), - /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ ROM_SEGMENT(ast_macbeth), - /* 0x7 */ NO_SEGMENT, - /* 0x8 */ NO_SEGMENT, - /* 0x9 */ NO_SEGMENT, - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ NO_SEGMENT, - /* 0xE */ ROM_SEGMENT(ast_great_fox), - /* 0xF */ NO_SEGMENT } }, -}; - -Scene sOvli1_Training[1] = { - { OVERLAY_OFFSETS(ovl_i1), - { /* 0x1 */ ROM_SEGMENT(ast_common), - /* 0x2 */ ROM_SEGMENT(ast_bg_planet), - /* 0x3 */ ROM_SEGMENT(ast_arwing), - /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ ROM_SEGMENT(ast_training), - /* 0x7 */ NO_SEGMENT, - /* 0x8 */ NO_SEGMENT, - /* 0x9 */ NO_SEGMENT, - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ NO_SEGMENT, - /* 0xE */ NO_SEGMENT, - /* 0xF */ ROM_SEGMENT(ast_star_wolf) } }, -}; - -Scene sOvli2_Versus[2] = { - { OVERLAY_OFFSETS(ovl_i2), - { /* 0x1 */ ROM_SEGMENT(ast_common), - /* 0x2 */ ROM_SEGMENT(ast_bg_planet), - /* 0x3 */ ROM_SEGMENT(ast_versus), - /* 0x4 */ ROM_SEGMENT(ast_enmy_planet), - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ NO_SEGMENT, - /* 0x7 */ ROM_SEGMENT(ast_vs_menu), - /* 0x8 */ NO_SEGMENT, - /* 0x9 */ NO_SEGMENT, - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ NO_SEGMENT, - /* 0xE */ NO_SEGMENT, - /* 0xF */ NO_SEGMENT } }, - { OVERLAY_OFFSETS(ovl_i2), - { /* 0x1 */ ROM_SEGMENT(ast_common), - /* 0x2 */ ROM_SEGMENT(ast_bg_space), - /* 0x3 */ ROM_SEGMENT(ast_versus), - /* 0x4 */ ROM_SEGMENT(ast_enmy_space), - /* 0x5 */ ROM_SEGMENT(ast_text), - /* 0x6 */ NO_SEGMENT, - /* 0x7 */ ROM_SEGMENT(ast_vs_menu), - /* 0x8 */ NO_SEGMENT, - /* 0x9 */ NO_SEGMENT, - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ NO_SEGMENT, - /* 0xE */ NO_SEGMENT, - /* 0xF */ NO_SEGMENT } }, -}; - -Scene sOvlUnused_Unk[1] = { - { OVERLAY_OFFSETS(ovl_unused), - { /* 0x1 */ NO_SEGMENT, - /* 0x2 */ NO_SEGMENT, - /* 0x3 */ NO_SEGMENT, - /* 0x4 */ NO_SEGMENT, - /* 0x5 */ NO_SEGMENT, - /* 0x6 */ NO_SEGMENT, - /* 0x7 */ NO_SEGMENT, - /* 0x8 */ NO_SEGMENT, - /* 0x9 */ NO_SEGMENT, - /* 0xA */ NO_SEGMENT, - /* 0xB */ NO_SEGMENT, - /* 0xC */ NO_SEGMENT, - /* 0xD */ NO_SEGMENT, - /* 0xE */ NO_SEGMENT, - /* 0xF */ NO_SEGMENT } }, -}; +#include "src/engine/fox_load_inits.c" diff --git a/srcjp/engine/fox_msg_palette.c b/srcjp/engine/fox_msg_palette.c new file mode 100644 index 00000000..4693236f --- /dev/null +++ b/srcjp/engine/fox_msg_palette.c @@ -0,0 +1 @@ +#include "src/engine/fox_msg_palette.c" diff --git a/srcjp/engine/fox_rcp_init.c b/srcjp/engine/fox_rcp_init.c new file mode 100644 index 00000000..0d224f92 --- /dev/null +++ b/srcjp/engine/fox_rcp_init.c @@ -0,0 +1 @@ +#include "src/engine/fox_rcp_init.c" diff --git a/srcjp/engine/fox_shapes.c b/srcjp/engine/fox_shapes.c new file mode 100644 index 00000000..21f34f0f --- /dev/null +++ b/srcjp/engine/fox_shapes.c @@ -0,0 +1 @@ +#include "src/engine/fox_shapes.c" diff --git a/srcjp/engine/fox_wheels.c b/srcjp/engine/fox_wheels.c new file mode 100644 index 00000000..fc67698b --- /dev/null +++ b/srcjp/engine/fox_wheels.c @@ -0,0 +1 @@ +#include "src/engine/fox_wheels.c" diff --git a/yamls/eu/rev0/main.yaml b/yamls/eu/rev0/main.yaml index 710243ae..a43b6511 100644 --- a/yamls/eu/rev0/main.yaml +++ b/yamls/eu/rev0/main.yaml @@ -179,7 +179,6 @@ - [0xC5D60, data, sys/sys_math] - [0xC5DA0, data, sys/sys_matrix] - [0xC5E70, data, sys/sys_fault] - - [0xC6050, data, audio] - [0xC6050, data, audio/audio_synthesis] - [0xC6130, data, audio/audio_heap] - [0xC66D0, data, audio/audio_load] @@ -274,12 +273,13 @@ - [0xDB420, .rodata, engine/fox_save] # Common assets - - [0xDB490, data, fox_shapes] - - [0xDCC70, data, fox_wheels] - - [0xDDA10, data, fox_msg_textures] - - [0xDE790, data, fox_rcp_init] - - [0xDE800, data, wave_samples] - - [0xDF420, data, note_data] + - [0xDB490, .data, engine/fox_shapes] + - [0xDCC70, .data, engine/fox_wheels] + - [0xDDA10, .data, engine/fox_msg_palette] + - [0xDDA90, data, engine/fox_msg_textures] + - [0xDE790, .data, engine/fox_rcp_init] + - [0xDE800, .data, audio/wave_samples] + - [0xDF420, .data, audio/note_data] # Nintendo Library bss - { type: bss, vram: 0x800DF9F0, name: sys/sys_joybus } diff --git a/yamls/eu/rev0/overlays.yaml b/yamls/eu/rev0/overlays.yaml index 4008c04c..089f73a3 100644 --- a/yamls/eu/rev0/overlays.yaml +++ b/yamls/eu/rev0/overlays.yaml @@ -104,7 +104,7 @@ - [0xE608A0, c, fox_sz] - [0xE65D00, data, fox_i4] - [0xE65D10, data, fox_fo] - - [0xE65DF0, data, fox_bo] + - [0xE65DB0, data, fox_bo] - [0xE66020, data, fox_ka] - [0xE663E0, data, fox_sz] - [0xE66600, .rodata, fox_i4] diff --git a/yamls/jp/rev0/main.yaml b/yamls/jp/rev0/main.yaml index 62427694..fcda490c 100644 --- a/yamls/jp/rev0/main.yaml +++ b/yamls/jp/rev0/main.yaml @@ -255,12 +255,12 @@ # Common assets - [0xDFF60, data, fox_msg_textures] - - [0xE4FE0, data, fox_shapes] - - [0xE67C0, data, fox_wheels] - - [0xE7560, data, fox_msg_palettes] - - [0xE75E0, data, fox_rcp_init] - - [0xE7650, data, wave_samples] - - [0xE8270, data, note_data] + - [0xE4FE0, .data, engine/fox_shapes] + - [0xE67C0, .data, engine/fox_wheels] + - [0xE7560, .data, engine/fox_msg_palette] + - [0xE75E0, .data, engine/fox_rcp_init] + - [0xE7650, .data, audio/wave_samples] + - [0xE8270, .data, audio/note_data] # Nintendo Library bss - { type: bss, vram: 0x800E87C0, name: sys_joybus } diff --git a/yamls/us/rev1/main.yaml b/yamls/us/rev1/main.yaml index 17b83f8c..b7895c70 100644 --- a/yamls/us/rev1/main.yaml +++ b/yamls/us/rev1/main.yaml @@ -333,9 +333,9 @@ # Common assets - [0xDA0A0, .data, engine/fox_shapes] - - [0xDA830, .data, engine/fox_wheels] - - [0xDB5D0, .data, engine/fox_msg_palette] - - [0xDB650, .data, engine/fox_rcp_init] + - [0xDB880, .data, engine/fox_wheels] + - [0xDC620, .data, engine/fox_msg_palette] + - [0xDC6A0, .data, engine/fox_rcp_init] - [0xDC710, .data, audio/wave_samples] - [0xDD330, .data, audio/note_data] diff --git a/yamls/us/rev1/overlays.yaml b/yamls/us/rev1/overlays.yaml index 08c83365..4347396d 100644 --- a/yamls/us/rev1/overlays.yaml +++ b/yamls/us/rev1/overlays.yaml @@ -93,7 +93,7 @@ - [0xE63D50, c, fox_sz] - [0xE69220, .data, fox_i4] - [0xE69230, .data, fox_fo] - - [0xE69310, .data, fox_bo] + - [0xE692D0, .data, fox_bo] - [0xE69540, .data, fox_ka] - [0xE69910, .data, fox_sz] - [0xE69B30, .rodata, fox_i4] From 0f6d7cca339705baa473b709be30e08ed85a67a6 Mon Sep 17 00:00:00 2001 From: petrie911 <69443847+petrie911@users.noreply.github.com> Date: Sat, 25 May 2024 12:17:03 -0500 Subject: [PATCH 120/151] Player and Vs docs, some improvement to ve1 boss (#259) * playerstuff * stuff * small fixes * Torch * torch update again --- .gitignore | 1 + .vscode/settings.json | 4 +- assets/yaml/us/rev1/ast_7_ti_1.yaml | 2 +- assets/yaml/us/rev1/ast_7_ti_2.yaml | 5 + assets/yaml/us/rev1/ast_8_ti.yaml | 5 + assets/yaml/us/rev1/ast_9_ti.yaml | 3 + assets/yaml/us/rev1/ast_A_ti.yaml | 9 +- assets/yaml/us/rev1/ast_blue_marine.yaml | 2 +- assets/yaml/us/rev1/ast_bolse.yaml | 4 +- include/context.h | 2 +- include/i3.h | 2 +- include/macros.h | 4 +- include/mods.h | 4 +- include/prevent_context_reordering.h | 6 +- include/sf64event.h | 2 +- include/sf64level.h | 27 + include/sf64player.h | 54 +- include/variables.h | 2 +- .../us/rev1/symbol_addrs_engine.txt | 2 +- src/engine/fox_360.c | 6 +- src/engine/fox_bg.c | 2 +- src/engine/fox_context.c | 4 +- src/engine/fox_demo.c | 28 +- src/engine/fox_display.c | 34 +- src/engine/fox_edisplay.c | 4 +- src/engine/fox_effect.c | 14 +- src/engine/fox_enmy.c | 3 +- src/engine/fox_enmy2.c | 10 +- src/engine/fox_game.c | 4 +- src/engine/fox_hud.c | 20 +- src/engine/fox_play.c | 602 ++++++------- src/engine/fox_tank.c | 114 +-- src/engine/fox_versus.c | 842 +++++++++--------- src/mods/fpscounter.c | 3 +- src/mods/levelselect.c | 20 +- src/mods/object_ram.c | 36 +- src/mods/sfxjukebox.c | 226 +++-- src/mods/sfxjukebox2.c | 227 ----- src/overlays/ovl_ending/fox_end2.c | 2 +- src/overlays/ovl_i1/fox_co.c | 2 +- src/overlays/ovl_i1/fox_ve1.c | 310 +++---- src/overlays/ovl_i2/fox_sx.c | 4 +- src/overlays/ovl_i3/fox_a6.c | 4 +- src/overlays/ovl_i3/fox_aq.c | 44 +- src/overlays/ovl_i3/fox_so.c | 2 +- src/overlays/ovl_i3/fox_zo.c | 2 +- src/overlays/ovl_i4/fox_bo.c | 16 +- src/overlays/ovl_i4/fox_fo.c | 10 +- src/overlays/ovl_i4/fox_ka.c | 9 +- src/overlays/ovl_i4/fox_sz.c | 12 +- src/overlays/ovl_i5/fox_ma.c | 20 +- src/overlays/ovl_i5/fox_ti.c | 8 +- src/overlays/ovl_i5/fox_ti_cs.c | 6 +- src/overlays/ovl_i6/fox_andross.c | 26 +- src/overlays/ovl_i6/fox_sy.c | 6 +- src/overlays/ovl_i6/fox_ve2.c | 2 +- src/overlays/ovl_menu/fox_map.c | 8 +- src/overlays/ovl_menu/fox_option.c | 2 +- tools/Torch | 2 +- tools/permuter_settings.toml | 5 + yamls/us/rev1/overlays.yaml | 2 +- 61 files changed, 1382 insertions(+), 1461 deletions(-) delete mode 100644 src/mods/sfxjukebox2.c diff --git a/.gitignore b/.gitignore index d3d884a2..865c8fbc 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ __pycache__ starfox64.ld starfox64.uncompressed.ld starfox64.*.*.yaml +starfox64.us.modded.map ctx.c ctx.c.m2c *.d diff --git a/.vscode/settings.json b/.vscode/settings.json index 2e1b9b70..da4e8b6a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -147,7 +147,9 @@ "*.tcc": "c", "object_ram.h": "c", "sf64dma.h": "c", - "string": "c" + "string": "c", + "prevent_bss_reordering3.h": "c", + "ast_a_ti.h": "c" }, "C_Cpp_Runner.msvcBatchPath": "" } \ No newline at end of file diff --git a/assets/yaml/us/rev1/ast_7_ti_1.yaml b/assets/yaml/us/rev1/ast_7_ti_1.yaml index 011b4ff0..3e49b4c9 100644 --- a/assets/yaml/us/rev1/ast_7_ti_1.yaml +++ b/assets/yaml/us/rev1/ast_7_ti_1.yaml @@ -254,7 +254,7 @@ D_TI1_700DF70: D_TI1_700E030: { type: GFX, offset: 0x700E030, symbol: D_TI1_700E030 } -D_TI1_700E1E8: +D_TI1_700E1E8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x0700E1E8, symbol: D_TI1_700E1E8 } D_TI1_700E3F0: diff --git a/assets/yaml/us/rev1/ast_7_ti_2.yaml b/assets/yaml/us/rev1/ast_7_ti_2.yaml index 8d2238e2..3a1bf22c 100644 --- a/assets/yaml/us/rev1/ast_7_ti_2.yaml +++ b/assets/yaml/us/rev1/ast_7_ti_2.yaml @@ -4,9 +4,14 @@ header: code: - '#include "assets/ast_7_ti_2.h"' + - '#include "assets/ast_8_ti.h"' + - '#include "assets/ast_9_ti.h"' header: - '#include "gfx.h"' - '#include "sf64object.h"' + external_files: + - "assets/yaml/us/rev1/ast_8_ti.yaml" + - "assets/yaml/us/rev1/ast_9_ti.yaml" D_TI2_7003EE8: { type: SF64:ANIM, offset: 0x7003EE8, symbol: D_TI2_7003EE8 } diff --git a/assets/yaml/us/rev1/ast_8_ti.yaml b/assets/yaml/us/rev1/ast_8_ti.yaml index cbf2016a..0f3b3566 100644 --- a/assets/yaml/us/rev1/ast_8_ti.yaml +++ b/assets/yaml/us/rev1/ast_8_ti.yaml @@ -3,10 +3,15 @@ - [0x08, 0x9EB5E0] header: code: + - '#include "assets/ast_7_ti_2.h"' - '#include "assets/ast_8_ti.h"' + - '#include "assets/ast_9_ti.h"' header: - '#include "gfx.h"' - '#include "sf64object.h"' + external_files: + - "assets/yaml/us/rev1/ast_7_ti_2.yaml" + - "assets/yaml/us/rev1/ast_9_ti.yaml" D_TI_8000708: { type: SF64:ANIM, offset: 0x8000708, symbol: D_TI_8000708 } diff --git a/assets/yaml/us/rev1/ast_9_ti.yaml b/assets/yaml/us/rev1/ast_9_ti.yaml index 913cf7cb..398365cf 100644 --- a/assets/yaml/us/rev1/ast_9_ti.yaml +++ b/assets/yaml/us/rev1/ast_9_ti.yaml @@ -3,10 +3,13 @@ - [0x09, 0x9F4880] header: code: + - '#include "assets/ast_8_ti.h"' - '#include "assets/ast_9_ti.h"' header: - '#include "gfx.h"' - '#include "sf64object.h"' + external_files: + - "assets/yaml/us/rev1/ast_8_ti.yaml" D_TI_9004288: { type: SF64:ANIM, offset: 0x9004288, symbol: D_TI_9004288 } diff --git a/assets/yaml/us/rev1/ast_A_ti.yaml b/assets/yaml/us/rev1/ast_A_ti.yaml index e4fcb1ab..02d77b7f 100644 --- a/assets/yaml/us/rev1/ast_A_ti.yaml +++ b/assets/yaml/us/rev1/ast_A_ti.yaml @@ -3,11 +3,18 @@ - [0x0A, 0xA049A0] header: code: + - '#include "assets/ast_7_ti_2.h"' + - '#include "assets/ast_8_ti.h"' + - '#include "assets/ast_9_ti.h"' - '#include "assets/ast_A_ti.h"' header: - '#include "gfx.h"' - '#include "sf64object.h"' - + external_files: + - "assets/yaml/us/rev1/ast_7_ti_2.yaml" + - "assets/yaml/us/rev1/ast_8_ti.yaml" + - "assets/yaml/us/rev1/ast_9_ti.yaml" + D_TI_A000000: {type: GFX, offset: 0xA000000, symbol: D_TI_A000000} diff --git a/assets/yaml/us/rev1/ast_blue_marine.yaml b/assets/yaml/us/rev1/ast_blue_marine.yaml index 8889e909..e682870e 100644 --- a/assets/yaml/us/rev1/ast_blue_marine.yaml +++ b/assets/yaml/us/rev1/ast_blue_marine.yaml @@ -30,7 +30,7 @@ D_blue_marine_3000470: { type: GFX, offset: 0x3000470, symbol: D_blue_marine_3000470 } D_blue_marine_30005E8: - { type: BLOB, size: 24, offset: 0x30005E8, symbol: D_blue_marine_30005E8 } + { type: BLOB, size: 0x18, offset: 0x30005E8, symbol: D_blue_marine_30005E8 } D_blue_marine_3000600: { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 8, offset: 0x3000600, symbol: D_blue_marine_3000600, tlut: 0x3000640 } diff --git a/assets/yaml/us/rev1/ast_bolse.yaml b/assets/yaml/us/rev1/ast_bolse.yaml index 78e5c128..3dc404f8 100644 --- a/assets/yaml/us/rev1/ast_bolse.yaml +++ b/assets/yaml/us/rev1/ast_bolse.yaml @@ -175,8 +175,8 @@ D_BO_600FF74: D_BO_6010294: { type: SF64:COLPOLY, count: 262, offset: 0x6010294, symbol: D_BO_6010294, mesh_symbol: D_BO_OFFSET } -PAD_BO_6011B20: - { type: BLOB, size: 0x4, offset: 0x6011B20, symbol: PAD_BO_6011B20, mesh_symbol: D_BO_OFFSET } +D_BO_6011B20: + { type: SF64:HITBOX, offset: 0x6011B20, symbol: D_BO_6011B20 } D_BO_6011B24: { type: SF64:HITBOX, offset: 0x6011B24, symbol: D_BO_6011B24 } diff --git a/include/context.h b/include/context.h index 58e61911..916b18e6 100644 --- a/include/context.h +++ b/include/context.h @@ -8,7 +8,7 @@ extern s32 gSceneId; extern s32 gSceneSetup; -extern s32 D_ctx_80177824; +extern s32 gClearPlayerInfo; extern s32 D_ctx_8017782C; extern GameState gGameState; extern s32 gNextGameStateTimer; diff --git a/include/i3.h b/include/i3.h index a7620e87..f9ece938 100644 --- a/include/i3.h +++ b/include/i3.h @@ -14,7 +14,7 @@ void Aquas_801BE034(Actor*); void Area6_8018DA58(Actor*); void Zoness_8019E5F0(Actor*); void Solar_801A8BE8(Actor*); -void Aquas_801AB9B0(Player*); +void Aquas_BlueMarineDown(Player*); void Aquas_801BE0F0(Actor*); void OvlI3_CallFunction(s32, void*); diff --git a/include/macros.h b/include/macros.h index 6c04ee09..6d7a15e6 100644 --- a/include/macros.h +++ b/include/macros.h @@ -18,10 +18,10 @@ #define RAND_FLOAT_CENTERED_SEEDED(width) ((Rand_ZeroOneSeeded()-0.5f)*(width)) #define SEGMENTED_TO_VIRTUAL(segment) ((void*)OS_PHYSICAL_TO_K0(gSegments[((uintptr_t)(segment)<<4)>>0x1C]+(((uintptr_t)(segment))&0xFFFFFF))) +#define SEGMENTED_TO_VIRTUAL_JP(segment) ((void*)OS_PHYSICAL_TO_K0(gSegments[((uintptr_t)(segment)&(0xF<<0x18))>>0x18]+(((uintptr_t)(segment))&0xFFFFFF))) #define ARRAY_COUNT(arr) (s32)(sizeof(arr) / sizeof(arr[0])) #define ARRAY_COUNTU(arr) (u32)(sizeof(arr) / sizeof(arr[0])) - #define SIGN_OF(x) (((x) > 0) ? 1 : ((x) == 0) ? 0 : -1) #define SQ(x) ((x) * (x)) #define CUBE(x) ((x) * (x) * (x)) @@ -41,7 +41,7 @@ #define USEC_TO_CYCLES(n) (((u64)(n)*(osClockRate/15625LL))/(1000000LL/15625LL)) #define MSEC_TO_CYCLES(n) (USEC_TO_CYCLES((n) * 1000LL)) -#define CYCLES_TO_USEC(c) (((u64)(c)*(1000000LL/15625LL))/(osClockRate/15625LL)) +#define CYCLES_TO_USEC(c) (((u64)(c)*(1000000LL/15625LL))/(osClockRate/15625LL)) #define CYCLES_TO_MSEC(c) ((s32)CYCLES_TO_USEC(c)/1000) #define UNPACK_BYTE(data, bytenum) (((data) & (0xFF << ((bytenum) * 8))) >> ((bytenum) * 8)) diff --git a/include/mods.h b/include/mods.h index 823b36d9..5b0a63aa 100644 --- a/include/mods.h +++ b/include/mods.h @@ -35,13 +35,13 @@ /** * FPS Counter: - * Press L to toggle FPS Display + * Hold Z + R and press L to toggle FPS Display */ #define MODS_FPS_COUNTER 0 /** * RAM modifier: - * Press C> while paused to cycle modes + * Hold Z + R and press C> to cycle modes * * Cheats: * Use D-Pad up and down to select a cheat diff --git a/include/prevent_context_reordering.h b/include/prevent_context_reordering.h index 2fdd6c20..a8176f1f 100644 --- a/include/prevent_context_reordering.h +++ b/include/prevent_context_reordering.h @@ -11,9 +11,9 @@ // struct Dummy6 {int x;}; // struct Dummy7 {int x;}; // struct Dummy8 {int x;}; -struct Dummy9 {int x;}; -struct Dummy10 {int x;}; -struct Dummy11 {int x;}; +// struct Dummy9 {int x;}; +// struct Dummy10 {int x;}; +// struct Dummy11 {int x;}; struct Dummy12 {int x;}; struct Dummy13 {int x;}; struct Dummy14 {int x;}; diff --git a/include/sf64event.h b/include/sf64event.h index 9e75d7f6..264ad4a7 100644 --- a/include/sf64event.h +++ b/include/sf64event.h @@ -306,7 +306,7 @@ typedef enum EventAction { typedef enum EventActorId { /* 0 */ EVID_0, /* 1 */ EVID_1, - /* 2 */ EVID_2, + /* 2 */ EVID_SLIPPY_METEO, /* 3 */ EVID_3, /* 4 */ EVID_4, /* 5 */ EVID_5, diff --git a/include/sf64level.h b/include/sf64level.h index c644f77a..186f0676 100644 --- a/include/sf64level.h +++ b/include/sf64level.h @@ -135,6 +135,33 @@ typedef enum VsStage { /* 2 */ VS_STAGE_SECTOR_Z, } VsStage; +typedef enum VsMatchType { + /* 0 */ VS_MATCH_POINTS, + /* 1 */ VS_MATCH_BATTLE, + /* 2 */ VS_MATCH_TIME, +} VsMatchType; + +#define VS_TIME_UP(countdown) (((countdown)[0] == 0) && ((countdown)[1] == 0) && ((countdown)[2] == 0)) + +typedef enum VsState { + /* 0 */ VS_STATE_0, + /* 1 */ VS_STATE_1, + /* 2 */ VS_STATE_2, + /* 3 */ VS_STATE_3, + /* 4 */ VS_STATE_4, + /* 5 */ VS_STATE_5, + /* 6 */ VS_STATE_6, + /* 7 */ VS_STATE_7, + /* 8 */ VS_STATE_8, + /* 9 */ VS_STATE_9, + /* 10 */ VS_STATE_10, + /* 11 */ VS_STATE_11, + /* 12 */ VS_STATE_12, + /* 13 */ VS_STATE_13, + /* 14 */ VS_STATE_14, + /* 20 */ VS_STATE_20 = 20, +} VsState; + typedef enum GroundSurface { /* 0 */ SURFACE_GRASS, /* 1 */ SURFACE_ROCK, diff --git a/include/sf64player.h b/include/sf64player.h index cbdc735a..2d191a66 100644 --- a/include/sf64player.h +++ b/include/sf64player.h @@ -204,9 +204,9 @@ typedef struct Player { /* 0x0F0 */ f32 rockAngle; /* 0x0F4 */ f32 rockPhase; /* 0x0F8 */ f32 bankAngle; - /* 0x0FC */ f32 xRot_0FC; - /* 0x100 */ f32 zRot_0FC; - /* 0x104 */ Vec3f rot_104; + /* 0x0FC */ f32 xRot_0FC; // on-foot cam x tilt from floor + /* 0x100 */ f32 zRot_0FC; // on-foot cam z tilt from floor + /* 0x104 */ Vec3f rot_104; // rotation modifiers from ground movement /* 0x110 */ f32 boostSpeed; /* 0x114 */ f32 yRot_114; /* 0x118 */ f32 pathChangeYaw; @@ -221,8 +221,8 @@ typedef struct Player { /* 0x13C */ char pad13C[4]; /* 0x140 */ f32 zPathVel; /* 0x144 */ f32 zPath; - /* 0x148 */ f32 unk_148; - /* 0x14C */ f32 unk_14C; + /* 0x148 */ f32 unk_148; // affects how cam eye follows the player + /* 0x14C */ f32 unk_14C; // affects how cam at follows the player /* 0x150 */ f32 unk_150; /* 0x154 */ f32 unk_154; /* 0x158 */ f32 unk_158; @@ -242,9 +242,9 @@ typedef struct Player { /* 0x190 */ f32 unk_190; /* 0x194 */ f32 unk_194; /* 0x198 */ s32 savedAlternateView; - /* 0x19C */ s32 unk_19C; - /* 0x1A0 */ s32 unk_1A0; - /* 0x1A4 */ s32 unk_1A4; + /* 0x19C */ s32 unk_19C; // used to indicate whether a U-turn is forced, whether to draw ground in TI intro, and to stop the landmaster + /* 0x1A0 */ s32 unk_1A0; // tank muzzle flash timer + /* 0x1A4 */ s32 dmgType; /* 0x1A8 */ char pad1A8[8]; /* 0x1B0 */ s32 turretState; /* 0x1B4 */ s32 turretActor; @@ -257,35 +257,35 @@ typedef struct Player { /* 0x1D0 */ s32 csState; /* 0x1D4 */ bool grounded; /* 0x1D8 */ s32 meTargetIndex; - /* 0x1DC */ s32 barrelRoll; - /* 0x1E0 */ s32 barrelInputTimerL; - /* 0x1E4 */ s32 barrelInputTimerR; - /* 0x1E8 */ s32 timer_1E8; + /* 0x1DC */ s32 rollState; + /* 0x1E0 */ s32 rollInputTimerL; + /* 0x1E4 */ s32 rollInputTimerR; + /* 0x1E8 */ s32 rollTimer; /* 0x1EC */ s32 rollRate; /* 0x1F0 */ s32 baseRollRate; /* 0x1F4 */ s32 hitTimer; /* 0x1F8 */ s32 csTimer; /* 0x1FC */ s32 csEventTimer; - /* 0x200 */ s32 unk_200; - /* 0x204 */ s32 unk_204; - /* 0x208 */ s32 unk_208; + /* 0x200 */ s32 dmgEffect; // 1 colors the arwing red. 2 gives it a static-y texture + /* 0x204 */ s32 wingPosition; + /* 0x208 */ s32 unk_208; // timer for great fox splash effects in aquas intro /* 0x20C */ s32 unk_20C; /* 0x210 */ s32 pathChangeTimer; - /* 0x214 */ s32 timer_214; - /* 0x218 */ s32 timer_218; - /* 0x21C */ s32 unk_21C; + /* 0x214 */ s32 timer_214; // unused. may have been another double input timer like barrel roll + /* 0x218 */ s32 timer_218; // unused. may have been another double input timer like barrel roll + /* 0x21C */ s32 hitDirection; /* 0x220 */ s32 radioDamageTimer; - /* 0x224 */ s32 timer_224; + /* 0x224 */ s32 dmgEffectTimer; /* 0x228 */ s32 flags_228; /* 0x22C */ s32 whooshTimer; - /* 0x230 */ s32 unk_230; - /* 0x234 */ s32 unk_234; + /* 0x230 */ s32 unk_230; // turns off some Blue Marine controls. perhaps was a lockout timer? + /* 0x234 */ s32 draw; /* 0x238 */ s32 alternateView; /* 0x23C */ s32 shadowing; - /* 0x240 */ s32 unk_240; + /* 0x240 */ s32 hideShadow; /* 0x244 */ s32 shotTimer; - /* 0x248 */ f32 unk_248; - /* 0x24C */ f32 unk_24C; + /* 0x248 */ f32 shadowRotX; // forms YPR triple with groundRotY + /* 0x24C */ f32 shadowRotZ; /* 0x250 */ f32 unk_250; // checked for by event actors, but unused? /* 0x250 */ char pad254[4]; /* 0x258 */ f32 meteoWarpSpinSpeed; @@ -305,8 +305,8 @@ typedef struct Player { /* 0x2B4 */ bool boostCooldown; /* 0x2B8 */ bool boostActive; /* 0x2BC */ f32 boostMeter; - /* 0x2C0 */ f32 unk_2C0; // has to do with starting right tank jet - /* 0x2C4 */ s32 unk_2C4; // counts up during some effects. never used + /* 0x2C0 */ f32 unk_2C0; // has to do with starting right tank jet. counterpart of D_800C9F20 + /* 0x2C4 */ s32 deflectCount; // counts shots deflected by barrel rolls. never used /* 0x2C8 */ Vec3f hit2; /* 0x2D4 */ Vec3f hit1; /* 0x2E0 */ Vec3f hit3; @@ -315,7 +315,7 @@ typedef struct Player { /* 0x460 */ f32 sfxSource[3]; /* 0x46C */ f32 sfxVel[3]; /* 0x478 */ PlayerSfx sfx; - /* 0x498 */ s32 timer_498; + /* 0x498 */ s32 mercyTimer; /* 0x49C */ WingInfo wings; /* 0x4D8 */ f32 aerobaticPitch; /* 0x4DC */ s32 somersault; diff --git a/include/variables.h b/include/variables.h index c9a13bfc..d31c8e28 100644 --- a/include/variables.h +++ b/include/variables.h @@ -190,7 +190,7 @@ extern s32 gVsMatchState; extern s32 D_versus_80178758; extern s32 sUnlockLandmaster; // sUnlockLandmaster extern s32 sUnlockOnFoot; // sUnlockOnFoot -extern s32 D_versus_80178768[]; +extern s32 gVsCountdown[]; // gfx_data extern u16 D_Tex_800DACB8[][32]; diff --git a/linker_scripts/us/rev1/symbol_addrs_engine.txt b/linker_scripts/us/rev1/symbol_addrs_engine.txt index 961bd9ae..08b68111 100644 --- a/linker_scripts/us/rev1/symbol_addrs_engine.txt +++ b/linker_scripts/us/rev1/symbol_addrs_engine.txt @@ -440,7 +440,7 @@ gActor194yRot = 0x801771D8; gSceneId = 0x801774F8; gActor194zRot = 0x80177500; gSceneSetup = 0x80177820; -D_ctx_80177824 = 0x80177824; +gClearPlayerInfo = 0x80177824; gEnemyShotSpeed = 0x80177828; D_ctx_8017782C = 0x8017782C; gShowLevelClearStatusScreen = 0x80177830; diff --git a/src/engine/fox_360.c b/src/engine/fox_360.c index 04935130..dfa2b95c 100644 --- a/src/engine/fox_360.c +++ b/src/engine/fox_360.c @@ -95,7 +95,7 @@ bool AllRange_PlayMessage(u16* msg, RadioCharacterId rcid) { } void AllRange_DrawCountdown(void) { - if (gShowAllRangeCountdown != 0) { + if (gShowAllRangeCountdown) { s32 seconds = gAllRangeCountdown[1]; HUD_DrawCountdown(gAllRangeCountdown, gAllRangeCountdownScale); @@ -144,7 +144,7 @@ void AllRange_GreatFoxRepair(Player* player) { gCsFrameCount++; switch (player->csState) { case 0: - player->hitTimer = player->timer_498 = player->damage = player->barrelRollAlpha = player->boostMeter = + player->hitTimer = player->mercyTimer = player->damage = player->barrelRollAlpha = player->boostMeter = player->boostCooldown = player->somersault = gCsFrameCount = 0; player->zRotBarrelRoll = player->camRoll = player->boostSpeed = player->camDist = player->knockback.x = player->knockback.y = player->knockback.z = player->damageShake = player->aerobaticPitch = 0.0f; @@ -1476,7 +1476,7 @@ void ActorAllRange_Update(Actor* this) { ActorAllRange_PlayMessage(gMsg_ID_9369, RCID_WOLF); } break; - } else if ((this->iwork[4] > 200) && (gPlayer[0].timer_224 != 0)) { + } else if ((this->iwork[4] > 200) && (gPlayer[0].dmgEffectTimer != 0)) { this->iwork[4] = 100; break; } diff --git a/src/engine/fox_bg.c b/src/engine/fox_bg.c index 0fd101f0..9979ac97 100644 --- a/src/engine/fox_bg.c +++ b/src/engine/fox_bg.c @@ -22,7 +22,7 @@ #include "assets/ast_zoness.h" #include "prevent_bss_reordering2.h" -#include "prevent_bss_reordering3.h" +// #include "prevent_bss_reordering3.h" f32 gWarpZoneBgAlpha; u8 D_bg_8015F964; // related to water surfaces diff --git a/src/engine/fox_context.c b/src/engine/fox_context.c index 3384f5e3..afd62d62 100644 --- a/src/engine/fox_context.c +++ b/src/engine/fox_context.c @@ -6,8 +6,8 @@ s32 gSceneId; s32 gSceneSetup; -s32 D_ctx_80177824; // some sort of flag -s32 D_ctx_8017782C; // some sort of flag. all range related? +s32 gClearPlayerInfo; // some sort of flag +s32 D_ctx_8017782C; // some sort of flag. all range related? GameState gGameState; s32 gNextGameStateTimer; s32 gVsItemSpawnTimer; diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index 7b01c79f..67daab35 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -465,7 +465,7 @@ void Cutscene_EnterWarpZone(Player* player) { if (player->camDist < -15000.0f) { player->camDist = 0.0f; player->warpCamSpeed = 0.0f; - player->unk_234 = 0; + player->draw = false; } } var_v0 = 1; @@ -518,7 +518,7 @@ void Cutscene_EnterWarpZone(Player* player) { player->meteoWarpTimer = gSavedHitCount = gObjectLoadIndex = gSavedObjectLoadIndex = 0; - player->unk_234 = 1; + player->draw = true; gLevelPhase = 1; gCamDistortion = 0.15f; AUDIO_PLAY_SFX(NA_SE_WARP_OUT, gDefaultSfxSource, 0); @@ -798,7 +798,7 @@ void Cutscene_AllRangeMode(Player* player) { Math_SmoothStepToF(&D_ctx_80177A48[2], -70.0f, 0.1f, 0.7f, 0.0f); if (D_ctx_80177A48[1] > 220.0f) { - player->unk_204 = 2; + player->wingPosition = 2; } if ((gCsFrameCount > 135) && (gCsFrameCount < 180)) { @@ -1225,7 +1225,7 @@ void Cutscene_CoComplete2(Player* player) { gCsCamAtX += D_ctx_80177A48[7]; gCsCamAtY += D_ctx_80177A48[8]; gCsCamAtZ += D_ctx_80177A48[9]; - player->unk_234 = 0; + player->draw = false; if (player->csTimer == 0) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->csTimer = 0; @@ -1556,7 +1556,7 @@ void Cutscene_KillPlayer(Player* player) { Player_PlaySfx(player->sfxSource, NA_SE_ARWING_EXPLOSION, player->num); player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->csTimer = 70; - player->timer_224 = 20; + player->dmgEffectTimer = 20; gFadeoutType = 7; if (player->grounded) { @@ -1615,7 +1615,7 @@ void Cutscene_KillPlayer(Player* player) { } } -void func_demo_8004D738(Player* player) { +void Cutscene_LandmasterDown(Player* player) { player->pos.y += 30.0f; func_effect_8007D0E0(player->pos.x, player->pos.y, player->trueZpos, 6.0f); if (gCamCount == 1) { @@ -1627,7 +1627,7 @@ void func_demo_8004D738(Player* player) { Cutscene_KillPlayer(player); } -void func_demo_8004D828(Player* player) { +void Cutscene_ArwingDown360(Player* player) { s32 i; Vec3f src; Vec3f dest; @@ -1737,12 +1737,12 @@ void func_demo_8004D828(Player* player) { player->cam.at.y = player->pos.y; } - if (gVersusMode != 0) { + if (gVersusMode) { Player_CheckBounds360(player); } } -void func_demo_8004DEF8(Player* player) { +void Cutscene_ArwingDownOnRails(Player* player) { s32 i; if (player->rot.x < 0.0f) { @@ -1841,9 +1841,9 @@ void Cutscene_PlayerDown(Player* player) { switch (player->form) { case FORM_ARWING: if (gLevelMode == LEVELMODE_ALL_RANGE) { - func_demo_8004D828(player); + Cutscene_ArwingDown360(player); } else { - func_demo_8004DEF8(player); + Cutscene_ArwingDownOnRails(player); Player_UpdatePath(player); } Player_CollisionCheck(player); @@ -1851,15 +1851,15 @@ void Cutscene_PlayerDown(Player* player) { break; case FORM_LANDMASTER: - func_demo_8004D738(player); + Cutscene_LandmasterDown(player); break; case FORM_BLUE_MARINE: - Aquas_801AB9B0(player); + Aquas_BlueMarineDown(player); break; case FORM_ON_FOOT: - func_demo_8004D738(player); + Cutscene_LandmasterDown(player); break; } } diff --git a/src/engine/fox_display.c b/src/engine/fox_display.c index db098152..935754de 100644 --- a/src/engine/fox_display.c +++ b/src/engine/fox_display.c @@ -18,7 +18,7 @@ f32 D_display_801615B8[4]; s32 D_display_800CA220 = 0; u8 sPlayersVisible[] = { 0, 0, 0, 0 }; // s32 sDrawCockpit = 0; // -s32 D_display_800CA22C = 0; // +s32 D_display_800CA22C = false; // f32 gCamDistortion = 0.0f; Actor* gTeamHelpActor = NULL; s32 gTeamHelpTimer = 0; @@ -417,7 +417,7 @@ void func_display_8005314C(void) { bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, void* wingData) { WingInfo* wings = (WingInfo*) wingData; - if ((D_display_800CA22C != 0) && (gPlayer[0].unk_200 == 0)) { + if (D_display_800CA22C && (gPlayer[0].dmgEffect == 0)) { RCP_SetupDL(&gMasterDisp, SETUPDL_29); func_display_8005314C(); } @@ -429,7 +429,7 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, if (wings->rightState == WINGSTATE_BROKEN) { *gfxPtr = D_arwing_3015120; } - if ((D_display_800CA22C != 0) && ((gRightWingFlashTimer[0] % 2) != 0)) { + if (D_display_800CA22C && ((gRightWingFlashTimer[0] % 2) != 0)) { RCP_SetupDL(&gMasterDisp, SETUPDL_34); func_display_8005314C(); if (gRightWingFlashTimer[0] > 1000) { @@ -444,7 +444,7 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, if (wings->rightState != 2) { *gfxPtr = NULL; } - if ((D_display_800CA22C != 0) && ((gRightWingFlashTimer[0] % 2) != 0)) { + if (D_display_800CA22C && ((gRightWingFlashTimer[0] % 2) != 0)) { RCP_SetupDL(&gMasterDisp, SETUPDL_34); func_display_8005314C(); if (gRightWingFlashTimer[0] > 1000) { @@ -461,7 +461,7 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, if (wings->leftState == WINGSTATE_BROKEN) { *gfxPtr = D_arwing_3014BF0; } - if ((D_display_800CA22C != 0) && ((gLeftWingFlashTimer[0] % 2) != 0)) { + if (D_display_800CA22C && ((gLeftWingFlashTimer[0] % 2) != 0)) { RCP_SetupDL(&gMasterDisp, SETUPDL_34); func_display_8005314C(); if (gLeftWingFlashTimer[0] > 1000) { @@ -476,7 +476,7 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, if (wings->leftState != 2) { *gfxPtr = NULL; } - if ((D_display_800CA22C != 0) && ((gLeftWingFlashTimer[0] % 2) != 0)) { + if (D_display_800CA22C && ((gLeftWingFlashTimer[0] % 2) != 0)) { RCP_SetupDL(&gMasterDisp, SETUPDL_34); func_display_8005314C(); if (gLeftWingFlashTimer[0] > 1000) { @@ -538,7 +538,7 @@ void func_display_80053658(WingInfo* wings) { } Animation_DrawSkeleton(1, D_arwing_3016610, sp68, func_display_800531A4, NULL, wings, &gIdentityMatrix); } - D_display_800CA22C = 0; + D_display_800CA22C = false; modelId = wings->modelId; if (D_display_800CA220 != 0) { modelId = 1; @@ -644,7 +644,7 @@ void func_display_80053C38(Player* player, s32 arg1) { player->wings.unk_28 = player->wings.unk_04 = player->wings.unk_08 = player->wings.unk_0C = player->wings.unk_10 = 0.0f; } - D_display_800CA22C = 1; + D_display_800CA22C = true; gReflectY = arg1; func_display_80053658(&player->wings); } @@ -656,7 +656,7 @@ void func_display_80053F7C(Player* player) { s32 i; if ((gPlayerNum == player->num) && ((player->form == FORM_ARWING) || (player->form == FORM_LANDMASTER)) && - (player->unk_234 != 0) && + player->draw && (((gGameState == GSTATE_PLAY) && (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE)) || (gGameState == GSTATE_MENU))) { for (i = 0; i < 2; i++) { @@ -1044,7 +1044,7 @@ void func_display_80055B58(Player* player) { f32 var_fv0; s32 pad[3]; - if ((player->unk_234 != 0) && (player->state_1C8 != PLAYERSTATE_1C8_DOWN)) { + if (player->draw && (player->state_1C8 != PLAYERSTATE_1C8_DOWN)) { switch (player->form) { case FORM_ARWING: Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + player->damageShake + 180.0f) * M_DTOR, @@ -1104,7 +1104,7 @@ void func_display_80055E98(Player* player) { sp5C = 70.0f; sp58 = -18.0f; - if (player->unk_204 == 2) { + if (player->wingPosition == 2) { sp5C = 108.0f; sp58 = -22.0f; } @@ -1155,7 +1155,7 @@ void func_display_80055E98(Player* player) { } void func_display_80056230(Player* player) { - if ((player->unk_234 != 0) && (player->form == FORM_ARWING) && (gCurrentLevel != LEVEL_VENOM_ANDROSS) && + if (player->draw && (player->form == FORM_ARWING) && (gCurrentLevel != LEVEL_VENOM_ANDROSS) && (gCurrentLevel != LEVEL_TRAINING) && (gLevelType == LEVELTYPE_PLANET)) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, player->pos.x, player->pos.y, player->trueZpos + player->zPath, MTXF_APPLY); @@ -1197,7 +1197,7 @@ void func_display_800564C0(Player* player, s32 arg1) { s32 i; Vec3f sp50 = { 0.0f, 0.0f, 0.0f }; - if (player->unk_234 != 0) { + if (player->draw) { Matrix_Push(&gGfxMatrix); if (player->form == FORM_LANDMASTER) { if (player->grounded) { @@ -1281,7 +1281,7 @@ void func_display_800564C0(Player* player, s32 arg1) { Matrix_Translate(gGfxMatrix, player->xShake, player->yBob, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); } - switch (player->unk_200) { + switch (player->dmgEffect) { case 0: if (!gVersusMode) { if ((gCurrentLevel == LEVEL_FORTUNA) || (gCurrentLevel == LEVEL_TITANIA)) { @@ -1330,7 +1330,7 @@ void func_display_80056E2C(Player* player) { f32 sp30; f32 sp2C; - if ((player->unk_234 != 0) && (player->unk_240 == 0)) { + if (player->draw && !player->hideShadow) { sp34 = D_display_800CA334[gGameFrameCount % 8U]; sp30 = D_display_800CA334[(gGameFrameCount + 4) % 8U]; if (player->grounded) { @@ -1350,8 +1350,8 @@ void func_display_80056E2C(Player* player) { player->groundPos.z + player->zPath, MTXF_APPLY); } Matrix_RotateY(gGfxMatrix, player->groundRotY, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, player->unk_248, MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, player->unk_24C, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, player->shadowRotX, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, player->shadowRotZ, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.8f + sp34, 0.0f, 0.8f + sp30, MTXF_APPLY); if ((player->form == FORM_ARWING) || (player->form == FORM_BLUE_MARINE) || (player->form == FORM_ON_FOOT)) { sp2C = player->bankAngle + player->rockAngle + player->damageShake; diff --git a/src/engine/fox_edisplay.c b/src/engine/fox_edisplay.c index 5a5e4c85..92d72551 100644 --- a/src/engine/fox_edisplay.c +++ b/src/engine/fox_edisplay.c @@ -512,7 +512,7 @@ void func_edisplay_8005B388(Actor* actor) { Vec3f sp30; Matrix_MultVec3f(gGfxMatrix, &sp3C, &sp30); - if ((((fabsf(sp30.z) < 3000.0f) && (fabsf(sp30.x) < 3000.0f) && (gBossActive == 0)) || + if ((((fabsf(sp30.z) < 3000.0f) && (fabsf(sp30.x) < 3000.0f) && !gBossActive) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) || (gCurrentLevel == LEVEL_VENOM_ANDROSS) || (gCurrentLevel == LEVEL_VENOM_2) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) && (gCurrentLevel != LEVEL_MACBETH) && (gCurrentLevel != LEVEL_TITANIA)) { @@ -548,7 +548,7 @@ void func_edisplay_8005B388(Actor* actor) { func_display_80053658(&D_edisplay_80161630); } else if (gLevelType == LEVELTYPE_PLANET) { gSPDisplayList(gMasterDisp++, D_ENMY_PLANET_40018A0); - } else if (gPlayer[0].unk_204 == 2) { + } else if (gPlayer[0].wingPosition == 2) { gSPDisplayList(gMasterDisp++, D_ENMY_SPACE_4003BD0); } else { gSPDisplayList(gMasterDisp++, D_ENMY_SPACE_4007870); diff --git a/src/engine/fox_effect.c b/src/engine/fox_effect.c index ac5711fd..e0098b77 100644 --- a/src/engine/fox_effect.c +++ b/src/engine/fox_effect.c @@ -982,7 +982,7 @@ void func_effect_8007A748(Effect* effect) { bool func_effect_8007A774(Player* player, Effect* effect, f32 arg2) { if ((fabsf(player->trueZpos - effect->obj.pos.z) < arg2) && (fabsf(player->pos.x - effect->obj.pos.x) < arg2) && - (fabsf(player->pos.y - effect->obj.pos.y) < arg2) && (player->timer_498 == 0)) { + (fabsf(player->pos.y - effect->obj.pos.y) < arg2) && (player->mercyTimer == 0)) { Player_ApplyDamage(player, 0, effect->info.damage); return true; } else { @@ -2212,7 +2212,7 @@ void func_effect_8007DB70(Effect* effect) { (fabsf(gPlayer[0].pos.x - effect->obj.pos.x) < 80.0f)) { if ((effect->obj.pos.y < gPlayer[0].pos.y) && ((gPlayer[0].pos.y - effect->obj.pos.y) < (effect->scale2 * 35.0f)) && - (gPlayer[0].timer_498 == 0)) { + (gPlayer[0].mercyTimer == 0)) { Player_ApplyDamage(gPlayer, 0, effect->info.damage); } } @@ -2869,11 +2869,11 @@ void func_effect_8007FE88(Effect* effect) { effect->vel.x = destVelocity.x; effect->vel.y = destVelocity.y; effect->vel.z = destVelocity.z; - gPlayer[0].unk_2C4++; + gPlayer[0].deflectCount++; AUDIO_PLAY_SFX(NA_SE_ROLLING_REFLECT, effect->sfxSource, 0); } - if ((gPlayer[0].barrelRollAlpha == 0) && (gPlayer[0].timer_498 == 0)) { + if ((gPlayer[0].barrelRollAlpha == 0) && (gPlayer[0].mercyTimer == 0)) { Player_ApplyDamage(gPlayer, 0, effect->info.damage); gPlayer[0].knockback.x = 20.0f; if (effect->vel.x < 0.0f) { @@ -3002,11 +3002,11 @@ void func_effect_8008040C(Effect* effect) { effect->vel.x = destVelocity.x; effect->vel.y = destVelocity.y; effect->vel.z = destVelocity.z; - gPlayer[0].unk_2C4++; + gPlayer[0].deflectCount++; AUDIO_PLAY_SFX(NA_SE_ROLLING_REFLECT, effect->sfxSource, 0); } - if ((gPlayer[0].barrelRollAlpha == 0) && (gPlayer[0].timer_498 == 0)) { + if ((gPlayer[0].barrelRollAlpha == 0) && (gPlayer[0].mercyTimer == 0)) { Player_ApplyDamage(gPlayer, 0, effect->info.damage); gPlayer[0].knockback.x = 20.0f; if (effect->vel.x < 0.0f) { @@ -3813,7 +3813,7 @@ void func_effect_80081C5C(Effect* effect) { if ((((effect->timer_50 == 0) && (fabsf(gPlayer[0].pos.x - (effect->obj.pos.x + velocityDest.x)) <= (effect->unk_60.x * 50.0f))) && (fabsf(gPlayer[0].pos.y - (effect->obj.pos.y + velocityDest.y)) <= (effect->unk_60.y * 50.0f))) && - (gPlayer[0].timer_498 == 0)) { + (gPlayer[0].mercyTimer == 0)) { Player_ApplyDamage(gPlayer, 0, 40); } break; diff --git a/src/engine/fox_enmy.c b/src/engine/fox_enmy.c index 7d918bbb..6dccb46b 100644 --- a/src/engine/fox_enmy.c +++ b/src/engine/fox_enmy.c @@ -1651,8 +1651,7 @@ void Actor_Despawn(Actor* actor) { s32 i; if (gVersusMode) { - if ((actor->dmgSource >= 1) && (actor->dmgSource < 4 + 1) && - !((D_versus_80178768[0] == 0) && (D_versus_80178768[1] == 0) && (D_versus_80178768[2] == 0))) { + if ((actor->dmgSource >= 1) && (actor->dmgSource < 4 + 1) && !VS_TIME_UP(gVsCountdown)) { gPlayerScores[actor->dmgSource - 1] += actor->info.bonus; } } else if (!((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->animFrame == 1))) { diff --git a/src/engine/fox_enmy2.c b/src/engine/fox_enmy2.c index 9be372f4..2ad954ad 100644 --- a/src/engine/fox_enmy2.c +++ b/src/engine/fox_enmy2.c @@ -1165,7 +1165,7 @@ void ActorEvent_ProcessScript(ActorEvent* this) { } } - if ((this->eventType == EVID_2) || (this->eventType == EVID_TEAMMATE)) { + if ((this->eventType == EVID_SLIPPY_METEO) || (this->eventType == EVID_TEAMMATE)) { this->drawShadow = true; this->iwork[11] = 1; } @@ -2152,7 +2152,7 @@ void ActorEvent_800701E0(ActorEvent* this) { if (gLevelType == LEVELTYPE_PLANET) { this->timer_04C = RAND_INT(2.9f); - if (this->eventType == EVID_2) { + if (this->eventType == EVID_SLIPPY_METEO) { this->timer_04C = 1; if (this->obj.pos.x < this->hitPos.x) { Play_SpawnDebris(1, this->obj.pos.x + 20.0f, this->obj.pos.y, this->obj.pos.z); @@ -3043,7 +3043,7 @@ void ActorEvent_Update(ActorEvent* this) { return; } if (this->eventType == EVID_300) { - gPlayer[0].unk_1A4 = this->index; + gPlayer[0].dmgType = this->index; this->timer_0C2 = 100; } else if (this->eventType >= EVID_200) { this->counter_04E++; @@ -3920,7 +3920,7 @@ void ActorEvent_Draw(ActorEvent* this) { Actor_DrawEngineAndContrails(this); break; - case EVID_2: + case EVID_SLIPPY_METEO: this->fwork[15] -= this->fwork[15] * 0.1f; this->fwork[26] -= this->fwork[26] * 0.1f; this->fwork[16] -= this->fwork[16] * 0.1f; @@ -4309,7 +4309,7 @@ void func_enmy2_800763A4(Actor* actor) { func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); } - if ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->eventType == EVID_2)) { + if ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->eventType == EVID_SLIPPY_METEO)) { if (actor->fwork[17] < 360.0f) { Play_SpawnDebris(1, actor->obj.pos.x + 20.0f, actor->obj.pos.y, actor->obj.pos.z); actor->fwork[17] = 777.0f; diff --git a/src/engine/fox_game.c b/src/engine/fox_game.c index a676865a..a695fa6c 100644 --- a/src/engine/fox_game.c +++ b/src/engine/fox_game.c @@ -405,7 +405,7 @@ void Game_Update(void) { case GSTATE_INIT: gGameState = GSTATE_TITLE; gTitleState = 1; - D_ctx_80177824 = 1; + gClearPlayerInfo = true; Memory_FreeAll(); Play_ClearObjectData(); gCamCount = 1; @@ -552,7 +552,7 @@ void Game_Update(void) { } } else { for (i = 0; i < gCamCount; i++) { - if (gPlayer[i].timer_224 != 0) { + if (gPlayer[i].dmgEffectTimer != 0) { Graphics_FillRectangle(&gMasterDisp, sVsCameraULx[i], sVsCameraULy[i], sVsCameraLRx[i], sVsCameraLRy[i], gFillScreenRed, gFillScreenGreen, gFillScreenBlue, diff --git a/src/engine/fox_hud.c b/src/engine/fox_hud.c index 3f1d24fd..b6c2cde7 100644 --- a/src/engine/fox_hud.c +++ b/src/engine/fox_hud.c @@ -1410,7 +1410,7 @@ void func_hud_80088970(void) { } if (D_80161810[0] >= 2) { - gPauseEnabled = 0; + gPauseEnabled = false; } player = &gPlayer[gPlayerNum]; @@ -2066,7 +2066,7 @@ s32 func_hud_8008A4DC(void) { y = 162.000f; x1 += D_800D1E10 * temp3; } else { - if ((gVsMatchStart == 0) || (D_versus_80178750 != 0)) { + if (!gVsMatchStart || (D_versus_80178750 != 0)) { return 0; } temp2 = 13000.00f; @@ -2460,7 +2460,7 @@ s32 func_hud_8008B774(void) { (gCurrentLevel == LEVEL_SECTOR_Y))) { for (i = 0; i < ARRAY_COUNT(gActors); i++) { if ((gActors[i].obj.status == OBJ_ACTIVE) && (gActors[i].iwork[12] == temp)) { - if ((gActors[i].eventType == EVID_2) || (gActors[i].eventType == EVID_TEAMMATE) || + if ((gActors[i].eventType == EVID_SLIPPY_METEO) || (gActors[i].eventType == EVID_TEAMMATE) || ((gActors[i].obj.id == OBJ_ACTOR_TEAM_BOSS) && ((gActors[i].aiType == AI360_FALCO) || (gActors[i].aiType == AI360_SLIPPY) || (gActors[i].aiType == AI360_PEPPY)))) { @@ -2814,7 +2814,7 @@ void func_hud_8008CBE4(void) { s32 i; s32 j; - if (gVsMatchType != 0) { + if (gVsMatchType != VS_MATCH_POINTS) { return; } @@ -2829,7 +2829,7 @@ void func_hud_8008CBE4(void) { break; case 1: - if (gVsMatchStart == 0) { + if (!gVsMatchStart) { D_80161758 = 0; break; } @@ -3030,7 +3030,7 @@ void func_hud_8008D984(void) { } void func_hud_8008DC34(void) { - if ((gVsMatchStart != 0) && (D_versus_80178750 == 0)) { + if (gVsMatchStart && (D_versus_80178750 == 0)) { func_hud_8008D250(); func_hud_8008D7F4(); func_hud_8008D4F0(0, 0); @@ -4916,7 +4916,7 @@ void HUD_AquasStart(Player* player) { gCsFrameCount = 0; gDrawBackdrop = 1; gAqDrawMode = 1; - player->unk_234 = 0; + player->draw = false; player->csState = 1; player->unk_208 = 0; player->baseSpeed = 0.0f; @@ -5213,7 +5213,7 @@ void HUD_AquasStart(Player* player) { player->rot.y = 0.0f; player->baseSpeed = 20.0f; - player->unk_234 = 1; + player->draw = true; player->csState = 6; player->csTimer = 1000; @@ -5713,7 +5713,7 @@ void HUD_AquasComplete(Player* player) { break; case 10: - player->unk_234 = 1; + player->draw = true; gAqDrawMode = 2; player->csState = 11; @@ -5952,7 +5952,7 @@ void HUD_AquasComplete(Player* player) { player->yBob = -SIN_DEG(player->bobPhase) * 0.5f; player->rockAngle = SIN_DEG(player->rockPhase) * 1.5f; - if (player->unk_234) { + if (player->draw) { src.x = 0.0f; src.y = 0.0f; src.z = -70.0f; diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index af3dd807..bbbff3fa 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -220,12 +220,13 @@ void Player_DamageEffects(Player* player) { player->pos.y + sp40 + RAND_FLOAT(10.0f), player->trueZpos + RAND_FLOAT_CENTERED(30.0f), player->vel.x, player->vel.y, player->vel.z, 0.04f + RAND_FLOAT(0.03f), player->num + 1); - if (player->timer_224 == 0) { - player->timer_224 = 2; + if (player->dmgEffectTimer == 0) { + player->dmgEffectTimer = 2; } } - } else if (((gGameFrameCount & (var_v1 >> 2)) == 0) && (Rand_ZeroOne() < 0.5f) && (player->timer_224 == 0)) { - player->timer_224 = 2; + } else if (((gGameFrameCount & (var_v1 >> 2)) == 0) && (Rand_ZeroOne() < 0.5f) && + (player->dmgEffectTimer == 0)) { + player->dmgEffectTimer = 2; } } } @@ -292,7 +293,7 @@ void Play_InitVsStage(void) { gLevelObjects = SEGMENTED_TO_VIRTUAL(D_versus_302E0E4); break; case VS_STAGE_SECTOR_Z: - if (gVsMatchType == 2) { + if (gVsMatchType == VS_MATCH_TIME) { gLevelObjects = SEGMENTED_TO_VIRTUAL(D_versus_302E378); } else { gLevelObjects = SEGMENTED_TO_VIRTUAL(D_versus_302E170); @@ -819,8 +820,8 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) { Vec3f sp38; f32 sp34 = 20.0f; - player->unk_1A4 = damage; - player->unk_21C = direction; + player->dmgType = damage; + player->hitDirection = direction; if ((damage == 39) || (damage == 41) || (damage == 42) || (damage == 43)) { damage = 40; } @@ -834,15 +835,15 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) { } player->unk_284 = 0; player->hitTimer = 20; - if (player->unk_1A4 > 40) { + if (player->dmgType > 40) { sp34 = (player->boostSpeed * 0.3f) + 20.0f; - player->timer_498 = 5; + player->mercyTimer = 5; } else if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && !gBossActive) { - player->timer_498 = 3; + player->mercyTimer = 3; } else if ((gCurrentLevel == LEVEL_VENOM_1) || (gCurrentLevel == LEVEL_AQUAS)) { - player->timer_498 = 5; + player->mercyTimer = 5; } else { - player->timer_498 = 20; + player->mercyTimer = 20; } if (gHasShield[player->num]) { Player_PlaySfx(player->sfxSource, NA_SE_DAMAGE_S, player->num); @@ -866,9 +867,9 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) { Matrix_RotateY(gCalcMatrix, player->yRot_114 * M_DTOR, MTXF_NEW); Matrix_RotateZ(gCalcMatrix, player->bankAngle * M_DTOR, MTXF_APPLY); sp44.z = 0.0f; - switch (player->unk_21C) { + switch (player->hitDirection) { case 0: - player->timer_224 = 20; + player->dmgEffectTimer = 20; player->knockback.x = 0.f; player->knockback.y = 0.f; player->knockback.z = 0.f; @@ -896,7 +897,7 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) { Player_DamageWings(player, 2, 20); break; case 3: - player->timer_224 = 20; + player->dmgEffectTimer = 20; Play_SpawnHitmark(player->hit4.x - player->vel.x, player->hit4.y, player->hit4.z - player->vel.z); if (player->form != FORM_LANDMASTER) { sp44.x = 0.0f; @@ -913,7 +914,7 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) { } break; case 4: - player->timer_224 = 20; + player->dmgEffectTimer = 20; Play_SpawnHitmark(player->hit3.x - player->vel.x, player->hit3.y, player->hit3.z - player->vel.z); sp44.x = 0.0f; sp44.y = sp34; @@ -928,13 +929,13 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) { } break; } - if ((gCurrentLevel == LEVEL_VENOM_1) && (player->unk_1A4 == 42)) { + if ((gCurrentLevel == LEVEL_VENOM_1) && (player->dmgType == 42)) { if (player->pos.x > 0.0f) { player->knockback.x = -30.0f; } else { player->knockback.x = 30.0f; } - player->timer_498 = 10; + player->mercyTimer = 10; } } @@ -943,15 +944,15 @@ f32 D_800D2FEC[5] = { }; void Player_GroundedCollision(Player* player, u32 arg1, f32 arg2, f32 arg3) { - player->unk_21C = arg1; + player->hitDirection = arg1; switch (arg1) { case 1: case 2: player->pos.x = player->basePos.x; player->knockback.x = 0.0f; - player->pos.x += D_800D2FEC[player->unk_21C]; + player->pos.x += D_800D2FEC[player->hitDirection]; if (player->form == FORM_LANDMASTER) { - player->pos.x -= D_800D2FEC[player->unk_21C]; + player->pos.x -= D_800D2FEC[player->hitDirection]; } Math_SmoothStepToF(&player->baseSpeed, 2.0f, 1.0f, 2.0f, 0.00001f); break; @@ -959,9 +960,9 @@ void Player_GroundedCollision(Player* player, u32 arg1, f32 arg2, f32 arg3) { case 4: player->pos.z = player->basePos.z; player->knockback.z = 0.0f; - player->pos.z += D_800D2FEC[player->unk_21C]; + player->pos.z += D_800D2FEC[player->hitDirection]; if (player->form == FORM_LANDMASTER) { - player->pos.z += D_800D2FEC[player->unk_21C]; + player->pos.z += D_800D2FEC[player->hitDirection]; } player->trueZpos = player->pos.z; Math_SmoothStepToF(&player->baseSpeed, 2.0f, 1.0f, 2.0f, 0.00001f); @@ -1487,7 +1488,7 @@ Vec3f D_800D30B8[4] = { }; void Player_Collide(Player* playerA, Player* playerB) { - if (playerA->timer_498 == 0) { + if (playerA->mercyTimer == 0) { Player_ApplyDamage(playerA, 0, D_800D3000[playerA->form][playerB->form]); playerA->attacker = playerB->num + 1; playerB->attacker = playerA->num + 1; @@ -1628,7 +1629,7 @@ void Player_CollisionCheck(Player* player) { func_tank_800444BC(player); } - if ((player->timer_498 == 0) || ((gCamCount != 1) && (player->form != FORM_ARWING))) { + if ((player->mercyTimer == 0) || ((gCamCount != 1) && (player->form != FORM_ARWING))) { if (gLevelMode == LEVELMODE_ALL_RANGE) { Scenery360* scenery360; @@ -1705,7 +1706,7 @@ void Player_CollisionCheck(Player* player) { player->pos.y = player->basePos.y; player->pos.z = player->basePos.z; player->yRot_114 = scenery360->obj.rot.y + 180.0f; - player->timer_498 = 5; + player->mercyTimer = 5; } if ((scenery360->obj.id == OBJ_SCENERY_135) || (scenery360->obj.id == OBJ_SCENERY_136)) { @@ -1730,7 +1731,7 @@ void Player_CollisionCheck(Player* player) { } else { player->yRot_114 = scenery360->obj.rot.y; } - player->timer_498 = 5; + player->mercyTimer = 5; } } } @@ -1808,7 +1809,7 @@ void Player_CollisionCheck(Player* player) { player->knockback.x = spBC.x; player->knockback.y = spBC.y; player->pos.x = player->basePos.x; - player->timer_498 = 5; + player->mercyTimer = 5; } else if (scenery->obj.id == OBJ_SCENERY_50) { if (player->pos.x < scenery->obj.pos.x) { player->knockback.x = -30.0f; @@ -1819,7 +1820,7 @@ void Player_CollisionCheck(Player* player) { } player->knockback.y = 0.0f; player->pos.x = player->basePos.x; - player->timer_498 = 5; + player->mercyTimer = 5; } else if (scenery->obj.id == OBJ_SCENERY_131) { Matrix_RotateY(gCalcMatrix, (scenery->obj.rot.y + 180.0f) * M_DTOR, MTXF_NEW); Matrix_RotateZ(gCalcMatrix, -scenery->obj.rot.z * M_DTOR, MTXF_APPLY); @@ -1828,7 +1829,7 @@ void Player_CollisionCheck(Player* player) { player->knockback.y = spBC.y; player->rot.y = 0.0f; player->rot.x = 0.0f; - player->timer_498 = 5; + player->mercyTimer = 5; player->pos.x = player->basePos.x; player->pos.y = player->basePos.y; } @@ -1857,7 +1858,7 @@ void Player_CollisionCheck(Player* player) { if ((VEC3F_MAG(&spfD4)) < 1500.0f) { Player_ApplyDamage(player, 0, boss->info.damage); player->boostSpeed = 0.0f; - player->timer_498 = 5; + player->mercyTimer = 5; player->knockback.y = 30.0f; boss->dmgType = DMG_BEAM; func_effect_8007BFFC(player->pos.x + RAND_FLOAT_CENTERED(10.0f), @@ -2022,7 +2023,7 @@ void Player_CollisionCheck(Player* player) { (sprite->obj.id == OBJ_SPRITE_TI_CACTUS) || (sprite->obj.id == OBJ_SPRITE_CO_TREE)) { sprite->destroy = 1; player->hitTimer = 6; - player->unk_21C = 0; + player->hitDirection = 0; } else { Player_ApplyDamage(player, temp_v0, sprite->info.damage); } @@ -2155,73 +2156,130 @@ void Player_FloorCheck(Player* player) { s32 pad3; s32 pad4; - if (player->unk_240 == 0) { - player->groundPos.x = player->pos.x; - player->groundPos.z = player->trueZpos - player->pos.y; - if (gGroundType != 4) { - if (gCamCount == 1) { - player->groundPos.y = gGroundHeight + 3.0f; - } else { - player->groundPos.y = gGroundHeight; - if (player->form == FORM_ON_FOOT) { - player->groundPos.z = player->trueZpos; + if (player->hideShadow) { + return; + } + player->groundPos.x = player->pos.x; + player->groundPos.z = player->trueZpos - player->pos.y; + if (gGroundType != 4) { + if (gCamCount == 1) { + player->groundPos.y = gGroundHeight + 3.0f; + } else { + player->groundPos.y = gGroundHeight; + if (player->form == FORM_ON_FOOT) { + player->groundPos.z = player->trueZpos; + } + } + player->shadowRotX = player->shadowRotZ = player->groundRotY = 0.0f; + } + sp100 = 0.0f; + spFC = 0.0f; + spF8 = 0.0f; + if (gCamCount != 1) { + if (player->form == FORM_ON_FOOT) { + for (sp144 = 0; sp144 < 200; sp144++) { + scenery360 = &gScenery360[sp144]; + if ((scenery360->obj.status == OBJ_ACTIVE) && + ((scenery360->obj.id == OBJ_SCENERY_143) || (scenery360->obj.id == OBJ_SCENERY_140) || + (scenery360->obj.id == OBJ_SCENERY_141)) && + (fabsf(scenery360->obj.pos.x - player->pos.x) < 2000.0f) && + (fabsf(scenery360->obj.pos.z - player->trueZpos) < 2000.0f)) { + spC8.x = scenery360->obj.pos.x; + spC8.y = scenery360->obj.pos.y; + spC8.z = scenery360->obj.pos.z; + spD4.x = player->pos.x; + spD4.y = gGroundHeight; + spD4.z = player->trueZpos; + colId = COL2_4; + if (scenery360->obj.id == OBJ_SCENERY_141) { + colId = COL2_6; + } else if (scenery360->obj.id == OBJ_SCENERY_143) { + colId = COL2_17; + } + if (func_col2_800A3690(&spD4, &spC8, colId, &spBC)) { + player->groundPos.y = spBC.y + 1.0f; + player->shadowRotX = spBC.x; + player->shadowRotZ = spBC.z; + break; + } } } - player->unk_248 = player->unk_24C = player->groundRotY = 0.0f; } - sp100 = 0.0f; - spFC = 0.0f; - spF8 = 0.0f; - if (gCamCount != 1) { - if (player->form == FORM_ON_FOOT) { - for (sp144 = 0; sp144 < 200; sp144++) { - scenery360 = &gScenery360[sp144]; - if ((scenery360->obj.status == OBJ_ACTIVE) && - ((scenery360->obj.id == OBJ_SCENERY_143) || (scenery360->obj.id == OBJ_SCENERY_140) || - (scenery360->obj.id == OBJ_SCENERY_141)) && - (fabsf(scenery360->obj.pos.x - player->pos.x) < 2000.0f) && - (fabsf(scenery360->obj.pos.z - player->trueZpos) < 2000.0f)) { - spC8.x = scenery360->obj.pos.x; - spC8.y = scenery360->obj.pos.y; - spC8.z = scenery360->obj.pos.z; - spD4.x = player->pos.x; - spD4.y = gGroundHeight; - spD4.z = player->trueZpos; - colId = COL2_4; - if (scenery360->obj.id == OBJ_SCENERY_141) { - colId = COL2_6; - } else if (scenery360->obj.id == OBJ_SCENERY_143) { - colId = COL2_17; + } else { + if ((gLevelMode == LEVELMODE_ALL_RANGE) && (gLevelType == LEVELTYPE_PLANET)) { + player->groundPos.x = player->pos.x; + player->groundPos.z = player->trueZpos; + for (sp144 = 0, scenery360 = gScenery360; sp144 < 200; sp144++, scenery360++) { + if ((scenery360->obj.status == OBJ_ACTIVE) && + ((scenery360->obj.id == OBJ_SCENERY_150) || (scenery360->obj.id == OBJ_SCENERY_149) || + (scenery360->obj.id == OBJ_SCENERY_148) || (scenery360->obj.id == OBJ_SCENERY_1) || + (scenery360->obj.id == OBJ_SCENERY_3)) && + (fabsf(scenery360->obj.pos.x - player->pos.x) < 2500.0f) && + (fabsf(scenery360->obj.pos.z - player->trueZpos) < 2500.0f)) { + tempx = scenery360->obj.pos.x; + tempy = scenery360->obj.pos.y; + tempz = scenery360->obj.pos.z; + sp120 = scenery360->obj.rot.y; + Matrix_RotateY(gCalcMatrix, -sp120 * M_DTOR, MTXF_NEW); + spEC.x = player->pos.x - tempx; + spEC.y = 0.0f; + spEC.z = player->trueZpos - tempz; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &spEC, &spE0); + spD4.x = spE0.x + tempx; + spD4.y = spE0.y + tempy; + spD4.z = spE0.z + tempz; + spC8.x = tempx; + spC8.y = tempy; + spC8.z = tempz; + + if ((scenery360->obj.id == OBJ_SCENERY_149) || (scenery360->obj.id == OBJ_SCENERY_150)) { + if (scenery360->obj.id == OBJ_SCENERY_149) { + colId = COL1_5; + } else { + colId = COL1_6; + } + if (func_col1_800998FC(&spD4, &spC8, &sp9C, colId, &spB0, spA8) > 0) { + player->groundPos.y = spB0.y; + player->shadowRotX = spA8[0]; + player->shadowRotZ = spA8[1]; + player->groundRotY = DEG_TO_RAD(sp120); + } + } else { + colId = COL2_0; + if (scenery360->obj.id == OBJ_SCENERY_3) { + colId = COL2_3; } if (func_col2_800A3690(&spD4, &spC8, colId, &spBC)) { - player->groundPos.y = spBC.y + 1.0f; - player->unk_248 = spBC.x; - player->unk_24C = spBC.z; - break; + player->groundPos.y = spBC.y; + player->shadowRotX = spBC.x; + player->shadowRotZ = spBC.z; + player->groundRotY = DEG_TO_RAD(sp120); } } } } - } else { - if ((gLevelMode == LEVELMODE_ALL_RANGE) && (gLevelType == LEVELTYPE_PLANET)) { - player->groundPos.x = player->pos.x; - player->groundPos.z = player->trueZpos; - for (sp144 = 0, scenery360 = gScenery360; sp144 < 200; sp144++, scenery360++) { - if ((scenery360->obj.status == OBJ_ACTIVE) && - ((scenery360->obj.id == OBJ_SCENERY_150) || (scenery360->obj.id == OBJ_SCENERY_149) || - (scenery360->obj.id == OBJ_SCENERY_148) || (scenery360->obj.id == OBJ_SCENERY_1) || - (scenery360->obj.id == OBJ_SCENERY_3)) && - (fabsf(scenery360->obj.pos.x - player->pos.x) < 2500.0f) && - (fabsf(scenery360->obj.pos.z - player->trueZpos) < 2500.0f)) { - tempx = scenery360->obj.pos.x; - tempy = scenery360->obj.pos.y; - tempz = scenery360->obj.pos.z; - sp120 = scenery360->obj.rot.y; - Matrix_RotateY(gCalcMatrix, -sp120 * M_DTOR, MTXF_NEW); + } + for (sp144 = 0, scenery = gScenery; + (sp144 < 50) && (gLevelMode == LEVELMODE_ON_RAILS) && (gCurrentLevel != LEVEL_VENOM_1); + sp144++, scenery++) { + if ((scenery->obj.status == OBJ_ACTIVE) && ((player->trueZpos - 3000.0f) < scenery->obj.pos.z) && + (scenery->obj.id != OBJ_SCENERY_0) && (scenery->obj.id != OBJ_SCENERY_8)) { + tempx = scenery->obj.pos.x; + tempy = scenery->obj.pos.y; + tempz = scenery->obj.pos.z; + sp120 = scenery->obj.rot.y; + if ((scenery->obj.id == OBJ_SCENERY_3) || (scenery->obj.id == OBJ_SCENERY_2) || + (scenery->obj.id == OBJ_SCENERY_47) || (scenery->obj.id == OBJ_SCENERY_4) || + (scenery->obj.id == OBJ_SCENERY_5)) { + Matrix_RotateY(gCalcMatrix, -sp120 * M_DTOR, MTXF_NEW); + for (var_fs1 = var_fs0 = -50.0f; var_fs0 > -500.0f; var_fs0 -= 5.0f, var_fs1 -= 5.0f) { spEC.x = player->pos.x - tempx; - spEC.y = 0.0f; - spEC.z = player->trueZpos - tempz; + spEC.y = player->pos.y + var_fs0 - tempy; + spEC.z = player->trueZpos + var_fs1 - tempz; Matrix_MultVec3fNoTranslate(gCalcMatrix, &spEC, &spE0); + if ((player->pos.y + var_fs0) <= gGroundHeight) { + break; + } spD4.x = spE0.x + tempx; spD4.y = spE0.y + tempy; spD4.z = spE0.z + tempz; @@ -2229,129 +2287,73 @@ void Player_FloorCheck(Player* player) { spC8.y = tempy; spC8.z = tempz; - if ((scenery360->obj.id == OBJ_SCENERY_149) || (scenery360->obj.id == OBJ_SCENERY_150)) { - if (scenery360->obj.id == OBJ_SCENERY_149) { - colId = COL1_5; - } else { - colId = COL1_6; - } - if (func_col1_800998FC(&spD4, &spC8, &sp9C, colId, &spB0, spA8) > 0) { - player->groundPos.y = spB0.y; - player->unk_248 = spA8[0]; - player->unk_24C = spA8[1]; - player->groundRotY = DEG_TO_RAD(sp120); - } - } else { - colId = COL2_0; - if (scenery360->obj.id == OBJ_SCENERY_3) { - colId = COL2_3; - } - if (func_col2_800A3690(&spD4, &spC8, colId, &spBC)) { - player->groundPos.y = spBC.y; - player->unk_248 = spBC.x; - player->unk_24C = spBC.z; - player->groundRotY = DEG_TO_RAD(sp120); - } + colId = COL2_0; + + if (scenery->obj.id == OBJ_SCENERY_47) { + colId = COL2_7; + } + if (scenery->obj.id == OBJ_SCENERY_2) { + colId = COL2_2; + } else if (scenery->obj.id == OBJ_SCENERY_3) { + colId = COL2_3; + } else if ((scenery->obj.id == OBJ_SCENERY_4) || (scenery->obj.id == OBJ_SCENERY_5)) { + colId = COL2_1; + } + if (func_col2_800A3690(&spD4, &spC8, colId, &spBC)) { + player->groundPos.y = spBC.y; + player->groundPos.z = player->trueZpos + var_fs1; + player->shadowRotX = spBC.x; + player->shadowRotZ = spBC.z; + player->groundRotY = DEG_TO_RAD(sp120); + break; } } - } - } - for (sp144 = 0, scenery = gScenery; - (sp144 < 50) && (gLevelMode == LEVELMODE_ON_RAILS) && (gCurrentLevel != LEVEL_VENOM_1); - sp144++, scenery++) { - if ((scenery->obj.status == OBJ_ACTIVE) && ((player->trueZpos - 3000.0f) < scenery->obj.pos.z) && - (scenery->obj.id != OBJ_SCENERY_0) && (scenery->obj.id != OBJ_SCENERY_8)) { - tempx = scenery->obj.pos.x; - tempy = scenery->obj.pos.y; - tempz = scenery->obj.pos.z; - sp120 = scenery->obj.rot.y; - if ((scenery->obj.id == OBJ_SCENERY_3) || (scenery->obj.id == OBJ_SCENERY_2) || - (scenery->obj.id == OBJ_SCENERY_47) || (scenery->obj.id == OBJ_SCENERY_4) || - (scenery->obj.id == OBJ_SCENERY_5)) { - Matrix_RotateY(gCalcMatrix, -sp120 * M_DTOR, MTXF_NEW); - for (var_fs1 = var_fs0 = -50.0f; var_fs0 > -500.0f; var_fs0 -= 5.0f, var_fs1 -= 5.0f) { - spEC.x = player->pos.x - tempx; - spEC.y = player->pos.y + var_fs0 - tempy; - spEC.z = player->trueZpos + var_fs1 - tempz; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &spEC, &spE0); - if ((player->pos.y + var_fs0) <= gGroundHeight) { - break; - } - spD4.x = spE0.x + tempx; - spD4.y = spE0.y + tempy; - spD4.z = spE0.z + tempz; - spC8.x = tempx; - spC8.y = tempy; - spC8.z = tempz; - - colId = COL2_0; - - if (scenery->obj.id == OBJ_SCENERY_47) { - colId = COL2_7; - } - if (scenery->obj.id == OBJ_SCENERY_2) { - colId = COL2_2; - } else if (scenery->obj.id == OBJ_SCENERY_3) { - colId = COL2_3; - } else if ((scenery->obj.id == OBJ_SCENERY_4) || (scenery->obj.id == OBJ_SCENERY_5)) { - colId = COL2_1; - } - if (func_col2_800A3690(&spD4, &spC8, colId, &spBC)) { - player->groundPos.y = spBC.y; - player->groundPos.z = player->trueZpos + var_fs1; - player->unk_248 = spBC.x; - player->unk_24C = spBC.z; - player->groundRotY = DEG_TO_RAD(sp120); - break; - } + } else { + hitboxData = scenery->info.hitbox; + count = *hitboxData; + if (count != 0) { + if (scenery->info.action == (ObjectFunc) func_enmy_80066EA8) { + sp120 = 0.0f; } - } else { - hitboxData = scenery->info.hitbox; - count = *hitboxData; - if (count != 0) { - if (scenery->info.action == (ObjectFunc) func_enmy_80066EA8) { - sp120 = 0.0f; + hitboxData++; + for (i = 0; i < count; i++, hitboxData += 6) { + if (*hitboxData >= HITBOX_SHADOW) { + break; } - hitboxData++; - for (i = 0; i < count; i++, hitboxData += 6) { - if (*hitboxData >= HITBOX_SHADOW) { + + if (*hitboxData == HITBOX_ROTATED) { + sp100 = hitboxData[1]; + spFC = hitboxData[2]; + spF8 = hitboxData[3]; + hitboxData += 4; + Matrix_RotateZ(gCalcMatrix, -spF8 * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -sp100 * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -spFC * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -sp120 * M_DTOR, MTXF_APPLY); + } else { + Matrix_RotateY(gCalcMatrix, -sp120 * M_DTOR, MTXF_NEW); + } + hitbox = (Hitbox*) hitboxData; + for (var_fs0 = var_fs1 = -50.0f; var_fs0 > -500.0f; var_fs0 -= 5.0f, var_fs1 -= 5.0f) { + spEC.x = player->pos.x - tempx; + spEC.y = player->pos.y + var_fs0 - tempy; + spEC.z = player->trueZpos + var_fs1 - tempz; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &spEC, &spE0); + tempx2 = spE0.x + tempx; + tempy2 = spE0.y + tempy; + tempz2 = spE0.z + tempz; + if (spEC.y + tempy <= gGroundHeight) { break; } - if (*hitboxData == HITBOX_ROTATED) { - sp100 = hitboxData[1]; - spFC = hitboxData[2]; - spF8 = hitboxData[3]; - hitboxData += 4; - Matrix_RotateZ(gCalcMatrix, -spF8 * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -sp100 * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gCalcMatrix, -spFC * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gCalcMatrix, -sp120 * M_DTOR, MTXF_APPLY); - } else { - Matrix_RotateY(gCalcMatrix, -sp120 * M_DTOR, MTXF_NEW); - } - hitbox = (Hitbox*) hitboxData; - for (var_fs0 = var_fs1 = -50.0f; var_fs0 > -500.0f; var_fs0 -= 5.0f, var_fs1 -= 5.0f) { - spEC.x = player->pos.x - tempx; - spEC.y = player->pos.y + var_fs0 - tempy; - spEC.z = player->trueZpos + var_fs1 - tempz; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &spEC, &spE0); - tempx2 = spE0.x + tempx; - tempy2 = spE0.y + tempy; - tempz2 = spE0.z + tempz; - if (spEC.y + tempy <= gGroundHeight) { - break; - } - - if (Play_CheckSingleHitbox(hitbox, tempx, tempy, tempz, tempx2, tempy2, tempz2)) { - if (gGroundHeight < player->groundPos.y) { - player->groundPos.y = spEC.y + 15.0f + tempy; - player->groundPos.z = spEC.z + 10.0f + tempz; - player->unk_248 = DEG_TO_RAD(sp100); - player->groundRotY = DEG_TO_RAD(sp120); - } - break; + if (Play_CheckSingleHitbox(hitbox, tempx, tempy, tempz, tempx2, tempy2, tempz2)) { + if (gGroundHeight < player->groundPos.y) { + player->groundPos.y = spEC.y + 15.0f + tempy; + player->groundPos.z = spEC.z + 10.0f + tempz; + player->shadowRotX = DEG_TO_RAD(sp100); + player->groundRotY = DEG_TO_RAD(sp120); } + break; } } } @@ -2520,7 +2522,7 @@ void Player_ResetVsData(void) { s32 i; s32 j; - gVsMatchState = 0; + gVsMatchState = VS_STATE_0; for (i = 0; i < 4; i++) { gVsPoints[i] = 0; for (j = 0; j < 10; j++) { @@ -2529,7 +2531,7 @@ void Player_ResetVsData(void) { gLaserStrength[i] = LASERS_SINGLE; gBombCount[i] = 0; } - gVsMatchStart = gVsMatchOver = 0; + gVsMatchStart = gVsMatchOver = false; } void Player_InitVersus(void) { @@ -2559,7 +2561,7 @@ void Play_Init(void) { } else { gEnemyShotSpeed = 100; } - gPauseEnabled = 0; + gPauseEnabled = false; gVIsPerFrame = 2; D_ctx_80177C70 = 0; gTeamHelpActor = NULL; @@ -2591,7 +2593,7 @@ void Play_Init(void) { if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gLevelPhase == 1)) { gLevelMode = LEVELMODE_ALL_RANGE; } - gVsMatchStart = 0; + gVsMatchStart = false; Play_InitEnvironment(); gDropHitCountItem = gTeamLowHealthMsgTimer = gStartAndrossFightTimer = gSoShieldsEmpty = gAllRangeEventTimer = gAllRangeFrameCount = gBossActive = gGameFrameCount = gCameraShake = gDynaFloorTimer = gBossFrameCount = @@ -3185,24 +3187,24 @@ void Player_ArwingBank(Player* player) { Math_SmoothStepToF(&player->zRotBank, sp3C, sp38, 10.0f, 0.f); if (gInputPress->button & Z_TRIG) { player->sfx.bank = 1; - if (player->barrelInputTimerL != 0) { - player->barrelRoll = 1; - player->timer_1E8 = 10; + if (player->rollInputTimerL != 0) { + player->rollState = 1; + player->rollTimer = 10; player->rollRate = player->baseRollRate = 30; player->sfx.roll = 1; } else { - player->barrelInputTimerL = 10; + player->rollInputTimerL = 10; } } if (gInputPress->button & R_TRIG) { player->sfx.bank = 1; - if (player->barrelInputTimerR != 0) { - player->barrelRoll = 1; - player->timer_1E8 = 10; + if (player->rollInputTimerR != 0) { + player->rollState = 1; + player->rollTimer = 10; player->rollRate = player->baseRollRate = -30; player->sfx.roll = 1; } else { - player->barrelInputTimerR = 10; + player->rollInputTimerR = 10; } } } @@ -3211,21 +3213,21 @@ void Player_UseTankJets(Player* player) { Math_SmoothStepToF(&player->unk_170, 0.0f, 1.0f, 0.2f, 0.0f); Math_SmoothStepToF(&player->unk_16C, 0.0f, 1.0f, 0.2f, 0.0f); if (gInputPress->button & Z_TRIG) { - if ((player->barrelInputTimerL != 0) && (player->zRotBank > 0.0f) && (player->boostMeter < 10.0f)) { - player->barrelRoll = 1; - player->timer_1E8 = 15; + if ((player->rollInputTimerL != 0) && (player->zRotBank > 0.0f) && (player->boostMeter < 10.0f)) { + player->rollState = 1; + player->rollTimer = 15; player->rollRate = player->baseRollRate = 20; } else { - player->barrelInputTimerL = 10; + player->rollInputTimerL = 10; } } if (gInputPress->button & R_TRIG) { - if ((player->barrelInputTimerR != 0) && (player->zRotBank < 0.0f) && (player->boostMeter < 10.0f)) { - player->barrelRoll = 1; - player->timer_1E8 = 15; + if ((player->rollInputTimerR != 0) && (player->zRotBank < 0.0f) && (player->boostMeter < 10.0f)) { + player->rollState = 1; + player->rollTimer = 15; player->rollRate = player->baseRollRate = -20; } else { - player->barrelInputTimerR = 10; + player->rollInputTimerR = 10; } } player->unk_18C = fabsf(SIN_DEG(player->zRotBank) * 25.0f); @@ -3614,7 +3616,7 @@ void Player_MoveArwingOnRails(Player* player) { sp84 = 0.2f; gPlayerTurnRate *= 2.0f; } - if (player->barrelRoll != 0) { + if (player->rollState != 0) { sp84 = 0.2f; gPlayerTurnRate = 6.8999996f; // 690.0f * 0.01f } @@ -3783,7 +3785,7 @@ void Player_MoveTank360(Player* player) { var_fa0 = 0.1f; var_fa1 = 4.0f; } - if (player->barrelRoll != 0) { + if (player->rollState != 0) { if ((player->rollRate > 0) && (sp5C < 0.0f)) { var_fa0 = 0.2f; var_fa1 = 20.0f; @@ -3816,7 +3818,7 @@ void Player_MoveTank360(Player* player) { if (!(player->unk_170 > 0.2f) && !(player->unk_16C > 0.2f) && player->grounded) { Math_SmoothStepToF(&player->unk_184, 0.0f, 1.0f, 0.75f, 0.0f); } - if (player->barrelRoll != 0) { + if (player->rollState != 0) { if (player->rollRate < 0) { player->unk_184 = 15.0f; } @@ -4131,7 +4133,7 @@ void Player_Setup(Player* playerx) { player->cam.at.z = player->cam.eye.z - 1000.0f; D_ctx_80177950 = 1.0f; if ((gLevelType == LEVELTYPE_SPACE) && (gCurrentLevel != LEVEL_BOLSE)) { - player->unk_240 = 1; + player->hideShadow = true; player->unk_0A8 = 3000.0f; player->pathWidth = 700.0f; player->pathHeight = 612.0f; @@ -4275,19 +4277,19 @@ void Player_Setup(Player* playerx) { Camera_Update360(player, 1); } player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; - player->unk_204 = gLevelType; + player->wingPosition = gLevelType; if ((gLevelMode == LEVELMODE_ALL_RANGE) && !gVersusMode) { player->pos.z = 8000.0f; player->pos.y = 670.0f; player->pathHeight = 730.0f; - player->unk_204 = 2; + player->wingPosition = 2; if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gLevelPhase == 1)) { player->pos.x = -7910.0f; player->pos.y = 300.0f; player->pos.z = -11808.0f; player->yRot_114 = 188.0f; - player->unk_240 = 1; + player->hideShadow = true; } Camera_UpdateArwing360(player, 1); } else { @@ -4305,12 +4307,12 @@ void Player_Setup(Player* playerx) { switch (gCurrentLevel) { case LEVEL_CORNERIA: player->state_1C8 = PLAYERSTATE_1C8_LEVEL_INTRO; - player->unk_204 = 1; + player->wingPosition = 1; gGroundSurface = gSavedGroundSurface = SURFACE_WATER; Play_dummy_MuteSfx(); break; case LEVEL_BOLSE: - player->unk_204 = 1; + player->wingPosition = 1; D_BO_801A03DC = 6; /* fallthrough */ case LEVEL_SECTOR_X: @@ -4354,7 +4356,7 @@ void Player_Setup(Player* playerx) { } } if (player->state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) { - player->unk_234 = 1; + player->draw = true; switch (gCurrentLevel) { case LEVEL_CORNERIA: AUDIO_PLAY_BGM(NA_BGM_START_DEMO); @@ -4398,14 +4400,14 @@ void Player_Setup(Player* playerx) { gLevelClearScreenTimer = gBossHealthBar = D_ctx_80177850 = 0; if ((gCurrentLevel == LEVEL_TRAINING)) { - D_ctx_80177824 = 1; + gClearPlayerInfo = true; } - if (D_ctx_80177824 && !gVersusMode) { + if (gClearPlayerInfo && !gVersusMode) { for (j = TEAM_ID_FALCO; j < TEAM_ID_MAX; j++) { gTeamShields[j] = gSavedTeamShields[j] = gPrevPlanetTeamShields[j] = gPrevPlanetSavedTeamShields[j] = 255; } for (j = 0; j < 6; j++) { - gStarWolfTeamAlive[j] = gSavedStarWolfTeamAlive[j] = 1; + gStarWolfTeamAlive[j] = gSavedStarWolfTeamAlive[j] = true; } gLaserStrength[gPlayerNum] = LASERS_SINGLE; gGoldRingCount[0] = gSavedGoldRingCount[0] = gTotalHits = 0; @@ -4418,11 +4420,11 @@ void Player_Setup(Player* playerx) { D_hud_80161720[2] = 0.0f; gDisplayedHitCount = 0; gHitCount = 0; - D_ctx_80177824 = 0; + gClearPlayerInfo = false; } } if ((gCurrentLevel == LEVEL_TRAINING)) { - D_ctx_80177824 = 1; + gClearPlayerInfo = true; } player->sfx.levelType = gLevelType; player->sfx.form = player->form; @@ -4432,7 +4434,7 @@ void Player_Setup(Player* playerx) { Audio_StartPlayerNoise(gPlayerNum); } if ((player->form == FORM_ARWING) && !gVersusMode) { - switch (player->unk_204) { + switch (player->wingPosition) { case 0: Animation_GetFrameData(&D_arwing_3015AF4, 0, player->jointTable); break; @@ -4447,7 +4449,7 @@ void Player_Setup(Player* playerx) { if (gLaserStrength[gPlayerNum] > LASERS_SINGLE) { player->wings.unk_14 = -10.0f; } - gPauseEnabled = 0; + gPauseEnabled = false; } void Player_UpdateArwingRoll(Player* player) { @@ -4473,14 +4475,14 @@ void Player_UpdateArwingRoll(Player* player) { } } if (player->meteoWarpTimer == 0) { - if (player->barrelRoll == 0) { + if (player->rollState == 0) { Math_SmoothStepToF(&player->zRotBarrelRoll, 0.0f, 0.1f, 10.0f, 0.00001f); } - if (player->barrelInputTimerL != 0) { - player->barrelInputTimerL--; + if (player->rollInputTimerL != 0) { + player->rollInputTimerL--; } - if (player->barrelInputTimerR != 0) { - player->barrelInputTimerR--; + if (player->rollInputTimerR != 0) { + player->rollInputTimerR--; } if (player->timer_214 != 0) { player->timer_214--; @@ -4488,15 +4490,15 @@ void Player_UpdateArwingRoll(Player* player) { if (player->timer_218 != 0) { player->timer_218--; } - if (player->timer_1E8 != 0) { - player->timer_1E8--; + if (player->rollTimer != 0) { + player->rollTimer--; } - if (player->barrelRoll != 0) { - player->barrelInputTimerR = 0; - player->barrelInputTimerL = 0; + if (player->rollState != 0) { + player->rollInputTimerR = 0; + player->rollInputTimerL = 0; player->unk_150 = 1.5f; player->zRotBarrelRoll += player->rollRate; - if (player->timer_1E8 == 0) { + if (player->rollTimer == 0) { if (player->rollRate > 0) { player->rollRate -= 5; } @@ -4504,7 +4506,7 @@ void Player_UpdateArwingRoll(Player* player) { player->rollRate += 5; } if (player->rollRate == 0) { - player->barrelRoll = 0; + player->rollState = 0; } } else if (player->barrelRollAlpha < 180) { player->barrelRollAlpha += 100; @@ -4529,7 +4531,7 @@ void Player_UpdateTankRoll(Player* player) { s32 var_v0; player->zRotBarrelRoll = Math_ModF(player->zRotBarrelRoll, 360.0f); - if (player->barrelRoll == 0) { + if (player->rollState == 0) { temp_fv0 = player->zRotBarrelRoll; if (player->zRotBarrelRoll > 0.0f) { player->zRotBarrelRoll -= (player->zRotBarrelRoll * 0.1f); @@ -4544,19 +4546,19 @@ void Player_UpdateTankRoll(Player* player) { } } } - temp_v0 = player->barrelInputTimerL; - if (player->barrelInputTimerL != 0) { - player->barrelInputTimerL--; + temp_v0 = player->rollInputTimerL; + if (player->rollInputTimerL != 0) { + player->rollInputTimerL--; } - if (player->barrelInputTimerR != 0) { - player->barrelInputTimerR--; + if (player->rollInputTimerR != 0) { + player->rollInputTimerR--; } - if (player->timer_1E8 != 0) { - player->timer_1E8--; + if (player->rollTimer != 0) { + player->rollTimer--; } - if (player->barrelRoll != 0) { - player->barrelInputTimerR = 0; - player->barrelInputTimerL = 0; + if (player->rollState != 0) { + player->rollInputTimerR = 0; + player->rollInputTimerL = 0; player->zRotBarrelRoll += player->rollRate; if (player->zRotBank > 0.0f) { player->zRotBank -= 8.0f; @@ -4570,7 +4572,7 @@ void Player_UpdateTankRoll(Player* player) { player->zRotBank = 0.0f; } } - if (player->timer_1E8 == 0) { + if (player->rollTimer == 0) { if (player->rollRate > 0) { player->rollRate -= 2; } @@ -4578,12 +4580,12 @@ void Player_UpdateTankRoll(Player* player) { player->rollRate += 2; } if (player->rollRate == 0) { - player->barrelRoll = 0; + player->rollState = 0; } } else { Math_SmoothStepToF(&D_ctx_801779A8[player->num], 30.0f, 1.0f, 30.0f, 0.0f); } - if ((player->timer_1E8 >= 5) && (player->timer_498 == 0)) { + if ((player->rollTimer >= 5) && (player->mercyTimer == 0)) { if (player->rollRate > 0) { player->unk_170 = 1.3f; } @@ -4927,7 +4929,7 @@ void Player_UpdateTankJets(Player* player) { func_effect_8007BC7C(RAND_FLOAT_CENTERED(20.0f) + player->pos.x, player->groundPos.y + 10.0f, player->trueZpos - 10.0f, RAND_FLOAT(2.0f) + 4.0f); } - } else if ((gCamCount == 1) && ((gGameFrameCount % 4) == 0) && (player->barrelRoll == 0)) { + } else if ((gCamCount == 1) && ((gGameFrameCount % 4) == 0) && (player->rollState == 0)) { if ((player->unk_16C > 0.2f) && (player->radioDamageTimer == 0)) { func_effect_8007BC7C(RAND_FLOAT_CENTERED(10.0f) + (player->pos.x - 57.0f), player->groundPos.y + 10.0f, player->trueZpos - 10.0f, RAND_FLOAT(2.0f) + 3.0f); @@ -4959,11 +4961,11 @@ void Player_UpdateEffects(Player* player) { if (player->radioDamageTimer != 0) { player->radioDamageTimer--; } - if (player->timer_498 != 0) { - player->timer_498--; + if (player->mercyTimer != 0) { + player->mercyTimer--; } - if (player->timer_224 != 0) { - player->timer_224--; + if (player->dmgEffectTimer != 0) { + player->dmgEffectTimer--; } if (gVersusMode) { for (i = 0; i < gCamCount; i++) { @@ -5000,11 +5002,11 @@ void Player_UpdateEffects(Player* player) { if ((player->form == FORM_LANDMASTER) && (player->unk_1A0 != 0)) { player->unk_1A0--; } - player->unk_200 = player->timer_224 & 1; - if (player->timer_224 != 0) { + player->dmgEffect = player->dmgEffectTimer & 1; + if (player->dmgEffectTimer != 0) { gFillScreenAlphaStep = 8; } - if (player->timer_224 == 19) { + if (player->dmgEffectTimer == 19) { gFillScreenAlpha = 128; gFillScreenRed = 255; gFillScreenGreen = gFillScreenBlue = 0; @@ -5025,19 +5027,20 @@ void Player_UpdateEffects(Player* player) { } player->hitTimer--; if (player->form == FORM_ARWING) { - player->damageShake = (SIN_DEG(player->hitTimer * 400.0f) * player->hitTimer) * D_800D3164[player->unk_21C]; + player->damageShake = + SIN_DEG(player->hitTimer * 400.0f) * player->hitTimer * D_800D3164[player->hitDirection]; if (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) { player->xShake = - (SIN_DEG(player->hitTimer * 400.0f) * player->hitTimer) * D_800D3164[player->unk_21C] * 0.8f; + SIN_DEG(player->hitTimer * 400.0f) * player->hitTimer * D_800D3164[player->hitDirection] * 0.8f; } } else { player->damageShake = - (SIN_DEG(player->hitTimer * 400.0f) * player->hitTimer) * D_800D3164[player->unk_21C] * 1.5f; + SIN_DEG(player->hitTimer * 400.0f) * player->hitTimer * D_800D3164[player->hitDirection] * 1.5f; player->xShake = 0.0f; } if ((gLevelMode != LEVELMODE_UNK_2) && ((player->knockback.x != 0.f) || (player->knockback.y != 0.f) || (player->knockback.z != 0.f)) && - ((player->unk_1A4 >= 40) || (player->unk_1A4 == 21))) { + ((player->dmgType >= 40) || (player->dmgType == 21))) { player->boostCooldown = true; player->rot.x = 0; player->rot.y = 0; @@ -5336,7 +5339,7 @@ void Player_Update(Player* player) { } player->flags_228 = 0; if ((player->state_1C8 > PLAYERSTATE_1C8_INIT) && (player->form == FORM_ARWING) && !gVersusMode) { - switch (player->unk_204) { + switch (player->wingPosition) { case 0: sp1C4 = Animation_GetFrameData(&D_arwing_3015AF4, 0, sp58); break; @@ -5356,18 +5359,18 @@ void Player_Update(Player* player) { } switch (player->state_1C8) { case PLAYERSTATE_1C8_STANDBY: - player->unk_234 = 0; + player->draw = false; gShowHud = 0; - gPauseEnabled = 0; + gPauseEnabled = false; break; case PLAYERSTATE_1C8_INIT: Player_Setup(player); gFillScreenAlphaTarget = 0; - gPauseEnabled = 0; + gPauseEnabled = false; break; case PLAYERSTATE_1C8_LEVEL_INTRO: gShowHud = 0; - gPauseEnabled = 0; + gPauseEnabled = false; player->wings.modelId = 1; Cutscene_LevelStart(player); break; @@ -5376,7 +5379,7 @@ void Player_Update(Player* player) { Player_LowHealthMsg(player); player->wings.modelId = 0; D_hud_80161704 = 255; - if ((!gVersusMode || (gVsMatchStart != 0)) && !player->somersault && (gInputPress->button & U_CBUTTONS) && + if ((!gVersusMode || gVsMatchStart) && !player->somersault && (gInputPress->button & U_CBUTTONS) && ((player->form == FORM_ARWING) || (gVersusMode && (player->form == FORM_LANDMASTER)))) { if (player->alternateView = 1 - player->alternateView) { AUDIO_PLAY_SFX(NA_SE_VIEW_MOVE_IN, gDefaultSfxSource, 4); @@ -5392,13 +5395,13 @@ void Player_Update(Player* player) { case LEVELMODE_ON_RAILS: gLoadLevelObjects = true; Player_UpdateOnRails(player); - player->unk_234 = 1; + player->draw = true; break; case LEVELMODE_ALL_RANGE: if (!gVersusMode) { Player_Update360(player); - player->unk_234 = 1; - } else if (gVsMatchStart != 0) { + player->draw = true; + } else if (gVsMatchStart) { if (gPlayerInactive[player->num] == true) { do { sp1C4 = RAND_INT(3.9f); @@ -5416,12 +5419,12 @@ void Player_Update(Player* player) { } } Player_Update360(player); - player->unk_234 = 1; + player->draw = true; } } else { gInputPress->stick_x = gInputPress->stick_y = 0; gVsItemSpawnTimer = 0; - gPauseEnabled = 0; + gPauseEnabled = false; } break; case LEVELMODE_UNK_2: @@ -5462,20 +5465,20 @@ void Player_Update(Player* player) { gShowHud = gChargeTimers[player->num] = 0; break; case PLAYERSTATE_1C8_ENTER_WARP_ZONE: - gPauseEnabled = 0; + gPauseEnabled = false; Player_UpdateShields(player); Cutscene_EnterWarpZone(player); gShowHud = 0; break; case PLAYERSTATE_1C8_START_360: - gPauseEnabled = 0; + gPauseEnabled = false; Player_UpdateShields(player); Cutscene_AllRangeMode(player); Player_UpdateArwingRoll(player); gChargeTimers[player->num] = player->alternateView = gShowHud = 0; break; case PLAYERSTATE_1C8_GFOX_REPAIR: - gPauseEnabled = 0; + gPauseEnabled = false; AllRange_GreatFoxRepair(player); gShowHud = 0; break; @@ -5486,10 +5489,10 @@ void Player_Update(Player* player) { case PLAYERSTATE_1C8_12: break; case PLAYERSTATE_1C8_VS_STANDBY: - player->unk_234 = 0; + player->draw = false; if (gPlayerInactive[player->num] == true) { Camera_FollowPlayer(player, player->attacker - 1, 0); - } else if ((gVsMatchOver == 0) && (player->csState != 0)) { + } else if (!gVsMatchOver && (player->csState != 0)) { player->csState = 0; Player_Initialize(player); Player_Setup(player); @@ -5507,9 +5510,9 @@ void Player_Update(Player* player) { case PLAYERSTATE_1C8_NEXT: gShowHud = 0; if (!gVersusMode) { - gPauseEnabled = 0; + gPauseEnabled = false; } - player->unk_234 = 0; + player->draw = false; player->vel.z = player->vel.x = player->vel.y = player->knockback.x = player->knockback.y = 0.0f; if ((gLevelMode == LEVELMODE_ALL_RANGE) && (gFadeoutType == 7)) { @@ -6178,7 +6181,7 @@ void Play_UpdateLevel(void) { if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) && (gLevelPhase == 2)) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].csState = 0; - gPlayer[0].unk_234 = 1; + gPlayer[0].draw = true; gPlayer[0].pos.z = 15000.0f; Camera_Update360(gPlayer, 1); gFillScreenAlpha = 255; @@ -6505,13 +6508,12 @@ void Play_Main(void) { } } } - if ((D_ctx_80177868 == 4) && (gControllerPress[gMainController].button & START_BUTTON) && - (gPauseEnabled != 0)) { + if ((D_ctx_80177868 == 4) && (gControllerPress[gMainController].button & START_BUTTON) && gPauseEnabled) { Audio_PlayPauseSfx(0); gPlayState = PLAY_UPDATE; gDrawMode = DRAW_PLAY; } - gPauseEnabled = 1; + gPauseEnabled = true; break; } } diff --git a/src/engine/fox_tank.c b/src/engine/fox_tank.c index 3310efc8..53f247fa 100644 --- a/src/engine/fox_tank.c +++ b/src/engine/fox_tank.c @@ -165,7 +165,7 @@ void func_tank_80043B18(Player* player) { sp48.y = 0.0f; sp48.z = -20.0f; sp38 = player->yRot_114; - if (player->barrelRoll != 0) { + if (player->rollState != 0) { sp48.x = 0.0f; sp48.z = RAND_FLOAT_CENTERED(50.0f) + -20.0f; @@ -422,7 +422,7 @@ void func_tank_80044868(Player* player) { if (!(player->unk_170 > 0.2f) && !(player->unk_16C > 0.2f) && player->grounded) { Math_SmoothStepToF(&player->unk_184, 0.0f, 1.0f, 0.75f, 0.0f); } - if (player->barrelRoll != 0) { + if (player->rollState != 0) { if (player->rollRate < 0) { player->unk_184 = 15.0f; } @@ -480,7 +480,7 @@ void func_tank_80044868(Player* player) { if (player->baseSpeed != 0.0f) { func_tank_80043B18(player); } - if (player->barrelRoll != 0.0f) { + if (player->rollState != 0.0f) { func_tank_80043B18(player); } } @@ -508,28 +508,28 @@ void func_tank_80045130(Player* player) { Math_SmoothStepToF(&player->unk_16C, 0.0f, 1.0f, 0.2f, 0.0f); if (gInputPress->button & Z_TRIG) { player->sfx.bank = 1; - if ((player->barrelInputTimerL != 0) && (player->zRotBank > 0.0f) && (player->boostMeter < 10.0f)) { - player->barrelRoll = 1; - player->timer_1E8 = 15; + if ((player->rollInputTimerL != 0) && (player->zRotBank > 0.0f) && (player->boostMeter < 10.0f)) { + player->rollState = 1; + player->rollTimer = 15; player->baseRollRate = 20; player->rollRate = 20; player->sfx.roll = 1; AUDIO_PLAY_SFX(NA_SE_TANK_SLIDE, player->sfxSource, 0); } else { - player->barrelInputTimerL = 10; + player->rollInputTimerL = 10; } } if (gInputPress->button & R_TRIG) { player->sfx.bank = 1; - if ((player->barrelInputTimerR != 0) && (player->zRotBank < 0.0f) && (player->boostMeter < 10.0f)) { - player->barrelRoll = 1; - player->timer_1E8 = 15; + if ((player->rollInputTimerR != 0) && (player->zRotBank < 0.0f) && (player->boostMeter < 10.0f)) { + player->rollState = 1; + player->rollTimer = 15; player->baseRollRate = -20; player->rollRate = -20; player->sfx.roll = 1; AUDIO_PLAY_SFX(NA_SE_TANK_SLIDE, player->sfxSource, 0); } else { - player->barrelInputTimerR = 10; + player->rollInputTimerR = 10; } } player->unk_18C = fabsf(SIN_DEG(player->zRotBank) * 25.0f); @@ -678,7 +678,7 @@ void func_tank_80045678(Player* player) { } } else { D_800C9F3C = 0; - if ((gCamCount == 1) && ((gGameFrameCount % 4) == 0) && (player->barrelRoll == 0)) { + if ((gCamCount == 1) && ((gGameFrameCount % 4) == 0) && (player->rollState == 0)) { if ((player->unk_16C > 0.2f) && (player->radioDamageTimer == 0)) { func_effect_8007A900(RAND_FLOAT_CENTERED(10.0f) + (player->pos.x - 57.0f), player->groundPos.y + 10.0f, player->trueZpos - 10.0f, RAND_FLOAT(1.0f) + 1.5f, 255, 15, 0); @@ -693,7 +693,7 @@ void func_tank_80045678(Player* player) { void func_tank_80045E7C(Player* player) { player->zRotBarrelRoll = Math_ModF(player->zRotBarrelRoll, 360.0f); - if (player->barrelRoll == 0) { + if (player->rollState == 0) { if (player->zRotBarrelRoll > 0.0f) { player->zRotBarrelRoll -= player->zRotBarrelRoll * 0.1f; if (player->zRotBarrelRoll < 0.1f) { @@ -707,18 +707,18 @@ void func_tank_80045E7C(Player* player) { } } } - if (player->barrelInputTimerL != 0) { - player->barrelInputTimerL--; + if (player->rollInputTimerL != 0) { + player->rollInputTimerL--; } - if (player->barrelInputTimerR != 0) { - player->barrelInputTimerR--; + if (player->rollInputTimerR != 0) { + player->rollInputTimerR--; } - if (player->timer_1E8 != 0) { - player->timer_1E8--; + if (player->rollTimer != 0) { + player->rollTimer--; } - if (player->barrelRoll != 0) { - player->barrelInputTimerR = 0; - player->barrelInputTimerL = 0; + if (player->rollState != 0) { + player->rollInputTimerR = 0; + player->rollInputTimerL = 0; player->zRotBarrelRoll += player->rollRate; if (player->zRotBank > 0.0f) { player->zRotBank -= 8.0f; @@ -732,7 +732,7 @@ void func_tank_80045E7C(Player* player) { player->zRotBank = 0.0f; } } - if (player->timer_1E8 == 0) { + if (player->rollTimer == 0) { D_ctx_801779A8[player->num] = 25.0f; if (player->rollRate > 0) { player->rollRate -= 2; @@ -741,11 +741,11 @@ void func_tank_80045E7C(Player* player) { player->rollRate += 2; } if (player->rollRate == 0) { - player->barrelRoll = 0; + player->rollState = 0; Audio_KillSfxBySourceAndId(player->sfxSource, NA_SE_TANK_SLIDE); } } - if ((player->timer_1E8 >= 5) && (player->hitTimer == 0) && (player->barrelRoll != 9)) { + if ((player->rollTimer >= 5) && (player->hitTimer == 0) && (player->rollState != 9)) { if (player->rollRate > 0) { player->unk_170 = 1.3f; } @@ -809,13 +809,13 @@ void func_tank_80046358(Player* player) { player->groundPos.x = player->pos.x; player->groundPos.z = player->trueZpos + -20.0f; player->groundPos.y = gGroundHeight + 3.0f; - player->unk_248 = 0.0f; - player->unk_24C = 0.0f; + player->shadowRotX = 0.0f; + player->shadowRotZ = 0.0f; player->groundRotY = 0.0f; Ground_801B6E20(player->groundPos.x, player->groundPos.z + player->zPath, &spD4, &spD0, &spCC); player->groundPos.y = spD0 + 2.0f; - player->unk_248 = spD4; - player->unk_24C = spCC; + player->shadowRotX = spD4; + player->shadowRotZ = spCC; } void func_tank_8004641C(Player* player, s32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7) { @@ -845,7 +845,7 @@ void func_tank_8004641C(Player* player, s32 arg1, f32 arg2, f32 arg3, f32 arg4, if (D_MA_801BE250[27] < arg3 + sp58.y) { D_MA_801BE250[27] = arg3 + sp58.y; if (arg1 == OBJ_SCENERY_67) { - player->barrelRoll = 0; + player->rollState = 0; D_800C9F04 = 1; } } @@ -853,8 +853,8 @@ void func_tank_8004641C(Player* player, s32 arg1, f32 arg2, f32 arg3, f32 arg4, D_MA_801BE250[29] = sp58.z; } else if ((arg1 == OBJ_SCENERY_67) && (D_MA_801BE250[27] == 0.0f) && Play_CheckPolyCollision(arg1, arg2 + 20.0f, arg3, arg4, sp84, sp80, sp7C, &sp58, &sp4C)) { - player->barrelRoll = 9; - player->timer_1E8 = 15; + player->rollState = 9; + player->rollTimer = 15; if ((arg6 > 90.0f) && (arg6 < 270.0f)) { player->rollRate = player->baseRollRate = 20; } else { @@ -866,8 +866,8 @@ void func_tank_8004641C(Player* player, s32 arg1, f32 arg2, f32 arg3, f32 arg4, D_800C9F10 = arg3 + sp58.y; player->groundPos.x = player->pos.x; player->groundPos.y = D_800C9F10 - 2.0f; - player->unk_248 = sp58.x; - player->unk_24C = sp58.z; + player->shadowRotX = sp58.x; + player->shadowRotZ = sp58.z; } } @@ -956,8 +956,8 @@ void func_tank_80046704(Player* player) { if (!(((player->pos.x - 210.0f) <= scenery->obj.pos.x) && (scenery->obj.pos.x <= (player->pos.x + 210.0f))) && (D_MA_801BE250[27] == 0.f) && (player->vel.y < 0.f)) { - player->barrelRoll = 9; - player->timer_1E8 = 15; + player->rollState = 9; + player->rollTimer = 15; if ((player->pos.x - 200.0f) <= scenery->obj.pos.x) { player->rollRate = player->baseRollRate = 20; } else { @@ -966,7 +966,7 @@ void func_tank_80046704(Player* player) { } else { D_800C9F04 = 1; D_MA_801BE250[27] = scenery->obj.pos.y + 206.0f; - player->barrelRoll = 0; + player->rollState = 0; } } if (((player->pos.x - 220.0f) <= scenery->obj.pos.x) && @@ -1106,7 +1106,7 @@ s32 func_tank_80046E40(Player* player, f32* hitboxData, s32* index, f32 xPos, f3 void Tank_UpdateOnRails(Player* player) { s32 pad; - player->unk_204 = 1; + player->wingPosition = 1; func_tank_80045130(player); D_800C9F14 = 0; func_tank_80045678(player); @@ -1150,8 +1150,8 @@ void Tank_UpdateOnRails(Player* player) { player->groundPos.x = player->pos.x; player->groundPos.z = player->trueZpos + -10.0f; player->groundPos.y = gGroundHeight - 4.0f; - player->unk_248 = 0.0f; - player->unk_24C = 0.0f; + player->shadowRotX = 0.0f; + player->shadowRotZ = 0.0f; player->groundRotY = 0.0f; func_tank_800481F4(player); } @@ -1271,9 +1271,9 @@ void func_tank_80047E7C(Player* player, f32 arg1, f32 arg2) { Math_SmoothStepToF(&player->zRotBank, 30.0f, 0.5f, 20.0f, 0); } else { Math_SmoothStepToF(&player->pos.y, arg2, 0.5f, 30.0f, 0); - if (player->barrelRoll == 0) { - player->barrelRoll = 9; - player->timer_1E8 = 15; + if (player->rollState == 0) { + player->rollState = 9; + player->rollTimer = 15; player->rollRate = player->baseRollRate = -20; } } @@ -1282,9 +1282,9 @@ void func_tank_80047E7C(Player* player, f32 arg1, f32 arg2) { Math_SmoothStepToF(&player->zRotBank, -30.0f, 0.5f, 20.0f, 0); } else { Math_SmoothStepToF(&player->pos.y, arg2, 0.5f, 30.0f, 0); - if (player->barrelRoll == 0) { - player->barrelRoll = 9; - player->timer_1E8 = 15; + if (player->rollState == 0) { + player->rollState = 9; + player->rollTimer = 15; player->rollRate = player->baseRollRate = 20; } } @@ -1340,7 +1340,7 @@ void func_tank_800481F4(Player* player) { Player_UpdateHitbox(player); func_tank_800444BC(player); - if (player->timer_498 == 0) { + if (player->mercyTimer == 0) { for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) { if ((scenery->obj.status == OBJ_ACTIVE) && (scenery->obj.id != OBJ_SCENERY_58) && (scenery->obj.id != OBJ_SCENERY_105) && (scenery->obj.id != OBJ_SCENERY_59) && @@ -1411,13 +1411,13 @@ void func_tank_800481F4(Player* player) { 0.0f, 0.0f) != 0) { if (player->pos.x < actor->obj.pos.x) { player->knockback.x = (actor->vel.z > 5.0f) ? -5.0f : -1.5f; - player->barrelRoll = 8; - player->timer_1E8 = 15; + player->rollState = 8; + player->rollTimer = 15; player->rollRate = player->baseRollRate = 20; } else { player->knockback.x = (actor->vel.z > 5.0f) ? 5.0f : 1.5f; - player->barrelRoll = 8; - player->timer_1E8 = 15; + player->rollState = 8; + player->rollTimer = 15; player->rollRate = player->baseRollRate = -20; } Math_SmoothStepToF(&player->baseSpeed, 15.0f, 0.3f, 3.5f, 0.001f); @@ -1427,7 +1427,7 @@ void func_tank_800481F4(Player* player) { player->pos.x = player->basePos.x; actor->dmgType = DMG_COLLISION; Player_ApplyDamage(player, 0, 5); - player->timer_498 = 1; + player->mercyTimer = 1; } } else if ((OBJ_ACTOR_205 <= actor->obj.id) && (actor->obj.id <= OBJ_ACTOR_213)) { if (func_tank_80046E40(player, actor->info.hitbox, &sp98, actor->fwork[25] + actor->obj.pos.x, @@ -1438,13 +1438,13 @@ void func_tank_800481F4(Player* player) { Math_SmoothStepToF(&player->camDist, 0, 0.3f, 3.5f, 0.001f); if (player->pos.x < (actor->fwork[23] + actor->obj.pos.x)) { player->knockback.x = (actor->vel.z > 5.0f) ? -5.0f : -1.5f; - player->barrelRoll = 8; - player->timer_1E8 = 15; + player->rollState = 8; + player->rollTimer = 15; player->rollRate = player->baseRollRate = 20; } else { player->knockback.x = (actor->vel.z > 5.0f) ? 5.0f : 1.5f; - player->barrelRoll = 8; - player->timer_1E8 = 15; + player->rollState = 8; + player->rollTimer = 15; player->rollRate = player->baseRollRate = -20; } player->vel.x = 0.0f; @@ -1489,7 +1489,7 @@ void func_tank_800481F4(Player* player) { (sprite->obj.id == OBJ_SPRITE_CO_TREE)) { sprite->destroy = 1; player->hitTimer = 6; - player->unk_21C = 0; + player->hitDirection = 0; } else if (sprite->obj.id == OBJ_SPRITE_TI_CACTUS) { sprite->destroy = 1; } else { diff --git a/src/engine/fox_versus.c b/src/engine/fox_versus.c index 10892059..015853d1 100644 --- a/src/engine/fox_versus.c +++ b/src/engine/fox_versus.c @@ -5,24 +5,27 @@ #include "assets/ast_text.h" #include "assets/ast_versus.h" +#define VS_TIE 99 + s32 D_versus_80178750; s32 gVsMatchState; s32 D_versus_80178758; s32 sUnlockLandmaster; s32 sUnlockOnFoot; -s32 D_versus_80178768[4]; -s32 D_80178778; -s32 D_80178780[4]; -s32 D_80178790; -s32 D_80178794; +s32 gVsCountdown[3]; +s32 PAD_80178774; +s32 sVsDrawMode; +s32 sPlayerFormOption[4]; +s32 sStartCountdown; +s32 sStartTimer; s32 D_80178798; s32 D_8017879C; s32 D_801787A0; -s32 D_801787A4; -s32 gVsWinner; +s32 sVsMatchMenuOption; +s32 sVsWinner; f32 D_801787AC; f32 D_801787B0; -s32 D_801787B4; +s32 sVsPlayerCount; s32 D_801787B8; s32 D_801787BC; f32 D_801787C0; @@ -32,23 +35,23 @@ f32 D_801787CC; f32 D_801787D0; f32 D_801787D8[4]; f32 D_801787E8[4]; -s32 D_801787F8[4]; -u16 D_80178808[4]; +s32 sPlayerRespawnTimer[4]; +u16 sVsDisplayedScores[4]; s32 D_80178810[4]; -s32 D_80178820[4]; +s32 sPlayerDownFrames[4]; s32 D_80178830; s32 D_80178838[5]; s32 D_80178850[4]; -OSTime D_80178860; -OSTime D_80178868; +OSTime sDrawTime; +OSTime sPrevDrawTime; s32 D_800D4A90 = 0; s32 D_800D4A94 = 0; s32 D_800D4A98 = 0; -s32 sStartVsHurryBgm = 0; -s32 sVsHurryBgmPlaying = 0; +bool sStartVsHurryBgm = false; +bool sVsHurryBgmPlaying = false; -void func_versus_800BC760(void) { +void Versus_Exit(void) { s32 i; Memory_FreeAll(); @@ -77,7 +80,7 @@ void func_versus_800BC760(void) { gVersusMode = 0; gFillScreenAlphaTarget = 0; gFillScreenAlpha = 255; - D_ctx_80177824 = 1; + gClearPlayerInfo = true; } void func_versus_800BC88C(f32 xPos, f32 yPos, f32 scale) { @@ -296,39 +299,29 @@ void func_versus_800BDAA0(f32 xPos, f32 yPos, s32 arg2, s32 arg3, s32 arg4) { } } -void func_versus_800BDE3C(void) { +void Versus_dummy_800BDE3C(void) { } void func_versus_800BDE44(void) { s32 i; - f32 D_800D4B70[] = { - 82.0f, - 242.0f, - 82.0f, - 242.0f, - }; - f32 D_800D4B80[] = { - 82.0f, - 82.0f, - 202.0f, - 202.0f, - }; + f32 D_800D4B70[] = { 82.0f, 242.0f, 82.0f, 242.0f }; + f32 D_800D4B80[] = { 82.0f, 82.0f, 202.0f, 202.0f }; RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); for (i = 0; i < 4; i++) { if ((gPlayer[i].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[i].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { - if ((gPlayerScores[i] != D_80178808[i]) || (D_80178810[i] != 0)) { + if ((gPlayerScores[i] != sVsDisplayedScores[i]) || (D_80178810[i] != 0)) { D_80178810[i] += 4; if (D_80178810[i] > 15) { - if (gPlayerScores[i] > D_80178808[i]) { - D_80178808[i] += 1; // can't be ++ + if (gPlayerScores[i] > sVsDisplayedScores[i]) { + sVsDisplayedScores[i] += 1; // can't be ++ } else { - D_80178808[i] -= 1; // can't be -- + sVsDisplayedScores[i] -= 1; // can't be -- } - if (gPlayerScores[i] != D_80178808[i]) { + if (gPlayerScores[i] != sVsDisplayedScores[i]) { D_80178810[i] -= 15; } else { D_80178810[i] = 0; @@ -337,45 +330,47 @@ void func_versus_800BDE44(void) { } } - if (gPlayerScores[i] >= D_80178808[i]) { - func_versus_800BDAA0(D_800D4B70[i], D_800D4B80[i], D_80178808[i] + 1, D_80178808[i], D_80178810[i]); + if (gPlayerScores[i] >= sVsDisplayedScores[i]) { + func_versus_800BDAA0(D_800D4B70[i], D_800D4B80[i], sVsDisplayedScores[i] + 1, sVsDisplayedScores[i], + D_80178810[i]); } else { - func_versus_800BDAA0(D_800D4B70[i], D_800D4B80[i], D_80178808[i] - 1, D_80178808[i], D_80178810[i]); + func_versus_800BDAA0(D_800D4B70[i], D_800D4B80[i], sVsDisplayedScores[i] - 1, sVsDisplayedScores[i], + D_80178810[i]); } } } } s32 Versus_UpdateTimer(void) { - s32 temp = (s32) CYCLES_TO_USEC((D_80178860 - D_80178868)) / 10000; + s32 temp = (s32) CYCLES_TO_USEC((sDrawTime - sPrevDrawTime)) / 10000; - D_versus_80178768[2] -= temp; - if (D_versus_80178768[2] < 0) { - D_versus_80178768[2] *= -1; - temp = (D_versus_80178768[2] / 100) + 1; - D_versus_80178768[2] %= 100; - D_versus_80178768[2] = (100 - D_versus_80178768[2]) % 100; - D_versus_80178768[1] -= temp; + gVsCountdown[2] -= temp; + if (gVsCountdown[2] < 0) { + gVsCountdown[2] *= -1; + temp = (gVsCountdown[2] / 100) + 1; + gVsCountdown[2] %= 100; + gVsCountdown[2] = (100 - gVsCountdown[2]) % 100; + gVsCountdown[1] -= temp; - if (D_versus_80178768[1] >= 0) { - if ((D_versus_80178768[0] == 0) && (D_versus_80178768[1] < 15) && (D_versus_80178768[1] >= 0)) { + if (gVsCountdown[1] >= 0) { + if ((gVsCountdown[0] == 0) && (gVsCountdown[1] < 15) && (gVsCountdown[1] >= 0)) { AUDIO_PLAY_SFX(NA_SE_COUNTDOWN, gDefaultSfxSource, 4); } } else { // clang-format off - if (D_versus_80178768[0] == 0) {\ + if (gVsCountdown[0] == 0) {\ AUDIO_PLAY_SFX(NA_SE_TIME_OVER, gDefaultSfxSource, 4);\ } // clang-format on - D_versus_80178768[1] *= -1; - temp = (D_versus_80178768[1] / 60) + 1; - D_versus_80178768[1] %= 60; - D_versus_80178768[1] = (60 - D_versus_80178768[1]) % 60; - D_versus_80178768[0] -= temp; - if (D_versus_80178768[0] < 0) { - D_versus_80178768[0] = 0; - D_versus_80178768[1] = 0; - D_versus_80178768[2] = 0; + gVsCountdown[1] *= -1; + temp = (gVsCountdown[1] / 60) + 1; + gVsCountdown[1] %= 60; + gVsCountdown[1] = (60 - gVsCountdown[1]) % 60; + gVsCountdown[0] -= temp; + if (gVsCountdown[0] < 0) { + gVsCountdown[0] = 0; + gVsCountdown[1] = 0; + gVsCountdown[2] = 0; } } } @@ -383,7 +378,7 @@ s32 Versus_UpdateTimer(void) { return 0; } -s32 func_versus_800BE300(f32 xPos, f32 yPos, s32* arg2) { +s32 Versus_DrawCountdown(f32 xPos, f32 yPos, s32* countdown) { s32 i; f32 xTemp; f32 x; @@ -402,11 +397,11 @@ s32 func_versus_800BE300(f32 xPos, f32 yPos, s32* arg2) { for (i = 0; i < 5; i++) { if ((i == 0) || (i == 2)) { - temp = arg2[i / 2] % 60; + temp = countdown[i / 2] % 60; } if (i == 4) { - temp = arg2[i / 2] % 100; + temp = countdown[i / 2] % 100; } if ((i % 2) == 1) { @@ -425,7 +420,7 @@ s32 func_versus_800BE300(f32 xPos, f32 yPos, s32* arg2) { return 0; } -s32 func_versus_800BE564(void) { +s32 Versus_SelectStartingForm(void) { s32 i; s32 ret = 0; @@ -434,7 +429,7 @@ s32 func_versus_800BE564(void) { if (gPlayerInactive[i]) { continue; } - D_80178780[i] = 1; + sPlayerFormOption[i] = 1; gPlayerForms[i] = FORM_ARWING; ret++; } @@ -446,38 +441,38 @@ s32 func_versus_800BE564(void) { continue; } - if ((D_80178780[i] == 0) && (D_801787F8[i] == 0)) { + if ((sPlayerFormOption[i] == 0) && (sPlayerRespawnTimer[i] == 0)) { if (sUnlockLandmaster && sUnlockOnFoot) { - D_80178780[i] = RAND_INT(3.0f) + 1; + sPlayerFormOption[i] = RAND_INT(3.0f) + 1; } if (sUnlockLandmaster && !sUnlockOnFoot) { - D_80178780[i] = RAND_INT(2.0f) + 1; + sPlayerFormOption[i] = RAND_INT(2.0f) + 1; } } - if (D_801787F8[i] != 0) { - D_801787F8[i]--; + if (sPlayerRespawnTimer[i] != 0) { + sPlayerRespawnTimer[i]--; } - if (sUnlockLandmaster && (D_80178780[i] == 0) && (gControllerPress[i].button & B_BUTTON)) { + if (sUnlockLandmaster && (sPlayerFormOption[i] == 0) && (gControllerPress[i].button & B_BUTTON)) { AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); - D_80178780[i] = 2; + sPlayerFormOption[i] = 2; } - if (sUnlockOnFoot && (D_80178780[i] == 0) && + if (sUnlockOnFoot && (sPlayerFormOption[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(NA_SE_DECIDE, gDefaultSfxSource, 4); - D_80178780[i] = 3; + sPlayerFormOption[i] = 3; } - if ((D_80178780[i] == 0) && (gControllerPress[i].button & A_BUTTON)) { + if ((sPlayerFormOption[i] == 0) && (gControllerPress[i].button & A_BUTTON)) { AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); - D_80178780[i] = 1; + sPlayerFormOption[i] = 1; } - if (D_80178780[i] != 0) { - switch (D_80178780[i]) { + if (sPlayerFormOption[i] != 0) { + switch (sPlayerFormOption[i]) { case 1: gPlayerForms[i] = FORM_ARWING; break; @@ -534,8 +529,9 @@ void func_versus_800BE924(s32 index) { RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); - func_versus_800BD4D4(D_800D4B90[index] + 32.0f, D_800D4BA0[index] + 84.0f, (D_801787F8[index] / 30) + 1); + func_versus_800BD4D4(D_800D4B90[index] + 32.0f, D_800D4BA0[index] + 84.0f, (sPlayerRespawnTimer[index] / 30) + 1); } + void func_versus_800BECA8(s32 index) { f32 D_800D4BB0[] = { 40.0f, 200.0f, 40.0f, 200.0f }; f32 D_800D4BC0[] = { 40.0f, 40.0f, 160.0f, 160.0f }; @@ -565,15 +561,15 @@ s32 func_versus_800BEDDC(void) { continue; } - if (D_80178780[i] == 0) { + if (sPlayerFormOption[i] == 0) { func_versus_800BE924(i); } else { func_versus_800BECA8(i); } - if (D_80178780[i] != 0) { + if (sPlayerFormOption[i] != 0) { var_s4++; - if (var_s4 == D_801787B4) { + if (var_s4 == sVsPlayerCount) { func_versus_800BED78(); } } @@ -582,26 +578,26 @@ s32 func_versus_800BEDDC(void) { return 0; } -s32 func_versus_800BEF00(void) { +s32 Versus_UpdateStartCountdown(void) { s32 ret; ret = 0; - if (D_80178790 == 0) { + if (sStartCountdown == 0) { return 2; } - D_80178794--; + sStartTimer--; - if (D_80178794 == 0) { - D_80178790--; - if (D_80178790 != 0) { + if (sStartTimer == 0) { + sStartCountdown--; + if (sStartCountdown != 0) { AUDIO_PLAY_SFX(NA_SE_READY, gDefaultSfxSource, 4); ret = 0; } else { AUDIO_PLAY_SFX(NA_SE_GO, gDefaultSfxSource, 4); ret = 1; } - D_80178794 = 30; + sStartTimer = 30; } return ret; @@ -621,8 +617,9 @@ s32 func_versus_800BEFE4(void) { continue; } - if (D_80178790 != 0) { - func_versus_800BC9DC(D_800D4BD0[i] + D_800D4BF0[D_80178790 - 1], D_800D4BE0[i], 1.0f, D_80178790 - 1); + if (sStartCountdown != 0) { + func_versus_800BC9DC(D_800D4BD0[i] + D_800D4BF0[sStartCountdown - 1], D_800D4BE0[i], 1.0f, + sStartCountdown - 1); } else { func_versus_800BCB44(D_800D4BD0[i] - 16.0f, D_800D4BE0[i], 1.0f); } @@ -630,22 +627,22 @@ s32 func_versus_800BEFE4(void) { return 0; } -s32 func_versus_800BF17C(void) { +s32 Versus_UpdatePlayerStatus(void) { s32 i; f32 ret; for (i = 0, ret = 0; i < 4; i++) { - D_80178850[i] = 1; + D_80178850[i] = true; if (gPlayer[i].state_1C8 != PLAYERSTATE_1C8_VS_STANDBY) { - D_80178850[i] = 0; - D_801787F8[i] = 150; + D_80178850[i] = false; + sPlayerRespawnTimer[i] = 150; continue; } - if (gPlayerInactive[i] || (gVsMatchType == 1) || ((D_801787B4 == 1) && (gVsMatchType != 2)) || - ((gVsMatchType == 2) && (D_versus_80178768[0] == 0) && (D_versus_80178768[1] == 0) && - (D_versus_80178768[2] == 0))) { + if (gPlayerInactive[i] || (gVsMatchType == VS_MATCH_BATTLE) || + ((sVsPlayerCount == 1) && (gVsMatchType != VS_MATCH_TIME)) || + ((gVsMatchType == VS_MATCH_TIME) && VS_TIME_UP(gVsCountdown))) { ret = Math_SmoothStepToF(&D_801787D8[i], D_801787E8[i], 0.3f, 100.0f, 1.0f); if (ret == 0.0f) { if (D_801787E8[i] == 32.0f) { @@ -656,42 +653,42 @@ s32 func_versus_800BF17C(void) { } gPlayer[i].csState = 0; } else { - D_80178780[i] = 0; + sPlayerFormOption[i] = 0; gPlayer[i].csState = 0; - if ((D_80178780[i] == 0) && (D_801787F8[i] == 0)) { + if ((sPlayerFormOption[i] == 0) && (sPlayerRespawnTimer[i] == 0)) { if (sUnlockLandmaster && sUnlockOnFoot) { - D_80178780[i] = RAND_INT(3.0f) + 1; + sPlayerFormOption[i] = RAND_INT(3.0f) + 1; } if (sUnlockLandmaster && !sUnlockOnFoot) { - D_80178780[i] = RAND_INT(2.0f) + 1; + sPlayerFormOption[i] = RAND_INT(2.0f) + 1; } } - if (D_801787F8[i] != 0) { - D_801787F8[i]--; + if (sPlayerRespawnTimer[i] != 0) { + sPlayerRespawnTimer[i]--; } - if (sUnlockLandmaster && (D_80178780[i] == 0) && (gControllerPress[i].button & B_BUTTON)) { - D_80178780[i] = 2; + if (sUnlockLandmaster && (sPlayerFormOption[i] == 0) && (gControllerPress[i].button & B_BUTTON)) { + sPlayerFormOption[i] = 2; } - if (sUnlockOnFoot && (D_80178780[i] == 0) && + if (sUnlockOnFoot && (sPlayerFormOption[i] == 0) && ((gControllerPress[i].button & L_CBUTTONS) || (gControllerPress[i].button & D_CBUTTONS) || (gControllerPress[i].button & U_CBUTTONS) || (gControllerPress[i].button & R_CBUTTONS))) { - D_80178780[i] = 3; + sPlayerFormOption[i] = 3; } - if ((D_80178780[i] == 0) && (gControllerPress[i].button & A_BUTTON)) { - D_80178780[i] = 1; + if ((sPlayerFormOption[i] == 0) && (gControllerPress[i].button & A_BUTTON)) { + sPlayerFormOption[i] = 1; } if ((!sUnlockLandmaster && !sUnlockOnFoot) || (gVersusStage == VS_STAGE_SECTOR_Z)) { - D_80178850[i] = 0; - D_80178780[i] = 1; + D_80178850[i] = false; + sPlayerFormOption[i] = 1; } - if (D_80178780[i] != 0) { - switch (D_80178780[i]) { + if (sPlayerFormOption[i] != 0) { + switch (sPlayerFormOption[i]) { case 1: gPlayerForms[i] = FORM_ARWING; break; @@ -709,10 +706,10 @@ s32 func_versus_800BF17C(void) { break; } - D_80178820[i]++; + sPlayerDownFrames[i]++; - if (gVsMatchType == 2) { - gPlayerScores[i] = D_80178838[i] = D_80178808[i] = D_80178810[i] = 0; + if (gVsMatchType == VS_MATCH_TIME) { + gPlayerScores[i] = D_80178838[i] = sVsDisplayedScores[i] = D_80178810[i] = 0; } gPlayer[i].csState = 1; } @@ -735,7 +732,7 @@ s32 func_versus_800BF59C(void) { continue; } - if ((gPlayerInactive[i]) || (gVsMatchType == 1)) { + if (gPlayerInactive[i] || (gVsMatchType == VS_MATCH_BATTLE)) { colorGB = D_801787D8[i]; gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); func_versus_800BD76C(D_800D4BFC[i], D_800D4C0C[i]); @@ -774,214 +771,184 @@ void func_versus_800BF750(void) { } } -s32 Versus_CheckForWinner(void) { +bool Versus_CheckForWinner(void) { s32 i; s32 j; - s32 temp; - s32 var_a3; - s32 temp2[4]; + s32 tieScore; + s32 numDown; + bool beaten[4]; switch (gVsMatchType) { - case 0: - for (i = 0, var_a3 = 0; i < 4; i++) { + case VS_MATCH_POINTS: + for (i = 0, numDown = 0; i < 4; i++) { if (gPlayer[i].state_1C8 != PLAYERSTATE_1C8_VS_STANDBY) { - gVsWinner = i; + sVsWinner = i; } if (gPlayer[i].state_1C8 == PLAYERSTATE_1C8_VS_STANDBY) { - var_a3++; + numDown++; } } - if ((D_801787B4 == 1) && (var_a3 == 4)) { - gVsMatchOver = 1; - gVsWinner = 99; - break; - } - - for (i = 0; i < 4; i++) { - if (gVsPoints[i] == gVsPointsToWin) { - break; + if ((sVsPlayerCount == 1) && (numDown == 4)) { + gVsMatchOver = true; + sVsWinner = VS_TIE; + } else { + for (i = 0; i < 4; i++) { + if (gVsPoints[i] == gVsPointsToWin) { + break; + } else if (gVsPoints[i] == (gVsPointsToWin - 1)) { + sStartVsHurryBgm = true; + } } - if (gVsPoints[i] == (gVsPointsToWin - 1)) { - sStartVsHurryBgm = 1; - } - } - if (i >= 4) { - return 0; - } - - if (gPlayer[i].timer_278 != 0) { - return 0; - } - - for (j = 0; j < 4; j++) { - if (j == i) { - continue; + if (i >= 4) { + return false; } - if (gPlayer[j].attacker >= 0) { - gPlayer[j].attacker = i + 1; + + if (gPlayer[i].timer_278 != 0) { + return false; } - gPlayer[j].state_1C8 = PLAYERSTATE_1C8_VS_STANDBY; + + for (j = 0; j < 4; j++) { + if (j == i) { + continue; + } + if (gPlayer[j].attacker >= 0) { + gPlayer[j].attacker = i + 1; + } + gPlayer[j].state_1C8 = PLAYERSTATE_1C8_VS_STANDBY; + } + gVsMatchOver = true; + sVsWinner = i; } - gVsMatchOver = 1; - gVsWinner = i; break; - case 1: - - for (i = 0, var_a3 = 0; i < 4; i++) { + case VS_MATCH_BATTLE: + for (i = 0, numDown = 0; i < 4; i++) { if (gPlayer[i].state_1C8 != PLAYERSTATE_1C8_VS_STANDBY) { - gVsWinner = i; + sVsWinner = i; } if (gPlayer[i].state_1C8 == PLAYERSTATE_1C8_VS_STANDBY) { - var_a3++; + numDown++; } } - if ((D_801787B4 == 1) && (var_a3 == 4)) { - gVsMatchOver = 1; - gVsWinner = 99; - break; - } - - if (var_a3 >= 2) { - sStartVsHurryBgm = 1; - } - - if ((var_a3 < 3) || (D_801787B4 == 1)) { - return (0); - } - - if (var_a3 >= 4) { - gVsWinner = 99; - } - - for (j = 0; j < 4; j++) { - if (j == gVsWinner) { - continue; + if ((sVsPlayerCount == 1) && (numDown == 4)) { + gVsMatchOver = true; + sVsWinner = VS_TIE; + } else { + if (numDown >= 2) { + sStartVsHurryBgm = true; } - if (gPlayer[j].attacker >= 0) { - gPlayer[j].attacker = i + 1; + + if ((numDown < 3) || (sVsPlayerCount == 1)) { + return false; } - gPlayer[j].state_1C8 = PLAYERSTATE_1C8_VS_STANDBY; + + if (numDown >= 4) { + sVsWinner = VS_TIE; + } + + for (j = 0; j < 4; j++) { + if (j == sVsWinner) { + continue; + } + if (gPlayer[j].attacker >= 0) { + gPlayer[j].attacker = i + 1; + } + gPlayer[j].state_1C8 = PLAYERSTATE_1C8_VS_STANDBY; + } + gVsMatchOver = true; } - gVsMatchOver = 1; break; - case 2: - if ((D_versus_80178768[0] != 0) || (D_versus_80178768[1] != 0) || (D_versus_80178768[2] != 0)) { - return (0); + case VS_MATCH_TIME: + if (!VS_TIME_UP(gVsCountdown)) { + return false; } - if (gVsMatchType == 2) { + if (gVsMatchType == VS_MATCH_TIME) { for (i = 0; i < 4; i++) { if ((gPlayer[i].state_1C8 == PLAYERSTATE_1C8_DOWN) || (gPlayer[i].state_1C8 == PLAYERSTATE_1C8_VS_STANDBY)) { - gPlayerScores[i] = D_80178838[i] = D_80178808[i] = D_80178810[i] = 0; - D_80178820[i]++; + gPlayerScores[i] = D_80178838[i] = sVsDisplayedScores[i] = D_80178810[i] = 0; + sPlayerDownFrames[i]++; } } } for (i = 0; i < 4; i++) { - temp2[i] = 0; + beaten[i] = false; } for (i = 0; i < 4; i++) { if (!gControllerPlugged[i]) { continue; } - for (j = 0, temp = 0; j < 4; j++) { - if (!gControllerPlugged[j]) { + for (j = 0, tieScore = 0; j < 4; j++) { + if (!gControllerPlugged[j] || beaten[j] || (i == j)) { continue; } - if (temp2[j]) { - continue; - } - - if (i != j) { - if (gPlayerScores[i] < gPlayerScores[j]) { - temp2[i] = 1; - break; - } - if (gPlayerScores[i] == gPlayerScores[j]) { - temp = 1; - } + if (gPlayerScores[i] < gPlayerScores[j]) { + beaten[i] = true; + break; + } else if (gPlayerScores[i] == gPlayerScores[j]) { + tieScore = true; } } - if ((j == 4) && (temp == 0)) { - gVsWinner = i; + if ((j == 4) && !tieScore) { + sVsWinner = i; } } - if (gVsWinner == 99) { + if (sVsWinner == VS_TIE) { for (i = 0; i < 4; i++) { - if (!gControllerPlugged[i]) { - continue; - } - if (temp2[i]) { + if (!gControllerPlugged[i] || beaten[i]) { continue; } + if (0) {} - for (j = 0, temp = 0; j < 4; j++) { - if (!gControllerPlugged[j]) { + for (j = 0, tieScore = 0; j < 4; j++) { + if (!gControllerPlugged[j] || beaten[j] || (i == j)) { continue; } - if (temp2[j]) { - continue; - } - - if (i != j) { - if (D_80178820[i] > D_80178820[j]) { - temp2[i] = 1; - break; - } - if (D_80178820[i] == D_80178820[j]) { - temp = 1; - } + if (sPlayerDownFrames[i] > sPlayerDownFrames[j]) { + beaten[i] = true; + break; + } else if (sPlayerDownFrames[i] == sPlayerDownFrames[j]) { + tieScore = true; } } - if ((j == 4) && (temp == 0)) { - gVsWinner = i; + if ((j == 4) && !tieScore) { + sVsWinner = i; } } - if (gVsWinner == 99) { + if (sVsWinner == VS_TIE) { for (i = 0; i < 4; i++) { - if (!gControllerPlugged[i]) { + if (!gControllerPlugged[i] || beaten[i]) { continue; } - if (temp2[i]) { - continue; - } - - for (j = 0, temp = 0; j < 4; j++) { - if (!gControllerPlugged[j]) { + for (j = 0, tieScore = 0; j < 4; j++) { + if (!gControllerPlugged[j] || beaten[j] || (i == j)) { continue; } - if (temp2[j]) { - continue; - } - if (i != j) { - if (gPlayer[i].shields < gPlayer[j].shields) { - temp2[i] = 1; - break; - } - if (gPlayer[i].shields == gPlayer[j].shields) { - temp = 1; - } + if (gPlayer[i].shields < gPlayer[j].shields) { + beaten[i] = true; + break; + } else if (gPlayer[i].shields == gPlayer[j].shields) { + tieScore = true; } } - if ((j == 4) && (temp == 0)) { - gVsWinner = i; + if ((j == 4) && !tieScore) { + sVsWinner = i; } } } } for (j = 0; j < 4; j++) { - if (j == gVsWinner) { + if (j == sVsWinner) { continue; } @@ -991,14 +958,14 @@ s32 Versus_CheckForWinner(void) { gPlayer[j].state_1C8 = PLAYERSTATE_1C8_VS_STANDBY; } - gVsMatchOver = 1; + gVsMatchOver = true; break; default: break; } - return 1; + return true; } void func_versus_800C024C(void) { @@ -1014,7 +981,7 @@ bool func_versus_800C0294(s32 index) { s32 ret = false; s32 temp; - if (index == 99) { + if (index == VS_TIE) { index = 4; } @@ -1030,7 +997,7 @@ bool func_versus_800C0294(s32 index) { break; case 2: - if (0.0f == Math_SmoothStepToF(&D_801787C8, 0.3f, 0.4f, 100.0f, 0.01f)) { + if (Math_SmoothStepToF(&D_801787C8, 0.3f, 0.4f, 100.0f, 0.01f) == 0.0f) { D_801787BC = 3; D_801787C4 = 0.0f; } @@ -1061,7 +1028,7 @@ s32 func_versus_800C04DC(f32 xPos, f32 scale, s32 arg2) { f32 x; f32 y; - if ((gVsMatchType == 2) && ((D_800D4A98 & 0x20) != 0) && (gVsWinner != 99)) { + if ((gVsMatchType == VS_MATCH_TIME) && ((D_800D4A98 & 0x20) != 0) && (sVsWinner != VS_TIE)) { x = 118.0f; y = 110.0f; @@ -1099,14 +1066,17 @@ s32 func_versus_800C075C(void) { return 0; } -s32 func_versus_800C07C4(void) { +s32 Versus_GetMenuInput(void) { s32 i; s32 stick_y = 0; s32 ret = 0; for (i = 0; i < 4; i++) { - if ((gControllerPlugged[i] == true) && (stick_y = gControllerPress[i].stick_y)) { - break; + if (gControllerPlugged[i] == true) { + stick_y = gControllerPress[i].stick_y; + if (stick_y != 0) { + break; + } } } @@ -1154,22 +1124,21 @@ void func_versus_800C0970(f32 yScale1, f32 yScale2) { func_versus_800BCFFC(98.0f, 152.0f, 5.19f, yScale2); } -s32 func_versus_800C0A04(void) { - s32 ret = func_versus_800C07C4(); - s32 var_v1; +s32 Versus_UpdateMenuOptions(void) { + s32 input = Versus_GetMenuInput(); - if (ret != 0) { + if (input != 0) { D_801787AC = 255.0f; D_801787B0 = 255.0f; - D_801787A4 += ret; + sVsMatchMenuOption += input; - if (D_801787A4 >= 3) { - D_801787A4 = 0; - D_801787A4 = 0; + if (sVsMatchMenuOption >= 3) { + sVsMatchMenuOption = 0; + sVsMatchMenuOption = 0; } - if (D_801787A4 < 0) { - D_801787A4 = 2; + if (sVsMatchMenuOption < 0) { + sVsMatchMenuOption = 2; } } @@ -1181,7 +1150,7 @@ s32 func_versus_800C0A04(void) { } } - return D_801787A4; + return sVsMatchMenuOption; } s32 func_versus_800C0B0C(void) { @@ -1191,7 +1160,7 @@ s32 func_versus_800C0B0C(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_78); for (i = 0; i < 3; i++) { - if (i == D_801787A4) { + if (i == sVsMatchMenuOption) { colorGB[i] = D_801787AC; } else { colorGB[i] = 255; @@ -1208,19 +1177,17 @@ s32 func_versus_800C0B0C(void) { return 0; } -bool func_versus_800C0C84(void) { +bool Versus_UpdateMenu(void) { s32 i; for (i = 0; i < 4; i++) { - if (gControllerPlugged[i] == true) { - if (gControllerPress[i].button & A_BUTTON) { - D_801787AC = 32.0f; - return true; - } + if ((gControllerPlugged[i] == true) && (gControllerPress[i].button & A_BUTTON)) { + D_801787AC = 32.0f; + return true; } } - func_versus_800C0A04(); + Versus_UpdateMenuOptions(); return false; } @@ -1233,7 +1200,7 @@ bool func_versus_800C0D10(void) { switch (D_800D4A90) { case 0: // clang-format off - for( i=0; i<5; i++ ) { D_80178838[ i]= 0; } + for (i = 0; i < 5; i++) { D_80178838[i] = 0; } // clang-format on D_800D4A90 = 1; D_800D4A94 = 0; @@ -1337,14 +1304,14 @@ s32 func_versus_800C1138(s32 max, s32 arg1) { return 0; } -void func_versus_800C1368(void) { +void Versus_InitMatch(void) { s32 i; - for (i = 0, D_801787B4 = 0; i < 4; i++) { + for (i = 0, sVsPlayerCount = 0; i < 4; i++) { if (!gPlayerInactive[i]) { - D_801787B4++; + sVsPlayerCount++; } - D_80178780[i] = 0; + sPlayerFormOption[i] = 0; D_801787D8[i] = 0.0f; D_801787E8[i] = 0.0f; } @@ -1354,33 +1321,33 @@ void func_versus_800C1368(void) { D_801787AC = 255.0f; D_801787B0 = 0.0f; gNextVsViewScale = 0.5f; - D_80178778 = 0; - D_80178790 = 4; - D_80178794 = 1; + sVsDrawMode = 0; + sStartCountdown = 4; + sStartTimer = 1; D_8017879C = 0; D_801787A0 = 0; - D_801787A4 = 0; - gVsWinner = 99; + sVsMatchMenuOption = 0; + sVsWinner = VS_TIE; D_801787B8 = 0; D_versus_80178750 = 0; gBgColor = 0; D_80178830 = 0; D_800D4A90 = 0; D_800D4A98 = 0; - sStartVsHurryBgm = sVsHurryBgmPlaying = 0; + sStartVsHurryBgm = sVsHurryBgmPlaying = false; gFillScreenAlpha = 255; gFillScreenAlphaStep = 0; gFillScreenAlphaTarget = 0; for (i = 0; i < 4; i++) { gPlayerScores[i] = 0; - D_80178808[i] = 0; + sVsDisplayedScores[i] = 0; D_80178810[i] = 0; - D_80178820[i] = 0; + sPlayerDownFrames[i] = 0; } // clang-format off - for (i = 0; i < 4; i++) { D_801787F8[i] = 150; } + for (i = 0; i < 4; i++) { sPlayerRespawnTimer[i] = 150; } // clang-format on if (gSaveFile.save.data.planet[SAVE_SLOT_VENOM_2].normalClear == 1) { @@ -1395,19 +1362,19 @@ void func_versus_800C1368(void) { sUnlockOnFoot = false; } - if (gVsMatchType == 2) { + if (gVsMatchType == VS_MATCH_TIME) { gVsPointsToWin = 10000; } if (!sUnlockLandmaster) { sUnlockOnFoot = false; } - D_versus_80178768[0] = gVsTimeTrialLimit + 1; - D_versus_80178768[1] = 0; - D_versus_80178768[2] = 0; + gVsCountdown[0] = gVsTimeTrialLimit + 1; + gVsCountdown[1] = 0; + gVsCountdown[2] = 0; } -bool func_versus_800C15D8(void) { +bool Versus_InitViewports(void) { bool ret = false; if (gNextVsViewScale >= 1.5f) { @@ -1439,12 +1406,12 @@ bool func_versus_800C15D8(void) { } /* return type needs to be s32 for Versus_Update to match */ -s32 func_versus_800C1690(void) { +s32 Versus_ClearFrameCounter(void) { D_80178798 = 0; } -bool func_versus_800C16A0(s32 arg0) { - if (arg0 != D_80178798) { +bool Versus_WaitFrames(s32 frame) { + if (frame != D_80178798) { D_80178798++; } else { return true; @@ -1452,14 +1419,14 @@ bool func_versus_800C16A0(s32 arg0) { return false; } -void func_versus_800C16D0(void) { +void Versus_PlayAgain(void) { Player_InitVersus(); - gVsMatchState = 0; - D_80178778 = 0; + gVsMatchState = VS_STATE_0; + sVsDrawMode = 0; } -void func_versus_800C1700(void) { - func_versus_800BC760(); +void Versus_ReturnToMenu(void) { + Versus_Exit(); gGameState = GSTATE_MENU; gNextGameStateTimer = 2; gOptionMenuStatus = OPTION_WAIT; @@ -1467,106 +1434,103 @@ void func_versus_800C1700(void) { gBgColor = 0; } -void dummy(void) { +void Versus_dummy_800C1758(void) { } -void func_versus_800C175C(void) { +void Versus_dummy_800C175C(void) { } -void func_versus_800C1764(void) { +void Versus_dummy_800C1764(void) { } bool Versus_Update(void) { s32 ret = 0; switch (gVsMatchState) { - case 0: - func_versus_800C1368(); - gVsMatchState = 1; - func_versus_800C1690(); + case VS_STATE_0: + Versus_InitMatch(); + gVsMatchState = VS_STATE_1; + Versus_ClearFrameCounter(); break; - case 1: - if (!func_versus_800C15D8()) { + case VS_STATE_1: + if (!Versus_InitViewports()) { break; } - if (func_versus_800C16A0(30)) { + if (Versus_WaitFrames(30)) { AUDIO_PLAY_BGM(gBgmSeqId); - gVsMatchState = 2; - func_versus_800C1690(); + gVsMatchState = VS_STATE_2; + Versus_ClearFrameCounter(); } break; - case 2: - D_80178778 = 1; - if (D_801787B4 != func_versus_800BE564()) { + case VS_STATE_2: + sVsDrawMode = 1; + if (sVsPlayerCount != Versus_SelectStartingForm()) { break; } - if (func_versus_800C16A0(30)) { + if (Versus_WaitFrames(30)) { Player_InitVersus(); - gVsMatchState = 3; - func_versus_800C1690(); + gVsMatchState = VS_STATE_3; + Versus_ClearFrameCounter(); } break; - case 3: - D_80178778 = 2; - ret = func_versus_800BEF00(); + case VS_STATE_3: + sVsDrawMode = 2; + ret = Versus_UpdateStartCountdown(); if (ret == 0) { break; } if (ret == 1) { - gVsMatchStart = 1; + gVsMatchStart = true; } - if (func_versus_800C16A0(30)) { - gVsMatchState = 4; + if (Versus_WaitFrames(30)) { + gVsMatchState = VS_STATE_4; } break; - case 4: - if ((sStartVsHurryBgm == 1) && (sVsHurryBgmPlaying == 0)) { + case VS_STATE_4: + if ((sStartVsHurryBgm == true) && !sVsHurryBgmPlaying) { AUDIO_PLAY_BGM(NA_BGM_BATTLE_LAST); - sVsHurryBgmPlaying = 1; + sVsHurryBgmPlaying = true; } - if (gVsMatchType == 2) { - D_80178778 = 10; + if (gVsMatchType == VS_MATCH_TIME) { + sVsDrawMode = 10; Versus_UpdateTimer(); - func_versus_800BDE3C(); + Versus_dummy_800BDE3C(); } else { - D_80178778 = 8; + sVsDrawMode = 8; } if (Versus_CheckForWinner()) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); - if (gVsMatchType == 2) { - D_80178778 = 11; + if (gVsMatchType == VS_MATCH_TIME) { + sVsDrawMode = 11; } else { - D_80178778 = 0; + sVsDrawMode = 0; } - gVsMatchState = 5; - func_versus_800C1690(); + gVsMatchState = VS_STATE_5; + Versus_ClearFrameCounter(); } else { - func_versus_800BF17C(); + Versus_UpdatePlayerStatus(); } break; - case 5: - if (func_versus_800C16A0(60)) { - switch (gVsWinner) { + case VS_STATE_5: + if (Versus_WaitFrames(60)) { + switch (sVsWinner) { case 0: - case 1: - case 2: - case 3: AUDIO_PLAY_BGM(NA_BGM_COURSE_CLEAR); break; - case 99: + case VS_TIE: AUDIO_PLAY_BGM(NA_BGM_COURSE_FAILURE); break; @@ -1575,46 +1539,46 @@ bool Versus_Update(void) { } D_versus_80178750 = 1; - gVsMatchState = 6; + gVsMatchState = VS_STATE_6; func_versus_800C024C(); } break; - case 6: - D_80178778 = 3; - if (!func_versus_800C0294(gVsWinner)) { + case VS_STATE_6: + sVsDrawMode = 3; + if (!func_versus_800C0294(sVsWinner)) { break; } - if (func_versus_800C16A0(30)) { - func_versus_800C1690(); - gVsMatchState = 7; + if (Versus_WaitFrames(30)) { + Versus_ClearFrameCounter(); + gVsMatchState = VS_STATE_7; } break; - case 7: - D_80178778 = 4; - if (func_versus_800C16A0(15)) { - func_versus_800C1690(); - if (((gVsMatchType == 0) && (D_801787B4 > 1)) || (gVsMatchType == 2)) { - gVsMatchState = 8; + case VS_STATE_7: + sVsDrawMode = 4; + if (Versus_WaitFrames(15)) { + Versus_ClearFrameCounter(); + if (((gVsMatchType == VS_MATCH_POINTS) && (sVsPlayerCount > 1)) || (gVsMatchType == VS_MATCH_TIME)) { + gVsMatchState = VS_STATE_8; } else { - gVsMatchState = 9; + gVsMatchState = VS_STATE_9; } } break; - case 8: - D_80178778 = 5; + case VS_STATE_8: + sVsDrawMode = 5; switch (gVsMatchType) { - case 0: - if (func_versus_800C107C(gVsWinner)) { - gVsMatchState = 9; + case VS_MATCH_POINTS: + if (func_versus_800C107C(sVsWinner)) { + gVsMatchState = VS_STATE_9; } break; - case 2: + case VS_MATCH_TIME: if (func_versus_800C0D10()) { - gVsMatchState = 9; + gVsMatchState = VS_STATE_9; } break; @@ -1624,34 +1588,34 @@ bool Versus_Update(void) { break; - case 9: - D_80178778 = 6; + case VS_STATE_9: + sVsDrawMode = 6; if (func_versus_800C08D0()) { - func_versus_800C1690(); + Versus_ClearFrameCounter(); D_801787AC = 0.0f; D_80178830 = 0; - gVsMatchState = 10; + gVsMatchState = VS_STATE_10; } break; - case 10: - D_80178778 = 7; - if (func_versus_800C16A0(60) && func_versus_800C0C84()) { - switch (D_801787A4) { + case VS_STATE_10: + sVsDrawMode = 7; + if (Versus_WaitFrames(60) && Versus_UpdateMenu()) { + switch (sVsMatchMenuOption) { case 0: - gVsMatchState = 11; + gVsMatchState = VS_STATE_11; break; case 1: - gVsMatchState = 12; + gVsMatchState = VS_STATE_12; break; case 2: - gVsMatchState = 13; + gVsMatchState = VS_STATE_13; break; default: - gVsMatchState = 14; + gVsMatchState = VS_STATE_14; break; } @@ -1660,17 +1624,17 @@ bool Versus_Update(void) { } break; - case 11: + case VS_STATE_11: D_80178830 += 16; if (D_80178830 > 480) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; gFillScreenAlpha = gFillScreenAlphaTarget = 255; gBgColor = 0; - func_versus_800C16D0(); + Versus_PlayAgain(); } break; - case 12: + case VS_STATE_12: D_80178830 += 16; if (D_80178830 > 160) { if (D_80178830 > 176) { @@ -1679,12 +1643,12 @@ bool Versus_Update(void) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; gBgColor = 0; if (D_80178830 > 224) { - func_versus_800C1700(); + Versus_ReturnToMenu(); } } break; - case 13: + case VS_STATE_13: D_80178830 += 16; if (D_80178830 > 160) { if (D_80178830 > 176) { @@ -1695,31 +1659,31 @@ bool Versus_Update(void) { gBgColor = 0; if (D_80178830 > 224) { - func_versus_800BC760(); + Versus_Exit(); D_menu_801B827C = 1; } } break; - case 14: + case VS_STATE_14: break; - case 20: - D_80178778 = 9; + case VS_STATE_20: + sVsDrawMode = 9; if (gInputPress->button & B_BUTTON) { - gVsMatchState = 13; + gVsMatchState = VS_STATE_13; } else { - func_versus_800C175C(); + Versus_dummy_800C175C(); } break; } - if (((gVsMatchState == 8) || (gVsMatchState == 9)) || (gVsMatchState == 10)) { + if ((gVsMatchState == VS_STATE_8) || (gVsMatchState == VS_STATE_9) || (gVsMatchState == VS_STATE_10)) { D_800D4A98++; } - if (gVsMatchState >= 5) { - gPauseEnabled = 0; + if (gVsMatchState >= VS_STATE_5) { + gPauseEnabled = false; } return false; @@ -1735,10 +1699,10 @@ s32 Versus_Main(void) { void Versus_Draw(void) { s32 var_a1; - D_80178868 = D_80178860; - D_80178860 = osGetTime(); + sPrevDrawTime = sDrawTime; + sDrawTime = osGetTime(); - switch (D_80178778) { + switch (sVsDrawMode) { case 1: func_versus_800BEDDC(); break; @@ -1750,46 +1714,45 @@ void Versus_Draw(void) { case 7: case 6: func_versus_800C0970(D_801787CC, D_801787D0); - + /* fallthrough*/ case 5: switch (gVsMatchType) { - case 0: - func_versus_800C1138(D_801787B8, gVsWinner); + case VS_MATCH_POINTS: + func_versus_800C1138(D_801787B8, sVsWinner); break; - case 2: + case VS_MATCH_TIME: func_versus_800C0E78(); break; } + /* fallthrough*/ case 4: - if ((gVsMatchType != 2) || ((D_800D4A98 & 0x20) == 0)) { - if (gVsWinner < 4) { - func_versus_800C075C(); - } + if (((gVsMatchType != VS_MATCH_TIME) || ((D_800D4A98 & 0x20) == 0)) && (sVsWinner < 4)) { + func_versus_800C075C(); } - + /* fallthrough*/ case 3: - func_versus_800C04DC(D_801787C0, D_801787C8, gVsWinner); - if (D_80178778 == 7) { + func_versus_800C04DC(D_801787C0, D_801787C8, sVsWinner); + if (sVsDrawMode == 7) { func_versus_800C0B0C(); } break; case 10: func_versus_800BDE44(); - + /* fallthrough*/ case 8: func_versus_800BF750(); func_versus_800BF59C(); - + /* fallthrough*/ case 11: - if (gVsMatchType == 2) { - func_versus_800BE300(124.0f, 116.0f, D_versus_80178768); + if (gVsMatchType == VS_MATCH_TIME) { + Versus_DrawCountdown(124.0f, 116.0f, gVsCountdown); } break; case 9: - func_versus_800C1764(); + Versus_dummy_800C1764(); break; } @@ -1967,38 +1930,37 @@ void func_versus_800C26C8(void) { Vec3f dest; Actor* actor; - if ((gVsMatchType != 2) || (gVsMatchStart == 0)) { - return; - } + if ((gVsMatchType == VS_MATCH_TIME) && gVsMatchStart) { - if (D_versus_80178758 != 0) { - D_versus_80178758--; - } + if (D_versus_80178758 != 0) { + D_versus_80178758--; + } - if (D_versus_80178758 == 0) { - D_versus_80178758 = 2; + if (D_versus_80178758 == 0) { + D_versus_80178758 = 2; - src.x = 0.0f; - src.y = 500.0f; - src.z = -10000.0f; + src.x = 0.0f; + src.y = 500.0f; + src.z = -10000.0f; - for (i = 0, actor = &gActors[10]; i < 5; i++, actor++) { - if (actor->obj.status == OBJ_FREE) { - Actor_Initialize(actor); - actor->obj.status = OBJ_ACTIVE; - actor->obj.id = 197; - Matrix_RotateY(gCalcMatrix, M_DTOR * RAND_FLOAT(360.0f), MTXF_NEW); - Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - actor->obj.pos.x = dest.x; - actor->obj.pos.y = dest.y; - actor->obj.pos.z = dest.z; - actor->aiType = i + AI360_10; - actor->health = 24; - actor->timer_0C2 = 30; + for (i = 0, actor = &gActors[10]; i < 5; i++, actor++) { + if (actor->obj.status == OBJ_FREE) { + Actor_Initialize(actor); + actor->obj.status = OBJ_ACTIVE; + actor->obj.id = 197; + Matrix_RotateY(gCalcMatrix, M_DTOR * RAND_FLOAT(360.0f), MTXF_NEW); + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + actor->obj.pos.x = dest.x; + actor->obj.pos.y = dest.y; + actor->obj.pos.z = dest.z; + actor->aiType = i + AI360_10; + actor->health = 24; + actor->timer_0C2 = 30; - Object_SetInfo(&actor->info, actor->obj.id); - actor->info.action = (ObjectFunc) func_versus_800C2244; - break; + Object_SetInfo(&actor->info, actor->obj.id); + actor->info.action = (ObjectFunc) func_versus_800C2244; + break; + } } } } diff --git a/src/mods/fpscounter.c b/src/mods/fpscounter.c index 033c2fbd..2f9a135e 100644 --- a/src/mods/fpscounter.c +++ b/src/mods/fpscounter.c @@ -24,7 +24,8 @@ static void CalculateFrameTimeFromOSTime(OSTime diff) { static void Play_RenderFps(void) { // Toggle rendering framerate with the L button. - if (gControllerPress[0].button & L_TRIG) { + if ((gControllerPress[gMainController].button & L_TRIG) && + !(~gControllerHold[gMainController].button & (Z_TRIG | R_TRIG))) { gRenderFPS ^= 1; } if (gRenderFPS) { diff --git a/src/mods/levelselect.c b/src/mods/levelselect.c index f386ebd4..30cc4d25 100644 --- a/src/mods/levelselect.c +++ b/src/mods/levelselect.c @@ -28,21 +28,23 @@ void Map_LevelSelect(void) { "ZONESS", "CORNERIA", "TITANIA", "AQUAS", "FORTUNA", "VENOM 1", "SOLAR", "VENOM 2", }; static s32 startOption = 0; + // static f32 zStart = 0.0f; // f32 zInc; s32 nextPlanetId; + OSContPad* contPress = &gControllerPress[gMainController]; - if (gControllerPress[0].button & L_JPAD) { + if (contPress->button & L_JPAD) { mission--; if (mission < 0) { mission = 6; } - } else if (gControllerPress[0].button & R_JPAD) { + } else if (contPress->button & R_JPAD) { mission++; if (mission > 6) { mission = 0; } - } else if ((gControllerPress[0].button & U_JPAD) && (mission != 0)) { + } else if ((contPress->button & U_JPAD) && (mission != 0)) { difficulty++; if (difficulty > 2) { difficulty = 0; @@ -50,7 +52,7 @@ void Map_LevelSelect(void) { if ((difficulty == 1) && ((mission == 1) || (mission == 5) || (mission == 6))) { difficulty = 2; } - } else if ((gControllerPress[0].button & D_JPAD) && (mission != 0)) { + } else if ((contPress->button & D_JPAD) && (mission != 0)) { difficulty--; if ((difficulty != 2) && ((mission == 1) || (mission == 5) || (mission == 6))) { difficulty--; @@ -68,17 +70,17 @@ void Map_LevelSelect(void) { Map_801A6368(); Map_801A914C(); } - if (gControllerPress[0].button & L_TRIG) { + if (contPress->button & L_TRIG) { startOption ^= 1; } - // if (gControllerPress[0].button & U_CBUTTONS) { + // if (contPress->button & U_CBUTTONS) { // zInc = 100.0f; - // } else if (gControllerPress[0].button & R_CBUTTONS) { + // } else if (contPress->button & R_CBUTTONS) { // zInc = 1000.0f; - // } else if (gControllerPress[0].button & D_CBUTTONS) { + // } else if (contPress->button & D_CBUTTONS) { // zInc = -100.0f; - // } else if (gControllerPress[0].button & L_CBUTTONS) { + // } else if (contPress->button & L_CBUTTONS) { // zInc = -1000.0f; // } // if (gControllerHold[0].button & R_TRIG) { diff --git a/src/mods/object_ram.c b/src/mods/object_ram.c index 9c748b7d..2ceb3153 100644 --- a/src/mods/object_ram.c +++ b/src/mods/object_ram.c @@ -1,18 +1,15 @@ #include "object_ram.h" static RamEntry oRamEntries[7] = { - ORAM_ENTRY(PlayerShot, 15, obj.id, u8), - ORAM_ENTRY(Player, 0, pos.y, f32), - ORAM_ENTRY(Player, 0, pos.z, f32), - ORAM_ENTRY(Actor, 0, obj.status, x32), - ORAM_OFF, - ORAM_OFF, - ORAM_OFF, + ORAM_ENTRY(Player, 0, unk_20C, s32), ORAM_ENTRY(Player, 0, unk_19C, s32), ORAM_ENTRY(Player, 0, unk_1A0, s32), + ORAM_ENTRY(Player, 0, dmgType, s32), ORAM_ENTRY(Player, 0, unk_2C0, f32), ORAM_ENTRY(Player, 0, xRot_0FC, f32), + ORAM_ENTRY(Player, 0, zRot_0FC, f32), }; static s32 holdTimer = 0; static s32 selectNum = 0; -static RamModMode oRamActive = RAMMOD_OFF; +static bool oRamActive = false; +static RamModMode oRamMode = RAMMOD_OFF; static s32 editMode = EDM_TYPE; static s32 editing = false; static s32 editingValue = false; @@ -662,6 +659,8 @@ void CheatRam_Update(void) { } void RamMod_Update(void) { + static s32 toggle; + static s32 toggle2; contPress = &gControllerPress[gMainController]; contHold = &gControllerHold[gMainController]; @@ -677,12 +676,25 @@ void RamMod_Update(void) { cheats[CHEAT_COMPLETE].hold = false; } - if ((gPlayState == PLAY_PAUSE) && (contPress->button & R_CBUTTONS)) { - oRamActive++; - oRamActive = WRAP_MODE(oRamActive, RAMMOD_MAX); + // if (!(~contHold->button & (R_CBUTTONS | Z_TRIG | R_TRIG))) { + // if(!toggle) { + // oRamActive ^= 1; + // toggle = true; + // } + // } else { + // toggle = false; + // } + + // if(!oRamActive) { + // return; + // } + + if (!(~contHold->button & (Z_TRIG | R_TRIG)) && (contPress->button & R_CBUTTONS)) { + oRamMode++; + oRamMode = WRAP_MODE(oRamMode, RAMMOD_MAX); } - switch (oRamActive) { + switch (oRamMode) { case RAMMOD_OFF: break; case RAMMOD_CHEAT: diff --git a/src/mods/sfxjukebox.c b/src/mods/sfxjukebox.c index 40303f94..b7d3d728 100644 --- a/src/mods/sfxjukebox.c +++ b/src/mods/sfxjukebox.c @@ -1,6 +1,7 @@ #include "global.h" #include "fox_map.h" #include "fox_option.h" +#include "sf64audio_provisional.h" extern s32 spectrumAnalyzerMode; extern bool D_menu_801B9320; @@ -8,100 +9,175 @@ extern s32 D_menu_801B9244; extern OptionId D_menu_801B9124; extern s32 D_menu_801B912C; -u32 prevSfx = 0; -u32 sfx = 0x09000000; -s32 sfxId = 0; -s32 sfxBank = 0; -int holdTimer = 0; +static s32 showJukebox = 0; +static u32 prevSfx = NA_SE_NONE; +static u32 sfx = NA_SE_NONE; +static s32 sfxId = 0; +static u32 sfxBank = SFX_BANK_PLAYER; +static u32 sfxRange = 0; +static s32 sfxImport = 0; +static int holdTimer = 0; +static u8 sfxFlag = 0; +static u8 sfxFlags[] = { 0, 0, 0, 0, 0, 0, 0, 0 }; +static char* flagNames[] = { "F18", "F19", "F20", "F21", "F22", "F23", "STT", "F25", "F26", "SFX" }; +static u8 bankSizes[] = { 0x33, 0x85, 0x9C, 0x9C, 0x37 }; +static u32 sfxEditMode = 9; +static u32 srcEditMode = 0; +static u32 editMode = 0; +static s32 srcVec[3] = { 0, 0, 0 }; +static f32 sfxSource[3] = { 0.0f, 0.0f, 0.0f }; +static OSContPad* contPress; +static OSContPad* contHold; -void decimalToHex(int num, char* hexString, size_t hexStringLength) { - int i; - // Define hexadecimal digits - char hexDigits[] = "0123456789ABCDEF"; - // Check for null pointer or insufficient buffer size - if (hexString == NULL || hexStringLength < 9) { - // You might need to adjust the buffer size based on the maximum expected length - return; - } - - // Ensure the buffer is null-terminated - hexString[8] = '\0'; - - // Iterate through each hex digit - for (i = 7; i >= 0; --i) { - // Extract the 4 bits representing one hex digit - int hexValue = (num >> (i * 4)) & 0xF; - - // Convert the 4-bit value to its corresponding hex character - hexString[7 - i] = hexDigits[hexValue]; +void Jukebox_SelectFlag(u8* flag) { + if (contPress->button & (U_CBUTTONS | D_CBUTTONS | R_CBUTTONS | L_CBUTTONS)) { + *flag ^= 1; } } -void Option_ExpertSoundUpdate(void) { - char hexString[9]; // Buffer to store the hexadecimal string - - if ((gControllerPress[gMainController].button & R_TRIG) && (sfxBank < 4)) { - sfxBank++; - } else if ((gControllerPress[gMainController].button & L_TRIG) && (sfxBank > 0)) { - sfxBank--; +void Jukebox_SelectWrap(u32* option, s32 range) { + if (contPress->button & (U_CBUTTONS | R_CBUTTONS)) { + (*option)++; + } else if (contPress->button & (D_CBUTTONS | L_CBUTTONS)) { + (*option)--; } - sfx &= 0x0FFFFFFF; - sfx |= (sfxBank << 28); + *option = (*option + range) % range; +} - if (gControllerHold[gMainController].button & (U_JPAD | D_JPAD)) { +Jukebox_SelectClamp(s32* option, s32 range, s32 skip) { + if (contHold->button & (U_CBUTTONS | D_CBUTTONS)) { holdTimer++; } else { holdTimer = 0; } - if (((gControllerHold[gMainController].button & U_JPAD) && (holdTimer > 15)) || - (gControllerPress[gMainController].button & U_JPAD)) { - sfxId++; - } else if (((gControllerHold[gMainController].button & D_JPAD) && (holdTimer > 15)) || - (gControllerPress[gMainController].button & D_JPAD)) { - sfxId--; - } else if (gControllerPress[gMainController].button & L_JPAD) { - sfxId -= 0x10; - } else if (gControllerPress[gMainController].button & R_JPAD) { - sfxId += 0x10; + if (((contHold->button & U_CBUTTONS) && (holdTimer > 15)) || (contPress->button & U_CBUTTONS)) { + (*option)++; + } else if (((contHold->button & D_CBUTTONS) && (holdTimer > 15)) || (contPress->button & D_CBUTTONS)) { + (*option)--; + } else if (contPress->button & L_CBUTTONS) { + *option -= skip; + } else if (contPress->button & R_CBUTTONS) { + *option += skip; + } + if (*option < 0) { + *option = 0; + } else if (*option >= range) { + *option = range - 1; + } +} + +void Jukebox_UpdateSource(void) { + if (contPress->button & L_JPAD) { + srcEditMode--; + } else if (contPress->button & R_JPAD) { + srcEditMode++; + } + srcEditMode = (srcEditMode + 3) % 3; + + if (contHold->button & (U_CBUTTONS | D_CBUTTONS | L_CBUTTONS | R_CBUTTONS)) { + holdTimer++; + } else { + holdTimer = 0; } - if (((sfxBank == 0) || (sfxBank == 4)) && (sfxId > 0x3F)) { - sfxId = 0x3F; - } else if (((sfxBank == 2) || (sfxBank == 3)) && (sfxId > 0xA7)) { - sfxId = 0xA7; - } else if ((sfxBank == 1) && (sfxId > 0x8F)) { - sfxId = 0x8F; - } else if (sfxId < 0) { - sfxId = 0; + if (((contHold->button & U_CBUTTONS) && (holdTimer > 15)) || (contPress->button & U_CBUTTONS)) { + sfxSource[srcEditMode] += 100.0f; + } else if (((contHold->button & D_CBUTTONS) && (holdTimer > 15)) || (contPress->button & D_CBUTTONS)) { + sfxSource[srcEditMode] -= 100.0f; + } else if (((contHold->button & R_CBUTTONS) && (holdTimer > 15)) || (contPress->button & R_CBUTTONS)) { + sfxSource[srcEditMode] += 10.0f; + } else if (((contHold->button & L_CBUTTONS) && (holdTimer > 15)) || (contPress->button & L_CBUTTONS)) { + sfxSource[srcEditMode] -= 10.0f; + } +} + +void Jukebox_UpdateSfx(void) { + s32 i; + u16 flags = 0; + + if (contPress->button & L_JPAD) { + sfxEditMode--; + } else if (contPress->button & R_JPAD) { + sfxEditMode++; + } + sfxEditMode = (sfxEditMode + 13) % 13; + switch (sfxEditMode) { + case 9: + Jukebox_SelectWrap(&sfxBank, 5); + break; + case 10: + Jukebox_SelectClamp(&sfxId, bankSizes[sfxBank], 0x10); + break; + case 11: + Jukebox_SelectFlag(&sfxFlag); + break; + case 12: + Jukebox_SelectWrap(&sfxRange, 4); + break; + case 8: + Jukebox_SelectClamp(&sfxImport, 0x100, 0x10); + break; + default: + if ((sfxEditMode >= 0) && (sfxEditMode < 8)) { + Jukebox_SelectFlag(&sfxFlags[sfxEditMode]); + } + break; + } + for (i = 0; i < 8; i++) { + flags |= sfxFlags[i] << (i + (i > 5)); + } + sfx = SFX_PACK(sfxBank, sfxId, sfxRange, sfxImport, (sfxFlag << 27) | (flags << 18)); +} + +s32 sfxModeX[] = { 95, 104, 113, 122, 131, 140, 149, 158, 180, 0, 22, 43, 60 }; +s32 srcModeX[] = { 45, 135, 225 }; + +void Jukebox_Update(void) { + s32 i; + + contPress = &gControllerPress[gMainController]; + contHold = &gControllerHold[gMainController]; + + if (contPress->button & U_JPAD) { + editMode--; + } else if (contPress->button & D_JPAD) { + editMode++; + } + editMode %= 2; + switch (editMode) { + case 0: + Jukebox_UpdateSfx(); + break; + case 1: + Jukebox_UpdateSource(); + break; } - sfx &= 0xFFFFFF00; - sfx |= sfxId & 0xFF; if (prevSfx != sfx) { AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); prevSfx = sfx; } - decimalToHex(sfx, hexString, sizeof(hexString)); - - if (gControllerPress[gMainController].button & A_BUTTON) { + if (contPress->button & A_BUTTON) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); - AUDIO_PLAY_SFX(sfx, gDefaultSfxSource, 4); + AUDIO_PLAY_SFX(sfx, sfxSource, 4); D_menu_801B9320 = true; } - if (gControllerPress[gMainController].button & B_BUTTON) { + if (contPress->button & B_BUTTON) { if (!D_menu_801B9320) { + AUDIO_PLAY_SFX(NA_SE_ARWING_CANCEL, gDefaultSfxSource, 4); AUDIO_PLAY_BGM(NA_BGM_SELECT); gDrawMode = DRAW_NONE; D_menu_801B9124 = 1000; D_menu_801B912C = 0; D_menu_801B9244 = 1; + return; } else { AUDIO_PLAY_SFX(NA_SE_CANCEL, gDefaultSfxSource, 4); - Audio_KillSfxBySource(gDefaultSfxSource); + Audio_KillSfxBySource(sfxSource); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); D_menu_801B9320 = false; @@ -109,7 +185,7 @@ void Option_ExpertSoundUpdate(void) { } // Spectrum Analyzer mode selector - if (gControllerPress[gMainController].button & R_CBUTTONS) { + if (contPress->button & Z_TRIG) { spectrumAnalyzerMode++; if (spectrumAnalyzerMode > 2) { spectrumAnalyzerMode = 0; @@ -121,6 +197,28 @@ void Option_ExpertSoundUpdate(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); - Graphics_DisplaySmallText(20, 50, 1.0f, 1.0f, "SFX ID:"); - Graphics_DisplaySmallText(80, 50, 1.0f, 1.0f, hexString); + Graphics_Printf("SFX ID: %08X", sfx); + Graphics_DisplaySmallText(20, 50, 1.0f, 1.0f, D_801619A0); + Graphics_DisplaySmallText(20, 80, 1.0f, 1.0f, "B ID X R S FLAG IMP"); + Graphics_Printf("%d %02X %d %d %d %d%d%d%d%d%d%d%d %02X", sfxBank, sfxId, sfxFlag, sfxRange, 1, sfxFlags[0], + sfxFlags[1], sfxFlags[2], sfxFlags[3], sfxFlags[4], sfxFlags[5], sfxFlags[6], sfxFlags[7], + sfxImport); + Graphics_DisplaySmallText(20, 70, 1.0f, 1.0f, D_801619A0); + + // Graphics_DisplaySmallText(80, 50, 1.0f, 1.0f, hexString); + for (i = 0; i < 3; i++) { + Graphics_Printf("%5.0f", sfxSource[i]); + Graphics_DisplaySmallText(20 + 90 * i, 100, 1.0f, 1.0f, D_801619A0); + } + Graphics_DisplaySmallText(45, 110, 1.0f, 1.0f, "X"); + Graphics_DisplaySmallText(135, 110, 1.0f, 1.0f, "Y"); + Graphics_DisplaySmallText(225, 110, 1.0f, 1.0f, "Z"); + switch (editMode) { + case 0: + Graphics_DisplaySmallText(20 + sfxModeX[sfxEditMode], 60, 1.0f, 1.0f, "V"); + break; + case 1: + Graphics_DisplaySmallText(45 + 90 * srcEditMode, 90, 1.0f, 1.0f, "V"); + break; + } } diff --git a/src/mods/sfxjukebox2.c b/src/mods/sfxjukebox2.c deleted file mode 100644 index 3ac9d414..00000000 --- a/src/mods/sfxjukebox2.c +++ /dev/null @@ -1,227 +0,0 @@ -#include "global.h" -#include "fox_map.h" -#include "fox_option.h" -#include "sf64audio_provisional.h" - -extern s32 spectrumAnalyzerMode; -extern bool D_menu_801B9320; -extern s32 D_menu_801B9244; -extern OptionId D_menu_801B9124; -extern s32 D_menu_801B912C; - -static s32 showJukebox = 0; -static u32 prevSfx = NA_SE_NONE; -static u32 sfx = NA_SE_NONE; -static s32 sfxId = 0; -static u32 sfxBank = SFX_BANK_PLAYER; -static u32 sfxRange = 0; -static s32 sfxImport = 0; -static int holdTimer = 0; -static u8 sfxFlag = 0; -static u8 sfxFlags[] = { 0, 0, 0, 0, 0, 0, 0, 0 }; -static char* flagNames[] = { "F18", "F19", "F20", "F21", "F22", "F23", "STT", "F25", "F26", "SFX" }; -static u8 bankSizes[] = { 0x33, 0x85, 0x9C, 0x9C, 0x37 }; -static u32 sfxEditMode = 9; -static u32 srcEditMode = 0; -static u32 editMode = 0; -static s32 srcVec[3] = { 0, 0, 0 }; -static f32 sfxSource[3] = { 0.0f, 0.0f, 0.0f }; - -void Jukebox_SelectFlag(u8* flag) { - if (gControllerPress[gMainController].button & (U_CBUTTONS | D_CBUTTONS | R_CBUTTONS | L_CBUTTONS)) { - *flag ^= 1; - } -} - -void Jukebox_SelectWrap(u32* option, s32 range) { - if (gControllerPress[gMainController].button & (U_CBUTTONS | R_CBUTTONS)) { - (*option)++; - } else if (gControllerPress[gMainController].button & (D_CBUTTONS | L_CBUTTONS)) { - (*option)--; - } - *option = (*option + range) % range; -} - -Jukebox_SelectClamp(s32* option, s32 range, s32 skip) { - OSContPad* contPress = &gControllerPress[gMainController]; - OSContPad* contHold = &gControllerHold[gMainController]; - - if (contHold->button & (U_CBUTTONS | D_CBUTTONS)) { - holdTimer++; - } else { - holdTimer = 0; - } - - if (((contHold->button & U_CBUTTONS) && (holdTimer > 15)) || (contPress->button & U_CBUTTONS)) { - (*option)++; - } else if (((contHold->button & D_CBUTTONS) && (holdTimer > 15)) || (contPress->button & D_CBUTTONS)) { - (*option)--; - } else if (contPress->button & L_CBUTTONS) { - *option -= skip; - } else if (contPress->button & R_CBUTTONS) { - *option += skip; - } - if (*option < 0) { - *option = 0; - } else if (*option >= range) { - *option = range - 1; - } -} - -void Jukebox_UpdateSource(void) { - OSContPad* contPress = &gControllerPress[gMainController]; - OSContPad* contHold = &gControllerHold[gMainController]; - - if (contPress->button & L_JPAD) { - srcEditMode--; - } else if (contPress->button & R_JPAD) { - srcEditMode++; - } - srcEditMode = (srcEditMode + 3) % 3; - - if (contHold->button & (U_CBUTTONS | D_CBUTTONS | L_CBUTTONS | R_CBUTTONS)) { - holdTimer++; - } else { - holdTimer = 0; - } - - if (((contHold->button & U_CBUTTONS) && (holdTimer > 15)) || (contPress->button & U_CBUTTONS)) { - sfxSource[srcEditMode] += 100.0f; - } else if (((contHold->button & D_CBUTTONS) && (holdTimer > 15)) || (contPress->button & D_CBUTTONS)) { - sfxSource[srcEditMode] -= 100.0f; - } else if (((contHold->button & R_CBUTTONS) && (holdTimer > 15)) || (contPress->button & R_CBUTTONS)) { - sfxSource[srcEditMode] += 10.0f; - } else if (((contHold->button & L_CBUTTONS) && (holdTimer > 15)) || (contPress->button & L_CBUTTONS)) { - sfxSource[srcEditMode] -= 10.0f; - } -} - -void Jukebox_UpdateSfx(void) { - s32 i; - u16 flags = 0; - - if (gControllerPress[gMainController].button & L_JPAD) { - sfxEditMode--; - } else if (gControllerPress[gMainController].button & R_JPAD) { - sfxEditMode++; - } - sfxEditMode = (sfxEditMode + 13) % 13; - switch (sfxEditMode) { - case 9: - Jukebox_SelectWrap(&sfxBank, 5); - break; - case 10: - Jukebox_SelectClamp(&sfxId, bankSizes[sfxBank], 0x10); - break; - case 11: - Jukebox_SelectFlag(&sfxFlag); - break; - case 12: - Jukebox_SelectWrap(&sfxRange, 4); - break; - case 8: - Jukebox_SelectClamp(&sfxImport, 0x100, 0x10); - break; - default: - if ((sfxEditMode >= 0) && (sfxEditMode < 8)) { - Jukebox_SelectFlag(&sfxFlags[sfxEditMode]); - } - break; - } - for (i = 0; i < 8; i++) { - flags |= sfxFlags[i] << (i + (i > 5)); - } - sfx = SFX_PACK(sfxBank, sfxId, sfxRange, sfxImport, (sfxFlag << 27) | (flags << 18)); -} - -s32 sfxModeX[] = { 95, 104, 113, 122, 131, 140, 149, 158, 180, 0, 22, 43, 60 }; -s32 srcModeX[] = { 45, 135, 225 }; - -void Jukebox_Update(void) { - s32 i; - OSContPad* contPress = &gControllerPress[gMainController]; - OSContPad* contHold = &gControllerHold[gMainController]; - - if (contPress->button & U_JPAD) { - editMode--; - } else if (contPress->button & D_JPAD) { - editMode++; - } - editMode %= 2; - switch (editMode) { - case 0: - Jukebox_UpdateSfx(); - break; - case 1: - Jukebox_UpdateSource(); - break; - } - - if (prevSfx != sfx) { - AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); - prevSfx = sfx; - } - - if (contPress->button & A_BUTTON) { - SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); - SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); - AUDIO_PLAY_SFX(sfx, sfxSource, 4); - D_menu_801B9320 = true; - } - - if (contPress->button & B_BUTTON) { - if (!D_menu_801B9320) { - AUDIO_PLAY_SFX(NA_SE_ARWING_CANCEL, gDefaultSfxSource, 4); - AUDIO_PLAY_BGM(NA_BGM_SELECT); - gDrawMode = DRAW_NONE; - D_menu_801B9124 = 1000; - D_menu_801B912C = 0; - D_menu_801B9244 = 1; - return; - } else { - AUDIO_PLAY_SFX(NA_SE_CANCEL, gDefaultSfxSource, 4); - Audio_KillSfxBySource(sfxSource); - SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); - SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); - D_menu_801B9320 = false; - } - } - - // Spectrum Analyzer mode selector - if (contPress->button & Z_TRIG) { - spectrumAnalyzerMode++; - if (spectrumAnalyzerMode > 2) { - spectrumAnalyzerMode = 0; - } - } - - /* Draw */ - - RCP_SetupDL(&gMasterDisp, SETUPDL_83); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); - - Graphics_Printf("SFX ID: %08X", sfx); - Graphics_DisplaySmallText(20, 50, 1.0f, 1.0f, D_801619A0); - Graphics_DisplaySmallText(20, 80, 1.0f, 1.0f, "B ID X R S FLAG IMP"); - Graphics_Printf("%d %02X %d %d %d %d%d%d%d%d%d%d%d %02X", sfxBank, sfxId, sfxFlag, sfxRange, 1, sfxFlags[0], - sfxFlags[1], sfxFlags[2], sfxFlags[3], sfxFlags[4], sfxFlags[5], sfxFlags[6], sfxFlags[7], - sfxImport); - Graphics_DisplaySmallText(20, 70, 1.0f, 1.0f, D_801619A0); - - // Graphics_DisplaySmallText(80, 50, 1.0f, 1.0f, hexString); - for (i = 0; i < 3; i++) { - Graphics_Printf("%5.0f", sfxSource[i]); - Graphics_DisplaySmallText(20 + 90 * i, 100, 1.0f, 1.0f, D_801619A0); - } - Graphics_DisplaySmallText(45, 110, 1.0f, 1.0f, "X"); - Graphics_DisplaySmallText(135, 110, 1.0f, 1.0f, "Y"); - Graphics_DisplaySmallText(225, 110, 1.0f, 1.0f, "Z"); - switch (editMode) { - case 0: - Graphics_DisplaySmallText(20 + sfxModeX[sfxEditMode], 60, 1.0f, 1.0f, "V"); - break; - case 1: - Graphics_DisplaySmallText(45 + 90 * srcEditMode, 90, 1.0f, 1.0f, "V"); - break; - } -} diff --git a/src/overlays/ovl_ending/fox_end2.c b/src/overlays/ovl_ending/fox_end2.c index 71f44963..97be8082 100644 --- a/src/overlays/ovl_ending/fox_end2.c +++ b/src/overlays/ovl_ending/fox_end2.c @@ -1076,7 +1076,7 @@ void Ending_801926D4(void) { if ((0 <= D_ending_80192E70) && (D_ending_80192E70 < 100)) { D_ending_80192E70 = 100; - if (D_ctx_80177824 == 0) { + if (!gClearPlayerInfo) { D_ending_80198590 = gPlayer[0].wings; } else { D_ending_80198590.rightState = D_ending_80198590.leftState = WINGSTATE_INTACT; diff --git a/src/overlays/ovl_i1/fox_co.c b/src/overlays/ovl_i1/fox_co.c index cd7b7fa4..880d9c9a 100644 --- a/src/overlays/ovl_i1/fox_co.c +++ b/src/overlays/ovl_i1/fox_co.c @@ -2989,7 +2989,7 @@ void Corneria_LevelStart(Player* player) { } if (player->csTimer < 150) { - player->unk_204 = 0; + player->wingPosition = 0; } if ((player->csTimer < 120) && ((player->csTimer % 16) == 0)) { diff --git a/src/overlays/ovl_i1/fox_ve1.c b/src/overlays/ovl_i1/fox_ve1.c index 71be172f..f87fb53a 100644 --- a/src/overlays/ovl_i1/fox_ve1.c +++ b/src/overlays/ovl_i1/fox_ve1.c @@ -494,124 +494,6 @@ void Venom1_80192AA4(Actor* actor) { } } -Gfx* D_VE1_8019A008[17] = { - D_VE1_90150A0, D_VE1_9015BB0, D_VE1_9015900, D_VE1_9000000, D_VE1_9022A20, D_VE1_9021630, - D_VE1_9015480, D_VE1_90007F0, D_VE1_9014DF0, D_VE1_9022D80, D_VE1_901E350, D_VE1_901F990, - D_VE1_901F6D0, D_VE1_9021900, D_VE1_901FC40, D_VE1_9021B80, D_VE1_9013880, -}; -s16 D_i1_8019A04C[3][2] = { { -2500, 300 }, { -1000, 0 }, { -5000, 0 } }; -UnkStruct_i1_8019A058 D_i1_8019A058[33] = { - { { 56.0f, 35.0f, 5.0f }, 70.0f }, { { 64.0f, -86.0f, 5.0f }, 60.0f }, { { 54.0f, 0.0f, 2.0f }, 50.0f }, - { { 54.0f, 4.0f, -2.0f }, 50.0f }, { { 0.0f, 0.0f, 0.0f }, 0.0f }, { { 56.0f, 35.0f, -5.0f }, 70.0f }, - { { 64.0f, -86.0f, -5.0f }, 60.0f }, { { 54.0f, 0.0f, -2.0f }, 50.0f }, { { 54.0f, 0.0f, 2.0f }, 50.0f }, - { { 0.0f, 0.0f, 0.0f }, 0.0f }, { { 24.0f, 18.0f, 4.0f }, 50.0f }, { { 126.0f, -8.0f, 7.0f }, 80.0f }, - { { 23.0f, 10.0f, 0.0f }, 40.0f }, { { 101.0f, 12.0f, 2.0f }, 50.0f }, { { 56.0f, 0.0f, -3.0f }, 50.0f }, - { { 0.0f, 0.0f, 0.0f }, 0.0f }, { { 24.0f, 18.0f, -4.0f }, 50.0f }, { { 126.0f, -8.0f, -7.0f }, 80.0f }, - { { 23.0f, 10.0f, 0.0f }, 40.0f }, { { 101.0f, 12.0f, -2.0f }, 50.0f }, { { 56.0f, 0.0f, 3.0f }, 50.0f }, - { { 0.0f, 0.0f, 0.0f }, 0.0f }, { { 0.0f, 0.0f, 0.0f }, 0.0f }, { { 74.0f, -3.0f, -6.0f }, 60.0f }, - { { 0.0f, 0.0f, 0.0f }, 0.0f }, { { 74.0f, -3.0f, 6.0f }, 60.0f }, { { 44.0f, 0.0f, 0.0f }, 70.0f }, - { { 108.0f, 0.0f, 0.0f }, 160.0f }, { { 0.0f, 0.0f, 0.0f }, 0.0f }, { { 134.0f, 70.0f, 84.0f }, 70.0f }, - { { 134.0f, -70.0f, 84.0f }, 70.0f }, { { 122.0f, 81.0f, -73.0f }, 80.0f }, { { 122.0f, -81.0f, -73.0f }, 80.0f }, -}; -UnkStruct_i1_8019A058 D_i1_8019A268[33] = { - { { 54.0f, -83.0f, 9.0f }, 50.0f }, { { 46.0f, 34.0f, 9.0f }, 60.0f }, { { 48.0f, 0.0f, 9.0f }, 50.0f }, - { { 3.0f, 0.0f, 9.0f }, 30.0f }, { { 70.0f, 0.0f, 6.0f }, 30.0f }, { { 54.0f, -83.0f, -8.0f }, 50.0f }, - { { 46.0f, 34.0f, -8.0f }, 60.0f }, { { 48.0f, 0.0f, -8.0f }, 50.0f }, { { 3.0f, 0.0f, -8.0f }, 30.0f }, - { { 70.0f, 0.0f, -6.0f }, 30.0f }, { { 48.0f, 7.0f, -6.0f }, 50.0f }, { { 156.0f, -3.0f, -6.0f }, 70.0f }, - { { 27.0f, 12.0f, -6.0f }, 40.0f }, { { 100.0f, 18.0f, -6.0f }, 40.0f }, { { 0.0f, 0.0f, -6.0f }, 40.0f }, - { { 80.0f, 2.0f, -6.0f }, 40.0f }, { { 48.0f, 7.0f, 6.0f }, 50.0f }, { { 156.0f, -3.0f, 6.0f }, 70.0f }, - { { 27.0f, 12.0f, 6.0f }, 40.0f }, { { 100.0f, 18.0f, 6.0f }, 50.0f }, { { 0.0f, 0.0f, 6.0f }, 40.0f }, - { { 80.0f, 2.0f, 6.0f }, 40.0f }, { { -4.0f, 6.0f, -6.0f }, 50.0f }, { { 89.0f, -3.0f, -6.0f }, 50.0f }, - { { -4.0f, 6.0f, 6.0f }, 50.0f }, { { 89.0f, -3.0f, 6.0f }, 50.0f }, { { 0.0f, 0.0f, 0.0f }, 50.0f }, - { { 166.0f, 0.0f, 0.0f }, 110.0f }, { { 5.0f, 0.0f, 0.0f }, 60.0f }, { { 115.0f, 0.0f, 0.0f }, 90.0f }, - { { 0.0f, 0.0f, 0.0f }, 0.0f }, { { 0.0f, 0.0f, 0.0f }, 0.0f }, { { 0.0f, 0.0f, 0.0f }, 0.0f }, -}; -s16 D_i1_8019A478[17][4] = { - { 1, 0, 2, 0 }, { 2, 2, 1, 0 }, { 3, 3, 2, 0 }, { 4, 5, 2, 0 }, { 5, 7, 1, 0 }, { 6, 8, 2, 0 }, - { 7, 10, 2, 0 }, { 8, 12, 2, 0 }, { 9, 14, 2, 0 }, { 10, 16, 2, 0 }, { 11, 18, 2, 0 }, { 12, 20, 2, 0 }, - { 16, 22, 2, 0 }, { 17, 24, 2, 0 }, { 20, 26, 1, 0 }, { 21, 27, 2, 0 }, { 25, 29, 4, 0 }, -}; -s16 D_i1_8019A500[33] = { - 0, 0, 1, 2, 2, 3, 3, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 15, 15, 16, 16, 16, 16, -}; -Vec3f D_i1_8019A544[43] = { - { 66.0f, -84.0f, 11.0f }, { 64.0f, -10.0f, -11.0f }, { 69.0f, 54.0f, 11.0f }, { 20.0f, 0.0f, -2.0f }, - { 85.0f, 0.0f, 3.0f }, { 11.0f, 0.0f, 30.0f }, { 63.0f, 0.0f, -12.0f }, { 66.0f, -84.0f, -11.0f }, - { 64.0f, -10.0f, -11.0f }, { 69.0f, 54.0f, -11.0f }, { 20.0f, 0.0f, 2.0f }, { 85.0f, 0.0f, -3.0f }, - { 11.0f, 0.0f, -30.0f }, { 63.0f, 0.0f, 12.0f }, { 40.0f, -18.0f, -6.0f }, { 108.0f, 6.0f, -6.0f }, - { 179.0f, -31.0f, -6.0f }, { 24.0f, -1.0f, -6.0f }, { 92.0f, -7.0f, -6.0f }, { 20.0f, -4.0f, -6.0f }, - { 57.0f, -4.0f, -6.0f }, { 40.0f, -18.0f, 6.0f }, { 108.0f, 6.0f, 6.0f }, { 179.0f, -31.0f, 6.0f }, - { 24.0f, -1.0f, 6.0f }, { 92.0f, -7.0f, 6.0f }, { 20.0f, -4.0f, 6.0f }, { 77.0f, -4.0f, 6.0f }, - { 58.0f, 29.0f, -6.0f }, { 41.0f, -33.0f, -6.0f }, { 109.0f, -22.0f, -6.0f }, { 58.0f, 29.0f, 6.0f }, - { 41.0f, -33.0f, 6.0f }, { 109.0f, -22.0f, 6.0f }, { 24.0f, 0.0f, 0.0f }, { 81.0f, 0.0f, -38.0f }, - { 81.0f, 0.0f, 38.0f }, { 205.0f, -21.0f, 0.0f }, { 58.0f, -21.0f, 98.0f }, { 58.0f, -21.0f, -98.0f }, - { 134.0f, 0.0f, -24.0f }, { 104.0f, 106.0f, -24.0f }, { 104.0f, -106.0f, -24.0f }, -}; -UnkStruct_i1_8019A748 D_i1_8019A748[18] = { - { 1, D_VE1_90150A0, 0, 0 }, { 2, D_VE1_9015BB0, 1, 0 }, { 3, D_VE1_9015900, 2, 0 }, - { 4, D_VE1_9000000, 3, 0 }, { 5, D_VE1_9022A20, 4, 0 }, { 6, D_VE1_9021630, 5, 0 }, - { 7, D_VE1_9015480, 6, 0 }, { 8, D_VE1_90007F0, 7, 0 }, { 9, D_VE1_9014DF0, 8, 0 }, - { 10, D_VE1_9022D80, 9, 0 }, { 11, D_VE1_901E350, 10, 0 }, { 12, D_VE1_901F990, 11, 0 }, - { 13, D_VE1_9024750, 15, 1 }, { 16, D_VE1_901F6D0, 12, 0 }, { 17, D_VE1_9021900, 13, 0 }, - { 20, D_VE1_901FC40, 14, 0 }, { 21, D_VE1_9021B80, 15, 0 }, { 25, D_VE1_9013880, 16, 0 }, -}; -UnkStruct_i1_8019A820 D_i1_8019A820[17] = { - { 1, 50, 0, 3, 1, 2, 5, -1, -1, -1, -1, 1 }, { 2, 60, 3, 2, 0, 2, 5, 0, -1, -1, -1, 1 }, - { 3, 100, 5, 2, 0, 1, 5, 1, -1, -1, -1, 1 }, { 4, 50, 7, 3, 4, 5, 5, -1, -1, -1, -1, 1 }, - { 5, 60, 10, 2, 3, 5, 5, 3, -1, -1, -1, 1 }, { 6, 100, 12, 2, 3, 4, 5, 4, -1, -1, -1, 1 }, - { 7, 40, 14, 3, -1, -1, 5, -1, -1, -1, -1, 1 }, { 8, 50, 17, 2, 6, -1, 5, 6, -1, -1, -1, 1 }, - { 9, 60, 19, 2, 7, -1, 5, 7, -1, -1, -1, 1 }, { 10, 40, 21, 3, -1, -1, 5, -1, -1, -1, -1, 1 }, - { 11, 50, 24, 2, 9, -1, 5, 9, -1, -1, -1, 1 }, { 12, 60, 26, 2, 10, -1, 5, 10, -1, -1, -1, 1 }, - { 16, 100, 28, 3, 8, -1, 5, 8, -1, -1, -1, 1 }, { 17, 100, 31, 3, 11, -1, 5, 11, -1, -1, -1, 1 }, - { 20, 150, 34, 3, -1, -1, 5, -1, -1, -1, -1, 1 }, { 21, 250, 37, 3, -1, -1, 5, 14, 16, 12, 13, 1 }, - { 25, 200, 40, 3, -1, -1, 5, 2, 5, -1, -1, 1 }, -}; -f32 D_VE1_8019A9B8[199] = { - 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -}; -Animation* D_i1_8019ACD4[9] = { - &D_VE1_9018BD0, &D_VE1_901A4B8, &D_VE1_901BDA8, &D_VE1_901DA38, &D_VE1_9024738, - &D_VE1_9024738, &D_VE1_9018BD0, &D_VE1_9010FC4, NULL, -}; -UnkStruct_i1_8019ACF8 D_i1_8019ACF8[2] = { { 0, 1 }, { -1, 0 } }; -UnkStruct_i1_8019ACF8 D_i1_8019AD00[4] = { { 1, 0 }, { 2, 1 }, { 3, 0 }, { -1, 0 } }; -UnkStruct_i1_8019ACF8 D_i1_8019AD10[3] = { { 4, 0 }, { 5, 0 }, { -1, 0 } }; -UnkStruct_i1_8019ACF8 D_i1_8019AD1C[2] = { { 7, 0 }, { -1, 0 } }; -UnkStruct_i1_8019ACF8 D_i1_8019AD24[2] = { { 6, 1 }, { -1, 0 } }; -UnkStruct_i1_8019AD2C D_i1_8019AD2C[5] = { - { D_i1_8019ACF8, 0 }, { D_i1_8019AD00, 0 }, { D_i1_8019AD10, 0 }, { D_i1_8019AD24, 0 }, { D_i1_8019AD1C, 0 }, -}; -s16 D_i1_8019AD54[3] = { 0, 1, -1 }; -Vec3f D_i1_8019AD5C = { 162.0f, 50.0f, 0.0f }; -u8 D_i1_8019AD68[24] = { - 0, 33, 64, 97, 128, 143, 161, 192, 223, 255, 234, 213, 192, 171, 153, 129, 108, 87, 66, 45, 22, 0, 0, 0, -}; -s16 D_i1_8019AD80[16][4] = { - { 0, 0, 0, 1 }, { 1, 0, 0, 1 }, { 0, 1, 0, 1 }, { 0, 0, 8, 1 }, { 0, 0, 0, 1 }, { 0, 1, 0, 1 }, - { 0, 0, 0, 1 }, { 0, 0, 0, 1 }, { 0, 1, 0, 1 }, { 0, 0, 8, 1 }, { 0, 0, 0, 1 }, { 0, 1, 0, 1 }, - { 0, 0, 0, 1 }, { 1, 0, 0, 1 }, { 0, 1, 0, 1 }, { 0, 0, 8, 1 }, -}; -UnkStruct_i1_8019AE00 D_i1_8019AE00[4] = { - { 270.0f, 3, 2 }, - { 90.0f, 2, 3 }, - { 180.0f, 0, 1 }, - { 0.0f, 1, 0 }, -}; -f32 D_i1_8019AE20[6] = { - 258.0f, 0.0f, 0.0f, 133.0f, 0.0f, 0.0f, -}; -Vec3f D_i1_8019AE38 = { 130.0f, 0.0f, 0.0f }; - void Venom1_80192CB0(Actor* actor) { actor->iwork[0] = actor->obj.rot.x; actor->obj.rot.x = 0.0f; @@ -808,6 +690,131 @@ void Venom1_80193540(Scenery* scenery) { } } +Gfx* D_VE1_8019A008[17] = { + D_VE1_90150A0, D_VE1_9015BB0, D_VE1_9015900, D_VE1_9000000, D_VE1_9022A20, D_VE1_9021630, + D_VE1_9015480, D_VE1_90007F0, D_VE1_9014DF0, D_VE1_9022D80, D_VE1_901E350, D_VE1_901F990, + D_VE1_901F6D0, D_VE1_9021900, D_VE1_901FC40, D_VE1_9021B80, D_VE1_9013880, +}; +s16 D_i1_8019A04C[3][2] = { { -2500, 300 }, { -1000, 0 }, { -5000, 0 } }; +UnkStruct_i1_8019A058 D_i1_8019A058[33] = { + { { 56.0f, 35.0f, 5.0f }, 70.0f }, { { 64.0f, -86.0f, 5.0f }, 60.0f }, { { 54.0f, 0.0f, 2.0f }, 50.0f }, + { { 54.0f, 4.0f, -2.0f }, 50.0f }, { { 0.0f, 0.0f, 0.0f }, 0.0f }, { { 56.0f, 35.0f, -5.0f }, 70.0f }, + { { 64.0f, -86.0f, -5.0f }, 60.0f }, { { 54.0f, 0.0f, -2.0f }, 50.0f }, { { 54.0f, 0.0f, 2.0f }, 50.0f }, + { { 0.0f, 0.0f, 0.0f }, 0.0f }, { { 24.0f, 18.0f, 4.0f }, 50.0f }, { { 126.0f, -8.0f, 7.0f }, 80.0f }, + { { 23.0f, 10.0f, 0.0f }, 40.0f }, { { 101.0f, 12.0f, 2.0f }, 50.0f }, { { 56.0f, 0.0f, -3.0f }, 50.0f }, + { { 0.0f, 0.0f, 0.0f }, 0.0f }, { { 24.0f, 18.0f, -4.0f }, 50.0f }, { { 126.0f, -8.0f, -7.0f }, 80.0f }, + { { 23.0f, 10.0f, 0.0f }, 40.0f }, { { 101.0f, 12.0f, -2.0f }, 50.0f }, { { 56.0f, 0.0f, 3.0f }, 50.0f }, + { { 0.0f, 0.0f, 0.0f }, 0.0f }, { { 0.0f, 0.0f, 0.0f }, 0.0f }, { { 74.0f, -3.0f, -6.0f }, 60.0f }, + { { 0.0f, 0.0f, 0.0f }, 0.0f }, { { 74.0f, -3.0f, 6.0f }, 60.0f }, { { 44.0f, 0.0f, 0.0f }, 70.0f }, + { { 108.0f, 0.0f, 0.0f }, 160.0f }, { { 0.0f, 0.0f, 0.0f }, 0.0f }, { { 134.0f, 70.0f, 84.0f }, 70.0f }, + { { 134.0f, -70.0f, 84.0f }, 70.0f }, { { 122.0f, 81.0f, -73.0f }, 80.0f }, { { 122.0f, -81.0f, -73.0f }, 80.0f }, +}; +UnkStruct_i1_8019A058 D_i1_8019A268[33] = { + { { 54.0f, -83.0f, 9.0f }, 50.0f }, { { 46.0f, 34.0f, 9.0f }, 60.0f }, { { 48.0f, 0.0f, 9.0f }, 50.0f }, + { { 3.0f, 0.0f, 9.0f }, 30.0f }, { { 70.0f, 0.0f, 6.0f }, 30.0f }, { { 54.0f, -83.0f, -8.0f }, 50.0f }, + { { 46.0f, 34.0f, -8.0f }, 60.0f }, { { 48.0f, 0.0f, -8.0f }, 50.0f }, { { 3.0f, 0.0f, -8.0f }, 30.0f }, + { { 70.0f, 0.0f, -6.0f }, 30.0f }, { { 48.0f, 7.0f, -6.0f }, 50.0f }, { { 156.0f, -3.0f, -6.0f }, 70.0f }, + { { 27.0f, 12.0f, -6.0f }, 40.0f }, { { 100.0f, 18.0f, -6.0f }, 40.0f }, { { 0.0f, 0.0f, -6.0f }, 40.0f }, + { { 80.0f, 2.0f, -6.0f }, 40.0f }, { { 48.0f, 7.0f, 6.0f }, 50.0f }, { { 156.0f, -3.0f, 6.0f }, 70.0f }, + { { 27.0f, 12.0f, 6.0f }, 40.0f }, { { 100.0f, 18.0f, 6.0f }, 50.0f }, { { 0.0f, 0.0f, 6.0f }, 40.0f }, + { { 80.0f, 2.0f, 6.0f }, 40.0f }, { { -4.0f, 6.0f, -6.0f }, 50.0f }, { { 89.0f, -3.0f, -6.0f }, 50.0f }, + { { -4.0f, 6.0f, 6.0f }, 50.0f }, { { 89.0f, -3.0f, 6.0f }, 50.0f }, { { 0.0f, 0.0f, 0.0f }, 50.0f }, + { { 166.0f, 0.0f, 0.0f }, 110.0f }, { { 5.0f, 0.0f, 0.0f }, 60.0f }, { { 115.0f, 0.0f, 0.0f }, 90.0f }, + { { 0.0f, 0.0f, 0.0f }, 0.0f }, { { 0.0f, 0.0f, 0.0f }, 0.0f }, { { 0.0f, 0.0f, 0.0f }, 0.0f }, +}; +s16 D_i1_8019A478[17][4] = { + { 1, 0, 2, 0 }, { 2, 2, 1, 0 }, { 3, 3, 2, 0 }, { 4, 5, 2, 0 }, { 5, 7, 1, 0 }, { 6, 8, 2, 0 }, + { 7, 10, 2, 0 }, { 8, 12, 2, 0 }, { 9, 14, 2, 0 }, { 10, 16, 2, 0 }, { 11, 18, 2, 0 }, { 12, 20, 2, 0 }, + { 16, 22, 2, 0 }, { 17, 24, 2, 0 }, { 20, 26, 1, 0 }, { 21, 27, 2, 0 }, { 25, 29, 4, 0 }, +}; +s16 D_i1_8019A500[33] = { + 0, 0, 1, 2, 2, 3, 3, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 15, 15, 16, 16, 16, 16, +}; +Vec3f D_i1_8019A544[43] = { + { 66.0f, -84.0f, 11.0f }, { 64.0f, -10.0f, -11.0f }, { 69.0f, 54.0f, 11.0f }, { 20.0f, 0.0f, -2.0f }, + { 85.0f, 0.0f, 3.0f }, { 11.0f, 0.0f, 30.0f }, { 63.0f, 0.0f, -12.0f }, { 66.0f, -84.0f, -11.0f }, + { 64.0f, -10.0f, -11.0f }, { 69.0f, 54.0f, -11.0f }, { 20.0f, 0.0f, 2.0f }, { 85.0f, 0.0f, -3.0f }, + { 11.0f, 0.0f, -30.0f }, { 63.0f, 0.0f, 12.0f }, { 40.0f, -18.0f, -6.0f }, { 108.0f, 6.0f, -6.0f }, + { 179.0f, -31.0f, -6.0f }, { 24.0f, -1.0f, -6.0f }, { 92.0f, -7.0f, -6.0f }, { 20.0f, -4.0f, -6.0f }, + { 57.0f, -4.0f, -6.0f }, { 40.0f, -18.0f, 6.0f }, { 108.0f, 6.0f, 6.0f }, { 179.0f, -31.0f, 6.0f }, + { 24.0f, -1.0f, 6.0f }, { 92.0f, -7.0f, 6.0f }, { 20.0f, -4.0f, 6.0f }, { 77.0f, -4.0f, 6.0f }, + { 58.0f, 29.0f, -6.0f }, { 41.0f, -33.0f, -6.0f }, { 109.0f, -22.0f, -6.0f }, { 58.0f, 29.0f, 6.0f }, + { 41.0f, -33.0f, 6.0f }, { 109.0f, -22.0f, 6.0f }, { 24.0f, 0.0f, 0.0f }, { 81.0f, 0.0f, -38.0f }, + { 81.0f, 0.0f, 38.0f }, { 205.0f, -21.0f, 0.0f }, { 58.0f, -21.0f, 98.0f }, { 58.0f, -21.0f, -98.0f }, + { 134.0f, 0.0f, -24.0f }, { 104.0f, 106.0f, -24.0f }, { 104.0f, -106.0f, -24.0f }, +}; +UnkStruct_i1_8019A748 D_i1_8019A748[18] = { + { 1, D_VE1_90150A0, 0, 0 }, { 2, D_VE1_9015BB0, 1, 0 }, { 3, D_VE1_9015900, 2, 0 }, + { 4, D_VE1_9000000, 3, 0 }, { 5, D_VE1_9022A20, 4, 0 }, { 6, D_VE1_9021630, 5, 0 }, + { 7, D_VE1_9015480, 6, 0 }, { 8, D_VE1_90007F0, 7, 0 }, { 9, D_VE1_9014DF0, 8, 0 }, + { 10, D_VE1_9022D80, 9, 0 }, { 11, D_VE1_901E350, 10, 0 }, { 12, D_VE1_901F990, 11, 0 }, + { 13, D_VE1_9024750, 15, 1 }, { 16, D_VE1_901F6D0, 12, 0 }, { 17, D_VE1_9021900, 13, 0 }, + { 20, D_VE1_901FC40, 14, 0 }, { 21, D_VE1_9021B80, 15, 0 }, { 25, D_VE1_9013880, 16, 0 }, +}; +UnkStruct_i1_8019A820 D_i1_8019A820[17] = { + { 1, 50, 0, 3, 1, 2, 5, -1, -1, -1, -1, 1 }, { 2, 60, 3, 2, 0, 2, 5, 0, -1, -1, -1, 1 }, + { 3, 100, 5, 2, 0, 1, 5, 1, -1, -1, -1, 1 }, { 4, 50, 7, 3, 4, 5, 5, -1, -1, -1, -1, 1 }, + { 5, 60, 10, 2, 3, 5, 5, 3, -1, -1, -1, 1 }, { 6, 100, 12, 2, 3, 4, 5, 4, -1, -1, -1, 1 }, + { 7, 40, 14, 3, -1, -1, 5, -1, -1, -1, -1, 1 }, { 8, 50, 17, 2, 6, -1, 5, 6, -1, -1, -1, 1 }, + { 9, 60, 19, 2, 7, -1, 5, 7, -1, -1, -1, 1 }, { 10, 40, 21, 3, -1, -1, 5, -1, -1, -1, -1, 1 }, + { 11, 50, 24, 2, 9, -1, 5, 9, -1, -1, -1, 1 }, { 12, 60, 26, 2, 10, -1, 5, 10, -1, -1, -1, 1 }, + { 16, 100, 28, 3, 8, -1, 5, 8, -1, -1, -1, 1 }, { 17, 100, 31, 3, 11, -1, 5, 11, -1, -1, -1, 1 }, + { 20, 150, 34, 3, -1, -1, 5, -1, -1, -1, -1, 1 }, { 21, 250, 37, 3, -1, -1, 5, 14, 16, 12, 13, 1 }, + { 25, 200, 40, 3, -1, -1, 5, 2, 5, -1, -1, 1 }, +}; +f32 D_VE1_8019A9B8[199] = { + 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, +}; +Animation* D_i1_8019ACD4[9] = { + &D_VE1_9018BD0, &D_VE1_901A4B8, &D_VE1_901BDA8, &D_VE1_901DA38, &D_VE1_9024738, + &D_VE1_9024738, &D_VE1_9018BD0, &D_VE1_9010FC4, NULL, +}; +UnkStruct_i1_8019ACF8 D_i1_8019ACF8[2] = { { 0, 1 }, { -1, 0 } }; +UnkStruct_i1_8019ACF8 D_i1_8019AD00[4] = { { 1, 0 }, { 2, 1 }, { 3, 0 }, { -1, 0 } }; +UnkStruct_i1_8019ACF8 D_i1_8019AD10[3] = { { 4, 0 }, { 5, 0 }, { -1, 0 } }; +UnkStruct_i1_8019ACF8 D_i1_8019AD1C[2] = { { 7, 0 }, { -1, 0 } }; +UnkStruct_i1_8019ACF8 D_i1_8019AD24[2] = { { 6, 1 }, { -1, 0 } }; +UnkStruct_i1_8019AD2C D_i1_8019AD2C[5] = { + { D_i1_8019ACF8, 0 }, { D_i1_8019AD00, 0 }, { D_i1_8019AD10, 0 }, { D_i1_8019AD24, 0 }, { D_i1_8019AD1C, 0 }, +}; +s16 D_i1_8019AD54[3] = { 0, 1, -1 }; +Vec3f D_i1_8019AD5C = { 162.0f, 50.0f, 0.0f }; +u8 D_i1_8019AD68[24] = { + 0, 33, 64, 97, 128, 143, 161, 192, 223, 255, 234, 213, 192, 171, 153, 129, 108, 87, 66, 45, 22, 0, 0, 0, +}; +typedef struct { + s16 unk_0; + s16 unk_2; + s16 unk_4; + s16 unk_6; +} UnkStruct_i1_8019AD80; + +s16 D_i1_8019AD80[16][4] = { + { 0, 0, 0, 1 }, { 1, 0, 0, 1 }, { 0, 1, 0, 1 }, { 0, 0, 8, 1 }, { 0, 0, 0, 1 }, { 0, 1, 0, 1 }, + { 0, 0, 0, 1 }, { 0, 0, 0, 1 }, { 0, 1, 0, 1 }, { 0, 0, 8, 1 }, { 0, 0, 0, 1 }, { 0, 1, 0, 1 }, + { 0, 0, 0, 1 }, { 1, 0, 0, 1 }, { 0, 1, 0, 1 }, { 0, 0, 8, 1 }, +}; +UnkStruct_i1_8019AE00 D_i1_8019AE00[4] = { + { 270.0f, 3, 2 }, + { 90.0f, 2, 3 }, + { 180.0f, 0, 1 }, + { 0.0f, 1, 0 }, +}; +f32 D_i1_8019AE20[6] = { + 258.0f, 0.0f, 0.0f, 133.0f, 0.0f, 0.0f, +}; +Vec3f D_i1_8019AE38 = { 130.0f, 0.0f, 0.0f }; + void Venom1_Boss319_Init(Boss319* this) { s32 i; s32 var_v0; @@ -1094,7 +1101,7 @@ void Venom1_Boss_Update(Boss* boss) { s32 is4; s32 is7; s32 pad1; - f32 pad2; + UnkStruct_i1_8019ACF8* pad2; s32 spB8; s32 spB4; f32 temp_fs0; @@ -1295,6 +1302,7 @@ void Venom1_Boss_Update(Boss* boss) { func_effect_8007D2C8(spF8.x, spF8.y, spF8.z, D_i1_8019AD80[is4][2]); } for (is1 = 0; is1 < D_i1_8019AD80[is4][0]; is1++) { + if (boss->sfxSource) {} actor = Game_SpawnActor(OBJ_ACTOR_DEBRIS); if (actor != NULL) { actor->obj.status = OBJ_ACTIVE; @@ -1317,6 +1325,7 @@ void Venom1_Boss_Update(Boss* boss) { actor->vel.z = 20.0f + RAND_FLOAT_CENTERED(2.0f); actor->fwork[0] = 5.0f + RAND_FLOAT_CENTERED(1.0f); actor->fwork[1] = 5.0f + RAND_FLOAT_CENTERED(1.0f); + D_i1_8019C0B8 += 0; actor->fwork[2] = 5.0f + RAND_FLOAT_CENTERED(1.0f); actor->gravity = 1.0f; } @@ -1508,11 +1517,9 @@ void Venom1_Boss_Update(Boss* boss) { } } if ((boss->state == 0) && (boss->swork[20] == 0)) { - if (is4 > 0) { - if (boss->swork[21] < (is4 - 1) / 5) { - boss->swork[21] = (is4 - 1) / 5; - boss->swork[20] = 1; - } + if ((is4 > 0) && (boss->swork[21] < (is4 - 1) / 5)) { + boss->swork[21] = (is4 - 1) / 5; + boss->swork[20] = 1; } if (D_i1_8019C0C0 == 1) { D_i1_8019C0C0 = 0; @@ -1591,6 +1598,7 @@ void Venom1_Boss_Update(Boss* boss) { break; } } + switch (boss->state) { case 0: case 1: @@ -1637,11 +1645,10 @@ void Venom1_Boss_Update(Boss* boss) { D_i1_8019B7F0[spF4] = 0; } } - break; } is4 = 0; - for (spF4 = 0; spF4 < 17; spF4++) { + for (spF4 = 0; spF4 < 17U; spF4++) { is4 += (D_i1_8019B838[spF4].unk_00 < 0) ? 0 : D_i1_8019B838[spF4].unk_00; } boss->swork[30] = boss->health + is4; @@ -1743,7 +1750,7 @@ void Venom1_Boss_Update(Boss* boss) { } temp_fs0 = gPlayer[0].trueZpos + boss->fwork[2] - boss->obj.pos.z; if ((fabsf(temp_fs0) <= 70.0f) && (boss->state == 3)) { - boss->swork[5] = D_i1_8019AD2C[4].unk_0[0].unk_0; + boss->swork[5] = D_i1_8019AD2C[4].unk_0->unk_0; boss->swork[4] = boss->swork[4]; boss->fwork[0] = 0.0f; boss->fwork[10] = 0.0f; @@ -2041,11 +2048,14 @@ void Venom1_Boss_Update(Boss* boss) { temp_fv1 = gPlayer[0].pos.z - boss->obj.pos.z; // is0 = boss->swork[1]; // is5 = boss->swork[2]; - pad1 = spE8; // probably fake, but unclear how to resolve - if ((pad1 != 0) && (D_i1_8019AD2C[boss->swork[1]].unk_0[boss->swork[2]].unk_2 & 1) && (boss->swork[3] != 0)) { - spE4 = 1; - if (boss->swork[3] > 0) { - boss->swork[3]--; + // pad1 = spE8; // probably fake, but unclear how to resolve + if (spE8 != 0) { + pad2 = D_i1_8019AD2C[boss->swork[1]].unk_0; + if ((pad2[boss->swork[2]].unk_2 & 1) && (boss->swork[3] != 0)) { + spE4 = 1; + if (boss->swork[3] > 0) { + boss->swork[3]--; + } } } @@ -2053,10 +2063,10 @@ void Venom1_Boss_Update(Boss* boss) { D_i1_8019C0BC = 0; } if ((D_i1_8019C0BC != 0) && (boss->swork[1] != 2) && (boss->state < 3)) { - pad1 |= 2; + spE8 |= 2; spE4 = 1; } - if (pad1 != 0) { + if (spE8 != 0) { is0 = boss->swork[1]; is5 = boss->swork[2] - spE4 + 1; is1 = boss->swork[4]; @@ -2066,13 +2076,14 @@ void Venom1_Boss_Update(Boss* boss) { is5 = 0; is0 = 2; } else { - pad1 &= ~2; + spE8 &= ~2; } D_i1_8019C0BC = 0; } - if (((pad1 & 1) == 1) && (D_i1_8019AD2C[is0].unk_0[is5].unk_0 == -1)) { + pad2 = D_i1_8019AD2C[is0].unk_0; + if (((spE8 & 1) == 1) && (pad2[is5].unk_0 == -1)) { is5 = 0; - spE8 = pad1; + // spE8 = pad1; do { is4 = 0; is1 = boss->swork[4] + 1; @@ -2115,10 +2126,11 @@ void Venom1_Boss_Update(Boss* boss) { D_i1_8019C0B8 = 0; } } while (is4 != 0); - pad1 = spE8; + // pad1 = spE8; } - is2 = D_i1_8019AD2C[is0].unk_0[is5].unk_0; - if (pad1 != 0) { + pad2 = D_i1_8019AD2C[is0].unk_0; + is2 = pad2[is5].unk_0; + if (spE8 != 0) { boss->swork[27] = 0; switch (is2) { @@ -2173,7 +2185,7 @@ void Venom1_Boss_Update(Boss* boss) { } } if ((boss->health <= 0) && (boss->state == 2) && (boss->swork[1] != 2) && (boss->obj.pos.y <= 0)) { - boss->swork[5] = D_i1_8019AD2C[3].unk_0[0].unk_0; + boss->swork[5] = D_i1_8019AD2C[3].unk_0->unk_0; boss->swork[4] = boss->swork[4]; boss->swork[9] = 3; boss->swork[3] = -1; @@ -2184,7 +2196,6 @@ void Venom1_Boss_Update(Boss* boss) { boss->swork[1] = 3; boss->swork[2] = 0; boss->swork[6] = 4; - SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 0); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 0); } @@ -2250,18 +2261,17 @@ void Venom1_Boss_Update(Boss* boss) { var_fv0 = -1500.0f; for (spF4 = 0; spF4 < ARRAY_COUNT(gActors); spF4++, actor++) { if (actor->obj.status == OBJ_FREE) { - - while ((is3 > boss->swork[22]) && - (gPlayer[0].pos.z + var_fv0) <= (temp_fs0 + D_i1_80199CD0[is4][is3].z)) { + while ((is3 < boss->swork[22]) && + (D_i1_80199B40[is4][is3].z + temp_fs0) >= (gPlayer[0].pos.z + var_fv0)) { is3++; } if (is3 <= boss->swork[22]) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; actor->obj.id = OBJ_ACTOR_280; - actor->obj.pos.x = D_i1_80199CD0[is4][is3].x; - actor->obj.pos.y = D_i1_80199CD0[is4][is3].y; - actor->obj.pos.z = D_i1_80199CD0[is4][is3].z + boss->obj.pos.z; + actor->obj.pos.x = D_i1_80199B40[is4][is3].x; + actor->obj.pos.y = D_i1_80199B40[is4][is3].y; + actor->obj.pos.z = D_i1_80199B40[is4][is3].z + boss->obj.pos.z; actor->obj.rot.y = 180.0f; actor->state = 1; Object_SetInfo(&actor->info, actor->obj.id); @@ -2280,10 +2290,10 @@ void Venom1_Boss_Update(Boss* boss) { actor = gActors; is4 = boss->swork[23]; temp_fs0 = boss->obj.pos.z; - var_fv0 = (gPlayer[0].pos.z + -1500.0f); + var_fv0 = gPlayer[0].pos.z + -1500.0f; for (spF4 = 0; spF4 < ARRAY_COUNT(gActors); spF4++, actor++) { if (actor->obj.status == OBJ_FREE) { - while ((is3 > D_i1_80199E60[is4]) && (var_fv0) <= (temp_fs0 + D_i1_80199E6C[is4][is3].z)) { + while ((is3 < D_i1_80199E60[is4]) && (D_i1_80199E6C[is4][is3].z + temp_fs0 >= var_fv0)) { is3++; } if (is3 <= D_i1_80199E60[is4]) { diff --git a/src/overlays/ovl_i2/fox_sx.c b/src/overlays/ovl_i2/fox_sx.c index 64319094..d7a92903 100644 --- a/src/overlays/ovl_i2/fox_sx.c +++ b/src/overlays/ovl_i2/fox_sx.c @@ -1,4 +1,4 @@ -#include "prevent_bss_reordering.h" +// #include "prevent_bss_reordering.h" #include "global.h" #include "assets/ast_sector_x.h" @@ -1073,7 +1073,7 @@ void SectorX_80190078(Boss* boss) { if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_NEXT) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_DOWN)) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].csState = 0; - gPlayer[0].unk_234 = 1; + gPlayer[0].draw = true; } Object_Kill(&boss->obj, boss->sfxSource); gMissionStatus = boss->swork[6]; diff --git a/src/overlays/ovl_i3/fox_a6.c b/src/overlays/ovl_i3/fox_a6.c index 676906c8..596b6ab6 100644 --- a/src/overlays/ovl_i3/fox_a6.c +++ b/src/overlays/ovl_i3/fox_a6.c @@ -2686,7 +2686,7 @@ void Area6_LevelComplete(Player* player) { } if (gCsFrameCount == 60) { - player->unk_234 = 0; + player->draw = false; player->baseSpeed = 0.0f; } @@ -2763,7 +2763,7 @@ void Area6_LevelComplete(Player* player) { } if (gCsFrameCount == 300) { - player->unk_234 = 1; + player->draw = true; player->pos.x = 0.0f; player->pos.y = 200.0f; diff --git a/src/overlays/ovl_i3/fox_aq.c b/src/overlays/ovl_i3/fox_aq.c index 98c3fb2c..0a883288 100644 --- a/src/overlays/ovl_i3/fox_aq.c +++ b/src/overlays/ovl_i3/fox_aq.c @@ -648,7 +648,7 @@ void Aquas_801AA20C(void) { f32 var_fs2; s32 i; - if (gPlayer[0].unk_234 != 0) { + if (gPlayer[0].draw) { Matrix_Push(&gGfxMatrix); Math_SmoothStepToF(&D_i3_801C41B8[5], 3.0f, 1.0f, 4.0f, 0.0001f); RCP_SetupDL(&gMasterDisp, SETUPDL_61); @@ -720,25 +720,25 @@ void Aquas_801AA4BC(Player* player) { if ((gInputPress->button & Z_TRIG) && (player->unk_230 == 0)) { player->sfx.bank = 1; - if (player->barrelInputTimerL != 0) { - player->barrelRoll = 1; - player->timer_1E8 = 10; + if (player->rollInputTimerL != 0) { + player->rollState = 1; + player->rollTimer = 10; player->rollRate = player->baseRollRate = 30; player->sfx.roll = 1; } else { - player->barrelInputTimerL = 10; + player->rollInputTimerL = 10; } } if ((gInputPress->button & R_TRIG) && (player->unk_230 == 0)) { player->sfx.bank = 1; - if (player->barrelInputTimerR != 0) { - player->barrelRoll = 1; - player->timer_1E8 = 10; + if (player->rollInputTimerR != 0) { + player->rollState = 1; + player->rollTimer = 10; player->rollRate = player->baseRollRate = -30; player->sfx.roll = 1; } else { - player->barrelInputTimerR = 10; + player->rollInputTimerR = 10; } } @@ -753,15 +753,15 @@ void Aquas_801AA4BC(Player* player) { } } - if (player->barrelRoll == 0) { + if (player->rollState == 0) { Math_SmoothStepToF(&player->zRotBarrelRoll, 0.0f, 0.1f, 10.0f, 0.00001f); } - if (player->barrelInputTimerL != 0) { - player->barrelInputTimerL--; + if (player->rollInputTimerL != 0) { + player->rollInputTimerL--; } - if (player->barrelInputTimerR != 0) { - player->barrelInputTimerR--; + if (player->rollInputTimerR != 0) { + player->rollInputTimerR--; } if (player->timer_214 != 0) { @@ -770,16 +770,16 @@ void Aquas_801AA4BC(Player* player) { if (player->timer_218 != 0) { player->timer_218--; } - if (player->timer_1E8 != 0) { - player->timer_1E8--; + if (player->rollTimer != 0) { + player->rollTimer--; } - if (player->barrelRoll != 0) { - player->barrelInputTimerL = player->barrelInputTimerR = 0; + if (player->rollState != 0) { + player->rollInputTimerL = player->rollInputTimerR = 0; player->unk_150 = 1.5f; player->zRotBarrelRoll += player->rollRate; - if (player->timer_1E8 == 0) { + if (player->rollTimer == 0) { if (player->rollRate > 0) { player->rollRate -= 5; } @@ -787,7 +787,7 @@ void Aquas_801AA4BC(Player* player) { player->rollRate += 5; } if (player->rollRate == 0) { - player->barrelRoll = 0; + player->rollState = 0; } } else { if (player->barrelRollAlpha < 180) { @@ -1073,7 +1073,7 @@ void Aquas_BlueMarineMove(Player* player) { } } -void Aquas_801AB9B0(Player* player) { +void Aquas_BlueMarineDown(Player* player) { func_effect_8007D0E0(player->pos.x, player->pos.y, player->trueZpos, 6.0f); func_effect_8007B344(player->pos.x, player->pos.y, player->trueZpos, 3.0f, 5); func_effect_8007BFFC(player->pos.x, player->pos.y, player->trueZpos, 0.0f, 0.0f, 0.0f, 3.0f, 80); @@ -5452,7 +5452,7 @@ void Aquas_801BADF8(Actor* actor) { actor->dmgType = DMG_NONE; if (actor->damage == 0) { gPlayer[0].hitTimer = 6; - gPlayer[0].unk_21C = 0; + gPlayer[0].hitDirection = 0; } actor->state++; } diff --git a/src/overlays/ovl_i3/fox_so.c b/src/overlays/ovl_i3/fox_so.c index 3d6fd0a6..6cdd7512 100644 --- a/src/overlays/ovl_i3/fox_so.c +++ b/src/overlays/ovl_i3/fox_so.c @@ -3135,7 +3135,7 @@ void Solar_LevelComplete(Player* player) { player->wings.unk_04 = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = player->zRotBarrelRoll = player->zRotBank = player->boostSpeed = 0.0f; - player->unk_234 = 1; + player->draw = true; gCsCamEyeX = player->cam.eye.x; gCsCamEyeY = player->cam.eye.y; diff --git a/src/overlays/ovl_i3/fox_zo.c b/src/overlays/ovl_i3/fox_zo.c index 861fd3d3..81080d1a 100644 --- a/src/overlays/ovl_i3/fox_zo.c +++ b/src/overlays/ovl_i3/fox_zo.c @@ -4475,7 +4475,7 @@ void Zoness_LevelComplete(Player* player) { player->aerobaticPitch = 0.0f; player->camRoll = 0.0f; player->baseSpeed = 40.0f; - player->unk_234 = 1; + player->draw = true; player->wings.unk_04 = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = player->zRotBarrelRoll = player->zRotBank = player->boostSpeed = 0.0f; gCsCamEyeX = player->cam.eye.x; diff --git a/src/overlays/ovl_i4/fox_bo.c b/src/overlays/ovl_i4/fox_bo.c index 761c2328..b8afe00b 100644 --- a/src/overlays/ovl_i4/fox_bo.c +++ b/src/overlays/ovl_i4/fox_bo.c @@ -7,6 +7,9 @@ #include "global.h" #include "assets/ast_bolse.h" #include "prevent_bss_reordering.h" + +extern s32 dummy200; + struct Dummy200 { int x; }; @@ -64,9 +67,6 @@ struct Dummy223 { struct Dummy224 { int x; }; -struct Dummy225 { - int x; -}; typedef struct UnkStruct_D_i4_801A03E0 { f32 unk_00; @@ -346,7 +346,7 @@ void Bolse_UpdateEventHandler(Actor* this) { player->unk_014 = 0.0f; D_hud_80161708 = 0; } - gPauseEnabled = 0; + gPauseEnabled = false; break; case 10: @@ -1192,7 +1192,7 @@ void Bolse_LevelStart(Player* player) { gCsCamAtZ = player->pos.z; player->csState = 1; - player->unk_204 = 1; + player->wingPosition = 1; D_ctx_80177A48[0] = 1.0f; gFillScreenAlpha = gFillScreenAlphaTarget = 255; @@ -1299,7 +1299,7 @@ void Bolse_LevelStart(Player* player) { Math_SmoothStepToF(&player->rot.z, 0.0f, 0.1f, 1.0f, 0.0f); if (gCsFrameCount == 200) { - player->unk_204 = 2; + player->wingPosition = 2; } if (gCsFrameCount == 270) { @@ -1458,7 +1458,7 @@ void Bolse_LevelComplete(Player* player) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); gCsFrameCount = 0; gGroundHeight = -10000.0f; - player->unk_240 = 1; + player->hideShadow = true; player->wings.modelId = 1; AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_EXPLOSION, actor50->sfxSource, 0); Audio_StartPlayerNoise(0); @@ -1539,7 +1539,7 @@ void Bolse_LevelComplete(Player* player) { break; case 235: - player->unk_204 = 1; + player->wingPosition = 1; gLevelClearScreenTimer = 100; break; diff --git a/src/overlays/ovl_i4/fox_fo.c b/src/overlays/ovl_i4/fox_fo.c index c42d3313..d2d6b630 100644 --- a/src/overlays/ovl_i4/fox_fo.c +++ b/src/overlays/ovl_i4/fox_fo.c @@ -299,7 +299,7 @@ void Fortuna_UpdateEvents(Actor* actor) { player->unk_014 = 0.0f; D_hud_80161708 = 0; } - gPauseEnabled = 0; + gPauseEnabled = false; break; case 5: @@ -747,7 +747,7 @@ void Fortuna_LevelComplete(Player* player) { Audio_StopPlayerNoise(0); Audio_KillSfxBySource(player->sfxSource); - player->unk_234 = 0; + player->draw = false; gFillScreenAlpha = 255; gFillScreenAlphaTarget = 255; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; @@ -818,7 +818,7 @@ void Fortuna_LevelComplete(Player* player) { player->pos.z = -10000.0f; gCsFrameCount = 0; player->wings.modelId = 1; - player->unk_204 = 1; + player->wingPosition = 1; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 100); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 100); Audio_StartPlayerNoise(0); @@ -829,7 +829,7 @@ void Fortuna_LevelComplete(Player* player) { break; case 10: - player->unk_234 = 1; + player->draw = true; gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 4; player->cam.eye.x = 400.0f; @@ -1126,7 +1126,7 @@ void Fortuna_LevelComplete(Player* player) { actor0->info.bonus = 1; gCsFrameCount = 0; player->csState = 21; - player->unk_234 = 1; + player->draw = true; for (i = 0; i < 9; i++) { D_ctx_80177A48[i] = 0.0f; diff --git a/src/overlays/ovl_i4/fox_ka.c b/src/overlays/ovl_i4/fox_ka.c index ea4f24c9..39a46533 100644 --- a/src/overlays/ovl_i4/fox_ka.c +++ b/src/overlays/ovl_i4/fox_ka.c @@ -4,6 +4,7 @@ * Description: Level: Katina */ +#include "prevent_bss_reordering.h" #include "global.h" #include "assets/ast_katina.h" @@ -1217,7 +1218,7 @@ void Katina_BossUpdate(Saucerer* this) { if (this->timer_050 == 500) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].csState = 100; - gPlayer[0].unk_234 = 0; + gPlayer[0].draw = false; gCsFrameCount = 5000; } @@ -1371,7 +1372,7 @@ void Katina_BossUpdate(Saucerer* this) { if (gFillScreenAlpha == 255) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].csState = 2; - gPlayer[0].unk_234 = 1; + gPlayer[0].draw = true; gCsFrameCount = 200; @@ -1811,7 +1812,7 @@ void Katina_LevelComplete(Player* player) { case 0: Audio_StopSfxByBankAndSource(1, &player->sfxSource[0]); gCsFrameCount = 0; - player->unk_234 = 1; + player->draw = true; player->pos.x = boss->obj.pos.x; player->pos.y = 800.0f; @@ -1897,7 +1898,7 @@ void Katina_LevelComplete(Player* player) { case 2: if (player->csTimer == 0) { - player->unk_240 = 1; + player->hideShadow = true; player->pos.x = 0.0f; player->pos.y = 3500.0f; diff --git a/src/overlays/ovl_i4/fox_sz.c b/src/overlays/ovl_i4/fox_sz.c index d3842f11..e1844221 100644 --- a/src/overlays/ovl_i4/fox_sz.c +++ b/src/overlays/ovl_i4/fox_sz.c @@ -793,7 +793,7 @@ void SectorZ_LevelStart(Player* player) { gCsCamAtZ = 0.0f; D_ctx_80177A48[0] = 1.0f; - player->unk_234 = 0; + player->draw = false; player->baseSpeed = 0.0f; player->camRoll = -20.0f; @@ -983,7 +983,7 @@ void SectorZ_LevelStart(Player* player) { player->unk_190 = 5.0f; player->yRot_114 = 90.0f; player->baseSpeed = gArwingSpeed; - player->unk_234 = 1; + player->draw = true; AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, player->sfxSource, 0); break; } @@ -1148,7 +1148,7 @@ void SectorZ_LevelComplete(Player* player) { D_ctx_80177A48[0] = 1.0f; gProjectFar = 30000.0f; - player->unk_234 = 0; + player->draw = false; player->baseSpeed = 0.0f; player->camRoll = 0.0f; @@ -1160,7 +1160,7 @@ void SectorZ_LevelComplete(Player* player) { case 0: gCsFrameCount = 0; - player->unk_234 = 0; + player->draw = false; gCsCamEyeX = boss0->obj.pos.x; gCsCamEyeY = boss0->obj.pos.y; @@ -1243,7 +1243,7 @@ void SectorZ_LevelComplete(Player* player) { player->pos.z = 0.0f; player->rot.x = 0.0f; - player->unk_234 = 1; + player->draw = true; player->rot.y = 180.0f; player->rot.z = 0.0f; player->yRot_114 = 0.0f; @@ -1493,7 +1493,7 @@ void SectorZ_LevelComplete(Player* player) { break; case 1700: - player->unk_204 = gLevelType; + player->wingPosition = gLevelType; break; case 2450: diff --git a/src/overlays/ovl_i5/fox_ma.c b/src/overlays/ovl_i5/fox_ma.c index 0d7349ce..dda93b69 100644 --- a/src/overlays/ovl_i5/fox_ma.c +++ b/src/overlays/ovl_i5/fox_ma.c @@ -3194,7 +3194,7 @@ void Macbeth_801A57D0(Effect* effect) { effect->vel.z = sp44.z; AUDIO_PLAY_SFX(NA_SE_ROLLING_REFLECT, effect->sfxSource, 4); } - if ((gPlayer[0].barrelRollAlpha == 0) && (gPlayer[0].timer_498 == 0)) { + if ((gPlayer[0].barrelRollAlpha == 0) && (gPlayer[0].mercyTimer == 0)) { Player_ApplyDamage(&gPlayer[0], 0, effect->info.damage); gPlayer[0].knockback.x = 20.0f; if (effect->vel.x < 0.0f) { @@ -3239,7 +3239,7 @@ void Macbeth_801A5B4C(Effect* effect) { effect->obj.rot.z = 0.0f; if ((fabsf(gPlayer[0].trueZpos - effect->obj.pos.z) < 100.0f) && (fabsf(gPlayer[0].pos.x - effect->obj.pos.x) < 100.0f) && - (fabsf(gPlayer[0].pos.y - effect->obj.pos.y) < 30.0f) && (gPlayer[0].timer_498 == 0)) { + (fabsf(gPlayer[0].pos.y - effect->obj.pos.y) < 30.0f) && (gPlayer[0].mercyTimer == 0)) { Player_ApplyDamage(gPlayer, 0, effect->info.damage); gPlayer[0].knockback.x = 20.0f; if (effect->vel.x < 0.0f) { @@ -4965,7 +4965,7 @@ void Macbeth_LevelStart(Player* player) { player->cam.at.x = gCsCamAtX = -910.0f; player->cam.at.y = gCsCamAtY = 42.0f; player->cam.at.z = gCsCamAtZ = -800.0f; - player->unk_240 = 1; + player->hideShadow = true; player->csState = 2; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; gFillScreenAlpha = 255; @@ -5013,7 +5013,7 @@ void Macbeth_LevelStart(Player* player) { AUDIO_PLAY_BGM(NA_BGM_STAGE_MA); gLevelStartStatusScreenTimer = 50; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; - player->csState = player->csTimer = player->csEventTimer = player->unk_240 = 0; + player->csState = player->csTimer = player->csEventTimer = player->hideShadow = 0; player->gravity = 3.0f; player->unk_014 = 0.0f; D_ctx_8017782C = 1; @@ -5248,7 +5248,7 @@ void Macbeth_801AD6F0(Actor* actor) { if ((fabsf(gPlayer[0].trueZpos - actor->obj.pos.z) < 40.0f) && (fabsf(gPlayer[0].pos.x - actor->obj.pos.x) < 80.0f)) { if ((gPlayer[0].pos.y - actor->obj.pos.y > -5.0f) && - (gPlayer[0].pos.y - actor->obj.pos.y < (actor->scale * 35.0f)) && (gPlayer[0].timer_498 == 0)) { + (gPlayer[0].pos.y - actor->obj.pos.y < (actor->scale * 35.0f)) && (gPlayer[0].mercyTimer == 0)) { Player_ApplyDamage(&gPlayer[0], 0, actor->info.damage); } } @@ -5824,7 +5824,7 @@ void Macbeth_LevelComplete2(Player* player) { case 0: gCsFrameCount = 0; gLoadLevelObjects = 1; - player->unk_234 = 0; + player->draw = false; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 30); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 30); player->csState = 1; @@ -6220,7 +6220,7 @@ void Macbeth_LevelComplete2(Player* player) { gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 8; D_ctx_80177A48[0] = 0.0f; - player->unk_234 = 1; + player->draw = true; player->cam.at.x = gCsCamAtX = player->cam.eye.x = gCsCamEyeX = player->pos.x; player->cam.at.y = gCsCamAtY = player->pos.y + 70.0f; player->cam.eye.y = gCsCamEyeY = player->pos.y + 30.0f; @@ -6239,9 +6239,9 @@ void Macbeth_LevelComplete2(Player* player) { player->hitTimer = 0; player->pos.y = gGroundHeight - 3.0f; player->vel.y = -3.0f; - player->barrelRoll = player->boostCooldown = player->boostMeter = player->unk_184 = player->rot_104.y = + player->rollState = player->boostCooldown = player->boostMeter = player->unk_184 = player->rot_104.y = player->rot_104.z = player->rot.y = player->rot.x = player->rot_104.x = 0.0f; - player->barrelInputTimerL = player->sfx.bank = 0; + player->rollInputTimerL = player->sfx.bank = 0; } break; case 7: @@ -6427,7 +6427,7 @@ void Macbeth_LevelComplete2(Player* player) { break; case 2160: gProjectFar = 30000.0f; - player->unk_240 = 1; + player->hideShadow = true; Audio_StopPlayerNoise(0); AUDIO_PLAY_SFX(NA_SE_TANK_GO_UP, player->sfxSource, 0); break; diff --git a/src/overlays/ovl_i5/fox_ti.c b/src/overlays/ovl_i5/fox_ti.c index 9c784c0e..62931d6c 100644 --- a/src/overlays/ovl_i5/fox_ti.c +++ b/src/overlays/ovl_i5/fox_ti.c @@ -643,8 +643,8 @@ void Titania_8018AB44(Actor* actor) { func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y + 50.0f, actor->obj.pos.z, (10.0f / 3.0f)); gPlayer[0].vel.y = 20.0f; gPlayer[0].pos.y += 15.0f; - gPlayer[0].barrelRoll = 1; - gPlayer[0].timer_1E8 = 15; + gPlayer[0].rollState = 1; + gPlayer[0].rollTimer = 15; gPlayer[0].rollRate = 20; if (actor->obj.pos.x < gPlayer[0].pos.x) { gPlayer[0].rollRate = -20; @@ -978,8 +978,8 @@ void Titania_8018B9D0(Actor* actor) { Player_ApplyDamage(gPlayer, 0, 60); gPlayer[0].vel.y = 20.0f; gPlayer[0].pos.y += 15.0f; - gPlayer[0].barrelRoll = 1; - gPlayer[0].timer_1E8 = 15; + gPlayer[0].rollState = 1; + gPlayer[0].rollTimer = 15; gPlayer[0].rollRate = 20; if (actor->obj.pos.x < gPlayer[0].pos.x) { gPlayer[0].rollRate = -20; diff --git a/src/overlays/ovl_i5/fox_ti_cs.c b/src/overlays/ovl_i5/fox_ti_cs.c index 942bc850..6a0cbe17 100644 --- a/src/overlays/ovl_i5/fox_ti_cs.c +++ b/src/overlays/ovl_i5/fox_ti_cs.c @@ -74,7 +74,7 @@ void Titania_LevelStart(Player* player) { player->cam.at.y = gCsCamAtY = player->pos.y; player->cam.at.z = gCsCamAtZ = player->pos.z; - player->unk_240 = 1; + player->hideShadow = true; player->csState = 1; gFogFar = 1006; gPlayer[0].unk_19C = 0; @@ -222,7 +222,7 @@ void Titania_LevelStart(Player* player) { if (gCsFrameCount == 580) { gLevelStartStatusScreenTimer = 50; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; - player->csState = player->csTimer = player->csEventTimer = player->unk_240 = 0; + player->csState = player->csTimer = player->csEventTimer = player->hideShadow = 0; player->gravity = 3.0f; player->unk_014 = 0.0f; D_ctx_8017782C = 1; @@ -499,7 +499,7 @@ void Titania_LevelComplete(Player* player) { player->vel.y = 0.0f; Titania_80188108(&gActors[3], 3); gProjectFar = 30000.0f; - player->unk_240 = 1; + player->hideShadow = true; Audio_StopPlayerNoise(0); AUDIO_PLAY_SFX(NA_SE_TANK_GO_UP, player->sfxSource, 0); break; diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index faf8c4ca..0017f88d 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -573,7 +573,7 @@ void Andross_80189214(void) { } gLevelMode = LEVELMODE_ON_RAILS; - player->unk_204 = 0; + player->wingPosition = 0; gPlayer[0].pos.x = 0.0f; player->cam.eye.z = 400.0f; player->cam.at.z = player->cam.eye.z - 1000.0f; @@ -653,7 +653,7 @@ void Andross_80189470(Actor* actor) { gCsCamAtX = 0.0f; gCsCamAtY = 620.0f; gCsCamAtZ = 0.0f; - player->unk_234 = 0; + player->draw = false; player->camRoll = 0.0f; D_ctx_80177A48[0] = 1.0f; Play_ClearObjectData(); @@ -809,7 +809,7 @@ void Andross_80189B70(Boss* boss) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_START_360; gPlayer[0].csState = 0; boss->state = 1; - gPlayer[0].unk_240 = 1; + gPlayer[0].hideShadow = true; } break; case 1: @@ -839,7 +839,7 @@ void Andross_80189B70(Boss* boss) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; gFillScreenAlphaTarget = 80; gFillScreenAlphaStep = 1; - gPlayer[0].timer_224 = gGameFrameCount % 8U; + gPlayer[0].dmgEffectTimer = gGameFrameCount % 8U; gPlayer[0].radioDamageTimer = 3; Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 40.0f, 1.0f, 3.0f, 0.0f); if (((gGameFrameCount % 32) == 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { @@ -1012,7 +1012,7 @@ void Andross_80189B70(Boss* boss) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].csState = 100; gPlayer[0].csTimer = 240; - gPlayer[0].unk_234 = 1; + gPlayer[0].draw = true; D_ctx_80177A48[5] = -1200.0f; Andross_80188468(); @@ -1550,7 +1550,7 @@ void Andross_8018CF98(Effect* effect) { } void Andross_8018D0D8(Boss* boss) { - if ((gPlayer[0].timer_498 == 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && + if ((gPlayer[0].mercyTimer == 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (fabsf(boss->vwork[10].x - gPlayer[0].pos.x) < 700.0f) && (fabsf(boss->vwork[10].y - gPlayer[0].pos.y) < 700.0f)) { Player_ApplyDamage(&gPlayer[0], 0, 40); @@ -1837,7 +1837,7 @@ void Andross_8018DBF0(Boss* boss) { Math_SmoothStepToF(&boss->fwork[11], 0.0f, 0.1f, 2.0f, 0); Math_SmoothStepToF(&boss->fwork[12], 0.0f, 0.1f, 2.0f, 0); Math_SmoothStepToF(&boss->fwork[13], 0.0f, 0.1f, 2.0f, 0); - if (player->unk_234 != 0) { + if (player->draw) { xDisplacement = gPlayer[0].pos.x - boss->vwork[2].x; yDisplacement = gPlayer[0].pos.y - boss->vwork[2].y; zDisplacement = gPlayer[0].trueZpos - boss->vwork[2].z; @@ -1862,7 +1862,7 @@ void Andross_8018DBF0(Boss* boss) { } Math_SmoothStepToAngle(&boss->vwork[4].x, pitch, 0.5f, 5.0f, 0); Math_SmoothStepToAngle(&boss->vwork[4].y, yaw, 0.5f, 5.0f, 0); - if (player->unk_234 != 0) { + if (player->draw) { xDisplacement = gPlayer[0].pos.x - boss->vwork[3].x; yDisplacement = gPlayer[0].pos.y - boss->vwork[3].y; zDisplacement = gPlayer[0].trueZpos - boss->vwork[3].z; @@ -2277,7 +2277,7 @@ void Andross_8018DBF0(Boss* boss) { } } if ((boss->unk_04C == 20) && (player->state_1C8 == PLAYERSTATE_1C8_ANDROSS_MOUTH)) { - player->unk_234 = 0; + player->draw = false; for (i = 0; i < ARRAY_COUNT(gEffects); i++) { if (gEffects[i].obj.id == OBJ_EFFECT_396) { Object_Kill(&gEffects[i].obj, gEffects[i].sfxSource); @@ -2332,10 +2332,10 @@ void Andross_8018DBF0(Boss* boss) { AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_VOMIT, boss->sfxSource, 4); } if ((boss->unk_04C == 13) && (player->state_1C8 == PLAYERSTATE_1C8_ANDROSS_MOUTH)) { - player->unk_234 = 1; + player->draw = true; player->csState = 1; player->csTimer = 60; - player->timer_498 = 50; + player->mercyTimer = 50; boss->swork[8] = 0; gControllerRumbleTimers[0] = 30; if (player->wings.rightState == 2) { @@ -3649,7 +3649,7 @@ void Andross_80193C4C(Player* player) { gCsCamAtY = 620.0f; gCsCamAtZ = 0.0f; player->camRoll = 0.0f; - player->unk_234 = 0; + player->draw = false; D_ctx_80177A48[0] = 1.0f; Play_ClearObjectData(); gScenery360 = Memory_Allocate(200 * sizeof(Scenery360)); @@ -3781,7 +3781,7 @@ void Andross_80193C4C(Player* player) { if (gCsFrameCount == 190) { Play_GenerateStarfield(); gStarCount = 1000; - player->unk_204 = 0; + player->wingPosition = 0; } if (gCsFrameCount == 360) { gCsFrameCount = 340; diff --git a/src/overlays/ovl_i6/fox_sy.c b/src/overlays/ovl_i6/fox_sy.c index a7bf0db3..7c39ed0e 100644 --- a/src/overlays/ovl_i6/fox_sy.c +++ b/src/overlays/ovl_i6/fox_sy.c @@ -2047,7 +2047,7 @@ void SectorY_LevelComplete(Player* player) { player->boostSpeed = 0.0f; player->wings.unk_04 = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = player->zRotBarrelRoll = player->zRotBank = 0.0f; - player->unk_234 = 1; + player->draw = true; D_ctx_80177A48[8] = Math_RadToDeg( Math_Atan2F(gPlayer[0].cam.eye.x - boss->obj.pos.x, gPlayer[0].cam.eye.z - boss->obj.pos.z)); Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[8] * M_DTOR, MTXF_NEW); @@ -2130,7 +2130,7 @@ void SectorY_LevelComplete(Player* player) { case 2: if (player->csTimer == 0) { - player->unk_240 = 1; + player->hideShadow = true; player->pos.x = 0.0f; player->pos.y = 3500.0f; player->pos.z = 0.0f; @@ -2163,7 +2163,7 @@ void SectorY_LevelComplete(Player* player) { gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 4; if (gFillScreenAlpha == 0) { - player->unk_204 = 1; + player->wingPosition = 1; } if (gCsFrameCount == 343) { diff --git a/src/overlays/ovl_i6/fox_ve2.c b/src/overlays/ovl_i6/fox_ve2.c index 94661f7b..86c3713a 100644 --- a/src/overlays/ovl_i6/fox_ve2.c +++ b/src/overlays/ovl_i6/fox_ve2.c @@ -120,7 +120,7 @@ void Venom2_UpdateEvents(Actor* this) { } break; case 3: - gPauseEnabled = 0; + gPauseEnabled = false; if (gStarWolfMsgTimer < 600) { player->cam.eye.x += wolf->vel.x * 0.23f; player->cam.eye.y += wolf->vel.y * 0.23f; diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index 1bb2080a..84f51d3d 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -5,10 +5,12 @@ */ #include "mods.h" -// #include "prevent_bss_reordering.h" #include "global.h" #include "fox_map.h" #include "fox_option.h" +// #include "prevent_bss_reordering.h" +// #include "prevent_bss_reordering2.h" +// #include "prevent_bss_reordering3.h" #include "assets/ast_map.h" #include "assets/ast_text.h" #include "assets/ast_font_3d.h" @@ -1704,6 +1706,10 @@ bool Map_8019FD1C(LevelId levelId, s32 arg1) { s32 ret; s32 planetSaveSlot; +#ifdef AVOID_UB + planetSaveSlot = PLANET_CORNERIA; +#endif + switch (levelId) { case LEVEL_METEO: planetSaveSlot = PLANET_METEO; diff --git a/src/overlays/ovl_menu/fox_option.c b/src/overlays/ovl_menu/fox_option.c index 612278b8..64566083 100644 --- a/src/overlays/ovl_menu/fox_option.c +++ b/src/overlays/ovl_menu/fox_option.c @@ -1634,7 +1634,7 @@ void Option_ExpertSoundInit(void) { } #if MODS_SFX_JUKEBOX == 1 -#include "../../mods/sfxjukebox2.c" +#include "../../mods/sfxjukebox.c" #endif // Expert Sound Options diff --git a/tools/Torch b/tools/Torch index 572ea9d0..c1efb832 160000 --- a/tools/Torch +++ b/tools/Torch @@ -1 +1 @@ -Subproject commit 572ea9d09643c7584e40a5b952e7fad8590661f3 +Subproject commit c1efb832f5ced7b7c6a5573d6bcdae2613aabf0e diff --git a/tools/permuter_settings.toml b/tools/permuter_settings.toml index e9498d94..2729d6d3 100644 --- a/tools/permuter_settings.toml +++ b/tools/permuter_settings.toml @@ -23,6 +23,9 @@ compiler_type = "ido" "RAND_RANGE" = "float" "SIN_DEG" = "float" "COS_DEG" = "float" +"SIGN_OF" = "int" +"ABS" = "int" +"ABSF" = "float" "true" = "int" "false" = "int" "DMG_.*" = "int" @@ -32,6 +35,8 @@ compiler_type = "ido" "ALIGN.*" = "int" "OS_K0_TO_PHYSICAL" = "int" "AUDIO_PLAY_SFX" = "void" +"NA_.*" = "int" + [decompme.compilers] "tools/ido-recomp/linux/cc" = "ido5.3" \ No newline at end of file diff --git a/yamls/us/rev1/overlays.yaml b/yamls/us/rev1/overlays.yaml index 4347396d..a1992e90 100644 --- a/yamls/us/rev1/overlays.yaml +++ b/yamls/us/rev1/overlays.yaml @@ -112,7 +112,7 @@ dir: overlays/ovl_i5 start: 0xE6A810 vram: 0x80187520 - # follows_vram: ast_radio + follows_vram: ast_radio bss_size: 0xAF80 symbol_name_format: i5_$VRAM subsegments: From 07fbeac7cb0ac962110a1978aea5cdf4502b8d6a Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Mon, 27 May 2024 13:43:33 -0300 Subject: [PATCH 121/151] torch to main --- src/sys/sys_main.c | 3 +-- tools/Torch | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/sys/sys_main.c b/src/sys/sys_main.c index b1b3b2c5..b3527876 100644 --- a/src/sys/sys_main.c +++ b/src/sys/sys_main.c @@ -479,8 +479,7 @@ void Idle_ThreadEntry(void* arg0) { osStartThread(&gMainThread); Fault_Init(); osSetThreadPri(NULL, OS_PRIORITY_IDLE); -loop_1: - goto loop_1; + for (;;) {} } void bootproc(void) { diff --git a/tools/Torch b/tools/Torch index c1efb832..76e90b4d 160000 --- a/tools/Torch +++ b/tools/Torch @@ -1 +1 @@ -Subproject commit c1efb832f5ced7b7c6a5573d6bcdae2613aabf0e +Subproject commit 76e90b4ddc9c215132c39ebf8433d5f88813b368 From 42225b01ff18e59eb344f96c69ef772baf50bd01 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Mon, 27 May 2024 14:04:13 -0300 Subject: [PATCH 122/151] PRINTF(); usage in sys_save --- src/sys/sys_save.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/sys/sys_save.c b/src/sys/sys_save.c index 13cf52ea..b58e7f1a 100644 --- a/src/sys/sys_save.c +++ b/src/sys/sys_save.c @@ -7,21 +7,23 @@ SaveFile sPrevSaveData; s32 Save_ReadBlock(s32 arg0, u8* arg1) { if (osEepromRead(&gSerialEventQueue, arg0, arg1)) { - (void) "EEPROM インターフェース回路反応なし (READ)\n"; + PRINTF("EEPROM インターフェース回路反応なし (READ)\n"); return -1; + } else { + PRINTF("EEPROM READ %02X: %02X %02X %02X %02X %02X %02X %02X %02X\n"); + return 0; } - (void) "EEPROM READ %02X: %02X %02X %02X %02X %02X %02X %02X %02X\n"; - return 0; } s32 Save_WriteBlock(s32 arg0, u8* arg1) { if (osEepromWrite(&gSerialEventQueue, arg0, arg1)) { - (void) "EEPROM インターフェース回路反応なし (WRITE)\n"; + PRINTF("EEPROM インターフェース回路反応なし (WRITE)\n"); return -1; + } else { + Timer_Wait(MSEC_TO_CYCLES(15)); + PRINTF("EEPROM WRITE %02X: %02X %02X %02X %02X %02X %02X %02X %02X\n"); + return 0; } - Timer_Wait(MSEC_TO_CYCLES(15)); - (void) "EEPROM WRITE %02X: %02X %02X %02X %02X %02X %02X %02X %02X\n"; - return 0; } s32 Save_WriteEeprom(SaveFile* arg0) { @@ -30,9 +32,10 @@ s32 Save_WriteEeprom(SaveFile* arg0) { s32 j; if (osEepromProbe(&gSerialEventQueue) != 1) { - (void) "EEPROM が ありません\n"; + PRINTF("EEPROM が ありません\n"); return -1; } + for (i = 0; i < EEPROM_MAXBLOCKS; i++) { var_a2 = 0; for (j = 0; j < EEPROM_BLOCK_SIZE; j++) { @@ -52,7 +55,7 @@ s32 Save_ReadEeprom(SaveFile* arg0) { s32 i; if (osEepromProbe(&gSerialEventQueue) != 1) { - (void) "EEPROM が ありません\n"; + PRINTF("EEPROM が ありません\n"); return -1; } for (i = 0; i < EEPROM_MAXBLOCKS; i++) { From f381dea7abf89cd6b74a45e1ee77961a3e5af8cd Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Tue, 28 May 2024 01:13:32 -0300 Subject: [PATCH 123/151] fix asset D_VE2_6006890 --- src/engine/fox_edata_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/fox_edata_info.c b/src/engine/fox_edata_info.c index 86581a25..3f551440 100644 --- a/src/engine/fox_edata_info.c +++ b/src/engine/fox_edata_info.c @@ -228,7 +228,7 @@ ObjectInfo gObjectInfo[] = { /* OBJ_SCENERY_132 */ {(void*) Andross_8019350C, 1, (ObjectFunc) Andross_80193380, D_ANDROSS_C038A48, 500.0f, 0, 0, 41, 0, 0.0f, 0 }, /* OBJ_SCENERY_133 */ {(void*) D_TR_60030F0, 0, (ObjectFunc) NULL, D_TR_6009CC4, 1000.0f, 0, 0, 20, 0, 0.0f, 0 }, /* OBJ_SCENERY_134 */ {(void*) D_VE2_6003000, 0, (ObjectFunc) NULL, D_ANDROSS_C038BA4, 0.0f, 0, 0, 41, 1, 0.0f, 0 }, - /* OBJ_SCENERY_135 */ {(void*) D_TI_6006890, 0, (ObjectFunc) NULL, D_ANDROSS_C038B40, 0.0f, 0, 0, 41, 1, 0.0f, 0 }, + /* OBJ_SCENERY_135 */ {(void*) D_VE2_6006890, 0, (ObjectFunc) NULL, D_ANDROSS_C038B40, 0.0f, 0, 0, 41, 1, 0.0f, 0 }, /* OBJ_SCENERY_136 */ {(void*) D_VE2_6002990, 0, (ObjectFunc) NULL, D_ANDROSS_C038B40, 0.0f, 0, 0, 41, 1, 0.0f, 0 }, /* OBJ_SCENERY_137 */ {(void*) D_VE2_6004170, 0, (ObjectFunc) NULL, gNoHitbox, 0.0f, 0, 0, 0, 1, 0.0f, 0 }, /* OBJ_SCENERY_138 */ {(void*) D_versus_3017600, 0, (ObjectFunc) NULL, D_versus_302EE64, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, From dc6fdbcf69f6c7e82d96e48152641a0950ca108f Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Fri, 7 Jun 2024 19:12:48 -0300 Subject: [PATCH 124/151] fix gcc --- include/sf64audio_provisional.h | 2 +- src/audio/audio_synthesis.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/sf64audio_provisional.h b/include/sf64audio_provisional.h index 6e463203..631895b5 100644 --- a/include/sf64audio_provisional.h +++ b/include/sf64audio_provisional.h @@ -1187,7 +1187,7 @@ extern u16 gHaasEffectDelaySizes[64]; extern EnvelopePoint gDefaultEnvelope[]; extern NoteSubEu gZeroNoteSub; extern NoteSubEu gDefaultNoteSub; -extern s16 D_800DD200[]; +extern s16 gD_800DD200[]; extern f32 gHeadsetPanVolume[128]; extern f32 gStereoPanVolume[128]; extern f32 gDefaultPanVolume[128]; diff --git a/src/audio/audio_synthesis.c b/src/audio/audio_synthesis.c index 93b9ad60..9f7db3bc 100644 --- a/src/audio/audio_synthesis.c +++ b/src/audio/audio_synthesis.c @@ -916,10 +916,10 @@ Acmd* func_8000A700(s32 noteIndex, NoteSubEu* noteSub, NoteSynthesisState* synth if ((bookSample->codec == 0) && (currentBook != bookSample->book->book)) { switch (noteSub->bitField1.bookOffset) { case 1: - currentBook = &D_800DD200[1]; + currentBook = &gD_800DD200[1]; break; case 2: - currentBook = &D_800DD200[2]; + currentBook = &gD_800DD200[2]; break; default: case 3: From 24e316a2b26ff768f15ec217798898b4b0a7b8f9 Mon Sep 17 00:00:00 2001 From: Lywx Date: Sat, 15 Jun 2024 20:49:48 -0600 Subject: [PATCH 125/151] Fixed RUN_CC_CHECK on MacOS ARM (#266) * Fixed RUN_CC_CHECK on MacOS ARM * Fixed indentation --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 907eb133..cf1eab79 100644 --- a/Makefile +++ b/Makefile @@ -167,6 +167,7 @@ else ifeq ($(UNAME_S),Darwin) DETECTED_OS := macos MAKE := gmake CPPFLAGS += -xc++ + CC_CHECK_COMP := clang endif # Support python venv's if one is installed. From c348962cab034335f5eb1ee4bc2ed4851f40542e Mon Sep 17 00:00:00 2001 From: Alejandro Asenjo Nitti <96613413+sonicdcer@users.noreply.github.com> Date: Sat, 6 Jul 2024 09:47:49 -0300 Subject: [PATCH 126/151] Sector Z, Fortuna & General Docs (#261) * Sector Z Docs initial * Sector Z docs * some other things * correction * Space Junk * SectorZ_SetLevelObjects * rename assets with correct prefix * aSzBackgroundTex * details * pr review * Sector X initials * Meteo Initials * Sector X things I forgot * fox_tr360 & fox_ve1 & fox_so initials * fox_so details * Zones initials * More Zones initials * more zones initials * area 6 initials * fortuna inits * fortuna actors * some more docs * more docs for Fortuna * fix mistake in data incorrectly imported * Fortuna Radars * BossFO * Sector Y Initials * Venom 2 general Docs * Some Corneria Docs * Actor, Scenery and Boss IDs in update and draw functions of gObjectInfo * more docs and this usage * fox_360 this usage * more actor types and this usages * fox_effect type usage * training docs * some Sector X docs * fix incorrect usage of "this" * fix comment * more docs * funcNames * fox_bg spacing * boolean * scenery corneria bumbs * terrain bumps * corneria arch * more corneria objects * hitboxes * more corneria objects * more corneria level objects * more corneria objects * aCoWaterfallDL * corneria docs * more corneria docs * Granga swork start * corneria swork * Corneria * Corneria Granga docs * more granga docs * granga work buffer enum * CarrierParts enum use * option * Corneria Docs * GRANGA_FWK * fox_co.h header * fix Fault_FillRectangle typo * PR reviews * sCsTeamInitialPos * Doodad --- assets/yaml/jp/rev0/ast_arwing.yaml | 4 +- assets/yaml/jp/rev0/ast_corneria.yaml | 284 +- assets/yaml/jp/rev0/ast_fortuna.yaml | 12 +- assets/yaml/jp/rev0/ast_sector_z.yaml | 28 +- assets/yaml/jp/rev0/ast_titania.yaml | 48 +- assets/yaml/jp/rev0/ast_zoness.yaml | 8 +- assets/yaml/us/rev1/ast_arwing.yaml | 4 +- assets/yaml/us/rev1/ast_corneria.yaml | 292 +- assets/yaml/us/rev1/ast_fortuna.yaml | 12 +- assets/yaml/us/rev1/ast_map.yaml | 7 +- assets/yaml/us/rev1/ast_sector_z.yaml | 32 +- assets/yaml/us/rev1/ast_titania.yaml | 48 +- assets/yaml/us/rev1/ast_zoness.yaml | 8 +- include/fox_co.h | 162 + include/functions.h | 239 +- include/i1.h | 74 +- include/i2.h | 52 +- include/i3.h | 175 +- include/i4.h | 28 +- include/i5.h | 132 +- include/i6.h | 50 +- include/macros.h | 2 + include/sf64object.h | 1157 +++--- include/sf64player.h | 2 +- linker_scripts/us/rev1/symbol_addrs.txt | 2 +- .../us/rev1/symbol_addrs_engine.txt | 32 +- .../us/rev1/symbol_addrs_overlays.txt | 22 +- src/audio/audio_general.c | 2 +- src/engine/fox_360.c | 418 ++- src/engine/fox_beam.c | 57 +- src/engine/fox_bg.c | 97 +- src/engine/fox_boss.c | 55 +- src/engine/fox_col1.c | 11 + src/engine/fox_col2.c | 10 + src/engine/fox_context.c | 4 +- src/engine/fox_demo.c | 487 +-- src/engine/fox_edata.c | 6 +- src/engine/fox_edata_info.c | 540 +-- src/engine/fox_edisplay.c | 60 +- src/engine/fox_effect.c | 2974 ++++++++-------- src/engine/fox_enmy.c | 1290 ++++--- src/engine/fox_enmy2.c | 177 +- src/engine/fox_game.c | 2 +- src/engine/fox_hud.c | 29 +- src/engine/fox_pause.c | 3 + src/engine/fox_play.c | 120 +- src/engine/fox_reset.c | 2 + src/engine/fox_save.c | 9 +- src/engine/fox_tank.c | 12 +- src/engine/fox_versus.c | 2 +- src/overlays/ovl_i1/fox_co.c | 2845 +++++++-------- src/overlays/ovl_i1/fox_tr.c | 2 +- src/overlays/ovl_i1/fox_tr360.c | 234 +- src/overlays/ovl_i1/fox_ve1.c | 250 +- src/overlays/ovl_i2/fox_me.c | 1642 ++++----- src/overlays/ovl_i2/fox_sx.c | 1376 +++---- src/overlays/ovl_i3/fox_a6.c | 1379 ++++--- src/overlays/ovl_i3/fox_aq.c | 121 +- src/overlays/ovl_i3/fox_so.c | 2255 ++++++------ src/overlays/ovl_i3/fox_zo.c | 3165 +++++++++-------- src/overlays/ovl_i4/fox_bo.c | 34 +- src/overlays/ovl_i4/fox_fo.c | 653 ++-- src/overlays/ovl_i4/fox_ka.c | 84 +- src/overlays/ovl_i4/fox_sz.c | 1195 ++++--- src/overlays/ovl_i5/fox_ma.c | 107 +- src/overlays/ovl_i5/fox_ti.c | 84 +- src/overlays/ovl_i5/fox_ti_cs.c | 4 +- src/overlays/ovl_i6/fox_andross.c | 74 +- src/overlays/ovl_i6/fox_sy.c | 1947 +++++----- src/overlays/ovl_i6/fox_ve2.c | 73 +- src/overlays/ovl_menu/fox_map.c | 8 +- src/overlays/ovl_menu/fox_option.c | 48 +- src/overlays/ovl_menu/fox_title.c | 1 - src/sys/sys_fault.c | 4 +- src/sys/sys_joybus.c | 2 +- 75 files changed, 14011 insertions(+), 12859 deletions(-) create mode 100644 include/fox_co.h diff --git a/assets/yaml/jp/rev0/ast_arwing.yaml b/assets/yaml/jp/rev0/ast_arwing.yaml index 45a7f400..89515c40 100644 --- a/assets/yaml/jp/rev0/ast_arwing.yaml +++ b/assets/yaml/jp/rev0/ast_arwing.yaml @@ -56,8 +56,8 @@ D_arwing_3007550: D_arwing_30075D0: { type: TEXTURE, format: RGBA16, offset: 0x30075D0, width: 8, height: 8, ctype: u16, symbol: D_arwing_30075D0 } -D_arwing_3007650: - { type: GFX, offset: 0x3007650, symbol: D_arwing_3007650 } +aArwingItemLasersDL: + { type: GFX, offset: 0x3007650, symbol: aArwingItemLasersDL } ast_arwing_seg3_vtx_7A20: { type: VTX, offset: 0x3007A20, count: 244, symbol: ast_arwing_seg3_vtx_7A20 } diff --git a/assets/yaml/jp/rev0/ast_corneria.yaml b/assets/yaml/jp/rev0/ast_corneria.yaml index 5f7be606..953521ce 100644 --- a/assets/yaml/jp/rev0/ast_corneria.yaml +++ b/assets/yaml/jp/rev0/ast_corneria.yaml @@ -18,8 +18,8 @@ D_CO_6000000: { type: TEXTURE, ctype: u8, format: IA8, width: 128, height: 28, offset: 0x6000000, symbol: D_CO_6000000 } -D_CO_6000E00: - { type: GFX, offset: 0x6000E00, symbol: D_CO_6000E00 } +aCoWaterfallDL: + { type: GFX, offset: 0x6000E00, symbol: aCoWaterfallDL } D_CO_60018F8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x060018F8, symbol: D_CO_60018F8 } @@ -48,8 +48,8 @@ D_CO_60059F0: D_CO_6005A80: { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06005A80, symbol: D_CO_6005A80 } -D_CO_6006A80: - { type: GFX, offset: 0x6006A80, symbol: D_CO_6006A80 } +aCoArch3DL: + { type: GFX, offset: 0x6006A80, symbol: aCoArch3DL } D_CO_6006E08: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06006E08, symbol: D_CO_6006E08 } @@ -102,11 +102,11 @@ D_CO_6010250: D_CO_6010F90: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06010F90, symbol: D_CO_6010F90 } -D_CO_6010A50: - { type: GFX, offset: 0x6010A50, symbol: D_CO_6010A50 } +aCoHighway7DL: + { type: GFX, offset: 0x6010A50, symbol: aCoHighway7DL } -D_CO_6010E00: - { type: GFX, offset: 0x6010E00, symbol: D_CO_6010E00 } +aCoHighway5DL: + { type: GFX, offset: 0x6010E00, symbol: aCoHighway5DL } D_CO_6011790: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06011790, symbol: D_CO_6011790 } @@ -123,53 +123,53 @@ D_CO_6012840: D_CO_6012D00: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06012D00, symbol: D_CO_6012D00 } -D_CO_60132B0: - { type: GFX, offset: 0x60132B0, symbol: D_CO_60132B0 } +aCoHighway1DL: + { type: GFX, offset: 0x60132B0, symbol: aCoHighway1DL } -D_CO_60137B0: - { type: GFX, offset: 0x60137B0, symbol: D_CO_60137B0 } +aCoArch2DL: + { type: GFX, offset: 0x60137B0, symbol: aCoArch2DL } -D_CO_6013B50: - { type: GFX, offset: 0x6013B50, symbol: D_CO_6013B50 } +aCoRockwallDL: + { type: GFX, offset: 0x6013B50, symbol: aCoRockwallDL } D_CO_6013BE0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06013BE0, symbol: D_CO_6013BE0 } -D_CO_60143E0: - { type: GFX, offset: 0x60143E0, symbol: D_CO_60143E0 } +aCoHighway8DL: + { type: GFX, offset: 0x60143E0, symbol: aCoHighway8DL } -D_CO_6014500: - { type: GFX, offset: 0x6014500, symbol: D_CO_6014500 } +aCoHighway4DL: + { type: GFX, offset: 0x6014500, symbol: aCoHighway4DL } -D_CO_6014670: - { type: GFX, offset: 0x6014670, symbol: D_CO_6014670 } +aCoHighway6DL: + { type: GFX, offset: 0x6014670, symbol: aCoHighway6DL } -D_CO_6014A20: - { type: GFX, offset: 0x6014A20, symbol: D_CO_6014A20 } +aCoHighway9DL: + { type: GFX, offset: 0x6014A20, symbol: aCoHighway9DL } -D_CO_6014B50: - { type: GFX, offset: 0x6014B50, symbol: D_CO_6014B50 } +aCoBuilding3DL: + { type: GFX, offset: 0x6014B50, symbol: aCoBuilding3DL } D_CO_60151A8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x060151A8, symbol: D_CO_60151A8 } -D_CO_60153B0: - { type: GFX, offset: 0x60153B0, symbol: D_CO_60153B0 } +aCoTowerDL: + { type: GFX, offset: 0x60153B0, symbol: aCoTowerDL } -D_CO_6015F00: - { type: GFX, offset: 0x6015F00, symbol: D_CO_6015F00 } +aCoStoneArchDL: + { type: GFX, offset: 0x6015F00, symbol: aCoStoneArchDL } D_CO_6015700: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06015700, symbol: D_CO_6015700 } -D_CO_6016270: - { type: GFX, offset: 0x6016270, symbol: D_CO_6016270 } +aRadarDL: + { type: GFX, offset: 0x6016270, symbol: aRadarDL } -D_CO_60164F0: - { type: GFX, offset: 0x60164F0, symbol: D_CO_60164F0 } +aCoHighway3DL: + { type: GFX, offset: 0x60164F0, symbol: aCoHighway3DL } -D_CO_6016580: - { type: GFX, offset: 0x6016580, symbol: D_CO_6016580 } +aCoBuilding4DL: + { type: GFX, offset: 0x6016580, symbol: aCoBuilding4DL } D_CO_6017F10: { type: GFX, offset: 0x6017F10, symbol: D_CO_6017F10 } @@ -177,8 +177,8 @@ D_CO_6017F10: D_CO_60186E0: { type: GFX, offset: 0x60186E0, symbol: D_CO_60186E0 } -D_CO_6018E80: - { type: GFX, offset: 0x6018E80, symbol: D_CO_6018E80 } +aCoBuilding7DL: + { type: GFX, offset: 0x6018E80, symbol: aCoBuilding7DL } D_CO_60191C8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x060191C8, symbol: D_CO_60191C8 } @@ -195,14 +195,14 @@ D_CO_6019E60: D_CO_601FF58: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601FF58, symbol: D_CO_601FF58 } -D_CO_601A7D0: - { type: GFX, offset: 0x601A7D0, symbol: D_CO_601A7D0 } +aCoBuilding2DL: + { type: GFX, offset: 0x601A7D0, symbol: aCoBuilding2DL } D_CO_601AD60: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601AD60, symbol: D_CO_601AD60 } -D_CO_601B560: - { type: GFX, offset: 0x601B560, symbol: D_CO_601B560 } +aCoBuilding5DL: + { type: GFX, offset: 0x601B560, symbol: aCoBuilding5DL } D_CO_601B640: { type: GFX, offset: 0x601B640, symbol: D_CO_601B640 } @@ -210,14 +210,14 @@ D_CO_601B640: D_CO_601B6C0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601B6C0, symbol: D_CO_601B6C0 } -D_CO_601BEC0: - { type: GFX, offset: 0x601BEC0, symbol: D_CO_601BEC0 } +aCoBump2DL: + { type: GFX, offset: 0x601BEC0, symbol: aCoBump2DL } D_CO_601C1A8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601C1A8, symbol: D_CO_601C1A8 } -D_CO_601C9B0: - { type: GFX, offset: 0x601C9B0, symbol: D_CO_601C9B0 } +aCoTreeDL: + { type: GFX, offset: 0x601C9B0, symbol: aCoTreeDL } D_CO_601CAA0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x0601CAA0, symbol: D_CO_601CAA0 } @@ -234,8 +234,8 @@ D_CO_601ED00: D_CO_601F500: { type: GFX, offset: 0x601F500, symbol: D_CO_601F500 } -D_CO_601F5A0: - { type: GFX, offset: 0x601F5A0, symbol: D_CO_601F5A0 } +aCoArch1DL: + { type: GFX, offset: 0x601F5A0, symbol: aCoArch1DL } D_CO_6020760: { type: GFX, offset: 0x6020760, symbol: D_CO_6020760 } @@ -258,8 +258,8 @@ D_CO_6023DE8: D_CO_6024160: { type: GFX, offset: 0x6024160, symbol: D_CO_6024160 } -D_CO_60244A0: - { type: GFX, offset: 0x60244A0, symbol: D_CO_60244A0 } +aCoBump4DL: + { type: GFX, offset: 0x60244A0, symbol: aCoBump4DL } D_CO_60245E0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x060245E0, symbol: D_CO_60245E0 } @@ -285,14 +285,14 @@ D_CO_6029528: D_CO_6029674: { type: SF64:SKELETON, offset: 0x6029674, symbol: D_CO_6029674 } -D_CO_602991C: - { type: SF64:ANIM, offset: 0x602991C, symbol: D_CO_602991C } +aCoGaruda1Anim: + { type: SF64:ANIM, offset: 0x602991C, symbol: aCoGaruda1Anim } -D_CO_6029A48: - { type: SF64:SKELETON, offset: 0x6029A48, symbol: D_CO_6029A48 } +aCoGarudaSkel: + { type: SF64:SKELETON, offset: 0x6029A48, symbol: aCoGarudaSkel } -D_CO_602A520: - { type: SF64:ANIM, offset: 0x602A520, symbol: D_CO_602A520 } +aCoGaruda3Anim: + { type: SF64:ANIM, offset: 0x602A520, symbol: aCoGaruda3Anim } D_CO_602AA04: { type: SF64:ANIM, offset: 0x602AA04, symbol: D_CO_602AA04 } @@ -300,8 +300,8 @@ D_CO_602AA04: D_CO_602AA7C: { type: SF64:ANIM, offset: 0x602AA7C, symbol: D_CO_602AA7C } -D_CO_602AB48: - { type: SF64:SKELETON, offset: 0x602AB48, symbol: D_CO_602AB48 } +aCoDoorsSkel: + { type: SF64:SKELETON, offset: 0x602AB48, symbol: aCoDoorsSkel } D_CO_602BC18: { type: SF64:ANIM, offset: 0x602BC18, symbol: D_CO_602BC18 } @@ -318,11 +318,11 @@ D_CO_602D31C: D_CO_602D400: { type: SF64:ANIM, offset: 0x602D400, symbol: D_CO_602D400 } -D_CO_602D5AC: - { type: SF64:SKELETON, offset: 0x602D5AC, symbol: D_CO_602D5AC } +aCoCarrierSkel: + { type: SF64:SKELETON, offset: 0x602D5AC, symbol: aCoCarrierSkel } -D_CO_602D5F0: - { type: GFX, offset: 0x602D5F0, symbol: D_CO_602D5F0 } +aCoBuilding1DL: + { type: GFX, offset: 0x602D5F0, symbol: aCoBuilding1DL } D_CO_602DA20: { type: GFX, offset: 0x602DA20, symbol: D_CO_602DA20 } @@ -333,17 +333,17 @@ D_CO_602DCA0: D_CO_602DD40: { type: GFX, offset: 0x602DD40, symbol: D_CO_602DD40 } -D_CO_602E080: - { type: GFX, offset: 0x602E080, symbol: D_CO_602E080 } +aCoHighway2DL: + { type: GFX, offset: 0x602E080, symbol: aCoHighway2DL } -D_CO_602E570: - { type: GFX, offset: 0x602E570, symbol: D_CO_602E570 } +aCoBump5DL: + { type: GFX, offset: 0x602E570, symbol: aCoBump5DL } -D_CO_602E7A0: - { type: GFX, offset: 0x602E7A0, symbol: D_CO_602E7A0 } +aCoBump3DL: + { type: GFX, offset: 0x602E7A0, symbol: aCoBump3DL } -D_CO_602E9E0: - { type: GFX, offset: 0x602E9E0, symbol: D_CO_602E9E0 } +aCoBump1DL: + { type: GFX, offset: 0x602E9E0, symbol: aCoBump1DL } D_CO_602ECB0: { type: GFX, offset: 0x602ECB0, symbol: D_CO_602ECB0 } @@ -351,8 +351,8 @@ D_CO_602ECB0: D_CO_602ED50: { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 16, offset: 0x0602ED50, symbol: D_CO_602ED50 } -D_CO_602F7C0: - { type: GFX, offset: 0x602F7C0, symbol: D_CO_602F7C0 } +aCoPoleDL: + { type: GFX, offset: 0x602F7C0, symbol: aCoPoleDL } D_CO_602F848: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x0602F848, symbol: D_CO_602F848 } @@ -408,11 +408,11 @@ D_CO_60355A0: D_CO_6035DA0: { type: GFX, offset: 0x6035DA0, symbol: D_CO_6035DA0 } -D_CO_6035F10: - { type: GFX, offset: 0x6035F10, symbol: D_CO_6035F10 } +aCoBuilding8DL: + { type: GFX, offset: 0x6035F10, symbol: aCoBuilding8DL } -D_CO_60361F0: - { type: GFX, offset: 0x60361F0, symbol: D_CO_60361F0 } +aCoBuilding6DL: + { type: GFX, offset: 0x60361F0, symbol: aCoBuilding6DL } D_CO_60363B0: { type: GFX, offset: 0x60363B0, symbol: D_CO_60363B0 } @@ -435,11 +435,11 @@ D_CO_6036D58: D_CO_6037160: { type: SF64:ENVIRONMENT, offset: 0x6037160, symbol: D_CO_6037160 } -D_CO_60371A4: - { type: SF64:OBJECT_INIT, offset: 0x60371A4, symbol: D_CO_60371A4 } +aCoOnRailsLevelObjects: + { type: SF64:OBJECT_INIT, offset: 0x60371A4, symbol: aCoOnRailsLevelObjects } -D_CO_603B074: - { type: SF64:OBJECT_INIT, offset: 0x603B074, symbol: D_CO_603B074 } +aCoAllRangeLevelObjects: + { type: SF64:OBJECT_INIT, offset: 0x603B074, symbol: aCoAllRangeLevelObjects } D_CO_603D9E8: { type: SF64:SCRIPT, offset: 0x603D9E8, symbol: D_CO_603D9E8 } @@ -448,50 +448,50 @@ D_CO_603D9E8: D_CO_603DC40: { type: SF64:HITBOX, offset: 0x603DC40, symbol: D_CO_603DC40 } -D_CO_603DD40: - { type: SF64:HITBOX, offset: 0x603DD40, symbol: D_CO_603DD40 } +aCoHighway2Hitbox: + { type: SF64:HITBOX, offset: 0x603DD40, symbol: aCoHighway2Hitbox } -D_CO_603DDF0: - { type: SF64:HITBOX, offset: 0x603DDF0, symbol: D_CO_603DDF0 } +aCoBuilding1Hitbox: + { type: SF64:HITBOX, offset: 0x603DDF0, symbol: aCoBuilding1Hitbox } -D_CO_603DCA4: - { type: SF64:HITBOX, offset: 0x603DCA4, symbol: D_CO_603DCA4 } +aCoHighway1Hitbox: + { type: SF64:HITBOX, offset: 0x603DCA4, symbol: aCoHighway1Hitbox } -D_CO_603DE8C: - { type: SF64:HITBOX, offset: 0x603DE8C, symbol: D_CO_603DE8C } +aCoBuilding2Hitbox: + { type: SF64:HITBOX, offset: 0x603DE8C, symbol: aCoBuilding2Hitbox } -D_CO_603DEF4: - { type: SF64:HITBOX, offset: 0x603DEF4, symbol: D_CO_603DEF4 } +aCoBuilding3Hitbox: + { type: SF64:HITBOX, offset: 0x603DEF4, symbol: aCoBuilding3Hitbox } -D_CO_603DF8C: - { type: SF64:HITBOX, offset: 0x603DF8C, symbol: D_CO_603DF8C } +aCoBuilding4Hitbox: + { type: SF64:HITBOX, offset: 0x603DF8C, symbol: aCoBuilding4Hitbox } -D_CO_603DFDC: - { type: SF64:HITBOX, offset: 0x603DFDC, symbol: D_CO_603DFDC } +aCoBuilding5Hitbox: + { type: SF64:HITBOX, offset: 0x603DFDC, symbol: aCoBuilding5Hitbox } -D_CO_603E014: - { type: SF64:HITBOX, offset: 0x603E014, symbol: D_CO_603E014 } +aCoBuilding6Hitbox: + { type: SF64:HITBOX, offset: 0x603E014, symbol: aCoBuilding6Hitbox } -D_CO_603E030: - { type: SF64:HITBOX, offset: 0x603E030, symbol: D_CO_603E030 } +aCoBuilding7Hitbox: + { type: SF64:HITBOX, offset: 0x603E030, symbol: aCoBuilding7Hitbox } -D_CO_603E09C: - { type: SF64:HITBOX, offset: 0x603E09C, symbol: D_CO_603E09C } +aCoBuilding8Hitbox: + { type: SF64:HITBOX, offset: 0x603E09C, symbol: aCoBuilding8Hitbox } -D_CO_603E0EC: - { type: SF64:HITBOX, offset: 0x603E0EC, symbol: D_CO_603E0EC } +aCoWaterfallHitbox: + { type: SF64:HITBOX, offset: 0x603E0EC, symbol: aCoWaterfallHitbox } -D_CO_603E118: - { type: SF64:HITBOX, offset: 0x603E118, symbol: D_CO_603E118 } +aCoTowerHitbox: + { type: SF64:HITBOX, offset: 0x603E118, symbol: aCoTowerHitbox } -D_CO_603E14C: - { type: SF64:HITBOX, offset: 0x603E14C, symbol: D_CO_603E14C } +aCoArch1Hitbox: + { type: SF64:HITBOX, offset: 0x603E14C, symbol: aCoArch1Hitbox } -D_CO_603E1B4: - { type: SF64:HITBOX, offset: 0x603E1B4, symbol: D_CO_603E1B4 } +aCoArch2Hitbox: + { type: SF64:HITBOX, offset: 0x603E1B4, symbol: aCoArch2Hitbox } -D_CO_603E21C: - { type: SF64:HITBOX, offset: 0x603E21C, symbol: D_CO_603E21C } +aCoArch3Hitbox: + { type: SF64:HITBOX, offset: 0x603E21C, symbol: aCoArch3Hitbox } # seems unused D_CO_603E2C0: @@ -501,26 +501,26 @@ D_CO_603E2C0: D_CO_603E2F4: { type: SF64:HITBOX, offset: 0x603E2F4, symbol: D_CO_603E2F4 } -D_CO_603E3E0: - { type: SF64:HITBOX, offset: 0x603E3E0, symbol: D_CO_603E3E0 } +aCoStoneArchHitbox: + { type: SF64:HITBOX, offset: 0x603E3E0, symbol: aCoStoneArchHitbox } -D_CO_603E468: - { type: SF64:HITBOX, offset: 0x603E468, symbol: D_CO_603E468 } +aCoPoleHitbox: + { type: SF64:HITBOX, offset: 0x603E468, symbol: aCoPoleHitbox } -D_CO_603E484: - { type: SF64:HITBOX, offset: 0x603E484, symbol: D_CO_603E484 } +aCoTreeHitbox: + { type: SF64:HITBOX, offset: 0x603E484, symbol: aCoTreeHitbox } -D_CO_603E4A0: - { type: SF64:HITBOX, offset: 0x603E4A0, symbol: D_CO_603E4A0 } +aCoRadarHitbox: + { type: SF64:HITBOX, offset: 0x603E4A0, symbol: aCoRadarHitbox } -D_CO_603E4A4: - { type: SF64:HITBOX, offset: 0x603E4A4, symbol: D_CO_603E4A4 } +aCoBuilding9Hitbox: + { type: SF64:HITBOX, offset: 0x603E4A4, symbol: aCoBuilding9Hitbox } -D_CO_603E4DC: - { type: SF64:HITBOX, offset: 0x603E4DC, symbol: D_CO_603E4DC } +aCoBuilding10Hitbox: + { type: SF64:HITBOX, offset: 0x603E4DC, symbol: aCoBuilding10Hitbox } -D_CO_603E514: - { type: SF64:HITBOX, offset: 0x603E514, symbol: D_CO_603E514 } +aCoIBeamHitbox: + { type: SF64:HITBOX, offset: 0x603E514, symbol: aCoIBeamHitbox } D_CO_603E54C: { type: SF64:HITBOX, offset: 0x603E54C, symbol: D_CO_603E54C } @@ -531,11 +531,11 @@ D_CO_603E598: D_CO_603E5B4: { type: SF64:HITBOX, offset: 0x603E5B4, symbol: D_CO_603E5B4 } -D_CO_603E5D0: - { type: SF64:HITBOX, offset: 0x603E5D0, symbol: D_CO_603E5D0 } +CoGarudaHitbox: + { type: SF64:HITBOX, offset: 0x603E5D0, symbol: CoGarudaHitbox } -D_CO_603E604: - { type: SF64:HITBOX, offset: 0x603E604, symbol: D_CO_603E604 } +aCoGarudaDestroyHitbox: + { type: SF64:HITBOX, offset: 0x603E604, symbol: aCoGarudaDestroyHitbox } D_CO_603E620: { type: SF64:HITBOX, offset: 0x603E620, symbol: D_CO_603E620 } @@ -552,32 +552,32 @@ D_CO_603E7C4: D_CO_603E840: { type: SF64:HITBOX, offset: 0x603E840, symbol: D_CO_603E840 } -D_CO_603E88C: - { type: SF64:HITBOX, offset: 0x603E88C, symbol: D_CO_603E88C } +aCoRockwallHitbox: + { type: SF64:HITBOX, offset: 0x603E88C, symbol: aCoRockwallHitbox } -D_CO_603E8A8: - { type: SF64:HITBOX, offset: 0x603E8A8, symbol: D_CO_603E8A8 } +aCoDoorsHitbox: + { type: SF64:HITBOX, offset: 0x603E8A8, symbol: aCoDoorsHitbox } D_CO_603E924: { type: SF64:HITBOX, offset: 0x603E924, symbol: D_CO_603E924 } -D_CO_603E98C: - { type: SF64:HITBOX, offset: 0x603E98C, symbol: D_CO_603E98C } +aCoBuildingOnFireHitbox: + { type: SF64:HITBOX, offset: 0x603E98C, symbol: aCoBuildingOnFireHitbox } -D_CO_603E9EC: - { type: SF64:HITBOX, offset: 0x603E9EC, symbol: D_CO_603E9EC } +aCoHighway5Hitbox: + { type: SF64:HITBOX, offset: 0x603E9EC, symbol: aCoHighway5Hitbox } -D_CO_603EA08: - { type: SF64:HITBOX, offset: 0x603EA08, symbol: D_CO_603EA08 } +aCoHighway6Hitbox: + { type: SF64:HITBOX, offset: 0x603EA08, symbol: aCoHighway6Hitbox } -D_CO_603EA74: - { type: SF64:HITBOX, offset: 0x603EA74, symbol: D_CO_603EA74 } +aCoHighway7Hitbox: + { type: SF64:HITBOX, offset: 0x603EA74, symbol: aCoHighway7Hitbox } -D_CO_603EAE0: - { type: SF64:HITBOX, offset: 0x603EAE0, symbol: D_CO_603EAE0 } +aCoHighway8Hitbox: + { type: SF64:HITBOX, offset: 0x603EAE0, symbol: aCoHighway8Hitbox } -D_CO_603EB0C: - { type: SF64:HITBOX, offset: 0x603EB0C, symbol: D_CO_603EB0C } +aCoHighway9Hitbox: + { type: SF64:HITBOX, offset: 0x603EB0C, symbol: aCoHighway9Hitbox } D_CO_603EB38: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0603EB38, symbol: D_CO_603EB38 } diff --git a/assets/yaml/jp/rev0/ast_fortuna.yaml b/assets/yaml/jp/rev0/ast_fortuna.yaml index a6d15d0f..7815eeeb 100644 --- a/assets/yaml/jp/rev0/ast_fortuna.yaml +++ b/assets/yaml/jp/rev0/ast_fortuna.yaml @@ -116,8 +116,8 @@ D_FO_6009F90: D_FO_600A018: { type: TEXTURE, format: IA8, width: 32, height: 32, offset: 0x600A018, ctype: u8, symbol: D_FO_600A018 } -D_FO_600A420: - { type: GFX, offset: 0x600A420, symbol: D_FO_600A420 } +aFoPoleDL: + { type: GFX, offset: 0x600A420, symbol: aFoPoleDL } D_FO_600A4A8: { type: TEXTURE, format: RGBA16, width: 32, height: 64, offset: 0x600A4A8, ctype: u16, symbol: D_FO_600A4A8 } @@ -158,14 +158,14 @@ D_FO_600F3F4: D_FO_600F60C: { type: SF64:COLPOLY, offset: 0x600F60C, count: 93, symbol: D_FO_600F60C, mesh_symbol: D_FO_OFFSET } -D_FO_600FE9C: - { type: SF64:HITBOX, offset: 0x600FE9C, symbol: D_FO_600FE9C } +aFoPoleHitbox: + { type: SF64:HITBOX, offset: 0x600FE9C, symbol: aFoPoleHitbox } D_FO_600FEB8: { type: SF64:HITBOX, offset: 0x600FEB8, symbol: D_FO_600FEB8 } -D_FO_600FF30: - { type: SF64:HITBOX, offset: 0x600FF30, symbol: D_FO_600FF30 } +aFoRadarHitbox: + { type: SF64:HITBOX, offset: 0x600FF30, symbol: aFoRadarHitbox } D_FO_600FF64: { type: SF64:HITBOX, offset: 0x600FF64, symbol: D_FO_600FF64 } diff --git a/assets/yaml/jp/rev0/ast_sector_z.yaml b/assets/yaml/jp/rev0/ast_sector_z.yaml index 4fb35bc7..96233307 100644 --- a/assets/yaml/jp/rev0/ast_sector_z.yaml +++ b/assets/yaml/jp/rev0/ast_sector_z.yaml @@ -30,11 +30,11 @@ D_SZ_6000840: D_SZ_60012D0: { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 9, offset: 0x60012D0, symbol: D_SZ_60012D0 } -D_SZ_6001360: - { type: GFX, offset: 0x6001360, symbol: D_SZ_6001360 } +aSzSpaceJunk1DL: + { type: GFX, offset: 0x6001360, symbol: aSzSpaceJunk1DL } -D_SZ_6001A10: - { type: GFX, offset: 0x6001A10, symbol: D_SZ_6001A10 } +aSzSpaceJunk2DL: + { type: GFX, offset: 0x6001A10, symbol: aSzSpaceJunk2DL } D_SZ_6001C80: { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x06001C80, symbol: D_SZ_6001C80, tlut: 0x06001D80 } @@ -42,8 +42,8 @@ D_SZ_6001C80: D_SZ_6001D80: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x06001D80, symbol: D_SZ_6001D80 } -D_SZ_6001DA0: - { type: GFX, offset: 0x6001DA0, symbol: D_SZ_6001DA0 } +aSzSpaceJunk3DL: + { type: GFX, offset: 0x6001DA0, symbol: aSzSpaceJunk3DL } D_SZ_60025F0: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x60025F0, symbol: D_SZ_60025F0, tlut: 0x060029F0 } @@ -69,12 +69,12 @@ D_SZ_6002DE0: D_SZ_6002EE0: { type: TEXTURE, ctype: u16, format: TLUT, colors: 80, offset: 0x06002EE0, symbol: D_SZ_6002EE0 } -D_SZ_6002F80: - { type: GFX, offset: 0x6002F80, symbol: D_SZ_6002F80 } +aSzBackgroundDL: + { type: GFX, offset: 0x6002F80, symbol: aSzBackgroundDL } # Sector Z Background -D_SZ_6003010: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06003010, symbol: D_SZ_6003010 } +aSzBackgroundTex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06003010, symbol: aSzBackgroundTex } D_SZ_6004010: { type: GFX, offset: 0x6004010, symbol: D_SZ_6004010 } @@ -97,8 +97,8 @@ D_SZ_6004558: D_SZ_6004570: { type: GFX, offset: 0x6004570, symbol: D_SZ_6004570 } -D_SZ_60045E0: - { type: GFX, offset: 0x60045E0, symbol: D_SZ_60045E0 } +aSZSpaceJunk4DL: + { type: GFX, offset: 0x60045E0, symbol: aSZSpaceJunk4DL } D_SZ_60047E0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60047E0, symbol: D_SZ_60047E0 } @@ -145,8 +145,8 @@ D_SZ_6006CD8: D_SZ_6006D64: { type: SF64:ANIM, offset: 0x6006D64, symbol: D_SZ_6006D64 } -D_SZ_6006E50: - { type: SF64:SKELETON, offset: 0x6006E50, symbol: D_SZ_6006E50 } +aSzMissileSkel: + { type: SF64:SKELETON, offset: 0x6006E50, symbol: aSzMissileSkel } D_SZ_6006E70: { type: SF64:ENVIRONMENT, offset: 0x6006E70, symbol: D_SZ_6006E70 } diff --git a/assets/yaml/jp/rev0/ast_titania.yaml b/assets/yaml/jp/rev0/ast_titania.yaml index 1e1210f4..d782b058 100644 --- a/assets/yaml/jp/rev0/ast_titania.yaml +++ b/assets/yaml/jp/rev0/ast_titania.yaml @@ -28,8 +28,8 @@ D_TI_6001B10: D_TI_6001BA8: {type: TEXTURE, format: RGBA16, ctype: u16, width: 32, height: 32, offset: 0x6001BA8, symbol: D_TI_6001BA8} -D_TI_60023B0: - {type: GFX, offset: 0x60023B0, symbol: D_TI_60023B0} +aTiCactusDL: + {type: GFX, offset: 0x60023B0, symbol: aTiCactusDL} D_TI_6002438: {type: TEXTURE, format: RGBA16, ctype: u16, width: 32, height: 64, offset: 0x6002438, symbol: D_TI_6002438} @@ -82,35 +82,35 @@ D_TI_60064AC: D_TI_60064C8: {type: SF64:HITBOX, offset: 0x60064C8, symbol: D_TI_60064C8} -D_TI_60064FC: - {type: SF64:HITBOX, offset: 0x60064FC, symbol: D_TI_60064FC} +aTiSkullHitbox: + {type: SF64:HITBOX, offset: 0x60064FC, symbol: aTiSkullHitbox} -D_TI_6006518: - {type: SF64:HITBOX, offset: 0x6006518, symbol: D_TI_6006518} +aTiRib0Hitbox: + {type: SF64:HITBOX, offset: 0x6006518, symbol: aTiRib0Hitbox} -D_TI_6006564: - {type: SF64:HITBOX, offset: 0x6006564, symbol: D_TI_6006564} +aTiRib1Hitbox: + {type: SF64:HITBOX, offset: 0x6006564, symbol: aTiRib1Hitbox} -D_TI_60065B0: - {type: SF64:HITBOX, offset: 0x60065B0, symbol: D_TI_60065B0} +aTiRib2Hitbox: + {type: SF64:HITBOX, offset: 0x60065B0, symbol: aTiRib2Hitbox} -D_TI_60065FC: - {type: SF64:HITBOX, offset: 0x60065FC, symbol: D_TI_60065FC} +aTiRib3Hitbox: + {type: SF64:HITBOX, offset: 0x60065FC, symbol: aTiRib3Hitbox} -D_TI_6006648: - {type: SF64:HITBOX, offset: 0x6006648, symbol: D_TI_6006648} +aTiRib4Hitbox: + {type: SF64:HITBOX, offset: 0x6006648, symbol: aTiRib4Hitbox} -D_TI_6006694: - {type: SF64:HITBOX, offset: 0x6006694, symbol: D_TI_6006694} +aTiRib5Hitbox: + {type: SF64:HITBOX, offset: 0x6006694, symbol: aTiRib5Hitbox} -D_TI_60066E0: - {type: SF64:HITBOX, offset: 0x60066E0, symbol: D_TI_60066E0} +aTiRib6Hitbox: + {type: SF64:HITBOX, offset: 0x60066E0, symbol: aTiRib6Hitbox} -D_TI_600672C: - {type: SF64:HITBOX, offset: 0x600672C, symbol: D_TI_600672C} +aTiRib7Hitbox: + {type: SF64:HITBOX, offset: 0x600672C, symbol: aTiRib7Hitbox} -D_TI_6006778: - {type: SF64:HITBOX, offset: 0x6006778, symbol: D_TI_6006778} +aTiRib8Hitbox: + {type: SF64:HITBOX, offset: 0x6006778, symbol: aTiRib8Hitbox} D_TI_60067C4: {type: SF64:HITBOX, offset: 0x60067C4, symbol: D_TI_60067C4} @@ -133,8 +133,8 @@ D_TI_6006874: D_TI_6006890: {type: SF64:HITBOX, offset: 0x6006890, symbol: D_TI_6006890} -D_TI_60068BC: - {type: SF64:HITBOX, offset: 0x60068BC, symbol: D_TI_60068BC} +aTiCactusHitbox: + {type: SF64:HITBOX, offset: 0x60068BC, symbol: aTiCactusHitbox} D_TI_60068F0: {type: SF64:HITBOX, offset: 0x60068F0, symbol: D_TI_60068F0} diff --git a/assets/yaml/jp/rev0/ast_zoness.yaml b/assets/yaml/jp/rev0/ast_zoness.yaml index 3961d8fb..8f634226 100644 --- a/assets/yaml/jp/rev0/ast_zoness.yaml +++ b/assets/yaml/jp/rev0/ast_zoness.yaml @@ -471,8 +471,8 @@ D_ZO_6024220: D_ZO_60242B8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60242B8, symbol: D_ZO_60242B8} -D_ZO_6024AC0: - { type: GFX, offset: 0x6024AC0, symbol: D_ZO_6024AC0} +aZoRock1DL: + { type: GFX, offset: 0x6024AC0, symbol: aZoRock1DL} D_ZO_6024D60: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6024D60, symbol: D_ZO_6024D60} @@ -502,8 +502,8 @@ D_ZO_602AC50: D_ZO_602AE94: { type: ARRAY, count: 242, array_type: Vec3f, offset: 0x602AE94, symbol: D_ZO_602AE94} -D_ZO_602B9EC: - { type: SF64:HITBOX, offset: 0x602B9EC, symbol: D_ZO_602B9EC} +aZoRock1Hitbox: + { type: SF64:HITBOX, offset: 0x602B9EC, symbol: aZoRock1Hitbox} D_ZO_602BA20: { type: SF64:HITBOX, offset: 0x602BA20, symbol: D_ZO_602BA20} diff --git a/assets/yaml/us/rev1/ast_arwing.yaml b/assets/yaml/us/rev1/ast_arwing.yaml index 43443489..dcd135ab 100644 --- a/assets/yaml/us/rev1/ast_arwing.yaml +++ b/assets/yaml/us/rev1/ast_arwing.yaml @@ -56,8 +56,8 @@ D_arwing_3007550: D_arwing_30075D0: { type: TEXTURE, format: RGBA16, offset: 0x30075D0, width: 8, height: 8, ctype: u16, symbol: D_arwing_30075D0 } -D_arwing_3007650: - { type: GFX, offset: 0x3007650, symbol: D_arwing_3007650 } +aArwingItemLasersDL: + { type: GFX, offset: 0x3007650, symbol: aArwingItemLasersDL } ast_arwing_seg3_vtx_7A20: { type: VTX, offset: 0x3007A20, count: 244, symbol: ast_arwing_seg3_vtx_7A20 } diff --git a/assets/yaml/us/rev1/ast_corneria.yaml b/assets/yaml/us/rev1/ast_corneria.yaml index cec3e86c..15f83392 100644 --- a/assets/yaml/us/rev1/ast_corneria.yaml +++ b/assets/yaml/us/rev1/ast_corneria.yaml @@ -18,8 +18,8 @@ D_CO_6000000: { type: TEXTURE, ctype: u8, format: IA8, width: 128, height: 28, offset: 0x6000000, symbol: D_CO_6000000 } -D_CO_6000E00: - { type: GFX, offset: 0x6000E00, symbol: D_CO_6000E00 } +aCoWaterfallDL: + { type: GFX, offset: 0x6000E00, symbol: aCoWaterfallDL } D_CO_60018F8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x060018F8, symbol: D_CO_60018F8 } @@ -48,8 +48,8 @@ D_CO_60059F0: D_CO_6005A80: { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06005A80, symbol: D_CO_6005A80 } -D_CO_6006A80: - { type: GFX, offset: 0x6006A80, symbol: D_CO_6006A80 } +aCoArch3DL: + { type: GFX, offset: 0x6006A80, symbol: aCoArch3DL } D_CO_6006E08: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06006E08, symbol: D_CO_6006E08 } @@ -102,11 +102,11 @@ D_CO_6010250: D_CO_6010F90: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06010F90, symbol: D_CO_6010F90 } -D_CO_6010A50: - { type: GFX, offset: 0x6010A50, symbol: D_CO_6010A50 } +aCoHighway7DL: + { type: GFX, offset: 0x6010A50, symbol: aCoHighway7DL } -D_CO_6010E00: - { type: GFX, offset: 0x6010E00, symbol: D_CO_6010E00 } +aCoHighway5DL: + { type: GFX, offset: 0x6010E00, symbol: aCoHighway5DL } D_CO_6011790: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06011790, symbol: D_CO_6011790 } @@ -123,53 +123,53 @@ D_CO_6012840: D_CO_6012D00: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06012D00, symbol: D_CO_6012D00 } -D_CO_60132B0: - { type: GFX, offset: 0x60132B0, symbol: D_CO_60132B0 } +aCoHighway1DL: + { type: GFX, offset: 0x60132B0, symbol: aCoHighway1DL } -D_CO_60137B0: - { type: GFX, offset: 0x60137B0, symbol: D_CO_60137B0 } +aCoArch2DL: + { type: GFX, offset: 0x60137B0, symbol: aCoArch2DL } -D_CO_6013B50: - { type: GFX, offset: 0x6013B50, symbol: D_CO_6013B50 } +aCoRockwallDL: + { type: GFX, offset: 0x6013B50, symbol: aCoRockwallDL } D_CO_6013BE0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06013BE0, symbol: D_CO_6013BE0 } -D_CO_60143E0: - { type: GFX, offset: 0x60143E0, symbol: D_CO_60143E0 } +aCoHighway8DL: + { type: GFX, offset: 0x60143E0, symbol: aCoHighway8DL } -D_CO_6014500: - { type: GFX, offset: 0x6014500, symbol: D_CO_6014500 } +aCoHighway4DL: + { type: GFX, offset: 0x6014500, symbol: aCoHighway4DL } -D_CO_6014670: - { type: GFX, offset: 0x6014670, symbol: D_CO_6014670 } +aCoHighway6DL: + { type: GFX, offset: 0x6014670, symbol: aCoHighway6DL } -D_CO_6014A20: - { type: GFX, offset: 0x6014A20, symbol: D_CO_6014A20 } +aCoHighway9DL: + { type: GFX, offset: 0x6014A20, symbol: aCoHighway9DL } -D_CO_6014B50: - { type: GFX, offset: 0x6014B50, symbol: D_CO_6014B50 } +aCoBuilding3DL: + { type: GFX, offset: 0x6014B50, symbol: aCoBuilding3DL } D_CO_60151A8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x060151A8, symbol: D_CO_60151A8 } -D_CO_60153B0: - { type: GFX, offset: 0x60153B0, symbol: D_CO_60153B0 } +aCoTowerDL: + { type: GFX, offset: 0x60153B0, symbol: aCoTowerDL } -D_CO_6015F00: - { type: GFX, offset: 0x6015F00, symbol: D_CO_6015F00 } +aCoStoneArchDL: + { type: GFX, offset: 0x6015F00, symbol: aCoStoneArchDL } D_CO_6015700: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06015700, symbol: D_CO_6015700 } -D_CO_6016270: - { type: GFX, offset: 0x6016270, symbol: D_CO_6016270 } +aRadarDL: + { type: GFX, offset: 0x6016270, symbol: aRadarDL } -D_CO_60164F0: - { type: GFX, offset: 0x60164F0, symbol: D_CO_60164F0 } +aCoHighway3DL: + { type: GFX, offset: 0x60164F0, symbol: aCoHighway3DL } -D_CO_6016580: - { type: GFX, offset: 0x6016580, symbol: D_CO_6016580 } +aCoBuilding4DL: + { type: GFX, offset: 0x6016580, symbol: aCoBuilding4DL } D_CO_6017F10: { type: GFX, offset: 0x6017F10, symbol: D_CO_6017F10 } @@ -177,8 +177,8 @@ D_CO_6017F10: D_CO_60186E0: { type: GFX, offset: 0x60186E0, symbol: D_CO_60186E0 } -D_CO_6018E80: - { type: GFX, offset: 0x6018E80, symbol: D_CO_6018E80 } +aCoBuilding7DL: + { type: GFX, offset: 0x6018E80, symbol: aCoBuilding7DL } D_CO_60191C8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x060191C8, symbol: D_CO_60191C8 } @@ -195,14 +195,14 @@ D_CO_6019E60: D_CO_601FF58: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601FF58, symbol: D_CO_601FF58 } -D_CO_601A7D0: - { type: GFX, offset: 0x601A7D0, symbol: D_CO_601A7D0 } +aCoBuilding2DL: + { type: GFX, offset: 0x601A7D0, symbol: aCoBuilding2DL } D_CO_601AD60: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601AD60, symbol: D_CO_601AD60 } -D_CO_601B560: - { type: GFX, offset: 0x601B560, symbol: D_CO_601B560 } +aCoBuilding5DL: + { type: GFX, offset: 0x601B560, symbol: aCoBuilding5DL } D_CO_601B640: { type: GFX, offset: 0x601B640, symbol: D_CO_601B640 } @@ -210,14 +210,14 @@ D_CO_601B640: D_CO_601B6C0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601B6C0, symbol: D_CO_601B6C0 } -D_CO_601BEC0: - { type: GFX, offset: 0x601BEC0, symbol: D_CO_601BEC0 } +aCoBump2DL: + { type: GFX, offset: 0x601BEC0, symbol: aCoBump2DL } D_CO_601C1A8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601C1A8, symbol: D_CO_601C1A8 } -D_CO_601C9B0: - { type: GFX, offset: 0x601C9B0, symbol: D_CO_601C9B0 } +aCoTreeDL: + { type: GFX, offset: 0x601C9B0, symbol: aCoTreeDL } D_CO_601CAA0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x0601CAA0, symbol: D_CO_601CAA0 } @@ -234,8 +234,8 @@ D_CO_601ED00: D_CO_601F500: { type: GFX, offset: 0x601F500, symbol: D_CO_601F500 } -D_CO_601F5A0: - { type: GFX, offset: 0x601F5A0, symbol: D_CO_601F5A0 } +aCoArch1DL: + { type: GFX, offset: 0x601F5A0, symbol: aCoArch1DL } D_CO_6020760: { type: GFX, offset: 0x6020760, symbol: D_CO_6020760 } @@ -258,8 +258,8 @@ D_CO_6023DE8: D_CO_6024160: { type: GFX, offset: 0x6024160, symbol: D_CO_6024160 } -D_CO_60244A0: - { type: GFX, offset: 0x60244A0, symbol: D_CO_60244A0 } +aCoBump4DL: + { type: GFX, offset: 0x60244A0, symbol: aCoBump4DL } D_CO_60245E0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x060245E0, symbol: D_CO_60245E0 } @@ -285,14 +285,14 @@ D_CO_6029528: D_CO_6029674: { type: SF64:SKELETON, offset: 0x6029674, symbol: D_CO_6029674 } -D_CO_602991C: - { type: SF64:ANIM, offset: 0x602991C, symbol: D_CO_602991C } +aCoGaruda1Anim: + { type: SF64:ANIM, offset: 0x602991C, symbol: aCoGaruda1Anim } -D_CO_6029A48: - { type: SF64:SKELETON, offset: 0x6029A48, symbol: D_CO_6029A48 } +aCoGarudaSkel: + { type: SF64:SKELETON, offset: 0x6029A48, symbol: aCoGarudaSkel } -D_CO_602A520: - { type: SF64:ANIM, offset: 0x602A520, symbol: D_CO_602A520 } +aCoGaruda3Anim: + { type: SF64:ANIM, offset: 0x602A520, symbol: aCoGaruda3Anim } D_CO_602AA04: { type: SF64:ANIM, offset: 0x602AA04, symbol: D_CO_602AA04 } @@ -300,8 +300,8 @@ D_CO_602AA04: D_CO_602AA7C: { type: SF64:ANIM, offset: 0x602AA7C, symbol: D_CO_602AA7C } -D_CO_602AB48: - { type: SF64:SKELETON, offset: 0x602AB48, symbol: D_CO_602AB48 } +aCoDoorsSkel: + { type: SF64:SKELETON, offset: 0x602AB48, symbol: aCoDoorsSkel } D_CO_602BC18: { type: SF64:ANIM, offset: 0x602BC18, symbol: D_CO_602BC18 } @@ -318,11 +318,11 @@ D_CO_602D31C: D_CO_602D400: { type: SF64:ANIM, offset: 0x602D400, symbol: D_CO_602D400 } -D_CO_602D5AC: - { type: SF64:SKELETON, offset: 0x602D5AC, symbol: D_CO_602D5AC } +aCoCarrierSkel: + { type: SF64:SKELETON, offset: 0x602D5AC, symbol: aCoCarrierSkel } -D_CO_602D5F0: - { type: GFX, offset: 0x602D5F0, symbol: D_CO_602D5F0 } +aCoBuilding1DL: + { type: GFX, offset: 0x602D5F0, symbol: aCoBuilding1DL } D_CO_602DA20: { type: GFX, offset: 0x602DA20, symbol: D_CO_602DA20 } @@ -333,17 +333,17 @@ D_CO_602DCA0: D_CO_602DD40: { type: GFX, offset: 0x602DD40, symbol: D_CO_602DD40 } -D_CO_602E080: - { type: GFX, offset: 0x602E080, symbol: D_CO_602E080 } +aCoHighway2DL: + { type: GFX, offset: 0x602E080, symbol: aCoHighway2DL } -D_CO_602E570: - { type: GFX, offset: 0x602E570, symbol: D_CO_602E570 } +aCoBump5DL: + { type: GFX, offset: 0x602E570, symbol: aCoBump5DL } -D_CO_602E7A0: - { type: GFX, offset: 0x602E7A0, symbol: D_CO_602E7A0 } +aCoBump3DL: + { type: GFX, offset: 0x602E7A0, symbol: aCoBump3DL } -D_CO_602E9E0: - { type: GFX, offset: 0x602E9E0, symbol: D_CO_602E9E0 } +aCoBump1DL: + { type: GFX, offset: 0x602E9E0, symbol: aCoBump1DL } D_CO_602ECB0: { type: GFX, offset: 0x602ECB0, symbol: D_CO_602ECB0 } @@ -351,8 +351,8 @@ D_CO_602ECB0: D_CO_602ED50: { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 16, offset: 0x0602ED50, symbol: D_CO_602ED50 } -D_CO_602F7C0: - { type: GFX, offset: 0x602F7C0, symbol: D_CO_602F7C0 } +aCoPoleDL: + { type: GFX, offset: 0x602F7C0, symbol: aCoPoleDL } D_CO_602F848: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x0602F848, symbol: D_CO_602F848 } @@ -408,11 +408,11 @@ D_CO_60355A0: D_CO_6035DA0: { type: GFX, offset: 0x6035DA0, symbol: D_CO_6035DA0 } -D_CO_6035F10: - { type: GFX, offset: 0x6035F10, symbol: D_CO_6035F10 } +aCoBuilding8DL: + { type: GFX, offset: 0x6035F10, symbol: aCoBuilding8DL } -D_CO_60361F0: - { type: GFX, offset: 0x60361F0, symbol: D_CO_60361F0 } +aCoBuilding6DL: + { type: GFX, offset: 0x60361F0, symbol: aCoBuilding6DL } D_CO_60363B0: { type: GFX, offset: 0x60363B0, symbol: D_CO_60363B0 } @@ -435,11 +435,11 @@ D_CO_6036D58: D_CO_6037160: { type: SF64:ENVIRONMENT, offset: 0x6037160, symbol: D_CO_6037160 } -D_CO_60371A4: - { type: SF64:OBJECT_INIT, offset: 0x60371A4, symbol: D_CO_60371A4 } +aCoOnRailsLevelObjects: + { type: SF64:OBJECT_INIT, offset: 0x60371A4, symbol: aCoOnRailsLevelObjects } -D_CO_603B074: - { type: SF64:OBJECT_INIT, offset: 0x603B074, symbol: D_CO_603B074 } +aCoAllRangeLevelObjects: + { type: SF64:OBJECT_INIT, offset: 0x603B074, symbol: aCoAllRangeLevelObjects } D_CO_603D9E8: { type: SF64:SCRIPT, offset: 0x603D9E8, symbol: D_CO_603D9E8 } @@ -448,50 +448,50 @@ D_CO_603D9E8: D_CO_603DC40: { type: SF64:HITBOX, offset: 0x603DC40, symbol: D_CO_603DC40 } -D_CO_603DD40: - { type: SF64:HITBOX, offset: 0x603DD40, symbol: D_CO_603DD40 } +aCoHighway2Hitbox: + { type: SF64:HITBOX, offset: 0x603DD40, symbol: aCoHighway2Hitbox } -D_CO_603DDF0: - { type: SF64:HITBOX, offset: 0x603DDF0, symbol: D_CO_603DDF0 } +aCoBuilding1Hitbox: + { type: SF64:HITBOX, offset: 0x603DDF0, symbol: aCoBuilding1Hitbox } -D_CO_603DCA4: - { type: SF64:HITBOX, offset: 0x603DCA4, symbol: D_CO_603DCA4 } +aCoHighway1Hitbox: + { type: SF64:HITBOX, offset: 0x603DCA4, symbol: aCoHighway1Hitbox } -D_CO_603DE8C: - { type: SF64:HITBOX, offset: 0x603DE8C, symbol: D_CO_603DE8C } +aCoBuilding2Hitbox: + { type: SF64:HITBOX, offset: 0x603DE8C, symbol: aCoBuilding2Hitbox } -D_CO_603DEF4: - { type: SF64:HITBOX, offset: 0x603DEF4, symbol: D_CO_603DEF4 } +aCoBuilding3Hitbox: + { type: SF64:HITBOX, offset: 0x603DEF4, symbol: aCoBuilding3Hitbox } -D_CO_603DF8C: - { type: SF64:HITBOX, offset: 0x603DF8C, symbol: D_CO_603DF8C } +aCoBuilding4Hitbox: + { type: SF64:HITBOX, offset: 0x603DF8C, symbol: aCoBuilding4Hitbox } -D_CO_603DFDC: - { type: SF64:HITBOX, offset: 0x603DFDC, symbol: D_CO_603DFDC } +aCoBuilding5Hitbox: + { type: SF64:HITBOX, offset: 0x603DFDC, symbol: aCoBuilding5Hitbox } -D_CO_603E014: - { type: SF64:HITBOX, offset: 0x603E014, symbol: D_CO_603E014 } +aCoBuilding6Hitbox: + { type: SF64:HITBOX, offset: 0x603E014, symbol: aCoBuilding6Hitbox } -D_CO_603E030: - { type: SF64:HITBOX, offset: 0x603E030, symbol: D_CO_603E030 } +aCoBuilding7Hitbox: + { type: SF64:HITBOX, offset: 0x603E030, symbol: aCoBuilding7Hitbox } -D_CO_603E09C: - { type: SF64:HITBOX, offset: 0x603E09C, symbol: D_CO_603E09C } +aCoBuilding8Hitbox: + { type: SF64:HITBOX, offset: 0x603E09C, symbol: aCoBuilding8Hitbox } -D_CO_603E0EC: - { type: SF64:HITBOX, offset: 0x603E0EC, symbol: D_CO_603E0EC } +aCoWaterfallHitbox: + { type: SF64:HITBOX, offset: 0x603E0EC, symbol: aCoWaterfallHitbox } -D_CO_603E118: - { type: SF64:HITBOX, offset: 0x603E118, symbol: D_CO_603E118 } +aCoTowerHitbox: + { type: SF64:HITBOX, offset: 0x603E118, symbol: aCoTowerHitbox } -D_CO_603E14C: - { type: SF64:HITBOX, offset: 0x603E14C, symbol: D_CO_603E14C } +aCoArch1Hitbox: + { type: SF64:HITBOX, offset: 0x603E14C, symbol: aCoArch1Hitbox } -D_CO_603E1B4: - { type: SF64:HITBOX, offset: 0x603E1B4, symbol: D_CO_603E1B4 } +aCoArch2Hitbox: + { type: SF64:HITBOX, offset: 0x603E1B4, symbol: aCoArch2Hitbox } -D_CO_603E21C: - { type: SF64:HITBOX, offset: 0x603E21C, symbol: D_CO_603E21C } +aCoArch3Hitbox: + { type: SF64:HITBOX, offset: 0x603E21C, symbol: aCoArch3Hitbox } # seems unused D_CO_603E2C0: @@ -501,26 +501,26 @@ D_CO_603E2C0: D_CO_603E2F4: { type: SF64:HITBOX, offset: 0x603E2F4, symbol: D_CO_603E2F4 } -D_CO_603E3E0: - { type: SF64:HITBOX, offset: 0x603E3E0, symbol: D_CO_603E3E0 } +aCoStoneArchHitbox: + { type: SF64:HITBOX, offset: 0x603E3E0, symbol: aCoStoneArchHitbox } -D_CO_603E468: - { type: SF64:HITBOX, offset: 0x603E468, symbol: D_CO_603E468 } +aCoPoleHitbox: + { type: SF64:HITBOX, offset: 0x603E468, symbol: aCoPoleHitbox } -D_CO_603E484: - { type: SF64:HITBOX, offset: 0x603E484, symbol: D_CO_603E484 } +aCoTreeHitbox: + { type: SF64:HITBOX, offset: 0x603E484, symbol: aCoTreeHitbox } -D_CO_603E4A0: - { type: SF64:HITBOX, offset: 0x603E4A0, symbol: D_CO_603E4A0 } +aCoRadarHitbox: + { type: SF64:HITBOX, offset: 0x603E4A0, symbol: aCoRadarHitbox } -D_CO_603E4A4: - { type: SF64:HITBOX, offset: 0x603E4A4, symbol: D_CO_603E4A4 } +aCoBuilding9Hitbox: + { type: SF64:HITBOX, offset: 0x603E4A4, symbol: aCoBuilding9Hitbox } -D_CO_603E4DC: - { type: SF64:HITBOX, offset: 0x603E4DC, symbol: D_CO_603E4DC } +aCoBuilding10Hitbox: + { type: SF64:HITBOX, offset: 0x603E4DC, symbol: aCoBuilding10Hitbox } -D_CO_603E514: - { type: SF64:HITBOX, offset: 0x603E514, symbol: D_CO_603E514 } +aCoIBeamHitbox: + { type: SF64:HITBOX, offset: 0x603E514, symbol: aCoIBeamHitbox } D_CO_603E54C: { type: SF64:HITBOX, offset: 0x603E54C, symbol: D_CO_603E54C } @@ -531,14 +531,14 @@ D_CO_603E598: D_CO_603E5B4: { type: SF64:HITBOX, offset: 0x603E5B4, symbol: D_CO_603E5B4 } -D_CO_603E5D0: - { type: SF64:HITBOX, offset: 0x603E5D0, symbol: D_CO_603E5D0 } +CoGarudaHitbox: + { type: SF64:HITBOX, offset: 0x603E5D0, symbol: CoGarudaHitbox } -D_CO_603E604: - { type: SF64:HITBOX, offset: 0x603E604, symbol: D_CO_603E604 } +aCoGarudaDestroyHitbox: + { type: SF64:HITBOX, offset: 0x603E604, symbol: aCoGarudaDestroyHitbox } -D_CO_603E620: - { type: SF64:HITBOX, offset: 0x603E620, symbol: D_CO_603E620 } +aCoGrangaHitbox: + { type: SF64:HITBOX, offset: 0x603E620, symbol: aCoGrangaHitbox } D_CO_603E714: { type: SF64:HITBOX, offset: 0x603E714, symbol: D_CO_603E714 } @@ -549,35 +549,35 @@ D_CO_603E748: D_CO_603E7C4: { type: SF64:HITBOX, offset: 0x603E7C4, symbol: D_CO_603E7C4 } -D_CO_603E840: - { type: SF64:HITBOX, offset: 0x603E840, symbol: D_CO_603E840 } +aCoCarrierHitbox: + { type: SF64:HITBOX, offset: 0x603E840, symbol: aCoCarrierHitbox } -D_CO_603E88C: - { type: SF64:HITBOX, offset: 0x603E88C, symbol: D_CO_603E88C } +aCoRockwallHitbox: + { type: SF64:HITBOX, offset: 0x603E88C, symbol: aCoRockwallHitbox } -D_CO_603E8A8: - { type: SF64:HITBOX, offset: 0x603E8A8, symbol: D_CO_603E8A8 } +aCoDoorsHitbox: + { type: SF64:HITBOX, offset: 0x603E8A8, symbol: aCoDoorsHitbox } D_CO_603E924: { type: SF64:HITBOX, offset: 0x603E924, symbol: D_CO_603E924 } -D_CO_603E98C: - { type: SF64:HITBOX, offset: 0x603E98C, symbol: D_CO_603E98C } +aCoBuildingOnFireHitbox: + { type: SF64:HITBOX, offset: 0x603E98C, symbol: aCoBuildingOnFireHitbox } -D_CO_603E9EC: - { type: SF64:HITBOX, offset: 0x603E9EC, symbol: D_CO_603E9EC } +aCoHighway5Hitbox: + { type: SF64:HITBOX, offset: 0x603E9EC, symbol: aCoHighway5Hitbox } -D_CO_603EA08: - { type: SF64:HITBOX, offset: 0x603EA08, symbol: D_CO_603EA08 } +aCoHighway6Hitbox: + { type: SF64:HITBOX, offset: 0x603EA08, symbol: aCoHighway6Hitbox } -D_CO_603EA74: - { type: SF64:HITBOX, offset: 0x603EA74, symbol: D_CO_603EA74 } +aCoHighway7Hitbox: + { type: SF64:HITBOX, offset: 0x603EA74, symbol: aCoHighway7Hitbox } -D_CO_603EAE0: - { type: SF64:HITBOX, offset: 0x603EAE0, symbol: D_CO_603EAE0 } +aCoHighway8Hitbox: + { type: SF64:HITBOX, offset: 0x603EAE0, symbol: aCoHighway8Hitbox } -D_CO_603EB0C: - { type: SF64:HITBOX, offset: 0x603EB0C, symbol: D_CO_603EB0C } +aCoHighway9Hitbox: + { type: SF64:HITBOX, offset: 0x603EB0C, symbol: aCoHighway9Hitbox } D_CO_603EB38: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0603EB38, symbol: D_CO_603EB38 } diff --git a/assets/yaml/us/rev1/ast_fortuna.yaml b/assets/yaml/us/rev1/ast_fortuna.yaml index 2c33e207..4fafae5e 100644 --- a/assets/yaml/us/rev1/ast_fortuna.yaml +++ b/assets/yaml/us/rev1/ast_fortuna.yaml @@ -116,8 +116,8 @@ D_FO_6009F90: D_FO_600A018: { type: TEXTURE, format: IA8, width: 32, height: 32, offset: 0x600A018, ctype: u8, symbol: D_FO_600A018 } -D_FO_600A420: - { type: GFX, offset: 0x600A420, symbol: D_FO_600A420 } +aFoPoleDL: + { type: GFX, offset: 0x600A420, symbol: aFoPoleDL } D_FO_600A4A8: { type: TEXTURE, format: RGBA16, width: 32, height: 64, offset: 0x600A4A8, ctype: u16, symbol: D_FO_600A4A8 } @@ -158,14 +158,14 @@ D_FO_600F3F4: D_FO_600F60C: { type: SF64:COLPOLY, offset: 0x600F60C, count: 93, symbol: D_FO_600F60C, mesh_symbol: D_FO_OFFSET } -D_FO_600FE9C: - { type: SF64:HITBOX, offset: 0x600FE9C, symbol: D_FO_600FE9C } +aFoPoleHitbox: + { type: SF64:HITBOX, offset: 0x600FE9C, symbol: aFoPoleHitbox } D_FO_600FEB8: { type: SF64:HITBOX, offset: 0x600FEB8, symbol: D_FO_600FEB8 } -D_FO_600FF30: - { type: SF64:HITBOX, offset: 0x600FF30, symbol: D_FO_600FF30 } +aFoRadarHitbox: + { type: SF64:HITBOX, offset: 0x600FF30, symbol: aFoRadarHitbox } D_FO_600FF64: { type: SF64:HITBOX, offset: 0x600FF64, symbol: D_FO_600FF64 } diff --git a/assets/yaml/us/rev1/ast_map.yaml b/assets/yaml/us/rev1/ast_map.yaml index 44747cae..a77becb0 100644 --- a/assets/yaml/us/rev1/ast_map.yaml +++ b/assets/yaml/us/rev1/ast_map.yaml @@ -367,11 +367,14 @@ D_MAP_6047E70: { type: GFX, offset: 0x6047E70, symbol: D_MAP_6047E70 } D_MAP_6047F80: - { type: TEXTURE, format: IA8, offset: 0x06047F80, width: 64, height: 64, ctype: u8, symbol: D_MAP_6047F80 } + { type: TEXTURE, format: IA8, offset: 0x06047F80, width: 64, height: 32, ctype: u8, symbol: D_MAP_6047F80 } + +D_MAP_6048780: + { type: TEXTURE, format: IA8, offset: 0x06048780, width: 64, height: 32, ctype: u8, symbol: D_MAP_6048780 } D_MAP_6048F80: { type: TEXTURE, format: IA8, offset: 0x06048F80, width: 64, height: 64, ctype: u8, symbol: D_MAP_6048F80 } - + D_MAP_6049F80: { type: GFX, offset: 0x6049F80, symbol: D_MAP_6049F80 } diff --git a/assets/yaml/us/rev1/ast_sector_z.yaml b/assets/yaml/us/rev1/ast_sector_z.yaml index bd532e3f..5213b9d2 100644 --- a/assets/yaml/us/rev1/ast_sector_z.yaml +++ b/assets/yaml/us/rev1/ast_sector_z.yaml @@ -30,11 +30,11 @@ D_SZ_6000840: D_SZ_60012D0: { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 9, offset: 0x60012D0, symbol: D_SZ_60012D0 } -D_SZ_6001360: - { type: GFX, offset: 0x6001360, symbol: D_SZ_6001360 } +aSzSpaceJunk1DL: + { type: GFX, offset: 0x6001360, symbol: aSzSpaceJunk1DL } -D_SZ_6001A10: - { type: GFX, offset: 0x6001A10, symbol: D_SZ_6001A10 } +aSzSpaceJunk2DL: + { type: GFX, offset: 0x6001A10, symbol: aSzSpaceJunk2DL } D_SZ_6001C80: { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x06001C80, symbol: D_SZ_6001C80, tlut: 0x06001D80 } @@ -42,8 +42,8 @@ D_SZ_6001C80: D_SZ_6001D80: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x06001D80, symbol: D_SZ_6001D80 } -D_SZ_6001DA0: - { type: GFX, offset: 0x6001DA0, symbol: D_SZ_6001DA0 } +aSzSpaceJunk3DL: + { type: GFX, offset: 0x6001DA0, symbol: aSzSpaceJunk3DL } D_SZ_60025F0: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x60025F0, symbol: D_SZ_60025F0, tlut: 0x060029F0 } @@ -69,12 +69,12 @@ D_SZ_6002DE0: D_SZ_6002EE0: { type: TEXTURE, ctype: u16, format: TLUT, colors: 80, offset: 0x06002EE0, symbol: D_SZ_6002EE0 } -D_SZ_6002F80: - { type: GFX, offset: 0x6002F80, symbol: D_SZ_6002F80 } +aSzBackgroundDL: + { type: GFX, offset: 0x6002F80, symbol: aSzBackgroundDL } # Sector Z Background -D_SZ_6003010: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06003010, symbol: D_SZ_6003010 } +aSzBackgroundTex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06003010, symbol: aSzBackgroundTex } D_SZ_6004010: { type: GFX, offset: 0x6004010, symbol: D_SZ_6004010 } @@ -97,8 +97,8 @@ D_SZ_6004558: D_SZ_6004570: { type: GFX, offset: 0x6004570, symbol: D_SZ_6004570 } -D_SZ_60045E0: - { type: GFX, offset: 0x60045E0, symbol: D_SZ_60045E0 } +aSZSpaceJunk4DL: + { type: GFX, offset: 0x60045E0, symbol: aSZSpaceJunk4DL } D_SZ_60047E0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60047E0, symbol: D_SZ_60047E0 } @@ -145,8 +145,8 @@ D_SZ_6006CD8: D_SZ_6006D64: { type: SF64:ANIM, offset: 0x6006D64, symbol: D_SZ_6006D64 } -D_SZ_6006E50: - { type: SF64:SKELETON, offset: 0x6006E50, symbol: D_SZ_6006E50 } +aSzMissileSkel: + { type: SF64:SKELETON, offset: 0x6006E50, symbol: aSzMissileSkel } D_SZ_6006E70: { type: SF64:ENVIRONMENT, offset: 0x6006E70, symbol: D_SZ_6006E70 } @@ -157,8 +157,8 @@ D_SZ_6006EB4: D_SZ_6007558: {type: SF64:COLPOLY, count: 316, offset: 0x6007558, symbol: D_SZ_6007558, mesh_symbol: D_SZ_OFFSET } -D_SZ_6009230: - { type: SF64:HITBOX, offset: 0x6009230, symbol: D_SZ_6009230 } +aSZMissileHitbox: + { type: SF64:HITBOX, offset: 0x6009230, symbol: aSZMissileHitbox } D_SZ_600924C: { type: SF64:HITBOX, offset: 0x600924C, symbol: D_SZ_600924C } diff --git a/assets/yaml/us/rev1/ast_titania.yaml b/assets/yaml/us/rev1/ast_titania.yaml index 63bf8435..829c10bd 100644 --- a/assets/yaml/us/rev1/ast_titania.yaml +++ b/assets/yaml/us/rev1/ast_titania.yaml @@ -28,8 +28,8 @@ D_TI_6001B10: D_TI_6001BA8: {type: TEXTURE, format: RGBA16, ctype: u16, width: 32, height: 32, offset: 0x6001BA8, symbol: D_TI_6001BA8} -D_TI_60023B0: - {type: GFX, offset: 0x60023B0, symbol: D_TI_60023B0} +aTiCactusDL: + {type: GFX, offset: 0x60023B0, symbol: aTiCactusDL} D_TI_6002438: {type: TEXTURE, format: RGBA16, ctype: u16, width: 32, height: 64, offset: 0x6002438, symbol: D_TI_6002438} @@ -82,35 +82,35 @@ D_TI_60064AC: D_TI_60064C8: {type: SF64:HITBOX, offset: 0x60064C8, symbol: D_TI_60064C8} -D_TI_60064FC: - {type: SF64:HITBOX, offset: 0x60064FC, symbol: D_TI_60064FC} +aTiSkullHitbox: + {type: SF64:HITBOX, offset: 0x60064FC, symbol: aTiSkullHitbox} -D_TI_6006518: - {type: SF64:HITBOX, offset: 0x6006518, symbol: D_TI_6006518} +aTiRib0Hitbox: + {type: SF64:HITBOX, offset: 0x6006518, symbol: aTiRib0Hitbox} -D_TI_6006564: - {type: SF64:HITBOX, offset: 0x6006564, symbol: D_TI_6006564} +aTiRib1Hitbox: + {type: SF64:HITBOX, offset: 0x6006564, symbol: aTiRib1Hitbox} -D_TI_60065B0: - {type: SF64:HITBOX, offset: 0x60065B0, symbol: D_TI_60065B0} +aTiRib2Hitbox: + {type: SF64:HITBOX, offset: 0x60065B0, symbol: aTiRib2Hitbox} -D_TI_60065FC: - {type: SF64:HITBOX, offset: 0x60065FC, symbol: D_TI_60065FC} +aTiRib3Hitbox: + {type: SF64:HITBOX, offset: 0x60065FC, symbol: aTiRib3Hitbox} -D_TI_6006648: - {type: SF64:HITBOX, offset: 0x6006648, symbol: D_TI_6006648} +aTiRib4Hitbox: + {type: SF64:HITBOX, offset: 0x6006648, symbol: aTiRib4Hitbox} -D_TI_6006694: - {type: SF64:HITBOX, offset: 0x6006694, symbol: D_TI_6006694} +aTiRib5Hitbox: + {type: SF64:HITBOX, offset: 0x6006694, symbol: aTiRib5Hitbox} -D_TI_60066E0: - {type: SF64:HITBOX, offset: 0x60066E0, symbol: D_TI_60066E0} +aTiRib6Hitbox: + {type: SF64:HITBOX, offset: 0x60066E0, symbol: aTiRib6Hitbox} -D_TI_600672C: - {type: SF64:HITBOX, offset: 0x600672C, symbol: D_TI_600672C} +aTiRib7Hitbox: + {type: SF64:HITBOX, offset: 0x600672C, symbol: aTiRib7Hitbox} -D_TI_6006778: - {type: SF64:HITBOX, offset: 0x6006778, symbol: D_TI_6006778} +aTiRib8Hitbox: + {type: SF64:HITBOX, offset: 0x6006778, symbol: aTiRib8Hitbox} D_TI_60067C4: {type: SF64:HITBOX, offset: 0x60067C4, symbol: D_TI_60067C4} @@ -133,8 +133,8 @@ D_TI_6006874: D_TI_6006890: {type: SF64:HITBOX, offset: 0x6006890, symbol: D_TI_6006890} -D_TI_60068BC: - {type: SF64:HITBOX, offset: 0x60068BC, symbol: D_TI_60068BC} +aTiCactusHitbox: + {type: SF64:HITBOX, offset: 0x60068BC, symbol: aTiCactusHitbox} D_TI_60068F0: {type: SF64:HITBOX, offset: 0x60068F0, symbol: D_TI_60068F0} diff --git a/assets/yaml/us/rev1/ast_zoness.yaml b/assets/yaml/us/rev1/ast_zoness.yaml index 9a7e21ee..406db142 100644 --- a/assets/yaml/us/rev1/ast_zoness.yaml +++ b/assets/yaml/us/rev1/ast_zoness.yaml @@ -471,8 +471,8 @@ D_ZO_6024220: D_ZO_60242B8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60242B8, symbol: D_ZO_60242B8} -D_ZO_6024AC0: - { type: GFX, offset: 0x6024AC0, symbol: D_ZO_6024AC0} +aZoRock1DL: + { type: GFX, offset: 0x6024AC0, symbol: aZoRock1DL} D_ZO_6024D60: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6024D60, symbol: D_ZO_6024D60} @@ -502,8 +502,8 @@ D_ZO_602AC50: D_ZO_602AE94: { type: ARRAY, count: 242, array_type: Vec3f, offset: 0x602AE94, symbol: D_ZO_602AE94} -D_ZO_602B9EC: - { type: SF64:HITBOX, offset: 0x602B9EC, symbol: D_ZO_602B9EC} +aZoRock1Hitbox: + { type: SF64:HITBOX, offset: 0x602B9EC, symbol: aZoRock1Hitbox} D_ZO_602BA20: { type: SF64:HITBOX, offset: 0x602BA20, symbol: D_ZO_602BA20} diff --git a/include/fox_co.h b/include/fox_co.h new file mode 100644 index 00000000..7ffad414 --- /dev/null +++ b/include/fox_co.h @@ -0,0 +1,162 @@ +#ifndef FOX_CO_H +#define FOX_CO_H + +// Granga Boss: + +#define DMG_FLICKER_5 (5) // Damage indicator flickers for 5 frames +#define DMG_FLICKER_15 (15) // Damage indicator flickers for 15 frames +#define DMG_DESTROYED (1000) // Damage part is destroyed + +typedef enum GrangaStates { + /* 0 */ GRANGA_STATIONARY, + /* 1 */ GRANGA_STATE_1, + /* 2 */ GRANGA_STATE_2, + /* 3 */ GRANGA_STATE_3, + /* 4 */ GRANGA_STATE_4, + /* 5 */ GRANGA_STATE_5, + /* 6 */ GRANGA_STATE_6, + /* 7 */ GRANGA_STATE_7, +} GrangaStates; + +typedef enum GrangaWork { + /* 00 */ GRANGA_WORK_00, // x of missiles launched from it's right arm ? + /* 01 */ GRANGA_WORK_01, // y of missiles launched from it's right arm ? + /* 02 */ GRANGA_WORK_02, // z of missiles launched from it's right arm ? + /* 03 */ GRANGA_WORK_03, // x of something // destroy effect related? + /* 04 */ GRANGA_WORK_04, // y of something // destroy effect related? + /* 05 */ GRANGA_WORK_05, // z of something // destroy effect related? + /* 06 */ GRANGA_WORK_06, // x of missiles launched from it's left arm ? + /* 07 */ GRANGA_WORK_07, // y of missiles launched from it's left arm ? + /* 08 */ GRANGA_WORK_08, // z of missiles launched from it's left arm ? + /* 09 */ GRANGA_WORK_09, + /* 10 */ GRANGA_WORK_10, + /* 11 */ GRANGA_WORK_11, + /* 12 */ GRANGA_WORK_12, + /* 13 */ GRANGA_WORK_13, + /* 14 */ GRANGA_WORK_14, + /* 15 */ GRANGA_WORK_15, + /* 16 */ GRANGA_WORK_16, // yRot of missiles launched from both arms ? + /* 17 */ GRANGA_WORK_17, // x of something + /* 18 */ GRANGA_WORK_18, // y of something + /* 19 */ GRANGA_WORK_19, // z of something + /* 20 */ GRANGA_WORK_20, + /* 21 */ GRANGA_WORK_21, + /* 22 */ GRANGA_WORK_22, + /* 23 */ GRANGA_WORK_23, + /* 24 */ GRANGA_WORK_24, + /* 25 */ GRANGA_WORK_25, + /* 26 */ GRANGA_WORK_26, + /* 27 */ GRANGA_WORK_27, + /* 28 */ GRANGA_WORK_28, + /* 29 */ GRANGA_WORK_29, + /* 30 */ GRANGA_WORK_30, + /* 31 */ GRANGA_WORK_31, + /* 32 */ GRANGA_WORK_32, + /* 33 */ GRANGA_WORK_33, + /* 34 */ GRANGA_WORK_34, + /* 35 */ GRANGA_WORK_35, + /* 36 */ GRANGA_WORK_36, + /* 37 */ GRANGA_WORK_37, + /* 38 */ GRANGA_WORK_38, + /* 39 */ GRANGA_WORK_39, + /* 40 */ GRANGA_WORK_40, + /* 41 */ GRANGA_WORK_41, + /* 42 */ GRANGA_WORK_42, + /* 43 */ GRANGA_WORK_43, + /* 44 */ GRANGA_WORK_44, + /* 45 */ GRANGA_WORK_45, + /* 46 */ GRANGA_WORK_46, + /* 47 */ GRANGA_WORK_47, + /* 48 */ GRANGA_WORK_48, + /* 49 */ GRANGA_WORK_49, + /* 50 */ GRANGA_WORK_50, + /* 51 */ GRANGA_WORK_51, + /* 52 */ GRANGA_WORK_52, + /* 53 */ GRANGA_WORK_53, + /* 54 */ GRANGA_WORK_54, + /* 55 */ GRANGA_WORK_55, + /* 56 */ GRANGA_WORK_56, + /* 57 */ GRANGA_WORK_57, + /* 58 */ GRANGA_WORK_58, + /* 59 */ GRANGA_WORK_59, + /* 60 */ GRANGA_WORK_60, + /* 61 */ GRANGA_WORK_61, + /* 62 */ GRANGA_WORK_62, // x + /* 63 */ GRANGA_WORK_63, // y + /* 64 */ GRANGA_WORK_64, // z + /* 65 */ GRANGA_WORK_65, + /* 66 */ GRANGA_WORK_66, // xTargetPos ? + /* 67 */ GRANGA_WORK_67 // zTargetPos ? +} GrangaWork; + +typedef enum GrangaSwork { + /* 00 */ GRANGA_SWK_0, + + // Damage indicators, one per limb + /* 01 */ GRANGA_RIGHT_ARM_DMG_IND, + /* 02 */ GRANGA_LEFT_ARM_DMG_IND, + /* 03 */ GRANGA_GUN_DMG_IND, + /* 04 */ GRANGA_RIGHT_LEG_DMG_IND, + /* 07 */ GRANGA_LEFT_LEG_DMG_IND = 7, + /* 10 */ GRANGA_BACKPACK_DMG_IND = 10, + + /* 18 */ GRANGA_SWK_18 = 18, + /* 19 */ GRANGA_SWK_19, + /* 20 */ GRANGA_SWK_20, + /* 21 */ GRANGA_SWK_21, + /* 22 */ GRANGA_SWK_22, + /* 23 */ GRANGA_SWK_23, + + /* 24 */ GRANGA_LEFT_LEG_HP, + /* 25 */ GRANGA_RIGHT_LEG_HP, + /* 26 */ GRANGA_LEFT_ARM_HP, + /* 27 */ GRANGA_RIGHT_ARM_HP, + /* 28 */ GRANGA_PLASMA_GUN_HP, + /* 29 */ GRANGA_BACKPACK_HP, + + /* 30 */ GRANGA_ATTACK_STATE, + /* 31 */ GRANGA_NEXT_STATE, + /* 32 */ GRANGA_SWK_32, + /* 33 */ GRANGA_INIT, + /* 35 */ GRANGA_MISSILE_COUNT = 35, + /* 36 */ GRANGA_1UP_CHECK +} GrangaSwork; + +typedef enum GrangaFwork { + /* 00 */ GRANGA_FWK_00, + /* 01 */ GRANGA_FWK_01, + /* 02 */ GRANGA_FWK_02, + /* 03 */ GRANGA_FWK_03, + /* 04 */ GRANGA_FWK_04, + /* 12 */ GRANGA_FWK_12 = 12, + /* 13 */ GRANGA_FWK_13, + /* 14 */ GRANGA_FWK_14, +} GrangaFwork; + +typedef enum GrangaDmgParts { + /* 0 */ GRANGA_DMG_BACKPACK, + /* 1 */ GRANGA_DMG_LEFT_ARM, + /* 2 */ GRANGA_DMG_RIGHT_ARM, + /* 3 */ GRANGA_DMG_GUN, + /* 4 */ GRANGA_DMG_LEFT_LEG, + /* 5 */ GRANGA_DMG_RIGHT_LEG, +} GrangaDmgParts; + +typedef enum GrangaAttackState { + /* 0 */ GRANGA_ATTACK_IDLE, + /* 1 */ GRANGA_ATTACK_MISSILES, + /* 2 */ GRANGA_ATTACK_LASERS, + /* 3 */ GRANGA_ATTACK_PLASMA, +} GrangaAttackState; + + +// Carrier Boss: + +typedef enum CoCarrierParts { + /* 0 */ CARRIER_0, + /* 1 */ CARRIER_1, + /* 2 */ CARRIER_2, + /* 3 */ CARRIER_3 +} CarrierParts; + +#endif diff --git a/include/functions.h b/include/functions.h index 717a5235..e0c9f879 100644 --- a/include/functions.h +++ b/include/functions.h @@ -25,7 +25,7 @@ void ActorAllRange_SetShadowData(Actor* this); void ActorAllRange_SpawnTeam(void); void ActorAllRange_PlayMessage(u16* msg, RadioCharacterId character); void ActorAllRange_UpdateStarWolfEvents(Actor*); -void ActorAllRange_UpdateEvemyEvents(Actor*); +void ActorAllRange_UpdateEnemyEvents(Actor*); void ActorAllRange_ApplyDamage(Actor*); bool func_360_80031900(Actor*); void ActorAllRange_Update(Actor* this); @@ -50,7 +50,7 @@ void Background_dummy_80040CDC(void); void Background_DrawGround(void); // fox_boss -void Boss_AwardBonus(Boss* boss); +void Boss_AwardBonus(Boss* this); void Boss299_Init(Boss* boss); void Boss299_Update(Boss* boss); void Boss299_Draw(Boss* boss); @@ -92,10 +92,10 @@ void func_display_80057814(Player*); void Play_Draw(void); // fox_edata -void func_edata_800594F0(Scenery*); -void func_edata_800595D0(Scenery*); +void Scenery48_Draw(Scenery*); +void Scenery49_Draw(Scenery*); void Object_ApplyWaterDistortion(void); -void func_edata_800596B0(Actor*); +void Actor289_Draw(Actor*); // fox_edisplay void Graphics_SetScaleMtx(f32); @@ -104,22 +104,22 @@ void Actor201_Draw(Actor*); void Actor202_Draw(Actor*); void MeteoTunnel_Draw(Scenery*); void Scenery_DrawTitaniaBones(Scenery*); -void Scenery42_Draw(Scenery*); +void CoIBeam_Draw(Scenery*); void Actor196_Draw(Actor*); void Sprite167_Draw(Sprite*); void FogShadow_Draw(Sprite*); -void func_edisplay_80059F68(Scenery*); -void func_edisplay_80059FDC(Scenery*); +void CoBuilding9_Draw(Scenery*); +void CoBuilding10_Draw(Scenery*); void ActorDebris_Draw(Actor*); void Actor_DrawEngineAndContrails(Actor*); void Actor_DrawEngineGlow(Actor*, s32); void func_edisplay_8005B388(Actor*); -void func_edisplay_8005B6A4(Actor*); -void func_edisplay_8005B71C(Actor*); -void func_edisplay_8005B7CC(Actor*); -void func_edisplay_8005B848(Actor*); -void func_edisplay_8005B9A4(Actor*); -void func_edisplay_8005BA30(Actor*); +void Actor180_Draw(Actor*); +void Actor182_Draw(Actor*); +void Actor186_Draw(Actor*); +void Actor190_191_Draw(Actor*); +void Actor192_Draw(Actor*); +void Actor193_Draw(Actor*); void ItemCheckpoint_Draw(Item*); void ItemSilverRing_Draw(Item*); void ItemSilverStar_Draw(Item*); @@ -160,20 +160,20 @@ void func_enmy_80062C38(f32, f32); bool Object_CheckHitboxCollision(Vec3f* pos, f32* hitboxData, Object* obj, f32 xRot, f32 yRot, f32 zRot); bool Object_CheckSingleHitbox(Vec3f*, f32*, Vec3f*); bool Object_CheckPolyCollision(Vec3f* , Vec3f* , ObjectId , Object* ); -s32 Object_CheckCollision(s32 , Vec3f* , Vec3f* , s32 ); +s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode); void Scenery_UpdateTitaniaBones(Scenery*); void func_enmy_800654E4(Object*); -void func_enmy_800656D4(Actor*); +void Actors190_191_Update(Actor*); void func_enmy_800660F0(Actor*); void Actor_Despawn(Actor*); -void func_enmy_8006654C(Actor*); +void Actor192_Update(Actor*); void func_enmy_8006684C(Actor*); -void func_enmy_800669A0(Actor*); -void func_enmy_80066A80(Actor*); +void Actor193_Update(Actor*); +void Actor180_Update(Actor*); void func_enmy_80066C00(Scenery*); -void func_enmy_80066D5C(Scenery*); +void CoBuilding9_Update(Scenery*); void Sprite167_Update(Sprite*); -void func_enmy_80066EA8(Scenery*); +void SceneryRotateTowardsCamera(Scenery*); void Item_CheckBounds(Item*); void Item_SpinPickup(Item*); void Actor_SpawnDebris70(f32, f32, f32, f32, f32, f32, f32, f32); @@ -212,18 +212,19 @@ void Object_Update(void); //fox_enmy2 void Actor237_Update(Actor*); void Actor237_Draw(Actor*); -void Scenery54_Update(Scenery*); +void CoWaterfall_Update(Scenery*); void Actor201_Update(Actor*); void Actor202_Update(Actor*); void Actor194_Update(Actor*); void Actor194_Dying(Actor*); void Actor194_Draw(Actor*); -void Scenery42_Update(Scenery*); +void CoIBeam_Update(Scenery*); void Actor196_Update(Actor*); void ActorDebris_Update(Actor*); void MeteoTunnel_Update(Scenery*); void Actor_SetupPlayerShot(PlayerShotId, PlayerShot*, s32, f32, f32, f32, f32, f32, f32, f32, f32, f32); -void Actor_SpawnPlayerLaser(s32, f32, f32, f32, f32, f32, f32, f32, f32, f32); +void Actor_SpawnPlayerLaser(s32 actorId, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 xRot, f32 yRot, + f32 zRot); void Actor_SpawnGreatFoxLaser(s32 actorId, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 xRot, f32 yRot, f32 zRot); void ActorEvent_SpawnEffect347(f32 xPos, f32 yPos, f32 zPos, f32 scale1); @@ -243,78 +244,78 @@ void BonusText_Update(void); void BonusText_DrawAll(void); Effect* func_effect_8007783C(ObjectId objId); void func_effect_8007797C(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2); -void func_effect_80077A00(Effect* ); -void func_effect_80077A7C(Effect* ); -void func_effect_80077B78(Effect* ); -void func_effect_80077B84(Effect* ); -void func_effect_80078038(Effect* ); -void func_effect_800780F8(Effect* ); -void func_effect_800783C0(Effect* ); -void func_effect_80078438(Effect* ); -void func_effect_800784B4(Effect* ); -void func_effect_80078550(Effect* ); -void func_effect_80078604(Effect* ); -void func_effect_8007868C(Effect* ); -void func_effect_8007879C(Effect* ); -void func_effect_800788B0(Effect* ); -void func_effect_80078A64(Effect* ); -void func_effect_80078AEC(Effect* ); -void func_effect_80078B8C(Effect*); -void func_effect_80078BE0(Effect* ); -void func_effect_80078C84(Effect* ); -void func_effect_80078CE8(Effect* ); +void Effect_Effect372_Draw(Effect* ); +void Effect_Effect382_Draw(Effect* ); +void Effect_Effect388_Draw(Effect* ); +void Effect_Effect384_Draw(Effect* ); +void Effect_Effect385_Draw(Effect* ); +void Effect_Effect389_Draw(Effect* ); +void Effect_Effect347_Draw(Effect* ); +void Effect_Effect351_Draw(Effect* ); +void Effect_Clouds_Draw(Effect* ); +void Effect_Effect366_Draw(Effect* ); +void Effect_Effect367_Draw(Effect* ); +void Effect_Effect344_Draw(Effect* ); +void Effect_Effect345_Draw(Effect* ); +void Effect_Effect346_Draw(Effect* ); +void Effect_Effect348_Draw(Effect* ); +void Effect_Effect355_Draw(Effect* ); +void Effect_Effect353_Draw(Effect*); +void Macbeth_Effect377_Draw(Effect* ); +void Effect_Effect356_Draw(Effect* ); +void Macbeth_Effect376_Draw(Effect* ); void func_effect_80078E50(f32 xPos, f32 yPos, f32 zPos, f32 scale2); -void func_effect_80078EBC(Effect* ); -void func_effect_80078F78(Effect* ); +void Effect_Effect393_Update(Effect* ); +void Effect_Effect393_Draw(Effect* ); void func_effect_800794CC(f32 xPos, f32 yPos, f32 zPos, f32 scale2); void func_effect_8007953C(f32 xPos, f32 yPos, f32 zPos, f32 scale2); void func_effect_800795AC(f32 xPos, f32 yPos, f32 zPos, f32 scale2); void func_effect_80079618(f32 xPos, f32 yPos, f32 zPos, f32 scale2); -void func_effect_8007968C(Effect*); -void func_effect_800798F0(Effect* ); -void func_effect_8007A28C(Effect* ); -void func_effect_8007A3C0(Effect* ); +void Effect_Effect357_Update(Effect*); +void Effect_Effect357_Draw(Effect* ); +void Effect_Effect383_Update(Effect* ); +void Effect_Effect383_Draw(Effect* ); void func_effect_8007A568(f32 xPos, f32 yPos, f32 zPos, f32 scale1); -void func_effect_8007A5F8(Effect* , Vec3f* pos, u32 sfxId); -void func_effect_8007A6F0(Vec3f* pos, s32 sfxId); -void func_effect_8007A748(Effect*); +void Effect_SetupTimedSfxAtPos(Effect* , Vec3f* pos, u32 sfxId); +void Effect_SpawnTimedSfxAtPos(Vec3f* pos, s32 sfxId); +void Effect_TimedSfx_Update(Effect*); bool func_effect_8007A774(Player*, Effect*, f32); void func_effect_8007A900(f32 xPos, f32 yPos, f32 zPos, f32 scale1, u8, u8, u16); -void func_effect_8007A994(Effect*); -void func_effect_8007AA60(Effect*); -void func_effect_8007AB50(Effect*); +void Effect_Effect359_Update(Effect359*); +void Effect_Effect359_Draw(Effect*); +void Effect_Effect372_Update(Effect*); void func_effect_8007ACE0(f32 xPos, f32 yPos, f32 zPos, f32 scale2, f32 scale1, f32 yRot); void func_effect_8007ADF4(f32 xPos, f32 yPos, f32 zPos, f32 scale2, f32 scale1); void func_effect_8007AFD0(f32 xPos, f32 zPos, f32 xVel, f32 zVel, f32 scale1); -void func_effect_8007B040(Effect*); -void func_effect_8007B0F4(Effect*); +void Effect_Effect382_Update(Effect*); +void Effect_Effect381_Update(Effect*); void func_effect_8007B228(f32 xPos, f32 yPos, f32 zPos, f32 scale1); void func_effect_8007B344(f32 xPos, f32 yPos, f32 zPos, f32 scale1, s32 ); -void func_effect_8007B3B8(Effect*); +void Effect_Effect384_Update(Effect*); void func_effect_8007B550(f32 xPos, f32 yPos, f32 zPos, f32 scale1, s32 ); -void func_effect_8007B5C0(Effect*); -void func_effect_8007B62C(Effect*); -void func_effect_8007B670(Effect*); -void func_effect_8007B67C(Effect*); -void func_effect_8007B758(Effect*); +void Effect_Effect385_Update(Effect*); +void Effect_Clouds_Update(Effect*); +void Effect_Effect388_Update(Effect*); +void Effect_Effect389_Update(Effect*); +void Effect_Effect347_Update(Effect*); void func_effect_8007B8F8(f32 xPos, f32 yPos, f32 zPos, f32 scale2); -void func_effect_8007B960(Effect*); +void Effect_Effect364_Update(Effect*); void func_effect_8007BC7C(f32 xPos, f32 yPos, f32 zPos, f32 scale2); -void func_effect_8007BCE8(Effect*); -void func_effect_8007B9DC(Effect*); -void func_effect_8007BDE0(Effect*); -void func_effect_8007BE54(Effect*); -void func_effect_8007BEE8(Effect*); +void Effect_Effect362_Update(Effect*); +void Effect_Effect364_Draw(Effect*); +void Effect_Effect361_Update(Effect*); +void Effect_Effect360_Update(Effect*); +void Effect_Effect360_361_362_Draw(Effect*); void func_effect_8007BFFC(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, s32 timer50); void func_effect_8007C120(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, s32 timer50); -void func_effect_8007C250(Effect*); +void Effect_Effect386_Update(Effect*); void func_effect_8007C484(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, s32 arg7); -void func_effect_8007C50C(Effect*); +void Effect_Effect390_Update(Effect*); void func_effect_8007C688(f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 timer50); -void func_effect_8007C8C4(Effect*); +void Effect_Effect387_Update(Effect*); void func_effect_8007C85C(f32 xPos, f32 yPos, f32 zPos, f32 scale2); -void func_effect_8007C9E0(Effect*); -void func_effect_8007CAF0(Effect*); +void Effect_Effect343_Update(Effect*); +void Effect_Effect343_Draw(Effect*); void func_effect_8007CF30(f32 xPos, f32 yPos, f32 zPos, f32 scale2); void func_effect_8007D074(f32 xPos, f32 yPos, f32 zPos, f32 scale2); void func_effect_8007D0E0(f32 xPos, f32 yPos, f32 zPos, f32 scale2); @@ -322,54 +323,54 @@ void func_effect_8007D10C(f32 xPos, f32 yPos, f32 zPos, f32 scale2); void func_effect_8007D1E0(f32 xPos, f32 yPos, f32 zPos, f32 scale2); void func_effect_8007D24C(f32 xPos, f32 yPos, f32 zPos, f32 scale2); void func_effect_8007D2C8(f32 xPos, f32 yPos, f32 zPos, f32 scale2); -void func_effect_8007D2F4(Effect*); -void func_effect_8007D55C(Effect*); -void func_effect_8007D748(Effect*); -void func_effect_8007D8A8(Effect*); +void Effect_Effect339_Update(Effect*); +void Effect_FireSmoke_Draw(Effect*); +void Effect_Effect340_Update(Effect*); +void Effect_Effect341_Update(Effect*); void func_effect_8007D9DC(f32 xPos, f32 yPos, f32 zPos, f32 scale2, f32 scale1, s32 timer50); -void func_effect_8007DA58(Effect*); -void func_effect_8007DAE4(Effect*); -void func_effect_8007DB70(Effect*); -void func_effect_8007DED4(Effect*); -void func_effect_8007E014(Effect*); -void func_effect_8007E258(Effect*); -void func_effect_8007E298(Effect*); -void func_effect_8007E330(Effect*); -void func_effect_8007E3E4(Effect*); -void func_effect_8007E45C(Effect*); -void func_effect_8007E5CC(Effect*); -void func_effect_8007E648(Effect*); -void func_effect_8007E93C(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPos, f32 speed); +void Effect_Effect375_Update(Effect*); +void Macbeth_Effect375_Draw(Effect*); +void Effect_Effect374_Update(Effect*); +void Macbeth_Effect374_Draw(Effect*); +void Effect_Effect344_Update(Effect*); +void Effect_Effect345_Update(Effect*); +void Effect_Effect342_Update(Effect*); +void Effect_Effect342_Draw(Effect*); +void Effect_Effect351_Update(Effect*); +void Effect_Effect365_Update(Effect*); +void Effect_Effect365_Draw(Effect*); +void Effect_Effect367_Update(Effect*); +void func_effect_8007E93C(Effect* this, u32 objId, f32 xPos, f32 yPos, f32 zPos, f32 speed); void func_effect_8007EE68(ObjectId objId, Vec3f* pos, Vec3f* rot, Vec3f* arg3, Vec3f* arg4, f32 scale2); void func_effect_8007F04C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 zRot, f32 unkX, f32 unkY, f32 unkZ, f32 xVel, f32 yVel, f32 zVel, f32 scale2); -void func_effect_8007F11C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 speed); +void Effect_EnemyLaser(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 speed); void func_effect_8007F20C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 speed); -void func_effect_8007F438(Effect*); -void func_effect_8007F6B0(Effect*); -void func_effect_8007F958(Effect*); -void func_effect_8007FBE0(Effect*); -void func_effect_8007FE88(Effect*); +void Effect_Effect346_Update(Effect*); +void Effect_Effect348_Update(Effect*); +void Effect_Effect349_Update(Effect*); +void Effect_Effect350_Update(Effect*); +void Effect_Effect353_354_Update(Effect*); bool func_effect_8007FD84(Effect*); -void func_effect_800802B8(Effect*); -void func_effect_800802D8(Effect*); -void func_effect_800802F8(Effect*); -void func_effect_80080360(Effect*); -void func_effect_8008040C(Effect*); -void func_effect_8008092C(Effect*); -void func_effect_80080ACC(Effect*); -void func_effect_80080D04(Effect*); +void Effect_Effect355_Update(Effect*); +void Effect_Effect377_Update(Effect*); +void Effect_Effect356_Update(Effect*); +void Effect_Effect376_Update(Effect*); +void Effect_Effect398_Update(Effect*); +void Effect_Effect398_Draw(Effect*); +void Effect_Effect394_Update(Effect*); +void Effect_Effect394_Draw(Effect*); void func_effect_800815DC(void); void func_effect_80081A8C(f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 arg4); void func_effect_80081BEC(f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 arg4); -void func_effect_80081C5C(Effect*); -void func_effect_80082F78(Effect*); +void Effect_Effect395_Update(Effect*); +void Effect_Effect395_Draw(Effect*); void func_effect_8008377C(f32, f32, f32, f32, f32); -void func_effect_800837EC(Effect*); -void func_effect_80083B8C(Effect*); -void func_effect_80083C70(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 arg7, s32 arg8); +void Effect_Effect391_Update(Effect*); +void Effect_Effect391_Draw(Effect*); +void func_effect_80083C70(Effect* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 arg7, s32 arg8); void func_effect_80083D2C(f32 xPos, f32 yPos, f32 zPos, f32 srcZ); -void func_effect_80083FA8(Effect*); -void func_effect_80084194(Effect*); +void Effect_Effect399_Update(Effect*); +void Effect_Effect399_Draw(Effect*); // fox_fade void Wipe_Draw(WipeMode mode, s32 frame); @@ -385,7 +386,7 @@ void func_hud_80087530(f32, f32, s32); void func_hud_800884E4(void); void func_hud_80088564(void); void HUD_DrawStatusScreens(void); -s32 func_hud_8008AC54(s32); +s32 Hud_MissileSeekModeCheck(s32); void func_hud_8008AD94(void); void func_hud_8008B5B0(f32 x, f32 y); s32 func_hud_8008B774(void); @@ -419,8 +420,8 @@ void func_hud_800953A0(Actor*, s32); void func_hud_8009546C(Actor*, s32); void func_hud_80095538(Actor*, s32); void HUD_AquasComplete(Player*); -void func_hud_80094954(Effect*); -void func_hud_80094BBC(Effect*); +void Hud_Effect363_Update(Effect*); +void Hud_Effect363_Draw(Effect*); void func_hud_80094D20(f32, f32); void func_hud_80096A74(Player* player); @@ -465,12 +466,12 @@ void Player_UpdateArwingRoll(Player*); void Player_ArwingBoost(Player*); void Camera_UpdateArwingOnRails(Player*); void Camera_UpdateCockpitOnRails(Player*, s32); -void Camera_FollowPlayer(Player*, s32 , bool ); -void Camera_UpdateArwing360(Player*, s32); +void Camera_FollowPlayer(Player*, s32 , bool); +void Camera_UpdateArwing360(Player*, bool); void Camera_UpdateTank360(Player*, s32 ); void Camera_UpdateOnFoot360(Player*, s32 ); void Camera_SetStarfieldPos(f32, f32, f32, f32, f32, f32); -void Camera_Update360(Player*, s32); +void Camera_Update360(Player*, bool); void Camera_SetupLights(Player*); void Play_SpawnVsItem(ObjectId , Item*); void Play_Main(void); diff --git a/include/i1.h b/include/i1.h index ba1ce7fe..42dced9d 100644 --- a/include/i1.h +++ b/include/i1.h @@ -14,50 +14,50 @@ extern void Corneria_LevelStart(Player*); extern void Corneria_LevelComplete1(Player*); extern void Venom1_LevelStart(Player*); -void Corneria_801875A4(Sprite*); -void Corneria_80189058(Boss*); -void Corneria_8018AA74(Boss*); -void Corneria_8018AED0(Actor*); -void Corneria_8018B15C(Actor*); -void Corneria_8018B418(Actor*); -void Corneria_8018B58C(Actor*); -void Corneria_8018BAAC(Actor*); -void Corneria_8018BBA4(Actor*); -void Corneria_8018BBF8(Actor*); -void Corneria_8018BD7C(Actor*); -void Corneria_8018C19C(Boss*); -void Corneria_8018DDAC(Boss*); -void Corneria_8018E290(Boss*); -void Corneria_8018E76C(Boss*); -void Corneria_8018ECAC(Boss*); -void Corneria_8018ED78(Boss*); -void Corneria_8018EE84(Boss*); -void Corneria_8018EF90(Boss*); -void Corneria_8018F044(Scenery*); -void Corneria_8018F31C(Scenery*); +void Corneria_Smoke_Update(Sprite*); +void Corneria_Granga_Update(Granga*); +void Corneria_Granga_Draw(Granga*); +void Corneria_CoGaruda1_Update(CoGaruda1*); +void Corneria_CoGaruda2_Update(CoGaruda2*); +void Corneria_CoGaruda3_Update(CoGaruda3*); +void Corneria_CoGarudaDestroy_Update(CoGarudaDestroy*); +void Corneria_CoGaruda1_Draw(CoGaruda1*); +void Corneria_CoGaruda2_Draw(CoGaruda2*); +void Corneria_CoGaruda3_Draw(CoGaruda3*); +void Corneria_CoGarudaDestroy_Draw(CoGarudaDestroy*); +void Corneria_Carrier_Update(Carrier*); +void Corneria_Boss294_Update(Boss294*); +void Corneria_Boss295_Update(Boss295*); +void Corneria_Boss296_Update(Boss296*); +void Corneria_Carrier_Draw(Carrier*); +void Corneria_Boss294_Draw(Boss294*); +void Corneria_Boss295_Draw(Boss295*); +void Corneria_Boss296_Draw(Boss296*); +void Corneria_Doors_Update(Scenery*); +void Corneria_Doors_Draw(Scenery*); void Venom1_BossTrigger1_Update(Sprite*); void Venom1_BossTrigger2_Update(Sprite*); void Venom1_BossTrigger3_Update(Sprite*); void Venom1_BossTrigger4_Update(Sprite*); -void Venom1_80192518(Actor*); -void Venom1_80192CD4(Actor*); -void Venom1_80192E2C(Actor*); -void Venom1_80192EB0(Actor*); -void Venom1_801933DC(Actor*); -void Venom1_801934D0(Actor*); -void Venom1_80193540(Scenery*); +void Venom1_Actor280_Update(Actor*); +void Venom1_Doodad_Update(Actor*); +void Venom1_Actor281_Draw(Actor*); +void Venom1_Actor283_Update(Actor*); +void Venom1_Actor284_Update(Actor*); +void Venom1_Actor284_Draw(Actor*); +void Venom1_Scenery52_Update(Scenery*); void Venom1_Boss_Update(Boss*); void Venom1_Boss_Draw(Boss*); void Training_ItemRing_Update(Item*); void OvlI1_CallFunction(s32, void*); -void Corneria_80187530(Scenery*); -void Corneria_8018753C(Scenery*); -void Corneria_Boss292_Init(Boss *); -void Corneria_8018B0B4(Actor *); -void Corneria_Boss293_Init(Boss *); -void Corneria_8018ED78(Boss*); -void Venom1_801924A8(Scenery* ); +void Corneria_BuildingOnFire_Update(Scenery*); +void Corneria_BuildingOnFire_Draw(Scenery*); +void Corneria_Granga_Init(Boss *); +void Corneria_IBeam_Init(Actor *); +void Corneria_Carrier_Init(Carrier *); +void Corneria_Boss294_Draw(Boss*); +void Venom1_Scenery127_Update(Scenery* ); void Venom1_8019250C(Actor *); void Venom1_80192CB0(Actor *); void Venom1_80192EA4(Actor *); @@ -65,9 +65,9 @@ void Venom1_801933B4(Actor *); void Venom1_Boss319_Init(Boss *); void Venom1_80198310(Boss *); void Venom1_80198594(Boss *); -void Training_801988E0(void); +void Training_RingPassCount_Draw(void); void Training_Setup360(void); -void Training_8019949C(void); +void Training_SpawnEnemies(void); void Venom1_8019864C(PlayerShot*); #endif diff --git a/include/i2.h b/include/i2.h index 326cfe64..92d7b465 100644 --- a/include/i2.h +++ b/include/i2.h @@ -18,31 +18,31 @@ void Meteo_80187B08(Actor *); void Meteo_Boss297_Init(Boss *); void Meteo_8018CCF8(Actor *); -void Meteo_8018756C(Actor*); -void Meteo_80187650(Actor*); -void Meteo_801877C4(Actor*); -void Meteo_8018795C(Actor*); -void Meteo_80188344(Boss*); -void Meteo_801887D0(Boss*); -void Meteo_80188CAC(Effect*); -void Meteo_80188FAC(Effect*); -void Meteo_80189114(Effect*); -void Meteo_8018978C(Boss*); -void Meteo_8018BACC(Boss*); -void Meteo_8018D9EC(Actor*); -void Meteo_8018DA6C(Actor*); -void Meteo_8018DAEC(Actor*); -void Meteo_8018DB6C(Actor*); -void Meteo_8018DBEC(Effect*); -void Meteo_8018DCE4(Effect*); -void Meteo_8018DE14(Effect*); -void SectorX_8018F330(Actor*); -void SectorX_8018F884(Actor*); -void SectorX_8018FE38(Boss*); -void SectorX_8018FF20(Boss*); -void SectorX_8018FF84(Boss*); -void SectorX_80190020(Boss*); -void SectorX_80190078(Boss*); -void SectorX_80193434(Boss*); +void Meteo_Actor181_Update(Actor*); +void Meteo_Actor182_Update(Actor*); +void Meteo_Actor187_Update(Actor*); +void Meteo_Actor186_Update(Actor*); +void Meteo_Boss298_Update(Boss*); +void Meteo_Boss298_Draw(Boss*); +void Meteo_Effect369_Update(Effect*); +void Meteo_Effect370_Update(Effect*); +void Meteo_Effect371_Update(Effect*); +void Meteo_Boss297_Update(Boss*); +void Meteo_Boss297_Draw(Boss*); +void Meteo_ActorDoodad_Update(Actor*); +void Meteo_Actor183_Draw(Actor*); +void Meteo_Actor184_Draw(Actor*); +void Meteo_Actor185_Draw(Actor*); +void Meteo_Effect370_Draw(Effect*); +void Meteo_Effect369_Draw(Effect*); +void Meteo_Effect371_Draw(Effect*); +void SectorX_Slippy_Update(Actor*); +void SectorX_Slippy_Draw(Actor*); +void SectorX_Boss304_Update(Boss*); +void SectorX_Boss305_Update(Boss*); +void SectorX_Boss304_Draw(Boss*); +void SectorX_Boss305_Draw(Boss*); +void SectorX_Boss_Update(Boss*); +void SectorX_Boss_Draw(Boss*); #endif diff --git a/include/i3.h b/include/i3.h index f9ece938..5d70bdc9 100644 --- a/include/i3.h +++ b/include/i3.h @@ -13,7 +13,6 @@ void Aquas_801BE034(Actor*); void Area6_8018DA58(Actor*); void Zoness_8019E5F0(Actor*); -void Solar_801A8BE8(Actor*); void Aquas_BlueMarineDown(Player*); void Aquas_801BE0F0(Actor*); @@ -25,67 +24,67 @@ void Area6_LevelStart(Player *player); void Area6_LevelComplete(Player*); void Zoness_SpawnDebris(Vec3f*, Vec3f*, f32, f32, f32, s32, f32, s32, s32); -void Zoness_80190430(Actor* actor); -void Zoness_801904CC(Actor* actor); -void Zoness_80190A00(Actor* actor); -void Zoness_80190F08(Actor* actor); -void Zoness_80191010(Actor* actor); -void Zoness_801914C4(Actor* actor); -void Zoness_801915A4(Actor* actor); -void Zoness_80191680(Actor* actor); -void Zoness_80191B4C(Actor* actor); +void Zoness_Actor235_Draw(Actor235* this); +void Zoness_Actor235_Update(Actor235* this); +void Zoness_Actor236_Update(Actor* this); +void Zoness_Actor236_Draw(Actor* this); +void Zoness_Actor238_Update(Actor* this); +void Zoness_Actor238_Draw(Actor* this); +void Zoness_801915A4(Actor* this); +void Zoness_Actor240_Update(Actor* this); +void Zoness_Actor240_Draw(Actor* this); void Zoness_80191BB8(Actor* actor); -void Zoness_80191BC4(Actor* actor); -void Zoness_80191DB0(Actor* actor); -void Zoness_80191DB0(Actor* actor); -void Zoness_80191FFC(Actor* actor); -void Zoness_80192094(Actor* actor); -void Zoness_80192834(Actor* actor); -void Zoness_80192C18(Actor* actor); -void Zoness_80192E64(Actor* actor); -void Zoness_80193240(Actor* actor); +void Zoness_Actor241_Update(Actor* this); +void Zoness_Actor241_Draw(Actor* this); +void Zoness_Actor241_Draw(Actor* this); +void Zoness_Actor242_Draw(Actor* this); +void Zoness_Actor242_Update(Actor* this); +void Zoness_Actor243_Update(Actor* this); +void Zoness_Actor243_Draw(Actor* this); +void Zoness_Actor244_Update(Actor* this); +void Zoness_Actor244_Draw(Actor* actor); void Zoness_BossZo_Init(Boss* this); -void Zoness_Boss_Draw(Boss* bossZO); -void Zoness_Boss_Update(Boss* bossZO); -void Zoness_8019969C(Actor* actor); -void Zoness_8019983C(Actor* actor); -void Zoness_80199A28(Actor* actor); -void Zoness_80199E24(Actor* actor); -void Zoness_80199F10(Actor* actor); -void Zoness_8019A1FC(Actor* actor); -void Zoness_8019A5D4(Actor* actor); -void Zoness_8019ACCC(Actor* actor); +void Zoness_Boss_Draw(Boss* this); +void Zoness_Boss_Update(Boss* this); +void Zoness_Actor245_Update(Actor245* this); +void Zoness_Actor245_Draw(Actor* actor); +void Zoness_Actor246_Update(Actor* this); +void Zoness_Actor246_Draw(Actor246* actor); +void Zoness_Actor248_Update(Actor* this); +void Zoness_Actor248_Draw(Actor* this); +void Zoness_Actor249_Update(Actor* this); +void Zoness_Actor249_Draw(Actor* this); void Zoness_8019B1F0(Actor* actor); -void Zoness_8019B548(Actor* actor); -void Zoness_8019B7DC(Actor* actor); -void Zoness_8019B810(Actor* actor); -void Zoness_8019B854(Actor* actor); -void Zoness_8019BDE0(Actor* actor); -void Zoness_8019BE48(Actor* actor); -void Zoness_8019C1CC(Actor* actor); -void Zoness_8019C200(Actor* actor); -void Zoness_8019C454(Actor* actor); -void Zoness_8019C83C(Actor* actor); -void Zoness_8019CBEC(Actor* actor); -void Zoness_8019CE58(Actor* actor); +void Zoness_Actor250_Update(Actor* this); +void Zoness_Actor250_Draw(Actor* actor); +void Zoness_8019B810(Actor* this); +void Zoness_Actor251_Update(Actor* this); +void Zoness_Actor251_Draw(Actor* this); +void Zoness_Actor252_Update(Actor* this); +void Zoness_Actor252_Draw(Actor* actor); +void Zoness_8019C200(Actor* this); +void Zoness_Actor253_Update(Actor* this); +void Zoness_Actor253_Draw(Actor* this); +void Zoness_Actor254_Update(Actor* this); +void Zoness_Actor254_Draw(Actor* this); void Zoness_Actor247_Init(Actor* this); -void Zoness_8019D15C(Actor* actor); -void Zoness_8019D3C4(Actor* actor); +void Zoness_Actor247_Update(Actor* this); +void Zoness_Actor247_Draw(Actor* this); void Zoness_LevelStart(Player* player); void Zoness_LevelComplete(Player* player); void Solar_8019E8B8(f32, f32, f32, f32); void Solar_8019E9F4(f32, f32, f32, f32, f32, f32, f32, s32); -void Solar_8019EA7C(Actor*); -void Solar_8019F20C(Actor*); -void Solar_8019F7AC(Actor*); -void Solar_801A003C(Actor*); -void Solar_801A0120(Effect*); -void Solar_801A0AF0(Effect*); +void Solar_Actor278_Update(Actor278*); +void Solar_Doodad_Update(Actor*); +void Solar_Doodad_Draw(Actor*); +void Solar_Actor279_Update(Actor279*); +void Solar_Effect392_Update(Effect392*); +void Solar_Effect392_Draw(Effect392*); void Solar_LevelStart(Player* player); -void Solar_Boss_Update(Boss*); -void Solar_Boss_Draw(Boss*); -void Solar_801A8BE8(Actor*); +void Solar_Boss_Update(BossSO*); +void Solar_Boss_Draw(BossSO*); +void Solar_801A8BE8(ActorCutscene*); void Solar_LevelComplete(Player* player); void Aquas_801A9824(void); @@ -95,59 +94,59 @@ void Aquas_BlueMarineMove(Player*); void Aquas_801ABA40(PlayerShot*); void Aquas_BlueMarineShoot(Player*); void Aquas_801AC8A8(f32, f32, f32, f32, s32); -void Aquas_801AC918(Effect*); +void Aquas_Effect366_Update(Effect*); void Aquas_801ACBB4(Player*); void Aquas_BlueMarineBoost(Player*); void Aquas_BlueMarineBrake(Player*); void Aquas_801AD688(Actor *); -void Aquas_801AD6C0(Actor*); -void Aquas_801AE168(Actor*); +void Aquas_Actor255_Update(Actor*); +void Aquas_Actor255_Draw(Actor*); void Aquas_801AE3AC(Actor *); -void Aquas_801AE3D8(Actor*); -void Aquas_801AEB44(Actor*); +void Aquas_Actor256_Update(Actor*); +void Aquas_Actor256_Draw(Actor*); void Aquas_801AF9FC(Actor *); -void Aquas_801AFA5C(Actor*); -void Aquas_801B099C(Actor*); -void Aquas_801B0B60(Actor*); -void Aquas_801B0EC0(Actor*); +void Aquas_Actor257_Update(Actor*); +void Aquas_Actor257_Draw(Actor*); +void Aquas_Actor258_Update(Actor*); +void Aquas_Actor258_Draw(Actor*); void Aquas_BossAq_Init(Boss*); void Aquas_Boss_Update(Boss*); void Aquas_Boss_Draw(Boss*); -void Aquas_801B504C(Actor*); -void Aquas_801B50E8(Actor*); -void Aquas_801B619C(Actor*); +void Aquas_Actor261_Draw(Actor*); +void Aquas_Actor261_Update(Actor*); +void Aquas_Actor259_Draw(Actor*); void Aquas_801B6344(Actor *); -void Aquas_801B638C(Actor*); +void Aquas_Actor259_Update(Actor*); void Aquas_801B6E54(Actor *); -void Aquas_801B6FF8(Actor*); -void Aquas_801B7A24(Actor*); +void Aquas_Actor262_Update(Actor*); +void Aquas_Actor262_Draw(Actor*); void Aquas_801B7AF0(Actor *); -void Aquas_801B7C78(Actor*); -void Aquas_801B90DC(Actor*); -void Aquas_801B91A4(Actor*); -void Aquas_801BA108(Actor*); -void Aquas_801BA26C(Actor*); -void Aquas_801BA4E4(Actor*); +void Aquas_Actor260_Update(Actor*); +void Aquas_Actor260_Draw(Actor*); +void Aquas_Actor263_Update(Actor*); +void Aquas_Actor263_Draw(Actor*); +void Aquas_Actor264_Update(Actor*); +void Aquas_Actor264_Draw(Actor*); void Aquas_801BA57C(Actor *); -void Aquas_801BA6A4(Actor*); -void Aquas_801BAD7C(Actor*); -void Aquas_801BADF8(Actor*); -void Aquas_801BB204(Actor*); +void Aquas_Actor265_Update(Actor*); +void Aquas_Actor265_Draw(Actor*); +void Aquas_Actor266_Update(Actor*); +void Aquas_Actor266_Draw(Actor*); void Aquas_801BB26C(Actor *); -void Aquas_801BB79C(Actor*); -void Aquas_801BC930(Actor*); -void Aquas_801BC9A0(Actor*); -void Aquas_801BD264(Actor*); -void Aquas_801BD54C(Actor*); -void Aquas_801BDE6C(Actor*); +void Aquas_Actor267_Update(Actor*); +void Aquas_Actor267_Draw(Actor*); +void Aquas_Actor269_Update(Actor*); +void Aquas_Actor269_Draw(Actor*); +void Aquas_Actor268_Update(Actor*); +void Aquas_Actor268_Draw(Actor*); void Aquas_801BDF14(void); -void Aquas_801BE1FC(Scenery*); -void Aquas_801BE3F8(Actor*); -void Aquas_801BEB1C(Actor*); +void Aquas_Scenery126_Draw(Scenery*); +void Aquas_Actor270_Update(Actor*); +void Aquas_Actor270_Draw(Actor*); void Aquas_Boss301_Update(Boss*); void Aquas_Boss301_Draw(Boss*); -void Aquas_801BEC68(Actor*); -void Aquas_801BEC74(Actor*); +void Aquas_Actor188_Update(Actor*); +void Aquas_Actor188_Draw(Actor*); void Aquas_Update360(Player*); #endif diff --git a/include/i4.h b/include/i4.h index 3f8a3bfd..4769796e 100644 --- a/include/i4.h +++ b/include/i4.h @@ -17,37 +17,37 @@ void Katina_LevelComplete(Player*); void Katina_SFTeamFlyTowardsCamera(Actor*); void SectorZ_LevelStart(Player*); void SectorZ_LevelComplete(Player*); -void SectorZ_8019DD20(Actor*); +void SectorZ_LevelCompleteCsUpdate(Actor*); void OvlI4_CallFunction(u32, void*); void Fortuna_UpdateEvents(Actor*); -void Fortuna_8018BA2C(void); +void Fortuna_LoadLevelObjects(void); void Bolse_UpdateEventHandler(Actor*); void Bolse_80191ED8(void); void Bolse_DrawDynamicGround(void); void Katina_BossSetup(Boss *); void Katina_UpdateEvents(Actor*); void Katina_Init(void); -void SectorZ_80199900(Actor *, s32); +void SectorZ_MissileExplode(ActorAllRange* this, bool shotDown); void SectorZ_Missile_Update(Actor*); void SectorZ_UpdateEvents(Actor*); -void SectorZ_8019EA68(void); +void SectorZ_LoadLevelObjects(void); -void Fortuna_80188AD0(Actor*); -void Fortuna_80188FE4(Actor*); -void Bolse_80191054(Effect*); -void Bolse_80191180(Effect*); -void Bolse_801912FC(Boss*); -void Bolse_80191AFC(Boss*); +void Fortuna_Radar_Update(Actor*); +void Fortuna_Radar_Draw(Actor*); +void Bolse_Effect397_Update(Effect*); +void Bolse_Effect397_Draw(Effect*); +void Bolse_Boss311_Update(Boss*); +void Bolse_Boss311_Draw(Boss*); void Katina_LaserEnergyParticlesUpdate(Effect*); void Katina_LaserEnergyParticlesDraw(Effect*); void Katina_BaseUpdate(Boss*); void Katina_Base_Draw(Boss*); void Katina_BossUpdate(Boss*); void Katina_BossDraw(Boss*); -void SectorZ_8019E234(Actor*); -void SectorZ_8019E3A8(Actor*); -void SectorZ_Boss_Update(Boss*); -void SectorZ_Boss_Draw(Boss*); +void SectorZ_SpaceJunkUpdate(Actor*); +void SectorZ_SpaceJunkDraw(Actor*); +void SectorZ_GreatFoxUpdate(Boss*); +void SectorZ_GreatFoxDraw(Boss*); #endif diff --git a/include/i5.h b/include/i5.h index ae2b94d4..75a3374b 100644 --- a/include/i5.h +++ b/include/i5.h @@ -59,75 +59,75 @@ bool Macbeth_801A3C20(f32); bool Macbeth_801A3300(Player*, f32, f32); bool Macbeth_801A3790(Player*, f32, f32); -void Titania_80188F60(Effect*); -void Titania_80188FA8(Effect*); -void Titania_80189194(Actor*); -void Titania_801895B8(Actor*); -void Titania_80189AFC(Actor*); -void Titania_80189CC8(Actor*); -void Titania_8018A1C0(Actor*); -void Titania_8018A544(Actor*); -void Titania_8018AABC(Actor*); -void Titania_8018AB44(Actor*); -void Titania_8018B268(Actor*); -void Titania_8018B6AC(Actor*); -void Titania_8018B9D0(Actor*); -void Titania_8018BE84(Actor*); -void Titania_8018C8A8(Actor*); -void Titania_8018E2D8(Actor*); -void Titania_8018E54C(Actor*); -void Titania_8018E5B4(Actor*); -void Titania_8018E5F8(Actor*); -void Titania_8018EF14(Actor*); +void Titania_Effect368_Update(Effect*); +void Titania_Effect368_Draw(Effect*); +void Titania_Actor224_Update(Actor*); +void Titania_Actor226_Update(Actor*); +void Titania_Actor226_Draw(Actor*); +void Titania_Actor233_Update(Actor*); +void Titania_Actor233_Draw(Actor*); +void Titania_Actor230_Update(Actor*); +void Titania_Actor230_Draw(Actor*); +void Titania_Actor225_Update(Actor*); +void Titania_Actor232_Update(Actor*); +void Titania_Actor232_Draw(Actor*); +void Titania_Actor231_Update(Actor*); +void Titania_Actor231_Draw(Actor*); +void Titania_Actor229_Update(Actor*); +void Titania_Actor229_Draw(Actor*); +void Titania_Actor227_Update(Actor*); +void Titania_Actor227_Draw(Actor*); +void Titania_Actor228_Update(Actor*); +void Titania_Actor228_Draw(Actor*); void Titania_Cactus_Update(Sprite*); -void Titania_8018F4D8(Scenery*); -void Titania_8018F8B8(Scenery*); +void Titania_Scenery57_Update(Scenery*); +void Titania_Scenery57_Draw(Scenery*); void Titania_Boss_Update(Boss*); void Titania_Boss_Draw(Boss*); -void Macbeth_8019C778(Actor*); -void Macbeth_8019CE88(Actor*); -void Macbeth_8019D700(Actor*); -void Macbeth_8019E410(Actor*); -void Macbeth_8019EA60(Actor*); -void Macbeth_8019EE68(Actor*); -void Macbeth_8019FF9C(Actor*); -void Macbeth_801A0BD8(Scenery*); -void Macbeth_801A12C4(Actor*); -void Macbeth_801A23AC(Scenery*); -void Macbeth_801A2A78(Scenery*); -void Macbeth_801A2B24(Scenery*); -void Macbeth_801A2DD8(Scenery*); -void Macbeth_801A3240(Scenery*); -void Macbeth_801A3E98(Actor*); -void Macbeth_801A43BC(Actor*); -void Macbeth_801A46A0(Actor*); -void Macbeth_801A4A64(Actor*); -void Macbeth_801A4B24(Actor*); -void Macbeth_801A54E8(Actor*); -void Macbeth_801A57D0(Effect*); -void Macbeth_801A5AF0(Effect*); -void Macbeth_801A5B4C(Effect*); -void Macbeth_801A5D68(Effect*); -void Macbeth_801A5E54(Actor*); -void Macbeth_801A5F90(Actor*); -void Macbeth_801A5FD0(Actor*); -void Macbeth_801A6100(Actor*); -void Macbeth_801A6144(Actor*); -void Macbeth_801A6540(Actor*); -void Macbeth_801A6608(Scenery*); -void Macbeth_801A67C8(Actor*); -void Macbeth_801A68EC(Actor*); -void Macbeth_801A7E7C(Actor*); -void Macbeth_801AC294(Actor*); -void Macbeth_801AC438(Actor*); -void Macbeth_801AD6F0(Actor*); -void Macbeth_801ADAC8(Actor*); -void Macbeth_801ADD68(Actor*); -void Macbeth_801AE2C0(Actor*); -void Macbeth_801AE87C(Effect*); -void Macbeth_801AEAA0(Effect*); -void Macbeth_801AEC04(Actor*); -void Macbeth_801AEEFC(Actor*); +void Macbeth_Actor205_Update(Actor*); +void Macbeth_Actor210_Update(Actor*); +void Macbeth_Actor209_Update(Actor*); +void Macbeth_Actor211_Update(Actor*); +void Macbeth_Actor208_Update(Actor*); +void Macbeth_Actor213_Update(Actor*); +void Macbeth_Actor212_Update(Actor*); +void Macbeth_Scenery104_Update(Scenery*); +void Macbeth_ActorDoodad_Draw(Actor*); +void Macbeth_SceneryDoodad_Draw(Scenery*); +void Macbeth_Scenery61_Draw(Scenery*); +void Macbeth_SceneryDoodad2_Draw(Scenery*); +void Macbeth_Scenery83_Update(Scenery*); +void Macbeth_Scenery83_Draw(Scenery*); +void Macbeth_Actor214_Update(Actor*); +void Macbeth_Actor214_Draw(Actor*); +void Macbeth_Actor215_Update(Actor*); +void Macbeth_Actor215_Draw(Actor*); +void Macbeth_Actor223_Update(Actor*); +void Macbeth_Actor223_Draw(Actor*); +void Macbeth_Effect378_Update(Effect*); +void Macbeth_Effect378_Draw(Effect*); +void Macbeth_Effect380_Update(Effect*); +void Macbeth_Effect380_Draw(Effect*); +void Macbeth_Actor216_Update(Actor*); +void Macbeth_Actor216_Draw(Actor*); +void Macbeth_Actor217_Update(Actor*); +void Macbeth_Actor217_Draw(Actor*); +void Macbeth_Actor218_Update(Actor*); +void Macbeth_Actor218_Draw(Actor*); +void Macbeth_Scenery65_Draw(Scenery*); +void Macbeth_Actor219_Update(Actor*); +void Macbeth_Actor219_Draw(Actor*); +void Macbeth_Actor207_Update(Actor*); +void Macbeth_Actor207_Draw(Actor*); +void Macbeth_Actor206_Update(Actor*); +void Macbeth_Actor220_Update(Actor*); +void Macbeth_Actor220_Draw(Actor*); +void Macbeth_Actor221_Update(Actor*); +void Macbeth_Actor221_Draw(Actor*); +void Macbeth_Effect379_Update(Effect*); +void Macbeth_Effect379_Draw(Effect*); +void Macbeth_Actor222_Update(Actor*); +void Macbeth_Actor222_Draw(Actor*); s32 Macbeth_801A55D4(s32 , Vec3f* , Vec3f* , s32 ); #endif diff --git a/include/i6.h b/include/i6.h index 844e4fb5..f02600e9 100644 --- a/include/i6.h +++ b/include/i6.h @@ -32,7 +32,7 @@ void Andross_8018C390(Player*); void Andross_Boss320_Init(Boss *); void Andross_801961AC(void); void Venom2_UpdateEvents(Actor*); -void Venom2_80196968(void); +void Venom2_LoadLevelObjects(void); void SectorY_Boss314_Init(Boss *); void SectorY_Actor204_Update(Actor*); void SectorY_Actor204_Draw(Actor*); @@ -40,33 +40,33 @@ void Turret_Update(Player*); void Turret_UpdateCamera(Player*); void Turret_Draw(Player *); -void Andross_801880E4(Actor*); -void Andross_80188448(Actor*); -void Andross_80188528(Actor*); -void Andross_80188660(Actor*); -void Andross_8018933C(Actor*); -void Andross_801893B8(Actor*); -void Andross_80189470(Actor*); -void Andross_80189724(Actor*); -void Andross_80189B70(Boss*); -void Andross_8018B8C0(Boss*); -void Andross_8018CAD4(Effect*); -void Andross_8018CF98(Effect*); -void Andross_8018DBF0(Boss*); -void Andross_801928C8(Boss*); -void Andross_80192E94(Actor*); -void Andross_80193244(Actor*); -void Andross_80193380(Scenery*); -void Andross_8019350C(Scenery*); -void Andross_8019356C(Scenery*); -void Andross_801935D4(Scenery*); +void Andross_Actor199_Update(Actor*); +void Andross_Actor199_Draw(Actor*); +void Andross_Actor286_Update(Actor*); +void Andross_Actor286_Draw(Actor*); +void Andross_Actor290_Update(Actor*); +void Andross_Actor288_Update(Actor*); +void Andross_Actor289_Update(Actor*); +void Andross_Actor287_Update(Actor*); +void Andross_Boss321_Update(Boss*); +void Andross_Boss321_Draw(Boss*); +void Andross_Effect396_Update(Effect*); +void Andross_Effect396_Draw(Effect*); +void Andross_Boss320_Update(Boss*); +void Andross_Boss320_Draw(Boss*); +void Andross_Actor285_Update(Actor*); +void Andross_Actor285_Draw(Actor*); +void Andross_Scenery132_Update(Scenery*); +void Andross_Scenery132_Draw(Scenery*); +void Andross_Scenery131_Update(Scenery*); +void Andross_Scenery131_Draw(Scenery*); void Venom2_Boss_Update(Boss*); void Venom2_Boss_Draw(Boss*); -void SectorY_80197C64(Effect*); -void SectorY_80197CB8(Scenery*); +void SectorY_Effect354_Draw(Effect*); +void SectorY_Scenery156_Draw(Scenery*); void SectorY_Boss_Update(Boss*); void SectorY_Boss_Draw(Boss*); -void SectorY_801A4E44(Scenery*); -void SectorY_801A52B8(Scenery*); +void SectorY_Scenery109_Update(Scenery*); +void SectorY_Scenery112_Update(Scenery*); #endif diff --git a/include/macros.h b/include/macros.h index 6d7a15e6..f92ceb4f 100644 --- a/include/macros.h +++ b/include/macros.h @@ -7,6 +7,8 @@ #define SCREEN_HEIGHT 240 #define SCREEN_MARGIN 8 +#define TIME_IN_SECONDS(x) (x * 30); + #define RAND_FLOAT(max) (Rand_ZeroOne()*(max)) #define RAND_INT(max) ((s32)(Rand_ZeroOne()*(max))) #define RAND_FLOAT_CENTERED(width) ((Rand_ZeroOne()-0.5f)*(width)) diff --git a/include/sf64object.h b/include/sf64object.h index 1fae1be1..3fe7dc3b 100644 --- a/include/sf64object.h +++ b/include/sf64object.h @@ -20,8 +20,8 @@ typedef struct { } Hitbox; // size = 0x18 typedef struct { - /* 0x00 */ Triangle tri; - /* 0x08 */ PlaneI plane; + /* 0x00 */ Triangle tri; + /* 0x08 */ PlaneI plane; } CollisionPoly; // size = 0x14 typedef struct { @@ -33,11 +33,11 @@ typedef struct { } CollisionHeader; // size = 0x24 typedef struct { - /* 0x00 */ Vec3f min; - /* 0x0C */ Vec3f max; - /* 0x18 */ s32 polyCount; - /* 0x1C */ Triangle* polys; - /* 0x20 */ Vec3f* mesh; + /* 0x00 */ Vec3f min; + /* 0x0C */ Vec3f max; + /* 0x18 */ s32 polyCount; + /* 0x1C */ Triangle* polys; + /* 0x20 */ Vec3f* mesh; } CollisionHeader2; // size = 0x24 typedef enum { @@ -49,21 +49,21 @@ typedef enum { /* 5 */ COL1_5, // OBJ_SCENERY_149 /* 6 */ COL1_6, // OBJ_SCENERY_150 /* 7 */ COL1_7, // OBJ_BOSS_309 - /* 8 */ COL1_8, // OBJ_BOSS_SZ + /* 8 */ COL1_8, // OBJ_BOSS_SZ_GREAT_FOX /* 9 */ COL1_9, // OBJ_BOSS_VE2 } CollisonId_1; typedef enum { - /* 0 */ COL2_0, // default - /* 1 */ COL2_1, // OBJ_SCENERY_4, OBJ_SCENERY_5 - /* 2 */ COL2_2, // OBJ_SCENERY_2 - /* 3 */ COL2_3, // OBJ_SCENERY_3, OBJ_SCENERY_69 - /* 4 */ COL2_4, // OBJ_SCENERY_140 - /* 5 */ COL2_5, // PLAYERSHOT_7 ? - /* 6 */ COL2_6, // OBJ_SCENERY_141 - /* 7 */ COL2_7, // OBJ_SCENERY_47 - /* 8 */ COL2_8, // OBJ_SCENERY_70 - /* 9 */ COL2_9, // OBJ_SCENERY_72 + /* 0 */ COL2_0, // default + /* 1 */ COL2_1, // OBJ_SCENERY_CO_BUMP_4, OBJ_SCENERY_CO_BUMP_5 + /* 2 */ COL2_2, // OBJ_SCENERY_CO_BUMP_2 + /* 3 */ COL2_3, // OBJ_SCENERY_CO_BUMP_3, OBJ_SCENERY_69 + /* 4 */ COL2_4, // OBJ_SCENERY_140 + /* 5 */ COL2_5, // PLAYERSHOT_7 ? + /* 6 */ COL2_6, // OBJ_SCENERY_141 + /* 7 */ COL2_7, // OBJ_SCENERY_47 + /* 8 */ COL2_8, // OBJ_SCENERY_70 + /* 9 */ COL2_9, // OBJ_SCENERY_72 /* 10 */ COL2_10, // OBJ_SCENERY_71 /* 11 */ COL2_11, // OBJ_SCENERY_73 /* 12 */ COL2_12, // OBJ_SCENERY_67 @@ -123,7 +123,7 @@ typedef enum ObjectStatus { /* 3 */ OBJ_DYING, } ObjectStatus; -typedef struct { +typedef struct Object { /* 0x00 */ u8 status; /* 0x02 */ u16 id; /* 0x04 */ Vec3f pos; @@ -132,7 +132,7 @@ typedef struct { typedef void (*ObjectFunc)(Object*); -typedef struct { +typedef struct ObjectInfo { /* 0x00 */ union { ObjectFunc draw; Gfx* dList; @@ -140,16 +140,16 @@ typedef struct { /* 0x00 */ u8 drawType; /* 0x08 */ ObjectFunc action; // argument must have object type. /* 0x0C */ f32* hitbox; - /* 0x10 */ f32 cullDistance; // z coordinate of something - /* 0x14 */ s16 unk_14; // can be -1, 0, 1. governs camera-related behavior in effects (billboarding?) - /* 0x16 */ s16 unk_16; // can be 0, 1, 2. affects death behavior? + /* 0x10 */ f32 cullDistance; // z coordinate of something + /* 0x14 */ s16 unk_14; // can be -1, 0, 1. governs camera-related behavior in effects (billboarding?) + /* 0x16 */ s16 unk_16; // can be 0, 1, 2. affects death behavior? /* 0x18 */ u8 damage; - /* 0x19 */ u8 unk_19; // can be 0, 1, 2. Also camera-related? - /* 0x1C */ f32 targetOffset; // target lock y offset. 0.0f can't be targeted - /* 0x20 */ u8 bonus; // hits when killed. numbers above 1 indicate the hit+ bonus -} ObjectInfo; // size = 0x24 + /* 0x19 */ u8 unk_19; // can be 0, 1, 2. Also camera-related? + /* 0x1C */ f32 targetOffset; // target lock y offset. 0.0f can't be targeted + /* 0x20 */ u8 bonus; // hits when killed. numbers above 1 indicate the hit+ bonus +} ObjectInfo; // size = 0x24 -typedef struct { +typedef struct Scenery360 { /* 0x00 */ Object obj; /* 0x1C */ ObjectInfo info; /* 0x40 */ u8 pathIndex; @@ -158,7 +158,7 @@ typedef struct { /* 0x54 */ f32 unk_54; } Scenery360; // size = 0x58 -typedef struct { +typedef struct Scenery { /* 0x00 */ Object obj; /* 0x1C */ ObjectInfo info; /* 0x40 */ s32 index; @@ -173,7 +173,7 @@ typedef struct { /* 0x7C */ char pad7C[4]; } Scenery; // size = 0x80 -typedef struct { +typedef struct Sprite { /* 0x00 */ Object obj; /* 0x1C */ ObjectInfo info; /* 0x40 */ s32 index; @@ -183,7 +183,7 @@ typedef struct { /* 0x48 */ s32 toLeft; } Sprite; // size = 0x4C -typedef struct { +typedef struct Item { /* 0x00 */ Object obj; /* 0x1C */ ObjectInfo info; /* 0x40 */ s32 index; @@ -200,7 +200,7 @@ typedef struct { /* 0x68 */ f32 width; } Item; // size 0x6C -typedef struct { +typedef struct Effect { /* 0x00 */ Object obj; /* 0x1C */ ObjectInfo info; /* 0x40 */ s32 index; @@ -223,14 +223,14 @@ typedef struct { /* 0x80 */ f32 sfxSource[3]; } Effect; // size 0x8C -typedef struct { +typedef struct Boss { /* 0x000 */ Object obj; /* 0x01C */ ObjectInfo info; /* 0x040 */ s32 index; /* 0x044 */ s16 unk_044; - /* 0x046 */ s16 unk_046; - /* 0x048 */ s16 unk_048; - /* 0x04A */ s16 unk_04A; + /* 0x046 */ s16 unk_046; + /* 0x048 */ s16 unk_048; + /* 0x04A */ s16 unk_04A; /* 0x04C */ s16 unk_04C; /* 0x04E */ s16 state; /* 0x050 */ s16 timer_050; @@ -248,7 +248,7 @@ typedef struct { /* 0x068 */ f32 yOffset; /* 0x06C */ Vec3f vel; /* 0x078 */ Vec3f rot_078; - /* 0x084 */ f32 gravity; + /* 0x084 */ f32 gravity; /* 0x088 */ s16 swork[40]; /* 0x0D8 */ f32 fwork[50]; /* 0x1A0 */ Vec3f vwork[50]; @@ -261,11 +261,9 @@ typedef struct { #define DMG_BEAM 1 #define DMG_NONE 0 #define DMG_BOMB -1 -#define DMG_UNK_100 100 +#define DMG_MISSILE 100 - - -typedef struct { +typedef struct Actor { /* 0x000 */ Object obj; /* 0x01C */ ObjectInfo info; /* 0x040 */ s32 index; @@ -295,7 +293,7 @@ typedef struct { /* 0x0D4 */ s16 dmgSource; /* 0x0D6 */ u16 damage; /* 0x0D8 */ Vec3f hitPos; - /* 0x0E4 */ s16 aiType; // Actor index for AllRange, script index for Event + /* 0x0E4 */ s16 aiType; // Actor index for AllRange, script index for Event /* 0x0E6 */ s16 aiIndex; // Target index for AllRange, program counter for Event /* 0x0E8 */ Vec3f vel; /* 0x0F4 */ Vec3f rot_0F4; @@ -307,430 +305,430 @@ typedef struct { } Actor; // size = 0x2F4 typedef enum ObjectId { - /* -1 */ OBJ_INVALID=-1, - /* 0 */ OBJ_SCENERY_0, - /* 1 */ OBJ_SCENERY_1, - /* 2 */ OBJ_SCENERY_2, - /* 3 */ OBJ_SCENERY_3, - /* 4 */ OBJ_SCENERY_4, - /* 5 */ OBJ_SCENERY_5, - /* 6 */ OBJ_SCENERY_6, - /* 7 */ OBJ_SCENERY_7, - /* 8 */ OBJ_SCENERY_8, - /* 9 */ OBJ_SCENERY_9, - /* 10 */ OBJ_SCENERY_10, - /* 11 */ OBJ_SCENERY_11, - /* 12 */ OBJ_SCENERY_12, - /* 13 */ OBJ_SCENERY_13, - /* 14 */ OBJ_SCENERY_14, - /* 15 */ OBJ_SCENERY_15, - /* 16 */ OBJ_SCENERY_16, - /* 17 */ OBJ_SCENERY_17, - /* 18 */ OBJ_SCENERY_18, - /* 19 */ OBJ_SCENERY_19, - /* 20 */ OBJ_SCENERY_20, - /* 21 */ OBJ_SCENERY_21, - /* 22 */ OBJ_SCENERY_22, - /* 23 */ OBJ_SCENERY_23, - /* 24 */ OBJ_SCENERY_24, - /* 25 */ OBJ_SCENERY_25, - /* 26 */ OBJ_SCENERY_26, - /* 27 */ OBJ_SCENERY_27, - /* 28 */ OBJ_SCENERY_28, - /* 29 */ OBJ_SCENERY_TI_SKULL, - /* 30 */ OBJ_SCENERY_TI_RIB_0, - /* 31 */ OBJ_SCENERY_TI_RIB_1, - /* 32 */ OBJ_SCENERY_TI_RIB_2, - /* 33 */ OBJ_SCENERY_TI_RIB_3, - /* 34 */ OBJ_SCENERY_TI_RIB_4, - /* 35 */ OBJ_SCENERY_TI_RIB_5, - /* 36 */ OBJ_SCENERY_TI_RIB_6, - /* 37 */ OBJ_SCENERY_TI_RIB_7, - /* 38 */ OBJ_SCENERY_TI_RIB_8, - /* 39 */ OBJ_SCENERY_ME_TUNNEL, - /* 40 */ OBJ_SCENERY_40, - /* 41 */ OBJ_SCENERY_41, - /* 42 */ OBJ_SCENERY_42, - /* 43 */ OBJ_SCENERY_43, - /* 44 */ OBJ_SCENERY_44, - /* 45 */ OBJ_SCENERY_45, - /* 46 */ OBJ_SCENERY_46, - /* 47 */ OBJ_SCENERY_47, - /* 48 */ OBJ_SCENERY_48, - /* 49 */ OBJ_SCENERY_49, - /* 50 */ OBJ_SCENERY_50, - /* 51 */ OBJ_SCENERY_51, - /* 52 */ OBJ_SCENERY_52, - /* 53 */ OBJ_SCENERY_53, - /* 54 */ OBJ_SCENERY_54, - /* 55 */ OBJ_SCENERY_55, - /* 56 */ OBJ_SCENERY_56, - /* 57 */ OBJ_SCENERY_57, - /* 58 */ OBJ_SCENERY_58, - /* 59 */ OBJ_SCENERY_59, - /* 60 */ OBJ_SCENERY_60, - /* 61 */ OBJ_SCENERY_61, - /* 62 */ OBJ_SCENERY_62, - /* 63 */ OBJ_SCENERY_63, - /* 64 */ OBJ_SCENERY_64, - /* 65 */ OBJ_SCENERY_65, - /* 66 */ OBJ_SCENERY_66, - /* 67 */ OBJ_SCENERY_67, - /* 68 */ OBJ_SCENERY_68, - /* 69 */ OBJ_SCENERY_69, - /* 70 */ OBJ_SCENERY_70, - /* 71 */ OBJ_SCENERY_71, - /* 72 */ OBJ_SCENERY_72, - /* 73 */ OBJ_SCENERY_73, - /* 74 */ OBJ_SCENERY_74, - /* 75 */ OBJ_SCENERY_75, - /* 76 */ OBJ_SCENERY_76, - /* 77 */ OBJ_SCENERY_77, - /* 78 */ OBJ_SCENERY_78, - /* 79 */ OBJ_SCENERY_79, - /* 80 */ OBJ_SCENERY_80, - /* 81 */ OBJ_SCENERY_81, - /* 82 */ OBJ_SCENERY_82, - /* 83 */ OBJ_SCENERY_83, - /* 84 */ OBJ_SCENERY_84, - /* 85 */ OBJ_SCENERY_85, - /* 86 */ OBJ_SCENERY_86, - /* 87 */ OBJ_SCENERY_87, - /* 88 */ OBJ_SCENERY_88, - /* 89 */ OBJ_SCENERY_89, - /* 90 */ OBJ_SCENERY_90, - /* 91 */ OBJ_SCENERY_91, - /* 92 */ OBJ_SCENERY_92, - /* 93 */ OBJ_SCENERY_93, - /* 94 */ OBJ_SCENERY_94, - /* 95 */ OBJ_SCENERY_95, - /* 96 */ OBJ_SCENERY_96, - /* 97 */ OBJ_SCENERY_97, - /* 98 */ OBJ_SCENERY_98, - /* 99 */ OBJ_SCENERY_99, - /* 100 */ OBJ_SCENERY_100, - /* 101 */ OBJ_SCENERY_101, - /* 102 */ OBJ_SCENERY_102, - /* 103 */ OBJ_SCENERY_103, - /* 104 */ OBJ_SCENERY_104, - /* 105 */ OBJ_SCENERY_105, - /* 106 */ OBJ_SCENERY_106, - /* 107 */ OBJ_SCENERY_107, - /* 108 */ OBJ_SCENERY_108, - /* 109 */ OBJ_SCENERY_109, - /* 110 */ OBJ_SCENERY_110, - /* 111 */ OBJ_SCENERY_111, - /* 112 */ OBJ_SCENERY_112, - /* 113 */ OBJ_SCENERY_113, - /* 114 */ OBJ_SCENERY_114, - /* 115 */ OBJ_SCENERY_115, - /* 116 */ OBJ_SCENERY_116, - /* 117 */ OBJ_SCENERY_117, - /* 118 */ OBJ_SCENERY_118, - /* 119 */ OBJ_SCENERY_119, - /* 120 */ OBJ_SCENERY_120, - /* 121 */ OBJ_SCENERY_121, - /* 122 */ OBJ_SCENERY_122, - /* 123 */ OBJ_SCENERY_123, - /* 124 */ OBJ_SCENERY_124, - /* 125 */ OBJ_SCENERY_125, - /* 126 */ OBJ_SCENERY_126, - /* 127 */ OBJ_SCENERY_127, - /* 128 */ OBJ_SCENERY_128, - /* 129 */ OBJ_SCENERY_129, - /* 130 */ OBJ_SCENERY_130, - /* 131 */ OBJ_SCENERY_131, - /* 132 */ OBJ_SCENERY_132, - /* 133 */ OBJ_SCENERY_133, - /* 134 */ OBJ_SCENERY_134, - /* 135 */ OBJ_SCENERY_135, - /* 136 */ OBJ_SCENERY_136, - /* 137 */ OBJ_SCENERY_137, - /* 138 */ OBJ_SCENERY_138, - /* 139 */ OBJ_SCENERY_139, - /* 140 */ OBJ_SCENERY_140, - /* 141 */ OBJ_SCENERY_141, - /* 142 */ OBJ_SCENERY_142, - /* 143 */ OBJ_SCENERY_143, - /* 144 */ OBJ_SCENERY_144, - /* 145 */ OBJ_SCENERY_145, - /* 146 */ OBJ_SCENERY_146, - /* 147 */ OBJ_SCENERY_147, - /* 148 */ OBJ_SCENERY_148, - /* 149 */ OBJ_SCENERY_149, - /* 150 */ OBJ_SCENERY_150, - /* 151 */ OBJ_SCENERY_151, - /* 152 */ OBJ_SCENERY_152, - /* 153 */ OBJ_SCENERY_153, - /* 154 */ OBJ_SCENERY_154, - /* 155 */ OBJ_SCENERY_155, - /* 156 */ OBJ_SCENERY_156, - /* 157 */ OBJ_SCENERY_157, - /* 158 */ OBJ_SCENERY_158, - /* 159 */ OBJ_SCENERY_159, - /* 160 */ OBJ_SCENERY_160, - /* 161 */ OBJ_SPRITE_CO_POLE, - /* 162 */ OBJ_SPRITE_CO_TREE, - /* 163 */ OBJ_SPRITE_FO_POLE, - /* 164 */ OBJ_SPRITE_FOG_SHADOW, - /* 165 */ OBJ_SPRITE_CO_RUIN1, - /* 166 */ OBJ_SPRITE_CO_RUIN2, - /* 167 */ OBJ_SPRITE_167, - /* 168 */ OBJ_SPRITE_168, - /* 169 */ OBJ_SPRITE_TI_CACTUS, - /* 170 */ OBJ_SPRITE_CO_SMOKE, - /* 171 */ OBJ_SPRITE_VE1_BOSS_TRIGGER1, - /* 172 */ OBJ_SPRITE_VE1_BOSS_TRIGGER2, - /* 173 */ OBJ_SPRITE_VE1_BOSS_TRIGGER3, - /* 174 */ OBJ_SPRITE_VE1_BOSS_TRIGGER4, - /* 175 */ OBJ_SPRITE_GFOX_TARGET, - /* 176 */ OBJ_ACTOR_176, - /* 177 */ OBJ_ACTOR_177, - /* 178 */ OBJ_ACTOR_178, - /* 179 */ OBJ_ACTOR_179, - /* 180 */ OBJ_ACTOR_180, - /* 181 */ OBJ_ACTOR_181, - /* 182 */ OBJ_ACTOR_182, - /* 183 */ OBJ_ACTOR_183, - /* 184 */ OBJ_ACTOR_184, - /* 185 */ OBJ_ACTOR_185, - /* 186 */ OBJ_ACTOR_186, - /* 187 */ OBJ_ACTOR_187, - /* 188 */ OBJ_ACTOR_188, - /* 189 */ OBJ_ACTOR_DEBRIS, - /* 190 */ OBJ_ACTOR_190, - /* 191 */ OBJ_ACTOR_191, - /* 192 */ OBJ_ACTOR_192, - /* 193 */ OBJ_ACTOR_193, - /* 194 */ OBJ_ACTOR_194, - /* 195 */ OBJ_ACTOR_CUTSCENE, - /* 196 */ OBJ_ACTOR_196, - /* 197 */ OBJ_ACTOR_ALLRANGE, - /* 198 */ OBJ_ACTOR_TEAM_BOSS, - /* 199 */ OBJ_ACTOR_199, - /* 200 */ OBJ_ACTOR_EVENT, - /* 201 */ OBJ_ACTOR_201, - /* 202 */ OBJ_ACTOR_202, - /* 203 */ OBJ_ACTOR_SLIPPY_SX, - /* 204 */ OBJ_ACTOR_204, - /* 205 */ OBJ_ACTOR_205, - /* 206 */ OBJ_ACTOR_206, - /* 207 */ OBJ_ACTOR_207, - /* 208 */ OBJ_ACTOR_208, - /* 209 */ OBJ_ACTOR_209, - /* 210 */ OBJ_ACTOR_210, - /* 211 */ OBJ_ACTOR_211, - /* 212 */ OBJ_ACTOR_212, - /* 213 */ OBJ_ACTOR_213, - /* 214 */ OBJ_ACTOR_214, - /* 215 */ OBJ_ACTOR_215, - /* 216 */ OBJ_ACTOR_216, - /* 217 */ OBJ_ACTOR_217, - /* 218 */ OBJ_ACTOR_218, - /* 219 */ OBJ_ACTOR_219, - /* 220 */ OBJ_ACTOR_220, - /* 221 */ OBJ_ACTOR_221, - /* 222 */ OBJ_ACTOR_222, - /* 223 */ OBJ_ACTOR_223, - /* 224 */ OBJ_ACTOR_224, - /* 225 */ OBJ_ACTOR_225, - /* 226 */ OBJ_ACTOR_226, - /* 227 */ OBJ_ACTOR_227, - /* 228 */ OBJ_ACTOR_228, - /* 229 */ OBJ_ACTOR_229, - /* 230 */ OBJ_ACTOR_230, - /* 231 */ OBJ_ACTOR_231, - /* 232 */ OBJ_ACTOR_232, - /* 233 */ OBJ_ACTOR_233, - /* 234 */ OBJ_ACTOR_234, - /* 235 */ OBJ_ACTOR_235, - /* 236 */ OBJ_ACTOR_236, - /* 237 */ OBJ_ACTOR_237, - /* 238 */ OBJ_ACTOR_238, - /* 239 */ OBJ_ACTOR_239, - /* 240 */ OBJ_ACTOR_240, - /* 241 */ OBJ_ACTOR_241, - /* 242 */ OBJ_ACTOR_242, - /* 243 */ OBJ_ACTOR_243, - /* 244 */ OBJ_ACTOR_244, - /* 245 */ OBJ_ACTOR_245, - /* 246 */ OBJ_ACTOR_246, - /* 247 */ OBJ_ACTOR_247, - /* 248 */ OBJ_ACTOR_248, - /* 249 */ OBJ_ACTOR_249, - /* 250 */ OBJ_ACTOR_250, - /* 251 */ OBJ_ACTOR_251, - /* 252 */ OBJ_ACTOR_252, - /* 253 */ OBJ_ACTOR_253, - /* 254 */ OBJ_ACTOR_254, - /* 255 */ OBJ_ACTOR_255, - /* 256 */ OBJ_ACTOR_256, - /* 257 */ OBJ_ACTOR_257, - /* 258 */ OBJ_ACTOR_258, - /* 259 */ OBJ_ACTOR_259, - /* 260 */ OBJ_ACTOR_260, - /* 261 */ OBJ_ACTOR_261, - /* 262 */ OBJ_ACTOR_262, - /* 263 */ OBJ_ACTOR_263, - /* 264 */ OBJ_ACTOR_264, - /* 265 */ OBJ_ACTOR_265, - /* 266 */ OBJ_ACTOR_266, - /* 267 */ OBJ_ACTOR_267, - /* 268 */ OBJ_ACTOR_268, - /* 269 */ OBJ_ACTOR_269, - /* 270 */ OBJ_ACTOR_270, - /* 271 */ OBJ_ACTOR_271, - /* 272 */ OBJ_ACTOR_272, - /* 273 */ OBJ_ACTOR_273, - /* 274 */ OBJ_ACTOR_274, - /* 275 */ OBJ_ACTOR_275, - /* 276 */ OBJ_ACTOR_276, - /* 277 */ OBJ_ACTOR_277, - /* 278 */ OBJ_ACTOR_278, - /* 279 */ OBJ_ACTOR_279, - /* 280 */ OBJ_ACTOR_280, - /* 281 */ OBJ_ACTOR_281, - /* 282 */ OBJ_ACTOR_282, - /* 283 */ OBJ_ACTOR_283, - /* 284 */ OBJ_ACTOR_284, - /* 285 */ OBJ_ACTOR_285, - /* 286 */ OBJ_ACTOR_286, - /* 287 */ OBJ_ACTOR_287, - /* 288 */ OBJ_ACTOR_288, - /* 289 */ OBJ_ACTOR_289, - /* 290 */ OBJ_ACTOR_290, - /* 291 */ OBJ_ACTOR_SUPPLIES, - /* 292 */ OBJ_BOSS_292, - /* 293 */ OBJ_BOSS_293, - /* 294 */ OBJ_BOSS_294, - /* 295 */ OBJ_BOSS_295, - /* 296 */ OBJ_BOSS_296, - /* 297 */ OBJ_BOSS_297, - /* 298 */ OBJ_BOSS_298, - /* 299 */ OBJ_BOSS_299, - /* 300 */ OBJ_BOSS_300, - /* 301 */ OBJ_BOSS_301, - /* 302 */ OBJ_BOSS_A6, - /* 303 */ OBJ_BOSS_303, - /* 304 */ OBJ_BOSS_304, - /* 305 */ OBJ_BOSS_305, - /* 306 */ OBJ_BOSS_TI, - /* 307 */ OBJ_BOSS_ZO, - /* 308 */ OBJ_BOSS_FO, - /* 309 */ OBJ_BOSS_309, - /* 310 */ OBJ_BOSS_310, - /* 311 */ OBJ_BOSS_311, - /* 312 */ OBJ_BOSS_VE2, - /* 313 */ OBJ_BOSS_SZ, - /* 314 */ OBJ_BOSS_SY, - /* 315 */ OBJ_BOSS_SO, - /* 316 */ OBJ_BOSS_KA, - /* 317 */ OBJ_BOSS_KA_BASE, - /* 318 */ OBJ_BOSS_AQ, - /* 319 */ OBJ_BOSS_VE1, - /* 320 */ OBJ_BOSS_320, - /* 321 */ OBJ_BOSS_321, - /* 322 */ OBJ_ITEM_LASERS, - /* 323 */ OBJ_ITEM_CHECKPOINT, - /* 324 */ OBJ_ITEM_SILVER_RING, - /* 325 */ OBJ_ITEM_SILVER_STAR, - /* 326 */ OBJ_ITEM_METEO_WARP, - /* 327 */ OBJ_ITEM_BOMB, - /* 328 */ OBJ_ITEM_PATH_SPLIT_X, - /* 329 */ OBJ_ITEM_PATH_TURN_LEFT, - /* 330 */ OBJ_ITEM_PATH_TURN_RIGHT, - /* 331 */ OBJ_ITEM_PATH_SPLIT_Y, - /* 332 */ OBJ_ITEM_PATH_TURN_UP, - /* 333 */ OBJ_ITEM_PATH_TURN_DOWN, - /* 334 */ OBJ_ITEM_RING_CHECK, - /* 335 */ OBJ_ITEM_1UP, - /* 336 */ OBJ_ITEM_GOLD_RING, - /* 337 */ OBJ_ITEM_WING_REPAIR, - /* 338 */ OBJ_ITEM_TRAINING_RING, - /* 339 */ OBJ_EFFECT_FIRE_SMOKE, - /* 340 */ OBJ_EFFECT_340, - /* 341 */ OBJ_EFFECT_341, - /* 342 */ OBJ_EFFECT_342, - /* 343 */ OBJ_EFFECT_343, - /* 344 */ OBJ_EFFECT_344, - /* 345 */ OBJ_EFFECT_345, - /* 346 */ OBJ_EFFECT_346, - /* 347 */ OBJ_EFFECT_347, - /* 348 */ OBJ_EFFECT_348, - /* 349 */ OBJ_EFFECT_349, - /* 350 */ OBJ_EFFECT_350, - /* 351 */ OBJ_EFFECT_351, - /* 352 */ OBJ_EFFECT_352, - /* 353 */ OBJ_EFFECT_353, - /* 354 */ OBJ_EFFECT_354, - /* 355 */ OBJ_EFFECT_355, - /* 356 */ OBJ_EFFECT_356, - /* 357 */ OBJ_EFFECT_357, - /* 358 */ OBJ_EFFECT_358, - /* 359 */ OBJ_EFFECT_359, - /* 360 */ OBJ_EFFECT_360, - /* 361 */ OBJ_EFFECT_361, - /* 362 */ OBJ_EFFECT_362, - /* 363 */ OBJ_EFFECT_363, - /* 364 */ OBJ_EFFECT_364, - /* 365 */ OBJ_EFFECT_365, - /* 366 */ OBJ_EFFECT_366, - /* 367 */ OBJ_EFFECT_367, - /* 368 */ OBJ_EFFECT_368, - /* 369 */ OBJ_EFFECT_369, - /* 370 */ OBJ_EFFECT_370, - /* 371 */ OBJ_EFFECT_371, - /* 372 */ OBJ_EFFECT_372, - /* 373 */ OBJ_EFFECT_373, - /* 374 */ OBJ_EFFECT_374, - /* 375 */ OBJ_EFFECT_375, - /* 376 */ OBJ_EFFECT_376, - /* 377 */ OBJ_EFFECT_377, - /* 378 */ OBJ_EFFECT_378, - /* 379 */ OBJ_EFFECT_379, - /* 380 */ OBJ_EFFECT_380, - /* 381 */ OBJ_EFFECT_381, - /* 382 */ OBJ_EFFECT_382, - /* 383 */ OBJ_EFFECT_383, - /* 384 */ OBJ_EFFECT_384, - /* 385 */ OBJ_EFFECT_385, - /* 386 */ OBJ_EFFECT_386, - /* 387 */ OBJ_EFFECT_387, - /* 388 */ OBJ_EFFECT_388, - /* 389 */ OBJ_EFFECT_389, - /* 390 */ OBJ_EFFECT_390, - /* 391 */ OBJ_EFFECT_391, - /* 392 */ OBJ_EFFECT_392, - /* 393 */ OBJ_EFFECT_393, - /* 394 */ OBJ_EFFECT_394, - /* 395 */ OBJ_EFFECT_395, - /* 396 */ OBJ_EFFECT_396, - /* 397 */ OBJ_EFFECT_397, - /* 398 */ OBJ_EFFECT_398, - /* 399 */ OBJ_EFFECT_399, - /* 400 */ OBJ_UNK_400, - /* 401 */ OBJ_UNK_401, - /* 402 */ OBJ_UNK_402, - /* 403 */ OBJ_UNK_403, - /* 404 */ OBJ_UNK_404, - /* 405 */ OBJ_UNK_405, - /* 407 */ OBJ_ID_MAX, + /* -1 */ OBJ_INVALID = -1, + /* 0 */ OBJ_SCENERY_CO_STONE_ARCH, + /* 1 */ OBJ_SCENERY_CO_BUMP_1, // Terrain bump 1 + /* 2 */ OBJ_SCENERY_CO_BUMP_2, // Terrain bump 2 + /* 3 */ OBJ_SCENERY_CO_BUMP_3, // Terrain bump 3 + /* 4 */ OBJ_SCENERY_CO_BUMP_4, // Terrain bump 4 + /* 5 */ OBJ_SCENERY_CO_BUMP_5, // Terrain bump 5 + /* 6 */ OBJ_SCENERY_CO_HIGHWAY_1, + /* 7 */ OBJ_SCENERY_CO_HIGHWAY_2, + /* 8 */ OBJ_SCENERY_CO_HIGHWAY_3, + /* 9 */ OBJ_SCENERY_CO_HIGHWAY_4, + /* 10 */ OBJ_SCENERY_CO_BUILDING_1, // Building with "GOOD LUCK!" legend. + /* 11 */ OBJ_SCENERY_CO_BUILDING_2, + /* 12 */ OBJ_SCENERY_CO_BUILDING_3, + /* 13 */ OBJ_SCENERY_CO_BUILDING_4, + /* 14 */ OBJ_SCENERY_CO_BUILDING_5, + /* 15 */ OBJ_SCENERY_CO_BUILDING_6, + /* 16 */ OBJ_SCENERY_CO_BUILDING_7, // Building with Pepper's face on it + /* 17 */ OBJ_SCENERY_CO_BUILDING_8, + /* 18 */ OBJ_SCENERY_CO_BUILDING_ON_FIRE, + /* 19 */ OBJ_SCENERY_CO_TOWER, + /* 20 */ OBJ_SCENERY_CO_ARCH_1, + /* 21 */ OBJ_SCENERY_CO_ARCH_2, + /* 22 */ OBJ_SCENERY_CO_ARCH_3, + /* 23 */ OBJ_SCENERY_CO_RADAR, + /* 24 */ OBJ_SCENERY_CO_HIGHWAY_5, + /* 25 */ OBJ_SCENERY_CO_HIGHWAY_6, + /* 26 */ OBJ_SCENERY_CO_HIGHWAY_7, + /* 27 */ OBJ_SCENERY_CO_HIGHWAY_8, + /* 28 */ OBJ_SCENERY_CO_HIGHWAY_9, + /* 29 */ OBJ_SCENERY_TI_SKULL, + /* 30 */ OBJ_SCENERY_TI_RIB_0, + /* 31 */ OBJ_SCENERY_TI_RIB_1, + /* 32 */ OBJ_SCENERY_TI_RIB_2, + /* 33 */ OBJ_SCENERY_TI_RIB_3, + /* 34 */ OBJ_SCENERY_TI_RIB_4, + /* 35 */ OBJ_SCENERY_TI_RIB_5, + /* 36 */ OBJ_SCENERY_TI_RIB_6, + /* 37 */ OBJ_SCENERY_TI_RIB_7, + /* 38 */ OBJ_SCENERY_TI_RIB_8, + /* 39 */ OBJ_SCENERY_ME_TUNNEL, + /* 40 */ OBJ_SCENERY_CO_BUILDING_9, + /* 41 */ OBJ_SCENERY_CO_BUILDING_10, + /* 42 */ OBJ_SCENERY_IBEAM, + /* 43 */ OBJ_SCENERY_ZO_ROCK_1, + /* 44 */ OBJ_SCENERY_44, + /* 45 */ OBJ_SCENERY_45, + /* 46 */ OBJ_SCENERY_46, + /* 47 */ OBJ_SCENERY_47, + /* 48 */ OBJ_SCENERY_48, + /* 49 */ OBJ_SCENERY_49, + /* 50 */ OBJ_SCENERY_50, + /* 51 */ OBJ_SCENERY_51, + /* 52 */ OBJ_SCENERY_52, + /* 53 */ OBJ_SCENERY_53, + /* 54 */ OBJ_SCENERY_CO_WATERFALL, + /* 55 */ OBJ_SCENERY_CO_ROCKWALL, + /* 56 */ OBJ_SCENERY_CO_DOORS, + /* 57 */ OBJ_SCENERY_57, + /* 58 */ OBJ_SCENERY_58, + /* 59 */ OBJ_SCENERY_59, + /* 60 */ OBJ_SCENERY_60, + /* 61 */ OBJ_SCENERY_61, + /* 62 */ OBJ_SCENERY_62, + /* 63 */ OBJ_SCENERY_63, + /* 64 */ OBJ_SCENERY_64, + /* 65 */ OBJ_SCENERY_65, + /* 66 */ OBJ_SCENERY_66, + /* 67 */ OBJ_SCENERY_67, + /* 68 */ OBJ_SCENERY_68, + /* 69 */ OBJ_SCENERY_69, + /* 70 */ OBJ_SCENERY_70, + /* 71 */ OBJ_SCENERY_71, + /* 72 */ OBJ_SCENERY_72, + /* 73 */ OBJ_SCENERY_73, + /* 74 */ OBJ_SCENERY_74, + /* 75 */ OBJ_SCENERY_75, + /* 76 */ OBJ_SCENERY_76, + /* 77 */ OBJ_SCENERY_77, + /* 78 */ OBJ_SCENERY_78, + /* 79 */ OBJ_SCENERY_79, + /* 80 */ OBJ_SCENERY_80, + /* 81 */ OBJ_SCENERY_81, + /* 82 */ OBJ_SCENERY_82, + /* 83 */ OBJ_SCENERY_83, + /* 84 */ OBJ_SCENERY_84, + /* 85 */ OBJ_SCENERY_85, + /* 86 */ OBJ_SCENERY_86, + /* 87 */ OBJ_SCENERY_87, + /* 88 */ OBJ_SCENERY_88, + /* 89 */ OBJ_SCENERY_89, + /* 90 */ OBJ_SCENERY_90, + /* 91 */ OBJ_SCENERY_91, + /* 92 */ OBJ_SCENERY_92, + /* 93 */ OBJ_SCENERY_93, + /* 94 */ OBJ_SCENERY_94, + /* 95 */ OBJ_SCENERY_95, + /* 96 */ OBJ_SCENERY_96, + /* 97 */ OBJ_SCENERY_97, + /* 98 */ OBJ_SCENERY_98, + /* 99 */ OBJ_SCENERY_99, + /* 100 */ OBJ_SCENERY_100, + /* 101 */ OBJ_SCENERY_101, + /* 102 */ OBJ_SCENERY_102, + /* 103 */ OBJ_SCENERY_103, + /* 104 */ OBJ_SCENERY_104, + /* 105 */ OBJ_SCENERY_105, + /* 106 */ OBJ_SCENERY_106, + /* 107 */ OBJ_SCENERY_107, + /* 108 */ OBJ_SCENERY_108, + /* 109 */ OBJ_SCENERY_109, + /* 110 */ OBJ_SCENERY_110, + /* 111 */ OBJ_SCENERY_111, + /* 112 */ OBJ_SCENERY_112, + /* 113 */ OBJ_SCENERY_113, + /* 114 */ OBJ_SCENERY_114, + /* 115 */ OBJ_SCENERY_115, + /* 116 */ OBJ_SCENERY_116, + /* 117 */ OBJ_SCENERY_117, + /* 118 */ OBJ_SCENERY_118, + /* 119 */ OBJ_SCENERY_119, + /* 120 */ OBJ_SCENERY_120, + /* 121 */ OBJ_SCENERY_121, + /* 122 */ OBJ_SCENERY_122, + /* 123 */ OBJ_SCENERY_123, + /* 124 */ OBJ_SCENERY_124, + /* 125 */ OBJ_SCENERY_125, + /* 126 */ OBJ_SCENERY_126, + /* 127 */ OBJ_SCENERY_127, + /* 128 */ OBJ_SCENERY_128, + /* 129 */ OBJ_SCENERY_129, + /* 130 */ OBJ_SCENERY_130, + /* 131 */ OBJ_SCENERY_131, + /* 132 */ OBJ_SCENERY_132, + /* 133 */ OBJ_SCENERY_133, + /* 134 */ OBJ_SCENERY_134, + /* 135 */ OBJ_SCENERY_135, + /* 136 */ OBJ_SCENERY_136, + /* 137 */ OBJ_SCENERY_137, + /* 138 */ OBJ_SCENERY_138, + /* 139 */ OBJ_SCENERY_139, + /* 140 */ OBJ_SCENERY_140, + /* 141 */ OBJ_SCENERY_141, + /* 142 */ OBJ_SCENERY_142, + /* 143 */ OBJ_SCENERY_143, + /* 144 */ OBJ_SCENERY_144, + /* 145 */ OBJ_SCENERY_145, + /* 146 */ OBJ_SCENERY_146, + /* 147 */ OBJ_SCENERY_147, + /* 148 */ OBJ_SCENERY_148, + /* 149 */ OBJ_SCENERY_149, + /* 150 */ OBJ_SCENERY_150, + /* 151 */ OBJ_SCENERY_151, + /* 152 */ OBJ_SCENERY_152, + /* 153 */ OBJ_SCENERY_153, + /* 154 */ OBJ_SCENERY_154, + /* 155 */ OBJ_SCENERY_155, + /* 156 */ OBJ_SCENERY_156, + /* 157 */ OBJ_SCENERY_157, + /* 158 */ OBJ_SCENERY_158, + /* 159 */ OBJ_SCENERY_159, + /* 160 */ OBJ_SCENERY_160, + /* 161 */ OBJ_SPRITE_CO_POLE, + /* 162 */ OBJ_SPRITE_CO_TREE, + /* 163 */ OBJ_SPRITE_FO_POLE, + /* 164 */ OBJ_SPRITE_FOG_SHADOW, + /* 165 */ OBJ_SPRITE_CO_RUIN1, + /* 166 */ OBJ_SPRITE_CO_RUIN2, + /* 167 */ OBJ_SPRITE_167, + /* 168 */ OBJ_SPRITE_168, + /* 169 */ OBJ_SPRITE_TI_CACTUS, + /* 170 */ OBJ_SPRITE_CO_SMOKE, + /* 171 */ OBJ_SPRITE_VE1_BOSS_TRIGGER1, + /* 172 */ OBJ_SPRITE_VE1_BOSS_TRIGGER2, + /* 173 */ OBJ_SPRITE_VE1_BOSS_TRIGGER3, + /* 174 */ OBJ_SPRITE_VE1_BOSS_TRIGGER4, + /* 175 */ OBJ_SPRITE_GFOX_TARGET, + /* 176 */ OBJ_ACTOR_CO_GARUDA_1, // Robot that pushes buildings. + /* 177 */ OBJ_ACTOR_CO_GARUDA_2, // Robot that throws I-Beams. + /* 178 */ OBJ_ACTOR_CO_GARUDA_3, // Robot that spins I-Beams. + /* 179 */ OBJ_ACTOR_CO_GARUDA_DESTROY, + /* 180 */ OBJ_ACTOR_180, + /* 181 */ OBJ_ACTOR_181, + /* 182 */ OBJ_ACTOR_182, + /* 183 */ OBJ_ACTOR_183, + /* 184 */ OBJ_ACTOR_184, + /* 185 */ OBJ_ACTOR_185, + /* 186 */ OBJ_ACTOR_186, + /* 187 */ OBJ_ACTOR_187, + /* 188 */ OBJ_ACTOR_188, + /* 189 */ OBJ_ACTOR_DEBRIS, + /* 190 */ OBJ_MISSILE_SEEK_TEAM, + /* 191 */ OBJ_MISSILE_SEEK_PLAYER, + /* 192 */ OBJ_ACTOR_192, + /* 193 */ OBJ_ACTOR_193, + /* 194 */ OBJ_ACTOR_194, + /* 195 */ OBJ_ACTOR_CUTSCENE, + /* 196 */ OBJ_ACTOR_196, + /* 197 */ OBJ_ACTOR_ALLRANGE, + /* 198 */ OBJ_ACTOR_TEAM_BOSS, + /* 199 */ OBJ_ACTOR_199, + /* 200 */ OBJ_ACTOR_EVENT, + /* 201 */ OBJ_ACTOR_201, + /* 202 */ OBJ_ACTOR_202, + /* 203 */ OBJ_ACTOR_SLIPPY_SX, + /* 204 */ OBJ_ACTOR_204, + /* 205 */ OBJ_ACTOR_205, + /* 206 */ OBJ_ACTOR_206, + /* 207 */ OBJ_ACTOR_207, + /* 208 */ OBJ_ACTOR_208, + /* 209 */ OBJ_ACTOR_209, + /* 210 */ OBJ_ACTOR_210, + /* 211 */ OBJ_ACTOR_211, + /* 212 */ OBJ_ACTOR_212, + /* 213 */ OBJ_ACTOR_213, + /* 214 */ OBJ_ACTOR_214, + /* 215 */ OBJ_ACTOR_215, + /* 216 */ OBJ_ACTOR_216, + /* 217 */ OBJ_ACTOR_217, + /* 218 */ OBJ_ACTOR_218, + /* 219 */ OBJ_ACTOR_219, + /* 220 */ OBJ_ACTOR_220, + /* 221 */ OBJ_ACTOR_221, + /* 222 */ OBJ_ACTOR_222, + /* 223 */ OBJ_ACTOR_223, + /* 224 */ OBJ_ACTOR_224, + /* 225 */ OBJ_ACTOR_225, + /* 226 */ OBJ_ACTOR_226, + /* 227 */ OBJ_ACTOR_227, + /* 228 */ OBJ_ACTOR_228, + /* 229 */ OBJ_ACTOR_229, + /* 230 */ OBJ_ACTOR_230, + /* 231 */ OBJ_ACTOR_231, + /* 232 */ OBJ_ACTOR_232, + /* 233 */ OBJ_ACTOR_233, + /* 234 */ OBJ_ACTOR_234, + /* 235 */ OBJ_ACTOR_235, + /* 236 */ OBJ_ACTOR_236, + /* 237 */ OBJ_ACTOR_237, + /* 238 */ OBJ_ACTOR_238, + /* 239 */ OBJ_ACTOR_239, + /* 240 */ OBJ_ACTOR_240, + /* 241 */ OBJ_ACTOR_241, + /* 242 */ OBJ_ACTOR_242, + /* 243 */ OBJ_ACTOR_243, + /* 244 */ OBJ_ACTOR_244, + /* 245 */ OBJ_ACTOR_245, + /* 246 */ OBJ_ACTOR_246, + /* 247 */ OBJ_ACTOR_247, + /* 248 */ OBJ_ACTOR_248, + /* 249 */ OBJ_ACTOR_249, + /* 250 */ OBJ_ACTOR_250, + /* 251 */ OBJ_ACTOR_251, + /* 252 */ OBJ_ACTOR_252, + /* 253 */ OBJ_ACTOR_253, + /* 254 */ OBJ_ACTOR_254, + /* 255 */ OBJ_ACTOR_255, + /* 256 */ OBJ_ACTOR_256, + /* 257 */ OBJ_ACTOR_257, + /* 258 */ OBJ_ACTOR_258, + /* 259 */ OBJ_ACTOR_259, + /* 260 */ OBJ_ACTOR_260, + /* 261 */ OBJ_ACTOR_261, + /* 262 */ OBJ_ACTOR_262, + /* 263 */ OBJ_ACTOR_263, + /* 264 */ OBJ_ACTOR_264, + /* 265 */ OBJ_ACTOR_265, + /* 266 */ OBJ_ACTOR_266, + /* 267 */ OBJ_ACTOR_267, + /* 268 */ OBJ_ACTOR_268, + /* 269 */ OBJ_ACTOR_269, + /* 270 */ OBJ_ACTOR_270, + /* 271 */ OBJ_ACTOR_271, + /* 272 */ OBJ_ACTOR_272, + /* 273 */ OBJ_ACTOR_FO_RADAR, + /* 274 */ OBJ_ACTOR_SZ_SPACE_JUNK, + /* 275 */ OBJ_ACTOR_275, + /* 276 */ OBJ_ACTOR_276, + /* 277 */ OBJ_ACTOR_277, + /* 278 */ OBJ_ACTOR_278, + /* 279 */ OBJ_ACTOR_279, + /* 280 */ OBJ_ACTOR_280, + /* 281 */ OBJ_ACTOR_281, + /* 282 */ OBJ_ACTOR_282, + /* 283 */ OBJ_ACTOR_283, + /* 284 */ OBJ_ACTOR_284, + /* 285 */ OBJ_ACTOR_285, + /* 286 */ OBJ_ACTOR_286, + /* 287 */ OBJ_ACTOR_287, + /* 288 */ OBJ_ACTOR_288, + /* 289 */ OBJ_ACTOR_289, + /* 290 */ OBJ_ACTOR_290, + /* 291 */ OBJ_ACTOR_SUPPLIES, + /* 292 */ OBJ_BOSS_CO_GRANGA, + /* 293 */ OBJ_BOSS_CO_CARRIER, + /* 294 */ OBJ_BOSS_294, + /* 295 */ OBJ_BOSS_295, + /* 296 */ OBJ_BOSS_296, + /* 297 */ OBJ_BOSS_297, + /* 298 */ OBJ_BOSS_298, + /* 299 */ OBJ_BOSS_299, + /* 300 */ OBJ_BOSS_300, + /* 301 */ OBJ_BOSS_301, + /* 302 */ OBJ_BOSS_A6, + /* 303 */ OBJ_BOSS_SX_SPYBORG, + /* 304 */ OBJ_BOSS_304, + /* 305 */ OBJ_BOSS_305, + /* 306 */ OBJ_BOSS_TI, + /* 307 */ OBJ_BOSS_ZO, + /* 308 */ OBJ_BOSS_FO, + /* 309 */ OBJ_BOSS_309, + /* 310 */ OBJ_BOSS_310, + /* 311 */ OBJ_BOSS_311, + /* 312 */ OBJ_BOSS_VE2, + /* 313 */ OBJ_BOSS_SZ_GREAT_FOX, + /* 314 */ OBJ_BOSS_SY, + /* 315 */ OBJ_BOSS_SO, + /* 316 */ OBJ_BOSS_KA, + /* 317 */ OBJ_BOSS_KA_BASE, + /* 318 */ OBJ_BOSS_AQ, + /* 319 */ OBJ_BOSS_VE1, + /* 320 */ OBJ_BOSS_320, + /* 321 */ OBJ_BOSS_321, + /* 322 */ OBJ_ITEM_LASERS, + /* 323 */ OBJ_ITEM_CHECKPOINT, + /* 324 */ OBJ_ITEM_SILVER_RING, + /* 325 */ OBJ_ITEM_SILVER_STAR, + /* 326 */ OBJ_ITEM_METEO_WARP, + /* 327 */ OBJ_ITEM_BOMB, + /* 328 */ OBJ_ITEM_PATH_SPLIT_X, + /* 329 */ OBJ_ITEM_PATH_TURN_LEFT, + /* 330 */ OBJ_ITEM_PATH_TURN_RIGHT, + /* 331 */ OBJ_ITEM_PATH_SPLIT_Y, + /* 332 */ OBJ_ITEM_PATH_TURN_UP, + /* 333 */ OBJ_ITEM_PATH_TURN_DOWN, + /* 334 */ OBJ_ITEM_RING_CHECK, + /* 335 */ OBJ_ITEM_1UP, + /* 336 */ OBJ_ITEM_GOLD_RING, + /* 337 */ OBJ_ITEM_WING_REPAIR, + /* 338 */ OBJ_ITEM_TRAINING_RING, + /* 339 */ OBJ_EFFECT_FIRE_SMOKE, + /* 340 */ OBJ_EFFECT_340, + /* 341 */ OBJ_EFFECT_341, + /* 342 */ OBJ_EFFECT_342, + /* 343 */ OBJ_EFFECT_343, + /* 344 */ OBJ_EFFECT_344, + /* 345 */ OBJ_EFFECT_345, + /* 346 */ OBJ_EFFECT_346, + /* 347 */ OBJ_EFFECT_347, + /* 348 */ OBJ_EFFECT_348, + /* 349 */ OBJ_EFFECT_349, + /* 350 */ OBJ_EFFECT_350, + /* 351 */ OBJ_EFFECT_351, + /* 352 */ OBJ_EFFECT_CLOUDS, + /* 353 */ OBJ_EFFECT_ENEMY_LASER_1, + /* 354 */ OBJ_EFFECT_354, + /* 355 */ OBJ_EFFECT_355, + /* 356 */ OBJ_EFFECT_356, + /* 357 */ OBJ_EFFECT_357, + /* 358 */ OBJ_EFFECT_358, + /* 359 */ OBJ_EFFECT_359, + /* 360 */ OBJ_EFFECT_360, + /* 361 */ OBJ_EFFECT_361, + /* 362 */ OBJ_EFFECT_362, + /* 363 */ OBJ_EFFECT_363, + /* 364 */ OBJ_EFFECT_364, + /* 365 */ OBJ_EFFECT_365, + /* 366 */ OBJ_EFFECT_366, + /* 367 */ OBJ_EFFECT_367, + /* 368 */ OBJ_EFFECT_368, + /* 369 */ OBJ_EFFECT_369, + /* 370 */ OBJ_EFFECT_370, + /* 371 */ OBJ_EFFECT_371, + /* 372 */ OBJ_EFFECT_372, + /* 373 */ OBJ_EFFECT_TIMED_SFX, + /* 374 */ OBJ_EFFECT_374, + /* 375 */ OBJ_EFFECT_375, + /* 376 */ OBJ_EFFECT_376, + /* 377 */ OBJ_EFFECT_377, + /* 378 */ OBJ_EFFECT_378, + /* 379 */ OBJ_EFFECT_379, + /* 380 */ OBJ_EFFECT_380, + /* 381 */ OBJ_EFFECT_381, + /* 382 */ OBJ_EFFECT_382, + /* 383 */ OBJ_EFFECT_383, + /* 384 */ OBJ_EFFECT_384, + /* 385 */ OBJ_EFFECT_385, + /* 386 */ OBJ_EFFECT_386, + /* 387 */ OBJ_EFFECT_387, + /* 388 */ OBJ_EFFECT_388, + /* 389 */ OBJ_EFFECT_389, + /* 390 */ OBJ_EFFECT_390, + /* 391 */ OBJ_EFFECT_391, + /* 392 */ OBJ_EFFECT_392, + /* 393 */ OBJ_EFFECT_393, + /* 394 */ OBJ_EFFECT_394, + /* 395 */ OBJ_EFFECT_395, + /* 396 */ OBJ_EFFECT_396, + /* 397 */ OBJ_EFFECT_397, + /* 398 */ OBJ_EFFECT_398, + /* 399 */ OBJ_EFFECT_399, + /* 400 */ OBJ_UNK_400, + /* 401 */ OBJ_UNK_401, + /* 402 */ OBJ_UNK_402, + /* 403 */ OBJ_UNK_403, + /* 404 */ OBJ_UNK_404, + /* 405 */ OBJ_UNK_405, + /* 407 */ OBJ_ID_MAX, } ObjectId; -#define OBJ_SCENERY_START OBJ_SCENERY_0 -#define OBJ_SPRITE_START OBJ_SPRITE_CO_POLE -#define OBJ_ACTOR_START OBJ_ACTOR_176 -#define OBJ_BOSS_START OBJ_BOSS_292 -#define OBJ_ITEM_START OBJ_ITEM_LASERS -#define OBJ_EFFECT_START OBJ_EFFECT_FIRE_SMOKE -#define OBJ_ENV_START OBJ_UNK_400 +#define OBJ_SCENERY_START OBJ_SCENERY_CO_STONE_ARCH +#define OBJ_SPRITE_START OBJ_SPRITE_CO_POLE +#define OBJ_ACTOR_START OBJ_ACTOR_CO_GARUDA_1 +#define OBJ_BOSS_START OBJ_BOSS_CO_GRANGA +#define OBJ_ITEM_START OBJ_ITEM_LASERS +#define OBJ_EFFECT_START OBJ_EFFECT_FIRE_SMOKE +#define OBJ_ENV_START OBJ_UNK_400 -#define OBJ_SCENERY_MAX OBJ_SPRITE_START -#define OBJ_SPRITE_MAX OBJ_ACTOR_START -#define OBJ_ACTOR_MAX OBJ_BOSS_START -#define OBJ_BOSS_MAX OBJ_ITEM_START -#define OBJ_ITEM_MAX OBJ_EFFECT_START -#define OBJ_EFFECT_MAX OBJ_ENV_START +#define OBJ_SCENERY_MAX OBJ_SPRITE_START +#define OBJ_SPRITE_MAX OBJ_ACTOR_START +#define OBJ_ACTOR_MAX OBJ_BOSS_START +#define OBJ_BOSS_MAX OBJ_ITEM_START +#define OBJ_ITEM_MAX OBJ_EFFECT_START +#define OBJ_EFFECT_MAX OBJ_ENV_START #define ACTOR_EVENT_ID 1000 @@ -775,7 +773,7 @@ typedef enum AllRangeAi { /* 7 */ AI360_ANDREW, /* 8 */ AI360_KATT, /* 9 */ AI360_BILL, - /* 10 */ AI360_10, + /* 10 */ AI360_ENEMY, /* 100 */ AI360_GREAT_FOX = 100, /* 200 */ AI360_MISSILE = 200, /* 200 */ AI360_EVENT_HANDLER = 1000, @@ -937,106 +935,106 @@ typedef enum { /* 50 */ LN_VWK_MAX, } BossLNvwork; -typedef Scenery Scenery_0; -typedef Scenery Scenery_1; -typedef Scenery Scenery_2; -typedef Scenery Scenery_3; -typedef Scenery Scenery_4; -typedef Scenery Scenery_5; -typedef Scenery Scenery_6; -typedef Scenery Scenery_7; -typedef Scenery Scenery_8; -typedef Scenery Scenery_9; -typedef Scenery Scenery_10; -typedef Scenery Scenery_11; -typedef Scenery Scenery_12; -typedef Scenery Scenery_13; -typedef Scenery Scenery_14; -typedef Scenery Scenery_15; -typedef Scenery Scenery_16; -typedef Scenery Scenery_17; -typedef Scenery Scenery_18; -typedef Scenery Scenery_19; -typedef Scenery Scenery_20; -typedef Scenery Scenery_21; -typedef Scenery Scenery_22; -typedef Scenery Scenery_23; -typedef Scenery Scenery_24; -typedef Scenery Scenery_25; -typedef Scenery Scenery_26; -typedef Scenery Scenery_27; -typedef Scenery Scenery_28; -typedef Scenery Scenery_29; -typedef Scenery Scenery_30; -typedef Scenery Scenery_31; -typedef Scenery Scenery_32; -typedef Scenery Scenery_33; -typedef Scenery Scenery_34; -typedef Scenery Scenery_35; -typedef Scenery Scenery_36; -typedef Scenery Scenery_37; -typedef Scenery Scenery_38; -typedef Scenery MeteoTunnel; -typedef Scenery Scenery_40; -typedef Scenery Scenery_41; -typedef Scenery Scenery_42; -typedef Scenery Scenery_43; -typedef Scenery Scenery_44; -typedef Scenery Scenery_45; -typedef Scenery Scenery_46; -typedef Scenery Scenery_47; -typedef Scenery Scenery_48; -typedef Scenery Scenery_49; -typedef Scenery Scenery_50; -typedef Scenery Scenery_51; -typedef Scenery Scenery_52; -typedef Scenery Scenery_53; -typedef Scenery Scenery_54; -typedef Scenery Scenery_55; -typedef Scenery Scenery_56; -typedef Scenery Scenery_57; -typedef Scenery Scenery_58; -typedef Scenery Scenery_59; -typedef Scenery Scenery_60; -typedef Scenery Scenery_61; -typedef Scenery Scenery_62; -typedef Scenery Scenery_63; -typedef Scenery Scenery_64; -typedef Scenery Scenery_65; -typedef Scenery Scenery_66; -typedef Scenery Scenery_67; -typedef Scenery Scenery_68; -typedef Scenery Scenery_69; -typedef Scenery Scenery_70; -typedef Scenery Scenery_71; -typedef Scenery Scenery_72; -typedef Scenery Scenery_73; -typedef Scenery Scenery_74; -typedef Scenery Scenery_75; -typedef Scenery Scenery_76; -typedef Scenery Scenery_77; -typedef Scenery Scenery_78; -typedef Scenery Scenery_79; -typedef Scenery Scenery_80; -typedef Scenery Scenery_81; -typedef Scenery Scenery_82; -typedef Scenery Scenery_83; -typedef Scenery Scenery_84; -typedef Scenery Scenery_85; -typedef Scenery Scenery_86; -typedef Scenery Scenery_87; -typedef Scenery Scenery_88; -typedef Scenery Scenery_89; -typedef Scenery Scenery_90; -typedef Scenery Scenery_91; -typedef Scenery Scenery_92; -typedef Scenery Scenery_93; -typedef Scenery Scenery_94; -typedef Scenery Scenery_95; -typedef Scenery Scenery_96; -typedef Scenery Scenery_97; -typedef Scenery Scenery_98; -typedef Scenery Scenery_99; +typedef Scenery Scenery_0; +typedef Scenery Scenery_1; +typedef Scenery Scenery_2; +typedef Scenery Scenery_3; +typedef Scenery Scenery_4; +typedef Scenery Scenery_5; +typedef Scenery Scenery_6; +typedef Scenery Scenery_7; +typedef Scenery Scenery_8; +typedef Scenery Scenery_9; +typedef Scenery Scenery_10; +typedef Scenery Scenery_11; +typedef Scenery Scenery_12; +typedef Scenery Scenery_13; +typedef Scenery Scenery_14; +typedef Scenery Scenery_15; +typedef Scenery Scenery_16; +typedef Scenery Scenery_17; +typedef Scenery CoBuildingOnFire; +typedef Scenery Scenery_19; +typedef Scenery Scenery_20; +typedef Scenery Scenery_21; +typedef Scenery Scenery_22; +typedef Scenery Scenery_23; +typedef Scenery Scenery_24; +typedef Scenery Scenery_25; +typedef Scenery Scenery_26; +typedef Scenery Scenery_27; +typedef Scenery Scenery_28; +typedef Scenery Scenery_29; +typedef Scenery Scenery_30; +typedef Scenery Scenery_31; +typedef Scenery Scenery_32; +typedef Scenery Scenery_33; +typedef Scenery Scenery_34; +typedef Scenery Scenery_35; +typedef Scenery Scenery_36; +typedef Scenery Scenery_37; +typedef Scenery Scenery_38; +typedef Scenery MeteoTunnel; +typedef Scenery CoBuilding9; +typedef Scenery CoBuilding10; +typedef Scenery CoIBeam; +typedef Scenery Scenery_43; +typedef Scenery Scenery_44; +typedef Scenery Scenery_45; +typedef Scenery Scenery_46; +typedef Scenery Scenery_47; +typedef Scenery Scenery_48; +typedef Scenery Scenery_49; +typedef Scenery Scenery_50; +typedef Scenery Scenery_51; +typedef Scenery Scenery_52; +typedef Scenery Scenery_53; +typedef Scenery CoWaterfall; +typedef Scenery Scenery_55; +typedef Scenery CoDoors; +typedef Scenery Scenery_57; +typedef Scenery Scenery_58; +typedef Scenery Scenery_59; +typedef Scenery Scenery_60; +typedef Scenery Scenery_61; +typedef Scenery Scenery_62; +typedef Scenery Scenery_63; +typedef Scenery Scenery_64; +typedef Scenery Scenery_65; +typedef Scenery Scenery_66; +typedef Scenery Scenery_67; +typedef Scenery Scenery_68; +typedef Scenery Scenery_69; +typedef Scenery Scenery_70; +typedef Scenery Scenery_71; +typedef Scenery Scenery_72; +typedef Scenery Scenery_73; +typedef Scenery Scenery_74; +typedef Scenery Scenery_75; +typedef Scenery Scenery_76; +typedef Scenery Scenery_77; +typedef Scenery Scenery_78; +typedef Scenery Scenery_79; +typedef Scenery Scenery_80; +typedef Scenery Scenery_81; +typedef Scenery Scenery_82; +typedef Scenery Scenery_83; +typedef Scenery Scenery_84; +typedef Scenery Scenery_85; +typedef Scenery Scenery_86; +typedef Scenery Scenery_87; +typedef Scenery Scenery_88; +typedef Scenery Scenery_89; +typedef Scenery Scenery_90; +typedef Scenery Scenery_91; +typedef Scenery Scenery_92; +typedef Scenery Scenery_93; +typedef Scenery Scenery_94; +typedef Scenery Scenery_95; +typedef Scenery Scenery_96; +typedef Scenery Scenery_97; +typedef Scenery Scenery_98; +typedef Scenery Scenery_99; typedef Scenery Scenery_100; typedef Scenery Scenery_101; typedef Scenery Scenery_102; @@ -1113,10 +1111,10 @@ typedef Sprite Ve1BossTrigger2; typedef Sprite Ve1BossTrigger3; typedef Sprite Ve1BossTrigger4; typedef Sprite GfoxTarget; -typedef Actor Actor176; -typedef Actor Actor177; -typedef Actor Actor178; -typedef Actor Actor179; +typedef Actor CoGaruda1; +typedef Actor CoGaruda2; +typedef Actor CoGaruda3; +typedef Actor CoGarudaDestroy; typedef Actor Actor180; typedef Actor Actor181; typedef Actor Actor182; @@ -1210,8 +1208,8 @@ typedef Actor Actor269; typedef Actor Actor270; typedef Actor Actor271; typedef Actor Actor272; -typedef Actor Actor273; -typedef Actor Actor274; +typedef Actor FoRadar; +typedef Actor ActorSpaceJunk; typedef Actor Actor275; typedef Actor Actor276; typedef Actor Actor277; @@ -1229,8 +1227,8 @@ typedef Actor Actor288; typedef Actor Actor289; typedef Actor Actor290; typedef Actor ActorSupplies; -typedef Boss Boss292; -typedef Boss Boss293; +typedef Boss Granga; +typedef Boss Carrier; typedef Boss Boss294; typedef Boss Boss295; typedef Boss Boss296; @@ -1240,18 +1238,18 @@ typedef Boss Boss299; typedef Boss Boss300; typedef Boss Boss301; typedef Boss BossA6; -typedef Boss Boss303; +typedef Boss Spyborg; typedef Boss Boss304; typedef Boss Boss305; typedef Boss Boss306; typedef Boss BossZO; -typedef Boss Boss308; +typedef Boss BossFO; typedef Boss Boss309; typedef Boss Boss310; typedef Boss Boss311; -typedef Boss Boss312; -typedef Boss Boss313; -typedef Boss Boss314; +typedef Boss BossVE2; +typedef Boss GreatFoxSZ; +typedef Boss BossSY; typedef Boss BossSO; typedef Boss Saucerer; typedef Boss Frontlinebase; @@ -1289,7 +1287,7 @@ typedef Effect Effect348; typedef Effect Effect349; typedef Effect Effect350; typedef Effect Effect351; -typedef Effect Effect352; +typedef Effect Clouds; typedef Effect Effect353; typedef Effect Effect354; typedef Effect Effect355; @@ -1310,7 +1308,7 @@ typedef Effect Effect369; typedef Effect Effect370; typedef Effect Effect371; typedef Effect Effect372; -typedef Effect Effect373; +typedef Effect TimedSfx; typedef Effect Effect374; typedef Effect Effect375; typedef Effect Effect376; @@ -1338,5 +1336,4 @@ typedef Effect Effect397; typedef Effect Effect398; typedef Effect Effect399; - #endif diff --git a/include/sf64player.h b/include/sf64player.h index 2d191a66..72aee784 100644 --- a/include/sf64player.h +++ b/include/sf64player.h @@ -318,7 +318,7 @@ typedef struct Player { /* 0x498 */ s32 mercyTimer; /* 0x49C */ WingInfo wings; /* 0x4D8 */ f32 aerobaticPitch; - /* 0x4DC */ s32 somersault; + /* 0x4DC */ bool somersault; } Player; // size = 0x4E0 diff --git a/linker_scripts/us/rev1/symbol_addrs.txt b/linker_scripts/us/rev1/symbol_addrs.txt index 3e708ccf..9b9dbbec 100644 --- a/linker_scripts/us/rev1/symbol_addrs.txt +++ b/linker_scripts/us/rev1/symbol_addrs.txt @@ -153,7 +153,7 @@ D_800D8594 = 0x800D8594; // force_migration:True D_800C93EC = 0x800C93EC; // force_migration:True D_i1_8019B1EC = 0x8019B1EC; // force_migration:True segment:ovl_i1 -D_i1_8019B6D8 = 0x8019B6D8; // size:0x110 segment:ovl_i1 +sCoGrangaWork = 0x8019B6D8; // size:0x110 segment:ovl_i1 D_i3_801C171C = 0x801C171C; // force_migration:True segment:ovl_i3 D_i3_801C1728 = 0x801C1728; // force_migration:True segment:ovl_i3 D_i3_801C1730 = 0x801C1730; // force_migration:True segment:ovl_i3 diff --git a/linker_scripts/us/rev1/symbol_addrs_engine.txt b/linker_scripts/us/rev1/symbol_addrs_engine.txt index 08b68111..d3f16df6 100644 --- a/linker_scripts/us/rev1/symbol_addrs_engine.txt +++ b/linker_scripts/us/rev1/symbol_addrs_engine.txt @@ -176,13 +176,13 @@ Actor202_Draw = 0x80059A24; MeteoTunnel_Draw = 0x80059AEC; Scenery_DrawTitaniaBones = 0x80059B20; func_edisplay_80059BB0 = 0x80059BB0; -Scenery42_Draw = 0x80059BBC; +CoIBeam_Draw = 0x80059BBC; Actor196_Draw = 0x80059BF0; func_edisplay_80059C28 = 0x80059C28; Sprite167_Draw = 0x80059C34; FogShadow_Draw = 0x80059C40; -func_edisplay_80059F68 = 0x80059F68; -func_edisplay_80059FDC = 0x80059FDC; +CoBuilding9_Draw = 0x80059F68; +CoBuilding10_Draw = 0x80059FDC; func_edisplay_8005A010 = 0x8005A010; func_edisplay_8005A07C = 0x8005A07C; func_edisplay_8005A088 = 0x8005A088; @@ -190,12 +190,12 @@ ActorDebris_Draw = 0x8005A094; Actor_DrawEngineAndContrails = 0x8005ADAC; Actor_DrawEngineGlow = 0x8005B1E8; func_edisplay_8005B388 = 0x8005B388; -func_edisplay_8005B6A4 = 0x8005B6A4; -func_edisplay_8005B71C = 0x8005B71C; -func_edisplay_8005B7CC = 0x8005B7CC; -func_edisplay_8005B848 = 0x8005B848; -func_edisplay_8005B9A4 = 0x8005B9A4; -func_edisplay_8005BA30 = 0x8005BA30; +Actor180_Draw = 0x8005B6A4; +Actor182_Draw = 0x8005B71C; +Actor186_Draw = 0x8005B7CC; +Actor190_191_Draw = 0x8005B848; +Actor192_Draw = 0x8005B9A4; +Actor193_Draw = 0x8005BA30; func_edisplay_8005BAAC = 0x8005BAAC; Object_SetShadowDL = 0x8005BAB4; ItemCheckpoint_Draw = 0x8005C5F0; @@ -237,7 +237,7 @@ BonusText_Display = 0x80077240; func_effect_8007783C = 0x8007783C; func_effect_80079618 = 0x80079618; func_effect_8007A568 = 0x8007A568; -func_effect_8007A6F0 = 0x8007A6F0; +Effect_SpawnTimedSfxAtPos = 0x8007A6F0; func_effect_8007A900 = 0x8007A900; func_effect_8007AFD0 = 0x8007AFD0; func_effect_8007B8F8 = 0x8007B8F8; @@ -297,19 +297,19 @@ func_enmy_8006546C = 0x8006546C; func_enmy_800654E4 = 0x800654E4; func_enmy_800655C8 = 0x800655C8; func_enmy_8006566C = 0x8006566C; -func_enmy_800656D4 = 0x800656D4; +Actors190_191_Update = 0x800656D4; func_enmy_800660F0 = 0x800660F0; Actor_Despawn = 0x80066254; -func_enmy_8006654C = 0x8006654C; +Actor192_Update = 0x8006654C; func_enmy_8006684C = 0x8006684C; -func_enmy_800669A0 = 0x800669A0; -func_enmy_80066A80 = 0x80066A80; +Actor193_Update = 0x800669A0; +Actor180_Update = 0x80066A80; func_enmy_80066A8C = 0x80066A8C; func_enmy_80066C00 = 0x80066C00; -func_enmy_80066D5C = 0x80066D5C; +CoBuilding9_Update = 0x80066D5C; func_enmy_80066E80 = 0x80066E80; Sprite167_Update = 0x80066E8C; -func_enmy_80066EA8 = 0x80066EA8; +SceneryRotateTowardsCamera = 0x80066EA8; func_enmy_80066EE4 = 0x80066EE4; Item_CheckBounds = 0x80066EF0; Item_SpinPickup = 0x800671D0; diff --git a/linker_scripts/us/rev1/symbol_addrs_overlays.txt b/linker_scripts/us/rev1/symbol_addrs_overlays.txt index 9a1bc028..1ceb0b8e 100644 --- a/linker_scripts/us/rev1/symbol_addrs_overlays.txt +++ b/linker_scripts/us/rev1/symbol_addrs_overlays.txt @@ -1,8 +1,8 @@ -Corneria_8018ED78 = 0x8018ED78;//segment:ovl_i1 -Corneria_8018EE84 = 0x8018EE84;//segment:ovl_i1 -Corneria_8018B0B4 = 0x8018B0B4;//segment:ovl_i1 -Corneria_Boss292_Init = 0x801878D8;//segment:ovl_i1 -Corneria_Boss293_Init = 0x8018BE7C;//segment:ovl_i1 +Corneria_Boss294_Draw = 0x8018ED78;//segment:ovl_i1 +Corneria_Boss295_Draw = 0x8018EE84;//segment:ovl_i1 +Corneria_IBeam_Init = 0x8018B0B4;//segment:ovl_i1 +Corneria_Granga_Init = 0x801878D8;//segment:ovl_i1 +Corneria_Carrier_Init = 0x8018BE7C;//segment:ovl_i1 Venom1_8019250C = 0x8019250C;//segment:ovl_i1 Venom1_80192CB0 = 0x80192CB0;//segment:ovl_i1 Venom1_80192EA4 = 0x80192EA4;//segment:ovl_i1 @@ -97,16 +97,16 @@ Aquas_801AC8A8 = 0x801AC8A8;//segment:ovl_i3 Aquas_801AD688 = 0x801AD688;//segment:ovl_i3 Aquas_801AE3AC = 0x801AE3AC;//segment:ovl_i3 Aquas_801AF9FC = 0x801AF9FC;//segment:ovl_i3 -Aquas_801AFA5C = 0x801AFA5C;//segment:ovl_i3 +Aquas_Actor257_Update = 0x801AFA5C;//segment:ovl_i3 Aquas_801B0F88 = 0x801B0F88;//segment:ovl_i3 Aquas_801B0FCC = 0x801B0FCC;//segment:ovl_i3 Aquas_801B1008 = 0x801B1008;//segment:ovl_i3 Aquas_BossAq_Init = 0x801B10F8;//segment:ovl_i3 Aquas_Boss_Update = 0x801B134C;//segment:ovl_i3 Aquas_801B6344 = 0x801B6344;//segment:ovl_i3 -Aquas_801B638C = 0x801B638C;//segment:ovl_i3 +Aquas_Actor259_Update = 0x801B638C;//segment:ovl_i3 Aquas_801B6E54 = 0x801B6E54;//segment:ovl_i3 -Aquas_801B6FF8 = 0x801B6FF8;//segment:ovl_i3 +Aquas_Actor262_Update = 0x801B6FF8;//segment:ovl_i3 Aquas_801B7AF0 = 0x801B7AF0;//segment:ovl_i3 Aquas_801BA57C = 0x801BA57C;//segment:ovl_i3 Aquas_801BB26C = 0x801BB26C;//segment:ovl_i3 @@ -157,7 +157,7 @@ D_i3_801C27A0 = 0x801C27A0; //segment:ovl_i3 size:0x20 Katina_UpdateEvents = 0x80198594;//segment:ovl_i4 Katina_BossSetup = 0x80193CA4;//segment:ovl_i4 SectorZ_Missile_Update = 0x80199C60;//segment:ovl_i4 -SectorZ_80199900 = 0x80199900;//segment:ovl_i4 +SectorZ_MissileExplode = 0x80199900;//segment:ovl_i4 D_i4_801A03C0 = 0x801A03C0;//segment:ovl_i4 D_BO_8019EE80 = 0x8019EE80;//segment:ovl_i4 D_BO_801A03DC = 0x801A03DC;//segment:ovl_i4 @@ -213,8 +213,8 @@ D_i5_801B7630 = 0x801B7630;//size:0x24 segment:ovl_i5 Andross_801888F4 = 0x801888F4; //segment:ovl_i6 SectorY_Boss314_Init = 0x80197CC4; //segment:ovl_i6 Andross_Boss320_Init = 0x8018D16C; //segment:ovl_i6 -D_i6_801A68B0 = 0x801A68B0;//size:0x48 type:Vec3f segment:ovl_i6 -D_i6_801A68F8 = 0x801A68F8;//size:0xC type:f32 segment:ovl_i6 +sTeamInitPos = 0x801A68B0;//size:0x48 type:Vec3f segment:ovl_i6 +sTeamInitRot = 0x801A68F8;//size:0xC type:f32 segment:ovl_i6 D_i6_801A7F30 = 0x801A7F30; //segment:ovl_i6 D_Andross_801A7F58 = 0x801A7F58; //segment:ovl_i6 D_Andross_801A7F60 = 0x801A7F60; //segment:ovl_i6 diff --git a/src/audio/audio_general.c b/src/audio/audio_general.c index 8701a594..455dfde4 100644 --- a/src/audio/audio_general.c +++ b/src/audio/audio_general.c @@ -2322,7 +2322,7 @@ void Audio_AnalyzeFrequencies(f32* buffer0, f32* buffer1, s32 length, f32* buffe buff0fromStart++; buff1half1++; - // seconnd half of buffer 1 in reverse order this time + // second half of buffer 1 in reverse order this time buff1half2 = &buffer1[size - 1]; // convert to real amplitudes diff --git a/src/engine/fox_360.c b/src/engine/fox_360.c index dfa2b95c..cb52d2ef 100644 --- a/src/engine/fox_360.c +++ b/src/engine/fox_360.c @@ -49,14 +49,15 @@ bool gShowAllRangeCountdown; s32 gAllRangeFrameCount; f32 gAllRangeCountdownScale; -void AllRange_GetStarWolfHits(Actor* actor) { +void AllRange_GetStarWolfHits(Actor* this) { s32 hits = 0; - (void) "time=%d\n"; - (void) "time=%d\n"; - (void) "time=%d\n"; - (void) "time=%d\n"; - (void) "time=%d\n"; + PRINTF("time=%d\n"); + PRINTF("time=%d\n"); + PRINTF("time=%d\n"); + PRINTF("time=%d\n"); + PRINTF("time=%d\n"); + if (gCurrentLevel == LEVEL_VENOM_2) { if (gAllRangeFrameCount < 128 * 30) { hits = 50; @@ -79,7 +80,7 @@ void AllRange_GetStarWolfHits(Actor* actor) { } } if (hits != 0) { - BonusText_Display(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, hits); + BonusText_Display(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, hits); } gHitCount += hits; D_ctx_80177850 = 15; @@ -105,49 +106,51 @@ void AllRange_DrawCountdown(void) { } } -void Boss309_Update(Boss* boss) { - OvlI4_CallFunction(OVLCALL_BOSS309_UPDATE, boss); +void Boss309_Update(Boss309* this) { + OvlI4_CallFunction(OVLCALL_BOSS309_UPDATE, this); } -void Boss309_Draw(Boss* boss) { - OvlI4_CallFunction(OVLCALL_BOSS309_DRAW, boss); +void Boss309_Draw(Boss309* this) { + OvlI4_CallFunction(OVLCALL_BOSS309_DRAW, this); } -void Boss310_Update(Boss* boss) { - OvlI4_CallFunction(OVLCALL_BOSS310_UPDATE, boss); +void Boss310_Update(Boss310* this) { + OvlI4_CallFunction(OVLCALL_BOSS310_UPDATE, this); } -void Boss310_Draw(Boss* boss) { - OvlI4_CallFunction(OVLCALL_BOSS310_DRAW, boss); +void Boss310_Draw(Boss310* this) { + OvlI4_CallFunction(OVLCALL_BOSS310_DRAW, this); } -void Actor271_Update(Actor* actor) { - OvlI4_CallFunction(OVLCALL_ACTOR271_UPDATE, actor); +void Actor271_Update(Actor271* this) { + OvlI4_CallFunction(OVLCALL_ACTOR271_UPDATE, this); } -void Actor271_Draw(Actor* actor) { - OvlI4_CallFunction(OVLCALL_ACTOR271_DRAW, actor); +void Actor271_Draw(Actor271* this) { + OvlI4_CallFunction(OVLCALL_ACTOR271_DRAW, this); } -void Actor272_Update(Actor* actor) { - OvlI4_CallFunction(OVLCALL_ACTOR272_UPDATE, actor); +void Actor272_Update(Actor272* this) { + OvlI4_CallFunction(OVLCALL_ACTOR272_UPDATE, this); } -void Actor272_Draw(Actor* actor) { - OvlI4_CallFunction(OVLCALL_ACTOR272_DRAW, actor); +void Actor272_Draw(Actor272* this) { + OvlI4_CallFunction(OVLCALL_ACTOR272_DRAW, this); } void AllRange_GreatFoxRepair(Player* player) { - Vec3f sp6C; - Vec3f sp60; + Vec3f src; + Vec3f dest; gCsFrameCount++; + switch (player->csState) { case 0: player->hitTimer = player->mercyTimer = player->damage = player->barrelRollAlpha = player->boostMeter = player->boostCooldown = player->somersault = gCsFrameCount = 0; player->zRotBarrelRoll = player->camRoll = player->boostSpeed = player->camDist = player->knockback.x = player->knockback.y = player->knockback.z = player->damageShake = player->aerobaticPitch = 0.0f; + gCsCamEyeX = 1673.0f; gCsCamEyeY = 337.0f; if (player->pos.z < 0.0f) { @@ -155,6 +158,7 @@ void AllRange_GreatFoxRepair(Player* player) { } else { gCsCamEyeZ = 480.0f; } + player->rot.y = 0.0f; player->pos.x = 2100.0f; player->baseSpeed = 30.0f; @@ -169,6 +173,7 @@ void AllRange_GreatFoxRepair(Player* player) { player->wings.modelId = 1; player->csState++; break; + case 1: if (gCsFrameCount >= 47) { gFillScreenAlphaTarget = 255; @@ -180,6 +185,7 @@ void AllRange_GreatFoxRepair(Player* player) { player->baseSpeed = 0.0f; } break; + case 2: if (gFillScreenAlpha == 255) { gFillScreenAlphaTarget = 0; @@ -187,12 +193,15 @@ void AllRange_GreatFoxRepair(Player* player) { player->pos.y = -420.0f; player->pos.z = 0.0f; player->rot.z = 0.0f; + gCsCamEyeX = -683.0f; gCsCamEyeY = -346.0f; gCsCamEyeZ = 305.0f; + player->shields = Play_GetMaxShields(); player->wings.rightState = WINGSTATE_INTACT; player->wings.leftState = WINGSTATE_INTACT; + if (gExpertMode) { gRightWingHealth[0] = gLeftWingHealth[0] = 10; } else { @@ -202,6 +211,7 @@ void AllRange_GreatFoxRepair(Player* player) { player->csState++; } break; + case 3: gFillScreenAlphaStep = 32; gCsCamEyeZ -= 1.0f; @@ -210,10 +220,10 @@ void AllRange_GreatFoxRepair(Player* player) { player->yRot_114 = 90.0f; player->baseSpeed = gArwingSpeed; player->csState++; - AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, player->sfxSource, 0); } break; + case 4: gCsCamEyeZ -= 1.0f; gCsCamEyeX -= 1.0f; @@ -235,13 +245,13 @@ void AllRange_GreatFoxRepair(Player* player) { Math_SmoothStepToF(&player->zRotBank, 0.0f, 0.1f, 3.0f, 0); Matrix_RotateY(gCalcMatrix, (player->rot.y + player->yRot_114 + 180.0f) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -(player->rot.x * M_DTOR), MTXF_APPLY); - sp6C.x = 0.0f; - sp6C.y = 0.0f; - sp6C.z = player->baseSpeed; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp6C, &sp60); - player->vel.x = sp60.x; - player->vel.z = sp60.z; - player->vel.y = sp60.y; + src.x = 0.0f; + src.y = 0.0f; + src.z = player->baseSpeed; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + player->vel.x = dest.x; + player->vel.z = dest.z; + player->vel.y = dest.y; player->pos.x += player->vel.x; player->pos.y += player->vel.y; player->pos.z += player->vel.z; @@ -293,16 +303,15 @@ void ActorAllRange_SetShadowData(Actor* this) { Vec3f spA8; f32 spA0[2]; Vec3f sp94 = { 0.0f, -10.0f, 0.0f }; - s32 pad1; - s32 pad2; + s32 pad[2]; this->fwork[25] = this->fwork[26] = this->fwork[28] = this->fwork[27] = 0.0f; if (this->drawShadow && (gLevelMode == LEVELMODE_ALL_RANGE) && (gLevelType == LEVELTYPE_PLANET)) { for (i = 0, scenery360 = gScenery360; i < 200; i++, scenery360++) { if ((scenery360->obj.status == OBJ_ACTIVE) && ((scenery360->obj.id == OBJ_SCENERY_150) || (scenery360->obj.id == OBJ_SCENERY_149) || - (scenery360->obj.id == OBJ_SCENERY_148) || (scenery360->obj.id == OBJ_SCENERY_1) || - (scenery360->obj.id == OBJ_SCENERY_3)) && + (scenery360->obj.id == OBJ_SCENERY_148) || (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_1) || + (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_3)) && (fabsf(scenery360->obj.pos.x - this->obj.pos.x) < 2500.0f) && (fabsf(scenery360->obj.pos.z - this->obj.pos.z) < 2500.0f)) { temp1.x = scenery360->obj.pos.x; @@ -322,6 +331,7 @@ void ActorAllRange_SetShadowData(Actor* this) { spC0.z = temp1.z; // fake? weird ordering spCC.y = spD8.y + temp1.y; spCC.z = spD8.z + temp1.z; + if ((scenery360->obj.id == OBJ_SCENERY_149) || (scenery360->obj.id == OBJ_SCENERY_150)) { if (scenery360->obj.id == OBJ_SCENERY_149) { colId = COL1_5; @@ -336,7 +346,7 @@ void ActorAllRange_SetShadowData(Actor* this) { } } else { colId = COL2_0; - if (scenery360->obj.id == OBJ_SCENERY_3) { + if (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_3) { colId = COL2_3; } if (func_col2_800A3690(&spCC, &spC0, colId, &spB4)) { @@ -358,22 +368,24 @@ static Vec3f sTeamSpawnPos[4] = { { 300.0f, 900.0f, 7200.0f }, }; static AllRangeAi sTeamAi[4] = { AI360_FOX, AI360_FALCO, AI360_SLIPPY, AI360_PEPPY }; -static s32 sTeamSpawnTargets[4] = { -1, AI360_10, AI360_10 + 1, AI360_10 + 2 }; -static s32 sTeamSpawnTargetsKA[4] = { -1, AI360_10 + 11, AI360_10 + 13, AI360_10 + 15 }; +static s32 sTeamSpawnTargets[4] = { -1, AI360_ENEMY, AI360_ENEMY + 1, AI360_ENEMY + 2 }; +static s32 sTeamSpawnTargetsKA[4] = { -1, AI360_ENEMY + 11, AI360_ENEMY + 13, AI360_ENEMY + 15 }; void ActorAllRange_SpawnTeam(void) { - Actor* actor; + ActorAllRange* actor; s32 i; s32 temp = 4; - for (i = 0, actor = gActors; i < temp; i++, actor++) { + for (i = 0, actor = &gActors[0]; i < temp; i++, actor++) { if ((i > 0) && (gTeamShields[i] <= 0)) { continue; } + Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; actor->obj.id = OBJ_ACTOR_ALLRANGE; Object_SetInfo(&actor->info, actor->obj.id); + if (i == 0) { actor->aiType = AI360_EVENT_HANDLER; } else { @@ -381,21 +393,28 @@ void ActorAllRange_SpawnTeam(void) { actor->obj.pos.y = sTeamSpawnPos[i].y; actor->obj.pos.z = sTeamSpawnPos[i].z; actor->aiType = sTeamAi[i]; + if (gCurrentLevel == LEVEL_KATINA) { actor->aiIndex = sTeamSpawnTargetsKA[i]; } else { actor->aiIndex = sTeamSpawnTargets[i]; } + actor->state = STATE360_2; actor->rot_0F4.y = 180.0f; + if (actor->aiIndex <= -1) { actor->state = STATE360_3; } + actor->health = 50; + if ((gLevelType == LEVELTYPE_PLANET) || (gCurrentLevel == LEVEL_BOLSE)) { actor->drawShadow = true; } + actor->iwork[11] = 1; + if (actor->aiType <= AI360_PEPPY) { AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); actor->info.hitbox = SEGMENTED_TO_VIRTUAL(gTeamHitbox); @@ -419,7 +438,7 @@ static f32 sStarWolfVE2SpawnRot[4] = { 330.0f, 90.0f, 280.0f, 70.0f }; s32 gAllRangeSpawnEvent = 96 * 30; void ActorAllRange_SpawnStarWolf(void) { - Actor* actor; + ActorAllRange* actor; s32 i; for (i = 0, actor = &gActors[4]; i < ARRAY_COUNT(sStarWolfSpawnPos); i++, actor++) { @@ -440,11 +459,14 @@ void ActorAllRange_SpawnStarWolf(void) { actor->timer_0BC = 250; actor->rot_0F4.x = -20.0f; actor->iwork[11] = 1; + if (gCurrentLevel == LEVEL_VENOM_2) { actor->obj.rot.z = sStarWolfVE2SpawnRot[i]; actor->itemDrop = DROP_SILVER_STAR; } + Object_SetInfo(&actor->info, actor->obj.id); + if (gCurrentLevel == LEVEL_VENOM_2) { AUDIO_PLAY_SFX(NA_SE_EN_WOLF_ENGINE2, actor->sfxSource, 4); } else { @@ -467,8 +489,8 @@ void ActorAllRange_StarWolfDefeatMesg(u16* msg, RadioCharacterId character) { ActorAllRange_PlayMessage(msg, character); } -void ActorAllRange_UpdateStarWolfEvents(Actor* this) { - Actor* actor; +void ActorAllRange_UpdateStarWolfEvents(ActorAllRange* this) { + ActorAllRange* actor; s32 i; if (sStarWolfKillTimer != 0) { @@ -503,6 +525,7 @@ void ActorAllRange_UpdateStarWolfEvents(Actor* this) { gPlayer[0].cam.at.y = gActors[AI360_WOLF].obj.pos.y; gPlayer[0].cam.at.z = gActors[AI360_WOLF].obj.pos.z; } + if ((gAllRangeEventTimer > gAllRangeSpawnEvent) && (gStarWolfMsgTimer == 0)) { gAllRangeFrameCount++; for (i = AI360_FALCO, actor = &gActors[AI360_FALCO]; i <= AI360_ANDREW; i++, actor++) { @@ -512,10 +535,12 @@ void ActorAllRange_UpdateStarWolfEvents(Actor* this) { gActors[actor->aiIndex].iwork[2] = AI360_FOX; gActors[actor->aiIndex].state = STATE360_2; gActors[actor->aiIndex].aiIndex = actor->aiType; + if (gTeamHelpActor == &gActors[actor->aiIndex]) { gTeamHelpActor = NULL; gTeamHelpTimer = 0; } + if (gActors[actor->aiIndex].iwork[3] == 0) { switch (gActors[actor->aiIndex].aiType) { case AI360_FALCO: @@ -531,6 +556,7 @@ void ActorAllRange_UpdateStarWolfEvents(Actor* this) { gActors[actor->aiIndex].iwork[3] = 200; } } + if (actor->aiType == AI360_WOLF) { if (gCurrentLevel != LEVEL_VENOM_2) { actor->state = STATE360_3; @@ -542,6 +568,7 @@ void ActorAllRange_UpdateStarWolfEvents(Actor* this) { } } } + if (gTeamShields[TEAM_ID_FALCO] <= 0) { gActors[AI360_LEON].aiIndex = AI360_FOX; } @@ -554,47 +581,48 @@ void ActorAllRange_UpdateStarWolfEvents(Actor* this) { } } -void ActorAllRange_ChooseNewTarget(Actor* actor) { - Actor* team; - Actor* enemy; - s32 alreadyTaken; - s32 teamId; - s32 enemyId; +void ActorAllRange_ChooseNewTarget(ActorAllRange* this) { + ActorAllRange* team; + ActorAllRange* enemy; + bool alreadyTaken; + TeamId teamId; + AllRangeAi enemyId; - for (enemyId = AI360_10, enemy = &gActors[AI360_10]; enemyId < ARRAY_COUNT(gActors); enemyId++, enemy++) { + for (enemyId = AI360_ENEMY, enemy = &gActors[AI360_ENEMY]; enemyId < ARRAY_COUNT(gActors); enemyId++, enemy++) { if ((enemy->obj.status == OBJ_ACTIVE) && (enemy->obj.id == OBJ_ACTOR_ALLRANGE) && (enemy->animFrame == 0) && (enemy->aiIndex <= -1)) { alreadyTaken = false; for (teamId = AI360_FALCO, team = &gActors[AI360_FALCO]; teamId <= AI360_PEPPY; teamId++, team++) { - if ((teamId != actor->index) && (enemyId == team->aiIndex)) { + if ((teamId != this->index) && (enemyId == team->aiIndex)) { alreadyTaken = true; } } if (!alreadyTaken) { - actor->aiIndex = enemyId; - actor->state = STATE360_2; - actor->iwork[2] = AI360_FOX; + this->aiIndex = enemyId; + this->state = STATE360_2; + this->iwork[2] = AI360_FOX; break; } } } } -void ActorAllRange_UpdateEvemyEvents(Actor* this) { - Actor* enemy; +void ActorAllRange_UpdateEnemyEvents(Actor* this) { + ActorAllRange* enemy; s32 i; - for (i = 0, enemy = &gActors[AI360_10]; i < 50; i++, enemy++) { + for (i = 0, enemy = &gActors[AI360_ENEMY]; i < 50; i++, enemy++) { if ((enemy->obj.status == OBJ_DYING) && (enemy->aiIndex >= AI360_FALCO) && (enemy->aiIndex <= AI360_PEPPY)) { - Actor* enemy2; + ActorAllRange* enemy2; s32 j; - for (j = 0, enemy2 = &gActors[AI360_10]; j <= 50; j++, enemy2++) { // bug? should be < + for (j = 0, enemy2 = &gActors[AI360_ENEMY]; j <= 50; j++, enemy2++) { // bug? should be < if ((enemy2->obj.status == OBJ_ACTIVE) && (enemy2->state == STATE360_2) && (enemy2->aiIndex == enemy->aiIndex)) { return; } } + if (gTeamShields[enemy->aiIndex] > 0) { ActorAllRange_ChooseNewTarget(&gActors[enemy->aiIndex]); if ((enemy->iwork[5] != 0) && (enemy->dmgSource == AI360_FOX + 1) && @@ -635,7 +663,7 @@ bool AllRange_SupplyEvent(void) { } void ActorAllRange_SpawnSupplies(Actor* this) { - Actor* supplies; + ActorSupplies* supplies; s32 i; if ((gCallTimer != 0) && (gControllerPress[gMainController].button & R_CBUTTONS)) { @@ -645,6 +673,7 @@ void ActorAllRange_SpawnSupplies(Actor* this) { Radio_PlayMessage(gMsg_ID_20230, RCID_ROB64); gAllRangeSupplyTimer = 160; } + if (gAllRangeSupplyTimer != 0) { gAllRangeSupplyTimer--; if (gAllRangeSupplyTimer == 0) { @@ -671,6 +700,7 @@ void ActorAllRange_SpawnSupplies(Actor* this) { } } } + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && !gAllRangeSuppliesSent) { if (gAllRangeWingRepairTimer != 0) { gAllRangeWingRepairTimer--; @@ -687,7 +717,9 @@ void ActorAllRange_UpdateEvents(Actor* this) { Object_Kill(&this->obj, this->sfxSource); return; } + gAllRangeEventTimer++; + switch (gCurrentLevel) { case LEVEL_FORTUNA: Fortuna_UpdateEvents(this); @@ -719,10 +751,13 @@ s32 func_360_800301F4(Actor* this) { if (gLevelMode == LEVELMODE_ON_RAILS) { return 0; } + sinY = SIN_DEG(this->obj.rot.y); cosY = COS_DEG(this->obj.rot.y); + temp_ft4 = this->fwork[9] * 10.0f + (sinY * 650.0f); temp_ft5 = this->fwork[9] * 10.0f + (cosY * 650.0f); + for (i = 0; i < 200; i++) { if ((gScenery360[i].obj.status == OBJ_ACTIVE) && (fabsf(gScenery360[i].obj.pos.x - (this->obj.pos.x + temp_ft4)) < 1000.0f) && @@ -736,6 +771,7 @@ s32 func_360_800301F4(Actor* this) { } } } + boss = &gBosses[0]; if ((gCurrentLevel == LEVEL_SECTOR_Z) && (fabsf(boss->obj.pos.x - (this->obj.pos.x + temp_ft4)) < 2000.0f) && (fabsf(boss->obj.pos.z - (this->obj.pos.z + temp_ft5)) < 2000.0f)) { @@ -750,7 +786,7 @@ s32 func_360_800301F4(Actor* this) { return 0; } -s32 func_360_8003049C(Actor* this) { +s32 func_360_8003049C(ActorAllRange* this) { Scenery360* scenery360; s32 i; f32 sp44; @@ -765,13 +801,17 @@ s32 func_360_8003049C(Actor* this) { if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) { return 0; } + if ((gLevelType == LEVELTYPE_SPACE) && (gCurrentLevel != LEVEL_BOLSE)) { return func_360_800301F4(this); } + sp40 = SIN_DEG(this->obj.rot.y); sp3C = COS_DEG(this->obj.rot.y); + temp_fa0 = this->fwork[9] * 10.0f + (sp40 * 650.0f); temp_ft4 = this->fwork[9] * 10.0f + (sp3C * 650.0f); + if (gLevelMode == LEVELMODE_ALL_RANGE) { for (i = 0, scenery360 = gScenery360; i < 200; i++, scenery360++) { if ((scenery360->obj.status == OBJ_ACTIVE) && @@ -781,13 +821,15 @@ s32 func_360_8003049C(Actor* this) { } } } + sp44 = 1200.0f; var_ft5 = 650.0f; + if (this->aiType < AI360_KATT) { var_ft5 = 720.0f; } - if (boss->obj.id == OBJ_BOSS_293) { + if (boss->obj.id == OBJ_BOSS_CO_CARRIER) { var_ft5 = 350.0f; } else if (boss->obj.id == OBJ_BOSS_309) { sp44 = 2000.0f; @@ -796,43 +838,50 @@ s32 func_360_8003049C(Actor* this) { sp44 = 1500.0f; var_ft5 = 700.0f; } + if ((fabsf(boss->obj.pos.x - (this->obj.pos.x + temp_fa0)) < sp44) && (fabsf(boss->obj.pos.z - (this->obj.pos.z + temp_ft4)) < sp44) && (fabsf(boss->obj.pos.y - this->obj.pos.y) < var_ft5)) { return 1; + } else { + return 0; } - return 0; } -void ActorAllRange_ApplyDamage(Actor* this) { - s32 var_a1; - Vec3f sp48; - Vec3f sp3C; +void ActorAllRange_ApplyDamage(ActorAllRange* this) { + bool var_a1; + Vec3f src; + Vec3f dest; if (this->dmgType != DMG_NONE) { if (this->aiType == AI360_GREAT_FOX) { this->dmgType = DMG_NONE; } + if ((this->dmgType >= DMG_EXPLOSION) && (this->aiType >= AI360_WOLF) && (this->aiType <= AI360_ANDREW)) { this->damage = 10; this->timer_0C2 = 10; } + if (((this->aiType <= AI360_PEPPY) || (this->aiType == AI360_BILL) || (this->aiType == AI360_KATT)) && (this->dmgType == DMG_EXPLOSION)) { this->dmgType = DMG_NONE; } + if ((this->dmgType == DMG_EXPLOSION) && (this->fwork[22] > 0.0f)) { this->dmgType = DMG_NONE; } + if (this->fwork[23] > 1.0f) { this->dmgType = DMG_NONE; } + if (this->dmgType != DMG_NONE) { var_a1 = false; if ((this->animFrame == 3) || ((gCurrentLevel == LEVEL_BOLSE) && (gBosses[1].obj.status != OBJ_FREE) && (this->aiType >= AI360_WOLF)) || - ((gCurrentLevel == LEVEL_VENOM_2) && (this->aiType >= AI360_WOLF) && (this->aiType < AI360_10) && + ((gCurrentLevel == LEVEL_VENOM_2) && (this->aiType >= AI360_WOLF) && (this->aiType < AI360_ENEMY) && (this->dmgType == DMG_EXPLOSION))) { this->damage = DMG_NONE; var_a1 = true; @@ -840,6 +889,7 @@ void ActorAllRange_ApplyDamage(Actor* this) { this->dmgSource = 0; } } + if (this->aiType >= AI360_WOLF) { if (!((this->dmgType == DMG_COLLISION) && (this->aiType == AI360_WOLF)) && !((this->aiType == AI360_MISSILE) && (this->dmgType == DMG_EXPLOSION))) { @@ -852,10 +902,11 @@ void ActorAllRange_ApplyDamage(Actor* this) { gTeamDamage[this->aiType] = this->damage * 2; } } + if (this->health <= 0) { this->health = 0; if (this->aiType == AI360_MISSILE) { - SectorZ_80199900(this, 1); + SectorZ_MissileExplode(this, true); if (this->dmgSource == AI360_FOX + 1) { if (gActors[AI360_KATT].obj.status == OBJ_ACTIVE) { Radio_PlayMessage(gMsg_ID_16140, RCID_KATT); @@ -881,15 +932,19 @@ void ActorAllRange_ApplyDamage(Actor* this) { } return; } + this->timer_0C6 = 50; this->iwork[8] = 20; this->obj.status = OBJ_DYING; this->fwork[23] = 0.0f; + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 4.0f); AUDIO_PLAY_SFX(NA_SE_EN_CRASH_DOWN, this->sfxSource, 4); + this->timer_0C2 = 10; this->timer_0BE = 0; this->timer_04C = RAND_INT(2.9f); + switch (RAND_INT(4.0f)) { case 0: this->timer_0BC = 0; @@ -904,9 +959,11 @@ void ActorAllRange_ApplyDamage(Actor* this) { this->timer_0BC = 300; break; } + if (gCurrentLevel == LEVEL_VENOM_ANDROSS) { this->timer_0BC = 70; } + if ((gLevelType == LEVELTYPE_SPACE) && (gCurrentLevel != LEVEL_BOLSE)) { if (Rand_ZeroOne() < 0.5f) { this->timer_0BC = 10; @@ -914,18 +971,22 @@ void ActorAllRange_ApplyDamage(Actor* this) { this->timer_0BC = RAND_INT(50.0f); } } + if ((this->aiType >= AI360_WOLF) && (this->aiType <= AI360_ANDREW)) { this->timer_0BC = RAND_INT(40.0f) + 60.0f; } + if (this->damage >= 20) { this->timer_0BC = 0; } + if ((gCurrentLevel == LEVEL_KATINA) && (this->animFrame == 1) && (this->dmgSource == AI360_FOX + 1)) { if (gKaAllyKillCount < 2) { ActorAllRange_PlayMessage(gMsg_ID_18018, RCID_BILL); } gKaAllyKillCount++; } + switch (this->aiType) { case AI360_WOLF: gStarWolfTeamAlive[0] = 0; @@ -935,6 +996,7 @@ void ActorAllRange_ApplyDamage(Actor* this) { ActorAllRange_StarWolfDefeatMesg(gMsg_ID_9365, RCID_WOLF); } break; + case AI360_LEON: gStarWolfTeamAlive[1] = 0; if (gCurrentLevel == LEVEL_VENOM_2) { @@ -943,6 +1005,7 @@ void ActorAllRange_ApplyDamage(Actor* this) { ActorAllRange_StarWolfDefeatMesg(gMsg_ID_9366, RCID_LEON); } break; + case AI360_PIGMA: gStarWolfTeamAlive[2] = 0; if (gCurrentLevel == LEVEL_VENOM_2) { @@ -951,6 +1014,7 @@ void ActorAllRange_ApplyDamage(Actor* this) { ActorAllRange_StarWolfDefeatMesg(gMsg_ID_9367, RCID_PIGMA); } break; + case AI360_ANDREW: gStarWolfTeamAlive[3] = 0; if (gCurrentLevel == LEVEL_VENOM_2) { @@ -960,12 +1024,14 @@ void ActorAllRange_ApplyDamage(Actor* this) { } break; } + if ((this->aiType >= AI360_WOLF) && (this->aiType <= AI360_ANDREW)) { sStarWolfKillTimer = 150; } + switch (this->dmgSource) { case AI360_FOX + 1: - if (this->aiType >= AI360_10) { + if (this->aiType >= AI360_ENEMY) { switch (this->iwork[2]) { case AI360_FALCO: ActorAllRange_PlayMessage(gMsg_ID_20170, RCID_FALCO); @@ -979,6 +1045,7 @@ void ActorAllRange_ApplyDamage(Actor* this) { } } break; + case AI360_FALCO + NPC_SHOT_ID + 1: case AI360_SLIPPY + NPC_SHOT_ID + 1: case AI360_PEPPY + NPC_SHOT_ID + 1: @@ -1021,33 +1088,37 @@ void ActorAllRange_ApplyDamage(Actor* this) { this->timer_0C6 = 20; this->iwork[8] = 20; } + if (this->aiType == AI360_MISSILE) { AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, this->sfxSource, 4); } else if (this->iwork[7] == 0) { AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, this->sfxSource, 4); } + func_effect_8007D10C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1.5f); + if (this->aiType < AI360_GREAT_FOX) { Matrix_RotateY(gCalcMatrix, this->rot_0F4.y * M_DTOR, MTXF_NEW); - sp48.x = 30.0f; + src.x = 30.0f; if (Rand_ZeroOne() < 0.5f) { - sp48.x = -30.0f; + src.x = -30.0f; } - sp48.y = RAND_FLOAT_CENTERED(30.0f); - sp48.z = 0.0f; + src.y = RAND_FLOAT_CENTERED(30.0f); + src.z = 0.0f; if (this->iwork[7] != 0) { - sp48.x *= 1.5f; - sp48.y = 30.0f; + src.x *= 1.5f; + src.y = 30.0f; if ((this->obj.pos.y > 100.0f) && (Rand_ZeroOne() < 0.5f)) { - sp48.y = -30.0f; + src.y = -30.0f; } } - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp48, &sp3C); - this->fwork[13] = sp3C.x; - this->fwork[14] = sp3C.y; - this->fwork[12] = sp3C.z; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + this->fwork[13] = dest.x; + this->fwork[14] = dest.y; + this->fwork[12] = dest.z; } + if ((gRadioState == 0) && (gActors[0].obj.status == OBJ_ACTIVE)) { if (this->dmgType == DMG_COLLISION) { switch (this->aiType) { @@ -1118,6 +1189,7 @@ void ActorAllRange_ApplyDamage(Actor* this) { gTeamHelpTimer = 320; } break; + case AI360_SLIPPY: if (gTeamShields[TEAM_ID_SLIPPY] >= 90) { ActorAllRange_PlayMessage(gMsg_ID_9140, RCID_SLIPPY); @@ -1129,12 +1201,14 @@ void ActorAllRange_ApplyDamage(Actor* this) { gTeamHelpTimer = 320; } break; + case AI360_PEPPY: if (gTeamShields[TEAM_ID_PEPPY] >= 90) { ActorAllRange_PlayMessage(gMsg_ID_9150, RCID_PEPPY); } else { Radio_PlayMessage(gMsg_ID_9153, RCID_PEPPY); } + if ((gTeamHelpActor == NULL) || (gTeamShields[this->aiType] <= 50)) { gTeamHelpActor = this; gTeamHelpTimer = 320; @@ -1149,27 +1223,30 @@ void ActorAllRange_ApplyDamage(Actor* this) { } } -void ActorAllRange_CheckPlayerNearby(Actor* actor) { - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (actor->iwork[24] != 0) && - (fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 1000.0f) && - (fabsf(actor->obj.pos.y - gPlayer[0].pos.y) < 1000.0f) && - (fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 1000.0f)) { - actor->iwork[10]++; +void ActorAllRange_CheckPlayerNearby(ActorAllRange* this) { + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (this->iwork[24] != 0) && + (fabsf(this->obj.pos.x - gPlayer[0].pos.x) < 1000.0f) && + (fabsf(this->obj.pos.y - gPlayer[0].pos.y) < 1000.0f) && + (fabsf(this->obj.pos.z - gPlayer[0].trueZpos) < 1000.0f)) { + this->iwork[10]++; } else { - actor->iwork[10] = 0; + this->iwork[10] = 0; } } -bool func_360_80031900(Actor* actor) { - Vec3f sp24; - Vec3f sp18; +bool func_360_80031900(ActorAllRange* this) { + Vec3f src; + Vec3f dest; - Matrix_RotateY(gCalcMatrix, -actor->obj.rot.y * M_DTOR, MTXF_NEW); - sp24.x = actor->fwork[4] - actor->obj.pos.x; - sp24.y = 0.0f; - sp24.z = actor->fwork[6] - actor->obj.pos.z; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp24, &sp18); - if (sp18.z > 0.0f) { + Matrix_RotateY(gCalcMatrix, -this->obj.rot.y * M_DTOR, MTXF_NEW); + + src.x = this->fwork[4] - this->obj.pos.x; + src.y = 0.0f; + src.z = this->fwork[6] - this->obj.pos.z; + + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + + if (dest.z > 0.0f) { return true; } else { return false; @@ -1181,7 +1258,7 @@ static Vec3f sSectorZRetreatPath[6] = { { -500.0f, 250.0f, 0.0f }, { 0.0f, 250.0f, 0.0f }, { 0.0f, 250.0f, 0.0f }, }; -void ActorAllRange_Update(Actor* this) { +void ActorAllRange_Update(ActorAllRange* this) { u8 sp10F; s32 sp108; s32 sp104; @@ -1210,9 +1287,7 @@ void ActorAllRange_Update(Actor* this) { Vec3f sp90; Vec3f sp84 = { 60.0f, 0.0f, -170.0f }; Vec3f sp78 = { -60.0f, 0.0f, -170.0f }; - s32 pad1; - s32 pad2; - s32 pad3; + s32 pad[3]; if (this->aiType == AI360_EVENT_HANDLER) { this->timer_0C2 = 10; @@ -1220,6 +1295,7 @@ void ActorAllRange_Update(Actor* this) { ActorAllRange_UpdateEvents(this); return; } + if ((this->iwork[17] != 0) && (this->iwork[16] == STATE360_0) && (this->aiType >= AI360_WOLF)) { switch (RAND_INT(3.9f)) { case 0: @@ -1228,23 +1304,28 @@ void ActorAllRange_Update(Actor* this) { this->iwork[16] = STATE360_10; } break; + case 2: this->iwork[16] = STATE360_8; break; + case 3: this->iwork[16] = STATE360_7; break; } + this->iwork[17] = 0; if (this->iwork[18] != 0) { this->iwork[18]--; this->iwork[16] = STATE360_0; } } - if ((this->lockOnTimers[TEAM_ID_FOX] != 0) && (gCurrentLevel != LEVEL_VENOM_2) && (this->aiType < AI360_10) && + + if ((this->lockOnTimers[TEAM_ID_FOX] != 0) && (gCurrentLevel != LEVEL_VENOM_2) && (this->aiType < AI360_ENEMY) && (this->lockOnTimers[TEAM_ID_FOX] < 5) && ((gGameFrameCount % 32) == 0)) { this->iwork[16] = STATE360_10; } + if ((this->iwork[16] != STATE360_0) && (this->state < STATE360_7)) { this->state = this->iwork[16]; switch (this->state) { @@ -1255,6 +1336,7 @@ void ActorAllRange_Update(Actor* this) { } this->unk_046 = 0; break; + case STATE360_9: this->timer_0BC = RAND_INT(20.0f) + 30; if (Rand_ZeroOne() < 0.5f) { @@ -1269,6 +1351,7 @@ void ActorAllRange_Update(Actor* this) { this->fwork[19] += 360.0f; } break; + case STATE360_10: this->timer_0BC = 35; if (Rand_ZeroOne() < 0.5f) { @@ -1284,23 +1367,29 @@ void ActorAllRange_Update(Actor* this) { break; } } + this->iwork[16] = STATE360_0; spCC = spC8 = spC4 = 0.0f; + if (this->iwork[7] != 0) { this->iwork[7]--; this->fwork[22] = 1.0f; } + if (this->iwork[3] != 0) { this->iwork[3]--; } + Math_SmoothStepToF(&this->fwork[10], 0.0f, 0.1f, 0.2f, 0.00001f); Math_SmoothStepToF(&this->fwork[9], this->fwork[10], 0.1f, 2.0f, 0.00001f); + if (this->fwork[10] > 0.1f) { this->iwork[11] = 2; } else { this->iwork[11] = 1; } - if (this->aiType < AI360_10) { + + if (this->aiType < AI360_ENEMY) { ActorAllRange_CheckPlayerNearby(this); if (this->iwork[10] == 200) { switch (this->aiType) { @@ -1310,6 +1399,7 @@ void ActorAllRange_Update(Actor* this) { case AI360_ANDREW: case AI360_KATT: break; + case AI360_FALCO: if (gPlayer[0].shields < (Play_GetMaxShields() / 2)) { Radio_PlayMessage(gMsg_ID_20298, RCID_FALCO); @@ -1319,6 +1409,7 @@ void ActorAllRange_Update(Actor* this) { Radio_PlayMessage(gMsg_ID_20301, RCID_FALCO); } break; + case AI360_SLIPPY: if (gPlayer[0].shields < (Play_GetMaxShields() / 2)) { Radio_PlayMessage(gMsg_ID_20297, RCID_SLIPPY); @@ -1328,6 +1419,7 @@ void ActorAllRange_Update(Actor* this) { Radio_PlayMessage(gMsg_ID_20300, RCID_SLIPPY); } break; + case AI360_PEPPY: if (gPlayer[0].shields < (Play_GetMaxShields() / 2)) { Radio_PlayMessage(gMsg_ID_20296, RCID_PEPPY); @@ -1337,14 +1429,17 @@ void ActorAllRange_Update(Actor* this) { Radio_PlayMessage(gMsg_ID_20299, RCID_PEPPY); } break; + case AI360_BILL: Radio_PlayMessage(gMsg_ID_18120, RCID_BILL); break; } } } + sp104 = 0; this->iwork[5] = 0; + if ((this->aiType >= AI360_FALCO) && (this->aiType <= AI360_PEPPY) && (gTeamShields[this->aiType] <= 0) && (this->state != STATE360_6)) { this->state = STATE360_6; @@ -1372,6 +1467,7 @@ void ActorAllRange_Update(Actor* this) { this->iwork[1] = 0; this->timer_0C2 = 10000; } + switch (this->state) { case STATE360_6: this->timer_0C2 = 10000; @@ -1399,17 +1495,21 @@ void ActorAllRange_Update(Actor* this) { } sp104 = 2; break; + case STATE360_5: SectorZ_Missile_Update(this); sp104 = 1; break; + case STATE360_0: if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_START_360) { this->fwork[0] = this->fwork[1] = 40.0f; + if (gActors[0].state == STATE360_5) { Math_SmoothStepToF(&this->rot_0F4.x, 30.0f, 0.1f, 0.5f, 0.0f); this->fwork[1] = 200.0f; } + if (this->timer_0BC == 0) { if (this->aiType == AI360_WOLF) { this->state = STATE360_3; @@ -1429,11 +1529,14 @@ void ActorAllRange_Update(Actor* this) { Math_SmoothStepToAngle(&this->obj.rot.z, 0.0f, 0.03f, 0.5f, 0.0f); } break; + case STATE360_1: this->fwork[1] = 40.0f; + if ((this->timer_0BC < 35) && (gCurrentLevel == LEVEL_FORTUNA)) { Math_SmoothStepToF(&this->rot_0F4.x, 15.0f, 0.1f, 1.0f, 0.0f); } + if (this->timer_0BC == 0) { this->state = STATE360_3; if ((gCurrentLevel == LEVEL_BOLSE) && (this->aiIndex > -1)) { @@ -1441,6 +1544,7 @@ void ActorAllRange_Update(Actor* this) { } } break; + case STATE360_2: sp104 = 1; spF8 = 800.0f; @@ -1449,14 +1553,17 @@ void ActorAllRange_Update(Actor* this) { spEC = fabsf(this->fwork[4] - this->obj.pos.x); spE8 = fabsf(this->fwork[6] - this->obj.pos.z); sp10F = 0xB; + if (this->aiType == AI360_FALCO) { spF0 = 0.5f; } else if ((this->animFrame != 2) && (this->animFrame == 3)) { spF0 = 0.5f; } + if (this->aiIndex == AI360_FOX) { spF0 = 0.2f; } + if (this->aiIndex <= -1) { this->state = STATE360_3; } else { @@ -1465,6 +1572,7 @@ void ActorAllRange_Update(Actor* this) { spF4 = spF8 = 3000.0f; this->fwork[3] = 2.0f; } + if (this->aiIndex == AI360_FOX) { if (gCurrentLevel != LEVEL_VENOM_2) { if ((gPlayer[0].somersault && (this->iwork[4] > 10)) || @@ -1481,18 +1589,21 @@ void ActorAllRange_Update(Actor* this) { break; } } + if ((this->aiType >= AI360_WOLF) && (this->aiType != AI360_KATT) && !((gCurrentLevel == LEVEL_VENOM_2) && (this->aiType == AI360_WOLF))) { spCC = SIN_DEG((this->index * 45) + gGameFrameCount) * 100.0f; spC8 = COS_DEG((this->index * 45) + (gGameFrameCount * 2)) * 100.0f; spC4 = SIN_DEG((this->index * 45) + gGameFrameCount) * 100.0f; } + if (!gPlayer[0].somersault) { this->fwork[4] = gPlayer[0].pos.x + spCC; this->fwork[5] = gPlayer[0].pos.y + spC8; this->fwork[6] = gPlayer[0].trueZpos + spC4; this->fwork[1] = gPlayer[0].baseSpeed + 10.0f; } + if ((gActors[0].state == STATE360_6) && (this->aiType <= AI360_PEPPY)) { this->fwork[3] = 3.0f; this->fwork[1] = gPlayer[0].baseSpeed - 5.0f; @@ -1503,8 +1614,10 @@ void ActorAllRange_Update(Actor* this) { } else { this->fwork[3] = 1.2f; } + spF4 = 2000.0f; spF8 = 700.0f; + if (gCurrentLevel == LEVEL_VENOM_2) { spF0 = 0.5f; sp10F = 3; @@ -1512,18 +1625,20 @@ void ActorAllRange_Update(Actor* this) { spF0 = 0.7f; } } else if (this->aiIndex != AI360_GREAT_FOX) { - if (this->aiType >= AI360_10) { + if (this->aiType >= AI360_ENEMY) { spCC = SIN_DEG((this->index * 45) + gGameFrameCount) * 200.0f; spC8 = COS_DEG((this->index * 45) + (gGameFrameCount * 2)) * 200.0f; spC4 = SIN_DEG((this->index * 45) + gGameFrameCount) * 200.0f; } + this->fwork[4] = gActors[this->aiIndex].obj.pos.x + spCC; this->fwork[5] = gActors[this->aiIndex].obj.pos.y + spC8; this->fwork[6] = gActors[this->aiIndex].obj.pos.z + spC4; + if ((gCurrentLevel == LEVEL_VENOM_2) && (this->aiType >= AI360_WOLF)) { this->fwork[1] = 55.0f; this->fwork[3] = 1.6f; - } else if ((gCurrentLevel == LEVEL_FORTUNA) && (this->aiType > AI360_10)) { + } else if ((gCurrentLevel == LEVEL_FORTUNA) && (this->aiType > AI360_ENEMY)) { this->fwork[3] = 1.4f; this->fwork[1] = 50.0f; } else { @@ -1539,6 +1654,7 @@ void ActorAllRange_Update(Actor* this) { this->fwork[6] = gBosses[0].obj.pos.z; this->fwork[1] = 40.0f; } + if ((this->aiIndex > -1) && (this->aiIndex != AI360_GREAT_FOX) && (gActors[0].state != STATE360_6)) { if (spE8 < spF8) { if (spEC < spF8) { @@ -1557,6 +1673,7 @@ void ActorAllRange_Update(Actor* this) { this->timer_0C0 = RAND_INT(200.0f) + 200; this->fwork[10] = 20.0f; } + if ((spE8 < spF4) && (spEC < spF4)) { this->iwork[4]++; this->iwork[5] = 1; @@ -1590,6 +1707,7 @@ void ActorAllRange_Update(Actor* this) { this->iwork[0] = 1; } } + if ((gRadioState == 0) && (this->timer_0C4 == 0) && (gAllRangeEventTimer > 700) && (gStarWolfMsgTimer == 0) && (gActors[0].obj.status == OBJ_ACTIVE)) { this->timer_0C4 = 600; @@ -1610,6 +1728,7 @@ void ActorAllRange_Update(Actor* this) { gTeamHelpTimer = 320; } break; + case AI360_SLIPPY: if ((gCurrentLevel == LEVEL_VENOM_2) && (Rand_ZeroOne() < 0.5f)) { ActorAllRange_PlayMessage(gMsg_ID_19463, RCID_SLIPPY); @@ -1624,6 +1743,7 @@ void ActorAllRange_Update(Actor* this) { gTeamHelpTimer = 320; } break; + case AI360_PEPPY: if ((gCurrentLevel == LEVEL_VENOM_2) && (Rand_ZeroOne() < 0.5f)) { ActorAllRange_PlayMessage(gMsg_ID_19464, RCID_PEPPY); @@ -1638,21 +1758,25 @@ void ActorAllRange_Update(Actor* this) { gTeamHelpTimer = 320; } break; + case AI360_WOLF: if (gStarWolfTeamAlive[0] != 0) { ActorAllRange_PlayMessage(gMsg_ID_9330, RCID_WOLF); } break; + case AI360_LEON: if (gStarWolfTeamAlive[1] != 0) { ActorAllRange_PlayMessage(gMsg_ID_9340, RCID_LEON); } break; + case AI360_PIGMA: if (gStarWolfTeamAlive[2] != 0) { ActorAllRange_PlayMessage(gMsg_ID_9350, RCID_PIGMA); } break; + case AI360_ANDREW: if (gStarWolfTeamAlive[3] != 0) { ActorAllRange_PlayMessage(gMsg_ID_9360, RCID_ANDREW); @@ -1669,6 +1793,7 @@ void ActorAllRange_Update(Actor* this) { } gActors[this->aiIndex].iwork[2] = AI360_FALCO; break; + case AI360_SLIPPY: if ((gCurrentLevel == LEVEL_FORTUNA) && (Rand_ZeroOne() < 0.5f)) { ActorAllRange_PlayMessage(gMsg_ID_9212, RCID_SLIPPY); @@ -1677,6 +1802,7 @@ void ActorAllRange_Update(Actor* this) { } gActors[this->aiIndex].iwork[2] = AI360_SLIPPY; break; + case AI360_PEPPY: if ((gCurrentLevel == LEVEL_FORTUNA) && (Rand_ZeroOne() < 0.5f)) { ActorAllRange_PlayMessage(gMsg_ID_9213, RCID_PEPPY); @@ -1685,6 +1811,7 @@ void ActorAllRange_Update(Actor* this) { } gActors[this->aiIndex].iwork[2] = AI360_PEPPY; break; + case AI360_WOLF: if (gCurrentLevel != LEVEL_VENOM_2) { if (this->iwork[6] == 0) { @@ -1702,6 +1829,7 @@ void ActorAllRange_Update(Actor* this) { } } break; + case AI360_LEON: if (gCurrentLevel == LEVEL_VENOM_2) { if ((Rand_ZeroOne() < 0.5f) && (this->aiIndex == AI360_FALCO)) { @@ -1715,6 +1843,7 @@ void ActorAllRange_Update(Actor* this) { ActorAllRange_PlayMessage(gMsg_ID_9300, RCID_LEON); } break; + case AI360_PIGMA: if (gCurrentLevel == LEVEL_VENOM_2) { if ((Rand_ZeroOne() < 0.5f) && (this->aiIndex == AI360_PEPPY)) { @@ -1728,6 +1857,7 @@ void ActorAllRange_Update(Actor* this) { ActorAllRange_PlayMessage(gMsg_ID_9310, RCID_PIGMA); } break; + case AI360_ANDREW: if (gCurrentLevel == LEVEL_VENOM_2) { if ((Rand_ZeroOne() < 0.5f) && (this->aiIndex == AI360_SLIPPY)) { @@ -1747,6 +1877,7 @@ void ActorAllRange_Update(Actor* this) { } else { this->iwork[4] = 0; } + if ((this->aiIndex >= AI360_FALCO) && ((gActors[this->aiIndex].obj.status == OBJ_DYING) || (gActors[this->aiIndex].state == STATE360_6) || (gActors[this->aiIndex].obj.status == OBJ_FREE))) { @@ -1758,10 +1889,11 @@ void ActorAllRange_Update(Actor* this) { } } break; + case STATE360_3: sp104 = 1; if (this->timer_0BC == 0) { - if ((this->aiType < AI360_10) || (gCurrentLevel == LEVEL_BOLSE)) { + if ((this->aiType < AI360_ENEMY) || (gCurrentLevel == LEVEL_BOLSE)) { if (gCurrentLevel == LEVEL_VENOM_2) { if (this->aiType >= AI360_WOLF) { this->fwork[3] = 1.6f; @@ -1778,9 +1910,11 @@ void ActorAllRange_Update(Actor* this) { this->fwork[3] = 1.0f; this->fwork[1] = 38.0f; } + if ((gCurrentLevel == LEVEL_SECTOR_Z) && (gActors[0].state == STATE360_10)) { this->fwork[10] = 30.0f; } + if ((gLevelType == LEVELTYPE_SPACE) && (gCurrentLevel != LEVEL_BOLSE)) { if ((gCurrentLevel == LEVEL_SECTOR_Z) && (this->aiType == AI360_KATT)) { spE4 = RAND_FLOAT_CENTERED(0.0f); @@ -1805,6 +1939,7 @@ void ActorAllRange_Update(Actor* this) { spDC = RAND_FLOAT_CENTERED(5000.0f); } } + if ((fabsf(this->obj.pos.x - spE4) > 2000.0f) || (fabsf(this->obj.pos.z - spDC) > 2000.0f)) { this->fwork[4] = spE4; this->fwork[5] = spE0; @@ -1812,15 +1947,18 @@ void ActorAllRange_Update(Actor* this) { this->timer_0BC = RAND_INT(20.0f) + 10; } } + if (this->timer_0C0 == 0) { this->timer_0C0 = RAND_INT(200.0f) + 200; this->fwork[10] = 30.0f; } + if ((this->aiIndex >= AI360_FALCO) && (gActors[this->aiIndex].obj.id == OBJ_ACTOR_ALLRANGE) && (gActors[this->aiIndex].timer_0C2 == 0) && (gActors[this->aiIndex].obj.status == OBJ_ACTIVE)) { this->state = STATE360_2; this->iwork[2] = AI360_FOX; } + if (this->aiIndex == AI360_FOX) { if (this->counter_04E != 0) { this->counter_04E--; @@ -1831,6 +1969,7 @@ void ActorAllRange_Update(Actor* this) { } } break; + case STATE360_7: this->fwork[1] = 40.0f; Math_SmoothStepToF(&this->rot_0F4.x, 360.0f, 0.1f, 5.0f, 0.0001f); @@ -1839,6 +1978,7 @@ void ActorAllRange_Update(Actor* this) { this->state = STATE360_3; } break; + case STATE360_8: this->fwork[1] = 40.0f; if ((this->index % 2) != 0) { @@ -1846,6 +1986,7 @@ void ActorAllRange_Update(Actor* this) { } else { Math_SmoothStepToAngle(&this->obj.rot.z, 5.0f, 0.1f, 3.0f, 0.01f); } + switch (this->unk_046) { case 0: Math_SmoothStepToF(&this->rot_0F4.x, 200.0f, 0.1f, 6.0f, 0.0001f); @@ -1871,6 +2012,7 @@ void ActorAllRange_Update(Actor* this) { break; } break; + case STATE360_9: this->fwork[1] = 40.0f; if (Math_SmoothStepToAngle(&this->rot_0F4.y, this->fwork[19], 0.5f, 5.0f, 0.0f) < 0.0f) { @@ -1883,6 +2025,7 @@ void ActorAllRange_Update(Actor* this) { this->state = STATE360_3; } break; + case STATE360_10: sp104 = 1; if (this->timer_0BC == 0) { @@ -1893,6 +2036,7 @@ void ActorAllRange_Update(Actor* this) { } break; } + if (sp104 != 0) { s32 var_v0 = 4 - 1; @@ -1903,17 +2047,20 @@ void ActorAllRange_Update(Actor* this) { if (gCurrentLevel == LEVEL_VENOM_2) { var_v0 = 2 - 1; } + if (((this->index + gGameFrameCount) & var_v0) == 0) { this->fwork[19] = Math_RadToDeg(Math_Atan2F(spE4, spDC)); this->fwork[20] = Math_RadToDeg(Math_Atan2F(spE0, sqrtf(SQ(spE4) + SQ(spDC)))); } + spD8 = this->fwork[20]; spD4 = this->fwork[19]; sp108 = 0; + if (sp104 == 1) { if (this->aiType < AI360_GREAT_FOX) { sp108 = func_360_8003049C(this); - if ((sp108 != 0) && (this->aiType < AI360_10) && (this->timer_0BE == 0) && + if ((sp108 != 0) && (this->aiType < AI360_ENEMY) && (this->timer_0BE == 0) && ((this->fwork[7] < 0.01f) || (this->fwork[7] > 359.9f))) { this->timer_0BE = RAND_INT(200.0f) + 200; if (Rand_ZeroOne() < 0.5f) { @@ -1925,8 +2072,9 @@ void ActorAllRange_Update(Actor* this) { } } } + if (sp108 != 0) { - if ((this->aiType < AI360_10) || (gCurrentLevel != LEVEL_FORTUNA)) { + if ((this->aiType < AI360_ENEMY) || (gCurrentLevel != LEVEL_FORTUNA)) { spD8 += 40.0f * sp108; } else { spD8 += 20.0f * sp108; @@ -1942,13 +2090,16 @@ void ActorAllRange_Update(Actor* this) { this->rot_0F4.x = 0.0f; } } + Math_SmoothStepToAngle(&this->rot_0F4.x, spD8, 0.5f, this->fwork[2], 0.0001f); + spD0 = Math_SmoothStepToAngle(&this->rot_0F4.y, spD4, 0.5f, this->fwork[2], 0.0001f) * 30.0f; if (spD0 < 0.0f) { spD0 = spD0 * -1.0f; } else { spD0 = 360.0f - spD0; } + if ((this->fwork[7] > 0.01f) && (this->fwork[7] < 359.9f)) { if ((((gGameFrameCount + 15) % 32) == 0) && (gCurrentLevel != LEVEL_VENOM_2)) { this->lockOnTimers[TEAM_ID_FOX] = 0; @@ -1958,11 +2109,13 @@ void ActorAllRange_Update(Actor* this) { this->iwork[19] = 0; } } + if (this->iwork[19] != 0) { Math_SmoothStepToF(&this->fwork[7], this->fwork[8], 1.0f, 60.0f, 0.01f); } else { Math_SmoothStepToF(&this->fwork[7], this->fwork[8], 0.2f, 30.0f, 0.01f); } + if ((this->fwork[7] > 0.01f) && (this->fwork[7] < 359.9f)) { Math_SmoothStepToAngle(&this->obj.rot.z, this->fwork[7], 0.2f, 100.0f, 0.01f); if ((this->aiType == AI360_KATT) && ((gGameFrameCount % 2) == 0)) { @@ -1981,8 +2134,10 @@ void ActorAllRange_Update(Actor* this) { } this->obj.rot.x = -this->rot_0F4.x; this->obj.rot.y = this->rot_0F4.y; + Math_SmoothStepToF(&this->fwork[0], this->fwork[1], 0.2f, 1.0f, 0.1f); Math_SmoothStepToF(&this->fwork[2], this->fwork[3], 1.0f, 0.1f, 0.1f); + spC0 = SIN_DEG(this->obj.rot.x); spB8 = COS_DEG(this->obj.rot.x); spBC = SIN_DEG(this->obj.rot.y); @@ -1996,13 +2151,16 @@ void ActorAllRange_Update(Actor* this) { this->vel.x = this->fwork[13] + sp9C.x; this->vel.y = this->fwork[14] + sp9C.y; this->vel.z = this->fwork[12] + sp9C.z; + this->fwork[13] -= (this->fwork[13] * 0.1f); this->fwork[14] -= (this->fwork[14] * 0.1f); this->fwork[12] -= (this->fwork[12] * 0.1f); + if ((this->obj.pos.y < gGroundHeight + 40.0f) && (this->vel.y < 0.0f)) { this->obj.pos.y = gGroundHeight + 40.0f; this->vel.y = 0.0f; } + if (this->iwork[0] != 0) { this->iwork[0] = 0; @@ -2039,9 +2197,12 @@ void ActorAllRange_Update(Actor* this) { this->obj.rot.y, this->obj.rot.z); } } + ActorAllRange_ApplyDamage(this); + radarMark = &gRadarMarks[this->index]; radarMark->status = 1; + if (this->aiType == AI360_MISSILE) { radarMark->type = 100; } else { @@ -2050,10 +2211,12 @@ void ActorAllRange_Update(Actor* this) { if (gCurrentLevel == LEVEL_TRAINING) { radarMark->type = 4; } + radarMark->pos.x = this->obj.pos.x; radarMark->pos.y = this->obj.pos.y; radarMark->pos.z = this->obj.pos.z; radarMark->yRot = this->rot_0F4.y + 180.0f; + if (this->iwork[1] != 0) { this->iwork[1]--; if ((this->iwork[1] == 0) && (gActors[0].state == STATE360_2) && (gRadioState == 0)) { @@ -2074,28 +2237,31 @@ void ActorAllRange_Update(Actor* this) { } } } + if ((gCurrentLevel != LEVEL_KATINA) && (gCurrentLevel != LEVEL_VENOM_ANDROSS) && (this->timer_0C2 == 0)) { - if (((this->aiType >= AI360_10) && (this->aiType < AI360_GREAT_FOX)) || - ((this->aiType >= AI360_WOLF) && (this->aiType < AI360_10) && (this->timer_0C6 != 0))) { + if (((this->aiType >= AI360_ENEMY) && (this->aiType < AI360_GREAT_FOX)) || + ((this->aiType >= AI360_WOLF) && (this->aiType < AI360_ENEMY) && (this->timer_0C6 != 0))) { s32 var_a3 = 0; if (((gCurrentLevel == LEVEL_BOLSE) || (gCurrentLevel == LEVEL_SECTOR_Z)) && (this->timer_0C6 == 0)) { var_a3 = 3; } + sp90.x = this->vel.x; sp90.y = this->vel.y; sp90.z = this->vel.z; + temp_v0_27 = Object_CheckCollision(this->index, &this->obj.pos, &sp90, var_a3); if (temp_v0_27 != 0) { this->obj.pos.x -= this->vel.x; this->obj.pos.y -= this->vel.y; this->obj.pos.z -= this->vel.z; - if ((temp_v0_27 >= 2) && (this->aiType > AI360_10)) { + if ((temp_v0_27 >= 2) && (this->aiType > AI360_ENEMY)) { this->timer_0BE = 2; this->obj.status = OBJ_DYING; this->itemDrop = DROP_NONE; func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 5.0f, 15); - func_effect_8007A6F0(&this->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); } else { this->dmgType = DMG_BEAM; this->damage = 10; @@ -2105,6 +2271,7 @@ void ActorAllRange_Update(Actor* this) { } } } + if (gCurrentLevel == LEVEL_FORTUNA) { ActorAllRange_SetShadowData(this); } else if (gCurrentLevel == LEVEL_VENOM_ANDROSS) { @@ -2113,14 +2280,16 @@ void ActorAllRange_Update(Actor* this) { this->unk_04A = 0; } } + Math_SmoothStepToF(&this->fwork[22], 0.0f, 0.8f, 0.05f, 1e-7f); Math_SmoothStepToF(&this->fwork[23], 0.0f, 1.0f, 30.0f, 0.01f); + if (this->iwork[8] != 0) { this->iwork[8]--; } } -void ActorAllRange_DrawShield(Actor* this) { +void ActorAllRange_DrawShield(ActorAllRange* this) { f32 sp24; s32 sp20; @@ -2148,7 +2317,7 @@ void ActorAllRange_DrawShield(Actor* this) { } } -void ActorAllRange_DrawBarrelRoll(Actor* this) { +void ActorAllRange_DrawBarrelRoll(ActorAllRange* this) { s32 alpha; if (this->fwork[23] > 1.0f) { @@ -2160,9 +2329,11 @@ void ActorAllRange_DrawBarrelRoll(Actor* this) { 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 * 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, SETUPDL_67); @@ -2182,6 +2353,7 @@ bool ActorAllRange_MissileOverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* po } else { RCP_SetupDL(&gMasterDisp, SETUPDL_29); } + if ((limbIndex == 1) || (limbIndex == 3)) { rot->z += gGameFrameCount * 3.0f; } @@ -2196,7 +2368,7 @@ void ActorAllRange_Draw(ActorAllRange* this) { f32 sp38; s32 pad[3]; Vec3f sp1E4 = { 0.0f, 0.0f, 0.0f }; - Vec3f sp7C[30]; + Vec3f jointTable[30]; f32 pad2; if (this->aiType != AI360_EVENT_HANDLER) { @@ -2208,10 +2380,12 @@ void ActorAllRange_Draw(ActorAllRange* this) { Matrix_RotateZ(gGfxMatrix, M_DTOR * sp38, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); } + if ((this->timer_0C6 % 2) == 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_29); gSPFogPosition(gMasterDisp++, gFogNear, 1005); } + switch (this->aiType) { case AI360_FOX: case AI360_FALCO: @@ -2222,6 +2396,7 @@ void ActorAllRange_Draw(ActorAllRange* this) { Matrix_Pop(&gGfxMatrix); ActorAllRange_DrawBarrelRoll(this); break; + case AI360_WOLF: case AI360_LEON: case AI360_PIGMA: @@ -2248,27 +2423,32 @@ void ActorAllRange_Draw(ActorAllRange* this) { } } break; + case AI360_KATT: gSPDisplayList(gMasterDisp++, D_D009A40); Actor_DrawEngineAndContrails(this); break; + case AI360_BILL: gSPDisplayList(gMasterDisp++, D_D00B880); Actor_DrawEngineAndContrails(this); break; + case AI360_GREAT_FOX: Display_SetSecondLight(&this->obj.pos); this->animFrame = 1; ActorCutscene_Draw(this); break; + case AI360_MISSILE: - Animation_GetFrameData(&D_SZ_6006D64, 0, sp7C); - Animation_DrawSkeleton(3, D_SZ_6006E50, sp7C, ActorAllRange_MissileOverrideLimbDraw, NULL, this, + Animation_GetFrameData(&D_SZ_6006D64, 0, jointTable); + Animation_DrawSkeleton(3, aSzMissileSkel, jointTable, ActorAllRange_MissileOverrideLimbDraw, NULL, 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); Actor_DrawEngineGlow(this, 3); break; + default: if (gCurrentLevel == LEVEL_FORTUNA) { Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 60.0f, MTXF_APPLY); diff --git a/src/engine/fox_beam.c b/src/engine/fox_beam.c index 53b5276a..fa72deda 100644 --- a/src/engine/fox_beam.c +++ b/src/engine/fox_beam.c @@ -69,7 +69,7 @@ void PlayerShot_ExplodeBomb(PlayerShot* shot) { shot->unk_48 * 3.0f, 10); func_effect_8007ADF4(shot->obj.pos.x, gGroundHeight, shot->obj.pos.z, shot->unk_48 * 0.05f, shot->unk_48 * 0.5f); - func_effect_8007A6F0(&shot->obj.pos, NA_SE_OB_WATER_BOUND_M); + Effect_SpawnTimedSfxAtPos(&shot->obj.pos, NA_SE_OB_WATER_BOUND_M); } else { func_enmy_80062B60(shot->obj.pos.x, shot->obj.pos.z, 0, shot->unk_48 * 3.0f); } @@ -305,10 +305,11 @@ s32 PlayerShot_CheckObjectHitbox(PlayerShot* shot, f32* hitboxData, Object* obj) if (!((obj->id >= OBJ_ACTOR_START) && (obj->id < OBJ_ACTOR_MAX))) { PlayerShot_Impact(shot); } - if ((obj->id == OBJ_SCENERY_15) || ((obj->id == OBJ_SCENERY_22) && (i == 0)) || - ((obj->id == OBJ_SCENERY_10) && (i == 0)) || ((obj->id == OBJ_SCENERY_13) && (i == 0)) || - ((obj->id == OBJ_SCENERY_12) && (i < 3)) || (obj->id == OBJ_SCENERY_16) || - (obj->id == OBJ_SCENERY_14)) { + if ((obj->id == OBJ_SCENERY_CO_BUILDING_6) || ((obj->id == OBJ_SCENERY_CO_ARCH_3) && (i == 0)) || + ((obj->id == OBJ_SCENERY_CO_BUILDING_1) && (i == 0)) || + ((obj->id == OBJ_SCENERY_CO_BUILDING_4) && (i == 0)) || + ((obj->id == OBJ_SCENERY_CO_BUILDING_3) && (i < 3)) || (obj->id == OBJ_SCENERY_CO_BUILDING_7) || + (obj->id == OBJ_SCENERY_CO_BUILDING_5)) { if (shot->obj.pos.x - (obj->pos.x + hitbox->x.offset) < -hitbox->x.size) { if (hitbox->z.size + (obj->pos.z + hitbox->z.offset) < shot->obj.pos.z) { shot->obj.pos.z = hitbox->z.size + (obj->pos.z + hitbox->z.offset) - 5.0f; @@ -336,7 +337,7 @@ s32 PlayerShot_CheckObjectHitbox(PlayerShot* shot, f32* hitboxData, Object* obj) return i + 1; } if (obj->id < OBJ_SCENERY_MAX) { - func_effect_8007A6F0(&shot->obj.pos, NA_SE_EN_REFLECT); + Effect_SpawnTimedSfxAtPos(&shot->obj.pos, NA_SE_EN_REFLECT); } return i + 1; } @@ -485,7 +486,7 @@ bool PlayerShot_CheckPolyCollision(PlayerShot* shot, ObjectId objId, Object* obj sp7C.z = obj->pos.z - shot->obj.pos.z; // undefined behavior: if this check fails, the function returns no value if (((fabsf(sp7C.x) < 1100.0f) && (fabsf(sp7C.z) < 1100.0f) && (shot->obj.pos.y < 900.0f)) || - (objId == OBJ_BOSS_SZ) || (objId == ACTOR_EVENT_ID) || (objId == OBJ_SCENERY_ME_TUNNEL)) { + (objId == OBJ_BOSS_SZ_GREAT_FOX) || (objId == ACTOR_EVENT_ID) || (objId == OBJ_SCENERY_ME_TUNNEL)) { Matrix_RotateY(gCalcMatrix, -obj->rot.y * M_DTOR, MTXF_NEW); sp7C.x = shot->obj.pos.x - obj->pos.x; sp7C.y = shot->obj.pos.y - obj->pos.y; @@ -506,8 +507,8 @@ bool PlayerShot_CheckPolyCollision(PlayerShot* shot, ObjectId objId, Object* obj case OBJ_ACTOR_180: objId = COL1_0; break; - case OBJ_SCENERY_4: - case OBJ_SCENERY_5: + case OBJ_SCENERY_CO_BUMP_4: + case OBJ_SCENERY_CO_BUMP_5: objId = COL2_1; useCol2 = true; break; @@ -529,7 +530,7 @@ bool PlayerShot_CheckPolyCollision(PlayerShot* shot, ObjectId objId, Object* obj case ACTOR_EVENT_ID: objId = COL1_3; break; - case OBJ_BOSS_SZ: + case OBJ_BOSS_SZ_GREAT_FOX: objId = COL1_8; break; case OBJ_SCENERY_ME_TUNNEL: @@ -555,11 +556,11 @@ bool PlayerShot_CheckPolyCollision(PlayerShot* shot, ObjectId objId, Object* obj objId = COL2_7; useCol2 = true; break; - case OBJ_SCENERY_2: + case OBJ_SCENERY_CO_BUMP_2: objId = COL2_2; useCol2 = true; break; - case OBJ_SCENERY_3: + case OBJ_SCENERY_CO_BUMP_3: case OBJ_SCENERY_69: objId = COL2_3; useCol2 = true; @@ -612,7 +613,7 @@ bool PlayerShot_CheckPolyCollision(PlayerShot* shot, ObjectId objId, Object* obj return false; } PlayerShot_Impact(shot); - func_effect_8007A6F0(&shot->obj.pos, NA_SE_EN_REFLECT); + Effect_SpawnTimedSfxAtPos(&shot->obj.pos, NA_SE_EN_REFLECT); if (gCurrentLevel == LEVEL_METEO) { Matrix_RotateY(gCalcMatrix, obj->rot.y * M_DTOR, MTXF_NEW); sp7C.x = sp4C.x - obj->pos.x; @@ -635,7 +636,7 @@ bool PlayerShot_CheckPolyCollision(PlayerShot* shot, ObjectId objId, Object* obj return false; } PlayerShot_Impact(shot); - func_effect_8007A6F0(&shot->obj.pos, NA_SE_EN_REFLECT); + Effect_SpawnTimedSfxAtPos(&shot->obj.pos, NA_SE_EN_REFLECT); if (gCurrentLevel == LEVEL_FORTUNA) { func_effect_8007BC7C(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); func_effect_8007BC7C(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); @@ -790,7 +791,7 @@ void PlayerShot_CollisionCheck(PlayerShot* shot) { default: if (actor->info.unk_16 != 0) { if (actor->obj.id == OBJ_ACTOR_ALLRANGE) { - if ((actor->aiType >= AI360_WOLF) && (actor->aiType < AI360_10) && + if ((actor->aiType >= AI360_WOLF) && (actor->aiType < AI360_ENEMY) && (((gCurrentLevel == LEVEL_VENOM_2) && (shot->sourceId <= NPC_SHOT_ID + AI360_PEPPY)) || ((gCurrentLevel != LEVEL_VENOM_2) && (shot->sourceId == AI360_FOX))) && @@ -906,8 +907,8 @@ void PlayerShot_CollisionCheck(PlayerShot* shot) { if ((scenery360->obj.id == OBJ_SCENERY_117) || (scenery360->obj.id == OBJ_SCENERY_141) || (scenery360->obj.id == OBJ_SCENERY_149) || (scenery360->obj.id == OBJ_SCENERY_150) || (scenery360->obj.id == OBJ_SCENERY_148) || (scenery360->obj.id == OBJ_SCENERY_143) || - (scenery360->obj.id == OBJ_SCENERY_160) || (scenery360->obj.id == OBJ_SCENERY_1) || - (scenery360->obj.id == OBJ_SCENERY_3) || (scenery360->obj.id == OBJ_SCENERY_140)) { + (scenery360->obj.id == OBJ_SCENERY_160) || (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_1) || + (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_3) || (scenery360->obj.id == OBJ_SCENERY_140)) { PlayerShot_CheckPolyCollision(shot, scenery360->obj.id, &scenery360->obj); } else { PlayerShot_CheckObjectHitbox(shot, scenery360->info.hitbox, &scenery360->obj); @@ -917,13 +918,13 @@ void PlayerShot_CollisionCheck(PlayerShot* shot) { } else { for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) { if (scenery->obj.status == OBJ_ACTIVE) { - if ((scenery->obj.id == OBJ_SCENERY_1) || (scenery->obj.id == OBJ_SCENERY_ME_TUNNEL) || - (scenery->obj.id == OBJ_SCENERY_4) || (scenery->obj.id == OBJ_SCENERY_5) || + if ((scenery->obj.id == OBJ_SCENERY_CO_BUMP_1) || (scenery->obj.id == OBJ_SCENERY_ME_TUNNEL) || + (scenery->obj.id == OBJ_SCENERY_CO_BUMP_4) || (scenery->obj.id == OBJ_SCENERY_CO_BUMP_5) || (scenery->obj.id == OBJ_SCENERY_120) || (scenery->obj.id == OBJ_SCENERY_124) || (scenery->obj.id == OBJ_SCENERY_126) || (scenery->obj.id == OBJ_SCENERY_47) || - (scenery->obj.id == OBJ_SCENERY_2) || (scenery->obj.id == OBJ_SCENERY_3) || + (scenery->obj.id == OBJ_SCENERY_CO_BUMP_2) || (scenery->obj.id == OBJ_SCENERY_CO_BUMP_3) || (scenery->obj.id == OBJ_SCENERY_67) || (scenery->obj.id == OBJ_SCENERY_74) || - (scenery->obj.id == OBJ_SCENERY_3)) { + (scenery->obj.id == OBJ_SCENERY_CO_BUMP_3)) { PlayerShot_CheckPolyCollision(shot, scenery->obj.id, &scenery->obj); } else { temp_v0 = PlayerShot_CheckObjectHitbox(shot, scenery->info.hitbox, &scenery->obj); @@ -953,7 +954,7 @@ void PlayerShot_CollisionCheck(PlayerShot* shot) { for (i = 0, boss = gBosses; i < ARRAY_COUNT(gBosses); i++, boss++) { if ((boss->obj.status == OBJ_ACTIVE) && (boss->timer_05A == 0)) { if ((boss->obj.id == OBJ_BOSS_FO) || (boss->obj.id == OBJ_BOSS_VE2) || (boss->obj.id == OBJ_BOSS_309) || - (boss->obj.id == OBJ_BOSS_SZ)) { + (boss->obj.id == OBJ_BOSS_SZ_GREAT_FOX)) { PlayerShot_CheckPolyCollision(shot, boss->obj.id, &boss->obj); } else if (boss->obj.id == OBJ_BOSS_310) { test.x = fabsf(boss->obj.pos.x - shot->obj.pos.x) * .8333333f; @@ -1614,7 +1615,7 @@ void PlayerShot_UpdateBeam(PlayerShot* shot, s32 index) { PlayerShot_Impact(shot); shot->obj.pos.y = gGroundHeight + 2; if (gCurrentLevel == LEVEL_BOLSE) { - func_effect_8007A6F0(&shot->obj.pos, NA_SE_EN_REFLECT); + Effect_SpawnTimedSfxAtPos(&shot->obj.pos, NA_SE_EN_REFLECT); } if ((gCamCount != 4) && (gCurrentLevel != LEVEL_AQUAS)) { if ((shot->sourceId == TEAM_ID_FOX) && (gLaserStrength[0] != LASERS_SINGLE) && @@ -1660,7 +1661,7 @@ void PlayerShot_UpdateBeam(PlayerShot* shot, s32 index) { Object_Kill(&shot->obj, shot->sfxSource); return; } - if ((shot->sourceId < NPC_SHOT_ID + AI360_10) || ((shot->timer % 2) != 0)) { + if ((shot->sourceId < NPC_SHOT_ID + AI360_ENEMY) || ((shot->timer % 2) != 0)) { PlayerShot_CollisionCheck(shot); } } @@ -1863,7 +1864,7 @@ void PlayerShot_ApplyExplosionDamage(PlayerShot* shot, s32 damage) { scenery = gScenery; for (i = 0; i < ARRAY_COUNT(gScenery); i++, scenery++) { - if ((scenery->obj.status == OBJ_ACTIVE) && (scenery->obj.id == OBJ_SCENERY_56)) { + if ((scenery->obj.status == OBJ_ACTIVE) && (scenery->obj.id == OBJ_SCENERY_CO_DOORS)) { dx = scenery->obj.pos.x - shot->obj.pos.x; dy = scenery->obj.pos.y - shot->obj.pos.y; dz = scenery->obj.pos.z - shot->obj.pos.z; @@ -1904,7 +1905,7 @@ void PlayerShot_ApplyExplosionDamage(PlayerShot* shot, s32 damage) { actor->hitPos.z = shot->obj.pos.z; if (sqrtf(SQ(dx) + SQ(dy) + SQ(dz)) < radius) { if ((actor->obj.id == OBJ_ACTOR_193) || (actor->obj.id == OBJ_ACTOR_186) || - (actor->obj.id == OBJ_ACTOR_190) || (actor->obj.id == OBJ_ACTOR_202) || + (actor->obj.id == OBJ_MISSILE_SEEK_TEAM) || (actor->obj.id == OBJ_ACTOR_202) || (actor->obj.id == OBJ_ACTOR_201) || (actor->obj.id == OBJ_ACTOR_187) || ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->eventType == EVID_SUPPLY_CRATE)) || ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->eventType == EVID_SX_WARP_GATE)) || @@ -2093,7 +2094,7 @@ void PlayerShot_UpdateLockOnShot(PlayerShot* shot) { shot->unk_48 * 3.0f, 5); func_effect_8007ADF4(shot->obj.pos.x, gGroundHeight, shot->obj.pos.z, shot->unk_48 * 0.05f, shot->unk_48 * 0.5f); - func_effect_8007A6F0(&shot->obj.pos, NA_SE_OB_WATER_BOUND_M); + Effect_SpawnTimedSfxAtPos(&shot->obj.pos, NA_SE_OB_WATER_BOUND_M); } PlayerShot_Impact(shot); } else { @@ -2246,7 +2247,7 @@ void PlayerShot_UpdateShot(PlayerShot* shot, s32 index) { } } Object_Kill(&shot->obj, shot->sfxSource); - func_effect_8007A6F0(&shot->obj.pos, NA_SE_SPREAD_EXPLOSION); + Effect_SpawnTimedSfxAtPos(&shot->obj.pos, NA_SE_SPREAD_EXPLOSION); } else if (gCurrentLevel == LEVEL_AQUAS) { Aquas_801ABA40(shot); } else { diff --git a/src/engine/fox_bg.c b/src/engine/fox_bg.c index 9979ac97..98c1af7a 100644 --- a/src/engine/fox_bg.c +++ b/src/engine/fox_bg.c @@ -168,20 +168,19 @@ void Background_DrawStarfield(void) { } void Background_DrawPartialStarfield(s32 yMin, s32 yMax) { - f32 by; // 8C - f32 bx; // 88 - s16 vy; // 84 + f32 by; + f32 bx; + s16 vy; s16 vx; - s32 i; // 80 - s32 var_s2; // 7C - f32 cos; // 78 - f32 sin; // 74 - f32 spf68; // 70 - f32 spf64; // 6C - f32* sp60; // 68 - f32* sp5C; // 64 - u32* sp58; // 60 - + s32 i; + s32 var_s2; + f32 cos; + f32 sin; + f32 spf68; + f32 spf64; + f32* sp60; + f32* sp5C; + u32* sp58; gDPPipeSync(gMasterDisp++); gDPSetCycleType(gMasterDisp++, G_CYC_FILL); gDPSetCombineMode(gMasterDisp++, G_CC_SHADE, G_CC_SHADE); @@ -261,10 +260,13 @@ void Background_DrawBackdrop(void) { levelType = LEVELTYPE_SPACE; } levelId = gCurrentLevel; + Matrix_Push(&gGfxMatrix); + if (D_ctx_80177C70 == 2) { Matrix_Scale(gGfxMatrix, 1.2f, 1.2f, 1.0f, MTXF_APPLY); } + switch (levelType) { case LEVELTYPE_PLANET: RCP_SetupDL(&gMasterDisp, SETUPDL_17); @@ -277,12 +279,14 @@ void Background_DrawBackdrop(void) { sp13C = Math_ModF(Math_RadToDeg(gPlayer[gPlayerNum].camYaw) * (-7280.0f / 360.0f) * 5.0f, 7280.0f); Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY); Matrix_Translate(gGfxMatrix, sp13C, -2000.0f + sp134, -6000.0f, MTXF_APPLY); + if (gCurrentLevel == LEVEL_FORTUNA) { Matrix_Translate(gGfxMatrix, 0.0f, -2000.0f, 0, MTXF_APPLY); } else if (gCurrentLevel == LEVEL_KATINA) { Matrix_Translate(gGfxMatrix, 0.0f, -2500.0f, 0, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); + switch (gCurrentLevel) { case LEVEL_VERSUS: if (gVersusStage == VS_STAGE_CORNERIA) { @@ -305,6 +309,7 @@ void Background_DrawBackdrop(void) { } Matrix_Translate(gGfxMatrix, 7280.0f, 0.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); + switch (gCurrentLevel) { case LEVEL_VERSUS: if (gVersusStage == VS_STAGE_CORNERIA) { @@ -326,6 +331,7 @@ void Background_DrawBackdrop(void) { break; } break; + case LEVEL_CORNERIA: case LEVEL_VENOM_1: sp134 = (gPlayer[gPlayerNum].camPitch * -6000.0f) - (gPlayer[gPlayerNum].cam.eye.y * 0.6f); @@ -333,6 +339,7 @@ void Background_DrawBackdrop(void) { Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY); Matrix_Translate(gGfxMatrix, sp13C, -2000.0f + sp134, -6000.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); + switch (gCurrentLevel) { case LEVEL_CORNERIA: gSPDisplayList(gMasterDisp++, D_CO_60059F0); @@ -341,8 +348,10 @@ void Background_DrawBackdrop(void) { gSPDisplayList(gMasterDisp++, D_VE1_60046F0); break; } + Matrix_Translate(gGfxMatrix, 7280.0f, 0.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); + switch (gCurrentLevel) { case LEVEL_CORNERIA: gSPDisplayList(gMasterDisp++, D_CO_60059F0); @@ -352,6 +361,7 @@ void Background_DrawBackdrop(void) { break; } break; + case LEVEL_VENOM_ANDROSS: if (gDrawBackdrop != 6) { if ((gDrawBackdrop == 2) || (gDrawBackdrop == 7)) { @@ -412,6 +422,7 @@ void Background_DrawBackdrop(void) { } } break; + case LEVEL_AQUAS: if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) { sp13C = Math_RadToDeg(gPlayer[gPlayerNum].camYaw) - gPlayer[gPlayerNum].yRot_114; @@ -423,6 +434,7 @@ void Background_DrawBackdrop(void) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, sp13C, sp134, -7000.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) { gSPDisplayList(gMasterDisp++, D_AQ_601AFF0); } else { @@ -445,6 +457,7 @@ void Background_DrawBackdrop(void) { Matrix_Pop(&gGfxMatrix); } break; + case LEVEL_SOLAR: case LEVEL_ZONESS: case LEVEL_MACBETH: @@ -452,6 +465,7 @@ void Background_DrawBackdrop(void) { sp12C = Math_RadToDeg(gPlayer[gPlayerNum].camYaw) - gPlayer[gPlayerNum].yRot_114; sp134 = (gPlayer[gPlayerNum].camPitch * -7000.0f) - (gPlayer[gPlayerNum].cam.eye.y * 0.6f); sp13C = sp12C * -40.44444f * 2.0f; // close to 7280.0f / 180.0f + if ((gCurrentLevel == LEVEL_TITANIA) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && (gPlayer[0].csState < 3)) { D_bg_8015F968 += __sinf(gPlayer[0].camYaw) * 20.0f; @@ -462,10 +476,12 @@ void Background_DrawBackdrop(void) { D_bg_8015F968 = __sinf(gPlayer[0].camPitch) * 7000.0f; sp134 -= fabsf(D_bg_8015F968); } + sp13C = Math_ModF(sp13C, 7280.0f); RCP_SetupDL_17(); Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 1.5f, 1.0f, 1.0f, MTXF_APPLY); + if ((gCurrentLevel == LEVEL_TITANIA) || (gCurrentLevel == LEVEL_ZONESS)) { Matrix_Translate(gGfxMatrix, sp13C, -3000.0f + sp134, -7000.0f, MTXF_APPLY); } else if (gCurrentLevel == LEVEL_SOLAR) { @@ -474,6 +490,7 @@ void Background_DrawBackdrop(void) { Matrix_Translate(gGfxMatrix, sp13C, -4000.0f + sp134, -7000.0f, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); + if (gCurrentLevel == LEVEL_TITANIA) { gSPDisplayList(gMasterDisp++, D_TI_6000A80); } else if (gCurrentLevel == LEVEL_MACBETH) { @@ -490,6 +507,7 @@ void Background_DrawBackdrop(void) { } Matrix_Translate(gGfxMatrix, 7280.0f * sp13C, 0.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); + if (gCurrentLevel == LEVEL_TITANIA) { gSPDisplayList(gMasterDisp++, D_TI_6000A80); } else if (gCurrentLevel == LEVEL_MACBETH) { @@ -502,6 +520,7 @@ void Background_DrawBackdrop(void) { break; } break; + case LEVELTYPE_SPACE: if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_ENTER_WARP_ZONE) { Matrix_Push(&gGfxMatrix); @@ -534,13 +553,16 @@ void Background_DrawBackdrop(void) { sp138 = Math_ModF(sp138, 480.0f); sp134 = Math_ModF(sp134, 360.0f); } + if ((sp12C < 180.0f) && (sp138 > 380.0f)) { sp138 = -(480.0f - sp138); } if ((sp130 > 180.0f) && (sp134 > 280.0f)) { sp134 = -(360.0f - sp134); } + Matrix_RotateZ(gGfxMatrix, gStarfieldRoll, MTXF_APPLY); + switch (levelId) { case LEVEL_WARP_ZONE: if ((s32) gWarpZoneBgAlpha != 0) { @@ -558,6 +580,7 @@ void Background_DrawBackdrop(void) { Matrix_Pop(&gGfxMatrix); } break; + case LEVEL_METEO: if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) && (gCsFrameCount > 260)) { Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f) - 30.0f, -290.0f, @@ -573,6 +596,7 @@ void Background_DrawBackdrop(void) { gSPDisplayList(gMasterDisp++, D_ME_600DDF0); } break; + case LEVEL_SECTOR_X: if (gSceneSetup == 0) { Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, MTXF_APPLY); @@ -583,6 +607,7 @@ void Background_DrawBackdrop(void) { gSPDisplayList(gMasterDisp++, D_SX_6029890); } break; + case LEVEL_TRAINING: Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.2f, 0.2f, 1.0f, MTXF_APPLY); @@ -591,6 +616,7 @@ void Background_DrawBackdrop(void) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); gSPDisplayList(gMasterDisp++, D_TR_6003760); break; + case LEVEL_AREA_6: case LEVEL_UNK_4: sp128 = (gPathProgress * 0.00004f) + 0.5f; @@ -609,6 +635,7 @@ void Background_DrawBackdrop(void) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_A6_601BB40); break; + case LEVEL_FORTUNA: sp128 = 1.5f; if ((gCsFrameCount > 400) && (gMissionStatus == MISSION_COMPLETE)) { @@ -619,6 +646,7 @@ void Background_DrawBackdrop(void) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_FO_600B4B0); break; + case LEVEL_BOLSE: sp128 = 1.0f; if ((gCsFrameCount > 500) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { @@ -629,13 +657,15 @@ void Background_DrawBackdrop(void) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_BO_600D190); break; + case LEVEL_SECTOR_Z: Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_SZ_6002F80); + gSPDisplayList(gMasterDisp++, aSzBackgroundDL); break; + case LEVEL_SECTOR_Y: Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.4f, 0.4f, 1.0f, MTXF_APPLY); @@ -648,6 +678,7 @@ void Background_DrawBackdrop(void) { } Matrix_Pop(&gGfxMatrix); } + if (gStarWarpDistortion > 0.0f) { f32* xStar = gStarOffsetsX; f32* yStar = gStarOffsetsY; @@ -655,7 +686,7 @@ void Background_DrawBackdrop(void) { RCP_SetupDL_14(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 128, 128, 255, 255); - i = 0; + zRot = 0.0f; for (i = 0; i < 300; i++, xStar++, yStar++) { *xStar = RAND_FLOAT_SEEDED(480.0f) - 80.0f; @@ -690,10 +721,12 @@ void Background_DrawSun(void) { (gCurrentLevel == LEVEL_SOLAR) || (gCurrentLevel == LEVEL_TRAINING) || gVersusMode) { return; } + gPlayerGlareAlphas[gPlayerNum] -= sSunGlareAlphaStep[levelType]; if (gPlayerGlareAlphas[gPlayerNum] > 300) { gPlayerGlareAlphas[gPlayerNum] = 0; } + if (((gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO)) || (((gPlayer[gPlayerNum].state_1C8 == PLAYERSTATE_1C8_U_TURN) || (gLevelMode == LEVELMODE_ALL_RANGE) || (gPlayer[gPlayerNum].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) && @@ -701,14 +734,17 @@ void Background_DrawSun(void) { gPlayerGlareReds[gPlayerNum] = 128; gPlayerGlareGreens[gPlayerNum] = 128; gPlayerGlareBlues[gPlayerNum] = 128; + camYaw = Math_RadToDeg(gPlayer[gPlayerNum].camYaw); camPitch = Math_RadToDeg(gPlayer[gPlayerNum].camPitch); if (camPitch > 180.0f) { camPitch -= 360.0f; } + camYaw -= 135.0f; gSunViewX = -camYaw * 3.2f; gSunViewY = (-camPitch * 3.2f) + 130.0f - ((gPlayer[gPlayerNum].cam.eye.y - 350.0f) * 0.015f); + if (gCurrentLevel == LEVEL_KATINA) { gSunViewY -= 80.0f; } @@ -716,6 +752,7 @@ void Background_DrawSun(void) { gSunViewY -= 60.0f; gSunViewX -= 480.0f; } + if ((gSunViewX < 120.0f) && (gSunViewX > -120.0f) && (gSunViewY < 120.0f)) { gPlayerGlareAlphas[gPlayerNum] += sSunGlareAlphaStep[levelType] * 2; if (sSunGlareMaxAlpha[levelType] < gPlayerGlareAlphas[gPlayerNum]) { @@ -723,6 +760,7 @@ void Background_DrawSun(void) { } } } + if (gPlayerGlareAlphas[gPlayerNum] != 0) { Matrix_Push(&gGfxMatrix); Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY); @@ -732,12 +770,14 @@ void Background_DrawSun(void) { sunAlpha = sSunAlphas; sunDL = sSunDLs; sunScale = sSunScales; + if (gCurrentLevel == LEVEL_KATINA) { sunColor = sKaSunColors; sunAlpha = sKaSunAlphas; sunDL = sKaSunDLs; sunScale = sKaSunScales; } + for (i = 0; i < 5; i++, sunColor++, sunAlpha++, sunDL++, sunScale++) { Matrix_Push(&gGfxMatrix); Matrix_Scale(gGfxMatrix, *sunScale, *sunScale, *sunScale, MTXF_APPLY); @@ -766,11 +806,13 @@ void Background_DrawLensFlare(void) { (gPlayerGlareAlphas[gPlayerNum] == 0)) { return; } + alphaMod = 1.0f; if (gPlayerGlareAlphas[gPlayerNum] < 80) { alphaMod = gPlayerGlareAlphas[gPlayerNum] / 80.0f; } alphaMod *= sLensFlareAlphaMod[gLevelType]; + Matrix_Push(&gGfxMatrix); Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY); Matrix_Translate(gGfxMatrix, gSunViewX, gSunViewY, -200.0f, MTXF_APPLY); @@ -782,6 +824,7 @@ void Background_DrawLensFlare(void) { lensFlareDL = &sSunDLs[5]; lensFlareScale = &sSunScales[5]; lensFlareShift = &sSunShifts[5]; + if (gCurrentLevel == LEVEL_KATINA) { lensFlareColor = &sKaSunColors[5]; lensFlareAlpha = &sKaSunAlphas[5]; @@ -789,6 +832,7 @@ void Background_DrawLensFlare(void) { lensFlareScale = &sKaSunScales[5]; lensFlareShift = &sKaSunShifts[5]; } + for (i = 5; i < 13; i++, lensFlareColor++, lensFlareAlpha++, lensFlareDL++, lensFlareScale++, lensFlareShift++) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, *lensFlareShift * lensFlareOffsetX, *lensFlareShift * -lensFlareOffsetY, 0.0f, @@ -828,6 +872,7 @@ void Background_DrawGround(void) { Bolse_DrawDynamicGround(); return; } + sp1D4 = 0.0f; if ((gGroundType != 10) && (gGroundType != 11)) { sp1D4 = -4000.0f; @@ -849,10 +894,13 @@ void Background_DrawGround(void) { sp1B4.x = 0; sp1B4.y = 0; sp1B4.z = -5500.0f; + Matrix_RotateY(gCalcMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_NEW); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp1B4, &sp1A8); + temp_fv1 = gPlayer[gPlayerNum].cam.eye.x + sp1A8.x; temp_fa0 = gPlayer[gPlayerNum].cam.eye.z + sp1A8.z; + if (temp_fv1 > 6000.0f) { gPlayer[gPlayerNum].xPath = 12000.0f; } @@ -865,6 +913,7 @@ void Background_DrawGround(void) { if (temp_fv1 < -18000.0f) { gPlayer[gPlayerNum].xPath = -24000.0f; } + if (temp_fa0 > 6000.0f) { sp1D4 = 12000.0f; } @@ -878,12 +927,16 @@ void Background_DrawGround(void) { sp1D4 = -24000.0f; } } + Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, gPlayer[gPlayerNum].xPath, -3.0f + gCameraShakeY, sp1D4, MTXF_APPLY); + if (D_ctx_80177C70 == 2) { Matrix_Scale(gGfxMatrix, 1.2f, 1.2f, 1.0f, MTXF_APPLY); } + Matrix_SetGfxMtx(&gMasterDisp); + switch (gCurrentLevel) { case LEVEL_CORNERIA: if (gGroundClipMode != 0) { @@ -891,6 +944,7 @@ void Background_DrawGround(void) { } else { RCP_SetupDL_20(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } + if (gLevelMode == LEVELMODE_ON_RAILS) { gDPSetTextureImage(gMasterDisp++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, SEGMENTED_TO_VIRTUAL(D_CO_601B6C0)); temp_s0 = fabsf(Math_ModF(2.0f * (gPathTexScroll * 0.2133333f), 128.0f)); // 0.64f / 3.0f @@ -935,6 +989,7 @@ void Background_DrawGround(void) { } } break; + case LEVEL_VENOM_1: case LEVEL_MACBETH: RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); @@ -972,6 +1027,7 @@ void Background_DrawGround(void) { gSPDisplayList(gMasterDisp++, sp1C0); Matrix_Pop(&gGfxMatrix); break; + case LEVEL_TRAINING: RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); if (gLevelMode == LEVELMODE_ON_RAILS) { @@ -1002,10 +1058,12 @@ void Background_DrawGround(void) { } } break; + case LEVEL_AQUAS: RCP_SetupDL(&gMasterDisp, SETUPDL_20); sp1C0 = D_AQ_600AB10; gSPFogPosition(gMasterDisp++, gFogNear, gFogFar); + if ((D_bg_8015F964 == 0) && ((gAqDrawMode == 0) || (gAqDrawMode == 2))) { gDPLoadTileTexture(gMasterDisp++, SEGMENTED_TO_VIRTUAL(D_AQ_600AB68), G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, @@ -1029,6 +1087,7 @@ void Background_DrawGround(void) { gSPDisplayList(gMasterDisp++, sp1C0); Matrix_Pop(&gGfxMatrix); } + if ((D_bg_8015F964 != 0) || (gAqDrawMode == 0)) { gDPLoadTileTexture(gMasterDisp++, SEGMENTED_TO_VIRTUAL(D_AQ_602ACC0), G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32); @@ -1042,6 +1101,7 @@ void Background_DrawGround(void) { } else { RCP_SetupDL(&gMasterDisp, SETUPDL_37); } + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && (gPlayer[0].csState < 2)) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); } else if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) { @@ -1050,6 +1110,7 @@ void Background_DrawGround(void) { } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) D_AQ_801C4188); } + Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, D_bg_8015F970, -3000.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 2.0f, 1.0f, 0.5f, MTXF_APPLY); @@ -1062,6 +1123,7 @@ void Background_DrawGround(void) { gSPDisplayList(gMasterDisp++, D_AQ_602AC40); } break; + case LEVEL_FORTUNA: case LEVEL_KATINA: case LEVEL_BOLSE: @@ -1071,6 +1133,7 @@ void Background_DrawGround(void) { } else { RCP_SetupDL_20(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } + for (i = 0; i < ARRAY_COUNT(sGroundPositions360x); i++) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, sGroundPositions360x[i], 0.0f, sGroundPositions360z[i], MTXF_APPLY); @@ -1087,12 +1150,14 @@ void Background_DrawGround(void) { Matrix_Pop(&gGfxMatrix); } break; + case LEVEL_VERSUS: if (gGroundClipMode != 0) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } else { RCP_SetupDL_20(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } + for (i = 0; i < ARRAY_COUNT(sGroundPositions360x); i++) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, sGroundPositions360x[i], 0.0f, sGroundPositions360z[i], MTXF_APPLY); @@ -1105,6 +1170,7 @@ void Background_DrawGround(void) { Matrix_Pop(&gGfxMatrix); } break; + case LEVEL_SOLAR: RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -2000.0f, MTXF_APPLY); @@ -1116,6 +1182,7 @@ void Background_DrawGround(void) { gSPDisplayList(gMasterDisp++, D_SO_6002E60); } break; + case LEVEL_ZONESS: RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -1500.0f, MTXF_APPLY); diff --git a/src/engine/fox_boss.c b/src/engine/fox_boss.c index 722f116f..ae9235e0 100644 --- a/src/engine/fox_boss.c +++ b/src/engine/fox_boss.c @@ -11,7 +11,7 @@ s32 PAD_boss_C9EC4[14] = { 0 }; const f32 D_boss_800D55D0[] = { 6000.0f, 18000.0f, -6000.0f, -18000.0f }; // unused? -void Boss_AwardBonus(Boss* boss) { +void Boss_AwardBonus(Boss* this) { s32 bonus; f32 yOffset; @@ -26,15 +26,17 @@ void Boss_AwardBonus(Boss* boss) { } else { bonus = 0; } + if (bonus != 0) { yOffset = 0.0f; - if (boss->obj.id == OBJ_BOSS_292) { + if (this->obj.id == OBJ_BOSS_CO_GRANGA) { yOffset = 300.0f; - } else if (boss->obj.id == OBJ_BOSS_TI) { + } else if (this->obj.id == OBJ_BOSS_TI) { yOffset = 200.0f; } - BonusText_Display(boss->obj.pos.x, boss->obj.pos.y + yOffset, boss->obj.pos.z, bonus); + BonusText_Display(this->obj.pos.x, this->obj.pos.y + yOffset, this->obj.pos.z, bonus); } + gHitCount += bonus + 1; D_ctx_80177850 = 15; } @@ -57,27 +59,27 @@ void Boss300_Update(Boss300* this) { void Boss300_Draw(Boss300* this) { } -void Boss_SetupDebris(Actor* actor, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7, f32 arg8, +void Boss_SetupDebris(ActorDebris* this, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7, f32 arg8, f32 arg9, f32 argA, s32 argB, s32 argC) { - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_DEBRIS; - actor->state = argB; - actor->obj.pos.x = arg1; - actor->obj.pos.y = arg2; - actor->obj.pos.z = arg3; - actor->obj.rot.x = arg4; - actor->obj.rot.y = arg5; - actor->obj.rot.z = arg6; - actor->vel.x = arg7; - actor->vel.y = arg8; - actor->vel.z = arg9; - actor->scale = argA; - actor->timer_0BC = argC; - actor->timer_0BE = 20; - Object_SetInfo(&actor->info, actor->obj.id); + Actor_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_ACTOR_DEBRIS; + this->state = argB; + this->obj.pos.x = arg1; + this->obj.pos.y = arg2; + this->obj.pos.z = arg3; + this->obj.rot.x = arg4; + this->obj.rot.y = arg5; + this->obj.rot.z = arg6; + this->vel.x = arg7; + this->vel.y = arg8; + this->vel.z = arg9; + this->scale = argA; + this->timer_0BC = argC; + this->timer_0BE = 20; + Object_SetInfo(&this->info, this->obj.id); if (gLevelType == LEVELTYPE_PLANET) { - actor->gravity = 0.5f; + this->gravity = 0.5f; } } @@ -93,8 +95,8 @@ void Boss_SpawnDebris(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5 } } -void Boss_SetCullDistance(Boss* boss) { - boss->info.cullDistance = 30000.0f; +void Boss_SetCullDistance(Boss* this) { + this->info.cullDistance = 30000.0f; } void Boss_CompleteLevel(Player* player, f32 xPos, f32 yPos, f32 zPos) { @@ -110,10 +112,13 @@ void Boss_CompleteLevel(Player* player, f32 xPos, f32 yPos, f32 zPos) { player->csState = 10; player->csTimer = 50; player->csEventTimer = 50; + player->unk_000 = 0.0f; player->unk_004 = 1.0f; + if (player->pos.x < player->xPath) { player->unk_004 = -1.0f; } + gPlayer[0].vel.x = 0.0f; } diff --git a/src/engine/fox_col1.c b/src/engine/fox_col1.c index f570c6fc..0739b801 100644 --- a/src/engine/fox_col1.c +++ b/src/engine/fox_col1.c @@ -194,6 +194,7 @@ void func_col1_80097C88(Vec3f* norms, Vtx_tn* quad) { __vtx1_x = quad->ob[0]; __vtx1_y = quad->ob[1]; __vtx1_z = quad->ob[2]; + quad++; __vtx2_x = quad->ob[0]; __vtx2_y = quad->ob[1]; @@ -205,17 +206,21 @@ void func_col1_80097C88(Vec3f* norms, Vtx_tn* quad) { __dy2 = __vtx2_y - __vtx1_y; __dz1 = __vtx1_z - __vtx0_z; __dz2 = __vtx2_z - __vtx1_z; + norms->x = (__dy1 * __dz2) - (__dz1 * __dy2); norms->y = (__dz1 * __dx2) - (__dx1 * __dz2); norms->z = (__dx1 * __dy2) - (__dy1 * __dx2); + temp_fv0 = VEC3F_MAG(norms); if (temp_fv0 != 0.0f) { norms->x = (norms->x / temp_fv0) * 127.0f; norms->y = (norms->y / temp_fv0) * 127.0f; norms->z = (norms->z / temp_fv0) * 127.0f; } + norms++; quad++; + __vtx1_x = __vtx2_x; __vtx1_y = __vtx2_y; __vtx1_z = __vtx2_z; @@ -223,15 +228,18 @@ void func_col1_80097C88(Vec3f* norms, Vtx_tn* quad) { __vtx2_x = quad->ob[0]; __vtx2_y = quad->ob[1]; __vtx2_z = quad->ob[2]; + __dx1 = __vtx1_x - __vtx0_x; __dx2 = __vtx2_x - __vtx1_x; __dy1 = __vtx1_y - __vtx0_y; __dy2 = __vtx2_y - __vtx1_y; __dz1 = __vtx1_z - __vtx0_z; __dz2 = __vtx2_z - __vtx1_z; + norms->x = (__dy1 * __dz2) - (__dz1 * __dy2); norms->y = (__dz1 * __dx2) - (__dx1 * __dz2); norms->z = (__dx1 * __dy2) - (__dy1 * __dx2); + temp_fv0 = VEC3F_MAG(norms); if (temp_fv0 != 0.0f) { norms->x = (norms->x / temp_fv0) * 127.0f; @@ -260,8 +268,10 @@ s32 func_col1_8009808C(Vec3f* pos, Vtx_tn* quad, Vec3f* normOut) { __vtx3_x = quad[3].ob[0]; __vtx3_y = quad[3].ob[1]; __vtx3_z = quad[3].ob[2]; + __pos_x = pos->x; __pos_z = pos->z; + test1 = TRINORM_Y(__vtx0, __vtx1, __pos); if (test1 >= 0.0f) { test1 = TRINORM_Y(__vtx1, __vtx2, __pos); @@ -277,6 +287,7 @@ s32 func_col1_8009808C(Vec3f* pos, Vtx_tn* quad, Vec3f* normOut) { } } } + if (var_v1 == 0) { test1 = TRINORM_Y(__vtx0, __vtx2, __pos); if ((test1 >= 0.0f)) { diff --git a/src/engine/fox_col2.c b/src/engine/fox_col2.c index 6d75b7fc..f1d5bc52 100644 --- a/src/engine/fox_col2.c +++ b/src/engine/fox_col2.c @@ -26,14 +26,18 @@ bool func_col2_800A36FC(Vec3f* objPos, Vec3f* colliderPos, CollisionHeader2* col objRelPos.x = objPos->x - colliderPos->x; objRelPos.y = objPos->y - colliderPos->y; objRelPos.z = objPos->z - colliderPos->z; + if ((objRelPos.x < colHeader->min.x) || (objRelPos.y < colHeader->min.y) || (objRelPos.z < colHeader->min.z) || (colHeader->max.x < objRelPos.x) || (colHeader->max.y < objRelPos.y) || (colHeader->max.z < objRelPos.z)) { return false; } + above = false; count = colHeader->polyCount; + polys = SEGMENTED_TO_VIRTUAL(colHeader->polys); mesh = SEGMENTED_TO_VIRTUAL(colHeader->mesh); + for (i = 0; i < count; i++, polys++) { for (j = 0; j < 3; j++) { tri[j] = &mesh[polys->vtx[j]]; @@ -43,12 +47,15 @@ bool func_col2_800A36FC(Vec3f* objPos, Vec3f* colliderPos, CollisionHeader2* col break; } } + if (above) { vtx.x = tri[0]->x; vtx.y = tri[0]->y; vtx.z = tri[0]->z; + func_col1_80098860(&triPlane, &vtx, &norm); hitDataOut->y = func_col1_800988B4(&objRelPos, &triPlane); + if (triPlane.normal.x != 0.0f) { norm.x = -triPlane.dist / triPlane.normal.x; } else { @@ -64,6 +71,7 @@ bool func_col2_800A36FC(Vec3f* objPos, Vec3f* colliderPos, CollisionHeader2* col } else { norm.z = 0.0f; } + hitDataOut->x = Math_Atan2F_XY(norm.y, norm.z); if (norm.z != 0.0f) { hitDataOut->z = -Math_Atan2F_XY(__sinf(Math_Atan2F_XY(norm.y, norm.z)) * norm.z, norm.x); @@ -72,6 +80,7 @@ bool func_col2_800A36FC(Vec3f* objPos, Vec3f* colliderPos, CollisionHeader2* col } else { hitDataOut->z = -Math_Atan2F_XY(norm.y, norm.x); } + if ((objPos->y - hitDataOut->y <= 0.0f) || (gCurrentLevel == LEVEL_MACBETH)) { sp38 = true; } @@ -106,6 +115,7 @@ bool func_col2_800A3A74(Vec3f* point, Vec3f** tri, Vec3f* normOut) { ptx = point->x; ptz = point->z; + temp1 = ((vtx2.z - vtx1.z) * (ptx - vtx2.x)) - ((vtx2.x - vtx1.x) * (ptz - vtx2.z)); if (temp1 >= 0.0f) { if (((vtx3.x - vtx2.x) * (ptz - vtx3.z)) <= ((vtx3.z - vtx2.z) * (ptx - vtx3.x))) { diff --git a/src/engine/fox_context.c b/src/engine/fox_context.c index afd62d62..954a2a08 100644 --- a/src/engine/fox_context.c +++ b/src/engine/fox_context.c @@ -7,7 +7,7 @@ s32 gSceneId; s32 gSceneSetup; s32 gClearPlayerInfo; // some sort of flag -s32 D_ctx_8017782C; // some sort of flag. all range related? +bool D_ctx_8017782C; // some sort of flag. all range related? GameState gGameState; s32 gNextGameStateTimer; s32 gVsItemSpawnTimer; @@ -287,7 +287,7 @@ UNK_TYPE P_800D31A8 = 0; u16 gEnemyShotSpeed; // enemy shot speed? u8 gShowLevelClearStatusScreen; s32 gLevelStartStatusScreenTimer; -s32 gLevelClearScreenTimer; // timer for mission accomplished scrren +s32 gLevelClearScreenTimer; // timer for mission accomplished screen s32 gBossHealthBar; s32 D_ctx_80177850; // bonus text related. set to 15 but never read s32 D_ctx_80177858[4]; // set to 3 but never used. related to VS mode customization? diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index 67daab35..17a1fc61 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -79,24 +79,26 @@ static Vec3f D_demo_800C9F60[] = { }; static f32 D_demo_800C9F90[] = { 75.0f, -80.0f, 85.0f, 0.0f }; -void func_demo_80048CC4(Actor* actor, s32 arg1) { - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.pos.x = D_demo_800C9F60[arg1].x + gPlayer[0].pos.x; - actor->obj.pos.y = D_demo_800C9F60[arg1].y + gPlayer[0].pos.y; - actor->obj.pos.z = D_demo_800C9F60[arg1].z + gPlayer[0].trueZpos; - actor->rot_0F4.y = 0.0f; - actor->rot_0F4.z = D_demo_800C9F90[arg1]; - Object_SetInfo(&actor->info, actor->obj.id); +void func_demo_80048CC4(ActorCutscene* this, s32 index) { + Actor_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_ACTOR_CUTSCENE; - if (arg1 == 3) { - AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); - AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, actor->sfxSource, 0); - actor->animFrame = 1; + this->obj.pos.x = D_demo_800C9F60[index].x + gPlayer[0].pos.x; + this->obj.pos.y = D_demo_800C9F60[index].y + gPlayer[0].pos.y; + this->obj.pos.z = D_demo_800C9F60[index].z + gPlayer[0].trueZpos; + + this->rot_0F4.y = 0.0f; + this->rot_0F4.z = D_demo_800C9F90[index]; + Object_SetInfo(&this->info, this->obj.id); + + if (index == 3) { + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, this->sfxSource, 0); + this->animFrame = 1; } else { - actor->iwork[11] = 1; - AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); + this->iwork[11] = 1; + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); } } @@ -109,6 +111,7 @@ void Cutscene_WarpZoneComplete(Player* player) { s32 temp_v1; gBosses[1].obj.status = OBJ_FREE; + Math_SmoothStepToF(&player->zRotBarrelRoll, 0.0f, 0.1f, 15.0f, 0.0f); Math_SmoothStepToF(&player->zRotBank, 0.0f, 0.1f, 15.0f, 0.0f); Math_SmoothStepToF(&player->rot.x, 0.0f, 0.1f, 3.0f, 0.0f); @@ -190,6 +193,7 @@ void Cutscene_WarpZoneComplete(Player* player) { default: break; } + if (gCsFrameCount > 450) { Math_SmoothStepToF(&D_ctx_80177A48[0], 1.0f, 0.1f, 0.004f, 0.0f); player->baseSpeed += 2.0f; @@ -328,37 +332,40 @@ static f32 D_demo_800CA020[] = { 45.0f, -45.0f, 10.0f, 0.0f }; static s32 D_demo_800CA030[] = { 0, 0, 0, 1 }; static s32 D_demo_800CA040[] = { 0, 0, 0, 0 }; -void func_demo_80049968(Actor* actor, s32 arg1) { - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.pos.x = D_demo_800C9FD0[arg1]; - actor->obj.pos.y = D_demo_800C9FE0[arg1]; - actor->obj.pos.z = D_demo_800C9FF0[arg1] + gPlayer[0].trueZpos; - actor->fwork[0] = D_demo_800CA000[arg1]; - actor->fwork[1] = D_demo_800CA010[arg1]; - actor->animFrame = D_demo_800CA030[arg1]; - actor->state = D_demo_800CA040[arg1]; - actor->obj.rot.z = D_demo_800CA020[arg1]; - actor->obj.rot.y = 180.0f; - actor->vel.z = gPlayer[0].vel.z; - Object_SetInfo(&actor->info, actor->obj.id); - actor->iwork[11] = 1; - AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); +void func_demo_80049968(ActorCutscene* this, s32 index) { + Actor_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_ACTOR_CUTSCENE; + + this->obj.pos.x = D_demo_800C9FD0[index]; + this->obj.pos.y = D_demo_800C9FE0[index]; + this->obj.pos.z = D_demo_800C9FF0[index] + gPlayer[0].trueZpos; + + this->fwork[0] = D_demo_800CA000[index]; + this->fwork[1] = D_demo_800CA010[index]; + + this->animFrame = D_demo_800CA030[index]; + this->state = D_demo_800CA040[index]; + this->obj.rot.z = D_demo_800CA020[index]; + this->obj.rot.y = 180.0f; + this->vel.z = gPlayer[0].vel.z; + Object_SetInfo(&this->info, this->obj.id); + this->iwork[11] = 1; + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); } -void func_demo_80049A9C(Effect* effect, f32 x, f32 y, f32 z) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_346; - effect->timer_50 = 100; - effect->scale2 = 0.2f; - effect->obj.pos.x = x; - effect->obj.pos.y = y; - effect->obj.pos.z = z; - effect->vel.z = 40.0f; - effect->obj.rot.z = RAND_FLOAT(360.0f); - Object_SetInfo(&effect->info, effect->obj.id); +void func_demo_80049A9C(Effect346* this, f32 x, f32 y, f32 z) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_346; + this->timer_50 = 100; + this->scale2 = 0.2f; + this->obj.pos.x = x; + this->obj.pos.y = y; + this->obj.pos.z = z; + this->vel.z = 40.0f; + this->obj.rot.z = RAND_FLOAT(360.0f); + Object_SetInfo(&this->info, this->obj.id); } void func_demo_80049B44(void) { @@ -659,65 +666,68 @@ static f32 D_demo_800CA05C[] = { -60.0f, -60.0f, -120.0f }; static f32 D_demo_800CA068[] = { -150.0f, -150.0f, -300.0f }; static f32 D_demo_800CA074[] = { 360.0f, -360.0f, 0.0f }; -void func_demo_8004A700(Actor* actor, s32 arg1) { - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.pos.x = gPlayer[0].pos.x; - actor->obj.pos.y = gPlayer[0].pos.y - 1000.0f; - actor->obj.pos.z = gPlayer[0].pos.z; - actor->fwork[0] = D_demo_800CA050[arg1]; - actor->fwork[1] = D_demo_800CA05C[arg1]; - actor->fwork[2] = D_demo_800CA068[arg1]; - actor->fwork[3] = 4.0f; - actor->fwork[7] = RAND_FLOAT(100.0f); - actor->fwork[8] = RAND_FLOAT(100.0f); - actor->obj.rot.z = D_demo_800CA074[arg1]; - actor->iwork[11] = 1; - Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); +void func_demo_8004A700(ActorCutscene* this, s32 index) { + Actor_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_ACTOR_CUTSCENE; + + this->obj.pos.x = gPlayer[0].pos.x; + this->obj.pos.y = gPlayer[0].pos.y - 1000.0f; + this->obj.pos.z = gPlayer[0].pos.z; + + this->fwork[0] = D_demo_800CA050[index]; + this->fwork[1] = D_demo_800CA05C[index]; + this->fwork[2] = D_demo_800CA068[index]; + + this->fwork[3] = 4.0f; + this->fwork[7] = RAND_FLOAT(100.0f); + this->fwork[8] = RAND_FLOAT(100.0f); + this->obj.rot.z = D_demo_800CA074[index]; + this->iwork[11] = 1; + Object_SetInfo(&this->info, this->obj.id); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); } void func_demo_8004A840(s32 actor) { func_demo_8004A700(&gActors[actor], actor); } -void func_demo_8004A888(Effect* effect) { - Vec3f sp2C; - Vec3f sp20; +void func_demo_8004A888(Clouds* this) { + Vec3f src; + Vec3f dest; Matrix_RotateY(gCalcMatrix, (gPlayer[0].rot.y + 180.0f) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -(gPlayer[0].rot.x * M_DTOR), MTXF_APPLY); - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - sp2C.x = RAND_FLOAT_CENTERED(1500.0f); - sp2C.y = RAND_FLOAT_CENTERED(800.0f); - sp2C.z = 3000.0f; + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + src.x = RAND_FLOAT_CENTERED(1500.0f); + src.y = RAND_FLOAT_CENTERED(800.0f); + src.z = 3000.0f; - Matrix_MultVec3f(gCalcMatrix, &sp2C, &sp20); + Matrix_MultVec3f(gCalcMatrix, &src, &dest); - effect->obj.pos.x = gPlayer[0].pos.x + sp20.x; - effect->obj.pos.y = gPlayer[0].pos.y + sp20.y; - effect->obj.pos.z = gPlayer[0].pos.z + sp20.z; - sp2C.x = 0.0f; - sp2C.y = 0.0f; - sp2C.z = -80.0f; + this->obj.pos.x = gPlayer[0].pos.x + dest.x; + this->obj.pos.y = gPlayer[0].pos.y + dest.y; + this->obj.pos.z = gPlayer[0].pos.z + dest.z; + src.x = 0.0f; + src.y = 0.0f; + src.z = -80.0f; - Matrix_MultVec3f(gCalcMatrix, &sp2C, &sp20); + Matrix_MultVec3f(gCalcMatrix, &src, &dest); - effect->vel.x = sp20.x; - effect->vel.y = sp20.y; - effect->vel.z = sp20.z; - effect->obj.id = OBJ_EFFECT_352; - effect->timer_50 = 40; - effect->unk_46 = 144; - effect->scale2 = RAND_FLOAT(30.0f) + 10.0f; + this->vel.x = dest.x; + this->vel.y = dest.y; + this->vel.z = dest.z; + this->obj.id = OBJ_EFFECT_CLOUDS; + this->timer_50 = 40; + this->unk_46 = 144; + this->scale2 = RAND_FLOAT(30.0f) + 10.0f; if (Rand_ZeroOne() < 0.5f) { - effect->obj.rot.z = 180.0f; + this->obj.rot.z = 180.0f; } - Object_SetInfo(&effect->info, effect->obj.id); + Object_SetInfo(&this->info, this->obj.id); } void func_demo_8004AA84(void) { @@ -740,7 +750,7 @@ void Cutscene_AllRangeMode(Player* player) { s32 pad; Vec3f sp70; Vec3f sp64; - Actor* actor; + ActorTeamBoss* actor; f32 var_s1; f32 var_s2; f32 var_s3; @@ -749,7 +759,9 @@ void Cutscene_AllRangeMode(Player* player) { s32 pad2; gCsFrameCount++; + Math_SmoothStepToAngle(&player->aerobaticPitch, 0.0f, 0.1f, 20.0f, 0.0f); + if (gCsFrameCount == 37) { gChangeTo360 = true; if (gCurrentLevel == LEVEL_VENOM_ANDROSS) { @@ -1872,7 +1884,7 @@ void func_demo_8004E4D4(ActorCutscene* this) { Vec3f sp54; Vec3f sp48; Vec3f sp3C; - Player* sp38 = gPlayer; + Player* sp38 = &gPlayer[0]; f32 sp34; this->fwork[7] += 3.0f; @@ -1925,6 +1937,7 @@ void func_demo_8004E4D4(ActorCutscene* this) { if (this->fwork[9] > 50.0f) { this->fwork[9] = 50.0f; } + if (this->timer_0BE == 0) { switch (this->index) { case 1: @@ -2102,55 +2115,55 @@ void func_demo_8004EBD0(ActorCutscene* this) { } } -void func_demo_8004F05C(Actor* actor) { - if (((gLevelType == LEVELTYPE_PLANET) && (actor->animFrame == 0)) || (gCurrentLevel == LEVEL_BOLSE)) { - actor->fwork[0] += 3.0f; - actor->fwork[1] = SIN_DEG(actor->fwork[0]) * 1.5f; +void func_demo_8004F05C(ActorCutscene* this) { + if (((gLevelType == LEVELTYPE_PLANET) && (this->animFrame == 0)) || (gCurrentLevel == LEVEL_BOLSE)) { + this->fwork[0] += 3.0f; + this->fwork[1] = SIN_DEG(this->fwork[0]) * 1.5f; } switch (gCurrentLevel) { case LEVEL_BOLSE: - switch (actor->animFrame) { + switch (this->animFrame) { case 0: if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) { - actor->rot_0F4.z += actor->rot_0F4.y; - actor->vel.x = SIN_DEG(actor->rot_0F4.z) * 10.0f; - actor->obj.rot.z = SIN_DEG(actor->rot_0F4.z) * 40.0f; + this->rot_0F4.z += this->rot_0F4.y; + this->vel.x = SIN_DEG(this->rot_0F4.z) * 10.0f; + this->obj.rot.z = SIN_DEG(this->rot_0F4.z) * 40.0f; break; } - Math_SmoothStepToF(&actor->obj.rot.z, actor->fwork[1], 0.05f, 0.3f, 0.0f); + Math_SmoothStepToF(&this->obj.rot.z, this->fwork[1], 0.05f, 0.3f, 0.0f); - switch (actor->state) { + switch (this->state) { case 0: break; case 1: - actor->state = 2; - actor->timer_0BC = 100; - AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); - actor->fwork[29] = 5.0f; + this->state = 2; + this->timer_0BC = 100; + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, this->sfxSource, 0); + this->fwork[29] = 5.0f; case 2: - actor->iwork[11] = 2; - actor->vel.z -= 5.0f; - if (actor->timer_0BC == 0) { - Object_Kill(&actor->obj, actor->sfxSource); + this->iwork[11] = 2; + this->vel.z -= 5.0f; + if (this->timer_0BC == 0) { + Object_Kill(&this->obj, this->sfxSource); } break; } break; case 31: - if (actor->timer_0BC == 0) { - Object_Kill(&actor->obj, actor->sfxSource); + if (this->timer_0BC == 0) { + Object_Kill(&this->obj, this->sfxSource); } break; case 32: - actor->obj.rot.z += actor->rot_0F4.z; - if (actor->timer_0BC == 0) { - Object_Kill(&actor->obj, actor->sfxSource); + this->obj.rot.z += this->rot_0F4.z; + if (this->timer_0BC == 0) { + Object_Kill(&this->obj, this->sfxSource); } break; @@ -2160,40 +2173,40 @@ void func_demo_8004F05C(Actor* actor) { break; case LEVEL_AREA_6: - Area6_8018DA58(actor); + Area6_8018DA58(this); break; case LEVEL_SECTOR_Y: - switch (actor->animFrame) { + switch (this->animFrame) { case 0: - SectorY_8019FF00(actor); + SectorY_8019FF00(this); break; case 42: - if (actor->timer_0BC == 0) { - if (actor->obj.pos.x >= -3500.0f) { - if (actor->obj.pos.z <= 3000.0f) { - if ((fabsf(actor->obj.pos.y) <= 400.0f) && (gCsFrameCount <= 300)) { - func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 8.0f); + if (this->timer_0BC == 0) { + if (this->obj.pos.x >= -3500.0f) { + if (this->obj.pos.z <= 3000.0f) { + if ((fabsf(this->obj.pos.y) <= 400.0f) && (gCsFrameCount <= 300)) { + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 8.0f); } } } - Object_Kill(&actor->obj, actor->sfxSource); + Object_Kill(&this->obj, this->sfxSource); } break; case 43: - if (actor->timer_0BC == 0) { - Object_Kill(&actor->obj, actor->sfxSource); + if (this->timer_0BC == 0) { + Object_Kill(&this->obj, this->sfxSource); } break; } break; case LEVEL_SECTOR_X: - if ((actor->state != 0) && (actor->state == 1)) { - actor->vel.y += 0.1f; - Math_SmoothStepToF(&actor->obj.rot.x, -20.0f, 0.1f, 0.5f, 0.0f); + if ((this->state != 0) && (this->state == 1)) { + this->vel.y += 0.1f; + Math_SmoothStepToF(&this->obj.rot.x, -20.0f, 0.1f, 0.5f, 0.0f); } break; @@ -2202,84 +2215,84 @@ void func_demo_8004F05C(Actor* actor) { break; default: - switch (actor->state) { + switch (this->state) { case 100: - Math_SmoothStepToF(&actor->obj.pos.x, actor->vwork[0x14].x, 0.03f, 3.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.pos.y, actor->vwork[0x14].y, 0.03f, 2.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.pos.z, actor->vwork[0x14].z, 0.03f, 2.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.rot.z, 0.0f, 0.02f, 0.3f, 0); + Math_SmoothStepToF(&this->obj.pos.x, this->vwork[0x14].x, 0.03f, 3.0f, 0.0f); + Math_SmoothStepToF(&this->obj.pos.y, this->vwork[0x14].y, 0.03f, 2.0f, 0.0f); + Math_SmoothStepToF(&this->obj.pos.z, this->vwork[0x14].z, 0.03f, 2.0f, 0.0f); + Math_SmoothStepToF(&this->obj.rot.z, 0.0f, 0.02f, 0.3f, 0); break; case 0: - actor->obj.rot.z = actor->rot_0F4.z; - if (actor->animFrame == 10) { - actor->obj.pos.z = gPlayer[0].cam.eye.z + 12000.0f; + this->obj.rot.z = this->rot_0F4.z; + if (this->animFrame == 10) { + this->obj.pos.z = gPlayer[0].cam.eye.z + 12000.0f; } break; case 1: - actor->vel.y += 0.8f; - actor->vel.x += 0.8f; - Math_SmoothStepToF(&actor->obj.rot.z, 420.0f, 0.1f, 15.0f, 0.001f); + this->vel.y += 0.8f; + this->vel.x += 0.8f; + Math_SmoothStepToF(&this->obj.rot.z, 420.0f, 0.1f, 15.0f, 0.001f); break; case 2: - actor->vel.y += 0.8f; - actor->vel.x -= 0.8f; - Math_SmoothStepToF(&actor->obj.rot.z, -420.0f, 0.1f, 15.0f, 0.001f); + this->vel.y += 0.8f; + this->vel.x -= 0.8f; + Math_SmoothStepToF(&this->obj.rot.z, -420.0f, 0.1f, 15.0f, 0.001f); break; case 3: - actor->vel.y += 1.2f; - actor->vel.z += 0.1f; - Math_SmoothStepToF(&actor->obj.rot.x, -45.0f, 0.1f, 15.0f, 0.001f); + this->vel.y += 1.2f; + this->vel.z += 0.1f; + Math_SmoothStepToF(&this->obj.rot.x, -45.0f, 0.1f, 15.0f, 0.001f); break; case 10: - actor->vel.x -= 1.0f; - Math_SmoothStepToF(&actor->obj.rot.z, -45.0f, 0.05f, 0.5f, 0.0f); + this->vel.x -= 1.0f; + Math_SmoothStepToF(&this->obj.rot.z, -45.0f, 0.05f, 0.5f, 0.0f); break; case 11: - actor->vel.x -= 2.0f; - Math_SmoothStepToF(&actor->obj.rot.z, -70.0f, 0.1f, 6.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.rot.y, 225.0f, 0.05f, 2.0f, 0.0f); + this->vel.x -= 2.0f; + Math_SmoothStepToF(&this->obj.rot.z, -70.0f, 0.1f, 6.0f, 0.0f); + Math_SmoothStepToF(&this->obj.rot.y, 225.0f, 0.05f, 2.0f, 0.0f); break; case 12: - actor->vel.x += 2.0f; - actor->vel.y += 1.0f; - Math_SmoothStepToF(&actor->obj.rot.z, 80.0f, 0.1f, 6.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.rot.x, -15.0f, 0.05f, 4.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.rot.y, 135.0f, 0.05f, 2.0f, 0.0f); + this->vel.x += 2.0f; + this->vel.y += 1.0f; + Math_SmoothStepToF(&this->obj.rot.z, 80.0f, 0.1f, 6.0f, 0.0f); + Math_SmoothStepToF(&this->obj.rot.x, -15.0f, 0.05f, 4.0f, 0.0f); + Math_SmoothStepToF(&this->obj.rot.y, 135.0f, 0.05f, 2.0f, 0.0f); break; case 13: - actor->vel.y += 2.0f; - Math_SmoothStepToF(&actor->obj.rot.z, -400.0f, 0.2f, 14.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.rot.x, -45.0f, 0.05f, 4.0f, 0.0f); + this->vel.y += 2.0f; + Math_SmoothStepToF(&this->obj.rot.z, -400.0f, 0.2f, 14.0f, 0.0f); + Math_SmoothStepToF(&this->obj.rot.x, -45.0f, 0.05f, 4.0f, 0.0f); break; } break; } } -void func_demo_8004F798(Actor* actor) { - actor->iwork[11] = 2; +void func_demo_8004F798(ActorCutscene* this) { + this->iwork[11] = 2; - switch (actor->state) { + switch (this->state) { case 0: - Math_SmoothStepToF(&actor->obj.pos.x, actor->fwork[0], 0.05f, 50.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.pos.y, actor->fwork[1], 0.05f, 50.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.rot.z, 0.0f, 0.05f, 1.0f, 0.0f); - actor->obj.pos.z -= 2.0f; + Math_SmoothStepToF(&this->obj.pos.x, this->fwork[0], 0.05f, 50.0f, 0.0f); + Math_SmoothStepToF(&this->obj.pos.y, this->fwork[1], 0.05f, 50.0f, 0.0f); + Math_SmoothStepToF(&this->obj.rot.z, 0.0f, 0.05f, 1.0f, 0.0f); + this->obj.pos.z -= 2.0f; break; case 1: - actor->fwork[29] = 10.0f; - actor->vel.z -= 100.0f; - if ((actor->obj.pos.z + gPathProgress) < -15000.0f) { - Object_Kill(&actor->obj, actor->sfxSource); + this->fwork[29] = 10.0f; + this->vel.z -= 100.0f; + if ((this->obj.pos.z + gPathProgress) < -15000.0f) { + Object_Kill(&this->obj, this->sfxSource); } break; } @@ -2323,7 +2336,7 @@ void ActorCutscene_Update(ActorCutscene* this) { break; case LEVEL_SECTOR_Z: - SectorZ_8019DD20(this); + SectorZ_LevelCompleteCsUpdate(this); break; case LEVEL_AREA_6: @@ -2460,19 +2473,19 @@ static Animation* D_demo_800CA1F4[] = { &D_SY_60265B4, &D_SY_602B8DC, &D_SY_60034C4, &D_SY_602A2CC, &D_SY_602CEB4, &D_SY_602B778, &D_SY_601F3B8, }; -void func_demo_8004FCB8(Actor* actor, s32 arg1) { +void func_demo_8004FCB8(ActorCutscene* this, s32 arg1) { f32 angle; f32 scale; s32 i; - if (actor->timer_0BC == 0) { - actor->timer_0BC = 32; - actor->fwork[5] = 0.3f; + if (this->timer_0BC == 0) { + this->timer_0BC = 32; + this->fwork[5] = 0.3f; } - if (actor->fwork[5] > 0.0f) { - scale = actor->fwork[5]; - actor->fwork[5] -= 0.05f; + if (this->fwork[5] > 0.0f) { + scale = this->fwork[5]; + this->fwork[5] -= 0.05f; RCP_SetupDL_49(); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 16, 16, 240, 255); @@ -2481,9 +2494,8 @@ void func_demo_8004FCB8(Actor* actor, s32 arg1) { for (i = arg1; i < (arg1 + 4); i++) { Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_demo_800CA110[i].x + actor->obj.pos.x, - D_demo_800CA110[i].y + actor->obj.pos.y, D_demo_800CA110[i].z + actor->obj.pos.z, - MTXF_APPLY); + Matrix_Translate(gGfxMatrix, D_demo_800CA110[i].x + this->obj.pos.x, D_demo_800CA110[i].y + this->obj.pos.y, + D_demo_800CA110[i].z + this->obj.pos.z, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, angle, MTXF_APPLY); Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -2492,7 +2504,7 @@ void func_demo_8004FCB8(Actor* actor, s32 arg1) { } } -void ActorCutscene_Draw(Actor* actor) { +void ActorCutscene_Draw(ActorCutscene* this) { static f32 D_800CA210 = 0.0f; static f32 D_800CA214 = 0.0f; static f32 D_800CA218 = 0.0f; @@ -2512,26 +2524,26 @@ void ActorCutscene_Draw(Actor* actor) { f32 y; f32 x; - switch (actor->animFrame) { + switch (this->animFrame) { case 1000: RCP_SetupDL(&gMasterDisp, SETUPDL_45); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, actor->unk_046); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_046); gSPDisplayList(gMasterDisp++, D_ENMY_PLANET_40018A0); - if (actor->unk_046 > 50) { - Actor_DrawEngineAndContrails(actor); + if (this->unk_046 > 50) { + Actor_DrawEngineAndContrails(this); } break; case 0: - func_edisplay_8005B388(actor); + func_edisplay_8005B388(this); break; case 1: if (gCurrentLevel == LEVEL_SECTOR_Z) { gSPFogPosition(gMasterDisp++, gFogNear, 1005); } - actor->info.bonus = 1; + this->info.bonus = 1; Cutscene_DrawGreatFox(); break; @@ -2547,12 +2559,12 @@ void ActorCutscene_Draw(Actor* actor) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); Matrix_Scale(gGfxMatrix, 60.0f, 60.0f, 1.0f, MTXF_APPLY); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 10.0f, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, actor->scale, actor->scale, 1.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->scale, this->scale, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL_49(); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, actor->iwork[0]); - gDPSetEnvColor(gMasterDisp++, 255, 255, 00, actor->iwork[0]); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->iwork[0]); + gDPSetEnvColor(gMasterDisp++, 255, 255, 00, this->iwork[0]); gSPDisplayList(gMasterDisp++, D_1024AC0); break; @@ -2562,42 +2574,42 @@ void ActorCutscene_Draw(Actor* actor) { case 24: gSPDisplayList(gMasterDisp++, D_D009A40); - Actor_DrawEngineAndContrails(actor); + Actor_DrawEngineAndContrails(this); break; case 25: - if ((actor->index % 2) != 0) { - gSPDisplayList(gMasterDisp++, D_SZ_6001DA0); + if ((this->index % 2) != 0) { + gSPDisplayList(gMasterDisp++, aSzSpaceJunk3DL); } else { - gSPDisplayList(gMasterDisp++, D_SZ_6001360); + gSPDisplayList(gMasterDisp++, aSzSpaceJunk1DL); } break; case 26: gSPDisplayList(gMasterDisp++, D_SZ_6004FE0); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY); - Actor_DrawEngineGlow(actor, 2); + Actor_DrawEngineGlow(this, 2); break; case 28: gSPDisplayList(gMasterDisp++, D_ENMY_SPACE_400AAE0); Matrix_Translate(gGfxMatrix, 0.f, 0.f, -60.0f, MTXF_APPLY); - Actor_DrawEngineGlow(actor, 2); + Actor_DrawEngineGlow(this, 2); break; case 30: - Display_SetSecondLight(&actor->obj.pos); + Display_SetSecondLight(&this->obj.pos); - if (actor->unk_046 != 0) { + if (this->unk_046 != 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_55); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); Rand_SetSeed(1, 29000, 9876); for (sp2D0 = 0; sp2D0 < 30; sp2D0++) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, RAND_FLOAT_CENTERED_SEEDED(3000.0f) * actor->fwork[20], - RAND_FLOAT_CENTERED_SEEDED(3000.0f) * actor->fwork[20], - RAND_FLOAT_CENTERED_SEEDED(3000.0f) * actor->fwork[20], MTXF_APPLY); + Matrix_Translate(gGfxMatrix, RAND_FLOAT_CENTERED_SEEDED(3000.0f) * this->fwork[20], + RAND_FLOAT_CENTERED_SEEDED(3000.0f) * this->fwork[20], + RAND_FLOAT_CENTERED_SEEDED(3000.0f) * this->fwork[20], MTXF_APPLY); Matrix_RotateY(gGfxMatrix, 2.0f * RAND_FLOAT_SEEDED(M_PI), MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, (2.0f * gGameFrameCount) * M_DTOR, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, 2.0f * RAND_FLOAT_SEEDED(M_PI), MTXF_APPLY); @@ -2717,13 +2729,13 @@ void ActorCutscene_Draw(Actor* actor) { break; case 33: - if ((actor->index == 3) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { + if ((this->index == 3) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { gSPDisplayList(gMasterDisp++, D_D00B880); } else { gSPDisplayList(gMasterDisp++, aKaCornerianFighterDL); } Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY); - Actor_DrawEngineGlow(actor, 0); + Actor_DrawEngineGlow(this, 0); break; case 34: @@ -2736,44 +2748,44 @@ void ActorCutscene_Draw(Actor* actor) { /* fallthrough */ case 39: gSPDisplayList(gMasterDisp++, D_SY_60097E0); - func_demo_8004FCB8(actor, 4); + func_demo_8004FCB8(this, 4); break; case 36: - Matrix_Scale(gGfxMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->scale, this->scale, this->scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_SY_601D730); - func_demo_8004FCB8(actor, 0); + func_demo_8004FCB8(this, 0); break; case 37: RCP_SetupDL_49(); - gDPSetPrimColor(gMasterDisp++, 0, 0, actor->iwork[0], actor->iwork[1], actor->iwork[2], actor->iwork[3]); - gDPSetEnvColor(gMasterDisp++, actor->iwork[4], actor->iwork[5], actor->iwork[6], actor->iwork[7]); - Matrix_Scale(gGfxMatrix, actor->scale, actor->fwork[4], 1.0f, MTXF_APPLY); + gDPSetPrimColor(gMasterDisp++, 0, 0, this->iwork[0], this->iwork[1], this->iwork[2], this->iwork[3]); + gDPSetEnvColor(gMasterDisp++, this->iwork[4], this->iwork[5], this->iwork[6], this->iwork[7]); + Matrix_Scale(gGfxMatrix, this->scale, this->fwork[4], 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); break; case 38: - animFrameData = Animation_GetFrameData(D_demo_800CA1F4[actor->iwork[4]], actor->iwork[5], sp144); - Math_SmoothStepToVec3fArray(sp144, actor->vwork, 1, animFrameData, actor->fwork[2], 100.0f, .0f); + animFrameData = Animation_GetFrameData(D_demo_800CA1F4[this->iwork[4]], this->iwork[5], sp144); + Math_SmoothStepToVec3fArray(sp144, this->vwork, 1, animFrameData, this->fwork[2], 100.0f, .0f); RCP_SetupDL_30(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gDPSetPrimColor(gMasterDisp++, 0, 0, 150, 255, 150, 255); - Animation_DrawSkeleton(1, D_SY_602D140, actor->vwork, 0, 0, actor, &gIdentityMatrix); + Animation_DrawSkeleton(1, D_SY_602D140, this->vwork, 0, 0, this, &gIdentityMatrix); - if (actor->fwork[0] != 0.0f) { + if (this->fwork[0] != 0.0f) { RCP_SetupDL_49(); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 255, 32, 32, 255); Matrix_Translate(gGfxMatrix, 10.0f, -5.0f, -40.0f, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, (-actor->obj.rot.y) * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, (-this->obj.rot.y) * M_DTOR, MTXF_APPLY); Graphics_SetScaleMtx(1.0f); - Matrix_Scale(gGfxMatrix, actor->fwork[0], actor->fwork[0], actor->fwork[0], MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->fwork[0], this->fwork[0], this->fwork[0], MTXF_APPLY); - camX = gPlayer[0].cam.eye.x - actor->obj.pos.x; - camY = gPlayer[0].cam.eye.y - actor->obj.pos.y; - camZ = gPlayer[0].cam.eye.z - (actor->obj.pos.z + gPathProgress); + camX = gPlayer[0].cam.eye.x - this->obj.pos.x; + camY = gPlayer[0].cam.eye.y - this->obj.pos.y; + camZ = gPlayer[0].cam.eye.z - (this->obj.pos.z + gPathProgress); y = -Math_Atan2F(camX, camZ); x = Math_Atan2F(camY, sqrtf(SQ(camZ) + SQ(camX))); @@ -2783,29 +2795,29 @@ void ActorCutscene_Draw(Actor* actor) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); - Math_SmoothStepToF(&actor->fwork[0], 0.0f, 0.1f, 0.2f, 0.05f); + Math_SmoothStepToF(&this->fwork[0], 0.0f, 0.1f, 0.2f, 0.05f); } - if (actor->fwork[6] != 0.0f) { + if (this->fwork[6] != 0.0f) { RCP_SetupDL_49(); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 255, 48, 0, 255); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_RotateY(gCalcMatrix, (actor->obj.rot.y - 90.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, (this->obj.rot.y - 90.0f) * M_DTOR, MTXF_NEW); sp2B8.x = 210.0f; sp2B8.y = 0.0f; sp2B8.z = 40.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp2B8, &sp2AC); - Matrix_Translate(gGfxMatrix, actor->obj.pos.x + sp2AC.x, actor->obj.pos.y + sp2AC.y, - actor->obj.pos.z + sp2AC.z, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, actor->fwork[6], actor->fwork[6], actor->fwork[6], MTXF_APPLY); + Matrix_Translate(gGfxMatrix, this->obj.pos.x + sp2AC.x, this->obj.pos.y + sp2AC.y, + this->obj.pos.z + sp2AC.z, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->fwork[6], this->fwork[6], this->fwork[6], MTXF_APPLY); - camX = gPlayer[0].cam.eye.x - actor->obj.pos.x; - camY = gPlayer[0].cam.eye.y - actor->obj.pos.y; - camZ = gPlayer[0].cam.eye.z - (actor->obj.pos.z + gPathProgress); + camX = gPlayer[0].cam.eye.x - this->obj.pos.x; + camY = gPlayer[0].cam.eye.y - this->obj.pos.y; + camZ = gPlayer[0].cam.eye.z - (this->obj.pos.z + gPathProgress); y = -Math_Atan2F(camX, camZ); x = Math_Atan2F(camY, sqrtf(SQ(camZ) + SQ(camX))); @@ -2815,7 +2827,7 @@ void ActorCutscene_Draw(Actor* actor) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); - Math_SmoothStepToF(&actor->fwork[6], 0.00f, 0.1f, 0.6f, 0); + Math_SmoothStepToF(&this->fwork[6], 0.00f, 0.1f, 0.6f, 0); } break; @@ -2824,7 +2836,7 @@ void ActorCutscene_Draw(Actor* actor) { break; case 41: - Aquas_801BE0F0(actor); + Aquas_801BE0F0(this); break; case 42: @@ -2834,28 +2846,28 @@ void ActorCutscene_Draw(Actor* actor) { case 43: RCP_SetupDL_49(); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, actor->iwork[0]); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->iwork[0]); gDPSetEnvColor(gMasterDisp++, 255, 192, 128, 255); Matrix_RotateY( gGfxMatrix, Math_Atan2F(gPlayer[0].cam.eye.x - gPlayer[0].cam.at.x, gPlayer[0].cam.eye.z - gPlayer[0].cam.at.z), MTXF_APPLY); - Matrix_Scale(gGfxMatrix, actor->fwork[0], actor->fwork[0], actor->fwork[0], MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->fwork[0], this->fwork[0], this->fwork[0], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); - if (actor->iwork[0] != 0) { - actor->iwork[0] -= 7; + if (this->iwork[0] != 0) { + this->iwork[0] -= 7; } - actor->fwork[0] += 0.2f; + this->fwork[0] += 0.2f; break; case 44: - Animation_GetFrameData(&D_AQ_6020A40, actor->iwork[0], actor->vwork); + Animation_GetFrameData(&D_AQ_6020A40, this->iwork[0], this->vwork); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - Animation_DrawSkeleton(1, D_AQ_6020C6C, actor->vwork, 0, 0, &actor->index, &gIdentityMatrix); + Animation_DrawSkeleton(1, D_AQ_6020C6C, this->vwork, 0, 0, &this->index, &gIdentityMatrix); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); break; @@ -2882,9 +2894,9 @@ void Cutscene_DrawGreatFox(void) { f32 sp9C[4]; Gfx* var_fp; - (void) "Demo_Time=%d\n"; - (void) "Demo_Time=%d\n"; - (void) "d Enm->wrk0 %d\n"; + PRINTF("Demo_Time=%d\n"); + PRINTF("Demo_Time=%d\n"); + PRINTF("d Enm->wrk0 %d\n"); if (gGameState == GSTATE_TITLE) { var_fp = D_TITLE_60320E0; @@ -2933,6 +2945,7 @@ void Cutscene_DrawGreatFox(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 48); gDPSetEnvColor(gMasterDisp++, 255, 255, 0, 48); + for (i = 0, var_s6_2 = D_demo_800CA0EC; i < 3; i++, var_s6_2++) { sp9C[i] = D_demo_800CA190[gGameFrameCount % 2U]; Matrix_Push(&gGfxMatrix); diff --git a/src/engine/fox_edata.c b/src/engine/fox_edata.c index c58f1357..56b5af5e 100644 --- a/src/engine/fox_edata.c +++ b/src/engine/fox_edata.c @@ -4,7 +4,7 @@ f32* D_edata_800CF964[] = { NULL }; // Likely a scrapped array of scenery shadow boxes -void func_edata_800594F0(Scenery* scenery) { +void Scenery48_Draw(Scenery* scenery) { RCP_SetupDL_57(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -12,7 +12,7 @@ void func_edata_800594F0(Scenery* scenery) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } -void func_edata_800595D0(Scenery* scenery) { +void Scenery49_Draw(Scenery* scenery) { RCP_SetupDL_57(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -20,5 +20,5 @@ void func_edata_800595D0(Scenery* scenery) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } -void func_edata_800596B0(Actor* actor) { +void Actor289_Draw(Actor* actor) { } diff --git a/src/engine/fox_edata_info.c b/src/engine/fox_edata_info.c index 3f551440..241d4b4e 100644 --- a/src/engine/fox_edata_info.c +++ b/src/engine/fox_edata_info.c @@ -93,72 +93,72 @@ f32 gWarpZoneEvent93Hitbox[] = { // clang-format off ObjectInfo gObjectInfo[] = { - /* OBJ_SCENERY_0, */ {(void*) D_CO_6015F00, 0, (ObjectFunc) NULL, D_CO_603E3E0, 800.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_1, */ {(void*) D_CO_602E9E0, 0, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_2, */ {(void*) D_CO_601BEC0, 0, (ObjectFunc) NULL, gNoHitbox, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_3, */ {(void*) D_CO_602E7A0, 0, (ObjectFunc) NULL, gNoHitbox, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_4, */ {(void*) D_CO_60244A0, 0, (ObjectFunc) NULL, gNoHitbox, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_5, */ {(void*) D_CO_602E570, 0, (ObjectFunc) NULL, gNoHitbox, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_6, */ {(void*) D_CO_60132B0, 0, (ObjectFunc) NULL, D_CO_603DCA4, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_7, */ {(void*) D_CO_602E080, 0, (ObjectFunc) NULL, D_CO_603DD40, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_8, */ {(void*) D_CO_60164F0, 0, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_9, */ {(void*) D_CO_6014500, 0, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_10, */ {(void*) D_CO_602D5F0, 0, (ObjectFunc) NULL, D_CO_603DDF0, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_11, */ {(void*) D_CO_601A7D0, 0, (ObjectFunc) NULL, D_CO_603DE8C, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_12, */ {(void*) D_CO_6014B50, 0, (ObjectFunc) NULL, D_CO_603DEF4, 500.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_13, */ {(void*) D_CO_6016580, 0, (ObjectFunc) NULL, D_CO_603DF8C, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_14, */ {(void*) D_CO_601B560, 0, (ObjectFunc) func_enmy_80066EA8, D_CO_603DFDC, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_15, */ {(void*) D_CO_60361F0, 0, (ObjectFunc) func_enmy_80066EA8, D_CO_603E014, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_16, */ {(void*) D_CO_6018E80, 0, (ObjectFunc) func_enmy_80066EA8, D_CO_603E030, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_17, */ {(void*) D_CO_6035F10, 0, (ObjectFunc) func_enmy_80066EA8, D_CO_603E09C, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_18, */ {(void*) Corneria_8018753C, 1, (ObjectFunc) Corneria_80187530, D_CO_603E98C, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_19, */ {(void*) D_CO_60153B0, 0, (ObjectFunc) NULL, D_CO_603E118, 100.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_20, */ {(void*) D_CO_601F5A0, 0, (ObjectFunc) NULL, D_CO_603E14C, 500.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_21, */ {(void*) D_CO_60137B0, 0, (ObjectFunc) NULL, D_CO_603E1B4, 400.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_22, */ {(void*) D_CO_6006A80, 0, (ObjectFunc) NULL, D_CO_603E21C, 400.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_23, */ {(void*) D_CO_6016270, 0, (ObjectFunc) NULL, D_CO_603E4A0, 200.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_24, */ {(void*) D_CO_6010E00, 0, (ObjectFunc) NULL, D_CO_603E9EC, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_25, */ {(void*) D_CO_6014670, 0, (ObjectFunc) NULL, D_CO_603EA08, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_26, */ {(void*) D_CO_6010A50, 0, (ObjectFunc) NULL, D_CO_603EA74, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_27, */ {(void*) D_CO_60143E0, 0, (ObjectFunc) NULL, D_CO_603EAE0, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_28, */ {(void*) D_CO_6014A20, 0, (ObjectFunc) NULL, D_CO_603EB0C, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_TI_SKULL, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, D_TI_60064FC, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_TI_RIB_0, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, D_TI_6006518, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_TI_RIB_1, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, D_TI_6006564, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_TI_RIB_2, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, D_TI_60065B0, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_TI_RIB_3, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, D_TI_60065FC, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_TI_RIB_4, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, D_TI_6006648, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_TI_RIB_5, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, D_TI_6006694, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_TI_RIB_6, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, D_TI_60066E0, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_TI_RIB_7, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, D_TI_600672C, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_TI_RIB_8, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, D_TI_6006778, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_STONE_ARCH, */ {(void*) aCoStoneArchDL, 0, (ObjectFunc) NULL, aCoStoneArchHitbox, 800.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUMP_1, */ {(void*) aCoBump1DL, 0, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUMP_2, */ {(void*) aCoBump2DL, 0, (ObjectFunc) NULL, gNoHitbox, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUMP_3, */ {(void*) aCoBump3DL, 0, (ObjectFunc) NULL, gNoHitbox, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUMP_4, */ {(void*) aCoBump4DL, 0, (ObjectFunc) NULL, gNoHitbox, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUMP_5, */ {(void*) aCoBump5DL, 0, (ObjectFunc) NULL, gNoHitbox, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_HIGHWAY_1, */ {(void*) aCoHighway1DL, 0, (ObjectFunc) NULL, aCoHighway1Hitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_HIGHWAY_2, */ {(void*) aCoHighway2DL, 0, (ObjectFunc) NULL, aCoHighway2Hitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_HIGHWAY_3, */ {(void*) aCoHighway3DL, 0, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_HIGHWAY_4, */ {(void*) aCoHighway4DL, 0, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUILDING_1, */ {(void*) aCoBuilding1DL, 0, (ObjectFunc) NULL, aCoBuilding1Hitbox, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUILDING_2, */ {(void*) aCoBuilding2DL, 0, (ObjectFunc) NULL, aCoBuilding2Hitbox, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUILDING_3, */ {(void*) aCoBuilding3DL, 0, (ObjectFunc) NULL, aCoBuilding3Hitbox, 500.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUILDING_4, */ {(void*) aCoBuilding4DL, 0, (ObjectFunc) NULL, aCoBuilding4Hitbox, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUILDING_5, */ {(void*) aCoBuilding5DL, 0, (ObjectFunc) SceneryRotateTowardsCamera, aCoBuilding5Hitbox, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUILDING_6, */ {(void*) aCoBuilding6DL, 0, (ObjectFunc) SceneryRotateTowardsCamera, aCoBuilding6Hitbox, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUILDING_7, */ {(void*) aCoBuilding7DL, 0, (ObjectFunc) SceneryRotateTowardsCamera, aCoBuilding7Hitbox, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUILDING_8, */ {(void*) aCoBuilding8DL, 0, (ObjectFunc) SceneryRotateTowardsCamera, aCoBuilding8Hitbox, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUILDING_ON_FIRE, */ {(void*) Corneria_BuildingOnFire_Draw, 1, (ObjectFunc) Corneria_BuildingOnFire_Update, aCoBuildingOnFireHitbox, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_TOWER, */ {(void*) aCoTowerDL, 0, (ObjectFunc) NULL, aCoTowerHitbox, 100.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_ARCH_1, */ {(void*) aCoArch1DL, 0, (ObjectFunc) NULL, aCoArch1Hitbox, 500.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_ARCH_2, */ {(void*) aCoArch2DL, 0, (ObjectFunc) NULL, aCoArch2Hitbox, 400.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_ARCH_3, */ {(void*) aCoArch3DL, 0, (ObjectFunc) NULL, aCoArch3Hitbox, 400.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_RADAR, */ {(void*) aRadarDL, 0, (ObjectFunc) NULL, aCoRadarHitbox, 200.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_HIGHWAY_5, */ {(void*) aCoHighway5DL, 0, (ObjectFunc) NULL, aCoHighway5Hitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_HIGHWAY_6, */ {(void*) aCoHighway6DL, 0, (ObjectFunc) NULL, aCoHighway6Hitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_HIGHWAY_7, */ {(void*) aCoHighway7DL, 0, (ObjectFunc) NULL, aCoHighway7Hitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_HIGHWAY_8, */ {(void*) aCoHighway8DL, 0, (ObjectFunc) NULL, aCoHighway8Hitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_HIGHWAY_9, */ {(void*) aCoHighway9DL, 0, (ObjectFunc) NULL, aCoHighway9Hitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_SKULL, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, aTiSkullHitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_RIB_0, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, aTiRib0Hitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_RIB_1, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, aTiRib1Hitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_RIB_2, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, aTiRib2Hitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_RIB_3, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, aTiRib3Hitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_RIB_4, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, aTiRib4Hitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_RIB_5, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, aTiRib5Hitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_RIB_6, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, aTiRib6Hitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_RIB_7, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, aTiRib7Hitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_RIB_8, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, aTiRib8Hitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_ME_TUNNEL, */ {(void*) MeteoTunnel_Draw, 1, (ObjectFunc) MeteoTunnel_Update, gNoHitbox, 6000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_40, */ {(void*) func_edisplay_80059F68, 1, (ObjectFunc) func_enmy_80066D5C, D_CO_603E4A4, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_41, */ {(void*) func_edisplay_80059FDC, 1, (ObjectFunc) func_enmy_80066EA8, D_CO_603E4DC, 300.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_42, */ {(void*) Scenery42_Draw, 1, (ObjectFunc) Scenery42_Update, D_CO_603E514, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_43, */ {(void*) D_ZO_6024AC0, 0, (ObjectFunc) NULL, D_ZO_602B9EC, 200.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUILDING_9, */ {(void*) CoBuilding9_Draw, 1, (ObjectFunc) CoBuilding9_Update, aCoBuilding9Hitbox, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUILDING_10, */ {(void*) CoBuilding10_Draw, 1, (ObjectFunc) SceneryRotateTowardsCamera, aCoBuilding10Hitbox, 300.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_IBEAM, */ {(void*) CoIBeam_Draw, 1, (ObjectFunc) CoIBeam_Update, aCoIBeamHitbox, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_ZO_ROCK_1, */ {(void*) aZoRock1DL, 0, (ObjectFunc) NULL, aZoRock1Hitbox, 200.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_44, */ {(void*) D_ZO_600F560, 0, (ObjectFunc) NULL, D_ZO_602BA20, 1500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_45, */ {(void*) D_ZO_600EC90, 0, (ObjectFunc) NULL, D_ZO_602BAE4, 1500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_46, */ {(void*) D_ZO_600E820, 0, (ObjectFunc) NULL, D_ZO_602BBD8, 1500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_47, */ {(void*) D_ZO_601FCB0, 0, (ObjectFunc) NULL, D_ZO_602BC54, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_48, */ {(void*) func_edata_800594F0, 1, (ObjectFunc) NULL, D_VE1_601B4E0, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_49, */ {(void*) func_edata_800595D0, 1, (ObjectFunc) NULL, D_VE1_601B4FC, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_48, */ {(void*) Scenery48_Draw, 1, (ObjectFunc) NULL, D_VE1_601B4E0, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_49, */ {(void*) Scenery49_Draw, 1, (ObjectFunc) NULL, D_VE1_601B4FC, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_50, */ {(void*) D_VE1_6007410, 0, (ObjectFunc) NULL, D_VE1_601B518, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_51, */ {(void*) D_VE1_6006F50, 0, (ObjectFunc) NULL, D_VE1_601B584, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_52, */ {(void*) D_VE1_6005780, 0, (ObjectFunc) Venom1_80193540, D_VE1_601B5F4, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_52, */ {(void*) D_VE1_6005780, 0, (ObjectFunc) Venom1_Scenery52_Update, D_VE1_601B5F4, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_53, */ {(void*) D_VE1_6003610, 0, (ObjectFunc) NULL, D_VE1_601B644, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_54, */ {(void*) D_CO_6000E00, 0, (ObjectFunc) Scenery54_Update, D_CO_603E0EC, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_55, */ {(void*) D_CO_6013B50, 0, (ObjectFunc) NULL, D_CO_603E88C, 1000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_SCENERY_56, */ {(void*) Corneria_8018F31C, 2, (ObjectFunc) Corneria_8018F044, D_CO_603E8A8, 1000.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_57, */ {(void*) Titania_8018F8B8, 1, (ObjectFunc) Titania_8018F4D8, D_TI_6006BF0, 800.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_WATERFALL, */ {(void*) aCoWaterfallDL, 0, (ObjectFunc) CoWaterfall_Update, aCoWaterfallHitbox, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_ROCKWALL, */ {(void*) aCoRockwallDL, 0, (ObjectFunc) NULL, aCoRockwallHitbox, 1000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_DOORS, */ {(void*) Corneria_Doors_Draw, 2, (ObjectFunc) Corneria_Doors_Update, aCoDoorsHitbox, 1000.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_57, */ {(void*) Titania_Scenery57_Draw, 1, (ObjectFunc) Titania_Scenery57_Update, D_TI_6006BF0, 800.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_58, */ {(void*) D_TI1_700BE00, 0, (ObjectFunc) NULL, D_TI_6006C44, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_59, */ {(void*) D_MA_6024010, 0, (ObjectFunc) NULL, D_MA_603626C, 300.0f, 0, 0, 5, 0, 0.0f, 0 }, /* OBJ_SCENERY_60, */ {(void*) D_MA_6027180, 0, (ObjectFunc) NULL, D_MA_6036288, 400.0f, 0, 0, 5, 0, 0.0f, 0 }, - /* OBJ_SCENERY_61, */ {(void*) Macbeth_801A2A78, 1, (ObjectFunc) NULL, D_MA_60362A4, 200.0f, 0, 0, 5, 0, 0.0f, 0 }, + /* OBJ_SCENERY_61, */ {(void*) Macbeth_Scenery61_Draw, 1, (ObjectFunc) NULL, D_MA_60362A4, 200.0f, 0, 0, 5, 0, 0.0f, 0 }, /* OBJ_SCENERY_62, */ {(void*) D_MA_60270E0, 0, (ObjectFunc) NULL, gNoHitbox, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_SCENERY_63, */ {(void*) D_MA_6013960, 0, (ObjectFunc) NULL, D_MA_6036894, 500.0f, 0, 0, 5, 0, 0.0f, 0 }, /* OBJ_SCENERY_64, */ {(void*) D_MA_600AF40, 0, (ObjectFunc) NULL, D_MA_60368E0, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_65, */ {(void*) Macbeth_801A6608, 1, (ObjectFunc) NULL, D_MA_6036724, 400.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_65, */ {(void*) Macbeth_Scenery65_Draw, 1, (ObjectFunc) NULL, D_MA_6036724, 400.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_SCENERY_66, */ {(void*) D_MA_601F1D0, 0, (ObjectFunc) NULL, D_MA_60362D8, 2500.0f, 0, 0, 5, 0, 0.0f, 0 }, /* OBJ_SCENERY_67, */ {(void*) D_MA_60238F0, 0, (ObjectFunc) NULL, D_MA_6036328, 2000.0f, 0, 0, 5, 0, 0.0f, 0 }, /* OBJ_SCENERY_68, */ {(void*) D_MA_601B7C0, 0, (ObjectFunc) NULL, D_MA_60362F4, 2500.0f, 0, 0, 5, 0, 0.0f, 0 }, @@ -170,42 +170,42 @@ ObjectInfo gObjectInfo[] = { /* OBJ_SCENERY_74, */ {(void*) D_MA_602DC20, 0, (ObjectFunc) NULL, D_MA_603643C, 1000.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_SCENERY_75, */ {(void*) D_MA_601B0D0, 0, (ObjectFunc) NULL, D_MA_6036760, 3000.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_SCENERY_76, */ {(void*) D_MA_60075D0, 0, (ObjectFunc) NULL, gNoHitbox, 1000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_77, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, D_MA_6036344, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_78, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_79, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_80, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_81, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_82, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_83, */ {(void*) Macbeth_801A3240, 1, (ObjectFunc) Macbeth_801A2DD8, gNoHitbox, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_84, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_85, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_86, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_87, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_88, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_89, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_90, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_91, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_92, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_93, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_94, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_95, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_96, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_97, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_98, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_99, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_100 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_101 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_102 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_103 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_104 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) Macbeth_801A0BD8, D_MA_6036594, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_105 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, D_MA_6036204, 1300.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_77, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, D_MA_6036344, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_78, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_79, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_80, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_81, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_82, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_83, */ {(void*) Macbeth_Scenery83_Draw, 1, (ObjectFunc) Macbeth_Scenery83_Update, gNoHitbox, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_84, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_85, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_86, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_87, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_88, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_89, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_90, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_91, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_92, */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_93, */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_94, */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_95, */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_96, */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_97, */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_98, */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_99, */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_100 */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_101 */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_102 */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_103 */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_104 */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) Macbeth_Scenery104_Update, D_MA_6036594, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_105 */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) NULL, D_MA_6036204, 1300.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_SCENERY_106 */ {(void*) D_SY_60097E0, 0, (ObjectFunc) NULL, D_SY_6034478, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, /* OBJ_SCENERY_107 */ {(void*) D_SY_601D730, 0, (ObjectFunc) NULL, D_SY_603450C, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, /* OBJ_SCENERY_108 */ {(void*) D_SY_60102C0, 0, (ObjectFunc) NULL, D_SY_6034588, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_SCENERY_109 */ {(void*) D_SY_60036A0, 0, (ObjectFunc) SectorY_801A4E44, D_SY_6034664, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_109 */ {(void*) D_SY_60036A0, 0, (ObjectFunc) SectorY_Scenery109_Update, D_SY_6034664, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, /* OBJ_SCENERY_110 */ {(void*) D_SY_6005360, 0, (ObjectFunc) NULL, D_SY_6034770, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, /* OBJ_SCENERY_111 */ {(void*) Scenery111_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_112 */ {(void*) D_SY_600F6C0, 0, (ObjectFunc) SectorY_801A52B8, D_SY_60347F0, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_112 */ {(void*) D_SY_600F6C0, 0, (ObjectFunc) SectorY_Scenery112_Update, D_SY_60347F0, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, /* OBJ_SCENERY_113 */ {(void*) D_SY_601B610, 0, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_114 */ {(void*) D_SY_601C6A0, 0, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_115 */ {(void*) D_SY_60188D0, 0, (ObjectFunc) NULL, D_SY_603486C, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, @@ -219,13 +219,13 @@ ObjectInfo gObjectInfo[] = { /* OBJ_SCENERY_123 */ {(void*) D_AQ_60120F0, 0, (ObjectFunc) NULL, D_AQ_6030E4C, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, /* OBJ_SCENERY_124 */ {(void*) D_AQ_600EEF0, 0, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, /* OBJ_SCENERY_125 */ {(void*) D_AQ_600BF80, 0, (ObjectFunc) NULL, D_AQ_6030E68, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_SCENERY_126 */ {(void*) Aquas_801BE1FC, 1, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_SCENERY_127 */ {(void*) D_VE1_9005C80, 0, (ObjectFunc) Venom1_801924A8, D_VE1_601B678, 1000.0f, 0, 0, 42, 0, 0.0f, 0 }, + /* OBJ_SCENERY_126 */ {(void*) Aquas_Scenery126_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_127 */ {(void*) D_VE1_9005C80, 0, (ObjectFunc) Venom1_Scenery127_Update, D_VE1_601B678, 1000.0f, 0, 0, 42, 0, 0.0f, 0 }, /* OBJ_SCENERY_128 */ {(void*) D_VE1_9003F50, 0, (ObjectFunc) NULL, D_VE1_601B6C4, 3200.0f, 0, 0, 42, 0, 0.0f, 0 }, /* OBJ_SCENERY_129 */ {(void*) D_VE1_900F060, 0, (ObjectFunc) NULL, D_VE1_601B710, 3200.0f, 0, 0, 42, 0, 0.0f, 0 }, /* OBJ_SCENERY_130 */ {(void*) D_VE1_900F1D0, 0, (ObjectFunc) NULL, D_VE1_601B75C, 3200.0f, 0, 0, 42, 0, 0.0f, 0 }, - /* OBJ_SCENERY_131 */ {(void*) Andross_801935D4, 1, (ObjectFunc) Andross_8019356C, D_ANDROSS_C038BD8, 500.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_SCENERY_132 */ {(void*) Andross_8019350C, 1, (ObjectFunc) Andross_80193380, D_ANDROSS_C038A48, 500.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_131 */ {(void*) Andross_Scenery131_Draw, 1, (ObjectFunc) Andross_Scenery131_Update, D_ANDROSS_C038BD8, 500.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_132 */ {(void*) Andross_Scenery132_Draw, 1, (ObjectFunc) Andross_Scenery132_Update, D_ANDROSS_C038A48, 500.0f, 0, 0, 41, 0, 0.0f, 0 }, /* OBJ_SCENERY_133 */ {(void*) D_TR_60030F0, 0, (ObjectFunc) NULL, D_TR_6009CC4, 1000.0f, 0, 0, 20, 0, 0.0f, 0 }, /* OBJ_SCENERY_134 */ {(void*) D_VE2_6003000, 0, (ObjectFunc) NULL, D_ANDROSS_C038BA4, 0.0f, 0, 0, 41, 1, 0.0f, 0 }, /* OBJ_SCENERY_135 */ {(void*) D_VE2_6006890, 0, (ObjectFunc) NULL, D_ANDROSS_C038B40, 0.0f, 0, 0, 41, 1, 0.0f, 0 }, @@ -249,172 +249,172 @@ ObjectInfo gObjectInfo[] = { /* OBJ_SCENERY_153 */ {(void*) D_BO_600B8B0, 0, (ObjectFunc) NULL, D_BO_6011C48, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_154 */ {(void*) aKaFLBaseDL, 0, (ObjectFunc) NULL, D_KA_601115C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_155 */ {(void*) NULL, 0, (ObjectFunc) NULL, gNoHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_156 */ {(void*) SectorY_80197CB8, 1, (ObjectFunc) NULL, D_SY_6034368, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_157 */ {(void*) D_SZ_6001DA0, 0, (ObjectFunc) NULL, D_SZ_600924C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_158 */ {(void*) D_SZ_6001360, 0, (ObjectFunc) NULL, D_SZ_60092E8, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_156 */ {(void*) SectorY_Scenery156_Draw, 1, (ObjectFunc) NULL, D_SY_6034368, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_157 */ {(void*) aSzSpaceJunk3DL, 0, (ObjectFunc) NULL, D_SZ_600924C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_158 */ {(void*) aSzSpaceJunk1DL, 0, (ObjectFunc) NULL, D_SZ_60092E8, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_159 */ {(void*) D_VE2_6008370, 0, (ObjectFunc) NULL, D_VE2_601668C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_160 */ {(void*) D_VE2_6010960, 0, (ObjectFunc) NULL, D_VE2_6016714, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SPRITE_CO_POLE */ {(void*) D_CO_602F7C0, 0, (ObjectFunc) Sprite_UpdateDoodad, D_CO_603E468, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SPRITE_CO_TREE */ {(void*) D_CO_601C9B0, 0, (ObjectFunc) Sprite_UpdateDoodad, D_CO_603E484, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SPRITE_FO_POLE */ {(void*) D_FO_600A420, 0, (ObjectFunc) Sprite_UpdateDoodad, D_FO_600FE9C, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SPRITE_CO_POLE */ {(void*) aCoPoleDL, 0, (ObjectFunc) Sprite_UpdateDoodad, aCoPoleHitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SPRITE_CO_TREE */ {(void*) aCoTreeDL, 0, (ObjectFunc) Sprite_UpdateDoodad, aCoTreeHitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SPRITE_FO_POLE */ {(void*) aFoPoleDL, 0, (ObjectFunc) Sprite_UpdateDoodad, aFoPoleHitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SPRITE_FOG_SHADOW */ {(void*) FogShadow_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 1800.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SPRITE_CO_RUIN1 */ {(void*) D_CO_602DCA0, 0, (ObjectFunc) NULL, gNoHitbox, -100.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SPRITE_CO_RUIN2 */ {(void*) D_CO_601F500, 0, (ObjectFunc) NULL, gNoHitbox, -100.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SPRITE_167 */ {(void*) Sprite167_Draw, 1, (ObjectFunc) Sprite167_Update, gNoHitbox, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SPRITE_168 */ {(void*) Sprite168_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SPRITE_TI_CACTUS */ {(void*) D_TI_60023B0, 0, (ObjectFunc) Titania_Cactus_Update, D_TI_60068BC, 100.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SPRITE_CO_SMOKE */ {(void*) NULL, 1, (ObjectFunc) Corneria_801875A4, gNoHitbox, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SPRITE_TI_CACTUS */ {(void*) aTiCactusDL, 0, (ObjectFunc) Titania_Cactus_Update, aTiCactusHitbox, 100.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SPRITE_CO_SMOKE */ {(void*) NULL, 1, (ObjectFunc) Corneria_Smoke_Update, gNoHitbox, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_SPRITE_VE1_BOSS_TRIGGER1 */ {(void*) NULL, 1, (ObjectFunc) Venom1_BossTrigger1_Update, gNoHitbox, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_SPRITE_VE1_BOSS_TRIGGER2 */ {(void*) NULL, 1, (ObjectFunc) Venom1_BossTrigger2_Update, gNoHitbox, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_SPRITE_VE1_BOSS_TRIGGER3 */ {(void*) NULL, 1, (ObjectFunc) Venom1_BossTrigger3_Update, gNoHitbox, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_SPRITE_VE1_BOSS_TRIGGER4 */ {(void*) NULL, 1, (ObjectFunc) Venom1_BossTrigger4_Update, gNoHitbox, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_SPRITE_GFOX_TARGET */ {(void*) NULL, 1, (ObjectFunc) NULL, gNoHitbox, 1000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ACTOR_176 */ {(void*) Corneria_8018BAAC, 2, (ObjectFunc) Corneria_8018AED0, D_CO_603E5D0, 500.0f, 0, 0, 39, 1, 200.0f, 1 }, - /* OBJ_ACTOR_177 */ {(void*) Corneria_8018BBA4, 2, (ObjectFunc) Corneria_8018B15C, D_CO_603E5D0, 500.0f, 0, 0, 39, 1, 200.0f, 1 }, - /* OBJ_ACTOR_178 */ {(void*) Corneria_8018BBF8, 2, (ObjectFunc) Corneria_8018B418, D_CO_603E5D0, 500.0f, 0, 0, 39, 1, 200.0f, 1 }, - /* OBJ_ACTOR_179 */ {(void*) Corneria_8018BD7C, 2, (ObjectFunc) Corneria_8018B58C, D_CO_603E604, 500.0f, 0, 0, 39, 1, 0.0f, 1 }, - /* OBJ_ACTOR_180 */ {(void*) func_edisplay_8005B6A4, 1, (ObjectFunc) func_enmy_80066A80, gNoHitbox, 1000.0f, 0, 0, 39, 0, 0.0f, 1 }, - /* OBJ_ACTOR_181 */ {(void*) D_ME_6018C00, 0, (ObjectFunc) Meteo_8018756C, D_ME_602F6EC, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_182 */ {(void*) func_edisplay_8005B71C, 1, (ObjectFunc) Meteo_80187650, D_ME_602F708, 100.0f, 0, 1, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_183 */ {(void*) Meteo_8018DA6C, 1, (ObjectFunc) Meteo_8018D9EC, gNoHitbox, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, - /* OBJ_ACTOR_184 */ {(void*) Meteo_8018DAEC, 1, (ObjectFunc) Meteo_8018D9EC, gNoHitbox, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, - /* OBJ_ACTOR_185 */ {(void*) Meteo_8018DB6C, 1, (ObjectFunc) Meteo_8018D9EC, gNoHitbox, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, - /* OBJ_ACTOR_186 */ {(void*) func_edisplay_8005B7CC, 1, (ObjectFunc) Meteo_8018795C, D_ME_602F724, 200.0f, 0, 1, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_187 */ {(void*) D_ME_6018450, 0, (ObjectFunc) Meteo_801877C4, D_ME_602F740, 200.0f, 0, 1, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_188 */ {(void*) Aquas_801BEC74, 1, (ObjectFunc) Aquas_801BEC68, D_AQ_6030BE0, 200.0f, 0, 1, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_CO_GARUDA_1 */ {(void*) Corneria_CoGaruda1_Draw, 2, (ObjectFunc) Corneria_CoGaruda1_Update, CoGarudaHitbox, 500.0f, 0, 0, 39, 1, 200.0f, 1 }, + /* OBJ_ACTOR_CO_GARUDA_2 */ {(void*) Corneria_CoGaruda2_Draw, 2, (ObjectFunc) Corneria_CoGaruda2_Update, CoGarudaHitbox, 500.0f, 0, 0, 39, 1, 200.0f, 1 }, + /* OBJ_ACTOR_CO_GARUDA_3 */ {(void*) Corneria_CoGaruda3_Draw, 2, (ObjectFunc) Corneria_CoGaruda3_Update, CoGarudaHitbox, 500.0f, 0, 0, 39, 1, 200.0f, 1 }, + /* OBJ_ACTOR_CO_GARUDA_DESTROY */ {(void*) Corneria_CoGarudaDestroy_Draw, 2, (ObjectFunc) Corneria_CoGarudaDestroy_Update, aCoGarudaDestroyHitbox, 500.0f, 0, 0, 39, 1, 0.0f, 1 }, + /* OBJ_ACTOR_180 */ {(void*) Actor180_Draw, 1, (ObjectFunc) Actor180_Update, gNoHitbox, 1000.0f, 0, 0, 39, 0, 0.0f, 1 }, + /* OBJ_ACTOR_181 */ {(void*) D_ME_6018C00, 0, (ObjectFunc) Meteo_Actor181_Update, D_ME_602F6EC, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_182 */ {(void*) Actor182_Draw, 1, (ObjectFunc) Meteo_Actor182_Update, D_ME_602F708, 100.0f, 0, 1, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_183 */ {(void*) Meteo_Actor183_Draw, 1, (ObjectFunc) Meteo_ActorDoodad_Update, gNoHitbox, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, + /* OBJ_ACTOR_184 */ {(void*) Meteo_Actor184_Draw, 1, (ObjectFunc) Meteo_ActorDoodad_Update, gNoHitbox, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, + /* OBJ_ACTOR_185 */ {(void*) Meteo_Actor185_Draw, 1, (ObjectFunc) Meteo_ActorDoodad_Update, gNoHitbox, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, + /* OBJ_ACTOR_186 */ {(void*) Actor186_Draw, 1, (ObjectFunc) Meteo_Actor186_Update, D_ME_602F724, 200.0f, 0, 1, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_187 */ {(void*) D_ME_6018450, 0, (ObjectFunc) Meteo_Actor187_Update, D_ME_602F740, 200.0f, 0, 1, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_188 */ {(void*) Aquas_Actor188_Draw, 1, (ObjectFunc) Aquas_Actor188_Update, D_AQ_6030BE0, 200.0f, 0, 1, 39, 0, 1.0f, 1 }, /* OBJ_ACTOR_DEBRIS */ {(void*) ActorDebris_Draw, 1, (ObjectFunc) ActorDebris_Update, gNoHitbox, 0.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_ACTOR_190 */ {(void*) func_edisplay_8005B848, 1, (ObjectFunc) func_enmy_800656D4, gActor190_191Hitbox, 100.0f, 0, 1, 39, 0, 1.0f, 0 }, - /* OBJ_ACTOR_191 */ {(void*) func_edisplay_8005B848, 1, (ObjectFunc) func_enmy_800656D4, gActor190_191Hitbox, 100.0f, 0, 1, 39, 0, 1.0f, 0 }, - /* 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_MISSILE_SEEK_TEAM */ {(void*) Actor190_191_Draw, 1, (ObjectFunc) Actors190_191_Update, gActor190_191Hitbox, 100.0f, 0, 1, 39, 0, 1.0f, 0 }, + /* OBJ_MISSILE_SEEK_PLAYER */ {(void*) Actor190_191_Draw, 1, (ObjectFunc) Actors190_191_Update, gActor190_191Hitbox, 100.0f, 0, 1, 39, 0, 1.0f, 0 }, + /* OBJ_ACTOR_192 */ {(void*) Actor192_Draw, 1, (ObjectFunc) Actor192_Update, D_CO_603E54C, 200.0f, 0, 1, 39, 0, 50.0f, 1 }, + /* OBJ_ACTOR_193 */ {(void*) Actor193_Draw, 1, (ObjectFunc) Actor193_Update, 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_CUTSCENE */ {(void*) ActorCutscene_Draw, 1, (ObjectFunc) ActorCutscene_Update, gNoHitbox, 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 }, - /* OBJ_ACTOR_199 */ {(void*) Andross_80188448, 1, (ObjectFunc) Andross_801880E4, gNoHitbox, 20000.0f, 0, 0, 39, 1, 0.0f, 0 }, + /* OBJ_ACTOR_199 */ {(void*) Andross_Actor199_Draw, 1, (ObjectFunc) Andross_Actor199_Update, gNoHitbox, 20000.0f, 0, 0, 39, 1, 0.0f, 0 }, /* OBJ_ACTOR_EVENT */ {(void*) ActorEvent_Draw, 1, (ObjectFunc) ActorEvent_Update, gNoHitbox, 2000.0f, 0, 1, 39, 0, 0.0f, 1 }, /* OBJ_ACTOR_201 */ {(void*) Actor201_Draw, 1, (ObjectFunc) Actor201_Update, D_ME_602F684, 100.0f, 0, 1, 39, 0, 1.0f, 1 }, /* OBJ_ACTOR_202 */ {(void*) Actor202_Draw, 1, (ObjectFunc) Actor202_Update, D_ME_602F6A0, 100.0f, 0, 1, 39, 0, 180.0f, 1 }, - /* OBJ_ACTOR_SLIPPY_SX */ {(void*) SectorX_8018F884, 1, (ObjectFunc) SectorX_8018F330, gNoHitbox, 1000.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_ACTOR_SLIPPY_SX */ {(void*) SectorX_Slippy_Draw, 1, (ObjectFunc) SectorX_Slippy_Update, gNoHitbox, 1000.0f, 0, 0, 39, 0, 0.0f, 0 }, /* OBJ_ACTOR_204 */ {(void*) SectorY_Actor204_Draw, 1, (ObjectFunc) SectorY_Actor204_Update, D_SY_603405C, 1000.0f, 0, 0, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_205 */ {(void*) Macbeth_801A12C4, 1, (ObjectFunc) Macbeth_8019C778, D_MA_60359C8, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_206 */ {(void*) Macbeth_801A12C4, 1, (ObjectFunc) Macbeth_801AC438, D_MA_6035A48, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_207 */ {(void*) Macbeth_801AC294, 2, (ObjectFunc) Macbeth_801A7E7C, D_MA_603677C, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_208 */ {(void*) Macbeth_801A12C4, 1, (ObjectFunc) Macbeth_8019EA60, D_MA_6035A14, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_209 */ {(void*) Macbeth_801A12C4, 1, (ObjectFunc) Macbeth_8019D700, D_MA_6035AE0, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_210 */ {(void*) Macbeth_801A12C4, 1, (ObjectFunc) Macbeth_8019CE88, D_MA_6035D9C, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_211 */ {(void*) Macbeth_801A12C4, 1, (ObjectFunc) Macbeth_8019E410, D_MA_6035E04, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_212 */ {(void*) Macbeth_801A12C4, 1, (ObjectFunc) Macbeth_8019FF9C, D_MA_60360C0, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_213 */ {(void*) Macbeth_801A12C4, 1, (ObjectFunc) Macbeth_8019EE68, D_MA_6036154, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_214 */ {(void*) Macbeth_801A43BC, 1, (ObjectFunc) Macbeth_801A3E98, D_MA_6036458, 300.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_215 */ {(void*) Macbeth_801A4A64, 1, (ObjectFunc) Macbeth_801A46A0, D_MA_60364C0, 300.0f, 0, 1, 40, 1, 0.0f, 1 }, - /* OBJ_ACTOR_216 */ {(void*) Macbeth_801A5F90, 1, (ObjectFunc) Macbeth_801A5E54, D_MA_60366EC, 200.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_217 */ {(void*) Macbeth_801A6100, 1, (ObjectFunc) Macbeth_801A5FD0, D_MA_6036708, 200.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_218 */ {(void*) Macbeth_801A6540, 1, (ObjectFunc) Macbeth_801A6144, D_MA_6036728, 200.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_219 */ {(void*) Macbeth_801A68EC, 1, (ObjectFunc) Macbeth_801A67C8, D_MA_6036744, 300.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_220 */ {(void*) Macbeth_801ADAC8, 1, (ObjectFunc) Macbeth_801AD6F0, D_MA_6036930, 200.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_221 */ {(void*) Macbeth_801AE2C0, 1, (ObjectFunc) Macbeth_801ADD68, D_MA_603694C, 300.0f, 0, 0, 40, 1, 1.0f, 0 }, - /* OBJ_ACTOR_222 */ {(void*) Macbeth_801AEEFC, 1, (ObjectFunc) Macbeth_801AEC04, D_MA_6036968, 300.0f, 0, 0, 40, 1, 1.0f, 0 }, - /* OBJ_ACTOR_223 */ {(void*) Macbeth_801A54E8, 1, (ObjectFunc) Macbeth_801A4B24, D_MA_60364DC, 300.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_224 */ {(void*) NULL, 1, (ObjectFunc) Titania_80189194, gNoHitbox, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_ACTOR_225 */ {(void*) D_TI1_700AB70, 0, (ObjectFunc) Titania_8018AB44, D_TI_60064AC, 50.0f, 0, 0, 39, 1, 1.0f, 0 }, - /* OBJ_ACTOR_226 */ {(void*) Titania_80189AFC, 1, (ObjectFunc) Titania_801895B8, D_TI_60064C8, 300.0f, 0, 0, 39, 1, 70.0f, 1 }, - /* OBJ_ACTOR_227 */ {(void*) Titania_8018E5B4, 1, (ObjectFunc) Titania_8018E54C, D_TI_60067C4, 0.0f, 0, 0, 39, 1, 0.0f, 0 }, - /* OBJ_ACTOR_228 */ {(void*) Titania_8018EF14, 1, (ObjectFunc) Titania_8018E5F8, D_TI_6006808, 0.0f, 0, 0, 39, 1, 1.0f, 1 }, - /* OBJ_ACTOR_229 */ {(void*) Titania_8018E2D8, 1, (ObjectFunc) Titania_8018C8A8, D_TI_6006A3C, 1000.0f, 0, 0, 20, 1, 0.0f, 1 }, - /* OBJ_ACTOR_230 */ {(void*) Titania_8018AABC, 1, (ObjectFunc) Titania_8018A544, D_TI_600683C, 0.0f, 0, 1, 39, 1, 0.0f, 1 }, - /* OBJ_ACTOR_231 */ {(void*) Titania_8018BE84, 1, (ObjectFunc) Titania_8018B9D0, D_TI_6006858, 0.0f, 0, 0, 39, 1, 0.0f, 1 }, - /* OBJ_ACTOR_232 */ {(void*) Titania_8018B6AC, 1, (ObjectFunc) Titania_8018B268, D_TI_6006890, 0.0f, 0, 0, 39, 1, 20.0f, 1 }, - /* OBJ_ACTOR_233 */ {(void*) Titania_8018A1C0, 1, (ObjectFunc) Titania_80189CC8, D_TI_60068F0, 200.0f, 0, 0, 39, 1, 1.0f, 1 }, + /* OBJ_ACTOR_205 */ {(void*) Macbeth_ActorDoodad_Draw, 1, (ObjectFunc) Macbeth_Actor205_Update, D_MA_60359C8, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_206 */ {(void*) Macbeth_ActorDoodad_Draw, 1, (ObjectFunc) Macbeth_Actor206_Update, D_MA_6035A48, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_207 */ {(void*) Macbeth_Actor207_Draw, 2, (ObjectFunc) Macbeth_Actor207_Update, D_MA_603677C, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_208 */ {(void*) Macbeth_ActorDoodad_Draw, 1, (ObjectFunc) Macbeth_Actor208_Update, D_MA_6035A14, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_209 */ {(void*) Macbeth_ActorDoodad_Draw, 1, (ObjectFunc) Macbeth_Actor209_Update, D_MA_6035AE0, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_210 */ {(void*) Macbeth_ActorDoodad_Draw, 1, (ObjectFunc) Macbeth_Actor210_Update, D_MA_6035D9C, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_211 */ {(void*) Macbeth_ActorDoodad_Draw, 1, (ObjectFunc) Macbeth_Actor211_Update, D_MA_6035E04, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_212 */ {(void*) Macbeth_ActorDoodad_Draw, 1, (ObjectFunc) Macbeth_Actor212_Update, D_MA_60360C0, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_213 */ {(void*) Macbeth_ActorDoodad_Draw, 1, (ObjectFunc) Macbeth_Actor213_Update, D_MA_6036154, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_214 */ {(void*) Macbeth_Actor214_Draw, 1, (ObjectFunc) Macbeth_Actor214_Update, D_MA_6036458, 300.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_215 */ {(void*) Macbeth_Actor215_Draw, 1, (ObjectFunc) Macbeth_Actor215_Update, D_MA_60364C0, 300.0f, 0, 1, 40, 1, 0.0f, 1 }, + /* OBJ_ACTOR_216 */ {(void*) Macbeth_Actor216_Draw, 1, (ObjectFunc) Macbeth_Actor216_Update, D_MA_60366EC, 200.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_217 */ {(void*) Macbeth_Actor217_Draw, 1, (ObjectFunc) Macbeth_Actor217_Update, D_MA_6036708, 200.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_218 */ {(void*) Macbeth_Actor218_Draw, 1, (ObjectFunc) Macbeth_Actor218_Update, D_MA_6036728, 200.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_219 */ {(void*) Macbeth_Actor219_Draw, 1, (ObjectFunc) Macbeth_Actor219_Update, D_MA_6036744, 300.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_220 */ {(void*) Macbeth_Actor220_Draw, 1, (ObjectFunc) Macbeth_Actor220_Update, D_MA_6036930, 200.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_221 */ {(void*) Macbeth_Actor221_Draw, 1, (ObjectFunc) Macbeth_Actor221_Update, D_MA_603694C, 300.0f, 0, 0, 40, 1, 1.0f, 0 }, + /* OBJ_ACTOR_222 */ {(void*) Macbeth_Actor222_Draw, 1, (ObjectFunc) Macbeth_Actor222_Update, D_MA_6036968, 300.0f, 0, 0, 40, 1, 1.0f, 0 }, + /* OBJ_ACTOR_223 */ {(void*) Macbeth_Actor223_Draw, 1, (ObjectFunc) Macbeth_Actor223_Update, D_MA_60364DC, 300.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_224 */ {(void*) NULL, 1, (ObjectFunc) Titania_Actor224_Update, gNoHitbox, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_ACTOR_225 */ {(void*) D_TI1_700AB70, 0, (ObjectFunc) Titania_Actor225_Update, D_TI_60064AC, 50.0f, 0, 0, 39, 1, 1.0f, 0 }, + /* OBJ_ACTOR_226 */ {(void*) Titania_Actor226_Draw, 1, (ObjectFunc) Titania_Actor226_Update, D_TI_60064C8, 300.0f, 0, 0, 39, 1, 70.0f, 1 }, + /* OBJ_ACTOR_227 */ {(void*) Titania_Actor227_Draw, 1, (ObjectFunc) Titania_Actor227_Update, D_TI_60067C4, 0.0f, 0, 0, 39, 1, 0.0f, 0 }, + /* OBJ_ACTOR_228 */ {(void*) Titania_Actor228_Draw, 1, (ObjectFunc) Titania_Actor228_Update, D_TI_6006808, 0.0f, 0, 0, 39, 1, 1.0f, 1 }, + /* OBJ_ACTOR_229 */ {(void*) Titania_Actor229_Draw, 1, (ObjectFunc) Titania_Actor229_Update, D_TI_6006A3C, 1000.0f, 0, 0, 20, 1, 0.0f, 1 }, + /* OBJ_ACTOR_230 */ {(void*) Titania_Actor230_Draw, 1, (ObjectFunc) Titania_Actor230_Update, D_TI_600683C, 0.0f, 0, 1, 39, 1, 0.0f, 1 }, + /* OBJ_ACTOR_231 */ {(void*) Titania_Actor231_Draw, 1, (ObjectFunc) Titania_Actor231_Update, D_TI_6006858, 0.0f, 0, 0, 39, 1, 0.0f, 1 }, + /* OBJ_ACTOR_232 */ {(void*) Titania_Actor232_Draw, 1, (ObjectFunc) Titania_Actor232_Update, D_TI_6006890, 0.0f, 0, 0, 39, 1, 20.0f, 1 }, + /* OBJ_ACTOR_233 */ {(void*) Titania_Actor233_Draw, 1, (ObjectFunc) Titania_Actor233_Update, D_TI_60068F0, 200.0f, 0, 0, 39, 1, 1.0f, 1 }, /* OBJ_ACTOR_234 */ {(void*) Actor234_Draw, 1, (ObjectFunc) Actor234_Update, gNoHitbox, 2000.0f, 0, 0, 39, 0, 0.0f, 5 }, - /* OBJ_ACTOR_235 */ {(void*) Zoness_80190430, 2, (ObjectFunc) Zoness_801904CC, D_ZO_602C294, 1000.0f, 0, 1, 40, 0, 1.0f, 1 }, - /* OBJ_ACTOR_236 */ {(void*) Zoness_80190F08, 1, (ObjectFunc) Zoness_80190A00, D_ZO_602BC58, 5000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_235 */ {(void*) Zoness_Actor235_Draw, 2, (ObjectFunc) Zoness_Actor235_Update, D_ZO_602C294, 1000.0f, 0, 1, 40, 0, 1.0f, 1 }, + /* OBJ_ACTOR_236 */ {(void*) Zoness_Actor236_Draw, 1, (ObjectFunc) Zoness_Actor236_Update, D_ZO_602BC58, 5000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_237 */ {(void*) Actor237_Draw, 1, (ObjectFunc) Actor237_Update, gNoHitbox, 200.0f, 0, 0, 40, 0, 0.0f, 2 }, - /* OBJ_ACTOR_238 */ {(void*) Zoness_801914C4, 2, (ObjectFunc) Zoness_80191010, gCubeHitbox100, 200.0f, 0, 1, 40, 0, 1.0f, 1 }, + /* OBJ_ACTOR_238 */ {(void*) Zoness_Actor238_Draw, 2, (ObjectFunc) Zoness_Actor238_Update, gCubeHitbox100, 200.0f, 0, 1, 40, 0, 1.0f, 1 }, /* OBJ_ACTOR_239 */ {(void*) NULL, 1, (ObjectFunc) NULL, gNoHitbox, 1000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ACTOR_240 */ {(void*) Zoness_80191B4C, 1, (ObjectFunc) Zoness_80191680, gCubeHitbox100, 1500.0f, 0, 1, 40, 0, 20.0f, 0 }, - /* OBJ_ACTOR_241 */ {(void*) Zoness_80191DB0, 1, (ObjectFunc) Zoness_80191BC4, gActor241Hitbox, 1500.0f, 0, 1, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_242 */ {(void*) Zoness_80191FFC, 2, (ObjectFunc) Zoness_80192094, D_ZO_602BE3C, 500.0f, 0, 0, 40, 0, 1.0f, 0 }, - /* OBJ_ACTOR_243 */ {(void*) Zoness_80192C18, 2, (ObjectFunc) Zoness_80192834, gCubeHitbox100, 0.0f, 0, 1, 40, 0, 1.0f, 1 }, - /* OBJ_ACTOR_244 */ {(void*) Zoness_80193240, 2, (ObjectFunc) Zoness_80192E64, D_ZO_602BE58, 2000.0f, 0, 0, 40, 0, 50.0f, 0 }, - /* OBJ_ACTOR_245 */ {(void*) Zoness_8019983C, 1, (ObjectFunc) Zoness_8019969C, gCubeHitbox100, 200.0f, 0, 0, 40, 0, 1.0f, 0 }, - /* OBJ_ACTOR_246 */ {(void*) Zoness_80199E24, 1, (ObjectFunc) Zoness_80199A28, gCubeHitbox100, 2000.0f, 0, 0, 40, 0, 1.0f, 0 }, - /* OBJ_ACTOR_247 */ {(void*) Zoness_8019D3C4, 1, (ObjectFunc) Zoness_8019D15C, D_ZO_602BFC4, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_248 */ {(void*) Zoness_8019A1FC, 1, (ObjectFunc) Zoness_80199F10, gCubeHitbox150, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_249 */ {(void*) Zoness_8019ACCC, 1, (ObjectFunc) Zoness_8019A5D4, gCubeHitbox200, 5000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_250 */ {(void*) Zoness_8019B7DC, 1, (ObjectFunc) Zoness_8019B548, D_ZO_602C1D4, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_251 */ {(void*) Zoness_8019BDE0, 2, (ObjectFunc) Zoness_8019B854, D_ZO_602C218, 1000.0f, 0, 0, 40, 0, 1.0f, 1 }, - /* OBJ_ACTOR_252 */ {(void*) Zoness_8019C1CC, 1, (ObjectFunc) Zoness_8019BE48, D_ZO_602C234, 200.0f, 0, 0, 40, 0, 80.0f, 1 }, - /* OBJ_ACTOR_253 */ {(void*) Zoness_8019C83C, 1, (ObjectFunc) Zoness_8019C454, D_ZO_602C250, 300.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_254 */ {(void*) Zoness_8019CE58, 1, (ObjectFunc) Zoness_8019CBEC, D_ZO_602C2B0, 300.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ACTOR_255 */ {(void*) Aquas_801AE168, 1, (ObjectFunc) Aquas_801AD6C0, D_AQ_6030BFC, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_256 */ {(void*) Aquas_801AEB44, 1, (ObjectFunc) Aquas_801AE3D8, D_AQ_6030C18, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_257 */ {(void*) Aquas_801B099C, 1, (ObjectFunc) Aquas_801AFA5C, D_AQ_6030C44, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_258 */ {(void*) Aquas_801B0EC0, 1, (ObjectFunc) Aquas_801B0B60, gCubeHitbox100, 200.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_259 */ {(void*) Aquas_801B619C, 2, (ObjectFunc) Aquas_801B638C, D_AQ_6031398, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_260 */ {(void*) Aquas_801B90DC, 2, (ObjectFunc) Aquas_801B7C78, D_AQ_60313CC, 300.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_261 */ {(void*) Aquas_801B504C, 2, (ObjectFunc) Aquas_801B50E8, D_AQ_6031400, 300.0f, 0, 0, 40, 0, 0.0f, 1 }, - /* OBJ_ACTOR_262 */ {(void*) Aquas_801B7A24, 2, (ObjectFunc) Aquas_801B6FF8, D_AQ_603144C, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_263 */ {(void*) Aquas_801BA108, 2, (ObjectFunc) Aquas_801B91A4, D_AQ_6031480, 200.0f, 0, 0, 40, 0, 0.0f, 1 }, - /* OBJ_ACTOR_264 */ {(void*) Aquas_801BA4E4, 1, (ObjectFunc) Aquas_801BA26C, gCubeHitbox100, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ACTOR_265 */ {(void*) Aquas_801BAD7C, 1, (ObjectFunc) Aquas_801BA6A4, D_AQ_6031500, 200.0f, 0, 0, 40, 0, 0.0f, 1 }, - /* OBJ_ACTOR_266 */ {(void*) Aquas_801BB204, 2, (ObjectFunc) Aquas_801BADF8, D_AQ_6031538, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ACTOR_267 */ {(void*) Aquas_801BC930, 2, (ObjectFunc) Aquas_801BB79C, D_AQ_6031554, 800.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_268 */ {(void*) Aquas_801BDE6C, 1, (ObjectFunc) Aquas_801BD54C, D_AQ_6031570, 10000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ACTOR_269 */ {(void*) Aquas_801BD264, 1, (ObjectFunc) Aquas_801BC9A0, D_AQ_6030D20, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_270 */ {(void*) Aquas_801BEB1C, 1, (ObjectFunc) Aquas_801BE3F8, D_AQ_60314C8, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_240 */ {(void*) Zoness_Actor240_Draw, 1, (ObjectFunc) Zoness_Actor240_Update, gCubeHitbox100, 1500.0f, 0, 1, 40, 0, 20.0f, 0 }, + /* OBJ_ACTOR_241 */ {(void*) Zoness_Actor241_Draw, 1, (ObjectFunc) Zoness_Actor241_Update, gActor241Hitbox, 1500.0f, 0, 1, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_242 */ {(void*) Zoness_Actor242_Draw, 2, (ObjectFunc) Zoness_Actor242_Update, D_ZO_602BE3C, 500.0f, 0, 0, 40, 0, 1.0f, 0 }, + /* OBJ_ACTOR_243 */ {(void*) Zoness_Actor243_Draw, 2, (ObjectFunc) Zoness_Actor243_Update, gCubeHitbox100, 0.0f, 0, 1, 40, 0, 1.0f, 1 }, + /* OBJ_ACTOR_244 */ {(void*) Zoness_Actor244_Draw, 2, (ObjectFunc) Zoness_Actor244_Update, D_ZO_602BE58, 2000.0f, 0, 0, 40, 0, 50.0f, 0 }, + /* OBJ_ACTOR_245 */ {(void*) Zoness_Actor245_Draw, 1, (ObjectFunc) Zoness_Actor245_Update, gCubeHitbox100, 200.0f, 0, 0, 40, 0, 1.0f, 0 }, + /* OBJ_ACTOR_246 */ {(void*) Zoness_Actor246_Draw, 1, (ObjectFunc) Zoness_Actor246_Update, gCubeHitbox100, 2000.0f, 0, 0, 40, 0, 1.0f, 0 }, + /* OBJ_ACTOR_247 */ {(void*) Zoness_Actor247_Draw, 1, (ObjectFunc) Zoness_Actor247_Update, D_ZO_602BFC4, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_248 */ {(void*) Zoness_Actor248_Draw, 1, (ObjectFunc) Zoness_Actor248_Update, gCubeHitbox150, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_249 */ {(void*) Zoness_Actor249_Draw, 1, (ObjectFunc) Zoness_Actor249_Update, gCubeHitbox200, 5000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_250 */ {(void*) Zoness_Actor250_Draw, 1, (ObjectFunc) Zoness_Actor250_Update, D_ZO_602C1D4, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_251 */ {(void*) Zoness_Actor251_Draw, 2, (ObjectFunc) Zoness_Actor251_Update, D_ZO_602C218, 1000.0f, 0, 0, 40, 0, 1.0f, 1 }, + /* OBJ_ACTOR_252 */ {(void*) Zoness_Actor252_Draw, 1, (ObjectFunc) Zoness_Actor252_Update, D_ZO_602C234, 200.0f, 0, 0, 40, 0, 80.0f, 1 }, + /* OBJ_ACTOR_253 */ {(void*) Zoness_Actor253_Draw, 1, (ObjectFunc) Zoness_Actor253_Update, D_ZO_602C250, 300.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_254 */ {(void*) Zoness_Actor254_Draw, 1, (ObjectFunc) Zoness_Actor254_Update, D_ZO_602C2B0, 300.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ACTOR_255 */ {(void*) Aquas_Actor255_Draw, 1, (ObjectFunc) Aquas_Actor255_Update, D_AQ_6030BFC, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_256 */ {(void*) Aquas_Actor256_Draw, 1, (ObjectFunc) Aquas_Actor256_Update, D_AQ_6030C18, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_257 */ {(void*) Aquas_Actor257_Draw, 1, (ObjectFunc) Aquas_Actor257_Update, D_AQ_6030C44, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_258 */ {(void*) Aquas_Actor258_Draw, 1, (ObjectFunc) Aquas_Actor258_Update, gCubeHitbox100, 200.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_259 */ {(void*) Aquas_Actor259_Draw, 2, (ObjectFunc) Aquas_Actor259_Update, D_AQ_6031398, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_260 */ {(void*) Aquas_Actor260_Draw, 2, (ObjectFunc) Aquas_Actor260_Update, D_AQ_60313CC, 300.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_261 */ {(void*) Aquas_Actor261_Draw, 2, (ObjectFunc) Aquas_Actor261_Update, D_AQ_6031400, 300.0f, 0, 0, 40, 0, 0.0f, 1 }, + /* OBJ_ACTOR_262 */ {(void*) Aquas_Actor262_Draw, 2, (ObjectFunc) Aquas_Actor262_Update, D_AQ_603144C, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_263 */ {(void*) Aquas_Actor263_Draw, 2, (ObjectFunc) Aquas_Actor263_Update, D_AQ_6031480, 200.0f, 0, 0, 40, 0, 0.0f, 1 }, + /* OBJ_ACTOR_264 */ {(void*) Aquas_Actor264_Draw, 1, (ObjectFunc) Aquas_Actor264_Update, gCubeHitbox100, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ACTOR_265 */ {(void*) Aquas_Actor265_Draw, 1, (ObjectFunc) Aquas_Actor265_Update, D_AQ_6031500, 200.0f, 0, 0, 40, 0, 0.0f, 1 }, + /* OBJ_ACTOR_266 */ {(void*) Aquas_Actor266_Draw, 2, (ObjectFunc) Aquas_Actor266_Update, D_AQ_6031538, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ACTOR_267 */ {(void*) Aquas_Actor267_Draw, 2, (ObjectFunc) Aquas_Actor267_Update, D_AQ_6031554, 800.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_268 */ {(void*) Aquas_Actor268_Draw, 1, (ObjectFunc) Aquas_Actor268_Update, D_AQ_6031570, 10000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ACTOR_269 */ {(void*) Aquas_Actor269_Draw, 1, (ObjectFunc) Aquas_Actor269_Update, D_AQ_6030D20, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_270 */ {(void*) Aquas_Actor270_Draw, 1, (ObjectFunc) Aquas_Actor270_Update, D_AQ_60314C8, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_271 */ {(void*) Actor271_Draw, 2, (ObjectFunc) Actor271_Update, D_BO_6011B24, 0.0f, 0, 0, 39, 0, 730.0f, 1 }, /* OBJ_ACTOR_272 */ {(void*) Actor272_Draw, 1, (ObjectFunc) Actor272_Update, D_BO_6011BF4, 0.0f, 0, 0, 39, 0, 150.0f, 1 }, - /* OBJ_ACTOR_273 */ {(void*) Fortuna_80188FE4, 2, (ObjectFunc) Fortuna_80188AD0, D_FO_600FF30, 0.0f, 0, 0, 39, 0, 220.0f, 1 }, - /* OBJ_ACTOR_274 */ {(void*) SectorZ_8019E3A8, 1, (ObjectFunc) SectorZ_8019E234, gCubeHitbox200, 0.0f, 0, 0, 39, 0, 1.0f, 0 }, - /* OBJ_ACTOR_275 */ {(void*) Solar_8019F7AC, 1, (ObjectFunc) Solar_8019F20C, gCubeHitbox100, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_276 */ {(void*) Solar_8019F7AC, 1, (ObjectFunc) Solar_8019F20C, gCubeHitbox100, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_277 */ {(void*) Solar_8019F7AC, 1, (ObjectFunc) Solar_8019F20C, gCubeHitbox200, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_278 */ {(void*) NULL, 1, (ObjectFunc) Solar_8019EA7C, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* OBJ_ACTOR_279 */ {(void*) NULL, 1, (ObjectFunc) Solar_801A003C, gNoHitbox, 1000.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* OBJ_ACTOR_280 */ {(void*) D_VE1_900DD20, 0, (ObjectFunc) Venom1_80192518, D_VE1_601B7F8, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_281 */ {(void*) Venom1_80192E2C, 1, (ObjectFunc) Venom1_80192CD4, D_VE1_601B830, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_282 */ {(void*) D_VE1_901DA50, 0, (ObjectFunc) Venom1_80192CD4, D_VE1_601B868, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_283 */ {(void*) D_VE1_9023AD0, 0, (ObjectFunc) Venom1_80192EB0, D_VE1_601B8A0, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_284 */ {(void*) Venom1_801934D0, 1, (ObjectFunc) Venom1_801933DC, D_VE1_601B8D8, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_285 */ {(void*) Andross_80193244, 1, (ObjectFunc) Andross_80192E94, gCubeHitbox100, 1000.0f, 0, 0, 20, 0, 1.0f, 1 }, - /* OBJ_ACTOR_286 */ {(void*) Andross_80188660, 1, (ObjectFunc) Andross_80188528, gCubeHitbox100, 1000.0f, 0, 0, 20, 0, 0.0f, 0 }, - /* OBJ_ACTOR_287 */ {(void*) NULL, 1, (ObjectFunc) Andross_80189724, gNoHitbox, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_288 */ {(void*) NULL, 1, (ObjectFunc) Andross_801893B8, gNoHitbox, 1000.0f, 0, 0, 20, 1, 0.0f, 0 }, - /* OBJ_ACTOR_289 */ {(void*) func_edata_800596B0, 1, (ObjectFunc) Andross_80189470, gNoHitbox, 1000.0f, 0, 0, 20, 1, 0.0f, 0 }, - /* OBJ_ACTOR_290 */ {(void*) NULL, 1, (ObjectFunc) Andross_8018933C, gNoHitbox, 1000.0f, 0, 0, 20, 0, 0.0f, 0 }, + /* OBJ_ACTOR_FO_RADAR */ {(void*) Fortuna_Radar_Draw, 2, (ObjectFunc) Fortuna_Radar_Update, aFoRadarHitbox, 0.0f, 0, 0, 39, 0, 220.0f, 1 }, + /* OBJ_ACTOR_SZ_SPACE_JUNK */ {(void*) SectorZ_SpaceJunkDraw, 1, (ObjectFunc) SectorZ_SpaceJunkUpdate, gCubeHitbox200, 0.0f, 0, 0, 39, 0, 1.0f, 0 }, + /* OBJ_ACTOR_275 */ {(void*) Solar_Doodad_Draw, 1, (ObjectFunc) Solar_Doodad_Update, gCubeHitbox100, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_276 */ {(void*) Solar_Doodad_Draw, 1, (ObjectFunc) Solar_Doodad_Update, gCubeHitbox100, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_277 */ {(void*) Solar_Doodad_Draw, 1, (ObjectFunc) Solar_Doodad_Update, gCubeHitbox200, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_278 */ {(void*) NULL, 1, (ObjectFunc) Solar_Actor278_Update, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* OBJ_ACTOR_279 */ {(void*) NULL, 1, (ObjectFunc) Solar_Actor279_Update, gNoHitbox, 1000.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* OBJ_ACTOR_280 */ {(void*) D_VE1_900DD20, 0, (ObjectFunc) Venom1_Actor280_Update, D_VE1_601B7F8, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_281 */ {(void*) Venom1_Actor281_Draw, 1, (ObjectFunc) Venom1_Doodad_Update, D_VE1_601B830, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_282 */ {(void*) D_VE1_901DA50, 0, (ObjectFunc) Venom1_Doodad_Update, D_VE1_601B868, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_283 */ {(void*) D_VE1_9023AD0, 0, (ObjectFunc) Venom1_Actor283_Update, D_VE1_601B8A0, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_284 */ {(void*) Venom1_Actor284_Draw, 1, (ObjectFunc) Venom1_Actor284_Update, D_VE1_601B8D8, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_285 */ {(void*) Andross_Actor285_Draw, 1, (ObjectFunc) Andross_Actor285_Update, gCubeHitbox100, 1000.0f, 0, 0, 20, 0, 1.0f, 1 }, + /* OBJ_ACTOR_286 */ {(void*) Andross_Actor286_Draw, 1, (ObjectFunc) Andross_Actor286_Update, gCubeHitbox100, 1000.0f, 0, 0, 20, 0, 0.0f, 0 }, + /* OBJ_ACTOR_287 */ {(void*) NULL, 1, (ObjectFunc) Andross_Actor287_Update, gNoHitbox, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_288 */ {(void*) NULL, 1, (ObjectFunc) Andross_Actor288_Update, gNoHitbox, 1000.0f, 0, 0, 20, 1, 0.0f, 0 }, + /* OBJ_ACTOR_289 */ {(void*) Actor289_Draw, 1, (ObjectFunc) Andross_Actor289_Update, gNoHitbox, 1000.0f, 0, 0, 20, 1, 0.0f, 0 }, + /* OBJ_ACTOR_290 */ {(void*) NULL, 1, (ObjectFunc) Andross_Actor290_Update, gNoHitbox, 1000.0f, 0, 0, 20, 0, 0.0f, 0 }, /* OBJ_ACTOR_SUPPLIES */ {(void*) ActorSupplies_Draw, 1, (ObjectFunc) ActorSupplies_Update, gCubeHitbox150, 1000.0f, 0, 0, 0, 0, 1.0f, 0 }, - /* OBJ_BOSS_292 */ {(void*) Corneria_8018AA74, 2, (ObjectFunc) Corneria_80189058, D_CO_603E620, 20000.0f, 0, 0, 40, 1, 0.0f, 10 }, - /* OBJ_BOSS_293 */ {(void*) Corneria_8018ECAC, 1, (ObjectFunc) Corneria_8018C19C, D_CO_603E840, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_294 */ {(void*) Corneria_8018ED78, 1, (ObjectFunc) Corneria_8018DDAC, D_CO_603E714, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_295 */ {(void*) Corneria_8018EE84, 1, (ObjectFunc) Corneria_8018E290, D_CO_603E748, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_296 */ {(void*) Corneria_8018EF90, 1, (ObjectFunc) Corneria_8018E76C, D_CO_603E7C4, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_297 */ {(void*) Meteo_8018BACC, 1, (ObjectFunc) Meteo_8018978C, D_ME_602F75C, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_298 */ {(void*) Meteo_801887D0, 1, (ObjectFunc) Meteo_80188344, D_ME_602FA50, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_CO_GRANGA */ {(void*) Corneria_Granga_Draw, 2, (ObjectFunc) Corneria_Granga_Update, aCoGrangaHitbox, 20000.0f, 0, 0, 40, 1, 0.0f, 10 }, + /* OBJ_BOSS_CO_CARRIER */ {(void*) Corneria_Carrier_Draw, 1, (ObjectFunc) Corneria_Carrier_Update, aCoCarrierHitbox, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_294 */ {(void*) Corneria_Boss294_Draw, 1, (ObjectFunc) Corneria_Boss294_Update, D_CO_603E714, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_295 */ {(void*) Corneria_Boss295_Draw, 1, (ObjectFunc) Corneria_Boss295_Update, D_CO_603E748, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_296 */ {(void*) Corneria_Boss296_Draw, 1, (ObjectFunc) Corneria_Boss296_Update, D_CO_603E7C4, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_297 */ {(void*) Meteo_Boss297_Draw, 1, (ObjectFunc) Meteo_Boss297_Update, D_ME_602F75C, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_298 */ {(void*) Meteo_Boss298_Draw, 1, (ObjectFunc) Meteo_Boss298_Update, D_ME_602FA50, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_299 */ {(void*) Boss299_Draw, 2, (ObjectFunc) Boss299_Update, gNoHitbox, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_300 */ {(void*) Boss300_Draw, 1, (ObjectFunc) Boss300_Update, gNoHitbox, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_301 */ {(void*) Aquas_Boss301_Draw, 1, (ObjectFunc) Aquas_Boss301_Update, D_AQ_6030B10, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_A6 */ {(void*) Area6_Boss_Draw, 1, (ObjectFunc) Area6_Boss_Update, D_A6_6028454, 2000.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_303 */ {(void*) SectorX_80193434, 2, (ObjectFunc) SectorX_80190078, D_SX_6032550, 20000.0f, 0, 0, 20, 0, 0.0f, 10 }, - /* OBJ_BOSS_304 */ {(void*) SectorX_8018FF84, 2, (ObjectFunc) SectorX_8018FE38, D_SX_6032488, 1000.0f, 0, 0, 20, 0, 0.0f, 10 }, - /* OBJ_BOSS_305 */ {(void*) SectorX_80190020, 2, (ObjectFunc) SectorX_8018FF20, D_SX_60324EC, 1000.0f, 0, 0, 20, 0, 0.0f, 10 }, + /* OBJ_BOSS_SX_SPYBORG */ {(void*) SectorX_Boss_Draw, 2, (ObjectFunc) SectorX_Boss_Update, D_SX_6032550, 20000.0f, 0, 0, 20, 0, 0.0f, 10 }, + /* OBJ_BOSS_304 */ {(void*) SectorX_Boss304_Draw, 2, (ObjectFunc) SectorX_Boss304_Update, D_SX_6032488, 1000.0f, 0, 0, 20, 0, 0.0f, 10 }, + /* OBJ_BOSS_305 */ {(void*) SectorX_Boss305_Draw, 2, (ObjectFunc) SectorX_Boss305_Update, D_SX_60324EC, 1000.0f, 0, 0, 20, 0, 0.0f, 10 }, /* OBJ_BOSS_TI */ {(void*) Titania_Boss_Draw, 1, (ObjectFunc) Titania_Boss_Update,D_TI_801B83A8, 1000.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_ZO */ {(void*) Zoness_Boss_Draw, 2, (ObjectFunc) Zoness_Boss_Update, D_ZO_602C044, 1000.0f, 0, 0, 40, 0, 1.0f, 10 }, /* OBJ_BOSS_FO */ {(void*) HUD_BossFO_Draw, 1, (ObjectFunc) HUD_BossFO_Update, D_FO_600FFE0, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_309 */ {(void*) Boss309_Draw, 1, (ObjectFunc) Boss309_Update, gNoHitbox, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_310 */ {(void*) Boss310_Draw, 1, (ObjectFunc) Boss310_Update, gNoHitbox, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, - /* OBJ_BOSS_311 */ {(void*) Bolse_80191AFC, 2, (ObjectFunc) Bolse_801912FC, D_BO_6011C80, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, + /* OBJ_BOSS_311 */ {(void*) Bolse_Boss311_Draw, 2, (ObjectFunc) Bolse_Boss311_Update, D_BO_6011C80, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_VE2 */ {(void*) Venom2_Boss_Draw, 2, (ObjectFunc) Venom2_Boss_Update, D_VE2_60166F4, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, - /* OBJ_BOSS_SZ */ {(void*) SectorZ_Boss_Draw, 1, (ObjectFunc) SectorZ_Boss_Update, D_SZ_6009388, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_SZ_GREAT_FOX */ {(void*) SectorZ_GreatFoxDraw, 1, (ObjectFunc) SectorZ_GreatFoxUpdate, D_SZ_6009388, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_SY */ {(void*) SectorY_Boss_Draw, 2, (ObjectFunc) SectorY_Boss_Update, gNoHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_SO */ {(void*) Solar_Boss_Draw, 2, (ObjectFunc) Solar_Boss_Update, gNoHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_KA */ {(void*) Katina_BossDraw, 1, (ObjectFunc) Katina_BossUpdate, D_KA_6011058, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_KA_BASE */ {(void*) Katina_Base_Draw, 1, (ObjectFunc) Katina_BaseUpdate, D_KA_601115C, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_AQ */ {(void*) Aquas_Boss_Draw, 2, (ObjectFunc) Aquas_Boss_Update, D_AQ_6030F74, 10000.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_VE1 */ {(void*) Venom1_Boss_Draw, 1, (ObjectFunc) Venom1_Boss_Update,D_VE1_8019A9B8, 3000.0f, 0, 0, 40, 1, 0.0f, 10 }, - /* OBJ_BOSS_320 */ {(void*) Andross_801928C8, 2, (ObjectFunc) Andross_8018DBF0, D_ANDROSS_C038DC0, 10000.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_321 */ {(void*) Andross_8018B8C0, 1, (ObjectFunc) Andross_80189B70, D_ANDROSS_C038F24, 10000.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_320 */ {(void*) Andross_Boss320_Draw, 2, (ObjectFunc) Andross_Boss320_Update, D_ANDROSS_C038DC0, 10000.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_321 */ {(void*) Andross_Boss321_Draw, 1, (ObjectFunc) Andross_Boss321_Update, D_ANDROSS_C038F24, 10000.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_ITEM_LASERS */ {(void*) ItemLasers_Draw, 1, (ObjectFunc) ItemLasers_Update, gItemLasersHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ITEM_CHECKPOINT */ {(void*) ItemCheckpoint_Draw, 1, (ObjectFunc) ItemCheckpoint_Update, gItemCheckpointHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ITEM_SILVER_RING */ {(void*) ItemSilverRing_Draw, 1, (ObjectFunc) ItemSupplyRing_Update, gItemSupplyRingHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, @@ -430,68 +430,68 @@ ObjectInfo gObjectInfo[] = { /* OBJ_ITEM_RING_CHECK */ {(void*) NULL, 1, (ObjectFunc) ItemRingCheck_Update, gItemRingCheckHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ITEM_1UP */ {(void*) D_1022120, 0, (ObjectFunc) Item1up_Update, gCubeHitbox100, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ITEM_GOLD_RING */ {(void*) ItemGoldRing_Draw, 1, (ObjectFunc) ItemGoldRing_Update, gItemSupplyRingHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ITEM_WING_REPAIR */ {(void*) D_arwing_3007650, 0, (ObjectFunc) ItemWingRepair_Update, gItemLasersHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ITEM_WING_REPAIR */ {(void*) aArwingItemLasersDL, 0, (ObjectFunc) ItemWingRepair_Update, gItemLasersHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ITEM_TRAINING_RING */ {(void*) gItemTrainingRingDL, 0, (ObjectFunc) Training_ItemRing_Update, D_TR_6009CFC, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_FIRE_SMOKE */ {(void*) func_effect_8007D55C, 1, (ObjectFunc) func_effect_8007D2F4, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_340 */ {(void*) func_effect_8007D55C, 1, (ObjectFunc) func_effect_8007D748, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_341 */ {(void*) func_effect_8007D55C, 1, (ObjectFunc) func_effect_8007D8A8, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_342 */ {(void*) func_effect_8007E330, 1, (ObjectFunc) func_effect_8007E298, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_343 */ {(void*) func_effect_8007CAF0, 1, (ObjectFunc) func_effect_8007C9E0, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_344 */ {(void*) func_effect_8007868C, 1, (ObjectFunc) func_effect_8007E014, NULL, -200.0f, -1, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_345 */ {(void*) func_effect_8007879C, 1, (ObjectFunc) func_effect_8007E258, NULL, -200.0f, -1, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_346 */ {(void*) func_effect_800788B0, 1, (ObjectFunc) func_effect_8007F438, NULL, -200.0f, 1, 0, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_347 */ {(void*) func_effect_800783C0, 1, (ObjectFunc) func_effect_8007B758, NULL, 100.0f, 1, 0, 40, 0, 0.0f, 0 }, - /* OBJ_EFFECT_348 */ {(void*) func_effect_80078A64, 1, (ObjectFunc) func_effect_8007F6B0, NULL, -200.0f, -1, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_349 */ {(void*) NULL, 1, (ObjectFunc) func_effect_8007F958, NULL, -200.0f, -1, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_350 */ {(void*) NULL, 1, (ObjectFunc) func_effect_8007FBE0, NULL, -200.0f, -1, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_351 */ {(void*) func_effect_80078438, 1, (ObjectFunc) func_effect_8007E3E4, NULL, -200.0f, 1, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_352 */ {(void*) func_effect_800784B4, 1, (ObjectFunc) func_effect_8007B62C, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_353 */ {(void*) func_effect_80078B8C, 1, (ObjectFunc) func_effect_8007FE88, NULL, 100.0f, 0, 0, 20, 0, 0.0f, 0 }, - /* OBJ_EFFECT_354 */ {(void*) SectorY_80197C64, 1, (ObjectFunc) func_effect_8007FE88, NULL, 100.0f, 0, 0, 20, 0, 0.0f, 0 }, - /* OBJ_EFFECT_355 */ {(void*) func_effect_80078AEC, 1, (ObjectFunc) func_effect_800802B8, NULL, 100.0f, 1, 0, 20, 1, 0.0f, 0 }, - /* OBJ_EFFECT_356 */ {(void*) func_effect_80078C84, 1, (ObjectFunc) func_effect_800802F8, NULL, 100.0f, 1, 0, 20, 0, 0.0f, 0 }, - /* OBJ_EFFECT_357 */ {(void*) func_effect_800798F0, 1, (ObjectFunc) func_effect_8007968C, NULL, 100.0f, 0, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_FIRE_SMOKE */ {(void*) Effect_FireSmoke_Draw, 1, (ObjectFunc) Effect_Effect339_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_340 */ {(void*) Effect_FireSmoke_Draw, 1, (ObjectFunc) Effect_Effect340_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_341 */ {(void*) Effect_FireSmoke_Draw, 1, (ObjectFunc) Effect_Effect341_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_342 */ {(void*) Effect_Effect342_Draw, 1, (ObjectFunc) Effect_Effect342_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_343 */ {(void*) Effect_Effect343_Draw, 1, (ObjectFunc) Effect_Effect343_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_344 */ {(void*) Effect_Effect344_Draw, 1, (ObjectFunc) Effect_Effect344_Update, NULL, -200.0f, -1, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_345 */ {(void*) Effect_Effect345_Draw, 1, (ObjectFunc) Effect_Effect345_Update, NULL, -200.0f, -1, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_346 */ {(void*) Effect_Effect346_Draw, 1, (ObjectFunc) Effect_Effect346_Update, NULL, -200.0f, 1, 0, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_347 */ {(void*) Effect_Effect347_Draw, 1, (ObjectFunc) Effect_Effect347_Update, NULL, 100.0f, 1, 0, 40, 0, 0.0f, 0 }, + /* OBJ_EFFECT_348 */ {(void*) Effect_Effect348_Draw, 1, (ObjectFunc) Effect_Effect348_Update, NULL, -200.0f, -1, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_349 */ {(void*) NULL, 1, (ObjectFunc) Effect_Effect349_Update, NULL, -200.0f, -1, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_350 */ {(void*) NULL, 1, (ObjectFunc) Effect_Effect350_Update, NULL, -200.0f, -1, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_351 */ {(void*) Effect_Effect351_Draw, 1, (ObjectFunc) Effect_Effect351_Update, NULL, -200.0f, 1, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_CLOUDS */ {(void*) Effect_Clouds_Draw, 1, (ObjectFunc) Effect_Clouds_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_ENEMY_LASER_1 */ {(void*) Effect_Effect353_Draw, 1, (ObjectFunc) Effect_Effect353_354_Update, NULL, 100.0f, 0, 0, 20, 0, 0.0f, 0 }, + /* OBJ_EFFECT_354 */ {(void*) SectorY_Effect354_Draw, 1, (ObjectFunc) Effect_Effect353_354_Update, NULL, 100.0f, 0, 0, 20, 0, 0.0f, 0 }, + /* OBJ_EFFECT_355 */ {(void*) Effect_Effect355_Draw, 1, (ObjectFunc) Effect_Effect355_Update, NULL, 100.0f, 1, 0, 20, 1, 0.0f, 0 }, + /* OBJ_EFFECT_356 */ {(void*) Effect_Effect356_Draw, 1, (ObjectFunc) Effect_Effect356_Update, NULL, 100.0f, 1, 0, 20, 0, 0.0f, 0 }, + /* OBJ_EFFECT_357 */ {(void*) Effect_Effect357_Draw, 1, (ObjectFunc) Effect_Effect357_Update, NULL, 100.0f, 0, 1, 0, 0, 0.0f, 0 }, /* OBJ_EFFECT_358 */ {(void*) Katina_LaserEnergyParticlesDraw, 1, (ObjectFunc) Katina_LaserEnergyParticlesUpdate, NULL, 100.0f, 1, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_359 */ {(void*) func_effect_8007AA60, 1, (ObjectFunc) func_effect_8007A994, NULL, -100.0f, 1, 2, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_360 */ {(void*) func_effect_8007BEE8, 1, (ObjectFunc) func_effect_8007BE54, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_361 */ {(void*) func_effect_8007BEE8, 1, (ObjectFunc) func_effect_8007BDE0, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_362 */ {(void*) func_effect_8007BEE8, 1, (ObjectFunc) func_effect_8007BCE8, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_363 */ {(void*) func_hud_80094BBC, 1, (ObjectFunc) func_hud_80094954, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_364 */ {(void*) func_effect_8007B9DC, 1, (ObjectFunc) func_effect_8007B960, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_365 */ {(void*) func_effect_8007E5CC, 1, (ObjectFunc) func_effect_8007E45C, NULL, -200.0f, 1, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_366 */ {(void*) func_effect_80078550, 1, (ObjectFunc) Aquas_801AC918, NULL, 100.0f, 1, 2, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_367 */ {(void*) func_effect_80078604, 1, (ObjectFunc) func_effect_8007E648, NULL, -200.0f, 0, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_368 */ {(void*) Titania_80188FA8, 1, (ObjectFunc) Titania_80188F60, NULL, -200.0f, -1, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_369 */ {(void*) Meteo_8018DCE4, 1, (ObjectFunc) Meteo_80188CAC, NULL, 100.0f, 0, 1, 40, 0, 0.0f, 0 }, - /* OBJ_EFFECT_370 */ {(void*) Meteo_8018DBEC, 1, (ObjectFunc) Meteo_80188FAC, NULL, 100.0f, 0, 1, 40, 0, 0.0f, 0 }, - /* OBJ_EFFECT_371 */ {(void*) Meteo_8018DE14, 1, (ObjectFunc) Meteo_80189114, NULL, 100.0f, 0, 1, 40, 0, 0.0f, 0 }, - /* OBJ_EFFECT_372 */ {(void*) func_effect_80077A00, 1, (ObjectFunc) func_effect_8007AB50, NULL, -200.0f, 0, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_373 */ {(void*) NULL, 1, (ObjectFunc) func_effect_8007A748, NULL, 500.0f, 0, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_374 */ {(void*) func_effect_8007DED4, 1, (ObjectFunc) func_effect_8007DB70, NULL, 100.0f, 0, 1, 40, 0, 0.0f, 0 }, - /* OBJ_EFFECT_375 */ {(void*) func_effect_8007DAE4, 1, (ObjectFunc) func_effect_8007DA58, NULL, -200.0f, 0, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_376 */ {(void*) func_effect_80078CE8, 1, (ObjectFunc) func_effect_80080360, NULL, -200.0f, 1, 0, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_377 */ {(void*) func_effect_80078BE0, 1, (ObjectFunc) func_effect_800802D8, NULL, 100.0f, 1, 0, 20, 0, 0.0f, 0 }, - /* OBJ_EFFECT_378 */ {(void*) Macbeth_801A5AF0, 1, (ObjectFunc) Macbeth_801A57D0, NULL, 100.0f, 0, 0, 20, 0, 0.0f, 0 }, - /* OBJ_EFFECT_379 */ {(void*) Macbeth_801AEAA0, 1, (ObjectFunc) Macbeth_801AE87C, NULL, 100.0f, 1, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_380 */ {(void*) Macbeth_801A5D68, 1, (ObjectFunc) Macbeth_801A5B4C, NULL, 100.0f, 0, 0, 20, 0, 0.0f, 0 }, - /* OBJ_EFFECT_381 */ {(void*) func_effect_80077A7C, 1, (ObjectFunc) func_effect_8007B0F4, NULL, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_382 */ {(void*) NULL, 1, (ObjectFunc) func_effect_8007B040, NULL, 200.0f, 0, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_383 */ {(void*) func_effect_8007A3C0, 1, (ObjectFunc) func_effect_8007A28C, NULL, 10000.0f, 0, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_384 */ {(void*) func_effect_80077B84, 1, (ObjectFunc) func_effect_8007B3B8, NULL, -200.0f, 1, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_385 */ {(void*) func_effect_80078038, 1, (ObjectFunc) func_effect_8007B5C0, NULL, -200.0f, -1, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_386 */ {(void*) NULL, 1, (ObjectFunc) func_effect_8007C250, NULL, -200.0f, 0, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_387 */ {(void*) NULL, 1, (ObjectFunc) func_effect_8007C8C4, NULL, -200.0f, 0, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_388 */ {(void*) func_effect_80077B78, 1, (ObjectFunc) func_effect_8007B670, NULL, -200.0f, 1, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_389 */ {(void*) func_effect_800780F8, 1, (ObjectFunc) func_effect_8007B67C, NULL, -200.0f, 1, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_390 */ {(void*) NULL, 1, (ObjectFunc) func_effect_8007C50C, NULL, -200.0f, 0, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_391 */ {(void*) func_effect_80083B8C, 1, (ObjectFunc) func_effect_800837EC, NULL, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_392 */ {(void*) Solar_801A0AF0, 1, (ObjectFunc) Solar_801A0120, NULL, 300.0f, 1, 2, 10, 0, 0.0f, 0 }, - /* OBJ_EFFECT_393 */ {(void*) func_effect_80078F78, 1, (ObjectFunc) func_effect_80078EBC, NULL, 300.0f, 1, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_394 */ {(void*) func_effect_80080D04, 1, (ObjectFunc) func_effect_80080ACC, NULL, -200.0f, 0, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_395 */ {(void*) func_effect_80082F78, 1, (ObjectFunc) func_effect_80081C5C, NULL, 300.0f, 0, 1, 40, 0, 0.0f, 0 }, - /* OBJ_EFFECT_396 */ {(void*) Andross_8018CF98, 1, (ObjectFunc) Andross_8018CAD4, NULL, 2000.0f, 0, 1, 40, 2, 0.0f, 0 }, - /* OBJ_EFFECT_397 */ {(void*) Bolse_80191180, 1, (ObjectFunc) Bolse_80191054, NULL, 2000.0f, 0, 1, 20, 0, 0.0f, 0 }, - /* OBJ_EFFECT_398 */ {(void*) func_effect_8008092C, 1, (ObjectFunc) func_effect_8008040C, NULL, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_EFFECT_399 */ {(void*) func_effect_80084194, 1, (ObjectFunc) func_effect_80083FA8, NULL, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_EFFECT_359 */ {(void*) Effect_Effect359_Draw, 1, (ObjectFunc) Effect_Effect359_Update, NULL, -100.0f, 1, 2, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_360 */ {(void*) Effect_Effect360_361_362_Draw, 1, (ObjectFunc) Effect_Effect360_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_361 */ {(void*) Effect_Effect360_361_362_Draw, 1, (ObjectFunc) Effect_Effect361_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_362 */ {(void*) Effect_Effect360_361_362_Draw, 1, (ObjectFunc) Effect_Effect362_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_363 */ {(void*) Hud_Effect363_Draw, 1, (ObjectFunc) Hud_Effect363_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_364 */ {(void*) Effect_Effect364_Draw, 1, (ObjectFunc) Effect_Effect364_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_365 */ {(void*) Effect_Effect365_Draw, 1, (ObjectFunc) Effect_Effect365_Update, NULL, -200.0f, 1, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_366 */ {(void*) Effect_Effect366_Draw, 1, (ObjectFunc) Aquas_Effect366_Update, NULL, 100.0f, 1, 2, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_367 */ {(void*) Effect_Effect367_Draw, 1, (ObjectFunc) Effect_Effect367_Update, NULL, -200.0f, 0, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_368 */ {(void*) Titania_Effect368_Draw, 1, (ObjectFunc) Titania_Effect368_Update, NULL, -200.0f, -1, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_369 */ {(void*) Meteo_Effect369_Draw, 1, (ObjectFunc) Meteo_Effect369_Update, NULL, 100.0f, 0, 1, 40, 0, 0.0f, 0 }, + /* OBJ_EFFECT_370 */ {(void*) Meteo_Effect370_Draw, 1, (ObjectFunc) Meteo_Effect370_Update, NULL, 100.0f, 0, 1, 40, 0, 0.0f, 0 }, + /* OBJ_EFFECT_371 */ {(void*) Meteo_Effect371_Draw, 1, (ObjectFunc) Meteo_Effect371_Update, NULL, 100.0f, 0, 1, 40, 0, 0.0f, 0 }, + /* OBJ_EFFECT_372 */ {(void*) Effect_Effect372_Draw, 1, (ObjectFunc) Effect_Effect372_Update, NULL, -200.0f, 0, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_TIMED_SFX */ {(void*) NULL, 1, (ObjectFunc) Effect_TimedSfx_Update, NULL, 500.0f, 0, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_374 */ {(void*) Macbeth_Effect374_Draw, 1, (ObjectFunc) Effect_Effect374_Update, NULL, 100.0f, 0, 1, 40, 0, 0.0f, 0 }, + /* OBJ_EFFECT_375 */ {(void*) Macbeth_Effect375_Draw, 1, (ObjectFunc) Effect_Effect375_Update, NULL, -200.0f, 0, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_376 */ {(void*) Macbeth_Effect376_Draw, 1, (ObjectFunc) Effect_Effect376_Update, NULL, -200.0f, 1, 0, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_377 */ {(void*) Macbeth_Effect377_Draw, 1, (ObjectFunc) Effect_Effect377_Update, NULL, 100.0f, 1, 0, 20, 0, 0.0f, 0 }, + /* OBJ_EFFECT_378 */ {(void*) Macbeth_Effect378_Draw, 1, (ObjectFunc) Macbeth_Effect378_Update, NULL, 100.0f, 0, 0, 20, 0, 0.0f, 0 }, + /* OBJ_EFFECT_379 */ {(void*) Macbeth_Effect379_Draw, 1, (ObjectFunc) Macbeth_Effect379_Update, NULL, 100.0f, 1, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_380 */ {(void*) Macbeth_Effect380_Draw, 1, (ObjectFunc) Macbeth_Effect380_Update, NULL, 100.0f, 0, 0, 20, 0, 0.0f, 0 }, + /* OBJ_EFFECT_381 */ {(void*) Effect_Effect382_Draw, 1, (ObjectFunc) Effect_Effect381_Update, NULL, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_382 */ {(void*) NULL, 1, (ObjectFunc) Effect_Effect382_Update, NULL, 200.0f, 0, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_383 */ {(void*) Effect_Effect383_Draw, 1, (ObjectFunc) Effect_Effect383_Update, NULL, 10000.0f, 0, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_384 */ {(void*) Effect_Effect384_Draw, 1, (ObjectFunc) Effect_Effect384_Update, NULL, -200.0f, 1, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_385 */ {(void*) Effect_Effect385_Draw, 1, (ObjectFunc) Effect_Effect385_Update, NULL, -200.0f, -1, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_386 */ {(void*) NULL, 1, (ObjectFunc) Effect_Effect386_Update, NULL, -200.0f, 0, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_387 */ {(void*) NULL, 1, (ObjectFunc) Effect_Effect387_Update, NULL, -200.0f, 0, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_388 */ {(void*) Effect_Effect388_Draw, 1, (ObjectFunc) Effect_Effect388_Update, NULL, -200.0f, 1, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_389 */ {(void*) Effect_Effect389_Draw, 1, (ObjectFunc) Effect_Effect389_Update, NULL, -200.0f, 1, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_390 */ {(void*) NULL, 1, (ObjectFunc) Effect_Effect390_Update, NULL, -200.0f, 0, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_391 */ {(void*) Effect_Effect391_Draw, 1, (ObjectFunc) Effect_Effect391_Update, NULL, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_392 */ {(void*) Solar_Effect392_Draw, 1, (ObjectFunc) Solar_Effect392_Update, NULL, 300.0f, 1, 2, 10, 0, 0.0f, 0 }, + /* OBJ_EFFECT_393 */ {(void*) Effect_Effect393_Draw, 1, (ObjectFunc) Effect_Effect393_Update, NULL, 300.0f, 1, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_394 */ {(void*) Effect_Effect394_Draw, 1, (ObjectFunc) Effect_Effect394_Update, NULL, -200.0f, 0, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_395 */ {(void*) Effect_Effect395_Draw, 1, (ObjectFunc) Effect_Effect395_Update, NULL, 300.0f, 0, 1, 40, 0, 0.0f, 0 }, + /* OBJ_EFFECT_396 */ {(void*) Andross_Effect396_Draw, 1, (ObjectFunc) Andross_Effect396_Update, NULL, 2000.0f, 0, 1, 40, 2, 0.0f, 0 }, + /* OBJ_EFFECT_397 */ {(void*) Bolse_Effect397_Draw, 1, (ObjectFunc) Bolse_Effect397_Update, NULL, 2000.0f, 0, 1, 20, 0, 0.0f, 0 }, + /* OBJ_EFFECT_398 */ {(void*) Effect_Effect398_Draw, 1, (ObjectFunc) Effect_Effect398_Update, NULL, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_EFFECT_399 */ {(void*) Effect_Effect399_Draw, 1, (ObjectFunc) Effect_Effect399_Update, NULL, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, }; // clang-format on diff --git a/src/engine/fox_edisplay.c b/src/engine/fox_edisplay.c index 92d72551..d53269c3 100644 --- a/src/engine/fox_edisplay.c +++ b/src/engine/fox_edisplay.c @@ -114,7 +114,7 @@ void Scenery_DrawTitaniaBones(Scenery* scenery) { void func_edisplay_80059BB0(void* arg0) { } -void Scenery42_Draw(Scenery_42* this) { +void CoIBeam_Draw(CoIBeam* this) { gSPDisplayList(gMasterDisp++, D_CO_6023AC0); } @@ -134,33 +134,33 @@ void FogShadow_Draw(FogShadow* this) { RCP_SetupDL_47(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 180); switch (this->sceneryId) { - case OBJ_SCENERY_0: + case OBJ_SCENERY_CO_STONE_ARCH: Matrix_Scale(gGfxMatrix, 2.0f, 1.0f, 0.7f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_6034B90); break; - case OBJ_SCENERY_21: + case OBJ_SCENERY_CO_ARCH_2: Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.7f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_6034B90); break; - case OBJ_SCENERY_6: - case OBJ_SCENERY_7: + case OBJ_SCENERY_CO_HIGHWAY_1: + case OBJ_SCENERY_CO_HIGHWAY_2: Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 10.55f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_Gfx_800DAC20); break; - case OBJ_SCENERY_56: + case OBJ_SCENERY_CO_DOORS: Matrix_Scale(gGfxMatrix, 1.6f, 1.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_6034B90); break; - case OBJ_SCENERY_20: + case OBJ_SCENERY_CO_ARCH_1: Matrix_Scale(gGfxMatrix, 1.2f, 1.0f, 1.3f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_6034B90); break; - case OBJ_SCENERY_22: + case OBJ_SCENERY_CO_ARCH_3: Matrix_Scale(gGfxMatrix, 2.2f, 1.0f, 1.4f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_6034B90); @@ -169,22 +169,22 @@ void FogShadow_Draw(FogShadow* this) { RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } -void func_edisplay_80059F68(Scenery* scenery) { +void CoBuilding9_Draw(Scenery* scenery) { Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -95.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_602DA20); } -void func_edisplay_80059FDC(Scenery* scenery) { +void CoBuilding10_Draw(Scenery* scenery) { gSPDisplayList(gMasterDisp++, D_CO_6035DA0); } -// repurposed into OBJ_SCENERY_15 +// repurposed into OBJ_SCENERY_CO_BUILDING_6 void func_edisplay_8005A010(Sprite* sprite) { if (!sprite->toLeft) { Matrix_RotateY(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_CO_60361F0); + gSPDisplayList(gMasterDisp++, aCoBuilding6DL); } } @@ -209,7 +209,7 @@ Gfx* D_edisplay_800CFADC[] = { }; Gfx* D_edisplay_800CFB08[] = { D_ZO_6020F10, D_ZO_6021100, D_ZO_60214B0 }; Gfx* D_edisplay_800CFB14[] = { D_ZO_60163E0, D_ZO_60165D0, D_ZO_6016880, D_ZO_6016B50, D_ZO_6000C40 }; -Gfx* D_edisplay_800CFB28[] = { D_CO_6018E80, D_ZO_601F620, D_ZO_601F420, D_ZO_6018C80, D_ZO_601F940, D_ZO_601F260 }; +Gfx* D_edisplay_800CFB28[] = { aCoBuilding7DL, D_ZO_601F620, D_ZO_601F420, D_ZO_6018C80, D_ZO_601F940, D_ZO_601F260 }; Gfx* D_edisplay_800CFB40[] = { D_SO_6014DB0, D_SO_60146D0, D_SO_6014B80, D_SO_6014470, D_SO_6014930, D_SO_60138A0, D_SO_60151A0, D_SO_600F750, D_SO_6015810, @@ -556,25 +556,25 @@ void func_edisplay_8005B388(Actor* actor) { Actor_DrawEngineAndContrails(actor); } -void func_edisplay_8005B6A4(Actor* actor) { +void Actor180_Draw(Actor* actor) { Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ME_6024B60); } -void func_edisplay_8005B71C(Actor* actor) { +void Actor182_Draw(Actor* actor) { RCP_SetupDL_29(actor->unk_046, gFogGreen, gFogBlue, gFogAlpha, actor->unk_048, gFogFar); Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ME_6018C00); } -void func_edisplay_8005B7CC(Actor* actor) { +void Actor186_Draw(Actor* actor) { RCP_SetupDL_29(actor->unk_046, gFogGreen, gFogBlue, gFogAlpha, actor->unk_048, gFogFar); gSPDisplayList(gMasterDisp++, D_ME_6022920); } -void func_edisplay_8005B848(Actor* actor) { +void Actor190_191_Draw(Actor* actor) { f32 scale; switch (actor->eventType) { @@ -599,13 +599,13 @@ void func_edisplay_8005B848(Actor* actor) { Actor_DrawEngineGlow(actor, 2); } -void func_edisplay_8005B9A4(Actor* actor) { +void Actor192_Draw(Actor* actor) { Matrix_Translate(gGfxMatrix, 0.0f, -124.0f, 0.0f, MTXF_APPLY); Animation_GetFrameData(&D_CO_6029528, actor->animFrame, actor->vwork); Animation_DrawSkeleton(1, D_CO_6029674, actor->vwork, NULL, NULL, actor, &gIdentityMatrix); } -void func_edisplay_8005BA30(Actor* actor) { +void Actor193_Draw(Actor* actor) { if (actor->timer_0BC != 0) { RCP_SetupDL_27(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); @@ -667,7 +667,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { break; } break; - case OBJ_BOSS_292: + case OBJ_BOSS_CO_GRANGA: gSPDisplayList(gMasterDisp++, D_CO_6034B90); break; case OBJ_BOSS_KA: @@ -679,7 +679,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { Graphics_SetScaleMtx(150.0f); gSPDisplayList(gMasterDisp++, D_102A8A0); break; - case OBJ_BOSS_293: + case OBJ_BOSS_CO_CARRIER: case OBJ_BOSS_294: case OBJ_BOSS_295: case OBJ_BOSS_296: @@ -690,7 +690,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 150); } switch (objId) { - case OBJ_BOSS_293: + case OBJ_BOSS_CO_CARRIER: gSPDisplayList(gMasterDisp++, D_CO_6036840); break; case OBJ_BOSS_294: @@ -946,8 +946,8 @@ void Scenery_Draw(Scenery* this, s32 arg1) { func_edisplay_8005D008(&this->obj, this->info.drawType); this->obj.pos.y -= gCameraShakeY; if (this->info.drawType == 0) { - if ((this->obj.id == OBJ_SCENERY_19) || (this->obj.id == OBJ_SCENERY_55) || (this->obj.id == OBJ_SCENERY_9) || - (this->obj.id == OBJ_SCENERY_50)) { + if ((this->obj.id == OBJ_SCENERY_CO_TOWER) || (this->obj.id == OBJ_SCENERY_CO_ROCKWALL) || + (this->obj.id == OBJ_SCENERY_CO_HIGHWAY_4) || (this->obj.id == OBJ_SCENERY_50)) { RCP_SetupDL_57(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); if (arg1 < 0) { @@ -956,7 +956,7 @@ void Scenery_Draw(Scenery* this, s32 arg1) { gSPDisplayList(gMasterDisp++, this->info.dList); RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } else { - if (this->obj.id == OBJ_SCENERY_8) { + if (this->obj.id == OBJ_SCENERY_CO_HIGHWAY_3) { if (arg1 < 0) { return; // weird control flow } @@ -967,7 +967,7 @@ void Scenery_Draw(Scenery* this, s32 arg1) { Object_ApplyWaterDistortion(); } gSPDisplayList(gMasterDisp++, this->info.dList); - if (this->obj.id == OBJ_SCENERY_8) { + if (this->obj.id == OBJ_SCENERY_CO_HIGHWAY_3) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } } @@ -999,7 +999,7 @@ void Actor_DrawOnRails(Actor* this) { Actor194_Draw(this); return; case OBJ_ACTOR_236: - Zoness_80190F08(this); + Zoness_Actor236_Draw(this); return; } if ((this->obj.id == OBJ_ACTOR_EVENT) && (this->eventType == EVID_200)) { @@ -1154,7 +1154,7 @@ void Boss_Draw(Boss* this, s32 arg1) { var_fv0 = 6000.0f; var_ft5 = 0.9f; var_fv1 = -20000.0f; - } else if (this->obj.id == OBJ_BOSS_SZ) { + } else if (this->obj.id == OBJ_BOSS_SZ_GREAT_FOX) { var_fv1 = -25000.0f; var_ft5 = 0.7f; var_fa1 = 3000.0f; @@ -1198,7 +1198,7 @@ void Effect_DrawOnRails(Effect* this, s32 arg1) { if ((arg1 < 0) && (this->obj.pos.y < 7.0f)) { return; } - if ((this->obj.id == OBJ_EFFECT_353) || (this->obj.id == OBJ_EFFECT_369)) { + if ((this->obj.id == OBJ_EFFECT_ENEMY_LASER_1) || (this->obj.id == OBJ_EFFECT_369)) { func_edisplay_8005D3CC(&this->obj, this->unk_60.x, this->unk_60.y, this->unk_60.z, 0); } else if (this->info.unk_14 == -1) { this->obj.pos.y += gCameraShakeY; @@ -1245,7 +1245,7 @@ void Effect_DrawAllRange(Effect* this) { } } Object_SetSfxSourceToView(this->sfxSource, &sp40); - if (!drawn && (this->obj.id != OBJ_EFFECT_352) && (this->obj.id != OBJ_EFFECT_373) && (!gVersusMode)) { + if (!drawn && (this->obj.id != OBJ_EFFECT_CLOUDS) && (this->obj.id != OBJ_EFFECT_TIMED_SFX) && (!gVersusMode)) { Object_Kill(&this->obj, this->sfxSource); } } diff --git a/src/engine/fox_effect.c b/src/engine/fox_effect.c index e0098b77..b3e5d6b3 100644 --- a/src/engine/fox_effect.c +++ b/src/engine/fox_effect.c @@ -42,7 +42,7 @@ void BonusText_Update(void) { BonusText* bonus; s32 i; - for (i = 0, bonus = gBonusText; i < ARRAY_COUNT(gBonusText); i++, bonus++) { + for (i = 0, bonus = &gBonusText[0]; i < ARRAY_COUNT(gBonusText); i++, bonus++) { if (bonus->hits != BONUS_TEXT_FREE) { if (bonus->timer != 0) { bonus->timer -= 1; // can't be -- @@ -164,25 +164,26 @@ Effect* func_effect_8007783C(ObjectId objId) { return effect; } -void func_effect_800778C4(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_FIRE_SMOKE; +void func_effect_800778C4(EffectFireSmoke* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, + f32 scale2) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_FIRE_SMOKE; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->vel.x = xVel; - effect->vel.y = yVel; - effect->vel.z = zVel; + this->vel.x = xVel; + this->vel.y = yVel; + this->vel.z = zVel; - effect->scale2 = scale2; - effect->unk_4C = 0; - effect->scale1 = 0.5f; - effect->obj.rot.z = RAND_FLOAT(360.0f); - Object_SetInfo(&effect->info, effect->obj.id); - effect->unk_44 = 255; + this->scale2 = scale2; + this->unk_4C = 0; + this->scale1 = 0.5f; + this->obj.rot.z = RAND_FLOAT(360.0f); + Object_SetInfo(&this->info, this->obj.id); + this->unk_44 = 255; } void func_effect_8007797C(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2) { @@ -196,92 +197,92 @@ void func_effect_8007797C(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 } } -void func_effect_80077A00(Effect* effect) { - Graphics_SetScaleMtx(effect->scale2); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_44); +void Effect_Effect372_Draw(Effect372* this) { + Graphics_SetScaleMtx(this->scale2); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_44); gSPDisplayList(gMasterDisp++, D_arwing_3016B30); } -void func_effect_80077A7C(Effect* effect) { +void Effect_Effect382_Draw(Effect382* this) { RCP_SetupDL_49(); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_44); - gDPSetEnvColor(gMasterDisp++, 255, 255, 255, effect->unk_44); - Matrix_Scale(gGfxMatrix, effect->scale1, effect->scale2, 1.0f, MTXF_APPLY); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_44); + gDPSetEnvColor(gMasterDisp++, 255, 255, 255, this->unk_44); + Matrix_Scale(gGfxMatrix, this->scale1, this->scale2, 1.0f, MTXF_APPLY); Matrix_Translate(gGfxMatrix, 0.0f, 20.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ZO_6024220); RCP_SetupDL(&gMasterDisp, SETUPDL_64); } -void func_effect_80077B78(Effect* effect) { +void Effect_Effect388_Draw(Effect388* this) { } -void func_effect_80077B84(Effect* effect) { - Graphics_SetScaleMtx(effect->scale2); +void Effect_Effect384_Draw(Effect384* this) { + Graphics_SetScaleMtx(this->scale2); - if ((effect->scale1 == 71.0f) || + if ((this->scale1 == 71.0f) || ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) && (gCurrentLevel == LEVEL_CORNERIA))) { RCP_SetupDL(&gMasterDisp, SETUPDL_38); } else { RCP_SetupDL(&gMasterDisp, SETUPDL_67); } - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_44); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_44); - switch (effect->unk_4C) { + switch (this->unk_4C) { case 0: - gDPSetEnvColor(gMasterDisp++, 0, 128, 255, effect->unk_44); + gDPSetEnvColor(gMasterDisp++, 0, 128, 255, this->unk_44); break; case 1: - gDPSetEnvColor(gMasterDisp++, 255, 64, 255, effect->unk_44); + gDPSetEnvColor(gMasterDisp++, 255, 64, 255, this->unk_44); break; case 2: - gDPSetEnvColor(gMasterDisp++, 255, 128, 0, effect->unk_44); + gDPSetEnvColor(gMasterDisp++, 255, 128, 0, this->unk_44); break; case 3: - gDPSetEnvColor(gMasterDisp++, 255, 48, 48, effect->unk_44); + gDPSetEnvColor(gMasterDisp++, 255, 48, 48, this->unk_44); break; case 4: - gDPSetEnvColor(gMasterDisp++, 255, 255, 48, effect->unk_44); + gDPSetEnvColor(gMasterDisp++, 255, 255, 48, this->unk_44); break; case 5: - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, effect->unk_44); - gDPSetEnvColor(gMasterDisp++, 255, 32, 32, effect->unk_44); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, this->unk_44); + gDPSetEnvColor(gMasterDisp++, 255, 32, 32, this->unk_44); break; case 6: if (gCurrentLevel == LEVEL_BOLSE) { RCP_SetupDL(&gMasterDisp, SETUPDL_38); } - switch ((effect->index + gGameFrameCount) % 4U) { + switch ((this->index + gGameFrameCount) % 4U) { case 0: - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 0, 0, effect->unk_44); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 0, 0, this->unk_44); break; case 1: - gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 255, 0, effect->unk_44); + gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 255, 0, this->unk_44); break; case 2: - gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 255, effect->unk_44); + gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 255, this->unk_44); break; case 3: - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, effect->unk_44); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, this->unk_44); break; } - gDPSetEnvColor(gMasterDisp++, 0, 0, 0, effect->unk_44); + gDPSetEnvColor(gMasterDisp++, 0, 0, 0, this->unk_44); break; case 7: - gDPSetEnvColor(gMasterDisp++, 48, 48, 255, effect->unk_44); + gDPSetEnvColor(gMasterDisp++, 48, 48, 255, this->unk_44); break; case 10: - gDPSetEnvColor(gMasterDisp++, 255, 255, 32, effect->unk_44); + gDPSetEnvColor(gMasterDisp++, 255, 255, 32, this->unk_44); break; case 11: - gDPSetEnvColor(gMasterDisp++, 255, 32, 32, effect->unk_44); + gDPSetEnvColor(gMasterDisp++, 255, 32, 32, this->unk_44); break; case 12: - gDPSetEnvColor(gMasterDisp++, 32, 255, 32, effect->unk_44); + gDPSetEnvColor(gMasterDisp++, 32, 255, 32, this->unk_44); break; case 13: - gDPSetEnvColor(gMasterDisp++, 32, 32, 255, effect->unk_44); + gDPSetEnvColor(gMasterDisp++, 32, 32, 255, this->unk_44); break; } @@ -289,12 +290,12 @@ void func_effect_80077B84(Effect* effect) { RCP_SetupDL(&gMasterDisp, SETUPDL_64); } -void func_effect_80078038(Effect* effect) { - Graphics_SetScaleMtx(effect->scale2); +void Effect_Effect385_Draw(Effect385* this) { + Graphics_SetScaleMtx(this->scale2); RCP_SetupDL_49(); RCP_SetupDL(&gMasterDisp, SETUPDL_38); - gDPSetPrimColor(gMasterDisp++, 0, 0, 64, 192, 255, effect->unk_44); - gDPSetEnvColor(gMasterDisp++, 0, 0, 0, effect->unk_44); + gDPSetPrimColor(gMasterDisp++, 0, 0, 64, 192, 255, this->unk_44); + gDPSetEnvColor(gMasterDisp++, 0, 0, 0, this->unk_44); gSPDisplayList(gMasterDisp++, D_1024AC0); RCP_SetupDL(&gMasterDisp, SETUPDL_64); } @@ -329,25 +330,25 @@ static f32 D_800D1534[][10] = { 41.706547f }, }; -void func_effect_800780F8(Effect* effect) { +void Effect_Effect389_Draw(Effect389* this) { s32 i; - if (effect->unk_4A > 10) { - if (((effect->index + gGameFrameCount) % 2) == 0) { + if (this->unk_4A > 10) { + if (((this->index + gGameFrameCount) % 2) == 0) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 128, 128, 32); } else { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 128, 128, 128); } - } else if (((effect->index + gGameFrameCount) % 2) == 0) { + } else if (((this->index + gGameFrameCount) % 2) == 0) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); } else { gDPSetPrimColor(gMasterDisp++, 0, 0, 96, 96, 255, 255); } - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); for (i = 0; i < 10; i++) { - if ((i >= effect->unk_48) && (i < effect->unk_46)) { + if ((i >= this->unk_48) && (i < this->unk_46)) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, -60.0f, 0.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.8f, 3.0f, 1.0f, MTXF_APPLY); @@ -356,52 +357,52 @@ void func_effect_800780F8(Effect* effect) { Matrix_Pop(&gGfxMatrix); } Matrix_Translate(gGfxMatrix, 0.0f, -120.0f, 0.0f, MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, D_800D1534[effect->unk_4C][i] * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, D_800D1534[this->unk_4C][i] * M_DTOR, MTXF_APPLY); } } -void func_effect_800783C0(Effect* effect) { - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_44); - Graphics_SetScaleMtx(effect->scale2); +void Effect_Effect347_Draw(Effect347* this) { + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_44); + Graphics_SetScaleMtx(this->scale2); gSPDisplayList(gMasterDisp++, D_BG_SPACE_2006F50); } -void func_effect_80078438(Effect* effect) { - Graphics_SetScaleMtx(effect->scale2); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_4A); +void Effect_Effect351_Draw(Effect351* this) { + Graphics_SetScaleMtx(this->scale2); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_4A); gSPDisplayList(gMasterDisp++, D_102A8A0); } -void func_effect_800784B4(Effect* effect) { - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_46); - Graphics_SetScaleMtx(effect->scale2); +void Effect_Clouds_Draw(Clouds* this) { + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_46); + Graphics_SetScaleMtx(this->scale2); Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_BG_PLANET_200D750); } -void func_effect_80078550(Effect* effect) { +void Effect_Effect366_Draw(Effect366* this) { RCP_SetupDL(&gMasterDisp, SETUPDL_67); - Graphics_SetScaleMtx(effect->scale2); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_4A); + Graphics_SetScaleMtx(this->scale2); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_4A); gDPSetEnvColor(gMasterDisp++, 101, 138, 153, 255); gSPDisplayList(gMasterDisp++, D_blue_marine_3000660); RCP_SetupDL(&gMasterDisp, SETUPDL_64); } -void func_effect_80078604(Effect* effect) { - if (effect->timer_50 == 0) { - Graphics_SetScaleMtx(effect->scale2); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_44); +void Effect_Effect367_Draw(Effect367* this) { + if (this->timer_50 == 0) { + Graphics_SetScaleMtx(this->scale2); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_44); gSPDisplayList(gMasterDisp++, D_BG_PLANET_20112C0); } } -void func_effect_8007868C(Effect* effect) { +void Effect_Effect344_Draw(Effect344* this) { RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY); - if (effect->unk_44 >= 2) { + Matrix_Scale(gGfxMatrix, this->scale2, this->scale2, this->scale2, MTXF_APPLY); + if (this->unk_44 >= 2) { Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); @@ -409,10 +410,10 @@ void func_effect_8007868C(Effect* effect) { RCP_SetupDL(&gMasterDisp, SETUPDL_64); } -void func_effect_8007879C(Effect* effect) { +void Effect_Effect345_Draw(Effect345* this) { RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - Matrix_Scale(gGfxMatrix, effect->scale2 * 0.6f, 1.0f, effect->scale2 * 3.5f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->scale2 * 0.6f, 1.0f, this->scale2 * 3.5f, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1029780); @@ -421,52 +422,52 @@ void func_effect_8007879C(Effect* effect) { static s32 D_800D173C[] = { 255, 255, 255, 0, 0, 0, 255, 0, 255, 0, 0, 0, 255, 255, 0, 0, 0, 255, 0, 0 }; -void func_effect_800788B0(Effect* effect) { +void Effect_Effect346_Draw(Effect346* this) { s32 temp_ft3; s32 tmp; switch (gCurrentLevel) { case LEVEL_METEO: - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); gDPSetPrimColor(gMasterDisp++, 0, 0, 128, 128, 128, 255); gSPDisplayList(gMasterDisp++, D_ME_601FF80); break; case LEVEL_AQUAS: RCP_SetupDL(&gMasterDisp, SETUPDL_67); - temp_ft3 = Math_ModF(effect->index, 4.0f); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, (s32) effect->scale1); + temp_ft3 = Math_ModF(this->index, 4.0f); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, (s32) this->scale1); tmp = temp_ft3 * 4.0f; gDPSetEnvColor(gMasterDisp++, D_800D173C[tmp + 0], D_800D173C[tmp + 1], D_800D173C[tmp + 2], 255); - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); gSPDisplayList(gMasterDisp++, D_1024AC0); RCP_SetupDL(&gMasterDisp, SETUPDL_64); break; } } -void func_effect_80078A64(Effect* effect) { - Graphics_SetScaleMtx(effect->scale2); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_44); +void Effect_Effect348_Draw(Effect348* this) { + Graphics_SetScaleMtx(this->scale2); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_44); gSPDisplayList(gMasterDisp++, D_BG_PLANET_20112C0); } -void func_effect_80078AE0(void* effect) { +void func_effect_80078AE0(Effect* this) { } -void func_effect_80078AEC(Effect* effect) { +void Effect_Effect355_Draw(Effect355* this) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 180); - Graphics_SetScaleMtx(effect->scale2 * (13.0f + ((s32) (gGameFrameCount % 2U) * 2.5f))); + Graphics_SetScaleMtx(this->scale2 * (13.0f + ((s32) (gGameFrameCount % 2U) * 2.5f))); gSPDisplayList(gMasterDisp++, D_102ED50); } -void func_effect_80078B8C(Effect* effect) { +void Effect_Effect353_Draw(Effect353* this) { RCP_SetupDL_21(); gSPDisplayList(gMasterDisp++, D_101ABD0); RCP_SetupDL(&gMasterDisp, SETUPDL_64); } -void func_effect_80078BE0(Effect* effect) { +void Macbeth_Effect377_Draw(Effect377* this) { f32 var_fv0; gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 160); @@ -475,45 +476,45 @@ void func_effect_80078BE0(Effect* effect) { if ((gGameFrameCount % 2) != 0) { var_fv0 *= 1.2f; } - Graphics_SetScaleMtx(effect->scale2 * var_fv0); + Graphics_SetScaleMtx(this->scale2 * var_fv0); gSPDisplayList(gMasterDisp++, D_SX_600F8A0); } -void func_effect_80078C84(Effect* effect) { - Graphics_SetScaleMtx(effect->scale2); +void Effect_Effect356_Draw(Effect356* this) { + Graphics_SetScaleMtx(this->scale2); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 192); gSPDisplayList(gMasterDisp++, D_ME_6000A80); } -void func_effect_80078CE8(Effect* effect) { - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_4A); - Graphics_SetScaleMtx(effect->scale2); +void Macbeth_Effect376_Draw(Effect376* this) { + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_4A); + Graphics_SetScaleMtx(this->scale2); gSPDisplayList(gMasterDisp++, D_CO_6033000); } -void func_effect_80078D60(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_393; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; - effect->scale2 = scale2; +void func_effect_80078D60(Effect393* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_393; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + this->scale2 = scale2; if (scale2 == 3.1f) { - effect->vel.x = gActors[8].vel.x; - effect->vel.y = gActors[8].vel.y; - effect->vel.z = gActors[8].vel.z; + this->vel.x = gActors[8].vel.x; + this->vel.y = gActors[8].vel.y; + this->vel.z = gActors[8].vel.z; } if (scale2 != 30.0f) { - effect->state = 1; + this->state = 1; } if (scale2 == 3.5f) { - effect->state = 2; + this->state = 2; } - effect->timer_50 = 14; - Object_SetInfo(&effect->info, effect->obj.id); + this->timer_50 = 14; + Object_SetInfo(&this->info, this->obj.id); } void func_effect_80078E50(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { @@ -527,39 +528,39 @@ void func_effect_80078E50(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { } } -void func_effect_80078EBC(Effect* effect) { - if (effect->state == 2) { - effect->vel.x = gPlayer[0].vel.x; - effect->vel.y = gPlayer[0].vel.y; - effect->vel.z = gPlayer[0].vel.z; +void Effect_Effect393_Update(Effect393* this) { + if (this->state == 2) { + this->vel.x = gPlayer[0].vel.x; + this->vel.y = gPlayer[0].vel.y; + this->vel.z = gPlayer[0].vel.z; } - effect->obj.rot.z += 35.0f; + this->obj.rot.z += 35.0f; - if (effect->timer_50 >= 7) { - effect->scale1 += 0.25f; + if (this->timer_50 >= 7) { + this->scale1 += 0.25f; } else { - effect->scale1 -= 0.25f; + this->scale1 -= 0.25f; } - if (effect->scale1 <= 0.0f) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->scale1 <= 0.0f) { + Object_Kill(&this->obj, this->sfxSource); } } -void func_effect_80078F78(Effect* effect) { - if (effect->state != 0) { +void Effect_Effect393_Draw(Effect393* this) { + if (this->state != 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_67); } else { RCP_SetupDL(&gMasterDisp, SETUPDL_63); } gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 255, 255, 0, 255); - Graphics_SetScaleMtx(effect->scale2 * effect->scale1); + Graphics_SetScaleMtx(this->scale2 * this->scale1); gSPDisplayList(gMasterDisp++, D_101C2E0); RCP_SetupDL(&gMasterDisp, SETUPDL_64); } -void func_effect_8007905C(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2, u8 arg5) { +void func_effect_8007905C(Effect357* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2, u8 arg5) { Vec3f sp54; Vec3f sp48; Vec3f sp3C; @@ -567,26 +568,26 @@ void func_effect_8007905C(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scal f32 xAng; f32 yAng; - Effect_Initialize(effect); - effect->obj.status = OBJ_ACTIVE; - effect->obj.id = OBJ_EFFECT_357; + Effect_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_EFFECT_357; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->unk_4C = arg5; + this->unk_4C = arg5; if (scale2 == 1.6f) { - effect->vel.x = (xPos - gBosses[1].obj.pos.x) * 0.1f; - effect->vel.z = (zPos - gBosses[1].obj.pos.z) * 0.1f; + this->vel.x = (xPos - gBosses[1].obj.pos.x) * 0.1f; + this->vel.z = (zPos - gBosses[1].obj.pos.z) * 0.1f; } else if (scale2 == 1.3f) { - effect->vel.x = (RAND_FLOAT(0.05f) + 0.03f) * xPos; - effect->vel.z = (RAND_FLOAT(0.05f) + 0.03f) * zPos; - effect->vel.y = 5.0f; + this->vel.x = (RAND_FLOAT(0.05f) + 0.03f) * xPos; + this->vel.z = (RAND_FLOAT(0.05f) + 0.03f) * zPos; + this->vel.y = 5.0f; } else if (scale2 == 1.55f) { - effect->vel.x = RAND_FLOAT_CENTERED(10.0f); - effect->vel.z = RAND_FLOAT_CENTERED(10.0f); + this->vel.x = RAND_FLOAT_CENTERED(10.0f); + this->vel.z = RAND_FLOAT_CENTERED(10.0f); } else if ((gCurrentLevel == LEVEL_BOLSE) && ((scale2 == 5.11f) || (scale2 == 7.22f))) { sp3C.x = gPlayer[0].pos.x; sp3C.y = gPlayer[0].pos.y; @@ -600,21 +601,21 @@ void func_effect_8007905C(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scal sp54.y = RAND_FLOAT_CENTERED(50.0f); sp54.z = RAND_FLOAT(10.0f) + 150.0f; Matrix_MultVec3f(gCalcMatrix, &sp54, &sp48); - effect->vel.x = sp48.x; - effect->vel.y = sp48.y; - effect->vel.z = sp48.z; + this->vel.x = sp48.x; + this->vel.y = sp48.y; + this->vel.z = sp48.z; } else { - effect->vel.y = (gLevelType == LEVELTYPE_PLANET) ? RAND_FLOAT(7.0f) + 7.0f : RAND_FLOAT_CENTERED(10.0f); - effect->vel.x = RAND_FLOAT_CENTERED(10.0f); - effect->vel.z = RAND_FLOAT_CENTERED(10.0f); + this->vel.y = (gLevelType == LEVELTYPE_PLANET) ? RAND_FLOAT(7.0f) + 7.0f : RAND_FLOAT_CENTERED(10.0f); + this->vel.x = RAND_FLOAT_CENTERED(10.0f); + this->vel.z = RAND_FLOAT_CENTERED(10.0f); } - effect->scale2 = (RAND_FLOAT(0.8f) + 0.3f) * scale2; - effect->timer_50 = RAND_INT(50.0f) + 70; - effect->obj.rot.x = RAND_FLOAT(360.0f); - effect->unk_60.x = RAND_FLOAT_CENTERED(30.0f); - effect->unk_60.y = RAND_FLOAT_CENTERED(30.0f); - effect->unk_60.z = RAND_FLOAT_CENTERED(30.0f); - Object_SetInfo(&effect->info, effect->obj.id); + this->scale2 = (RAND_FLOAT(0.8f) + 0.3f) * scale2; + this->timer_50 = RAND_INT(50.0f) + 70; + this->obj.rot.x = RAND_FLOAT(360.0f); + this->unk_60.x = RAND_FLOAT_CENTERED(30.0f); + this->unk_60.y = RAND_FLOAT_CENTERED(30.0f); + this->unk_60.z = RAND_FLOAT_CENTERED(30.0f); + Object_SetInfo(&this->info, this->obj.id); } void func_effect_800794CC(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { @@ -662,42 +663,42 @@ void func_effect_80079618(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { } } -void func_effect_8007968C(Effect* effect) { - if ((gCurrentLevel != LEVEL_MACBETH) || (effect->unk_44 != 7)) { - if ((effect->timer_50 == 0) || (effect->obj.pos.y < gGroundHeight)) { - Object_Kill(&effect->obj, effect->sfxSource); +void Effect_Effect357_Update(Effect357* this) { + if ((gCurrentLevel != LEVEL_MACBETH) || (this->unk_44 != 7)) { + if ((this->timer_50 == 0) || (this->obj.pos.y < gGroundHeight)) { + Object_Kill(&this->obj, this->sfxSource); } } else { if (((gGameFrameCount % 4) == 0)) { - func_effect_8007D2C8(effect->obj.pos.x, effect->obj.pos.y + 550.0f, effect->obj.pos.z, 10.0f); + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y + 550.0f, this->obj.pos.z, 10.0f); } - if ((effect->timer_50 == 0) || (effect->obj.pos.y < (gGroundHeight - 100.0f))) { - Object_Kill(&effect->obj, effect->sfxSource); + if ((this->timer_50 == 0) || (this->obj.pos.y < (gGroundHeight - 100.0f))) { + Object_Kill(&this->obj, this->sfxSource); } } - effect->obj.rot.x += effect->unk_60.x; - effect->obj.rot.y += effect->unk_60.y; - effect->obj.rot.z += effect->unk_60.z; + this->obj.rot.x += this->unk_60.x; + this->obj.rot.y += this->unk_60.y; + this->obj.rot.z += this->unk_60.z; if (gLevelType == LEVELTYPE_PLANET) { - effect->vel.y -= 0.5f; + this->vel.y -= 0.5f; } if ((gCurrentLevel == LEVEL_BOLSE) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) && (gCsFrameCount > 175)) { - effect->vel.x *= 0.95f; - effect->vel.y *= 0.95f; - effect->vel.z *= 0.95f; + this->vel.x *= 0.95f; + this->vel.y *= 0.95f; + this->vel.z *= 0.95f; } - if ((gCurrentLevel == LEVEL_MACBETH) && (effect->unk_44 == 10)) { - effect->obj.rot.x = 0.0f; - effect->obj.rot.y = 0.0f; - if (effect->timer_50 >= 25) { - effect->scale1 = 0.5f; - } else if (effect->scale1 > 0.03) { - effect->scale1 -= 0.02f; + if ((gCurrentLevel == LEVEL_MACBETH) && (this->unk_44 == 10)) { + this->obj.rot.x = 0.0f; + this->obj.rot.y = 0.0f; + if (this->timer_50 >= 25) { + this->scale1 = 0.5f; + } else if (this->scale1 > 0.03) { + this->scale1 -= 0.02f; } } } @@ -709,11 +710,11 @@ bool func_effect_800798C4(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, vo return false; } -void func_effect_800798F0(Effect* effect) { +void Effect_Effect357_Draw(Effect357* this) { Vec3f frameJointTable[50]; if ((gCurrentLevel == LEVEL_BOLSE) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { - Display_SetSecondLight(&effect->obj.pos); + Display_SetSecondLight(&this->obj.pos); } RCP_SetupDL(&gMasterDisp, SETUPDL_29); @@ -722,13 +723,13 @@ void func_effect_800798F0(Effect* effect) { gSPFogPosition(gMasterDisp++, gFogNear, 1005); } - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); switch (gCurrentLevel) { case LEVEL_MACBETH: - switch (effect->unk_44) { + switch (this->unk_44) { case 1: - if ((effect->index % 2) != 0) { + if ((this->index % 2) != 0) { gSPDisplayList(gMasterDisp++, D_MA_6022530); } else { gSPDisplayList(gMasterDisp++, D_MA_6022450); @@ -737,7 +738,7 @@ void func_effect_800798F0(Effect* effect) { case 2: RCP_SetupDL(&gMasterDisp, SETUPDL_57); - if ((effect->index % 2) != 0) { + if ((this->index % 2) != 0) { gSPDisplayList(gMasterDisp++, D_MA_601A7A0); } else { gSPDisplayList(gMasterDisp++, D_MA_60223C0); @@ -747,7 +748,7 @@ void func_effect_800798F0(Effect* effect) { case 7: Animation_GetFrameData(&D_MA_6027320, 0, frameJointTable); - Animation_DrawSkeleton(1, D_MA_602742C, frameJointTable, func_effect_800798C4, NULL, effect, + Animation_DrawSkeleton(1, D_MA_602742C, frameJointTable, func_effect_800798C4, NULL, this, &gIdentityMatrix); break; @@ -767,7 +768,7 @@ void func_effect_800798F0(Effect* effect) { RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 255, 80, 0, 255); - Graphics_SetScaleMtx(effect->scale1); + Graphics_SetScaleMtx(this->scale1); gSPDisplayList(gMasterDisp++, D_1024AC0); break; @@ -814,7 +815,7 @@ void func_effect_800798F0(Effect* effect) { break; default: - if ((effect->index % 2) != 0) { + if ((this->index % 2) != 0) { gSPDisplayList(gMasterDisp++, D_10194C0); } else { gSPDisplayList(gMasterDisp++, D_1024290); @@ -830,9 +831,9 @@ void func_effect_800798F0(Effect* effect) { break; default: - switch (effect->unk_4C) { + switch (this->unk_4C) { case 0: - if ((effect->index % 2) != 0) { + if ((this->index % 2) != 0) { gSPDisplayList(gMasterDisp++, D_10194C0); } else { gSPDisplayList(gMasterDisp++, D_1024290); @@ -840,7 +841,7 @@ void func_effect_800798F0(Effect* effect) { break; case 1: - switch ((s32) (effect->index % 4U)) { + switch ((s32) (this->index % 4U)) { case 0: Matrix_Scale(gGfxMatrix, 1.0f, 0.3f, 1.0f, MTXF_APPLY); break; @@ -871,41 +872,41 @@ void func_effect_800798F0(Effect* effect) { } } -void func_effect_8007A28C(Effect* effect) { +void Effect_Effect383_Update(Effect383* this) { Texture_Scroll(D_10190C0, 16, 32, 0); gGroundClipMode = 2; - effect->obj.rot.y += 1.0f; - Math_SmoothStepToF(&effect->scale2, effect->scale1, 0.05f, 1.5f, 0.001f); + this->obj.rot.y += 1.0f; + Math_SmoothStepToF(&this->scale2, this->scale1, 0.05f, 1.5f, 0.001f); - if (effect->timer_50 > 10) { + if (this->timer_50 > 10) { D_ctx_801779A8[0] = 60.0f; } - if (effect->timer_50 == 48) { + if (this->timer_50 == 48) { gFillScreenAlpha = 150; } - if (effect->timer_50 > 45) { + if (this->timer_50 > 45) { gFillScreenAlphaTarget = 0; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; } gFillScreenAlphaStep = 3; - if (effect->timer_50 == 0) { - effect->unk_44 -= 2; - if (effect->unk_44 < 0) { - effect->unk_44 = 0; - Object_Kill(&effect->obj, effect->sfxSource); + if (this->timer_50 == 0) { + this->unk_44 -= 2; + if (this->unk_44 < 0) { + this->unk_44 = 0; + Object_Kill(&this->obj, this->sfxSource); gGroundClipMode = 0; } } } -void func_effect_8007A3C0(Effect* effect) { +void Effect_Effect383_Draw(Effect383* this) { if (gReflectY > 0) { - Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->scale2, this->scale2, this->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL_64_2(); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_44); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_44); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_10182C0); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); @@ -913,20 +914,20 @@ void func_effect_8007A3C0(Effect* effect) { } } -void func_effect_8007A4B8(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale1) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_383; - effect->scale1 = scale1; - effect->timer_50 = 50; - effect->unk_44 = 200; +void func_effect_8007A4B8(Effect383* this, f32 xPos, f32 yPos, f32 zPos, f32 scale1) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_383; + this->scale1 = scale1; + this->timer_50 = 50; + this->unk_44 = 200; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - AUDIO_PLAY_SFX(NA_SE_EN_STAR_EXPLOSION, effect->sfxSource, 4); - Object_SetInfo(&effect->info, effect->obj.id); + AUDIO_PLAY_SFX(NA_SE_EN_STAR_EXPLOSION, this->sfxSource, 4); + Object_SetInfo(&this->info, this->obj.id); } void func_effect_8007A568(f32 xPos, f32 yPos, f32 zPos, f32 scale1) { @@ -941,73 +942,73 @@ void func_effect_8007A568(f32 xPos, f32 yPos, f32 zPos, f32 scale1) { func_effect_8007B344(xPos, yPos, zPos, 80.0f, 4); } -void func_effect_8007A5F8(Effect* effect, Vec3f* pos, u32 sfxId) { - Effect_Initialize(effect); - effect->obj.status = OBJ_ACTIVE; - effect->obj.id = OBJ_EFFECT_373; +void Effect_SetupTimedSfxAtPos(TimedSfx* this, Vec3f* pos, u32 sfxId) { + Effect_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_EFFECT_TIMED_SFX; - effect->obj.pos.x = pos->x; - effect->obj.pos.y = pos->y; - effect->obj.pos.z = pos->z; + this->obj.pos.x = pos->x; + this->obj.pos.y = pos->y; + this->obj.pos.z = pos->z; - effect->timer_50 = 50; + this->timer_50 = 50; if ((sfxId == NA_SE_OB_EXPLOSION_S) || (sfxId == NA_SE_OB_SMOKE)) { - AUDIO_PLAY_SFX(sfxId, effect->sfxSource, 0); + AUDIO_PLAY_SFX(sfxId, this->sfxSource, 0); if (sfxId == NA_SE_OB_SMOKE) { - effect->timer_50 = 300; + this->timer_50 = 300; } } else { - AUDIO_PLAY_SFX(sfxId, effect->sfxSource, 4); + AUDIO_PLAY_SFX(sfxId, this->sfxSource, 4); } - Object_SetInfo(&effect->info, effect->obj.id); + Object_SetInfo(&this->info, this->obj.id); } -void func_effect_8007A6F0(Vec3f* pos, s32 sfxId) { +void Effect_SpawnTimedSfxAtPos(Vec3f* pos, s32 sfxId) { s32 i; for (i = 0; i < ARRAY_COUNT(gEffects); i++) { if (gEffects[i].obj.status == OBJ_FREE) { - func_effect_8007A5F8(&gEffects[i], pos, sfxId); + Effect_SetupTimedSfxAtPos(&gEffects[i], pos, sfxId); break; } } } -void func_effect_8007A748(Effect* effect) { - if (effect->timer_50 == 0) { - Object_Kill(&effect->obj, effect->sfxSource); +void Effect_TimedSfx_Update(TimedSfx* this) { + if (this->timer_50 == 0) { + Object_Kill(&this->obj, this->sfxSource); } } -bool func_effect_8007A774(Player* player, Effect* effect, f32 arg2) { - if ((fabsf(player->trueZpos - effect->obj.pos.z) < arg2) && (fabsf(player->pos.x - effect->obj.pos.x) < arg2) && - (fabsf(player->pos.y - effect->obj.pos.y) < arg2) && (player->mercyTimer == 0)) { - Player_ApplyDamage(player, 0, effect->info.damage); +bool func_effect_8007A774(Player* player, Effect* this, f32 arg2) { + if ((fabsf(player->trueZpos - this->obj.pos.z) < arg2) && (fabsf(player->pos.x - this->obj.pos.x) < arg2) && + (fabsf(player->pos.y - this->obj.pos.y) < arg2) && (player->mercyTimer == 0)) { + Player_ApplyDamage(player, 0, this->info.damage); return true; } else { return false; } } -void func_effect_8007A818(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale1, u8 arg5, u8 arg6, u16 arg7) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_359; +void func_effect_8007A818(Effect359* this, f32 xPos, f32 yPos, f32 zPos, f32 scale1, u8 arg5, u8 arg6, u16 arg7) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_359; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->scale1 = scale1; - effect->unk_44 = arg5; - effect->unk_46 = arg6; - effect->unk_60.z = RAND_FLOAT_CENTERED(10.0f); - effect->unk_60.y = scale1 * 0.1f; + this->scale1 = scale1; + this->unk_44 = arg5; + this->unk_46 = arg6; + this->unk_60.z = RAND_FLOAT_CENTERED(10.0f); + this->unk_60.y = scale1 * 0.1f; if (arg7 != 0) { - effect->vel.x = RAND_FLOAT_CENTERED(30.0f); + this->vel.x = RAND_FLOAT_CENTERED(30.0f); } - Object_SetInfo(&effect->info, effect->obj.id); + Object_SetInfo(&this->info, this->obj.id); } void func_effect_8007A900(f32 xPos, f32 yPos, f32 zPos, f32 scale1, u8 arg4, u8 arg5, u16 arg6) { @@ -1023,70 +1024,70 @@ void func_effect_8007A900(f32 xPos, f32 yPos, f32 zPos, f32 scale1, u8 arg4, u8 } } -void func_effect_8007A994(Effect* effect) { - Math_SmoothStepToF(&effect->scale2, effect->scale1, 0.1f, 10.0f, 0.01f); - effect->obj.rot.z += effect->unk_60.z; - effect->vel.y += effect->unk_60.y; +void Effect_Effect359_Update(Effect359* this) { + Math_SmoothStepToF(&this->scale2, this->scale1, 0.1f, 10.0f, 0.01f); + this->obj.rot.z += this->unk_60.z; + this->vel.y += this->unk_60.y; - if ((effect->unk_4A % 2) != 0) { - effect->unk_48++; - if (effect->unk_48 > 5) { - effect->unk_48 = 5; + if ((this->unk_4A % 2) != 0) { + this->unk_48++; + if (this->unk_48 > 5) { + this->unk_48 = 5; } } - effect->unk_44 -= effect->unk_46; - if (effect->unk_44 <= 20) { - Object_Kill(&effect->obj, effect->sfxSource); + this->unk_44 -= this->unk_46; + if (this->unk_44 <= 20) { + Object_Kill(&this->obj, this->sfxSource); } - effect->unk_4A++; + this->unk_4A++; } static Gfx* D_800D178C[] = { D_TI_6003440, D_TI_60034E0, D_TI_6003580, D_TI_6003620, D_TI_60036C0, D_TI_6003760 }; -void func_effect_8007AA60(Effect* effect) { +void Effect_Effect359_Draw(Effect359* this) { RCP_SetupDL(&gMasterDisp, SETUPDL_68); - gDPSetPrimColor(gMasterDisp++, 0, 0, 31, 10, 00, effect->unk_44); + gDPSetPrimColor(gMasterDisp++, 0, 0, 31, 10, 00, this->unk_44); gDPSetEnvColor(gMasterDisp++, 141, 73, 5, 0); - Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, 1.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->scale2, this->scale2, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_800D178C[effect->unk_4C]); - effect->unk_4C = effect->unk_48; + gSPDisplayList(gMasterDisp++, D_800D178C[this->unk_4C]); + this->unk_4C = this->unk_48; RCP_SetupDL(&gMasterDisp, SETUPDL_64); } -void func_effect_8007AB50(Effect* effect) { - if (effect->state == 0) { - Math_SmoothStepToF(&effect->scale2, effect->scale1, 0.1f, 10.0f, 0.0f); - effect->unk_44 -= 20; - if (effect->unk_44 < 0) { - Object_Kill(&effect->obj, effect->sfxSource); +void Effect_Effect372_Update(Effect372* this) { + if (this->state == 0) { + Math_SmoothStepToF(&this->scale2, this->scale1, 0.1f, 10.0f, 0.0f); + this->unk_44 -= 20; + if (this->unk_44 < 0) { + Object_Kill(&this->obj, this->sfxSource); } } else { - Math_SmoothStepToF(&effect->scale2, effect->scale1, 0.1f, 10.0f, 0.0f); - effect->unk_44 -= 10; - if (effect->unk_44 < 0) { - Object_Kill(&effect->obj, effect->sfxSource); + Math_SmoothStepToF(&this->scale2, this->scale1, 0.1f, 10.0f, 0.0f); + this->unk_44 -= 10; + if (this->unk_44 < 0) { + Object_Kill(&this->obj, this->sfxSource); } } } -void func_effect_8007AC0C(Effect* effect, f32 xPos, f32 unused_posY, f32 zPos, f32 scale2, f32 scale1, f32 yRot) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_372; +void func_effect_8007AC0C(Effect372* this, f32 xPos, f32 unused_posY, f32 zPos, f32 scale2, f32 scale1, f32 yRot) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_372; - effect->obj.pos.x = xPos; - effect->obj.pos.y = gGroundHeight; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = gGroundHeight; + this->obj.pos.z = zPos; - effect->unk_44 = 180; - effect->scale2 = scale2; - effect->scale1 = scale1; - effect->obj.rot.y = yRot; - effect->vel.x = gPlayer[0].vel.x * 0.6f; - effect->vel.z = gPlayer[0].vel.z * 0.6; // Forgotten f means bad codegen - Object_SetInfo(&effect->info, effect->obj.id); + this->unk_44 = 180; + this->scale2 = scale2; + this->scale1 = scale1; + this->obj.rot.y = yRot; + this->vel.x = gPlayer[0].vel.x * 0.6f; + this->vel.z = gPlayer[0].vel.z * 0.6; // Forgotten f means bad codegen + Object_SetInfo(&this->info, this->obj.id); } void func_effect_8007ACE0(f32 xPos, f32 yPos, f32 zPos, f32 scale2, f32 scale1, f32 yRot) { @@ -1100,21 +1101,21 @@ void func_effect_8007ACE0(f32 xPos, f32 yPos, f32 zPos, f32 scale2, f32 scale1, } } -void func_effect_8007AD58(Effect* effect, f32 xPos, f32 unused_posY, f32 zPos, f32 scale2, f32 scale1, f32 yRot) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_372; - effect->state = 1; +void func_effect_8007AD58(Effect372* this, f32 xPos, f32 unused_posY, f32 zPos, f32 scale2, f32 scale1, f32 yRot) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_372; + this->state = 1; - effect->obj.pos.x = xPos; - effect->obj.pos.y = gGroundHeight; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = gGroundHeight; + this->obj.pos.z = zPos; - effect->unk_44 = 180; - effect->scale2 = scale2; - effect->scale1 = scale1; - effect->obj.rot.y = yRot; - Object_SetInfo(&effect->info, effect->obj.id); + this->unk_44 = 180; + this->scale2 = scale2; + this->scale1 = scale1; + this->obj.rot.y = yRot; + Object_SetInfo(&this->info, this->obj.id); } void func_effect_8007ADF4(f32 xPos, f32 yPos, f32 zPos, f32 scale2, f32 scale1) { @@ -1136,20 +1137,20 @@ void func_effect_8007ADF4(f32 xPos, f32 yPos, f32 zPos, f32 scale2, f32 scale1) } } -void func_effect_8007AF30(Effect* effect, f32 xPos, f32 zPos, f32 xVel, f32 zVel, f32 scale1) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_382; +void func_effect_8007AF30(Effect382* this, f32 xPos, f32 zPos, f32 xVel, f32 zVel, f32 scale1) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_382; - effect->obj.pos.x = xPos; - effect->obj.pos.y = -10.0f; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = -10.0f; + this->obj.pos.z = zPos; - effect->vel.x = xVel; - effect->vel.z = zVel - gPathVelZ; - effect->scale1 = scale1; - effect->timer_50 = 100; - Object_SetInfo(&effect->info, effect->obj.id); + this->vel.x = xVel; + this->vel.z = zVel - gPathVelZ; + this->scale1 = scale1; + this->timer_50 = 100; + Object_SetInfo(&this->info, this->obj.id); } void func_effect_8007AFD0(f32 xPos, f32 zPos, f32 xVel, f32 zVel, f32 scale1) { @@ -1163,42 +1164,42 @@ void func_effect_8007AFD0(f32 xPos, f32 zPos, f32 xVel, f32 zVel, f32 scale1) { } } -void func_effect_8007B040(Effect* effect) { +void Effect_Effect382_Update(Effect382* this) { f32 sp2C; s32 sp28; - if (Play_CheckDynaFloorCollision(&sp2C, &sp28, effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z)) { - D_ctx_801782EC[sp28] = effect->scale1; - D_ctx_801782EC[sp28 + 1] = effect->scale1 * 0.7f; - D_ctx_801782EC[sp28 - 1] = effect->scale1 * 0.7f; + if (Play_CheckDynaFloorCollision(&sp2C, &sp28, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z)) { + D_ctx_801782EC[sp28] = this->scale1; + D_ctx_801782EC[sp28 + 1] = this->scale1 * 0.7f; + D_ctx_801782EC[sp28 - 1] = this->scale1 * 0.7f; } - if (effect->timer_50 == 0) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->timer_50 == 0) { + Object_Kill(&this->obj, this->sfxSource); } } -void func_effect_8007B0F4(Effect* effect) { - Math_SmoothStepToF(&effect->scale2, effect->scale1 * 3.0f, 0.1f, 10.0f, 0.0f); - effect->unk_44 -= 13; - effect->obj.rot.y = 180.0f - effect->obj.rot.y; - if (effect->unk_44 < 0) { - Object_Kill(&effect->obj, effect->sfxSource); +void Effect_Effect381_Update(Effect381* this) { + Math_SmoothStepToF(&this->scale2, this->scale1 * 3.0f, 0.1f, 10.0f, 0.0f); + this->unk_44 -= 13; + this->obj.rot.y = 180.0f - this->obj.rot.y; + if (this->unk_44 < 0) { + Object_Kill(&this->obj, this->sfxSource); } } -void func_effect_8007B180(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale1) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_381; +void func_effect_8007B180(Effect381* this, f32 xPos, f32 yPos, f32 zPos, f32 scale1) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_381; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->unk_44 = 255; - effect->scale1 = scale1; - Object_SetInfo(&effect->info, effect->obj.id); - AUDIO_PLAY_SFX(NA_SE_SPLASH_LEVEL_L, effect->sfxSource, 0); + this->unk_44 = 255; + this->scale1 = scale1; + Object_SetInfo(&this->info, this->obj.id); + AUDIO_PLAY_SFX(NA_SE_SPLASH_LEVEL_L, this->sfxSource, 0); } void func_effect_8007B228(f32 xPos, f32 yPos, f32 zPos, f32 scale1) { @@ -1212,22 +1213,22 @@ void func_effect_8007B228(f32 xPos, f32 yPos, f32 zPos, f32 scale1) { } } -void func_effect_8007B2BC(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale1, s32 arg5) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_384; +void func_effect_8007B2BC(Effect384* this, f32 xPos, f32 yPos, f32 zPos, f32 scale1, s32 arg5) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_384; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->scale1 = scale1; - effect->unk_44 = 255; - effect->unk_4C = arg5; - Object_SetInfo(&effect->info, effect->obj.id); + this->scale1 = scale1; + this->unk_44 = 255; + this->unk_4C = arg5; + Object_SetInfo(&this->info, this->obj.id); } -// Orange-yellowish light effect simulating an explosion +// Orange-yellowish light this simulating an explosion void func_effect_8007B344(f32 xPos, f32 yPos, f32 zPos, f32 scale1, s32 arg4) { s32 i; @@ -1239,16 +1240,16 @@ void func_effect_8007B344(f32 xPos, f32 yPos, f32 zPos, f32 scale1, s32 arg4) { } } -void func_effect_8007B3B8(Effect* effect) { +void Effect_Effect384_Update(Effect384* this) { f32 var_fv0; f32 var_fv1; s32 var_v0; - if (effect->unk_4C == 6) { + if (this->unk_4C == 6) { var_fv0 = 15.0f; var_fv1 = 0.05f; var_v0 = 4; - } else if ((effect->unk_4C == 5) && ((gCurrentLevel == LEVEL_KATINA) || (gCurrentLevel == LEVEL_METEO))) { + } else if ((this->unk_4C == 5) && ((gCurrentLevel == LEVEL_KATINA) || (gCurrentLevel == LEVEL_METEO))) { var_fv0 = 10.0f; var_fv1 = 0.1f; var_v0 = 4; @@ -1258,35 +1259,35 @@ void func_effect_8007B3B8(Effect* effect) { var_v0 = 8; } - Math_SmoothStepToF(&effect->scale2, effect->scale1, var_fv1, var_fv0, 0.0f); + Math_SmoothStepToF(&this->scale2, this->scale1, var_fv1, var_fv0, 0.0f); - effect->unk_44 -= var_v0; - if (effect->unk_44 < 0) { - Object_Kill(&effect->obj, effect->sfxSource); + this->unk_44 -= var_v0; + if (this->unk_44 < 0) { + Object_Kill(&this->obj, this->sfxSource); } } -void func_effect_8007B494(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale1, s32 arg5) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_385; +void func_effect_8007B494(Effect385* this, f32 xPos, f32 yPos, f32 zPos, f32 scale1, s32 arg5) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_385; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->obj.rot.x = 90.0f; - effect->scale1 = scale1; - effect->unk_44 = arg5; + this->obj.rot.x = 90.0f; + this->scale1 = scale1; + this->unk_44 = arg5; if (arg5 < 60) { - effect->unk_46 = 1; + this->unk_46 = 1; } else if (arg5 < 90) { - effect->unk_46 = 2; + this->unk_46 = 2; } else { - effect->unk_46 = 3; + this->unk_46 = 3; } - Object_SetInfo(&effect->info, effect->obj.id); + Object_SetInfo(&this->info, this->obj.id); } void func_effect_8007B550(f32 xPos, f32 yPos, f32 zPos, f32 scale1, s32 arg4) { @@ -1300,83 +1301,83 @@ void func_effect_8007B550(f32 xPos, f32 yPos, f32 zPos, f32 scale1, s32 arg4) { } } -void func_effect_8007B5C0(Effect* effect) { - Math_SmoothStepToF(&effect->scale2, effect->scale1, 0.1f, 10.0f, 0.1f); - effect->unk_44 -= effect->unk_46; - if (effect->unk_44 < 0) { - Object_Kill(&effect->obj, effect->sfxSource); +void Effect_Effect385_Update(Effect385* this) { + Math_SmoothStepToF(&this->scale2, this->scale1, 0.1f, 10.0f, 0.1f); + this->unk_44 -= this->unk_46; + if (this->unk_44 < 0) { + Object_Kill(&this->obj, this->sfxSource); } } -void func_effect_8007B62C(Effect* effect) { - if (effect->timer_50 == 0) { - effect->unk_46 -= 4; - if (effect->unk_46 <= 0) { - Object_Kill(&effect->obj, effect->sfxSource); +void Effect_Clouds_Update(Clouds* this) { + if (this->timer_50 == 0) { + this->unk_46 -= 4; + if (this->unk_46 <= 0) { + Object_Kill(&this->obj, this->sfxSource); } } } -void func_effect_8007B670(Effect* effect) { +void Effect_Effect388_Update(Effect388* this) { } -void func_effect_8007B67C(Effect* effect) { +void Effect_Effect389_Update(Effect389* this) { s32 var_v1; - effect->unk_46 += 2; + this->unk_46 += 2; - if (effect->unk_46 >= 10) { - effect->unk_46 = 10; + if (this->unk_46 >= 10) { + this->unk_46 = 10; } - if (effect->unk_46 >= 9) { - effect->unk_48++; - if (effect->unk_48 >= 10) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->unk_46 >= 9) { + this->unk_48++; + if (this->unk_48 >= 10) { + Object_Kill(&this->obj, this->sfxSource); } } - var_v1 = effect->unk_4A; + var_v1 = this->unk_4A; if (var_v1 != 0) { if (var_v1 > 10) { var_v1 -= 10; } - effect->vel.x = gPlayer[var_v1 - 1].vel.x; - effect->vel.y = gPlayer[var_v1 - 1].vel.y; - effect->vel.z = gPlayer[var_v1 - 1].vel.z; + this->vel.x = gPlayer[var_v1 - 1].vel.x; + this->vel.y = gPlayer[var_v1 - 1].vel.y; + this->vel.z = gPlayer[var_v1 - 1].vel.z; } } -void func_effect_8007B758(Effect* effect) { - Math_SmoothStepToF(&effect->scale2, effect->scale1, 0.1f, 10.0f, 0.1f); - effect->unk_44 -= 2; - if (effect->unk_44 < 0) { - Object_Kill(&effect->obj, effect->sfxSource); +void Effect_Effect347_Update(Effect347* this) { + Math_SmoothStepToF(&this->scale2, this->scale1, 0.1f, 10.0f, 0.1f); + this->unk_44 -= 2; + if (this->unk_44 < 0) { + Object_Kill(&this->obj, this->sfxSource); } - func_effect_8007A774(gPlayer, effect, effect->scale2 * 20.0f); + func_effect_8007A774(gPlayer, this, this->scale2 * 20.0f); } -void func_effect_8007B7E8(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_364; +void func_effect_8007B7E8(Effect364* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_364; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->vel.x = RAND_FLOAT_CENTERED(5.0f); - effect->vel.y = RAND_FLOAT_CENTERED(3.0f); - effect->unk_48 = 3; + this->vel.x = RAND_FLOAT_CENTERED(5.0f); + this->vel.y = RAND_FLOAT_CENTERED(3.0f); + this->unk_48 = 3; if (Rand_ZeroOne() < 0.5f) { - effect->unk_48 = -effect->unk_48; + this->unk_48 = -this->unk_48; } - effect->unk_4A = 50; - effect->unk_46 = 1; - effect->scale2 = scale2 * 0.2f; - effect->obj.rot.z = RAND_FLOAT(360.0f); - Object_SetInfo(&effect->info, effect->obj.id); + this->unk_4A = 50; + this->unk_46 = 1; + this->scale2 = scale2 * 0.2f; + this->obj.rot.z = RAND_FLOAT(360.0f); + Object_SetInfo(&this->info, this->obj.id); } void func_effect_8007B8F8(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { @@ -1390,26 +1391,26 @@ void func_effect_8007B8F8(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { } } -void func_effect_8007B960(Effect* effect) { - effect->scale2 += 0.07f; - effect->unk_4A -= effect->unk_46; - if (effect->unk_4A < 0) { - Object_Kill(&effect->obj, effect->sfxSource); +void Effect_Effect364_Update(Effect364* this) { + this->scale2 += 0.07f; + this->unk_4A -= this->unk_46; + if (this->unk_4A < 0) { + Object_Kill(&this->obj, this->sfxSource); } - effect->obj.rot.z += effect->unk_48; - effect->vel.y += 0.2f; + this->obj.rot.z += this->unk_48; + this->vel.y += 0.2f; } -void func_effect_8007B9DC(Effect* effect) { +void Effect_Effect364_Draw(Effect364* this) { //! DEBUG: Hold Z on controller 4 to set up a display list. if (gControllerHold[3].button & Z_TRIG) { RCP_SetupDL(&gMasterDisp, SETUPDL_4); } - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); if (gCurrentLevel != LEVEL_MACBETH) { - gDPSetPrimColor(gMasterDisp++, 0, 0, 140, 99, 58, effect->unk_4A); + gDPSetPrimColor(gMasterDisp++, 0, 0, 140, 99, 58, this->unk_4A); } else { gDPSetPrimColor(gMasterDisp++, 0, 0, (gGameFrameCount % 4U) + 5, (gGameFrameCount % 4U) + 3, (gGameFrameCount % 4U) + 3, 220); @@ -1424,38 +1425,38 @@ void func_effect_8007B9DC(Effect* effect) { } } -void func_effect_8007BB14(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_362; +void func_effect_8007BB14(Effect362* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_362; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->vel.x = RAND_FLOAT_CENTERED(5.0f); - effect->vel.y = RAND_FLOAT_CENTERED(3.0f); - effect->unk_48 = 3; + this->vel.x = RAND_FLOAT_CENTERED(5.0f); + this->vel.y = RAND_FLOAT_CENTERED(3.0f); + this->unk_48 = 3; if (Rand_ZeroOne() < 0.5f) { - effect->unk_48 = -effect->unk_48; + this->unk_48 = -this->unk_48; } - effect->unk_4A = 180; - effect->unk_46 = 8; + this->unk_4A = 180; + this->unk_46 = 8; if (scale2 > 15.0f) { - effect->unk_46 = 5; - effect->unk_4A = 80; + this->unk_46 = 5; + this->unk_4A = 80; } - effect->scale2 = scale2 * 0.25f; - effect->obj.rot.z = RAND_FLOAT(360.0f); + this->scale2 = scale2 * 0.25f; + this->obj.rot.z = RAND_FLOAT(360.0f); if (scale2 == 6.0f) { - effect->vel.z = gPlayer[0].vel.z * 0.6f; + this->vel.z = gPlayer[0].vel.z * 0.6f; } - Object_SetInfo(&effect->info, effect->obj.id); + Object_SetInfo(&this->info, this->obj.id); } void func_effect_8007BC7C(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { @@ -1469,69 +1470,69 @@ void func_effect_8007BC7C(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { } } -void func_effect_8007BCE8(Effect* effect) { +void Effect_Effect362_Update(Effect362* this) { if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) { - effect->obj.rot.x = RAD_TO_DEG(gPlayer[0].camPitch); - effect->obj.rot.y = RAD_TO_DEG(-gPlayer[0].camYaw); + this->obj.rot.x = RAD_TO_DEG(gPlayer[0].camPitch); + this->obj.rot.y = RAD_TO_DEG(-gPlayer[0].camYaw); } if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_NEXT) { - effect->unk_46 = 2; - effect->vel.y -= 0.13f; + this->unk_46 = 2; + this->vel.y -= 0.13f; } - effect->scale2 += 0.07f; - effect->unk_4A -= effect->unk_46; + this->scale2 += 0.07f; + this->unk_4A -= this->unk_46; - if (effect->unk_4A < 0) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->unk_4A < 0) { + Object_Kill(&this->obj, this->sfxSource); } - effect->obj.rot.z += effect->unk_48; - effect->vel.y += 0.2f; + this->obj.rot.z += this->unk_48; + this->vel.y += 0.2f; } -void func_effect_8007BDE0(Effect* effect) { - effect->scale2 += 0.04f; - effect->unk_4A -= 2; - if (effect->unk_4A < 0) { - Object_Kill(&effect->obj, effect->sfxSource); +void Effect_Effect361_Update(Effect361* this) { + this->scale2 += 0.04f; + this->unk_4A -= 2; + if (this->unk_4A < 0) { + Object_Kill(&this->obj, this->sfxSource); } - effect->obj.rot.z += effect->unk_48; - effect->vel.y += effect->scale1; + this->obj.rot.z += this->unk_48; + this->vel.y += this->scale1; } -void func_effect_8007BE54(Effect* effect) { - effect->scale2 += 0.02f; - effect->unk_4A -= 3; - if (effect->unk_4A < 0) { - Object_Kill(&effect->obj, effect->sfxSource); +void Effect_Effect360_Update(Effect360* this) { + this->scale2 += 0.02f; + this->unk_4A -= 3; + if (this->unk_4A < 0) { + Object_Kill(&this->obj, this->sfxSource); } - effect->vel.z = gPlayer[0].vel.z + 7.0f; - effect->obj.rot.z += effect->unk_48; - effect->vel.y += 0.1f; + this->vel.z = gPlayer[0].vel.z + 7.0f; + this->obj.rot.z += this->unk_48; + this->vel.y += 0.1f; } -void func_effect_8007BEE8(Effect* effect) { - Graphics_SetScaleMtx(effect->scale2); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_4A); +void Effect_Effect360_361_362_Draw(Effect* this) { + Graphics_SetScaleMtx(this->scale2); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_4A); gSPDisplayList(gMasterDisp++, D_BG_PLANET_2010A30); } -void func_effect_8007BF64(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, +void func_effect_8007BF64(Effect386* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, s32 timer50) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_386; + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_386; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->vel.x = xVel; - effect->vel.y = yVel; - effect->vel.z = zVel; - effect->scale2 = scale2; - effect->timer_50 = timer50; - Object_SetInfo(&effect->info, effect->obj.id); + this->vel.x = xVel; + this->vel.y = yVel; + this->vel.z = zVel; + this->scale2 = scale2; + this->timer_50 = timer50; + Object_SetInfo(&this->info, this->obj.id); } void func_effect_8007BFFC(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, s32 timer50) { @@ -1545,22 +1546,22 @@ void func_effect_8007BFFC(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 } } -void func_effect_8007C088(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, +void func_effect_8007C088(Effect390* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, s32 timer50) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_390; + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_390; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->vel.x = xVel; - effect->vel.y = yVel; - effect->vel.z = zVel; - effect->scale2 = scale2; - effect->timer_50 = timer50; - Object_SetInfo(&effect->info, effect->obj.id); + this->vel.x = xVel; + this->vel.y = yVel; + this->vel.z = zVel; + this->scale2 = scale2; + this->timer_50 = timer50; + Object_SetInfo(&this->info, this->obj.id); } void func_effect_8007C120(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, s32 timer50) { @@ -1586,53 +1587,53 @@ void func_effect_8007C1AC(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 } } -void func_effect_8007C250(Effect* effect) { +void Effect_Effect386_Update(Effect386* this) { f32 randX; f32 randY; f32 randOther; s32 var_v0; - Math_SmoothStepToF(&effect->vel.x, 0.0f, 0.2f, 10.0f, 0.1f); - Math_SmoothStepToF(&effect->vel.y, 0.0f, 0.2f, 10.0f, 0.1f); - Math_SmoothStepToF(&effect->vel.z, 0.0f, 0.2f, 10.0f, 0.1f); + Math_SmoothStepToF(&this->vel.x, 0.0f, 0.2f, 10.0f, 0.1f); + Math_SmoothStepToF(&this->vel.y, 0.0f, 0.2f, 10.0f, 0.1f); + Math_SmoothStepToF(&this->vel.z, 0.0f, 0.2f, 10.0f, 0.1f); var_v0 = 4 - 1; if (gLevelMode == LEVELMODE_ALL_RANGE) { var_v0 = 2 - 1; } - if ((effect->timer_50 & var_v0) == 0) { + if ((this->timer_50 & var_v0) == 0) { randX = RAND_FLOAT_CENTERED(40.0f); randY = RAND_FLOAT_CENTERED(40.0f); randOther = RAND_FLOAT(0.5f) + 1.0f; - func_effect_8007D0E0(effect->obj.pos.x + randX, effect->obj.pos.y + randY, effect->obj.pos.z, - effect->scale2 * randOther); - if (effect->timer_50 == 0) { - Object_Kill(&effect->obj, effect->sfxSource); + func_effect_8007D0E0(this->obj.pos.x + randX, this->obj.pos.y + randY, this->obj.pos.z, + this->scale2 * randOther); + if (this->timer_50 == 0) { + Object_Kill(&this->obj, this->sfxSource); } } } -void func_effect_8007C3B4(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, +void func_effect_8007C3B4(Effect389* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, s32 arg8) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_389; + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_389; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->vel.x = xVel; - effect->vel.y = yVel; - effect->vel.z = zVel; + this->vel.x = xVel; + this->vel.y = yVel; + this->vel.z = zVel; - effect->scale2 = scale2; - effect->unk_4A = arg8; - effect->unk_4C = RAND_INT(12.0f); - effect->obj.rot.z = RAND_FLOAT(360.0f); - Object_SetInfo(&effect->info, effect->obj.id); - effect->unk_44 = 255; + this->scale2 = scale2; + this->unk_4A = arg8; + this->unk_4C = RAND_INT(12.0f); + this->obj.rot.z = RAND_FLOAT(360.0f); + Object_SetInfo(&this->info, this->obj.id); + this->unk_44 = 255; } void func_effect_8007C484(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, s32 arg7) { @@ -1646,35 +1647,35 @@ void func_effect_8007C484(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 } } -void func_effect_8007C50C(Effect* effect) { +void Effect_Effect390_Update(Effect390* this) { f32 randX; f32 randY; f32 randOther; - if ((effect->timer_50 % 8) == 0) { - randX = RAND_FLOAT_CENTERED(40.0f) * effect->scale2; - randY = RAND_FLOAT_CENTERED(40.0f) * effect->scale2; + if ((this->timer_50 % 8) == 0) { + randX = RAND_FLOAT_CENTERED(40.0f) * this->scale2; + randY = RAND_FLOAT_CENTERED(40.0f) * this->scale2; randOther = RAND_FLOAT(1.0f) + 1.0f; - func_effect_8007C484(effect->obj.pos.x + randX, effect->obj.pos.y + randY, effect->obj.pos.z, effect->vel.x, - effect->vel.y, effect->vel.z, effect->scale2 * randOther, 0); - if (effect->timer_50 == 0) { - Object_Kill(&effect->obj, effect->sfxSource); + func_effect_8007C484(this->obj.pos.x + randX, this->obj.pos.y + randY, this->obj.pos.z, this->vel.x, + this->vel.y, this->vel.z, this->scale2 * randOther, 0); + if (this->timer_50 == 0) { + Object_Kill(&this->obj, this->sfxSource); } } } -void func_effect_8007C608(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 timer50) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_387; +void func_effect_8007C608(Effect387* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 timer50) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_387; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->scale2 = scale2; - effect->timer_50 = timer50; - Object_SetInfo(&effect->info, effect->obj.id); + this->scale2 = scale2; + this->timer_50 = timer50; + Object_SetInfo(&this->info, this->obj.id); } void func_effect_8007C688(f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 timer50) { @@ -1688,37 +1689,37 @@ void func_effect_8007C688(f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 timer50) } } -void func_effect_8007C6FC(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_343; +void func_effect_8007C6FC(Effect343* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_343; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->unk_48 = 3; - effect->vel.y = 5.0f; + this->unk_48 = 3; + this->vel.y = 5.0f; if (Rand_ZeroOne() < 0.5f) { - effect->unk_48 = -effect->unk_48; + this->unk_48 = -this->unk_48; } if ((gCurrentLevel == LEVEL_FORTUNA) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_NEXT)) { - effect->unk_4A = 180; + this->unk_4A = 180; } else { - effect->unk_4A = 255; + this->unk_4A = 255; } - effect->scale2 = scale2 * 0.25f; - effect->obj.rot.z = RAND_FLOAT(360.0f); - effect->unk_44 = 0; + this->scale2 = scale2 * 0.25f; + this->obj.rot.z = RAND_FLOAT(360.0f); + this->unk_44 = 0; if (Rand_ZeroOne() < 0.3f) { - effect->unk_44 = 1; - effect->unk_4A = 255; - effect->scale2 = scale2 * 0.3f; + this->unk_44 = 1; + this->unk_4A = 255; + this->scale2 = scale2 * 0.3f; } - effect->scale1 = RAND_FLOAT(0.2f); - Object_SetInfo(&effect->info, effect->obj.id); + this->scale1 = RAND_FLOAT(0.2f); + Object_SetInfo(&this->info, this->obj.id); } void func_effect_8007C85C(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { @@ -1732,7 +1733,7 @@ void func_effect_8007C85C(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { } } -void func_effect_8007C8C4(Effect* effect) { +void Effect_Effect387_Update(Effect387* this) { f32 randX; f32 randY; f32 randOther; @@ -1743,121 +1744,121 @@ void func_effect_8007C8C4(Effect* effect) { var_v0 = 4 - 1; } - if (((effect->timer_50 & var_v0) == 0) && (gLevelType == LEVELTYPE_PLANET)) { + if (((this->timer_50 & var_v0) == 0) && (gLevelType == LEVELTYPE_PLANET)) { randX = RAND_FLOAT_CENTERED(10.0f); randY = RAND_FLOAT_CENTERED(10.0f); randOther = RAND_FLOAT(0.5f) + 1.0f; - func_effect_8007C85C(effect->obj.pos.x + randX, effect->obj.pos.y + randY, effect->obj.pos.z, - effect->scale2 * randOther); - if (effect->timer_50 == 0) { - Object_Kill(&effect->obj, effect->sfxSource); + func_effect_8007C85C(this->obj.pos.x + randX, this->obj.pos.y + randY, this->obj.pos.z, + this->scale2 * randOther); + if (this->timer_50 == 0) { + Object_Kill(&this->obj, this->sfxSource); } } } -void func_effect_8007C9E0(Effect* effect) { - if (effect->unk_44 == 0) { - effect->scale2 *= 1.03f; - effect->unk_4A -= 3; - if (effect->unk_4A < 0) { - Object_Kill(&effect->obj, effect->sfxSource); +void Effect_Effect343_Update(Effect343* this) { + if (this->unk_44 == 0) { + this->scale2 *= 1.03f; + this->unk_4A -= 3; + if (this->unk_4A < 0) { + Object_Kill(&this->obj, this->sfxSource); } - effect->obj.rot.z += effect->unk_48; - effect->vel.y += 0.3f; - effect->vel.x += effect->scale1; + this->obj.rot.z += this->unk_48; + this->vel.y += 0.3f; + this->vel.x += this->scale1; } else { - effect->scale2 *= 1.03f; - effect->unk_4A -= 7; - if (effect->unk_4A < 0) { - Object_Kill(&effect->obj, effect->sfxSource); + this->scale2 *= 1.03f; + this->unk_4A -= 7; + if (this->unk_4A < 0) { + Object_Kill(&this->obj, this->sfxSource); } - effect->obj.rot.z += effect->unk_48; - effect->vel.y += 0.3f; - effect->vel.x += effect->scale1; + this->obj.rot.z += this->unk_48; + this->vel.y += 0.3f; + this->vel.x += this->scale1; } } -void func_effect_8007CAF0(Effect* effect) { - Graphics_SetScaleMtx(effect->scale2); - if (effect->unk_44 == 0) { - gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 0, effect->unk_4A); +void Effect_Effect343_Draw(Effect343* this) { + Graphics_SetScaleMtx(this->scale2); + if (this->unk_44 == 0) { + gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 0, this->unk_4A); gSPDisplayList(gMasterDisp++, D_102A010); } else { Matrix_Scale(gGfxMatrix, 1.5f, 1.5f, 1.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_4A); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_4A); gSPDisplayList(gMasterDisp++, D_BG_PLANET_20031B0); } } -void func_effect_8007CC00(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_FIRE_SMOKE; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; - effect->scale2 = scale2; - effect->scale1 = 0.5f; - effect->unk_4C = 0; - effect->obj.rot.z = RAND_FLOAT(360.0f); - Object_SetInfo(&effect->info, effect->obj.id); +void func_effect_8007CC00(EffectFireSmoke* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_FIRE_SMOKE; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + this->scale2 = scale2; + this->scale1 = 0.5f; + this->unk_4C = 0; + this->obj.rot.z = RAND_FLOAT(360.0f); + Object_SetInfo(&this->info, this->obj.id); if (gLevelType == LEVELTYPE_PLANET) { - effect->unk_44 = 230; + this->unk_44 = 230; } else { - effect->unk_44 = 255; + this->unk_44 = 255; } } -void func_effect_8007CCBC(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_340; +void func_effect_8007CCBC(Effect340* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_340; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->scale2 = scale2; - effect->unk_4C = 3; - effect->scale1 = 0.2f; - effect->obj.rot.z = RAND_FLOAT(360.0f); - Object_SetInfo(&effect->info, effect->obj.id); + this->scale2 = scale2; + this->unk_4C = 3; + this->scale1 = 0.2f; + this->obj.rot.z = RAND_FLOAT(360.0f); + Object_SetInfo(&this->info, this->obj.id); if (gLevelType == LEVELTYPE_PLANET) { - effect->unk_44 = 230; + this->unk_44 = 230; } else { - effect->unk_44 = 255; + this->unk_44 = 255; } } -void func_effect_8007CD7C(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 timer50) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_342; - effect->timer_50 = timer50; +void func_effect_8007CD7C(Effect342* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 timer50) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_342; + this->timer_50 = timer50; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->unk_48 = 3; + this->unk_48 = 3; if (Rand_ZeroOne() < 0.5f) { - effect->unk_48 = -effect->unk_48; + this->unk_48 = -this->unk_48; } - effect->unk_4A = 255; - effect->scale2 = scale2; - effect->obj.rot.z = RAND_FLOAT(360.0f); + this->unk_4A = 255; + this->scale2 = scale2; + this->obj.rot.z = RAND_FLOAT(360.0f); if ((Rand_ZeroOne() < 0.5f) && (gLevelType == LEVELTYPE_PLANET) && (timer50 != 1)) { - effect->unk_44 = 1; + this->unk_44 = 1; } if (timer50 == 2) { - effect->unk_44 = 1; + this->unk_44 = 1; } if (scale2 == 2.2f) { - effect->unk_44 = 0; + this->unk_44 = 0; } - Object_SetInfo(&effect->info, effect->obj.id); + Object_SetInfo(&this->info, this->obj.id); } void func_effect_8007CEBC(f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 timer50) { @@ -1923,22 +1924,22 @@ void func_effect_8007D10C(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { func_effect_8007CF9C(xPos, yPos, zPos, scale2); } -void func_effect_8007D138(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_341; +void func_effect_8007D138(Effect341* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_341; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->scale2 = scale2; - effect->obj.rot.z = RAND_FLOAT(360.0f); - Object_SetInfo(&effect->info, effect->obj.id); + this->scale2 = scale2; + this->obj.rot.z = RAND_FLOAT(360.0f); + Object_SetInfo(&this->info, this->obj.id); if (gLevelType == LEVELTYPE_PLANET) { - effect->unk_4C = 15; + this->unk_4C = 15; } - effect->unk_44 = 180; + this->unk_44 = 180; } void func_effect_8007D1E0(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { @@ -1965,58 +1966,58 @@ void func_effect_8007D2C8(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { func_effect_8007D008(xPos, yPos, zPos, scale2); } -void func_effect_8007D2F4(Effect* effect) { +void Effect_Effect339_Update(EffectFireSmoke* this) { if (gLevelType == LEVELTYPE_PLANET) { if ((gCurrentLevel == LEVEL_KATINA) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { - effect->vel.y += 0.1f; - if (effect->timer_50 == 0) { - effect->unk_4C++; - effect->timer_50 = 4; - if (effect->unk_4C > 15) { - effect->timer_50 = 5; + this->vel.y += 0.1f; + if (this->timer_50 == 0) { + this->unk_4C++; + this->timer_50 = 4; + if (this->unk_4C > 15) { + this->timer_50 = 5; } - if (effect->unk_4C > 20) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->unk_4C > 20) { + Object_Kill(&this->obj, this->sfxSource); } } } else { if ((gCurrentLevel == LEVEL_MACBETH) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) && - (effect->vel.x != 0)) { - Math_SmoothStepToF(&effect->vel.x, -1.0f, 1.0f, 1.0f, 0.0f); - Math_SmoothStepToF(&effect->vel.z, 4.0f, 1.0f, 1.0f, 0.0f); - effect->vel.y += 1.7f; + (this->vel.x != 0)) { + Math_SmoothStepToF(&this->vel.x, -1.0f, 1.0f, 1.0f, 0.0f); + Math_SmoothStepToF(&this->vel.z, 4.0f, 1.0f, 1.0f, 0.0f); + this->vel.y += 1.7f; } - effect->vel.y += 0.3f; - if (effect->timer_50 == 0) { - effect->unk_4C++; - if (effect->unk_4C > 15) { - effect->timer_50 = 2; + this->vel.y += 0.3f; + if (this->timer_50 == 0) { + this->unk_4C++; + if (this->unk_4C > 15) { + this->timer_50 = 2; } - if (effect->unk_4C > 20) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->unk_4C > 20) { + Object_Kill(&this->obj, this->sfxSource); } } } } else { - if (effect->timer_50 == 0) { - effect->unk_4C++; - effect->timer_50 = effect->unk_46; - if (effect->unk_4C > 13) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->timer_50 == 0) { + this->unk_4C++; + this->timer_50 = this->unk_46; + if (this->unk_4C > 13) { + Object_Kill(&this->obj, this->sfxSource); } } - effect->unk_44 -= 15; + this->unk_44 -= 15; } - if (gLight3Brightness < effect->scale1) { - gLight3Brightness = effect->scale1; - gLight3x = effect->obj.pos.x; - gLight3y = effect->obj.pos.y; - gLight3z = effect->obj.pos.z; + if (gLight3Brightness < this->scale1) { + gLight3Brightness = this->scale1; + gLight3x = this->obj.pos.x; + gLight3y = this->obj.pos.y; + gLight3z = this->obj.pos.z; gLight3R = 255; gLight3G = 50; gLight3B = 0; } - Math_SmoothStepToF(&effect->scale1, 0.0f, 1.0f, 0.05f, 0.0f); + Math_SmoothStepToF(&this->scale1, 0.0f, 1.0f, 0.05f, 0.0f); } static Gfx* D_800D17A4[] = { @@ -2047,95 +2048,99 @@ static Gfx* D_800D18A0[] = { D_BG_SPACE_20019B0, D_BG_SPACE_2001120, D_BG_SPACE_2000890, D_BG_SPACE_2000000, }; -void func_effect_8007D55C(Effect* effect) { +// Effects 339 to 341 +void Effect_FireSmoke_Draw(EffectFireSmoke* this) { f32 scale; - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); + if (gLevelType == LEVELTYPE_PLANET) { - gDPSetPrimColor(gMasterDisp++, 0, 0, D_800D184C[effect->unk_4C].r, D_800D184C[effect->unk_4C].g, - D_800D184C[effect->unk_4C].b, D_800D184C[effect->unk_4C].a); - scale = D_800D17F8[effect->unk_4C] - 0.5f; + gDPSetPrimColor(gMasterDisp++, 0, 0, D_800D184C[this->unk_4C].r, D_800D184C[this->unk_4C].g, + D_800D184C[this->unk_4C].b, D_800D184C[this->unk_4C].a); + scale = D_800D17F8[this->unk_4C] - 0.5f; Matrix_Scale(gGfxMatrix, scale, scale, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_800D17A4[effect->unk_4C]); + gSPDisplayList(gMasterDisp++, D_800D17A4[this->unk_4C]); return; } - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 100, effect->unk_44); - if (effect->unk_4C == 0) { + + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 100, this->unk_44); + + if (this->unk_4C == 0) { Matrix_Scale(gGfxMatrix, 2.5f, 2.5f, 2.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_800D18A0[effect->unk_4C]); + gSPDisplayList(gMasterDisp++, D_800D18A0[this->unk_4C]); return; } - gSPDisplayList(gMasterDisp++, D_800D18A0[effect->unk_4C]); + gSPDisplayList(gMasterDisp++, D_800D18A0[this->unk_4C]); } -void func_effect_8007D748(Effect* effect) { +void Effect_Effect340_Update(Effect340* this) { if (gLevelType == LEVELTYPE_PLANET) { - effect->vel.y += 0.3f; - if (effect->timer_50 == 0) { - if (effect->unk_4C > 15) { - effect->timer_50 = 2; - effect->unk_4C = effect->unk_4C + 1; + this->vel.y += 0.3f; + if (this->timer_50 == 0) { + if (this->unk_4C > 15) { + this->timer_50 = 2; + this->unk_4C = this->unk_4C + 1; } else { - effect->unk_4C = effect->unk_4C + 2; + this->unk_4C = this->unk_4C + 2; } - if (effect->unk_4C > 20) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->unk_4C > 20) { + Object_Kill(&this->obj, this->sfxSource); } } } else { - if (effect->timer_50 == 0) { - effect->unk_4C++; - effect->timer_50 = 0; - if (effect->unk_4C > 13) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->timer_50 == 0) { + this->unk_4C++; + this->timer_50 = 0; + if (this->unk_4C > 13) { + Object_Kill(&this->obj, this->sfxSource); } } - effect->unk_44 -= 15; + this->unk_44 -= 15; } - if (gLight3Brightness < effect->scale1) { - gLight3Brightness = effect->scale1; - gLight3x = effect->obj.pos.x; - gLight3y = effect->obj.pos.y; - gLight3z = effect->obj.pos.z; + if (gLight3Brightness < this->scale1) { + gLight3Brightness = this->scale1; + gLight3x = this->obj.pos.x; + gLight3y = this->obj.pos.y; + gLight3z = this->obj.pos.z; gLight3R = 255; gLight3G = 50; gLight3B = 0; } - Math_SmoothStepToF(&effect->scale1, 0, 1.0f, 0.1f, 0.0f); + Math_SmoothStepToF(&this->scale1, 0, 1.0f, 0.1f, 0.0f); } -void func_effect_8007D8A8(Effect* effect) { +void Effect_Effect341_Update(Effect341* this) { if (gLevelType == LEVELTYPE_SPACE) { - func_effect_8007D2F4(effect); + Effect_Effect339_Update(this); return; } - effect->vel.y += 0.3f; - if (effect->timer_50 == 0) { - effect->unk_4C++; - effect->timer_50 = 2; - if (effect->unk_4C >= 20) { - Object_Kill(&effect->obj, effect->sfxSource); + this->vel.y += 0.3f; + if (this->timer_50 == 0) { + this->unk_4C++; + this->timer_50 = 2; + if (this->unk_4C >= 20) { + Object_Kill(&this->obj, this->sfxSource); } } - if (effect->unk_4C > 15) { - effect->unk_44 -= 20; + if (this->unk_4C > 15) { + this->unk_44 -= 20; } } -void func_effect_8007D94C(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2, f32 scale1, s32 timer50) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_367; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; - effect->unk_44 = 80; - effect->scale2 = scale2; - effect->scale1 = scale1; - effect->timer_50 = timer50; - Object_SetInfo(&effect->info, effect->obj.id); +void func_effect_8007D94C(Effect367* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2, f32 scale1, s32 timer50) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_367; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + this->unk_44 = 80; + this->scale2 = scale2; + this->scale1 = scale1; + this->timer_50 = timer50; + Object_SetInfo(&this->info, this->obj.id); } void func_effect_8007D9DC(f32 xPos, f32 yPos, f32 zPos, f32 scale2, f32 scale1, s32 timer50) { @@ -2149,88 +2154,87 @@ void func_effect_8007D9DC(f32 xPos, f32 yPos, f32 zPos, f32 scale2, f32 scale1, } } -void func_effect_8007DA58(Effect* effect) { - effect->scale2 += effect->scale1; - if (effect->scale1 > 0.0f) { - effect->scale1 -= 0.01f; +void Effect_Effect375_Update(Effect375* this) { + this->scale2 += this->scale1; + if (this->scale1 > 0.0f) { + this->scale1 -= 0.01f; } else { - effect->scale1 -= 0.001f; + this->scale1 -= 0.001f; } - effect->obj.rot.y += effect->unk_60.y; - if (effect->scale2 < 0.01f) { - Object_Kill(&effect->obj, effect->sfxSource); + this->obj.rot.y += this->unk_60.y; + if (this->scale2 < 0.01f) { + Object_Kill(&this->obj, this->sfxSource); } } -void func_effect_8007DAE4(Effect* effect) { - Graphics_SetScaleMtx(effect->scale2); +void Macbeth_Effect375_Draw(Effect375* this) { + Graphics_SetScaleMtx(this->scale2); RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gSPDisplayList(gMasterDisp++, D_CO_6004900); RCP_SetupDL(&gMasterDisp, SETUPDL_64); } -void func_effect_8007DB70(Effect* effect) { +void Effect_Effect374_Update(Effect374* this) { Vec3f sp54 = { 0.0f, -10.0f, 0.0f }; - switch (effect->state) { + switch (this->state) { case 0: - effect->vel.y -= 0.5f; - if ((effect->timer_50 == 0) && ((Object_CheckCollision(1000, &effect->obj.pos, &sp54, 1) != 0) || - (effect->obj.pos.y < (gGroundHeight + 10.0f)))) { - effect->vel.y = 0.0f; - if (effect->obj.pos.y < (gGroundHeight + 10.0f)) { - effect->obj.pos.y = gGroundHeight; + this->vel.y -= 0.5f; + if ((this->timer_50 == 0) && ((Object_CheckCollision(1000, &this->obj.pos, &sp54, 1) != 0) || + (this->obj.pos.y < (gGroundHeight + 10.0f)))) { + this->vel.y = 0.0f; + if (this->obj.pos.y < (gGroundHeight + 10.0f)) { + this->obj.pos.y = gGroundHeight; } - effect->state = 1; - effect->timer_50 = 30; - effect->unk_44 = 192; - effect->scale2 = 2.5f; - effect->scale1 = 2.5f; - AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, effect->sfxSource, 4); - func_effect_8007D0E0(effect->obj.pos.x, effect->obj.pos.y + 30.0f, effect->obj.pos.z, 7.0f); - func_effect_8007BFFC(effect->obj.pos.x, effect->obj.pos.y + 30.0f, effect->obj.pos.z, 0.0f, 0.0f, 0.0f, - 4.0f, 5); - if ((effect->obj.pos.y < (gGroundHeight + 10.0f)) || (gGroundSurface != SURFACE_WATER)) { - PlayerShot_SpawnEffect344(effect->obj.pos.x, 3.0f, effect->obj.pos.z, effect->obj.pos.x, - effect->obj.pos.z, 0.0f, 0.0f, 90.0f, 5.0f, 0, 0); + this->state = 1; + this->timer_50 = 30; + this->unk_44 = 192; + this->scale2 = 2.5f; + this->scale1 = 2.5f; + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, this->sfxSource, 4); + func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y + 30.0f, this->obj.pos.z, 7.0f); + func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y + 30.0f, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 4.0f, + 5); + if ((this->obj.pos.y < (gGroundHeight + 10.0f)) || (gGroundSurface != SURFACE_WATER)) { + PlayerShot_SpawnEffect344(this->obj.pos.x, 3.0f, this->obj.pos.z, this->obj.pos.x, this->obj.pos.z, + 0.0f, 0.0f, 90.0f, 5.0f, 0, 0); break; } } break; case 1: - effect->scale2 += ((20.0f - effect->scale2) * 0.1f); - if (effect->scale2 > 19.0f) { - effect->scale1 -= 0.3f; - effect->unk_44 -= 20; - if (effect->unk_44 < 0) { - Object_Kill(&effect->obj, effect->sfxSource); + this->scale2 += ((20.0f - this->scale2) * 0.1f); + if (this->scale2 > 19.0f) { + this->scale1 -= 0.3f; + this->unk_44 -= 20; + if (this->unk_44 < 0) { + Object_Kill(&this->obj, this->sfxSource); } } - effect->obj.rot.y = 180.0f - effect->obj.rot.y; - if ((fabsf(gPlayer[0].trueZpos - effect->obj.pos.z) < 40.0f) && - (fabsf(gPlayer[0].pos.x - effect->obj.pos.x) < 80.0f)) { - if ((effect->obj.pos.y < gPlayer[0].pos.y) && - ((gPlayer[0].pos.y - effect->obj.pos.y) < (effect->scale2 * 35.0f)) && - (gPlayer[0].mercyTimer == 0)) { - Player_ApplyDamage(gPlayer, 0, effect->info.damage); + this->obj.rot.y = 180.0f - this->obj.rot.y; + if ((fabsf(gPlayer[0].trueZpos - this->obj.pos.z) < 40.0f) && + (fabsf(gPlayer[0].pos.x - this->obj.pos.x) < 80.0f)) { + if ((this->obj.pos.y < gPlayer[0].pos.y) && + ((gPlayer[0].pos.y - this->obj.pos.y) < (this->scale2 * 35.0f)) && (gPlayer[0].mercyTimer == 0)) { + Player_ApplyDamage(gPlayer, 0, this->info.damage); } } break; } } -void func_effect_8007DED4(Effect* effect) { - switch (effect->state) { +void Macbeth_Effect374_Draw(Effect374* this) { + switch (this->state) { case 0: - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gSPDisplayList(gMasterDisp++, D_ENMY_PLANET_4008CE0); RCP_SetupDL(&gMasterDisp, SETUPDL_64); break; case 1: - Matrix_Scale(gGfxMatrix, effect->scale1, effect->scale2, 2.5f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->scale1, this->scale2, 2.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL_40(); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); @@ -2240,144 +2244,143 @@ void func_effect_8007DED4(Effect* effect) { } } -void func_effect_8007E014(Effect* effect) { +void Effect_Effect344_Update(Effect344* this) { s32 i; f32 x; f32 z; f32 y; if (gGroundType == 4) { - Ground_801B6E20(effect->obj.pos.x, effect->obj.pos.z + gPathProgress, &x, &y, &z); - effect->obj.pos.y = y + 3.0f; - effect->obj.rot.x = RAD_TO_DEG(x); - effect->obj.rot.z = RAD_TO_DEG(z); + Ground_801B6E20(this->obj.pos.x, this->obj.pos.z + gPathProgress, &x, &y, &z); + this->obj.pos.y = y + 3.0f; + this->obj.rot.x = RAD_TO_DEG(x); + this->obj.rot.z = RAD_TO_DEG(z); } - if (((effect->unk_44 == 1) || (effect->unk_44 == 3)) && ((s32) (effect->timer_50 % 4U) == 1) && - (Rand_ZeroOne() < 0.5f)) { - func_effect_8007D10C(effect->obj.pos.x, effect->obj.pos.y + (effect->scale2 * 5.0f), effect->obj.pos.z + 3.0f, - (RAND_FLOAT(0.7f) + 1.0f) * (effect->scale2 * 1.2f)); + if (((this->unk_44 == 1) || (this->unk_44 == 3)) && ((s32) (this->timer_50 % 4U) == 1) && (Rand_ZeroOne() < 0.5f)) { + func_effect_8007D10C(this->obj.pos.x, this->obj.pos.y + (this->scale2 * 5.0f), this->obj.pos.z + 3.0f, + (RAND_FLOAT(0.7f) + 1.0f) * (this->scale2 * 1.2f)); } for (i = 0; i < ARRAY_COUNT(gEffects); i++) { - if ((gEffects[i].obj.status == OBJ_ACTIVE) && (gEffects[i].obj.id == OBJ_EFFECT_344) && (i != effect->index) && - (fabsf(effect->obj.pos.z - gEffects[i].obj.pos.z) < 20.0f) && - (fabsf(effect->obj.pos.x - gEffects[i].obj.pos.x) < 20.0f) && - (fabsf(effect->obj.pos.y - gEffects[i].obj.pos.y) < 20.0f)) { - Object_Kill(&effect->obj, effect->sfxSource); + if ((gEffects[i].obj.status == OBJ_ACTIVE) && (gEffects[i].obj.id == OBJ_EFFECT_344) && (i != this->index) && + (fabsf(this->obj.pos.z - gEffects[i].obj.pos.z) < 20.0f) && + (fabsf(this->obj.pos.x - gEffects[i].obj.pos.x) < 20.0f) && + (fabsf(this->obj.pos.y - gEffects[i].obj.pos.y) < 20.0f)) { + Object_Kill(&this->obj, this->sfxSource); } } } -void func_effect_8007E258(Effect* effect) { - if ((gCamCount != 1) && (effect->timer_50 == 0)) { - Object_Kill(&effect->obj, effect->sfxSource); +void Effect_Effect345_Update(Effect345* this) { + if ((gCamCount != 1) && (this->timer_50 == 0)) { + Object_Kill(&this->obj, this->sfxSource); } } -void func_effect_8007E298(Effect* effect) { - if (effect->timer_50 == 0) { - effect->scale2 *= 1.035f; - effect->unk_4A -= 8; - if (effect->unk_4A < 0) { - Object_Kill(&effect->obj, effect->sfxSource); +void Effect_Effect342_Update(Effect342* this) { + if (this->timer_50 == 0) { + this->scale2 *= 1.035f; + this->unk_4A -= 8; + if (this->unk_4A < 0) { + Object_Kill(&this->obj, this->sfxSource); } } - effect->obj.rot.z += effect->unk_48; + this->obj.rot.z += this->unk_48; if (gLevelType == LEVELTYPE_PLANET) { - effect->vel.y += 0.2f; + this->vel.y += 0.2f; } } -void func_effect_8007E330(Effect* effect) { - Graphics_SetScaleMtx(effect->scale2); - if (effect->unk_44 == 0) { - gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 0, effect->unk_4A); +void Effect_Effect342_Draw(Effect342* this) { + Graphics_SetScaleMtx(this->scale2); + if (this->unk_44 == 0) { + gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 0, this->unk_4A); } else { - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_4A); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_4A); } gSPDisplayList(gMasterDisp++, D_BG_PLANET_2010A30); } -void func_effect_8007E3E4(Effect* effect) { - effect->scale2 += 0.02f; - effect->unk_4A -= 4; - if (effect->unk_4A < 0) { - Object_Kill(&effect->obj, effect->sfxSource); +void Effect_Effect351_Update(Effect351* this) { + this->scale2 += 0.02f; + this->unk_4A -= 4; + if (this->unk_4A < 0) { + Object_Kill(&this->obj, this->sfxSource); } - effect->obj.rot.z += effect->unk_48; - effect->vel.y += 0.05f; + this->obj.rot.z += this->unk_48; + this->vel.y += 0.05f; } -void func_effect_8007E45C(Effect* effect) { - switch (effect->state) { +void Effect_Effect365_Update(Effect365* this) { + switch (this->state) { case 0: - if (effect->unk_4C != 0) { - Math_SmoothStepToF(&effect->scale2, 5.0f, 0.05f, 0.5f, 0.0f); - effect->unk_44 -= 10; - effect->obj.rot.z += effect->scale1; - if (effect->unk_44 < 0) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->unk_4C != 0) { + Math_SmoothStepToF(&this->scale2, 5.0f, 0.05f, 0.5f, 0.0f); + this->unk_44 -= 10; + this->obj.rot.z += this->scale1; + if (this->unk_44 < 0) { + Object_Kill(&this->obj, this->sfxSource); } break; } - effect->scale2 += 0.02f; - effect->unk_44--; + this->scale2 += 0.02f; + this->unk_44--; - if (effect->unk_44 < 0) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->unk_44 < 0) { + Object_Kill(&this->obj, this->sfxSource); } - effect->obj.rot.z += effect->scale1; - Math_SmoothStepToF(&effect->vel.y, 0.5f, 0.05f, 0.2f, 0.00001f); + this->obj.rot.z += this->scale1; + Math_SmoothStepToF(&this->vel.y, 0.5f, 0.05f, 0.2f, 0.00001f); break; case 1: - effect->vel.y = 3.0f; - Math_SmoothStepToF(&effect->scale2, 5.0f, 0.05f, 0.5f, 0.0f); - effect->unk_44 -= 10; - effect->obj.rot.z += effect->scale1; - if (effect->unk_44 < 0) { - Object_Kill(&effect->obj, effect->sfxSource); + this->vel.y = 3.0f; + Math_SmoothStepToF(&this->scale2, 5.0f, 0.05f, 0.5f, 0.0f); + this->unk_44 -= 10; + this->obj.rot.z += this->scale1; + if (this->unk_44 < 0) { + Object_Kill(&this->obj, this->sfxSource); } break; } } -void func_effect_8007E5CC(Effect* effect) { - Graphics_SetScaleMtx(effect->scale2); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_44); +void Effect_Effect365_Draw(Effect365* this) { + Graphics_SetScaleMtx(this->scale2); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_44); gSPDisplayList(gMasterDisp++, D_BG_PLANET_2010A30); } -void func_effect_8007E648(Effect* effect) { - if (effect->timer_50 == 0) { - Math_SmoothStepToF(&effect->scale2, effect->scale1, 0.05f, 100.0f, 0.0f); - effect->unk_44 -= 2; - if (effect->unk_44 < 0) { - Object_Kill(&effect->obj, effect->sfxSource); +void Effect_Effect367_Update(Effect367* this) { + if (this->timer_50 == 0) { + Math_SmoothStepToF(&this->scale2, this->scale1, 0.05f, 100.0f, 0.0f); + this->unk_44 -= 2; + if (this->unk_44 < 0) { + Object_Kill(&this->obj, this->sfxSource); } } } -void func_effect_8007E6B8(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPos, f32 speed) { +void func_effect_8007E6B8(Effect* this, u32 objId, f32 xPos, f32 yPos, f32 zPos, f32 speed) { f32 sp54; f32 sp50; f32 temp_ft4; Vec3f sp40; Vec3f sp34; - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = objId; - effect->timer_50 = 100; + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = objId; + this->timer_50 = 100; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - Object_SetInfo(&effect->info, effect->obj.id); + Object_SetInfo(&this->info, this->obj.id); sp50 = Math_Atan2F(gPlayer[0].pos.x - xPos, gPlayer[0].trueZpos - zPos); temp_ft4 = sqrtf(SQ(gPlayer[0].pos.x - xPos) + SQ(gPlayer[0].trueZpos - zPos)); sp54 = -Math_Atan2F(gPlayer[0].pos.y - yPos, temp_ft4); @@ -2391,47 +2394,47 @@ void func_effect_8007E6B8(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPo Matrix_MultVec3f(gCalcMatrix, &sp40, &sp34); - effect->vel.x = sp34.x + gPathVelX; - effect->vel.y = sp34.y + gPathVelY; - effect->vel.z = sp34.z - gPathVelZ; + this->vel.x = sp34.x + gPathVelX; + this->vel.y = sp34.y + gPathVelY; + this->vel.z = sp34.z - gPathVelZ; - if ((objId == OBJ_EFFECT_353) || (objId == OBJ_EFFECT_354)) { - effect->obj.rot.x = RAD_TO_DEG(sp54); - effect->obj.rot.y = RAD_TO_DEG(sp50); + if ((objId == OBJ_EFFECT_ENEMY_LASER_1) || (objId == OBJ_EFFECT_354)) { + this->obj.rot.x = RAD_TO_DEG(sp54); + this->obj.rot.y = RAD_TO_DEG(sp50); } if (objId == OBJ_EFFECT_356) { - AUDIO_PLAY_SFX(NA_SE_EN_ENERGY_BEAM, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ENERGY_BEAM, this->sfxSource, 4); } if (objId == OBJ_EFFECT_376) { - effect->obj.rot.z = RAND_FLOAT(360.0f); - effect->unk_4A = 180; - effect->scale2 = 5.0f; + this->obj.rot.z = RAND_FLOAT(360.0f); + this->unk_4A = 180; + this->scale2 = 5.0f; } else if ((objId == OBJ_EFFECT_355) || (objId == OBJ_EFFECT_377)) { - AUDIO_PLAY_SFX(NA_SE_EN_ENERGY_BEAM, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ENERGY_BEAM, this->sfxSource, 4); } else { - AUDIO_PLAY_SFX(NA_SE_EN_SHOT_0, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SHOT_0, this->sfxSource, 4); } } -void func_effect_8007E93C(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPos, f32 speed) { +void func_effect_8007E93C(Effect* this, u32 objId, f32 xPos, f32 yPos, f32 zPos, f32 speed) { f32 sp54; f32 sp50; f32 temp_ft4; Vec3f sp40; Vec3f sp34; - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = objId; - effect->timer_50 = 100; + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = objId; + this->timer_50 = 100; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - Object_SetInfo(&effect->info, effect->obj.id); + Object_SetInfo(&this->info, this->obj.id); sp50 = Math_Atan2F(gPlayer[0].cam.eye.x - xPos, gPlayer[0].cam.eye.z - zPos); temp_ft4 = sqrtf(SQ(gPlayer[0].cam.eye.x - xPos) + SQ(gPlayer[0].cam.eye.z - zPos)); sp54 = -Math_Atan2F(gPlayer[0].cam.eye.y - yPos, temp_ft4); @@ -2445,53 +2448,53 @@ void func_effect_8007E93C(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPo Matrix_MultVec3f(gCalcMatrix, &sp40, &sp34); - effect->vel.x = sp34.x + gPathVelX; - effect->vel.y = sp34.y + gPathVelY; - effect->vel.z = sp34.z - gPathVelZ; + this->vel.x = sp34.x + gPathVelX; + this->vel.y = sp34.y + gPathVelY; + this->vel.z = sp34.z - gPathVelZ; - if (objId == OBJ_EFFECT_353) { - effect->obj.rot.x = RAD_TO_DEG(sp54); - effect->obj.rot.y = RAD_TO_DEG(sp50); + if (objId == OBJ_EFFECT_ENEMY_LASER_1) { + this->obj.rot.x = RAD_TO_DEG(sp54); + this->obj.rot.y = RAD_TO_DEG(sp50); } if (objId == OBJ_EFFECT_356) { - AUDIO_PLAY_SFX(NA_SE_EN_ENERGY_BEAM, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ENERGY_BEAM, this->sfxSource, 4); } if (objId == OBJ_EFFECT_376) { - effect->obj.rot.z = RAND_FLOAT(360.0f); - effect->unk_4A = 180; - effect->scale2 = 5.0f; + this->obj.rot.z = RAND_FLOAT(360.0f); + this->unk_4A = 180; + this->scale2 = 5.0f; } else if ((objId == OBJ_EFFECT_355) || (objId == OBJ_EFFECT_377)) { - AUDIO_PLAY_SFX(NA_SE_EN_ENERGY_BEAM, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ENERGY_BEAM, this->sfxSource, 4); } else { - AUDIO_PLAY_SFX(NA_SE_EN_SHOT_0, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SHOT_0, this->sfxSource, 4); } } -void func_effect_8007EBB8(Effect* effect, ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, +void func_effect_8007EBB8(Effect* this, ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = objId; + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = objId; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->timer_50 = 100; + this->timer_50 = 100; - effect->vel.x = xVel; - effect->vel.y = yVel; - effect->vel.z = zVel; + this->vel.x = xVel; + this->vel.y = yVel; + this->vel.z = zVel; - effect->scale2 = scale2; + this->scale2 = scale2; if (objId == OBJ_EFFECT_355) { - AUDIO_PLAY_SFX(NA_SE_EN_ENERGY_BEAM, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ENERGY_BEAM, this->sfxSource, 4); } else { - AUDIO_PLAY_SFX(NA_SE_EN_SHOT_0, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SHOT_0, this->sfxSource, 4); } - Object_SetInfo(&effect->info, effect->obj.id); + Object_SetInfo(&this->info, this->obj.id); } void func_effect_8007ECB4(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2) { @@ -2505,38 +2508,38 @@ void func_effect_8007ECB4(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 xVel } } -void func_effect_8007ED54(Effect* effect, ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 zRot, +void func_effect_8007ED54(Effect* this, ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 zRot, f32 unkX, f32 unkY, f32 unkZ, f32 xVel, f32 yVel, f32 zVel, f32 scale2) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = objId; + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = objId; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->timer_50 = 100; + this->timer_50 = 100; if (gCurrentLevel == LEVEL_AQUAS) { - effect->timer_50 = 75; + this->timer_50 = 75; } - effect->vel.x = xVel; - effect->vel.y = yVel; - effect->vel.z = zVel; + this->vel.x = xVel; + this->vel.y = yVel; + this->vel.z = zVel; - effect->obj.rot.x = xRot; - effect->obj.rot.y = yRot; - effect->obj.rot.z = zRot; + this->obj.rot.x = xRot; + this->obj.rot.y = yRot; + this->obj.rot.z = zRot; - effect->unk_60.x = unkX; - effect->unk_60.y = unkY; - effect->unk_60.z = unkZ; + this->unk_60.x = unkX; + this->unk_60.y = unkY; + this->unk_60.z = unkZ; - effect->scale2 = scale2; - if (effect->obj.id != OBJ_EFFECT_380) { - AUDIO_PLAY_SFX(NA_SE_EN_SHOT_0, effect->sfxSource, 4); + this->scale2 = scale2; + if (this->obj.id != OBJ_EFFECT_380) { + AUDIO_PLAY_SFX(NA_SE_EN_SHOT_0, this->sfxSource, 4); } - Object_SetInfo(&effect->info, effect->obj.id); + Object_SetInfo(&this->info, this->obj.id); } void func_effect_8007EE68(ObjectId objId, Vec3f* pos, Vec3f* rot, Vec3f* arg3, Vec3f* arg4, f32 scale2) { @@ -2574,7 +2577,7 @@ void func_effect_8007F04C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 xRot } } -void func_effect_8007F11C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 speed) { +void Effect_EnemyLaser(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 speed) { s32 i; if ((fabsf(zPos - gPlayer[0].trueZpos) > 300.0f) || (fabsf(xPos - gPlayer[0].pos.x) > 300.0f)) { @@ -2604,94 +2607,96 @@ void func_effect_8007F20C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 spee } } -void func_effect_8007F2FC(Effect* effect) { - if (effect->timer_50 == 0) { - Object_Kill(&effect->obj, effect->sfxSource); +// Unused ? +void func_effect_8007F2FC(Effect* this) { + if (this->timer_50 == 0) { + Object_Kill(&this->obj, this->sfxSource); } - if ((effect->obj.pos.y < gGroundHeight) && (gLevelType == LEVELTYPE_PLANET)) { - Object_Kill(&effect->obj, effect->sfxSource); + if ((this->obj.pos.y < gGroundHeight) && (gLevelType == LEVELTYPE_PLANET)) { + Object_Kill(&this->obj, this->sfxSource); } if (gLevelType == LEVELTYPE_PLANET) { - effect->vel.y -= 0.3f; + this->vel.y -= 0.3f; } - if (effect->obj.pos.y < gWaterLevel) { - effect->vel.y += 0.2f; - effect->obj.pos.y -= effect->vel.y * 0.5f; - effect->obj.pos.x -= effect->vel.x * 0.5f; - effect->obj.pos.z -= effect->vel.z * 0.5f; + if (this->obj.pos.y < gWaterLevel) { + this->vel.y += 0.2f; + this->obj.pos.y -= this->vel.y * 0.5f; + this->obj.pos.x -= this->vel.x * 0.5f; + this->obj.pos.z -= this->vel.z * 0.5f; } - if ((effect->unk_44 == 1) && ((gGameFrameCount % 2) == 0)) { - func_effect_8007D0E0(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 1.5f); + if ((this->unk_44 == 1) && ((gGameFrameCount % 2) == 0)) { + func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1.5f); } } -void func_effect_8007F438(Effect* effect) { +void Effect_Effect346_Update(Effect346* this) { if (gCurrentLevel == LEVEL_AQUAS) { - effect->obj.rot.z += 3.5f; - effect->vel.z = 5.0f; + this->obj.rot.z += 3.5f; + this->vel.z = 5.0f; - if (effect->unk_44 != 0) { - Math_SmoothStepToF(&effect->scale1, 100.0f, 1.0f, 20.0f, 0.0001f); + if (this->unk_44 != 0) { + Math_SmoothStepToF(&this->scale1, 100.0f, 1.0f, 20.0f, 0.0001f); } else { - Math_SmoothStepToF(&effect->scale1, 0.0f, 1.0f, 20.0f, 0.0001f); + Math_SmoothStepToF(&this->scale1, 0.0f, 1.0f, 20.0f, 0.0001f); } - if (effect->unk_46 == 0) { - effect->unk_46 = 30; - effect->unk_44++; - effect->unk_44 &= 1; + if (this->unk_46 == 0) { + this->unk_46 = 30; + this->unk_44++; + this->unk_44 &= 1; } else { - effect->unk_46--; + this->unk_46--; } if (gPathVelZ < 0.0f) { - effect->vel.z = -10.0f; + this->vel.z = -10.0f; } - if (effect->timer_50 == 0) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->timer_50 == 0) { + Object_Kill(&this->obj, this->sfxSource); } } else { - effect->obj.rot.z += 3.5f; + this->obj.rot.z += 3.5f; if (gLevelType == LEVELTYPE_PLANET) { - effect->vel.y += 0.2f; + this->vel.y += 0.2f; } - if (effect->timer_50 == 0) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->timer_50 == 0) { + Object_Kill(&this->obj, this->sfxSource); } } } -void func_effect_8007F5AC(Effect* effect) { - if (effect->unk_4C == 0) { - effect->unk_46++; - if ((effect->unk_46 & 0x20) == 0) { - effect->vel.x += 0.5f; +// Unused ? +void func_effect_8007F5AC(Effect* this) { + if (this->unk_4C == 0) { + this->unk_46++; + if ((this->unk_46 & 0x20) == 0) { + this->vel.x += 0.5f; } else { - effect->vel.x -= 0.5f; + this->vel.x -= 0.5f; } - if (((gGameFrameCount % 2) == 0)) { - effect->unk_44--; - if (effect->unk_44 < 20) { - Object_Kill(&effect->obj, effect->sfxSource); + if ((gGameFrameCount % 2) == 0) { + this->unk_44--; + if (this->unk_44 < 20) { + Object_Kill(&this->obj, this->sfxSource); } } - effect->scale2 += 0.02f; + this->scale2 += 0.02f; if ((gGameFrameCount & 0x10) == 0) { - effect->scale2 += 0.01f; + this->scale2 += 0.01f; } else { - effect->scale2 -= 0.01f; + this->scale2 -= 0.01f; } } } -void func_effect_8007F6B0(Effect* effect) { +void Effect_Effect348_Update(Effect348* this) { s32 i; f32 temp; f32 cos; @@ -2702,38 +2707,38 @@ void func_effect_8007F6B0(Effect* effect) { f32 y; f32 yPos; - Math_SmoothStepToF(&effect->scale2, effect->scale1, 0.1f, 12.0f, 0.1f); + Math_SmoothStepToF(&this->scale2, this->scale1, 0.1f, 12.0f, 0.1f); - effect->unk_44 -= 2; - if (effect->unk_44 < 0) { - Object_Kill(&effect->obj, effect->sfxSource); + this->unk_44 -= 2; + if (this->unk_44 < 0) { + Object_Kill(&this->obj, this->sfxSource); } - if (((gGameFrameCount % 4) == 0) && (effect->state == 0)) { + if (((gGameFrameCount % 4) == 0) && (this->state == 0)) { randfloat = RAND_FLOAT(30.0f); for (i = 0; i < 36; i += 2) { temp = (i * 10.0f * M_DTOR) + randfloat; - sin = __sinf(temp) * effect->scale2 * 8.0f; - cos = __cosf(temp) * effect->scale2 * 8.0f; + sin = __sinf(temp) * this->scale2 * 8.0f; + cos = __cosf(temp) * this->scale2 * 8.0f; yPos = gGroundHeight + 40.0f; if (gGroundType == 4) { - Ground_801B6E20(effect->obj.pos.x + sin, effect->obj.pos.z + cos + gPathProgress, &x, &y, &z); + Ground_801B6E20(this->obj.pos.x + sin, this->obj.pos.z + cos + gPathProgress, &x, &y, &z); yPos = y + 30.0f; } if (gCurrentLevel == LEVEL_AQUAS) { - func_effect_8007B8F8(effect->obj.pos.x + sin, yPos, effect->obj.pos.z + cos, 20.0f); + func_effect_8007B8F8(this->obj.pos.x + sin, yPos, this->obj.pos.z + cos, 20.0f); } else if (gCurrentLevel == LEVEL_FORTUNA) { - func_effect_8007BC7C(effect->obj.pos.x + sin, yPos, effect->obj.pos.z + cos, 20.0f); + func_effect_8007BC7C(this->obj.pos.x + sin, yPos, this->obj.pos.z + cos, 20.0f); } else if (gCurrentLevel == LEVEL_TITANIA) { - func_effect_8007A900(effect->obj.pos.x + sin, yPos, effect->obj.pos.z + cos, 10.0f, 255, 15, 0); + func_effect_8007A900(this->obj.pos.x + sin, yPos, this->obj.pos.z + cos, 10.0f, 255, 15, 0); } } } } -void func_effect_8007F958(Effect* effect) { +void Effect_Effect349_Update(Effect349* this) { s32 i; f32 x; f32 z; @@ -2744,41 +2749,41 @@ void func_effect_8007F958(Effect* effect) { f32 randFloat; f32 yPos; - effect->scale2 += effect->scale1; - effect->scale1 -= 0.08f; - if (effect->scale1 < 0.1f) { - effect->scale1 = 0.1f; + this->scale2 += this->scale1; + this->scale1 -= 0.08f; + if (this->scale1 < 0.1f) { + this->scale1 = 0.1f; } - effect->unk_44 -= 9; - if (effect->unk_44 < 0) { - Object_Kill(&effect->obj, effect->sfxSource); + this->unk_44 -= 9; + if (this->unk_44 < 0) { + Object_Kill(&this->obj, this->sfxSource); return; } - if (((gGameFrameCount % 2) == 0)) { + if ((gGameFrameCount % 2) == 0) { randFloat = RAND_FLOAT(144.0f); for (i = 0; i < 5; i++) { temp = (i * 72.0f * M_DTOR) + randFloat; - sin = __sinf(temp) * effect->scale2 * 16.0f; - cos = __cosf(temp) * effect->scale2 * 16.0f; + sin = __sinf(temp) * this->scale2 * 16.0f; + cos = __cosf(temp) * this->scale2 * 16.0f; yPos = gGroundHeight + 10.0f; if (gGroundType == 4) { - Ground_801B6E20(effect->obj.pos.x + sin, effect->obj.pos.z + cos + gPathProgress, &x, &y, &z); + Ground_801B6E20(this->obj.pos.x + sin, this->obj.pos.z + cos + gPathProgress, &x, &y, &z); yPos = y + 10.0f; } if (gCurrentLevel == LEVEL_FORTUNA) { - func_effect_8007BC7C(effect->obj.pos.x + sin, yPos, effect->obj.pos.z + cos, 8.0f); + func_effect_8007BC7C(this->obj.pos.x + sin, yPos, this->obj.pos.z + cos, 8.0f); } else if (gCurrentLevel == LEVEL_TITANIA) { - func_effect_8007A900(effect->obj.pos.x + sin, yPos, effect->obj.pos.z + cos, 8.0f, 255, 15, 0); + func_effect_8007A900(this->obj.pos.x + sin, yPos, this->obj.pos.z + cos, 8.0f, 255, 15, 0); } } } } -void func_effect_8007FBE0(Effect* effect) { +void Effect_Effect350_Update(Effect350* this) { s32 i; f32 temp; f32 sin; @@ -2786,30 +2791,30 @@ void func_effect_8007FBE0(Effect* effect) { f32 randFloat; f32 yPos; - effect->scale2 += effect->scale1; - effect->scale1 -= .1f; - if (effect->scale1 < 0.1f) { - effect->scale1 = 0.1f; + this->scale2 += this->scale1; + this->scale1 -= .1f; + if (this->scale1 < 0.1f) { + this->scale1 = 0.1f; } - effect->unk_44 -= 6; - if (effect->unk_44 < 0) { - Object_Kill(&effect->obj, effect->sfxSource); + this->unk_44 -= 6; + if (this->unk_44 < 0) { + Object_Kill(&this->obj, this->sfxSource); } if (((gGameFrameCount % 2) == 0)) { randFloat = RAND_FLOAT(144.0f); for (i = 0; i < 10; i++) { temp = (i * 36.0f * M_DTOR) + randFloat; - sin = __sinf(temp) * effect->scale2 * 16.0f; - cos = __cosf(temp) * effect->scale2 * 16.0f; + sin = __sinf(temp) * this->scale2 * 16.0f; + cos = __cosf(temp) * this->scale2 * 16.0f; yPos = gGroundHeight + 10.0f; - func_effect_8007BC7C(effect->obj.pos.x + sin, yPos, effect->obj.pos.z + cos, 12.0f); + func_effect_8007BC7C(this->obj.pos.x + sin, yPos, this->obj.pos.z + cos, 12.0f); } } } -bool func_effect_8007FD84(Effect* effect) { +bool func_effect_8007FD84(Effect* this) { s32 i; Actor* actor; @@ -2817,13 +2822,13 @@ bool func_effect_8007FD84(Effect* effect) { actor = &gActors[gTeamEventActorIndex[i]]; if (actor->obj.status == OBJ_ACTIVE) { if ((actor->iwork[12] >= TEAM_ID_FALCO) && (actor->iwork[12] <= TEAM_ID_BILL) && - (fabsf(actor->obj.pos.z - effect->obj.pos.z) < 100.0f) && - (fabsf(actor->obj.pos.x - effect->obj.pos.x) < 100.0f) && - (fabsf(actor->obj.pos.y - effect->obj.pos.y) < 100.0f)) { + (fabsf(actor->obj.pos.z - this->obj.pos.z) < 100.0f) && + (fabsf(actor->obj.pos.x - this->obj.pos.x) < 100.0f) && + (fabsf(actor->obj.pos.y - this->obj.pos.y) < 100.0f)) { actor->dmgType = DMG_BEAM; actor->dmgPart = 0; actor->damage = 10; - if (effect->obj.id == OBJ_EFFECT_354) { + if (this->obj.id == OBJ_EFFECT_354) { actor->damage = 30; } actor->dmgSource = CS_SHOT_ID; @@ -2834,19 +2839,19 @@ bool func_effect_8007FD84(Effect* effect) { return false; } -void func_effect_8007FE88(Effect* effect) { +void Effect_Effect353_354_Update(Effect* this) { Vec3f srcVelocity; Vec3f destVelocity; Vec3f velocity; f32 var_fa0 = 0.0f; - if (effect->timer_50 == 0) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->timer_50 == 0) { + Object_Kill(&this->obj, this->sfxSource); return; } - if (func_effect_8007FD84(effect)) { - Object_Kill(&effect->obj, effect->sfxSource); + if (func_effect_8007FD84(this)) { + Object_Kill(&this->obj, this->sfxSource); return; } @@ -2854,98 +2859,98 @@ void func_effect_8007FE88(Effect* effect) { var_fa0 = 100.0f; } - if (fabsf(gPlayer[0].trueZpos - effect->obj.pos.z) < (50.0f + var_fa0)) { - if ((fabsf(gPlayer[0].pos.x - effect->obj.pos.x) < (30.0f + var_fa0)) && - (fabsf(gPlayer[0].pos.y - effect->obj.pos.y) < (30.0f + var_fa0))) { + if (fabsf(gPlayer[0].trueZpos - this->obj.pos.z) < (50.0f + var_fa0)) { + if ((fabsf(gPlayer[0].pos.x - this->obj.pos.x) < (30.0f + var_fa0)) && + (fabsf(gPlayer[0].pos.y - this->obj.pos.y) < (30.0f + var_fa0))) { if ((gPlayer[0].barrelRollAlpha != 0) || (gPlayer[0].meteoWarpTimer != 0)) { - effect->obj.rot.y = 90.0f; - effect->obj.rot.x = RAND_FLOAT(360.0f); - Matrix_RotateY(gCalcMatrix, effect->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, effect->obj.rot.x * M_DTOR, MTXF_APPLY); + this->obj.rot.y = 90.0f; + this->obj.rot.x = RAND_FLOAT(360.0f); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); srcVelocity.x = 0.0f; srcVelocity.y = 0.0f; srcVelocity.z = 100.0f; Matrix_MultVec3f(gCalcMatrix, &srcVelocity, &destVelocity); - effect->vel.x = destVelocity.x; - effect->vel.y = destVelocity.y; - effect->vel.z = destVelocity.z; + this->vel.x = destVelocity.x; + this->vel.y = destVelocity.y; + this->vel.z = destVelocity.z; gPlayer[0].deflectCount++; - AUDIO_PLAY_SFX(NA_SE_ROLLING_REFLECT, effect->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ROLLING_REFLECT, this->sfxSource, 0); } if ((gPlayer[0].barrelRollAlpha == 0) && (gPlayer[0].mercyTimer == 0)) { - Player_ApplyDamage(gPlayer, 0, effect->info.damage); + Player_ApplyDamage(gPlayer, 0, this->info.damage); gPlayer[0].knockback.x = 20.0f; - if (effect->vel.x < 0.0f) { + if (this->vel.x < 0.0f) { gPlayer[0].knockback.x *= -1.0f; } if (gCurrentLevel != LEVEL_MACBETH) { gPlayer[0].knockback.y = 20.0f; - if (effect->vel.y < 0.0f) { + if (this->vel.y < 0.0f) { gPlayer[0].knockback.y *= -1.0f; } } - Object_Kill(&effect->obj, effect->sfxSource); + Object_Kill(&this->obj, this->sfxSource); } } } if (gGroundType == 4) { - if (Ground_801B6AEC(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z + gPathProgress) != 0) { - Object_Kill(&effect->obj, effect->sfxSource); + if (Ground_801B6AEC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + gPathProgress) != 0) { + Object_Kill(&this->obj, this->sfxSource); } - } else if (effect->obj.pos.y < gGroundHeight) { - Object_Kill(&effect->obj, effect->sfxSource); + } else if (this->obj.pos.y < gGroundHeight) { + Object_Kill(&this->obj, this->sfxSource); if (gGroundSurface != SURFACE_WATER) { - effect->obj.pos.y = gGroundHeight; - func_effect_8007D074(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 2.0f); + this->obj.pos.y = gGroundHeight; + func_effect_8007D074(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 2.0f); } } - velocity.x = effect->vel.x; - velocity.y = effect->vel.y; - velocity.z = effect->vel.z; + velocity.x = this->vel.x; + velocity.y = this->vel.y; + velocity.z = this->vel.z; if (gCurrentLevel != LEVEL_MACBETH) { - if (Object_CheckCollision(1000, &effect->obj.pos, &velocity, 2) != 0) { - func_effect_8007D10C(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 2.0f); - Object_Kill(&effect->obj, effect->sfxSource); + if (Object_CheckCollision(1000, &this->obj.pos, &velocity, 2) != 0) { + func_effect_8007D10C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 2.0f); + Object_Kill(&this->obj, this->sfxSource); } - } else if (Macbeth_801A55D4(1000, &effect->obj.pos, &velocity, 0) != 0) { - func_effect_8007D10C(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 2.0f); - Object_Kill(&effect->obj, effect->sfxSource); + } else if (Macbeth_801A55D4(1000, &this->obj.pos, &velocity, 0) != 0) { + func_effect_8007D10C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 2.0f); + Object_Kill(&this->obj, this->sfxSource); } } -void func_effect_800802B8(Effect* effect) { - func_effect_8007FE88(effect); +void Effect_Effect355_Update(Effect355* this) { + Effect_Effect353_354_Update(this); } -void func_effect_800802D8(Effect* effect) { - func_effect_8007FE88(effect); +void Effect_Effect377_Update(Effect377* this) { + Effect_Effect353_354_Update(this); } -void func_effect_800802F8(Effect* effect) { - func_effect_8007FE88(effect); - effect->obj.rot.z += 10.0f; - effect->scale2 = 3.0f; +void Effect_Effect356_Update(Effect356* this) { + Effect_Effect353_354_Update(this); + this->obj.rot.z += 10.0f; + this->scale2 = 3.0f; if ((gGameFrameCount % 2) != 0) { - effect->scale2 = 3.5f; + this->scale2 = 3.5f; } } -void func_effect_80080360(Effect* effect) { - effect->obj.rot.z += 8.0f; - effect->scale2 += 0.1f; +void Effect_Effect376_Update(Effect376* this) { + this->obj.rot.z += 8.0f; + this->scale2 += 0.1f; // It seems they forgot that unk_4A is s16 and not a float... - effect->unk_4A -= 3.5f; - if (effect->unk_4A < 50.0f) { - effect->unk_4A = 50; + this->unk_4A -= 3.5f; + if (this->unk_4A < 50.0f) { + this->unk_4A = 50; } - func_effect_8007A774(gPlayer, effect, 50.0f); + func_effect_8007A774(gPlayer, this, 50.0f); } -void func_effect_8008040C(Effect* effect) { +void Effect_Effect398_Update(Effect398* this) { f32 xRot; f32 yRot; f32 temp; @@ -2954,32 +2959,32 @@ void func_effect_8008040C(Effect* effect) { Vec3f destVelocity; Vec3f sp3C; - switch (effect->state) { + switch (this->state) { case 0: - yRot = Math_Atan2F(gPlayer[0].pos.x - effect->obj.pos.x, gPlayer[0].trueZpos - effect->obj.pos.z); - temp = sqrtf(SQ(gPlayer[0].pos.x - effect->obj.pos.x) + SQ(gPlayer[0].trueZpos - effect->obj.pos.z)); - xRot = -Math_Atan2F(gPlayer[0].pos.y - effect->obj.pos.y, temp); + yRot = Math_Atan2F(gPlayer[0].pos.x - this->obj.pos.x, gPlayer[0].trueZpos - this->obj.pos.z); + temp = sqrtf(SQ(gPlayer[0].pos.x - this->obj.pos.x) + SQ(gPlayer[0].trueZpos - this->obj.pos.z)); + xRot = -Math_Atan2F(gPlayer[0].pos.y - this->obj.pos.y, temp); Matrix_RotateY(gCalcMatrix, yRot, MTXF_NEW); Matrix_RotateX(gCalcMatrix, xRot, MTXF_APPLY); srcVelocity.y = 0.0f; srcVelocity.x = 0.0f; srcVelocity.z = 100.0f; Matrix_MultVec3f(gCalcMatrix, &srcVelocity, &destVelocity); - effect->vel.x = destVelocity.x + gPathVelX; - effect->vel.y = destVelocity.y + gPathVelY; - effect->vel.z = destVelocity.z - gPathVelZ; - effect->state++; + this->vel.x = destVelocity.x + gPathVelX; + this->vel.y = destVelocity.y + gPathVelY; + this->vel.z = destVelocity.z - gPathVelZ; + this->state++; break; case 1: - effect->obj.rot.z = 360.0f - effect->obj.rot.z; - if (effect->timer_50 == 0) { - Object_Kill(&effect->obj, effect->sfxSource); + this->obj.rot.z = 360.0f - this->obj.rot.z; + if (this->timer_50 == 0) { + Object_Kill(&this->obj, this->sfxSource); return; } - if (func_effect_8007FD84(effect)) { - Object_Kill(&effect->obj, effect->sfxSource); + if (func_effect_8007FD84(this)) { + Object_Kill(&this->obj, this->sfxSource); return; } @@ -2987,68 +2992,68 @@ void func_effect_8008040C(Effect* effect) { var_fa0 = 100.0f; } - if (fabsf(gPlayer[0].trueZpos - effect->obj.pos.z) < (50.0f + var_fa0)) { - if ((fabsf(gPlayer[0].pos.x - effect->obj.pos.x) < (30.0f + var_fa0)) && - (fabsf(gPlayer[0].pos.y - effect->obj.pos.y) < (30.0f + var_fa0))) { + if (fabsf(gPlayer[0].trueZpos - this->obj.pos.z) < (50.0f + var_fa0)) { + if ((fabsf(gPlayer[0].pos.x - this->obj.pos.x) < (30.0f + var_fa0)) && + (fabsf(gPlayer[0].pos.y - this->obj.pos.y) < (30.0f + var_fa0))) { if ((gPlayer[0].barrelRollAlpha != 0) || (gPlayer[0].meteoWarpTimer != 0)) { - effect->obj.rot.y = 90.0f; - effect->obj.rot.x = RAND_FLOAT(360.0f); - Matrix_RotateY(gCalcMatrix, effect->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, effect->obj.rot.x * M_DTOR, MTXF_APPLY); + this->obj.rot.y = 90.0f; + this->obj.rot.x = RAND_FLOAT(360.0f); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); srcVelocity.y = 0.0f; srcVelocity.x = 0.0f; srcVelocity.z = 100.0f; Matrix_MultVec3f(gCalcMatrix, &srcVelocity, &destVelocity); - effect->vel.x = destVelocity.x; - effect->vel.y = destVelocity.y; - effect->vel.z = destVelocity.z; + this->vel.x = destVelocity.x; + this->vel.y = destVelocity.y; + this->vel.z = destVelocity.z; gPlayer[0].deflectCount++; - AUDIO_PLAY_SFX(NA_SE_ROLLING_REFLECT, effect->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ROLLING_REFLECT, this->sfxSource, 0); } if ((gPlayer[0].barrelRollAlpha == 0) && (gPlayer[0].mercyTimer == 0)) { - Player_ApplyDamage(gPlayer, 0, effect->info.damage); + Player_ApplyDamage(gPlayer, 0, this->info.damage); gPlayer[0].knockback.x = 20.0f; - if (effect->vel.x < 0.0f) { + if (this->vel.x < 0.0f) { gPlayer[0].knockback.x *= -1.0f; } gPlayer[0].knockback.y = 20.0f; - if (effect->vel.y < 0.0f) { + if (this->vel.y < 0.0f) { gPlayer[0].knockback.y *= -1.0f; } - Object_Kill(&effect->obj, effect->sfxSource); + Object_Kill(&this->obj, this->sfxSource); } } if (gGroundType == 4) { - if (Ground_801B6AEC(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z + gPathProgress) != 0) { - Object_Kill(&effect->obj, effect->sfxSource); + if (Ground_801B6AEC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + gPathProgress) != 0) { + Object_Kill(&this->obj, this->sfxSource); } - } else if (effect->obj.pos.y < gGroundHeight) { - Object_Kill(&effect->obj, effect->sfxSource); + } else if (this->obj.pos.y < gGroundHeight) { + Object_Kill(&this->obj, this->sfxSource); if (gGroundSurface != SURFACE_WATER) { - effect->obj.pos.y = gGroundHeight; - func_effect_8007D074(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 2.0f); + this->obj.pos.y = gGroundHeight; + func_effect_8007D074(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 2.0f); } } - sp3C.x = effect->vel.x; - sp3C.y = effect->vel.y; - sp3C.z = effect->vel.z; + sp3C.x = this->vel.x; + sp3C.y = this->vel.y; + sp3C.z = this->vel.z; - if (Object_CheckCollision(1000, &effect->obj.pos, &sp3C, 2) != 0) { - func_effect_8007D10C(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 2.0f); - Object_Kill(&effect->obj, effect->sfxSource); + if (Object_CheckCollision(1000, &this->obj.pos, &sp3C, 2) != 0) { + func_effect_8007D10C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 2.0f); + Object_Kill(&this->obj, this->sfxSource); } } break; } - func_effect_8007A774(gPlayer, effect, 50.0f); + func_effect_8007A774(gPlayer, this, 50.0f); } -void func_effect_8008092C(Effect* effect) { - switch (effect->unk_44) { +void Effect_Effect398_Draw(Effect398* this) { + switch (this->unk_44) { case 0: RCP_SetupDL(&gMasterDisp, SETUPDL_49); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); @@ -3070,118 +3075,118 @@ void func_effect_8008092C(Effect* effect) { } } -void func_effect_80080ACC(Effect* effect) { +void Effect_Effect394_Update(Effect394* this) { s16 temp_ft2; - switch (effect->unk_78) { + switch (this->unk_78) { case 0: break; case 1: - effect->unk_46--; + this->unk_46--; break; case 10: - effect->unk_44--; - if (effect->unk_44 <= 0) { - effect->unk_44 = effect->unk_46; + this->unk_44--; + if (this->unk_44 <= 0) { + this->unk_44 = this->unk_46; } - temp_ft2 = (((f32) effect->unk_44 / (f32) effect->unk_46) * 255.0f); - effect->unk_48 = temp_ft2; + temp_ft2 = (((f32) this->unk_44 / (f32) this->unk_46) * 255.0f); + this->unk_48 = temp_ft2; if (temp_ft2 > 255) { - effect->unk_48 = 255; + this->unk_48 = 255; } - if (effect->unk_48 < 32) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->unk_48 < 32) { + Object_Kill(&this->obj, this->sfxSource); } break; case 11: - effect->obj.rot.z += effect->unk_60.z; - effect->scale2 += 0.07f; - effect->vel.y += 0.2f; - effect->unk_44 += effect->unk_46; - if (effect->unk_44 < 10) { - Object_Kill(&effect->obj, effect->sfxSource); + this->obj.rot.z += this->unk_60.z; + this->scale2 += 0.07f; + this->vel.y += 0.2f; + this->unk_44 += this->unk_46; + if (this->unk_44 < 10) { + Object_Kill(&this->obj, this->sfxSource); } break; case 12: - effect->obj.rot.x += effect->unk_60.x; - effect->obj.rot.y += effect->unk_60.y; - effect->obj.rot.z += effect->unk_60.z; - if ((effect->unk_44 == 0) && (effect->obj.pos.y < gGroundHeight)) { - Object_Kill(&effect->obj, effect->sfxSource); + this->obj.rot.x += this->unk_60.x; + this->obj.rot.y += this->unk_60.y; + this->obj.rot.z += this->unk_60.z; + if ((this->unk_44 == 0) && (this->obj.pos.y < gGroundHeight)) { + Object_Kill(&this->obj, this->sfxSource); } - if (effect->unk_44 != 0) { - effect->unk_44--; + if (this->unk_44 != 0) { + this->unk_44--; } - effect->vel.y -= 4.0f; + this->vel.y -= 4.0f; break; case 16: break; case 100: - func_effect_8007E45C(effect); + Effect_Effect365_Update(this); break; case 101: - func_effect_8007BCE8(effect); + Effect_Effect362_Update(this); break; case 102: - func_effect_8007B758(effect); + Effect_Effect347_Update(this); break; } } -void func_effect_80080D04(Effect* effect) { +void Effect_Effect394_Draw(Effect394* this) { static s32 D_800D18E4 = 0; s32 i; s32 alpha; - switch (effect->unk_7A) { + switch (this->unk_7A) { case 0: - if (effect->unk_44 != 64) { - RCP_SetupDL(&gMasterDisp, effect->unk_44); + if (this->unk_44 != 64) { + RCP_SetupDL(&gMasterDisp, this->unk_44); } - gSPDisplayList(gMasterDisp++, effect->unk_74); - if (effect->unk_44 != 64) { + gSPDisplayList(gMasterDisp++, this->unk_74); + if (this->unk_44 != 64) { RCP_SetupDL(&gMasterDisp, SETUPDL_64); } break; case 1: - if (effect->unk_48 == 0) { - effect->unk_48 = effect->unk_46; + if (this->unk_48 == 0) { + this->unk_48 = this->unk_46; } - if (effect->unk_44 != 64) { - RCP_SetupDL(&gMasterDisp, effect->unk_44); + if (this->unk_44 != 64) { + RCP_SetupDL(&gMasterDisp, this->unk_44); } - alpha = (((f32) effect->unk_46 / (f32) effect->unk_48) * 255.0f); + alpha = (((f32) this->unk_46 / (f32) this->unk_48) * 255.0f); if (alpha > 255) { alpha = 255; } if (alpha < 32) { - Object_Kill(&effect->obj, effect->sfxSource); + Object_Kill(&this->obj, this->sfxSource); } else { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, alpha); - gSPDisplayList(gMasterDisp++, effect->unk_74); + gSPDisplayList(gMasterDisp++, this->unk_74); } - if (effect->unk_44 != 64) { + if (this->unk_44 != 64) { RCP_SetupDL(&gMasterDisp, SETUPDL_64); } break; case 10: RCP_SetupDL(&gMasterDisp, SETUPDL_65); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_48); - Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, effect->scale2, MTXF_APPLY); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_48); + Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, this->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_TI_A000000); RCP_SetupDL(&gMasterDisp, SETUPDL_64); @@ -3189,49 +3194,49 @@ void func_effect_80080D04(Effect* effect) { case 11: RCP_SetupDL(&gMasterDisp, SETUPDL_68); - Graphics_SetScaleMtx(effect->scale2); - gDPSetPrimColor(gMasterDisp++, 0, 0, 120, 60, 0, effect->unk_44); + Graphics_SetScaleMtx(this->scale2); + gDPSetPrimColor(gMasterDisp++, 0, 0, 120, 60, 0, this->unk_44); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 0); gSPDisplayList(gMasterDisp++, D_1023750); RCP_SetupDL(&gMasterDisp, SETUPDL_64); break; case 12: - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); RCP_SetupDL(&gMasterDisp, SETUPDL_23); gSPDisplayList(gMasterDisp++, D_VE1_9013C20); RCP_SetupDL(&gMasterDisp, SETUPDL_64); break; case 13: - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); RCP_SetupDL(&gMasterDisp, SETUPDL_68); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_44); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_44); gDPSetEnvColor(gMasterDisp++, 36, 45, 28, 0); gSPDisplayList(gMasterDisp++, D_1023750); RCP_SetupDL(&gMasterDisp, SETUPDL_64); break; case 14: - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); RCP_SetupDL(&gMasterDisp, SETUPDL_68); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_44); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_44); gDPSetEnvColor(gMasterDisp++, 255, 255, 255, 0); gSPDisplayList(gMasterDisp++, D_1023750); RCP_SetupDL(&gMasterDisp, SETUPDL_64); break; case 15: - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); RCP_SetupDL(&gMasterDisp, SETUPDL_68); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_4A); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_4A); gDPSetEnvColor(gMasterDisp++, 36, 45, 28, 0); gSPDisplayList(gMasterDisp++, D_1023750); RCP_SetupDL(&gMasterDisp, SETUPDL_64); break; case 16: - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); gDPSetPrimColor(gMasterDisp++, 0, 0, 96, 96, 255, 255); Matrix_Translate(gGfxMatrix, 34.14f, 0.0f, 0.0f, MTXF_APPLY); Matrix_Push(&gGfxMatrix); @@ -3250,7 +3255,7 @@ void func_effect_80080D04(Effect* effect) { gSPDisplayList(gMasterDisp++, D_102F5E0); Matrix_Pop(&gGfxMatrix); } - effect->obj.rot.z += 1.0f; + this->obj.rot.z += 1.0f; break; case 17: @@ -3262,13 +3267,13 @@ void func_effect_80080D04(Effect* effect) { D_800D18E4++; } - if (((effect->index + gGameFrameCount) % 2) == 0) { + if (((this->index + gGameFrameCount) % 2) == 0) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); } else { gDPSetPrimColor(gMasterDisp++, 0, 0, 96, 96, 255, 255); } - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); for (i = 0; i < 10; i++) { Matrix_Push(&gGfxMatrix); @@ -3286,7 +3291,7 @@ void func_effect_80080D04(Effect* effect) { RCP_SetupDL(&gMasterDisp, SETUPDL_48); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 190, 255); gDPSetEnvColor(gMasterDisp++, 239, 15, 0, 255); - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); gSPDisplayList(gMasterDisp++, D_1024AC0); break; } @@ -3305,90 +3310,90 @@ void func_effect_800815DC(void) { } } -void func_effect_8008165C(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 arg5) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_395; +void func_effect_8008165C(Effect395* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 arg5) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_395; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->scale2 = scale2; - effect->state = arg5; - Object_SetInfo(&effect->info, effect->obj.id); - effect->timer_50 = 300; + this->scale2 = scale2; + this->state = arg5; + Object_SetInfo(&this->info, this->obj.id); + this->timer_50 = 300; - switch (effect->state) { + switch (this->state) { case 4: - effect->unk_4A = 255; - effect->unk_46 = 1; + this->unk_4A = 255; + this->unk_46 = 1; break; case 5: - effect->vel.x = RAND_FLOAT_CENTERED(20.0f); - effect->vel.y = RAND_FLOAT(20.0f) + 30.0f; - effect->vel.z = RAND_FLOAT(30.0f); + this->vel.x = RAND_FLOAT_CENTERED(20.0f); + this->vel.y = RAND_FLOAT(20.0f) + 30.0f; + this->vel.z = RAND_FLOAT(30.0f); - effect->unk_46 = 5; - effect->unk_44 = RAND_FLOAT_CENTERED(20.0f) * 1.5f; - effect->info.unk_14 = 0; - effect->unk_4A = 255; + this->unk_46 = 5; + this->unk_44 = RAND_FLOAT_CENTERED(20.0f) * 1.5f; + this->info.unk_14 = 0; + this->unk_4A = 255; break; case 6: - effect->unk_4A = 255; - effect->unk_46 = 10; + this->unk_4A = 255; + this->unk_46 = 10; break; case 7: - effect->vel.y = RAND_FLOAT(7.0f) + 7.0f; - effect->vel.x = RAND_FLOAT_CENTERED(10.0f); - effect->vel.z = RAND_FLOAT_CENTERED(10.0f); + this->vel.y = RAND_FLOAT(7.0f) + 7.0f; + this->vel.x = RAND_FLOAT_CENTERED(10.0f); + this->vel.z = RAND_FLOAT_CENTERED(10.0f); - effect->scale2 = (RAND_FLOAT(0.8f) + 0.3f) * scale2; - effect->timer_50 = RAND_INT(50.0f) + 70; - effect->obj.rot.x = RAND_FLOAT(360.0f); + this->scale2 = (RAND_FLOAT(0.8f) + 0.3f) * scale2; + this->timer_50 = RAND_INT(50.0f) + 70; + this->obj.rot.x = RAND_FLOAT(360.0f); - effect->unk_60.x = RAND_FLOAT_CENTERED(30.0f); - effect->unk_60.y = RAND_FLOAT_CENTERED(30.0f); - effect->unk_60.z = RAND_FLOAT_CENTERED(30.0f); + this->unk_60.x = RAND_FLOAT_CENTERED(30.0f); + this->unk_60.y = RAND_FLOAT_CENTERED(30.0f); + this->unk_60.z = RAND_FLOAT_CENTERED(30.0f); - effect->info.unk_14 = 0; + this->info.unk_14 = 0; break; case 9: - effect->obj.pos.x += RAND_FLOAT_CENTERED(600.0f); - effect->obj.pos.y += RAND_FLOAT_CENTERED(600.0f); - effect->obj.pos.z += RAND_FLOAT_CENTERED(300.0f) + 300.0f; - effect->scale1 = 0.0f; - effect->scale2 = RAND_FLOAT(1.0f) + 1.0f; + this->obj.pos.x += RAND_FLOAT_CENTERED(600.0f); + this->obj.pos.y += RAND_FLOAT_CENTERED(600.0f); + this->obj.pos.z += RAND_FLOAT_CENTERED(300.0f) + 300.0f; + this->scale1 = 0.0f; + this->scale2 = RAND_FLOAT(1.0f) + 1.0f; break; case 10: - effect->timer_50 = 10; - AUDIO_PLAY_SFX(NA_SE_EN_A6BOSS_BEAM, effect->sfxSource, 4); + this->timer_50 = 10; + AUDIO_PLAY_SFX(NA_SE_EN_A6BOSS_BEAM, this->sfxSource, 4); break; case 11: - effect->scale1 = 255.0f; - effect->vel.y = 20.0f; - if (effect->scale2 > 10.0f) { - effect->scale2 = 10.0f; + this->scale1 = 255.0f; + this->vel.y = 20.0f; + if (this->scale2 > 10.0f) { + this->scale2 = 10.0f; } break; case 12: - effect->scale1 = scale2; - effect->scale2 = 1.0f; - effect->timer_50 = 50; - effect->unk_44 = 100; + this->scale1 = scale2; + this->scale2 = 1.0f; + this->timer_50 = 50; + this->unk_44 = 100; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - AUDIO_PLAY_SFX(NA_SE_EN_STAR_EXPLOSION, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_STAR_EXPLOSION, this->sfxSource, 4); gControllerRumbleTimers[0] = 60; break; } @@ -3452,7 +3457,7 @@ void func_effect_80081BEC(f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 arg4) { static f32 D_800D18E8 = 0.0f; static f32 D_800D18EC = 0.0f; -void func_effect_80081C5C(Effect* effect) { +void Effect_Effect395_Update(Effect395* this) { f32 sp84; f32 posXDiff; f32 posYDiff; @@ -3464,183 +3469,182 @@ void func_effect_80081C5C(Effect* effect) { Vec3f velocity; Vec3f velocityDest; - velocity.x = effect->vel.x; - velocity.y = effect->vel.y; - velocity.z = effect->vel.z; + velocity.x = this->vel.x; + velocity.y = this->vel.y; + velocity.z = this->vel.z; //! FAKE: Probably some debug stuff printing different messages depending on what unk_4E is. - if (effect->state != 0 && effect->state != 6 && effect->state != 7 && effect->state != 11) { + if ((this->state != 0) && (this->state != 6) && (this->state != 7) && (this->state != 11)) { if (gCurrentLevel) {} PRINTF("ZO_MOVE HELP %d\n"); } - if (effect->state != 1 && effect->state != 2 && effect->state != 4 && effect->state != 5 && effect->state != 8 && - effect->state != 9) { + if ((this->state != 1) && (this->state != 2) && (this->state != 4) && (this->state != 5) && (this->state != 8) && + (this->state != 9)) { if (gCurrentLevel) {} PRINTF("AC_MOVE HELP %d\n"); } - switch (effect->state) { + switch (this->state) { case 0: - if (effect->timer_50 == 0) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->timer_50 == 0) { + Object_Kill(&this->obj, this->sfxSource); break; } - if (((gGameFrameCount % 2) == 0)) { - func_effect_8007C484(RAND_FLOAT_CENTERED(50.0f) + effect->obj.pos.x, - RAND_FLOAT_CENTERED(50.0f) + effect->obj.pos.y, - RAND_FLOAT_CENTERED(50.0f) + effect->obj.pos.z, effect->vel.x, effect->vel.y, - effect->vel.z, RAND_FLOAT(0.05f) + 0.05f, 0); + if ((gGameFrameCount % 2) == 0) { + func_effect_8007C484(RAND_FLOAT_CENTERED(50.0f) + this->obj.pos.x, + RAND_FLOAT_CENTERED(50.0f) + this->obj.pos.y, + RAND_FLOAT_CENTERED(50.0f) + this->obj.pos.z, this->vel.x, this->vel.y, + this->vel.z, RAND_FLOAT(0.05f) + 0.05f, 0); } - if (Object_CheckCollision(effect->index, &effect->obj.pos, &velocity, 1) != 0) { - func_effect_8007B344(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 3.0f, 7); - Object_Kill(&effect->obj, effect->sfxSource); + if (Object_CheckCollision(this->index, &this->obj.pos, &velocity, 1) != 0) { + func_effect_8007B344(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 3.0f, 7); + Object_Kill(&this->obj, this->sfxSource); } sp84 = 50.0f; break; case 1: - if (effect->timer_50 == 0) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->timer_50 == 0) { + Object_Kill(&this->obj, this->sfxSource); break; } - effect->unk_60.z += 10.0f; - effect->vel.z = 5.0f; + this->unk_60.z += 10.0f; + this->vel.z = 5.0f; - if (((gGameFrameCount % 8) == 0)) { - effect->unk_44++; - effect->unk_44 &= 1; + if ((gGameFrameCount % 8) == 0) { + this->unk_44++; + this->unk_44 &= 1; } - if (effect->unk_44 == 0) { - Math_SmoothStepToF(&effect->scale2, 0.2f, 0.01f, 0.02f, 0.0f); + if (this->unk_44 == 0) { + Math_SmoothStepToF(&this->scale2, 0.2f, 0.01f, 0.02f, 0.0f); } else { - Math_SmoothStepToF(&effect->scale2, 0.5f, 0.01f, 0.02f, 0.0f); + Math_SmoothStepToF(&this->scale2, 0.5f, 0.01f, 0.02f, 0.0f); } - if (Object_CheckCollision(effect->index, &effect->obj.pos, &velocity, 1) != 0) { - Object_Kill(&effect->obj, effect->sfxSource); - func_effect_8007D0E0(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 1.0f); + if (Object_CheckCollision(this->index, &this->obj.pos, &velocity, 1) != 0) { + Object_Kill(&this->obj, this->sfxSource); + func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1.0f); } break; case 2: - if (effect->timer_50 == 0) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->timer_50 == 0) { + Object_Kill(&this->obj, this->sfxSource); break; } - switch (effect->unk_44) { + switch (this->unk_44) { case 1: case 2: break; case 0: - Math_SmoothStepToF(&effect->scale2, 1.0f, 0.1f, 5.0f, 0.0001f); - if (effect->scale2 >= 1.0f) { - effect->unk_44++; + Math_SmoothStepToF(&this->scale2, 1.0f, 0.1f, 5.0f, 0.0001f); + if (this->scale2 >= 1.0f) { + this->unk_44++; } break; case 3: - Math_SmoothStepToF(&effect->scale2, 0.0f, 0.1f, 10.0f, 0.0001f); - if (effect->scale2 < 0.3f) { - Object_Kill(&effect->obj, effect->sfxSource); + Math_SmoothStepToF(&this->scale2, 0.0f, 0.1f, 10.0f, 0.0001f); + if (this->scale2 < 0.3f) { + Object_Kill(&this->obj, this->sfxSource); } break; } - if (((gGameFrameCount % 4) == 0)) { - func_effect_8007C120((RAND_FLOAT_CENTERED(effect->scale2) * 50.0f) + effect->obj.pos.x, - (RAND_FLOAT_CENTERED(effect->scale2) * 50.0f) + effect->obj.pos.y, - (RAND_FLOAT_CENTERED(effect->scale2) * 50.0f) + effect->obj.pos.z, effect->vel.x, - effect->vel.y, effect->vel.z, RAND_FLOAT(0.03f) + 0.05f, 10); + if ((gGameFrameCount % 4) == 0) { + func_effect_8007C120((RAND_FLOAT_CENTERED(this->scale2) * 50.0f) + this->obj.pos.x, + (RAND_FLOAT_CENTERED(this->scale2) * 50.0f) + this->obj.pos.y, + (RAND_FLOAT_CENTERED(this->scale2) * 50.0f) + this->obj.pos.z, this->vel.x, + this->vel.y, this->vel.z, RAND_FLOAT(0.03f) + 0.05f, 10); } - if (Object_CheckCollision(effect->index, &effect->obj.pos, &velocity, 1) != 0) { - func_effect_8007B344(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 3.0f, 7); - Object_Kill(&effect->obj, effect->sfxSource); + if (Object_CheckCollision(this->index, &this->obj.pos, &velocity, 1) != 0) { + func_effect_8007B344(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 3.0f, 7); + Object_Kill(&this->obj, this->sfxSource); } sp84 = 50.0f; break; case 3: - effect->info.unk_19 = 2; - if (effect->unk_44 != 0) { - Object_Kill(&effect->obj, effect->sfxSource); - func_effect_8007D0E0(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 5.0f); - } else if (fabsf(gPlayer[0].trueZpos - effect->obj.pos.z) < 1000.0f) { - ActorEvent_SpawnEffect347(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 15.0f); - Object_Kill(&effect->obj, effect->sfxSource); + this->info.unk_19 = 2; + if (this->unk_44 != 0) { + Object_Kill(&this->obj, this->sfxSource); + func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 5.0f); + } else if (fabsf(gPlayer[0].trueZpos - this->obj.pos.z) < 1000.0f) { + ActorEvent_SpawnEffect347(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 15.0f); + Object_Kill(&this->obj, this->sfxSource); } sp84 = 50.0f; break; case 4: - effect->scale2 += 0.07f; - effect->unk_4A -= effect->unk_46; - effect->obj.rot.z += 3.0f; - effect->vel.y += 0.2f; - if (effect->unk_4A < 0) { - Object_Kill(&effect->obj, effect->sfxSource); + this->scale2 += 0.07f; + this->unk_4A -= this->unk_46; + this->obj.rot.z += 3.0f; + this->vel.y += 0.2f; + if (this->unk_4A < 0) { + Object_Kill(&this->obj, this->sfxSource); } break; case 5: - func_effect_80081A8C(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 5.0f, 6); - effect->unk_4A -= effect->unk_46; - effect->obj.rot.x += effect->unk_44; - effect->obj.rot.y += effect->unk_44; - effect->obj.rot.z += effect->unk_44; - effect->vel.y -= 2.0f; - if ((effect->unk_4A < 0) || (effect->timer_50 == 0)) { - Object_Kill(&effect->obj, effect->sfxSource); + func_effect_80081A8C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 5.0f, 6); + this->unk_4A -= this->unk_46; + this->obj.rot.x += this->unk_44; + this->obj.rot.y += this->unk_44; + this->obj.rot.z += this->unk_44; + this->vel.y -= 2.0f; + if ((this->unk_4A < 0) || (this->timer_50 == 0)) { + Object_Kill(&this->obj, this->sfxSource); } break; case 6: - effect->unk_4A -= effect->unk_46; - Math_SmoothStepToF(&effect->scale2, 0.0f, 0.1f, 1.0f, 0.00001f); - if ((effect->unk_4A < 0) || (effect->timer_50 == 0)) { - Object_Kill(&effect->obj, effect->sfxSource); + this->unk_4A -= this->unk_46; + Math_SmoothStepToF(&this->scale2, 0.0f, 0.1f, 1.0f, 0.00001f); + if ((this->unk_4A < 0) || (this->timer_50 == 0)) { + Object_Kill(&this->obj, this->sfxSource); } break; case 7: switch (gCurrentLevel) { case LEVEL_AQUAS: - if (((gGameFrameCount % 4) == 0)) { - func_effect_80081A8C(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, effect->scale2, - 6); + if ((gGameFrameCount % 4) == 0) { + func_effect_80081A8C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->scale2, 6); } - effect->obj.rot.x += effect->unk_60.x; - effect->obj.rot.y += effect->unk_60.y; - effect->obj.rot.z += effect->unk_60.z; - effect->vel.y -= 0.5f; - if ((effect->timer_50 == 0) || (effect->obj.pos.y < gGroundHeight)) { - Object_Kill(&effect->obj, effect->sfxSource); + this->obj.rot.x += this->unk_60.x; + this->obj.rot.y += this->unk_60.y; + this->obj.rot.z += this->unk_60.z; + this->vel.y -= 0.5f; + if ((this->timer_50 == 0) || (this->obj.pos.y < gGroundHeight)) { + Object_Kill(&this->obj, this->sfxSource); } break; case LEVEL_ZONESS: - if (((gGameFrameCount % 4) == 0)) { + if ((gGameFrameCount % 4) == 0) { // clang-format off - func_effect_80081A8C(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, effect->scale2 * 3.0f, 6); + func_effect_80081A8C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->scale2 * 3.0f, 6); // clang-format on } - effect->obj.rot.x += effect->unk_60.x; - effect->obj.rot.y += effect->unk_60.y; - effect->obj.rot.z += effect->unk_60.z; + this->obj.rot.x += this->unk_60.x; + this->obj.rot.y += this->unk_60.y; + this->obj.rot.z += this->unk_60.z; - effect->vel.y -= 1.0f; + this->vel.y -= 1.0f; - if ((Play_CheckDynaFloorCollision(&posYOut, &unusedOut, effect->obj.pos.x, effect->obj.pos.y, - effect->obj.pos.z)) || - (effect->timer_50 == 0)) { - func_effect_8007B228(effect->obj.pos.x, posYOut, effect->obj.pos.z, effect->scale2); - Object_Kill(&effect->obj, effect->sfxSource); + if ((Play_CheckDynaFloorCollision(&posYOut, &unusedOut, this->obj.pos.x, this->obj.pos.y, + this->obj.pos.z)) || + (this->timer_50 == 0)) { + func_effect_8007B228(this->obj.pos.x, posYOut, this->obj.pos.z, this->scale2); + Object_Kill(&this->obj, this->sfxSource); } break; } @@ -3655,65 +3659,65 @@ void func_effect_80081C5C(Effect* effect) { velocity.x = 0; velocity.z = 250.0f; - if (effect->unk_44 > 0) { + if (this->unk_44 > 0) { velocity.z = 2000.0f; } Matrix_MultVec3fNoTranslate(gCalcMatrix, &velocity, &velocityDest); - effect->obj.pos.x = gBosses[0].obj.pos.x + velocityDest.x; - effect->obj.pos.y = gBosses[0].obj.pos.y + velocityDest.y; - effect->obj.pos.z = gBosses[0].obj.pos.z + velocityDest.z; + this->obj.pos.x = gBosses[0].obj.pos.x + velocityDest.x; + this->obj.pos.y = gBosses[0].obj.pos.y + velocityDest.y; + this->obj.pos.z = gBosses[0].obj.pos.z + velocityDest.z; - switch (effect->unk_44) { + switch (this->unk_44) { case 0: - func_effect_80081BEC(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 1.0f, 9); - Math_SmoothStepToF(&effect->scale2, 6.0f, 0.01f, 0.05f, 0.00001f); - if (effect->scale2 >= 5.0f) { + func_effect_80081BEC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1.0f, 9); + Math_SmoothStepToF(&this->scale2, 6.0f, 0.01f, 0.05f, 0.00001f); + if (this->scale2 >= 5.0f) { gEffects[ARRAY_COUNT(gEffects) - 1].obj.status = gEffects[ARRAY_COUNT(gEffects) - 2].obj.status = OBJ_FREE; - func_effect_80081BEC(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 1.0f, 10); + func_effect_80081BEC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1.0f, 10); gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; gFillScreenAlpha = gFillScreenAlphaTarget = 255; gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 25; - effect->timer_50 = 10; + this->timer_50 = 10; D_800D18EC = 0.0f; D_800D18E8 = 0.0f; gBosses[0].timer_050 = 150; gBosses[0].state = 6; - effect->unk_44++; + this->unk_44++; } break; case 1: - Math_SmoothStepToF(&effect->scale2, 8.0f, 0.1f, 1.0f, 0.00001f); - if (effect->timer_50 == 0) { + Math_SmoothStepToF(&this->scale2, 8.0f, 0.1f, 1.0f, 0.00001f); + if (this->timer_50 == 0) { if (gFillScreenAlpha != 0) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 0; } - effect->timer_50 = gBosses[0].timer_050; - effect->unk_44++; + this->timer_50 = gBosses[0].timer_050; + this->unk_44++; } break; case 2: - if (effect->timer_50 == 0) { - Math_SmoothStepToF(&effect->scale2, 0.0f, 1.0f, 10.0f, 0.00001f); - if (effect->scale2 == 0.0f) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->timer_50 == 0) { + Math_SmoothStepToF(&this->scale2, 0.0f, 1.0f, 10.0f, 0.00001f); + if (this->scale2 == 0.0f) { + Object_Kill(&this->obj, this->sfxSource); } } else { - Math_SmoothStepToF(&effect->scale2, 8.0f, 0.1f, 1.0f, 0.00001f); + Math_SmoothStepToF(&this->scale2, 8.0f, 0.1f, 1.0f, 0.00001f); } break; } break; case 9: - posXDiff = gBosses[0].obj.pos.x - effect->obj.pos.x; - posYDiff = gBosses[0].obj.pos.y - effect->obj.pos.y; - posZDiff = gBosses[0].obj.pos.z - effect->obj.pos.z; + posXDiff = gBosses[0].obj.pos.x - this->obj.pos.x; + posYDiff = gBosses[0].obj.pos.y - this->obj.pos.y; + posZDiff = gBosses[0].obj.pos.z - this->obj.pos.z; yRotDeg = Math_RadToDeg(Math_Atan2F(posXDiff, posZDiff)); xRotDeg = Math_RadToDeg(-Math_Atan2F(posYDiff, sqrtf(SQ(posXDiff) + SQ(posZDiff)))); @@ -3726,38 +3730,38 @@ void func_effect_80081C5C(Effect* effect) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &velocity, &velocityDest); - effect->vel.x = velocityDest.x; - effect->vel.y = velocityDest.y; - effect->vel.z = -50.0f; + this->vel.x = velocityDest.x; + this->vel.y = velocityDest.y; + this->vel.z = -50.0f; - effect->unk_44++; - Math_SmoothStepToF(&effect->scale1, 255.0f, 1.0f, 20.0f, 0.0f); - Math_SmoothStepToF(&effect->vel.z, -70.0f, 0.01f, 0.1f, 0.0f); - Math_SmoothStepToF(&effect->scale2, 0.0f, 0.1f, 0.5f, 0.00001f); - if (effect->scale2 == 0.0f) { - Object_Kill(&effect->obj, effect->sfxSource); + this->unk_44++; + Math_SmoothStepToF(&this->scale1, 255.0f, 1.0f, 20.0f, 0.0f); + Math_SmoothStepToF(&this->vel.z, -70.0f, 0.01f, 0.1f, 0.0f); + Math_SmoothStepToF(&this->scale2, 0.0f, 0.1f, 0.5f, 0.00001f); + if (this->scale2 == 0.0f) { + Object_Kill(&this->obj, this->sfxSource); } break; case 10: - switch (effect->unk_44) { + switch (this->unk_44) { case 0: D_ctx_801779A8[0] = 50.0f; - if (effect->unk_46 == 10) { + if (this->unk_46 == 10) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; gFillScreenAlpha = gFillScreenAlphaTarget = 255; gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 25; gCameraShake = 50; } - if (effect->unk_46 == 0) { + if (this->unk_46 == 0) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 0; - effect->unk_46 = 50; + this->unk_46 = 50; } - if (effect->unk_46 != 0) { - effect->unk_46--; + if (this->unk_46 != 0) { + this->unk_46--; } - if ((((gGameFrameCount % 16) == 0)) && (effect->timer_50 == 0)) { + if (((gGameFrameCount % 16) == 0) && (this->timer_50 == 0)) { D_800D18EC = RAD_TO_DEG(Math_Atan2F(gPlayer[0].cam.eye.x - gBosses[0].obj.pos.x, gPlayer[0].cam.eye.z - (gBosses[0].obj.pos.z + gPathProgress))); @@ -3768,8 +3772,8 @@ void func_effect_80081C5C(Effect* effect) { SQ(gPlayer[0].cam.eye.x - gBosses[0].obj.pos.x)))); } if (gBosses[0].timer_050 == 0) { - gBosses[0].swork[39] = effect->index; - effect->unk_44 = 1; + gBosses[0].swork[39] = this->index; + this->unk_44 = 1; } break; @@ -3778,14 +3782,14 @@ void func_effect_80081C5C(Effect* effect) { break; } - effect->info.unk_14 = 0; + this->info.unk_14 = 0; Math_SmoothStepToAngle(&gBosses[0].obj.rot.x, D_800D18E8, 0.1f, 1.0f, 0.00001f); Math_SmoothStepToAngle(&gBosses[0].obj.rot.y, D_800D18EC, 0.1f, 1.0f, 0.00001f); - effect->obj.rot.x = gBosses[0].obj.rot.x; - effect->obj.rot.y = gBosses[0].obj.rot.y; - effect->obj.rot.z += 30.0f; + this->obj.rot.x = gBosses[0].obj.rot.x; + this->obj.rot.y = gBosses[0].obj.rot.y; + this->obj.rot.z += 30.0f; Matrix_RotateY(gCalcMatrix, gBosses[0].obj.rot.y * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, gBosses[0].obj.rot.x * M_DTOR, MTXF_APPLY); @@ -3795,68 +3799,68 @@ void func_effect_80081C5C(Effect* effect) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &velocity, &velocityDest); - effect->obj.pos.x = gBosses[0].obj.pos.x + velocityDest.x; - effect->obj.pos.y = gBosses[0].obj.pos.y + velocityDest.y; - effect->obj.pos.z = gBosses[0].obj.pos.z + velocityDest.z; + this->obj.pos.x = gBosses[0].obj.pos.x + velocityDest.x; + this->obj.pos.y = gBosses[0].obj.pos.y + velocityDest.y; + this->obj.pos.z = gBosses[0].obj.pos.z + velocityDest.z; - if (effect->unk_44 == 0) { - Math_SmoothStepToF(&effect->unk_60.x, 5.0f, 0.1f, 1.0f, 0.00001f); - Math_SmoothStepToF(&effect->unk_60.y, 5.0f, 0.1f, 1.0f, 0.00001f); - Math_SmoothStepToF(&effect->unk_60.z, 50.0f, 1.0f, 2.0f, 0.00001f); + if (this->unk_44 == 0) { + Math_SmoothStepToF(&this->unk_60.x, 5.0f, 0.1f, 1.0f, 0.00001f); + Math_SmoothStepToF(&this->unk_60.y, 5.0f, 0.1f, 1.0f, 0.00001f); + Math_SmoothStepToF(&this->unk_60.z, 50.0f, 1.0f, 2.0f, 0.00001f); } velocity.x = velocity.y = 0.0f; - velocity.z = fabsf(gPlayer[0].trueZpos - effect->obj.pos.z); + velocity.z = fabsf(gPlayer[0].trueZpos - this->obj.pos.z); Matrix_MultVec3fNoTranslate(gCalcMatrix, &velocity, &velocityDest); - if ((((effect->timer_50 == 0) && - (fabsf(gPlayer[0].pos.x - (effect->obj.pos.x + velocityDest.x)) <= (effect->unk_60.x * 50.0f))) && - (fabsf(gPlayer[0].pos.y - (effect->obj.pos.y + velocityDest.y)) <= (effect->unk_60.y * 50.0f))) && + if ((((this->timer_50 == 0) && + (fabsf(gPlayer[0].pos.x - (this->obj.pos.x + velocityDest.x)) <= (this->unk_60.x * 50.0f))) && + (fabsf(gPlayer[0].pos.y - (this->obj.pos.y + velocityDest.y)) <= (this->unk_60.y * 50.0f))) && (gPlayer[0].mercyTimer == 0)) { Player_ApplyDamage(gPlayer, 0, 40); } break; case 11: - effect->obj.rot.z += 20.0f; - effect->vel.y -= 2.0f; - if (effect->vel.y < (-20.0f)) { - effect->vel.y = -20.0f; + this->obj.rot.z += 20.0f; + this->vel.y -= 2.0f; + if (this->vel.y < (-20.0f)) { + this->vel.y = -20.0f; } - Math_SmoothStepToF(&effect->scale1, 0.0f, 0.1f, 100.0f, 0.00001f); + Math_SmoothStepToF(&this->scale1, 0.0f, 0.1f, 100.0f, 0.00001f); - if ((effect->scale1 < 1.0f) || (effect->timer_50 == 0)) { - Object_Kill(&effect->obj, effect->sfxSource); + if ((this->scale1 < 1.0f) || (this->timer_50 == 0)) { + Object_Kill(&this->obj, this->sfxSource); } break; case 12: - func_effect_8007A28C(effect); + Effect_Effect383_Update(this); break; } - if ((effect->state == 2) && (effect->unk_44 == 2)) { - func_effect_8007FE88(effect); + if ((this->state == 2) && (this->unk_44 == 2)) { + Effect_Effect353_354_Update(this); } - if ((effect->state < 4) && (effect->state != 1)) { - func_effect_8007A774(gPlayer, effect, sp84); + if ((this->state < 4) && (this->state != 1)) { + func_effect_8007A774(gPlayer, this, sp84); } } -void func_effect_80082F78(Effect* effect) { +void Effect_Effect395_Draw(Effect395* this) { //! FAKE: Probably some debug stuff printing different messages depending on what unk_4E is. - if (effect->state != 0 && effect->state != 6) { - if (effect->unk_4A && effect->unk_4A) {} + if ((this->state != 0) && (this->state != 6)) { + if (this->unk_4A && this->unk_4A) {} PRINTF("ZO_DISP HELP %d\n"); } - if (effect->state != 1 && effect->state != 2 && effect->state != 4 && effect->state != 5 && effect->state != 7) { - if (effect->unk_4A && !effect->scale2) {} + if ((this->state != 1) && (this->state != 2) && (this->state != 4) && (this->state != 5) && (this->state != 7)) { + if (this->unk_4A && !this->scale2) {} PRINTF("AC_DISP HELP %d\n"); } - switch (effect->state) { + switch (this->state) { case 0: RCP_SetupDL(&gMasterDisp, SETUPDL_49); Matrix_Scale(gGfxMatrix, 0.7f, 0.7f, 1.0f, MTXF_APPLY); @@ -3869,13 +3873,13 @@ void func_effect_80082F78(Effect* effect) { case 1: RCP_SetupDL(&gMasterDisp, SETUPDL_41); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); gSPDisplayList(gMasterDisp++, D_101C2E0); break; case 2: RCP_SetupDL(&gMasterDisp, SETUPDL_49); - Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->scale2, this->scale2, this->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 32, 32, 255, 255); @@ -3888,16 +3892,16 @@ void func_effect_80082F78(Effect* effect) { break; case 4: - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); RCP_SetupDL(&gMasterDisp, SETUPDL_68); - gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 0, effect->unk_4A); + gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 0, this->unk_4A); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 0); gSPDisplayList(gMasterDisp++, D_1023750); break; case 5: case 7: - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); RCP_SetupDL(&gMasterDisp, SETUPDL_60); if (gCurrentLevel == LEVEL_AQUAS) { gSPDisplayList(gMasterDisp++, D_AQ_600A220); @@ -3908,18 +3912,18 @@ void func_effect_80082F78(Effect* effect) { break; case 6: - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); if (gCurrentLevel == LEVEL_ZONESS) { - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); } RCP_SetupDL(&gMasterDisp, SETUPDL_64); - gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 255, 0, effect->unk_4A); + gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 255, 0, this->unk_4A); gSPDisplayList(gMasterDisp++, D_1023750); break; case 8: RCP_SetupDL(&gMasterDisp, SETUPDL_49); - Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->scale2, this->scale2, this->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 255, 0, 128, 255); @@ -3928,9 +3932,9 @@ void func_effect_80082F78(Effect* effect) { case 9: RCP_SetupDL(&gMasterDisp, SETUPDL_49); - Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->scale2, this->scale2, this->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->scale1); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->scale1); gDPSetEnvColor(gMasterDisp++, 255, 255, 128, 255); gSPDisplayList(gMasterDisp++, D_1024AC0); break; @@ -3940,7 +3944,7 @@ void func_effect_80082F78(Effect* effect) { Texture_Scroll(D_A6_6012840, 16, 16, 0); } RCP_SetupDL(&gMasterDisp, SETUPDL_53); - Matrix_Scale(gGfxMatrix, effect->unk_60.x, effect->unk_60.y, effect->unk_60.z, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->unk_60.x, this->unk_60.y, this->unk_60.z, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_A6_6012550); @@ -3948,39 +3952,39 @@ void func_effect_80082F78(Effect* effect) { case 11: RCP_SetupDL(&gMasterDisp, SETUPDL_67); - gDPSetPrimColor(gMasterDisp++, 0, 0, 111, 111, 111, (s32) effect->scale1); + gDPSetPrimColor(gMasterDisp++, 0, 0, 111, 111, 111, (s32) this->scale1); gDPSetEnvColor(gMasterDisp++, 255, 255, 255, 255); - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); gSPDisplayList(gMasterDisp++, D_1024AC0); break; case 12: - func_effect_8007A3C0(effect); + Effect_Effect383_Draw(this); break; } RCP_SetupDL(&gMasterDisp, SETUPDL_64); } -void func_effect_800836C0(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 arg4, f32 scale) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_391; +void func_effect_800836C0(Effect391* this, f32 xPos, f32 yPos, f32 zPos, f32 arg4, f32 scale) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_391; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->unk_60.x = scale * 0.8f; - effect->unk_60.y = 1.2f; + this->unk_60.x = scale * 0.8f; + this->unk_60.y = 1.2f; if (arg4 != 0.0f) { - effect->unk_60.y = arg4; + this->unk_60.y = arg4; } - effect->unk_44 = 230; - effect->scale1 = scale; - effect->scale2 = 0.1f; - Object_SetInfo(&effect->info, effect->obj.id); + this->unk_44 = 230; + this->scale1 = scale; + this->scale2 = 0.1f; + Object_SetInfo(&this->info, this->obj.id); } void func_effect_8008377C(f32 xPos, f32 yPos, f32 zPos, f32 arg3, f32 scale) { @@ -3994,92 +3998,92 @@ void func_effect_8008377C(f32 xPos, f32 yPos, f32 zPos, f32 arg3, f32 scale) { } } -void func_effect_800837EC(Effect* effect) { +void Effect_Effect391_Update(Effect391* this) { s32 pad[2]; f32 var_fv1; s32 var_s2; s32 i; - switch (effect->state) { + switch (this->state) { case 0: - if (effect->unk_60.y == 1.2f) { - Math_SmoothStepToF(&effect->scale2, effect->scale1, 0.5f, effect->scale1, 0.01f); + if (this->unk_60.y == 1.2f) { + Math_SmoothStepToF(&this->scale2, this->scale1, 0.5f, this->scale1, 0.01f); } else { - Math_SmoothStepToF(&effect->scale2, effect->scale1, 1.0f, effect->scale1 * 0.1f, 0.01f); + Math_SmoothStepToF(&this->scale2, this->scale1, 1.0f, this->scale1 * 0.1f, 0.01f); } - if (effect->scale2 > (effect->scale1 * 0.7f)) { - Math_SmoothStepToF(&effect->unk_60.x, effect->scale2 * 1.3f, 0.1f, 0.5f, 0.0001f); + if (this->scale2 > (this->scale1 * 0.7f)) { + Math_SmoothStepToF(&this->unk_60.x, this->scale2 * 1.3f, 0.1f, 0.5f, 0.0001f); } - if (effect->scale2 == effect->scale1) { - var_s2 = effect->scale2 * 5.0f; + if (this->scale2 == this->scale1) { + var_s2 = this->scale2 * 5.0f; if (var_s2 < 5) { var_s2 = 5; } if (var_s2 > 10) { var_s2 = 10; } - var_fv1 = effect->unk_60.y * 300.0f; - if (effect->unk_60.y == 1.2f) { - var_fv1 = effect->unk_60.y * 100.0f; + var_fv1 = this->unk_60.y * 300.0f; + if (this->unk_60.y == 1.2f) { + var_fv1 = this->unk_60.y * 100.0f; } for (i = 0; i < var_s2; i++) { - func_effect_80081BEC(effect->obj.pos.x + RAND_FLOAT_CENTERED(effect->scale2 * 200.0f), - effect->obj.pos.y + var_fv1 + RAND_FLOAT_CENTERED(effect->scale2 * 100.0f), - effect->obj.pos.z + RAND_FLOAT_CENTERED(effect->scale2 * 200.0f), + func_effect_80081BEC(this->obj.pos.x + RAND_FLOAT_CENTERED(this->scale2 * 200.0f), + this->obj.pos.y + var_fv1 + RAND_FLOAT_CENTERED(this->scale2 * 100.0f), + this->obj.pos.z + RAND_FLOAT_CENTERED(this->scale2 * 200.0f), 0.3f - RAND_FLOAT_CENTERED(0.2f), 11); } - effect->state++; + this->state++; } break; case 1: - effect->vel.y -= 4.0f; - Math_SmoothStepToF(&effect->scale2, 0.0f, 0.01f, 0.1f, 0.0001f); - Math_SmoothStepToF(&effect->unk_60.x, effect->scale2 * 1.3f, 0.1f, 0.5f, 0.0001f); - effect->unk_44 -= 35; - if (effect->unk_44 < 0) { - Object_Kill(&effect->obj, effect->sfxSource); + this->vel.y -= 4.0f; + Math_SmoothStepToF(&this->scale2, 0.0f, 0.01f, 0.1f, 0.0001f); + Math_SmoothStepToF(&this->unk_60.x, this->scale2 * 1.3f, 0.1f, 0.5f, 0.0001f); + this->unk_44 -= 35; + if (this->unk_44 < 0) { + Object_Kill(&this->obj, this->sfxSource); } break; } - effect->obj.rot.y = RAD_TO_DEG(Math_Atan2F(gPlayer[0].cam.eye.x - effect->obj.pos.x, - gPlayer[0].cam.eye.z - (effect->obj.pos.z + gPathProgress))); + this->obj.rot.y = RAD_TO_DEG( + Math_Atan2F(gPlayer[0].cam.eye.x - this->obj.pos.x, gPlayer[0].cam.eye.z - (this->obj.pos.z + gPathProgress))); } -void func_effect_80083B8C(Effect* effect) { +void Effect_Effect391_Draw(Effect391* this) { RCP_SetupDL_49(); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_44); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_44); gDPSetEnvColor(gMasterDisp++, 36, 45, 28, 255); - Matrix_Scale(gGfxMatrix, effect->unk_60.x, effect->scale2 * effect->unk_60.y, effect->scale2, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->unk_60.x, this->scale2 * this->unk_60.y, this->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ZO_601BAD0); RCP_SetupDL(&gMasterDisp, SETUPDL_64); } -void func_effect_80083C70(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 arg7, +void func_effect_80083C70(Effect399* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 arg7, s32 arg8) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_399; - effect->obj.pos.x = xPos; - effect->unk_60.x = xPos; - effect->unk_60.y = yPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_399; + this->obj.pos.x = xPos; + this->unk_60.x = xPos; + this->unk_60.y = yPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->vel.x = xVel; - effect->vel.y = yVel; - effect->vel.z = zVel; + this->vel.x = xVel; + this->vel.y = yVel; + this->vel.z = zVel; - effect->unk_60.z = arg7; - effect->scale2 = 1.6f; - effect->scale1 = 0.0f; - effect->timer_50 = 100; - effect->unk_44 = arg8; - Object_SetInfo(&effect->info, effect->obj.id); + this->unk_60.z = arg7; + this->scale2 = 1.6f; + this->scale1 = 0.0f; + this->timer_50 = 100; + this->unk_44 = arg8; + Object_SetInfo(&this->info, this->obj.id); } void func_effect_80083D2C(f32 xPos, f32 yPos, f32 zPos, f32 srcZ) { @@ -4138,46 +4142,46 @@ void func_effect_80083D2C(f32 xPos, f32 yPos, f32 zPos, f32 srcZ) { } } -void func_effect_80083FA8(Effect* effect) { +void Effect_Effect399_Update(Effect399* this) { Vec3f src; Vec3f dest; - if (effect->timer_50 == 0) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->timer_50 == 0) { + Object_Kill(&this->obj, this->sfxSource); return; } - effect->obj.rot.y = RAD_TO_DEG(-gPlayer[0].camYaw); - effect->obj.rot.x = RAD_TO_DEG(gPlayer[0].camPitch); - effect->obj.rot.z += 20.0f; + this->obj.rot.y = RAD_TO_DEG(-gPlayer[0].camYaw); + this->obj.rot.x = RAD_TO_DEG(gPlayer[0].camPitch); + this->obj.rot.z += 20.0f; - Matrix_RotateZ(gCalcMatrix, effect->unk_60.z * M_DTOR, MTXF_NEW); - Matrix_RotateZ(gCalcMatrix, effect->unk_46 * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, this->unk_60.z * M_DTOR, MTXF_NEW); + Matrix_RotateZ(gCalcMatrix, this->unk_46 * M_DTOR, MTXF_APPLY); src.x = 0.0f; - src.y = effect->scale1; + src.y = this->scale1; src.z = 0.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - effect->unk_60.x += effect->vel.x; - effect->unk_60.y += effect->vel.y; + this->unk_60.x += this->vel.x; + this->unk_60.y += this->vel.y; - effect->obj.pos.x = effect->unk_60.x + dest.x; - effect->obj.pos.y = effect->unk_60.y + dest.y; + this->obj.pos.x = this->unk_60.x + dest.x; + this->obj.pos.y = this->unk_60.y + dest.y; - effect->unk_48 += 2; - if (effect->unk_48 > 20) { - effect->unk_48 = 20; + this->unk_48 += 2; + if (this->unk_48 > 20) { + this->unk_48 = 20; } - effect->unk_46 += effect->unk_48; + this->unk_46 += this->unk_48; - Math_SmoothStepToF(&effect->scale1, 350.0f, 1.0f, 20.0f, 0.00001f); + Math_SmoothStepToF(&this->scale1, 350.0f, 1.0f, 20.0f, 0.00001f); - if ((effect->scale1 >= 349.0f) && (effect->timer_50 > 50)) { - effect->timer_50 = 50; + if ((this->scale1 >= 349.0f) && (this->timer_50 > 50)) { + this->timer_50 = 50; } - func_effect_8007A774(gPlayer, effect, 100.0f); + func_effect_8007A774(gPlayer, this, 100.0f); } // RGB Values. Used like an array of [8][3], but only matches this way. @@ -4186,21 +4190,21 @@ static s32 D_800D18F0[] = { 32, 32, 255, 0, 255, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, // Alpha values static s32 D_800D1950[] = { 255, 210, 180, 120, 70, 30, 0, 0 }; -void func_effect_80084194(Effect* effect) { +void Effect_Effect399_Draw(Effect399* this) { s32 tmp; if (gCurrentLevel != LEVEL_AQUAS) { RCP_SetupDL(&gMasterDisp, SETUPDL_49); - Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->scale2, this->scale2, this->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - tmp = effect->unk_44 * 4; + tmp = this->unk_44 * 4; gDPSetEnvColor(gMasterDisp++, D_800D18F0[tmp + 0], D_800D18F0[tmp + 1], D_800D18F0[tmp + 2], 255); } else { RCP_SetupDL(&gMasterDisp, SETUPDL_49); - Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->scale2, this->scale2, this->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, D_800D1950[effect->unk_44]); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, D_800D1950[this->unk_44]); gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 255); } gSPDisplayList(gMasterDisp++, D_1024AC0); diff --git a/src/engine/fox_enmy.c b/src/engine/fox_enmy.c index 6dccb46b..8273a1bf 100644 --- a/src/engine/fox_enmy.c +++ b/src/engine/fox_enmy.c @@ -24,12 +24,15 @@ s32 gLastPathChange; u8 gMissedZoSearchlight; ObjectInit* gLevelObjectInits[] = { - D_CO_60371A4, D_ME_6026CC4, D_SX_602A164, D_A6_6023F64, D_A6_60287A4, D_SY_602E4F4, D_VE1_6007E74, - D_SO_601F234, D_ZO_6026714, D_ANDROSS_C035154, D_TR_6006AA4, D_MA_6031000, D_TI_6006C60, D_AQ_602E5C8, - D_FO_600EAD4, NULL, D_KA_6011044, D_BO_600FF74, D_SZ_6006EB4, D_VE2_6014D94, D_versus_302DE3C, + aCoOnRailsLevelObjects, D_ME_6026CC4, D_SX_602A164, D_A6_6023F64, + D_A6_60287A4, D_SY_602E4F4, D_VE1_6007E74, D_SO_601F234, + D_ZO_6026714, D_ANDROSS_C035154, D_TR_6006AA4, D_MA_6031000, + D_TI_6006C60, D_AQ_602E5C8, D_FO_600EAD4, NULL, + D_KA_6011044, D_BO_600FF74, D_SZ_6006EB4, D_VE2_6014D94, + D_versus_302DE3C, }; static s32 D_enmy_800CFDF4[] = { - /* 0 */ OBJ_SCENERY_0, + /* 0 */ OBJ_SCENERY_CO_STONE_ARCH, /* 1 */ OBJ_ITEM_SILVER_RING, /* 2 */ OBJ_ITEM_SILVER_RING, /* 3 */ OBJ_ITEM_SILVER_RING, @@ -53,7 +56,7 @@ static s32 D_enmy_800CFDF4[] = { /* 21 */ OBJ_ITEM_SILVER_RING, /* 22 */ OBJ_ITEM_SILVER_RING, /* 23 */ OBJ_ITEM_WING_REPAIR, - /* 24 */ OBJ_SCENERY_0, + /* 24 */ OBJ_SCENERY_CO_STONE_ARCH, /* 25 */ OBJ_ITEM_SILVER_STAR, }; static f32 D_enmy_800CFE5C[] = { @@ -92,41 +95,48 @@ void Object_Kill(Object* obj, f32* sfxSrc) { } bool func_enmy_80060FE4(Vec3f* arg0, f32 arg1) { - Vec3f sp2C; - Vec3f sp20; + Vec3f src; + Vec3f dest; if ((gLevelMode != LEVELMODE_ALL_RANGE) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) { return true; } - Matrix_RotateY(gCalcMatrix, gPlayer[gPlayerNum].camYaw, MTXF_NEW); - sp2C.x = arg0->x - gPlayer[gPlayerNum].cam.eye.x; - sp2C.y = 0.0f; - sp2C.z = arg0->z - gPlayer[gPlayerNum].cam.eye.z; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp2C, &sp20); - if ((sp20.z < 1000.0f) && (arg1 < sp20.z) && (fabsf(sp20.x) < (fabsf(sp20.z * 0.5f) + 2000.0f))) { + Matrix_RotateY(gCalcMatrix, gPlayer[gPlayerNum].camYaw, MTXF_NEW); + + src.x = arg0->x - gPlayer[gPlayerNum].cam.eye.x; + src.y = 0.0f; + src.z = arg0->z - gPlayer[gPlayerNum].cam.eye.z; + + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + + if ((dest.z < 1000.0f) && (arg1 < dest.z) && (fabsf(dest.x) < (fabsf(dest.z * 0.5f) + 2000.0f))) { return true; } return false; } bool func_enmy_80061148(Vec3f* arg0, f32 arg1) { - Vec3f sp2C; - Vec3f sp20; + Vec3f src; + Vec3f dest; if (gLevelMode != LEVELMODE_ALL_RANGE) { return true; } + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) { return func_enmy_80060FE4(arg0, arg1); } - Matrix_RotateY(gCalcMatrix, gPlayer[gPlayerNum].camYaw, MTXF_NEW); - sp2C.x = arg0->x - gPlayer[gPlayerNum].cam.eye.x; - sp2C.y = 0.0f; - sp2C.z = arg0->z - gPlayer[gPlayerNum].cam.eye.z; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp2C, &sp20); - if ((sp20.z < 0.0f) && (arg1 < sp20.z) && (fabsf(sp20.x) < (fabsf(sp20.z * 0.5f) + 500.0f))) { + Matrix_RotateY(gCalcMatrix, gPlayer[gPlayerNum].camYaw, MTXF_NEW); + + src.x = arg0->x - gPlayer[gPlayerNum].cam.eye.x; + src.y = 0.0f; + src.z = arg0->z - gPlayer[gPlayerNum].cam.eye.z; + + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + + if ((dest.z < 0.0f) && (arg1 < dest.z) && (fabsf(dest.x) < (fabsf(dest.z * 0.5f) + 500.0f))) { return true; } return false; @@ -140,152 +150,156 @@ void Object_SetInfo(ObjectInfo* info, u32 objId) { } } -void Scenery_Initialize(Scenery* scenery) { +void Scenery_Initialize(Scenery* this) { s32 i; - u8* ptr = (u8*) scenery; + u8* ptr = (u8*) this; for (i = 0; i < sizeof(Scenery); i++, ptr++) { *ptr = 0; } } -void Sprite_Initialize(Sprite* sprite) { +void Sprite_Initialize(Sprite* this) { s32 i; - u8* ptr = (u8*) sprite; + u8* ptr = (u8*) this; for (i = 0; i < sizeof(Sprite); i++, ptr++) { *ptr = 0; } } -void Actor_Initialize(Actor* actor) { +void Actor_Initialize(Actor* this) { s32 i; - u8* ptr = (u8*) actor; + u8* ptr = (u8*) this; for (i = 0; i < sizeof(Actor); i++, ptr++) { *ptr = 0; } - actor->scale = 1.0f; + this->scale = 1.0f; } -void Boss_Initialize(Boss* boss) { +void Boss_Initialize(Boss* this) { s32 i; - u8* ptr = (u8*) boss; + u8* ptr = (u8*) this; for (i = 0; i < sizeof(Boss); i++, ptr++) { *ptr = 0; } - boss->scale = 1.0f; + this->scale = 1.0f; } -void Item_Initialize(Item* item) { +void Item_Initialize(Item* this) { s32 i; - u8* ptr = (u8*) item; + u8* ptr = (u8*) this; for (i = 0; i < sizeof(Item); i++, ptr++) { *ptr = 0; } } -void Effect_Initialize(Effect* effect) { +void Effect_Initialize(Effect* this) { s32 i; - u8* ptr = (u8*) effect; + u8* ptr = (u8*) this; for (i = 0; i < sizeof(Effect); i++, ptr++) { *ptr = 0; } - effect->scale2 = 1.0f; + this->scale2 = 1.0f; } -void Scenery_Load(Scenery* scenery, ObjectInit* objInit) { - Scenery_Initialize(scenery); - scenery->obj.status = OBJ_INIT; - scenery->obj.pos.z = -objInit->zPos1; - scenery->obj.pos.z += -3000.0f + objInit->zPos2; - scenery->obj.pos.x = objInit->xPos; - scenery->obj.pos.y = objInit->yPos; - scenery->obj.rot.x = objInit->rot.x; - scenery->obj.rot.y = objInit->rot.y; - scenery->obj.rot.z = objInit->rot.z; - scenery->obj.id = objInit->id; - Object_SetInfo(&scenery->info, scenery->obj.id); +void Scenery_Load(Scenery* this, ObjectInit* objInit) { + Scenery_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.pos.z = -objInit->zPos1; + this->obj.pos.z += -3000.0f + objInit->zPos2; + this->obj.pos.x = objInit->xPos; + this->obj.pos.y = objInit->yPos; + this->obj.rot.x = objInit->rot.x; + this->obj.rot.y = objInit->rot.y; + this->obj.rot.z = objInit->rot.z; + this->obj.id = objInit->id; + Object_SetInfo(&this->info, this->obj.id); } -void Sprite_Load(Sprite* sprite, ObjectInit* objInit) { - Sprite_Initialize(sprite); - sprite->obj.status = OBJ_INIT; - sprite->obj.pos.z = -objInit->zPos1; - sprite->obj.pos.z += -3000.0f + objInit->zPos2; - sprite->obj.pos.x = objInit->xPos; - sprite->obj.pos.y = objInit->yPos; - sprite->obj.rot.y = objInit->rot.y; - sprite->obj.rot.x = objInit->rot.x; - sprite->obj.rot.z = objInit->rot.z; - sprite->obj.id = objInit->id; - Object_SetInfo(&sprite->info, sprite->obj.id); +void Sprite_Load(Sprite* this, ObjectInit* objInit) { + Sprite_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.pos.z = -objInit->zPos1; + this->obj.pos.z += -3000.0f + objInit->zPos2; + this->obj.pos.x = objInit->xPos; + this->obj.pos.y = objInit->yPos; + this->obj.rot.y = objInit->rot.y; + this->obj.rot.x = objInit->rot.x; + this->obj.rot.z = objInit->rot.z; + this->obj.id = objInit->id; + Object_SetInfo(&this->info, this->obj.id); } -void Actor_Load(Actor* actor, ObjectInit* objInit) { - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.pos.z = -objInit->zPos1; - actor->obj.pos.z += -3000.0f + objInit->zPos2; - actor->obj.pos.x = objInit->xPos; - actor->obj.pos.y = objInit->yPos; - actor->obj.rot.y = objInit->rot.y; - actor->obj.rot.x = objInit->rot.x; - actor->obj.rot.z = objInit->rot.z; - actor->obj.id = objInit->id; - Object_SetInfo(&actor->info, actor->obj.id); +void Actor_Load(Actor* this, ObjectInit* objInit) { + Actor_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.pos.z = -objInit->zPos1; + this->obj.pos.z += -3000.0f + objInit->zPos2; + this->obj.pos.x = objInit->xPos; + this->obj.pos.y = objInit->yPos; + this->obj.rot.y = objInit->rot.y; + this->obj.rot.x = objInit->rot.x; + this->obj.rot.z = objInit->rot.z; + this->obj.id = objInit->id; + Object_SetInfo(&this->info, this->obj.id); } -void Boss_Load(Boss* boss, ObjectInit* objInit) { - Boss_Initialize(boss); - boss->obj.status = OBJ_INIT; - boss->obj.pos.z = -objInit->zPos1; - boss->obj.pos.z += -3000.0f + objInit->zPos2; - boss->obj.pos.x = objInit->xPos; - boss->obj.pos.y = objInit->yPos; - boss->obj.rot.y = objInit->rot.y; - boss->obj.rot.x = objInit->rot.x; - boss->obj.rot.z = objInit->rot.z; - boss->obj.id = objInit->id; - Object_SetInfo(&boss->info, boss->obj.id); +void Boss_Load(Boss* this, ObjectInit* objInit) { + Boss_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.pos.z = -objInit->zPos1; + this->obj.pos.z += -3000.0f + objInit->zPos2; + this->obj.pos.x = objInit->xPos; + this->obj.pos.y = objInit->yPos; + this->obj.rot.y = objInit->rot.y; + this->obj.rot.x = objInit->rot.x; + this->obj.rot.z = objInit->rot.z; + this->obj.id = objInit->id; + Object_SetInfo(&this->info, this->obj.id); } -void Item_Load(Item* item, ObjectInit* objInit) { - Item_Initialize(item); - item->obj.status = OBJ_INIT; - item->obj.pos.z = -objInit->zPos1; - item->obj.pos.z += -3000.0f + objInit->zPos2; - item->obj.pos.x = objInit->xPos; - item->obj.pos.y = objInit->yPos; - item->obj.rot.y = objInit->rot.y; - item->obj.rot.x = objInit->rot.x; - item->obj.rot.z = objInit->rot.z; - item->obj.id = objInit->id; - item->width = 1.0f; - Object_SetInfo(&item->info, item->obj.id); +void Item_Load(Item* this, ObjectInit* objInit) { + Item_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.pos.z = -objInit->zPos1; + this->obj.pos.z += -3000.0f + objInit->zPos2; + this->obj.pos.x = objInit->xPos; + this->obj.pos.y = objInit->yPos; + this->obj.rot.y = objInit->rot.y; + this->obj.rot.x = objInit->rot.x; + this->obj.rot.z = objInit->rot.z; + this->obj.id = objInit->id; + this->width = 1.0f; + Object_SetInfo(&this->info, this->obj.id); } -void func_enmy_80061958(Effect* effect, f32 xPos, f32 yPos, f32 zPos) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_346; - effect->timer_50 = 50; - effect->scale2 = 0.2f; +void func_enmy_80061958(Effect346* this, f32 xPos, f32 yPos, f32 zPos) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_346; + this->timer_50 = 50; + this->scale2 = 0.2f; + if (gCurrentLevel == LEVEL_AQUAS) { - effect->timer_50 = 200; - effect->scale2 = 0.3f; - effect->scale1 = RAND_FLOAT(255.0f); + this->timer_50 = 200; + this->scale2 = 0.3f; + this->scale1 = RAND_FLOAT(255.0f); } - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; - effect->obj.rot.z = RAND_FLOAT(360.0f); - Object_SetInfo(&effect->info, effect->obj.id); + + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + this->obj.rot.z = RAND_FLOAT(360.0f); + + Object_SetInfo(&this->info, this->obj.id); + if (gLevelType == LEVELTYPE_PLANET) { - effect->info.cullDistance = 100.0f; + this->info.cullDistance = 100.0f; } } @@ -353,57 +367,57 @@ void func_enmy_80061CD0(void) { } } -void func_enmy_80061E48(Actor* actor, f32 xPos, f32 yPos, f32 zPos) { - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_181; +void func_enmy_80061E48(Actor* this, f32 xPos, f32 yPos, f32 zPos) { + Actor_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_ACTOR_181; if (Rand_ZeroOne() < 0.5f) { - actor->obj.id = OBJ_ACTOR_186; + this->obj.id = OBJ_ACTOR_186; } if (Rand_ZeroOne() < 0.5f) { - actor->obj.id = OBJ_ACTOR_182; + this->obj.id = OBJ_ACTOR_182; } - actor->obj.pos.x = xPos; - actor->obj.pos.y = yPos; - actor->obj.pos.z = zPos; - actor->vel.z = 10.0f; - Object_SetInfo(&actor->info, actor->obj.id); + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + this->vel.z = 10.0f; + Object_SetInfo(&this->info, this->obj.id); } -void ActorEvent_Load(Actor* actor, ObjectInit* objInit, s32 index) { - Vec3f sp24; +void ActorEvent_Load(ActorEvent* this, ObjectInit* objInit, s32 index) { + Vec3f src; - Actor_Initialize(actor); - actor->obj.status = OBJ_ACTIVE; - actor->index = index; - actor->obj.pos.z = -objInit->zPos1; - actor->obj.pos.z += -3000.0f + objInit->zPos2; - actor->obj.pos.x = objInit->xPos; - actor->obj.pos.y = objInit->yPos; - actor->obj.rot.y = actor->rot_0F4.y = objInit->rot.y; - actor->obj.rot.x = actor->rot_0F4.x = objInit->rot.x; - actor->rot_0F4.z = objInit->rot.z; - actor->obj.id = OBJ_ACTOR_EVENT; - actor->timer_0C2 = 10; - actor->eventType = EVID_FFF; - actor->aiType = objInit->id - ACTOR_EVENT_ID; + Actor_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->index = index; + this->obj.pos.z = -objInit->zPos1; + this->obj.pos.z += -3000.0f + objInit->zPos2; + this->obj.pos.x = objInit->xPos; + this->obj.pos.y = objInit->yPos; + this->obj.rot.y = this->rot_0F4.y = objInit->rot.y; + this->obj.rot.x = this->rot_0F4.x = objInit->rot.x; + this->rot_0F4.z = objInit->rot.z; + this->obj.id = OBJ_ACTOR_EVENT; + this->timer_0C2 = 10; + this->eventType = EVID_FFF; + this->aiType = objInit->id - ACTOR_EVENT_ID; - Object_SetInfo(&actor->info, actor->obj.id); - actor->info.cullDistance = 3000.0f; - actor->fwork[25] = 20000.0f; - actor->iwork[1] = gPrevEventActorIndex; - actor->iwork[10] = gActors[gPrevEventActorIndex].aiType; - actor->fwork[22] = gArwingSpeed; + Object_SetInfo(&this->info, this->obj.id); + this->info.cullDistance = 3000.0f; + this->fwork[25] = 20000.0f; + this->iwork[1] = gPrevEventActorIndex; + this->iwork[10] = gActors[gPrevEventActorIndex].aiType; + this->fwork[22] = gArwingSpeed; Matrix_RotateZ(gCalcMatrix, -gFormationInitRot.z * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -gFormationInitRot.x * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, -gFormationInitRot.y * M_DTOR, MTXF_APPLY); - sp24.x = actor->obj.pos.x - gFormationInitPos.x; - sp24.y = actor->obj.pos.y - gFormationInitPos.y; - sp24.z = actor->obj.pos.z - gFormationInitPos.z; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp24, &actor->vwork[28]); - actor->iwork[9] = gFormationLeaderIndex; + src.x = this->obj.pos.x - gFormationInitPos.x; + src.y = this->obj.pos.y - gFormationInitPos.y; + src.z = this->obj.pos.z - gFormationInitPos.z; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &this->vwork[28]); + this->iwork[9] = gFormationLeaderIndex; gPrevEventActorIndex = index; - Actor_Update(actor); + Actor_Update(this); } void Object_Load(ObjectInit* objInit, f32 xMax, f32 xMin, f32 yMax, f32 yMin) { @@ -505,14 +519,15 @@ void Object_Load(ObjectInit* objInit, f32 xMax, f32 xMin, f32 yMax, f32 yMin) { void func_enmy_80062568(void) { ObjectInit* objInit; - s32 var_s0; + s32 i; s32 temp = gCurrentLevel; // seems fake + if (1) {} gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[temp]); - var_s0 = gSavedObjectLoadIndex - 40; - objInit = &gLevelObjects[var_s0]; + i = gSavedObjectLoadIndex - 40; + objInit = &gLevelObjects[i]; - for (; var_s0 < gSavedObjectLoadIndex; var_s0++, objInit++) { + for (; i < gSavedObjectLoadIndex; i++, objInit++) { Object_Load(objInit, 4000.0f, -4000.0f, 4000.0f, -4000.0f); } } @@ -748,8 +763,8 @@ bool Object_CheckPolyCollision(Vec3f* pos, Vec3f* vel, ObjectId objId, Object* o objPos.y = obj->pos.y; objPos.z = obj->pos.z; if ((objId == OBJ_ACTOR_180) || (objId == OBJ_SCENERY_149) || (objId == OBJ_SCENERY_150) || - (objId == OBJ_BOSS_FO) || (objId == OBJ_BOSS_SZ) || (objId == OBJ_BOSS_VE2) || (objId == OBJ_BOSS_309) || - (objId == OBJ_SCENERY_ME_TUNNEL)) { + (objId == OBJ_BOSS_FO) || (objId == OBJ_BOSS_SZ_GREAT_FOX) || (objId == OBJ_BOSS_VE2) || + (objId == OBJ_BOSS_309) || (objId == OBJ_SCENERY_ME_TUNNEL)) { colId = COL1_0; if (objId == OBJ_BOSS_VE2) { colId = COL1_9; @@ -764,7 +779,7 @@ bool Object_CheckPolyCollision(Vec3f* pos, Vec3f* vel, ObjectId objId, Object* o colId = COL1_5; } else if (objId == OBJ_SCENERY_150) { colId = COL1_6; - } else if (objId == OBJ_BOSS_SZ) { + } else if (objId == OBJ_BOSS_SZ_GREAT_FOX) { colId = COL1_8; } if (func_col1_800998FC(&relPos, &objPos, vel, colId, &sp44, sp30) > 0) { @@ -772,10 +787,10 @@ bool Object_CheckPolyCollision(Vec3f* pos, Vec3f* vel, ObjectId objId, Object* o } } else { colId = COL2_0; - if (objId == OBJ_SCENERY_2) { + if (objId == OBJ_SCENERY_CO_BUMP_2) { colId = COL2_2; } - if (objId == OBJ_SCENERY_3) { + if (objId == OBJ_SCENERY_CO_BUMP_3) { colId = COL2_3; } if (objId == OBJ_SCENERY_140) { @@ -786,7 +801,7 @@ bool Object_CheckPolyCollision(Vec3f* pos, Vec3f* vel, ObjectId objId, Object* o } if (objId == OBJ_SCENERY_117) { colId = COL2_14; - } else if ((objId == OBJ_SCENERY_4) || (objId == OBJ_SCENERY_5)) { + } else if ((objId == OBJ_SCENERY_CO_BUMP_4) || (objId == OBJ_SCENERY_CO_BUMP_5)) { colId = COL2_1; } if (func_col2_800A3690(&relPos, &objPos, colId, &sp44)) { @@ -810,7 +825,7 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) { scenery360 = gScenery360; for (i = 0; i < 200; i++, scenery360++) { if (scenery360->obj.status == OBJ_ACTIVE) { - if ((scenery360->obj.id == OBJ_SCENERY_1) || (scenery360->obj.id == OBJ_SCENERY_3) || + if ((scenery360->obj.id == OBJ_SCENERY_CO_BUMP_1) || (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_3) || (scenery360->obj.id == OBJ_SCENERY_117) || (scenery360->obj.id == OBJ_SCENERY_141) || (scenery360->obj.id == OBJ_SCENERY_150) || (scenery360->obj.id == OBJ_SCENERY_149) || (scenery360->obj.id == OBJ_SCENERY_148) || (scenery360->obj.id == OBJ_SCENERY_140)) { @@ -826,12 +841,13 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) { } } } - scenery = gScenery; + + scenery = &gScenery[0]; for (i = 0; (i < ARRAY_COUNT(gScenery)) && (gLevelMode == LEVELMODE_ON_RAILS); i++, scenery++) { if (scenery->obj.status == OBJ_ACTIVE) { - if ((scenery->obj.id == OBJ_SCENERY_1) || (scenery->obj.id == OBJ_SCENERY_4) || - (scenery->obj.id == OBJ_SCENERY_5) || (scenery->obj.id == OBJ_SCENERY_2) || - (scenery->obj.id == OBJ_SCENERY_ME_TUNNEL) || (scenery->obj.id == OBJ_SCENERY_3)) { + if ((scenery->obj.id == OBJ_SCENERY_CO_BUMP_1) || (scenery->obj.id == OBJ_SCENERY_CO_BUMP_4) || + (scenery->obj.id == OBJ_SCENERY_CO_BUMP_5) || (scenery->obj.id == OBJ_SCENERY_CO_BUMP_2) || + (scenery->obj.id == OBJ_SCENERY_ME_TUNNEL) || (scenery->obj.id == OBJ_SCENERY_CO_BUMP_3)) { if (Object_CheckPolyCollision(pos, vel, scenery->obj.id, &scenery->obj)) { return 2; } @@ -843,7 +859,8 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) { } } } - sprite = gSprites; + + sprite = &gSprites[0]; for (i = 0; i < ARRAY_COUNT(gSprites); i++, sprite++) { if ((sprite->obj.status == OBJ_ACTIVE) && (fabsf(pos->x - sprite->obj.pos.x) < 500.0f) && (fabsf(pos->z - sprite->obj.pos.z) < 500.0f) && @@ -855,13 +872,14 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) { return 0; } } + if ((mode == 0) || (mode == 2) || (mode == 3)) { if (mode != 2) { - boss = gBosses; + boss = &gBosses[0]; for (i = 0; i < ARRAY_COUNT(gBosses); i++, boss++) { if (boss->obj.status == OBJ_ACTIVE) { if ((boss->obj.id == OBJ_BOSS_FO) || (boss->obj.id == OBJ_BOSS_VE2) || - (boss->obj.id == OBJ_BOSS_SZ) || (boss->obj.id == OBJ_BOSS_309)) { + (boss->obj.id == OBJ_BOSS_SZ_GREAT_FOX) || (boss->obj.id == OBJ_BOSS_309)) { if (Object_CheckPolyCollision(pos, vel, boss->obj.id, &boss->obj)) { return 2; } @@ -892,7 +910,8 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) { } } } - actor = gActors; + + actor = &gActors[0]; for (i = 0; i < ARRAY_COUNT(gActors); i++, actor++) { if ((actor->obj.status >= OBJ_ACTIVE) && (fabsf(pos->x - actor->obj.pos.x) < 1000.0f) && (fabsf(pos->z - actor->obj.pos.z) < 1500.0f) && (index != i) && (actor->info.unk_16 != 2) && @@ -919,7 +938,7 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) { actor->dmgPart = -1; if (!(((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->iwork[12] != 0)) || ((actor->obj.id == OBJ_ACTOR_ALLRANGE) && - ((actor->aiType < AI360_10) || (actor->aiType >= AI360_GREAT_FOX))))) { + ((actor->aiType < AI360_ENEMY) || (actor->aiType >= AI360_GREAT_FOX))))) { actor->health = 0; } actor->hitPos.x = pos->x; @@ -934,7 +953,7 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) { return 0; } -void func_enmy_80063CAC(Scenery* scenery) { +void func_enmy_80063CAC(Scenery* this) { s32 i; for (i = 0; i < ARRAY_COUNT(gActors); i++) { @@ -942,9 +961,9 @@ void func_enmy_80063CAC(Scenery* scenery) { Actor_Initialize(&gActors[i]); gActors[i].obj.status = OBJ_INIT; gActors[i].obj.id = OBJ_ACTOR_193; - gActors[i].obj.pos.x = scenery->obj.pos.x; - gActors[i].obj.pos.y = scenery->obj.pos.y; - gActors[i].obj.pos.z = scenery->obj.pos.z; + gActors[i].obj.pos.x = this->obj.pos.x; + gActors[i].obj.pos.y = this->obj.pos.y; + gActors[i].obj.pos.z = this->obj.pos.z; gActors[i].obj.rot.y = RAND_FLOAT(360.0f); Object_SetInfo(&gActors[i].info, gActors[i].obj.id); break; @@ -952,34 +971,37 @@ void func_enmy_80063CAC(Scenery* scenery) { } } -void func_enmy_80063D58(Scenery* scenery) { +void func_enmy_80063D58(CoDoors* this) { s32 i; - scenery->obj.pos.y = gGroundHeight; + this->obj.pos.y = gGroundHeight; + for (i = 0; i < ARRAY_COUNT(gSprites); i++) { if (gSprites[i].obj.status == OBJ_FREE) { Sprite_Initialize(&gSprites[i]); gSprites[i].obj.status = OBJ_INIT; gSprites[i].obj.id = OBJ_SPRITE_FOG_SHADOW; - gSprites[i].sceneryId = scenery->obj.id; - gSprites[i].obj.pos.x = scenery->obj.pos.x; + gSprites[i].sceneryId = this->obj.id; + gSprites[i].obj.pos.x = this->obj.pos.x; gSprites[i].obj.pos.y = 5.0f; - gSprites[i].obj.pos.z = scenery->obj.pos.z; - if ((scenery->obj.id == OBJ_SCENERY_0) || (scenery->obj.id == OBJ_SCENERY_6) || - (scenery->obj.id == OBJ_SCENERY_7) || (scenery->obj.id == OBJ_SCENERY_56) || - (scenery->obj.id == OBJ_SCENERY_20) || (scenery->obj.id == OBJ_SCENERY_21) || - (scenery->obj.id == OBJ_SCENERY_22)) { - gSprites[i].obj.rot.y = scenery->obj.rot.y; + gSprites[i].obj.pos.z = this->obj.pos.z; + + if ((this->obj.id == OBJ_SCENERY_CO_STONE_ARCH) || (this->obj.id == OBJ_SCENERY_CO_HIGHWAY_1) || + (this->obj.id == OBJ_SCENERY_CO_HIGHWAY_2) || (this->obj.id == OBJ_SCENERY_CO_DOORS) || + (this->obj.id == OBJ_SCENERY_CO_ARCH_1) || (this->obj.id == OBJ_SCENERY_CO_ARCH_2) || + (this->obj.id == OBJ_SCENERY_CO_ARCH_3)) { + gSprites[i].obj.rot.y = this->obj.rot.y; } else { gSprites[i].obj.rot.y = 44.9f; } + Object_SetInfo(&gSprites[i].info, gSprites[i].obj.id); break; } } } -void func_enmy_80063E5C(Scenery* scenery, f32* hitboxData) { +void func_enmy_80063E5C(Scenery* this, f32* hitboxData) { s32 i; Item* item; @@ -988,10 +1010,10 @@ void func_enmy_80063E5C(Scenery* scenery, f32* hitboxData) { Item_Initialize(&gItems[i]); item->obj.status = OBJ_INIT; item->obj.id = OBJ_ITEM_RING_CHECK; - item->obj.pos.x = scenery->obj.pos.x; - item->obj.pos.y = scenery->obj.pos.y; - item->obj.pos.z = scenery->obj.pos.z; - item->obj.rot.y = scenery->obj.rot.y; + item->obj.pos.x = this->obj.pos.x; + item->obj.pos.y = this->obj.pos.y; + item->obj.pos.z = this->obj.pos.z; + item->obj.rot.y = this->obj.rot.y; Object_SetInfo(&item->info, item->obj.id); item->info.hitbox = SEGMENTED_TO_VIRTUAL(hitboxData); break; @@ -1020,12 +1042,12 @@ void Object_Init(s32 index, ObjectId objId) { switch (objId) { case OBJ_SPRITE_CO_SMOKE: - func_effect_8007A6F0(&gSprites[index].obj.pos, NA_SE_OB_SMOKE); + Effect_SpawnTimedSfxAtPos(&gSprites[index].obj.pos, NA_SE_OB_SMOKE); break; case OBJ_ACTOR_234: AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, gActors[index].sfxSource, 0); break; - case OBJ_SCENERY_54: + case OBJ_SCENERY_CO_WATERFALL: AUDIO_PLAY_SFX(NA_SE_FALL, gScenery[index].sfxSource, 0); break; case OBJ_ACTOR_TEAM_BOSS: @@ -1075,7 +1097,7 @@ void Object_Init(s32 index, ObjectId objId) { case OBJ_SCENERY_TI_RIB_8: func_enmy_80063E5C(&gScenery[index], D_TI_6006A20); break; - case OBJ_SCENERY_23: + case OBJ_SCENERY_CO_RADAR: func_enmy_80063CAC(&gScenery[index]); break; case OBJ_ITEM_CHECKPOINT: @@ -1105,15 +1127,15 @@ void Object_Init(s32 index, ObjectId objId) { gItems[index].obj.status = OBJ_FREE; } break; - case OBJ_SCENERY_0: + case OBJ_SCENERY_CO_STONE_ARCH: func_enmy_80063E5C(&gScenery[index], gItemRingCheckHitbox); /* fallthrough */ - case OBJ_SCENERY_6: - case OBJ_SCENERY_7: - case OBJ_SCENERY_20: - case OBJ_SCENERY_21: - case OBJ_SCENERY_22: - case OBJ_SCENERY_56: + case OBJ_SCENERY_CO_HIGHWAY_1: + case OBJ_SCENERY_CO_HIGHWAY_2: + case OBJ_SCENERY_CO_ARCH_1: + case OBJ_SCENERY_CO_ARCH_2: + case OBJ_SCENERY_CO_ARCH_3: + case OBJ_SCENERY_CO_DOORS: func_enmy_80063D58(&gScenery[index]); break; case OBJ_ACTOR_187: @@ -1179,8 +1201,8 @@ void Object_Init(s32 index, ObjectId objId) { gActors[index].obj.status = OBJ_FREE; } break; - case OBJ_ACTOR_190: - case OBJ_ACTOR_191: + case OBJ_MISSILE_SEEK_TEAM: + case OBJ_MISSILE_SEEK_PLAYER: AUDIO_PLAY_SFX(NA_SE_EN_MISSILE_ENGINE, gActors[index].sfxSource, 4); break; case OBJ_ACTOR_192: @@ -1227,11 +1249,11 @@ void Object_Init(s32 index, ObjectId objId) { case OBJ_SCENERY_65: Macbeth_801A65E0(&gScenery[index]); break; - case OBJ_ACTOR_177: - case OBJ_ACTOR_178: - Corneria_8018B0B4(&gActors[index]); + case OBJ_ACTOR_CO_GARUDA_2: + case OBJ_ACTOR_CO_GARUDA_3: + Corneria_IBeam_Init(&gActors[index]); /* fallthrough */ - case OBJ_ACTOR_176: + case OBJ_ACTOR_CO_GARUDA_1: gActors[index].health = 24; AUDIO_PLAY_SFX(NA_SE_EN_TANK_RB_ENGINE, gActors[index].sfxSource, 4); break; @@ -1244,11 +1266,11 @@ void Object_Init(s32 index, ObjectId objId) { case OBJ_BOSS_300: Boss300_Init(&gBosses[index]); break; - case OBJ_BOSS_292: - Corneria_Boss292_Init(&gBosses[index]); + case OBJ_BOSS_CO_GRANGA: + Corneria_Granga_Init(&gBosses[index]); break; - case OBJ_BOSS_293: - Corneria_Boss293_Init(&gBosses[index]); + case OBJ_BOSS_CO_CARRIER: + Corneria_Carrier_Init(&gBosses[index]); break; case OBJ_BOSS_A6: Area6_BossA6_Init(&gBosses[index]); @@ -1344,37 +1366,37 @@ void Object_Init(s32 index, ObjectId objId) { } } -void Scenery_UpdateTitaniaBones(Scenery* scenery) { +void Scenery_UpdateTitaniaBones(Scenery* this) { f32 sp2C; f32 sp28; f32 sp24; - if ((gGroundType == 4) && (scenery->state == 0)) { - Ground_801B6E20(scenery->obj.pos.x, scenery->obj.pos.z + gPathProgress, &sp2C, &sp24, &sp28); - scenery->obj.pos.y = sp24 + 3.0f; - scenery->obj.rot.x = RAD_TO_DEG(sp2C); - scenery->obj.rot.z = RAD_TO_DEG(sp28); - scenery->state++; + if ((gGroundType == 4) && (this->state == 0)) { + Ground_801B6E20(this->obj.pos.x, this->obj.pos.z + gPathProgress, &sp2C, &sp24, &sp28); + this->obj.pos.y = sp24 + 3.0f; + this->obj.rot.x = RAD_TO_DEG(sp2C); + this->obj.rot.z = RAD_TO_DEG(sp28); + this->state++; } } -void func_enmy_80065380(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 arg4, f32 arg5, f32 arg6) { - Actor_Initialize(actor); - actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_182; - actor->timer_0BC = RAND_INT(10.0f) + 10; - actor->timer_0C2 = 30; - actor->vel.x = arg4; - actor->vel.y = arg5; - actor->vel.z = arg6; - actor->obj.pos.x = xPos; - actor->obj.pos.y = yPos; - actor->obj.pos.z = zPos; - actor->unk_046 = 255; - actor->unk_048 = 900; - actor->obj.rot.z = RAND_FLOAT(360.0f); - actor->obj.rot.y = RAND_FLOAT(360.0f); - Object_SetInfo(&actor->info, actor->obj.id); +void func_enmy_80065380(Actor182* this, f32 xPos, f32 yPos, f32 zPos, f32 arg4, f32 arg5, f32 arg6) { + Actor_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_ACTOR_182; + this->timer_0BC = RAND_INT(10.0f) + 10; + this->timer_0C2 = 30; + this->vel.x = arg4; + this->vel.y = arg5; + this->vel.z = arg6; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + this->unk_046 = 255; + this->unk_048 = 900; + this->obj.rot.z = RAND_FLOAT(360.0f); + this->obj.rot.y = RAND_FLOAT(360.0f); + Object_SetInfo(&this->info, this->obj.id); } void func_enmy_8006546C(f32 xPos, f32 yPos, f32 zPos, f32 arg3, f32 arg4, f32 arg5) { @@ -1400,20 +1422,20 @@ void func_enmy_800654E4(Object* obj) { } } -void func_enmy_800655C8(Actor* actor, f32 xPos, f32 yPos, f32 zPos, s32 arg4) { - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_190; - actor->obj.pos.x = xPos; - actor->obj.pos.y = yPos; - actor->obj.pos.z = zPos; - actor->eventType = arg4; - actor->timer_0BE = 50; - if (actor->eventType == 1) { - actor->timer_0BE = 30; +void func_enmy_800655C8(Actor190* this, f32 xPos, f32 yPos, f32 zPos, s32 arg4) { + Actor_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_MISSILE_SEEK_TEAM; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + this->eventType = arg4; + this->timer_0BE = 50; + if (this->eventType == 1) { + this->timer_0BE = 30; } - actor->fwork[5] = 15.0f; - Object_SetInfo(&actor->info, actor->obj.id); + this->fwork[5] = 15.0f; + Object_SetInfo(&this->info, this->obj.id); } void func_enmy_8006566C(f32 xPos, f32 yPos, f32 zPos, s32 arg3) { @@ -1427,7 +1449,8 @@ void func_enmy_8006566C(f32 xPos, f32 yPos, f32 zPos, s32 arg3) { } } -void func_enmy_800656D4(Actor* actor) { +// Actors 190 & 191 +void Actors190_191_Update(Actor* this) { s32 i; s32 j; f32 spD4; @@ -1449,12 +1472,13 @@ void func_enmy_800656D4(Actor* actor) { var_ra = (gLevelMode == LEVELMODE_ALL_RANGE) ? 2 : 0; - if (actor->iwork[2] == 0) { - if (actor->obj.id == OBJ_ACTOR_190) { + if (this->iwork[2] == 0) { + if (this->obj.id == OBJ_MISSILE_SEEK_TEAM) { for (i = 0; i < 3; i++) { spB4[i] = gTeamShields[i + 1]; spA8[i] = var_ra + i; } + for (i = 0; i < 3; i++) { for (j = i + 1; j < 3; j++) { if (spB4[i] < spB4[j]) { @@ -1467,6 +1491,7 @@ void func_enmy_800656D4(Actor* actor) { } } } + switch (gGameFrameCount % 6U) { case 0: case 1: @@ -1484,155 +1509,166 @@ void func_enmy_800656D4(Actor* actor) { if (gLevelMode == LEVELMODE_ALL_RANGE) { if (gTeamShields[spC4 - 1] > 0) { - actor->iwork[1] = spC4; + this->iwork[1] = spC4; goto label; } else { - actor->iwork[1] = 10000; + this->iwork[1] = 10000; } } else { if (gTeamShields[spC4 + 1] > 0) { - actor->iwork[1] = spC4; + this->iwork[1] = spC4; goto label; } else { - actor->iwork[1] = 10000; + this->iwork[1] = 10000; } } } - actor->iwork[1] = 10000; + this->iwork[1] = 10000; label: - actor->iwork[2] = 1; + this->iwork[2] = 1; } - spC4 = actor->iwork[1]; + + spC4 = this->iwork[1]; if ((spC4 == var_ra) || ((var_ra + 1) == spC4) || ((var_ra + 2) == spC4)) { - actor->fwork[29] = gActors[spC4].obj.pos.z; - actor->fwork[28] = gActors[spC4].obj.pos.y; - actor->fwork[27] = gActors[spC4].obj.pos.x; - if ((fabsf(actor->obj.pos.x - gActors[spC4].obj.pos.x) < 400.0f) && - (fabsf(actor->obj.pos.z - gActors[spC4].obj.pos.z) < 400.0f)) { + this->fwork[29] = gActors[spC4].obj.pos.z; + this->fwork[28] = gActors[spC4].obj.pos.y; + this->fwork[27] = gActors[spC4].obj.pos.x; + if ((fabsf(this->obj.pos.x - gActors[spC4].obj.pos.x) < 400.0f) && + (fabsf(this->obj.pos.z - gActors[spC4].obj.pos.z) < 400.0f)) { if (RAND_FLOAT(spC4 - 1) < 0.6f) { gActors[spC4].iwork[10] = 1; } } - } else { - actor->fwork[29] = gPlayer[0].trueZpos; - actor->fwork[28] = gPlayer[0].pos.y; - actor->fwork[27] = gPlayer[0].pos.x; + this->fwork[29] = gPlayer[0].trueZpos; + this->fwork[28] = gPlayer[0].pos.y; + this->fwork[27] = gPlayer[0].pos.x; } - if (actor->timer_0BC != 0) { - Math_SmoothStepToAngle(&actor->obj.rot.x, 0.0f, 0.3f, 4.0f, 0.001f); + + if (this->timer_0BC != 0) { + Math_SmoothStepToAngle(&this->obj.rot.x, 0.0f, 0.3f, 4.0f, 0.001f); } else { - if ((actor->iwork[10] == 0) && ((fabsf(actor->fwork[27] - actor->obj.pos.x) > 300.0f) || - (fabsf(actor->fwork[29] - actor->obj.pos.z) > 300.0f))) { - actor->fwork[0] += 5.0f; - actor->fwork[1] += 8.0f; - sp88 = actor->fwork[27] - actor->obj.pos.x; - sp80 = actor->fwork[29] - actor->obj.pos.z; + if ((this->iwork[10] == 0) && ((fabsf(this->fwork[27] - this->obj.pos.x) > 300.0f) || + (fabsf(this->fwork[29] - this->obj.pos.z) > 300.0f))) { + this->fwork[0] += 5.0f; + this->fwork[1] += 8.0f; + sp88 = this->fwork[27] - this->obj.pos.x; + sp80 = this->fwork[29] - this->obj.pos.z; sp80 = sqrtf(SQ(sp88) + SQ(sp80)) * 0.2f; - if (actor->eventType == 1) { + if (this->eventType == 1) { sp80 = 0.1f; } - spD0 = SIN_DEG(actor->fwork[0]) * sp80; - sp88 = COS_DEG(actor->fwork[1]) * sp80; - spD4 = COS_DEG(actor->obj.rot.y) * sp88; - spCC = -SIN_DEG(actor->obj.rot.y) * sp88; + spD0 = SIN_DEG(this->fwork[0]) * sp80; + sp88 = COS_DEG(this->fwork[1]) * sp80; + spD4 = COS_DEG(this->obj.rot.y) * sp88; + spCC = -SIN_DEG(this->obj.rot.y) * sp88; - sp88 = (actor->fwork[27] + spD4) - actor->obj.pos.x; - sp84 = (actor->fwork[28] + spD0) - actor->obj.pos.y; - sp80 = (actor->fwork[29] + spCC) - actor->obj.pos.z; + sp88 = (this->fwork[27] + spD4) - this->obj.pos.x; + sp84 = (this->fwork[28] + spD0) - this->obj.pos.y; + sp80 = (this->fwork[29] + spCC) - this->obj.pos.z; sp78 = Math_RadToDeg(Math_Atan2F(sp88, sp80)); sp80 = sqrtf(SQ(sp88) + SQ(sp80)); sp7C = Math_RadToDeg(-Math_Atan2F(sp84, sp80)); - sp84 = Math_SmoothStepToAngle(&actor->obj.rot.y, sp78, 0.3f, 4.0f, 0.001f); - Math_SmoothStepToAngle(&actor->obj.rot.x, sp7C, 0.3f, 4.0f, 0.001f); + sp84 = Math_SmoothStepToAngle(&this->obj.rot.y, sp78, 0.3f, 4.0f, 0.001f); + Math_SmoothStepToAngle(&this->obj.rot.x, sp7C, 0.3f, 4.0f, 0.001f); } - if ((fabsf(actor->fwork[27] - actor->obj.pos.x) < 60.0f) && - (fabsf(actor->fwork[28] - actor->obj.pos.y) < 60.0f) && - (fabsf(actor->fwork[29] - actor->obj.pos.z) < 60.0f) && ((spC4 == 2) || (spC4 == 3) || (spC4 == 4))) { + + if ((fabsf(this->fwork[27] - this->obj.pos.x) < 60.0f) && (fabsf(this->fwork[28] - this->obj.pos.y) < 60.0f) && + (fabsf(this->fwork[29] - this->obj.pos.z) < 60.0f) && ((spC4 == 2) || (spC4 == 3) || (spC4 == 4))) { gActors[spC4].dmgType = DMG_BEAM; gActors[spC4].damage = 20; gActors[spC4].dmgSource = DMG_SRC_2; - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); - func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 5.0f); - Object_Kill(&actor->obj, actor->sfxSource); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 5.0f); + Object_Kill(&this->obj, this->sfxSource); } } - Math_Vec3fFromAngles(&sp98, actor->obj.rot.x, actor->obj.rot.y, actor->fwork[5]); - actor->vel.x = sp98.x; - actor->vel.y = sp98.y; - actor->vel.z = sp98.z - gPathVelZ; - if (actor->eventType == 0) { - actor->obj.rot.z += 5.0f; + + Math_Vec3fFromAngles(&sp98, this->obj.rot.x, this->obj.rot.y, this->fwork[5]); + + this->vel.x = sp98.x; + this->vel.y = sp98.y; + this->vel.z = sp98.z - gPathVelZ; + + if (this->eventType == 0) { + this->obj.rot.z += 5.0f; } - if (actor->eventType == 1) { - if (actor->timer_0BE == 0) { - actor->timer_0BE = 30; - Math_Vec3fFromAngles(&sp98, actor->obj.rot.x, actor->obj.rot.y, 120.0f); - func_effect_8007F04C(OBJ_EFFECT_353, actor->obj.pos.x + sp98.x, actor->obj.pos.y + sp98.y, - actor->obj.pos.z + sp98.z, actor->obj.rot.x, actor->obj.rot.y, actor->obj.rot.z, 0.0f, + if (this->eventType == 1) { + if (this->timer_0BE == 0) { + this->timer_0BE = 30; + Math_Vec3fFromAngles(&sp98, this->obj.rot.x, this->obj.rot.y, 120.0f); + func_effect_8007F04C(OBJ_EFFECT_ENEMY_LASER_1, this->obj.pos.x + sp98.x, this->obj.pos.y + sp98.y, + this->obj.pos.z + sp98.z, this->obj.rot.x, this->obj.rot.y, this->obj.rot.z, 0.0f, 0.0f, 0.0f, sp98.x, sp98.y, sp98.z, 1.0f); } var_fv0 = 330.0f; if (sp84 < 0.0f) { var_fv0 = 30.0f; } - Math_SmoothStepToAngle(&actor->obj.rot.z, var_fv0, 0.1f, 3.0f, 0.01f); + Math_SmoothStepToAngle(&this->obj.rot.z, var_fv0, 0.1f, 3.0f, 0.01f); } - if ((gGroundType == 4) && Ground_801B6AEC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + gPathProgress)) { - func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 5.0f); - Object_Kill(&actor->obj, actor->sfxSource); + + if ((gGroundType == 4) && Ground_801B6AEC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + gPathProgress)) { + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 5.0f); + Object_Kill(&this->obj, this->sfxSource); } - sp8C.x = actor->vel.x; - sp8C.y = actor->vel.y; - sp8C.z = actor->vel.z; - if ((Object_CheckCollision(actor->index, &actor->obj.pos, &sp8C, 1) != 0) || (actor->dmgType != DMG_NONE) || - (actor->obj.pos.y < (gGroundHeight + 10.0f)) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { - func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 3.0f); - Object_Kill(&actor->obj, actor->sfxSource); - if (actor->dmgType != DMG_NONE) { - actor->itemDrop = DROP_SILVER_RING_50p; + + sp8C.x = this->vel.x; + sp8C.y = this->vel.y; + sp8C.z = this->vel.z; + + if ((Object_CheckCollision(this->index, &this->obj.pos, &sp8C, 1) != 0) || (this->dmgType != DMG_NONE) || + (this->obj.pos.y < (gGroundHeight + 10.0f)) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 3.0f); + Object_Kill(&this->obj, this->sfxSource); + if (this->dmgType != DMG_NONE) { + this->itemDrop = DROP_SILVER_RING_50p; if ((gCurrentLevel == LEVEL_CORNERIA)) { if (gLevelMode == LEVELMODE_ALL_RANGE) { - actor->itemDrop = DROP_SILVER_RING_50p; + this->itemDrop = DROP_SILVER_RING_50p; } else { - actor->itemDrop = DROP_SILVER_RING_25p; + this->itemDrop = DROP_SILVER_RING_25p; } } if (gCurrentLevel == LEVEL_AREA_6) { - actor->itemDrop = DROP_SILVER_RING_10p; + this->itemDrop = DROP_SILVER_RING_10p; } - Actor_Despawn(actor); + Actor_Despawn(this); } - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); } + if (gLevelMode == LEVELMODE_ON_RAILS) { - if (fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 100.0f) { - actor->iwork[10] = 1; + if (fabsf(this->obj.pos.z - gPlayer[0].trueZpos) < 100.0f) { + this->iwork[10] = 1; } - if (gPlayer[0].cam.eye.z < (actor->obj.pos.z + gPathProgress)) { - Object_Kill(&actor->obj, actor->sfxSource); + if (gPlayer[0].cam.eye.z < (this->obj.pos.z + gPathProgress)) { + Object_Kill(&this->obj, this->sfxSource); } } } -void func_enmy_800660F0(Actor* actor) { - Item* item = gItems; +void func_enmy_800660F0(Actor* this) { + Item* item; s32 i; - for (i = 0; i < ARRAY_COUNT(gItems); i++, item++) { + for (item = &gItems[0], i = 0; i < ARRAY_COUNT(gItems); i++, item++) { if (item->obj.status == OBJ_FREE) { Item_Initialize(item); item->obj.status = OBJ_INIT; - item->obj.id = D_enmy_800CFDF4[actor->itemDrop]; - item->obj.pos.x = actor->obj.pos.x; - item->obj.pos.y = actor->obj.pos.y; - item->obj.pos.z = actor->obj.pos.z; + item->obj.id = D_enmy_800CFDF4[this->itemDrop]; + item->obj.pos.x = this->obj.pos.x; + item->obj.pos.y = this->obj.pos.y; + item->obj.pos.z = this->obj.pos.z; item->timer_4A = 8; + Object_SetInfo(&item->info, item->obj.id); + if ((item->obj.id == OBJ_ITEM_SILVER_RING) || (item->obj.id == OBJ_ITEM_BOMB) || (item->obj.id == OBJ_ITEM_LASERS)) { item->unk_50 = 90.0f; } + if ((item->obj.id >= OBJ_ITEM_GOLD_RING) || (item->obj.id == OBJ_ITEM_1UP)) { item->unk_50 = 90.0f; AUDIO_PLAY_SFX(NA_SE_ITEM_APPEAR, gDefaultSfxSource, 4); @@ -1646,18 +1682,19 @@ void func_enmy_800660F0(Actor* actor) { } } -void Actor_Despawn(Actor* actor) { +void Actor_Despawn(Actor* this) { Actor* otherActor; s32 i; if (gVersusMode) { - if ((actor->dmgSource >= 1) && (actor->dmgSource < 4 + 1) && !VS_TIME_UP(gVsCountdown)) { - gPlayerScores[actor->dmgSource - 1] += actor->info.bonus; + if ((this->dmgSource >= 1) && (this->dmgSource < 4 + 1) && !VS_TIME_UP(gVsCountdown)) { + gPlayerScores[this->dmgSource - 1] += this->info.bonus; } - } else if (!((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->animFrame == 1))) { - if ((actor->dmgSource == AI360_FOX + 1) && (actor->info.bonus != 0)) { - gHitCount += actor->info.bonus; + } else if (!((this->obj.id == OBJ_ACTOR_ALLRANGE) && (this->animFrame == 1))) { + if ((this->dmgSource == AI360_FOX + 1) && (this->info.bonus != 0)) { + gHitCount += this->info.bonus; D_ctx_80177850 = 15; + if ((gLevelMode == LEVELMODE_ALL_RANGE) && (gDropHitCountItem != 0)) { switch (gDropHitCountItem) { case 9: @@ -1668,32 +1705,34 @@ void Actor_Despawn(Actor* actor) { case 4: case 19: case 29: - actor->itemDrop = DROP_GOLD_RING_1; + this->itemDrop = DROP_GOLD_RING_1; break; case 14: - actor->itemDrop = DROP_LASERS; + this->itemDrop = DROP_LASERS; break; } gDropHitCountItem = 0; } - if (actor->obj.id == OBJ_ACTOR_ALLRANGE) { - if ((actor->aiType >= AI360_WOLF) && (actor->aiType < AI360_KATT)) { - AllRange_GetStarWolfHits(actor); + + if (this->obj.id == OBJ_ACTOR_ALLRANGE) { + if ((this->aiType >= AI360_WOLF) && (this->aiType < AI360_KATT)) { + AllRange_GetStarWolfHits(this); } } } - if (actor->itemDrop) { - if (D_enmy_800CFE5C[actor->itemDrop] < 0.0f) { - otherActor = gActors; + + if (this->itemDrop) { + if (D_enmy_800CFE5C[this->itemDrop] < 0.0f) { + otherActor = &gActors[0]; for (i = 0, otherActor = gActors; i < ARRAY_COUNT(gActors); i++, otherActor++) { - if ((otherActor->obj.status != OBJ_FREE) && (otherActor->index != actor->index) && - (otherActor->iwork[15] == actor->iwork[15])) { + if ((otherActor->obj.status != OBJ_FREE) && (otherActor->index != this->index) && + (otherActor->iwork[15] == this->iwork[15])) { return; } } - func_enmy_800660F0(actor); + func_enmy_800660F0(this); AUDIO_PLAY_SFX(NA_SE_ITEM_APPEAR, gDefaultSfxSource, 4); - } else if (actor->itemDrop == DROP_TEAM_MESG) { + } else if (this->itemDrop == DROP_TEAM_MESG) { if (gTeamShields[TEAM_ID_PEPPY] > 0) { Radio_PlayMessage(gMsg_ID_20261, RCID_PEPPY); } else if (gTeamShields[TEAM_ID_SLIPPY] > 0) { @@ -1701,196 +1740,211 @@ void Actor_Despawn(Actor* actor) { } else if (gTeamShields[TEAM_ID_FALCO] > 0) { Radio_PlayMessage(gMsg_ID_20262, RCID_FALCO); } - } else if (Rand_ZeroOne() <= D_enmy_800CFE5C[actor->itemDrop]) { - func_enmy_800660F0(actor); + } else if (Rand_ZeroOne() <= D_enmy_800CFE5C[this->itemDrop]) { + func_enmy_800660F0(this); } } } } -void func_enmy_8006654C(Actor* actor) { - actor->gravity = 0.4f; - if (actor->obj.pos.y <= gGroundHeight + 130.0f) { - actor->obj.pos.y = gGroundHeight + 130.0f; - actor->vel.y = 0.0f; +void Actor192_Update(Actor192* this) { + this->gravity = 0.4f; + + if (this->obj.pos.y <= gGroundHeight + 130.0f) { + this->obj.pos.y = gGroundHeight + 130.0f; + this->vel.y = 0.0f; } - actor->vel.x = SIN_DEG(actor->obj.rot.y) * actor->fwork[0]; - actor->vel.z = COS_DEG(actor->obj.rot.y) * actor->fwork[0]; - switch (actor->state) { + + this->vel.x = SIN_DEG(this->obj.rot.y) * this->fwork[0]; + this->vel.z = COS_DEG(this->obj.rot.y) * this->fwork[0]; + + switch (this->state) { case 0: - if (actor->fwork[0] < 20.0f) { - actor->fwork[0] += 0.5f; + if (this->fwork[0] < 20.0f) { + this->fwork[0] += 0.5f; } - actor->animFrame++; - if (Animation_GetFrameCount(&D_CO_6029528) < actor->animFrame) { - actor->animFrame = 0; + + this->animFrame++; + if (Animation_GetFrameCount(&D_CO_6029528) < this->animFrame) { + this->animFrame = 0; } - if ((actor->obj.rot.z < 15.0f) && (actor->animFrame < 20)) { - actor->obj.rot.z += 1.0f; + + if ((this->obj.rot.z < 15.0f) && (this->animFrame < 20)) { + this->obj.rot.z += 1.0f; } - if ((actor->obj.rot.z > -15.0f) && (actor->animFrame > 20)) { - actor->obj.rot.z -= 1.0f; + if ((this->obj.rot.z > -15.0f) && (this->animFrame > 20)) { + this->obj.rot.z -= 1.0f; } - if ((actor->animFrame == 20) || (actor->animFrame == 40)) { - actor->state++; - actor->timer_0BC = 20; + + if ((this->animFrame == 20) || (this->animFrame == 40)) { + this->state++; + this->timer_0BC = 20; } break; + case 1: - if (actor->obj.rot.z > 0.0f) { - actor->obj.rot.z -= 0.5f; + if (this->obj.rot.z > 0.0f) { + this->obj.rot.z -= 0.5f; } - if (actor->obj.rot.z < 0.0f) { - actor->obj.rot.z += 0.5f; + if (this->obj.rot.z < 0.0f) { + this->obj.rot.z += 0.5f; } - if (actor->fwork[0] > 0.0f) { - actor->fwork[0] -= 0.3f; + + if (this->fwork[0] > 0.0f) { + this->fwork[0] -= 0.3f; } - if (actor->timer_0BC == 0) { - actor->state = 0; + + if (this->timer_0BC == 0) { + this->state = 0; } break; } - actor->scale = 0.8f; - if (actor->dmgType != DMG_NONE) { - actor->obj.status = OBJ_DYING; - actor->vel.y = RAND_FLOAT(5.0f) + 6.0f; - if (actor->dmgType == DMG_EXPLOSION) { - actor->vel.y = -2.0f; + + this->scale = 0.8f; + + if (this->dmgType != DMG_NONE) { + this->obj.status = OBJ_DYING; + this->vel.y = RAND_FLOAT(5.0f) + 6.0f; + if (this->dmgType == DMG_EXPLOSION) { + this->vel.y = -2.0f; } - actor->vel.z = -15.0f; - actor->gravity = 0.5f; - func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z, 13.0f); - AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_S, actor->sfxSource, 4); + this->vel.z = -15.0f; + this->gravity = 0.5f; + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y + 30.0f, this->obj.pos.z, 13.0f); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_S, this->sfxSource, 4); } } -void func_enmy_8006684C(Actor* actor) { +void func_enmy_8006684C(Actor192* this) { s32 pad; - if (actor->timer_0BE != 0) { - actor->vel.z = 0.0f; - actor->vel.x = 0.0f; - actor->vel.y = 0.0f; - if (actor->timer_0BE == 1) { - Object_Kill(&actor->obj, actor->sfxSource); - actor->itemDrop = DROP_SILVER_RING; - Actor_Despawn(actor); - AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, actor->sfxSource, 4); - BonusText_Display(actor->obj.pos.x, actor->obj.pos.y + 250.0f, actor->obj.pos.z, 3); + if (this->timer_0BE != 0) { + this->vel.z = 0.0f; + this->vel.x = 0.0f; + this->vel.y = 0.0f; + if (this->timer_0BE == 1) { + Object_Kill(&this->obj, this->sfxSource); + this->itemDrop = DROP_SILVER_RING; + Actor_Despawn(this); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, this->sfxSource, 4); + BonusText_Display(this->obj.pos.x, this->obj.pos.y + 250.0f, this->obj.pos.z, 3); gHitCount += 3; D_ctx_80177850 = 15; } } else { - actor->obj.rot.x += 11.0f; - actor->obj.rot.y += 7.0f; - if (actor->vel.y < -3.0f) { - func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, 7.0f, - 5); - actor->timer_0BE = 3; + this->obj.rot.x += 11.0f; + this->obj.rot.y += 7.0f; + if (this->vel.y < -3.0f) { + func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y + 30.0f, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 7.0f, 5); + this->timer_0BE = 3; } } } -void func_enmy_800669A0(Actor* actor) { - if (actor->timer_0BC != 0) { - if (actor->timer_0BC == 1) { - Object_Kill(&actor->obj, actor->sfxSource); +void Actor193_Update(Actor193* this) { + if (this->timer_0BC != 0) { + if (this->timer_0BC == 1) { + Object_Kill(&this->obj, this->sfxSource); } } else { - actor->obj.rot.y += 5.0f; - if (actor->dmgType != DMG_NONE) { - func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y + 130.0f, actor->obj.pos.z, 8.0f); - func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y + 130.0f, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, 4.0f, - 5); - actor->timer_0BC = 4; - func_effect_8007A6F0(&actor->obj.pos, NA_SE_OB_EXPLOSION_S); + this->obj.rot.y += 5.0f; + if (this->dmgType != DMG_NONE) { + func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y + 130.0f, this->obj.pos.z, 8.0f); + func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y + 130.0f, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 4.0f, 5); + this->timer_0BC = 4; + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_OB_EXPLOSION_S); } } } -void func_enmy_80066A80(Actor* actor) { +void Actor180_Update(Actor180* this) { } -void func_enmy_80066A8C(Scenery* scenery) { - Vec3f sp64; - Vec3f sp58; +void func_enmy_80066A8C(CoBuilding9* this) { + Vec3f src; + Vec3f dest; f32 yf; - sp64.z = 0.0f; - sp64.x = -120.0f; - if (scenery->obj.rot.y > 90.0f) { - sp64.x = 120.0f; + src.z = 0.0f; + src.x = -120.0f; + + if (this->obj.rot.y > 90.0f) { + src.x = 120.0f; } + for (yf = 0.0f; yf < 680.0f; yf += 100.0f) { - Matrix_RotateY(gCalcMatrix, scenery->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, scenery->obj.rot.x * M_DTOR, MTXF_APPLY); - sp64.y = yf; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp64, &sp58); - func_effect_8007D0E0(scenery->obj.pos.x + sp58.x, scenery->obj.pos.y + sp58.y, scenery->obj.pos.z + sp58.z, - 4.0f); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + src.y = yf; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + func_effect_8007D0E0(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, 4.0f); } } -void func_enmy_80066C00(Scenery* scenery) { - Vec3f sp64; - Vec3f sp58; +void func_enmy_80066C00(CoBuilding9* this) { + Vec3f src; + Vec3f dest; f32 zf; - sp64.y = 30.0f; - sp64.x = -100.0f; - if (scenery->obj.rot.y > 90.0f) { - sp64.x = 100.0f; + src.y = 30.0f; + src.x = -100.0f; + + if (this->obj.rot.y > 90.0f) { + src.x = 100.0f; } - Matrix_RotateY(gCalcMatrix, scenery->obj.rot.y * M_DTOR, MTXF_NEW); + + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); for (zf = -180.0f; zf <= 0.0f; zf += 30.0f) { - sp64.z = zf; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp64, &sp58); - func_effect_8007D0E0(scenery->obj.pos.x + sp58.x, scenery->obj.pos.y + sp58.y, scenery->obj.pos.z + sp58.z, + src.z = zf; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + func_effect_8007D0E0(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, RAND_FLOAT(1.0f) + 2.0f); } } -void func_enmy_80066D5C(Scenery* scenery) { - switch (scenery->state) { - case 1: - func_enmy_80066C00(scenery); - scenery->state++; - AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_L, scenery->sfxSource, 4); - break; - case 2: - scenery->vel.x += 0.05f; - scenery->obj.rot.x += scenery->vel.x; - if (scenery->obj.rot.x >= 90.0f) { - scenery->obj.rot.x = 90.0f; - scenery->unk_44 = 40; - func_enmy_80066A8C(scenery); - scenery->state = 0; - gCameraShake = 25; - AUDIO_PLAY_SFX(NA_SE_EN_METAL_BOUND_M, scenery->sfxSource, 4); - } - break; +void CoBuilding9_Update(CoBuilding9* this) { + switch (this->state) { case 0: break; + + case 1: + func_enmy_80066C00(this); + this->state++; + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_L, this->sfxSource, 4); + break; + + case 2: + this->vel.x += 0.05f; + this->obj.rot.x += this->vel.x; + if (this->obj.rot.x >= 90.0f) { + this->obj.rot.x = 90.0f; + this->unk_44 = 40; + func_enmy_80066A8C(this); + this->state = 0; + gCameraShake = 25; + AUDIO_PLAY_SFX(NA_SE_EN_METAL_BOUND_M, this->sfxSource, 4); + } + break; } } -void func_enmy_80066E80(Scenery* scenery) { +void func_enmy_80066E80(Scenery* this) { } void Sprite167_Update(Sprite167* this) { this->obj.rot.y += 0.2f; } -void func_enmy_80066EA8(Scenery* scenery) { - scenery->obj.rot.y = 0.0f; - if (gPlayer[0].cam.eye.x < scenery->obj.pos.x) { - scenery->obj.rot.y = 271.0f; +// World-aligned billboarding +void SceneryRotateTowardsCamera(Scenery* this) { + this->obj.rot.y = 0.0f; + if (gPlayer[0].cam.eye.x < this->obj.pos.x) { + this->obj.rot.y = 271.0f; } } -void func_enmy_80066EE4(Sprite* sprite) { +void func_enmy_80066EE4(Sprite* this) { } void Item_CheckBounds(Item* this) { @@ -1899,6 +1953,7 @@ void Item_CheckBounds(Item* this) { if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY)) { Object_Kill(&this->obj, this->sfxSource); } + if ((gLevelMode == LEVELMODE_ON_RAILS) && (gLastPathChange == 0)) { var_fa1 = 900.0f; if (gPlayer[0].form != FORM_ARWING) { @@ -1911,9 +1966,11 @@ void Item_CheckBounds(Item* this) { Math_SmoothStepToF(&this->obj.pos.x, gPlayer[0].xPath - var_fa1, 0.1f, 10.0f, 0.01f); } } + if (this->obj.pos.y > 650.0f) { Math_SmoothStepToF(&this->obj.pos.y, 650.0f, 0.1f, 10.0f, 0.01f); } + if (gLevelType == LEVELTYPE_PLANET) { if (this->obj.pos.y < gGroundHeight + 70.0f) { Math_SmoothStepToF(&this->obj.pos.y, gGroundHeight + 70.0f, 0.1f, 5.0f, 0.01f); @@ -1924,6 +1981,7 @@ void Item_CheckBounds(Item* this) { } else if (this->obj.pos.y < -500.0f) { Math_SmoothStepToF(&this->obj.pos.y, -500.0f, 0.1f, 5.0f, 0.01f); } + if (gVersusMode && (this->index == 0) && (gItems[1].obj.status == OBJ_ACTIVE)) { if (fabsf(this->obj.pos.x - gItems[1].obj.pos.x) < 200.0f) { if (fabsf(this->obj.pos.z - gItems[1].obj.pos.z) < 200.0f) { @@ -1938,10 +1996,11 @@ void Item_CheckBounds(Item* this) { void Item_SpinPickup(Item* this) { s32 sparkleMask; - Vec3f sp40; - Vec3f sp34; + Vec3f src; + Vec3f dest; Math_SmoothStepToF(&this->unk_50, 10.0f, 1.0f, 2.0f, 0.0f); + if (this->unk_50 > 30.0f) { sparkleMask = 1 - 1; } else if (this->unk_50 > 20.0f) { @@ -1949,34 +2008,36 @@ void Item_SpinPickup(Item* this) { } else { sparkleMask = 8 - 1; } - if (!(sparkleMask & gGameFrameCount)) { + + if ((sparkleMask & gGameFrameCount) == 0) { Matrix_RotateY(gCalcMatrix, gGameFrameCount * 23.0f * M_DTOR, MTXF_NEW); - sp40.x = 50.0f; - sp40.y = RAND_FLOAT_CENTERED(120.0f); - sp40.z = 0.0f; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp40, &sp34); - func_effect_80078E50(this->obj.pos.x + sp34.x, this->obj.pos.y + sp34.y, this->obj.pos.z + sp34.z, 3.0f); + src.x = 50.0f; + src.y = RAND_FLOAT_CENTERED(120.0f); + src.z = 0.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + func_effect_80078E50(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, 3.0f); } this->obj.rot.y += this->unk_50; this->obj.rot.y = Math_ModF(this->obj.rot.y, 360.0f); } -void Actor_SetupDebris70(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 xVel, f32 yVel, f32 zVel) { - Actor_Initialize(actor); - actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_DEBRIS; - actor->state = 70; - actor->obj.pos.x = xPos; - actor->obj.pos.y = yPos; - actor->obj.pos.z = zPos; - actor->obj.rot.x = xRot; - actor->obj.rot.y = yRot; - actor->vel.x = xVel; - actor->vel.y = yVel; - actor->vel.z = zVel; - actor->timer_0BC = RAND_INT(15.0f) + 25.0f; - actor->gravity = 0.5f; - Object_SetInfo(&actor->info, actor->obj.id); +void Actor_SetupDebris70(ActorDebris* this, f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 xVel, f32 yVel, + f32 zVel) { + Actor_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_ACTOR_DEBRIS; + this->state = 70; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + this->obj.rot.x = xRot; + this->obj.rot.y = yRot; + this->vel.x = xVel; + this->vel.y = yVel; + this->vel.z = zVel; + this->timer_0BC = RAND_INT(15.0f) + 25.0f; + this->gravity = 0.5f; + Object_SetInfo(&this->info, this->obj.id); } void Actor_SpawnDebris70(f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 arg5, f32 arg6, f32 arg7) { @@ -1995,6 +2056,7 @@ void ActorSupplies_Update(ActorSupplies* this) { s32 i; this->obj.rot.y += 1.0f; + if (gLevelMode == LEVELMODE_ALL_RANGE) { if (gCurrentLevel == LEVEL_SECTOR_Z) { Math_SmoothStepToF(&this->obj.pos.x, -2000.0f, 0.05f, 60.0f, 0.01f); @@ -2004,12 +2066,14 @@ void ActorSupplies_Update(ActorSupplies* this) { Math_SmoothStepToF(&this->obj.pos.y, 300.0f, 0.05f, 50.0f, 0.01f); } } + if (this->dmgType != DMG_NONE) { this->dmgType = DMG_NONE; this->health -= this->damage; if (this->health <= 0) { - func_effect_8007A6F0(&this->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 5.0f); + if (((player[0].wings.rightState <= WINGSTATE_BROKEN) || (player[0].wings.leftState <= WINGSTATE_BROKEN)) && (player[0].form != FORM_LANDMASTER)) { this->itemDrop = DROP_WING_REPAIR; @@ -2020,7 +2084,9 @@ void ActorSupplies_Update(ActorSupplies* this) { } else { this->itemDrop = DROP_BOMB; } + Actor_Despawn(this); + for (i = 0; i < 6; i++) { Actor_SpawnDebris70(D_enmy_800CFEC4[i].x + this->obj.pos.x, D_enmy_800CFEC4[i].y + this->obj.pos.y, D_enmy_800CFEC4[i].z + this->obj.pos.z, D_enmy_800CFF0C[i].y + this->obj.rot.y, @@ -2039,10 +2105,11 @@ void ActorSupplies_Update(ActorSupplies* this) { gRadarMarks[63].yRot = 0.0f; } -void ActorSupplies_Draw(Actor* actor) { +void ActorSupplies_Draw(Actor* this) { s32 i; Lights_SetOneLight(&gMasterDisp, -60, -60, 60, 150, 150, 150, 20, 20, 20); + for (i = 0; i < 6; i++) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, D_enmy_800CFEC4[i].x, D_enmy_800CFEC4[i].y, D_enmy_800CFEC4[i].z, MTXF_APPLY); @@ -2052,12 +2119,14 @@ void ActorSupplies_Draw(Actor* actor) { gSPDisplayList(gMasterDisp++, D_10177C0); Matrix_Pop(&gGfxMatrix); } + Lights_SetOneLight(&gMasterDisp, gLight1x, gLight1y, gLight1z, gLight1R, gLight1G, gLight1B, gAmbientR, gAmbientG, gAmbientB); } void func_enmy_80067A40(void) { AUDIO_PLAY_SFX(NA_SE_WING_REPAIR, gPlayer[0].sfxSource, 0); + if (gPlayer[0].wings.rightState <= WINGSTATE_BROKEN) { gRightWingFlashTimer[0] = 1050; gPlayer[0].wings.rightState = WINGSTATE_INTACT; @@ -2066,6 +2135,7 @@ void func_enmy_80067A40(void) { gLeftWingFlashTimer[0] = 1050; gPlayer[0].wings.leftState = WINGSTATE_INTACT; } + if (gExpertMode) { gRightWingHealth[0] = gLeftWingHealth[0] = 10; } else { @@ -2076,6 +2146,7 @@ void func_enmy_80067A40(void) { void Item1up_Update(Item1UP* this) { Item_CheckBounds(this); Item_SpinPickup(this); + if (this->collected) { Object_Kill(&this->obj, this->sfxSource); Object_PlayerSfx(gPlayer[this->playerNum].sfxSource, NA_SE_ONE_UP, this->playerNum); @@ -2083,6 +2154,7 @@ void Item1up_Update(Item1UP* this) { gLifeCount[this->playerNum]++; } } + if (this->timer_48 == 1) { Object_Kill(&this->obj, this->sfxSource); } @@ -2091,6 +2163,7 @@ void Item1up_Update(Item1UP* this) { void ItemPickup_Update(Item* this) { Item_CheckBounds(this); Item_SpinPickup(this); + if (this->state == 0) { switch (this->obj.id) { case OBJ_ITEM_BOMB: @@ -2105,23 +2178,29 @@ void ItemPickup_Update(Item* this) { Object_PlayerSfx(gPlayer[this->playerNum].sfxSource, NA_SE_BOMB_GAUGE_UP, this->playerNum); } break; + case OBJ_ITEM_LASERS: this->width = 18.0f; + if (this->collected) { this->timer_4A = 50; this->state = 1; this->timer_48 = 20; this->unk_50 = 60.0f; + gLaserStrength[this->playerNum]++; if (gLaserStrength[this->playerNum] > LASERS_HYPER) { gLaserStrength[this->playerNum] = LASERS_HYPER; } + Object_PlayerSfx(gPlayer[this->playerNum].sfxSource, NA_SE_TWIN_LASER_GET, this->playerNum); + if (gExpertMode) { gRightWingHealth[this->playerNum] = gLeftWingHealth[this->playerNum] = 10; } else { gRightWingHealth[this->playerNum] = gLeftWingHealth[this->playerNum] = 60; } + gRightWingFlashTimer[this->playerNum] = 1030; gLeftWingFlashTimer[this->playerNum] = 1030; } @@ -2129,13 +2208,17 @@ void ItemPickup_Update(Item* this) { } } else { Math_SmoothStepToF(&this->width, 2.5f, 1.0f, 0.5f, 0.0f); + this->obj.pos.x += (gPlayer[this->playerNum].pos.x - this->obj.pos.x) * 0.5f; + if (gPlayer[this->playerNum].form == FORM_LANDMASTER) { this->obj.pos.y += ((gPlayer[this->playerNum].pos.y + 50.0f) - this->obj.pos.y) * 0.5f; } else { this->obj.pos.y += (gPlayer[this->playerNum].pos.y - this->obj.pos.y) * 0.5f; } + this->obj.pos.z += (gPlayer[this->playerNum].trueZpos - this->obj.pos.z) * 0.5f; + if (this->timer_48 == 0) { Object_Kill(&this->obj, this->sfxSource); } @@ -2155,14 +2238,15 @@ void ItemLasers_Update(ItemLasers* this) { } void ItemSupplyRing_Update(Item* this) { - Vec3f sp4C; - Vec3f sp40; + Vec3f src; + Vec3f dest; switch (this->state) { case 0: Math_SmoothStepToF(&this->width, 0.4f, 1.0f, 0.05f, 0.0f); Item_CheckBounds(this); Item_SpinPickup(this); + if (this->collected) { this->state = 1; this->timer_48 = 50; @@ -2190,41 +2274,49 @@ void ItemSupplyRing_Update(Item* this) { Object_PlayerSfx(gPlayer[this->playerNum].sfxSource, NA_SE_SHIELD_RING_M, this->playerNum); } } + if ((this->obj.id == OBJ_ITEM_GOLD_RING) && (this->timer_48 == 1)) { Object_Kill(&this->obj, this->sfxSource); } break; + case 1: if (this->timer_48 > 30) { Math_SmoothStepToF(&this->width, 1.0f, 1.0f, 0.06f, 0.0f); } else { Math_SmoothStepToF(&this->width, 0.0f, 1.0f, 0.06f, 0.0f); } + this->obj.pos.x += (gPlayer[this->playerNum].pos.x - this->obj.pos.x) * 0.5f; + if (gPlayer[this->playerNum].form == FORM_LANDMASTER) { this->obj.pos.y += (gPlayer[this->playerNum].pos.y + 50.0f - this->obj.pos.y) * 0.5f; } else { this->obj.pos.y += (gPlayer[this->playerNum].pos.y - this->obj.pos.y) * 0.5f; } + if (gPlayer[0].alternateView && (gLevelMode == LEVELMODE_ON_RAILS)) { this->obj.pos.z += (gPlayer[this->playerNum].trueZpos - 300.0f - this->obj.pos.z) * 0.3f; } else { this->obj.pos.z += (gPlayer[this->playerNum].trueZpos - this->obj.pos.z) * 0.5f; } + this->obj.rot.z += 22.0f; + Math_SmoothStepToAngle(&this->obj.rot.y, Math_RadToDeg(-gPlayer[this->playerNum].camYaw), 0.2f, 10.0f, 0.0f); if (this->timer_48 == 0) { Object_Kill(&this->obj, this->sfxSource); } + if (this->width > 0.3f) { Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_RotateZ(gCalcMatrix, gGameFrameCount * 37.0f * M_DTOR, MTXF_APPLY); - sp4C.x = 0.0f; - sp4C.y = this->width * 100.0f; - sp4C.z = 0.0f; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp4C, &sp40); - func_effect_80078E50(this->obj.pos.x + sp40.x, this->obj.pos.y + sp40.y, this->obj.pos.z + sp40.z, + src.x = 0.0f; + src.y = this->width * 100.0f; + src.z = 0.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + func_effect_80078E50(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, 3.5f); } break; @@ -2242,10 +2334,12 @@ void ItemGoldRing_Update(ItemGoldRing* this) { void ItemWingRepair_Update(ItemWingRepair* this) { Item_CheckBounds(this); Item_SpinPickup(this); + if (this->collected) { func_enmy_80067A40(); Object_Kill(&this->obj, this->sfxSource); } + if (this->timer_48 == 1) { Object_Kill(&this->obj, this->sfxSource); } @@ -2253,6 +2347,7 @@ void ItemWingRepair_Update(ItemWingRepair* this) { void ItemMeteoWarp_Update(ItemMeteoWarp* this) { Item_CheckBounds(this); + if (this->state > 0) { if (this->state == 1) { this->obj.rot.z -= 10.0f; @@ -2264,23 +2359,29 @@ void ItemMeteoWarp_Update(ItemMeteoWarp* this) { this->width = 0.0f; } } + this->unk_44 -= 10; if (this->unk_44 < 0) { Object_Kill(&this->obj, this->sfxSource); } } else { this->width = 100.0f; + if (gRingPassCount < 0) { this->state = 2; this->unk_44 = 255; } else if (this->collected) { this->state = 1; this->unk_44 = 255; + gPlayer[this->playerNum].meteoWarpTimer = 100; + AUDIO_PLAY_SFX(gWarpRingSfx[gRingPassCount], gPlayer[0].sfxSource, 0); + if (gRingPassCount == 0) { gPlayer[0].boostSpeed = 0.0f; } + gRingPassCount++; if (gRingPassCount >= 7) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ENTER_WARP_ZONE; @@ -2294,10 +2395,11 @@ void ItemMeteoWarp_Update(ItemMeteoWarp* this) { } void ItemCheckpoint_Update(ItemCheckpoint* this) { - s32 i; + TeamId i; Item_CheckBounds(this); this->unk_58 -= this->unk_44; + if (this->state > 0) { this->unk_44++; this->obj.pos.x += (gPlayer[this->playerNum].pos.x - this->obj.pos.x) * 0.3f; @@ -2351,6 +2453,7 @@ void ItemRingCheck_Update(Item* this) { void ItemPathChange_Update(Item* this) { gLastPathChange = this->obj.id; + if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_ACTIVE) { Object_Kill(&this->obj, this->sfxSource); } else if (((gCurrentLevel == LEVEL_METEO) || (gCurrentLevel == LEVEL_SECTOR_X)) && (gLevelPhase == 1)) { @@ -2379,10 +2482,13 @@ void ItemPathChange_Update(Item* this) { break; } } + if (this->collected) { Object_Kill(&this->obj, this->sfxSource); + gPlayer[0].pathStep = 0.0f; gPlayer[0].pathChangeTimer = this->width * 0.05f; + switch (this->obj.id) { case OBJ_ITEM_PATH_SPLIT_X: if (this->obj.pos.x < gPlayer[0].pos.x) { @@ -2393,14 +2499,17 @@ void ItemPathChange_Update(Item* this) { gPlayer[0].xPathTarget = gPlayer[0].xPath - this->width; } break; + case OBJ_ITEM_PATH_TURN_LEFT: gPlayer[0].pathChangeYaw = 30.0f; gPlayer[0].xPathTarget = gPlayer[0].xPath - this->width; break; + case OBJ_ITEM_PATH_TURN_RIGHT: gPlayer[0].pathChangeYaw = -30.0f; gPlayer[0].xPathTarget = gPlayer[0].xPath + this->width; break; + case OBJ_ITEM_PATH_SPLIT_Y: if (this->obj.pos.y < gPlayer[0].pos.y) { gPlayer[0].pathChangePitch = 30.0f; @@ -2410,10 +2519,12 @@ void ItemPathChange_Update(Item* this) { gPlayer[0].yPathTarget = gPlayer[0].yPath - this->width; } break; + case OBJ_ITEM_PATH_TURN_UP: gPlayer[0].pathChangePitch = 30.0f; gPlayer[0].yPathTarget = gPlayer[0].yPath + this->width; break; + case OBJ_ITEM_PATH_TURN_DOWN: gPlayer[0].pathChangePitch = -30.0f; gPlayer[0].yPathTarget = gPlayer[0].yPath - this->width; @@ -2430,7 +2541,7 @@ void Sprite_UpdateDoodad(Sprite* this) { M_PI; if (this->destroy) { this->obj.status = OBJ_FREE; - func_effect_8007A6F0(&this->obj.pos, NA_SE_OB_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_OB_EXPLOSION_S); switch (this->obj.id) { case OBJ_SPRITE_CO_POLE: func_effect_8007D074(this->obj.pos.x, this->obj.pos.y + 160.0f, this->obj.pos.z, 4.0f); @@ -2448,6 +2559,7 @@ void Object_Dying(s32 index, ObjectId objId) { case OBJ_ACTOR_EVENT: ActorEvent_Dying(&gActors[index]); break; + case OBJ_ACTOR_ALLRANGE: if (gCurrentLevel == LEVEL_VENOM_ANDROSS) { Andross_801888F4(&gActors[index]); @@ -2455,81 +2567,96 @@ void Object_Dying(s32 index, ObjectId objId) { func_enmy2_800763A4(&gActors[index]); } break; + case OBJ_ACTOR_202: func_enmy2_800763A4(&gActors[index]); break; + case OBJ_ACTOR_194: Actor194_Dying(&gActors[index]); break; + case OBJ_ACTOR_186: Meteo_80187B08(&gActors[index]); break; + case OBJ_ACTOR_181: Object_Kill(&gActors[index].obj, gActors[index].sfxSource); func_effect_8007D2C8(gActors[index].obj.pos.x, gActors[index].obj.pos.y, gActors[index].obj.pos.z, 20.0f); break; + case OBJ_ACTOR_182: Object_Kill(&gActors[index].obj, gActors[index].sfxSource); func_effect_8007D2C8(gActors[index].obj.pos.x, gActors[index].obj.pos.y, gActors[index].obj.pos.z, 10.0f); Actor_Despawn(&gActors[index]); break; + case OBJ_ACTOR_192: func_enmy_8006684C(&gActors[index]); break; + case OBJ_BOSS_TI: Titania_801990DC(&gBosses[index]); break; + case OBJ_ACTOR_232: Titania_8018B720(&gActors[index]); break; + case OBJ_BOSS_VE1: Venom1_80198594(&gBosses[index]); break; } } -void Actor_Move(Actor* actor) { +void Actor_Move(Actor* this) { f32 var_fv0; - actor->obj.pos.x += actor->vel.x; - actor->obj.pos.z += actor->vel.z; - actor->obj.pos.y += actor->vel.y; - actor->vel.y -= actor->gravity; + this->obj.pos.x += this->vel.x; + this->obj.pos.z += this->vel.z; + this->obj.pos.y += this->vel.y; + this->vel.y -= this->gravity; - if (!gCullObjects || (actor->obj.id == OBJ_ACTOR_TEAM_BOSS) || - ((gCurrentLevel == LEVEL_MACBETH) && (actor->obj.id != OBJ_ACTOR_EVENT))) { + if (!gCullObjects || (this->obj.id == OBJ_ACTOR_TEAM_BOSS) || + ((gCurrentLevel == LEVEL_MACBETH) && (this->obj.id != OBJ_ACTOR_EVENT))) { return; } - var_fv0 = 4000.0f; - if ((actor->obj.id == OBJ_ACTOR_236) || (gCurrentLevel == LEVEL_MACBETH) || - ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->eventType == EVID_56))) { + var_fv0 = 4000.0f; + if ((this->obj.id == OBJ_ACTOR_236) || (gCurrentLevel == LEVEL_MACBETH) || + ((this->obj.id == OBJ_ACTOR_EVENT) && (this->eventType == EVID_56))) { var_fv0 = 8000.0f; } else if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ENTER_WARP_ZONE) { var_fv0 = 100000.0f; } - if (((gPlayer[0].cam.eye.z + actor->info.cullDistance) < (actor->obj.pos.z + gPathProgress)) || - ((actor->obj.pos.z + gPathProgress) < -15000.0f) || (actor->obj.pos.y < (gPlayer[0].yPath - var_fv0)) || - ((gPlayer[0].yPath + var_fv0) < actor->obj.pos.y) || ((gPlayer[0].xPath + var_fv0) < actor->obj.pos.x) || - (actor->obj.pos.x < (gPlayer[0].xPath - var_fv0))) { - Object_Kill(&actor->obj, actor->sfxSource); - switch (actor->obj.id) { + + if (((gPlayer[0].cam.eye.z + this->info.cullDistance) < (this->obj.pos.z + gPathProgress)) || + ((this->obj.pos.z + gPathProgress) < -15000.0f) || (this->obj.pos.y < (gPlayer[0].yPath - var_fv0)) || + ((gPlayer[0].yPath + var_fv0) < this->obj.pos.y) || ((gPlayer[0].xPath + var_fv0) < this->obj.pos.x) || + (this->obj.pos.x < (gPlayer[0].xPath - var_fv0))) { + Object_Kill(&this->obj, this->sfxSource); + + switch (this->obj.id) { case OBJ_ACTOR_236: gZOSnakeWaypointCount = 0; break; + case OBJ_ACTOR_229: - Titania_8018E3B0(actor); + Titania_8018E3B0(this); break; + case OBJ_ACTOR_194: - gActor194Status[actor->unk_046] = 0; + gActor194Status[this->unk_046] = 0; break; + case OBJ_ACTOR_EVENT: - if ((actor->eventType >= EVID_200) && (actor->eventType < EVID_300)) { - gActor194Status[actor->unk_046] = 0; - } else if ((actor->eventType == EVID_SX_WARP_GATE) && (actor->unk_046 != 2)) { + if ((this->eventType >= EVID_200) && (this->eventType < EVID_300)) { + gActor194Status[this->unk_046] = 0; + } else if ((this->eventType == EVID_SX_WARP_GATE) && (this->unk_046 != 2)) { gRingPassCount = -1; } break; + case OBJ_ACTOR_252: gMissedZoSearchlight = true; break; @@ -2537,28 +2664,29 @@ void Actor_Move(Actor* actor) { } } -void Boss_Move(Boss* boss) { - boss->obj.pos.x += boss->vel.x; - boss->obj.pos.y += boss->vel.y; - boss->obj.pos.z += boss->vel.z; - boss->vel.y -= boss->gravity; - if (gCullObjects && ((boss->obj.pos.z + gPathProgress) > (boss->info.cullDistance - gPlayer[0].cam.eye.z))) { - if (gPlayer[0].cam.eye.z) {} // fake - Object_Kill(&boss->obj, boss->sfxSource); +void Boss_Move(Boss* this) { + this->obj.pos.x += this->vel.x; + this->obj.pos.y += this->vel.y; + this->obj.pos.z += this->vel.z; + this->vel.y -= this->gravity; + + if (gCullObjects && ((this->obj.pos.z + gPathProgress) > (this->info.cullDistance - gPlayer[0].cam.eye.z))) { + if (gPlayer[0].cam.eye.z) {} //! FAKE + Object_Kill(&this->obj, this->sfxSource); } } -void Scenery_Move(Scenery* scenery) { +void Scenery_Move(Scenery* this) { if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) { - scenery->obj.pos.z += scenery->effectVel.z; - if (scenery->info.cullDistance < scenery->obj.pos.z) { - Object_Kill(&scenery->obj, scenery->sfxSource); + this->obj.pos.z += this->effectVel.z; + if (this->info.cullDistance < this->obj.pos.z) { + Object_Kill(&this->obj, this->sfxSource); } } else if ((gLevelMode == LEVELMODE_ON_RAILS) && (gBossActive != 2)) { - f32 temp_fv0 = fabsf(scenery->obj.pos.x - gPlayer[0].cam.eye.x); + f32 temp_fv0 = fabsf(this->obj.pos.x - gPlayer[0].cam.eye.x); f32 var_fa0 = 500.0f; - if ((scenery->obj.id == OBJ_SCENERY_6) || (scenery->obj.id == OBJ_SCENERY_7)) { + if ((this->obj.id == OBJ_SCENERY_CO_HIGHWAY_1) || (this->obj.id == OBJ_SCENERY_CO_HIGHWAY_2)) { var_fa0 = 1000.0f; } temp_fv0 = ((temp_fv0 - var_fa0) < 0.0f) ? 0.0f : (temp_fv0 - var_fa0) * 1.7f; @@ -2566,51 +2694,54 @@ void Scenery_Move(Scenery* scenery) { temp_fv0 = 0.0f; } temp_fv0 -= gPlayer[0].cam.eye.z; - if ((scenery->info.cullDistance - temp_fv0) < (scenery->obj.pos.z + gPathProgress)) { - Object_Kill(&scenery->obj, scenery->sfxSource); + if ((this->info.cullDistance - temp_fv0) < (this->obj.pos.z + gPathProgress)) { + Object_Kill(&this->obj, this->sfxSource); } } } -void Sprite_Move(Sprite* sprite) { +void Sprite_Move(Sprite* this) { if (gCullObjects) { - f32 temp_fv0 = fabsf(sprite->obj.pos.x - gPlayer[0].cam.eye.x); + f32 temp_fv0 = fabsf(this->obj.pos.x - gPlayer[0].cam.eye.x); f32 var_fa0 = 500.0f; - if (((sprite->obj.id == OBJ_SPRITE_FOG_SHADOW) && - ((sprite->sceneryId == OBJ_SCENERY_6) || (sprite->sceneryId == OBJ_SCENERY_7))) || - (sprite->obj.id == OBJ_SCENERY_8)) { + if (((this->obj.id == OBJ_SPRITE_FOG_SHADOW) && + ((this->sceneryId == OBJ_SCENERY_CO_HIGHWAY_1) || (this->sceneryId == OBJ_SCENERY_CO_HIGHWAY_2))) || + (this->obj.id == OBJ_SCENERY_CO_HIGHWAY_3)) { var_fa0 = 1000.0f; } + temp_fv0 = ((temp_fv0 - var_fa0) < 0.0f) ? 0.0f * 1.7f : (temp_fv0 - var_fa0) * 1.7f; temp_fv0 -= gPlayer[0].cam.eye.z; - if ((sprite->info.cullDistance - temp_fv0) < (sprite->obj.pos.z + gPathProgress)) { - sprite->obj.status = OBJ_FREE; + + if ((this->info.cullDistance - temp_fv0) < (this->obj.pos.z + gPathProgress)) { + this->obj.status = OBJ_FREE; } } } -void Effect_Move(Effect* effect) { - effect->obj.pos.x += effect->vel.x; - effect->obj.pos.y += effect->vel.y; - effect->obj.pos.z += effect->vel.z; +void Effect_Move(Effect* this) { + this->obj.pos.x += this->vel.x; + this->obj.pos.y += this->vel.y; + this->obj.pos.z += this->vel.z; + if (gCullObjects) { - if ((gPlayer[0].cam.eye.z + effect->info.cullDistance) < (effect->obj.pos.z + gPathProgress)) { - Object_Kill(&effect->obj, effect->sfxSource); - } else if ((fabsf(effect->obj.pos.y - gPlayer[0].cam.eye.y) > 25000.0f) || - (fabsf(effect->obj.pos.x - gPlayer[0].cam.eye.x) > 25000.0f)) { - Object_Kill(&effect->obj, effect->sfxSource); + if ((gPlayer[0].cam.eye.z + this->info.cullDistance) < (this->obj.pos.z + gPathProgress)) { + Object_Kill(&this->obj, this->sfxSource); + } else if ((fabsf(this->obj.pos.y - gPlayer[0].cam.eye.y) > 25000.0f) || + (fabsf(this->obj.pos.x - gPlayer[0].cam.eye.x) > 25000.0f)) { + Object_Kill(&this->obj, this->sfxSource); } } } -void Item_Move(Item* item) { +void Item_Move(Item* this) { if (gCullObjects) { f32 temp = (0.0f - gPlayer[0].cam.eye.z); - if ((item->info.cullDistance - temp) < (item->obj.pos.z + gPathProgress)) { - Object_Kill(&item->obj, item->sfxSource); - if ((item->obj.id == OBJ_ITEM_METEO_WARP) && (item->state == 0)) { + if ((this->info.cullDistance - temp) < (this->obj.pos.z + gPathProgress)) { + Object_Kill(&this->obj, this->sfxSource); + if ((this->obj.id == OBJ_ITEM_METEO_WARP) && (this->state == 0)) { gRingPassCount = -1; } } @@ -2635,6 +2766,7 @@ void Actor_Update(Actor* this) { if (this->timer_0C6 != 0) { this->timer_0C6--; } + if (gVersusMode) { for (i = 0; i < gCamCount; i++) { if (this->lockOnTimers[i] != 0) { @@ -2650,9 +2782,11 @@ void Actor_Update(Actor* this) { } gChargeTimers[0] = 0; } + if (this->timer_0C4 != 0) { this->timer_0C4--; } + switch (this->obj.status) { case OBJ_INIT: this->obj.status = OBJ_ACTIVE; @@ -2661,12 +2795,14 @@ void Actor_Update(Actor* this) { Actor_Move(this); } break; + case OBJ_ACTIVE: Actor_Move(this); if ((this->obj.status != OBJ_FREE) && (this->info.action != NULL)) { this->info.action(&this->obj); } break; + case OBJ_DYING: Actor_Move(this); if (this->obj.status != OBJ_FREE) { @@ -2698,18 +2834,21 @@ void Boss_Update(Boss* this) { if (this->timer_05C != 0) { this->timer_05C--; } + switch (this->obj.status) { case OBJ_INIT: this->obj.status = OBJ_ACTIVE; Object_Init(this->index, this->obj.id); Boss_Move(this); break; + case OBJ_ACTIVE: Boss_Move(this); if ((this->obj.status != OBJ_FREE) && (this->info.action != NULL)) { this->info.action(&this->obj); } break; + case OBJ_DYING: Boss_Move(this); if (this->obj.status != OBJ_FREE) { @@ -2723,12 +2862,14 @@ void Scenery_Update(Scenery* this) { if (this->timer_4C != 0) { this->timer_4C--; } + switch (this->obj.status) { case OBJ_INIT: this->obj.status = OBJ_ACTIVE; Object_Init(this->index, this->obj.id); Scenery_Move(this); break; + case OBJ_ACTIVE: Scenery_Move(this); if (this->info.action != NULL) { @@ -2745,12 +2886,14 @@ void Sprite_Update(Sprite* this) { Object_Init(this->index, this->obj.id); Sprite_Move(this); break; + case OBJ_ACTIVE: Sprite_Move(this); if (this->info.action != NULL) { this->info.action(&this->obj); } break; + case OBJ_DYING: Sprite_Move(this); Object_Dying(this->index, this->obj.id); @@ -2765,12 +2908,14 @@ void Item_Update(Item* this) { if (this->timer_4A != 0) { this->timer_4A--; } + switch (this->obj.status) { case OBJ_INIT: this->obj.status = OBJ_ACTIVE; Object_Init(this->index, this->obj.id); Item_Move(this); break; + case OBJ_ACTIVE: Item_Move(this); if (this->info.action != NULL) { @@ -2784,6 +2929,7 @@ void Effect_Update(Effect* this) { if (this->timer_50 != 0) { this->timer_50--; } + switch (this->obj.status) { case OBJ_INIT: this->obj.status = OBJ_ACTIVE; @@ -2808,11 +2954,14 @@ void TexturedLine_Update(TexturedLine* this) { if (this->timer != 0) { this->timer--; } + dx = this->posAA.x - this->posBB.x; dy = this->posAA.y - this->posBB.y; dz = this->posAA.z - this->posBB.z; + this->yRot = Math_Atan2F(dx, dz); this->xRot = -Math_Atan2F(dy, sqrtf(SQ(dx) + SQ(dz))); + if (this->mode != 4) { this->zScale = sqrtf(SQ(dx) + SQ(dy) + SQ(dz)); } @@ -2822,13 +2971,17 @@ void TexturedLine_Update(TexturedLine* this) { (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (gPlayer[0].hitTimer == 0)) { Matrix_RotateX(gCalcMatrix, -this->xRot, MTXF_NEW); Matrix_RotateY(gCalcMatrix, -this->yRot, MTXF_APPLY); + sp44.x = gPlayer[gPlayerNum].pos.x - this->posAA.x; sp44.y = gPlayer[gPlayerNum].pos.y - this->posAA.y; sp44.z = gPlayer[gPlayerNum].trueZpos - this->posAA.z; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); + sp38.x += this->posAA.x; sp38.y += this->posAA.y; sp38.z += this->posAA.z; + if ((fabsf(sp38.x - this->posAA.x) < 30.0f) && (fabsf(sp38.y - this->posAA.y) < 30.0f) && (sp38.z < this->posAA.z) && ((this->posAA.z - this->zScale) < sp38.z)) { if (gCurrentLevel == LEVEL_AQUAS) { @@ -2841,9 +2994,11 @@ void TexturedLine_Update(TexturedLine* this) { } } } + if (((this->posAA.z + gPathProgress) > 1000.0f) && (gLevelMode != LEVELMODE_ALL_RANGE)) { this->mode = 0; } + if (((this->mode == 3) || (this->mode == 50)) && (this->timer == 0)) { this->mode = 0; } @@ -2900,37 +3055,44 @@ void Object_Update(void) { } } } - for (i = 0, sprite = gSprites; i < ARRAY_COUNT(gSprites); i++, sprite++) { + + for (i = 0, sprite = &gSprites[0]; i < ARRAY_COUNT(gSprites); i++, sprite++) { if (sprite->obj.status != OBJ_FREE) { sprite->index = i; Sprite_Update(sprite); } } - for (i = 0, boss = gBosses; i < ARRAY_COUNT(gBosses); i++, boss++) { + + for (i = 0, boss = &gBosses[0]; i < ARRAY_COUNT(gBosses); i++, boss++) { if (boss->obj.status != OBJ_FREE) { boss->index = i; Boss_Update(boss); } } - for (i = 0, actor = gActors; i < ARRAY_COUNT(gActors); i++, actor++) { + + for (i = 0, actor = &gActors[0]; i < ARRAY_COUNT(gActors); i++, actor++) { if (actor->obj.status != OBJ_FREE) { actor->index = i; Actor_Update(actor); } } - for (i = 0, item = gItems; i < ARRAY_COUNT(gItems); i++, item++) { + + for (i = 0, item = &gItems[0]; i < ARRAY_COUNT(gItems); i++, item++) { if (item->obj.status != OBJ_FREE) { item->index = i; Item_Update(item); } } - for (i = 0, effect = gEffects; i < ARRAY_COUNT(gEffects); i++, effect++) { + + for (i = 0, effect = &gEffects[0]; i < ARRAY_COUNT(gEffects); i++, effect++) { if (effect->obj.status != OBJ_FREE) { effect->index = i; Effect_Update(effect); } } + TexturedLine_UpdateAll(); + for (i = 0; i < ARRAY_COUNT(D_enmy_Timer_80161670); i++) { if (D_enmy_Timer_80161670[i] != 0) { D_enmy_Timer_80161670[i]--; diff --git a/src/engine/fox_enmy2.c b/src/engine/fox_enmy2.c index 2ad954ad..f647430c 100644 --- a/src/engine/fox_enmy2.c +++ b/src/engine/fox_enmy2.c @@ -32,30 +32,30 @@ void ActorEvent_SetMessage(u16* msg, s32 character) { } } -void func_enmy2_8006A800(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { - Effect_Initialize(effect); +void func_enmy2_8006A800(Effect361* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { + Effect_Initialize(this); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_361; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; - effect->unk_48 = 3; + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_361; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + this->unk_48 = 3; if (Rand_ZeroOne() < 0.5f) { - effect->unk_48 = -effect->unk_48; + this->unk_48 = -this->unk_48; } - effect->unk_4A = 100; - effect->scale2 = scale2 * 0.25f; - effect->scale1 = 0.3f; + this->unk_4A = 100; + this->scale2 = scale2 * 0.25f; + this->scale1 = 0.3f; if (scale2 < 10.0f) { - effect->scale1 = 0.1f; + this->scale1 = 0.1f; } - effect->obj.rot.z = RAND_FLOAT(360.0f); - Object_SetInfo(&effect->info, effect->obj.id); + this->obj.rot.z = RAND_FLOAT(360.0f); + Object_SetInfo(&this->info, this->obj.id); } void func_enmy2_8006A900(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { @@ -75,21 +75,21 @@ void Actor237_Update(Actor237* this) { void Actor237_Draw(Actor237* this) { } -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; +void Obj54_8006A984(Effect* this, f32 xPos, f32 yPos, f32 zPos) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_365; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->unk_44 = 40; - effect->scale2 = 5.0f; - effect->scale1 = RAND_FLOAT_CENTERED(2.0f); - effect->vel.y = 10.0f; - effect->obj.rot.z = RAND_FLOAT(360.0f); - Object_SetInfo(&effect->info, effect->obj.id); + this->unk_44 = 40; + this->scale2 = 5.0f; + this->scale1 = RAND_FLOAT_CENTERED(2.0f); + this->vel.y = 10.0f; + this->obj.rot.z = RAND_FLOAT(360.0f); + Object_SetInfo(&this->info, this->obj.id); } void Obj54_8006AA3C(f32 xPos, f32 yPos, f32 zPos) { @@ -103,7 +103,7 @@ void Obj54_8006AA3C(f32 xPos, f32 yPos, f32 zPos) { } } -void Scenery54_Update(Scenery_54* this) { +void CoWaterfall_Update(CoWaterfall* this) { Vec3f sp24; Vec3f sp18; @@ -131,7 +131,7 @@ void Actor201_Update(Actor201* this) { f32 sp2C; if (Actor201_8006ABA4(this) && (this->timer_0BC == 0)) { - func_effect_8007F11C(OBJ_EFFECT_353, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, gEnemyShotSpeed); + Effect_EnemyLaser(OBJ_EFFECT_ENEMY_LASER_1, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, gEnemyShotSpeed); this->timer_0BC = 20; } sp2C = this->obj.pos.z + gPathProgress; @@ -157,9 +157,9 @@ void Actor202_Update(Actor202* this) { this->iwork[1] = true; } - if (((gGameFrameCount % 32) == 0)) { - func_effect_8007F11C(OBJ_EFFECT_353, this->obj.pos.x, this->obj.pos.y + 180.0f, this->obj.pos.z, - gEnemyShotSpeed); + if ((gGameFrameCount % 32) == 0) { + Effect_EnemyLaser(OBJ_EFFECT_ENEMY_LASER_1, this->obj.pos.x, this->obj.pos.y + 180.0f, this->obj.pos.z, + gEnemyShotSpeed); } switch (this->state) { @@ -216,7 +216,7 @@ void Actor202_Update(Actor202* this) { func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y + 180.0f, this->obj.pos.z, this->vel.x, this->vel.y, this->vel.z, 8.0f, 30); Object_Kill(&this->obj, this->sfxSource); - func_effect_8007A6F0(&this->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); gHitCount += this->info.bonus; D_ctx_80177850 = 15; } else { @@ -341,7 +341,7 @@ void Actor194_Draw(Actor194* this) { } } -void Scenery42_Update(Scenery_42* this) { +void CoIBeam_Update(CoIBeam* this) { this->obj.pos.x += this->vel.x; this->obj.pos.y += this->vel.y; this->obj.pos.z += this->vel.z; @@ -367,20 +367,20 @@ void Scenery42_Update(Scenery_42* this) { } } -void func_enmy2_8006BA64(Effect* effect, f32 xPos, f32 yPos, f32 zPos) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_375; +void func_enmy2_8006BA64(Effect375* this, f32 xPos, f32 yPos, f32 zPos) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_375; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->scale2 = 0.0f; - effect->scale1 = 0.12f; - effect->obj.rot.y = RAND_FLOAT(360.0f); - effect->unk_60.y = RAND_FLOAT_CENTERED(3.0f); - Object_SetInfo(&effect->info, effect->obj.id); + this->scale2 = 0.0f; + this->scale1 = 0.12f; + this->obj.rot.y = RAND_FLOAT(360.0f); + this->unk_60.y = RAND_FLOAT_CENTERED(3.0f); + Object_SetInfo(&this->info, this->obj.id); } void func_enmy2_8006BB1C(f32 xPos, f32 yPos, f32 zPos) { @@ -445,12 +445,14 @@ void Actor196_Update(Actor196* this) { case 3: if (this->timer_0BC == 1) { - func_effect_8007F11C(OBJ_EFFECT_353, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, - gEnemyShotSpeed); + Effect_EnemyLaser(OBJ_EFFECT_ENEMY_LASER_1, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, + gEnemyShotSpeed); } + if (this->vel.y < 12.0f) { Math_SmoothStepToF(&this->obj.rot.x, 180.0f, 0.1f, 7.0f, 0.01f); } + if (this->obj.pos.y < (gGroundHeight + 10.0f)) { this->obj.pos.y = gGroundHeight; this->state = 4; @@ -664,7 +666,7 @@ void ActorDebris_Update(ActorDebris* this) { (this->timer_0BE == 0)) { func_effect_8007B8F8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 50.0f, this->scale * 10.0f); Object_Kill(&this->obj, this->sfxSource); - func_effect_8007A6F0(&this->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); } break; @@ -675,7 +677,7 @@ void ActorDebris_Update(ActorDebris* this) { (this->timer_0BE == 0)) { func_effect_8007B8F8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 50.0f, this->scale * 10.0f); Object_Kill(&this->obj, this->sfxSource); - func_effect_8007A6F0(&this->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); } break; @@ -696,7 +698,7 @@ void ActorDebris_Update(ActorDebris* this) { (this->timer_0BE == 0)) { func_effect_8007B8F8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 50.0f, this->scale * 10.0f); Object_Kill(&this->obj, this->sfxSource); - func_effect_8007A6F0(&this->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); } break; @@ -707,7 +709,7 @@ void ActorDebris_Update(ActorDebris* this) { func_effect_8007B8F8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 70.0f, this->scale * 20.0f); func_effect_8007B8F8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 70.0f, this->scale * 20.0f); Object_Kill(&this->obj, this->sfxSource); - func_effect_8007A6F0(&this->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); } break; @@ -779,7 +781,7 @@ void ActorDebris_Update(ActorDebris* this) { (this->timer_0BE == 0)) { func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 10.0f); Object_Kill(&this->obj, this->sfxSource); - func_effect_8007A6F0(&this->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); } } else if (((this->state >= 41) && (this->state < 45)) || (this->state == 59)) { if (((this->timer_0BC == 0) || @@ -787,7 +789,7 @@ void ActorDebris_Update(ActorDebris* this) { (this->timer_0BE == 0)) { func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 2.0f * this->scale); Object_Kill(&this->obj, this->sfxSource); - func_effect_8007A6F0(&this->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); } if (Play_CheckDynaFloorCollision(&sp44, &sp40, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z)) { func_effect_8007B228(this->obj.pos.x, sp44, this->obj.pos.z, 2.0f); @@ -804,7 +806,7 @@ void ActorDebris_Update(ActorDebris* this) { func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, this->vel.z, this->scale * 1.5f, 4); Object_Kill(&this->obj, this->sfxSource); - func_effect_8007A6F0(&this->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); } } else { if ((this->state == 3) && ((this->timer_0BC % 8) == 0)) { @@ -1008,7 +1010,7 @@ static EventActorInfo sEventActorInfo[108] = { /* 68 */ { D_SY_60205D0, D_SY_603445C, 3.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 1.0f, 1 }, /* 69 */ { D_SY_60036A0, D_SY_6034664, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, /* 70 */ { D_SY_601AD70, gNoHitbox, 4.0f, 100.0f, 3000.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, - /* 71 */ { D_arwing_3007650, gNoHitbox, 1.0f, 100.0f, 3000.0f, 2, 0, EISFX_OB_WING, 0, 0.0f, 1 }, + /* 71 */ { aArwingItemLasersDL, gNoHitbox, 1.0f, 100.0f, 3000.0f, 2, 0, EISFX_OB_WING, 0, 0.0f, 1 }, /* 72 */ { D_SY_60034D0, D_SY_60347D4, 3.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, /* 73 */ { D_SY_6005360, D_SY_6034770, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, /* 74 */ { D_SY_600F6C0, D_SY_60347F0, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, @@ -1761,7 +1763,7 @@ void ActorEvent_SetupEffect347(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 effect->scale1 = scale1; effect->unk_44 = 100; Object_SetInfo(&effect->info, effect->obj.id); - func_effect_8007A6F0(&effect->obj.pos, NA_SE_EN_EXPLOSION_M); + Effect_SpawnTimedSfxAtPos(&effect->obj.pos, NA_SE_EN_EXPLOSION_M); } void ActorEvent_SpawnEffect347(f32 xPos, f32 yPos, f32 zPos, f32 scale1) { @@ -1790,7 +1792,7 @@ void ActorEvent_SetupEffect394(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 effect->unk_7A = 18; Object_SetInfo(&effect->info, effect->obj.id); effect->info.damage = 40; - func_effect_8007A6F0(&effect->obj.pos, NA_SE_EN_EXPLOSION_M); + Effect_SpawnTimedSfxAtPos(&effect->obj.pos, NA_SE_EN_EXPLOSION_M); } void ActorEvent_SpawnEffect394(f32 xPos, f32 yPos, f32 zPos, f32 scale1) { @@ -1819,9 +1821,9 @@ void ActorEvent_8006F254(ActorEvent* this) { sp54.z = gEnemyShotSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48); - func_effect_8007F04C(OBJ_EFFECT_353, this->obj.pos.x + sp48.x, this->obj.pos.y + sp48.y, this->obj.pos.z + sp48.z, - this->obj.rot.x, this->obj.rot.y, this->obj.rot.z, this->vwork[29].x, this->vwork[29].y, - this->vwork[29].z + this->rot_0F4.z, sp48.x, sp48.y, sp48.z, 1.0f); + func_effect_8007F04C(OBJ_EFFECT_ENEMY_LASER_1, this->obj.pos.x + sp48.x, this->obj.pos.y + sp48.y, + this->obj.pos.z + sp48.z, this->obj.rot.x, this->obj.rot.y, this->obj.rot.z, this->vwork[29].x, + this->vwork[29].y, this->vwork[29].z + this->rot_0F4.z, sp48.x, sp48.y, sp48.z, 1.0f); } void ActorEvent_ProcessActions(ActorEvent* this) { @@ -1844,8 +1846,8 @@ void ActorEvent_ProcessActions(ActorEvent* this) { case EVACT_2: // shoot at player if (this->obj.pos.z < (gPlayer[0].trueZpos - 600.0f)) { - func_effect_8007F11C(OBJ_EFFECT_353, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, - gEnemyShotSpeed); + Effect_EnemyLaser(OBJ_EFFECT_ENEMY_LASER_1, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, + gEnemyShotSpeed); } this->unk_048 = EVACT_NONE; break; @@ -1895,15 +1897,15 @@ void ActorEvent_ProcessActions(ActorEvent* this) { case EVACT_6: if (this->obj.pos.z < (gPlayer[0].trueZpos - 600.0f)) { - func_effect_8007F11C(OBJ_EFFECT_355, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, - gEnemyShotSpeed); + Effect_EnemyLaser(OBJ_EFFECT_355, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, + gEnemyShotSpeed); } this->unk_048 = EVACT_NONE; break; case EVACT_7: if (this->obj.pos.z < (gPlayer[0].trueZpos - 600.0f)) { - func_effect_8007F11C(OBJ_EFFECT_356, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 60.0f); + Effect_EnemyLaser(OBJ_EFFECT_356, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 60.0f); } this->unk_048 = EVACT_NONE; break; @@ -1913,8 +1915,8 @@ void ActorEvent_ProcessActions(ActorEvent* this) { sp6C.y = gPlayer[0].pos.y; gPlayer[0].pos.x += RAND_FLOAT_CENTERED(300.0f); gPlayer[0].pos.y += RAND_FLOAT_CENTERED(300.0f); - func_effect_8007F11C(OBJ_EFFECT_353, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, - gEnemyShotSpeed); + Effect_EnemyLaser(OBJ_EFFECT_ENEMY_LASER_1, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, + gEnemyShotSpeed); gPlayer[0].pos.x = sp6C.x; gPlayer[0].pos.y = sp6C.y; this->unk_048 = EVACT_NONE; @@ -1943,7 +1945,7 @@ void ActorEvent_ProcessActions(ActorEvent* this) { this->vel.z, this->scale * 3.0f, 15); Actor_Despawn(this); Object_Kill(&this->obj, this->sfxSource); - func_effect_8007A6F0(&this->obj.pos, NA_SE_EN_EXPLOSION_M); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_M); break; case EVACT_DESPAWN: @@ -1967,16 +1969,16 @@ void ActorEvent_ProcessActions(ActorEvent* this) { break; case EVACT_16: - func_effect_8007F11C(OBJ_EFFECT_353, this->obj.pos.x + 190.0f, this->obj.pos.y + 90.0f, - this->obj.pos.z + 220.0f, gEnemyShotSpeed); - func_effect_8007F11C(OBJ_EFFECT_353, this->obj.pos.x - 190.0f, this->obj.pos.y + 90.0f, - this->obj.pos.z + 220.0f, gEnemyShotSpeed); + Effect_EnemyLaser(OBJ_EFFECT_ENEMY_LASER_1, this->obj.pos.x + 190.0f, this->obj.pos.y + 90.0f, + this->obj.pos.z + 220.0f, gEnemyShotSpeed); + Effect_EnemyLaser(OBJ_EFFECT_ENEMY_LASER_1, this->obj.pos.x - 190.0f, this->obj.pos.y + 90.0f, + this->obj.pos.z + 220.0f, gEnemyShotSpeed); this->unk_048 = EVACT_NONE; break; case EVACT_17: if (this->obj.pos.z < (gPlayer[0].cam.eye.z - 600.0f)) { - func_effect_8007F20C(OBJ_EFFECT_353, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, + func_effect_8007F20C(OBJ_EFFECT_ENEMY_LASER_1, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, gEnemyShotSpeed); } this->unk_048 = EVACT_NONE; @@ -2047,7 +2049,7 @@ void ActorEvent_8006FEEC(ActorEvent* this) { this->itemDrop = DROP_NONE; Actor_Despawn(this); Object_Kill(&this->obj, this->sfxSource); - func_effect_8007A6F0(&this->obj.pos, NA_SE_EN_BIRD_DOWN); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_BIRD_DOWN); func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 4.0f); } else { AUDIO_PLAY_SFX(NA_SE_EN_BIRD_DAMAGE, this->sfxSource, 4); @@ -3161,7 +3163,7 @@ void ActorEvent_Update(ActorEvent* this) { var_fv0 = 0.0f; } - func_effect_8007F04C(OBJ_EFFECT_353, this->obj.pos.x + spAC.x + spA0.x, + func_effect_8007F04C(OBJ_EFFECT_ENEMY_LASER_1, this->obj.pos.x + spAC.x + spA0.x, this->obj.pos.y + spAC.y + spA0.y + var_fv0, this->obj.pos.z + spAC.z + spA0.z, this->fwork[15], this->obj.rot.y, this->obj.rot.z, this->vwork[29].x, this->vwork[29].y, this->vwork[29].z + this->rot_0F4.z, spAC.x, spAC.y, spAC.z, @@ -3653,7 +3655,7 @@ void ActorEvent_Update(ActorEvent* this) { effect->unk_60.z = -effect->unk_60.z; } - if (gGameFrameCount & 2) { + if ((gGameFrameCount & 2) != 0) { effect->vel.y = -effect->vel.y; } } @@ -3905,6 +3907,7 @@ void ActorEvent_Draw(ActorEvent* this) { gSPDisplayList(gMasterDisp++, sEventActorInfo[this->eventType].dList); gDPSetTextureFilter(gMasterDisp++, G_TF_BILERP); break; + default: if ((this->eventType < EVID_200) && (sEventActorInfo[this->eventType].dList != NULL)) { gSPDisplayList(gMasterDisp++, sEventActorInfo[this->eventType].dList); @@ -4101,7 +4104,7 @@ void ActorEvent_Draw(ActorEvent* this) { case EVID_79: temp_s0 = this->state; this->state = 2; // actor 235 state - Zoness_80190430(this); + Zoness_Actor235_Draw(this); this->state = temp_s0; break; @@ -4261,7 +4264,7 @@ void func_enmy2_800763A4(Actor* actor) { actor->scale * 3.0f, 5); func_effect_8007B228(actor->obj.pos.x, sp58, actor->obj.pos.z, 2.0f); actor->timer_0BE = 2; - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); return; } @@ -4272,7 +4275,7 @@ void func_enmy2_800763A4(Actor* actor) { actor->obj.pos.z - actor->vel.z, 0.0f, 0.0f, 0.0f, actor->scale * 4.0f, 20); func_enmy_80062C38(actor->obj.pos.x, actor->obj.pos.z); actor->timer_0BE = 2; - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); return; } } else { @@ -4304,9 +4307,9 @@ void func_enmy2_800763A4(Actor* actor) { actor->obj.pos.z - actor->vel.z, actor->scale * 3.0f); if ((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->aiType < AI360_KATT)) { - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); } else { - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); } if ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->eventType == EVID_SLIPPY_METEO)) { @@ -4372,9 +4375,9 @@ void func_enmy2_800763A4(Actor* actor) { actor->timer_0BE = 2; if ((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->aiType < AI360_KATT)) { - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); } else { - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); } } } @@ -4410,9 +4413,9 @@ void func_enmy2_800763A4(Actor* actor) { actor->timer_0BE = 2; if ((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->aiType < AI360_KATT)) { - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); } else { - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); } } } diff --git a/src/engine/fox_game.c b/src/engine/fox_game.c index a695fa6c..d4006f58 100644 --- a/src/engine/fox_game.c +++ b/src/engine/fox_game.c @@ -95,7 +95,7 @@ void Game_SetGameState(void) { gLevelPhase = gNextLevelPhase; gNextLevelPhase = 0; if ((gLevelPhase != 0) && (gCurrentLevel != LEVEL_VENOM_ANDROSS)) { - D_ctx_8017782C = 0; + D_ctx_8017782C = false; } break; case GSTATE_MAP: diff --git a/src/engine/fox_hud.c b/src/engine/fox_hud.c index b6c2cde7..f59c8ecb 100644 --- a/src/engine/fox_hud.c +++ b/src/engine/fox_hud.c @@ -1322,7 +1322,7 @@ void HUD_DrawStatusScreens(void) { s32 func_hud_800886B8(void) { s32 var_v1 = 0; - f32 var_fv1 = gInputPress->stick_y; // related to the vertical height of the arwing + f32 var_fv1 = gInputPress->stick_y; if ((var_fv1 != 0.0f) && (D_80161810[4] != 0)) { return 0; @@ -2159,27 +2159,28 @@ s32 func_hud_8008A4DC(void) { return 0; } -s32 func_hud_8008AC54(s32 arg0) { +// Why is this function here in fox_hud? Weird. +s32 Hud_MissileSeekModeCheck(s32 missileSeekMode) { Actor* actor; s32 i; s32 ret = 0; - for (i = 0, actor = gActors; i < 60; i++, actor++) { - switch (arg0) { - case 0: - if ((actor->obj.status == OBJ_ACTIVE) && (actor->obj.id == OBJ_ACTOR_190)) { + for (i = 0, actor = &gActors[0]; i < 60; i++, actor++) { + switch (missileSeekMode) { + case 0: // follows teammates + if ((actor->obj.status == OBJ_ACTIVE) && (actor->obj.id == OBJ_MISSILE_SEEK_TEAM)) { ret++; } break; - case 1: - if ((actor->obj.status == OBJ_ACTIVE) && (actor->obj.id == OBJ_ACTOR_191)) { + case 1: // follows player + if ((actor->obj.status == OBJ_ACTIVE) && (actor->obj.id == OBJ_MISSILE_SEEK_PLAYER)) { ret++; } break; - case 2: - if (((actor->obj.id == OBJ_ACTOR_190) || (actor->obj.id == OBJ_ACTOR_191)) && + case 2: // follows either + if (((actor->obj.id == OBJ_MISSILE_SEEK_TEAM) || (actor->obj.id == OBJ_MISSILE_SEEK_PLAYER)) && (actor->obj.status == OBJ_ACTIVE)) { ret++; } @@ -3526,7 +3527,7 @@ void func_hud_8008F96C(void) { } if (gCurrentLevel == LEVEL_TRAINING) { - Training_801988E0(); + Training_RingPassCount_Draw(); } } @@ -4186,7 +4187,7 @@ bool func_hud_800915FC(Actor* actor) { y = 720.0f; } - if (boss->obj.id == OBJ_BOSS_293) { + if (boss->obj.id == OBJ_BOSS_CO_CARRIER) { y = 280.0f; } @@ -5306,7 +5307,7 @@ f32 D_800D24C0[] = { 128.0f, 128.0f, 255.0f, 128.0f }; s32 D_800D24C8[] = { 0, 900 }; f32 D_800D24CC = 0.02f; -void func_hud_80094954(Effect* effect) { +void Hud_Effect363_Update(Effect* effect) { Player* player = &gPlayer[0]; if ((player->state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && (gCurrentLevel == LEVEL_AQUAS) && (player->csState < 2)) { @@ -5363,7 +5364,7 @@ void func_hud_80094954(Effect* effect) { } } -void func_hud_80094BBC(Effect* effect) { +void Hud_Effect363_Draw(Effect* effect) { if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && (gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].csState < 2)) { RCP_SetupDL(&gMasterDisp, SETUPDL_68); diff --git a/src/engine/fox_pause.c b/src/engine/fox_pause.c index ee7de964..0345e1c9 100644 --- a/src/engine/fox_pause.c +++ b/src/engine/fox_pause.c @@ -26,12 +26,14 @@ void func_pause_800A3E00(void) { D_ctx_80177868 = 1; } break; + case 1: D_ctx_80177868 = 2; gDrawMode = DRAW_UNK_7; gCsCamEyeX = gCsCamEyeY = gCsCamEyeZ = gCsCamAtX = gCsCamAtY = 0.0f; gCsCamAtZ = -10.0f; break; + case 2: if ((gControllerPress[0].button & START_BUTTON) || (gControllerPress[1].button & START_BUTTON)) { Audio_PlayPauseSfx(0); @@ -41,6 +43,7 @@ void func_pause_800A3E00(void) { gNextGameStateTimer = 0; } break; + case 3: if (gNextGameStateTimer == 0) { gPlayState = PLAY_UPDATE; diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index bbbff3fa..6651bf43 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -342,7 +342,7 @@ void Play_Setup360_CO(void) { s32 i; s32 j; - gLevelObjects = SEGMENTED_TO_VIRTUAL(D_CO_603B074); + gLevelObjects = SEGMENTED_TO_VIRTUAL(aCoAllRangeLevelObjects); for (j = 0, scenery360 = gScenery360; j < 200; j++) { if (gLevelObjects[j].id <= OBJ_INVALID) { @@ -357,7 +357,7 @@ void Play_Setup360_CO(void) { scenery360->obj.pos.y = gLevelObjects[j].yPos; scenery360->obj.rot.y = gLevelObjects[j].rot.y; Object_SetInfo(&scenery360->info, scenery360->obj.id); - if (scenery360->obj.id == OBJ_SCENERY_1) { + if (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_1) { scenery360->info.dList = D_CO_6020760; } scenery360++; @@ -385,7 +385,7 @@ void Play_Setup360_CO(void) { gBosses[i].obj.pos.x = 0.0f; gBosses[i].obj.pos.y = 0.0f; gBosses[i].obj.pos.z = 0.0f; - gBosses[i].obj.id = OBJ_BOSS_292; + gBosses[i].obj.id = OBJ_BOSS_CO_GRANGA; Object_SetInfo(&gBosses[i].info, gBosses[i].obj.id); } @@ -461,10 +461,12 @@ void Play_Setup(void) { gAllRangeCheckpoint = gSavedObjectLoadIndex = 0; gSavedPathProgress = 0.0f; gSavedHitCount = gCsFrameCount = gLevelStartStatusScreenTimer = gLevelClearScreenTimer = gRadioState = 0; - D_ctx_8017782C = 1; + D_ctx_8017782C = true; + if (((gCurrentLevel == LEVEL_VENOM_2) && (gNextLevelPhase == 2)) || (gCurrentLevel == LEVEL_VENOM_ANDROSS)) { return; } + for (i = 1; i < 4; i++) { if (gSavedTeamShields[i] < 0) { if (gSavedTeamShields[i] == -1) { @@ -1212,8 +1214,8 @@ bool Play_CheckPolyCollision(ObjectId objId, f32 arg1, f32 arg2, f32 arg3, f32 a case OBJ_ACTOR_180: colId = COL1_0; break; - case OBJ_SCENERY_4: - case OBJ_SCENERY_5: + case OBJ_SCENERY_CO_BUMP_4: + case OBJ_SCENERY_CO_BUMP_5: colId = COL2_1; useCol2 = true; break; @@ -1235,7 +1237,7 @@ bool Play_CheckPolyCollision(ObjectId objId, f32 arg1, f32 arg2, f32 arg3, f32 a case ACTOR_EVENT_ID: colId = COL1_3; break; - case OBJ_BOSS_SZ: + case OBJ_BOSS_SZ_GREAT_FOX: colId = COL1_8; break; case OBJ_SCENERY_ME_TUNNEL: @@ -1257,11 +1259,11 @@ bool Play_CheckPolyCollision(ObjectId objId, f32 arg1, f32 arg2, f32 arg3, f32 a colId = COL2_7; useCol2 = true; break; - case OBJ_SCENERY_2: + case OBJ_SCENERY_CO_BUMP_2: colId = COL2_2; useCol2 = true; break; - case OBJ_SCENERY_3: + case OBJ_SCENERY_CO_BUMP_3: case OBJ_SCENERY_69: colId = COL2_3; useCol2 = true; @@ -1331,10 +1333,10 @@ bool Play_CheckPolyCollision(ObjectId objId, f32 arg1, f32 arg2, f32 arg3, f32 a case OBJ_SCENERY_146: case OBJ_SCENERY_147: case OBJ_SCENERY_148: - case OBJ_SCENERY_40: - case OBJ_SCENERY_41: - case OBJ_SCENERY_42: - case OBJ_SCENERY_43: + case OBJ_SCENERY_CO_BUILDING_9: + case OBJ_SCENERY_CO_BUILDING_10: + case OBJ_SCENERY_IBEAM: + case OBJ_SCENERY_ZO_ROCK_1: case OBJ_SCENERY_44: case OBJ_SCENERY_45: case OBJ_SCENERY_46: @@ -1344,9 +1346,9 @@ bool Play_CheckPolyCollision(ObjectId objId, f32 arg1, f32 arg2, f32 arg3, f32 a case OBJ_SCENERY_51: case OBJ_SCENERY_52: case OBJ_SCENERY_53: - case OBJ_SCENERY_54: - case OBJ_SCENERY_55: - case OBJ_SCENERY_56: + case OBJ_SCENERY_CO_WATERFALL: + case OBJ_SCENERY_CO_ROCKWALL: + case OBJ_SCENERY_CO_DOORS: case OBJ_SCENERY_57: case OBJ_SCENERY_58: case OBJ_SCENERY_59: @@ -1645,8 +1647,8 @@ void Player_CollisionCheck(Player* player) { if ((scenery360->obj.id == OBJ_SCENERY_117) || (scenery360->obj.id == OBJ_SCENERY_143) || (scenery360->obj.id == OBJ_SCENERY_141) || (scenery360->obj.id == OBJ_SCENERY_149) || (scenery360->obj.id == OBJ_SCENERY_150) || (scenery360->obj.id == OBJ_SCENERY_148) || - (scenery360->obj.id == OBJ_SCENERY_160) || (scenery360->obj.id == OBJ_SCENERY_1) || - (scenery360->obj.id == OBJ_SCENERY_3) || (scenery360->obj.id == OBJ_SCENERY_140)) { + (scenery360->obj.id == OBJ_SCENERY_160) || (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_1) || + (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_3) || (scenery360->obj.id == OBJ_SCENERY_140)) { temp_v0 = Player_CheckPolyCollision(player, scenery360->obj.id, scenery360->obj.pos.x, scenery360->obj.pos.y, scenery360->obj.pos.z, scenery360->obj.rot.x, scenery360->obj.rot.y, @@ -1666,7 +1668,7 @@ void Player_CollisionCheck(Player* player) { scenery360->obj.rot.y, scenery360->obj.rot.z, 0.0f, 0.0f, 0.0f); if ((temp_v0 != 0) && (temp_v0 < 0)) { if (player->whooshTimer == 0) { - func_effect_8007A6F0(&scenery360->obj.pos, NA_SE_PASS); + Effect_SpawnTimedSfxAtPos(&scenery360->obj.pos, NA_SE_PASS); } player->whooshTimer += 2; if (player->whooshTimer >= 4) { @@ -1682,7 +1684,7 @@ void Player_CollisionCheck(Player* player) { if (temp_v0 != 0) { if (temp_v0 < 0) { if (player->whooshTimer == 0) { - func_effect_8007A6F0(&scenery360->obj.pos, NA_SE_PASS); + Effect_SpawnTimedSfxAtPos(&scenery360->obj.pos, NA_SE_PASS); } player->whooshTimer += 2; if (player->whooshTimer >= 4) { @@ -1749,11 +1751,11 @@ void Player_CollisionCheck(Player* player) { (scenery->obj.id != OBJ_SCENERY_71) && (scenery->obj.id != OBJ_SCENERY_73) && (scenery->obj.id != OBJ_SCENERY_74) && (scenery->obj.id != OBJ_SCENERY_69) && ((player->trueZpos - 2000.0f) < scenery->obj.pos.z)) { - if ((scenery->obj.id == OBJ_SCENERY_1) || (scenery->obj.id == OBJ_SCENERY_4) || - (scenery->obj.id == OBJ_SCENERY_5) || (scenery->obj.id == OBJ_SCENERY_47) || + if ((scenery->obj.id == OBJ_SCENERY_CO_BUMP_1) || (scenery->obj.id == OBJ_SCENERY_CO_BUMP_4) || + (scenery->obj.id == OBJ_SCENERY_CO_BUMP_5) || (scenery->obj.id == OBJ_SCENERY_47) || (scenery->obj.id == OBJ_SCENERY_117) || (scenery->obj.id == OBJ_SCENERY_120) || (scenery->obj.id == OBJ_SCENERY_124) || (scenery->obj.id == OBJ_SCENERY_126) || - (scenery->obj.id == OBJ_SCENERY_2) || (scenery->obj.id == OBJ_SCENERY_3)) { + (scenery->obj.id == OBJ_SCENERY_CO_BUMP_2) || (scenery->obj.id == OBJ_SCENERY_CO_BUMP_3)) { spC8.x = scenery->obj.pos.x - player->pos.x; spC8.z = scenery->obj.pos.z - player->trueZpos; if (sqrtf(SQ(spC8.x) + SQ(spC8.z)) < 1100.0f) { @@ -1766,7 +1768,7 @@ void Player_CollisionCheck(Player* player) { } } else { padB0 = scenery->obj.rot.y; - if (scenery->info.action == (ObjectFunc) func_enmy_80066EA8) { + if (scenery->info.action == (ObjectFunc) SceneryRotateTowardsCamera) { padB0 = 0.0f; } temp_v0 = Player_CheckHitboxCollision( @@ -1788,7 +1790,7 @@ void Player_CollisionCheck(Player* player) { if (player->whooshTimer >= 4) { player->whooshTimer = 4; } - } else if (scenery->obj.id == OBJ_SCENERY_54) { + } else if (scenery->obj.id == OBJ_SCENERY_CO_WATERFALL) { if (player->whooshTimer == 0) { AUDIO_PLAY_SFX(NA_SE_IN_SPLASH_L, scenery->sfxSource, 0); } @@ -1798,7 +1800,8 @@ void Player_CollisionCheck(Player* player) { } } else { Player_ApplyDamage(player, temp_v0, scenery->info.damage); - if ((scenery->obj.id == OBJ_SCENERY_48) || (scenery->obj.id == OBJ_SCENERY_55) || + if ((scenery->obj.id == OBJ_SCENERY_48) || + (scenery->obj.id == OBJ_SCENERY_CO_ROCKWALL) || (scenery->obj.id == OBJ_SCENERY_49)) { Matrix_RotateY(gCalcMatrix, scenery->obj.rot.y * M_DTOR, MTXF_NEW); spC8.x = -(player->baseSpeed + player->boostSpeed) * 0.7f; @@ -1841,8 +1844,8 @@ void Player_CollisionCheck(Player* player) { } for (i = 0, boss = gBosses; i < ARRAY_COUNT(gBosses); i++, boss++) { if (boss->obj.status == OBJ_ACTIVE) { - if ((boss->obj.id == OBJ_BOSS_VE2) || (boss->obj.id == OBJ_BOSS_FO) || (boss->obj.id == OBJ_BOSS_SZ) || - (boss->obj.id == OBJ_BOSS_309)) { + if ((boss->obj.id == OBJ_BOSS_VE2) || (boss->obj.id == OBJ_BOSS_FO) || + (boss->obj.id == OBJ_BOSS_SZ_GREAT_FOX) || (boss->obj.id == OBJ_BOSS_309)) { temp_v0 = Player_CheckPolyCollision(player, boss->obj.id, boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, boss->obj.rot.x, boss->obj.rot.y, boss->obj.rot.z); @@ -1898,7 +1901,7 @@ void Player_CollisionCheck(Player* player) { break; } Player_ApplyDamage(player, temp_v0, boss->info.damage); - if ((boss->obj.id == OBJ_BOSS_303) && ((boss->state == 2) || (boss->state == 3)) && + if ((boss->obj.id == OBJ_BOSS_SX_SPYBORG) && ((boss->state == 2) || (boss->state == 3)) && (sp98 >= 9)) { player->knockback.y = -100.0f; } @@ -1996,7 +1999,7 @@ void Player_CollisionCheck(Player* player) { } } else { actor->dmgType = DMG_COLLISION; - if (actor->obj.id == OBJ_ACTOR_190) { + if (actor->obj.id == OBJ_MISSILE_SEEK_TEAM) { actor->dmgType = -1; } if (actor->info.damage) { @@ -2212,8 +2215,8 @@ void Player_FloorCheck(Player* player) { for (sp144 = 0, scenery360 = gScenery360; sp144 < 200; sp144++, scenery360++) { if ((scenery360->obj.status == OBJ_ACTIVE) && ((scenery360->obj.id == OBJ_SCENERY_150) || (scenery360->obj.id == OBJ_SCENERY_149) || - (scenery360->obj.id == OBJ_SCENERY_148) || (scenery360->obj.id == OBJ_SCENERY_1) || - (scenery360->obj.id == OBJ_SCENERY_3)) && + (scenery360->obj.id == OBJ_SCENERY_148) || (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_1) || + (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_3)) && (fabsf(scenery360->obj.pos.x - player->pos.x) < 2500.0f) && (fabsf(scenery360->obj.pos.z - player->trueZpos) < 2500.0f)) { tempx = scenery360->obj.pos.x; @@ -2246,7 +2249,7 @@ void Player_FloorCheck(Player* player) { } } else { colId = COL2_0; - if (scenery360->obj.id == OBJ_SCENERY_3) { + if (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_3) { colId = COL2_3; } if (func_col2_800A3690(&spD4, &spC8, colId, &spBC)) { @@ -2263,14 +2266,14 @@ void Player_FloorCheck(Player* player) { (sp144 < 50) && (gLevelMode == LEVELMODE_ON_RAILS) && (gCurrentLevel != LEVEL_VENOM_1); sp144++, scenery++) { if ((scenery->obj.status == OBJ_ACTIVE) && ((player->trueZpos - 3000.0f) < scenery->obj.pos.z) && - (scenery->obj.id != OBJ_SCENERY_0) && (scenery->obj.id != OBJ_SCENERY_8)) { + (scenery->obj.id != OBJ_SCENERY_CO_STONE_ARCH) && (scenery->obj.id != OBJ_SCENERY_CO_HIGHWAY_3)) { tempx = scenery->obj.pos.x; tempy = scenery->obj.pos.y; tempz = scenery->obj.pos.z; sp120 = scenery->obj.rot.y; - if ((scenery->obj.id == OBJ_SCENERY_3) || (scenery->obj.id == OBJ_SCENERY_2) || - (scenery->obj.id == OBJ_SCENERY_47) || (scenery->obj.id == OBJ_SCENERY_4) || - (scenery->obj.id == OBJ_SCENERY_5)) { + if ((scenery->obj.id == OBJ_SCENERY_CO_BUMP_3) || (scenery->obj.id == OBJ_SCENERY_CO_BUMP_2) || + (scenery->obj.id == OBJ_SCENERY_47) || (scenery->obj.id == OBJ_SCENERY_CO_BUMP_4) || + (scenery->obj.id == OBJ_SCENERY_CO_BUMP_5)) { Matrix_RotateY(gCalcMatrix, -sp120 * M_DTOR, MTXF_NEW); for (var_fs1 = var_fs0 = -50.0f; var_fs0 > -500.0f; var_fs0 -= 5.0f, var_fs1 -= 5.0f) { spEC.x = player->pos.x - tempx; @@ -2292,11 +2295,12 @@ void Player_FloorCheck(Player* player) { if (scenery->obj.id == OBJ_SCENERY_47) { colId = COL2_7; } - if (scenery->obj.id == OBJ_SCENERY_2) { + if (scenery->obj.id == OBJ_SCENERY_CO_BUMP_2) { colId = COL2_2; - } else if (scenery->obj.id == OBJ_SCENERY_3) { + } else if (scenery->obj.id == OBJ_SCENERY_CO_BUMP_3) { colId = COL2_3; - } else if ((scenery->obj.id == OBJ_SCENERY_4) || (scenery->obj.id == OBJ_SCENERY_5)) { + } else if ((scenery->obj.id == OBJ_SCENERY_CO_BUMP_4) || + (scenery->obj.id == OBJ_SCENERY_CO_BUMP_5)) { colId = COL2_1; } if (func_col2_800A3690(&spD4, &spC8, colId, &spBC)) { @@ -2312,7 +2316,7 @@ void Player_FloorCheck(Player* player) { hitboxData = scenery->info.hitbox; count = *hitboxData; if (count != 0) { - if (scenery->info.action == (ObjectFunc) func_enmy_80066EA8) { + if (scenery->info.action == (ObjectFunc) SceneryRotateTowardsCamera) { sp120 = 0.0f; } hitboxData++; @@ -2543,7 +2547,7 @@ void Player_InitVersus(void) { Player_Initialize(&gPlayer[i]); Player_Setup(&gPlayer[i]); Player_Update360(&gPlayer[i]); - Camera_Update360(&gPlayer[i], 1); + Camera_Update360(&gPlayer[i], true); } Play_ClearObjectData(); } @@ -2665,12 +2669,12 @@ void Play_Init(void) { switch (gCurrentLevel) { case LEVEL_SECTOR_Z: if (!D_ctx_8017782C) { - SectorZ_8019EA68(); + SectorZ_LoadLevelObjects(); ActorAllRange_SpawnTeam(); } break; case LEVEL_FORTUNA: - Fortuna_8018BA2C(); + Fortuna_LoadLevelObjects(); ActorAllRange_SpawnTeam(); break; case LEVEL_KATINA: @@ -2686,7 +2690,7 @@ void Play_Init(void) { } break; case LEVEL_VENOM_2: - Venom2_80196968(); + Venom2_LoadLevelObjects(); if (gLevelPhase == 0) { ActorAllRange_SpawnTeam(); } @@ -4274,7 +4278,7 @@ void Player_Setup(Player* playerx) { } break; } - Camera_Update360(player, 1); + Camera_Update360(player, true); } player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->wingPosition = gLevelType; @@ -4291,7 +4295,7 @@ void Player_Setup(Player* playerx) { player->yRot_114 = 188.0f; player->hideShadow = true; } - Camera_UpdateArwing360(player, 1); + Camera_UpdateArwing360(player, true); } else { player->unk_014 = 1.0f; player->unk_018 = 1.0f; @@ -4302,7 +4306,7 @@ void Player_Setup(Player* playerx) { D_ctx_80177A10[j] = 0; D_ctx_80177A48[j] = 0.0f; } - D_ctx_8017782C = 0; + D_ctx_8017782C = false; gAllRangeCheckpoint = 0; switch (gCurrentLevel) { case LEVEL_CORNERIA: @@ -5497,7 +5501,7 @@ void Player_Update(Player* player) { Player_Initialize(player); Player_Setup(player); Player_Update360(player); - Camera_Update360(player, 1); + Camera_Update360(player, true); Player_PlaySfx(player->sfxSource, NA_SE_ARWING_BOOST, player->num); player->unk_190 = player->unk_194 = 5.0f; } else if (player->attacker >= 0) { @@ -5787,7 +5791,7 @@ void Camera_FollowPlayer(Player* player, s32 playerNum, bool arg2) { Math_SmoothStepToF(&player->camRoll, 0.0f, 0.05f, 5.0f, 0.00001f); } -void Camera_UpdateArwing360(Player* player, s32 arg1) { +void Camera_UpdateArwing360(Player* player, bool arg1) { Vec3f sp74; Vec3f sp68; f32 temp1; @@ -5855,7 +5859,7 @@ void Camera_UpdateArwing360(Player* player, s32 arg1) { Math_SmoothStepToF(&player->cam.at.z, atZ, player->unk_01C, 30000.0f, 0); Math_SmoothStepToF(&player->unk_018, 0.2f, 0.1f, 0.005f, 0); Math_SmoothStepToF(&player->unk_01C, 1.0f, 0.1f, 0.005f, 0); - if (arg1 != 0) { + if (arg1) { player->cam.eye.x = eyeX; player->cam.eye.y = eyeY; player->cam.eye.z = eyeZ; @@ -5999,7 +6003,7 @@ void Camera_SetStarfieldPos(f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 } } -void Camera_Update360(Player* player, s32 arg1) { +void Camera_Update360(Player* player, bool arg1) { switch (player->form) { case FORM_ON_FOOT: Camera_UpdateOnFoot360(player, arg1); @@ -6031,7 +6035,7 @@ void Camera_Update(Player* player) { } break; case LEVELMODE_ALL_RANGE: - Camera_Update360(player, 0); + Camera_Update360(player, false); break; case LEVELMODE_UNK_2: Turret_UpdateCamera(player); @@ -6040,7 +6044,7 @@ void Camera_Update(Player* player) { break; case PLAYERSTATE_1C8_U_TURN: player->camRoll -= player->camRoll * 0.1f; - Camera_Update360(player, 0); + Camera_Update360(player, false); break; case PLAYERSTATE_1C8_DOWN: if ((gLevelMode == LEVELMODE_ON_RAILS) && (player->form == FORM_ARWING)) { @@ -6158,7 +6162,7 @@ void Play_UpdateLevel(void) { switch (gCurrentLevel) { case LEVEL_TRAINING: if (gLevelMode == LEVELMODE_ALL_RANGE) { - Training_8019949C(); + Training_SpawnEnemies(); } break; case LEVEL_VERSUS: @@ -6183,7 +6187,7 @@ void Play_UpdateLevel(void) { gPlayer[0].csState = 0; gPlayer[0].draw = true; gPlayer[0].pos.z = 15000.0f; - Camera_Update360(gPlayer, 1); + Camera_Update360(gPlayer, true); gFillScreenAlpha = 255; gFillScreenAlphaStep = 255; gFillScreenAlphaTarget = 255; @@ -6436,7 +6440,7 @@ void Play_Main(void) { gPlayer[0].zPath = gPlayer[0].zPathVel = gPathVelZ = gPathProgress = 0.0f; } if (gPlayState != PLAY_PAUSE) { - (void) "play_time = %d\n"; + PRINTF("play_time = %d\n"); gGameFrameCount++; } switch (gPlayState) { @@ -6475,7 +6479,7 @@ void Play_Main(void) { gCamCount = 1; gBgColor = 0; gCsFrameCount = gLevelClearScreenTimer = gLevelStartStatusScreenTimer = gRadioState = 0; - D_ctx_8017782C = 0; + D_ctx_8017782C = false; } if (gVersusMode) { Versus_Main(); diff --git a/src/engine/fox_reset.c b/src/engine/fox_reset.c index f61236b1..e191109c 100644 --- a/src/engine/fox_reset.c +++ b/src/engine/fox_reset.c @@ -33,11 +33,13 @@ void Graphics_NMIWipe(void) { if (sWipeBarLength == 0) { AudioThread_PreNMIReset(); } + sWipeBarLength += SCREEN_WIDTH / 7; if (sWipeBarLength >= SCREEN_WIDTH * 85 / 8 / 7) { // Why 85 / 8 == 3400 / 320 == 10.625? Has to do with NMI timing? osViBlack(true); gStopTasks = true; } + for (i = 0; i < MAXCONTROLLERS; i++) { gControllerRumbleEnabled[i] = 0; gControllerRumbleFlags[i] = 0; diff --git a/src/engine/fox_save.c b/src/engine/fox_save.c index c6a88897..f477a78f 100644 --- a/src/engine/fox_save.c +++ b/src/engine/fox_save.c @@ -65,7 +65,7 @@ s32 Save_Read(void) { gSaveFile = gSaveIOBuffer; if (gSaveFile.save.checksum == Save_Checksum(&gSaveFile.save)) { - (void) "EEPROM ROM[0] 正常\n"; + PRINTF("EEPROM ROM[0] 正常\n"); return 0; } #ifdef AVOID_UB @@ -78,9 +78,10 @@ s32 Save_Read(void) { gSaveFile.save.checksum = gSaveFile.backup.checksum; if (gSaveFile.save.checksum == Save_Checksum(&gSaveFile.save)) { - (void) "EEPROM ROM[1] 正常\n"; + PRINTF("EEPROM ROM[1] 正常\n"); return 0; + } else { + PRINTF("EEPROM ROM[0] & ROM[1] 異常\n"); + return -1; } - (void) "EEPROM ROM[0] & ROM[1] 異常\n"; - return -1; } diff --git a/src/engine/fox_tank.c b/src/engine/fox_tank.c index 53f247fa..8b604450 100644 --- a/src/engine/fox_tank.c +++ b/src/engine/fox_tank.c @@ -537,7 +537,7 @@ void func_tank_80045130(Player* player) { } void func_tank_80045348(Player* player) { - f32 sp44 = 15.0f; + f32 baseSpeedTarget = 15.0f; f32 sp40 = 0; f32 sp3C = 0.1f; f32 sp38 = 3.5f; @@ -555,7 +555,7 @@ void func_tank_80045348(Player* player) { } else { player->unk_190 = 2.0f; } - sp44 = 25.0f; + baseSpeedTarget = 25.0f; sp40 = -200.0f; sp3C = 0.2f; sp38 = 6.0f; @@ -571,7 +571,7 @@ void func_tank_80045348(Player* player) { } if ((gBrakeButton[player->num] & gInputHold->button) && !player->boostCooldown && !sp2E) { D_800C9F14++; - sp44 = 5.0f; + baseSpeedTarget = 5.0f; sp40 = 100.0f; sp3C = 0.2f; D_800C9F28 += 1.0f; @@ -579,7 +579,7 @@ void func_tank_80045348(Player* player) { } else { D_800C9F28 = 0.0f; } - Math_SmoothStepToF(&player->baseSpeed, sp44, sp3C, sp38, 0.001f); + Math_SmoothStepToF(&player->baseSpeed, baseSpeedTarget, sp3C, sp38, 0.001f); Math_SmoothStepToF(&player->camDist, sp40, sp3C, sp38, 0.001f); } else if (player->unk_19C == -1) { Math_SmoothStepToF(&player->baseSpeed, player->unk_000, 0.1f, 2.0f, 0.01f); @@ -1351,7 +1351,7 @@ void func_tank_800481F4(Player* player) { (scenery->obj.id != OBJ_SCENERY_73) && (scenery->obj.id != OBJ_SCENERY_74) && (scenery->obj.id != OBJ_SCENERY_69) && ((player->trueZpos - 2000.0f) < scenery->obj.pos.z)) { var_fv1 = scenery->obj.rot.y; - if (scenery->info.action == (ObjectFunc) func_enmy_80066EA8) { + if (scenery->info.action == (ObjectFunc) SceneryRotateTowardsCamera) { var_fv1 = 0.0f; } temp_v0 = Player_CheckHitboxCollision(player, scenery->info.hitbox, &sp98, scenery->obj.pos.x, @@ -1463,7 +1463,7 @@ void func_tank_800481F4(Player* player) { actor->obj.rot.y, actor->obj.rot.z, 0.0f, 0.0f, 0.0f); if (temp_v0 != 0) { actor->dmgType = DMG_COLLISION; - if ((actor->obj.id == OBJ_ACTOR_225) || (actor->obj.id == OBJ_ACTOR_190)) { + if ((actor->obj.id == OBJ_ACTOR_225) || (actor->obj.id == OBJ_MISSILE_SEEK_TEAM)) { actor->dmgType = -1; } if (actor->info.damage) { diff --git a/src/engine/fox_versus.c b/src/engine/fox_versus.c index 015853d1..28633126 100644 --- a/src/engine/fox_versus.c +++ b/src/engine/fox_versus.c @@ -1953,7 +1953,7 @@ void func_versus_800C26C8(void) { actor->obj.pos.x = dest.x; actor->obj.pos.y = dest.y; actor->obj.pos.z = dest.z; - actor->aiType = i + AI360_10; + actor->aiType = i + AI360_ENEMY; actor->health = 24; actor->timer_0C2 = 30; diff --git a/src/overlays/ovl_i1/fox_co.c b/src/overlays/ovl_i1/fox_co.c index 880d9c9a..27eb1b1d 100644 --- a/src/overlays/ovl_i1/fox_co.c +++ b/src/overlays/ovl_i1/fox_co.c @@ -7,62 +7,63 @@ #include "global.h" #include "assets/ast_arwing.h" #include "assets/ast_corneria.h" +#include "fox_co.h" u8 D_i1_8019B6D0; -f32 D_i1_8019B6D8[68]; +f32 sCoGrangaWork[68]; -void Corneria_80187530(Scenery* scenery) { +void Corneria_BuildingOnFire_Update(CoBuildingOnFire* this) { } -void Corneria_8018753C(Scenery* scenery) { +void Corneria_BuildingOnFire_Draw(CoBuildingOnFire* this) { gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_CO_60199D0); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); } -void Corneria_801875A4(Sprite* sprite) { - f32 sp1C; - f32 sp18; - f32 var_f; +void Corneria_Smoke_Update(CoSmoke* this) { + f32 x; + f32 y; + f32 z; - if (((gGameFrameCount % 4) == 0)) { - sp1C = RAND_FLOAT_CENTERED(10.0f); - sp18 = RAND_FLOAT_CENTERED(10.0f); - var_f = RAND_FLOAT(0.5f) + 1.0f; - func_effect_8007C85C(sprite->obj.pos.x + sp1C, sprite->obj.pos.y + sp18, sprite->obj.pos.z, 4.0f * var_f); + if ((gGameFrameCount % 4) == 0) { + x = RAND_FLOAT_CENTERED(10.0f); + y = RAND_FLOAT_CENTERED(10.0f); + z = RAND_FLOAT(0.5f) + 1.0f; + func_effect_8007C85C(this->obj.pos.x + x, this->obj.pos.y + y, this->obj.pos.z, 4.0f * z); } } -void Corneria_80187670(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 arg4, f32 xRot, f32 yRot, s32 arg7, s32 arg8, - ObjectId objId) { - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = objId; - actor->obj.pos.x = xPos; - actor->obj.pos.y = yPos; - actor->obj.pos.z = zPos; - actor->obj.rot.x = xRot; - actor->obj.rot.y = yRot; - actor->timer_0BC = arg7; - actor->timer_0BE = 20; - actor->eventType = arg8; - actor->fwork[5] = arg4; - Object_SetInfo(&actor->info, actor->obj.id); +void Corneria_Boss_MissileInit(Actor* this, f32 xPos, f32 yPos, f32 zPos, f32 arg4, f32 xRot, f32 yRot, s32 arg7, + s32 eventType, ObjectId objId) { + Actor_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = objId; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + this->obj.rot.x = xRot; + this->obj.rot.y = yRot; + this->timer_0BC = arg7; + this->timer_0BE = 20; + this->eventType = eventType; + this->fwork[5] = arg4; + Object_SetInfo(&this->info, this->obj.id); } -void Corneria_80187710(f32 xPos, f32 yPos, f32 zPos, f32 arg3, f32 xRot, f32 yRot, s32 arg6, s32 arg7, ObjectId objId) { +void Corneria_Boss_SpawnMissile(f32 xPos, f32 yPos, f32 zPos, f32 arg3, f32 xRot, f32 yRot, s32 arg6, s32 eventType, + ObjectId objId) { s32 i; for (i = 0; i < ARRAY_COUNT(gActors); i++) { if (gActors[i].obj.status == OBJ_FREE) { - PRINTF("Enms[1].obj.mode %d\n"); - Corneria_80187670(&gActors[i], xPos, yPos, zPos, arg3, xRot, yRot, arg6, arg7, objId); - return; + Corneria_Boss_MissileInit(&gActors[i], xPos, yPos, zPos, arg3, xRot, yRot, arg6, eventType, objId); + break; } } } -void Corneria_801877A0(Boss* boss, f32 x, f32 y, f32 z) { +void Corneria_Granga_ShootLaser(Granga* this, f32 x, f32 y, f32 z) { Vec3f src; Vec3f dest; @@ -72,30 +73,29 @@ void Corneria_801877A0(Boss* boss, f32 x, f32 y, f32 z) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - func_effect_8007F11C(OBJ_EFFECT_353, boss->obj.pos.x + dest.x, boss->obj.pos.y + dest.y, boss->obj.pos.z + dest.z, - 100.0f); + Effect_EnemyLaser(OBJ_EFFECT_ENEMY_LASER_1, this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, + this->obj.pos.z + dest.z, 100.0f); } -// Maybe Corneria_SpawnItem -void Corneria_80187838(s32 arg0, f32 x, f32 y, f32 z, ObjectId item) { +void Corneria_GrangaSpawnItem(s32 arg0, f32 x, f32 y, f32 z, ObjectId itemId) { s32 i; for (i = 0; i < ARRAY_COUNT(gItems); i++) { if (gItems[i].obj.status == OBJ_FREE) { Item_Initialize(&gItems[i]); gItems[i].obj.status = OBJ_INIT; - gItems[i].obj.id = item; + gItems[i].obj.id = itemId; gItems[i].timer_4A = 8; gItems[i].obj.pos.x = x; gItems[i].obj.pos.y = y; gItems[i].obj.pos.z = z; Object_SetInfo(&gItems[i].info, gItems[i].obj.id); - return; + break; } } } -void Corneria_Boss292_Init(Boss292* this) { +void Corneria_Granga_Init(Granga* this) { s32 i; gBossFrameCount = 0; @@ -111,23 +111,23 @@ void Corneria_Boss292_Init(Boss292* this) { return; } - for (i = 0; i < ARRAY_COUNT(D_i1_8019B6D8); i++) { - D_i1_8019B6D8[i] = 0.0f; + for (i = 0; i < ARRAY_COUNT(sCoGrangaWork); i++) { + sCoGrangaWork[i] = 0.0f; } } -void Corneria_8018798C(Boss* boss, f32 arg1, f32 arg2, f32 arg3, f32 arg4) { - func_effect_8007BFFC(arg1, arg2, arg3, 0.0f, 0.0f, 0.0f, arg4, 30); - func_effect_8007A6F0(&boss->obj.pos, NA_SE_OB_DAMAGE_M); +void Corneria_8018798C(Granga* this, f32 xPos, f32 yPos, f32 zPos, f32 scale) { + func_effect_8007BFFC(xPos, yPos, zPos, 0.0f, 0.0f, 0.0f, scale, 30); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_OB_DAMAGE_M); } -void Corneria_801879F0(Boss* boss, f32 arg1, f32 arg2, f32 arg3, f32 arg4) { - func_effect_8007D1E0(arg1, arg2, arg3, arg4); - func_effect_8007A6F0(&boss->obj.pos, NA_SE_OB_DAMAGE_M); +void Corneria_801879F0(Granga* this, f32 xPos, f32 yPos, f32 zPos, f32 scale) { + func_effect_8007D1E0(xPos, yPos, zPos, scale); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_OB_DAMAGE_M); } -void Corneria_80187A38(Boss* boss, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5) { - func_effect_8007C120(arg1, arg2, arg3, boss->vel.x, boss->vel.y, boss->vel.z, arg4, arg5); +void Corneria_80187A38(Granga* this, f32 xPos, f32 yPos, f32 zPos, f32 scale, s32 timer) { + func_effect_8007C120(xPos, yPos, zPos, this->vel.x, this->vel.y, this->vel.z, scale, timer); } f32 Corneria_80187A88(s32 arg0) { @@ -139,45 +139,46 @@ f32 Corneria_80187A88(s32 arg0) { return ret; } -void Corneria_80187AC8(Boss* boss) { - Sprite* sprite; +void Corneria_Granga_HandleDamage(Granga* this) { + CoTree* tree; s32 item; - s32 var_s1; - s32 var_s1_2; + s32 i; - if (boss->dmgType != DMG_NONE) { - boss->dmgType = DMG_NONE; + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; - if (boss->dmgPart == 0) { - boss->swork[10] = 15; - boss->swork[29] -= boss->damage; + if (this->dmgPart == GRANGA_DMG_BACKPACK) { + this->swork[GRANGA_BACKPACK_DMG_IND] = DMG_FLICKER_15; + this->swork[GRANGA_BACKPACK_HP] -= this->damage; - Corneria_80187A38(boss, D_i1_8019B6D8[62], D_i1_8019B6D8[63], D_i1_8019B6D8[64], 0.2f, 20); + Corneria_80187A38(this, sCoGrangaWork[GRANGA_WORK_62], sCoGrangaWork[GRANGA_WORK_63], + sCoGrangaWork[GRANGA_WORK_64], 0.2f, 20); - if (boss->swork[29] < 30) { - func_effect_8007A6F0(&boss->obj.pos, NA_SE_EN_KNOCK_DOWN); + if (this->swork[GRANGA_BACKPACK_HP] < 30) { + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_KNOCK_DOWN); } else { - func_effect_8007A6F0(&boss->obj.pos, NA_SE_OB_DAMAGE_M); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_OB_DAMAGE_M); } Radio_PlayMessage(gMsg_ID_2270, RCID_BOSS_CORNERIA); - if (boss->swork[29] <= 0) { - boss->swork[10] = 1000; - boss->info.hitbox[1 + 0] = 100000.0f; + if (this->swork[GRANGA_BACKPACK_HP] <= 0) { // Boss defeat check + this->swork[GRANGA_BACKPACK_DMG_IND] = DMG_DESTROYED; + this->info.hitbox[1 + 0] = 100000.0f; - Corneria_8018798C(boss, D_i1_8019B6D8[62], D_i1_8019B6D8[63], D_i1_8019B6D8[64], 10.0f); + Corneria_8018798C(this, sCoGrangaWork[GRANGA_WORK_62], sCoGrangaWork[GRANGA_WORK_63], + sCoGrangaWork[GRANGA_WORK_64], 10.0f); - AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, this->sfxSource, 4); gScreenFlashTimer = 8; - if (fabsf(boss->obj.rot.x) < 20.0f) { - boss->swork[32] = 1; + if (fabsf(this->obj.rot.x) < 20.0f) { + this->swork[GRANGA_SWK_32] = true; } - boss->state = 7; - boss->timer_050 = 100; + this->state = GRANGA_STATE_7; + this->timer_050 = 100; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 80); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 80); @@ -201,273 +202,298 @@ void Corneria_80187AC8(Boss* boss) { Radio_PlayMessage(gMsg_ID_2280, RCID_BOSS_CORNERIA); - Boss_AwardBonus(boss); + Boss_AwardBonus(this); gBossFrameCount = 100000; return; } - } else if (boss->dmgPart == 3) { - boss->swork[3] = 15; - boss->swork[20] = 30; - boss->swork[28] -= boss->damage; + } else if (this->dmgPart == GRANGA_DMG_GUN) { + this->swork[GRANGA_GUN_DMG_IND] = DMG_FLICKER_15; + this->swork[GRANGA_SWK_20] = 30; + this->swork[GRANGA_PLASMA_GUN_HP] -= this->damage; - Corneria_801879F0(boss, D_i1_8019B6D8[12] + RAND_FLOAT_CENTERED(60.0f), D_i1_8019B6D8[13], - D_i1_8019B6D8[14] + RAND_FLOAT_CENTERED(60.0f), 2.0f); - Corneria_80187A38(boss, D_i1_8019B6D8[12], D_i1_8019B6D8[13], D_i1_8019B6D8[14], 0.1f, 20); + Corneria_801879F0(this, sCoGrangaWork[GRANGA_WORK_12] + RAND_FLOAT_CENTERED(60.0f), + sCoGrangaWork[GRANGA_WORK_13], sCoGrangaWork[GRANGA_WORK_14] + RAND_FLOAT_CENTERED(60.0f), + 2.0f); + Corneria_80187A38(this, sCoGrangaWork[GRANGA_WORK_12], sCoGrangaWork[GRANGA_WORK_13], + sCoGrangaWork[GRANGA_WORK_14], 0.1f, 20); - if (boss->swork[28] <= 0) { - boss->swork[3] = 1000; - boss->info.hitbox[1 + 18] = 100000.0f; - Corneria_8018798C(boss, D_i1_8019B6D8[12], D_i1_8019B6D8[13], D_i1_8019B6D8[14], 10.0f); + if (this->swork[GRANGA_PLASMA_GUN_HP] <= 0) { + this->swork[GRANGA_GUN_DMG_IND] = DMG_DESTROYED; + this->info.hitbox[1 + 18] = 100000.0f; + Corneria_8018798C(this, sCoGrangaWork[GRANGA_WORK_12], sCoGrangaWork[GRANGA_WORK_13], + sCoGrangaWork[GRANGA_WORK_14], 10.0f); } } - if (boss->dmgPart == 1) { - boss->swork[2] = 15; - boss->swork[21] = 30; - boss->swork[26] -= boss->damage; + if (this->dmgPart == GRANGA_DMG_LEFT_ARM) { + this->swork[GRANGA_LEFT_ARM_DMG_IND] = DMG_FLICKER_15; + this->swork[GRANGA_SWK_21] = 30; + this->swork[GRANGA_LEFT_ARM_HP] -= this->damage; - Corneria_801879F0(boss, D_i1_8019B6D8[6] + RAND_FLOAT_CENTERED(60.0f), D_i1_8019B6D8[7], - D_i1_8019B6D8[8] + RAND_FLOAT_CENTERED(60.0f), 2.0f); - Corneria_80187A38(boss, D_i1_8019B6D8[6], D_i1_8019B6D8[7], D_i1_8019B6D8[8], 0.1f, 20); + Corneria_801879F0(this, sCoGrangaWork[GRANGA_WORK_06] + RAND_FLOAT_CENTERED(60.0f), + sCoGrangaWork[GRANGA_WORK_07], sCoGrangaWork[GRANGA_WORK_08] + RAND_FLOAT_CENTERED(60.0f), + 2.0f); + Corneria_80187A38(this, sCoGrangaWork[GRANGA_WORK_06], sCoGrangaWork[GRANGA_WORK_07], + sCoGrangaWork[GRANGA_WORK_08], 0.1f, 20); - if (boss->swork[26] <= 0) { - boss->swork[2] = 1000; - boss->info.hitbox[1 + 6] = 100000.0f; - Corneria_8018798C(boss, D_i1_8019B6D8[6], D_i1_8019B6D8[7], D_i1_8019B6D8[8], 7.0f); + if (this->swork[GRANGA_LEFT_ARM_HP] <= 0) { + this->swork[GRANGA_LEFT_ARM_DMG_IND] = DMG_DESTROYED; + this->info.hitbox[1 + 6] = 100000.0f; + Corneria_8018798C(this, sCoGrangaWork[GRANGA_WORK_06], sCoGrangaWork[GRANGA_WORK_07], + sCoGrangaWork[GRANGA_WORK_08], 7.0f); } - } else if (boss->dmgPart == 2) { - boss->swork[1] = 15; - boss->swork[22] = 30; - boss->swork[27] -= boss->damage; + } else if (this->dmgPart == GRANGA_DMG_RIGHT_ARM) { + this->swork[GRANGA_RIGHT_ARM_DMG_IND] = DMG_FLICKER_15; + this->swork[GRANGA_SWK_22] = 30; + this->swork[GRANGA_RIGHT_ARM_HP] -= this->damage; - Corneria_801879F0(boss, D_i1_8019B6D8[0] + RAND_FLOAT_CENTERED(60.0f), D_i1_8019B6D8[1], - D_i1_8019B6D8[2] + RAND_FLOAT_CENTERED(60.0f), 2.0f); - Corneria_80187A38(boss, D_i1_8019B6D8[0], D_i1_8019B6D8[1], D_i1_8019B6D8[2], 0.1f, 20); + Corneria_801879F0(this, sCoGrangaWork[GRANGA_WORK_00] + RAND_FLOAT_CENTERED(60.0f), + sCoGrangaWork[GRANGA_WORK_01], sCoGrangaWork[GRANGA_WORK_02] + RAND_FLOAT_CENTERED(60.0f), + 2.0f); + Corneria_80187A38(this, sCoGrangaWork[GRANGA_WORK_00], sCoGrangaWork[GRANGA_WORK_01], + sCoGrangaWork[GRANGA_WORK_02], 0.1f, 20); - if (boss->swork[27] <= 0) { - boss->swork[1] = 1000; - boss->info.hitbox[1 + 12] = 100000.0f; - Corneria_8018798C(boss, D_i1_8019B6D8[0], D_i1_8019B6D8[1], D_i1_8019B6D8[2], 7.0f); + if (this->swork[GRANGA_RIGHT_ARM_HP] <= 0) { + this->swork[GRANGA_RIGHT_ARM_DMG_IND] = DMG_DESTROYED; + this->info.hitbox[1 + 12] = 100000.0f; + Corneria_8018798C(this, sCoGrangaWork[GRANGA_WORK_00], sCoGrangaWork[GRANGA_WORK_01], + sCoGrangaWork[GRANGA_WORK_02], 7.0f); } - } else if ((boss->dmgPart == 4) || (boss->dmgPart == 5)) { - AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, boss->sfxSource, 4); - boss->swork[23] = 200; + } else if ((this->dmgPart == GRANGA_DMG_LEFT_LEG) || (this->dmgPart == GRANGA_DMG_RIGHT_LEG)) { + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, this->sfxSource, 4); + this->swork[GRANGA_SWK_23] = 200; - if (boss->dmgPart == 4) { - boss->swork[24] -= boss->damage; - boss->swork[7] = boss->swork[8] = boss->swork[9] = 5; - boss->swork[18] = 30; + if (this->dmgPart == GRANGA_DMG_LEFT_LEG) { + this->swork[GRANGA_LEFT_LEG_HP] -= this->damage; + this->swork[GRANGA_LEFT_LEG_DMG_IND] = this->swork[GRANGA_LEFT_LEG_DMG_IND + 1] = + this->swork[GRANGA_LEFT_LEG_DMG_IND + 2] = DMG_FLICKER_5; + this->swork[GRANGA_SWK_18] = 30; - if (boss->swork[24] <= 0) { - boss->swork[7] = boss->swork[8] = boss->swork[9] = 1000; - boss->info.hitbox[1 + 24] = 100000.0f; + if (this->swork[GRANGA_LEFT_LEG_HP] <= 0) { + this->swork[GRANGA_LEFT_LEG_DMG_IND] = this->swork[GRANGA_LEFT_LEG_DMG_IND + 1] = + this->swork[GRANGA_LEFT_LEG_DMG_IND + 2] = DMG_DESTROYED; + this->info.hitbox[1 + 24] = 100000.0f; - for (var_s1 = 3; var_s1 < 6; var_s1++) { - Boss_SpawnDebris(D_i1_8019B6D8[18 + var_s1 + 2], D_i1_8019B6D8[24 + var_s1 + 2], - D_i1_8019B6D8[30 + var_s1 + 2], D_i1_8019B6D8[36 + var_s1 + 2], - D_i1_8019B6D8[42 + var_s1 + 2], D_i1_8019B6D8[48 + var_s1 + 2], 0.0f, - RAND_FLOAT(20.0f), 0.0f, 5.5f, var_s1 + 28, RAND_INT(30.0f) + 60.0f); + for (i = 3; i < 6; i++) { + Boss_SpawnDebris(sCoGrangaWork[18 + i + 2], sCoGrangaWork[24 + i + 2], + sCoGrangaWork[30 + i + 2], sCoGrangaWork[36 + i + 2], + sCoGrangaWork[42 + i + 2], sCoGrangaWork[48 + i + 2], 0.0f, RAND_FLOAT(20.0f), + 0.0f, 5.5f, i + 28, RAND_INT(30.0f) + 60.0f); } - if (boss->state < 5) { - boss->state = 5; - boss->timer_050 = 60; + if (this->state < GRANGA_STATE_5) { + this->state = GRANGA_STATE_5; + this->timer_050 = 60; } } - } else { - boss->swork[25] -= boss->damage; - boss->swork[4] = boss->swork[5] = boss->swork[6] = 5; - boss->swork[19] = 30; + } else { // (this->dmgPart == GRANGA_DMG_RIGHT_LEG) + this->swork[GRANGA_RIGHT_LEG_HP] -= this->damage; + this->swork[GRANGA_RIGHT_LEG_DMG_IND] = this->swork[GRANGA_RIGHT_LEG_DMG_IND + 1] = + this->swork[GRANGA_RIGHT_LEG_DMG_IND + 2] = DMG_FLICKER_5; + this->swork[GRANGA_SWK_19] = 30; - if (boss->swork[25] <= 0) { - boss->swork[4] = boss->swork[5] = boss->swork[6] = 1000; - boss->info.hitbox[1 + 30] = 100000.0f; + if (this->swork[GRANGA_RIGHT_LEG_HP] <= 0) { + this->swork[GRANGA_RIGHT_LEG_DMG_IND] = this->swork[GRANGA_RIGHT_LEG_DMG_IND + 1] = + this->swork[GRANGA_RIGHT_LEG_DMG_IND + 2] = DMG_DESTROYED; + this->info.hitbox[1 + 30] = 100000.0f; - for (var_s1 = 0; var_s1 < 3; var_s1++) { - Boss_SpawnDebris(D_i1_8019B6D8[18 + var_s1 + 2], D_i1_8019B6D8[24 + var_s1 + 2], - D_i1_8019B6D8[30 + var_s1 + 2], D_i1_8019B6D8[36 + var_s1 + 2], - D_i1_8019B6D8[42 + var_s1 + 2], D_i1_8019B6D8[48 + var_s1 + 2], 0.0f, - RAND_FLOAT(20.0f), 0.0f, 5.5f, var_s1 + 28, RAND_INT(30.0f) + 60.0f); + for (i = 0; i < 3; i++) { + Boss_SpawnDebris(sCoGrangaWork[18 + i + 2], sCoGrangaWork[24 + i + 2], + sCoGrangaWork[30 + i + 2], sCoGrangaWork[36 + i + 2], + sCoGrangaWork[42 + i + 2], sCoGrangaWork[48 + i + 2], 0.0f, RAND_FLOAT(20.0f), + 0.0f, 5.5f, i + 28, RAND_INT(30.0f) + 60.0f); } - if (boss->state < 5) { - boss->state = 6; - boss->timer_050 = 60; + if (this->state < GRANGA_STATE_5) { + this->state = GRANGA_STATE_6; + this->timer_050 = 60; } } } - if (boss->timer_050 < 50) { - boss->timer_050 += 10; + if (this->timer_050 < 50) { + this->timer_050 += 10; } - if ((boss->state != 0) && (boss->state < 5)) { - boss->fwork[14] = 0.0f; + if ((this->state != GRANGA_STATIONARY) && (this->state < GRANGA_STATE_5)) { + this->fwork[GRANGA_FWK_14] = 0.0f; if (Rand_ZeroOne() < 0.5f) { item = OBJ_ITEM_SILVER_RING; } else { item = OBJ_ITEM_BOMB; } - Corneria_80187838(boss, boss->obj.pos.x, boss->obj.pos.y + 100.0f, boss->obj.pos.z, item); + Corneria_GrangaSpawnItem(this, this->obj.pos.x, this->obj.pos.y + 100.0f, this->obj.pos.z, item); } - if (boss->state < 5) { - boss->state = 0; + if (this->state < GRANGA_STATE_5) { + this->state = GRANGA_STATIONARY; switch (RAND_INT(5.0f)) { case 0: - boss->swork[31] = 2; + this->swork[GRANGA_NEXT_STATE] = GRANGA_STATE_2; break; case 1: - boss->swork[31] = 3; + this->swork[GRANGA_NEXT_STATE] = GRANGA_STATE_3; break; case 2: case 3: case 4: - boss->swork[31] = 4; + this->swork[GRANGA_NEXT_STATE] = GRANGA_STATE_4; break; } } } else { - func_effect_8007A6F0(&boss->obj.pos, NA_SE_EN_REFLECT); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_REFLECT); } } if (!(D_edisplay_801615D0.y < 0.0f)) { - for (sprite = gSprites, var_s1 = 0; var_s1 < ARRAY_COUNT(gSprites); var_s1++, sprite++) { - if ((sprite->obj.status == OBJ_ACTIVE) && (sprite->obj.id == OBJ_SPRITE_CO_TREE)) { - if ((fabsf(sprite->obj.pos.x - D_i1_8019B6D8[20]) < 90.0f) && - (fabsf(sprite->obj.pos.z - D_i1_8019B6D8[32]) < 90.0f)) { - sprite->destroy = 1; + for (tree = &gSprites[0], i = 0; i < ARRAY_COUNT(gSprites); i++, tree++) { + if ((tree->obj.status == OBJ_ACTIVE) && (tree->obj.id == OBJ_SPRITE_CO_TREE)) { + if ((fabsf(tree->obj.pos.x - sCoGrangaWork[GRANGA_WORK_20]) < 90.0f) && + (fabsf(tree->obj.pos.z - sCoGrangaWork[GRANGA_WORK_32]) < 90.0f)) { + tree->destroy = 1; break; - } else if ((fabsf(sprite->obj.pos.x - D_i1_8019B6D8[23]) < 90.0f) && - (fabsf(sprite->obj.pos.z - D_i1_8019B6D8[35]) < 90.0f)) { - sprite->destroy = 1; + } else if ((fabsf(tree->obj.pos.x - sCoGrangaWork[GRANGA_WORK_23]) < 90.0f) && + (fabsf(tree->obj.pos.z - sCoGrangaWork[GRANGA_WORK_35]) < 90.0f)) { + tree->destroy = 1; break; } } } - if ((boss->swork[1] == 1000) && ((gGameFrameCount % 4) == 0)) { - func_effect_8007BFFC(D_i1_8019B6D8[3], D_i1_8019B6D8[4], D_i1_8019B6D8[5], - (D_i1_8019B6D8[3] - boss->obj.pos.x) * 0.1f, 0.0f, - (D_i1_8019B6D8[5] - boss->obj.pos.z) * 0.1f, 1.5f, 5); + if ((this->swork[GRANGA_RIGHT_ARM_DMG_IND] == DMG_DESTROYED) && ((gGameFrameCount % 4) == 0)) { + func_effect_8007BFFC(sCoGrangaWork[GRANGA_WORK_03], sCoGrangaWork[GRANGA_WORK_04], + sCoGrangaWork[GRANGA_WORK_05], + (sCoGrangaWork[GRANGA_WORK_03] - this->obj.pos.x) * 0.1f, 0.0f, + (sCoGrangaWork[GRANGA_WORK_05] - this->obj.pos.z) * 0.1f, 1.5f, 5); } - if ((boss->swork[2] == 1000) && ((gGameFrameCount % 4) == 0)) { - func_effect_8007BFFC(D_i1_8019B6D8[9], D_i1_8019B6D8[10], D_i1_8019B6D8[11], - (D_i1_8019B6D8[9] - boss->obj.pos.x) * 0.1f, 0.0f, - (D_i1_8019B6D8[11] - boss->obj.pos.z) * 0.1f, 1.5f, 5); + if ((this->swork[GRANGA_LEFT_ARM_DMG_IND] == DMG_DESTROYED) && ((gGameFrameCount % 4) == 0)) { + func_effect_8007BFFC(sCoGrangaWork[GRANGA_WORK_09], sCoGrangaWork[GRANGA_WORK_10], + sCoGrangaWork[GRANGA_WORK_11], + (sCoGrangaWork[GRANGA_WORK_09] - this->obj.pos.x) * 0.1f, 0.0f, + (sCoGrangaWork[GRANGA_WORK_11] - this->obj.pos.z) * 0.1f, 1.5f, 5); } - if ((boss->swork[3] == 1000) && ((gGameFrameCount % 4) == 0)) { - func_effect_8007BFFC(D_i1_8019B6D8[12], D_i1_8019B6D8[13], D_i1_8019B6D8[14], 0.0f, 20.0f, 0.0f, 2.0f, 5); + if ((this->swork[GRANGA_GUN_DMG_IND] == DMG_DESTROYED) && ((gGameFrameCount % 4) == 0)) { + func_effect_8007BFFC(sCoGrangaWork[GRANGA_WORK_12], sCoGrangaWork[GRANGA_WORK_13], + sCoGrangaWork[GRANGA_WORK_14], 0.0f, 20.0f, 0.0f, 2.0f, 5); } - if ((boss->swork[4] == 1000) && ((gGameFrameCount % 4) == 0)) { - func_effect_8007BFFC(D_i1_8019B6D8[56], D_i1_8019B6D8[57], D_i1_8019B6D8[58], 0.0f, 10.0f, 0.0f, 2.0f, 5); + if ((this->swork[GRANGA_RIGHT_LEG_DMG_IND] == DMG_DESTROYED) && ((gGameFrameCount % 4) == 0)) { + func_effect_8007BFFC(sCoGrangaWork[GRANGA_WORK_56], sCoGrangaWork[GRANGA_WORK_57], + sCoGrangaWork[GRANGA_WORK_58], 0.0f, 10.0f, 0.0f, 2.0f, 5); } - if ((boss->swork[7] == 1000) && ((gGameFrameCount % 4) == 0)) { - func_effect_8007BFFC(D_i1_8019B6D8[59], D_i1_8019B6D8[60], D_i1_8019B6D8[61], 0.0f, 10.0f, 0.0f, 2.0f, 5); + if ((this->swork[GRANGA_LEFT_LEG_DMG_IND] == DMG_DESTROYED) && ((gGameFrameCount % 4) == 0)) { + func_effect_8007BFFC(sCoGrangaWork[GRANGA_WORK_59], sCoGrangaWork[GRANGA_WORK_60], + sCoGrangaWork[GRANGA_WORK_61], 0.0f, 10.0f, 0.0f, 2.0f, 5); } } } -ObjectId Corneria_80188750(Boss* boss) { - boss->swork[35]++; - - if (boss->swork[35] >= 5) { - boss->swork[35] = 0; - return OBJ_ACTOR_191; - } else if (func_hud_8008AC54(0) < 4) { - return OBJ_ACTOR_190; +ObjectId Corneria_Granga_ChooseMissileTarget(Granga* this) { + this->swork[GRANGA_MISSILE_COUNT]++; + /* + * Spawn up to 5 missiles that seek the teammates + * before spawning one for the player. + */ + if (this->swork[GRANGA_MISSILE_COUNT] >= 5) { + this->swork[GRANGA_MISSILE_COUNT] = 0; + return OBJ_MISSILE_SEEK_PLAYER; + } else if (Hud_MissileSeekModeCheck(0) < 4) { + return OBJ_MISSILE_SEEK_TEAM; } else { return 0; } } -void Corneria_801887AC(Boss* boss) { - Vec3f sp3C; +void Corneria_Granga_Attack(Granga* this) { + Vec3f savedPlayerPos; ObjectId objId; - if ((gBossFrameCount < 500)) { + // Granga won't attack for 500 frames. + if (gBossFrameCount < 500) { return; } - switch (boss->swork[30]) { - case 0: + switch (this->swork[GRANGA_ATTACK_STATE]) { + case GRANGA_ATTACK_IDLE: break; - case 1: - objId = Corneria_80188750(boss); + case GRANGA_ATTACK_MISSILES: + objId = Corneria_Granga_ChooseMissileTarget(this); if (objId != 0) { - if (boss->swork[1] != 1000) { - Corneria_80187710(D_i1_8019B6D8[0], D_i1_8019B6D8[1], D_i1_8019B6D8[2], 65.0f, 0.0f, - D_i1_8019B6D8[16] + boss->obj.rot.y, 0, 0, objId); + if (this->swork[GRANGA_RIGHT_ARM_DMG_IND] != DMG_DESTROYED) { + Corneria_Boss_SpawnMissile(sCoGrangaWork[GRANGA_WORK_00], sCoGrangaWork[GRANGA_WORK_01], + sCoGrangaWork[GRANGA_WORK_02], 65.0f, 0.0f, + sCoGrangaWork[GRANGA_WORK_16] + this->obj.rot.y, 0, 0, objId); } - if (boss->swork[2] != 1000) { - Corneria_80187710(D_i1_8019B6D8[6], D_i1_8019B6D8[7], D_i1_8019B6D8[8], 65.0f, 0.0f, - D_i1_8019B6D8[16] + boss->obj.rot.y, 0, 0, objId); + if (this->swork[GRANGA_LEFT_ARM_DMG_IND] != DMG_DESTROYED) { + Corneria_Boss_SpawnMissile(sCoGrangaWork[GRANGA_WORK_06], sCoGrangaWork[GRANGA_WORK_07], + sCoGrangaWork[GRANGA_WORK_08], 65.0f, 0.0f, + sCoGrangaWork[GRANGA_WORK_16] + this->obj.rot.y, 0, 0, objId); } } - boss->swork[30] = 0; + this->swork[GRANGA_ATTACK_STATE] = GRANGA_ATTACK_IDLE; break; - case 2: - Corneria_801877A0(boss, 40.0f, 228.0f, 212.0f); - Corneria_801877A0(boss, -40.0f, 228.0f, 212.0f); - boss->swork[30] = 0; + case GRANGA_ATTACK_LASERS: + Corneria_Granga_ShootLaser(this, 40.0f, 228.0f, 212.0f); + Corneria_Granga_ShootLaser(this, -40.0f, 228.0f, 212.0f); + this->swork[GRANGA_ATTACK_STATE] = GRANGA_ATTACK_IDLE; break; - case 3: - if (boss->swork[3] != 1000) { - sp3C.x = gPlayer[0].pos.x; - sp3C.y = gPlayer[0].pos.y; - sp3C.z = gPlayer[0].trueZpos; + case GRANGA_ATTACK_PLASMA: + if (this->swork[GRANGA_GUN_DMG_IND] != DMG_DESTROYED) { + savedPlayerPos.x = gPlayer[0].pos.x; + savedPlayerPos.y = gPlayer[0].pos.y; + savedPlayerPos.z = gPlayer[0].trueZpos; gPlayer[0].pos.x += RAND_FLOAT_CENTERED(300.0f); gPlayer[0].pos.y += RAND_FLOAT_CENTERED(300.0f); gPlayer[0].trueZpos += RAND_FLOAT_CENTERED(300.0f); - func_effect_8007F11C(OBJ_EFFECT_376, D_i1_8019B6D8[12], D_i1_8019B6D8[13], D_i1_8019B6D8[14], 60.0f); + Effect_EnemyLaser(OBJ_EFFECT_376, sCoGrangaWork[GRANGA_WORK_12], sCoGrangaWork[GRANGA_WORK_13], + sCoGrangaWork[GRANGA_WORK_14], 60.0f); - gPlayer[0].pos.x = sp3C.x; - gPlayer[0].pos.y = sp3C.y; - gPlayer[0].trueZpos = sp3C.z; + gPlayer[0].pos.x = savedPlayerPos.x; + gPlayer[0].pos.y = savedPlayerPos.y; + gPlayer[0].trueZpos = savedPlayerPos.z; } - boss->swork[30] = 0; + this->swork[GRANGA_ATTACK_STATE] = GRANGA_ATTACK_IDLE; break; } } -void Corneria_80188A18(Boss* boss) { - if (boss->timer_050 == 0) { - boss->state = 0; - boss->timer_050 = RAND_INT(20.0f) + 20; - boss->fwork[14] = 0.0f; +void Corneria_Granga_DecideNextAction(Granga* this) { + if (this->timer_050 == 0) { + this->state = GRANGA_STATIONARY; + this->timer_050 = RAND_INT(20.0f) + 20; + this->fwork[GRANGA_FWK_14] = 0.0f; switch (RAND_INT(8.0f)) { case 0: case 1: - boss->swork[31] = 1; + this->swork[GRANGA_NEXT_STATE] = GRANGA_STATE_1; break; case 2: case 3: - boss->swork[31] = 2; + this->swork[GRANGA_NEXT_STATE] = GRANGA_STATE_2; break; case 4: if (D_edisplay_801615D0.y < 0.0f) { - boss->swork[31] = 4; + this->swork[GRANGA_NEXT_STATE] = GRANGA_STATE_4; } else { - boss->swork[31] = 3; + this->swork[GRANGA_NEXT_STATE] = GRANGA_STATE_3; } break; case 5: case 6: case 7: - boss->swork[31] = 4; + this->swork[GRANGA_NEXT_STATE] = GRANGA_STATE_4; break; } @@ -491,42 +517,42 @@ void Corneria_80188A18(Boss* boss) { } } -void Corneria_80188C7C(Boss* boss) { - if (boss->unk_044 == 0) { - boss->unk_044++; - boss->fwork[12] *= -0.2f; - AUDIO_PLAY_SFX(NA_SE_OB_METAL_BOUND_L, boss->sfxSource, 4); - func_enmy_80062B60(D_i1_8019B6D8[56], D_i1_8019B6D8[58], 0, 30.0f); - boss->swork[18] = 13; - boss->swork[19] = 15; - boss->swork[21] = 10; - boss->swork[22] = 12; - boss->swork[20] = 17; +void Corneria_80188C7C(Granga* this) { + if (this->unk_044 == 0) { + this->unk_044++; + this->fwork[GRANGA_FWK_12] *= -0.2f; + AUDIO_PLAY_SFX(NA_SE_OB_METAL_BOUND_L, this->sfxSource, 4); + func_enmy_80062B60(sCoGrangaWork[GRANGA_WORK_56], sCoGrangaWork[GRANGA_WORK_58], 0, 30.0f); + this->swork[GRANGA_SWK_18] = 13; + this->swork[GRANGA_SWK_19] = 15; + this->swork[GRANGA_SWK_21] = 10; + this->swork[GRANGA_SWK_22] = 12; + this->swork[GRANGA_SWK_20] = 17; gCameraShake = 20; } else { - boss->fwork[12] = 0.0f; + this->fwork[GRANGA_FWK_12] = 0.0f; } } -void Corneria_80188D50(Boss* boss) { - static s32 D_i1_801997E0 = 0; +void Corneria_Granga_1UpCheck(Granga* this) { + static s32 sCo1UpHitTimer = 0; s32 i; Vec3f src; Vec3f dest; - s32 rnd; + TeamId teamId; - if (boss->swork[36] == 0) { + if (!this->swork[GRANGA_1UP_CHECK]) { if (gPlayer[0].hitTimer != 0) { - D_i1_801997E0 = 80; + sCo1UpHitTimer = 80; } - if (D_i1_801997E0 != 0) { - D_i1_801997E0--; - } else if ((gPlayer[0].pos.y < 200.0f) && (boss->state < 5) && - (fabsf(boss->obj.pos.x - gPlayer[0].pos.x) < 200.0f) && - (fabsf(boss->obj.pos.z - gPlayer[0].trueZpos) < 200.0f) && (gPlayer[0].aerobaticPitch > 180.0f)) { - boss->swork[36]++; - D_i1_801997E0 = 20; + if (sCo1UpHitTimer != 0) { + sCo1UpHitTimer--; + } else if ((gPlayer[0].pos.y < 200.0f) && (this->state < GRANGA_STATE_5) && + (fabsf(this->obj.pos.x - gPlayer[0].pos.x) < 200.0f) && + (fabsf(this->obj.pos.z - gPlayer[0].trueZpos) < 200.0f) && (gPlayer[0].aerobaticPitch > 180.0f)) { + this->swork[GRANGA_1UP_CHECK]++; + sCo1UpHitTimer = 20; AUDIO_PLAY_SFX(NA_SE_RING_PASS, gDefaultSfxSource, 4); @@ -535,17 +561,17 @@ void Corneria_80188D50(Boss* boss) { if (0) {}; do { - rnd = RAND_INT(2.9f) + 1; - } while (gTeamShields[rnd] <= 0); + teamId = RAND_INT(2.9f) + 1; + } while (gTeamShields[teamId] <= 0); - switch (rnd) { - case 1: + switch (teamId) { + case TEAM_ID_FALCO: Radio_PlayMessage(gMsg_ID_7100, RCID_FALCO); break; - case 2: + case TEAM_ID_SLIPPY: Radio_PlayMessage(gMsg_ID_15252, RCID_SLIPPY); break; - case 3: + case TEAM_ID_PEPPY: Radio_PlayMessage(gMsg_ID_17160, RCID_PEPPY); break; } @@ -579,7 +605,7 @@ void Corneria_80188D50(Boss* boss) { } } -void Corneria_80189058(Boss* boss) { +void Corneria_Granga_Update(Granga* this) { Vec3f sp21C = { 0.0f, 0.0f, 0.0f }; s32 sp218; f32 sp214; @@ -591,55 +617,56 @@ void Corneria_80189058(Boss* boss) { f32 sp1FC; f32 sp1F8; Vec3f sp1EC = { 0.0f, 0.0f, 5.0f }; - Vec3f sp84[30]; + Vec3f frameTable[30]; Vec3f sp78 = { 0.0f, 0.0f, 40.0f }; Vec3f sp6C = { 0.0f, 0.0f, -30.0f }; f32 sp5C; if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_START_360) { - if (boss->swork[33] == 0) { - boss->swork[33]++; + if (!this->swork[GRANGA_INIT]) { + this->swork[GRANGA_INIT]++; + gBossActive = 2; - boss->drawShadow = true; + this->drawShadow = true; - boss->swork[24] = 150; - boss->swork[25] = 150; - boss->swork[26] = 40; - boss->swork[27] = 40; - boss->swork[28] = 40; - boss->swork[29] = 130; + this->swork[GRANGA_LEFT_LEG_HP] = 150; + this->swork[GRANGA_RIGHT_LEG_HP] = 150; + this->swork[GRANGA_LEFT_ARM_HP] = 40; + this->swork[GRANGA_RIGHT_ARM_HP] = 40; + this->swork[GRANGA_PLASMA_GUN_HP] = 40; + this->swork[GRANGA_BACKPACK_HP] = 130; - boss->info.hitbox[1 + 0] = -241.0f; - boss->info.hitbox[1 + 6] = 0.0f; - boss->info.hitbox[1 + 12] = 0.0f; - boss->info.hitbox[1 + 18] = 0.0f; - boss->info.hitbox[1 + 24] = 0.0f; - boss->info.hitbox[1 + 30] = 0.0f; + this->info.hitbox[1 + 0] = -241.0f; + this->info.hitbox[1 + 6] = 0.0f; + this->info.hitbox[1 + 12] = 0.0f; + this->info.hitbox[1 + 18] = 0.0f; + this->info.hitbox[1 + 24] = 0.0f; + this->info.hitbox[1 + 30] = 0.0f; - boss->timer_052 = 100; - boss->state = 0; - boss->swork[31] = 1; + this->timer_052 = 100; + this->state = GRANGA_STATIONARY; + this->swork[GRANGA_NEXT_STATE] = GRANGA_STATE_1; - D_i1_8019B6D8[66] = 0.0f; - D_i1_8019B6D8[67] = 10000.0f; + sCoGrangaWork[GRANGA_WORK_66] = 0.0f; + sCoGrangaWork[GRANGA_WORK_67] = 10000.0f; - boss->timer_050 = 30; + this->timer_050 = 30; - Animation_GetFrameData(&D_CO_602C0D0, 0, boss->vwork); + Animation_GetFrameData(&D_CO_602C0D0, 0, this->vwork); gBossFrameCount = 0; } gBossFrameCount++; + gRadarMarks[59].status = 1; gRadarMarks[59].type = 102; - gRadarMarks[59].pos.x = boss->obj.pos.x; - gRadarMarks[59].pos.y = boss->obj.pos.y; - gRadarMarks[59].pos.z = boss->obj.pos.z; + gRadarMarks[59].pos.x = this->obj.pos.x; + gRadarMarks[59].pos.y = this->obj.pos.y; + gRadarMarks[59].pos.z = this->obj.pos.z; + gRadarMarks[59].yRot = this->obj.rot.y + 180.0f; - gRadarMarks[59].yRot = boss->obj.rot.y + 180.0f; - - Corneria_80188D50(boss); + Corneria_Granga_1UpCheck(this); if (D_edisplay_801615D0.z > 0.0f) { if (D_edisplay_801615D0.x > 0.0f) { @@ -660,7 +687,7 @@ void Corneria_80189058(Boss* boss) { Radio_PlayMessage(gMsg_ID_2225, RCID_SLIPPY); break; case 486: - gShowBossHealth = 1; + gShowBossHealth = true; break; case 500: Radio_PlayMessage(gMsg_ID_2260, RCID_BOSS_CORNERIA); @@ -669,45 +696,50 @@ void Corneria_80189058(Boss* boss) { Radio_PlayMessage(gMsg_ID_2230, RCID_PEPPY); break; case 3840: - if (boss->state < 5) { + if (this->state < GRANGA_STATE_5) { Radio_PlayMessage(gMsg_ID_2230, RCID_PEPPY); } break; } if (gBossFrameCount >= 487) { - gBossHealthBar = boss->swork[29] * 2; + gBossHealthBar = this->swork[GRANGA_BACKPACK_HP] * 2; } - for (sp218 = 0; sp218 < 24; sp218++) { - if ((boss->swork[sp218] != 0) && (boss->swork[sp218] < 1000)) { - boss->swork[sp218]--; + for (sp218 = GRANGA_SWK_0; sp218 <= GRANGA_SWK_23; sp218++) { + if ((this->swork[sp218] != 0) && (this->swork[sp218] < DMG_DESTROYED)) { + this->swork[sp218]--; } } - Corneria_80187AC8(boss); + Corneria_Granga_HandleDamage(this); - boss->fwork[0] = SIN_DEG(boss->swork[18] * 50.0f) * Corneria_80187A88(boss->swork[18]); - boss->fwork[1] = SIN_DEG(boss->swork[19] * 50.0f) * Corneria_80187A88(boss->swork[19]); - boss->fwork[2] = SIN_DEG(boss->swork[20] * 50.0f) * Corneria_80187A88(boss->swork[20]); - boss->fwork[3] = SIN_DEG(boss->swork[21] * 50.0f) * Corneria_80187A88(boss->swork[21]); - boss->fwork[4] = SIN_DEG(boss->swork[22] * 50.0f) * Corneria_80187A88(boss->swork[22]); + this->fwork[GRANGA_FWK_00] = + SIN_DEG(this->swork[GRANGA_SWK_18] * 50.0f) * Corneria_80187A88(this->swork[GRANGA_SWK_18]); + this->fwork[GRANGA_FWK_01] = + SIN_DEG(this->swork[GRANGA_SWK_19] * 50.0f) * Corneria_80187A88(this->swork[GRANGA_SWK_19]); + this->fwork[GRANGA_FWK_02] = + SIN_DEG(this->swork[GRANGA_SWK_20] * 50.0f) * Corneria_80187A88(this->swork[GRANGA_SWK_20]); + this->fwork[GRANGA_FWK_03] = + SIN_DEG(this->swork[GRANGA_SWK_21] * 50.0f) * Corneria_80187A88(this->swork[GRANGA_SWK_21]); + this->fwork[GRANGA_FWK_04] = + SIN_DEG(this->swork[GRANGA_SWK_22] * 50.0f) * Corneria_80187A88(this->swork[GRANGA_SWK_22]); - if (boss->state < 5) { - sp5C = SIN_DEG(boss->swork[23] * 12.0f) * Corneria_80187A88(boss->swork[23]) * 0.3f; - Math_SmoothStepToF(&boss->obj.rot.z, sp5C, 0.2f, 100.0f, 0.001f); + if (this->state < GRANGA_STATE_5) { + sp5C = SIN_DEG(this->swork[GRANGA_SWK_23] * 12.0f) * Corneria_80187A88(this->swork[GRANGA_SWK_23]) * 0.3f; + Math_SmoothStepToF(&this->obj.rot.z, sp5C, 0.2f, 100.0f, 0.001f); } - if (boss->obj.pos.y <= 10.0f) { - boss->obj.pos.y = 10.0f; + if (this->obj.pos.y <= 10.0f) { + this->obj.pos.y = 10.0f; } - sp214 = D_i1_8019B6D8[17] - boss->obj.pos.x; - sp210 = D_i1_8019B6D8[18] - (boss->obj.pos.y + 300.0f); - sp20C = D_i1_8019B6D8[19] - boss->obj.pos.z; + sp214 = sCoGrangaWork[GRANGA_WORK_17] - this->obj.pos.x; + sp210 = sCoGrangaWork[GRANGA_WORK_18] - (this->obj.pos.y + 300.0f); + sp20C = sCoGrangaWork[GRANGA_WORK_19] - this->obj.pos.z; sp1FC = Math_RadToDeg(Math_Atan2F(sp214, sp20C)); - sp204 = sqrtf((sp214 * sp214) + (sp20C * sp20C)); + sp204 = sqrtf(SQ(sp214) + SQ(sp20C)); sp200 = Math_RadToDeg(-Math_Atan2F(sp210, sp204)); if ((sp200 > 50.0f) && (sp200 < 180.0f)) { @@ -717,7 +749,7 @@ void Corneria_80189058(Boss* boss) { sp200 = 310.0f; } - sp1FC -= boss->obj.rot.y; + sp1FC -= this->obj.rot.y; if (sp1FC > 360.0f) { sp1FC -= 360.0f; } @@ -731,170 +763,170 @@ void Corneria_80189058(Boss* boss) { sp1FC = 310.0f; } - Math_SmoothStepToAngle(&D_i1_8019B6D8[16], sp1FC, 0.1f, 3.0f, 0.0f); - Math_SmoothStepToAngle(&D_i1_8019B6D8[15], sp200, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToAngle(&sCoGrangaWork[GRANGA_WORK_16], sp1FC, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToAngle(&sCoGrangaWork[GRANGA_WORK_15], sp200, 0.1f, 3.0f, 0.0f); - if (boss->state != 0) { - sp1F8 = - Math_RadToDeg(Math_Atan2F(D_i1_8019B6D8[66] - boss->obj.pos.x, D_i1_8019B6D8[67] - boss->obj.pos.z)); - Math_SmoothStepToAngle(&boss->obj.rot.y, sp1F8, 0.1f, 3.0f, 0.0f); + if (this->state != GRANGA_STATIONARY) { + sp1F8 = Math_RadToDeg(Math_Atan2F(sCoGrangaWork[GRANGA_WORK_66] - this->obj.pos.x, + sCoGrangaWork[GRANGA_WORK_67] - this->obj.pos.z)); + Math_SmoothStepToAngle(&this->obj.rot.y, sp1F8, 0.1f, 3.0f, 0.0f); } - Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, 0U); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); - switch (boss->state) { - case 0: - boss->unk_04C = 0; - D_i1_8019B6D8[17] = gPlayer[0].pos.x; - D_i1_8019B6D8[18] = gPlayer[0].pos.y; - D_i1_8019B6D8[19] = gPlayer[0].trueZpos; + switch (this->state) { + case GRANGA_STATIONARY: + this->unk_04C = 0; + sCoGrangaWork[GRANGA_WORK_17] = gPlayer[0].pos.x; + sCoGrangaWork[GRANGA_WORK_18] = gPlayer[0].pos.y; + sCoGrangaWork[GRANGA_WORK_19] = gPlayer[0].trueZpos; - if (boss->timer_050 == 0) { - switch (boss->swork[31]) { - case 1: - boss->state = 1; - boss->timer_050 = RAND_INT(50.0f) + 50; - boss->fwork[14] = 0.0f; + if (this->timer_050 == 0) { + switch (this->swork[GRANGA_NEXT_STATE]) { + case GRANGA_STATE_1: + this->state = GRANGA_STATE_1; + this->timer_050 = RAND_INT(50.0f) + 50; + this->fwork[GRANGA_FWK_14] = 0.0f; break; - case 2: - boss->state = 2; - boss->timer_050 = RAND_INT(100.0f) + 150; - boss->timer_052 = 40; - boss->timer_054 = 40; - boss->fwork[14] = 0.07f; + case GRANGA_STATE_2: + this->state = GRANGA_STATE_2; + this->timer_050 = RAND_INT(100.0f) + 150; + this->timer_052 = 40; + this->timer_054 = 40; + this->fwork[GRANGA_FWK_14] = 0.07f; break; - case 4: - boss->state = 4; - boss->timer_050 = RAND_INT(70.0f) + 100; - boss->fwork[14] = 0.1f; - D_i1_8019B6D8[66] = RAND_FLOAT_CENTERED(6000.0f); - D_i1_8019B6D8[67] = RAND_FLOAT_CENTERED(6000.0f); - boss->fwork[14] = 0.07f; + case GRANGA_STATE_4: + this->state = GRANGA_STATE_4; + this->timer_050 = RAND_INT(70.0f) + 100; + this->fwork[GRANGA_FWK_14] = 0.1f; + sCoGrangaWork[GRANGA_WORK_66] = RAND_FLOAT_CENTERED(6000.0f); + sCoGrangaWork[GRANGA_WORK_67] = RAND_FLOAT_CENTERED(6000.0f); + this->fwork[GRANGA_FWK_14] = 0.07f; break; - case 3: - boss->state = 3; - boss->timer_050 = RAND_INT(100.0f) + 150; - boss->fwork[14] = 0.07f; + case GRANGA_STATE_3: + this->state = GRANGA_STATE_3; + this->timer_050 = RAND_INT(100.0f) + 150; + this->fwork[GRANGA_FWK_14] = 0.07f; break; } } - Animation_GetFrameData(&D_CO_602C0D0, boss->unk_04C, sp84); + Animation_GetFrameData(&D_CO_602C0D0, this->unk_04C, frameTable); - if (boss->timer_052 == 0) { - boss->timer_052 = 150; - boss->swork[30] = 1; + if (this->timer_052 == 0) { + this->timer_052 = 150; + this->swork[GRANGA_ATTACK_STATE] = GRANGA_ATTACK_MISSILES; } break; - case 1: - D_i1_8019B6D8[17] = D_i1_8019B6D8[66] = gPlayer[0].pos.x; - D_i1_8019B6D8[18] = gPlayer[0].pos.y; - D_i1_8019B6D8[19] = D_i1_8019B6D8[67] = gPlayer[0].trueZpos; + case GRANGA_STATE_1: + sCoGrangaWork[GRANGA_WORK_17] = sCoGrangaWork[GRANGA_WORK_66] = gPlayer[0].pos.x; + sCoGrangaWork[GRANGA_WORK_18] = gPlayer[0].pos.y; + sCoGrangaWork[GRANGA_WORK_19] = sCoGrangaWork[GRANGA_WORK_67] = gPlayer[0].trueZpos; - boss->unk_04C += 2; - if (boss->unk_04C >= Animation_GetFrameCount(&D_CO_602BC18)) { - boss->unk_04C = 0; + this->unk_04C += 2; + if (this->unk_04C >= Animation_GetFrameCount(&D_CO_602BC18)) { + this->unk_04C = 0; } - Animation_GetFrameData(&D_CO_602BC18, boss->unk_04C, sp84); + Animation_GetFrameData(&D_CO_602BC18, this->unk_04C, frameTable); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp1EC, &sp21C); - if (boss->timer_052 == 0) { - boss->timer_052 = 150; - boss->swork[30] = 1; + if (this->timer_052 == 0) { + this->timer_052 = 150; + this->swork[GRANGA_ATTACK_STATE] = GRANGA_ATTACK_MISSILES; } - Corneria_80188A18(boss); + Corneria_Granga_DecideNextAction(this); break; - case 2: - D_i1_8019B6D8[17] = D_i1_8019B6D8[66] = gPlayer[0].pos.x; - D_i1_8019B6D8[18] = gPlayer[0].pos.y; - D_i1_8019B6D8[19] = D_i1_8019B6D8[67] = gPlayer[0].trueZpos; + case GRANGA_STATE_2: + sCoGrangaWork[GRANGA_WORK_17] = sCoGrangaWork[GRANGA_WORK_66] = gPlayer[0].pos.x; + sCoGrangaWork[GRANGA_WORK_18] = gPlayer[0].pos.y; + sCoGrangaWork[GRANGA_WORK_19] = sCoGrangaWork[GRANGA_WORK_67] = gPlayer[0].trueZpos; - boss->unk_04C -= 4; - if (boss->unk_04C < 0) { - boss->unk_04C = 100; + this->unk_04C -= 4; + if (this->unk_04C < 0) { + this->unk_04C = 100; } - Animation_GetFrameData(&D_CO_602BC18, boss->unk_04C, sp84); + Animation_GetFrameData(&D_CO_602BC18, this->unk_04C, frameTable); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp6C, &sp21C); - if (boss->timer_052 == 0) { - boss->timer_052 = 30; - boss->swork[30] = 2; + if (this->timer_052 == 0) { + this->timer_052 = 30; + this->swork[GRANGA_ATTACK_STATE] = GRANGA_ATTACK_LASERS; } - if (boss->timer_054 == 0) { - boss->timer_054 = 9; - boss->swork[30] = 3; + if (this->timer_054 == 0) { + this->timer_054 = 9; + this->swork[GRANGA_ATTACK_STATE] = GRANGA_ATTACK_PLASMA; } - Corneria_80188A18(boss); + Corneria_Granga_DecideNextAction(this); break; - case 3: - D_i1_8019B6D8[17] = D_i1_8019B6D8[66] = gPlayer[0].pos.x; - D_i1_8019B6D8[18] = gPlayer[0].pos.y; - D_i1_8019B6D8[19] = D_i1_8019B6D8[67] = gPlayer[0].trueZpos; + case GRANGA_STATE_3: + sCoGrangaWork[GRANGA_WORK_17] = sCoGrangaWork[GRANGA_WORK_66] = gPlayer[0].pos.x; + sCoGrangaWork[GRANGA_WORK_18] = gPlayer[0].pos.y; + sCoGrangaWork[GRANGA_WORK_19] = sCoGrangaWork[GRANGA_WORK_67] = gPlayer[0].trueZpos; - boss->unk_04C += 4; - if (boss->unk_04C > 100) { - boss->unk_04C = 0; + this->unk_04C += 4; + if (this->unk_04C > 100) { + this->unk_04C = 0; } - Animation_GetFrameData(&D_CO_602BC18, boss->unk_04C, sp84); + Animation_GetFrameData(&D_CO_602BC18, this->unk_04C, frameTable); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp78, &sp21C); - if (boss->timer_052 == 0) { - boss->timer_052 = 30; - boss->swork[30] = 2; + if (this->timer_052 == 0) { + this->timer_052 = 30; + this->swork[GRANGA_ATTACK_STATE] = GRANGA_ATTACK_LASERS; } - if (boss->timer_054 == 0) { - boss->timer_054 = 9; - boss->swork[30] = 3; + if (this->timer_054 == 0) { + this->timer_054 = 9; + this->swork[GRANGA_ATTACK_STATE] = GRANGA_ATTACK_PLASMA; } - Corneria_80188A18(boss); + Corneria_Granga_DecideNextAction(this); break; - case 4: - D_i1_8019B6D8[17] = gPlayer[0].pos.x; - D_i1_8019B6D8[18] = gPlayer[0].pos.y; - D_i1_8019B6D8[19] = gPlayer[0].trueZpos; + case GRANGA_STATE_4: + sCoGrangaWork[GRANGA_WORK_17] = gPlayer[0].pos.x; + sCoGrangaWork[GRANGA_WORK_18] = gPlayer[0].pos.y; + sCoGrangaWork[GRANGA_WORK_19] = gPlayer[0].trueZpos; - boss->unk_04C += 4; - if (boss->unk_04C > 100) { - boss->unk_04C = 0; + this->unk_04C += 4; + if (this->unk_04C > 100) { + this->unk_04C = 0; } - Animation_GetFrameData(&D_CO_602BC18, boss->unk_04C, sp84); + Animation_GetFrameData(&D_CO_602BC18, this->unk_04C, frameTable); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp78, &sp21C); - Corneria_80188A18(boss); + Corneria_Granga_DecideNextAction(this); break; - case 5: - case 6: - boss->drawShadow = false; + case GRANGA_STATE_5: + case GRANGA_STATE_6: + this->drawShadow = false; gGroundClipMode = 1; - if (((gGameFrameCount % 8) == 0)) { - D_i1_8019B6D8[17] = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(2000.0f); - D_i1_8019B6D8[18] = gPlayer[0].pos.y; - D_i1_8019B6D8[19] = gPlayer[0].trueZpos + RAND_FLOAT_CENTERED(2000.0f); + if ((gGameFrameCount % 8) == 0) { + sCoGrangaWork[GRANGA_WORK_17] = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(2000.0f); + sCoGrangaWork[GRANGA_WORK_18] = gPlayer[0].pos.y; + sCoGrangaWork[GRANGA_WORK_19] = gPlayer[0].trueZpos + RAND_FLOAT_CENTERED(2000.0f); } - boss->fwork[12] += 0.05f; + this->fwork[GRANGA_FWK_12] += 0.05f; - if (boss->state == 6) { - boss->obj.rot.z += boss->fwork[12]; - if (boss->obj.rot.z > 60.0f) { - boss->obj.rot.z = 60.0f; - Corneria_80188C7C(boss); + if (this->state == GRANGA_STATE_6) { + this->obj.rot.z += this->fwork[GRANGA_FWK_12]; + if (this->obj.rot.z > 60.0f) { + this->obj.rot.z = 60.0f; + Corneria_80188C7C(this); if ((gGameFrameCount % 512U) == 0) { Radio_PlayMessage(gMsg_ID_2275, RCID_BOSS_CORNERIA); @@ -904,12 +936,12 @@ void Corneria_80189058(Boss* boss) { Radio_PlayMessage(gMsg_ID_2220, RCID_BOSS_CORNERIA); } } - boss->obj.rot.x = boss->obj.rot.z; - } else { - boss->obj.rot.z -= boss->fwork[12]; - if (boss->obj.rot.z < -60.0f) { - boss->obj.rot.z = -60.0f; - Corneria_80188C7C(boss); + this->obj.rot.x = this->obj.rot.z; + } else { // (this->state == GRANGA_STATE_5) + this->obj.rot.z -= this->fwork[GRANGA_FWK_12]; + if (this->obj.rot.z < -60.0f) { + this->obj.rot.z = -60.0f; + Corneria_80188C7C(this); if ((gGameFrameCount % 512U) == 0) { Radio_PlayMessage(gMsg_ID_2275, RCID_BOSS_CORNERIA); @@ -918,209 +950,215 @@ void Corneria_80189058(Boss* boss) { Radio_PlayMessage(gMsg_ID_2220, RCID_BOSS_CORNERIA); } } - boss->obj.rot.x = -boss->obj.rot.z; + this->obj.rot.x = -this->obj.rot.z; } - if (boss->timer_050 == 0) { + if (this->timer_050 == 0) { ObjectId objId; - boss->timer_050 = 60; - objId = Corneria_80188750(boss); + this->timer_050 = 60; + objId = Corneria_Granga_ChooseMissileTarget(this); if (objId != 0) { - Corneria_80187710(D_i1_8019B6D8[62], D_i1_8019B6D8[63], D_i1_8019B6D8[64], 65.0f, 270.0f, 0.0f, - 0, 0, objId); + Corneria_Boss_SpawnMissile(sCoGrangaWork[GRANGA_WORK_62], sCoGrangaWork[GRANGA_WORK_63], + sCoGrangaWork[GRANGA_WORK_64], 65.0f, 270.0f, 0.0f, 0, 0, objId); } } - boss->yOffset = SIN_DEG(boss->obj.rot.z) * 30.0f; + this->yOffset = SIN_DEG(this->obj.rot.z) * 30.0f; - if (((gGameFrameCount % 16) == 0)) { - boss->unk_04C = RAND_INT(100.0f); + if ((gGameFrameCount % 16) == 0) { + this->unk_04C = RAND_INT(100.0f); } - Animation_GetFrameData(&D_CO_602BC18, boss->unk_04C, sp84); - boss->fwork[14] = 0.03f; + Animation_GetFrameData(&D_CO_602BC18, this->unk_04C, frameTable); + this->fwork[GRANGA_FWK_14] = 0.03f; break; - case 7: - if (boss->swork[32] != 0) { - boss->fwork[12] += 0.05f; - boss->obj.rot.x += boss->fwork[12]; - if (boss->obj.rot.x > 60.0f) { - boss->obj.rot.x = 60.0f; - Corneria_80188C7C(boss); + case GRANGA_STATE_7: + if (this->swork[GRANGA_SWK_32]) { + this->fwork[GRANGA_FWK_12] += 0.05f; + this->obj.rot.x += this->fwork[GRANGA_FWK_12]; + if (this->obj.rot.x > 60.0f) { + this->obj.rot.x = 60.0f; + Corneria_80188C7C(this); } } - boss->swork[24] = boss->swork[25] = boss->swork[26] = boss->swork[27] = boss->swork[28] = 0; + this->swork[GRANGA_LEFT_LEG_HP] = this->swork[GRANGA_RIGHT_LEG_HP] = this->swork[GRANGA_LEFT_ARM_HP] = + this->swork[GRANGA_RIGHT_ARM_HP] = this->swork[GRANGA_PLASMA_GUN_HP] = 0; - if (boss->timer_050 == 12) { + if (this->timer_050 == 12) { Object_Kill(&gEffects[0].obj, gEffects[0].sfxSource); - func_effect_8007D0E0(D_i1_8019B6D8[62], D_i1_8019B6D8[63] - 100.0f, D_i1_8019B6D8[64], 25.0f); + func_effect_8007D0E0(sCoGrangaWork[GRANGA_WORK_62], sCoGrangaWork[GRANGA_WORK_63] - 100.0f, + sCoGrangaWork[GRANGA_WORK_64], 25.0f); } - if (boss->timer_050 == 10) { + if (this->timer_050 == 10) { for (sp218 = 0; sp218 < 50; sp218++) { if (gEffects[sp218].obj.status != OBJ_FREE) { Object_Kill(&gEffects[sp218].obj, gEffects[sp218].sfxSource); } } - func_effect_8007A568(D_i1_8019B6D8[62], D_i1_8019B6D8[63] - 100.0f, D_i1_8019B6D8[64], 40.0f); - func_effect_8007D0E0(D_i1_8019B6D8[62], D_i1_8019B6D8[63] - 100.0f, D_i1_8019B6D8[64], 30.0f); - func_enmy_80062B60(D_i1_8019B6D8[62], D_i1_8019B6D8[64], 0, 120.0f); + func_effect_8007A568(sCoGrangaWork[GRANGA_WORK_62], sCoGrangaWork[GRANGA_WORK_63] - 100.0f, + sCoGrangaWork[GRANGA_WORK_64], 40.0f); + func_effect_8007D0E0(sCoGrangaWork[GRANGA_WORK_62], sCoGrangaWork[GRANGA_WORK_63] - 100.0f, + sCoGrangaWork[GRANGA_WORK_64], 30.0f); + func_enmy_80062B60(sCoGrangaWork[GRANGA_WORK_62], sCoGrangaWork[64], 0, 120.0f); gCameraShake = 25; gShowBossHealth = 0; for (sp218 = 0; sp218 < 100; sp218++) { - func_effect_80079618(D_i1_8019B6D8[62] + RAND_FLOAT_CENTERED(600.0f), - (D_i1_8019B6D8[63] + RAND_FLOAT_CENTERED(500.0f)) - 100.0f, - D_i1_8019B6D8[64] + RAND_FLOAT_CENTERED(600.0f), 2.0f); + func_effect_80079618(sCoGrangaWork[GRANGA_WORK_62] + RAND_FLOAT_CENTERED(600.0f), + (sCoGrangaWork[GRANGA_WORK_63] + RAND_FLOAT_CENTERED(500.0f)) - 100.0f, + sCoGrangaWork[GRANGA_WORK_64] + RAND_FLOAT_CENTERED(600.0f), 2.0f); } } - if (boss->timer_050 < 50) { - boss->dmgPart = boss->timer_050 % 8U; + if (this->timer_050 < 50) { + this->dmgPart = this->timer_050 % 8U; - switch (boss->dmgPart) { - case 1: - if (boss->swork[2] != 1000) { - boss->dmgType = DMG_BEAM; + switch (this->dmgPart) { + case GRANGA_DMG_LEFT_ARM: + if (this->swork[GRANGA_LEFT_ARM_DMG_IND] != DMG_DESTROYED) { + this->dmgType = DMG_BEAM; } break; - case 2: - if (boss->swork[1] != 1000) { - boss->dmgType = DMG_BEAM; + case GRANGA_DMG_RIGHT_ARM: + if (this->swork[GRANGA_RIGHT_ARM_DMG_IND] != DMG_DESTROYED) { + this->dmgType = DMG_BEAM; } - case 3: - if (boss->swork[3] != 1000) { - boss->dmgType = DMG_BEAM; + case GRANGA_DMG_GUN: + if (this->swork[GRANGA_GUN_DMG_IND] != DMG_DESTROYED) { + this->dmgType = DMG_BEAM; } break; - case 4: - if (boss->swork[7] != 1000) { - boss->dmgType = DMG_BEAM; + case GRANGA_DMG_LEFT_LEG: + if (this->swork[GRANGA_LEFT_LEG_DMG_IND] != DMG_DESTROYED) { + this->dmgType = DMG_BEAM; } - case 5: - if (boss->swork[4] != 1000) { - boss->dmgType = DMG_BEAM; + case GRANGA_DMG_RIGHT_LEG: + if (this->swork[GRANGA_RIGHT_LEG_DMG_IND] != DMG_DESTROYED) { + this->dmgType = DMG_BEAM; } break; } } - if (boss->timer_050 == 0) { - Object_Kill(&boss->obj, boss->sfxSource); + if (this->timer_050 == 0) { + Object_Kill(&this->obj, this->sfxSource); } - Animation_GetFrameData(&D_CO_602BC18, 0, sp84); + Animation_GetFrameData(&D_CO_602BC18, 0, frameTable); break; default: - Animation_GetFrameData(&D_CO_602C0D0, boss->unk_04C, sp84); + Animation_GetFrameData(&D_CO_602C0D0, this->unk_04C, frameTable); break; } - Math_SmoothStepToF(&boss->vel.x, sp21C.x, 0.3f, 5.0f, 0.0f); - Math_SmoothStepToF(&boss->vel.z, sp21C.z, 0.3f, 5.0f, 0.0f); + Math_SmoothStepToF(&this->vel.x, sp21C.x, 0.3f, 5.0f, 0.0f); + Math_SmoothStepToF(&this->vel.z, sp21C.z, 0.3f, 5.0f, 0.0f); - Corneria_801887AC(boss); + Corneria_Granga_Attack(this); - Math_SmoothStepToVec3fArray(sp84, boss->vwork, 1, 19, boss->fwork[14], 100.0f, 0.0f); - Math_SmoothStepToF(&boss->fwork[14], 1.0f, 1.0f, 0.01f, 0.0f); + Math_SmoothStepToVec3fArray(frameTable, this->vwork, 1, 19, this->fwork[GRANGA_FWK_14], 100.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[GRANGA_FWK_14], 1.0f, 1.0f, 0.01f, 0.0f); - if (boss->state < 5) { - if (((fabsf(boss->obj.pos.x) > 4000.0f) || (fabsf(boss->obj.pos.z) > 4000.0f)) && (boss->state != 4)) { - boss->state = 4; - boss->timer_050 = 150; - D_i1_8019B6D8[66] = 0.0f; - D_i1_8019B6D8[67] = 0.0f; - boss->swork[31] = 0; + if (this->state < GRANGA_STATE_5) { + if (((fabsf(this->obj.pos.x) > 4000.0f) || (fabsf(this->obj.pos.z) > 4000.0f)) && + (this->state != GRANGA_STATE_4)) { + this->state = GRANGA_STATE_4; + this->timer_050 = 150; + sCoGrangaWork[GRANGA_WORK_66] = 0.0f; + sCoGrangaWork[GRANGA_WORK_67] = 0.0f; + this->swork[GRANGA_NEXT_STATE] = GRANGA_STATIONARY; } - if ((boss->state != 0) && ((boss->unk_04C == 0) || (boss->unk_04C == 52))) { - AUDIO_PLAY_SFX(NA_SE_EN_HEAVY_WALK, boss->sfxSource, 4); + if ((this->state != GRANGA_STATIONARY) && ((this->unk_04C == 0) || (this->unk_04C == 52))) { + AUDIO_PLAY_SFX(NA_SE_EN_HEAVY_WALK, this->sfxSource, 4); } - if (gPlayer[0].somersault && (boss->state != 0)) { - boss->state = 0; - boss->swork[31] = 1; - boss->timer_050 = 100; - boss->fwork[14] = 0.0f; + if (gPlayer[0].somersault && (this->state != GRANGA_STATIONARY)) { + this->state = GRANGA_STATIONARY; + this->swork[GRANGA_NEXT_STATE] = GRANGA_STATE_1; + this->timer_050 = 100; + this->fwork[GRANGA_FWK_14] = 0.0f; } } } } -bool Corneria_8018A434(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { - Boss* boss = (Boss*) data; +bool Corneria_Granga_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { + Granga* boss = (Granga*) data; - if (boss->swork[limbIndex] == 1000) { - *dList = 0; + if (boss->swork[limbIndex] == DMG_DESTROYED) { + *dList = NULL; } RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, 1001); switch (limbIndex) { case 6: - rot->x += boss->fwork[1]; - rot->y += boss->fwork[1]; - rot->y -= boss->fwork[13] * 0.6f; + rot->x += boss->fwork[GRANGA_FWK_01]; + rot->y += boss->fwork[GRANGA_FWK_01]; + rot->y -= boss->fwork[GRANGA_FWK_13] * 0.6f; break; case 5: - rot->x -= boss->fwork[1]; - rot->y -= boss->fwork[1]; - rot->z += boss->fwork[1]; + rot->x -= boss->fwork[GRANGA_FWK_01]; + rot->y -= boss->fwork[GRANGA_FWK_01]; + rot->z += boss->fwork[GRANGA_FWK_01]; break; case 4: - rot->x += boss->fwork[1]; - rot->y += boss->fwork[1]; - rot->z -= boss->fwork[1]; + rot->x += boss->fwork[GRANGA_FWK_01]; + rot->y += boss->fwork[GRANGA_FWK_01]; + rot->z -= boss->fwork[GRANGA_FWK_01]; break; case 9: - rot->x -= boss->fwork[0]; - rot->y -= boss->fwork[0]; - rot->y += boss->fwork[13]; + rot->x -= boss->fwork[GRANGA_FWK_00]; + rot->y -= boss->fwork[GRANGA_FWK_00]; + rot->y += boss->fwork[GRANGA_FWK_13]; break; case 8: - rot->x += boss->fwork[0]; - rot->y += boss->fwork[0]; - rot->z -= boss->fwork[0]; + rot->x += boss->fwork[GRANGA_FWK_00]; + rot->y += boss->fwork[GRANGA_FWK_00]; + rot->z -= boss->fwork[GRANGA_FWK_00]; break; case 7: - rot->x -= boss->fwork[0]; - rot->y -= boss->fwork[0]; - rot->z += boss->fwork[0]; + rot->x -= boss->fwork[GRANGA_FWK_00]; + rot->y -= boss->fwork[GRANGA_FWK_00]; + rot->z += boss->fwork[GRANGA_FWK_00]; break; case 3: - rot->x += boss->fwork[2]; - rot->y += boss->fwork[2]; - rot->z += D_i1_8019B6D8[15]; + rot->x += boss->fwork[GRANGA_FWK_02]; + rot->y += boss->fwork[GRANGA_FWK_02]; + rot->z += sCoGrangaWork[GRANGA_WORK_15]; break; case 1: - rot->x += boss->fwork[4] - D_i1_8019B6D8[15]; - rot->y += boss->fwork[4]; + rot->x += boss->fwork[GRANGA_FWK_04] - sCoGrangaWork[GRANGA_WORK_15]; + rot->y += boss->fwork[GRANGA_FWK_04]; break; case 2: - rot->x += boss->fwork[3] + D_i1_8019B6D8[15]; - rot->y += boss->fwork[3]; + rot->x += boss->fwork[GRANGA_FWK_03] + sCoGrangaWork[GRANGA_WORK_15]; + rot->y += boss->fwork[GRANGA_FWK_03]; break; case 16: - rot->x += D_i1_8019B6D8[16]; + rot->x += sCoGrangaWork[GRANGA_WORK_16]; break; } + // Damage indicator if (((boss->swork[limbIndex] % 2) != 0) || ((boss->timer_05C % 2) != 0)) { RCP_SetupDL_64(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 64, 64, 255, 255); @@ -1128,7 +1166,7 @@ bool Corneria_8018A434(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return false; } -void Corneria_8018A730(s32 limbIndex, Vec3f* rot, void* data) { +void Corneria_Granga_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* data) { s32 pad; Vec3f sp80 = { 0.0f, 0.0f, 0.0f }; Vec3f sp74; @@ -1142,63 +1180,63 @@ void Corneria_8018A730(s32 limbIndex, Vec3f* rot, void* data) { if ((limbIndex >= 4) && (limbIndex < 10)) { Matrix_MultVec3f(gCalcMatrix, &sp80, &sp74); - D_i1_8019B6D8[limbIndex + 16] = sp74.x; - D_i1_8019B6D8[limbIndex + 22] = sp74.y; - D_i1_8019B6D8[limbIndex + 28] = sp74.z; + sCoGrangaWork[limbIndex + 16] = sp74.x; + sCoGrangaWork[limbIndex + 22] = sp74.y; + sCoGrangaWork[limbIndex + 28] = sp74.z; Matrix_GetYRPAngles(gCalcMatrix, &sp74); - D_i1_8019B6D8[limbIndex + 34] = sp74.x; - D_i1_8019B6D8[limbIndex + 40] = sp74.y; - D_i1_8019B6D8[limbIndex + 46] = sp74.z; + sCoGrangaWork[limbIndex + 34] = sp74.x; + sCoGrangaWork[limbIndex + 40] = sp74.y; + sCoGrangaWork[limbIndex + 46] = sp74.z; } switch (limbIndex) { case 1: Matrix_MultVec3f(gCalcMatrix, &sp68, &sp74); - D_i1_8019B6D8[3] = sp74.x; - D_i1_8019B6D8[4] = sp74.y; - D_i1_8019B6D8[5] = sp74.z; + sCoGrangaWork[GRANGA_WORK_03] = sp74.x; + sCoGrangaWork[GRANGA_WORK_04] = sp74.y; + sCoGrangaWork[GRANGA_WORK_05] = sp74.z; Matrix_MultVec3f(gCalcMatrix, &sp5C, &sp74); - D_i1_8019B6D8[0] = sp74.x; - D_i1_8019B6D8[1] = sp74.y; - D_i1_8019B6D8[2] = sp74.z; + sCoGrangaWork[GRANGA_WORK_00] = sp74.x; + sCoGrangaWork[GRANGA_WORK_01] = sp74.y; + sCoGrangaWork[GRANGA_WORK_02] = sp74.z; break; case 2: Matrix_MultVec3f(gCalcMatrix, &sp68, &sp74); - D_i1_8019B6D8[9] = sp74.x; - D_i1_8019B6D8[10] = sp74.y; - D_i1_8019B6D8[11] = sp74.z; + sCoGrangaWork[GRANGA_WORK_09] = sp74.x; + sCoGrangaWork[GRANGA_WORK_10] = sp74.y; + sCoGrangaWork[GRANGA_WORK_11] = sp74.z; Matrix_MultVec3f(gCalcMatrix, &sp5C, &sp74); - D_i1_8019B6D8[6] = sp74.x; - D_i1_8019B6D8[7] = sp74.y; - D_i1_8019B6D8[8] = sp74.z; + sCoGrangaWork[GRANGA_WORK_06] = sp74.x; + sCoGrangaWork[GRANGA_WORK_07] = sp74.y; + sCoGrangaWork[GRANGA_WORK_08] = sp74.z; break; case 3: Matrix_MultVec3f(gCalcMatrix, &sp50, &sp74); - D_i1_8019B6D8[12] = sp74.x; - D_i1_8019B6D8[13] = sp74.y; - D_i1_8019B6D8[14] = sp74.z; + sCoGrangaWork[GRANGA_WORK_12] = sp74.x; + sCoGrangaWork[GRANGA_WORK_13] = sp74.y; + sCoGrangaWork[GRANGA_WORK_14] = sp74.z; break; case 17: Matrix_MultVec3f(gCalcMatrix, &sp44, &sp74); - D_i1_8019B6D8[56] = sp74.x; - D_i1_8019B6D8[57] = sp74.y; - D_i1_8019B6D8[58] = sp74.z; + sCoGrangaWork[GRANGA_WORK_56] = sp74.x; + sCoGrangaWork[GRANGA_WORK_57] = sp74.y; + sCoGrangaWork[GRANGA_WORK_58] = sp74.z; Matrix_MultVec3f(gCalcMatrix, &sp38, &sp74); - D_i1_8019B6D8[59] = sp74.x; - D_i1_8019B6D8[60] = sp74.y; - D_i1_8019B6D8[61] = sp74.z; + sCoGrangaWork[GRANGA_WORK_59] = sp74.x; + sCoGrangaWork[GRANGA_WORK_60] = sp74.y; + sCoGrangaWork[GRANGA_WORK_61] = sp74.z; break; case 10: Matrix_MultVec3f(gCalcMatrix, &sp2C, &sp74); - D_i1_8019B6D8[62] = sp74.x; - D_i1_8019B6D8[63] = sp74.y; - D_i1_8019B6D8[64] = sp74.z; + sCoGrangaWork[GRANGA_WORK_62] = sp74.x; + sCoGrangaWork[GRANGA_WORK_63] = sp74.y; + sCoGrangaWork[GRANGA_WORK_64] = sp74.z; break; default: @@ -1206,355 +1244,357 @@ void Corneria_8018A730(s32 limbIndex, Vec3f* rot, void* data) { } } -void Corneria_8018AA74(Boss* boss) { +void Corneria_Granga_Draw(Granga* this) { Matrix_Translate(gCalcMatrix, 0.0f, 700.0f, 0.0f, MTXF_APPLY); - Animation_DrawSkeleton(2, D_CO_602BE64, boss->vwork, Corneria_8018A434, Corneria_8018A730, boss, gCalcMatrix); + Animation_DrawSkeleton(2, D_CO_602BE64, this->vwork, Corneria_Granga_OverrideLimbDraw, Corneria_Granga_PostLimbDraw, + this, gCalcMatrix); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); } -bool Corneria_8018AB08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { +bool Corneria_Garuda_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { Actor* actor = (Actor*) data; if (limbIndex == 1) { - rot->x += actor->fwork[1]; + rot->x += actor->fwork[GRANGA_FWK_01]; } - if ((limbIndex == 3) && (actor->obj.id == OBJ_ACTOR_176)) { - rot->x += actor->fwork[1]; + if ((limbIndex == 3) && (actor->obj.id == OBJ_ACTOR_CO_GARUDA_1)) { + rot->x += actor->fwork[GRANGA_FWK_01]; } return false; } -s32 Corneria_8018AB64(Actor* actor) { +s32 Corneria_Garuda_CheckCollision(CoGaruda1* this) { s32 pad[2]; s32 i; - s32 temp_v0; - Vec3f sp7C; - Vec3f sp70 = { 0.0f, -10.0f, 0.0f }; - f32 sp60[4] = { 130.0f, -130.0f, 0.0f, 0.0f }; - f32 sp50[4] = { 0.0f, 0.0f, 130.0f, -130.0f }; + s32 collision; + Vec3f pos; + Vec3f vel = { 0.0f, -10.0f, 0.0f }; + f32 xPos[4] = { 130.0f, -130.0f, 0.0f, 0.0f }; + f32 zPos[4] = { 0.0f, 0.0f, 130.0f, -130.0f }; for (i = 0; i < 4; i++) { - sp7C.x = sp60[i] + actor->obj.pos.x; - sp7C.y = actor->obj.pos.y; - sp7C.z = sp50[i] + actor->obj.pos.z; + pos.x = xPos[i] + this->obj.pos.x; + pos.y = this->obj.pos.y; + pos.z = zPos[i] + this->obj.pos.z; - temp_v0 = Object_CheckCollision(actor->index, &sp7C, &sp70, 1); - if ((temp_v0 != 0) && (temp_v0 >= 10)) { - if ((gScenery[temp_v0 - 10].obj.status == OBJ_ACTIVE) && - (gScenery[temp_v0 - 10].obj.id == OBJ_SCENERY_40)) { - return temp_v0 - 9; + collision = Object_CheckCollision(this->index, &pos, &vel, 1); + if ((collision != 0) && (collision >= 10)) { + if ((gScenery[collision - 10].obj.status == OBJ_ACTIVE) && + (gScenery[collision - 10].obj.id == OBJ_SCENERY_CO_BUILDING_9)) { + return collision - 9; } } } return 0; } -void Corneria_8018ACE0(Actor* actor) { - if (actor->dmgType != DMG_NONE) { - actor->dmgType = DMG_NONE; +void Corneria_Garuda_HandleDamage(Actor* this) { + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; - if (actor->dmgPart == 0) { - AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, actor->sfxSource, 4); - func_effect_8007C120(actor->obj.pos.x, actor->obj.pos.y + 200.0f, actor->obj.pos.z, actor->vel.x, - actor->vel.y, actor->vel.z, 0.1f, 20); - actor->timer_0C6 = 15; - actor->health -= actor->damage; + if (this->dmgPart == 0) { + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, this->sfxSource, 4); + func_effect_8007C120(this->obj.pos.x, this->obj.pos.y + 200.0f, this->obj.pos.z, this->vel.x, this->vel.y, + this->vel.z, 0.1f, 20); + this->timer_0C6 = 15; + this->health -= this->damage; - if (actor->health <= 0) { - actor->obj.id = OBJ_ACTOR_179; - Object_SetInfo(&actor->info, actor->obj.id); - actor->state = 100; - actor->timer_0BC = 10; - actor->lockOnTimers[TEAM_ID_FOX] = 0; - actor->vel.x = actor->vel.y = actor->vel.z = 0.0f; + if (this->health <= 0) { + this->obj.id = OBJ_ACTOR_CO_GARUDA_DESTROY; + Object_SetInfo(&this->info, this->obj.id); + this->state = 100; + this->timer_0BC = 10; + this->lockOnTimers[TEAM_ID_FOX] = 0; + this->vel.x = this->vel.y = this->vel.z = 0.0f; } } } - if ((actor->health < 11) && ((gGameFrameCount % 4) == 0)) { - func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(100.0f), - actor->obj.pos.y + 200.0f + RAND_FLOAT_CENTERED(100.0f), - actor->obj.pos.z + 50.0f + RAND_FLOAT(50.0f), 3.0f); - func_effect_8007C120(actor->obj.pos.x, actor->obj.pos.y + 200.0f, actor->obj.pos.z, actor->vel.x, actor->vel.y, - actor->vel.z, 0.1f, 10); + if ((this->health < 11) && ((gGameFrameCount % 4) == 0)) { + func_effect_8007D2C8(this->obj.pos.x + RAND_FLOAT_CENTERED(100.0f), + this->obj.pos.y + 200.0f + RAND_FLOAT_CENTERED(100.0f), + this->obj.pos.z + 50.0f + RAND_FLOAT(50.0f), 3.0f); + func_effect_8007C120(this->obj.pos.x, this->obj.pos.y + 200.0f, this->obj.pos.z, this->vel.x, this->vel.y, + this->vel.z, 0.1f, 10); } } -void Corneria_8018AED0(Actor* actor) { - Vec3f sp40[20]; - f32 temp_sin; - f32 temp_cos; +void Corneria_CoGaruda1_Update(CoGaruda1* this) { + Vec3f frameTable[20]; + f32 sin; + f32 cos; - Corneria_8018ACE0(actor); + Corneria_Garuda_HandleDamage(this); - Math_SmoothStepToVec3fArray(sp40, actor->vwork, 0, Animation_GetFrameData(&D_CO_602991C, actor->animFrame, sp40), - 1.0f, 1.0f, 1.0f); + Math_SmoothStepToVec3fArray(frameTable, this->vwork, 0, + Animation_GetFrameData(&aCoGaruda1Anim, this->animFrame, frameTable), 1.0f, 1.0f, 1.0f); - temp_sin = SIN_DEG(actor->obj.rot.y); - actor->vel.x = actor->fwork[0] * temp_sin; - temp_cos = COS_DEG(actor->obj.rot.y); - actor->vel.z = actor->fwork[0] * temp_cos; + sin = SIN_DEG(this->obj.rot.y); + this->vel.x = this->fwork[0] * sin; + cos = COS_DEG(this->obj.rot.y); + this->vel.z = this->fwork[0] * cos; - switch (actor->state) { + switch (this->state) { case 0: - actor->fwork[1] += 20.0f; + this->fwork[1] += 20.0f; Texture_Scroll(D_CO_60329C0, 16, 16, 1); - actor->animFrame = 0; + this->animFrame = 0; - actor->fwork[0] += 1.0f; - if (actor->fwork[0] > 10.0f) { - actor->fwork[0] = 10.0f; + this->fwork[0] += 1.0f; + if (this->fwork[0] > 10.0f) { + this->fwork[0] = 10.0f; } - actor->iwork[0] = Corneria_8018AB64(actor); - if (actor->iwork[0] != 0) { - actor->state++; + this->iwork[0] = Corneria_Garuda_CheckCollision(this); + if (this->iwork[0] != 0) { + this->state++; } break; case 1: - actor->animFrame++; - actor->fwork[1] += 20.0f; - actor->fwork[0] = 0.0f; + this->animFrame++; + this->fwork[1] += 20.0f; + this->fwork[0] = 0.0f; - if (actor->animFrame == 50) { - gScenery[actor->iwork[0] - 1].state = 1; + if (this->animFrame == 50) { + gScenery[this->iwork[0] - 1].state = 1; } - if (actor->animFrame >= Animation_GetFrameCount(&D_CO_602991C)) { - actor->state++; + if (this->animFrame >= Animation_GetFrameCount(&aCoGaruda1Anim)) { + this->state++; } break; case 2: - actor->animFrame = 0; - actor->fwork[1] += 20.0f; + this->animFrame = 0; + this->fwork[1] += 20.0f; break; } } -void Corneria_8018B0B4(Actor* actor) { +void Corneria_IBeam_Init(Actor* this) { s32 i; for (i = 0; i < ARRAY_COUNT(gScenery); i++) { if (gScenery[i].obj.status == OBJ_FREE) { Scenery_Initialize(&gScenery[i]); gScenery[i].obj.status = OBJ_INIT; - gScenery[i].obj.id = OBJ_SCENERY_42; - gScenery[i].obj.pos.x = actor->obj.pos.x; - gScenery[i].obj.pos.y = actor->obj.pos.y; - gScenery[i].obj.pos.z = actor->obj.pos.z; - gScenery[i].obj.rot.y = actor->obj.rot.y; + gScenery[i].obj.id = OBJ_SCENERY_IBEAM; + gScenery[i].obj.pos.x = this->obj.pos.x; + gScenery[i].obj.pos.y = this->obj.pos.y; + gScenery[i].obj.pos.z = this->obj.pos.z; + gScenery[i].obj.rot.y = this->obj.rot.y; Object_SetInfo(&gScenery[i].info, gScenery[i].obj.id); - actor->iwork[0] = i; - return; + this->iwork[0] = i; + break; } } } -void Corneria_8018B15C(Actor* actor) { - Vec3f sp60[20]; - Vec3f sp54; - Vec3f sp48; +void Corneria_CoGaruda2_Update(CoGaruda2* this) { + Vec3f frameTable[20]; + Vec3f src; + Vec3f dest; Scenery* scenery; - f32 temp_sin; - f32 temp_cos; + f32 sin; + f32 cos; - Corneria_8018ACE0(actor); + Corneria_Garuda_HandleDamage(this); - scenery = &gScenery[actor->iwork[0]]; + scenery = &gScenery[this->iwork[0]]; - temp_sin = SIN_DEG(actor->obj.rot.y); - actor->vel.x = actor->fwork[0] * temp_sin; - temp_cos = COS_DEG(actor->obj.rot.y); - actor->vel.z = actor->fwork[0] * temp_cos; + sin = SIN_DEG(this->obj.rot.y); + this->vel.x = this->fwork[0] * sin; + cos = COS_DEG(this->obj.rot.y); + this->vel.z = this->fwork[0] * cos; - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); - - switch (actor->state) { - case 3: - break; + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + switch (this->state) { case 0: - actor->timer_0BC = 40; - actor->state = 1; - actor->animFrame = 0; + this->timer_0BC = 40; + this->state = 1; + this->animFrame = 0; break; case 1: - actor->fwork[0] = -10.0f; + this->fwork[0] = -10.0f; Texture_Scroll(D_CO_60329C0, 16, 16, 1); - if (actor->timer_0BC == 0) { - actor->state = 2; - actor->iwork[2] = RAND_INT(10.0f) + 10; + if (this->timer_0BC == 0) { + this->state = 2; + this->iwork[2] = RAND_INT(10.0f) + 10; } break; case 2: - actor->fwork[0] = -10.0f; + this->fwork[0] = -10.0f; Texture_Scroll(D_CO_60329C0, 16, 16, 1); - actor->animFrame++; + this->animFrame++; - if (actor->animFrame >= Animation_GetFrameCount(&D_CO_602AA04)) { - actor->state = 3; + if (this->animFrame >= Animation_GetFrameCount(&D_CO_602AA04)) { + this->state = 3; } - if (actor->animFrame == (Animation_GetFrameCount(&D_CO_602AA04) - actor->iwork[2])) { - actor->iwork[1] = 1; + if (this->animFrame == (Animation_GetFrameCount(&D_CO_602AA04) - this->iwork[2])) { + this->iwork[1] = 1; scenery->state = 1; - sp54.x = 0.0f; - sp54.y = 0.0f; - sp54.z = 30.0f; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48); - scenery->vel.x = sp48.x; - scenery->vel.y = sp48.y; - scenery->vel.z = sp48.z; - AUDIO_PLAY_SFX(NA_SE_EN_THROW, actor->sfxSource, 4); + src.x = 0.0f; + src.y = 0.0f; + src.z = 30.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + scenery->vel.x = dest.x; + scenery->vel.y = dest.y; + scenery->vel.z = dest.z; + AUDIO_PLAY_SFX(NA_SE_EN_THROW, this->sfxSource, 4); } break; + + case 3: + break; } - if (actor->iwork[1] == 0) { - scenery->obj.pos.x = actor->fwork[2]; - scenery->obj.pos.y = actor->fwork[6]; - scenery->obj.pos.z = actor->fwork[10]; - scenery->obj.rot.y = actor->obj.rot.y; + if (this->iwork[1] == 0) { + scenery->obj.pos.x = this->fwork[2]; + scenery->obj.pos.y = this->fwork[6]; + scenery->obj.pos.z = this->fwork[10]; + scenery->obj.rot.y = this->obj.rot.y; scenery->vel.y = 0.0f; } - Math_SmoothStepToVec3fArray(sp60, actor->vwork, 0, Animation_GetFrameData(&D_CO_602AA04, actor->animFrame, sp60), - 1.0f, 1.0f, 1.0f); + Math_SmoothStepToVec3fArray(frameTable, this->vwork, 0, + Animation_GetFrameData(&D_CO_602AA04, this->animFrame, frameTable), 1.0f, 1.0f, 1.0f); } -void Corneria_8018B418(Actor* actor) { +void Corneria_CoGaruda3_Update(CoGaruda3* this) { s32 pad; - Vec3f sp54[20]; - Scenery* temp_v0_2; - f32 temp_sin; - f32 temp_cos; + Vec3f frameTable[20]; + Scenery* scenery; + f32 sin; + f32 cos; s32 pad2[4]; - Corneria_8018ACE0(actor); + Corneria_Garuda_HandleDamage(this); - temp_sin = SIN_DEG(actor->obj.rot.y); - actor->vel.x = actor->fwork[0] * temp_sin; - temp_cos = COS_DEG(actor->obj.rot.y); - actor->vel.z = actor->fwork[0] * temp_cos; + sin = SIN_DEG(this->obj.rot.y); + this->vel.x = this->fwork[0] * sin; + cos = COS_DEG(this->obj.rot.y); + this->vel.z = this->fwork[0] * cos; - switch (actor->state) { + switch (this->state) { case 0: - actor->state = 1; + this->state = 1; break; case 1: - actor->fwork[0] = 5.0f; - actor->fwork[1] += 5.0f; + this->fwork[0] = 5.0f; + this->fwork[1] += 5.0f; Texture_Scroll(D_CO_60329C0, 16, 16, 1); - actor->animFrame++; - if (actor->animFrame >= Animation_GetFrameCount(&D_CO_602A520)) { - actor->animFrame = 0; + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&aCoGaruda3Anim)) { + this->animFrame = 0; } break; } - if (actor->iwork[1] == 0) { - temp_v0_2 = &gScenery[actor->iwork[0]]; - temp_v0_2->obj.pos.x = actor->fwork[2]; - temp_v0_2->obj.pos.y = actor->fwork[6]; - temp_v0_2->obj.pos.z = actor->fwork[10]; - temp_v0_2->obj.rot.y = actor->fwork[1]; - temp_v0_2->vel.y = 0.0f; + if (this->iwork[1] == 0) { + scenery = &gScenery[this->iwork[0]]; + scenery->obj.pos.x = this->fwork[2]; + scenery->obj.pos.y = this->fwork[6]; + scenery->obj.pos.z = this->fwork[10]; + scenery->obj.rot.y = this->fwork[1]; + scenery->vel.y = 0.0f; } - Math_SmoothStepToVec3fArray(sp54, actor->vwork, 0, Animation_GetFrameData(&D_CO_602A520, actor->animFrame, sp54), - 1.0f, 1.0f, 1.0f); + Math_SmoothStepToVec3fArray(frameTable, this->vwork, 0, + Animation_GetFrameData(&aCoGaruda3Anim, this->animFrame, frameTable), 1.0f, 1.0f, 1.0f); } -void Corneria_8018B58C(Actor* actor) { +void Corneria_CoGarudaDestroy_Update(CoGarudaDestroy* this) { s32 i; f32 spB4[4] = { -10.0f, -5.0f, 10.0f, 5.0f }; f32 spA4[4] = { 10.0f, 15.0f, 10.0f, 15.0f }; - Math_SmoothStepToF(&actor->vel.x, 0.0f, 0.05f, 1.0f, 0.0001f); - Math_SmoothStepToF(&actor->vel.y, 0.0f, 0.05f, 1.0f, 0.0001f); - Math_SmoothStepToF(&actor->vel.z, 0.0f, 0.05f, 1.0f, 0.0001f); + Math_SmoothStepToF(&this->vel.x, 0.0f, 0.05f, 1.0f, 0.0001f); + Math_SmoothStepToF(&this->vel.y, 0.0f, 0.05f, 1.0f, 0.0001f); + Math_SmoothStepToF(&this->vel.z, 0.0f, 0.05f, 1.0f, 0.0001f); - switch (actor->state) { + switch (this->state) { case 100: - if ((actor->timer_0BC & 3) == 0) { - - func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(100.0f), - actor->obj.pos.y + 200.0f + RAND_FLOAT_CENTERED(100.0f), - actor->obj.pos.z + 50.0f + RAND_FLOAT(50.0f), 3.0f); - func_effect_8007C120(actor->obj.pos.x, actor->obj.pos.y + 200.0f, actor->obj.pos.z, actor->vel.x, - actor->vel.y, actor->vel.z, 0.1f, 10); - AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_S, actor->sfxSource, 4); + if ((this->timer_0BC % 4) == 0) { + func_effect_8007D2C8(this->obj.pos.x + RAND_FLOAT_CENTERED(100.0f), + this->obj.pos.y + 200.0f + RAND_FLOAT_CENTERED(100.0f), + this->obj.pos.z + 50.0f + RAND_FLOAT(50.0f), 3.0f); + func_effect_8007C120(this->obj.pos.x, this->obj.pos.y + 200.0f, this->obj.pos.z, this->vel.x, + this->vel.y, this->vel.z, 0.1f, 10); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_S, this->sfxSource, 4); } - if (actor->timer_0BC == 0) { + if (this->timer_0BC == 0) { for (i = 0; i < 4; i++) { - - Boss_SpawnDebris(actor->fwork[2 + i], actor->fwork[6 + i], actor->fwork[10 + i], 0.0f, 0.0f, 0.0f, + Boss_SpawnDebris(this->fwork[2 + i], this->fwork[6 + i], this->fwork[10 + i], 0.0f, 0.0f, 0.0f, spB4[i] * (RAND_FLOAT(0.75f) + 0.5f), spA4[i] * (RAND_FLOAT(0.75f) + 0.5f), RAND_FLOAT_CENTERED(20.0f), 3.0f, i + 24, RAND_INT(30.0f) + 60.0f); } - if ((fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 500.0f) && - (fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 200.0f) && - (fabsf(actor->obj.pos.y - gPlayer[0].pos.y) < 200.0f)) { + if ((fabsf(this->obj.pos.z - gPlayer[0].trueZpos) < 500.0f) && + (fabsf(this->obj.pos.x - gPlayer[0].pos.x) < 200.0f) && + (fabsf(this->obj.pos.y - gPlayer[0].pos.y) < 200.0f)) { *gControllerRumbleTimers = 25; } - BonusText_Display(actor->obj.pos.x, actor->obj.pos.y + 250.0f, actor->obj.pos.z, 5); + + BonusText_Display(this->obj.pos.x, this->obj.pos.y + 250.0f, this->obj.pos.z, 5); gHitCount += 6; + D_ctx_80177850 = 15; - actor->state = 101; - actor->timer_0BE = 50; + this->state = 101; + this->timer_0BE = 50; } - if (actor->timer_0BC == 8) { - func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y + 200.0f, actor->obj.pos.z + 50.0f, 0.0f, 0.0f, + if (this->timer_0BC == 8) { + func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y + 200.0f, this->obj.pos.z + 50.0f, 0.0f, 0.0f, 0.0f, 5.0f, 30); - AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, this->sfxSource, 4); } break; case 101: - if ((actor->timer_0BE != 0) && ((gGameFrameCount % 2) == 0)) { - func_effect_8007797C(actor->obj.pos.x, actor->obj.pos.y + 150.0f, actor->obj.pos.z, 0.0f, 10.0f, 0.0f, + if ((this->timer_0BE != 0) && ((gGameFrameCount % 2) == 0)) { + func_effect_8007797C(this->obj.pos.x, this->obj.pos.y + 150.0f, this->obj.pos.z, 0.0f, 10.0f, 0.0f, 3.0f); } break; } } -void Corneria_8018BAAC(Actor* actor) { - Animation_DrawSkeleton(3, D_CO_6029A48, actor->vwork, Corneria_8018AB08, NULL, actor, gCalcMatrix); +void Corneria_CoGaruda1_Draw(CoGaruda1* this) { + Animation_DrawSkeleton(3, aCoGarudaSkel, this->vwork, Corneria_Garuda_OverrideLimbDraw, NULL, this, gCalcMatrix); } -void Corneria_8018BAFC(s32 limbIndex, Vec3f* rot, void* data) { +void Corneria_Garuda_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* data) { Actor* actor = (Actor*) data; - Vec3f sp28 = { 120.0f, 0.0f, 0.0f }; - Vec3f sp1C; + Vec3f src = { 120.0f, 0.0f, 0.0f }; + Vec3f dest; if (limbIndex == 1) { - Matrix_MultVec3f(gCalcMatrix, &sp28, &sp1C); - actor->fwork[2] = sp1C.x; - actor->fwork[6] = sp1C.y; - actor->fwork[10] = sp1C.z; + Matrix_MultVec3f(gCalcMatrix, &src, &dest); + actor->fwork[2] = dest.x; + actor->fwork[6] = dest.y; + actor->fwork[10] = dest.z; if (actor->iwork[1] == 0) { gScenery[actor->iwork[0]].obj.rot.x = -rot->y; } } } -void Corneria_8018BBA4(Actor* actor) { - Animation_DrawSkeleton(3, D_CO_6029A48, actor->vwork, NULL, Corneria_8018BAFC, actor, gCalcMatrix); +void Corneria_CoGaruda2_Draw(CoGaruda2* this) { + Animation_DrawSkeleton(3, aCoGarudaSkel, this->vwork, NULL, Corneria_Garuda_PostLimbDraw, this, gCalcMatrix); } -void Corneria_8018BBF8(Actor* actor) { - Animation_DrawSkeleton(3, D_CO_6029A48, actor->vwork, Corneria_8018AB08, Corneria_8018BAFC, actor, gCalcMatrix); +void Corneria_CoGaruda3_Draw(CoGaruda3* this) { + Animation_DrawSkeleton(3, aCoGarudaSkel, this->vwork, Corneria_Garuda_OverrideLimbDraw, + Corneria_Garuda_PostLimbDraw, this, gCalcMatrix); } -bool Corneria_8018BC50(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { +bool Corneria_CoGarudaDestroy_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { Actor* actor = (Actor*) data; if ((actor->state == 101) && (limbIndex != 8)) { @@ -1563,8 +1603,8 @@ bool Corneria_8018BC50(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return false; } -void Corneria_8018BC84(s32 limbIndex, Vec3f* rot, void* data) { - Actor* actor = (Actor*) data; +void Corneria_CoGarudaDestroy_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* data) { + CoGarudaDestroy* actor = (CoGarudaDestroy*) data; Vec3f src = { 0.0f, 0.0f, 0.0f }; Vec3f dest; @@ -1597,24 +1637,26 @@ void Corneria_8018BC84(s32 limbIndex, Vec3f* rot, void* data) { } } -void Corneria_8018BD7C(Actor* actor) { - Animation_DrawSkeleton(3, D_CO_6029A48, actor->vwork, Corneria_8018BC50, Corneria_8018BC84, actor, gCalcMatrix); +void Corneria_CoGarudaDestroy_Draw(CoGarudaDestroy* this) { + Animation_DrawSkeleton(3, aCoGarudaSkel, this->vwork, Corneria_CoGarudaDestroy_OverrideLimbDraw, + Corneria_CoGarudaDestroy_PostLimbDraw, this, gCalcMatrix); } -void Corneria_8018BDD4(Boss* boss, f32 xPos, f32 yPos, f32 zPos, f32 arg4, s32 arg5, s32 arg6) { - ObjectId objId = OBJ_ACTOR_191; +void Corneria_Carrier_ChooseMissileTarget(Carrier* this, f32 xPos, f32 yPos, f32 zPos, f32 arg4, s32 arg5, + s32 eventType) { + ObjectId objId = OBJ_MISSILE_SEEK_PLAYER; - if (func_hud_8008AC54(0) < 4) { - objId = OBJ_ACTOR_190; + if (Hud_MissileSeekModeCheck(0) < 4) { + objId = OBJ_MISSILE_SEEK_TEAM; } - Corneria_80187710(boss->obj.pos.x + xPos, boss->obj.pos.y + yPos, boss->obj.pos.z + zPos, arg4, boss->obj.rot.x, - boss->obj.rot.y, arg5, arg6, objId); + Corneria_Boss_SpawnMissile(this->obj.pos.x + xPos, this->obj.pos.y + yPos, this->obj.pos.z + zPos, arg4, + this->obj.rot.x, this->obj.rot.y, arg5, eventType, objId); } -void Corneria_Boss293_Init(Boss293* this) { +void Corneria_Carrier_Init(Carrier* this) { s32 i; - s16 temp_s1; + s16 timer; gBossActive = 1; gBossFrameCount = 0; @@ -1628,9 +1670,9 @@ void Corneria_Boss293_Init(Boss293* this) { this->timer_05A = 30000; this->obj.pos.z = (gPlayer[0].cam.eye.z - gPathProgress) - 2000.0f; AUDIO_PLAY_SFX(NA_SE_A_CARRIER_ENGINE, this->sfxSource, 4); - D_i1_8019B6D0 = 0; + D_i1_8019B6D0 = false; } else { - D_i1_8019B6D0 = 1; + D_i1_8019B6D0 = true; this->obj.rot.y = 180.0f; this->fwork[6] = 800.0f; this->obj.pos.z = gPlayer[0].trueZpos + 2000.0f; @@ -1641,29 +1683,29 @@ void Corneria_Boss293_Init(Boss293* this) { this->swork[8] = 3; } - temp_s1 = this->timer_05A; + timer = this->timer_05A; // Bosses OBJ_BOSS_294 to OBJ_BOSS_296 for (i = 1; i < ARRAY_COUNT(gBosses); i++) { Boss_Initialize(&gBosses[i]); gBosses[i].obj.status = OBJ_INIT; - gBosses[i].obj.id = i + 293; + gBosses[i].obj.id = (i - 1) + OBJ_BOSS_294; gBosses[i].obj.pos.x = this->obj.pos.x; gBosses[i].obj.pos.y = this->obj.pos.y; gBosses[i].obj.pos.z = this->obj.pos.z; gBosses[i].health = 200; gBosses[i].drawShadow = true; - gBosses[i].timer_05A = temp_s1; + gBosses[i].timer_05A = timer; Object_SetInfo(&gBosses[i].info, gBosses[i].obj.id); - gBosses[3].drawShadow = false; + gBosses[CARRIER_3].drawShadow = false; } } -void Corneria_8018C0B0(Boss* boss) { - func_effect_8007D9DC(boss->obj.pos.x, gGroundHeight + 2.0f, boss->obj.pos.z, 5.0f, 100.0f, 0); - func_effect_8007D9DC(boss->obj.pos.x, gGroundHeight + 2.0f, boss->obj.pos.z, 5.0f, 100.0f, 5); - func_effect_8007D9DC(boss->obj.pos.x, gGroundHeight + 2.0f, boss->obj.pos.z, 5.0f, 100.0f, 10); - func_effect_8007ADF4(boss->obj.pos.x, gGroundHeight, boss->obj.pos.z, 1.0f, 10.0f); +void Corneria_8018C0B0(Boss* this) { + func_effect_8007D9DC(this->obj.pos.x, gGroundHeight + 2.0f, this->obj.pos.z, 5.0f, 100.0f, 0); + func_effect_8007D9DC(this->obj.pos.x, gGroundHeight + 2.0f, this->obj.pos.z, 5.0f, 100.0f, 5); + func_effect_8007D9DC(this->obj.pos.x, gGroundHeight + 2.0f, this->obj.pos.z, 5.0f, 100.0f, 10); + func_effect_8007ADF4(this->obj.pos.x, gGroundHeight, this->obj.pos.z, 1.0f, 10.0f); } static Vec3f D_i1_801998CC = { 442.0f, 5.0f, 360.0f }; @@ -1689,63 +1731,59 @@ static Vec3f D_i1_8019995C[20] = { { -60.0f, -151.0f, 29.0f }, { -132.0f, 9.0f, 430.0f }, { 52.0f, 29.0f, 431.0f }, { -23.0f, 68.0f, 325.0f }, { 116.0f, 34.0f, 368.0f }, { -49.0f, -53.0f, 366.0f }, { 113.0f, -62.0f, 255.0f }, { -114.0f, -88.0f, 182.0f } }; - static s32 D_i1_80199A4C[4] = { 150, 200, 150, 200 }; - static f32 D_i1_80199A5C[4] = { -225.0f, 0.0f, 225.0f, 0.0f }; -void Corneria_8018C19C(Boss* boss) { - // todo: figure out vec3f stack - s32 pad[9]; - Vec3f sp84[30]; - Vec3f sp78; - Vec3f sp6C; - Effect* effect; +void Corneria_Carrier_Update(Carrier* this) { + Vec3f sp84[33]; + Vec3f src; + Vec3f dest; f32 temp_fv0_2; - s32 pad2; - s32 var_v1; - s32 var_v0; + s32 pad1; s32 i; - s32 pad3; + s32 k; + s32 j; + s32 pad2; f32* temp_a0; f32* temp_a1; + Effect398* effect398; gBossFrameCount++; - Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, boss->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); - if (D_i1_8019B6D0 == 0) { - if (boss->obj.pos.x > 6000.0f) { - Object_Kill(&boss->obj, boss->sfxSource); + if (!D_i1_8019B6D0) { + if (this->obj.pos.x > 6000.0f) { + Object_Kill(&this->obj, this->sfxSource); for (i = 1; i < ARRAY_COUNT(gBosses); i++) { Object_Kill(&gBosses[i].obj, gBosses[i].sfxSource); } return; } - sp78.x = 0.0f; - sp78.y = 0.0f; - sp78.z = 60.0f; + src.x = 0.0f; + src.y = 0.0f; + src.z = 60.0f; - Matrix_MultVec3f(gCalcMatrix, &sp78, &sp6C); + Matrix_MultVec3f(gCalcMatrix, &src, &dest); - boss->vel.x = sp6C.x; - boss->vel.y = sp6C.y; - boss->vel.z = sp6C.z - gPathVelZ; + this->vel.x = dest.x; + this->vel.y = dest.y; + this->vel.z = dest.z - gPathVelZ; - boss->fwork[16] = 4.0f; + this->fwork[16] = 4.0f; - if (((gGameFrameCount % 2) == 0)) { + if ((gGameFrameCount % 2) == 0) { Matrix_MultVec3f(gCalcMatrix, &D_i1_80199914[0], &sp84[6]); Matrix_MultVec3f(gCalcMatrix, &D_i1_80199914[1], &sp84[7]); Matrix_MultVec3f(gCalcMatrix, &D_i1_8019992C, &sp84[8]); - func_effect_8007BC7C(sp84[6].x + boss->obj.pos.x, sp84[6].y + boss->obj.pos.y, sp84[6].z + boss->obj.pos.z, + func_effect_8007BC7C(sp84[6].x + this->obj.pos.x, sp84[6].y + this->obj.pos.y, sp84[6].z + this->obj.pos.z, 20.0f); - func_effect_8007BC7C(sp84[7].x + boss->obj.pos.x, sp84[7].y + boss->obj.pos.y, sp84[7].z + boss->obj.pos.z, + func_effect_8007BC7C(sp84[7].x + this->obj.pos.x, sp84[7].y + this->obj.pos.y, sp84[7].z + this->obj.pos.z, 10.0f); - func_effect_8007BC7C(sp84[8].x + boss->obj.pos.x, sp84[8].y + boss->obj.pos.y, sp84[8].z + boss->obj.pos.z, + func_effect_8007BC7C(sp84[8].x + this->obj.pos.x, sp84[8].y + this->obj.pos.y, sp84[8].z + this->obj.pos.z, 10.0f); } } else { @@ -1760,462 +1798,463 @@ void Corneria_8018C19C(Boss* boss) { Matrix_MultVec3f(gCalcMatrix, &D_i1_801998D8, &sp84[1]); Matrix_MultVec3f(gCalcMatrix, &D_i1_801998E4, &sp84[2]); - if (boss->health != 601) { - var_v1 = boss->health - 601; + if (this->health != 601) { + k = this->health - 601; - if (var_v1 < 0) { - var_v1 *= -1; + if (k < 0) { + k *= -1; } - for (i = 0; var_v1 >= 60; i++, var_v1 -= 60) {} + for (i = 0; k >= 60; i++, k -= 60) {} - for (var_v0 = 0, var_v1 = 13; var_v0 < i; var_v0++, var_v1++) { - if ((gGameFrameCount % 16U) == (var_v0 % 16U)) { - Matrix_MultVec3f(gCalcMatrix, &D_i1_8019995C[var_v0], &sp84[var_v1]); - func_effect_8007D0E0(sp84[var_v1].x + boss->obj.pos.x, sp84[var_v1].y + boss->obj.pos.y, - sp84[var_v1].z + boss->obj.pos.z, boss->fwork[17]); - func_effect_8007C120(sp84[var_v1].x + boss->obj.pos.x, sp84[var_v1].y + boss->obj.pos.y, - sp84[var_v1].z + boss->obj.pos.z, boss->vel.x, boss->vel.y, boss->vel.z, 0.1f, - 7); + for (j = 0, k = 13; j < i; j++, k++) { + if ((gGameFrameCount % 16U) == (j % 16U)) { + Matrix_MultVec3f(gCalcMatrix, &D_i1_8019995C[j], &sp84[k]); + func_effect_8007D0E0(sp84[k].x + this->obj.pos.x, sp84[k].y + this->obj.pos.y, + sp84[k].z + this->obj.pos.z, this->fwork[17]); + func_effect_8007C120(sp84[k].x + this->obj.pos.x, sp84[k].y + this->obj.pos.y, + sp84[k].z + this->obj.pos.z, this->vel.x, this->vel.y, this->vel.z, 0.1f, 7); } } } - if (boss->dmgType != DMG_NONE) { - boss->dmgType = DMG_NONE; - if ((gBosses[1].state != 0) && (gBosses[2].state != 0) && (gBosses[3].state != 0)) { - if (boss->health >= 2) { - boss->timer_05C = 15; - boss->health -= boss->damage; - if (boss->health < 120) { - boss->fwork[17] = 2.8f; - AUDIO_PLAY_SFX(NA_SE_EN_KNOCK_DOWN, boss->sfxSource, 4); + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + if ((gBosses[CARRIER_1].state != 0) && (gBosses[CARRIER_2].state != 0) && (gBosses[CARRIER_3].state != 0)) { + if (this->health >= 2) { + this->timer_05C = 15; + this->health -= this->damage; + if (this->health < 120) { + this->fwork[17] = 2.8f; + AUDIO_PLAY_SFX(NA_SE_EN_KNOCK_DOWN, this->sfxSource, 4); } else { - AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, this->sfxSource, 4); } } } else { - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } } - boss->vel.z = boss->fwork[18]; + this->vel.z = this->fwork[18]; - if (boss->state > 0) { - boss->fwork[3] = (gPlayer[0].cam.eye.z - gPathProgress) - 2500.0f; + if (this->state > 0) { + this->fwork[3] = (gPlayer[0].cam.eye.z - gPathProgress) - 2500.0f; } - if (boss->state != 7) { - Math_SmoothStepToF(&boss->fwork[4], boss->fwork[5], 0.1f, 2.0f, 0.00001f); - Math_SmoothStepToF(&boss->obj.pos.z, boss->fwork[3], 0.1f, boss->fwork[4], 0.00001f); + if (this->state != 7) { + Math_SmoothStepToF(&this->fwork[4], this->fwork[5], 0.1f, 2.0f, 0.00001f); + Math_SmoothStepToF(&this->obj.pos.z, this->fwork[3], 0.1f, this->fwork[4], 0.00001f); } - Math_SmoothStepToF(&boss->obj.pos.y, boss->fwork[6], 0.02f, 2.0f, 0.00001f); - Math_SmoothStepToAngle(&boss->fwork[0], boss->fwork[9], 0.2f, 5.0f, 0.00001f); - Math_SmoothStepToAngle(&boss->fwork[1], boss->fwork[10], 0.2f, 5.0f, 0.00001f); - Math_SmoothStepToAngle(&boss->fwork[2], boss->fwork[11], 0.2f, 5.0f, 0.00001f); + Math_SmoothStepToF(&this->obj.pos.y, this->fwork[6], 0.02f, 2.0f, 0.00001f); + Math_SmoothStepToAngle(&this->fwork[0], this->fwork[9], 0.2f, 5.0f, 0.00001f); + Math_SmoothStepToAngle(&this->fwork[1], this->fwork[10], 0.2f, 5.0f, 0.00001f); + Math_SmoothStepToAngle(&this->fwork[2], this->fwork[11], 0.2f, 5.0f, 0.00001f); - if (boss->state < 6) { - Math_SmoothStepToAngle(&boss->obj.rot.y, boss->fwork[13], 0.03f, boss->fwork[8], 0.00001f); - Math_SmoothStepToF(&boss->fwork[8], boss->fwork[12], 0.1f, 0.02f, 0.001f); - Math_SmoothStepToAngle(&boss->obj.rot.z, boss->fwork[14], 0.03f, boss->fwork[15], 0.00001f); + if (this->state < 6) { + Math_SmoothStepToAngle(&this->obj.rot.y, this->fwork[13], 0.03f, this->fwork[8], 0.00001f); + Math_SmoothStepToF(&this->fwork[8], this->fwork[12], 0.1f, 0.02f, 0.001f); + Math_SmoothStepToAngle(&this->obj.rot.z, this->fwork[14], 0.03f, this->fwork[15], 0.00001f); - if (boss->timer_056 == 1) { - boss->fwork[14] = 0.0f; - boss->fwork[15] = 0.5f; + if (this->timer_056 == 1) { + this->fwork[14] = 0.0f; + this->fwork[15] = 0.5f; } } - if ((gBosses[1].state != 0) && ((gGameFrameCount % 16) == 0)) { + if ((gBosses[CARRIER_1].state != 0) && ((gGameFrameCount % 16) == 0)) { Matrix_MultVec3f(gCalcMatrix, &D_i1_80199908, &sp84[5]); - func_effect_8007D0E0(gBosses[0].obj.pos.x + sp84[5].x, gBosses[0].obj.pos.y + sp84[5].y, - gBosses[0].obj.pos.z + sp84[5].z, 5.0f); + func_effect_8007D0E0(gBosses[CARRIER_0].obj.pos.x + sp84[5].x, gBosses[CARRIER_0].obj.pos.y + sp84[5].y, + gBosses[CARRIER_0].obj.pos.z + sp84[5].z, 5.0f); } - if (gBosses[2].state != 0) { - gBosses[3].drawShadow = true; - if (gBosses[3].state != 0) { - if (((gGameFrameCount % 8) == 0)) { + if (gBosses[CARRIER_2].state != 0) { + gBosses[CARRIER_3].drawShadow = true; + if (gBosses[CARRIER_3].state != 0) { + if ((gGameFrameCount % 8) == 0) { Matrix_MultVec3f(gCalcMatrix, &D_i1_80199950, &sp84[11]); - func_effect_8007D0E0(gBosses[0].obj.pos.x + sp84[11].x, gBosses[0].obj.pos.y + sp84[11].y, - gBosses[0].obj.pos.z + sp84[11].z, 7.0f); + func_effect_8007D0E0(gBosses[CARRIER_0].obj.pos.x + sp84[11].x, + gBosses[CARRIER_0].obj.pos.y + sp84[11].y, + gBosses[CARRIER_0].obj.pos.z + sp84[11].z, 7.0f); } - } else if (((gGameFrameCount % 16) == 0)) { + } else if ((gGameFrameCount % 16) == 0) { Matrix_MultVec3f(gCalcMatrix, &D_i1_80199938, &sp84[9]); - func_effect_8007D0E0(gBosses[0].obj.pos.x + sp84[9].x, gBosses[0].obj.pos.y + sp84[9].y, - gBosses[0].obj.pos.z + sp84[9].z, 5.0f); + func_effect_8007D0E0(gBosses[CARRIER_0].obj.pos.x + sp84[9].x, gBosses[CARRIER_0].obj.pos.y + sp84[9].y, + gBosses[CARRIER_0].obj.pos.z + sp84[9].z, 5.0f); } } - if ((gBosses[3].state != 0) && (gBosses[2].state == 0) && ((gGameFrameCount % 16) == 0)) { + if ((gBosses[CARRIER_3].state != 0) && (gBosses[CARRIER_2].state == 0) && ((gGameFrameCount % 16) == 0)) { Matrix_MultVec3f(gCalcMatrix, &D_i1_80199944, &sp84[10]); - func_effect_8007D0E0(gBosses[0].obj.pos.x + sp84[10].x, gBosses[0].obj.pos.y + sp84[10].y, - gBosses[0].obj.pos.z + sp84[10].z, 5.0f); + func_effect_8007D0E0(gBosses[CARRIER_0].obj.pos.x + sp84[10].x, gBosses[CARRIER_0].obj.pos.y + sp84[10].y, + gBosses[CARRIER_0].obj.pos.z + sp84[10].z, 5.0f); } - if (((boss->state == 1) || (boss->state == 2)) && ((gGameFrameCount % 8) == 0)) { + if (((this->state == 1) || (this->state == 2)) && ((gGameFrameCount % 8) == 0)) { Matrix_MultVec3f(gCalcMatrix, &D_i1_80199914[0], &sp84[6]); Matrix_MultVec3f(gCalcMatrix, &D_i1_80199914[1], &sp84[7]); Matrix_MultVec3f(gCalcMatrix, &D_i1_8019992C, &sp84[8]); - func_effect_8007BC7C(sp84[6].x + boss->obj.pos.x, sp84[6].y + boss->obj.pos.y, sp84[6].z + boss->obj.pos.z, + func_effect_8007BC7C(sp84[6].x + this->obj.pos.x, sp84[6].y + this->obj.pos.y, sp84[6].z + this->obj.pos.z, 20.0f); - func_effect_8007BC7C(sp84[7].x + boss->obj.pos.x, sp84[7].y + boss->obj.pos.y, sp84[7].z + boss->obj.pos.z, + func_effect_8007BC7C(sp84[7].x + this->obj.pos.x, sp84[7].y + this->obj.pos.y, sp84[7].z + this->obj.pos.z, 10.0f); - func_effect_8007BC7C(sp84[8].x + boss->obj.pos.x, sp84[8].y + boss->obj.pos.y, sp84[8].z + boss->obj.pos.z, + func_effect_8007BC7C(sp84[8].x + this->obj.pos.x, sp84[8].y + this->obj.pos.y, sp84[8].z + this->obj.pos.z, 10.0f); } - if (boss->timer_052 != 0) { + if (this->timer_052 != 0) { Math_SmoothStepToF(&D_ctx_801779A8[0], 50.0f, 1.0f, 1.6f, 0.0001f); } - switch (boss->state) { + switch (this->state) { case 0: - boss->fwork[3] = gPlayer[0].trueZpos + 1500.0f; + this->fwork[3] = gPlayer[0].trueZpos + 1500.0f; - if (boss->timer_050 == 350) { + if (this->timer_050 == 350) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 40); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 40); Radio_PlayMessage(gMsg_ID_2290, RCID_BOSS_CORNERIA2); } - if (boss->timer_050 == 180) { + if (this->timer_050 == 180) { Radio_PlayMessage(gMsg_ID_2298, RCID_PEPPY); - boss->timer_052 = 350; + this->timer_052 = 350; } - if (boss->timer_050 == 0) { - boss->obj.pos.y = 900.0f; - boss->state = 1; - boss->fwork[13] = 180.0f; - boss->fwork[12] = 1.5f; - boss->fwork[6] = 800.0f; - boss->fwork[3] = gPlayer[0].cam.eye.z - gPathProgress - 2500.0f; - boss->fwork[18] = -gArwingSpeed; + if (this->timer_050 == 0) { + this->obj.pos.y = 900.0f; + this->state = 1; + this->fwork[13] = 180.0f; + this->fwork[12] = 1.5f; + this->fwork[6] = 800.0f; + this->fwork[3] = gPlayer[0].cam.eye.z - gPathProgress - 2500.0f; + this->fwork[18] = -gArwingSpeed; AUDIO_PLAY_BGM(NA_BGM_BOSS_A_CARRIER); - boss->timer_050 = 40; + this->timer_050 = 40; } break; case 1: - if (boss->timer_050 == 0) { - boss->state = 2; - boss->fwork[8] = 0.0f; - boss->fwork[13] = 359.9f; - boss->timer_050 = 250; + if (this->timer_050 == 0) { + this->state = 2; + this->fwork[8] = 0.0f; + this->fwork[13] = 359.9f; + this->timer_050 = 250; } break; case 2: - if (boss->timer_050 == 0) { - boss->state = 3; - boss->swork[0] = 4; - boss->timer_050 = 75; - boss->timer_054 = 0; - boss->fwork[8] = 0.0f; + if (this->timer_050 == 0) { + this->state = 3; + this->swork[0] = 4; + this->timer_050 = 75; + this->timer_054 = 0; + this->fwork[8] = 0.0f; Radio_PlayMessage(gMsg_ID_2291, RCID_BOSS_CORNERIA2); - boss->swork[4]++; + this->swork[4]++; } break; case 3: - boss->fwork[12] = 1.5f; - boss->fwork[11] = 0.0f; - boss->fwork[9] = 0.0f; - boss->fwork[10] = 0.0f; - boss->fwork[13] = 0.0f; + this->fwork[12] = 1.5f; + this->fwork[11] = 0.0f; + this->fwork[9] = 0.0f; + this->fwork[10] = 0.0f; + this->fwork[13] = 0.0f; - if (boss->timer_050 == 0) { - boss->state = boss->swork[0]; - boss->timer_050 = 60; - boss->fwork[8] = 0.0f; - AUDIO_PLAY_SFX(NA_SE_EN_HATCH, boss->sfxSource, 4); + if (this->timer_050 == 0) { + this->state = this->swork[0]; + this->timer_050 = 60; + this->fwork[8] = 0.0f; + AUDIO_PLAY_SFX(NA_SE_EN_HATCH, this->sfxSource, 4); } break; case 4: - boss->fwork[11] = 120.0f; - boss->fwork[13] = 340.0f; + this->fwork[11] = 120.0f; + this->fwork[13] = 340.0f; - if ((boss->timer_050 == 0) || (gBosses[1].state != 0)) { - boss->state = 3; - boss->swork[0] = 5; - boss->timer_050 = 20; - boss->fwork[8] = 0.0f; + if ((this->timer_050 == 0) || (gBosses[CARRIER_1].state != 0)) { + this->state = 3; + this->swork[0] = 5; + this->timer_050 = 20; + this->fwork[8] = 0.0f; - if (gBosses[1].state == 0) { - AUDIO_PLAY_SFX(NA_SE_EN_HATCH, boss->sfxSource, 4); + if (gBosses[CARRIER_1].state == 0) { + AUDIO_PLAY_SFX(NA_SE_EN_HATCH, this->sfxSource, 4); } - if ((boss->swork[5] == 0) && ((gBosses[2].state == 0) || (gBosses[3].state == 0))) { + if ((this->swork[5] == 0) && ((gBosses[CARRIER_2].state == 0) || (gBosses[CARRIER_3].state == 0))) { Radio_PlayMessage(gMsg_ID_2292, RCID_BOSS_CORNERIA2); } - boss->swork[5]++; - boss->swork[5] &= 3; + this->swork[5]++; + this->swork[5] &= 3; - } else if ((boss->fwork[2] > 60.0f) && (boss->timer_054 == 0)) { - boss->timer_054 = 20; - Corneria_8018BDD4(boss, sp84[0].x, sp84[0].y, sp84[0].z, 30.0f, 0, 1); + } else if ((this->fwork[2] > 60.0f) && (this->timer_054 == 0)) { + this->timer_054 = 20; + Corneria_Carrier_ChooseMissileTarget(this, sp84[0].x, sp84[0].y, sp84[0].z, 30.0f, 0, 1); } break; case 5: - boss->fwork[9] = 120.0f; - boss->fwork[10] = 120.0f; - boss->fwork[13] = 20.0f; + this->fwork[9] = 120.0f; + this->fwork[10] = 120.0f; + this->fwork[13] = 20.0f; - if ((boss->fwork[0] > 60.0f) && (gBosses[2].state == 0) && (boss->swork[1] == 0)) { - Corneria_8018BDD4(boss, sp84[1].x, sp84[1].y + 50.0f, sp84[1].z, 45.0f, 0, 0); - AUDIO_PLAY_SFX(NA_SE_EN_BARREL_SHOT, boss->sfxSource, 4); - Corneria_8018BDD4(boss, sp84[1].x, sp84[1].y - 50.0f, sp84[1].z, 40.0f, 0, 0); - boss->swork[1] = 1; + if ((this->fwork[0] > 60.0f) && (gBosses[CARRIER_2].state == 0) && (this->swork[1] == 0)) { + Corneria_Carrier_ChooseMissileTarget(this, sp84[1].x, sp84[1].y + 50.0f, sp84[1].z, 45.0f, 0, 0); + AUDIO_PLAY_SFX(NA_SE_EN_BARREL_SHOT, this->sfxSource, 4); + Corneria_Carrier_ChooseMissileTarget(this, sp84[1].x, sp84[1].y - 50.0f, sp84[1].z, 40.0f, 0, 0); + this->swork[1] = 1; } - if ((boss->fwork[1] > 60.0f) && (gBosses[3].state == 0) && (boss->swork[2] == 0)) { - Corneria_8018BDD4(boss, sp84[2].x, sp84[2].y + 50.0f, sp84[2].z, 35.0f, 0, 0); - AUDIO_PLAY_SFX(NA_SE_EN_BARREL_SHOT, boss->sfxSource, 4); - Corneria_8018BDD4(boss, sp84[2].x, sp84[2].y - 50.0f, sp84[2].z, 30.0f, 0, 0); - boss->swork[2] = 1; + if ((this->fwork[1] > 60.0f) && (gBosses[CARRIER_3].state == 0) && (this->swork[2] == 0)) { + Corneria_Carrier_ChooseMissileTarget(this, sp84[2].x, sp84[2].y + 50.0f, sp84[2].z, 35.0f, 0, 0); + AUDIO_PLAY_SFX(NA_SE_EN_BARREL_SHOT, this->sfxSource, 4); + Corneria_Carrier_ChooseMissileTarget(this, sp84[2].x, sp84[2].y - 50.0f, sp84[2].z, 30.0f, 0, 0); + this->swork[2] = 1; } - if ((boss->timer_050 == 0) || ((gBosses[3].state != 0) && (gBosses[2].state != 0))) { - boss->state = 3; - boss->swork[0] = 4; - boss->timer_050 = 70; - boss->swork[1] = 0; - boss->swork[2] = 0; - boss->fwork[8] = 0.0f; + if ((this->timer_050 == 0) || ((gBosses[CARRIER_3].state != 0) && (gBosses[CARRIER_2].state != 0))) { + this->state = 3; + this->swork[0] = 4; + this->timer_050 = 70; + this->swork[1] = 0; + this->swork[2] = 0; + this->fwork[8] = 0.0f; - if ((boss->swork[4] == 0) && (gBosses[1].state == 0)) { + if ((this->swork[4] == 0) && (gBosses[CARRIER_1].state == 0)) { Radio_PlayMessage(gMsg_ID_2291, RCID_BOSS_CORNERIA2); } - if ((boss->swork[4] == 2) && (boss->swork[7] == 0) && - ((gBosses[3].state == 0) || (gBosses[2].state == 0) || (gBosses[1].state == 0))) { + if ((this->swork[4] == 2) && (this->swork[7] == 0) && + ((gBosses[CARRIER_3].state == 0) || (gBosses[CARRIER_2].state == 0) || + (gBosses[CARRIER_1].state == 0))) { Radio_PlayMessage(gMsg_ID_2299, RCID_PEPPY); - boss->swork[7]++; + this->swork[7]++; } - boss->swork[4]++; - boss->swork[4] &= 3; + this->swork[4]++; + this->swork[4] &= 3; - if ((gBosses[3].state == 0) && (gBosses[2].state == 0)) { - AUDIO_PLAY_SFX(NA_SE_EN_HATCH, boss->sfxSource, 4); + if ((gBosses[CARRIER_3].state == 0) && (gBosses[CARRIER_2].state == 0)) { + AUDIO_PLAY_SFX(NA_SE_EN_HATCH, this->sfxSource, 4); } } break; case 6: - Math_SmoothStepToAngle(&boss->obj.rot.y, boss->fwork[13], 0.1f, 5.0f, 0.01f); - Math_SmoothStepToAngle(&boss->obj.rot.z, boss->fwork[14], 0.1f, 5.0f, 0.01f); + Math_SmoothStepToAngle(&this->obj.rot.y, this->fwork[13], 0.1f, 5.0f, 0.01f); + Math_SmoothStepToAngle(&this->obj.rot.z, this->fwork[14], 0.1f, 5.0f, 0.01f); - if ((boss->obj.rot.y == 0.0f) || (boss->timer_058 == 0)) { - boss->timer_058 = 0; - boss->state = 7; - boss->obj.rot.z = 0.0f; - boss->obj.rot.y = 0.0f; + if ((this->obj.rot.y == 0.0f) || (this->timer_058 == 0)) { + this->timer_058 = 0; + this->state = 7; + this->obj.rot.z = 0.0f; + this->obj.rot.y = 0.0f; } break; case 7: - boss->fwork[3] = (gPlayer[0].cam.eye.z - gPathProgress) - 4000.0f; - Math_SmoothStepToF(&boss->obj.pos.z, boss->fwork[3], 0.1f, 15.0f, 0.00001f); + this->fwork[3] = (gPlayer[0].cam.eye.z - gPathProgress) - 4000.0f; + Math_SmoothStepToF(&this->obj.pos.z, this->fwork[3], 0.1f, 15.0f, 0.00001f); - if (boss->timer_058 == 0) { - boss->timer_058 = D_i1_80199A4C[boss->swork[3]]; - boss->fwork[20] = D_i1_80199A5C[boss->swork[3]]; - boss->swork[3]++; - boss->swork[3] &= 3; - boss->fwork[8] = 0.0f; + if (this->timer_058 == 0) { + this->timer_058 = D_i1_80199A4C[this->swork[3]]; + this->fwork[20] = D_i1_80199A5C[this->swork[3]]; + this->swork[3]++; + this->swork[3] &= 3; + this->fwork[8] = 0.0f; - if ((boss->swork[3] != 1) || (boss->swork[3] != 3)) { - Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_ZOBOSS_BEAM); - boss->swork[9] = 0; + if ((this->swork[3] != 1) || (this->swork[3] != 3)) { + Audio_KillSfxBySourceAndId(this->sfxSource, NA_SE_EN_ZOBOSS_BEAM); + this->swork[9] = 0; } } - if ((boss->swork[3] == 0) || (boss->swork[3] == 2)) { - if ((boss->obj.rot.y < 20.0f) && (boss->obj.rot.y > -20.0f)) { - if (boss->swork[9] == 0) { - boss->swork[9]++; - AUDIO_PLAY_SFX(NA_SE_EN_ZOBOSS_BEAM, boss->sfxSource, 4); - if (boss->swork[6] == 0) { + if ((this->swork[3] == 0) || (this->swork[3] == 2)) { + if ((this->obj.rot.y < 20.0f) && (this->obj.rot.y > -20.0f)) { + if (this->swork[9] == 0) { + this->swork[9]++; + AUDIO_PLAY_SFX(NA_SE_EN_ZOBOSS_BEAM, this->sfxSource, 4); + if (this->swork[6] == 0) { Radio_PlayMessage(gMsg_ID_2293, RCID_BOSS_CORNERIA2); } - boss->swork[6]++; - boss->swork[6] &= 1; + this->swork[6]++; + this->swork[6] &= 1; } - if (((gGameFrameCount % 8) == 0)) { - if (fabsf(boss->obj.pos.z - gPlayer[0].trueZpos) > 700.0f) { + if ((gGameFrameCount % 8) == 0) { + if (fabsf(this->obj.pos.z - gPlayer[0].trueZpos) > 700.0f) { Matrix_MultVec3f(gCalcMatrix, &D_i1_801998F0[0], &sp84[3]); - for (effect = gEffects, i = 0; i < ARRAY_COUNT(gEffects); i++, effect++) { - if (effect->obj.status == OBJ_FREE) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_398; - effect->timer_50 = 100; - effect->unk_44 = 1; - effect->scale2 = 1.0f; - effect->obj.rot.z = 30.0f; - effect->obj.pos.x = sp84[3].x + boss->obj.pos.x; - effect->obj.pos.y = sp84[3].y + boss->obj.pos.y; - effect->obj.pos.z = sp84[3].z + boss->obj.pos.z; - Object_SetInfo(&effect->info, effect->obj.id); + for (effect398 = &gEffects[0], i = 0; i < ARRAY_COUNT(gEffects); i++, effect398++) { + if (effect398->obj.status == OBJ_FREE) { + Effect_Initialize(effect398); + effect398->obj.status = OBJ_INIT; + effect398->obj.id = OBJ_EFFECT_398; + effect398->timer_50 = 100; + effect398->unk_44 = 1; + effect398->scale2 = 1.0f; + effect398->obj.rot.z = 30.0f; + effect398->obj.pos.x = sp84[3].x + this->obj.pos.x; + effect398->obj.pos.y = sp84[3].y + this->obj.pos.y; + effect398->obj.pos.z = sp84[3].z + this->obj.pos.z; + Object_SetInfo(&effect398->info, effect398->obj.id); break; } } if (i >= 60) { - effect->obj.status = OBJ_FREE; + effect398->obj.status = OBJ_FREE; } } } } } - if (boss->health < 2) { + if (this->health < 2) { gTeamLowHealthMsgTimer = -1; - Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_ZOBOSS_BEAM); + Audio_KillSfxBySourceAndId(this->sfxSource, NA_SE_EN_ZOBOSS_BEAM); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 40); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 40); - AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, this->sfxSource, 4); gScreenFlashTimer = 8; gShowBossHealth = false; Radio_PlayMessage(gMsg_ID_2294, RCID_BOSS_CORNERIA2); - boss->health = 1; - boss->timer_056 = 150; - boss->state = 8; - boss->fwork[19] = 15.0f; + this->health = 1; + this->timer_056 = 150; + this->state = 8; + this->fwork[19] = 15.0f; } else { - Math_SmoothStepToF(&boss->fwork[8], 3.0f, 0.1f, 0.5f, 0.001f); - Math_SmoothStepToAngle(&boss->obj.rot.z, boss->fwork[14], 0.1f, 3.0f, 0.00001f); + Math_SmoothStepToF(&this->fwork[8], 3.0f, 0.1f, 0.5f, 0.001f); + Math_SmoothStepToAngle(&this->obj.rot.z, this->fwork[14], 0.1f, 3.0f, 0.00001f); - temp_fv0_2 = Math_SmoothStepToF(&boss->obj.rot.y, boss->fwork[20], 0.1f, boss->fwork[8], 0.00001f); - boss->fwork[14] = 0.0f; + temp_fv0_2 = Math_SmoothStepToF(&this->obj.rot.y, this->fwork[20], 0.1f, this->fwork[8], 0.00001f); + this->fwork[14] = 0.0f; if (temp_fv0_2 < -1.0f) { - boss->fwork[14] = 25.0f; + this->fwork[14] = 25.0f; } if (temp_fv0_2 > 1.0f) { - boss->fwork[14] = 335.0f; + this->fwork[14] = 335.0f; } - sp78.x = 0.0f; - sp78.y = 0.0f; - sp78.z = 40.0f; + src.x = 0.0f; + src.y = 0.0f; + src.z = 40.0f; - Matrix_MultVec3f(gCalcMatrix, &sp78, &sp6C); + Matrix_MultVec3f(gCalcMatrix, &src, &dest); - boss->vel.x = sp6C.x; - boss->vel.y = sp6C.y; - boss->vel.z = sp6C.z - gPathVelZ; + this->vel.x = dest.x; + this->vel.y = dest.y; + this->vel.z = dest.z - gPathVelZ; } break; case 8: D_ctx_801779A8[0] = 20.0f; - if (((gGameFrameCount % 32) == 0)) { + if ((gGameFrameCount % 32) == 0) { for (i = 0; i < 10; i++) { - func_effect_80079618(RAND_FLOAT_CENTERED(300.0f) + boss->obj.pos.x, boss->obj.pos.y, - boss->obj.pos.z, 1.0f); + func_effect_80079618(RAND_FLOAT_CENTERED(300.0f) + this->obj.pos.x, this->obj.pos.y, + this->obj.pos.z, 1.0f); } } - Math_SmoothStepToF(&boss->obj.pos.x, boss->fwork[7], 1.0f, 10.0f, 0.00001f); - Math_SmoothStepToF(&boss->vel.x, 0.0f, 0.1f, 2.0f, 0.00001f); - Math_SmoothStepToF(&boss->vel.y, 0.0f, 0.1f, 2.0f, 0.00001f); - Math_SmoothStepToF(&boss->vel.z, 0.0f, 0.1f, 2.0f, 0.00001f); + Math_SmoothStepToF(&this->obj.pos.x, this->fwork[7], 1.0f, 10.0f, 0.00001f); + Math_SmoothStepToF(&this->vel.x, 0.0f, 0.1f, 2.0f, 0.00001f); + Math_SmoothStepToF(&this->vel.y, 0.0f, 0.1f, 2.0f, 0.00001f); + Math_SmoothStepToF(&this->vel.z, 0.0f, 0.1f, 2.0f, 0.00001f); - if (boss->obj.rot.z == boss->fwork[14]) { - if (boss->fwork[14] == boss->fwork[19]) { - boss->fwork[14] = 360.0f - boss->fwork[19]; + if (this->obj.rot.z == this->fwork[14]) { + if (this->fwork[14] == this->fwork[19]) { + this->fwork[14] = 360.0f - this->fwork[19]; } else { - boss->fwork[14] = boss->fwork[19]; + this->fwork[14] = this->fwork[19]; } } - Math_SmoothStepToAngle(&boss->obj.rot.z, boss->fwork[14], 1.0f, 1.0f, 0.001f); + Math_SmoothStepToAngle(&this->obj.rot.z, this->fwork[14], 1.0f, 1.0f, 0.001f); - if (boss->health != 0) { - if (boss->timer_056 == 0) { - Boss_AwardBonus(boss); - boss->fwork[17] = 10.0f; - boss->vel.y *= 1.5f; + if (this->health != 0) { + if (this->timer_056 == 0) { + Boss_AwardBonus(this); + this->fwork[17] = 10.0f; + this->vel.y *= 1.5f; gMissionStatus = MISSION_ACCOMPLISHED; if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { - Boss_CompleteLevel(gPlayer, boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z); + Boss_CompleteLevel(gPlayer, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z); } - boss->health--; - boss->fwork[8] = 0.0f; + this->health--; + this->fwork[8] = 0.0f; Radio_PlayMessage(gMsg_ID_2296, RCID_BOSS_CORNERIA2); } else { - Math_SmoothStepToF(&boss->obj.rot.y, 0.0f, 0.1f, boss->fwork[8], 0.00001f); - sp78.x = 0.0f; - sp78.y = 0.0f; - sp78.z = 20.0f; - Matrix_MultVec3f(gCalcMatrix, &sp78, &sp6C); - boss->vel.x = sp6C.x; - boss->vel.y = sp6C.y; - boss->vel.z = sp6C.z - gPathVelZ; - if (boss->timer_056 == 60) { + Math_SmoothStepToF(&this->obj.rot.y, 0.0f, 0.1f, this->fwork[8], 0.00001f); + src.x = 0.0f; + src.y = 0.0f; + src.z = 20.0f; + Matrix_MultVec3f(gCalcMatrix, &src, &dest); + this->vel.x = dest.x; + this->vel.y = dest.y; + this->vel.z = dest.z - gPathVelZ; + if (this->timer_056 == 60) { Radio_PlayMessage(gMsg_ID_2295, RCID_FOX); } } } else { - boss->state = 9; + this->state = 9; } break; case 9: - if (((gGameFrameCount % 16) == 0)) { + if ((gGameFrameCount % 16) == 0) { for (i = 0; i < 10; i++) { - func_effect_80079618(RAND_FLOAT_CENTERED(300.0f) + boss->obj.pos.x, boss->obj.pos.y, - boss->obj.pos.z, 1.0f); + func_effect_80079618(RAND_FLOAT_CENTERED(300.0f) + this->obj.pos.x, this->obj.pos.y, + this->obj.pos.z, 1.0f); } } - Math_SmoothStepToF(&boss->vel.x, 0.0f, 0.1f, 2.0f, 0.00001f); - Math_SmoothStepToF(&boss->vel.y, 0.0f, 0.1f, 2.0f, 0.00001f); - Math_SmoothStepToF(&boss->vel.z, 0.0f, 0.1f, 2.0f, 0.00001f); + Math_SmoothStepToF(&this->vel.x, 0.0f, 0.1f, 2.0f, 0.00001f); + Math_SmoothStepToF(&this->vel.y, 0.0f, 0.1f, 2.0f, 0.00001f); + Math_SmoothStepToF(&this->vel.z, 0.0f, 0.1f, 2.0f, 0.00001f); - boss->obj.rot.z -= 2.0f; - boss->gravity = 1.0f; + this->obj.rot.z -= 2.0f; + this->gravity = 1.0f; - if (boss->obj.pos.y < (gGroundHeight + 150.0f)) { + if (this->obj.pos.y < (gGroundHeight + 150.0f)) { gCameraShake = 100; - func_effect_80081A8C(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 40.0f, 12); - boss->timer_050 = 20; - boss->vel.y = -10.0f; - boss->gravity = 0.0f; - boss->fwork[17] = 20.0f; - Corneria_8018C0B0(boss); - boss->state = 10; + func_effect_80081A8C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 40.0f, 12); + this->timer_050 = 20; + this->vel.y = -10.0f; + this->gravity = 0.0f; + this->fwork[17] = 20.0f; + Corneria_8018C0B0(this); + this->state = 10; } break; case 10: - if (((gGameFrameCount % 8) == 0)) { + if ((gGameFrameCount % 8) == 0) { for (i = 0; i < 10; i++) { - func_effect_80079618(RAND_FLOAT_CENTERED(300.0f) + boss->obj.pos.x, boss->obj.pos.y, - boss->obj.pos.z, 1.0f); + func_effect_80079618(RAND_FLOAT_CENTERED(300.0f) + this->obj.pos.x, this->obj.pos.y, + this->obj.pos.z, 1.0f); } } - if (boss->timer_050 == 0) { - func_effect_8007A568(boss->obj.pos.x, boss->obj.pos.y + 500.0f, boss->obj.pos.z, 120.0f); - Object_Kill(&boss->obj, boss->sfxSource); + if (this->timer_050 == 0) { + func_effect_8007A568(this->obj.pos.x, this->obj.pos.y + 500.0f, this->obj.pos.z, 120.0f); + Object_Kill(&this->obj, this->sfxSource); } break; } @@ -2227,27 +2266,27 @@ void Corneria_8018C19C(Boss* boss) { temp_a1[9] = -100000.0f; temp_a1[3] = -150.0f; - if (boss->fwork[0] > 60.0f) { + if (this->fwork[0] > 60.0f) { temp_a0[3] = -100000.0f; temp_a0[9] = 543.0f; } - if (boss->fwork[1] > 60.0f) { + if (this->fwork[1] > 60.0f) { temp_a1[3] = -100000.0f; temp_a1[9] = -557.0f; } - boss->fwork[16] = 4.0f; + this->fwork[16] = 4.0f; - if ((boss->swork[10] == 0) && (boss->state < 6)) { - boss->fwork[17] = 1.8f; - AUDIO_PLAY_SFX(NA_SE_EXPLOSION_DEMO6, boss->sfxSource, 4); - boss->timer_058 = 71; - boss->state = 6; - boss->fwork[12] = 0.0f; - boss->fwork[8] = 0.0f; - boss->fwork[14] = 0.0f; - boss->fwork[13] = 0.0f; + if ((this->swork[10] == 0) && (this->state < 6)) { + this->fwork[17] = 1.8f; + AUDIO_PLAY_SFX(NA_SE_EXPLOSION_DEMO6, this->sfxSource, 4); + this->timer_058 = 71; + this->state = 6; + this->fwork[12] = 0.0f; + this->fwork[8] = 0.0f; + this->fwork[14] = 0.0f; + this->fwork[13] = 0.0f; } if (gBossFrameCount == 430) { @@ -2257,7 +2296,7 @@ void Corneria_8018C19C(Boss* boss) { gShowBossHealth = true; } if (gBossFrameCount >= 587) { - gBossHealthBar = (boss->health / 601.0f) * 255.0f; + gBossHealthBar = (this->health / 601.0f) * 255.0f; } } } @@ -2265,100 +2304,100 @@ void Corneria_8018C19C(Boss* boss) { static Vec3f D_i1_80199A6C = { -270.0f, 0.0f, 200.0f }; static Vec3f D_i1_80199A78 = { 440.0f, 0.0f, 0.0f }; -void Corneria_8018DDAC(Boss* boss) { +void Corneria_Boss294_Update(Boss294* this) { Vec3f sp4C; Vec3f sp40; s32 i; - switch (boss->state) { + switch (this->state) { case 0: - if (boss->dmgType != DMG_NONE) { - boss->dmgType = DMG_NONE; - if (boss->dmgPart == 0) { - if (boss->fwork[2] > 60.0f) { - if (boss->health != 0) { - boss->timer_05C = 15; - boss->health -= boss->damage; - AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, boss->sfxSource, 4); - if (boss->health <= 0) { - gBosses[0].swork[8]--; - if (gBosses[0].swork[8] != 0) { + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + if (this->dmgPart == 0) { + if (this->fwork[2] > 60.0f) { + if (this->health != 0) { + this->timer_05C = 15; + this->health -= this->damage; + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, this->sfxSource, 4); + if (this->health <= 0) { + gBosses[CARRIER_0].swork[8]--; + if (gBosses[CARRIER_0].swork[8] != 0) { Radio_PlayMessage(gMsg_ID_15130, RCID_FALCO); } else { Radio_PlayMessage(gMsg_ID_7085, RCID_FALCO); } - boss->info.cullDistance = 300.0f; + this->info.cullDistance = 300.0f; - gBosses[0].fwork[14] = 25.0f; - gBosses[0].fwork[15] = 0.0f; + gBosses[CARRIER_0].fwork[14] = 25.0f; + gBosses[CARRIER_0].fwork[15] = 0.0f; - AUDIO_PLAY_SFX(NA_SE_EN_PARTS_BROKEN, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_PARTS_BROKEN, this->sfxSource, 4); - if (gBosses[0].swork[10] != 0) { - gBosses[0].swork[10]--; + if (gBosses[CARRIER_0].swork[10] != 0) { + gBosses[CARRIER_0].swork[10]--; } - gBosses[0].timer_056 = 30; - boss->state = 1; + gBosses[CARRIER_0].timer_056 = 30; + this->state = 1; Matrix_MultVec3f(gCalcMatrix, &D_i1_80199A6C, &sp4C); for (i = 0; i < 10; i++) { - func_effect_80079618(boss->obj.pos.x + sp4C.x, boss->obj.pos.y + sp4C.y, - boss->obj.pos.z + sp4C.z, 1.0f); + func_effect_80079618(this->obj.pos.x + sp4C.x, this->obj.pos.y + sp4C.y, + this->obj.pos.z + sp4C.z, 1.0f); } - if ((gBosses[2].state == 1) && (gBosses[3].state == 1)) { - gBosses[0].fwork[14] = 335.0f; + if ((gBosses[CARRIER_2].state == 1) && (gBosses[CARRIER_3].state == 1)) { + gBosses[CARRIER_0].fwork[14] = 335.0f; } } } } } else { - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } } - boss->obj.rot.x = gBosses[0].obj.rot.x; - boss->obj.rot.y = gBosses[0].obj.rot.y; - boss->obj.rot.z = gBosses[0].obj.rot.z; + this->obj.rot.x = gBosses[CARRIER_0].obj.rot.x; + this->obj.rot.y = gBosses[CARRIER_0].obj.rot.y; + this->obj.rot.z = gBosses[CARRIER_0].obj.rot.z; - Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, boss->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &D_i1_80199A78, &sp40); - boss->obj.pos.x = gBosses[0].obj.pos.x + sp40.x; - boss->obj.pos.y = gBosses[0].obj.pos.y + sp40.y; - boss->obj.pos.z = gBosses[0].obj.pos.z + sp40.z; + this->obj.pos.x = gBosses[CARRIER_0].obj.pos.x + sp40.x; + this->obj.pos.y = gBosses[CARRIER_0].obj.pos.y + sp40.y; + this->obj.pos.z = gBosses[CARRIER_0].obj.pos.z + sp40.z; - boss->fwork[2] = gBosses[0].fwork[2]; + this->fwork[2] = gBosses[CARRIER_0].fwork[2]; break; case 1: - Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, MTXF_NEW); - gBosses[0].fwork[15] += 0.5f; + Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_NEW); + gBosses[CARRIER_0].fwork[15] += 0.5f; if (((gGameFrameCount % 8) == 0) && (Rand_ZeroOne() < 0.5f)) { - boss->timer_05C = 4; + this->timer_05C = 4; } - if (((gGameFrameCount % 2) == 0)) { + if ((gGameFrameCount % 2) == 0) { Matrix_MultVec3f(gCalcMatrix, &D_i1_80199A6C, &sp4C); - func_effect_8007C120(boss->obj.pos.x + sp4C.x, boss->obj.pos.y + sp4C.y, boss->obj.pos.z + sp4C.z, - boss->vel.x, boss->vel.y, boss->vel.z, 0.2f, 10); + func_effect_8007C120(this->obj.pos.x + sp4C.x, this->obj.pos.y + sp4C.y, this->obj.pos.z + sp4C.z, + this->vel.x, this->vel.y, this->vel.z, 0.2f, 10); } - if (boss->obj.pos.y < (gGroundHeight + 150.0f)) { - if (boss->swork[0] == 0) { - boss->vel.y = -5.0f; - boss->swork[0] = 1; - boss->gravity = 0.0f; - Corneria_8018C0B0(boss); - AUDIO_PLAY_SFX(NA_SE_OB_WATER_BOUND_M, boss->sfxSource, 4); + if (this->obj.pos.y < (gGroundHeight + 150.0f)) { + if (this->swork[0] == 0) { + this->vel.y = -5.0f; + this->swork[0] = 1; + this->gravity = 0.0f; + Corneria_8018C0B0(this); + AUDIO_PLAY_SFX(NA_SE_OB_WATER_BOUND_M, this->sfxSource, 4); } } else { - boss->obj.rot.z -= 2.0f; - boss->gravity = 1.0f; + this->obj.rot.z -= 2.0f; + this->gravity = 1.0f; } break; } @@ -2367,106 +2406,106 @@ void Corneria_8018DDAC(Boss* boss) { static Vec3f D_i1_80199A84 = { 20.0f, -90.0f, 0.0f }; static Vec3f D_i1_80199A90 = { -440.0f, 210.0f, 0.0f }; -void Corneria_8018E290(Boss* boss) { +void Corneria_Boss295_Update(Boss295* this) { Vec3f sp4C; Vec3f sp40; s32 i; - switch (boss->state) { + switch (this->state) { case 0: - if (boss->dmgType != DMG_NONE) { - boss->dmgType = DMG_NONE; - if (boss->dmgPart == 2) { - if (boss->fwork[0] > 60.0f) { - if (boss->health != 0) { - boss->timer_05C = 15; - boss->health -= boss->damage; + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + if (this->dmgPart == 2) { + if (this->fwork[0] > 60.0f) { + if (this->health != 0) { + this->timer_05C = 15; + this->health -= this->damage; - AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, this->sfxSource, 4); - if (boss->health <= 0) { - gBosses[0].swork[8]--; + if (this->health <= 0) { + gBosses[CARRIER_0].swork[8]--; - if (gBosses[0].swork[8] != 0) { + if (gBosses[CARRIER_0].swork[8] != 0) { Radio_PlayMessage(gMsg_ID_15130, RCID_FALCO); } else { Radio_PlayMessage(gMsg_ID_7085, RCID_FALCO); } - boss->info.cullDistance = 300.0f; + this->info.cullDistance = 300.0f; - gBosses[0].fwork[15] = 0.0f; - gBosses[0].fwork[14] = 335.0f; - boss->health = 0; + gBosses[CARRIER_0].fwork[15] = 0.0f; + gBosses[CARRIER_0].fwork[14] = 335.0f; + this->health = 0; - AUDIO_PLAY_SFX(NA_SE_EN_PARTS_BROKEN, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_PARTS_BROKEN, this->sfxSource, 4); - if (gBosses[0].swork[10] != 0) { - gBosses[0].swork[10]--; + if (gBosses[CARRIER_0].swork[10] != 0) { + gBosses[CARRIER_0].swork[10]--; } - gBosses[0].timer_056 = 30; - boss->state = 1; + gBosses[CARRIER_0].timer_056 = 30; + this->state = 1; Matrix_MultVec3f(gCalcMatrix, &D_i1_80199A84, &sp4C); for (i = 0; i < 10; i++) { - func_effect_80079618(boss->obj.pos.x + sp4C.x, boss->obj.pos.y + sp4C.y, - boss->obj.pos.z + sp4C.z, 1.0f); + func_effect_80079618(this->obj.pos.x + sp4C.x, this->obj.pos.y + sp4C.y, + this->obj.pos.z + sp4C.z, 1.0f); } - if (gBosses[1].state == 1) { - gBosses[0].fwork[14] = 25.0f; + if (gBosses[CARRIER_1].state == 1) { + gBosses[CARRIER_0].fwork[14] = 25.0f; } } } } } else { - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } } - boss->obj.rot.x = gBosses[0].obj.rot.x; - boss->obj.rot.y = gBosses[0].obj.rot.y; - boss->obj.rot.z = gBosses[0].obj.rot.z; + this->obj.rot.x = gBosses[CARRIER_0].obj.rot.x; + this->obj.rot.y = gBosses[CARRIER_0].obj.rot.y; + this->obj.rot.z = gBosses[CARRIER_0].obj.rot.z; - Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, boss->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &D_i1_80199A90, &sp40); - boss->obj.pos.x = gBosses[0].obj.pos.x + sp40.x; - boss->obj.pos.y = gBosses[0].obj.pos.y + sp40.y; - boss->obj.pos.z = gBosses[0].obj.pos.z + sp40.z; + this->obj.pos.x = gBosses[CARRIER_0].obj.pos.x + sp40.x; + this->obj.pos.y = gBosses[CARRIER_0].obj.pos.y + sp40.y; + this->obj.pos.z = gBosses[CARRIER_0].obj.pos.z + sp40.z; - boss->fwork[0] = gBosses[0].fwork[0]; + this->fwork[0] = gBosses[CARRIER_0].fwork[0]; break; case 1: - Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, MTXF_NEW); - gBosses[0].fwork[15] += 0.5f; + Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_NEW); + gBosses[CARRIER_0].fwork[15] += 0.5f; if (((gGameFrameCount % 8) == 0) && (Rand_ZeroOne() < 0.5f)) { - boss->timer_05C = 4; + this->timer_05C = 4; } - if (((gGameFrameCount % 2) == 0)) { + if ((gGameFrameCount % 2) == 0) { Matrix_MultVec3f(gCalcMatrix, &D_i1_80199A84, &sp4C); - func_effect_8007C120(boss->obj.pos.x + sp4C.x, boss->obj.pos.y + sp4C.y, boss->obj.pos.z + sp4C.z, - boss->vel.x, boss->vel.y, boss->vel.z, 0.2f, 10); + func_effect_8007C120(this->obj.pos.x + sp4C.x, this->obj.pos.y + sp4C.y, this->obj.pos.z + sp4C.z, + this->vel.x, this->vel.y, this->vel.z, 0.2f, 10); } - if (boss->obj.pos.y < (gGroundHeight + 150.0f)) { - if (boss->swork[0] == 0) { - boss->vel.y = -5.0f; - boss->swork[0] = 1; - boss->gravity = 0.0f; - Corneria_8018C0B0(boss); - AUDIO_PLAY_SFX(NA_SE_OB_WATER_BOUND_M, boss->sfxSource, 4); + if (this->obj.pos.y < (gGroundHeight + 150.0f)) { + if (this->swork[0] == 0) { + this->vel.y = -5.0f; + this->swork[0] = 1; + this->gravity = 0.0f; + Corneria_8018C0B0(this); + AUDIO_PLAY_SFX(NA_SE_OB_WATER_BOUND_M, this->sfxSource, 4); } } else { - boss->obj.rot.z -= 2.0f; - boss->gravity = 1.0f; + this->obj.rot.z -= 2.0f; + this->gravity = 1.0f; } break; } @@ -2475,115 +2514,115 @@ void Corneria_8018E290(Boss* boss) { static Vec3f D_i1_80199A9C = { 20.0f, 90.0f, 0.0f }; static Vec3f D_i1_80199AA8 = { -440.0f, -210.0f, 0.0f }; -void Corneria_8018E76C(Boss* boss) { +void Corneria_Boss296_Update(Boss296* this) { Vec3f sp4C; Vec3f sp40; s32 i; - switch (boss->state) { + switch (this->state) { case 0: - if (boss->dmgType != DMG_NONE) { - boss->dmgType = DMG_NONE; - if (boss->dmgPart == 2) { - if (boss->fwork[1] > 60.0f) { - if (boss->health != 0) { - boss->timer_05C = 15; - boss->health -= boss->damage; + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + if (this->dmgPart == 2) { + if (this->fwork[1] > 60.0f) { + if (this->health != 0) { + this->timer_05C = 15; + this->health -= this->damage; - AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, this->sfxSource, 4); - if (boss->health <= 0) { - gBosses[0].swork[8]--; - if (gBosses[0].swork[8] != 0) { + if (this->health <= 0) { + gBosses[CARRIER_0].swork[8]--; + if (gBosses[CARRIER_0].swork[8] != 0) { Radio_PlayMessage(gMsg_ID_15130, RCID_FALCO); } else { Radio_PlayMessage(gMsg_ID_7085, RCID_FALCO); } - boss->info.cullDistance = 300.0f; + this->info.cullDistance = 300.0f; - gBosses[0].fwork[15] = 0.0f; - gBosses[0].fwork[14] = 335.0f; + gBosses[CARRIER_0].fwork[15] = 0.0f; + gBosses[CARRIER_0].fwork[14] = 335.0f; - boss->health = 0; + this->health = 0; - AUDIO_PLAY_SFX(NA_SE_EN_PARTS_BROKEN, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_PARTS_BROKEN, this->sfxSource, 4); - if (gBosses[0].swork[10] != 0) { - gBosses[0].swork[10]--; + if (gBosses[CARRIER_0].swork[10] != 0) { + gBosses[CARRIER_0].swork[10]--; } - gBosses[0].timer_056 = 30; - boss->state = 1; - gBosses[0].fwork[6] = 500.0f; + gBosses[CARRIER_0].timer_056 = 30; + this->state = 1; + gBosses[CARRIER_0].fwork[6] = 500.0f; Matrix_MultVec3f(gCalcMatrix, &D_i1_80199A9C, &sp4C); for (i = 0; i < 10; i++) { - func_effect_80079618(boss->obj.pos.x + sp4C.x, boss->obj.pos.y + sp4C.y, - boss->obj.pos.z + sp4C.z, 1.0f); + func_effect_80079618(this->obj.pos.x + sp4C.x, this->obj.pos.y + sp4C.y, + this->obj.pos.z + sp4C.z, 1.0f); } - if (gBosses[1].state == 1) { - gBosses[0].fwork[14] = 25.0f; + if (gBosses[CARRIER_1].state == 1) { + gBosses[CARRIER_0].fwork[14] = 25.0f; } } } } } else { - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } } - boss->obj.rot.x = gBosses[0].obj.rot.x; - boss->obj.rot.y = gBosses[0].obj.rot.y; - boss->obj.rot.z = gBosses[0].obj.rot.z; + this->obj.rot.x = gBosses[CARRIER_0].obj.rot.x; + this->obj.rot.y = gBosses[CARRIER_0].obj.rot.y; + this->obj.rot.z = gBosses[CARRIER_0].obj.rot.z; - Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, boss->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &D_i1_80199AA8, &sp40); - boss->obj.pos.x = gBosses[0].obj.pos.x + sp40.x; - boss->obj.pos.y = gBosses[0].obj.pos.y + sp40.y; - boss->obj.pos.z = gBosses[0].obj.pos.z + sp40.z; + this->obj.pos.x = gBosses[CARRIER_0].obj.pos.x + sp40.x; + this->obj.pos.y = gBosses[CARRIER_0].obj.pos.y + sp40.y; + this->obj.pos.z = gBosses[CARRIER_0].obj.pos.z + sp40.z; - boss->fwork[1] = gBosses[0].fwork[1]; + this->fwork[1] = gBosses[CARRIER_0].fwork[1]; break; case 1: - Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, MTXF_NEW); + Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_NEW); - gBosses[0].fwork[15] += 0.5f; + gBosses[CARRIER_0].fwork[15] += 0.5f; if (((gGameFrameCount % 8) == 0) && (Rand_ZeroOne() < 0.5f)) { - boss->timer_05C = 4; + this->timer_05C = 4; } - if (((gGameFrameCount % 2) == 0)) { + if ((gGameFrameCount % 2) == 0) { Matrix_MultVec3f(gCalcMatrix, &D_i1_80199A9C, &sp4C); - func_effect_8007C120(boss->obj.pos.x + sp4C.x, boss->obj.pos.y + sp4C.y, boss->obj.pos.z + sp4C.z, - boss->vel.x, boss->vel.y, boss->vel.z, 0.2f, 10); + func_effect_8007C120(this->obj.pos.x + sp4C.x, this->obj.pos.y + sp4C.y, this->obj.pos.z + sp4C.z, + this->vel.x, this->vel.y, this->vel.z, 0.2f, 10); } - if (boss->obj.pos.y < (gGroundHeight + 150.0f)) { - if (boss->swork[0] == 0) { - boss->vel.y = -5.0f; - boss->swork[0] = 1; - boss->gravity = 0.0f; - Corneria_8018C0B0(boss); - AUDIO_PLAY_SFX(NA_SE_OB_WATER_BOUND_M, boss->sfxSource, 4); + if (this->obj.pos.y < (gGroundHeight + 150.0f)) { + if (this->swork[0] == 0) { + this->vel.y = -5.0f; + this->swork[0] = 1; + this->gravity = 0.0f; + Corneria_8018C0B0(this); + AUDIO_PLAY_SFX(NA_SE_OB_WATER_BOUND_M, this->sfxSource, 4); } } else { - boss->obj.rot.z -= 2.0f; - boss->gravity = 1.0f; + this->obj.rot.z -= 2.0f; + this->gravity = 1.0f; } break; } } -bool Corneria_8018EC54(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { - if ((limbIndex == 10) && (gBosses[2].state != 0) && (gBosses[3].state != 0)) { +bool Corneria_Carrier_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { + if ((limbIndex == 10) && (gBosses[CARRIER_2].state != 0) && (gBosses[CARRIER_3].state != 0)) { *dList = NULL; } if ((limbIndex != 12) && (limbIndex != 10)) { @@ -2592,12 +2631,13 @@ bool Corneria_8018EC54(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return false; } -void Corneria_8018ECAC(Boss* boss) { - Animation_GetFrameData(&D_CO_602D400, 0, boss->vwork); - Animation_DrawSkeleton(1, D_CO_602D5AC, boss->vwork, Corneria_8018EC54, NULL, &boss->index, &gIdentityMatrix); +void Corneria_Carrier_Draw(Carrier* this) { + Animation_GetFrameData(&D_CO_602D400, 0, this->vwork); + Animation_DrawSkeleton(1, aCoCarrierSkel, this->vwork, Corneria_Carrier_OverrideLimbDraw, NULL, &this->index, + &gIdentityMatrix); } -bool Corneria_8018ED1C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { +bool Corneria_Boss294_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { if (limbIndex == 5) { rot->y -= gBosses[*(s32*) data].fwork[2]; } @@ -2607,14 +2647,15 @@ bool Corneria_8018ED1C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return false; } -void Corneria_8018ED78(Boss* boss) { +void Corneria_Boss294_Draw(Boss294* this) { Matrix_Translate(gGfxMatrix, -D_i1_80199A78.x, -D_i1_80199A78.y, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - Animation_GetFrameData(&D_CO_602D400, 0, boss->vwork); - Animation_DrawSkeleton(1, D_CO_602D5AC, boss->vwork, Corneria_8018ED1C, NULL, &boss->index, &gIdentityMatrix); + Animation_GetFrameData(&D_CO_602D400, 0, this->vwork); + Animation_DrawSkeleton(1, aCoCarrierSkel, this->vwork, Corneria_Boss294_OverrideLimbDraw, NULL, &this->index, + &gIdentityMatrix); } -bool Corneria_8018EE2C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { +bool Corneria_Boss295_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { if (limbIndex == 1) { rot->z -= gBosses[*(s32*) data].fwork[0]; } @@ -2624,14 +2665,15 @@ bool Corneria_8018EE2C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return false; } -void Corneria_8018EE84(Boss* boss) { +void Corneria_Boss295_Draw(Boss295* this) { Matrix_Translate(gGfxMatrix, -D_i1_80199A90.x, -D_i1_80199A90.y, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - Animation_GetFrameData(&D_CO_602D400, 0, boss->vwork); - Animation_DrawSkeleton(1, D_CO_602D5AC, boss->vwork, Corneria_8018EE2C, NULL, &boss->index, &gIdentityMatrix); + Animation_GetFrameData(&D_CO_602D400, 0, this->vwork); + Animation_DrawSkeleton(1, aCoCarrierSkel, this->vwork, Corneria_Boss295_OverrideLimbDraw, NULL, &this->index, + &gIdentityMatrix); } -bool Corneria_8018EF38(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { +bool Corneria_Boss296_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { if (limbIndex == 3) { rot->z -= gBosses[*(s32*) data].fwork[1]; } @@ -2641,14 +2683,15 @@ bool Corneria_8018EF38(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return false; } -void Corneria_8018EF90(Boss* boss) { +void Corneria_Boss296_Draw(Boss296* this) { Matrix_Translate(gGfxMatrix, -D_i1_80199AA8.x, -D_i1_80199AA8.y, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - Animation_GetFrameData(&D_CO_602D400, 0, boss->vwork); - Animation_DrawSkeleton(1, D_CO_602D5AC, boss->vwork, Corneria_8018EF38, NULL, &boss->index, &gIdentityMatrix); + Animation_GetFrameData(&D_CO_602D400, 0, this->vwork); + Animation_DrawSkeleton(1, aCoCarrierSkel, this->vwork, Corneria_Boss296_OverrideLimbDraw, NULL, &this->index, + &gIdentityMatrix); } -void Corneria_8018F044(Scenery* scenery) { +void Corneria_Doors_Update(CoDoors* scenery) { switch (scenery->state) { case 0: if (scenery->dmgType != DMG_NONE) { @@ -2676,8 +2719,8 @@ void Corneria_8018F044(Scenery* scenery) { } } -bool Corneria_8018F1C8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { - Scenery* scenery = (Scenery*) data; +bool Corneria_Doors_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { + CoDoors* scenery = (CoDoors*) data; RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); @@ -2699,156 +2742,160 @@ bool Corneria_8018F1C8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return 0; } -void Corneria_8018F31C(Scenery* scenery) { - Vec3f sp28[10]; +void Corneria_Doors_Draw(CoDoors* this) { + Vec3f jointTable[10]; - Animation_GetFrameData(&D_CO_602AA7C, 0, sp28); - Animation_DrawSkeleton(3, D_CO_602AB48, sp28, Corneria_8018F1C8, NULL, scenery, gCalcMatrix); + Animation_GetFrameData(&D_CO_602AA7C, 0, jointTable); + Animation_DrawSkeleton(3, aCoDoorsSkel, jointTable, Corneria_Doors_OverrideLimbDraw, NULL, this, gCalcMatrix); RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } -void Corneria_8018F3BC(Scenery* scenery, f32 arg1) { +// Initializer called by unused function +void Corneria_InitTerrainBumps(Scenery* scenery, f32 xPosOffset) { Scenery_Initialize(scenery); scenery->obj.status = OBJ_INIT; - scenery->obj.pos.x = RAND_FLOAT_CENTERED(1000.0f) + arg1; + scenery->obj.pos.x = RAND_FLOAT_CENTERED(1000.0f) + xPosOffset; scenery->obj.rot.y = RAND_FLOAT(90.0f) + 45.0f; - if (arg1 > 0.0f) { + if (xPosOffset > 0.0f) { scenery->obj.rot.y *= -1.0f; } scenery->obj.pos.y = 0.0f; - scenery->obj.id = OBJ_SCENERY_1; + scenery->obj.id = OBJ_SCENERY_CO_BUMP_1; scenery->effectVel.z = 60.0f; Object_SetInfo(&scenery->info, scenery->obj.id); scenery->obj.pos.z = -2000.0f; scenery->info.cullDistance = 15000.0f; } -void Corneria_8018F4A4(void) { +// Unused, seems to be creating some terrain bumps during the intro cutscene. +void Corneria_SpawnTerrainBumps(void) { s32 i; - if (((gGameFrameCount % 16) == 0) && !(gPlayer[0].csState < 4)) { + if (((gGameFrameCount % 16) == 0) && (gPlayer[0].csState >= 4)) { for (i = 0; i < ARRAY_COUNT(gScenery); i++) { if (gScenery[i].obj.status == OBJ_FREE) { - Corneria_8018F3BC(&gScenery[i], 4000.0f); + Corneria_InitTerrainBumps(&gScenery[i], 4000.0f); break; } } for (i = 0; i < ARRAY_COUNT(gScenery); i++) { if (gScenery[i].obj.status == OBJ_FREE) { - Corneria_8018F3BC(&gScenery[i], -4000.0f); + Corneria_InitTerrainBumps(&gScenery[i], -4000.0f); break; } } } } -void Corneria_8018F55C(Effect* effect) { - - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.pos.x = gPlayer[0].cam.eye.x + RAND_FLOAT_CENTERED(500.0f); - effect->obj.pos.y = gPlayer[0].cam.eye.y + RAND_RANGE(-280.0f, 70.0f); - effect->obj.id = OBJ_EFFECT_352; - effect->timer_50 = 80; - effect->unk_46 = 144; - effect->obj.pos.z = -4000.0f; - effect->vel.z = 60.0f; - effect->scale2 = 10.0f + RAND_FLOAT(15.0f); +void Corneria_InitClouds(Clouds* this) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.pos.x = gPlayer[0].cam.eye.x + RAND_FLOAT_CENTERED(500.0f); + this->obj.pos.y = gPlayer[0].cam.eye.y + RAND_RANGE(-280.0f, 70.0f); + this->obj.id = OBJ_EFFECT_CLOUDS; + this->timer_50 = 80; + this->unk_46 = 144; + this->obj.pos.z = -4000.0f; + this->vel.z = 60.0f; + this->scale2 = 10.0f + RAND_FLOAT(15.0f); if (Rand_ZeroOne() < 0.5f) { - effect->obj.rot.z = 180.0f; + this->obj.rot.z = 180.0f; } - Object_SetInfo(&effect->info, effect->obj.id); + Object_SetInfo(&this->info, this->obj.id); } -void Corneria_8018F678(void) { +void Corneria_SpawnClouds(void) { s32 i; if (((gGameFrameCount % 32) == 0) && gPlayer[0].pos.x == 0.0f) { for (i = 0; i < ARRAY_COUNT(gEffects); i++) { if (gEffects[i].obj.status == OBJ_FREE) { - Corneria_8018F55C(&gEffects[i]); - return; + Corneria_InitClouds(&gEffects[i]); + break; } } } } -static f32 D_i1_80199AB4[3] = { 180.0f, -180.0f, 0.0f }; +static f32 sCoLevelStartTeamXpos[3] = { 180.0f, -180.0f, 0.0f }; -static f32 D_i1_80199AC0[3] = { 200.0f, 140.0f, 200.0f }; +static f32 sCoLevelStartTeamYpos[3] = { 200.0f, 140.0f, 200.0f }; -static f32 D_i1_80199ACC[3] = { 160.0f, 160.0f, 320.0f }; +static f32 sCoLevelStartTeamZpos[3] = { 160.0f, 160.0f, 320.0f }; -static f32 D_i1_80199AD8[3] = { -60.0f, 60.0f, -45.0f }; +static f32 sCoLevelStartTeamZrot[3] = { -60.0f, 60.0f, -45.0f }; -void Corneria_8018F6F8(Actor* actor, s32 arg1) { - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_CUTSCENE; +void Corneria_CsSFTeamUpdate(ActorCutscene* this, s32 teamIdx) { + Actor_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.pos.x = (D_i1_80199AB4[arg1] * 4.0f) + gPlayer[0].pos.x; - actor->obj.pos.y = (D_i1_80199AC0[arg1] * 2.0f) + gPlayer[0].pos.y; - actor->obj.pos.z = (D_i1_80199ACC[arg1] * 3.0f) + gPlayer[0].trueZpos; + this->obj.pos.x = (sCoLevelStartTeamXpos[teamIdx] * 4.0f) + gPlayer[0].pos.x; + this->obj.pos.y = (sCoLevelStartTeamYpos[teamIdx] * 2.0f) + gPlayer[0].pos.y; + this->obj.pos.z = (sCoLevelStartTeamZpos[teamIdx] * 3.0f) + gPlayer[0].trueZpos; - actor->vwork[20].x = D_i1_80199AB4[arg1] + gPlayer[0].pos.x; - actor->vwork[20].y = gPlayer[0].pos.y; - actor->vwork[20].z = D_i1_80199ACC[arg1] + gPlayer[0].trueZpos; + this->vwork[20].x = sCoLevelStartTeamXpos[teamIdx] + gPlayer[0].pos.x; + this->vwork[20].y = gPlayer[0].pos.y; + this->vwork[20].z = sCoLevelStartTeamZpos[teamIdx] + gPlayer[0].trueZpos; - actor->obj.rot.z = D_i1_80199AD8[arg1]; - actor->obj.rot.y = 180.0f; + this->obj.rot.z = sCoLevelStartTeamZrot[teamIdx]; + this->obj.rot.y = 180.0f; - actor->state = 100; - actor->fwork[0] = RAND_FLOAT(360.0f); + this->state = 100; + this->fwork[0] = RAND_FLOAT(360.0f); - Object_SetInfo(&actor->info, actor->obj.id); + Object_SetInfo(&this->info, this->obj.id); - actor->drawShadow = true; - actor->iwork[11] = 1; - actor->info.cullDistance = 200.0f; - AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); + this->drawShadow = true; + this->iwork[11] = 1; + this->info.cullDistance = 200.0f; + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); } void Corneria_LevelStart(Player* player) { s32 i; - Actor* actor0 = &gActors[0]; - Actor* actor1 = &gActors[1]; - Actor* actor2 = &gActors[2]; + ActorCutscene* falco = &gActors[0]; + ActorCutscene* slippy = &gActors[1]; + ActorCutscene* peppy = &gActors[2]; f32 sp44; f32 sp40; - f32 sp3C; - f32 sp38; - f32 sp34; + f32 x; + f32 y; + f32 z; f32 sp30; f32 sp2C; + PRINTF("Enms[1].obj.mode %d\n", gActors[1].obj.status); + if (gCsFrameCount < 815) { - sp3C = player->pos.x; - sp38 = player->pos.y + 15.0f; - sp34 = player->trueZpos - 20.0f; + x = player->pos.x; + y = player->pos.y + 15.0f; + z = player->trueZpos - 20.0f; } else { if (gCsFrameCount < 1009) { - sp3C = actor0->obj.pos.x; - sp38 = actor0->obj.pos.y + 15.0f; - sp34 = actor0->obj.pos.z - 20.0f; + x = falco->obj.pos.x; + y = falco->obj.pos.y + 15.0f; + z = falco->obj.pos.z - 20.0f; } else if (gCsFrameCount < 1198) { - sp3C = actor2->obj.pos.x; - sp38 = actor2->obj.pos.y + 15.0f; - sp34 = actor2->obj.pos.z - 20.0f; + x = peppy->obj.pos.x; + y = peppy->obj.pos.y + 15.0f; + z = peppy->obj.pos.z - 20.0f; } else { - sp3C = actor1->obj.pos.x; - sp38 = actor1->obj.pos.y + 15.0f; - sp34 = actor1->obj.pos.z - 20.0f; + x = slippy->obj.pos.x; + y = slippy->obj.pos.y + 15.0f; + z = slippy->obj.pos.z - 20.0f; } } - sp2C = -Math_Atan2F(player->cam.eye.x - sp3C, player->cam.eye.z - sp34); - sp30 = -Math_Atan2F(player->cam.eye.y - sp38, sqrtf(SQ(player->cam.eye.z - sp34) + SQ(player->cam.eye.x - sp3C))); + sp2C = -Math_Atan2F(player->cam.eye.x - x, player->cam.eye.z - z); + sp30 = -Math_Atan2F(player->cam.eye.y - y, sqrtf(SQ(player->cam.eye.z - z) + SQ(player->cam.eye.x - x))); + sp44 = Math_RadToDeg(sp2C) - D_ctx_80177A48[4]; sp40 = Math_RadToDeg(sp30) - D_ctx_80177A48[5]; @@ -2884,7 +2931,7 @@ void Corneria_LevelStart(Player* player) { } } - for (i = 0; (i < 40 && D_ctx_80177A48[7] >= 0.3f); i++, D_ctx_80177A48[7] -= 0.3f) { + for (i = 0; (i < 40) && (D_ctx_80177A48[7] >= 0.3f); i++, D_ctx_80177A48[7] -= 0.3f) { if (sp40 >= 0) { Texture_Scroll(D_arwing_30184D8, 64, 32, 0); } else { @@ -2910,7 +2957,7 @@ void Corneria_LevelStart(Player* player) { player->rockPhase += 3.0f; player->rockAngle = SIN_DEG(player->rockPhase) * 1.5f; - Corneria_8018F678(); + Corneria_SpawnClouds(); player->wings.unk_30 = 0; @@ -2922,13 +2969,13 @@ void Corneria_LevelStart(Player* player) { player->pos.y = 6000.0f; player->pos.x = 0.1f; - Corneria_8018F6F8(&gActors[0], 0); - Corneria_8018F6F8(&gActors[1], 1); - Corneria_8018F6F8(&gActors[2], 2); + Corneria_CsSFTeamUpdate(falco, 0); + Corneria_CsSFTeamUpdate(slippy, 1); + Corneria_CsSFTeamUpdate(peppy, 2); - actor0->iwork[14] = 2; - actor1->iwork[14] = 3; - actor2->iwork[14] = 4; + falco->iwork[14] = 2; + slippy->iwork[14] = 3; + peppy->iwork[14] = 4; player->cam.eye.x = gCsCamEyeX = player->pos.x - 400.0f; gPlayer[0].cam.eye.y = gCsCamEyeY = player->pos.y + 600.0f; @@ -3022,20 +3069,20 @@ void Corneria_LevelStart(Player* player) { player->csState = 3; player->csTimer = 180; player->unk_004 = 0.0f; - actor0->state = 0; - actor2->state = 0; - actor1->state = 0; - actor0->obj.pos.y = player->pos.y + 80.0f; - actor0->obj.pos.z += 100.0f; + falco->state = 0; + peppy->state = 0; + slippy->state = 0; + falco->obj.pos.y = player->pos.y + 80.0f; + falco->obj.pos.z += 100.0f; } - if (gMsgCharIsPrinting && (gGameFrameCount & 2)) { + if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) { player->wings.unk_30 = 5.0f; } break; case 3: - if (fabsf(Math_SmoothStepToF(&actor0->obj.pos.z, player->pos.z + 100.0f, 0.05f, 5.0f, 0.0f)) < 1.0f) { + if (fabsf(Math_SmoothStepToF(&falco->obj.pos.z, player->pos.z + 100.0f, 0.05f, 5.0f, 0.0f)) < 1.0f) { player->csState = 4; D_ctx_80177A48[0] = 0.0f; player->csTimer = 190; @@ -3056,13 +3103,13 @@ void Corneria_LevelStart(Player* player) { Math_SmoothStepToF(&D_ctx_80177A48[0], 0.1f, 1.0f, 0.001f, 0.0f); - gCsCamEyeX = actor0->obj.pos.x - 50.0f; - gCsCamEyeY = actor0->obj.pos.y + 10.0f; - gCsCamEyeZ = actor0->obj.pos.z - 10.0f; + gCsCamEyeX = falco->obj.pos.x - 50.0f; + gCsCamEyeY = falco->obj.pos.y + 10.0f; + gCsCamEyeZ = falco->obj.pos.z - 10.0f; - gCsCamAtX = actor0->obj.pos.x; - gCsCamAtY = actor0->obj.pos.y + 10.0f; - gCsCamAtZ = actor0->obj.pos.z + 10.0f; + gCsCamAtX = falco->obj.pos.x; + gCsCamAtY = falco->obj.pos.y + 10.0f; + gCsCamAtZ = falco->obj.pos.z + 10.0f; if (player->csTimer == 0) { player->csState = 5; @@ -3074,18 +3121,18 @@ void Corneria_LevelStart(Player* player) { } if (player->csTimer < 100) { - Math_SmoothStepToF(&actor0->fwork[19], 50.0f, 0.1f, 3.0f, 0.01f); + Math_SmoothStepToF(&falco->fwork[19], 50.0f, 0.1f, 3.0f, 0.01f); } - actor0->fwork[20] = 0.0f; + falco->fwork[20] = 0.0f; if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) { - actor0->fwork[20] = 5.0f; + falco->fwork[20] = 5.0f; } break; case 5: - Math_SmoothStepToF(&actor0->fwork[19], 0, 0.1f, 3.0f, 0.01f); + Math_SmoothStepToF(&falco->fwork[19], 0, 0.1f, 3.0f, 0.01f); if (player->csTimer == 0) { player->csState = 6; @@ -3093,53 +3140,53 @@ void Corneria_LevelStart(Player* player) { player->csTimer = 190; } - gCsCamEyeY = actor0->obj.pos.y + 10.0f; - gCsCamAtY = actor0->obj.pos.y + 10.0f; + gCsCamEyeY = falco->obj.pos.y + 10.0f; + gCsCamAtY = falco->obj.pos.y + 10.0f; break; case 6: - Math_SmoothStepToF(&actor0->fwork[19], 0.0f, 0.1f, 3.0f, 0.01f); + Math_SmoothStepToF(&falco->fwork[19], 0.0f, 0.1f, 3.0f, 0.01f); Math_SmoothStepToF(&D_ctx_80177A48[0], 0.1f, 1.0f, 0.001f, 0.0f); D_ctx_80177A48[3] -= 0.5f; - gCsCamEyeX = actor2->obj.pos.x + 100.0f + D_ctx_80177A48[3]; - gCsCamEyeY = actor2->obj.pos.y + 10.0f; - gCsCamEyeZ = actor2->obj.pos.z - 70.0f; + gCsCamEyeX = peppy->obj.pos.x + 100.0f + D_ctx_80177A48[3]; + gCsCamEyeY = peppy->obj.pos.y + 10.0f; + gCsCamEyeZ = peppy->obj.pos.z - 70.0f; - gCsCamAtX = actor2->obj.pos.x + 20.0f + (D_ctx_80177A48[3] * 0.5f); - gCsCamAtY = actor2->obj.pos.y + 10.0f; - gCsCamAtZ = actor2->obj.pos.z + 10.0f; + gCsCamAtX = peppy->obj.pos.x + 20.0f + (D_ctx_80177A48[3] * 0.5f); + gCsCamAtY = peppy->obj.pos.y + 10.0f; + gCsCamAtZ = peppy->obj.pos.z + 10.0f; if (player->csTimer == 0) { player->csState = 7; player->csTimer = 190; D_ctx_80177A48[0] = 0.0f; - actor0->obj.pos.y = player->pos.y; - actor0->obj.pos.z = player->trueZpos + 240.0f; + falco->obj.pos.y = player->pos.y; + falco->obj.pos.z = player->trueZpos + 240.0f; } if (player->csTimer == 80) { Radio_PlayMessage(gMsg_ID_2030, RCID_PEPPY); } - actor2->fwork[20] = 0.0f; + peppy->fwork[20] = 0.0f; if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) { - actor2->fwork[20] = 5.0f; + peppy->fwork[20] = 5.0f; } break; case 7: Math_SmoothStepToF(&D_ctx_80177A48[0], 0.1f, 1.0f, 0.001f, 0.0f); - gCsCamEyeX = actor1->obj.pos.x + 20.0f; - gCsCamEyeY = actor1->obj.pos.y + 10.0f; - gCsCamEyeZ = actor1->obj.pos.z - 50.0f; + gCsCamEyeX = slippy->obj.pos.x + 20.0f; + gCsCamEyeY = slippy->obj.pos.y + 10.0f; + gCsCamEyeZ = slippy->obj.pos.z - 50.0f; - gCsCamAtX = actor1->obj.pos.x + 10.0f; - gCsCamAtY = actor1->obj.pos.y + 10.0f; - gCsCamAtZ = actor1->obj.pos.z + 10.0f; + gCsCamAtX = slippy->obj.pos.x + 10.0f; + gCsCamAtY = slippy->obj.pos.y + 10.0f; + gCsCamAtZ = slippy->obj.pos.z + 10.0f; if (player->csTimer == 0) { player->csState = 8; @@ -3155,13 +3202,13 @@ void Corneria_LevelStart(Player* player) { } if (player->csTimer < 100) { - Math_SmoothStepToF(&actor1->fwork[19], -20.0f, 0.1f, 3.0f, 0.01f); + Math_SmoothStepToF(&slippy->fwork[19], -20.0f, 0.1f, 3.0f, 0.01f); } - actor1->fwork[20] = 0.0f; + slippy->fwork[20] = 0.0f; if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) { - actor1->fwork[20] = 5.0f; + slippy->fwork[20] = 5.0f; } break; @@ -3195,41 +3242,41 @@ void Corneria_LevelStart(Player* player) { } if (player->csTimer == 80) { - actor0->fwork[29] = 5.0f; + falco->fwork[29] = 5.0f; } if (player->csTimer == 60) { - actor1->fwork[29] = 5.0f; + slippy->fwork[29] = 5.0f; } if (player->csTimer == 40) { - actor2->fwork[29] = 5.0f; + peppy->fwork[29] = 5.0f; } if ((player->csTimer > 70) && (player->csTimer < 80)) { - actor0->iwork[11] = 2; + falco->iwork[11] = 2; } if ((player->csTimer > 50) && (player->csTimer < 60)) { - actor1->iwork[11] = 2; + slippy->iwork[11] = 2; } if ((player->csTimer > 30) && (player->csTimer < 40)) { - actor2->iwork[11] = 2; + peppy->iwork[11] = 2; } if (player->csTimer == 70) { - actor0->state = 1; + falco->state = 1; Play_PlaySfxFirstPlayer(player->sfxSource, NA_SE_ARWING_BOOST); } if (player->csTimer == 50) { - actor1->state = 2; + slippy->state = 2; Play_PlaySfxFirstPlayer(player->sfxSource, NA_SE_ARWING_BOOST); } if (player->csTimer == 30) { - actor2->state = 3; + peppy->state = 3; Play_PlaySfxFirstPlayer(player->sfxSource, NA_SE_ARWING_BOOST); } @@ -3264,9 +3311,9 @@ void Corneria_LevelStart(Player* player) { if (gFillScreenAlpha == 255) { AUDIO_PLAY_BGM(gBgmSeqId); - Object_Kill(&actor0->obj, actor0->sfxSource); - Object_Kill(&actor1->obj, actor1->sfxSource); - Object_Kill(&actor2->obj, actor2->sfxSource); + Object_Kill(&falco->obj, falco->sfxSource); + Object_Kill(&slippy->obj, slippy->sfxSource); + Object_Kill(&peppy->obj, peppy->sfxSource); gLevelStartStatusScreenTimer = 80; @@ -3311,12 +3358,12 @@ void Corneria_LevelStart(Player* player) { player->cam.at.y -= 3.0f; player->pos.y -= 3.0f; - actor0->vwork[20].y -= 3.0f; - actor0->obj.pos.y -= 3.0f; - actor2->vwork[20].y -= 3.0f; - actor2->obj.pos.y -= 3.0f; - actor1->vwork[20].y -= 3.0f; - actor1->obj.pos.y -= 3.0f; + falco->vwork[20].y -= 3.0f; + falco->obj.pos.y -= 3.0f; + peppy->vwork[20].y -= 3.0f; + peppy->obj.pos.y -= 3.0f; + slippy->vwork[20].y -= 3.0f; + slippy->obj.pos.y -= 3.0f; } static f32 D_i1_80199AE4[3] = { -1500.0f, 700.0f, 0.0f }; @@ -3333,7 +3380,7 @@ static f32 D_i1_80199B20[3] = { 200.0f, 200.0f, 400.0f }; static f32 D_i1_80199B2C[3] = { 180.0f, -120.0f, 180.0f }; -void Corneria_80190F74(Actor* actor, s32 arg1) { +void Corneria_80190F74(ActorCutscene* this, s32 index) { Vec3f sp5C; Vec3f sp50; Vec3f sp44; @@ -3341,42 +3388,42 @@ void Corneria_80190F74(Actor* actor, s32 arg1) { Player* player = &gPlayer[0]; Matrix_RotateY(gCalcMatrix, player->rot.y * M_DTOR, MTXF_NEW); - sp5C.x = D_i1_80199AE4[arg1]; - sp5C.y = D_i1_80199AF0[arg1]; - sp5C.z = D_i1_80199AFC[arg1]; + sp5C.x = D_i1_80199AE4[index]; + sp5C.y = D_i1_80199AF0[index]; + sp5C.z = D_i1_80199AFC[index]; - sp44.x = D_i1_80199B08[arg1]; - sp44.y = D_i1_80199B14[arg1]; - sp44.z = D_i1_80199B20[arg1]; + sp44.x = D_i1_80199B08[index]; + sp44.y = D_i1_80199B14[index]; + sp44.z = D_i1_80199B20[index]; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp5C, &sp50); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); - Actor_Initialize(actor); + Actor_Initialize(this); - actor->obj.pos.x = player->pos.x + sp50.x; - actor->obj.pos.y = player->pos.y + sp50.y; - actor->obj.pos.z = player->pos.z + sp50.z; + this->obj.pos.x = player->pos.x + sp50.x; + this->obj.pos.y = player->pos.y + sp50.y; + this->obj.pos.z = player->pos.z + sp50.z; - actor->fwork[0] = sp38.x; - actor->fwork[1] = sp38.y; - actor->fwork[2] = sp38.z; + this->fwork[0] = sp38.x; + this->fwork[1] = sp38.y; + this->fwork[2] = sp38.z; - actor->fwork[7] = RAND_FLOAT(360.0f); - actor->fwork[8] = RAND_FLOAT(360.0f); + this->fwork[7] = RAND_FLOAT(360.0f); + this->fwork[8] = RAND_FLOAT(360.0f); - actor->vel.x = player->vel.x; - actor->vel.y = player->vel.y; - actor->vel.z = player->vel.z; + this->vel.x = player->vel.x; + this->vel.y = player->vel.y; + this->vel.z = player->vel.z; - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.rot.z = D_i1_80199B2C[arg1]; + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_ACTOR_CUTSCENE; + this->obj.rot.z = D_i1_80199B2C[index]; - Object_SetInfo(&actor->info, actor->obj.id); + Object_SetInfo(&this->info, this->obj.id); - actor->iwork[11] = 1; - AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); + this->iwork[11] = 1; + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); } void Corneria_LevelComplete1(Player* player) { @@ -3412,8 +3459,8 @@ void Corneria_LevelComplete1(Player* player) { case 0: Audio_StopSfxByBankAndSource(1, player->sfxSource); - sp54 = player->cam.eye.x - D_i1_8019B6D8[62]; - sp4C = player->cam.eye.z - D_i1_8019B6D8[64]; + sp54 = player->cam.eye.x - sCoGrangaWork[62]; + sp4C = player->cam.eye.z - sCoGrangaWork[64]; D_ctx_80177A48[0] = Math_RadToDeg(Math_Atan2F(sp54, sp4C)); D_ctx_80177A48[1] = sqrtf(SQ(sp54) + SQ(sp4C)); @@ -3443,15 +3490,15 @@ void Corneria_LevelComplete1(Player* player) { Matrix_MultVec3f(gCalcMatrix, &sp64, &sp58); - Math_SmoothStepToF(&player->cam.eye.x, D_i1_8019B6D8[62] + sp58.x, 0.05f, 500.0f, 0.0f); - Math_SmoothStepToF(&player->cam.eye.y, D_i1_8019B6D8[63] + 100.0f, 0.05f, 500.0f, 0.0f); - Math_SmoothStepToF(&player->cam.eye.z, D_i1_8019B6D8[64] + sp58.z, 0.05f, 500.0f, 0.0f); - Math_SmoothStepToF(&player->cam.at.x, D_i1_8019B6D8[62], 0.05f, 500.0f, 0.0f); - Math_SmoothStepToF(&player->cam.at.y, D_i1_8019B6D8[63], 0.05f, 500.0f, 0.0f); - Math_SmoothStepToF(&player->cam.at.z, D_i1_8019B6D8[64], 0.05f, 500.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.x, sCoGrangaWork[GRANGA_WORK_62] + sp58.x, 0.05f, 500.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.y, sCoGrangaWork[GRANGA_WORK_63] + 100.0f, 0.05f, 500.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.z, sCoGrangaWork[GRANGA_WORK_64] + sp58.z, 0.05f, 500.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.x, sCoGrangaWork[GRANGA_WORK_62], 0.05f, 500.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.y, sCoGrangaWork[GRANGA_WORK_63], 0.05f, 500.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.z, sCoGrangaWork[GRANGA_WORK_64], 0.05f, 500.0f, 0.0f); - temp_fa0 = player->pos.x - D_i1_8019B6D8[62]; - temp_fa1 = player->pos.z - D_i1_8019B6D8[64]; + temp_fa0 = player->pos.x - sCoGrangaWork[GRANGA_WORK_62]; + temp_fa1 = player->pos.z - sCoGrangaWork[GRANGA_WORK_64]; if (gCsFrameCount < 30) { temp_deg = Math_RadToDeg(-Math_Atan2F(temp_fa0, temp_fa1)); diff --git a/src/overlays/ovl_i1/fox_tr.c b/src/overlays/ovl_i1/fox_tr.c index 7ce67fdf..5bd61820 100644 --- a/src/overlays/ovl_i1/fox_tr.c +++ b/src/overlays/ovl_i1/fox_tr.c @@ -7,7 +7,7 @@ #include "global.h" #include "assets/ast_training.h" -void Training_801988E0(void) { +void Training_RingPassCount_Draw(void) { if (gRingPassCount != 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); diff --git a/src/overlays/ovl_i1/fox_tr360.c b/src/overlays/ovl_i1/fox_tr360.c index c2527c7d..6886ba18 100644 --- a/src/overlays/ovl_i1/fox_tr360.c +++ b/src/overlays/ovl_i1/fox_tr360.c @@ -10,7 +10,6 @@ void Training_Setup360(void) { Scenery360* scenery360; s32 i; - gLevelObjects = SEGMENTED_TO_VIRTUAL(D_TR_6008EF8); Rand_SetSeed(1, 29000, 9876); @@ -35,147 +34,148 @@ void Training_Setup360(void) { } } -bool Training_80198DCC(Actor* actor, f32 x, f32 z) { +bool Training_EnemyObstacleCheck(ActorAllRange* this, f32 sinRotY, f32 cosRotY) { Scenery360* scenery360; s32 i; for (i = 0, scenery360 = gScenery360; i < 200;) { if ((scenery360->obj.status == OBJ_ACTIVE) && - (fabsf(scenery360->obj.pos.x - (actor->obj.pos.x + ((x * 650.0f) + 350.0f))) < 1200.0f) && - (fabsf(scenery360->obj.pos.z - (actor->obj.pos.z + ((z * 650.0f) + 350.0f))) < 1200.0f) && - (actor->obj.pos.y < 650.0f)) { + (fabsf(scenery360->obj.pos.x - (this->obj.pos.x + ((sinRotY * 650.0f) + 350.0f))) < 1200.0f) && + (fabsf(scenery360->obj.pos.z - (this->obj.pos.z + ((cosRotY * 650.0f) + 350.0f))) < 1200.0f) && + (this->obj.pos.y < 650.0f)) { return true; } scenery360++; if ((scenery360->obj.status == OBJ_ACTIVE) && - (fabsf(scenery360->obj.pos.x - (actor->obj.pos.x + ((x * 650.0f) + 350.0f))) < 1200.0f) && - (fabsf(scenery360->obj.pos.z - (actor->obj.pos.z + ((z * 650.0f) + 350.0f))) < 1200.0f) && - (actor->obj.pos.y < 650.0f)) { + (fabsf(scenery360->obj.pos.x - (this->obj.pos.x + ((sinRotY * 650.0f) + 350.0f))) < 1200.0f) && + (fabsf(scenery360->obj.pos.z - (this->obj.pos.z + ((cosRotY * 650.0f) + 350.0f))) < 1200.0f) && + (this->obj.pos.y < 650.0f)) { return true; } scenery360++; if ((scenery360->obj.status == OBJ_ACTIVE) && - (fabsf(scenery360->obj.pos.x - (actor->obj.pos.x + ((x * 650.0f) + 350.0f))) < 1200.0f) && - (fabsf(scenery360->obj.pos.z - (actor->obj.pos.z + ((z * 650.0f) + 350.0f))) < 1200.0f) && - (actor->obj.pos.y < 650.0f)) { + (fabsf(scenery360->obj.pos.x - (this->obj.pos.x + ((sinRotY * 650.0f) + 350.0f))) < 1200.0f) && + (fabsf(scenery360->obj.pos.z - (this->obj.pos.z + ((cosRotY * 650.0f) + 350.0f))) < 1200.0f) && + (this->obj.pos.y < 650.0f)) { return true; } scenery360++; if ((scenery360->obj.status == OBJ_ACTIVE) && - (fabsf(scenery360->obj.pos.x - (actor->obj.pos.x + ((x * 650.0f) + 350.0f))) < 1200.0f) && - (fabsf(scenery360->obj.pos.z - (actor->obj.pos.z + ((z * 650.0f) + 350.0f))) < 1200.0f) && - (actor->obj.pos.y < 650.0f)) { + (fabsf(scenery360->obj.pos.x - (this->obj.pos.x + ((sinRotY * 650.0f) + 350.0f))) < 1200.0f) && + (fabsf(scenery360->obj.pos.z - (this->obj.pos.z + ((cosRotY * 650.0f) + 350.0f))) < 1200.0f) && + (this->obj.pos.y < 650.0f)) { return true; } scenery360++; i += 4; } - return false; } -void Training_80199024(Actor* actor) { +void Training_Enemy_Update(ActorAllRange* this) { s32 pad[8]; - Vec3f sp54; - f32 var_fv0; + f32 xPos; + f32 yPos; + f32 zPos; + f32 targetAngle2; RadarMark* radarMark; - f32 temp_fv0; - f32 temp_fv1; - f32 var_fv0_2; - s32 temp_v0; + f32 pad2; + f32 angle; + f32 targetAngle; + bool enemyNearObstacle; f32 sinRotX; f32 sinRotY; f32 cosRotX; f32 cosRotY; - if (actor->timer_0BC == 0) { - sp54.y = RAND_FLOAT(1000.0f); - sp54.z = RAND_FLOAT_CENTERED(10000.0f); - sp54.x = RAND_FLOAT_CENTERED(10000.0f); - actor->fwork[4] = sp54.z; - actor->fwork[5] = sp54.y; - actor->fwork[6] = sp54.x; - actor->timer_0BC = RAND_INT(20.0f) + 10; + if (this->timer_0BC == 0) { + yPos = RAND_FLOAT(1000.0f); + xPos = RAND_FLOAT_CENTERED(10000.0f); + zPos = RAND_FLOAT_CENTERED(10000.0f); + this->fwork[4] = xPos; + this->fwork[5] = yPos; + this->fwork[6] = zPos; + this->timer_0BC = RAND_INT(20.0f) + 10; } - sinRotX = SIN_DEG(actor->obj.rot.x); - cosRotX = COS_DEG(actor->obj.rot.x); - sinRotY = SIN_DEG(actor->obj.rot.y); - cosRotY = COS_DEG(actor->obj.rot.y); + sinRotX = SIN_DEG(this->obj.rot.x); + cosRotX = COS_DEG(this->obj.rot.x); + sinRotY = SIN_DEG(this->obj.rot.y); + cosRotY = COS_DEG(this->obj.rot.y); - sp54.z = actor->fwork[4] - actor->obj.pos.x; - sp54.y = actor->fwork[5] - actor->obj.pos.y; - sp54.x = actor->fwork[6] - actor->obj.pos.z; + xPos = this->fwork[4] - this->obj.pos.x; + yPos = this->fwork[5] - this->obj.pos.y; + zPos = this->fwork[6] - this->obj.pos.z; - if (((actor->index + gGameFrameCount) % 8) == 0) { - actor->fwork[19] = Math_RadToDeg(Math_Atan2F(sp54.z, sp54.x)); - actor->fwork[20] = Math_RadToDeg(Math_Atan2F(sp54.y, sqrtf(SQ(sp54.z) + SQ(sp54.x)))); + if (((this->index + gGameFrameCount) % 8) == 0) { + this->fwork[19] = Math_RadToDeg(Math_Atan2F(xPos, zPos)); + this->fwork[20] = Math_RadToDeg(Math_Atan2F(yPos, sqrtf(SQ(xPos) + SQ(zPos)))); } - var_fv0 = actor->fwork[20]; + targetAngle2 = this->fwork[20]; - temp_v0 = Training_80198DCC(actor, sinRotY, cosRotY); - if (temp_v0 != 0) { - var_fv0 += 40.0f * (f32) temp_v0; - if (var_fv0 >= 360.0f) { - var_fv0 -= 360.0f; + enemyNearObstacle = Training_EnemyObstacleCheck(this, sinRotY, cosRotY); + if (enemyNearObstacle) { + targetAngle2 += 40.0f * (f32) enemyNearObstacle; + if (targetAngle2 >= 360.0f) { + targetAngle2 -= 360.0f; } - if (var_fv0 < 0.0f) { - var_fv0 += 360.0f; + if (targetAngle2 < 0.0f) { + targetAngle2 += 360.0f; } - } else if ((actor->obj.pos.y < (gGroundHeight + 50.0f)) && (var_fv0 > 180.0f)) { - var_fv0 = 0.0f; - actor->rot_0F4.x = 0.0f; + } else if ((this->obj.pos.y < (gGroundHeight + 50.0f)) && (targetAngle2 > 180.0f)) { + targetAngle2 = 0.0f; + this->rot_0F4.x = 0.0f; } - Math_SmoothStepToAngle(&actor->rot_0F4.x, var_fv0, 0.5f, 1.0f, 0.0001f); - temp_fv1 = Math_SmoothStepToAngle(&actor->rot_0F4.y, actor->fwork[19], 0.5f, 1.0f, 0.0001f) * 30.0f; + Math_SmoothStepToAngle(&this->rot_0F4.x, targetAngle2, 0.5f, 1.0f, 0.0001f); + angle = Math_SmoothStepToAngle(&this->rot_0F4.y, this->fwork[19], 0.5f, 1.0f, 0.0001f) * 30.0f; - if (temp_fv1 < 0.0f) { - var_fv0_2 = temp_fv1 * -1.0f; + if (angle < 0.0f) { + targetAngle = angle * -1.0f; } else { - var_fv0_2 = 360.0f - temp_fv1; + targetAngle = 360.0f - angle; } - Math_SmoothStepToAngle(&actor->obj.rot.z, var_fv0_2, 0.1f, 3.0f, 0.01f); + Math_SmoothStepToAngle(&this->obj.rot.z, targetAngle, 0.1f, 3.0f, 0.01f); - actor->obj.rot.x = -actor->rot_0F4.x; - actor->obj.rot.y = actor->rot_0F4.y; + this->obj.rot.x = -this->rot_0F4.x; + this->obj.rot.y = this->rot_0F4.y; - actor->vel.x = actor->fwork[13] + (sinRotY * (cosRotX * 35.0f)); - actor->vel.y = actor->fwork[14] + (-sinRotX * 35.0f); - actor->vel.z = actor->fwork[12] + (cosRotY * (cosRotX * 35.0f)); + this->vel.x = this->fwork[13] + (sinRotY * (cosRotX * 35.0f)); + this->vel.y = this->fwork[14] + (-sinRotX * 35.0f); + this->vel.z = this->fwork[12] + (cosRotY * (cosRotX * 35.0f)); - actor->fwork[13] -= (actor->fwork[13] * 0.1f); - actor->fwork[14] -= (actor->fwork[14] * 0.1f); - actor->fwork[12] -= (actor->fwork[12] * 0.1f); + this->fwork[13] -= (this->fwork[13] * 0.1f); + this->fwork[14] -= (this->fwork[14] * 0.1f); + this->fwork[12] -= (this->fwork[12] * 0.1f); - if ((actor->obj.pos.y < gGroundHeight + 40.0f) && (actor->vel.y < 0.0f)) { - actor->obj.pos.y = gGroundHeight + 40.0f; - actor->vel.y = 0.0f; + if ((this->obj.pos.y < gGroundHeight + 40.0f) && (this->vel.y < 0.0f)) { + this->obj.pos.y = gGroundHeight + 40.0f; + this->vel.y = 0.0f; } - ActorAllRange_ApplyDamage(actor); + ActorAllRange_ApplyDamage(this); - radarMark = &gRadarMarks[actor->index]; + radarMark = &gRadarMarks[this->index]; radarMark->status = 1; - radarMark->type = actor->aiType; - radarMark->pos.x = actor->obj.pos.x; - radarMark->pos.y = actor->obj.pos.y; - radarMark->pos.z = actor->obj.pos.z; - radarMark->yRot = actor->rot_0F4.y + 180.0f; + radarMark->type = this->aiType; + radarMark->pos.x = this->obj.pos.x; + radarMark->pos.y = this->obj.pos.y; + radarMark->pos.z = this->obj.pos.z; + radarMark->yRot = this->rot_0F4.y + 180.0f; - if (actor->iwork[8] != 0) { - actor->iwork[8]--; + if (this->iwork[8] != 0) { + this->iwork[8]--; } } -typedef struct { - u16* msg; - u16 unk; -} UnkMsg_D_i1_8019AE50; +typedef struct TrainingMessage { + /* 0x00 */ u16* msg; + /* 0x04 */ u16 msgTimer; +} TrainingMessage; -UnkMsg_D_i1_8019AE50 D_i1_8019AE50[] = { +TrainingMessage sTrainingMessages[] = { { gMsg_ID_23028, 224 }, { gMsg_ID_23029, 160 }, { gMsg_ID_23030, 224 }, { gMsg_ID_23031, 256 }, { gMsg_ID_23016, 160 }, { gMsg_ID_23024, 160 }, { gMsg_ID_23019, 256 }, { gMsg_ID_23015, 160 }, { gMsg_ID_23017, 160 }, { gMsg_ID_23025, 160 }, { gMsg_ID_23002, 160 }, { gMsg_ID_23004, 160 }, @@ -183,53 +183,53 @@ UnkMsg_D_i1_8019AE50 D_i1_8019AE50[] = { { gMsg_ID_20330, 0 }, { gMsg_ID_23026, 256 }, { gMsg_ID_23032, 256 }, { NULL, -1 }, }; -void Training_8019949C(void) { +void Training_SpawnEnemies(void) { s32 i; - Actor* actor; - Vec3f sp44; - Vec3f sp38; - s32 var_v1 = 1; + ActorAllRange* enemy; + Vec3f src; + Vec3f dest; + s32 aiTypeIndex; + aiTypeIndex = 1; if (gHitCount >= 100) { - var_v1 = 0; + aiTypeIndex = 0; } if (((gGameFrameCount % 4) == 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { - sp44.x = 0.0f; - sp44.y = 0.0f; - sp44.z = -15000.0f; + src.x = 0.0f; + src.y = 0.0f; + src.z = -15000.0f; - for (i = var_v1, actor = &gActors[i + 10]; i < 16; i++, actor++) { - if (actor->obj.status == OBJ_FREE) { - Actor_Initialize(actor); + for (i = aiTypeIndex, enemy = &gActors[i + 10]; i < 16; i++, enemy++) { + if (enemy->obj.status == OBJ_FREE) { + Actor_Initialize(enemy); - actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_ALLRANGE; + enemy->obj.status = OBJ_ACTIVE; + enemy->obj.id = OBJ_ACTOR_ALLRANGE; - Matrix_RotateY(gCalcMatrix, gGameFrameCount * 6.0f * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, (gGameFrameCount * 6.0f) * M_DTOR, MTXF_NEW); + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); + enemy->obj.pos.x = dest.x; + enemy->obj.pos.y = 2000.0f; + enemy->obj.pos.z = dest.z; - actor->obj.pos.x = sp38.x; - actor->obj.pos.y = 2000.0f; - actor->obj.pos.z = sp38.z; + enemy->rot_0F4.y = gGameFrameCount * 6.0f; + enemy->aiType = i + AI360_ENEMY; + enemy->health = 24; + enemy->drawShadow = enemy->iwork[11] = 1; + enemy->timer_0C2 = 30; - actor->rot_0F4.y = gGameFrameCount * 6.0f; - actor->aiType = i + AI360_10; - actor->health = 24; - actor->drawShadow = actor->iwork[11] = 1; - actor->timer_0C2 = 30; + Object_SetInfo(&enemy->info, enemy->obj.id); - Object_SetInfo(&actor->info, actor->obj.id); - - AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, enemy->sfxSource, 4); if ((i + 10) == 10) { - actor->aiIndex = AI360_FOX; - actor->health = 50; + enemy->aiIndex = AI360_FOX; + enemy->health = 50; } else { - actor->aiIndex = -1; - actor->info.action = (ObjectFunc) Training_80199024; + enemy->aiIndex = -1; + enemy->info.action = (ObjectFunc) Training_Enemy_Update; } break; } @@ -241,12 +241,12 @@ void Training_8019949C(void) { } if (gTraining360MsgTimer == 0) { - if (D_i1_8019AE50[gTraining360MsgIndex].msg == 0) { + if (sTrainingMessages[gTraining360MsgIndex].msg == NULL) { gTraining360MsgIndex = 1; } - if (D_i1_8019AE50[gTraining360MsgIndex].unk != 0) { - Radio_PlayMessage(D_i1_8019AE50[gTraining360MsgIndex].msg, RCID_TR); - gTraining360MsgTimer = D_i1_8019AE50[gTraining360MsgIndex].unk; + if (sTrainingMessages[gTraining360MsgIndex].msgTimer != 0) { + Radio_PlayMessage(sTrainingMessages[gTraining360MsgIndex].msg, RCID_TR); + gTraining360MsgTimer = sTrainingMessages[gTraining360MsgIndex].msgTimer; } else { gCallTimer = 80; gTraining360MsgTimer = 320; diff --git a/src/overlays/ovl_i1/fox_ve1.c b/src/overlays/ovl_i1/fox_ve1.c index f87fb53a..117b5330 100644 --- a/src/overlays/ovl_i1/fox_ve1.c +++ b/src/overlays/ovl_i1/fox_ve1.c @@ -308,7 +308,7 @@ void Venom1_BossTrigger4_Update(Ve1BossTrigger4* this) { } } -void Venom1_801924A8(Scenery* scenery) { +void Venom1_Scenery127_Update(Scenery* scenery) { switch (scenery->state) { case 0: if (gPlayer[0].pos.z < scenery->obj.pos.z) { @@ -323,10 +323,10 @@ void Venom1_801924A8(Scenery* scenery) { } } -void Venom1_8019250C(Actor* actor) { +void Venom1_8019250C(Actor* this) { } -void Venom1_80192518(Actor* actor) { +void Venom1_Actor280_Update(Actor280* this) { Scenery* scenery; f32 var_ft4; f32 var_ft5; @@ -336,18 +336,18 @@ void Venom1_80192518(Actor* actor) { f32 temp_fv1_2; Effect* effect; - if (actor->dmgType == DMG_BEAM) { - actor->dmgType = DMG_NONE; - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_REFLECT); + if (this->dmgType == DMG_BEAM) { + this->dmgType = DMG_NONE; + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_REFLECT); } - if ((actor->state == 1) || (actor->state == 2) || (actor->state == 3)) { - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, MTXF_APPLY); + if ((this->state == 1) || (this->state == 2) || (this->state == 3)) { + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); } - switch (actor->state) { + switch (this->state) { case 0: case 4: break; @@ -361,8 +361,8 @@ void Venom1_80192518(Actor* actor) { for (i = 0; i < ARRAY_COUNT(gScenery); i++, scenery++) { if ((scenery->obj.id == OBJ_SCENERY_128) || (scenery->obj.id == OBJ_SCENERY_129) || (scenery->obj.id == OBJ_SCENERY_130)) { - if (((actor->obj.pos.z + 1100.0f - scenery->obj.pos.z) < 2200.0f) && - ((actor->obj.pos.z + 1100.0f - scenery->obj.pos.z) > 0.0f)) { + if (((this->obj.pos.z + 1100.0f - scenery->obj.pos.z) < 2200.0f) && + ((this->obj.pos.z + 1100.0f - scenery->obj.pos.z) > 0.0f)) { switch (scenery->obj.id) { case OBJ_SCENERY_128: case OBJ_SCENERY_130: @@ -378,32 +378,32 @@ void Venom1_80192518(Actor* actor) { } } } - actor->fwork[0] = 0.0f; + this->fwork[0] = 0.0f; - if ((actor->obj.pos.x + var_ft4) < 0.0f) { - actor->fwork[1] = 896.0f - (var_ft4 - var_ft5 - actor->obj.pos.x); - actor->obj.pos.x = var_ft4 - var_ft5; + if ((this->obj.pos.x + var_ft4) < 0.0f) { + this->fwork[1] = 896.0f - (var_ft4 - var_ft5 - this->obj.pos.x); + this->obj.pos.x = var_ft4 - var_ft5; } else { - actor->fwork[1] = 896.0f + (var_ft4 + var_ft5 - actor->obj.pos.x); - actor->obj.pos.x = var_ft4 + var_ft5; + this->fwork[1] = 896.0f + (var_ft4 + var_ft5 - this->obj.pos.x); + this->obj.pos.x = var_ft4 + var_ft5; } - actor->timer_0BC = actor->iwork[2]; - AUDIO_PLAY_SFX(NA_SE_OB_POLE_MOVE, actor->sfxSource, 0); - actor->state = 2; + this->timer_0BC = this->iwork[2]; + AUDIO_PLAY_SFX(NA_SE_OB_POLE_MOVE, this->sfxSource, 0); + this->state = 2; case 2: - if (actor->timer_0BC == 0) { - src.x = temp_fv1_2 = Math_SmoothStepToF(&actor->fwork[0], actor->fwork[1], 0.7f, 80.0f, 0.01f); + if (this->timer_0BC == 0) { + src.x = temp_fv1_2 = Math_SmoothStepToF(&this->fwork[0], this->fwork[1], 0.7f, 80.0f, 0.01f); src.y = 0.0f; src.z = 0.0f; Matrix_MultVec3f(gCalcMatrix, &src, &dest); - actor->obj.pos.x += dest.x; - actor->obj.pos.y += dest.y; - actor->obj.pos.z += dest.z; + this->obj.pos.x += dest.x; + this->obj.pos.y += dest.y; + this->obj.pos.z += dest.z; effect = func_effect_8007783C(OBJ_EFFECT_394); @@ -412,9 +412,9 @@ void Venom1_80192518(Actor* actor) { effect->unk_78 = effect->unk_7A; effect->obj.status = OBJ_ACTIVE; - effect->obj.pos.x = RAND_FLOAT_CENTERED(3.0f) + actor->obj.pos.x; - effect->obj.pos.y = RAND_FLOAT_CENTERED(3.0f) + actor->obj.pos.y; - effect->obj.pos.z = RAND_FLOAT_CENTERED(3.0f) + actor->obj.pos.z + 80.0f; + effect->obj.pos.x = RAND_FLOAT_CENTERED(3.0f) + this->obj.pos.x; + effect->obj.pos.y = RAND_FLOAT_CENTERED(3.0f) + this->obj.pos.y; + effect->obj.pos.z = RAND_FLOAT_CENTERED(3.0f) + this->obj.pos.z + 80.0f; effect->scale2 = 8.0f; @@ -431,78 +431,79 @@ void Venom1_80192518(Actor* actor) { effect->unk_60.z = -effect->unk_60.z; } - if ((actor->iwork[0] % 2) != 0) { + if ((this->iwork[0] % 2) != 0) { effect->vel.y = -effect->vel.y; } } if (fabs(temp_fv1_2) <= 5.0) { - actor->timer_0BE = 30; - actor->state++; - actor->fwork[2] = actor->obj.pos.x; - actor->fwork[3] = actor->obj.pos.y; - actor->fwork[4] = actor->obj.pos.z; + this->timer_0BE = 30; + this->state++; + this->fwork[2] = this->obj.pos.x; + this->fwork[3] = this->obj.pos.y; + this->fwork[4] = this->obj.pos.z; } } break; case 3: - src.x = __sinf((((30 - actor->timer_0BE) % 10) / 10.0f) * M_PI * 2) * 5.0f; + src.x = __sinf((((30 - this->timer_0BE) % 10) / 10.0f) * M_PI * 2) * 5.0f; src.y = 0.0f; src.z = 0.0f; Matrix_MultVec3f(gCalcMatrix, &src, &dest); - actor->obj.pos.x = actor->fwork[2] + dest.x; - actor->obj.pos.y = actor->fwork[3] + dest.y; - actor->obj.pos.z = actor->fwork[4] + dest.z; + this->obj.pos.x = this->fwork[2] + dest.x; + this->obj.pos.y = this->fwork[3] + dest.y; + this->obj.pos.z = this->fwork[4] + dest.z; - if (actor->timer_0BE == 0) { - actor->state++; + if (this->timer_0BE == 0) { + this->state++; } break; } - actor->iwork[0]++; + this->iwork[0]++; } -void Venom1_80192AA4(Actor* actor) { +void Venom1_80192AA4(Actor* this) { static Vec3f D_i1_80199FFC = { 0.0f, 460.0f, 0.0f }; Vec3f src; Vec3f dest; f32 y; - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); - if ((actor->obj.rot.y <= 30.0f) || (actor->obj.rot.y >= 330.0f)) { + if ((this->obj.rot.y <= 30.0f) || (this->obj.rot.y >= 330.0f)) { for (D_i1_80199FFC.x = -80.0f; D_i1_80199FFC.x <= 80.0f; D_i1_80199FFC.x += 40.0f) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_i1_80199FFC, &dest); } } else { src.z = 0.0f; src.x = -80.0f; - if (actor->obj.rot.y > 90.0f) { + if (this->obj.rot.y > 90.0f) { src.x = 80.0f; } for (y = 0.0f; y <= 450.0f; y += 50.0f) { - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); src.y = y; Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); } } } -void Venom1_80192CB0(Actor* actor) { - actor->iwork[0] = actor->obj.rot.x; - actor->obj.rot.x = 0.0f; +void Venom1_80192CB0(Actor* this) { + this->iwork[0] = this->obj.rot.x; + this->obj.rot.x = 0.0f; } -void Venom1_80192CD4(Actor* actor) { +// Actors OBJ_ACTOR_281 & OBJ_ACTOR_282 +void Venom1_Doodad_Update(Actor* actor) { if (actor->dmgType == DMG_BEAM) { actor->dmgType = DMG_NONE; - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_REFLECT); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_REFLECT); } if (actor->iwork[1] > 0) { @@ -543,16 +544,16 @@ void Venom1_80192CD4(Actor* actor) { } } -void Venom1_80192E2C(Actor* actor) { +void Venom1_Actor281_Draw(Actor281* this) { Matrix_Scale(gGfxMatrix, 1.0f, 0.5f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_VE1_901DA50); } -void Venom1_80192EA4(Actor* actor) { +void Venom1_80192EA4(Actor* this) { } -void Venom1_80192EB0(Actor* actor) { +void Venom1_Actor283_Update(Actor283* this) { Scenery* scenery; Vec3f sp50; Vec3f sp44; @@ -561,14 +562,15 @@ void Venom1_80192EB0(Actor* actor) { s32 i; f32 var_ft4; - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); - switch (actor->state) { + switch (this->state) { case 0: case 4: break; + case 1: var_ft4 = 0.0f; scenery = gScenery; @@ -576,37 +578,37 @@ void Venom1_80192EB0(Actor* actor) { for (i = 0; i < ARRAY_COUNT(gScenery); i++, scenery++) { if (((scenery->obj.id == OBJ_SCENERY_128) || (scenery->obj.id == OBJ_SCENERY_129) || (scenery->obj.id == OBJ_SCENERY_130)) && - ((actor->obj.pos.z + 1100.0f - scenery->obj.pos.z) < 2200.0f) && - ((actor->obj.pos.z + 1100.0f - scenery->obj.pos.z) > 0.0f)) { + ((this->obj.pos.z + 1100.0f - scenery->obj.pos.z) < 2200.0f) && + ((this->obj.pos.z + 1100.0f - scenery->obj.pos.z) > 0.0f)) { var_ft4 = scenery->obj.pos.y; break; } } - actor->fwork[0] = 0.0f; - actor->fwork[1] = 1237.0f - (var_ft4 - actor->obj.pos.y); - actor->obj.pos.y = var_ft4 + 1.0f; - actor->timer_0BC = actor->iwork[1]; - AUDIO_PLAY_SFX(NA_SE_OB_POLE_MOVE, actor->sfxSource, 0); - actor->state = 2; + this->fwork[0] = 0.0f; + this->fwork[1] = 1237.0f - (var_ft4 - this->obj.pos.y); + this->obj.pos.y = var_ft4 + 1.0f; + this->timer_0BC = this->iwork[1]; + AUDIO_PLAY_SFX(NA_SE_OB_POLE_MOVE, this->sfxSource, 0); + this->state = 2; case 2: - if (actor->timer_0BC == 0) { - sp50.y = sp40 = Math_SmoothStepToF(&actor->fwork[0], actor->fwork[1], 0.7f, 80.0f, 0.01f); + if (this->timer_0BC == 0) { + sp50.y = sp40 = Math_SmoothStepToF(&this->fwork[0], this->fwork[1], 0.7f, 80.0f, 0.01f); sp50.x = 0.0f; sp50.z = 0.0f; Matrix_MultVec3f(gCalcMatrix, &sp50, &sp44); - actor->obj.pos.x += sp44.x; - actor->obj.pos.y += sp44.y; - actor->obj.pos.z += sp44.z; + this->obj.pos.x += sp44.x; + this->obj.pos.y += sp44.y; + this->obj.pos.z += sp44.z; effect = func_effect_8007783C(OBJ_EFFECT_394); if (effect != NULL) { effect->unk_7A = 11; effect->unk_78 = effect->unk_7A; effect->obj.status = OBJ_ACTIVE; - effect->obj.pos.x = actor->obj.pos.x + RAND_FLOAT_CENTERED(3.0f); - effect->obj.pos.y = actor->obj.pos.y + RAND_FLOAT_CENTERED(3.0f); - effect->obj.pos.z = actor->obj.pos.z + RAND_FLOAT_CENTERED(3.0f) + 80.0f; + effect->obj.pos.x = this->obj.pos.x + RAND_FLOAT_CENTERED(3.0f); + effect->obj.pos.y = this->obj.pos.y + RAND_FLOAT_CENTERED(3.0f); + effect->obj.pos.z = this->obj.pos.z + RAND_FLOAT_CENTERED(3.0f) + 80.0f; effect->scale2 = 8.0f; effect->obj.rot.z = RAND_FLOAT(360.0f); effect->vel.x = RAND_FLOAT_CENTERED(5.0f); @@ -617,74 +619,80 @@ void Venom1_80192EB0(Actor* actor) { if (Rand_ZeroOne() < 0.5f) { effect->unk_60.z = -effect->unk_60.z; } - if ((actor->iwork[0] % 2) != 0) { + if ((this->iwork[0] % 2) != 0) { effect->vel.y = -effect->vel.y; } } if (fabs(sp40) <= 5.0) { - actor->timer_0BE = 30; - actor->state++; - actor->fwork[2] = actor->obj.pos.x; - actor->fwork[3] = actor->obj.pos.y; - actor->fwork[4] = actor->obj.pos.z; + this->timer_0BE = 30; + this->state++; + this->fwork[2] = this->obj.pos.x; + this->fwork[3] = this->obj.pos.y; + this->fwork[4] = this->obj.pos.z; } } break; + case 3: sp50.x = 0.0f; - sp50.y = __sinf((((30 - actor->timer_0BE) % 10) / 10.0f) * M_PI * 2) * 5.0f; + sp50.y = __sinf((((30 - this->timer_0BE) % 10) / 10.0f) * M_PI * 2) * 5.0f; sp50.z = 0.0f; + Matrix_MultVec3f(gCalcMatrix, &sp50, &sp44); - actor->obj.pos.x = actor->fwork[2] + sp44.x; - actor->obj.pos.y = actor->fwork[3] + sp44.y; - actor->obj.pos.z = actor->fwork[4] + sp44.z; - if (actor->timer_0BE == 0) { - actor->state++; + + this->obj.pos.x = this->fwork[2] + sp44.x; + this->obj.pos.y = this->fwork[3] + sp44.y; + this->obj.pos.z = this->fwork[4] + sp44.z; + + if (this->timer_0BE == 0) { + this->state++; } break; } - if (actor->dmgType == DMG_BEAM) { - actor->dmgType = DMG_NONE; - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_REFLECT); + + if (this->dmgType == DMG_BEAM) { + this->dmgType = DMG_NONE; + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_REFLECT); } - actor->iwork[0]++; + this->iwork[0]++; } -void Venom1_801933B4(Actor* actor) { - actor->scale = -1.0f; - actor->obj.pos.y += 488.0f; +void Venom1_801933B4(Actor* this) { + this->scale = -1.0f; + this->obj.pos.y += 488.0f; } -void Venom1_801933DC(Actor* actor) { +void Venom1_Actor284_Update(Actor284* this) { f32* hitboxData; - if (actor->dmgType == DMG_BEAM) { - actor->dmgType = DMG_NONE; - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 0); + if (this->dmgType == DMG_BEAM) { + this->dmgType = DMG_NONE; + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 0); } - if ((actor->animFrame == 38) || (actor->animFrame == 58)) { - AUDIO_PLAY_SFX(NA_SE_OB_ARM_SWING, actor->sfxSource, 0); + if ((this->animFrame == 38) || (this->animFrame == 58)) { + AUDIO_PLAY_SFX(NA_SE_OB_ARM_SWING, this->sfxSource, 0); } - Animation_GetFrameData(&D_VE1_900D098, actor->animFrame, actor->vwork); + Animation_GetFrameData(&D_VE1_900D098, this->animFrame, this->vwork); - if (actor->animFrame < (Animation_GetFrameCount(&D_VE1_900D098) - 1)) { - actor->animFrame++; + if (this->animFrame < (Animation_GetFrameCount(&D_VE1_900D098) - 1)) { + this->animFrame++; } else { - actor->animFrame = 0; + this->animFrame = 0; } - hitboxData = actor->info.hitbox; - hitboxData[1 + (10 * 0) + 7] = actor->vwork[3].y; - hitboxData[1 + (10 * 1) + 7] = -actor->vwork[2].y; + + hitboxData = this->info.hitbox; + hitboxData[1 + (10 * 0) + 7] = this->vwork[3].y; + hitboxData[1 + (10 * 1) + 7] = -this->vwork[2].y; } -void Venom1_801934D0(Actor* actor) { +void Venom1_Actor284_Draw(Actor* this) { Matrix_Translate(gGfxMatrix, 0.0f, -488.0f, 0.0f, MTXF_APPLY); - Animation_DrawSkeleton(0, D_VE1_900D164, actor->vwork, NULL, NULL, actor, &gIdentityMatrix); + Animation_DrawSkeleton(0, D_VE1_900D164, this->vwork, NULL, NULL, this, &gIdentityMatrix); } -void Venom1_80193540(Scenery* scenery) { +void Venom1_Scenery52_Update(Scenery* scenery) { if (((gPlayer[0].trueZpos - scenery->obj.pos.z) <= 3500.0f) && ((gGameFrameCount % 4) == 0)) { func_effect_8007C120(scenery->obj.pos.x, scenery->obj.pos.y, scenery->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.2f, 10); } @@ -821,10 +829,13 @@ void Venom1_Boss319_Init(Boss319* this) { s32 j; gGroundClipMode = 1; + D_i1_8019C0B8 = 0; D_i1_8019C0BC = 0; D_i1_8019C0C0 = 0; + gBossActive = true; + this->drawShadow = true; this->fwork[2] = D_i1_8019A04C[this->swork[13]][0]; this->fwork[14] = D_i1_8019A04C[this->swork[13]][1]; @@ -853,12 +864,14 @@ void Venom1_Boss319_Init(Boss319* this) { D_i1_8019B838[i].unk_74 = D_i1_8019B838[i].unk_78 = 0.0f; D_i1_8019B838[i].unk_7C = 0; } + this->fwork[11] = 1.0f; + for (i = 0; i < 33U; i++) { D_i1_8019B7F0[i] = 0; } - var_v0 = 0; - for (i = 0; i < ARRAY_COUNTU(D_i1_8019B838); i++) { + + for (var_v0 = 0, i = 0; i < ARRAY_COUNTU(D_i1_8019B838); i++) { var_v0 += D_i1_8019A820[i].unk_02; } this->swork[29] = this->swork[30] = var_v0 + 100; @@ -886,7 +899,9 @@ bool Venom1_801937F4(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* t rot->x -= 360.0f; } } + override = false; + for (i = 0; i < 18; i++) { if (limbIndex == D_i1_8019A748[i].limb) { Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, MTXF_APPLY); @@ -895,6 +910,7 @@ bool Venom1_801937F4(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* t Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, MTXF_APPLY); Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); + if (!(D_i1_8019B838[D_i1_8019A748[i].index].unk_7C & 1)) { if (D_i1_8019B838[D_i1_8019A748[i].index].unk_00 > 0) { if ((D_i1_8019B838[D_i1_8019A748[i].index].unk_02[2] & 2) == 2) { @@ -1047,8 +1063,10 @@ void Venom1_80193D64(s32 limbIndex, Vec3f* rot, void* thisx) { } break; } + RCP_SetupDL(&gMasterDisp, SETUPDL_64); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); + var_s6 = D_i1_8019A820; var_s7 = D_i1_8019B838; for (spBC = 0; spBC < ARRAY_COUNTU(D_i1_8019B838); spBC++, var_s6++, var_s7++) { @@ -2370,7 +2388,7 @@ void Venom1_80198594(Boss* boss) { } } -void Venom1_Boss_Draw(Boss* boss) { +void Venom1_Boss_Draw(Boss319* boss) { if (boss->swork[26] == 0) { Animation_DrawSkeleton(0, D_VE1_901C0F4, boss->vwork, Venom1_801937F4, Venom1_80193D64, boss, &gIdentityMatrix); } diff --git a/src/overlays/ovl_i2/fox_me.c b/src/overlays/ovl_i2/fox_me.c index 97262c6a..e30a1917 100644 --- a/src/overlays/ovl_i2/fox_me.c +++ b/src/overlays/ovl_i2/fox_me.c @@ -43,180 +43,179 @@ Vec3f D_i2_80195610[] = { { -2000.0f, -1000.0f, 0.0f }, }; -void Meteo_80187530(Actor* actor) { - if (actor->dmgType == DMG_BEAM) { - actor->dmgType = DMG_NONE; - func_effect_8007A6F0(&actor->obj.pos, NA_SE_ROCK_REFLECT); +void Meteo_ReflectDamage(Actor* this) { + if (this->dmgType == DMG_BEAM) { + this->dmgType = DMG_NONE; + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_ROCK_REFLECT); } } -void Meteo_8018756C(Actor* actor) { +void Meteo_Actor181_Update(Actor181* this) { Vec3f vec; - if (actor->dmgType != DMG_NONE) { - actor->dmgType = DMG_NONE; - actor->health -= actor->damage; - if (actor->health <= 0) { - actor->obj.status = OBJ_DYING; + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + this->health -= this->damage; + if (this->health <= 0) { + this->obj.status = OBJ_DYING; } } - actor->obj.rot.y += 2.0f; - actor->obj.rot.x += 1.3f; + this->obj.rot.y += 2.0f; + this->obj.rot.x += 1.3f; - vec.x = actor->vel.x; - vec.y = actor->vel.y; - vec.z = actor->vel.z; + vec.x = this->vel.x; + vec.y = this->vel.y; + vec.z = this->vel.z; - if ((Object_CheckCollision(actor->index, &actor->obj.pos, &vec, 0) != 0) || - (actor->obj.pos.y < (gGroundHeight + 20.0f))) { - actor->obj.status = OBJ_DYING; + if ((Object_CheckCollision(this->index, &this->obj.pos, &vec, 0) != 0) || + (this->obj.pos.y < (gGroundHeight + 20.0f))) { + this->obj.status = OBJ_DYING; } - Meteo_80187530(actor); + Meteo_ReflectDamage(this); } -void Meteo_80187650(Actor* actor) { +void Meteo_Actor182_Update(Actor182* this) { Vec3f vec; - actor->obj.rot.y += 1.7f; - actor->obj.rot.x += 3.3f; - actor->unk_046 -= 15; + this->obj.rot.y += 1.7f; + this->obj.rot.x += 3.3f; + this->unk_046 -= 15; - if (actor->unk_046 < 0) { - actor->unk_046 = 0; + if (this->unk_046 < 0) { + this->unk_046 = 0; } - actor->unk_048 += 8; - if (actor->unk_048 > 995) { - actor->unk_048 = 995; + this->unk_048 += 8; + if (this->unk_048 > 995) { + this->unk_048 = 995; } - if ((actor->timer_0BC % 4U) == 1) { - func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 6.0f); + if ((this->timer_0BC % 4U) == 1) { + func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 6.0f); } - if (actor->dmgType != DMG_NONE) { - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); - func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f); - Object_Kill(&actor->obj, actor->sfxSource); + if (this->dmgType != DMG_NONE) { + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 10.0f); + Object_Kill(&this->obj, this->sfxSource); } - if (actor->timer_0C2 == 0) { - vec.x = actor->vel.x; - vec.y = actor->vel.y; - vec.z = actor->vel.z; - if ((Object_CheckCollision(actor->index, &actor->obj.pos, &vec, 0) != 0) || - (actor->obj.pos.y < (gGroundHeight + 20.0f))) { - func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f); - actor->obj.status = OBJ_DYING; + if (this->timer_0C2 == 0) { + vec.x = this->vel.x; + vec.y = this->vel.y; + vec.z = this->vel.z; + if ((Object_CheckCollision(this->index, &this->obj.pos, &vec, 0) != 0) || + (this->obj.pos.y < (gGroundHeight + 20.0f))) { + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 10.0f); + this->obj.status = OBJ_DYING; } } - - Meteo_80187530(actor); + Meteo_ReflectDamage(this); } -void Meteo_801877C4(Actor* actor) { - Vec3f sp44; - Vec3f sp38; +void Meteo_Actor187_Update(Actor187* this) { + Vec3f dest; + Vec3f src; - actor->obj.rot.z += 1.0f; + this->obj.rot.z += 1.0f; - Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, MTXF_NEW); + Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_NEW); - sp38.x = 0.0f; - sp38.y = -1100.0f; - sp38.z = 0.0f; + src.x = 0.0f; + src.y = -1100.0f; + src.z = 0.0f; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp38, &sp44); + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - actor->obj.pos.x = actor->fwork[0] + sp44.x; - actor->obj.pos.y = actor->fwork[1] + sp44.y; + this->obj.pos.x = this->fwork[0] + dest.x; + this->obj.pos.y = this->fwork[1] + dest.y; - if (actor->dmgType != DMG_NONE) { - Actor_Despawn(actor); - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); - Object_Kill(&actor->obj, actor->sfxSource); - func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z, 5.0f); - func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, 3.0f, 10); + if (this->dmgType != DMG_NONE) { + Actor_Despawn(this); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); + Object_Kill(&this->obj, this->sfxSource); + func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y + 30.0f, this->obj.pos.z, 5.0f); + func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y + 30.0f, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 3.0f, 10); } - if (actor->timer_0BC == 0) { - actor->timer_0BC = 40; - if (actor->obj.pos.z < (gPlayer[0].trueZpos - 1000.0f)) { - func_effect_8007F11C(OBJ_EFFECT_353, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 120.0f); + if (this->timer_0BC == 0) { + this->timer_0BC = 40; + if (this->obj.pos.z < (gPlayer[0].trueZpos - 1000.0f)) { + Effect_EnemyLaser(OBJ_EFFECT_ENEMY_LASER_1, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 120.0f); } } } -void Meteo_8018795C(Actor* actor) { +void Meteo_Actor186_Update(Actor186* this) { Vec3f vec; s32 pad[2]; - actor->obj.rot.y += 7.0f; - actor->obj.rot.x += 3.3f; + this->obj.rot.y += 7.0f; + this->obj.rot.x += 3.3f; - if (actor->dmgType != DMG_NONE) { - Actor_Despawn(actor); - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); - Object_Kill(&actor->obj, actor->sfxSource); - func_effect_8007D0E0(actor->obj.pos.x - actor->vel.x, actor->obj.pos.y, actor->obj.pos.z - actor->vel.z, 8.0f); - func_effect_8007BFFC(actor->obj.pos.x - actor->vel.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z - actor->vel.z, + if (this->dmgType != DMG_NONE) { + Actor_Despawn(this); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); + Object_Kill(&this->obj, this->sfxSource); + func_effect_8007D0E0(this->obj.pos.x - this->vel.x, this->obj.pos.y, this->obj.pos.z - this->vel.z, 8.0f); + func_effect_8007BFFC(this->obj.pos.x - this->vel.x, this->obj.pos.y + 30.0f, this->obj.pos.z - this->vel.z, 0.0f, 0.0f, 0.0f, 4.0f, 10); } - if (((gGameFrameCount % 8) == 0)) { - Math_Vec3fFromAngles(&vec, actor->obj.rot.x, actor->obj.rot.y, 100.0f); - func_effect_8007F04C(OBJ_EFFECT_353, actor->obj.pos.x + (vec.x * 3.0f), actor->obj.pos.y + (vec.y * 3.0f), - actor->obj.pos.z + (vec.z * 3.0f), actor->obj.rot.x, actor->obj.rot.y, actor->obj.rot.z, - 0.0f, 0.0f, 0.0f, vec.x, vec.y, vec.z, 1.0f); + if ((gGameFrameCount % 8) == 0) { + Math_Vec3fFromAngles(&vec, this->obj.rot.x, this->obj.rot.y, 100.0f); + func_effect_8007F04C(OBJ_EFFECT_ENEMY_LASER_1, this->obj.pos.x + (vec.x * 3.0f), + this->obj.pos.y + (vec.y * 3.0f), this->obj.pos.z + (vec.z * 3.0f), this->obj.rot.x, + this->obj.rot.y, this->obj.rot.z, 0.0f, 0.0f, 0.0f, vec.x, vec.y, vec.z, 1.0f); } } -void Meteo_80187B08(Actor* actor) { - actor->obj.rot.y += 7.0f; - actor->obj.rot.x += 3.3f; +void Meteo_80187B08(Actor186* this) { + this->obj.rot.y += 7.0f; + this->obj.rot.x += 3.3f; - actor->unk_046 -= 11; + this->unk_046 -= 11; - if (actor->unk_046 < 0) { - actor->unk_046 = 0; + if (this->unk_046 < 0) { + this->unk_046 = 0; } - actor->unk_048 += 4; - if (actor->unk_048 > 995) { - actor->unk_048 = 995; + this->unk_048 += 4; + if (this->unk_048 > 995) { + this->unk_048 = 995; } - if ((actor->timer_0BC & 3) == 0) { - func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 6.0f); + if ((this->timer_0BC % 4) == 0) { + func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 6.0f); } - if ((actor->dmgType != DMG_NONE) || (actor->timer_0BC == 0)) { - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); - Object_Kill(&actor->obj, actor->sfxSource); - func_effect_8007D0E0(actor->obj.pos.x - actor->vel.x, actor->obj.pos.y, actor->obj.pos.z - actor->vel.z, 8.0f); - func_effect_8007BFFC(actor->obj.pos.x - actor->vel.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z - actor->vel.z, + if ((this->dmgType != DMG_NONE) || (this->timer_0BC == 0)) { + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); + Object_Kill(&this->obj, this->sfxSource); + func_effect_8007D0E0(this->obj.pos.x - this->vel.x, this->obj.pos.y, this->obj.pos.z - this->vel.z, 8.0f); + func_effect_8007BFFC(this->obj.pos.x - this->vel.x, this->obj.pos.y + 30.0f, this->obj.pos.z - this->vel.z, 0.0f, 0.0f, 0.0f, 4.0f, 10); } } -void Meteo_80187C68(Actor* actor, f32 x, f32 y, f32 z, f32 arg4, f32 xRot, f32 yRot, s32 timerBC, s32 arg8, s32 objId) { - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = objId; +void Meteo_80187C68(Actor* this, f32 x, f32 y, f32 z, f32 arg4, f32 xRot, f32 yRot, s32 timerBC, s32 arg8, s32 objId) { + Actor_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = objId; - actor->obj.pos.x = x; - actor->obj.pos.y = y; - actor->obj.pos.z = z; + this->obj.pos.x = x; + this->obj.pos.y = y; + this->obj.pos.z = z; - actor->obj.rot.x = xRot; - actor->obj.rot.y = yRot; + this->obj.rot.x = xRot; + this->obj.rot.y = yRot; - actor->timer_0BC = timerBC; - actor->timer_0BE = 20; - actor->eventType = arg8; - actor->fwork[5] = arg4; - Object_SetInfo(&actor->info, actor->obj.id); + this->timer_0BC = timerBC; + this->timer_0BE = 20; + this->eventType = arg8; + this->fwork[5] = arg4; + Object_SetInfo(&this->info, this->obj.id); } void Meteo_80187D08(f32 x, f32 y, f32 z, f32 arg3, f32 xRot, f32 yRot, s32 arg6, s32 arg7, s32 objId) { @@ -230,24 +229,24 @@ void Meteo_80187D08(f32 x, f32 y, f32 z, f32 arg3, f32 xRot, f32 yRot, s32 arg6, } } -void Meteo_80187D98(Effect* effect, f32 x, f32 y, f32 z, f32 arg4, bool arg5) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_369; +void Meteo_80187D98(Effect369* this, f32 x, f32 y, f32 z, f32 arg4, bool arg5) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_369; - effect->obj.pos.x = x; - effect->obj.pos.y = y; - effect->obj.pos.z = z; + this->obj.pos.x = x; + this->obj.pos.y = y; + this->obj.pos.z = z; - effect->unk_60.z = arg4; - effect->unk_48 = arg5; - effect->obj.rot.x = 45.0f; + this->unk_60.z = arg4; + this->unk_48 = arg5; + this->obj.rot.x = 45.0f; if (arg5) { - effect->obj.rot.x = -45.0f; + this->obj.rot.x = -45.0f; } - Object_SetInfo(&effect->info, effect->obj.id); + Object_SetInfo(&this->info, this->obj.id); } void Meteo_80187E38(f32 x, f32 y, f32 z, f32 arg3) { @@ -283,27 +282,27 @@ void Meteo_80187E38(f32 x, f32 y, f32 z, f32 arg3) { } } -void Meteo_80187FF8(Effect* effect, f32 x, f32 y, f32 z) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_371; +void Meteo_80187FF8(Effect371* this, f32 x, f32 y, f32 z) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_371; - effect->obj.pos.x = x; - effect->obj.pos.y = y; - effect->obj.pos.z = z; + this->obj.pos.x = x; + this->obj.pos.y = y; + this->obj.pos.z = z; - effect->unk_44 = 128; - effect->vel.z = 50.0f; - effect->scale2 = 1.0f; - Object_SetInfo(&effect->info, effect->obj.id); + this->unk_44 = 128; + this->vel.z = 50.0f; + this->scale2 = 1.0f; + Object_SetInfo(&this->info, this->obj.id); } -void Meteo_80188088(Boss* boss) { +void Meteo_80188088(Boss297* this) { s32 i; for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { - Meteo_80187FF8(&gEffects[i], boss->obj.pos.x + 700.0f, boss->obj.pos.y, boss->obj.pos.z + 1235.0f); + Meteo_80187FF8(&gEffects[i], this->obj.pos.x + 700.0f, this->obj.pos.y, this->obj.pos.z + 1235.0f); AUDIO_PLAY_SFX(NA_SE_EN_RNG_BEAM_SHOT, gEffects[i].sfxSource, 4); break; } @@ -311,25 +310,25 @@ void Meteo_80188088(Boss* boss) { for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { - Meteo_80187FF8(&gEffects[i], boss->obj.pos.x - 700.0f, boss->obj.pos.y, boss->obj.pos.z + 1235.0f); + Meteo_80187FF8(&gEffects[i], this->obj.pos.x - 700.0f, this->obj.pos.y, this->obj.pos.z + 1235.0f); break; } } } -void Meteo_801881A8(Effect* effect, f32 x, f32 y, f32 z, f32 zRot, s32 arg5) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_370; +void Meteo_801881A8(Effect370* this, f32 x, f32 y, f32 z, f32 zRot, s32 arg5) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_370; - effect->obj.pos.x = x; - effect->obj.pos.y = y; - effect->obj.pos.z = z; + this->obj.pos.x = x; + this->obj.pos.y = y; + this->obj.pos.z = z; - effect->obj.rot.z = zRot; + this->obj.rot.z = zRot; - effect->state = arg5; - Object_SetInfo(&effect->info, effect->obj.id); + this->state = arg5; + Object_SetInfo(&this->info, this->obj.id); } void Meteo_80188228(f32 x, f32 y, f32 z, f32 zRot) { @@ -355,64 +354,66 @@ void Meteo_80188298(f32 x, f32 y, f32 z, f32 zRot) { } } -void Meteo_80188344(Boss* boss) { +void Meteo_Boss298_Update(Boss298* this) { Vec3f src; Vec3f dest; f32 temp; - if (boss->state < 5) { - boss->obj.pos.x = gBosses[0].obj.pos.x; - boss->obj.pos.y = gBosses[0].obj.pos.y; - boss->obj.pos.z = gBosses[0].obj.pos.z; - boss->obj.rot.x = gBosses[0].obj.rot.x; - boss->obj.rot.y = gBosses[0].obj.rot.y; - boss->obj.rot.z = gBosses[0].obj.rot.z + boss->rot_078.z + 45.0f + 180.0f; + if (this->state < 5) { + this->obj.pos.x = gBosses[0].obj.pos.x; + this->obj.pos.y = gBosses[0].obj.pos.y; + this->obj.pos.z = gBosses[0].obj.pos.z; + this->obj.rot.x = gBosses[0].obj.rot.x; + this->obj.rot.y = gBosses[0].obj.rot.y; + this->obj.rot.z = gBosses[0].obj.rot.z + this->rot_078.z + 45.0f + 180.0f; } - switch (boss->state) { + switch (this->state) { case 0: - boss->timer_050 = 150; - boss->rot_078.z += 2.5f; + this->timer_050 = 150; + this->rot_078.z += 2.5f; break; case 1: - temp = fabsf(90.0f - boss->rot_078.z) * 0.1f; + temp = fabsf(90.0f - this->rot_078.z) * 0.1f; if (temp > 2.5f) { temp = 2.5f; } - boss->rot_078.z += temp; + this->rot_078.z += temp; - if (boss->timer_050 == 0) { - boss->state = 2; - boss->dmgType = DMG_NONE; + if (this->timer_050 == 0) { + this->state = 2; + this->dmgType = DMG_NONE; } break; case 2: - if (boss->dmgType == DMG_BEAM) { - boss->dmgType = DMG_NONE; - boss->timer_054 = 5; - boss->swork[0] += 32; + if (this->dmgType == DMG_BEAM) { + this->dmgType = DMG_NONE; + this->timer_054 = 5; + this->swork[0] += 32; - Audio_SetTransposeAndPlaySfx(boss->sfxSource, NA_SE_EN_GRN_BEAM_CHARGE, boss->unk_04A); + Audio_SetTransposeAndPlaySfx(this->sfxSource, NA_SE_EN_GRN_BEAM_CHARGE, this->unk_04A); - boss->unk_04A++; - if (boss->unk_04A > 7) { - boss->unk_04A = 7; + this->unk_04A++; + if (this->unk_04A > 7) { + this->unk_04A = 7; } - if (boss->swork[0] >= 255) { - boss->unk_04A = 0; - Audio_KillSfxBySource(boss->sfxSource); - if (boss->swork[1] == 0) { - boss->swork[1]++; + if (this->swork[0] >= 255) { + this->unk_04A = 0; + + Audio_KillSfxBySource(this->sfxSource); + + if (this->swork[1] == 0) { + this->swork[1]++; Radio_PlayMessage(gMsg_ID_3315, RCID_PEPPY); } - boss->swork[0] = 0; + this->swork[0] = 0; - Matrix_RotateZ(gCalcMatrix, (boss->obj.rot.z - 45.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateZ(gCalcMatrix, (this->obj.rot.z - 45.0f) * M_DTOR, MTXF_NEW); src.x = 0.0f; src.y = 156.0f; @@ -420,57 +421,57 @@ void Meteo_80188344(Boss* boss) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - Meteo_80188298(boss->obj.pos.x + dest.x, boss->obj.pos.y + dest.y, boss->obj.pos.z + dest.z, - boss->obj.rot.z - 45.0f); - Meteo_80188228(boss->obj.pos.x - dest.x, boss->obj.pos.y - dest.y, boss->obj.pos.z + dest.z, - boss->obj.rot.z - 45.0f); - Meteo_80188228(boss->obj.pos.x + dest.y, boss->obj.pos.y - dest.x, boss->obj.pos.z + dest.z, - (boss->obj.rot.z - 45.0f) + 90.0f); + Meteo_80188298(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, + this->obj.rot.z - 45.0f); + Meteo_80188228(this->obj.pos.x - dest.x, this->obj.pos.y - dest.y, this->obj.pos.z + dest.z, + this->obj.rot.z - 45.0f); + Meteo_80188228(this->obj.pos.x + dest.y, this->obj.pos.y - dest.x, this->obj.pos.z + dest.z, + (this->obj.rot.z - 45.0f) + 90.0f); } } break; case 3: - boss->timer_050 = 30; - boss->state = 4; - boss->timer_05C = 15; - boss->swork[0] = 0; + this->timer_050 = 30; + this->state = 4; + this->timer_05C = 15; + this->swork[0] = 0; break; case 4: - if (boss->timer_050 == 0) { - func_effect_8007D2C8(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z + 500.0f, 30.0f); - func_effect_8007BFFC(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z + 500.0f, 0.0f, 0.0f, 0.0f, + if (this->timer_050 == 0) { + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 500.0f, 30.0f); + func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 500.0f, 0.0f, 0.0f, 0.0f, 20.0f, 30); - boss->state = 5; + this->state = 5; - boss->info.cullDistance = 1000.0f; + this->info.cullDistance = 1000.0f; - Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_GRN_BEAM_CHARGE); - AUDIO_PLAY_SFX(NA_SE_EN_MEBOSS_SHIELD, boss->sfxSource, 4); + Audio_KillSfxBySourceAndId(this->sfxSource, NA_SE_EN_GRN_BEAM_CHARGE); + AUDIO_PLAY_SFX(NA_SE_EN_MEBOSS_SHIELD, this->sfxSource, 4); } break; case 5: - boss->obj.rot.z -= 3.0f; - if (boss->vel.z < 5.0f) { - boss->vel.z = boss->vel.z + 1.0f; + this->obj.rot.z -= 3.0f; + if (this->vel.z < 5.0f) { + this->vel.z = this->vel.z + 1.0f; } break; } - if (boss->rot_078.z >= 360.0f) { - boss->rot_078.z -= 360.0f; + if (this->rot_078.z >= 360.0f) { + this->rot_078.z -= 360.0f; } - if (boss->rot_078.z < 0.0f) { - boss->rot_078.z += 360.0f; + if (this->rot_078.z < 0.0f) { + this->rot_078.z += 360.0f; } } -void Meteo_801887D0(Boss* boss) { +void Meteo_Boss298_Draw(Boss298* this) { s32 i; - if ((boss->timer_054 % 2) != 0) { + if ((this->timer_054 % 2) != 0) { RCP_SetupDL_27(); gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 255, 0, 255); } @@ -481,8 +482,8 @@ void Meteo_801887D0(Boss* boss) { RCP_SetupDL_64(); for (i = 1; i < 4; i++) { - if (boss->swork[0] != 0) { - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, boss->swork[0]); + if (this->swork[0] != 0) { + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->swork[0]); Matrix_Push(&gGfxMatrix); Matrix_RotateZ(gGfxMatrix, M_DTOR * 90.0f * i, MTXF_APPLY); Matrix_Translate(gGfxMatrix, 0.0f, 156.0f, 930.0f, MTXF_APPLY); @@ -534,24 +535,24 @@ void Meteo_Boss297_Init(Boss297* this) { AUDIO_PLAY_SFX(NA_SE_EN_BURNER_L, this->sfxSource, 4); } -void Meteo_80188B84(Effect* effect, f32 x, f32 y, f32 z, f32 xRot, f32 yRot, f32 arg6, f32 arg7) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_369; +void Meteo_80188B84(Effect369* this, f32 x, f32 y, f32 z, f32 xRot, f32 yRot, f32 arg6, f32 arg7) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_369; - effect->obj.pos.x = x; - effect->obj.pos.y = y; - effect->obj.pos.z = z; + this->obj.pos.x = x; + this->obj.pos.y = y; + this->obj.pos.z = z; - effect->obj.rot.x = xRot; - effect->obj.rot.y = yRot; - effect->unk_60.z = arg6; + this->obj.rot.x = xRot; + this->obj.rot.y = yRot; + this->unk_60.z = arg6; - effect->timer_50 = 20; - effect->scale2 = arg7; - effect->state = 1; - effect->unk_44 = 128; - Object_SetInfo(&effect->info, effect->obj.id); + this->timer_50 = 20; + this->scale2 = arg7; + this->state = 1; + this->unk_44 = 128; + Object_SetInfo(&this->info, this->obj.id); } void Meteo_80188C2C(f32 x, f32 y, f32 z, f32 xRot, f32 yRot, f32 arg5, f32 arg6) { @@ -565,33 +566,33 @@ void Meteo_80188C2C(f32 x, f32 y, f32 z, f32 xRot, f32 yRot, f32 arg5, f32 arg6) } } -void Meteo_80188CAC(Effect* effect) { +void Meteo_Effect369_Update(Effect369* this) { Vec3f src; Vec3f dest; - if (effect->state == 0) { - switch (effect->unk_48) { + if (this->state == 0) { + switch (this->unk_48) { case 0: - effect->obj.rot.x -= 15.0f; - if (effect->obj.rot.x <= -45.0f) { - effect->unk_48 = 1; + this->obj.rot.x -= 15.0f; + if (this->obj.rot.x <= -45.0f) { + this->unk_48 = 1; } break; case 1: - effect->obj.rot.x += 15.0f; - if (effect->obj.rot.x >= 45.0f) { - effect->unk_48 = 0; + this->obj.rot.x += 15.0f; + if (this->obj.rot.x >= 45.0f) { + this->unk_48 = 0; } break; } - effect->unk_44 = 255; - effect->scale2 = 1.0f; - effect->unk_60.z += 20.0f; + this->unk_44 = 255; + this->scale2 = 1.0f; + this->unk_60.z += 20.0f; - Matrix_RotateZ(gCalcMatrix, effect->unk_60.z * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, effect->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, this->unk_60.z * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; @@ -599,36 +600,36 @@ void Meteo_80188CAC(Effect* effect) { Matrix_MultVec3f(gCalcMatrix, &src, &dest); - effect->vel.x = dest.x; - effect->vel.y = dest.y; - effect->vel.z = dest.z; + this->vel.x = dest.x; + this->vel.y = dest.y; + this->vel.z = dest.z; - Meteo_80188C2C(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, effect->obj.rot.x, effect->obj.rot.y, - effect->unk_60.z, 1.0f); - } else if (effect->timer_50 == 0) { - Object_Kill(&effect->obj, effect->sfxSource); + Meteo_80188C2C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->obj.rot.x, this->obj.rot.y, + this->unk_60.z, 1.0f); + } else if (this->timer_50 == 0) { + Object_Kill(&this->obj, this->sfxSource); } - func_effect_8007A774(gPlayer, effect, 90.0f); + func_effect_8007A774(gPlayer, this, 90.0f); } -void Meteo_80188E8C(Effect* effect, f32 x, f32 y, f32 z, f32 xRot, f32 yRot, f32 zRot, f32 scale) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_370; +void Meteo_80188E8C(Effect370* this, f32 x, f32 y, f32 z, f32 xRot, f32 yRot, f32 zRot, f32 scale) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_370; - effect->obj.pos.x = x; - effect->obj.pos.y = y; - effect->obj.pos.z = z; + this->obj.pos.x = x; + this->obj.pos.y = y; + this->obj.pos.z = z; - effect->obj.rot.x = xRot; - effect->obj.rot.y = yRot; - effect->obj.rot.z = zRot; + this->obj.rot.x = xRot; + this->obj.rot.y = yRot; + this->obj.rot.z = zRot; - effect->scale2 = scale; - effect->state = 1; - effect->unk_44 = 128; - Object_SetInfo(&effect->info, effect->obj.id); + this->scale2 = scale; + this->state = 1; + this->unk_44 = 128; + Object_SetInfo(&this->info, this->obj.id); } void Meteo_80188F2C(f32 x, f32 y, f32 z, f32 xRot, f32 yRot, f32 arg5, f32 scale) { @@ -642,16 +643,16 @@ void Meteo_80188F2C(f32 x, f32 y, f32 z, f32 xRot, f32 yRot, f32 arg5, f32 scale } } -void Meteo_80188FAC(Effect* effect) { +void Meteo_Effect370_Update(Effect370* this) { Vec3f src; Vec3f dest; - if (effect->state != 1) { - effect->obj.rot.x = 10.0f; - effect->obj.rot.z += 20.0f; + if (this->state != 1) { + this->obj.rot.x = 10.0f; + this->obj.rot.z += 20.0f; - Matrix_RotateZ(gCalcMatrix, effect->obj.rot.z * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, effect->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; @@ -659,93 +660,93 @@ void Meteo_80188FAC(Effect* effect) { Matrix_MultVec3f(gCalcMatrix, &src, &dest); - effect->vel.x = dest.x; - effect->vel.y = dest.y; - effect->vel.z = dest.z; + this->vel.x = dest.x; + this->vel.y = dest.y; + this->vel.z = dest.z; if (((gGameFrameCount % 2) == 0)) { - Meteo_80188F2C(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, effect->obj.rot.x, - effect->obj.rot.y, effect->obj.rot.z, 5.0f); + Meteo_80188F2C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->obj.rot.x, this->obj.rot.y, + this->obj.rot.z, 5.0f); } } else { - effect->unk_44 -= 8; - if (effect->unk_44 < 0) { - Object_Kill(&effect->obj, effect->sfxSource); + this->unk_44 -= 8; + if (this->unk_44 < 0) { + Object_Kill(&this->obj, this->sfxSource); } } - func_effect_8007A774(gPlayer, effect, 60.0f); + func_effect_8007A774(gPlayer, this, 60.0f); } -void Meteo_80189114(Effect* effect) { +void Meteo_Effect371_Update(Effect371* this) { if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) { - Object_Kill(&effect->obj, effect->sfxSource); + Object_Kill(&this->obj, this->sfxSource); } - effect->scale2 += 0.5f; - if (effect->scale2 > 10.0f) { - effect->scale2 = 10.0f; + this->scale2 += 0.5f; + if (this->scale2 > 10.0f) { + this->scale2 = 10.0f; } - effect->obj.rot.z += 35.0f; - if (effect->obj.pos.x < gPlayer[0].pos.x) { - effect->obj.pos.x += 1.5f; - if (effect->vel.x < 40.0f) { - effect->vel.x += 2.0f; + this->obj.rot.z += 35.0f; + if (this->obj.pos.x < gPlayer[0].pos.x) { + this->obj.pos.x += 1.5f; + if (this->vel.x < 40.0f) { + this->vel.x += 2.0f; } } - if (gPlayer[0].pos.x < effect->obj.pos.x) { - effect->obj.pos.x -= 1.5f; - if (effect->vel.x > -40.0f) { - effect->vel.x -= 2.0f; + if (gPlayer[0].pos.x < this->obj.pos.x) { + this->obj.pos.x -= 1.5f; + if (this->vel.x > -40.0f) { + this->vel.x -= 2.0f; } } - if (effect->obj.pos.y < gPlayer[0].pos.y) { - effect->obj.pos.y += 1.5f; - if (effect->vel.y < 40.0f) { - effect->vel.y += 2.0f; + if (this->obj.pos.y < gPlayer[0].pos.y) { + this->obj.pos.y += 1.5f; + if (this->vel.y < 40.0f) { + this->vel.y += 2.0f; } } - if (gPlayer[0].pos.y < effect->obj.pos.y) { - effect->obj.pos.y -= 1.5f; - if (effect->vel.y > -40.0f) { - effect->vel.y -= 2.0f; + if (gPlayer[0].pos.y < this->obj.pos.y) { + this->obj.pos.y -= 1.5f; + if (this->vel.y > -40.0f) { + this->vel.y -= 2.0f; } } - func_effect_8007A774(gPlayer, effect, 100.0f); + func_effect_8007A774(gPlayer, this, 100.0f); } -void Meteo_801892F0(Boss* boss, s32 arg1) { +void Meteo_801892F0(Boss297* this, s32 dmgPart) { Vec3f dest; Vec3f src; - func_effect_8007A6F0(&boss->obj.pos, NA_SE_EN_EXPLOSION_M); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_M); - if (arg1 == 7) { - func_effect_8007D2C8(boss->obj.pos.x, boss->obj.pos.y + 330.0f, boss->obj.pos.z + 1020.0f, 15.0f); - func_effect_8007BFFC(boss->obj.pos.x, boss->obj.pos.y + 330.0f, boss->obj.pos.z + 1020.0f, 0.0f, 0.0f, 0.0f, + if (dmgPart == 7) { + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y + 330.0f, this->obj.pos.z + 1020.0f, 15.0f); + func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y + 330.0f, this->obj.pos.z + 1020.0f, 0.0f, 0.0f, 0.0f, 7.0f, 20); } - if (arg1 == 5) { - func_effect_8007D2C8(boss->obj.pos.x, boss->obj.pos.y - 330.0f, boss->obj.pos.z + 1020.0f, 15.0f); - func_effect_8007BFFC(boss->obj.pos.x, boss->obj.pos.y - 330.0f, boss->obj.pos.z + 1020.0f, 0.0f, 0.0f, 0.0f, + if (dmgPart == 5) { + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y - 330.0f, this->obj.pos.z + 1020.0f, 15.0f); + func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y - 330.0f, this->obj.pos.z + 1020.0f, 0.0f, 0.0f, 0.0f, 7.0f, 20); } - if (arg1 == 4) { - func_effect_8007D2C8(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z + 300.0f, 20.0f); - func_effect_8007BFFC(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z + 300.0f, 0.0f, 0.0f, 0.0f, 10.0f, 25); + if (dmgPart == 4) { + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 300.0f, 20.0f); + func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 300.0f, 0.0f, 0.0f, 0.0f, 10.0f, 25); } - if (arg1 < 4) { - Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, boss->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, M_DTOR * 90.0f * arg1, MTXF_APPLY); + if (dmgPart < 4) { + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, M_DTOR * 90.0f * dmgPart, MTXF_APPLY); src.x = 0.0f; src.y = 200.0f; @@ -753,8 +754,8 @@ void Meteo_801892F0(Boss* boss, s32 arg1) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - func_effect_8007D2C8(boss->obj.pos.x + dest.x, boss->obj.pos.y + dest.y, boss->obj.pos.z + dest.z, 10.0f); - func_effect_8007BFFC(boss->obj.pos.x + dest.x, boss->obj.pos.y + dest.y, boss->obj.pos.z + dest.z, 0.0f, 0.0f, + func_effect_8007D2C8(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, 10.0f); + func_effect_8007BFFC(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, 0.0f, 0.0f, 0.0f, 5.0f, 15); } } @@ -777,7 +778,7 @@ void Meteo_80189624(void) { } } -void Meteo_8018978C(Boss* boss) { +void Meteo_Boss297_Update(Boss297* this) { f32 sp7C; f32 rand; s32 i; @@ -788,147 +789,147 @@ void Meteo_8018978C(Boss* boss) { gBossFrameCount++; - Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, boss->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); if ((gGameFrameCount & 0x10) != 0) { - boss->swork[19] += 32; - if (boss->swork[19] > 128) { - boss->swork[19] = 128; + this->swork[19] += 32; + if (this->swork[19] > 128) { + this->swork[19] = 128; } } else { - boss->swork[19] -= 32; - if (boss->swork[19] < 0) { - boss->swork[19] = 0; + this->swork[19] -= 32; + if (this->swork[19] < 0) { + this->swork[19] = 0; } } if ((gGameFrameCount & 0x38) == 0) { - boss->fwork[3] = D_i2_80195534[gGameFrameCount % 8U]; - boss->fwork[4] = D_i2_80195534[gGameFrameCount % 8U]; - boss->fwork[5] = D_i2_80195534[gGameFrameCount % 8U]; - boss->fwork[6] = D_i2_80195534[gGameFrameCount % 8U]; + this->fwork[3] = D_i2_80195534[gGameFrameCount % 8U]; + this->fwork[4] = D_i2_80195534[gGameFrameCount % 8U]; + this->fwork[5] = D_i2_80195534[gGameFrameCount % 8U]; + this->fwork[6] = D_i2_80195534[gGameFrameCount % 8U]; } if (((gGameFrameCount + 20) & 0x38) == 0) { - boss->fwork[7] = D_i2_80195534[(gGameFrameCount + 20) % 8U]; - boss->fwork[8] = D_i2_80195534[(gGameFrameCount + 20) % 8U]; + this->fwork[7] = D_i2_80195534[(gGameFrameCount + 20) % 8U]; + this->fwork[8] = D_i2_80195534[(gGameFrameCount + 20) % 8U]; } - if (boss->swork[9] != 0) { - boss->swork[9]--; + if (this->swork[9] != 0) { + this->swork[9]--; } - if (boss->swork[10] != 0) { - boss->swork[10]--; + if (this->swork[10] != 0) { + this->swork[10]--; } - if (boss->swork[11] != 0) { - boss->swork[11]--; + if (this->swork[11] != 0) { + this->swork[11]--; } - if (boss->swork[12] != 0) { - boss->swork[12]--; + if (this->swork[12] != 0) { + this->swork[12]--; } - if (boss->swork[13] != 0) { - boss->swork[13]--; + if (this->swork[13] != 0) { + this->swork[13]--; } - if (boss->swork[14] != 0) { - boss->swork[14]--; + if (this->swork[14] != 0) { + this->swork[14]--; } - if (boss->swork[15] != 0) { - boss->swork[15]--; + if (this->swork[15] != 0) { + this->swork[15]--; } - if (boss->swork[0] > 5) { - boss->swork[0]--; - if (boss->swork[0] == 5) { - Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_BURNER_L); + if (this->swork[0] > 5) { + this->swork[0]--; + if (this->swork[0] == 5) { + Audio_KillSfxBySourceAndId(this->sfxSource, NA_SE_EN_BURNER_L); } } - if (boss->swork[1] > 5) { - boss->swork[1] = boss->swork[1] - 1; - if (boss->swork[1] == 5) { - Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_BURNER_L); + if (this->swork[1] > 5) { + this->swork[1] = this->swork[1] - 1; + if (this->swork[1] == 5) { + Audio_KillSfxBySourceAndId(this->sfxSource, NA_SE_EN_BURNER_L); } } - if (boss->dmgType != DMG_NONE) { - boss->dmgType = DMG_NONE; - if ((boss->dmgPart != 7) && (boss->dmgPart >= 5) && (boss->dmgPart != 5)) { - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, boss->sfxSource, 4); + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + if ((this->dmgPart != 7) && (this->dmgPart >= 5) && (this->dmgPart != 5)) { + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } - if ((boss->state >= 2) && (boss->state < 20)) { - if ((boss->dmgPart < 5) && (boss[0].fwork[17 + boss->dmgPart] > 0.5f)) { - if (boss[0].swork[boss->dmgPart + 2] != 0) { - AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, boss->sfxSource, 4); + if ((this->state >= 2) && (this->state < 20)) { + if ((this->dmgPart < 5) && (this[0].fwork[17 + this->dmgPart] > 0.5f)) { + if (this[0].swork[this->dmgPart + 2] != 0) { + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, this->sfxSource, 4); - boss[0].swork[9 + boss->dmgPart] = 20; - boss[0].swork[2 + boss->dmgPart] -= boss->damage; + this[0].swork[9 + this->dmgPart] = 20; + this[0].swork[2 + this->dmgPart] -= this->damage; - if (boss[0].swork[2 + boss->dmgPart] <= 0) { - boss[0].swork[2 + boss->dmgPart] = 0; - Meteo_801892F0(boss, boss->dmgPart); - boss->swork[20]++; - if (boss->swork[20] == 2) { + if (this[0].swork[2 + this->dmgPart] <= 0) { + this[0].swork[2 + this->dmgPart] = 0; + Meteo_801892F0(this, this->dmgPart); + this->swork[20]++; + if (this->swork[20] == 2) { Radio_PlayMessage(gMsg_ID_17160, RCID_PEPPY); } - if (boss->swork[20] == 3) { + if (this->swork[20] == 3) { Radio_PlayMessage(gMsg_ID_3371, RCID_BOSS_METEO); } - if (boss->swork[20] == 4) { + if (this->swork[20] == 4) { Radio_PlayMessage(gMsg_ID_3320, RCID_BOSS_METEO); } } } else { - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } } - if (boss->state >= 9) { - if (boss->dmgPart == 5) { - if ((boss->swork[7] != 0) && (boss->fwork[22] > 0.8f)) { - AUDIO_PLAY_SFX(NA_SE_EN_KNOCK_DOWN, boss->sfxSource, 4); - boss->swork[14] = 20; - boss->swork[7] -= boss->damage; - if (boss->swork[7] <= 0) { - boss->swork[7] = 0; - Meteo_801892F0(boss, boss->dmgPart); + if (this->state >= 9) { + if (this->dmgPart == 5) { + if ((this->swork[7] != 0) && (this->fwork[22] > 0.8f)) { + AUDIO_PLAY_SFX(NA_SE_EN_KNOCK_DOWN, this->sfxSource, 4); + this->swork[14] = 20; + this->swork[7] -= this->damage; + if (this->swork[7] <= 0) { + this->swork[7] = 0; + Meteo_801892F0(this, this->dmgPart); } } else { - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } } - if (boss->dmgPart == 7) { - if ((boss->swork[8] != 0) && (boss->fwork[23] > 0.8f)) { - AUDIO_PLAY_SFX(NA_SE_EN_KNOCK_DOWN, boss->sfxSource, 4); - boss->swork[15] = 20; - boss->swork[8] -= boss->damage; - if (boss->swork[8] <= 0) { - boss->swork[8] = 0; - Meteo_801892F0(boss, boss->dmgPart); + if (this->dmgPart == 7) { + if ((this->swork[8] != 0) && (this->fwork[23] > 0.8f)) { + AUDIO_PLAY_SFX(NA_SE_EN_KNOCK_DOWN, this->sfxSource, 4); + this->swork[15] = 20; + this->swork[8] -= this->damage; + if (this->swork[8] <= 0) { + this->swork[8] = 0; + Meteo_801892F0(this, this->dmgPart); } } else { - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } } - if (boss->swork[7] <= 0) { - if (boss->swork[8] <= 0) { - Boss_AwardBonus(boss); + if (this->swork[7] <= 0) { + if (this->swork[8] <= 0) { + Boss_AwardBonus(this); - boss->state = 20; - boss->timer_050 = 300; - boss->timer_052 = 260; - boss->vel.x = 0.0f; - boss->vel.y = 0.0f; + this->state = 20; + this->timer_050 = 300; + this->timer_052 = 260; + this->vel.x = 0.0f; + this->vel.y = 0.0f; if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { @@ -939,7 +940,7 @@ void Meteo_8018978C(Boss* boss) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); - AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, this->sfxSource, 4); gScreenFlashTimer = 8; } } @@ -947,103 +948,103 @@ void Meteo_8018978C(Boss* boss) { } } - sp7C = boss->obj.pos.z + gPathProgress; + sp7C = this->obj.pos.z + gPathProgress; - if (boss->state >= 3) { - if (boss->state < 20) { - Math_SmoothStepToF(&boss->vel.z, -gArwingSpeed, 0.1f, 2.0f, 0.0f); - if ((boss->fwork[9] + 200.0f) < sp7C) { - Math_SmoothStepToF(&boss->vel.z, -60.0f, 0.1f, 4.0f, 0.0f); + if (this->state >= 3) { + if (this->state < 20) { + Math_SmoothStepToF(&this->vel.z, -gArwingSpeed, 0.1f, 2.0f, 0.0f); + if ((this->fwork[9] + 200.0f) < sp7C) { + Math_SmoothStepToF(&this->vel.z, -60.0f, 0.1f, 4.0f, 0.0f); } - if (sp7C < (boss->fwork[9] - 300.0f)) { - Math_SmoothStepToF(&boss->vel.z, 20.0f, 0.1f, 4.0f, 0.0f); + if (sp7C < (this->fwork[9] - 300.0f)) { + Math_SmoothStepToF(&this->vel.z, 20.0f, 0.1f, 4.0f, 0.0f); } } } - if ((boss->state >= 3) && (boss->state < 20)) { - switch (boss->swork[16]) { + if ((this->state >= 3) && (this->state < 20)) { + switch (this->swork[16]) { case 0: - if (boss->vel.y > 0.0f) { - boss->vel.y -= 0.2f; + if (this->vel.y > 0.0f) { + this->vel.y -= 0.2f; } - if (boss->vel.y < 0.0f) { - boss->vel.y += 0.2f; + if (this->vel.y < 0.0f) { + this->vel.y += 0.2f; } - if (boss->timer_054 == 0) { - boss->timer_054 = 20; - boss->fwork[13] = 7.0f; - if (boss->obj.pos.y > 0.0f) { - boss->fwork[13] = -7.0f; + if (this->timer_054 == 0) { + this->timer_054 = 20; + this->fwork[13] = 7.0f; + if (this->obj.pos.y > 0.0f) { + this->fwork[13] = -7.0f; } - boss->timer_054 = RAND_INT(30.0f) + 40.0f; - boss->swork[16] = 1; + this->timer_054 = RAND_INT(30.0f) + 40.0f; + this->swork[16] = 1; } break; case 1: - if (boss->fwork[13] < boss->vel.y) { - boss->vel.y = boss->vel.y - 0.2f; + if (this->fwork[13] < this->vel.y) { + this->vel.y = this->vel.y - 0.2f; } - if (boss->vel.y < boss->fwork[13]) { - boss->vel.y += 0.2f; + if (this->vel.y < this->fwork[13]) { + this->vel.y += 0.2f; } - if (boss->timer_054 == 0) { - boss->swork[16] = 0; - boss->timer_054 = RAND_INT(30.0f) + 40.0f; + if (this->timer_054 == 0) { + this->swork[16] = 0; + this->timer_054 = RAND_INT(30.0f) + 40.0f; } break; } - switch (boss->swork[17]) { + switch (this->swork[17]) { case 0: - if (boss->vel.x > 0.0f) { - boss->vel.x = boss->vel.x - 0.2f; + if (this->vel.x > 0.0f) { + this->vel.x = this->vel.x - 0.2f; } - if (boss->vel.x < 0.0f) { - boss->vel.x += 0.2f; + if (this->vel.x < 0.0f) { + this->vel.x += 0.2f; } - if (boss->timer_056 == 0) { - boss->timer_056 = 20; - boss->fwork[14] = 7.0f; - if (boss->obj.pos.x > 0.0f) { - boss->fwork[14] = -7.0f; + if (this->timer_056 == 0) { + this->timer_056 = 20; + this->fwork[14] = 7.0f; + if (this->obj.pos.x > 0.0f) { + this->fwork[14] = -7.0f; } - boss->timer_056 = RAND_INT(40.0f) + 50.0f; - boss->swork[17] = 1; + this->timer_056 = RAND_INT(40.0f) + 50.0f; + this->swork[17] = 1; } break; case 1: - if (boss->fwork[14] < boss->vel.x) { - boss->vel.x = boss->vel.x - 0.2f; + if (this->fwork[14] < this->vel.x) { + this->vel.x = this->vel.x - 0.2f; } - if (boss->vel.x < boss->fwork[14]) { - boss->vel.x += 0.2f; + if (this->vel.x < this->fwork[14]) { + this->vel.x += 0.2f; } - if (boss->timer_056 == 0) { - boss->swork[17] = 0; - boss->timer_056 = RAND_INT(40.0f) + 50.0f; + if (this->timer_056 == 0) { + this->swork[17] = 0; + this->timer_056 = RAND_INT(40.0f) + 50.0f; } break; } } - if (boss->swork[18] != 0) { + if (this->swork[18] != 0) { s32 objId; - if (func_hud_8008AC54(0) >= 4) { - objId = OBJ_ACTOR_191; + if (Hud_MissileSeekModeCheck(0) >= 4) { + objId = OBJ_MISSILE_SEEK_PLAYER; } else { - objId = OBJ_ACTOR_190; + objId = OBJ_MISSILE_SEEK_TEAM; } - AUDIO_PLAY_SFX(NA_SE_EN_BARREL_SHOT, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_BARREL_SHOT, this->sfxSource, 4); src.x = 0.0f; src.y = 330.0f; @@ -1051,11 +1052,11 @@ void Meteo_8018978C(Boss* boss) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - if (boss->swork[18] == 1) { - Meteo_80187D08(boss->obj.pos.x + dest.x, boss->obj.pos.y + dest.y, boss->obj.pos.z + dest.z, 50.0f, 270.0f, + if (this->swork[18] == 1) { + Meteo_80187D08(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, 50.0f, 270.0f, 0.0f, 30, 0, objId); } else { - Meteo_80187D08(boss->obj.pos.x + dest.x, boss->obj.pos.y + dest.y, boss->obj.pos.z + dest.z, 50.0f, 0.0f, + Meteo_80187D08(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, 50.0f, 0.0f, 0.0f, 0, 0, objId); } @@ -1063,14 +1064,14 @@ void Meteo_8018978C(Boss* boss) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - if (boss->swork[18] == 1) { - Meteo_80187D08(boss->obj.pos.x + dest.x, boss->obj.pos.y + dest.y, boss->obj.pos.z + dest.z, 50.0f, 90.0f, + if (this->swork[18] == 1) { + Meteo_80187D08(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, 50.0f, 90.0f, 0.0f, 30, 0, objId); } else { - Meteo_80187D08(boss->obj.pos.x + dest.x, boss->obj.pos.y + dest.y, boss->obj.pos.z + dest.z, 50.0f, 0.0f, + Meteo_80187D08(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, 50.0f, 0.0f, 0.0f, 0, 0, objId); } - boss->swork[18] = 0; + this->swork[18] = 0; } if ((sp7C < 200.0f) && (sp7C > -1500.0f)) { @@ -1079,158 +1080,158 @@ void Meteo_8018978C(Boss* boss) { gLight2zRotTarget = 0.0f; } - switch (boss->state) { + switch (this->state) { case 0: - boss->swork[0] = 10; - boss->swork[1] = 10; + this->swork[0] = 10; + this->swork[1] = 10; - boss->obj.pos.y += ((0.0f - boss->obj.pos.y) * boss->fwork[1]); - boss->vel.z = boss->fwork[0] - gPathVelZ; + this->obj.pos.y += ((0.0f - this->obj.pos.y) * this->fwork[1]); + this->vel.z = this->fwork[0] - gPathVelZ; - if (sp7C < boss->fwork[9]) { - boss->state = 1; - boss->fwork[1] = 0.0f; + if (sp7C < this->fwork[9]) { + this->state = 1; + this->fwork[1] = 0.0f; } if (sp7C < -1000.0f) { - if (boss->fwork[1] < 0.005f) { - boss->fwork[1] = boss->fwork[1] + 0.0001f; + if (this->fwork[1] < 0.005f) { + this->fwork[1] = this->fwork[1] + 0.0001f; } } break; case 1: - boss->obj.pos.y += ((0.0f - boss->obj.pos.y) * boss->fwork[1]); - boss->vel.z = boss->fwork[0] - gPathVelZ; + this->obj.pos.y += ((0.0f - this->obj.pos.y) * this->fwork[1]); + this->vel.z = this->fwork[0] - gPathVelZ; - if (boss->fwork[0] < 0.0f) { - boss->fwork[0] += 0.5f; - if (boss->fwork[0] >= 0.0f) { - boss->state = 2; - boss->timer_050 = 50; - gBosses[boss->unk_044].state = 1; + if (this->fwork[0] < 0.0f) { + this->fwork[0] += 0.5f; + if (this->fwork[0] >= 0.0f) { + this->state = 2; + this->timer_050 = 50; + gBosses[this->unk_044].state = 1; } } - if (boss->fwork[1] < 0.005f) { - boss->fwork[1] = boss->fwork[1] + 0.0001f; + if (this->fwork[1] < 0.005f) { + this->fwork[1] = this->fwork[1] + 0.0001f; } break; case 2: - boss->obj.pos.y += ((0.0f - boss->obj.pos.y) * boss->fwork[1]); - boss->vel.z = boss->fwork[0] - gPathVelZ; + this->obj.pos.y += ((0.0f - this->obj.pos.y) * this->fwork[1]); + this->vel.z = this->fwork[0] - gPathVelZ; - if (boss->fwork[1] < 0.05f) { - boss->fwork[1] = boss->fwork[1] + 0.0004f; + if (this->fwork[1] < 0.05f) { + this->fwork[1] = this->fwork[1] + 0.0004f; } - if (boss->timer_050 == 0) { - boss->state = 3; - boss->timer_050 = 50; - boss->timer_058 = 100; + if (this->timer_050 == 0) { + this->state = 3; + this->timer_050 = 50; + this->timer_058 = 100; Radio_PlayMessage(gMsg_ID_3310, RCID_BOSS_METEO); } break; case 3: - if (boss->timer_052 == 0) { + if (this->timer_052 == 0) { rand = Rand_ZeroOne(); - boss->fwork[9] = -3000.0f; + this->fwork[9] = -3000.0f; if (rand < 0.3f) { - boss->fwork[9] = -2000.0f; + this->fwork[9] = -2000.0f; } if (rand > 0.7f) { - boss->fwork[9] = -4000.0f; + this->fwork[9] = -4000.0f; } - boss->timer_052 = 80; - } else if (boss->vel.z < -50.0f) { - if (boss->swork[0] == 5) { - AUDIO_PLAY_SFX(NA_SE_EN_BURNER_L, boss->sfxSource, 4); + this->timer_052 = 80; + } else if (this->vel.z < -50.0f) { + if (this->swork[0] == 5) { + AUDIO_PLAY_SFX(NA_SE_EN_BURNER_L, this->sfxSource, 4); } - if (boss->swork[0] < 10) { - boss->swork[0] += 2; - if (boss->swork[0] > 10) { - boss->swork[0] = 10; + if (this->swork[0] < 10) { + this->swork[0] += 2; + if (this->swork[0] > 10) { + this->swork[0] = 10; } } - if (boss->swork[1] < 10) { - boss->swork[1] += 2; - if (boss->swork[1] > 10) { - boss->swork[1] = 10; + if (this->swork[1] < 10) { + this->swork[1] += 2; + if (this->swork[1] > 10) { + this->swork[1] = 10; } } } - if (gBosses[boss->unk_044].state < 3) { + if (gBosses[this->unk_044].state < 3) { var_v0 = 0; - if (boss->swork[2] == 0) { + if (this->swork[2] == 0) { var_v0 = 1; - boss->obj.rot.z += 0.1f; + this->obj.rot.z += 0.1f; } - if (boss->swork[3] == 0) { + if (this->swork[3] == 0) { var_v0++; - boss->obj.rot.z += 0.1f; + this->obj.rot.z += 0.1f; } - if (boss->swork[4] == 0) { + if (this->swork[4] == 0) { var_v0++; - boss->obj.rot.z += 0.1f; + this->obj.rot.z += 0.1f; } - if (boss->swork[5] == 0) { + if (this->swork[5] == 0) { var_v0++; - boss->obj.rot.z += 0.1f; + this->obj.rot.z += 0.1f; } if (var_v0 == 4) { - gBosses[boss->unk_044].state = 3; - boss->state = 4; - boss->timer_050 = 250; - boss->timer_05A = 30; - boss->fwork[10] = 0; + gBosses[this->unk_044].state = 3; + this->state = 4; + this->timer_050 = 250; + this->timer_05A = 30; + this->fwork[10] = 0; } - if ((boss->timer_050 == 0) && (gBosses[boss->unk_044].state == 2)) { - boss->fwork[2] = 90.0f; - boss->timer_050 = D_i2_80195520[var_v0] + 45; - AUDIO_PLAY_SFX(NA_SE_EN_SHIELD_ROLL, boss->sfxSource, 4); + if ((this->timer_050 == 0) && (gBosses[this->unk_044].state == 2)) { + this->fwork[2] = 90.0f; + this->timer_050 = D_i2_80195520[var_v0] + 45; + AUDIO_PLAY_SFX(NA_SE_EN_SHIELD_ROLL, this->sfxSource, 4); } - if (boss->fwork[2] > 0.0f) { - boss->fwork[2] -= 2.0f; - gBosses[boss->unk_044].rot_078.z -= 2.0f; + if (this->fwork[2] > 0.0f) { + this->fwork[2] -= 2.0f; + gBosses[this->unk_044].rot_078.z -= 2.0f; } } - if (boss->timer_058 == 0) { - boss->timer_058 = RAND_INT(80.0f) + 180.0f; - boss->swork[18] = 1; + if (this->timer_058 == 0) { + this->timer_058 = RAND_INT(80.0f) + 180.0f; + this->swork[18] = 1; } break; case 4: - boss->fwork[9] = -3000.0f; - if (boss->fwork[10] < 0.02f) { - boss->fwork[10] += 0.0002f; + this->fwork[9] = -3000.0f; + if (this->fwork[10] < 0.02f) { + this->fwork[10] += 0.0002f; } - boss->obj.rot.z += ((0.0f - boss->obj.rot.z) * boss->fwork[10]); - if (boss->timer_050 == 100) { + this->obj.rot.z += ((0.0f - this->obj.rot.z) * this->fwork[10]); + if (this->timer_050 == 100) { Radio_PlayMessage(gMsg_ID_3321, RCID_BOSS_METEO); } - if (boss->timer_050 == 0) { - boss->state = 5; - boss->timer_050 = 70; + if (this->timer_050 == 0) { + this->state = 5; + this->timer_050 = 70; } break; case 5: - boss->obj.rot.z += ((0.0f - boss->obj.rot.z) * 0.02f); + this->obj.rot.z += ((0.0f - this->obj.rot.z) * 0.02f); - if (boss->timer_050 == 1) { - AUDIO_PLAY_SFX(NA_SE_EN_S_BEAM_CHARGE, boss->sfxSource, 4); + if (this->timer_050 == 1) { + AUDIO_PLAY_SFX(NA_SE_EN_S_BEAM_CHARGE, this->sfxSource, 4); } - if (boss->timer_050 == 0) { + if (this->timer_050 == 0) { gLight1xRotTarget = 0.0f; gLight1yRotTarget = 5.0f; gLight1zRotTarget = 0.0f; @@ -1240,76 +1241,76 @@ void Meteo_8018978C(Boss* boss) { gLight1rotStep = 5.0f; gLight2rotStep = 5.0f; - if (boss->fwork[11] < 70.0f) { - boss->fwork[11] += 1.0f; - if (boss->fwork[11] > 20.0f) { - boss->fwork[11] += 1.0f; + if (this->fwork[11] < 70.0f) { + this->fwork[11] += 1.0f; + if (this->fwork[11] > 20.0f) { + this->fwork[11] += 1.0f; } } else { - boss->state = 6; - boss->timer_050 = 75; + this->state = 6; + this->timer_050 = 75; } - if (boss->fwork[11] > 30.0f) { + if (this->fwork[11] > 30.0f) { Meteo_80189624(); } } break; case 6: - boss->obj.rot.z = boss->obj.rot.z + ((0.0f - boss->obj.rot.z) * 0.02f); - Math_SmoothStepToF(&boss->fwork[0x15], 4.0f, 1.0f, 0.1f, 0.0f); + this->obj.rot.z = this->obj.rot.z + ((0.0f - this->obj.rot.z) * 0.02f); + Math_SmoothStepToF(&this->fwork[0x15], 4.0f, 1.0f, 0.1f, 0.0f); if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_NEXT) { gFillScreenRed = gFillScreenAlpha = gFillScreenGreen = gFillScreenBlue = 0; - if ((boss->timer_050 == 10) || (boss->timer_050 == 30) || (boss->timer_050 == 50) || - (boss->timer_050 == 70)) { + if ((this->timer_050 == 10) || (this->timer_050 == 30) || (this->timer_050 == 50) || + (this->timer_050 == 70)) { gFillScreenAlpha = 150; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; - Meteo_80187E38(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z + 1300.0f, - boss->fwork[12] + boss->obj.rot.z); - boss->fwork[12] = RAND_FLOAT(360.0f); + Meteo_80187E38(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 1300.0f, + this->fwork[12] + this->obj.rot.z); + this->fwork[12] = RAND_FLOAT(360.0f); } - if ((boss->timer_050 == 13) || (boss->timer_050 == 33) || (boss->timer_050 == 53) || - (boss->timer_050 == 73)) { + if ((this->timer_050 == 13) || (this->timer_050 == 33) || (this->timer_050 == 53) || + (this->timer_050 == 73)) { gFillScreenAlpha = 150; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; } - if (boss->timer_050 == 0) { - boss->state = 7; - AUDIO_PLAY_SFX(NA_SE_EN_S_BEAM_END, boss->sfxSource, 4); + if (this->timer_050 == 0) { + this->state = 7; + AUDIO_PLAY_SFX(NA_SE_EN_S_BEAM_END, this->sfxSource, 4); } Meteo_80189624(); } break; case 7: - if (boss->fwork[11] > 26.0f) { + if (this->fwork[11] > 26.0f) { Meteo_80189624(); } - if (boss->fwork[11] > 0.0f) { - boss->fwork[11] -= 2.0f; - if (boss->fwork[11] <= 0.0f) { - boss->fwork[11] = 0.0f; - Audio_KillSfxBySource(boss->sfxSource); - if (boss->swork[6] == 0) { - boss->state = 8; + if (this->fwork[11] > 0.0f) { + this->fwork[11] -= 2.0f; + if (this->fwork[11] <= 0.0f) { + this->fwork[11] = 0.0f; + Audio_KillSfxBySource(this->sfxSource); + if (this->swork[6] == 0) { + this->state = 8; - boss->timer_050 = 190; - boss->timer_052 = 230; + this->timer_050 = 190; + this->timer_052 = 230; - boss->fwork[10] = 0.0f; - boss->fwork[22] = 0.0f; - boss->fwork[23] = 0.0f; + this->fwork[10] = 0.0f; + this->fwork[22] = 0.0f; + this->fwork[23] = 0.0f; gCsFrameCount = 0; Radio_PlayMessage(gMsg_ID_3322, RCID_BOSS_METEO); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); } else { - boss->state = 5; - boss->timer_050 = 70; + this->state = 5; + this->timer_050 = 70; } } } @@ -1334,116 +1335,116 @@ void Meteo_8018978C(Boss* boss) { } } - if (boss->timer_050 == 0) { - if (boss->fwork[10] < 0.02f) { - boss->fwork[10] = boss->fwork[10] + 0.0002f; + if (this->timer_050 == 0) { + if (this->fwork[10] < 0.02f) { + this->fwork[10] = this->fwork[10] + 0.0002f; } - boss->obj.rot.x += (-180.0f - boss->obj.rot.x) * boss->fwork[10]; + this->obj.rot.x += (-180.0f - this->obj.rot.x) * this->fwork[10]; - if (boss->timer_052 != 0) { - if (boss->swork[0] == 5) { - AUDIO_PLAY_SFX(NA_SE_EN_BURNER_L, boss->sfxSource, 4); + if (this->timer_052 != 0) { + if (this->swork[0] == 5) { + AUDIO_PLAY_SFX(NA_SE_EN_BURNER_L, this->sfxSource, 4); } - if (boss->swork[0] < 10) { - boss->swork[0] += 2; - if (boss->swork[0] > 10) { - boss->swork[0] = 10; + if (this->swork[0] < 10) { + this->swork[0] += 2; + if (this->swork[0] > 10) { + this->swork[0] = 10; } } } - if (boss->obj.rot.x < -178.0f) { - boss->state = 9; - boss->timer_050 = 0; - boss->fwork[15] = 8.0f; - AUDIO_PLAY_SFX(NA_SE_EN_RNG_BEAM_CHARGE, boss->sfxSource, 4); + if (this->obj.rot.x < -178.0f) { + this->state = 9; + this->timer_050 = 0; + this->fwork[15] = 8.0f; + AUDIO_PLAY_SFX(NA_SE_EN_RNG_BEAM_CHARGE, this->sfxSource, 4); } } break; case 9: - boss->obj.rot.x += (-180.0f - boss->obj.rot.x) * boss->fwork[10]; - if ((boss->timer_050 > 50) && (boss->timer_050 <= 64)) { - boss->fwork[22] -= 0.1f; - if (boss->fwork[22] < 0.0f) { - boss->fwork[22] = 0.0f; + this->obj.rot.x += (-180.0f - this->obj.rot.x) * this->fwork[10]; + if ((this->timer_050 > 50) && (this->timer_050 <= 64)) { + this->fwork[22] -= 0.1f; + if (this->fwork[22] < 0.0f) { + this->fwork[22] = 0.0f; } - boss->fwork[23] -= 0.1f; - if (boss->fwork[23] < 0.0f) { - boss->fwork[23] = 0.0f; + this->fwork[23] -= 0.1f; + if (this->fwork[23] < 0.0f) { + this->fwork[23] = 0.0f; } } - if (boss->timer_050 < 20) { - boss->fwork[22] += 0.1f; - if (boss->fwork[22] > 1.0f) { - boss->fwork[22] = 1.0f; + if (this->timer_050 < 20) { + this->fwork[22] += 0.1f; + if (this->fwork[22] > 1.0f) { + this->fwork[22] = 1.0f; } - boss->fwork[23] += 0.1f; - if (boss->fwork[23] > 1.0f) { - boss->fwork[23] = 1.0f; + this->fwork[23] += 0.1f; + if (this->fwork[23] > 1.0f) { + this->fwork[23] = 1.0f; } } - if (boss->timer_050 == 40) { - boss->swork[18] = 2; + if (this->timer_050 == 40) { + this->swork[18] = 2; } - if (boss->timer_050 == 0) { - boss->fwork[15] -= 0.1f; - if (boss->fwork[15] < -1.0f) { - boss->timer_050 = 40; - boss->state = 10; + if (this->timer_050 == 0) { + this->fwork[15] -= 0.1f; + if (this->fwork[15] < -1.0f) { + this->timer_050 = 40; + this->state = 10; } } break; case 10: - if (boss->timer_050 == 0) { - boss->state = 9; - boss->timer_050 = 70; - boss->fwork[15] = 8.0f; - AUDIO_PLAY_SFX(NA_SE_EN_RNG_BEAM_CHARGE, boss->sfxSource, 4); - } else if ((boss->timer_050 % 2U) == 1) { - Meteo_80188088(boss); + if (this->timer_050 == 0) { + this->state = 9; + this->timer_050 = 70; + this->fwork[15] = 8.0f; + AUDIO_PLAY_SFX(NA_SE_EN_RNG_BEAM_CHARGE, this->sfxSource, 4); + } else if ((this->timer_050 % 2U) == 1) { + Meteo_80188088(this); } break; case 20: - if (boss->timer_052 == 230) { + if (this->timer_052 == 230) { Radio_PlayMessage(gMsg_ID_3370, RCID_BOSS_METEO); } - if (boss->timer_052 == 90) { + if (this->timer_052 == 90) { Radio_PlayMessage(gMsg_ID_3360, RCID_FOX); } if (((gGameFrameCount % 8) == 0) && (Rand_ZeroOne() < 0.5f)) { - boss->timer_05C = 4; + this->timer_05C = 4; } Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_i2_80195430[RAND_INT(19.9f)], &dest); if (((gGameFrameCount % 2) == 0)) { - func_effect_8007C120(boss->obj.pos.x + dest.x, boss->obj.pos.y + dest.y, boss->obj.pos.z + dest.z, - boss->vel.x, boss->vel.y, boss->vel.z, 0.3f, 20); + func_effect_8007C120(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, + this->vel.x, this->vel.y, this->vel.z, 0.3f, 20); } if (((gGameFrameCount % 4) == 0)) { - func_effect_8007BFFC(boss->obj.pos.x + dest.x, boss->obj.pos.y + dest.y, boss->obj.pos.z + dest.z, - boss->vel.x, boss->vel.y, boss->vel.z, 10.0f, 10); + func_effect_8007BFFC(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, + this->vel.x, this->vel.y, this->vel.z, 10.0f, 10); } - boss->vel.y = -5.0f; - boss->obj.rot.x += 0.2f; - boss->obj.rot.z -= 0.1f; + this->vel.y = -5.0f; + this->obj.rot.x += 0.2f; + this->obj.rot.z -= 0.1f; - if (boss->timer_050 == 0) { - func_effect_8007D2C8(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 40.0f); - Object_Kill(&boss->obj, boss->sfxSource); + if (this->timer_050 == 0) { + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 40.0f); + Object_Kill(&this->obj, this->sfxSource); } - if (boss->timer_050 == 20) { - func_effect_8007A568(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 80.0f); - AUDIO_PLAY_SFX(NA_SE_EN_STAR_EXPLOSION, boss->sfxSource, 4); + if (this->timer_050 == 20) { + func_effect_8007A568(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 80.0f); + AUDIO_PLAY_SFX(NA_SE_EN_STAR_EXPLOSION, this->sfxSource, 4); gControllerRumbleTimers[0] = 60; for (i = 0; i < ARRAY_COUNT(gActors); i++) { if (gActors[i].obj.id == OBJ_ACTOR_TEAM_BOSS) { @@ -1452,7 +1453,7 @@ void Meteo_8018978C(Boss* boss) { } } - switch (boss->timer_050) { + switch (this->timer_050) { case 20: gShowBossHealth = false; @@ -1460,23 +1461,23 @@ void Meteo_8018978C(Boss* boss) { case 5: case 10: case 15: - func_effect_8007B344(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 71.0f, 5); + func_effect_8007B344(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 71.0f, 5); case 0: for (i = 0; i < ARRAY_COUNT(gEffects); i++) { - func_effect_80079618(RAND_FLOAT_CENTERED(1000.0f) + boss->obj.pos.x, - RAND_FLOAT_CENTERED(1000.0f) + boss->obj.pos.y, - RAND_FLOAT_CENTERED(1000.0f) + boss->obj.pos.z, 3.0f); + func_effect_80079618(RAND_FLOAT_CENTERED(1000.0f) + this->obj.pos.x, + RAND_FLOAT_CENTERED(1000.0f) + this->obj.pos.y, + RAND_FLOAT_CENTERED(1000.0f) + this->obj.pos.z, 3.0f); } break; } } - if (boss->obj.rot.z >= 360.0f) { - boss->obj.rot.z = boss->obj.rot.z - 360.0f; + if (this->obj.rot.z >= 360.0f) { + this->obj.rot.z = this->obj.rot.z - 360.0f; } - if (boss->obj.rot.z < 0.0f) { - boss->obj.rot.z += 360.0f; + if (this->obj.rot.z < 0.0f) { + this->obj.rot.z += 360.0f; } if (gBossFrameCount == 250) { @@ -1486,30 +1487,30 @@ void Meteo_8018978C(Boss* boss) { gShowBossHealth = true; } if (gBossFrameCount > 406) { - gBossHealthBar = (boss->swork[2] + boss->swork[3] + boss->swork[4] + boss->swork[5] + boss->swork[7] + - boss->swork[8] + boss->swork[6]) / + gBossHealthBar = (this->swork[2] + this->swork[3] + this->swork[4] + this->swork[5] + this->swork[7] + + this->swork[8] + this->swork[6]) / 2.6274f; // approx 670 / 255 if ((gBossFrameCount > 506) && (gBossFrameCount < 1000)) { - Math_SmoothStepToF(&boss->fwork[17], 3.3f, 1.0f, 0.1f, 0.0f); - Math_SmoothStepToF(&boss->fwork[18], 3.3f, 1.0f, 0.1f, 0.0f); - Math_SmoothStepToF(&boss->fwork[19], 3.3f, 1.0f, 0.1f, 0.0f); - Math_SmoothStepToF(&boss->fwork[20], 3.3f, 1.0f, 0.1f, 0.0f); + Math_SmoothStepToF(&this->fwork[17], 3.3f, 1.0f, 0.1f, 0.0f); + Math_SmoothStepToF(&this->fwork[18], 3.3f, 1.0f, 0.1f, 0.0f); + Math_SmoothStepToF(&this->fwork[19], 3.3f, 1.0f, 0.1f, 0.0f); + Math_SmoothStepToF(&this->fwork[20], 3.3f, 1.0f, 0.1f, 0.0f); } } } void Meteo_8018B7C4(s32 arg0) { - f32 effect = arg0 * 0.83333f; // approx 5 / 6 + f32 xScale = arg0 * 0.83333f; // approx 5 / 6 if ((gGameFrameCount % 2) != 0) { - effect *= 1.1f; + xScale *= 1.1f; } gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); RCP_SetupDL_64(); Matrix_Push(&gGfxMatrix); - Matrix_Scale(gGfxMatrix, 10.0f * effect, 10.0f * effect, 10.0f * effect, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 10.0f * xScale, 10.0f * xScale, 10.0f * xScale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 70); gSPDisplayList(gMasterDisp++, D_102ED50); @@ -1517,7 +1518,7 @@ void Meteo_8018B7C4(s32 arg0) { Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 20.0f, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, 9.0f * effect, 9.0f * effect, 9.0f * effect, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 9.0f * xScale, 9.0f * xScale, 9.0f * xScale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 60); @@ -1526,7 +1527,7 @@ void Meteo_8018B7C4(s32 arg0) { Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 35.0f, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, 7.5f * effect, 7.5f * effect, 7.5f * effect, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 7.5f * xScale, 7.5f * xScale, 7.5f * xScale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 50); @@ -1535,7 +1536,7 @@ void Meteo_8018B7C4(s32 arg0) { Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 40.0f, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, 5.0f * effect, 5.0f * effect, 5.0f * effect, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 5.0f * xScale, 5.0f * xScale, 5.0f * xScale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 40); @@ -1544,7 +1545,7 @@ void Meteo_8018B7C4(s32 arg0) { gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); } -void Meteo_8018BACC(Boss* boss) { +void Meteo_Boss297_Draw(Boss297* this) { s32 i; f32 var_fs0; f32 var_fs1; @@ -1555,9 +1556,10 @@ void Meteo_8018BACC(Boss* boss) { gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); for (i = 0; i < 6; i++) { - if ((boss->fwork[i + 3] != 0) && (boss->fwork[11] == 0.0f)) { - var_fs1 = 2.0f * boss->fwork[3 + i]; + if ((this->fwork[i + 3] != 0) && (this->fwork[11] == 0.0f)) { + var_fs1 = 2.0f * this->fwork[3 + i]; Matrix_Push(&gGfxMatrix); + switch (i) { case 0: Matrix_Translate(gGfxMatrix, 746.0f, 741.0f, 680.0f, MTXF_APPLY); @@ -1600,10 +1602,10 @@ void Meteo_8018BACC(Boss* boss) { } for (i = 0; i < 7; i++) { - if (boss->swork[2 + i] != 0) { - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, boss->swork[19], 255); + if (this->swork[2 + i] != 0) { + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, this->swork[19], 255); - if ((boss->swork[9 + i] % 2) != 0) { + if ((this->swork[9 + i] % 2) != 0) { gDPSetPrimColor(gMasterDisp++, 0, 0, 80, 0, 0, 255); } @@ -1612,23 +1614,23 @@ void Meteo_8018BACC(Boss* boss) { if (i == 4) { Matrix_Translate(gGfxMatrix, 0.0f, 0, 300.0f, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, M_PI / 4, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, boss->fwork[21], boss->fwork[21], 1.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->fwork[21], this->fwork[21], 1.0f, MTXF_APPLY); } if (i == 5) { Matrix_Translate(gGfxMatrix, 0.0f, 330.0f, -1022.0f, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, boss->fwork[22] * 3.2f, 2.0f * boss->fwork[22], 1.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->fwork[22] * 3.2f, 2.0f * this->fwork[22], 1.0f, MTXF_APPLY); } if (i == 6) { Matrix_Translate(gGfxMatrix, 0.0f, -330.0f, -1022.0f, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, boss->fwork[23] * 3.2f, 2.0f * boss->fwork[23], 1.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->fwork[23] * 3.2f, 2.0f * this->fwork[23], 1.0f, MTXF_APPLY); } if (i < 4) { Matrix_RotateZ(gGfxMatrix, M_DTOR * 90.0f * i, MTXF_APPLY); Matrix_Translate(gGfxMatrix, 0.0f, 200.0f, 500.0f, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, boss->fwork[17 + i], boss->fwork[17 + i], 1.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->fwork[17 + i], this->fwork[17 + i], 1.0f, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); @@ -1643,10 +1645,11 @@ void Meteo_8018BACC(Boss* boss) { } gDPSetPrimColor(gMasterDisp++, 0, 0, 160, 255, 160, 128); + for (i = 0; i < 4; i++) { - if (boss->fwork[11] != 0) { - var_fs1 = boss->fwork[11]; - if (boss->fwork[11] > 15.0f) { + if (this->fwork[11] != 0) { + var_fs1 = this->fwork[11]; + if (this->fwork[11] > 15.0f) { var_fs1 = 15.0f; } @@ -1698,8 +1701,8 @@ void Meteo_8018BACC(Boss* boss) { } } - if (boss->fwork[11] > 15.0f) { - var_fs1 = boss->fwork[11] - 15.0f; + if (this->fwork[11] > 15.0f) { + var_fs1 = this->fwork[11] - 15.0f; gDPSetPrimColor(gMasterDisp++, 0, 0, 160, 255, 160, 255); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 1300.0f, MTXF_APPLY); @@ -1713,8 +1716,8 @@ void Meteo_8018BACC(Boss* boss) { Matrix_Pop(&gGfxMatrix); } - if ((boss->state == 9) || (boss->state == 10)) { - var_fs1 = boss->fwork[15]; + if ((this->state == 9) || (this->state == 10)) { + var_fs1 = this->fwork[15]; for (i = 0; i < 10; i++) { var_fs1 += 0.3f; var_fs0 = var_fs1; @@ -1753,125 +1756,128 @@ void Meteo_8018BACC(Boss* boss) { } } - if (boss->swork[0] > 0) { + if (this->swork[0] > 0) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, 650.0f, 600.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - Meteo_8018B7C4(boss->swork[0] - 1); + Meteo_8018B7C4(this->swork[0] - 1); Matrix_Pop(&gGfxMatrix); } - if (boss->swork[1] > 0) { + if (this->swork[1] > 0) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, -650.0f, 600.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - Meteo_8018B7C4(boss->swork[1] - 1); + Meteo_8018B7C4(this->swork[1] - 1); Matrix_Pop(&gGfxMatrix); } gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); } -void Meteo_8018C77C(Actor* actor, s32 arg1) { - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_CUTSCENE; +void Meteo_8018C77C(ActorCutscene* this, s32 arg1) { + Actor_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.pos.x = D_i2_80195584[arg1] + gPlayer[0].pos.x; - actor->obj.pos.y = D_i2_80195594[arg1] + gPlayer[0].pos.y; - actor->obj.pos.z = D_i2_801955A4[arg1] + gPlayer[0].trueZpos; + this->obj.pos.x = D_i2_80195584[arg1] + gPlayer[0].pos.x; + this->obj.pos.y = D_i2_80195594[arg1] + gPlayer[0].pos.y; + this->obj.pos.z = D_i2_801955A4[arg1] + gPlayer[0].trueZpos; - actor->animFrame = D_i2_801955B4[arg1]; - actor->obj.rot.y = 180.0f; - Object_SetInfo(&actor->info, actor->obj.id); - actor->info.cullDistance = 200.0f; + this->animFrame = D_i2_801955B4[arg1]; + this->obj.rot.y = 180.0f; + Object_SetInfo(&this->info, this->obj.id); + this->info.cullDistance = 200.0f; - if (actor->animFrame == 0) { - actor->iwork[11] = 1; - AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); + if (this->animFrame == 0) { + this->iwork[11] = 1; + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); return; } - AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); - AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, this->sfxSource, 0); } -void Meteo_8018C8F4(Actor* actor1, Actor* actor2) { - Actor_Initialize(actor1); - actor1->obj.status = OBJ_INIT; - actor1->obj.id = OBJ_ACTOR_182; +void Meteo_8018C8F4(Actor182* actor182, ActorCutscene* actorCs) { + Actor_Initialize(actor182); + actor182->obj.status = OBJ_INIT; + actor182->obj.id = OBJ_ACTOR_182; - actor1->obj.pos.x = RAND_FLOAT_CENTERED_SEEDED(2000.0f) + actor2->obj.pos.x; - actor1->obj.pos.y = RAND_FLOAT_CENTERED_SEEDED(2000.0f) + actor2->obj.pos.y; - actor1->obj.pos.z = (RAND_FLOAT_CENTERED_SEEDED(500.0f) + actor2->obj.pos.z) - 9000.0f; + actor182->obj.pos.x = RAND_FLOAT_CENTERED_SEEDED(2000.0f) + actorCs->obj.pos.x; + actor182->obj.pos.y = RAND_FLOAT_CENTERED_SEEDED(2000.0f) + actorCs->obj.pos.y; + actor182->obj.pos.z = RAND_FLOAT_CENTERED_SEEDED(500.0f) + actorCs->obj.pos.z - 9000.0f; - actor1->obj.rot.y = RAND_FLOAT_SEEDED(360.0f); - actor1->obj.rot.x = RAND_FLOAT_SEEDED(360.0f); + actor182->obj.rot.y = RAND_FLOAT_SEEDED(360.0f); + actor182->obj.rot.x = RAND_FLOAT_SEEDED(360.0f); - actor1->timer_0C2 = 10000; - actor1->vel.z = 30.0f; - Object_SetInfo(&actor1->info, actor1->obj.id); + actor182->timer_0C2 = 10000; + actor182->vel.z = 30.0f; + Object_SetInfo(&actor182->info, actor182->obj.id); } -void Meteo_8018CA10(Actor* actor1, Actor* actor2, f32 x, f32 y, f32 z) { - Actor_Initialize(actor1); - actor1->obj.status = OBJ_INIT; - actor1->obj.id = OBJ_ACTOR_182; +void Meteo_8018CA10(Actor* actor182, ActorCutscene* actorCs, f32 x, f32 y, f32 z) { + Actor_Initialize(actor182); + actor182->obj.status = OBJ_INIT; + actor182->obj.id = OBJ_ACTOR_182; - actor1->obj.pos.x = actor2->obj.pos.x + x; - actor1->obj.pos.y = actor2->obj.pos.y + y; - actor1->obj.pos.z = actor2->obj.pos.x + z; + actor182->obj.pos.x = actorCs->obj.pos.x + x; + actor182->obj.pos.y = actorCs->obj.pos.y + y; + actor182->obj.pos.z = actorCs->obj.pos.x + z; - actor1->obj.rot.y = RAND_FLOAT_SEEDED(360.0f); - actor1->obj.rot.x = RAND_FLOAT_SEEDED(360.0f); + actor182->obj.rot.y = RAND_FLOAT_SEEDED(360.0f); + actor182->obj.rot.x = RAND_FLOAT_SEEDED(360.0f); - actor1->timer_0C2 = 10000; - actor1->vel.z = 30.0f; - Object_SetInfo(&actor1->info, actor1->obj.id); + actor182->timer_0C2 = 10000; + actor182->vel.z = 30.0f; + Object_SetInfo(&actor182->info, actor182->obj.id); } void Meteo_8018CAD8(void) { - Actor* actor = &gActors[50]; + ActorCutscene* actorCs = &gActors[50]; - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.pos.x = 0.0f; - actor->obj.pos.y = 0.0f; - actor->obj.pos.z = 9000.0f; - actor->animFrame = 10; - actor->obj.id = OBJ_ACTOR_CUTSCENE; - Object_SetInfo(&actor->info, actor->obj.id); + Actor_Initialize(actorCs); + actorCs->obj.status = OBJ_INIT; + actorCs->obj.id = OBJ_ACTOR_CUTSCENE; + + actorCs->obj.pos.x = 0.0f; + actorCs->obj.pos.y = 0.0f; + actorCs->obj.pos.z = 9000.0f; + + actorCs->animFrame = 10; + Object_SetInfo(&actorCs->info, actorCs->obj.id); } -void Meteo_8018CB50(Effect* effect, Actor* actor) { - Effect_Initialize(effect); - effect->obj.status = OBJ_ACTIVE; - effect->obj.id = OBJ_EFFECT_346; - effect->timer_50 = RAND_INT(20.0f) + 20.0f; - effect->scale2 = RAND_FLOAT(0.5f) + 0.5f; +void Meteo_8018CB50(Effect346* this, Actor* actor) { + Effect_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_EFFECT_346; - effect->obj.pos.x = actor->obj.pos.x; - effect->obj.pos.y = actor->obj.pos.y; - effect->obj.pos.z = actor->obj.pos.z; + this->timer_50 = RAND_INT(20.0f) + 20.0f; + this->scale2 = RAND_FLOAT(0.5f) + 0.5f; - effect->vel.x = RAND_FLOAT_CENTERED(30.0f); - effect->vel.y = RAND_FLOAT_CENTERED(30.0f); - effect->vel.z = RAND_FLOAT_CENTERED(30.0f); + this->obj.pos.x = actor->obj.pos.x; + this->obj.pos.y = actor->obj.pos.y; + this->obj.pos.z = actor->obj.pos.z; - effect->obj.rot.z = RAND_FLOAT(360.0f); - Object_SetInfo(&effect->info, effect->obj.id); + this->vel.x = RAND_FLOAT_CENTERED(30.0f); + this->vel.y = RAND_FLOAT_CENTERED(30.0f); + this->vel.z = RAND_FLOAT_CENTERED(30.0f); + + this->obj.rot.z = RAND_FLOAT(360.0f); + Object_SetInfo(&this->info, this->obj.id); } -void Meteo_8018CCF8(Actor* actor) { +void Meteo_8018CCF8(ActorEvent* this) { s32 i; s32 j; - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); for (i = 0; i < 25; ++i) { for (j = 0; j < ARRAY_COUNT(gEffects); j++) { if (gEffects[j].obj.status == OBJ_FREE) { - Meteo_8018CB50(&gEffects[j], actor); + Meteo_8018CB50(&gEffects[j], this); break; } } @@ -1965,6 +1971,7 @@ void Meteo_LevelStart(Player* player) { D_ctx_80177A48[0] = 0.0f; player->csTimer = 40; } + sp8F = false; if (gCsFrameCount == 190) { player->csEventTimer = 5; @@ -1987,8 +1994,8 @@ void Meteo_LevelStart(Player* player) { sp8F = true; } if (gCsFrameCount == 600) { - Meteo_8018CA10(&gActors[16], &gActors[3], 100.0f, 500.0f, 1500.0f); - Meteo_8018CA10(&gActors[17], &gActors[3], 300.0f, 400.0f, 2000.0f); + Meteo_8018CA10(&gActors[16], actor3, 100.0f, 500.0f, 1500.0f); + Meteo_8018CA10(&gActors[17], actor3, 300.0f, 400.0f, 2000.0f); } if (gCsFrameCount == 660) { for (i = 4; i < 15; i++) { @@ -1999,15 +2006,15 @@ void Meteo_LevelStart(Player* player) { actor3->obj.pos.z += 4000.0f; for (i = 4; i < 9; i++) { - Meteo_8018C8F4(&gActors[i], &gActors[3]); + Meteo_8018C8F4(&gActors[i], actor3); } actor3->obj.pos.x -= 1000.0f; actor3->obj.pos.z -= 4000.0f; - Meteo_8018CA10(&gActors[13], &gActors[3], 1500.0f, 200.0f, 100.0f); - Meteo_8018CA10(&gActors[14], &gActors[3], 1200.0f, -200.0f, -500.0f); - Meteo_8018CA10(&gActors[15], &gActors[3], 2000.0f, -100.0f, -1000.0f); + Meteo_8018CA10(&gActors[13], actor3, 1500.0f, 200.0f, 100.0f); + Meteo_8018CA10(&gActors[14], actor3, 1200.0f, -200.0f, -500.0f); + Meteo_8018CA10(&gActors[15], actor3, 2000.0f, -100.0f, -1000.0f); gActors[50].obj.status = gActors[16].obj.status = gActors[17].obj.status = OBJ_FREE; } @@ -2113,49 +2120,53 @@ void Meteo_LevelStart(Player* player) { Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 20000.0f, 0.0f); } -void Meteo_8018D9EC(Actor* actor) { - switch (actor->state) { +// Actors from OBJ_ACTOR_183 to OBJ_ACTOR_185 +void Meteo_ActorDoodad_Update(Actor* this) { + switch (this->state) { case 0: - actor->fwork[0] = RAND_FLOAT_CENTERED(10.0f); - actor->state = 1; + this->fwork[0] = RAND_FLOAT_CENTERED(10.0f); + this->state = 1; case 1: - actor->obj.rot.z += actor->fwork[0]; + this->obj.rot.z += this->fwork[0]; break; } - Meteo_80187530(actor); + Meteo_ReflectDamage(this); } -void Meteo_8018DA6C(Actor* actor) { +// Little Meteor piece 1 +void Meteo_Actor183_Draw(Actor183* this) { RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gSPDisplayList(gMasterDisp++, D_ME_6017AD0); } -void Meteo_8018DAEC(Actor* actor) { +// Little Meteor piece 2 +void Meteo_Actor184_Draw(Actor184* this) { RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gSPDisplayList(gMasterDisp++, D_ME_6016240); } -void Meteo_8018DB6C(Actor* actor) { +// Little Meteor piece 3 +void Meteo_Actor185_Draw(Actor185* this) { RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gSPDisplayList(gMasterDisp++, D_ME_600CD60); } -void Meteo_8018DBEC(Effect* effect) { - if (effect->state == 1) { - Matrix_RotateX(gGfxMatrix, effect->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY); +void Meteo_Effect370_Draw(Effect370* this) { + if (this->state == 1) { + Matrix_RotateX(gGfxMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->scale2, this->scale2, this->scale2, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_44); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_44); gSPDisplayList(gMasterDisp++, D_ME_60263F0); } } -void Meteo_8018DCE4(Effect* effect) { - if (effect->state != 0) { - Matrix_RotateX(gGfxMatrix, effect->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2 * 3.0f, MTXF_APPLY); +void Meteo_Effect369_Draw(Effect369* this) { + if (this->state != 0) { + Matrix_RotateX(gGfxMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->scale2, this->scale2, this->scale2 * 3.0f, MTXF_APPLY); if ((gGameFrameCount % 2) != 0) { Matrix_RotateZ(gGfxMatrix, M_PI, MTXF_APPLY); @@ -2163,18 +2174,18 @@ void Meteo_8018DCE4(Effect* effect) { Matrix_RotateX(gGfxMatrix, -M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gDPSetPrimColor(gMasterDisp++, 0, 0, 160, 255, 160, effect->unk_44); + gDPSetPrimColor(gMasterDisp++, 0, 0, 160, 255, 160, this->unk_44); gSPDisplayList(gMasterDisp++, D_102F5E0); } } -void Meteo_8018DE14(Effect* effect) { - Matrix_RotateX(gGfxMatrix, effect->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY); +void Meteo_Effect371_Draw(Effect371* this) { + Matrix_RotateX(gGfxMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->scale2, this->scale2, this->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_44); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_44); - switch (effect->unk_4C) { + switch (this->unk_4C) { case 0: gSPDisplayList(gMasterDisp++, D_ME_6023810); case 1: @@ -2182,27 +2193,27 @@ void Meteo_8018DE14(Effect* effect) { } } -void Meteo_8018DF08(Actor* actor, s32 idx) { - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_CUTSCENE; +void Meteo_8018DF08(ActorCutscene* this, s32 idx) { + Actor_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.pos.x = D_i2_801955D0[idx].x + gPlayer[0].pos.x; - actor->obj.pos.y = D_i2_801955D0[idx].y + gPlayer[0].pos.y; - actor->obj.pos.z = D_i2_801955D0[idx].z + gPlayer[0].trueZpos; + this->obj.pos.x = D_i2_801955D0[idx].x + gPlayer[0].pos.x; + this->obj.pos.y = D_i2_801955D0[idx].y + gPlayer[0].pos.y; + this->obj.pos.z = D_i2_801955D0[idx].z + gPlayer[0].trueZpos; - actor->rot_0F4.y = 0.0f; - actor->rot_0F4.z = D_i2_80195600[idx]; + this->rot_0F4.y = 0.0f; + this->rot_0F4.z = D_i2_80195600[idx]; - Object_SetInfo(&actor->info, actor->obj.id); + Object_SetInfo(&this->info, this->obj.id); if (idx == 3) { - AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); - AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, actor->sfxSource, 0); - actor->animFrame = 1; + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, this->sfxSource, 0); + this->animFrame = 1; } else { - actor->iwork[11] = 1; - AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); + this->iwork[11] = 1; + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); } } @@ -2245,11 +2256,10 @@ void Meteo_LevelComplete(Player* player) { gCsCamEyeX = gBosses[0].obj.pos.x + dest.x; gCsCamEyeY = gBosses[0].obj.pos.y + dest.y; - gCsCamEyeZ = gBosses[0].obj.pos.z + gPathProgress + dest.z; + gCsCamAtX = gBosses[0].obj.pos.x; gCsCamAtY = gBosses[0].obj.pos.y; - gCsCamAtZ = gBosses[0].obj.pos.z + gPathProgress; Math_SmoothStepToF(&D_ctx_80177A48[1], 180.0f, 0.05f, 1.0f, 0.0f); @@ -2476,52 +2486,52 @@ void Meteo_LevelComplete(Player* player) { player->rockAngle = SIN_DEG(player->rockPhase); } -void Meteo_8018ED9C(Actor* actor) { - Vec3f sp3C; - Vec3f sp30; +void Meteo_8018ED9C(ActorCutscene* this) { + Vec3f src; + Vec3f dest; - switch (actor->state) { + switch (this->state) { case 0: - actor->vwork[0].x = gPlayer[0].pos.x + D_i2_80195610[actor->index].x; - actor->vwork[0].y = gPlayer[0].pos.y + D_i2_80195610[actor->index].y; - actor->vwork[0].z = gPlayer[0].pos.z + D_i2_80195610[actor->index].z; + this->vwork[0].x = gPlayer[0].pos.x + D_i2_80195610[this->index].x; + this->vwork[0].y = gPlayer[0].pos.y + D_i2_80195610[this->index].y; + this->vwork[0].z = gPlayer[0].pos.z + D_i2_80195610[this->index].z; - Math_SmoothStepToF(&actor->obj.pos.x, actor->vwork[0].x, 0.02f, 50.0f, 0.0001f); - Math_SmoothStepToF(&actor->obj.pos.y, actor->vwork[0].y, 0.02f, 50.0f, 0.0001f); - Math_SmoothStepToF(&actor->obj.pos.z, actor->vwork[0].z, 0.02f, 50.0f, 0.0001f); - Math_SmoothStepToF(&actor->rot_0F4.z, 0.0f, 0.03f, 0.5f, 0.0001f); + Math_SmoothStepToF(&this->obj.pos.x, this->vwork[0].x, 0.02f, 50.0f, 0.0001f); + Math_SmoothStepToF(&this->obj.pos.y, this->vwork[0].y, 0.02f, 50.0f, 0.0001f); + Math_SmoothStepToF(&this->obj.pos.z, this->vwork[0].z, 0.02f, 50.0f, 0.0001f); + Math_SmoothStepToF(&this->rot_0F4.z, 0.0f, 0.03f, 0.5f, 0.0001f); break; case 1: - actor->state = 2; - AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); - actor->timer_0BC = 150; - actor->fwork[29] = 5.0f; + this->state = 2; + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, this->sfxSource, 0); + this->timer_0BC = 150; + this->fwork[29] = 5.0f; case 2: - actor->iwork[11] = 2; - actor->fwork[0] += 2.0f; - actor->rot_0F4.x += 0.1f; - if (actor->timer_0BC == 0) { - Object_Kill(&actor->obj, actor->sfxSource); + this->iwork[11] = 2; + this->fwork[0] += 2.0f; + this->rot_0F4.x += 0.1f; + if (this->timer_0BC == 0) { + Object_Kill(&this->obj, this->sfxSource); } break; } - Matrix_RotateY(gCalcMatrix, (actor->rot_0F4.y + 180.0f) * M_DTOR, 0U); - Matrix_RotateX(gCalcMatrix, -(actor->rot_0F4.x * M_DTOR), 1U); + Matrix_RotateY(gCalcMatrix, (this->rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(this->rot_0F4.x * M_DTOR), MTXF_APPLY); - sp3C.x = 0.0f; - sp3C.y = 0.0f; - sp3C.z = actor->fwork[0]; + src.x = 0.0f; + src.y = 0.0f; + src.z = this->fwork[0]; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp3C, &sp30); + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - actor->vel.x = sp30.x; - actor->vel.y = sp30.y; - actor->vel.z = sp30.z; + this->vel.x = dest.x; + this->vel.y = dest.y; + this->vel.z = dest.z; - actor->obj.rot.x = -actor->rot_0F4.x; - actor->obj.rot.y = actor->rot_0F4.y + 180.0f; - actor->obj.rot.z = -actor->rot_0F4.z; + this->obj.rot.x = -this->rot_0F4.x; + this->obj.rot.y = +this->rot_0F4.y + 180.0f; + this->obj.rot.z = -this->rot_0F4.z; } diff --git a/src/overlays/ovl_i2/fox_sx.c b/src/overlays/ovl_i2/fox_sx.c index d7a92903..30dde896 100644 --- a/src/overlays/ovl_i2/fox_sx.c +++ b/src/overlays/ovl_i2/fox_sx.c @@ -12,8 +12,8 @@ Vec3f D_i2_80195650 = { 90.0f, 0.0f, 0.0f }; Vec3f D_i2_8019565C = { 73.0f, -102.0f, -80.0f }; Vec3f D_i2_80195668 = { 90.0f, 0.0f, 0.0f }; -bool SectorX_80192AF0(s32, Gfx**, Vec3f*, Vec3f*, void*); -void SectorX_80193208(s32, Vec3f*, void*); +bool SectorX_Boss_OverrideLimbDraw(s32, Gfx**, Vec3f*, Vec3f*, void*); +void SectorX_Boss_PostLimbDraw(s32, Vec3f*, void*); void SectorX_8018F030(void) { s32 i; @@ -38,100 +38,114 @@ void SectorX_8018F030(void) { } } -void SectorX_8018F124(void) { - Actor* actor = &gActors[50]; +void SectorX_SlippyThrowToTitania(void) { + ActorSlippySX* slippy = &gActors[50]; - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_SLIPPY_SX; - actor->animFrame = -1; - actor->obj.pos.x = gPlayer[0].cam.eye.x + 3000.0f; - actor->obj.pos.y = gPlayer[0].cam.eye.y - 3000.0f; - actor->obj.pos.z = gPlayer[0].pos.z + 30000.0f; - Object_SetInfo(&actor->info, actor->obj.id); - actor->info.cullDistance = 100000.0f; + Actor_Initialize(slippy); + slippy->obj.status = OBJ_INIT; + slippy->obj.id = OBJ_ACTOR_SLIPPY_SX; + slippy->animFrame = -1; + + slippy->obj.pos.x = gPlayer[0].cam.eye.x + 3000.0f; + slippy->obj.pos.y = gPlayer[0].cam.eye.y - 3000.0f; + slippy->obj.pos.z = gPlayer[0].pos.z + 30000.0f; + + Object_SetInfo(&slippy->info, slippy->obj.id); + slippy->info.cullDistance = 100000.0f; } -void SectorX_8018F1DC(Actor* actor) { +void SectorX_SlippyShootBoss(ActorSlippySX* this) { Vec3f src; Vec3f dest; src.x = 0.0f; src.y = 0.0f; src.z = 100.0f; - Matrix_RotateY(gCalcMatrix, (actor->rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, actor->rot_0F4.x * M_DTOR, MTXF_APPLY); + + Matrix_RotateY(gCalcMatrix, (this->rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->rot_0F4.x * M_DTOR, MTXF_APPLY); + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - Actor_SpawnPlayerLaser(actor->index, actor->obj.pos.x + (dest.x * 1.5), actor->obj.pos.y + (dest.y * 1.5), - actor->obj.pos.z + (dest.z * 1.5), dest.x, dest.y, dest.z, actor->rot_0F4.x, - actor->rot_0F4.y + 180.0f, 0.0f); + + Actor_SpawnPlayerLaser(this->index, this->obj.pos.x + (dest.x * 1.5), this->obj.pos.y + (dest.y * 1.5), + this->obj.pos.z + (dest.z * 1.5), dest.x, dest.y, dest.z, this->rot_0F4.x, + this->rot_0F4.y + 180.0f, 0.0f); } -void SectorX_8018F330(Actor* actor) { +void SectorX_Slippy_Update(ActorSlippySX* this) { f32 sp34; - switch (actor->animFrame) { + switch (this->animFrame) { case 0: - actor->obj.rot.x += 7.0f; - actor->obj.rot.y += 5.0f; + this->obj.rot.x += 7.0f; + this->obj.rot.y += 5.0f; break; case 1: - actor->rot_0F4.z += 3.0f; - actor->obj.rot.z = SIN_DEG(actor->rot_0F4.z + 90.0f) * 60.0f; - sp34 = fabsf(actor->obj.pos.z - gBosses[0].obj.pos.z) * 0.1f; - Math_SmoothStepToF(&actor->obj.pos.x, gBosses[0].obj.pos.x + SIN_DEG(actor->rot_0F4.z) * sp34, 0.1f, 20.0f, + this->rot_0F4.z += 3.0f; + this->obj.rot.z = SIN_DEG(this->rot_0F4.z + 90.0f) * 60.0f; + sp34 = fabsf(this->obj.pos.z - gBosses[0].obj.pos.z) * 0.1f; + Math_SmoothStepToF(&this->obj.pos.x, gBosses[0].obj.pos.x + SIN_DEG(this->rot_0F4.z) * sp34, 0.1f, 20.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.pos.y, gBosses[0].obj.pos.y, 0.1f, 20.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.pos.z, gBosses[0].obj.pos.z, 1.0f, 55.0f, 0); + Math_SmoothStepToF(&this->obj.pos.y, gBosses[0].obj.pos.y, 0.1f, 20.0f, 0.0f); + Math_SmoothStepToF(&this->obj.pos.z, gBosses[0].obj.pos.z, 1.0f, 55.0f, 0); + if (gBosses[0].state == 20) { - actor->animFrame = 10; + this->animFrame = 10; break; } if (((gGameFrameCount % 4) == 0) && (Rand_ZeroOne() < 0.2f)) { - SectorX_8018F1DC(actor); + SectorX_SlippyShootBoss(this); } if ((gBosses[0].unk_04C == 75) && (gBosses[0].state == 85)) { - actor->animFrame = 2; - actor->vel.x = 10.0f; - actor->vel.y = -10.0f; - actor->vel.z = 30.0f; + this->animFrame = 2; + + this->vel.x = 10.0f; + this->vel.y = -10.0f; + this->vel.z = 30.0f; + Radio_PlayMessage(gMsg_ID_4111, RCID_SLIPPY); - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); + gBosses[0].swork[6] = 0; gTeamShields[TEAM_ID_SLIPPY] = -2; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_STANDBY; - actor->timer_0BC = 200; - actor->iwork[14] = 3; - actor->fwork[0] = 0.0f; - actor->fwork[1] = 0.0f; + + this->timer_0BC = 200; + this->iwork[14] = 3; + this->fwork[0] = 0.0f; + this->fwork[1] = 0.0f; + gProjectFar = 30000.0f; - SectorX_8018F124(); + + SectorX_SlippyThrowToTitania(); } break; case 2: - if (actor->timer_0BC == 100) { + if (this->timer_0BC == 100) { Radio_PlayMessage(gMsg_ID_20294, RCID_FOX); } - actor->obj.rot.x += 5.5f; - actor->obj.rot.y += 5.0f; + this->obj.rot.x += 5.5f; + this->obj.rot.y += 5.0f; - if (((gGameFrameCount % 8) == 0)) { - func_effect_8007D10C(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 1.5f); + if ((gGameFrameCount % 8) == 0) { + func_effect_8007D10C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1.5f); } - Math_SmoothStepToF(&actor->fwork[0], 0.5f, 1.0f, 0.01f, 0); - Math_SmoothStepToF(&actor->fwork[1], 0.1f, 1.0f, 0.01f, 0); - Math_SmoothStepToF(&gPlayer[0].cam.at.x, actor->obj.pos.x, actor->fwork[0], 100.0f, 0.0f); - Math_SmoothStepToF(&gPlayer[0].cam.at.y, actor->obj.pos.y, actor->fwork[0], 100.0f, 0.0f); - Math_SmoothStepToF(&gPlayer[0].cam.at.z, actor->obj.pos.z + gPathProgress, actor->fwork[0], 100.0f, 0.0f); - Math_SmoothStepToF(&gPlayer[0].cam.eye.x, actor->obj.pos.x - 30.0f, actor->fwork[1], 20.0f, 0.0f); - Math_SmoothStepToF(&gPlayer[0].cam.eye.y, actor->obj.pos.y, actor->fwork[1], 20.0f, 0.0f); - if (actor->timer_0BC == 0) { + Math_SmoothStepToF(&this->fwork[0], 0.5f, 1.0f, 0.01f, 0); + Math_SmoothStepToF(&this->fwork[1], 0.1f, 1.0f, 0.01f, 0); + + Math_SmoothStepToF(&gPlayer[0].cam.at.x, this->obj.pos.x, this->fwork[0], 100.0f, 0.0f); + Math_SmoothStepToF(&gPlayer[0].cam.at.y, this->obj.pos.y, this->fwork[0], 100.0f, 0.0f); + Math_SmoothStepToF(&gPlayer[0].cam.at.z, this->obj.pos.z + gPathProgress, this->fwork[0], 100.0f, 0.0f); + Math_SmoothStepToF(&gPlayer[0].cam.eye.x, this->obj.pos.x - 30.0f, this->fwork[1], 20.0f, 0.0f); + Math_SmoothStepToF(&gPlayer[0].cam.eye.y, this->obj.pos.y, this->fwork[1], 20.0f, 0.0f); + + if (this->timer_0BC == 0) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ACTIVE; if (gPlayer[0].alternateView) { Camera_UpdateCockpitOnRails(&gPlayer[0], 1); @@ -142,17 +156,17 @@ void SectorX_8018F330(Actor* actor) { break; case 10: - Math_SmoothStepToF(&actor->obj.rot.y, 90.0f, 0.1f, 10.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.rot.z, 90.0f, 1.0f, 10.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.pos.x, gBosses[0].obj.pos.x + 10000.0f, 0.1f, 40.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.pos.y, gBosses[0].obj.pos.y + 5000.0f, 0.1f, 10.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.pos.z, gBosses[0].obj.pos.z, 1.0f, 55.0f, 0.0f); + Math_SmoothStepToF(&this->obj.rot.y, 90.0f, 0.1f, 10.0f, 0.0f); + Math_SmoothStepToF(&this->obj.rot.z, 90.0f, 1.0f, 10.0f, 0.0f); + Math_SmoothStepToF(&this->obj.pos.x, gBosses[0].obj.pos.x + 10000.0f, 0.1f, 40.0f, 0.0f); + Math_SmoothStepToF(&this->obj.pos.y, gBosses[0].obj.pos.y + 5000.0f, 0.1f, 10.0f, 0.0f); + Math_SmoothStepToF(&this->obj.pos.z, gBosses[0].obj.pos.z, 1.0f, 55.0f, 0.0f); break; } } -void SectorX_8018F884(Actor* actor) { - switch (actor->animFrame) { +void SectorX_Slippy_Draw(ActorSlippySX* this) { + switch (this->animFrame) { case 0: gSPDisplayList(gMasterDisp++, D_SX_6020D20); break; @@ -160,12 +174,12 @@ void SectorX_8018F884(Actor* actor) { case 1: case 2: case 10: - func_edisplay_8005B388(actor); + func_edisplay_8005B388(this); break; case -1: - actor->obj.rot.y = RAD_TO_DEG(-gPlayer[gPlayerNum].camYaw); - actor->obj.rot.x = RAD_TO_DEG(gPlayer[gPlayerNum].camPitch); + this->obj.rot.y = RAD_TO_DEG(-gPlayer[gPlayerNum].camYaw); + this->obj.rot.x = RAD_TO_DEG(gPlayer[gPlayerNum].camPitch); RCP_SetupDL(&gMasterDisp, SETUPDL_64); gDPSetPrimColor(gMasterDisp++, 0, 0, 220, 70, 30, 255); Matrix_Scale(gGfxMatrix, 70.0f, 70.0f, 1.0f, MTXF_APPLY); @@ -250,37 +264,39 @@ void SectorX_8018FBBC(Vec3f* pos) { } } -void SectorX_8018FE38(Boss* boss) { +void SectorX_Boss304_Update(Boss304* this) { Vec3f sp2C; Vec3f sp20; - if (boss->state == 0) { - Animation_GetFrameData(&D_SX_60206DC, boss->unk_04C, boss->vwork); - Math_Vec3fFromAngles(&sp20, boss->obj.rot.x, boss->obj.rot.y, 20.0f); - boss->vel.x = sp20.x; - boss->vel.y = sp20.y; - boss->vel.z = sp20.z; - boss->state++; + if (this->state == 0) { + Animation_GetFrameData(&D_SX_60206DC, this->unk_04C, this->vwork); + Math_Vec3fFromAngles(&sp20, this->obj.rot.x, this->obj.rot.y, 20.0f); + this->vel.x = sp20.x; + this->vel.y = sp20.y; + this->vel.z = sp20.z; + this->state++; } else { - if (boss->obj.id == OBJ_BOSS_304) { - sp2C.x = boss->fwork[11]; - sp2C.y = boss->fwork[12]; - sp2C.z = boss->fwork[13]; + if (this->obj.id == OBJ_BOSS_304) { + sp2C.x = this->fwork[11]; + sp2C.y = this->fwork[12]; + sp2C.z = this->fwork[13]; } else { - sp2C.x = boss->fwork[8]; - sp2C.y = boss->fwork[9]; - sp2C.z = boss->fwork[10]; + sp2C.x = this->fwork[8]; + sp2C.y = this->fwork[9]; + sp2C.z = this->fwork[10]; } SectorX_8018FBBC(&sp2C); } - if (boss->dmgType == DMG_BEAM) { - boss->dmgType = DMG_NONE; - func_effect_8007A6F0(&boss->obj.pos, NA_SE_EN_REFLECT); + + if (this->dmgType == DMG_BEAM) { + this->dmgType = DMG_NONE; + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_REFLECT); } } -void SectorX_8018FF20(Boss* boss) { - SectorX_8018FE38(boss); +// Doors that open when the robot arm hits them? +void SectorX_Boss305_Update(Boss305* this) { + SectorX_Boss304_Update(this); } bool SectorX_8018FF40(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { @@ -291,8 +307,9 @@ bool SectorX_8018FF40(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return 0; } -void SectorX_8018FF84(Boss* boss) { - Animation_DrawSkeleton(3, D_SX_6020C68, boss->vwork, SectorX_8018FF40, SectorX_80193208, boss, gCalcMatrix); +void SectorX_Boss304_Draw(Boss304* this) { + Animation_DrawSkeleton(3, D_SX_6020C68, this->vwork, SectorX_8018FF40, SectorX_Boss_PostLimbDraw, this, + gCalcMatrix); } bool SectorX_8018FFDC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { @@ -303,15 +320,16 @@ bool SectorX_8018FFDC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return 0; } -void SectorX_80190020(Boss* boss) { - Animation_DrawSkeleton(3, D_SX_6020C68, boss->vwork, SectorX_8018FFDC, SectorX_80193208, boss, gCalcMatrix); +void SectorX_Boss305_Draw(Boss305* this) { + Animation_DrawSkeleton(3, D_SX_6020C68, this->vwork, SectorX_8018FFDC, SectorX_Boss_PostLimbDraw, this, + gCalcMatrix); } -void SectorX_80190078(Boss* boss) { +void SectorX_Boss_Update(Spyborg* this) { u8 attack; s32 i; - Vec3f sp80[50]; - Vec3f sp74; + Vec3f frameTable[50]; + Vec3f sfxPos; f32 sp70; f32 sp6C; f32 sp68; @@ -356,727 +374,727 @@ void SectorX_80190078(Boss* boss) { if (gBossFrameCount > 556) { // approximately 700 / 256 - gBossHealthBar = (boss->swork[3] + boss->health) / 2.73f; + gBossHealthBar = (this->swork[3] + this->health) / 2.73f; } - sp68 = gPlayer[0].pos.x - boss->obj.pos.x; - sp64 = gPlayer[0].trueZpos - (boss->obj.pos.z + (-237.0f)); + sp68 = gPlayer[0].pos.x - this->obj.pos.x; + sp64 = gPlayer[0].trueZpos - (this->obj.pos.z + (-237.0f)); - if (boss->swork[7] != 0) { + if (this->swork[7] != 0) { sp70 = Math_RadToDeg(Math_Atan2F(sp68, sp64)); - sp6C = Math_RadToDeg(-Math_Atan2F(gPlayer[0].pos.y - (boss->obj.pos.y + 334.0f), sqrtf(SQ(sp68) + SQ(sp64)))); - Math_SmoothStepToAngle(&boss->fwork[4], sp70, 0.1f, 5.0f, 0.00001f); - Math_SmoothStepToAngle(&boss->fwork[6], sp6C, 0.1f, 5.0f, 0.00001f); + sp6C = Math_RadToDeg(-Math_Atan2F(gPlayer[0].pos.y - (this->obj.pos.y + 334.0f), sqrtf(SQ(sp68) + SQ(sp64)))); + Math_SmoothStepToAngle(&this->fwork[4], sp70, 0.1f, 5.0f, 0.00001f); + Math_SmoothStepToAngle(&this->fwork[6], sp6C, 0.1f, 5.0f, 0.00001f); } else { - Math_SmoothStepToF(&boss->fwork[4], 182.0f, 0.1f, 2.0f, 0.00001f); - Math_SmoothStepToAngle(&boss->fwork[6], 0.0f, 0.1f, 1.0f, 0.00001f); + Math_SmoothStepToF(&this->fwork[4], 182.0f, 0.1f, 2.0f, 0.00001f); + Math_SmoothStepToAngle(&this->fwork[6], 0.0f, 0.1f, 1.0f, 0.00001f); } - boss->fwork[5] = SIN_DEG(boss->timer_054 * 50.0f) * boss->timer_054; - boss->fwork[7] = SIN_DEG(boss->timer_054 * 30.0f) * boss->timer_054 * 0.5f; + this->fwork[5] = SIN_DEG(this->timer_054 * 50.0f) * this->timer_054; + this->fwork[7] = SIN_DEG(this->timer_054 * 30.0f) * this->timer_054 * 0.5f; - Math_SmoothStepToF(&boss->obj.pos.z, gPlayer[0].pos.z + boss->fwork[1], 0.1f, boss->fwork[42], 0); - Math_SmoothStepToF(&boss->obj.pos.y, boss->fwork[2], 0.05f, boss->fwork[43], 0); - Math_SmoothStepToF(&boss->obj.pos.x, boss->fwork[3], 0.05f, boss->fwork[44], 0); - Math_SmoothStepToAngle(&boss->obj.rot.z, boss->fwork[41], 0.05f, 2.0f, 0); + Math_SmoothStepToF(&this->obj.pos.z, gPlayer[0].pos.z + this->fwork[1], 0.1f, this->fwork[42], 0); + Math_SmoothStepToF(&this->obj.pos.y, this->fwork[2], 0.05f, this->fwork[43], 0); + Math_SmoothStepToF(&this->obj.pos.x, this->fwork[3], 0.05f, this->fwork[44], 0); + Math_SmoothStepToAngle(&this->obj.rot.z, this->fwork[41], 0.05f, 2.0f, 0); - if (boss->state != 5) { - Math_SmoothStepToF(&boss->fwork[29], 0.f, 0.1f, 50.0f, 0); - Math_SmoothStepToF(&boss->fwork[30], 0.f, 0.1f, 50.0f, 0); - Math_SmoothStepToF(&boss->fwork[31], 0.f, 0.1f, 50.0f, 0); - Math_SmoothStepToF(&boss->fwork[32], 0.f, 0.1f, 50.0f, 0); - Math_SmoothStepToF(&boss->fwork[33], 0.f, 0.1f, 50.0f, 0); - Math_SmoothStepToF(&boss->fwork[34], 0.f, 0.1f, 50.0f, 0); - if (boss->state != 4) { - Math_SmoothStepToF(&boss->fwork[27], 0.0f, 0.1f, 2.0f, 0); - Math_SmoothStepToF(&boss->fwork[28], 0.0f, 0.1f, 2.0f, 0); + if (this->state != 5) { + Math_SmoothStepToF(&this->fwork[29], 0.f, 0.1f, 50.0f, 0); + Math_SmoothStepToF(&this->fwork[30], 0.f, 0.1f, 50.0f, 0); + Math_SmoothStepToF(&this->fwork[31], 0.f, 0.1f, 50.0f, 0); + Math_SmoothStepToF(&this->fwork[32], 0.f, 0.1f, 50.0f, 0); + Math_SmoothStepToF(&this->fwork[33], 0.f, 0.1f, 50.0f, 0); + Math_SmoothStepToF(&this->fwork[34], 0.f, 0.1f, 50.0f, 0); + if (this->state != 4) { + Math_SmoothStepToF(&this->fwork[27], 0.0f, 0.1f, 2.0f, 0); + Math_SmoothStepToF(&this->fwork[28], 0.0f, 0.1f, 2.0f, 0); } } - if (boss->dmgType != DMG_NONE) { - boss->dmgType = DMG_NONE; - if (boss->swork[0] == 1) { - if ((boss->dmgPart == 0) && ((boss->fwork[4] < 45.0f) || (boss->fwork[4] > 315.0f))) { - AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, boss->sfxSource, 4); - boss->swork[3] -= boss->damage; - boss->timer_054 = 20; - func_effect_8007C120(boss->obj.pos.x, boss->obj.pos.y + 334.0f, -237.0f + boss->obj.pos.z, boss->vel.x, - boss->vel.y, boss->vel.z, 0.2f, 20); + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + if (this->swork[0] == 1) { + if ((this->dmgPart == 0) && ((this->fwork[4] < 45.0f) || (this->fwork[4] > 315.0f))) { + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, this->sfxSource, 4); + this->swork[3] -= this->damage; + this->timer_054 = 20; + func_effect_8007C120(this->obj.pos.x, this->obj.pos.y + 334.0f, -237.0f + this->obj.pos.z, this->vel.x, + this->vel.y, this->vel.z, 0.2f, 20); - if (boss->swork[3] <= 0) { - func_effect_8007BFFC(boss->obj.pos.x, boss->obj.pos.y + 300.0f, boss->obj.pos.z, 0.0f, 0.0f, 0.0f, + if (this->swork[3] <= 0) { + func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y + 300.0f, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 10.0f, 50); - func_effect_8007C120(boss->obj.pos.x, boss->obj.pos.y + 334.0f, -237.0f + boss->obj.pos.z, - boss->vel.x, boss->vel.y, boss->vel.z, 0.15f, 70); + func_effect_8007C120(this->obj.pos.x, this->obj.pos.y + 334.0f, -237.0f + this->obj.pos.z, + this->vel.x, this->vel.y, this->vel.z, 0.15f, 70); for (i = 0; i < 10; i++) { - Play_SpawnDebris(4, boss->obj.pos.x, boss->obj.pos.y + 334.0f, -237.0f + boss->obj.pos.z); + Play_SpawnDebris(4, this->obj.pos.x, this->obj.pos.y + 334.0f, -237.0f + this->obj.pos.z); } - func_effect_8007A6F0(&boss->obj.pos, NA_SE_EN_EXPLOSION_L); - boss->state = 7; - boss->timer_050 = 80; - boss->swork[0] = 0; - boss->timer_05C = 80; - boss->swork[1] = 0; - boss->fwork[0] = 0.0f; - boss->unk_04C = 0; - boss->swork[4] = 1; - boss->health = 1; - boss->swork[7] = 1; + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_L); + this->state = 7; + this->timer_050 = 80; + this->swork[0] = 0; + this->timer_05C = 80; + this->swork[1] = 0; + this->fwork[0] = 0.0f; + this->unk_04C = 0; + this->swork[4] = 1; + this->health = 1; + this->swork[7] = 1; Audio_KillSfxBySourceAndId(D_i2_80195D88, NA_SE_EN_SZMIS_ENGINE); Audio_KillSfxBySourceAndId(D_i2_80195D98, NA_SE_EN_SZMIS_ENGINE); - boss->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SX_603265C); + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SX_603265C); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); - boss->timer_052 = 40; + this->timer_052 = 40; gScreenFlashTimer = 5; } } else { - func_effect_8007A6F0(&boss->obj.pos, NA_SE_EN_REFLECT); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_REFLECT); } } else { - func_effect_8007A6F0(&boss->obj.pos, NA_SE_EN_REFLECT); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_REFLECT); } - if (boss->swork[0] == 2) { - if (boss->dmgPart == 0) { - boss->health -= boss->damage; + if (this->swork[0] == 2) { + if (this->dmgPart == 0) { + this->health -= this->damage; - AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, this->sfxSource, 4); - if (boss->health <= 0) { + if (this->health <= 0) { gTeamLowHealthMsgTimer = -1; - boss->obj.rot.y = Math_ModF(boss->obj.rot.y, 360.0f); - boss->state = 20; - boss->timer_050 = 300; - boss->fwork[0] = 0.0f; - boss->unk_04C = 0; + this->obj.rot.y = Math_ModF(this->obj.rot.y, 360.0f); + this->state = 20; + this->timer_050 = 300; + this->fwork[0] = 0.0f; + this->unk_04C = 0; Radio_PlayMessage(gMsg_ID_5499, RCID_BOSS_SECTORX); - func_effect_8007BFFC(boss->obj.pos.x, boss->obj.pos.y + 300.0f, boss->obj.pos.z, 0.0f, 0.0f, 0.0f, + func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y + 300.0f, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 10.0f, 50); - func_effect_8007C120(boss->obj.pos.x, boss->obj.pos.y + 334.0f, -237.0f + boss->obj.pos.z, - boss->vel.x, boss->vel.y, boss->vel.z, 0.15f, 70); + func_effect_8007C120(this->obj.pos.x, this->obj.pos.y + 334.0f, -237.0f + this->obj.pos.z, + this->vel.x, this->vel.y, this->vel.z, 0.15f, 70); for (i = 0; i < 10; i++) { - Play_SpawnDebris(4, boss->obj.pos.x, boss->obj.pos.y + 334.0f, -237.0f + boss->obj.pos.z); + Play_SpawnDebris(4, this->obj.pos.x, this->obj.pos.y + 334.0f, -237.0f + this->obj.pos.z); } - boss->swork[4] = 2; + this->swork[4] = 2; - AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, this->sfxSource, 4); gScreenFlashTimer = 8; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); - Boss_AwardBonus(boss); - boss->info.hitbox = gNoHitbox; + Boss_AwardBonus(this); + this->info.hitbox = gNoHitbox; } - boss->timer_054 = 20; - boss->timer_05C = boss->timer_054; - func_effect_8007C120(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, boss->vel.x, boss->vel.y, - boss->vel.z, 0.2f, 10); + this->timer_054 = 20; + this->timer_05C = this->timer_054; + func_effect_8007C120(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, + this->vel.z, 0.2f, 10); } else { - func_effect_8007A6F0(&boss->obj.pos, NA_SE_EN_REFLECT); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_REFLECT); } } } - if (((boss->state != 8) && (boss->state != 20)) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_ACTIVE)) { - boss->state = 8; - boss->fwork[0] = 0.0f; + if (((this->state != 8) && (this->state != 20)) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_ACTIVE)) { + this->state = 8; + this->fwork[0] = 0.0f; Audio_KillSfxBySourceAndId(D_i2_80195D88, NA_SE_EN_SZMIS_ENGINE); Audio_KillSfxBySourceAndId(D_i2_80195D98, NA_SE_EN_SZMIS_ENGINE); } - boss->vel.z = -20.0f; + this->vel.z = -20.0f; - switch (boss->state) { + switch (this->state) { case 0: - boss->swork[7] = 1; - boss->obj.pos.x = gPlayer[0].xPath; - boss->swork[0] = 0; - Animation_GetFrameData(&D_SX_60206DC, boss->unk_04C, boss->vwork); - boss->fwork[1] = -2000.0f; - boss->fwork[14] = 300.0f; - boss->fwork[17] = -300.0f; - boss->fwork[16] = 3500.0f; - boss->fwork[19] = 3000.0f; - boss->state = 90; - boss->timer_050 = 450; - boss->swork[3] = 400; - boss->health = 300; - boss->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SX_6032550); + this->swork[7] = 1; + this->obj.pos.x = gPlayer[0].xPath; + this->swork[0] = 0; + Animation_GetFrameData(&D_SX_60206DC, this->unk_04C, this->vwork); + this->fwork[1] = -2000.0f; + this->fwork[14] = 300.0f; + this->fwork[17] = -300.0f; + this->fwork[16] = 3500.0f; + this->fwork[19] = 3000.0f; + this->state = 90; + this->timer_050 = 450; + this->swork[3] = 400; + this->health = 300; + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SX_6032550); gBossActive = true; AUDIO_PLAY_BGM(gBossBgms[gCurrentLevel]); - boss->swork[6] = 1; - boss->fwork[44] = 5.0f; - boss->fwork[43] = 5.0f; - boss->fwork[42] = 30.0f; + this->swork[6] = 1; + this->fwork[44] = 5.0f; + this->fwork[43] = 5.0f; + this->fwork[42] = 30.0f; break; case 90: - if ((boss->timer_050 == 110) || (boss->timer_050 == 66)) { - AUDIO_PLAY_SFX(NA_SE_EN_COMBINE, boss->sfxSource, 4); + if ((this->timer_050 == 110) || (this->timer_050 == 66)) { + AUDIO_PLAY_SFX(NA_SE_EN_COMBINE, this->sfxSource, 4); } - if (fabsf(Math_SmoothStepToF(&boss->fwork[16], 0.0f, 0.1f, 10.0f, 0)) < 8.0f) { - Math_SmoothStepToF(&boss->fwork[14], 0.0f, 0.2f, 10.0f, 0); - if ((boss->timer_050 % 8) == 0) { - func_effect_8007C120(boss->obj.pos.x + 312.0f, boss->obj.pos.y, boss->obj.pos.z - 173.0f, - boss->vel.x, boss->vel.y, boss->vel.z, 0.2f, 8); + if (fabsf(Math_SmoothStepToF(&this->fwork[16], 0.0f, 0.1f, 10.0f, 0)) < 8.0f) { + Math_SmoothStepToF(&this->fwork[14], 0.0f, 0.2f, 10.0f, 0); + if ((this->timer_050 % 8) == 0) { + func_effect_8007C120(this->obj.pos.x + 312.0f, this->obj.pos.y, this->obj.pos.z - 173.0f, + this->vel.x, this->vel.y, this->vel.z, 0.2f, 8); } } - if (fabsf(Math_SmoothStepToF(&boss->fwork[19], 0.0f, 0.1f, 10.0f, 0)) < 8.0f) { - Math_SmoothStepToF(&boss->fwork[17], 0.0f, 0.2f, 10.0f, 0); - if ((boss->timer_050 % 8) == 0) { - func_effect_8007C120(boss->obj.pos.x - 312.0f, boss->obj.pos.y, boss->obj.pos.z - 173.0f, - boss->vel.x, boss->vel.y, boss->vel.z, 0.2f, 8); + if (fabsf(Math_SmoothStepToF(&this->fwork[19], 0.0f, 0.1f, 10.0f, 0)) < 8.0f) { + Math_SmoothStepToF(&this->fwork[17], 0.0f, 0.2f, 10.0f, 0); + if ((this->timer_050 % 8) == 0) { + func_effect_8007C120(this->obj.pos.x - 312.0f, this->obj.pos.y, this->obj.pos.z - 173.0f, + this->vel.x, this->vel.y, this->vel.z, 0.2f, 8); } } - if (boss->timer_050 == 0) { - boss->state = 100; - boss->fwork[0] = 0.0f; - AUDIO_PLAY_SFX(NA_SE_EN_MOTOR_ROLL, boss->sfxSource, 4); + if (this->timer_050 == 0) { + this->state = 100; + this->fwork[0] = 0.0f; + AUDIO_PLAY_SFX(NA_SE_EN_MOTOR_ROLL, this->sfxSource, 4); } - boss->fwork[43] = boss->fwork[44] = 5.0f; - boss->fwork[42] = 30.0f; + this->fwork[43] = this->fwork[44] = 5.0f; + this->fwork[42] = 30.0f; break; case 100: - boss->fwork[1] = -2000.0f; + this->fwork[1] = -2000.0f; - frameData = Animation_GetFrameData(&D_SX_60206DC, boss->unk_04C, sp80); - Math_SmoothStepToVec3fArray(sp80, boss->vwork, 1, frameData, boss->fwork[0], 100.0f, 0.0f); + frameData = Animation_GetFrameData(&D_SX_60206DC, this->unk_04C, frameTable); + Math_SmoothStepToVec3fArray(frameTable, this->vwork, 1, frameData, this->fwork[0], 100.0f, 0.0f); - Math_SmoothStepToF(&boss->fwork[0], 1.0f, 1.0f, 0.05f, 0); - boss->unk_04C++; + Math_SmoothStepToF(&this->fwork[0], 1.0f, 1.0f, 0.05f, 0); + this->unk_04C++; - if (boss->unk_04C >= Animation_GetFrameCount(&D_SX_60206DC)) { - boss->unk_04C = 0; - boss->state = 1; - boss->fwork[0] = 0.0f; - AUDIO_PLAY_SFX(NA_SE_EN_UNIT_COMBINE, boss->sfxSource, 4); + if (this->unk_04C >= Animation_GetFrameCount(&D_SX_60206DC)) { + this->unk_04C = 0; + this->state = 1; + this->fwork[0] = 0.0f; + AUDIO_PLAY_SFX(NA_SE_EN_UNIT_COMBINE, this->sfxSource, 4); } - boss->fwork[43] = boss->fwork[44] = 5.0f; - boss->fwork[42] = 30.0f; + this->fwork[43] = this->fwork[44] = 5.0f; + this->fwork[42] = 30.0f; break; case 1: // Taunt - boss->fwork[1] = -1800.0f; - boss->fwork[3] = gPlayer[0].pos.x; - boss->fwork[2] = gPlayer[0].pos.y; - boss->fwork[42] = 30.0f; - boss->fwork[44] = 5.0f; - boss->fwork[43] = 5.0f; + this->fwork[1] = -1800.0f; + this->fwork[3] = gPlayer[0].pos.x; + this->fwork[2] = gPlayer[0].pos.y; + this->fwork[42] = 30.0f; + this->fwork[44] = 5.0f; + this->fwork[43] = 5.0f; - frameData = Animation_GetFrameData(&D_SX_6016E28, boss->unk_04C, sp80); - Math_SmoothStepToVec3fArray(sp80, boss->vwork, 1, frameData, boss->fwork[0], 100.0f, 0.0f); + frameData = Animation_GetFrameData(&D_SX_6016E28, this->unk_04C, frameTable); + Math_SmoothStepToVec3fArray(frameTable, this->vwork, 1, frameData, this->fwork[0], 100.0f, 0.0f); - Math_SmoothStepToF(&boss->fwork[0], 1.0f, 1.0f, 0.05f, 0); + Math_SmoothStepToF(&this->fwork[0], 1.0f, 1.0f, 0.05f, 0); - boss->unk_04C++; - if (boss->unk_04C >= Animation_GetFrameCount(&D_SX_6016E28)) { - boss->unk_04C = 0; - boss->state = 2; - boss->fwork[0] = 0.0f; - boss->swork[1] = 1; - boss->swork[0] = 1; + this->unk_04C++; + if (this->unk_04C >= Animation_GetFrameCount(&D_SX_6016E28)) { + this->unk_04C = 0; + this->state = 2; + this->fwork[0] = 0.0f; + this->swork[1] = 1; + this->swork[0] = 1; Radio_PlayMessage(gMsg_ID_5494, RCID_BOSS_SECTORX); } break; case 2: // right arm attack attack = true; - boss->fwork[3] = gPlayer[0].pos.x; - boss->fwork[2] = gPlayer[0].pos.y; + this->fwork[3] = gPlayer[0].pos.x; + this->fwork[2] = gPlayer[0].pos.y; - if (boss->unk_04C > 60) { - boss->fwork[1] = -1000.0f; - Math_SmoothStepToF(&boss->fwork[42], 100.0f, 1.0f, 20.0f, 0); - boss->fwork[43] = boss->fwork[44] = 10.0f; + if (this->unk_04C > 60) { + this->fwork[1] = -1000.0f; + Math_SmoothStepToF(&this->fwork[42], 100.0f, 1.0f, 20.0f, 0); + this->fwork[43] = this->fwork[44] = 10.0f; } else { - boss->fwork[1] = -2000.0f; - Math_SmoothStepToF(&boss->fwork[42], 30.0f, 1.0f, 3.0f, 0); - boss->fwork[43] = boss->fwork[44] = 10.0f; + this->fwork[1] = -2000.0f; + Math_SmoothStepToF(&this->fwork[42], 30.0f, 1.0f, 3.0f, 0); + this->fwork[43] = this->fwork[44] = 10.0f; } - if (boss->unk_04C == 60) { - AUDIO_PLAY_SFX(NA_SE_EN_THROW, boss->sfxSource, 4); - boss->fwork[42] = 0.0f; + if (this->unk_04C == 60) { + AUDIO_PLAY_SFX(NA_SE_EN_THROW, this->sfxSource, 4); + this->fwork[42] = 0.0f; } - frameData = Animation_GetFrameData(&D_SX_60123BC, boss->unk_04C, sp80); - Math_SmoothStepToVec3fArray(sp80, boss->vwork, 1, frameData, boss->fwork[0], 100.0f, 0.0f); + frameData = Animation_GetFrameData(&D_SX_60123BC, this->unk_04C, frameTable); + Math_SmoothStepToVec3fArray(frameTable, this->vwork, 1, frameData, this->fwork[0], 100.0f, 0.0f); - Math_SmoothStepToF(&boss->fwork[0], 1.0f, 1.0f, 0.05f, 0); + Math_SmoothStepToF(&this->fwork[0], 1.0f, 1.0f, 0.05f, 0); - boss->unk_04C++; - if (boss->unk_04C >= Animation_GetFrameCount(&D_SX_60123BC)) { - boss->unk_04C = 0; - boss->state = 3; - boss->fwork[42] = boss->fwork[43] = boss->fwork[44] = boss->fwork[0] = 0.0f; - boss->swork[7] = 0; + this->unk_04C++; + if (this->unk_04C >= Animation_GetFrameCount(&D_SX_60123BC)) { + this->unk_04C = 0; + this->state = 3; + this->fwork[42] = this->fwork[43] = this->fwork[44] = this->fwork[0] = 0.0f; + this->swork[7] = 0; } break; case 3: // left arm attack attack = true; - boss->fwork[3] = gPlayer[0].pos.x; - boss->fwork[2] = gPlayer[0].pos.y; + this->fwork[3] = gPlayer[0].pos.x; + this->fwork[2] = gPlayer[0].pos.y; - if (boss->unk_04C > 60) { - boss->fwork[1] = -1000.0f; - Math_SmoothStepToF(&boss->fwork[42], 100.0f, 1.0f, 20.0f, 0); - boss->fwork[44] = 10.0f; - boss->fwork[43] = 10.0f; + if (this->unk_04C > 60) { + this->fwork[1] = -1000.0f; + Math_SmoothStepToF(&this->fwork[42], 100.0f, 1.0f, 20.0f, 0); + this->fwork[44] = 10.0f; + this->fwork[43] = 10.0f; } else { - boss->fwork[1] = -2500.0f; - Math_SmoothStepToF(&boss->fwork[42], 30.0f, 1.0f, 3.0f, 0); - boss->fwork[44] = 10.0f; - boss->fwork[43] = 10.0f; + this->fwork[1] = -2500.0f; + Math_SmoothStepToF(&this->fwork[42], 30.0f, 1.0f, 3.0f, 0); + this->fwork[44] = 10.0f; + this->fwork[43] = 10.0f; } - if (boss->unk_04C == 60) { - AUDIO_PLAY_SFX(NA_SE_EN_THROW, boss->sfxSource, 4); - boss->fwork[42] = 0.0f; + if (this->unk_04C == 60) { + AUDIO_PLAY_SFX(NA_SE_EN_THROW, this->sfxSource, 4); + this->fwork[42] = 0.0f; } - frameData = Animation_GetFrameData(&D_SX_6013798, boss->unk_04C, sp80); - Math_SmoothStepToVec3fArray(sp80, boss->vwork, 1, frameData, boss->fwork[0], 100.0f, 0.0f); + frameData = Animation_GetFrameData(&D_SX_6013798, this->unk_04C, frameTable); + Math_SmoothStepToVec3fArray(frameTable, this->vwork, 1, frameData, this->fwork[0], 100.0f, 0.0f); - Math_SmoothStepToF(&boss->fwork[0], 1.0f, 1.0f, 0.05f, 0); + Math_SmoothStepToF(&this->fwork[0], 1.0f, 1.0f, 0.05f, 0); - boss->unk_04C++; - if (boss->unk_04C >= Animation_GetFrameCount(&D_SX_6013798)) { - boss->unk_04C = 0; - boss->fwork[0] = 0.0f; - if (boss->swork[3] <= 250) { - boss->state = 4; - boss->timer_050 = 100; + this->unk_04C++; + if (this->unk_04C >= Animation_GetFrameCount(&D_SX_6013798)) { + this->unk_04C = 0; + this->fwork[0] = 0.0f; + if (this->swork[3] <= 250) { + this->state = 4; + this->timer_050 = 100; Radio_PlayMessage(gMsg_ID_5495, RCID_BOSS_SECTORX); - boss->fwork[44] = 0.0f; - boss->fwork[43] = 0.0f; - boss->fwork[42] = 0.0f; + this->fwork[44] = 0.0f; + this->fwork[43] = 0.0f; + this->fwork[42] = 0.0f; } else { - boss->state = 1; - boss->swork[1] = 1; - boss->swork[7] = 1; + this->state = 1; + this->swork[1] = 1; + this->swork[7] = 1; } } break; case 4: // Arms launch setup - boss->swork[7] = 0; - boss->fwork[1] = -3000.0f; - boss->fwork[3] = gPlayer[0].pos.x; - boss->fwork[2] = gPlayer[0].pos.y; + this->swork[7] = 0; + this->fwork[1] = -3000.0f; + this->fwork[3] = gPlayer[0].pos.x; + this->fwork[2] = gPlayer[0].pos.y; - Math_SmoothStepToF(&boss->fwork[44], 10.0f, 1.0f, 1.0f, 0); - Math_SmoothStepToF(&boss->fwork[43], 10.0f, 1.0f, 1.0f, 0); - Math_SmoothStepToF(&boss->fwork[42], 50.0f, 1.0f, 3.0f, 0); + Math_SmoothStepToF(&this->fwork[44], 10.0f, 1.0f, 1.0f, 0); + Math_SmoothStepToF(&this->fwork[43], 10.0f, 1.0f, 1.0f, 0); + Math_SmoothStepToF(&this->fwork[42], 50.0f, 1.0f, 3.0f, 0); - frameData = Animation_GetFrameData(&D_SX_6016E28, 0, sp80); - Math_SmoothStepToVec3fArray(sp80, boss->vwork, 1, frameData, boss->fwork[0], 100.0f, 0.0f); + frameData = Animation_GetFrameData(&D_SX_6016E28, 0, frameTable); + Math_SmoothStepToVec3fArray(frameTable, this->vwork, 1, frameData, this->fwork[0], 100.0f, 0.0f); - Math_SmoothStepToF(&boss->fwork[0], 1.0f, 1.0f, 0.05f, 0); - Math_SmoothStepToF(&boss->fwork[27], 30.0f, 0.05f, 1.0f, 0); - Math_SmoothStepToF(&boss->fwork[28], -30.0f, 0.05f, 1.0f, 0); + Math_SmoothStepToF(&this->fwork[0], 1.0f, 1.0f, 0.05f, 0); + Math_SmoothStepToF(&this->fwork[27], 30.0f, 0.05f, 1.0f, 0); + Math_SmoothStepToF(&this->fwork[28], -30.0f, 0.05f, 1.0f, 0); - if (boss->timer_050 == 0) { - boss->state = 5; - boss->timer_050 = 100; + if (this->timer_050 == 0) { + this->state = 5; + this->timer_050 = 100; Radio_PlayMessage(gMsg_ID_5496, RCID_FOX); } break; case 5: // arms lauching attack - sp74.x = boss->fwork[8] + boss->obj.pos.x; - sp74.y = boss->fwork[9] + boss->obj.pos.y; - sp74.z = boss->fwork[10] + boss->obj.pos.z; + sfxPos.x = this->fwork[8] + this->obj.pos.x; + sfxPos.y = this->fwork[9] + this->obj.pos.y; + sfxPos.z = this->fwork[10] + this->obj.pos.z; - Object_SetSfxSourceToPos(D_i2_80195D88, &sp74); + Object_SetSfxSourceToPos(D_i2_80195D88, &sfxPos); AUDIO_PLAY_SFX(NA_SE_EN_SZMIS_ENGINE, D_i2_80195D88, 4); - sp74.x = boss->fwork[11] + boss->obj.pos.x; - sp74.y = boss->fwork[12] + boss->obj.pos.y; - sp74.z = boss->fwork[13] + boss->obj.pos.z; + sfxPos.x = this->fwork[11] + this->obj.pos.x; + sfxPos.y = this->fwork[12] + this->obj.pos.y; + sfxPos.z = this->fwork[13] + this->obj.pos.z; - Object_SetSfxSourceToPos(D_i2_80195D98, &sp74); + Object_SetSfxSourceToPos(D_i2_80195D98, &sfxPos); AUDIO_PLAY_SFX(NA_SE_EN_SZMIS_ENGINE, D_i2_80195D98, 4); - Math_SmoothStepToF(&boss->fwork[27], 30.0f, 0.05f, 1.0f, 0); - Math_SmoothStepToF(&boss->fwork[28], -30.0f, 0.05f, 1.0f, 0); + Math_SmoothStepToF(&this->fwork[27], 30.0f, 0.05f, 1.0f, 0); + Math_SmoothStepToF(&this->fwork[28], -30.0f, 0.05f, 1.0f, 0); - sp60 = fabsf(boss->obj.pos.x + boss->fwork[8] - gPlayer[0].pos.x) * 0.1f; + sp60 = fabsf(this->obj.pos.x + this->fwork[8] - gPlayer[0].pos.x) * 0.1f; if (sp60 > 5.0f) { sp60 = 5.0f; } - if ((boss->obj.pos.x + boss->fwork[8]) < gPlayer[0].pos.x) { - boss->fwork[29] += sp60; + if ((this->obj.pos.x + this->fwork[8]) < gPlayer[0].pos.x) { + this->fwork[29] += sp60; } - if (gPlayer[0].pos.x < (boss->obj.pos.x + boss->fwork[8])) { - boss->fwork[29] -= sp60; + if (gPlayer[0].pos.x < (this->obj.pos.x + this->fwork[8])) { + this->fwork[29] -= sp60; } - sp60 = fabsf((boss->obj.pos.y + boss->fwork[9]) - gPlayer[0].pos.y) * 0.1f; + sp60 = fabsf((this->obj.pos.y + this->fwork[9]) - gPlayer[0].pos.y) * 0.1f; if (sp60 > 5.0f) { sp60 = 5.0f; } - if ((boss->obj.pos.y + boss->fwork[9]) < gPlayer[0].pos.y) { - boss->fwork[30] += sp60; + if ((this->obj.pos.y + this->fwork[9]) < gPlayer[0].pos.y) { + this->fwork[30] += sp60; } - if (gPlayer[0].pos.y < (boss->obj.pos.y + boss->fwork[9])) { - boss->fwork[30] -= sp60; + if (gPlayer[0].pos.y < (this->obj.pos.y + this->fwork[9])) { + this->fwork[30] -= sp60; } - sp60 = fabsf((boss->obj.pos.x + boss->fwork[11]) - gPlayer[0].pos.x) * 0.1f; + sp60 = fabsf((this->obj.pos.x + this->fwork[11]) - gPlayer[0].pos.x) * 0.1f; if (sp60 > 5.0f) { sp60 = 5.0f; } - if ((boss->obj.pos.x + boss->fwork[11]) < gPlayer[0].pos.x) { - boss->fwork[32] += sp60; + if ((this->obj.pos.x + this->fwork[11]) < gPlayer[0].pos.x) { + this->fwork[32] += sp60; } - if (gPlayer[0].pos.x < (boss->obj.pos.x + boss->fwork[11])) { - boss->fwork[32] -= sp60; + if (gPlayer[0].pos.x < (this->obj.pos.x + this->fwork[11])) { + this->fwork[32] -= sp60; } - sp60 = fabsf((boss->obj.pos.y + boss->fwork[12]) - gPlayer[0].pos.y) * 0.1f; + sp60 = fabsf((this->obj.pos.y + this->fwork[12]) - gPlayer[0].pos.y) * 0.1f; if (sp60 > 5.0f) { sp60 = 5.0f; } - if ((boss->obj.pos.y + boss->fwork[12]) < gPlayer[0].pos.y) { - boss->fwork[33] += sp60; + if ((this->obj.pos.y + this->fwork[12]) < gPlayer[0].pos.y) { + this->fwork[33] += sp60; } - if (gPlayer[0].pos.y < (boss->obj.pos.y + boss->fwork[12])) { - boss->fwork[33] -= sp60; + if (gPlayer[0].pos.y < (this->obj.pos.y + this->fwork[12])) { + this->fwork[33] -= sp60; } - Math_SmoothStepToF(&boss->fwork[31], 4000.0f, 1.0f, 80.0f, 0); + Math_SmoothStepToF(&this->fwork[31], 4000.0f, 1.0f, 80.0f, 0); - if (boss->timer_050 < 70) { - Math_SmoothStepToF(&boss->fwork[34], 4000.0f, 1.0f, 80.0f, 0); + if (this->timer_050 < 70) { + Math_SmoothStepToF(&this->fwork[34], 4000.0f, 1.0f, 80.0f, 0); } - if (boss->timer_050 == 0) { - boss->state = 6; - boss->timer_050 = 122; + if (this->timer_050 == 0) { + this->state = 6; + this->timer_050 = 122; } break; case 6: // Arms come back to robot - if ((boss->timer_050 == 20) || (boss->timer_050 == 30)) { - AUDIO_PLAY_SFX(NA_SE_EN_COMBINE, boss->sfxSource, 4); + if ((this->timer_050 == 20) || (this->timer_050 == 30)) { + AUDIO_PLAY_SFX(NA_SE_EN_COMBINE, this->sfxSource, 4); } - if (boss->timer_050 == 0) { - boss->unk_04C = 0; - boss->state = 1; - boss->swork[1] = 1; + if (this->timer_050 == 0) { + this->unk_04C = 0; + this->state = 1; + this->swork[1] = 1; Audio_KillSfxBySourceAndId(D_i2_80195D88, NA_SE_EN_SZMIS_ENGINE); Audio_KillSfxBySourceAndId(D_i2_80195D98, NA_SE_EN_SZMIS_ENGINE); - boss->fwork[0] = 0.0f; - boss->fwork[44] = 0.0f; - boss->fwork[43] = 0.0f; - boss->fwork[42] = 0.0f; - boss->swork[7] = 1; + this->fwork[0] = 0.0f; + this->fwork[44] = 0.0f; + this->fwork[43] = 0.0f; + this->fwork[42] = 0.0f; + this->swork[7] = 1; } break; case 7: - if (boss->timer_052 == 1) { + if (this->timer_052 == 1) { Radio_PlayMessage(gMsg_ID_15252, RCID_SLIPPY); } - boss->fwork[41] = 20.0; - boss->fwork[2] = -400.0f; - boss->fwork[42] = 30.0f; + this->fwork[41] = 20.0; + this->fwork[2] = -400.0f; + this->fwork[42] = 30.0f; - frameData = Animation_GetFrameData(&D_SX_601C690, boss->unk_04C, sp80); - Math_SmoothStepToVec3fArray(sp80, boss->vwork, 1, frameData, boss->fwork[0], 100.0f, 0.0f); + frameData = Animation_GetFrameData(&D_SX_601C690, this->unk_04C, frameTable); + Math_SmoothStepToVec3fArray(frameTable, this->vwork, 1, frameData, this->fwork[0], 100.0f, 0.0f); - Math_SmoothStepToF(&boss->fwork[0], 1.0f, 1.0f, 0.05f, 0); + Math_SmoothStepToF(&this->fwork[0], 1.0f, 1.0f, 0.05f, 0); - boss->unk_04C++; - if (boss->unk_04C >= Animation_GetFrameCount(&D_SX_601C690)) { - boss->state = 75; - boss->fwork[0] = 0.0f; - boss->unk_04C = 0; - boss->timer_050 = 120; + this->unk_04C++; + if (this->unk_04C >= Animation_GetFrameCount(&D_SX_601C690)) { + this->state = 75; + this->fwork[0] = 0.0f; + this->unk_04C = 0; + this->timer_050 = 120; } break; case 75: - boss->fwork[41] = 20.0f; - boss->fwork[2] = -400.0f; + this->fwork[41] = 20.0f; + this->fwork[2] = -400.0f; - frameData = Animation_GetFrameData(&D_SX_600A2D4, 0, sp80); - Math_SmoothStepToVec3fArray(sp80, boss->vwork, 1, frameData, boss->fwork[0], 2.5f, 0.0f); + frameData = Animation_GetFrameData(&D_SX_600A2D4, 0, frameTable); + Math_SmoothStepToVec3fArray(frameTable, this->vwork, 1, frameData, this->fwork[0], 2.5f, 0.0f); - Math_SmoothStepToF(&boss->fwork[0], 0.1f, 1.0f, 0.005f, 0); + Math_SmoothStepToF(&this->fwork[0], 0.1f, 1.0f, 0.005f, 0); - if (boss->timer_050 == 0) { - boss->state = 8; - boss->fwork[0] = 0.0f; - boss->unk_04C = 0; - boss->health = 300; + if (this->timer_050 == 0) { + this->state = 8; + this->fwork[0] = 0.0f; + this->unk_04C = 0; + this->health = 300; Audio_PlaySequenceDistorted(0, gBossBgms[gCurrentLevel], 1121, 25, -1); Radio_PlayMessage(gMsg_ID_19205, RCID_FOX); - boss->timer_052 = 100; + this->timer_052 = 100; } break; case 8: - if (boss->timer_052 == 1) { + if (this->timer_052 == 1) { Radio_PlayMessage(gMsg_ID_5497, RCID_BOSS_SECTORX); } - boss->fwork[41] = 0.0f; - boss->fwork[2] = gPlayer[0].pos.y; - boss->fwork[3] = gPlayer[0].pos.x; - boss->fwork[44] = 5.0f; - boss->fwork[1] = -1800.0f; - boss->fwork[43] = 5.0f; - boss->fwork[42] = 30.0f; + this->fwork[41] = 0.0f; + this->fwork[2] = gPlayer[0].pos.y; + this->fwork[3] = gPlayer[0].pos.x; + this->fwork[44] = 5.0f; + this->fwork[1] = -1800.0f; + this->fwork[43] = 5.0f; + this->fwork[42] = 30.0f; - frameData = Animation_GetFrameData(&D_SX_600F890, boss->unk_04C, sp80); - Math_SmoothStepToVec3fArray(sp80, boss->vwork, 1, frameData, boss->fwork[0], 100.0f, 0.0f); + frameData = Animation_GetFrameData(&D_SX_600F890, this->unk_04C, frameTable); + Math_SmoothStepToVec3fArray(frameTable, this->vwork, 1, frameData, this->fwork[0], 100.0f, 0.0f); - Math_SmoothStepToF(&boss->fwork[0], 1.0f, 1.0f, 0.02f, 0); + Math_SmoothStepToF(&this->fwork[0], 1.0f, 1.0f, 0.02f, 0); - boss->unk_04C++; - if (boss->unk_04C >= Animation_GetFrameCount(&D_SX_600F890)) { - boss->unk_04C = 0; - boss->fwork[0] = 0.0f; - boss->state = 9; - boss->swork[0] = 2; - boss->timer_050 = 30; + this->unk_04C++; + if (this->unk_04C >= Animation_GetFrameCount(&D_SX_600F890)) { + this->unk_04C = 0; + this->fwork[0] = 0.0f; + this->state = 9; + this->swork[0] = 2; + this->timer_050 = 30; } break; case 85: - boss->fwork[1] = -3000.0f; - boss->fwork[2] = gPlayer[0].pos.y; - boss->fwork[3] = gPlayer[0].pos.x; + this->fwork[1] = -3000.0f; + this->fwork[2] = gPlayer[0].pos.y; + this->fwork[3] = gPlayer[0].pos.x; - frameData = Animation_GetFrameData(&D_SX_60123BC, boss->unk_04C, sp80); - Math_SmoothStepToVec3fArray(sp80, boss->vwork, 1, frameData, boss->fwork[0], 50.0f, 0.0f); + frameData = Animation_GetFrameData(&D_SX_60123BC, this->unk_04C, frameTable); + Math_SmoothStepToVec3fArray(frameTable, this->vwork, 1, frameData, this->fwork[0], 50.0f, 0.0f); - Math_SmoothStepToF(&boss->fwork[0], 1.0f, 1.0f, 0.01f, 0); + Math_SmoothStepToF(&this->fwork[0], 1.0f, 1.0f, 0.01f, 0); - if (boss->timer_050 == 0) { - boss->unk_04C++; - if (boss->unk_04C >= Animation_GetFrameCount(&D_SX_60123BC)) { - boss->unk_04C = Animation_GetFrameCount(&D_SX_60123BC) - 1; + if (this->timer_050 == 0) { + this->unk_04C++; + if (this->unk_04C >= Animation_GetFrameCount(&D_SX_60123BC)) { + this->unk_04C = Animation_GetFrameCount(&D_SX_60123BC) - 1; if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_STANDBY) { - boss->unk_04C = 0; - boss->state = 10; - boss->fwork[0] = 0.0f; - boss->fwork[42] = 0.0f; + this->unk_04C = 0; + this->state = 10; + this->fwork[0] = 0.0f; + this->fwork[42] = 0.0f; } } - if (boss->unk_04C == 60) { - AUDIO_PLAY_SFX(NA_SE_EN_THROW, boss->sfxSource, 4); + if (this->unk_04C == 60) { + AUDIO_PLAY_SFX(NA_SE_EN_THROW, this->sfxSource, 4); } - } else if (boss->timer_050 == 1) { + } else if (this->timer_050 == 1) { Radio_PlayMessage(gMsg_ID_20267, RCID_PEPPY); } break; case 9: - if (boss->timer_050 == 1) { + if (this->timer_050 == 1) { Radio_PlayMessage(gMsg_ID_5492, RCID_BOSS_SECTORX); } - boss->fwork[1] = -2000.0f; - boss->fwork[2] = gPlayer[0].pos.y; - boss->fwork[3] = gPlayer[0].pos.x; + this->fwork[1] = -2000.0f; + this->fwork[2] = gPlayer[0].pos.y; + this->fwork[3] = gPlayer[0].pos.x; - frameData = Animation_GetFrameData(&D_SX_601AA28, boss->unk_04C, sp80); - Math_SmoothStepToVec3fArray(sp80, boss->vwork, 1, frameData, boss->fwork[0], 50.0f, 0.0f); + frameData = Animation_GetFrameData(&D_SX_601AA28, this->unk_04C, frameTable); + Math_SmoothStepToVec3fArray(frameTable, this->vwork, 1, frameData, this->fwork[0], 50.0f, 0.0f); - Math_SmoothStepToF(&boss->fwork[0], 1.0f, 1.0f, 0.01f, 0); - boss->unk_04C++; + Math_SmoothStepToF(&this->fwork[0], 1.0f, 1.0f, 0.01f, 0); + this->unk_04C++; - if (boss->unk_04C >= Animation_GetFrameCount(&D_SX_601AA28)) { - boss->unk_04C = 0; - boss->state = 10; - boss->fwork[0] = 0.0f; - boss->fwork[42] = 0.0f; - if (boss->swork[10] == 0) { + if (this->unk_04C >= Animation_GetFrameCount(&D_SX_601AA28)) { + this->unk_04C = 0; + this->state = 10; + this->fwork[0] = 0.0f; + this->fwork[42] = 0.0f; + if (this->swork[10] == 0) { Radio_PlayMessage(gMsg_ID_5474, RCID_FALCO); } - boss->swork[10] = 1; + this->swork[10] = 1; } - if (boss->unk_04C == 70) { - SectorX_8018FA04(boss->fwork[11] + boss->obj.pos.x, boss->fwork[12] + boss->obj.pos.y, - boss->fwork[13] + boss->obj.pos.z); - AUDIO_PLAY_SFX(NA_SE_EN_THROW, boss->sfxSource, 4); + if (this->unk_04C == 70) { + SectorX_8018FA04(this->fwork[11] + this->obj.pos.x, this->fwork[12] + this->obj.pos.y, + this->fwork[13] + this->obj.pos.z); + AUDIO_PLAY_SFX(NA_SE_EN_THROW, this->sfxSource, 4); } break; case 10: attack = true; - boss->fwork[1] = -1000.0f; - Math_SmoothStepToF(&boss->fwork[42], 50.0f, 1.0f, 3.0f, 0); + this->fwork[1] = -1000.0f; + Math_SmoothStepToF(&this->fwork[42], 50.0f, 1.0f, 3.0f, 0); - frameData = Animation_GetFrameData(&D_SX_60158C4, boss->unk_04C, sp80); - Math_SmoothStepToVec3fArray(sp80, boss->vwork, 1, frameData, boss->fwork[0], 100.0f, 0.0f); + frameData = Animation_GetFrameData(&D_SX_60158C4, this->unk_04C, frameTable); + Math_SmoothStepToVec3fArray(frameTable, this->vwork, 1, frameData, this->fwork[0], 100.0f, 0.0f); - Math_SmoothStepToF(&boss->fwork[0], 1.0f, 1.0f, 0.05f, 0); + Math_SmoothStepToF(&this->fwork[0], 1.0f, 1.0f, 0.05f, 0); - boss->unk_04C++; - if ((boss->unk_04C % 16) == 0) { - AUDIO_PLAY_SFX(NA_SE_EN_THROW, boss->sfxSource, 4); + this->unk_04C++; + if ((this->unk_04C % 16) == 0) { + AUDIO_PLAY_SFX(NA_SE_EN_THROW, this->sfxSource, 4); } - if (boss->unk_04C >= Animation_GetFrameCount(&D_SX_60158C4)) { - boss->unk_04C = 0; - boss->fwork[0] = 0.0f; + if (this->unk_04C >= Animation_GetFrameCount(&D_SX_60158C4)) { + this->unk_04C = 0; + this->fwork[0] = 0.0f; if ((gBossFrameCount < 2200) || (gTeamShields[TEAM_ID_SLIPPY] <= 0)) { - if (boss->health > 150) { - boss->state = 8; + if (this->health > 150) { + this->state = 8; } else { - boss->state = 35; - boss->timer_050 = 400; - boss->fwork[42] = boss->fwork[43] = boss->fwork[44] = boss->rot_078.y = 0.0f; - boss->swork[9] = RAND_INT(1.9f); + this->state = 35; + this->timer_050 = 400; + this->fwork[42] = this->fwork[43] = this->fwork[44] = this->rot_078.y = 0.0f; + this->swork[9] = RAND_INT(1.9f); Radio_PlayMessage(gMsg_ID_5498, RCID_BOSS_SECTORX); } } else { - boss->state = 85; + this->state = 85; SectorX_8018F030(); - boss->timer_050 = 100; + this->timer_050 = 100; } } break; case 35: - if (boss->swork[9] != 0) { - boss->fwork[2] = 500.0f; + if (this->swork[9] != 0) { + this->fwork[2] = 500.0f; } else { - boss->fwork[2] = -500.0f; + this->fwork[2] = -500.0f; } - if (boss->timer_050 > 300) { - boss->fwork[3] = 1000.0f; - boss->fwork[1] = -2000.0f; - } else if (boss->timer_050 > 200) { - boss->fwork[3] = -1000.0f; - boss->fwork[1] = -2500.0f; + if (this->timer_050 > 300) { + this->fwork[3] = 1000.0f; + this->fwork[1] = -2000.0f; + } else if (this->timer_050 > 200) { + this->fwork[3] = -1000.0f; + this->fwork[1] = -2500.0f; if ((gGameFrameCount % 16) == 0) { - AUDIO_PLAY_SFX(NA_SE_EN_THROW, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_THROW, this->sfxSource, 4); } - } else if (boss->timer_050 > 100) { - boss->fwork[3] = 0; - boss->fwork[1] = -500.0f; + } else if (this->timer_050 > 100) { + this->fwork[3] = 0; + this->fwork[1] = -500.0f; if (((gGameFrameCount % 16) == 0)) { - AUDIO_PLAY_SFX(NA_SE_EN_THROW, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_THROW, this->sfxSource, 4); } } else { - boss->fwork[3] = 0; - boss->fwork[1] = -2000.0f; + this->fwork[3] = 0; + this->fwork[1] = -2000.0f; } - Math_SmoothStepToF(&boss->fwork[42], 60.0f, 1.0f, 1.0f, 0); - Math_SmoothStepToF(&boss->fwork[44], 20.0f, 1.0f, 0.5f, 0); - Math_SmoothStepToF(&boss->fwork[43], 20.0f, 1.0f, 0.5f, 0); + Math_SmoothStepToF(&this->fwork[42], 60.0f, 1.0f, 1.0f, 0); + Math_SmoothStepToF(&this->fwork[44], 20.0f, 1.0f, 0.5f, 0); + Math_SmoothStepToF(&this->fwork[43], 20.0f, 1.0f, 0.5f, 0); - frameData = Animation_GetFrameData(&D_SX_6009FF8, 0, sp80); - Math_SmoothStepToVec3fArray(sp80, boss->vwork, 1, frameData, boss->fwork[0], 5.0f, 0.0f); + frameData = Animation_GetFrameData(&D_SX_6009FF8, 0, frameTable); + Math_SmoothStepToVec3fArray(frameTable, this->vwork, 1, frameData, this->fwork[0], 5.0f, 0.0f); - Math_SmoothStepToF(&boss->fwork[0], 0.1f, 1.0f, 0.001f, 0); - Math_SmoothStepToF(&boss->rot_078.y, 10.0f, 1.0f, 0.1f, 0); - Math_SmoothStepToF(&boss->obj.rot.y, 2880.0f, 0.1f, boss->rot_078.y, 0.1f); + Math_SmoothStepToF(&this->fwork[0], 0.1f, 1.0f, 0.001f, 0); + Math_SmoothStepToF(&this->rot_078.y, 10.0f, 1.0f, 0.1f, 0); + Math_SmoothStepToF(&this->obj.rot.y, 2880.0f, 0.1f, this->rot_078.y, 0.1f); - if ((boss->timer_050 == 0) && (boss->obj.rot.y == 2880.0f)) { - boss->obj.rot.y = 0.0f; - boss->unk_04C = 0; - boss->fwork[0] = 0.0f; + if ((this->timer_050 == 0) && (this->obj.rot.y == 2880.0f)) { + this->obj.rot.y = 0.0f; + this->unk_04C = 0; + this->fwork[0] = 0.0f; if ((gBossFrameCount < 2200) || (gTeamShields[TEAM_ID_SLIPPY] <= 0)) { - boss->state = 9; + this->state = 9; } else { - boss->state = 85; + this->state = 85; SectorX_8018F030(); - boss->timer_050 = 100; + this->timer_050 = 100; } } break; case 20: - Math_SmoothStepToF(&boss->obj.rot.y, 0.0f, 0.1f, 3.0f, 0.1f); - boss->swork[0] = 0; - boss->fwork[1] = -1800.0f; - boss->fwork[41] = 340.0f; - boss->fwork[2] = -400.0f; + Math_SmoothStepToF(&this->obj.rot.y, 0.0f, 0.1f, 3.0f, 0.1f); + this->swork[0] = 0; + this->fwork[1] = -1800.0f; + this->fwork[41] = 340.0f; + this->fwork[2] = -400.0f; - frameData = Animation_GetFrameData(&D_SX_601C690, boss->unk_04C, sp80); - Math_SmoothStepToVec3fArray(sp80, boss->vwork, 1, frameData, boss->fwork[0], 100.0f, 0.0f); + frameData = Animation_GetFrameData(&D_SX_601C690, this->unk_04C, frameTable); + Math_SmoothStepToVec3fArray(frameTable, this->vwork, 1, frameData, this->fwork[0], 100.0f, 0.0f); - Math_SmoothStepToF(&boss->fwork[0], 1.0f, 1.0f, 0.05f, 0); - boss->unk_04C++; + Math_SmoothStepToF(&this->fwork[0], 1.0f, 1.0f, 0.05f, 0); + this->unk_04C++; - if (boss->unk_04C >= Animation_GetFrameCount(&D_SX_601C690)) { - boss->unk_04C = Animation_GetFrameCount(&D_SX_601C690); + if (this->unk_04C >= Animation_GetFrameCount(&D_SX_601C690)) { + this->unk_04C = Animation_GetFrameCount(&D_SX_601C690); } - if ((boss->timer_050 & 3) == 0) { - func_effect_8007D2C8(RAND_FLOAT_CENTERED(500.0f) + boss->obj.pos.x, - RAND_FLOAT_CENTERED(500.0f) + boss->obj.pos.y, boss->obj.pos.z + 100.0f, + if ((this->timer_050 & 3) == 0) { + func_effect_8007D2C8(RAND_FLOAT_CENTERED(500.0f) + this->obj.pos.x, + RAND_FLOAT_CENTERED(500.0f) + this->obj.pos.y, this->obj.pos.z + 100.0f, RAND_FLOAT(5.0f) + 5.0f); } - if ((((gGameFrameCount % 8) == 0)) && (Rand_ZeroOne() < 0.5f)) { - boss->timer_05C = 4; + if (((gGameFrameCount % 8) == 0) && (Rand_ZeroOne() < 0.5f)) { + this->timer_05C = 4; } - if ((boss->timer_050 & 3) == 0) { - func_effect_8007C120(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, boss->vel.x, boss->vel.y, - boss->vel.z, 0.3f, 10); + if ((this->timer_050 & 3) == 0) { + func_effect_8007C120(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, + this->vel.z, 0.3f, 10); } - if (boss->timer_050 < 230) { - Math_SmoothStepToF(&boss->fwork[14], 10000.0f, 1.0f, 60.0f, 0); - Math_SmoothStepToF(&boss->fwork[17], -10000.0f, 1.0f, 60.0f, 0); + if (this->timer_050 < 230) { + Math_SmoothStepToF(&this->fwork[14], 10000.0f, 1.0f, 60.0f, 0); + Math_SmoothStepToF(&this->fwork[17], -10000.0f, 1.0f, 60.0f, 0); } - if (boss->timer_050 == 230) { + if (this->timer_050 == 230) { gShowBossHealth = 0; - func_effect_8007BFFC(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 0.0f, 0.0f, 0.0f, 30.0f, 40); - func_effect_8007A568(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 40.0f); + func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 30.0f, 40); + func_effect_8007A568(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 40.0f); } - if (boss->timer_050 == 210) { - boss->swork[5] = 1; - boss->timer_05A = 1000; + if (this->timer_050 == 210) { + this->swork[5] = 1; + this->timer_05A = 1000; } - if (boss->timer_050 == 120) { + if (this->timer_050 == 120) { if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_NEXT) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_DOWN)) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].csState = 0; gPlayer[0].draw = true; } - Object_Kill(&boss->obj, boss->sfxSource); - gMissionStatus = boss->swork[6]; + Object_Kill(&this->obj, this->sfxSource); + gMissionStatus = this->swork[6]; } break; @@ -1086,68 +1104,69 @@ void SectorX_80190078(Boss* boss) { D_i2_80195640 = 1; - Animation_DrawSkeleton(1, D_SX_6020C68, boss->vwork, SectorX_80192AF0, SectorX_80193208, boss, &gIdentityMatrix); + Animation_DrawSkeleton(1, D_SX_6020C68, this->vwork, SectorX_Boss_OverrideLimbDraw, SectorX_Boss_PostLimbDraw, this, + &gIdentityMatrix); - if (((boss->swork[1] != 0) && (boss->swork[3] > 0)) && ((boss->fwork[4] < 45.0f) || (boss->fwork[4] > 315.0f))) { - boss->swork[1]++; - if (boss->swork[1] > 40) { - if (boss->swork[1] > 50) { - boss->swork[1] = 0; + if (((this->swork[1] != 0) && (this->swork[3] > 0)) && ((this->fwork[4] < 45.0f) || (this->fwork[4] > 315.0f))) { + this->swork[1]++; + if (this->swork[1] > 40) { + if (this->swork[1] > 50) { + this->swork[1] = 0; } - func_effect_8007F11C(OBJ_EFFECT_377, boss->fwork[20] + boss->obj.pos.x, boss->fwork[21] + boss->obj.pos.y, - boss->fwork[22] + boss->obj.pos.z, 100.0f); - func_effect_8007F11C(OBJ_EFFECT_377, boss->fwork[23] + boss->obj.pos.x, boss->fwork[24] + boss->obj.pos.y, - boss->fwork[25] + boss->obj.pos.z, 100.0f); + Effect_EnemyLaser(OBJ_EFFECT_377, this->fwork[20] + this->obj.pos.x, this->fwork[21] + this->obj.pos.y, + this->fwork[22] + this->obj.pos.z, 100.0f); + Effect_EnemyLaser(OBJ_EFFECT_377, this->fwork[23] + this->obj.pos.x, this->fwork[24] + this->obj.pos.y, + this->fwork[25] + this->obj.pos.z, 100.0f); } } else { - boss->swork[1] = 0; + this->swork[1] = 0; } - if (boss->state != 35) { - boss->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SX_6032550); - boss->info.hitbox[43] = -211.0f + boss->fwork[16]; - boss->info.hitbox[45] = -35.0f + boss->fwork[15]; - boss->info.hitbox[47] = 442.0f + boss->fwork[14]; - boss->info.hitbox[49] = -211.0f + boss->fwork[19]; - boss->info.hitbox[51] = -35.0f + boss->fwork[18]; - boss->info.hitbox[53] = -442.0f + boss->fwork[17]; - boss->info.hitbox[55] = boss->fwork[10]; - boss->info.hitbox[57] = boss->fwork[9]; - boss->info.hitbox[59] = boss->fwork[8]; - boss->info.hitbox[61] = boss->fwork[13]; - boss->info.hitbox[63] = boss->fwork[12]; - boss->info.hitbox[65] = boss->fwork[11]; + if (this->state != 35) { + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SX_6032550); + this->info.hitbox[43] = -211.0f + this->fwork[16]; + this->info.hitbox[45] = -35.0f + this->fwork[15]; + this->info.hitbox[47] = 442.0f + this->fwork[14]; + this->info.hitbox[49] = -211.0f + this->fwork[19]; + this->info.hitbox[51] = -35.0f + this->fwork[18]; + this->info.hitbox[53] = -442.0f + this->fwork[17]; + this->info.hitbox[55] = this->fwork[10]; + this->info.hitbox[57] = this->fwork[9]; + this->info.hitbox[59] = this->fwork[8]; + this->info.hitbox[61] = this->fwork[13]; + this->info.hitbox[63] = this->fwork[12]; + this->info.hitbox[65] = this->fwork[11]; if (attack) { - boss->info.hitbox[56] = 200.0f; - boss->info.hitbox[58] = 200.0f; - boss->info.hitbox[60] = 100.0f; - boss->info.hitbox[62] = 200.0f; - boss->info.hitbox[64] = 200.0f; - boss->info.hitbox[66] = 100.0f; + this->info.hitbox[56] = 200.0f; + this->info.hitbox[58] = 200.0f; + this->info.hitbox[60] = 100.0f; + this->info.hitbox[62] = 200.0f; + this->info.hitbox[64] = 200.0f; + this->info.hitbox[66] = 100.0f; } else { - boss->info.hitbox[56] = 200.0f; - boss->info.hitbox[58] = 100.0f; - boss->info.hitbox[60] = 70.0f; - boss->info.hitbox[62] = 200.0f; - boss->info.hitbox[64] = 100.0f; - boss->info.hitbox[66] = 70.0f; + this->info.hitbox[56] = 200.0f; + this->info.hitbox[58] = 100.0f; + this->info.hitbox[60] = 70.0f; + this->info.hitbox[62] = 200.0f; + this->info.hitbox[64] = 100.0f; + this->info.hitbox[66] = 70.0f; } } else { - boss->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SX_6032768); + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SX_6032768); } - if (boss->swork[0] == 1) { - Math_SmoothStepToF(&boss->fwork[45], 1.0f, 1.0f, 0.05f, 0); + if (this->swork[0] == 1) { + Math_SmoothStepToF(&this->fwork[45], 1.0f, 1.0f, 0.05f, 0); } else { - Math_SmoothStepToF(&boss->fwork[45], 0.0f, 1.0f, 0.05f, 0); + Math_SmoothStepToF(&this->fwork[45], 0.0f, 1.0f, 0.05f, 0); } } -bool SectorX_80192AF0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { - Vec3f sp64 = { 0.0f, 0.0f, 0.0f }; - Vec3f sp58; - Boss* boss = (Boss*) data; +bool SectorX_Boss_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { + Vec3f src = { 0.0f, 0.0f, 0.0f }; + Vec3f dest; + Spyborg* boss = (Spyborg*) data; if (D_i2_80195640 != 0) { *dList = NULL; @@ -1164,10 +1183,12 @@ bool SectorX_80192AF0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* case 1: rot->x += boss->fwork[4] + boss->fwork[5]; rot->z += boss->fwork[6] + boss->fwork[7]; + if ((boss->timer_054 % 2) != 0) { RCP_SetupDL_27(); gDPSetPrimColor(gMasterDisp++, 0, 0, 64, 64, 255, 255); } + if (boss->swork[4] == 1) { *dList = D_SX_6006810; } else if (boss->swork[4] == 2) { @@ -1182,14 +1203,16 @@ bool SectorX_80192AF0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* if (*dList != NULL) { Matrix_Push(&gGfxMatrix); Matrix_Push(&gCalcMatrix); - Matrix_MultVec3f(gCalcMatrix, &sp64, &sp58); - Display_SetSecondLight(&sp58); + Matrix_MultVec3f(gCalcMatrix, &src, &dest); + Display_SetSecondLight(&dest); Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, *dList); + if (boss->swork[4] == 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_41); - if (((gGameFrameCount % 2) == 0)) { + + if ((gGameFrameCount % 2) == 0) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); } else { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); @@ -1262,74 +1285,77 @@ bool SectorX_80192AF0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return false; } -void SectorX_80193208(s32 limbIndex, Vec3f* rot, void* data) { +void SectorX_Boss_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* data) { Vec3f sp64 = { 87.0f, -323.0f, 200.0f }; Vec3f sp58 = { 87.0f, -323.0f, -200.0f }; Vec3f sp4C = { 87.0f, -323.0f, 200.0f }; Vec3f sp40 = { 87.0f, -323.0f, -200.0f }; - Vec3f sp34; - Vec3f sp28; + Vec3f src; + Vec3f dest; Boss* boss = (Boss*) data; - sp34.x = 0.0f; - sp34.y = 0.0f; - sp34.z = 0.0f; + src.x = 0.0f; + src.y = 0.0f; + src.z = 0.0f; switch (limbIndex) { case 1: - Matrix_MultVec3f(gCalcMatrix, &sp58, &sp28); - boss->fwork[20] = sp28.x; - boss->fwork[21] = sp28.y; - boss->fwork[22] = sp28.z; - Matrix_MultVec3f(gCalcMatrix, &sp64, &sp28); - boss->fwork[23] = sp28.x; - boss->fwork[24] = sp28.y; - boss->fwork[25] = sp28.z; + Matrix_MultVec3f(gCalcMatrix, &sp58, &dest); + boss->fwork[20] = dest.x; + boss->fwork[21] = dest.y; + boss->fwork[22] = dest.z; + Matrix_MultVec3f(gCalcMatrix, &sp64, &dest); + boss->fwork[23] = dest.x; + boss->fwork[24] = dest.y; + boss->fwork[25] = dest.z; Matrix_MultVec3f(gCalcMatrix, &sp40, &boss->vwork[45]); Matrix_MultVec3f(gCalcMatrix, &sp4C, &boss->vwork[46]); break; case 6: - Matrix_MultVec3f(gCalcMatrix, &sp34, &sp28); - boss->fwork[8] = sp28.x; - boss->fwork[9] = sp28.y; - boss->fwork[10] = sp28.z; + Matrix_MultVec3f(gCalcMatrix, &src, &dest); + boss->fwork[8] = dest.x; + boss->fwork[9] = dest.y; + boss->fwork[10] = dest.z; break; case 16: - Matrix_MultVec3f(gCalcMatrix, &sp34, &sp28); - boss->fwork[11] = sp28.x; - boss->fwork[12] = sp28.y; - boss->fwork[13] = sp28.z; + Matrix_MultVec3f(gCalcMatrix, &src, &dest); + boss->fwork[11] = dest.x; + boss->fwork[12] = dest.y; + boss->fwork[13] = dest.z; break; case 33: - Matrix_MultVec3f(gCalcMatrix, &sp34, &sp28); - boss->fwork[35] = sp28.x; - boss->fwork[36] = sp28.y; - boss->fwork[37] = sp28.z; + Matrix_MultVec3f(gCalcMatrix, &src, &dest); + boss->fwork[35] = dest.x; + boss->fwork[36] = dest.y; + boss->fwork[37] = dest.z; break; case 37: - Matrix_MultVec3f(gCalcMatrix, &sp34, &sp28); - boss->fwork[38] = sp28.x; - boss->fwork[39] = sp28.y; - boss->fwork[40] = sp28.z; + Matrix_MultVec3f(gCalcMatrix, &src, &dest); + boss->fwork[38] = dest.x; + boss->fwork[39] = dest.y; + boss->fwork[40] = dest.z; default: break; } } -Vec3f D_i2_801956B0[5] = { - { 0.0f, 2300.0f, -5000.0f }, { -600.0f, 2200.0f, -5000.0f }, { -300.0f, 2270.0f, -5000.0f }, - { 300.0f, 2270.0f, -5000.0f }, { 600.0f, 2200.0f, -5000.0f }, -}; +Vec3f D_i2_801956B0[5] = { { 0.0f, 2300.0f, -5000.0f }, + { -600.0f, 2200.0f, -5000.0f }, + { -300.0f, 2270.0f, -5000.0f }, + { 300.0f, 2270.0f, -5000.0f }, + { 600.0f, 2200.0f, -5000.0f } }; + Vec3f D_i2_801956EC[3] = { { 150.0f, 250.0f, 50.0f }, { -150.0f, -50.0f, 50.0f }, { 150.0f, -50.0f, 50.0f }, }; + f32 D_i2_80195710[4] = { -1200.0f, 1000.0f, 0.0f, 0.0f }; f32 D_i2_80195720[4] = { -300.0f, 400.0f, -400.0f, 0.0f }; f32 D_i2_80195730[4] = { -800.0f, -800.0f, -1000.0f, -8000.0f }; @@ -1339,17 +1365,17 @@ f32 D_i2_80195760[4] = { -250.0f, -200.0f, -400.0f, -8000.0f }; f32 D_i2_80195770[3] = { 120.0f, 180.0f, -150.0f }; s16 D_i2_8019577C[3] = { 2, 3, 4 }; -void SectorX_80193434(Boss* boss) { +void SectorX_Boss_Draw(Spyborg* this) { f32 fwork; - if (boss->swork[5] == 0) { + if (this->swork[5] == 0) { D_i2_80195640 = 0; - Animation_DrawSkeleton(3, D_SX_6020C68, boss->vwork, SectorX_80192AF0, 0, boss, gCalcMatrix); + Animation_DrawSkeleton(3, D_SX_6020C68, this->vwork, SectorX_Boss_OverrideLimbDraw, 0, this, gCalcMatrix); RCP_SetupDL_64(); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 96); - if (boss->fwork[31] > 10.0f) { - fwork = boss->fwork[31] * 0.1f; + if (this->fwork[31] > 10.0f) { + fwork = this->fwork[31] * 0.1f; if (fwork > 50.0f) { fwork = 50.0f; } @@ -1357,15 +1383,15 @@ void SectorX_80193434(Boss* boss) { fwork *= 1.2f; } Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, boss->fwork[35], boss->fwork[36], boss->fwork[37], MTXF_APPLY); + Matrix_Translate(gGfxMatrix, this->fwork[35], this->fwork[36], this->fwork[37], MTXF_APPLY); Matrix_Scale(gGfxMatrix, fwork, fwork, fwork, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_102ED50); Matrix_Pop(&gGfxMatrix); } - if (boss->fwork[34] > 10.0f) { - fwork = boss->fwork[34] * 0.1f; + if (this->fwork[34] > 10.0f) { + fwork = this->fwork[34] * 0.1f; if (fwork > 50.0f) { fwork = 50.0f; } @@ -1373,7 +1399,7 @@ void SectorX_80193434(Boss* boss) { fwork *= 1.2f; } Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, boss->fwork[38], boss->fwork[39], boss->fwork[40], MTXF_APPLY); + Matrix_Translate(gGfxMatrix, this->fwork[38], this->fwork[39], this->fwork[40], MTXF_APPLY); Matrix_Scale(gGfxMatrix, fwork, fwork, fwork, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_102ED50); @@ -1383,8 +1409,8 @@ void SectorX_80193434(Boss* boss) { RCP_SetupDL_64(); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 96); - if (boss->swork[1] != 0) { - fwork = boss->swork[1] * 0.1f; + if (this->swork[1] != 0) { + fwork = this->swork[1] * 0.1f; if (fwork > 4.0f) { fwork = 4.0f; @@ -1393,13 +1419,14 @@ void SectorX_80193434(Boss* boss) { fwork *= 1.2f; } Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, boss->fwork[20], boss->fwork[21], boss->fwork[22], MTXF_APPLY); + Matrix_Translate(gGfxMatrix, this->fwork[20], this->fwork[21], this->fwork[22], MTXF_APPLY); Matrix_Scale(gGfxMatrix, fwork, fwork, fwork, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_SX_600F8A0); Matrix_Pop(&gGfxMatrix); + Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, boss->fwork[23], boss->fwork[24], boss->fwork[25], MTXF_APPLY); + Matrix_Translate(gGfxMatrix, this->fwork[23], this->fwork[24], this->fwork[25], MTXF_APPLY); Matrix_Scale(gGfxMatrix, fwork, fwork, fwork, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_SX_600F8A0); @@ -1408,42 +1435,47 @@ void SectorX_80193434(Boss* boss) { } } -void SectorX_80193800(Actor* actor, s32 arg1) { - Actor_Initialize(actor); +void SectorX_80193800(ActorCutscene* this, s32 index) { + Actor_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.pos.x = D_i2_801956B0[arg1].x; - actor->obj.pos.y = D_i2_801956B0[arg1].y; - actor->obj.pos.z = D_i2_801956B0[arg1].z; - actor->vel.z = 30.0f; - actor->vel.y = -16.0f; - actor->animFrame = 20; - actor->obj.rot.x = 15.0f; + this->obj.pos.x = D_i2_801956B0[index].x; + this->obj.pos.y = D_i2_801956B0[index].y; + this->obj.pos.z = D_i2_801956B0[index].z; - Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(NA_SE_EN_ENGINE_01, actor->sfxSource, 4); + this->vel.z = 30.0f; + this->vel.y = -16.0f; + this->animFrame = 20; + this->obj.rot.x = 15.0f; + + Object_SetInfo(&this->info, this->obj.id); + AUDIO_PLAY_SFX(NA_SE_EN_ENGINE_01, this->sfxSource, 4); } -void SectorX_801938D8(Actor* actor, s32 arg1) { - Actor_Initialize(actor); - actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.pos.x = gPlayer[0].cam.eye.x + D_i2_801956EC[arg1].x; - actor->obj.pos.y = gPlayer[0].cam.eye.y + D_i2_801956EC[arg1].y; - actor->obj.pos.z = gPlayer[0].cam.eye.z + D_i2_801956EC[arg1].z; - actor->state = 1; - actor->iwork[11] = 1; - actor->vel.z = -30.0f; - actor->vel.y = 0.0f; - actor->obj.rot.y = 180.0f; - actor->obj.rot.x = 10.0f; - if (arg1 == 2) { - actor->obj.rot.z = -20.0f; +void SectorX_801938D8(ActorCutscene* this, s32 index) { + Actor_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_ACTOR_CUTSCENE; + + this->obj.pos.x = gPlayer[0].cam.eye.x + D_i2_801956EC[index].x; + this->obj.pos.y = gPlayer[0].cam.eye.y + D_i2_801956EC[index].y; + this->obj.pos.z = gPlayer[0].cam.eye.z + D_i2_801956EC[index].z; + + this->state = 1; + this->iwork[11] = 1; + this->vel.z = -30.0f; + this->vel.y = 0.0f; + this->obj.rot.y = 180.0f; + this->obj.rot.x = 10.0f; + + if (index == 2) { + this->obj.rot.z = -20.0f; } - Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); - AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); + + Object_SetInfo(&this->info, this->obj.id); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, this->sfxSource, 0); } void SectorX_LevelStart(Player* player) { @@ -1471,6 +1503,7 @@ void SectorX_LevelStart(Player* player) { player->cam.at.z = gCsCamAtZ = -1000.0f; player->camRoll = -5.0f; player->baseSpeed = 0.0f; + gFillScreenAlpha = 255; /* fallthrough */ case 1: @@ -1478,9 +1511,12 @@ void SectorX_LevelStart(Player* player) { gFillScreenAlpha = 255; } D_ctx_80177A48[0] = 0.5f; + gCsCamAtX = gActors[5].obj.pos.x; gCsCamAtZ = gActors[5].obj.pos.z; + player->camRoll -= 0.1f; + if (gCsFrameCount == 140) { x = gActors[5].obj.pos.x; y = gActors[5].obj.pos.y - (player->cam.eye.y + 50.0f); @@ -1495,6 +1531,7 @@ void SectorX_LevelStart(Player* player) { Actor_SpawnPlayerLaser(CS_SHOT_ID, 0.0f, player->cam.eye.y + 50.0f, player->cam.eye.z + 20.0f, dest.x, dest.y, dest.z, xyzDeg, xzDeg, 0.0f); } + if (gCsFrameCount == 143) { Object_Kill(&gPlayerShots[0].obj, gPlayerShots[0].sfxSource); func_effect_8007BFFC(gActors[5].obj.pos.x, gActors[5].obj.pos.y, gActors[5].obj.pos.z, 0.0f, 0.0f, 0.0f, @@ -1505,7 +1542,7 @@ void SectorX_LevelStart(Player* player) { for (i = 0; i < 20; i++) { func_effect_80079618(gActors[5].obj.pos.x, gActors[5].obj.pos.y, gActors[5].obj.pos.z, 0.5f); } - func_effect_8007A6F0(&gActors[5].obj.pos, NA_SE_EN_EXPLOSION_M); + Effect_SpawnTimedSfxAtPos(&gActors[5].obj.pos, NA_SE_EN_EXPLOSION_M); player->csState++; D_ctx_80177A48[0] = 0.1f; } @@ -1627,7 +1664,7 @@ void SectorX_LevelStart(Player* player) { player->trueZpos = player->pos.z + player->camDist; } -void SectorX_801944D4(Actor* actor, s32 arg1) { +void SectorX_801944D4(ActorCutscene* this, s32 index) { Vec3f srcA; Vec3f destA; Vec3f srcB; @@ -1635,41 +1672,43 @@ void SectorX_801944D4(Actor* actor, s32 arg1) { Player* player = &gPlayer[0]; Matrix_RotateY(gCalcMatrix, player->rot.y * M_DTOR, MTXF_NEW); - srcA.x = D_i2_80195710[arg1]; - srcA.y = D_i2_80195720[arg1]; - srcA.z = D_i2_80195730[arg1]; - srcB.x = D_i2_80195740[arg1]; - srcB.y = D_i2_80195750[arg1]; - srcB.z = D_i2_80195760[arg1]; + srcA.x = D_i2_80195710[index]; + srcA.y = D_i2_80195720[index]; + srcA.z = D_i2_80195730[index]; + srcB.x = D_i2_80195740[index]; + srcB.y = D_i2_80195750[index]; + srcB.z = D_i2_80195760[index]; Matrix_MultVec3fNoTranslate(gCalcMatrix, &srcA, &destA); Matrix_MultVec3fNoTranslate(gCalcMatrix, &srcB, &destB); - Actor_Initialize(actor); - actor->obj.pos.x = player->pos.x + destA.x; - actor->obj.pos.y = player->pos.y + destA.y; - actor->obj.pos.z = player->trueZpos + destA.z; - actor->fwork[0] = destB.x; - actor->fwork[1] = destB.y; - actor->fwork[2] = destB.z; - actor->fwork[7] = RAND_FLOAT(360.0f); - actor->fwork[8] = RAND_FLOAT(360.0f); - actor->vel.x = player->vel.x; - actor->vel.y = player->vel.y; - actor->vel.z = player->vel.z; - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_CUTSCENE; - Object_SetInfo(&actor->info, actor->obj.id); - if (arg1 == 3) { - actor->animFrame = 1; - actor->state = 20; - actor->obj.rot.x = -player->rot.x - 10.0f; - actor->obj.rot.y = (player->rot.y + 180.0f) - 10.0f; - actor->fwork[9] = 10.0f; + Actor_Initialize(this); + this->obj.pos.x = player->pos.x + destA.x; + this->obj.pos.y = player->pos.y + destA.y; + this->obj.pos.z = player->trueZpos + destA.z; + this->fwork[0] = destB.x; + this->fwork[1] = destB.y; + this->fwork[2] = destB.z; + this->fwork[7] = RAND_FLOAT(360.0f); + this->fwork[8] = RAND_FLOAT(360.0f); + this->vel.x = player->vel.x; + this->vel.y = player->vel.y; + this->vel.z = player->vel.z; + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_ACTOR_CUTSCENE; + + Object_SetInfo(&this->info, this->obj.id); + + if (index == 3) { + this->animFrame = 1; + this->state = 20; + this->obj.rot.x = -player->rot.x - 10.0f; + this->obj.rot.y = (player->rot.y + 180.0f) - 10.0f; + this->fwork[9] = 10.0f; } else { - actor->obj.rot.z = D_i2_80195770[arg1]; - actor->iwork[11] = 1; - actor->iwork[14] = D_i2_8019577C[arg1]; - AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); + this->obj.rot.z = D_i2_80195770[index]; + this->iwork[11] = 1; + this->iwork[14] = D_i2_8019577C[index]; + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); } } @@ -1826,6 +1865,7 @@ void SectorX_LevelComplete(Player* player) { player->unk_190 = 5.0f; break; } + if (gTeamShields[TEAM_ID_SLIPPY] != -2) { switch (gCsFrameCount) { case 140: diff --git a/src/overlays/ovl_i3/fox_a6.c b/src/overlays/ovl_i3/fox_a6.c index 596b6ab6..a2f1fbbd 100644 --- a/src/overlays/ovl_i3/fox_a6.c +++ b/src/overlays/ovl_i3/fox_a6.c @@ -7,10 +7,10 @@ #include "global.h" #include "assets/ast_area_6.h" -void Area6_8018A1B0(Boss* bossA6, s32 arg1); -void Area6_8018A2C4(Boss* bossA6); -void Area6_8018A464(Boss* bossA6, s32 arg1); -void Area6_8018B9BC(Boss* bossA6); +void Area6_8018A1B0(Boss* this, s32 arg1); +void Area6_8018A2C4(Boss* this); +void Area6_8018A464(Boss* this, s32 arg1); +void Area6_8018B9BC(Boss* this); #define A6_HITBOX_COUNT ((s32) (bossA6)->info.hitbox[0]) #define A6_HIT_0(bossA6) ((Hitbox*) ((bossA6)->info.hitbox + 1)) @@ -222,12 +222,12 @@ typedef enum { } BossA6bsswork; typedef struct { - f32 r[3]; - f32 g[3]; - f32 b[3]; - f32 unk_24; - f32 unk_28[3]; - f32 unk_34; + /* 0x00 */ f32 r[3]; + /* 0x0C */ f32 g[3]; + /* 0x18 */ f32 b[3]; + /* 0x24 */ f32 unk_24; + /* 0x30 */ f32 unk_28[3]; + /* 0x3C */ f32 unk_34; } UnkStruct_1C22F0; typedef struct { @@ -355,49 +355,54 @@ f32 D_i3_801BF494[12] = { -90.0f, 30.0f, 26.0f, 22.0f, 18.0f, 11.0f, 8.0f, 5.0f, 3.0f, 2.0f, 1.0f, 0.0f, }; -void Area6_80187530(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 fwork6, f32 xRot, f32 yRot, s32 timer0BC, +void Area6_80187530(Actor191* this, f32 xPos, f32 yPos, f32 zPos, f32 fwork6, f32 xRot, f32 yRot, s32 timer0BC, s32 unk0B4) { PRINTF("おん\n"); // On PRINTF("おふ\n"); // Off - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_191; - actor->obj.pos.x = xPos; - actor->obj.pos.y = yPos; - actor->obj.pos.z = zPos; - actor->obj.rot.x = xRot; - actor->obj.rot.y = yRot; - actor->timer_0BC = timer0BC; - actor->timer_0BE = 20; - actor->eventType = unk0B4; - actor->fwork[5] = fwork6; - Object_SetInfo(&actor->info, actor->obj.id); - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_BARREL_SHOT); + Actor_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_MISSILE_SEEK_PLAYER; + + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + + this->obj.rot.x = xRot; + this->obj.rot.y = yRot; + + this->timer_0BC = timer0BC; + this->timer_0BE = 20; + this->eventType = unk0B4; + this->fwork[5] = fwork6; + Object_SetInfo(&this->info, this->obj.id); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_BARREL_SHOT); } void Area6_801875E4(f32 xPos, f32 yPos, f32 zPos, f32 fwork6, f32 xRot, f32 yRot, s32 timer0BC, s32 unk0B4) { s32 i; - Actor* actor; + Actor191* actor191; - for (i = 0, actor = gActors; i < ARRAY_COUNT(gActors); i++, actor++) { - if (actor->obj.status == OBJ_FREE) { - Area6_80187530(actor, xPos, yPos, zPos, fwork6, xRot, yRot, timer0BC, unk0B4); + for (i = 0, actor191 = &gActors[0]; i < ARRAY_COUNT(gActors); i++, actor191++) { + if (actor191->obj.status == OBJ_FREE) { + Area6_80187530(actor191, xPos, yPos, zPos, fwork6, xRot, yRot, timer0BC, unk0B4); D_i3_801C2250[A6_BSS_11] = i + 1; break; } } } -void Area6_8018767C(Effect* effect) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_395; - effect->obj.pos.x = gBosses[0].obj.pos.x; - effect->obj.pos.y = gBosses[0].obj.pos.y; - effect->obj.pos.z = gBosses[0].obj.pos.z + 250.0f; - effect->state = 8; - effect->scale2 = 1.0f; - Object_SetInfo(&effect->info, effect->obj.id); +void Area6_8018767C(Effect395* this) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_395; + + this->obj.pos.x = gBosses[0].obj.pos.x; + this->obj.pos.y = gBosses[0].obj.pos.y; + this->obj.pos.z = gBosses[0].obj.pos.z + 250.0f; + + this->state = 8; + this->scale2 = 1.0f; + Object_SetInfo(&this->info, this->obj.id); } void Area6_80187704(void) { @@ -457,7 +462,7 @@ void Area6_BossA6_Init(BossA6* this) { AUDIO_PLAY_SFX(NA_SE_EN_SHIELD_ROLL_LEVEL, this->sfxSource, 4); } -void Area6_Boss_Update(Boss* bossA6) { +void Area6_Boss_Update(BossA6* this) { s32 i; s32 pad; s32 var_s0; @@ -478,93 +483,92 @@ void Area6_Boss_Update(Boss* bossA6) { gBossFrameCount++; - if ((bossA6->state < 6) || ((bossA6->state >= 8) && (bossA6->state < 12))) { - bossA6->obj.rot.y = RAD_TO_DEG(Math_Atan2F(gPlayer[0].cam.eye.x - bossA6->obj.pos.x, - gPlayer[0].cam.eye.z - (bossA6->obj.pos.z + gPathProgress))); - bossA6->obj.rot.x = - RAD_TO_DEG(-Math_Atan2F(gPlayer[0].cam.eye.y - bossA6->obj.pos.y, - sqrtf(SQ(gPlayer[0].cam.eye.z - (bossA6->obj.pos.z + gPathProgress)) + - SQ(gPlayer[0].cam.eye.x - bossA6->obj.pos.x)))); + if ((this->state < 6) || ((this->state >= 8) && (this->state < 12))) { + this->obj.rot.y = RAD_TO_DEG(Math_Atan2F(gPlayer[0].cam.eye.x - this->obj.pos.x, + gPlayer[0].cam.eye.z - (this->obj.pos.z + gPathProgress))); + this->obj.rot.x = RAD_TO_DEG(-Math_Atan2F(gPlayer[0].cam.eye.y - this->obj.pos.y, + sqrtf(SQ(gPlayer[0].cam.eye.z - (this->obj.pos.z + gPathProgress)) + + SQ(gPlayer[0].cam.eye.x - this->obj.pos.x)))); } - Matrix_RotateY(gCalcMatrix, bossA6->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, bossA6->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, bossA6->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); - if ((bossA6->dmgType != DMG_NONE) && (bossA6->health > 0)) { - bossA6->dmgType = DMG_NONE; + if ((this->dmgType != DMG_NONE) && (this->health > 0)) { + this->dmgType = DMG_NONE; - if (bossA6->fwork[A6_FWK_0] > 5.0f) { - if ((bossA6->dmgPart == 0) && (bossA6->swork[A6_SWK_25] == 0) && (bossA6->fwork[A6_FWK_29] < 30.0f)) { - bossA6->timer_05C = 15; - bossA6->health -= bossA6->damage; + if (this->fwork[A6_FWK_0] > 5.0f) { + if ((this->dmgPart == 0) && (this->swork[A6_SWK_25] == 0) && (this->fwork[A6_FWK_29] < 30.0f)) { + this->timer_05C = 15; + this->health -= this->damage; - if (bossA6->health < 390) { - AUDIO_PLAY_SFX(NA_SE_EN_KNOCK_DOWN, bossA6->sfxSource, 4); + if (this->health < 390) { + AUDIO_PLAY_SFX(NA_SE_EN_KNOCK_DOWN, this->sfxSource, 4); } else { - AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, bossA6->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, this->sfxSource, 4); } - if (bossA6->health <= 0) { - bossA6->health = 0; - Boss_AwardBonus(bossA6); + if (this->health <= 0) { + this->health = 0; + Boss_AwardBonus(this); Radio_PlayMessage(gMsg_ID_15252, RCID_SLIPPY); gTeamLowHealthMsgTimer = -1; D_bg_8015F984 = (gPathProgress * 0.00004f) + 0.5f; - AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, bossA6->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, this->sfxSource, 4); gShowBossHealth = 0; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 40); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 40); - bossA6->fwork[A6_FWK_5] = 5.0f; - bossA6->fwork[A6_FWK_3] = -20000.0f; - bossA6->fwork[A6_FWK_1] = 170.0f; - bossA6->vel.z = -20.0f; + this->fwork[A6_FWK_5] = 5.0f; + this->fwork[A6_FWK_3] = -20000.0f; + this->fwork[A6_FWK_1] = 170.0f; + this->vel.z = -20.0f; Matrix_MultVec3f(gCalcMatrix, &D_i3_801BECE0, &spC8[0]); Matrix_MultVec3f(gCalcMatrix, &D_i3_801BECEC, &spC8[1]); Matrix_MultVec3f(gCalcMatrix, &D_i3_801BECF8, &spC8[2]); for (i = 0; i < 3; i++) { - func_effect_8007D0E0(spC8[i].x + bossA6->obj.pos.x, spC8[i].y + bossA6->obj.pos.y, - spC8[i].z + bossA6->obj.pos.z, 10.0f); + func_effect_8007D0E0(spC8[i].x + this->obj.pos.x, spC8[i].y + this->obj.pos.y, + spC8[i].z + this->obj.pos.z, 10.0f); } - bossA6->timer_052 = 170; + this->timer_052 = 170; D_i3_801C2250[A6_BSS_2_0] = D_i3_801C2250[A6_BSS_2_1] = D_i3_801C2250[A6_BSS_2_2] = - bossA6->swork[A6_SWK_33 + 0] = bossA6->swork[A6_SWK_33 + 1] = bossA6->swork[A6_SWK_33 + 2] = 0; + this->swork[A6_SWK_33 + 0] = this->swork[A6_SWK_33 + 1] = this->swork[A6_SWK_33 + 2] = 0; gScreenFlashTimer = 4; - bossA6->state = 11; + this->state = 11; - AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_L, bossA6->sfxSource, 4); - AUDIO_PLAY_SFX(NA_SE_EXPLOSION_DEMO5, bossA6->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_L, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EXPLOSION_DEMO5, this->sfxSource, 4); } } - if (((bossA6->dmgPart == 4) || (bossA6->dmgPart == 5) || (bossA6->dmgPart == 6)) && - (bossA6->swork[A6_SWK_25] != 0)) { - Area6_8018B9BC(bossA6); + if (((this->dmgPart == 4) || (this->dmgPart == 5) || (this->dmgPart == 6)) && + (this->swork[A6_SWK_25] != 0)) { + Area6_8018B9BC(this); } } - if ((bossA6->dmgPart == 1) || (bossA6->dmgPart == 2) || (bossA6->dmgPart == 3)) { - Area6_8018A2C4(bossA6); + if ((this->dmgPart == 1) || (this->dmgPart == 2) || (this->dmgPart == 3)) { + Area6_8018A2C4(this); } - if (bossA6->dmgPart >= 7) { - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, bossA6->sfxSource, 4); + if (this->dmgPart >= 7) { + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } } for (i = 0; i < 3; i++) { - var_s0 = (bossA6->swork[A6_SWK_15 + i] / 10) - 1; + var_s0 = (this->swork[A6_SWK_15 + i] / 10) - 1; if (var_s0 < 0) { var_s0 = 0; } @@ -573,10 +577,10 @@ void Area6_Boss_Update(Boss* bossA6) { Math_SmoothStepToF(&D_i3_801C22F0.b[i], D_i3_801BECB0[var_s0][2], 1.0f, 10.0f, 0); } - if ((bossA6->swork[A6_SWK_15 + 0] == 0) && (bossA6->swork[A6_SWK_15 + 1] == 0) && - (bossA6->swork[A6_SWK_15 + 2] == 0) && (bossA6->fwork[A6_FWK_0] != 0) && !(gGameFrameCount % 2U)) { - func_effect_8007C120(bossA6->obj.pos.x, bossA6->obj.pos.y, bossA6->obj.pos.z + 200.0f, bossA6->vel.x, - bossA6->vel.y, bossA6->vel.z, 0.3f, 1); + if ((this->swork[A6_SWK_15 + 0] == 0) && (this->swork[A6_SWK_15 + 1] == 0) && (this->swork[A6_SWK_15 + 2] == 0) && + (this->fwork[A6_FWK_0] != 0) && !(gGameFrameCount % 2U)) { + func_effect_8007C120(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 200.0f, this->vel.x, this->vel.y, + this->vel.z, 0.3f, 1); } sp120 = 0.5f; @@ -596,70 +600,69 @@ void Area6_Boss_Update(Boss* bossA6) { } } - if ((bossA6->state >= 3) && (bossA6->state < 5) && (bossA6->fwork[A6_FWK_28] == 0.0f)) { - Math_SmoothStepToAngle(&bossA6->fwork[A6_FWK_9], bossA6->fwork[A6_FWK_32], 0.05f, 0.02f, 0.00001f); - Math_SmoothStepToAngle(&bossA6->obj.rot.z, bossA6->fwork[A6_FWK_8], 0.05f, bossA6->fwork[A6_FWK_9], 0.00001f); - if (bossA6->swork[A6_SWK_25] >= 2) { + if ((this->state >= 3) && (this->state < 5) && (this->fwork[A6_FWK_28] == 0.0f)) { + Math_SmoothStepToAngle(&this->fwork[A6_FWK_9], this->fwork[A6_FWK_32], 0.05f, 0.02f, 0.00001f); + Math_SmoothStepToAngle(&this->obj.rot.z, this->fwork[A6_FWK_8], 0.05f, this->fwork[A6_FWK_9], 0.00001f); + if (this->swork[A6_SWK_25] >= 2) { if (!(gGameFrameCount % 64U) && (Rand_ZeroOne() < 0.5f)) { - bossA6->fwork[A6_FWK_6] = RAND_FLOAT_CENTERED(500.0f) + gPlayer[0].cam.eye.x; + this->fwork[A6_FWK_6] = RAND_FLOAT_CENTERED(500.0f) + gPlayer[0].cam.eye.x; } if (!(gGameFrameCount % 64U) && (Rand_ZeroOne() < 0.5f)) { - bossA6->fwork[A6_FWK_7] = RAND_FLOAT_CENTERED(500.0f) + gPlayer[0].cam.eye.y; + this->fwork[A6_FWK_7] = RAND_FLOAT_CENTERED(500.0f) + gPlayer[0].cam.eye.y; } } else { if (!(gGameFrameCount % 32U) && (Rand_ZeroOne() < 0.7f)) { - bossA6->fwork[A6_FWK_6] = RAND_FLOAT_CENTERED(1000.0f) + gPlayer[0].cam.eye.x; - bossA6->fwork[A6_FWK_30] = 0.0f; + this->fwork[A6_FWK_6] = RAND_FLOAT_CENTERED(1000.0f) + gPlayer[0].cam.eye.x; + this->fwork[A6_FWK_30] = 0.0f; } if (!(gGameFrameCount % 32U) && (Rand_ZeroOne() < 0.7f)) { - bossA6->fwork[A6_FWK_7] = RAND_FLOAT_CENTERED(1000.0f) + gPlayer[0].cam.eye.y; - bossA6->fwork[A6_FWK_31] = 0.0f; + this->fwork[A6_FWK_7] = RAND_FLOAT_CENTERED(1000.0f) + gPlayer[0].cam.eye.y; + this->fwork[A6_FWK_31] = 0.0f; } } } - if (bossA6->state != 0) { - Math_SmoothStepToF(&bossA6->fwork[A6_FWK_4], bossA6->fwork[A6_FWK_5], 0.1f, 2.0f, 0.00001f); - Math_SmoothStepToF(&bossA6->obj.pos.z, gPlayer[0].cam.eye.z - gPathProgress + bossA6->fwork[A6_FWK_3], 0.1f, - bossA6->fwork[A6_FWK_4], 0.00001f); - if (bossA6->state < 5) { + if (this->state != 0) { + Math_SmoothStepToF(&this->fwork[A6_FWK_4], this->fwork[A6_FWK_5], 0.1f, 2.0f, 0.00001f); + Math_SmoothStepToF(&this->obj.pos.z, gPlayer[0].cam.eye.z - gPathProgress + this->fwork[A6_FWK_3], 0.1f, + this->fwork[A6_FWK_4], 0.00001f); + if (this->state < 5) { sp120 = 2.0f; - if (bossA6->swork[A6_SWK_25] == 1) { + if (this->swork[A6_SWK_25] == 1) { sp120 = 50.0f; } - Math_SmoothStepToF(&bossA6->fwork[A6_FWK_30], sp120, 0.1f, 1.0f, 0.00001f); - Math_SmoothStepToF(&bossA6->fwork[A6_FWK_31], sp120, 0.1f, 1.0f, 0.00001f); - Math_SmoothStepToF(&bossA6->obj.pos.x, bossA6->fwork[A6_FWK_6], 0.2f, bossA6->fwork[A6_FWK_30], 0.00001f); - Math_SmoothStepToF(&bossA6->obj.pos.y, bossA6->fwork[A6_FWK_7], 0.2f, bossA6->fwork[A6_FWK_31], 0.00001f); + Math_SmoothStepToF(&this->fwork[A6_FWK_30], sp120, 0.1f, 1.0f, 0.00001f); + Math_SmoothStepToF(&this->fwork[A6_FWK_31], sp120, 0.1f, 1.0f, 0.00001f); + Math_SmoothStepToF(&this->obj.pos.x, this->fwork[A6_FWK_6], 0.2f, this->fwork[A6_FWK_30], 0.00001f); + Math_SmoothStepToF(&this->obj.pos.y, this->fwork[A6_FWK_7], 0.2f, this->fwork[A6_FWK_31], 0.00001f); } - Math_SmoothStepToAngle(&bossA6->fwork[A6_FWK_0], bossA6->fwork[A6_FWK_1], 0.2f, bossA6->fwork[A6_FWK_2], - 0.00001f); + Math_SmoothStepToAngle(&this->fwork[A6_FWK_0], this->fwork[A6_FWK_1], 0.2f, this->fwork[A6_FWK_2], 0.00001f); } - Math_SmoothStepToF(&bossA6->fwork[A6_FWK_10 + 0], bossA6->fwork[A6_FWK_13 + 0], 0.1f, bossA6->fwork[A6_FWK_16 + 0], + Math_SmoothStepToF(&this->fwork[A6_FWK_10 + 0], this->fwork[A6_FWK_13 + 0], 0.1f, this->fwork[A6_FWK_16 + 0], 0.0001f); - Math_SmoothStepToF(&bossA6->fwork[A6_FWK_10 + 1], bossA6->fwork[A6_FWK_13 + 1], 0.1f, bossA6->fwork[A6_FWK_16 + 1], + Math_SmoothStepToF(&this->fwork[A6_FWK_10 + 1], this->fwork[A6_FWK_13 + 1], 0.1f, this->fwork[A6_FWK_16 + 1], 0.0001f); - Math_SmoothStepToF(&bossA6->fwork[A6_FWK_10 + 2], bossA6->fwork[A6_FWK_13 + 2], 0.1f, bossA6->fwork[A6_FWK_16 + 2], + Math_SmoothStepToF(&this->fwork[A6_FWK_10 + 2], this->fwork[A6_FWK_13 + 2], 0.1f, this->fwork[A6_FWK_16 + 2], 0.0001f); - Math_SmoothStepToF(&bossA6->fwork[A6_FWK_19 + 0], bossA6->fwork[A6_FWK_22 + 0], 0.1f, 10.0f, 0.00001f); - Math_SmoothStepToF(&bossA6->fwork[A6_FWK_19 + 1], bossA6->fwork[A6_FWK_22 + 1], 0.1f, 10.0f, 0.00001f); - Math_SmoothStepToF(&bossA6->fwork[A6_FWK_19 + 2], bossA6->fwork[A6_FWK_22 + 2], 0.1f, 10.0f, 0.00001f); + Math_SmoothStepToF(&this->fwork[A6_FWK_19 + 0], this->fwork[A6_FWK_22 + 0], 0.1f, 10.0f, 0.00001f); + Math_SmoothStepToF(&this->fwork[A6_FWK_19 + 1], this->fwork[A6_FWK_22 + 1], 0.1f, 10.0f, 0.00001f); + Math_SmoothStepToF(&this->fwork[A6_FWK_19 + 2], this->fwork[A6_FWK_22 + 2], 0.1f, 10.0f, 0.00001f); - if (bossA6->state > 10) { - bossA6->obj.rot.z += bossA6->fwork[A6_FWK_28]; - bossA6->obj.rot.z = Math_ModF(bossA6->obj.rot.z, 360.0f); + if (this->state > 10) { + this->obj.rot.z += this->fwork[A6_FWK_28]; + this->obj.rot.z = Math_ModF(this->obj.rot.z, 360.0f); - Math_SmoothStepToF(&bossA6->fwork[A6_FWK_28], 5.0f, 0.1f, 0.2f, 0.0001f); + Math_SmoothStepToF(&this->fwork[A6_FWK_28], 5.0f, 0.1f, 0.2f, 0.0001f); for (i = 0; i < 10; i++) { - func_effect_80079618(bossA6->obj.pos.x + RAND_FLOAT_CENTERED(500.0f), - bossA6->obj.pos.y + RAND_FLOAT_CENTERED(500.0f), - bossA6->obj.pos.z + RAND_FLOAT_CENTERED(100.0f), RAND_FLOAT(4.0f) + 1.0f); + func_effect_80079618(this->obj.pos.x + RAND_FLOAT_CENTERED(500.0f), + this->obj.pos.y + RAND_FLOAT_CENTERED(500.0f), + this->obj.pos.z + RAND_FLOAT_CENTERED(100.0f), RAND_FLOAT(4.0f) + 1.0f); } - if (bossA6->timer_05C == 0) { - bossA6->timer_05C = 15; + if (this->timer_05C == 0) { + this->timer_05C = 15; } if (((gGameFrameCount % 2) == 0)) { Matrix_MultVec3f(gCalcMatrix, &D_i3_801BED04, &spC8[3]); @@ -673,19 +676,19 @@ void Area6_Boss_Update(Boss* bossA6) { if (i == 3) { var_s0 = RAND_FLOAT_CENTERED(100.0f); } - func_effect_8007D0E0(bossA6->obj.pos.x + var_s0 + spC8[i].x, bossA6->obj.pos.y + var_s0 + spC8[i].y, - bossA6->obj.pos.z + spC8[i].z, 10.0f); + func_effect_8007D0E0(this->obj.pos.x + var_s0 + spC8[i].x, this->obj.pos.y + var_s0 + spC8[i].y, + this->obj.pos.z + spC8[i].z, 10.0f); } } if (!(gGameFrameCount % 32U)) { - func_effect_8007C120(bossA6->obj.pos.x, bossA6->obj.pos.y, bossA6->obj.pos.z + 300.0f, bossA6->vel.x, - bossA6->vel.y, bossA6->vel.z, 0.5f, 70); + func_effect_8007C120(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 300.0f, this->vel.x, this->vel.y, + this->vel.z, 0.5f, 70); } } if (!(gGameFrameCount % 16U)) { - dz_114 = fabsf(bossA6->fwork[A6_FWK_3] / -1700.0f); + dz_114 = fabsf(this->fwork[A6_FWK_3] / -1700.0f); if (dz_114 < 1.0f) { dz_114 = 1.0f; } @@ -695,29 +698,29 @@ void Area6_Boss_Update(Boss* bossA6) { for (i = 0; i < 3; i++) { sp120 = dz_114; - if (bossA6->swork[A6_SWK_18 + i] != 0) { + if (this->swork[A6_SWK_18 + i] != 0) { sp120 = 1.0f; } - A6_HIT_1_2(bossA6, i)->z.size = 195.0f * sp120; - A6_HIT_1_2(bossA6, i)->y.size = 147.0f * sp120; - A6_HIT_1_2(bossA6, i)->x.size = 153.0f * sp120; + A6_HIT_1_2(this, i)->z.size = 195.0f * sp120; + A6_HIT_1_2(this, i)->y.size = 147.0f * sp120; + A6_HIT_1_2(this, i)->x.size = 153.0f * sp120; } } - switch (bossA6->state) { + switch (this->state) { case 0: - bossA6->info.hitbox[0] = 0; + this->info.hitbox[0] = 0; - dx_11C = gPlayer[0].pos.x - bossA6->obj.pos.x; - dy_118 = gPlayer[0].pos.y - bossA6->obj.pos.y; - dz_114 = gPlayer[0].pos.z - 700.0f - bossA6->obj.pos.z; + dx_11C = gPlayer[0].pos.x - this->obj.pos.x; + dy_118 = gPlayer[0].pos.y - this->obj.pos.y; + dz_114 = gPlayer[0].pos.z - 700.0f - this->obj.pos.z; sp104 = 10.0f; - if ((bossA6->timer_050 != 0) && (bossA6->timer_050 < 200)) { - dx_11C = gPlayer[0].cam.eye.x - bossA6->obj.pos.x; - dy_118 = gPlayer[0].cam.eye.y - bossA6->obj.pos.y; - dz_114 = gPlayer[0].cam.eye.z - gPathProgress + bossA6->fwork[A6_FWK_3] - bossA6->obj.pos.z; + if ((this->timer_050 != 0) && (this->timer_050 < 200)) { + dx_11C = gPlayer[0].cam.eye.x - this->obj.pos.x; + dy_118 = gPlayer[0].cam.eye.y - this->obj.pos.y; + dz_114 = gPlayer[0].cam.eye.z - gPathProgress + this->fwork[A6_FWK_3] - this->obj.pos.z; sp104 = 100.0f; } @@ -727,105 +730,105 @@ void Area6_Boss_Update(Boss* bossA6) { pitch_110 = Math_Atan2F(dy_118, sqrtf(SQ(dx_11C) + SQ(dz_114))); pitch_110 = Math_RadToDeg(-pitch_110); - Math_SmoothStepToAngle(&bossA6->rot_078.y, yaw_10C, 1.0f, sp104, 0.00001f); - Math_SmoothStepToAngle(&bossA6->rot_078.x, pitch_110, 1.0f, sp104, 0.00001f); - Matrix_RotateY(gCalcMatrix, bossA6->rot_078.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, bossA6->rot_078.x * M_DTOR, MTXF_APPLY); + Math_SmoothStepToAngle(&this->rot_078.y, yaw_10C, 1.0f, sp104, 0.00001f); + Math_SmoothStepToAngle(&this->rot_078.x, pitch_110, 1.0f, sp104, 0.00001f); + Matrix_RotateY(gCalcMatrix, this->rot_078.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->rot_078.x * M_DTOR, MTXF_APPLY); sp98.x = sp98.y = 0.0f; sp98.z = 30.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp98, &sp8C); - bossA6->vel.x = sp8C.x; - bossA6->vel.y = sp8C.y; + this->vel.x = sp8C.x; + this->vel.y = sp8C.y; sp98.x = sp98.y = 0.0f; sp98.z = 60.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp98, &sp8C); - bossA6->vel.z = sp8C.z; - bossA6->fwork[A6_FWK_33] += 30.0f; + this->vel.z = sp8C.z; + this->fwork[A6_FWK_33] += 30.0f; - if (bossA6->timer_050 == 0) { + if (this->timer_050 == 0) { Math_SmoothStepToF(&D_i3_801C22F0.unk_24, 0.0f, 0.1f, 1.0f, 0); if (D_i3_801C22F0.unk_24 < 1.0f) { D_i3_801C22F0.unk_24 = 0.0f; - Audio_KillSfxBySource(bossA6->sfxSource); + Audio_KillSfxBySource(this->sfxSource); - AUDIO_PLAY_SFX(NA_SE_EN_SHIELD_ROLL_STOP, bossA6->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SHIELD_ROLL_STOP, this->sfxSource, 4); - bossA6->timer_050 = 20; - bossA6->obj.pos.z = gPlayer[0].cam.eye.z - gPathProgress + bossA6->fwork[A6_FWK_3]; - bossA6->fwork[A6_FWK_6] = bossA6->obj.pos.x = gPlayer[0].cam.eye.x; - bossA6->fwork[A6_FWK_7] = bossA6->obj.pos.y = gPlayer[0].cam.eye.y; - bossA6->state = 2; - bossA6->vel.x = 0.0f; - bossA6->vel.y = 0.0f; - bossA6->vel.z = -40.0f; + this->timer_050 = 20; + this->obj.pos.z = gPlayer[0].cam.eye.z - gPathProgress + this->fwork[A6_FWK_3]; + this->fwork[A6_FWK_6] = this->obj.pos.x = gPlayer[0].cam.eye.x; + this->fwork[A6_FWK_7] = this->obj.pos.y = gPlayer[0].cam.eye.y; + this->state = 2; + this->vel.x = 0.0f; + this->vel.y = 0.0f; + this->vel.z = -40.0f; - AUDIO_PLAY_SFX(NA_SE_EN_WARP_OUT, bossA6->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_WARP_OUT, this->sfxSource, 4); } } break; case 1: Math_SmoothStepToF(D_ctx_801779A8, 10.0f, 1.0f, 5.0f, 0.0f); - bossA6->info.hitbox[0] = 0; - Math_SmoothStepToAngle(&bossA6->obj.rot.z, 0.0f, 1.0f, 10.0f, 0.0001f); + this->info.hitbox[0] = 0; + Math_SmoothStepToAngle(&this->obj.rot.z, 0.0f, 1.0f, 10.0f, 0.0001f); - if (bossA6->obj.rot.z < 1.0f) { + if (this->obj.rot.z < 1.0f) { if (D_i3_801C2250[A6_BSS_27] == 0) { - AUDIO_PLAY_SFX(NA_SE_EN_WARP_IN, bossA6->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_WARP_IN, this->sfxSource, 4); D_i3_801C2250[A6_BSS_27] = 1; } - bossA6->obj.rot.z = 0.0f; + this->obj.rot.z = 0.0f; Math_SmoothStepToF(&D_i3_801C22F0.unk_24, 0.0f, 0.1f, 5.0f, 0.0f); - Math_SmoothStepToF(&bossA6->fwork[A6_FWK_34], 2.0f, 0.1f, 0.1f, 0.0f); - Math_SmoothStepToF(&bossA6->fwork[A6_FWK_35], 1.2f, 0.1f, 0.1f, 0.0f); + Math_SmoothStepToF(&this->fwork[A6_FWK_34], 2.0f, 0.1f, 0.1f, 0.0f); + Math_SmoothStepToF(&this->fwork[A6_FWK_35], 1.2f, 0.1f, 0.1f, 0.0f); if (D_i3_801C22F0.unk_24 < 1.0f) { - bossA6->fwork[A6_FWK_6] = RAND_FLOAT_CENTERED(1000.0f) + gPlayer[0].cam.eye.x; - bossA6->fwork[A6_FWK_7] = RAND_FLOAT_CENTERED(1000.0f) + gPlayer[0].cam.eye.y; - bossA6->fwork[A6_FWK_3] = -3700.0f + RAND_FLOAT_CENTERED(3000.0f); - bossA6->fwork[A6_FWK_34] = 2.0f; - bossA6->fwork[A6_FWK_35] = 1.2f; + this->fwork[A6_FWK_6] = RAND_FLOAT_CENTERED(1000.0f) + gPlayer[0].cam.eye.x; + this->fwork[A6_FWK_7] = RAND_FLOAT_CENTERED(1000.0f) + gPlayer[0].cam.eye.y; + this->fwork[A6_FWK_3] = -3700.0f + RAND_FLOAT_CENTERED(3000.0f); + this->fwork[A6_FWK_34] = 2.0f; + this->fwork[A6_FWK_35] = 1.2f; - if ((bossA6->swork[A6_SWK_37] == 0) && (bossA6->swork[A6_SWK_33 + 0] == 0) && - (bossA6->swork[A6_SWK_33 + 1] == 0) && (bossA6->swork[A6_SWK_33 + 2] == 0) && - (bossA6->swork[A6_SWK_27 + 0] == 0) && (bossA6->swork[A6_SWK_27 + 1] == 0) && - (bossA6->swork[A6_SWK_27 + 2] == 0)) { - bossA6->swork[A6_SWK_37] = 1; + if ((this->swork[A6_SWK_37] == 0) && (this->swork[A6_SWK_33 + 0] == 0) && + (this->swork[A6_SWK_33 + 1] == 0) && (this->swork[A6_SWK_33 + 2] == 0) && + (this->swork[A6_SWK_27 + 0] == 0) && (this->swork[A6_SWK_27 + 1] == 0) && + (this->swork[A6_SWK_27 + 2] == 0)) { + this->swork[A6_SWK_37] = 1; } - if (bossA6->swork[A6_SWK_37] != 0) { - bossA6->swork[A6_SWK_18 + 0] = bossA6->swork[A6_SWK_18 + 1] = bossA6->swork[A6_SWK_18 + 2] = 3; - bossA6->fwork[A6_FWK_3] = -1700.0f; - if ((bossA6->swork[A6_SWK_25] != 1) && (D_i3_801C2250[A6_BSS_0] != 2)) { - bossA6->fwork[A6_FWK_3] = RAND_FLOAT_CENTERED(1000.0f) + -3700.0f; + if (this->swork[A6_SWK_37] != 0) { + this->swork[A6_SWK_18 + 0] = this->swork[A6_SWK_18 + 1] = this->swork[A6_SWK_18 + 2] = 3; + this->fwork[A6_FWK_3] = -1700.0f; + if ((this->swork[A6_SWK_25] != 1) && (D_i3_801C2250[A6_BSS_0] != 2)) { + this->fwork[A6_FWK_3] = RAND_FLOAT_CENTERED(1000.0f) + -3700.0f; } - bossA6->obj.pos.z = gPlayer[0].cam.eye.z - gPathProgress + bossA6->fwork[A6_FWK_3]; - bossA6->fwork[A6_FWK_6] = bossA6->obj.pos.x = gPlayer[0].cam.eye.x; - bossA6->fwork[A6_FWK_7] = bossA6->obj.pos.y = gPlayer[0].cam.eye.y; + this->obj.pos.z = gPlayer[0].cam.eye.z - gPathProgress + this->fwork[A6_FWK_3]; + this->fwork[A6_FWK_6] = this->obj.pos.x = gPlayer[0].cam.eye.x; + this->fwork[A6_FWK_7] = this->obj.pos.y = gPlayer[0].cam.eye.y; } D_i3_801C22F0.unk_24 = 0.0f; - bossA6->timer_050 = 50; - bossA6->state = 2; + this->timer_050 = 50; + this->state = 2; D_i3_801C2250[A6_BSS_8] = 0; - AUDIO_PLAY_SFX(NA_SE_EN_WARP_OUT, bossA6->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_WARP_OUT, this->sfxSource, 4); } } break; case 2: Math_SmoothStepToF(D_ctx_801779A8, 10.0f, 1.0f, 5.0f, 0.0f); - if (bossA6->timer_050 == 10) { + if (this->timer_050 == 10) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; gFillScreenAlpha = gFillScreenAlphaTarget = 255; gFillScreenAlphaTarget = 0; @@ -833,43 +836,43 @@ void Area6_Boss_Update(Boss* bossA6) { gCameraShake = 50; } - if (bossA6->timer_050 == 0) { + if (this->timer_050 == 0) { if (D_i3_801C2250[A6_BSS_8] == 0) { D_i3_801C2250[A6_BSS_8] = 1; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 0; } Math_SmoothStepToF(&D_i3_801C22F0.unk_24, 255.0f, 0.1f, 10.0f, 0.0f); - Math_SmoothStepToF(&bossA6->fwork[A6_FWK_34], 1.0f, 0.1f, 0.1f, 0.0f); - Math_SmoothStepToF(&bossA6->fwork[A6_FWK_35], 1.0f, 0.1f, 0.1f, 0.0f); + Math_SmoothStepToF(&this->fwork[A6_FWK_34], 1.0f, 0.1f, 0.1f, 0.0f); + Math_SmoothStepToF(&this->fwork[A6_FWK_35], 1.0f, 0.1f, 0.1f, 0.0f); if (D_i3_801C22F0.unk_24 > 254.0f) { D_i3_801C22F0.unk_24 = 255.0f; - bossA6->info.hitbox[0] = 10; - bossA6->fwork[A6_FWK_34] = bossA6->fwork[A6_FWK_35] = 1.0f; + this->info.hitbox[0] = 10; + this->fwork[A6_FWK_34] = this->fwork[A6_FWK_35] = 1.0f; - switch (bossA6->swork[A6_SWK_38]) { + switch (this->swork[A6_SWK_38]) { case 0: - bossA6->timer_050 = 100; + this->timer_050 = 100; break; case 1: - bossA6->timer_050 = 1399; + this->timer_050 = 1399; break; } - bossA6->swork[A6_SWK_38] = 0; + this->swork[A6_SWK_38] = 0; D_i3_801C2250[A6_BSS_28] = 1; - bossA6->state = 4; + this->state = 4; - if (bossA6->swork[A6_SWK_37] != 0) { - bossA6->timer_050 = 30; - bossA6->swork[A6_SWK_37] = 0; - bossA6->fwork[A6_FWK_8] = bossA6->fwork[A6_FWK_9] = 0.0f; - if (bossA6->swork[A6_SWK_36] < 2) { - bossA6->swork[A6_SWK_36]++; + if (this->swork[A6_SWK_37] != 0) { + this->timer_050 = 30; + this->swork[A6_SWK_37] = 0; + this->fwork[A6_FWK_8] = this->fwork[A6_FWK_9] = 0.0f; + if (this->swork[A6_SWK_36] < 2) { + this->swork[A6_SWK_36]++; } - bossA6->state = 3; + this->state = 3; } if (D_i3_801C2250[A6_BSS_6] != 0) { @@ -881,10 +884,10 @@ void Area6_Boss_Update(Boss* bossA6) { } if ((D_i3_801C2250[A6_BSS_6] == 0) || (D_i3_801C2250[A6_BSS_0] == 0)) { - bossA6->fwork[A6_FWK_1] = 90.0f; - bossA6->fwork[A6_FWK_2] = 2.0f; - AUDIO_PLAY_SFX(NA_SE_EN_COVER_OPEN, bossA6->sfxSource, 4); - bossA6->info.hitbox = SEGMENTED_TO_VIRTUAL(D_A6_6028578); + this->fwork[A6_FWK_1] = 90.0f; + this->fwork[A6_FWK_2] = 2.0f; + AUDIO_PLAY_SFX(NA_SE_EN_COVER_OPEN, this->sfxSource, 4); + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_A6_6028578); D_i3_801C2250[A6_BSS_7] = 0; } } @@ -892,125 +895,123 @@ void Area6_Boss_Update(Boss* bossA6) { break; case 3: - if (bossA6->timer_050 == 1) { - Audio_KillSfxBySource(bossA6->sfxSource); + if (this->timer_050 == 1) { + Audio_KillSfxBySource(this->sfxSource); if (D_i3_801C2250[A6_BSS_7] == 0) { - AUDIO_PLAY_SFX(NA_SE_EN_ENERGY_BALL, bossA6->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ENERGY_BALL, this->sfxSource, 4); D_i3_801C2250[A6_BSS_7] = 1; } } if (D_i3_801C2250[A6_BSS_0] != 0) { - if (bossA6->swork[A6_SWK_25] == 1) { - bossA6->timer_052 = 30; - bossA6->state = 5; - bossA6->fwork[A6_FWK_1] = 90.0f; - bossA6->fwork[A6_FWK_2] = 2.0f; - bossA6->fwork[A6_FWK_37] = 300.0f; + if (this->swork[A6_SWK_25] == 1) { + this->timer_052 = 30; + this->state = 5; + this->fwork[A6_FWK_1] = 90.0f; + this->fwork[A6_FWK_2] = 2.0f; + this->fwork[A6_FWK_37] = 300.0f; } else { - bossA6->timer_052 = 30; - bossA6->state = 8; + this->timer_052 = 30; + this->state = 8; } } else { - if ((bossA6->swork[A6_SWK_36] == 3) && (D_i3_801C2250[A6_BSS_29] == 0)) { + if ((this->swork[A6_SWK_36] == 3) && (D_i3_801C2250[A6_BSS_29] == 0)) { Radio_PlayMessage(gMsg_ID_7084, RCID_PEPPY); - bossA6->swork[A6_SWK_36] = 4; + this->swork[A6_SWK_36] = 4; D_i3_801C2250[A6_BSS_29]++; D_i3_801C2250[A6_BSS_29] &= 1; } - if ((bossA6->swork[A6_SWK_30 + 0] != 0) && (bossA6->swork[A6_SWK_30 + 1] != 0) && - (bossA6->swork[A6_SWK_30 + 2] != 0)) { - bossA6->timer_050 = 1500; - bossA6->fwork[A6_FWK_1] = 0.0f; + if ((this->swork[A6_SWK_30 + 0] != 0) && (this->swork[A6_SWK_30 + 1] != 0) && + (this->swork[A6_SWK_30 + 2] != 0)) { + this->timer_050 = 1500; + this->fwork[A6_FWK_1] = 0.0f; D_i3_801C2250[A6_BSS_28] = 0; - bossA6->state = 4; - bossA6->fwork[A6_FWK_2] = 1.0f; - bossA6->info.hitbox = SEGMENTED_TO_VIRTUAL(D_A6_6028454); + this->state = 4; + this->fwork[A6_FWK_2] = 1.0f; + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_A6_6028454); D_i3_801C2250[A6_BSS_6] = 1; - Audio_KillSfxBySource(bossA6->sfxSource); - AUDIO_PLAY_SFX(NA_SE_EN_COVER_CLOSE, bossA6->sfxSource, 4); - bossA6->swork[A6_SWK_30 + 0] = bossA6->swork[A6_SWK_30 + 1] = bossA6->swork[A6_SWK_30 + 2] = 0; - } else if (bossA6->swork[A6_SWK_30 + 0] == 0) { - Area6_8018A1B0(bossA6, 0); - } else if (bossA6->swork[A6_SWK_30 + 1] == 0) { - Area6_8018A1B0(bossA6, 1); - } else if (bossA6->swork[A6_SWK_30 + 2] == 0) { - Area6_8018A1B0(bossA6, 2); + Audio_KillSfxBySource(this->sfxSource); + AUDIO_PLAY_SFX(NA_SE_EN_COVER_CLOSE, this->sfxSource, 4); + this->swork[A6_SWK_30 + 0] = this->swork[A6_SWK_30 + 1] = this->swork[A6_SWK_30 + 2] = 0; + } else if (this->swork[A6_SWK_30 + 0] == 0) { + Area6_8018A1B0(this, 0); + } else if (this->swork[A6_SWK_30 + 1] == 0) { + Area6_8018A1B0(this, 1); + } else if (this->swork[A6_SWK_30 + 2] == 0) { + Area6_8018A1B0(this, 2); } } break; case 4: - if (bossA6->timer_050 == 1400) { - bossA6->swork[A6_SWK_15 + 0] = bossA6->swork[A6_SWK_15 + 1] = bossA6->swork[A6_SWK_15 + 2] = 40; - if (bossA6->swork[A6_SWK_25] == 0) { - bossA6->swork[A6_SWK_25] = 1; + if (this->timer_050 == 1400) { + this->swork[A6_SWK_15 + 0] = this->swork[A6_SWK_15 + 1] = this->swork[A6_SWK_15 + 2] = 40; + if (this->swork[A6_SWK_25] == 0) { + this->swork[A6_SWK_25] = 1; } - bossA6->fwork[A6_FWK_3] = RAND_FLOAT_CENTERED(1000.0f) + -3700.0f; + this->fwork[A6_FWK_3] = RAND_FLOAT_CENTERED(1000.0f) + -3700.0f; if (D_i3_801C2250[A6_BSS_28] == 0) { - AUDIO_PLAY_SFX(NA_SE_EN_COVER_MOVE_STOP, bossA6->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_COVER_MOVE_STOP, this->sfxSource, 4); } } - Math_SmoothStepToF(&bossA6->fwork[A6_FWK_29], 255.0f, 1.0f, 10.0f, 0.0001f); + Math_SmoothStepToF(&this->fwork[A6_FWK_29], 255.0f, 1.0f, 10.0f, 0.0001f); - if ((bossA6->swork[A6_SWK_36] == 2) && (bossA6->fwork[A6_FWK_0] == 0.0f) && - (D_i3_801C2250[A6_BSS_30] == 0)) { + if ((this->swork[A6_SWK_36] == 2) && (this->fwork[A6_FWK_0] == 0.0f) && (D_i3_801C2250[A6_BSS_30] == 0)) { Radio_PlayMessage(gMsg_ID_7083, RCID_PEPPY); - bossA6->swork[A6_SWK_36] = 3; + this->swork[A6_SWK_36] = 3; D_i3_801C2250[A6_BSS_30]++; D_i3_801C2250[A6_BSS_30] &= 1; } if (!(gGameFrameCount % 64U)) { - bossA6->fwork[A6_FWK_8] = RAND_FLOAT(360.0f); - bossA6->fwork[A6_FWK_9] = 0.0f; + this->fwork[A6_FWK_8] = RAND_FLOAT(360.0f); + this->fwork[A6_FWK_9] = 0.0f; } - if ((bossA6->timer_050 == 0) || - ((bossA6->swork[A6_SWK_33 + 0] == 0) && (bossA6->swork[A6_SWK_33 + 1] == 0) && - (bossA6->swork[A6_SWK_33 + 2] == 0) && (bossA6->swork[A6_SWK_27 + 0] == 0) && - (bossA6->swork[A6_SWK_27 + 1] == 0) && (bossA6->swork[A6_SWK_27 + 2] == 0))) { - bossA6->swork[A6_SWK_37] = 1; + if ((this->timer_050 == 0) || ((this->swork[A6_SWK_33 + 0] == 0) && (this->swork[A6_SWK_33 + 1] == 0) && + (this->swork[A6_SWK_33 + 2] == 0) && (this->swork[A6_SWK_27 + 0] == 0) && + (this->swork[A6_SWK_27 + 1] == 0) && (this->swork[A6_SWK_27 + 2] == 0))) { + this->swork[A6_SWK_37] = 1; if (D_i3_801C2250[A6_BSS_6] != 0) { - bossA6->state = 1; + this->state = 1; D_i3_801C2250[A6_BSS_27] = 0; } else { - bossA6->fwork[A6_FWK_1] = 90.0f; - bossA6->timer_050 = 30; - bossA6->fwork[A6_FWK_8] = bossA6->fwork[A6_FWK_9] = 0; - bossA6->fwork[A6_FWK_2] = 2.0f; + this->fwork[A6_FWK_1] = 90.0f; + this->timer_050 = 30; + this->fwork[A6_FWK_8] = this->fwork[A6_FWK_9] = 0; + this->fwork[A6_FWK_2] = 2.0f; - AUDIO_PLAY_SFX(NA_SE_EN_COVER_OPEN, bossA6->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_COVER_OPEN, this->sfxSource, 4); - bossA6->info.hitbox = SEGMENTED_TO_VIRTUAL(D_A6_6028578); + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_A6_6028578); - D_i3_801C2250[A6_BSS_7] = bossA6->swork[A6_SWK_37] = 0; + D_i3_801C2250[A6_BSS_7] = this->swork[A6_SWK_37] = 0; - bossA6->state = 3; + this->state = 3; if (D_i3_801C2250[A6_BSS_6] == 0) { AUDIO_PLAY_BGM(NA_BGM_BOSS_A6); } } - } else if (bossA6->swork[A6_SWK_38] != 0) { - bossA6->timer_052 = 30; - bossA6->state = 9; - bossA6->fwork[A6_FWK_28] = 0.0f; + } else if (this->swork[A6_SWK_38] != 0) { + this->timer_052 = 30; + this->state = 9; + this->fwork[A6_FWK_28] = 0.0f; D_i3_801C2250[A6_BSS_24] = 0; D_i3_801C2250[A6_BSS_27] = 0; - bossA6->timer_050 = 0; - bossA6->timer_054 = 0; + this->timer_050 = 0; + this->timer_054 = 0; D_i3_801C2250[A6_BSS_34] = 1; } break; case 5: - if (bossA6->timer_050 == 1) { + if (this->timer_050 == 1) { Area6_80187704(); - AUDIO_PLAY_SFX(NA_SE_EN_A6BOSS_CHARGE, bossA6->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_A6BOSS_CHARGE, this->sfxSource, 4); D_i3_801C2250[A6_BSS_33] = 120; } @@ -1034,10 +1035,10 @@ void Area6_Boss_Update(Boss* bossA6) { break; case 6: - bossA6->obj.pos.z -= bossA6->fwork[A6_FWK_37]; + this->obj.pos.z -= this->fwork[A6_FWK_37]; - Math_SmoothStepToF(&bossA6->fwork[A6_FWK_37], 0.0f, 1.0f, 10.0f, 0.00001f); - Math_SmoothStepToF(&bossA6->fwork[A6_FWK_3], -6000.0f, 10.0f, 100.0f, 0.00001f); + Math_SmoothStepToF(&this->fwork[A6_FWK_37], 0.0f, 1.0f, 10.0f, 0.00001f); + Math_SmoothStepToF(&this->fwork[A6_FWK_3], -6000.0f, 10.0f, 100.0f, 0.00001f); var_s0 = D_i3_801C2250[A6_BSS_9] * 4; @@ -1050,35 +1051,35 @@ void Area6_Boss_Update(Boss* bossA6) { D_i3_801C2250[A6_BSS_9] &= 3; } - if (bossA6->timer_050 == 0) { - bossA6->fwork[A6_FWK_1] = 0.0f; - bossA6->state = 7; + if (this->timer_050 == 0) { + this->fwork[A6_FWK_1] = 0.0f; + this->state = 7; } break; case 7: - effect = &gEffects[bossA6->swork[A6_SWK_39]]; + effect = &gEffects[this->swork[A6_SWK_39]]; Math_SmoothStepToF(&D_i3_801C22F0.unk_28[0], 255.0f, 1.0f, 100.0f, 0.00001f); Math_SmoothStepToF(&D_i3_801C22F0.unk_28[2], 255.0f, 1.0f, 100.0f, 0.00001f); Math_SmoothStepToF(&D_i3_801C22F0.unk_28[1], 255.0f, 1.0f, 100.0f, 0.00001f); - if (bossA6->fwork[A6_FWK_0] < 10.0f) { - effect->unk_60.y = 5.0f - ((10.0f - bossA6->fwork[A6_FWK_0]) * 0.3f); - effect->unk_60.x = 5.0f - ((10.0f - bossA6->fwork[A6_FWK_0]) * 0.3f); + if (this->fwork[A6_FWK_0] < 10.0f) { + effect->unk_60.y = 5.0f - ((10.0f - this->fwork[A6_FWK_0]) * 0.3f); + effect->unk_60.x = 5.0f - ((10.0f - this->fwork[A6_FWK_0]) * 0.3f); } - if (bossA6->fwork[A6_FWK_0] < 1.0f) { + if (this->fwork[A6_FWK_0] < 1.0f) { Math_SmoothStepToF(&effect->unk_60.x, 0.0f, 0.1f, 1.0f, 0.00001f); Math_SmoothStepToF(&effect->unk_60.y, 0.0f, 0.1f, 1.0f, 0.00001f); Math_SmoothStepToF(&effect->unk_60.z, 0.0f, 1.0f, 2.0f, 0.00001f); if (effect->unk_60.z < 0.2f) { D_i3_801C2250[A6_BSS_0] = 2; - bossA6->swork[A6_SWK_37] = 1; - bossA6->timer_050 = 20; + this->swork[A6_SWK_37] = 1; + this->timer_050 = 20; D_i3_801C22F0.unk_28[0] = D_i3_801C22F0.unk_28[2] = D_i3_801C22F0.unk_28[1] = 255.0f; - bossA6->state = 1; + this->state = 1; D_i3_801C2250[A6_BSS_27] = 0; Object_Kill(&effect->obj, effect->sfxSource); } @@ -1086,36 +1087,36 @@ void Area6_Boss_Update(Boss* bossA6) { break; case 8: - if (bossA6->timer_052 == 0) { + if (this->timer_052 == 0) { D_i3_801C2250[A6_BSS_24] = 0; - bossA6->timer_052 = 300; - bossA6->timer_054 = 0; - bossA6->state = 9; - AUDIO_PLAY_SFX(NA_SE_EN_SHIELD_ROLL_LEVEL, bossA6->sfxSource, 4); + this->timer_052 = 300; + this->timer_054 = 0; + this->state = 9; + AUDIO_PLAY_SFX(NA_SE_EN_SHIELD_ROLL_LEVEL, this->sfxSource, 4); } break; case 9: - if (bossA6->timer_052 == 0) { - Audio_KillSfxBySource(bossA6->sfxSource); - AUDIO_PLAY_SFX(NA_SE_EN_SHIELD_ROLL_STOP, bossA6->sfxSource, 4); - bossA6->timer_054 = 0; - bossA6->state = 10; + if (this->timer_052 == 0) { + Audio_KillSfxBySource(this->sfxSource); + AUDIO_PLAY_SFX(NA_SE_EN_SHIELD_ROLL_STOP, this->sfxSource, 4); + this->timer_054 = 0; + this->state = 10; } else { if (D_i3_801C2250[A6_BSS_34] == 0) { - bossA6->obj.rot.z += bossA6->fwork[A6_FWK_28]; - bossA6->obj.rot.z = Math_ModF(bossA6->obj.rot.z, 360.0f); - Math_SmoothStepToF(&bossA6->fwork[A6_FWK_28], 20.0f, 0.1f, 0.5f, 0.0001f); + this->obj.rot.z += this->fwork[A6_FWK_28]; + this->obj.rot.z = Math_ModF(this->obj.rot.z, 360.0f); + Math_SmoothStepToF(&this->fwork[A6_FWK_28], 20.0f, 0.1f, 0.5f, 0.0001f); } - if (bossA6->timer_054 == 0) { - bossA6->timer_054 = 10; + if (this->timer_054 == 0) { + this->timer_054 = 10; if (D_i3_801C2250[A6_BSS_34] == 0) { - bossA6->timer_054 = 30; + this->timer_054 = 30; } sp128 = 6; - if (bossA6->swork[A6_SWK_25] == 2) { + if (this->swork[A6_SWK_25] == 2) { sp128 = 12; } @@ -1139,18 +1140,18 @@ void Area6_Boss_Update(Boss* bossA6) { spf124 = 0; } - if ((gActors[spf124].obj.status == OBJ_FREE) || (gActors[spf124].obj.id != OBJ_ACTOR_191) || - (D_i3_801C2250[A6_BSS_24] == 0)) { + if ((gActors[spf124].obj.status == OBJ_FREE) || + (gActors[spf124].obj.id != OBJ_MISSILE_SEEK_PLAYER) || (D_i3_801C2250[A6_BSS_24] == 0)) { D_i3_801C2250[A6_BSS_12_0 + var_s0] = 0; spf124 = 0; - if (bossA6->swork[A6_SWK_25] == 1) { + if (this->swork[A6_SWK_25] == 1) { spf124 = 1; } - Area6_801875E4(bossA6->obj.pos.x + sp8C.x, bossA6->obj.pos.y + sp8C.y, - bossA6->obj.pos.z + sp8C.z, 25.0f, pitch_110, yaw_10C, 10, spf124); + Area6_801875E4(this->obj.pos.x + sp8C.x, this->obj.pos.y + sp8C.y, this->obj.pos.z + sp8C.z, + 25.0f, pitch_110, yaw_10C, 10, spf124); D_i3_801C2250[A6_BSS_12_0 + var_s0] = D_i3_801C2250[A6_BSS_11]; } @@ -1162,47 +1163,47 @@ void Area6_Boss_Update(Boss* bossA6) { case 10: if (D_i3_801C2250[A6_BSS_34] == 0) { - bossA6->obj.rot.z += bossA6->fwork[A6_FWK_28]; - bossA6->obj.rot.z = Math_ModF(bossA6->obj.rot.z, 360.0f); - Math_SmoothStepToF(&bossA6->fwork[A6_FWK_28], 0.0f, 0.1f, 0.5f, 0.0001f); + this->obj.rot.z += this->fwork[A6_FWK_28]; + this->obj.rot.z = Math_ModF(this->obj.rot.z, 360.0f); + Math_SmoothStepToF(&this->fwork[A6_FWK_28], 0.0f, 0.1f, 0.5f, 0.0001f); } - if (bossA6->fwork[A6_FWK_28] <= 0.1f) { + if (this->fwork[A6_FWK_28] <= 0.1f) { if (D_i3_801C2250[A6_BSS_34] == 0) { - bossA6->fwork[A6_FWK_28] = 0.0f; + this->fwork[A6_FWK_28] = 0.0f; D_i3_801C2250[A6_BSS_0] = 2; - bossA6->swork[A6_SWK_37] = 1; + this->swork[A6_SWK_37] = 1; } - bossA6->timer_050 = 20; + this->timer_050 = 20; D_i3_801C2250[A6_BSS_27] = 0; D_i3_801C2250[A6_BSS_34] = 0; - bossA6->state = 1; + this->state = 1; } break; case 11: - if ((bossA6->timer_052 == 160) && ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || - (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN))) { + if ((this->timer_052 == 160) && ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || + (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN))) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].csState = 0; } - if (bossA6->timer_052 < 50) { + if (this->timer_052 < 50) { D_ctx_801779A8[0] = 50.0f; } else { D_ctx_801779A8[0] = 20.0f; } - if (bossA6->timer_052 == 0) { + if (this->timer_052 == 0) { gShowBossHealth = 0; - Object_Kill(&bossA6->obj, bossA6->sfxSource); + Object_Kill(&this->obj, this->sfxSource); } break; } - Area6_8018A464(bossA6, 0); - Area6_8018A464(bossA6, 1); - Area6_8018A464(bossA6, 2); + Area6_8018A464(this, 0); + Area6_8018A464(this, 1); + Area6_8018A464(this, 2); for (i = 0; i < 5; i++) { if (!(gGameFrameCount % 4U)) { @@ -1215,15 +1216,15 @@ void Area6_Boss_Update(Boss* bossA6) { Math_SmoothStepToF(&D_i3_801BF250[i], D_i3_801BF2E0[i], 1.0f, 5.0f, 0.001f); } - A6_HIT_4(bossA6, 0)->z.offset = bossA6->vwork[A6_VWK_4].z; - A6_HIT_4(bossA6, 0)->y.offset = bossA6->vwork[A6_VWK_4].y; - A6_HIT_4(bossA6, 0)->x.offset = bossA6->vwork[A6_VWK_4].x; - A6_HIT_4(bossA6, 1)->z.offset = bossA6->vwork[A6_VWK_5].z; - A6_HIT_4(bossA6, 1)->y.offset = bossA6->vwork[A6_VWK_5].y; - A6_HIT_4(bossA6, 1)->x.offset = bossA6->vwork[A6_VWK_5].x; - A6_HIT_4(bossA6, 2)->z.offset = bossA6->vwork[A6_VWK_6].z; - A6_HIT_4(bossA6, 2)->y.offset = bossA6->vwork[A6_VWK_6].y; - A6_HIT_4(bossA6, 2)->x.offset = bossA6->vwork[A6_VWK_6].x; + A6_HIT_4(this, 0)->z.offset = this->vwork[A6_VWK_4].z; + A6_HIT_4(this, 0)->y.offset = this->vwork[A6_VWK_4].y; + A6_HIT_4(this, 0)->x.offset = this->vwork[A6_VWK_4].x; + A6_HIT_4(this, 1)->z.offset = this->vwork[A6_VWK_5].z; + A6_HIT_4(this, 1)->y.offset = this->vwork[A6_VWK_5].y; + A6_HIT_4(this, 1)->x.offset = this->vwork[A6_VWK_5].x; + A6_HIT_4(this, 2)->z.offset = this->vwork[A6_VWK_6].z; + A6_HIT_4(this, 2)->y.offset = this->vwork[A6_VWK_6].y; + A6_HIT_4(this, 2)->x.offset = this->vwork[A6_VWK_6].x; if (gBossFrameCount == 600) { Radio_PlayMessage(gMsg_ID_2225, RCID_SLIPPY); @@ -1232,19 +1233,19 @@ void Area6_Boss_Update(Boss* bossA6) { gShowBossHealth = 1; } if (gBossFrameCount > 756) { - gBossHealthBar = (bossA6->health / 780.0f) * 255.0f; + gBossHealthBar = (this->health / 780.0f) * 255.0f; } for (i = 0; i < 15; i++) { - if (bossA6->swork[A6_SWK_0 + i] != 0) { - bossA6->swork[A6_SWK_0 + i]--; + if (this->swork[A6_SWK_0 + i] != 0) { + this->swork[A6_SWK_0 + i]--; } } - if (bossA6->fwork[A6_FWK_0] > 20.0f) { + if (this->fwork[A6_FWK_0] > 20.0f) { for (i = 0; i < 3; i++) { - if (bossA6->swork[A6_SWK_0 + i] == 0) { - bossA6->swork[A6_SWK_0 + i] = 5; + if (this->swork[A6_SWK_0 + i] == 0) { + this->swork[A6_SWK_0 + i] = 5; } } } @@ -1257,114 +1258,108 @@ void Area6_Boss_Update(Boss* bossA6) { } } -void Area6_8018A1B0(Boss* bossA6, s32 arg1) { +void Area6_8018A1B0(BossA6* this, s32 arg1) { switch (D_i3_801C2250[A6_BSS_2_0 + arg1]) { case 0: - bossA6->swork[A6_SWK_27 + arg1] = 12; + this->swork[A6_SWK_27 + arg1] = 12; D_i3_801C2250[A6_BSS_2_0 + arg1] = 1; break; case 1: - bossA6->fwork[A6_FWK_13 + arg1] = 120.0f; - if (((bossA6->swork[A6_SWK_33 + arg1] == 0) && (D_i3_801C2250[A6_BSS_6] != 0) && - ((bossA6->swork[A6_SWK_15 + 0] != 0) || (bossA6->swork[A6_SWK_15 + 1] != 0) || - (bossA6->swork[A6_SWK_15 + 2] != 0))) || - (bossA6->swork[A6_SWK_25] == 0)) { - bossA6->fwork[A6_FWK_16 + arg1] = 1.0f; + this->fwork[A6_FWK_13 + arg1] = 120.0f; + if (((this->swork[A6_SWK_33 + arg1] == 0) && (D_i3_801C2250[A6_BSS_6] != 0) && + ((this->swork[A6_SWK_15 + 0] != 0) || (this->swork[A6_SWK_15 + 1] != 0) || + (this->swork[A6_SWK_15 + 2] != 0))) || + (this->swork[A6_SWK_25] == 0)) { + this->fwork[A6_FWK_16 + arg1] = 1.0f; } else { - bossA6->fwork[A6_FWK_16 + arg1] = 60.0f; + this->fwork[A6_FWK_16 + arg1] = 60.0f; } - if (bossA6->fwork[A6_FWK_10 + arg1] >= 119.0f) { - bossA6->fwork[A6_FWK_10 + arg1] = 120.0f; - bossA6->swork[A6_SWK_33 + arg1] = 30; - bossA6->fwork[A6_FWK_16 + arg1] = 60.0f; + if (this->fwork[A6_FWK_10 + arg1] >= 119.0f) { + this->fwork[A6_FWK_10 + arg1] = 120.0f; + this->swork[A6_SWK_33 + arg1] = 30; + this->fwork[A6_FWK_16 + arg1] = 60.0f; D_i3_801C2250[A6_BSS_2_0 + arg1] = 0; - bossA6->swork[A6_SWK_6 + arg1] = 0; - bossA6->swork[A6_SWK_9 + arg1] = 0; - bossA6->swork[A6_SWK_30 + arg1] = 1; - bossA6->swork[A6_SWK_18 + arg1] = 0; + this->swork[A6_SWK_6 + arg1] = 0; + this->swork[A6_SWK_9 + arg1] = 0; + this->swork[A6_SWK_30 + arg1] = 1; + this->swork[A6_SWK_18 + arg1] = 0; } break; } } -void Area6_8018A2C4(Boss* bossA6) { +void Area6_8018A2C4(BossA6* this) { s32 i; - Vec3f sp58; - s32 pad1; + Vec3f effectPos; for (i = 0; i < 3; i++) { - if ((bossA6->dmgPart == i + 1) && (bossA6->state == 4) && (bossA6->fwork[A6_FWK_0] < 20.0f)) { - if ((bossA6->swork[A6_SWK_18 + i] != 1) && (bossA6->swork[A6_SWK_18 + i] != 3)) { - bossA6->swork[A6_SWK_0 + i] = 15; - bossA6->swork[A6_SWK_3 + i] = 40; - bossA6->swork[A6_SWK_33 + i] -= bossA6->damage; + if ((this->dmgPart == i + 1) && (this->state == 4) && (this->fwork[A6_FWK_0] < 20.0f)) { + if ((this->swork[A6_SWK_18 + i] != 1) && (this->swork[A6_SWK_18 + i] != 3)) { + this->swork[A6_SWK_0 + i] = 15; + this->swork[A6_SWK_3 + i] = 40; + this->swork[A6_SWK_33 + i] -= this->damage; if (i == 0) { - sp58.x = D_i3_801BF334[0]; - sp58.y = D_i3_801BF3C4[0]; - sp58.z = bossA6->obj.pos.z; - func_effect_8007A6F0(&sp58, NA_SE_OB_DAMAGE_M); + effectPos.x = D_i3_801BF334[0]; + effectPos.y = D_i3_801BF3C4[0]; + effectPos.z = this->obj.pos.z; + Effect_SpawnTimedSfxAtPos(&effectPos, NA_SE_OB_DAMAGE_M); } if (i == 1) { - sp58.x = D_i3_801BF364[0]; - sp58.y = D_i3_801BF3F4[0]; - sp58.z = bossA6->obj.pos.z; - func_effect_8007A6F0(&sp58, NA_SE_OB_DAMAGE_M); + effectPos.x = D_i3_801BF364[0]; + effectPos.y = D_i3_801BF3F4[0]; + effectPos.z = this->obj.pos.z; + Effect_SpawnTimedSfxAtPos(&effectPos, NA_SE_OB_DAMAGE_M); } if (i == 2) { - sp58.x = D_i3_801BF394[0]; - sp58.y = D_i3_801BF424[0]; - sp58.z = bossA6->obj.pos.z; - func_effect_8007A6F0(&sp58, NA_SE_OB_DAMAGE_M); + effectPos.x = D_i3_801BF394[0]; + effectPos.y = D_i3_801BF424[0]; + effectPos.z = this->obj.pos.z; + Effect_SpawnTimedSfxAtPos(&effectPos, NA_SE_OB_DAMAGE_M); } - if (bossA6->swork[A6_SWK_33 + i] < 0) { - bossA6->swork[A6_SWK_33 + i] = 0; + if (this->swork[A6_SWK_33 + i] < 0) { + this->swork[A6_SWK_33 + i] = 0; } } } } } -void Area6_8018A464(Boss* bossA6, s32 arg1) { +void Area6_8018A464(BossA6* this, s32 arg1) { s32 i; s32 j; f32 var_fs0; - Vec3f spE0; - f32 temp1; - f32 temp2; - f32 temp3; - f32 temp4; - f32 temp5; - f32 temp6; - f32 temp7; + Vec3f effectPos; + s32 pad[7]; - A6_HIT_1(bossA6, arg1)->z.offset = bossA6->vwork[A6_VWK_1 + arg1].z; - A6_HIT_1(bossA6, arg1)->y.offset = bossA6->vwork[A6_VWK_1 + arg1].y; - A6_HIT_1(bossA6, arg1)->x.offset = bossA6->vwork[A6_VWK_1 + arg1].x; + A6_HIT_1(this, arg1)->z.offset = this->vwork[A6_VWK_1 + arg1].z; + A6_HIT_1(this, arg1)->y.offset = this->vwork[A6_VWK_1 + arg1].y; + A6_HIT_1(this, arg1)->x.offset = this->vwork[A6_VWK_1 + arg1].x; - if ((D_i3_801C2250[A6_BSS_5] != 0) && (bossA6->timer_056 != 0)) { - bossA6->timer_050 = 202; - bossA6->timer_056 = 0; + if ((D_i3_801C2250[A6_BSS_5] != 0) && (this->timer_056 != 0)) { + this->timer_050 = 202; + this->timer_056 = 0; } - switch (bossA6->swork[A6_SWK_18 + arg1]) { + + switch (this->swork[A6_SWK_18 + arg1]) { case 0: - Math_SmoothStepToF(&bossA6->fwork[A6_FWK_25 + arg1], -90.0f, 0.05f, 2.0f, 0.00001f); - Math_SmoothStepToF(&bossA6->fwork[A6_FWK_22 + arg1], 0.0f, 0.1f, 10.0f, 0.00001f); + Math_SmoothStepToF(&this->fwork[A6_FWK_25 + arg1], -90.0f, 0.05f, 2.0f, 0.00001f); + Math_SmoothStepToF(&this->fwork[A6_FWK_22 + arg1], 0.0f, 0.1f, 10.0f, 0.00001f); switch (arg1) { case 0: - if (bossA6->swork[A6_SWK_33] != 0) { + if (this->swork[A6_SWK_33] != 0) { for (i = 1; i < 12; i++) { D_i3_801BEE90[i] = 3.0f; D_i3_801BEEC0[i] = 3.0f; - if ((bossA6->swork[A6_SWK_6] == 0) && (bossA6->state != 3)) { - bossA6->swork[A6_SWK_6] = 20; + if ((this->swork[A6_SWK_6] == 0) && (this->state != 3)) { + this->swork[A6_SWK_6] = 20; D_i3_801BEE00[0].y = RAND_FLOAT_CENTERED(720.0f); if (D_i3_801BEE00[0].y < -20.0f) { @@ -1374,22 +1369,22 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { D_i3_801BEE00[0].y = 20.0f; } D_i3_801BF3C4[0] = D_i3_801BEE00[0].y; - } else if ((bossA6->swork[A6_SWK_6] & 3) == 0) { + } else if ((this->swork[A6_SWK_6] & 3) == 0) { D_i3_801BF3C4[i] = D_i3_801BEE00[i].y; D_i3_801BEE00[i].y = D_i3_801BF3C4[i - 1]; } - if (bossA6->swork[A6_SWK_9] == 0) { + if (this->swork[A6_SWK_9] == 0) { if ((D_i3_801BEE00[0].y < -20.0f) || (D_i3_801BEE00[0].y > 20.0f)) { for (i = 0; i < 12; i++) { Math_SmoothStepToF(&D_i3_801BEE00[i].x, 0.0f, 0.5f, 100.0f, 0.001f); } } else { - bossA6->swork[A6_SWK_9] = 30; + this->swork[A6_SWK_9] = 30; D_i3_801BEE00[0].x = RAND_FLOAT_CENTERED(30.0f); } D_i3_801BF334[0] = D_i3_801BEE00[0].x; - } else if ((bossA6->swork[A6_SWK_9] % 8) == 0) { + } else if ((this->swork[A6_SWK_9] % 8) == 0) { D_i3_801BF334[i] = D_i3_801BEE00[i].x; D_i3_801BEE00[i].x = D_i3_801BF334[i - 1]; } @@ -1407,13 +1402,13 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { break; case 1: - if (bossA6->swork[A6_SWK_34] != 0) { + if (this->swork[A6_SWK_34] != 0) { for (i = 1; i < 12; i++) { D_i3_801BF010[i] = 3.0f; D_i3_801BF040[i] = 3.0f; - if (bossA6->swork[A6_SWK_7] == 0) { - bossA6->swork[A6_SWK_7] = 20; + if (this->swork[A6_SWK_7] == 0) { + this->swork[A6_SWK_7] = 20; D_i3_801BEF80[0].y = RAND_FLOAT_CENTERED(720.0f); if (D_i3_801BEF80[0].y < -20.0f) { @@ -1423,22 +1418,22 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { D_i3_801BEF80[0].y = 20.0f; } D_i3_801BF3F4[0] = D_i3_801BEF80[0].y; - } else if ((bossA6->swork[A6_SWK_7] & 3) == 0) { + } else if ((this->swork[A6_SWK_7] & 3) == 0) { D_i3_801BF3F4[i] = D_i3_801BEF80[i].y; D_i3_801BEF80[i].y = D_i3_801BF3F4[i - 1]; } - if (bossA6->swork[A6_SWK_10] == 0) { + if (this->swork[A6_SWK_10] == 0) { if ((D_i3_801BEF80[0].y < -20.0f) || (D_i3_801BEF80[0].y > 20.0f)) { for (i = 0; i < 12; i++) { Math_SmoothStepToF(&D_i3_801BEF80[i].x, 0.0f, 0.5f, 50.0f, 0.001f); } } else { - bossA6->swork[A6_SWK_10] = 30; + this->swork[A6_SWK_10] = 30; D_i3_801BEF80[0].x = RAND_FLOAT_CENTERED(30.0f); } D_i3_801BF364[0] = D_i3_801BEF80[0].x; - } else if ((bossA6->swork[A6_SWK_10] % 8) == 0) { + } else if ((this->swork[A6_SWK_10] % 8) == 0) { D_i3_801BF364[i] = D_i3_801BEF80[i].x; D_i3_801BEF80[i].x = D_i3_801BF364[i - 1]; } @@ -1456,13 +1451,13 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { break; case 2: - if (bossA6->swork[A6_SWK_35] != 0) { + if (this->swork[A6_SWK_35] != 0) { for (i = 1; i < 12; i++) { D_i3_801BF190[i] = 3.0f; D_i3_801BF1C0[i] = 3.0f; - if (bossA6->swork[A6_SWK_8] == 0) { - bossA6->swork[A6_SWK_8] = 20; + if (this->swork[A6_SWK_8] == 0) { + this->swork[A6_SWK_8] = 20; D_i3_801BF100[0].y = RAND_FLOAT_CENTERED(720.0f); if (D_i3_801BF100[0].y < -20.0f) { @@ -1472,22 +1467,22 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { D_i3_801BF100[0].y = 20.0f; } D_i3_801BF424[0] = D_i3_801BF100[0].y; - } else if ((bossA6->swork[A6_SWK_8] & 3) == 0) { + } else if ((this->swork[A6_SWK_8] & 3) == 0) { D_i3_801BF424[i] = D_i3_801BF100[i].y; D_i3_801BF100[i].y = D_i3_801BF424[i - 1]; } - if (bossA6->swork[A6_SWK_11] == 0) { + if (this->swork[A6_SWK_11] == 0) { if ((D_i3_801BF100[0].y < -20.0f) || (D_i3_801BF100[0].y > 20.0f)) { for (i = 0; i < 12; i++) { Math_SmoothStepToF(&D_i3_801BF100[i].x, 0.0f, 0.5f, 50.0f, 0.001f); } } else { - bossA6->swork[A6_SWK_11] = 30; + this->swork[A6_SWK_11] = 30; D_i3_801BF100[0].x = RAND_RANGE(-12.0f, 18.0f); } D_i3_801BF394[0] = D_i3_801BF100[0].x; - } else if ((bossA6->swork[A6_SWK_11] % 8) == 0) { + } else if ((this->swork[A6_SWK_11] % 8) == 0) { D_i3_801BF394[i] = D_i3_801BF100[i].x; D_i3_801BF100[i].x = D_i3_801BF394[i - 1]; } @@ -1505,44 +1500,43 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { break; } - if ((bossA6->state >= 3) && (bossA6->fwork[A6_FWK_0] == 0) && - ((bossA6->swork[A6_SWK_33] != 0) || (bossA6->swork[A6_SWK_34] != 0) || - (bossA6->swork[A6_SWK_35] != 0)) && + if ((this->state >= 3) && (this->fwork[A6_FWK_0] == 0) && + ((this->swork[A6_SWK_33] != 0) || (this->swork[A6_SWK_34] != 0) || (this->swork[A6_SWK_35] != 0)) && (D_i3_801C2250[A6_BSS_5] == 0)) { var_fs0 = 0.5f; - if (bossA6->swork[A6_SWK_25] < 2) { + if (this->swork[A6_SWK_25] < 2) { var_fs0 = 0.7f; } if (((gGameFrameCount % 32) == 0) && (Rand_ZeroOne() < var_fs0) && (D_i3_801C2250[A6_BSS_5] == 0) && - (bossA6->swork[A6_SWK_33 + arg1] != 0)) { - if ((Rand_ZeroOne() < 0.2f) || (bossA6->swork[A6_SWK_25] < 2)) { - if (bossA6->swork[A6_SWK_18] == 0) { - bossA6->swork[A6_SWK_18] = 1; + (this->swork[A6_SWK_33 + arg1] != 0)) { + if ((Rand_ZeroOne() < 0.2f) || (this->swork[A6_SWK_25] < 2)) { + if (this->swork[A6_SWK_18] == 0) { + this->swork[A6_SWK_18] = 1; } - if (bossA6->swork[A6_SWK_19] == 0) { - bossA6->swork[A6_SWK_19] = 1; + if (this->swork[A6_SWK_19] == 0) { + this->swork[A6_SWK_19] = 1; } - if (bossA6->swork[A6_SWK_20] == 0) { - bossA6->swork[A6_SWK_20] = 1; + if (this->swork[A6_SWK_20] == 0) { + this->swork[A6_SWK_20] = 1; } - bossA6->swork[A6_SWK_12] = 30; - if (bossA6->swork[A6_SWK_33] != 0) { - bossA6->swork[A6_SWK_13] = bossA6->swork[A6_SWK_12] + 50; + this->swork[A6_SWK_12] = 30; + if (this->swork[A6_SWK_33] != 0) { + this->swork[A6_SWK_13] = this->swork[A6_SWK_12] + 50; } else { - bossA6->swork[A6_SWK_13] = 30; + this->swork[A6_SWK_13] = 30; } - if (bossA6->swork[A6_SWK_34] != 0) { - bossA6->swork[A6_SWK_14] = bossA6->swork[A6_SWK_13] + 50; + if (this->swork[A6_SWK_34] != 0) { + this->swork[A6_SWK_14] = this->swork[A6_SWK_13] + 50; } else { - bossA6->swork[A6_SWK_14] = bossA6->swork[A6_SWK_13]; + this->swork[A6_SWK_14] = this->swork[A6_SWK_13]; } } else { for (i = 0; i < 3; i++) { - if ((i == (gGameFrameCount % 16U)) && (bossA6->swork[A6_SWK_18 + i] == 0)) { - bossA6->swork[A6_SWK_12 + i] = 15; - bossA6->swork[A6_SWK_18 + i] = 1; + if ((i == (gGameFrameCount % 16U)) && (this->swork[A6_SWK_18 + i] == 0)) { + this->swork[A6_SWK_12 + i] = 15; + this->swork[A6_SWK_18 + i] = 1; i = 3; } } @@ -1577,41 +1571,40 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { } } - if (bossA6->swork[A6_SWK_12 + arg1] == 0) { - bossA6->swork[A6_SWK_12 + arg1] = - 40.0f - ((20.0f - ((bossA6->fwork[A6_FWK_3] * -1.0f) / 150.0f)) * 3.0f); + if (this->swork[A6_SWK_12 + arg1] == 0) { + this->swork[A6_SWK_12 + arg1] = 40.0f - ((20.0f - ((this->fwork[A6_FWK_3] * -1.0f) / 150.0f)) * 3.0f); if (arg1 == 0) { - spE0.x = D_i3_801BF334[0]; - spE0.y = D_i3_801BF3C4[0]; - spE0.z = bossA6->obj.pos.z; - func_effect_8007A6F0(&spE0, NA_SE_EN_ARM_SWING); + effectPos.x = D_i3_801BF334[0]; + effectPos.y = D_i3_801BF3C4[0]; + effectPos.z = this->obj.pos.z; + Effect_SpawnTimedSfxAtPos(&effectPos, NA_SE_EN_ARM_SWING); } if (arg1 == 1) { - spE0.x = D_i3_801BF364[0]; - spE0.y = D_i3_801BF3F4[0]; - spE0.z = bossA6->obj.pos.z; - func_effect_8007A6F0(&spE0, NA_SE_EN_ARM_SWING); + effectPos.x = D_i3_801BF364[0]; + effectPos.y = D_i3_801BF3F4[0]; + effectPos.z = this->obj.pos.z; + Effect_SpawnTimedSfxAtPos(&effectPos, NA_SE_EN_ARM_SWING); } if (arg1 == 2) { - spE0.x = D_i3_801BF394[0]; - spE0.y = D_i3_801BF424[0]; - spE0.z = bossA6->obj.pos.z; - func_effect_8007A6F0(&spE0, NA_SE_EN_ARM_SWING); + effectPos.x = D_i3_801BF394[0]; + effectPos.y = D_i3_801BF424[0]; + effectPos.z = this->obj.pos.z; + Effect_SpawnTimedSfxAtPos(&effectPos, NA_SE_EN_ARM_SWING); } - bossA6->swork[A6_SWK_18 + arg1] = 2; + this->swork[A6_SWK_18 + arg1] = 2; } break; case 2: D_i3_801C2250[A6_BSS_5] = 50; - Math_SmoothStepToF(&bossA6->fwork[A6_FWK_25 + arg1], 0.0f, 0.4f, 100.0f, 0.00001f); - Math_SmoothStepToF(&bossA6->fwork[A6_FWK_22 + arg1], - 420.0f - ((20.0f - ((bossA6->fwork[A6_FWK_3] * -1.0f) / 150.0f)) * 20.0f), 0.3f, 100.0f, + Math_SmoothStepToF(&this->fwork[A6_FWK_25 + arg1], 0.0f, 0.4f, 100.0f, 0.00001f); + Math_SmoothStepToF(&this->fwork[A6_FWK_22 + arg1], + 420.0f - ((20.0f - ((this->fwork[A6_FWK_3] * -1.0f) / 150.0f)) * 20.0f), 0.3f, 100.0f, 0.00001f); - if ((bossA6->swork[A6_SWK_12 + arg1] == 0) || (bossA6->swork[A6_SWK_3 + arg1] != 0)) { - bossA6->swork[A6_SWK_18 + arg1] = 0; + if ((this->swork[A6_SWK_12 + arg1] == 0) || (this->swork[A6_SWK_3 + arg1] != 0)) { + this->swork[A6_SWK_18 + arg1] = 0; for (i = 0; i < 12; i++) { if (arg1 == 0) { D_i3_801BEE90[i] = 0.0f; @@ -1664,15 +1657,15 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { Math_SmoothStepToF(&D_i3_801BF100[i].x, 0.0f, 0.5f, 50.0f, 0.001f); } - bossA6->timer_050 = 0; - bossA6->swork[A6_SWK_18] = bossA6->swork[A6_SWK_19] = bossA6->swork[A6_SWK_20] = 4; - bossA6->fwork[A6_FWK_13] = bossA6->fwork[A6_FWK_14] = bossA6->fwork[A6_FWK_15] = bossA6->fwork[A6_FWK_22] = - bossA6->fwork[A6_FWK_23] = bossA6->fwork[A6_FWK_24] = 0.0f; - bossA6->fwork[A6_FWK_10] = bossA6->fwork[A6_FWK_11] = bossA6->fwork[A6_FWK_12] = bossA6->fwork[A6_FWK_19] = - bossA6->fwork[A6_FWK_20] = bossA6->fwork[A6_FWK_21] = 0.0f; + this->timer_050 = 0; + this->swork[A6_SWK_18] = this->swork[A6_SWK_19] = this->swork[A6_SWK_20] = 4; + this->fwork[A6_FWK_13] = this->fwork[A6_FWK_14] = this->fwork[A6_FWK_15] = this->fwork[A6_FWK_22] = + this->fwork[A6_FWK_23] = this->fwork[A6_FWK_24] = 0.0f; + this->fwork[A6_FWK_10] = this->fwork[A6_FWK_11] = this->fwork[A6_FWK_12] = this->fwork[A6_FWK_19] = + this->fwork[A6_FWK_20] = this->fwork[A6_FWK_21] = 0.0f; - bossA6->fwork[A6_FWK_28] = 0.0f; - bossA6->fwork[A6_FWK_25] = bossA6->fwork[A6_FWK_26] = bossA6->fwork[A6_FWK_27] = -90.0f; + this->fwork[A6_FWK_28] = 0.0f; + this->fwork[A6_FWK_25] = this->fwork[A6_FWK_26] = this->fwork[A6_FWK_27] = -90.0f; for (i = 0; i < 12; i++) { D_i3_801BEE00[i].x = 0.0f; @@ -1699,7 +1692,7 @@ void Area6_8018A464(Boss* bossA6, s32 arg1) { } } -void Area6_8018B9BC(Boss* bossA6) { +void Area6_8018B9BC(BossA6* this) { s32 i; s32 j; Vec3f dest; @@ -1707,52 +1700,51 @@ void Area6_8018B9BC(Boss* bossA6) { if (D_i3_801C2250[A6_BSS_0] == 0) { for (i = 3, j = 15; j < 18; j++, i++) { - if (bossA6->swork[A6_SWK_0 + j] != 0) { + if (this->swork[A6_SWK_0 + j] != 0) { if ((gGroundClipMode != 0) && (gPlayerShots[15].timer > 0)) { - bossA6->swork[A6_SWK_0 + j] -= bossA6->damage; - } else if (i + 1 == bossA6->dmgPart) { - bossA6->swork[A6_SWK_0 + j] -= bossA6->damage; - if ((D_i3_801C2250[A6_BSS_25] == 0) && (bossA6->swork[A6_SWK_25] == 1) && (Rand_ZeroOne() < 0.4f)) { + this->swork[A6_SWK_0 + j] -= this->damage; + } else if (i + 1 == this->dmgPart) { + this->swork[A6_SWK_0 + j] -= this->damage; + if ((D_i3_801C2250[A6_BSS_25] == 0) && (this->swork[A6_SWK_25] == 1) && (Rand_ZeroOne() < 0.4f)) { D_i3_801C2250[A6_BSS_10]++; D_i3_801C2250[A6_BSS_10] &= 1; D_i3_801C2250[A6_BSS_25] = 20; } } - AUDIO_PLAY_SFX(NA_SE_EN_SPARK_DAMAGE_M, bossA6->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SPARK_DAMAGE_M, this->sfxSource, 4); - if (bossA6->swork[A6_SWK_0 + j] <= 0) { - bossA6->swork[A6_SWK_0 + j] = 0; + if (this->swork[A6_SWK_0 + j] <= 0) { + this->swork[A6_SWK_0 + j] = 0; - Matrix_MultVec3f(gCalcMatrix, &bossA6->vwork[A6_VWK_1 + i], &dest); - func_effect_8007D0E0(bossA6->obj.pos.x + dest.x, bossA6->obj.pos.y + dest.y, - bossA6->obj.pos.z + dest.z, 10.0f); + Matrix_MultVec3f(gCalcMatrix, &this->vwork[A6_VWK_1 + i], &dest); + func_effect_8007D0E0(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, + 10.0f); - sfxPos.x = bossA6->obj.pos.x + dest.x; - sfxPos.y = bossA6->obj.pos.y + dest.y; - sfxPos.z = bossA6->obj.pos.z + dest.z; + sfxPos.x = this->obj.pos.x + dest.x; + sfxPos.y = this->obj.pos.y + dest.y; + sfxPos.z = this->obj.pos.z + dest.z; - func_effect_8007A6F0(&sfxPos, NA_SE_EN_EXPLOSION_M); - func_effect_8007C120(bossA6->obj.pos.x, bossA6->obj.pos.y, bossA6->obj.pos.z + 150.0f, - bossA6->vel.x, bossA6->vel.y, bossA6->vel.z, 0.2f, 50); + Effect_SpawnTimedSfxAtPos(&sfxPos, NA_SE_EN_EXPLOSION_M); + func_effect_8007C120(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 150.0f, this->vel.x, + this->vel.y, this->vel.z, 0.2f, 50); } - if ((bossA6->swork[A6_SWK_15] == 0) && (bossA6->swork[A6_SWK_16] == 0) && - (bossA6->swork[A6_SWK_17] == 0)) { - Audio_KillSfxBySource(bossA6->sfxSource); + if ((this->swork[A6_SWK_15] == 0) && (this->swork[A6_SWK_16] == 0) && (this->swork[A6_SWK_17] == 0)) { + Audio_KillSfxBySource(this->sfxSource); - if (bossA6->swork[A6_SWK_25] != 0) { - bossA6->swork[A6_SWK_25]--; - if (bossA6->swork[A6_SWK_25] != 0) { - bossA6->health -= 60; + if (this->swork[A6_SWK_25] != 0) { + this->swork[A6_SWK_25]--; + if (this->swork[A6_SWK_25] != 0) { + this->health -= 60; } } - if (bossA6->swork[A6_SWK_25] != 0) { - bossA6->timer_058 = 50; + if (this->swork[A6_SWK_25] != 0) { + this->timer_058 = 50; } else { - bossA6->timer_054 = 30; - bossA6->fwork[A6_FWK_32] = 20.0f; + this->timer_054 = 30; + this->fwork[A6_FWK_32] = 20.0f; } } } @@ -1824,7 +1816,7 @@ void Area6_8018C0D0(f32* arg0, f32 arg1, Vec3f* arg2, f32 arg3, s32 arg4) { f32 spAC; f32 var_fs3 = 5.0f; - if (((gGameFrameCount % 2) == 0)) { + if ((gGameFrameCount % 2) == 0) { spAC = 0.0f; } else { spAC = 180.0f; @@ -1879,7 +1871,7 @@ void Area6_8018C0D0(f32* arg0, f32 arg1, Vec3f* arg2, f32 arg3, s32 arg4) { Matrix_Pop(&gGfxMatrix); } -void Area6_Boss_Draw(Boss* bossA6) { +void Area6_Boss_Draw(BossA6* this) { Vec3f jointTable[30]; Vec3f spC4; Vec3f spB8; @@ -1887,12 +1879,12 @@ void Area6_Boss_Draw(Boss* bossA6) { s32 i; s32 j; - if (bossA6->state == 0) { + if (this->state == 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_49); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) D_i3_801C22F0.unk_24); gDPSetEnvColor(gMasterDisp++, 255, 255, 0, 255); Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 10.0f, MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, bossA6->fwork[A6_FWK_33] * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, this->fwork[A6_FWK_33] * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_101C2E0); } else if (D_i3_801C22F0.unk_24 != 0.0f) { @@ -1903,7 +1895,7 @@ void Area6_Boss_Draw(Boss* bossA6) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) D_i3_801C22F0.unk_24); spAC.x = 0.0f; - if ((gSysFrameCount & 1) == 0) { + if (!(gSysFrameCount & 1)) { spAC.x = 1.0f; if (1) {} spAC.x = 0.0f; @@ -1913,14 +1905,14 @@ void Area6_Boss_Draw(Boss* bossA6) { Matrix_RotateZ(gCalcMatrix, gGameFrameCount * 6.0f * M_DTOR, MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, &spAC, &spB8); Matrix_Translate(gGfxMatrix, spB8.x, spB8.y, 0.0f, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, bossA6->scale, bossA6->scale, bossA6->scale, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->scale, this->scale, this->scale, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 10.0f * M_DTOR, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, bossA6->fwork[A6_FWK_34], bossA6->fwork[A6_FWK_35], 1.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->fwork[A6_FWK_34], this->fwork[A6_FWK_35], 1.0f, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, -(f32) gGameFrameCount * 10.0f * M_DTOR, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, bossA6->fwork[A6_FWK_34], bossA6->fwork[A6_FWK_35], 1.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->fwork[A6_FWK_34], this->fwork[A6_FWK_35], 1.0f, MTXF_APPLY); } else { RCP_SetupDL(&gMasterDisp, SETUPDL_27); - if (bossA6->timer_05C & 1) { + if (this->timer_05C & 1) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, (s32) D_i3_801C22F0.unk_28[0], (s32) D_i3_801C22F0.unk_28[2], @@ -1928,47 +1920,46 @@ void Area6_Boss_Draw(Boss* bossA6) { } } - jointTable[3].z -= bossA6->fwork[A6_FWK_0]; - jointTable[4].z -= bossA6->fwork[A6_FWK_0]; - jointTable[5].z -= bossA6->fwork[A6_FWK_0]; + jointTable[3].z -= this->fwork[A6_FWK_0]; + jointTable[4].z -= this->fwork[A6_FWK_0]; + jointTable[5].z -= this->fwork[A6_FWK_0]; - Animation_DrawSkeleton(1, D_A6_6018BA0, jointTable, NULL, NULL, &bossA6->index, &gIdentityMatrix); + Animation_DrawSkeleton(1, D_A6_6018BA0, jointTable, NULL, NULL, &this->index, &gIdentityMatrix); - if (bossA6->scale >= 1.0f) { + if (this->scale >= 1.0f) { for (i = 0; i < 3; i++) { - if ((bossA6->swork[A6_SWK_33 + i] == 0) && (bossA6->state != 3) && - (D_i3_801C2250[A6_BSS_2_0 + i] == 0) && ((gGameFrameCount % 4) == 0) && - (bossA6->swork[A6_SWK_27 + i] != 0) && (gPlayState != 100)) { - Matrix_RotateY(gCalcMatrix, bossA6->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, bossA6->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, bossA6->obj.rot.z * M_DTOR, MTXF_APPLY); + if ((this->swork[A6_SWK_33 + i] == 0) && (this->state != 3) && (D_i3_801C2250[A6_BSS_2_0 + i] == 0) && + ((gGameFrameCount % 4) == 0) && (this->swork[A6_SWK_27 + i] != 0) && (gPlayState != 100)) { + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); - Matrix_MultVec3f(gCalcMatrix, &bossA6->vwork[A6_VWK_1] + i, &spC4); + Matrix_MultVec3f(gCalcMatrix, &this->vwork[A6_VWK_1] + i, &spC4); - func_effect_8007D0E0(bossA6->obj.pos.x + spC4.x, bossA6->obj.pos.y + spC4.y, - bossA6->obj.pos.z + spC4.z, 20.0f); + func_effect_8007D0E0(this->obj.pos.x + spC4.x, this->obj.pos.y + spC4.y, this->obj.pos.z + spC4.z, + 20.0f); - spB8.x = bossA6->obj.pos.x + spC4.x; - spB8.y = bossA6->obj.pos.y + spC4.y; - spB8.z = bossA6->obj.pos.z + spC4.z; + spB8.x = this->obj.pos.x + spC4.x; + spB8.y = this->obj.pos.y + spC4.y; + spB8.z = this->obj.pos.z + spC4.z; - if ((!bossA6) && (!bossA6)) {} // fake + if ((!this) && (!this)) {} // fake if (D_i3_801C2250[A6_BSS_26] == 0) { - func_effect_8007A6F0(&spB8, NA_SE_EN_EXPLOSION_M); + Effect_SpawnTimedSfxAtPos(&spB8, NA_SE_EN_EXPLOSION_M); } D_i3_801C2250[A6_BSS_26]++; D_i3_801C2250[A6_BSS_26] &= 1; - bossA6->swork[A6_SWK_27 + i]--; + this->swork[A6_SWK_27 + i]--; - if (bossA6->swork[A6_SWK_27 + i] <= 0) { - bossA6->swork[A6_SWK_18 + i] = 4; - bossA6->swork[A6_SWK_38] = 1; - bossA6->fwork[A6_FWK_10 + i] = bossA6->fwork[A6_FWK_19 + i] = bossA6->fwork[A6_FWK_13 + i] = - bossA6->fwork[A6_FWK_22 + i] = 0.0f; - bossA6->fwork[A6_FWK_25 + i] = -90.0f; + if (this->swork[A6_SWK_27 + i] <= 0) { + this->swork[A6_SWK_18 + i] = 4; + this->swork[A6_SWK_38] = 1; + this->fwork[A6_FWK_10 + i] = this->fwork[A6_FWK_19 + i] = this->fwork[A6_FWK_13 + i] = + this->fwork[A6_FWK_22 + i] = 0.0f; + this->fwork[A6_FWK_25 + i] = -90.0f; for (j = 0; j < 12; j++) { if (i == 0) { @@ -1995,74 +1986,74 @@ void Area6_Boss_Draw(Boss* bossA6) { } } } - Area6_8018BCD4(D_i3_801BED70, 0.0f, bossA6->fwork[A6_FWK_25], &bossA6->vwork[A6_VWK_1], - bossA6->swork[A6_SWK_0] & 1, bossA6->fwork[A6_FWK_10] + bossA6->fwork[A6_FWK_19], - bossA6->swork[A6_SWK_27], bossA6->fwork[A6_FWK_0]); - Area6_8018BCD4(D_i3_801BEEF0, -120.0f, bossA6->fwork[A6_FWK_26], &bossA6->vwork[A6_VWK_2], - bossA6->swork[A6_SWK_1] & 1, bossA6->fwork[A6_FWK_11] + bossA6->fwork[A6_FWK_20], - bossA6->swork[A6_SWK_28], bossA6->fwork[A6_FWK_0]); - Area6_8018BCD4(D_i3_801BF070, 120.0f, bossA6->fwork[A6_FWK_27], &bossA6->vwork[A6_VWK_3], - bossA6->swork[A6_SWK_2] & 1, bossA6->fwork[A6_FWK_12] + bossA6->fwork[A6_FWK_21], - bossA6->swork[A6_SWK_29], bossA6->fwork[A6_FWK_0]); + Area6_8018BCD4(D_i3_801BED70, 0.0f, this->fwork[A6_FWK_25], &this->vwork[A6_VWK_1], + this->swork[A6_SWK_0] & 1, this->fwork[A6_FWK_10] + this->fwork[A6_FWK_19], + this->swork[A6_SWK_27], this->fwork[A6_FWK_0]); + Area6_8018BCD4(D_i3_801BEEF0, -120.0f, this->fwork[A6_FWK_26], &this->vwork[A6_VWK_2], + this->swork[A6_SWK_1] & 1, this->fwork[A6_FWK_11] + this->fwork[A6_FWK_20], + this->swork[A6_SWK_28], this->fwork[A6_FWK_0]); + Area6_8018BCD4(D_i3_801BF070, 120.0f, this->fwork[A6_FWK_27], &this->vwork[A6_VWK_3], + this->swork[A6_SWK_2] & 1, this->fwork[A6_FWK_12] + this->fwork[A6_FWK_21], + this->swork[A6_SWK_29], this->fwork[A6_FWK_0]); - if ((bossA6->swork[A6_SWK_15] != 0) && (bossA6->state >= 3) && (D_i3_801C22F0.unk_24 == 255.0f) && + if ((this->swork[A6_SWK_15] != 0) && (this->state >= 3) && (D_i3_801C22F0.unk_24 == 255.0f) && (D_i3_801C2250[A6_BSS_0] == 0)) { - Area6_8018C0D0(D_i3_801BF1F0, 0.0f, &bossA6->vwork[A6_VWK_4], bossA6->fwork[A6_FWK_0], 0); + Area6_8018C0D0(D_i3_801BF1F0, 0.0f, &this->vwork[A6_VWK_4], this->fwork[A6_FWK_0], 0); } - if ((bossA6->swork[A6_SWK_16] != 0) && (bossA6->state >= 3) && (D_i3_801C22F0.unk_24 == 255.0f) && + if ((this->swork[A6_SWK_16] != 0) && (this->state >= 3) && (D_i3_801C22F0.unk_24 == 255.0f) && (D_i3_801C2250[A6_BSS_0] == 0)) { - Area6_8018C0D0(D_i3_801BF220, -120.0f, &bossA6->vwork[A6_VWK_5], bossA6->fwork[A6_FWK_0], 1); + Area6_8018C0D0(D_i3_801BF220, -120.0f, &this->vwork[A6_VWK_5], this->fwork[A6_FWK_0], 1); } - if ((bossA6->swork[A6_SWK_17] != 0) && (bossA6->state >= 3) && (D_i3_801C22F0.unk_24 == 255.0f) && + if ((this->swork[A6_SWK_17] != 0) && (this->state >= 3) && (D_i3_801C22F0.unk_24 == 255.0f) && (D_i3_801C2250[A6_BSS_0] == 0)) { - Area6_8018C0D0(D_i3_801BF250, 120.0f, &bossA6->vwork[A6_VWK_6], bossA6->fwork[A6_FWK_0], 2); + Area6_8018C0D0(D_i3_801BF250, 120.0f, &this->vwork[A6_VWK_6], this->fwork[A6_FWK_0], 2); } - if (bossA6->swork[A6_SWK_25] != 0) { - j = bossA6->swork[A6_SWK_25] - 1; + if (this->swork[A6_SWK_25] != 0) { + j = this->swork[A6_SWK_25] - 1; - if ((bossA6->timer_058 != 0) && !(bossA6->timer_058 & 3)) { - AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, bossA6->sfxSource, 4); + if ((this->timer_058 != 0) && !(this->timer_058 & 3)) { + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, this->sfxSource, 4); } - if (bossA6->timer_058 == 1) { - if (bossA6->swork[A6_SWK_25] == 2) { + if (this->timer_058 == 1) { + if (this->swork[A6_SWK_25] == 2) { Radio_PlayMessage(gMsg_ID_7085, RCID_FALCO); - } else if (bossA6->swork[A6_SWK_25] == 1) { + } else if (this->swork[A6_SWK_25] == 1) { Radio_PlayMessage(gMsg_ID_7086, RCID_SLIPPY); } } - if (bossA6->swork[A6_SWK_22] != D_i3_801BF310[j]) { - if (bossA6->swork[A6_SWK_22] < D_i3_801BF310[j]) { - bossA6->swork[A6_SWK_22]++; + if (this->swork[A6_SWK_22] != D_i3_801BF310[j]) { + if (this->swork[A6_SWK_22] < D_i3_801BF310[j]) { + this->swork[A6_SWK_22]++; } else { - bossA6->swork[A6_SWK_22]--; + this->swork[A6_SWK_22]--; } } - if (bossA6->swork[A6_SWK_23] != D_i3_801BF31C[j]) { - if (bossA6->swork[A6_SWK_23] < D_i3_801BF31C[j]) { - bossA6->swork[A6_SWK_23]++; + if (this->swork[A6_SWK_23] != D_i3_801BF31C[j]) { + if (this->swork[A6_SWK_23] < D_i3_801BF31C[j]) { + this->swork[A6_SWK_23]++; } else { - bossA6->swork[A6_SWK_23]--; + this->swork[A6_SWK_23]--; } } - if (bossA6->swork[A6_SWK_24] != D_i3_801BF328[j]) { - if (bossA6->swork[A6_SWK_24] < D_i3_801BF328[j]) { - bossA6->swork[A6_SWK_24]++; + if (this->swork[A6_SWK_24] != D_i3_801BF328[j]) { + if (this->swork[A6_SWK_24] < D_i3_801BF328[j]) { + this->swork[A6_SWK_24]++; } else { - bossA6->swork[A6_SWK_24]--; + this->swork[A6_SWK_24]--; } } } else { - Math_SmoothStepToF(&bossA6->fwork[A6_FWK_29], 0.0f, 1.0f, 10.0f, 0.0001f); - if ((bossA6->timer_054 == 0) && (bossA6->swork[A6_SWK_36] == 4) && (D_i3_801C2250[A6_BSS_31] == 0)) { + Math_SmoothStepToF(&this->fwork[A6_FWK_29], 0.0f, 1.0f, 10.0f, 0.0001f); + if ((this->timer_054 == 0) && (this->swork[A6_SWK_36] == 4) && (D_i3_801C2250[A6_BSS_31] == 0)) { Radio_PlayMessage(gMsg_ID_7087, RCID_PEPPY); - bossA6->swork[A6_SWK_36] = 5; + this->swork[A6_SWK_36] = 5; D_i3_801C2250[A6_BSS_31]++; D_i3_801C2250[A6_BSS_31] &= 1; } @@ -2073,7 +2064,7 @@ void Area6_Boss_Draw(Boss* bossA6) { Matrix_Translate(gGfxMatrix, 0.0f, 2.0f, 70.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.7f, MTXF_APPLY); - if (bossA6->timer_05C & 1) { + if (this->timer_05C & 1) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) D_i3_801C22F0.unk_24); @@ -2086,11 +2077,11 @@ void Area6_Boss_Draw(Boss* bossA6) { Matrix_Pop(&gGfxMatrix); RCP_SetupDL(&gMasterDisp, SETUPDL_71); if (D_i3_801C22F0.unk_24 != 255.0f) { - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, bossA6->swork[A6_SWK_22], bossA6->swork[A6_SWK_23], - bossA6->swork[A6_SWK_24], (s32) D_i3_801C22F0.unk_28[-1]); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, this->swork[A6_SWK_22], this->swork[A6_SWK_23], + this->swork[A6_SWK_24], (s32) D_i3_801C22F0.unk_28[-1]); } else { - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, bossA6->swork[A6_SWK_22], bossA6->swork[A6_SWK_23], - bossA6->swork[A6_SWK_24], (s32) bossA6->fwork[A6_FWK_29]); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, this->swork[A6_SWK_22], this->swork[A6_SWK_23], + this->swork[A6_SWK_24], (s32) this->fwork[A6_FWK_29]); } Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 74.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -2128,19 +2119,19 @@ void Area6_8018D3CC(s32 arg0, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, } } -void Area6_8018D4E0(Actor* actor) { +void Area6_8018D4E0(Actor* this) { s32 i; - func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, 4.0f, 20); - func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 7.0f); - func_effect_8007B344(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 6.0f, 5); + func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 4.0f, 20); + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 7.0f); + func_effect_8007B344(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 6.0f, 5); - Object_Kill(&actor->obj, actor->sfxSource); + Object_Kill(&this->obj, this->sfxSource); for (i = 0; i < 15; i++) { - func_effect_800794CC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 1.0f); + func_effect_800794CC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1.0f); } - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_M); } void Area6_8018D5C8(void) { @@ -2148,9 +2139,11 @@ void Area6_8018D5C8(void) { Actor_Initialize(&gActors[i]); gActors[i].obj.status = OBJ_INIT; + gActors[i].obj.pos.x = 1600.0f; gActors[i].obj.pos.y = 3750.0f; gActors[i].obj.pos.z = 13000.0f; + gActors[i].animFrame = 1; gActors[i].state = 90; gActors[i].fwork[0] = 0.0f; @@ -2159,31 +2152,33 @@ void Area6_8018D5C8(void) { AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, gActors[i].sfxSource, 0); } -void Area6_8018D694(Actor* actor, s32 arg1) { +void Area6_8018D694(ActorCutscene* this, s32 index) { Vec3f sp2C[5] = { { -150.0f, 0.0f, 200.0f }, { 0.0f, 50.0f, 0.0f }, { 150.0f, -50.0f, 100.0f }, { -350.0f, 100.0f, 300.0f }, { 100.0f, -300.0f, 100.0f }, }; - Actor_Initialize(actor); - actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.pos.x = sp2C[arg1].x + 100.0f; - actor->obj.pos.y = sp2C[arg1].y + 350.0f; - actor->obj.pos.z = sp2C[arg1].z + 1000.0f; - actor->state = 1; - actor->animFrame = 28; - actor->iwork[11] = 1; - actor->rot_0F4.y = 90.0f; - actor->fwork[0] = 1.5f; - actor->fwork[7] = RAND_FLOAT_SEEDED(360.0f); - actor->fwork[8] = RAND_FLOAT_SEEDED(360.0f); - actor->fwork[9] = RAND_FLOAT_SEEDED(360.0f); - Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(NA_SE_EN_ENGINE_01, actor->sfxSource, 4); + Actor_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_ACTOR_CUTSCENE; + + this->obj.pos.x = sp2C[index].x + 100.0f; + this->obj.pos.y = sp2C[index].y + 350.0f; + this->obj.pos.z = sp2C[index].z + 1000.0f; + + this->state = 1; + this->animFrame = 28; + this->iwork[11] = 1; + this->rot_0F4.y = 90.0f; + this->fwork[0] = 1.5f; + this->fwork[7] = RAND_FLOAT_SEEDED(360.0f); + this->fwork[8] = RAND_FLOAT_SEEDED(360.0f); + this->fwork[9] = RAND_FLOAT_SEEDED(360.0f); + Object_SetInfo(&this->info, this->obj.id); + AUDIO_PLAY_SFX(NA_SE_EN_ENGINE_01, this->sfxSource, 4); } -void Area6_8018D804(Actor* actor, s32 arg1) { +void Area6_8018D804(ActorCutscene* this, s32 arg1) { Vec3f sp2C[3] = { { -200.0f, 0.0f, -500.0f }, { 200.0f, 30.0f, -600.0f }, @@ -2191,17 +2186,19 @@ void Area6_8018D804(Actor* actor, s32 arg1) { }; Player* player = &gPlayer[0]; - Actor_Initialize(actor); - actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.pos.x = sp2C[arg1].x + player->pos.x; - actor->obj.pos.y = sp2C[arg1].y + player->pos.y; - actor->obj.pos.z = sp2C[arg1].z + player->pos.z; - actor->state = 5; - actor->iwork[11] = 1; - actor->fwork[0] = 0.0f; - Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); + Actor_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_ACTOR_CUTSCENE; + + this->obj.pos.x = sp2C[arg1].x + player->pos.x; + this->obj.pos.y = sp2C[arg1].y + player->pos.y; + this->obj.pos.z = sp2C[arg1].z + player->pos.z; + + this->state = 5; + this->iwork[11] = 1; + this->fwork[0] = 0.0f; + Object_SetInfo(&this->info, this->obj.id); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); } void Area6_8018D920(Vec3f* pos) { @@ -2224,7 +2221,7 @@ void Area6_8018D920(Vec3f* pos) { Area6_8018D3CC(CS_SHOT_ID, pos->x, pos->y, pos->z, vel.x, vel.y, vel.z, xRot, yRot, 0.0f); } -void Area6_8018DA58(Actor* actor) { +void Area6_8018DA58(ActorCutscene* this) { Vec3f sp5C; Vec3f sp50; f32 sp4C; @@ -2234,41 +2231,41 @@ void Area6_8018DA58(Actor* actor) { f32 sp3C; f32 sp38; - switch (actor->state) { + switch (this->state) { case 1: - actor->fwork[7] += 2.5f; - actor->rot_0F4.z = SIN_DEG(actor->fwork[7]) * 10.0f; - actor->fwork[8] += 1.0f; - actor->obj.pos.y += SIN_DEG(actor->fwork[8]) * 1.5f; - actor->fwork[9] += 1.0f; - actor->obj.pos.z += COS_DEG(actor->fwork[9]) * 1.5f; + this->fwork[7] += 2.5f; + this->rot_0F4.z = SIN_DEG(this->fwork[7]) * 10.0f; + this->fwork[8] += 1.0f; + this->obj.pos.y += SIN_DEG(this->fwork[8]) * 1.5f; + this->fwork[9] += 1.0f; + this->obj.pos.z += COS_DEG(this->fwork[9]) * 1.5f; break; case 2: - Math_SmoothStepToF(&actor->rot_0F4.z, -180.0f, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToF(&this->rot_0F4.z, -180.0f, 0.1f, 3.0f, 0.0f); break; case 3: - Math_SmoothStepToF(&actor->rot_0F4.z, -45.0f, 0.05f, 2.0f, 0.0f); - Math_SmoothStepToAngle(&actor->rot_0F4.y, 340.0f, 0.05f, 2.4f, 0.0f); - Math_SmoothStepToF(&actor->rot_0F4.x, 3.0f, 0.05f, 1.0f, 0.0f); - Math_SmoothStepToF(&actor->fwork[0], 30.0f, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToF(&this->rot_0F4.z, -45.0f, 0.05f, 2.0f, 0.0f); + Math_SmoothStepToAngle(&this->rot_0F4.y, 340.0f, 0.05f, 2.4f, 0.0f); + Math_SmoothStepToF(&this->rot_0F4.x, 3.0f, 0.05f, 1.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[0], 30.0f, 0.1f, 3.0f, 0.0f); break; case 6: case 11: case 16: - actor->state++; - AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); - actor->fwork[29] = 5.0f; + this->state++; + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, this->sfxSource, 0); + this->fwork[29] = 5.0f; /* fallthrough */ case 7: case 12: case 17: - actor->iwork[11] = 2; - Math_SmoothStepToF(&actor->fwork[0], 50.0f, 0.1f, 3.0f, 0.01f); + this->iwork[11] = 2; + Math_SmoothStepToF(&this->fwork[0], 50.0f, 0.1f, 3.0f, 0.01f); - switch (actor->state) { + switch (this->state) { case 7: sp48 = -100.0f; sp4C = 100.0f; @@ -2296,36 +2293,36 @@ void Area6_8018DA58(Actor* actor) { sp40 = 0.0f; } - sp38 = Math_SmoothStepToAngle(&actor->rot_0F4.y, sp3C, 0.5f, 2.0f, 0.0001f) * 30.0f; - Math_SmoothStepToAngle(&actor->rot_0F4.x, sp40, 0.5f, 2.0f, 0.0001f); - Math_SmoothStepToAngle(&actor->rot_0F4.z, sp38, 0.1f, 5.0f, 0.0001f); + sp38 = Math_SmoothStepToAngle(&this->rot_0F4.y, sp3C, 0.5f, 2.0f, 0.0001f) * 30.0f; + Math_SmoothStepToAngle(&this->rot_0F4.x, sp40, 0.5f, 2.0f, 0.0001f); + Math_SmoothStepToAngle(&this->rot_0F4.z, sp38, 0.1f, 5.0f, 0.0001f); break; case 91: - Math_SmoothStepToF(&actor->obj.pos.y, 0.0f, 0.1f, 5.0f, 0.1f); - Math_SmoothStepToF(&actor->obj.pos.z, 0.0f, 1.0f, 20.0f, 20.0f); + Math_SmoothStepToF(&this->obj.pos.y, 0.0f, 0.1f, 5.0f, 0.1f); + Math_SmoothStepToF(&this->obj.pos.z, 0.0f, 1.0f, 20.0f, 20.0f); break; case 90: break; } - Matrix_RotateY(gCalcMatrix, (actor->rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(actor->rot_0F4.x * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (this->rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(this->rot_0F4.x * M_DTOR), MTXF_APPLY); sp5C.x = 0.0f; sp5C.y = 0.0f; - sp5C.z = actor->fwork[0]; + sp5C.z = this->fwork[0]; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp5C, &sp50); - actor->vel.x = sp50.x; - actor->vel.y = sp50.y; - actor->vel.z = sp50.z; + this->vel.x = sp50.x; + this->vel.y = sp50.y; + this->vel.z = sp50.z; - actor->obj.rot.x = -actor->rot_0F4.x; - actor->obj.rot.y = actor->rot_0F4.y + 180.0f; - actor->obj.rot.z = -actor->rot_0F4.z; + this->obj.rot.x = -this->rot_0F4.x; + this->obj.rot.y = this->rot_0F4.y + 180.0f; + this->obj.rot.z = -this->rot_0F4.z; } void Area6_LevelStart(Player* player) { @@ -2569,46 +2566,46 @@ void Area6_LevelStart(Player* player) { Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[1], 50000.0f, 0.001f); } -void Area6_8018EA88(Actor* actor) { - Actor_Initialize(actor); - actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.pos.x = 0.0f; - actor->obj.pos.y = 0.0f; - actor->obj.pos.z = gBosses[0].obj.pos.z + 500.0f; - actor->animFrame = 37; - actor->state = 100; - actor->iwork[0] = 255; - actor->iwork[1] = 255; - actor->iwork[2] = 255; - actor->iwork[3] = 240; - actor->iwork[4] = 0; - actor->iwork[5] = 0; - actor->iwork[6] = 255; - actor->iwork[7] = 100; - actor->fwork[4] = 1.0f; - actor->scale = 1.0f; - Object_SetInfo(&actor->info, actor->obj.id); +void Area6_8018EA88(ActorCutscene* this) { + Actor_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_ACTOR_CUTSCENE; + this->obj.pos.x = 0.0f; + this->obj.pos.y = 0.0f; + this->obj.pos.z = gBosses[0].obj.pos.z + 500.0f; + this->animFrame = 37; + this->state = 100; + this->iwork[0] = 255; + this->iwork[1] = 255; + this->iwork[2] = 255; + this->iwork[3] = 240; + this->iwork[4] = 0; + this->iwork[5] = 0; + this->iwork[6] = 255; + this->iwork[7] = 100; + this->fwork[4] = 1.0f; + this->scale = 1.0f; + Object_SetInfo(&this->info, this->obj.id); } -void Area6_8018EB3C(Actor* actor) { +void Area6_8018EB3C(ActorCutscene* this) { Player* player = &gPlayer[0]; - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.pos.x = player->pos.x; - actor->obj.pos.y = player->pos.y + 600.0f; - actor->obj.pos.z = player->pos.z + 2800.0f; - actor->animFrame = 1; - actor->state = 100; - actor->fwork[0] = 0.0f; - Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); - AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, actor->sfxSource, 0); + Actor_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_ACTOR_CUTSCENE; + this->obj.pos.x = player->pos.x; + this->obj.pos.y = player->pos.y + 600.0f; + this->obj.pos.z = player->pos.z + 2800.0f; + this->animFrame = 1; + this->state = 100; + this->fwork[0] = 0.0f; + Object_SetInfo(&this->info, this->obj.id); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, this->sfxSource, 0); } -void Area6_8018EC38(Actor* actor, s32 arg1) { +void Area6_8018EC38(ActorCutscene* this, s32 arg1) { Vec3f sp2C[3] = { { -150.0f, 40.0f, 75.0f }, { 150.0f, 40.0f, 150.0f }, @@ -2617,25 +2614,25 @@ void Area6_8018EC38(Actor* actor, s32 arg1) { Player* player = &gPlayer[0]; if (gTeamShields[arg1 + 1] > 0) { - Actor_Initialize(actor); - actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_CUTSCENE; + Actor_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.pos.x = sp2C[arg1].x + player->pos.x; - actor->obj.pos.y = sp2C[arg1].y + player->pos.y; - actor->obj.pos.z = sp2C[arg1].z + player->pos.z; + this->obj.pos.x = sp2C[arg1].x + player->pos.x; + this->obj.pos.y = sp2C[arg1].y + player->pos.y; + this->obj.pos.z = sp2C[arg1].z + player->pos.z; - actor->state = 100; + this->state = 100; - actor->iwork[11] = 1; - actor->fwork[0] = 0.0f; + this->iwork[11] = 1; + this->fwork[0] = 0.0f; if (arg1 + 1 != 3) { - actor->iwork[14] = arg1 + 2; + this->iwork[14] = arg1 + 2; } - Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); + Object_SetInfo(&this->info, this->obj.id); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); } } diff --git a/src/overlays/ovl_i3/fox_aq.c b/src/overlays/ovl_i3/fox_aq.c index 0a883288..ccb70c55 100644 --- a/src/overlays/ovl_i3/fox_aq.c +++ b/src/overlays/ovl_i3/fox_aq.c @@ -12,7 +12,7 @@ const char D_i3_801C1A30[] = "プレイヤーのすべてをクリア \n"; // Clear of all players const char D_i3_801C1A50[] = "i %d\n"; -typedef enum { +typedef enum BossAQLimbs { /* 0 */ AQ_LIMB_0, /* 1 */ AQ_LIMB_1, /* 2 */ AQ_LIMB_2, @@ -44,7 +44,7 @@ typedef enum { /* 28 */ AQ_LIMB_MAX, } BossAQLimbs; -typedef enum { +typedef enum BossAQswork { /* 0 */ AQ_SWK_0, /* 1 */ AQ_SWK_1, /* 2 */ AQ_SWK_2, @@ -88,7 +88,7 @@ typedef enum { /* 40 */ AQ_SWK_MAX, } BossAQswork; -typedef enum { +typedef enum BossAQfwork { /* 0 */ AQ_FWK_0, /* 1 */ AQ_FWK_1, /* 2 */ AQ_FWK_2, @@ -142,7 +142,7 @@ typedef enum { /* 50 */ AQ_FWK_MAX, } BossAQfwork; -typedef enum { +typedef enum BossAQvwork { /* 0 */ AQ_VWK_0, /* 1 */ AQ_VWK_1, /* 2 */ AQ_VWK_2, @@ -1382,7 +1382,7 @@ void Aquas_801AC8A8(f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 unk4E) { } // OBJ_EFFECT_366 action -void Aquas_801AC918(Effect* effect) { +void Aquas_Effect366_Update(Effect* effect) { f32 temp_fs0; if (effect->unk_46 != 0) { @@ -1627,7 +1627,7 @@ void Aquas_801AD688(Actor* actor) { } // OBJ_ACTOR_255 action -void Aquas_801AD6C0(Actor* actor) { +void Aquas_Actor255_Update(Actor* actor) { s32 var_v0 = actor->iwork[2] - 1; f32 sp80; f32 sp7C; @@ -1825,7 +1825,7 @@ void Aquas_801ADF7C(f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 zRot, } // OBJ_ACTOR_255 draw -void Aquas_801AE168(Actor* actor) { +void Aquas_Actor255_Draw(Actor* actor) { s32 i; f32 xz; f32 yRot; @@ -1875,7 +1875,7 @@ void Aquas_801AE3AC(Actor* actor) { } // OBJ_ACTOR_256 action -void Aquas_801AE3D8(Actor* actor) { +void Aquas_Actor256_Update(Actor* actor) { s32 i; switch (actor->state) { @@ -2027,7 +2027,7 @@ void Aquas_801AE3D8(Actor* actor) { } // OBJ_ACTOR_256 draw -void Aquas_801AEB44(Actor* actor) { +void Aquas_Actor256_Draw(Actor* actor) { f32 var_fv0; u8 var_t1; u8 i; @@ -2156,7 +2156,7 @@ void Aquas_801AF9FC(Actor* actor) { } // OBJ_ACTOR_257 action -void Aquas_801AFA5C(Actor* actor) { +void Aquas_Actor257_Update(Actor* actor) { s32 i; f32 sp70; f32 sp6C; @@ -2402,7 +2402,7 @@ void Aquas_801AFA5C(Actor* actor) { } // OBJ_ACTOR_257 draw -void Aquas_801B099C(Actor* actor) { +void Aquas_Actor257_Draw(Actor* actor) { Matrix_RotateY(gGfxMatrix, (actor->obj.rot.x + actor->fwork[3]) * M_DTOR, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, (actor->obj.rot.y + actor->fwork[4]) * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, (actor->obj.rot.z + actor->fwork[5]) * M_DTOR, MTXF_APPLY); @@ -2430,7 +2430,7 @@ void Aquas_801B099C(Actor* actor) { } // OBJ_ACTOR_258 action -void Aquas_801B0B60(Actor* actor) { +void Aquas_Actor258_Update(Actor* actor) { Vec3f sp44; Vec3f sp38; @@ -2492,7 +2492,7 @@ void Aquas_801B0B60(Actor* actor) { Object_Kill(&actor->obj, actor->sfxSource); func_effect_800815DC(); func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 50.0f, 5.0f); - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_SEA_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_SEA_EXPLOSION_S); break; } @@ -2504,7 +2504,7 @@ void Aquas_801B0B60(Actor* actor) { } // OBJ_ACTOR_258 draw -void Aquas_801B0EC0(Actor* actor) { +void Aquas_Actor258_Draw(Actor* actor) { if (actor->timer_0BC == 0) { Graphics_SetScaleMtx(0.8f); RCP_SetupDL(&gMasterDisp, SETUPDL_61); @@ -2973,7 +2973,7 @@ void Aquas_Boss_Update(Boss* bossAQ) { spD4.x = D_i3_801C4308[73]; spD4.y = D_i3_801C4308[74]; spD4.z = D_i3_801C4308[75]; // 74? - func_effect_8007A6F0(&spD4, NA_SE_EN_WT_DISAPPEAR_L); + Effect_SpawnTimedSfxAtPos(&spD4, NA_SE_EN_WT_DISAPPEAR_L); bossAQ->swork[AQ_SWK_10] = 250.0f + RAND_FLOAT(50.0f); } } @@ -2992,7 +2992,7 @@ void Aquas_Boss_Update(Boss* bossAQ) { spD4.x = D_i3_801C4308[76]; spD4.y = D_i3_801C4308[77]; // 76? spD4.z = D_i3_801C4308[78]; - func_effect_8007A6F0(&spD4, NA_SE_EN_WT_DISAPPEAR_L); + Effect_SpawnTimedSfxAtPos(&spD4, NA_SE_EN_WT_DISAPPEAR_L); bossAQ->swork[AQ_SWK_11] = 250.0f + RAND_FLOAT(50.0f); } } @@ -3225,7 +3225,7 @@ void Aquas_Boss_Update(Boss* bossAQ) { spD4.x = D_i3_801C4308[73 + 3 * i7]; spD4.y = D_i3_801C4308[74 + 3 * i7]; spD4.z = D_i3_801C4308[75 + 3 * i7]; - func_effect_8007A6F0(&spD4, NA_SE_EN_P_BALL_SHOT); + Effect_SpawnTimedSfxAtPos(&spD4, NA_SE_EN_P_BALL_SHOT); i2 = 0; for (i3 = 0; i2 <= i && i3 < ARRAY_COUNT(gActors); i3++) { if ((gActors[i3].obj.status == OBJ_FREE) && (i3 < ARRAY_COUNT(gActors))) { @@ -3357,7 +3357,7 @@ void Aquas_Boss_Update(Boss* bossAQ) { spD4.x = D_i3_801C4308[73 + 3 * i3]; spD4.y = D_i3_801C4308[74 + 3 * i3]; spD4.z = D_i3_801C4308[75 + 3 * i3]; - func_effect_8007A6F0(&spD4, NA_SE_EN_P_GUN_APPEAR); + Effect_SpawnTimedSfxAtPos(&spD4, NA_SE_EN_P_GUN_APPEAR); } if ((fabsf(D_i3_801C4308[10]) <= 3.0f) || (bossAQ->swork[AQ_SWK_10 + i3] == 0)) { Math_SmoothStepToF(&D_i3_801C4308[52 + i3], 1.0f, 0.1f, 0.5f, 0.0f); @@ -3753,7 +3753,7 @@ void Aquas_801B4E94(s32 limbIndex, Vec3f* rot, void* thisx) { } // OBJ_ACTOR_261 draw -void Aquas_801B504C(Actor* actor) { +void Aquas_Actor261_Draw(Actor* actor) { Vec3f jointTable[30]; Matrix_Scale(gCalcMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY); @@ -3767,7 +3767,7 @@ s32 D_i3_801C0264[19] = { }; // OBJ_ACTOR_261 action -void Aquas_801B50E8(Actor* actor) { +void Aquas_Actor261_Update(Actor* actor) { s32 i; Vec3f sp88; Vec3f sp7C; @@ -3781,7 +3781,7 @@ void Aquas_801B50E8(Actor* actor) { } actor->health = 0; actor->state = 7; - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_AQ_ZAKO_DOWN); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_AQ_ZAKO_DOWN); } switch (actor->state) { @@ -4050,7 +4050,7 @@ f32 D_i3_801C02C8[2] = { 255.0f, 68.0f }; s32 D_i3_801C02D0[2] = { 70, 100 }; // OBJ_ACTOR_259 draw -void Aquas_801B619C(Actor* actor) { +void Aquas_Actor259_Draw(Actor* actor) { Vec3f sp40[30]; Matrix_Push(&gCalcMatrix); @@ -4079,7 +4079,7 @@ void Aquas_801B6344(Actor* actor) { } // OBJ_ACTOR_259 action -void Aquas_801B638C(Actor* actor) { +void Aquas_Actor259_Update(Actor* actor) { Actor* var_v0; s32 i; f32 spB4; @@ -4119,7 +4119,7 @@ void Aquas_801B638C(Actor* actor) { Actor_Despawn(actor); Object_Kill(&actor->obj, actor->sfxSource); AUDIO_PLAY_SFX(NA_SE_OB_MINI_BOMB, actor->sfxSource, 4); - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_AQ_ZAKO_DOWN); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_AQ_ZAKO_DOWN); } actor->fwork[5] = (actor->obj.pos.y * 0.01f) + 2.5f; @@ -4285,7 +4285,7 @@ void Aquas_801B6E54(Actor* actor) { } // OBJ_ACTOR_262 action -void Aquas_801B6FF8(Actor* actor) { +void Aquas_Actor262_Update(Actor* actor) { s32 i; f32 temp_dx; f32 temp_dy; @@ -4305,7 +4305,7 @@ void Aquas_801B6FF8(Actor* actor) { func_effect_8007D0E0(actor->vwork[i].x, actor->vwork[i].y, actor->vwork[i].z + 100.0f, 6.0f); } Object_Kill(&actor->obj, actor->sfxSource); - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_AQ_ZAKO_DOWN); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_AQ_ZAKO_DOWN); } switch (actor->state) { @@ -4506,7 +4506,7 @@ void Aquas_801B7754(s32 limbIndex, Vec3f* rot, void* thisx) { } // OBJ_ACTOR_262 draw -void Aquas_801B7A24(Actor* actor) { +void Aquas_Actor262_Draw(Actor* actor) { Vec3f sp30[30]; RCP_SetupDL(&gMasterDisp, SETUPDL_57); @@ -4544,7 +4544,7 @@ void Aquas_801B7AF0(Actor* actor) { } // OBJ_ACTOR_260 action -void Aquas_801B7C78(Actor* actor) { +void Aquas_Actor260_Update(Actor* actor) { s32 i; s32 j; f32 spAC; @@ -4584,7 +4584,7 @@ void Aquas_801B7C78(Actor* actor) { actor->itemDrop = DROP_SILVER_RING_25p; Actor_Despawn(actor); Object_Kill(&actor->obj, actor->sfxSource); - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_AQ_ZAKO_DOWN); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_AQ_ZAKO_DOWN); } if (actor->state != 6) { @@ -4951,7 +4951,7 @@ void Aquas_801B8D7C(s32 limbIndex, Vec3f* rot, void* thisx) { } // OBJ_ACTOR_260 draw -void Aquas_801B90DC(Actor* actor) { +void Aquas_Actor260_Draw(Actor* actor) { Vec3f sp30[30]; if ((actor->state >= 3) && (actor->state < 5)) { @@ -4965,7 +4965,7 @@ void Aquas_801B90DC(Actor* actor) { } // OBJ_ACTOR_263 action -void Aquas_801B91A4(Actor* actor) { +void Aquas_Actor263_Update(Actor* actor) { Vec3f spDC = { 0.0f, 0.0f, 50.0f }; Vec3f spD0; Vec3f spC4; @@ -5000,7 +5000,7 @@ void Aquas_801B91A4(Actor* actor) { func_effect_800815DC(); func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 5.0f); - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_AQ_ZAKO_DOWN); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_AQ_ZAKO_DOWN); } switch (actor->state) { @@ -5085,7 +5085,7 @@ void Aquas_801B91A4(Actor* actor) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &spC4, &spAC); - func_effect_8007F04C(OBJ_EFFECT_353, actor->vwork[26].x + RAND_FLOAT_CENTERED(200.0f), + func_effect_8007F04C(OBJ_EFFECT_ENEMY_LASER_1, actor->vwork[26].x + RAND_FLOAT_CENTERED(200.0f), actor->vwork[26].y + RAND_FLOAT_CENTERED(200.0f), actor->vwork[26].z, spf98, sp94, 0.0f, 0.0f, 0.0f, 0.0f, spAC.x, spAC.y, spAC.z, 1.0f); } @@ -5121,9 +5121,10 @@ void Aquas_801B91A4(Actor* actor) { actor->vwork[11].y + RAND_FLOAT_CENTERED(50.0f), actor->vwork[11].z + RAND_FLOAT_CENTERED(100.0f), 2.0f, 0); Matrix_MultVec3fNoTranslate(gCalcMatrix, &spDC, &spD0); - func_effect_8007F04C(OBJ_EFFECT_353, actor->vwork[26].x + spD0.x, actor->vwork[26].y + spD0.y, - actor->vwork[26].z + spD0.z, actor->vwork[27].x, actor->fwork[2], - actor->vwork[27].z, 0.0f, 0.0f, 0.0f, spD0.x, spD0.y, spD0.z, 1.0f); + func_effect_8007F04C(OBJ_EFFECT_ENEMY_LASER_1, actor->vwork[26].x + spD0.x, + actor->vwork[26].y + spD0.y, actor->vwork[26].z + spD0.z, actor->vwork[27].x, + actor->fwork[2], actor->vwork[27].z, 0.0f, 0.0f, 0.0f, spD0.x, spD0.y, spD0.z, + 1.0f); } } break; @@ -5231,7 +5232,7 @@ void Aquas_801B9DB0(s32 limbIndex, Vec3f* rot, void* thisx) { } // OBJ_ACTOR_263 draw -void Aquas_801BA108(Actor* actor) { +void Aquas_Actor263_Draw(Actor* actor) { Vec3f sp40[30]; RCP_SetupDL(&gMasterDisp, SETUPDL_29); @@ -5254,7 +5255,7 @@ void Aquas_801BA108(Actor* actor) { } // OBJ_ACTOR_264 action -void Aquas_801BA26C(Actor* actor) { +void Aquas_Actor264_Update(Actor* actor) { Vec3f sp40[30]; u16 sp3E; @@ -5298,7 +5299,7 @@ void Aquas_801BA26C(Actor* actor) { } // OBJ_ACTOR_264 draw -void Aquas_801BA4E4(Actor* actor) { +void Aquas_Actor264_Draw(Actor* actor) { gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); Animation_DrawSkeleton(1, D_AQ_6020C6C, actor->vwork, NULL, NULL, &actor->index, &gIdentityMatrix); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); @@ -5321,7 +5322,7 @@ void Aquas_801BA57C(Actor* actor) { } // OBJ_ACTOR_265 action -void Aquas_801BA6A4(Actor* actor) { +void Aquas_Actor265_Update(Actor* actor) { s32 i; s32 var_s2; Actor* actor265; @@ -5418,20 +5419,20 @@ void Aquas_801BA6A4(Actor* actor) { func_effect_8007BC7C(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 130.0f, actor->scale * 30.0f); func_effect_8007BC7C(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 130.0f, actor->scale * 30.0f); Object_Kill(&actor->obj, actor->sfxSource); - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); } } } // OBJ_ACTOR_265 draw -void Aquas_801BAD7C(Actor* actor) { +void Aquas_Actor265_Draw(Actor* actor) { Matrix_Scale(gGfxMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_AQ_6014FD0); } // OBJ_ACTOR_266 action -void Aquas_801BADF8(Actor* actor) { +void Aquas_Actor266_Update(Actor* actor) { s32 i; switch (actor->state) { @@ -5501,7 +5502,7 @@ void Aquas_801BB0C4(s32 limbIndex, Vec3f* rot, void* thisx) { } // OBJ_ACTOR_266 draw -void Aquas_801BB204(Actor* actor) { +void Aquas_Actor266_Draw(Actor* actor) { Vec3f sp28[30]; Animation_GetFrameData(&D_AQ_601EC68, 0, sp28); @@ -5636,7 +5637,7 @@ void Aquas_801BB26C(Actor* actor) { } // OBJ_ACTOR_267 action -void Aquas_801BB79C(Actor* actor) { +void Aquas_Actor267_Update(Actor* actor) { s32 i; s32 it0; s32 it1; @@ -5729,7 +5730,7 @@ void Aquas_801BB79C(Actor* actor) { } if (((gGameFrameCount % 8) == 0)) { - func_effect_8007A6F0(&sp70->obj.pos, NA_SE_EN_WT_SPARK_BEAM); + Effect_SpawnTimedSfxAtPos(&sp70->obj.pos, NA_SE_EN_WT_SPARK_BEAM); } Aquas_801A92EC(actor, sp70->obj.pos.x, sp70->obj.pos.y, sp70->obj.pos.z, actor->iwork[13], i); @@ -5763,7 +5764,7 @@ void Aquas_801BB79C(Actor* actor) { } } if (((gGameFrameCount % 4) == 0)) { - func_effect_8007A6F0(&sp6C->obj.pos, NA_SE_EN_WT_SPARK_BEAM); + Effect_SpawnTimedSfxAtPos(&sp6C->obj.pos, NA_SE_EN_WT_SPARK_BEAM); } Aquas_801A92EC(actor, sp6C->obj.pos.x, sp6C->obj.pos.y, sp6C->obj.pos.z, actor->iwork[13] + 1, i); @@ -5799,7 +5800,7 @@ void Aquas_801BB79C(Actor* actor) { } if (((gGameFrameCount % 16) == 0)) { - func_effect_8007A6F0(&sp70->obj.pos, NA_SE_EN_WT_SPARK_BEAM); + Effect_SpawnTimedSfxAtPos(&sp70->obj.pos, NA_SE_EN_WT_SPARK_BEAM); } Aquas_801A92EC(actor, sp70->obj.pos.x, sp70->obj.pos.y, sp70->obj.pos.z, actor->iwork[13] + 2, i); @@ -6010,7 +6011,7 @@ void Aquas_801BC91C(s32 limbIndex, Vec3f* rot, void* thisx) { } // OBJ_ACTOR_267 draw -void Aquas_801BC930(Actor* actor) { +void Aquas_Actor267_Draw(Actor* actor) { Vec3f sp28[30]; Animation_GetFrameData(&D_AQ_6023780, actor->animFrame, sp28); @@ -6023,7 +6024,7 @@ s32 D_i3_801C04C4[9] = { }; // OBJ_ACTOR_269 action -void Aquas_801BC9A0(Actor* actor) { +void Aquas_Actor269_Update(Actor* actor) { s32 j; s32 i; Vec3f spA4; @@ -6148,7 +6149,7 @@ void Aquas_801BC9A0(Actor* actor) { actor->itemDrop = D_i3_801C04C4[actor->iwork[1]]; Actor_Despawn(actor); Object_Kill(&actor->obj, actor->sfxSource); - func_effect_8007A6F0(&actor->obj.pos, NA_SE_OB_AQ_PILLAR_BROKE); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_OB_AQ_PILLAR_BROKE); } break; @@ -6164,7 +6165,7 @@ void Aquas_801BC9A0(Actor* actor) { if ((actor->obj.pos.y < (gGroundHeight + 30.0f)) && (actor->iwork[2] == 0)) { actor->iwork[2] = 1; actor->vel.x = actor->vel.y = actor->vel.z = actor->gravity = 0.0f; - func_effect_8007A6F0(&actor->obj.pos, NA_SE_OB_AQ_ROCK_BOUND); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_OB_AQ_ROCK_BOUND); for (j = 0; j < 6; j++) { func_effect_8007B8F8(actor->obj.pos.x + RAND_FLOAT_CENTERED(100.0f), actor->obj.pos.y + RAND_RANGE(-9.0f, 21.0f), @@ -6200,7 +6201,7 @@ void Aquas_801BD17C(s32 limbIndex, Vec3f* rot, void* thisx) { } // OBJ_ACTOR_269 draw -void Aquas_801BD264(Actor* actor) { +void Aquas_Actor269_Draw(Actor* actor) { Vec3f sp40[30]; if (actor->state != 0) { @@ -6259,7 +6260,7 @@ void Aquas_801BD3B0(Actor* actor, f32 x, f32 y, f32 z) { f32 D_i3_801C04F4[4] = { 700.0f, 300.0f, 600.0f, 400.0f }; // OBJ_ACTOR_268 action -void Aquas_801BD54C(Actor* actor) { +void Aquas_Actor268_Update(Actor* actor) { s32 sp6C; s32 sp68; s32 sp64; @@ -6438,7 +6439,7 @@ bool Aquas_801BDDFC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th } // OBJ_ACTOR_268 draw -void Aquas_801BDE6C(Actor* actor) { +void Aquas_Actor268_Draw(Actor* actor) { Animation_GetFrameData(&D_AQ_60135E0, actor->animFrame, actor->vwork); if (actor->iwork[3] == 0) { Animation_DrawSkeleton(1, D_AQ_60136CC, actor->vwork, Aquas_801BDDFC, NULL, actor, &gIdentityMatrix); @@ -6531,7 +6532,7 @@ void Aquas_801BE0F0(Actor* actor) { } // OBJ_SCENERY_126 draw -void Aquas_801BE1FC(Scenery* scenery) { +void Aquas_Scenery126_Draw(Scenery* scenery) { Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_AQ_600EEF0); @@ -6564,7 +6565,7 @@ void Aquas_801BE274(Actor* actor, f32 yRot, f32 xRot) { } // OBJ_ACTOR_270 action -void Aquas_801BE3F8(Actor* actor) { +void Aquas_Actor270_Update(Actor* actor) { s32 i; f32 sp68; f32 sp64; @@ -6666,7 +6667,7 @@ void Aquas_801BE3F8(Actor* actor) { } // OBJ_ACTOR_270 draw -void Aquas_801BEB1C(Actor* actor) { +void Aquas_Actor270_Draw(Actor* actor) { Graphics_SetScaleMtx(3.0f); RCP_SetupDL(&gMasterDisp, SETUPDL_56); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 143, 143, 255); @@ -6691,11 +6692,11 @@ void Aquas_Boss301_Draw(Boss* boss301) { } // OBJ_ACTOR_188 action -void Aquas_801BEC68(Actor* actor) { +void Aquas_Actor188_Update(Actor* actor) { } // OBJ_ACTOR_188 draw -void Aquas_801BEC74(Actor* actor) { +void Aquas_Actor188_Draw(Actor* actor) { } void Aquas_Update360(Player* player) { diff --git a/src/overlays/ovl_i3/fox_so.c b/src/overlays/ovl_i3/fox_so.c index 6cdd7512..2b9f8a5b 100644 --- a/src/overlays/ovl_i3/fox_so.c +++ b/src/overlays/ovl_i3/fox_so.c @@ -8,7 +8,7 @@ #include "assets/ast_bg_planet.h" #include "assets/ast_solar.h" -typedef void (*BossSOfunc)(Boss*); +typedef void (*BossSOfunc)(BossSO*); typedef enum { /* 0 */ SO_SWK_0, @@ -162,36 +162,38 @@ typedef enum { /* 50 */ SO_VWK_MAX, } BossSOvwork; -void Solar_801A239C(Boss* bossSO); -void Solar_801A2C3C(Boss* bossSO); -void Solar_801A3468(Boss* bossSO); -void Solar_801A48B8(Boss* bossSO); -void Solar_801A4EC0(Boss* bossSO); +void Solar_801A239C(BossSO* this); +void Solar_801A2C3C(BossSO* this); +void Solar_801A3468(BossSO* this); +void Solar_801A48B8(BossSO* this); +void Solar_801A4EC0(BossSO* this); void Solar_801A8DB8(Vec3f* pos, u32 sfxId, f32 zVel); s32 D_i3_801C2740[10]; f32 D_i3_801C2768[14]; s32 D_i3_801C27A0[8]; // unused? part of previous? -void Solar_8019E7F0(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { - Effect_Initialize(effect); - effect->obj.status = OBJ_ACTIVE; - effect->obj.id = OBJ_EFFECT_392; - effect->state = 3; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; - effect->obj.rot.z = 180.0f; +void Solar_8019E7F0(Effect392* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { + Effect_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_EFFECT_392; + this->state = 3; + + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + + this->obj.rot.z = 180.0f; if (Rand_ZeroOne() < 0.5f) { - effect->obj.rot.y = 180.0f; + this->obj.rot.y = 180.0f; } - effect->unk_44 = 112; - effect->scale2 = scale2; - effect->vel.y = 5.0f; - Object_SetInfo(&effect->info, effect->obj.id); - effect->info.unk_14 = 0; + this->unk_44 = 112; + this->scale2 = scale2; + this->vel.y = 5.0f; + Object_SetInfo(&this->info, this->obj.id); + this->info.unk_14 = 0; } void Solar_8019E8B8(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { @@ -205,25 +207,27 @@ void Solar_8019E8B8(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { } } -void Solar_8019E920(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, s32 state) { - Effect_Initialize(effect); - effect->obj.status = OBJ_ACTIVE; - effect->obj.id = OBJ_EFFECT_392; - effect->state = state; +void Solar_8019E920(Effect392* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, + s32 state) { + Effect_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_EFFECT_392; + + this->state = state; if (state == 2) { - effect->timer_50 = 30; - effect->unk_4C = 3; + this->timer_50 = 30; + this->unk_4C = 3; } - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; - effect->vel.x = xVel; - effect->vel.y = yVel; - effect->vel.z = zVel; - effect->obj.rot.z = RAND_FLOAT(360.0f); - effect->unk_44 = 176; - effect->scale2 = scale2; - Object_SetInfo(&effect->info, effect->obj.id); + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + this->vel.x = xVel; + this->vel.y = yVel; + this->vel.z = zVel; + this->obj.rot.z = RAND_FLOAT(360.0f); + this->unk_44 = 176; + this->scale2 = scale2; + Object_SetInfo(&this->info, this->obj.id); } void Solar_8019E9F4(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, s32 unk4E) { @@ -237,106 +241,106 @@ void Solar_8019E9F4(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, } } -void Solar_8019EA7C(Actor* actor) { +void Solar_Actor278_Update(Actor278* this) { f32 sp34; s32 sp30; - if (actor->state == 0) { - actor->vel.z = 20.0f - gPathVelZ; - actor->fwork[0] = 12.0f; + if (this->state == 0) { + this->vel.z = 20.0f - gPathVelZ; + this->fwork[0] = 12.0f; } else { - actor->vel.z = actor->fwork[1] - gPathVelZ; - if (actor->state == 2) { - Math_SmoothStepToF(&actor->obj.pos.x, gPlayer[0].pos.x, 1.0f, 100.0f, 10.0f); + this->vel.z = this->fwork[1] - gPathVelZ; + if (this->state == 2) { + Math_SmoothStepToF(&this->obj.pos.x, gPlayer[0].pos.x, 1.0f, 100.0f, 10.0f); } else { - actor->fwork[0] = 14.0f; + this->fwork[0] = 14.0f; } } - if ((actor->unk_046 == 0) || (actor->unk_046 == 1)) { - actor->unk_046 = 3; - Object_SetSfxSourceToPos(actor->sfxSource, &actor->obj.pos); - AUDIO_PLAY_SFX(NA_SE_OB_MAGMA_WAVE, actor->sfxSource, 0); + if ((this->unk_046 == 0) || (this->unk_046 == 1)) { + this->unk_046 = 3; + Object_SetSfxSourceToPos(this->sfxSource, &this->obj.pos); + AUDIO_PLAY_SFX(NA_SE_OB_MAGMA_WAVE, this->sfxSource, 0); } - if (Play_CheckDynaFloorCollision(&sp34, &sp30, actor->obj.pos.x, -100.0f, actor->obj.pos.z)) { - D_ctx_801782EC[sp30] = actor->fwork[0]; - D_ctx_801782EC[sp30 + 1] = actor->fwork[0] * 0.95f; - D_ctx_801782EC[sp30 - 1] = actor->fwork[0] * 0.95f; - D_ctx_801782EC[sp30 + 2] = actor->fwork[0] * 0.9f; - D_ctx_801782EC[sp30 - 2] = actor->fwork[0] * 0.9f; - D_ctx_801782EC[sp30 + 3] = actor->fwork[0] * 0.8f; - D_ctx_801782EC[sp30 - 3] = actor->fwork[0] * 0.8f; + if (Play_CheckDynaFloorCollision(&sp34, &sp30, this->obj.pos.x, -100.0f, this->obj.pos.z)) { + D_ctx_801782EC[sp30] = this->fwork[0]; + D_ctx_801782EC[sp30 + 1] = this->fwork[0] * 0.95f; + D_ctx_801782EC[sp30 - 1] = this->fwork[0] * 0.95f; + D_ctx_801782EC[sp30 + 2] = this->fwork[0] * 0.9f; + D_ctx_801782EC[sp30 - 2] = this->fwork[0] * 0.9f; + D_ctx_801782EC[sp30 + 3] = this->fwork[0] * 0.8f; + D_ctx_801782EC[sp30 - 3] = this->fwork[0] * 0.8f; - if (actor->state != 2) { - D_ctx_801782EC[sp30 + 4] = actor->fwork[0] * 0.65f; - D_ctx_801782EC[sp30 - 4] = actor->fwork[0] * 0.65f; - D_ctx_801782EC[sp30 + 5] = actor->fwork[0] * 0.45f; - D_ctx_801782EC[sp30 - 5] = actor->fwork[0] * 0.45f; - D_ctx_801782EC[sp30 + 6] = actor->fwork[0] * 0.2f; - D_ctx_801782EC[sp30 - 6] = actor->fwork[0] * 0.2f; - D_ctx_801782EC[sp30 + 7] = actor->fwork[0] * 0.1f; - D_ctx_801782EC[sp30 - 7] = actor->fwork[0] * 0.1f; + if (this->state != 2) { + D_ctx_801782EC[sp30 + 4] = this->fwork[0] * 0.65f; + D_ctx_801782EC[sp30 - 4] = this->fwork[0] * 0.65f; + D_ctx_801782EC[sp30 + 5] = this->fwork[0] * 0.45f; + D_ctx_801782EC[sp30 - 5] = this->fwork[0] * 0.45f; + D_ctx_801782EC[sp30 + 6] = this->fwork[0] * 0.2f; + D_ctx_801782EC[sp30 - 6] = this->fwork[0] * 0.2f; + D_ctx_801782EC[sp30 + 7] = this->fwork[0] * 0.1f; + D_ctx_801782EC[sp30 - 7] = this->fwork[0] * 0.1f; } else { - D_ctx_801782EC[sp30 + 4] = actor->fwork[0] * 0.75f; - D_ctx_801782EC[sp30 - 4] = actor->fwork[0] * 0.75f; - D_ctx_801782EC[sp30 + 5] = actor->fwork[0] * 0.7f; - D_ctx_801782EC[sp30 - 5] = actor->fwork[0] * 0.7f; - D_ctx_801782EC[sp30 + 6] = actor->fwork[0] * 0.65f; - D_ctx_801782EC[sp30 - 6] = actor->fwork[0] * 0.65f; - D_ctx_801782EC[sp30 + 7] = actor->fwork[0] * 0.6f; - D_ctx_801782EC[sp30 - 7] = actor->fwork[0] * 0.6f; - D_ctx_801782EC[sp30 + 8] = actor->fwork[0] * 0.55f; - D_ctx_801782EC[sp30 - 8] = actor->fwork[0] * 0.55f; - D_ctx_801782EC[sp30 + 9] = actor->fwork[0] * 0.4f; - D_ctx_801782EC[sp30 - 9] = actor->fwork[0] * 0.4f; - D_ctx_801782EC[sp30 + 10] = actor->fwork[0] * 0.3f; - D_ctx_801782EC[sp30 - 10] = actor->fwork[0] * 0.3f; - D_ctx_801782EC[sp30 + 11] = actor->fwork[0] * 0.2f; - D_ctx_801782EC[sp30 - 11] = actor->fwork[0] * 0.2f; - D_ctx_801782EC[sp30 + 12] = actor->fwork[0] * 0.1f; - D_ctx_801782EC[sp30 - 12] = actor->fwork[0] * 0.1f; + D_ctx_801782EC[sp30 + 4] = this->fwork[0] * 0.75f; + D_ctx_801782EC[sp30 - 4] = this->fwork[0] * 0.75f; + D_ctx_801782EC[sp30 + 5] = this->fwork[0] * 0.7f; + D_ctx_801782EC[sp30 - 5] = this->fwork[0] * 0.7f; + D_ctx_801782EC[sp30 + 6] = this->fwork[0] * 0.65f; + D_ctx_801782EC[sp30 - 6] = this->fwork[0] * 0.65f; + D_ctx_801782EC[sp30 + 7] = this->fwork[0] * 0.6f; + D_ctx_801782EC[sp30 - 7] = this->fwork[0] * 0.6f; + D_ctx_801782EC[sp30 + 8] = this->fwork[0] * 0.55f; + D_ctx_801782EC[sp30 - 8] = this->fwork[0] * 0.55f; + D_ctx_801782EC[sp30 + 9] = this->fwork[0] * 0.4f; + D_ctx_801782EC[sp30 - 9] = this->fwork[0] * 0.4f; + D_ctx_801782EC[sp30 + 10] = this->fwork[0] * 0.3f; + D_ctx_801782EC[sp30 - 10] = this->fwork[0] * 0.3f; + D_ctx_801782EC[sp30 + 11] = this->fwork[0] * 0.2f; + D_ctx_801782EC[sp30 - 11] = this->fwork[0] * 0.2f; + D_ctx_801782EC[sp30 + 12] = this->fwork[0] * 0.1f; + D_ctx_801782EC[sp30 - 12] = this->fwork[0] * 0.1f; } } - switch (actor->dmgType) { + switch (this->dmgType) { case 3: - Solar_801A8DB8(&actor->obj.pos, NA_SE_OB_MAGMA_WAVE, actor->vel.z); + Solar_801A8DB8(&this->obj.pos, NA_SE_OB_MAGMA_WAVE, this->vel.z); /* fallthrough */ case 2: - Object_Kill(&actor->obj, actor->sfxSource); + Object_Kill(&this->obj, this->sfxSource); break; } } -void Solar_8019EF30(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel) { - Actor_Initialize(actor); - actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_275; +void Solar_8019EF30(Actor* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel) { + Actor_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_ACTOR_275; if (Rand_ZeroOne() < 0.1f) { - actor->obj.id = OBJ_ACTOR_276; + this->obj.id = OBJ_ACTOR_276; } - actor->obj.pos.x = xPos; - actor->obj.pos.y = yPos; - actor->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - actor->rot_0F4.x = RAND_FLOAT(360.0f); + this->rot_0F4.x = RAND_FLOAT(360.0f); - actor->vel.x = xVel; - actor->vel.y = yVel; - actor->vel.z = zVel; + this->vel.x = xVel; + this->vel.y = yVel; + this->vel.z = zVel; - actor->state = 2; - actor->timer_0C2 = 8; + this->state = 2; + this->timer_0C2 = 8; - Object_SetInfo(&actor->info, actor->obj.id); + Object_SetInfo(&this->info, this->obj.id); if (gBossActive) { - actor->info.bonus = 0; + this->info.bonus = 0; } - AUDIO_PLAY_SFX(NA_SE_OB_SOROCK_APPEAR, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_SOROCK_APPEAR, this->sfxSource, 0); } void Solar_8019F038(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel) { @@ -350,26 +354,27 @@ void Solar_8019F038(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel) } } -void Solar_8019F0B0(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel) { - Actor_Initialize(actor); - actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_277; - actor->obj.pos.x = xPos; - actor->obj.pos.y = yPos; - actor->obj.pos.z = zPos; - actor->rot_0F4.x = RAND_FLOAT(360.0f); - actor->vel.x = xVel; - actor->vel.y = yVel; - actor->vel.z = zVel; - actor->state = 2; - actor->timer_0C2 = 8; +void Solar_8019F0B0(Actor277* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel) { + Actor_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_ACTOR_277; - Object_SetInfo(&actor->info, actor->obj.id); + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + this->rot_0F4.x = RAND_FLOAT(360.0f); + this->vel.x = xVel; + this->vel.y = yVel; + this->vel.z = zVel; + this->state = 2; + this->timer_0C2 = 8; + + Object_SetInfo(&this->info, this->obj.id); if (gBossActive) { - actor->info.bonus = 0; + this->info.bonus = 0; } - AUDIO_PLAY_SFX(NA_SE_OB_SOROCK_APPEAR, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_SOROCK_APPEAR, this->sfxSource, 0); } void Solar_8019F194(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel) { @@ -403,116 +408,119 @@ Vec3f D_i3_801BF95C[3] = { { 180.0f, 0.0f, 240.0f }, }; -void Solar_8019F20C(Actor* actor) { +// Actors OBJ_ACTOR_275 to OBJ_ACTOR_277 +void Solar_Doodad_Update(Actor* this) { f32 sp8C = 0.0f; s32 sp88; s32 i; - if (actor->obj.id == OBJ_ACTOR_277) { - actor->scale = 2.0f; + if (this->obj.id == OBJ_ACTOR_277) { + this->scale = 2.0f; } - if (actor->obj.id == OBJ_ACTOR_276) { - actor->rot_0F4.x -= 6.6f; - actor->rot_0F4.y -= 4.0f; - + if (this->obj.id == OBJ_ACTOR_276) { + this->rot_0F4.x -= 6.6f; + this->rot_0F4.y -= 4.0f; } else { - actor->rot_0F4.x += 3.3f; - actor->rot_0F4.y += 2.0f; + this->rot_0F4.x += 3.3f; + this->rot_0F4.y += 2.0f; } - switch (actor->state) { + switch (this->state) { case 0: - actor->fwork[0] = actor->obj.pos.y * 0.05f; - actor->obj.pos.y = -100.0f; + this->fwork[0] = this->obj.pos.y * 0.05f; + this->obj.pos.y = -100.0f; /* fallthrough */ case 1: - actor->state = 2; - actor->vel.y = actor->fwork[0]; - Play_CheckDynaFloorCollision(&sp8C, &sp88, actor->obj.pos.x, actor->obj.pos.y - 100.0f, actor->obj.pos.z); - actor->obj.pos.y = sp8C; + this->state = 2; + this->vel.y = this->fwork[0]; + Play_CheckDynaFloorCollision(&sp8C, &sp88, this->obj.pos.x, this->obj.pos.y - 100.0f, this->obj.pos.z); + this->obj.pos.y = sp8C; for (i = 0; i < 4; i++) { - Solar_8019E9F4(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, D_i3_801BF8E0[i], - RAND_FLOAT(10.0f) + 10.0f, 0.0f, actor->scale * 5.0f, 1); + Solar_8019E9F4(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, D_i3_801BF8E0[i], + RAND_FLOAT(10.0f) + 10.0f, 0.0f, this->scale * 5.0f, 1); } - actor->timer_0C2 = 5; - AUDIO_PLAY_SFX(NA_SE_OB_SOROCK_APPEAR, actor->sfxSource, 0); + this->timer_0C2 = 5; + AUDIO_PLAY_SFX(NA_SE_OB_SOROCK_APPEAR, this->sfxSource, 0); break; case 2: - actor->gravity = 0.5f; - if (Play_CheckDynaFloorCollision(&sp8C, &sp88, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z)) { - Object_Kill(&actor->obj, actor->sfxSource); - func_effect_8007A6F0(&actor->obj.pos, NA_SE_OB_SOROCK_DISAPPEAR); + this->gravity = 0.5f; + + if (Play_CheckDynaFloorCollision(&sp8C, &sp88, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z)) { + Object_Kill(&this->obj, this->sfxSource); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_OB_SOROCK_DISAPPEAR); for (i = 0; i < 4; i++) { - Solar_8019E9F4(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, D_i3_801BF8E0[i], - RAND_FLOAT(10.0f) + 10.0f, 0.0f, actor->scale * 5.0f, 1); + Solar_8019E9F4(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, D_i3_801BF8E0[i], + RAND_FLOAT(10.0f) + 10.0f, 0.0f, this->scale * 5.0f, 1); } } - if (actor->timer_0BC == 0) { - actor->timer_0BC = 5; - Solar_8019E9F4(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, - actor->scale * 6.5f, 2); + if (this->timer_0BC == 0) { + this->timer_0BC = 5; + Solar_8019E9F4(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0.0f, 0.0f, 0.0f, this->scale * 6.5f, + 2); } - if ((actor->dmgType != DMG_NONE) || ((actor->obj.id == OBJ_ACTOR_277) && (actor->vel.y < 0.0f))) { - func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, actor->scale * 4.0f); - Object_Kill(&actor->obj, actor->sfxSource); - if (actor->obj.id == OBJ_ACTOR_277) { + if ((this->dmgType != DMG_NONE) || ((this->obj.id == OBJ_ACTOR_277) && (this->vel.y < 0.0f))) { + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->scale * 4.0f); + Object_Kill(&this->obj, this->sfxSource); + + if (this->obj.id == OBJ_ACTOR_277) { for (i = 0; i < 4; i++) { - Solar_8019F038(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, + Solar_8019F038(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, D_i3_801BF8F0[i].x + RAND_FLOAT_CENTERED(3.0f), D_i3_801BF8F0[i].y + RAND_FLOAT_CENTERED(3.0f), RAND_FLOAT(-10.0f) - 10.0f); } - } else if (actor->obj.id == OBJ_ACTOR_275) { - actor->itemDrop = DROP_SILVER_RING; - } else if (actor->obj.id == OBJ_ACTOR_276) { + } else if (this->obj.id == OBJ_ACTOR_275) { + this->itemDrop = DROP_SILVER_RING; + } else if (this->obj.id == OBJ_ACTOR_276) { if (gGoldRingCount[0] != 4) { - actor->itemDrop = DROP_GOLD_RING_1; + this->itemDrop = DROP_GOLD_RING_1; } else { - actor->itemDrop = DROP_SILVER_STAR; + this->itemDrop = DROP_SILVER_STAR; } } - Actor_Despawn(actor); + Actor_Despawn(this); for (i = 0; i < 3; i++) { - func_effect_800794CC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 0.3f); + func_effect_800794CC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0.3f); } for (i = 0; i < 7; i++) { - Solar_8019E9F4(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, RAND_FLOAT_CENTERED(30.0f), - RAND_FLOAT_CENTERED(30.0f), 0.0f, (RAND_FLOAT(2.0f) + 2.0f) * actor->scale, 1); + Solar_8019E9F4(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, RAND_FLOAT_CENTERED(30.0f), + RAND_FLOAT_CENTERED(30.0f), 0.0f, (RAND_FLOAT(2.0f) + 2.0f) * this->scale, 1); } - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); } break; } - actor->obj.rot.y = RAD_TO_DEG(-gPlayer[0].camYaw); - actor->obj.rot.x = RAD_TO_DEG(gPlayer[0].camPitch); + this->obj.rot.y = RAD_TO_DEG(-gPlayer[0].camYaw); + this->obj.rot.x = RAD_TO_DEG(gPlayer[0].camPitch); - if (((gGameFrameCount % 2) == 0)) { - actor->animFrame++; - if (actor->animFrame >= 3) { - actor->animFrame = 0; + if ((gGameFrameCount % 2) == 0) { + this->animFrame++; + if (this->animFrame >= 3) { + this->animFrame = 0; } } } -void Solar_8019F7AC(Actor* actor) { - if (actor->state != 0) { +// Actors OBJ_ACTOR_275 to OBJ_ACTOR_277 +void Solar_Doodad_Draw(Actor* this) { + if (this->state != 0) { Matrix_Push(&gGfxMatrix); - Matrix_RotateY(gGfxMatrix, actor->rot_0F4.y * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, actor->rot_0F4.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, this->rot_0F4.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, this->rot_0F4.x * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - switch (actor->obj.id) { + switch (this->obj.id) { case OBJ_ACTOR_275: gSPDisplayList(gMasterDisp++, D_SO_6017370); break; case OBJ_ACTOR_276: - if (((gGameFrameCount % 2) == 0)) { + if ((gGameFrameCount % 2) == 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_41); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255); } @@ -525,36 +533,37 @@ void Solar_8019F7AC(Actor* actor) { } Matrix_Pop(&gGfxMatrix); - Graphics_SetScaleMtx(actor->scale * 3.5f); + Graphics_SetScaleMtx(this->scale * 3.5f); RCP_SetupDL(&gMasterDisp, SETUPDL_64); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 128, 128, 160); - gSPDisplayList(gMasterDisp++, D_i3_801BF92C[actor->animFrame]); + gSPDisplayList(gMasterDisp++, D_i3_801BF92C[this->animFrame]); } } -void Solar_8019F99C(Actor* actor, Effect* effect, f32 scale1) { +void Solar_8019F99C(Actor279* this, Effect392* effect, f32 scale1) { Effect_Initialize(effect); effect->obj.status = OBJ_ACTIVE; effect->obj.id = OBJ_EFFECT_392; - effect->obj.pos.x = effect->vel.x = actor->obj.pos.x; + + effect->obj.pos.x = effect->vel.x = this->obj.pos.x; effect->obj.pos.y = -2000.0f; - effect->vel.y = actor->obj.pos.y; - effect->obj.pos.z = effect->vel.z = actor->obj.pos.z; + effect->vel.y = this->obj.pos.y; + effect->obj.pos.z = effect->vel.z = this->obj.pos.z; effect->scale1 = scale1; - effect->unk_60.y = actor->obj.rot.y; + effect->unk_60.y = this->obj.rot.y; effect->obj.rot.z = RAND_FLOAT(360.0f); - effect->unk_44 = 255 - (actor->counter_04E * 8); + effect->unk_44 = 255 - (this->counter_04E * 8); if (effect->unk_44 < 0) { effect->unk_44 = 0; } - effect->scale2 = 20.0f - (actor->counter_04E * 0.5f); + effect->scale2 = 20.0f - (this->counter_04E * 0.5f); effect->unk_48 = 1; Object_SetInfo(&effect->info, effect->obj.id); } -void Solar_8019FAA4(Boss* bossSO, Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yVel, f32 hVelMod) { +void Solar_8019FAA4(BossSO* this, Effect392* effect, f32 xPos, f32 yPos, f32 zPos, f32 yVel, f32 hVelMod) { Vec3f sp44; Vec3f sp38; Vec3f sp2C = D_i3_801BF920; @@ -583,19 +592,19 @@ void Solar_8019FAA4(Boss* bossSO, Effect* effect, f32 xPos, f32 yPos, f32 zPos, effect->vel.x = sp38.x * hVelMod; effect->vel.z = gPlayer[0].vel.z + (sp38.z * hVelMod); } else { - Matrix_RotateZ(gCalcMatrix, bossSO->obj.rot.z * M_DTOR, MTXF_NEW); + Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, gBosses[0].obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, gBosses[0].rot_078.y * M_DTOR, MTXF_APPLY); - sp44.x = effect->obj.pos.x - bossSO->obj.pos.x; - sp44.y = effect->obj.pos.y - bossSO->obj.pos.y; - sp44.z = effect->obj.pos.z - bossSO->obj.pos.z; + sp44.x = effect->obj.pos.x - this->obj.pos.x; + sp44.y = effect->obj.pos.y - this->obj.pos.y; + sp44.z = effect->obj.pos.z - this->obj.pos.z; Matrix_MultVec3f(gCalcMatrix, &sp44, &sp38); - effect->obj.pos.x = bossSO->obj.pos.x + sp38.x; - effect->obj.pos.y = bossSO->obj.pos.y + sp38.y; - effect->obj.pos.z = bossSO->obj.pos.z + sp38.z; + effect->obj.pos.x = this->obj.pos.x + sp38.x; + effect->obj.pos.y = this->obj.pos.y + sp38.y; + effect->obj.pos.z = this->obj.pos.z + sp38.z; effect->vel.z = gPlayer[0].vel.z; effect->vel.y = yVel; @@ -611,7 +620,7 @@ void Solar_8019FAA4(Boss* bossSO, Effect* effect, f32 xPos, f32 yPos, f32 zPos, effect->vel.x = RAND_FLOAT_CENTERED(30.0f); effect->vel.z = RAND_FLOAT_CENTERED(30.0f); } - effect->unk_60.y = bossSO->obj.rot.y; + effect->unk_60.y = this->obj.rot.y; effect->unk_60.x = 90.0f; effect->obj.rot.z = RAND_FLOAT(360.0f); effect->unk_44 = 255; @@ -621,7 +630,7 @@ void Solar_8019FAA4(Boss* bossSO, Effect* effect, f32 xPos, f32 yPos, f32 zPos, Object_SetInfo(&effect->info, effect->obj.id); } -void Solar_8019FDE0(Boss* bossSO, Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 state) { +void Solar_8019FDE0(BossSO* this, Effect392* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 state) { Effect_Initialize(effect); effect->obj.status = OBJ_ACTIVE; effect->obj.id = OBJ_EFFECT_392; @@ -636,7 +645,7 @@ void Solar_8019FDE0(Boss* bossSO, Effect* effect, f32 xPos, f32 yPos, f32 zPos, effect->vel.z = gPlayer[0].vel.z + 15.0f; } effect->scale2 = scale2; - effect->unk_60.y = bossSO->obj.rot.y; + effect->unk_60.y = this->obj.rot.y; effect->unk_60.x = 0.0f; effect->obj.rot.z = RAND_FLOAT(360.0f); effect->unk_44 = 255; @@ -646,65 +655,65 @@ void Solar_8019FDE0(Boss* bossSO, Effect* effect, f32 xPos, f32 yPos, f32 zPos, effect->info.damage = 40; } -void Solar_8019FEE8(Actor* actor, f32 scale1) { +void Solar_8019FEE8(Actor279* this, f32 scale1) { s32 i; for (i = 70; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { - Solar_8019F99C(actor, &gEffects[i], scale1); + Solar_8019F99C(this, &gEffects[i], scale1); break; } } } -void Solar_8019FF44(Boss* bossSO, f32 xPos, f32 yPos, f32 zPos, f32 yVel, f32 hVelMod) { +void Solar_8019FF44(BossSO* this, f32 xPos, f32 yPos, f32 zPos, f32 yVel, f32 hVelMod) { s32 i; for (i = 70; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { - Solar_8019FAA4(bossSO, &gEffects[i], xPos, yPos, zPos, yVel, hVelMod); + Solar_8019FAA4(this, &gEffects[i], xPos, yPos, zPos, yVel, hVelMod); break; } } } -void Solar_8019FFC0(Boss* bossSO, f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 unk4E) { +void Solar_8019FFC0(BossSO* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 unk4E) { s32 i; for (i = 70; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { - Solar_8019FDE0(bossSO, &gEffects[i], xPos, yPos, zPos, scale2, unk4E); + Solar_8019FDE0(this, &gEffects[i], xPos, yPos, zPos, scale2, unk4E); break; } } } -void Solar_801A003C(Actor* actor) { - switch (actor->state) { +void Solar_Actor279_Update(Actor279* this) { + switch (this->state) { case 0: - if (actor->timer_0BE == 0) { - actor->state = 1; - actor->timer_0BE = 50; - } else if (actor->timer_0BC == 0) { - actor->timer_0BC = 2; - Solar_8019FEE8(actor, 1000.0f); - actor->counter_04E++; + if (this->timer_0BE == 0) { + this->state = 1; + this->timer_0BE = 50; + } else if (this->timer_0BC == 0) { + this->timer_0BC = 2; + Solar_8019FEE8(this, 1000.0f); + this->counter_04E++; } break; case 1: - if (actor->timer_0BE == 0) { - actor->state = 0; - actor->timer_0BE = 50; - actor->counter_04E = 0; - Object_SetSfxSourceToPos(actor->sfxSource, &actor->obj.pos); - AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, actor->sfxSource, 4); + if (this->timer_0BE == 0) { + this->state = 0; + this->timer_0BE = 50; + this->counter_04E = 0; + Object_SetSfxSourceToPos(this->sfxSource, &this->obj.pos); + AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, this->sfxSource, 4); } break; } } -void Solar_801A0120(Effect* effect) { +void Solar_Effect392_Update(Effect392* this) { f32 sp5C; f32 sp58; f32 sp54; @@ -713,165 +722,165 @@ void Solar_801A0120(Effect* effect) { s32 sp48; Vec3f sp3C; - switch (effect->state) { + switch (this->state) { case 0: - Matrix_Translate(gCalcMatrix, effect->vel.x, effect->vel.y, effect->vel.z, MTXF_NEW); - Matrix_RotateY(gCalcMatrix, effect->unk_60.y * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gCalcMatrix, effect->unk_60.x * M_DTOR, MTXF_APPLY); + Matrix_Translate(gCalcMatrix, this->vel.x, this->vel.y, this->vel.z, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, this->unk_60.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, this->unk_60.x * M_DTOR, MTXF_APPLY); sp3C.x = 0.0f; sp3C.y = 0.0f; - sp3C.z = -effect->scale1; + sp3C.z = -this->scale1; - Matrix_MultVec3f(gCalcMatrix, &sp3C, &effect->obj.pos); + Matrix_MultVec3f(gCalcMatrix, &sp3C, &this->obj.pos); - effect->unk_60.x += 5.0f; + this->unk_60.x += 5.0f; if ((gGameFrameCount % 2) == 0) { - effect->unk_4C++; - if (effect->unk_4C > 2) { - effect->unk_4C = 0; + this->unk_4C++; + if (this->unk_4C > 2) { + this->unk_4C = 0; } } if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) { - func_effect_8007A774(&gPlayer[0], effect, effect->scale2 * 12.0f); + func_effect_8007A774(&gPlayer[0], this, this->scale2 * 12.0f); } - if (effect->unk_60.x > 190.0f) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->unk_60.x > 190.0f) { + Object_Kill(&this->obj, this->sfxSource); } - sp48 = effect->unk_48; + sp48 = this->unk_48; - if (Play_CheckDynaFloorCollision(&sp5C, &sp4C, effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z)) { - effect->unk_48 = 1; - if (effect->scale2 == 20.0f) { - AUDIO_PLAY_SFX(NA_SE_EN_IN_PROMINENCE, effect->sfxSource, 4); + if (Play_CheckDynaFloorCollision(&sp5C, &sp4C, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z)) { + this->unk_48 = 1; + if (this->scale2 == 20.0f) { + AUDIO_PLAY_SFX(NA_SE_EN_IN_PROMINENCE, this->sfxSource, 4); } } else { - effect->unk_48 = 0; + this->unk_48 = 0; } - if (sp48 != effect->unk_48) { - if (effect->unk_48 != 0) { + if (sp48 != this->unk_48) { + if (this->unk_48 != 0) { sp54 = 50.0f; } else { sp54 = -50.0f; } - if ((effect->index % 2) != 0) { + if ((this->index % 2) != 0) { sp58 = 100.0f; } else { sp58 = -100.0f; } - Solar_8019E9F4(effect->obj.pos.x + sp58, effect->obj.pos.y + sp54, effect->obj.pos.z, sp58 * 0.25f, + Solar_8019E9F4(this->obj.pos.x + sp58, this->obj.pos.y + sp54, this->obj.pos.z, sp58 * 0.25f, RAND_FLOAT(10.0f) + 20.0f, sp58 * 0.25f, 20.0f, 1); } break; case 1: - if (effect->timer_50 == 0) { - effect->timer_50 = 4; - effect->unk_4C++; - if (effect->unk_4C >= 6) { - effect->unk_4C = 0; - Object_Kill(&effect->obj, effect->sfxSource); + if (this->timer_50 == 0) { + this->timer_50 = 4; + this->unk_4C++; + if (this->unk_4C >= 6) { + this->unk_4C = 0; + Object_Kill(&this->obj, this->sfxSource); } } - if (effect->scale2 > 10.0f) { - effect->vel.y -= 2.5f; - } else if (effect->scale2 > 4.0f) { - effect->vel.y -= 1.0f; + if (this->scale2 > 10.0f) { + this->vel.y -= 2.5f; + } else if (this->scale2 > 4.0f) { + this->vel.y -= 1.0f; } break; case 2: - if (effect->timer_50 == 0) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->timer_50 == 0) { + Object_Kill(&this->obj, this->sfxSource); } - Math_SmoothStepToF(&effect->scale2, 0.0f, 0.1f, 0.2f, 0.0f); - effect->obj.rot.z += 3.0f; - effect->vel.y -= 0.3f; + Math_SmoothStepToF(&this->scale2, 0.0f, 0.1f, 0.2f, 0.0f); + this->obj.rot.z += 3.0f; + this->vel.y -= 0.3f; break; case 3: - Math_SmoothStepToF(&effect->obj.rot.z, -190.0f, 1.0f, 10.0f, 0.0f); - effect->vel.y -= 0.3f; - if (effect->obj.rot.z <= -180.0f) { - Object_Kill(&effect->obj, effect->sfxSource); + Math_SmoothStepToF(&this->obj.rot.z, -190.0f, 1.0f, 10.0f, 0.0f); + this->vel.y -= 0.3f; + if (this->obj.rot.z <= -180.0f) { + Object_Kill(&this->obj, this->sfxSource); } break; case 4: if (gBosses[0].swork[SO_SWK_0] != 7) { - Math_SmoothStepToF(&effect->vel.y, -40.0f, 1.0f, 1.0f, 1.0f); + Math_SmoothStepToF(&this->vel.y, -40.0f, 1.0f, 1.0f, 1.0f); } else { - effect->vel.z = gPlayer[0].vel.z; - Math_SmoothStepToF(&effect->vel.y, -65.0f, 2.0f, 1.0f, 0.5f); + this->vel.z = gPlayer[0].vel.z; + Math_SmoothStepToF(&this->vel.y, -65.0f, 2.0f, 1.0f, 0.5f); } if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) { - func_effect_8007A774(&gPlayer[0], effect, effect->scale2 * 12.0f); + func_effect_8007A774(&gPlayer[0], this, this->scale2 * 12.0f); } - if (effect->obj.pos.y < -20.0f) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->obj.pos.y < -20.0f) { + Object_Kill(&this->obj, this->sfxSource); } - effect->obj.rot.z += 6.0f; - if (effect->obj.rot.z >= 360.0f) { - effect->obj.rot.z = 0.0f; + this->obj.rot.z += 6.0f; + if (this->obj.rot.z >= 360.0f) { + this->obj.rot.z = 0.0f; } - sp48 = effect->unk_48; + sp48 = this->unk_48; - if (Play_CheckDynaFloorCollision(&sp5C, &sp4C, effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z)) { - effect->unk_48 = 1; - if (effect->scale2 == 20.0f) { - AUDIO_PLAY_SFX(NA_SE_EN_IN_PROMINENCE, effect->sfxSource, 4); + if (Play_CheckDynaFloorCollision(&sp5C, &sp4C, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z)) { + this->unk_48 = 1; + if (this->scale2 == 20.0f) { + AUDIO_PLAY_SFX(NA_SE_EN_IN_PROMINENCE, this->sfxSource, 4); } } else { - effect->unk_48 = 0; + this->unk_48 = 0; } - if ((sp48 != effect->unk_48) && (effect->unk_48 != 0)) { - if ((effect->index % 2) != 0) { + if ((sp48 != this->unk_48) && (this->unk_48 != 0)) { + if ((this->index % 2) != 0) { sp58 = 100.0f; } else { sp58 = -100.0f; } - Solar_8019E9F4(effect->obj.pos.x + sp58, effect->obj.pos.y + -50.0f, effect->obj.pos.z, sp58 * 0.25f, + Solar_8019E9F4(this->obj.pos.x + sp58, this->obj.pos.y + -50.0f, this->obj.pos.z, sp58 * 0.25f, RAND_FLOAT(10.0f) + 20.0f, sp58 * 0.25f, 20.0f, 1); } break; case 5: - effect->unk_4C++; - if (effect->unk_4C > 2) { - effect->unk_4C = 0; + this->unk_4C++; + if (this->unk_4C > 2) { + this->unk_4C = 0; } - if (effect->unk_60.x < 7.5f) { - effect->unk_60.x += 0.25f; + if (this->unk_60.x < 7.5f) { + this->unk_60.x += 0.25f; } - effect->unk_60.z += 10.0f; + this->unk_60.z += 10.0f; - effect->vel.x = SIN_DEG(effect->unk_60.z) * (effect->unk_60.x * 10.0f); - effect->vel.y = COS_DEG(effect->unk_60.z) * (effect->unk_60.x * 10.0f); - effect->vel.z = gPlayer[0].vel.z + 15.0f; + this->vel.x = SIN_DEG(this->unk_60.z) * (this->unk_60.x * 10.0f); + this->vel.y = COS_DEG(this->unk_60.z) * (this->unk_60.x * 10.0f); + this->vel.z = gPlayer[0].vel.z + 15.0f; if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) { - func_effect_8007A774(&gPlayer[0], effect, effect->scale2 * 18.0f); - if ((effect->unk_4C == 0) && ((effect->scale2 >= 9.8f) || (effect->scale2 <= 4.4f))) { - AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_BREATH, effect->sfxSource, 4); + func_effect_8007A774(&gPlayer[0], this, this->scale2 * 18.0f); + if ((this->unk_4C == 0) && ((this->scale2 >= 9.8f) || (this->scale2 <= 4.4f))) { + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_BREATH, this->sfxSource, 4); } } else { - effect->vel.z += 65.0f; - if (fabsf(gBosses[0].obj.pos.z - effect->obj.pos.z) >= 2000.0f) { - Audio_KillSfxBySourceAndId(effect->sfxSource, NA_SE_EN_SOBOSS_BREATH); + this->vel.z += 65.0f; + if (fabsf(gBosses[0].obj.pos.z - this->obj.pos.z) >= 2000.0f) { + Audio_KillSfxBySourceAndId(this->sfxSource, NA_SE_EN_SOBOSS_BREATH); } } break; @@ -880,43 +889,43 @@ void Solar_801A0120(Effect* effect) { sp50 = -1.0f; /* fallthrough */ case 7: - effect->unk_4C++; - if (effect->unk_4C > 2) { - effect->unk_4C = 0; + this->unk_4C++; + if (this->unk_4C > 2) { + this->unk_4C = 0; } - effect->unk_60.z += 20.0f; + this->unk_60.z += 20.0f; - effect->vel.x = SIN_DEG(effect->unk_60.z) * sp50 * 50.0f; - effect->vel.y = COS_DEG(effect->unk_60.z) * sp50 * 50.0f; - effect->vel.z = gPlayer[0].vel.z + 80.0f; + this->vel.x = SIN_DEG(this->unk_60.z) * sp50 * 50.0f; + this->vel.y = COS_DEG(this->unk_60.z) * sp50 * 50.0f; + this->vel.z = gPlayer[0].vel.z + 80.0f; if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) { - func_effect_8007A774(&gPlayer[0], effect, effect->scale2 * 18.0f); - if ((effect->unk_4C == 0) && ((effect->scale2 >= 9.8f) || (effect->scale2 <= 4.4f))) { - AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_BREATH, effect->sfxSource, 4); + func_effect_8007A774(&gPlayer[0], this, this->scale2 * 18.0f); + if ((this->unk_4C == 0) && ((this->scale2 >= 9.8f) || (this->scale2 <= 4.4f))) { + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_BREATH, this->sfxSource, 4); } - } else if (fabsf(gBosses[0].obj.pos.z - effect->obj.pos.z) >= 2000.0f) { - Audio_KillSfxBySourceAndId(effect->sfxSource, NA_SE_EN_SOBOSS_BREATH); + } else if (fabsf(gBosses[0].obj.pos.z - this->obj.pos.z) >= 2000.0f) { + Audio_KillSfxBySourceAndId(this->sfxSource, NA_SE_EN_SOBOSS_BREATH); } break; } } -void Solar_801A0AF0(Effect* effect) { - Graphics_SetScaleMtx(effect->scale2); - switch (effect->state) { +void Solar_Effect392_Draw(Effect392* this) { + Graphics_SetScaleMtx(this->scale2); + switch (this->state) { case 0: - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 128, 128, effect->unk_44); - gSPDisplayList(gMasterDisp++, D_i3_801BF92C[effect->unk_4C]); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 128, 128, this->unk_44); + gSPDisplayList(gMasterDisp++, D_i3_801BF92C[this->unk_4C]); break; case 1: case 2: - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 128, 128, effect->unk_44); - gSPDisplayList(gMasterDisp++, D_i3_801BF944[effect->unk_4C]); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 128, 128, this->unk_44); + gSPDisplayList(gMasterDisp++, D_i3_801BF944[this->unk_4C]); break; case 3: - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 128, 128, effect->unk_44); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 128, 128, this->unk_44); gSPDisplayList(gMasterDisp++, D_SO_601C820); break; case 4: @@ -924,28 +933,29 @@ void Solar_801A0AF0(Effect* effect) { case 6: case 7: RCP_SetupDL(&gMasterDisp, SETUPDL_53); - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 128, 128, effect->unk_44); - gSPDisplayList(gMasterDisp++, D_i3_801BF92C[effect->unk_4C]); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 128, 128, this->unk_44); + gSPDisplayList(gMasterDisp++, D_i3_801BF92C[this->unk_4C]); RCP_SetupDL(&gMasterDisp, SETUPDL_64); break; } } -void Solar_801A0CEC(Actor* actor, f32 xPos, f32 zPos, f32 zVel, s32 unkB8) { - Actor_Initialize(actor); - actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_278; - actor->obj.pos.x = xPos; - actor->obj.pos.z = zPos; - actor->unk_046 = 1; - actor->state = unkB8; - actor->vel.z = zVel; - actor->fwork[1] = zVel; +void Solar_801A0CEC(Actor278* this, f32 xPos, f32 zPos, f32 zVel, s32 unkB8) { + Actor_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_ACTOR_278; + + this->obj.pos.x = xPos; + this->obj.pos.z = zPos; + this->unk_046 = 1; + this->state = unkB8; + this->vel.z = zVel; + this->fwork[1] = zVel; if (unkB8 == 2) { - actor->fwork[0] = 18.0f; + this->fwork[0] = 18.0f; } - Object_SetInfo(&actor->info, actor->obj.id); - actor->info.bonus = 0; + Object_SetInfo(&this->info, this->obj.id); + this->info.bonus = 0; } void Solar_801A0D90(f32 xPos, f32 zPos, f32 zVel, s32 unkB8) { @@ -960,69 +970,71 @@ void Solar_801A0D90(f32 xPos, f32 zPos, f32 zVel, s32 unkB8) { } void Solar_801A0DF8(f32 xPos, f32 zPos, f32 yRot, s32 index, f32 yPos) { - s32 sp2C; + s32 actorIndex; switch (index) { case 0: if (D_ctx_80177A10[0] != 0) { - sp2C = 5; + actorIndex = 5; D_ctx_80177A10[1] = RAND_INT(10.0f) + 128; } else { - sp2C = 4; + actorIndex = 4; D_ctx_80177A10[0] = RAND_INT(10.0f) + 128; } break; case 1: case 4: - sp2C = 6; + actorIndex = 6; break; case 2: - sp2C = 4; + actorIndex = 4; break; case 3: - sp2C = 5; + actorIndex = 5; break; } - Actor_Initialize(&gActors[sp2C]); + Actor_Initialize(&gActors[actorIndex]); - gActors[sp2C].obj.status = OBJ_ACTIVE; - gActors[sp2C].obj.id = OBJ_ACTOR_279; + gActors[actorIndex].obj.status = OBJ_ACTIVE; + gActors[actorIndex].obj.id = OBJ_ACTOR_279; - Object_SetInfo(&gActors[sp2C].info, gActors[sp2C].obj.id); + Object_SetInfo(&gActors[actorIndex].info, gActors[actorIndex].obj.id); - gActors[sp2C].state = 0; - gActors[sp2C].obj.pos.x = xPos; - gActors[sp2C].obj.pos.z = zPos; - gActors[sp2C].obj.rot.y = yRot; + gActors[actorIndex].state = 0; + gActors[actorIndex].obj.pos.x = xPos; + gActors[actorIndex].obj.pos.z = zPos; + gActors[actorIndex].obj.rot.y = yRot; if (index != 4) { - gActors[sp2C].obj.pos.y = -80.0f * yPos; + gActors[actorIndex].obj.pos.y = -80.0f * yPos; } else { - gActors[sp2C].timer_0BC = 0; - gActors[sp2C].timer_0BE = 50; - gActors[sp2C].counter_04E = 0; - gActors[sp2C].obj.pos.y = -1.0f * yPos; - Object_SetSfxSourceToPos(gActors[sp2C].sfxSource, &gActors[sp2C].obj.pos); - AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, gActors[sp2C].sfxSource, 4); + gActors[actorIndex].timer_0BC = 0; + gActors[actorIndex].timer_0BE = 50; + gActors[actorIndex].counter_04E = 0; + gActors[actorIndex].obj.pos.y = -1.0f * yPos; + Object_SetSfxSourceToPos(gActors[actorIndex].sfxSource, &gActors[actorIndex].obj.pos); + AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, gActors[actorIndex].sfxSource, 4); } } -void Solar_801A0FD4(Actor* actor, s32 index) { +void Solar_801A0FD4(ActorCutscene* this, s32 index) { if (gTeamShields[3 - index] > 0) { - Actor_Initialize(actor); - actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.pos.x = D_i3_801BF95C[index].x + gPlayer[0].pos.x; - actor->obj.pos.y = D_i3_801BF95C[index].y + gPlayer[0].pos.y; - actor->obj.pos.z = D_i3_801BF95C[index].z + gPlayer[0].pos.z; - actor->state = 0; - actor->iwork[11] = 1; - actor->vel.z = 0.0f; - actor->vel.y = 0.0f; - actor->obj.rot.x = 0.0f; - actor->obj.rot.y = 180.0f; - Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); + Actor_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_ACTOR_CUTSCENE; + + this->obj.pos.x = D_i3_801BF95C[index].x + gPlayer[0].pos.x; + this->obj.pos.y = D_i3_801BF95C[index].y + gPlayer[0].pos.y; + this->obj.pos.z = D_i3_801BF95C[index].z + gPlayer[0].pos.z; + + this->state = 0; + this->iwork[11] = 1; + this->vel.z = 0.0f; + this->vel.y = 0.0f; + this->obj.rot.x = 0.0f; + this->obj.rot.y = 180.0f; + Object_SetInfo(&this->info, this->obj.id); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); } } @@ -1269,36 +1281,37 @@ void Solar_LevelStart(Player* player) { player->trueZpos = player->pos.z + player->camDist; } -void Solar_801A1CD8(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 zRot, f32 xVel, f32 yVel, +void Solar_801A1CD8(ActorDebris* this, f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 zRot, f32 xVel, f32 yVel, f32 zVel, s32 unk46) { - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_DEBRIS; - actor->state = 40; - actor->unk_046 = unk46; - actor->unk_04A = 3; + Actor_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_ACTOR_DEBRIS; - actor->obj.pos.x = xPos; - actor->obj.pos.y = yPos; - actor->obj.pos.z = zPos; + this->state = 40; + this->unk_046 = unk46; + this->unk_04A = 3; - actor->obj.rot.x = xRot; - actor->obj.rot.y = yRot; - actor->obj.rot.z = zRot; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - actor->vel.x = xVel; - actor->vel.y = yVel; - actor->vel.z = zVel; + this->obj.rot.x = xRot; + this->obj.rot.y = yRot; + this->obj.rot.z = zRot; - actor->iwork[0] = 3; + this->vel.x = xVel; + this->vel.y = yVel; + this->vel.z = zVel; - actor->fwork[0] = RAND_FLOAT_CENTERED(25.0f); - actor->fwork[1] = RAND_FLOAT_CENTERED(25.0f); - actor->fwork[2] = RAND_FLOAT_CENTERED(25.0f); - actor->fwork[5] = 2000.0f; - actor->gravity = 3.5f; - actor->scale = 5.5f; - Object_SetInfo(&actor->info, actor->obj.id); + this->iwork[0] = 3; + + this->fwork[0] = RAND_FLOAT_CENTERED(25.0f); + this->fwork[1] = RAND_FLOAT_CENTERED(25.0f); + this->fwork[2] = RAND_FLOAT_CENTERED(25.0f); + this->fwork[5] = 2000.0f; + this->gravity = 3.5f; + this->scale = 5.5f; + Object_SetInfo(&this->info, this->obj.id); } void Solar_801A1E14(f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 zRot, f32 xVel, f32 yVel, f32 zVel, @@ -1313,44 +1326,45 @@ void Solar_801A1E14(f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 zRot, } } -void Solar_801A1EB0(Boss* bossSO, f32 xPos, f32 xOffset, f32 yPos, f32 zPos) { +void Solar_801A1EB0(BossSO* this, f32 xPos, f32 xOffset, f32 yPos, f32 zPos) { Solar_8019E9F4(xPos + xOffset, yPos, zPos, 20.0f, RAND_FLOAT(10.0f) + 20.0f, 0.0f, 20.0f, 1); Solar_8019E9F4(xPos - xOffset, yPos, zPos, -20.0f, RAND_FLOAT(10.0f) + 20.0f, 0.0f, 20.0f, 1); } -void Solar_801A1F80(Boss* bossSO) { +void Solar_801A1F80(BossSO* this) { if (gBossActive) { - bossSO->scale = 5.5f; + this->scale = 5.5f; } - if (bossSO->health == 0) { + if (this->health == 0) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 20); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 20); gBossActive = true; gBossFrameCount = 0; - bossSO->health = 600; + this->health = 600; - bossSO->scale = 0.1f; - bossSO->fwork[SO_FWK_0] = 1.0f; - bossSO->swork[SO_SWK_2] = bossSO->swork[SO_SWK_3] = 400; + this->scale = 0.1f; + this->fwork[SO_FWK_0] = 1.0f; + this->swork[SO_SWK_2] = this->swork[SO_SWK_3] = 400; - bossSO->obj.pos.y = -3000.0f; + this->obj.pos.y = -3000.0f; - Solar_801A0CEC(&gActors[10], bossSO->obj.pos.x, bossSO->obj.pos.z + 2000.0f, 20.0f, 1); + Solar_801A0CEC(&gActors[10], this->obj.pos.x, this->obj.pos.z + 2000.0f, 20.0f, 1); D_ctx_801779A8[gMainController] = 10.0f; + gCameraShake = 120; - bossSO->fwork[SO_FWK_3] = 2400.0f; - bossSO->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SO_60231A4); - bossSO->unk_04C = 0; - bossSO->swork[SO_SWK_1] = 0; - bossSO->info.hitbox[8] = bossSO->info.hitbox[12] = bossSO->info.hitbox[14] = bossSO->info.hitbox[18] = - bossSO->info.hitbox[20] = bossSO->info.hitbox[24] = bossSO->info.hitbox[26] = bossSO->info.hitbox[30] = - bossSO->info.hitbox[32] = bossSO->info.hitbox[36] = bossSO->info.hitbox[38] = bossSO->info.hitbox[42] = - 220.0f; - bossSO->info.hitbox[10] = bossSO->info.hitbox[28] = 467.5f; - bossSO->info.hitbox[16] = bossSO->info.hitbox[34] = 247.5f; - bossSO->info.hitbox[22] = bossSO->info.hitbox[40] = 715.0f; + + this->fwork[SO_FWK_3] = 2400.0f; + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SO_60231A4); + this->unk_04C = 0; + this->swork[SO_SWK_1] = 0; + this->info.hitbox[8] = this->info.hitbox[12] = this->info.hitbox[14] = this->info.hitbox[18] = + this->info.hitbox[20] = this->info.hitbox[24] = this->info.hitbox[26] = this->info.hitbox[30] = + this->info.hitbox[32] = this->info.hitbox[36] = this->info.hitbox[38] = this->info.hitbox[42] = 220.0f; + this->info.hitbox[10] = this->info.hitbox[28] = 467.5f; + this->info.hitbox[16] = this->info.hitbox[34] = 247.5f; + this->info.hitbox[22] = this->info.hitbox[40] = 715.0f; D_i3_801C2740[0] = 255; D_i3_801C2740[1] = 255; @@ -1359,9 +1373,9 @@ void Solar_801A1F80(Boss* bossSO) { D_i3_801C2768[12] = D_i3_801C2768[13] = 0.0f; } - gActors[10].obj.pos.z = bossSO->obj.pos.z + 2000.0f; + gActors[10].obj.pos.z = this->obj.pos.z + 2000.0f; - Math_SmoothStepToF(&bossSO->obj.pos.y, 180.0f, 0.1f, 30.0f, 0.1f); + Math_SmoothStepToF(&this->obj.pos.y, 180.0f, 0.1f, 30.0f, 0.1f); if (gFogRed > 96) { gFogRed--; @@ -1383,17 +1397,17 @@ void Solar_801A1F80(Boss* bossSO) { if (gBossFrameCount == 60) { gActors[10].dmgType = DMG_COLLISION; - AUDIO_PLAY_SFX(NA_SE_EN_OUT_MAGMA, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_OUT_MAGMA, this->sfxSource, 4); } - if (bossSO->timer_050 == 100) { - bossSO->unk_04C = 0; - bossSO->swork[SO_SWK_1] = 1; + if (this->timer_050 == 100) { + this->unk_04C = 0; + this->swork[SO_SWK_1] = 1; } if (gBossFrameCount == 150) { - Solar_801A239C(bossSO); - bossSO->fwork[SO_FWK_0] = 0.01f; + Solar_801A239C(this); + this->fwork[SO_FWK_0] = 0.01f; } if ((gBossFrameCount == 100) && (gTeamShields[TEAM_ID_PEPPY] != 0)) { @@ -1401,106 +1415,106 @@ void Solar_801A1F80(Boss* bossSO) { } } -void Solar_801A239C(Boss* bossSO) { - bossSO->swork[SO_SWK_0] = 1; - if ((bossSO->swork[SO_SWK_2] != 0) || (bossSO->swork[SO_SWK_3] != 0)) { - if (bossSO->swork[SO_SWK_3] != 0) { - bossSO->swork[SO_SWK_1] = 3; +void Solar_801A239C(BossSO* this) { + this->swork[SO_SWK_0] = 1; + if ((this->swork[SO_SWK_2] != 0) || (this->swork[SO_SWK_3] != 0)) { + if (this->swork[SO_SWK_3] != 0) { + this->swork[SO_SWK_1] = 3; } else { - bossSO->swork[SO_SWK_1] = 4; + this->swork[SO_SWK_1] = 4; } } else { - bossSO->swork[SO_SWK_1] = 7; + this->swork[SO_SWK_1] = 7; } - bossSO->unk_04C = 0; + this->unk_04C = 0; } -void Solar_801A23F4(Boss* bossSO) { +void Solar_801A23F4(BossSO* this) { s32 i; Vec3f sp58; Vec3f sp4C; Vec3f sp40; Vec3f sp34; - switch (bossSO->swork[SO_SWK_1]) { + switch (this->swork[SO_SWK_1]) { case 3: - if ((bossSO->unk_04C == 119) || (bossSO->swork[SO_SWK_3] == 0)) { - bossSO->unk_04C = 0; - if (bossSO->swork[SO_SWK_2] != 0) { + if ((this->unk_04C == 119) || (this->swork[SO_SWK_3] == 0)) { + this->unk_04C = 0; + if (this->swork[SO_SWK_2] != 0) { if (Rand_ZeroOne() >= 0.5f) { - bossSO->swork[SO_SWK_1] = 4; + this->swork[SO_SWK_1] = 4; } else { - bossSO->swork[SO_SWK_1] = 2; - bossSO->state = 0; - bossSO->rot_078.y = 0.0f; + this->swork[SO_SWK_1] = 2; + this->state = 0; + this->rot_078.y = 0.0f; } - } else if (bossSO->swork[SO_SWK_3] == 0) { - bossSO->swork[SO_SWK_1] = 7; + } else if (this->swork[SO_SWK_3] == 0) { + this->swork[SO_SWK_1] = 7; } else { - bossSO->swork[SO_SWK_1] = 5; + this->swork[SO_SWK_1] = 5; } } - if (bossSO->unk_04C >= 28) { - bossSO->info.hitbox[38] = 715.0f; - bossSO->info.hitbox[40] = 440.0f; - bossSO->info.hitbox[42] = 110.0f; + if (this->unk_04C >= 28) { + this->info.hitbox[38] = 715.0f; + this->info.hitbox[40] = 440.0f; + this->info.hitbox[42] = 110.0f; } - if (bossSO->unk_04C == 29) { - Object_SetSfxSourceToPos(bossSO->sfxSource, &bossSO->obj.pos); - AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, bossSO->sfxSource, 4); + if (this->unk_04C == 29) { + Object_SetSfxSourceToPos(this->sfxSource, &this->obj.pos); + AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, this->sfxSource, 4); } - if (bossSO->unk_04C == 80) { - AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_SWING, bossSO->sfxSource, 4); + if (this->unk_04C == 80) { + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_SWING, this->sfxSource, 4); } - if (bossSO->unk_04C >= 94) { - bossSO->info.hitbox[38] = 220.0f; - bossSO->info.hitbox[40] = 715.0f; - bossSO->info.hitbox[42] = 220.0f; + if (this->unk_04C >= 94) { + this->info.hitbox[38] = 220.0f; + this->info.hitbox[40] = 715.0f; + this->info.hitbox[42] = 220.0f; } break; case 4: - if ((bossSO->unk_04C == 99) || (bossSO->swork[SO_SWK_2] == 0)) { - bossSO->unk_04C = 0; - if ((bossSO->swork[SO_SWK_3] != 0) || (bossSO->swork[SO_SWK_2] != 0)) { - bossSO->swork[SO_SWK_1] = 5; + if ((this->unk_04C == 99) || (this->swork[SO_SWK_2] == 0)) { + this->unk_04C = 0; + if ((this->swork[SO_SWK_3] != 0) || (this->swork[SO_SWK_2] != 0)) { + this->swork[SO_SWK_1] = 5; } else { - bossSO->swork[SO_SWK_1] = 7; + this->swork[SO_SWK_1] = 7; } } - if (bossSO->unk_04C > 20) { - bossSO->info.hitbox[20] = 715.0f; - bossSO->info.hitbox[22] = 110.0f; - bossSO->info.hitbox[24] = 275.0f; + if (this->unk_04C > 20) { + this->info.hitbox[20] = 715.0f; + this->info.hitbox[22] = 110.0f; + this->info.hitbox[24] = 275.0f; } - if (bossSO->unk_04C == 10) { - Object_SetSfxSourceToPos(bossSO->sfxSource, &bossSO->obj.pos); - AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, bossSO->sfxSource, 4); + if (this->unk_04C == 10) { + Object_SetSfxSourceToPos(this->sfxSource, &this->obj.pos); + AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, this->sfxSource, 4); } - if (bossSO->unk_04C == 50) { - AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_SWING, bossSO->sfxSource, 4); + if (this->unk_04C == 50) { + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_SWING, this->sfxSource, 4); } - if (bossSO->unk_04C >= 85) { - bossSO->info.hitbox[20] = 220.0f; - bossSO->info.hitbox[22] = 715.0f; - bossSO->info.hitbox[24] = 220.0f; + if (this->unk_04C >= 85) { + this->info.hitbox[20] = 220.0f; + this->info.hitbox[22] = 715.0f; + this->info.hitbox[24] = 220.0f; } break; case 5: - bossSO->fwork[SO_FWK_3] = 2600.0f; + this->fwork[SO_FWK_3] = 2600.0f; - Math_SmoothStepToAngle(&bossSO->obj.rot.y, 0.0f, 1.0f, 1.5f, 1.0f); + Math_SmoothStepToAngle(&this->obj.rot.y, 0.0f, 1.0f, 1.5f, 1.0f); - if (bossSO->unk_04C == 65) { + if (this->unk_04C == 65) { Matrix_RotateX(gCalcMatrix, D_i3_801C2768[0] * M_DTOR, MTXF_NEW); Matrix_RotateY(gCalcMatrix, D_i3_801C2768[1] * M_DTOR, MTXF_APPLY); sp40.x = 0.0f; @@ -1513,230 +1527,230 @@ void Solar_801A23F4(Boss* bossSO) { sp58.y = RAND_FLOAT_CENTERED(2.0f); sp58.z = RAND_FLOAT(10.0f) + 2.5f; Matrix_MultVec3f(gCalcMatrix, &sp58, &sp4C); - Solar_8019F038(bossSO->fwork[SO_FWK_4] + sp34.x, bossSO->fwork[SO_FWK_5] + sp34.y, - bossSO->fwork[SO_FWK_6] + sp34.z, sp4C.x, sp4C.y, sp4C.z); + Solar_8019F038(this->fwork[SO_FWK_4] + sp34.x, this->fwork[SO_FWK_5] + sp34.y, + this->fwork[SO_FWK_6] + sp34.z, sp4C.x, sp4C.y, sp4C.z); } } - if (bossSO->unk_04C == 99) { - if ((bossSO->swork[SO_SWK_2] != 0) || (bossSO->swork[SO_SWK_3] != 0)) { - Solar_801A2C3C(bossSO); + if (this->unk_04C == 99) { + if ((this->swork[SO_SWK_2] != 0) || (this->swork[SO_SWK_3] != 0)) { + Solar_801A2C3C(this); } else { - Solar_801A4EC0(bossSO); + Solar_801A4EC0(this); } } break; case 7: - if (bossSO->unk_04C < 50) { - if (bossSO->fwork[SO_FWK_31] < 22.0f) { - bossSO->fwork[SO_FWK_31] += 0.5f; + if (this->unk_04C < 50) { + if (this->fwork[SO_FWK_31] < 22.0f) { + this->fwork[SO_FWK_31] += 0.5f; } - bossSO->obj.rot.y += bossSO->fwork[SO_FWK_31]; + this->obj.rot.y += this->fwork[SO_FWK_31]; } - if ((bossSO->unk_04C >= 50) && (bossSO->unk_04C <= 100)) { - if (bossSO->fwork[SO_FWK_31] > 0.0f) { - bossSO->fwork[SO_FWK_31] -= 0.5f; + if ((this->unk_04C >= 50) && (this->unk_04C <= 100)) { + if (this->fwork[SO_FWK_31] > 0.0f) { + this->fwork[SO_FWK_31] -= 0.5f; } - bossSO->obj.rot.y += bossSO->fwork[SO_FWK_31]; + this->obj.rot.y += this->fwork[SO_FWK_31]; } - if (bossSO->obj.rot.y >= 360.0f) { - bossSO->obj.rot.y -= 360.0f; - AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_ROLL, bossSO->sfxSource, 4); + if (this->obj.rot.y >= 360.0f) { + this->obj.rot.y -= 360.0f; + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_ROLL, this->sfxSource, 4); } - if (bossSO->unk_04C == 1) { - AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_ROLL, bossSO->sfxSource, 4); + if (this->unk_04C == 1) { + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_ROLL, this->sfxSource, 4); } - if (bossSO->unk_04C >= 100) { - Math_SmoothStepToAngle(&bossSO->obj.rot.y, 0.0f, 1.0f, 2.0f, 1.0f); - bossSO->fwork[SO_FWK_31] = 0.0f; + if (this->unk_04C >= 100) { + Math_SmoothStepToAngle(&this->obj.rot.y, 0.0f, 1.0f, 2.0f, 1.0f); + this->fwork[SO_FWK_31] = 0.0f; } - if (bossSO->unk_04C == 120) { - bossSO->swork[SO_SWK_1] = 5; - bossSO->unk_04C = 0; - bossSO->fwork[SO_FWK_0] = 0.1f; + if (this->unk_04C == 120) { + this->swork[SO_SWK_1] = 5; + this->unk_04C = 0; + this->fwork[SO_FWK_0] = 0.1f; } break; case 2: - if (((bossSO->unk_04C == 89) && (bossSO->state == 2)) || (bossSO->swork[SO_SWK_2] == 0)) { - bossSO->unk_04C = 0; + if (((this->unk_04C == 89) && (this->state == 2)) || (this->swork[SO_SWK_2] == 0)) { + this->unk_04C = 0; - if ((bossSO->swork[SO_SWK_3] != 0) || (bossSO->swork[SO_SWK_2] != 0)) { - bossSO->swork[SO_SWK_1] = 5; + if ((this->swork[SO_SWK_3] != 0) || (this->swork[SO_SWK_2] != 0)) { + this->swork[SO_SWK_1] = 5; } else { - bossSO->swork[SO_SWK_1] = 7; + this->swork[SO_SWK_1] = 7; } } - if (bossSO->unk_04C == 80) { - bossSO->rot_078.y += 15.0f; - bossSO->state++; - if (bossSO->rot_078.y >= 30.0f) { - bossSO->rot_078.y = 0.0f; + if (this->unk_04C == 80) { + this->rot_078.y += 15.0f; + this->state++; + if (this->rot_078.y >= 30.0f) { + this->rot_078.y = 0.0f; } } - Math_SmoothStepToAngle(&bossSO->obj.rot.y, bossSO->rot_078.y, 1.0f, 1.5f, 1.0f); + Math_SmoothStepToAngle(&this->obj.rot.y, this->rot_078.y, 1.0f, 1.5f, 1.0f); - if (bossSO->unk_04C >= 19) { - bossSO->info.hitbox[20] = 715.0f; - bossSO->info.hitbox[22] = 440.0f; - bossSO->info.hitbox[24] = 110.0f; + if (this->unk_04C >= 19) { + this->info.hitbox[20] = 715.0f; + this->info.hitbox[22] = 440.0f; + this->info.hitbox[24] = 110.0f; } - if (bossSO->unk_04C == 5) { - Object_SetSfxSourceToPos(bossSO->sfxSource, &bossSO->obj.pos); - AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, bossSO->sfxSource, 4); + if (this->unk_04C == 5) { + Object_SetSfxSourceToPos(this->sfxSource, &this->obj.pos); + AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, this->sfxSource, 4); } - if (bossSO->unk_04C == 20) { - AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_SWING, bossSO->sfxSource, 4); + if (this->unk_04C == 20) { + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_SWING, this->sfxSource, 4); } - if (bossSO->unk_04C > 36) { - bossSO->info.hitbox[20] = 220.0f; - bossSO->info.hitbox[22] = 715.0f; - bossSO->info.hitbox[24] = 220.0f; + if (this->unk_04C > 36) { + this->info.hitbox[20] = 220.0f; + this->info.hitbox[22] = 715.0f; + this->info.hitbox[24] = 220.0f; } break; } } -void Solar_801A2C3C(Boss* bossSO) { - bossSO->swork[SO_SWK_0] = 2; - bossSO->swork[SO_SWK_1] = 0; - bossSO->fwork[SO_FWK_0] = 0.05f; - bossSO->unk_04C = Animation_GetFrameCount(&D_SO_601388C) - 2; - bossSO->state = 0; - bossSO->swork[SO_SWK_11] = 15; +void Solar_801A2C3C(BossSO* this) { + this->swork[SO_SWK_0] = 2; + this->swork[SO_SWK_1] = 0; + this->fwork[SO_FWK_0] = 0.05f; + this->unk_04C = Animation_GetFrameCount(&D_SO_601388C) - 2; + this->state = 0; + this->swork[SO_SWK_11] = 15; } -void Solar_801A2C98(Boss* bossSO) { +void Solar_801A2C98(BossSO* this) { s32 i; - if (bossSO->swork[SO_SWK_11] != 0) { - bossSO->swork[SO_SWK_11]--; + if (this->swork[SO_SWK_11] != 0) { + this->swork[SO_SWK_11]--; } - if (bossSO->state == 0) { - if (bossSO->swork[SO_SWK_11] == 0) { - bossSO->unk_04C -= 2; + if (this->state == 0) { + if (this->swork[SO_SWK_11] == 0) { + this->unk_04C -= 2; - Math_SmoothStepToF(&bossSO->obj.pos.y, -1000.0f, 0.1f, 10.0f, 0.1f); - Math_SmoothStepToAngle(&bossSO->obj.rot.y, 181.0f, 1.0f, 3.0f, 1.0f); + Math_SmoothStepToF(&this->obj.pos.y, -1000.0f, 0.1f, 10.0f, 0.1f); + Math_SmoothStepToAngle(&this->obj.rot.y, 181.0f, 1.0f, 3.0f, 1.0f); - if (bossSO->unk_04C == 50) { - Solar_801A0CEC(&gActors[10], bossSO->obj.pos.x, bossSO->obj.pos.z + 1000.0f, 20.0f, 1); + if (this->unk_04C == 50) { + Solar_801A0CEC(&gActors[10], this->obj.pos.x, this->obj.pos.z + 1000.0f, 20.0f, 1); gControllerRumbleFlags[gMainController] = 1; gControllerRumbleTimers[gMainController] = 70; } - if (bossSO->unk_04C == 60) { + if (this->unk_04C == 60) { for (i = 0; i < 4; i++) { - Solar_8019F038(bossSO->obj.pos.x + 100.0f, 100.0f, bossSO->obj.pos.z + 1100.0f, + Solar_8019F038(this->obj.pos.x + 100.0f, 100.0f, this->obj.pos.z + 1100.0f, D_i3_801BF8F0[i].x + RAND_FLOAT_CENTERED(2.0f), D_i3_801BF8F0[i].y + 10.0f + RAND_FLOAT_CENTERED(2.0f), RAND_FLOAT(-10.0f) - 10.0f); - Solar_8019F038(bossSO->obj.pos.x - 100.0f, 100.0f, bossSO->obj.pos.z + 1100.0f, + Solar_8019F038(this->obj.pos.x - 100.0f, 100.0f, this->obj.pos.z + 1100.0f, D_i3_801BF8F0[i].x + RAND_FLOAT_CENTERED(2.0f), D_i3_801BF8F0[i].y + 10.0f + RAND_FLOAT_CENTERED(2.0f), RAND_FLOAT(-10.0f) - 10.0f); } } - if (bossSO->unk_04C == 20) { + if (this->unk_04C == 20) { gActors[10].dmgType = DMG_COLLISION; - AUDIO_PLAY_SFX(NA_SE_EN_IN_MAGMA, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_IN_MAGMA, this->sfxSource, 4); } - if (bossSO->unk_04C == 0) { - bossSO->state++; - bossSO->swork[SO_SWK_11] = 100; - bossSO->obj.pos.y = -500.0f; - bossSO->fwork[SO_FWK_3] = 4800.0f; - bossSO->obj.pos.z = gPlayer[0].trueZpos - bossSO->fwork[SO_FWK_3]; - bossSO->obj.rot.y = -bossSO->obj.rot.y; + if (this->unk_04C == 0) { + this->state++; + this->swork[SO_SWK_11] = 100; + this->obj.pos.y = -500.0f; + this->fwork[SO_FWK_3] = 4800.0f; + this->obj.pos.z = gPlayer[0].trueZpos - this->fwork[SO_FWK_3]; + this->obj.rot.y = -this->obj.rot.y; } } else { - bossSO->unk_04C = Animation_GetFrameCount(&D_SO_601388C) - 2; + this->unk_04C = Animation_GetFrameCount(&D_SO_601388C) - 2; } } else { - Math_SmoothStepToAngle(&bossSO->obj.rot.y, 0.0f, 1.0f, 1.5f, 1.0f); + Math_SmoothStepToAngle(&this->obj.rot.y, 0.0f, 1.0f, 1.5f, 1.0f); - if (bossSO->swork[SO_SWK_11] == 80) { - Solar_801A0CEC(&gActors[9], bossSO->obj.pos.x, bossSO->obj.pos.z + 1000.0f, 20.0f, 1); + if (this->swork[SO_SWK_11] == 80) { + Solar_801A0CEC(&gActors[9], this->obj.pos.x, this->obj.pos.z + 1000.0f, 20.0f, 1); } - if (bossSO->swork[SO_SWK_11] == 0) { - bossSO->swork[SO_SWK_11] = 220; + if (this->swork[SO_SWK_11] == 0) { + this->swork[SO_SWK_11] = 220; } - if (bossSO->swork[SO_SWK_11] == 210) { - bossSO->unk_04C = 0; - bossSO->swork[SO_SWK_1] = 1; - bossSO->fwork[SO_FWK_0] = 0.05f; + if (this->swork[SO_SWK_11] == 210) { + this->unk_04C = 0; + this->swork[SO_SWK_1] = 1; + this->fwork[SO_FWK_0] = 0.05f; } - if (bossSO->swork[SO_SWK_11] >= 100) { - Math_SmoothStepToF(&bossSO->obj.pos.y, 180.0f, 0.1f, 10.0f, 0.1f); + if (this->swork[SO_SWK_11] >= 100) { + Math_SmoothStepToF(&this->obj.pos.y, 180.0f, 0.1f, 10.0f, 0.1f); } - if (bossSO->swork[SO_SWK_11] == 150) { - Solar_801A3468(bossSO); + if (this->swork[SO_SWK_11] == 150) { + Solar_801A3468(this); } - if (bossSO->swork[SO_SWK_11] == 50) { + if (this->swork[SO_SWK_11] == 50) { gActors[9].dmgType = DMG_COLLISION; - AUDIO_PLAY_SFX(NA_SE_EN_OUT_MAGMA, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_OUT_MAGMA, this->sfxSource, 4); } } } -void Solar_801A30CC(Boss* bossSO) { - bossSO->swork[SO_SWK_0] = 3; - bossSO->swork[SO_SWK_1] = 0; - bossSO->fwork[SO_FWK_0] = 0.1f; - bossSO->unk_04C = Animation_GetFrameCount(&D_SO_601388C) - 2; - bossSO->state = 0; - bossSO->swork[SO_SWK_11] = 15; +void Solar_801A30CC(BossSO* this) { + this->swork[SO_SWK_0] = 3; + this->swork[SO_SWK_1] = 0; + this->fwork[SO_FWK_0] = 0.1f; + this->unk_04C = Animation_GetFrameCount(&D_SO_601388C) - 2; + this->state = 0; + this->swork[SO_SWK_11] = 15; } -void Solar_801A3128(Boss* bossSO) { - if (bossSO->swork[SO_SWK_11] != 0) { - bossSO->swork[SO_SWK_11]--; +void Solar_801A3128(BossSO* this) { + if (this->swork[SO_SWK_11] != 0) { + this->swork[SO_SWK_11]--; } - if (bossSO->state == 0) { - if (bossSO->swork[SO_SWK_11] == 0) { - bossSO->unk_04C -= 2; + if (this->state == 0) { + if (this->swork[SO_SWK_11] == 0) { + this->unk_04C -= 2; - Math_SmoothStepToF(&bossSO->obj.pos.y, -1000.0f, 0.1f, 10.0f, 0.1f); + Math_SmoothStepToF(&this->obj.pos.y, -1000.0f, 0.1f, 10.0f, 0.1f); - if (bossSO->unk_04C == 50) { - Solar_801A0CEC(&gActors[10], bossSO->obj.pos.x, bossSO->obj.pos.z + 2000.0f, 10.0f, 1); + if (this->unk_04C == 50) { + Solar_801A0CEC(&gActors[10], this->obj.pos.x, this->obj.pos.z + 2000.0f, 10.0f, 1); } - if (bossSO->unk_04C == 40) { + if (this->unk_04C == 40) { gActors[10].dmgType = DMG_COLLISION; - AUDIO_PLAY_SFX(NA_SE_EN_IN_MAGMA, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_IN_MAGMA, this->sfxSource, 4); } - if (bossSO->unk_04C == 0) { - bossSO->state++; - bossSO->swork[SO_SWK_11] = 100; - bossSO->obj.pos.y = -500.0f; - bossSO->fwork[SO_FWK_3] = 2400.0f; - bossSO->obj.pos.z = gPlayer[0].trueZpos - 2100.0f; + if (this->unk_04C == 0) { + this->state++; + this->swork[SO_SWK_11] = 100; + this->obj.pos.y = -500.0f; + this->fwork[SO_FWK_3] = 2400.0f; + this->obj.pos.z = gPlayer[0].trueZpos - 2100.0f; } } else { - bossSO->unk_04C = Animation_GetFrameCount(&D_SO_601388C) - 2; + this->unk_04C = Animation_GetFrameCount(&D_SO_601388C) - 2; } } else { - if (bossSO->swork[SO_SWK_11] == 80) { - Solar_801A0CEC(&gActors[9], bossSO->obj.pos.x, bossSO->obj.pos.z + 850.0f, 20.0f, 1); + if (this->swork[SO_SWK_11] == 80) { + Solar_801A0CEC(&gActors[9], this->obj.pos.x, this->obj.pos.z + 850.0f, 20.0f, 1); gControllerRumbleFlags[gMainController] = 1; gControllerRumbleTimers[gMainController] = 70; @@ -1756,257 +1770,257 @@ void Solar_801A3128(Boss* bossSO) { } } - if (bossSO->swork[SO_SWK_11] == 0) { - bossSO->swork[SO_SWK_11] = 220; + if (this->swork[SO_SWK_11] == 0) { + this->swork[SO_SWK_11] = 220; } - if (bossSO->swork[SO_SWK_11] == 210) { - bossSO->unk_04C = 0; - bossSO->swork[SO_SWK_1] = 1; + if (this->swork[SO_SWK_11] == 210) { + this->unk_04C = 0; + this->swork[SO_SWK_1] = 1; } - if (bossSO->swork[SO_SWK_11] >= 100) { - Math_SmoothStepToF(&bossSO->obj.pos.y, 180.0f, 0.1f, 20.0f, 0.1f); + if (this->swork[SO_SWK_11] >= 100) { + Math_SmoothStepToF(&this->obj.pos.y, 180.0f, 0.1f, 20.0f, 0.1f); } - if (bossSO->swork[SO_SWK_11] == 150) { - Solar_801A239C(bossSO); - bossSO->fwork[SO_FWK_0] = 0.01f; - if ((Rand_ZeroOne() >= 0.4f) && (gTeamShields[TEAM_ID_PEPPY] > 0) && (bossSO->swork[SO_SWK_2] != 0) && - (bossSO->swork[SO_SWK_3] != 0)) { + if (this->swork[SO_SWK_11] == 150) { + Solar_801A239C(this); + this->fwork[SO_FWK_0] = 0.01f; + if ((Rand_ZeroOne() >= 0.4f) && (gTeamShields[TEAM_ID_PEPPY] > 0) && (this->swork[SO_SWK_2] != 0) && + (this->swork[SO_SWK_3] != 0)) { Radio_PlayMessage(gMsg_ID_10320, RCID_PEPPY); } } - if (bossSO->swork[SO_SWK_11] == 50) { + if (this->swork[SO_SWK_11] == 50) { gActors[9].dmgType = DMG_COLLISION; - AUDIO_PLAY_SFX(NA_SE_EN_OUT_MAGMA, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_OUT_MAGMA, this->sfxSource, 4); } } } -void Solar_801A3468(Boss* bossSO) { - bossSO->swork[SO_SWK_0] = 4; - bossSO->unk_048 = 0; +void Solar_801A3468(BossSO* this) { + this->swork[SO_SWK_0] = 4; + this->unk_048 = 0; - if ((bossSO->swork[SO_SWK_2] != 0) || (bossSO->swork[SO_SWK_3] != 0)) { - if (bossSO->swork[SO_SWK_3] != 0) { - bossSO->swork[SO_SWK_1] = 3; + if ((this->swork[SO_SWK_2] != 0) || (this->swork[SO_SWK_3] != 0)) { + if (this->swork[SO_SWK_3] != 0) { + this->swork[SO_SWK_1] = 3; } else { - bossSO->swork[SO_SWK_1] = 4; + this->swork[SO_SWK_1] = 4; } } else { if (Rand_ZeroOne() >= 0.5f) { - bossSO->unk_048 = 1; - bossSO->swork[SO_SWK_1] = 5; + this->unk_048 = 1; + this->swork[SO_SWK_1] = 5; } else { - bossSO->timer_050 = 0; - bossSO->swork[SO_SWK_1] = 8; + this->timer_050 = 0; + this->swork[SO_SWK_1] = 8; } } - bossSO->unk_04C = 0; - bossSO->fwork[SO_FWK_0] = 0.01f; + this->unk_04C = 0; + this->fwork[SO_FWK_0] = 0.01f; } -void Solar_801A3510(Boss* bossSO) { +void Solar_801A3510(BossSO* this) { s32 i; - switch (bossSO->swork[SO_SWK_1]) { + switch (this->swork[SO_SWK_1]) { case 3: - if ((bossSO->unk_04C == 119) || (bossSO->swork[SO_SWK_3] == 0)) { - bossSO->unk_04C = 0; - if (bossSO->swork[SO_SWK_2] != 0) { - bossSO->swork[SO_SWK_1] = 4; + if ((this->unk_04C == 119) || (this->swork[SO_SWK_3] == 0)) { + this->unk_04C = 0; + if (this->swork[SO_SWK_2] != 0) { + this->swork[SO_SWK_1] = 4; } else { - bossSO->swork[SO_SWK_1] = 5; + this->swork[SO_SWK_1] = 5; } } - if (bossSO->unk_04C == 29) { - Object_SetSfxSourceToPos(bossSO->sfxSource, &bossSO->obj.pos); - AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, bossSO->sfxSource, 4); + if (this->unk_04C == 29) { + Object_SetSfxSourceToPos(this->sfxSource, &this->obj.pos); + AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, this->sfxSource, 4); } - if (bossSO->unk_04C == 80) { - AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_SWING, bossSO->sfxSource, 4); + if (this->unk_04C == 80) { + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_SWING, this->sfxSource, 4); } - if (bossSO->unk_04C == 94) { - Solar_801A0DF8(bossSO->fwork[SO_FWK_13], bossSO->fwork[SO_FWK_15], RAND_FLOAT_CENTERED(60.0f), 4, 2.0f); - bossSO->timer_050 = 90; + if (this->unk_04C == 94) { + Solar_801A0DF8(this->fwork[SO_FWK_13], this->fwork[SO_FWK_15], RAND_FLOAT_CENTERED(60.0f), 4, 2.0f); + this->timer_050 = 90; } break; case 4: - if ((bossSO->unk_04C == 99) || (bossSO->swork[SO_SWK_2] == 0)) { - bossSO->unk_04C = 0; - bossSO->swork[SO_SWK_1] = 5; + if ((this->unk_04C == 99) || (this->swork[SO_SWK_2] == 0)) { + this->unk_04C = 0; + this->swork[SO_SWK_1] = 5; } - Math_SmoothStepToAngle(&bossSO->obj.rot.x, 20.0f, 0.1f, 10.0f, 0.1f); + Math_SmoothStepToAngle(&this->obj.rot.x, 20.0f, 0.1f, 10.0f, 0.1f); - if (bossSO->unk_04C == 10) { - Object_SetSfxSourceToPos(bossSO->sfxSource, &bossSO->obj.pos); - AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, bossSO->sfxSource, 4); + if (this->unk_04C == 10) { + Object_SetSfxSourceToPos(this->sfxSource, &this->obj.pos); + AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, this->sfxSource, 4); } - if (bossSO->unk_04C == 50) { - AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_SWING, bossSO->sfxSource, 4); + if (this->unk_04C == 50) { + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_SWING, this->sfxSource, 4); } - if (bossSO->unk_04C == 60) { - Solar_801A0D90(bossSO->obj.pos.x, bossSO->obj.pos.z + 1600.0f, 80.0f, 2); + if (this->unk_04C == 60) { + Solar_801A0D90(this->obj.pos.x, this->obj.pos.z + 1600.0f, 80.0f, 2); gControllerRumbleFlags[gMainController] = 1; gControllerRumbleTimers[gMainController] = 100; } break; case 5: - Math_SmoothStepToAngle(&bossSO->obj.rot.x, 0.0f, 0.1f, 10.0f, 0.1f); - if (bossSO->unk_04C == 65) { + Math_SmoothStepToAngle(&this->obj.rot.x, 0.0f, 0.1f, 10.0f, 0.1f); + if (this->unk_04C == 65) { for (i = 0; i < 4; i++) { - Solar_8019F194(bossSO->obj.pos.x, bossSO->obj.pos.y + 300.0f, bossSO->obj.pos.z + 1000.0f, + Solar_8019F194(this->obj.pos.x, this->obj.pos.y + 300.0f, this->obj.pos.z + 1000.0f, D_i3_801BF8F0[i].x + RAND_FLOAT_CENTERED(0.25f), D_i3_801BF8F0[i].y + RAND_FLOAT_CENTERED(0.25f), RAND_FLOAT(10.0f) + 100.0f); } } - if ((bossSO->unk_048 != 0) && (bossSO->unk_04C == 68)) { - bossSO->swork[SO_SWK_1] = 9; - bossSO->fwork[SO_FWK_0] = 0.01f; - bossSO->unk_04C = 20; + if ((this->unk_048 != 0) && (this->unk_04C == 68)) { + this->swork[SO_SWK_1] = 9; + this->fwork[SO_FWK_0] = 0.01f; + this->unk_04C = 20; } - if (bossSO->unk_04C == 99) { - Solar_801A30CC(bossSO); + if (this->unk_04C == 99) { + Solar_801A30CC(this); } break; case 8: - if (bossSO->unk_04C == 65) { - AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_BREATH, bossSO->sfxSource, 4); - bossSO->timer_050 = 30; + if (this->unk_04C == 65) { + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_BREATH, this->sfxSource, 4); + this->timer_050 = 30; } - if (bossSO->timer_050 != 0) { - bossSO->unk_04C = 65; + if (this->timer_050 != 0) { + this->unk_04C = 65; } - if ((bossSO->unk_04C == 65) && (gGameFrameCount % 2) == 0) { - Solar_8019FFC0(bossSO, bossSO->fwork[SO_FWK_4], bossSO->fwork[SO_FWK_5] - 100.0f, - bossSO->fwork[SO_FWK_6] + 600.0f, (bossSO->timer_050 * 0.2f) + 4.0f, 0); - Solar_801A1EB0(bossSO, bossSO->fwork[SO_FWK_4], 25.0f, bossSO->fwork[SO_FWK_5] - 100.0f, - bossSO->fwork[SO_FWK_6] + 300.0f); + if ((this->unk_04C == 65) && (gGameFrameCount % 2) == 0) { + Solar_8019FFC0(this, this->fwork[SO_FWK_4], this->fwork[SO_FWK_5] - 100.0f, + this->fwork[SO_FWK_6] + 600.0f, (this->timer_050 * 0.2f) + 4.0f, 0); + Solar_801A1EB0(this, this->fwork[SO_FWK_4], 25.0f, this->fwork[SO_FWK_5] - 100.0f, + this->fwork[SO_FWK_6] + 300.0f); } - if (bossSO->unk_04C == 75) { - Audio_KillSfxBySourceAndId(bossSO->sfxSource, NA_SE_EN_SOBOSS_BREATH); + if (this->unk_04C == 75) { + Audio_KillSfxBySourceAndId(this->sfxSource, NA_SE_EN_SOBOSS_BREATH); } - if (bossSO->unk_04C == 99) { - bossSO->swork[SO_SWK_1] = 5; - bossSO->unk_04C = 0; + if (this->unk_04C == 99) { + this->swork[SO_SWK_1] = 5; + this->unk_04C = 0; } break; case 9: - bossSO->unk_04C++; - if (bossSO->unk_04C == 66) { - AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_BREATH, bossSO->sfxSource, 4); - bossSO->timer_050 = 30; + this->unk_04C++; + if (this->unk_04C == 66) { + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_BREATH, this->sfxSource, 4); + this->timer_050 = 30; } - if (bossSO->timer_050 != 0) { - bossSO->unk_04C = 66; + if (this->timer_050 != 0) { + this->unk_04C = 66; } - if ((bossSO->unk_04C == 66) && ((gGameFrameCount % 2) == 0)) { - Solar_8019FFC0(bossSO, bossSO->fwork[SO_FWK_4] + 125.0f, bossSO->fwork[SO_FWK_5] - 100.0f, - bossSO->fwork[SO_FWK_6] + 600.0f, (bossSO->timer_050 * 0.2f) + 4.0f, 1); - Solar_8019FFC0(bossSO, bossSO->fwork[SO_FWK_4] - 125.0f, bossSO->fwork[SO_FWK_5] - 100.0f, - bossSO->fwork[SO_FWK_6] + 600.0f, (bossSO->timer_050 * 0.2f) + 4.0f, 2); - Solar_801A1EB0(bossSO, bossSO->fwork[SO_FWK_4], 25.0f, bossSO->fwork[SO_FWK_5] - 100.0f, - bossSO->fwork[SO_FWK_6] + 300.0f); + if ((this->unk_04C == 66) && ((gGameFrameCount % 2) == 0)) { + Solar_8019FFC0(this, this->fwork[SO_FWK_4] + 125.0f, this->fwork[SO_FWK_5] - 100.0f, + this->fwork[SO_FWK_6] + 600.0f, (this->timer_050 * 0.2f) + 4.0f, 1); + Solar_8019FFC0(this, this->fwork[SO_FWK_4] - 125.0f, this->fwork[SO_FWK_5] - 100.0f, + this->fwork[SO_FWK_6] + 600.0f, (this->timer_050 * 0.2f) + 4.0f, 2); + Solar_801A1EB0(this, this->fwork[SO_FWK_4], 25.0f, this->fwork[SO_FWK_5] - 100.0f, + this->fwork[SO_FWK_6] + 300.0f); } - if (bossSO->unk_04C == 76) { - Audio_KillSfxBySourceAndId(bossSO->sfxSource, NA_SE_EN_SOBOSS_BREATH); + if (this->unk_04C == 76) { + Audio_KillSfxBySourceAndId(this->sfxSource, NA_SE_EN_SOBOSS_BREATH); } - if (bossSO->unk_04C >= 99) { - Solar_801A30CC(bossSO); + if (this->unk_04C >= 99) { + Solar_801A30CC(this); } break; } - if (bossSO->timer_050 == 0) { + if (this->timer_050 == 0) { Object_Kill(&gActors[6].obj, gActors[6].sfxSource); } else { Math_SmoothStepToF(&gActors[6].obj.pos.x, gPlayer[0].pos.x, 0.1f, 10.0f, 0.1f); } } -void Solar_801A3C4C(Boss* bossSO) { +void Solar_801A3C4C(BossSO* this) { s32 i; - if ((bossSO->swork[SO_SWK_2] == 0) && (bossSO->swork[SO_SWK_3] == 0) && - ((bossSO->dmgPart == 8) || (bossSO->dmgPart == -1))) { - bossSO->health -= bossSO->damage; - if (bossSO->health < 0) { - bossSO->health = 0; + if ((this->swork[SO_SWK_2] == 0) && (this->swork[SO_SWK_3] == 0) && + ((this->dmgPart == 8) || (this->dmgPart == -1))) { + this->health -= this->damage; + if (this->health < 0) { + this->health = 0; } - bossSO->swork[SO_SWK_10] = 20; - if (bossSO->health > 0.0f) { - AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_DAMAGE, bossSO->sfxSource, 4); + this->swork[SO_SWK_10] = 20; + if (this->health > 0.0f) { + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_DAMAGE, this->sfxSource, 4); } - if (bossSO) {} + if (this) {} //! FAKE } - bossSO->timer_058 = 20; + this->timer_058 = 20; - if ((bossSO->dmgPart >= 1) && (bossSO->dmgPart <= 3) && (bossSO->swork[SO_SWK_2] != 0)) { - AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_DAMAGE, bossSO->sfxSource, 4); + if ((this->dmgPart >= 1) && (this->dmgPart <= 3) && (this->swork[SO_SWK_2] != 0)) { + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_DAMAGE, this->sfxSource, 4); - bossSO->swork[SO_SWK_2] -= bossSO->damage; - if (bossSO->swork[SO_SWK_2] < 0) { - bossSO->swork[SO_SWK_2] = 0; + this->swork[SO_SWK_2] -= this->damage; + if (this->swork[SO_SWK_2] < 0) { + this->swork[SO_SWK_2] = 0; } - if (bossSO->swork[SO_SWK_2] == 0) { + if (this->swork[SO_SWK_2] == 0) { for (i = 0; i < 6; i++) { - bossSO->info.hitbox[7 + i] = bossSO->info.hitbox[13 + i] = bossSO->info.hitbox[19 + i] = 0.0f; + this->info.hitbox[7 + i] = this->info.hitbox[13 + i] = this->info.hitbox[19 + i] = 0.0f; } - bossSO->swork[SO_SWK_2] = -1; - Solar_801A48B8(bossSO); + this->swork[SO_SWK_2] = -1; + Solar_801A48B8(this); } else { - bossSO->swork[SO_SWK_8] = 20; + this->swork[SO_SWK_8] = 20; } } - if ((bossSO->dmgPart >= 4) && (bossSO->dmgPart <= 6) && (bossSO->swork[SO_SWK_3] != 0)) { - AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_DAMAGE, bossSO->sfxSource, 4); + if ((this->dmgPart >= 4) && (this->dmgPart <= 6) && (this->swork[SO_SWK_3] != 0)) { + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_DAMAGE, this->sfxSource, 4); - bossSO->swork[SO_SWK_3] -= bossSO->damage; - if (bossSO->swork[SO_SWK_3] < 0) { - bossSO->swork[SO_SWK_3] = 0; + this->swork[SO_SWK_3] -= this->damage; + if (this->swork[SO_SWK_3] < 0) { + this->swork[SO_SWK_3] = 0; } - if (bossSO->swork[SO_SWK_3] == 0) { + if (this->swork[SO_SWK_3] == 0) { for (i = 0; i < 6; i++) { - bossSO->info.hitbox[25 + i] = bossSO->info.hitbox[31 + i] = bossSO->info.hitbox[37 + i] = 0.0f; + this->info.hitbox[25 + i] = this->info.hitbox[31 + i] = this->info.hitbox[37 + i] = 0.0f; } - bossSO->swork[SO_SWK_3] = -1; - Solar_801A48B8(bossSO); + this->swork[SO_SWK_3] = -1; + Solar_801A48B8(this); } else { - bossSO->swork[SO_SWK_9] = 20; + this->swork[SO_SWK_9] = 20; } } - if (bossSO->health <= 0) { - bossSO->unk_04C = 21; - bossSO->state = 0; - bossSO->swork[SO_SWK_1] = 1; - bossSO->fwork[SO_FWK_0] = 0.01f; - bossSO->info.hitbox = SEGMENTED_TO_VIRTUAL(gNoHitbox); - bossSO->timer_058 = 20000; + if (this->health <= 0) { + this->unk_04C = 21; + this->state = 0; + this->swork[SO_SWK_1] = 1; + this->fwork[SO_FWK_0] = 0.01f; + this->info.hitbox = SEGMENTED_TO_VIRTUAL(gNoHitbox); + this->timer_058 = 20000; gTeamLowHealthMsgTimer = -1; @@ -2024,7 +2038,7 @@ void Solar_801A3C4C(Boss* bossSO) { Audio_KillSfxById(NA_SE_OVERHEAT_ALARM); - AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, this->sfxSource, 4); if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; @@ -2040,31 +2054,31 @@ void Solar_801A3C4C(Boss* bossSO) { } gPlayer[0].yRot_114 = 0.0f; } - bossSO->fwork[SO_FWK_31] = 0.0f; - bossSO->fwork[SO_FWK_3] = 2400.0f; + this->fwork[SO_FWK_31] = 0.0f; + this->fwork[SO_FWK_3] = 2400.0f; Radio_PlayMessage(gMsg_ID_15252, RCID_SLIPPY); } } -void Solar_801A4214(Boss* bossSO) { +void Solar_801A4214(BossSO* this) { s32 i; Vec3f sp50; Vec3f sp44; - if (bossSO->health > 0) { + if (this->health > 0) { return; } - Math_SmoothStepToAngle(&bossSO->obj.rot.y, 0.0f, 0.1f, 3.0f, 0.0f); - Math_SmoothStepToAngle(&bossSO->obj.rot.x, 0.0f, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToAngle(&this->obj.rot.y, 0.0f, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToAngle(&this->obj.rot.x, 0.0f, 0.1f, 3.0f, 0.0f); - if ((bossSO->unk_04C == 52) && (bossSO->swork[SO_SWK_1] == 5)) { - bossSO->unk_04C = 38; - bossSO->fwork[SO_FWK_0] = 0.05f; + if ((this->unk_04C == 52) && (this->swork[SO_SWK_1] == 5)) { + this->unk_04C = 38; + this->fwork[SO_FWK_0] = 0.05f; } - Matrix_RotateX(gCalcMatrix, bossSO->fwork[SO_FWK_1] * M_DTOR, MTXF_NEW); - Matrix_RotateY(gCalcMatrix, -bossSO->fwork[SO_FWK_2] * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, this->fwork[SO_FWK_1] * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, -this->fwork[SO_FWK_2] * M_DTOR, MTXF_APPLY); sp50.x = 0.0f; sp50.y = 200.0f; @@ -2072,38 +2086,38 @@ void Solar_801A4214(Boss* bossSO) { Matrix_MultVec3f(gCalcMatrix, &sp50, &sp44); - if (bossSO->state >= 2) { + if (this->state >= 2) { Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 30.0f, 1.0f, 2.5f, 0.0f); } - switch (bossSO->state) { + switch (this->state) { case 0: if (D_i3_801C2740[0] >= 33) { D_i3_801C2740[0] -= 3; } - if (bossSO->timer_058 == 19910) { - bossSO->state++; - bossSO->swork[SO_SWK_1] = 5; - bossSO->unk_04C = 0; - bossSO->fwork[SO_FWK_0] = 0.05f; + if (this->timer_058 == 19910) { + this->state++; + this->swork[SO_SWK_1] = 5; + this->unk_04C = 0; + this->fwork[SO_FWK_0] = 0.05f; } - Math_SmoothStepToF(&bossSO->obj.pos.y, 180.0f, 0.1f, 10.0f, 0.1f); + Math_SmoothStepToF(&this->obj.pos.y, 180.0f, 0.1f, 10.0f, 0.1f); break; case 1: - if (bossSO->unk_04C == 51) { - bossSO->unk_04C = 50; - bossSO->state++; + if (this->unk_04C == 51) { + this->unk_04C = 50; + this->state++; gShowBossHealth = false; - AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_DOWN, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_DOWN, this->sfxSource, 4); - Solar_801A1E14(bossSO->fwork[SO_FWK_4], bossSO->fwork[SO_FWK_5] + 300.0f, bossSO->fwork[SO_FWK_6], - bossSO->fwork[SO_FWK_1], bossSO->fwork[SO_FWK_2], 73.0f, RAND_FLOAT_CENTERED(50.0f), - 80.0f, 40.0f, 8); + Solar_801A1E14(this->fwork[SO_FWK_4], this->fwork[SO_FWK_5] + 300.0f, this->fwork[SO_FWK_6], + this->fwork[SO_FWK_1], this->fwork[SO_FWK_2], 73.0f, RAND_FLOAT_CENTERED(50.0f), 80.0f, + 40.0f, 8); D_i3_801C2768[3] = 6.0f; D_i3_801C2768[2] = 100.0f; @@ -2115,11 +2129,11 @@ void Solar_801A4214(Boss* bossSO) { gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 4; - Boss_AwardBonus(bossSO); + Boss_AwardBonus(this); - bossSO->swork[SO_SWK_4]++; + this->swork[SO_SWK_4]++; - Math_SmoothStepToF(&bossSO->obj.pos.y, 180.0f, 0.1f, 10.0f, 0.1f); + Math_SmoothStepToF(&this->obj.pos.y, 180.0f, 0.1f, 10.0f, 0.1f); } break; @@ -2128,10 +2142,10 @@ void Solar_801A4214(Boss* bossSO) { D_i3_801C2740[0] -= 3; } if (D_i3_801C2740[1] >= 33) { - Math_SmoothStepToF(&bossSO->obj.pos.y, 180.0f, 0.1f, 10.0f, 0.1f); + Math_SmoothStepToF(&this->obj.pos.y, 180.0f, 0.1f, 10.0f, 0.1f); D_i3_801C2740[1] -= 4; } else { - bossSO->state++; + this->state++; } break; @@ -2176,42 +2190,42 @@ void Solar_801A4214(Boss* bossSO) { } if (gCsFrameCount == 250) { - bossSO->state++; - bossSO->obj.pos.y = -1600.0f; + this->state++; + this->obj.pos.y = -1600.0f; for (i = 0; i < 2; i++) { if (gEffects[i].obj.status != OBJ_FREE) { Object_Kill(&gEffects[i].obj, gEffects[i].sfxSource); } } - bossSO->timer_058 = 100; + this->timer_058 = 100; } break; case 4: - if (bossSO->timer_058 == 1) { + if (this->timer_058 == 1) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 80); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 80); - Object_Kill(&bossSO->obj, bossSO->sfxSource); + Object_Kill(&this->obj, this->sfxSource); } break; } } -void Solar_801A48B8(Boss* bossSO) { +void Solar_801A48B8(BossSO* this) { s32 i; - AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_BROKEN, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_BROKEN, this->sfxSource, 4); gControllerRumbleFlags[gMainController] = 1; gControllerRumbleTimers[gMainController] = 10; - if (bossSO->swork[SO_SWK_0] != 6) { - bossSO->swork[SO_SWK_5] = bossSO->swork[SO_SWK_0]; - bossSO->swork[SO_SWK_6] = bossSO->swork[SO_SWK_1]; - bossSO->swork[SO_SWK_7] = bossSO->unk_04C; + if (this->swork[SO_SWK_0] != 6) { + this->swork[SO_SWK_5] = this->swork[SO_SWK_0]; + this->swork[SO_SWK_6] = this->swork[SO_SWK_1]; + this->swork[SO_SWK_7] = this->unk_04C; } - if ((bossSO->swork[SO_SWK_0] == 4) && (bossSO->unk_04C >= 60) && (bossSO->unk_04C < 67)) { + if ((this->swork[SO_SWK_0] == 4) && (this->unk_04C >= 60) && (this->unk_04C < 67)) { for (i = 4; i < ARRAY_COUNT(gActors); i++) { if (gActors[i].obj.id == OBJ_ACTOR_278) { gActors[i].dmgType = DMG_EXPLOSION; @@ -2223,319 +2237,320 @@ void Solar_801A48B8(Boss* bossSO) { gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 64; - bossSO->swork[SO_SWK_0] = 6; - bossSO->swork[SO_SWK_1] = 6; - bossSO->unk_04C = 0; - bossSO->fwork[SO_FWK_0] = 0.01f; + this->swork[SO_SWK_0] = 6; + this->swork[SO_SWK_1] = 6; + this->unk_04C = 0; + this->fwork[SO_FWK_0] = 0.01f; - if (((bossSO->swork[SO_SWK_2] > 0) || (bossSO->swork[SO_SWK_3] > 0)) && (gTeamShields[TEAM_ID_SLIPPY] > 0)) { + if (((this->swork[SO_SWK_2] > 0) || (this->swork[SO_SWK_3] > 0)) && (gTeamShields[TEAM_ID_SLIPPY] > 0)) { Radio_PlayMessage(gMsg_ID_7086, RCID_SLIPPY); } } -void Solar_801A4A34(Boss* bossSO) { - if (bossSO->swork[SO_SWK_2] < 0) { - bossSO->swork[SO_SWK_2] = 0; - Solar_801A1E14(bossSO->fwork[SO_FWK_28], bossSO->fwork[SO_FWK_29], bossSO->fwork[SO_FWK_30], - bossSO->fwork[SO_FWK_41], bossSO->fwork[SO_FWK_42], bossSO->fwork[SO_FWK_43], - RAND_FLOAT(-25.0f) - 10.0f, RAND_FLOAT(25.0f) + 30.0f, RAND_FLOAT_CENTERED(25.0f) - 50.0f, 0); - Solar_801A1E14(bossSO->fwork[SO_FWK_22], bossSO->fwork[SO_FWK_23], bossSO->fwork[SO_FWK_24], - bossSO->fwork[SO_FWK_47], bossSO->fwork[SO_FWK_48], bossSO->fwork[SO_FWK_49], - RAND_FLOAT(-25.0f) - 10.0f, RAND_FLOAT(25.0f) + 30.0f, RAND_FLOAT_CENTERED(25.0f) - 50.0f, 1); - Solar_801A1E14(bossSO->fwork[SO_FWK_10], bossSO->fwork[SO_FWK_11], bossSO->fwork[SO_FWK_12], - bossSO->fwork[SO_FWK_35], bossSO->fwork[SO_FWK_36], bossSO->fwork[SO_FWK_37], - RAND_FLOAT(-25.0f) - 10.0f, RAND_FLOAT(25.0f) + 30.0f, RAND_FLOAT_CENTERED(25.0f) - 50.0f, 2); +void Solar_801A4A34(BossSO* this) { + if (this->swork[SO_SWK_2] < 0) { + this->swork[SO_SWK_2] = 0; + Solar_801A1E14(this->fwork[SO_FWK_28], this->fwork[SO_FWK_29], this->fwork[SO_FWK_30], this->fwork[SO_FWK_41], + this->fwork[SO_FWK_42], this->fwork[SO_FWK_43], RAND_FLOAT(-25.0f) - 10.0f, + RAND_FLOAT(25.0f) + 30.0f, RAND_FLOAT_CENTERED(25.0f) - 50.0f, 0); + Solar_801A1E14(this->fwork[SO_FWK_22], this->fwork[SO_FWK_23], this->fwork[SO_FWK_24], this->fwork[SO_FWK_47], + this->fwork[SO_FWK_48], this->fwork[SO_FWK_49], RAND_FLOAT(-25.0f) - 10.0f, + RAND_FLOAT(25.0f) + 30.0f, RAND_FLOAT_CENTERED(25.0f) - 50.0f, 1); + Solar_801A1E14(this->fwork[SO_FWK_10], this->fwork[SO_FWK_11], this->fwork[SO_FWK_12], this->fwork[SO_FWK_35], + this->fwork[SO_FWK_36], this->fwork[SO_FWK_37], RAND_FLOAT(-25.0f) - 10.0f, + RAND_FLOAT(25.0f) + 30.0f, RAND_FLOAT_CENTERED(25.0f) - 50.0f, 2); } - if (bossSO->swork[SO_SWK_3] < 0) { - bossSO->swork[SO_SWK_3] = 0; - Solar_801A1E14(bossSO->fwork[SO_FWK_25], bossSO->fwork[SO_FWK_26], bossSO->fwork[SO_FWK_27], - bossSO->fwork[SO_FWK_38], bossSO->fwork[SO_FWK_39], bossSO->fwork[SO_FWK_40], - RAND_FLOAT(25.0f) + 10.0f, RAND_FLOAT(25.0f) + 30.0f, RAND_FLOAT_CENTERED(25.0f) - 50.0f, 5); - Solar_801A1E14(bossSO->fwork[SO_FWK_19], bossSO->fwork[SO_FWK_20], bossSO->fwork[SO_FWK_21], - bossSO->fwork[SO_FWK_44], bossSO->fwork[SO_FWK_45], bossSO->fwork[SO_FWK_46], - RAND_FLOAT(25.0f) + 10.0f, RAND_FLOAT(25.0f) + 30.0f, RAND_FLOAT_CENTERED(25.0f) - 50.0f, 4); - Solar_801A1E14(bossSO->fwork[SO_FWK_7], bossSO->fwork[SO_FWK_8], bossSO->fwork[SO_FWK_9], - bossSO->fwork[SO_FWK_32], bossSO->fwork[SO_FWK_33], bossSO->fwork[SO_FWK_34], - RAND_FLOAT(25.0f) + 10.0f, RAND_FLOAT(25.0f) + 30.0f, RAND_FLOAT_CENTERED(25.0f) - 50.0f, 3); + if (this->swork[SO_SWK_3] < 0) { + this->swork[SO_SWK_3] = 0; + Solar_801A1E14(this->fwork[SO_FWK_25], this->fwork[SO_FWK_26], this->fwork[SO_FWK_27], this->fwork[SO_FWK_38], + this->fwork[SO_FWK_39], this->fwork[SO_FWK_40], RAND_FLOAT(25.0f) + 10.0f, + RAND_FLOAT(25.0f) + 30.0f, RAND_FLOAT_CENTERED(25.0f) - 50.0f, 5); + Solar_801A1E14(this->fwork[SO_FWK_19], this->fwork[SO_FWK_20], this->fwork[SO_FWK_21], this->fwork[SO_FWK_44], + this->fwork[SO_FWK_45], this->fwork[SO_FWK_46], RAND_FLOAT(25.0f) + 10.0f, + RAND_FLOAT(25.0f) + 30.0f, RAND_FLOAT_CENTERED(25.0f) - 50.0f, 4); + Solar_801A1E14(this->fwork[SO_FWK_7], this->fwork[SO_FWK_8], this->fwork[SO_FWK_9], this->fwork[SO_FWK_32], + this->fwork[SO_FWK_33], this->fwork[SO_FWK_34], RAND_FLOAT(25.0f) + 10.0f, + RAND_FLOAT(25.0f) + 30.0f, RAND_FLOAT_CENTERED(25.0f) - 50.0f, 3); } - switch (bossSO->unk_04C) { + switch (this->unk_04C) { case 30: - AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_DAMAGE, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_DAMAGE, this->sfxSource, 4); /* fallthrough */ case 35: case 97: - AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_BROKEN, bossSO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_BROKEN, this->sfxSource, 4); break; } - if (bossSO->unk_04C == 119) { - bossSO->swork[SO_SWK_0] = bossSO->swork[SO_SWK_5]; - bossSO->swork[SO_SWK_1] = bossSO->swork[SO_SWK_6]; - if ((bossSO->swork[SO_SWK_5] == 2) || (bossSO->swork[SO_SWK_5] == 3)) { - bossSO->unk_04C = bossSO->swork[SO_SWK_7]; + if (this->unk_04C == 119) { + this->swork[SO_SWK_0] = this->swork[SO_SWK_5]; + this->swork[SO_SWK_1] = this->swork[SO_SWK_6]; + if ((this->swork[SO_SWK_5] == 2) || (this->swork[SO_SWK_5] == 3)) { + this->unk_04C = this->swork[SO_SWK_7]; } else { - bossSO->unk_04C = 0; + this->unk_04C = 0; } - bossSO->fwork[SO_FWK_0] = 0.01f; + this->fwork[SO_FWK_0] = 0.01f; } } -void Solar_801A4EC0(Boss* bossSO) { - bossSO->swork[SO_SWK_0] = 7; - bossSO->swork[SO_SWK_1] = 5; - bossSO->fwork[SO_FWK_0] = 0.01f; - bossSO->unk_04C = 0; - bossSO->state = 0; - bossSO->fwork[SO_FWK_31] = bossSO->obj.rot.y = 0.0f; +void Solar_801A4EC0(BossSO* this) { + this->swork[SO_SWK_0] = 7; + this->swork[SO_SWK_1] = 5; + this->fwork[SO_FWK_0] = 0.01f; + this->unk_04C = 0; + this->state = 0; + this->fwork[SO_FWK_31] = this->obj.rot.y = 0.0f; } -void Solar_801A4EF8(Boss* bossSO) { +void Solar_801A4EF8(BossSO* this) { s32 i; - if (bossSO->swork[SO_SWK_11] != 0) { - bossSO->swork[SO_SWK_11]--; + if (this->swork[SO_SWK_11] != 0) { + this->swork[SO_SWK_11]--; } - switch (bossSO->state) { + switch (this->state) { case 0: - bossSO->unk_04C = 0; - if (bossSO->fwork[SO_FWK_31] > 20.0f) { - bossSO->state++; - bossSO->swork[SO_SWK_11] = 108; - bossSO->fwork[SO_FWK_0] = 0.01f; - bossSO->unk_04C = 56; + this->unk_04C = 0; + if (this->fwork[SO_FWK_31] > 20.0f) { + this->state++; + this->swork[SO_SWK_11] = 108; + this->fwork[SO_FWK_0] = 0.01f; + this->unk_04C = 56; } - if (bossSO->obj.rot.y == 0.0f) { - AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_ROLL, bossSO->sfxSource, 4); + if (this->obj.rot.y == 0.0f) { + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_ROLL, this->sfxSource, 4); } - bossSO->fwork[SO_FWK_31] += 0.5f; - bossSO->obj.rot.y += bossSO->fwork[SO_FWK_31]; - if (bossSO->obj.rot.y >= 360.0f) { - bossSO->obj.rot.y -= 360.0f; - AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_ROLL, bossSO->sfxSource, 4); + this->fwork[SO_FWK_31] += 0.5f; + + this->obj.rot.y += this->fwork[SO_FWK_31]; + if (this->obj.rot.y >= 360.0f) { + this->obj.rot.y -= 360.0f; + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_ROLL, this->sfxSource, 4); } - bossSO->rot_078.y = bossSO->obj.rot.y; + this->rot_078.y = this->obj.rot.y; break; case 1: - bossSO->obj.rot.y += bossSO->fwork[SO_FWK_31]; - bossSO->unk_04C = 56; - if (bossSO->obj.rot.y >= 360.0f) { - bossSO->obj.rot.y -= 360.0f; - AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_ROLL, bossSO->sfxSource, 4); + this->obj.rot.y += this->fwork[SO_FWK_31]; + this->unk_04C = 56; + if (this->obj.rot.y >= 360.0f) { + this->obj.rot.y -= 360.0f; + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_ROLL, this->sfxSource, 4); } - if (bossSO->swork[SO_SWK_11] <= 45) { - Math_SmoothStepToF(&bossSO->obj.pos.y, -1000.0f, 0.1f, 20.0f, 0.1f); + if (this->swork[SO_SWK_11] <= 45) { + Math_SmoothStepToF(&this->obj.pos.y, -1000.0f, 0.1f, 20.0f, 0.1f); } - if (bossSO->swork[SO_SWK_11] == 30) { - Solar_801A0CEC(&gActors[10], bossSO->obj.pos.x, bossSO->obj.pos.z + 1000.0f, 20.0f, 1); + if (this->swork[SO_SWK_11] == 30) { + Solar_801A0CEC(&gActors[10], this->obj.pos.x, this->obj.pos.z + 1000.0f, 20.0f, 1); gControllerRumbleFlags[gMainController] = 1; gControllerRumbleTimers[gMainController] = 70; for (i = 0; i < 4; i++) { - Solar_8019F038(bossSO->obj.pos.x + 100.0f, 100.0f, bossSO->obj.pos.z + 1100.0f, + Solar_8019F038(this->obj.pos.x + 100.0f, 100.0f, this->obj.pos.z + 1100.0f, D_i3_801BF8F0[i].x + RAND_FLOAT_CENTERED(2.0f), D_i3_801BF8F0[i].y + 10.0f + RAND_FLOAT_CENTERED(2.0f), RAND_FLOAT(-10.0f) - 10.0f); - Solar_8019F038(bossSO->obj.pos.x - 100.0f, 100.0f, bossSO->obj.pos.z + 1100.0f, + Solar_8019F038(this->obj.pos.x - 100.0f, 100.0f, this->obj.pos.z + 1100.0f, D_i3_801BF8F0[i].x + RAND_FLOAT_CENTERED(2.0f), D_i3_801BF8F0[i].y + 10.0f + RAND_FLOAT_CENTERED(2.0f), RAND_FLOAT(-10.0f) - 10.0f); } } - if (bossSO->swork[SO_SWK_11] == 16) { + if (this->swork[SO_SWK_11] == 16) { gActors[10].dmgType = DMG_EXPLOSION; } - if (bossSO->obj.pos.y <= -900.0f) { - bossSO->state++; - bossSO->swork[SO_SWK_11] = 500; - bossSO->obj.pos.y = -1500.0f; - bossSO->fwork[SO_FWK_3] = 4800.0f; - bossSO->obj.pos.z = gPlayer[0].trueZpos - bossSO->fwork[SO_FWK_3]; - bossSO->swork[SO_SWK_1] = 0; - bossSO->rot_078.y = bossSO->obj.rot.y = 0.0f; - bossSO->vel.y = 0.0f; - bossSO->obj.rot.x = 0.0f; + if (this->obj.pos.y <= -900.0f) { + this->state++; + this->swork[SO_SWK_11] = 500; + this->obj.pos.y = -1500.0f; + this->fwork[SO_FWK_3] = 4800.0f; + this->obj.pos.z = gPlayer[0].trueZpos - this->fwork[SO_FWK_3]; + this->swork[SO_SWK_1] = 0; + this->rot_078.y = this->obj.rot.y = 0.0f; + this->vel.y = 0.0f; + this->obj.rot.x = 0.0f; } - bossSO->rot_078.y = bossSO->obj.rot.y; + this->rot_078.y = this->obj.rot.y; break; case 2: - bossSO->unk_04C = 0; + this->unk_04C = 0; - if (bossSO->swork[SO_SWK_11] == 300) { + if (this->swork[SO_SWK_11] == 300) { gControllerRumbleFlags[gMainController] = 1; gControllerRumbleTimers[gMainController] = 170; gCameraShake = 130; } - if (bossSO->swork[SO_SWK_11] == 200) { - Solar_801A0CEC(&gActors[9], bossSO->obj.pos.x, bossSO->obj.pos.z + 1000.0f, 20.0f, 1); + if (this->swork[SO_SWK_11] == 200) { + Solar_801A0CEC(&gActors[9], this->obj.pos.x, this->obj.pos.z + 1000.0f, 20.0f, 1); } - if (bossSO->swork[SO_SWK_11] < 200) { - bossSO->unk_04C = 98; - bossSO->rot_078.y += bossSO->fwork[SO_FWK_31]; + if (this->swork[SO_SWK_11] < 200) { + this->unk_04C = 98; + this->rot_078.y += this->fwork[SO_FWK_31]; - if (bossSO->swork[SO_SWK_11] == 170) { - AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_CRY, bossSO->sfxSource, 4); - bossSO->obj.pos.y = -500.0f; + if (this->swork[SO_SWK_11] == 170) { + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_CRY, this->sfxSource, 4); + this->obj.pos.y = -500.0f; gActors[9].dmgType = DMG_EXPLOSION; } - if (bossSO->swork[SO_SWK_11] <= 170) { - bossSO->vel.y = COS_DEG(bossSO->obj.rot.x) * 80.0f; - bossSO->vel.z = (SIN_DEG(bossSO->obj.rot.x) * 30.0f) + gPlayer[0].vel.z; + if (this->swork[SO_SWK_11] <= 170) { + this->vel.y = COS_DEG(this->obj.rot.x) * 80.0f; + this->vel.z = (SIN_DEG(this->obj.rot.x) * 30.0f) + gPlayer[0].vel.z; } - if (bossSO->obj.rot.x < 190.0f) { - bossSO->obj.rot.x += 1.0f; + if (this->obj.rot.x < 190.0f) { + this->obj.rot.x += 1.0f; } - if (bossSO->swork[SO_SWK_11] == 50) { - Solar_801A0CEC(&gActors[10], bossSO->obj.pos.x, bossSO->obj.pos.z + 1000.0f, 80.0f, 2); + if (this->swork[SO_SWK_11] == 50) { + Solar_801A0CEC(&gActors[10], this->obj.pos.x, this->obj.pos.z + 1000.0f, 80.0f, 2); gControllerRumbleFlags[gMainController] = 1; gControllerRumbleTimers[gMainController] = 100; gCameraShake = 10; } - if (bossSO->obj.pos.y < -1500.0f) { - bossSO->state++; - bossSO->swork[SO_SWK_11] = 100; - bossSO->obj.pos.y = -500.0f; - bossSO->fwork[SO_FWK_3] = 4800.0f; - bossSO->obj.pos.z = gPlayer[0].trueZpos - bossSO->fwork[SO_FWK_3]; - bossSO->unk_04C = 0; - bossSO->obj.rot.x = 0.0f; - bossSO->fwork[SO_FWK_31] = bossSO->vel.y = bossSO->vel.z = 0.0f; - bossSO->obj.rot.y = 330.0f; + if (this->obj.pos.y < -1500.0f) { + this->state++; + this->swork[SO_SWK_11] = 100; + this->obj.pos.y = -500.0f; + this->fwork[SO_FWK_3] = 4800.0f; + this->obj.pos.z = gPlayer[0].trueZpos - this->fwork[SO_FWK_3]; + this->unk_04C = 0; + this->obj.rot.x = 0.0f; + this->fwork[SO_FWK_31] = this->vel.y = this->vel.z = 0.0f; + this->obj.rot.y = 330.0f; } } break; case 3: - Math_SmoothStepToAngle(&bossSO->obj.rot.y, 0.0f, 1.0f, 1.5f, 1.0f); - if (bossSO->swork[SO_SWK_11] == 65) { - Solar_801A0CEC(&gActors[9], bossSO->obj.pos.x, bossSO->obj.pos.z + 1000.0f, 20.0f, 1); + Math_SmoothStepToAngle(&this->obj.rot.y, 0.0f, 1.0f, 1.5f, 1.0f); + if (this->swork[SO_SWK_11] == 65) { + Solar_801A0CEC(&gActors[9], this->obj.pos.x, this->obj.pos.z + 1000.0f, 20.0f, 1); } - if (bossSO->swork[SO_SWK_11] == 0) { - bossSO->swork[SO_SWK_11] = 220; + if (this->swork[SO_SWK_11] == 0) { + this->swork[SO_SWK_11] = 220; } - if (bossSO->swork[SO_SWK_11] == 210) { - bossSO->unk_04C = 0; - bossSO->swork[SO_SWK_1] = 1; + if (this->swork[SO_SWK_11] == 210) { + this->unk_04C = 0; + this->swork[SO_SWK_1] = 1; } - if (bossSO->swork[SO_SWK_11] >= 100) { - Math_SmoothStepToF(&bossSO->obj.pos.y, 180.0f, 0.1f, 10.0f, 0.1f); + if (this->swork[SO_SWK_11] >= 100) { + Math_SmoothStepToF(&this->obj.pos.y, 180.0f, 0.1f, 10.0f, 0.1f); } - if (bossSO->swork[SO_SWK_11] == 150) { - Solar_801A3468(bossSO); - bossSO->fwork[SO_FWK_0] = 0.01f; + if (this->swork[SO_SWK_11] == 150) { + Solar_801A3468(this); + this->fwork[SO_FWK_0] = 0.01f; } - if (bossSO->swork[SO_SWK_11] == 50) { + if (this->swork[SO_SWK_11] == 50) { gActors[9].dmgType = DMG_EXPLOSION; } break; } } -void Solar_801A56B8(Boss* bossSO) { - switch (bossSO->swork[SO_SWK_1]) { +void Solar_801A56B8(BossSO* this) { + switch (this->swork[SO_SWK_1]) { case 2: - if (((bossSO->unk_04C == 89) && (bossSO->state == 2)) || (bossSO->swork[SO_SWK_2] == 0)) { - bossSO->unk_04C = 0; - bossSO->state = 0; - bossSO->rot_078.y = 0.0f; + if (((this->unk_04C == 89) && (this->state == 2)) || (this->swork[SO_SWK_2] == 0)) { + this->unk_04C = 0; + this->state = 0; + this->rot_078.y = 0.0f; } - if (bossSO->unk_04C == 89) { - bossSO->state++; - bossSO->rot_078.y += 15.0f; + if (this->unk_04C == 89) { + this->state++; + this->rot_078.y += 15.0f; } - Math_SmoothStepToAngle(&bossSO->obj.rot.y, bossSO->rot_078.y, 1.0f, 3.0f, 1.0f); + Math_SmoothStepToAngle(&this->obj.rot.y, this->rot_078.y, 1.0f, 3.0f, 1.0f); - if (bossSO->unk_04C > 18) { - bossSO->info.hitbox[20] = 715.0f; - bossSO->info.hitbox[22] = 440.0f; - bossSO->info.hitbox[24] = 110.0f; + if (this->unk_04C > 18) { + this->info.hitbox[20] = 715.0f; + this->info.hitbox[22] = 440.0f; + this->info.hitbox[24] = 110.0f; } - if (bossSO->unk_04C > 36) { - bossSO->info.hitbox[20] = 220.0f; - bossSO->info.hitbox[22] = 715.0f; - bossSO->info.hitbox[24] = 220.0f; + if (this->unk_04C > 36) { + this->info.hitbox[20] = 220.0f; + this->info.hitbox[22] = 715.0f; + this->info.hitbox[24] = 220.0f; } break; case 4: - if ((bossSO->unk_04C == 99) || (bossSO->swork[SO_SWK_2] == 0)) { - bossSO->unk_04C = 0; - if ((bossSO->swork[SO_SWK_3] != 0) || (bossSO->swork[SO_SWK_2] != 0)) { - bossSO->swork[SO_SWK_1] = 5; + if ((this->unk_04C == 99) || (this->swork[SO_SWK_2] == 0)) { + this->unk_04C = 0; + if ((this->swork[SO_SWK_3] != 0) || (this->swork[SO_SWK_2] != 0)) { + this->swork[SO_SWK_1] = 5; } else { - bossSO->swork[SO_SWK_1] = 7; + this->swork[SO_SWK_1] = 7; } } - if (bossSO->unk_04C > 20) { - bossSO->info.hitbox[20] = 715.0f; - bossSO->info.hitbox[22] = 110.0f; - bossSO->info.hitbox[24] = 275.0f; + if (this->unk_04C > 20) { + this->info.hitbox[20] = 715.0f; + this->info.hitbox[22] = 110.0f; + this->info.hitbox[24] = 275.0f; } - if (bossSO->unk_04C > 84) { - bossSO->info.hitbox[20] = 220.0f; - bossSO->info.hitbox[22] = 715.0f; - bossSO->info.hitbox[24] = 220.0f; + if (this->unk_04C > 84) { + this->info.hitbox[20] = 220.0f; + this->info.hitbox[22] = 715.0f; + this->info.hitbox[24] = 220.0f; } break; case 5: - bossSO->fwork[SO_FWK_3] = 4800.0f; + this->fwork[SO_FWK_3] = 4800.0f; - if (bossSO->unk_04C == 65) { - bossSO->timer_050 = 30; + if (this->unk_04C == 65) { + this->timer_050 = 30; } - if (bossSO->timer_050 != 0) { - bossSO->unk_04C = 65; + if (this->timer_050 != 0) { + this->unk_04C = 65; } - if ((bossSO->unk_04C == 65) && ((gGameFrameCount % 4) == 0)) { - Solar_8019FFC0(bossSO, bossSO->fwork[SO_FWK_4] + 125.0f, bossSO->fwork[SO_FWK_5] - 100.0f, - bossSO->fwork[SO_FWK_6] + 600.0f, ((f32) bossSO->timer_050 * 0.2f) + 4.0f, 1); - Solar_8019FFC0(bossSO, bossSO->fwork[SO_FWK_4] - 125.0f, bossSO->fwork[SO_FWK_5] - 100.0f, - bossSO->fwork[SO_FWK_6] + 600.0f, ((f32) bossSO->timer_050 * 0.2f) + 4.0f, 2); - Solar_801A1EB0(bossSO, bossSO->fwork[SO_FWK_4], 25.0f, bossSO->fwork[SO_FWK_5] - 100.0f, - bossSO->fwork[SO_FWK_6] + 300.0f); + if ((this->unk_04C == 65) && ((gGameFrameCount % 4) == 0)) { + Solar_8019FFC0(this, this->fwork[SO_FWK_4] + 125.0f, this->fwork[SO_FWK_5] - 100.0f, + this->fwork[SO_FWK_6] + 600.0f, ((f32) this->timer_050 * 0.2f) + 4.0f, 1); + Solar_8019FFC0(this, this->fwork[SO_FWK_4] - 125.0f, this->fwork[SO_FWK_5] - 100.0f, + this->fwork[SO_FWK_6] + 600.0f, ((f32) this->timer_050 * 0.2f) + 4.0f, 2); + Solar_801A1EB0(this, this->fwork[SO_FWK_4], 25.0f, this->fwork[SO_FWK_5] - 100.0f, + this->fwork[SO_FWK_6] + 300.0f); } break; case 7: - if (bossSO->unk_04C < 50) { - if (bossSO->fwork[SO_FWK_31] < 22.0f) { - bossSO->fwork[SO_FWK_31] += 0.5f; + if (this->unk_04C < 50) { + if (this->fwork[SO_FWK_31] < 22.0f) { + this->fwork[SO_FWK_31] += 0.5f; } - bossSO->obj.rot.y += bossSO->fwork[SO_FWK_31]; + this->obj.rot.y += this->fwork[SO_FWK_31]; } - if ((bossSO->unk_04C >= 50) && (bossSO->unk_04C <= 100)) { - if (bossSO->fwork[SO_FWK_31] > 0.0f) { - bossSO->fwork[SO_FWK_31] -= 0.5f; + if ((this->unk_04C >= 50) && (this->unk_04C <= 100)) { + if (this->fwork[SO_FWK_31] > 0.0f) { + this->fwork[SO_FWK_31] -= 0.5f; } - bossSO->obj.rot.y += bossSO->fwork[SO_FWK_31]; + this->obj.rot.y += this->fwork[SO_FWK_31]; } - if (bossSO->unk_04C >= 100) { - Math_SmoothStepToAngle(&bossSO->obj.rot.y, 0.0f, 1.0f, 2.0f, 1.0f); - bossSO->fwork[SO_FWK_31] = 0.0f; + if (this->unk_04C >= 100) { + Math_SmoothStepToAngle(&this->obj.rot.y, 0.0f, 1.0f, 2.0f, 1.0f); + this->fwork[SO_FWK_31] = 0.0f; } - if (bossSO->unk_04C == 120) { - bossSO->swork[SO_SWK_1] = 5; - bossSO->unk_04C = 0; - bossSO->fwork[SO_FWK_0] = 0.1f; + if (this->unk_04C == 120) { + this->swork[SO_SWK_1] = 5; + this->unk_04C = 0; + this->fwork[SO_FWK_0] = 0.1f; } break; } @@ -2546,27 +2561,27 @@ BossSOfunc D_i3_801BF980[9] = { Solar_801A4214, Solar_801A4A34, Solar_801A4EF8, Solar_801A56B8, }; -void Solar_Boss_Update(Boss* bossSO) { +void Solar_Boss_Update(BossSO* this) { f32 sp1CC; f32 sp1C8; f32 sp1C4; f32 sp1C0; s32 sp1BC; s32 sp1B8; - Vec3f sp50[30]; - Vec3f sp44; - Vec3f sp38; + Vec3f frameTable[30]; + Vec3f src; + Vec3f dest; gBossFrameCount++; - if (bossSO->swork[SO_SWK_9] != 0) { - bossSO->swork[SO_SWK_9]--; + if (this->swork[SO_SWK_9] != 0) { + this->swork[SO_SWK_9]--; } - if (bossSO->swork[SO_SWK_8] != 0) { - bossSO->swork[SO_SWK_8]--; + if (this->swork[SO_SWK_8] != 0) { + this->swork[SO_SWK_8]--; } - if (bossSO->swork[SO_SWK_10] != 0) { - bossSO->swork[SO_SWK_10]--; + if (this->swork[SO_SWK_10] != 0) { + this->swork[SO_SWK_10]--; } if ((gBossFrameCount == 200) && (gTeamShields[TEAM_ID_FALCO] != 0)) { @@ -2579,182 +2594,181 @@ void Solar_Boss_Update(Boss* bossSO) { Radio_PlayMessage(gMsg_ID_10320, RCID_PEPPY); } - if (bossSO->health != 0) { - Math_SmoothStepToF(&bossSO->obj.pos.z, gPlayer[0].trueZpos - bossSO->fwork[SO_FWK_3], 1.0f, 60.0f, 1.0f); + if (this->health != 0) { + Math_SmoothStepToF(&this->obj.pos.z, gPlayer[0].trueZpos - this->fwork[SO_FWK_3], 1.0f, 60.0f, 1.0f); } else { - Math_SmoothStepToF(&bossSO->obj.pos.z, -(gPathProgress + 2600.0f), 1.0f, 40.0f, 1.0f); + Math_SmoothStepToF(&this->obj.pos.z, -(gPathProgress + 2600.0f), 1.0f, 40.0f, 1.0f); } - if (bossSO->swork[SO_SWK_2] != 0) { - bossSO->info.hitbox[7] = bossSO->fwork[SO_FWK_12] - bossSO->obj.pos.z; - bossSO->info.hitbox[9] = bossSO->fwork[SO_FWK_11] - bossSO->obj.pos.y; - bossSO->info.hitbox[11] = bossSO->fwork[SO_FWK_10] - bossSO->obj.pos.x; - bossSO->info.hitbox[13] = bossSO->fwork[SO_FWK_24] - bossSO->obj.pos.z; - bossSO->info.hitbox[15] = bossSO->fwork[SO_FWK_23] - bossSO->obj.pos.y; - bossSO->info.hitbox[17] = bossSO->fwork[SO_FWK_22] - bossSO->obj.pos.x; + if (this->swork[SO_SWK_2] != 0) { + this->info.hitbox[7] = this->fwork[SO_FWK_12] - this->obj.pos.z; + this->info.hitbox[9] = this->fwork[SO_FWK_11] - this->obj.pos.y; + this->info.hitbox[11] = this->fwork[SO_FWK_10] - this->obj.pos.x; + this->info.hitbox[13] = this->fwork[SO_FWK_24] - this->obj.pos.z; + this->info.hitbox[15] = this->fwork[SO_FWK_23] - this->obj.pos.y; + this->info.hitbox[17] = this->fwork[SO_FWK_22] - this->obj.pos.x; - Matrix_RotateY(gCalcMatrix, -bossSO->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, -this->obj.rot.y * M_DTOR, MTXF_NEW); - sp44.x = bossSO->fwork[SO_FWK_28] - bossSO->obj.pos.x; - sp44.y = bossSO->fwork[SO_FWK_29] - bossSO->obj.pos.y; - sp44.z = bossSO->fwork[SO_FWK_30] - bossSO->obj.pos.z; + src.x = this->fwork[SO_FWK_28] - this->obj.pos.x; + src.y = this->fwork[SO_FWK_29] - this->obj.pos.y; + src.z = this->fwork[SO_FWK_30] - this->obj.pos.z; - Matrix_MultVec3f(gCalcMatrix, &sp44, &sp38); + Matrix_MultVec3f(gCalcMatrix, &src, &dest); - bossSO->info.hitbox[19] = sp38.z; - bossSO->info.hitbox[21] = sp38.y; - bossSO->info.hitbox[23] = sp38.x; + this->info.hitbox[19] = dest.z; + this->info.hitbox[21] = dest.y; + this->info.hitbox[23] = dest.x; } - if (bossSO->swork[SO_SWK_3] != 0) { - bossSO->info.hitbox[25] = bossSO->fwork[SO_FWK_9] - bossSO->obj.pos.z; - bossSO->info.hitbox[27] = bossSO->fwork[SO_FWK_8] - bossSO->obj.pos.y; - bossSO->info.hitbox[29] = bossSO->fwork[SO_FWK_7] - bossSO->obj.pos.x; - bossSO->info.hitbox[31] = bossSO->fwork[SO_FWK_21] - bossSO->obj.pos.z; - bossSO->info.hitbox[33] = bossSO->fwork[SO_FWK_20] - bossSO->obj.pos.y; - bossSO->info.hitbox[35] = bossSO->fwork[SO_FWK_19] - bossSO->obj.pos.x; - bossSO->info.hitbox[37] = bossSO->fwork[SO_FWK_27] - bossSO->obj.pos.z; - bossSO->info.hitbox[39] = bossSO->fwork[SO_FWK_26] - bossSO->obj.pos.y; - bossSO->info.hitbox[41] = bossSO->fwork[SO_FWK_25] - bossSO->obj.pos.x; + if (this->swork[SO_SWK_3] != 0) { + this->info.hitbox[25] = this->fwork[SO_FWK_9] - this->obj.pos.z; + this->info.hitbox[27] = this->fwork[SO_FWK_8] - this->obj.pos.y; + this->info.hitbox[29] = this->fwork[SO_FWK_7] - this->obj.pos.x; + this->info.hitbox[31] = this->fwork[SO_FWK_21] - this->obj.pos.z; + this->info.hitbox[33] = this->fwork[SO_FWK_20] - this->obj.pos.y; + this->info.hitbox[35] = this->fwork[SO_FWK_19] - this->obj.pos.x; + this->info.hitbox[37] = this->fwork[SO_FWK_27] - this->obj.pos.z; + this->info.hitbox[39] = this->fwork[SO_FWK_26] - this->obj.pos.y; + this->info.hitbox[41] = this->fwork[SO_FWK_25] - this->obj.pos.x; } - if (((gGameFrameCount % 8) == 0) && (bossSO->fwork[SO_FWK_3] < 4800.0f)) { - if (Play_CheckDynaFloorCollision(&sp1C0, &sp1B8, bossSO->obj.pos.x, bossSO->obj.pos.y - 160.0f, - bossSO->obj.pos.z)) { - Solar_801A1EB0(bossSO, bossSO->obj.pos.x, 50.0f, sp1C0 - 170.0f, bossSO->obj.pos.z + 100.0f); + if (((gGameFrameCount % 8) == 0) && (this->fwork[SO_FWK_3] < 4800.0f)) { + if (Play_CheckDynaFloorCollision(&sp1C0, &sp1B8, this->obj.pos.x, this->obj.pos.y - 160.0f, this->obj.pos.z)) { + Solar_801A1EB0(this, this->obj.pos.x, 50.0f, sp1C0 - 170.0f, this->obj.pos.z + 100.0f); } - if ((bossSO->swork[SO_SWK_2] != 0) && - Play_CheckDynaFloorCollision(&sp1C0, &sp1B8, bossSO->fwork[SO_FWK_16], bossSO->fwork[SO_FWK_17], - bossSO->fwork[SO_FWK_18])) { - Solar_801A1EB0(bossSO, bossSO->fwork[SO_FWK_16], 50.0f, sp1C0 - 150.f, bossSO->fwork[SO_FWK_18] + 150.0f); + if ((this->swork[SO_SWK_2] != 0) && + Play_CheckDynaFloorCollision(&sp1C0, &sp1B8, this->fwork[SO_FWK_16], this->fwork[SO_FWK_17], + this->fwork[SO_FWK_18])) { + Solar_801A1EB0(this, this->fwork[SO_FWK_16], 50.0f, sp1C0 - 150.f, this->fwork[SO_FWK_18] + 150.0f); } - if ((bossSO->swork[SO_SWK_3] != 0) && - Play_CheckDynaFloorCollision(&sp1C0, &sp1B8, bossSO->fwork[SO_FWK_13], bossSO->fwork[SO_FWK_14], - bossSO->fwork[SO_FWK_15])) { - Solar_801A1EB0(bossSO, bossSO->fwork[SO_FWK_13], 50.0f, sp1C0 - 150.0f, bossSO->fwork[SO_FWK_15] + 150.0f); + if ((this->swork[SO_SWK_3] != 0) && + Play_CheckDynaFloorCollision(&sp1C0, &sp1B8, this->fwork[SO_FWK_13], this->fwork[SO_FWK_14], + this->fwork[SO_FWK_15])) { + Solar_801A1EB0(this, this->fwork[SO_FWK_13], 50.0f, sp1C0 - 150.0f, this->fwork[SO_FWK_15] + 150.0f); } } - if ((((gGameFrameCount % 4) == 0) || (bossSO->fwork[SO_FWK_31] != 0.0f)) && - ((bossSO->swork[SO_SWK_0] != 7) || ((gGameFrameCount % 2) == 0))) { - if ((bossSO->swork[SO_SWK_2] == 0) && ((bossSO->health > 0) || (bossSO->state < 2))) { - Solar_8019FF44(bossSO, bossSO->fwork[SO_FWK_10], bossSO->fwork[SO_FWK_11], bossSO->fwork[SO_FWK_12], - bossSO->fwork[SO_FWK_31] - 20.0f, -1.0f); + if ((((gGameFrameCount % 4) == 0) || (this->fwork[SO_FWK_31] != 0.0f)) && + ((this->swork[SO_SWK_0] != 7) || ((gGameFrameCount % 2) == 0))) { + if ((this->swork[SO_SWK_2] == 0) && ((this->health > 0) || (this->state < 2))) { + Solar_8019FF44(this, this->fwork[SO_FWK_10], this->fwork[SO_FWK_11], this->fwork[SO_FWK_12], + this->fwork[SO_FWK_31] - 20.0f, -1.0f); } - if ((bossSO->swork[SO_SWK_3] == 0) && ((bossSO->health > 0) || (bossSO->state < 2))) { - Solar_8019FF44(bossSO, bossSO->fwork[SO_FWK_7], bossSO->fwork[SO_FWK_8], bossSO->fwork[SO_FWK_9], - bossSO->fwork[SO_FWK_31] - 20.0f, 1.0f); + if ((this->swork[SO_SWK_3] == 0) && ((this->health > 0) || (this->state < 2))) { + Solar_8019FF44(this, this->fwork[SO_FWK_7], this->fwork[SO_FWK_8], this->fwork[SO_FWK_9], + this->fwork[SO_FWK_31] - 20.0f, 1.0f); } } - Math_SmoothStepToF(&bossSO->fwork[0], 1.0f, 0.01f, 0.01f, 0.0f); + Math_SmoothStepToF(&this->fwork[0], 1.0f, 0.01f, 0.01f, 0.0f); - if ((bossSO->health > 0) || (bossSO->swork[SO_SWK_0] == 0)) { - D_i3_801BF980[bossSO->swork[SO_SWK_0]](bossSO); + if ((this->health > 0) || (this->swork[SO_SWK_0] == 0)) { + D_i3_801BF980[this->swork[SO_SWK_0]](this); } - if (bossSO->timer_058 != 0) { - Solar_801A4214(bossSO); + if (this->timer_058 != 0) { + Solar_801A4214(this); } - switch (bossSO->swork[SO_SWK_1]) { + switch (this->swork[SO_SWK_1]) { case 0: - bossSO->unk_04C++; - if (bossSO->unk_04C == 75) { - AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_CRY, bossSO->sfxSource, 4); + this->unk_04C++; + if (this->unk_04C == 75) { + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_CRY, this->sfxSource, 4); } - if (bossSO->unk_04C >= Animation_GetFrameCount(&D_SO_601388C)) { - if (bossSO->health != 0) { - bossSO->unk_04C = 0; - bossSO->swork[SO_SWK_1]++; - bossSO->fwork[SO_FWK_0] = 0.01f; + if (this->unk_04C >= Animation_GetFrameCount(&D_SO_601388C)) { + if (this->health != 0) { + this->unk_04C = 0; + this->swork[SO_SWK_1]++; + this->fwork[SO_FWK_0] = 0.01f; } else { - bossSO->unk_04C = Animation_GetFrameCount(&D_SO_601388C) - 1; + this->unk_04C = Animation_GetFrameCount(&D_SO_601388C) - 1; } } - sp1BC = Animation_GetFrameData(&D_SO_601388C, bossSO->unk_04C, sp50); + sp1BC = Animation_GetFrameData(&D_SO_601388C, this->unk_04C, frameTable); break; case 1: - bossSO->unk_04C++; - if (bossSO->unk_04C >= Animation_GetFrameCount(&D_SO_600D3DC)) { - bossSO->unk_04C = 0; + this->unk_04C++; + if (this->unk_04C >= Animation_GetFrameCount(&D_SO_600D3DC)) { + this->unk_04C = 0; } - sp1BC = Animation_GetFrameData(&D_SO_600D3DC, bossSO->unk_04C, sp50); + sp1BC = Animation_GetFrameData(&D_SO_600D3DC, this->unk_04C, frameTable); break; case 2: - bossSO->unk_04C++; - if (bossSO->unk_04C >= Animation_GetFrameCount(&D_SO_600E2C4)) { - bossSO->unk_04C = 0; + this->unk_04C++; + if (this->unk_04C >= Animation_GetFrameCount(&D_SO_600E2C4)) { + this->unk_04C = 0; } - sp1BC = Animation_GetFrameData(&D_SO_600E2C4, bossSO->unk_04C, sp50); + sp1BC = Animation_GetFrameData(&D_SO_600E2C4, this->unk_04C, frameTable); break; case 3: - bossSO->unk_04C++; - if (bossSO->unk_04C >= Animation_GetFrameCount(&D_SO_600F744)) { - bossSO->unk_04C = 0; + this->unk_04C++; + if (this->unk_04C >= Animation_GetFrameCount(&D_SO_600F744)) { + this->unk_04C = 0; } - sp1BC = Animation_GetFrameData(&D_SO_600F744, bossSO->unk_04C, sp50); + sp1BC = Animation_GetFrameData(&D_SO_600F744, this->unk_04C, frameTable); break; case 4: - bossSO->unk_04C++; - if (bossSO->unk_04C >= Animation_GetFrameCount(&D_SO_600C15C)) { - bossSO->unk_04C = 0; + this->unk_04C++; + if (this->unk_04C >= Animation_GetFrameCount(&D_SO_600C15C)) { + this->unk_04C = 0; } - sp1BC = Animation_GetFrameData(&D_SO_600C15C, bossSO->unk_04C, sp50); + sp1BC = Animation_GetFrameData(&D_SO_600C15C, this->unk_04C, frameTable); break; case 5: case 8: case 9: - bossSO->unk_04C++; - if ((bossSO->unk_04C == 45) && (bossSO->health != 0)) { - AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_CRY, bossSO->sfxSource, 4); + this->unk_04C++; + if ((this->unk_04C == 45) && (this->health != 0)) { + AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_CRY, this->sfxSource, 4); } - if (bossSO->unk_04C >= Animation_GetFrameCount(&D_SO_6012C00)) { - bossSO->unk_04C = 0; + if (this->unk_04C >= Animation_GetFrameCount(&D_SO_6012C00)) { + this->unk_04C = 0; } - sp1BC = Animation_GetFrameData(&D_SO_6012C00, bossSO->unk_04C, sp50); + sp1BC = Animation_GetFrameData(&D_SO_6012C00, this->unk_04C, frameTable); break; case 6: - bossSO->unk_04C++; - if (bossSO->unk_04C >= Animation_GetFrameCount(&D_SO_600B1B4)) { - bossSO->unk_04C = 0; + this->unk_04C++; + if (this->unk_04C >= Animation_GetFrameCount(&D_SO_600B1B4)) { + this->unk_04C = 0; } - sp1BC = Animation_GetFrameData(&D_SO_600B1B4, bossSO->unk_04C, sp50); + sp1BC = Animation_GetFrameData(&D_SO_600B1B4, this->unk_04C, frameTable); break; case 7: - bossSO->unk_04C++; - if (bossSO->unk_04C >= Animation_GetFrameCount(&D_SO_6009D30)) { - bossSO->unk_04C = 0; + this->unk_04C++; + if (this->unk_04C >= Animation_GetFrameCount(&D_SO_6009D30)) { + this->unk_04C = 0; } - sp1BC = Animation_GetFrameData(&D_SO_6009D30, bossSO->unk_04C, sp50); + sp1BC = Animation_GetFrameData(&D_SO_6009D30, this->unk_04C, frameTable); break; } - Matrix_RotateZ(gCalcMatrix, -bossSO->vwork[SO_VWK_29].z * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -bossSO->vwork[SO_VWK_29].x * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gCalcMatrix, -bossSO->vwork[SO_VWK_29].y * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -this->vwork[SO_VWK_29].z * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -this->vwork[SO_VWK_29].x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -this->vwork[SO_VWK_29].y * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, -bossSO->obj.rot.z * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gCalcMatrix, -bossSO->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gCalcMatrix, -bossSO->obj.rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -this->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, -this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -this->obj.rot.y * M_DTOR, MTXF_APPLY); - if ((bossSO->health > 0) && (bossSO->swork[SO_SWK_0] == 1)) { - sp44.x = gPlayer[0].pos.x - bossSO->obj.pos.x; - sp44.y = gPlayer[0].pos.y - bossSO->obj.pos.y; - sp44.z = gPlayer[0].pos.z - bossSO->obj.pos.z; + if ((this->health > 0) && (this->swork[SO_SWK_0] == 1)) { + src.x = gPlayer[0].pos.x - this->obj.pos.x; + src.y = gPlayer[0].pos.y - this->obj.pos.y; + src.z = gPlayer[0].pos.z - this->obj.pos.z; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - sp1C4 = Math_RadToDeg(Math_Atan2F(sp38.x, sp38.z)); - sp1CC = sqrtf(SQ(sp38.x) + SQ(sp38.z)); - sp1C8 = Math_RadToDeg(-Math_Atan2F(sp38.y, sp1CC)); + sp1C4 = Math_RadToDeg(Math_Atan2F(dest.x, dest.z)); + sp1CC = sqrtf(SQ(dest.x) + SQ(dest.z)); + sp1C8 = Math_RadToDeg(-Math_Atan2F(dest.y, sp1CC)); if ((sp1C8 > 30.0f) && (sp1C8 <= 180.0f)) { sp1C8 = 30.0f; @@ -2775,26 +2789,27 @@ void Solar_Boss_Update(Boss* bossSO) { Math_SmoothStepToAngle(&D_i3_801C2768[0], 0.0f, 0.2f, 4.0f, 0.1f); } - Math_SmoothStepToVec3fArray(sp50, bossSO->vwork, 1, sp1BC, bossSO->fwork[SO_FWK_0], 100.0f, 0.0f); + Math_SmoothStepToVec3fArray(frameTable, this->vwork, 1, sp1BC, this->fwork[SO_FWK_0], 100.0f, 0.0f); - if ((bossSO->dmgType != DMG_NONE) && (bossSO->health > 0)) { - bossSO->dmgType = DMG_NONE; - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, bossSO->sfxSource, 4); - if (!((bossSO->swork[SO_SWK_0] == 0) || (bossSO->swork[SO_SWK_0] == 2) || (bossSO->swork[SO_SWK_0] == 3) || - (bossSO->swork[SO_SWK_0] == 6) || ((bossSO->swork[SO_SWK_0] == 7) && (bossSO->state == 2)))) { - Solar_801A3C4C(bossSO); + if ((this->dmgType != DMG_NONE) && (this->health > 0)) { + this->dmgType = DMG_NONE; + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); + if (!((this->swork[SO_SWK_0] == 0) || (this->swork[SO_SWK_0] == 2) || (this->swork[SO_SWK_0] == 3) || + (this->swork[SO_SWK_0] == 6) || ((this->swork[SO_SWK_0] == 7) && (this->state == 2)))) { + Solar_801A3C4C(this); } } + if (gBossFrameCount == 400) { gShowBossHealth = true; } if (gBossFrameCount >= 400) { - gBossHealthBar = (bossSO->health + bossSO->swork[SO_SWK_2] + bossSO->swork[SO_SWK_3]) * (255.0f / 1400.0f); + gBossHealthBar = (this->health + this->swork[SO_SWK_2] + this->swork[SO_SWK_3]) * (255.0f / 1400.0f); } } bool Solar_801A68A8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { - Boss* this = (Boss*) thisx; + BossSO* this = (BossSO*) thisx; Vec3f sp58 = { 0.0f, 0.0f, 0.0f }; Vec3f sp4C = { 10.0f, 0.0f, 0.0f }; Vec3f sp40 = { -10.0f, 0.0f, 0.0f }; @@ -2862,7 +2877,7 @@ bool Solar_801A68A8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th } void Solar_801A6BDC(s32 limbIndex, Vec3f* rot, void* thisx) { - Boss* this = thisx; + BossSO* this = (BossSO*) thisx; Vec3f spA0 = { 90.0f, 0.0f, -10.0f }; Vec3f sp94 = { 135.0f, 0.0f, -40.0f }; Vec3f sp88 = { 106.0f, 0.0f, 0.0f }; @@ -3003,7 +3018,7 @@ void Solar_801A6BDC(s32 limbIndex, Vec3f* rot, void* thisx) { } } -void Solar_Boss_Draw(Boss* bossSO) { +void Solar_Boss_Draw(BossSO* this) { s32 i; Vec3f spE8[9] = { { 150.0f, 300.0f, 100.0f }, { -100.0f, 200.0f, 100.0f }, { 50.0f, 100.0f, 100.0f }, @@ -3017,19 +3032,19 @@ void Solar_Boss_Draw(Boss* bossSO) { -89.0f, -90.0f, -88.0f, -36.0f, -73.0f, -95.0f, -91.0f, -83.0f, -91.0f, }; - Matrix_Scale(gCalcMatrix, bossSO->scale, bossSO->scale, bossSO->scale, MTXF_APPLY); + Matrix_Scale(gCalcMatrix, this->scale, this->scale, this->scale, MTXF_APPLY); if (gBossActive) { - Animation_DrawSkeleton(2, D_SO_600E470, bossSO->vwork, Solar_801A68A8, Solar_801A6BDC, bossSO, gCalcMatrix); + Animation_DrawSkeleton(2, D_SO_600E470, this->vwork, Solar_801A68A8, Solar_801A6BDC, this, gCalcMatrix); } - if (bossSO->health <= 0) { + if (this->health <= 0) { RCP_SetupDL_49(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 255, 192, 0, 255); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, bossSO->obj.pos.x, bossSO->obj.pos.y, bossSO->obj.pos.z - 500.0f + gPathProgress, + Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z - 500.0f + gPathProgress, MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_i3_801C2768[3], D_i3_801C2768[2], 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -3038,8 +3053,8 @@ void Solar_Boss_Draw(Boss* bossSO) { for (i = 0; i < 9; i++) { Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, bossSO->obj.pos.x + spE8[i].x, bossSO->obj.pos.y + spE8[i].y, - bossSO->obj.pos.z + gPathProgress + spE8[i].z, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, this->obj.pos.x + spE8[i].x, this->obj.pos.y + spE8[i].y, + this->obj.pos.z + gPathProgress + spE8[i].z, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, spC4[i] * M_DTOR, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, spA0[i] * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_i3_801C2768[4 + i], 100.0f, 1.0f, MTXF_APPLY); @@ -3051,8 +3066,8 @@ void Solar_Boss_Draw(Boss* bossSO) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 192, 64, 255); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, bossSO->obj.pos.x, bossSO->obj.pos.y + 230.0f, - bossSO->obj.pos.z - 300.0f + gPathProgress, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y + 230.0f, + this->obj.pos.z - 300.0f + gPathProgress, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_DTOR * 5.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_i3_801C2768[13], 1.0f, D_i3_801C2768[13], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -3062,8 +3077,8 @@ void Solar_Boss_Draw(Boss* bossSO) { gSPDisplayList(gMasterDisp++, D_BG_PLANET_20112C0); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, bossSO->obj.pos.x, bossSO->obj.pos.y + 270.0f, - (bossSO->obj.pos.z - 300.0f) + gPathProgress, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y + 270.0f, + (this->obj.pos.z - 300.0f) + gPathProgress, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, -3.0f * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_i3_801C2768[13], 1.0f, D_i3_801C2768[13], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -3087,7 +3102,7 @@ Vec3f D_i3_801BFB30[3] = { }; void Solar_801A7750(void) { - Actor* actor = gActors; + ActorCutscene* actor = &gActors[0]; s32 i; Rand_SetSeed(1, 29100, 9786); @@ -3125,7 +3140,7 @@ void Solar_LevelComplete(Player* player) { f32 dz; Vec3f sp60; Vec3f sp54; - Boss* bossSO = &gBosses[0]; + BossSO* boss = &gBosses[0]; switch (player->csState) { case 0: @@ -3171,8 +3186,8 @@ void Solar_LevelComplete(Player* player) { Math_SmoothStepToF(&player->rot.x, 0.0f, 0.1f, 5.0f, 0.0f); Math_SmoothStepToF(&player->pos.y, 200.0f, 0.05f, 10.0f, 0.0f); - dx = player->pos.x - bossSO->obj.pos.x; - dz = (player->pos.z - bossSO->obj.pos.z) * 0.05f; + dx = player->pos.x - boss->obj.pos.x; + dz = (player->pos.z - boss->obj.pos.z) * 0.05f; sp78 = Math_RadToDeg(-Math_Atan2F(dx, dz)); Math_SmoothStepToF(&gCsCamEyeY, 300.0f, 1.0f, 20.0f, 0.0f); @@ -3511,45 +3526,45 @@ void Solar_LevelComplete(Player* player) { player->rockAngle = SIN_DEG(player->rockPhase); } -void Solar_801A8BE8(Actor* actor) { +void Solar_801A8BE8(ActorCutscene* this) { Vec3f src; Vec3f dest; - switch (actor->state) { + switch (this->state) { case 4: break; case 1: - if ((actor->animFrame != 0) && ((((s32) (actor->index % 8U) * 10) + 1030) < gCsFrameCount)) { - actor->state = 4; + if ((this->animFrame != 0) && ((((s32) (this->index % 8U) * 10) + 1030) < gCsFrameCount)) { + this->state = 4; } break; case 2: - actor->state = 3; - AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); - actor->fwork[29] = 5.0f; + this->state = 3; + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, this->sfxSource, 0); + this->fwork[29] = 5.0f; /* fallthrough */ case 3: - actor->iwork[11] = 2; - actor->fwork[0] += 2.0f; - actor->rot_0F4.x += 0.2f; + this->iwork[11] = 2; + this->fwork[0] += 2.0f; + this->rot_0F4.x += 0.2f; break; } - Matrix_RotateY(gCalcMatrix, (actor->rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(actor->rot_0F4.x * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (this->rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(this->rot_0F4.x * M_DTOR), MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; - src.z = actor->fwork[0]; + src.z = this->fwork[0]; Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - actor->vel.x = dest.x; - actor->vel.y = dest.y; - actor->vel.z = dest.z; + this->vel.x = dest.x; + this->vel.y = dest.y; + this->vel.z = dest.z; - actor->obj.rot.x = -actor->rot_0F4.x; - actor->obj.rot.y = actor->rot_0F4.y + 180.0f; - actor->obj.rot.z = -actor->rot_0F4.z; + this->obj.rot.x = -this->rot_0F4.x; + this->obj.rot.y = this->rot_0F4.y + 180.0f; + this->obj.rot.z = -this->rot_0F4.z; } void Solar_801A8DB8(Vec3f* pos, u32 sfxId, f32 zVel) { @@ -3557,7 +3572,7 @@ void Solar_801A8DB8(Vec3f* pos, u32 sfxId, f32 zVel) { for (i = 0; i < ARRAY_COUNT(gEffects); i++) { if (gEffects[i].obj.status == OBJ_FREE) { - func_effect_8007A5F8(&gEffects[i], pos, sfxId); + Effect_SetupTimedSfxAtPos(&gEffects[i], pos, sfxId); gEffects[i].vel.z = zVel; break; } diff --git a/src/overlays/ovl_i3/fox_zo.c b/src/overlays/ovl_i3/fox_zo.c index 81080d1a..49d20d51 100644 --- a/src/overlays/ovl_i3/fox_zo.c +++ b/src/overlays/ovl_i3/fox_zo.c @@ -30,17 +30,17 @@ typedef struct { #define ZO_HIT_12(bossZO) ((Hitbox*) (ZO_HIT_10(bossZO, 0) + 2)) void Solar_801A7750(void); -void Zoness_801986FC(Boss* bossZO, s32 arg1, f32 xOff, f32 yOff, f32 zOff, f32 yRot); -void Zoness_801989FC(Boss* bossZO); -void Zoness_80198BE8(Boss* bossZO, s32 arg1); -void Zoness_80198ECC(Boss* bossZO); -void Zoness_80198F3C(Boss* bossZO, s32 arg1, s32 arg2); -void Zoness_8019907C(Boss* bossZO); -void Zoness_8019914C(Boss* bossZO, s32 arg1); -void Zoness_801991D0(Boss* bossZO, s32 arg1); -void Zoness_80199394(Boss* bossZO, s32 arg1); -void Zoness_80199470(Boss* bossZO, s32 arg1); -void Zoness_8019962C(Boss* bossZO, f32 arg1); +void Zoness_801986FC(Boss* this, s32 arg1, f32 xOff, f32 yOff, f32 zOff, f32 yRot); +void Zoness_801989FC(Boss* this); +void Zoness_80198BE8(Boss* this, s32 arg1); +void Zoness_80198ECC(Boss* this); +void Zoness_80198F3C(Boss* this, s32 arg1, s32 arg2); +void Zoness_8019907C(Boss* this); +void Zoness_8019914C(Boss* this, s32 arg1); +void Zoness_801991D0(Boss* this, s32 arg1); +void Zoness_80199394(Boss* this, s32 arg1); +void Zoness_80199470(Boss* this, s32 arg1); +void Zoness_8019962C(Boss* this, f32 arg1); typedef enum { /* 0 */ ZO_LIMB_0, @@ -470,34 +470,34 @@ s32 sZoLimbTimers[ZO_LIMB_MAX]; s32 sZoSwork[ZO_BSS_MAX]; f32 sZoFwork[ZO_BSF_MAX]; -void Zoness_8018FF50(Actor* actor) { +void Zoness_8018FF50(Actor* this) { f32 temp; - (void) " Enm->hitNO %d\n"; // Unclear where this goes. hitNO can't be info.bonus. Damage related? - actor->obj.rot.y = RAD_TO_DEG(Math_Atan2F(gPlayer[0].cam.eye.x - actor->obj.pos.x, - gPlayer[0].cam.eye.z - (actor->obj.pos.z + gPathProgress))); - temp = sqrtf(SQ(gPlayer[0].cam.eye.z - (actor->obj.pos.z + gPathProgress)) + - SQ(gPlayer[0].cam.eye.x - actor->obj.pos.x)); - actor->obj.rot.x = RAD_TO_DEG(-Math_Atan2F(gPlayer[0].cam.eye.y - actor->obj.pos.y, temp)); + this->obj.rot.y = RAD_TO_DEG( + Math_Atan2F(gPlayer[0].cam.eye.x - this->obj.pos.x, gPlayer[0].cam.eye.z - (this->obj.pos.z + gPathProgress))); + temp = sqrtf(SQ(gPlayer[0].cam.eye.z - (this->obj.pos.z + gPathProgress)) + + SQ(gPlayer[0].cam.eye.x - this->obj.pos.x)); + this->obj.rot.x = RAD_TO_DEG(-Math_Atan2F(gPlayer[0].cam.eye.y - this->obj.pos.y, temp)); } -void Zoness_SetupDebris(Actor* actor, Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32 state, f32 scale, +void Zoness_SetupDebris(ActorDebris* this, Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32 state, f32 scale, s32 timerBC, s32 unk48) { - Actor_Initialize(actor); - actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_DEBRIS; - actor->state = state; - actor->scale = scale; - actor->unk_048 = unk48; - actor->obj.pos = *pos; - actor->obj.rot = *rot; - actor->vel.x = xVel; - actor->vel.y = yVel; - actor->vel.z = zVel; - actor->timer_0BC = timerBC; - actor->gravity = 0.5f; + Actor_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_ACTOR_DEBRIS; - Object_SetInfo(&actor->info, actor->obj.id); + this->state = state; + this->scale = scale; + this->unk_048 = unk48; + this->obj.pos = *pos; + this->obj.rot = *rot; + this->vel.x = xVel; + this->vel.y = yVel; + this->vel.z = zVel; + this->timer_0BC = timerBC; + this->gravity = 0.5f; + + Object_SetInfo(&this->info, this->obj.id); } void Zoness_SpawnDebris(Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32 state, f32 scale, s32 timerBC, @@ -522,7 +522,7 @@ bool Zoness_8019019C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* t void Zoness_80190204(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp24 = { 0.0f, 0.0f, 0.0f }; - Actor* this = thisx; + Actor* this = (Actor*) thisx; if (this->state == 1) { switch (limbIndex) { @@ -574,64 +574,68 @@ void Zoness_80190204(s32 limbIndex, Vec3f* rot, void* thisx) { } } -void Zoness_80190430(Actor* actor) { - Vec3f sp30[30]; +void Zoness_Actor235_Draw(Actor235* this) { + Vec3f frameTable[30]; - Matrix_Scale(gCalcMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY); - Animation_GetFrameData(&D_ZO_600E5EC, actor->animFrame, sp30); - Animation_DrawSkeleton(3, D_ZO_600E7D8, sp30, Zoness_8019019C, Zoness_80190204, actor, gCalcMatrix); + Matrix_Scale(gCalcMatrix, this->scale, this->scale, this->scale, MTXF_APPLY); + Animation_GetFrameData(&D_ZO_600E5EC, this->animFrame, frameTable); + Animation_DrawSkeleton(3, D_ZO_600E7D8, frameTable, Zoness_8019019C, Zoness_80190204, this, gCalcMatrix); } -void Zoness_801904CC(Actor* actor) { - Vec3f spA4; - Vec3f sp98; +void Zoness_Actor235_Update(Actor235* this) { + Vec3f src; + Vec3f dest; s32 i; - switch (actor->state) { + switch (this->state) { case 0: - actor->health = 20; - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, MTXF_APPLY); - spA4.x = spA4.y = 0.0f; - spA4.z = actor->fwork[10]; - Matrix_MultVec3f(gCalcMatrix, &spA4, &sp98); - actor->vel.x = sp98.x; - actor->vel.y = sp98.y; - actor->vel.z = sp98.z; - actor->state = 5; + this->health = 20; + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); + src.x = src.y = 0.0f; + src.z = this->fwork[10]; + Matrix_MultVec3f(gCalcMatrix, &src, &dest); + this->vel.x = dest.x; + this->vel.y = dest.y; + this->vel.z = dest.z; + this->state = 5; break; + case 1: for (i = 0; i < 11; i++) { - Zoness_SpawnDebris(&actor->vwork[i], &actor->vwork[i + 11], RAND_FLOAT_CENTERED(20.0f), - RAND_FLOAT(-10.0f), RAND_FLOAT(10.0f), 41, actor->scale, 200, i); + Zoness_SpawnDebris(&this->vwork[i], &this->vwork[i + 11], RAND_FLOAT_CENTERED(20.0f), + RAND_FLOAT(-10.0f), RAND_FLOAT(10.0f), 41, this->scale, 200, i); } - actor->itemDrop = DROP_NONE; - Actor_Despawn(actor); - Object_Kill(&actor->obj, actor->sfxSource); - func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 4.0f); - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_BIRD_DOWN); + this->itemDrop = DROP_NONE; + Actor_Despawn(this); + Object_Kill(&this->obj, this->sfxSource); + func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 4.0f); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_BIRD_DOWN); break; } - actor->animFrame++; - if (Animation_GetFrameCount(&D_ZO_600E5EC) < actor->animFrame) { - actor->animFrame = 0; + + this->animFrame++; + + if (Animation_GetFrameCount(&D_ZO_600E5EC) < this->animFrame) { + this->animFrame = 0; } - if ((actor->dmgType != DMG_NONE) && (actor->health != 0)) { - actor->dmgType = DMG_NONE; - if (actor->state > 0) { - actor->timer_0C6 = 15; - actor->health -= actor->damage; - AUDIO_PLAY_SFX(NA_SE_EN_BIRD_DAMAGE, actor->sfxSource, 4); - if (actor->health <= 0) { - actor->health = 0; - actor->state = 1; + + if ((this->dmgType != DMG_NONE) && (this->health != 0)) { + this->dmgType = DMG_NONE; + if (this->state > 0) { + this->timer_0C6 = 15; + this->health -= this->damage; + AUDIO_PLAY_SFX(NA_SE_EN_BIRD_DAMAGE, this->sfxSource, 4); + if (this->health <= 0) { + this->health = 0; + this->state = 1; } } } } -void Zoness_80190790(Actor* actor) { +void Zoness_80190790(Actor* this) { s32 pad[2]; f32 temp1; PosRot* temp2; @@ -640,63 +644,64 @@ void Zoness_80190790(Actor* actor) { s32 i; Actor* otherActor; - actor->counter_04E++; - if (actor->counter_04E >= 200) { - actor->counter_04E = 0; + this->counter_04E++; + if (this->counter_04E >= 200) { + this->counter_04E = 0; } - actor->fwork[0] += 4.0f; - actor->vel.y = SIN_DEG(actor->fwork[0]) * 20.0f; - actor->rot_0F4.x = -actor->vel.y * 2.5f; - actor->fwork[1] += 5.0f; - actor->rot_0F4.z = SIN_DEG(actor->fwork[1]) * 30.0f; + this->fwork[0] += 4.0f; + this->vel.y = SIN_DEG(this->fwork[0]) * 20.0f; + this->rot_0F4.x = -this->vel.y * 2.5f; + this->fwork[1] += 5.0f; + this->rot_0F4.z = SIN_DEG(this->fwork[1]) * 30.0f; + for (i = 0, otherActor = gActors; i < ARRAY_COUNT(gActors); i++, otherActor++) { if ((otherActor->obj.status == OBJ_ACTIVE) && (otherActor->obj.id == OBJ_ACTOR_239) && - (otherActor->iwork[0] == actor->iwork[0])) { + (otherActor->iwork[0] == this->iwork[0])) { temp1 = Math_RadToDeg( - Math_Atan2F(otherActor->obj.pos.x - actor->obj.pos.x, otherActor->obj.pos.z - actor->obj.pos.z)); - Math_SmoothStepToAngle(&actor->rot_0F4.y, temp1, 0.2f, 3.0f, 0.0f); - if ((fabsf(actor->obj.pos.x - otherActor->obj.pos.x) < 500.0f) && - (fabsf(actor->obj.pos.z - otherActor->obj.pos.z) < 500.0f)) { + Math_Atan2F(otherActor->obj.pos.x - this->obj.pos.x, otherActor->obj.pos.z - this->obj.pos.z)); + Math_SmoothStepToAngle(&this->rot_0F4.y, temp1, 0.2f, 3.0f, 0.0f); + if ((fabsf(this->obj.pos.x - otherActor->obj.pos.x) < 500.0f) && + (fabsf(this->obj.pos.z - otherActor->obj.pos.z) < 500.0f)) { otherActor->obj.status = OBJ_FREE; - actor->iwork[0]++; + this->iwork[0]++; } break; } } - Matrix_RotateY(gCalcMatrix, actor->rot_0F4.y * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, this->rot_0F4.y * M_DTOR, MTXF_NEW); sp44.x = 0.f; sp44.y = 0.f; sp44.z = 20.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); - actor->vel.x = sp38.x; - actor->vel.z = sp38.z; - temp2 = &gZOSnakePosRots[actor->counter_04E]; - temp2->pos.x = actor->obj.pos.x; - temp2->pos.y = actor->obj.pos.y; - temp2->pos.z = actor->obj.pos.z; - temp2->rot.x = actor->rot_0F4.x; - temp2->rot.y = actor->rot_0F4.y; - temp2->rot.z = actor->rot_0F4.z; + this->vel.x = sp38.x; + this->vel.z = sp38.z; + temp2 = &gZOSnakePosRots[this->counter_04E]; + temp2->pos.x = this->obj.pos.x; + temp2->pos.y = this->obj.pos.y; + temp2->pos.z = this->obj.pos.z; + temp2->rot.x = this->rot_0F4.x; + temp2->rot.y = this->rot_0F4.y; + temp2->rot.z = this->rot_0F4.z; } -void Zoness_80190A00(Actor* actor) { +void Zoness_Actor236_Update(Actor* this) { f32 sp2C; s32 sp28; - if ((actor->timer_0C0 == 0) && - Play_CheckDynaFloorCollision(&sp2C, &sp28, actor->obj.pos.x, actor->obj.pos.y - 50.0f, actor->obj.pos.z)) { - func_effect_8008377C(actor->obj.pos.x, sp2C, actor->obj.pos.z + 150.0f, 0.0f, 1.7f); - if (actor->vel.y >= 0.0f) { - AUDIO_PLAY_SFX(NA_SE_OUT_SPLASH_L, actor->sfxSource, 4); + if ((this->timer_0C0 == 0) && + Play_CheckDynaFloorCollision(&sp2C, &sp28, this->obj.pos.x, this->obj.pos.y - 50.0f, this->obj.pos.z)) { + func_effect_8008377C(this->obj.pos.x, sp2C, this->obj.pos.z + 150.0f, 0.0f, 1.7f); + if (this->vel.y >= 0.0f) { + AUDIO_PLAY_SFX(NA_SE_OUT_SPLASH_L, this->sfxSource, 4); } else { - AUDIO_PLAY_SFX(NA_SE_IN_SPLASH_L, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_IN_SPLASH_L, this->sfxSource, 4); } - actor->timer_0C0 = 30; + this->timer_0C0 = 30; } - Zoness_80190790(actor); - if (actor->dmgType != DMG_NONE) { - actor->dmgType = DMG_NONE; - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); + Zoness_80190790(this); + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } } @@ -730,35 +735,35 @@ typedef struct { Hitbox boxes[1]; } JntHitbox; -void Zoness_80190D0C(Actor* actor) { +void Zoness_80190D0C(Actor* this) { Hitbox* var_s2 = (((JntHitbox*) SEGMENTED_TO_VIRTUAL(D_ZO_602BC58))->boxes); s32 i; s32 k; PosRot* temp_s0; - actor->unk_04A = 0; - for (i = actor->unk_04A; i < 20; i++, var_s2++) { - k = (D_i3_801BF56C[i] + actor->counter_04E) % 200; + this->unk_04A = 0; + for (i = this->unk_04A; i < 20; i++, var_s2++) { + k = (D_i3_801BF56C[i] + this->counter_04E) % 200; temp_s0 = &gZOSnakePosRots[k]; - var_s2->z.offset = temp_s0->pos.z - actor->obj.pos.z; - var_s2->y.offset = temp_s0->pos.y - actor->obj.pos.y; - var_s2->x.offset = temp_s0->pos.x - actor->obj.pos.x; + var_s2->z.offset = temp_s0->pos.z - this->obj.pos.z; + var_s2->y.offset = temp_s0->pos.y - this->obj.pos.y; + var_s2->x.offset = temp_s0->pos.x - this->obj.pos.x; Zoness_80190B4C(temp_s0->pos.x, temp_s0->pos.y, temp_s0->pos.z, temp_s0->rot.x, temp_s0->rot.y, temp_s0->rot.z, - D_i3_801BF594[i], actor->timer_0C6 % 2U); + D_i3_801BF594[i], this->timer_0C6 % 2U); if (gPlayState != PLAY_PAUSE) { - Math_SmoothStepToF(&temp_s0->pos.y, actor->fwork[2], 1.0f, 10.0f, 0.0f); + Math_SmoothStepToF(&temp_s0->pos.y, this->fwork[2], 1.0f, 10.0f, 0.0f); } } } -void Zoness_80190F08(Actor* actor) { - Zoness_80190D0C(actor); +void Zoness_Actor236_Draw(Actor236* this) { + Zoness_80190D0C(this); } void Zoness_80190F28(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp2C = { 0.0f, 0.0f, 0.0f }; - Actor* this = thisx; + Actor* this = (Actor*) thisx; if (this->state == 3) { switch (limbIndex) { @@ -778,131 +783,141 @@ void Zoness_80190F28(s32 limbIndex, Vec3f* rot, void* thisx) { } } -void Zoness_80191010(Actor* actor) { - Vec3f sp8C; - Vec3f sp80; +void Zoness_Actor238_Update(Actor238* this) { + Vec3f src; + Vec3f dest; f32 sp7C; s32 i; f32 var_fs0; s32 sp70; - switch (actor->state) { + switch (this->state) { case 0: - actor->fwork[3] = actor->obj.rot.x; - actor->fwork[1] = RAND_FLOAT_CENTERED(1000.0f); - actor->health = 10; - actor->timer_0BC = 30; - actor->scale = 5.0f; - actor->gravity = 1.0f; - actor->obj.rot.x = 315.0f; - actor->state++; + this->fwork[3] = this->obj.rot.x; + this->fwork[1] = RAND_FLOAT_CENTERED(1000.0f); + this->health = 10; + this->timer_0BC = 30; + this->scale = 5.0f; + this->gravity = 1.0f; + this->obj.rot.x = 315.0f; + this->state++; break; + case 1: - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); - sp8C.x = 0.0f; - sp8C.y = 0.0f; - sp8C.z = (actor->fwork[3] * 10.0f) + 30.0f; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp8C, &sp80); - actor->vel.x = sp80.x; - actor->vel.y = sp80.y; - actor->vel.z = sp80.z; - actor->state++; + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + src.x = 0.0f; + src.y = 0.0f; + src.z = (this->fwork[3] * 10.0f) + 30.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + this->vel.x = dest.x; + this->vel.y = dest.y; + this->vel.z = dest.z; + this->state++; break; + case 2: - if (actor->timer_0BC == 0) { - actor->obj.rot.z += 30.0f; - if (actor->animFrame > 0) { - actor->animFrame--; + if (this->timer_0BC == 0) { + this->obj.rot.z += 30.0f; + if (this->animFrame > 0) { + this->animFrame--; } } else { - if (actor->animFrame < Animation_GetFrameCount(&D_ZO_601AA48)) { - actor->animFrame++; + if (this->animFrame < Animation_GetFrameCount(&D_ZO_601AA48)) { + this->animFrame++; } } + var_fs0 = 5.0f; - if (actor->obj.rot.x < 90.0f) { + if (this->obj.rot.x < 90.0f) { var_fs0 = 1.0f; } - Math_SmoothStepToAngle(&actor->obj.rot.x, 45.0f, 0.1f, var_fs0, 0.01f); - if (actor->obj.pos.y < -500.0f) { - actor->obj.rot.x = 0.0f; - actor->gravity = 0.0f; - actor->vel.y = 0.0f; - Object_Kill(&actor->obj, actor->sfxSource); + + Math_SmoothStepToAngle(&this->obj.rot.x, 45.0f, 0.1f, var_fs0, 0.01f); + + if (this->obj.pos.y < -500.0f) { + this->obj.rot.x = 0.0f; + this->gravity = 0.0f; + this->vel.y = 0.0f; + Object_Kill(&this->obj, this->sfxSource); } - if (Play_CheckDynaFloorCollision(&sp7C, &sp70, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z) && - (actor->iwork[0] < 2) && (actor->timer_0C0 == 0)) { + + if (Play_CheckDynaFloorCollision(&sp7C, &sp70, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z) && + (this->iwork[0] < 2) && (this->timer_0C0 == 0)) { if (var_fs0 == 5.0f) { - AUDIO_PLAY_SFX(NA_SE_OUT_SPLASH_L, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OUT_SPLASH_L, this->sfxSource, 4); } else { - AUDIO_PLAY_SFX(NA_SE_IN_SPLASH_L, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_IN_SPLASH_L, this->sfxSource, 4); } - actor->timer_0C0 = 10; - actor->iwork[0]++; - func_effect_8008377C(actor->obj.pos.x, sp7C, actor->obj.pos.z, 0.0f, 0.7f); + this->timer_0C0 = 10; + this->iwork[0]++; + func_effect_8008377C(this->obj.pos.x, sp7C, this->obj.pos.z, 0.0f, 0.7f); } break; + case 3: for (i = 0; i < 3; i++) { - Zoness_SpawnDebris(&actor->vwork[i], &actor->vwork[3 + i], RAND_FLOAT_CENTERED(20.0f), - RAND_FLOAT(-10.0f), RAND_FLOAT(10.0f), 42, actor->scale, 200, i); + Zoness_SpawnDebris(&this->vwork[i], &this->vwork[3 + i], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(-10.0f), + RAND_FLOAT(10.0f), 42, this->scale, 200, i); } - actor->itemDrop = DROP_SILVER_RING_25p; - Actor_Despawn(actor); - func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 3.0f); - AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_S, actor->sfxSource, 4); - Object_Kill(&actor->obj, actor->sfxSource); - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_BIRD_DOWN); + this->itemDrop = DROP_SILVER_RING_25p; + Actor_Despawn(this); + func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 3.0f); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_S, this->sfxSource, 4); + Object_Kill(&this->obj, this->sfxSource); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_BIRD_DOWN); break; } - if ((actor->dmgType != DMG_NONE) && (actor->health != 0)) { - actor->dmgType = DMG_NONE; - actor->timer_0C6 = 15; - actor->health -= actor->damage; - if (actor->health <= 0) { - actor->health = 0; - actor->state = 3; + + if ((this->dmgType != DMG_NONE) && (this->health != 0)) { + this->dmgType = DMG_NONE; + this->timer_0C6 = 15; + this->health -= this->damage; + if (this->health <= 0) { + this->health = 0; + this->state = 3; } } } -void Zoness_801914C4(Actor* actor) { - Vec3f sp38[20]; +void Zoness_Actor238_Draw(Actor238* this) { + Vec3f frameTable[20]; - Matrix_Scale(gCalcMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY); + Matrix_Scale(gCalcMatrix, this->scale, this->scale, this->scale, MTXF_APPLY); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - Animation_GetFrameData(&D_ZO_601AA48, actor->animFrame, sp38); - Animation_DrawSkeleton(3, D_ZO_601AB14, sp38, NULL, Zoness_80190F28, actor, gCalcMatrix); + Animation_GetFrameData(&D_ZO_601AA48, this->animFrame, frameTable); + Animation_DrawSkeleton(3, D_ZO_601AB14, frameTable, NULL, Zoness_80190F28, this, gCalcMatrix); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); } -void Zoness_801915A4(Actor* actor) { +void Zoness_801915A4(Actor* this) { s32 i; Actor* actor241; - actor->health = 50; - actor->fwork[0] = actor->obj.pos.z - 10000.0f; - for (i = 0, actor241 = gActors; i < ARRAY_COUNT(gActors); i++, actor241++) { + this->health = 50; + this->fwork[0] = this->obj.pos.z - 10000.0f; + + for (i = 0, actor241 = &gActors[0]; i < ARRAY_COUNT(gActors); i++, actor241++) { if (actor241->obj.status == OBJ_FREE) { Actor_Initialize(actor241); actor241->obj.status = OBJ_INIT; actor241->obj.id = OBJ_ACTOR_241; - actor241->obj.pos.x = actor->obj.pos.x; - actor241->obj.pos.y = actor->obj.pos.y; - actor241->obj.pos.z = actor->obj.pos.z; - actor241->iwork[0] = actor->index + 1; + actor241->obj.pos.x = this->obj.pos.x; + actor241->obj.pos.y = this->obj.pos.y; + actor241->obj.pos.z = this->obj.pos.z; + actor241->iwork[0] = this->index + 1; Object_SetInfo(&actor241->info, actor241->obj.id); - actor->iwork[0] = i; + this->iwork[0] = i; break; } } + if (i >= ARRAY_COUNT(gActors)) { actor241->obj.status = OBJ_FREE; } } -void Zoness_80191680(Actor* actor) { +void Zoness_Actor240_Update(Actor240* this) { f32 sp64; f32 sp60; f32 sp5C; @@ -912,75 +927,92 @@ void Zoness_80191680(Actor* actor) { Vec3f sp3C; Actor* otherActor; - if (actor->obj.pos.z < actor->fwork[0]) { - actor->state = 1; + if (this->obj.pos.z < this->fwork[0]) { + this->state = 1; } - if ((actor->dmgType != DMG_NONE) && (actor->health != 0)) { - actor->dmgType = DMG_NONE; - actor->timer_0C6 = 15; - actor->health -= actor->damage; - AUDIO_PLAY_SFX(NA_SE_EN_BIRD_DAMAGE, actor->sfxSource, 4); - if (actor->health <= 0) { - actor->health = actor->itemDrop = 0; - Actor_Despawn(actor); - actor->state = 1; - AUDIO_PLAY_SFX(NA_SE_EN_BIRD_DOWN, actor->sfxSource, 4); + + if ((this->dmgType != DMG_NONE) && (this->health != 0)) { + this->dmgType = DMG_NONE; + this->timer_0C6 = 15; + this->health -= this->damage; + AUDIO_PLAY_SFX(NA_SE_EN_BIRD_DAMAGE, this->sfxSource, 4); + if (this->health <= 0) { + this->health = this->itemDrop = 0; + Actor_Despawn(this); + this->state = 1; + AUDIO_PLAY_SFX(NA_SE_EN_BIRD_DOWN, this->sfxSource, 4); } } - actor->animFrame++; - if (actor->animFrame >= Animation_GetFrameCount(&D_ENMY_PLANET_40057AC)) { - actor->animFrame = 0; + + this->animFrame++; + + if (this->animFrame >= Animation_GetFrameCount(&D_ENMY_PLANET_40057AC)) { + this->animFrame = 0; } - if (actor->timer_0BC == 0) { - actor->timer_0BC = 30; - actor->fwork[1] = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(1000.0f); - actor->fwork[2] = gPlayer[0].pos.y + 50.0f + RAND_FLOAT(200.0f); - actor->fwork[3] = gPlayer[0].trueZpos - 1500.0f; + + if (this->timer_0BC == 0) { + this->timer_0BC = 30; + this->fwork[1] = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(1000.0f); + this->fwork[2] = gPlayer[0].pos.y + 50.0f + RAND_FLOAT(200.0f); + this->fwork[3] = gPlayer[0].trueZpos - 1500.0f; } - actor->fwork[3] += gPlayer[0].vel.z; - sp64 = actor->fwork[1] - actor->obj.pos.x; - sp60 = actor->fwork[2] - actor->obj.pos.y; - sp5C = actor->fwork[3] - actor->obj.pos.z; + + this->fwork[3] += gPlayer[0].vel.z; + + sp64 = this->fwork[1] - this->obj.pos.x; + sp60 = this->fwork[2] - this->obj.pos.y; + sp5C = this->fwork[3] - this->obj.pos.z; + sp54 = Math_RadToDeg(Math_Atan2F(sp64, sp5C)); - otherActor = &gActors[actor->iwork[0]]; - if ((actor->state != 0) || (otherActor->obj.status == OBJ_FREE)) { - actor->lockOnTimers[TEAM_ID_FOX] = 0; - actor->info.targetOffset = 0.0f; + + otherActor = &gActors[this->iwork[0]]; + + if ((this->state != 0) || (otherActor->obj.status == OBJ_FREE)) { + this->lockOnTimers[TEAM_ID_FOX] = 0; + this->info.targetOffset = 0.0f; sp54 += 180.0f; if (sp54 > 360.0f) { sp54 -= 360.0f; } - if (actor->timer_0C6 == 0) { - actor->timer_0C6 = 15; + if (this->timer_0C6 == 0) { + this->timer_0C6 = 15; } } + sp58 = sqrtf(SQ(sp64) + SQ(sp5C)); sp58 = Math_RadToDeg(-Math_Atan2F(sp60, sp58)); - sp60 = Math_SmoothStepToAngle(&actor->obj.rot.y, sp54, 0.2f, 4.0f, 0.0f); - Math_SmoothStepToAngle(&actor->obj.rot.x, sp58, 0.2f, 4.0f, 0.0f); + sp60 = Math_SmoothStepToAngle(&this->obj.rot.y, sp54, 0.2f, 4.0f, 0.0f); + + Math_SmoothStepToAngle(&this->obj.rot.x, sp58, 0.2f, 4.0f, 0.0f); + sp5C = 330.0f; if (sp60 < 0.0f) { sp5C = 30.0f; } - Math_SmoothStepToAngle(&actor->obj.rot.z, sp5C, 0.2f, 4.0f, 0.0f); - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); + + Math_SmoothStepToAngle(&this->obj.rot.z, sp5C, 0.2f, 4.0f, 0.0f); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + sp48.x = sp48.y = 0.0f; sp48.z = 30.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp48, &sp3C); - actor->vel.x = sp3C.x; - actor->vel.y = sp3C.y; - actor->vel.z = sp3C.z - 20.0f; - if (otherActor->iwork[0] == (actor->index + 1)) { - if (actor->state == 0) { - otherActor->obj.pos.x = actor->obj.pos.x; - otherActor->obj.pos.y = actor->obj.pos.y - 50.0f; - otherActor->obj.pos.z = actor->obj.pos.z; - actor->fwork[4] = otherActor->obj.pos.x; - actor->fwork[5] = otherActor->obj.pos.y; - actor->fwork[6] = otherActor->obj.pos.z; - if (((gGameFrameCount % 16) == 0) && (fabsf(gPlayer[0].pos.x - actor->obj.pos.x) < 100.0f)) { - func_effect_80081BEC(actor->fwork[4], actor->fwork[5], actor->fwork[6], 1.0f, 0); + + this->vel.x = sp3C.x; + this->vel.y = sp3C.y; + this->vel.z = sp3C.z - 20.0f; + + if (otherActor->iwork[0] == (this->index + 1)) { + if (this->state == 0) { + otherActor->obj.pos.x = this->obj.pos.x; + otherActor->obj.pos.y = this->obj.pos.y - 50.0f; + otherActor->obj.pos.z = this->obj.pos.z; + this->fwork[4] = otherActor->obj.pos.x; + this->fwork[5] = otherActor->obj.pos.y; + this->fwork[6] = otherActor->obj.pos.z; + if (((gGameFrameCount % 16) == 0) && (fabsf(gPlayer[0].pos.x - this->obj.pos.x) < 100.0f)) { + func_effect_80081BEC(this->fwork[4], this->fwork[5], this->fwork[6], 1.0f, 0); } } else { otherActor->vel.y -= 1.0f; @@ -988,45 +1020,48 @@ void Zoness_80191680(Actor* actor) { } } -void Zoness_80191B4C(Actor* actor) { - Animation_GetFrameData(&D_ENMY_PLANET_40057AC, actor->animFrame, actor->vwork); - Animation_DrawSkeleton(1, D_ENMY_PLANET_40058B8, actor->vwork, NULL, NULL, &actor->index, &gIdentityMatrix); +void Zoness_Actor240_Draw(Actor240* this) { + Animation_GetFrameData(&D_ENMY_PLANET_40057AC, this->animFrame, this->vwork); + Animation_DrawSkeleton(1, D_ENMY_PLANET_40058B8, this->vwork, NULL, NULL, &this->index, &gIdentityMatrix); } -void Zoness_80191BB8(Actor* actor) { +void Zoness_80191BB8(Actor* this) { } -void Zoness_80191BC4(Actor* actor) { +void Zoness_Actor241_Update(Actor241* this) { f32 sp4C; s32 sp48; - if ((actor->vel.y != 0.0f) && (actor->iwork[1] == 0)) { - actor->iwork[1] = 1; - AUDIO_PLAY_SFX(NA_SE_EN_FALLING_DOWN, actor->sfxSource, 4); + if ((this->vel.y != 0.0f) && (this->iwork[1] == 0)) { + this->iwork[1] = 1; + AUDIO_PLAY_SFX(NA_SE_EN_FALLING_DOWN, this->sfxSource, 4); } - if (Play_CheckDynaFloorCollision(&sp4C, &sp48, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z) && - (actor->state == 0)) { - func_effect_8007B344(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 20.0f, 7); - func_effect_8007C120(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.5f, 50); - Object_Kill(&actor->obj, actor->sfxSource); - actor->iwork[0] = 0; - func_effect_8007A6F0(&actor->obj.pos, NA_SE_OB_MINI_BOMB); + + if (Play_CheckDynaFloorCollision(&sp4C, &sp48, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z) && + (this->state == 0)) { + func_effect_8007B344(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 20.0f, 7); + func_effect_8007C120(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.5f, 50); + Object_Kill(&this->obj, this->sfxSource); + this->iwork[0] = 0; + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_OB_MINI_BOMB); } - actor->fwork[0] += 10.0f; - Zoness_8018FF50(actor); + + this->fwork[0] += 10.0f; + + Zoness_8018FF50(this); + if (((gGameFrameCount % 2) == 0)) { - func_effect_8007C484(RAND_FLOAT_CENTERED(50.0f) + actor->obj.pos.x, - RAND_FLOAT_CENTERED(50.0f) + actor->obj.pos.y, - RAND_FLOAT_CENTERED(50.0f) + actor->obj.pos.z, actor->vel.x, actor->vel.y, actor->vel.z, + func_effect_8007C484(RAND_FLOAT_CENTERED(50.0f) + this->obj.pos.x, RAND_FLOAT_CENTERED(50.0f) + this->obj.pos.y, + RAND_FLOAT_CENTERED(50.0f) + this->obj.pos.z, this->vel.x, this->vel.y, this->vel.z, RAND_FLOAT(0.05f) + 0.05f, 0); } } -void Zoness_80191DB0(Actor* actor) { +void Zoness_Actor241_Draw(Actor241* this) { RCP_SetupDL_40(); gSPDisplayList(gMasterDisp++, D_ZO_6019EB0); - Matrix_RotateY(gGfxMatrix, actor->fwork[0] * 0.7f * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, actor->fwork[0] * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, this->fwork[0] * 0.7f * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, this->fwork[0] * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ZO_6023D50); } @@ -1065,20 +1100,20 @@ void Zoness_80191E94(s32 limbIndex, Vec3f* rot, void* thisx) { } } -void Zoness_80191FFC(Actor* actor) { - Vec3f sp30[20]; +void Zoness_Actor242_Draw(Actor242* this) { + Vec3f jointTable[20]; - Matrix_Scale(gCalcMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY); - Animation_GetFrameData(&D_ZO_60195EC, actor->animFrame, sp30); - Animation_DrawSkeleton(3, D_ZO_6019738, sp30, NULL, Zoness_80191E94, actor, gCalcMatrix); + Matrix_Scale(gCalcMatrix, this->scale, this->scale, this->scale, MTXF_APPLY); + Animation_GetFrameData(&D_ZO_60195EC, this->animFrame, jointTable); + Animation_DrawSkeleton(3, D_ZO_6019738, jointTable, NULL, Zoness_80191E94, this, gCalcMatrix); } -void Zoness_80192094(Actor* actor) { +void Zoness_Actor242_Update(Actor242* this) { s32 i; f32 spB8; - f32 temp_fs0; - f32 spB0; - f32 temp_fs1; + f32 x; + f32 y; + f32 z; f32 temp_fs0_2; f32 spA4; s32 spA0; @@ -1087,116 +1122,128 @@ void Zoness_80192094(Actor* actor) { Vec3f sp7C = { 0.0f, 0.0f, 0.0f }; Vec3f sp70; - temp_fs0 = gPlayer[0].pos.x - actor->obj.pos.x; - spB0 = gPlayer[0].pos.y - actor->obj.pos.y; - temp_fs1 = gPlayer[0].trueZpos - actor->obj.pos.z; - spA4 = Math_RadToDeg(Math_Atan2F(temp_fs0, temp_fs1)); - temp_fs0_2 = sqrtf(SQ(temp_fs0) + SQ(temp_fs1)); - temp_fs0_2 = Math_RadToDeg(-Math_Atan2F(spB0, temp_fs0_2)); - Math_SmoothStepToAngle(&actor->obj.rot.x, temp_fs0_2, 0.1f, 10.0f, 0.00001f); - Math_SmoothStepToAngle(&actor->obj.rot.y, spA4, 0.1f, 10.0f, 0.00001f); - if ((actor->iwork[0] == 0) && - (Play_CheckDynaFloorCollision(&spB8, &spA0, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z) != 0)) { - func_effect_8008377C(actor->obj.pos.x, spB8, actor->obj.pos.z + 100.0f, 0.0f, 1.5f); - actor->iwork[0]++; - if (actor->vel.y >= 0.0f) { - AUDIO_PLAY_SFX(NA_SE_OUT_SPLASH_L, actor->sfxSource, 4); + x = gPlayer[0].pos.x - this->obj.pos.x; + y = gPlayer[0].pos.y - this->obj.pos.y; + z = gPlayer[0].trueZpos - this->obj.pos.z; + + spA4 = Math_RadToDeg(Math_Atan2F(x, z)); + temp_fs0_2 = sqrtf(SQ(x) + SQ(z)); + temp_fs0_2 = Math_RadToDeg(-Math_Atan2F(y, temp_fs0_2)); + + Math_SmoothStepToAngle(&this->obj.rot.x, temp_fs0_2, 0.1f, 10.0f, 0.00001f); + Math_SmoothStepToAngle(&this->obj.rot.y, spA4, 0.1f, 10.0f, 0.00001f); + + if ((this->iwork[0] == 0) && + (Play_CheckDynaFloorCollision(&spB8, &spA0, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z) != 0)) { + func_effect_8008377C(this->obj.pos.x, spB8, this->obj.pos.z + 100.0f, 0.0f, 1.5f); + + this->iwork[0]++; + + if (this->vel.y >= 0.0f) { + AUDIO_PLAY_SFX(NA_SE_OUT_SPLASH_L, this->sfxSource, 4); } else { - AUDIO_PLAY_SFX(NA_SE_IN_SPLASH_L, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_IN_SPLASH_L, this->sfxSource, 4); } } - switch (actor->state) { + + switch (this->state) { case 0: - actor->state++; - actor->vel.y = 20.0f; - actor->scale = 2.0f; + this->state++; + this->vel.y = 20.0f; + this->scale = 2.0f; break; + case 1: - actor->animFrame++; - if (actor->animFrame >= Animation_GetFrameCount(&D_ZO_60195EC)) { - actor->animFrame = 64; - Math_SmoothStepToF(&actor->vel.z, 0.0f, 1.0f, 100.0f, 0.00001f); - if (actor->obj.pos.y < -500.0f) { - Object_Kill(&actor->obj, actor->sfxSource); + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_ZO_60195EC)) { + this->animFrame = 64; + Math_SmoothStepToF(&this->vel.z, 0.0f, 1.0f, 100.0f, 0.00001f); + if (this->obj.pos.y < -500.0f) { + Object_Kill(&this->obj, this->sfxSource); } } - if (actor->animFrame == 25) { - actor->fwork[2] = 0.0f; - actor->vel.y = 0.0f; - actor->iwork[1] = 0; - actor->fwork[3] = 150.0f; - actor->state++; + + if (this->animFrame == 25) { + this->fwork[2] = 0.0f; + this->vel.y = 0.0f; + this->iwork[1] = 0; + this->fwork[3] = 150.0f; + this->state++; } break; + case 2: - if (actor->iwork[1] > 20) { - actor->iwork[0] = 0; - actor->state = 3; - actor->vel.y = 50.0f; - if (actor->animFrame == 51) { - actor->state = 1; - actor->vel.y = -20.0f; + if (this->iwork[1] > 20) { + this->iwork[0] = 0; + this->state = 3; + this->vel.y = 50.0f; + if (this->animFrame == 51) { + this->state = 1; + this->vel.y = -20.0f; } } else { - Math_SmoothStepToF(&actor->vel.z, -40.0f, 0.1f, 1.0f, 0.00001f); - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, actor->fwork[2] * M_DTOR, MTXF_APPLY); + Math_SmoothStepToF(&this->vel.z, -40.0f, 0.1f, 1.0f, 0.00001f); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, this->fwork[2] * M_DTOR, MTXF_APPLY); sp70.x = 0.0f; - sp70.y = actor->fwork[3]; + sp70.y = this->fwork[3]; sp70.z = 0.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp70, &sp94); - sp94.x += actor->obj.pos.x; - sp94.y += actor->obj.pos.y; - sp94.z = actor->obj.pos.z - 200.0f; + sp94.x += this->obj.pos.x; + sp94.y += this->obj.pos.y; + sp94.z = this->obj.pos.z - 200.0f; sp70.x = 0.0f; sp70.y = 0.0f; sp70.z = 100.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp70, &sp88); func_effect_8007EE68(OBJ_EFFECT_355, &sp94, &sp7C, &sp7C, &sp88, 1.0f); - actor->fwork[2] += 40.0f; - actor->fwork[2] = Math_ModF(actor->fwork[2], 360.0f); - Math_SmoothStepToF(&actor->fwork[3], 0.0f, 1.0f, 5.0f, 0.0001f); - actor->iwork[1]++; + this->fwork[2] += 40.0f; + this->fwork[2] = Math_ModF(this->fwork[2], 360.0f); + Math_SmoothStepToF(&this->fwork[3], 0.0f, 1.0f, 5.0f, 0.0001f); + this->iwork[1]++; } break; + case 3: - Math_SmoothStepToF(&actor->vel.z, -60.0f, 0.1f, 100.0f, 0.00001f); - Math_SmoothStepToF(&actor->vel.y, -30.0f, 0.1f, 100.0f, 0.00001f); - actor->animFrame++; - if (actor->animFrame == 51) { - actor->fwork[2] = 0.0f; - actor->vel.y = 0.0f; - actor->iwork[1] = 0; - actor->state = 2; - actor->fwork[3] = 150.0f; + Math_SmoothStepToF(&this->vel.z, -60.0f, 0.1f, 100.0f, 0.00001f); + Math_SmoothStepToF(&this->vel.y, -30.0f, 0.1f, 100.0f, 0.00001f); + this->animFrame++; + if (this->animFrame == 51) { + this->fwork[2] = 0.0f; + this->vel.y = 0.0f; + this->iwork[1] = 0; + this->state = 2; + this->fwork[3] = 150.0f; } break; + case 4: for (i = 0; i < 6; i++) { - Zoness_SpawnDebris(&actor->vwork[i], &actor->vwork[i + 6], RAND_FLOAT_CENTERED(40.0f), - RAND_FLOAT(-10.0f), RAND_FLOAT(20.0f), 44, actor->scale, 200, i); + Zoness_SpawnDebris(&this->vwork[i], &this->vwork[i + 6], RAND_FLOAT_CENTERED(40.0f), RAND_FLOAT(-10.0f), + RAND_FLOAT(20.0f), 44, this->scale, 200, i); } - actor->itemDrop = DROP_BOMB; - Actor_Despawn(actor); - Object_Kill(&actor->obj, actor->sfxSource); - func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f); + this->itemDrop = DROP_BOMB; + Actor_Despawn(this); + Object_Kill(&this->obj, this->sfxSource); + func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 10.0f); break; } - if ((actor->dmgType != DMG_NONE) && (actor->state < 3)) { - if (actor->dmgType != DMG_BEAM) { - BonusText_Display(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 200.0f, 5); + + if ((this->dmgType != DMG_NONE) && (this->state < 3)) { + if (this->dmgType != DMG_BEAM) { + BonusText_Display(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 200.0f, 5); gHitCount += 6; D_ctx_80177850 = 15; - actor->state = 4; + this->state = 4; } - actor->dmgType = DMG_NONE; + this->dmgType = DMG_NONE; } } void Zoness_801926F4(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp24 = { 0.0f, 0.0f, 0.0f }; - Actor* this = thisx; + Actor* this = (Actor*) thisx; if (this->state == 2) { switch (limbIndex) { @@ -1224,90 +1271,96 @@ void Zoness_801926F4(s32 limbIndex, Vec3f* rot, void* thisx) { } } -void Zoness_80192834(Actor* actor) { - Vec3f sp84; - Vec3f sp78; +void Zoness_Actor243_Update(Actor243* this) { + Vec3f src; + Vec3f dest; f32 sp74; s32 sp70; s32 i; - switch (actor->state) { + switch (this->state) { case 0: - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, 5.497787f, MTXF_APPLY); - sp84.y = 0.0f; - sp84.x = 0.0f; - sp84.z = (actor->obj.rot.x * 10.0f) + 15.0f; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp84, &sp78); - actor->vel.x = sp78.x; - actor->vel.y = sp78.y; - actor->vel.z = sp78.z; - actor->health = 10; - actor->state++; + src.y = 0.0f; + src.x = 0.0f; + src.z = (this->obj.rot.x * 10.0f) + 15.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + this->vel.x = dest.x; + this->vel.y = dest.y; + this->vel.z = dest.z; + this->health = 10; + this->state++; break; + case 1: - Math_SmoothStepToF(&actor->vel.y, -30.0f, 0.1f, 1.0f, 0.01f); - if (actor->obj.pos.y < 0.0f) { - actor->iwork[0] = 0; + Math_SmoothStepToF(&this->vel.y, -30.0f, 0.1f, 1.0f, 0.01f); + + if (this->obj.pos.y < 0.0f) { + this->iwork[0] = 0; } - if (actor->obj.pos.y < -50.0f) { - Object_Kill(&actor->obj, actor->sfxSource); + if (this->obj.pos.y < -50.0f) { + Object_Kill(&this->obj, this->sfxSource); } - if (actor->vel.y > 0.0f) { - if (actor->animFrame < 17) { - actor->animFrame++; + + if (this->vel.y > 0.0f) { + if (this->animFrame < 17) { + this->animFrame++; } } else { - if (actor->animFrame < Animation_GetFrameCount(&D_ZO_6021ABC)) { - actor->animFrame++; + if (this->animFrame < Animation_GetFrameCount(&D_ZO_6021ABC)) { + this->animFrame++; } } - actor->obj.rot.x += 20.0f; - actor->obj.rot.x = Math_ModF(actor->obj.rot.x, 360.0f); - if ((actor->dmgType != DMG_NONE) && (actor->health != 0)) { - actor->dmgType = DMG_NONE; - actor->health -= actor->damage; - if (actor->health <= 0) { - actor->health = 0; - actor->state++; + + this->obj.rot.x += 20.0f; + this->obj.rot.x = Math_ModF(this->obj.rot.x, 360.0f); + + if ((this->dmgType != DMG_NONE) && (this->health != 0)) { + this->dmgType = DMG_NONE; + this->health -= this->damage; + if (this->health <= 0) { + this->health = 0; + this->state++; } } break; + case 2: for (i = 0; i < 5; i++) { - Zoness_SpawnDebris(&actor->vwork[i], &actor->vwork[5 + i], RAND_FLOAT_CENTERED(20.0f), - RAND_FLOAT(-10.0f), RAND_FLOAT(10.0f), 43, actor->scale, 200, i); + Zoness_SpawnDebris(&this->vwork[i], &this->vwork[5 + i], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(-10.0f), + RAND_FLOAT(10.0f), 43, this->scale, 200, i); } - actor->itemDrop = DROP_NONE; - Actor_Despawn(actor); - Object_Kill(&actor->obj, actor->sfxSource); - func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 3.0f); - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_BIRD_DOWN); + this->itemDrop = DROP_NONE; + Actor_Despawn(this); + Object_Kill(&this->obj, this->sfxSource); + func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 3.0f); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_BIRD_DOWN); break; } - if ((actor->iwork[0] == 0) && - (Play_CheckDynaFloorCollision(&sp74, &sp70, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z) != 0)) { - actor->iwork[0]++; - func_effect_8008377C(actor->obj.pos.x, sp74, actor->obj.pos.z, 0.0f, 0.7f); - if (actor->vel.y >= 0.0f) { - AUDIO_PLAY_SFX(NA_SE_OUT_SPLASH_L, actor->sfxSource, 4); + if ((this->iwork[0] == 0) && + (Play_CheckDynaFloorCollision(&sp74, &sp70, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z) != 0)) { + this->iwork[0]++; + func_effect_8008377C(this->obj.pos.x, sp74, this->obj.pos.z, 0.0f, 0.7f); + if (this->vel.y >= 0.0f) { + AUDIO_PLAY_SFX(NA_SE_OUT_SPLASH_L, this->sfxSource, 4); } else { - AUDIO_PLAY_SFX(NA_SE_IN_SPLASH_L, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_IN_SPLASH_L, this->sfxSource, 4); } } } -void Zoness_80192C18(Actor* actor) { - Vec3f sp28[20]; +void Zoness_Actor243_Draw(Actor243* this) { + Vec3f frameTable[20]; - Animation_GetFrameData(&D_ZO_6021ABC, actor->animFrame, sp28); - Animation_DrawSkeleton(3, D_ZO_6021B88, sp28, NULL, Zoness_801926F4, actor, gCalcMatrix); + Animation_GetFrameData(&D_ZO_6021ABC, this->animFrame, frameTable); + Animation_DrawSkeleton(3, D_ZO_6021B88, frameTable, NULL, Zoness_801926F4, this, gCalcMatrix); } void Zoness_80192C84(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp24 = { 0.0f, 0.0f, 0.0f }; - Actor* this = thisx; + Actor* this = (Actor*) thisx; if (this->state == 3) { switch (limbIndex) { @@ -1351,76 +1404,81 @@ void Zoness_80192C84(s32 limbIndex, Vec3f* rot, void* thisx) { } } -void Zoness_80192E64(Actor* actor) { +void Zoness_Actor244_Update(Actor244* this) { s32 i; - Vec3f sp80; - Vec3f sp74; + Vec3f src; + Vec3f dest; f32 sp70; s32 sp6C; - switch (actor->state) { + switch (this->state) { case 0: - actor->obj.pos.y = 380.0f; - actor->state = 1; + this->obj.pos.y = 380.0f; + this->state = 1; break; + case 1: - Math_SmoothStepToF(&actor->vel.x, 0.0f, 0.1f, 1.0f, 0.0001); - Math_SmoothStepToF(&actor->vel.z, 0.0f, 0.1f, 1.0f, 0.0001f); - if (actor->timer_0BC == 0) { - actor->animFrame++; - if (actor->animFrame == 5) { - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); - sp80.x = 0.0f; - sp80.y = 0.0f; - sp80.z = 50.0f; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp80, &sp74); - actor->vel.x = sp74.x; - actor->vel.z = sp74.z; - actor->state = 2; + Math_SmoothStepToF(&this->vel.x, 0.0f, 0.1f, 1.0f, 0.0001); + Math_SmoothStepToF(&this->vel.z, 0.0f, 0.1f, 1.0f, 0.0001f); + if (this->timer_0BC == 0) { + this->animFrame++; + if (this->animFrame == 5) { + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + src.x = 0.0f; + src.y = 0.0f; + src.z = 50.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + this->vel.x = dest.x; + this->vel.z = dest.z; + this->state = 2; } } break; + case 2: - Math_SmoothStepToF(&actor->vel.x, 0.0f, 0.1f, 1.0f, 0.0001f); - Math_SmoothStepToF(&actor->vel.z, 0.0f, 0.1f, 1.0f, 0.0001f); - if (actor->animFrame < Animation_GetFrameCount(&D_ZO_601AFB8)) { - actor->animFrame++; + Math_SmoothStepToF(&this->vel.x, 0.0f, 0.1f, 1.0f, 0.0001f); + Math_SmoothStepToF(&this->vel.z, 0.0f, 0.1f, 1.0f, 0.0001f); + if (this->animFrame < Animation_GetFrameCount(&D_ZO_601AFB8)) { + this->animFrame++; } else { - actor->animFrame = 0; - actor->timer_0BC = 30; - actor->state = 1; + this->animFrame = 0; + this->timer_0BC = 30; + this->state = 1; } break; + case 3: for (i = 0; i < 9; i++) { - Zoness_SpawnDebris(&actor->vwork[i], &actor->vwork[9 + i], RAND_FLOAT_CENTERED(40.0f), - RAND_FLOAT(-10.0f), RAND_FLOAT(20.0f), 59, actor->scale, 200, i); + Zoness_SpawnDebris(&this->vwork[i], &this->vwork[9 + i], RAND_FLOAT_CENTERED(40.0f), RAND_FLOAT(-10.0f), + RAND_FLOAT(20.0f), 59, this->scale, 200, i); } - actor->itemDrop = DROP_BOMB_33p; - Actor_Despawn(actor); - Object_Kill(&actor->obj, actor->sfxSource); - func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f); + this->itemDrop = DROP_BOMB_33p; + Actor_Despawn(this); + Object_Kill(&this->obj, this->sfxSource); + func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 10.0f); break; } - if (actor->dmgType != DMG_NONE) { - if (actor->dmgType != DMG_BEAM) { - if ((actor->state != 0) && (actor->state != 3)) { - BonusText_Display(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 200.0f, 2); + + if (this->dmgType != DMG_NONE) { + if (this->dmgType != DMG_BEAM) { + if ((this->state != 0) && (this->state != 3)) { + BonusText_Display(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 200.0f, 2); gHitCount += 3; D_ctx_80177850 = 15; - actor->state = 3; + this->state = 3; } } else { - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } - actor->dmgType = DMG_NONE; + this->dmgType = DMG_NONE; } - if (Play_CheckDynaFloorCollision(&sp70, &sp6C, actor->obj.pos.x, actor->obj.pos.y - 1000.0f, actor->obj.pos.z)) { - Math_SmoothStepToF(&actor->obj.pos.y, sp70 + 300.0f, 0.1f, 20.0f, 0); + + if (Play_CheckDynaFloorCollision(&sp70, &sp6C, this->obj.pos.x, this->obj.pos.y - 1000.0f, this->obj.pos.z)) { + Math_SmoothStepToF(&this->obj.pos.y, sp70 + 300.0f, 0.1f, 20.0f, 0); } } -void Zoness_80193240(Actor* actor) { +void Zoness_Actor244_Draw(Actor* actor) { Vec3f sp28[30]; Animation_GetFrameData(&D_ZO_601AFB8, actor->animFrame, sp28); @@ -1440,6 +1498,7 @@ void Zoness_BossZo_Init(BossZO* this) { gBossActive = true; gBossFrameCount = 0; this->vel.z = -40.0f; + for (i = 0; i < ZO_LIMB_MAX; i++) { sZoLimbTimers[i] = 0; } @@ -1471,6 +1530,7 @@ void Zoness_BossZo_Init(BossZO* this) { sZoSwork[ZO_BSS_11] = 20; sZoSwork[ZO_BSS_12] = 20; sZoSwork[ZO_BSS_13] = 61; + this->health = 300; this->obj.pos.y = -1800.0f; this->obj.rot.y = 180.0f; @@ -1485,9 +1545,12 @@ void Zoness_BossZo_Init(BossZO* this) { sZoSwork[ZO_BSS_43] = 255; sZoSwork[ZO_BSS_44] = 255; sZoFwork[ZO_BSF_25] = 0.0f; + this->timer_050 = 200; this->timer_052 = 280; + sZoSwork[ZO_BSS_37] = 255; + for (i = 0; i < 2; i++) { Actor_Initialize(&gActors[i]); gActors[i].obj.status = OBJ_INIT; @@ -1512,44 +1575,44 @@ void Zoness_BossZo_Init(BossZO* this) { } void Zoness_80193628(Object* obj, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6) { - Vec3f sp54 = { 0.0f, 0.0f, 40.0f }; - Vec3f sp48; + Vec3f src = { 0.0f, 0.0f, 40.0f }; + Vec3f dest; Matrix_RotateY(gCalcMatrix, obj->rot.y * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, obj->rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, obj->rot.z * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, M_DTOR * arg5, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, M_DTOR * arg4, MTXF_APPLY); - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48); - func_effect_8007F04C(OBJ_EFFECT_353, arg1 + sp48.x + arg6, arg2 + sp48.y, arg3 + sp48.z, arg4, arg5, 0.0f, - obj->rot.x, obj->rot.y, obj->rot.z, sp48.x + arg6, sp48.y, sp48.z, 1.0f); + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + func_effect_8007F04C(OBJ_EFFECT_ENEMY_LASER_1, arg1 + dest.x + arg6, arg2 + dest.y, arg3 + dest.z, arg4, arg5, 0.0f, + obj->rot.x, obj->rot.y, obj->rot.z, dest.x + arg6, dest.y, dest.z, 1.0f); } -void Zoness_801937D8(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yRot) { - Vec3f sp2C; - Vec3f sp20; +void Zoness_801937D8(Effect394* this, f32 xPos, f32 yPos, f32 zPos, f32 yRot) { + Vec3f src; + Vec3f dest; - Effect_Initialize(effect); + Effect_Initialize(this); Matrix_RotateY(gCalcMatrix, M_DTOR * yRot, MTXF_NEW); - sp2C.x = 0.0f; - sp2C.y = 0.0f; - sp2C.z = 10.0f; - Matrix_MultVec3f(gCalcMatrix, &sp2C, &sp20); - effect->vel.x = sp20.x; - effect->vel.y = sp20.y; - effect->vel.z = sp20.z; - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_394; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; - effect->unk_44 = 100; - effect->scale2 = 3.0f; - effect->scale1 = RAND_FLOAT_CENTERED(20.0f); - effect->unk_78 = 100; - effect->unk_7A = 14; - effect->obj.rot.z = RAND_FLOAT(360.0f); - Object_SetInfo(&effect->info, effect->obj.id); + src.x = 0.0f; + src.y = 0.0f; + src.z = 10.0f; + Matrix_MultVec3f(gCalcMatrix, &src, &dest); + this->vel.x = dest.x; + this->vel.y = dest.y; + this->vel.z = dest.z; + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_394; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + this->unk_44 = 100; + this->scale2 = 3.0f; + this->scale1 = RAND_FLOAT_CENTERED(20.0f); + this->unk_78 = 100; + this->unk_7A = 14; + this->obj.rot.z = RAND_FLOAT(360.0f); + Object_SetInfo(&this->info, this->obj.id); } void Zoness_80193908(f32 xPos, f32 yPos, f32 zPos, f32 yRot) { @@ -1563,30 +1626,30 @@ void Zoness_80193908(f32 xPos, f32 yPos, f32 zPos, f32 yRot) { } } -void Zoness_80193970(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yRot, s32 arg5) { - Vec3f sp2C; - Vec3f sp20; +void Zoness_80193970(Effect394* this, f32 xPos, f32 yPos, f32 zPos, f32 yRot, s32 arg5) { + Vec3f src; + Vec3f dest; - Effect_Initialize(effect); + Effect_Initialize(this); Matrix_RotateY(gCalcMatrix, M_DTOR * yRot, MTXF_NEW); - sp2C.x = 0.0f; - sp2C.y = 0.0f; - sp2C.z = 20.0f; - Matrix_MultVec3f(gCalcMatrix, &sp2C, &sp20); - effect->vel.x = sp20.x; - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_394; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; - effect->scale2 = 8.0f; - effect->unk_44 = arg5; - effect->scale1 = RAND_FLOAT_CENTERED(200.0f); - effect->obj.rot.z = RAND_FLOAT(360.0f); - effect->state = 1; - effect->unk_78 = 100; - effect->unk_7A = 13; - Object_SetInfo(&effect->info, effect->obj.id); + src.x = 0.0f; + src.y = 0.0f; + src.z = 20.0f; + Matrix_MultVec3f(gCalcMatrix, &src, &dest); + this->vel.x = dest.x; + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_394; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + this->scale2 = 8.0f; + this->unk_44 = arg5; + this->scale1 = RAND_FLOAT_CENTERED(200.0f); + this->obj.rot.z = RAND_FLOAT(360.0f); + this->state = 1; + this->unk_78 = 100; + this->unk_7A = 13; + Object_SetInfo(&this->info, this->obj.id); } void Zoness_80193A98(f32 xPos, f32 yPos, f32 zPos, f32 yRot, s32 arg5) { @@ -1600,31 +1663,31 @@ void Zoness_80193A98(f32 xPos, f32 yPos, f32 zPos, f32 yRot, s32 arg5) { } } -void Zoness_80193B08(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale) { - f32 temp_ft2; +void Zoness_80193B08(Effect394* this, f32 xPos, f32 yPos, f32 zPos, f32 scale) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_394; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + this->vel.x = RAND_FLOAT_CENTERED(5.0f); + this->vel.y = RAND_FLOAT_CENTERED(3.0f); - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_394; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; - effect->vel.x = RAND_FLOAT_CENTERED(5.0f); - effect->vel.y = RAND_FLOAT_CENTERED(3.0f); - effect->unk_48 = 3; + this->unk_48 = 3; if (Rand_ZeroOne() < 0.5f) { - effect->unk_48 = -effect->unk_48; + this->unk_48 = -this->unk_48; } - effect->unk_4A = 180; - effect->unk_46 = 8; - effect->unk_78 = 101; - effect->unk_7A = 15; - effect->scale2 = scale * 0.25f; - effect->obj.rot.z = RAND_FLOAT(360.0f); + this->unk_4A = 180; + this->unk_46 = 8; + this->unk_78 = 101; + this->unk_7A = 15; + this->scale2 = scale * 0.25f; + this->obj.rot.z = RAND_FLOAT(360.0f); + if (scale == 6.0f) { - effect->vel.z = gPlayer[0].vel.z * 0.6f; + this->vel.z = gPlayer[0].vel.z * 0.6f; } - Object_SetInfo(&effect->info, effect->obj.id); + Object_SetInfo(&this->info, this->obj.id); } void Zoness_80193C5C(f32 xPos, f32 yPos, f32 zPos, f32 scale) { @@ -1648,13 +1711,14 @@ f32 Zoness_80193CC8(s32 arg0) { } bool Zoness_80193D08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { - Boss* this = thisx; - f32 temp; + Boss* this = (Boss*) thisx; if (sZoLimbTimers[limbIndex] == LIMB_DESTROYED) { *dList = NULL; } + gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); + if (sZoSwork[ZO_BSS_37] != 255) { RCP_SetupDL_46(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, sZoSwork[ZO_BSS_37], sZoSwork[ZO_BSS_37]); @@ -1664,6 +1728,7 @@ bool Zoness_80193D08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* t RCP_SetupDL_27(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } + switch (limbIndex) { case ZO_LIMB_1: if (sZoFwork[ZO_BSF_0] == 0.0f) { @@ -1793,7 +1858,7 @@ bool Zoness_80193D08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* t void Zoness_80194394(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f spB4; - Boss* this = thisx; + Boss* this = (Boss*) thisx; Vec3f spA4 = { 96.0f, 199.0f, -9.0f }; Vec3f sp98 = { 50.0f, 150.0f, -20.0f }; Vec3f sp8C = { 50.0f, 150.0f, 20.0f }; @@ -1815,12 +1880,14 @@ void Zoness_80194394(s32 limbIndex, Vec3f* rot, void* thisx) { sZoFwork[ZO_BSF_32_Y] = spB4.y; sZoFwork[ZO_BSF_32_Z] = spB4.z; break; + case ZO_LIMB_4: Matrix_MultVec3f(gCalcMatrix, &sp38, &spB4); sZoFwork[ZO_BSF_99_X] = spB4.x; sZoFwork[ZO_BSF_99_Y] = spB4.y; sZoFwork[ZO_BSF_99_Z] = spB4.z; break; + case ZO_LIMB_5: var_fv1 = -1.0f; if (sZoFwork[ZO_BSF_4] < 0.0f) { @@ -1832,54 +1899,63 @@ void Zoness_80194394(s32 limbIndex, Vec3f* rot, void* thisx) { sZoFwork[ZO_BSF_60_Y] = spB4.y; sZoFwork[ZO_BSF_60_Z] = spB4.z; break; + case ZO_LIMB_6: Matrix_MultVec3f(gCalcMatrix, &sp80, &spB4); sZoFwork[ZO_BSF_52_X] = spB4.x; sZoFwork[ZO_BSF_52_Y] = spB4.y; sZoFwork[ZO_BSF_52_Z] = spB4.z; break; + case ZO_LIMB_7: Matrix_MultVec3f(gCalcMatrix, &sp2C, &spB4); sZoFwork[ZO_BSF_106_X] = spB4.x; sZoFwork[ZO_BSF_106_Y] = spB4.y; sZoFwork[ZO_BSF_106_Z] = spB4.z; break; + case ZO_LIMB_8: Matrix_MultVec3f(gCalcMatrix, &sp44, &spB4); sZoFwork[ZO_BSF_93_X] = spB4.x; sZoFwork[ZO_BSF_93_Y] = spB4.y; sZoFwork[ZO_BSF_93_Z] = spB4.z; break; + case ZO_LIMB_9: Matrix_MultVec3f(gCalcMatrix, &sp44, &spB4); sZoFwork[ZO_BSF_96_X] = spB4.x; sZoFwork[ZO_BSF_96_Y] = spB4.y; sZoFwork[ZO_BSF_96_Z] = spB4.z; break; + case ZO_LIMB_10: Matrix_MultVec3f(gCalcMatrix, &spA4, &spB4); sZoFwork[ZO_BSF_29_X] = spB4.x; sZoFwork[ZO_BSF_29_Y] = spB4.y; sZoFwork[ZO_BSF_29_Z] = spB4.z; break; + case ZO_LIMB_11: Matrix_MultVec3f(gCalcMatrix, &sp20, &spB4); sZoFwork[ZO_BSF_109_X] = spB4.x; sZoFwork[ZO_BSF_109_Y] = spB4.y; sZoFwork[ZO_BSF_109_Z] = spB4.z; break; + case ZO_LIMB_14: Matrix_MultVec3f(gCalcMatrix, &sp80, &spB4); sZoFwork[ZO_BSF_43_X] = spB4.x; sZoFwork[ZO_BSF_43_Y] = spB4.y; sZoFwork[ZO_BSF_43_Z] = spB4.z; break; + case ZO_LIMB_16: Matrix_MultVec3f(gCalcMatrix, &sp38, &spB4); sZoFwork[ZO_BSF_102_X] = spB4.x; sZoFwork[ZO_BSF_102_Y] = spB4.y; sZoFwork[ZO_BSF_102_Z] = spB4.z; break; + case ZO_LIMB_22: Matrix_MultVec3f(gCalcMatrix, &sp98, &spB4); sZoFwork[ZO_BSF_37_X] = spB4.x; @@ -1894,6 +1970,7 @@ void Zoness_80194394(s32 limbIndex, Vec3f* rot, void* thisx) { sZoFwork[ZO_BSF_68_Y] = spB4.y; sZoFwork[ZO_BSF_68_Z] = spB4.z; break; + case ZO_LIMB_24: Matrix_MultVec3f(gCalcMatrix, &sp8C, &spB4); sZoFwork[ZO_BSF_40_X] = spB4.x; @@ -1908,12 +1985,14 @@ void Zoness_80194394(s32 limbIndex, Vec3f* rot, void* thisx) { sZoFwork[ZO_BSF_71_Y] = spB4.y; sZoFwork[ZO_BSF_71_Z] = spB4.z; break; + case ZO_LIMB_25: Matrix_MultVec3f(gCalcMatrix, &sp68, &spB4); sZoFwork[ZO_BSF_65_X] = spB4.x; sZoFwork[ZO_BSF_65_Y] = spB4.y; sZoFwork[ZO_BSF_65_Z] = spB4.z; break; + case ZO_LIMB_36: Matrix_MultVec3f(gCalcMatrix, &sp80, &spB4); sZoFwork[ZO_BSF_55_X] = spB4.x; @@ -1923,10 +2002,10 @@ void Zoness_80194394(s32 limbIndex, Vec3f* rot, void* thisx) { } } -void Zoness_Boss_Draw(Boss* bossZO) { - Matrix_Translate(gCalcMatrix, 0.0f, bossZO->fwork[ZO_FWK_3], 0.0f, MTXF_APPLY); +void Zoness_Boss_Draw(BossZO* this) { + Matrix_Translate(gCalcMatrix, 0.0f, this->fwork[ZO_FWK_3], 0.0f, MTXF_APPLY); Matrix_Scale(gCalcMatrix, 2.6f, 2.6f, 2.6f, MTXF_APPLY); - Animation_DrawSkeleton(3, D_ZO_6019E18, bossZO->vwork, Zoness_80193D08, Zoness_80194394, bossZO, gCalcMatrix); + Animation_DrawSkeleton(3, D_ZO_6019E18, this->vwork, Zoness_80193D08, Zoness_80194394, this, gCalcMatrix); } f32 D_i3_801BF6BC[2] = { -600.0f, -3400.0f }; @@ -1935,7 +2014,7 @@ f32 D_i3_801BF6CC[2] = { 250.0f, -250.0f }; f32 D_i3_801BF6D4[2] = { 330.0f, 30.0f }; // OBJ_BOSS_ZO action -void Zoness_Boss_Update(Boss* bossZO) { +void Zoness_Boss_Update(BossZO* this) { f32 sp134; s32 sp130; s32 i; @@ -1967,19 +2046,24 @@ void Zoness_Boss_Update(Boss* bossZO) { Vec3f sp6C; Vec3f sp60 = { 0.0f, 0.0f, 40.0f }; + PRINTF(" Enm->hitNO %d\n", this->dmgPart); + gBossFrameCount++; - if ((bossZO->state != 0) || ((bossZO->state == 0) && (bossZO->timer_050 < 50))) { + + if ((this->state != 0) || ((this->state == 0) && (this->timer_050 < 50))) { Math_SmoothStepToF(&sZoFwork[ZO_BSF_24], sZoFwork[ZO_BSF_23], 0.1f, 2.0f, 0.00001f); - Math_SmoothStepToF(&bossZO->obj.pos.y, sZoFwork[ZO_BSF_25], 0.1f, sZoFwork[ZO_BSF_24], 0.00001f); + Math_SmoothStepToF(&this->obj.pos.y, sZoFwork[ZO_BSF_25], 0.1f, sZoFwork[ZO_BSF_24], 0.00001f); } + if (sZoSwork[ZO_BSS_24] == 0) { Math_SmoothStepToF(&sZoFwork[ZO_BSF_27], sZoFwork[ZO_BSF_26], 0.1f, 2.0f, 0.00001f); - Math_SmoothStepToF(&bossZO->obj.pos.z, gPlayer[0].cam.eye.z - gPathProgress + sZoFwork[ZO_BSF_28], 0.1f, + Math_SmoothStepToF(&this->obj.pos.z, gPlayer[0].cam.eye.z - gPathProgress + sZoFwork[ZO_BSF_28], 0.1f, sZoFwork[ZO_BSF_27], 0.00001f); } + if ((gGameFrameCount % 4U) == 0) { - if ((bossZO->obj.rot.y <= 90.0f) || (bossZO->obj.rot.y >= 270.0f)) { - sZoSwork[ZO_BSS_43] = bossZO->obj.rot.y; + if ((this->obj.rot.y <= 90.0f) || (this->obj.rot.y >= 270.0f)) { + sZoSwork[ZO_BSS_43] = this->obj.rot.y; if (sZoSwork[ZO_BSS_43] > 270) { sZoSwork[ZO_BSS_43] = 360 - sZoSwork[ZO_BSS_43]; } @@ -1988,11 +2072,11 @@ void Zoness_Boss_Update(Boss* bossZO) { if (sZoSwork[ZO_BSS_43] < 0) { sZoSwork[ZO_BSS_43] = 0; } - Zoness_80193A98(sZoFwork[ZO_BSF_102_X], sZoFwork[ZO_BSF_102_Y], sZoFwork[ZO_BSF_102_Z], bossZO->obj.rot.y, + Zoness_80193A98(sZoFwork[ZO_BSF_102_X], sZoFwork[ZO_BSF_102_Y], sZoFwork[ZO_BSF_102_Z], this->obj.rot.y, sZoSwork[ZO_BSS_43]); sZoSwork[ZO_BSS_44] = 255; } else { - sZoSwork[ZO_BSS_44] = (s32) bossZO->obj.rot.y - 180.0f; + sZoSwork[ZO_BSS_44] = (s32) this->obj.rot.y - 180.0f; if (sZoSwork[ZO_BSS_44] < 0) { sZoSwork[ZO_BSS_44] = -sZoSwork[ZO_BSS_44]; } @@ -2001,58 +2085,61 @@ void Zoness_Boss_Update(Boss* bossZO) { if (sZoSwork[ZO_BSS_44] < 0) { sZoSwork[ZO_BSS_44] = 0; } - Zoness_80193A98(sZoFwork[ZO_BSF_99_X], sZoFwork[ZO_BSF_99_Y], sZoFwork[ZO_BSF_99_Z], bossZO->obj.rot.y, + Zoness_80193A98(sZoFwork[ZO_BSF_99_X], sZoFwork[ZO_BSF_99_Y], sZoFwork[ZO_BSF_99_Z], this->obj.rot.y, sZoSwork[ZO_BSS_44]); sZoSwork[ZO_BSS_43] = 255; } } - if (((bossZO->state == 2) || (bossZO->state == 3) || (bossZO->state == 8)) && (gPlayer[0].radioDamageTimer == 2)) { - if (bossZO->swork[ZO_SWK_8] == 0) { + + if (((this->state == 2) || (this->state == 3) || (this->state == 8)) && (gPlayer[0].radioDamageTimer == 2)) { + if (this->swork[ZO_SWK_8] == 0) { Radio_PlayMessage(gMsg_ID_6068, RCID_BOSS_ZONESS); } - bossZO->swork[ZO_SWK_8]++; - if (bossZO->swork[ZO_SWK_8] >= 5) { - bossZO->swork[ZO_SWK_8] = 0; + this->swork[ZO_SWK_8]++; + if (this->swork[ZO_SWK_8] >= 5) { + this->swork[ZO_SWK_8] = 0; } } - if ((bossZO->swork[ZO_SWK_9] == 0) && (bossZO->state >= 2) && (bossZO->health != 0)) { - if (bossZO->swork[ZO_SWK_10] == 0) { - func_effect_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, 50.0f, 0.0f, 5.0f); - func_effect_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, 46.0f, 19.0f, 5.0f); - func_effect_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, 35.0f, 35.0f, 5.0f); - func_effect_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, 19.0f, 46.0f, 5.0f); - func_effect_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, 0.0f, 50.0f, 5.0f); + + if ((this->swork[ZO_SWK_9] == 0) && (this->state >= 2) && (this->health != 0)) { + if (this->swork[ZO_SWK_10] == 0) { + func_effect_8007AFD0(this->obj.pos.x, this->obj.pos.z, 50.0f, 0.0f, 5.0f); + func_effect_8007AFD0(this->obj.pos.x, this->obj.pos.z, 46.0f, 19.0f, 5.0f); + func_effect_8007AFD0(this->obj.pos.x, this->obj.pos.z, 35.0f, 35.0f, 5.0f); + func_effect_8007AFD0(this->obj.pos.x, this->obj.pos.z, 19.0f, 46.0f, 5.0f); + func_effect_8007AFD0(this->obj.pos.x, this->obj.pos.z, 0.0f, 50.0f, 5.0f); } else { - func_effect_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, -50.0f, 0.0f, 5.0f); - func_effect_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, -46.0f, 19.0f, 5.0f); - func_effect_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, -35.0f, 35.0f, 5.0f); - func_effect_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, -19.0f, 46.0f, 5.0f); - func_effect_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, 0.0f, 50.0f, 5.0f); + func_effect_8007AFD0(this->obj.pos.x, this->obj.pos.z, -50.0f, 0.0f, 5.0f); + func_effect_8007AFD0(this->obj.pos.x, this->obj.pos.z, -46.0f, 19.0f, 5.0f); + func_effect_8007AFD0(this->obj.pos.x, this->obj.pos.z, -35.0f, 35.0f, 5.0f); + func_effect_8007AFD0(this->obj.pos.x, this->obj.pos.z, -19.0f, 46.0f, 5.0f); + func_effect_8007AFD0(this->obj.pos.x, this->obj.pos.z, 0.0f, 50.0f, 5.0f); } + this->swork[ZO_SWK_11]++; + this->swork[ZO_SWK_11] &= 1; + this->swork[ZO_SWK_9] = 20; - bossZO->swork[ZO_SWK_11]++; - bossZO->swork[ZO_SWK_11] &= 1; - bossZO->swork[ZO_SWK_9] = 20; - if (bossZO->swork[ZO_SWK_11] == 0) { - - bossZO->swork[ZO_SWK_10]++; - bossZO->swork[ZO_SWK_10] &= 1; - bossZO->swork[ZO_SWK_9] = 100; + if (this->swork[ZO_SWK_11] == 0) { + this->swork[ZO_SWK_10]++; + this->swork[ZO_SWK_10] &= 1; + this->swork[ZO_SWK_9] = 100; } } - if (bossZO->swork[ZO_SWK_9] != 0) { - bossZO->swork[ZO_SWK_9]--; + + if (this->swork[ZO_SWK_9] != 0) { + this->swork[ZO_SWK_9]--; } - switch (bossZO->state) { + + switch (this->state) { case 0: - if ((((gGameFrameCount % 8) == 0) || (bossZO->timer_050 == 43)) && (bossZO->swork[ZO_SWK_13] == 0) && - ((bossZO->swork[ZO_SWK_12] < 7) || (bossZO->timer_050 == 43))) { + if ((((gGameFrameCount % 8) == 0) || (this->timer_050 == 43)) && (this->swork[ZO_SWK_13] == 0) && + ((this->swork[ZO_SWK_12] < 7) || (this->timer_050 == 43))) { D_ctx_801779A8[0] = 20; if (Play_CheckDynaFloorCollision(&sp134, &sp130, sZoFwork[ZO_BSF_43_X], sZoFwork[ZO_BSF_43_Y] - 300.0f, sZoFwork[ZO_BSF_43_Z])) { sp100 = 1.5f; spFC = 2.0f; - if (bossZO->timer_050 == 43) { + if (this->timer_050 == 43) { sp100 = 5.0f; spFC = 3.0f; if (sZoSwork[ZO_BSS_55] == 0) { @@ -2063,52 +2150,58 @@ void Zoness_Boss_Update(Boss* bossZO) { func_effect_8008377C(sZoFwork[ZO_BSF_43_X], sp134, sZoFwork[ZO_BSF_43_Z] + 100.0f, 5.0f, 3.0f); } func_effect_8008377C(sZoFwork[ZO_BSF_43_X], sp134, sZoFwork[ZO_BSF_43_Z] + 100.0f, sp100, spFC); - if (bossZO->timer_050 == 43) { - AUDIO_PLAY_SFX(NA_SE_OUT_SPLASH_L, bossZO->sfxSource, 4); + if (this->timer_050 == 43) { + AUDIO_PLAY_SFX(NA_SE_OUT_SPLASH_L, this->sfxSource, 4); } else { - AUDIO_PLAY_SFX(NA_SE_IN_SPLASH_L, bossZO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_IN_SPLASH_L, this->sfxSource, 4); } - bossZO->swork[ZO_SWK_12]++; + this->swork[ZO_SWK_12]++; } } - if ((bossZO->timer_050 < 43) && (bossZO->timer_050 >= 31)) { + + if ((this->timer_050 < 43) && (this->timer_050 >= 31)) { D_ctx_801779A8[0] = 20; } - Math_SmoothStepToF(&bossZO->fwork[ZO_FWK_4], 1.0f, 0.1f, 10.0f, 0.0f); - if (bossZO->timer_050 == 0) { - if (bossZO->swork[ZO_SWK_3] == 0) { + + Math_SmoothStepToF(&this->fwork[ZO_FWK_4], 1.0f, 0.1f, 10.0f, 0.0f); + + if (this->timer_050 == 0) { + if (this->swork[ZO_SWK_3] == 0) { Radio_PlayMessage(gMsg_ID_6069, RCID_BOSS_ZONESS); - bossZO->swork[ZO_SWK_3]++; + this->swork[ZO_SWK_3]++; } Math_SmoothStepToF(&sZoFwork[ZO_BSF_1], sZoFwork[ZO_BSF_74], 0.1f, 2.0f, 0.00001f); Math_SmoothStepToF(&sZoFwork[ZO_BSF_11], sZoFwork[ZO_BSF_75], 0.1f, 2.0f, 0.00001f); - if (bossZO->timer_052 == 0) { - bossZO->swork[ZO_SWK_12] = 0; + if (this->timer_052 == 0) { + this->swork[ZO_SWK_12] = 0; sZoFwork[ZO_BSF_77] = 0.0f; - bossZO->swork[ZO_SWK_13] = 1; - bossZO->state = 1; + this->swork[ZO_SWK_13] = 1; + this->state = 1; } } break; + case 1: - Math_SmoothStepToF(&bossZO->fwork[ZO_FWK_4], 100.0f, 0.1f, 1.0f, 0.0f); - Zoness_8019962C(bossZO, 0.0f); + Math_SmoothStepToF(&this->fwork[ZO_FWK_4], 100.0f, 0.1f, 1.0f, 0.0f); + Zoness_8019962C(this, 0.0f); Math_SmoothStepToF(&sZoFwork[ZO_BSF_1], sZoFwork[ZO_BSF_74], 0.1f, 2.0f, 0.00001f); Math_SmoothStepToF(&sZoFwork[ZO_BSF_11], sZoFwork[ZO_BSF_75], 0.1f, 2.0f, 0.00001f); - if ((bossZO->timer_050 == 0) && ((gGameFrameCount % 4) == 0)) { + + if ((this->timer_050 == 0) && ((gGameFrameCount % 4) == 0)) { if (sZoSwork[ZO_BSS_9] != 0) { Zoness_80193908(sZoFwork[ZO_BSF_29_X], sZoFwork[ZO_BSF_29_Y], sZoFwork[ZO_BSF_29_Z], - bossZO->obj.rot.y); + this->obj.rot.y); } if (sZoSwork[ZO_BSS_10] != 0) { Zoness_80193908(sZoFwork[ZO_BSF_32_X], sZoFwork[ZO_BSF_32_Y], sZoFwork[ZO_BSF_32_Z], - bossZO->obj.rot.y); + this->obj.rot.y); } + sZoSwork[ZO_BSS_6]++; if (sZoSwork[ZO_BSS_6] > 10) { sZoSwork[ZO_BSS_6] = 0; sZoSwork[ZO_BSS_7]++; - bossZO->timer_050 = 30; + this->timer_050 = 30; if ((sZoSwork[ZO_BSS_7] == 1) && (sZoSwork[ZO_BSS_19] == 0)) { sZoFwork[ZO_BSF_74] = 230.0f; sZoFwork[ZO_BSF_75] = -230.0f; @@ -2126,57 +2219,61 @@ void Zoness_Boss_Update(Boss* bossZO) { } if (sZoSwork[ZO_BSS_7] >= 2) { sZoSwork[ZO_BSS_7] = 0; - bossZO->timer_050 = 0; + this->timer_050 = 0; sZoFwork[ZO_BSF_77] = 0.0f; - bossZO->swork[ZO_SWK_4] = 1000; - bossZO->state = 3; + this->swork[ZO_SWK_4] = 1000; + this->state = 3; if (sZoSwork[ZO_BSS_19] == 0) { - bossZO->timer_050 = 30; - bossZO->swork[ZO_SWK_4] = 0; - bossZO->state = 2; + this->timer_050 = 30; + this->swork[ZO_SWK_4] = 0; + this->state = 2; } } } } break; + case 2: - if (bossZO->timer_050 == 1) { + if (this->timer_050 == 1) { sZoSwork[ZO_BSS_20]++; sZoFwork[ZO_BSF_77] = 0.0f; } - if (bossZO->timer_050 == 0) { - Math_SmoothStepToF(&bossZO->fwork[ZO_FWK_4], 100.0f, 0.1f, 1.0f, 0.0f); + if (this->timer_050 == 0) { + Math_SmoothStepToF(&this->fwork[ZO_FWK_4], 100.0f, 0.1f, 1.0f, 0.0f); Math_SmoothStepToF(&sZoFwork[ZO_BSF_1], sZoFwork[ZO_BSF_74], 0.2f, 4.0f, 0.00001f); Math_SmoothStepToF(&sZoFwork[ZO_BSF_11], sZoFwork[ZO_BSF_75], 0.2f, 4.0f, 0.00001f); if ((sZoSwork[ZO_BSS_20] == 0) && (sZoFwork[ZO_BSF_1] == 0.0f)) { - bossZO->swork[ZO_SWK_4] = 1000; - bossZO->state = 3; + this->swork[ZO_SWK_4] = 1000; + this->state = 3; } } break; + case 3: - if (ZO_HIT_12(bossZO)->z.offset != -883.99994f) { - ZO_HIT_12(bossZO)->z.offset = -883.99994f; // 13 * 68.0 - ZO_HIT_12(bossZO)->z.size = 244.4f; // 13 * 18.8 - ZO_HIT_12(bossZO)->y.offset = 863.19995f; // 13 * 66.4 - ZO_HIT_12(bossZO)->y.size = 171.59999f; // 13 * 13.2 - ZO_HIT_12(bossZO)->x.offset = 0.0f; - ZO_HIT_12(bossZO)->x.size = 93.6f; // 13 * 7.2 + if (ZO_HIT_12(this)->z.offset != -883.99994f) { + ZO_HIT_12(this)->z.offset = -883.99994f; // 13 * 68.0 + ZO_HIT_12(this)->z.size = 244.4f; // 13 * 18.8 + ZO_HIT_12(this)->y.offset = 863.19995f; // 13 * 66.4 + ZO_HIT_12(this)->y.size = 171.59999f; // 13 * 13.2 + ZO_HIT_12(this)->x.offset = 0.0f; + ZO_HIT_12(this)->x.size = 93.6f; // 13 * 7.2 } - Math_SmoothStepToF(&bossZO->fwork[ZO_FWK_4], 100.0f, 0.1f, 1.0f, 0.0f); - if (bossZO->timer_058 != 0) { + + Math_SmoothStepToF(&this->fwork[ZO_FWK_4], 100.0f, 0.1f, 1.0f, 0.0f); + + if (this->timer_058 != 0) { if ((sZoSwork[ZO_BSS_11] != 0) || (sZoSwork[ZO_BSS_12] != 0)) { Math_SmoothStepToF(&sZoFwork[ZO_BSF_21], sZoFwork[ZO_BSF_20], 0.1f, 2.0f, 0.00001f); - Math_SmoothStepToF(&bossZO->obj.pos.x, D_i3_801BF6CC[sZoSwork[ZO_BSS_21]], 0.1f, - sZoFwork[ZO_BSF_21], 0.00001f); + Math_SmoothStepToF(&this->obj.pos.x, D_i3_801BF6CC[sZoSwork[ZO_BSS_21]], 0.1f, sZoFwork[ZO_BSF_21], + 0.00001f); } if (sZoSwork[ZO_BSS_24] == 0) { Math_SmoothStepToAngle(&sZoFwork[ZO_BSF_79], sZoFwork[ZO_BSF_78], 0.1f, 2.0f, 0.0001f); - Math_SmoothStepToAngle(&bossZO->obj.rot.y, D_i3_801BF6D4[sZoSwork[ZO_BSS_21]], 0.1f, + Math_SmoothStepToAngle(&this->obj.rot.y, D_i3_801BF6D4[sZoSwork[ZO_BSS_21]], 0.1f, sZoFwork[ZO_BSF_79], 0.00001f); } } else { - bossZO->timer_058 = 100; + this->timer_058 = 100; sZoFwork[ZO_BSF_20] = 5.0f; sZoFwork[ZO_BSF_21] = sZoFwork[ZO_BSF_79] = 0.0f; sZoFwork[ZO_BSF_78] = 2.0f; @@ -2185,8 +2282,9 @@ void Zoness_Boss_Update(Boss* bossZO) { sZoSwork[ZO_BSS_21] = 0; } } - if ((bossZO->swork[ZO_SWK_4] == 0) && ((sZoSwork[ZO_BSS_9] != 0) || (sZoSwork[ZO_BSS_10] != 0))) { - Zoness_80198ECC(bossZO); + + if ((this->swork[ZO_SWK_4] == 0) && ((sZoSwork[ZO_BSS_9] != 0) || (sZoSwork[ZO_BSS_10] != 0))) { + Zoness_80198ECC(this); } if ((sZoSwork[ZO_BSS_32] == 0) && (sZoSwork[ZO_BSS_34] == 1) && (sZoSwork[ZO_BSS_24] == 0)) { Radio_PlayMessage(gMsg_ID_6080, RCID_PEPPY); @@ -2194,47 +2292,45 @@ void Zoness_Boss_Update(Boss* bossZO) { } if (sZoSwork[ZO_BSS_4] == 0) { sZoSwork[ZO_BSS_4] = 100; - Zoness_801989FC(bossZO); + Zoness_801989FC(this); } if (sZoSwork[ZO_BSS_24] != 0) { sZoSwork[ZO_BSS_20] = 1; - if (bossZO->swork[ZO_SWK_7] == 0) { - bossZO->swork[ZO_SWK_7]++; - bossZO->swork[ZO_SWK_7] &= 1; + if (this->swork[ZO_SWK_7] == 0) { + this->swork[ZO_SWK_7]++; + this->swork[ZO_SWK_7] &= 1; Radio_PlayMessage(gMsg_ID_6078, RCID_BOSS_ZONESS); } - if (bossZO->timer_056 == 0) { - bossZO->swork[ZO_SWK_1]++; - bossZO->swork[ZO_SWK_1] &= 1; - bossZO->timer_056 = 100; + if (this->timer_056 == 0) { + this->swork[ZO_SWK_1]++; + this->swork[ZO_SWK_1] &= 1; + this->timer_056 = 100; } - bossZO->fwork[ZO_FWK_5] += 4.0f; - bossZO->vel.x = COS_DEG(bossZO->fwork[ZO_FWK_5]) * 40.0f; - padF4 = Math_Atan2F(bossZO->fwork[ZO_FWK_6] - bossZO->obj.pos.x, - gPlayer[0].cam.eye.z - gPathProgress + D_i3_801BF6BC[bossZO->swork[ZO_SWK_1]] - - bossZO->obj.pos.z); + this->fwork[ZO_FWK_5] += 4.0f; + this->vel.x = COS_DEG(this->fwork[ZO_FWK_5]) * 40.0f; + padF4 = Math_Atan2F(this->fwork[ZO_FWK_6] - this->obj.pos.x, gPlayer[0].cam.eye.z - gPathProgress + + D_i3_801BF6BC[this->swork[ZO_SWK_1]] - + this->obj.pos.z); padF4 = Math_RadToDeg(padF4); - Math_SmoothStepToAngle(&bossZO->fwork[ZO_FWK_7], padF4, 0.1f, 100.0f, 0.001f); - Matrix_RotateY(gCalcMatrix, bossZO->fwork[ZO_FWK_7] * M_DTOR, MTXF_NEW); + Math_SmoothStepToAngle(&this->fwork[ZO_FWK_7], padF4, 0.1f, 100.0f, 0.001f); + Matrix_RotateY(gCalcMatrix, this->fwork[ZO_FWK_7] * M_DTOR, MTXF_NEW); spE4.x = spE4.y = 0.0f; spE4.z = 20.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &spE4, &spCC); var_s0 = 0; - bossZO->vel.z = spCC.z - gPathVelZ; - if (bossZO->vel.x > 0.0f) { + this->vel.z = spCC.z - gPathVelZ; + if (this->vel.x > 0.0f) { var_s0 = 1; } - if (var_s0 != bossZO->swork[ZO_SWK_2]) { - bossZO->swork[ZO_SWK_2] = var_s0; - bossZO->fwork[ZO_FWK_8] = 0.0f; + if (var_s0 != this->swork[ZO_SWK_2]) { + this->swork[ZO_SWK_2] = var_s0; + this->fwork[ZO_FWK_8] = 0.0f; } - Math_SmoothStepToF(&bossZO->fwork[ZO_FWK_8], 10.0f, 0.01f, 0.1f, 0.0f); - Math_SmoothStepToAngle(&bossZO->obj.rot.z, D_i3_801BF6C4[var_s0], 0.1f, bossZO->fwork[ZO_FWK_8], - 0.00001f); - Math_SmoothStepToAngle(&bossZO->obj.rot.y, D_i3_801BF6D4[var_s0], 0.1f, bossZO->fwork[ZO_FWK_8], - 0.00001f); - Matrix_RotateX(gCalcMatrix, -bossZO->obj.rot.x * M_DTOR, MTXF_NEW); - Matrix_RotateY(gCalcMatrix, -bossZO->obj.rot.y * M_DTOR, MTXF_APPLY); + Math_SmoothStepToF(&this->fwork[ZO_FWK_8], 10.0f, 0.01f, 0.1f, 0.0f); + Math_SmoothStepToAngle(&this->obj.rot.z, D_i3_801BF6C4[var_s0], 0.1f, this->fwork[ZO_FWK_8], 0.00001f); + Math_SmoothStepToAngle(&this->obj.rot.y, D_i3_801BF6D4[var_s0], 0.1f, this->fwork[ZO_FWK_8], 0.00001f); + Matrix_RotateX(gCalcMatrix, -this->obj.rot.x * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, -this->obj.rot.y * M_DTOR, MTXF_APPLY); spE4.x = gPlayer[0].pos.x - sZoFwork[ZO_BSF_93_X]; spE4.y = gPlayer[0].pos.y - sZoFwork[ZO_BSF_93_Y]; spE4.z = gPlayer[0].trueZpos - sZoFwork[ZO_BSF_93_Z]; @@ -2279,59 +2375,61 @@ void Zoness_Boss_Update(Boss* bossZO) { Math_SmoothStepToAngle(&sZoFwork[ZO_BSF_7], sp110, 0.2f, 2.0f, 0.0f); Math_SmoothStepToAngle(&sZoFwork[ZO_BSF_10], sp104, 0.2f, 2.0f, 0.0f); Math_SmoothStepToAngle(&sZoFwork[ZO_BSF_9], sp108, 0.2f, 2.0f, 0.0f); - Zoness_80198BE8(bossZO, 0); - Zoness_80198BE8(bossZO, 1); + Zoness_80198BE8(this, 0); + Zoness_80198BE8(this, 1); } break; + case 4: - if (bossZO->swork[ZO_SWK_15] == 0) { + if (this->swork[ZO_SWK_15] == 0) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 0; } - Math_SmoothStepToAngle(&bossZO->obj.rot.z, bossZO->fwork[ZO_FWK_9], 0.1f, 100.0f, 0.00001f); - Math_SmoothStepToAngle(&bossZO->fwork[ZO_FWK_9], 0.0f, 0.1f, 100.0f, 0.00001f); + Math_SmoothStepToAngle(&this->obj.rot.z, this->fwork[ZO_FWK_9], 0.1f, 100.0f, 0.00001f); + Math_SmoothStepToAngle(&this->fwork[ZO_FWK_9], 0.0f, 0.1f, 100.0f, 0.00001f); if ((sZoSwork[ZO_BSS_11] == 0) && (sZoLimbTimers[ZO_LIMB_7] != LIMB_DESTROYED)) { - Zoness_80198F3C(bossZO, 0, 46); + Zoness_80198F3C(this, 0, 46); if (sZoFwork[ZO_BSF_17] > -400.0f) { sZoFwork[ZO_BSF_17] -= 10.0f; } else { - Audio_KillSfxBySource(bossZO->sfxSource); - if (bossZO->obj.rot.z > 359.0f) { + Audio_KillSfxBySource(this->sfxSource); + if (this->obj.rot.z > 359.0f) { if (sZoSwork[ZO_BSS_13] != 0) { - Zoness_8019907C(bossZO); + Zoness_8019907C(this); } else { - Zoness_8019914C(bossZO, 0); + Zoness_8019914C(this, 0); } } } } if ((sZoSwork[ZO_BSS_12] == 0) && (sZoLimbTimers[ZO_LIMB_11] != LIMB_DESTROYED)) { - Zoness_80198F3C(bossZO, 1, 49); + Zoness_80198F3C(this, 1, 49); if (sZoFwork[ZO_BSF_18] > -400.0f) { sZoFwork[ZO_BSF_18] -= 10.0f; } else { - Audio_KillSfxBySource(bossZO->sfxSource); - if (bossZO->obj.rot.z < 1.0f) { + Audio_KillSfxBySource(this->sfxSource); + if (this->obj.rot.z < 1.0f) { if (sZoSwork[ZO_BSS_13] != 0) { - Zoness_8019907C(bossZO); + Zoness_8019907C(this); } else { - Zoness_8019914C(bossZO, 1); + Zoness_8019914C(this, 1); } } } } break; + case 5: - Math_SmoothStepToAngle(&bossZO->obj.rot.z, bossZO->fwork[ZO_FWK_9], 0.1f, 100.0f, 0.00001f); - Math_SmoothStepToAngle(&bossZO->fwork[ZO_FWK_9], 0.0f, 0.1f, 100.0f, 0.00001f); + Math_SmoothStepToAngle(&this->obj.rot.z, this->fwork[ZO_FWK_9], 0.1f, 100.0f, 0.00001f); + Math_SmoothStepToAngle(&this->fwork[ZO_FWK_9], 0.0f, 0.1f, 100.0f, 0.00001f); switch (sZoSwork[ZO_BSS_16]) { case 0: if (sZoSwork[ZO_BSS_13] != 0) { - Zoness_8019962C(bossZO, 180.0f); - if (bossZO->obj.rot.y == 180.0f) { + Zoness_8019962C(this, 180.0f); + if (this->obj.rot.y == 180.0f) { if ((sZoSwork[ZO_BSS_11] == 0) && (sZoLimbTimers[ZO_LIMB_7] != LIMB_DESTROYED)) { - Zoness_801991D0(bossZO, 0); + Zoness_801991D0(this, 0); } else { - Zoness_801991D0(bossZO, 1); + Zoness_801991D0(this, 1); } } } else { @@ -2339,34 +2437,37 @@ void Zoness_Boss_Update(Boss* bossZO) { sZoSwork[ZO_BSS_36]++; sZoFwork[ZO_BSF_77] = 0.0f; } - Zoness_8019962C(bossZO, 0.0f); - if (bossZO->obj.rot.y == 0.0f) { + Zoness_8019962C(this, 0.0f); + if (this->obj.rot.y == 0.0f) { if (sZoSwork[ZO_BSS_11] == 0) { - Zoness_8019914C(bossZO, 0); + Zoness_8019914C(this, 0); } if (sZoSwork[ZO_BSS_12] == 0) { - Zoness_8019914C(bossZO, 1); + Zoness_8019914C(this, 1); } } } break; + case 1: - Zoness_80199470(bossZO, 0); + Zoness_80199470(this, 0); break; + case 2: - Zoness_80199470(bossZO, 1); + Zoness_80199470(this, 1); break; + case 3: if (sZoSwork[ZO_BSS_13] != 0) { - if (bossZO->timer_050 == 0) { + if (this->timer_050 == 0) { Math_SmoothStepToF(&sZoFwork[ZO_BSF_4], 0.0f, 1.0f, 5.0f, 0.001f); Math_SmoothStepToF(&sZoFwork[ZO_BSF_3], 0.0f, 1.0f, 3.0f, 0.001f); if (sZoFwork[ZO_BSF_3] == 0.0f) { - Zoness_8019962C(bossZO, 0.0f); - if (bossZO->obj.rot.y == 0.0f) { + Zoness_8019962C(this, 0.0f); + if (this->obj.rot.y == 0.0f) { sZoSwork[ZO_BSS_16] = 0; - bossZO->swork[ZO_SWK_4] = 1000; - bossZO->state = 3; + this->swork[ZO_SWK_4] = 1000; + this->state = 3; } } } @@ -2375,20 +2476,22 @@ void Zoness_Boss_Update(Boss* bossZO) { sZoSwork[ZO_BSS_36]++; sZoFwork[ZO_BSF_77] = 0.0f; } - Zoness_8019962C(bossZO, 0.0f); - if (bossZO->obj.rot.y == 0.0f) { + Zoness_8019962C(this, 0.0f); + if (this->obj.rot.y == 0.0f) { sZoSwork[ZO_BSS_16] = 0; sZoSwork[ZO_BSS_36] = 0; sZoFwork[ZO_BSF_77] = 0.0f; - bossZO->swork[ZO_SWK_4] = 1000; - bossZO->state = 3; + this->swork[ZO_SWK_4] = 1000; + this->state = 3; } } break; } break; + case 6: D_ctx_801779A8[0] = 20; + if (gCameraShake == 0) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; gFillScreenAlpha = gFillScreenAlphaTarget = 255; @@ -2399,38 +2502,41 @@ void Zoness_Boss_Update(Boss* bossZO) { if (gCameraShake == 29) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 0; } + if ((gGameFrameCount % 4U) == 0) { - spE4.x = RAND_FLOAT_CENTERED(300.0f) + bossZO->obj.pos.x; - spE4.y = RAND_FLOAT_CENTERED(200.0f) + (bossZO->obj.pos.y + 600.0f); - spE4.z = bossZO->obj.pos.z - 50.0f; - spD8.x = bossZO->obj.rot.x; + spE4.x = RAND_FLOAT_CENTERED(300.0f) + this->obj.pos.x; + spE4.y = RAND_FLOAT_CENTERED(200.0f) + (this->obj.pos.y + 600.0f); + spE4.z = this->obj.pos.z - 50.0f; + spD8.x = this->obj.rot.x; spD8.y = Math_ModF(RAND_FLOAT_CENTERED(60.0f) + 360.0f, 360.0f); - spD8.z = bossZO->obj.rot.z; + spD8.z = this->obj.rot.z; for (i = 0; i < 5; i++) { Zoness_SpawnDebris(&spE4, &spD8, RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(20.0f), - RAND_FLOAT_CENTERED(30.0f), 4, 1.0f, RAND_FLOAT(15.0f) + (bossZO->scale * 10.0f), + RAND_FLOAT_CENTERED(30.0f), 4, 1.0f, RAND_FLOAT(15.0f) + (this->scale * 10.0f), 0); } } - bossZO->vel.x = 0.0f; - Math_SmoothStepToF(&bossZO->obj.pos.x, 0.0f, 0.1f, 5.0f, 0.00001f); + + this->vel.x = 0.0f; + Math_SmoothStepToF(&this->obj.pos.x, 0.0f, 0.1f, 5.0f, 0.00001f); + if (((gGameFrameCount % 8) == 0) && (Rand_ZeroOne() < 0.5f)) { sZoLimbTimers[ZO_LIMB_36] = 15; sZoLimbTimers[ZO_LIMB_25] = 15; } - func_effect_8007C120(sZoFwork[ZO_BSF_55_X], sZoFwork[ZO_BSF_55_Y], sZoFwork[ZO_BSF_55_Z], bossZO->vel.x, - bossZO->vel.y, bossZO->vel.z, 0.2f, 10); + func_effect_8007C120(sZoFwork[ZO_BSF_55_X], sZoFwork[ZO_BSF_55_Y], sZoFwork[ZO_BSF_55_Z], this->vel.x, + this->vel.y, this->vel.z, 0.2f, 10); func_effect_8007D0E0(sZoFwork[ZO_BSF_55_X] + RAND_FLOAT_CENTERED(200.0f), sZoFwork[ZO_BSF_55_Y] + RAND_RANGE(-160.0f, 640.0f), sZoFwork[ZO_BSF_55_Z], 10.0f); - if (bossZO->timer_050 == 30) { + if (this->timer_050 == 30) { Radio_PlayMessage(gMsg_ID_6079, RCID_BOSS_ZONESS); } - if (bossZO->timer_050 == 0) { + if (this->timer_050 == 0) { gEffects[99].obj.status = gEffects[98].obj.status = OBJ_FREE; sZoFwork[ZO_BSF_25] = -1000.0f; sZoFwork[ZO_BSF_23] = 10.0f; gShowBossHealth = 0; - func_effect_8007A568(bossZO->obj.pos.x, bossZO->obj.pos.y, bossZO->obj.pos.z, 80.0f); + func_effect_8007A568(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 80.0f); if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { gCsFrameCount = 0; @@ -2444,45 +2550,47 @@ void Zoness_Boss_Update(Boss* bossZO) { gPlayer[0].rot.y += 360.0f; } gPlayer[0].yRot_114 = 0.0f; - Boss_CompleteLevel(&gPlayer[0], bossZO->obj.pos.x, 0.0f, bossZO->obj.pos.z); + Boss_CompleteLevel(&gPlayer[0], this->obj.pos.x, 0.0f, this->obj.pos.z); } - bossZO->timer_050 = 70; + this->timer_050 = 70; sZoSwork[ZO_BSS_5] = 0; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 0; - Boss_AwardBonus(bossZO); - bossZO->state = 7; + Boss_AwardBonus(this); + this->state = 7; } break; + case 7: D_ctx_801779A8[0] = 20; if (((gGameFrameCount % 8) == 0) && - (Play_CheckDynaFloorCollision(&sp134, &sp130, bossZO->obj.pos.x, -300.0f, bossZO->obj.pos.z) != 0)) { - func_effect_8008377C(RAND_FLOAT_CENTERED(500.0f) + bossZO->obj.pos.x, sp134 - 300.0f, - RAND_FLOAT_CENTERED(3000.0f) + bossZO->obj.pos.z, 5.0f, 2.0f); + (Play_CheckDynaFloorCollision(&sp134, &sp130, this->obj.pos.x, -300.0f, this->obj.pos.z) != 0)) { + func_effect_8008377C(RAND_FLOAT_CENTERED(500.0f) + this->obj.pos.x, sp134 - 300.0f, + RAND_FLOAT_CENTERED(3000.0f) + this->obj.pos.z, 5.0f, 2.0f); } - if ((bossZO->timer_050 == 0) || (bossZO->obj.pos.y < -800.0f)) { - Object_Kill(&bossZO->obj, bossZO->sfxSource); + if ((this->timer_050 == 0) || (this->obj.pos.y < -800.0f)) { + Object_Kill(&this->obj, this->sfxSource); } break; + case 8: if (sZoSwork[ZO_BSS_18] != 0) { - if ((sZoSwork[ZO_BSS_27] != 2) && (bossZO->swork[ZO_SWK_5] == 0) && (bossZO->swork[ZO_SWK_6] < 2) && + if ((sZoSwork[ZO_BSS_27] != 2) && (this->swork[ZO_SWK_5] == 0) && (this->swork[ZO_SWK_6] < 2) && ((sZoSwork[ZO_BSS_33] == 0) || (sZoSwork[ZO_BSS_33] >= 30))) { sZoSwork[ZO_BSS_18]--; } - Zoness_8019962C(bossZO, 0.0f); + Zoness_8019962C(this, 0.0f); Math_SmoothStepToF(&sZoFwork[ZO_BSF_1], -130.0f, 0.1f, 2.0f, 0.00001f); Math_SmoothStepToF(&sZoFwork[ZO_BSF_11], 130.0f, 0.1f, 2.0f, 0.00001f); if (sZoSwork[ZO_BSS_18] < 331) { if (sZoSwork[ZO_BSS_8] != 0) { - if ((sZoSwork[ZO_BSS_20] == 0) && (bossZO->swork[ZO_SWK_6] == 1)) { + if ((sZoSwork[ZO_BSS_20] == 0) && (this->swork[ZO_SWK_6] == 1)) { sZoSwork[ZO_BSS_20] = 1; sZoSwork[ZO_BSS_27]++; if (sZoSwork[ZO_BSS_27] >= 3) { sZoSwork[ZO_BSS_27] = 3; } } - } else if ((bossZO->swork[ZO_SWK_5] == 0) && (bossZO->swork[ZO_SWK_6] < 2)) { + } else if ((this->swork[ZO_SWK_5] == 0) && (this->swork[ZO_SWK_6] < 2)) { if (sZoSwork[ZO_BSS_33] == 0) { Radio_PlayMessage(gMsg_ID_6077, RCID_BOSS_ZONESS); sZoSwork[ZO_BSS_27] = 3; @@ -2499,18 +2607,18 @@ void Zoness_Boss_Update(Boss* bossZO) { if ((sZoSwork[ZO_BSS_27] == 0) && (sZoSwork[ZO_BSS_18] == 400) && (sZoSwork[ZO_BSS_8] != 0)) { Radio_PlayMessage(gMsg_ID_6074, RCID_BOSS_ZONESS); sZoSwork[ZO_BSS_27] = 1; - bossZO->swork[ZO_SWK_6] = 30; + this->swork[ZO_SWK_6] = 30; } if ((sZoSwork[ZO_BSS_26] == 0) && (sZoSwork[ZO_BSS_18] == 200) && (sZoSwork[ZO_BSS_27] == 3)) { Radio_PlayMessage(gMsg_ID_6075, RCID_BOSS_ZONESS); sZoSwork[ZO_BSS_26]++; - bossZO->timer_050 = 100; + this->timer_050 = 100; } - if ((bossZO->timer_050 == 0) && (sZoSwork[ZO_BSS_26] != 0)) { - bossZO->timer_050 = 50; + if ((this->timer_050 == 0) && (sZoSwork[ZO_BSS_26] != 0)) { + this->timer_050 = 50; sZoFwork[ZO_BSF_37_X] = RAND_RANGE(-330.0f, 770.0f); sZoFwork[ZO_BSF_40_X] = RAND_RANGE(-560.0f, 240.0f); - Zoness_801989FC(bossZO); + Zoness_801989FC(this); } } else { if (sZoSwork[ZO_BSS_28] == 0) { @@ -2519,25 +2627,26 @@ void Zoness_Boss_Update(Boss* bossZO) { } sZoFwork[ZO_BSF_25] = 0.0f; sZoFwork[ZO_BSF_23] = 3.0f; - bossZO->timer_054 = 0; + this->timer_054 = 0; sZoSwork[ZO_BSS_5] = 0; sZoFwork[ZO_BSF_28] = -2600.0f; sZoFwork[ZO_BSF_15] = sZoFwork[ZO_BSF_16] = 0.0f; sZoSwork[ZO_BSS_18] = 0; for (i = 0; i < 2; i++) { - Zoness_80199394(bossZO, i); + Zoness_80199394(this, i); } - bossZO->timer_050 = 100; - bossZO->state = 0; + this->timer_050 = 100; + this->state = 0; } break; } sZoFwork[ZO_BSF_2] += 20.0f; - spE4.x = gPlayer[0].pos.x - bossZO->obj.pos.x; - spE4.z = gPlayer[0].trueZpos - bossZO->obj.pos.z; + spE4.x = gPlayer[0].pos.x - this->obj.pos.x; + spE4.z = gPlayer[0].trueZpos - this->obj.pos.z; Math_SmoothStepToAngle(&sZoFwork[ZO_BSF_14], Math_RadToDeg(Math_Atan2F(spE4.x, spE4.z)), 0.5f, 100.0f, 0.001f); Math_SmoothStepToAngle(&sZoFwork[ZO_BSF_0], sZoFwork[ZO_BSF_76], 0.2f, 4.0f, 0.0001f); + if ((((gGameFrameCount % 64) == 0) || (sZoSwork[ZO_BSS_22] != 0)) && ((Rand_ZeroOne() < 0.5f) || (sZoSwork[ZO_BSS_22] != 0)) && (sZoSwork[ZO_BSS_23] == 0)) { sZoSwork[ZO_BSS_23] = D_i3_801BF5F0[sZoSwork[ZO_BSS_22]]; @@ -2553,26 +2662,27 @@ void Zoness_Boss_Update(Boss* bossZO) { spE4.x = gPlayer[0].pos.x - sZoFwork[ZO_BSF_65_X]; spE4.z = gPlayer[0].trueZpos - sZoFwork[ZO_BSF_65_Z]; Math_SmoothStepToAngle(&sZoFwork[ZO_BSF_19], Math_RadToDeg(Math_Atan2F(spE4.x, spE4.z)), 0.1f, 5.0f, 0.0f); - if ((bossZO->state >= 3) && (bossZO->state < 6)) { - Matrix_RotateY(gCalcMatrix, bossZO->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, bossZO->obj.rot.x * M_DTOR, MTXF_APPLY); + + if ((this->state >= 3) && (this->state < 6)) { + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &spA8, &spD8); Matrix_MultVec3f(gCalcMatrix, &sp9C, &spCC); sp78 = spD8; sp6C = spCC; - Matrix_RotateX(gCalcMatrix, -bossZO->obj.rot.x * M_DTOR, MTXF_NEW); - Matrix_RotateY(gCalcMatrix, -bossZO->obj.rot.y * M_DTOR, MTXF_APPLY); - spE4.x = gPlayer[0].pos.x - (bossZO->obj.pos.x + spD8.x); - spE4.y = gPlayer[0].pos.y - (bossZO->obj.pos.y + spD8.y); - spE4.z = gPlayer[0].trueZpos - (bossZO->obj.pos.z + spD8.z); + Matrix_RotateX(gCalcMatrix, -this->obj.rot.x * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, -this->obj.rot.y * M_DTOR, MTXF_APPLY); + spE4.x = gPlayer[0].pos.x - (this->obj.pos.x + spD8.x); + spE4.y = gPlayer[0].pos.y - (this->obj.pos.y + spD8.y); + spE4.z = gPlayer[0].trueZpos - (this->obj.pos.z + spD8.z); Matrix_MultVec3f(gCalcMatrix, &spE4, &spD8); sp11C = Math_Atan2F(spD8.x, spD8.z); sp11C = Math_RadToDeg(sp11C); sp120 = Math_Atan2F(spD8.y, sqrtf(SQ(spD8.x) + SQ(spD8.z))); sp120 = Math_RadToDeg(-sp120); - spE4.x = gPlayer[0].pos.x - (bossZO->obj.pos.x + spCC.x); - spE4.y = gPlayer[0].pos.y - (bossZO->obj.pos.y + spCC.y); - spE4.z = gPlayer[0].trueZpos - (bossZO->obj.pos.z + spCC.z); + spE4.x = gPlayer[0].pos.x - (this->obj.pos.x + spCC.x); + spE4.y = gPlayer[0].pos.y - (this->obj.pos.y + spCC.y); + spE4.z = gPlayer[0].trueZpos - (this->obj.pos.z + spCC.z); Matrix_MultVec3f(gCalcMatrix, &spE4, &spCC); sp114 = Math_Atan2F(spCC.x, spCC.z); sp114 = Math_RadToDeg(sp114); @@ -2582,13 +2692,13 @@ void Zoness_Boss_Update(Boss* bossZO) { Math_SmoothStepToAngle(&sZoFwork[ZO_BSF_5], sp120, 0.2f, 2.0f, 0.0f); Math_SmoothStepToAngle(&sZoFwork[ZO_BSF_16], sp114, 0.2f, 2.0f, 0.0f); Math_SmoothStepToAngle(&sZoFwork[ZO_BSF_12], sp118, 0.2f, 2.0f, 0.0f); - if ((bossZO->obj.rot.y >= 330.0f) || (bossZO->obj.rot.y <= 30.0f) || - ((bossZO->obj.rot.y <= 200.0f) && (bossZO->obj.rot.y >= 160.0f))) { + if ((this->obj.rot.y >= 330.0f) || (this->obj.rot.y <= 30.0f) || + ((this->obj.rot.y <= 200.0f) && (this->obj.rot.y >= 160.0f))) { if ((sZoFwork[ZO_BSF_15] > 315.0f) || (sZoFwork[ZO_BSF_15] < 215.0f)) { - Zoness_801986FC(bossZO, 0, sp78.x, sp78.y, sp78.z, sZoFwork[ZO_BSF_5]); + Zoness_801986FC(this, 0, sp78.x, sp78.y, sp78.z, sZoFwork[ZO_BSF_5]); } if ((sZoFwork[ZO_BSF_16] < 45.0f) || (sZoFwork[ZO_BSF_16] > 145.0f)) { - Zoness_801986FC(bossZO, 1, sp6C.x, sp6C.y, sp6C.z, sZoFwork[ZO_BSF_12]); + Zoness_801986FC(this, 1, sp6C.x, sp6C.y, sp6C.z, sZoFwork[ZO_BSF_12]); } Math_SmoothStepToF(&sZoFwork[ZO_BSF_35], 0.0f, 1.0f, 2.0f, 0.00001f); Math_SmoothStepToF(&sZoFwork[ZO_BSF_36], 0.0f, 1.0f, 2.0f, 0.00001f); @@ -2596,6 +2706,7 @@ void Zoness_Boss_Update(Boss* bossZO) { Math_SmoothStepToF(&sZoFwork[ZO_BSF_13], sZoFwork[ZO_BSF_36], 0.4f, 100.0f, 0.00001f); } } + if ((sZoSwork[ZO_BSS_8] == 0) && (sZoLimbTimers[ZO_LIMB_15] != LIMB_DESTROYED)) { if ((sZoFwork[ZO_BSF_87] < -570.0f) || (sZoFwork[ZO_BSF_88] > 1600.0f)) { sZoLimbTimers[ZO_LIMB_1] = sZoLimbTimers[ZO_LIMB_14] = sZoLimbTimers[ZO_LIMB_15] = LIMB_DESTROYED; @@ -2614,10 +2725,11 @@ void Zoness_Boss_Update(Boss* bossZO) { } } } + if ((sZoSwork[ZO_BSS_9] == 0) && (sZoLimbTimers[ZO_LIMB_10] != LIMB_DESTROYED)) { if ((sZoFwork[ZO_BSF_81] > 700.0f) || (sZoFwork[ZO_BSF_82] < -400.0f)) { sZoLimbTimers[ZO_LIMB_10] = LIMB_DESTROYED; - ZO_HIT_3(bossZO)->b.z.offset = 100000.0f; + ZO_HIT_3(this)->b.z.offset = 100000.0f; } else { sZoFwork[ZO_BSF_80] -= 5.0f; sZoFwork[ZO_BSF_81] += 12.0f; @@ -2631,10 +2743,11 @@ void Zoness_Boss_Update(Boss* bossZO) { } } } + if ((sZoSwork[ZO_BSS_10] == 0) && (sZoLimbTimers[ZO_LIMB_2] != LIMB_DESTROYED)) { if ((sZoFwork[ZO_BSF_84] > 700.0f) || (sZoFwork[ZO_BSF_85] < -400.0f)) { sZoLimbTimers[ZO_LIMB_2] = LIMB_DESTROYED; - ZO_HIT_4(bossZO)->b.z.offset = 100000.0f; + ZO_HIT_4(this)->b.z.offset = 100000.0f; } else { sZoFwork[ZO_BSF_83] -= 5.0f; sZoFwork[ZO_BSF_84] += 12.0f; @@ -2648,6 +2761,7 @@ void Zoness_Boss_Update(Boss* bossZO) { } } } + if ((sZoSwork[ZO_BSS_13] < 2) && (sZoLimbTimers[ZO_LIMB_5] != LIMB_DESTROYED)) { D_ctx_801779A8[0] = 20; if (((gGameFrameCount % 2) == 0)) { @@ -2655,7 +2769,7 @@ void Zoness_Boss_Update(Boss* bossZO) { sZoFwork[ZO_BSF_52_Y] + RAND_FLOAT_CENTERED(200.0f), sZoFwork[ZO_BSF_52_Z] + RAND_FLOAT_CENTERED(100.0f), 5.0f); } - if (bossZO->swork[ZO_SWK_14] != 0) { + if (this->swork[ZO_SWK_14] != 0) { if (sZoLimbTimers[ZO_LIMB_5] == 0) { sZoLimbTimers[ZO_LIMB_5] = sZoLimbTimers[ZO_LIMB_6] = 15; } @@ -2681,135 +2795,142 @@ void Zoness_Boss_Update(Boss* bossZO) { } } } - if (bossZO->dmgType != DMG_NONE) { - dmgType = bossZO->dmgType; - bossZO->dmgType = DMG_NONE; + + if (this->dmgType != DMG_NONE) { + dmgType = this->dmgType; + this->dmgType = DMG_NONE; if (dmgType == DMG_BEAM) { - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, bossZO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } - switch (bossZO->dmgPart) { + + switch (this->dmgPart) { case 0: - if ((sZoSwork[ZO_BSS_8] != 0) && (dmgType == DMG_BOMB) && - ((bossZO->state == 3) || (bossZO->state == 8))) { + if ((sZoSwork[ZO_BSS_8] != 0) && (dmgType == DMG_BOMB) && ((this->state == 3) || (this->state == 8))) { sZoLimbTimers[ZO_LIMB_1] = sZoLimbTimers[ZO_LIMB_14] = sZoLimbTimers[ZO_LIMB_15] = 15; sZoSwork[ZO_BSS_49] = 60; - sZoSwork[ZO_BSS_8] -= bossZO->damage; + sZoSwork[ZO_BSS_8] -= this->damage; if (sZoSwork[ZO_BSS_8] <= 0) { sZoSwork[ZO_BSS_49] = sZoSwork[ZO_BSS_8] = 0; - bossZO->swork[ZO_SWK_5] = 30; + this->swork[ZO_SWK_5] = 30; } } break; + case 3: - if ((sZoSwork[ZO_BSS_9] != 0) && (bossZO->state == 3) && (dmgType == DMG_BOMB) && + if ((sZoSwork[ZO_BSS_9] != 0) && (this->state == 3) && (dmgType == DMG_BOMB) && (sZoSwork[ZO_BSS_50] == 0)) { sZoLimbTimers[ZO_LIMB_10] = 15; sZoSwork[ZO_BSS_50] = 50; - sZoSwork[ZO_BSS_9] -= bossZO->damage; + sZoSwork[ZO_BSS_9] -= this->damage; if (sZoSwork[ZO_BSS_9] <= 0) { sZoSwork[ZO_BSS_50] = sZoSwork[ZO_BSS_9] = 0; spD8.x = sZoFwork[ZO_BSF_29_X]; spD8.y = sZoFwork[ZO_BSF_29_Y]; spD8.z = sZoFwork[ZO_BSF_29_Z]; - func_effect_8007A6F0(&spD8, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&spD8, NA_SE_EN_EXPLOSION_S); } } break; + case 4: - if ((sZoSwork[ZO_BSS_10] != 0) && (bossZO->state == 3) && (dmgType == DMG_BOMB) && + if ((sZoSwork[ZO_BSS_10] != 0) && (this->state == 3) && (dmgType == DMG_BOMB) && (sZoSwork[ZO_BSS_51] == 0)) { sZoLimbTimers[ZO_LIMB_2] = 15; sZoSwork[ZO_BSS_51] = 50; - sZoSwork[ZO_BSS_10] -= bossZO->damage; + sZoSwork[ZO_BSS_10] -= this->damage; if (sZoSwork[ZO_BSS_10] <= 0) { sZoSwork[ZO_BSS_51] = sZoSwork[ZO_BSS_10] = 0; spD8.x = sZoFwork[ZO_BSF_32_X]; spD8.y = sZoFwork[ZO_BSF_32_Y]; spD8.z = sZoFwork[ZO_BSF_32_Z]; - func_effect_8007A6F0(&spD8, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&spD8, NA_SE_EN_EXPLOSION_S); } } break; + case 5: - if ((sZoSwork[ZO_BSS_9] != 0) && (bossZO->state == 3) && (dmgType == DMG_BOMB) && + if ((sZoSwork[ZO_BSS_9] != 0) && (this->state == 3) && (dmgType == DMG_BOMB) && (sZoSwork[ZO_BSS_50] == 0)) { sZoLimbTimers[ZO_LIMB_10] = 15; sZoSwork[ZO_BSS_50] = 50; - sZoSwork[ZO_BSS_9] -= bossZO->damage; + sZoSwork[ZO_BSS_9] -= this->damage; if (sZoSwork[ZO_BSS_9] <= 0) { sZoSwork[ZO_BSS_50] = sZoSwork[ZO_BSS_9] = 0; spD8.x = sZoFwork[ZO_BSF_29_X]; spD8.y = sZoFwork[ZO_BSF_29_Y]; spD8.z = sZoFwork[ZO_BSF_29_Z]; - func_effect_8007A6F0(&spD8, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&spD8, NA_SE_EN_EXPLOSION_S); } } - if ((sZoSwork[ZO_BSS_10] != 0) && (bossZO->state == 3) && (dmgType == DMG_BOMB) && + + if ((sZoSwork[ZO_BSS_10] != 0) && (this->state == 3) && (dmgType == DMG_BOMB) && (sZoSwork[ZO_BSS_51] == 0)) { sZoLimbTimers[ZO_LIMB_2] = 15; sZoSwork[ZO_BSS_51] = 50; - sZoSwork[ZO_BSS_10] -= bossZO->damage; + sZoSwork[ZO_BSS_10] -= this->damage; if (sZoSwork[ZO_BSS_10] <= 0) { sZoSwork[ZO_BSS_51] = sZoSwork[ZO_BSS_10] = 0; spD8.x = sZoFwork[ZO_BSF_32_X]; spD8.y = sZoFwork[ZO_BSF_32_Y]; spD8.z = sZoFwork[ZO_BSF_32_Z]; - func_effect_8007A6F0(&spD8, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&spD8, NA_SE_EN_EXPLOSION_S); } } /* fallthrough */ case 6: - if ((bossZO->health != 0) && (sZoSwork[ZO_BSS_9] == 0) && (sZoSwork[ZO_BSS_10] == 0) && + if ((this->health != 0) && (sZoSwork[ZO_BSS_9] == 0) && (sZoSwork[ZO_BSS_10] == 0) && (sZoSwork[ZO_BSS_11] == 0) && (sZoSwork[ZO_BSS_12] == 0) && (sZoSwork[ZO_BSS_13] == 0) && - (bossZO->state == 3)) { + (this->state == 3)) { sZoLimbTimers[ZO_LIMB_25] = sZoLimbTimers[ZO_LIMB_36] = 15; - bossZO->health -= bossZO->damage; - if (bossZO->health < 150) { - AUDIO_PLAY_SFX(NA_SE_EN_KNOCK_DOWN, bossZO->sfxSource, 4); + this->health -= this->damage; + if (this->health < 150) { + AUDIO_PLAY_SFX(NA_SE_EN_KNOCK_DOWN, this->sfxSource, 4); } else { - AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, bossZO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, this->sfxSource, 4); } - if (bossZO->health <= 0) { + if (this->health <= 0) { gTeamLowHealthMsgTimer = -1; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 40); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 40); - Audio_KillSfxBySource(bossZO->sfxSource); - AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, bossZO->sfxSource, 4); - sZoSwork[ZO_BSS_8] = bossZO->health = sZoSwork[ZO_BSS_24] = 0; - bossZO->timer_050 = 100; - AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, bossZO->sfxSource, 4); + Audio_KillSfxBySource(this->sfxSource); + AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, this->sfxSource, 4); + sZoSwork[ZO_BSS_8] = this->health = sZoSwork[ZO_BSS_24] = 0; + this->timer_050 = 100; + AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, this->sfxSource, 4); sZoFwork[ZO_BSF_27] = 20.0f; sZoFwork[ZO_BSF_26] = 50.0f; sZoFwork[ZO_BSF_28] = -2600.0f; - bossZO->state = 6; - bossZO->fwork[ZO_FWK_4] = 1.0f; + this->state = 6; + this->fwork[ZO_FWK_4] = 1.0f; } } break; + case 7: case 12: - if ((sZoSwork[ZO_BSS_13] >= 2) && (bossZO->state == 5) && (dmgType == DMG_BOMB)) { + if ((sZoSwork[ZO_BSS_13] >= 2) && (this->state == 5) && (dmgType == DMG_BOMB)) { sZoLimbTimers[ZO_LIMB_5] = sZoLimbTimers[ZO_LIMB_6] = 15; sZoSwork[ZO_BSS_52] = 30; - sZoSwork[ZO_BSS_13] -= bossZO->damage; + sZoSwork[ZO_BSS_13] -= this->damage; if (sZoSwork[ZO_BSS_13] < 2) { - bossZO->swork[ZO_SWK_14] = 30; + this->swork[ZO_SWK_14] = 30; sZoSwork[ZO_BSS_13] = 1; Radio_PlayMessage(gMsg_ID_6090, RCID_BOSS_ZONESS); spD8.x = sZoFwork[ZO_BSF_52_X]; spD8.y = sZoFwork[ZO_BSF_52_Y]; spD8.z = sZoFwork[ZO_BSF_52_Z]; - func_effect_8007A6F0(&spD8, NA_SE_EN_SINK_PARTS); + Effect_SpawnTimedSfxAtPos(&spD8, NA_SE_EN_SINK_PARTS); } } break; + case 8 + 0: case 10 + 0: - if ((sZoSwork[ZO_BSS_11] != 0) && (bossZO->state == 3) && (dmgType == DMG_BOMB) && + if ((sZoSwork[ZO_BSS_11] != 0) && (this->state == 3) && (dmgType == DMG_BOMB) && (sZoSwork[ZO_BSS_53] == 0)) { sZoLimbTimers[ZO_LIMB_7] = sZoLimbTimers[ZO_LIMB_21] = sZoLimbTimers[ZO_LIMB_22] = 15; sZoSwork[ZO_BSS_53] = 50; - sZoSwork[ZO_BSS_11] -= bossZO->damage; + sZoSwork[ZO_BSS_11] -= this->damage; if (sZoSwork[ZO_BSS_11] <= 0) { sZoSwork[ZO_BSS_11] = 0; gCameraShake = 30; @@ -2817,25 +2938,26 @@ void Zoness_Boss_Update(Boss* bossZO) { gFillScreenAlpha = gFillScreenAlphaTarget = 255; gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 25; - bossZO->swork[ZO_SWK_15] = 3; + this->swork[ZO_SWK_15] = 3; spD8.x = sZoFwork[ZO_BSF_106_X]; spD8.y = sZoFwork[ZO_BSF_106_Y]; spD8.z = sZoFwork[ZO_BSF_106_Z]; - func_effect_8007A6F0(&spD8, NA_SE_EN_SINK_PARTS); + Effect_SpawnTimedSfxAtPos(&spD8, NA_SE_EN_SINK_PARTS); sZoSwork[ZO_BSS_16] = 0; - ZO_HIT_8(bossZO, 0)->z.offset = ZO_HIT_10(bossZO, 0)->z.offset = 100000.0f; - bossZO->state = 4; - bossZO->fwork[ZO_FWK_9] = 330.0f; + ZO_HIT_8(this, 0)->z.offset = ZO_HIT_10(this, 0)->z.offset = 100000.0f; + this->state = 4; + this->fwork[ZO_FWK_9] = 330.0f; } } break; + case 8 + 1: case 10 + 1: - if ((sZoSwork[ZO_BSS_12] != 0) && (bossZO->state == 3) && (dmgType == DMG_BOMB) && + if ((sZoSwork[ZO_BSS_12] != 0) && (this->state == 3) && (dmgType == DMG_BOMB) && (sZoSwork[ZO_BSS_54] == 0)) { sZoLimbTimers[ZO_LIMB_11] = sZoLimbTimers[ZO_LIMB_23] = sZoLimbTimers[ZO_LIMB_24] = 15; sZoSwork[ZO_BSS_54] = 50; - sZoSwork[ZO_BSS_12] -= bossZO->damage; + sZoSwork[ZO_BSS_12] -= this->damage; if (sZoSwork[ZO_BSS_12] <= 0) { sZoSwork[ZO_BSS_12] = 0; gCameraShake = 30; @@ -2843,20 +2965,21 @@ void Zoness_Boss_Update(Boss* bossZO) { gFillScreenAlpha = gFillScreenAlphaTarget = 255; gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 25; - bossZO->swork[ZO_SWK_15] = 3; + this->swork[ZO_SWK_15] = 3; spCC.x = sZoFwork[ZO_BSF_109_X]; spCC.y = sZoFwork[ZO_BSF_109_Y]; spCC.z = sZoFwork[ZO_BSF_109_Z]; - func_effect_8007A6F0(&spCC, NA_SE_EN_SINK_PARTS); + Effect_SpawnTimedSfxAtPos(&spCC, NA_SE_EN_SINK_PARTS); sZoSwork[ZO_BSS_16] = 0; - ZO_HIT_8(bossZO, 1)->z.offset = ZO_HIT_10(bossZO, 1)->z.offset = 100000.0f; - bossZO->state = 4; - bossZO->fwork[ZO_FWK_9] = 30.0f; + ZO_HIT_8(this, 1)->z.offset = ZO_HIT_10(this, 1)->z.offset = 100000.0f; + this->state = 4; + this->fwork[ZO_FWK_9] = 30.0f; } } break; } } + if (sZoSwork[ZO_BSS_0] != 0) { sZoSwork[ZO_BSS_0]--; } @@ -2887,32 +3010,35 @@ void Zoness_Boss_Update(Boss* bossZO) { if (sZoSwork[ZO_BSS_40] != 0) { sZoSwork[ZO_BSS_40]--; } - if (bossZO->swork[ZO_SWK_14] != 0) { - bossZO->swork[ZO_SWK_14]--; + if (this->swork[ZO_SWK_14] != 0) { + this->swork[ZO_SWK_14]--; } - if (bossZO->swork[ZO_SWK_4] != 0) { - bossZO->swork[ZO_SWK_4]--; + if (this->swork[ZO_SWK_4] != 0) { + this->swork[ZO_SWK_4]--; } - if (bossZO->swork[ZO_SWK_5] != 0) { - bossZO->swork[ZO_SWK_5]--; + if (this->swork[ZO_SWK_5] != 0) { + this->swork[ZO_SWK_5]--; } - if (bossZO->swork[ZO_SWK_15] != 0) { - bossZO->swork[ZO_SWK_15]--; + if (this->swork[ZO_SWK_15] != 0) { + this->swork[ZO_SWK_15]--; } - if (bossZO->swork[ZO_SWK_6] > 1) { - bossZO->swork[ZO_SWK_6]--; + if (this->swork[ZO_SWK_6] > 1) { + this->swork[ZO_SWK_6]--; } + for (sp124 = 0; sp124 < ZO_LIMB_MAX; sp124++) { if ((sZoLimbTimers[sp124] > 0) && (sZoLimbTimers[sp124] < 200)) { sZoLimbTimers[sp124]--; } } + for (i = ZO_BSS_49, sp124 = 0; sp124 < 6; sp124++, i++) { if (sZoSwork[i] != 0) { sZoSwork[i]--; } } - if (bossZO->state < 4) { + + if (this->state < 4) { spD8.x = sZoFwork[ZO_BSF_106_X]; spD8.y = sZoFwork[ZO_BSF_106_Y]; spD8.z = sZoFwork[ZO_BSF_106_Z]; @@ -2920,50 +3046,52 @@ void Zoness_Boss_Update(Boss* bossZO) { spCC.y = sZoFwork[ZO_BSF_109_Y]; spCC.z = sZoFwork[ZO_BSF_109_Z]; if (((sZoSwork[ZO_BSS_53] % 2) != 0) && (sZoSwork[ZO_BSS_11] != 0)) { - func_effect_8007A6F0(&spD8, NA_SE_OB_DAMAGE_M); + Effect_SpawnTimedSfxAtPos(&spD8, NA_SE_OB_DAMAGE_M); } if (((sZoSwork[ZO_BSS_54] % 2) != 0) && (sZoSwork[ZO_BSS_12] != 0)) { - func_effect_8007A6F0(&spCC, NA_SE_OB_DAMAGE_M); + Effect_SpawnTimedSfxAtPos(&spCC, NA_SE_OB_DAMAGE_M); } } + if ((sZoSwork[ZO_BSS_50] % 2) != 0) { spD8.x = sZoFwork[ZO_BSF_29_X]; spD8.y = sZoFwork[ZO_BSF_29_Y]; spD8.z = sZoFwork[ZO_BSF_29_Z]; - func_effect_8007A6F0(&spD8, NA_SE_EN_DAMAGE_S); + Effect_SpawnTimedSfxAtPos(&spD8, NA_SE_EN_DAMAGE_S); } if ((sZoSwork[ZO_BSS_51] % 2) != 0) { spD8.x = sZoFwork[ZO_BSF_32_X]; spD8.y = sZoFwork[ZO_BSF_32_Y]; spD8.z = sZoFwork[ZO_BSF_32_Z]; - func_effect_8007A6F0(&spD8, NA_SE_EN_DAMAGE_S); + Effect_SpawnTimedSfxAtPos(&spD8, NA_SE_EN_DAMAGE_S); } if ((sZoSwork[ZO_BSS_52] % 2) != 0) { spD8.x = sZoFwork[ZO_BSF_52_X]; spD8.y = sZoFwork[ZO_BSF_52_Y]; spD8.z = sZoFwork[ZO_BSF_52_Z]; - func_effect_8007A6F0(&spD8, NA_SE_OB_DAMAGE_M); + Effect_SpawnTimedSfxAtPos(&spD8, NA_SE_OB_DAMAGE_M); } - if (Play_CheckDynaFloorCollision(&sp134, &sp130, bossZO->obj.pos.x, bossZO->obj.pos.y - 500.0f, - bossZO->obj.pos.z) != 0) { - Math_SmoothStepToF(&bossZO->obj.pos.y, sp134 - 20.0f, 0.1f, bossZO->fwork[ZO_FWK_4], 0.0f); - bossZO->fwork[ZO_FWK_1] = SIN_DEG(gGameFrameCount * 7.0f) * 12.0f; - bossZO->fwork[ZO_FWK_2] = COS_DEG(gGameFrameCount * 9.0f) * 12.0f; - bossZO->fwork[ZO_FWK_3] = SIN_DEG(gGameFrameCount * 10.0f) * 30.0f; - if ((bossZO->timer_054 == 0) && (sZoSwork[ZO_BSS_5] < 2)) { - func_effect_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, 50.0f, 0.0f, 5.0f); - func_effect_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, 46.0f, 19.0f, 5.0f); - func_effect_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, 35.0f, 35.0f, 5.0f); - func_effect_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, 19.0f, 46.0f, 5.0f); - func_effect_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, 0.0f, 50.0f, 5.0f); - func_effect_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, -50.0f, 0.0f, 5.0f); - func_effect_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, -46.0f, 19.0f, 5.0f); - func_effect_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, -35.0f, 35.0f, 5.0f); - func_effect_8007AFD0(bossZO->obj.pos.x, bossZO->obj.pos.z, -19.0f, 46.0f, 5.0f); - bossZO->timer_054 = 20; + + if (Play_CheckDynaFloorCollision(&sp134, &sp130, this->obj.pos.x, this->obj.pos.y - 500.0f, this->obj.pos.z) != 0) { + Math_SmoothStepToF(&this->obj.pos.y, sp134 - 20.0f, 0.1f, this->fwork[ZO_FWK_4], 0.0f); + this->fwork[ZO_FWK_1] = SIN_DEG(gGameFrameCount * 7.0f) * 12.0f; + this->fwork[ZO_FWK_2] = COS_DEG(gGameFrameCount * 9.0f) * 12.0f; + this->fwork[ZO_FWK_3] = SIN_DEG(gGameFrameCount * 10.0f) * 30.0f; + if ((this->timer_054 == 0) && (sZoSwork[ZO_BSS_5] < 2)) { + func_effect_8007AFD0(this->obj.pos.x, this->obj.pos.z, 50.0f, 0.0f, 5.0f); + func_effect_8007AFD0(this->obj.pos.x, this->obj.pos.z, 46.0f, 19.0f, 5.0f); + func_effect_8007AFD0(this->obj.pos.x, this->obj.pos.z, 35.0f, 35.0f, 5.0f); + func_effect_8007AFD0(this->obj.pos.x, this->obj.pos.z, 19.0f, 46.0f, 5.0f); + func_effect_8007AFD0(this->obj.pos.x, this->obj.pos.z, 0.0f, 50.0f, 5.0f); + func_effect_8007AFD0(this->obj.pos.x, this->obj.pos.z, -50.0f, 0.0f, 5.0f); + func_effect_8007AFD0(this->obj.pos.x, this->obj.pos.z, -46.0f, 19.0f, 5.0f); + func_effect_8007AFD0(this->obj.pos.x, this->obj.pos.z, -35.0f, 35.0f, 5.0f); + func_effect_8007AFD0(this->obj.pos.x, this->obj.pos.z, -19.0f, 46.0f, 5.0f); + this->timer_054 = 20; sZoSwork[ZO_BSS_5]++; } } + if (gBossFrameCount == 530) { Radio_PlayMessage(gMsg_ID_2225, RCID_SLIPPY); } @@ -2971,18 +3099,21 @@ void Zoness_Boss_Update(Boss* bossZO) { gShowBossHealth = true; } if (gBossFrameCount > 686) { - gBossHealthBar = bossZO->health / 300.0f * 64.0f; + gBossHealthBar = this->health / 300.0f * 64.0f; gBossHealthBar += (s32) ((sZoSwork[ZO_BSS_11] / 20.0f) * 64.0f); gBossHealthBar += (s32) ((sZoSwork[ZO_BSS_12] / 20.0f) * 64.0f); gBossHealthBar += (s32) ((sZoSwork[ZO_BSS_9] / (20.0f * 2)) * 16.0f); gBossHealthBar += (s32) ((sZoSwork[ZO_BSS_10] / (20.0f * 2)) * 16.0f); gBossHealthBar += (s32) ((sZoSwork[ZO_BSS_13] / 61.0f) * 31.0f); } - ZO_HIT_0(bossZO)->z.offset = sZoFwork[ZO_BSF_43_Z] - bossZO->obj.pos.z; - ZO_HIT_0(bossZO)->x.offset = sZoFwork[ZO_BSF_43_X] - bossZO->obj.pos.x; - ZO_HIT_1(bossZO)->z.offset = sZoFwork[ZO_BSF_43_Z] - bossZO->obj.pos.z; - ZO_HIT_1(bossZO)->x.offset = sZoFwork[ZO_BSF_43_X] - bossZO->obj.pos.x; - Animation_GetFrameData(&D_ZO_601996C, 0, bossZO->vwork); + + ZO_HIT_0(this)->z.offset = sZoFwork[ZO_BSF_43_Z] - this->obj.pos.z; + ZO_HIT_0(this)->x.offset = sZoFwork[ZO_BSF_43_X] - this->obj.pos.x; + ZO_HIT_1(this)->z.offset = sZoFwork[ZO_BSF_43_Z] - this->obj.pos.z; + ZO_HIT_1(this)->x.offset = sZoFwork[ZO_BSF_43_X] - this->obj.pos.x; + + Animation_GetFrameData(&D_ZO_601996C, 0, this->vwork); + if (sZoSwork[ZO_BSS_38] != 0) { sZoSwork[ZO_BSS_37] -= 10; if (sZoSwork[ZO_BSS_37] < 0) { @@ -3000,84 +3131,92 @@ void Zoness_Boss_Update(Boss* bossZO) { } } -void Zoness_801986FC(Boss* bossZO, s32 arg1, f32 xOff, f32 yOff, f32 zOff, f32 yRot) { - Actor* newActor; - Vec3f sp60 = { 0.0f, 0.0f, 50.0f }; - Vec3f sp54; - s32 sp50; +void Zoness_801986FC(BossZO* this, s32 arg1, f32 xOff, f32 yOff, f32 zOff, f32 yRot) { + Actor245* actor245; + Vec3f src = { 0.0f, 0.0f, 50.0f }; + Vec3f dest; + s32 i; if ((sZoSwork[ZO_BSS_0 + arg1] == 0) && (sZoSwork[ZO_BSS_11 + arg1] != 0)) { sZoSwork[ZO_BSS_0 + arg1] = 70; - sp50 = arg1; + i = arg1; if (arg1 != 0) { - sp50 = -1; + i = -1; } - if (sZoSwork[ZO_BSS_12 + sp50] == 0) { + + if (sZoSwork[ZO_BSS_12 + i] == 0) { sZoSwork[ZO_BSS_0 + arg1] = 40; } - for (sp50 = 0, newActor = gActors; sp50 < ARRAY_COUNT(gActors); sp50++, newActor++) { - if (newActor->obj.status == OBJ_FREE) { - D_ctx_801779A8[0] = 20.0f; - Actor_Initialize(newActor); - newActor->obj.status = OBJ_INIT; - newActor->obj.id = OBJ_ACTOR_245; - newActor->obj.pos.x = bossZO->obj.pos.x + xOff; - newActor->obj.pos.y = bossZO->obj.pos.y + yOff; - newActor->obj.pos.z = bossZO->obj.pos.z + zOff; - newActor->health = 10; - Matrix_RotateY(gCalcMatrix, bossZO->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, bossZO->obj.rot.x * M_DTOR, MTXF_APPLY); + for (i = 0, actor245 = &gActors[0]; i < ARRAY_COUNT(gActors); i++, actor245++) { + if (actor245->obj.status == OBJ_FREE) { + D_ctx_801779A8[0] = 20.0f; + Actor_Initialize(actor245); + actor245->obj.status = OBJ_INIT; + actor245->obj.id = OBJ_ACTOR_245; + + actor245->obj.pos.x = this->obj.pos.x + xOff; + actor245->obj.pos.y = this->obj.pos.y + yOff; + actor245->obj.pos.z = this->obj.pos.z + zOff; + + actor245->health = 10; + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, sZoFwork[ZO_BSF_15 + arg1] * M_DTOR, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, M_DTOR * yRot, MTXF_APPLY); - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp60, &sp54); - newActor->vel.x = sp54.x; - newActor->vel.y = sp54.y; - newActor->vel.z = bossZO->vel.z + sp54.z; - Object_SetInfo(&newActor->info, newActor->obj.id); + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + actor245->vel.x = dest.x; + actor245->vel.y = dest.y; + actor245->vel.z = this->vel.z + dest.z; + Object_SetInfo(&actor245->info, actor245->obj.id); sZoFwork[ZO_BSF_35 + arg1] = 40.0f; - AUDIO_PLAY_SFX(NA_SE_EN_S_BALL_SHOT, bossZO->sfxSource, 4); - for (sp50 = 0; sp50 < 4; sp50++) { - Zoness_80193C5C(newActor->obj.pos.x + (sp54.x * 4.3f), newActor->obj.pos.y + (sp54.y * 4.3f), - newActor->obj.pos.z + (sp54.z * 4.3f) + 100.0f, 30.0f); + + AUDIO_PLAY_SFX(NA_SE_EN_S_BALL_SHOT, this->sfxSource, 4); + + for (i = 0; i < 4; i++) { + Zoness_80193C5C(actor245->obj.pos.x + (dest.x * 4.3f), actor245->obj.pos.y + (dest.y * 4.3f), + actor245->obj.pos.z + (dest.z * 4.3f) + 100.0f, 30.0f); } break; } } } - if (sp50 >= ARRAY_COUNT(gActors)) { - newActor->obj.status = OBJ_FREE; + + if (i >= ARRAY_COUNT(gActors)) { + actor245->obj.status = OBJ_FREE; } } -void Zoness_801989FC(Boss* bossZO) { +void Zoness_801989FC(BossZO* this) { s32 i; Vec3f sp70 = { 0.0f, 0.0f, 20.0f }; Vec3f sp64; - Actor* newActor; + Actor246* actor246; s32 j; for (i = 0; i < 2; i++) { if (sZoSwork[ZO_BSS_11 + i] != 0) { - for (j = 0, newActor = gActors; j < ARRAY_COUNT(gActors); j++, newActor++) { - if (newActor->obj.status == OBJ_FREE) { - Actor_Initialize(newActor); - newActor->obj.status = OBJ_INIT; - newActor->obj.id = OBJ_ACTOR_246; - newActor->obj.pos.x = sZoFwork[ZO_BSF_37_X + 3 * i]; - newActor->obj.pos.y = sZoFwork[ZO_BSF_37_Y + 3 * i]; - newActor->obj.pos.z = sZoFwork[ZO_BSF_37_Z + 3 * i]; - newActor->obj.rot.y = bossZO->obj.rot.y; - newActor->timer_0BC = 300; - newActor->health = 10; + for (j = 0, actor246 = gActors; j < ARRAY_COUNT(gActors); j++, actor246++) { + if (actor246->obj.status == OBJ_FREE) { + Actor_Initialize(actor246); + actor246->obj.status = OBJ_INIT; + actor246->obj.id = OBJ_ACTOR_246; - Matrix_RotateY(gCalcMatrix, bossZO->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, bossZO->obj.rot.x * M_DTOR, MTXF_APPLY); + actor246->obj.pos.x = sZoFwork[ZO_BSF_37_X + 3 * i]; + actor246->obj.pos.y = sZoFwork[ZO_BSF_37_Y + 3 * i]; + actor246->obj.pos.z = sZoFwork[ZO_BSF_37_Z + 3 * i]; + + actor246->obj.rot.y = this->obj.rot.y; + actor246->timer_0BC = 300; + actor246->health = 10; + + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp70, &sp64); - newActor->vel.x = sp64.x; - newActor->vel.z = bossZO->vel.z + sp64.z; - Object_SetInfo(&newActor->info, newActor->obj.id); - AUDIO_PLAY_SFX(NA_SE_EN_MISSILE_SHOT, bossZO->sfxSource, 4); + actor246->vel.x = sp64.x; + actor246->vel.z = this->vel.z + sp64.z; + Object_SetInfo(&actor246->info, actor246->obj.id); + AUDIO_PLAY_SFX(NA_SE_EN_MISSILE_SHOT, this->sfxSource, 4); break; } } @@ -3085,15 +3224,15 @@ void Zoness_801989FC(Boss* bossZO) { } } -void Zoness_80198BE8(Boss* bossZO, s32 arg1) { +void Zoness_80198BE8(BossZO* this, s32 arg1) { s32 var_s1; - Effect* effect; - Vec3f sp3C = { 0.0f, 0.0f, 100.0f }; - Vec3f sp30; + Effect398* effect398; + Vec3f src = { 0.0f, 0.0f, 100.0f }; + Vec3f dest; if ((sZoSwork[ZO_BSS_2 + arg1] == 0) && (sZoSwork[ZO_BSS_39 + arg1] == 0)) { if ((arg1 == 0) && (sZoSwork[ZO_BSS_41] == 0)) { - AUDIO_PLAY_SFX(NA_SE_EN_ZOBOSS_BEAM, bossZO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ZOBOSS_BEAM, this->sfxSource, 4); } sZoSwork[ZO_BSS_2 + arg1] = 2; sZoSwork[ZO_BSS_41 + arg1]++; @@ -3101,67 +3240,68 @@ void Zoness_80198BE8(Boss* bossZO, s32 arg1) { sZoSwork[ZO_BSS_41 + arg1] = 0; sZoSwork[ZO_BSS_39 + arg1] = 30; if (arg1 == 1) { - Audio_KillSfxBySourceAndId(bossZO->sfxSource, NA_SE_EN_ZOBOSS_BEAM); + Audio_KillSfxBySourceAndId(this->sfxSource, NA_SE_EN_ZOBOSS_BEAM); } } - for (var_s1 = 0, effect = gEffects; var_s1 < 100; var_s1++, effect++) { - if (effect->obj.status == OBJ_FREE) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_398; - effect->timer_50 = 100; - effect->state = 1; - effect->scale2 = 1.0f; - effect->obj.rot.z = 30.0f; - effect->obj.pos.x = sZoFwork[ZO_BSF_93_X + 3 * arg1]; - effect->obj.pos.y = sZoFwork[ZO_BSF_93_Y + 3 * arg1]; - effect->obj.pos.z = sZoFwork[ZO_BSF_93_Z + 3 * arg1]; + + for (var_s1 = 0, effect398 = &gEffects[0]; var_s1 < 100; var_s1++, effect398++) { + if (effect398->obj.status == OBJ_FREE) { + Effect_Initialize(effect398); + effect398->obj.status = OBJ_INIT; + effect398->obj.id = OBJ_EFFECT_398; + effect398->timer_50 = 100; + effect398->state = 1; + effect398->scale2 = 1.0f; + effect398->obj.rot.z = 30.0f; + effect398->obj.pos.x = sZoFwork[ZO_BSF_93_X + 3 * arg1]; + effect398->obj.pos.y = sZoFwork[ZO_BSF_93_Y + 3 * arg1]; + effect398->obj.pos.z = sZoFwork[ZO_BSF_93_Z + 3 * arg1]; Matrix_RotateY(gCalcMatrix, sZoFwork[ZO_BSF_8 + 2 * arg1] * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, sZoFwork[ZO_BSF_7 + 2 * arg1] * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gCalcMatrix, bossZO->obj.rot.y * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gCalcMatrix, bossZO->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, bossZO->obj.rot.z * M_DTOR, MTXF_APPLY); - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp3C, &sp30); - effect->vel.x = sp30.x; - effect->vel.y = sp30.y; - effect->vel.z = sp30.z - gPathVelZ; - Object_SetInfo(&effect->info, effect->obj.id); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + effect398->vel.x = dest.x; + effect398->vel.y = dest.y; + effect398->vel.z = dest.z - gPathVelZ; + Object_SetInfo(&effect398->info, effect398->obj.id); break; } } if (var_s1 >= ARRAY_COUNT(gActors)) { - effect->obj.status = OBJ_FREE; + effect398->obj.status = OBJ_FREE; } } } -void Zoness_80198ECC(Boss* bossZO) { +void Zoness_80198ECC(BossZO* this) { sZoSwork[ZO_BSS_18] = 500; - bossZO->timer_050 = 100; - bossZO->timer_054 = 0; + this->timer_050 = 100; + this->timer_054 = 0; sZoSwork[ZO_BSS_5] = 0; sZoFwork[ZO_BSF_25] = -1200.0f; sZoFwork[ZO_BSF_23] = 15.0f; sZoFwork[ZO_BSF_28] = -3500.0f; sZoFwork[ZO_BSF_77] = 0.0f; - bossZO->state = 8; - bossZO->fwork[ZO_FWK_4] = 1.0f; + this->state = 8; + this->fwork[ZO_FWK_4] = 1.0f; } -void Zoness_80198F3C(Boss* bossZO, s32 arg1, s32 arg2) { - if ((((gGameFrameCount % 8) == 0) && (Rand_ZeroOne() < 0.5f))) { +void Zoness_80198F3C(BossZO* this, s32 arg1, s32 arg2) { + if (((gGameFrameCount % 8) == 0) && (Rand_ZeroOne() < 0.5f)) { sZoLimbTimers[ZO_LIMB_7 + 4 * arg1] = sZoLimbTimers[ZO_LIMB_21 + 2 * arg1] = sZoLimbTimers[ZO_LIMB_22 + 2 * arg1] = 15; } func_effect_8007D0E0(sZoFwork[ZO_BSF_0 + arg2] + RAND_FLOAT_CENTERED(400.0f), sZoFwork[ZO_BSF_1 + arg2] + RAND_RANGE(-160.0f, 640.0f), sZoFwork[ZO_BSF_2 + arg2], 7.0f); - if (((gGameFrameCount % 2) == 0)) { + if ((gGameFrameCount % 2) == 0) { func_effect_8007C120(sZoFwork[ZO_BSF_0 + arg2], sZoFwork[ZO_BSF_1 + arg2], sZoFwork[ZO_BSF_2 + arg2], - bossZO->vel.x, bossZO->vel.y, bossZO->vel.z, 0.2f, 10); + this->vel.x, this->vel.y, this->vel.z, 0.2f, 10); } } -void Zoness_8019907C(Boss* bossZO) { +void Zoness_8019907C(BossZO* this) { if ((sZoSwork[ZO_BSS_9] == 0) && (sZoSwork[ZO_BSS_10] == 0)) { if ((sZoSwork[ZO_BSS_31] == 0) && (sZoSwork[ZO_BSS_30] != 0)) { Radio_PlayMessage(gMsg_ID_6082, RCID_PEPPY); @@ -3173,34 +3313,33 @@ void Zoness_8019907C(Boss* bossZO) { sZoSwork[ZO_BSS_30]++; } sZoFwork[ZO_BSF_77] = 0.0f; - bossZO->state = 5; - + this->state = 5; } else { - Zoness_80198ECC(bossZO); + Zoness_80198ECC(this); } } -void Zoness_8019914C(Boss* bossZO, s32 arg1) { +void Zoness_8019914C(BossZO* this, s32 arg1) { sZoLimbTimers[ZO_LIMB_7 + 4 * arg1] = sZoLimbTimers[ZO_LIMB_21 + arg1 * 2] = sZoLimbTimers[ZO_LIMB_22 + arg1 * 2] = LIMB_DESTROYED; sZoFwork[ZO_BSF_77] = 0.0f; sZoSwork[ZO_BSS_36] = sZoSwork[ZO_BSS_16] = 0; - bossZO->swork[ZO_SWK_4] = 1000; - bossZO->state = 3; + this->swork[ZO_SWK_4] = 1000; + this->state = 3; if ((sZoSwork[ZO_BSS_11] == 0) && (sZoSwork[ZO_BSS_12] == 0)) { - bossZO->fwork[ZO_FWK_6] = bossZO->obj.pos.x; + this->fwork[ZO_FWK_6] = this->obj.pos.x; sZoSwork[ZO_BSS_20] = sZoSwork[ZO_BSS_24] = 1; } } f32 D_i3_801BF73C[2] = { -80.0f, 80.0f }; -void Zoness_801991D0(Boss* bossZO, s32 arg1) { +void Zoness_801991D0(Boss* this, s32 arg1) { Math_SmoothStepToF(&sZoFwork[ZO_BSF_4], D_i3_801BF73C[arg1], 1.0f, 5.0f, 0.001f); if (sZoFwork[ZO_BSF_4] == D_i3_801BF73C[arg1]) { Math_SmoothStepToF(&sZoFwork[ZO_BSF_3], -30.0f, 1.0f, 3.0f, 0.001f); if (sZoFwork[ZO_BSF_3] == -30.0f) { - bossZO->timer_052 = 60; + this->timer_052 = 60; sZoSwork[ZO_BSS_36] = 0; sZoSwork[ZO_BSS_16] = arg1 + 1; sZoFwork[ZO_BSF_77] = 0.0f; @@ -3208,37 +3347,37 @@ void Zoness_801991D0(Boss* bossZO, s32 arg1) { } if (arg1 == 0) { // all divisible by 13 - ZO_HIT_12(bossZO)->z.offset = -556.39996f; - ZO_HIT_12(bossZO)->z.size = 130.0f; - ZO_HIT_12(bossZO)->y.offset = 663.0f; - ZO_HIT_12(bossZO)->y.size = 171.59999f; - ZO_HIT_12(bossZO)->x.offset = 395.19998f; - ZO_HIT_12(bossZO)->x.size = 241.79999f; + ZO_HIT_12(this)->z.offset = -556.39996f; + ZO_HIT_12(this)->z.size = 130.0f; + ZO_HIT_12(this)->y.offset = 663.0f; + ZO_HIT_12(this)->y.size = 171.59999f; + ZO_HIT_12(this)->x.offset = 395.19998f; + ZO_HIT_12(this)->x.size = 241.79999f; } else { - ZO_HIT_12(bossZO)->z.offset = -556.39996f; - ZO_HIT_12(bossZO)->z.size = 130.0f; - ZO_HIT_12(bossZO)->y.offset = 663.0f; - ZO_HIT_12(bossZO)->y.size = 171.59999f; - ZO_HIT_12(bossZO)->x.offset = -395.19998f; - ZO_HIT_12(bossZO)->x.size = 241.79999f; + ZO_HIT_12(this)->z.offset = -556.39996f; + ZO_HIT_12(this)->z.size = 130.0f; + ZO_HIT_12(this)->y.offset = 663.0f; + ZO_HIT_12(this)->y.size = 171.59999f; + ZO_HIT_12(this)->x.offset = -395.19998f; + ZO_HIT_12(this)->x.size = 241.79999f; } } #define ZO_HIT_8_2(bossZO, index) ((Hitbox*) (ZO_HIT_7(bossZO) + 1) + (index)) #define ZO_HIT_10_2(bossZO, index) ((Hitbox*) (ZO_HIT_8(bossZO, 0) + 2) + (index)) -void Zoness_80199394(Boss* bossZO, s32 arg1) { +void Zoness_80199394(BossZO* this, s32 arg1) { sZoSwork[ZO_BSS_11 + arg1] = 20; - ZO_HIT_8(bossZO, arg1)->z.offset = -213.2f; - ZO_HIT_10(bossZO, arg1)->z.offset = -351.0f; - bossZO->timer_050 = 20; + ZO_HIT_8(this, arg1)->z.offset = -213.2f; + ZO_HIT_10(this, arg1)->z.offset = -351.0f; + this->timer_050 = 20; sZoFwork[ZO_BSF_17 + arg1] = sZoFwork[ZO_BSF_77] = 0.0f; sZoSwork[ZO_BSS_16] = 3; - AUDIO_PLAY_SFX(NA_SE_EN_COMBINE, bossZO->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_COMBINE, this->sfxSource, 4); } -void Zoness_80199470(Boss* bossZO, s32 arg1) { +void Zoness_80199470(BossZO* this, s32 arg1) { if (sZoSwork[ZO_BSS_13] == 0) { if (sZoFwork[ZO_BSF_17 + arg1] > -400.0f) { sZoFwork[ZO_BSF_17 + arg1] -= 4.0f; @@ -3247,59 +3386,59 @@ void Zoness_80199470(Boss* bossZO, s32 arg1) { sZoSwork[ZO_BSS_36]++; sZoFwork[ZO_BSF_77] = 0.0f; } - Zoness_8019962C(bossZO, 0.0f); - if (bossZO->obj.rot.y == 0.0f) { + Zoness_8019962C(this, 0.0f); + if (this->obj.rot.y == 0.0f) { sZoSwork[ZO_BSS_36] = sZoSwork[ZO_BSS_16] = 0; sZoFwork[ZO_BSF_77] = 0; - bossZO->swork[ZO_SWK_4] = 1000; - bossZO->state = 3; + this->swork[ZO_SWK_4] = 1000; + this->state = 3; if ((sZoSwork[ZO_BSS_11] == 0) && (sZoSwork[ZO_BSS_12] == 0)) { sZoSwork[ZO_BSS_20] = sZoSwork[ZO_BSS_24] = 1; } - Zoness_8019914C(bossZO, arg1); + Zoness_8019914C(this, arg1); } } - } else if ((sZoSwork[ZO_BSS_13] != 1) && (bossZO->timer_052 == 0)) { + } else if ((sZoSwork[ZO_BSS_13] != 1) && (this->timer_052 == 0)) { Math_SmoothStepToF(&sZoFwork[ZO_BSF_17 + arg1], 0.0f, 1.0f, 5.0f, 0.001f); Math_SmoothStepToF(&sZoFwork[ZO_BSF_3], -30.0f, 1.0f, 3.0f, 0.001f); if (sZoFwork[ZO_BSF_17 + arg1] == 0.0f) { - Zoness_80199394(bossZO, arg1); + Zoness_80199394(this, arg1); } } } -void Zoness_8019962C(Boss* bossZO, f32 arg1) { +void Zoness_8019962C(BossZO* this, f32 arg1) { Math_SmoothStepToF(&sZoFwork[ZO_BSF_77], 2.0f, 0.1f, 0.5f, 0.0001f); - Math_SmoothStepToAngle(&bossZO->obj.rot.y, arg1, 1.0f, sZoFwork[ZO_BSF_77], 0.0001f); + Math_SmoothStepToAngle(&this->obj.rot.y, arg1, 1.0f, sZoFwork[ZO_BSF_77], 0.0001f); } -void Zoness_8019969C(Actor* actor) { +void Zoness_Actor245_Update(Actor245* this) { s32 i; - if ((actor->dmgType != DMG_NONE) && (actor->health != 0)) { - actor->health -= actor->damage; - if (actor->health <= 0) { - actor->health = 0; + if ((this->dmgType != DMG_NONE) && (this->health != 0)) { + this->health -= this->damage; + if (this->health <= 0) { + this->health = 0; for (i = 0; i < 5; i++) { - func_effect_80079618(RAND_FLOAT_CENTERED(50.0f) + actor->obj.pos.x, - RAND_FLOAT_CENTERED(50.0f) + actor->obj.pos.y, - RAND_FLOAT_CENTERED(50.0f) + actor->obj.pos.z, 1.0f); + func_effect_80079618(RAND_FLOAT_CENTERED(50.0f) + this->obj.pos.x, + RAND_FLOAT_CENTERED(50.0f) + this->obj.pos.y, + RAND_FLOAT_CENTERED(50.0f) + this->obj.pos.z, 1.0f); } - func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 200.0f, 5.0f); - actor->itemDrop = DROP_BOMB; - actor->dmgSource = DMG_SRC_2; - actor->obj.pos.z -= 100.0f; - Actor_Despawn(actor); - Object_Kill(&actor->obj, actor->sfxSource); - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); + func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 200.0f, 5.0f); + this->itemDrop = DROP_BOMB; + this->dmgSource = DMG_SRC_2; + this->obj.pos.z -= 100.0f; + Actor_Despawn(this); + Object_Kill(&this->obj, this->sfxSource); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); } - actor->dmgType = DMG_NONE; + this->dmgType = DMG_NONE; } - actor->fwork[0] += 10.0f; - Zoness_8018FF50(actor); + this->fwork[0] += 10.0f; + Zoness_8018FF50(this); } -void Zoness_8019983C(Actor* actor) { +void Zoness_Actor245_Draw(Actor245* this) { RCP_SetupDL(&gMasterDisp, SETUPDL_70); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); Matrix_Scale(gGfxMatrix, 2.6f, 2.6f, 2.6f, MTXF_APPLY); @@ -3307,20 +3446,21 @@ void Zoness_8019983C(Actor* actor) { gSPDisplayList(gMasterDisp++, D_ZO_6017950); } -void Zoness_801998E0(Effect* effect, f32 xPos, f32 yPos, f32 zPos) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_374; - effect->state = 1; - effect->timer_50 = 30; - effect->unk_44 = 192; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; - effect->obj.pos.x = xPos; - effect->scale1 = effect->scale2 = 2.5f; +void Zoness_801998E0(Effect374* this, f32 xPos, f32 yPos, f32 zPos) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_374; + + this->state = 1; + this->timer_50 = 30; + this->unk_44 = 192; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->scale1 = this->scale2 = 2.5f; func_effect_8007D0E0(xPos, yPos + 30.0f, zPos, 7.0f); - func_effect_8007BFFC(effect->obj.pos.x, effect->obj.pos.y + 30.0f, effect->obj.pos.z, 0.0f, 0.0f, 0.0f, 4.0f, 5); - Object_SetInfo(&effect->info, effect->obj.id); + func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y + 30.0f, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 4.0f, 5); + Object_SetInfo(&this->info, this->obj.id); } void Zoness_801999CC(f32 xPos, f32 yPos, f32 zPos) { @@ -3334,165 +3474,174 @@ void Zoness_801999CC(f32 xPos, f32 yPos, f32 zPos) { } } -void Zoness_80199A28(Actor* actor) { +void Zoness_Actor246_Update(Actor246* this) { f32 sp3C; f32 sp38; s32 sp34; - actor->obj.rot.x += 5.0f; - switch (actor->state) { /* irregular */ + this->obj.rot.x += 5.0f; + + switch (this->state) { case 0: - if (actor->health == 0) { - actor->iwork[0]++; - actor->health = 10; - actor->iwork[1] = 1; - actor->state = 2; - actor->fwork[0] = -50.0f; + if (this->health == 0) { + this->iwork[0]++; + this->health = 10; + this->iwork[1] = 1; + this->state = 2; + this->fwork[0] = -50.0f; } else { - actor->vel.y = 60.0f; - actor->gravity = 1.0f; + this->vel.y = 60.0f; + this->gravity = 1.0f; if (gBosses[0].obj.pos.y < 0.0f) { - actor->obj.pos.y = -100.0f; + this->obj.pos.y = -100.0f; } - actor->state++; + this->state++; } break; + case 1: - if ((Play_CheckDynaFloorCollision(&sp3C, &sp34, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z) != - 0) && - (actor->iwork[1] == 0)) { - func_effect_8008377C(actor->obj.pos.x, sp3C, actor->obj.pos.z, 0.0f, 0.5f); - actor->iwork[1]++; - AUDIO_PLAY_SFX(NA_SE_ON_SPLASH_S, actor->sfxSource, 4); + if ((Play_CheckDynaFloorCollision(&sp3C, &sp34, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z) != 0) && + (this->iwork[1] == 0)) { + func_effect_8008377C(this->obj.pos.x, sp3C, this->obj.pos.z, 0.0f, 0.5f); + this->iwork[1]++; + AUDIO_PLAY_SFX(NA_SE_ON_SPLASH_S, this->sfxSource, 4); } - Math_SmoothStepToF(&actor->vel.y, -60.0f, 0.5f, 5.0f, 0.00001f); - if (actor->obj.pos.y < -30.0f) { - actor->state++; - actor->vel.y = 0.0f; - actor->gravity = 0.0f; - actor->fwork[0] = 0.0f; + + Math_SmoothStepToF(&this->vel.y, -60.0f, 0.5f, 5.0f, 0.00001f); + + if (this->obj.pos.y < -30.0f) { + this->state++; + this->vel.y = 0.0f; + this->gravity = 0.0f; + this->fwork[0] = 0.0f; } break; + case 2: - actor->gravity = 1.0f; - if (Play_CheckDynaFloorCollision(&sp3C, &sp34, actor->obj.pos.x, actor->fwork[0] + actor->obj.pos.y, - actor->obj.pos.z) != 0) { - actor->gravity = 0.0f; - Math_SmoothStepToF(&actor->fwork[0], -50.0f, 0.1f, 2.0f, 0.001f); + this->gravity = 1.0f; + if (Play_CheckDynaFloorCollision(&sp3C, &sp34, this->obj.pos.x, this->fwork[0] + this->obj.pos.y, + this->obj.pos.z) != 0) { + this->gravity = 0.0f; + Math_SmoothStepToF(&this->fwork[0], -50.0f, 0.1f, 2.0f, 0.001f); sp38 = 10.0f; - if (Math_SmoothStepToF(&actor->obj.pos.y, sp3C, 0.1f, 5.0f, 0) >= 0.0f) { + if (Math_SmoothStepToF(&this->obj.pos.y, sp3C, 0.1f, 5.0f, 0) >= 0.0f) { sp38 = 350.0f; } - Math_SmoothStepToAngle(&actor->obj.rot.z, sp38, 0.1f, 1.0f, 0); + Math_SmoothStepToAngle(&this->obj.rot.z, sp38, 0.1f, 1.0f, 0); } - if ((actor->dmgType != DMG_NONE) && (actor->health != 0)) { - actor->dmgType = DMG_NONE; - actor->itemDrop = DROP_SILVER_RING_50p; - func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y + 100.0f, actor->obj.pos.z, 7.0f); - actor->dmgSource = DMG_SRC_2; - actor->obj.pos.y += 200.0f; - Actor_Despawn(actor); - Object_Kill(&actor->obj, actor->sfxSource); - func_effect_8007A6F0(&actor->obj.pos, NA_SE_OB_EXPLOSION_S); + + if ((this->dmgType != DMG_NONE) && (this->health != 0)) { + this->dmgType = DMG_NONE; + this->itemDrop = DROP_SILVER_RING_50p; + func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y + 100.0f, this->obj.pos.z, 7.0f); + this->dmgSource = DMG_SRC_2; + this->obj.pos.y += 200.0f; + Actor_Despawn(this); + Object_Kill(&this->obj, this->sfxSource); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_OB_EXPLOSION_S); } else { - if ((fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 800.0f) || (actor->dmgType != DMG_NONE)) { - Zoness_801999CC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z); - Object_Kill(&actor->obj, actor->sfxSource); - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); + if ((fabsf(this->obj.pos.z - gPlayer[0].trueZpos) < 800.0f) || (this->dmgType != DMG_NONE)) { + Zoness_801999CC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z); + Object_Kill(&this->obj, this->sfxSource); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_M); } } break; } - if ((actor->timer_0BC == 0) && (actor->iwork[0] == 0)) { - func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y + 100.0f, actor->obj.pos.z, 7.0f); - actor->itemDrop = DROP_SILVER_RING_50p; - actor->dmgSource = DMG_SRC_2; - actor->obj.pos.y += 200.0f; - Actor_Despawn(actor); - Object_Kill(&actor->obj, actor->sfxSource); + + if ((this->timer_0BC == 0) && (this->iwork[0] == 0)) { + func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y + 100.0f, this->obj.pos.z, 7.0f); + this->itemDrop = DROP_SILVER_RING_50p; + this->dmgSource = DMG_SRC_2; + this->obj.pos.y += 200.0f; + Actor_Despawn(this); + Object_Kill(&this->obj, this->sfxSource); } } -void Zoness_80199E24(Actor* actor) { +void Zoness_Actor246_Draw(Actor246* this) { Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ZO_6025E60); } -void Zoness_80199E9C(Actor* actor, f32 arg1, f32 arg2) { - actor->obj.pos.x = sZoFwork[ZO_BSF_60_X]; - Math_SmoothStepToF(&actor->fwork[0], arg1, 1.0f, arg2, 0.001f); - actor->obj.pos.y = sZoFwork[ZO_BSF_60_Y] + actor[0].fwork[0]; - actor->obj.pos.z = sZoFwork[ZO_BSF_60_Z]; +void Zoness_80199E9C(Actor248* this, f32 arg1, f32 arg2) { + this->obj.pos.x = sZoFwork[ZO_BSF_60_X]; + Math_SmoothStepToF(&this->fwork[0], arg1, 1.0f, arg2, 0.001f); + this->obj.pos.y = sZoFwork[ZO_BSF_60_Y] + this[0].fwork[0]; + this->obj.pos.z = sZoFwork[ZO_BSF_60_Z]; } -void Zoness_80199F10(Actor* actor) { +void Zoness_Actor248_Update(Actor248* this) { if (sZoSwork[ZO_BSS_13] == 0) { - actor->state = 3; - actor->vel.y = -50.0f; - actor->obj.pos.x = sZoFwork[ZO_BSF_60_X]; - Math_SmoothStepToF(&actor->fwork[0], -500.0f, 1.0f, 100.0f, 0.00001f); - actor->obj.pos.z = sZoFwork[ZO_BSF_60_Z]; - if (actor->obj.pos.y < -400.0f) { - Object_Kill(&actor->obj, actor->sfxSource); + this->state = 3; + this->vel.y = -50.0f; + this->obj.pos.x = sZoFwork[ZO_BSF_60_X]; + Math_SmoothStepToF(&this->fwork[0], -500.0f, 1.0f, 100.0f, 0.00001f); + this->obj.pos.z = sZoFwork[ZO_BSF_60_Z]; + if (this->obj.pos.y < -400.0f) { + Object_Kill(&this->obj, this->sfxSource); } } - switch (actor->state) { /* irregular */ + + switch (this->state) { case 0: - actor->obj.rot.y += 2.0f; - Zoness_80199E9C(actor, 0.0f, 20.0f); - switch (sZoSwork[ZO_BSS_16]) { /* switch 1; irregular */ + this->obj.rot.y += 2.0f; + Zoness_80199E9C(this, 0.0f, 20.0f); + switch (sZoSwork[ZO_BSS_16]) { case 1: - actor->fwork[1] = sZoFwork[ZO_BSF_68_Y] - sZoFwork[ZO_BSF_60_Y]; - AUDIO_PLAY_SFX(NA_SE_EN_PULL_CHAIN1, actor->sfxSource, 4); - actor->state++; + this->fwork[1] = sZoFwork[ZO_BSF_68_Y] - sZoFwork[ZO_BSF_60_Y]; + AUDIO_PLAY_SFX(NA_SE_EN_PULL_CHAIN1, this->sfxSource, 4); + this->state++; break; case 2: - actor->fwork[1] = sZoFwork[ZO_BSF_71_Y] - sZoFwork[ZO_BSF_60_Y]; - AUDIO_PLAY_SFX(NA_SE_EN_PULL_CHAIN1, actor->sfxSource, 4); - actor->state++; + this->fwork[1] = sZoFwork[ZO_BSF_71_Y] - sZoFwork[ZO_BSF_60_Y]; + AUDIO_PLAY_SFX(NA_SE_EN_PULL_CHAIN1, this->sfxSource, 4); + this->state++; break; } break; + case 1: if (gBosses[0].timer_052 != 0) { - actor->obj.rot.y += 2.0f; - Zoness_80199E9C(actor, actor->fwork[1], 20.0f); + this->obj.rot.y += 2.0f; + Zoness_80199E9C(this, this->fwork[1], 20.0f); } else { switch (sZoSwork[ZO_BSS_16]) { case 1: - actor->fwork[1] = sZoFwork[ZO_BSF_68_Y] - sZoFwork[ZO_BSF_60_Y]; - Zoness_80199E9C(actor, actor->fwork[1], 20.0f); + this->fwork[1] = sZoFwork[ZO_BSF_68_Y] - sZoFwork[ZO_BSF_60_Y]; + Zoness_80199E9C(this, this->fwork[1], 20.0f); break; case 2: - actor->fwork[1] = sZoFwork[ZO_BSF_71_Y] - sZoFwork[ZO_BSF_60_Y]; - Zoness_80199E9C(actor, actor->fwork[1], 20.0f); + this->fwork[1] = sZoFwork[ZO_BSF_71_Y] - sZoFwork[ZO_BSF_60_Y]; + Zoness_80199E9C(this, this->fwork[1], 20.0f); break; case 3: - actor->obj.rot.y += 2.0f; + this->obj.rot.y += 2.0f; if (gBosses[0].timer_050 != 0) { - Zoness_80199E9C(actor, 0.0f, 10.0f); + Zoness_80199E9C(this, 0.0f, 10.0f); } else { - actor->state = 0; - Audio_KillSfxBySource(actor->sfxSource); + this->state = 0; + Audio_KillSfxBySource(this->sfxSource); } break; } } break; } - if (actor->dmgType != DMG_NONE) { - if (actor->dmgType == DMG_BEAM) { - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); + + if (this->dmgType != DMG_NONE) { + if (this->dmgType == DMG_BEAM) { + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } - actor->dmgType = DMG_NONE; + this->dmgType = DMG_NONE; } } -void Zoness_8019A1FC(Actor* actor) { +void Zoness_Actor248_Draw(Actor248* this) { f32 var_fv0; - s32 var_s0; - s32 var_s1; + s32 i; + s32 j; Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -3500,21 +3649,25 @@ void Zoness_8019A1FC(Actor* actor) { gSPDisplayList(gMasterDisp++, D_ZO_601C590); RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - if (((actor->state == 1) && (gBosses[0].timer_052 != 0)) || (actor->state == 0)) { + + if (((this->state == 1) && (gBosses[0].timer_052 != 0)) || (this->state == 0)) { Matrix_RotateY(gGfxMatrix, gGameFrameCount * M_DTOR, MTXF_APPLY); } - var_fv0 = sZoFwork[ZO_BSF_60_Y] + -1.0f * actor->fwork[0] - actor->obj.pos.y; - for (var_s1 = 1; var_fv0 >= 0.0f; var_s1++) { + var_fv0 = sZoFwork[ZO_BSF_60_Y] + -1.0f * this->fwork[0] - this->obj.pos.y; + + for (i = 1; var_fv0 >= 0.0f; i++) { var_fv0 -= 117.0f; } - if (var_s1 > 30) { - var_s1 = 30; + + if (i > 30) { + i = 30; } - if ((var_s1 <= 0) || (actor->fwork[0] == 0)) { - var_s1 = 1; + if ((i <= 0) || (this->fwork[0] == 0)) { + i = 1; } - for (var_s0 = 0; var_s0 < var_s1; var_s0++) { + + for (j = 0; j < i; j++) { Matrix_Translate(gGfxMatrix, 0.0f, 30.0f, 0.0f, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_Push(&gGfxMatrix); @@ -3525,29 +3678,32 @@ void Zoness_8019A1FC(Actor* actor) { } } -void Zoness_8019A4E0(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 arg4) { - f32 sp4C = xPos - actor->obj.pos.x; - f32 sp48 = yPos - actor->obj.pos.y; - f32 sp44 = zPos - actor->obj.pos.z; - f32 sp40; - f32 sp3C; - Vec3f sp30; - Vec3f sp24; +void Zoness_8019A4E0(Actor* this, f32 xPos, f32 yPos, f32 zPos, f32 arg4) { + f32 x = xPos - this->obj.pos.x; + f32 y = yPos - this->obj.pos.y; + f32 z = zPos - this->obj.pos.z; + f32 xAngle; + f32 yAngle; + Vec3f src; + Vec3f dest; - sp3C = Math_Atan2F(sp4C, sp44); - sp40 = -Math_Atan2F(sp48, sqrtf(SQ(sp4C) + SQ(sp44))); - Matrix_RotateY(gCalcMatrix, sp3C, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, sp40, MTXF_APPLY); - sp30.x = 0.0f; - sp30.y = 0.0f; - sp30.z = arg4; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp30, &sp24); - actor->vel.x = sp24.x; - actor->vel.y = sp24.y; - actor->vel.z = sp24.z; + yAngle = +Math_Atan2F(x, z); + xAngle = -Math_Atan2F(y, sqrtf(SQ(x) + SQ(z))); + + Matrix_RotateY(gCalcMatrix, yAngle, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, xAngle, MTXF_APPLY); + + src.x = 0.0f; + src.y = 0.0f; + src.z = arg4; + + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + this->vel.x = dest.x; + this->vel.y = dest.y; + this->vel.z = dest.z; } -void Zoness_8019A5D4(Actor* actor) { +void Zoness_Actor249_Update(Actor249* this) { f32 sp4C; f32 sp48; f32 sp44; @@ -3556,18 +3712,19 @@ void Zoness_8019A5D4(Actor* actor) { f32 var_fv1; if ((gBosses[0].state == 6) || (gBosses[0].state == 7)) { - Audio_KillSfxBySource(actor->sfxSource); - actor->state = 10; - actor->vel.z = 40.0f; + Audio_KillSfxBySource(this->sfxSource); + this->state = 10; + this->vel.z = 40.0f; } - actor->fwork[3] += 10.0f; - actor->fwork[1] = 70.0f; - switch (actor->state) { + this->fwork[3] += 10.0f; + this->fwork[1] = 70.0f; + + switch (this->state) { case 0: - actor->obj.pos.x = sZoFwork[ZO_BSF_65_X]; - actor->obj.pos.y = sZoFwork[ZO_BSF_65_Y]; - actor->obj.pos.z = sZoFwork[ZO_BSF_65_Z]; - if ((sZoSwork[ZO_BSS_20] != 0) && (actor->timer_0BC == 0)) { + this->obj.pos.x = sZoFwork[ZO_BSF_65_X]; + this->obj.pos.y = sZoFwork[ZO_BSF_65_Y]; + this->obj.pos.z = sZoFwork[ZO_BSF_65_Z]; + if ((sZoSwork[ZO_BSS_20] != 0) && (this->timer_0BC == 0)) { if ((sZoSwork[ZO_BSS_8] == 0) && (gBosses[0].state == 8)) { var_fv1 = RAND_FLOAT_CENTERED(3000.0f); var_fa0 = 0.0f; @@ -3575,94 +3732,99 @@ void Zoness_8019A5D4(Actor* actor) { var_fv1 = 0.0f; var_fa0 = 100.0f; } - Zoness_8019A4E0(actor, gPlayer[0].pos.x + var_fv1, gPlayer[0].pos.y + var_fa0, gPlayer[0].pos.z, 80.0f); - actor->vel.z -= gPathVelZ; + Zoness_8019A4E0(this, gPlayer[0].pos.x + var_fv1, gPlayer[0].pos.y + var_fa0, gPlayer[0].pos.z, 80.0f); + this->vel.z -= gPathVelZ; Zoness_80193C5C(sZoFwork[ZO_BSF_65_X], sZoFwork[ZO_BSF_65_Y], sZoFwork[ZO_BSF_65_Z], 30.0f); Zoness_80193C5C(sZoFwork[ZO_BSF_65_X], sZoFwork[ZO_BSF_65_Y], sZoFwork[ZO_BSF_65_Z], 30.0f); Zoness_80193C5C(sZoFwork[ZO_BSF_65_X], sZoFwork[ZO_BSF_65_Y], sZoFwork[ZO_BSF_65_Z], 30.0f); - actor->timer_0BC = (s32) ((fabsf(sZoFwork[ZO_BSF_28] - -2600.0f) / 100.0f) + 30.0f); - actor->timer_0C0 = 3; - AUDIO_PLAY_SFX(NA_SE_EN_M_BALL_SHOT, actor->sfxSource, 4); - actor->state++; + this->timer_0BC = (s32) ((fabsf(sZoFwork[ZO_BSF_28] - -2600.0f) / 100.0f) + 30.0f); + this->timer_0C0 = 3; + AUDIO_PLAY_SFX(NA_SE_EN_M_BALL_SHOT, this->sfxSource, 4); + this->state++; } break; + case 1: - if (actor->timer_0C0 != 0) { + if (this->timer_0C0 != 0) { D_ctx_801779A8[0] = 40.0f; } - actor->iwork[0] = 0; - if (actor->timer_0BC == 0) { - actor->vel.x = 0.0f; - actor->vel.z = -gPathVelZ; - actor->gravity = 5.0f; - actor->fwork[5] = actor->vel.y * -3.0f; - if (actor->obj.pos.y < -150.0f) { - actor->gravity = 0.0f; - AUDIO_PLAY_SFX(NA_SE_EN_PULL_CHAIN0, actor->sfxSource, 4); - actor->state++; + this->iwork[0] = 0; + if (this->timer_0BC == 0) { + this->vel.x = 0.0f; + this->vel.z = -gPathVelZ; + this->gravity = 5.0f; + this->fwork[5] = this->vel.y * -3.0f; + if (this->obj.pos.y < -150.0f) { + this->gravity = 0.0f; + AUDIO_PLAY_SFX(NA_SE_EN_PULL_CHAIN0, this->sfxSource, 4); + this->state++; } } break; + case 2: if ((sZoSwork[ZO_BSS_8] == 0) && (gBosses[0].state == 8)) { - actor->fwork[5] = 0.0f; - actor->obj.pos.x = sZoFwork[ZO_BSF_65_X]; - actor->obj.pos.y = sZoFwork[ZO_BSF_65_Y]; - actor->obj.pos.z = sZoFwork[ZO_BSF_65_Z]; + this->fwork[5] = 0.0f; + this->obj.pos.x = sZoFwork[ZO_BSF_65_X]; + this->obj.pos.y = sZoFwork[ZO_BSF_65_Y]; + this->obj.pos.z = sZoFwork[ZO_BSF_65_Z]; sp48 = sp4C = 30.0f; } else { - Math_SmoothStepToF(&actor->fwork[5], 0.0f, 1.0f, 30.0f, 0.0f); - sp4C = fabsf(actor->obj.pos.x - sZoFwork[ZO_BSF_65_X]); - sp48 = fabsf(actor->obj.pos.z - sZoFwork[ZO_BSF_65_Z]); + Math_SmoothStepToF(&this->fwork[5], 0.0f, 1.0f, 30.0f, 0.0f); + sp4C = fabsf(this->obj.pos.x - sZoFwork[ZO_BSF_65_X]); + sp48 = fabsf(this->obj.pos.z - sZoFwork[ZO_BSF_65_Z]); var_fa0 = sqrtf(SQ(sp4C) + SQ(sp48)) * 0.5f; - Zoness_8019A4E0(actor, sZoFwork[ZO_BSF_65_X], sZoFwork[ZO_BSF_65_Y] - var_fa0, sZoFwork[ZO_BSF_65_Z], + Zoness_8019A4E0(this, sZoFwork[ZO_BSF_65_X], sZoFwork[ZO_BSF_65_Y] - var_fa0, sZoFwork[ZO_BSF_65_Z], 30.0f); - actor->vel.z -= gPathVelZ; + this->vel.z -= gPathVelZ; } - if (Object_CheckHitboxCollision(&actor->obj.pos, gBosses[0].info.hitbox, &gBosses[0].obj, 0.0f, 0.0f, + + if (Object_CheckHitboxCollision(&this->obj.pos, gBosses[0].info.hitbox, &gBosses[0].obj, 0.0f, 0.0f, 0.0f) != 0) { - actor->fwork[6] = 50.0f; - AUDIO_PLAY_SFX(NA_SE_OB_METAL_BOUND_M, actor->sfxSource, 4); + this->fwork[6] = 50.0f; + AUDIO_PLAY_SFX(NA_SE_OB_METAL_BOUND_M, this->sfxSource, 4); } - actor->vel.z += actor->fwork[6] * 0.8f; - actor->vel.y += actor->fwork[6] * 1.4f; - actor->fwork[6] -= 8.0f; - if (actor->fwork[6] < 0.0f) { - actor->fwork[6] = 0.0f; + this->vel.z += this->fwork[6] * 0.8f; + this->vel.y += this->fwork[6] * 1.4f; + + this->fwork[6] -= 8.0f; + if (this->fwork[6] < 0.0f) { + this->fwork[6] = 0.0f; } if ((sp4C <= 30.0f) && (sp48 <= 30.0f)) { - actor->state = 0; - Audio_KillSfxBySource(actor->sfxSource); - AUDIO_PLAY_SFX(NA_SE_EN_COMBINE, actor->sfxSource, 4); - actor->timer_0BC = 40; + this->state = 0; + Audio_KillSfxBySource(this->sfxSource); + AUDIO_PLAY_SFX(NA_SE_EN_COMBINE, this->sfxSource, 4); + this->timer_0BC = 40; sZoFwork[ZO_BSF_74] = sZoFwork[ZO_BSF_75] = 0.0f; sZoSwork[ZO_BSS_19] = 1; - sZoSwork[ZO_BSS_20] = actor->iwork[0] = sZoSwork[ZO_BSS_20] = 0; + sZoSwork[ZO_BSS_20] = this->iwork[0] = sZoSwork[ZO_BSS_20] = 0; } break; } - Zoness_8018FF50(actor); - if (actor->dmgType != DMG_NONE) { - if (actor->dmgType == DMG_BEAM) { - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); + Zoness_8018FF50(this); + + if (this->dmgType != DMG_NONE) { + if (this->dmgType == DMG_BEAM) { + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } - actor->dmgType = DMG_NONE; + this->dmgType = DMG_NONE; } - if (((gGameFrameCount % 8) == 0) && (actor->state != 0) && (actor->iwork[0] < 8) && - (Play_CheckDynaFloorCollision(&sp44, &sp40, actor->obj.pos.x, actor->obj.pos.y - 100.0f, actor->obj.pos.z) != - 0)) { - func_effect_8008377C(actor->obj.pos.x, sp44, actor->obj.pos.z, 0.0f, 0.7f); - actor->iwork[0]++; - if (actor->vel.y >= 0.0f) { - AUDIO_PLAY_SFX(NA_SE_OUT_SPLASH_L, actor->sfxSource, 4); + + if (((gGameFrameCount % 8) == 0) && (this->state != 0) && (this->iwork[0] < 8) && + (Play_CheckDynaFloorCollision(&sp44, &sp40, this->obj.pos.x, this->obj.pos.y - 100.0f, this->obj.pos.z) != 0)) { + func_effect_8008377C(this->obj.pos.x, sp44, this->obj.pos.z, 0.0f, 0.7f); + this->iwork[0]++; + if (this->vel.y >= 0.0f) { + AUDIO_PLAY_SFX(NA_SE_OUT_SPLASH_L, this->sfxSource, 4); } else { - AUDIO_PLAY_SFX(NA_SE_IN_SPLASH_L, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_IN_SPLASH_L, this->sfxSource, 4); } } } -void Zoness_8019ACCC(Actor* actor) { +void Zoness_Actor249_Draw(Actor249* this) { f32 temp_fa0; f32 temp_fa1; f32 temp_fs0; @@ -3671,21 +3833,21 @@ void Zoness_8019ACCC(Actor* actor) { f32 temp_fs0_2; f32 temp_fs1_2; f32 temp_fs0_4; - f32 var_fs5; + f32 var_fs5 = 90.0f; s32 i; f32 sp94; s32 var_s4; - var_fs5 = 90.0f; Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); + if ((gBosses[0].state != 6) && (gBosses[0].state != 7)) { RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - temp_fa0 = sZoFwork[ZO_BSF_65_X] - actor->obj.pos.x; - temp_fs0 = sZoFwork[ZO_BSF_65_Y] - actor->obj.pos.y; - temp_fa1 = sZoFwork[ZO_BSF_65_Z] - actor->obj.pos.z; + temp_fa0 = sZoFwork[ZO_BSF_65_X] - this->obj.pos.x; + temp_fs0 = sZoFwork[ZO_BSF_65_Y] - this->obj.pos.y; + temp_fa1 = sZoFwork[ZO_BSF_65_Z] - this->obj.pos.z; temp_fs3 = sqrtf(SQ(temp_fa0) + SQ(temp_fs0) + SQ(temp_fa1)); temp_fs4 = Math_Atan2F(temp_fa0, temp_fa1); @@ -3697,15 +3859,17 @@ void Zoness_8019ACCC(Actor* actor) { if (var_s4 < 0) { var_s4 = 0; } - Matrix_Translate(gGfxMatrix, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + gPathProgress, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + gPathProgress, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, temp_fs4, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, temp_fs0_2, MTXF_APPLY); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 0.0f, MTXF_APPLY); + sp94 = (180.0f / var_s4) + 1.0f; + for (i = 0; i < var_s4; i++) { - temp_fs1_2 = SIN_DEG(i * sp94) * actor->fwork[5]; - temp_fs0_4 = COS_DEG(i * sp94) * actor->fwork[5] * -0.25f; - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, actor->fwork[1], MTXF_APPLY); + temp_fs1_2 = SIN_DEG(i * sp94) * this->fwork[5]; + temp_fs0_4 = COS_DEG(i * sp94) * this->fwork[5] * -0.25f; + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, this->fwork[1], MTXF_APPLY); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, temp_fs1_2, 0.0f, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_DTOR * temp_fs0_4, MTXF_APPLY); @@ -3722,17 +3886,17 @@ void Zoness_8019ACCC(Actor* actor) { } Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + gPathProgress, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, actor->obj.rot.y * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + gPathProgress, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, this->obj.rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 2.6f, 2.6f, 2.6f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL(&gMasterDisp, SETUPDL_70); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); gSPDisplayList(gMasterDisp++, D_ZO_6004380); Matrix_RotateY(gGfxMatrix, sZoFwork[ZO_BSF_19] * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, actor->fwork[2] * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, actor->fwork[3] * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, this->fwork[2] * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, this->fwork[3] * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL_55(); gSPDisplayList(gMasterDisp++, D_ZO_601BCC0); @@ -3786,6 +3950,7 @@ void Zoness_8019B1F0(Actor* actor) { } else { Matrix_MultVec3f(gCalcMatrix, &D_i3_801BF768[var_s3], &sp84); } + Actor_Initialize(&gActors[i]); gActors[i].obj.status = OBJ_INIT; if (actor->state == 0) { @@ -3803,6 +3968,7 @@ void Zoness_8019B1F0(Actor* actor) { gActors[i].iwork[1] = actor->index; gActors[i].iwork[2] = var_s3; Object_SetInfo(&gActors[i].info, gActors[i].obj.id); + if (actor->state != 0) { gActors[i].state = 3; if (D_i3_801BF804[actor->iwork[3]] >= 361.0f) { @@ -3821,56 +3987,59 @@ void Zoness_8019B1F0(Actor* actor) { AUDIO_PLAY_SFX(NA_SE_EN_SHIP_ENGINE_L, actor->sfxSource, 4); } -void Zoness_8019B548(Actor* actor) { +void Zoness_Actor250_Update(Actor* this) { f32 sp6C; s32 sp68; s32 i; Vec3f sp58; Actor* otherActor; - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); - switch (actor->state) { + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + + switch (this->state) { case 0: for (i = 1; i < 3; i++) { - otherActor = &gActors[actor->iwork[i]]; - if ((otherActor->obj.status != OBJ_FREE) && (otherActor->iwork[1] == actor->index) && + otherActor = &gActors[this->iwork[i]]; + if ((otherActor->obj.status != OBJ_FREE) && (otherActor->iwork[1] == this->index) && (otherActor->obj.id == OBJ_ACTOR_251)) { Matrix_MultVec3f(gCalcMatrix, &D_i3_801BF744[i], &sp58); - otherActor->obj.pos.x = actor->obj.pos.x + sp58.x; - otherActor->obj.pos.y = actor->obj.pos.y + sp58.y; - otherActor->obj.pos.z = actor->obj.pos.z + sp58.z; + otherActor->obj.pos.x = this->obj.pos.x + sp58.x; + otherActor->obj.pos.y = this->obj.pos.y + sp58.y; + otherActor->obj.pos.z = this->obj.pos.z + sp58.z; } } break; + case 1: for (i = 1; i < 3; i++) { - otherActor = &gActors[actor->iwork[i]]; + otherActor = &gActors[this->iwork[i]]; if ((otherActor->obj.status != OBJ_FREE) && (otherActor->obj.id == OBJ_ACTOR_253) && - (otherActor->iwork[1] == actor->index)) { + (otherActor->iwork[1] == this->index)) { Matrix_MultVec3f(gCalcMatrix, &D_i3_801BF768[i], &sp58); - otherActor->obj.pos.x = actor->obj.pos.x + sp58.x; - otherActor->obj.pos.y = actor->obj.pos.y + sp58.y; - otherActor->obj.pos.z = actor->obj.pos.z + sp58.z; + otherActor->obj.pos.x = this->obj.pos.x + sp58.x; + otherActor->obj.pos.y = this->obj.pos.y + sp58.y; + otherActor->obj.pos.z = this->obj.pos.z + sp58.z; } } break; } - if ((fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 1000.0f) && - Play_CheckDynaFloorCollision(&sp6C, &sp68, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z)) { - Math_SmoothStepToF(&actor->obj.pos.y, sp6C, 0.1f, 4.0f, 0.0f); + + if ((fabsf(this->obj.pos.z - gPlayer[0].trueZpos) < 1000.0f) && + Play_CheckDynaFloorCollision(&sp6C, &sp68, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z)) { + Math_SmoothStepToF(&this->obj.pos.y, sp6C, 0.1f, 4.0f, 0.0f); } } -void Zoness_8019B7DC(Actor* actor) { +void Zoness_Actor250_Draw(Actor* this) { gSPDisplayList(gMasterDisp++, D_ZO_6006360); } -void Zoness_8019B810(Actor* actor) { - if (actor->iwork[3] == 0) { - actor->iwork[0] = actor->obj.rot.z / 10.0f; - actor->obj.rot.z = 0.0f; +void Zoness_8019B810(Actor* this) { + if (this->iwork[3] == 0) { + this->iwork[0] = this->obj.rot.z / 10.0f; + this->obj.rot.z = 0.0f; } - actor->health = 30; + this->health = 30; } s32 D_i3_801BF824[10] = { DROP_SILVER_RING, DROP_BOMB, DROP_LASERS, DROP_GOLD_RING_1, DROP_GOLD_RING_2, @@ -3880,73 +4049,76 @@ Vec3f D_i3_801BF84C[6] = { { -5.0f, -10.0f, 0.0f }, { -10.0f, 0.0f, 0.0f }, { -5.0f, 10.0f, 0.0f }, }; -void Zoness_8019B854(Actor* actor) { +void Zoness_Actor251_Update(Actor251* this) { s32 i; s32 j; Vec3f spB4; Vec3f spA8 = { 0.0f, 0.0f, 0.0f }; Vec3f sp9C; - if ((actor->dmgType != DMG_NONE) && (actor->health != 0)) { - actor->dmgType = DMG_NONE; - actor->timer_0C6 = 15; - actor->health -= actor->damage; - AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, actor->sfxSource, 4); + if ((this->dmgType != DMG_NONE) && (this->health != 0)) { + this->dmgType = DMG_NONE; + this->timer_0C6 = 15; + this->health -= this->damage; + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, this->sfxSource, 4); } - switch (actor->state) { + + switch (this->state) { case 0: - if (actor->health <= 0) { - actor->health = 0; - actor->state++; + if (this->health <= 0) { + this->health = 0; + this->state++; } break; + case 1: for (i = 0; i < 6; i++) { - Zoness_SpawnDebris(&actor->vwork[i], &actor->vwork[6 + i], RAND_FLOAT_CENTERED(50.0f), - RAND_FLOAT(10.0f) + 20.0f, RAND_FLOAT_CENTERED(50.0f), 39, actor->scale, - RAND_FLOAT(15.0f) + (actor->scale * 10.0f), i); + Zoness_SpawnDebris(&this->vwork[i], &this->vwork[6 + i], RAND_FLOAT_CENTERED(50.0f), + RAND_FLOAT(10.0f) + 20.0f, RAND_FLOAT_CENTERED(50.0f), 39, this->scale, + RAND_FLOAT(15.0f) + (this->scale * 10.0f), i); } for (i = 0; i < 10; i++) { - func_effect_80079618(RAND_FLOAT_CENTERED(50.0f) + actor->obj.pos.x, - RAND_FLOAT_CENTERED(50.0f) + actor->obj.pos.y, - RAND_FLOAT_CENTERED(50.0f) + actor->obj.pos.z, 2.0f); + func_effect_80079618(RAND_FLOAT_CENTERED(50.0f) + this->obj.pos.x, + RAND_FLOAT_CENTERED(50.0f) + this->obj.pos.y, + RAND_FLOAT_CENTERED(50.0f) + this->obj.pos.z, 2.0f); } for (i = 0; i < 3; i++) { - func_effect_8007D0E0(actor->obj.pos.x + RAND_FLOAT_CENTERED(50.0f), - actor->obj.pos.y + RAND_FLOAT_CENTERED(50.0f) + 20.0f, - actor->obj.pos.z + RAND_FLOAT_CENTERED(30.0f), 10.0f + 2 * i); + func_effect_8007D0E0(this->obj.pos.x + RAND_FLOAT_CENTERED(50.0f), + this->obj.pos.y + RAND_FLOAT_CENTERED(50.0f) + 20.0f, + this->obj.pos.z + RAND_FLOAT_CENTERED(30.0f), 10.0f + 2 * i); } - actor->obj.pos.y += 100.0f; - if (D_i3_801BF824[actor->iwork[0]] < 1000) { - actor->itemDrop = D_i3_801BF824[actor->iwork[0]]; - Actor_Despawn(actor); + this->obj.pos.y += 100.0f; + + if (D_i3_801BF824[this->iwork[0]] < 1000) { + this->itemDrop = D_i3_801BF824[this->iwork[0]]; + Actor_Despawn(this); } else { - if (D_i3_801BF824[actor->iwork[0]] == 1000) { + if (D_i3_801BF824[this->iwork[0]] == 1000) { for (i = 0, j = 0; i < 10; i++, j++) { if (j > 5) { j = 0; } - spB4.x = D_i3_801BF84C[j].x + actor->obj.pos.x; - spB4.y = D_i3_801BF84C[j].y + actor->obj.pos.y; - spB4.z = D_i3_801BF84C[j].z + actor->obj.pos.z; + spB4.x = D_i3_801BF84C[j].x + this->obj.pos.x; + spB4.y = D_i3_801BF84C[j].y + this->obj.pos.y; + spB4.z = D_i3_801BF84C[j].z + this->obj.pos.z; sp9C.x = RAND_FLOAT_CENTERED(10.0f); sp9C.y = RAND_FLOAT_CENTERED(10.0f); sp9C.z = 50.0f; - func_effect_8007EE68(OBJ_EFFECT_353, &spB4, &spA8, &spA8, &sp9C, 1.0f); + func_effect_8007EE68(OBJ_EFFECT_ENEMY_LASER_1, &spB4, &spA8, &spA8, &sp9C, 1.0f); } } - actor->itemDrop = DROP_NONE; - Actor_Despawn(actor); + this->itemDrop = DROP_NONE; + Actor_Despawn(this); } - Object_Kill(&actor->obj, actor->sfxSource); - func_effect_8007A6F0(&actor->obj.pos, NA_SE_OB_BROKEN_BOX); + Object_Kill(&this->obj, this->sfxSource); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_OB_BROKEN_BOX); break; } } void Zoness_8019BC78(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp24 = { 0.0f, 0.0f, 0.0f }; - Actor* this = thisx; + Actor* this = (Actor*) thisx; if (this->state != 0) { switch (limbIndex) { @@ -3978,220 +4150,238 @@ void Zoness_8019BC78(s32 limbIndex, Vec3f* rot, void* thisx) { } } -void Zoness_8019BDE0(Actor* actor) { - Vec3f sp28[20]; +void Zoness_Actor251_Draw(Actor* this) { + Vec3f frameTable[20]; - Animation_GetFrameData(&D_ZO_6018550, 0, sp28); - Animation_DrawSkeleton(3, D_ZO_601863C, sp28, NULL, Zoness_8019BC78, actor, gCalcMatrix); + Animation_GetFrameData(&D_ZO_6018550, 0, frameTable); + Animation_DrawSkeleton(3, D_ZO_601863C, frameTable, NULL, Zoness_8019BC78, this, gCalcMatrix); } -void Zoness_8019BE48(Actor* actor) { - Actor* pad; +void Zoness_Actor252_Update(Actor252* this) { + s32 pad; f32 sp40; f32 sp3C; s32 sp38; s32 i; - Actor* newActor; + Actor254* actor254; - switch (actor->state) { /* irregular */ + switch (this->state) { case 0: - for (i = 0, newActor = gActors; i < ARRAY_COUNT(gActors); i++, newActor++) { - if (newActor->obj.status == OBJ_FREE) { - Actor_Initialize(newActor); - newActor->obj.status = OBJ_INIT; - newActor->obj.id = OBJ_ACTOR_254; - newActor->obj.pos.x = actor->obj.pos.x; - newActor->obj.pos.y = actor->obj.pos.y; - newActor->obj.pos.z = actor->obj.pos.z + 30.0f; - newActor->fwork[0] = 230.0f; - newActor->fwork[1] = 0.8f; - newActor->fwork[2] = 1.0f; - newActor->fwork[3] = 1.0f; - newActor->iwork[0] = actor->index + 1; - Object_SetInfo(&newActor->info, newActor->obj.id); - actor->iwork[0] = i; + for (i = 0, actor254 = gActors; i < ARRAY_COUNT(gActors); i++, actor254++) { + if (actor254->obj.status == OBJ_FREE) { + Actor_Initialize(actor254); + actor254->obj.status = OBJ_INIT; + actor254->obj.id = OBJ_ACTOR_254; + actor254->obj.pos.x = this->obj.pos.x; + actor254->obj.pos.y = this->obj.pos.y; + actor254->obj.pos.z = this->obj.pos.z + 30.0f; + actor254->fwork[0] = 230.0f; + actor254->fwork[1] = 0.8f; + actor254->fwork[2] = 1.0f; + actor254->fwork[3] = 1.0f; + actor254->iwork[0] = this->index + 1; + Object_SetInfo(&actor254->info, actor254->obj.id); + this->iwork[0] = i; break; } } if (i >= ARRAY_COUNT(gActors)) { - newActor->obj.status = OBJ_FREE; + actor254->obj.status = OBJ_FREE; } - actor->health = 10; - actor->state++; + this->health = 10; + this->state++; break; + case 1: - if ((actor->dmgType != DMG_NONE) && (actor->health != 0)) { - actor->dmgType = DMG_NONE; - actor->timer_0C6 = 15; - actor->health -= actor->damage; - if (actor->health <= 0) { + if ((this->dmgType != DMG_NONE) && (this->health != 0)) { + this->dmgType = DMG_NONE; + this->timer_0C6 = 15; + this->health -= this->damage; + if (this->health <= 0) { if (!gMissedZoSearchlight) { - BonusText_Display(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 200.0f, 2); + BonusText_Display(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 200.0f, 2); gHitCount += 2; } - actor->health = actor->itemDrop = 0; - Actor_Despawn(actor); - actor->state++; + this->health = this->itemDrop = 0; + Actor_Despawn(this); + this->state++; } } break; - case 2: - actor->timer_0C2 = 30000; - newActor = &gActors[actor->iwork[0]]; - newActor->iwork[0] = 777; - func_effect_8008377C(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 5.0f, 0.7f); - func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y + 50.0f, actor->obj.pos.z, 5.0f); - Object_Kill(&actor->obj, actor->sfxSource); - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_WT_EXPLOSION_S); + case 2: + this->timer_0C2 = 30000; + actor254 = &gActors[this->iwork[0]]; + + actor254->iwork[0] = 777; + func_effect_8008377C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 5.0f, 0.7f); + func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y + 50.0f, this->obj.pos.z, 5.0f); + Object_Kill(&this->obj, this->sfxSource); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_WT_EXPLOSION_S); break; } - if ((actor->state < 2) && (Play_CheckDynaFloorCollision(&sp40, &sp38, actor->obj.pos.x, actor->obj.pos.y - 60.0f, - actor->obj.pos.z) != 0)) { - actor->gravity = 0.0f; + + if ((this->state < 2) && + (Play_CheckDynaFloorCollision(&sp40, &sp38, this->obj.pos.x, this->obj.pos.y - 60.0f, this->obj.pos.z) != 0)) { + this->gravity = 0.0f; sp3C = 10.0f; - if (Math_SmoothStepToF(&actor->obj.pos.y, sp40 - 20.0f, 0.1f, 5.0f, 0) >= 0.0f) { + if (Math_SmoothStepToF(&this->obj.pos.y, sp40 - 20.0f, 0.1f, 5.0f, 0) >= 0.0f) { sp3C = 350.0f; } - Math_SmoothStepToAngle(&actor->obj.rot.z, sp3C, 0.1f, 1.0f, 0); - newActor = &gActors[actor->iwork[0]]; - Math_SmoothStepToAngle(&newActor->obj.rot.z, sp3C, 0.1f, 1.0f, 0); - newActor->obj.pos.y = actor->obj.pos.y; + Math_SmoothStepToAngle(&this->obj.rot.z, sp3C, 0.1f, 1.0f, 0); + actor254 = &gActors[this->iwork[0]]; + Math_SmoothStepToAngle(&actor254->obj.rot.z, sp3C, 0.1f, 1.0f, 0); + actor254->obj.pos.y = this->obj.pos.y; } } -void Zoness_8019C1CC(Actor* actor) { +void Zoness_Actor252_Draw(Actor* this) { gSPDisplayList(gMasterDisp++, D_ZO_6002E10); } Vec3f D_i3_801BF8AC = { 230.0f, -50.0f, 0.0f }; Vec3f D_i3_801BF8B8 = { 230.0f, -250.0f, 0.0f }; -void Zoness_8019C200(Actor* actor) { +void Zoness_8019C200(Actor* this) { s32 i; s32 sp38; - Vec3f sp2C; - Actor* newActor; + Vec3f dest; + Actor251* actor251; - actor->scale = -1.0f; - if (actor->state != 3) { - actor->iwork[4] = fabsf(Math_ModF(actor->obj.rot.z, 10.0f)); - sp38 = fabsf(actor->obj.rot.z / 10.0f); + this->scale = -1.0f; + + if (this->state != 3) { + this->iwork[4] = fabsf(Math_ModF(this->obj.rot.z, 10.0f)); + sp38 = fabsf(this->obj.rot.z / 10.0f); } else { - sp38 = actor->iwork[0]; - actor->state = 0; + sp38 = this->iwork[0]; + this->state = 0; } - actor->fwork[5] = actor->obj.rot.x; - actor->obj.rot.x = 0.0f; - actor->obj.rot.z = 0.0f; - if (actor->iwork[4] == 2) { - actor->fwork[0] = -20.0f; - actor->fwork[3] = actor->obj.pos.y * 0.5f * -1.0f; + + this->fwork[5] = this->obj.rot.x; + this->obj.rot.x = 0.0f; + this->obj.rot.z = 0.0f; + + if (this->iwork[4] == 2) { + this->fwork[0] = -20.0f; + this->fwork[3] = this->obj.pos.y * 0.5f * -1.0f; } else { - actor->fwork[0] = 30.0f; + this->fwork[0] = 30.0f; } - Matrix_RotateZ(gCalcMatrix, actor->fwork[0] * M_DTOR, MTXF_NEW); - Matrix_MultVec3f(gCalcMatrix, &D_i3_801BF8AC, &sp2C); - actor->fwork[1] = sp2C.x; - actor->fwork[2] = actor->fwork[3] + sp2C.y; - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_MultVec3f(gCalcMatrix, &D_i3_801BF8B8, &sp2C); - for (i = 0, newActor = gActors; i < ARRAY_COUNT(gActors); i++, newActor++) { - if (newActor->obj.status == OBJ_FREE) { - Actor_Initialize(newActor); - newActor->obj.status = OBJ_INIT; - newActor->obj.id = OBJ_ACTOR_251; - newActor->obj.pos.x = actor->obj.pos.x + sp2C.x; - newActor->obj.pos.y = actor->obj.pos.y + sp2C.y + actor->fwork[2]; - newActor->obj.pos.z = actor->obj.pos.z + sp2C.z + actor->fwork[0]; - newActor->obj.rot.y = actor->obj.rot.y; - newActor->iwork[0] = sp38; - newActor->iwork[3] = 777; - Object_SetInfo(&newActor->info, newActor->obj.id); - actor->iwork[3] = i; + + Matrix_RotateZ(gCalcMatrix, this->fwork[0] * M_DTOR, MTXF_NEW); + Matrix_MultVec3f(gCalcMatrix, &D_i3_801BF8AC, &dest); + + this->fwork[1] = dest.x; + this->fwork[2] = this->fwork[3] + dest.y; + + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_MultVec3f(gCalcMatrix, &D_i3_801BF8B8, &dest); + + for (i = 0, actor251 = &gActors[0]; i < ARRAY_COUNT(gActors); i++, actor251++) { + if (actor251->obj.status == OBJ_FREE) { + Actor_Initialize(actor251); + actor251->obj.status = OBJ_INIT; + actor251->obj.id = OBJ_ACTOR_251; + actor251->obj.pos.x = this->obj.pos.x + dest.x; + actor251->obj.pos.y = this->obj.pos.y + dest.y + this->fwork[2]; + actor251->obj.pos.z = this->obj.pos.z + dest.z + this->fwork[0]; + actor251->obj.rot.y = this->obj.rot.y; + actor251->iwork[0] = sp38; + actor251->iwork[3] = 777; + Object_SetInfo(&actor251->info, actor251->obj.id); + this->iwork[3] = i; break; } } if (i >= ARRAY_COUNT(gActors)) { - newActor->obj.status = OBJ_FREE; + actor251->obj.status = OBJ_FREE; } } -void Zoness_8019C454(Actor* actor) { +void Zoness_Actor253_Update(Actor* this) { Vec3f sp34; Actor* otherActor; - if ((actor->fwork[0] == 30.0f) && (fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 2500.0f)) { - Math_SmoothStepToAngle(&actor->fwork[6], 10.0f, 0.1f, 1.0f, 0.01f); - Math_SmoothStepToAngle(&actor->obj.rot.y, actor->fwork[5], 1.0f, actor->fwork[6], 0.01f); - if (actor->fwork[5] != actor->obj.rot.y) { - AUDIO_PLAY_SFX(NA_SE_OB_CRAME_MOTOR, actor->sfxSource, 4); + if ((this->fwork[0] == 30.0f) && (fabsf(this->obj.pos.z - gPlayer[0].trueZpos) < 2500.0f)) { + Math_SmoothStepToAngle(&this->fwork[6], 10.0f, 0.1f, 1.0f, 0.01f); + Math_SmoothStepToAngle(&this->obj.rot.y, this->fwork[5], 1.0f, this->fwork[6], 0.01f); + if (this->fwork[5] != this->obj.rot.y) { + AUDIO_PLAY_SFX(NA_SE_OB_CRAME_MOTOR, this->sfxSource, 4); } if (1) {} } - Matrix_RotateZ(gCalcMatrix, actor->fwork[0] * M_DTOR, MTXF_NEW); + Matrix_RotateZ(gCalcMatrix, this->fwork[0] * M_DTOR, MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, &D_i3_801BF8AC, &sp34); - actor->fwork[1] = sp34.x; - actor->fwork[2] = actor->fwork[3] + sp34.y; - otherActor = &gActors[actor->iwork[3]]; - switch (actor->state) { + + this->fwork[1] = sp34.x; + this->fwork[2] = this->fwork[3] + sp34.y; + + otherActor = &gActors[this->iwork[3]]; + + switch (this->state) { case 0: - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, &D_i3_801BF8B8, &sp34); + if ((otherActor->obj.status != OBJ_FREE) && (otherActor->obj.id == OBJ_ACTOR_251)) { - otherActor->obj.pos.x = actor->obj.pos.x + sp34.x; - otherActor->obj.pos.y = actor->obj.pos.y + sp34.y + actor->fwork[2]; - otherActor->obj.pos.z = actor->obj.pos.z + sp34.z; + otherActor->obj.pos.x = this->obj.pos.x + sp34.x; + otherActor->obj.pos.y = this->obj.pos.y + sp34.y + this->fwork[2]; + otherActor->obj.pos.z = this->obj.pos.z + sp34.z; } else { - actor->state = 1; + this->state = 1; } - switch (actor->iwork[4]) { + + switch (this->iwork[4]) { case 1: - if ((actor->fwork[5] == actor->obj.rot.y) && - (fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 1000.0f)) { + if ((this->fwork[5] == this->obj.rot.y) && + (fabsf(this->obj.pos.z - gPlayer[0].trueZpos) < 1000.0f)) { if (otherActor->obj.id == OBJ_ACTOR_251) { otherActor->gravity = 1.0f; } - actor->state = 1; + this->state = 1; } break; + case 2: - Math_SmoothStepToF(&actor->fwork[3], 0.0f, 1.0f, 5.0f, 0.01f); - if (actor->fwork[3] == 0.0f) { - Math_SmoothStepToF(&actor->fwork[0], 30.0f, 1.0f, 5.0f, 0.01f); - if (actor->fwork[0] == 30.0f) { - actor->iwork[4] = 0; + Math_SmoothStepToF(&this->fwork[3], 0.0f, 1.0f, 5.0f, 0.01f); + if (this->fwork[3] == 0.0f) { + Math_SmoothStepToF(&this->fwork[0], 30.0f, 1.0f, 5.0f, 0.01f); + if (this->fwork[0] == 30.0f) { + this->iwork[4] = 0; } } break; } break; + case 1: - actor->fwork[4] += 10.0f; - actor->fwork[4] = Math_ModF(actor->fwork[4], 360.0f); + this->fwork[4] += 10.0f; + this->fwork[4] = Math_ModF(this->fwork[4], 360.0f); break; } - if (actor->fwork[0] >= 30.0f) { - actor->fwork[0] = 30.0f; + + if (this->fwork[0] >= 30.0f) { + this->fwork[0] = 30.0f; } - if (actor->fwork[0] <= -20.0f) { - actor->fwork[0] = -20.0f; + if (this->fwork[0] <= -20.0f) { + this->fwork[0] = -20.0f; } - if (actor->fwork[3] >= 0) { - actor->fwork[3] = 0.0f; + if (this->fwork[3] >= 0) { + this->fwork[3] = 0.0f; } - if (actor->fwork[3] <= -450.0f) { - actor->fwork[3] = -450.0f; + if (this->fwork[3] <= -450.0f) { + this->fwork[3] = -450.0f; } } -void Zoness_8019C83C(Actor* actor) { +void Zoness_Actor253_Draw(Actor253* this) { f32 var_fv1; s32 i; s32 var_s1; Matrix_Push(&gGfxMatrix); - Matrix_RotateZ(gGfxMatrix, actor->fwork[0] * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, this->fwork[0] * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ZO_601A340); Matrix_Pop(&gGfxMatrix); @@ -4207,15 +4397,15 @@ void Zoness_8019C83C(Actor* actor) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ZO_601D680); Matrix_Pop(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, actor->fwork[1], actor->fwork[2], 0.0f, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, actor->fwork[4] * M_DTOR, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, this->fwork[1], this->fwork[2], 0.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, this->fwork[4] * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.75f, 0.75f, 0.75f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ZO_601C590); RCP_SetupDL_57(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); Matrix_RotateY(gGfxMatrix, gGameFrameCount * M_DTOR, MTXF_APPLY); - var_fv1 = (fabsf(actor->fwork[3]) * 1.3f) + 50.0f; + var_fv1 = (fabsf(this->fwork[3]) * 1.3f) + 50.0f; for (var_s1 = 0; var_fv1 > 0.0f; var_s1++) { var_fv1 -= 9.3f; } @@ -4226,6 +4416,7 @@ void Zoness_8019C83C(Actor* actor) { if (var_s1 <= 0) { var_s1 = 1; } + for (i = 0; i < var_s1; i++) { Matrix_Translate(gGfxMatrix, 0.0f, 9.3f, 0.0f, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, M_PI / 2, MTXF_APPLY); @@ -4240,71 +4431,68 @@ void Zoness_8019C83C(Actor* actor) { f32 D_i3_801BF8C4[2] = { 46.0f, 314.0f }; f32 D_i3_801BF8CC[2] = { 23.0f, 337.0f }; -void Zoness_8019CBEC(Actor* actor) { - actor->timer_0C2 = 30000; - switch (actor->state) { +void Zoness_Actor254_Update(Actor254* this) { + this->timer_0C2 = 30000; + + switch (this->state) { case 0: - actor->fwork[5] = D_i3_801BF8CC[gGameFrameCount % 2U]; + this->fwork[5] = D_i3_801BF8CC[gGameFrameCount % 2U]; if (gMissedZoSearchlight) { - actor->fwork[5] = D_i3_801BF8C4[gGameFrameCount % 2U]; - actor->iwork[1] = 1; + this->fwork[5] = D_i3_801BF8C4[gGameFrameCount % 2U]; + this->iwork[1] = 1; } - actor->state++; + this->state++; break; + case 1: - Math_SmoothStepToF(&actor->fwork[6], 10.0f, 0.1f, 1.0f, 0.001f); - if (actor->iwork[0] == 0) { - Math_SmoothStepToAngle(&actor->obj.rot.z, actor->fwork[5], 0.1f, actor->fwork[6], 0.0001f); + Math_SmoothStepToF(&this->fwork[6], 10.0f, 0.1f, 1.0f, 0.001f); + if (this->iwork[0] == 0) { + Math_SmoothStepToAngle(&this->obj.rot.z, this->fwork[5], 0.1f, this->fwork[6], 0.0001f); } else { - Math_SmoothStepToAngle(&actor->fwork[4], actor->fwork[5], 0.1f, actor->fwork[6], 0.0001f); + Math_SmoothStepToAngle(&this->fwork[4], this->fwork[5], 0.1f, this->fwork[6], 0.0001f); } - if (gMissedZoSearchlight && (actor->iwork[1] == 0)) { - if (actor->fwork[5] < 300.0f) { - actor->fwork[5] = D_i3_801BF8C4[0]; + + if (gMissedZoSearchlight && (this->iwork[1] == 0)) { + if (this->fwork[5] < 300.0f) { + this->fwork[5] = D_i3_801BF8C4[0]; } else { - actor->fwork[5] = D_i3_801BF8C4[1]; + this->fwork[5] = D_i3_801BF8C4[1]; } - actor->iwork[1] = 1; + this->iwork[1] = 1; } - if (actor->timer_0BC == 0) { - actor->timer_0BC = 45; - actor->fwork[5] = 360.0f - actor->fwork[5]; - actor->fwork[6] = 0.0f; + + if (this->timer_0BC == 0) { + this->timer_0BC = 45; + this->fwork[5] = 360.0f - this->fwork[5]; + this->fwork[6] = 0.0f; } - if (actor->iwork[0] == 777) { - actor->state++; + + if (this->iwork[0] == 777) { + this->state++; } break; + case 2: - Math_SmoothStepToF(&actor->fwork[1], 0.0f, 0.2f, 1.0f, 0.01f); - if (actor->fwork[1] < 0.6f) { - Math_SmoothStepToF(&actor->fwork[2], 0.0f, 0.5f, 5.0f, 0.01f); - if (actor->fwork[2] == 0.0f) { - Object_Kill(&actor->obj, actor->sfxSource); + Math_SmoothStepToF(&this->fwork[1], 0.0f, 0.2f, 1.0f, 0.01f); + if (this->fwork[1] < 0.6f) { + Math_SmoothStepToF(&this->fwork[2], 0.0f, 0.5f, 5.0f, 0.01f); + if (this->fwork[2] == 0.0f) { + Object_Kill(&this->obj, this->sfxSource); } } break; } - Zoness_8018FF50(actor); - actor->obj.rot.x = 0.0f; + Zoness_8018FF50(this); + this->obj.rot.x = 0.0f; } -void Zoness_8019CE58(Actor* actor) { - Gfx* temp_v0; - Gfx* temp_v0_2; - Gfx* temp_v0_3; - Gfx* temp_v0_4; - Gfx* temp_v0_5; - Gfx* temp_v0_6; - Gfx* temp_v0_7; - Gfx* temp_v0_8; - Gfx* temp_v0_9; - +void Zoness_Actor254_Draw(Actor254* this) { RCP_SetupDL(&gMasterDisp, SETUPDL_72); - if (actor->iwork[0] != 0) { - Matrix_Translate(gGfxMatrix, 0.0f, actor->fwork[0], 0.0f, MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, (actor->fwork[4] + actor->obj.rot.z) * M_DTOR, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, actor->fwork[1], actor->fwork[2], actor->fwork[3], MTXF_APPLY); + + if (this->iwork[0] != 0) { + Matrix_Translate(gGfxMatrix, 0.0f, this->fwork[0], 0.0f, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, (this->fwork[4] + this->obj.rot.z) * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->fwork[1], this->fwork[2], this->fwork[3], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if (gMissedZoSearchlight) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 191, 43, 255); @@ -4346,41 +4534,44 @@ void Zoness_Actor247_Init(Actor247* this) { } } -void Zoness_8019D15C(Actor* actor) { +void Zoness_Actor247_Update(Actor247* this) { Actor* otherActor; - if (actor->state == 0) { - if (actor->dmgType != DMG_NONE) { - actor->dmgType = DMG_NONE; - if (actor->dmgPart < 2) { - AUDIO_PLAY_SFX(NA_SE_OB_WT_WHEEL_ROLL, actor->sfxSource, 4); - if ((actor->obj.pos.y + 268.0f) < actor->hitPos.y) { - actor->fwork[1] = 20.0f; + if (this->state == 0) { + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + if (this->dmgPart < 2) { + AUDIO_PLAY_SFX(NA_SE_OB_WT_WHEEL_ROLL, this->sfxSource, 4); + if ((this->obj.pos.y + 268.0f) < this->hitPos.y) { + this->fwork[1] = 20.0f; } else { - actor->fwork[1] = -20.0f; + this->fwork[1] = -20.0f; } - AUDIO_PLAY_SFX(NA_SE_OB_WALL_UP, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_WALL_UP, this->sfxSource, 4); } else { - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } } - if (actor->unk_046 != 0) { - otherActor = &gActors[actor->unk_046 - 1]; - otherActor->obj.pos.y += actor->fwork[1] * 0.3f; - if (otherActor->obj.pos.y > actor->fwork[2] + 370.0f) { - otherActor->obj.pos.y = actor->fwork[2] + 370.0f; + + if (this->unk_046 != 0) { + otherActor = &gActors[this->unk_046 - 1]; + otherActor->obj.pos.y += this->fwork[1] * 0.3f; + if (otherActor->obj.pos.y > this->fwork[2] + 370.0f) { + otherActor->obj.pos.y = this->fwork[2] + 370.0f; } } - actor->fwork[0] += actor->fwork[1]; - Math_SmoothStepToF(&actor->fwork[1], 0.0f, 1.0f, 1.0f, 0.0f); - if (actor->fwork[1] == 0.0f) { - Audio_KillSfxBySource(actor->sfxSource); + + this->fwork[0] += this->fwork[1]; + Math_SmoothStepToF(&this->fwork[1], 0.0f, 1.0f, 1.0f, 0.0f); + + if (this->fwork[1] == 0.0f) { + Audio_KillSfxBySource(this->sfxSource); } } } bool Zoness_8019D340(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { - Actor* this = thisx; + Actor* this = (Actor*) thisx; switch (this->state) { case 0: @@ -4392,6 +4583,7 @@ bool Zoness_8019D340(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* t *dList = NULL; } break; + case 1: if (limbIndex != 3) { *dList = NULL; @@ -4401,20 +4593,21 @@ bool Zoness_8019D340(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* t return false; } -void Zoness_8019D3C4(Actor* actor) { - Vec3f sp28[10]; +void Zoness_Actor247_Draw(Actor* this) { + Vec3f frameTable[10]; - Animation_GetFrameData(&D_ZO_601FBC4, 0, sp28); - Animation_DrawSkeleton(1, D_ZO_601FC90, sp28, Zoness_8019D340, NULL, actor, &gIdentityMatrix); + Animation_GetFrameData(&D_ZO_601FBC4, 0, frameTable); + Animation_DrawSkeleton(1, D_ZO_601FC90, frameTable, Zoness_8019D340, NULL, this, &gIdentityMatrix); } void Zoness_LevelStart(Player* player) { - s32 sp2C; + s32 buttonSave; player->bobPhase += 10.0f; player->yBob = -SIN_DEG(player->bobPhase) * 0.5f; player->rockPhase += 3.0f; player->rockAngle = SIN_DEG(player->rockPhase) * 1.5f; + switch (player->csState) { case 0: gCsFrameCount = 0; @@ -4430,20 +4623,26 @@ void Zoness_LevelStart(Player* player) { case 1: Math_SmoothStepToF(&player->pos.z, 0.0f, 0.1f, 48.0f, 0); Math_SmoothStepToF(&player->cam.at.y, (player->pos.y * player->unk_148) + 20.0f, 0.1f, 1.0f, 0.0f); + if (gCsFrameCount >= 230) { Math_SmoothStepToF(&player->cam.at.z, player->trueZpos, 0.2f, 20000.0f, 0.0f); } - sp2C = gControllerHold[gMainController].button; + + buttonSave = gControllerHold[gMainController].button; gControllerHold[gMainController].button = gBoostButton[gMainController]; + player->csTimer = 60; player->boostMeter = 1.0f; Player_ArwingBoost(player); + if (gCsFrameCount > 195) { D_ctx_801779A8[0] = 50.0f; } else { D_ctx_801779A8[0] = 0.0f; } - gControllerHold[gMainController].button = sp2C; + + gControllerHold[gMainController].button = buttonSave; + if (gCsFrameCount >= 270) { AUDIO_PLAY_BGM(NA_BGM_STAGE_ZO); gLevelStartStatusScreenTimer = 80; @@ -4459,13 +4658,13 @@ void Zoness_LevelStart(Player* player) { } void Zoness_LevelComplete(Player* player) { - f32 temp_fa0; - f32 temp_ft5; + f32 zRot; + f32 yRot; f32 dx; f32 dz; s32 i; - Vec3f sp58; - Vec3f sp4C; + Vec3f src; + Vec3f dest; Boss* boss = &gBosses[0]; switch (player->csState) { @@ -4478,12 +4677,14 @@ void Zoness_LevelComplete(Player* player) { player->draw = true; player->wings.unk_04 = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = player->zRotBarrelRoll = player->zRotBank = player->boostSpeed = 0.0f; + gCsCamEyeX = player->cam.eye.x; gCsCamEyeY = player->cam.eye.y; gCsCamEyeZ = player->cam.eye.z; gCsCamAtX = player->cam.at.x; gCsCamAtY = player->cam.at.y; gCsCamAtZ = player->cam.at.z; + for (i = 10; i < ARRAY_COUNT(gActors); i++) { if (gActors[i].animFrame == 0) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); @@ -4492,31 +4693,38 @@ void Zoness_LevelComplete(Player* player) { Object_Kill(&gActors[2].obj, gActors[2].sfxSource); Object_Kill(&gActors[3].obj, gActors[3].sfxSource); Object_Kill(&gActors[4].obj, gActors[4].sfxSource); + player->csState = 1; + D_ctx_80177A48[0] = 0.05f; + if (Rand_ZeroOne() > 0.5f) { D_ctx_80177A48[9] = -1.0f; } else { D_ctx_80177A48[9] = 1.0f; } break; + case 1: gPathTexScroll += 30.0f; Math_SmoothStepToF(&player->rot.x, 0.0f, 0.1f, 5.0f, 0.0f); Math_SmoothStepToF(&player->pos.y, 200.0f, 0.05f, 10.0f, 0.0f); Math_SmoothStepToF(&gCsCamEyeY, 250.0f, 1.0f, 20.0f, 0.0f); Math_SmoothStepToF(&gCsCamAtY, 240.0f, 1.0f, 20.0f, 0.0f); + dx = player->pos.x - boss->obj.pos.x; dz = (player->pos.z - boss->obj.pos.z) * 0.05f; - temp_ft5 = Math_RadToDeg(-Math_Atan2F(dx, dz)); - temp_fa0 = Math_SmoothStepToAngle(&player->rot.y, temp_ft5, 0.5f, 2.0f, 0.0001f) * 30.0f; + yRot = Math_RadToDeg(-Math_Atan2F(dx, dz)); + zRot = Math_SmoothStepToAngle(&player->rot.y, yRot, 0.5f, 2.0f, 0.0001f) * 30.0f; + if (gCsFrameCount >= 14) { - Math_SmoothStepToAngle(&player->rot.z, temp_fa0, 0.1f, 5.0f, 0.0001f); - } else if (temp_fa0 < 0.0f) { + Math_SmoothStepToAngle(&player->rot.z, zRot, 0.1f, 5.0f, 0.0001f); + } else if (zRot < 0.0f) { player->rot.z -= 30.0f; } else { player->rot.z += 30.0f; } + if (gCsFrameCount >= 140) { gFillScreenAlphaTarget = 255; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; @@ -4535,8 +4743,10 @@ void Zoness_LevelComplete(Player* player) { player->rot.z = 0.0f; } break; + case 2: gPathTexScroll += 60.0f; + if (player->csTimer == 0) { player->pos.x = 0.0f; player->pos.y = 200.0f; @@ -4549,6 +4759,7 @@ void Zoness_LevelComplete(Player* player) { Solar_801A7750(); D_ctx_80177A48[1] = 0.0f; D_ctx_80177A48[2] = 0.0f; + if (!gMissedZoSearchlight) { D_ctx_80177A48[1] = 330.0f; player->cam.eye.x = 1350.0f; @@ -4571,20 +4782,23 @@ void Zoness_LevelComplete(Player* player) { D_ctx_80177A48[0] = 0.0f; } break; + case 3: gPathTexScroll += 60.0f; gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 4; D_ctx_80177A48[1] += D_ctx_80177A48[2]; + Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, MTXF_NEW); - sp58.x = 0.0f; - sp58.y = 0.0f; - sp58.z = D_ctx_80177A48[3]; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp58, &sp4C); + src.x = 0.0f; + src.y = 0.0f; + src.z = D_ctx_80177A48[3]; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + if (gCsFrameCount < 1180) { - gCsCamEyeX = sp4C.x; - gCsCamEyeY = 200.0f + sp4C.y; - gCsCamEyeZ = player->pos.z + gPathProgress + sp4C.z; + gCsCamEyeX = dest.x; + gCsCamEyeY = 200.0f + dest.y; + gCsCamEyeZ = player->pos.z + gPathProgress + dest.z; gCsCamAtX = 0.0f; gCsCamAtY = player->pos.y; gCsCamAtZ = D_ctx_80177A48[5] + (player->pos.z + gPathProgress); @@ -4594,11 +4808,13 @@ void Zoness_LevelComplete(Player* player) { gCsCamAtY = player->pos.y; gCsCamAtZ = player->pos.z + gPathProgress; } + if (gCsFrameCount > 1180) { player->baseSpeed += 2.0f; player->rot.x += 0.1f; Math_SmoothStepToF(&D_ctx_80177A48[2], 0.0f, 1.0f, 0.001f, 0); player->unk_190 = 2.0f; + if (!gMissedZoSearchlight) { Math_SmoothStepToF(&D_ctx_80177A48[0], 1.0f, 1.0f, 0.025f, 0.0f); } @@ -4606,6 +4822,7 @@ void Zoness_LevelComplete(Player* player) { Math_SmoothStepToF(&D_ctx_80177A48[2], D_ctx_80177A48[4], 1.0f, 0.001f, 0.0f); Math_SmoothStepToF(&D_ctx_80177A48[0], 0.05f, 1.0f, 0.00005f, 0.0f); } + if (gCsFrameCount == 1300) { Play_ClearObjectData(); } @@ -4624,7 +4841,9 @@ void Zoness_LevelComplete(Player* player) { } break; } - (void) "Demo_Time %d\n"; + + PRINTF("Demo_Time %d\n"); + switch (gCsFrameCount) { case 320: if (!gMissedZoSearchlight) { @@ -4632,9 +4851,11 @@ void Zoness_LevelComplete(Player* player) { } gLevelClearScreenTimer = 100; break; + case 380: Radio_PlayMessage(gMsg_ID_20010, RCID_FOX); break; + case 468: switch (gTeamShields[TEAM_ID_SLIPPY]) { case 0: @@ -4648,6 +4869,7 @@ void Zoness_LevelComplete(Player* player) { break; } break; + case 603: switch (gTeamShields[TEAM_ID_PEPPY]) { case 0: @@ -4665,6 +4887,7 @@ void Zoness_LevelComplete(Player* player) { break; } break; + case 738: switch (gTeamShields[TEAM_ID_FALCO]) { case 0: @@ -4678,36 +4901,44 @@ void Zoness_LevelComplete(Player* player) { break; } break; + case 906: gShowLevelClearStatusScreen = 1; break; + case 1106: gShowLevelClearStatusScreen = 0; break; + case 1180: AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, player->sfxSource, 0); player->unk_190 = player->unk_194 = 5.0f; break; + case 1240: SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); break; + case 1120: if (gTeamShields[TEAM_ID_PEPPY] > 0) { gActors[0].state = 2; } break; + case 1140: if (gTeamShields[TEAM_ID_SLIPPY] > 0) { gActors[1].state = 2; } break; + case 1160: if (gTeamShields[TEAM_ID_FALCO] > 0) { gActors[2].state = 2; } break; } + if (gCsFrameCount >= 1180) { player->contrailScale += 0.02f; if (player->contrailScale > 0.6f) { @@ -4716,13 +4947,13 @@ void Zoness_LevelComplete(Player* player) { } Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -((player->xRot_120 + player->rot.x) * M_DTOR), MTXF_APPLY); - sp58.x = 0.0f; - sp58.y = 0.0f; - sp58.z = player->baseSpeed; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp58, &sp4C); - player->vel.x = sp4C.x; - player->vel.z = sp4C.z; - player->vel.y = sp4C.y; + src.x = 0.0f; + src.y = 0.0f; + src.z = player->baseSpeed; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + player->vel.x = dest.x; + player->vel.z = dest.z; + player->vel.y = dest.y; player->pos.x += player->vel.x; player->pos.y += player->vel.y; player->trueZpos = player->pos.z += player->vel.z; @@ -4739,11 +4970,11 @@ void Zoness_LevelComplete(Player* player) { player->rockAngle = SIN_DEG(player->rockPhase); } -void Zoness_8019E5F0(Actor* actor) { - Vec3f sp34; - Vec3f sp28; +void Zoness_8019E5F0(ActorCutscene* this) { + Vec3f src; + Vec3f dest; - switch (actor->state) { + switch (this->state) { case 4: case 5: case 6: @@ -4753,36 +4984,36 @@ void Zoness_8019E5F0(Actor* actor) { case 10: break; case 1: - if ((actor->animFrame != 0) && ((((s32) (actor->index % 8U) * 10) + 1030) < gCsFrameCount)) { - actor->state = 4; + if ((this->animFrame != 0) && ((((s32) (this->index % 8U) * 10) + 1030) < gCsFrameCount)) { + this->state = 4; } break; case 2: - actor->state = 3; - AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); - actor->fwork[29] = 5.0f; + this->state = 3; + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, this->sfxSource, 0); + this->fwork[29] = 5.0f; /* fallthrough */ case 3: - actor->iwork[11] = 2; - actor->fwork[0] += 2.0f; - actor->rot_0F4.x += 0.1f; - actor->fwork[21] += 0.2f; - if (actor->fwork[21] > 0.6f) { - actor->fwork[21] = 0.6f; + this->iwork[11] = 2; + this->fwork[0] += 2.0f; + this->rot_0F4.x += 0.1f; + this->fwork[21] += 0.2f; + if (this->fwork[21] > 0.6f) { + this->fwork[21] = 0.6f; } break; } - Matrix_RotateY(gCalcMatrix, (actor->rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(actor->rot_0F4.x * M_DTOR), MTXF_APPLY); - sp34.x = 0.0f; - sp34.y = 0.0f; - sp34.z = actor->fwork[0]; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp34, &sp28); - actor->vel.x = sp28.x; - actor->vel.y = sp28.y; - actor->vel.z = sp28.z; + Matrix_RotateY(gCalcMatrix, (this->rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(this->rot_0F4.x * M_DTOR), MTXF_APPLY); + src.x = 0.0f; + src.y = 0.0f; + src.z = this->fwork[0]; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + this->vel.x = dest.x; + this->vel.y = dest.y; + this->vel.z = dest.z; - actor->obj.rot.x = -actor->rot_0F4.x; - actor->obj.rot.y = actor->rot_0F4.y + 180.0f; - actor->obj.rot.z = -actor->rot_0F4.z; + this->obj.rot.x = -this->rot_0F4.x; + this->obj.rot.y = this->rot_0F4.y + 180.0f; + this->obj.rot.z = -this->rot_0F4.z; } diff --git a/src/overlays/ovl_i4/fox_bo.c b/src/overlays/ovl_i4/fox_bo.c index b8afe00b..f625ee21 100644 --- a/src/overlays/ovl_i4/fox_bo.c +++ b/src/overlays/ovl_i4/fox_bo.c @@ -127,7 +127,7 @@ void Bolse_8018BD60(Actor* this) { } } ActorAllRange_UpdateStarWolfEvents(this); - ActorAllRange_UpdateEvemyEvents(this); + ActorAllRange_UpdateEnemyEvents(this); } f32 D_i4_8019EEE4[] = { -200.0f, -100.0f, -0.0f, 100.0f, 200.0f }; @@ -136,7 +136,7 @@ void Bolse_SpawnEnemies(Actor* this, s32 count) { s32 i; Actor* enemy; - for (i = AI360_10, enemy = &gActors[AI360_10]; i < count + AI360_10; i++, enemy++) { + for (i = AI360_ENEMY, enemy = &gActors[AI360_ENEMY]; i < count + AI360_ENEMY; i++, enemy++) { if (enemy->obj.status == OBJ_FREE) { Actor_Initialize(enemy); enemy->obj.status = OBJ_ACTIVE; @@ -160,26 +160,26 @@ void Bolse_SpawnEnemies(Actor* this, s32 count) { enemy->aiType = i; enemy->aiIndex = -1; - if (i < AI360_10 + 3) { + if (i < AI360_ENEMY + 3) { enemy->aiIndex = AI360_SLIPPY; gActors[AI360_SLIPPY].aiIndex = -1; } - if ((i == AI360_10 + 7) || (i == AI360_10 + 8)) { + if ((i == AI360_ENEMY + 7) || (i == AI360_ENEMY + 8)) { enemy->aiIndex = AI360_FOX; } - if ((i == AI360_10 + 10) || (i == AI360_10 + 11)) { + if ((i == AI360_ENEMY + 10) || (i == AI360_ENEMY + 11)) { enemy->aiIndex = AI360_PEPPY; gActors[AI360_PEPPY].aiIndex = -1; } - if (i == AI360_10 + 12) { + if (i == AI360_ENEMY + 12) { enemy->aiIndex = AI360_FALCO; gActors[AI360_FALCO].aiIndex = -1; } - if ((D_i4_801A0530 > 16000) && ((i == AI360_10 + 13) || (i == AI360_10 + 14))) { + if ((D_i4_801A0530 > 16000) && ((i == AI360_ENEMY + 13) || (i == AI360_ENEMY + 14))) { enemy->aiIndex = AI360_FOX; } @@ -342,7 +342,7 @@ void Bolse_UpdateEventHandler(Actor* this) { if ((gControllerPress->button & START_BUTTON) || ((gAllRangeSpawnEvent + 300) == gAllRangeEventTimer)) { this->state = 2; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; - Camera_Update360(player, 1); + Camera_Update360(player, true); player->unk_014 = 0.0f; D_hud_80161708 = 0; } @@ -391,7 +391,7 @@ void Bolse_UpdateEventHandler(Actor* this) { gAllRangeEventTimer = 3000; this->state = 2; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; - Camera_Update360(player, 1); + Camera_Update360(player, true); player->unk_014 = 0.0f; Audio_KillSfxBySource(gBosses[1].sfxSource); this->iwork[1] = gHitCount; @@ -604,7 +604,7 @@ void Bolse_8018D124(Actor* actor) { src.z = gEnemyShotSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - func_effect_8007F04C(OBJ_EFFECT_353, actor->obj.pos.x + dest.x, actor->obj.pos.y + 180.0f + dest.y, + func_effect_8007F04C(OBJ_EFFECT_ENEMY_LASER_1, actor->obj.pos.x + dest.x, actor->obj.pos.y + 180.0f + dest.y, actor->obj.pos.z + dest.z, -actor->rot_0F4.x, actor->rot_0F4.y + actor->obj.rot.y, 0.0f, 0.0f, 0.0f, 0.0f, dest.x, dest.y, dest.z, 1.0f); } @@ -627,7 +627,7 @@ bool Bolse_8018D278(Actor* actor) { } } - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); actor->itemDrop = DROP_SILVER_RING; @@ -733,7 +733,7 @@ bool Bolse_8018D584(Actor* actor) { Audio_KillSfxBySourceAndId(actor->sfxSource, NA_SE_OB_SPARK_BEAM); AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, actor->sfxSource, 0); } else { - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_REFLECT); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_REFLECT); } return true; @@ -1724,7 +1724,7 @@ void Bolse_LevelComplete(Player* player) { Math_SmoothStepToF(&player->pos.y, 700.0f, 0.1f, 10.0f, 0.0f); } - Camera_Update360(player, 0); + Camera_Update360(player, false); player->cam.eye.x += player->vel.x * 0.1f; player->cam.eye.y += player->vel.y * 0.1f; @@ -1806,7 +1806,7 @@ void Bolse_80190FE8(f32 x, f32 y, f32 z, f32 scale) { } } -void Bolse_80191054(Effect* effect) { +void Bolse_Effect397_Update(Effect* effect) { switch (effect->state) { case 0: if (gPlayer[0].barrelRollAlpha == 0) { @@ -1835,7 +1835,7 @@ void Bolse_80191054(Effect* effect) { } } -void Bolse_80191180(Effect* effect) { +void Bolse_Effect397_Draw(Effect* effect) { switch (effect->state) { case 0: gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 192); @@ -1858,7 +1858,7 @@ void Bolse_80191180(Effect* effect) { f32 D_i4_8019F09C[12] = { 0.0f, 0.0f, 60.0f, 60.0f, 120.0f, 120.0f, 180.0f, 180.0f, 240.0f, 240.0f, 300.0f, 300.0f }; -void Bolse_801912FC(Boss* boss) { +void Bolse_Boss311_Update(Boss* boss) { s32 i; Vec3f src; Vec3f dest; @@ -2036,7 +2036,7 @@ void Bolse_80191A6C(s32 index, Vec3f* vec, void* ptr) { } } -void Bolse_80191AFC(Boss* boss) { +void Bolse_Boss311_Draw(Boss* boss) { Animation_GetFrameData(&D_BO_6001C64, 0, boss->vwork); if (boss->state >= 2) { Animation_DrawSkeleton(3, D_BO_6001FB0, boss->vwork, Bolse_801918E4, Bolse_80191A6C, boss, gCalcMatrix); diff --git a/src/overlays/ovl_i4/fox_fo.c b/src/overlays/ovl_i4/fox_fo.c index d2d6b630..6d452b64 100644 --- a/src/overlays/ovl_i4/fox_fo.c +++ b/src/overlays/ovl_i4/fox_fo.c @@ -7,104 +7,111 @@ #include "global.h" #include "assets/ast_fortuna.h" -void Fortuna_801875F0(Actor* actor) { +// Spawns up to 10 enemies from the center base. +void Fortuna_SpawnEnemies(ActorEvent* this) { s32 i; - s32 counter; - Actor* actorPtr = &gActors[10]; - f32 D_i4_8019EDE0[] = { 180.0f, 60.0f, 300.0f }; + s32 enemyCount; + ActorAllRange* enemy = &gActors[10]; + f32 sEnemySpawnAngle[] = { 180.0f, 60.0f, 300.0f }; - for (counter = 0, i = 0; i < 10; i++, actorPtr++) { - if (actorPtr->obj.status != OBJ_FREE) { - counter++; + for (enemyCount = 0, i = 0; i < 10; i++, enemy++) { + if (enemy->obj.status != OBJ_FREE) { + enemyCount++; } } - if ((counter < 10) && (actor->timer_0C0 == 0)) { + if ((enemyCount < 10) && (this->timer_0C0 == 0)) { if (gAllRangeEventTimer < (gAllRangeSpawnEvent - 500)) { - actor->timer_0C0 = 40; + this->timer_0C0 = 40; - actor->counter_04E++; - if (actor->counter_04E >= 3) { - actor->counter_04E = 0; + this->counter_04E++; + if (this->counter_04E >= 3) { + this->counter_04E = 0; } - for (i = 0, actorPtr = &gActors[10]; i < 10; i++, actorPtr++) { - if (actorPtr->obj.status == OBJ_FREE) { - Actor_Initialize(actorPtr); - actorPtr->obj.status = OBJ_ACTIVE; - actorPtr->obj.id = OBJ_ACTOR_ALLRANGE; - actorPtr->obj.pos.x = gBosses[0].obj.pos.x; - actorPtr->obj.pos.y = gBosses[0].obj.pos.y + 20.0f; - actorPtr->obj.pos.z = gBosses[0].obj.pos.z; - actorPtr->state = 1; - actorPtr->timer_0BC = 100; - actorPtr->aiType = i + AI360_10; - actorPtr->aiIndex = -1; + for (i = 0, enemy = &gActors[AI360_ENEMY]; i < 10; i++, enemy++) { + if (enemy->obj.status == OBJ_FREE) { + Actor_Initialize(enemy); + enemy->obj.status = OBJ_ACTIVE; + enemy->obj.id = OBJ_ACTOR_ALLRANGE; + enemy->obj.pos.x = gBosses[0].obj.pos.x; + enemy->obj.pos.y = gBosses[0].obj.pos.y + 20.0f; + enemy->obj.pos.z = gBosses[0].obj.pos.z; + enemy->state = 1; + enemy->timer_0BC = 100; + enemy->aiType = i + AI360_ENEMY; + enemy->aiIndex = -1; if ((i == 3) && (Rand_ZeroOne() < 0.3f)) { - actorPtr->aiIndex = AI360_SLIPPY; + enemy->aiIndex = AI360_SLIPPY; } if ((i == 4) && (Rand_ZeroOne() < 0.3f)) { - actorPtr->aiIndex = AI360_PEPPY; + enemy->aiIndex = AI360_PEPPY; } if ((i == 5) && (Rand_ZeroOne() < 0.3f)) { - actorPtr->aiIndex = AI360_FALCO; + enemy->aiIndex = AI360_FALCO; } - actorPtr->rot_0F4.x = 3.0f; - actorPtr->rot_0F4.y = D_i4_8019EDE0[actor->counter_04E]; - actorPtr->health = 24; - actorPtr->drawShadow = actorPtr->iwork[11] = 1; - actorPtr->itemDrop = DROP_SILVER_RING_50p; - Object_SetInfo(&actorPtr->info, actorPtr->obj.id); - AUDIO_PLAY_SFX(NA_SE_EN_ENGINE_01, actorPtr->sfxSource, 4); + enemy->rot_0F4.x = 3.0f; + enemy->rot_0F4.y = sEnemySpawnAngle[this->counter_04E]; + enemy->health = 24; + enemy->drawShadow = enemy->iwork[11] = 1; + enemy->itemDrop = DROP_SILVER_RING_50p; + Object_SetInfo(&enemy->info, enemy->obj.id); + AUDIO_PLAY_SFX(NA_SE_EN_ENGINE_01, enemy->sfxSource, 4); break; } } } } - ActorAllRange_UpdateStarWolfEvents(actor); + ActorAllRange_UpdateStarWolfEvents(this); } -f32 D_8019EDEC[] = { 0.0f, 700.0f, 12000.0f }; +void Fortuna_SetupStarWolfFlee(ActorAllRange* this, f32 xPos, f32 yPos, f32 zPos, f32 yRot) { + s32 health = this->health; -void Fortuna_80187884(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 arg4) { - s32 health = actor->health; - PRINTF("Enm->work[0]=%d\n"); - PRINTF("tim %d\n"); - - Actor_Initialize(actor); - actor->health = health; - actor->obj.status = OBJ_ACTIVE; - actor->obj.pos.x = xPos; - actor->obj.pos.y = yPos; - actor->obj.pos.z = zPos; - actor->obj.id = OBJ_ACTOR_ALLRANGE; - actor->aiType = AI360_WOLF; - actor->drawShadow = true; - actor->state = 0; - actor->timer_0BC = 10000; - actor->rot_0F4.y = arg4; - actor->iwork[11] = 1; - actor->rot_0F4.x = 0.0f; - Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(NA_SE_EN_WOLF_ENGINE, actor->sfxSource, 4); + Actor_Initialize(this); + this->health = health; + this->obj.status = OBJ_ACTIVE; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + this->obj.id = OBJ_ACTOR_ALLRANGE; + this->aiType = AI360_WOLF; + this->drawShadow = true; + this->state = 0; + this->timer_0BC = 10000; + this->rot_0F4.y = yRot; + this->iwork[11] = 1; + this->rot_0F4.x = 0.0f; + Object_SetInfo(&this->info, this->obj.id); + AUDIO_PLAY_SFX(NA_SE_EN_WOLF_ENGINE, this->sfxSource, 4); } -Vec3f D_i4_8019EDF8[] = { { -300.0f, 1000.0f, 13000.0f }, { 300.0f, 700.0f, 14000.0f }, { 1000.0f, 300.0f, 0.0f } }; -Vec3f D_i4_8019EE1C[] = { { -1000.0f, 300.0f, 0 }, { 0.0f, 500.0f, 0 } }; +Vec3f sCsTeamInitialPos[] = { + { 0.0f, 700.0f, 12000.0f }, + { -300.0f, 1000.0f, 13000.0f }, + { 300.0f, 700.0f, 14000.0f }, +}; +Vec3f sTeamInitialPos[] = { + { 1000.0f, 300.0f, 0.0f }, + { -1000.0f, 300.0f, 0 }, + { 0.0f, 500.0f, 0 }, +}; -void Fortuna_UpdateEvents(Actor* actor) { +void Fortuna_UpdateEvents(ActorEvent* this) { s32 i; Player* player = &gPlayer[0]; - Actor* actorPtr; - Actor* actor0 = &gActors[0]; - Actor* actor1 = &gActors[1]; - Actor* actor2 = &gActors[2]; - Actor* actor3 = &gActors[3]; - Actor* actor4 = &gActors[4]; - Actor* actor19 = &gActors[19]; - s32 pad[2]; + ActorAllRange* team; + ActorAllRange* falco = &gActors[AI360_FALCO]; + ActorAllRange* slippy = &gActors[AI360_SLIPPY]; + ActorAllRange* peppy = &gActors[AI360_PEPPY]; + ActorAllRange* wolf = &gActors[AI360_WOLF]; + ActorAllRange* greatFox = &gActors[19]; + s32 pad2[3]; + + PRINTF("Enm->work[0]=%d\n", this->iwork[0]); + PRINTF("tim %d\n", gAllRangeEventTimer); if ((player->state_1C8 == PLAYERSTATE_1C8_DOWN) || (player->state_1C8 == PLAYERSTATE_1C8_NEXT)) { gAllRangeEventTimer = 20000; @@ -170,11 +177,11 @@ void Fortuna_UpdateEvents(Actor* actor) { } if (gAllRangeEventTimer == 9206) { - gShowAllRangeCountdown = 0; - actor->state = 5; + gShowAllRangeCountdown = false; + this->state = 5; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_STANDBY; - actor->iwork[0] = 0; - actor->fwork[0] = 0.0f; + this->iwork[0] = 0; + this->fwork[0] = 0.0f; AllRange_ClearRadio(); for (i = 4; i < 8; i++) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); @@ -188,8 +195,8 @@ void Fortuna_UpdateEvents(Actor* actor) { if (gAllRangeEventTimer == 10100) { gShowAllRangeCountdown = 0; - actor->iwork[0] = 0; - actor->state = 6; + this->iwork[0] = 0; + this->state = 6; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].csState = 0; gPlayer[0].unk_000 = 0.0f; @@ -216,51 +223,56 @@ void Fortuna_UpdateEvents(Actor* actor) { } } - switch (actor->state) { + switch (this->state) { case 0: - gAllRangeSpawnEvent = 2880; + gAllRangeSpawnEvent = TIME_IN_SECONDS(96); + for (i = 0; i < 6; i++) { - gSavedStarWolfTeamAlive[i] = 1; - gStarWolfTeamAlive[i] = 1; + gSavedStarWolfTeamAlive[i] = true; + gStarWolfTeamAlive[i] = true; } + gAllRangeEventTimer = 0; gStarWolfMsgTimer = 0; + if (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) { - actor->state = 2; + this->state = 2; player->pos.x = 0.0f; player->pos.z = 8000.0f; player->pos.y = 670.0f; + gAllRangeEventTimer = 200; if (gAllRangeCheckpoint != 0) { gAllRangeEventTimer = gAllRangeSpawnEvent - 1; gHitCount = gSavedHitCount; } } else { - actor->state = 1; + this->state = 1; player->pos.x = 0.0f; player->pos.z = 15000.0f; player->pos.y = 670.0f; player->yRot_114 = 0.0f; - for (actorPtr = &gActors[1], i = 0; i < 3; i++, actorPtr++) { - actorPtr->obj.pos.x = D_i4_8019EDF8[i - 1].x; - actorPtr->obj.pos.y = D_i4_8019EDF8[i - 1].y; - actorPtr->obj.pos.z = D_i4_8019EDF8[i - 1].z; + for (team = &gActors[AI360_FALCO], i = AI360_FALCO; i <= AI360_PEPPY; i++, team++) { + team->obj.pos.x = sCsTeamInitialPos[i - 1].x; + team->obj.pos.y = sCsTeamInitialPos[i - 1].y; + team->obj.pos.z = sCsTeamInitialPos[i - 1].z; } } - Camera_UpdateArwing360(player, 1); + Camera_UpdateArwing360(player, true); break; case 1: - for (actorPtr = actor0 + 1, i = 0; i < 3; i++, actorPtr++) { - actorPtr->fwork[4] = D_i4_8019EE1C[i - 1].x; - actorPtr->fwork[5] = D_i4_8019EE1C[i - 1].y; - actorPtr->fwork[6] = D_i4_8019EE1C[i - 1].z; - actorPtr->state = 3; - actorPtr->timer_0BC = 3; + for (team = &gActors[AI360_FALCO], i = AI360_FALCO; i <= AI360_PEPPY; i++, team++) { + team->fwork[4] = sTeamInitialPos[i - 1].x; + team->fwork[5] = sTeamInitialPos[i - 1].y; + team->fwork[6] = sTeamInitialPos[i - 1].z; + team->state = 3; + team->timer_0BC = 3; + if (gCsFrameCount == 264) { - actorPtr->state = 2; - actor->state = 2; + team->state = 2; + this->state = 2; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_014 = 0.0001f; AUDIO_PLAY_BGM(gBgmSeqId); @@ -270,17 +282,19 @@ void Fortuna_UpdateEvents(Actor* actor) { break; case 2: - Fortuna_801875F0(actor); + Fortuna_SpawnEnemies(this); break; case 3: - player->cam.eye.x += actor4->vel.x * 0.23f; - player->cam.eye.y += actor4->vel.y * 0.23f; - player->cam.eye.z += actor4->vel.z * 0.23f; - Math_SmoothStepToF(&player->cam.at.x, actor4->obj.pos.x, 1.0f, 20000.0f, 0.0f); - Math_SmoothStepToF(&player->cam.at.y, actor4->obj.pos.y, 1.0f, 20000.0f, 0.0f); - Math_SmoothStepToF(&player->cam.at.z, actor4->obj.pos.z, 1.0f, 20000.0f, 0.0f); + player->cam.eye.x += wolf->vel.x * 0.23f; + player->cam.eye.y += wolf->vel.y * 0.23f; + player->cam.eye.z += wolf->vel.z * 0.23f; + + Math_SmoothStepToF(&player->cam.at.x, wolf->obj.pos.x, 1.0f, 20000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.y, wolf->obj.pos.y, 1.0f, 20000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.z, wolf->obj.pos.z, 1.0f, 20000.0f, 0.0f); Math_SmoothStepToF(&player->camRoll, 0.0f, 1.0f, 1000.0f, 0.0f); + if (gAllRangeEventTimer == (gAllRangeSpawnEvent + 2)) { gStarWolfMsgTimer = 883; gAllRangeCheckpoint = 1; @@ -293,9 +307,9 @@ void Fortuna_UpdateEvents(Actor* actor) { } if ((gControllerPress->button & START_BUTTON) || (gAllRangeEventTimer == (gAllRangeSpawnEvent + 440))) { - actor->state = 2; + this->state = 2; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; - Camera_Update360(player, 1); + Camera_Update360(player, true); player->unk_014 = 0.0f; D_hud_80161708 = 0; } @@ -304,50 +318,53 @@ void Fortuna_UpdateEvents(Actor* actor) { case 5: gAllRangeEventTimer = 9207; - actor->iwork[0]++; - actor->fwork[0] += 10.0f; + this->iwork[0]++; + this->fwork[0] += 10.0f; player->cam.eye.x = 300.0f; player->cam.eye.y = 300.0f; player->cam.eye.z = -1000.0f; - player->cam.at.x = actor->fwork[0] + 300.0f; - player->cam.at.y = actor->fwork[0] + 500.0f; + player->cam.at.x = this->fwork[0] + 300.0f; + player->cam.at.y = this->fwork[0] + 500.0f; player->cam.at.z = -15000.0f; player->camRoll = 0.0f; - if ((actor->iwork[0] == 50) && (gStarWolfTeamAlive[0] != 0)) { + if ((this->iwork[0] == 50) && (gStarWolfTeamAlive[0] != 0)) { if (gRadioState == 0) { Radio_PlayMessage(gMsg_ID_9431, RCID_WOLF); } - Fortuna_80187884(&gActors[4], player->cam.eye.x - 200.0f, player->cam.eye.y, player->cam.eye.z, 160.0f); + Fortuna_SetupStarWolfFlee(&gActors[AI360_WOLF], player->cam.eye.x - 200.0f, player->cam.eye.y, + player->cam.eye.z, 160.0f); } - if ((actor->iwork[0] == 70) && (gStarWolfTeamAlive[1] != 0)) { + if ((this->iwork[0] == 70) && (gStarWolfTeamAlive[1] != 0)) { if (gRadioState == 0) { Radio_PlayMessage(gMsg_ID_9432, RCID_LEON); } - Fortuna_80187884(&gActors[5], player->cam.eye.x, player->cam.eye.y + 50.0f, player->cam.eye.z, 160.0f); + Fortuna_SetupStarWolfFlee(&gActors[AI360_LEON], player->cam.eye.x, player->cam.eye.y + 50.0f, + player->cam.eye.z, 160.0f); } - if ((actor->iwork[0] == 90) && (gStarWolfTeamAlive[2] != 0)) { + if ((this->iwork[0] == 90) && (gStarWolfTeamAlive[2] != 0)) { if (gRadioState == 0) { Radio_PlayMessage(gMsg_ID_9433, RCID_PIGMA); } - Fortuna_80187884(gActors + 6, player->cam.eye.x - 200.0f, player->cam.eye.y + 200.0f, player->cam.eye.z, - 160.0f); + Fortuna_SetupStarWolfFlee(&gActors[AI360_PIGMA], player->cam.eye.x - 200.0f, player->cam.eye.y + 200.0f, + player->cam.eye.z, 160.0f); } - if ((actor->iwork[0] == 110) && (gStarWolfTeamAlive[3] != 0)) { + if ((this->iwork[0] == 110) && (gStarWolfTeamAlive[3] != 0)) { if (gRadioState == 0) { Radio_PlayMessage(gMsg_ID_9434, RCID_ANDREW); } - Fortuna_80187884(gActors + 7, player->cam.eye.x - 300.0f, player->cam.eye.y, player->cam.eye.z, 160.0f); + Fortuna_SetupStarWolfFlee(&gActors[AI360_ANDREW], player->cam.eye.x - 300.0f, player->cam.eye.y, + player->cam.eye.z, 160.0f); } - if (actor->iwork[0] == 250) { - actor->state = 2; + if (this->iwork[0] == 250) { + this->state = 2; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; - Camera_Update360(player, 1); + Camera_Update360(player, true); player->unk_014 = 0.0f; D_hud_80161708 = 0; @@ -362,32 +379,32 @@ void Fortuna_UpdateEvents(Actor* actor) { break; case 6: - actor->iwork[0]++; + this->iwork[0]++; if (gMissionStatus == MISSION_COMPLETE) { - actor1->aiIndex = AI360_FOX; - actor1->state = 2; - actor2->aiIndex = AI360_FOX; - actor2->state = 2; - actor3->aiIndex = AI360_FOX; - actor3->state = 2; - if (actor->iwork[0] == 130) { + falco->aiIndex = AI360_FOX; + falco->state = 2; + slippy->aiIndex = AI360_FOX; + slippy->state = 2; + peppy->aiIndex = AI360_FOX; + peppy->state = 2; + if (this->iwork[0] == 130) { Vec3f sp50 = { 0.0f, 0.0f, -10000 }; - Actor_Initialize(actor19); + Actor_Initialize(greatFox); Matrix_Translate(gCalcMatrix, player->pos.x, player->pos.y, player->trueZpos, MTXF_NEW); Matrix_RotateY(gCalcMatrix, (player->rot.y + player->yRot_114) * M_DTOR, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, player->rot.x * M_DTOR, MTXF_APPLY); - Matrix_MultVec3f(gCalcMatrix, &sp50, &actor19->obj.pos); + Matrix_MultVec3f(gCalcMatrix, &sp50, &greatFox->obj.pos); - actor19->obj.status = OBJ_ACTIVE; - actor19->obj.id = OBJ_ACTOR_ALLRANGE; - actor19->state = 4; - actor19->rot_0F4.y = player->rot.y + player->yRot_114 + 180.0f; - actor19->rot_0F4.x = 15.0f; - actor19->aiType = AI360_GREAT_FOX; - actor19->fwork[1] = 90.0f; - actor19->fwork[0] = 90.0f; - Object_SetInfo(&actor19->info, actor19->obj.id); + greatFox->obj.status = OBJ_ACTIVE; + greatFox->obj.id = OBJ_ACTOR_ALLRANGE; + greatFox->state = 4; + greatFox->rot_0F4.y = player->rot.y + player->yRot_114 + 180.0f; + greatFox->rot_0F4.x = 15.0f; + greatFox->aiType = AI360_GREAT_FOX; + greatFox->fwork[1] = 90.0f; + greatFox->fwork[0] = 90.0f; + Object_SetInfo(&greatFox->info, greatFox->obj.id); } } gSceneSetup = 1; @@ -440,23 +457,23 @@ void Fortuna_UpdateEvents(Actor* actor) { } } -void Fortuna_SetupDebris(Actor* actor, Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32 state) { - Actor_Initialize(actor); - actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_DEBRIS; - actor->state = state; +void Fortuna_SetupDebris(ActorDebris* this, Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32 state) { + Actor_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_ACTOR_DEBRIS; + this->state = state; - actor->obj.pos = *pos; - actor->obj.rot = *rot; + this->obj.pos = *pos; + this->obj.rot = *rot; - actor->vel.x = xVel; - actor->vel.y = yVel; - actor->vel.z = zVel; + this->vel.x = xVel; + this->vel.y = yVel; + this->vel.z = zVel; - actor->scale = 2.5f; - actor->timer_0BC = RAND_INT(15.0f) + 25.0f; - actor->gravity = 0.5f; - Object_SetInfo(&actor->info, actor->obj.id); + this->scale = 2.5f; + this->timer_0BC = RAND_INT(15.0f) + 25.0f; + this->gravity = 0.5f; + Object_SetInfo(&this->info, this->obj.id); } void Fortuna_SpawnDebris(Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32 state) { @@ -470,39 +487,39 @@ void Fortuna_SpawnDebris(Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s } } -void Fortuna_80188AD0(Actor* actor) { - actor->fwork[0] += 2.0f; - if (actor->state == 2) { - actor->state = 3; - Fortuna_SpawnDebris(actor->vwork, &actor->vwork[6], RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT(10.0f) + 10.0f, +void Fortuna_Radar_Update(FoRadar* this) { + this->fwork[0] += 2.0f; + if (this->state == 2) { + this->state = 3; + Fortuna_SpawnDebris(this->vwork, &this->vwork[6], RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT(10.0f) + 10.0f, RAND_FLOAT_CENTERED(50.0f), 36); - Fortuna_SpawnDebris(&actor->vwork[1], &actor->vwork[7], RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT(10.0f) + 10.0f, + Fortuna_SpawnDebris(&this->vwork[1], &this->vwork[7], RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT(10.0f) + 10.0f, RAND_FLOAT_CENTERED(50.0f), 36); - Fortuna_SpawnDebris(&actor->vwork[2], &actor->vwork[8], RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT(10.0f) + 10.0f, + Fortuna_SpawnDebris(&this->vwork[2], &this->vwork[8], RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT(10.0f) + 10.0f, RAND_FLOAT_CENTERED(50.0f), 35); - Fortuna_SpawnDebris(&actor->vwork[3], &actor->vwork[9], RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT(10.0f) + 10.0f, + Fortuna_SpawnDebris(&this->vwork[3], &this->vwork[9], RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT(10.0f) + 10.0f, RAND_FLOAT_CENTERED(50.0f), 35); - func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y + 180.0f, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, 5.0f, 10); - actor->itemDrop = DROP_SILVER_RING; - actor->obj.pos.y += 230.0f; - Actor_Despawn(actor); - actor->obj.pos.y -= 230.0f; + func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y + 180.0f, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 5.0f, 10); + this->itemDrop = DROP_SILVER_RING; + this->obj.pos.y += 230.0f; + Actor_Despawn(this); + this->obj.pos.y -= 230.0f; } - if ((actor->dmgType != DMG_NONE) && (actor->state == 0)) { - actor->dmgType = DMG_NONE; - actor->state = 1; - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_FO_600FF64); - actor->info.targetOffset = 0.0f; - actor->lockOnTimers[TEAM_ID_FOX] = 0; - actor->info.bonus = 0; - AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, actor->sfxSource, 4); + if ((this->dmgType != DMG_NONE) && (this->state == 0)) { + this->dmgType = DMG_NONE; + this->state = 1; + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_FO_600FF64); + this->info.targetOffset = 0.0f; + this->lockOnTimers[TEAM_ID_FOX] = 0; + this->info.bonus = 0; + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, this->sfxSource, 4); } } -void Fortuna_80188DA0(s32 limbIndex, Vec3f* rot, void* ptr) { +void Fortuna_Radar_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* ptr) { Vec3f vec = { 0.0f, 0.0f, 0.0f }; - Actor* actor = (Actor*) ptr; + FoRadar* actor = (FoRadar*) ptr; if (actor->state == 1) { switch (limbIndex) { @@ -539,8 +556,8 @@ void Fortuna_80188DA0(s32 limbIndex, Vec3f* rot, void* ptr) { } } -bool Fortuna_80188F08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* ptr) { - Actor* actor = (Actor*) ptr; +bool Fortuna_Radar_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* ptr) { + FoRadar* actor = (FoRadar*) ptr; gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); @@ -570,19 +587,21 @@ bool Fortuna_80188F08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return false; } -void Fortuna_80188FE4(Actor* actor) { - Vec3f vec[20]; +void Fortuna_Radar_Draw(FoRadar* this) { + Vec3f frameTable[20]; - Animation_GetFrameData(&D_FO_6007854, 0, vec); - Animation_DrawSkeleton(3, D_FO_6007980, vec, Fortuna_80188F08, Fortuna_80188DA0, actor, gCalcMatrix); + Animation_GetFrameData(&D_FO_6007854, 0, frameTable); + Animation_DrawSkeleton(3, D_FO_6007980, frameTable, Fortuna_Radar_OverrideLimbDraw, Fortuna_Radar_PostLimbDraw, + this, gCalcMatrix); - if (actor->state == 1) { - actor->state = 2; + if (this->state == 1) { + this->state = 2; } } -void Fortuna_8018906C(void) { - Actor* actor = &gActors[50]; +// Explosion seen from space if the mission fails. +void Fortuna_CsExplosion(void) { + ActorCutscene* actor = &gActors[50]; Actor_Initialize(actor); actor->obj.status = OBJ_INIT; @@ -595,31 +614,32 @@ void Fortuna_8018906C(void) { Object_SetInfo(&actor->info, actor->obj.id); } -f32 D_i4_8019EE4C[] = { -200.0f, 200.0f, -50.0f, -2000.0f }; -f32 D_i4_8019EE5C[] = { 0.0f, 30.0f, -90.0f, 0.0f }; -f32 D_i4_8019EE6C[] = { -100.0f, -200.0f, -300.0f, 0.0f }; +f32 sLevelCompleteCsActorInitPosX[] = { -200.0f, 200.0f, -50.0f, -2000.0f }; +f32 sLevelCompleteCsActorInitPosY[] = { 0.0f, 30.0f, -90.0f, 0.0f }; +f32 sLevelCompleteCsActorInitPosZ[] = { -100.0f, -200.0f, -300.0f, 0.0f }; -void Fortuna_801890EC(Actor* actor, s32 arg1) { - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.pos.x = D_i4_8019EE4C[arg1] + gPlayer[0].pos.x; - actor->obj.pos.y = D_i4_8019EE5C[arg1] + gPlayer[0].pos.y; - actor->obj.pos.z = D_i4_8019EE6C[arg1] + gPlayer[0].trueZpos; - actor->vel.z = gPlayer[0].baseSpeed; +void Fortuna_LevelCompleteCsSpawnTeam(ActorCutscene* this, s32 actorIdx) { + Actor_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_ACTOR_CUTSCENE; - Object_SetInfo(&actor->info, actor->obj.id); + this->obj.pos.x = sLevelCompleteCsActorInitPosX[actorIdx] + gPlayer[0].pos.x; + this->obj.pos.y = sLevelCompleteCsActorInitPosY[actorIdx] + gPlayer[0].pos.y; + this->obj.pos.z = sLevelCompleteCsActorInitPosZ[actorIdx] + gPlayer[0].trueZpos; - if (arg1 < 3) { - actor->iwork[11] = 1; - AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); + this->vel.z = gPlayer[0].baseSpeed; + + Object_SetInfo(&this->info, this->obj.id); + + if (actorIdx < 3) { + this->iwork[11] = 1; + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); } else { - actor->obj.pos.z = -9500.0f; - actor->animFrame = 1; - actor->vel.z = 22.0f; - - AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); - AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, actor->sfxSource, 0); + this->obj.pos.z = -9500.0f; + this->animFrame = 1; + this->vel.z = 22.0f; + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, this->sfxSource, 0); } } @@ -627,10 +647,10 @@ void Fortuna_LevelComplete(Player* player) { s32 i; Vec3f src; Vec3f dest; - Actor* actor0 = &gActors[0]; - Actor* actor1 = &gActors[1]; - Actor* actor2 = &gActors[2]; - Actor* actor3 = &gActors[3]; + ActorCutscene* greatFox = &gActors[0]; + ActorCutscene* slippy = &gActors[1]; + ActorCutscene* peppy = &gActors[2]; + ActorCutscene* falco = &gActors[3]; s32 pad[3]; if ((player->csState < 10) && (player->csState >= 0)) { @@ -638,6 +658,7 @@ void Fortuna_LevelComplete(Player* player) { Math_SmoothStepToF(&player->zRotBank, 0.0f, 0.1f, 15.0f, 0.0f); Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f); Math_SmoothStepToAngle(&player->aerobaticPitch, 0.0f, 0.1f, 20.0f, 0.0f); + if (gMissionStatus == MISSION_COMPLETE) { if (player->pos.y < 700.0f) { Math_SmoothStepToF(&player->pos.y, 700.0f, 0.1f, 10.0f, 0.0f); @@ -645,7 +666,8 @@ void Fortuna_LevelComplete(Player* player) { } else if (player->pos.y < 500.0f) { Math_SmoothStepToF(&player->pos.y, 500.0f, 0.1f, 5.0f, 0.0f); } - Camera_Update360(player, 0); + + Camera_Update360(player, false); player->cam.eye.x += player->vel.x * 0.1f; player->cam.eye.y += player->vel.y * 0.1f; player->cam.eye.z += player->vel.z * 0.1f; @@ -728,6 +750,7 @@ void Fortuna_LevelComplete(Player* player) { Math_SmoothStepToF(&player->rot.x, 15.0f, 0.1f, 0.4f, 0.0f); Math_SmoothStepToF(&player->rot.z, -40.0f, 0.2f, 5.0f, 0.0f); Math_SmoothStepToF(&player->rot.y, -120.0f, 0.1f, 2.0f, 0.0f); + player->baseSpeed += 1.0f; if (player->baseSpeed >= 70.0f) { player->baseSpeed = 70.0f; @@ -736,6 +759,7 @@ void Fortuna_LevelComplete(Player* player) { player->contrailScale = 0.6f; } } + if (player->csTimer == 0) { player->csState = 2; player->csTimer = 1000; @@ -804,7 +828,7 @@ void Fortuna_LevelComplete(Player* player) { player->baseSpeed = 0.0f; player->yRot_114 = 0.0f; player->rot.y = 180.0f; - Fortuna_8018906C(); + Fortuna_CsExplosion(); } else { player->pos.x = 0.0f; player->rot.x = 0.0f; @@ -821,9 +845,11 @@ void Fortuna_LevelComplete(Player* player) { player->wingPosition = 1; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 100); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 100); + Audio_StartPlayerNoise(0); + if (gMissionStatus == MISSION_COMPLETE) { - Fortuna_801890EC(actor0, 3); + Fortuna_LevelCompleteCsSpawnTeam(greatFox, 3); } } break; @@ -835,20 +861,20 @@ void Fortuna_LevelComplete(Player* player) { player->cam.eye.x = 400.0f; player->cam.eye.y = 0; player->cam.eye.z = 0.0f; - player->cam.at.x = actor0->obj.pos.x; - player->cam.at.y = actor0->obj.pos.y; - player->cam.at.z = actor0->obj.pos.z; + player->cam.at.x = greatFox->obj.pos.x; + player->cam.at.y = greatFox->obj.pos.y; + player->cam.at.z = greatFox->obj.pos.z; if (gCsFrameCount == 100) { player->baseSpeed = 30.0f; if (gTeamShields[TEAM_ID_FALCO] > 0) { - Fortuna_801890EC(actor3, 0); + Fortuna_LevelCompleteCsSpawnTeam(falco, 0); } if (gTeamShields[TEAM_ID_SLIPPY] > 0) { - Fortuna_801890EC(actor1, 1); + Fortuna_LevelCompleteCsSpawnTeam(slippy, 1); } if (gTeamShields[TEAM_ID_PEPPY] > 0) { - Fortuna_801890EC(actor2, 2); + Fortuna_LevelCompleteCsSpawnTeam(peppy, 2); } } @@ -858,9 +884,9 @@ void Fortuna_LevelComplete(Player* player) { D_ctx_80177A48[1] = 0.0f; D_ctx_80177A48[2] = -400.0f; D_ctx_80177A48[3] = 0.0f; - actor3->iwork[14] = 2; - actor1->iwork[14] = 3; - actor2->iwork[14] = 4; + falco->iwork[14] = 2; + slippy->iwork[14] = 3; + peppy->iwork[14] = 4; } if (gCsFrameCount == 200) { @@ -903,10 +929,10 @@ void Fortuna_LevelComplete(Player* player) { Math_SmoothStepToF(&player->baseSpeed, 0.0f, 0.05f, 2.0f, 0); - Math_SmoothStepToF(&actor3->vel.z, 0.0f, 0.05f, 2.0f, 0); - Math_SmoothStepToF(&actor1->vel.z, 0.0f, 0.05f, 2.0f, 0); - Math_SmoothStepToF(&actor2->vel.z, 0.0f, 0.05f, 2.0f, 0); - Math_SmoothStepToF(&actor0->vel.z, 0.0f, 0.05f, 2.0f, 0); + Math_SmoothStepToF(&falco->vel.z, 0.0f, 0.05f, 2.0f, 0); + Math_SmoothStepToF(&slippy->vel.z, 0.0f, 0.05f, 2.0f, 0); + Math_SmoothStepToF(&peppy->vel.z, 0.0f, 0.05f, 2.0f, 0); + Math_SmoothStepToF(&greatFox->vel.z, 0.0f, 0.05f, 2.0f, 0); if (gCsFrameCount == 500) { Radio_PlayMessage(gMsg_ID_20010, RCID_FOX); @@ -1012,8 +1038,8 @@ void Fortuna_LevelComplete(Player* player) { player->csState = 12; player->csTimer = 1000; D_ctx_80177A48[4] = 1.0f; - actor2->vel.y = 0.1f; - actor1->vel.y = 0.1f; + peppy->vel.y = 0.1f; + slippy->vel.y = 0.1f; AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, player->sfxSource, 0); player->unk_194 = 5.0f; player->unk_190 = 5.0f; @@ -1034,56 +1060,56 @@ void Fortuna_LevelComplete(Player* player) { if (gTeamShields[TEAM_ID_FALCO] > 0) { if (player->csTimer == 980) { - AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor3->sfxSource, 0); - actor3->vel.y = 1.0f; - actor3->fwork[29] = 5.0f; + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, falco->sfxSource, 0); + falco->vel.y = 1.0f; + falco->fwork[29] = 5.0f; } if (player->csTimer < 980) { - actor3->vel.z += 1.0f; - actor3->vel.z *= 1.15f; - actor3->vel.y *= 1.19f; - actor3->iwork[11] = 2; + falco->vel.z += 1.0f; + falco->vel.z *= 1.15f; + falco->vel.y *= 1.19f; + falco->iwork[11] = 2; } } if ((gTeamShields[TEAM_ID_PEPPY] > 0) && (player->csTimer == 960)) { - AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor2->sfxSource, 0); - actor2->vel.y = 1.0f; - actor2->fwork[29] = 5.0f; + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, peppy->sfxSource, 0); + peppy->vel.y = 1.0f; + peppy->fwork[29] = 5.0f; } if (player->csTimer < 960) { - actor2->vel.z += 1.0f; - actor2->vel.z *= 1.15f; - actor2->vel.y *= 1.19f; - actor2->iwork[11] = 2; + peppy->vel.z += 1.0f; + peppy->vel.z *= 1.15f; + peppy->vel.y *= 1.19f; + peppy->iwork[11] = 2; } if (gTeamShields[TEAM_ID_SLIPPY] > 0) { if (player->csTimer == 940) { - AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor1->sfxSource, 0); - actor1->vel.y = 1.0f; - actor1->fwork[29] = 5.0f; + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, slippy->sfxSource, 0); + slippy->vel.y = 1.0f; + slippy->fwork[29] = 5.0f; } if (player->csTimer < 940) { - actor1->vel.z += 1.0f; - actor1->vel.z *= 1.15f; - actor1->vel.y *= 1.19f; - actor1->iwork[11] = 2; + slippy->vel.z += 1.0f; + slippy->vel.z *= 1.15f; + slippy->vel.y *= 1.19f; + slippy->iwork[11] = 2; } } if (player->csTimer == 910) { - actor0->vel.y = 1.0f; - actor0->obj.rot.x = -2.0f; + greatFox->vel.y = 1.0f; + greatFox->obj.rot.x = -2.0f; } if (player->csTimer < 910) { - actor0->vel.z += 1.0f; - actor0->vel.z *= 1.02f; - actor0->vel.y *= 1.06f; - actor0->obj.rot.x *= 1.03f; + greatFox->vel.z += 1.0f; + greatFox->vel.z *= 1.02f; + greatFox->vel.y *= 1.06f; + greatFox->obj.rot.x *= 1.03f; } if (gCsFrameCount == 1382) { @@ -1100,30 +1126,30 @@ void Fortuna_LevelComplete(Player* player) { case 20: if (gTeamShields[TEAM_ID_FALCO] > 0) { - Fortuna_801890EC(actor3, 0); - actor3->obj.pos.x = (player->pos.x - 100.0f) - 400.0f; - actor3->obj.pos.y = player->pos.y + 400.0f; - actor3->obj.pos.z = player->trueZpos - 150.0f; - actor3->obj.rot.z = 90.0f; + Fortuna_LevelCompleteCsSpawnTeam(falco, 0); + falco->obj.pos.x = (player->pos.x - 100.0f) - 400.0f; + falco->obj.pos.y = player->pos.y + 400.0f; + falco->obj.pos.z = player->trueZpos - 150.0f; + falco->obj.rot.z = 90.0f; } if (gTeamShields[TEAM_ID_SLIPPY] > 0) { - Fortuna_801890EC(actor1, 1); - actor1->obj.pos.x = player->pos.x + 100.0f + 400.0f; - actor1->obj.pos.y = player->pos.y + 400.0f; - actor1->obj.pos.z = player->trueZpos - 150.0f; - actor1->obj.rot.z = -90.0f; + Fortuna_LevelCompleteCsSpawnTeam(slippy, 1); + slippy->obj.pos.x = player->pos.x + 100.0f + 400.0f; + slippy->obj.pos.y = player->pos.y + 400.0f; + slippy->obj.pos.z = player->trueZpos - 150.0f; + slippy->obj.rot.z = -90.0f; } if (gTeamShields[TEAM_ID_PEPPY] > 0) { - Fortuna_801890EC(actor2, 2); - actor2->obj.pos.x = player->pos.x; - actor2->obj.pos.y = player->pos.y + 100.0f + 400.0f; - actor2->obj.pos.z = player->trueZpos - 250.0f; + Fortuna_LevelCompleteCsSpawnTeam(peppy, 2); + peppy->obj.pos.x = player->pos.x; + peppy->obj.pos.y = player->pos.y + 100.0f + 400.0f; + peppy->obj.pos.z = player->trueZpos - 250.0f; } - Fortuna_801890EC(actor0, 3); + Fortuna_LevelCompleteCsSpawnTeam(greatFox, 3); - actor0->obj.pos.z = player->pos.z + 400.0f; - actor0->vel.z = 0.0f; - actor0->info.bonus = 1; + greatFox->obj.pos.z = player->pos.z + 400.0f; + greatFox->vel.z = 0.0f; + greatFox->info.bonus = 1; gCsFrameCount = 0; player->csState = 21; player->draw = true; @@ -1149,23 +1175,23 @@ void Fortuna_LevelComplete(Player* player) { if (gCsFrameCount == 140) { player->baseSpeed = 30.0f; - actor3->vel.z = 30.0f; - actor1->vel.z = 30.0f; - actor2->vel.z = 30.0f; - actor0->vel.z = 30.0f; + falco->vel.z = 30.0f; + slippy->vel.z = 30.0f; + peppy->vel.z = 30.0f; + greatFox->vel.z = 30.0f; } if (gCsFrameCount > 140) { - Math_SmoothStepToF(&actor3->obj.rot.z, 0.0f, 0.03f, 1.2f, 0.0001f); - Math_SmoothStepToF(&actor3->obj.pos.x, -100.0f, 0.03f, 1000.0f, 0.0001f); - Math_SmoothStepToF(&actor3->obj.pos.y, 40.0f, 0.03f, 1000.0f, 0.0001f); + Math_SmoothStepToF(&falco->obj.rot.z, 0.0f, 0.03f, 1.2f, 0.0001f); + Math_SmoothStepToF(&falco->obj.pos.x, -100.0f, 0.03f, 1000.0f, 0.0001f); + Math_SmoothStepToF(&falco->obj.pos.y, 40.0f, 0.03f, 1000.0f, 0.0001f); } if (gCsFrameCount > 180) { - Math_SmoothStepToF(&actor1->obj.rot.z, 0.0f, 0.03f, 1.2f, 0.0001f); - Math_SmoothStepToF(&actor1->obj.pos.x, 100.0f, 0.03f, 1000.0f, 0.0001f); - Math_SmoothStepToF(&actor1->obj.pos.y, 40.0f, 0.03f, 1000.0f, 0.0001f); + Math_SmoothStepToF(&slippy->obj.rot.z, 0.0f, 0.03f, 1.2f, 0.0001f); + Math_SmoothStepToF(&slippy->obj.pos.x, 100.0f, 0.03f, 1000.0f, 0.0001f); + Math_SmoothStepToF(&slippy->obj.pos.y, 40.0f, 0.03f, 1000.0f, 0.0001f); } if (gCsFrameCount > 220) { - Math_SmoothStepToF(&actor2->obj.pos.y, 90.0f, 0.03f, 1000.0f, 0.0001f); + Math_SmoothStepToF(&peppy->obj.pos.y, 90.0f, 0.03f, 1000.0f, 0.0001f); } if (gCsFrameCount > 340) { Math_SmoothStepToF(&player->pos.y, -10.0f, 0.03f, 1000.0f, 0.0001f); @@ -1173,13 +1199,13 @@ void Fortuna_LevelComplete(Player* player) { if (gCsFrameCount > 530) { Radio_PlayMessage(gMsg_ID_20010, RCID_FOX); player->pos.y = -10.0f; - actor3->obj.rot.z = 0.0f; - actor3->obj.pos.x = -100.0f; - actor3->obj.pos.y = 40.0f; - actor1->obj.rot.z = 0.0f; - actor1->obj.pos.x = 100.0f; - actor1->obj.pos.y = 40.0f; - actor2->obj.pos.y = 90.0f; + falco->obj.rot.z = 0.0f; + falco->obj.pos.x = -100.0f; + falco->obj.pos.y = 40.0f; + slippy->obj.rot.z = 0.0f; + slippy->obj.pos.x = 100.0f; + slippy->obj.pos.y = 40.0f; + peppy->obj.pos.y = 90.0f; player->csState = 22; } @@ -1209,17 +1235,17 @@ void Fortuna_LevelComplete(Player* player) { case 22: if ((gCsFrameCount >= 1110) && (gCsFrameCount < 1240)) { Math_SmoothStepToF(&player->baseSpeed, 0.0f, 0.02f, 1000.0f, 0.001f); - Math_SmoothStepToF(&actor3->vel.z, 0.0f, 0.02f, 1000.0f, 0.001f); - Math_SmoothStepToF(&actor1->vel.z, 0.0f, 0.02f, 1000.0f, 0.001f); - Math_SmoothStepToF(&actor2->vel.z, 0.0f, 0.02f, 1000.0f, 0.001f); - Math_SmoothStepToF(&actor0->vel.z, 0.0f, 0.02f, 1000.0f, 0.001f); + Math_SmoothStepToF(&falco->vel.z, 0.0f, 0.02f, 1000.0f, 0.001f); + Math_SmoothStepToF(&slippy->vel.z, 0.0f, 0.02f, 1000.0f, 0.001f); + Math_SmoothStepToF(&peppy->vel.z, 0.0f, 0.02f, 1000.0f, 0.001f); + Math_SmoothStepToF(&greatFox->vel.z, 0.0f, 0.02f, 1000.0f, 0.001f); } if (gCsFrameCount == 1239) { player->baseSpeed = 0.0f; - actor3->vel.z = 0.0f; - actor1->vel.z = 0.0f; - actor2->vel.z = 0.0f; - actor0->vel.z = 0.0f; + falco->vel.z = 0.0f; + slippy->vel.z = 0.0f; + peppy->vel.z = 0.0f; + greatFox->vel.z = 0.0f; } switch (gCsFrameCount) { @@ -1271,25 +1297,25 @@ void Fortuna_LevelComplete(Player* player) { case 1240: if (gTeamShields[TEAM_ID_FALCO] > 0) { - AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor3->sfxSource, 0); - actor3->fwork[29] = 5.0f; - actor3->iwork[11] = 2; + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, falco->sfxSource, 0); + falco->fwork[29] = 5.0f; + falco->iwork[11] = 2; } break; case 1260: if (gTeamShields[TEAM_ID_SLIPPY] > 0) { - AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor1->sfxSource, 0); - actor1->fwork[29] = 5.0f; - actor1->iwork[11] = 2; + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, slippy->sfxSource, 0); + slippy->fwork[29] = 5.0f; + slippy->iwork[11] = 2; } break; case 1280: if (gTeamShields[TEAM_ID_PEPPY] > 0) { - AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor2->sfxSource, 0); - actor2->fwork[29] = 5.0f; - actor2->iwork[11] = 2; + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, peppy->sfxSource, 0); + peppy->fwork[29] = 5.0f; + peppy->iwork[11] = 2; } gShowLevelClearStatusScreen = 0; break; @@ -1376,17 +1402,17 @@ void Fortuna_LevelComplete(Player* player) { } if (gCsFrameCount >= 1240) { - Math_SmoothStepToF(&actor3->vel.z, 50.0f, 0.1f, 1000.0f, 0.001f); + Math_SmoothStepToF(&falco->vel.z, 50.0f, 0.1f, 1000.0f, 0.001f); } if (gCsFrameCount >= 1260) { - Math_SmoothStepToF(&actor1->vel.z, 50.0f, 0.1f, 1000.0f, 0.001f); + Math_SmoothStepToF(&slippy->vel.z, 50.0f, 0.1f, 1000.0f, 0.001f); } if (gCsFrameCount >= 1280) { - Math_SmoothStepToF(&actor2->vel.z, 50.0f, 0.1f, 1000.0f, 0.001f); + Math_SmoothStepToF(&peppy->vel.z, 50.0f, 0.1f, 1000.0f, 0.001f); } if (gCsFrameCount >= 1300) { Math_SmoothStepToF(&player->baseSpeed, 50.0f, 0.1f, 1000.0f, 0.001f); - Math_SmoothStepToF(&actor0->vel.z, 40.0f, 0.1f, 1000.0f, 0.001f); + Math_SmoothStepToF(&greatFox->vel.z, 40.0f, 0.1f, 1000.0f, 0.001f); } Math_SmoothStepToF(&gCsCamAtY, player->pos.y, 0.005f, 1000.0f, 0.0001f); @@ -1426,12 +1452,12 @@ void Fortuna_LevelComplete(Player* player) { player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; } -void Fortuna_8018BA2C(void) { +void Fortuna_LoadLevelObjects(void) { s32 i; Actor* actor; Sprite* sprite; Scenery360* scenery360; - Boss* boss = &gBosses[0]; + BossFO* boss = &gBosses[0]; gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]); @@ -1483,6 +1509,7 @@ void Fortuna_8018BA2C(void) { sprite++; } } + Boss_Initialize(boss); boss->obj.status = OBJ_INIT; boss->obj.pos.x = 0.0f; diff --git a/src/overlays/ovl_i4/fox_ka.c b/src/overlays/ovl_i4/fox_ka.c index 39a46533..c2864824 100644 --- a/src/overlays/ovl_i4/fox_ka.c +++ b/src/overlays/ovl_i4/fox_ka.c @@ -18,40 +18,40 @@ u8 D_i4_8019F198[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; s32 sEnemySpawnTargets[] = { -1, - AI360_10 + 1, + AI360_ENEMY + 1, -1, - AI360_10 + 3, + AI360_ENEMY + 3, -1, - AI360_10 + 5, + AI360_ENEMY + 5, -1, - AI360_10 + 7, + AI360_ENEMY + 7, -1, - AI360_10 + 9, - AI360_10, - AI360_10 + 1, - AI360_10 + 2, - AI360_10 + 3, - AI360_10 + 4, - AI360_10 + 5, - AI360_10 + 6, - AI360_10 + 7, - AI360_10 + 8, - AI360_10 + 9, - AI360_10, - AI360_10 + 1, - AI360_10 + 2, - AI360_10 + 3, - AI360_10 + 4, - AI360_10 + 5, - AI360_10 + 6, - AI360_10 + 7, - AI360_10 + 8, - AI360_10 + 9, - AI360_10, - AI360_10 + 1, - AI360_10 + 2, - AI360_10 + 3, - AI360_10 + 4, + AI360_ENEMY + 9, + AI360_ENEMY, + AI360_ENEMY + 1, + AI360_ENEMY + 2, + AI360_ENEMY + 3, + AI360_ENEMY + 4, + AI360_ENEMY + 5, + AI360_ENEMY + 6, + AI360_ENEMY + 7, + AI360_ENEMY + 8, + AI360_ENEMY + 9, + AI360_ENEMY, + AI360_ENEMY + 1, + AI360_ENEMY + 2, + AI360_ENEMY + 3, + AI360_ENEMY + 4, + AI360_ENEMY + 5, + AI360_ENEMY + 6, + AI360_ENEMY + 7, + AI360_ENEMY + 8, + AI360_ENEMY + 9, + AI360_ENEMY, + AI360_ENEMY + 1, + AI360_ENEMY + 2, + AI360_ENEMY + 3, + AI360_ENEMY + 4, AI360_SLIPPY, AI360_SLIPPY, 4, @@ -495,7 +495,7 @@ void Katina_LevelStart(Player* player) { func_effect_800794CC(gActors[5].obj.pos.x, gActors[5].obj.pos.y, gActors[5].obj.pos.z, 1.0f); } - func_effect_8007A6F0(&gActors[5].obj.pos, NA_SE_EN_EXPLOSION_M); + Effect_SpawnTimedSfxAtPos(&gActors[5].obj.pos, NA_SE_EN_EXPLOSION_M); break; case 47: @@ -569,7 +569,7 @@ void Katina_BaseUpdate(Frontlinebase* this) { } // Kill all active enemy and ally actors - for (actor = &gActors[AI360_10], i = 10; i < ARRAY_COUNT(gActors); i++, actor++) { + for (actor = &gActors[AI360_ENEMY], i = 10; i < ARRAY_COUNT(gActors); i++, actor++) { if (actor->obj.status == OBJ_ACTIVE) { actor->obj.status = OBJ_DYING; actor->timer_0BC = 30; @@ -638,7 +638,7 @@ void Katina_Hatch_Destroy(Saucerer* this, s32 hatchIdx) { pos.y = this->obj.pos.y + (this->vwork[hatchIdx + 1].y * 1.3f); pos.z = this->obj.pos.z + (this->vwork[hatchIdx + 1].z * 1.3f); - func_effect_8007A6F0(&pos, NA_SE_EN_EXPLOSION_M); + Effect_SpawnTimedSfxAtPos(&pos, NA_SE_EN_EXPLOSION_M); this->swork[BOSS_HATCH_DESTROY_COUNT]++; @@ -676,7 +676,7 @@ void Katina_BossHandleDamage(Saucerer* this) { sfxSource.y = (this->vwork[1 + this->dmgPart].y * 1.3f) + this->obj.pos.y; sfxSource.z = (this->vwork[1 + this->dmgPart].z * 1.3f) + this->obj.pos.z; - func_effect_8007A6F0(&sfxSource, NA_SE_OB_DAMAGE_M); + Effect_SpawnTimedSfxAtPos(&sfxSource, NA_SE_OB_DAMAGE_M); if (this->swork[10 + this->dmgPart] <= 0) { this->swork[10 + this->dmgPart] = 0; @@ -694,9 +694,9 @@ void Katina_BossHandleDamage(Saucerer* this) { this->swork[BOSS_CORE_HP] -= this->damage; if (this->swork[BOSS_CORE_HP] < 100) { - func_effect_8007A6F0(&this->obj.pos, NA_SE_EN_KNOCK_DOWN); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_KNOCK_DOWN); } else { - func_effect_8007A6F0(&this->obj.pos, NA_SE_OB_DAMAGE_M); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_OB_DAMAGE_M); } if (this->swork[BOSS_CORE_HP] <= 0) { @@ -791,7 +791,7 @@ void Katina_BossSpawnEnemies(Saucerer* this, Vec3f* pos, f32 arg2) { actor->rot_0F4.y = arg2; actor->rot_0F4.x = -30.0f; - actor->aiType = i + AI360_10; + actor->aiType = i + AI360_ENEMY; actor->animFrame = D_i4_8019F198[i - 10]; actor->aiIndex = sEnemySpawnTargets[i - 10]; @@ -1045,7 +1045,7 @@ void Katina_BossUpdate(Saucerer* this) { if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ACTIVE; - Camera_Update360(&gPlayer[0], 1); + Camera_Update360(&gPlayer[0], true); } gPlayer[0].unk_014 = 0.0f; @@ -2170,7 +2170,7 @@ void Katina_801981F8(Actor* this) { } // Spawn actors 10 to 20 as Cornerian Fighters, 20 to 29 as enemies. - for (i = 0, actor = &gActors[AI360_10]; i < 20; i++, actor++) { + for (i = 0, actor = &gActors[AI360_ENEMY]; i < 20; i++, actor++) { if (actor->obj.status == OBJ_FREE) { Actor_Initialize(actor); @@ -2189,7 +2189,7 @@ void Katina_801981F8(Actor* this) { actor->rot_0F4.y = this->counter_04E * 18.0f; actor->state = 1; - actor->aiType = i + AI360_10; + actor->aiType = i + AI360_ENEMY; actor->aiIndex = D_i4_8019F444[i]; actor->rot_0F4.x = 3.0f; actor->health = 24; @@ -2233,7 +2233,7 @@ void Katina_BillFighterInit(void) { actor->obj.pos.y = 1000.0f; actor->state = 1; actor->aiType = AI360_BILL; - actor->aiIndex = AI360_10 + 17; + actor->aiIndex = AI360_ENEMY + 17; actor->animFrame = 2; actor->health = 1000; actor->iwork[KA_ACTOR_IWORK_11] = 1; @@ -2425,7 +2425,7 @@ void Katina_EnemyUpdate(ActorAllRange* this) { if (this->aiIndex <= -1) { this->state = 3; } else { - if (this->aiType >= AI360_10) { + if (this->aiType >= AI360_ENEMY) { xPos = SIN_DEG((this->index * 45) + gGameFrameCount) * 200.0f; yPos = COS_DEG((this->index * 45) + (gGameFrameCount * 2)) * 200.0f; zPos = SIN_DEG((this->index * 45) + gGameFrameCount) * 200.0f; diff --git a/src/overlays/ovl_i4/fox_sz.c b/src/overlays/ovl_i4/fox_sz.c index e1844221..5eb40225 100644 --- a/src/overlays/ovl_i4/fox_sz.c +++ b/src/overlays/ovl_i4/fox_sz.c @@ -7,59 +7,78 @@ #include "global.h" #include "assets/ast_sector_z.h" -s32 D_i4_801A0560; -s32 D_i4_801A0564; +#define MISSILE_TARGET_X (4) +#define MISSILE_TARGET_Y (5) +#define MISSILE_TARGET_Z (6) -Vec3f D_i4_8019F4C0[] = { +typedef enum SzActors { + /* 0 */ SZ_GREAT_FOX, + /* 10 */ SZ_MISSILE_CENTER = AI360_ENEMY, + /* 11 */ SZ_MISSILE_LEFT, + /* 12 */ SZ_MISSILE_RIGHT, + /* 13 */ SZ_ESCORT_1, + /* 14 */ SZ_ESCORT_2, + /* 15 */ SZ_ESCORT_3, + /* 16 */ SZ_ESCORT_4, +} SzActors; + +s32 sMissileDestroyCount; +bool sKattEnabled; + +Vec3f sMissileWaveInitPos[] = { { 0.0f, 0.0f, 35000.0f }, { -2000.0f, 0.0f, 35000.0f }, { 2000.0f, 0.0f, 35000.0f }, }; -Vec3f D_i4_8019F4E4[] = { + +// Relative to the missile +Vec3f sMissileEscortOffsetPos[] = { { -700.0f, -200.0f, 200.0f }, { 500.0f, 200.0f, -300.0f }, { 300.0f, -300.0f, -200.0f }, { 200.0f, 400.0f, 500.0f }, }; -void SectorZ_80199900(Actor* actor, s32 arg1) { +void SectorZ_MissileExplode(ActorAllRange* this, bool shotDown) { s32 i; gScreenFlashTimer = 8; - Object_Kill(&actor->obj, actor->sfxSource); - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_MS_EXPLOSION_S); + Object_Kill(&this->obj, this->sfxSource); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_MS_EXPLOSION_S); for (i = 0; i < 20; i++) { - func_effect_800794CC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 1.0f); - func_effect_80079618(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 1.0f); + func_effect_800794CC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1.0f); + func_effect_80079618(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1.0f); } - func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, 20.0f, 30); - func_effect_8007B344(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 20.0f, 5); + func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 20.0f, 30); + func_effect_8007B344(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 20.0f, 5); - if (arg1 != 0) { - D_i4_801A0560++; - if ((D_i4_801A0560 >= 6) && + if (shotDown) { + sMissileDestroyCount++; + if ((sMissileDestroyCount >= 6) && ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN))) { gCsFrameCount = 0; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].csState = 1000; - gActors[0].state = 6; + gActors[SZ_GREAT_FOX].state = 6; gPlayer[0].csTimer = 30; - AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, gActors[0].sfxSource, 0); - AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, gActors[0].sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, gActors[SZ_GREAT_FOX].sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, gActors[SZ_GREAT_FOX].sfxSource, 0); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); } - if ((D_i4_801A0560 == 3) && (gLeveLClearStatus[LEVEL_ZONESS] != 0)) { + // Check for Katt's appearance + if ((sMissileDestroyCount == 3) && (gLeveLClearStatus[LEVEL_ZONESS] != 0)) { gAllRangeSpawnEvent = gAllRangeEventTimer + 110; } } } -void SectorZ_80199B18(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale) { +void SectorZ_FireSmokeEffectSetup(EffectFireSmoke* effect, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, + f32 scale) { Effect_Initialize(effect); effect->obj.status = OBJ_INIT; effect->obj.id = OBJ_EFFECT_FIRE_SMOKE; @@ -84,23 +103,24 @@ void SectorZ_80199B18(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f3 effect->unk_46 = 2; } -void SectorZ_80199BDC(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale) { +void SectorZ_FireSmokeEffectSpawn(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale) { s32 i; for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == 0) { - SectorZ_80199B18(&gEffects[i], xPos, yPos, zPos, xVel, yVel, zVel, scale); + SectorZ_FireSmokeEffectSetup(&gEffects[i], xPos, yPos, zPos, xVel, yVel, zVel, scale); break; } } } -void SectorZ_Missile_Update(Actor* this) { - f32 sp2C; - f32 sp28; - f32 sp24; - f32 sp20; - f32 sp1C; +void SectorZ_Missile_Update(ActorAllRange* this) { + // clang-format off + f32 x; + f32 y; + f32 z; + f32 xPitch; + f32 yPitch; this->iwork[9]++; @@ -120,132 +140,141 @@ void SectorZ_Missile_Update(Actor* this) { break; } - sp2C = gBosses[0].obj.pos.x - this->obj.pos.x; - - if (0) {} //! FAKE - - sp24 = gBosses[0].obj.pos.z - this->obj.pos.z; - - SIN_DEG(gGameFrameCount); // Leftover from a test or commented out code? - - if (sp2C) {} //! FAKE - if (sp24) {} //! FAKE + /* Leftover from a test or commented out code? */ + /* =========================================== */ + x = gBosses[SZ_GREAT_FOX].obj.pos.x - this->obj.pos.x; + y = gBosses[SZ_GREAT_FOX].obj.pos.y - this->obj.pos.y; // Optimized out? + z = gBosses[SZ_GREAT_FOX].obj.pos.z - this->obj.pos.z; + SIN_DEG(gGameFrameCount); + if (x && z) {} //! FAKE + /* =========================================== */ if (this->aiType < 100) { - if (sp24) {} //! FAKE - sp2C = fabsf(this->fwork[4] - this->obj.pos.x); //! FAKE - sp20 = SIN_DEG((this->index * 45) + gGameFrameCount) * 5000.0f; - sp1C = COS_DEG((this->index * 45) + (gGameFrameCount * 2)) * 5000.0f; + if (x && z) {} //! FAKE + z = fabsf(this->fwork[6] - this->obj.pos.z); //! FAKE + + // Escorts wooble movement + xPitch = SIN_DEG((this->index * 45) + gGameFrameCount) * 5000.0f; + yPitch = COS_DEG((this->index * 45) + (gGameFrameCount * 2)) * 5000.0f; } else { - sp20 = sp1C = 0.0f; + // For missile + xPitch = yPitch = 0.0f; } - this->fwork[4] = gBosses->obj.pos.x + sp20 + 400.0f; - this->fwork[5] = gBosses->obj.pos.y + sp1C + 100.0f; - this->fwork[6] = gBosses->obj.pos.z; + this->fwork[MISSILE_TARGET_X] = gBosses[SZ_GREAT_FOX].obj.pos.x + xPitch + 400.0f; + this->fwork[MISSILE_TARGET_Y] = gBosses[SZ_GREAT_FOX].obj.pos.y + yPitch + 100.0f; + this->fwork[MISSILE_TARGET_Z] = gBosses[SZ_GREAT_FOX].obj.pos.z; + this->fwork[3] = 1.4f; - if (((fabsf(this->fwork[4] - this->obj.pos.x) < 800.0f) && (fabsf(this->fwork[5] - this->obj.pos.y) < 800.0f)) && - (fabsf(this->fwork[6] - this->obj.pos.z) < 800.0f)) { - SectorZ_80199900(this, 0); + // Missile hit check + if ((fabsf(this->fwork[MISSILE_TARGET_X] - this->obj.pos.x) < 800.0f) && + (fabsf(this->fwork[MISSILE_TARGET_Y] - this->obj.pos.y) < 800.0f) && + (fabsf(this->fwork[MISSILE_TARGET_Z] - this->obj.pos.z) < 800.0f)) { + SectorZ_MissileExplode(this, false); gCameraShake = 25; - gBosses->dmgType = DMG_UNK_100; + gBosses[SZ_GREAT_FOX].dmgType = DMG_MISSILE; if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].csState = 0; - gActors->state = -31072; + gActors[SZ_GREAT_FOX].state = -31072; return; } } - if (((fabsf(this->fwork[6] - this->obj.pos.z) < 2000.0f) && + // Level complete trigger check + if (((fabsf(this->fwork[MISSILE_TARGET_Z] - this->obj.pos.z) < 2000.0f) && (((gPlayer[0].cam.eye.z < 0.0f) || (D_edisplay_801615D0.y < 0.0f)) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_GFOX_REPAIR))) && (((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_GFOX_REPAIR)) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN))) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].csState = 100; - gActors->state = -31072; + gActors[SZ_GREAT_FOX].state = -31072; } + // clang-format on } -void SectorZ_80199FCC(Actor* actor, s32 arg1) { - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_ALLRANGE; - actor->aiType = AI360_MISSILE; +void SectorZ_SpawnMissile(ActorAllRange* this, s32 missileWaveIdx) { + Actor_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_ACTOR_ALLRANGE; + this->aiType = AI360_MISSILE; - actor->obj.pos.x = D_i4_8019F4C0[arg1].x; - actor->obj.pos.y = D_i4_8019F4C0[arg1].y; - actor->obj.pos.z = D_i4_8019F4C0[arg1].z; + this->obj.pos.x = sMissileWaveInitPos[missileWaveIdx].x; + this->obj.pos.y = sMissileWaveInitPos[missileWaveIdx].y; + this->obj.pos.z = sMissileWaveInitPos[missileWaveIdx].z; - actor->state = 5; - actor->rot_0F4.y = 180.0f; + this->state = 5; + this->rot_0F4.y = 180.0f; - Object_SetInfo(&actor->info, actor->obj.id); + Object_SetInfo(&this->info, this->obj.id); - actor->health = 250; - actor->info.drawType = 2; - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SZ_6009230); - actor->fwork[1] = 25.0f; - actor->fwork[29] = 2.0f; + this->health = 250; + this->info.drawType = 2; + this->info.hitbox = SEGMENTED_TO_VIRTUAL(aSZMissileHitbox); + this->fwork[1] = 25.0f; + this->fwork[29] = 2.0f; - AUDIO_PLAY_SFX(NA_SE_EN_PUNCH_ENGINE, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_PUNCH_ENGINE, this->sfxSource, 4); } -void SectorZ_8019A0F8(Actor* actor, s32 arg1) { - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_ALLRANGE; - actor->aiType = arg1 + AI360_10 + 3; +// Enemies that follow the missile +void SectorZ_SpawnMissileEscort(ActorAllRange* this, s32 enemyIndex) { + Actor_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_ACTOR_ALLRANGE; + this->aiType = enemyIndex + AI360_ENEMY + 3; - actor->obj.pos.x = gActors[10].obj.pos.x + D_i4_8019F4E4[arg1].x; - actor->obj.pos.y = gActors[10].obj.pos.y + D_i4_8019F4E4[arg1].y; - actor->obj.pos.z = gActors[10].obj.pos.z + D_i4_8019F4E4[arg1].z; + this->obj.pos.x = gActors[SZ_MISSILE_CENTER].obj.pos.x + sMissileEscortOffsetPos[enemyIndex].x; + this->obj.pos.y = gActors[SZ_MISSILE_CENTER].obj.pos.y + sMissileEscortOffsetPos[enemyIndex].y; + this->obj.pos.z = gActors[SZ_MISSILE_CENTER].obj.pos.z + sMissileEscortOffsetPos[enemyIndex].z; - actor->state = 5; - actor->rot_0F4.y = 180.0f; + this->state = 5; + this->rot_0F4.y = 180.0f; - Object_SetInfo(&actor->info, actor->obj.id); + Object_SetInfo(&this->info, this->obj.id); - actor->fwork[1] = gActors[10].fwork[1]; - actor->iwork[11] = 1; + this->fwork[1] = gActors[SZ_MISSILE_CENTER].fwork[1]; + this->iwork[11] = 1; } -void SectorZ_8019A1D0(void) { - Actor* actor = &gActors[8]; +void SectorZ_Katt_Init(void) { + ActorAllRange* katt = &gActors[AI360_KATT]; - Actor_Initialize(actor); - actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_ALLRANGE; + Actor_Initialize(katt); + katt->obj.status = OBJ_ACTIVE; + katt->obj.id = OBJ_ACTOR_ALLRANGE; - actor->obj.pos.x = 0.0f; - actor->obj.pos.y = 4500.0f; - actor->obj.pos.z = 30000.0f; + katt->obj.pos.x = 0.0f; + katt->obj.pos.y = 4500.0f; + katt->obj.pos.z = 30000.0f; - actor->aiType = AI360_KATT; - actor->aiIndex = AI360_10 + 2; - actor->health = 10000; - actor->rot_0F4.y = 180.0f; - actor->state = 0; - actor->timer_0BC = 250; - actor->rot_0F4.x = -20.0f; - actor->iwork[11] = 1; - actor->obj.rot.z = 90.0f; + katt->aiType = AI360_KATT; + katt->aiIndex = AI360_ENEMY + 2; + katt->health = 10000; + katt->rot_0F4.y = 180.0f; + katt->state = 0; + katt->timer_0BC = 250; + katt->rot_0F4.x = -20.0f; + katt->iwork[11] = 1; + katt->obj.rot.z = 90.0f; - Object_SetInfo(&actor->info, actor->obj.id); + Object_SetInfo(&katt->info, katt->obj.id); - actor->info.targetOffset = 0.0f; + katt->info.targetOffset = 0.0f; - AUDIO_PLAY_SFX(NA_SE_EN_ENGINE_01, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ENGINE_01, katt->sfxSource, 4); } -void SectorZ_8019A2F4(Actor* actor) { +void SectorZ_KattCutscene(ActorCutscene* this) { if (gAllRangeEventTimer == gAllRangeSpawnEvent) { - SectorZ_8019A1D0(); + SectorZ_Katt_Init(); gCsFrameCount = 0; - actor->timer_0BC = 400; - actor->state = 3; + + this->timer_0BC = 400; + this->state = 3; + gPlayer[0].state_1C8 = PLAYERSTATE_1C8_STANDBY; Audio_PlayFanfare(NA_BGM_KATT, 20, 10, 10); @@ -258,26 +287,27 @@ void SectorZ_8019A2F4(Actor* actor) { gPlayer[0].cam.at.x = gActors[8].obj.pos.x; gPlayer[0].cam.at.y = gActors[8].obj.pos.y; gPlayer[0].cam.at.z = gActors[8].obj.pos.z; - D_i4_801A0564 = 1; + + sKattEnabled = true; } } -void SectorZ_8019A3E8(Actor* actor) { +void SectorZ_EnemyUpdate(ActorAllRange* this) { s32 i; - Vec3f sp40; - Vec3f sp34; - Actor* actorPtr; + Vec3f src; + Vec3f dest; + ActorAllRange* actor; if (gAllRangeEventTimer >= 0) { if (gTeamShields[AI360_FALCO] > 0) { if (gActors[AI360_FALCO].iwork[2] == AI360_FOX) { - if (gActors[AI360_10].obj.status == 2) { - if (gActors[1].aiIndex != AI360_10) { + if (gActors[AI360_ENEMY].obj.status == 2) { + if (gActors[AI360_FALCO].aiIndex != AI360_ENEMY) { Radio_PlayMessage(gMsg_ID_16040, RCID_FALCO); } - gActors[AI360_FALCO].aiIndex = AI360_10; + gActors[AI360_FALCO].aiIndex = AI360_ENEMY; } else { - gActors[AI360_FALCO].aiIndex = AI360_10 + 3; + gActors[AI360_FALCO].aiIndex = AI360_ENEMY + 3; } } else { gActors[AI360_FALCO].aiIndex = -1; @@ -286,37 +316,37 @@ void SectorZ_8019A3E8(Actor* actor) { if (gTeamShields[AI360_PEPPY] > 0) { if (gActors[AI360_PEPPY].iwork[2] == AI360_FOX) { - if (gActors[AI360_10 + 2].obj.status == 2) { - if (gActors[AI360_PEPPY].aiIndex != AI360_10 + 2) { + if (gActors[AI360_ENEMY + 2].obj.status == 2) { + if (gActors[AI360_PEPPY].aiIndex != AI360_ENEMY + 2) { Radio_PlayMessage(gMsg_ID_16046, RCID_PEPPY); } - gActors[AI360_PEPPY].aiIndex = AI360_10 + 2; + gActors[AI360_PEPPY].aiIndex = AI360_ENEMY + 2; } else { - gActors[AI360_PEPPY].aiIndex = AI360_10 + 5; + gActors[AI360_PEPPY].aiIndex = AI360_ENEMY + 5; } } else { gActors[AI360_PEPPY].aiIndex = -1; } } - if (D_i4_801A0564 != 0) { - if (gActors[11].obj.status == 2) { - if (gActors[8].aiIndex != AI360_10 + 1) { + if (sKattEnabled) { + if (gActors[SZ_MISSILE_LEFT].obj.status == 2) { + if (gActors[8].aiIndex != AI360_ENEMY + 1) { Radio_PlayMessage(gMsg_ID_16135, RCID_KATT); } - gActors[AI360_KATT].aiIndex = AI360_10 + 1; + gActors[AI360_KATT].aiIndex = AI360_ENEMY + 1; } else { gActors[AI360_KATT].aiIndex = -1; } } else if (gTeamShields[AI360_SLIPPY] > 0) { if (gActors[AI360_SLIPPY].iwork[2] == AI360_FOX) { - if (gActors[11].obj.status == 2) { - if (gActors[AI360_SLIPPY].aiIndex != AI360_10 + 1) { + if (gActors[SZ_MISSILE_LEFT].obj.status == 2) { + if (gActors[AI360_SLIPPY].aiIndex != AI360_ENEMY + 1) { Radio_PlayMessage(gMsg_ID_16047, RCID_SLIPPY); } - gActors[AI360_SLIPPY].aiIndex = AI360_10 + 1; + gActors[AI360_SLIPPY].aiIndex = AI360_ENEMY + 1; } else { - gActors[AI360_SLIPPY].aiIndex = AI360_10 + 4; + gActors[AI360_SLIPPY].aiIndex = AI360_ENEMY + 4; } } else { gActors[AI360_SLIPPY].aiIndex = -1; @@ -328,56 +358,60 @@ void SectorZ_8019A3E8(Actor* actor) { Radio_PlayMessage(gMsg_ID_16030, RCID_FALCO); } - if (((actor->timer_0C0 == 0) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_STANDBY)) && + if (((this->timer_0C0 == 0) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_STANDBY)) && ((gAllRangeEventTimer < 200) || ((gAllRangeEventTimer > 4000) && (gAllRangeEventTimer < 4200)))) { - actor->timer_0C0 = 5; - actorPtr = &gActors[13]; - sp40.x = 0.0f; - sp40.y = 0.0f; - sp40.z = -17000.0f; + this->timer_0C0 = 5; - for (i = 0; i < 20; i++, actorPtr++) { - if (actorPtr->obj.status == 0) { - Actor_Initialize(actorPtr); - actorPtr->obj.status = OBJ_ACTIVE; - actorPtr->obj.id = OBJ_ACTOR_ALLRANGE; - Matrix_RotateY(gCalcMatrix, (actor->counter_04E * 18.0f) * M_DTOR, MTXF_NEW); - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp40, &sp34); + actor = &gActors[SZ_ESCORT_1]; - actorPtr->obj.pos.x = sp34.x; - actorPtr->obj.pos.y = RAND_FLOAT(1000.0f) + 300.0f; - actorPtr->obj.pos.z = sp34.z; + src.x = 0.0f; + src.y = 0.0f; + src.z = -17000.0f; - actorPtr->rot_0F4.y = actor->counter_04E * 18.0f; - actorPtr->state = 3; - actorPtr->aiType = i + AI360_10 + 3; - actorPtr->aiIndex = -1; + for (i = 0; i < 20; i++, actor++) { + if (actor->obj.status == 0) { + Actor_Initialize(actor); + + actor->obj.status = OBJ_ACTIVE; + actor->obj.id = OBJ_ACTOR_ALLRANGE; + + Matrix_RotateY(gCalcMatrix, (this->counter_04E * 18.0f) * M_DTOR, MTXF_NEW); + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + + actor->obj.pos.x = dest.x; + actor->obj.pos.y = RAND_FLOAT(1000.0f) + 300.0f; + actor->obj.pos.z = dest.z; + + actor->rot_0F4.y = this->counter_04E * 18.0f; + actor->state = 3; + actor->aiType = i + AI360_ENEMY + 3; + actor->aiIndex = -1; if (gAllRangeEventTimer >= 0) { if (((i + 13) == 23) || ((i + 13) == 24)) { - actorPtr->aiIndex = AI360_SLIPPY; - actorPtr->state = 2; + actor->aiIndex = AI360_SLIPPY; + actor->state = 2; } if ((i + 13) == 25) { - actorPtr->aiIndex = AI360_FOX; - actorPtr->state = 2; + actor->aiIndex = AI360_FOX; + actor->state = 2; } if (((i + 13) == 26) || ((i + 13) == 27)) { - actorPtr->aiIndex = AI360_PEPPY; - actorPtr->state = 2; + actor->aiIndex = AI360_PEPPY; + actor->state = 2; } if ((i + 13) == 28) { - actorPtr->aiIndex = AI360_FALCO; - actorPtr->state = 2; + actor->aiIndex = AI360_FALCO; + actor->state = 2; } } - actorPtr->health = 24; - actorPtr->iwork[11] = 1; - actorPtr->itemDrop = DROP_SILVER_RING_50p; - actorPtr->timer_0C2 = 30; - Object_SetInfo(&actorPtr->info, actorPtr->obj.id); - AUDIO_PLAY_SFX(NA_SE_EN_ENGINE_01, actorPtr->sfxSource, 4); - actor->counter_04E++; + actor->health = 24; + actor->iwork[11] = 1; + actor->itemDrop = DROP_SILVER_RING_50p; + actor->timer_0C2 = 30; + Object_SetInfo(&actor->info, actor->obj.id); + AUDIO_PLAY_SFX(NA_SE_EN_ENGINE_01, actor->sfxSource, 4); + this->counter_04E++; break; } } @@ -389,9 +423,9 @@ void SectorZ_8019A3E8(Actor* actor) { break; case 6000: - SectorZ_80199FCC(&gActors[12], 2); - SectorZ_80199FCC(&gActors[11], 1); - SectorZ_80199FCC(&gActors[10], 0); + SectorZ_SpawnMissile(&gActors[SZ_MISSILE_RIGHT], 2); + SectorZ_SpawnMissile(&gActors[SZ_MISSILE_LEFT], 1); + SectorZ_SpawnMissile(&gActors[SZ_MISSILE_CENTER], 0); D_hud_80161710 = 580; break; @@ -400,88 +434,96 @@ void SectorZ_8019A3E8(Actor* actor) { break; case 4000: - SectorZ_80199FCC(&gActors[11], 1); - SectorZ_80199FCC(&gActors[10], 0); + SectorZ_SpawnMissile(&gActors[SZ_MISSILE_LEFT], 1); + SectorZ_SpawnMissile(&gActors[SZ_MISSILE_CENTER], 0); D_hud_80161710 = 580; break; case 2000: D_hud_80161710 = 490; - SectorZ_80199FCC(&gActors[10], 0); + SectorZ_SpawnMissile(&gActors[SZ_MISSILE_CENTER], 0); - gActors[10].fwork[1] = 10.0f; - gActors[10].obj.pos.z = 25000.0f; + gActors[SZ_MISSILE_CENTER].fwork[1] = 10.0f; + gActors[SZ_MISSILE_CENTER].obj.pos.z = 25000.0f; - SectorZ_8019A0F8(&gActors[13], 0); - SectorZ_8019A0F8(&gActors[14], 1); - SectorZ_8019A0F8(&gActors[15], 2); - SectorZ_8019A0F8(&gActors[16], 3); + SectorZ_SpawnMissileEscort(&gActors[SZ_ESCORT_1], 0); + SectorZ_SpawnMissileEscort(&gActors[SZ_ESCORT_2], 1); + SectorZ_SpawnMissileEscort(&gActors[SZ_ESCORT_3], 2); + SectorZ_SpawnMissileEscort(&gActors[SZ_ESCORT_4], 3); gPlayer[0].state_1C8 = PLAYERSTATE_1C8_STANDBY; - actor->state = 10; - actor->fwork[10] = 0.0f; + + this->state = 10; + this->fwork[10] = 0.0f; + gPlayer[0].camRoll = 15.0f; - gPlayer[0].cam.eye.x = gActors[10].obj.pos.x - 25000.0f; - gPlayer[0].cam.eye.y = gActors[10].obj.pos.y; - gPlayer[0].cam.eye.z = gActors[10].obj.pos.z; + gPlayer[0].cam.eye.x = gActors[SZ_MISSILE_CENTER].obj.pos.x - 25000.0f; + gPlayer[0].cam.eye.y = gActors[SZ_MISSILE_CENTER].obj.pos.y; + gPlayer[0].cam.eye.z = gActors[SZ_MISSILE_CENTER].obj.pos.z; - gPlayer[0].cam.at.x = gActors[10].obj.pos.x; - gPlayer[0].cam.at.y = gActors[10].obj.pos.y; - gPlayer[0].cam.at.z = gActors[10].obj.pos.z; + gPlayer[0].cam.at.x = gActors[SZ_MISSILE_CENTER].obj.pos.x; + gPlayer[0].cam.at.y = gActors[SZ_MISSILE_CENTER].obj.pos.y; + gPlayer[0].cam.at.z = gActors[SZ_MISSILE_CENTER].obj.pos.z; - actor->timer_0BC = 10000; + this->timer_0BC = 10000; gFillScreenAlpha = gFillScreenAlphaTarget = 255; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; AUDIO_PLAY_BGM(NA_BGM_BOSS_SZ); break; } - ActorAllRange_UpdateEvemyEvents(actor); - SectorZ_8019A2F4(actor); + ActorAllRange_UpdateEnemyEvents(this); + SectorZ_KattCutscene(this); } -bool SectorZ_8019AA9C(Player* player) { +bool SectorZ_GFoxArwingRepair(Player* player) { + // clang-format off if (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) { - if ((player->yRot_114 > 30.0f) && (player->yRot_114 < 150.0f) && (fabsf(player->pos.x - 1270.0f) < 450.0f) && - (fabsf(player->pos.y - 265.0f) < 100.0f) && (fabsf(player->trueZpos) < 172.0f)) { + if ((player->yRot_114 > 30.0f) && + (player->yRot_114 < 150.0f) && + (fabsf(player->pos.x - 1270.0f) < 450.0f) && + (fabsf(player->pos.y - 265.0f) < 100.0f) && + (fabsf(player->trueZpos) < 172.0f)) { player->state_1C8 = PLAYERSTATE_1C8_GFOX_REPAIR; player->csState = 0; - gActors[0].state = 20; + gActors[SZ_GREAT_FOX].state = 20; gAllRangeEventTimer--; return true; } } return false; + // clang-format on } -void SectorZ_UpdateEvents(Actor* actor) { +void SectorZ_UpdateEvents(ActorAllRange* this) { s32 i; Player* player; - Actor* actor8; + ActorCutscene* katt; s32 pad; - f32 D_i4_8019F514[5] = { -200.0f, -100.0f, -0.0f, 100.0f, 200.0f }; + f32 D_i4_8019F514[5] = { -200.0f, -100.0f, -0.0f, 100.0f, 200.0f }; // unused player = &gPlayer[0]; - switch ((s32) actor->state) { + switch ((s32) this->state) { case 0: - D_i4_801A0564 = D_i4_801A0560 = 0; + sKattEnabled = sMissileDestroyCount = 0; gSzMissileR = 63.0f; gSzMissileG = 255.0f; gSzMissileB = 158.0f; gProjectFar = 30000.0f; gAllRangeEventTimer = 0; - actor->state = 2; + this->state = 2; if (gAllRangeCheckpoint != 0) { gHitCount = gSavedHitCount; } gAllRangeSpawnEvent = 1000000; case 2: - if (SectorZ_8019AA9C(player) == 0) { - SectorZ_8019A3E8(actor); - switch (actor->timer_0BE) { + if (!SectorZ_GFoxArwingRepair(player)) { + SectorZ_EnemyUpdate(this); + + switch (this->timer_0BE) { case 548: Radio_PlayMessage(gMsg_ID_16050, RCID_ROB64); break; @@ -505,21 +547,22 @@ void SectorZ_UpdateEvents(Actor* actor) { break; case 3: - actor8 = &gActors[8]; + katt = &gActors[AI360_KATT]; + gCsFrameCount++; if (gCsFrameCount == 3) { - func_effect_80078E50(actor8->obj.pos.x, actor8->obj.pos.y, actor8->obj.pos.z, 30.0f); + func_effect_80078E50(katt->obj.pos.x, katt->obj.pos.y, katt->obj.pos.z, 30.0f); } - player->cam.eye.x += actor8->vel.x * 0.23f; - player->cam.eye.y += actor8->vel.y * 0.23f; - player->cam.eye.z += actor8->vel.z * 0.23f; + player->cam.eye.x += katt->vel.x * 0.23f; + player->cam.eye.y += katt->vel.y * 0.23f; + player->cam.eye.z += katt->vel.z * 0.23f; - Math_SmoothStepToF(&player->cam.at.x, actor8->obj.pos.x, 1.0f, 20000.0f, 0); - Math_SmoothStepToF(&player->cam.at.y, actor8->obj.pos.y, 1.0f, 20000.0f, 0); - Math_SmoothStepToF(&player->cam.at.z, actor8->obj.pos.z, 1.0f, 20000.0f, 0); + Math_SmoothStepToF(&player->cam.at.x, katt->obj.pos.x, 1.0f, 20000.0f, 0); + Math_SmoothStepToF(&player->cam.at.y, katt->obj.pos.y, 1.0f, 20000.0f, 0); + Math_SmoothStepToF(&player->cam.at.z, katt->obj.pos.z, 1.0f, 20000.0f, 0); Math_SmoothStepToF(&player->camRoll, 0, 1.0f, 1000.0f, 0); - switch (actor->timer_0BC) { + switch (this->timer_0BC) { case 370: Radio_PlayMessage(gMsg_ID_16120, RCID_KATT); break; @@ -534,20 +577,20 @@ void SectorZ_UpdateEvents(Actor* actor) { break; case 260: - actor8->fwork[7] = 360.0f; - actor8->fwork[8] = 0.0f; + katt->fwork[7] = 360.0f; + katt->fwork[8] = 0.0f; break; case 230: - actor8->fwork[7] = 0.0f; - actor8->fwork[8] = 359.999f; + katt->fwork[7] = 0.0f; + katt->fwork[8] = 359.999f; break; } - if (actor->timer_0BC == 70) { - actor->state = 2; + if (this->timer_0BC == 70) { + this->state = 2; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; - Camera_Update360(player, 1); + Camera_Update360(player, true); player->unk_014 = 0.0f; } break; @@ -568,59 +611,60 @@ void SectorZ_UpdateEvents(Actor* actor) { case 10: gFillScreenAlpha = gFillScreenAlphaTarget = 0; - switch (actor->timer_0BC) { + switch (this->timer_0BC) { case 9800: - AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, gActors[10].sfxSource, 0); - gActors[10].fwork[29] = 12.0f; + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, gActors[SZ_MISSILE_CENTER].sfxSource, 0); + gActors[SZ_MISSILE_CENTER].fwork[29] = 12.0f; break; case 9780: - gActors[13].aiIndex = -1; - gActors[13].state = 3; + gActors[SZ_ESCORT_1].aiIndex = -1; + gActors[SZ_ESCORT_1].state = 3; break; case 9740: - gActors[14].aiIndex = -1; - gActors[14].state = 3; + gActors[SZ_ESCORT_2].aiIndex = -1; + gActors[SZ_ESCORT_2].state = 3; break; case 9730: - gActors[15].aiIndex = -1; - gActors[15].state = 3; + gActors[SZ_ESCORT_3].aiIndex = -1; + gActors[SZ_ESCORT_3].state = 3; break; case 9710: - gActors[16].aiIndex = -1; - gActors[16].state = 3; + gActors[SZ_ESCORT_4].aiIndex = -1; + gActors[SZ_ESCORT_4].state = 3; break; } - Math_SmoothStepToF(&player->cam.at.x, gActors[10].obj.pos.x, 0.2, 500.0f, 0.0f); - Math_SmoothStepToF(&player->cam.at.y, gActors[10].obj.pos.y, 0.2, 500.0f, 0.0f); - Math_SmoothStepToF(&player->cam.at.z, gActors[10].obj.pos.z, 0.2, 500.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.x, gActors[SZ_MISSILE_CENTER].obj.pos.x, 0.2, 500.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.y, gActors[SZ_MISSILE_CENTER].obj.pos.y, 0.2, 500.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.z, gActors[SZ_MISSILE_CENTER].obj.pos.z, 0.2, 500.0f, 0.0f); - if (actor->timer_0BC < 9800) { - Math_SmoothStepToF(&gActors[10].fwork[1], 80.0f, 0.1, 10.0f, 0); - Math_SmoothStepToF(&gActors[10].fwork[29], 3.0f, 0.1, 1.0f, 0); + if (this->timer_0BC < 9800) { + Math_SmoothStepToF(&gActors[SZ_MISSILE_CENTER].fwork[1], 80.0f, 0.1, 10.0f, 0); + Math_SmoothStepToF(&gActors[SZ_MISSILE_CENTER].fwork[29], 3.0f, 0.1, 1.0f, 0); } else { - Math_SmoothStepToF(&actor->fwork[10], 700.0f, 1, 5.0f, 0.0f); - Math_SmoothStepToF(&player->cam.eye.x, gActors[10].obj.pos.x - 300.0f, 0.07f, actor->fwork[10], 0); - Math_SmoothStepToF(&player->cam.eye.y, gActors[10].obj.pos.y, 0.07f, actor->fwork[10], 0); - Math_SmoothStepToF(&player->cam.eye.z, gActors[10].obj.pos.z + 500.0f, 0.05f, 50.0f, 0); - Math_SmoothStepToF(&gActors[10].fwork[29], 2.0f, 0.1f, 1.0f, 0); + Math_SmoothStepToF(&this->fwork[10], 700.0f, 1, 5.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.x, gActors[SZ_MISSILE_CENTER].obj.pos.x - 300.0f, 0.07f, + this->fwork[10], 0); + Math_SmoothStepToF(&player->cam.eye.y, gActors[SZ_MISSILE_CENTER].obj.pos.y, 0.07f, this->fwork[10], 0); + Math_SmoothStepToF(&player->cam.eye.z, gActors[SZ_MISSILE_CENTER].obj.pos.z + 500.0f, 0.05f, 50.0f, 0); + Math_SmoothStepToF(&gActors[SZ_MISSILE_CENTER].fwork[29], 2.0f, 0.1f, 1.0f, 0); } - if (actor->timer_0BC < 9680) { - actor->state = 2; + if (this->timer_0BC < 9680) { + this->state = 2; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; - Camera_Update360(player, 1); + Camera_Update360(player, true); player->unk_014 = 0.0f; - gActors[10].fwork[1] = 25.0f; - gActors[10].fwork[29] = 5.0f; - gActors[10].obj.pos.z = 35000.0f; - gActors[10].iwork[9] = 0; + gActors[SZ_MISSILE_CENTER].fwork[1] = 25.0f; + gActors[SZ_MISSILE_CENTER].fwork[29] = 5.0f; + gActors[SZ_MISSILE_CENTER].obj.pos.z = 35000.0f; + gActors[SZ_MISSILE_CENTER].iwork[9] = 0; gPlayer[0].camRoll = 0.0f; - actor->timer_0BE = 550; + this->timer_0BE = 550; } break; @@ -639,129 +683,136 @@ void SectorZ_UpdateEvents(Actor* actor) { } } -Vec3f D_i4_8019F528[] = { +Vec3f sInitialCsObjectPos[] = { { 1000.0f, 1000.0f, 1000.0f }, { 0.0f, -700.0f, 1500.0f }, { 2000.0f, -500.0f, 2500.0f }, { -500.0f, 500.0f, -3000.0f }, { -2000.0f, -1000.0f, -1000.0f }, { -1000.0f, 1700.0f, -1500.0f }, { 2000.0f, 2500.0f, -2500.0f }, }; -void SectorZ_8019B48C(void) { - Actor* actor = &gActors[1]; +// Objects around the great fox during the initial cutscene +void SectorZ_CsObjectInit(void) { + ActorCutscene* actor = &gActors[1]; s32 i; - for (i = 0; i < ARRAY_COUNT(D_i4_8019F528); i++, actor++) { + for (i = 0; i < ARRAY_COUNT(sInitialCsObjectPos); i++, actor++) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; actor->obj.id = OBJ_ACTOR_CUTSCENE; actor->animFrame = 25; - actor->obj.pos.x = D_i4_8019F528[i].x; - actor->obj.pos.y = D_i4_8019F528[i].y; - actor->obj.pos.z = D_i4_8019F528[i].z; + actor->obj.pos.x = sInitialCsObjectPos[i].x; + actor->obj.pos.y = sInitialCsObjectPos[i].y; + actor->obj.pos.z = sInitialCsObjectPos[i].z; actor->obj.rot.y = RAND_FLOAT(360.0f); actor->vel.x = 5.0f; Object_SetInfo(&actor->info, actor->obj.id); } } -void SectorZ_8019B568(void) { - Actor* actor = &gActors[0]; +void SectorZ_CsGreatFoxInit(void) { + ActorCutscene* greatFox = &gActors[SZ_GREAT_FOX]; - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_CUTSCENE; - - actor->obj.pos.x = 5000.0f; - actor->obj.pos.y = 0.0f; - actor->obj.pos.z = 0.0f; - - actor->obj.rot.y = 270.0f; - actor->animFrame = 1; - actor->vel.x = -20.0f; - Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); + Actor_Initialize(greatFox); + greatFox->obj.status = OBJ_INIT; + greatFox->obj.id = OBJ_ACTOR_CUTSCENE; + greatFox->obj.pos.x = 5000.0f; + greatFox->obj.pos.y = 0.0f; + greatFox->obj.pos.z = 0.0f; + greatFox->obj.rot.y = 270.0f; + greatFox->animFrame = 1; + greatFox->vel.x = -20.0f; + Object_SetInfo(&greatFox->info, greatFox->obj.id); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, greatFox->sfxSource, 0); } -Vec3f D_i4_8019F57C[] = { + +Vec3f sInitialCsEnemyPos[] = { { 150.0f, 150.0f, 50.0f }, { -150.0f, -150.0f, 50.0f }, { -150.0f, 150.0f, 50.0f }, { 150.0f, -150.0f, 50.0f } }; -f32 D_i4_8019F5AC[] = { -30.0f, 20.0f, 30.0f, -40.0f }; +f32 sInitialCsEnemyZrot[] = { -30.0f, 20.0f, 30.0f, -40.0f }; -void SectorZ_8019B630(Actor* actor, s32 index) { - Actor_Initialize(actor); - actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_CUTSCENE; +// Enemies during the initial cutscene +void SectorZ_CsEnemies(ActorCutscene* this, s32 index) { + Actor_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.pos.x = gPlayer[0].cam.eye.x + D_i4_8019F57C[index].x; - actor->obj.pos.y = gPlayer[0].cam.eye.y + D_i4_8019F57C[index].y; - actor->obj.pos.z = gPlayer[0].cam.eye.z + D_i4_8019F57C[index].z; + this->obj.pos.x = gPlayer[0].cam.eye.x + sInitialCsEnemyPos[index].x; + this->obj.pos.y = gPlayer[0].cam.eye.y + sInitialCsEnemyPos[index].y; + this->obj.pos.z = gPlayer[0].cam.eye.z + sInitialCsEnemyPos[index].z; - actor->vel.z = -30.0f; - actor->vel.y = -10.0f; + this->vel.z = -30.0f; + this->vel.y = -10.0f; - actor->obj.rot.y = 180.0f; - actor->obj.rot.x = 10.0f; - actor->obj.rot.z = D_i4_8019F5AC[index]; + this->obj.rot.y = 180.0f; + this->obj.rot.x = 10.0f; + this->obj.rot.z = sInitialCsEnemyZrot[index]; - actor->animFrame = 26; - actor->iwork[11] = 1; - Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(NA_SE_EN_ENGINE_01, actor->sfxSource, 4); + this->animFrame = 26; + this->iwork[11] = 1; + Object_SetInfo(&this->info, this->obj.id); + AUDIO_PLAY_SFX(NA_SE_EN_ENGINE_01, this->sfxSource, 4); } -Vec3f D_i4_8019F5BC[] = { +Vec3f sTeamCsOffsetPos[] = { { 200.0f, 0.0f, 0.0f }, { 200.0f, 0.0f, 0.0f }, { 200.0f, 0.0f, 0.0f }, { 200.0f, 0.0f, 0.0f } }; -void SectorZ_8019B75C(Actor* actor, s32 arg1) { - Actor* newActor = &gActors[0]; +void SectorZ_CsTeamInit(ActorCutscene* this, s32 index) { + ActorCutscene* greatFox = &gActors[SZ_GREAT_FOX]; - Actor_Initialize(actor); - actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_CUTSCENE; + Actor_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.pos.x = D_i4_8019F5BC[arg1].x + newActor->obj.pos.x; - actor->obj.pos.y = newActor->obj.pos.y - 500.0f; - actor->obj.pos.z = D_i4_8019F5BC[arg1].z + newActor->obj.pos.z; + this->obj.pos.x = greatFox->obj.pos.x + sTeamCsOffsetPos[index].x; + this->obj.pos.y = greatFox->obj.pos.y - 500.0f; + this->obj.pos.z = greatFox->obj.pos.z + sTeamCsOffsetPos[index].z; - actor->vel.x = -gArwingSpeed; - actor->obj.rot.y = 270.0f; + this->vel.x = -gArwingSpeed; + this->obj.rot.y = 270.0f; - Object_SetInfo(&actor->info, actor->obj.id); + Object_SetInfo(&this->info, this->obj.id); - AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); - AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); - actor->fwork[29] = 5.0f; + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, this->sfxSource, 0); + + this->fwork[29] = 5.0f; } -Vec3f D_i4_8019F5EC[] = { +// Relative to the player +Vec3f sTeamSetupOffsetPos[] = { { 0.0f, 20000.0f, 0.0f }, { -1000.0f, 100.0f, 500.0f }, { -1300.0f, -50.0f, 0.0f }, { -1600.0f, 50.0f, -500.0f } }; -void SectorZ_8019B888(void) { - s32 i; - Actor* actor; +void SectorZ_TeamSetup(void) { + TeamId i; + ActorAllRange* team; - for (i = 0, actor = &gActors[0]; i <= TEAM_ID_PEPPY; i++, actor++) { - if ((i <= 0) || (gTeamShields[i] > 0)) { - Actor_Initialize(actor); - actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_ALLRANGE; - Object_SetInfo(&actor->info, actor->obj.id); - if (i == 0) { - actor->aiType = AI360_EVENT_HANDLER; + for (i = TEAM_ID_FOX, team = &gActors[0]; i <= TEAM_ID_PEPPY; i++, team++) { + if ((i <= TEAM_ID_FOX) || (gTeamShields[i] > 0)) { + Actor_Initialize(team); + team->obj.status = OBJ_ACTIVE; + team->obj.id = OBJ_ACTOR_ALLRANGE; + + Object_SetInfo(&team->info, team->obj.id); + + if (i == TEAM_ID_FOX) { + team->aiType = AI360_EVENT_HANDLER; } else { - actor->obj.pos.x = gPlayer[0].pos.x + D_i4_8019F5EC[i].x; - actor->obj.pos.y = gPlayer[0].pos.y + D_i4_8019F5EC[i].y; - actor->obj.pos.z = gPlayer[0].pos.z + D_i4_8019F5EC[i].z; - actor->aiType = i; - actor->state = 2; - actor->rot_0F4.y = 270.0f; - actor->health = 255; - actor->iwork[11] = 1; - AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(gTeamHitbox); - actor->info.unk_16 = 0; - actor->info.targetOffset = 0.0f; + team->obj.pos.x = gPlayer[0].pos.x + sTeamSetupOffsetPos[i].x; + team->obj.pos.y = gPlayer[0].pos.y + sTeamSetupOffsetPos[i].y; + team->obj.pos.z = gPlayer[0].pos.z + sTeamSetupOffsetPos[i].z; + team->aiType = i; + team->state = 2; + team->rot_0F4.y = 270.0f; + team->health = 255; + team->iwork[11] = 1; + + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, team->sfxSource, 4); + + team->info.hitbox = SEGMENTED_TO_VIRTUAL(gTeamHitbox); + team->info.unk_16 = 0; + team->info.targetOffset = 0.0f; } } } @@ -770,9 +821,9 @@ void SectorZ_8019B888(void) { void SectorZ_LevelStart(Player* player) { s32 i; s32 j; - Vec3f sp74; - Vec3f sp68; - Actor* actor = gActors; + Vec3f src; + Vec3f dest; + ActorCutscene* greatFox = &gActors[SZ_GREAT_FOX]; gAllRangeEventTimer = 0; @@ -782,8 +833,8 @@ void SectorZ_LevelStart(Player* player) { player->csState++; - SectorZ_8019B568(); - SectorZ_8019B48C(); + SectorZ_CsGreatFoxInit(); + SectorZ_CsObjectInit(); gCsCamEyeX = 0.0f; gCsCamEyeY = 0.0f; @@ -808,10 +859,9 @@ void SectorZ_LevelStart(Player* player) { gCsCamEyeZ -= 7.0f; if (gCsFrameCount == 320) { - actor = &actor[0]; player->csState = 2; - actor->vel.x = -10.0f; - actor->obj.pos.x = 1000.0f; + greatFox->vel.x = -10.0f; + greatFox->obj.pos.x = 1000.0f; gCsCamEyeX = 0.0f; gCsCamEyeY = 0.0f; gCsCamEyeZ = 17000.0f; @@ -838,21 +888,21 @@ void SectorZ_LevelStart(Player* player) { player->csState++; - actor->vel.x = 0.0f; + greatFox->vel.x = 0.0f; - actor->obj.pos.z = 0.0f; - actor->obj.pos.y = 0.0f; - actor->obj.pos.x = 0.0f; + greatFox->obj.pos.z = 0.0f; + greatFox->obj.pos.y = 0.0f; + greatFox->obj.pos.x = 0.0f; player->camRoll = 0.0f; - player->cam.eye.x = gCsCamEyeX = actor->obj.pos.x - 2800.0f; - player->cam.eye.y = gCsCamEyeY = actor->obj.pos.y + 1400.0f; - player->cam.eye.z = gCsCamEyeZ = actor->obj.pos.z + 700.0f; + player->cam.eye.x = gCsCamEyeX = greatFox->obj.pos.x - 2800.0f; + player->cam.eye.y = gCsCamEyeY = greatFox->obj.pos.y + 1400.0f; + player->cam.eye.z = gCsCamEyeZ = greatFox->obj.pos.z + 700.0f; - player->cam.at.x = gCsCamAtX = actor->obj.pos.x - 1000.0f; - player->cam.at.y = gCsCamAtY = actor->obj.pos.y; - player->cam.at.z = gCsCamAtZ = actor->obj.pos.z; + player->cam.at.x = gCsCamAtX = greatFox->obj.pos.x - 1000.0f; + player->cam.at.y = gCsCamAtY = greatFox->obj.pos.y; + player->cam.at.z = gCsCamAtZ = greatFox->obj.pos.z; D_ctx_80177A48[0] = 0.0f; gFillScreenAlpha = 255; @@ -861,9 +911,9 @@ void SectorZ_LevelStart(Player* player) { Object_Kill(&gActors[i + 30].obj, gActors[i + 30].sfxSource); } - player->pos.x = actor->obj.pos.x + 200.0f; - player->pos.y = actor->obj.pos.y - 480.0f; - player->pos.z = actor->obj.pos.z; + player->pos.x = greatFox->obj.pos.x + 200.0f; + player->pos.y = greatFox->obj.pos.y - 480.0f; + player->pos.z = greatFox->obj.pos.z; AUDIO_PLAY_BGM(NA_BGM_SZ_START_DEMO); } @@ -914,8 +964,8 @@ void SectorZ_LevelStart(Player* player) { for (i = 0; i < ARRAY_COUNT(gActors); i++) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); } - SectorZ_8019EA68(); - SectorZ_8019B888(); + SectorZ_LoadLevelObjects(); + SectorZ_TeamSetup(); } if (gCsFrameCount == 820) { @@ -941,19 +991,19 @@ void SectorZ_LevelStart(Player* player) { break; case 370: - SectorZ_8019B630(&gActors[30], 0); + SectorZ_CsEnemies(&gActors[30], 0); break; case 390: - SectorZ_8019B630(&gActors[31], 1); + SectorZ_CsEnemies(&gActors[31], 1); break; case 405: - SectorZ_8019B630(&gActors[32], 2); + SectorZ_CsEnemies(&gActors[32], 2); break; case 425: - SectorZ_8019B630(&gActors[33], 3); + SectorZ_CsEnemies(&gActors[33], 3); break; case 560: @@ -962,19 +1012,19 @@ void SectorZ_LevelStart(Player* player) { case 700: if (gTeamShields[TEAM_ID_SLIPPY] > 0) { - SectorZ_8019B75C(&gActors[30], 0); + SectorZ_CsTeamInit(&gActors[30], 0); } break; case 720: if (gTeamShields[TEAM_ID_FALCO] > 0) { - SectorZ_8019B75C(&gActors[31], 1); + SectorZ_CsTeamInit(&gActors[31], 1); } break; case 740: if (gTeamShields[TEAM_ID_PEPPY] > 0) { - SectorZ_8019B75C(&gActors[32], 2); + SectorZ_CsTeamInit(&gActors[32], 2); } break; @@ -991,15 +1041,15 @@ void SectorZ_LevelStart(Player* player) { Matrix_RotateY(gCalcMatrix, (player->rot.y + player->yRot_114 + 180.0f) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -(player->rot.x * M_DTOR), MTXF_APPLY); - sp74.x = 0.0f; - sp74.y = 0.0f; - sp74.z = player->baseSpeed; + src.x = 0.0f; + src.y = 0.0f; + src.z = player->baseSpeed; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp74, &sp68); + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - player->vel.x = sp68.x; - player->vel.z = sp68.z; - player->vel.y = sp68.y; + player->vel.x = dest.x; + player->vel.z = dest.z; + player->vel.y = dest.y; player->pos.x += player->vel.x; player->pos.y += player->vel.y; @@ -1016,90 +1066,91 @@ void SectorZ_LevelStart(Player* player) { Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0); } -f32 D_i4_8019F61C[] = { -300.0f, 350.0f, -50.0f, 800.0f }; +f32 sCsTeamXpos[] = { -300.0f, 350.0f, -50.0f, 800.0f }; -f32 D_i4_8019F62C[] = { 0.0f, -30.0f, -90.0f, -550.0f }; +f32 sCsTeamYpos[] = { 0.0f, -30.0f, -90.0f, -550.0f }; -f32 D_i4_8019F63C[] = { -200.0f, -250.0f, -500.0f, 5000.0f }; +f32 sCsTeamZpos[] = { -200.0f, -250.0f, -500.0f, 5000.0f }; -void SectorZ_8019C574(Actor* actor, s32 index) { - f32 var_fv0 = 1.0f; +void SectorZ_CsLevelCompleteTeamInit(ActorCutscene* this, s32 index) { + f32 direction; + direction = 1.0f; if (!gGreatFoxIntact) { - var_fv0 = -1.0f; + direction = -1.0f; } - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_CUTSCENE; + Actor_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.pos.x = D_i4_8019F61C[index] * var_fv0; - actor->obj.pos.y = D_i4_8019F62C[index]; - actor->obj.pos.z = D_i4_8019F63C[index]; + this->obj.pos.x = sCsTeamXpos[index] * direction; + this->obj.pos.y = sCsTeamYpos[index]; + this->obj.pos.z = sCsTeamZpos[index]; - actor->fwork[0] = gPlayer[0].baseSpeed; - actor->rot_0F4.y = gPlayer[0].rot.y; + this->fwork[0] = gPlayer[0].baseSpeed; + this->rot_0F4.y = gPlayer[0].rot.y; - Object_SetInfo(&actor->info, actor->obj.id); + Object_SetInfo(&this->info, this->obj.id); if (index < 3) { - actor->iwork[11] = 1; - AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); + this->iwork[11] = 1; + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); } else { - actor->animFrame = 1; - actor->fwork[0] = 20.0f; - - AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); - AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, actor->sfxSource, 0); + this->animFrame = 1; + this->fwork[0] = 20.0f; + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, this->sfxSource, 0); } } -void SectorZ_8019C70C(void) { - Actor* actor = &gActors[8]; +void SectorZ_CsLevelCompleteKattInit(void) { + ActorCutscene* katt = &gActors[AI360_KATT]; - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_CUTSCENE; + Actor_Initialize(katt); + katt->obj.status = OBJ_INIT; + katt->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.pos.x = gBosses[0].obj.pos.x + 700.0f; - actor->obj.pos.y = gBosses[0].obj.pos.y - 1000.0f; - actor->obj.pos.z = gBosses[0].obj.pos.z - 1000.0f; + katt->obj.pos.x = gBosses[SZ_GREAT_FOX].obj.pos.x + 700.0f; + katt->obj.pos.y = gBosses[SZ_GREAT_FOX].obj.pos.y - 1000.0f; + katt->obj.pos.z = gBosses[SZ_GREAT_FOX].obj.pos.z - 1000.0f; - actor->rot_0F4.y = 180.0f; - actor->rot_0F4.x = 20.0f; + katt->rot_0F4.y = 180.0f; + katt->rot_0F4.x = 20.0f; - actor->obj.rot.x = -20.0f; - actor->obj.rot.y = 180.0f; - actor->obj.rot.y = 2.0f * actor->obj.rot.y; - actor->obj.rot.z = -actor->rot_0F4.z; + katt->obj.rot.x = -20.0f; + katt->obj.rot.y = 180.0f; + katt->obj.rot.y *= 2.0f; + katt->obj.rot.z = -katt->rot_0F4.z; - actor->fwork[0] = 30.0f; - actor->animFrame = 24; - actor->iwork[11] = 1; - actor->state = 10; - actor->timer_0BC = 130; + katt->fwork[0] = 30.0f; + katt->animFrame = 24; + katt->iwork[11] = 1; + katt->state = 10; + katt->timer_0BC = 130; - Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); + Object_SetInfo(&katt->info, katt->obj.id); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, katt->sfxSource, 4); } void SectorZ_LevelComplete(Player* player) { s32 i; Vec3f src; Vec3f dest; - Actor* actor0 = &gActors[0]; - Actor* actor1 = &gActors[1]; - Actor* actor2 = &gActors[2]; - Actor* actor3 = &gActors[3]; - Boss* boss0 = &gBosses[0]; - f32 var_fv1 = 1.0f; + ActorCutscene* greatFoxCs = &gActors[SZ_GREAT_FOX]; + ActorCutscene* falco = &gActors[1]; + ActorCutscene* peppy = &gActors[2]; + ActorCutscene* slippy = &gActors[3]; + GreatFoxSZ* greatFox = &gBosses[SZ_GREAT_FOX]; + f32 direction; PRINTF("Enm->time0 %d\n"); PRINTF("time0 %d\n"); PRINTF("Demo_Time=%d\n"); + direction = 1.0f; if (!gGreatFoxIntact) { - var_fv1 = -1.0f; + direction = -1.0f; } Math_SmoothStepToF(&player->boostSpeed, 0.0f, 0.1f, 1.5f, 0.0f); @@ -1137,13 +1188,13 @@ void SectorZ_LevelComplete(Player* player) { break; case 100: - gCsCamEyeX = boss0->obj.pos.x; - gCsCamEyeY = boss0->obj.pos.y; - gCsCamEyeZ = boss0->obj.pos.z + 4000.0f; + gCsCamEyeX = greatFox->obj.pos.x; + gCsCamEyeY = greatFox->obj.pos.y; + gCsCamEyeZ = greatFox->obj.pos.z + 4000.0f; - gCsCamAtX = boss0->obj.pos.x; - gCsCamAtY = boss0->obj.pos.y; - gCsCamAtZ = boss0->obj.pos.z; + gCsCamAtX = greatFox->obj.pos.x; + gCsCamAtY = greatFox->obj.pos.y; + gCsCamAtZ = greatFox->obj.pos.z; D_ctx_80177A48[0] = 1.0f; gProjectFar = 30000.0f; @@ -1152,7 +1203,7 @@ void SectorZ_LevelComplete(Player* player) { player->baseSpeed = 0.0f; player->camRoll = 0.0f; - if (boss0->state != 0) { + if (greatFox->state != 0) { player->csState = 0; } break; @@ -1162,9 +1213,9 @@ void SectorZ_LevelComplete(Player* player) { player->draw = false; - gCsCamEyeX = boss0->obj.pos.x; - gCsCamEyeY = boss0->obj.pos.y; - gCsCamEyeZ = boss0->obj.pos.z + 4000.0f; + gCsCamEyeX = greatFox->obj.pos.x; + gCsCamEyeY = greatFox->obj.pos.y; + gCsCamEyeZ = greatFox->obj.pos.z + 4000.0f; D_ctx_80177A48[0] = 1.0f; @@ -1182,20 +1233,20 @@ void SectorZ_LevelComplete(Player* player) { for (i = 0; i < ARRAY_COUNT(gActors); i++) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); } - AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, boss0->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, greatFox->sfxSource, 0); break; case 1: gFillScreenAlphaTarget = 0; gFillScreenAlpha = 0; - Math_SmoothStepToAngle(&boss0->rot_078.x, 20.0f, 0.03f, boss0->fwork[1], 0.0f); - Math_SmoothStepToAngle(&boss0->rot_078.y, 180.0f, 0.03f, boss0->fwork[2], 0.0f); - Math_SmoothStepToAngle(&boss0->rot_078.z, 30.0f, 0.03f, boss0->fwork[3], 0.0f); - Math_SmoothStepToF(&boss0->fwork[0], 20.0f, 0.05f, 0.3f, 0.0f); - Math_SmoothStepToF(&boss0->fwork[1], 0.07f, 1.0f, 0.07f, 0.0f); - Math_SmoothStepToF(&boss0->fwork[2], 0.5f, 1.0f, 0.05f, 0.0f); - Math_SmoothStepToF(&boss0->fwork[3], 0.7f, 1.0f, 0.7f, 0.0f); + Math_SmoothStepToAngle(&greatFox->rot_078.x, 20.0f, 0.03f, greatFox->fwork[1], 0.0f); + Math_SmoothStepToAngle(&greatFox->rot_078.y, 180.0f, 0.03f, greatFox->fwork[2], 0.0f); + Math_SmoothStepToAngle(&greatFox->rot_078.z, 30.0f, 0.03f, greatFox->fwork[3], 0.0f); + Math_SmoothStepToF(&greatFox->fwork[0], 20.0f, 0.05f, 0.3f, 0.0f); + Math_SmoothStepToF(&greatFox->fwork[1], 0.07f, 1.0f, 0.07f, 0.0f); + Math_SmoothStepToF(&greatFox->fwork[2], 0.5f, 1.0f, 0.05f, 0.0f); + Math_SmoothStepToF(&greatFox->fwork[3], 0.7f, 1.0f, 0.7f, 0.0f); if ((gCsFrameCount == 100) && gGreatFoxIntact) { AUDIO_PLAY_BGM(NA_BGM_COURSE_CLEAR); @@ -1206,13 +1257,13 @@ void SectorZ_LevelComplete(Player* player) { gMissionStatus = MISSION_ACCOMPLISHED; } - if ((gCsFrameCount == 230) && (D_i4_801A0564 != 0)) { - SectorZ_8019C70C(); + if ((gCsFrameCount == 230) && sKattEnabled) { + SectorZ_CsLevelCompleteKattInit(); } - gCsCamAtX = boss0->obj.pos.x; - gCsCamAtY = boss0->obj.pos.y + (2.0f * gCameraShakeY); - gCsCamAtZ = boss0->obj.pos.z; + gCsCamAtX = greatFox->obj.pos.x; + gCsCamAtY = greatFox->obj.pos.y + (gCameraShakeY * 2.0f); + gCsCamAtZ = greatFox->obj.pos.z; if (player->csTimer == 0) { player->csState = 2; @@ -1250,7 +1301,7 @@ void SectorZ_LevelComplete(Player* player) { player->aerobaticPitch = 0.0f; player->baseSpeed = 40.0f; - gCsCamEyeX = 0.0f - (200.0f * var_fv1); + gCsCamEyeX = 0.0f - (200.0f * direction); gCsCamEyeY = player->pos.y; gCsCamEyeZ = player->pos.z + 12000.0f; gCsCamAtX = player->pos.x; @@ -1258,15 +1309,15 @@ void SectorZ_LevelComplete(Player* player) { gCsCamAtZ = player->pos.z; if (gTeamShields[TEAM_ID_FALCO] > 0) { - SectorZ_8019C574(actor1, 0); + SectorZ_CsLevelCompleteTeamInit(falco, 0); } if (gTeamShields[TEAM_ID_SLIPPY] > 0) { - SectorZ_8019C574(actor3, 1); + SectorZ_CsLevelCompleteTeamInit(slippy, 1); } if (gTeamShields[TEAM_ID_PEPPY] > 0) { - SectorZ_8019C574(actor2, 2); + SectorZ_CsLevelCompleteTeamInit(peppy, 2); } - SectorZ_8019C574(actor0, 3); + SectorZ_CsLevelCompleteTeamInit(greatFoxCs, 3); gFillScreenAlpha = gFillScreenAlphaTarget = 255; } break; @@ -1292,19 +1343,19 @@ void SectorZ_LevelComplete(Player* player) { case 11: Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, MTXF_NEW); - D_ctx_80177A48[1] += D_ctx_80177A48[2] * var_fv1; + D_ctx_80177A48[1] += D_ctx_80177A48[2] * direction; - src.x = -800.0f * var_fv1; + src.x = -800.0f * direction; src.y = D_ctx_80177A48[3]; src.z = 0.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); Math_SmoothStepToF(&player->baseSpeed, 0, 0.05f, 1.0f, 0); - Math_SmoothStepToF(&actor1->fwork[0], 0, 0.05f, 1.0f, 0); - Math_SmoothStepToF(&actor3->fwork[0], 0, 0.05f, 1.0f, 0); - Math_SmoothStepToF(&actor2->fwork[0], 0.0f, 0.05f, 1.0f, 0); - Math_SmoothStepToF(&actor0->fwork[0], 0.0f, 0.05f, 1.0f, 0); + Math_SmoothStepToF(&falco->fwork[0], 0, 0.05f, 1.0f, 0); + Math_SmoothStepToF(&slippy->fwork[0], 0, 0.05f, 1.0f, 0); + Math_SmoothStepToF(&peppy->fwork[0], 0.0f, 0.05f, 1.0f, 0); + Math_SmoothStepToF(&greatFoxCs->fwork[0], 0.0f, 0.05f, 1.0f, 0); Math_SmoothStepToF(D_ctx_80177A48, 0.02f, 1.0f, 0.001f, 0); if (gCsFrameCount > 2000) { @@ -1326,14 +1377,14 @@ void SectorZ_LevelComplete(Player* player) { if (gCsFrameCount > 2550) { Math_SmoothStepToF(&D_ctx_80177A48[0], 0.1f, 1.0f, 0.005f, 0); } else { - gCsCamEyeX = actor0->obj.pos.x - (800.0f * var_fv1) + dest.x; - gCsCamEyeY = actor0->obj.pos.y + 550.0f + dest.y; - gCsCamEyeZ = actor0->obj.pos.z + 2430.0f + dest.z; + gCsCamEyeX = greatFoxCs->obj.pos.x - (800.0f * direction) + dest.x; + gCsCamEyeY = greatFoxCs->obj.pos.y + 550.0f + dest.y; + gCsCamEyeZ = greatFoxCs->obj.pos.z + 2430.0f + dest.z; } - gCsCamAtX = actor0->obj.pos.x - (800.0f * var_fv1); - gCsCamAtY = actor0->obj.pos.y + 550.0f; - gCsCamAtZ = actor0->obj.pos.z + 2430.0f - 250.0f; + gCsCamAtX = greatFoxCs->obj.pos.x - (800.0f * direction); + gCsCamAtY = greatFoxCs->obj.pos.y + 550.0f; + gCsCamAtZ = greatFoxCs->obj.pos.z + 2430.0f - 250.0f; if (gCsFrameCount == 2660) { Audio_FadeOutAll(50); @@ -1405,10 +1456,8 @@ void SectorZ_LevelComplete(Player* player) { Radio_PlayMessage(gMsg_ID_16280, RCID_SLIPPY); break; } - break; } - } else { switch (gCsFrameCount) { case 1729: @@ -1464,17 +1513,18 @@ void SectorZ_LevelComplete(Player* player) { break; } } + switch (gCsFrameCount) { case 1640: Radio_PlayMessage(gMsg_ID_16200, RCID_FOX); break; case 2277: - gShowLevelClearStatusScreen = 1; + gShowLevelClearStatusScreen = true; break; case 2477: - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; break; case 1370: @@ -1497,15 +1547,15 @@ void SectorZ_LevelComplete(Player* player) { break; case 2450: - actor2->state = 1; + peppy->state = 1; break; case 2470: - actor3->state = 1; + slippy->state = 1; break; case 2490: - gActors[1].state = 1; + falco->state = 1; break; case 2510: @@ -1514,11 +1564,11 @@ void SectorZ_LevelComplete(Player* player) { break; case 2550: - gActors[0].state = 1; + greatFoxCs->state = 1; break; } - Matrix_RotateY(gCalcMatrix, ((player->yRot_114 + player->rot.y) + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -(((player->xRot_120 + player->rot.x) + player->aerobaticPitch) * M_DTOR), MTXF_APPLY); src.x = 0.0f; @@ -1547,7 +1597,7 @@ void SectorZ_LevelComplete(Player* player) { if (player->pos.y < 700.0f) { Math_SmoothStepToF(&player->pos.y, 700.0f, 0.1f, 10.0f, 0.0f); } - Camera_Update360(player, 0); + Camera_Update360(player, false); player->cam.eye.x += player->vel.x * 0.1f; player->cam.eye.y += player->vel.y * 0.1f; player->cam.eye.z += player->vel.z * 0.1f; @@ -1566,47 +1616,47 @@ void SectorZ_LevelComplete(Player* player) { player->rockAngle = SIN_DEG(player->rockPhase); } -void SectorZ_8019DD20(Actor* actor) { +void SectorZ_LevelCompleteCsUpdate(ActorCutscene* this) { Vec3f src; Vec3f dest; - switch (actor->state) { + switch (this->state) { case 1: - actor->state = 2; - AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); - actor->fwork[29] = 5.0f; + this->state = 2; + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, this->sfxSource, 0); + this->fwork[29] = 5.0f; case 2: - actor->iwork[11] = 2; - actor->fwork[0] += 2.0f; - actor->rot_0F4.x += actor->fwork[1]; - Math_SmoothStepToF(&actor->fwork[1], 0.1f, 1.0f, 0.01f, 0.0f); + this->iwork[11] = 2; + this->fwork[0] += 2.0f; + this->rot_0F4.x += this->fwork[1]; + Math_SmoothStepToF(&this->fwork[1], 0.1f, 1.0f, 0.01f, 0.0f); break; case 10: - if (actor->timer_0BC == 0) { - actor->state = 11; + if (this->timer_0BC == 0) { + this->state = 11; } break; case 11: - Math_SmoothStepToF(&actor->rot_0F4.x, 215.0f, 0.1f, 7.0f, 0.0f); - Math_SmoothStepToF(&actor->fwork[0], 10.0f, 0.1f, 1.5f, 0.0f); - Math_SmoothStepToAngle(&actor->rot_0F4.y, 140.0f, 0.1f, 1.0f, 0.0f); - if (actor->rot_0F4.x > 180.0f) { - actor->state = 12; + Math_SmoothStepToF(&this->rot_0F4.x, 215.0f, 0.1f, 7.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[0], 10.0f, 0.1f, 1.5f, 0.0f); + Math_SmoothStepToAngle(&this->rot_0F4.y, 140.0f, 0.1f, 1.0f, 0.0f); + if (this->rot_0F4.x > 180.0f) { + this->state = 12; } break; case 12: - Math_SmoothStepToAngle(&actor->rot_0F4.x, 218.0f, 0.1f, 7.0f, 0.0f); - Math_SmoothStepToAngle(&actor->rot_0F4.y, 147.0f, 0.1f, 1.0f, 0.0f); - Math_SmoothStepToF(&actor->rot_0F4.z, 170.0f, 0.03f, 3.0f, 0.0f); - Math_SmoothStepToF(&actor->fwork[0], 20.0f, 0.1f, 1.0f, 0.0f); + Math_SmoothStepToAngle(&this->rot_0F4.x, 218.0f, 0.1f, 7.0f, 0.0f); + Math_SmoothStepToAngle(&this->rot_0F4.y, 147.0f, 0.1f, 1.0f, 0.0f); + Math_SmoothStepToF(&this->rot_0F4.z, 170.0f, 0.03f, 3.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[0], 20.0f, 0.1f, 1.0f, 0.0f); break; } - if (actor->animFrame == 24) { + if (this->animFrame == 24) { switch (gCsFrameCount) { case 290: if (gTeamShields[TEAM_ID_FALCO] > 0) { @@ -1615,8 +1665,8 @@ void SectorZ_8019DD20(Actor* actor) { break; case 430: - AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); - actor->fwork[29] = 8.0f; + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, this->sfxSource, 0); + this->fwork[29] = 8.0f; break; case 400: @@ -1629,82 +1679,86 @@ void SectorZ_8019DD20(Actor* actor) { } if (gCsFrameCount > 430) { - actor->fwork[29] = 3.0f; - Math_SmoothStepToF(&actor->rot_0F4.z, 500.0f, 0.1f, 20.0f, 0.0f); - Math_SmoothStepToF(&actor->fwork[0], 40.0f, 0.1f, 3.0f, 0.0f); + this->fwork[29] = 3.0f; + Math_SmoothStepToF(&this->rot_0F4.z, 500.0f, 0.1f, 20.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[0], 40.0f, 0.1f, 3.0f, 0.0f); if ((gCsFrameCount < 460) && ((gCsFrameCount & 3) == 0)) { - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); src.x = 0.0f; src.y = 70.0f; src.z = -70.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - func_effect_80078E50(actor->obj.pos.x + dest.x, actor->obj.pos.y + dest.y, actor->obj.pos.z + dest.z, + func_effect_80078E50(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, 3.1f); } } } - Matrix_RotateY(gCalcMatrix, (actor->rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(actor->rot_0F4.x * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (this->rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(this->rot_0F4.x * M_DTOR), MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; - src.z = actor->fwork[0]; + src.z = this->fwork[0]; Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - actor->vel.x = dest.x; - actor->vel.y = dest.y; - actor->vel.z = dest.z; + this->vel.x = dest.x; + this->vel.y = dest.y; + this->vel.z = dest.z; - actor->obj.rot.x = -actor->rot_0F4.x; - actor->obj.rot.y = actor->rot_0F4.y + 180.0f; - actor->obj.rot.z = -actor->rot_0F4.z; + this->obj.rot.x = -this->rot_0F4.x; + this->obj.rot.y = this->rot_0F4.y + 180.0f; + this->obj.rot.z = -this->rot_0F4.z; } -void SectorZ_8019E234(Actor* actor) { +void SectorZ_SpaceJunkUpdate(ActorSpaceJunk* this) { s32 i; - actor->obj.rot.x += actor->rot_0F4.x; - actor->obj.rot.y += actor->rot_0F4.y; + this->obj.rot.x += this->rot_0F4.x; + this->obj.rot.y += this->rot_0F4.y; + + if (this->dmgType != DMG_NONE) { + this->timer_0C6 = 20; + this->dmgType = DMG_NONE; + this->health -= this->damage; + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, this->sfxSource, 4); + + if (this->health <= 0) { + func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 5.0f, 10); + Actor_Despawn(this); + BonusText_Display(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 2); - if (actor->dmgType != DMG_NONE) { - actor->timer_0C6 = 20; - actor->dmgType = DMG_NONE; - actor->health -= actor->damage; - AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, actor->sfxSource, 4); - if (actor->health <= 0) { - func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, 5.0f, 10); - Actor_Despawn(actor); - BonusText_Display(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 2); gHitCount += 3; D_ctx_80177850 = 15; + for (i = 0; i < 6; i++) { - func_effect_800794CC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 1.0f); + func_effect_800794CC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1.0f); } - Object_Kill(&actor->obj, actor->sfxSource); - func_effect_8007A6F0(&actor->obj.pos, NA_SE_OB_EXPLOSION_S); + + Object_Kill(&this->obj, this->sfxSource); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_OB_EXPLOSION_S); } } } -void SectorZ_8019E3A8(Actor* actor) { - gSPDisplayList(gMasterDisp++, D_SZ_6001A10); +void SectorZ_SpaceJunkDraw(ActorSpaceJunk* this) { + gSPDisplayList(gMasterDisp++, aSzSpaceJunk2DL); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); RCP_SetupDL(&gMasterDisp, SETUPDL_57); - gSPDisplayList(gMasterDisp++, D_SZ_60045E0); + gSPDisplayList(gMasterDisp++, aSZSpaceJunk4DL); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); } -Vec3f D_i4_8019F64C[] = { { 612.0f, 409.0f, 386.0f }, { 1027.0f, 141.0f, 383.0f }, { 375.0f, 292.0f, 380.0f }, - { -4.0f, 80.0f, 380.0f }, { 314.0f, 80.0f, 385.0f }, { 565.0f, 300.0f, 385.0f }, - { 600.0f, 385.0f, 380.0f }, { 776.0f, 245.0f, 384.0f }, { 376.0f, 123.0f, 384.0f }, - { 428.0f, 174.0f, 383.0f }, { 722.0f, 306.0f, 383.0f }, { 530.0f, 380.0f, 385.0f } }; +Vec3f sFireSmokeOffsetPos[] = { { 612.0f, 409.0f, 386.0f }, { 1027.0f, 141.0f, 383.0f }, { 375.0f, 292.0f, 380.0f }, + { -4.0f, 80.0f, 380.0f }, { 314.0f, 80.0f, 385.0f }, { 565.0f, 300.0f, 385.0f }, + { 600.0f, 385.0f, 380.0f }, { 776.0f, 245.0f, 384.0f }, { 376.0f, 123.0f, 384.0f }, + { 428.0f, 174.0f, 383.0f }, { 722.0f, 306.0f, 383.0f }, { 530.0f, 380.0f, 385.0f } }; -void SectorZ_Boss_Update(Boss* boss) { +void SectorZ_GreatFoxUpdate(GreatFoxSZ* this) { s32 i; s32 j; f32 x; @@ -1713,23 +1767,24 @@ void SectorZ_Boss_Update(Boss* boss) { Vec3f src; Vec3f dest; - if (boss->dmgType == DMG_UNK_100) { - boss->dmgType = DMG_NONE; - boss->timer_050 = 10; - boss->timer_052 = 60; - boss->state = 1; - AUDIO_PLAY_SFX(NA_SE_OB_BROKEN_SPARK_L, boss->sfxSource, 0); + if (this->dmgType == DMG_MISSILE) { + this->dmgType = DMG_NONE; + this->timer_050 = 10; + this->timer_052 = 60; + this->state = 1; + AUDIO_PLAY_SFX(NA_SE_OB_BROKEN_SPARK_L, this->sfxSource, 0); } - if (boss->timer_050 == 1) { + if (this->timer_050 == 1) { gGreatFoxIntact = false; } - if (boss->timer_050 == 5) { - x = boss->obj.pos.x + 400.0f; - y = boss->obj.pos.y + 200.0f; - z = boss->obj.pos.z + 1000.0f; + if (this->timer_050 == 5) { + x = this->obj.pos.x + 400.0f; + y = this->obj.pos.y + 200.0f; + z = this->obj.pos.z + 1000.0f; + // Effects for broken pieces for (i = 0; i < 25; i++) { func_effect_800794CC(x + RAND_FLOAT_CENTERED(300.0f), y + RAND_FLOAT_CENTERED(100.0f), z, 2.0f); func_effect_80079618(x + RAND_FLOAT_CENTERED(300.0f), y + RAND_FLOAT_CENTERED(100.0f), z, 2.0f); @@ -1737,57 +1792,59 @@ void SectorZ_Boss_Update(Boss* boss) { func_effect_8007BFFC(x, y, z, 0.0f, 0.0f, 0.0f, 20.0f, 30); } - if (boss->timer_052 != 0) { + if (this->timer_052 != 0) { for (j = 0; j < 1; j++) { i = RAND_INT(11.99f); - SectorZ_80199BDC(D_i4_8019F64C[i].x + boss->obj.pos.x, D_i4_8019F64C[i].y + boss->obj.pos.y, - D_i4_8019F64C[i].z + boss->obj.pos.z, RAND_FLOAT_CENTERED(5.0f), RAND_FLOAT_CENTERED(5.0f), - 10.0f, RAND_FLOAT(2.0f) + 4.0f); + SectorZ_FireSmokeEffectSpawn(sFireSmokeOffsetPos[i].x + this->obj.pos.x, + sFireSmokeOffsetPos[i].y + this->obj.pos.y, + sFireSmokeOffsetPos[i].z + this->obj.pos.z, RAND_FLOAT_CENTERED(5.0f), + RAND_FLOAT_CENTERED(5.0f), 10.0f, RAND_FLOAT(2.0f) + 4.0f); } } - Matrix_RotateY(gCalcMatrix, (boss->rot_078.y + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(boss->rot_078.x * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (this->rot_078.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(this->rot_078.x * M_DTOR), MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; - src.z = boss->fwork[0]; + src.z = this->fwork[0]; Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - boss->vel.x = dest.x; - boss->vel.y = dest.y; - boss->vel.z = dest.z; + this->vel.x = dest.x; + this->vel.y = dest.y; + this->vel.z = dest.z; - boss->obj.rot.x = -boss->rot_078.x; - boss->obj.rot.y = boss->rot_078.y + 180.0f; - boss->obj.rot.z = -boss->rot_078.z; + this->obj.rot.x = -this->rot_078.x; + this->obj.rot.y = this->rot_078.y + 180.0f; + this->obj.rot.z = -this->rot_078.z; if (!gGreatFoxIntact) { - Matrix_RotateY(gCalcMatrix, (boss->obj.rot.y - 270.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, boss->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, boss->obj.rot.z * M_DTOR, MTXF_APPLY); - Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_i4_8019F64C[RAND_INT(11.99f)], &dest); - func_effect_8007C484(boss->obj.pos.x + dest.x, boss->obj.pos.y + dest.y, boss->obj.pos.z + dest.z, boss->vel.x, - boss->vel.y, boss->vel.z, RAND_FLOAT(0.1f) + 0.15f, 0); + Matrix_RotateY(gCalcMatrix, (this->obj.rot.y - 270.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sFireSmokeOffsetPos[RAND_INT(11.99f)], &dest); + func_effect_8007C484(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, this->vel.x, + this->vel.y, this->vel.z, RAND_FLOAT(0.1f) + 0.15f, 0); + if (((gGameFrameCount % 7) == 0) && (Rand_ZeroOne() < 0.5f)) { - SectorZ_80199BDC(boss->obj.pos.x + dest.x, boss->obj.pos.y + dest.y, boss->obj.pos.z + dest.z, boss->vel.x, - boss->vel.y, boss->vel.z + 5.0f, RAND_FLOAT(2.0f) + 4.0f); + SectorZ_FireSmokeEffectSpawn(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, + this->vel.x, this->vel.y, this->vel.z + 5.0f, RAND_FLOAT(2.0f) + 4.0f); } } } -void SectorZ_Boss_Draw(Boss* boss) { +void SectorZ_GreatFoxDraw(GreatFoxSZ* this) { gSPFogPosition(gMasterDisp++, gFogNear, 1005); Cutscene_DrawGreatFox(); } -void SectorZ_8019EA68(void) { +void SectorZ_LoadLevelObjects(void) { s32 i; s32 j; Actor* actor; Scenery360* scenery360; - Boss* boss = &gBosses[0]; + GreatFoxSZ* greatFox = &gBosses[SZ_GREAT_FOX]; gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]); @@ -1836,20 +1893,20 @@ void SectorZ_8019EA68(void) { } } - Boss_Initialize(boss); - boss->obj.status = OBJ_INIT; + Boss_Initialize(greatFox); + greatFox->obj.status = OBJ_INIT; - boss->obj.pos.x = 0.0f; - boss->obj.pos.y = 0.0f; - boss->obj.pos.z = 0.0f; + greatFox->obj.pos.x = 0.0f; + greatFox->obj.pos.y = 0.0f; + greatFox->obj.pos.z = 0.0f; - boss->rot_078.y = 90.0f; + greatFox->rot_078.y = 90.0f; - boss->obj.rot.x = -boss->rot_078.x; - boss->obj.rot.y = boss->rot_078.y + 180.0f; - boss->obj.rot.z = -boss->rot_078.z; + greatFox->obj.rot.x = -greatFox->rot_078.x; + greatFox->obj.rot.y = greatFox->rot_078.y + 180.0f; + greatFox->obj.rot.z = -greatFox->rot_078.z; - boss->obj.id = OBJ_BOSS_SZ; - Object_SetInfo(&boss->info, boss->obj.id); - AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, boss->sfxSource, 0); + greatFox->obj.id = OBJ_BOSS_SZ_GREAT_FOX; + Object_SetInfo(&greatFox->info, greatFox->obj.id); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, greatFox->sfxSource, 0); } diff --git a/src/overlays/ovl_i5/fox_ma.c b/src/overlays/ovl_i5/fox_ma.c index dda93b69..0312825d 100644 --- a/src/overlays/ovl_i5/fox_ma.c +++ b/src/overlays/ovl_i5/fox_ma.c @@ -725,7 +725,7 @@ void Macbeth_8019BE50(Actor* actor) { RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), (s32) (RAND_FLOAT(50.0f) + 70.0f), 0, RAND_FLOAT(0.8f) + 0.3f); } - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_L); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_L); gHitCount++; } @@ -785,7 +785,7 @@ void Macbeth_8019C6C4(Actor* actor) { D_ctx_80177850 = 15; } -void Macbeth_8019C778(Actor* actor) { +void Macbeth_Actor205_Update(Actor* actor) { if (actor->vel.z < -3.0f) { Macbeth_8019A128(); } @@ -932,7 +932,7 @@ void Macbeth_8019C778(Actor* actor) { } } -void Macbeth_8019CE88(Actor* actor) { +void Macbeth_Actor210_Update(Actor* actor) { switch (actor->state) { case 0: Macbeth_8019A198(actor); @@ -1069,7 +1069,7 @@ void Macbeth_8019D670(f32 xPos, f32 yPos, f32 zPos, f32 arg3, f32 zVel, f32 zRot } } -void Macbeth_8019D700(Actor* actor) { +void Macbeth_Actor209_Update(Actor* actor) { switch (actor->state) { case 0: Macbeth_8019A198(actor); @@ -1235,7 +1235,7 @@ void Macbeth_8019D910(Actor* actor, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f3 } } -void Macbeth_8019E410(Actor* actor) { +void Macbeth_Actor211_Update(Actor* actor) { switch (actor->state) { case 0: Macbeth_8019A198(actor); @@ -1348,7 +1348,7 @@ void Macbeth_8019E624(Actor* actor, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f3 } } -void Macbeth_8019EA60(Actor* actor) { +void Macbeth_Actor208_Update(Actor* actor) { switch (actor->state) { case 0: Macbeth_8019A198(actor); @@ -1426,7 +1426,7 @@ void Macbeth_8019EBF8(Actor* actor, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f3 } } -void Macbeth_8019EE68(Actor* actor) { +void Macbeth_Actor213_Update(Actor* actor) { switch (actor->state) { case 0: Macbeth_8019A198(actor); @@ -1683,7 +1683,7 @@ void Macbeth_8019FC54(Actor* actor, s32* arg1, s32* arg2, s32 arg3, s32 arg4, f3 } } -void Macbeth_8019FF9C(Actor* actor) { +void Macbeth_Actor212_Update(Actor* actor) { switch (actor->state) { case 0: Macbeth_8019A198(actor); @@ -1936,7 +1936,7 @@ bool Macbeth_801A0B20(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return false; } -void Macbeth_801A0BD8(Scenery* scenery) { +void Macbeth_Scenery104_Update(Scenery* scenery) { switch (scenery->state) { case 0: scenery->vel.y = 0.0f; @@ -2047,7 +2047,8 @@ void Macbeth_801A1268(s32 limbIndex, Vec3f* rot, void* data) { } } -void Macbeth_801A12C4(Actor* actor) { +// Actors 205, 206, 208, 209, 210, 211, 212, 213 +void Macbeth_ActorDoodad_Draw(Actor* actor) { Vec3f spD0[50]; s32 id; @@ -2295,7 +2296,8 @@ void Macbeth_801A12C4(Actor* actor) { } } -void Macbeth_801A23AC(Scenery* scenery) { +// Scenery 92 to 105 +void Macbeth_SceneryDoodad_Draw(Scenery* scenery) { Vec3f sp78[50]; RCP_SetupDL(&gMasterDisp, SETUPDL_57); @@ -2398,7 +2400,7 @@ void Macbeth_801A23AC(Scenery* scenery) { RCP_SetupDL(&gMasterDisp, SETUPDL_29); } -void Macbeth_801A2A78(Scenery* scenery) { +void Macbeth_Scenery61_Draw(Scenery* scenery) { RCP_SetupDL(&gMasterDisp, SETUPDL_57); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_MA_60253E0); @@ -2407,7 +2409,8 @@ void Macbeth_801A2A78(Scenery* scenery) { RCP_SetupDL(&gMasterDisp, SETUPDL_29); } -void Macbeth_801A2B24(Scenery* scenery) { +// Scenery 77 to 82, and 84 to 91 +void Macbeth_SceneryDoodad2_Draw(Scenery* scenery) { if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) { Object_Kill(&scenery->obj, scenery->sfxSource); } @@ -2459,7 +2462,7 @@ void Macbeth_801A2B24(Scenery* scenery) { RCP_SetupDL(&gMasterDisp, SETUPDL_29); } -void Macbeth_801A2DD8(Scenery* scenery) { +void Macbeth_Scenery83_Update(Scenery* scenery) { s16 i; switch (scenery->state) { @@ -2469,7 +2472,7 @@ void Macbeth_801A2DD8(Scenery* scenery) { } break; case 1: - func_effect_8007A6F0(&scenery->obj.pos, NA_SE_EN_EXPLOSION_M); + Effect_SpawnTimedSfxAtPos(&scenery->obj.pos, NA_SE_EN_EXPLOSION_M); gControllerRumbleFlags[gMainController] = 1; gControllerRumbleTimers[gMainController] = 15; for (i = 0; i < 6; i++) { @@ -2521,7 +2524,7 @@ void Macbeth_801A30B8(s32 limbIndex, Vec3f* rot, void* data) { } } -void Macbeth_801A3240(Scenery* scenery) { +void Macbeth_Scenery83_Draw(Scenery* scenery) { Vec3f sp38[50]; RCP_SetupDL(&gMasterDisp, SETUPDL_29); @@ -2776,7 +2779,7 @@ void Macbeth_801A3E70(Actor* actor) { D_i5_801BA1D8++; } -void Macbeth_801A3E98(Actor* actor) { +void Macbeth_Actor214_Update(Actor* actor) { if ((gPlayer[0].trueZpos - actor->obj.pos.z) < -500.0f) { Object_Kill(&actor->obj, actor->sfxSource); } @@ -2847,7 +2850,7 @@ bool Macbeth_801A41B0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return false; } -void Macbeth_801A43BC(Actor* actor) { +void Macbeth_Actor214_Draw(Actor* actor) { Vec3f sp50[50]; Matrix_Push(&gGfxMatrix); @@ -2884,7 +2887,7 @@ void Macbeth_801A4660(Actor* actor) { } } -void Macbeth_801A46A0(Actor* actor) { +void Macbeth_Actor215_Update(Actor* actor) { if ((gPlayer[0].trueZpos - actor->obj.pos.z) < -500.0f) { Object_Kill(&actor->obj, actor->sfxSource); } @@ -2951,7 +2954,7 @@ void Macbeth_801A49B8(Actor* actor) { actor->timer_0C6 = 15; actor->health -= actor->damage; if (actor->health <= 0) { - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); gHitCount++; actor->state = 2; } @@ -2959,7 +2962,7 @@ void Macbeth_801A49B8(Actor* actor) { } } -void Macbeth_801A4A64(Actor* actor) { +void Macbeth_Actor215_Draw(Actor* actor) { if (actor->state < 2) { if (actor->scale != 1.0f) { Matrix_Scale(gGfxMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY); @@ -2975,7 +2978,7 @@ void Macbeth_801A4AF8(Actor* actor) { D_i5_801BE318 = actor->index; } -void Macbeth_801A4B24(Actor* actor) { +void Macbeth_Actor223_Update(Actor* actor) { s32 pad[2]; s32 i; ObjectInit* objInit; @@ -3120,7 +3123,7 @@ bool Macbeth_801A54AC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return false; } -void Macbeth_801A54E8(Actor* actor) { +void Macbeth_Actor223_Draw(Actor* actor) { Vec3f sp28[50]; Matrix_Push(&gGfxMatrix); @@ -3164,7 +3167,7 @@ s32 Macbeth_801A55D4(s32 arg0, Vec3f* arg1, Vec3f* arg2, s32 arg3) { return 0; } -void Macbeth_801A57D0(Effect* effect) { +void Macbeth_Effect378_Update(Effect* effect) { u8 i; Vec3f sp50; Vec3f sp44; @@ -3220,13 +3223,13 @@ void Macbeth_801A57D0(Effect* effect) { } } -void Macbeth_801A5AF0(Effect* effect) { +void Macbeth_Effect378_Draw(Effect* effect) { RCP_SetupDL(&gMasterDisp, SETUPDL_60); gSPDisplayList(gMasterDisp++, D_MA_601A840); RCP_SetupDL(&gMasterDisp, SETUPDL_64); } -void Macbeth_801A5B4C(Effect* effect) { +void Macbeth_Effect380_Update(Effect380* effect) { if ((gPlayer[0].trueZpos - effect->obj.pos.z) < -2000.0f) { Object_Kill(&effect->obj, effect->sfxSource); } @@ -3260,7 +3263,7 @@ void Macbeth_801A5B4C(Effect* effect) { } } -void Macbeth_801A5D68(Effect* effect) { +void Macbeth_Effect380_Draw(Effect* effect) { RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 112, 255, 243, effect->unk_44); gDPSetEnvColor(gMasterDisp++, 255, 255, 255, effect->unk_44); @@ -3276,7 +3279,7 @@ void Macbeth_801A5E2C(Actor* actor) { actor->obj.rot.z = 0.0f; } -void Macbeth_801A5E54(Actor* actor) { +void Macbeth_Actor216_Update(Actor* actor) { if ((gPlayer[0].trueZpos - actor->obj.pos.z) < -500.0f) { Object_Kill(&actor->obj, actor->sfxSource); } @@ -3293,14 +3296,14 @@ void Macbeth_801A5E54(Actor* actor) { } } -void Macbeth_801A5F90(Actor* actor) { +void Macbeth_Actor216_Draw(Actor* actor) { gSPDisplayList(gMasterDisp++, D_MA_60251A0); } void Macbeth_801A5FC4(s32 arg0) { } -void Macbeth_801A5FD0(Actor* actor) { +void Macbeth_Actor217_Update(Actor* actor) { if (gPlayer[0].trueZpos - actor->obj.pos.z < -500.0f) { Object_Kill(&actor->obj, actor->sfxSource); } @@ -3317,7 +3320,7 @@ void Macbeth_801A5FD0(Actor* actor) { } } -void Macbeth_801A6100(Actor* actor) { +void Macbeth_Actor217_Draw(Actor* actor) { gSPDisplayList(gMasterDisp++, D_MA_6025850); } @@ -3325,7 +3328,7 @@ void Macbeth_801A6134(Actor* actor) { actor->health = 30; } -void Macbeth_801A6144(Actor* actor) { +void Macbeth_Actor218_Update(Actor* actor) { s16 i; if ((gPlayer[0].trueZpos - actor->obj.pos.z) < -500.0f) { @@ -3370,7 +3373,7 @@ void Macbeth_801A6144(Actor* actor) { } } -void Macbeth_801A6540(Actor* actor) { +void Macbeth_Actor218_Draw(Actor* actor) { RCP_SetupDL(&gMasterDisp, SETUPDL_57); if ((actor->timer_0C6 % 2) != 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_58); @@ -3387,7 +3390,7 @@ void Macbeth_801A65E0(Scenery* scenery) { scenery->obj.rot.z = 0.0f; } -void Macbeth_801A6608(Scenery* scenery) { +void Macbeth_Scenery65_Draw(Scenery* scenery) { if ((gPlayer[0].trueZpos - scenery->obj.pos.z) < scenery->vel.z) { if (gPlayState != PLAY_PAUSE) { Math_SmoothStepToF(&scenery->vel.x, 30, 0.5f, 30.0f, 0.0f); @@ -3406,7 +3409,7 @@ void Macbeth_801A6608(Scenery* scenery) { void Macbeth_801A67BC(s32 arg0) { } -void Macbeth_801A67C8(Actor* actor) { +void Macbeth_Actor219_Update(Actor* actor) { if ((gPlayer[0].trueZpos - actor->obj.pos.z) < -300.0f) { Object_Kill(&actor->obj, actor->sfxSource); } @@ -3424,7 +3427,7 @@ void Macbeth_801A67C8(Actor* actor) { } } -void Macbeth_801A68EC(Actor* actor) { +void Macbeth_Actor219_Draw(Actor* actor) { } void Macbeth_801A68F8(Actor* actor, s16 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7) { @@ -3785,7 +3788,7 @@ void Macbeth_801A7D98(Actor* actor) { static Vec3f D_i5_801BA744 = { 0.0f, 0.0f, 0.0f }; static Vec3f D_i5_801BA750 = { 0.0f, 0.0f, 30.0f }; -void Macbeth_801A7E7C(Actor* actor) { +void Macbeth_Actor207_Update(Actor* actor) { s32 pad; f32 temp; f32 sp374; @@ -4837,7 +4840,7 @@ void Macbeth_801AC1C0(s32 limbIndex, Vec3f* rot, void* data) { } } -void Macbeth_801AC294(Actor* actor) { +void Macbeth_Actor207_Draw(Actor* actor) { if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) { if (((gPlayer[0].trueZpos - actor->obj.pos.z) > 7000.0f) || ((gPlayer[0].trueZpos - actor->obj.pos.z) < -1000.0f)) { @@ -4862,7 +4865,7 @@ void Macbeth_801AC294(Actor* actor) { void Macbeth_801AC42C(s32 arg0) { } -void Macbeth_801AC438(Actor* actor) { +void Macbeth_Actor206_Update(Actor* actor) { switch (actor->state) { case 0: Macbeth_8019A198(actor); @@ -5016,9 +5019,9 @@ void Macbeth_LevelStart(Player* player) { player->csState = player->csTimer = player->csEventTimer = player->hideShadow = 0; player->gravity = 3.0f; player->unk_014 = 0.0f; - D_ctx_8017782C = 1; + D_ctx_8017782C = true; Play_InitEnvironment(); - D_ctx_8017782C = 0; + D_ctx_8017782C = false; gObjectLoadIndex = 40; player->csState = 4; break; @@ -5051,7 +5054,7 @@ void Macbeth_801ACE40(Effect* effect) { effect->obj.pos.x = gPlayer[0].cam.eye.x + RAND_FLOAT_CENTERED(600.0f); effect->obj.pos.y = gPlayer[0].cam.eye.y - 1000.0f; effect->obj.pos.z = gPlayer[0].trueZpos - 2000.0f; - effect->obj.id = OBJ_EFFECT_352; + effect->obj.id = OBJ_EFFECT_CLOUDS; effect->timer_50 = 80; effect->unk_46 = 144; effect->vel.x = 10.0f; @@ -5200,7 +5203,7 @@ void Macbeth_801AD624(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel void Macbeth_801AD6E8(void) { } -void Macbeth_801AD6F0(Actor* actor) { +void Macbeth_Actor220_Update(Actor* actor) { Vec3f sp4C = { 0.0f, -10.0f, 0.0f }; if ((gPlayer[0].trueZpos - actor->obj.pos.z) < -500.0f) { @@ -5256,7 +5259,7 @@ void Macbeth_801AD6F0(Actor* actor) { } } -void Macbeth_801ADAC8(Actor* actor) { +void Macbeth_Actor220_Draw(Actor* actor) { switch (actor->state) { case 0: Graphics_SetScaleMtx(actor->scale); @@ -5307,7 +5310,7 @@ void Macbeth_801ADCEC(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel } } -void Macbeth_801ADD68(Actor* actor) { +void Macbeth_Actor221_Update(Actor* actor) { Vec3f sp3C = { 0.0f, -10.0f, 0.0f }; s32 var_v0; @@ -5382,7 +5385,7 @@ void Macbeth_801ADD68(Actor* actor) { actor->health -= actor->damage; if (actor->health <= 0) { - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(20.0f), actor->obj.pos.y - 200.0f, actor->obj.pos.z, 8.0f); func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(20.0f), actor->obj.pos.y, @@ -5406,7 +5409,7 @@ static Vec3f D_i5_801BA784[8] = { { -40.0f, 10.0f, 30.0f }, { -41.0f, 10.0f, 10.0f }, { -43.0f, 10.0f, -10.0f }, { -45.0f, 10.0f, -30.0f }, }; // unused? -void Macbeth_801AE2C0(Actor* actor) { +void Macbeth_Actor221_Draw(Actor* actor) { if (actor->state < 2) { Graphics_SetScaleMtx(actor->scale); if (actor->iwork[0] >= 128) { @@ -5513,7 +5516,7 @@ void Macbeth_801AE800(f32 xPos, f32 yPos, f32 zPos, f32 arg3, f32 arg4, f32 arg5 } } -void Macbeth_801AE87C(Effect* effect) { +void Macbeth_Effect379_Update(Effect* effect) { f32 sp34; f32 sp30; f32 sp2C; @@ -5557,7 +5560,7 @@ void Macbeth_801AE87C(Effect* effect) { } } -void Macbeth_801AEAA0(Effect* effect) { +void Macbeth_Effect379_Draw(Effect* effect) { RCP_SetupDL(&gMasterDisp, SETUPDL_67); if (effect->scale2 >= 3.0f) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, effect->unk_44); @@ -5572,7 +5575,7 @@ void Macbeth_801AEAA0(Effect* effect) { RCP_SetupDL(&gMasterDisp, SETUPDL_64); } -void Macbeth_801AEC04(Actor* actor) { +void Macbeth_Actor222_Update(Actor* actor) { if ((gPlayer[0].trueZpos - actor->obj.pos.z) < -300.0f) { Object_Kill(&actor->obj, actor->sfxSource); } @@ -5623,14 +5626,14 @@ void Macbeth_801AEC04(Actor* actor) { actor->health -= actor->damage; actor->timer_0C6 = 15; if (actor->health <= 0) { - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EXPLOSION_S); func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 8.0f); Object_Kill(&actor->obj, actor->sfxSource); } } } -void Macbeth_801AEEFC(Actor* actor) { +void Macbeth_Actor222_Draw(Actor* actor) { gSPDisplayList(gMasterDisp++, D_MA_6015510); Matrix_Scale(gGfxMatrix, actor->fwork[0], actor->fwork[2], 1.0f, MTXF_APPLY); Matrix_Push(&gGfxMatrix); diff --git a/src/overlays/ovl_i5/fox_ti.c b/src/overlays/ovl_i5/fox_ti.c index 62931d6c..3f82e728 100644 --- a/src/overlays/ovl_i5/fox_ti.c +++ b/src/overlays/ovl_i5/fox_ti.c @@ -79,7 +79,7 @@ void Titania_80188F30(void) { D_MA_801BA1E8 = 99; } -void Titania_80188F60(Effect* effect) { +void Titania_Effect368_Update(Effect* effect) { if (effect->timer_50 == 0) { effect->unk_44 -= 16; if (effect->unk_44 < 17) { @@ -88,7 +88,7 @@ void Titania_80188F60(Effect* effect) { } } -void Titania_80188FA8(Effect* effect) { +void Titania_Effect368_Draw(Effect* effect) { Matrix_Scale(gGfxMatrix, effect->scale2 * 0.5f, effect->scale2, effect->scale2, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, -(M_DTOR * 90), MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -122,7 +122,7 @@ void Titania_80189120(f32 xPos, f32 yPos, f32 zPos, f32 yRot, f32 scale2) { } } -void Titania_80189194(Actor* actor) { +void Titania_Actor224_Update(Actor* actor) { Ground_801B49D0(actor); } @@ -209,15 +209,15 @@ void Titania_80189380(Actor* actor) { sp5C.y = 0.0f; sp5C.z = 70.0f; - func_effect_8007EE68(OBJ_EFFECT_353, &sp80, &sp74, &sp68, &sp5C, 1.0f); + func_effect_8007EE68(OBJ_EFFECT_ENEMY_LASER_1, &sp80, &sp74, &sp68, &sp5C, 1.0f); sp80.y += 20.0f; - func_effect_8007EE68(OBJ_EFFECT_353, &sp80, &sp74, &sp68, &sp5C, 1.0f); + func_effect_8007EE68(OBJ_EFFECT_ENEMY_LASER_1, &sp80, &sp74, &sp68, &sp5C, 1.0f); } static Vec3f D_i5_801B752C = { -50.0f, 0.0f, -20.0f }; static Vec3f D_i5_801B7538 = { 50.0f, 0.0f, -20.0f }; -void Titania_801895B8(Actor* actor) { +void Titania_Actor226_Update(Actor* actor) { Vec3f sp54; Vec3f sp48; f32 sp44; @@ -315,12 +315,12 @@ void Titania_801895B8(Actor* actor) { func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z, 8.0f); func_effect_8007C120(actor->obj.pos.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z, actor->vel.x, actor->vel.y, actor->vel.z, 0.1f, 30); - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); Object_Kill(&actor->obj, actor->sfxSource); } } -void Titania_80189AFC(Actor* actor) { +void Titania_Actor226_Draw(Actor* actor) { Animation_GetFrameData(&D_TI1_700C8D8, 0, actor->vwork); actor->vwork[3].z = actor->fwork[5] + 270.0f; Animation_DrawSkeleton(1, D_TI1_700C964, actor->vwork, NULL, Titania_801891B4, actor, &gIdentityMatrix); @@ -343,7 +343,7 @@ void Titania_80189B80(Actor* actor) { actor->fwork[2] += actor->obj.pos.z; } -void Titania_80189CC8(Actor* actor) { +void Titania_Actor233_Update(Actor* actor) { static Vec3f D_i5_801B7550 = { 0.0f, -50.0f, 178.0f }; static Vec3f D_i5_801B755C = { 0.0f, 0.0f, 90.0f }; Vec3f sp64; @@ -412,8 +412,8 @@ void Titania_80189CC8(Actor* actor) { sp40.z = 0.0f; if ((actor->timer_0BC < 15) && ((actor->timer_0BC % 7) == 0)) { - func_effect_8007EE68(OBJ_EFFECT_353, (Vec3f*) &actor->fwork[0], &sp40, &actor->obj.rot, &D_i5_801B755C, - 1.0f); + func_effect_8007EE68(OBJ_EFFECT_ENEMY_LASER_1, (Vec3f*) &actor->fwork[0], &sp40, &actor->obj.rot, + &D_i5_801B755C, 1.0f); if (actor->timer_0BC == 0) { actor->timer_0BC = 90; } @@ -425,7 +425,7 @@ void Titania_80189CC8(Actor* actor) { } } -void Titania_8018A1C0(Actor* actor) { +void Titania_Actor233_Draw(Actor* actor) { gSPDisplayList(gMasterDisp++, D_TI1_700C4B0); Matrix_Translate(gGfxMatrix, 0.0f, -50.0f, 178.0f, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, actor->fwork[4] * M_DTOR, MTXF_APPLY); @@ -484,7 +484,7 @@ void Titania_8018A474(Actor* actor) { } } -void Titania_8018A544(Actor* actor) { +void Titania_Actor230_Update(Actor* actor) { f32 temp_fv0; f32 temp_fv1; f32 sp4C; @@ -503,7 +503,7 @@ void Titania_8018A544(Actor* actor) { actor->health += actor->damage; if (actor->scale == 1.0f) { if (actor->health >= 10) { - func_effect_8007A6F0(&actor->obj.pos, NA_SE_OB_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_OB_EXPLOSION_S); if ((Actor*) actor->iwork[0] != NULL) { ((Actor*) actor->iwork[0])->iwork[actor->iwork[1]] = 0; } @@ -592,7 +592,7 @@ void Titania_8018A544(Actor* actor) { } } -void Titania_8018AABC(Actor* actor) { +void Titania_Actor230_Draw(Actor* actor) { if (actor->scale != 1.0f) { Matrix_Scale(gGfxMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -600,7 +600,7 @@ void Titania_8018AABC(Actor* actor) { gSPDisplayList(gMasterDisp++, D_TI1_700E3F0); } -void Titania_8018AB44(Actor* actor) { +void Titania_Actor225_Update(Actor* actor) { f32 sp3C; f32 sp38; f32 sp34; @@ -634,12 +634,12 @@ void Titania_8018AB44(Actor* actor) { Actor_Despawn(actor); actor->info.bonus = 0; func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y + 10.0f, actor->obj.pos.z, 6.0f); - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); Object_Kill(&actor->obj, actor->sfxSource); break; case 3: - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y + 50.0f, actor->obj.pos.z, (10.0f / 3.0f)); gPlayer[0].vel.y = 20.0f; gPlayer[0].pos.y += 15.0f; @@ -768,7 +768,7 @@ void Titania_8018B1B4(s32 limbIndex, Vec3f* rot, void* data) { } } -void Titania_8018B268(Actor* actor) { +void Titania_Actor232_Update(Actor* actor) { Vec3f src; Vec3f dest; Actor* sp3C = actor->iwork[0]; @@ -871,7 +871,7 @@ void Titania_8018B268(Actor* actor) { } } -void Titania_8018B6AC(Actor* actor) { +void Titania_Actor232_Draw(Actor* actor) { Animation_GetFrameData(&D_TI1_700D534, actor->animFrame, actor->vwork); Animation_DrawSkeleton(0, D_TI1_700D700, actor->vwork, Titania_8018AFF0, Titania_8018B144, actor, &gIdentityMatrix); } @@ -933,7 +933,7 @@ void Titania_Actor231_Init(Actor* actor) { actor->obj.pos.y -= 20.0f; } -void Titania_8018B9D0(Actor* actor) { +void Titania_Actor231_Update(Actor* actor) { f32 var_fa0; f32 sp50; f32 sp4C; @@ -995,7 +995,7 @@ void Titania_8018B9D0(Actor* actor) { if (actor->vel.y <= 0.0f) { actor->itemDrop = DROP_NONE; Actor_Despawn(actor); - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f); Object_Kill(&actor->obj, actor->sfxSource); } @@ -1045,7 +1045,7 @@ Gfx* D_TI_801B7608[10] = { D_TI1_7003A90, D_TI1_7005420, D_TI1_7003FC0, D_TI1_7002930, D_TI1_7002490, }; -void Titania_8018BE84(Actor* actor) { +void Titania_Actor231_Draw(Actor* actor) { s32 index; RCP_SetupDL(&gMasterDisp, SETUPDL_30); @@ -1263,7 +1263,7 @@ void Titania_8018C72C(Actor* actor) { static Vec3f D_i5_801B766C = { 0.0f, 0.0f, 15.0f }; -void Titania_8018C8A8(Actor* actor) { +void Titania_Actor229_Update(Actor* actor) { s32 i; f32 sp170; f32 temp_fs0; @@ -1323,7 +1323,7 @@ void Titania_8018C8A8(Actor* actor) { AUDIO_PLAY_SFX(NA_SE_EN_SNAKE_DAMAGE, actor->sfxSource, 4); } } else if (actor->dmgType == DMG_BEAM) { - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_REFLECT); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_REFLECT); } actor->dmgType = DMG_NONE; } @@ -1686,7 +1686,7 @@ void Titania_8018C8A8(Actor* actor) { actor->dmgType = DMG_NONE; } -void Titania_8018E2D8(Actor* actor) { +void Titania_Actor229_Draw(Actor* actor) { f32 sp34; if ((actor->iwork[6] % 2) != 0) { @@ -1743,7 +1743,7 @@ void Titania_8018E3CC(Actor* actor) { } } -void Titania_8018E54C(Actor* actor) { +void Titania_Actor227_Update(Actor* actor) { actor->iwork[1]++; if ((actor->iwork[0] == (uintptr_t) NULL) && ((actor->iwork[1] & 3) == 0)) { @@ -1751,7 +1751,7 @@ void Titania_8018E54C(Actor* actor) { } } -void Titania_8018E5B4(Actor* actor) { +void Titania_Actor227_Draw(Actor* actor) { gSPDisplayList(gMasterDisp++, D_TI1_70098E0); } @@ -1759,7 +1759,7 @@ void Titania_8018E5E8(Actor* actor) { actor->health = 100; } -void Titania_8018E5F8(Actor* actor) { +void Titania_Actor228_Update(Actor* actor) { f32 spA4; f32 spA0; f32 sp9C; @@ -1949,7 +1949,7 @@ void Titania_8018E5F8(Actor* actor) { } temp_v0_3 = actor->iwork[5]; if (temp_v0_3 == NULL) { - temp_v0_4 = func_effect_8007783C(OBJ_EFFECT_373); + temp_v0_4 = func_effect_8007783C(OBJ_EFFECT_TIMED_SFX); if (temp_v0_4 != NULL) { temp_v0_4->obj.status = OBJ_ACTIVE; temp_v0_4->obj.pos.x = sp5C; @@ -1974,7 +1974,7 @@ void Titania_8018E5F8(Actor* actor) { } } -void Titania_8018EF14(Actor* actor) { +void Titania_Actor228_Draw(Actor* actor) { gSPDisplayList(gMasterDisp++, D_TI1_7008930); if ((actor->timer_0C6 % 2) == 0) { @@ -2002,7 +2002,7 @@ void Titania_Cactus_Update(Sprite* sprite) { if (sprite->destroy != 0) { func_effect_8007D074(sprite->obj.pos.x, sprite->obj.pos.y + 96.0f, sprite->obj.pos.z, 4.0f); sprite->obj.status = OBJ_FREE; - func_effect_8007A6F0(&sprite->obj.pos, NA_SE_OB_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&sprite->obj.pos, NA_SE_OB_EXPLOSION_S); } } @@ -2076,7 +2076,7 @@ void Titania_8018F134(Scenery* scenery) { } } -void Titania_8018F4D8(Scenery* scenery) { +void Titania_Scenery57_Update(Scenery* scenery) { f32 temp; switch (scenery->state) { @@ -2147,7 +2147,7 @@ void Titania_8018F4D8(Scenery* scenery) { } } -void Titania_8018F8B8(Scenery* scenery) { +void Titania_Scenery57_Draw(Scenery* scenery) { switch (scenery->unk_44) { case 0: @@ -3196,7 +3196,7 @@ void Titania_80192118(Boss* boss) { sp54.x = (boss->obj.pos.x + D_i5_801BBEF4[39]) + D_i5_801BBEF4[68]; sp54.y = 0.0f; sp54.z = (boss->obj.pos.z + D_i5_801BBEF4[41]) + D_i5_801BBEF4[70]; - func_effect_8007A6F0(&sp54, NA_SE_EN_BOSS_ATTACK); + Effect_SpawnTimedSfxAtPos(&sp54, NA_SE_EN_BOSS_ATTACK); boss->swork[39] = 5; gCameraShake = 5; } @@ -3204,7 +3204,7 @@ void Titania_80192118(Boss* boss) { sp54.x = (boss->obj.pos.x + D_i5_801BBEF4[42]) + D_i5_801BBEF4[71]; sp54.y = 0.0f; sp54.z = (boss->obj.pos.z + D_i5_801BBEF4[44]) + D_i5_801BBEF4[73]; - func_effect_8007A6F0(&sp54, NA_SE_EN_BOSS_ATTACK); + Effect_SpawnTimedSfxAtPos(&sp54, NA_SE_EN_BOSS_ATTACK); boss->swork[39] = 5; gCameraShake = 5; } @@ -4242,7 +4242,8 @@ void Titania_80193DF0(Boss* boss) { sp84.x = -boss->fwork[28]; sp84.y = boss->fwork[27] + 90.0f; sp84.z = 0.0f; - func_effect_8007EE68(OBJ_EFFECT_353, &sp90, &sp84, &D_tank_800C9F2C, &D_i5_801B8D48, 1.0f); + func_effect_8007EE68(OBJ_EFFECT_ENEMY_LASER_1, &sp90, &sp84, &D_tank_800C9F2C, &D_i5_801B8D48, + 1.0f); } } } @@ -4255,7 +4256,8 @@ void Titania_80193DF0(Boss* boss) { sp84.x = -boss->fwork[34]; sp84.y = boss->fwork[33] + 90.0f; sp84.z = 0.0f; - func_effect_8007EE68(OBJ_EFFECT_353, &sp90, &sp84, &D_tank_800C9F2C, &D_i5_801B8D48, 1.0f); + func_effect_8007EE68(OBJ_EFFECT_ENEMY_LASER_1, &sp90, &sp84, &D_tank_800C9F2C, &D_i5_801B8D48, + 1.0f); } } } @@ -4313,7 +4315,7 @@ void Titania_80193DF0(Boss* boss) { func_effect_8007A900(spD4.x, 0.0f, spD4.z, 10.0f, 255, 8, 0); } if (boss->unk_04C == 38) { - func_effect_8007A6F0(&spD4, NA_SE_EN_BOSS_ATTACK); + Effect_SpawnTimedSfxAtPos(&spD4, NA_SE_EN_BOSS_ATTACK); boss->swork[39] = 5; gCameraShake = 20; } @@ -4326,7 +4328,7 @@ void Titania_80193DF0(Boss* boss) { func_effect_8007A900(spD4.x, 0.0f, spD4.z, 10.0f, 255, 8, 0); } if (boss->unk_04C == 98) { - func_effect_8007A6F0(&spD4, NA_SE_EN_BOSS_ATTACK); + Effect_SpawnTimedSfxAtPos(&spD4, NA_SE_EN_BOSS_ATTACK); boss->swork[39] = 5; gCameraShake = 20; } @@ -4905,7 +4907,7 @@ void Titania_Boss_Update(Boss* boss) { sp3C.x = boss->fwork[29] + boss->obj.pos.x; sp3C.y = boss->fwork[30] + boss->obj.pos.y; sp3C.z = boss->fwork[31] + boss->obj.pos.z; - func_effect_8007A6F0(&sp3C, NA_SE_ARWING_DASH); + Effect_SpawnTimedSfxAtPos(&sp3C, NA_SE_ARWING_DASH); D_i5_801BBEF0[49] = D_i5_801B8D54[RAND_INT(4.0f)]; D_i5_801BBEF4[74] = RAND_FLOAT(0.4f) + 0.9f; D_i5_801BBEF4[75] = 0.6f; diff --git a/src/overlays/ovl_i5/fox_ti_cs.c b/src/overlays/ovl_i5/fox_ti_cs.c index 6a0cbe17..5425912f 100644 --- a/src/overlays/ovl_i5/fox_ti_cs.c +++ b/src/overlays/ovl_i5/fox_ti_cs.c @@ -225,9 +225,9 @@ void Titania_LevelStart(Player* player) { player->csState = player->csTimer = player->csEventTimer = player->hideShadow = 0; player->gravity = 3.0f; player->unk_014 = 0.0f; - D_ctx_8017782C = 1; + D_ctx_8017782C = true; Play_InitEnvironment(); - D_ctx_8017782C = 0; + D_ctx_8017782C = false; if ((gControllerHold[player->num].button & Z_TRIG) && (gControllerHold[player->num].button & R_TRIG)) { Audio_KillSfxBySourceAndId(player->sfxSource, NA_SE_TANK_GO_UP); } diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index 0017f88d..314ec180 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -237,7 +237,7 @@ void Andross_80187C5C(void) { } } -void Andross_801880E4(Actor* actor) { +void Andross_Actor199_Update(Actor* actor) { s32 i; f32 xDisplacement; f32 yDisplacement; @@ -301,7 +301,7 @@ void Andross_801880E4(Actor* actor) { actor->vel.z = vel.z; } -void Andross_80188448(Actor* actor) { +void Andross_Actor199_Draw(Actor* actor) { func_edisplay_8005B388(actor); } @@ -320,12 +320,12 @@ void Andross_80188468(void) { AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } -void Andross_80188528(Actor* actor) { +void Andross_Actor286_Update(Actor* actor) { Math_SmoothStepToF(&actor->vel.x, 0.0f, 0.2f, 0.5f, 0.0f); Math_SmoothStepToF(&actor->vel.y, 0.0f, 0.2f, 0.5f, 0.0f); Math_SmoothStepToF(&actor->vel.z, 0.0f, 0.2f, 0.5f, 0.0f); if (actor->dmgType != DMG_NONE) { - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); Object_Kill(&actor->obj, actor->sfxSource); func_effect_8007B344(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 3.0f, 5); } else if (actor->timer_0BC == 0) { @@ -336,7 +336,7 @@ void Andross_80188528(Actor* actor) { actor->rot_0F4.z += actor->fwork[0]; } -void Andross_80188660(Actor* actor) { +void Andross_Actor286_Draw(Actor* actor) { RCP_SetupDL(&gMasterDisp, SETUPDL_61); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); Matrix_RotateZ(gGfxMatrix, actor->rot_0F4.z * M_DTOR, MTXF_APPLY); @@ -394,7 +394,7 @@ void Andross_801888F4(Actor* actor) { func_effect_800794CC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 1.0f); } - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); Object_Kill(&actor->obj, actor->sfxSource); BonusText_Display(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 5); gHitCount += 6; @@ -536,7 +536,7 @@ void Andross_80189098(Boss* boss) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; actor->obj.id = OBJ_ACTOR_ALLRANGE; - actor->aiType = AI360_10; + actor->aiType = AI360_ENEMY; actor->aiIndex = AI360_FOX; actor->health = 200; actor->obj.pos.x = 200.0f; @@ -550,7 +550,7 @@ void Andross_80189098(Boss* boss) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; actor->obj.id = OBJ_ACTOR_ALLRANGE; - actor->aiType = AI360_10; + actor->aiType = AI360_ENEMY; actor->aiIndex = AI360_FOX; actor->health = 200; actor->obj.pos.x = -200.0f; @@ -594,7 +594,7 @@ void Andross_80189214(void) { Camera_UpdateArwingOnRails(player); } -void Andross_8018933C(Actor* actor) { +void Andross_Actor290_Update(Actor* actor) { if ((fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 1000.0f) && (fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 1000.0f)) { gStartAndrossFightTimer = 50; @@ -602,7 +602,7 @@ void Andross_8018933C(Actor* actor) { } } -void Andross_801893B8(Actor* actor) { +void Andross_Actor288_Update(Actor* actor) { if (gAllRangeCheckpoint == 0) { actor->counter_04E++; @@ -623,7 +623,7 @@ void Andross_801893B8(Actor* actor) { } } -void Andross_80189470(Actor* actor) { +void Andross_Actor289_Update(Actor* actor) { s32 i; Player* player = &gPlayer[0]; @@ -663,7 +663,7 @@ void Andross_80189470(Actor* actor) { } Andross_80193710(); - D_ctx_8017782C = 1; + D_ctx_8017782C = true; Play_InitEnvironment(); gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; gFillScreenAlpha = gFillScreenAlphaTarget = 255; @@ -673,7 +673,7 @@ void Andross_80189470(Actor* actor) { } } -void Andross_80189724(Actor* actor) { +void Andross_Actor287_Update(Actor* actor) { s32 i; Vec3f vec; Vec3f displacement; @@ -745,7 +745,7 @@ void Andross_80189B00(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { } } -void Andross_80189B70(Boss* boss) { +void Andross_Boss321_Update(Boss* boss) { s32 i; s32 sp98; s32 frameCountMask; @@ -1018,7 +1018,7 @@ void Andross_80189B70(Boss* boss) { Andross_80188468(); Andross_80187C5C(); gPlayer[0].unk_014 = 1.0f; - Camera_Update360(gPlayer, 1); + Camera_Update360(gPlayer, true); Audio_StartPlayerNoise(0); AUDIO_PLAY_BGM(gBossBgms[gCurrentLevel]); AUDIO_PLAY_SFX(NA_SE_OB_ROUTE_EXPLOSION1, gDefaultSfxSource, 0); @@ -1192,7 +1192,7 @@ bool Andross_8018B47C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return false; } -void Andross_8018B8C0(Boss* boss) { +void Andross_Boss321_Draw(Boss* boss) { s32 j; s32 i; f32 temp; @@ -1426,7 +1426,7 @@ void Andross_8018CA50(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel } } -void Andross_8018CAD4(Effect* effect) { +void Andross_Effect396_Update(Effect* effect) { s32 i; Item* item; Vec3f vec; @@ -1478,7 +1478,7 @@ void Andross_8018CAD4(Effect* effect) { func_effect_8007A774(&gPlayer[0], effect, 100.0f); if (effect->unk_44 != 0) { func_effect_8007D0E0(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 10.0f); - func_effect_8007A6F0(&effect->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&effect->obj.pos, NA_SE_EN_EXPLOSION_S); Object_Kill(&effect->obj, effect->sfxSource); } } @@ -1488,7 +1488,7 @@ void Andross_8018CAD4(Effect* effect) { func_effect_8007A774(&gPlayer[0], effect, 100.0f); if (effect->unk_44 != 0) { func_effect_8007D0E0(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 10.0f); - func_effect_8007A6F0(&effect->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&effect->obj.pos, NA_SE_EN_EXPLOSION_S); Object_Kill(&effect->obj, effect->sfxSource); if (Rand_ZeroOne() < 0.1f) { item = gItems; @@ -1531,7 +1531,7 @@ static Gfx* D_i6_801A6790[10] = { D_ANDROSS_C001880, D_ANDROSS_C001880, D_ANDROSS_C001880, D_arwing_3016660, D_arwing_3015D80, }; -void Andross_8018CF98(Effect* effect) { +void Andross_Effect396_Draw(Effect* effect) { if (effect->state == 10) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, effect->unk_44); @@ -1678,9 +1678,9 @@ void Andross_8018D2B0(Boss* boss) { RAND_FLOAT(1.0f) + 1.0f); } func_effect_8007B344(boss->vwork[0].x, boss->vwork[0].y, boss->vwork[0].z, 20.0f, 5); - func_effect_8007A6F0(&sp68, NA_SE_EN_EXPLOSION_M); + Effect_SpawnTimedSfxAtPos(&sp68, NA_SE_EN_EXPLOSION_M); } else { - func_effect_8007A6F0(&sp68, NA_SE_OB_DAMAGE_M); + Effect_SpawnTimedSfxAtPos(&sp68, NA_SE_OB_DAMAGE_M); } } else { sp68.x = boss->vwork[1].x; @@ -1698,9 +1698,9 @@ void Andross_8018D2B0(Boss* boss) { RAND_FLOAT(1.0f) + 1.0f); } func_effect_8007B344(boss->vwork[1].x, boss->vwork[1].y, boss->vwork[1].z, 20.0f, 5); - func_effect_8007A6F0(&sp68, NA_SE_EN_EXPLOSION_M); + Effect_SpawnTimedSfxAtPos(&sp68, NA_SE_EN_EXPLOSION_M); } else { - func_effect_8007A6F0(&sp68, NA_SE_OB_DAMAGE_M); + Effect_SpawnTimedSfxAtPos(&sp68, NA_SE_OB_DAMAGE_M); } } } @@ -1763,7 +1763,7 @@ void Andross_8018DA94(Boss* boss, Vec3f* arg1) { static f32 D_i6_801A67B8[] = { 0.0f, 0.0f, 0.0f }; -void Andross_8018DBF0(Boss* boss) { +void Andross_Boss320_Update(Boss* boss) { s32 i; s32 frameCountMask; Vec3f spD0[100]; @@ -2729,7 +2729,7 @@ void Andross_8018DBF0(Boss* boss) { Andross_8018DA94(boss, &boss->vwork[17]); break; case 173: - func_effect_8007A6F0(&boss->obj.pos, NA_SE_EN_EXPLOSION_L); + Effect_SpawnTimedSfxAtPos(&boss->obj.pos, NA_SE_EN_EXPLOSION_L); func_effect_8007B344(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 100.0f, 4); break; case 180: @@ -3124,7 +3124,7 @@ void Andross_801924B4(s32 limbIndex, Vec3f* rot, void* data) { } } -void Andross_801928C8(Boss* boss) { +void Andross_Boss320_Draw(Boss* boss) { if (boss->timer_058 == 0) { // FAKE @@ -3195,7 +3195,7 @@ void Andross_801928C8(Boss* boss) { } } -void Andross_80192E94(Actor* actor) { +void Andross_Actor285_Update(Actor* actor) { Actor* otherActor; s32 i; @@ -3252,15 +3252,15 @@ void Andross_80192E94(Actor* actor) { RAND_FLOAT_CENTERED(10.0f) + actor->obj.pos.y, actor->obj.pos.z, RAND_FLOAT(0.5f) + 0.5f); } - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); Object_Kill(&actor->obj, actor->sfxSource); } } } -void Andross_80193244(Actor* actor) { - +void Andross_Actor285_Draw(Actor* actor) { gSPDisplayList(gMasterDisp++, D_VE2_6007E20); + if (actor->timer_0BC != 0) { f32 scale; u8 alpha; @@ -3281,7 +3281,7 @@ void Andross_80193244(Actor* actor) { } } -void Andross_80193380(Scenery* scenery) { +void Andross_Scenery132_Update(Scenery* scenery) { switch (scenery->state) { case 0: @@ -3310,14 +3310,14 @@ bool Andross_801934EC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return false; } -void Andross_8019350C(Scenery* scenery) { +void Andross_Scenery132_Draw(Scenery* scenery) { Vec3f frameTable[20]; Animation_GetFrameData(&D_VE2_6014658, scenery->unk_44, frameTable); Animation_DrawSkeleton(1, D_VE2_6014844, frameTable, Andross_801934EC, NULL, NULL, &gIdentityMatrix); } -void Andross_8019356C(Scenery* scenery) { +void Andross_Scenery131_Update(Scenery* scenery) { scenery->obj.rot.z = D_Andross_801A7F68; scenery->obj.pos.z += scenery->effectVel.z; if (scenery->timer_4C == 1) { @@ -3332,7 +3332,7 @@ bool Andross_801935B4(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return false; } -void Andross_801935D4(Scenery* scenery) { +void Andross_Scenery131_Draw(Scenery* scenery) { Vec3f frameTable[20]; Animation_GetFrameData(&D_VE2_6014658, scenery->unk_44, frameTable); @@ -3519,7 +3519,7 @@ void Andross_80193C4C(Player* player) { switch (gCsFrameCount) { case 80: func_effect_8007A568(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 40.0f); - func_effect_8007A6F0(&boss->obj.pos, NA_SE_EN_EXPLOSION_L); + Effect_SpawnTimedSfxAtPos(&boss->obj.pos, NA_SE_EN_EXPLOSION_L); /* fallthrough */ case 85: case 90: @@ -3657,7 +3657,7 @@ void Andross_80193C4C(Player* player) { gScenery360[i].obj.status = OBJ_FREE; } Andross_80193710(); - D_ctx_8017782C = 1; + D_ctx_8017782C = true; Play_InitEnvironment(); gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; gFillScreenAlpha = gFillScreenAlphaTarget = 255; diff --git a/src/overlays/ovl_i6/fox_sy.c b/src/overlays/ovl_i6/fox_sy.c index 7c39ed0e..f87aa39a 100644 --- a/src/overlays/ovl_i6/fox_sy.c +++ b/src/overlays/ovl_i6/fox_sy.c @@ -1,3 +1,9 @@ +/* + * File: fox_sy.c + * System: SectorY + * Description: Level: Sector Y + */ + #include "global.h" #include "assets/ast_sector_y.h" @@ -23,41 +29,47 @@ void SectorY_SpawnDebris(f32, f32, f32, f32, f32, f32, s32); f32 D_i6_801A8440[3]; -void SectorY_80197B30(Actor* actor, s32 timer) { - Actor_Initialize(actor); - actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.pos.x = gPlayer[0].pos.x; - actor->obj.pos.y = gPlayer[0].pos.y; - actor->obj.pos.z = gPlayer[0].pos.z; - actor->fwork[0] = gPlayer[0].baseSpeed; - actor->vel.x = gPlayer[0].vel.x; - actor->vel.y = gPlayer[0].vel.y; - actor->vel.z = gPlayer[0].vel.z; - actor->obj.rot.x = gPlayer[0].xRot_120 + gPlayer[0].rot.x + gPlayer[0].aerobaticPitch; - actor->obj.rot.y = gPlayer[0].yRot_114 + gPlayer[0].rot.y + 180.0f; - actor->obj.rot.z = gPlayer[0].rot.z; - actor->state = 5; - actor->timer_04C = timer; - actor->iwork[11] = 1; - Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); +void SectorY_80197B30(ActorCutscene* this, s32 timer) { + Actor_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_ACTOR_CUTSCENE; + + this->obj.pos.x = gPlayer[0].pos.x; + this->obj.pos.y = gPlayer[0].pos.y; + this->obj.pos.z = gPlayer[0].pos.z; + + this->fwork[0] = gPlayer[0].baseSpeed; + + this->vel.x = gPlayer[0].vel.x; + this->vel.y = gPlayer[0].vel.y; + this->vel.z = gPlayer[0].vel.z; + + this->obj.rot.x = gPlayer[0].xRot_120 + gPlayer[0].rot.x + gPlayer[0].aerobaticPitch; + this->obj.rot.y = gPlayer[0].yRot_114 + gPlayer[0].rot.y + 180.0f; + this->obj.rot.z = gPlayer[0].rot.z; + + this->state = 5; + this->timer_04C = timer; + this->iwork[11] = 1; + Object_SetInfo(&this->info, this->obj.id); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); } -void SectorY_80197C64(Effect* effect) { +void SectorY_Effect354_Draw(Effect354* this) { RCP_SetupDL_21(); gSPDisplayList(gMasterDisp++, D_SY_6014A40); RCP_SetupDL(&gMasterDisp, SETUPDL_64); } -void SectorY_80197CB8(Scenery* scenery) { +void SectorY_Scenery156_Draw(Scenery* scenery) { } -void SectorY_Boss314_Init(Boss314* this) { +void SectorY_Boss314_Init(BossSY* this) { this->fwork[9] = 0.0f; this->swork[33] = 5500; this->timer_050 = 10; this->timer_058 = 0; + D_ctx_80177A10[8] = 0; if (this->index == 0) { @@ -106,146 +118,147 @@ void SectorY_Boss314_Init(Boss314* this) { } } -void SectorY_80197F18(Boss* boss) { - boss->swork[20] = 0; - boss->swork[21] = 3; - boss->fwork[9] = 0.0f; - boss->timer_050 = RAND_INT(100.0f) + 60; - if (boss->index != 0) { - boss->timer_050 += 60; +void SectorY_80197F18(Boss* this) { + this->swork[20] = 0; + this->swork[21] = 3; + this->fwork[9] = 0.0f; + this->timer_050 = RAND_INT(100.0f) + 60; + if (this->index != 0) { + this->timer_050 += 60; } } -void SectorY_80197F84(Boss* boss) { +void SectorY_80197F84(Boss* this) { f32 yaw; - Math_SmoothStepToF(&boss->obj.pos.y, 0.0f, 0.5f, 15.0f, 0.1f); - Math_SmoothStepToF(&boss->vel.y, 0.0f, 0.1f, 0.2f, 0.1f); - Math_SmoothStepToF(&boss->vel.z, 0.0f, 0.1f, 0.2f, 0.1f); - Math_SmoothStepToF(&boss->vel.x, 0.0f, 0.1f, 0.2f, 0.1f); - Math_SmoothStepToAngle(&boss->rot_078.x, 0.0f, 0.1f, 4.0f, 0.1f); + Math_SmoothStepToF(&this->obj.pos.y, 0.0f, 0.5f, 15.0f, 0.1f); + Math_SmoothStepToF(&this->vel.y, 0.0f, 0.1f, 0.2f, 0.1f); + Math_SmoothStepToF(&this->vel.z, 0.0f, 0.1f, 0.2f, 0.1f); + Math_SmoothStepToF(&this->vel.x, 0.0f, 0.1f, 0.2f, 0.1f); + Math_SmoothStepToAngle(&this->rot_078.x, 0.0f, 0.1f, 4.0f, 0.1f); - if (SectorY_8019B5CC(boss)) { - Math_SmoothStepToF(&boss->obj.pos.y, 1000.0f, 0.1f, 30.0f, 0.1f); + if (SectorY_8019B5CC(this)) { + Math_SmoothStepToF(&this->obj.pos.y, 1000.0f, 0.1f, 30.0f, 0.1f); } else { - Math_SmoothStepToF(&boss->obj.pos.y, 0.0f, 0.1f, 10.0f, 0.1f); + Math_SmoothStepToF(&this->obj.pos.y, 0.0f, 0.1f, 10.0f, 0.1f); } - SectorY_8019B6E8(boss); - if (boss->timer_052 == 0) { - SectorY_8019BC14(boss); + SectorY_8019B6E8(this); + if (this->timer_052 == 0) { + SectorY_8019BC14(this); } - yaw = Math_RadToDeg(Math_Atan2F(boss->fwork[18] - boss->obj.pos.x, boss->fwork[20] - boss->obj.pos.z)); + yaw = Math_RadToDeg(Math_Atan2F(this->fwork[18] - this->obj.pos.x, this->fwork[20] - this->obj.pos.z)); - Math_SmoothStepToAngle(&boss->rot_078.y, yaw, 0.1f, 8.0f, 0.1f); + Math_SmoothStepToAngle(&this->rot_078.y, yaw, 0.1f, 8.0f, 0.1f); - if (boss->timer_050 == 0) { - SectorY_80198244(boss); + if (this->timer_050 == 0) { + SectorY_80198244(this); } - if (boss->swork[22] == 1) { - if (ABS(boss->vel.x) <= 1.0f && (ABS(boss->vel.z) <= 1.0f) && - (fabsf(boss->fwork[18] - boss->obj.pos.x) <= 400.0f) && - (fabsf(boss->fwork[20] - boss->obj.pos.z) <= 1400.0f)) { - if ((Rand_ZeroOne() < 0.2f) && (boss->rot_078.x == 0.0f)) { - SectorY_8019AA08(boss); + if (this->swork[22] == 1) { + if (ABS(this->vel.x) <= 1.0f && (ABS(this->vel.z) <= 1.0f) && + (fabsf(this->fwork[18] - this->obj.pos.x) <= 400.0f) && + (fabsf(this->fwork[20] - this->obj.pos.z) <= 1400.0f)) { + if ((Rand_ZeroOne() < 0.2f) && (this->rot_078.x == 0.0f)) { + SectorY_8019AA08(this); } if (Rand_ZeroOne() < 0.2f) { - SectorY_80198244(boss); + SectorY_80198244(this); } } } - if (SectorY_8019B528(boss)) { - SectorY_80198ABC(boss); + if (SectorY_8019B528(this)) { + SectorY_80198ABC(this); } } -void SectorY_80198238(Boss* boss) { +void SectorY_80198238(Boss* this) { } -void SectorY_80198244(Boss* boss) { +void SectorY_80198244(Boss* this) { f32 speed; - boss->swork[20] = 3; - boss->swork[21] = 1; - boss->timer_056 = (s32) (RAND_FLOAT(500.0f) + 100.0f); - boss->fwork[11] = SIN_DEG(boss->rot_078.y) * boss->fwork[45]; - boss->fwork[13] = COS_DEG(boss->rot_078.y) * boss->fwork[45]; - speed = ABS(boss->vel.x); + this->swork[20] = 3; + this->swork[21] = 1; + this->timer_056 = (s32) (RAND_FLOAT(500.0f) + 100.0f); + this->fwork[11] = SIN_DEG(this->rot_078.y) * this->fwork[45]; + this->fwork[13] = COS_DEG(this->rot_078.y) * this->fwork[45]; + + speed = ABS(this->vel.x); if (speed < 5.0f) { - Math_SmoothStepToF(&boss->vel.x, boss->fwork[11], 0.1f, 5.0f, 0.1f); + Math_SmoothStepToF(&this->vel.x, this->fwork[11], 0.1f, 5.0f, 0.1f); } - speed = ABS(boss->vel.z); + speed = ABS(this->vel.z); if (speed < 5.0f) { - Math_SmoothStepToF(&boss->vel.z, boss->fwork[13], 0.1f, 5.0f, 0.1f); + Math_SmoothStepToF(&this->vel.z, this->fwork[13], 0.1f, 5.0f, 0.1f); } - boss->fwork[10] = 181.0f; - boss->fwork[34] = 2.8f; - AUDIO_PLAY_SFX(NA_SE_EN_MS_DASH, boss->sfxSource, 4); + this->fwork[10] = 181.0f; + this->fwork[34] = 2.8f; + AUDIO_PLAY_SFX(NA_SE_EN_MS_DASH, this->sfxSource, 4); } -void SectorY_801983E4(Boss* boss) { +void SectorY_801983E4(Boss* this) { f32 yAngle; f32 xSpeed; f32 zSpeed; - SectorY_8019B6E8(boss); + SectorY_8019B6E8(this); - if (boss->timer_052 == 0) { - SectorY_8019BC14(boss); + if (this->timer_052 == 0) { + SectorY_8019BC14(this); } - Math_SmoothStepToAngle(&boss->rot_078.z, 0.0f, 0.1f, 2.0f, 0.1f); - Math_SmoothStepToAngle(&boss->rot_078.x, 0.0f, 0.1f, 2.0f, 0.1f); - Math_SmoothStepToF(&boss->vel.x, boss->fwork[11], 0.1f, 0.5f, 0.1f); - Math_SmoothStepToF(&boss->vel.z, boss->fwork[13], 0.1f, 0.5f, 0.1f); - Math_SmoothStepToF(&boss->vel.y, 0.0f, 0.1f, 0.2f, 0.1f); + Math_SmoothStepToAngle(&this->rot_078.z, 0.0f, 0.1f, 2.0f, 0.1f); + Math_SmoothStepToAngle(&this->rot_078.x, 0.0f, 0.1f, 2.0f, 0.1f); + Math_SmoothStepToF(&this->vel.x, this->fwork[11], 0.1f, 0.5f, 0.1f); + Math_SmoothStepToF(&this->vel.z, this->fwork[13], 0.1f, 0.5f, 0.1f); + Math_SmoothStepToF(&this->vel.y, 0.0f, 0.1f, 0.2f, 0.1f); - xSpeed = ABS(boss->fwork[18] - boss->obj.pos.x); - zSpeed = ABS(boss->fwork[20] - boss->obj.pos.z); + xSpeed = ABS(this->fwork[18] - this->obj.pos.x); + zSpeed = ABS(this->fwork[20] - this->obj.pos.z); - if (boss->rot_078.x != 0.0f) { - Math_SmoothStepToAngle(&boss->rot_078.x, boss->fwork[10], 0.1f, 6.0f, 0.1f); - if (boss->rot_078.x < 200.0f) { - boss->swork[21] = 1; - boss->fwork[10] = 0.0f; - boss->rot_078.x = 0.0f; - boss->rot_078.y -= 180.0f; - boss->rot_078.z -= 180.0f; - if (boss->rot_078.y < 0.0f) { - boss->rot_078.y += 360.0f; + if (this->rot_078.x != 0.0f) { + Math_SmoothStepToAngle(&this->rot_078.x, this->fwork[10], 0.1f, 6.0f, 0.1f); + if (this->rot_078.x < 200.0f) { + this->swork[21] = 1; + this->fwork[10] = 0.0f; + this->rot_078.x = 0.0f; + this->rot_078.y -= 180.0f; + this->rot_078.z -= 180.0f; + if (this->rot_078.y < 0.0f) { + this->rot_078.y += 360.0f; } - if (boss->rot_078.z < 0.0f) { - boss->rot_078.z += 360.0f; + if (this->rot_078.z < 0.0f) { + this->rot_078.z += 360.0f; } - boss->fwork[11] = SIN_DEG(boss->rot_078.y) * boss->fwork[45]; - boss->fwork[13] = COS_DEG(boss->rot_078.y) * boss->fwork[45]; - boss->fwork[34] = 2.8f; + this->fwork[11] = SIN_DEG(this->rot_078.y) * this->fwork[45]; + this->fwork[13] = COS_DEG(this->rot_078.y) * this->fwork[45]; + this->fwork[34] = 2.8f; } } - SectorY_8019C194(boss, zSpeed, xSpeed); + SectorY_8019C194(this, zSpeed, xSpeed); - if (boss->swork[22] == 1) { + if (this->swork[22] == 1) { yAngle = gPlayer[0].yRot_114 - 180.0f; if (yAngle < 0.0f) { yAngle += 360.0f; } - yAngle = boss->rot_078.y - yAngle; + yAngle = this->rot_078.y - yAngle; if (yAngle < 0.0f) { yAngle += 360.0f; } if ((zSpeed <= 1300.0f) && (xSpeed <= 800.0f) && (yAngle < 260.0f) && (yAngle > 100.0f) && - (boss->rot_078.x == 0.0f) && (boss->fwork[34] <= 2.0f)) { + (this->rot_078.x == 0.0f) && (this->fwork[34] <= 2.0f)) { if (Rand_ZeroOne() < 0.2f) { - SectorY_8019AA08(boss); + SectorY_8019AA08(this); } } @@ -253,77 +266,77 @@ void SectorY_801983E4(Boss* boss) { if (((yAngle >= 60.0f) && (yAngle <= 100.0f)) || ((yAngle <= 300.0f) && (yAngle >= 260.0f))) { if (Rand_ZeroOne() < 0.3f) { if (Rand_ZeroOne() < 0.4f) { - SectorY_80197F18(boss); + SectorY_80197F18(this); } else { - SectorY_80199D64(boss); + SectorY_80199D64(this); } } } - if (((yAngle > 300.0f) || (yAngle < 60.0f)) && (boss->rot_078.x == 0.0f)) { + if (((yAngle > 300.0f) || (yAngle < 60.0f)) && (this->rot_078.x == 0.0f)) { if (Rand_ZeroOne() < 0.3f) { if (Rand_ZeroOne() < 0.4f) { - SectorY_80197F18(boss); + SectorY_80197F18(this); } else { - SectorY_80199D64(boss); + SectorY_80199D64(this); } } else if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_U_TURN) { - Math_SmoothStepToAngle(&boss->rot_078.x, 181.0f, 0.1f, 6.0f, 0.1f); - boss->swork[21] = 3; - boss->fwork[11] = SIN_DEG(boss->rot_078.y) * (boss->fwork[45] + 10.0f); - boss->fwork[13] = COS_DEG(boss->rot_078.y) * (boss->fwork[45] + 10.0f); - boss->fwork[34] = 2.8f; + Math_SmoothStepToAngle(&this->rot_078.x, 181.0f, 0.1f, 6.0f, 0.1f); + this->swork[21] = 3; + this->fwork[11] = SIN_DEG(this->rot_078.y) * (this->fwork[45] + 10.0f); + this->fwork[13] = COS_DEG(this->rot_078.y) * (this->fwork[45] + 10.0f); + this->fwork[34] = 2.8f; } } } } - if (SectorY_8019B5CC(boss)) { - Math_SmoothStepToF(&boss->obj.pos.y, 1000.0f, 0.1f, 30.0f, 0.1f); + if (SectorY_8019B5CC(this)) { + Math_SmoothStepToF(&this->obj.pos.y, 1000.0f, 0.1f, 30.0f, 0.1f); } else { - Math_SmoothStepToF(&boss->obj.pos.y, 0.0f, 0.1f, 5.0f, 0.1f); + Math_SmoothStepToF(&this->obj.pos.y, 0.0f, 0.1f, 5.0f, 0.1f); } - if (boss->timer_056 == 0) { + if (this->timer_056 == 0) { if (Rand_ZeroOne() <= 0.7f) { - SectorY_80199D64(boss); + SectorY_80199D64(this); } else { - SectorY_80197F18(boss); + SectorY_80197F18(this); } } - if (SectorY_8019B528(boss)) { - SectorY_80198ABC(boss); + if (SectorY_8019B528(this)) { + SectorY_80198ABC(this); } } -void SectorY_80198ABC(Boss* boss) { - f32 yAngle; +void SectorY_80198ABC(Boss* this) { + f32 yAngle = Math_RadToDeg(Math_Atan2F(-this->obj.pos.x, -300.0f - this->obj.pos.z)) - this->rot_078.y; - yAngle = Math_RadToDeg(Math_Atan2F(-boss->obj.pos.x, -300.0f - boss->obj.pos.z)) - boss->rot_078.y; if (yAngle < 0.0f) { yAngle += 360.0f; } - boss->swork[20] = 4; - boss->swork[21] = 3; - boss->fwork[34] = 4.5f; + this->swork[20] = 4; + this->swork[21] = 3; + this->fwork[34] = 4.5f; - boss->timer_056 = (s32) (RAND_FLOAT(100.0f) + 100.0f); - boss->timer_050 = 0; + this->timer_056 = (s32) (RAND_FLOAT(100.0f) + 100.0f); + this->timer_050 = 0; if (yAngle > 180.0f) { - boss->fwork[27] = 40.0f; - if (boss->index == 0) { - boss->fwork[42] = 1.8f; + this->fwork[27] = 40.0f; + if (this->index == 0) { + this->fwork[42] = 1.8f; } } else { - boss->fwork[27] = 320.0f; - if (boss->index == 0) { - boss->fwork[41] = 1.8f; + this->fwork[27] = 320.0f; + if (this->index == 0) { + this->fwork[41] = 1.8f; } } - AUDIO_PLAY_SFX(NA_SE_EN_MS_DASH, boss->sfxSource, 4); + + AUDIO_PLAY_SFX(NA_SE_EN_MS_DASH, this->sfxSource, 4); switch (D_ctx_80177A10[8]) { case 0: @@ -350,78 +363,78 @@ void SectorY_80198ABC(Boss* boss) { D_ctx_80177A10[8] %= 4U; } -void SectorY_80198CE4(Boss* boss) { +void SectorY_80198CE4(Boss* this) { f32 yAngle; - SectorY_8019B6E8(boss); + SectorY_8019B6E8(this); - if (boss->timer_052 == 0) { - SectorY_8019BC14(boss); + if (this->timer_052 == 0) { + SectorY_8019BC14(this); } - Math_SmoothStepToAngle(&boss->rot_078.z, boss->fwork[27], 0.1f, 0.5f, 0.1f); - Math_SmoothStepToAngle(&boss->rot_078.x, 0.0f, 0.1f, 4.0f, 0.1f); - yAngle = Math_RadToDeg(Math_Atan2F(-boss->obj.pos.x, -300.0f - boss->obj.pos.z)); + Math_SmoothStepToAngle(&this->rot_078.z, this->fwork[27], 0.1f, 0.5f, 0.1f); + Math_SmoothStepToAngle(&this->rot_078.x, 0.0f, 0.1f, 4.0f, 0.1f); + yAngle = Math_RadToDeg(Math_Atan2F(-this->obj.pos.x, -300.0f - this->obj.pos.z)); - if (boss->index != 0) { - Math_SmoothStepToAngle(&boss->rot_078.y, yAngle, 0.1f, 1.0f, 0.1f); + if (this->index != 0) { + Math_SmoothStepToAngle(&this->rot_078.y, yAngle, 0.1f, 1.0f, 0.1f); } else { - Math_SmoothStepToAngle(&boss->rot_078.y, yAngle, 0.1f, 2.0f, 0.1f); + Math_SmoothStepToAngle(&this->rot_078.y, yAngle, 0.1f, 2.0f, 0.1f); } - if (boss->index == 0) { - boss->vel.x = SIN_DEG(boss->rot_078.y) * (boss->fwork[45] + 20.0f); - boss->vel.z = COS_DEG(boss->rot_078.y) * (boss->fwork[45] + 20.0f); + if (this->index == 0) { + this->vel.x = SIN_DEG(this->rot_078.y) * (this->fwork[45] + 20.0f); + this->vel.z = COS_DEG(this->rot_078.y) * (this->fwork[45] + 20.0f); } else { - boss->vel.x = SIN_DEG(boss->rot_078.y) * boss->fwork[45]; - boss->vel.z = COS_DEG(boss->rot_078.y) * boss->fwork[45]; + this->vel.x = SIN_DEG(this->rot_078.y) * this->fwork[45]; + this->vel.z = COS_DEG(this->rot_078.y) * this->fwork[45]; } - if (SectorY_8019B5CC(boss)) { - Math_SmoothStepToF(&boss->obj.pos.y, 1000.0f, 0.1f, 30.0f, 0.1f); + if (SectorY_8019B5CC(this)) { + Math_SmoothStepToF(&this->obj.pos.y, 1000.0f, 0.1f, 30.0f, 0.1f); } else { - Math_SmoothStepToF(&boss->obj.pos.y, 0.0f, 0.1f, 5.0f, 0.1f); + Math_SmoothStepToF(&this->obj.pos.y, 0.0f, 0.1f, 5.0f, 0.1f); } - Math_SmoothStepToF(&boss->vel.y, 0.0f, 0.1f, 0.2f, 0.1f); + Math_SmoothStepToF(&this->vel.y, 0.0f, 0.1f, 0.2f, 0.1f); - yAngle -= boss->rot_078.y; + yAngle -= this->rot_078.y; if (yAngle < 0.0f) { yAngle += 360.0f; } - if (!SectorY_8019B528(boss) && ((yAngle <= 20.0f) || (yAngle >= 320.0f))) { - SectorY_80198244(boss); + if (!SectorY_8019B528(this) && ((yAngle <= 20.0f) || (yAngle >= 320.0f))) { + SectorY_80198244(this); } } -void SectorY_80198F5C(Boss* boss) { +void SectorY_80198F5C(Boss* this) { Vec3f vec; Vec3f sp48; f32 xDisplacement; f32 zDisplacement; s32 i; - boss->timer_05C = 20; - func_effect_8007C120(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, boss->vel.x, boss->vel.y, boss->vel.z, 0.1f, + this->timer_05C = 20; + func_effect_8007C120(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, this->vel.z, 0.1f, 10); - boss->health -= boss->damage; + this->health -= this->damage; - if (boss->health < 0) { - boss->health = 0; + if (this->health < 0) { + this->health = 0; } - boss->timer_058 = 20; + this->timer_058 = 20; - if (boss->health <= 0) { - boss->unk_04C = 0; - boss->swork[36] = 0; - boss->swork[21] = 9; - boss->info.hitbox = SEGMENTED_TO_VIRTUAL(gNoHitbox); + if (this->health <= 0) { + this->unk_04C = 0; + this->swork[36] = 0; + this->swork[21] = 9; + this->info.hitbox = SEGMENTED_TO_VIRTUAL(gNoHitbox); - if (boss->index == 0) { - boss->timer_058 = 20000; - boss->vel.x = boss->vel.y = boss->vel.z = 0.0f; + if (this->index == 0) { + this->timer_058 = 20000; + this->vel.x = this->vel.y = this->vel.z = 0.0f; if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { gCsFrameCount = 0; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; @@ -436,7 +449,7 @@ void SectorY_80198F5C(Boss* boss) { } gPlayer[0].yRot_114 = 0.0f; } - AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, this->sfxSource, 4); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 30); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 30); return; @@ -449,34 +462,34 @@ void SectorY_80198F5C(Boss* boss) { for (i = 4; i < ARRAY_COUNT(gActors); i++) { if (gActors[i].obj.status == OBJ_FREE) { - SectorY_80197B30(&gActors[i], boss->index); + SectorY_80197B30(&gActors[i], this->index); D_ctx_80177A10[9] = i; break; } } - boss->timer_058 = 2000; - boss->vel.z = 0.0f; - boss->vel.y = 0.0f; - boss->vel.x = 0.0f; + this->timer_058 = 2000; + this->vel.z = 0.0f; + this->vel.y = 0.0f; + this->vel.x = 0.0f; if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { - boss->timer_058 = 100; + this->timer_058 = 100; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_STANDBY; gCsFrameCount = 0; - xDisplacement = gPlayer[0].cam.eye.x - boss->obj.pos.x; - zDisplacement = gPlayer[0].cam.eye.z - boss->obj.pos.z; + xDisplacement = gPlayer[0].cam.eye.x - this->obj.pos.x; + zDisplacement = gPlayer[0].cam.eye.z - this->obj.pos.z; D_ctx_80177A48[8] = Math_RadToDeg(Math_Atan2F(xDisplacement, zDisplacement)); Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[8] * M_DTOR, MTXF_NEW); vec.x = 0.0f; vec.y = 0.0f; vec.z = 900.0f; Matrix_MultVec3f(gCalcMatrix, &vec, &sp48); - gCsCamEyeX = boss->obj.pos.x + sp48.x; - gCsCamEyeY = boss->obj.pos.y + 400.0f; - gCsCamEyeZ = boss->obj.pos.z + sp48.z; - gCsCamAtX = boss->obj.pos.x; - gCsCamAtY = boss->obj.pos.y; - gCsCamAtZ = boss->obj.pos.z; + gCsCamEyeX = this->obj.pos.x + sp48.x; + gCsCamEyeY = this->obj.pos.y + 400.0f; + gCsCamEyeZ = this->obj.pos.z + sp48.z; + gCsCamAtX = this->obj.pos.x; + gCsCamAtY = this->obj.pos.y; + gCsCamAtZ = this->obj.pos.z; D_ctx_80177A48[0] = 0.1f; if (Rand_ZeroOne() > 0.5f) { D_ctx_80177A48[9] = -3.0f; @@ -485,12 +498,12 @@ void SectorY_80198F5C(Boss* boss) { D_ctx_80177A48[9] = 3.0f; } } else { - if (boss->index != 0) { - AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, boss->sfxSource, 4); - } else if (boss->health > 70) { - AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, boss->sfxSource, 4); + if (this->index != 0) { + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, this->sfxSource, 4); + } else if (this->health > 70) { + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, this->sfxSource, 4); } else { - AUDIO_PLAY_SFX(NA_SE_EN_KNOCK_DOWN, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_KNOCK_DOWN, this->sfxSource, 4); } if ((gBosses[1].obj.status == OBJ_FREE) && (gBosses[2].obj.status == OBJ_FREE)) { @@ -499,24 +512,24 @@ void SectorY_80198F5C(Boss* boss) { } } -void SectorY_80199438(Boss* boss) { +void SectorY_80199438(Boss* this) { s32 i; s32 j; Vec3f vec; Vec3f sp68; - if (boss->health <= 0) { - if (boss->index == 0) { - boss->vel.x = boss->vel.y = boss->vel.z = 0.0f; + if (this->health <= 0) { + if (this->index == 0) { + this->vel.x = this->vel.y = this->vel.z = 0.0f; if (gCsFrameCount < 61) { - boss->fwork[0] = 0.0f; + this->fwork[0] = 0.0f; } if (gCsFrameCount == 61) { Radio_PlayMessage(gMsg_ID_14360, RCID_BOSS_SECTORY); } if (gCsFrameCount >= 80) { - boss->fwork[0] = 1.0f; + this->fwork[0] = 1.0f; } } else { D_ctx_80177A48[8] += D_ctx_80177A48[9]; @@ -528,36 +541,39 @@ void SectorY_80199438(Boss* boss) { Matrix_MultVec3f(gCalcMatrix, &vec, &sp68); - gCsCamEyeX = boss->obj.pos.x + sp68.x; - gCsCamEyeZ = boss->obj.pos.z + sp68.z; + gCsCamEyeX = this->obj.pos.x + sp68.x; + gCsCamEyeZ = this->obj.pos.z + sp68.z; - if ((boss->timer_058 == 40) && gBosses[1].obj.status == OBJ_FREE && gBosses[2].obj.status == OBJ_FREE) { + if ((this->timer_058 == 40) && (gBosses[1].obj.status == OBJ_FREE) && (gBosses[2].obj.status == OBJ_FREE)) { Radio_PlayMessage(gMsg_ID_14360, RCID_BOSS_SECTORY); } - if (boss->timer_058 > 85) { - boss->fwork[0] = 0.0f; + if (this->timer_058 > 85) { + this->fwork[0] = 0.0f; } - if (boss->timer_058 < 67) { - boss->fwork[0] = 1.0f; + if (this->timer_058 < 67) { + this->fwork[0] = 1.0f; } - if ((boss->timer_058 == 60) && (boss->swork[19] == 0)) { - BonusText_Display(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 3); + if ((this->timer_058 == 60) && (this->swork[19] == 0)) { + BonusText_Display(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 3); gHitCount += 4; } - if (boss->timer_058 == 50) { - AUDIO_PLAY_SFX(NA_SE_EN_MS_EXPLOSION_S, boss->sfxSource, 4); + if (this->timer_058 == 50) { + AUDIO_PLAY_SFX(NA_SE_EN_MS_EXPLOSION_S, this->sfxSource, 4); gControllerRumbleFlags[gMainController] = 1; gControllerRumbleTimers[gMainController] = 20; + D_ctx_80177850 = 15; - boss->swork[36]++; - func_effect_8007BFFC(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, boss->vel.x, boss->vel.y, - boss->vel.z, 8.0f, 10); - func_effect_8007B344(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 8.0f, 5); + this->swork[36]++; + + func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, + this->vel.z, 8.0f, 10); + func_effect_8007B344(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 8.0f, 5); + for (i = 10; i < 24; i++) { if (i != 15) { - SectorY_SpawnDebris(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, + SectorY_SpawnDebris(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT_CENTERED(50.0f), - RAND_FLOAT_CENTERED(50.0f) + boss->vel.z, i); + RAND_FLOAT_CENTERED(50.0f) + this->vel.z, i); } } } @@ -569,14 +585,14 @@ void SectorY_80199438(Boss* boss) { Math_SmoothStepToF(&gPlayer[0].cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 20000.0f, 0); } - if (((gGameFrameCount % 4) == 0) && (boss->swork[36] == 0)) { - func_effect_8007C120(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, boss->vel.x, boss->vel.y, - boss->vel.z, 0.1f, 5); + if (((gGameFrameCount % 4) == 0) && (this->swork[36] == 0)) { + func_effect_8007C120(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, + this->vel.z, 0.1f, 5); } - if ((gCsFrameCount == 120) && (boss->swork[36] == 0) && (boss->index == 0)) { - if (boss->swork[19] == 0) { - Boss_AwardBonus(boss); + if ((gCsFrameCount == 120) && (this->swork[36] == 0) && (this->index == 0)) { + if (this->swork[19] == 0) { + Boss_AwardBonus(this); } for (i = 0; i < 2; i++) { @@ -585,26 +601,26 @@ void SectorY_80199438(Boss* boss) { } } - Audio_KillSfxBySource(boss->sfxSource); + Audio_KillSfxBySource(this->sfxSource); gShowBossHealth = 0; - func_effect_8007A568(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 40.0f); - func_effect_8007D0E0(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 30.0f); - func_enmy_80062B60(boss->obj.pos.x, boss->obj.pos.z, 0, 120.0f); + func_effect_8007A568(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 40.0f); + func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 30.0f); + func_enmy_80062B60(this->obj.pos.x, this->obj.pos.z, 0, 120.0f); gCameraShake = 25; - boss->swork[36]++; + this->swork[36]++; for (i = 10; i < 24; i++) { if (i != 15) { - SectorY_SpawnDebris(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, RAND_FLOAT_CENTERED(50.0f), - RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT_CENTERED(50.0f) + boss->vel.z, i); + SectorY_SpawnDebris(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, RAND_FLOAT_CENTERED(50.0f), + RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT_CENTERED(50.0f) + this->vel.z, i); } } - boss->timer_058 = 100; - boss->vel.x = boss->vel.y = boss->vel.z = 0.0f; + this->timer_058 = 100; + this->vel.x = this->vel.y = this->vel.z = 0.0f; } - if (boss->timer_058 == 1) { - if (boss->index != 0) { + if (this->timer_058 == 1) { + if (this->index != 0) { Object_Kill(&gActors[D_ctx_80177A10[9]].obj, gActors[D_ctx_80177A10[9]].sfxSource); if ((gBosses[1].obj.status == OBJ_FREE) || (gBosses[2].obj.status == OBJ_FREE)) { gBosses[0].unk_04A = 1; @@ -612,203 +628,205 @@ void SectorY_80199438(Boss* boss) { gScenery360[0].info.drawType = 0; } else { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ACTIVE; - Camera_UpdateArwing360(&gPlayer[0], 1); + Camera_UpdateArwing360(&gPlayer[0], true); gPlayer[0].unk_014 = 0.0f; if (gTeamShields[TEAM_ID_PEPPY] > 0) { AllRange_PlayMessage(gMsg_ID_14230, RCID_PEPPY); } } } - Object_Kill(&boss->obj, boss->sfxSource); + Object_Kill(&this->obj, this->sfxSource); } } else { - if (boss->health < 80) { - if (boss->swork[25] == 0) { - boss->swork[25] = 1; + if (this->health < 80) { + if (this->swork[25] == 0) { + this->swork[25] = 1; for (j = ARRAY_COUNT(gActors) - 1; j >= 0; j--) { if (gActors[j].obj.status == OBJ_FREE) { - SectorY_SetupDebris(&gActors[j], boss->fwork[28], boss->fwork[29], boss->fwork[30], + SectorY_SetupDebris(&gActors[j], this->fwork[28], this->fwork[29], this->fwork[30], RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT_CENTERED(50.0f), - RAND_FLOAT_CENTERED(50.0f) + boss->vel.z, 15); + RAND_FLOAT_CENTERED(50.0f) + this->vel.z, 15); break; } } - func_effect_8007D2C8(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z + 30.0f, 4.0f); - boss->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_6034304); - AUDIO_PLAY_SFX(NA_SE_EN_MS_SHIELD_BROKEN, boss->sfxSource, 4); + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 30.0f, 4.0f); + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_6034304); + AUDIO_PLAY_SFX(NA_SE_EN_MS_SHIELD_BROKEN, this->sfxSource, 4); } } - if (boss->health <= 80) { - boss->swork[33] = 3500; + if (this->health <= 80) { + this->swork[33] = 3500; } - if (boss->health <= 70) { - boss->swork[29] = 31; + if (this->health <= 70) { + this->swork[29] = 31; } - if (boss->health <= 50) { - boss->swork[29] = 15; + if (this->health <= 50) { + this->swork[29] = 15; } - if (boss->health <= 30) { - boss->swork[29] = 7; + if (this->health <= 30) { + this->swork[29] = 7; } - if (boss->health <= 10) { - boss->swork[29] = 3; + if (this->health <= 10) { + this->swork[29] = 3; } } } -void SectorY_80199D64(Boss* boss) { - if (boss->swork[34] >= 2) { - boss->swork[20] = 6; - boss->swork[21] = 1; - boss->fwork[12] = 1000.0f; - boss->fwork[34] = 2.8f; - boss->timer_056 = 0; - boss->vel.y = 0.0f; +void SectorY_80199D64(Boss* this) { + if (this->swork[34] >= 2) { + this->swork[20] = 6; + this->swork[21] = 1; + this->fwork[12] = 1000.0f; + this->fwork[34] = 2.8f; + this->timer_056 = 0; + this->vel.y = 0.0f; } } -void SectorY_80199DAC(Boss* boss) { +void SectorY_80199DAC(Boss* this) { f32 sp34; f32 zSpeed; f32 xSpeed; f32 yAngle; - SectorY_8019B6E8(boss); - if (boss->timer_052 == 0) { - SectorY_8019BC14(boss); + SectorY_8019B6E8(this); + + if (this->timer_052 == 0) { + SectorY_8019BC14(this); } - sp34 = Math_RadToDeg(Math_Atan2F(0.0f - boss->obj.pos.x, -300.0f - boss->obj.pos.z)); + sp34 = Math_RadToDeg(Math_Atan2F(0.0f - this->obj.pos.x, -300.0f - this->obj.pos.z)); - boss->fwork[11] = SIN_DEG(sp34) * (boss->fwork[45] + 10.0f); - boss->fwork[13] = COS_DEG(sp34) * (boss->fwork[45] + 10.0f); - boss->fwork[10] = sp34; + this->fwork[11] = SIN_DEG(sp34) * (this->fwork[45] + 10.0f); + this->fwork[13] = COS_DEG(sp34) * (this->fwork[45] + 10.0f); + this->fwork[10] = sp34; - Math_SmoothStepToAngle(&boss->rot_078.z, 0.0f, 0.1f, 4.0f, 0.1f); - Math_SmoothStepToAngle(&boss->rot_078.y, boss->fwork[10], 0.1f, 6.0f, 0.1f); - Math_SmoothStepToF(&boss->obj.pos.y, boss->fwork[12], 1.0f, 15.0f, 1.0f); + Math_SmoothStepToAngle(&this->rot_078.z, 0.0f, 0.1f, 4.0f, 0.1f); + Math_SmoothStepToAngle(&this->rot_078.y, this->fwork[10], 0.1f, 6.0f, 0.1f); + Math_SmoothStepToF(&this->obj.pos.y, this->fwork[12], 1.0f, 15.0f, 1.0f); - if (((ABS(boss->obj.pos.y) - boss->fwork[12]) <= 1800.0f) && (ABS(boss->obj.pos.x) <= 1800.0f) && - (ABS(boss->obj.pos.z + 300.0f) <= 1800.0f)) { + if (((ABS(this->obj.pos.y) - this->fwork[12]) <= 1800.0f) && (ABS(this->obj.pos.x) <= 1800.0f) && + (ABS(this->obj.pos.z + 300.0f) <= 1800.0f)) { - boss->vel.x = 0.0f; - boss->vel.z = 0.0f; + this->vel.x = 0.0f; + this->vel.z = 0.0f; - Math_SmoothStepToF(&boss->obj.pos.x, 0.0f, 0.1f, ABS(boss->fwork[11]), 0.1f); - Math_SmoothStepToF(&boss->obj.pos.z, -300.0f, 0.1f, ABS(boss->fwork[13]), 0.1f); - Math_SmoothStepToAngle(&boss->rot_078.x, 0.0f, 0.1f, 4.0f, 0.1f); + Math_SmoothStepToF(&this->obj.pos.x, 0.0f, 0.1f, ABS(this->fwork[11]), 0.1f); + Math_SmoothStepToF(&this->obj.pos.z, -300.0f, 0.1f, ABS(this->fwork[13]), 0.1f); + Math_SmoothStepToAngle(&this->rot_078.x, 0.0f, 0.1f, 4.0f, 0.1f); - boss->fwork[10] = 0.0f; + this->fwork[10] = 0.0f; - if (((ABS(boss->obj.pos.y) - boss->fwork[12]) <= 300.0f) && (ABS(boss->obj.pos.x) <= 300.0f) && - (ABS(boss->obj.pos.z + 300.0f) <= 300.0f)) { - Math_SmoothStepToF(&boss->fwork[43], 3.0f, 0.1f, 0.1f, 0.1f); - boss->swork[21] = 6; - boss->unk_04C = 27; - boss->fwork[12] = 320.0f; - if (boss->timer_056 == 0) { - boss->timer_056 = 51; - AUDIO_PLAY_SFX(NA_SE_EN_MS_DASH, boss->sfxSource, 4); + if (((ABS(this->obj.pos.y) - this->fwork[12]) <= 300.0f) && (ABS(this->obj.pos.x) <= 300.0f) && + (ABS(this->obj.pos.z + 300.0f) <= 300.0f)) { + Math_SmoothStepToF(&this->fwork[43], 3.0f, 0.1f, 0.1f, 0.1f); + this->swork[21] = 6; + this->unk_04C = 27; + this->fwork[12] = 320.0f; + if (this->timer_056 == 0) { + this->timer_056 = 51; + AUDIO_PLAY_SFX(NA_SE_EN_MS_DASH, this->sfxSource, 4); } } } else { - Math_SmoothStepToF(&boss->vel.x, boss->fwork[11], 0.1f, 0.5f, 0.1f); - Math_SmoothStepToF(&boss->vel.z, boss->fwork[13], 0.1f, 0.5f, 0.1f); + Math_SmoothStepToF(&this->vel.x, this->fwork[11], 0.1f, 0.5f, 0.1f); + Math_SmoothStepToF(&this->vel.z, this->fwork[13], 0.1f, 0.5f, 0.1f); yAngle = gPlayer[0].yRot_114 - 180.0f; if (yAngle < 0.0f) { yAngle += 360.0f; } - yAngle = boss->rot_078.y - yAngle; + yAngle = this->rot_078.y - yAngle; if (yAngle < 0.0f) { yAngle += 360.0f; } - zSpeed = ABS(boss->fwork[20] - boss->obj.pos.z); - xSpeed = ABS(boss->fwork[18] - boss->obj.pos.x); + zSpeed = ABS(this->fwork[20] - this->obj.pos.z); + xSpeed = ABS(this->fwork[18] - this->obj.pos.x); - if (boss->rot_078.x != 0.0f) { + if (this->rot_078.x != 0.0f) { if ((yAngle > 300.0f) || (yAngle < 60.0f)) { - Math_SmoothStepToAngle(&boss->rot_078.x, 181.0f, 0.1f, 6.0f, 0.1f); + Math_SmoothStepToAngle(&this->rot_078.x, 181.0f, 0.1f, 6.0f, 0.1f); } else { - Math_SmoothStepToAngle(&boss->rot_078.x, 0.0f, 0.1f, 6.0f, 0.1f); + Math_SmoothStepToAngle(&this->rot_078.x, 0.0f, 0.1f, 6.0f, 0.1f); } - } else if ((boss->swork[22] == 1) && ((yAngle > 300.0f) || (yAngle < 60.0f)) && (Rand_ZeroOne() > 0.2f)) { - Math_SmoothStepToAngle(&boss->rot_078.x, 181.0f, 0.1f, 6.0f, 0.1f); - boss->swork[21] = 3; - boss->fwork[34] = 2.8f; + } else if ((this->swork[22] == 1) && ((yAngle > 300.0f) || (yAngle < 60.0f)) && (Rand_ZeroOne() > 0.2f)) { + Math_SmoothStepToAngle(&this->rot_078.x, 181.0f, 0.1f, 6.0f, 0.1f); + this->swork[21] = 3; + this->fwork[34] = 2.8f; } - if (!SectorY_8019B5CC(boss)) { - SectorY_8019C194(boss, zSpeed, xSpeed); + if (!SectorY_8019B5CC(this)) { + SectorY_8019C194(this, zSpeed, xSpeed); } } - if (boss->timer_056 == 1) { + if (this->timer_056 == 1) { sp34 = Rand_ZeroOne(); if (sp34 >= 0.3f) { - SectorY_8019A82C(boss); + SectorY_8019A82C(this); } if (sp34 < 0.2f) { - SectorY_8019A434(boss); + SectorY_8019A434(this); } if ((sp34 < 0.3f) && (sp34 >= 0.2f)) { - SectorY_8019A640(boss); + SectorY_8019A640(this); } } } -void SectorY_8019A434(Boss* boss) { - boss->swork[20] = 7; - boss->swork[21] = 5; - boss->timer_056 = (s32) (RAND_FLOAT(130.0f) + 60.0f); - boss->fwork[11] = SIN_DEG(boss->rot_078.y) * boss->fwork[45]; - boss->fwork[13] = COS_DEG(boss->rot_078.y) * boss->fwork[45]; - boss->fwork[12] = 30.0f; - boss->fwork[10] = 181.0f; - AUDIO_PLAY_SFX(NA_SE_EN_MS_LAND, boss->sfxSource, 4); +void SectorY_8019A434(Boss* this) { + this->swork[20] = 7; + this->swork[21] = 5; + this->timer_056 = (s32) (RAND_FLOAT(130.0f) + 60.0f); + this->fwork[11] = SIN_DEG(this->rot_078.y) * this->fwork[45]; + this->fwork[13] = COS_DEG(this->rot_078.y) * this->fwork[45]; + this->fwork[12] = 30.0f; + this->fwork[10] = 181.0f; + AUDIO_PLAY_SFX(NA_SE_EN_MS_LAND, this->sfxSource, 4); } -void SectorY_8019A520(Boss* boss) { - SectorY_8019B6E8(boss); - if (boss->timer_052 == 0) { - SectorY_8019BC14(boss); +void SectorY_8019A520(Boss* this) { + SectorY_8019B6E8(this); + + if (this->timer_052 == 0) { + SectorY_8019BC14(this); } - Math_SmoothStepToAngle(&boss->rot_078.y, 0.0f, 0.1f, 2.0f, 0.1f); - Math_SmoothStepToF(&boss->vel.x, 0.0f, 0.1f, 0.2f, 0.1f); - Math_SmoothStepToF(&boss->vel.z, 6.0f, 0.1f, 0.2f, 0.1f); - Math_SmoothStepToF(&boss->vel.y, 0.0f, 0.1f, 0.2f, 0.1f); + Math_SmoothStepToAngle(&this->rot_078.y, 0.0f, 0.1f, 2.0f, 0.1f); + Math_SmoothStepToF(&this->vel.x, 0.0f, 0.1f, 0.2f, 0.1f); + Math_SmoothStepToF(&this->vel.z, 6.0f, 0.1f, 0.2f, 0.1f); + Math_SmoothStepToF(&this->vel.y, 0.0f, 0.1f, 0.2f, 0.1f); - if (boss->timer_056 == 0) { - SectorY_8019A640(boss); + if (this->timer_056 == 0) { + SectorY_8019A640(this); } else { - boss->fwork[0] = 1.0f; + this->fwork[0] = 1.0f; } - if ((boss->unk_04C == 0) || (boss->unk_04C == 27)) { - AUDIO_PLAY_SFX(NA_SE_EN_HEAVY_WALK, boss->sfxSource, 4); + if ((this->unk_04C == 0) || (this->unk_04C == 27)) { + AUDIO_PLAY_SFX(NA_SE_EN_HEAVY_WALK, this->sfxSource, 4); } } -void SectorY_8019A640(Boss* boss) { - boss->swork[20] = 8; - boss->swork[21] = 0; - boss->vel.x = 0.0f; - boss->vel.y = 0.0f; - boss->vel.z = 0.0f; - boss->timer_056 = 80; +void SectorY_8019A640(Boss* this) { + this->swork[20] = 8; + this->swork[21] = 0; + this->vel.x = 0.0f; + this->vel.y = 0.0f; + this->vel.z = 0.0f; + this->timer_056 = 80; } -void SectorY_8019A66C(Boss* boss) { +void SectorY_8019A66C(Boss* this) { + SectorY_8019B6E8(this); - SectorY_8019B6E8(boss); - if (boss->timer_052 == 0) { - SectorY_8019BC14(boss); + if (this->timer_052 == 0) { + SectorY_8019BC14(this); } - if (boss->timer_056 == 60) { - AUDIO_PLAY_SFX(NA_SE_EN_MS_DASH, boss->sfxSource, 4); - boss->fwork[34] = 4.5f; + if (this->timer_056 == 60) { + AUDIO_PLAY_SFX(NA_SE_EN_MS_DASH, this->sfxSource, 4); + this->fwork[34] = 4.5f; if (Rand_ZeroOne() > 0.5f) { AllRange_PlayMessage(gMsg_ID_14330, RCID_BOSS_SECTORY); } else { @@ -816,64 +834,64 @@ void SectorY_8019A66C(Boss* boss) { } } - if (boss->timer_056 <= 60) { - boss->fwork[11] = SIN_DEG(boss->rot_078.y) * boss->fwork[45]; - boss->fwork[13] = COS_DEG(boss->rot_078.y) * boss->fwork[45]; - boss->swork[21] = 1; - Math_SmoothStepToF(&boss->fwork[43], 0.0f, 0.1f, 0.1f, 0.1f); - Math_SmoothStepToF(&boss->vel.z, boss->fwork[13], 0.1f, 0.5f, 0.5f); - Math_SmoothStepToF(&boss->vel.x, boss->fwork[11], 0.1f, 0.5f, 0.5f); - Math_SmoothStepToF(&boss->vel.y, 10.0f, 0.1f, 0.5f, 0.5f); + if (this->timer_056 <= 60) { + this->fwork[11] = SIN_DEG(this->rot_078.y) * this->fwork[45]; + this->fwork[13] = COS_DEG(this->rot_078.y) * this->fwork[45]; + this->swork[21] = 1; + Math_SmoothStepToF(&this->fwork[43], 0.0f, 0.1f, 0.1f, 0.1f); + Math_SmoothStepToF(&this->vel.z, this->fwork[13], 0.1f, 0.5f, 0.5f); + Math_SmoothStepToF(&this->vel.x, this->fwork[11], 0.1f, 0.5f, 0.5f); + Math_SmoothStepToF(&this->vel.y, 10.0f, 0.1f, 0.5f, 0.5f); } - if (boss->timer_056 == 0) { - SectorY_80198244(boss); + if (this->timer_056 == 0) { + SectorY_80198244(this); } } -void SectorY_8019A82C(Boss* boss) { - boss->swork[20] = 9; - boss->fwork[9] = 0.0f; - boss->timer_050 = RAND_INT(150.0f) + 340; - boss->timer_056 = 0; +void SectorY_8019A82C(Boss* this) { + this->swork[20] = 9; + this->fwork[9] = 0.0f; + this->timer_050 = RAND_INT(150.0f) + 340; + this->timer_056 = 0; AllRange_PlayMessage(gMsg_ID_14340, RCID_BOSS_SECTORY); } -void SectorY_8019A898(Boss* boss) { +void SectorY_8019A898(Boss* this) { f32 yAngle1; f32 yAngle2; - SectorY_8019B6E8(boss); - if (boss->timer_052 == 0) { - SectorY_8019BC14(boss); + SectorY_8019B6E8(this); + if (this->timer_052 == 0) { + SectorY_8019BC14(this); } - yAngle1 = Math_RadToDeg(Math_Atan2F(boss->fwork[18] - boss->obj.pos.x, boss->fwork[20] - boss->obj.pos.z)); - yAngle2 = yAngle1 - boss->rot_078.y; + yAngle1 = Math_RadToDeg(Math_Atan2F(this->fwork[18] - this->obj.pos.x, this->fwork[20] - this->obj.pos.z)); + yAngle2 = yAngle1 - this->rot_078.y; if (yAngle2 < 0.0f) { yAngle2 += 360.0f; } - boss->swork[21] = 6; + this->swork[21] = 6; - if (((yAngle2 >= 30.0f) && (yAngle2 <= 330.0f)) || ((boss->unk_04C != 0)) && (boss->unk_04C != 27)) { - boss->swork[21] = 5; - Math_SmoothStepToAngle(&boss->rot_078.y, yAngle1, 0.1f, 2.0f, 0.1f); - boss->fwork[0] = 1.0f; - if ((boss->unk_04C == 0) || (boss->unk_04C == 27)) { - AUDIO_PLAY_SFX(NA_SE_EN_HEAVY_WALK, boss->sfxSource, 4); + if (((yAngle2 >= 30.0f) && (yAngle2 <= 330.0f)) || ((this->unk_04C != 0)) && (this->unk_04C != 27)) { + this->swork[21] = 5; + Math_SmoothStepToAngle(&this->rot_078.y, yAngle1, 0.1f, 2.0f, 0.1f); + this->fwork[0] = 1.0f; + if ((this->unk_04C == 0) || (this->unk_04C == 27)) { + AUDIO_PLAY_SFX(NA_SE_EN_HEAVY_WALK, this->sfxSource, 4); } } else { - boss->timer_056 = 0; + this->timer_056 = 0; } - if (boss->timer_050 == 0) { - SectorY_8019A434(boss); + if (this->timer_050 == 0) { + SectorY_8019A434(this); } } -void SectorY_8019AA08(Boss* boss) { - if (SectorY_8019B5CC(boss)) { +void SectorY_8019AA08(Boss* this) { + if (SectorY_8019B5CC(this)) { return; } @@ -882,25 +900,25 @@ void SectorY_8019AA08(Boss* boss) { } if (Rand_ZeroOne() >= 0.5f) { - boss->swork[21] = 7; - boss->swork[31] = 11; - boss->swork[32] = Animation_GetFrameCount(&D_SY_602645C) - 1; + this->swork[21] = 7; + this->swork[31] = 11; + this->swork[32] = Animation_GetFrameCount(&D_SY_602645C) - 1; - } else if (boss->index == 0) { - boss->swork[21] = 8; - boss->swork[31] = 13; - boss->swork[32] = Animation_GetFrameCount(&D_SY_60258A0) - 1; + } else if (this->index == 0) { + this->swork[21] = 8; + this->swork[31] = 13; + this->swork[32] = Animation_GetFrameCount(&D_SY_60258A0) - 1; } else { return; } - boss->swork[20] = 10; - boss->unk_04C = 0; - boss->fwork[34] = 2.8f; + this->swork[20] = 10; + this->unk_04C = 0; + this->fwork[34] = 2.8f; } -void SectorY_8019AAF0(Boss* boss) { +void SectorY_8019AAF0(Boss* this) { f32 var_fv1; f32 xAngle; f32 yAngle; @@ -908,199 +926,198 @@ void SectorY_8019AAF0(Boss* boss) { Vec3f vec; Vec3f vel; - SectorY_8019BBBC(boss); + SectorY_8019BBBC(this); - yAngle = Math_Atan2F(boss->fwork[18] - boss->obj.pos.x, boss->fwork[20] - boss->obj.pos.z); + yAngle = Math_Atan2F(this->fwork[18] - this->obj.pos.x, this->fwork[20] - this->obj.pos.z); var_fv1 = 500.0f; - if (boss->health != 0) { + if (this->health != 0) { var_fv1 += 200.0f; } - if ((boss->swork[31] >= boss->unk_04C) && (fabsf(boss->obj.pos.z - boss->fwork[20]) < (var_fv1 + 1000.0f)) && - (fabsf(boss->obj.pos.x - boss->fwork[18]) < var_fv1)) { - boss->unk_04C++; + if ((this->swork[31] >= this->unk_04C) && (fabsf(this->obj.pos.z - this->fwork[20]) < (var_fv1 + 1000.0f)) && + (fabsf(this->obj.pos.x - this->fwork[18]) < var_fv1)) { + this->unk_04C++; } - if (boss->unk_04C >= boss->swork[32] - 29) { - if (boss->unk_04C == boss->swork[32] - 29) { - if (boss->swork[31] == 11) { - AUDIO_PLAY_SFX(NA_SE_EN_MS_PUNCH, boss->sfxSource, 4); + if (this->unk_04C >= this->swork[32] - 29) { + if (this->unk_04C == this->swork[32] - 29) { + if (this->swork[31] == 11) { + AUDIO_PLAY_SFX(NA_SE_EN_MS_PUNCH, this->sfxSource, 4); } else { - AUDIO_PLAY_SFX(NA_SE_EN_MS_KICK, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MS_KICK, this->sfxSource, 4); } } - if (boss->unk_04C >= (boss->swork[32] - 5)) { - SectorY_80198244(boss); + if (this->unk_04C >= (this->swork[32] - 5)) { + SectorY_80198244(this); } } else { - Math_SmoothStepToF(&boss->fwork[9], boss->fwork[45] + 10.0f, 0.1f, 2.0f, 0.1f); + Math_SmoothStepToF(&this->fwork[9], this->fwork[45] + 10.0f, 0.1f, 2.0f, 0.1f); - var_ft5 = ABS(boss->fwork[18] - boss->obj.pos.x) + ABS(boss->fwork[20] - boss->obj.pos.z); - xAngle = -Math_Atan2F(boss->fwork[19] - boss->obj.pos.y, var_ft5); + var_ft5 = ABS(this->fwork[18] - this->obj.pos.x) + ABS(this->fwork[20] - this->obj.pos.z); + xAngle = -Math_Atan2F(this->fwork[19] - this->obj.pos.y, var_ft5); Matrix_RotateY(gCalcMatrix, yAngle, MTXF_NEW); Matrix_RotateX(gCalcMatrix, xAngle, MTXF_APPLY); vec.x = 0.0f; vec.y = 0.0f; - vec.z = boss->fwork[9]; + vec.z = this->fwork[9]; Matrix_MultVec3f(gCalcMatrix, &vec, &vel); - boss->vel.z = vel.z; - boss->vel.x = vel.x; - Math_SmoothStepToAngle(&boss->rot_078.y, Math_RadToDeg(yAngle), 0.1f, 6.0f, 0.1f); + this->vel.z = vel.z; + this->vel.x = vel.x; + Math_SmoothStepToAngle(&this->rot_078.y, Math_RadToDeg(yAngle), 0.1f, 6.0f, 0.1f); } - if (boss->swork[31] != 11) { + if (this->swork[31] != 11) { - if ((boss->rot_078.z <= 90.0f) || (boss->rot_078.z >= 270.0f)) { - boss->fwork[19] += 70.0f; + if ((this->rot_078.z <= 90.0f) || (this->rot_078.z >= 270.0f)) { + this->fwork[19] += 70.0f; } else { - boss->fwork[19] -= 50.0f; + this->fwork[19] -= 50.0f; } } - Math_SmoothStepToF(&boss->obj.pos.y, boss->fwork[19], 0.1f, 40.0f, 0.1f); + Math_SmoothStepToF(&this->obj.pos.y, this->fwork[19], 0.1f, 40.0f, 0.1f); if (D_edisplay_801615D0.z > 0.0f) { - boss->swork[32] = 0; + this->swork[32] = 0; } - if (SectorY_8019B528(boss)) { - SectorY_80198ABC(boss); + if (SectorY_8019B528(this)) { + SectorY_80198ABC(this); } - if (boss->swork[20] == 10) { - boss->fwork[0] = 0.25f; + if (this->swork[20] == 10) { + this->fwork[0] = 0.25f; } - if ((boss->swork[20] == 10) && (boss->unk_04C >= 12)) { - boss->fwork[0] = 1.0f; + if ((this->swork[20] == 10) && (this->unk_04C >= 12)) { + this->fwork[0] = 1.0f; } } -void SectorY_8019AEC0(Boss* boss) { - boss->swork[20] = 11; - boss->swork[21] = 8; - boss->vel.x = 0.0f; - boss->vel.y = 0.0f; - boss->vel.z = 0.0f; - boss->unk_044 = 0; +void SectorY_8019AEC0(Boss* this) { + this->swork[20] = 11; + this->swork[21] = 8; + this->vel.x = 0.0f; + this->vel.y = 0.0f; + this->vel.z = 0.0f; + this->unk_044 = 0; } -void SectorY_8019AEEC(Boss* boss) { - if ((boss->obj.pos.y != 365.0f) && (boss->swork[21] != 1)) { - if (boss->unk_04A != 0) { - if (boss->unk_04A == 1) { +void SectorY_8019AEEC(Boss* this) { + if ((this->obj.pos.y != 365.0f) && (this->swork[21] != 1)) { + if (this->unk_04A != 0) { + if (this->unk_04A == 1) { Audio_PlaySequence(SEQ_PLAYER_BGM, NA_BGM_REAL_BOSS, 0, 0); - boss->unk_04A++; + this->unk_04A++; gPlayer[0].cam.eye.x = 0.0f; gPlayer[0].cam.eye.y = 200.0f; gPlayer[0].cam.eye.z = -20000.0f; gPlayer[0].cam.at.x = 0.0f; gPlayer[0].cam.at.y = 300.0f; - gPlayer[0].cam.at.z = boss->obj.pos.z; + gPlayer[0].cam.at.z = this->obj.pos.z; gPlayer[0].camRoll = 0.0f; Radio_PlayMessage(gMsg_ID_14300, RCID_BOSS_SECTORY); SectorY_801A0510(&gActors[59], 7); - gActors[59].obj.pos.y = boss->obj.pos.y - 202.0f; - gActors[59].obj.pos.x = boss->obj.pos.x; - gActors[59].obj.pos.z = boss->obj.pos.z - 30.0f; + gActors[59].obj.pos.y = this->obj.pos.y - 202.0f; + gActors[59].obj.pos.x = this->obj.pos.x; + gActors[59].obj.pos.z = this->obj.pos.z - 30.0f; gActors[59].state = 6; } - if (boss->obj.pos.y == 0.0f) { + if (this->obj.pos.y == 0.0f) { AUDIO_PLAY_SFX(NA_SE_LIFT_UP, gDefaultSfxSource, 4); } - Math_SmoothStepToF(&boss->obj.pos.y, 365.0f, 0.1f, 5.0f, 0.1f); + Math_SmoothStepToF(&this->obj.pos.y, 365.0f, 0.1f, 5.0f, 0.1f); Math_SmoothStepToF(&gActors[59].obj.pos.y, 153.0f, 0.1f, 5.0f, 0.1f); Math_SmoothStepToF(&gPlayer[0].cam.eye.z, -28300.0f, 1.0f, 100.0f, 1.0f); if (gPlayer[0].cam.eye.z == -28300.0f) { - Math_SmoothStepToF(&boss->fwork[46], 128.0f, 1.0f, 16.0f, 1.0f); - gBossHealthBar = boss->health * 1.7f; + Math_SmoothStepToF(&this->fwork[46], 128.0f, 1.0f, 16.0f, 1.0f); + gBossHealthBar = this->health * 1.7f; } - if (boss->obj.pos.y == 365.0f) { + if (this->obj.pos.y == 365.0f) { AUDIO_PLAY_SFX(NA_SE_LIFT_UP_END, gDefaultSfxSource, 4); - boss->timer_050 = 20; - boss->timer_056 = 135; + this->timer_050 = 20; + this->timer_056 = 135; } } } else { - gPlayer[0].cam.at.z = boss->obj.pos.z; + gPlayer[0].cam.at.z = this->obj.pos.z; Math_SmoothStepToF(&gPlayer[0].cam.eye.z, -29000.0f, 1.0f, 5.0f, 1.0f); Math_SmoothStepToF(&gPlayer[0].cam.eye.x, 2000.0f, 1.0f, 8.0f, 1.0f); - Math_SmoothStepToF(&boss->fwork[46], 0.0f, 1.0f, 16.0f, 1.0f); + Math_SmoothStepToF(&this->fwork[46], 0.0f, 1.0f, 16.0f, 1.0f); - if (boss->timer_050 == 0) { - boss->swork[21] = 0; + if (this->timer_050 == 0) { + this->swork[21] = 0; } - if (boss->timer_056 == 95) { + if (this->timer_056 == 95) { AUDIO_PLAY_SFX(NA_SE_EN_BURNER_L, gActors[59].sfxSource, 4); } - if (boss->timer_056 < 96) { + if (this->timer_056 < 96) { Math_SmoothStepToF(&gActors[59].fwork[0], 0.0f, 0.1f, 0.2f, 0.05f); - if (boss->timer_056 > 55) { - Math_SmoothStepToF(&boss->vel.z, 80.0f, 0.1f, 2.0f, 0.5f); + if (this->timer_056 > 55) { + Math_SmoothStepToF(&this->vel.z, 80.0f, 0.1f, 2.0f, 0.5f); Math_SmoothStepToF(&gActors[59].vel.z, 80.0f, 0.1f, 2.0f, 0.5f); - if (((gGameFrameCount % 2) == 0)) { - func_effect_8007C120(boss->obj.pos.x, boss->obj.pos.y - 150.0f, boss->obj.pos.z, 0.0f, 0.0f, 0.0f, + if ((gGameFrameCount % 2) == 0) { + func_effect_8007C120(this->obj.pos.x, this->obj.pos.y - 150.0f, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.1f, 5); } } } - if (boss->timer_056 == 55) { - D_i6_801A8440[0] = boss->sfxSource[0]; - D_i6_801A8440[1] = boss->sfxSource[1]; + if (this->timer_056 == 55) { + D_i6_801A8440[0] = this->sfxSource[0]; + D_i6_801A8440[1] = this->sfxSource[1]; D_i6_801A8440[2] = -500.0f; AUDIO_PLAY_SFX(NA_SE_EN_MS_DASH, D_i6_801A8440, 4); Audio_KillSfxBySource(gActors[59].sfxSource); - boss->fwork[34] = 4.5f; + this->fwork[34] = 4.5f; gActors[59].vel.z = -40.0f; - boss->vel.z = 120.0f; + this->vel.z = 120.0f; } - if (boss->timer_056 <= 55) { - boss->swork[21] = 1; - Math_SmoothStepToF(&boss->fwork[43], 0.0f, 0.1f, 0.1f, 0.1f); - Math_SmoothStepToF(&boss->vel.y, 20.0f, 0.1f, 5.0f, 0.5f); + if (this->timer_056 <= 55) { + this->swork[21] = 1; + Math_SmoothStepToF(&this->fwork[43], 0.0f, 0.1f, 0.1f, 0.1f); + Math_SmoothStepToF(&this->vel.y, 20.0f, 0.1f, 5.0f, 0.5f); Math_SmoothStepToF(&gActors[59].vel.z, 0.0f, 0.1f, 1.0f, 0.5f); } - if (boss->timer_056 == 0.0f) { - SectorY_80198244(boss); - boss->vel.z = 80.0f; - boss->fwork[13] = 80.0f; - boss->obj.pos.z = -12000.0f; + if (this->timer_056 == 0.0f) { + SectorY_80198244(this); + this->vel.z = 80.0f; + this->fwork[13] = 80.0f; + this->obj.pos.z = -12000.0f; gScenery360[0].obj.pos.z = -20000.0f; - boss->fwork[43] = 0.0f; - boss->vel.y = 0.0f; + this->fwork[43] = 0.0f; + this->vel.y = 0.0f; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ACTIVE; - Camera_UpdateArwing360(&gPlayer[0], 1); + Camera_UpdateArwing360(&gPlayer[0], true); gPlayer[0].unk_014 = 0.0f; - boss->swork[34]++; + this->swork[34]++; Radio_PlayMessage(gMsg_ID_14310, RCID_BOSS_SECTORY); gBossFrameCount = 0; } } } -bool SectorY_8019B528(Boss* boss) { - - if (boss->timer_050 != 0) { +bool SectorY_8019B528(Boss* this) { + if (this->timer_050 != 0) { return false; } - if (boss->swork[33] <= ABS(boss->obj.pos.x)) { + if (this->swork[33] <= ABS(this->obj.pos.x)) { return true; } - if (boss->swork[33] <= ABS(boss->obj.pos.z)) { + if (this->swork[33] <= ABS(this->obj.pos.z)) { return true; } return false; } -bool SectorY_8019B5CC(Boss* boss) { +bool SectorY_8019B5CC(Boss* this) { f32 pad; Vec3f pos; @@ -1112,86 +1129,86 @@ bool SectorY_8019B5CC(Boss* boss) { return false; } - Math_Vec3fFromAngles(&pos, boss->rot_078.x, boss->rot_078.y, 700.0f); + Math_Vec3fFromAngles(&pos, this->rot_078.x, this->rot_078.y, 700.0f); - if ((fabsf(gScenery360[0].obj.pos.x - (boss->obj.pos.x + pos.x)) < 2500.0f) && - (fabsf(gScenery360[0].obj.pos.z - (boss->obj.pos.z + pos.z)) < 5000.0f) && - (fabsf(gScenery360[0].obj.pos.y - (boss->obj.pos.y + pos.y)) < 1800.0f)) { + if ((fabsf(gScenery360[0].obj.pos.x - (this->obj.pos.x + pos.x)) < 2500.0f) && + (fabsf(gScenery360[0].obj.pos.z - (this->obj.pos.z + pos.z)) < 5000.0f) && + (fabsf(gScenery360[0].obj.pos.y - (this->obj.pos.y + pos.y)) < 1800.0f)) { return true; } return false; } -void SectorY_8019B6E8(Boss* boss) { +void SectorY_8019B6E8(Boss* this) { f32 var4; f32 var3; f32 var2; f32 var; - var = ABS(ABS(gPlayer[0].pos.x - boss->obj.pos.x) + ABS(gPlayer[0].pos.y - boss->obj.pos.y) + - ABS(gPlayer[0].pos.z - 1000.0f - boss->obj.pos.z)); + var = ABS(ABS(gPlayer[0].pos.x - this->obj.pos.x) + ABS(gPlayer[0].pos.y - this->obj.pos.y) + + ABS(gPlayer[0].pos.z - 1000.0f - this->obj.pos.z)); - var2 = ABS(gActors[2].obj.pos.x - boss->obj.pos.x) + ABS(gActors[2].obj.pos.y - boss->obj.pos.y) + - ABS(gActors[2].obj.pos.z - boss->obj.pos.z); + var2 = ABS(gActors[2].obj.pos.x - this->obj.pos.x) + ABS(gActors[2].obj.pos.y - this->obj.pos.y) + + ABS(gActors[2].obj.pos.z - this->obj.pos.z); - var3 = ABS(gActors[3].obj.pos.x - boss->obj.pos.x) + ABS(gActors[3].obj.pos.y - boss->obj.pos.y) + - ABS(gActors[3].obj.pos.z - boss->obj.pos.z); + var3 = ABS(gActors[3].obj.pos.x - this->obj.pos.x) + ABS(gActors[3].obj.pos.y - this->obj.pos.y) + + ABS(gActors[3].obj.pos.z - this->obj.pos.z); - var4 = ABS(gActors[4].obj.pos.x - boss->obj.pos.x) + ABS(gActors[4].obj.pos.y - boss->obj.pos.y) + - ABS(gActors[4].obj.pos.z - boss->obj.pos.z); + var4 = ABS(gActors[4].obj.pos.x - this->obj.pos.x) + ABS(gActors[4].obj.pos.y - this->obj.pos.y) + + ABS(gActors[4].obj.pos.z - this->obj.pos.z); - boss->swork[22] = 1; - boss->fwork[18] = gPlayer[0].pos.x; - boss->fwork[19] = gPlayer[0].pos.y; - boss->fwork[20] = gPlayer[0].pos.z; - boss->fwork[24] = gPlayer[0].vel.x; - boss->fwork[25] = gPlayer[0].vel.y; - boss->fwork[26] = gPlayer[0].vel.z; + this->swork[22] = 1; + this->fwork[18] = gPlayer[0].pos.x; + this->fwork[19] = gPlayer[0].pos.y; + this->fwork[20] = gPlayer[0].pos.z; + this->fwork[24] = gPlayer[0].vel.x; + this->fwork[25] = gPlayer[0].vel.y; + this->fwork[26] = gPlayer[0].vel.z; if (var2 < var) { var = var2; - boss->swork[22]++; - boss->fwork[18] = gActors[2].obj.pos.x; - boss->fwork[19] = gActors[2].obj.pos.y; - boss->fwork[20] = gActors[2].obj.pos.z; - boss->fwork[24] = gActors[2].vel.x; - boss->fwork[25] = gActors[2].vel.y; - boss->fwork[26] = gActors[2].vel.z; + this->swork[22]++; + this->fwork[18] = gActors[2].obj.pos.x; + this->fwork[19] = gActors[2].obj.pos.y; + this->fwork[20] = gActors[2].obj.pos.z; + this->fwork[24] = gActors[2].vel.x; + this->fwork[25] = gActors[2].vel.y; + this->fwork[26] = gActors[2].vel.z; } if (var3 < var) { - boss->swork[22] = 3; - boss->fwork[18] = gActors[3].obj.pos.x; - boss->fwork[19] = gActors[3].obj.pos.y; - boss->fwork[20] = gActors[3].obj.pos.z; - boss->fwork[24] = gActors[3].vel.x; - boss->fwork[25] = gActors[3].vel.y; - boss->fwork[26] = gActors[3].vel.z; + this->swork[22] = 3; + this->fwork[18] = gActors[3].obj.pos.x; + this->fwork[19] = gActors[3].obj.pos.y; + this->fwork[20] = gActors[3].obj.pos.z; + this->fwork[24] = gActors[3].vel.x; + this->fwork[25] = gActors[3].vel.y; + this->fwork[26] = gActors[3].vel.z; var = var3; } if (var4 < var) { - boss->fwork[18] = gActors[4].obj.pos.x; - boss->fwork[19] = gActors[4].obj.pos.y; - boss->fwork[20] = gActors[4].obj.pos.z; - boss->fwork[24] = gActors[4].vel.x; - boss->fwork[25] = gActors[4].vel.y; - boss->fwork[26] = gActors[4].vel.z; - boss->swork[22] = 4; + this->fwork[18] = gActors[4].obj.pos.x; + this->fwork[19] = gActors[4].obj.pos.y; + this->fwork[20] = gActors[4].obj.pos.z; + this->fwork[24] = gActors[4].vel.x; + this->fwork[25] = gActors[4].vel.y; + this->fwork[26] = gActors[4].vel.z; + this->swork[22] = 4; } } -void SectorY_8019BBBC(Boss* boss) { - boss->fwork[18] = gPlayer[0].pos.x; - boss->fwork[19] = gPlayer[0].pos.y; - boss->fwork[20] = gPlayer[0].pos.z; - boss->fwork[24] = gPlayer[0].vel.x; - boss->fwork[25] = gPlayer[0].vel.y; - boss->fwork[26] = gPlayer[0].vel.z; +void SectorY_8019BBBC(Boss* this) { + this->fwork[18] = gPlayer[0].pos.x; + this->fwork[19] = gPlayer[0].pos.y; + this->fwork[20] = gPlayer[0].pos.z; + this->fwork[24] = gPlayer[0].vel.x; + this->fwork[25] = gPlayer[0].vel.y; + this->fwork[26] = gPlayer[0].vel.z; } -void SectorY_8019BC14(Boss* boss) { +void SectorY_8019BC14(Boss* this) { f32 sp4C; f32 sp48; f32 sp44; @@ -1200,34 +1217,34 @@ void SectorY_8019BC14(Boss* boss) { f32 sp38; f32 var_fa0; - if ((ABS(boss->obj.pos.x) >= 11000.0f) || (ABS(boss->obj.pos.z) >= 11000.0f)) { - boss->timer_052 = 2; + if ((ABS(this->obj.pos.x) >= 11000.0f) || (ABS(this->obj.pos.z) >= 11000.0f)) { + this->timer_052 = 2; return; } - if ((boss->swork[0x16] == 1) && (D_edisplay_801615D0.z > 0.0f)) { - boss->timer_052 = 2; + if ((this->swork[0x16] == 1) && (D_edisplay_801615D0.z > 0.0f)) { + this->timer_052 = 2; return; } - if (boss->swork[0x16] != 1) { - var_fa0 = ((ABS(boss->fwork[0x12] - boss->fwork[1]) + ABS(boss->fwork[0x14] - boss->fwork[3]) + - ABS(boss->fwork[0x13] - boss->fwork[2])) / + if (this->swork[0x16] != 1) { + var_fa0 = ((ABS(this->fwork[0x12] - this->fwork[1]) + ABS(this->fwork[0x14] - this->fwork[3]) + + ABS(this->fwork[0x13] - this->fwork[2])) / 140.0f) - 2.0f; - boss->fwork[0x12] = boss->fwork[0x12] + boss->fwork[0x18] * var_fa0; - boss->fwork[0x13] = boss->fwork[0x13] + boss->fwork[0x19] * var_fa0; - boss->fwork[0x14] = boss->fwork[0x14] + boss->fwork[0x1A] * var_fa0; + this->fwork[0x12] = this->fwork[0x12] + this->fwork[0x18] * var_fa0; + this->fwork[0x13] = this->fwork[0x13] + this->fwork[0x19] * var_fa0; + this->fwork[0x14] = this->fwork[0x14] + this->fwork[0x1A] * var_fa0; } - if ((fabsf(boss->fwork[3] - boss->fwork[0x14]) > 300.0f) || (fabsf(boss->fwork[1] - boss->fwork[0x12]) > 300.0f)) { + if ((fabsf(this->fwork[3] - this->fwork[0x14]) > 300.0f) || (fabsf(this->fwork[1] - this->fwork[0x12]) > 300.0f)) { sp3C = Math_RadToDeg( - Math_Atan2F(boss->fwork[0x12] - boss->fwork[1] - boss->rot_078.x, boss->fwork[0x14] - boss->fwork[3])); - sp40 = ABS(boss->fwork[0x12] - boss->fwork[1]) + ABS(boss->fwork[0x14] - boss->fwork[3]); - sp40 = Math_RadToDeg(-Math_Atan2F(boss->fwork[0x13] - boss->fwork[2], sp40)); - sp38 = Math_RadToDeg(Math_Atan2F(boss->fwork[1] - boss->fwork[0x15], boss->fwork[3] - boss->fwork[0x17])); - var_fa0 = ABS(boss->fwork[1] - boss->fwork[0x15]) + ABS(boss->fwork[3] - boss->fwork[0x17]); - var_fa0 = Math_RadToDeg(-Math_Atan2F(boss->fwork[2] - boss->fwork[0x16], var_fa0)); + Math_Atan2F(this->fwork[0x12] - this->fwork[1] - this->rot_078.x, this->fwork[0x14] - this->fwork[3])); + sp40 = ABS(this->fwork[0x12] - this->fwork[1]) + ABS(this->fwork[0x14] - this->fwork[3]); + sp40 = Math_RadToDeg(-Math_Atan2F(this->fwork[0x13] - this->fwork[2], sp40)); + sp38 = Math_RadToDeg(Math_Atan2F(this->fwork[1] - this->fwork[0x15], this->fwork[3] - this->fwork[0x17])); + var_fa0 = ABS(this->fwork[1] - this->fwork[0x15]) + ABS(this->fwork[3] - this->fwork[0x17]); + var_fa0 = Math_RadToDeg(-Math_Atan2F(this->fwork[2] - this->fwork[0x16], var_fa0)); sp38 = sp3C - sp38; var_fa0 = sp40 - var_fa0; @@ -1239,43 +1256,43 @@ void SectorY_8019BC14(Boss* boss) { } if (((sp38 < 41.0f) || (sp38 > 319.0f)) && ((var_fa0 < 41.0f) || (var_fa0 > 319.0f))) { - boss->timer_054 = 4; - boss->fwork[4] = 30.0f; + this->timer_054 = 4; + this->fwork[4] = 30.0f; sp4C = gPlayer[0].pos.x; sp48 = gPlayer[0].pos.y; sp44 = gPlayer[0].pos.z; - gPlayer[0].pos.x = boss->fwork[0x12]; - gPlayer[0].pos.y = boss->fwork[0x13]; - gPlayer[0].trueZpos = gPlayer[0].pos.z = boss->fwork[0x14]; + gPlayer[0].pos.x = this->fwork[0x12]; + gPlayer[0].pos.y = this->fwork[0x13]; + gPlayer[0].trueZpos = gPlayer[0].pos.z = this->fwork[0x14]; - func_effect_8007F11C(OBJ_EFFECT_354, boss->fwork[1], boss->fwork[2], boss->fwork[3], 100.0f); + Effect_EnemyLaser(OBJ_EFFECT_354, this->fwork[1], this->fwork[2], this->fwork[3], 100.0f); gPlayer[0].pos.x = sp4C; gPlayer[0].pos.y = sp48; gPlayer[0].trueZpos = gPlayer[0].pos.z = sp44; - if (boss->index == 0) { - AUDIO_PLAY_SFX(NA_SE_EN_MS_SHOT_L, boss->sfxSource, 4); + if (this->index == 0) { + AUDIO_PLAY_SFX(NA_SE_EN_MS_SHOT_L, this->sfxSource, 4); } else { - AUDIO_PLAY_SFX(NA_SE_EN_MS_SHOT_S, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MS_SHOT_S, this->sfxSource, 4); } } } - if (boss->index == 0) { - boss->timer_052 = RAND_INT(20.0f) + 15; + if (this->index == 0) { + this->timer_052 = RAND_INT(20.0f) + 15; } else { - boss->timer_052 = RAND_INT(20.0f) + 25; + this->timer_052 = RAND_INT(20.0f) + 25; } } -void SectorY_8019C194(Boss* boss, f32 zSpeed, f32 xSpeed) { +void SectorY_8019C194(Boss* this, f32 zSpeed, f32 xSpeed) { f32 sp2C; f32 sp28; - if ((gBossFrameCount > 250) && (boss->fwork[34] == 2.8f)) { + if ((gBossFrameCount > 250) && (this->fwork[34] == 2.8f)) { switch (D_ctx_80177A10[8]) { case 0: if (gTeamShields[TEAM_ID_FALCO] > 0) { @@ -1301,68 +1318,68 @@ void SectorY_8019C194(Boss* boss, f32 zSpeed, f32 xSpeed) { } if ((xSpeed > 800.0f) || (zSpeed > 300.0f)) { - boss->fwork[44] += 8.0f; - if (boss->fwork[44] >= 360.0f) { - boss->fwork[44] = 0.0f; + this->fwork[44] += 8.0f; + if (this->fwork[44] >= 360.0f) { + this->fwork[44] = 0.0f; } - if (boss->index == 0) { - sp2C = SIN_DEG(boss->fwork[44]) * ABS(boss->vel.z * 1.5f); - boss->obj.pos.x += sp2C; + if (this->index == 0) { + sp2C = SIN_DEG(this->fwork[44]) * ABS(this->vel.z * 1.5f); + this->obj.pos.x += sp2C; - sp28 = SIN_DEG(boss->fwork[44]) * ABS(boss->vel.x * 1.5f); - boss->obj.pos.z += sp28; + sp28 = SIN_DEG(this->fwork[44]) * ABS(this->vel.x * 1.5f); + this->obj.pos.z += sp28; } else { - sp2C = SIN_DEG(boss->fwork[44]) * ABS(boss->vel.z * 1.2f); - boss->obj.pos.x += sp2C; + sp2C = SIN_DEG(this->fwork[44]) * ABS(this->vel.z * 1.2f); + this->obj.pos.x += sp2C; - sp28 = SIN_DEG(boss->fwork[44]) * ABS(boss->vel.x * 1.2f); - boss->obj.pos.z += sp28; + sp28 = SIN_DEG(this->fwork[44]) * ABS(this->vel.x * 1.2f); + this->obj.pos.z += sp28; } - if (!SectorY_8019B5CC(boss)) { - if (boss->index == 0) { - boss->obj.pos.y += SIN_DEG(boss->fwork[44]) * 30.0f; + if (!SectorY_8019B5CC(this)) { + if (this->index == 0) { + this->obj.pos.y += SIN_DEG(this->fwork[44]) * 30.0f; } else { - boss->obj.pos.y += SIN_DEG(boss->fwork[44]) * 10.0f; + this->obj.pos.y += SIN_DEG(this->fwork[44]) * 10.0f; } } - if (boss->index == 0) { - if (ABS(boss->vel.z) < ABS(boss->vel.x)) { + if (this->index == 0) { + if (ABS(this->vel.z) < ABS(this->vel.x)) { sp2C = sp28; - if ((boss->obj.rot.z <= 90.0f) || (boss->obj.rot.z >= 270.0f)) { - if ((boss->obj.rot.y >= 45.0f) && (boss->obj.rot.y <= 135.0f)) { + if ((this->obj.rot.z <= 90.0f) || (this->obj.rot.z >= 270.0f)) { + if ((this->obj.rot.y >= 45.0f) && (this->obj.rot.y <= 135.0f)) { sp2C = -sp28; } } else { - if ((boss->obj.rot.y >= 225.0f) && (boss->obj.rot.y <= 315.0f)) { + if ((this->obj.rot.y >= 225.0f) && (this->obj.rot.y <= 315.0f)) { sp2C = -sp28; } } } else { - if ((boss->obj.rot.z <= 90.0f) || (boss->obj.rot.z >= 270.0f)) { - if ((boss->obj.rot.y >= 135.0f) && (boss->obj.rot.y <= 225.0f)) { + if ((this->obj.rot.z <= 90.0f) || (this->obj.rot.z >= 270.0f)) { + if ((this->obj.rot.y >= 135.0f) && (this->obj.rot.y <= 225.0f)) { sp2C = -sp2C; } } else { - if ((boss->obj.rot.y <= 45.0f) || (boss->obj.rot.y >= 315.0f)) { + if ((this->obj.rot.y <= 45.0f) || (this->obj.rot.y >= 315.0f)) { sp2C = -sp2C; } } } if (sp2C == 0.0f) { - boss->fwork[41] = ABS(sp2C * 0.01f) + 0.8f; + this->fwork[41] = ABS(sp2C * 0.01f) + 0.8f; } if (sp2C > 0.0f) { - if (boss->fwork[41] == 0.0f) { - boss->fwork[41] = ABS(sp2C * 0.01f) + 0.8f; - AUDIO_PLAY_SFX(NA_SE_ARWING_BRAKE, boss->sfxSource, 4); + if (this->fwork[41] == 0.0f) { + this->fwork[41] = ABS(sp2C * 0.01f) + 0.8f; + AUDIO_PLAY_SFX(NA_SE_ARWING_BRAKE, this->sfxSource, 4); } - } else if (boss->fwork[42] == 0.0f) { - boss->fwork[42] = ABS(sp2C * 0.01f) + 0.8f; - AUDIO_PLAY_SFX(NA_SE_ARWING_BRAKE, boss->sfxSource, 4); + } else if (this->fwork[42] == 0.0f) { + this->fwork[42] = ABS(sp2C * 0.01f) + 0.8f; + AUDIO_PLAY_SFX(NA_SE_ARWING_BRAKE, this->sfxSource, 4); } } } @@ -1373,7 +1390,7 @@ static BossFuncs D_i6_801A6910[] = { SectorY_80199DAC, SectorY_8019A520, SectorY_8019A66C, SectorY_8019A898, SectorY_8019AAF0, SectorY_8019AEEC, }; -void SectorY_Boss_Update(Boss* boss) { +void SectorY_Boss_Update(BossSY* this) { s32 i; f32 sp1E8; f32 sp1E4; @@ -1383,135 +1400,142 @@ void SectorY_Boss_Update(Boss* boss) { f32 sp1D4; s32 sp1D0; RadarMark* radarMark; - Vec3f sp64[30]; - Vec3f sp58; - Vec3f sp4C; + Vec3f frameTable[30]; + Vec3f src; + Vec3f dest; s32 pad; if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_START_360) { - if (boss->swork[34] == 1) { - if (boss->health > 0) { + if (this->swork[34] == 1) { + if (this->health > 0) { gScenery360[0].obj.pos.z += 20.0f; } if (gScenery360[0].obj.pos.z == 0.0f) { - boss->swork[34]++; + this->swork[34]++; } } - if (boss->index == 2) { - if ((ABS(boss->obj.pos.x - gBosses[1].obj.pos.x) < 800.0f) && - (ABS(boss->obj.pos.z - gBosses[1].obj.pos.z) < 800.0f) && boss->health > 0 && gBosses[1].health > 0) { - if (ABS(boss->obj.pos.y - gBosses[1].obj.pos.y) <= 800.0f) { - boss->obj.pos.y += 20.0f; + + if (this->index == 2) { + if ((ABS(this->obj.pos.x - gBosses[1].obj.pos.x) < 800.0f) && + (ABS(this->obj.pos.z - gBosses[1].obj.pos.z) < 800.0f) && (this->health > 0) && + (gBosses[1].health > 0)) { + if (ABS(this->obj.pos.y - gBosses[1].obj.pos.y) <= 800.0f) { + this->obj.pos.y += 20.0f; gBosses[1].obj.pos.y -= 20.0f; } } } - if ((boss->fwork[34] <= 1.0f) && (boss->fwork[34] > 0.5f)) { - Audio_KillSfxBySource(boss->sfxSource); + if ((this->fwork[34] <= 1.0f) && (this->fwork[34] > 0.5f)) { + Audio_KillSfxBySource(this->sfxSource); } gBossFrameCount++; - boss->fwork[0] = 0.1f; - if (boss->swork[24] != 0) { - boss->swork[24]--; - } - if (boss->health > 0) { - D_i6_801A6910[boss->swork[20]](boss); - } - if (boss->timer_058 != 0) { - SectorY_80199438(boss); + this->fwork[0] = 0.1f; + + if (this->swork[24] != 0) { + this->swork[24]--; } - if ((boss->swork[29] != 0) && !(boss->swork[29] & gGameFrameCount)) { - func_effect_8007C120(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, boss->vel.x, boss->vel.y, - boss->vel.z, 0.1f, 5); + if (this->health > 0) { + D_i6_801A6910[this->swork[20]](this); } - switch (boss->swork[21]) { + if (this->timer_058 != 0) { + SectorY_80199438(this); + } + + if ((this->swork[29] != 0) && !(this->swork[29] & gGameFrameCount)) { + func_effect_8007C120(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, + this->vel.z, 0.1f, 5); + } + + switch (this->swork[21]) { case 0: - boss->unk_04C = Animation_GetFrameCount(&D_SY_602B778) - 1; - sp1D0 = Animation_GetFrameData(&D_SY_602B778, boss->unk_04C, sp64); + this->unk_04C = Animation_GetFrameCount(&D_SY_602B778) - 1; + sp1D0 = Animation_GetFrameData(&D_SY_602B778, this->unk_04C, frameTable); break; case 1: - boss->unk_04C = Animation_GetFrameCount(&D_SY_60265B4) - 1; - sp1D0 = Animation_GetFrameData(&D_SY_60265B4, boss->unk_04C, sp64); + this->unk_04C = Animation_GetFrameCount(&D_SY_60265B4) - 1; + sp1D0 = Animation_GetFrameData(&D_SY_60265B4, this->unk_04C, frameTable); break; case 2: - boss->unk_04C = Animation_GetFrameCount(&D_SY_6029B48) - 1; - sp1D0 = Animation_GetFrameData(&D_SY_6029B48, boss->unk_04C, sp64); + this->unk_04C = Animation_GetFrameCount(&D_SY_6029B48) - 1; + sp1D0 = Animation_GetFrameData(&D_SY_6029B48, this->unk_04C, frameTable); break; case 3: - boss->unk_04C = Animation_GetFrameCount(&D_SY_602B8DC) - 1; - sp1D0 = Animation_GetFrameData(&D_SY_602B8DC, boss->unk_04C, sp64); + this->unk_04C = Animation_GetFrameCount(&D_SY_602B8DC) - 1; + sp1D0 = Animation_GetFrameData(&D_SY_602B8DC, this->unk_04C, frameTable); break; case 4: - boss->unk_04C++; - if (boss->unk_04C >= Animation_GetFrameCount(&D_SY_6003348)) { - boss->unk_04C = Animation_GetFrameCount(&D_SY_6003348) - 1; + this->unk_04C++; + if (this->unk_04C >= Animation_GetFrameCount(&D_SY_6003348)) { + this->unk_04C = Animation_GetFrameCount(&D_SY_6003348) - 1; } - sp1D0 = Animation_GetFrameData(&D_SY_6003348, boss->unk_04C, sp64); + sp1D0 = Animation_GetFrameData(&D_SY_6003348, this->unk_04C, frameTable); break; case 5: - boss->unk_04C++; - if (boss->unk_04C >= Animation_GetFrameCount(&D_SY_602738C)) { - boss->unk_04C = 0; + this->unk_04C++; + if (this->unk_04C >= Animation_GetFrameCount(&D_SY_602738C)) { + this->unk_04C = 0; } - sp1D0 = Animation_GetFrameData(&D_SY_602738C, boss->unk_04C, sp64); + sp1D0 = Animation_GetFrameData(&D_SY_602738C, this->unk_04C, frameTable); break; case 6: - sp1D0 = Animation_GetFrameData(&D_SY_602738C, boss->unk_04C, sp64); + sp1D0 = Animation_GetFrameData(&D_SY_602738C, this->unk_04C, frameTable); break; case 7: - if (boss->unk_04C < (Animation_GetFrameCount(&D_SY_602645C) - 1)) { - boss->unk_04C++; + if (this->unk_04C < (Animation_GetFrameCount(&D_SY_602645C) - 1)) { + this->unk_04C++; } - sp1D0 = Animation_GetFrameData(&D_SY_602645C, boss->unk_04C, sp64); + sp1D0 = Animation_GetFrameData(&D_SY_602645C, this->unk_04C, frameTable); break; case 8: - if (boss->unk_04C < (Animation_GetFrameCount(&D_SY_60258A0) - 1)) { - boss->unk_04C++; + if (this->unk_04C < (Animation_GetFrameCount(&D_SY_60258A0) - 1)) { + this->unk_04C++; } - sp1D0 = Animation_GetFrameData(&D_SY_60258A0, boss->unk_04C, sp64); + sp1D0 = Animation_GetFrameData(&D_SY_60258A0, this->unk_04C, frameTable); break; case 9: - boss->unk_04C++; - if (boss->unk_04C >= Animation_GetFrameCount(&D_SY_60034C4)) { - boss->unk_04C = 0; + this->unk_04C++; + if (this->unk_04C >= Animation_GetFrameCount(&D_SY_60034C4)) { + this->unk_04C = 0; } - sp1D0 = Animation_GetFrameData(&D_SY_60034C4, boss->unk_04C, sp64); + sp1D0 = Animation_GetFrameData(&D_SY_60034C4, this->unk_04C, frameTable); break; } - boss->obj.rot.x = boss->rot_078.x; - boss->obj.rot.y = boss->rot_078.y; - boss->obj.rot.z = boss->rot_078.z; + this->obj.rot.x = this->rot_078.x; + this->obj.rot.y = this->rot_078.y; + this->obj.rot.z = this->rot_078.z; - Matrix_RotateZ(gCalcMatrix, -boss->vwork[29].z * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -boss->vwork[29].x * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gCalcMatrix, -boss->vwork[29].y * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -this->vwork[29].z * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -this->vwork[29].x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -this->vwork[29].y * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, -boss->obj.rot.z * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gCalcMatrix, -boss->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gCalcMatrix, -boss->obj.rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -this->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, -this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -this->obj.rot.y * M_DTOR, MTXF_APPLY); - if ((boss->health > 0) && (boss->swork[20] < 10)) { - sp58.x = boss->fwork[18] - boss->obj.pos.x; - sp58.y = boss->fwork[19] - boss->obj.pos.y; - sp58.z = boss->fwork[20] - boss->obj.pos.z; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp58, &sp4C); - sp1E4 = Math_RadToDeg(Math_Atan2F(sp4C.x, sp4C.z)); - sp1E8 = Math_RadToDeg(-Math_Atan2F(sp4C.y, sqrtf(SQ(sp4C.x) + SQ(sp4C.z)))); + if ((this->health > 0) && (this->swork[20] < 10)) { + src.x = this->fwork[18] - this->obj.pos.x; + src.y = this->fwork[19] - this->obj.pos.y; + src.z = this->fwork[20] - this->obj.pos.z; + + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + + sp1E4 = Math_RadToDeg(Math_Atan2F(dest.x, dest.z)); + sp1E8 = Math_RadToDeg(-Math_Atan2F(dest.y, sqrtf(SQ(dest.x) + SQ(dest.z)))); if ((sp1E8 > 30.0f) && (sp1E8 <= 180.0f)) { sp1E8 = 30.0f; @@ -1526,16 +1550,16 @@ void SectorY_Boss_Update(Boss* boss) { sp1E4 = 280.0f; } - Math_SmoothStepToAngle(&boss->fwork[6], sp1E4, 0.2f, 4.0f, 0.1f); - Math_SmoothStepToAngle(&boss->fwork[5], sp1E8, 0.2f, 4.0f, 0.1f); - Matrix_RotateX(gCalcMatrix, -boss->fwork[5] * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gCalcMatrix, -boss->fwork[6] * M_DTOR, MTXF_APPLY); - sp58.x = boss->fwork[18] - boss->obj.pos.x; - sp58.y = (boss->fwork[19] - boss->obj.pos.y) + 20.0f; - sp58.z = boss->fwork[20] - boss->obj.pos.z; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp58, &sp4C); - sp1E0 = Math_RadToDeg(Math_Atan2F(sp4C.x, sp4C.z)); - sp1DC = Math_RadToDeg(-Math_Atan2F(sp4C.y, sqrtf(SQ(sp4C.x) + SQ(sp4C.z)))); + Math_SmoothStepToAngle(&this->fwork[6], sp1E4, 0.2f, 4.0f, 0.1f); + Math_SmoothStepToAngle(&this->fwork[5], sp1E8, 0.2f, 4.0f, 0.1f); + Matrix_RotateX(gCalcMatrix, -this->fwork[5] * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -this->fwork[6] * M_DTOR, MTXF_APPLY); + src.x = this->fwork[18] - this->obj.pos.x; + src.y = (this->fwork[19] - this->obj.pos.y) + 20.0f; + src.z = this->fwork[20] - this->obj.pos.z; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + sp1E0 = Math_RadToDeg(Math_Atan2F(dest.x, dest.z)); + sp1DC = Math_RadToDeg(-Math_Atan2F(dest.y, sqrtf(SQ(dest.x) + SQ(dest.z)))); if ((sp1DC > 30.0f) && (sp1DC <= 180.0f)) { sp1DC = 30.0f; @@ -1550,14 +1574,14 @@ void SectorY_Boss_Update(Boss* boss) { sp1E0 = 280.0f; } - Math_SmoothStepToAngle(&boss->fwork[8], sp1E0, 0.4f, 8.0f, 0.1f); - Math_SmoothStepToAngle(&boss->fwork[7], sp1DC, 0.4f, 8.0f, 0.1f); - sp58.x = (boss->fwork[18] - boss->obj.pos.x) + (COS_DEG(boss->obj.rot.y) * 100.0f); - sp58.y = (boss->fwork[19] - boss->obj.pos.y) - 80.0f; - sp58.z = boss->fwork[20] - boss->obj.pos.z; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp58, &sp4C); - sp1D8 = Math_RadToDeg(Math_Atan2F(sp4C.x, sp4C.z)); - sp1D4 = Math_RadToDeg(-Math_Atan2F(sp4C.y, sqrtf(SQ(sp4C.x) + SQ(sp4C.z)))); + Math_SmoothStepToAngle(&this->fwork[8], sp1E0, 0.4f, 8.0f, 0.1f); + Math_SmoothStepToAngle(&this->fwork[7], sp1DC, 0.4f, 8.0f, 0.1f); + src.x = (this->fwork[18] - this->obj.pos.x) + (COS_DEG(this->obj.rot.y) * 100.0f); + src.y = (this->fwork[19] - this->obj.pos.y) - 80.0f; + src.z = this->fwork[20] - this->obj.pos.z; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + sp1D8 = Math_RadToDeg(Math_Atan2F(dest.x, dest.z)); + sp1D4 = Math_RadToDeg(-Math_Atan2F(dest.y, sqrtf(SQ(dest.x) + SQ(dest.z)))); if ((sp1D4 > 80.0f) && (sp1D4 <= 180.0f)) { sp1D4 = 80.0f; @@ -1572,16 +1596,16 @@ void SectorY_Boss_Update(Boss* boss) { sp1D8 = 350.0f; } - Math_SmoothStepToAngle(&boss->fwork[15], sp1D8, 0.2f, 4.0f, 0.1f); - Math_SmoothStepToAngle(&boss->fwork[14], sp1D4, 0.2f, 4.0f, 0.1f); - Matrix_RotateX(gCalcMatrix, -boss->fwork[14] * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gCalcMatrix, -boss->fwork[15] * M_DTOR, MTXF_APPLY); - sp58.x = boss->fwork[18] - boss->obj.pos.x; - sp58.y = (boss->fwork[19] - boss->obj.pos.y) + (COS_DEG(boss->obj.rot.z) * 40.0f); - sp58.z = (boss->fwork[20] - boss->obj.pos.z) - (COS_DEG(boss->obj.rot.y) * 60.0f); - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp58, &sp4C); - sp1E4 = Math_RadToDeg(Math_Atan2F(sp4C.x, sp4C.z)); - sp1E8 = Math_RadToDeg(-Math_Atan2F(sp4C.y, sqrtf(SQ(sp4C.x) + SQ(sp4C.z)))); + Math_SmoothStepToAngle(&this->fwork[15], sp1D8, 0.2f, 4.0f, 0.1f); + Math_SmoothStepToAngle(&this->fwork[14], sp1D4, 0.2f, 4.0f, 0.1f); + Matrix_RotateX(gCalcMatrix, -this->fwork[14] * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -this->fwork[15] * M_DTOR, MTXF_APPLY); + src.x = this->fwork[18] - this->obj.pos.x; + src.y = (this->fwork[19] - this->obj.pos.y) + (COS_DEG(this->obj.rot.z) * 40.0f); + src.z = (this->fwork[20] - this->obj.pos.z) - (COS_DEG(this->obj.rot.y) * 60.0f); + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + sp1E4 = Math_RadToDeg(Math_Atan2F(dest.x, dest.z)); + sp1E8 = Math_RadToDeg(-Math_Atan2F(dest.y, sqrtf(SQ(dest.x) + SQ(dest.z)))); if ((sp1E8 > 80.0f) && (sp1E8 <= 180.0f)) { sp1E8 = 80.0f; @@ -1596,52 +1620,52 @@ void SectorY_Boss_Update(Boss* boss) { sp1E4 = 270.0f; } - Math_SmoothStepToAngle(&boss->fwork[17], sp1E4, 0.2f, 4.0f, 0.1f); - Math_SmoothStepToAngle(&boss->fwork[16], sp1E8, 0.2f, 4.0f, 0.1f); + Math_SmoothStepToAngle(&this->fwork[17], sp1E4, 0.2f, 4.0f, 0.1f); + Math_SmoothStepToAngle(&this->fwork[16], sp1E8, 0.2f, 4.0f, 0.1f); } else { - Math_SmoothStepToAngle(&boss->fwork[6], 0.0f, 0.2f, 4.0f, 0.1f); - Math_SmoothStepToAngle(&boss->fwork[5], 0.0f, 0.2f, 4.0f, 0.1f); - Math_SmoothStepToAngle(&boss->fwork[8], 0.0f, 0.4f, 8.0f, 0.1f); - Math_SmoothStepToAngle(&boss->fwork[7], 0.0f, 0.4f, 8.0f, 0.1f); - Math_SmoothStepToAngle(&boss->fwork[15], 0.0f, 0.4f, 8.0f, 0.1f); - Math_SmoothStepToAngle(&boss->fwork[14], 0.0f, 0.4f, 8.0f, 0.1f); + Math_SmoothStepToAngle(&this->fwork[6], 0.0f, 0.2f, 4.0f, 0.1f); + Math_SmoothStepToAngle(&this->fwork[5], 0.0f, 0.2f, 4.0f, 0.1f); + Math_SmoothStepToAngle(&this->fwork[8], 0.0f, 0.4f, 8.0f, 0.1f); + Math_SmoothStepToAngle(&this->fwork[7], 0.0f, 0.4f, 8.0f, 0.1f); + Math_SmoothStepToAngle(&this->fwork[15], 0.0f, 0.4f, 8.0f, 0.1f); + Math_SmoothStepToAngle(&this->fwork[14], 0.0f, 0.4f, 8.0f, 0.1f); } - Math_SmoothStepToF(&boss->fwork[4], 0.0f, 0.2f, 10.0f, 0.0f); - Math_SmoothStepToF(&boss->fwork[34], 0.0f, 0.1f, 0.2f, 0.05f); - Math_SmoothStepToF(&boss->fwork[41], 0.0f, 0.1f, 0.05f, 0.05f); - Math_SmoothStepToF(&boss->fwork[42], 0.0f, 0.1f, 0.05f, 0.05f); - Math_SmoothStepToVec3fArray(sp64, boss->vwork, 1, sp1D0, boss->fwork[0], 100.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[4], 0.0f, 0.2f, 10.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[34], 0.0f, 0.1f, 0.2f, 0.05f); + Math_SmoothStepToF(&this->fwork[41], 0.0f, 0.1f, 0.05f, 0.05f); + Math_SmoothStepToF(&this->fwork[42], 0.0f, 0.1f, 0.05f, 0.05f); + Math_SmoothStepToVec3fArray(frameTable, this->vwork, 1, sp1D0, this->fwork[0], 100.0f, 0.0f); - if ((boss->dmgType != DMG_NONE) && (boss->health > 0)) { - boss->dmgType = DMG_NONE; - if (boss->dmgPart == 0) { - if (boss->swork[25] == 0) { - boss->swork[24] = 15; - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, boss->sfxSource, 4); + if ((this->dmgType != DMG_NONE) && (this->health > 0)) { + this->dmgType = DMG_NONE; + if (this->dmgPart == 0) { + if (this->swork[25] == 0) { + this->swork[24] = 15; + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } else { - SectorY_80198F5C(boss); + SectorY_80198F5C(this); } } else { - SectorY_80198F5C(boss); + SectorY_80198F5C(this); } } - if (boss->index == 0) { - radarMark = &gRadarMarks[boss->index + 1]; + if (this->index == 0) { + radarMark = &gRadarMarks[this->index + 1]; radarMark->status = 1; radarMark->type = 102; - radarMark->pos.x = boss->obj.pos.x; - radarMark->pos.y = boss->obj.pos.y; - radarMark->pos.z = boss->obj.pos.z; - radarMark->yRot = boss->rot_078.y + 180.0f; + radarMark->pos.x = this->obj.pos.x; + radarMark->pos.y = this->obj.pos.y; + radarMark->pos.z = this->obj.pos.z; + radarMark->yRot = this->rot_078.y + 180.0f; } else { - radarMark = &gRadarMarks[boss->index + 4]; + radarMark = &gRadarMarks[this->index + 4]; radarMark->status = 1; radarMark->type = 10; - radarMark->pos.x = boss->obj.pos.x; - radarMark->pos.y = boss->obj.pos.y; - radarMark->pos.z = boss->obj.pos.z; - radarMark->yRot = boss->rot_078.y + 180.0f; + radarMark->pos.x = this->obj.pos.x; + radarMark->pos.y = this->obj.pos.y; + radarMark->pos.z = this->obj.pos.z; + radarMark->yRot = this->rot_078.y + 180.0f; } if (gBossFrameCount == 250) { @@ -1651,31 +1675,31 @@ void SectorY_Boss_Update(Boss* boss) { } } } - if ((gBossFrameCount == 250) && (gTeamShields[TEAM_ID_SLIPPY] != 0) && (boss->swork[34] == 0)) { + if ((gBossFrameCount == 250) && (gTeamShields[TEAM_ID_SLIPPY] != 0) && (this->swork[34] == 0)) { Radio_PlayMessage(gMsg_ID_2225, RCID_SLIPPY); } - if ((gBossFrameCount == 620) && (boss->swork[34] == 0)) { + if ((gBossFrameCount == 620) && (this->swork[34] == 0)) { gShowBossHealth = 1; } - if ((gBossFrameCount >= 350) || (boss->swork[34] != 0)) { - if (boss->swork[34] != 0) { - gBossHealthBar = boss->health * 1.7f; + if ((gBossFrameCount >= 350) || (this->swork[34] != 0)) { + if (this->swork[34] != 0) { + gBossHealthBar = this->health * 1.7f; } else if (gBosses[0].unk_04A == 0) { gBossHealthBar = (gBosses[1].health + gBosses[2].health) * 1.275f; } } if (D_edisplay_801615D0.z > 0.0f) { - boss->swork[30]++; - if (boss->swork[30] > 300 && ((ABS(D_edisplay_801615D0.z) + ABS(D_edisplay_801615D0.x)) < 3500.0f) && + this->swork[30]++; + if (this->swork[30] > 300 && ((ABS(D_edisplay_801615D0.z) + ABS(D_edisplay_801615D0.x)) < 3500.0f) && (gRadioState == 0)) { if (gTeamShields[TEAM_ID_PEPPY] > 0) { Radio_PlayMessage(gMsg_ID_2282, RCID_PEPPY); } - boss->swork[30] = 150; + this->swork[30] = 150; } - if (boss->swork[30] > 100) { + if (this->swork[30] > 100) { if ((((ABS(D_edisplay_801615D0.z) + ABS(D_edisplay_801615D0.x)) < 500.0f) && gTeamShields[TEAM_ID_FALCO] > 0)) { Radio_PlayMessage(gMsg_ID_2233, RCID_FALCO); @@ -1689,7 +1713,7 @@ void SectorY_Boss_Update(Boss* boss) { } } else { - boss->swork[30] = 0; + this->swork[30] = 0; } } } @@ -1739,7 +1763,7 @@ bool SectorY_8019DC4C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return false; } -bool SectorY_8019DE10(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { +bool SectorY_Boss_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { Boss* boss = (Boss*) data; Vec3f sp38 = { 0.0f, 0.0f, 0.0f }; @@ -1791,7 +1815,7 @@ bool SectorY_8019DE10(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return false; } -void SectorY_8019E014(s32 limbIndex, Vec3f* rot, void* data) { +void SectorY_Boss_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* data) { Vec3f sp7C = { 40.0f, -30.0f, 0.0f }; Vec3f sp70 = { -40.0f, -30.0f, 0.0f }; Vec3f sp64 = { 0.0f, 0.0f, 0.0f }; @@ -1862,7 +1886,7 @@ void SectorY_8019E014(s32 limbIndex, Vec3f* rot, void* data) { static f32 D_i6_801A69AC[20] = { 0.3f, 0.7f, 1.3f, 0.7f, 0.3f, 0.0f, 10.0f, 20.0f, 300.0f, 100.0f, 200.0f, 100.0f, 60.0f, -260.0f, 80.0f, 100.0f, 80.0f, 262.0f, 285.0f, 252.0f }; -void SectorY_Boss_Draw(Boss* boss) { +void SectorY_Boss_Draw(Boss* this) { f32 sp9C; f32 sp98; f32 sp94; @@ -1870,40 +1894,41 @@ void SectorY_Boss_Draw(Boss* boss) { f32 sp8C; f32 sp88; - if ((boss->index != 0) || ((boss->swork[24] % 2) != 0) || ((boss->timer_05C % 2) != 0)) { + if ((this->index != 0) || ((this->swork[24] % 2) != 0) || ((this->timer_05C % 2) != 0)) { RCP_SetupDL_30(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } else { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } - if ((boss->health > 0) || (boss->swork[36] == 0)) { - Animation_DrawSkeleton(2, D_SY_602D140, boss->vwork, SectorY_8019DE10, SectorY_8019E014, boss, gCalcMatrix); - if (boss->timer_054 != 0) { - sp9C = D_i6_801A69AC[boss->timer_054]; + if ((this->health > 0) || (this->swork[36] == 0)) { + Animation_DrawSkeleton(2, D_SY_602D140, this->vwork, SectorY_Boss_OverrideLimbDraw, SectorY_Boss_PostLimbDraw, + this, gCalcMatrix); + if (this->timer_054 != 0) { + sp9C = D_i6_801A69AC[this->timer_054]; RCP_SetupDL_49(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 255, 48, 0, 255); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, boss->fwork[1], boss->fwork[2], boss->fwork[3], MTXF_APPLY); + Matrix_Translate(gGfxMatrix, this->fwork[1], this->fwork[2], this->fwork[3], MTXF_APPLY); Matrix_Scale(gGfxMatrix, sp9C, sp9C, sp9C, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); } - if (boss->fwork[34] != 0.0f) { + if (this->fwork[34] != 0.0f) { RCP_SetupDL_49(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 32, 255, 32, 255); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, boss->fwork[31], boss->fwork[32], boss->fwork[33], MTXF_APPLY); - Matrix_Scale(gGfxMatrix, boss->fwork[34], boss->fwork[34], boss->fwork[34], MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, -boss->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, -boss->obj.rot.z * M_DTOR, MTXF_APPLY); - sp98 = gPlayer[0].cam.eye.x - boss->obj.pos.x; - sp94 = gPlayer[0].cam.eye.y - boss->obj.pos.y; - sp90 = gPlayer[0].cam.eye.z - (boss->obj.pos.z + gPathProgress); + Matrix_Translate(gGfxMatrix, this->fwork[31], this->fwork[32], this->fwork[33], MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->fwork[34], this->fwork[34], this->fwork[34], MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, -this->obj.rot.z * M_DTOR, MTXF_APPLY); + sp98 = gPlayer[0].cam.eye.x - this->obj.pos.x; + sp94 = gPlayer[0].cam.eye.y - this->obj.pos.y; + sp90 = gPlayer[0].cam.eye.z - (this->obj.pos.z + gPathProgress); sp8C = -Math_Atan2F(sp98, sp90); sp9C = sqrtf(SQ(sp90) + SQ(sp98)); sp88 = Math_Atan2F(sp94, sp9C); @@ -1913,59 +1938,59 @@ void SectorY_Boss_Draw(Boss* boss) { gSPDisplayList(gMasterDisp++, D_1024AC0); } - if (boss->index == 0) { - if (boss->fwork[41] != 0.0f) { + if (this->index == 0) { + if (this->fwork[41] != 0.0f) { RCP_SetupDL_49(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 32, 255, 32, 255); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, boss->fwork[35], boss->fwork[36], boss->fwork[37], MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, boss->obj.rot.y * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, boss->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, boss->obj.rot.z * M_DTOR, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, boss->fwork[41] * 2.0f, boss->fwork[41], boss->fwork[41] * 2.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, this->fwork[35], this->fwork[36], this->fwork[37], MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, this->obj.rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->fwork[41] * 2.0f, this->fwork[41], this->fwork[41] * 2.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); } - if (boss->fwork[42] != 0.0f) { + if (this->fwork[42] != 0.0f) { RCP_SetupDL_49(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 32, 255, 32, 255); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, boss->fwork[38], boss->fwork[39], boss->fwork[40], MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, boss->obj.rot.y * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, boss->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, boss->obj.rot.z * M_DTOR, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, boss->fwork[42] * 2.0f, boss->fwork[42], boss->fwork[42] * 2.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, this->fwork[38], this->fwork[39], this->fwork[40], MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, this->obj.rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->fwork[42] * 2.0f, this->fwork[42], this->fwork[42] * 2.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); } } - if (boss->fwork[43] != 0.0f) { + if (this->fwork[43] != 0.0f) { RCP_SetupDL_49(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 0); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, boss->obj.pos.x, 157.0f, boss->obj.pos.z, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, this->obj.pos.x, 157.0f, this->obj.pos.z, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, boss->fwork[43], boss->fwork[43], boss->fwork[43], MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->fwork[43], this->fwork[43], this->fwork[43], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); } - if (boss->fwork[46] != 0.0f) { + if (this->fwork[46] != 0.0f) { RCP_SetupDL_49(); - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, (s32) boss->fwork[46], (s32) boss->fwork[46], 0, - (s32) boss->fwork[46]); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, (s32) this->fwork[46], (s32) this->fwork[46], 0, + (s32) this->fwork[46]); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 0); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, boss->obj.pos.x + 10.0f, boss->obj.pos.y + 70.0f, boss->obj.pos.z + 60.0f, + Matrix_Translate(gGfxMatrix, this->obj.pos.x + 10.0f, this->obj.pos.y + 70.0f, this->obj.pos.z + 60.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.4f, 0.2f, 0.2f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -1985,18 +2010,19 @@ static Vec3f D_i6_801A69FC[10] = { }; void SectorY_8019EB80(void) { - Actor* actor = gActors; + ActorCutscene* actor = &gActors[0]; s32 i; - s32 var_s1; + s32 actorCount; if (gHitCount >= 100) { - var_s1 = 9; + actorCount = 9; } else { - var_s1 = 2; + actorCount = 2; } + Rand_SetSeed(1, 29100, 9786); - for (i = 0; i <= (var_s1); i++, actor++) { + for (i = 0; i <= actorCount; i++, actor++) { if (((i == 0) && (gTeamShields[TEAM_ID_PEPPY] <= 0.0f)) || ((i == 1) && (gTeamShields[TEAM_ID_SLIPPY] <= 0.0f)) || ((i == 2) && (gTeamShields[TEAM_ID_FALCO] <= 0.0f))) { @@ -2005,13 +2031,17 @@ void SectorY_8019EB80(void) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; actor->obj.id = OBJ_ACTOR_CUTSCENE; + actor->obj.pos.x = (D_i6_801A69FC[i].x * 0.5f) + gPlayer[0].pos.x + RAND_FLOAT_CENTERED_SEEDED(2000.0f); actor->obj.pos.y = D_i6_801A69FC[i].y + gPlayer[0].pos.y + RAND_FLOAT_SEEDED(1000.0f); actor->obj.pos.z = D_i6_801A69FC[i].z + gPlayer[0].pos.z + RAND_FLOAT_SEEDED(1000.0f); + actor->rot_0F4.z = RAND_FLOAT_CENTERED_SEEDED(200.0f); + actor->vwork[0].x = (D_i6_801A69FC[i].x * 0.5f) + gPlayer[0].pos.x; actor->vwork[0].y = D_i6_801A69FC[i].y + gPlayer[0].pos.y; actor->vwork[0].z = D_i6_801A69FC[i].z + gPlayer[0].pos.z; + actor->state = 1; Object_SetInfo(&actor->info, actor->obj.id); @@ -2365,106 +2395,105 @@ void SectorY_LevelComplete(Player* player) { player->rockAngle = SIN_DEG(player->rockPhase); } -void SectorY_8019FF00(Actor* actor) { +void SectorY_8019FF00(Actor* this) { Vec3f sp4C; Vec3f sp40; - f32 temp1; - f32 temp2; + f32 x; + f32 z; - switch (actor->state) { + switch (this->state) { case 1: - Math_SmoothStepToF(&actor->obj.pos.x, actor->vwork[0].x, 0.02f, 2.0f, 0.0001f); - Math_SmoothStepToF(&actor->obj.pos.y, actor->vwork[0].y, 0.02f, 2.0f, 0.0001f); - Math_SmoothStepToF(&actor->obj.pos.z, actor->vwork[0].z, 0.02f, 2.0f, 0.0001f); - Math_SmoothStepToF(&actor->rot_0F4.z, 0.0f, 0.02f, 0.2f, 0.0001f); - if ((actor->animFrame != 0) && ((((s32) (actor->index % 8U) * 10) + 1030) < gCsFrameCount)) { - actor->state = 4; + Math_SmoothStepToF(&this->obj.pos.x, this->vwork[0].x, 0.02f, 2.0f, 0.0001f); + Math_SmoothStepToF(&this->obj.pos.y, this->vwork[0].y, 0.02f, 2.0f, 0.0001f); + Math_SmoothStepToF(&this->obj.pos.z, this->vwork[0].z, 0.02f, 2.0f, 0.0001f); + Math_SmoothStepToF(&this->rot_0F4.z, 0.0f, 0.02f, 0.2f, 0.0001f); + if ((this->animFrame != 0) && ((((s32) (this->index % 8U) * 10) + 1030) < gCsFrameCount)) { + this->state = 4; } break; case 2: - actor->state = 3; - AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); - actor->fwork[29] = 5.0f; + this->state = 3; + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, this->sfxSource, 0); + this->fwork[29] = 5.0f; /* fallthrough */ case 3: - actor->iwork[11] = 2; - actor->fwork[0] += 2.0f; - actor->rot_0F4.x += 0.1f; + this->iwork[11] = 2; + this->fwork[0] += 2.0f; + this->rot_0F4.x += 0.1f; break; case 5: - Math_SmoothStepToF(&actor->rot_0F4.x, 0.0f, 0.1f, 5.0f, 0.0f); - temp1 = actor->obj.pos.x - gBosses[actor->timer_04C].obj.pos.x; - temp2 = actor->obj.pos.z - gBosses[actor->timer_04C].obj.pos.z; - Math_SmoothStepToAngle(&actor->rot_0F4.z, - Math_SmoothStepToAngle(&actor->rot_0F4.y, Math_RadToDeg(Math_Atan2F(temp1, temp2)), - 0.5f, 2.0f, 0.0001f) * - 30.0f, - 0.1f, 5.0f, 0.0001f); + Math_SmoothStepToF(&this->rot_0F4.x, 0.0f, 0.1f, 5.0f, 0.0f); + x = this->obj.pos.x - gBosses[this->timer_04C].obj.pos.x; + z = this->obj.pos.z - gBosses[this->timer_04C].obj.pos.z; + Math_SmoothStepToAngle( + &this->rot_0F4.z, + Math_SmoothStepToAngle(&this->rot_0F4.y, Math_RadToDeg(Math_Atan2F(x, z)), 0.5f, 2.0f, 0.0001f) * 30.0f, + 0.1f, 5.0f, 0.0001f); break; case 7: - actor->rot_0F4.y = gPlayer[0].rot.y; - actor->rot_0F4.z = gPlayer[0].rot.z; - Math_SmoothStepToF(&actor->obj.pos.y, 50.0f, 0.1f, 1.0f, 0.0f); + this->rot_0F4.y = gPlayer[0].rot.y; + this->rot_0F4.z = gPlayer[0].rot.z; + Math_SmoothStepToF(&this->obj.pos.y, 50.0f, 0.1f, 1.0f, 0.0f); if (gPlayer[0].rot.y == 0.0f) { - Math_SmoothStepToF(&actor->obj.pos.x, 1300.0f, 1.0f, 2.0f, 0.0f); + Math_SmoothStepToF(&this->obj.pos.x, 1300.0f, 1.0f, 2.0f, 0.0f); } else { if (gCsFrameCount == 540) { - actor->fwork[29] = 3.8f; - AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); + this->fwork[29] = 3.8f; + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, this->sfxSource, 0); } - Math_SmoothStepToF(&actor->obj.pos.x, 230.0f, 1.0f, 13.0f, 0.0f); + Math_SmoothStepToF(&this->obj.pos.x, 230.0f, 1.0f, 13.0f, 0.0f); } break; case 8: - Math_SmoothStepToF(&actor->obj.pos.y, -100.0f, 0.1f, 1.0f, 0.0f); + Math_SmoothStepToF(&this->obj.pos.y, -100.0f, 0.1f, 1.0f, 0.0f); if (gCsFrameCount >= 535) { if (gCsFrameCount == 535) { - actor->fwork[29] = 3.8f; - AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); + this->fwork[29] = 3.8f; + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, this->sfxSource, 0); } - Math_SmoothStepToF(&actor->obj.pos.x, -1000.0f, 1.0f, 20.0f, 0.0f); - Math_SmoothStepToAngle(&actor->rot_0F4.z, 45.0f, 1.0f, 4.0f, 0.0f); + Math_SmoothStepToF(&this->obj.pos.x, -1000.0f, 1.0f, 20.0f, 0.0f); + Math_SmoothStepToAngle(&this->rot_0F4.z, 45.0f, 1.0f, 4.0f, 0.0f); } else { - actor->rot_0F4.y = gPlayer[0].rot.y; - actor->rot_0F4.z = gPlayer[0].rot.z; - Math_SmoothStepToF(&actor->obj.pos.x, -230.0f, 1.0f, 13.0f, 0.0f); + this->rot_0F4.y = gPlayer[0].rot.y; + this->rot_0F4.z = gPlayer[0].rot.z; + Math_SmoothStepToF(&this->obj.pos.x, -230.0f, 1.0f, 13.0f, 0.0f); } break; case 9: - Math_SmoothStepToF(&actor->obj.pos.y, -50.0f, 0.1f, 1.0f, 0.0f); + Math_SmoothStepToF(&this->obj.pos.y, -50.0f, 0.1f, 1.0f, 0.0f); if (gCsFrameCount >= 525) { if (gCsFrameCount == 525) { - actor->fwork[29] = 3.8f; - AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); + this->fwork[29] = 3.8f; + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, this->sfxSource, 0); } - Math_SmoothStepToF(&actor->obj.pos.x, 1500.0f, 1.0f, 20.0f, 0.0f); - Math_SmoothStepToAngle(&actor->rot_0F4.z, 315.0f, 1.0f, 2.0f, 0.0f); + Math_SmoothStepToF(&this->obj.pos.x, 1500.0f, 1.0f, 20.0f, 0.0f); + Math_SmoothStepToAngle(&this->rot_0F4.z, 315.0f, 1.0f, 2.0f, 0.0f); } else { - actor->rot_0F4.y = gPlayer[0].rot.y; - actor->rot_0F4.z = gPlayer[0].rot.z; - Math_SmoothStepToF(&actor->obj.pos.x, 150.0f, 1.0f, 13.0f, 0.0f); + this->rot_0F4.y = gPlayer[0].rot.y; + this->rot_0F4.z = gPlayer[0].rot.z; + Math_SmoothStepToF(&this->obj.pos.x, 150.0f, 1.0f, 13.0f, 0.0f); } break; } - if (actor->state != 6) { - Matrix_RotateY(gCalcMatrix, (actor->rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(actor->rot_0F4.x * M_DTOR), MTXF_APPLY); + if (this->state != 6) { + Matrix_RotateY(gCalcMatrix, (this->rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(this->rot_0F4.x * M_DTOR), MTXF_APPLY); sp4C.x = 0.0f; sp4C.y = 0.0f; - sp4C.z = actor->fwork[0]; + sp4C.z = this->fwork[0]; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp4C, &sp40); - actor->vel.x = sp40.x; - actor->vel.y = sp40.y; - actor->vel.z = sp40.z; - actor->obj.rot.x = -actor->rot_0F4.x; - actor->obj.rot.y = actor->rot_0F4.y + 180.0f; - actor->obj.rot.z = -actor->rot_0F4.z; + this->vel.x = sp40.x; + this->vel.y = sp40.y; + this->vel.z = sp40.z; + this->obj.rot.x = -this->rot_0F4.x; + this->obj.rot.y = this->rot_0F4.y + 180.0f; + this->obj.rot.z = -this->rot_0F4.z; } } @@ -2474,56 +2503,56 @@ static Vec3f D_i6_801A6A74[10] = { { -10100.0f, -300.0f, -600.0f }, { -10300.0f { -200.0f, -2400.0f, -12650.0f }, { 0.0f, 4000.0f, -600.0f }, { -10800.0f, 900.0f, -600.0f }, { -2750.0f, 900.0f, -9150.0f } }; -void SectorY_801A0510(Actor* actor, s32 arg1) { +void SectorY_801A0510(ActorCutscene* this, s32 arg1) { + Actor_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_ACTOR_CUTSCENE; - Actor_Initialize(actor); - actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.pos.x = D_i6_801A6A74[arg1].x; - actor->obj.pos.y = D_i6_801A6A74[arg1].y; - actor->obj.pos.z = D_i6_801A6A74[arg1].z; + this->obj.pos.x = D_i6_801A6A74[arg1].x; + this->obj.pos.y = D_i6_801A6A74[arg1].y; + this->obj.pos.z = D_i6_801A6A74[arg1].z; switch (arg1) { case 0: case 1: case 2: case 8: - actor->animFrame = 38; - actor->obj.rot.y = 90.0f; - Object_SetInfo(&actor->info, actor->obj.id); + this->animFrame = 38; + this->obj.rot.y = 90.0f; + Object_SetInfo(&this->info, this->obj.id); break; case 3: - actor->animFrame = 36; - actor->vel.z = -5.0f; - actor->scale = 1.0f; - actor->obj.rot.y = 180.0f; - Object_SetInfo(&actor->info, actor->obj.id); + this->animFrame = 36; + this->vel.z = -5.0f; + this->scale = 1.0f; + this->obj.rot.y = 180.0f; + Object_SetInfo(&this->info, this->obj.id); break; case 4: - actor->animFrame = 37; - actor->obj.rot.y = 90.0f; - Object_SetInfo(&actor->info, actor->obj.id); + this->animFrame = 37; + this->obj.rot.y = 90.0f; + Object_SetInfo(&this->info, this->obj.id); break; case 5: case 9: - actor->animFrame = 39; - actor->obj.rot.y = 180.0f; - Object_SetInfo(&actor->info, actor->obj.id); + this->animFrame = 39; + this->obj.rot.y = 180.0f; + Object_SetInfo(&this->info, this->obj.id); break; case 6: - actor->animFrame = 36; - actor->obj.rot.y = 180.0f; - actor->scale = 1.0f; - Object_SetInfo(&actor->info, actor->obj.id); + this->animFrame = 36; + this->obj.rot.y = 180.0f; + this->scale = 1.0f; + Object_SetInfo(&this->info, this->obj.id); break; case 7: - actor->animFrame = 40; - Object_SetInfo(&actor->info, actor->obj.id); + this->animFrame = 40; + Object_SetInfo(&this->info, this->obj.id); break; default: @@ -2536,74 +2565,76 @@ static Vec3f D_i6_801A6AEC[5] = { { 0.0f, 345.0f, 350.0f }, { 90.0f, 87.0f, 93.0f }, }; -void SectorY_801A06A4(Actor* actor, s32 arg1) { - +void SectorY_801A06A4(ActorCutscene* this, s32 arg1) { if (gTeamShields[1 + arg1] > 0) { - Actor_Initialize(actor); - actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.pos.x = gPlayer[0].pos.x + D_i6_801A6AEC[arg1].x; - actor->obj.pos.y = gPlayer[0].pos.y + D_i6_801A6AEC[arg1].y; - actor->obj.pos.z = gPlayer[0].pos.z + D_i6_801A6AEC[arg1].z; - actor->fwork[0] = gPlayer[0].baseSpeed; - actor->rot_0F4.y = gPlayer[0].rot.y; - actor->rot_0F4.z = gPlayer[0].rot.z; - actor->state = arg1 + 7; - actor->iwork[11] = 1; - Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); - AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); + Actor_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_ACTOR_CUTSCENE; + + this->obj.pos.x = gPlayer[0].pos.x + D_i6_801A6AEC[arg1].x; + this->obj.pos.y = gPlayer[0].pos.y + D_i6_801A6AEC[arg1].y; + this->obj.pos.z = gPlayer[0].pos.z + D_i6_801A6AEC[arg1].z; + + this->fwork[0] = gPlayer[0].baseSpeed; + this->rot_0F4.y = gPlayer[0].rot.y; + this->rot_0F4.z = gPlayer[0].rot.z; + this->state = arg1 + 7; + this->iwork[11] = 1; + Object_SetInfo(&this->info, this->obj.id); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, this->sfxSource, 0); } } -void SectorY_801A07FC(Actor* actor0, Actor* actor1) { - Vec3f sp3C; - Vec3f sp30; +void SectorY_801A07FC(Actor* actor0, ActorCutscene* actor1) { + Vec3f src; + Vec3f dest; Actor_Initialize(actor1); actor1->obj.status = OBJ_ACTIVE; actor1->obj.id = OBJ_ACTOR_CUTSCENE; actor0->fwork[6] = 1.8f; - sp3C.x = -40.0f; - sp3C.y = 0.0f; - sp3C.z = 80.0f; + src.x = -40.0f; + src.y = 0.0f; + src.z = 80.0f; Matrix_RotateY(gCalcMatrix, actor0->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, actor0->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, actor0->obj.rot.z * M_DTOR, MTXF_APPLY); - Matrix_MultVec3f(gCalcMatrix, &sp3C, &sp30); - actor1->obj.pos.x = actor0->obj.pos.x + sp30.x; - actor1->obj.pos.y = actor0->obj.pos.y + sp30.y; - actor1->obj.pos.z = actor0->obj.pos.z + sp30.z; + Matrix_MultVec3f(gCalcMatrix, &src, &dest); + actor1->obj.pos.x = actor0->obj.pos.x + dest.x; + actor1->obj.pos.y = actor0->obj.pos.y + dest.y; + actor1->obj.pos.z = actor0->obj.pos.z + dest.z; Object_SetInfo(&actor1->info, actor1->obj.id); Matrix_RotateY(gCalcMatrix, actor0->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, actor0->obj.rot.x * M_DTOR, MTXF_APPLY); - sp3C.x = 0.0f; - sp3C.y = 0.0f; - sp3C.z = 160.0f; - Matrix_MultVec3f(gCalcMatrix, &sp3C, &sp30); + src.x = 0.0f; + src.y = 0.0f; + src.z = 160.0f; + Matrix_MultVec3f(gCalcMatrix, &src, &dest); actor1->timer_0BC = 100; - actor1->vel.x = sp30.x; - actor1->vel.y = sp30.y; - actor1->vel.z = sp30.z; + actor1->vel.x = dest.x; + actor1->vel.y = dest.y; + actor1->vel.z = dest.z; actor1->obj.rot.x = actor0->obj.rot.x; actor1->obj.rot.y = actor0->obj.rot.y; actor1->animFrame = 42; AUDIO_PLAY_SFX(NA_SE_EN_MS_SHOT_S, actor1->sfxSource, 4); } -void SectorY_801A0A08(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 arg4) { - Actor_Initialize(actor); - actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_CUTSCENE; - actor->fwork[0] = arg4; - actor->obj.pos.x = xPos; - actor->obj.pos.y = yPos; - actor->obj.pos.z = zPos; - Object_SetInfo(&actor->info, actor->obj.id); - actor->timer_0BC = 35; - actor->iwork[0] = 255; - actor->animFrame = 43; - AUDIO_PLAY_SFX(NA_SE_EN_MS_SHOT_S, actor->sfxSource, 4); +void SectorY_801A0A08(ActorCutscene* this, f32 xPos, f32 yPos, f32 zPos, f32 arg4) { + Actor_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_ACTOR_CUTSCENE; + + this->fwork[0] = arg4; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + Object_SetInfo(&this->info, this->obj.id); + this->timer_0BC = 35; + this->iwork[0] = 255; + this->animFrame = 43; + AUDIO_PLAY_SFX(NA_SE_EN_MS_SHOT_S, this->sfxSource, 4); } void SectorY_801A0AC0(Player* player) { @@ -2648,7 +2679,7 @@ void SectorY_801A0AC0(Player* player) { } if ((gGameFrameCount & 12) && ((gGameFrameCount % 4) == 0)) { - spB0 = (((gGameFrameCount & 12) >> 2) + 4); + spB0 = ((gGameFrameCount & 12) >> 2) + 4; for (i = 10; i < ARRAY_COUNT(gActors); i++) { if (gActors[i].obj.status == OBJ_FREE) { SectorY_801A07FC(&gActors[spB0], &gActors[i]); @@ -2656,7 +2687,7 @@ void SectorY_801A0AC0(Player* player) { } } } - if (((gGameFrameCount % 4) == 0)) { + if ((gGameFrameCount % 4) == 0) { spB0 = ((s32) (gGameFrameCount % 16U) >> 2) + 4; if (spB0 == 4) { if (gCsFrameCount < 140) { @@ -3346,21 +3377,28 @@ void SectorY_801A0AC0(Player* player) { gActors[7].obj.pos.z = -7100.0f; gActors[8].obj.pos.z = -8100.0f; gActors[9].obj.pos.z = -7100.0f; + D_ctx_80177A48[0] = 1.0f; + player->pos.z = player->trueZpos = 0.0f; player->baseSpeed = gArwingSpeed; + AUDIO_PLAY_BGM(NA_BGM_STAGE_SY); + gLevelStartStatusScreenTimer = 100; + player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->csState = 0; player->csTimer = 0; player->csEventTimer = 0; + gCsCamEyeX = player->pos.x; gCsCamEyeY = (player->pos.y * player->unk_148) + 50.0f; gCsCamEyeZ = 400.0f; gCsCamAtX = player->pos.x; gCsCamAtY = (player->pos.y * player->unk_148) + 20.0f; gCsCamAtZ = player->trueZpos; + player->cam.eye.x = player->pos.x; player->cam.eye.y = player->pos.y * player->unk_148; player->cam.eye.y += 50.0f; @@ -3397,20 +3435,21 @@ void SectorY_801A0AC0(Player* player) { player->trueZpos = player->pos.z + player->camDist; } -void SectorY_SetupDebris(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, s32 state) { - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_DEBRIS; - actor->state = state; - actor->obj.pos.x = xPos; - actor->obj.pos.y = yPos; - actor->obj.pos.z = zPos; - actor->vel.x = xVel; - actor->vel.y = yVel; - actor->vel.z = zVel; - actor->scale = 2.5f; - actor->timer_0BC = RAND_INT(15.0f) + 15.0f; - Object_SetInfo(&actor->info, actor->obj.id); +void SectorY_SetupDebris(ActorDebris* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, s32 state) { + Actor_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_ACTOR_DEBRIS; + + this->state = state; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + this->vel.x = xVel; + this->vel.y = yVel; + this->vel.z = zVel; + this->scale = 2.5f; + this->timer_0BC = RAND_INT(15.0f) + 15.0f; + Object_SetInfo(&this->info, this->obj.id); } void SectorY_SpawnDebris(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, s32 state) { @@ -3555,7 +3594,7 @@ void SectorY_Actor204_Update(Actor204* this) { gPlayer[0].pos.x += RAND_FLOAT_CENTERED(300.0f); gPlayer[0].pos.y += RAND_FLOAT_CENTERED(300.0f); } - func_effect_8007F11C(OBJ_EFFECT_354, this->fwork[16], this->fwork[17], this->fwork[18], 100.0f); + Effect_EnemyLaser(OBJ_EFFECT_354, this->fwork[16], this->fwork[17], this->fwork[18], 100.0f); gPlayer[0].pos.x = sp1E4; gPlayer[0].pos.y = sp1E0; AUDIO_PLAY_SFX(NA_SE_EN_MS_SHOT_S, this->sfxSource, 4); @@ -3749,7 +3788,7 @@ static s32 D_i6_801A6B28[3] = { 255, 150, 150 }; static s32 D_i6_801A6B34[3] = { 150, 255, 150 }; static s32 D_i6_801A6B40[6] = { 150, 150, 255 }; -bool SectorY_801A4A18(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { +bool SectorY_Actor204_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { Actor* actor = (Actor*) data; if (limbIndex == 4) { @@ -3786,7 +3825,7 @@ bool SectorY_801A4A18(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return false; } -void SectorY_801A4C34(s32 limbIndex, Vec3f* rot, void* data) { +void SectorY_Actor204_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* data) { Vec3f sp2C = { 40.0f, -30.0f, 0.0f }; Vec3f sp20; Actor* actor = (Actor*) data; @@ -3807,7 +3846,8 @@ void SectorY_Actor204_Draw(Actor204* this) { f32 scale; RCP_SetupDL_30(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); - Animation_DrawSkeleton(2, D_SY_602D140, this->vwork, SectorY_801A4A18, SectorY_801A4C34, this, gCalcMatrix); + Animation_DrawSkeleton(2, D_SY_602D140, this->vwork, SectorY_Actor204_OverrideLimbDraw, + SectorY_Actor204_PostLimbDraw, this, gCalcMatrix); if (this->timer_0C4 != 0) { scale = D_i6_801A6B64[this->timer_0C4]; @@ -3824,69 +3864,70 @@ void SectorY_Actor204_Draw(Actor204* this) { } } -void SectorY_801A4E44(Scenery* scenery) { - Vec3f sp3C; - Vec3f sp30; +void SectorY_Scenery109_Update(Scenery* scenery) { + Vec3f src; + Vec3f dest; if (scenery->state == 0) { AUDIO_PLAY_SFX(NA_SE_OB_BROKEN_SPARK_L, scenery->sfxSource, 4); scenery->state++; } - if (((gGameFrameCount % 4) == 0)) { + + if ((gGameFrameCount % 4) == 0) { Matrix_RotateY(gCalcMatrix, scenery->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, scenery->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, scenery->obj.rot.z * M_DTOR, MTXF_APPLY); - sp3C.x = RAND_FLOAT_CENTERED(100.0f) + 500.0f; - sp3C.y = RAND_FLOAT_CENTERED(900.0f) + -150.0f; - sp3C.z = 90.0f - RAND_FLOAT(50.0f); - Matrix_MultVec3f(gCalcMatrix, &sp3C, &sp30); - func_effect_8007C120(scenery->obj.pos.x + sp30.x, scenery->obj.pos.y + sp30.y, scenery->obj.pos.z + sp30.z, + src.x = RAND_FLOAT_CENTERED(100.0f) + 500.0f; + src.y = RAND_FLOAT_CENTERED(900.0f) + -150.0f; + src.z = 90.0f - RAND_FLOAT(50.0f); + Matrix_MultVec3f(gCalcMatrix, &src, &dest); + func_effect_8007C120(scenery->obj.pos.x + dest.x, scenery->obj.pos.y + dest.y, scenery->obj.pos.z + dest.z, scenery->effectVel.x, scenery->effectVel.y, scenery->effectVel.z, 0.2f, 5); - sp3C.x = RAND_FLOAT_CENTERED(100.0f) + -500.0f; - sp3C.y = RAND_FLOAT_CENTERED(900.0f); - sp3C.z = 80.0f - RAND_FLOAT(50.0f); - Matrix_MultVec3f(gCalcMatrix, &sp3C, &sp30); - func_effect_8007C120(scenery->obj.pos.x + sp30.x, scenery->obj.pos.y + sp30.y, scenery->obj.pos.z + sp30.z, + src.x = RAND_FLOAT_CENTERED(100.0f) + -500.0f; + src.y = RAND_FLOAT_CENTERED(900.0f); + src.z = 80.0f - RAND_FLOAT(50.0f); + Matrix_MultVec3f(gCalcMatrix, &src, &dest); + func_effect_8007C120(scenery->obj.pos.x + dest.x, scenery->obj.pos.y + dest.y, scenery->obj.pos.z + dest.z, scenery->effectVel.x, scenery->effectVel.y, scenery->effectVel.z, 0.2f, 5); - sp3C.x = RAND_FLOAT_CENTERED(100.0f) + 500.0f; - sp3C.y = RAND_FLOAT_CENTERED(900.0f) + -50.0f; - sp3C.z = 1900.0f - RAND_FLOAT(50.0f); - Matrix_MultVec3f(gCalcMatrix, &sp3C, &sp30); - func_effect_8007C120(scenery->obj.pos.x + sp30.x, scenery->obj.pos.y + sp30.y, scenery->obj.pos.z + sp30.z, + src.x = RAND_FLOAT_CENTERED(100.0f) + 500.0f; + src.y = RAND_FLOAT_CENTERED(900.0f) + -50.0f; + src.z = 1900.0f - RAND_FLOAT(50.0f); + Matrix_MultVec3f(gCalcMatrix, &src, &dest); + func_effect_8007C120(scenery->obj.pos.x + dest.x, scenery->obj.pos.y + dest.y, scenery->obj.pos.z + dest.z, scenery->effectVel.x, scenery->effectVel.y, scenery->effectVel.z, 0.2f, 5); - sp3C.x = RAND_FLOAT_CENTERED(100.0f) + -1000.0f; - sp3C.y = RAND_FLOAT_CENTERED(900.0f) + -250.0f; - sp3C.z = 1100.0f - RAND_FLOAT(50.0f); - Matrix_MultVec3f(gCalcMatrix, &sp3C, &sp30); - func_effect_8007C120(scenery->obj.pos.x + sp30.x, scenery->obj.pos.y + sp30.y, scenery->obj.pos.z + sp30.z, + src.x = RAND_FLOAT_CENTERED(100.0f) + -1000.0f; + src.y = RAND_FLOAT_CENTERED(900.0f) + -250.0f; + src.z = 1100.0f - RAND_FLOAT(50.0f); + Matrix_MultVec3f(gCalcMatrix, &src, &dest); + func_effect_8007C120(scenery->obj.pos.x + dest.x, scenery->obj.pos.y + dest.y, scenery->obj.pos.z + dest.z, scenery->effectVel.x, scenery->effectVel.y, scenery->effectVel.z, 0.2f, 5); } } -void SectorY_801A52B8(Scenery* scenery) { - Vec3f sp44; - Vec3f sp38; +void SectorY_Scenery112_Update(Scenery* scenery) { + Vec3f src; + Vec3f dest; if (scenery->state == 0) { AUDIO_PLAY_SFX(NA_SE_OB_BROKEN_SPARK_L, scenery->sfxSource, 4); scenery->state++; } - if (((gGameFrameCount % 4) == 0)) { + if ((gGameFrameCount % 4) == 0) { Matrix_RotateY(gCalcMatrix, scenery->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, scenery->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, scenery->obj.rot.z * M_DTOR, MTXF_APPLY); - sp44.x = RAND_FLOAT_CENTERED(100.0f) + -800.0f; - sp44.y = RAND_FLOAT_CENTERED(300.0f) + -100.0f; - sp44.z = RAND_FLOAT_CENTERED(5000.0f) + 500.0f; - Matrix_MultVec3f(gCalcMatrix, &sp44, &sp38); - func_effect_8007C120(scenery->obj.pos.x + sp38.x, scenery->obj.pos.y + sp38.y, scenery->obj.pos.z + sp38.z, + src.x = RAND_FLOAT_CENTERED(100.0f) + -800.0f; + src.y = RAND_FLOAT_CENTERED(300.0f) + -100.0f; + src.z = RAND_FLOAT_CENTERED(5000.0f) + 500.0f; + Matrix_MultVec3f(gCalcMatrix, &src, &dest); + func_effect_8007C120(scenery->obj.pos.x + dest.x, scenery->obj.pos.y + dest.y, scenery->obj.pos.z + dest.z, scenery->effectVel.x, scenery->effectVel.y, scenery->effectVel.z, 0.3f, 5); - sp44.x = RAND_FLOAT_CENTERED(100.0f) + -600.0f; - sp44.y = RAND_FLOAT_CENTERED(250.0f) + 300.0f; - sp44.z = RAND_FLOAT_CENTERED(1500.0f) + -1650.0f; - Matrix_MultVec3f(gCalcMatrix, &sp44, &sp38); - func_effect_8007C120(scenery->obj.pos.x + sp38.x, scenery->obj.pos.y + sp38.y, scenery->obj.pos.z + sp38.z, + src.x = RAND_FLOAT_CENTERED(100.0f) + -600.0f; + src.y = RAND_FLOAT_CENTERED(250.0f) + 300.0f; + src.z = RAND_FLOAT_CENTERED(1500.0f) + -1650.0f; + Matrix_MultVec3f(gCalcMatrix, &src, &dest); + func_effect_8007C120(scenery->obj.pos.x + dest.x, scenery->obj.pos.y + dest.y, scenery->obj.pos.z + dest.z, scenery->effectVel.x, scenery->effectVel.y, scenery->effectVel.z, 0.2f, 5); } } diff --git a/src/overlays/ovl_i6/fox_ve2.c b/src/overlays/ovl_i6/fox_ve2.c index 86c3713a..70d1f6a0 100644 --- a/src/overlays/ovl_i6/fox_ve2.c +++ b/src/overlays/ovl_i6/fox_ve2.c @@ -1,12 +1,18 @@ +/* + * File: fox_ve2.c + * System: Venom2 + * Description: Level: Venom 2 + */ + #include "global.h" #include "assets/ast_venom_2.h" -void Venom2_Boss_Update(Boss* boss) { +void Venom2_Boss_Update(BossVE2* boss) { Math_SmoothStepToF(&boss->fwork[0], boss->fwork[1], 0.5f, 5.0f, 0.0f); } -bool Venom2_8019624C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { - Boss* boss = (Boss*) data; +bool Venom2_Boss_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { + BossVE2* boss = (BossVE2*) data; if ((limbIndex == 1) || (limbIndex == 2)) { pos->x -= boss->fwork[0]; @@ -15,25 +21,25 @@ bool Venom2_8019624C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* d return false; } -void Venom2_Boss_Draw(Boss* boss) { +void Venom2_Boss_Draw(BossVE2* boss) { Animation_GetFrameData(&D_VE2_6014904, 0, boss->vwork); - Animation_DrawSkeleton(3, D_VE2_60149D0, boss->vwork, Venom2_8019624C, NULL, boss, gCalcMatrix); + Animation_DrawSkeleton(3, D_VE2_60149D0, boss->vwork, Venom2_Boss_OverrideLimbDraw, NULL, boss, gCalcMatrix); } -void Venom2_801962F4(Actor* actor) { +void Venom2_UpdateStarWolfEvents(ActorAllRange* actor) { ActorAllRange_UpdateStarWolfEvents(actor); } -static Vec3f D_i6_801A68B0[6] = { +static Vec3f sTeamInitPos[6] = { { 0.0f, 4030.0f, 18000.0f }, { -500.0f, 3820.0f, 17200.0f }, { 550.0f, 3750.0f, 17000.0f }, { 1000.0f, 300.0f, 0.0f }, { -1000.0f, 300.0f, 0.0f }, { 0.0f, 500.0f, 0.0f }, }; -static f32 D_i6_801A68F8[3] = { 300.0f, 70.0f, 280.0f }; +static f32 sTeamInitRot[3] = { 300.0f, 70.0f, 280.0f }; -void Venom2_UpdateEvents(Actor* this) { - Actor* team; - Actor* wolf = &gActors[4]; +void Venom2_UpdateEvents(ActorAllRange* this) { + ActorAllRange* team; + ActorAllRange* wolf = &gActors[4]; Player* player = &gPlayer[0]; s32 i; @@ -64,20 +70,19 @@ void Venom2_UpdateEvents(Actor* this) { player->rot.x = -20.0f; player->yRot_114 = 0.0f; this->timer_0BC = 210; - for (team = &gActors[1], i = 1; i < 4; i++, team++) { - team->obj.pos.x = D_i6_801A68B0[i - 1].x; - team->obj.pos.y = D_i6_801A68B0[i - 1].y + 750.f; - team->obj.pos.z = D_i6_801A68B0[i - 1].z; - team->obj.rot.z = D_i6_801A68F8[i - 1]; + for (team = &gActors[AI360_FALCO], i = AI360_FALCO; i <= AI360_PEPPY; i++, team++) { + team->obj.pos.x = sTeamInitPos[i - 1].x; + team->obj.pos.y = sTeamInitPos[i - 1].y + 750.f; + team->obj.pos.z = sTeamInitPos[i - 1].z; + team->obj.rot.z = sTeamInitRot[i - 1]; team->rot_0F4.x = 340.0f; } gFillScreenAlpha = gFillScreenAlphaTarget = 255; } - Camera_UpdateArwing360(player, 1); + Camera_UpdateArwing360(player, true); /* fallthrough */ case 1: - for (team = &gActors[1], i = 1; i < 4; i++, team++) { team->state = 0; team->timer_0BC = 3; @@ -93,13 +98,15 @@ void Venom2_UpdateEvents(Actor* this) { Radio_PlayMessage(gMsg_ID_19010, RCID_FOX); } break; + case 2: - Venom2_801962F4(this); + Venom2_UpdateStarWolfEvents(this); if (((gAllRangeSpawnEvent + 100) < gAllRangeEventTimer) && (gActors[4].obj.status == OBJ_FREE) && (gActors[5].obj.status == OBJ_FREE) && (gActors[6].obj.status == OBJ_FREE) && (gActors[7].obj.status == OBJ_FREE) && (this->timer_0BE == 0)) { this->timer_0BE = 80; } + if ((this->timer_0BE == 1) && (player->state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) { for (i = 1; i < ARRAY_COUNT(gTeamShields); i++) { gPrevPlanetTeamShields[i] = gSavedTeamShields[i]; @@ -119,6 +126,7 @@ void Venom2_UpdateEvents(Actor* this) { D_ctx_80177CC4 = gLeftWingHealth[0]; } break; + case 3: gPauseEnabled = false; if (gStarWolfMsgTimer < 600) { @@ -126,19 +134,22 @@ void Venom2_UpdateEvents(Actor* this) { player->cam.eye.y += wolf->vel.y * 0.23f; player->cam.eye.z += wolf->vel.z * 0.23f; } + Math_SmoothStepToF(&player->cam.at.x, wolf->obj.pos.x, 1.0f, 20000.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.y, wolf->obj.pos.y, 1.0f, 20000.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.z, wolf->obj.pos.z, 1.0f, 20000.0f, 0.0f); Math_SmoothStepToF(&player->camRoll, 0, 0.1f, 0.2f, 0.0f); + if ((gControllerPress->button & START_BUTTON) || (gAllRangeEventTimer == (gAllRangeSpawnEvent + 300))) { this->state = 2; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; - Camera_Update360(player, 1); + Camera_Update360(player, true); player->unk_014 = 0.0f; D_hud_80161708 = 0; } break; } + if (gStarWolfMsgTimer != 0) { gStarWolfMsgTimer--; @@ -165,9 +176,9 @@ void Venom2_UpdateEvents(Actor* this) { } } -void Venom2_80196968(void) { +void Venom2_LoadLevelObjects(void) { Actor* actor; - Boss* boss; + BossVE2* boss; Scenery360* scenery360; s32 i; @@ -300,11 +311,14 @@ void Venom2_LevelComplete(Player* player) { player->csState++; player->wings.unk_04 = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = 0.0f; player->wings.modelId = 1; + D_ctx_80177A48[0] = 0.0f; D_ctx_80177A48[1] = 0.1f; D_ctx_80177A48[3] = 0.0f; D_ctx_80177A48[4] = 0.0f; + player->csTimer = 0; + if ((fabsf(sp94) < 4000.0f) && (fabsf(sp8C) < 4000.0f)) { player->csTimer = 250; sp64.x = 0.0f; @@ -315,6 +329,7 @@ void Venom2_LevelComplete(Player* player) { D_ctx_80177A48[5] = sp58.x; D_ctx_80177A48[6] = sp58.z; } + if (gLevelPhase == 2) { player->csEventTimer = 240; } else { @@ -329,8 +344,10 @@ void Venom2_LevelComplete(Player* player) { gFillScreenAlphaTarget = 0; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; } + Math_SmoothStepToF(&D_ctx_80177A48[1], 0.8f, 1.0f, 0.05f, 0.0f); Math_SmoothStepToF(&player->zRotBank, 0.0f, 0.1f, 15.0f, 0.0f); + if (player->csTimer == 1) { D_ctx_80177A48[4] = 0.0f; } @@ -339,6 +356,7 @@ void Venom2_LevelComplete(Player* player) { sp90 = player->pos.y - (gBosses[0].obj.pos.y + 700.0f); sp8C = player->pos.z - (gBosses[0].obj.pos.z + D_ctx_80177A48[6]); } + sp84 = Math_RadToDeg(Math_Atan2F(sp94, sp8C)); sp8C = sqrtf(SQ(sp94) + SQ(sp8C)); pad88 = Math_RadToDeg(-Math_Atan2F(sp90, sp8C)); @@ -348,16 +366,22 @@ void Venom2_LevelComplete(Player* player) { Math_SmoothStepToF(&D_ctx_80177A48[4], 3.0f, 1.0f, 0.1f, 0.0f); Matrix_RotateX(gCalcMatrix, -(D_PI / 9), MTXF_NEW); Matrix_RotateY(gCalcMatrix, (D_ctx_80177A48[3] + player->yRot_114) * M_DTOR, MTXF_APPLY); + D_ctx_80177A48[3] += 1.0f; + sp64.x = 0.0f; sp64.y = 0.0f; sp64.z = 400.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp64, &sp58); + gCsCamEyeX = player->pos.x + sp58.x; gCsCamEyeY = player->pos.y + sp58.y; gCsCamEyeZ = player->pos.z + sp58.z; + Math_SmoothStepToF(D_ctx_80177A48, 0.5f, 1.0f, 0.01f, 0.0f); Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f); + if ((player->csTimer == 0) && (fabsf(sp94) < 50.0f) && (fabsf(sp8C) < 50.0f)) { player->csState++; D_ctx_80177A48[2] = 0.75f; @@ -374,10 +398,13 @@ void Venom2_LevelComplete(Player* player) { Audio_SetBgmParam(0); } break; + case 2: player->unk_190 = 2.0f; + Math_SmoothStepToF(&player->xRot_120, 270.0f, 0.1f, D_ctx_80177A48[2], 0.0f); Math_SmoothStepToF(&D_ctx_80177A48[2], 4.0f, 1.0f, 0.05f, 0.0f); + if (player->xRot_120 > 80.0f) { Math_SmoothStepToF(&player->zRotBank, 10000.0f, 0.1f, 8.0f, 0.0f); } @@ -414,6 +441,7 @@ void Venom2_LevelComplete(Player* player) { gNextGameState = GSTATE_PLAY; gNextLevel = LEVEL_VENOM_ANDROSS; + if (gLeveLClearStatus[gCurrentLevel] != 0) { gNextLevelPhase = 1; } @@ -430,6 +458,7 @@ void Venom2_LevelComplete(Player* player) { } break; } + if (player->csEventTimer == 150) { Radio_PlayMessage(gMsg_ID_8215, RCID_FOX); AUDIO_PLAY_BGM(NA_BGM_DASH_INTO_BASE); diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index 84f51d3d..5d675202 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -8,9 +8,9 @@ #include "global.h" #include "fox_map.h" #include "fox_option.h" -// #include "prevent_bss_reordering.h" -// #include "prevent_bss_reordering2.h" -// #include "prevent_bss_reordering3.h" +#include "prevent_bss_reordering.h" +#include "prevent_bss_reordering2.h" +#include "prevent_bss_reordering3.h" #include "assets/ast_map.h" #include "assets/ast_text.h" #include "assets/ast_font_3d.h" @@ -4285,7 +4285,7 @@ void Map_801A6628(void) { gSavedObjectLoadIndex = 0; gSavedPathProgress = 0.0f; - D_ctx_8017782C = 1; + D_ctx_8017782C = true; } void Map_801A6694(void) { diff --git a/src/overlays/ovl_menu/fox_option.c b/src/overlays/ovl_menu/fox_option.c index 64566083..f89be570 100644 --- a/src/overlays/ovl_menu/fox_option.c +++ b/src/overlays/ovl_menu/fox_option.c @@ -29,14 +29,14 @@ extern f32 D_menu_801CD818[]; s32 D_menu_801B9090; s32 D_menu_801B9094; -s32 D_menu_801B9098; // gap -s32 D_menu_801B90A0[3]; // gap -s32 D_menu_801B90B0[3]; // gap -f32 D_menu_801B90C0[3]; // gap -f32 D_menu_801B90D0[3]; // gap -f32 D_menu_801B90E0[3]; // gap -f32 D_menu_801B90F0[3]; // gap -f32 D_menu_801B9100[3]; // gap +s32 D_menu_801B9098; +s32 D_menu_801B90A0[3]; +s32 D_menu_801B90B0[3]; +f32 D_menu_801B90C0[3]; +f32 D_menu_801B90D0[3]; +f32 D_menu_801B90E0[3]; +f32 D_menu_801B90F0[3]; +f32 D_menu_801B9100[3]; f32 D_menu_801B9110[3]; f32 D_menu_801B911C; f32 D_menu_801B9120; @@ -54,7 +54,7 @@ s32 D_menu_801B9158; UnkStruct_D_menu_801B9250 D_menu_801B9160[3]; s32 D_menu_801B9178; s32 D_menu_801B917C; -UnkStruct_D_menu_801B9250 D_menu_801B9180; // gap +UnkStruct_D_menu_801B9250 D_menu_801B9180; UnkStruct_D_menu_801B9250 D_menu_801B9188; UnkStruct_D_menu_801B9250 D_menu_801B9190; UnkStruct_D_menu_801B9250 D_menu_801B9198; @@ -803,7 +803,7 @@ void Option_TrainingUpdate(void) { Play_Setup(); gSavedObjectLoadIndex = 0; gSavedPathProgress = 0.0f; - D_ctx_8017782C = 1; + D_ctx_8017782C = true; gControllerLock = 3; AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_28); } else { @@ -1182,7 +1182,9 @@ void Option_VersusUpdate(void) { case 1: // clang-format off - if (Option_8019C418(&D_menu_801B91A8, 2, 1, 0, 20, 5, 4, gMainController, &D_menu_801B9188)) { AUDIO_PLAY_SFX(NA_SE_ARWING_CURSOR, gDefaultSfxSource, 4); } + if (Option_8019C418(&D_menu_801B91A8, 2, 1, 0, 20, 5, 4, gMainController, &D_menu_801B9188)) {\ + AUDIO_PLAY_SFX(NA_SE_ARWING_CURSOR, gDefaultSfxSource, 4);\ + } // clang-format on if (gControllerPress[gMainController].button & (A_BUTTON | START_BUTTON)) { @@ -3412,23 +3414,23 @@ void Option_8019B3DC(void) { void Option_8019B5AC(void) { s32 pad[2]; s32 colorGB; - s32 var_v0; + s32 bitmask; Option_8019C824(&D_menu_801B91E8); colorGB = D_menu_801B91E8; - var_v0 = 0xFFFFFFFF; + bitmask = 0xFFFFFFFF; if (D_menu_801B91EC != 0) { colorGB = 255; - var_v0 = 1; + bitmask = 0x00000001; D_menu_801B91EC--; if (D_menu_801B91EC == 0) { D_menu_801B91F0 = 1; } } - if ((gGameFrameCount & var_v0) != 0) { + if (gGameFrameCount & bitmask) { RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); TextureRect_IA8(&gMasterDisp, D_VS_MENU_7003650, 40, 12, 143.0f, 210.0f, 1.0f, 1.0f); @@ -4041,7 +4043,7 @@ void Option_8019D118(void) { f32 dirX; f32 dirY; f32 dirZ; - s32 mask[3]; + s32 bitmask[3]; s32 i; static f32 D_menu_801AF30C[6] = { 51.0f, 138.0f, 118.0f, 166.0f, 138.0f, 267.0f }; static f32 D_menu_801AF324[6] = { 29.0f, 49.0f, 145.0f, 155.0f, 87.0f, 127.0f }; @@ -4060,7 +4062,9 @@ void Option_8019D118(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); Graphics_DisplaySmallText(D_menu_801AF30C[1], D_menu_801AF324[1], 1.0f, 1.0f, "RANK"); Graphics_DisplaySmallText(D_menu_801AF30C[2], D_menu_801AF324[2], 1.0f, 1.0f, "TOTAL HITS"); - (void) "p:%d x:%f y:%f\n"; + + PRINTF("p:%d x:%f y:%f\n"); + if (D_menu_801B9138 == 1) { if ((gGameFrameCount & 0x10) != 0) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); @@ -4088,10 +4092,10 @@ void Option_8019D118(void) { D_menu_801B9100[i] = 0.0f; } - mask[i] = 0xFFFFFFFF; + bitmask[i] = 0xFFFFFFFF; if (D_menu_801B9140[i] != 0) { - mask[i] = 0x1; + bitmask[i] = 0x00000001; D_menu_801B9100[i] = 0.0f; } } @@ -4107,7 +4111,7 @@ void Option_8019D118(void) { Matrix_SetGfxMtx(&gMasterDisp); for (i = 0; i < 3; i++) { - if (gGameFrameCount & mask[i]) { + if (gGameFrameCount & bitmask[i]) { Option_8019DB20(D_menu_801B9150[i][0], D_menu_801AF300[i], 18.0f, -455.0f, 1.0f, D_menu_801B90C0[i] + D_menu_801B90F0[i], D_menu_801B90D0[i] + D_menu_801B9100[i], D_menu_801B90E0[i] + D_menu_801B9110[i]); @@ -4322,8 +4326,8 @@ void Option_8019DD44(void) { void Option_8019DE74(void) { Option_8019715C(); - if (gControllerPress[gMainController].button & (START_BUTTON | A_BUTTON | B_BUTTON | D_CBUTTONS | L_CBUTTONS | - U_CBUTTONS)) { // START, A, B, C-UP, C-LEFT, C-DOWN + if (gControllerPress[gMainController].button & + (START_BUTTON | A_BUTTON | B_BUTTON | D_CBUTTONS | L_CBUTTONS | U_CBUTTONS)) { AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); gDrawMode = DRAW_NONE; diff --git a/src/overlays/ovl_menu/fox_title.c b/src/overlays/ovl_menu/fox_title.c index a0eade0d..7ef95caf 100644 --- a/src/overlays/ovl_menu/fox_title.c +++ b/src/overlays/ovl_menu/fox_title.c @@ -149,7 +149,6 @@ typedef struct { /* 0x08 */ Limb** skeleton; } TitleAnimation; // size = 0x0C -//! TODO: Symbols for segmented addresses TitleAnimation D_menu_801ADA00[4] = { { &D_TITLE_602F8E0, &D_TITLE_6035024, D_TITLE_602FBAC }, { &D_TITLE_60305C0, &D_TITLE_60338DC, D_TITLE_603088C }, diff --git a/src/sys/sys_fault.c b/src/sys/sys_fault.c index 56bdc7ed..35477807 100644 --- a/src/sys/sys_fault.c +++ b/src/sys/sys_fault.c @@ -50,7 +50,7 @@ const char* sFloatExceptions[6] = { "Unimplemented operation", "Invalid operation", "Division by zero", "Overflow", "Underflow", "Inexact operation", }; -void Fault_FillRectange(s32 xPos, s32 yPos, s32 width, s32 height) { +void Fault_FillRectangle(s32 xPos, s32 yPos, s32 width, s32 height) { u16* pixel; s32 i; s32 j; @@ -167,7 +167,7 @@ void Fault_DisplayDebugInfo(OSThread* thread) { causeIndex = 17; } Fault_Wait(3000); - Fault_FillRectange(15, 15, SCREEN_WIDTH - 30, SCREEN_HEIGHT - 30); + Fault_FillRectangle(15, 15, SCREEN_WIDTH - 30, SCREEN_HEIGHT - 30); Fault_Printf(30, 40, "THREAD:%d (%s)", thread->id, sFaultCauses[causeIndex]); Fault_Printf(30, 50, "PC:%08XH SR:%08XH\tVA:%08XH", context->pc, context->sr, context->badvaddr); osWritebackDCacheAll(); diff --git a/src/sys/sys_joybus.c b/src/sys/sys_joybus.c index cbdbf1ce..46ba7fb2 100644 --- a/src/sys/sys_joybus.c +++ b/src/sys/sys_joybus.c @@ -63,7 +63,7 @@ void Controller_UpdateInput(void) { s32 i; for (i = 0; i < 4; i++) { - if (gControllerPlugged[i] == 1 && sNextController[i].errno == 0) { + if ((gControllerPlugged[i] == 1) && (sNextController[i].errno == 0)) { sPrevController[i] = gControllerHold[i]; gControllerHold[i] = sNextController[i]; gControllerPress[i].button = From 9dd58cd924012e3b482c7a411c3cf45aaf1adf42 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Sat, 6 Jul 2024 23:01:03 -0300 Subject: [PATCH 127/151] fox_display.c spacing --- src/engine/fox_display.c | 154 +++++++++++++++++++++++++++++++++++---- 1 file changed, 139 insertions(+), 15 deletions(-) diff --git a/src/engine/fox_display.c b/src/engine/fox_display.c index 935754de..c173c4f6 100644 --- a/src/engine/fox_display.c +++ b/src/engine/fox_display.c @@ -35,11 +35,13 @@ void Display_DrawHelpAlert(void) { if ((gPlayState == PLAY_PAUSE) || (gTeamHelpActor == NULL)) { return; } + if ((gTeamHelpActor->obj.status != OBJ_ACTIVE) || (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_ACTIVE)) { gTeamHelpActor = NULL; gTeamHelpTimer = 0; return; } + if (gTeamHelpTimer != 0) { gTeamHelpTimer--; if (gTeamHelpTimer == 0) { @@ -47,18 +49,24 @@ void Display_DrawHelpAlert(void) { return; } } + if ((gTeamHelpTimer & 4) == 0) { Matrix_RotateY(gCalcMatrix, gPlayer[0].camYaw, MTXF_NEW); Matrix_RotateX(gCalcMatrix, gPlayer[0].camPitch, MTXF_APPLY); + 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 + gPathProgress - 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, SETUPDL_12); + switch (gTeamHelpActor->aiType) { case AI360_PEPPY: gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 30, 0, 255); @@ -70,6 +78,7 @@ void Display_DrawHelpAlert(void) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 30, 30, 255, 255); break; } + switch (sp7C) { case 0: if (gTeamHelpActor->sfxSource[0] > 0.0f) { @@ -87,6 +96,7 @@ void Display_DrawHelpAlert(void) { gSPDisplayList(gMasterDisp++, D_1023700); Matrix_Pop(&gGfxMatrix); break; + case 1: Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 20.0f, 0.0f, -50.0f, MTXF_APPLY); @@ -105,6 +115,7 @@ void Display_DrawHelpAlert(void) { Matrix_Pop(&gGfxMatrix); break; } + switch (sp7C) { case 0: RCP_SetupDL(&gMasterDisp, SETUPDL_76); @@ -115,6 +126,7 @@ void Display_DrawHelpAlert(void) { Graphics_DisplaySmallText(SCREEN_WIDTH - 43 - 19, 106, 1.0f, 1.0f, "HELP!!"); } break; + case 1: RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255); @@ -129,6 +141,7 @@ bool func_display_800520FC(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, Player* player = (Player*) data; gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); + if (player->num == 1) { if (limbIndex == 16) { rot->y += player->unk_154; @@ -249,6 +262,7 @@ void func_display_800526B8(Player* player) { Matrix_Push(&gGfxMatrix); Matrix_Scale(gCalcMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY); Matrix_Translate(gCalcMatrix, 0.0f, 35.0f, 0.0f, MTXF_APPLY); + switch (player->num) { case 0: Animation_DrawSkeleton(5, D_versus_301D258, player->jointTable, func_display_800520FC, @@ -278,15 +292,18 @@ void func_display_80052884(Player* player) { Vec3f sp40 = { 0.0f, 40.0f, -70.0f }; Matrix_Push(&gGfxMatrix); + if (!gVersusMode) { gSPDisplayList(gMasterDisp++, D_landmaster_3000090); } else { gSPDisplayList(gMasterDisp++, D_versus_300FB80); } + Matrix_MultVec3f(gGfxMatrix, &sp40, &D_display_80161518[player->num]); Matrix_Translate(gGfxMatrix, 0.0f, 51.0f, -10.0f, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, -player->unk_180 * M_DTOR, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, player->unk_17C * M_DTOR, MTXF_APPLY); + if (gPlayerNum == player->num) { sp64 = 0.0f; if (gChargeTimers[player->num] >= 20) { @@ -299,7 +316,9 @@ void func_display_80052884(Player* player) { sp58.z = 2400.0f + sp64; Matrix_MultVec3f(gGfxMatrix, &sp58, &D_display_801613E0[1]); } + Matrix_SetGfxMtx(&gMasterDisp); + if (!gVersusMode) { if (player->unk_1A0 != 0) { RCP_SetupDL_64(); @@ -309,6 +328,7 @@ void func_display_80052884(Player* player) { } else { gSPDisplayList(gMasterDisp++, D_versus_301F140); } + Matrix_MultVec3f(gGfxMatrix, &sp4C, &D_display_80161548[player->num]); Matrix_Pop(&gGfxMatrix); } @@ -323,12 +343,14 @@ f32 sPlayerShadowing = 0.0f; void func_display_80052B80(Player* player) { Matrix_Push(&gGfxMatrix); + if ((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (player->unk_1A0 != 0)) { Matrix_Translate(gGfxMatrix, D_display_80161548[player->num].x, D_display_80161548[player->num].y, D_display_80161548[player->num].z, MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_display_800CA248[player->unk_1A0 - 1], D_display_800CA248[player->unk_1A0 - 1], D_display_800CA248[player->unk_1A0 - 1], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); + if (gVersusMode) { RCP_SetupDL_40(); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); @@ -350,6 +372,7 @@ void func_display_80052D48(Player* player) { Matrix_Push(&gGfxMatrix); Matrix_Copy(gGfxMatrix, &D_display_80161418[player->num]); + if (gVersusMode) { RCP_SetupDL_64(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 150); @@ -358,6 +381,7 @@ void func_display_80052D48(Player* player) { gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 192); RCP_SetupDL(&gMasterDisp, SETUPDL_67); } + sp2C = player->unk_16C; if (sp2C > 0.2f) { if (!gVersusMode) { @@ -381,6 +405,7 @@ void func_display_80052D48(Player* player) { } Matrix_Pop(&gGfxMatrix); } + sp2C = player->unk_170; if (sp2C > 0.2f) { if (!gVersusMode) { @@ -421,6 +446,7 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, RCP_SetupDL(&gMasterDisp, SETUPDL_29); func_display_8005314C(); } + switch (limbIndex) { case 13: if (wings->rightState == WINGSTATE_NONE) { @@ -439,6 +465,7 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, } } break; + case 1: case 2: if (wings->rightState != 2) { @@ -454,6 +481,7 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, } } break; + case 12: if (wings->rightState == WINGSTATE_NONE) { // should be leftState? *gfxPtr = NULL; @@ -471,6 +499,7 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, } } break; + case 5: case 6: if (wings->leftState != 2) { @@ -487,6 +516,7 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, } break; } + switch (limbIndex) { case 1: rot->y -= wings->unk_04; @@ -523,10 +553,12 @@ void func_display_80053658(WingInfo* wings) { s32 modelId; Matrix_Push(&gGfxMatrix); + wings->unk_18 = 0.0f; if (wings->unk_14 < -7.0f) { wings->unk_18 = (-wings->unk_14 - 7.0f) * 2.5f; } + if (gGameState == GSTATE_PLAY) { Animation_DrawSkeleton(1, D_arwing_3016610, gPlayer[0].jointTable, func_display_800531A4, NULL, wings, &gIdentityMatrix); @@ -538,11 +570,14 @@ void func_display_80053658(WingInfo* wings) { } Animation_DrawSkeleton(1, D_arwing_3016610, sp68, func_display_800531A4, NULL, wings, &gIdentityMatrix); } + D_display_800CA22C = false; + modelId = wings->modelId; if (D_display_800CA220 != 0) { modelId = 1; } + if (modelId != 0) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, 6.4f, -16.5f, MTXF_APPLY); @@ -560,10 +595,12 @@ void func_display_80053658(WingInfo* wings) { } Matrix_Pop(&gGfxMatrix); } + Matrix_Translate(gGfxMatrix, 0.0f, 17.2f, -25.8f, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, wings->unk_38 * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL_64_2(); + if ((gGameState == GSTATE_PLAY) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && (gCurrentLevel == LEVEL_CORNERIA)) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 120); @@ -578,6 +615,7 @@ void func_display_80053658(WingInfo* wings) { gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_arwing_30194E0); } + gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); Matrix_Pop(&gGfxMatrix); } @@ -615,6 +653,7 @@ void func_display_80053C38(Player* player, s32 arg1) { sp4C.z = 2400.0f + sp48; Matrix_MultVec3f(gGfxMatrix, &sp4C, &D_display_801613E0[1]); } + if (player->alternateView && (gLevelMode == LEVELMODE_ON_RAILS) && (fabsf(player->trueZpos + gPathProgress - player->cam.eye.z) < 10.0f)) { if (arg1 == 0) { @@ -663,6 +702,7 @@ void func_display_80053F7C(Player* player) { translate = &D_display_801613E0[i]; Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, translate->x, translate->y, translate->z, MTXF_APPLY); + if (gChargeTimers[player->num] >= 20) { RCP_SetupDL(&gMasterDisp, SETUPDL_63); if (i == 1) { @@ -676,6 +716,7 @@ void func_display_80053F7C(Player* player) { } else { RCP_SetupDL_36(); } + if (i == 1) { Matrix_Scale(gGfxMatrix, sCrosshairScales[player->num], sCrosshairScales[player->num], 1.0f, MTXF_APPLY); @@ -693,16 +734,16 @@ void func_display_80054280(Player* player, s32 arg1) { switch (player->form) { case FORM_ARWING: func_display_80053C38(player, arg1); - return; + break; case FORM_LANDMASTER: func_display_80052884(player); - return; + break; case FORM_BLUE_MARINE: Aquas_801ACBB4(player); - return; + break; case FORM_ON_FOOT: func_display_800526B8(player); - return; + break; } } @@ -710,14 +751,17 @@ void func_display_80054300(Player* player) { Math_SmoothStepToF(&sPlayerShadowing, player->shadowing, 1.0f, 10.0f, 0.0f); RCP_SetupDL(&gMasterDisp, SETUPDL_66); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, (s32) sPlayerShadowing); + if (player->groundPos.y > 30.0f) { gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); } + if ((gGroundSurface == SURFACE_WATER) && (player->groundPos.y < 10.0f)) { player->shadowing = 90; } else { player->shadowing = 180; } + switch (player->form) { case FORM_ARWING: fake_label: @@ -726,6 +770,7 @@ void func_display_80054300(Player* player) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1032780); break; + case FORM_LANDMASTER: Matrix_Push(&gGfxMatrix); Matrix_Scale(gGfxMatrix, 1.17f, 1.17f, 1.17f, MTXF_APPLY); @@ -741,8 +786,10 @@ void func_display_80054300(Player* player) { } Matrix_Pop(&gGfxMatrix); break; + case FORM_BLUE_MARINE: break; + case FORM_ON_FOOT: Matrix_Push(&gGfxMatrix); Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY); @@ -782,6 +829,7 @@ void func_display_8005478C(Player* player) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 100); Matrix_Push(&gGfxMatrix); Matrix_RotateZ(gGfxMatrix, player->bankAngle * M_DTOR, MTXF_APPLY); + if (player->form == FORM_LANDMASTER) { if (player->unk_194 <= 0.0f) { Matrix_Pop(&gGfxMatrix); @@ -791,6 +839,7 @@ void func_display_8005478C(Player* player) { } else { Matrix_Scale(gGfxMatrix, player->unk_194, player->unk_194, 1.0f, MTXF_APPLY); } + if ((gGameFrameCount % 2) != 0) { Matrix_Scale(gGfxMatrix, 0.9f, 0.63f, 1.0f, MTXF_APPLY); } else { @@ -814,29 +863,37 @@ void func_display_80054914(Player* player) { MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, -((player->bankAngle + player->rockAngle + player->damageShake) * M_DTOR), MTXF_APPLY); + Matrix_Translate(gCalcMatrix, player->xShake, player->yBob, 0.0f, MTXF_APPLY); + sp40.x = 0.0f; sp40.y = 0.0f; sp40.z = -30.0f; + Matrix_MultVec3f(gCalcMatrix, &sp40, &sp34); + sp4C = 1.0f; if (player->baseRollRate < 0) { sp4C = -1.0f; } + Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, player->pos.x + sp34.x, player->pos.y + sp34.y, player->trueZpos + player->zPath + sp34.z, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].camPitch, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 20.0f * sp4C * M_DTOR, MTXF_APPLY); + if (player->form == FORM_ARWING) { Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, MTXF_APPLY); } else { Matrix_Scale(gGfxMatrix, 1.2f, 1.2f, 1.2f, MTXF_APPLY); } + if (player->baseRollRate < 0) { Matrix_RotateX(gGfxMatrix, M_PI, MTXF_APPLY); } + Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, player->barrelRollAlpha); @@ -881,18 +938,24 @@ void func_display_80054E80(Player* player) { } else { Matrix_MultVec3f(gCalcMatrix, &spC4, &sp94); } + Matrix_Push(&gGfxMatrix); + sp80 = gChargeTimers[player->num] / 20.0f; + 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->alternateView && (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); } + RCP_SetupDL(&gMasterDisp, SETUPDL_49); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 128); + if (gVersusMode) { switch (player->num) { case 0: @@ -911,6 +974,7 @@ void func_display_80054E80(Player* player) { } else { gDPSetEnvColor(gMasterDisp++, 0, 255, 0, 128); } + Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 53.0f * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_101C2E0); @@ -918,11 +982,14 @@ void func_display_80054E80(Player* player) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_101C2E0); Matrix_Pop(&gGfxMatrix); + if (player->alternateView && (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); - if (((gGameFrameCount % 2) == 0)) { + + if ((gGameFrameCount % 2) == 0) { Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.0f, MTXF_APPLY); } else { Matrix_Scale(gGfxMatrix, 1.3f, 1.3f, 1.0f, MTXF_APPLY); @@ -931,14 +998,17 @@ void func_display_80054E80(Player* player) { gSPDisplayList(gMasterDisp++, D_1024AC0); Matrix_Pop(&gGfxMatrix); } + if (gMuzzleFlashScale[player->num] > 0.1f) { Matrix_Push(&gGfxMatrix); RCP_SetupDL(&gMasterDisp, SETUPDL_67); Matrix_Copy(gCalcMatrix, &D_display_80161418[player->num]); + laserStrength = gLaserStrength[player->num]; if (player->wings.unk_14 > -8.0f) { laserStrength = LASERS_SINGLE; } + switch (laserStrength) { case LASERS_SINGLE: gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 192, 255, 192, 128); @@ -956,6 +1026,7 @@ void func_display_80054E80(Player* player) { gSPDisplayList(gMasterDisp++, D_1024AC0); Matrix_Pop(&gGfxMatrix); break; + case LASERS_TWIN: case LASERS_HYPER: if (laserStrength == LASERS_TWIN) { @@ -999,8 +1070,10 @@ void func_display_80055788(Player* player) { Matrix_Scale(gGfxMatrix, sp54, sp54, 1.0f, MTXF_APPLY); Matrix_Push(&gGfxMatrix); Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 10.0f, MTXF_APPLY); + RCP_SetupDL(&gMasterDisp, SETUPDL_49); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 128); + if (gVersusMode) { switch (player->num) { case 0: @@ -1019,6 +1092,7 @@ void func_display_80055788(Player* player) { } else { gDPSetEnvColor(gMasterDisp++, 0, 255, 0, 128); } + Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 53.0f * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_101C2E0); @@ -1027,7 +1101,8 @@ void func_display_80055788(Player* player) { gSPDisplayList(gMasterDisp++, D_101C2E0); Matrix_Pop(&gGfxMatrix); Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 1.0f, MTXF_APPLY); - if (((gGameFrameCount % 2) == 0)) { + + if ((gGameFrameCount % 2) == 0) { Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.0f, MTXF_APPLY); } else { Matrix_Scale(gGfxMatrix, 1.3f, 1.3f, 1.0f, MTXF_APPLY); @@ -1056,6 +1131,7 @@ void func_display_80055B58(Player* player) { Matrix_RotateZ(gCalcMatrix, -((player->bankAngle + player->rockAngle + player->damageShake) * M_DTOR), MTXF_APPLY); Matrix_Translate(gCalcMatrix, player->xShake, player->yBob, 0.0f, MTXF_APPLY); + var_fv0 = player->unk_194 * 30.0f; if (var_fv0 > 30.0f) { var_fv0 = 30.0f; @@ -1078,6 +1154,7 @@ void func_display_80055B58(Player* player) { func_display_80054CA4(player); func_display_80054E80(player); break; + case FORM_LANDMASTER: func_display_80052D48(player); Matrix_Push(&gGfxMatrix); @@ -1088,6 +1165,7 @@ void func_display_80055B58(Player* player) { Matrix_Pop(&gGfxMatrix); func_display_80055788(player); break; + case FORM_BLUE_MARINE: func_display_80054914(player); break; @@ -1096,35 +1174,39 @@ void func_display_80055B58(Player* player) { } void func_display_80055E98(Player* player) { - f32 sp5C; - f32 sp58; + f32 sp5C = 70.0f; + f32 sp58 = -18.0f; f32 sp54; f32 sp50; f32 var_fs0; - sp5C = 70.0f; - sp58 = -18.0f; if (player->wingPosition == 2) { sp5C = 108.0f; sp58 = -22.0f; } + if (player->contrailScale != 0.0f) { sp54 = 0.0f; if ((gGameFrameCount % 2) != 0) { sp54 = 180.0f; } + var_fs0 = player->rot.y; if (var_fs0 > 90.0f) { var_fs0 -= 180.0f; } + var_fs0 = var_fs0 * 0.25f; sp50 = player->rot.x * 0.25f; + if (player->state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) { var_fs0 = 0.0f; sp50 = 0.0f; } + RCP_SetupDL_64(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 100); + if (player->wings.leftState == WINGSTATE_INTACT) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, sp5C, sp58, -100.0f, MTXF_APPLY); @@ -1175,6 +1257,7 @@ bool func_display_800563B4(s32 index, s32 arg1) { Vec3f sp20; Matrix_MultVec3f(gGfxMatrix, &sp2C, &sp20); + if ((sp20.z < 200.0f) && (sp20.z > -12000.0f)) { if (fabsf(sp20.x) < (fabsf(sp20.z * 0.5f) + 500.0f)) { if (fabsf(sp20.y) < (fabsf(sp20.z * 0.5f) + 500.0f)) { @@ -1185,6 +1268,7 @@ bool func_display_800563B4(s32 index, s32 arg1) { } } } + if (arg1 == 0) { sPlayersVisible[index] = 0; } @@ -1219,27 +1303,33 @@ void func_display_800564C0(Player* player, s32 arg1) { } } } + if (!func_display_800563B4(player->num, arg1)) { Matrix_Pop(&gGfxMatrix); return; } + Matrix_RotateX(gGfxMatrix, (player->rot.x + player->damageShake) * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, (player->rot.z + player->rockAngle + player->damageShake) * M_DTOR, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, (player->yRot_114 + player->rot.y + 180.0f) * M_DTOR, MTXF_APPLY); + if (gVersusMode) { Matrix_RotateX(gGfxMatrix, player->unk_000 * M_DTOR, MTXF_APPLY); } + Matrix_RotateZ(gGfxMatrix, (-player->zRotBank - player->zRotBarrelRoll) * M_DTOR, MTXF_APPLY); Matrix_Translate(gGfxMatrix, player->xShake, player->yBob - 30.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); } else if (player->form == FORM_ON_FOOT) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, player->pos.x, player->pos.y, player->trueZpos + player->zPath, MTXF_APPLY); + if (!func_display_800563B4(player->num, arg1)) { Matrix_Pop(&gGfxMatrix); Matrix_Pop(&gGfxMatrix); return; } + Matrix_Pop(&gGfxMatrix); Matrix_Translate(gCalcMatrix, player->pos.x, player->pos.y + gCameraShakeY, player->trueZpos + player->zPath, MTXF_NEW); @@ -1266,6 +1356,7 @@ void func_display_800564C0(Player* player, s32 arg1) { } } } + if (!func_display_800563B4(player->num, arg1)) { Matrix_Pop(&gGfxMatrix); return; @@ -1281,6 +1372,7 @@ void func_display_800564C0(Player* player, s32 arg1) { Matrix_Translate(gGfxMatrix, player->xShake, player->yBob, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); } + switch (player->dmgEffect) { case 0: if (!gVersusMode) { @@ -1295,14 +1387,17 @@ void func_display_800564C0(Player* player, s32 arg1) { RCP_SetupDL_29(0, 0, 0, 255, gFogNear, gFogFar); } break; + case 1: RCP_SetupDL_27(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); break; + case 2: RCP_SetupDL_32(); break; } + if (arg1 != 0) { Object_ApplyWaterDistortion(); } else { @@ -1336,7 +1431,9 @@ void func_display_80056E2C(Player* player) { if (player->grounded) { sp34 = sp30 = 0.0f; } + Matrix_Push(&gGfxMatrix); + if (gLevelMode == LEVELMODE_ALL_RANGE) { if (player->form == FORM_ON_FOOT) { Matrix_Translate(gGfxMatrix, player->groundPos.x, player->groundPos.y + 2.0f, player->groundPos.z, @@ -1349,10 +1446,12 @@ void func_display_80056E2C(Player* player) { Matrix_Translate(gGfxMatrix, player->groundPos.x, player->groundPos.y + 2.0f, player->groundPos.z + player->zPath, MTXF_APPLY); } + Matrix_RotateY(gGfxMatrix, player->groundRotY, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, player->shadowRotX, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, player->shadowRotZ, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.8f + sp34, 0.0f, 0.8f + sp30, MTXF_APPLY); + if ((player->form == FORM_ARWING) || (player->form == FORM_BLUE_MARINE) || (player->form == FORM_ON_FOOT)) { sp2C = player->bankAngle + player->rockAngle + player->damageShake; if (((sp2C > 70.0f) && (sp2C < 110.0f)) || ((sp2C < -70.0f) && (sp2C > -110.0f))) { @@ -1432,6 +1531,7 @@ void func_display_80057504(void) { if (var_fs0 < 1.2f) { var_fs0 = 1.2f; } + Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, gLockOnTargetViewPos[i].x, gLockOnTargetViewPos[i].y, gLockOnTargetViewPos[i].z, MTXF_APPLY); @@ -1451,6 +1551,7 @@ void func_display_80057504(void) { } } } + for (j = 0; j < gCamCount; j++) { gLockOnTargetViewPos[j].x = gLockOnTargetViewPos[j].y = 0.f; gLockOnTargetViewPos[j].z = 100.0f; @@ -1494,6 +1595,7 @@ void func_display_800578C4(Player* player) { gPlayCamAt.y = player->cam.at.y; gPlayCamAt.z = player->cam.at.z; break; + case 1: case 2: case 3: @@ -1545,12 +1647,15 @@ void Play_Draw(void) { if (gHitCount > 511) { gHitCount = 511; } + Matrix_Push(&gGfxMatrix); + if ((gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { Math_SmoothStepToF(&gCamDistortion, 0.01f, 0.2f, 0.002f, 0.0f); } else { Math_SmoothStepToF(&gCamDistortion, 0.0f, 0.2f, 0.002f, 0.0f); } + Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 10.0f * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 1.0f + gCamDistortion, 1.0f - gCamDistortion, 1.0f, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, -(f32) gGameFrameCount * 10.0f * M_DTOR, MTXF_APPLY); @@ -1559,6 +1664,7 @@ void Play_Draw(void) { Camera_SetupLights(camPlayer); Lights_SetOneLight(&gMasterDisp, gLight1x, gLight1y, gLight1z, gLight1R, gLight1G, gLight1B, gAmbientR, gAmbientG, gAmbientB); + if (gLevelMode == LEVELMODE_ON_RAILS) { Matrix_RotateY(gCalcMatrix, camPlayer->yRot_114 * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, camPlayer->xRot_120 * M_DTOR, MTXF_APPLY); @@ -1592,6 +1698,7 @@ void Play_Draw(void) { gPlayCamAt.y = camPlayer->cam.at.y; gPlayCamAt.z = camPlayer->cam.at.z; } + camPlayer->camYaw = -Math_Atan2F(gPlayCamEye.x - gPlayCamAt.x, gPlayCamEye.z - gPlayCamAt.z); camPlayer->camPitch = -Math_Atan2F(gPlayCamEye.y - gPlayCamAt.y, sqrtf(SQ(gPlayCamEye.z - gPlayCamAt.z) + SQ(gPlayCamEye.x - gPlayCamAt.x))); @@ -1602,21 +1709,18 @@ void Play_Draw(void) { tempVec.y = 100.0f; tempVec.z = 0.0f; Matrix_MultVec3f(gCalcMatrix, &tempVec, &playerCamUp); + if (gStarCount != 0) { gStarfieldRoll = DEG_TO_RAD(gPlayer[0].camRoll); Camera_SetStarfieldPos(gPlayCamEye.x, gPlayCamEye.y, gPlayCamEye.z, gPlayCamAt.x, gPlayCamAt.y, gPlayCamAt.z); Background_DrawStarfield(); } + Background_DrawBackdrop(); Background_DrawSun(); Matrix_Push(&gGfxMatrix); - // if(gControllerHold[gMainController]. button & L_TRIG) { - // Matrix_LookAt(gGfxMatrix, gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ, - // playerCamUp.x, playerCamUp.y, playerCamUp.z, MTXF_APPLY); - // } else { Matrix_LookAt(gGfxMatrix, gPlayCamEye.x, gPlayCamEye.y, gPlayCamEye.z, gPlayCamAt.x, gPlayCamAt.y, gPlayCamAt.z, playerCamUp.x, playerCamUp.y, playerCamUp.z, MTXF_APPLY); - // } if ((gLevelType == LEVELTYPE_PLANET) || (gCurrentLevel == LEVEL_BOLSE)) { if ((gCurrentLevel == LEVEL_TITANIA) && @@ -1632,8 +1736,10 @@ void Play_Draw(void) { Background_DrawGround(); } } + Lights_SetOneLight(&gMasterDisp, gLight2x, gLight2y, gLight2z, gLight2R, gLight2G, gLight2B, gAmbientR, gAmbientG, gAmbientB); + for (i = 0, player = gPlayer; i < gCamCount; i++, player++) { playerPos.x = player->pos.x; playerPos.y = player->pos.y; @@ -1642,6 +1748,7 @@ void Play_Draw(void) { func_display_800564C0(player, 0); func_display_80057814(player); } + if ((gGroundSurface == SURFACE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) { Lights_SetOneLight(&gMasterDisp, gLight2x, -1 * gLight2y, gLight2z, gLight2R, gLight2G, gLight2B, gAmbientR, gAmbientG, gAmbientB); @@ -1655,12 +1762,14 @@ void Play_Draw(void) { } Matrix_Pop(&gGfxMatrix); } + Lights_SetOneLight(&gMasterDisp, gLight1x, gLight1y, gLight1z, gLight1R, gLight1G, gLight1B, gAmbientR, gAmbientG, gAmbientB); Object_Draw(1); TexturedLine_Draw(); gReflectY = 1; PlayerShot_DrawAll(); + if ((gGroundSurface == SURFACE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) { Matrix_Push(&gGfxMatrix); Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, MTXF_APPLY); @@ -1668,7 +1777,9 @@ void Play_Draw(void) { PlayerShot_DrawAll(); Matrix_Pop(&gGfxMatrix); } + gReflectY = -1; + if ((gGroundSurface == SURFACE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) { Matrix_Push(&gGfxMatrix); Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, MTXF_APPLY); @@ -1680,21 +1791,26 @@ void Play_Draw(void) { Matrix_Pop(&gGfxMatrix); } } + if (gCurrentLevel == LEVEL_AQUAS) { Effect_Draw(0); } + if ((gGroundSurface == SURFACE_WATER) || (gAqDrawMode != 0)) { D_bg_8015F964 = true; Effect_Draw(1); Background_DrawGround(); } + if ((gCurrentLevel != LEVEL_AQUAS) && (((gCurrentLevel != LEVEL_CORNERIA) && (gCurrentLevel != LEVEL_VENOM_ANDROSS)) || ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)))) { Effect_Draw(0); } + gReflectY = 1; + for (i = 0, player = gPlayer; i < gCamCount; i++, player++) { if (sPlayersVisible[i] != 0) { func_display_80056E2C(player); @@ -1702,21 +1818,26 @@ void Play_Draw(void) { func_display_80056230(player); } } + if ((gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { Aquas_801AA20C(); } + if (((gCurrentLevel == LEVEL_CORNERIA) || (gCurrentLevel == LEVEL_VENOM_ANDROSS)) && ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO))) { Effect_Draw(0); } + BonusText_DrawAll(); Matrix_Pop(&gGfxMatrix); func_display_80057248(); func_display_80057504(); + if (sDrawCockpit != 0) { func_display_80053B18(); } + for (i = 0, player = gPlayer; i < gCamCount; i++, player++) { if (sPlayersVisible[i] != 0) { if (gShowCrosshairs[i]) { @@ -1729,10 +1850,13 @@ void Play_Draw(void) { } } } + if ((gLevelMode == LEVELMODE_UNK_2) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { Turret_Draw(gPlayer); } + Background_DrawLensFlare(); + if ((gCamCount != 1) && ((camPlayer->state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (camPlayer->state_1C8 == PLAYERSTATE_1C8_U_TURN))) { HUD_Draw(); From 83c54429159331ced13e2a97c3fbb17549a72b4e Mon Sep 17 00:00:00 2001 From: petrie911 <69443847+petrie911@users.noreply.github.com> Date: Sun, 7 Jul 2024 12:43:41 -0500 Subject: [PATCH 128/151] Improve audio docs and partial audio disassembly support (#268) * audiodiasm * start of sound disasm * disasm * source --- .gitignore | 1 + include/alignment.h | 2 + include/audioseq_cmd.h | 3 +- include/audiothread_cmd.h | 6 +- include/sf64audio_provisional.h | 59 +- linker_scripts/us/rev1/symbol_addrs.txt | 10 +- linker_scripts/us/rev1/symbol_addrs_audio.txt | 4 +- linker_scripts/us/rev1/undefined_syms.ld | 8 - src/audio/audio_context.c | 6 +- src/audio/audio_effects.c | 90 +- src/audio/audio_general.c | 42 +- src/audio/audio_heap.c | 64 +- src/audio/audio_load.c | 227 +++-- src/audio/audio_playback.c | 128 +-- src/audio/audio_seqplayer.c | 14 +- src/audio/audio_tables.c | 194 ++-- src/audio/audio_thread.c | 80 +- src/overlays/ovl_menu/fox_option.c | 6 +- tools/aifc_decode | Bin 0 -> 22704 bytes tools/aifc_decode.c | 669 ++++++++++++++ tools/disassemble_sound.py | 867 ++++++++++++++++++ 21 files changed, 2039 insertions(+), 441 deletions(-) create mode 100644 tools/aifc_decode create mode 100644 tools/aifc_decode.c create mode 100644 tools/disassemble_sound.py diff --git a/.gitignore b/.gitignore index 865c8fbc..2df2cc15 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ ctx.c.m2c *.otr *.eeprom assets/yaml/us/ast_test.yaml +/audio_data src/assets/* include/assets/* /build diff --git a/include/alignment.h b/include/alignment.h index e26a1d3f..5a011c0a 100644 --- a/include/alignment.h +++ b/include/alignment.h @@ -7,6 +7,8 @@ #define ALIGN64(val) (((val) + 0x3F) & ~0x3F) #define ALIGN256(val) (((val) + 0xFF) & ~0xFF) +#define ALIGN16_ALT(val) (((val) & ~0xF) + 0x10) + #ifdef __GNUC__ #define ALIGNED8 __attribute__ ((aligned (8))) #else diff --git a/include/audioseq_cmd.h b/include/audioseq_cmd.h index 1f2deed3..6df7788e 100644 --- a/include/audioseq_cmd.h +++ b/include/audioseq_cmd.h @@ -9,7 +9,8 @@ typedef enum { /* 0 */ SEQ_PLAYER_BGM, /* 1 */ SEQ_PLAYER_FANFARE, /* 2 */ SEQ_PLAYER_SFX, - /* 3 */ SEQ_PLAYER_VOICE + /* 3 */ SEQ_PLAYER_VOICE, + /* 4 */ SEQ_PLAYER_MAX, } SequencePlayerId; // ==== Primary commands ==== diff --git a/include/audiothread_cmd.h b/include/audiothread_cmd.h index 2a9a013c..74634286 100644 --- a/include/audiothread_cmd.h +++ b/include/audiothread_cmd.h @@ -42,7 +42,9 @@ typedef enum { /* 0x81 */ AUDIOCMD_OP_GLOBAL_SYNC_LOAD_SEQ_PARTS = 0x81, /* 0x82 */ AUDIOCMD_OP_GLOBAL_INIT_SEQPLAYER, /* 0x83 */ AUDIOCMD_OP_GLOBAL_DISABLE_SEQPLAYER, - /* 0x85 */ AUDIOCMD_OP_GLOBAL_INIT_SEQPLAYER_SKIP_TICKS = 0x85, + /* 0x84 */ AUDIOCMD_OP_GLOBAL_UNK_84, + /* 0x85 */ AUDIOCMD_OP_GLOBAL_INIT_SEQPLAYER_SKIP_TICKS, + /* 0x88 */ AUDIOCMD_OP_GLOBAL_INIT_SEQPLAYER_ALT = 0x88, /* 0x90 */ AUDIOCMD_OP_GLOBAL_SET_CHANNEL_MASK = 0x90, /* 0xE0 */ AUDIOCMD_OP_GLOBAL_SET_DRUM_FONT = 0xE0, /* 0xE1 */ AUDIOCMD_OP_GLOBAL_SET_SFX_FONT, @@ -410,7 +412,7 @@ typedef enum { /** * Pop the persistent cache of the specified table * - * @param tableType (s32) see the `SampleBankTableType` enum + * @param tableType (s32) see the `AudioTableType` enum */ #define AUDIOCMD_GLOBAL_POP_PERSISTENT_CACHE(tableType) \ AudioThread_QueueCmdS32(AUDIO_MK_CMD(AUDIOCMD_OP_GLOBAL_POP_PERSISTENT_CACHE, 0, 0, 0), tableType) diff --git a/include/sf64audio_provisional.h b/include/sf64audio_provisional.h index 631895b5..0b14777f 100644 --- a/include/sf64audio_provisional.h +++ b/include/sf64audio_provisional.h @@ -70,6 +70,9 @@ typedef void (*AudioCustomUpdateFunction)(void); #define AUDIO_RELOCATED_ADDRESS_START K0BASE +#define AUDIOLOAD_SYNC 0 +#define AUDIOLOAD_ASYNC 1 + typedef enum { /* 0 */ ADSR_STATE_DISABLED, /* 1 */ ADSR_STATE_INITIAL, @@ -98,11 +101,22 @@ typedef enum { /* 5 */ CODEC_S16 } SampleCodec; +typedef enum { + /* 0 */ SAMPLES_SFX, + /* 1 */ SAMPLES_MAP, + /* 2 */ SAMPLES_VOICE, + /* 3 */ SAMPLES_INST, + /* 4 */ SAMPLES_MAX, + /* -1 */ SAMPLES_NONE = 255, +} SampleBank; + +#define SAMPLES_NONE_U 255U + typedef enum { /* 0 */ SEQUENCE_TABLE, /* 1 */ FONT_TABLE, /* 2 */ SAMPLE_TABLE -} SampleBankTableType; +} AudioTableType; typedef enum { /* 0 */ CACHE_TEMPORARY, @@ -111,6 +125,14 @@ typedef enum { /* 3 */ CACHE_PERMANENT } AudioCacheType; +typedef enum { + /* 0 */ CACHEPOLICY_0, + /* 1 */ CACHEPOLICY_1, + /* 2 */ CACHEPOLICY_2, + /* 3 */ CACHEPOLICY_3, + /* 4 */ CACHEPOLICY_4, +} AudioCachePolicy; + typedef enum { /* 0 */ LOAD_STATUS_NOT_LOADED, // the entry data is not loaded /* 1 */ LOAD_STATUS_IN_PROGRESS, // the entry data is being loaded asynchronously @@ -122,6 +144,20 @@ typedef enum { /* 5 */ LOAD_STATUS_PERMANENTLY_LOADED // the entry data is loaded in the permanent pool, it won't be discarded } AudioLoadStatus; +typedef enum { + /* 0 */ SLOW_LOAD_WAITING, + /* 1 */ SLOW_LOAD_START, + /* 2 */ SLOW_LOAD_LOADING, + /* 3 */ SLOW_LOAD_DONE +} SlowLoadState; + +typedef enum { + /* 0 */ SLOW_LOAD_STATUS_0, + /* 1 */ SLOW_LOAD_STATUS_1, + /* 2 */ SLOW_LOAD_STATUS_2, + /* 3 */ SLOW_LOAD_STATUS_3 +} SlowLoadStatus; + typedef enum AudioResetStatus { /* 0 */ AUDIORESET_READY, /* 1 */ AUDIORESET_WAIT, @@ -321,7 +357,7 @@ typedef struct { /* 0x02C */ f32 fadeVolumeMod; /* 0x030 */ f32 appliedFadeVolume; // /* 0x034 */ f32 bend; - /* 0x034 */ struct SequenceChannel* channels[16]; + /* 0x034 */ struct SequenceChannel* channels[SEQ_NUM_CHANNELS]; /* 0x074 */ SeqScriptState scriptState; /* 0x090 */ u8* shortNoteVelocityTable; /* 0x094 */ u8* shortNoteGateTimeTable; @@ -794,6 +830,13 @@ typedef struct { /* 0x0E */ s16 shortData3; } AudioTableEntry; // size = 0x10 +typedef struct { + /* 0x00 */ s16 numEntries; + /* 0x02 */ s16 unkMediumParam; + /* 0x04 */ u32 romAddr; + /* 0x08 */ char pad[0x8]; +} AudioTableBase; + typedef struct { /* 0x00 */ s16 numEntries; /* 0x02 */ s16 unkMediumParam; @@ -1000,7 +1043,7 @@ void* AudioHeap_Alloc(AudioAllocPool* pool, u32 size); void AudioHeap_InitPool(AudioAllocPool* pool, void* ramAddr, u32 size); void AudioHeap_InitMainPools(s32 initPoolSize); void* AudioHeap_AllocCached(s32 tableType, s32 size, s32 cache, s32 id); -s32 AudioHeap_SearchCaches(s32 tableType, s32 cache, s32 id); +void* AudioHeap_SearchCaches(s32 tableType, s32 cache, s32 id); s32 AudioHeap_ResetStep(void); void* AudioHeap_SearchPermanentCache(s32 tableType, s32 id); u8* AudioHeap_AllocPermanent(s32 tableType, s32 id, u32 size); @@ -1054,11 +1097,11 @@ bool AudioThread_ResetComplete(void); void AudioThread_ResetAudioHeap(s32); void AudioThread_Init(void); -extern AudioTable gSampleBankTableInit; +extern AudioTableBase gSampleBankTableInit; // extern AudioTableEntry gSampleBankTableInitEntries[]; -extern AudioTable gSeqTableInit; +extern AudioTableBase gSeqTableInit; // extern AudioTableEntry gSeqTableInitEntries[]; -extern AudioTable gSoundFontTableInit; +extern AudioTableBase gSoundFontTableInit; // extern AudioTableEntry gSoundFontTableInitEntries[]; extern u8 gSeqFontTableInit[]; @@ -1104,7 +1147,7 @@ extern AudioCommonPoolSplit gTemporaryCommonPoolSplit; extern u8 gSampleFontLoadStatus[64]; extern u8 gFontLoadStatus[64]; extern u8 gSeqLoadStatus[256]; -extern volatile u8 gResetStatus; +extern volatile u8 gAudioResetStep; extern u8 gAudioSpecId; extern s32 gResetFadeoutFramesLeft; extern u8 sAudioContextPad1000[0x1000];// 0x1000 gap @@ -1170,7 +1213,7 @@ extern s16* gAiBuffers[3]; extern s16 gAiBuffLengths[3]; extern u32 gAudioRandom; extern u32 D_80155D88; -extern volatile u32 gResetTimer; +extern volatile u32 gAudioResetTimer; extern u64 gAudioContextEnd[]; diff --git a/linker_scripts/us/rev1/symbol_addrs.txt b/linker_scripts/us/rev1/symbol_addrs.txt index 9b9dbbec..a428d50b 100644 --- a/linker_scripts/us/rev1/symbol_addrs.txt +++ b/linker_scripts/us/rev1/symbol_addrs.txt @@ -30,6 +30,8 @@ D_80160000 = 0x80160000;//ignore:true D_800D0000 = 0x800D0000;//ignore:true D_7FFFFFFE = 0x7FFFFFFE;//ignore:true D_1000000 = 0x01000000;//ignore:true +D_01000100 = 0x01000100;//ignore:true +D_01010100 = 0x01010100;//ignore:true // mirage symbols D_A000000 = 0x0A000000;//ignore:true @@ -134,12 +136,8 @@ Save_Read = 0x800C3194; sOvlUnused_Unk = 0x800CBD3C; // hardcoded address used in sys_rdram -D_A0300000 = 0xA0300000; - -//hardware addresses. should probably be in hardware_regs -D_A4000000 = 0xA4000000; -D_A5000508 = 0xA5000508; -D_A5000510 = 0xA5000510; +D_A0300000 = 0xA0300000; // ignore:true +D_A4000000 = 0xA4000000; // ignore:true D_edisplay_800CFA54 = 0x800CFA54; diff --git a/linker_scripts/us/rev1/symbol_addrs_audio.txt b/linker_scripts/us/rev1/symbol_addrs_audio.txt index 4ecb8a71..ecbc8fc2 100644 --- a/linker_scripts/us/rev1/symbol_addrs_audio.txt +++ b/linker_scripts/us/rev1/symbol_addrs_audio.txt @@ -146,7 +146,7 @@ gTemporaryCommonPoolSplit = 0x8014D398;//size:0xC gSampleFontLoadStatus = 0x8014D3A8;//size:0x40 gFontLoadStatus = 0x8014D3E8;//size:0x40 gSeqLoadStatus = 0x8014D428;//size:0x100 -gResetStatus = 0x8014D528; +gAudioResetStep = 0x8014D528; gAudioSpecId = 0x8014D529; gResetFadeoutFramesLeft = 0x8014D52C; gNotes = 0x8014E530; @@ -207,7 +207,7 @@ gAiBuffers = 0x80155D70;//size:0xC gAiBuffLengths = 0x80155D7C;//size:0x8 gAudioRandom = 0x80155D84; D_80155D88 = 0x80155D88; -gResetTimer = 0x80155D8C; +gAudioResetTimer = 0x80155D8C; gAudioContextEnd = 0x80155D90;//size:0x10 sAudioTaskStartQueue = 0x80155DA0; diff --git a/linker_scripts/us/rev1/undefined_syms.ld b/linker_scripts/us/rev1/undefined_syms.ld index fbea8a22..078d77ef 100644 --- a/linker_scripts/us/rev1/undefined_syms.ld +++ b/linker_scripts/us/rev1/undefined_syms.ld @@ -33,11 +33,3 @@ // func_84001728 = 0x84001728; // func_840017D8 = 0x840017D8; // func_840017AC = 0x840017AC; - -D_A0300000 = 0xA0300000; -D_A4000000 = 0xA4000000; -D_A5000508 = 0xA5000508; -D_A5000510 = 0xA5000510; - -D_01000100 = 0x01000100; -D_01010100 = 0x01010100; diff --git a/src/audio/audio_context.c b/src/audio/audio_context.c index 80da89e0..f356e1c6 100644 --- a/src/audio/audio_context.c +++ b/src/audio/audio_context.c @@ -34,13 +34,13 @@ AudioCommonPoolSplit gTemporaryCommonPoolSplit; u8 gSampleFontLoadStatus[64]; u8 gFontLoadStatus[64]; u8 gSeqLoadStatus[256]; -volatile u8 gResetStatus; +volatile u8 gAudioResetStep; u8 gAudioSpecId; s32 gResetFadeoutFramesLeft; u8 sAudioContextPad1000[0x1000]; // 0x1000 gap Note* gNotes; // 0x4 -SequencePlayer gSeqPlayers[4]; +SequencePlayer gSeqPlayers[SEQ_PLAYER_MAX]; SequenceChannel gSeqChannels[48]; SequenceLayer gSeqLayers[64]; SequenceChannel gSeqChannelNone; @@ -100,7 +100,7 @@ s16* gAiBuffers[3]; s16 gAiBuffLengths[3]; u32 gAudioRandom; u32 D_80155D88; -volatile u32 gResetTimer; +volatile u32 gAudioResetTimer; u64 gAudioContextEnd[2]; diff --git a/src/audio/audio_effects.c b/src/audio/audio_effects.c index 5719dba7..61d2ccaa 100644 --- a/src/audio/audio_effects.c +++ b/src/audio/audio_effects.c @@ -146,31 +146,31 @@ void func_80013A18(Note* note) { } void func_80013A84(Note* note) { - NotePlaybackState* temp_v0_3 = ¬e->playbackState; - VibratoState* temp_v1 = &temp_v0_3->vibratoState; + NotePlaybackState* noteState = ¬e->playbackState; + VibratoState* vibrato = ¬eState->vibratoState; - temp_v1->active = 1; - temp_v1->time = 0; - temp_v0_3->vibratoFreqMod = 1.0f; - temp_v0_3->portamentoFreqMod = 1.0f; + vibrato->active = 1; + vibrato->time = 0; + noteState->vibratoFreqMod = 1.0f; + noteState->portamentoFreqMod = 1.0f; - temp_v1->curve = gWaveSamples[2]; + vibrato->curve = gWaveSamples[2]; - temp_v1->channel = temp_v0_3->parentLayer->channel; + vibrato->channel = noteState->parentLayer->channel; - if ((temp_v1->depthChangeTimer = temp_v1->channel->vibratoDepthChangeDelay) == 0) { - temp_v1->depth = (s32) temp_v1->channel->vibratoDepthTarget; + if ((vibrato->depthChangeTimer = vibrato->channel->vibratoDepthChangeDelay) == 0) { + vibrato->depth = (s32) vibrato->channel->vibratoDepthTarget; } else { - temp_v1->depth = (s32) temp_v1->channel->vibratoDepthStart; + vibrato->depth = (s32) vibrato->channel->vibratoDepthStart; } - if ((temp_v1->rateChangeTimer = temp_v1->channel->vibratoRateChangeDelay) == 0) { - temp_v1->rate = (s32) temp_v1->channel->vibratoRateTarget; + if ((vibrato->rateChangeTimer = vibrato->channel->vibratoRateChangeDelay) == 0) { + vibrato->rate = (s32) vibrato->channel->vibratoRateTarget; } else { - temp_v1->rate = (s32) temp_v1->channel->vibratoRateStart; + vibrato->rate = (s32) vibrato->channel->vibratoRateStart; } - temp_v1->delay = temp_v1->channel->vibratoDelay; - temp_v0_3->portamento = temp_v0_3->parentLayer->portamento; + vibrato->delay = vibrato->channel->vibratoDelay; + noteState->portamento = noteState->parentLayer->portamento; } void func_80013B6C(AdsrState* adsr, EnvelopePoint* envelope, s16* arg2) { @@ -187,31 +187,31 @@ f32 func_80013B90(AdsrState* adsr) { u8 state = adsr->state; switch (state) { - case 0: + case ADSR_STATE_DISABLED: return 0.0f; - case 1: + case ADSR_STATE_INITIAL: if (action & 0x40) { - adsr->state = 5; + adsr->state = ADSR_STATE_HANG; break; } - case 2: + case ADSR_STATE_START_LOOP: adsr->envIndex = 0; - adsr->state = 3; - case_3: - case 3: + adsr->state = ADSR_STATE_LOOP; + case_ADSR_STATE_LOOP: + case ADSR_STATE_LOOP: adsr->delay = adsr->envelope[adsr->envIndex].delay; switch (adsr->delay) { - case 0: - adsr->state = 0; + case ADSR_DISABLE: + adsr->state = ADSR_STATE_DISABLED; break; - case -1: - adsr->state = 5; + case ADSR_HANG: + adsr->state = ADSR_STATE_HANG; break; - case -2: + case ADSR_GOTO: adsr->envIndex = adsr->envelope[adsr->envIndex].arg; - goto case_3; - case -3: - adsr->state = 1; + goto case_ADSR_STATE_LOOP; + case ADSR_RESTART: + adsr->state = ADSR_STATE_INITIAL; break; default: if (adsr->delay >= 4) { @@ -224,47 +224,47 @@ f32 func_80013B90(AdsrState* adsr) { adsr->target = adsr->envelope[adsr->envIndex].arg / 32767.0f; adsr->target = SQ(adsr->target); adsr->velocity = (adsr->target - adsr->current) / adsr->delay; - adsr->state = 4; + adsr->state = ADSR_STATE_FADE; adsr->envIndex++; break; } - if (adsr->state != 4) { + if (adsr->state != ADSR_STATE_FADE) { break; } - case 4: - adsr->delay -= 1; + case ADSR_STATE_FADE: + adsr->delay--; adsr->current += adsr->velocity; if (adsr->delay <= 0) { - adsr->state = 3; + adsr->state = ADSR_STATE_LOOP; } break; - case 6: - case 7: + case ADSR_STATE_DECAY: + case ADSR_STATE_RELEASE: adsr->current -= adsr->fadeOutVel; - if ((adsr->sustain != 0.0f) && (state == 6)) { + if ((adsr->sustain != 0.0f) && (state == ADSR_STATE_DECAY)) { if (adsr->current < adsr->sustain) { adsr->current = adsr->sustain; adsr->delay = 0x80; - adsr->state = 8; + adsr->state = ADSR_STATE_SUSTAIN; } } else if (adsr->current < 0.00001f) { adsr->current = 0.0f; - adsr->state = 0; + adsr->state = ADSR_STATE_DISABLED; } break; - case 8: + case ADSR_STATE_SUSTAIN: adsr->delay--; if (adsr->delay == 0) { - adsr->state = 7; + adsr->state = ADSR_STATE_RELEASE; } break; } if (action & 0x20) { - adsr->state = 6; + adsr->state = ADSR_STATE_DECAY; adsr->action.asByte = action & ~0x20; } if (action & 0x10) { - adsr->state = 7; + adsr->state = ADSR_STATE_RELEASE; adsr->action.asByte = action & ~0x10; } if (adsr->current < 0.0f) { diff --git a/src/audio/audio_general.c b/src/audio/audio_general.c index 455dfde4..bdf01981 100644 --- a/src/audio/audio_general.c +++ b/src/audio/audio_general.c @@ -50,10 +50,10 @@ f32 sAnalyzerBuffer1[256]; f32 sAnalyzerBuffer2[384]; f32 sNewFreqAmplitudes[32]; u8 sFreqAnalyzerBars[32]; -SeqRequest sSeqRequests[4][5]; -u8 sNumSeqRequests[4]; +SeqRequest sSeqRequests[SEQ_PLAYER_MAX][5]; +u8 sNumSeqRequests[SEQ_PLAYER_MAX]; s32 sAudioSeqCmds[256]; -ActiveSequence sActiveSequences[4]; +ActiveSequence sActiveSequences[SEQ_PLAYER_MAX]; u16 sDelayedSeqCmdFlags; DelayedSeqCmd sDelayedSeqCmds[16]; SfxChannelState sSfxChannelState[16]; @@ -761,12 +761,12 @@ void Audio_ProcessSeqCmd(u32 seqCmd) { seqNumber = seqCmd & 0xFF; seqArgs = (seqCmd & 0xFF00) >> 8; fadeTimer = (seqCmd & 0xFF0000) >> 13; - if (sActiveSequences[seqPlayId].isWaitingForFonts == 0) { + if (!sActiveSequences[seqPlayId].isWaitingForFonts) { if (seqArgs < 0x80) { Audio_StartSequence(seqPlayId, seqNumber, seqArgs, fadeTimer); } else { sActiveSequences[seqPlayId].startSeqCmd = seqCmd & ~0x8000; - sActiveSequences[seqPlayId].isWaitingForFonts = 1; + sActiveSequences[seqPlayId].isWaitingForFonts = true; Audio_StopSequence(seqPlayId, 1); if (sActiveSequences[seqPlayId].prevSeqId != SEQ_ID_NONE) { tempptr = AudioThread_GetFontsForSequence(seqNumber, &sp4C); @@ -1054,23 +1054,23 @@ void Audio_UpdateActiveSequences(void) { s32 temp; u32 cmd; f32 fadeMod; - u32 sp70; + u32 out; s32 pad1; s32 pad2; - for (seqPlayId = 0; seqPlayId < 4; seqPlayId++) { - if ((sActiveSequences[seqPlayId].isWaitingForFonts != 0)) { - switch ((s32) AudioThread_GetAsyncLoadStatus(&sp70)) { + for (seqPlayId = 0; seqPlayId < SEQ_PLAYER_MAX; seqPlayId++) { + if (sActiveSequences[seqPlayId].isWaitingForFonts) { + switch ((s32) AudioThread_GetAsyncLoadStatus(&out)) { case SEQ_PLAYER_BGM + 1: case SEQ_PLAYER_FANFARE + 1: case SEQ_PLAYER_SFX + 1: case SEQ_PLAYER_VOICE + 1: - sActiveSequences[seqPlayId].isWaitingForFonts = 0; + sActiveSequences[seqPlayId].isWaitingForFonts = false; Audio_ProcessSeqCmd(sActiveSequences[seqPlayId].startSeqCmd); break; } } - if (sActiveSequences[seqPlayId].mainVolume.fadeActive != 0) { + if (sActiveSequences[seqPlayId].mainVolume.fadeActive) { fadeMod = 1.0f; for (i = 0; i < 3; i++) { fadeMod *= sActiveSequences[seqPlayId].mainVolume.fadeMod[i] / 127.0f; @@ -2671,16 +2671,16 @@ void Audio_RestoreVolumeSettings(u8 audioType) { u8 i; switch (audioType) { - case 0: + case AUDIO_TYPE_MUSIC: Audio_SetSequenceFade(SEQ_PLAYER_BGM, 0, volume, 1); Audio_SetSequenceFade(SEQ_PLAYER_FANFARE, 0, volume, 1); break; - case 2: + case AUDIO_TYPE_SFX: for (i = 0; i < 15; i++) { AUDIOCMD_CHANNEL_SET_VOL(SEQ_PLAYER_SFX, (u32) i, volume / 127.0f); } break; - case 1: + case AUDIO_TYPE_VOICE: AUDIOCMD_CHANNEL_SET_VOL(SEQ_PLAYER_VOICE, 15, volume / 127.0f); break; } @@ -2773,8 +2773,8 @@ void Audio_InitSounds(void) { Audio_ResetSfxChannelState(); Audio_ResetActiveSequencesAndVolume(); Audio_ResetSfx(); - Audio_StartSequence(SEQ_PLAYER_VOICE, NA_BGM_VO, 0xFF, 1); - Audio_StartSequence(SEQ_PLAYER_SFX, NA_BGM_SE, 0xFF, 10); + Audio_StartSequence(SEQ_PLAYER_VOICE, NA_BGM_VO, -1, 1); + Audio_StartSequence(SEQ_PLAYER_SFX, NA_BGM_SE, -1, 10); } void Audio_RestartSeqPlayers(void) { @@ -2782,13 +2782,13 @@ void Audio_RestartSeqPlayers(void) { s32 pad2; u16 fadeIn = 1; - Audio_StartSequence(SEQ_PLAYER_VOICE, NA_BGM_VO, 0xFF, 1); + Audio_StartSequence(SEQ_PLAYER_VOICE, NA_BGM_VO, -1, 1); if (sAudioSpecId == AUDIOSPEC_12) { fadeIn = 360; } else if (sAudioSpecId < AUDIOSPEC_23) { fadeIn = 90; } - Audio_StartSequence(SEQ_PLAYER_SFX, NA_BGM_SE, 0xFF, fadeIn); + Audio_StartSequence(SEQ_PLAYER_SFX, NA_BGM_SE, -1, fadeIn); Audio_LoadInstruments(); Audio_LoadAquasSequence(); SEQCMD_SET_SEQPLAYER_VOLUME(SEQ_PLAYER_SFX, 0, 127); @@ -2797,9 +2797,9 @@ void Audio_RestartSeqPlayers(void) { AUDIOCMD_GLOBAL_STOP_AUDIOCMDS(); AUDIOCMD_GLOBAL_STOP_AUDIOCMDS(); AUDIOCMD_GLOBAL_STOP_AUDIOCMDS(); - Audio_RestoreVolumeSettings(0); - Audio_RestoreVolumeSettings(2); - Audio_RestoreVolumeSettings(1); + Audio_RestoreVolumeSettings(AUDIO_TYPE_MUSIC); + Audio_RestoreVolumeSettings(AUDIO_TYPE_SFX); + Audio_RestoreVolumeSettings(AUDIO_TYPE_VOICE); } void Audio_StartReset(u8 oldSpecId) { diff --git a/src/audio/audio_heap.c b/src/audio/audio_heap.c index 5ea0674d..ab2a6127 100644 --- a/src/audio/audio_heap.c +++ b/src/audio/audio_heap.c @@ -230,20 +230,20 @@ void* AudioHeap_AllocCached(s32 tableType, s32 size, s32 cache, s32 id) { u8* loadStatus; switch (tableType) { - case 0: + case SEQUENCE_TABLE: loadedCache = &gSeqCache; loadStatus = gSeqLoadStatus; break; - case 1: + case FONT_TABLE: loadedCache = &gFontCache; loadStatus = gFontLoadStatus; break; - case 2: + case SAMPLE_TABLE: loadedCache = &gSampleBankCache; loadStatus = gSampleFontLoadStatus; break; } - if (cache == 0) { + if (cache == CACHE_TEMPORARY) { temporaryCache = &loadedCache->temporary; temporaryPool = &temporaryCache->pool; if (loadedCache->temporary.entries[0].id == -1) { @@ -256,7 +256,7 @@ void* AudioHeap_AllocCached(s32 tableType, s32 size, s32 cache, s32 id) { } else { loadStatusEntry1 = loadStatus[temporaryCache->entries[1].id]; } - if (tableType == 1) { + if (tableType == FONT_TABLE) { if (loadStatusEntry0 == 4) { for (i = 0; i < gNumNotes; i++) { if ((gNotes[i].playbackState.fontId == temporaryCache->entries[0].id) && @@ -298,7 +298,7 @@ void* AudioHeap_AllocCached(s32 tableType, s32 size, s32 cache, s32 id) { temporaryCache->nextSide = 1; } else { // Check if there is a side which isn't in active use, if so, evict that one. - if (tableType == 0) { + if (tableType == SEQUENCE_TABLE) { if (loadStatusEntry0 == 2) { for (i = 0; i < ARRAY_COUNT(gSeqPlayers); i++) { if (gSeqPlayers[i].enabled && (gSeqPlayers[i].seqId == temporaryCache->entries[0].id)) { @@ -321,7 +321,7 @@ void* AudioHeap_AllocCached(s32 tableType, s32 size, s32 cache, s32 id) { goto block_85; } } - } else if (tableType == 1) { + } else if (tableType == FONT_TABLE) { if (loadStatusEntry0 == 2) { for (i = 0; i < gNumNotes; i++) { if ((gNotes[i].playbackState.fontId == temporaryCache->entries[0].id) && @@ -373,7 +373,7 @@ void* AudioHeap_AllocCached(s32 tableType, s32 size, s32 cache, s32 id) { if (temporaryCache->entries[temporaryCache->nextSide].id != -1) { loadStatus[temporaryCache->entries[temporaryCache->nextSide].id] = 0; - if (tableType == 1) { + if (tableType == FONT_TABLE) { AudioHeap_DiscardFont(temporaryCache->entries[temporaryCache->nextSide].id); } } @@ -387,10 +387,10 @@ void* AudioHeap_AllocCached(s32 tableType, s32 size, s32 cache, s32 id) { (temporaryCache->entries[1].ramAddr < temporaryPool->curRamAddr)) { loadStatus[temporaryCache->entries[1].id] = 0; switch (tableType) { - case 0: + case SEQUENCE_TABLE: AudioHeap_DiscardSequence(temporaryCache->entries[1].id); break; - case 1: + case FONT_TABLE: AudioHeap_DiscardFont(temporaryCache->entries[1].id); break; } @@ -408,10 +408,10 @@ void* AudioHeap_AllocCached(s32 tableType, s32 size, s32 cache, s32 id) { (temporaryCache->entries[1].ramAddr < temporaryPool->curRamAddr)) { loadStatus[temporaryCache->entries[0].id] = 0; switch (tableType) { - case 0: + case SEQUENCE_TABLE: AudioHeap_DiscardSequence(temporaryCache->entries[0].id); break; - case 1: + case FONT_TABLE: AudioHeap_DiscardFont(temporaryCache->entries[0].id); break; } @@ -430,10 +430,10 @@ void* AudioHeap_AllocCached(s32 tableType, s32 size, s32 cache, s32 id) { loadedCache->persistent.entries[loadedCache->persistent.numEntries].ramAddr = persistentRamAddr; if (persistentRamAddr == NULL) { switch (cache) { - case 2: - return AudioHeap_AllocCached(tableType, size, 0, id); - case 0: - case 1: + case CACHE_EITHER: + return AudioHeap_AllocCached(tableType, size, CACHE_TEMPORARY, id); + case CACHE_TEMPORARY: + case CACHE_PERSISTENT: return NULL; } } @@ -442,7 +442,7 @@ void* AudioHeap_AllocCached(s32 tableType, s32 size, s32 cache, s32 id) { return loadedCache->persistent.entries[loadedCache->persistent.numEntries++].ramAddr; } -s32 AudioHeap_SearchCaches(s32 tableType, s32 cache, s32 id) { +void* AudioHeap_SearchCaches(s32 tableType, s32 cache, s32 id) { void* ramAddr; // Always search the permanent cache in addition to the regular ones. @@ -568,13 +568,13 @@ s32 AudioHeap_ResetStep(void) { } else { sp24 = 1; } - switch (gResetStatus) { + switch (gAudioResetStep) { case 5: for (i = 0; i < ARRAY_COUNT(gSeqPlayers); i++) { func_800144E4(&gSeqPlayers[i]); } gResetFadeoutFramesLeft = 4 / sp24; - gResetStatus--; + gAudioResetStep--; break; case 4: if (gResetFadeoutFramesLeft != 0) { @@ -589,7 +589,7 @@ s32 AudioHeap_ResetStep(void) { } gResetFadeoutFramesLeft = 16 / sp24; - gResetStatus--; + gAudioResetStep--; } break; case 3: @@ -603,7 +603,7 @@ s32 AudioHeap_ResetStep(void) { } } gResetFadeoutFramesLeft = 4 / sp24; - gResetStatus--; + gAudioResetStep--; break; // needed to match } break; @@ -612,13 +612,13 @@ s32 AudioHeap_ResetStep(void) { if (gResetFadeoutFramesLeft != 0) { gResetFadeoutFramesLeft--; } else { - gResetStatus--; + gAudioResetStep--; AudioHeap_DiscardSampleCaches(); } break; case 1: AudioHeap_Init(); - gResetStatus = 0; + gAudioResetStep = 0; for (i = 0; i < 3; i++) { gAiBuffLengths[i] = gAudioBufferParams.maxAiBufferLength; for (j = 0; j < AIBUF_LEN; j++) { @@ -627,7 +627,7 @@ s32 AudioHeap_ResetStep(void) { } break; } - if (gResetStatus < 3) { + if (gAudioResetStep < 3) { return 0; } return 1; @@ -919,9 +919,11 @@ void AudioHeap_DiscardSampleCacheEntry(SampleCacheEntry* entry) { for (fondId = 0; fondId < numFonts; fondId++) { sampleBankId1 = gSoundFontList[fondId].sampleBankId1; sampleBankId2 = gSoundFontList[fondId].sampleBankId2; - if (((sampleBankId1 != 0xFF) && (entry->sampleBankId == sampleBankId1)) || - ((sampleBankId2 != 0xFF) && (entry->sampleBankId == sampleBankId2)) || (entry->sampleBankId == 0)) { - if ((AudioHeap_SearchCaches(1, 2, fondId) != NULL) && ((gFontLoadStatus[fondId] > 1) != 0)) { + if (((sampleBankId1 != SAMPLES_NONE) && (entry->sampleBankId == sampleBankId1)) || + ((sampleBankId2 != SAMPLES_NONE) && (entry->sampleBankId == sampleBankId2)) || + (entry->sampleBankId == SAMPLES_SFX)) { + if ((AudioHeap_SearchCaches(FONT_TABLE, CACHE_EITHER, fondId) != NULL) && + ((gFontLoadStatus[fondId] > 1) != 0)) { for (instId = 0; instId < gSoundFontList[fondId].numInstruments; instId++) { instrument = Audio_GetInstrument(fondId, instId); if (instrument != NULL) { @@ -989,9 +991,11 @@ void AudioHeap_DiscardSampleCaches(void) { for (fontId = 0; fontId < numFonts; fontId++) { sampleBankId1 = gSoundFontList[fontId].sampleBankId1; sampleBankId2 = gSoundFontList[fontId].sampleBankId2; - if (((sampleBankId1 != 0xFFU) && (entry->sampleBankId == sampleBankId1)) || - ((sampleBankId2 != 0xFF) && (entry->sampleBankId == sampleBankId2)) || (entry->sampleBankId == 0)) { - if ((AudioHeap_SearchCaches(1, 3, fontId) != NULL) && ((gFontLoadStatus[fontId] > 1) != 0)) { + if (((sampleBankId1 != SAMPLES_NONE_U) && (entry->sampleBankId == sampleBankId1)) || + ((sampleBankId2 != SAMPLES_NONE) && (entry->sampleBankId == sampleBankId2)) || + (entry->sampleBankId == SAMPLES_SFX)) { + if ((AudioHeap_SearchCaches(FONT_TABLE, CACHE_PERMANENT, fontId) != NULL) && + ((gFontLoadStatus[fontId] > 1) != 0)) { for (i = 0; i < gPersistentSampleCache.numEntries; i++) { entry = &gPersistentSampleCache.entries[i]; for (instId = 0; instId < gSoundFontList[fontId].numInstruments; instId++) { diff --git a/src/audio/audio_load.c b/src/audio/audio_load.c index 74e791c2..486e3deb 100644 --- a/src/audio/audio_load.c +++ b/src/audio/audio_load.c @@ -218,7 +218,7 @@ void AudioLoad_InitTable(AudioTable* table, u8* romAddr, u16 unkMediumParam) { } void* AudioLoad_SyncLoadSeqFonts(s32 seqId, u32* outFontId) { - s32 index = ((u16*) gSeqFontTable)[AudioLoad_GetLoadTableIndex(0, seqId)]; + s32 index = ((u16*) gSeqFontTable)[AudioLoad_GetLoadTableIndex(SEQUENCE_TABLE, seqId)]; s32 fontId = 0xFF; s32 numFonts = gSeqFontTable[index++]; void* soundFontData; @@ -235,7 +235,7 @@ void AudioLoad_SyncLoadSeqParts(s32 seqId, s32 flags) { s32 pad; u32 fontId; - seqId = AudioLoad_GetLoadTableIndex(0, seqId); + seqId = AudioLoad_GetLoadTableIndex(SEQUENCE_TABLE, seqId); if (flags & 2) { AudioLoad_SyncLoadSeqFonts(seqId, &fontId); } @@ -289,22 +289,24 @@ s32 AudioLoad_SyncLoadInstrument(s32 fontId, s32 instId, s32 drumId) { } void AudioLoad_AsyncLoadSampleBank(s32 sampleBankId, s32 nChunks, s32 retData, OSMesgQueue* retQueue) { - if (AudioLoad_AsyncLoadInner(2, AudioLoad_GetLoadTableIndex(2, sampleBankId), nChunks, retData, retQueue) == NULL) { + if (AudioLoad_AsyncLoadInner(SAMPLE_TABLE, AudioLoad_GetLoadTableIndex(SAMPLE_TABLE, sampleBankId), nChunks, + retData, retQueue) == NULL) { osSendMesg(retQueue, NULL, OS_MESG_NOBLOCK); } } void AudioLoad_AsyncLoadSeq(s32 seqId, s32 nChunks, s32 retData, OSMesgQueue* retQueue) { - s32 index = ((u16*) gSeqFontTable)[AudioLoad_GetLoadTableIndex(0, seqId)]; + s32 index = ((u16*) gSeqFontTable)[AudioLoad_GetLoadTableIndex(SEQUENCE_TABLE, seqId)]; s32 fontsLeft = gSeqFontTable[index++]; for (fontsLeft; fontsLeft > 0; fontsLeft--) { - AudioLoad_AsyncLoadInner(1, AudioLoad_GetLoadTableIndex(1, gSeqFontTable[index++]), nChunks, retData, retQueue); + AudioLoad_AsyncLoadInner(FONT_TABLE, AudioLoad_GetLoadTableIndex(FONT_TABLE, gSeqFontTable[index++]), nChunks, + retData, retQueue); } } u8* AudioLoad_GetFontsForSequence(s32 seqId, u32* outNumFonts) { - s32 index = ((u16*) gSeqFontTable)[AudioLoad_GetLoadTableIndex(0, seqId)]; + s32 index = ((u16*) gSeqFontTable)[AudioLoad_GetLoadTableIndex(SEQUENCE_TABLE, seqId)]; *outNumFonts = gSeqFontTable[index++]; if (*outNumFonts == 0) { @@ -314,13 +316,13 @@ u8* AudioLoad_GetFontsForSequence(s32 seqId, u32* outNumFonts) { } void AudioLoad_DiscardSeqFonts(s32 seqId) { - s32 index = ((u16*) gSeqFontTable)[AudioLoad_GetLoadTableIndex(0, seqId)]; + s32 index = ((u16*) gSeqFontTable)[AudioLoad_GetLoadTableIndex(SEQUENCE_TABLE, seqId)]; s32 numFonts = gSeqFontTable[index++]; u32 fontId; while (numFonts > 0) { numFonts--; - fontId = AudioLoad_GetLoadTableIndex(1, gSeqFontTable[index++]); + fontId = AudioLoad_GetLoadTableIndex(FONT_TABLE, gSeqFontTable[index++]); if (AudioHeap_SearchPermanentCache(1, fontId) == NULL) { AudioLoad_DiscardFont(fontId); if (gFontLoadStatus[fontId] != 5) { @@ -363,7 +365,7 @@ void AudioLoad_SyncInitSeqPlayerInternal(s32 playerIdx, s32 seqId, s32 arg2) { s32 fontId; s32 i; - seqId = AudioLoad_GetLoadTableIndex(0, seqId); + seqId = AudioLoad_GetLoadTableIndex(SEQUENCE_TABLE, seqId); func_800144E4(&gSeqPlayers[playerIdx]); index = ((u16*) gSeqFontTable)[seqId]; numFonts = gSeqFontTable[index++]; @@ -388,7 +390,7 @@ void AudioLoad_SyncInitSeqPlayerInternal(s32 playerIdx, s32 seqId, s32 arg2) { } void* AudioLoad_SyncLoadSeq(s32 seqId) { - s32 seqIdx = AudioLoad_GetLoadTableIndex(0, seqId); + s32 seqIdx = AudioLoad_GetLoadTableIndex(SEQUENCE_TABLE, seqId); s32 didAllocate; return AudioLoad_SyncLoad(0, seqIdx, &didAllocate); @@ -400,7 +402,7 @@ void* AudioLoad_SyncLoadSampleBank(u32 sampleBankId, s32* outMedium) { s32 cachePolicy; s32 noLoad; - sampleBankId = AudioLoad_GetLoadTableIndex(2, sampleBankId); + sampleBankId = AudioLoad_GetLoadTableIndex(SAMPLE_TABLE, sampleBankId); ramAddr = AudioLoad_SearchCaches(2, sampleBankId); if (ramAddr != NULL) { if (gSampleFontLoadStatus[sampleBankId] != 5) { @@ -410,7 +412,7 @@ void* AudioLoad_SyncLoadSampleBank(u32 sampleBankId, s32* outMedium) { return ramAddr; } cachePolicy = sampleBankTable->entries[sampleBankId].cachePolicy; - if (cachePolicy == 4) { + if (cachePolicy == CACHEPOLICY_4) { *outMedium = sampleBankTable->entries[sampleBankId].medium; return sampleBankTable->entries[sampleBankId].romAddr; } @@ -430,18 +432,18 @@ void* AudioLoad_SyncLoadFont(s32 fontId) { s32 didAllocate; SampleBankRelocInfo relocInfo; - fontId = AudioLoad_GetLoadTableIndex(1, fontId); + fontId = AudioLoad_GetLoadTableIndex(FONT_TABLE, fontId); sampleBankId1 = gSoundFontList[fontId].sampleBankId1; sampleBankId2 = gSoundFontList[fontId].sampleBankId2; relocInfo.sampleBankId1 = sampleBankId1; relocInfo.sampleBankId2 = sampleBankId2; - if (sampleBankId1 != 0xFF) { + if (sampleBankId1 != SAMPLES_NONE) { relocInfo.baseAddr1 = AudioLoad_SyncLoadSampleBank(sampleBankId1, &relocInfo.medium1); } else { relocInfo.baseAddr1 = NULL; } - if (sampleBankId2 != 0xFF) { + if (sampleBankId2 != SAMPLES_NONE) { relocInfo.baseAddr2 = AudioLoad_SyncLoadSampleBank(sampleBankId2, &relocInfo.medium2); } else { relocInfo.baseAddr2 = NULL; @@ -451,7 +453,7 @@ void* AudioLoad_SyncLoadFont(s32 fontId) { return NULL; } if (didAllocate == 1) { - AudioLoad_RelocateFontAndPreloadSamples(fontId, fontData, &relocInfo, 0); + AudioLoad_RelocateFontAndPreloadSamples(fontId, fontData, &relocInfo, AUDIOLOAD_SYNC); } return fontData; } @@ -478,27 +480,27 @@ void* AudioLoad_SyncLoad(u32 tableType, u32 id, s32* didAllocate) { cachePolicy = table->entries[id].cachePolicy; romAddr = table->entries[id].romAddr; switch (cachePolicy) { - case 0: + case CACHEPOLICY_0: ramAddr = AudioHeap_AllocPermanent(tableType, id, size); if (ramAddr == NULL) { return ramAddr; } break; - case 1: - ramAddr = AudioHeap_AllocCached(tableType, size, 1, id); + case CACHEPOLICY_1: + ramAddr = AudioHeap_AllocCached(tableType, size, CACHE_PERSISTENT, id); if (ramAddr == NULL) { return ramAddr; } break; - case 2: - ramAddr = AudioHeap_AllocCached(tableType, size, 0, id); + case CACHEPOLICY_2: + ramAddr = AudioHeap_AllocCached(tableType, size, CACHE_TEMPORARY, id); if (ramAddr == NULL) { return ramAddr; } break; - case 3: - case 4: - ramAddr = AudioHeap_AllocCached(tableType, size, 2, id); + case CACHEPOLICY_3: + case CACHEPOLICY_4: + ramAddr = AudioHeap_AllocCached(tableType, size, CACHE_EITHER, id); if (ramAddr == NULL) { return ramAddr; } @@ -511,7 +513,7 @@ void* AudioLoad_SyncLoad(u32 tableType, u32 id, s32* didAllocate) { } else { AudioLoad_SyncDma(romAddr, ramAddr, size, medium); } - loadStatus = (cachePolicy == 0) ? 5 : 2; + loadStatus = (cachePolicy == CACHEPOLICY_0) ? 5 : 2; } switch (tableType) { case SEQUENCE_TABLE: @@ -549,7 +551,7 @@ void* AudioLoad_SearchCaches(s32 tableType, s32 id) { if (ramAddr != NULL) { return ramAddr; } - ramAddr = AudioHeap_SearchCaches(tableType, 2, id); + ramAddr = AudioHeap_SearchCaches(tableType, CACHE_EITHER, id); if (ramAddr != NULL) { return ramAddr; } @@ -715,17 +717,17 @@ void* AudioLoad_AsyncLoadInner(s32 tableType, s32 id, s32 nChunks, s32 retData, s32 loadStatus; switch (tableType) { - case 0: + case SEQUENCE_TABLE: if (gSeqLoadStatus[id] == 1) { return NULL; } break; - case 1: + case FONT_TABLE: if (gFontLoadStatus[id] == 1) { return NULL; } break; - case 2: + case SAMPLE_TABLE: if (gSampleFontLoadStatus[id] == 1) { return NULL; } @@ -744,28 +746,28 @@ void* AudioLoad_AsyncLoadInner(s32 tableType, s32 id, s32 nChunks, s32 retData, romAddr = table->entries[id].romAddr; loadStatus = 2; switch (cachePolicy) { - case 0: + case CACHEPOLICY_0: ramAddr = AudioHeap_AllocPermanent(tableType, id, size); if (ramAddr == NULL) { return ramAddr; } loadStatus = 5; break; - case 1: - ramAddr = AudioHeap_AllocCached(tableType, size, 1, id); + case CACHEPOLICY_1: + ramAddr = AudioHeap_AllocCached(tableType, size, CACHE_PERSISTENT, id); if (ramAddr == NULL) { return ramAddr; } break; - case 2: - ramAddr = AudioHeap_AllocCached(tableType, size, 0, id); + case CACHEPOLICY_2: + ramAddr = AudioHeap_AllocCached(tableType, size, CACHE_TEMPORARY, id); if (ramAddr == NULL) { return ramAddr; } break; - case 3: - case 4: - ramAddr = AudioHeap_AllocCached(tableType, size, 2, id); + case CACHEPOLICY_3: + case CACHEPOLICY_4: + ramAddr = AudioHeap_AllocCached(tableType, size, CACHE_EITHER, id); if (ramAddr == NULL) { return ramAddr; } @@ -776,17 +778,17 @@ void* AudioLoad_AsyncLoadInner(s32 tableType, s32 id, s32 nChunks, s32 retData, loadStatus = 1; } switch (tableType) { - case 0: + case SEQUENCE_TABLE: if (gSeqLoadStatus[id] != 5) { gSeqLoadStatus[id] = loadStatus; } break; - case 1: + case FONT_TABLE: if (gFontLoadStatus[id] != 5) { gFontLoadStatus[id] = loadStatus; } break; - case 2: + case SAMPLE_TABLE: if (gSampleFontLoadStatus[id] != 5) { gSampleFontLoadStatus[id] = loadStatus; } @@ -823,7 +825,7 @@ void AudioLoad_Init(void) { u64* clearContext; void* ramAddr; - gResetTimer = 0; + gAudioResetTimer = 0; for (i = 0; i < gAudioHeapSize / 8; i++) { ((u64*) gAudioHeap)[i] = 0; @@ -874,11 +876,11 @@ void AudioLoad_Init(void) { } } gAudioSpecId = AUDIOSPEC_0; - gResetStatus = 1; + gAudioResetStep = 1; AudioHeap_ResetStep(); - gSequenceTable = &gSeqTableInit; - gSoundFontTable = &gSoundFontTableInit; - gSampleBankTable = &gSampleBankTableInit; + gSequenceTable = (AudioTable*) &gSeqTableInit; + gSoundFontTable = (AudioTable*) &gSoundFontTableInit; + gSampleBankTable = (AudioTable*) &gSampleBankTableInit; gSeqFontTable = gSeqFontTableInit; gNumSequences = gSequenceTable->numEntries; AudioLoad_InitTable(gSequenceTable, SEGMENT_ROM_START(audio_seq), gSequenceMedium); @@ -909,16 +911,16 @@ s32 AudioLoad_SlowLoadSample(s32 fontId, u8 instId, s8* status) { sample = AudioLoad_GetFontSample(fontId, instId); if (sample == NULL) { - *status = 0; + *status = SLOW_LOAD_STATUS_0; return -1; } if (sample->medium == MEDIUM_RAM) { - *status = 2; + *status = SLOW_LOAD_STATUS_2; return 0; } slowLoad = &gSlowLoads.slowLoad[gSlowLoads.unk_00]; - if (slowLoad->state == 3) { - slowLoad->state = 0; + if (slowLoad->state == SLOW_LOAD_DONE) { + slowLoad->state = SLOW_LOAD_WAITING; } slowLoad->sample = *sample; slowLoad->status = status; @@ -926,14 +928,14 @@ s32 AudioLoad_SlowLoadSample(s32 fontId, u8 instId, s8* status) { AudioHeap_AllocTemporarySampleCache(sample->size, fontId, sample->sampleAddr, sample->medium); if (slowLoad->curRamAddr == NULL) { if ((sample->medium == MEDIUM_UNK) || (sample->codec == 2)) { - *status = 0; + *status = SLOW_LOAD_STATUS_0; return -1; } else { - *status = 3; + *status = SLOW_LOAD_STATUS_3; return -1; } } - slowLoad->state = 1; + slowLoad->state = SLOW_LOAD_START; slowLoad->bytesRemaining = ALIGN16(sample->size); slowLoad->ramAddr = slowLoad->curRamAddr; slowLoad->curDevAddr = sample->sampleAddr; @@ -986,18 +988,18 @@ void AudioLoad_ProcessSlowLoads(s32 resetStatus) { for (i = 0; i < 2; i++) { slowLoad = &gSlowLoads.slowLoad[i]; switch (slowLoad->state) { - case 2: + case SLOW_LOAD_LOADING: MQ_WAIT_FOR_MESG(&slowLoad->mesgQueue, NULL); if (resetStatus != 0) { - slowLoad->state = 3; + slowLoad->state = SLOW_LOAD_DONE; break; } - case 1: - slowLoad->state = 2; + case SLOW_LOAD_START: + slowLoad->state = SLOW_LOAD_LOADING; if (slowLoad->bytesRemaining == 0) { AudioLoad_FinishSlowLoad(&gSlowLoads.slowLoad[i]); - slowLoad->state = 3; - *slowLoad->status = 1; + slowLoad->state = SLOW_LOAD_DONE; + *slowLoad->status = SLOW_LOAD_STATUS_1; } else if (slowLoad->bytesRemaining < 0x1000) { if (slowLoad->medium == MEDIUM_UNK) { AudioLoad_DmaSlowCopyUnkMedium(slowLoad->curDevAddr, slowLoad->curRamAddr, @@ -1092,16 +1094,15 @@ void AudioLoad_ProcessAsyncLoads(s32 resetStatus) { } void AudioLoad_ProcessAsyncLoad(AudioAsyncLoad* asyncLoad, s32 resetStatus) { - AudioTable* sp5C; - s32 pad1; - s32 pad2; - u32 temp; - s32 sp24; - s32 sp48; - s32 sp44; - SampleBankRelocInfo sp2C; + AudioTable* sampleTable = gSampleBankTable; + s32 tableType; + s32 loadStatus; + u32 msg; + s32 tableIndex; + s32 sampleBankId1; + s32 sampleBankId2; + SampleBankRelocInfo relocInfo; - sp5C = gSampleBankTable; if (asyncLoad->delay > 1) { asyncLoad->delay--; return; @@ -1119,64 +1120,62 @@ void AudioLoad_ProcessAsyncLoad(AudioAsyncLoad* asyncLoad, s32 resetStatus) { } } if (asyncLoad->bytesRemaining == 0) { - temp = asyncLoad->retMsg; - pad1 = (temp >> 0x10) & 0xFF; - sp24 = (temp >> 8) & 0xFF; - pad2 = temp & 0xFF; - switch (pad1) { - case 0: - if (gSeqLoadStatus[sp24] != 5) { - gSeqLoadStatus[sp24] = pad2; + msg = asyncLoad->retMsg; + tableType = (msg >> 0x10) & 0xFF; + tableIndex = (msg >> 8) & 0xFF; + loadStatus = msg & 0xFF; + switch (tableType) { + case SEQUENCE_TABLE: + if (gSeqLoadStatus[tableIndex] != 5) { + gSeqLoadStatus[tableIndex] = loadStatus; } break; - case 2: - if (gSampleFontLoadStatus[sp24] != 5) { - gSampleFontLoadStatus[sp24] = pad2; + case SAMPLE_TABLE: + if (gSampleFontLoadStatus[tableIndex] != 5) { + gSampleFontLoadStatus[tableIndex] = loadStatus; } break; - case 1: - if (gFontLoadStatus[sp24] != 5) { - gFontLoadStatus[sp24] = pad2; + case FONT_TABLE: + if (gFontLoadStatus[tableIndex] != 5) { + gFontLoadStatus[tableIndex] = loadStatus; } - sp48 = gSoundFontList[sp24].sampleBankId1; - sp44 = gSoundFontList[sp24].sampleBankId2; - sp2C.sampleBankId1 = sp48; - sp2C.sampleBankId2 = sp44; - if (sp48 != 0xFF) { - sp2C.baseAddr1 = AudioLoad_SyncLoadSampleBank(sp48, &sp2C.medium1); + sampleBankId1 = gSoundFontList[tableIndex].sampleBankId1; + sampleBankId2 = gSoundFontList[tableIndex].sampleBankId2; + relocInfo.sampleBankId1 = sampleBankId1; + relocInfo.sampleBankId2 = sampleBankId2; + if (sampleBankId1 != SAMPLES_NONE) { + relocInfo.baseAddr1 = AudioLoad_SyncLoadSampleBank(sampleBankId1, &relocInfo.medium1); } else { - sp2C.baseAddr1 = NULL; + relocInfo.baseAddr1 = NULL; } - if (sp44 != 0xFF) { - sp2C.baseAddr2 = AudioLoad_SyncLoadSampleBank(sp44, &sp2C.medium2); + if (sampleBankId2 != SAMPLES_NONE) { + relocInfo.baseAddr2 = AudioLoad_SyncLoadSampleBank(sampleBankId2, &relocInfo.medium2); } else { - sp2C.baseAddr2 = NULL; + relocInfo.baseAddr2 = NULL; } - AudioLoad_RelocateFontAndPreloadSamples(sp24, asyncLoad->ramAddr, &sp2C, 1); + AudioLoad_RelocateFontAndPreloadSamples(tableIndex, asyncLoad->ramAddr, &relocInfo, AUDIOLOAD_ASYNC); break; } asyncLoad->status = 0; osSendMesg(asyncLoad->retQueue, asyncLoad->retMsg, OS_MESG_NOBLOCK); - } else { - if (asyncLoad->bytesRemaining < asyncLoad->chunkSize) { - if (asyncLoad->medium == MEDIUM_UNK) { - AudioLoad_AsyncDmaUnkMedium(asyncLoad->curDevAddr, asyncLoad->curRamAddr, asyncLoad->bytesRemaining, - sp5C->unkMediumParam); - } else { - AudioLoad_AsyncDma(asyncLoad, asyncLoad->bytesRemaining); - } - asyncLoad->bytesRemaining = 0; + } else if (asyncLoad->bytesRemaining < asyncLoad->chunkSize) { + if (asyncLoad->medium == MEDIUM_UNK) { + AudioLoad_AsyncDmaUnkMedium(asyncLoad->curDevAddr, asyncLoad->curRamAddr, asyncLoad->bytesRemaining, + sampleTable->unkMediumParam); } else { - if (asyncLoad->medium == MEDIUM_UNK) { - AudioLoad_AsyncDmaUnkMedium(asyncLoad->curDevAddr, asyncLoad->curRamAddr, asyncLoad->chunkSize, - sp5C->unkMediumParam); - } else { - AudioLoad_AsyncDma(asyncLoad, asyncLoad->chunkSize); - } - asyncLoad->bytesRemaining -= asyncLoad->chunkSize; - asyncLoad->curDevAddr += asyncLoad->chunkSize; - asyncLoad->curRamAddr += asyncLoad->chunkSize; + AudioLoad_AsyncDma(asyncLoad, asyncLoad->bytesRemaining); } + asyncLoad->bytesRemaining = 0; + } else { + if (asyncLoad->medium == MEDIUM_UNK) { + AudioLoad_AsyncDmaUnkMedium(asyncLoad->curDevAddr, asyncLoad->curRamAddr, asyncLoad->chunkSize, + sampleTable->unkMediumParam); + } else { + AudioLoad_AsyncDma(asyncLoad, asyncLoad->chunkSize); + } + asyncLoad->bytesRemaining -= asyncLoad->chunkSize; + asyncLoad->curDevAddr += asyncLoad->chunkSize; + asyncLoad->curRamAddr += asyncLoad->chunkSize; } } @@ -1271,7 +1270,7 @@ s32 AudioLoad_RelocateFontAndPreloadSamples(s32 fontId, u32 fontDataAddr, Sample #endif //! Bug: Those are assignments, not equality checks. switch (isAsync) { - case 0: + case AUDIOLOAD_SYNC: if (sample->medium = relocData->medium1) { sampleRamAddr = AudioHeap_AllocPersistentSampleCache(sample->size, relocData->sampleBankId1, sample->sampleAddr, sample->medium); @@ -1280,7 +1279,7 @@ s32 AudioLoad_RelocateFontAndPreloadSamples(s32 fontId, u32 fontDataAddr, Sample sample->sampleAddr, sample->medium); } break; - case 1: + case AUDIOLOAD_ASYNC: if (sample->medium = relocData->medium1) { sampleRamAddr = AudioHeap_AllocTemporarySampleCache(sample->size, relocData->sampleBankId1, sample->sampleAddr, sample->medium); @@ -1294,7 +1293,7 @@ s32 AudioLoad_RelocateFontAndPreloadSamples(s32 fontId, u32 fontDataAddr, Sample continue; } switch (isAsync) { - case 0: + case AUDIOLOAD_SYNC: if (sample->medium == MEDIUM_UNK) { AudioLoad_SyncDmaUnkMedium(sample->sampleAddr, sampleRamAddr, sample->size, gSampleBankTable->unkMediumParam); @@ -1306,7 +1305,7 @@ s32 AudioLoad_RelocateFontAndPreloadSamples(s32 fontId, u32 fontDataAddr, Sample sample->medium = MEDIUM_RAM; } break; - case 1: + case AUDIOLOAD_ASYNC: size = gPreloadSampleStackTop; gPreloadSampleStack[size].sample = sample; gPreloadSampleStack[size].ramAddr = sampleRamAddr; diff --git a/src/audio/audio_playback.c b/src/audio/audio_playback.c index fc858ae4..a4b2ae46 100644 --- a/src/audio/audio_playback.c +++ b/src/audio/audio_playback.c @@ -375,47 +375,47 @@ void func_80012438(SequenceLayer* layer, s32 arg1) { note->playbackState.adsr.fadeOutVel = gAudioBufferParams.ticksPerUpdateInv; note->playbackState.adsr.action.asByte |= 0x10; } - return; - } - noteAttr = ¬e->playbackState.attributes; - if (note->playbackState.adsr.state != 6) { - noteAttr->freqMod = layer->noteFreqMod; - noteAttr->velocity = layer->noteVelocity; - noteAttr->pan = layer->notePan; - noteAttr->stereo = layer->stereo; - if (layer->channel != NULL) { - noteAttr->reverb = layer->channel->targetReverbVol; - noteAttr->gain = layer->channel->reverbIndex; - if (layer->channel->seqPlayer->muted && (layer->channel->muteBehavior & 8)) { - note->noteSubEu.bitField0.finished = 1; + } else { + noteAttr = ¬e->playbackState.attributes; + if (note->playbackState.adsr.state != 6) { + noteAttr->freqMod = layer->noteFreqMod; + noteAttr->velocity = layer->noteVelocity; + noteAttr->pan = layer->notePan; + noteAttr->stereo = layer->stereo; + if (layer->channel != NULL) { + noteAttr->reverb = layer->channel->targetReverbVol; + noteAttr->gain = layer->channel->reverbIndex; + if (layer->channel->seqPlayer->muted && (layer->channel->muteBehavior & 8)) { + note->noteSubEu.bitField0.finished = 1; + } } - } - note->playbackState.priority = 1; - note->playbackState.prevParentLayer = note->playbackState.parentLayer; - note->playbackState.parentLayer = NO_LAYER; + note->playbackState.priority = 1; + note->playbackState.prevParentLayer = note->playbackState.parentLayer; + note->playbackState.parentLayer = NO_LAYER; - if (arg1 == 7) { - note->playbackState.adsr.fadeOutVel = gAudioBufferParams.ticksPerUpdateInv; - note->playbackState.adsr.action.asByte |= 0x10; - note->playbackState.unk_04 = 2; + if (arg1 == 7) { + note->playbackState.adsr.fadeOutVel = gAudioBufferParams.ticksPerUpdateInv; + note->playbackState.adsr.action.asByte |= 0x10; + note->playbackState.unk_04 = 2; - } else { - note->playbackState.unk_04 = 1; - note->playbackState.adsr.action.asByte |= 0x20; - if (layer->adsr.decayIndex == 0) { - note->playbackState.adsr.fadeOutVel = - layer->channel->adsr.decayIndex * gAudioBufferParams.ticksPerUpdateInvScaled; } else { - note->playbackState.adsr.fadeOutVel = - layer->adsr.decayIndex * gAudioBufferParams.ticksPerUpdateInvScaled; + note->playbackState.unk_04 = 1; + note->playbackState.adsr.action.asByte |= 0x20; + if (layer->adsr.decayIndex == 0) { + note->playbackState.adsr.fadeOutVel = + layer->channel->adsr.decayIndex * gAudioBufferParams.ticksPerUpdateInvScaled; + } else { + note->playbackState.adsr.fadeOutVel = + layer->adsr.decayIndex * gAudioBufferParams.ticksPerUpdateInvScaled; + } + note->playbackState.adsr.sustain = + (s32) layer->channel->adsr.sustain * note->playbackState.adsr.current / 256.0f; } - note->playbackState.adsr.sustain = - (s32) layer->channel->adsr.sustain * note->playbackState.adsr.current / 256.0f; } - } - if (arg1 == 6) { - func_80012C40(note); - func_80012C00(¬e->listItem.pool->decaying, ¬e->listItem); + if (arg1 == 6) { + func_80012C40(note); + func_80012C00(¬e->listItem.pool->decaying, ¬e->listItem); + } } } @@ -502,37 +502,37 @@ void func_800128B4(void) { void func_80012964(NotePool* pool) { s32 poolType; - AudioListItem* sp48; - AudioListItem* var_s0; - AudioListItem* sp40; + AudioListItem* poolItem; + AudioListItem* nextPoolItem; + AudioListItem* freeList; for (poolType = 0; poolType < 4; poolType++) { switch (poolType) { case 0: - sp48 = &pool->disabled; - sp40 = &gNoteFreeLists.disabled; + poolItem = &pool->disabled; + freeList = &gNoteFreeLists.disabled; break; case 1: - sp48 = &pool->decaying; - sp40 = &gNoteFreeLists.decaying; + poolItem = &pool->decaying; + freeList = &gNoteFreeLists.decaying; break; case 2: - sp48 = &pool->releasing; - sp40 = &gNoteFreeLists.releasing; + poolItem = &pool->releasing; + freeList = &gNoteFreeLists.releasing; break; case 3: - sp48 = &pool->active; - sp40 = &gNoteFreeLists.active; + poolItem = &pool->active; + freeList = &gNoteFreeLists.active; break; } while (true) { - var_s0 = sp48->next; - if ((var_s0 == sp48) || (var_s0 == NULL)) { + nextPoolItem = poolItem->next; + if ((nextPoolItem == poolItem) || (nextPoolItem == NULL)) { break; } - func_80012C40((Note*) var_s0); - func_800145BC(sp40, var_s0); + func_80012C40((Note*) nextPoolItem); + func_800145BC(freeList, nextPoolItem); } } } @@ -540,9 +540,9 @@ void func_80012964(NotePool* pool) { void func_80012AC4(NotePool* pool, s32 arg1) { s32 var_s0; s32 poolType; - AudioListItem* temp_v0; - AudioListItem* sp48; - AudioListItem* sp44; + AudioListItem* note; + AudioListItem* freeList; + AudioListItem* poolList; func_80012964(pool); poolType = 0; @@ -553,28 +553,28 @@ void func_80012AC4(NotePool* pool, s32 arg1) { } switch (poolType) { case 0: - sp48 = &gNoteFreeLists.disabled; - sp44 = &pool->disabled; + freeList = &gNoteFreeLists.disabled; + poolList = &pool->disabled; break; case 1: - sp48 = &gNoteFreeLists.decaying; - sp44 = &pool->decaying; + freeList = &gNoteFreeLists.decaying; + poolList = &pool->decaying; break; case 2: - sp48 = &gNoteFreeLists.releasing; - sp44 = &pool->releasing; + freeList = &gNoteFreeLists.releasing; + poolList = &pool->releasing; break; case 3: - sp48 = &gNoteFreeLists.active; - sp44 = &pool->active; + freeList = &gNoteFreeLists.active; + poolList = &pool->active; break; } while (var_s0 < arg1) { - temp_v0 = func_800145FC(sp48); - if (temp_v0 == NULL) { + note = func_800145FC(freeList); + if (note == NULL) { break; } - func_800145BC(sp44, temp_v0); + func_800145BC(poolList, note); var_s0++; } poolType++; diff --git a/src/audio/audio_seqplayer.c b/src/audio/audio_seqplayer.c index 445bb819..524d96eb 100644 --- a/src/audio/audio_seqplayer.c +++ b/src/audio/audio_seqplayer.c @@ -44,7 +44,7 @@ void func_80013EA0(SequenceChannel* channel) { channel->finished = 0; channel->stopScript = 0; channel->muted = 0; - channel->hasInstrument = 0; + channel->hasInstrument = false; channel->stereoHeadsetEffects = 0; channel->transposition = 0; channel->largeNotes = 0; @@ -688,11 +688,11 @@ void func_80015330(SequenceChannel* channel, u8 arg1) { channel->instrument = (Instrument*) 1; } else { if ((channel->instOrWave = func_800152C0(channel, arg1, &channel->instrument, &channel->adsr)) == 0) { - channel->hasInstrument = 0; + channel->hasInstrument = false; return; } } - channel->hasInstrument = 1; + channel->hasInstrument = true; } void func_800153C4(SequenceChannel* channel, u8 arg1) { @@ -825,7 +825,7 @@ void func_800153E8(SequenceChannel* channel) { sp52 = ((u16*) gSeqFontTable)[seqPlayer->seqId]; loBits = gSeqFontTable[sp52]; cmd = gSeqFontTable[sp52 + loBits - cmd]; - if (AudioHeap_SearchCaches(1, 2, cmd) != 0) { + if (AudioHeap_SearchCaches(FONT_TABLE, CACHE_EITHER, cmd) != NULL) { channel->fontId = cmd; } /* fallthrough */ @@ -912,7 +912,7 @@ void func_800153E8(SequenceChannel* channel) { sp52 = ((u16*) gSeqFontTable)[seqPlayer->seqId]; loBits = gSeqFontTable[sp52]; cmd = gSeqFontTable[sp52 + loBits - cmd]; - if (AudioHeap_SearchCaches(1, 2, cmd) != 0) { + if (AudioHeap_SearchCaches(FONT_TABLE, CACHE_EITHER, cmd) != NULL) { channel->fontId = cmd; } break; @@ -1387,7 +1387,7 @@ void func_800168BC(void) { s32 i; s32 j; - for (i = 0; i < 48; i++) { + for (i = 0; i < ARRAY_COUNT(gSeqChannels); i++) { gSeqChannels[i].seqPlayer = NULL; gSeqChannels[i].enabled = false; #ifdef AVOID_UB @@ -1400,7 +1400,7 @@ void func_800168BC(void) { } } func_8001463C(); - for (i = 0; i < 64; i++) { + for (i = 0; i < ARRAY_COUNT(gSeqLayers); i++) { gSeqLayers[i].channel = NULL; gSeqLayers[i].enabled = false; } diff --git a/src/audio/audio_tables.c b/src/audio/audio_tables.c index 21270980..370e7c67 100644 --- a/src/audio/audio_tables.c +++ b/src/audio/audio_tables.c @@ -1,99 +1,119 @@ #include "sys.h" -#include "sf64audio_external.h" - -typedef struct { - /* 0x00 */ s16 numEntries; - /* 0x02 */ s16 unkMediumParam; - /* 0x04 */ u32 romAddr; - /* 0x08 */ char pad[0x8]; -} AudioTableBase; - -typedef struct { - /* 0x00 */ u32 romAddr; - /* 0x04 */ u32 size; - /* 0x08 */ s8 medium; - /* 0x09 */ s8 cachePolicy; - /* 0x0A */ s16 shortData1; - /* 0x0C */ s16 shortData2; - /* 0x0E */ s16 shortData3; -} AudioTableEntry; // size = 0x10 +#include "sf64audio_provisional.h" AudioTableBase gSampleBankTableInit = { 4, 0, 0 }; AudioTableEntry gSampleBankTableInitEntries[4] = { - { 0, 0xE1E30, 2, 4, 0, 0, 0 }, - { 0xE1E30, 0xFF9D0, 2, 4, 0, 0, 0 }, - { 0x1E1800, 0x497480, 2, 4, 0, 0, 0 }, - { 0x678C80, 0xC3900, 2, 4, 0, 0, 0 }, + { 0x000000, 0x0E1E30, MEDIUM_CART, CACHEPOLICY_4 }, + { 0x0E1E30, 0x0FF9D0, MEDIUM_CART, CACHEPOLICY_4 }, + { 0x1E1800, 0x497480, MEDIUM_CART, CACHEPOLICY_4 }, + { 0x678C80, 0x0C3900, MEDIUM_CART, CACHEPOLICY_4 }, }; -AudioTableBase gSeqTableInit = { 66, 0, 0 }; -AudioTableEntry gSeqTableInitEntries[66] = { - { 0x00000, 0x3AF0, 2, 0, 0, 0, 0 }, { 0x03AF0, 0x56B0, 2, 0, 0, 0, 0 }, - { 0x091A0, 0x2D80, 2, 3, 0, 0, 0 }, { 0x0BF20, 0x1410, 2, 3, 0, 0, 0 }, - { 0x0D330, 0x1600, 2, 3, 0, 0, 0 }, { 0x0E930, 0xF20, 2, 3, 0, 0, 0 }, - { 0x0F850, 0x13A0, 2, 3, 0, 0, 0 }, { 0x010BF0, 0x1100, 2, 3, 0, 0, 0 }, - { 0x011CF0, 0x19E0, 2, 3, 0, 0, 0 }, { 0x0136D0, 0x13E0, 2, 3, 0, 0, 0 }, - { 0x014AB0, 0x12F0, 2, 3, 0, 0, 0 }, { SEQ_ID_SECTOR_Y, 0, 2, 3, 0, 0, 0 }, - { 0x15DA0, 0xB70, 2, 3, 0, 0, 0 }, { 0x16910, 0x2460, 2, 3, 0, 0, 0 }, - { 0x18D70, 0xD40, 2, 3, 0, 0, 0 }, { SEQ_ID_FORTUNA, 0, 2, 3, 0, 0, 0 }, - { SEQ_ID_TITANIA, 0, 2, 3, 0, 0, 0 }, { 0x19AB0, 0x7F0, 2, 3, 0, 0, 0 }, - { 0x1A2A0, 0x1440, 2, 3, 0, 0, 0 }, { 0x1B6E0, 0x1B20, 2, 3, 0, 0, 0 }, - { SEQ_ID_BOSS_ME, 0, 2, 3, 0, 0, 0 }, { SEQ_ID_BOSS_CO_1, 0, 2, 3, 0, 0, 0 }, - { SEQ_ID_BOSS_CO_1, 0, 2, 3, 0, 0, 0 }, { SEQ_ID_BOSS_ME, 0, 2, 3, 0, 0, 0 }, - { SEQ_ID_BOSS_ME, 0, 2, 3, 0, 0, 0 }, { 0x1D200, 0x1B30, 2, 3, 0, 0, 0 }, - { SEQ_ID_BOSS_CO_1, 0, 2, 3, 0, 0, 0 }, { SEQ_ID_BOSS_ME, 0, 2, 3, 0, 0, 0 }, - { 0x1ED30, 0x10B0, 2, 3, 0, 0, 0 }, { SEQ_ID_BOSS_BO, 0, 2, 3, 0, 0, 0 }, - { SEQ_ID_BOSS_ME, 0, 2, 3, 0, 0, 0 }, { SEQ_ID_BOSS_BO, 0, 2, 3, 0, 0, 0 }, - { SEQ_ID_BOSS_ME, 0, 2, 3, 0, 0, 0 }, { 0x1FDE0, 0x1410, 2, 3, 0, 0, 0 }, - { 0x211F0, 0xF30, 2, 3, 0, 0, 0 }, { 0x22120, 0x2B30, 2, 3, 0, 0, 0 }, - { 0x24C50, 0x7F0, 2, 3, 0, 0, 0 }, { 0x25440, 0x13B0, 2, 3, 0, 0, 0 }, - { 0x267F0, 0xC70, 2, 3, 0, 0, 0 }, { 0x27460, 0x180, 2, 3, 0, 0, 0 }, - { 0x275E0, 0x5C0, 2, 3, 0, 0, 0 }, { SEQ_ID_TITLE, 0, 2, 3, 0, 0, 0 }, - { 0x27BA0, 0x4E40, 2, 3, 0, 0, 0 }, { 0x2C9E0, 0x14E0, 2, 3, 0, 0, 0 }, - { 0x2DEC0, 0x400, 2, 3, 0, 0, 0 }, { 0x2E2C0, 0x800, 2, 3, 0, 0, 0 }, - { 0x2EAC0, 0x1AB0, 2, 3, 0, 0, 0 }, { 0x30570, 0x1AA0, 2, 3, 0, 0, 0 }, - { SEQ_ID_BOSS_ME, 0, 2, 3, 0, 0, 0 }, { 0x32010, 0x1370, 2, 3, 0, 0, 0 }, - { 0x33380, 0xB80, 2, 3, 0, 0, 0 }, { 0x33F00, 0x5C0, 2, 3, 0, 0, 0 }, - { SEQ_ID_CO_INTRO, 0, 2, 3, 0, 0, 0 }, { SEQ_ID_CO_INTRO, 0, 2, 3, 0, 0, 0 }, - { 0x344C0, 0x550, 2, 3, 0, 0, 0 }, { 0x34A10, 0x360, 2, 3, 0, 0, 0 }, - { 0x34D70, 0x620, 2, 3, 0, 0, 0 }, { SEQ_ID_VS_MENU, 0, 2, 3, 0, 0, 0 }, - { 0x35390, 0xA70, 2, 3, 0, 0, 0 }, { SEQ_ID_STAR_WOLF, 0, 2, 3, 0, 0, 0 }, - { 0x35E00, 0xAB0, 2, 3, 0, 0, 0 }, { 0x368B0, 0x13D0, 2, 3, 0, 0, 0 }, - { 0x37C80, 0x250, 2, 3, 0, 0, 0 }, { 0x37ED0, 0x6F0, 2, 3, 0, 0, 0 }, - { 0x385C0, 0xFB0, 2, 3, 0, 0, 0 }, { 0x39570, 0x1780, 2, 3, 0, 0, 0 }, +AudioTableBase gSeqTableInit = { SEQ_ID_MAX, 0, 0 }; +AudioTableEntry gSeqTableInitEntries[SEQ_ID_MAX] = { + { 0x00000, 0x3AF0, MEDIUM_CART, CACHEPOLICY_0 }, { 0x03AF0, 0x56B0, MEDIUM_CART, CACHEPOLICY_0 }, + { 0x091A0, 0x2D80, MEDIUM_CART, CACHEPOLICY_3 }, { 0x0BF20, 0x1410, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x0D330, 0x1600, MEDIUM_CART, CACHEPOLICY_3 }, { 0x0E930, 0xF20, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x0F850, 0x13A0, MEDIUM_CART, CACHEPOLICY_3 }, { 0x10BF0, 0x1100, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x11CF0, 0x19E0, MEDIUM_CART, CACHEPOLICY_3 }, { 0x136D0, 0x13E0, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x14AB0, 0x12F0, MEDIUM_CART, CACHEPOLICY_3 }, { SEQ_ID_SECTOR_Y, 0, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x15DA0, 0xB70, MEDIUM_CART, CACHEPOLICY_3 }, { 0x16910, 0x2460, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x18D70, 0xD40, MEDIUM_CART, CACHEPOLICY_3 }, { SEQ_ID_FORTUNA, 0, MEDIUM_CART, CACHEPOLICY_3 }, + { SEQ_ID_TITANIA, 0, MEDIUM_CART, CACHEPOLICY_3 }, { 0x19AB0, 0x7F0, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x1A2A0, 0x1440, MEDIUM_CART, CACHEPOLICY_3 }, { 0x1B6E0, 0x1B20, MEDIUM_CART, CACHEPOLICY_3 }, + { SEQ_ID_BOSS_ME, 0, MEDIUM_CART, CACHEPOLICY_3 }, { SEQ_ID_BOSS_CO_1, 0, MEDIUM_CART, CACHEPOLICY_3 }, + { SEQ_ID_BOSS_CO_1, 0, MEDIUM_CART, CACHEPOLICY_3 }, { SEQ_ID_BOSS_ME, 0, MEDIUM_CART, CACHEPOLICY_3 }, + { SEQ_ID_BOSS_ME, 0, MEDIUM_CART, CACHEPOLICY_3 }, { 0x1D200, 0x1B30, MEDIUM_CART, CACHEPOLICY_3 }, + { SEQ_ID_BOSS_CO_1, 0, MEDIUM_CART, CACHEPOLICY_3 }, { SEQ_ID_BOSS_ME, 0, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x1ED30, 0x10B0, MEDIUM_CART, CACHEPOLICY_3 }, { SEQ_ID_BOSS_BO, 0, MEDIUM_CART, CACHEPOLICY_3 }, + { SEQ_ID_BOSS_ME, 0, MEDIUM_CART, CACHEPOLICY_3 }, { SEQ_ID_BOSS_BO, 0, MEDIUM_CART, CACHEPOLICY_3 }, + { SEQ_ID_BOSS_ME, 0, MEDIUM_CART, CACHEPOLICY_3 }, { 0x1FDE0, 0x1410, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x211F0, 0xF30, MEDIUM_CART, CACHEPOLICY_3 }, { 0x22120, 0x2B30, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x24C50, 0x7F0, MEDIUM_CART, CACHEPOLICY_3 }, { 0x25440, 0x13B0, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x267F0, 0xC70, MEDIUM_CART, CACHEPOLICY_3 }, { 0x27460, 0x180, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x275E0, 0x5C0, MEDIUM_CART, CACHEPOLICY_3 }, { SEQ_ID_TITLE, 0, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x27BA0, 0x4E40, MEDIUM_CART, CACHEPOLICY_3 }, { 0x2C9E0, 0x14E0, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x2DEC0, 0x400, MEDIUM_CART, CACHEPOLICY_3 }, { 0x2E2C0, 0x800, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x2EAC0, 0x1AB0, MEDIUM_CART, CACHEPOLICY_3 }, { 0x30570, 0x1AA0, MEDIUM_CART, CACHEPOLICY_3 }, + { SEQ_ID_BOSS_ME, 0, MEDIUM_CART, CACHEPOLICY_3 }, { 0x32010, 0x1370, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x33380, 0xB80, MEDIUM_CART, CACHEPOLICY_3 }, { 0x33F00, 0x5C0, MEDIUM_CART, CACHEPOLICY_3 }, + { SEQ_ID_CO_INTRO, 0, MEDIUM_CART, CACHEPOLICY_3 }, { SEQ_ID_CO_INTRO, 0, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x344C0, 0x550, MEDIUM_CART, CACHEPOLICY_3 }, { 0x34A10, 0x360, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x34D70, 0x620, MEDIUM_CART, CACHEPOLICY_3 }, { SEQ_ID_VS_MENU, 0, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x35390, 0xA70, MEDIUM_CART, CACHEPOLICY_3 }, { SEQ_ID_STAR_WOLF, 0, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x35E00, 0xAB0, MEDIUM_CART, CACHEPOLICY_3 }, { 0x368B0, 0x13D0, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x37C80, 0x250, MEDIUM_CART, CACHEPOLICY_3 }, { 0x37ED0, 0x6F0, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x385C0, 0xFB0, MEDIUM_CART, CACHEPOLICY_3 }, { 0x39570, 0x1780, MEDIUM_CART, CACHEPOLICY_3 }, }; +#define SOUNDFONT_ENTRY(offset, size, medium, cachePolicy, bank1, bank2, numInst, numDrums) \ + { \ + offset, size, medium, cachePolicy, (((bank1) &0xFF) << 8) | ((bank2) &0xFF), \ + (((numInst) &0xFF) << 8) | ((numDrums) &0xFF) \ + } + AudioTableBase gSoundFontTableInit = { 33, 0, 0 }; AudioTableEntry gSoundFontTableInitEntries[33] = { - { 0, 0x2F00, 2, 0, 0xFF, 0x7F00, 0 }, { 0x2F00, 0xFE0, 2, 0, 0x1FF, 0x7F00, 0 }, - { 0x3EE0, 0x640, 2, 0, 0x2FF, 0x7F00, 0 }, { 0x4520, 0x1560, 2, 0, 0x2FF, 0x7F00, 0 }, - { 0x5A80, 0xC00, 2, 0, 0x2FF, 0x7F00, 0 }, { 0x6680, 0xDE0, 2, 0, 0x2FF, 0x7F00, 0 }, - { 0x7460, 0x1200, 2, 0, 0x2FF, 0x7F00, 0 }, { 0x8660, 0x1040, 2, 0, 0x2FF, 0x7F00, 0 }, - { 0x96A0, 0xE40, 2, 0, 0x2FF, 0x7F00, 0 }, { 0xA4E0, 0xC20, 2, 0, 0x2FF, 0x7F00, 0 }, - { 0xB100, 0x1920, 2, 0, 0x2FF, 0x7F00, 0 }, { 0xCA20, 0xA20, 2, 0, 0x2FF, 0x7F00, 0 }, - { 0xD440, 0xA00, 2, 0, 0x2FF, 0x7F00, 0 }, { 0xDE40, 0xD60, 2, 0, 0x2FF, 0x7F00, 0 }, - { 0xEBA0, 0xC20, 2, 0, 0x2FF, 0x7F00, 0 }, { 0xF7C0, 0xF00, 2, 0, 0x2FF, 0x7F00, 0 }, - { 0x106C0, 0xF20, 2, 0, 0x2FF, 0x7F00, 0 }, { 0x115E0, 0xE20, 2, 0, 0x2FF, 0x7F00, 0 }, - { 0x12400, 0x10A0, 2, 0, 0x2FF, 0x7F00, 0 }, { 0x134A0, 0x2580, 2, 0, 0x2FF, 0x7F00, 0 }, - { 0x15A20, 0x9E0, 2, 0, 0x2FF, 0x7F00, 0 }, { 0x16400, 0x1220, 2, 3, 0x3FF, 0x1040, 0 }, - { 0x17620, 0x180, 2, 3, 0x3FF, 0x300, 0 }, { 0x177A0, 0x11C0, 2, 3, 0x3FF, 0x1040, 0 }, - { 0x18960, 0x940, 2, 3, 0x3FF, 0xA40, 0 }, { 0x192A0, 0x9E0, 2, 3, 0x3FF, 0xA40, 0 }, - { 0x19C80, 0x920, 2, 3, 0x3FF, 0xA40, 0 }, { 0x1A5A0, 0x9E0, 2, 3, 0x3FF, 0xA40, 0 }, - { 0x1AF80, 0x9E0, 2, 3, 0x3FF, 0xA40, 0 }, { 0x1B960, 0xA10, 2, 3, 0x3FF, 0xA40, 0 }, - { 0x1C370, 0x9E0, 2, 3, 0x3FF, 0xA40, 0 }, { 0x1CD50, 0xA00, 2, 3, 0x3FF, 0xA40, 0 }, - { 0x1D750, 0x8D0, 2, 3, 0x3FF, 0xA40, 0 }, + SOUNDFONT_ENTRY(0x00000, 0x2F00, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_SFX, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x02F00, 0x0FE0, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_MAP, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x03EE0, 0x0640, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x04520, 0x1560, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x05A80, 0x0C00, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x06680, 0x0DE0, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x07460, 0x1200, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x08660, 0x1040, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x096A0, 0x0E40, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x0A4E0, 0x0C20, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x0B100, 0x1920, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x0CA20, 0x0A20, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x0D440, 0x0A00, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x0DE40, 0x0D60, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x0EBA0, 0x0C20, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x0F7C0, 0x0F00, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x106C0, 0x0F20, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x115E0, 0x0E20, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x12400, 0x10A0, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x134A0, 0x2580, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x15A20, 0x09E0, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x16400, 0x1220, MEDIUM_CART, CACHEPOLICY_3, SAMPLES_INST, SAMPLES_NONE, 16, 64), + SOUNDFONT_ENTRY(0x17620, 0x0180, MEDIUM_CART, CACHEPOLICY_3, SAMPLES_INST, SAMPLES_NONE, 3, 0), + SOUNDFONT_ENTRY(0x177A0, 0x11C0, MEDIUM_CART, CACHEPOLICY_3, SAMPLES_INST, SAMPLES_NONE, 16, 64), + SOUNDFONT_ENTRY(0x18960, 0x0940, MEDIUM_CART, CACHEPOLICY_3, SAMPLES_INST, SAMPLES_NONE, 10, 64), + SOUNDFONT_ENTRY(0x192A0, 0x09E0, MEDIUM_CART, CACHEPOLICY_3, SAMPLES_INST, SAMPLES_NONE, 10, 64), + SOUNDFONT_ENTRY(0x19C80, 0x0920, MEDIUM_CART, CACHEPOLICY_3, SAMPLES_INST, SAMPLES_NONE, 10, 64), + SOUNDFONT_ENTRY(0x1A5A0, 0x09E0, MEDIUM_CART, CACHEPOLICY_3, SAMPLES_INST, SAMPLES_NONE, 10, 64), + SOUNDFONT_ENTRY(0x1AF80, 0x09E0, MEDIUM_CART, CACHEPOLICY_3, SAMPLES_INST, SAMPLES_NONE, 10, 64), + SOUNDFONT_ENTRY(0x1B960, 0x0A10, MEDIUM_CART, CACHEPOLICY_3, SAMPLES_INST, SAMPLES_NONE, 10, 64), + SOUNDFONT_ENTRY(0x1C370, 0x09E0, MEDIUM_CART, CACHEPOLICY_3, SAMPLES_INST, SAMPLES_NONE, 10, 64), + SOUNDFONT_ENTRY(0x1CD50, 0x0A00, MEDIUM_CART, CACHEPOLICY_3, SAMPLES_INST, SAMPLES_NONE, 10, 64), + SOUNDFONT_ENTRY(0x1D750, 0x08D0, MEDIUM_CART, CACHEPOLICY_3, SAMPLES_INST, SAMPLES_NONE, 10, 64), }; -u8 gSeqFontTableInit[288] = { - 0, 132, 0, 134, 0, 155, 0, 157, 0, 159, 0, 161, 0, 163, 0, 165, 0, 167, 0, 169, 0, 171, 0, 173, - 0, 175, 0, 177, 0, 179, 0, 181, 0, 183, 0, 185, 0, 187, 0, 189, 0, 191, 0, 193, 0, 195, 0, 197, - 0, 199, 0, 201, 0, 203, 0, 205, 0, 207, 0, 209, 0, 211, 0, 213, 0, 215, 0, 217, 0, 219, 0, 221, - 0, 223, 0, 225, 0, 227, 0, 229, 0, 231, 0, 233, 0, 235, 0, 237, 0, 239, 0, 241, 0, 243, 0, 245, - 0, 247, 0, 249, 0, 251, 0, 253, 0, 255, 1, 1, 1, 3, 1, 5, 1, 7, 1, 9, 1, 11, 1, 13, - 1, 15, 1, 17, 1, 19, 1, 21, 1, 23, 1, 25, 1, 0, 20, 20, 19, 18, 17, 16, 15, 14, 13, 12, - 11, 10, 9, 8, 7, 6, 5, 4, 3, 1, 2, 1, 24, 1, 29, 1, 25, 1, 26, 1, 28, 1, 25, 1, - 25, 1, 29, 1, 24, 1, 29, 1, 28, 1, 25, 1, 30, 1, 24, 1, 25, 1, 28, 1, 28, 1, 31, 1, - 31, 1, 28, 1, 28, 1, 31, 1, 31, 1, 31, 1, 28, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, - 31, 1, 32, 1, 21, 1, 21, 1, 22, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 23, 1, 25, 1, - 21, 1, 21, 1, 29, 1, 25, 1, 31, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, - 21, 1, 21, 1, 27, 1, 25, 1, 21, 1, 25, 1, 25, 1, 25, 1, 21, 1, 31, 0, 0, 0, 0, 0, +#define AS_BYTES(x) (((x) >> 8) & 0xFF), ((x) &0xFF) + +// clang-format off + +u8 gSeqFontTableInit[283] = { + // Offset into this table for sequence sound font list + AS_BYTES(132), AS_BYTES(134), AS_BYTES(155), AS_BYTES(157), AS_BYTES(159), AS_BYTES(161), AS_BYTES(163), + AS_BYTES(165), AS_BYTES(167), AS_BYTES(169), AS_BYTES(171), AS_BYTES(173), AS_BYTES(175), AS_BYTES(177), + AS_BYTES(179), AS_BYTES(181), AS_BYTES(183), AS_BYTES(185), AS_BYTES(187), AS_BYTES(189), AS_BYTES(191), + AS_BYTES(193), AS_BYTES(195), AS_BYTES(197), AS_BYTES(199), AS_BYTES(201), AS_BYTES(203), AS_BYTES(205), + AS_BYTES(207), AS_BYTES(209), AS_BYTES(211), AS_BYTES(213), AS_BYTES(215), AS_BYTES(217), AS_BYTES(219), + AS_BYTES(221), AS_BYTES(223), AS_BYTES(225), AS_BYTES(227), AS_BYTES(229), AS_BYTES(231), AS_BYTES(233), + AS_BYTES(235), AS_BYTES(237), AS_BYTES(239), AS_BYTES(241), AS_BYTES(243), AS_BYTES(245), AS_BYTES(247), + AS_BYTES(249), AS_BYTES(251), AS_BYTES(253), AS_BYTES(255), AS_BYTES(257), AS_BYTES(259), AS_BYTES(261), + AS_BYTES(263), AS_BYTES(265), AS_BYTES(267), AS_BYTES(269), AS_BYTES(271), AS_BYTES(273), AS_BYTES(275), + AS_BYTES(277), AS_BYTES(279), AS_BYTES(281), + + // sound font for SFX sequence + 1, 0, + // sound fonts voice sequence + 20, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 1, 2, + // sound fonts for BGM sequences. Each sequence has a single sound font. + 1, 24, 1, 29, 1, 25, 1, 26, 1, 28, 1, 25, 1, 25, 1, 29, 1, 24, 1, 29, 1, 28, 1, 25, 1, 30, 1, 24, 1, 25, 1, 28, + 1, 28, 1, 31, 1, 31, 1, 28, 1, 28, 1, 31, 1, 31, 1, 31, 1, 28, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, + 1, 21, 1, 21, 1, 22, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 23, 1, 25, 1, 21, 1, 21, 1, 29, 1, 25, 1, 31, 1, 21, + 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 27, 1, 25, 1, 21, 1, 25, 1, 25, 1, 25, 1, 21, 1, 31 }; + +// clang-format on diff --git a/src/audio/audio_thread.c b/src/audio/audio_thread.c index 034bc1c8..93e95988 100644 --- a/src/audio/audio_thread.c +++ b/src/audio/audio_thread.c @@ -42,15 +42,15 @@ static const char devstr14[] = "Error : Queue is not empty ( %x ) \n"; SPTask* AudioThread_CreateTask(void) { static s32 gMaxAbiCmdCnt = 128; static SPTask* gWaitingAudioTask = NULL; - u32 sp54; - s32 sp50; - s32 sp4C; + u32 aiSamplesLeft; + s32 abiCmdCount; + s32 aiBuffIndex; s32 pad48; OSTask_t* task; - u16* sp40; + u16* aiBuffer; s32 pad3C; - u32 sp38; - u32 sp34; + u32 specId; + u32 msg; s32 pad30; gAudioTaskCountQ++; @@ -62,54 +62,54 @@ SPTask* AudioThread_CreateTask(void) { gCurAiBuffIndex++; gCurAiBuffIndex %= 3; - sp4C = (gCurAiBuffIndex + 1) % 3; - sp54 = osAiGetLength() >> 2; - if ((gResetTimer < 16) && (gAiBuffLengths[sp4C] != 0)) { - osAiSetNextBuffer(gAiBuffers[sp4C], gAiBuffLengths[sp4C] * 4); + aiBuffIndex = (gCurAiBuffIndex + 1) % 3; + aiSamplesLeft = osAiGetLength() / 4; + if ((gAudioResetTimer < 16) && (gAiBuffLengths[aiBuffIndex] != 0)) { + osAiSetNextBuffer(gAiBuffers[aiBuffIndex], gAiBuffLengths[aiBuffIndex] * 4); } if (gCurAudioFrameDmaCount && gCurAudioFrameDmaCount) {} gCurAudioFrameDmaCount = 0; AudioLoad_DecreaseSampleDmaTtls(); - AudioLoad_ProcessLoads(gResetStatus); - if (MQ_GET_MESG(gAudioSpecQueue, &sp38)) { - if (gResetStatus == 0) { - gResetStatus = 5; + AudioLoad_ProcessLoads(gAudioResetStep); + if (MQ_GET_MESG(gAudioSpecQueue, &specId)) { + if (gAudioResetStep == 0) { + gAudioResetStep = 5; } - gAudioSpecId = sp38; + gAudioSpecId = specId; } - if ((gResetStatus != 0) && (AudioHeap_ResetStep() == 0)) { - if (gResetStatus == 0) { + if ((gAudioResetStep != 0) && (AudioHeap_ResetStep() == 0)) { + if (gAudioResetStep == 0) { osSendMesg(gAudioResetQueue, (OSMesg) (s32) gAudioSpecId, OS_MESG_NOBLOCK); } gWaitingAudioTask = NULL; return NULL; } - if (gResetTimer > 16) { + if (gAudioResetTimer > 16) { return NULL; } - if (gResetTimer != 0) { - gResetTimer++; + if (gAudioResetTimer != 0) { + gAudioResetTimer++; } gAudioCurTask = &gAudioRspTasks[gAudioTaskIndexQ]; gCurAbiCmdBuffer = gAbiCmdBuffs[gAudioTaskIndexQ]; - sp4C = gCurAiBuffIndex; - sp40 = gAiBuffers[sp4C]; - gAiBuffLengths[sp4C] = ((gAudioBufferParams.samplesPerFrameTarget - sp54 + 0x80) & ~0xF) + 0x10; + aiBuffIndex = gCurAiBuffIndex; + aiBuffer = gAiBuffers[aiBuffIndex]; + gAiBuffLengths[aiBuffIndex] = ALIGN16_ALT(gAudioBufferParams.samplesPerFrameTarget - aiSamplesLeft + 0x80); - if (gAiBuffLengths[sp4C] < gAudioBufferParams.minAiBufferLength) { - gAiBuffLengths[sp4C] = gAudioBufferParams.minAiBufferLength; + if (gAiBuffLengths[aiBuffIndex] < gAudioBufferParams.minAiBufferLength) { + gAiBuffLengths[aiBuffIndex] = gAudioBufferParams.minAiBufferLength; } - if (gAiBuffLengths[sp4C] > gAudioBufferParams.maxAiBufferLength) { - gAiBuffLengths[sp4C] = gAudioBufferParams.maxAiBufferLength; + if (gAiBuffLengths[aiBuffIndex] > gAudioBufferParams.maxAiBufferLength) { + gAiBuffLengths[aiBuffIndex] = gAudioBufferParams.maxAiBufferLength; } - while (MQ_GET_MESG(gThreadCmdProcQueue, &sp34)) { - AudioThread_ProcessCmds(sp34); + while (MQ_GET_MESG(gThreadCmdProcQueue, &msg)) { + AudioThread_ProcessCmds(msg); } - gCurAbiCmdBuffer = func_80009B64(gCurAbiCmdBuffer, &sp50, sp40, gAiBuffLengths[sp4C]); + gCurAbiCmdBuffer = func_80009B64(gCurAbiCmdBuffer, &abiCmdCount, aiBuffer, gAiBuffLengths[aiBuffIndex]); gAudioRandom = osGetCount() * (gAudioRandom + gAudioTaskCountQ); - gAudioRandom = gAiBuffers[sp4C][gAudioTaskCountQ & 0xFF] + gAudioRandom; + gAudioRandom = gAiBuffers[aiBuffIndex][gAudioTaskCountQ & 0xFF] + gAudioRandom; - sp4C = gAudioTaskIndexQ; + aiBuffIndex = gAudioTaskIndexQ; gAudioCurTask->mesgQueue = NULL; gAudioCurTask->msg = NULL; @@ -132,14 +132,14 @@ SPTask* AudioThread_CreateTask(void) { task->output_buff = NULL; task->output_buff_size = NULL; if (1) {} - task->data_ptr = (u64*) gAbiCmdBuffs[sp4C]; - task->data_size = sp50 * sizeof(Acmd); + task->data_ptr = (u64*) gAbiCmdBuffs[aiBuffIndex]; + task->data_size = abiCmdCount * sizeof(Acmd); task->yield_data_ptr = NULL; task->yield_data_size = 0; - if (gMaxAbiCmdCnt < sp50) { - gMaxAbiCmdCnt = sp50; + if (gMaxAbiCmdCnt < abiCmdCount) { + gMaxAbiCmdCnt = abiCmdCount; } if (gAudioBufferParams.count == 1) { @@ -158,7 +158,7 @@ void AudioThread_ProcessGlobalCmd(AudioCmd* cmd) { AudioLoad_SyncLoadSeqParts(cmd->arg1, 3); break; case AUDIOCMD_OP_GLOBAL_INIT_SEQPLAYER: - case 0x88: + case AUDIOCMD_OP_GLOBAL_INIT_SEQPLAYER_ALT: AudioLoad_SyncInitSeqPlayer(cmd->arg0, cmd->arg1, cmd->arg2); AudioThread_SetFadeInTimer(cmd->arg0, cmd->data); break; @@ -171,7 +171,7 @@ void AudioThread_ProcessGlobalCmd(AudioCmd* cmd) { } } break; - case 0x84: + case AUDIOCMD_OP_GLOBAL_UNK_84: break; case AUDIOCMD_OP_GLOBAL_SET_SOUND_MODE: gAudioSoundMode = cmd->asUInt; @@ -422,9 +422,9 @@ void AudioThread_ResetAudioHeap(s32 specId) { } void AudioThread_PreNMIReset(void) { - gResetTimer = 1; + gAudioResetTimer = 1; AudioThread_ResetAudioHeap(AUDIOSPEC_0); - gResetStatus = 0; + gAudioResetStep = 0; } void AudioThread_Init(void) { diff --git a/src/overlays/ovl_menu/fox_option.c b/src/overlays/ovl_menu/fox_option.c index f89be570..7e5073a0 100644 --- a/src/overlays/ovl_menu/fox_option.c +++ b/src/overlays/ovl_menu/fox_option.c @@ -1318,9 +1318,9 @@ void Option_SoundInit(void) { gVolumeSettings[AUDIO_TYPE_SFX] = 99; } - Audio_SetVolume(0, gVolumeSettings[AUDIO_TYPE_MUSIC]); - Audio_SetVolume(1, gVolumeSettings[AUDIO_TYPE_VOICE]); - Audio_SetVolume(2, gVolumeSettings[AUDIO_TYPE_SFX]); + Audio_SetVolume(AUDIO_TYPE_MUSIC, gVolumeSettings[AUDIO_TYPE_MUSIC]); + Audio_SetVolume(AUDIO_TYPE_VOICE, gVolumeSettings[AUDIO_TYPE_VOICE]); + Audio_SetVolume(AUDIO_TYPE_SFX, gVolumeSettings[AUDIO_TYPE_SFX]); D_menu_801AEB48[0].unk_18 = gVolumeSettings[AUDIO_TYPE_MUSIC] + 146.0f; D_menu_801AEB48[1].unk_18 = gVolumeSettings[AUDIO_TYPE_VOICE] + 146.0f; diff --git a/tools/aifc_decode b/tools/aifc_decode new file mode 100644 index 0000000000000000000000000000000000000000..0f6adb0220878a46ea3cd52c3b76dbb5b9d2beab GIT binary patch literal 22704 zcmeHv4|G&TmiOzVffhqvvl}!DBdtE>OGb!k2QYET*e~h8YwVCHpv)(12uZg@I_XT( zJ%TzIrqc{>JI}!xW{25zcbV_=J3BkeezNCd0sYi;CrX0jI0@<))*TJ5=xYJV1eJh{ zy}w)URj27CXaAl(XU|FHbndHL_g3Ay_tvdj)qkF-_Abw{SOi{jg>MK{YrEONxXgyO zd(8&`mry3m!vC)b^MvWBTN%!1cNqY!Mj6hz6533BE+Fw0(!*8YJOhmpjKU=(NPLr( zbu*0?4h6eWC%$R)Xx6jgcg*>6$lKH7xriCX#r~(^W!9-6aG1$Qx+$wM=*u=-2~(zC zip=?QK0*_pV)7{_ABUqP5DJG}pQICdm6`oz!%|{G;V_$Tv&okY-3FV$A&o(0^{G(P zzh}HUldrSV=qDTQG0*~se7t+XM|%0!7H;PIxSW&NVZgKlho*Xk+XKy;mM*?M(6lJf z+#24xXlvQhMN1c#bOcN8U?PxQ4!p?xD^{%)&`q3h+?+X`MxFOZZ3SjK(SP&O5BIO= zU3B=d_0`EQfARD^&)sw;MKmNg@emCa>dzFB)#>>p}xLxYeT)ixwRqC{HRZ8X$S;@je@_!=i7p|hK>$jd#K*u&>TPwYo)Qi zBh&y)OG9%jF#fjo=GKtEzH##wp(E7Z*wQBWgKfT6!QU7NcAz_7ONTEc_(Q%xK=8Nw zd_)yMdwu=4J6f+`Zt}Ia6MbXbHll235`0^m!TLyhbI1pJjN7<{1~Q}}S!kIq6;^mX zl~wh3lzhEpar)Ug@i_7H^@+zjN|p%qo;5Y~7}fVsb4SS6zNV%s5N!3WY1kB?;T~!U zwwiOTH%PBaNUJs%t2BrGSxuM&%ry2q-NZ~cX$b!uOu*w-=!WKNXodHgxIIt(F_!x@ z;a6t8pt*S#Mf|@v>jznTuJD0b58p`qIl?*Asqp=W+qcei2A8?NaJ=2b+cq*bf#Z37 zm=+)k#U6@9yo_Yvc?_gBJp-S|i2+A5@N+Wo;~990X}oa%qxkMqGw?7#y6nopn<)xw+ns^GHcc%E zdo%Dbbh_-zz~`s2g7C8pyqJMMkb&pEMa@St@Ut`M;~DtOxHgc1|NRX5!3;d@Z&PJT z15+B9(!i7k{(ETPym-?kC3425#HO97#j!IQ59Oo=mB`CB$~*)iwd6*i$5IRC0*Lbk zqTfsnW66`LRBAV?)5bfN97@+IF&IlG(sfD*#*%-VuG5A*mi%eDP8;!9@~L#4HsG=3 zj&z+i-m&Dj(skN!$C3@{I&HLL$$Qgv+F-|$a=K0%>sZp6u2Uj1mb^J#rww*2IXhja zjdd((N!MvZ9ZUZ9OFm!PNHKq2hj#vE6=}yUF#VwZ8IGHo^|M*^Q(5)jWYyows{b;p z{z_K;#jN_@W!3*CtNwqo>VKA1|4~+5%c@7S>fgz#hcoN)1I}a5LzyZ02>XA(yjEVb zcD1tOj18XBq{OTXil9+N?UKgfO3t`n^-7zSSiWCfBl-Pq)h#`&^t&ZGQ-NyMK6D;Q z<%my;Fq9J8Zd26rine6^B5JL86s>wS2J)yc!=1&hO^oU>J4lv+L@!30qQ1h~u1A|+ zJQr8A7bLoJ@Tw=DCvSdlq5`@?u#ue+5==>(W zDh{Xy22&x-j!QN7)h-vKdq7)JwcI0%Q5BEQxS|Fmn^)T}b%Dx@!Q+7aR*CfE)ecJC zs6s?cx(rXk>930Oi4whd>*{2&>n#YWzUw@mdr;a1tXKU=zXOt`#iteGRnO_)`CTdn z9X$CK6b&iaXzE80(|87o*u{ZJ+!7i25?HG0hry+&eI`RiO-*f8sI|hqYV~R{`WQ*b zwPXx)LBEa|m{yKJanK6M5BA;ExuF#{BLfpXE=DELL9poWur^70H+oR5Qu2SGdvU&N z!Vq)_@Tw{O|6S%otOcuhxJx=togY3Zy~$v=)XU%=>176Akd6ZS6LFhAan$A}hBzTG zM`BEj*!_uw&955#ei?+~;m`evUeNd3ETeEc&S7-zhiR#6ziM<{QB^13FGfo+0l&=V zKARpRDZ3c;;VE&_E*?IvEu0;BUlhA)VV%fXi|g}OP^m;k{Y23!S{ITt=x@`E=69lV zLD3$U+S2;90;50o1)uqY=r-n-+F(EYuV@U0I>hK_q7DzgCPM z1FcusbYf7h>3HaqUO! z^{Pif^L5bZEodXNZZw4oq(^}R3i>CPXe!kEZuBl5c1rv(8o2e(o!1SrakgHKCw2A`1z3DQ0&$J{>>Duhm~=I+n1zgJN2Vr{~&y4MOy zq}QTEF4@B;(5W$tYIPK{p=wM955{aDwpV)CtA4C#PfH_)c8vLXwP%s^2!KY2L zr4|1SvmeP-3Ocda(7#x0s9!$;bCH~$*fL2eFAI0c;vuhOD^qM@G>q`cRzkJ&9Vo3v zJw65qmDmV$aLP z<7$86+PcIR}8^q$PTUq~WByWbc z!hq<5nRN+LQvY(*m|~>Q68Yi|F*-tfyLy`RSL9LOVx}P@6TX211{UAy^C+#P2VK+jtS2+q_yp3NXuv zJ!_DhX-j@!j4nPqn0VhB>AgnsLOZoQ%xfV%26oQrRWH0WorL^0kR;^8g7_q*amb|bUtrOgf;1e*%%7^ApA(^9 z*nU5YQ!BN3e@CR%&JS4K6Pv+%e+je2Neea!1vZbQJuFkGevrB`aWEwk%77~PI^#E zsT5?KgruVX$)~iWLz1FkZ*g%tJwj-h`&vNf@t2r})pHTu#*%}8ek*G?dZ{ znlal0095p~=s0-~rO?O}vy!rJ{uXGKe9@bIwA`|jvJyzFXxN7p4F@tvOBvc$y%bKD zWUi!D$PSj0&4MH_=_e2wd2I@O2>heK`F8R?RzjOM-6d~y^T?74u$lvZ&H9qPM@CRWjWH~HAKN&sWS*5=$r^bP2) z2PA@iC!X{lfE}C*(F9S~u>LE)youG88$HdZo?=yY8e+~E2$k5ZTY)nyI6K|nM@Cm9 zJG#2Y=;~Etj-*q62@gN)zQlRfqYnL{qQ0+0J{YZAQ|*j9k3o_l^pcuW^$kJzbblNvG44Op9<7>ShM!04C!PXfhXD(a|`_~dRSF`lbf zjw(Z6h6>QZXB9>Vw$unhqgxO-Ki%haRxARq5Wa1#5~(;2N_g6-P##qKYgF`W&Ov)k zkoD-aX`r)gptz99pL~QJ;yS^|?nBJuzWN1D{KKrb5Tzt*kgDULUq%NHmlsb;S3Gp5 zSnQVS#A2_sQ7m4AeE}P6CwM6P+0Ed7X&-|JnRioG7e_tg7QrnQI^!N>K3Kz88v^ov zj9_!Z+SpfX)TBopR{9f=F~t@QHVX>6SpC*gKq9v5pMF9InQb!-hnbEkQ%=*UQ^-An zHsf+3G@?X~rHn3FUwllK%Y0<^%!X%!UpdBZHpbR6Z*0~p%P??k)=_{Obp-wvtN34p z(&p69-KS^|GSAjf>l-kRz*&96#ZJI9v24D_cP93k2-^i;Zfi8 zY7e`_o<)^|QQ?9_`{?92@u+xFC$Rqar znj970h=CB%0@6~NC0gg5P}F%64z{gGXB2IVYodQIQVyQeTyc*=D#7NXZ#m6%cQ?%q z(SE5Xc0CC|xy@eHdZV}eci{nJHb`oqBPgwxa-09H#PTGsR`4T|r$$?O*{jKAJnqDt zN+e;cj4jJoV$Mo+*>#@sfpAiZEtJ?2^2Rn`3N^S)*kF_Utv{qUmbE&psN-}ZpO7E+ z@v0{>>XEpu-^$*hRAS1wr#ulpqo{g1pHpHObMb6QHV!AZsf%ZO%HtR}(vK5nuhoNu z$OE~QNXiz5{B!`1K%*9>NldMLc>4{6Mv@I5B1aN?>|#%E@+mqD08y6Ci^B79Ev{UV z5Fy&Wh71EPS%54^zx!jPp%b!`{+Ykuuc#N9V^So9*RNI7&zP^Trf_m1$u05|=v6$t z0j}Fea`gGt4F~}Ror<=s4t|=We**(})K}n|+nW?^-9nh3>tB29&GcOhZj}W6yJolH z<*}+akrYUj;szR+#Sx|P z6|c7Nd(pGo=XjCUvW@5ubOd_%p&d6=)y`upV)MEyHTNvxp4j5oSE%bX+@fw@u|g{l zDU0y$juk-v1>ds_Va<{eJmts3r=!QT9i(OTRne0$v~L-L@^_phZ1GScIlp*7w)8Dm z=f$8Kizjl?7XA^ufX+P*9GCJe;RSR~ptN#gJ;*pCkOeYM2sC-xMxtlMCs$!tqJv9e zdM?3_Cgzg79nJbIU@}&WpXEoecVnVj?KkaBZxk5k0o(-AK7q|*4c0Ms2Nw)qV7_^< zN7{>#oyY0A8+RFOAFuN?#&Ny>j)FTn${tAN8=>Nz)mmHXyl9`Z4IZs%#)Xh#o*Ib= zXBFdK0TaRoY;dkqVstySUUE6ldI7L;OMM_N@~Z2R%fLvGtk0wNGNaOQ4ML8&i^r>@ zsV5w#?dMQJaeL^7=-Kf5O5*@|C0b*7-!~e->Zu=~yoyAS;ELX}z&@sQU<#%CG`6*l3A0tuuKDafHQvjs24|CHtls{(J#z6L~o{eApdz;{95JZ^Wrz- z=f!mc-txilDe?B9^WuhAp{9A_3fgERI4VPZ^GK~?(GXpG)QQm_Q{Zi6Xm;L3;Ia0T zOJFR!+Er(4z2R@e@%$0dc< zljHOaSJ(oks5MP7w>o+}(-v|pZI|yu$1tM=n`HqRe)Z zC7%9z#CLm655xLDiYLx~!my#1=u>8h4(~dTqf28+dUE1-o;I#R%eS`62+afkwhSb3ge1sd>U5u+XSh-5H}m z%?QF2U+IFB1>59pxS7x`C(ZZQWp&7d>-5-?;O&C27Mh&D+M|Bq)+&)w3^`LTl6x!v zpWi{tLl@->C;0x1i|F%Mug|+J$1qdeLgVzS-~1E#!nozt9hca-<(3_n*pa37Ex)W5 zJZ7YdDSPX%0FCK9$i z+S&8cDHxHmo47pv1PG8h+U50q#`%eT-U5dJRHw?62BtJHrGY68Ole?B15+B9(!i7k zrZh06fhi44Y2d#^1N7N}1s!)e7IZisT+p#$rhso-2HPEN4ecGxtq(c;&G^zI+7@)o z6xuflk8BcJgCR#lt3&oIU%sfyXm4otH{uJEjlm{gNu#j3waHzzIo!IXBU zV4I`CK|%$520=%-tu5Fd@-+!nwKX;P0x7-di5$?VX~4j4@YA#9B6XT1ULB{^lepiO}Yt&Lv7&@o9oqROvM@fk-{9! z9gd*i5!&o?JklP778`>tZSB4enusH`t<48gM%Nf@4dMH;P;V2a+tAwT3v?`W1Zk>H zj&Mv&lScSwe4Cm>j*f@LUhEx9NY?sH0}sqi-F6e z`xLl3;J92~)Jgwd;7-y282kG)_LI4l`3}umnP1dBZAE_R&gpV~S!9MgztfWYS2;8D z%c}BAAs1*sTbXaK%(uz(A#;5CKv;+V&b*&W4da>mdopKbexXMFbz9x}MLVZ?@=GJr zbN0>5FLGz|lU#H`+5L~H)Puy2LNe|LZWuWFShXRea;1zi$yiM?uFM~`+YZ`qYiP@s|D)Thuid%F4{MxJ9 z!cF5%l_?EOX<$kNQyQ4kz?265?Hb^}pTd7Hg;EbH^cyZz@(f@kTX@E|K3QpV8t?|Q z&VQF>u35+1=&ammLjLwwnS$~h zpwPr;{ss%7Og5pc-XNg#j|$~qR48Aif;YWc!RKgLiJJm)yly^lxmn%^O8TN36+Zq= zMm0S@e4LKW55qB5ywS|+yUhNOo$+?YiO){6`Z}{6-+g0sJ`c0||1`jVk1e~yQZspW znXt};8%@||!cG(JHsL-K9x!3tgo7p=G2y5Q*?|dz+u27Wai%e0sR^^?`j_gqjRuA9 zsk--`jdO1jgyvQpeM{(sZytl`*)Oc9s=CWjw02XtH57I@oh6G)N*6i9tm@o;#~mf5 zi;GRPAe3}$#vw4&ut_MvZ$kOn+k_IFv3(^EwT4UD+HuZq4{ggpZ3;KzSJ#@GOq5*d zSrlq`NMPif8#*=%B~9B}JGQkLFw}0e@OuJAW>)Ia*6s^55QF*D76_3P`2DC7JeE8Z zG#@&AjY3Jtw-r_V3ZyuL|_rJ+wqP|75=t$Qk&$ z<#jqQX7XqMULc)!GK)2{g6DF)GWomB1=zC$3G5>Onx5!vgN-Q z?W9A_&*LM9F0+ATB;9d-9;dzu9Er^NdA#M2$5)WBlCA#+U@3NSejcwlEH(MK{G5(M zx;LR%$m={Fa=6jt&z9dr3*W&5>6G*H_{<@X&wTvs`G3#kuQWU4@t#AzKM+6ZESvu+ z;7BLDe}Ts{6Y_l!B&=lHzZ=+0euv4IhFJ>F>R$M97Qf4kmmG3>WAya)ofdOn7Jr?| z&tc}>4fVnM9fcGMHYWyl|jkj2miwOZ-G1?FTSty{E7e0YPP(* z&f!V$iW&SozjCqL$q9c22`ikB!?VDW@AC0^9>9OEb(EBYLhFwT=i_$#Q{ae%^Yi?w ztd^*8FKB@Df6mY0=V-~~7dD!tbq2iCta8A|<@L*WpuYI{u8l^^ohHA-sHXpC*XgH% kY5dYOh4H}oZ_C0HEtO2j$2MAw|C`M5XL3TbF{>*46S{-gZ2$lO literal 0 HcmV?d00001 diff --git a/tools/aifc_decode.c b/tools/aifc_decode.c new file mode 100644 index 00000000..19d13c6c --- /dev/null +++ b/tools/aifc_decode.c @@ -0,0 +1,669 @@ +/** + * Bruteforcing decoder for converting ADPCM-encoded AIFC into AIFF, in a way + * that roundtrips with vadpcm_enc. + */ +#include +#include +#include +#include +#include +#include +#include + +typedef signed char s8; +typedef short s16; +typedef int s32; +typedef unsigned char u8; +typedef unsigned short u16; +typedef unsigned int u32; +typedef unsigned long long u64; +typedef float f32; + +#define bswap16(x) __builtin_bswap16(x) +#define bswap32(x) __builtin_bswap32(x) +#define BSWAP16(x) x = __builtin_bswap16(x) +#define BSWAP32(x) x = __builtin_bswap32(x) +#define BSWAP16_MANY(x, n) for (s32 _i = 0; _i < n; _i++) BSWAP16((x)[_i]) + +#define NORETURN __attribute__((noreturn)) +#define UNUSED __attribute__((unused)) + +typedef struct { + u32 ckID; + u32 ckSize; +} ChunkHeader; + +typedef struct { + u32 ckID; + u32 ckSize; + u32 formType; +} Chunk; + +typedef struct { + s16 numChannels; + u16 numFramesH; + u16 numFramesL; + s16 sampleSize; + s16 sampleRate[5]; // 80-bit float + u16 compressionTypeH; + u16 compressionTypeL; +} CommonChunk; + +typedef struct { + s16 MarkerID; + u16 positionH; + u16 positionL; +} Marker; + +typedef struct { + s16 playMode; + s16 beginLoop; + s16 endLoop; +} Loop; + +typedef struct { + s8 baseNote; + s8 detune; + s8 lowNote; + s8 highNote; + s8 lowVelocity; + s8 highVelocity; + s16 gain; + Loop sustainLoop; + Loop releaseLoop; +} InstrumentChunk; + +typedef struct { + s32 offset; + s32 blockSize; +} SoundDataChunk; + +typedef struct { + s16 version; + s16 order; + s16 nEntries; +} CodeChunk; + +typedef struct +{ + u32 start; + u32 end; + u32 count; + s16 state[16]; +} ALADPCMloop; + + +static char usage[] = "input.aifc output.aiff"; +static const char *progname, *infilename; + +#define checked_fread(a, b, c, d) if (fread(a, b, c, d) != c) fail_parse("error parsing file") + +NORETURN +void fail_parse(const char *fmt, ...) +{ + char *formatted = NULL; + va_list ap; + va_start(ap, fmt); + int size = vsnprintf(NULL, 0, fmt, ap); + va_end(ap); + if (size >= 0) { + size++; + formatted = malloc(size); + if (formatted != NULL) { + va_start(ap, fmt); + size = vsnprintf(formatted, size, fmt, ap); + va_end(ap); + if (size < 0) { + free(formatted); + formatted = NULL; + } + } + } + + if (formatted != NULL) { + fprintf(stderr, "%s: %s [%s]\n", progname, formatted, infilename); + free(formatted); + } + exit(1); +} + +s32 myrand() +{ + static u64 state = 1619236481962341ULL; + state *= 3123692312231ULL; + state++; + return state >> 33; +} + +s16 qsample(s32 x, s32 scale) +{ + // Compute x / 2^scale rounded to the nearest integer, breaking ties towards zero. + if (scale == 0) return x; + return (x + (1 << (scale - 1)) - (x > 0)) >> scale; +} + +s16 clamp_to_s16(s32 x) +{ + if (x < -0x8000) return -0x8000; + if (x > 0x7fff) return 0x7fff; + return (s16) x; +} + +s32 toi4(s32 x) +{ + if (x >= 8) return x - 16; + return x; +} + +s32 readaifccodebook(FILE *fhandle, s32 ****table, s16 *order, s16 *npredictors) +{ + checked_fread(order, sizeof(s16), 1, fhandle); + BSWAP16(*order); + checked_fread(npredictors, sizeof(s16), 1, fhandle); + BSWAP16(*npredictors); + *table = malloc(*npredictors * sizeof(s32 **)); + for (s32 i = 0; i < *npredictors; i++) { + (*table)[i] = malloc(8 * sizeof(s32 *)); + for (s32 j = 0; j < 8; j++) { + (*table)[i][j] = malloc((*order + 8) * sizeof(s32)); + } + } + + for (s32 i = 0; i < *npredictors; i++) { + s32 **table_entry = (*table)[i]; + for (s32 j = 0; j < *order; j++) { + for (s32 k = 0; k < 8; k++) { + s16 ts; + checked_fread(&ts, sizeof(s16), 1, fhandle); + BSWAP16(ts); + table_entry[k][j] = ts; + } + } + + for (s32 k = 1; k < 8; k++) { + table_entry[k][*order] = table_entry[k - 1][*order - 1]; + } + + table_entry[0][*order] = 1 << 11; + + for (s32 k = 1; k < 8; k++) { + s32 j = 0; + for (; j < k; j++) { + table_entry[j][k + *order] = 0; + } + + for (; j < 8; j++) { + table_entry[j][k + *order] = table_entry[j - k][*order]; + } + } + } + return 0; +} + +ALADPCMloop *readlooppoints(FILE *ifile, s16 *nloops) +{ + checked_fread(nloops, sizeof(s16), 1, ifile); + BSWAP16(*nloops); + ALADPCMloop *al = malloc(*nloops * sizeof(ALADPCMloop)); + for (s32 i = 0; i < *nloops; i++) { + checked_fread(&al[i], sizeof(ALADPCMloop), 1, ifile); + BSWAP32(al[i].start); + BSWAP32(al[i].end); + BSWAP32(al[i].count); + BSWAP16_MANY(al[i].state, 16); + } + return al; +} + +s32 inner_product(s32 length, s32 *v1, s32 *v2) +{ + s32 out = 0; + for (s32 i = 0; i < length; i++) { + out += v1[i] * v2[i]; + } + + // Compute "out / 2^11", rounded down. + s32 dout = out / (1 << 11); + s32 fiout = dout * (1 << 11); + return dout - (out - fiout < 0); +} + +void my_decodeframe(u8 *frame, s32 *state, s32 order, s32 ***coefTable) +{ + s32 ix[16]; + + u8 header = frame[0]; + s32 scale = 1 << (header >> 4); + s32 optimalp = header & 0xf; + + for (s32 i = 0; i < 16; i += 2) { + u8 c = frame[1 + i/2]; + ix[i] = c >> 4; + ix[i + 1] = c & 0xf; + } + + for (s32 i = 0; i < 16; i++) { + if (ix[i] >= 8) ix[i] -= 16; + ix[i] *= scale; + } + + for (s32 j = 0; j < 2; j++) { + s32 in_vec[16]; + if (j == 0) { + for (s32 i = 0; i < order; i++) { + in_vec[i] = state[16 - order + i]; + } + } else { + for (s32 i = 0; i < order; i++) { + in_vec[i] = state[8 - order + i]; + } + } + + for (s32 i = 0; i < 8; i++) { + s32 ind = j * 8 + i; + in_vec[order + i] = ix[ind]; + state[ind] = inner_product(order + i, coefTable[optimalp][i], in_vec) + ix[ind]; + } + } +} + +void my_encodeframe(u8 *out, s16 *inBuffer, s32 *state, s32 ***coefTable, s32 order, s32 npredictors) +{ + s16 ix[16]; + s32 prediction[16]; + s32 inVector[16]; + s32 saveState[16]; + s32 optimalp = 0; + s32 scale; + s32 ie[16]; + s32 e[16]; + f32 min = 1e30; + + for (s32 k = 0; k < npredictors; k++) { + for (s32 j = 0; j < 2; j++) { + for (s32 i = 0; i < order; i++) { + inVector[i] = (j == 0 ? state[16 - order + i] : inBuffer[8 - order + i]); + } + + for (s32 i = 0; i < 8; i++) { + prediction[j * 8 + i] = inner_product(order + i, coefTable[k][i], inVector); + e[j * 8 + i] = inVector[i + order] = inBuffer[j * 8 + i] - prediction[j * 8 + i]; + } + } + + f32 se = 0.0f; + for (s32 j = 0; j < 16; j++) { + se += (f32) e[j] * (f32) e[j]; + } + + if (se < min) { + min = se; + optimalp = k; + } + } + + for (s32 j = 0; j < 2; j++) { + for (s32 i = 0; i < order; i++) { + inVector[i] = (j == 0 ? state[16 - order + i] : inBuffer[8 - order + i]); + } + + for (s32 i = 0; i < 8; i++) { + prediction[j * 8 + i] = inner_product(order + i, coefTable[optimalp][i], inVector); + e[j * 8 + i] = inVector[i + order] = inBuffer[j * 8 + i] - prediction[j * 8 + i]; + } + } + + for (s32 i = 0; i < 16; i++) { + ie[i] = clamp_to_s16(e[i]); + } + + s32 max = 0; + for (s32 i = 0; i < 16; i++) { + if (abs(ie[i]) > abs(max)) { + max = ie[i]; + } + } + + for (scale = 0; scale <= 12; scale++) { + if (max <= 7 && max >= -8) break; + max /= 2; + } + + for (s32 i = 0; i < 16; i++) { + saveState[i] = state[i]; + } + + for (s32 nIter = 0, again = 1; nIter < 2 && again; nIter++) { + again = 0; + if (nIter == 1) scale++; + if (scale > 12) { + scale = 12; + } + + for (s32 j = 0; j < 2; j++) { + s32 base = j * 8; + for (s32 i = 0; i < order; i++) { + inVector[i] = (j == 0 ? + saveState[16 - order + i] : state[8 - order + i]); + } + + for (s32 i = 0; i < 8; i++) { + prediction[base + i] = inner_product(order + i, coefTable[optimalp][i], inVector); + s32 se = inBuffer[base + i] - prediction[base + i]; + ix[base + i] = qsample(se, scale); + s32 cV = clamp_to_s16(ix[base + i]) - ix[base + i]; + if (cV > 1 || cV < -1) again = 1; + ix[base + i] += cV; + inVector[i + order] = ix[base + i] * (1 << scale); + state[base + i] = prediction[base + i] + inVector[i + order]; + } + } + } + + u8 header = (scale << 4) | (optimalp & 0xf); + out[0] = header; + for (s32 i = 0; i < 16; i += 2) { + u8 c = ((ix[i] & 0xf) << 4) | (ix[i + 1] & 0xf); + out[1 + i/2] = c; + } +} + +void permute(s16 *out, s32 *in, s32 scale) +{ + for (s32 i = 0; i < 16; i++) { + out[i] = clamp_to_s16(in[i] - scale / 2 + myrand() % (scale + 1)); + } +} + +void write_header(FILE *ofile, const char *id, s32 size) +{ + fwrite(id, 4, 1, ofile); + BSWAP32(size); + fwrite(&size, sizeof(s32), 1, ofile); +} + +int main(int argc, char **argv) +{ + s16 order = -1; + s16 nloops = 0; + ALADPCMloop *aloops = NULL; + s16 npredictors = -1; + s32 ***coefTable = NULL; + s32 state[16]; + s32 soundPointer = -1; + s32 currPos = 0; + s32 nSamples = 0; + Chunk FormChunk; + ChunkHeader Header; + CommonChunk CommChunk; + InstrumentChunk InstChunk; + SoundDataChunk SndDChunk; + FILE *ifile; + FILE *ofile; + progname = argv[0]; + + if (argc < 3) { + fprintf(stderr, "%s %s\n", progname, usage); + exit(1); + } + + infilename = argv[1]; + + if ((ifile = fopen(infilename, "rb")) == NULL) { + fail_parse("AIFF-C file could not be opened"); + exit(1); + } + + if ((ofile = fopen(argv[2], "wb")) == NULL) { + fprintf(stderr, "%s: output file could not be opened [%s]\n", progname, argv[2]); + exit(1); + } + + memset(&InstChunk, 0, sizeof(InstChunk)); + + checked_fread(&FormChunk, sizeof(FormChunk), 1, ifile); + BSWAP32(FormChunk.ckID); + BSWAP32(FormChunk.formType); + if ((FormChunk.ckID != 0x464f524d) || (FormChunk.formType != 0x41494643)) { // FORM, AIFC + fail_parse("not an AIFF-C file"); + } + + for (;;) { + s32 num = fread(&Header, sizeof(Header), 1, ifile); + u32 ts; + if (num <= 0) break; + BSWAP32(Header.ckID); + BSWAP32(Header.ckSize); + + Header.ckSize++; + Header.ckSize &= ~1; + s32 offset = ftell(ifile); + + switch (Header.ckID) { + case 0x434f4d4d: // COMM + checked_fread(&CommChunk, sizeof(CommChunk), 1, ifile); + BSWAP16(CommChunk.numChannels); + BSWAP16(CommChunk.numFramesH); + BSWAP16(CommChunk.numFramesL); + BSWAP16(CommChunk.sampleSize); + BSWAP16(CommChunk.compressionTypeH); + BSWAP16(CommChunk.compressionTypeL); + s32 cType = (CommChunk.compressionTypeH << 16) + CommChunk.compressionTypeL; + if (cType != 0x56415043) { // VAPC + fail_parse("file is of the wrong compression type"); + } + if (CommChunk.numChannels != 1) { + fail_parse("file contains %d channels, only 1 channel supported", CommChunk.numChannels); + } + if (CommChunk.sampleSize != 16) { + fail_parse("file contains %d bit samples, only 16 bit samples supported", CommChunk.sampleSize); + } + + nSamples = (CommChunk.numFramesH << 16) + CommChunk.numFramesL; + + // Allow broken input lengths + if (nSamples % 16) { + nSamples--; + } + + if (nSamples % 16 != 0) { + fail_parse("number of chunks must be a multiple of 16, found %d", nSamples); + } + break; + + case 0x53534e44: // SSND + checked_fread(&SndDChunk, sizeof(SndDChunk), 1, ifile); + BSWAP32(SndDChunk.offset); + BSWAP32(SndDChunk.blockSize); + assert(SndDChunk.offset == 0); + assert(SndDChunk.blockSize == 0); + soundPointer = ftell(ifile); + break; + + case 0x4150504c: // APPL + checked_fread(&ts, sizeof(u32), 1, ifile); + BSWAP32(ts); + if (ts == 0x73746f63) { // stoc + u8 len; + checked_fread(&len, 1, 1, ifile); + if (len == 11) { + char ChunkName[12]; + s16 version; + checked_fread(ChunkName, 11, 1, ifile); + ChunkName[11] = '\0'; + if (strcmp("VADPCMCODES", ChunkName) == 0) { + checked_fread(&version, sizeof(s16), 1, ifile); + BSWAP16(version); + if (version != 1) { + fail_parse("Unknown codebook chunk version"); + } + readaifccodebook(ifile, &coefTable, &order, &npredictors); + } + else if (strcmp("VADPCMLOOPS", ChunkName) == 0) { + checked_fread(&version, sizeof(s16), 1, ifile); + BSWAP16(version); + if (version != 1) { + fail_parse("Unknown loop chunk version"); + } + aloops = readlooppoints(ifile, &nloops); + if (nloops != 1) { + fail_parse("Only a single loop supported"); + } + } + } + } + break; + } + + fseek(ifile, offset + Header.ckSize, SEEK_SET); + } + + if (coefTable == NULL) { + fail_parse("Codebook missing from bitstream"); + } + + for (s32 i = 0; i < order; i++) { + state[15 - i] = 0; + } + + u32 outputBytes = nSamples * sizeof(s16); + u8 *outputBuf = malloc(outputBytes); + + fseek(ifile, soundPointer, SEEK_SET); + while (currPos < nSamples) { + u8 input[9]; + u8 encoded[9]; + s32 lastState[16]; + s32 decoded[16]; + s16 guess[16]; + s16 origGuess[16]; + + memcpy(lastState, state, sizeof(lastState)); + checked_fread(input, 9, 1, ifile); + + // Decode for real + my_decodeframe(input, state, order, coefTable); + memcpy(decoded, state, sizeof(lastState)); + + // Create a guess from that, by clamping to 16 bits + for (s32 i = 0; i < 16; i++) { + origGuess[i] = clamp_to_s16(state[i]); + } + + // Encode the guess + memcpy(state, lastState, sizeof(lastState)); + memcpy(guess, origGuess, sizeof(guess)); + my_encodeframe(encoded, guess, state, coefTable, order, npredictors); + + // If it doesn't match, randomly round numbers until it does. + if (memcmp(input, encoded, 9) != 0) { + s32 scale = 1 << (input[0] >> 4); + do { + permute(guess, decoded, scale); + memcpy(state, lastState, sizeof(lastState)); + my_encodeframe(encoded, guess, state, coefTable, order, npredictors); + } while (memcmp(input, encoded, 9) != 0); + + // Bring the matching closer to the original decode (not strictly + // necessary, but it will move us closer to the target on average). + for (s32 failures = 0; failures < 50; failures++) { + s32 ind = myrand() % 16; + s32 old = guess[ind]; + if (old == origGuess[ind]) continue; + guess[ind] = origGuess[ind]; + if (myrand() % 2) guess[ind] += (old - origGuess[ind]) / 2; + memcpy(state, lastState, sizeof(lastState)); + my_encodeframe(encoded, guess, state, coefTable, order, npredictors); + if (memcmp(input, encoded, 9) == 0) { + failures = -1; + } + else { + guess[ind] = old; + } + } + } + + memcpy(state, decoded, sizeof(lastState)); + BSWAP16_MANY(guess, 16); + memcpy(outputBuf + currPos * 2, guess, sizeof(guess)); + currPos += 16; + } + + // Write an incomplete file header. We'll fill in the size later. + fwrite("FORM\0\0\0\0AIFF", 12, 1, ofile); + + // Subtract 4 from the COMM size to skip the compression field. + write_header(ofile, "COMM", sizeof(CommonChunk) - 4); + CommChunk.numFramesH = nSamples >> 16; + CommChunk.numFramesL = nSamples & 0xffff; + BSWAP16(CommChunk.numChannels); + BSWAP16(CommChunk.numFramesH); + BSWAP16(CommChunk.numFramesL); + BSWAP16(CommChunk.sampleSize); + fwrite(&CommChunk, sizeof(CommonChunk) - 4, 1, ofile); + + if (nloops > 0) { + s32 startPos = aloops[0].start, endPos = aloops[0].end; + const char *markerNames[2] = {"start", "end"}; + Marker markers[2] = { + {1, startPos >> 16, startPos & 0xffff}, + {2, endPos >> 16, endPos & 0xffff} + }; + write_header(ofile, "MARK", 2 + 2 * sizeof(Marker) + 1 + 5 + 1 + 3); + s16 numMarkers = bswap16(2); + fwrite(&numMarkers, sizeof(s16), 1, ofile); + for (s32 i = 0; i < 2; i++) { + u8 len = (u8) strlen(markerNames[i]); + BSWAP16(markers[i].MarkerID); + BSWAP16(markers[i].positionH); + BSWAP16(markers[i].positionL); + fwrite(&markers[i], sizeof(Marker), 1, ofile); + fwrite(&len, 1, 1, ofile); + fwrite(markerNames[i], len, 1, ofile); + } + + write_header(ofile, "INST", sizeof(InstrumentChunk)); + InstChunk.sustainLoop.playMode = bswap16(1); + InstChunk.sustainLoop.beginLoop = bswap16(1); + InstChunk.sustainLoop.endLoop = bswap16(2); + InstChunk.releaseLoop.playMode = 0; + InstChunk.releaseLoop.beginLoop = 0; + InstChunk.releaseLoop.endLoop = 0; + fwrite(&InstChunk, sizeof(InstrumentChunk), 1, ofile); + } + + // Save the coefficient table for use when encoding. Ideally this wouldn't + // be needed and "tabledesign -s 1" would generate the right table, but in + // practice it's difficult to adjust samples to make that happen. + write_header(ofile, "APPL", 4 + 12 + sizeof(CodeChunk) + npredictors * order * 8 * 2); + fwrite("stoc", 4, 1, ofile); + CodeChunk cChunk; + cChunk.version = bswap16(1); + cChunk.order = bswap16(order); + cChunk.nEntries = bswap16(npredictors); + fwrite("\x0bVADPCMCODES", 12, 1, ofile); + fwrite(&cChunk, sizeof(CodeChunk), 1, ofile); + for (s32 i = 0; i < npredictors; i++) { + for (s32 j = 0; j < order; j++) { + for (s32 k = 0; k < 8; k++) { + s16 ts = bswap16(coefTable[i][k][j]); + fwrite(&ts, sizeof(s16), 1, ofile); + } + } + } + + write_header(ofile, "SSND", outputBytes + 8); + SndDChunk.offset = 0; + SndDChunk.blockSize = 0; + fwrite(&SndDChunk, sizeof(SoundDataChunk), 1, ofile); + fwrite(outputBuf, outputBytes, 1, ofile); + + // Fix the size in the header + s32 fileSize = bswap32(ftell(ofile) - 8); + fseek(ofile, 4, SEEK_SET); + fwrite(&fileSize, 4, 1, ofile); + + fclose(ifile); + fclose(ofile); + return 0; +} diff --git a/tools/disassemble_sound.py b/tools/disassemble_sound.py new file mode 100644 index 00000000..bf82e746 --- /dev/null +++ b/tools/disassemble_sound.py @@ -0,0 +1,867 @@ +#!/usr/bin/env python3 +from collections import namedtuple, defaultdict +import tempfile +import subprocess +import uuid +import json +import os +import re +import struct +import sys + +TYPE_CTL = 1 +TYPE_TBL = 2 + + +class AifcEntry: + def __init__(self, data, book, loop): + self.name = None + self.data = data + self.book = book + self.loop = loop + self.tunings = [] + + +class SampleBank: + def __init__(self, name, data, offset): + self.offset = offset + self.name = name + self.data = data + self.entries = {} + + def add_sample(self, offset, sample_size, book, loop): + assert sample_size % 2 == 0 + if sample_size % 9 != 0: + # print(sample_size) + assert sample_size % 9 == 1 + sample_size -= 1 + + if offset in self.entries: + entry = self.entries[offset] + assert entry.book == book + assert entry.loop == loop + # print(len(entry.data), sample_size) + assert len(entry.data) == sample_size + else: + entry = AifcEntry(self.data[offset : offset + sample_size], book, loop) + self.entries[offset] = entry + + return entry + + +Sound = namedtuple("Sound", ["sample_addr", "tuning"]) +Drum = namedtuple("Drum", ["name", "addr", "release_rate", "pan", "envelope", "sound"]) +Inst = namedtuple( + "Inst", + [ + "name", + "addr", + "release_rate", + "normal_range_lo", + "normal_range_hi", + "envelope", + "sound_lo", + "sound_med", + "sound_hi", + ], +) +Book = namedtuple("Book", ["order", "npredictors", "table"]) +Loop = namedtuple("Loop", ["start", "end", "count", "state"]) +Envelope = namedtuple("Envelope", ["name", "entries"]) +Bank = namedtuple( + "Bank", + [ + "name", + "iso_date", + "sample_bank", + "insts", + "drums", + "all_insts", + "inst_list", + "envelopes", + "samples", + ], +) + + +def align(val, al): + return (val + (al - 1)) & -al + + +name_tbl = {} + + +def gen_name(prefix, name_table=[]): + if prefix not in name_tbl: + name_tbl[prefix] = 0 + ind = name_tbl[prefix] + name_tbl[prefix] += 1 + if ind < len(name_table): + return name_table[ind] + return prefix + str(ind) + + +def parse_bcd(data): + ret = 0 + for c in data: + ret *= 10 + ret += c >> 4 + ret *= 10 + ret += c & 15 + return ret + + +def serialize_f80(num): + num = float(num) + (f64,) = struct.unpack(">Q", struct.pack(">d", num)) + f64_sign_bit = f64 & 2 ** 63 + if num == 0.0: + if f64_sign_bit: + return b"\x80" + b"\0" * 9 + else: + return b"\0" * 10 + exponent = (f64 ^ f64_sign_bit) >> 52 + assert exponent != 0, "can't handle denormals" + assert exponent != 0x7FF, "can't handle infinity/nan" + exponent -= 1023 + f64_mantissa_bits = f64 & (2 ** 52 - 1) + f80_sign_bit = f64_sign_bit << (80 - 64) + f80_exponent = (exponent + 0x3FFF) << 64 + f80_mantissa_bits = 2 ** 63 | (f64_mantissa_bits << (63 - 52)) + f80 = f80_sign_bit | f80_exponent | f80_mantissa_bits + return struct.pack(">HQ", f80 >> 64, f80 & (2 ** 64 - 1)) + + +def round_f32(num): + enc = struct.pack(">f", num) + for decimals in range(5, 20): + num2 = round(num, decimals) + if struct.pack(">f", num2) == enc: + return num2 + return num + + +def parse_sound(data): + sample_addr, tuning = struct.unpack(">If", data) + if sample_addr == 0: + assert tuning == 0 + return None + return Sound(sample_addr, tuning) + + +def parse_drum(data, addr): + name = gen_name("drum") + release_rate, pan, loaded, pad = struct.unpack(">BBBB", data[:4]) + assert loaded == 0 + assert pad == 0 + sound = parse_sound(data[4:12]) + (env_addr,) = struct.unpack(">I", data[12:]) + assert env_addr != 0 + return Drum(name, addr, release_rate, pan, env_addr, sound) + + +def parse_inst(data, addr): + name = gen_name("inst") + loaded, normal_range_lo, normal_range_hi, release_rate, env_addr = struct.unpack( + ">BBBBI", data[:8] + ) + assert env_addr != 0 + sound_lo = parse_sound(data[8:16]) + sound_med = parse_sound(data[16:24]) + sound_hi = parse_sound(data[24:]) + if sound_lo is None: + assert normal_range_lo == 0 + if sound_hi is None: + assert normal_range_hi == 127 + return Inst( + name, + addr, + release_rate, + normal_range_lo, + normal_range_hi, + env_addr, + sound_lo, + sound_med, + sound_hi, + ) + + +def parse_loop(addr, bank_data): + start, end, count, pad = struct.unpack(">IIiI", bank_data[addr : addr + 16]) + assert pad == 0 + if count != 0: + state = struct.unpack(">16h", bank_data[addr + 16 : addr + 48]) + else: + state = None + return Loop(start, end, count, state) + + +def parse_book(addr, bank_data): + order, npredictors = struct.unpack(">ii", bank_data[addr : addr + 8]) + + assert order == 2 + # assert npredictors == 2 + # if (npredictors != 2): + # print(addr, order, npredictors) + table_data = bank_data[addr + 8 : addr + 8 + 16 * order * npredictors] + table = [] + for i in range(0, 16 * order * npredictors, 2): + table.append(struct.unpack(">h", table_data[i : i + 2])[0]) + return Book(order, npredictors, table) + + +def parse_sample(data, bank_data, sample_bank, is_shindou): + if is_shindou: + sample_size, addr, loop, book = struct.unpack(">IIII", data) + sample_size &= 0xFFFFFF + else: + zero, addr, loop, book, sample_size = struct.unpack(">IIIII", data) + assert zero == 0 + assert loop != 0 + print(sample_size, addr, loop, book) + assert book != 0 + loop = parse_loop(loop, bank_data) + book = parse_book(book, bank_data) + + return sample_bank.add_sample(addr, sample_size, book, loop) + + +def parse_envelope(addr, data_bank): + entries = [] + while True: + delay, arg = struct.unpack(">HH", data_bank[addr : addr + 4]) + entries.append((delay, arg)) + addr += 4 + if 1 <= (-delay) % 2 ** 16 <= 3: + break + return entries + + +def parse_ctl_header(header): + num_instruments, num_drums, shared = struct.unpack(">III", header[:12]) + date = parse_bcd(header[12:]) + y = date // 10000 + m = date // 100 % 100 + d = date % 100 + iso_date = "{:02}-{:02}-{:02}".format(y, m, d) + assert shared in [0, 1] + return num_instruments, num_drums, iso_date + + +def parse_ctl(parsed_header, data, sample_bank, index, is_shindou): + name_tbl.clear() + name = "{:02X}".format(index) + num_instruments, num_drums, iso_date = parsed_header + print("{}: {}, {} + {}".format(name, iso_date, num_instruments, num_drums)) + # print(len(data)) + + (drum_base_addr,) = struct.unpack(">I", data[:4]) + drum_addrs = [] + if num_drums != 0: + assert drum_base_addr != 0 + for i in range(num_drums): + (drum_addr,) = struct.unpack( + ">I", data[drum_base_addr + i * 4 : drum_base_addr + i * 4 + 4] + ) + # assert drum_addr != 0 + # print(i, drum_addr) + if(drum_addr == 0): + continue + drum_addrs.append(drum_addr) + else: + assert drum_base_addr == 0 + + inst_base_addr = 4 + inst_addrs = [] + inst_list = [] + for i in range(num_instruments): + (inst_addr,) = struct.unpack( + ">I", data[inst_base_addr + i * 4 : inst_base_addr + i * 4 + 4] + ) + if inst_addr == 0: + inst_list.append(None) + else: + inst_list.append(inst_addr) + inst_addrs.append(inst_addr) + + inst_addrs.sort() + assert drum_addrs == sorted(drum_addrs) + if drum_addrs and inst_addrs: + assert max(inst_addrs) < min(drum_addrs) + + # print(inst_addrs) + + if len(set(inst_addrs)) != len(inst_addrs): + print(index) + # assert len(set(inst_addrs)) == len(inst_addrs) + # assert len(set(drum_addrs)) == len(drum_addrs) + + insts = [] + for inst_addr in inst_addrs: + insts.append(parse_inst(data[inst_addr : inst_addr + 32], inst_addr)) + + drums = [] + for drum_addr in drum_addrs: + drums.append(parse_drum(data[drum_addr : drum_addr + 16], drum_addr)) + + env_addrs = set() + sample_addrs = set() + tunings = defaultdict(lambda: []) + for inst in insts: + for sound in [inst.sound_lo, inst.sound_med, inst.sound_hi]: + if sound is not None: + sample_addrs.add(sound.sample_addr) + tunings[sound.sample_addr].append(sound.tuning) + env_addrs.add(inst.envelope) + for drum in drums: + sample_addrs.add(drum.sound.sample_addr) + tunings[drum.sound.sample_addr].append(drum.sound.tuning) + env_addrs.add(drum.envelope) + + # Put drums somewhere in the middle of the instruments to make sample + # addresses come in increasing order. (This logic isn't totally right, + # but it works for our purposes.) + all_insts = [] + need_drums = len(drums) > 0 + for inst in insts: + if need_drums and any( + s.sample_addr > drums[0].sound.sample_addr + for s in [inst.sound_lo, inst.sound_med, inst.sound_hi] + if s is not None + ): + all_insts.append(drums) + need_drums = False + all_insts.append(inst) + + if need_drums: + all_insts.append(drums) + + samples = {} + + for addr in sorted(sample_addrs): + sample_size = 16 if is_shindou else 20 + sample_data = data[addr : addr + sample_size] + print("\t\t", addr) + samples[addr] = parse_sample(sample_data, data, sample_bank, is_shindou) + samples[addr].tunings.extend(tunings[addr]) + + env_data = {} + used_env_addrs = set() + for addr in sorted(env_addrs): + env = parse_envelope(addr, data) + env_data[addr] = env + for i in range(align(len(env), 4)): + used_env_addrs.add(addr + i * 4) + + # Unused envelopes + unused_envs = set() + if used_env_addrs: + for addr in range(min(used_env_addrs) + 4, max(used_env_addrs), 4): + if addr not in used_env_addrs: + unused_envs.add(addr) + (stub_marker,) = struct.unpack(">I", data[addr : addr + 4]) + assert stub_marker == 0 + env = parse_envelope(addr, data) + env_data[addr] = env + for i in range(align(len(env), 4)): + used_env_addrs.add(addr + i * 4) + + envelopes = {} + for addr in sorted(env_data.keys()): + env_name = gen_name("envelope") + if addr in unused_envs: + env_name += "_unused" + envelopes[addr] = Envelope(env_name, env_data[addr]) + + return Bank( + name, + iso_date, + sample_bank, + insts, + drums, + all_insts, + inst_list, + envelopes, + samples, + ) + + +def parse_seqfile(data, filetype): + magic, num_entries = struct.unpack(">HH", data[:4]) + assert magic == filetype + prev = align(4 + num_entries * 8, 16) + entries = [] + for i in range(num_entries): + offset, length = struct.unpack(">II", data[4 + i * 8 : 4 + i * 8 + 8]) + if filetype == TYPE_CTL: + assert offset == prev + else: + assert offset <= prev + prev = max(prev, offset + length) + entries.append((offset, length)) + assert all(x == 0 for x in data[prev:]) + return entries + + +def parse_sh_header(data, filetype): + (num_entries,) = struct.unpack(">H", data[:2]) + assert data[2:16] == b"\0" * 14 + prev = 0 + entries = [] + for i in range(num_entries): + subdata = data[16 + 16 * i : 32 + 16 * i] + offset, length, magic = struct.unpack(">IIH", subdata[:10]) + assert offset == prev + # assert magic == (0x0204 if filetype == TYPE_TBL else 0x0203) + prev = offset + length + if filetype == TYPE_CTL: + assert subdata[14:16] == b"\0" * 2 + sample_bank_index, magic2, num_instruments, num_drums = struct.unpack( + ">BBBB", subdata[10:14] + ) + assert magic2 == 0xFF + # num_drums >>= 4 + entries.append( + (offset, length, (sample_bank_index, num_instruments, num_drums)) + ) + else: + assert subdata[10:16] == b"\0" * 6 + entries.append((offset, length)) + return entries + + +def parse_tbl(data, entries): + seen = {} + tbls = [] + sample_banks = [] + sample_bank_map = {} + for (offset, length) in entries: + if offset not in seen: + name = gen_name("sample_bank") + seen[offset] = name + sample_bank = SampleBank(name, data[offset : offset + length], offset) + sample_banks.append(sample_bank) + sample_bank_map[name] = sample_bank + tbls.append(seen[offset]) + return tbls, sample_banks, sample_bank_map + + +class AifcWriter: + def __init__(self, out): + self.out = out + self.sections = [] + self.total_size = 0 + + def add_section(self, tp, data): + assert isinstance(tp, bytes) + assert isinstance(data, bytes) + self.sections.append((tp, data)) + self.total_size += align(len(data), 2) + 8 + + def add_custom_section(self, tp, data): + self.add_section(b"APPL", b"stoc" + self.pstring(tp) + data) + + def pstring(self, data): + return bytes([len(data)]) + data + (b"" if len(data) % 2 else b"\0") + + def finish(self): + # total_size isn't used, and is regularly wrong. In particular, vadpcm_enc + # preserves the size of the input file... + self.total_size += 4 + self.out.write(b"FORM" + struct.pack(">I", self.total_size) + b"AIFC") + for (tp, data) in self.sections: + self.out.write(tp + struct.pack(">I", len(data))) + self.out.write(data) + if len(data) % 2: + self.out.write(b"\0") + + +def write_aifc(entry, out): + writer = AifcWriter(out) + num_channels = 1 + data = entry.data + assert len(data) % 9 == 0 + if len(data) % 2 == 1: + data += b"\0" + # (Computing num_frames this way makes it off by one when the data length + # is odd. It matches vadpcm_enc, though.) + num_frames = len(data) * 16 // 9 + sample_size = 16 # bits per sample + + if len(set(entry.tunings)) == 1: + sample_rate = 32000 * entry.tunings[0] + else: + # Some drum sounds in sample bank B don't have unique sample rates, so + # we have to guess. This doesn't matter for matching, it's just to make + # the sounds easy to listen to. + if min(entry.tunings) <= 0.5 <= max(entry.tunings): + sample_rate = 16000 + elif min(entry.tunings) <= 1.0 <= max(entry.tunings): + sample_rate = 32000 + elif min(entry.tunings) <= 1.5 <= max(entry.tunings): + sample_rate = 48000 + elif min(entry.tunings) <= 2.5 <= max(entry.tunings): + sample_rate = 80000 + else: + sample_rate = 16000 * (min(entry.tunings) + max(entry.tunings)) + + writer.add_section( + b"COMM", + struct.pack(">hIh", num_channels, num_frames, sample_size) + + serialize_f80(sample_rate) + + b"VAPC" + + writer.pstring(b"VADPCM ~4-1"), + ) + writer.add_section(b"INST", b"\0" * 20) + table_data = b"".join(struct.pack(">h", x) for x in entry.book.table) + writer.add_custom_section( + b"VADPCMCODES", + struct.pack(">hhh", 1, entry.book.order, entry.book.npredictors) + table_data, + ) + writer.add_section(b"SSND", struct.pack(">II", 0, 0) + data) + if entry.loop.count != 0: + writer.add_custom_section( + b"VADPCMLOOPS", + struct.pack( + ">HHIIi16h", + 1, + 1, + entry.loop.start, + entry.loop.end, + entry.loop.count, + *entry.loop.state + ), + ) + writer.finish() + + +def write_aiff(entry, filename): + temp = tempfile.NamedTemporaryFile(suffix=".aifc", delete=False) + try: + write_aifc(entry, temp) + temp.flush() + temp.close() + aifc_decode = os.path.join(os.path.dirname(__file__), "aifc_decode") + subprocess.run([aifc_decode, temp.name, filename], check=True) + finally: + temp.close() + os.remove(temp.name) + + +# Modified from https://stackoverflow.com/a/25935321/1359139, cc by-sa 3.0 +class NoIndent(object): + def __init__(self, value): + self.value = value + + +class NoIndentEncoder(json.JSONEncoder): + def __init__(self, *args, **kwargs): + super(NoIndentEncoder, self).__init__(*args, **kwargs) + self._replacement_map = {} + + def default(self, o): + def ignore_noindent(o): + if isinstance(o, NoIndent): + return o.value + return self.default(o) + + if isinstance(o, NoIndent): + key = uuid.uuid4().hex + self._replacement_map[key] = json.dumps(o.value, default=ignore_noindent) + return "@@%s@@" % (key,) + else: + return super(NoIndentEncoder, self).default(o) + + def encode(self, o): + result = super(NoIndentEncoder, self).encode(o) + repl_map = self._replacement_map + + def repl(m): + key = m.group()[3:-3] + return repl_map[key] + + return re.sub(r"\"@@[0-9a-f]*?@@\"", repl, result) + + +def inst_ifdef_json(bank_index, inst_index): + if bank_index == 7 and inst_index >= 13: + return NoIndent(["VERSION_US", "VERSION_EU"]) + if bank_index == 8 and inst_index >= 16: + return NoIndent(["VERSION_US", "VERSION_EU"]) + if bank_index == 10 and inst_index >= 14: + return NoIndent(["VERSION_US", "VERSION_EU"]) + return None + + +def main(): + args = [] + need_help = False + only_samples = False + only_samples_list = [] + shindou_headers = None + if sys.argv[1].startswith("files"): + with open(sys.argv[2], "rb") as ctl_file, open(sys.argv[3], "rb") as tbl_file, \ + open(sys.argv[4], "rb") as header_file: + + ctl_data = ctl_file.read() + tbl_data = tbl_file.read() + if sys.argv[1].endswith("jp"): + header_start = 0xC1360 - 0x1050 + elif sys.argv[1].endswith("eu"): + header_start = 0xC4D20 - 0x1050 + else: + header_start = 0xC4210 - 0x1050 + header_file.seek(header_start) + hlen = int.from_bytes(header_file.read(2), "big") + header_file.seek(-2, 1) + tbl_header_data = header_file.read((1 + hlen) * 0x10) + hlen = int.from_bytes(header_file.read(2), "big") + header_file.seek(hlen * 0x10 + 0xE, 1) + hlen = int.from_bytes(header_file.read(2), "big") + header_file.seek(-2, 1) + ctl_header_data = header_file.read((1 + hlen) * 0x10) + + shindou_headers = True + samples_out_dir = sys.argv[5] + banks_out_dir = sys.argv[6] + else: + skip_next = 0 + for i, a in enumerate(sys.argv[1:], 1): + if skip_next > 0: + skip_next -= 1 + continue + if a == "--help" or a == "-h": + need_help = True + elif a == "--only-samples": + only_samples = True + elif a == "--shindou-headers": + shindou_headers = sys.argv[i + 1 : i + 5] + skip_next = 4 + elif a.startswith("-"): + print("Unrecognized option " + a) + sys.exit(1) + elif only_samples: + only_samples_list.append(a) + else: + args.append(a) + + expected_num_args = 5 + (0 if only_samples else 2) + if ( + need_help + or len(args) != expected_num_args + or (shindou_headers and len(shindou_headers) != 4) + ): + print( + "Usage: {}" + " <.z64 rom> " + " [--shindou-headers " + " ]" + " ( |" + " --only-samples file:index ...)".format(sys.argv[0]) + ) + sys.exit(0 if need_help else 1) + + rom_file = open(args[0], "rb") + + def read_at(offset, size): + rom_file.seek(int(offset)) + return rom_file.read(int(size)) + + ctl_data = read_at(args[1], args[2]) + tbl_data = read_at(args[3], args[4]) + + ctl_header_data = None + tbl_header_data = None + if shindou_headers: + ctl_header_data = read_at(shindou_headers[0], shindou_headers[1]) + tbl_header_data = read_at(shindou_headers[2], shindou_headers[3]) + + if not only_samples: + samples_out_dir = args[5] + banks_out_dir = args[6] + + banks = [] + + if shindou_headers: + ctl_entries = parse_sh_header(ctl_header_data, TYPE_CTL) + tbl_entries = parse_sh_header(tbl_header_data, TYPE_TBL) + + sample_banks = parse_tbl(tbl_data, tbl_entries)[1] + print(len(ctl_entries)) + for index, (offset, length, sh_meta) in enumerate(ctl_entries): + sample_bank = sample_banks[sh_meta[0]] + entry = ctl_data[offset : offset + length] + header = (sh_meta[1], sh_meta[2], "0000-00-00") + banks.append(parse_ctl(header, entry, sample_bank, index, True)) + else: + ctl_entries = parse_seqfile(ctl_data, TYPE_CTL) + tbl_entries = parse_seqfile(tbl_data, TYPE_TBL) + assert len(ctl_entries) == len(tbl_entries) + + tbls, sample_banks, sample_bank_map = parse_tbl(tbl_data, tbl_entries) + + for index, (offset, length), sample_bank_name in zip( + range(len(ctl_entries)), ctl_entries, tbls + ): + sample_bank = sample_bank_map[sample_bank_name] + entry = ctl_data[offset : offset + length] + header = parse_ctl_header(entry[:16]) + banks.append(parse_ctl(header, entry[16:], sample_bank, index, False)) + + # Special mode used for asset extraction: generate aifc files, with paths + # given by command line arguments + if only_samples: + index_to_filename = {} + created_dirs = set() + for arg in only_samples_list: + filename, index = arg.rsplit(":", 1) + index_to_filename[int(index)] = filename + index = -1 + for sample_bank in sample_banks: + offsets = sorted(set(sample_bank.entries.keys())) + for offset in offsets: + entry = sample_bank.entries[offset] + index += 1 + if index in index_to_filename: + filename = index_to_filename[index] + dir = os.path.dirname(filename) + if dir not in created_dirs: + os.makedirs(dir, exist_ok=True) + created_dirs.add(dir) + write_aiff(entry, filename) + return + + # Generate aiff files + + for sample_bank in sample_banks: + dir = os.path.join(samples_out_dir, sample_bank.name) + os.makedirs(dir, exist_ok=True) + + offsets = sorted(set(sample_bank.entries.keys())) + print(sample_bank.name, len(offsets), 'entries') + offsets.append(len(sample_bank.data)) + + assert 0 in offsets + + for offset, next_offset, index in zip( + offsets, offsets[1:], range(len(offsets)) + ): + entry = sample_bank.entries[offset] + entry.name = "{:02X}".format(index) + size = next_offset - offset + + assert size % 16 == 0 + if not (size - 15 <= len(entry.data) <= size): + print(index, offset, size, len(entry.data)) + # continue + # assert size - 15 <= len(entry.data) <= size + # if index % 10 == 0: + # print(index, offset, size, len(entry.data)) + if index == 299 or index == 554 or index == 912: + # print(index, offset, size, len(entry.data)) + continue + # garbage = sample_bank.data[offset + len(entry.data) : offset + size] + # if len(entry.data) % 2 == 1: + # assert garbage[0] == 0 + # if next_offset != offsets[-1]: + # # (The last chunk follows a more complex garbage pattern) + # assert all(x == 0 for x in garbage) + filename = os.path.join(dir, entry.name + ".aiff") + write_aiff(entry, filename) + + # Generate sound bank .json files + os.makedirs(banks_out_dir, exist_ok=True) + for bank_index, bank in enumerate(banks): + filename = os.path.join(banks_out_dir, bank.name + ".json") + with open(filename, "w") as out: + + def sound_to_json(sound): + entry = bank.samples[sound.sample_addr] + if len(set(entry.tunings)) == 1: + return entry.name + return {"sample": entry.name, "tuning": round_f32(sound.tuning)} + + bank_json = { + "date": bank.iso_date, + "sample_bank": bank.sample_bank.name, + "envelopes": {}, + "instruments": {}, + "instrument_list": [], + } + addr_to_name = {} + + # Envelopes + for env in bank.envelopes.values(): + env_json = [] + for (delay, arg) in env.entries: + if delay == 0: + ins = "stop" + assert arg == 0 + elif delay == 2 ** 16 - 1: + ins = "hang" + assert arg == 0 + elif delay == 2 ** 16 - 2: + ins = ["goto", arg] + elif delay == 2 ** 16 - 3: + ins = "restart" + assert arg == 0 + else: + ins = [delay, arg] + env_json.append(NoIndent(ins)) + bank_json["envelopes"][env.name] = env_json + + # Instruments/drums + for inst_index, inst in enumerate(bank.all_insts): + if isinstance(inst, Inst): + inst_json = { + "ifdef": inst_ifdef_json(bank_index, inst_index), + "release_rate": inst.release_rate, + "normal_range_lo": inst.normal_range_lo, + "normal_range_hi": inst.normal_range_hi, + "envelope": bank.envelopes[inst.envelope].name, + } + + if inst_json["ifdef"] is None: + del inst_json["ifdef"] + + if inst.sound_lo is not None: + inst_json["sound_lo"] = NoIndent(sound_to_json(inst.sound_lo)) + else: + del inst_json["normal_range_lo"] + + inst_json["sound"] = NoIndent(sound_to_json(inst.sound_med)) + + if inst.sound_hi is not None: + inst_json["sound_hi"] = NoIndent(sound_to_json(inst.sound_hi)) + else: + del inst_json["normal_range_hi"] + + bank_json["instruments"][inst.name] = inst_json + addr_to_name[inst.addr] = inst.name + + else: + assert isinstance(inst, list) + drums_list_json = [] + for drum in inst: + drum_json = { + "release_rate": drum.release_rate, + "pan": drum.pan, + "envelope": bank.envelopes[drum.envelope].name, + "sound": sound_to_json(drum.sound), + } + drums_list_json.append(NoIndent(drum_json)) + bank_json["instruments"]["percussion"] = drums_list_json + + # Instrument lists + for addr in bank.inst_list: + if addr is None: + bank_json["instrument_list"].append(None) + else: + bank_json["instrument_list"].append(addr_to_name[addr]) + + out.write(json.dumps(bank_json, indent=4, cls=NoIndentEncoder)) + out.write("\n") + + +if __name__ == "__main__": + main() From 0251769d1699b7f4bc7a6f05de6f52cf2ca4f29a Mon Sep 17 00:00:00 2001 From: Alejandro Asenjo Nitti <96613413+sonicdcer@users.noreply.github.com> Date: Mon, 12 Aug 2024 11:58:54 -0300 Subject: [PATCH 129/151] General docs (#269) * fox_display.c DOCS * PRINTF * actor->destroy boolean * corneria docs * Boss->unk_04C to Boss->animFrame * aCoGrangaWalkingAnim * more corneria docs * Spawner * Spawner code refined * Spawner description * Actor Spawn guard * Molar Rock (name by @inspectredc) * more docs * actor docs * initial disassembly config for lodgenet * correct vram addresses for lodgenet * Actor Docs * More actor docs * more actor docs * correction * correction * more actor docs * Preliminary work for Effect documentation * Change Init for Setup * fox_play cleanup and defake * fox_zo function names * fox_so function renaming * more object docs * venom 1 actors * actor docs * some fox_bo docs * some fox_fo corrections * fox_ma obj->this * fox_ma renamings * fox_ma docs * fox_ti Actors * revert permuter settings to ido * some renames on fox_andross.c * fox_sy actors * object names * corrections * some effect comments * fix AudioTable struct and data to avoid UB * uintptr_t in audio * audio load changes * event id enum usage in fox_sy * clear padding in sPlaylists * HUD_FoBase_ExplodeCs * HUD --- .vscode/settings.json | 3 +- Makefile | 2 +- assets/yaml/jp/rev0/ast_7_ti_1.yaml | 32 +- assets/yaml/jp/rev0/ast_allies.yaml | 36 +- assets/yaml/jp/rev0/ast_andross.yaml | 20 +- assets/yaml/jp/rev0/ast_aquas.yaml | 180 +- assets/yaml/jp/rev0/ast_area_6.yaml | 4 +- assets/yaml/jp/rev0/ast_arwing.yaml | 4 +- assets/yaml/jp/rev0/ast_bolse.yaml | 52 +- assets/yaml/jp/rev0/ast_common.yaml | 48 +- assets/yaml/jp/rev0/ast_corneria.yaml | 36 +- assets/yaml/jp/rev0/ast_fortuna.yaml | 44 +- assets/yaml/jp/rev0/ast_katina.yaml | 12 +- assets/yaml/jp/rev0/ast_landmaster.yaml | 8 +- assets/yaml/jp/rev0/ast_macbeth.yaml | 232 +- assets/yaml/jp/rev0/ast_meteo.yaml | 52 +- assets/yaml/jp/rev0/ast_sector_x.yaml | 12 +- assets/yaml/jp/rev0/ast_sector_y.yaml | 80 +- assets/yaml/jp/rev0/ast_sector_z.yaml | 16 +- assets/yaml/jp/rev0/ast_titania.yaml | 44 +- assets/yaml/jp/rev0/ast_training.yaml | 8 +- assets/yaml/jp/rev0/ast_ve1_boss.yaml | 32 +- assets/yaml/jp/rev0/ast_venom_1.yaml | 76 +- assets/yaml/jp/rev0/ast_venom_2.yaml | 36 +- assets/yaml/jp/rev0/ast_versus.yaml | 84 +- assets/yaml/jp/rev0/ast_zoness.yaml | 88 +- assets/yaml/us/rev1/ast_7_ti_1.yaml | 32 +- assets/yaml/us/rev1/ast_allies.yaml | 36 +- assets/yaml/us/rev1/ast_andross.yaml | 20 +- assets/yaml/us/rev1/ast_aquas.yaml | 180 +- assets/yaml/us/rev1/ast_area_6.yaml | 4 +- assets/yaml/us/rev1/ast_arwing.yaml | 4 +- assets/yaml/us/rev1/ast_bolse.yaml | 52 +- assets/yaml/us/rev1/ast_common.yaml | 48 +- assets/yaml/us/rev1/ast_corneria.yaml | 36 +- assets/yaml/us/rev1/ast_fortuna.yaml | 44 +- assets/yaml/us/rev1/ast_katina.yaml | 12 +- assets/yaml/us/rev1/ast_landmaster.yaml | 8 +- assets/yaml/us/rev1/ast_macbeth.yaml | 232 +- assets/yaml/us/rev1/ast_meteo.yaml | 52 +- assets/yaml/us/rev1/ast_sector_x.yaml | 12 +- assets/yaml/us/rev1/ast_sector_y.yaml | 80 +- assets/yaml/us/rev1/ast_sector_z.yaml | 16 +- assets/yaml/us/rev1/ast_titania.yaml | 44 +- assets/yaml/us/rev1/ast_training.yaml | 8 +- assets/yaml/us/rev1/ast_ve1_boss.yaml | 32 +- assets/yaml/us/rev1/ast_venom_1.yaml | 76 +- assets/yaml/us/rev1/ast_venom_2.yaml | 36 +- assets/yaml/us/rev1/ast_versus.yaml | 84 +- assets/yaml/us/rev1/ast_zoness.yaml | 88 +- include/context.h | 20 +- include/fox_co.h | 50 +- include/functions.h | 142 +- include/global.h | 16 +- include/i1.h | 72 +- include/i2.h | 44 +- include/i3.h | 196 +- include/i4.h | 24 +- include/i5.h | 154 +- include/i6.h | 52 +- include/mods.h | 39 +- include/sf64audio_provisional.h | 122 +- include/sf64object.h | 1132 +-- include/sf64player.h | 32 +- include/sfx.h | 6 +- include/sys.h | 2 +- include/variables.h | 6 +- linker_scripts/ln/rev0/symbol_addrs.txt | 8 + .../us/rev1/symbol_addrs_assets.txt | 4 +- .../us/rev1/symbol_addrs_engine.txt | 70 +- .../us/rev1/symbol_addrs_overlays.txt | 128 +- src/audio/audio_general.c | 129 +- src/audio/audio_heap.c | 4 +- src/audio/audio_load.c | 162 +- src/audio/audio_synthesis.c | 10 +- src/audio/audio_tables.c | 158 +- src/engine/fox_360.c | 54 +- src/engine/fox_beam.c | 221 +- src/engine/fox_bg.c | 4 +- src/engine/fox_boss.c | 8 +- src/engine/fox_context.c | 20 +- src/engine/fox_demo.c | 43 +- src/engine/fox_display.c | 371 +- src/engine/fox_edata.c | 6 +- src/engine/fox_edata_info.c | 582 +- src/engine/fox_edisplay.c | 109 +- src/engine/fox_effect.c | 313 +- src/engine/fox_enmy.c | 465 +- src/engine/fox_enmy2.c | 296 +- src/engine/fox_fade.c | 2 +- src/engine/fox_game.c | 36 +- src/engine/fox_hud.c | 1147 +-- src/engine/fox_play.c | 1157 +++- src/engine/fox_radio.c | 2 +- src/engine/fox_tank.c | 99 +- src/engine/fox_versus.c | 2 +- src/mods/spawner.c | 458 ++ src/overlays/ovl_ending/fox_end2.c | 2 +- src/overlays/ovl_i1/fox_co.c | 872 +-- src/overlays/ovl_i1/fox_ve1.c | 959 +-- src/overlays/ovl_i2/fox_me.c | 148 +- src/overlays/ovl_i2/fox_sx.c | 217 +- src/overlays/ovl_i3/fox_a6.c | 78 +- src/overlays/ovl_i3/fox_aq.c | 4049 ++++++----- src/overlays/ovl_i3/fox_so.c | 423 +- src/overlays/ovl_i3/fox_zo.c | 623 +- src/overlays/ovl_i4/fox_bo.c | 753 +- src/overlays/ovl_i4/fox_fo.c | 76 +- src/overlays/ovl_i4/fox_i4.c | 48 +- src/overlays/ovl_i4/fox_ka.c | 108 +- src/overlays/ovl_i4/fox_sz.c | 68 +- src/overlays/ovl_i5/fox_ground.c | 23 +- src/overlays/ovl_i5/fox_ma.c | 6154 ++++++++++------- src/overlays/ovl_i5/fox_ti.c | 3553 +++++----- src/overlays/ovl_i5/fox_ti_cs.c | 114 +- src/overlays/ovl_i6/fox_andross.c | 3354 +++++---- src/overlays/ovl_i6/fox_sy.c | 414 +- src/overlays/ovl_i6/fox_turret.c | 3 + src/overlays/ovl_i6/fox_ve2.c | 37 +- src/overlays/ovl_menu/fox_map.c | 2 +- src/overlays/ovl_menu/fox_title.c | 2 +- src/overlays/ovl_unused/fox_unused.c | 2 +- yamls/ln/rev0/assets.yaml | 0 yamls/ln/rev0/header.yaml | 77 + yamls/ln/rev0/main.yaml | 156 + yamls/ln/rev0/overlays.yaml | 0 126 files changed, 18075 insertions(+), 14894 deletions(-) create mode 100644 linker_scripts/ln/rev0/symbol_addrs.txt create mode 100644 src/mods/spawner.c create mode 100644 yamls/ln/rev0/assets.yaml create mode 100644 yamls/ln/rev0/header.yaml create mode 100644 yamls/ln/rev0/main.yaml create mode 100644 yamls/ln/rev0/overlays.yaml diff --git a/.vscode/settings.json b/.vscode/settings.json index da4e8b6a..da500595 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -149,7 +149,8 @@ "sf64dma.h": "c", "string": "c", "prevent_bss_reordering3.h": "c", - "ast_a_ti.h": "c" + "ast_a_ti.h": "c", + "fox_co.h": "c" }, "C_Cpp_Runner.msvcBatchPath": "" } \ No newline at end of file diff --git a/Makefile b/Makefile index cf1eab79..81ce5d49 100644 --- a/Makefile +++ b/Makefile @@ -99,7 +99,7 @@ else # we support Microsoft extensions such as anonymous structs, which the compiler does support but warns for their usage. Surpress the warnings with -woff. CFLAGS += -G 0 -non_shared -fullwarn -verbose -Xcpluscomm $(IINC) -nostdinc -Wab,-r4300_mul -woff 649,838,712,516 MIPS_VERSION := -mips2 - WARNINGS := -fullwarn -verbose -woff 624,649,838,712,516,513,596,564,594,709 + WARNINGS := -fullwarn -verbose -woff 624,649,838,712,516,513,596,564,594,709,807 endif ifeq ($(COMPILER),ido) diff --git a/assets/yaml/jp/rev0/ast_7_ti_1.yaml b/assets/yaml/jp/rev0/ast_7_ti_1.yaml index e1f11466..3d70040b 100644 --- a/assets/yaml/jp/rev0/ast_7_ti_1.yaml +++ b/assets/yaml/jp/rev0/ast_7_ti_1.yaml @@ -89,8 +89,8 @@ D_TI1_7005420: D_TI1_70067C4: { type: SF64:ANIM, offset: 0x70067C4, symbol: D_TI1_70067C4 } -D_TI1_7006990: - { type: SF64:SKELETON, offset: 0x7006990, symbol: D_TI1_7006990} +aTi1DesertCrawlerSkel: + { type: SF64:SKELETON, offset: 0x7006990, symbol: aTi1DesertCrawlerSkel} D_TI1_7006F74: { type: SF64:ANIM, offset: 0x7006F74, symbol: D_TI1_7006F74 } @@ -146,8 +146,8 @@ D_TI1_7009510: D_TI1_70096D8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x070096D8, symbol: D_TI1_70096D8 } -D_TI1_70098E0: - { type: GFX, offset: 0x70098E0, symbol: D_TI1_70098E0 } +aTiDelphorDL: + { type: GFX, offset: 0x70098E0, symbol: aTiDelphorDL } D_TI1_7009B58: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x07009B58, symbol: D_TI1_7009B58 } @@ -158,8 +158,8 @@ D_TI1_7009D60: D_TI1_700A190: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0700A190, symbol: D_TI1_700A190 } -D_TI1_700A990: - { type: GFX, offset: 0x700A990, symbol: D_TI1_700A990 } +aTi1BombDL: + { type: GFX, offset: 0x700A990, symbol: aTi1BombDL } D_TI1_700AAD8: { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x700AAD8, symbol: D_TI1_700AAD8, tlut: 0x700AB58 } @@ -167,8 +167,8 @@ D_TI1_700AAD8: D_TI1_700AB58: { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x700AB58, symbol: D_TI1_700AB58 } -D_TI1_700AB70: - { type: GFX, offset: 0x700AB70, symbol: D_TI1_700AB70 } +aTi1LandmineDL: + { type: GFX, offset: 0x700AB70, symbol: aTi1LandmineDL } D_TI1_700AEA8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x0700AEA8, symbol: D_TI1_700AEA8 } @@ -188,8 +188,8 @@ D_TI1_700B9C0: D_TI1_700BB10: { type: GFX, offset: 0x700BB10, symbol: D_TI1_700BB10 } -D_TI1_700BE00: - { type: GFX, offset: 0x700BE00, symbol: D_TI1_700BE00 } +aTiBridgeDL: + { type: GFX, offset: 0x700BE00, symbol: aTiBridgeDL } D_TI1_700BFB0: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x0700BFB0, symbol: D_TI1_700BFB0, tlut: 0x0700C3B0 } @@ -200,11 +200,11 @@ D_TI1_700C3B0: D_TI1_700C4B0: { type: GFX, offset: 0x700C4B0, symbol: D_TI1_700C4B0 } -D_TI1_700C8D8: - { type: SF64:ANIM, offset: 0x700C8D8, symbol: D_TI1_700C8D8 } +aTi1DesertRoverAnim: + { type: SF64:ANIM, offset: 0x700C8D8, symbol: aTi1DesertRoverAnim } -D_TI1_700C964: - { type: SF64:SKELETON, offset: 0x700C964, symbol: D_TI1_700C964 } +aTi1DesertRoverSkel: + { type: SF64:SKELETON, offset: 0x700C964, symbol: aTi1DesertRoverSkel } D_TI1_700C980: { type: GFX, offset: 0x700C980, symbol: D_TI1_700C980 } @@ -218,8 +218,8 @@ D_TI1_700CB60: D_TI1_700D534: { type: SF64:ANIM, offset: 0x700D534, symbol: D_TI1_700D534 } -D_TI1_700D700: - {type: SF64:SKELETON, offset: 0x700D700, symbol: D_TI1_700D700} +aTiRascoSkel: + {type: SF64:SKELETON, offset: 0x700D700, symbol: aTiRascoSkel} D_TI1_700D740: { type: GFX, offset: 0x700D740, symbol: D_TI1_700D740 } diff --git a/assets/yaml/jp/rev0/ast_allies.yaml b/assets/yaml/jp/rev0/ast_allies.yaml index 0574dedf..57a24582 100644 --- a/assets/yaml/jp/rev0/ast_allies.yaml +++ b/assets/yaml/jp/rev0/ast_allies.yaml @@ -8,8 +8,8 @@ - '#include "gfx.h"' - '#include "sf64object.h"' -D_D000000: - { type: GFX, offset: 0xD000000, symbol: D_D000000 } +aKattMarkDL: + { type: GFX, offset: 0xD000000, symbol: aKattMarkDL } ast_allies_seg13_vtx_00000098: { type: VTX, count: 3, offset: 0x0D000098, symbol: ast_allies_seg13_vtx_00000098 } @@ -17,11 +17,11 @@ ast_allies_seg13_vtx_00000098: D_D0000C8: { type: BLOB, size: 0x18, offset: 0x0D0000C8, symbol: D_D0000C8 } -D_D0000E0: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0D0000E0, symbol: D_D0000E0, tlut: 0x0D000160 } +aKattMarkTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0D0000E0, symbol: aKattMarkTex, tlut: 0x0D000160 } -D_D000160: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0xD000160, symbol: D_D000160 } +aKattMarkTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0xD000160, symbol: aKattMarkTLUT } D_D000170: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0xD000170, symbol: D_D000170 } @@ -77,25 +77,25 @@ D_D00AFB8: D_D00B3B8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x0D00B3B8, symbol: D_D00B3B8 } -D_D00B5C0: - { type: GFX, offset: 0xD00B5C0, symbol: D_D00B5C0 } +aBillMarkDL: + { type: GFX, offset: 0xD00B5C0, symbol: aBillMarkDL } # Letter B -D_D00B688: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0D00B688, symbol: D_D00B688, tlut: 0xD00B708 } +aBillMarkTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0D00B688, symbol: aBillMarkTex, tlut: 0xD00B708 } -D_D00B708: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0xD00B708, symbol: D_D00B708 } +aBillMarkTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0xD00B708, symbol: aBillMarkTLUT } -D_D00B720: - { type: GFX, offset: 0xD00B720, symbol: D_D00B720 } +aJamesMarkDL: + { type: GFX, offset: 0xD00B720, symbol: aJamesMarkDL } # Letter J ? -D_D00B7F0: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0D00B7F0, symbol: D_D00B7F0, tlut: 0xD00B870 } +aJamesMarkTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0D00B7F0, symbol: aJamesMarkTex, tlut: 0xD00B870 } -D_D00B870: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0xD00B870, symbol: D_D00B870 } +aJamesMarkTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0xD00B870, symbol: aJamesMarkTLUT } D_D00B880: { type: GFX, offset: 0xD00B880, symbol: D_D00B880 } diff --git a/assets/yaml/jp/rev0/ast_andross.yaml b/assets/yaml/jp/rev0/ast_andross.yaml index 00111e67..c296a5a1 100644 --- a/assets/yaml/jp/rev0/ast_andross.yaml +++ b/assets/yaml/jp/rev0/ast_andross.yaml @@ -232,8 +232,8 @@ D_ANDROSS_C038860: D_ANDROSS_C038954: {type: SF64:HITBOX, offset: 0xC038954, symbol: D_ANDROSS_C038954} -D_ANDROSS_C038A48: - {type: SF64:HITBOX, offset: 0xC038A48, symbol: D_ANDROSS_C038A48} +aAndDoorHitbox: + {type: SF64:HITBOX, offset: 0xC038A48, symbol: aAndDoorHitbox} D_ANDROSS_C038AC4: {type: SF64:HITBOX, offset: 0xC038AC4, symbol: D_ANDROSS_C038AC4} @@ -241,20 +241,20 @@ D_ANDROSS_C038AC4: D_ANDROSS_C038B40: {type: SF64:HITBOX, offset: 0xC038B40, symbol: D_ANDROSS_C038B40} -D_ANDROSS_C038BA4: - {type: SF64:HITBOX, offset: 0xC038BA4, symbol: D_ANDROSS_C038BA4} +aAndPathIntersectionHitbox: + {type: SF64:HITBOX, offset: 0xC038BA4, symbol: aAndPathIntersectionHitbox} -D_ANDROSS_C038BD8: - {type: SF64:HITBOX, offset: 0xC038BD8, symbol: D_ANDROSS_C038BD8} +aAndPassageHitbox: + {type: SF64:HITBOX, offset: 0xC038BD8, symbol: aAndPassageHitbox} D_ANDROSS_C038CCC: {type: SF64:HITBOX, offset: 0xC038CCC, symbol: D_ANDROSS_C038CCC} -D_ANDROSS_C038DC0: - {type: SF64:HITBOX, offset: 0xC038DC0, symbol: D_ANDROSS_C038DC0} +aAndAndrossHitbox: + {type: SF64:HITBOX, offset: 0xC038DC0, symbol: aAndAndrossHitbox} -D_ANDROSS_C038F24: - {type: SF64:HITBOX, offset: 0xC038F24, symbol: D_ANDROSS_C038F24} +aAndBrainHitbox: + {type: SF64:HITBOX, offset: 0xC038F24, symbol: aAndBrainHitbox} D_ANDROSS_C038FE8: {type: VTX, count: 34, offset: 0xC038FE8, symbol: D_ANDROSS_C038FE8} diff --git a/assets/yaml/jp/rev0/ast_aquas.yaml b/assets/yaml/jp/rev0/ast_aquas.yaml index b83eba47..d56b32e7 100644 --- a/assets/yaml/jp/rev0/ast_aquas.yaml +++ b/assets/yaml/jp/rev0/ast_aquas.yaml @@ -35,8 +35,8 @@ D_AQ_6002874: { type: SF64:SKELETON, offset: 0x6002874, symbol: D_AQ_6002874 } # -D_AQ_6002C10: - { type: GFX, offset: 0x6002C10, symbol: D_AQ_6002C10 } +aAqOysterDL: + { type: GFX, offset: 0x6002C10, symbol: aAqOysterDL } D_AQ_6002D58: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x6002D58, symbol: D_AQ_6002D58, tlut: 0x6003158 } @@ -152,8 +152,8 @@ D_AQ_600BD20: D_AQ_600B518: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x600B518, symbol: D_AQ_600B518 } -D_AQ_600BF80: - { type: GFX, offset: 0x600BF80, symbol: D_AQ_600BF80 } +aAqTunnel2DL: + { type: GFX, offset: 0x600BF80, symbol: aAqTunnel2DL } D_AQ_600C530: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x600C530, symbol: D_AQ_600C530, tlut: 0x600C930 } @@ -197,11 +197,11 @@ D_AQ_600E150: D_AQ_600E368: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x600E368, symbol: D_AQ_600E368 } -D_AQ_600EE10: - { type: GFX, offset: 0x600EE10, symbol: D_AQ_600EE10 } +aAqWall1DL: + { type: GFX, offset: 0x600EE10, symbol: aAqWall1DL } -D_AQ_600EEF0: - { type: GFX, offset: 0x600EEF0, symbol: D_AQ_600EEF0 } +aAqBump2DL: + { type: GFX, offset: 0x600EEF0, symbol: aAqBump2DL } D_AQ_600F030: { type: GFX, offset: 0x600F030, symbol: D_AQ_600F030 } @@ -230,11 +230,11 @@ D_AQ_6011A78: D_AQ_6011CD8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6011CD8, symbol: D_AQ_6011CD8 } -D_AQ_6011EE0: - { type: GFX, offset: 0x6011EE0, symbol: D_AQ_6011EE0 } +aAqTunnel1DL: + { type: GFX, offset: 0x6011EE0, symbol: aAqTunnel1DL } -D_AQ_60120F0: - { type: GFX, offset: 0x60120F0, symbol: D_AQ_60120F0 } +aAqRoofDL: + { type: GFX, offset: 0x60120F0, symbol: aAqRoofDL } D_AQ_60126A8: { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 64, offset: 0x60126A8, symbol: D_AQ_60126A8, tlut: 0x6012AA8 } @@ -254,14 +254,14 @@ D_AQ_6012EA8: D_AQ_60132A8: { type: TEXTURE, ctype: u16, format: TLUT, colors: 240, offset: 0x60132A8, symbol: D_AQ_60132A8 } -D_AQ_60135E0: - { type: SF64:ANIM, offset: 0x60135E0, symbol: D_AQ_60135E0 } +aAqFishGroupAnim: + { type: SF64:ANIM, offset: 0x60135E0, symbol: aAqFishGroupAnim } -D_AQ_60136CC: - { type: SF64:SKELETON, offset: 0x60136CC, symbol: D_AQ_60136CC } +aAqFishGroupSkel1: + { type: SF64:SKELETON, offset: 0x60136CC, symbol: aAqFishGroupSkel1 } -D_AQ_60137CC: - { type: SF64:SKELETON, offset: 0x60137CC, symbol: D_AQ_60137CC } +aAqFishGroupSkel2: + { type: SF64:SKELETON, offset: 0x60137CC, symbol: aAqFishGroupSkel2 } D_AQ_60137F0: { type: GFX, offset: 0x60137F0, symbol: D_AQ_60137F0 } @@ -275,11 +275,11 @@ D_AQ_6013EC0: D_AQ_6014030: { type: GFX, offset: 0x6014030, symbol: D_AQ_6014030 } -D_AQ_6014438: - { type: SF64:ANIM, offset: 0x6014438, symbol: D_AQ_6014438 } +aAqStoneColumnAnim: + { type: SF64:ANIM, offset: 0x6014438, symbol: aAqStoneColumnAnim } -D_AQ_6014504: - { type: SF64:SKELETON, offset: 0x6014504, symbol: D_AQ_6014504 } +aAqStoneColumnSkel: + { type: SF64:SKELETON, offset: 0x6014504, symbol: aAqStoneColumnSkel } D_AQ_6014520: { type: GFX, offset: 0x6014520, symbol: D_AQ_6014520 } @@ -293,8 +293,8 @@ D_AQ_6014CD0: D_AQ_6014E50: { type: GFX, offset: 0x6014E50, symbol: D_AQ_6014E50 } -D_AQ_6014FD0: - { type: GFX, offset: 0x6014FD0, symbol: D_AQ_6014FD0 } +aAqBoulderDL: + { type: GFX, offset: 0x6014FD0, symbol: aAqBoulderDL } D_AQ_6015430: { type: GFX, offset: 0x6015430, symbol: D_AQ_6015430 } @@ -305,8 +305,8 @@ D_AQ_60154F8: D_AQ_60155F8: { type: TEXTURE, ctype: u16, format: TLUT, colors: 152, offset: 0x60155F8, symbol: D_AQ_60155F8 } -D_AQ_6015730: - { type: GFX, offset: 0x6015730, symbol: D_AQ_6015730 } +aAqArchDL: + { type: GFX, offset: 0x6015730, symbol: aAqArchDL } D_AQ_6015DD0: { type: GFX, offset: 0x6015DD0, symbol: D_AQ_6015DD0 } @@ -383,8 +383,8 @@ D_AQ_601D110: D_AQ_601DE50: { type: SF64:ANIM, offset: 0x601DE50, symbol: D_AQ_601DE50 } -D_AQ_601DE60: - { type: GFX, offset: 0x601DE60, symbol: D_AQ_601DE60 } +aAqCoralReef2DL: + { type: GFX, offset: 0x601DE60, symbol: aAqCoralReef2DL } D_AQ_601E1F0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x601E1F0, symbol: D_AQ_601E1F0 } @@ -392,11 +392,11 @@ D_AQ_601E1F0: D_AQ_601E9F0: { type: GFX, offset: 0x601E9F0, symbol: D_AQ_601E9F0 } -D_AQ_601EC68: - { type: SF64:ANIM, offset: 0x601EC68, symbol: D_AQ_601EC68 } +aAqCoralAnim: + { type: SF64:ANIM, offset: 0x601EC68, symbol: aAqCoralAnim } -D_AQ_601EDB4: - { type: SF64:SKELETON, offset: 0x601EDB4, symbol: D_AQ_601EDB4 } +aAqCoralSkel: + { type: SF64:SKELETON, offset: 0x601EDB4, symbol: aAqCoralSkel } D_AQ_601EDE0: { type: GFX, offset: 0x601EDE0, symbol: D_AQ_601EDE0 } @@ -425,11 +425,11 @@ D_AQ_6021858: D_AQ_6021C58: { type: TEXTURE, ctype: u16, format: TLUT, colors: 232, offset: 0x6021C58, symbol: D_AQ_6021C58 } -D_AQ_602201C: - { type: SF64:ANIM, offset: 0x602201C, symbol: D_AQ_602201C } +aAqOysterAnim: + { type: SF64:ANIM, offset: 0x602201C, symbol: aAqOysterAnim } -D_AQ_60220E8: - { type: SF64:SKELETON, offset: 0x60220E8, symbol: D_AQ_60220E8 } +aAqOysterSkel: + { type: SF64:SKELETON, offset: 0x60220E8, symbol: aAqOysterSkel } D_AQ_6022110: { type: GFX, offset: 0x6022110, symbol: D_AQ_6022110 } @@ -449,14 +449,14 @@ D_AQ_6022888: D_AQ_60229B8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60229B8, symbol: D_AQ_60229B8 } -D_AQ_60231C0: - { type: GFX, offset: 0x60231C0, symbol: D_AQ_60231C0 } +aAqCoralReef1DL: + { type: GFX, offset: 0x60231C0, symbol: aAqCoralReef1DL } -D_AQ_6023780: - { type: SF64:ANIM, offset: 0x6023780, symbol: D_AQ_6023780 } +aAqJellyfishAnim: + { type: SF64:ANIM, offset: 0x6023780, symbol: aAqJellyfishAnim } -D_AQ_602390C: - { type: SF64:SKELETON, offset: 0x602390C, symbol: D_AQ_602390C } +aAqJellyfishSkel: + { type: SF64:SKELETON, offset: 0x602390C, symbol: aAqJellyfishSkel } D_AQ_6023940: { type: GFX, offset: 0x6023940, symbol: D_AQ_6023940 } @@ -482,8 +482,8 @@ D_AQ_6024938: D_AQ_60249C0: { type: GFX, offset: 0x60249C0, symbol: D_AQ_60249C0 } -D_AQ_6024A50: - { type: GFX, offset: 0x6024A50, symbol: D_AQ_6024A50 } +aAqPearlDL: + { type: GFX, offset: 0x6024A50, symbol: aAqPearlDL } D_AQ_6024F80: { type: SF64:ANIM, offset: 0x6024F80, symbol: D_AQ_6024F80 } @@ -605,8 +605,8 @@ D_AQ_602AC40: D_AQ_602ACC0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x602ACC0, symbol: D_AQ_602ACC0 } -D_AQ_602B4C0: - { type: GFX, offset: 0x602B4C0, symbol: D_AQ_602B4C0 } +aAqRockDL: + { type: GFX, offset: 0x602B4C0, symbol: aAqRockDL } D_AQ_602B9D4: # unused and possibly broken { type: SF64:ANIM, offset: 0x602B9D4, symbol: D_AQ_602B9D4 } @@ -656,8 +656,8 @@ D_AQ_602E5C8: D_AQ_60308B8: { type: SF64:SCRIPT, offset: 0x60308B8, symbol: D_AQ_60308B8 } -D_AQ_6030B10: - { type: SF64:HITBOX, offset: 0x6030B10, symbol: D_AQ_6030B10 } +aBoss301Hitbox: + { type: SF64:HITBOX, offset: 0x6030B10, symbol: aBoss301Hitbox } D_AQ_6030B14_f32: { type: SF64:HITBOX, offset: 0x6030B14, symbol: D_AQ_6030B14_f32 } @@ -674,8 +674,8 @@ D_AQ_6030B68: D_AQ_6030BAC: { type: SF64:HITBOX, offset: 0x6030BAC, symbol: D_AQ_6030BAC } -D_AQ_6030BE0: - { type: SF64:HITBOX, offset: 0x6030BE0, symbol: D_AQ_6030BE0 } +aAqActor188Hitbox: + { type: SF64:HITBOX, offset: 0x6030BE0, symbol: aAqActor188Hitbox } D_AQ_6030BFC: { type: SF64:HITBOX, offset: 0x6030BFC, symbol: D_AQ_6030BFC } @@ -686,14 +686,14 @@ D_AQ_6030C18: D_AQ_6030C44: { type: SF64:HITBOX, offset: 0x6030C44, symbol: D_AQ_6030C44 } -D_AQ_6030C60: - { type: SF64:HITBOX, offset: 0x6030C60, symbol: D_AQ_6030C60 } +aAqCoralReef1Hitbox: + { type: SF64:HITBOX, offset: 0x6030C60, symbol: aAqCoralReef1Hitbox } -D_AQ_6030C7C: - { type: SF64:HITBOX, offset: 0x6030C7C, symbol: D_AQ_6030C7C } +aAqTunnel1Hitbox: + { type: SF64:HITBOX, offset: 0x6030C7C, symbol: aAqTunnel1Hitbox } -D_AQ_6030D20: - { type: SF64:HITBOX, offset: 0x6030D20, symbol: D_AQ_6030D20 } +aAqStoneColumnHitbox: + { type: SF64:HITBOX, offset: 0x6030D20, symbol: aAqStoneColumnHitbox } D_AQ_6030D3C: { type: SF64:HITBOX, offset: 0x6030D3C, symbol: D_AQ_6030D3C } @@ -701,65 +701,65 @@ D_AQ_6030D3C: D_AQ_6030D58: { type: SF64:HITBOX, offset: 0x6030D58, symbol: D_AQ_6030D58 } -D_AQ_6030D74: - { type: SF64:HITBOX, offset: 0x6030D74, symbol: D_AQ_6030D74 } +aAqArchHitbox: + { type: SF64:HITBOX, offset: 0x6030D74, symbol: aAqArchHitbox } -D_AQ_6030DF8: - { type: SF64:HITBOX, offset: 0x6030DF8, symbol: D_AQ_6030DF8 } +aAqCoralReef2Hitbox: + { type: SF64:HITBOX, offset: 0x6030DF8, symbol: aAqCoralReef2Hitbox } -D_AQ_6030E14: - { type: SF64:HITBOX, offset: 0x6030E14, symbol: D_AQ_6030E14 } +aAqRockHitbox: + { type: SF64:HITBOX, offset: 0x6030E14, symbol: aAqRockHitbox } -D_AQ_6030E30_Hitbox: - { type: SF64:HITBOX, offset: 0x6030E30, symbol: D_AQ_6030E30_Hitbox } +aAqWall1Hitbox: + { type: SF64:HITBOX, offset: 0x6030E30, symbol: aAqWall1Hitbox } -D_AQ_6030E4C: - { type: SF64:HITBOX, offset: 0x6030E4C, symbol: D_AQ_6030E4C } +aAqRoofHitbox: + { type: SF64:HITBOX, offset: 0x6030E4C, symbol: aAqRoofHitbox } -D_AQ_6030E68: - { type: SF64:HITBOX, offset: 0x6030E68, symbol: D_AQ_6030E68 } +aAqTunnel2Hitbox: + { type: SF64:HITBOX, offset: 0x6030E68, symbol: aAqTunnel2Hitbox } -D_AQ_6030F74: - { type: SF64:HITBOX, offset: 0x6030F74, symbol: D_AQ_6030F74 } +aAqBacoonHitbox: + { type: SF64:HITBOX, offset: 0x6030F74, symbol: aAqBacoonHitbox } -D_AQ_6031398: - { type: SF64:HITBOX, offset: 0x6031398, symbol: D_AQ_6031398 } +aAqAnglerFishHitbox: + { type: SF64:HITBOX, offset: 0x6031398, symbol: aAqAnglerFishHitbox } -D_AQ_60313CC: - { type: SF64:HITBOX, offset: 0x60313CC, symbol: D_AQ_60313CC } +aAqGaroaHitbox: + { type: SF64:HITBOX, offset: 0x60313CC, symbol: aAqGaroaHitbox } -D_AQ_6031400: - { type: SF64:HITBOX, offset: 0x6031400, symbol: D_AQ_6031400 } +aAqSculpinHitbox: + { type: SF64:HITBOX, offset: 0x6031400, symbol: aAqSculpinHitbox } -D_AQ_603144C: - { type: SF64:HITBOX, offset: 0x603144C, symbol: D_AQ_603144C } +aAqSpindlyFishHitbox: + { type: SF64:HITBOX, offset: 0x603144C, symbol: aAqSpindlyFishHitbox } -D_AQ_6031480: - { type: SF64:HITBOX, offset: 0x6031480, symbol: D_AQ_6031480 } +aAqSquidHitbox: + { type: SF64:HITBOX, offset: 0x6031480, symbol: aAqSquidHitbox } D_AQ_60314AC: { type: SF64:HITBOX, offset: 0x60314AC, symbol: D_AQ_60314AC } -D_AQ_60314C8: - { type: SF64:HITBOX, offset: 0x60314C8, symbol: D_AQ_60314C8 } +aAqOysterHitbox: + { type: SF64:HITBOX, offset: 0x60314C8, symbol: aAqOysterHitbox } D_AQ_60314E4: { type: SF64:HITBOX, offset: 0x60314E4, symbol: D_AQ_60314E4 } -D_AQ_6031500: - { type: SF64:HITBOX, offset: 0x6031500, symbol: D_AQ_6031500 } +aAqBoulderHitbox: + { type: SF64:HITBOX, offset: 0x6031500, symbol: aAqBoulderHitbox } D_AQ_603151C: { type: SF64:HITBOX, offset: 0x603151C, symbol: D_AQ_603151C } -D_AQ_6031538: - { type: SF64:HITBOX, offset: 0x6031538, symbol: D_AQ_6031538 } +aAqCoralHitbox: + { type: SF64:HITBOX, offset: 0x6031538, symbol: aAqCoralHitbox } -D_AQ_6031554: - { type: SF64:HITBOX, offset: 0x6031554, symbol: D_AQ_6031554 } +aAqJellyfishHitbox: + { type: SF64:HITBOX, offset: 0x6031554, symbol: aAqJellyfishHitbox } -D_AQ_6031570: - { type: SF64:HITBOX, offset: 0x6031570, symbol: D_AQ_6031570 } +aAqFishGroupHitbox: + { type: SF64:HITBOX, offset: 0x6031570, symbol: aAqFishGroupHitbox } D_AQ_603158C: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x603158C, symbol: D_AQ_603158C } diff --git a/assets/yaml/jp/rev0/ast_area_6.yaml b/assets/yaml/jp/rev0/ast_area_6.yaml index 6584145f..fe99d8e0 100644 --- a/assets/yaml/jp/rev0/ast_area_6.yaml +++ b/assets/yaml/jp/rev0/ast_area_6.yaml @@ -237,8 +237,8 @@ D_A6_6028254: D_A6_60282A0: { type: SF64:HITBOX, offset: 0x60282A0, symbol: D_A6_60282A0 } -D_A6_6028454: - { type: SF64:HITBOX, offset: 0x6028454, symbol: D_A6_6028454 } +aA6GorgonHitbox: + { type: SF64:HITBOX, offset: 0x6028454, symbol: aA6GorgonHitbox } D_A6_6028578: { type: SF64:HITBOX, offset: 0x6028578, symbol: D_A6_6028578 } diff --git a/assets/yaml/jp/rev0/ast_arwing.yaml b/assets/yaml/jp/rev0/ast_arwing.yaml index 89515c40..7354410b 100644 --- a/assets/yaml/jp/rev0/ast_arwing.yaml +++ b/assets/yaml/jp/rev0/ast_arwing.yaml @@ -179,8 +179,8 @@ D_arwing_3018348: D_arwing_30183D0: { type: GFX, offset: 0x30183D0, symbol: D_arwing_30183D0 } -D_arwing_30184D8: - { type: TEXTURE, format: RGBA16, offset: 0x30184D8, width: 32, height: 32, ctype: u16, symbol: D_arwing_30184D8 } +aWindshieldClouldReflextionTex: + { type: TEXTURE, format: RGBA16, offset: 0x30184D8, width: 32, height: 32, ctype: u16, symbol: aWindshieldClouldReflextionTex } D_arwing_3018CD8: { type: TEXTURE, format: RGBA16, offset: 0x3018CD8, width: 64, height: 16, ctype: u16, symbol: D_arwing_3018CD8 } diff --git a/assets/yaml/jp/rev0/ast_bolse.yaml b/assets/yaml/jp/rev0/ast_bolse.yaml index 64f49f89..8f033e51 100644 --- a/assets/yaml/jp/rev0/ast_bolse.yaml +++ b/assets/yaml/jp/rev0/ast_bolse.yaml @@ -115,8 +115,8 @@ D_BO_600AB90: D_BO_600AD80: { type: TEXTURE, format: RGBA16, offset: 0x0600AD80, width: 32, height: 32, ctype: u16, symbol: D_BO_600AD80 } -D_BO_600B8B0: - { type: GFX, offset: 0x600B8B0, symbol: D_BO_600B8B0 } +aBoBuildingDL: + { type: GFX, offset: 0x600B8B0, symbol: aBoBuildingDL } D_BO_600BAA0: { type: GFX, offset: 0x600BAA0, symbol: D_BO_600BAA0 } @@ -133,11 +133,11 @@ D_BO_600C0B8: D_BO_600C2D8: { type: TEXTURE, format: IA8, offset: 0x0600C2D8, width: 32, height: 16, ctype: u8, symbol: D_BO_600C2D8 } -D_BO_600C4E0: - { type: GFX, offset: 0x600C4E0, symbol: D_BO_600C4E0 } +aBoBaseShieldDL: + { type: GFX, offset: 0x600C4E0, symbol: aBoBaseShieldDL } -D_BO_600CF88: - { type: TEXTURE, format: RGBA16, offset: 0x0600CF88, width: 16, height: 16, ctype: u16, symbol: D_BO_600CF88 } +aBoBaseShieldTex: + { type: TEXTURE, format: RGBA16, offset: 0x0600CF88, width: 16, height: 16, ctype: u16, symbol: aBoBaseShieldTex } D_BO_600D190: { type: GFX, offset: 0x600D190, symbol: D_BO_600D190 } @@ -148,20 +148,20 @@ D_BO_600D2A0: D_BO_600E2A0: { type: TEXTURE, format: RGBA16, offset: 0x0600E2A0, width: 32, height: 64, ctype: u16, symbol: D_BO_600E2A0 } -D_BO_600F2E0: - { type: SF64:ANIM, offset: 0x600F2E0, symbol: D_BO_600F2E0 } +aBoLaserCannonAnim: + { type: SF64:ANIM, offset: 0x600F2E0, symbol: aBoLaserCannonAnim } -D_BO_600F36C: - { type: SF64:SKELETON, offset: 0x600F36C, symbol: D_BO_600F36C } +aBoLaserCannonSkel: + { type: SF64:SKELETON, offset: 0x600F36C, symbol: aBoLaserCannonSkel } -D_BO_600F3D8: - { type: SF64:ANIM, offset: 0x600F3D8, symbol: D_BO_600F3D8 } +aBoShieldReactorAnim: + { type: SF64:ANIM, offset: 0x600F3D8, symbol: aBoShieldReactorAnim } -D_BO_600F4A4: - { type: SF64:SKELETON, offset: 0x600F4A4, symbol: D_BO_600F4A4 } +aBoShieldReactorSkel: + { type: SF64:SKELETON, offset: 0x600F4A4, symbol: aBoShieldReactorSkel } -D_BO_600F4C0: - { type: GFX, offset: 0x600F4C0, symbol: D_BO_600F4C0 } +aBoPoleDL: + { type: GFX, offset: 0x600F4C0, symbol: aBoPoleDL } D_BO_600F728: { type: TEXTURE, format: RGBA16, offset: 0x0600F728, width: 32, height: 32, ctype: u16, symbol: D_BO_600F728 } @@ -178,23 +178,23 @@ D_BO_6010294: PAD_BO_6011B20: { type: BLOB, size: 0x4, offset: 0x6011B20, symbol: PAD_BO_6011B20, mesh_symbol: D_BO_OFFSET } -D_BO_6011B24: - { type: SF64:HITBOX, offset: 0x6011B24, symbol: D_BO_6011B24 } +aBoShieldReactorHitbox: + { type: SF64:HITBOX, offset: 0x6011B24, symbol: aBoShieldReactorHitbox } D_BO_6011BA4: { type: SF64:HITBOX, offset: 0x6011BA4, symbol: D_BO_6011BA4 } -D_BO_6011BF4: - { type: SF64:HITBOX, offset: 0x6011BF4, symbol: D_BO_6011BF4 } +aBoLaserCannonHitbox: + { type: SF64:HITBOX, offset: 0x6011BF4, symbol: aBoLaserCannonHitbox } -D_BO_6011C10: - { type: SF64:HITBOX, offset: 0x6011C10, symbol: D_BO_6011C10 } +aBoPoleHitbox: + { type: SF64:HITBOX, offset: 0x6011C10, symbol: aBoPoleHitbox } -D_BO_6011C48: - { type: SF64:HITBOX, offset: 0x6011C48, symbol: D_BO_6011C48 } +aBoBuildingHitbox: + { type: SF64:HITBOX, offset: 0x6011C48, symbol: aBoBuildingHitbox } -D_BO_6011C80: - { type: SF64:HITBOX, offset: 0x6011C80, symbol: D_BO_6011C80 } +aBoBaseCoreHitbox: + { type: SF64:HITBOX, offset: 0x6011C80, symbol: aBoBaseCoreHitbox } D_BO_6011E28: { type: VTX, count: 34, offset: 0x6011E28, symbol: D_BO_6011E28 } diff --git a/assets/yaml/jp/rev0/ast_common.yaml b/assets/yaml/jp/rev0/ast_common.yaml index 00250513..66c29972 100644 --- a/assets/yaml/jp/rev0/ast_common.yaml +++ b/assets/yaml/jp/rev0/ast_common.yaml @@ -695,11 +695,11 @@ D_101CBC0: D_101CCC0: { type: TEXTURE, format: TLUT, colors: 88, offset: 0x101CCC0, ctype: u16, symbol: D_101CCC0 } -D_101CD70: - { type: GFX, offset: 0x101CD70, symbol: D_101CD70 } +aUnusedShieldDL: + { type: GFX, offset: 0x101CD70, symbol: aUnusedShieldDL } -D_101D070: - { type: TEXTURE, format: RGBA16, width: 32, height: 32, ctype: u16, offset: 0x101D070, symbol: D_101D070 } +aUnusedShieldTex: + { type: TEXTURE, format: RGBA16, width: 32, height: 32, ctype: u16, offset: 0x101D070, symbol: aUnusedShieldTex } D_101D870: { type: GFX, offset: 0x101D870, symbol: D_101D870 } @@ -710,8 +710,8 @@ ast_common_seg1_vtx_1D9C8: D_101DE20: { type: TEXTURE, format: IA8, width: 128, height: 32, ctype: u8, offset: 0x101DE20, symbol: D_101DE20 } -D_101DC10: - { type: GFX, offset: 0x101DC10, symbol: D_101DC10 } +aBarrelRollTex: + { type: GFX, offset: 0x101DC10, symbol: aBarrelRollTex } D_101EE20: { type: TEXTURE, format: IA8, width: 128, height: 32, ctype: u8, offset: 0x101EE20, symbol: D_101EE20 } @@ -806,32 +806,32 @@ D_1024230: D_1024290: { type: GFX, offset: 0x1024290, symbol: D_1024290 } -D_1024410: - { type: GFX, offset: 0x1024410, symbol: D_1024410 } +aPeppyMarkDL: + { type: GFX, offset: 0x1024410, symbol: aPeppyMarkDL } -D_10244D8: - { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x10244D8, tlut: 0x1024558, symbol: D_10244D8 } +aPeppyMarkTex: + { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x10244D8, tlut: 0x1024558, symbol: aPeppyMarkTex } -D_1024558: - { type: TEXTURE, format: TLUT, colors: 12, offset: 0x1024558, ctype: u16, symbol: D_1024558 } +aPeppyMarkTLUT: + { type: TEXTURE, format: TLUT, colors: 12, offset: 0x1024558, ctype: u16, symbol: aPeppyMarkTLUT } -D_1024570: - { type: GFX, offset: 0x1024570, symbol: D_1024570 } +aFalcoMarkDL: + { type: GFX, offset: 0x1024570, symbol: aFalcoMarkDL } -D_1024638: - { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x1024638, tlut: 0x10246B8, symbol: D_1024638 } +aFalcoMarkTex: + { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x1024638, tlut: 0x10246B8, symbol: aFalcoMarkTex } -D_10246B8: - { type: TEXTURE, format: TLUT, colors: 12, offset: 0x10246B8, ctype: u16, symbol: D_10246B8 } +aFalcoMarkTLUT: + { type: TEXTURE, format: TLUT, colors: 12, offset: 0x10246B8, ctype: u16, symbol: aFalcoMarkTLUT } -D_10246D0: - { type: GFX, offset: 0x10246D0, symbol: D_10246D0 } +aSlippyMarkDL: + { type: GFX, offset: 0x10246D0, symbol: aSlippyMarkDL } -D_1024798: - { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x1024798, tlut: 0x1024818, symbol: D_1024798 } +aSlippyMarkTex: + { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x1024798, tlut: 0x1024818, symbol: aSlippyMarkTex } -D_1024818: - { type: TEXTURE, format: TLUT, colors: 12, offset: 0x1024818, ctype: u16, symbol: D_1024818 } +aSlippyMarkTLUT: + { type: TEXTURE, format: TLUT, colors: 12, offset: 0x1024818, ctype: u16, symbol: aSlippyMarkTLUT } D_1024830: { type: GFX, offset: 0x1024830, symbol: D_1024830 } diff --git a/assets/yaml/jp/rev0/ast_corneria.yaml b/assets/yaml/jp/rev0/ast_corneria.yaml index 953521ce..7c50e853 100644 --- a/assets/yaml/jp/rev0/ast_corneria.yaml +++ b/assets/yaml/jp/rev0/ast_corneria.yaml @@ -303,20 +303,20 @@ D_CO_602AA7C: aCoDoorsSkel: { type: SF64:SKELETON, offset: 0x602AB48, symbol: aCoDoorsSkel } -D_CO_602BC18: - { type: SF64:ANIM, offset: 0x602BC18, symbol: D_CO_602BC18 } +aCoGrangaWalkingAnim: + { type: SF64:ANIM, offset: 0x602BC18, symbol: aCoGrangaWalkingAnim } D_CO_602BE64: { type: SF64:SKELETON, offset: 0x602BE64, symbol: D_CO_602BE64 } -D_CO_602C0D0: - { type: SF64:ANIM, offset: 0x602C0D0, symbol: D_CO_602C0D0 } +aCoGrangaStationaryAnim: + { type: SF64:ANIM, offset: 0x602C0D0, symbol: aCoGrangaStationaryAnim } D_CO_602D31C: { type: SF64:ANIM, offset: 0x602D31C, symbol: D_CO_602D31C } -D_CO_602D400: - { type: SF64:ANIM, offset: 0x602D400, symbol: D_CO_602D400 } +aCoCarrierAnim: + { type: SF64:ANIM, offset: 0x602D400, symbol: aCoCarrierAnim } aCoCarrierSkel: { type: SF64:SKELETON, offset: 0x602D5AC, symbol: aCoCarrierSkel } @@ -522,14 +522,14 @@ aCoBuilding10Hitbox: aCoIBeamHitbox: { type: SF64:HITBOX, offset: 0x603E514, symbol: aCoIBeamHitbox } -D_CO_603E54C: - { type: SF64:HITBOX, offset: 0x603E54C, symbol: D_CO_603E54C } +aCoActorSkibotHitbox: + { type: SF64:HITBOX, offset: 0x603E54C, symbol: aCoActorSkibotHitbox } -D_CO_603E598: - { type: SF64:HITBOX, offset: 0x603E598, symbol: D_CO_603E598 } +aCoActorRadarHitbox: + { type: SF64:HITBOX, offset: 0x603E598, symbol: aCoActorRadarHitbox } -D_CO_603E5B4: - { type: SF64:HITBOX, offset: 0x603E5B4, symbol: D_CO_603E5B4 } +aCoMoleMissileHitbox: + { type: SF64:HITBOX, offset: 0x603E5B4, symbol: aCoMoleMissileHitbox } CoGarudaHitbox: { type: SF64:HITBOX, offset: 0x603E5D0, symbol: CoGarudaHitbox } @@ -540,14 +540,14 @@ aCoGarudaDestroyHitbox: D_CO_603E620: { type: SF64:HITBOX, offset: 0x603E620, symbol: D_CO_603E620 } -D_CO_603E714: - { type: SF64:HITBOX, offset: 0x603E714, symbol: D_CO_603E714 } +aCoCarrierLeftHitbox: + { type: SF64:HITBOX, offset: 0x603E714, symbol: aCoCarrierLeftHitbox } -D_CO_603E748: - { type: SF64:HITBOX, offset: 0x603E748, symbol: D_CO_603E748 } +aCoCarrierUpperHitbox: + { type: SF64:HITBOX, offset: 0x603E748, symbol: aCoCarrierUpperHitbox } -D_CO_603E7C4: - { type: SF64:HITBOX, offset: 0x603E7C4, symbol: D_CO_603E7C4 } +aCoCarrierBottomHitbox: + { type: SF64:HITBOX, offset: 0x603E7C4, symbol: aCoCarrierBottomHitbox } D_CO_603E840: { type: SF64:HITBOX, offset: 0x603E840, symbol: D_CO_603E840 } diff --git a/assets/yaml/jp/rev0/ast_fortuna.yaml b/assets/yaml/jp/rev0/ast_fortuna.yaml index 7815eeeb..bf24079b 100644 --- a/assets/yaml/jp/rev0/ast_fortuna.yaml +++ b/assets/yaml/jp/rev0/ast_fortuna.yaml @@ -62,11 +62,11 @@ D_FO_6006120: D_FO_6006220: { type: TEXTURE, format: TLUT, colors: 120, offset: 0x6006220, ctype: u16, symbol: D_FO_6006220 } -D_FO_6006310: - { type: GFX, offset: 0x6006310, symbol: D_FO_6006310 } +aFoMountain3DL: + { type: GFX, offset: 0x6006310, symbol: aFoMountain3DL } -D_FO_60066E0: - { type: GFX, offset: 0x60066E0, symbol: D_FO_60066E0 } +aFoTowerDL: + { type: GFX, offset: 0x60066E0, symbol: aFoTowerDL } ast_fortuna_seg6_vtx_6898: { type: VTX, count: 52, offset: 0x6006898, symbol: ast_fortuna_seg6_vtx_6898 } @@ -92,17 +92,17 @@ D_FO_6007590: D_FO_6007730: { type: GFX, offset: 0x6007730, symbol: D_FO_6007730 } -D_FO_6007854: - { type: SF64:ANIM, offset: 0x6007854, symbol: D_FO_6007854 } +aFoRadarAnim: + { type: SF64:ANIM, offset: 0x6007854, symbol: aFoRadarAnim } -D_FO_6007980: - { type: SF64:SKELETON, offset: 0x6007980, symbol: D_FO_6007980 } +aFoRadarSkel: + { type: SF64:SKELETON, offset: 0x6007980, symbol: aFoRadarSkel } -D_FO_60079B0: - { type: GFX, offset: 0x60079B0, symbol: D_FO_60079B0 } +aFoMountain1DL: + { type: GFX, offset: 0x60079B0, symbol: aFoMountain1DL } -D_FO_6007D80: - { type: GFX, offset: 0x6007D80, symbol: D_FO_6007D80 } +aFoMountain2DL: + { type: GFX, offset: 0x6007D80, symbol: aFoMountain2DL } D_FO_6008150: { type: TEXTURE, format: RGBA16, width: 44, height: 44, offset: 0x6008150, ctype: u16, symbol: D_FO_6008150 } @@ -161,8 +161,8 @@ D_FO_600F60C: aFoPoleHitbox: { type: SF64:HITBOX, offset: 0x600FE9C, symbol: aFoPoleHitbox } -D_FO_600FEB8: - { type: SF64:HITBOX, offset: 0x600FEB8, symbol: D_FO_600FEB8 } +aFoTowerHitbox: + { type: SF64:HITBOX, offset: 0x600FEB8, symbol: aFoTowerHitbox } aFoRadarHitbox: { type: SF64:HITBOX, offset: 0x600FF30, symbol: aFoRadarHitbox } @@ -170,14 +170,14 @@ aFoRadarHitbox: D_FO_600FF64: { type: SF64:HITBOX, offset: 0x600FF64, symbol: D_FO_600FF64 } -D_FO_600FF80: - { type: SF64:HITBOX, offset: 0x600FF80, symbol: D_FO_600FF80 } +aFoMountain1Hitbox: + { type: SF64:HITBOX, offset: 0x600FF80, symbol: aFoMountain1Hitbox } -D_FO_600FFA0: - { type: SF64:HITBOX, offset: 0x600FFA0, symbol: D_FO_600FFA0 } +aFoMountain2Hitbox: + { type: SF64:HITBOX, offset: 0x600FFA0, symbol: aFoMountain2Hitbox } -D_FO_600FFC0: - { type: SF64:HITBOX, offset: 0x600FFC0, symbol: D_FO_600FFC0 } +aFoMountain3Hitbox: + { type: SF64:HITBOX, offset: 0x600FFC0, symbol: aFoMountain3Hitbox } -D_FO_600FFE0: - { type: SF64:HITBOX, offset: 0x600FFE0, symbol: D_FO_600FFE0 } \ No newline at end of file +aFoBaseHitbox: + { type: SF64:HITBOX, offset: 0x600FFE0, symbol: aFoBaseHitbox } \ No newline at end of file diff --git a/assets/yaml/jp/rev0/ast_katina.yaml b/assets/yaml/jp/rev0/ast_katina.yaml index 30d5e698..6ec0a0a3 100644 --- a/assets/yaml/jp/rev0/ast_katina.yaml +++ b/assets/yaml/jp/rev0/ast_katina.yaml @@ -57,8 +57,8 @@ D_KA_60062F8: D_KA_6006AF8: { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6006AF8, ctype: u16, symbol: D_KA_6006AF8 } -aKaDestroyedSaucererDL: - { type: GFX, offset: 0x6007300, symbol: aKaDestroyedSaucererDL } +aKaDestroyedKaSaucererDL: + { type: GFX, offset: 0x6007300, symbol: aKaDestroyedKaSaucererDL } D_KA_6009250: { type: GFX, offset: 0x6009250, symbol: D_KA_6009250 } @@ -169,11 +169,11 @@ D_KA_6011000: D_KA_6011044: { type: SF64:OBJECT_INIT, offset: 0x6011044, symbol: D_KA_6011044 } -D_KA_6011058: - { type: SF64:HITBOX, offset: 0x6011058, symbol: D_KA_6011058 } +aKaSaucererHitbox: + { type: SF64:HITBOX, offset: 0x6011058, symbol: aKaSaucererHitbox } -D_KA_601115C: - { type: SF64:HITBOX, offset: 0x601115C, symbol: D_KA_601115C } +aKaFrontlineBaseHitbox: + { type: SF64:HITBOX, offset: 0x601115C, symbol: aKaFrontlineBaseHitbox } D_KA_60111D8: { type: SF64:HITBOX, offset: 0x60111D8, symbol: D_KA_60111D8 } \ No newline at end of file diff --git a/assets/yaml/jp/rev0/ast_landmaster.yaml b/assets/yaml/jp/rev0/ast_landmaster.yaml index 2d126597..42b43cf1 100644 --- a/assets/yaml/jp/rev0/ast_landmaster.yaml +++ b/assets/yaml/jp/rev0/ast_landmaster.yaml @@ -14,8 +14,8 @@ D_landmaster_3000000: D_landmaster_3000080: { type: TEXTURE, format: TLUT, offset: 0x3000080, colors: 8, ctype: u16, symbol: D_landmaster_3000080 } -D_landmaster_3000090: - { type: GFX, offset: 0x3000090, symbol: D_landmaster_3000090 } +aLandmasterModelDL: + { type: GFX, offset: 0x3000090, symbol: aLandmasterModelDL } D_landmaster_3004CA8: { type: TEXTURE, format: RGBA16, offset: 0x3004CA8, width: 32, height: 32, ctype: u16, symbol: D_landmaster_3004CA8 } @@ -44,8 +44,8 @@ D_landmaster_3001680: D_landmaster_3001E80: { type: TEXTURE, format: RGBA16, offset: 0x3001E80, width: 32, height: 32, ctype: u16, symbol: D_landmaster_3001E80 } -D_landmaster_3004680: - { type: GFX, offset: 0x3004680, symbol: D_landmaster_3004680 } +aLandmasterCanonDL: + { type: GFX, offset: 0x3004680, symbol: aLandmasterCanonDL } D_landmaster_30066B0: { type: GFX, offset: 0x30066B0, symbol: D_landmaster_30066B0 } diff --git a/assets/yaml/jp/rev0/ast_macbeth.yaml b/assets/yaml/jp/rev0/ast_macbeth.yaml index 289d4ccd..04859b16 100644 --- a/assets/yaml/jp/rev0/ast_macbeth.yaml +++ b/assets/yaml/jp/rev0/ast_macbeth.yaml @@ -163,8 +163,8 @@ D_MA_6007430: D_MA_6007500: {type: GFX, offset: 0x6007500, symbol: D_MA_6007500} -D_MA_60075D0: - {type: GFX, offset: 0x60075D0, symbol: D_MA_60075D0} +aMaWeaponsFactoryDL: + {type: GFX, offset: 0x60075D0, symbol: aMaWeaponsFactoryDL} D_MA_60092E0: { type: TEXTURE, format: RGBA16, ctype: u16, width: 32, height: 32, offset: 0x60092E0, symbol: D_MA_60092E0} @@ -238,8 +238,8 @@ D_MA_600AE18: D_MA_600AE98: { type: TEXTURE, format: TLUT, ctype: u16, colors: 80, offset: 0x600AE98, symbol: D_MA_600AE98} -D_MA_600AF40: - {type: GFX, offset: 0x600AF40, symbol: D_MA_600AF40} +aMaGuillotineDL: + {type: GFX, offset: 0x600AF40, symbol: aMaGuillotineDL} D_MA_600B2E0: { type: TEXTURE, format: RGBA16, ctype: u16, width: 32, height: 64, offset: 0x600B2E0, symbol: D_MA_600B2E0} @@ -265,8 +265,8 @@ D_MA_600D1E4: D_MA_600D280: { type: TEXTURE, format: IA16, ctype: u16, width: 16, height: 16, offset: 0x600D280, symbol: D_MA_600D280} -D_MA_600D480: - {type: GFX, offset: 0x600D480, symbol: D_MA_600D480} +aMaSpearDL: + {type: GFX, offset: 0x600D480, symbol: aMaSpearDL} D_MA_600D878: { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x600D878, symbol: D_MA_600D878, tlut: 0x600D978} @@ -361,8 +361,8 @@ D_MA_6012C00: D_MA_6012C98: { type: TEXTURE, format: RGBA16, ctype: u16, width: 4, height: 8, offset: 0x6012C98, symbol: D_MA_6012C98} -D_MA_6012F50: - {type: GFX, offset: 0x6012F50, symbol: D_MA_6012F50} +aMaShockBoxLightDL: + {type: GFX, offset: 0x6012F50, symbol: aMaShockBoxLightDL} D_MA_6012FE0: { type: TEXTURE, format: IA8, ctype: u8, width: 16, height: 8, offset: 0x6012FE0, symbol: D_MA_6012FE0} @@ -391,8 +391,8 @@ D_MA_6015494: D_MA_6015500: {type: SF64:SKELETON, offset: 0x6015500, symbol: D_MA_6015500} -D_MA_6015510: - {type: GFX, offset: 0x6015510, symbol: D_MA_6015510} +aMaShockBoxDL: + {type: GFX, offset: 0x6015510, symbol: aMaShockBoxDL} D_MA_6015C24: {type: SF64:ANIM, offset: 0x6015C24, symbol: D_MA_6015C24} @@ -451,11 +451,11 @@ D_MA_601A840: D_MA_601A8C8: { type: TEXTURE, format: RGBA16, ctype: u16, width: 32, height: 32, offset: 0x601A8C8, symbol: D_MA_601A8C8} -D_MA_601B0D0: - {type: GFX, offset: 0x601B0D0, symbol: D_MA_601B0D0} +aMaFloor6DL: + {type: GFX, offset: 0x601B0D0, symbol: aMaFloor6DL} -D_MA_601B7C0: - {type: GFX, offset: 0x601B7C0, symbol: D_MA_601B7C0} +aMaWall4DL: + {type: GFX, offset: 0x601B7C0, symbol: aMaWall4DL} D_MA_601BB78: { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x601BB78, symbol: D_MA_601BB78, tlut: 0x601BC78} @@ -493,8 +493,8 @@ D_MA_601EAB0: D_MA_601EBBC: {type: SF64:SKELETON, offset: 0x601EBBC, symbol: D_MA_601EBBC} -D_MA_601F1D0: - {type: GFX, offset: 0x601F1D0, symbol: D_MA_601F1D0} +aMaWall2DL: + {type: GFX, offset: 0x601F1D0, symbol: aMaWall2DL} D_MA_601F270: {type: GFX, offset: 0x601F270, symbol: D_MA_601F270} @@ -550,14 +550,14 @@ D_MA_6023388: D_MA_6023788: { type: TEXTURE, format: TLUT, ctype: u16, colors: 176, offset: 0x6023788, symbol: D_MA_6023788} -D_MA_60238F0: - {type: GFX, offset: 0x60238F0, symbol: D_MA_60238F0} +aMaWall3DL: + {type: GFX, offset: 0x60238F0, symbol: aMaWall3DL} D_MA_60239D0: {type: GFX, offset: 0x60239D0, symbol: D_MA_60239D0} -D_MA_6024010: - {type: GFX, offset: 0x6024010, symbol: D_MA_6024010} +aMaBuilding1DL: + {type: GFX, offset: 0x6024010, symbol: aMaBuilding1DL} D_MA_6024230: { type: TEXTURE, format: CI8, ctype: u8, width: 32, height: 32, offset: 0x6024230, symbol: D_MA_6024230, tlut: 0x6024630} @@ -568,17 +568,17 @@ D_MA_6024630: D_MA_6024670: {type: GFX, offset: 0x6024670, symbol: D_MA_6024670} -D_MA_60251A0: - {type: GFX, offset: 0x60251A0, symbol: D_MA_60251A0} +aMaHorizontalLockBarDL: + {type: GFX, offset: 0x60251A0, symbol: aMaHorizontalLockBarDL} D_MA_60253E0: {type: GFX, offset: 0x60253E0, symbol: D_MA_60253E0} -D_MA_60257B0: - {type: GFX, offset: 0x60257B0, symbol: D_MA_60257B0} +aMaBarrierDL: + {type: GFX, offset: 0x60257B0, symbol: aMaBarrierDL} -D_MA_6025850: - {type: GFX, offset: 0x6025850, symbol: D_MA_6025850} +aMaVerticalLockBarDL: + {type: GFX, offset: 0x6025850, symbol: aMaVerticalLockBarDL} D_MA_6025A70: {type: GFX, offset: 0x6025A70, symbol: D_MA_6025A70} @@ -604,11 +604,11 @@ D_MA_6026C00: D_MA_6027000: { type: TEXTURE, format: TLUT, ctype: u16, colors: 112, offset: 0x6027000, symbol: D_MA_6027000} -D_MA_60270E0: - {type: GFX, offset: 0x60270E0, symbol: D_MA_60270E0} +aMaWall1DL: + {type: GFX, offset: 0x60270E0, symbol: aMaWall1DL} -D_MA_6027180: - { type: GFX, offset: 0x6027180, symbol: D_MA_6027180} +aMaBuilding2DL: + { type: GFX, offset: 0x6027180, symbol: aMaBuilding2DL} D_MA_6027320: {type: SF64:ANIM, offset: 0x6027320, symbol: D_MA_6027320} @@ -616,8 +616,8 @@ D_MA_6027320: D_MA_602742C: {type: SF64:SKELETON, offset: 0x602742C, symbol: D_MA_602742C} -D_MA_6027900: - {type: GFX, offset: 0x6027900, symbol: D_MA_6027900} +aMaFloor2DL: + {type: GFX, offset: 0x6027900, symbol: aMaFloor2DL} D_MA_6027A04: {type: SF64:ANIM, offset: 0x6027A04, symbol: D_MA_6027A04} @@ -658,14 +658,14 @@ D_MA_602CB80: D_MA_602D380: {type: GFX, offset: 0x602D380, symbol: D_MA_602D380} -D_MA_602DAE0: - {type: GFX, offset: 0x602DAE0, symbol: D_MA_602DAE0} +aMaFloor1DL: + {type: GFX, offset: 0x602DAE0, symbol: aMaFloor1DL} -D_MA_602DB80: - {type: GFX, offset: 0x602DB80, symbol: D_MA_602DB80} +aMaFloor3DL: + {type: GFX, offset: 0x602DB80, symbol: aMaFloor3DL} -D_MA_602DC20: - {type: GFX, offset: 0x602DC20, symbol: D_MA_602DC20} +aMaFloor5DL: + {type: GFX, offset: 0x602DC20, symbol: aMaFloor5DL} D_MA_602DCB8: {type: TEXTURE, format: RGBA16, ctype: u16, width: 32, height: 32, offset: 0x602DCB8, symbol: D_MA_602DCB8} @@ -703,11 +703,11 @@ D_MA_602FFA0: D_MA_602FFC0: {type: GFX, offset: 0x602FFC0, symbol: D_MA_602FFC0} -D_MA_6030500: - {type: GFX, offset: 0x6030500, symbol: D_MA_6030500} +aMaTerrainBumpDL: + {type: GFX, offset: 0x6030500, symbol: aMaTerrainBumpDL} -D_MA_6030630: - {type: GFX, offset: 0x6030630, symbol: D_MA_6030630} +aMaFloor4DL: + {type: GFX, offset: 0x6030630, symbol: aMaFloor4DL} D_MA_60306D0: {type: GFX, offset: 0x60306D0, symbol: D_MA_60306D0} @@ -757,20 +757,20 @@ D_MA_6035920: D_MA_60359AC: {type: SF64:HITBOX, offset: 0x60359AC, symbol: D_MA_60359AC} -D_MA_60359C8: - {type: SF64:HITBOX, offset: 0x60359C8, symbol: D_MA_60359C8} +aMaLocomotiveHitbox: + {type: SF64:HITBOX, offset: 0x60359C8, symbol: aMaLocomotiveHitbox} -D_MA_6035A14: - {type: SF64:HITBOX, offset: 0x6035A14, symbol: D_MA_6035A14} +aMaTrainCar2Hitbox: + {type: SF64:HITBOX, offset: 0x6035A14, symbol: aMaTrainCar2Hitbox} -D_MA_6035A48: - {type: SF64:HITBOX, offset: 0x6035A48, symbol: D_MA_6035A48} +aMaTrainCar1Hitbox: + {type: SF64:HITBOX, offset: 0x6035A48, symbol: aMaTrainCar1Hitbox} D_MA_6035A94: {type: SF64:HITBOX, offset: 0x6035A94, symbol: D_MA_6035A94} -D_MA_6035AE0: - {type: SF64:HITBOX, offset: 0x6035AE0, symbol: D_MA_6035AE0} +aMaTrainCar3Hitbox: + {type: SF64:HITBOX, offset: 0x6035AE0, symbol: aMaTrainCar3Hitbox} D_MA_6035B44: {type: SF64:HITBOX, offset: 0x6035B44, symbol: D_MA_6035B44} @@ -790,14 +790,14 @@ D_MA_6035CD4: D_MA_6035D38: {type: SF64:HITBOX, offset: 0x6035D38, symbol: D_MA_6035D38} -D_MA_6035D9C: - {type: SF64:HITBOX, offset: 0x6035D9C, symbol: D_MA_6035D9C} +aMaTrainCar4Hitbox: + {type: SF64:HITBOX, offset: 0x6035D9C, symbol: aMaTrainCar4Hitbox} D_MA_6035DD0: {type: SF64:HITBOX, offset: 0x6035DD0, symbol: D_MA_6035DD0} -D_MA_6035E04: - {type: SF64:HITBOX, offset: 0x6035E04, symbol: D_MA_6035E04} +aMaTrainCar5Hitbox: + {type: SF64:HITBOX, offset: 0x6035E04, symbol: aMaTrainCar5Hitbox} D_MA_6035E68: {type: SF64:HITBOX, offset: 0x6035E68, symbol: D_MA_6035E68} @@ -817,101 +817,101 @@ D_MA_6035FF8: D_MA_603605C: {type: SF64:HITBOX, offset: 0x603605C, symbol: D_MA_603605C} -D_MA_60360C0: - {type: SF64:HITBOX, offset: 0x60360C0, symbol: D_MA_60360C0} +aMaTrainCar6Hitbox: + {type: SF64:HITBOX, offset: 0x60360C0, symbol: aMaTrainCar6Hitbox} -D_MA_6036154: - {type: SF64:HITBOX, offset: 0x6036154, symbol: D_MA_6036154} +aMaTrainCar7Hitbox: + {type: SF64:HITBOX, offset: 0x6036154, symbol: aMaTrainCar7Hitbox} D_MA_6036188: {type: SF64:HITBOX, offset: 0x6036188, symbol: D_MA_6036188} -D_MA_6036204: - {type: SF64:HITBOX, offset: 0x6036204, symbol: D_MA_6036204} +aMaTrainTrack13Hitbox: + {type: SF64:HITBOX, offset: 0x6036204, symbol: aMaTrainTrack13Hitbox} D_MA_6036250: {type: SF64:HITBOX, offset: 0x6036250, symbol: D_MA_6036250} -D_MA_603626C: - {type: SF64:HITBOX, offset: 0x603626C, symbol: D_MA_603626C} +aMaBuilding1Hitbox: + {type: SF64:HITBOX, offset: 0x603626C, symbol: aMaBuilding1Hitbox} -D_MA_6036288: - {type: SF64:HITBOX, offset: 0x6036288, symbol: D_MA_6036288} +aMaBuilding2Hitbox: + {type: SF64:HITBOX, offset: 0x6036288, symbol: aMaBuilding2Hitbox} -D_MA_60362A4: - {type: SF64:HITBOX, offset: 0x60362A4, symbol: D_MA_60362A4} +aMaTowerHitbox: + {type: SF64:HITBOX, offset: 0x60362A4, symbol: aMaTowerHitbox} -D_MA_60362D8: - {type: SF64:HITBOX, offset: 0x60362D8, symbol: D_MA_60362D8} +aMaWall2Hitbox: + {type: SF64:HITBOX, offset: 0x60362D8, symbol: aMaWall2Hitbox} -D_MA_60362F4: - {type: SF64:HITBOX, offset: 0x60362F4, symbol: D_MA_60362F4} +aMaWall4Hitbox: + {type: SF64:HITBOX, offset: 0x60362F4, symbol: aMaWall4Hitbox} -D_MA_6036328: - {type: SF64:HITBOX, offset: 0x6036328, symbol: D_MA_6036328} +aMaWall3Hitbox: + {type: SF64:HITBOX, offset: 0x6036328, symbol: aMaWall3Hitbox} -D_MA_6036344: - {type: SF64:HITBOX, offset: 0x6036344, symbol: D_MA_6036344} +aMaIndicatorSignHitbox: + {type: SF64:HITBOX, offset: 0x6036344, symbol: aMaIndicatorSignHitbox} -D_MA_6036370: - {type: SF64:HITBOX, offset: 0x6036370, symbol: D_MA_6036370} +aMaTerrainBumpHitbox: + {type: SF64:HITBOX, offset: 0x6036370, symbol: aMaTerrainBumpHitbox} -D_MA_603638C: - {type: SF64:HITBOX, offset: 0x603638C, symbol: D_MA_603638C} +aMaFloor1Hitbox: + {type: SF64:HITBOX, offset: 0x603638C, symbol: aMaFloor1Hitbox} -D_MA_60363B8: - {type: SF64:HITBOX, offset: 0x60363B8, symbol: D_MA_60363B8} +aMaFloor2Hitbox: + {type: SF64:HITBOX, offset: 0x60363B8, symbol: aMaFloor2Hitbox} -D_MA_60363E4: - {type: SF64:HITBOX, offset: 0x60363E4, symbol: D_MA_60363E4} +aMaFloor3Hitbox: + {type: SF64:HITBOX, offset: 0x60363E4, symbol: aMaFloor3Hitbox} -D_MA_6036410: - {type: SF64:HITBOX, offset: 0x6036410, symbol: D_MA_6036410} +aMaFloor4Hitbox: + {type: SF64:HITBOX, offset: 0x6036410, symbol: aMaFloor4Hitbox} -D_MA_603643C: - {type: SF64:HITBOX, offset: 0x603643C, symbol: D_MA_603643C} +aMaFloor5Hitbox: + {type: SF64:HITBOX, offset: 0x603643C, symbol: aMaFloor5Hitbox} -D_MA_6036458: - {type: SF64:HITBOX, offset: 0x6036458, symbol: D_MA_6036458} +aMaMaRailroadSwitchHitbox: + {type: SF64:HITBOX, offset: 0x6036458, symbol: aMaMaRailroadSwitchHitbox} D_MA_603648C: {type: SF64:HITBOX, offset: 0x603648C, symbol: D_MA_603648C} -D_MA_60364C0: - {type: SF64:HITBOX, offset: 0x60364C0, symbol: D_MA_60364C0} +aMaBoulderHitbox: + {type: SF64:HITBOX, offset: 0x60364C0, symbol: aMaBoulderHitbox} -D_MA_60364DC: - {type: SF64:HITBOX, offset: 0x60364DC, symbol: D_MA_60364DC} +aMaRailwaySignalHitbox: + {type: SF64:HITBOX, offset: 0x60364DC, symbol: aMaRailwaySignalHitbox} D_MA_6036520: {type: SF64:HITBOX, offset: 0x6036520, symbol: D_MA_6036520} -D_MA_6036594: - {type: SF64:HITBOX, offset: 0x6036594, symbol: D_MA_6036594} +aMaSwitchTrackHitbox: + {type: SF64:HITBOX, offset: 0x6036594, symbol: aMaSwitchTrackHitbox} D_MA_6036668: {type: SF64:HITBOX, offset: 0x6036668, symbol: D_MA_6036668} -D_MA_60366EC: - {type: SF64:HITBOX, offset: 0x60366EC, symbol: D_MA_60366EC} +aMaHorizontalLockBarHitbox: + {type: SF64:HITBOX, offset: 0x60366EC, symbol: aMaHorizontalLockBarHitbox} -D_MA_6036708: - {type: SF64:HITBOX, offset: 0x6036708, symbol: D_MA_6036708} +aMaVerticalLockBarHitbox: + {type: SF64:HITBOX, offset: 0x6036708, symbol: aMaVerticalLockBarHitbox} -D_MA_6036724: - {type: SF64:HITBOX, offset: 0x6036724, symbol: D_MA_6036724} +aMaProximityLightHitbox: + {type: SF64:HITBOX, offset: 0x6036724, symbol: aMaProximityLightHitbox} -D_MA_6036728: - {type: SF64:HITBOX, offset: 0x6036728, symbol: D_MA_6036728} +aMaBarrierHitbox: + {type: SF64:HITBOX, offset: 0x6036728, symbol: aMaBarrierHitbox} -D_MA_6036744: - {type: SF64:HITBOX, offset: 0x6036744, symbol: D_MA_6036744} +aMaActor219Hitbox: + {type: SF64:HITBOX, offset: 0x6036744, symbol: aMaActor219Hitbox} -D_MA_6036760: - {type: SF64:HITBOX, offset: 0x6036760, symbol: D_MA_6036760} +aMaFloor6Hitbox: + {type: SF64:HITBOX, offset: 0x6036760, symbol: aMaFloor6Hitbox} -D_MA_603677C: - {type: SF64:HITBOX, offset: 0x603677C, symbol: D_MA_603677C} +aMaActor207Hitbox: + {type: SF64:HITBOX, offset: 0x603677C, symbol: aMaActor207Hitbox} D_MA_6036818: {type: SF64:HITBOX, offset: 0x6036818, symbol: D_MA_6036818} @@ -919,20 +919,20 @@ D_MA_6036818: D_MA_6036894: {type: SF64:HITBOX, offset: 0x6036894, symbol: D_MA_6036894} -D_MA_60368E0: - {type: SF64:HITBOX, offset: 0x60368E0, symbol: D_MA_60368E0} +aMaGuillotineHitbox: + {type: SF64:HITBOX, offset: 0x60368E0, symbol: aMaGuillotineHitbox} D_MA_60368FC: {type: SF64:HITBOX, offset: 0x60368FC, symbol: D_MA_60368FC} -D_MA_6036930: - {type: SF64:HITBOX, offset: 0x6036930, symbol: D_MA_6036930} +aMaBombDropHitbox: + {type: SF64:HITBOX, offset: 0x6036930, symbol: aMaBombDropHitbox} -D_MA_603694C: - {type: SF64:HITBOX, offset: 0x603694C, symbol: D_MA_603694C} +aMaSpearHitbox: + {type: SF64:HITBOX, offset: 0x603694C, symbol: aMaSpearHitbox} -D_MA_6036968: - {type: SF64:HITBOX, offset: 0x6036968, symbol: D_MA_6036968} +aMaShockBoxHitbox: + {type: SF64:HITBOX, offset: 0x6036968, symbol: aMaShockBoxHitbox} D_MA_60381D8: {type: SF64:SCRIPT, offset: 0x60381D8, symbol: D_MA_60381D8} diff --git a/assets/yaml/jp/rev0/ast_meteo.yaml b/assets/yaml/jp/rev0/ast_meteo.yaml index 242222db..f97e017e 100644 --- a/assets/yaml/jp/rev0/ast_meteo.yaml +++ b/assets/yaml/jp/rev0/ast_meteo.yaml @@ -104,8 +104,8 @@ D_ME_600C740: D_ME_600CAA0: { type: GFX, offset: 0x600CAA0, symbol: D_ME_600CAA0 } -D_ME_600CD60: - { type: GFX, offset: 0x600CD60, symbol: D_ME_600CD60 } +aMeMeteorShower3DL: + { type: GFX, offset: 0x600CD60, symbol: aMeMeteorShower3DL } D_ME_600CDE8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x0600CDE8, symbol: D_ME_600CDE8 } @@ -137,8 +137,8 @@ D_ME_6014238: D_ME_6015238: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x06015238, symbol: D_ME_6015238 } -D_ME_6016240: - { type: GFX, offset: 0x6016240, symbol: D_ME_6016240 } +aMeMeteorShower2DL: + { type: GFX, offset: 0x6016240, symbol: aMeMeteorShower2DL } D_ME_60162C8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x060162C8, symbol: D_ME_60162C8 } @@ -146,20 +146,20 @@ D_ME_60162C8: D_ME_60172C8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x060172C8, symbol: D_ME_60172C8 } -D_ME_6017AD0: - { type: GFX, offset: 0x06017AD0, symbol: D_ME_6017AD0 } +aMeMeteorShower1DL: + { type: GFX, offset: 0x06017AD0, symbol: aMeMeteorShower1DL } D_ME_6017B60: { type: GFX, offset: 0x06017B60, symbol: D_ME_6017B60 } -D_ME_6018450: - { type: GFX, offset: 0x06018450, symbol: D_ME_6018450 } +aMeLaserCannon2DL: + { type: GFX, offset: 0x06018450, symbol: aMeLaserCannon2DL } D_ME_6018960: { type: GFX, offset: 0x06018960, symbol: D_ME_6018960 } -D_ME_6018C00: - { type: GFX, offset: 0x06018C00, symbol: D_ME_6018C00 } +aMeMeteor1DL: + { type: GFX, offset: 0x06018C00, symbol: aMeMeteor1DL } D_ME_6019430: { type: GFX, offset: 0x06019430, symbol: D_ME_6019430 } @@ -286,29 +286,29 @@ D_ME_602F604: D_ME_602F638: { type: SF64:HITBOX, offset: 0x602F638, symbol: D_ME_602F638 } -D_ME_602F684: - { type: SF64:HITBOX, offset: 0x602F684, symbol: D_ME_602F684 } +aMeMeteoBallHitbox: + { type: SF64:HITBOX, offset: 0x602F684, symbol: aMeMeteoBallHitbox } -D_ME_602F6A0: - { type: SF64:HITBOX, offset: 0x602F6A0, symbol: D_ME_602F6A0 } +aMeHopBotHitbox: + { type: SF64:HITBOX, offset: 0x602F6A0, symbol: aMeHopBotHitbox } -D_ME_602F6EC: - { type: SF64:HITBOX, offset: 0x602F6EC, symbol: D_ME_602F6EC } +aMeMeteor1Hitbox: + { type: SF64:HITBOX, offset: 0x602F6EC, symbol: aMeMeteor1Hitbox } -D_ME_602F708: - { type: SF64:HITBOX, offset: 0x602F708, symbol: D_ME_602F708 } +aMeMeteor2Hitbox: + { type: SF64:HITBOX, offset: 0x602F708, symbol: aMeMeteor2Hitbox } -D_ME_602F724: - { type: SF64:HITBOX, offset: 0x602F724, symbol: D_ME_602F724 } +aMeLaserCannon1Hitbox: + { type: SF64:HITBOX, offset: 0x602F724, symbol: aMeLaserCannon1Hitbox } -D_ME_602F740: - { type: SF64:HITBOX, offset: 0x602F740, symbol: D_ME_602F740 } +aMeLaserCannon2Hitbox: + { type: SF64:HITBOX, offset: 0x602F740, symbol: aMeLaserCannon2Hitbox } -D_ME_602F75C: - { type: SF64:HITBOX, offset: 0x602F75C, symbol: D_ME_602F75C } +aMeCrusherHitbox: + { type: SF64:HITBOX, offset: 0x602F75C, symbol: aMeCrusherHitbox } -D_ME_602FA50: - { type: SF64:HITBOX, offset: 0x602FA50, symbol: D_ME_602FA50 } +aMeCrusherShieldHitbox: + { type: SF64:HITBOX, offset: 0x602FA50, symbol: aMeCrusherShieldHitbox } D_ME_602FA9C: {type: SF64:COLPOLY, count: 79, offset: 0x602FA9C, symbol: D_ME_602FA9C, mesh_symbol: D_ME_OFFSET } diff --git a/assets/yaml/jp/rev0/ast_sector_x.yaml b/assets/yaml/jp/rev0/ast_sector_x.yaml index 44423c6f..77373c91 100644 --- a/assets/yaml/jp/rev0/ast_sector_x.yaml +++ b/assets/yaml/jp/rev0/ast_sector_x.yaml @@ -247,14 +247,14 @@ D_SX_603238C: D_SX_6032408: { type: SF64:HITBOX, offset: 0x6032408, symbol: D_SX_6032408 } -D_SX_6032488: - { type: SF64:HITBOX, offset: 0x6032488, symbol: D_SX_6032488 } +aSxSpyborgLeftArmHitbox: + { type: SF64:HITBOX, offset: 0x6032488, symbol: aSxSpyborgLeftArmHitbox } -D_SX_60324EC: - { type: SF64:HITBOX, offset: 0x60324EC, symbol: D_SX_60324EC } +aSxSpyborgRightArmHitbox: + { type: SF64:HITBOX, offset: 0x60324EC, symbol: aSxSpyborgRightArmHitbox } -D_SX_6032550: - { type: SF64:HITBOX, offset: 0x6032550, symbol: D_SX_6032550 } +aSxSpyborgHitbox: + { type: SF64:HITBOX, offset: 0x6032550, symbol: aSxSpyborgHitbox } D_SX_603285C: { type: SF64:HITBOX, offset: 0x603285C, symbol: D_SX_603285C } diff --git a/assets/yaml/jp/rev0/ast_sector_y.yaml b/assets/yaml/jp/rev0/ast_sector_y.yaml index 8384bd9b..4e0ef4dd 100644 --- a/assets/yaml/jp/rev0/ast_sector_y.yaml +++ b/assets/yaml/jp/rev0/ast_sector_y.yaml @@ -35,11 +35,11 @@ D_SY_6003348: D_SY_60034C4: { type: SF64:ANIM, offset: 0x60034C4, symbol: D_SY_60034C4 } -D_SY_60034D0: - { type: GFX, offset: 0x60034D0, symbol: D_SY_60034D0 } +aSyShipWindowsDL: + { type: GFX, offset: 0x60034D0, symbol: aSyShipWindowsDL } -D_SY_60036A0: - { type: GFX, offset: 0x60036A0, symbol: D_SY_60036A0 } +aSyShip3DestroyedDL: + { type: GFX, offset: 0x60036A0, symbol: aSyShip3DestroyedDL } D_SY_6004958: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06004958, symbol: D_SY_6004958 } @@ -47,8 +47,8 @@ D_SY_6004958: D_SY_6005158: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06005158, symbol: D_SY_6005158 } -D_SY_6005360: - { type: GFX, offset: 0x6005360, symbol: D_SY_6005360 } +aSyShip4DL: + { type: GFX, offset: 0x6005360, symbol: aSyShip4DL } D_SY_6005BE0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06005BE0, symbol: D_SY_6005BE0 } @@ -74,8 +74,8 @@ D_SY_6008BE0: D_SY_6008FE0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06008FE0, symbol: D_SY_6008FE0 } -D_SY_60097E0: - { type: GFX, offset: 0x060097E0, symbol: D_SY_60097E0 } +aSyShip1DL: + { type: GFX, offset: 0x060097E0, symbol: aSyShip1DL } D_SY_600AAC0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x0600AAC0, symbol: D_SY_600AAC0 } @@ -98,11 +98,11 @@ D_SY_600EAC0: D_SY_600F2C0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 32, offset: 0x0600F2C0, symbol: D_SY_600F2C0 } -D_SY_600F6C0: - { type: GFX, offset: 0x600F6C0, symbol: D_SY_600F6C0 } +aSyShip4DestroyedDL: + { type: GFX, offset: 0x600F6C0, symbol: aSyShip4DestroyedDL } -D_SY_60102C0: - { type: GFX, offset: 0x60102C0, symbol: D_SY_60102C0 } +aSyShip3DL: + { type: GFX, offset: 0x60102C0, symbol: aSyShip3DL } D_SY_6011758: { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x06011758, symbol: D_SY_6011758 } @@ -158,8 +158,8 @@ D_SY_6015960: D_SY_6015B60: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06015B60, symbol: D_SY_6015B60 } -D_SY_60188D0: - { type: GFX, offset: 0x60188D0, symbol: D_SY_60188D0 } +aSyShipProjectileDL: + { type: GFX, offset: 0x60188D0, symbol: aSyShipProjectileDL } D_SY_60183B0: { type: GFX, offset: 0x60183B0, symbol: D_SY_60183B0 } @@ -176,20 +176,20 @@ D_SY_601AD70: D_SY_601AE08: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601AE08, symbol: D_SY_601AE08 } -D_SY_601B610: - { type: GFX, offset: 0x601B610, symbol: D_SY_601B610 } +aSyShip2SpriteDL: + { type: GFX, offset: 0x601B610, symbol: aSyShip2SpriteDL } D_SY_601B6A0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x0601B6A0, symbol: D_SY_601B6A0 } -D_SY_601C6A0: - { type: GFX, offset: 0x601C6A0, symbol: D_SY_601C6A0 } +aSyShip3SpriteDL: + { type: GFX, offset: 0x601C6A0, symbol: aSyShip3SpriteDL } D_SY_601C730: { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x0601C730, symbol: D_SY_601C730 } -D_SY_601D730: - { type: GFX, offset: 0x601D730, symbol: D_SY_601D730 } +aSyShip2DL: + { type: GFX, offset: 0x601D730, symbol: aSyShip2DL } D_SY_601F3B8: { type: SF64:ANIM, offset: 0x601F3B8, symbol: D_SY_601F3B8 } @@ -308,8 +308,8 @@ D_SY_6032E18: D_SY_6033070: {type: SF64:COLPOLY, count: 174, offset: 0x6033070, symbol: D_SY_6033070, mesh_symbol: D_SY_6033E08 } -D_SY_603405C: - { type: SF64:HITBOX, offset: 0x603405C, symbol: D_SY_603405C } +aSyRobotHitbox: + { type: SF64:HITBOX, offset: 0x603405C, symbol: aSyRobotHitbox } D_SY_60340C0: { type: SF64:HITBOX, offset: 0x60340C0, symbol: D_SY_60340C0 } @@ -329,34 +329,34 @@ D_SY_60342A0: D_SY_6034304: { type: SF64:HITBOX, offset: 0x6034304, symbol: D_SY_6034304 } -D_SY_6034368: - { type: SF64:HITBOX, offset: 0x6034368, symbol: D_SY_6034368 } +aSyScenery156Hitbox: + { type: SF64:HITBOX, offset: 0x6034368, symbol: aSyScenery156Hitbox } D_SY_603445C: { type: SF64:HITBOX, offset: 0x603445C, symbol: D_SY_603445C } -D_SY_6034478: - { type: SF64:HITBOX, offset: 0x6034478, symbol: D_SY_6034478 } +aSyShip1Hitbox: + { type: SF64:HITBOX, offset: 0x6034478, symbol: aSyShip1Hitbox } -D_SY_603450C: - { type: SF64:HITBOX, offset: 0x603450C, symbol: D_SY_603450C } +aSyShip2Hitbox: + { type: SF64:HITBOX, offset: 0x603450C, symbol: aSyShip2Hitbox } -D_SY_6034588: - { type: SF64:HITBOX, offset: 0x6034588, symbol: D_SY_6034588 } +aSyShip3Hitbox: + { type: SF64:HITBOX, offset: 0x6034588, symbol: aSyShip3Hitbox } -D_SY_6034664: - { type: SF64:HITBOX, offset: 0x6034664, symbol: D_SY_6034664 } +aSyShip3DestroyedHitbox: + { type: SF64:HITBOX, offset: 0x6034664, symbol: aSyShip3DestroyedHitbox } -D_SY_6034770: - { type: SF64:HITBOX, offset: 0x6034770, symbol: D_SY_6034770 } +aSyShip4Hitbox: + { type: SF64:HITBOX, offset: 0x6034770, symbol: aSyShip4Hitbox } -D_SY_60347D4: - { type: SF64:HITBOX, offset: 0x60347D4, symbol: D_SY_60347D4 } +aSyShipWindowsHitbox: + { type: SF64:HITBOX, offset: 0x60347D4, symbol: aSyShipWindowsHitbox } -D_SY_60347F0: - { type: SF64:HITBOX, offset: 0x60347F0, symbol: D_SY_60347F0 } +aSyShip4DestroyedHitbox: + { type: SF64:HITBOX, offset: 0x60347F0, symbol: aSyShip4DestroyedHitbox } -D_SY_603486C: - { type: SF64:HITBOX, offset: 0x603486C, symbol: D_SY_603486C } +aSyShipProjectileHitbox: + { type: SF64:HITBOX, offset: 0x603486C, symbol: aSyShipProjectileHitbox } # size = 0x34890 \ No newline at end of file diff --git a/assets/yaml/jp/rev0/ast_sector_z.yaml b/assets/yaml/jp/rev0/ast_sector_z.yaml index 96233307..7357255e 100644 --- a/assets/yaml/jp/rev0/ast_sector_z.yaml +++ b/assets/yaml/jp/rev0/ast_sector_z.yaml @@ -85,8 +85,8 @@ D_SZ_60041F8: D_SZ_60042F8: { type: TEXTURE, ctype: u16, format: TLUT, colors: 24, offset: 0x060042F8, symbol: D_SZ_60042F8 } -D_SZ_6004330: - { type: GFX, offset: 0x6004330, symbol: D_SZ_6004330 } +aSzMissileMark: + { type: GFX, offset: 0x6004330, symbol: aSzMissileMark } D_SZ_6004458: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 8, offset: 0x06004458, symbol: D_SZ_6004458, tlut: 0x06004558 } @@ -160,13 +160,13 @@ D_SZ_6007558: D_SZ_6009230: { type: SF64:HITBOX, offset: 0x6009230, symbol: D_SZ_6009230 } -D_SZ_600924C: - { type: SF64:HITBOX, offset: 0x600924C, symbol: D_SZ_600924C } +aSzSpaceJunk3Hitbox: + { type: SF64:HITBOX, offset: 0x600924C, symbol: aSzSpaceJunk3Hitbox } -D_SZ_60092E8: - { type: SF64:HITBOX, offset: 0x60092E8, symbol: D_SZ_60092E8 } +aSzSpaceJunk1Hitbox: + { type: SF64:HITBOX, offset: 0x60092E8, symbol: aSzSpaceJunk1Hitbox } -D_SZ_6009388: - { type: SF64:HITBOX, offset: 0x6009388, symbol: D_SZ_6009388 } +aSzGreatFoxHitbox: + { type: SF64:HITBOX, offset: 0x6009388, symbol: aSzGreatFoxHitbox } # size = 0x93B0 \ No newline at end of file diff --git a/assets/yaml/jp/rev0/ast_titania.yaml b/assets/yaml/jp/rev0/ast_titania.yaml index d782b058..b4bf560a 100644 --- a/assets/yaml/jp/rev0/ast_titania.yaml +++ b/assets/yaml/jp/rev0/ast_titania.yaml @@ -76,11 +76,11 @@ D_TI_6005000: D_TI_600631C: {type: SF64:SCRIPT, offset: 0x600631C, symbol: D_TI_600631C} -D_TI_60064AC: - {type: SF64:HITBOX, offset: 0x60064AC, symbol: D_TI_60064AC} +aTi1LandmineHitbox: + {type: SF64:HITBOX, offset: 0x60064AC, symbol: aTi1LandmineHitbox} -D_TI_60064C8: - {type: SF64:HITBOX, offset: 0x60064C8, symbol: D_TI_60064C8} +aTiDesertRoverHitbox: + {type: SF64:HITBOX, offset: 0x60064C8, symbol: aTiDesertRoverHitbox} aTiSkullHitbox: {type: SF64:HITBOX, offset: 0x60064FC, symbol: aTiSkullHitbox} @@ -112,32 +112,32 @@ aTiRib7Hitbox: aTiRib8Hitbox: {type: SF64:HITBOX, offset: 0x6006778, symbol: aTiRib8Hitbox} -D_TI_60067C4: - {type: SF64:HITBOX, offset: 0x60067C4, symbol: D_TI_60067C4} +aTiDelphorHitbox: + {type: SF64:HITBOX, offset: 0x60067C4, symbol: aTiDelphorHitbox} -D_TI_6006808: - {type: SF64:HITBOX, offset: 0x6006808, symbol: D_TI_6006808} +aTiDelphorHeadHitbox: + {type: SF64:HITBOX, offset: 0x6006808, symbol: aTiDelphorHeadHitbox} -D_TI_6006A3C: - {type: SF64:HITBOX, offset: 0x6006A3C, symbol: D_TI_6006A3C} +aTiDesertCrawlerHitbox: + {type: SF64:HITBOX, offset: 0x6006A3C, symbol: aTiDesertCrawlerHitbox} -D_TI_600683C: - {type: SF64:HITBOX, offset: 0x600683C, symbol: D_TI_600683C} +aTiBoulderHitbox: + {type: SF64:HITBOX, offset: 0x600683C, symbol: aTiBoulderHitbox} -D_TI_6006858: - {type: SF64:HITBOX, offset: 0x6006858, symbol: D_TI_6006858} +aTiBombHitbox: + {type: SF64:HITBOX, offset: 0x6006858, symbol: aTiBombHitbox} D_TI_6006874: {type: SF64:HITBOX, offset: 0x6006874, symbol: D_TI_6006874} -D_TI_6006890: - {type: SF64:HITBOX, offset: 0x6006890, symbol: D_TI_6006890} +aTiRascoHitbox: + {type: SF64:HITBOX, offset: 0x6006890, symbol: aTiRascoHitbox} aTiCactusHitbox: {type: SF64:HITBOX, offset: 0x60068BC, symbol: aTiCactusHitbox} -D_TI_60068F0: - {type: SF64:HITBOX, offset: 0x60068F0, symbol: D_TI_60068F0} +aTiFekudaHitbox: + {type: SF64:HITBOX, offset: 0x60068F0, symbol: aTiFekudaHitbox} D_TI_6006940: {type: SF64:HITBOX, offset: 0x6006940, symbol: D_TI_6006940} @@ -166,8 +166,8 @@ D_TI_6006A04: D_TI_6006A20: {type: SF64:HITBOX, offset: 0x6006A20, symbol: D_TI_6006A20} -D_TI_6006BF0: - {type: SF64:HITBOX, offset: 0x6006BF0, symbol: D_TI_6006BF0} +aTiPillarHitbox: + {type: SF64:HITBOX, offset: 0x6006BF0, symbol: aTiPillarHitbox} D_TI_6006924: {type: SF64:HITBOX, offset: 0x6006924, symbol: D_TI_6006924} @@ -178,8 +178,8 @@ D_TI_6006C0C: D_TI_6006C28: {type: SF64:HITBOX, offset: 0x6006C28, symbol: D_TI_6006C28} -D_TI_6006C44: - {type: SF64:HITBOX, offset: 0x6006C44, symbol: D_TI_6006C44} +aTiBridgeHitbox: + {type: SF64:HITBOX, offset: 0x6006C44, symbol: aTiBridgeHitbox} D_TI_6006C60: {type: SF64:OBJECT_INIT, offset: 0x6006C60, symbol: D_TI_6006C60} diff --git a/assets/yaml/jp/rev0/ast_training.yaml b/assets/yaml/jp/rev0/ast_training.yaml index 8b141c42..ca3aee22 100644 --- a/assets/yaml/jp/rev0/ast_training.yaml +++ b/assets/yaml/jp/rev0/ast_training.yaml @@ -31,8 +31,8 @@ D_TR_6002740: D_TR_60028F0: { type: TEXTURE, format: RGBA16, offset: 0x060028F0, width: 32, height: 32, ctype: u16, symbol: D_TR_60028F0 } -D_TR_60030F0: - { type: GFX, offset: 0x60030F0, symbol: D_TR_60030F0 } +aTrBuildingDL: + { type: GFX, offset: 0x60030F0, symbol: aTrBuildingDL } D_TR_6003360: { type: TEXTURE, format: RGBA16, offset: 0x06003360, width: 16, height: 16, ctype: u16, symbol: D_TR_6003360 } @@ -76,8 +76,8 @@ D_TR_6008EF8: D_TR_6009B34: { type: SF64:SCRIPT, offset: 0x6009B34, symbol: D_TR_6009B34 } -D_TR_6009CC4: - { type: SF64:HITBOX, offset: 0x6009CC4, symbol: D_TR_6009CC4 } +aTrBuildingHitbox: + { type: SF64:HITBOX, offset: 0x6009CC4, symbol: aTrBuildingHitbox } D_TR_6009CFC: { type: SF64:HITBOX, offset: 0x6009CFC, symbol: D_TR_6009CFC } diff --git a/assets/yaml/jp/rev0/ast_ve1_boss.yaml b/assets/yaml/jp/rev0/ast_ve1_boss.yaml index 4fd6bcc5..a5d6a967 100644 --- a/assets/yaml/jp/rev0/ast_ve1_boss.yaml +++ b/assets/yaml/jp/rev0/ast_ve1_boss.yaml @@ -50,8 +50,8 @@ D_VE1_90039F0: D_VE1_9003DF0: {type: TEXTURE, ctype: u16, format: TLUT, colors: 176, offset: 0x9003DF0, symbol: D_VE1_9003DF0} -D_VE1_9003F50: - {type: GFX, offset: 0x9003F50, symbol: D_VE1_9003F50} +aVe1TempleInterior1DL: + {type: GFX, offset: 0x9003F50, symbol: aVe1TempleInterior1DL} D_VE1_9004478: {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 32, offset: 0x9004478, symbol: D_VE1_9004478} @@ -65,8 +65,8 @@ D_VE1_9005078: D_VE1_9005478: {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x9005478, symbol: D_VE1_9005478} -D_VE1_9005C80: - {type: GFX, offset: 0x9005C80, symbol: D_VE1_9005C80} +aVe1TempleEntranceDL: + {type: GFX, offset: 0x9005C80, symbol: aVe1TempleEntranceDL} D_VE1_9009700: {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x9009700, symbol: D_VE1_9009700} @@ -92,8 +92,8 @@ D_VE1_900BF00: D_VE1_900C700: {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x900C700, symbol: D_VE1_900C700} -D_VE1_900D098: - {type: SF64:ANIM, offset: 0x900D098, symbol: D_VE1_900D098} +aVe1MonkeyStatueAnim: + {type: SF64:ANIM, offset: 0x900D098, symbol: aVe1MonkeyStatueAnim} D_VE1_900D164: {type: SF64:SKELETON, offset: 0x900D164, symbol: D_VE1_900D164} @@ -104,8 +104,8 @@ D_VE1_900D180: D_VE1_900D520: {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x900D520, symbol: D_VE1_900D520} -D_VE1_900DD20: - {type: GFX, offset: 0x900DD20, symbol: D_VE1_900DD20} +aVe1Pillar1DL: + {type: GFX, offset: 0x900DD20, symbol: aVe1Pillar1DL} D_VE1_900DF20: {type: GFX, offset: 0x900DF20, symbol: D_VE1_900DF20} @@ -116,11 +116,11 @@ D_VE1_900DFB8: D_VE1_900EFC0: {type: GFX, offset: 0x900EFC0, symbol: D_VE1_900EFC0} -D_VE1_900F060: - {type: GFX, offset: 0x900F060, symbol: D_VE1_900F060} +aVe1TempleInterior2DL: + {type: GFX, offset: 0x900F060, symbol: aVe1TempleInterior2DL} -D_VE1_900F1D0: - {type: GFX, offset: 0x900F1D0, symbol: D_VE1_900F1D0} +aVe1TempleInterior3DL: + {type: GFX, offset: 0x900F1D0, symbol: aVe1TempleInterior3DL} D_VE1_9010FC4: {type: SF64:ANIM, offset: 0x9010FC4, symbol: D_VE1_9010FC4} @@ -179,8 +179,8 @@ D_VE1_901C0F4: D_VE1_901DA38: {type: SF64:ANIM, offset: 0x901DA38, symbol: D_VE1_901DA38} -D_VE1_901DA50: - {type: GFX, offset: 0x901DA50, symbol: D_VE1_901DA50} +aVe1Pillar3DL: + {type: GFX, offset: 0x901DA50, symbol: aVe1Pillar3DL} D_VE1_901DC90: {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 32, offset: 0x901DC90, symbol: D_VE1_901DC90} @@ -230,8 +230,8 @@ D_VE1_90234D0: D_VE1_9023880: {type: GFX, offset: 0x9023880, symbol: D_VE1_9023880} -D_VE1_9023AD0: - {type: GFX, offset: 0x9023AD0, symbol: D_VE1_9023AD0} +aVe1Pillar4DL: + {type: GFX, offset: 0x9023AD0, symbol: aVe1Pillar4DL} D_VE1_9024738: {type: SF64:ANIM, offset: 0x9024738, symbol: D_VE1_9024738} diff --git a/assets/yaml/jp/rev0/ast_venom_1.yaml b/assets/yaml/jp/rev0/ast_venom_1.yaml index a533e8fb..b012c997 100644 --- a/assets/yaml/jp/rev0/ast_venom_1.yaml +++ b/assets/yaml/jp/rev0/ast_venom_1.yaml @@ -46,8 +46,8 @@ D_VE1_6003078: D_VE1_6003478: { type: TEXTURE, format: TLUT, colors: 204, offset: 0x6003478, ctype: u16, symbol: D_VE1_6003478 } -D_VE1_6003610: - { type: GFX, offset: 0x6003610, symbol: D_VE1_6003610 } +aVe1WatchPostDL: + { type: GFX, offset: 0x6003610, symbol: aVe1WatchPostDL } D_VE1_6003B10: { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6003B10, ctype: u16, symbol: D_VE1_6003B10 } @@ -70,8 +70,8 @@ D_VE1_60046F0: D_VE1_6004780: { type: TEXTURE, format: RGBA16, width: 64, height: 32, offset: 0x6004780, ctype: u16, symbol: D_VE1_6004780 } -D_VE1_6005780: - { type: GFX, offset: 0x6005780, symbol: D_VE1_6005780 } +aVe1GeneratorDL: + { type: GFX, offset: 0x6005780, symbol: aVe1GeneratorDL } D_VE1_6005E50: { type: TEXTURE, format: TLUT, colors: 160, offset: 0x6005E50, ctype: u16, symbol: D_VE1_6005E50 } @@ -97,11 +97,11 @@ D_VE1_60066D0: D_VE1_6006750: { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6006750, ctype: u16, symbol: D_VE1_6006750 } -D_VE1_6006F50: - { type: GFX, offset: 0x6006F50, symbol: D_VE1_6006F50 } +aVe1HallwayObstacleDL: + { type: GFX, offset: 0x6006F50, symbol: aVe1HallwayObstacleDL } -D_VE1_6007410: - { type: GFX, offset: 0x6007410, symbol: D_VE1_6007410 } +aVe1SceneryWall3DL: + { type: GFX, offset: 0x6007410, symbol: aVe1SceneryWall3DL } D_VE1_60074E8: { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x60074E8, ctype: u16, symbol: D_VE1_60074E8 } @@ -133,50 +133,50 @@ D_VE1_601B474: D_VE1_601B4C4: { type: SF64:HITBOX, offset: 0x601B4C4, symbol: D_VE1_601B4C4 } -D_VE1_601B4E0: - { type: SF64:HITBOX, offset: 0x601B4E0, symbol: D_VE1_601B4E0 } +aVe1SceneryWall1Hitbox: + { type: SF64:HITBOX, offset: 0x601B4E0, symbol: aVe1SceneryWall1Hitbox } -D_VE1_601B4FC: - { type: SF64:HITBOX, offset: 0x601B4FC, symbol: D_VE1_601B4FC } +aVe1SceneryWall2Hitbox: + { type: SF64:HITBOX, offset: 0x601B4FC, symbol: aVe1SceneryWall2Hitbox } -D_VE1_601B518: - { type: SF64:HITBOX, offset: 0x601B518, symbol: D_VE1_601B518 } +aVe1SceneryWall3Hitbox: + { type: SF64:HITBOX, offset: 0x601B518, symbol: aVe1SceneryWall3Hitbox } -D_VE1_601B584: - { type: SF64:HITBOX, offset: 0x601B584, symbol: D_VE1_601B584 } +aVe1HallwayObstacleHitbox: + { type: SF64:HITBOX, offset: 0x601B584, symbol: aVe1HallwayObstacleHitbox } -D_VE1_601B5F4: - { type: SF64:HITBOX, offset: 0x601B5F4, symbol: D_VE1_601B5F4 } +aVe1GeneratorHitbox: + { type: SF64:HITBOX, offset: 0x601B5F4, symbol: aVe1GeneratorHitbox } -D_VE1_601B644: - { type: SF64:HITBOX, offset: 0x601B644, symbol: D_VE1_601B644 } +aVe1WatchPostHitbox: + { type: SF64:HITBOX, offset: 0x601B644, symbol: aVe1WatchPostHitbox } -D_VE1_601B678: - { type: SF64:HITBOX, offset: 0x601B678, symbol: D_VE1_601B678 } +aVe1TempleEntranceHitbox: + { type: SF64:HITBOX, offset: 0x601B678, symbol: aVe1TempleEntranceHitbox } -D_VE1_601B6C4: - { type: SF64:HITBOX, offset: 0x601B6C4, symbol: D_VE1_601B6C4 } +aVe1TempleInterior1Hitbox: + { type: SF64:HITBOX, offset: 0x601B6C4, symbol: aVe1TempleInterior1Hitbox } -D_VE1_601B710: - { type: SF64:HITBOX, offset: 0x601B710, symbol: D_VE1_601B710 } +aVe1TempleInterior2Hitbox: + { type: SF64:HITBOX, offset: 0x601B710, symbol: aVe1TempleInterior2Hitbox } -D_VE1_601B75C: - { type: SF64:HITBOX, offset: 0x601B75C, symbol: D_VE1_601B75C } +aVe1TempleInterior3Hitbox: + { type: SF64:HITBOX, offset: 0x601B75C, symbol: aVe1TempleInterior3Hitbox } -D_VE1_601B7F8: - { type: SF64:HITBOX, offset: 0x601B7F8, symbol: D_VE1_601B7F8 } +aVe1Pillar1Hitbox: + { type: SF64:HITBOX, offset: 0x601B7F8, symbol: aVe1Pillar1Hitbox } -D_VE1_601B830: - { type: SF64:HITBOX, offset: 0x601B830, symbol: D_VE1_601B830 } +aVe1Pillar2Hitbox: + { type: SF64:HITBOX, offset: 0x601B830, symbol: aVe1Pillar2Hitbox } -D_VE1_601B868: - { type: SF64:HITBOX, offset: 0x601B868, symbol: D_VE1_601B868 } +aVe1Pillar3Hitbox: + { type: SF64:HITBOX, offset: 0x601B868, symbol: aVe1Pillar3Hitbox } -D_VE1_601B8A0: - { type: SF64:HITBOX, offset: 0x601B8A0, symbol: D_VE1_601B8A0 } +aVe1Pillar4Hitbox: + { type: SF64:HITBOX, offset: 0x601B8A0, symbol: aVe1Pillar4Hitbox } -D_VE1_601B8D8: - { type: SF64:HITBOX, offset: 0x601B8D8, symbol: D_VE1_601B8D8 } +aVe1MonkeyStatueHitbox: + { type: SF64:HITBOX, offset: 0x601B8D8, symbol: aVe1MonkeyStatueHitbox } D_VE1_601B944: { type: SF64:HITBOX, offset: 0x601B944, symbol: D_VE1_601B944 } \ No newline at end of file diff --git a/assets/yaml/jp/rev0/ast_venom_2.yaml b/assets/yaml/jp/rev0/ast_venom_2.yaml index fd597c94..8f644d57 100644 --- a/assets/yaml/jp/rev0/ast_venom_2.yaml +++ b/assets/yaml/jp/rev0/ast_venom_2.yaml @@ -27,11 +27,11 @@ D_VE2_60020D0: D_VE2_6002890: { type: TEXTURE, format: IA8, width: 16, height: 16, offset: 0x6002890, ctype: u8, symbol: D_VE2_6002890 } -D_VE2_6002990: - { type: GFX, offset: 0x6002990, symbol: D_VE2_6002990 } +aAndPathExitDL: + { type: GFX, offset: 0x6002990, symbol: aAndPathExitDL } -D_VE2_6003000: - { type: GFX, offset: 0x6003000, symbol: D_VE2_6003000 } +aAndPathIntersectionDL: + { type: GFX, offset: 0x6003000, symbol: aAndPathIntersectionDL } D_VE2_60038E0: { type: GFX, offset: 0x60038E0, symbol: D_VE2_60038E0 } @@ -39,8 +39,8 @@ D_VE2_60038E0: D_VE2_6003970: { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6003970, ctype: u16, symbol: D_VE2_6003970 } -D_VE2_6004170: - { type: GFX, offset: 0x6004170, symbol: D_VE2_6004170 } +aAndPathEntranceDL: + { type: GFX, offset: 0x6004170, symbol: aAndPathEntranceDL } D_VE2_6004888: { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6004888, ctype: u16, symbol: D_VE2_6004888 } @@ -57,8 +57,8 @@ D_VE2_6006088: D_VE2_60030D8: { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x60030D8, ctype: u16, symbol: D_VE2_60030D8 } -D_VE2_6006890: - { type: GFX, offset: 0x6006890, symbol: D_VE2_6006890 } +aAndPathWallsDL: + { type: GFX, offset: 0x6006890, symbol: aAndPathWallsDL } D_VE2_6006E20: { type: GFX, offset: 0x6006E20, symbol: D_VE2_6006E20 } @@ -72,8 +72,8 @@ D_VE2_6007E20: D_VE2_6008170: { type: TEXTURE, format: RGBA16, width: 16, height: 16, offset: 0x6008170, ctype: u16, symbol: D_VE2_6008170 } -D_VE2_6008370: - { type: GFX, offset: 0x6008370, symbol: D_VE2_6008370 } +aVe2TowerDL: + { type: GFX, offset: 0x6008370, symbol: aVe2TowerDL } D_VE2_6008AF8: { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6008AF8, ctype: u16, symbol: D_VE2_6008AF8 } @@ -162,8 +162,8 @@ D_VE2_600F700: D_VE2_6010700: { type: GFX, offset: 0x6010700, symbol: D_VE2_6010700 } -D_VE2_6010960: - { type: GFX, offset: 0x6010960, symbol: D_VE2_6010960 } +aVe2MountainDL: + { type: GFX, offset: 0x6010960, symbol: aVe2MountainDL } D_VE2_6010CA0: { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6010CA0, ctype: u16, symbol: D_VE2_6010CA0 } @@ -195,11 +195,11 @@ D_VE2_6014D94: D_VE2_6014FEC: { type: SF64:COLPOLY, count: 250, offset: 0x6014FEC, symbol: D_VE2_6014FEC, mesh_symbol: D_VE2_OFFSET } -D_VE2_601668C: - { type: SF64:HITBOX, offset: 0x601668C, symbol: D_VE2_601668C } +aVe2TowerHitbox: + { type: SF64:HITBOX, offset: 0x601668C, symbol: aVe2TowerHitbox } -D_VE2_60166F4: - { type: SF64:HITBOX, offset: 0x60166F4, symbol: D_VE2_60166F4 } +aVe2BaseHitbox: + { type: SF64:HITBOX, offset: 0x60166F4, symbol: aVe2BaseHitbox } -D_VE2_6016714: - { type: SF64:HITBOX, offset: 0x6016714, symbol: D_VE2_6016714 } \ No newline at end of file +aVe2MountainHitbox: + { type: SF64:HITBOX, offset: 0x6016714, symbol: aVe2MountainHitbox } \ No newline at end of file diff --git a/assets/yaml/jp/rev0/ast_versus.yaml b/assets/yaml/jp/rev0/ast_versus.yaml index 1e778a7f..75b6f5e2 100644 --- a/assets/yaml/jp/rev0/ast_versus.yaml +++ b/assets/yaml/jp/rev0/ast_versus.yaml @@ -182,8 +182,8 @@ D_versus_300EC80: D_versus_300EE80: { type: GFX, offset: 0x300EE80, symbol: D_versus_300EE80} -D_versus_300FB80: - { type: GFX, offset: 0x300FB80, symbol: D_versus_300FB80} +aVsLandmasterModelDL: + { type: GFX, offset: 0x300FB80, symbol: aVsLandmasterModelDL} D_versus_3010690: {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x3010690, symbol: D_versus_3010690 } @@ -203,14 +203,14 @@ D_versus_3011E40: D_versus_3011ED0: {type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x3011ED0, symbol: D_versus_3011ED0 } -D_versus_3012ED0: - { type: GFX, offset: 0x3012ED0, symbol: D_versus_3012ED0} +aVsSpaceJunk3DL: + { type: GFX, offset: 0x3012ED0, symbol: aVsSpaceJunk3DL} -D_versus_3013580: - { type: GFX, offset: 0x3013580, symbol: D_versus_3013580} +aVsSpaceJunk2DL: + { type: GFX, offset: 0x3013580, symbol: aVsSpaceJunk2DL} -D_versus_3013780: - { type: GFX, offset: 0x3013780, symbol: D_versus_3013780} +aVsSpaceJunk1DL: + { type: GFX, offset: 0x3013780, symbol: aVsSpaceJunk1DL} D_versus_3013F50: {type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x3013F50, symbol: D_versus_3013F50, tlut: 0x3014350 } @@ -245,8 +245,8 @@ D_versus_30160A0: D_versus_30162F8: {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x30162F8, symbol: D_versus_30162F8 } -D_versus_3016B00: - { type: GFX, offset: 0x3016B00, symbol: D_versus_3016B00} +aVsKaFlBaseDL: + { type: GFX, offset: 0x3016B00, symbol: aVsKaFlBaseDL} D_versus_3016DC0: {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x3016DC0, symbol: D_versus_3016DC0 } @@ -257,14 +257,14 @@ D_versus_3016FC0: D_versus_30171C0: {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x30171C0, symbol: D_versus_30171C0 } -D_versus_30173C0: - { type: GFX, offset: 0x30173C0, symbol: D_versus_30173C0} +aVsPyramid1DL: + { type: GFX, offset: 0x30173C0, symbol: aVsPyramid1DL} -D_versus_30174E0: - { type: GFX, offset: 0x30174E0, symbol: D_versus_30174E0} +aVsPyramid2DL: + { type: GFX, offset: 0x30174E0, symbol: aVsPyramid2DL} -D_versus_3017600: - { type: GFX, offset: 0x3017600, symbol: D_versus_3017600} +aVsBuildingDL: + { type: GFX, offset: 0x3017600, symbol: aVsBuildingDL} D_versus_3017800: {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x3017800, symbol: D_versus_3017800 } @@ -299,8 +299,8 @@ D_versus_301AEF0: D_versus_301AF78: {type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x301AF78, symbol: D_versus_301AF78 } -D_versus_301B080: - { type: GFX, offset: 0x301B080, symbol: D_versus_301B080} +aVsArchDL: + { type: GFX, offset: 0x301B080, symbol: aVsArchDL} D_versus_301B438: {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x301B438, symbol: D_versus_301B438 } @@ -320,8 +320,8 @@ D_versus_301C0A4: D_versus_301C3A8: { type: SF64:ANIM, offset: 0x301C3A8, symbol: D_versus_301C3A8} -D_versus_301C614: - { type: SF64:SKELETON, offset: 0x301C614, symbol: D_versus_301C614 } +aVsOnFootFalcoSkel: + { type: SF64:SKELETON, offset: 0x301C614, symbol: aVsOnFootFalcoSkel } D_versus_301C79C: { type: SF64:ANIM, offset: 0x301C79C, symbol: D_versus_301C79C } @@ -335,8 +335,8 @@ D_versus_301CCE4: D_versus_301CFEC: { type: SF64:ANIM, offset: 0x301CFEC, symbol: D_versus_301CFEC} -D_versus_301D258: - { type: SF64:SKELETON, offset: 0x301D258, symbol: D_versus_301D258 } +aVsOnFootFoxSkel: + { type: SF64:SKELETON, offset: 0x301D258, symbol: aVsOnFootFoxSkel } D_versus_301D3DC: { type: SF64:ANIM, offset: 0x301D3DC, symbol: D_versus_301D3DC } @@ -347,8 +347,8 @@ D_versus_301D568: D_versus_301D888: { type: SF64:ANIM, offset: 0x301D888, symbol: D_versus_301D888} -D_versus_301DB94: - { type: SF64:SKELETON, offset: 0x301DB94, symbol: D_versus_301DB94 } +aVsOnFootPeppySkel: + { type: SF64:SKELETON, offset: 0x301DB94, symbol: aVsOnFootPeppySkel } D_versus_301DD6C: { type: SF64:ANIM, offset: 0x301DD6C, symbol: D_versus_301DD6C } @@ -359,8 +359,8 @@ D_versus_301DEA4: D_versus_301E19C: { type: SF64:ANIM, offset: 0x301E19C, symbol: D_versus_301E19C} -D_versus_301E3E8: - { type: SF64:SKELETON, offset: 0x301E3E8, symbol: D_versus_301E3E8 } +aVsOnFootSlippySkel: + { type: SF64:SKELETON, offset: 0x301E3E8, symbol: aVsOnFootSlippySkel } D_versus_301E560: { type: SF64:ANIM, offset: 0x301E560, symbol: D_versus_301E560} @@ -395,8 +395,8 @@ D_versus_301EEB0: D_versus_301EF38: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x301EF38, symbol: D_versus_301EF38 } -D_versus_301F140: - { type: GFX, offset: 0x301F140, symbol: D_versus_301F140} +aVsLandmasterCanonDL: + { type: GFX, offset: 0x301F140, symbol: aVsLandmasterCanonDL} D_versus_301F2E0: { type: GFX, offset: 0x301F2E0, symbol: D_versus_301F2E0} @@ -704,26 +704,26 @@ D_versus_302E170: D_versus_302E378: { type: SF64:OBJECT_INIT, offset: 0x302E378, symbol: D_versus_302E378} -D_versus_302ED4C: - { type: SF64:HITBOX, offset: 0x302ED4C, symbol: D_versus_302ED4C} +aVsSpaceJunk1Hitbox: + { type: SF64:HITBOX, offset: 0x302ED4C, symbol: aVsSpaceJunk1Hitbox} -D_versus_302ED98: - { type: SF64:HITBOX, offset: 0x302ED98, symbol: D_versus_302ED98} +aVsSpaceJunk2Hitbox: + { type: SF64:HITBOX, offset: 0x302ED98, symbol: aVsSpaceJunk2Hitbox} -D_versus_302EDB4: - { type: SF64:HITBOX, offset: 0x302EDB4, symbol: D_versus_302EDB4} +aVsSpaceJunk3Hitbox: + { type: SF64:HITBOX, offset: 0x302EDB4, symbol: aVsSpaceJunk3Hitbox} -D_versus_302EE00: - { type: SF64:HITBOX, offset: 0x302EE00, symbol: D_versus_302EE00} +aVsKaFlBaseHitbox: + { type: SF64:HITBOX, offset: 0x302EE00, symbol: aVsKaFlBaseHitbox} -D_versus_302EE64: - { type: SF64:HITBOX, offset: 0x302EE64, symbol: D_versus_302EE64} +aVsBuilding1Hibox: + { type: SF64:HITBOX, offset: 0x302EE64, symbol: aVsBuilding1Hibox} -D_versus_302EE80: - { type: SF64:HITBOX, offset: 0x302EE80, symbol: D_versus_302EE80} +aVsBuilding2Hibox: + { type: SF64:HITBOX, offset: 0x302EE80, symbol: aVsBuilding2Hibox} -D_versus_302EE9C: - { type: SF64:HITBOX, offset: 0x302EE9C, symbol: D_versus_302EE9C} +aVsArchHitbox: + { type: SF64:HITBOX, offset: 0x302EE9C, symbol: aVsArchHitbox} D_versus_302EEE8: { type: SF64:TRIANGLE, count: 4, offset: 0x302EEE8, symbol: D_versus_302EEE8, mesh_symbol: D_versus_OFFSET} diff --git a/assets/yaml/jp/rev0/ast_zoness.yaml b/assets/yaml/jp/rev0/ast_zoness.yaml index 8f634226..1dd6ae6a 100644 --- a/assets/yaml/jp/rev0/ast_zoness.yaml +++ b/assets/yaml/jp/rev0/ast_zoness.yaml @@ -141,14 +141,14 @@ D_ZO_600E5EC: D_ZO_600E7D8: { type: SF64:SKELETON, offset: 0x600E7D8, symbol: D_ZO_600E7D8} -D_ZO_600E820: - { type: GFX, offset: 0x600E820, symbol: D_ZO_600E820} +aZoOilRig3DL: + { type: GFX, offset: 0x600E820, symbol: aZoOilRig3DL} -D_ZO_600EC90: - { type: GFX, offset: 0x600EC90, symbol: D_ZO_600EC90} +aZoOilRig2DL: + { type: GFX, offset: 0x600EC90, symbol: aZoOilRig2DL} -D_ZO_600F560: - { type: GFX, offset: 0x600F560, symbol: D_ZO_600F560} +aZoOilRig1DL: + { type: GFX, offset: 0x600F560, symbol: aZoOilRig1DL} D_ZO_600FE58: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x600FE58, symbol: D_ZO_600FE58} @@ -225,8 +225,8 @@ D_ZO_6017810: D_ZO_60178B0: { type: GFX, offset: 0x60178B0, symbol: D_ZO_60178B0} -D_ZO_6017950: - { type: GFX, offset: 0x6017950, symbol: D_ZO_6017950} +aZoBallDL: + { type: GFX, offset: 0x6017950, symbol: aZoBallDL} D_ZO_60179D8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60179D8, symbol: D_ZO_60179D8} @@ -366,8 +366,8 @@ D_ZO_601FBC4: D_ZO_601FC90: { type: SF64:SKELETON, offset: 0x601FC90, symbol: D_ZO_601FC90} -D_ZO_601FCB0: - { type: GFX, offset: 0x601FCB0, symbol: D_ZO_601FCB0} +aZoIslandDL: + { type: GFX, offset: 0x601FCB0, symbol: aZoIslandDL} D_ZO_60201B0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60201B0, symbol: D_ZO_60201B0} @@ -471,8 +471,8 @@ D_ZO_6024220: D_ZO_60242B8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60242B8, symbol: D_ZO_60242B8} -aZoRock1DL: - { type: GFX, offset: 0x6024AC0, symbol: aZoRock1DL} +aZoRockDL: + { type: GFX, offset: 0x6024AC0, symbol: aZoRockDL} D_ZO_6024D60: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6024D60, symbol: D_ZO_6024D60} @@ -502,59 +502,59 @@ D_ZO_602AC50: D_ZO_602AE94: { type: ARRAY, count: 242, array_type: Vec3f, offset: 0x602AE94, symbol: D_ZO_602AE94} -aZoRock1Hitbox: - { type: SF64:HITBOX, offset: 0x602B9EC, symbol: aZoRock1Hitbox} +aZoRockHitbox: + { type: SF64:HITBOX, offset: 0x602B9EC, symbol: aZoRockHitbox} -D_ZO_602BA20: - { type: SF64:HITBOX, offset: 0x602BA20, symbol: D_ZO_602BA20} +aZoOilRig1Hitbox: + { type: SF64:HITBOX, offset: 0x602BA20, symbol: aZoOilRig1Hitbox} -D_ZO_602BAE4: - { type: SF64:HITBOX, offset: 0x602BAE4, symbol: D_ZO_602BAE4} +aZoOilRig2Hitbox: + { type: SF64:HITBOX, offset: 0x602BAE4, symbol: aZoOilRig2Hitbox} -D_ZO_602BBD8: - { type: SF64:HITBOX, offset: 0x602BBD8, symbol: D_ZO_602BBD8} +aZoOilRig3Hitbox: + { type: SF64:HITBOX, offset: 0x602BBD8, symbol: aZoOilRig3Hitbox} -D_ZO_602BC54: - { type: SF64:HITBOX, offset: 0x602BC54, symbol: D_ZO_602BC54} +aZoIslandHitbox: + { type: SF64:HITBOX, offset: 0x602BC54, symbol: aZoIslandHitbox} -D_ZO_602BC58: - { type: SF64:HITBOX, offset: 0x602BC58, symbol: D_ZO_602BC58} +aZoDodoraHitbox: + { type: SF64:HITBOX, offset: 0x602BC58, symbol: aZoDodoraHitbox} -D_ZO_602BE3C: - { type: SF64:HITBOX, offset: 0x602BE3C, symbol: D_ZO_602BE3C} +aZoTroikaHitbox: + { type: SF64:HITBOX, offset: 0x602BE3C, symbol: aZoTroikaHitbox} -D_ZO_602BE58: - { type: SF64:HITBOX, offset: 0x602BE58, symbol: D_ZO_602BE58} +aZoObnemaHitbox: + { type: SF64:HITBOX, offset: 0x602BE58, symbol: aZoObnemaHitbox} -D_ZO_602BFC4: - { type: SF64:HITBOX, offset: 0x602BFC4, symbol: D_ZO_602BFC4} +aZoBarrierHitbox: + { type: SF64:HITBOX, offset: 0x602BFC4, symbol: aZoBarrierHitbox} D_ZO_602C028: { type: SF64:HITBOX, offset: 0x602C028, symbol: D_ZO_602C028} -D_ZO_602C044: - { type: SF64:HITBOX, offset: 0x602C044, symbol: D_ZO_602C044} +aZoSarumarineHitbox: + { type: SF64:HITBOX, offset: 0x602C044, symbol: aZoSarumarineHitbox} D_ZO_602C1A0: { type: SF64:HITBOX, offset: 0x602C1A0, symbol: D_ZO_602C1A0} -D_ZO_602C1D4: - { type: SF64:HITBOX, offset: 0x602C1D4, symbol: D_ZO_602C1D4} +aZoCargoShipHitbox: + { type: SF64:HITBOX, offset: 0x602C1D4, symbol: aZoCargoShipHitbox} -D_ZO_602C218: - { type: SF64:HITBOX, offset: 0x602C218, symbol: D_ZO_602C218} +aZoContainerHitbox: + { type: SF64:HITBOX, offset: 0x602C218, symbol: aZoContainerHitbox} -D_ZO_602C234: - { type: SF64:HITBOX, offset: 0x602C234, symbol: D_ZO_602C234} +aZoRadarBuoyHitbox: + { type: SF64:HITBOX, offset: 0x602C234, symbol: aZoRadarBuoyHitbox} -D_ZO_602C250: - { type: SF64:HITBOX, offset: 0x602C250, symbol: D_ZO_602C250} +aZoSupplyCraneHitbox: + { type: SF64:HITBOX, offset: 0x602C250, symbol: aZoSupplyCraneHitbox} -D_ZO_602C294: - { type: SF64:HITBOX, offset: 0x602C294, symbol: D_ZO_602C294} +aZoBirdHitbox: + { type: SF64:HITBOX, offset: 0x602C294, symbol: aZoBirdHitbox} -D_ZO_602C2B0: - { type: SF64:HITBOX, offset: 0x602C2B0, symbol: D_ZO_602C2B0} +aZoSearchLightHitbox: + { type: SF64:HITBOX, offset: 0x602C2B0, symbol: aZoSearchLightHitbox} D_ZO_602C2CC: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x602C2CC, symbol: D_ZO_602C2CC} diff --git a/assets/yaml/us/rev1/ast_7_ti_1.yaml b/assets/yaml/us/rev1/ast_7_ti_1.yaml index 3e49b4c9..53dd2d2c 100644 --- a/assets/yaml/us/rev1/ast_7_ti_1.yaml +++ b/assets/yaml/us/rev1/ast_7_ti_1.yaml @@ -89,8 +89,8 @@ D_TI1_7005420: D_TI1_70067C4: { type: SF64:ANIM, offset: 0x70067C4, symbol: D_TI1_70067C4 } -D_TI1_7006990: - { type: SF64:SKELETON, offset: 0x7006990, symbol: D_TI1_7006990} +aTi1DesertCrawlerSkel: + { type: SF64:SKELETON, offset: 0x7006990, symbol: aTi1DesertCrawlerSkel} D_TI1_7006F74: { type: SF64:ANIM, offset: 0x7006F74, symbol: D_TI1_7006F74 } @@ -146,8 +146,8 @@ D_TI1_7009510: D_TI1_70096D8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x070096D8, symbol: D_TI1_70096D8 } -D_TI1_70098E0: - { type: GFX, offset: 0x70098E0, symbol: D_TI1_70098E0 } +aTiDelphorDL: + { type: GFX, offset: 0x70098E0, symbol: aTiDelphorDL } D_TI1_7009B58: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x07009B58, symbol: D_TI1_7009B58 } @@ -158,8 +158,8 @@ D_TI1_7009D60: D_TI1_700A190: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0700A190, symbol: D_TI1_700A190 } -D_TI1_700A990: - { type: GFX, offset: 0x700A990, symbol: D_TI1_700A990 } +aTi1BombDL: + { type: GFX, offset: 0x700A990, symbol: aTi1BombDL } D_TI1_700AAD8: { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x700AAD8, symbol: D_TI1_700AAD8, tlut: 0x700AB58 } @@ -167,8 +167,8 @@ D_TI1_700AAD8: D_TI1_700AB58: { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x700AB58, symbol: D_TI1_700AB58 } -D_TI1_700AB70: - { type: GFX, offset: 0x700AB70, symbol: D_TI1_700AB70 } +aTi1LandmineDL: + { type: GFX, offset: 0x700AB70, symbol: aTi1LandmineDL } D_TI1_700AEA8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x0700AEA8, symbol: D_TI1_700AEA8 } @@ -188,8 +188,8 @@ D_TI1_700B9C0: D_TI1_700BB10: { type: GFX, offset: 0x700BB10, symbol: D_TI1_700BB10 } -D_TI1_700BE00: - { type: GFX, offset: 0x700BE00, symbol: D_TI1_700BE00 } +aTiBridgeDL: + { type: GFX, offset: 0x700BE00, symbol: aTiBridgeDL } D_TI1_700BFB0: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x0700BFB0, symbol: D_TI1_700BFB0, tlut: 0x0700C3B0 } @@ -200,11 +200,11 @@ D_TI1_700C3B0: D_TI1_700C4B0: { type: GFX, offset: 0x700C4B0, symbol: D_TI1_700C4B0 } -D_TI1_700C8D8: - { type: SF64:ANIM, offset: 0x700C8D8, symbol: D_TI1_700C8D8 } +aTi1DesertRoverAnim: + { type: SF64:ANIM, offset: 0x700C8D8, symbol: aTi1DesertRoverAnim } -D_TI1_700C964: - { type: SF64:SKELETON, offset: 0x700C964, symbol: D_TI1_700C964 } +aTi1DesertRoverSkel: + { type: SF64:SKELETON, offset: 0x700C964, symbol: aTi1DesertRoverSkel } D_TI1_700C980: { type: GFX, offset: 0x700C980, symbol: D_TI1_700C980 } @@ -218,8 +218,8 @@ D_TI1_700CB60: D_TI1_700D534: { type: SF64:ANIM, offset: 0x700D534, symbol: D_TI1_700D534 } -D_TI1_700D700: - {type: SF64:SKELETON, offset: 0x700D700, symbol: D_TI1_700D700} +aTiRascoSkel: + {type: SF64:SKELETON, offset: 0x700D700, symbol: aTiRascoSkel} D_TI1_700D740: { type: GFX, offset: 0x700D740, symbol: D_TI1_700D740 } diff --git a/assets/yaml/us/rev1/ast_allies.yaml b/assets/yaml/us/rev1/ast_allies.yaml index 3f9594f5..d4997d4b 100644 --- a/assets/yaml/us/rev1/ast_allies.yaml +++ b/assets/yaml/us/rev1/ast_allies.yaml @@ -8,8 +8,8 @@ - '#include "gfx.h"' - '#include "sf64object.h"' -D_D000000: - { type: GFX, offset: 0xD000000, symbol: D_D000000 } +aKattMarkDL: + { type: GFX, offset: 0xD000000, symbol: aKattMarkDL } ast_allies_seg13_vtx_00000098: { type: VTX, count: 3, offset: 0x0D000098, symbol: ast_allies_seg13_vtx_00000098 } @@ -17,11 +17,11 @@ ast_allies_seg13_vtx_00000098: D_D0000C8: { type: BLOB, size: 0x18, offset: 0x0D0000C8, symbol: D_D0000C8 } -D_D0000E0: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0D0000E0, symbol: D_D0000E0, tlut: 0x0D000160 } +aKattMarkTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0D0000E0, symbol: aKattMarkTex, tlut: 0x0D000160 } -D_D000160: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0xD000160, symbol: D_D000160 } +aKattMarkTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0xD000160, symbol: aKattMarkTLUT } D_D000170: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0xD000170, symbol: D_D000170 } @@ -77,25 +77,25 @@ D_D00AFB8: D_D00B3B8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x0D00B3B8, symbol: D_D00B3B8 } -D_D00B5C0: - { type: GFX, offset: 0xD00B5C0, symbol: D_D00B5C0 } +aBillMarkDL: + { type: GFX, offset: 0xD00B5C0, symbol: aBillMarkDL } # Letter B -D_D00B688: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0D00B688, symbol: D_D00B688, tlut: 0xD00B708 } +aBillMarkTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0D00B688, symbol: aBillMarkTex, tlut: 0xD00B708 } -D_D00B708: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0xD00B708, symbol: D_D00B708 } +aBillMarkTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0xD00B708, symbol: aBillMarkTLUT } -D_D00B720: - { type: GFX, offset: 0xD00B720, symbol: D_D00B720 } +aJamesMarkDL: + { type: GFX, offset: 0xD00B720, symbol: aJamesMarkDL } # Letter J ? -D_D00B7F0: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0D00B7F0, symbol: D_D00B7F0, tlut: 0xD00B870 } +aJamesMarkTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0D00B7F0, symbol: aJamesMarkTex, tlut: 0xD00B870 } -D_D00B870: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0xD00B870, symbol: D_D00B870 } +aJamesMarkTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0xD00B870, symbol: aJamesMarkTLUT } D_D00B880: { type: GFX, offset: 0xD00B880, symbol: D_D00B880 } diff --git a/assets/yaml/us/rev1/ast_andross.yaml b/assets/yaml/us/rev1/ast_andross.yaml index 673b0167..a2954394 100644 --- a/assets/yaml/us/rev1/ast_andross.yaml +++ b/assets/yaml/us/rev1/ast_andross.yaml @@ -232,8 +232,8 @@ D_ANDROSS_C038860: D_ANDROSS_C038954: {type: SF64:HITBOX, offset: 0xC038954, symbol: D_ANDROSS_C038954} -D_ANDROSS_C038A48: - {type: SF64:HITBOX, offset: 0xC038A48, symbol: D_ANDROSS_C038A48} +aAndDoorHitbox: + {type: SF64:HITBOX, offset: 0xC038A48, symbol: aAndDoorHitbox} D_ANDROSS_C038AC4: {type: SF64:HITBOX, offset: 0xC038AC4, symbol: D_ANDROSS_C038AC4} @@ -241,20 +241,20 @@ D_ANDROSS_C038AC4: D_ANDROSS_C038B40: {type: SF64:HITBOX, offset: 0xC038B40, symbol: D_ANDROSS_C038B40} -D_ANDROSS_C038BA4: - {type: SF64:HITBOX, offset: 0xC038BA4, symbol: D_ANDROSS_C038BA4} +aAndPathIntersectionHitbox: + {type: SF64:HITBOX, offset: 0xC038BA4, symbol: aAndPathIntersectionHitbox} -D_ANDROSS_C038BD8: - {type: SF64:HITBOX, offset: 0xC038BD8, symbol: D_ANDROSS_C038BD8} +aAndPassageHitbox: + {type: SF64:HITBOX, offset: 0xC038BD8, symbol: aAndPassageHitbox} D_ANDROSS_C038CCC: {type: SF64:HITBOX, offset: 0xC038CCC, symbol: D_ANDROSS_C038CCC} -D_ANDROSS_C038DC0: - {type: SF64:HITBOX, offset: 0xC038DC0, symbol: D_ANDROSS_C038DC0} +aAndAndrossHitbox: + {type: SF64:HITBOX, offset: 0xC038DC0, symbol: aAndAndrossHitbox} -D_ANDROSS_C038F24: - {type: SF64:HITBOX, offset: 0xC038F24, symbol: D_ANDROSS_C038F24} +aAndBrainHitbox: + {type: SF64:HITBOX, offset: 0xC038F24, symbol: aAndBrainHitbox} D_ANDROSS_C038FE8: {type: VTX, count: 34, offset: 0xC038FE8, symbol: D_ANDROSS_C038FE8} diff --git a/assets/yaml/us/rev1/ast_aquas.yaml b/assets/yaml/us/rev1/ast_aquas.yaml index d78d5c3b..654d670d 100644 --- a/assets/yaml/us/rev1/ast_aquas.yaml +++ b/assets/yaml/us/rev1/ast_aquas.yaml @@ -35,8 +35,8 @@ D_AQ_6002874: { type: SF64:SKELETON, offset: 0x6002874, symbol: D_AQ_6002874 } # -D_AQ_6002C10: - { type: GFX, offset: 0x6002C10, symbol: D_AQ_6002C10 } +aAqOysterDL: + { type: GFX, offset: 0x6002C10, symbol: aAqOysterDL } D_AQ_6002D58: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x6002D58, symbol: D_AQ_6002D58, tlut: 0x6003158 } @@ -152,8 +152,8 @@ D_AQ_600BD20: D_AQ_600B518: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x600B518, symbol: D_AQ_600B518 } -D_AQ_600BF80: - { type: GFX, offset: 0x600BF80, symbol: D_AQ_600BF80 } +aAqTunnel2DL: + { type: GFX, offset: 0x600BF80, symbol: aAqTunnel2DL } D_AQ_600C530: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x600C530, symbol: D_AQ_600C530, tlut: 0x600C930 } @@ -197,11 +197,11 @@ D_AQ_600E150: D_AQ_600E368: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x600E368, symbol: D_AQ_600E368 } -D_AQ_600EE10: - { type: GFX, offset: 0x600EE10, symbol: D_AQ_600EE10 } +aAqWall1DL: + { type: GFX, offset: 0x600EE10, symbol: aAqWall1DL } -D_AQ_600EEF0: - { type: GFX, offset: 0x600EEF0, symbol: D_AQ_600EEF0 } +aAqBump2DL: + { type: GFX, offset: 0x600EEF0, symbol: aAqBump2DL } D_AQ_600F030: { type: GFX, offset: 0x600F030, symbol: D_AQ_600F030 } @@ -230,11 +230,11 @@ D_AQ_6011A78: D_AQ_6011CD8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6011CD8, symbol: D_AQ_6011CD8 } -D_AQ_6011EE0: - { type: GFX, offset: 0x6011EE0, symbol: D_AQ_6011EE0 } +aAqTunnel1DL: + { type: GFX, offset: 0x6011EE0, symbol: aAqTunnel1DL } -D_AQ_60120F0: - { type: GFX, offset: 0x60120F0, symbol: D_AQ_60120F0 } +aAqRoofDL: + { type: GFX, offset: 0x60120F0, symbol: aAqRoofDL } D_AQ_60126A8: { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 64, offset: 0x60126A8, symbol: D_AQ_60126A8, tlut: 0x6012AA8 } @@ -254,14 +254,14 @@ D_AQ_6012EA8: D_AQ_60132A8: { type: TEXTURE, ctype: u16, format: TLUT, colors: 240, offset: 0x60132A8, symbol: D_AQ_60132A8 } -D_AQ_60135E0: - { type: SF64:ANIM, offset: 0x60135E0, symbol: D_AQ_60135E0 } +aAqFishGroupAnim: + { type: SF64:ANIM, offset: 0x60135E0, symbol: aAqFishGroupAnim } -D_AQ_60136CC: - { type: SF64:SKELETON, offset: 0x60136CC, symbol: D_AQ_60136CC } +aAqFishGroupSkel1: + { type: SF64:SKELETON, offset: 0x60136CC, symbol: aAqFishGroupSkel1 } -D_AQ_60137CC: - { type: SF64:SKELETON, offset: 0x60137CC, symbol: D_AQ_60137CC } +aAqFishGroupSkel2: + { type: SF64:SKELETON, offset: 0x60137CC, symbol: aAqFishGroupSkel2 } D_AQ_60137F0: { type: GFX, offset: 0x60137F0, symbol: D_AQ_60137F0 } @@ -275,11 +275,11 @@ D_AQ_6013EC0: D_AQ_6014030: { type: GFX, offset: 0x6014030, symbol: D_AQ_6014030 } -D_AQ_6014438: - { type: SF64:ANIM, offset: 0x6014438, symbol: D_AQ_6014438 } +aAqStoneColumnAnim: + { type: SF64:ANIM, offset: 0x6014438, symbol: aAqStoneColumnAnim } -D_AQ_6014504: - { type: SF64:SKELETON, offset: 0x6014504, symbol: D_AQ_6014504 } +aAqStoneColumnSkel: + { type: SF64:SKELETON, offset: 0x6014504, symbol: aAqStoneColumnSkel } D_AQ_6014520: { type: GFX, offset: 0x6014520, symbol: D_AQ_6014520 } @@ -293,8 +293,8 @@ D_AQ_6014CD0: D_AQ_6014E50: { type: GFX, offset: 0x6014E50, symbol: D_AQ_6014E50 } -D_AQ_6014FD0: - { type: GFX, offset: 0x6014FD0, symbol: D_AQ_6014FD0 } +aAqBoulderDL: + { type: GFX, offset: 0x6014FD0, symbol: aAqBoulderDL } D_AQ_6015430: { type: GFX, offset: 0x6015430, symbol: D_AQ_6015430 } @@ -305,8 +305,8 @@ D_AQ_60154F8: D_AQ_60155F8: { type: TEXTURE, ctype: u16, format: TLUT, colors: 152, offset: 0x60155F8, symbol: D_AQ_60155F8 } -D_AQ_6015730: - { type: GFX, offset: 0x6015730, symbol: D_AQ_6015730 } +aAqArchDL: + { type: GFX, offset: 0x6015730, symbol: aAqArchDL } D_AQ_6015DD0: { type: GFX, offset: 0x6015DD0, symbol: D_AQ_6015DD0 } @@ -383,8 +383,8 @@ D_AQ_601D110: D_AQ_601DE50: { type: SF64:ANIM, offset: 0x601DE50, symbol: D_AQ_601DE50 } -D_AQ_601DE60: - { type: GFX, offset: 0x601DE60, symbol: D_AQ_601DE60 } +aAqCoralReef2DL: + { type: GFX, offset: 0x601DE60, symbol: aAqCoralReef2DL } D_AQ_601E1F0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x601E1F0, symbol: D_AQ_601E1F0 } @@ -392,11 +392,11 @@ D_AQ_601E1F0: D_AQ_601E9F0: { type: GFX, offset: 0x601E9F0, symbol: D_AQ_601E9F0 } -D_AQ_601EC68: - { type: SF64:ANIM, offset: 0x601EC68, symbol: D_AQ_601EC68 } +aAqCoralAnim: + { type: SF64:ANIM, offset: 0x601EC68, symbol: aAqCoralAnim } -D_AQ_601EDB4: - { type: SF64:SKELETON, offset: 0x601EDB4, symbol: D_AQ_601EDB4 } +aAqCoralSkel: + { type: SF64:SKELETON, offset: 0x601EDB4, symbol: aAqCoralSkel } D_AQ_601EDE0: { type: GFX, offset: 0x601EDE0, symbol: D_AQ_601EDE0 } @@ -425,11 +425,11 @@ D_AQ_6021858: D_AQ_6021C58: { type: TEXTURE, ctype: u16, format: TLUT, colors: 232, offset: 0x6021C58, symbol: D_AQ_6021C58 } -D_AQ_602201C: - { type: SF64:ANIM, offset: 0x602201C, symbol: D_AQ_602201C } +aAqOysterAnim: + { type: SF64:ANIM, offset: 0x602201C, symbol: aAqOysterAnim } -D_AQ_60220E8: - { type: SF64:SKELETON, offset: 0x60220E8, symbol: D_AQ_60220E8 } +aAqOysterSkel: + { type: SF64:SKELETON, offset: 0x60220E8, symbol: aAqOysterSkel } D_AQ_6022110: { type: GFX, offset: 0x6022110, symbol: D_AQ_6022110 } @@ -449,14 +449,14 @@ D_AQ_6022888: D_AQ_60229B8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60229B8, symbol: D_AQ_60229B8 } -D_AQ_60231C0: - { type: GFX, offset: 0x60231C0, symbol: D_AQ_60231C0 } +aAqCoralReef1DL: + { type: GFX, offset: 0x60231C0, symbol: aAqCoralReef1DL } -D_AQ_6023780: - { type: SF64:ANIM, offset: 0x6023780, symbol: D_AQ_6023780 } +aAqJellyfishAnim: + { type: SF64:ANIM, offset: 0x6023780, symbol: aAqJellyfishAnim } -D_AQ_602390C: - { type: SF64:SKELETON, offset: 0x602390C, symbol: D_AQ_602390C } +aAqJellyfishSkel: + { type: SF64:SKELETON, offset: 0x602390C, symbol: aAqJellyfishSkel } D_AQ_6023940: { type: GFX, offset: 0x6023940, symbol: D_AQ_6023940 } @@ -482,8 +482,8 @@ D_AQ_6024938: D_AQ_60249C0: { type: GFX, offset: 0x60249C0, symbol: D_AQ_60249C0 } -D_AQ_6024A50: - { type: GFX, offset: 0x6024A50, symbol: D_AQ_6024A50 } +aAqPearlDL: + { type: GFX, offset: 0x6024A50, symbol: aAqPearlDL } D_AQ_6024F80: { type: SF64:ANIM, offset: 0x6024F80, symbol: D_AQ_6024F80 } @@ -605,8 +605,8 @@ D_AQ_602AC40: D_AQ_602ACC0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x602ACC0, symbol: D_AQ_602ACC0 } -D_AQ_602B4C0: - { type: GFX, offset: 0x602B4C0, symbol: D_AQ_602B4C0 } +aAqRockDL: + { type: GFX, offset: 0x602B4C0, symbol: aAqRockDL } D_AQ_602B9D4: # unused and possibly broken { type: SF64:ANIM, offset: 0x602B9D4, symbol: D_AQ_602B9D4 } @@ -656,8 +656,8 @@ D_AQ_602E5C8: D_AQ_60308B8: { type: SF64:SCRIPT, offset: 0x60308B8, symbol: D_AQ_60308B8 } -D_AQ_6030B10: - { type: SF64:HITBOX, offset: 0x6030B10, symbol: D_AQ_6030B10 } +aBoss301Hitbox: + { type: SF64:HITBOX, offset: 0x6030B10, symbol: aBoss301Hitbox } D_AQ_6030B14_f32: { type: SF64:HITBOX, offset: 0x6030B14, symbol: D_AQ_6030B14_f32 } @@ -674,8 +674,8 @@ D_AQ_6030B68: D_AQ_6030BAC: { type: SF64:HITBOX, offset: 0x6030BAC, symbol: D_AQ_6030BAC } -D_AQ_6030BE0: - { type: SF64:HITBOX, offset: 0x6030BE0, symbol: D_AQ_6030BE0 } +aAqActor188Hitbox: + { type: SF64:HITBOX, offset: 0x6030BE0, symbol: aAqActor188Hitbox } D_AQ_6030BFC: { type: SF64:HITBOX, offset: 0x6030BFC, symbol: D_AQ_6030BFC } @@ -686,14 +686,14 @@ D_AQ_6030C18: D_AQ_6030C44: { type: SF64:HITBOX, offset: 0x6030C44, symbol: D_AQ_6030C44 } -D_AQ_6030C60: - { type: SF64:HITBOX, offset: 0x6030C60, symbol: D_AQ_6030C60 } +aAqCoralReef1Hitbox: + { type: SF64:HITBOX, offset: 0x6030C60, symbol: aAqCoralReef1Hitbox } -D_AQ_6030C7C: - { type: SF64:HITBOX, offset: 0x6030C7C, symbol: D_AQ_6030C7C } +aAqTunnel1Hitbox: + { type: SF64:HITBOX, offset: 0x6030C7C, symbol: aAqTunnel1Hitbox } -D_AQ_6030D20: - { type: SF64:HITBOX, offset: 0x6030D20, symbol: D_AQ_6030D20 } +aAqStoneColumnHitbox: + { type: SF64:HITBOX, offset: 0x6030D20, symbol: aAqStoneColumnHitbox } D_AQ_6030D3C: { type: SF64:HITBOX, offset: 0x6030D3C, symbol: D_AQ_6030D3C } @@ -701,65 +701,65 @@ D_AQ_6030D3C: D_AQ_6030D58: { type: SF64:HITBOX, offset: 0x6030D58, symbol: D_AQ_6030D58 } -D_AQ_6030D74: - { type: SF64:HITBOX, offset: 0x6030D74, symbol: D_AQ_6030D74 } +aAqArchHitbox: + { type: SF64:HITBOX, offset: 0x6030D74, symbol: aAqArchHitbox } -D_AQ_6030DF8: - { type: SF64:HITBOX, offset: 0x6030DF8, symbol: D_AQ_6030DF8 } +aAqCoralReef2Hitbox: + { type: SF64:HITBOX, offset: 0x6030DF8, symbol: aAqCoralReef2Hitbox } -D_AQ_6030E14: - { type: SF64:HITBOX, offset: 0x6030E14, symbol: D_AQ_6030E14 } +aAqRockHitbox: + { type: SF64:HITBOX, offset: 0x6030E14, symbol: aAqRockHitbox } -D_AQ_6030E30_Hitbox: - { type: SF64:HITBOX, offset: 0x6030E30, symbol: D_AQ_6030E30_Hitbox } +aAqWall1Hitbox: + { type: SF64:HITBOX, offset: 0x6030E30, symbol: aAqWall1Hitbox } -D_AQ_6030E4C: - { type: SF64:HITBOX, offset: 0x6030E4C, symbol: D_AQ_6030E4C } +aAqRoofHitbox: + { type: SF64:HITBOX, offset: 0x6030E4C, symbol: aAqRoofHitbox } -D_AQ_6030E68: - { type: SF64:HITBOX, offset: 0x6030E68, symbol: D_AQ_6030E68 } +aAqTunnel2Hitbox: + { type: SF64:HITBOX, offset: 0x6030E68, symbol: aAqTunnel2Hitbox } -D_AQ_6030F74: - { type: SF64:HITBOX, offset: 0x6030F74, symbol: D_AQ_6030F74 } +aAqBacoonHitbox: + { type: SF64:HITBOX, offset: 0x6030F74, symbol: aAqBacoonHitbox } -D_AQ_6031398: - { type: SF64:HITBOX, offset: 0x6031398, symbol: D_AQ_6031398 } +aAqAnglerFishHitbox: + { type: SF64:HITBOX, offset: 0x6031398, symbol: aAqAnglerFishHitbox } -D_AQ_60313CC: - { type: SF64:HITBOX, offset: 0x60313CC, symbol: D_AQ_60313CC } +aAqGaroaHitbox: + { type: SF64:HITBOX, offset: 0x60313CC, symbol: aAqGaroaHitbox } -D_AQ_6031400: - { type: SF64:HITBOX, offset: 0x6031400, symbol: D_AQ_6031400 } +aAqSculpinHitbox: + { type: SF64:HITBOX, offset: 0x6031400, symbol: aAqSculpinHitbox } -D_AQ_603144C: - { type: SF64:HITBOX, offset: 0x603144C, symbol: D_AQ_603144C } +aAqSpindlyFishHitbox: + { type: SF64:HITBOX, offset: 0x603144C, symbol: aAqSpindlyFishHitbox } -D_AQ_6031480: - { type: SF64:HITBOX, offset: 0x6031480, symbol: D_AQ_6031480 } +aAqSquidHitbox: + { type: SF64:HITBOX, offset: 0x6031480, symbol: aAqSquidHitbox } D_AQ_60314AC: { type: SF64:HITBOX, offset: 0x60314AC, symbol: D_AQ_60314AC } -D_AQ_60314C8: - { type: SF64:HITBOX, offset: 0x60314C8, symbol: D_AQ_60314C8 } +aAqOysterHitbox: + { type: SF64:HITBOX, offset: 0x60314C8, symbol: aAqOysterHitbox } D_AQ_60314E4: { type: SF64:HITBOX, offset: 0x60314E4, symbol: D_AQ_60314E4 } -D_AQ_6031500: - { type: SF64:HITBOX, offset: 0x6031500, symbol: D_AQ_6031500 } +aAqBoulderHitbox: + { type: SF64:HITBOX, offset: 0x6031500, symbol: aAqBoulderHitbox } D_AQ_603151C: { type: SF64:HITBOX, offset: 0x603151C, symbol: D_AQ_603151C } -D_AQ_6031538: - { type: SF64:HITBOX, offset: 0x6031538, symbol: D_AQ_6031538 } +aAqCoralHitbox: + { type: SF64:HITBOX, offset: 0x6031538, symbol: aAqCoralHitbox } -D_AQ_6031554: - { type: SF64:HITBOX, offset: 0x6031554, symbol: D_AQ_6031554 } +aAqJellyfishHitbox: + { type: SF64:HITBOX, offset: 0x6031554, symbol: aAqJellyfishHitbox } -D_AQ_6031570: - { type: SF64:HITBOX, offset: 0x6031570, symbol: D_AQ_6031570 } +aAqFishGroupHitbox: + { type: SF64:HITBOX, offset: 0x6031570, symbol: aAqFishGroupHitbox } D_AQ_603158C: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x603158C, symbol: D_AQ_603158C } diff --git a/assets/yaml/us/rev1/ast_area_6.yaml b/assets/yaml/us/rev1/ast_area_6.yaml index 100e6e03..e673f924 100644 --- a/assets/yaml/us/rev1/ast_area_6.yaml +++ b/assets/yaml/us/rev1/ast_area_6.yaml @@ -237,8 +237,8 @@ D_A6_6028254: D_A6_60282A0: { type: SF64:HITBOX, offset: 0x60282A0, symbol: D_A6_60282A0 } -D_A6_6028454: - { type: SF64:HITBOX, offset: 0x6028454, symbol: D_A6_6028454 } +aA6GorgonHitbox: + { type: SF64:HITBOX, offset: 0x6028454, symbol: aA6GorgonHitbox } D_A6_6028578: { type: SF64:HITBOX, offset: 0x6028578, symbol: D_A6_6028578 } diff --git a/assets/yaml/us/rev1/ast_arwing.yaml b/assets/yaml/us/rev1/ast_arwing.yaml index dcd135ab..06cc46b3 100644 --- a/assets/yaml/us/rev1/ast_arwing.yaml +++ b/assets/yaml/us/rev1/ast_arwing.yaml @@ -179,8 +179,8 @@ D_arwing_3018348: D_arwing_30183D0: { type: GFX, offset: 0x30183D0, symbol: D_arwing_30183D0 } -D_arwing_30184D8: - { type: TEXTURE, format: RGBA16, offset: 0x30184D8, width: 32, height: 32, ctype: u16, symbol: D_arwing_30184D8 } +aWindshieldClouldReflextionTex: + { type: TEXTURE, format: RGBA16, offset: 0x30184D8, width: 32, height: 32, ctype: u16, symbol: aWindshieldClouldReflextionTex } D_arwing_3018CD8: { type: TEXTURE, format: RGBA16, offset: 0x3018CD8, width: 64, height: 16, ctype: u16, symbol: D_arwing_3018CD8 } diff --git a/assets/yaml/us/rev1/ast_bolse.yaml b/assets/yaml/us/rev1/ast_bolse.yaml index 3dc404f8..ff8e45e5 100644 --- a/assets/yaml/us/rev1/ast_bolse.yaml +++ b/assets/yaml/us/rev1/ast_bolse.yaml @@ -115,8 +115,8 @@ D_BO_600AB90: D_BO_600AD80: { type: TEXTURE, format: RGBA16, offset: 0x0600AD80, width: 32, height: 32, ctype: u16, symbol: D_BO_600AD80 } -D_BO_600B8B0: - { type: GFX, offset: 0x600B8B0, symbol: D_BO_600B8B0 } +aBoBuildingDL: + { type: GFX, offset: 0x600B8B0, symbol: aBoBuildingDL } D_BO_600BAA0: { type: GFX, offset: 0x600BAA0, symbol: D_BO_600BAA0 } @@ -133,11 +133,11 @@ D_BO_600C0B8: D_BO_600C2D8: { type: TEXTURE, format: IA8, offset: 0x0600C2D8, width: 32, height: 16, ctype: u8, symbol: D_BO_600C2D8 } -D_BO_600C4E0: - { type: GFX, offset: 0x600C4E0, symbol: D_BO_600C4E0 } +aBoBaseShieldDL: + { type: GFX, offset: 0x600C4E0, symbol: aBoBaseShieldDL } -D_BO_600CF88: - { type: TEXTURE, format: RGBA16, offset: 0x0600CF88, width: 16, height: 16, ctype: u16, symbol: D_BO_600CF88 } +aBoBaseShieldTex: + { type: TEXTURE, format: RGBA16, offset: 0x0600CF88, width: 16, height: 16, ctype: u16, symbol: aBoBaseShieldTex } D_BO_600D190: { type: GFX, offset: 0x600D190, symbol: D_BO_600D190 } @@ -148,20 +148,20 @@ D_BO_600D2A0: D_BO_600E2A0: { type: TEXTURE, format: RGBA16, offset: 0x0600E2A0, width: 32, height: 64, ctype: u16, symbol: D_BO_600E2A0 } -D_BO_600F2E0: - { type: SF64:ANIM, offset: 0x600F2E0, symbol: D_BO_600F2E0 } +aBoLaserCannonAnim: + { type: SF64:ANIM, offset: 0x600F2E0, symbol: aBoLaserCannonAnim } -D_BO_600F36C: - { type: SF64:SKELETON, offset: 0x600F36C, symbol: D_BO_600F36C } +aBoLaserCannonSkel: + { type: SF64:SKELETON, offset: 0x600F36C, symbol: aBoLaserCannonSkel } -D_BO_600F3D8: - { type: SF64:ANIM, offset: 0x600F3D8, symbol: D_BO_600F3D8 } +aBoShieldReactorAnim: + { type: SF64:ANIM, offset: 0x600F3D8, symbol: aBoShieldReactorAnim } -D_BO_600F4A4: - { type: SF64:SKELETON, offset: 0x600F4A4, symbol: D_BO_600F4A4 } +aBoShieldReactorSkel: + { type: SF64:SKELETON, offset: 0x600F4A4, symbol: aBoShieldReactorSkel } -D_BO_600F4C0: - { type: GFX, offset: 0x600F4C0, symbol: D_BO_600F4C0 } +aBoPoleDL: + { type: GFX, offset: 0x600F4C0, symbol: aBoPoleDL } D_BO_600F728: { type: TEXTURE, format: RGBA16, offset: 0x0600F728, width: 32, height: 32, ctype: u16, symbol: D_BO_600F728 } @@ -178,23 +178,23 @@ D_BO_6010294: D_BO_6011B20: { type: SF64:HITBOX, offset: 0x6011B20, symbol: D_BO_6011B20 } -D_BO_6011B24: - { type: SF64:HITBOX, offset: 0x6011B24, symbol: D_BO_6011B24 } +aBoShieldReactorHitbox: + { type: SF64:HITBOX, offset: 0x6011B24, symbol: aBoShieldReactorHitbox } D_BO_6011BA4: { type: SF64:HITBOX, offset: 0x6011BA4, symbol: D_BO_6011BA4 } -D_BO_6011BF4: - { type: SF64:HITBOX, offset: 0x6011BF4, symbol: D_BO_6011BF4 } +aBoLaserCannonHitbox: + { type: SF64:HITBOX, offset: 0x6011BF4, symbol: aBoLaserCannonHitbox } -D_BO_6011C10: - { type: SF64:HITBOX, offset: 0x6011C10, symbol: D_BO_6011C10 } +aBoPoleHitbox: + { type: SF64:HITBOX, offset: 0x6011C10, symbol: aBoPoleHitbox } -D_BO_6011C48: - { type: SF64:HITBOX, offset: 0x6011C48, symbol: D_BO_6011C48 } +aBoBuildingHitbox: + { type: SF64:HITBOX, offset: 0x6011C48, symbol: aBoBuildingHitbox } -D_BO_6011C80: - { type: SF64:HITBOX, offset: 0x6011C80, symbol: D_BO_6011C80 } +aBoBaseCoreHitbox: + { type: SF64:HITBOX, offset: 0x6011C80, symbol: aBoBaseCoreHitbox } D_BO_6011E28: { type: VTX, count: 34, offset: 0x6011E28, symbol: D_BO_6011E28 } diff --git a/assets/yaml/us/rev1/ast_common.yaml b/assets/yaml/us/rev1/ast_common.yaml index 5717aba9..dbd1724d 100644 --- a/assets/yaml/us/rev1/ast_common.yaml +++ b/assets/yaml/us/rev1/ast_common.yaml @@ -695,11 +695,11 @@ D_101CBC0: D_101CCC0: { type: TEXTURE, format: TLUT, colors: 88, offset: 0x101CCC0, ctype: u16, symbol: D_101CCC0 } -D_101CD70: - { type: GFX, offset: 0x101CD70, symbol: D_101CD70 } +aUnusedShieldDL: + { type: GFX, offset: 0x101CD70, symbol: aUnusedShieldDL } -D_101D070: - { type: TEXTURE, format: RGBA16, width: 32, height: 32, ctype: u16, offset: 0x101D070, symbol: D_101D070 } +aUnusedShieldTex: + { type: TEXTURE, format: RGBA16, width: 32, height: 32, ctype: u16, offset: 0x101D070, symbol: aUnusedShieldTex } D_101D870: { type: GFX, offset: 0x101D870, symbol: D_101D870 } @@ -710,8 +710,8 @@ ast_common_seg1_vtx_1D9C8: D_101DE20: { type: TEXTURE, format: IA8, width: 128, height: 32, ctype: u8, offset: 0x101DE20, symbol: D_101DE20 } -D_101DC10: - { type: GFX, offset: 0x101DC10, symbol: D_101DC10 } +aBarrelRollTex: + { type: GFX, offset: 0x101DC10, symbol: aBarrelRollTex } D_101EE20: { type: TEXTURE, format: IA8, width: 128, height: 32, ctype: u8, offset: 0x101EE20, symbol: D_101EE20 } @@ -806,32 +806,32 @@ D_1024230: D_1024290: { type: GFX, offset: 0x1024290, symbol: D_1024290 } -D_1024410: - { type: GFX, offset: 0x1024410, symbol: D_1024410 } +aPeppyMarkDL: + { type: GFX, offset: 0x1024410, symbol: aPeppyMarkDL } -D_10244D8: - { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x10244D8, tlut: 0x1024558, symbol: D_10244D8 } +aPeppyMarkTex: + { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x10244D8, tlut: 0x1024558, symbol: aPeppyMarkTex } -D_1024558: - { type: TEXTURE, format: TLUT, colors: 12, offset: 0x1024558, ctype: u16, symbol: D_1024558 } +aPeppyMarkTLUT: + { type: TEXTURE, format: TLUT, colors: 12, offset: 0x1024558, ctype: u16, symbol: aPeppyMarkTLUT } -D_1024570: - { type: GFX, offset: 0x1024570, symbol: D_1024570 } +aFalcoMarkDL: + { type: GFX, offset: 0x1024570, symbol: aFalcoMarkDL } -D_1024638: - { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x1024638, tlut: 0x10246B8, symbol: D_1024638 } +aFalcoMarkTex: + { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x1024638, tlut: 0x10246B8, symbol: aFalcoMarkTex } -D_10246B8: - { type: TEXTURE, format: TLUT, colors: 12, offset: 0x10246B8, ctype: u16, symbol: D_10246B8 } +aFalcoMarkTLUT: + { type: TEXTURE, format: TLUT, colors: 12, offset: 0x10246B8, ctype: u16, symbol: aFalcoMarkTLUT } -D_10246D0: - { type: GFX, offset: 0x10246D0, symbol: D_10246D0 } +aSlippyMarkDL: + { type: GFX, offset: 0x10246D0, symbol: aSlippyMarkDL } -D_1024798: - { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x1024798, tlut: 0x1024818, symbol: D_1024798 } +aSlippyMarkTex: + { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x1024798, tlut: 0x1024818, symbol: aSlippyMarkTex } -D_1024818: - { type: TEXTURE, format: TLUT, colors: 12, offset: 0x1024818, ctype: u16, symbol: D_1024818 } +aSlippyMarkTLUT: + { type: TEXTURE, format: TLUT, colors: 12, offset: 0x1024818, ctype: u16, symbol: aSlippyMarkTLUT } D_1024830: { type: GFX, offset: 0x1024830, symbol: D_1024830 } diff --git a/assets/yaml/us/rev1/ast_corneria.yaml b/assets/yaml/us/rev1/ast_corneria.yaml index 15f83392..96933be6 100644 --- a/assets/yaml/us/rev1/ast_corneria.yaml +++ b/assets/yaml/us/rev1/ast_corneria.yaml @@ -303,20 +303,20 @@ D_CO_602AA7C: aCoDoorsSkel: { type: SF64:SKELETON, offset: 0x602AB48, symbol: aCoDoorsSkel } -D_CO_602BC18: - { type: SF64:ANIM, offset: 0x602BC18, symbol: D_CO_602BC18 } +aCoGrangaWalkingAnim: + { type: SF64:ANIM, offset: 0x602BC18, symbol: aCoGrangaWalkingAnim } D_CO_602BE64: { type: SF64:SKELETON, offset: 0x602BE64, symbol: D_CO_602BE64 } -D_CO_602C0D0: - { type: SF64:ANIM, offset: 0x602C0D0, symbol: D_CO_602C0D0 } +aCoGrangaStationaryAnim: + { type: SF64:ANIM, offset: 0x602C0D0, symbol: aCoGrangaStationaryAnim } D_CO_602D31C: { type: SF64:ANIM, offset: 0x602D31C, symbol: D_CO_602D31C } -D_CO_602D400: - { type: SF64:ANIM, offset: 0x602D400, symbol: D_CO_602D400 } +aCoCarrierAnim: + { type: SF64:ANIM, offset: 0x602D400, symbol: aCoCarrierAnim } aCoCarrierSkel: { type: SF64:SKELETON, offset: 0x602D5AC, symbol: aCoCarrierSkel } @@ -522,14 +522,14 @@ aCoBuilding10Hitbox: aCoIBeamHitbox: { type: SF64:HITBOX, offset: 0x603E514, symbol: aCoIBeamHitbox } -D_CO_603E54C: - { type: SF64:HITBOX, offset: 0x603E54C, symbol: D_CO_603E54C } +aCoActorSkibotHitbox: + { type: SF64:HITBOX, offset: 0x603E54C, symbol: aCoActorSkibotHitbox } -D_CO_603E598: - { type: SF64:HITBOX, offset: 0x603E598, symbol: D_CO_603E598 } +aCoActorRadarHitbox: + { type: SF64:HITBOX, offset: 0x603E598, symbol: aCoActorRadarHitbox } -D_CO_603E5B4: - { type: SF64:HITBOX, offset: 0x603E5B4, symbol: D_CO_603E5B4 } +aCoMoleMissileHitbox: + { type: SF64:HITBOX, offset: 0x603E5B4, symbol: aCoMoleMissileHitbox } CoGarudaHitbox: { type: SF64:HITBOX, offset: 0x603E5D0, symbol: CoGarudaHitbox } @@ -540,14 +540,14 @@ aCoGarudaDestroyHitbox: aCoGrangaHitbox: { type: SF64:HITBOX, offset: 0x603E620, symbol: aCoGrangaHitbox } -D_CO_603E714: - { type: SF64:HITBOX, offset: 0x603E714, symbol: D_CO_603E714 } +aCoCarrierLeftHitbox: + { type: SF64:HITBOX, offset: 0x603E714, symbol: aCoCarrierLeftHitbox } -D_CO_603E748: - { type: SF64:HITBOX, offset: 0x603E748, symbol: D_CO_603E748 } +aCoCarrierUpperHitbox: + { type: SF64:HITBOX, offset: 0x603E748, symbol: aCoCarrierUpperHitbox } -D_CO_603E7C4: - { type: SF64:HITBOX, offset: 0x603E7C4, symbol: D_CO_603E7C4 } +aCoCarrierBottomHitbox: + { type: SF64:HITBOX, offset: 0x603E7C4, symbol: aCoCarrierBottomHitbox } aCoCarrierHitbox: { type: SF64:HITBOX, offset: 0x603E840, symbol: aCoCarrierHitbox } diff --git a/assets/yaml/us/rev1/ast_fortuna.yaml b/assets/yaml/us/rev1/ast_fortuna.yaml index 4fafae5e..46466a80 100644 --- a/assets/yaml/us/rev1/ast_fortuna.yaml +++ b/assets/yaml/us/rev1/ast_fortuna.yaml @@ -62,11 +62,11 @@ D_FO_6006120: D_FO_6006220: { type: TEXTURE, format: TLUT, colors: 120, offset: 0x6006220, ctype: u16, symbol: D_FO_6006220 } -D_FO_6006310: - { type: GFX, offset: 0x6006310, symbol: D_FO_6006310 } +aFoMountain3DL: + { type: GFX, offset: 0x6006310, symbol: aFoMountain3DL } -D_FO_60066E0: - { type: GFX, offset: 0x60066E0, symbol: D_FO_60066E0 } +aFoTowerDL: + { type: GFX, offset: 0x60066E0, symbol: aFoTowerDL } ast_fortuna_seg6_vtx_6898: { type: VTX, count: 52, offset: 0x6006898, symbol: ast_fortuna_seg6_vtx_6898 } @@ -92,17 +92,17 @@ D_FO_6007590: D_FO_6007730: { type: GFX, offset: 0x6007730, symbol: D_FO_6007730 } -D_FO_6007854: - { type: SF64:ANIM, offset: 0x6007854, symbol: D_FO_6007854 } +aFoRadarAnim: + { type: SF64:ANIM, offset: 0x6007854, symbol: aFoRadarAnim } -D_FO_6007980: - { type: SF64:SKELETON, offset: 0x6007980, symbol: D_FO_6007980 } +aFoRadarSkel: + { type: SF64:SKELETON, offset: 0x6007980, symbol: aFoRadarSkel } -D_FO_60079B0: - { type: GFX, offset: 0x60079B0, symbol: D_FO_60079B0 } +aFoMountain1DL: + { type: GFX, offset: 0x60079B0, symbol: aFoMountain1DL } -D_FO_6007D80: - { type: GFX, offset: 0x6007D80, symbol: D_FO_6007D80 } +aFoMountain2DL: + { type: GFX, offset: 0x6007D80, symbol: aFoMountain2DL } D_FO_6008150: { type: TEXTURE, format: RGBA16, width: 44, height: 44, offset: 0x6008150, ctype: u16, symbol: D_FO_6008150 } @@ -161,8 +161,8 @@ D_FO_600F60C: aFoPoleHitbox: { type: SF64:HITBOX, offset: 0x600FE9C, symbol: aFoPoleHitbox } -D_FO_600FEB8: - { type: SF64:HITBOX, offset: 0x600FEB8, symbol: D_FO_600FEB8 } +aFoTowerHitbox: + { type: SF64:HITBOX, offset: 0x600FEB8, symbol: aFoTowerHitbox } aFoRadarHitbox: { type: SF64:HITBOX, offset: 0x600FF30, symbol: aFoRadarHitbox } @@ -170,14 +170,14 @@ aFoRadarHitbox: D_FO_600FF64: { type: SF64:HITBOX, offset: 0x600FF64, symbol: D_FO_600FF64 } -D_FO_600FF80: - { type: SF64:HITBOX, offset: 0x600FF80, symbol: D_FO_600FF80 } +aFoMountain1Hitbox: + { type: SF64:HITBOX, offset: 0x600FF80, symbol: aFoMountain1Hitbox } -D_FO_600FFA0: - { type: SF64:HITBOX, offset: 0x600FFA0, symbol: D_FO_600FFA0 } +aFoMountain2Hitbox: + { type: SF64:HITBOX, offset: 0x600FFA0, symbol: aFoMountain2Hitbox } -D_FO_600FFC0: - { type: SF64:HITBOX, offset: 0x600FFC0, symbol: D_FO_600FFC0 } +aFoMountain3Hitbox: + { type: SF64:HITBOX, offset: 0x600FFC0, symbol: aFoMountain3Hitbox } -D_FO_600FFE0: - { type: SF64:HITBOX, offset: 0x600FFE0, symbol: D_FO_600FFE0 } \ No newline at end of file +aFoBaseHitbox: + { type: SF64:HITBOX, offset: 0x600FFE0, symbol: aFoBaseHitbox } \ No newline at end of file diff --git a/assets/yaml/us/rev1/ast_katina.yaml b/assets/yaml/us/rev1/ast_katina.yaml index 09fe56ed..6198381e 100644 --- a/assets/yaml/us/rev1/ast_katina.yaml +++ b/assets/yaml/us/rev1/ast_katina.yaml @@ -57,8 +57,8 @@ D_KA_60062F8: D_KA_6006AF8: { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6006AF8, ctype: u16, symbol: D_KA_6006AF8 } -aKaDestroyedSaucererDL: - { type: GFX, offset: 0x6007300, symbol: aKaDestroyedSaucererDL } +aKaDestroyedKaSaucererDL: + { type: GFX, offset: 0x6007300, symbol: aKaDestroyedKaSaucererDL } D_KA_6009250: { type: GFX, offset: 0x6009250, symbol: D_KA_6009250 } @@ -169,11 +169,11 @@ D_KA_6011000: D_KA_6011044: { type: SF64:OBJECT_INIT, offset: 0x6011044, symbol: D_KA_6011044 } -D_KA_6011058: - { type: SF64:HITBOX, offset: 0x6011058, symbol: D_KA_6011058 } +aKaSaucererHitbox: + { type: SF64:HITBOX, offset: 0x6011058, symbol: aKaSaucererHitbox } -D_KA_601115C: - { type: SF64:HITBOX, offset: 0x601115C, symbol: D_KA_601115C } +aKaFrontlineBaseHitbox: + { type: SF64:HITBOX, offset: 0x601115C, symbol: aKaFrontlineBaseHitbox } D_KA_60111D8: { type: SF64:HITBOX, offset: 0x60111D8, symbol: D_KA_60111D8 } \ No newline at end of file diff --git a/assets/yaml/us/rev1/ast_landmaster.yaml b/assets/yaml/us/rev1/ast_landmaster.yaml index ff5ebaa7..3269c031 100644 --- a/assets/yaml/us/rev1/ast_landmaster.yaml +++ b/assets/yaml/us/rev1/ast_landmaster.yaml @@ -14,8 +14,8 @@ D_landmaster_3000000: D_landmaster_3000080: { type: TEXTURE, format: TLUT, offset: 0x3000080, colors: 8, ctype: u16, symbol: D_landmaster_3000080 } -D_landmaster_3000090: - { type: GFX, offset: 0x3000090, symbol: D_landmaster_3000090 } +aLandmasterModelDL: + { type: GFX, offset: 0x3000090, symbol: aLandmasterModelDL } D_landmaster_3004CA8: { type: TEXTURE, format: RGBA16, offset: 0x3004CA8, width: 32, height: 32, ctype: u16, symbol: D_landmaster_3004CA8 } @@ -44,8 +44,8 @@ D_landmaster_3001680: D_landmaster_3001E80: { type: TEXTURE, format: RGBA16, offset: 0x3001E80, width: 32, height: 32, ctype: u16, symbol: D_landmaster_3001E80 } -D_landmaster_3004680: - { type: GFX, offset: 0x3004680, symbol: D_landmaster_3004680 } +aLandmasterCanonDL: + { type: GFX, offset: 0x3004680, symbol: aLandmasterCanonDL } D_landmaster_30066B0: { type: GFX, offset: 0x30066B0, symbol: D_landmaster_30066B0 } diff --git a/assets/yaml/us/rev1/ast_macbeth.yaml b/assets/yaml/us/rev1/ast_macbeth.yaml index 20650095..fe1c9de1 100644 --- a/assets/yaml/us/rev1/ast_macbeth.yaml +++ b/assets/yaml/us/rev1/ast_macbeth.yaml @@ -163,8 +163,8 @@ D_MA_6007430: D_MA_6007500: {type: GFX, offset: 0x6007500, symbol: D_MA_6007500} -D_MA_60075D0: - {type: GFX, offset: 0x60075D0, symbol: D_MA_60075D0} +aMaWeaponsFactoryDL: + {type: GFX, offset: 0x60075D0, symbol: aMaWeaponsFactoryDL} D_MA_60092E0: { type: TEXTURE, format: RGBA16, ctype: u16, width: 32, height: 32, offset: 0x60092E0, symbol: D_MA_60092E0} @@ -238,8 +238,8 @@ D_MA_600AE18: D_MA_600AE98: { type: TEXTURE, format: TLUT, ctype: u16, colors: 80, offset: 0x600AE98, symbol: D_MA_600AE98} -D_MA_600AF40: - {type: GFX, offset: 0x600AF40, symbol: D_MA_600AF40} +aMaGuillotineDL: + {type: GFX, offset: 0x600AF40, symbol: aMaGuillotineDL} D_MA_600B2E0: { type: TEXTURE, format: RGBA16, ctype: u16, width: 32, height: 64, offset: 0x600B2E0, symbol: D_MA_600B2E0} @@ -265,8 +265,8 @@ D_MA_600D1E4: D_MA_600D280: { type: TEXTURE, format: IA16, ctype: u16, width: 16, height: 16, offset: 0x600D280, symbol: D_MA_600D280} -D_MA_600D480: - {type: GFX, offset: 0x600D480, symbol: D_MA_600D480} +aMaSpearDL: + {type: GFX, offset: 0x600D480, symbol: aMaSpearDL} D_MA_600D878: { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x600D878, symbol: D_MA_600D878, tlut: 0x600D978} @@ -361,8 +361,8 @@ D_MA_6012C00: D_MA_6012C98: { type: TEXTURE, format: RGBA16, ctype: u16, width: 4, height: 8, offset: 0x6012C98, symbol: D_MA_6012C98} -D_MA_6012F50: - {type: GFX, offset: 0x6012F50, symbol: D_MA_6012F50} +aMaShockBoxLightDL: + {type: GFX, offset: 0x6012F50, symbol: aMaShockBoxLightDL} D_MA_6012FE0: { type: TEXTURE, format: IA8, ctype: u8, width: 16, height: 8, offset: 0x6012FE0, symbol: D_MA_6012FE0} @@ -391,8 +391,8 @@ D_MA_6015494: D_MA_6015500: {type: SF64:SKELETON, offset: 0x6015500, symbol: D_MA_6015500} -D_MA_6015510: - {type: GFX, offset: 0x6015510, symbol: D_MA_6015510} +aMaShockBoxDL: + {type: GFX, offset: 0x6015510, symbol: aMaShockBoxDL} D_MA_6015C24: {type: SF64:ANIM, offset: 0x6015C24, symbol: D_MA_6015C24} @@ -451,11 +451,11 @@ D_MA_601A840: D_MA_601A8C8: { type: TEXTURE, format: RGBA16, ctype: u16, width: 32, height: 32, offset: 0x601A8C8, symbol: D_MA_601A8C8} -D_MA_601B0D0: - {type: GFX, offset: 0x601B0D0, symbol: D_MA_601B0D0} +aMaFloor6DL: + {type: GFX, offset: 0x601B0D0, symbol: aMaFloor6DL} -D_MA_601B7C0: - {type: GFX, offset: 0x601B7C0, symbol: D_MA_601B7C0} +aMaWall4DL: + {type: GFX, offset: 0x601B7C0, symbol: aMaWall4DL} D_MA_601BB78: { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x601BB78, symbol: D_MA_601BB78, tlut: 0x601BC78} @@ -493,8 +493,8 @@ D_MA_601EAB0: D_MA_601EBBC: {type: SF64:SKELETON, offset: 0x601EBBC, symbol: D_MA_601EBBC} -D_MA_601F1D0: - {type: GFX, offset: 0x601F1D0, symbol: D_MA_601F1D0} +aMaWall2DL: + {type: GFX, offset: 0x601F1D0, symbol: aMaWall2DL} D_MA_601F270: {type: GFX, offset: 0x601F270, symbol: D_MA_601F270} @@ -550,14 +550,14 @@ D_MA_6023388: D_MA_6023788: { type: TEXTURE, format: TLUT, ctype: u16, colors: 176, offset: 0x6023788, symbol: D_MA_6023788} -D_MA_60238F0: - {type: GFX, offset: 0x60238F0, symbol: D_MA_60238F0} +aMaWall3DL: + {type: GFX, offset: 0x60238F0, symbol: aMaWall3DL} D_MA_60239D0: {type: GFX, offset: 0x60239D0, symbol: D_MA_60239D0} -D_MA_6024010: - {type: GFX, offset: 0x6024010, symbol: D_MA_6024010} +aMaBuilding1DL: + {type: GFX, offset: 0x6024010, symbol: aMaBuilding1DL} D_MA_6024230: { type: TEXTURE, format: CI8, ctype: u8, width: 32, height: 32, offset: 0x6024230, symbol: D_MA_6024230, tlut: 0x6024630} @@ -568,17 +568,17 @@ D_MA_6024630: D_MA_6024670: {type: GFX, offset: 0x6024670, symbol: D_MA_6024670} -D_MA_60251A0: - {type: GFX, offset: 0x60251A0, symbol: D_MA_60251A0} +aMaHorizontalLockBarDL: + {type: GFX, offset: 0x60251A0, symbol: aMaHorizontalLockBarDL} D_MA_60253E0: {type: GFX, offset: 0x60253E0, symbol: D_MA_60253E0} -D_MA_60257B0: - {type: GFX, offset: 0x60257B0, symbol: D_MA_60257B0} +aMaBarrierDL: + {type: GFX, offset: 0x60257B0, symbol: aMaBarrierDL} -D_MA_6025850: - {type: GFX, offset: 0x6025850, symbol: D_MA_6025850} +aMaVerticalLockBarDL: + {type: GFX, offset: 0x6025850, symbol: aMaVerticalLockBarDL} D_MA_6025A70: {type: GFX, offset: 0x6025A70, symbol: D_MA_6025A70} @@ -604,11 +604,11 @@ D_MA_6026C00: D_MA_6027000: { type: TEXTURE, format: TLUT, ctype: u16, colors: 112, offset: 0x6027000, symbol: D_MA_6027000} -D_MA_60270E0: - {type: GFX, offset: 0x60270E0, symbol: D_MA_60270E0} +aMaWall1DL: + {type: GFX, offset: 0x60270E0, symbol: aMaWall1DL} -D_MA_6027180: - { type: GFX, offset: 0x6027180, symbol: D_MA_6027180} +aMaBuilding2DL: + { type: GFX, offset: 0x6027180, symbol: aMaBuilding2DL} D_MA_6027320: {type: SF64:ANIM, offset: 0x6027320, symbol: D_MA_6027320} @@ -616,8 +616,8 @@ D_MA_6027320: D_MA_602742C: {type: SF64:SKELETON, offset: 0x602742C, symbol: D_MA_602742C} -D_MA_6027900: - {type: GFX, offset: 0x6027900, symbol: D_MA_6027900} +aMaFloor2DL: + {type: GFX, offset: 0x6027900, symbol: aMaFloor2DL} D_MA_6027A04: {type: SF64:ANIM, offset: 0x6027A04, symbol: D_MA_6027A04} @@ -658,14 +658,14 @@ D_MA_602CB80: D_MA_602D380: {type: GFX, offset: 0x602D380, symbol: D_MA_602D380} -D_MA_602DAE0: - {type: GFX, offset: 0x602DAE0, symbol: D_MA_602DAE0} +aMaFloor1DL: + {type: GFX, offset: 0x602DAE0, symbol: aMaFloor1DL} -D_MA_602DB80: - {type: GFX, offset: 0x602DB80, symbol: D_MA_602DB80} +aMaFloor3DL: + {type: GFX, offset: 0x602DB80, symbol: aMaFloor3DL} -D_MA_602DC20: - {type: GFX, offset: 0x602DC20, symbol: D_MA_602DC20} +aMaFloor5DL: + {type: GFX, offset: 0x602DC20, symbol: aMaFloor5DL} D_MA_602DCB8: {type: TEXTURE, format: RGBA16, ctype: u16, width: 32, height: 32, offset: 0x602DCB8, symbol: D_MA_602DCB8} @@ -703,11 +703,11 @@ D_MA_602FFA0: D_MA_602FFC0: {type: GFX, offset: 0x602FFC0, symbol: D_MA_602FFC0} -D_MA_6030500: - {type: GFX, offset: 0x6030500, symbol: D_MA_6030500} +aMaTerrainBumpDL: + {type: GFX, offset: 0x6030500, symbol: aMaTerrainBumpDL} -D_MA_6030630: - {type: GFX, offset: 0x6030630, symbol: D_MA_6030630} +aMaFloor4DL: + {type: GFX, offset: 0x6030630, symbol: aMaFloor4DL} D_MA_60306D0: {type: GFX, offset: 0x60306D0, symbol: D_MA_60306D0} @@ -757,20 +757,20 @@ D_MA_6035920: D_MA_60359AC: {type: SF64:HITBOX, offset: 0x60359AC, symbol: D_MA_60359AC} -D_MA_60359C8: - {type: SF64:HITBOX, offset: 0x60359C8, symbol: D_MA_60359C8} +aMaLocomotiveHitbox: + {type: SF64:HITBOX, offset: 0x60359C8, symbol: aMaLocomotiveHitbox} -D_MA_6035A14: - {type: SF64:HITBOX, offset: 0x6035A14, symbol: D_MA_6035A14} +aMaTrainCar2Hitbox: + {type: SF64:HITBOX, offset: 0x6035A14, symbol: aMaTrainCar2Hitbox} -D_MA_6035A48: - {type: SF64:HITBOX, offset: 0x6035A48, symbol: D_MA_6035A48} +aMaTrainCar1Hitbox: + {type: SF64:HITBOX, offset: 0x6035A48, symbol: aMaTrainCar1Hitbox} D_MA_6035A94: {type: SF64:HITBOX, offset: 0x6035A94, symbol: D_MA_6035A94} -D_MA_6035AE0: - {type: SF64:HITBOX, offset: 0x6035AE0, symbol: D_MA_6035AE0} +aMaTrainCar3Hitbox: + {type: SF64:HITBOX, offset: 0x6035AE0, symbol: aMaTrainCar3Hitbox} D_MA_6035B44: {type: SF64:HITBOX, offset: 0x6035B44, symbol: D_MA_6035B44} @@ -790,14 +790,14 @@ D_MA_6035CD4: D_MA_6035D38: {type: SF64:HITBOX, offset: 0x6035D38, symbol: D_MA_6035D38} -D_MA_6035D9C: - {type: SF64:HITBOX, offset: 0x6035D9C, symbol: D_MA_6035D9C} +aMaTrainCar4Hitbox: + {type: SF64:HITBOX, offset: 0x6035D9C, symbol: aMaTrainCar4Hitbox} D_MA_6035DD0: {type: SF64:HITBOX, offset: 0x6035DD0, symbol: D_MA_6035DD0} -D_MA_6035E04: - {type: SF64:HITBOX, offset: 0x6035E04, symbol: D_MA_6035E04} +aMaTrainCar5Hitbox: + {type: SF64:HITBOX, offset: 0x6035E04, symbol: aMaTrainCar5Hitbox} D_MA_6035E68: {type: SF64:HITBOX, offset: 0x6035E68, symbol: D_MA_6035E68} @@ -817,101 +817,101 @@ D_MA_6035FF8: D_MA_603605C: {type: SF64:HITBOX, offset: 0x603605C, symbol: D_MA_603605C} -D_MA_60360C0: - {type: SF64:HITBOX, offset: 0x60360C0, symbol: D_MA_60360C0} +aMaTrainCar6Hitbox: + {type: SF64:HITBOX, offset: 0x60360C0, symbol: aMaTrainCar6Hitbox} -D_MA_6036154: - {type: SF64:HITBOX, offset: 0x6036154, symbol: D_MA_6036154} +aMaTrainCar7Hitbox: + {type: SF64:HITBOX, offset: 0x6036154, symbol: aMaTrainCar7Hitbox} D_MA_6036188: {type: SF64:HITBOX, offset: 0x6036188, symbol: D_MA_6036188} -D_MA_6036204: - {type: SF64:HITBOX, offset: 0x6036204, symbol: D_MA_6036204} +aMaTrainTrack13Hitbox: + {type: SF64:HITBOX, offset: 0x6036204, symbol: aMaTrainTrack13Hitbox} D_MA_6036250: {type: SF64:HITBOX, offset: 0x6036250, symbol: D_MA_6036250} -D_MA_603626C: - {type: SF64:HITBOX, offset: 0x603626C, symbol: D_MA_603626C} +aMaBuilding1Hitbox: + {type: SF64:HITBOX, offset: 0x603626C, symbol: aMaBuilding1Hitbox} -D_MA_6036288: - {type: SF64:HITBOX, offset: 0x6036288, symbol: D_MA_6036288} +aMaBuilding2Hitbox: + {type: SF64:HITBOX, offset: 0x6036288, symbol: aMaBuilding2Hitbox} -D_MA_60362A4: - {type: SF64:HITBOX, offset: 0x60362A4, symbol: D_MA_60362A4} +aMaTowerHitbox: + {type: SF64:HITBOX, offset: 0x60362A4, symbol: aMaTowerHitbox} -D_MA_60362D8: - {type: SF64:HITBOX, offset: 0x60362D8, symbol: D_MA_60362D8} +aMaWall2Hitbox: + {type: SF64:HITBOX, offset: 0x60362D8, symbol: aMaWall2Hitbox} -D_MA_60362F4: - {type: SF64:HITBOX, offset: 0x60362F4, symbol: D_MA_60362F4} +aMaWall4Hitbox: + {type: SF64:HITBOX, offset: 0x60362F4, symbol: aMaWall4Hitbox} -D_MA_6036328: - {type: SF64:HITBOX, offset: 0x6036328, symbol: D_MA_6036328} +aMaWall3Hitbox: + {type: SF64:HITBOX, offset: 0x6036328, symbol: aMaWall3Hitbox} -D_MA_6036344: - {type: SF64:HITBOX, offset: 0x6036344, symbol: D_MA_6036344} +aMaIndicatorSignHitbox: + {type: SF64:HITBOX, offset: 0x6036344, symbol: aMaIndicatorSignHitbox} -D_MA_6036370: - {type: SF64:HITBOX, offset: 0x6036370, symbol: D_MA_6036370} +aMaTerrainBumpHitbox: + {type: SF64:HITBOX, offset: 0x6036370, symbol: aMaTerrainBumpHitbox} -D_MA_603638C: - {type: SF64:HITBOX, offset: 0x603638C, symbol: D_MA_603638C} +aMaFloor1Hitbox: + {type: SF64:HITBOX, offset: 0x603638C, symbol: aMaFloor1Hitbox} -D_MA_60363B8: - {type: SF64:HITBOX, offset: 0x60363B8, symbol: D_MA_60363B8} +aMaFloor2Hitbox: + {type: SF64:HITBOX, offset: 0x60363B8, symbol: aMaFloor2Hitbox} -D_MA_60363E4: - {type: SF64:HITBOX, offset: 0x60363E4, symbol: D_MA_60363E4} +aMaFloor3Hitbox: + {type: SF64:HITBOX, offset: 0x60363E4, symbol: aMaFloor3Hitbox} -D_MA_6036410: - {type: SF64:HITBOX, offset: 0x6036410, symbol: D_MA_6036410} +aMaFloor4Hitbox: + {type: SF64:HITBOX, offset: 0x6036410, symbol: aMaFloor4Hitbox} -D_MA_603643C: - {type: SF64:HITBOX, offset: 0x603643C, symbol: D_MA_603643C} +aMaFloor5Hitbox: + {type: SF64:HITBOX, offset: 0x603643C, symbol: aMaFloor5Hitbox} -D_MA_6036458: - {type: SF64:HITBOX, offset: 0x6036458, symbol: D_MA_6036458} +aMaMaRailroadSwitchHitbox: + {type: SF64:HITBOX, offset: 0x6036458, symbol: aMaMaRailroadSwitchHitbox} D_MA_603648C: {type: SF64:HITBOX, offset: 0x603648C, symbol: D_MA_603648C} -D_MA_60364C0: - {type: SF64:HITBOX, offset: 0x60364C0, symbol: D_MA_60364C0} +aMaBoulderHitbox: + {type: SF64:HITBOX, offset: 0x60364C0, symbol: aMaBoulderHitbox} -D_MA_60364DC: - {type: SF64:HITBOX, offset: 0x60364DC, symbol: D_MA_60364DC} +aMaRailwaySignalHitbox: + {type: SF64:HITBOX, offset: 0x60364DC, symbol: aMaRailwaySignalHitbox} D_MA_6036520: {type: SF64:HITBOX, offset: 0x6036520, symbol: D_MA_6036520} -D_MA_6036594: - {type: SF64:HITBOX, offset: 0x6036594, symbol: D_MA_6036594} +aMaSwitchTrackHitbox: + {type: SF64:HITBOX, offset: 0x6036594, symbol: aMaSwitchTrackHitbox} D_MA_6036668: {type: SF64:HITBOX, offset: 0x6036668, symbol: D_MA_6036668} -D_MA_60366EC: - {type: SF64:HITBOX, offset: 0x60366EC, symbol: D_MA_60366EC} +aMaHorizontalLockBarHitbox: + {type: SF64:HITBOX, offset: 0x60366EC, symbol: aMaHorizontalLockBarHitbox} -D_MA_6036708: - {type: SF64:HITBOX, offset: 0x6036708, symbol: D_MA_6036708} +aMaVerticalLockBarHitbox: + {type: SF64:HITBOX, offset: 0x6036708, symbol: aMaVerticalLockBarHitbox} -D_MA_6036724: - {type: SF64:HITBOX, offset: 0x6036724, symbol: D_MA_6036724} +aMaProximityLightHitbox: + {type: SF64:HITBOX, offset: 0x6036724, symbol: aMaProximityLightHitbox} -D_MA_6036728: - {type: SF64:HITBOX, offset: 0x6036728, symbol: D_MA_6036728} +aMaBarrierHitbox: + {type: SF64:HITBOX, offset: 0x6036728, symbol: aMaBarrierHitbox} -D_MA_6036744: - {type: SF64:HITBOX, offset: 0x6036744, symbol: D_MA_6036744} +aMaActor219Hitbox: + {type: SF64:HITBOX, offset: 0x6036744, symbol: aMaActor219Hitbox} -D_MA_6036760: - {type: SF64:HITBOX, offset: 0x6036760, symbol: D_MA_6036760} +aMaFloor6Hitbox: + {type: SF64:HITBOX, offset: 0x6036760, symbol: aMaFloor6Hitbox} -D_MA_603677C: - {type: SF64:HITBOX, offset: 0x603677C, symbol: D_MA_603677C} +aMaActor207Hitbox: + {type: SF64:HITBOX, offset: 0x603677C, symbol: aMaActor207Hitbox} D_MA_6036818: {type: SF64:HITBOX, offset: 0x6036818, symbol: D_MA_6036818} @@ -919,20 +919,20 @@ D_MA_6036818: D_MA_6036894: {type: SF64:HITBOX, offset: 0x6036894, symbol: D_MA_6036894} -D_MA_60368E0: - {type: SF64:HITBOX, offset: 0x60368E0, symbol: D_MA_60368E0} +aMaGuillotineHitbox: + {type: SF64:HITBOX, offset: 0x60368E0, symbol: aMaGuillotineHitbox} D_MA_60368FC: {type: SF64:HITBOX, offset: 0x60368FC, symbol: D_MA_60368FC} -D_MA_6036930: - {type: SF64:HITBOX, offset: 0x6036930, symbol: D_MA_6036930} +aMaBombDropHitbox: + {type: SF64:HITBOX, offset: 0x6036930, symbol: aMaBombDropHitbox} -D_MA_603694C: - {type: SF64:HITBOX, offset: 0x603694C, symbol: D_MA_603694C} +aMaSpearHitbox: + {type: SF64:HITBOX, offset: 0x603694C, symbol: aMaSpearHitbox} -D_MA_6036968: - {type: SF64:HITBOX, offset: 0x6036968, symbol: D_MA_6036968} +aMaShockBoxHitbox: + {type: SF64:HITBOX, offset: 0x6036968, symbol: aMaShockBoxHitbox} D_MA_60381D8: {type: SF64:SCRIPT, offset: 0x60381D8, symbol: D_MA_60381D8} diff --git a/assets/yaml/us/rev1/ast_meteo.yaml b/assets/yaml/us/rev1/ast_meteo.yaml index 16a3ac8b..26757edd 100644 --- a/assets/yaml/us/rev1/ast_meteo.yaml +++ b/assets/yaml/us/rev1/ast_meteo.yaml @@ -104,8 +104,8 @@ D_ME_600C740: D_ME_600CAA0: { type: GFX, offset: 0x600CAA0, symbol: D_ME_600CAA0 } -D_ME_600CD60: - { type: GFX, offset: 0x600CD60, symbol: D_ME_600CD60 } +aMeMeteorShower3DL: + { type: GFX, offset: 0x600CD60, symbol: aMeMeteorShower3DL } D_ME_600CDE8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x0600CDE8, symbol: D_ME_600CDE8 } @@ -137,8 +137,8 @@ D_ME_6014238: D_ME_6015238: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x06015238, symbol: D_ME_6015238 } -D_ME_6016240: - { type: GFX, offset: 0x6016240, symbol: D_ME_6016240 } +aMeMeteorShower2DL: + { type: GFX, offset: 0x6016240, symbol: aMeMeteorShower2DL } D_ME_60162C8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x060162C8, symbol: D_ME_60162C8 } @@ -146,20 +146,20 @@ D_ME_60162C8: D_ME_60172C8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x060172C8, symbol: D_ME_60172C8 } -D_ME_6017AD0: - { type: GFX, offset: 0x06017AD0, symbol: D_ME_6017AD0 } +aMeMeteorShower1DL: + { type: GFX, offset: 0x06017AD0, symbol: aMeMeteorShower1DL } D_ME_6017B60: { type: GFX, offset: 0x06017B60, symbol: D_ME_6017B60 } -D_ME_6018450: - { type: GFX, offset: 0x06018450, symbol: D_ME_6018450 } +aMeLaserCannon2DL: + { type: GFX, offset: 0x06018450, symbol: aMeLaserCannon2DL } D_ME_6018960: { type: GFX, offset: 0x06018960, symbol: D_ME_6018960 } -D_ME_6018C00: - { type: GFX, offset: 0x06018C00, symbol: D_ME_6018C00 } +aMeMeteor1DL: + { type: GFX, offset: 0x06018C00, symbol: aMeMeteor1DL } D_ME_6019430: { type: GFX, offset: 0x06019430, symbol: D_ME_6019430 } @@ -286,29 +286,29 @@ D_ME_602F604: D_ME_602F638: { type: SF64:HITBOX, offset: 0x602F638, symbol: D_ME_602F638 } -D_ME_602F684: - { type: SF64:HITBOX, offset: 0x602F684, symbol: D_ME_602F684 } +aMeMeteoBallHitbox: + { type: SF64:HITBOX, offset: 0x602F684, symbol: aMeMeteoBallHitbox } -D_ME_602F6A0: - { type: SF64:HITBOX, offset: 0x602F6A0, symbol: D_ME_602F6A0 } +aMeHopBotHitbox: + { type: SF64:HITBOX, offset: 0x602F6A0, symbol: aMeHopBotHitbox } -D_ME_602F6EC: - { type: SF64:HITBOX, offset: 0x602F6EC, symbol: D_ME_602F6EC } +aMeMeteor1Hitbox: + { type: SF64:HITBOX, offset: 0x602F6EC, symbol: aMeMeteor1Hitbox } -D_ME_602F708: - { type: SF64:HITBOX, offset: 0x602F708, symbol: D_ME_602F708 } +aMeMeteor2Hitbox: + { type: SF64:HITBOX, offset: 0x602F708, symbol: aMeMeteor2Hitbox } -D_ME_602F724: - { type: SF64:HITBOX, offset: 0x602F724, symbol: D_ME_602F724 } +aMeLaserCannon1Hitbox: + { type: SF64:HITBOX, offset: 0x602F724, symbol: aMeLaserCannon1Hitbox } -D_ME_602F740: - { type: SF64:HITBOX, offset: 0x602F740, symbol: D_ME_602F740 } +aMeLaserCannon2Hitbox: + { type: SF64:HITBOX, offset: 0x602F740, symbol: aMeLaserCannon2Hitbox } -D_ME_602F75C: - { type: SF64:HITBOX, offset: 0x602F75C, symbol: D_ME_602F75C } +aMeCrusherHitbox: + { type: SF64:HITBOX, offset: 0x602F75C, symbol: aMeCrusherHitbox } -D_ME_602FA50: - { type: SF64:HITBOX, offset: 0x602FA50, symbol: D_ME_602FA50 } +aMeCrusherShieldHitbox: + { type: SF64:HITBOX, offset: 0x602FA50, symbol: aMeCrusherShieldHitbox } D_ME_602FA9C: {type: SF64:COLPOLY, count: 79, offset: 0x602FA9C, symbol: D_ME_602FA9C, mesh_symbol: D_ME_OFFSET } diff --git a/assets/yaml/us/rev1/ast_sector_x.yaml b/assets/yaml/us/rev1/ast_sector_x.yaml index 2f2d2754..7dfa09e5 100644 --- a/assets/yaml/us/rev1/ast_sector_x.yaml +++ b/assets/yaml/us/rev1/ast_sector_x.yaml @@ -247,14 +247,14 @@ D_SX_603238C: D_SX_6032408: { type: SF64:HITBOX, offset: 0x6032408, symbol: D_SX_6032408 } -D_SX_6032488: - { type: SF64:HITBOX, offset: 0x6032488, symbol: D_SX_6032488 } +aSxSpyborgLeftArmHitbox: + { type: SF64:HITBOX, offset: 0x6032488, symbol: aSxSpyborgLeftArmHitbox } -D_SX_60324EC: - { type: SF64:HITBOX, offset: 0x60324EC, symbol: D_SX_60324EC } +aSxSpyborgRightArmHitbox: + { type: SF64:HITBOX, offset: 0x60324EC, symbol: aSxSpyborgRightArmHitbox } -D_SX_6032550: - { type: SF64:HITBOX, offset: 0x6032550, symbol: D_SX_6032550 } +aSxSpyborgHitbox: + { type: SF64:HITBOX, offset: 0x6032550, symbol: aSxSpyborgHitbox } D_SX_603285C: { type: SF64:HITBOX, offset: 0x603285C, symbol: D_SX_603285C } diff --git a/assets/yaml/us/rev1/ast_sector_y.yaml b/assets/yaml/us/rev1/ast_sector_y.yaml index 8ca9f1ef..3e107fe7 100644 --- a/assets/yaml/us/rev1/ast_sector_y.yaml +++ b/assets/yaml/us/rev1/ast_sector_y.yaml @@ -35,11 +35,11 @@ D_SY_6003348: D_SY_60034C4: { type: SF64:ANIM, offset: 0x60034C4, symbol: D_SY_60034C4 } -D_SY_60034D0: - { type: GFX, offset: 0x60034D0, symbol: D_SY_60034D0 } +aSyShipWindowsDL: + { type: GFX, offset: 0x60034D0, symbol: aSyShipWindowsDL } -D_SY_60036A0: - { type: GFX, offset: 0x60036A0, symbol: D_SY_60036A0 } +aSyShip3DestroyedDL: + { type: GFX, offset: 0x60036A0, symbol: aSyShip3DestroyedDL } D_SY_6004958: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06004958, symbol: D_SY_6004958 } @@ -47,8 +47,8 @@ D_SY_6004958: D_SY_6005158: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06005158, symbol: D_SY_6005158 } -D_SY_6005360: - { type: GFX, offset: 0x6005360, symbol: D_SY_6005360 } +aSyShip4DL: + { type: GFX, offset: 0x6005360, symbol: aSyShip4DL } D_SY_6005BE0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06005BE0, symbol: D_SY_6005BE0 } @@ -74,8 +74,8 @@ D_SY_6008BE0: D_SY_6008FE0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06008FE0, symbol: D_SY_6008FE0 } -D_SY_60097E0: - { type: GFX, offset: 0x060097E0, symbol: D_SY_60097E0 } +aSyShip1DL: + { type: GFX, offset: 0x060097E0, symbol: aSyShip1DL } D_SY_600AAC0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 64, offset: 0x0600AAC0, symbol: D_SY_600AAC0 } @@ -98,11 +98,11 @@ D_SY_600EAC0: D_SY_600F2C0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 32, offset: 0x0600F2C0, symbol: D_SY_600F2C0 } -D_SY_600F6C0: - { type: GFX, offset: 0x600F6C0, symbol: D_SY_600F6C0 } +aSyShip4DestroyedDL: + { type: GFX, offset: 0x600F6C0, symbol: aSyShip4DestroyedDL } -D_SY_60102C0: - { type: GFX, offset: 0x60102C0, symbol: D_SY_60102C0 } +aSyShip3DL: + { type: GFX, offset: 0x60102C0, symbol: aSyShip3DL } D_SY_6011758: { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x06011758, symbol: D_SY_6011758 } @@ -158,8 +158,8 @@ D_SY_6015960: D_SY_6015B60: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06015B60, symbol: D_SY_6015B60 } -D_SY_60188D0: - { type: GFX, offset: 0x60188D0, symbol: D_SY_60188D0 } +aSyShipProjectileDL: + { type: GFX, offset: 0x60188D0, symbol: aSyShipProjectileDL } D_SY_60183B0: { type: GFX, offset: 0x60183B0, symbol: D_SY_60183B0 } @@ -176,20 +176,20 @@ D_SY_601AD70: D_SY_601AE08: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601AE08, symbol: D_SY_601AE08 } -D_SY_601B610: - { type: GFX, offset: 0x601B610, symbol: D_SY_601B610 } +aSyShip2SpriteDL: + { type: GFX, offset: 0x601B610, symbol: aSyShip2SpriteDL } D_SY_601B6A0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x0601B6A0, symbol: D_SY_601B6A0 } -D_SY_601C6A0: - { type: GFX, offset: 0x601C6A0, symbol: D_SY_601C6A0 } +aSyShip3SpriteDL: + { type: GFX, offset: 0x601C6A0, symbol: aSyShip3SpriteDL } D_SY_601C730: { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x0601C730, symbol: D_SY_601C730 } -D_SY_601D730: - { type: GFX, offset: 0x601D730, symbol: D_SY_601D730 } +aSyShip2DL: + { type: GFX, offset: 0x601D730, symbol: aSyShip2DL } D_SY_601F3B8: { type: SF64:ANIM, offset: 0x601F3B8, symbol: D_SY_601F3B8 } @@ -308,8 +308,8 @@ D_SY_6032E18: D_SY_6033070: {type: SF64:COLPOLY, count: 174, offset: 0x6033070, symbol: D_SY_6033070, mesh_symbol: D_SY_6033E08 } -D_SY_603405C: - { type: SF64:HITBOX, offset: 0x603405C, symbol: D_SY_603405C } +aSyRobotHitbox: + { type: SF64:HITBOX, offset: 0x603405C, symbol: aSyRobotHitbox } D_SY_60340C0: { type: SF64:HITBOX, offset: 0x60340C0, symbol: D_SY_60340C0 } @@ -329,34 +329,34 @@ D_SY_60342A0: D_SY_6034304: { type: SF64:HITBOX, offset: 0x6034304, symbol: D_SY_6034304 } -D_SY_6034368: - { type: SF64:HITBOX, offset: 0x6034368, symbol: D_SY_6034368 } +aSyScenery156Hitbox: + { type: SF64:HITBOX, offset: 0x6034368, symbol: aSyScenery156Hitbox } D_SY_603445C: { type: SF64:HITBOX, offset: 0x603445C, symbol: D_SY_603445C } -D_SY_6034478: - { type: SF64:HITBOX, offset: 0x6034478, symbol: D_SY_6034478 } +aSyShip1Hitbox: + { type: SF64:HITBOX, offset: 0x6034478, symbol: aSyShip1Hitbox } -D_SY_603450C: - { type: SF64:HITBOX, offset: 0x603450C, symbol: D_SY_603450C } +aSyShip2Hitbox: + { type: SF64:HITBOX, offset: 0x603450C, symbol: aSyShip2Hitbox } -D_SY_6034588: - { type: SF64:HITBOX, offset: 0x6034588, symbol: D_SY_6034588 } +aSyShip3Hitbox: + { type: SF64:HITBOX, offset: 0x6034588, symbol: aSyShip3Hitbox } -D_SY_6034664: - { type: SF64:HITBOX, offset: 0x6034664, symbol: D_SY_6034664 } +aSyShip3DestroyedHitbox: + { type: SF64:HITBOX, offset: 0x6034664, symbol: aSyShip3DestroyedHitbox } -D_SY_6034770: - { type: SF64:HITBOX, offset: 0x6034770, symbol: D_SY_6034770 } +aSyShip4Hitbox: + { type: SF64:HITBOX, offset: 0x6034770, symbol: aSyShip4Hitbox } -D_SY_60347D4: - { type: SF64:HITBOX, offset: 0x60347D4, symbol: D_SY_60347D4 } +aSyShipWindowsHitbox: + { type: SF64:HITBOX, offset: 0x60347D4, symbol: aSyShipWindowsHitbox } -D_SY_60347F0: - { type: SF64:HITBOX, offset: 0x60347F0, symbol: D_SY_60347F0 } +aSyShip4DestroyedHitbox: + { type: SF64:HITBOX, offset: 0x60347F0, symbol: aSyShip4DestroyedHitbox } -D_SY_603486C: - { type: SF64:HITBOX, offset: 0x603486C, symbol: D_SY_603486C } +aSyShipProjectileHitbox: + { type: SF64:HITBOX, offset: 0x603486C, symbol: aSyShipProjectileHitbox } # size = 0x34890 \ No newline at end of file diff --git a/assets/yaml/us/rev1/ast_sector_z.yaml b/assets/yaml/us/rev1/ast_sector_z.yaml index 5213b9d2..f6e4284a 100644 --- a/assets/yaml/us/rev1/ast_sector_z.yaml +++ b/assets/yaml/us/rev1/ast_sector_z.yaml @@ -85,8 +85,8 @@ D_SZ_60041F8: D_SZ_60042F8: { type: TEXTURE, ctype: u16, format: TLUT, colors: 24, offset: 0x060042F8, symbol: D_SZ_60042F8 } -D_SZ_6004330: - { type: GFX, offset: 0x6004330, symbol: D_SZ_6004330 } +aSzMissileMark: + { type: GFX, offset: 0x6004330, symbol: aSzMissileMark } D_SZ_6004458: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 8, offset: 0x06004458, symbol: D_SZ_6004458, tlut: 0x06004558 } @@ -160,13 +160,13 @@ D_SZ_6007558: aSZMissileHitbox: { type: SF64:HITBOX, offset: 0x6009230, symbol: aSZMissileHitbox } -D_SZ_600924C: - { type: SF64:HITBOX, offset: 0x600924C, symbol: D_SZ_600924C } +aSzSpaceJunk3Hitbox: + { type: SF64:HITBOX, offset: 0x600924C, symbol: aSzSpaceJunk3Hitbox } -D_SZ_60092E8: - { type: SF64:HITBOX, offset: 0x60092E8, symbol: D_SZ_60092E8 } +aSzSpaceJunk1Hitbox: + { type: SF64:HITBOX, offset: 0x60092E8, symbol: aSzSpaceJunk1Hitbox } -D_SZ_6009388: - { type: SF64:HITBOX, offset: 0x6009388, symbol: D_SZ_6009388 } +aSzGreatFoxHitbox: + { type: SF64:HITBOX, offset: 0x6009388, symbol: aSzGreatFoxHitbox } # size = 0x93B0 \ No newline at end of file diff --git a/assets/yaml/us/rev1/ast_titania.yaml b/assets/yaml/us/rev1/ast_titania.yaml index 829c10bd..a0cc8a19 100644 --- a/assets/yaml/us/rev1/ast_titania.yaml +++ b/assets/yaml/us/rev1/ast_titania.yaml @@ -76,11 +76,11 @@ D_TI_6005000: D_TI_600631C: {type: SF64:SCRIPT, offset: 0x600631C, symbol: D_TI_600631C} -D_TI_60064AC: - {type: SF64:HITBOX, offset: 0x60064AC, symbol: D_TI_60064AC} +aTi1LandmineHitbox: + {type: SF64:HITBOX, offset: 0x60064AC, symbol: aTi1LandmineHitbox} -D_TI_60064C8: - {type: SF64:HITBOX, offset: 0x60064C8, symbol: D_TI_60064C8} +aTiDesertRoverHitbox: + {type: SF64:HITBOX, offset: 0x60064C8, symbol: aTiDesertRoverHitbox} aTiSkullHitbox: {type: SF64:HITBOX, offset: 0x60064FC, symbol: aTiSkullHitbox} @@ -112,32 +112,32 @@ aTiRib7Hitbox: aTiRib8Hitbox: {type: SF64:HITBOX, offset: 0x6006778, symbol: aTiRib8Hitbox} -D_TI_60067C4: - {type: SF64:HITBOX, offset: 0x60067C4, symbol: D_TI_60067C4} +aTiDelphorHitbox: + {type: SF64:HITBOX, offset: 0x60067C4, symbol: aTiDelphorHitbox} -D_TI_6006808: - {type: SF64:HITBOX, offset: 0x6006808, symbol: D_TI_6006808} +aTiDelphorHeadHitbox: + {type: SF64:HITBOX, offset: 0x6006808, symbol: aTiDelphorHeadHitbox} -D_TI_6006A3C: - {type: SF64:HITBOX, offset: 0x6006A3C, symbol: D_TI_6006A3C} +aTiDesertCrawlerHitbox: + {type: SF64:HITBOX, offset: 0x6006A3C, symbol: aTiDesertCrawlerHitbox} -D_TI_600683C: - {type: SF64:HITBOX, offset: 0x600683C, symbol: D_TI_600683C} +aTiBoulderHitbox: + {type: SF64:HITBOX, offset: 0x600683C, symbol: aTiBoulderHitbox} -D_TI_6006858: - {type: SF64:HITBOX, offset: 0x6006858, symbol: D_TI_6006858} +aTiBombHitbox: + {type: SF64:HITBOX, offset: 0x6006858, symbol: aTiBombHitbox} D_TI_6006874: {type: SF64:HITBOX, offset: 0x6006874, symbol: D_TI_6006874} -D_TI_6006890: - {type: SF64:HITBOX, offset: 0x6006890, symbol: D_TI_6006890} +aTiRascoHitbox: + {type: SF64:HITBOX, offset: 0x6006890, symbol: aTiRascoHitbox} aTiCactusHitbox: {type: SF64:HITBOX, offset: 0x60068BC, symbol: aTiCactusHitbox} -D_TI_60068F0: - {type: SF64:HITBOX, offset: 0x60068F0, symbol: D_TI_60068F0} +aTiFekudaHitbox: + {type: SF64:HITBOX, offset: 0x60068F0, symbol: aTiFekudaHitbox} D_TI_6006940: {type: SF64:HITBOX, offset: 0x6006940, symbol: D_TI_6006940} @@ -166,8 +166,8 @@ D_TI_6006A04: D_TI_6006A20: {type: SF64:HITBOX, offset: 0x6006A20, symbol: D_TI_6006A20} -D_TI_6006BF0: - {type: SF64:HITBOX, offset: 0x6006BF0, symbol: D_TI_6006BF0} +aTiPillarHitbox: + {type: SF64:HITBOX, offset: 0x6006BF0, symbol: aTiPillarHitbox} D_TI_6006924: {type: SF64:HITBOX, offset: 0x6006924, symbol: D_TI_6006924} @@ -178,8 +178,8 @@ D_TI_6006C0C: D_TI_6006C28: {type: SF64:HITBOX, offset: 0x6006C28, symbol: D_TI_6006C28} -D_TI_6006C44: - {type: SF64:HITBOX, offset: 0x6006C44, symbol: D_TI_6006C44} +aTiBridgeHitbox: + {type: SF64:HITBOX, offset: 0x6006C44, symbol: aTiBridgeHitbox} D_TI_6006C60: {type: SF64:OBJECT_INIT, offset: 0x6006C60, symbol: D_TI_6006C60} diff --git a/assets/yaml/us/rev1/ast_training.yaml b/assets/yaml/us/rev1/ast_training.yaml index 3a064e81..6ac1d8e2 100644 --- a/assets/yaml/us/rev1/ast_training.yaml +++ b/assets/yaml/us/rev1/ast_training.yaml @@ -31,8 +31,8 @@ D_TR_6002740: D_TR_60028F0: { type: TEXTURE, format: RGBA16, offset: 0x060028F0, width: 32, height: 32, ctype: u16, symbol: D_TR_60028F0 } -D_TR_60030F0: - { type: GFX, offset: 0x60030F0, symbol: D_TR_60030F0 } +aTrBuildingDL: + { type: GFX, offset: 0x60030F0, symbol: aTrBuildingDL } D_TR_6003360: { type: TEXTURE, format: RGBA16, offset: 0x06003360, width: 16, height: 16, ctype: u16, symbol: D_TR_6003360 } @@ -76,8 +76,8 @@ D_TR_6008EF8: D_TR_6009B34: { type: SF64:SCRIPT, offset: 0x6009B34, symbol: D_TR_6009B34 } -D_TR_6009CC4: - { type: SF64:HITBOX, offset: 0x6009CC4, symbol: D_TR_6009CC4 } +aTrBuildingHitbox: + { type: SF64:HITBOX, offset: 0x6009CC4, symbol: aTrBuildingHitbox } D_TR_6009CFC: { type: SF64:HITBOX, offset: 0x6009CFC, symbol: D_TR_6009CFC } diff --git a/assets/yaml/us/rev1/ast_ve1_boss.yaml b/assets/yaml/us/rev1/ast_ve1_boss.yaml index 14a29c08..a87b71cc 100644 --- a/assets/yaml/us/rev1/ast_ve1_boss.yaml +++ b/assets/yaml/us/rev1/ast_ve1_boss.yaml @@ -50,8 +50,8 @@ D_VE1_90039F0: D_VE1_9003DF0: {type: TEXTURE, ctype: u16, format: TLUT, colors: 176, offset: 0x9003DF0, symbol: D_VE1_9003DF0} -D_VE1_9003F50: - {type: GFX, offset: 0x9003F50, symbol: D_VE1_9003F50} +aVe1TempleInterior1DL: + {type: GFX, offset: 0x9003F50, symbol: aVe1TempleInterior1DL} D_VE1_9004478: {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 32, offset: 0x9004478, symbol: D_VE1_9004478} @@ -65,8 +65,8 @@ D_VE1_9005078: D_VE1_9005478: {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x9005478, symbol: D_VE1_9005478} -D_VE1_9005C80: - {type: GFX, offset: 0x9005C80, symbol: D_VE1_9005C80} +aVe1TempleEntranceDL: + {type: GFX, offset: 0x9005C80, symbol: aVe1TempleEntranceDL} D_VE1_9009700: {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x9009700, symbol: D_VE1_9009700} @@ -92,8 +92,8 @@ D_VE1_900BF00: D_VE1_900C700: {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x900C700, symbol: D_VE1_900C700} -D_VE1_900D098: - {type: SF64:ANIM, offset: 0x900D098, symbol: D_VE1_900D098} +aVe1MonkeyStatueAnim: + {type: SF64:ANIM, offset: 0x900D098, symbol: aVe1MonkeyStatueAnim} D_VE1_900D164: {type: SF64:SKELETON, offset: 0x900D164, symbol: D_VE1_900D164} @@ -104,8 +104,8 @@ D_VE1_900D180: D_VE1_900D520: {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x900D520, symbol: D_VE1_900D520} -D_VE1_900DD20: - {type: GFX, offset: 0x900DD20, symbol: D_VE1_900DD20} +aVe1Pillar1DL: + {type: GFX, offset: 0x900DD20, symbol: aVe1Pillar1DL} D_VE1_900DF20: {type: GFX, offset: 0x900DF20, symbol: D_VE1_900DF20} @@ -116,11 +116,11 @@ D_VE1_900DFB8: D_VE1_900EFC0: {type: GFX, offset: 0x900EFC0, symbol: D_VE1_900EFC0} -D_VE1_900F060: - {type: GFX, offset: 0x900F060, symbol: D_VE1_900F060} +aVe1TempleInterior2DL: + {type: GFX, offset: 0x900F060, symbol: aVe1TempleInterior2DL} -D_VE1_900F1D0: - {type: GFX, offset: 0x900F1D0, symbol: D_VE1_900F1D0} +aVe1TempleInterior3DL: + {type: GFX, offset: 0x900F1D0, symbol: aVe1TempleInterior3DL} D_VE1_9010FC4: {type: SF64:ANIM, offset: 0x9010FC4, symbol: D_VE1_9010FC4} @@ -179,8 +179,8 @@ D_VE1_901C0F4: D_VE1_901DA38: {type: SF64:ANIM, offset: 0x901DA38, symbol: D_VE1_901DA38} -D_VE1_901DA50: - {type: GFX, offset: 0x901DA50, symbol: D_VE1_901DA50} +aVe1Pillar3DL: + {type: GFX, offset: 0x901DA50, symbol: aVe1Pillar3DL} D_VE1_901DC90: {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 32, offset: 0x901DC90, symbol: D_VE1_901DC90} @@ -230,8 +230,8 @@ D_VE1_90234D0: D_VE1_9023880: {type: GFX, offset: 0x9023880, symbol: D_VE1_9023880} -D_VE1_9023AD0: - {type: GFX, offset: 0x9023AD0, symbol: D_VE1_9023AD0} +aVe1Pillar4DL: + {type: GFX, offset: 0x9023AD0, symbol: aVe1Pillar4DL} D_VE1_9024738: {type: SF64:ANIM, offset: 0x9024738, symbol: D_VE1_9024738} diff --git a/assets/yaml/us/rev1/ast_venom_1.yaml b/assets/yaml/us/rev1/ast_venom_1.yaml index 96722e97..a8bbfaf9 100644 --- a/assets/yaml/us/rev1/ast_venom_1.yaml +++ b/assets/yaml/us/rev1/ast_venom_1.yaml @@ -46,8 +46,8 @@ D_VE1_6003078: D_VE1_6003478: { type: TEXTURE, format: TLUT, colors: 204, offset: 0x6003478, ctype: u16, symbol: D_VE1_6003478 } -D_VE1_6003610: - { type: GFX, offset: 0x6003610, symbol: D_VE1_6003610 } +aVe1WatchPostDL: + { type: GFX, offset: 0x6003610, symbol: aVe1WatchPostDL } D_VE1_6003B10: { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6003B10, ctype: u16, symbol: D_VE1_6003B10 } @@ -70,8 +70,8 @@ D_VE1_60046F0: D_VE1_6004780: { type: TEXTURE, format: RGBA16, width: 64, height: 32, offset: 0x6004780, ctype: u16, symbol: D_VE1_6004780 } -D_VE1_6005780: - { type: GFX, offset: 0x6005780, symbol: D_VE1_6005780 } +aVe1GeneratorDL: + { type: GFX, offset: 0x6005780, symbol: aVe1GeneratorDL } D_VE1_6005E50: { type: TEXTURE, format: TLUT, colors: 160, offset: 0x6005E50, ctype: u16, symbol: D_VE1_6005E50 } @@ -97,11 +97,11 @@ D_VE1_60066D0: D_VE1_6006750: { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6006750, ctype: u16, symbol: D_VE1_6006750 } -D_VE1_6006F50: - { type: GFX, offset: 0x6006F50, symbol: D_VE1_6006F50 } +aVe1HallwayObstacleDL: + { type: GFX, offset: 0x6006F50, symbol: aVe1HallwayObstacleDL } -D_VE1_6007410: - { type: GFX, offset: 0x6007410, symbol: D_VE1_6007410 } +aVe1SceneryWall3DL: + { type: GFX, offset: 0x6007410, symbol: aVe1SceneryWall3DL } D_VE1_60074E8: { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x60074E8, ctype: u16, symbol: D_VE1_60074E8 } @@ -133,50 +133,50 @@ D_VE1_601B474: D_VE1_601B4C4: { type: SF64:HITBOX, offset: 0x601B4C4, symbol: D_VE1_601B4C4 } -D_VE1_601B4E0: - { type: SF64:HITBOX, offset: 0x601B4E0, symbol: D_VE1_601B4E0 } +aVe1SceneryWall1Hitbox: + { type: SF64:HITBOX, offset: 0x601B4E0, symbol: aVe1SceneryWall1Hitbox } -D_VE1_601B4FC: - { type: SF64:HITBOX, offset: 0x601B4FC, symbol: D_VE1_601B4FC } +aVe1SceneryWall2Hitbox: + { type: SF64:HITBOX, offset: 0x601B4FC, symbol: aVe1SceneryWall2Hitbox } -D_VE1_601B518: - { type: SF64:HITBOX, offset: 0x601B518, symbol: D_VE1_601B518 } +aVe1SceneryWall3Hitbox: + { type: SF64:HITBOX, offset: 0x601B518, symbol: aVe1SceneryWall3Hitbox } -D_VE1_601B584: - { type: SF64:HITBOX, offset: 0x601B584, symbol: D_VE1_601B584 } +aVe1HallwayObstacleHitbox: + { type: SF64:HITBOX, offset: 0x601B584, symbol: aVe1HallwayObstacleHitbox } -D_VE1_601B5F4: - { type: SF64:HITBOX, offset: 0x601B5F4, symbol: D_VE1_601B5F4 } +aVe1GeneratorHitbox: + { type: SF64:HITBOX, offset: 0x601B5F4, symbol: aVe1GeneratorHitbox } -D_VE1_601B644: - { type: SF64:HITBOX, offset: 0x601B644, symbol: D_VE1_601B644 } +aVe1WatchPostHitbox: + { type: SF64:HITBOX, offset: 0x601B644, symbol: aVe1WatchPostHitbox } -D_VE1_601B678: - { type: SF64:HITBOX, offset: 0x601B678, symbol: D_VE1_601B678 } +aVe1TempleEntranceHitbox: + { type: SF64:HITBOX, offset: 0x601B678, symbol: aVe1TempleEntranceHitbox } -D_VE1_601B6C4: - { type: SF64:HITBOX, offset: 0x601B6C4, symbol: D_VE1_601B6C4 } +aVe1TempleInterior1Hitbox: + { type: SF64:HITBOX, offset: 0x601B6C4, symbol: aVe1TempleInterior1Hitbox } -D_VE1_601B710: - { type: SF64:HITBOX, offset: 0x601B710, symbol: D_VE1_601B710 } +aVe1TempleInterior2Hitbox: + { type: SF64:HITBOX, offset: 0x601B710, symbol: aVe1TempleInterior2Hitbox } -D_VE1_601B75C: - { type: SF64:HITBOX, offset: 0x601B75C, symbol: D_VE1_601B75C } +aVe1TempleInterior3Hitbox: + { type: SF64:HITBOX, offset: 0x601B75C, symbol: aVe1TempleInterior3Hitbox } -D_VE1_601B7F8: - { type: SF64:HITBOX, offset: 0x601B7F8, symbol: D_VE1_601B7F8 } +aVe1Pillar1Hitbox: + { type: SF64:HITBOX, offset: 0x601B7F8, symbol: aVe1Pillar1Hitbox } -D_VE1_601B830: - { type: SF64:HITBOX, offset: 0x601B830, symbol: D_VE1_601B830 } +aVe1Pillar2Hitbox: + { type: SF64:HITBOX, offset: 0x601B830, symbol: aVe1Pillar2Hitbox } -D_VE1_601B868: - { type: SF64:HITBOX, offset: 0x601B868, symbol: D_VE1_601B868 } +aVe1Pillar3Hitbox: + { type: SF64:HITBOX, offset: 0x601B868, symbol: aVe1Pillar3Hitbox } -D_VE1_601B8A0: - { type: SF64:HITBOX, offset: 0x601B8A0, symbol: D_VE1_601B8A0 } +aVe1Pillar4Hitbox: + { type: SF64:HITBOX, offset: 0x601B8A0, symbol: aVe1Pillar4Hitbox } -D_VE1_601B8D8: - { type: SF64:HITBOX, offset: 0x601B8D8, symbol: D_VE1_601B8D8 } +aVe1MonkeyStatueHitbox: + { type: SF64:HITBOX, offset: 0x601B8D8, symbol: aVe1MonkeyStatueHitbox } D_VE1_601B944: { type: SF64:HITBOX, offset: 0x601B944, symbol: D_VE1_601B944 } \ No newline at end of file diff --git a/assets/yaml/us/rev1/ast_venom_2.yaml b/assets/yaml/us/rev1/ast_venom_2.yaml index 26d37d60..ae6f652e 100644 --- a/assets/yaml/us/rev1/ast_venom_2.yaml +++ b/assets/yaml/us/rev1/ast_venom_2.yaml @@ -27,11 +27,11 @@ D_VE2_60020D0: D_VE2_6002890: { type: TEXTURE, format: IA8, width: 16, height: 16, offset: 0x6002890, ctype: u8, symbol: D_VE2_6002890 } -D_VE2_6002990: - { type: GFX, offset: 0x6002990, symbol: D_VE2_6002990 } +aAndPathExitDL: + { type: GFX, offset: 0x6002990, symbol: aAndPathExitDL } -D_VE2_6003000: - { type: GFX, offset: 0x6003000, symbol: D_VE2_6003000 } +aAndPathIntersectionDL: + { type: GFX, offset: 0x6003000, symbol: aAndPathIntersectionDL } D_VE2_60038E0: { type: GFX, offset: 0x60038E0, symbol: D_VE2_60038E0 } @@ -39,8 +39,8 @@ D_VE2_60038E0: D_VE2_6003970: { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6003970, ctype: u16, symbol: D_VE2_6003970 } -D_VE2_6004170: - { type: GFX, offset: 0x6004170, symbol: D_VE2_6004170 } +aAndPathEntranceDL: + { type: GFX, offset: 0x6004170, symbol: aAndPathEntranceDL } D_VE2_6004888: { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6004888, ctype: u16, symbol: D_VE2_6004888 } @@ -57,8 +57,8 @@ D_VE2_6006088: D_VE2_60030D8: { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x60030D8, ctype: u16, symbol: D_VE2_60030D8 } -D_VE2_6006890: - { type: GFX, offset: 0x6006890, symbol: D_VE2_6006890 } +aAndPathWallsDL: + { type: GFX, offset: 0x6006890, symbol: aAndPathWallsDL } D_VE2_6006E20: { type: GFX, offset: 0x6006E20, symbol: D_VE2_6006E20 } @@ -72,8 +72,8 @@ D_VE2_6007E20: D_VE2_6008170: { type: TEXTURE, format: RGBA16, width: 16, height: 16, offset: 0x6008170, ctype: u16, symbol: D_VE2_6008170 } -D_VE2_6008370: - { type: GFX, offset: 0x6008370, symbol: D_VE2_6008370 } +aVe2TowerDL: + { type: GFX, offset: 0x6008370, symbol: aVe2TowerDL } D_VE2_6008AF8: { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6008AF8, ctype: u16, symbol: D_VE2_6008AF8 } @@ -162,8 +162,8 @@ D_VE2_600F700: D_VE2_6010700: { type: GFX, offset: 0x6010700, symbol: D_VE2_6010700 } -D_VE2_6010960: - { type: GFX, offset: 0x6010960, symbol: D_VE2_6010960 } +aVe2MountainDL: + { type: GFX, offset: 0x6010960, symbol: aVe2MountainDL } D_VE2_6010CA0: { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6010CA0, ctype: u16, symbol: D_VE2_6010CA0 } @@ -195,11 +195,11 @@ D_VE2_6014D94: D_VE2_6014FEC: { type: SF64:COLPOLY, count: 250, offset: 0x6014FEC, symbol: D_VE2_6014FEC, mesh_symbol: D_VE2_OFFSET } -D_VE2_601668C: - { type: SF64:HITBOX, offset: 0x601668C, symbol: D_VE2_601668C } +aVe2TowerHitbox: + { type: SF64:HITBOX, offset: 0x601668C, symbol: aVe2TowerHitbox } -D_VE2_60166F4: - { type: SF64:HITBOX, offset: 0x60166F4, symbol: D_VE2_60166F4 } +aVe2BaseHitbox: + { type: SF64:HITBOX, offset: 0x60166F4, symbol: aVe2BaseHitbox } -D_VE2_6016714: - { type: SF64:HITBOX, offset: 0x6016714, symbol: D_VE2_6016714 } \ No newline at end of file +aVe2MountainHitbox: + { type: SF64:HITBOX, offset: 0x6016714, symbol: aVe2MountainHitbox } \ No newline at end of file diff --git a/assets/yaml/us/rev1/ast_versus.yaml b/assets/yaml/us/rev1/ast_versus.yaml index f5961866..d0b75a41 100644 --- a/assets/yaml/us/rev1/ast_versus.yaml +++ b/assets/yaml/us/rev1/ast_versus.yaml @@ -182,8 +182,8 @@ D_versus_300EC80: D_versus_300EE80: { type: GFX, offset: 0x300EE80, symbol: D_versus_300EE80} -D_versus_300FB80: - { type: GFX, offset: 0x300FB80, symbol: D_versus_300FB80} +aVsLandmasterModelDL: + { type: GFX, offset: 0x300FB80, symbol: aVsLandmasterModelDL} D_versus_3010690: {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x3010690, symbol: D_versus_3010690 } @@ -203,14 +203,14 @@ D_versus_3011E40: D_versus_3011ED0: {type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x3011ED0, symbol: D_versus_3011ED0 } -D_versus_3012ED0: - { type: GFX, offset: 0x3012ED0, symbol: D_versus_3012ED0} +aVsSpaceJunk3DL: + { type: GFX, offset: 0x3012ED0, symbol: aVsSpaceJunk3DL} -D_versus_3013580: - { type: GFX, offset: 0x3013580, symbol: D_versus_3013580} +aVsSpaceJunk2DL: + { type: GFX, offset: 0x3013580, symbol: aVsSpaceJunk2DL} -D_versus_3013780: - { type: GFX, offset: 0x3013780, symbol: D_versus_3013780} +aVsSpaceJunk1DL: + { type: GFX, offset: 0x3013780, symbol: aVsSpaceJunk1DL} D_versus_3013F50: {type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x3013F50, symbol: D_versus_3013F50, tlut: 0x3014350 } @@ -245,8 +245,8 @@ D_versus_30160A0: D_versus_30162F8: {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x30162F8, symbol: D_versus_30162F8 } -D_versus_3016B00: - { type: GFX, offset: 0x3016B00, symbol: D_versus_3016B00} +aVsKaFlBaseDL: + { type: GFX, offset: 0x3016B00, symbol: aVsKaFlBaseDL} D_versus_3016DC0: {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x3016DC0, symbol: D_versus_3016DC0 } @@ -257,14 +257,14 @@ D_versus_3016FC0: D_versus_30171C0: {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x30171C0, symbol: D_versus_30171C0 } -D_versus_30173C0: - { type: GFX, offset: 0x30173C0, symbol: D_versus_30173C0} +aVsPyramid1DL: + { type: GFX, offset: 0x30173C0, symbol: aVsPyramid1DL} -D_versus_30174E0: - { type: GFX, offset: 0x30174E0, symbol: D_versus_30174E0} +aVsPyramid2DL: + { type: GFX, offset: 0x30174E0, symbol: aVsPyramid2DL} -D_versus_3017600: - { type: GFX, offset: 0x3017600, symbol: D_versus_3017600} +aVsBuildingDL: + { type: GFX, offset: 0x3017600, symbol: aVsBuildingDL} D_versus_3017800: {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x3017800, symbol: D_versus_3017800 } @@ -299,8 +299,8 @@ D_versus_301AEF0: D_versus_301AF78: {type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x301AF78, symbol: D_versus_301AF78 } -D_versus_301B080: - { type: GFX, offset: 0x301B080, symbol: D_versus_301B080} +aVsArchDL: + { type: GFX, offset: 0x301B080, symbol: aVsArchDL} D_versus_301B438: {type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x301B438, symbol: D_versus_301B438 } @@ -320,8 +320,8 @@ D_versus_301C0A4: D_versus_301C3A8: { type: SF64:ANIM, offset: 0x301C3A8, symbol: D_versus_301C3A8} -D_versus_301C614: - { type: SF64:SKELETON, offset: 0x301C614, symbol: D_versus_301C614 } +aVsOnFootFalcoSkel: + { type: SF64:SKELETON, offset: 0x301C614, symbol: aVsOnFootFalcoSkel } D_versus_301C79C: { type: SF64:ANIM, offset: 0x301C79C, symbol: D_versus_301C79C } @@ -335,8 +335,8 @@ D_versus_301CCE4: D_versus_301CFEC: { type: SF64:ANIM, offset: 0x301CFEC, symbol: D_versus_301CFEC} -D_versus_301D258: - { type: SF64:SKELETON, offset: 0x301D258, symbol: D_versus_301D258 } +aVsOnFootFoxSkel: + { type: SF64:SKELETON, offset: 0x301D258, symbol: aVsOnFootFoxSkel } D_versus_301D3DC: { type: SF64:ANIM, offset: 0x301D3DC, symbol: D_versus_301D3DC } @@ -347,8 +347,8 @@ D_versus_301D568: D_versus_301D888: { type: SF64:ANIM, offset: 0x301D888, symbol: D_versus_301D888} -D_versus_301DB94: - { type: SF64:SKELETON, offset: 0x301DB94, symbol: D_versus_301DB94 } +aVsOnFootPeppySkel: + { type: SF64:SKELETON, offset: 0x301DB94, symbol: aVsOnFootPeppySkel } D_versus_301DD6C: { type: SF64:ANIM, offset: 0x301DD6C, symbol: D_versus_301DD6C } @@ -359,8 +359,8 @@ D_versus_301DEA4: D_versus_301E19C: { type: SF64:ANIM, offset: 0x301E19C, symbol: D_versus_301E19C} -D_versus_301E3E8: - { type: SF64:SKELETON, offset: 0x301E3E8, symbol: D_versus_301E3E8 } +aVsOnFootSlippySkel: + { type: SF64:SKELETON, offset: 0x301E3E8, symbol: aVsOnFootSlippySkel } D_versus_301E560: { type: SF64:ANIM, offset: 0x301E560, symbol: D_versus_301E560} @@ -395,8 +395,8 @@ D_versus_301EEB0: D_versus_301EF38: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x301EF38, symbol: D_versus_301EF38 } -D_versus_301F140: - { type: GFX, offset: 0x301F140, symbol: D_versus_301F140} +aVsLandmasterCanonDL: + { type: GFX, offset: 0x301F140, symbol: aVsLandmasterCanonDL} D_versus_301F2E0: { type: GFX, offset: 0x301F2E0, symbol: D_versus_301F2E0} @@ -704,26 +704,26 @@ D_versus_302E170: D_versus_302E378: { type: SF64:OBJECT_INIT, offset: 0x302E378, symbol: D_versus_302E378} -D_versus_302ED4C: - { type: SF64:HITBOX, offset: 0x302ED4C, symbol: D_versus_302ED4C} +aVsSpaceJunk1Hitbox: + { type: SF64:HITBOX, offset: 0x302ED4C, symbol: aVsSpaceJunk1Hitbox} -D_versus_302ED98: - { type: SF64:HITBOX, offset: 0x302ED98, symbol: D_versus_302ED98} +aVsSpaceJunk2Hitbox: + { type: SF64:HITBOX, offset: 0x302ED98, symbol: aVsSpaceJunk2Hitbox} -D_versus_302EDB4: - { type: SF64:HITBOX, offset: 0x302EDB4, symbol: D_versus_302EDB4} +aVsSpaceJunk3Hitbox: + { type: SF64:HITBOX, offset: 0x302EDB4, symbol: aVsSpaceJunk3Hitbox} -D_versus_302EE00: - { type: SF64:HITBOX, offset: 0x302EE00, symbol: D_versus_302EE00} +aVsKaFlBaseHitbox: + { type: SF64:HITBOX, offset: 0x302EE00, symbol: aVsKaFlBaseHitbox} -D_versus_302EE64: - { type: SF64:HITBOX, offset: 0x302EE64, symbol: D_versus_302EE64} +aVsBuilding1Hibox: + { type: SF64:HITBOX, offset: 0x302EE64, symbol: aVsBuilding1Hibox} -D_versus_302EE80: - { type: SF64:HITBOX, offset: 0x302EE80, symbol: D_versus_302EE80} +aVsBuilding2Hibox: + { type: SF64:HITBOX, offset: 0x302EE80, symbol: aVsBuilding2Hibox} -D_versus_302EE9C: - { type: SF64:HITBOX, offset: 0x302EE9C, symbol: D_versus_302EE9C} +aVsArchHitbox: + { type: SF64:HITBOX, offset: 0x302EE9C, symbol: aVsArchHitbox} D_versus_302EEE8: { type: SF64:TRIANGLE, count: 4, offset: 0x302EEE8, symbol: D_versus_302EEE8, mesh_symbol: D_versus_OFFSET} diff --git a/assets/yaml/us/rev1/ast_zoness.yaml b/assets/yaml/us/rev1/ast_zoness.yaml index 406db142..69f313f7 100644 --- a/assets/yaml/us/rev1/ast_zoness.yaml +++ b/assets/yaml/us/rev1/ast_zoness.yaml @@ -141,14 +141,14 @@ D_ZO_600E5EC: D_ZO_600E7D8: { type: SF64:SKELETON, offset: 0x600E7D8, symbol: D_ZO_600E7D8} -D_ZO_600E820: - { type: GFX, offset: 0x600E820, symbol: D_ZO_600E820} +aZoOilRig3DL: + { type: GFX, offset: 0x600E820, symbol: aZoOilRig3DL} -D_ZO_600EC90: - { type: GFX, offset: 0x600EC90, symbol: D_ZO_600EC90} +aZoOilRig2DL: + { type: GFX, offset: 0x600EC90, symbol: aZoOilRig2DL} -D_ZO_600F560: - { type: GFX, offset: 0x600F560, symbol: D_ZO_600F560} +aZoOilRig1DL: + { type: GFX, offset: 0x600F560, symbol: aZoOilRig1DL} D_ZO_600FE58: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x600FE58, symbol: D_ZO_600FE58} @@ -225,8 +225,8 @@ D_ZO_6017810: D_ZO_60178B0: { type: GFX, offset: 0x60178B0, symbol: D_ZO_60178B0} -D_ZO_6017950: - { type: GFX, offset: 0x6017950, symbol: D_ZO_6017950} +aZoBallDL: + { type: GFX, offset: 0x6017950, symbol: aZoBallDL} D_ZO_60179D8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60179D8, symbol: D_ZO_60179D8} @@ -366,8 +366,8 @@ D_ZO_601FBC4: D_ZO_601FC90: { type: SF64:SKELETON, offset: 0x601FC90, symbol: D_ZO_601FC90} -D_ZO_601FCB0: - { type: GFX, offset: 0x601FCB0, symbol: D_ZO_601FCB0} +aZoIslandDL: + { type: GFX, offset: 0x601FCB0, symbol: aZoIslandDL} D_ZO_60201B0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60201B0, symbol: D_ZO_60201B0} @@ -471,8 +471,8 @@ D_ZO_6024220: D_ZO_60242B8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60242B8, symbol: D_ZO_60242B8} -aZoRock1DL: - { type: GFX, offset: 0x6024AC0, symbol: aZoRock1DL} +aZoRockDL: + { type: GFX, offset: 0x6024AC0, symbol: aZoRockDL} D_ZO_6024D60: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6024D60, symbol: D_ZO_6024D60} @@ -502,59 +502,59 @@ D_ZO_602AC50: D_ZO_602AE94: { type: ARRAY, count: 242, array_type: Vec3f, offset: 0x602AE94, symbol: D_ZO_602AE94} -aZoRock1Hitbox: - { type: SF64:HITBOX, offset: 0x602B9EC, symbol: aZoRock1Hitbox} +aZoRockHitbox: + { type: SF64:HITBOX, offset: 0x602B9EC, symbol: aZoRockHitbox} -D_ZO_602BA20: - { type: SF64:HITBOX, offset: 0x602BA20, symbol: D_ZO_602BA20} +aZoOilRig1Hitbox: + { type: SF64:HITBOX, offset: 0x602BA20, symbol: aZoOilRig1Hitbox} -D_ZO_602BAE4: - { type: SF64:HITBOX, offset: 0x602BAE4, symbol: D_ZO_602BAE4} +aZoOilRig2Hitbox: + { type: SF64:HITBOX, offset: 0x602BAE4, symbol: aZoOilRig2Hitbox} -D_ZO_602BBD8: - { type: SF64:HITBOX, offset: 0x602BBD8, symbol: D_ZO_602BBD8} +aZoOilRig3Hitbox: + { type: SF64:HITBOX, offset: 0x602BBD8, symbol: aZoOilRig3Hitbox} -D_ZO_602BC54: - { type: SF64:HITBOX, offset: 0x602BC54, symbol: D_ZO_602BC54} +aZoIslandHitbox: + { type: SF64:HITBOX, offset: 0x602BC54, symbol: aZoIslandHitbox} -D_ZO_602BC58: - { type: SF64:HITBOX, offset: 0x602BC58, symbol: D_ZO_602BC58} +aZoDodoraHitbox: + { type: SF64:HITBOX, offset: 0x602BC58, symbol: aZoDodoraHitbox} -D_ZO_602BE3C: - { type: SF64:HITBOX, offset: 0x602BE3C, symbol: D_ZO_602BE3C} +aZoTroikaHitbox: + { type: SF64:HITBOX, offset: 0x602BE3C, symbol: aZoTroikaHitbox} -D_ZO_602BE58: - { type: SF64:HITBOX, offset: 0x602BE58, symbol: D_ZO_602BE58} +aZoObnemaHitbox: + { type: SF64:HITBOX, offset: 0x602BE58, symbol: aZoObnemaHitbox} -D_ZO_602BFC4: - { type: SF64:HITBOX, offset: 0x602BFC4, symbol: D_ZO_602BFC4} +aZoBarrierHitbox: + { type: SF64:HITBOX, offset: 0x602BFC4, symbol: aZoBarrierHitbox} D_ZO_602C028: { type: SF64:HITBOX, offset: 0x602C028, symbol: D_ZO_602C028} -D_ZO_602C044: - { type: SF64:HITBOX, offset: 0x602C044, symbol: D_ZO_602C044} +aZoSarumarineHitbox: + { type: SF64:HITBOX, offset: 0x602C044, symbol: aZoSarumarineHitbox} D_ZO_602C1A0: { type: SF64:HITBOX, offset: 0x602C1A0, symbol: D_ZO_602C1A0} -D_ZO_602C1D4: - { type: SF64:HITBOX, offset: 0x602C1D4, symbol: D_ZO_602C1D4} +aZoCargoShipHitbox: + { type: SF64:HITBOX, offset: 0x602C1D4, symbol: aZoCargoShipHitbox} -D_ZO_602C218: - { type: SF64:HITBOX, offset: 0x602C218, symbol: D_ZO_602C218} +aZoContainerHitbox: + { type: SF64:HITBOX, offset: 0x602C218, symbol: aZoContainerHitbox} -D_ZO_602C234: - { type: SF64:HITBOX, offset: 0x602C234, symbol: D_ZO_602C234} +aZoRadarBuoyHitbox: + { type: SF64:HITBOX, offset: 0x602C234, symbol: aZoRadarBuoyHitbox} -D_ZO_602C250: - { type: SF64:HITBOX, offset: 0x602C250, symbol: D_ZO_602C250} +aZoSupplyCraneHitbox: + { type: SF64:HITBOX, offset: 0x602C250, symbol: aZoSupplyCraneHitbox} -D_ZO_602C294: - { type: SF64:HITBOX, offset: 0x602C294, symbol: D_ZO_602C294} +aZoBirdHitbox: + { type: SF64:HITBOX, offset: 0x602C294, symbol: aZoBirdHitbox} -D_ZO_602C2B0: - { type: SF64:HITBOX, offset: 0x602C2B0, symbol: D_ZO_602C2B0} +aZoSearchLightHitbox: + { type: SF64:HITBOX, offset: 0x602C2B0, symbol: aZoSearchLightHitbox} D_ZO_602C2CC: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x602C2CC, symbol: D_ZO_602C2CC} diff --git a/include/context.h b/include/context.h index 916b18e6..a1381601 100644 --- a/include/context.h +++ b/include/context.h @@ -158,7 +158,7 @@ extern s32 D_ctx_80178494; extern f32 gShotHitPosZ; extern f32 gShotHitPosX; extern f32 gShotHitPosY; -extern s32 gZOSnakeWaypointCount; +extern s32 gZoDodoraWaypointCount; extern UNK_TYPE F_801784A8; extern GroundType gGroundType; extern UNK_TYPE F_801784B0; @@ -238,13 +238,13 @@ extern PlayerShot gPlayerShots[16]; extern TexturedLine gTexturedLines[100]; extern RadarMark gRadarMarks[65]; extern BonusText gBonusText[10]; -extern s32 gActor194Status[2]; -extern f32 gActor194xPos[2][100]; -extern f32 gActor194yPos[2][100]; -extern f32 gActor194zPos[2][100]; -extern f32 gActor194xRot[2][100]; -extern f32 gActor194yRot[2][100]; -extern f32 gActor194zRot[2][100]; +extern s32 gMeMoraStatus[2]; +extern f32 gMeMoraXpos[2][100]; +extern f32 gMeMoraYpos[2][100]; +extern f32 gMeMoraZpos[2][100]; +extern f32 gMeMoraXrot[2][100]; +extern f32 gMeMoraYrot[2][100]; +extern f32 gMeMoraZrot[2][100]; extern u16 gEnemyShotSpeed; extern u8 gShowLevelClearStatusScreen; extern s32 gLevelStartStatusScreenTimer; @@ -291,7 +291,7 @@ extern u8 gTiStartLandmaster; extern u16 gControllerRumbleTimers[4]; extern u16 gPlayerScores[4]; extern s32 gCircleWipeFrame; -extern s32 D_ctx_80177C70; +extern s32 gFovYMode; extern s32 gTraining360MsgTimer; extern s32 gTraining360MsgIndex; extern s32 D_ctx_80177C94; @@ -329,7 +329,7 @@ extern Scenery360* gScenery360; extern UNK_TYPE F_801782B0; extern s32 gDrawSmallRocks; extern s32 D_ctx_801782BC; -extern PosRot* gZOSnakePosRots; +extern PosRot* gZoDodoraPosRots; extern f32* D_ctx_801782CC; extern f32* D_ctx_801782D4; extern f32* D_ctx_801782DC; diff --git a/include/fox_co.h b/include/fox_co.h index 7ffad414..4ff18d94 100644 --- a/include/fox_co.h +++ b/include/fox_co.h @@ -1,6 +1,9 @@ #ifndef FOX_CO_H #define FOX_CO_H +#define TEAM_HEAD_XROT (19) +#define TEAM_HEAD_YROT (20) + // Granga Boss: #define DMG_FLICKER_5 (5) // Damage indicator flickers for 5 frames @@ -9,13 +12,13 @@ typedef enum GrangaStates { /* 0 */ GRANGA_STATIONARY, - /* 1 */ GRANGA_STATE_1, - /* 2 */ GRANGA_STATE_2, - /* 3 */ GRANGA_STATE_3, - /* 4 */ GRANGA_STATE_4, - /* 5 */ GRANGA_STATE_5, - /* 6 */ GRANGA_STATE_6, - /* 7 */ GRANGA_STATE_7, + /* 1 */ GRANGA_FORWARD_MISSILE, // walk forward + missile + /* 2 */ GRANGA_BACKWARDS_LASER_PLASMA, // Walk backwards + lasers + plasma + /* 3 */ GRANGA_FORWARD_LASER_PLASMA, // Walk towards player + lasers + plasma + /* 4 */ GRANGA_FORWARD, // Walk forward + /* 5 */ GRANGA_FALL_TO_LEFT, // Falling from missing left leg + /* 6 */ GRANGA_FALL_TO_RIGHT, // Falling from missing right leg + /* 7 */ GRANGA_EXPLODE, // BOOM! } GrangaStates; typedef enum GrangaWork { @@ -35,10 +38,10 @@ typedef enum GrangaWork { /* 13 */ GRANGA_WORK_13, /* 14 */ GRANGA_WORK_14, /* 15 */ GRANGA_WORK_15, - /* 16 */ GRANGA_WORK_16, // yRot of missiles launched from both arms ? - /* 17 */ GRANGA_WORK_17, // x of something - /* 18 */ GRANGA_WORK_18, // y of something - /* 19 */ GRANGA_WORK_19, // z of something + /* 16 */ GRANGA_WORK_16, // yRot of missiles launched from both arms ? + /* 17 */ GRANGA_TARGET_X, // player.pos.x target position + /* 18 */ GRANGA_TARGET_Y, // player.pos.y target position + /* 19 */ GRANGA_TARGET_Z, // player.pos.trueZpos target position /* 20 */ GRANGA_WORK_20, /* 21 */ GRANGA_WORK_21, /* 22 */ GRANGA_WORK_22, @@ -123,7 +126,7 @@ typedef enum GrangaSwork { } GrangaSwork; typedef enum GrangaFwork { - /* 00 */ GRANGA_FWK_00, + /* 00 */ GRANGA_FWK_00, // left leg rock angle? /* 01 */ GRANGA_FWK_01, /* 02 */ GRANGA_FWK_02, /* 03 */ GRANGA_FWK_03, @@ -149,14 +152,27 @@ typedef enum GrangaAttackState { /* 3 */ GRANGA_ATTACK_PLASMA, } GrangaAttackState; - // Carrier Boss: typedef enum CoCarrierParts { - /* 0 */ CARRIER_0, - /* 1 */ CARRIER_1, - /* 2 */ CARRIER_2, - /* 3 */ CARRIER_3 + /* 0 */ CARRIER, // Boss + /* 1 */ CARRIER_LEFT, // Left launch bay + /* 2 */ CARRIER_UPPER, // Right upper launch bay + /* 3 */ CARRIER_BOTTOM // Right lower launch bay } CarrierParts; +typedef enum CoCarrierStates { + /* 0 */ CARRIER_STATE_0, + /* 1 */ CARRIER_STATE_1, + /* 2 */ CARRIER_STATE_2, // positioning + /* 3 */ CARRIER_STATE_3, // Close launch bays + /* 4 */ CARRIER_STATE_4, // Open left launch bay + /* 5 */ CARRIER_STATE_5, // open right launch bays + /* 6 */ CARRIER_STATE_6, + /* 7 */ CARRIER_STATE_7, // go around beam attack + /* 8 */ CARRIER_STATE_8, // Dying + /* 9 */ CARRIER_STATE_9, // Dying cutscene + /* 10 */ CARRIER_EXPLODE // BOOM! +} CoCarrierStates; + #endif diff --git a/include/functions.h b/include/functions.h index e0c9f879..62f1efcc 100644 --- a/include/functions.h +++ b/include/functions.h @@ -10,14 +10,14 @@ void AllRange_FortunaIntro(Player*); void AllRange_GetStarWolfHits(Actor*); void AllRange_DrawCountdown(void); -void Boss309_Update(Boss*); -void Boss309_Draw(Boss*); -void Boss310_Update(Boss*); -void Boss310_Draw(Boss*); -void Actor271_Update(Actor*); -void Actor271_Draw(Actor*); -void Actor272_Update(Actor*); -void Actor272_Draw(Actor*); +void BoBase_Update(Boss*); +void BoBase_Draw(Boss*); +void BoBaseShield_Update(Boss*); +void BoBaseShield_Draw(Boss*); +void BoShieldReactor_Update(Actor*); +void BoShieldReactor_Draw(Actor*); +void BoLaserCannon_Update(Actor*); +void BoLaserCannon_Draw(Actor*); bool AllRange_PlayMessage(u16*, RadioCharacterId); void AllRange_GreatFoxRepair(Player*); void AllRange_ClearRadio(void); @@ -86,26 +86,26 @@ void ActorCutscene_Draw(Actor*); void Cutscene_DrawGreatFox(void); // fox_display -void func_display_80053658(WingInfo*); -void Play_DrawEngineGlow(s32); -void func_display_80057814(Player*); -void Play_Draw(void); +void Display_ArwingWings(WingInfo*); +void Display_DrawEngineGlow(s32); +void Display_SetupPlayerSfxPos(Player*); +void Display_Update(void); // fox_edata -void Scenery48_Draw(Scenery*); -void Scenery49_Draw(Scenery*); +void Ve1SceneryWall1_Draw(Scenery*); +void Ve1SceneryWall2_Draw(Scenery*); void Object_ApplyWaterDistortion(void); -void Actor289_Draw(Actor*); +void AndJamesTrigger_Draw(Actor*); // fox_edisplay void Graphics_SetScaleMtx(f32); void Sprite168_Draw(Sprite*); -void Actor201_Draw(Actor*); -void Actor202_Draw(Actor*); +void MeteoBall_Draw(Actor*); +void ActorHopBot_Draw(Actor*); void MeteoTunnel_Draw(Scenery*); void Scenery_DrawTitaniaBones(Scenery*); void CoIBeam_Draw(Scenery*); -void Actor196_Draw(Actor*); +void ActorMoleMissile_Draw(ActorMoleMissile*); void Sprite167_Draw(Sprite*); void FogShadow_Draw(Sprite*); void CoBuilding9_Draw(Scenery*); @@ -114,12 +114,12 @@ void ActorDebris_Draw(Actor*); void Actor_DrawEngineAndContrails(Actor*); void Actor_DrawEngineGlow(Actor*, s32); void func_edisplay_8005B388(Actor*); -void Actor180_Draw(Actor*); -void Actor182_Draw(Actor*); -void Actor186_Draw(Actor*); -void Actor190_191_Draw(Actor*); -void Actor192_Draw(Actor*); -void Actor193_Draw(Actor*); +void MeMolarRock_Draw(Actor*); +void MeMeteor2_Draw(MeMeteor2*); +void MeLaserCannon1_Draw(MeLaserCannon1*); +void ActorMissileSeek_Draw(Actor*); +void ActorSkibot_Draw(ActorSkibot*); +void ActorRadar_Draw(CoRadar*); void ItemCheckpoint_Draw(Item*); void ItemSilverRing_Draw(Item*); void ItemSilverStar_Draw(Item*); @@ -163,13 +163,13 @@ bool Object_CheckPolyCollision(Vec3f* , Vec3f* , ObjectId , Object* ); s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode); void Scenery_UpdateTitaniaBones(Scenery*); void func_enmy_800654E4(Object*); -void Actors190_191_Update(Actor*); +void ActorMissileSeek_Update(Actor*); void func_enmy_800660F0(Actor*); void Actor_Despawn(Actor*); -void Actor192_Update(Actor*); +void ActorSkibot_Update(ActorSkibot*); void func_enmy_8006684C(Actor*); -void Actor193_Update(Actor*); -void Actor180_Update(Actor*); +void ActorRadar_Update(CoRadar*); +void MeMolarRock_Update(Actor*); void func_enmy_80066C00(Scenery*); void CoBuilding9_Update(Scenery*); void Sprite167_Update(Sprite*); @@ -213,13 +213,13 @@ void Object_Update(void); void Actor237_Update(Actor*); void Actor237_Draw(Actor*); void CoWaterfall_Update(Scenery*); -void Actor201_Update(Actor*); -void Actor202_Update(Actor*); -void Actor194_Update(Actor*); -void Actor194_Dying(Actor*); -void Actor194_Draw(Actor*); +void MeteoBall_Update(Actor*); +void ActorHopBot_Update(Actor*); +void MeMora_Update(Actor*); +void MeMora_Dying(Actor*); +void MeMora_Draw(Actor*); void CoIBeam_Update(Scenery*); -void Actor196_Update(Actor*); +void ActorMoleMissile_Update(ActorMoleMissile*); void ActorDebris_Update(Actor*); void MeteoTunnel_Update(Scenery*); void Actor_SetupPlayerShot(PlayerShotId, PlayerShot*, s32, f32, f32, f32, f32, f32, f32, f32, f32, f32); @@ -234,16 +234,16 @@ s32 Scenery111_Draw(Scenery*); void ActorEvent_Draw(Actor*); void func_enmy2_800763A4(Actor*); void ActorEvent_Dying(Actor*); -void Actor234_Update(Actor*); -void Actor234_Draw(Actor*); +void TiGreatFox_Update(Actor*); +void TiGreatFox_Draw(Actor*); // fox_effect s32 func_effect_80081B24(f32 xPos, f32 yPos, f32 zPos, f32 scale2); s32 BonusText_Display(f32 xPos, f32 yPos, f32 zPos, s32 hits); void BonusText_Update(void); void BonusText_DrawAll(void); -Effect* func_effect_8007783C(ObjectId objId); -void func_effect_8007797C(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2); +Effect* Effect_Load(ObjectId objId); +void Effect_FireSmoke_Spawn2(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2); void Effect_Effect372_Draw(Effect* ); void Effect_Effect382_Draw(Effect* ); void Effect_Effect388_Draw(Effect* ); @@ -261,77 +261,77 @@ void Effect_Effect346_Draw(Effect* ); void Effect_Effect348_Draw(Effect* ); void Effect_Effect355_Draw(Effect* ); void Effect_Effect353_Draw(Effect*); -void Macbeth_Effect377_Draw(Effect* ); +void Effect_Effect377_Draw(Effect* ); void Effect_Effect356_Draw(Effect* ); -void Macbeth_Effect376_Draw(Effect* ); -void func_effect_80078E50(f32 xPos, f32 yPos, f32 zPos, f32 scale2); +void Effect_Effect376_Draw(Effect* ); +void Effect_Effect393_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 scale2); void Effect_Effect393_Update(Effect* ); void Effect_Effect393_Draw(Effect* ); -void func_effect_800794CC(f32 xPos, f32 yPos, f32 zPos, f32 scale2); -void func_effect_8007953C(f32 xPos, f32 yPos, f32 zPos, f32 scale2); -void func_effect_800795AC(f32 xPos, f32 yPos, f32 zPos, f32 scale2); +void Effect_Effect357_Spawn50(f32 xPos, f32 yPos, f32 zPos, f32 scale2); +void Effect_Effect357_Spawn80(f32 xPos, f32 yPos, f32 zPos, f32 scale2); +void Effect_Effect357_Spawn95(f32 xPos, f32 yPos, f32 zPos, f32 scale2); void func_effect_80079618(f32 xPos, f32 yPos, f32 zPos, f32 scale2); void Effect_Effect357_Update(Effect*); void Effect_Effect357_Draw(Effect* ); void Effect_Effect383_Update(Effect* ); void Effect_Effect383_Draw(Effect* ); -void func_effect_8007A568(f32 xPos, f32 yPos, f32 zPos, f32 scale1); +void Effect_Effect383_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 scale1); void Effect_SetupTimedSfxAtPos(Effect* , Vec3f* pos, u32 sfxId); void Effect_SpawnTimedSfxAtPos(Vec3f* pos, s32 sfxId); void Effect_TimedSfx_Update(Effect*); bool func_effect_8007A774(Player*, Effect*, f32); -void func_effect_8007A900(f32 xPos, f32 yPos, f32 zPos, f32 scale1, u8, u8, u16); +void Effect_Effect359_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 scale1, u8, u8, u16); void Effect_Effect359_Update(Effect359*); void Effect_Effect359_Draw(Effect*); void Effect_Effect372_Update(Effect*); -void func_effect_8007ACE0(f32 xPos, f32 yPos, f32 zPos, f32 scale2, f32 scale1, f32 yRot); -void func_effect_8007ADF4(f32 xPos, f32 yPos, f32 zPos, f32 scale2, f32 scale1); -void func_effect_8007AFD0(f32 xPos, f32 zPos, f32 xVel, f32 zVel, f32 scale1); +void Effect_Effect372_Spawn1(f32 xPos, f32 yPos, f32 zPos, f32 scale2, f32 scale1, f32 yRot); +void Effect_Effect372_Spawn2(f32 xPos, f32 yPos, f32 zPos, f32 scale2, f32 scale1); +void Effect_Effect382_Spawn(f32 xPos, f32 zPos, f32 xVel, f32 zVel, f32 scale1); void Effect_Effect382_Update(Effect*); void Effect_Effect381_Update(Effect*); -void func_effect_8007B228(f32 xPos, f32 yPos, f32 zPos, f32 scale1); -void func_effect_8007B344(f32 xPos, f32 yPos, f32 zPos, f32 scale1, s32 ); +void Effect_Effect381_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 scale1); +void Effect_Effect384_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 scale1, s32 ); void Effect_Effect384_Update(Effect*); -void func_effect_8007B550(f32 xPos, f32 yPos, f32 zPos, f32 scale1, s32 ); +void Effect_Effect385_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 scale1, s32 ); void Effect_Effect385_Update(Effect*); void Effect_Clouds_Update(Effect*); void Effect_Effect388_Update(Effect*); void Effect_Effect389_Update(Effect*); void Effect_Effect347_Update(Effect*); -void func_effect_8007B8F8(f32 xPos, f32 yPos, f32 zPos, f32 scale2); +void Effect_Effect364_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 scale2); void Effect_Effect364_Update(Effect*); -void func_effect_8007BC7C(f32 xPos, f32 yPos, f32 zPos, f32 scale2); +void Effect_Effect362_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 scale2); void Effect_Effect362_Update(Effect*); void Effect_Effect364_Draw(Effect*); void Effect_Effect361_Update(Effect*); void Effect_Effect360_Update(Effect*); void Effect_Effect360_361_362_Draw(Effect*); -void func_effect_8007BFFC(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, s32 timer50); -void func_effect_8007C120(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, s32 timer50); +void Effect386_Spawn1(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, s32 timer50); +void Effect_Effect390_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, s32 timer50); void Effect_Effect386_Update(Effect*); -void func_effect_8007C484(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, s32 arg7); +void Effect_Effect389_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, s32 arg7); void Effect_Effect390_Update(Effect*); -void func_effect_8007C688(f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 timer50); +void Effect_Effect387_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 timer50); void Effect_Effect387_Update(Effect*); -void func_effect_8007C85C(f32 xPos, f32 yPos, f32 zPos, f32 scale2); +void Effect_Effect343_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 scale2); void Effect_Effect343_Update(Effect*); void Effect_Effect343_Draw(Effect*); -void func_effect_8007CF30(f32 xPos, f32 yPos, f32 zPos, f32 scale2); +void Effect_FireSmoke_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 scale2); void func_effect_8007D074(f32 xPos, f32 yPos, f32 zPos, f32 scale2); void func_effect_8007D0E0(f32 xPos, f32 yPos, f32 zPos, f32 scale2); void func_effect_8007D10C(f32 xPos, f32 yPos, f32 zPos, f32 scale2); -void func_effect_8007D1E0(f32 xPos, f32 yPos, f32 zPos, f32 scale2); +void Effect_Effect341_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 scale2); void func_effect_8007D24C(f32 xPos, f32 yPos, f32 zPos, f32 scale2); void func_effect_8007D2C8(f32 xPos, f32 yPos, f32 zPos, f32 scale2); void Effect_Effect339_Update(Effect*); void Effect_FireSmoke_Draw(Effect*); void Effect_Effect340_Update(Effect*); void Effect_Effect341_Update(Effect*); -void func_effect_8007D9DC(f32 xPos, f32 yPos, f32 zPos, f32 scale2, f32 scale1, s32 timer50); +void Effect_Effect367_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 scale2, f32 scale1, s32 timer50); void Effect_Effect375_Update(Effect*); -void Macbeth_Effect375_Draw(Effect*); +void Effect_Effect375_Draw(Effect*); void Effect_Effect374_Update(Effect*); -void Macbeth_Effect374_Draw(Effect*); +void Effect_Effect374_Draw(Effect*); void Effect_Effect344_Update(Effect*); void Effect_Effect345_Update(Effect*); void Effect_Effect342_Update(Effect*); @@ -364,10 +364,10 @@ void func_effect_80081A8C(f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 arg4); void func_effect_80081BEC(f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 arg4); void Effect_Effect395_Update(Effect*); void Effect_Effect395_Draw(Effect*); -void func_effect_8008377C(f32, f32, f32, f32, f32); +void Effect_Effect391_Spawn(f32, f32, f32, f32, f32); void Effect_Effect391_Update(Effect*); void Effect_Effect391_Draw(Effect*); -void func_effect_80083C70(Effect* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 arg7, s32 arg8); +void Effect_Effect399_Setup(Effect* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 arg7, s32 arg8); void func_effect_80083D2C(f32 xPos, f32 yPos, f32 zPos, f32 srcZ); void Effect_Effect399_Update(Effect*); void Effect_Effect399_Draw(Effect*); @@ -386,8 +386,8 @@ void func_hud_80087530(f32, f32, s32); void func_hud_800884E4(void); void func_hud_80088564(void); void HUD_DrawStatusScreens(void); -s32 Hud_MissileSeekModeCheck(s32); -void func_hud_8008AD94(void); +s32 ActorMissileSeek_ModeCheck(s32); +void HUD_RadioCharacterName_Draw(void); void func_hud_8008B5B0(f32 x, f32 y); s32 func_hud_8008B774(void); void func_hud_8008BD00(u8*, s32, s32, u8); @@ -404,11 +404,11 @@ void HUD_DrawCountdown(s32* , f32); void func_hud_8008E9EC(f32, f32); void func_hud_8008EA14(f32, f32); void HUD_Draw(void); -void HUD_BossFO_Draw(Boss*); +void HUD_FoBase_Draw(Boss*); void func_hud_8008FFF0(Boss*, s32); -s32 func_hud_80090200(Boss* boss); +s32 HUD_FoBase_ExplodeCs(Boss* this); bool func_hud_8009092C(Actor*); -void HUD_BossFO_Update(Boss*); +void HUD_FoBase_Update(Boss*); bool func_hud_800915FC(Actor*); bool func_hud_800924E0(Actor*); diff --git a/include/global.h b/include/global.h index faabf9c4..03204900 100644 --- a/include/global.h +++ b/include/global.h @@ -5,14 +5,14 @@ typedef enum OverlayCalls { /* 90 */ OVLCALL_FO_CS_COMPLETE = 90, - /* 91 */ OVLCALL_BOSS309_UPDATE, - /* 92 */ OVLCALL_BOSS309_DRAW, - /* 93 */ OVLCALL_BOSS310_UPDATE, - /* 94 */ OVLCALL_BOSS310_DRAW, - /* 95 */ OVLCALL_ACTOR271_UPDATE, - /* 96 */ OVLCALL_ACTOR271_DRAW, - /* 97 */ OVLCALL_ACTOR272_UPDATE, - /* 98 */ OVLCALL_ACTOR272_DRAW, + /* 91 */ OVLCALL_BO_BASE_UPDATE, + /* 92 */ OVLCALL_BO_BASE_DRAW, + /* 93 */ OVLCALL_BO_BASE_SHIELD_UPDATE, + /* 94 */ OVLCALL_BO_BASE_SHIELD_DRAW, + /* 95 */ OVLCALL_BO_SHIELD_REACTOR_UPDATE, + /* 96 */ OVLCALL_BO_SHIELD_REACTOR_DRAW, + /* 97 */ OVLCALL_BO_LASER_CANNON_UPDATE, + /* 98 */ OVLCALL_BO_LASER_CANNON_DRAW, /* 103 */ OVLCALL_TITLE_UPDATE = 103, /* 104 */ OVLCALL_TITLE_DRAW, /* 105 */ OVLCALL_MAP_UPDATE, diff --git a/include/i1.h b/include/i1.h index 42dced9d..0fa47966 100644 --- a/include/i1.h +++ b/include/i1.h @@ -8,15 +8,15 @@ #include "sf64mesg.h" extern Gfx* D_VE1_8019A008[]; -extern f32 D_VE1_8019A9B8[]; +extern f32 aVe1GolemechHitbox[]; extern void Corneria_LevelStart(Player*); extern void Corneria_LevelComplete1(Player*); extern void Venom1_LevelStart(Player*); -void Corneria_Smoke_Update(Sprite*); -void Corneria_Granga_Update(Granga*); -void Corneria_Granga_Draw(Granga*); +void Corneria_CoSmoke_Update(Sprite*); +void Corneria_CoGranga_Update(CoGranga*); +void Corneria_CoGranga_Draw(CoGranga*); void Corneria_CoGaruda1_Update(CoGaruda1*); void Corneria_CoGaruda2_Update(CoGaruda2*); void Corneria_CoGaruda3_Update(CoGaruda3*); @@ -25,46 +25,46 @@ void Corneria_CoGaruda1_Draw(CoGaruda1*); void Corneria_CoGaruda2_Draw(CoGaruda2*); void Corneria_CoGaruda3_Draw(CoGaruda3*); void Corneria_CoGarudaDestroy_Draw(CoGarudaDestroy*); -void Corneria_Carrier_Update(Carrier*); -void Corneria_Boss294_Update(Boss294*); -void Corneria_Boss295_Update(Boss295*); -void Corneria_Boss296_Update(Boss296*); -void Corneria_Carrier_Draw(Carrier*); -void Corneria_Boss294_Draw(Boss294*); -void Corneria_Boss295_Draw(Boss295*); -void Corneria_Boss296_Draw(Boss296*); -void Corneria_Doors_Update(Scenery*); -void Corneria_Doors_Draw(Scenery*); +void Corneria_CoCarrier_Update(CoCarrier*); +void Corneria_CarrierLeft_Update(CoCarrierLeft*); +void Corneria_CarrierUpper_Update(CoCarrierUpper*); +void Corneria_CarrierBottom_Update(CoCarrierBottom*); +void Corneria_CoCarrier_Draw(CoCarrier*); +void Corneria_CoCarrierLeft_Draw(CoCarrierLeft*); +void Corneria_CoCarrierUpper_Draw(CoCarrierUpper*); +void Corneria_CoCarrierBottom_Draw(CoCarrierBottom*); +void Corneria_CoDoors_Update(Scenery*); +void Corneria_CoDoors_Draw(Scenery*); void Venom1_BossTrigger1_Update(Sprite*); void Venom1_BossTrigger2_Update(Sprite*); void Venom1_BossTrigger3_Update(Sprite*); void Venom1_BossTrigger4_Update(Sprite*); -void Venom1_Actor280_Update(Actor*); -void Venom1_Doodad_Update(Actor*); -void Venom1_Actor281_Draw(Actor*); -void Venom1_Actor283_Update(Actor*); -void Venom1_Actor284_Update(Actor*); -void Venom1_Actor284_Draw(Actor*); -void Venom1_Scenery52_Update(Scenery*); -void Venom1_Boss_Update(Boss*); -void Venom1_Boss_Draw(Boss*); +void Venom1_Ve1Pillar1_Update(Actor*); +void Venom1_Pillar2_3_Update(Actor*); +void Venom1_Ve1Pillar2_Draw(Actor*); +void Venom1_Ve1Pillar4_Update(Actor*); +void Venom1_Ve1MonkeyStatue_Update(Actor*); +void Venom1_Ve1MonkeyStatue_Draw(Actor*); +void Venom1_Ve1Generator_Update(Scenery*); +void Venom1_Ve1Golemech_Update(Boss*); +void Venom1_Ve1Golemech_Draw(Boss*); void Training_ItemRing_Update(Item*); void OvlI1_CallFunction(s32, void*); -void Corneria_BuildingOnFire_Update(Scenery*); -void Corneria_BuildingOnFire_Draw(Scenery*); +void Corneria_CoBuildingOnFire_Update(Scenery*); +void Corneria_CoBuildingOnFire_Draw(Scenery*); void Corneria_Granga_Init(Boss *); -void Corneria_IBeam_Init(Actor *); -void Corneria_Carrier_Init(Carrier *); -void Corneria_Boss294_Draw(Boss*); -void Venom1_Scenery127_Update(Scenery* ); -void Venom1_8019250C(Actor *); -void Venom1_80192CB0(Actor *); -void Venom1_80192EA4(Actor *); -void Venom1_801933B4(Actor *); -void Venom1_Boss319_Init(Boss *); -void Venom1_80198310(Boss *); -void Venom1_80198594(Boss *); +void Corneria_CoIBeam_Init(Actor *); +void Corneria_CoCarrier_Init(CoCarrier *); +void Corneria_CoCarrierLeft_Draw(Boss*); +void Venom1_Ve1TempleEntrance_Update(Scenery* ); +void Venom1_Ve1Pillar1_Init(Actor *); +void Venom1_Ve1Pillar2_3_Init(Actor *); +void Venom1_Ve1Pillar4_Init(Actor *); +void Venom1_Ve1MonkeyStatue_Init(Actor *); +void Venom1_Ve1Golemech_Init(Boss *); +void Venom1_Ve1Golemech_SetShadow(Boss *); +void Venom1_Ve1Golemech_Dying(Boss *); void Training_RingPassCount_Draw(void); void Training_Setup360(void); void Training_SpawnEnemies(void); diff --git a/include/i2.h b/include/i2.h index 92d7b465..cf8e8741 100644 --- a/include/i2.h +++ b/include/i2.h @@ -15,34 +15,34 @@ void SectorX_LevelComplete(Player*); void OvlI2_CallFunction(s32, void*); void Meteo_80187B08(Actor *); -void Meteo_Boss297_Init(Boss *); -void Meteo_8018CCF8(Actor *); +void Meteo_MeCrusher_Init(Boss *); +void Meteo_Effect346_Spawn(Actor *); -void Meteo_Actor181_Update(Actor*); -void Meteo_Actor182_Update(Actor*); -void Meteo_Actor187_Update(Actor*); -void Meteo_Actor186_Update(Actor*); -void Meteo_Boss298_Update(Boss*); -void Meteo_Boss298_Draw(Boss*); +void Meteo_MeMeteor1_Update(MeMeteor1*); +void Meteo_MeMeteor2_Update(MeMeteor2*); +void Meteo_MeLaserCannon1_Update(MeLaserCannon1*); +void Meteo_MeLaserCannon2_Update(MeLaserCannon2*); +void Meteo_MeCrusherShield_Update(Boss*); +void Meteo_MeCrusherShield_Draw(Boss*); void Meteo_Effect369_Update(Effect*); void Meteo_Effect370_Update(Effect*); void Meteo_Effect371_Update(Effect*); -void Meteo_Boss297_Update(Boss*); -void Meteo_Boss297_Draw(Boss*); -void Meteo_ActorDoodad_Update(Actor*); -void Meteo_Actor183_Draw(Actor*); -void Meteo_Actor184_Draw(Actor*); -void Meteo_Actor185_Draw(Actor*); +void Meteo_MeCrusher_Update(Boss*); +void Meteo_MeCrusher_Draw(Boss*); +void Meteo_MeteorShower_Update(Actor*); +void Meteo_MeMeteorShower1_Draw(Actor*); +void Meteo_MeMeteorShower2_Draw(Actor*); +void Meteo_MeMeteorShower3_Draw(Actor*); void Meteo_Effect370_Draw(Effect*); void Meteo_Effect369_Draw(Effect*); void Meteo_Effect371_Draw(Effect*); -void SectorX_Slippy_Update(Actor*); -void SectorX_Slippy_Draw(Actor*); -void SectorX_Boss304_Update(Boss*); -void SectorX_Boss305_Update(Boss*); -void SectorX_Boss304_Draw(Boss*); -void SectorX_Boss305_Draw(Boss*); -void SectorX_Boss_Update(Boss*); -void SectorX_Boss_Draw(Boss*); +void SectorX_SxSlippy_Update(Actor*); +void SectorX_SxSlippy_Draw(Actor*); +void SectorX_SxSpyborgLeftArm_Update(Boss*); +void SectorX_SxSpyborgRightArm_Update(Boss*); +void SectorX_SxSpyborgLeftArm_Draw(Boss*); +void SectorX_SxSpyborgRightArm_Draw(Boss*); +void SectorX_SxSpyborg_Update(Boss*); +void SectorX_SxSpyborg_Draw(Boss*); #endif diff --git a/include/i3.h b/include/i3.h index 5d70bdc9..73036185 100644 --- a/include/i3.h +++ b/include/i3.h @@ -9,7 +9,7 @@ extern f32 D_AQ_801C4188; -void Aquas_801BE034(Actor*); +void Aquas_CsAqFishGroup_Update(Actor*); void Area6_8018DA58(Actor*); void Zoness_8019E5F0(Actor*); @@ -17,132 +17,132 @@ void Aquas_BlueMarineDown(Player*); void Aquas_801BE0F0(Actor*); void OvlI3_CallFunction(s32, void*); -void Area6_BossA6_Init(Boss *); -void Area6_Boss_Update(Boss*); -void Area6_Boss_Draw(Boss*); +void Area6_A6Gorgon_Init(Boss *); +void Area6_A6Gorgon_Update(Boss*); +void Area6_A6Gorgon_Draw(Boss*); void Area6_LevelStart(Player *player); void Area6_LevelComplete(Player*); -void Zoness_SpawnDebris(Vec3f*, Vec3f*, f32, f32, f32, s32, f32, s32, s32); -void Zoness_Actor235_Draw(Actor235* this); -void Zoness_Actor235_Update(Actor235* this); -void Zoness_Actor236_Update(Actor* this); -void Zoness_Actor236_Draw(Actor* this); -void Zoness_Actor238_Update(Actor* this); -void Zoness_Actor238_Draw(Actor* this); -void Zoness_801915A4(Actor* this); -void Zoness_Actor240_Update(Actor* this); -void Zoness_Actor240_Draw(Actor* this); -void Zoness_80191BB8(Actor* actor); -void Zoness_Actor241_Update(Actor* this); -void Zoness_Actor241_Draw(Actor* this); -void Zoness_Actor241_Draw(Actor* this); -void Zoness_Actor242_Draw(Actor* this); -void Zoness_Actor242_Update(Actor* this); -void Zoness_Actor243_Update(Actor* this); -void Zoness_Actor243_Draw(Actor* this); -void Zoness_Actor244_Update(Actor* this); -void Zoness_Actor244_Draw(Actor* actor); -void Zoness_BossZo_Init(Boss* this); -void Zoness_Boss_Draw(Boss* this); -void Zoness_Boss_Update(Boss* this); -void Zoness_Actor245_Update(Actor245* this); -void Zoness_Actor245_Draw(Actor* actor); -void Zoness_Actor246_Update(Actor* this); -void Zoness_Actor246_Draw(Actor246* actor); -void Zoness_Actor248_Update(Actor* this); -void Zoness_Actor248_Draw(Actor* this); -void Zoness_Actor249_Update(Actor* this); -void Zoness_Actor249_Draw(Actor* this); -void Zoness_8019B1F0(Actor* actor); -void Zoness_Actor250_Update(Actor* this); -void Zoness_Actor250_Draw(Actor* actor); -void Zoness_8019B810(Actor* this); -void Zoness_Actor251_Update(Actor* this); -void Zoness_Actor251_Draw(Actor* this); -void Zoness_Actor252_Update(Actor* this); -void Zoness_Actor252_Draw(Actor* actor); -void Zoness_8019C200(Actor* this); -void Zoness_Actor253_Update(Actor* this); -void Zoness_Actor253_Draw(Actor* this); -void Zoness_Actor254_Update(Actor* this); -void Zoness_Actor254_Draw(Actor* this); -void Zoness_Actor247_Init(Actor* this); -void Zoness_Actor247_Update(Actor* this); -void Zoness_Actor247_Draw(Actor* this); +void Zoness_ActorDebris_Spawn(Vec3f*, Vec3f*, f32, f32, f32, s32, f32, s32, s32); +void Zoness_ZoBird_Draw(ZoBird* this); +void Zoness_ZoBird_Update(ZoBird* this); +void Zoness_ZoDodora_Update(Actor* this); +void Zoness_ZoDodora_Draw(Actor* this); +void Zoness_ZoFish_Update(Actor* this); +void Zoness_ZoFish_Draw(Actor* this); +void Zoness_ZoEnergyBall_Init(Actor* this); +void Zoness_ZGull_Update(Actor* this); +void Zoness_ZGull_Draw(Actor* this); +void Zoness_ZoEnergyBall_Init2(Actor* actor); +void Zoness_ZoEnergyBall_Update(Actor* this); +void Zoness_ZoEnergyBall_Draw(Actor* this); +void Zoness_ZoEnergyBall_Draw(Actor* this); +void Zoness_ZoTroika_Draw(Actor* this); +void Zoness_ZoTroika_Update(Actor* this); +void Zoness_ZoShrimp_Update(Actor* this); +void Zoness_ZoShrimp_Draw(Actor* this); +void Zoness_ZoObnema_Update(Actor* this); +void Zoness_ZoObnema_Draw(Actor* actor); +void Zoness_ZoSarumarine_Init(Boss* this); +void Zoness_ZoSarumarine_Draw(Boss* this); +void Zoness_ZoSarumarine_Update(Boss* this); +void Zoness_ZoBall_Update(ZoBall* this); +void Zoness_ZoBall_Draw(Actor* actor); +void Zoness_ZoMine_Update(Actor* this); +void Zoness_ZoMine_Draw(ZoMine* actor); +void Zoness_ZoCraneMagnet_Update(Actor* this); +void Zoness_ZoCraneMagnet_Draw(Actor* this); +void Zoness_ZoSpikeBall_Update(Actor* this); +void Zoness_ZoSpikeBall_Draw(Actor* this); +void Zoness_ZoCargoShip_Init(Actor* actor); +void Zoness_ZoCargoShip_Update(Actor* this); +void Zoness_ZoCargoShip_Draw(Actor* actor); +void Zoness_ZoContainer_Init(Actor* this); +void Zoness_ZoContainer_Update(Actor* this); +void Zoness_ZoContainer_Draw(Actor* this); +void Zoness_ZoRadarBuoy_Update(Actor* this); +void Zoness_ZoRadarBuoy_Draw(Actor* actor); +void Zoness_ZoSupplyCrane_Init(Actor* this); +void Zoness_ZoSupplyCrane_Update(Actor* this); +void Zoness_ZoSupplyCrane_Draw(Actor* this); +void Zoness_ZoSearchLight_Update(Actor* this); +void Zoness_ZoSearchLight_Draw(Actor* this); +void Zoness_ZoBarrier_Init(Actor* this); +void Zoness_ZoBarrier_Update(Actor* this); +void Zoness_ZoBarrier_Draw(Actor* this); void Zoness_LevelStart(Player* player); void Zoness_LevelComplete(Player* player); void Solar_8019E8B8(f32, f32, f32, f32); void Solar_8019E9F4(f32, f32, f32, f32, f32, f32, f32, s32); -void Solar_Actor278_Update(Actor278*); -void Solar_Doodad_Update(Actor*); -void Solar_Doodad_Draw(Actor*); -void Solar_Actor279_Update(Actor279*); +void Solar_SoWave_Update(SoWave*); +void Solar_SoRock_Update(Actor*); +void Solar_SoRock_Draw(Actor*); +void Solar_SoProminence_Update(SoProminence*); void Solar_Effect392_Update(Effect392*); void Solar_Effect392_Draw(Effect392*); void Solar_LevelStart(Player* player); -void Solar_Boss_Update(BossSO*); -void Solar_Boss_Draw(BossSO*); +void Solar_SoVulkain_Update(SoVulkain*); +void Solar_SoVulkain_Draw(SoVulkain*); void Solar_801A8BE8(ActorCutscene*); void Solar_LevelComplete(Player* player); -void Aquas_801A9824(void); +void Aquas_InitLevel(void); void Aquas_801AA20C(void); void Aquas_UpdateCamera(Player*); void Aquas_BlueMarineMove(Player*); void Aquas_801ABA40(PlayerShot*); void Aquas_BlueMarineShoot(Player*); -void Aquas_801AC8A8(f32, f32, f32, f32, s32); +void Aquas_Effect366_Spawn(f32, f32, f32, f32, s32); void Aquas_Effect366_Update(Effect*); -void Aquas_801ACBB4(Player*); +void Aquas_BlueMarine_Draw(Player*); void Aquas_BlueMarineBoost(Player*); void Aquas_BlueMarineBrake(Player*); -void Aquas_801AD688(Actor *); +void Aquas_Actor255_Init(Actor *); void Aquas_Actor255_Update(Actor*); void Aquas_Actor255_Draw(Actor*); -void Aquas_801AE3AC(Actor *); +void Aquas_Actor256_Init(Actor *); void Aquas_Actor256_Update(Actor*); void Aquas_Actor256_Draw(Actor*); -void Aquas_801AF9FC(Actor *); +void Aquas_Actor257_Init(Actor *); void Aquas_Actor257_Update(Actor*); void Aquas_Actor257_Draw(Actor*); -void Aquas_Actor258_Update(Actor*); -void Aquas_Actor258_Draw(Actor*); -void Aquas_BossAq_Init(Boss*); -void Aquas_Boss_Update(Boss*); -void Aquas_Boss_Draw(Boss*); -void Aquas_Actor261_Draw(Actor*); -void Aquas_Actor261_Update(Actor*); -void Aquas_Actor259_Draw(Actor*); -void Aquas_801B6344(Actor *); -void Aquas_Actor259_Update(Actor*); -void Aquas_801B6E54(Actor *); -void Aquas_Actor262_Update(Actor*); -void Aquas_Actor262_Draw(Actor*); -void Aquas_801B7AF0(Actor *); -void Aquas_Actor260_Update(Actor*); -void Aquas_Actor260_Draw(Actor*); -void Aquas_Actor263_Update(Actor*); -void Aquas_Actor263_Draw(Actor*); -void Aquas_Actor264_Update(Actor*); -void Aquas_Actor264_Draw(Actor*); -void Aquas_801BA57C(Actor *); -void Aquas_Actor265_Update(Actor*); -void Aquas_Actor265_Draw(Actor*); -void Aquas_Actor266_Update(Actor*); -void Aquas_Actor266_Draw(Actor*); -void Aquas_801BB26C(Actor *); -void Aquas_Actor267_Update(Actor*); -void Aquas_Actor267_Draw(Actor*); -void Aquas_Actor269_Update(Actor*); -void Aquas_Actor269_Draw(Actor*); -void Aquas_Actor268_Update(Actor*); -void Aquas_Actor268_Draw(Actor*); +void Aquas_AqPearl_Update(Actor*); +void Aquas_AqPearl_Draw(Actor*); +void Aquas_AqBacoon_Init(Boss*); +void Aquas_AqBacoon_Update(Boss*); +void Aquas_AqBacoon_Draw(Boss*); +void Aquas_AqSculpin_Draw(Actor*); +void Aquas_AqSculpin_Update(Actor*); +void Aquas_AqAnglerFish_Draw(Actor*); +void Aquas_AqAnglerFish_Init(Actor *); +void Aquas_AqAnglerFish_Update(Actor*); +void Aquas_AqSpindlyFish_Init(Actor *); +void Aquas_AqSpindlyFish_Update(Actor*); +void Aquas_AqSpindlyFish_Draw(Actor*); +void Aquas_AqGaroa_Init(Actor *); +void Aquas_AqGaroa_Update(Actor*); +void Aquas_AqGaroa_Draw(Actor*); +void Aquas_AqSquid_Update(Actor*); +void Aquas_AqSquid_Draw(Actor*); +void Aquas_AqSeaweed_Update(Actor*); +void Aquas_AqSeaweed_Draw(Actor*); +void Venom1_AqBoulder_Init(Actor *); +void Aquas_AqBoulder_Update(Actor*); +void Aquas_AqBoulder_Draw(Actor*); +void Aquas_AqCoral_Update(Actor*); +void Aquas_AqCoral_Draw(Actor*); +void Venom1_AqJellyfish_Init(Actor *); +void Aquas_AqJellyfish_Update(Actor*); +void Aquas_AqJellyfish_Draw(Actor*); +void Aquas_AqStoneColumn_Update(Actor*); +void Aquas_AqStoneColumn_Draw(Actor*); +void Aquas_AqFishGroup_Update(Actor*); +void Aquas_AqFishGroup_Draw(Actor*); void Aquas_801BDF14(void); -void Aquas_Scenery126_Draw(Scenery*); -void Aquas_Actor270_Update(Actor*); -void Aquas_Actor270_Draw(Actor*); +void Aquas_AqBump2_Draw(Scenery*); +void Aquas_AqOyster_Update(Actor*); +void Aquas_AqOyster_Draw(Actor*); void Aquas_Boss301_Update(Boss*); void Aquas_Boss301_Draw(Boss*); void Aquas_Actor188_Update(Actor*); diff --git a/include/i4.h b/include/i4.h index 4769796e..6008ace6 100644 --- a/include/i4.h +++ b/include/i4.h @@ -23,9 +23,9 @@ void OvlI4_CallFunction(u32, void*); void Fortuna_UpdateEvents(Actor*); void Fortuna_LoadLevelObjects(void); void Bolse_UpdateEventHandler(Actor*); -void Bolse_80191ED8(void); +void Bolse_LoadLevelObjects(void); void Bolse_DrawDynamicGround(void); -void Katina_BossSetup(Boss *); +void Katina_KaSaucerer_Init(Boss *); void Katina_UpdateEvents(Actor*); void Katina_Init(void); void SectorZ_MissileExplode(ActorAllRange* this, bool shotDown); @@ -33,21 +33,21 @@ void SectorZ_Missile_Update(Actor*); void SectorZ_UpdateEvents(Actor*); void SectorZ_LoadLevelObjects(void); -void Fortuna_Radar_Update(Actor*); -void Fortuna_Radar_Draw(Actor*); +void Fortuna_FoRadar_Update(Actor*); +void Fortuna_FoRadar_Draw(Actor*); void Bolse_Effect397_Update(Effect*); void Bolse_Effect397_Draw(Effect*); -void Bolse_Boss311_Update(Boss*); -void Bolse_Boss311_Draw(Boss*); +void Bolse_BoBaseCore_Update(Boss*); +void Bolse_BoBaseCore_Draw(Boss*); void Katina_LaserEnergyParticlesUpdate(Effect*); void Katina_LaserEnergyParticlesDraw(Effect*); -void Katina_BaseUpdate(Boss*); -void Katina_Base_Draw(Boss*); -void Katina_BossUpdate(Boss*); -void Katina_BossDraw(Boss*); +void Katina_KaFrontlineBase_Update(Boss*); +void Katina_KaFrontlineBase_Draw(Boss*); +void Katina_KaSaucerer_Update(Boss*); +void Katina_KaSaucerer_Draw(Boss*); void SectorZ_SpaceJunkUpdate(Actor*); void SectorZ_SpaceJunkDraw(Actor*); -void SectorZ_GreatFoxUpdate(Boss*); -void SectorZ_GreatFoxDraw(Boss*); +void SectorZ_SzGreatFox_Update(Boss*); +void SectorZ_SzGreatFox_Draw(Boss*); #endif diff --git a/include/i5.h b/include/i5.h index 75a3374b..71c8b1c1 100644 --- a/include/i5.h +++ b/include/i5.h @@ -11,7 +11,7 @@ extern Gfx* D_TI_801B7584[]; extern Gfx* D_TI_801B7608[]; extern Gfx* D_TI_801B769C[]; -extern f32 D_TI_801B83A8[]; +extern f32 aTiGorasHitbox[]; extern u8 D_MA_801BA1E8; extern f32 D_MA_801BE250[40]; extern s16 D_MA_801BE2F0[9]; @@ -26,27 +26,27 @@ void Macbeth_LevelComplete1(Player*); void OvlI5_CallFunction(u32 mode, void* ptr); void Titania_LevelStart(Player *); void Titania_80188F30(void); -void Titania_80189B80(Actor *); -void Titania_8018ADC4(Actor *); -void Titania_8018B720(Actor *); -void Titania_Actor231_Init(Actor *); -void Titania_8018BFB0(Actor *); +void Titania_TiFekuda_Init(Actor *); +void Titania_TiRasco_Init(Actor *); +void Titania_TiRasco_Dying(Actor *); +void Titania_TiBomb_Init(Actor *); +void Titania_TiDesertCrawler_Init(Actor *); void Titania_8018E3B0(Actor *); -void Titania_8018E3CC(Actor *); -void Titania_8018E5E8(Actor *); -void Titania_8018EFF0(Sprite *); -void Titania_8018F0D8(Scenery *); -void Titania_Boss306_Init(Boss *); +void Titania_TiDelphor_Init(Actor *); +void Titania_TiDelphorHead_Init(Actor *); +void Titania_TiCactus_Init(Sprite *); +void Titania_TiPillar_Init(Scenery *); +void Titania_TiGoras_Init(Boss *); void Titania_801990DC(Boss *); -void Macbeth_80199920(void); -void Macbeth_80199F8C(Actor *); -void Macbeth_801A3E70(Actor *); -void Macbeth_801A4660(Actor *); -void Macbeth_801A4AF8(Actor *); -void Macbeth_801A5E2C(Actor *); -void Macbeth_801A6134(Actor *); -void Macbeth_801A65E0(Scenery *); -void Macbeth_801A7D98(Actor *); +void Macbeth_InitLevel(void); +void Macbeth_Train_Init(Actor *); +void Macbeth_MaMaRailroadSwitch_Init(Actor *); +void Macbeth_MaBoulder_Init(Actor *); +void Macbeth_MaRailwaySignal_Init(Actor *); +void Macbeth_LockBars_Init(Actor *); +void Macbeth_MaBarrier_Init(Actor *); +void Macbeth_MaProximityLight_Init(Scenery *); +void Macbeth_Actor207_Init(Actor *); void Macbeth_801ACFBC(void); void Macbeth_801AD080(void); void Ground_801B5110(f32, f32, f32); @@ -54,80 +54,80 @@ void Ground_801B58AC(Gfx **, f32); bool Ground_801B6AEC(f32, f32, f32); s32 Ground_801B6E20(f32, f32, f32 *, f32 *, f32 *); void Macbeth_801AD144(PlayerShot*); -void Titania_80189120(f32, f32, f32, f32, f32); +void Titania_Effect368_Spawn(f32, f32, f32, f32, f32); bool Macbeth_801A3C20(f32); bool Macbeth_801A3300(Player*, f32, f32); bool Macbeth_801A3790(Player*, f32, f32); void Titania_Effect368_Update(Effect*); void Titania_Effect368_Draw(Effect*); -void Titania_Actor224_Update(Actor*); -void Titania_Actor226_Update(Actor*); -void Titania_Actor226_Draw(Actor*); -void Titania_Actor233_Update(Actor*); -void Titania_Actor233_Draw(Actor*); -void Titania_Actor230_Update(Actor*); -void Titania_Actor230_Draw(Actor*); -void Titania_Actor225_Update(Actor*); -void Titania_Actor232_Update(Actor*); -void Titania_Actor232_Draw(Actor*); -void Titania_Actor231_Update(Actor*); -void Titania_Actor231_Draw(Actor*); -void Titania_Actor229_Update(Actor*); -void Titania_Actor229_Draw(Actor*); -void Titania_Actor227_Update(Actor*); -void Titania_Actor227_Draw(Actor*); -void Titania_Actor228_Update(Actor*); -void Titania_Actor228_Draw(Actor*); +void Titania_TiTerrain_Update(Actor*); +void Titania_TiDesertRover_Update(Actor*); +void Titania_TiDesertRover_Draw(Actor*); +void Titania_TiFekuda_Update(Actor*); +void Titania_TiFekuda_Draw(Actor*); +void Titania_TiBoulder_Update(Actor*); +void Titania_TiBoulder_Draw(Actor*); +void Titania_TiLandmine_Update(Actor*); +void Titania_TiRasco_Update(Actor*); +void Titania_TiRasco_Draw(Actor*); +void Titania_TiBomb_Update(Actor*); +void Titania_TiBomb_Draw(Actor*); +void Titania_TiDesertCrawler_Update(Actor*); +void Titania_TiDesertCrawler_Draw(Actor*); +void Titania_TiDelphor_Update(Actor*); +void Titania_TiDelphor_Draw(Actor*); +void Titania_TiDelphorHead_Update(Actor*); +void Titania_TiDelphorHead_Draw(Actor*); void Titania_Cactus_Update(Sprite*); -void Titania_Scenery57_Update(Scenery*); -void Titania_Scenery57_Draw(Scenery*); -void Titania_Boss_Update(Boss*); -void Titania_Boss_Draw(Boss*); -void Macbeth_Actor205_Update(Actor*); -void Macbeth_Actor210_Update(Actor*); -void Macbeth_Actor209_Update(Actor*); -void Macbeth_Actor211_Update(Actor*); -void Macbeth_Actor208_Update(Actor*); -void Macbeth_Actor213_Update(Actor*); -void Macbeth_Actor212_Update(Actor*); -void Macbeth_Scenery104_Update(Scenery*); -void Macbeth_ActorDoodad_Draw(Actor*); -void Macbeth_SceneryDoodad_Draw(Scenery*); -void Macbeth_Scenery61_Draw(Scenery*); -void Macbeth_SceneryDoodad2_Draw(Scenery*); -void Macbeth_Scenery83_Update(Scenery*); -void Macbeth_Scenery83_Draw(Scenery*); -void Macbeth_Actor214_Update(Actor*); -void Macbeth_Actor214_Draw(Actor*); -void Macbeth_Actor215_Update(Actor*); -void Macbeth_Actor215_Draw(Actor*); -void Macbeth_Actor223_Update(Actor*); -void Macbeth_Actor223_Draw(Actor*); +void Titania_TiPillar_Update(Scenery*); +void Titania_TiPillar_Draw(Scenery*); +void Titania_TiGoras_Update(Boss*); +void Titania_TiGoras_Draw(Boss*); +void Macbeth_MaLocomotive_Update(Actor*); +void Macbeth_MaTrainCar4_Update(Actor*); +void Macbeth_MaTrainCar3_Update(Actor*); +void Macbeth_MaTrainCar5_Update(Actor*); +void Macbeth_MaTrainCar2_Update(Actor*); +void Macbeth_MaTrainCar7_Update(Actor*); +void Macbeth_MaTrainCar6_Update(Actor*); +void Macbeth_MaSwitchTrack_Update(Scenery*); +void Macbeth_Train_Draw(Actor*); +void Macbeth_TrainTrack_Draw(Scenery*); +void Macbeth_MaTower_Draw(Scenery*); +void Macbeth_IndicatorSign_Draw(Scenery*); +void Macbeth_MaTrainStopBlock_Update(Scenery*); +void Macbeth_MaTrainStopBlock_Draw(Scenery*); +void Macbeth_MaRailroadSwitch_Update(Actor*); +void Macbeth_MaRailroadSwitch_Draw(Actor*); +void Macbeth_MaBoulder_Update(Actor*); +void Macbeth_MaBoulder_Draw(Actor*); +void Macbeth_MaRailwaySignal_Update(Actor*); +void Macbeth_MaRailwaySignal_Draw(Actor*); void Macbeth_Effect378_Update(Effect*); void Macbeth_Effect378_Draw(Effect*); void Macbeth_Effect380_Update(Effect*); void Macbeth_Effect380_Draw(Effect*); -void Macbeth_Actor216_Update(Actor*); -void Macbeth_Actor216_Draw(Actor*); -void Macbeth_Actor217_Update(Actor*); -void Macbeth_Actor217_Draw(Actor*); -void Macbeth_Actor218_Update(Actor*); -void Macbeth_Actor218_Draw(Actor*); -void Macbeth_Scenery65_Draw(Scenery*); +void Macbeth_MaHorizontalLockBar_Update(Actor*); +void Macbeth_MaHorizontalLockBar_Draw(Actor*); +void Macbeth_MaVerticalLockBar_Update(Actor*); +void Macbeth_MaVerticalLockBar_Draw(Actor*); +void Macbeth_MaBarrier_Update(Actor*); +void Macbeth_MaBarrier_Draw(Actor*); +void Macbeth_MaProximityLight_Draw(Scenery*); void Macbeth_Actor219_Update(Actor*); void Macbeth_Actor219_Draw(Actor*); void Macbeth_Actor207_Update(Actor*); void Macbeth_Actor207_Draw(Actor*); -void Macbeth_Actor206_Update(Actor*); -void Macbeth_Actor220_Update(Actor*); -void Macbeth_Actor220_Draw(Actor*); -void Macbeth_Actor221_Update(Actor*); -void Macbeth_Actor221_Draw(Actor*); +void Macbeth_MaTrainCar1_Update(Actor*); +void Macbeth_MaBombDrop_Update(Actor*); +void Macbeth_MaBombDrop_Draw(Actor*); +void Macbeth_MaSpear_Update(Actor*); +void Macbeth_MaSpear_Draw(Actor*); void Macbeth_Effect379_Update(Effect*); void Macbeth_Effect379_Draw(Effect*); -void Macbeth_Actor222_Update(Actor*); -void Macbeth_Actor222_Draw(Actor*); +void Macbeth_MaShockBox_Update(Actor*); +void Macbeth_MaShockBox_Draw(Actor*); s32 Macbeth_801A55D4(s32 , Vec3f* , Vec3f* , s32 ); #endif diff --git a/include/i6.h b/include/i6.h index f02600e9..92934e30 100644 --- a/include/i6.h +++ b/include/i6.h @@ -29,44 +29,44 @@ void Andross_801888F4(Actor *); void Andross_80189214(void); void Andross_8018BDD8(void); void Andross_8018C390(Player*); -void Andross_Boss320_Init(Boss *); +void Andross_AndAndross_Init(Boss *); void Andross_801961AC(void); void Venom2_UpdateEvents(Actor*); void Venom2_LoadLevelObjects(void); -void SectorY_Boss314_Init(Boss *); -void SectorY_Actor204_Update(Actor*); -void SectorY_Actor204_Draw(Actor*); +void SectorY_SyShogun_Init(Boss *); +void SectorY_SyRobot_Update(Actor*); +void SectorY_SyRobot_Draw(Actor*); void Turret_Update(Player*); void Turret_UpdateCamera(Player*); void Turret_Draw(Player *); void Andross_Actor199_Update(Actor*); void Andross_Actor199_Draw(Actor*); -void Andross_Actor286_Update(Actor*); -void Andross_Actor286_Draw(Actor*); -void Andross_Actor290_Update(Actor*); -void Andross_Actor288_Update(Actor*); -void Andross_Actor289_Update(Actor*); -void Andross_Actor287_Update(Actor*); -void Andross_Boss321_Update(Boss*); -void Andross_Boss321_Draw(Boss*); +void Andross_AndBrainWaste_Update(Actor*); +void Andross_AndBrainWaste_Draw(Actor*); +void Andross_AndBossTimer_Update(Actor*); +void Andross_AndRadio_Update(Actor*); +void Andross_AndJamesTrigger_Update(Actor*); +void Andross_AndExplosion_Update(Actor*); +void Andross_AndBrain_Update(Boss*); +void Andross_AndBrain_Draw(Boss*); void Andross_Effect396_Update(Effect*); void Andross_Effect396_Draw(Effect*); -void Andross_Boss320_Update(Boss*); -void Andross_Boss320_Draw(Boss*); -void Andross_Actor285_Update(Actor*); -void Andross_Actor285_Draw(Actor*); -void Andross_Scenery132_Update(Scenery*); -void Andross_Scenery132_Draw(Scenery*); -void Andross_Scenery131_Update(Scenery*); -void Andross_Scenery131_Draw(Scenery*); -void Venom2_Boss_Update(Boss*); -void Venom2_Boss_Draw(Boss*); +void Andross_AndAndross_Update(Boss*); +void Andross_AndAndross_Draw(Boss*); +void Andross_AndLaserEmitter_Update(Actor*); +void Andross_AndLaserEmitter_Draw(Actor*); +void Andross_AndDoor_Update(Scenery*); +void Andross_AndDoor_Draw(Scenery*); +void Andross_AndPassage_Update(Scenery*); +void Andross_AndPassage_Draw(Scenery*); +void Venom2_Ve2Base_Update(Boss*); +void Venom2_Ve2Base_Draw(Boss*); void SectorY_Effect354_Draw(Effect*); void SectorY_Scenery156_Draw(Scenery*); -void SectorY_Boss_Update(Boss*); -void SectorY_Boss_Draw(Boss*); -void SectorY_Scenery109_Update(Scenery*); -void SectorY_Scenery112_Update(Scenery*); +void SectorY_SyShogun_Update(Boss*); +void SectorY_SyShogun_Draw(Boss*); +void SectorY_SyShip3Destroyed_Update(Scenery*); +void SectorY_SyShip4Destroyed_Update(Scenery*); #endif diff --git a/include/mods.h b/include/mods.h index 5b0a63aa..3392f4ba 100644 --- a/include/mods.h +++ b/include/mods.h @@ -1,12 +1,13 @@ #ifndef MODS_H #define MODS_H + /** * Quick Boot: * Define this variable to a game state to boot into that - * state. Two presets (map and main menu) are provided. + * state. Two presets (map and main menu) are provided. * For the full list of game states, see sf64thread.h. -*/ + */ // #define MODS_BOOT_STATE 3 // main menu // #define MODS_BOOT_STATE 4 // map @@ -15,7 +16,7 @@ * Use the D-Pad to select a level. Press L to start in * an advanced level phase (warp zone or Andross fight). * Useful for debugging and speedrunning training. -*/ + */ #define MODS_LEVEL_SELECT 0 /** @@ -24,38 +25,52 @@ * Use L to switch between jukebox and soundtrack * Use D-PAD to move the cursor * Use C buttons to edit values -*/ + */ #define MODS_SFX_JUKEBOX 0 /** * Auto debugger: * Crash debugger appears without needing to enter code. -*/ + */ #define MODS_AUTO_DEBUGGER 0 /** * FPS Counter: * Hold Z + R and press L to toggle FPS Display -*/ + */ #define MODS_FPS_COUNTER 0 /** * RAM modifier: * Hold Z + R and press C> to cycle modes - * + * * Cheats: * Use D-Pad up and down to select a cheat * Use D-Pad left and right to set its value * Press L to set the value or twice to lock it - * + * * Object Ram Editor: * Watch up to seven addresses from the player and object arrays * Use D-Pad to move the cursor and change values * Press L to edit the highlighted value -*/ - + */ #define MODS_RAM_MOD 0 +/** + * Spawner: + * Spawn Scenery, Actors, Bosses, Sprites, Items, Effects or even Event Actors. + * + * Controls: + * D-Pad left and right to set the object Id. + * C-Right to change between spawn modes. + * Analog stick sets the spawn position. + * L-Trigger to spawn the object. + * D-Pad UP to kill all objects. + * D-Pad DOWN to freeze/unfreeze the ship speed. + * WARNING: Spawning an object that's not loaded in memory will likely result in a crash. + */ +#define MODS_SPAWNER 0 + /* ************************* */ #if MODS_LEVEL_SELECT == 1 @@ -70,4 +85,8 @@ static void Play_RenderFps(void); void RamMod_Update(void); #endif +#if MODS_SPAWNER == 1 +void Spawner(void); +#endif + #endif diff --git a/include/sf64audio_provisional.h b/include/sf64audio_provisional.h index 0b14777f..9b952524 100644 --- a/include/sf64audio_provisional.h +++ b/include/sf64audio_provisional.h @@ -1,7 +1,7 @@ /** * This file is provisional, some of the structs need to be corrected, and others might be unused * This file is only meant to be used as reference to help audio decompilation -*/ + */ #ifndef SF64_AUDIO_H #define SF64_AUDIO_H @@ -57,7 +57,7 @@ typedef void (*AudioCustomUpdateFunction)(void); // Both left and right channels #define DMEM_2CH_SIZE (2 * DMEM_1CH_SIZE) -#define AIBUF_LEN (170 * SAMPLES_PER_FRAME) // number of samples +#define AIBUF_LEN (170 * SAMPLES_PER_FRAME) // number of samples #define AIBUF_SIZE (AIBUF_LEN * SAMPLE_SIZE) // number of bytes // Filter sizes @@ -216,16 +216,16 @@ typedef struct { /* 0x04 */ u32 end; /* 0x08 */ u32 count; /* 0x10 */ u64 predictorState[4]; // only exists if count != 0. 8-byte aligned -} AdpcmLoop; // size = 0x30 or 0x10, 0x8 aligned +} AdpcmLoop; // size = 0x30 or 0x10, 0x8 aligned typedef struct { /* 0x00 */ s32 order; /* 0x04 */ s32 numPredictors; - #ifdef AVOID_UB +#ifdef AVOID_UB /* 0x08 */ u64 book[]; // size 8 * order * numPredictors. - #else +#else /* 0x08 */ u64 book[1]; // size 8 * order * numPredictors. - #endif +#endif } AdpcmBook; // size >= 8, 0x8 aligned typedef struct { @@ -290,7 +290,7 @@ typedef struct { /* 0x0C */ s32 startPos; // start pos in ring buffer /* 0x10 */ s16 lengthA; // first length in ring buffer (from startPos, at most until end) /* 0x12 */ s16 lengthB; // second length in ring buffer (from pos 0) -} ReverbRingBufferItem; // size = 0x14 +} ReverbRingBufferItem; // size = 0x14 typedef struct { /* 0x000 */ u8 resampleFlags; @@ -300,7 +300,7 @@ typedef struct { /* 0x004 */ u8 downsampleRate; /* 0x005 */ s8 unk_05; /* 0x006 */ u16 windowSize; - /* 0x008 */ u16 decayRatio; // determines how much reverb persists + /* 0x008 */ u16 decayRatio; // determines how much reverb persists /* 0x00A */ u16 unk_0A; /* 0x00C */ u16 leakRtL; /* 0x00E */ u16 leakLtR; @@ -341,7 +341,7 @@ typedef struct { /* 0x004 */ u8 seqId; /* 0x005 */ u8 defaultFont; /* 0x006 */ u8 unk_06[1]; - /* 0x007 */ s8 unk_07[1]; // indexed like an array, but that can't be + /* 0x007 */ s8 unk_07[1]; // indexed like an array, but that can't be /* 0x008 */ u16 tempo; // seqTicks per minute /* 0x00A */ u16 tempoAcc; // tempo accumulation, used in a discretized algorithm to apply tempo. /* 0x00C */ u16 tempoChange; // Used to adjust the tempo without altering the base tempo. @@ -365,8 +365,8 @@ typedef struct { /* 0x0D8 */ s32 skipTicks; /* 0x0DC */ u32 scriptCounter; /* 0x0E0 */ char - padE4[0x6C]; // unused struct members for sequence/sound font dma management, according to sm64 decomp -} SequencePlayer; // size = 0x14C + padE4[0x6C]; // unused struct members for sequence/sound font dma management, according to sm64 decomp +} SequencePlayer; // size = 0x14C typedef struct { /* 0x0 */ u8 decayIndex; // index used to obtain adsr decay rate from adsrDecayTable @@ -381,7 +381,7 @@ typedef struct { /* 0x00 */ u8 hang : 1; /* 0x00 */ u8 decay : 1; /* 0x00 */ u8 release : 1; - /* 0x00 */ + /* 0x00 */ } s; /* 0x00 */ u8 asByte; } action; @@ -475,7 +475,7 @@ typedef struct SequenceChannel { /* 0x7C */ NotePool notePool; /* 0xBC */ s8 seqScriptIO[8]; // bridge between .seq script and audio lib, "io ports" /* 0xC4 */ u16 unkC4; -} SequenceChannel; // size = 0xC8 +} SequenceChannel; // size = 0xC8 // Might also be known as a Track, according to sm64 debug strings (?). typedef struct SequenceLayer { @@ -502,19 +502,19 @@ typedef struct SequenceLayer { /* 0x28 */ f32 velocitySquare; /* 0x2C */ f32 noteVelocity; /* 0x30 */ f32 noteFreqMod; - /* 0x34 */ u16 shortNoteDefaultDelay; + /* 0x34 */ u16 shortNoteDefaultDelay; /* 0x36 */ u16 lastDelay; /* 0x38 */ s16 delay; /* 0x3A */ s16 gateDelay; /* 0x3C */ s16 delay2; - /* 0x40 */ struct Note *note; + /* 0x40 */ struct Note* note; /* 0x44 */ Instrument* instrument; - /* 0x48 */ TunedSample *tunedSample; - /* 0x4C */ SequenceChannel *channel; + /* 0x48 */ TunedSample* tunedSample; + /* 0x4C */ SequenceChannel* channel; /* 0x50 */ SeqScriptState state; /* 0x6C */ AudioListItem listItem; /* 0x7C */ char pad7C[4]; -} SequenceLayer; //size = 0x80 +} SequenceLayer; // size = 0x80 typedef struct UnkStruct_800097A8 { /* 0x00 */ s16* unk_0; @@ -525,7 +525,7 @@ typedef struct UnkStruct_800097A8 { /* 0x14 */ struct SampleDma* unk_14; /* 0x18 */ s16 unk18; /* 0x1A */ char pad1A[6]; -} UnkStruct_800097A8; /* size = 0x20 */ +} UnkStruct_800097A8; /* size = 0x20 */ typedef struct { /* 0x000 */ s16 adpcmdecState[16]; @@ -821,7 +821,14 @@ typedef struct { } AudioSlowLoadBuffer; // size = 0xC4 typedef struct { - /* 0x00 */ u32 romAddr; + /* 0x00 */ s16 numEntries; + /* 0x02 */ s16 unkMediumParam; + /* 0x04 */ uintptr_t romAddr; + /* 0x08 */ char pad[8]; +} AudioTableBase; + +typedef struct { + /* 0x00 */ uintptr_t romAddr; /* 0x04 */ u32 size; /* 0x08 */ s8 medium; /* 0x09 */ s8 cachePolicy; @@ -831,23 +838,9 @@ typedef struct { } AudioTableEntry; // size = 0x10 typedef struct { - /* 0x00 */ s16 numEntries; - /* 0x02 */ s16 unkMediumParam; - /* 0x04 */ u32 romAddr; - /* 0x08 */ char pad[0x8]; -} AudioTableBase; - -typedef struct { - /* 0x00 */ s16 numEntries; - /* 0x02 */ s16 unkMediumParam; - /* 0x04 */ u32 romAddr; - /* 0x08 */ char pad[0x8]; - #ifdef AVOID_UB + /* 0x00 */ AudioTableBase base; /* 0x10 */ AudioTableEntry entries[]; // (dynamic size) - #else - /* 0x10 */ AudioTableEntry entries[1]; // (dynamic size) - #endif -} AudioTable; // size >= 0x20 +} AudioTable; // size >= 0x20 typedef struct SampleDma { /* 0x00 */ u8* ramAddr; @@ -914,13 +907,13 @@ typedef struct { } SoundTestTrack; // size: 0x6 typedef struct { - /* 0x00 */ f32 *xPos; - /* 0x04 */ f32 *yPos; - /* 0x08 */ f32 *zPos; + /* 0x00 */ f32* xPos; + /* 0x04 */ f32* yPos; + /* 0x08 */ f32* zPos; /* 0x0C */ u8 token; - /* 0x10 */ f32 *freqMod; - /* 0x14 */ f32 *volMod; - /* 0x18 */ s8 *reverbAdd; + /* 0x10 */ f32* freqMod; + /* 0x14 */ f32* volMod; + /* 0x18 */ s8* reverbAdd; /* 0x1C */ f32 distance; /* 0x20 */ u32 priority; /* 0x24 */ u32 sfxId; @@ -943,7 +936,7 @@ typedef struct { typedef struct { /* 0x0 */ u32 priority; // lower is more prioritized /* 0x4 */ u8 entryIndex; -} ActiveSfx; // size 0x8 +} ActiveSfx; // size 0x8 typedef struct { /* 0x0 */ u8 seqId; @@ -977,19 +970,19 @@ typedef struct { /* 0x014 */ u32 tempoCmd; /* 0x018 */ u16 tempoOriginal; // stores the original tempo before modifying it (to reset back to) /* 0x01C */ Modulation tempo; - /* 0x02C */ u32 setupCmd[5]; // a queue of cmds to execute once the player is disabled - /* 0x040 */ u8 setupCmdTimer; // only execute setup commands when the timer is at 0. - /* 0x041 */ u8 setupCmdNum; // number of setup commands requested once the player is disabled + /* 0x02C */ u32 setupCmd[5]; // a queue of cmds to execute once the player is disabled + /* 0x040 */ u8 setupCmdTimer; // only execute setup commands when the timer is at 0. + /* 0x041 */ u8 setupCmdNum; // number of setup commands requested once the player is disabled /* 0x042 */ u8 setupFadeTimer; /* 0x044 */ ChannelModulation channelMod[16]; /* 0x244 */ u16 freqModChannelFlags; /* 0x246 */ u16 volChannelFlags; - /* 0x248 */ u16 seqId; // active seqId currently playing. Resets when sequence stops - /* 0x24A */ u16 prevSeqId; // last seqId played on a player. Does not reset when sequence stops + /* 0x248 */ u16 seqId; // active seqId currently playing. Resets when sequence stops + /* 0x24A */ u16 prevSeqId; // last seqId played on a player. Does not reset when sequence stops /* 0x24C */ u16 channelPortMask; - /* 0x250 */ u32 startSeqCmd; // This name comes from MM + /* 0x250 */ u32 startSeqCmd; // This name comes from MM /* 0x254 */ u8 isWaitingForFonts; // This name comes from MM -} ActiveSequence; // size 0x258 +} ActiveSequence; // size 0x258 typedef struct { /* 0x0 */ f32 volMod; @@ -1022,12 +1015,12 @@ typedef struct { #define SEQ_HEX0(seqId) ((seqId) >> 28 & 0xFF) #define SEQ_HEX1(seqId) (((seqId) & (0xF << 24)) >> 24 & 0xFF) -#define SEQ_BYTE4(seqId) ((seqId) & 0xFF) -#define SEQ_BYTE3(seqId) (((seqId) & (0xFF << 8)) >>8 & 0xFF) -#define SEQ_BYTE2(seqId) (((seqId) & (0xFF << 16)) >>13 & 0xFFFF) +#define SEQ_BYTE4(seqId) ((seqId) &0xFF) +#define SEQ_BYTE3(seqId) (((seqId) & (0xFF << 8)) >> 8 & 0xFF) +#define SEQ_BYTE2(seqId) (((seqId) & (0xFF << 16)) >> 13 & 0xFFFF) // audio_synthesis -void func_80008780(f32 *, s32, f32 *); +void func_80008780(f32*, s32, f32*); Acmd* func_80009B64(Acmd* aList, s32* cmdCount, s16* aiBufStart, s32 aiBufLen); // audio_effects @@ -1077,7 +1070,7 @@ void func_800128B4(void); void func_80012964(NotePool* pool); void func_80012AC4(NotePool* pool, s32); void func_80012C40(Note* note); -Note *func_8001301C(SequenceLayer* layer); +Note* func_8001301C(SequenceLayer* layer); void func_800132E8(void); // audio_seqplayer @@ -1091,18 +1084,15 @@ void func_800168BC(void); // audio_thread void AudioThread_ScheduleProcessCmds(void); -u32 AudioThread_GetAsyncLoadStatus(u32 *); +u32 AudioThread_GetAsyncLoadStatus(u32*); u8* AudioThread_GetFontsForSequence(s32 seqId, u32* outNumFonts); bool AudioThread_ResetComplete(void); void AudioThread_ResetAudioHeap(s32); void AudioThread_Init(void); -extern AudioTableBase gSampleBankTableInit; -// extern AudioTableEntry gSampleBankTableInitEntries[]; -extern AudioTableBase gSeqTableInit; -// extern AudioTableEntry gSeqTableInitEntries[]; -extern AudioTableBase gSoundFontTableInit; -// extern AudioTableEntry gSoundFontTableInitEntries[]; +extern AudioTable gSampleBankTableInit; +extern AudioTable gSeqTableInit; +extern AudioTable gSoundFontTableInit; extern u8 gSeqFontTableInit[]; extern AudioSpec gAudioSpecs[]; @@ -1150,7 +1140,7 @@ extern u8 gSeqLoadStatus[256]; extern volatile u8 gAudioResetStep; extern u8 gAudioSpecId; extern s32 gResetFadeoutFramesLeft; -extern u8 sAudioContextPad1000[0x1000];// 0x1000 gap +extern u8 sAudioContextPad1000[0x1000]; // 0x1000 gap extern Note* gNotes; // 0x4 extern SequencePlayer gSeqPlayers[4]; @@ -1186,10 +1176,10 @@ extern u8 gSampleDmaReuseQueue1RdPos; extern u8 gSampleDmaReuseQueue2RdPos; extern u8 gSampleDmaReuseQueue1WrPos; extern u8 gSampleDmaReuseQueue2WrPos; -extern AudioTable *gSequenceTable; +extern AudioTable* gSequenceTable; extern AudioTable* gSoundFontTable; -extern AudioTable *gSampleBankTable; -extern u8 *gSeqFontTable; +extern AudioTable* gSampleBankTable; +extern u8* gSeqFontTable; extern s16 gNumSequences; extern SoundFont* gSoundFontList; // 0x4 diff --git a/include/sf64object.h b/include/sf64object.h index 3fe7dc3b..8b465bb4 100644 --- a/include/sf64object.h +++ b/include/sf64object.h @@ -41,38 +41,38 @@ typedef struct { } CollisionHeader2; // size = 0x24 typedef enum { - /* 0 */ COL1_0, // OBJ_ACTOR_180 + /* 0 */ COL1_0, // OBJ_ACTOR_ME_MOLAR_ROCK /* 1 */ COL1_1, // OBJ_SCENERY_ME_TUNNEL /* 2 */ COL1_2, /* 3 */ COL1_3, // ACTOR_EVENT_ID - /* 4 */ COL1_4, // OBJ_BOSS_FO - /* 5 */ COL1_5, // OBJ_SCENERY_149 - /* 6 */ COL1_6, // OBJ_SCENERY_150 - /* 7 */ COL1_7, // OBJ_BOSS_309 + /* 4 */ COL1_4, // OBJ_BOSS_FO_BASE + /* 5 */ COL1_5, // OBJ_SCENERY_FO_MOUNTAIN_2 + /* 6 */ COL1_6, // OBJ_SCENERY_FO_MOUNTAIN_3 + /* 7 */ COL1_7, // OBJ_BOSS_BO_BASE /* 8 */ COL1_8, // OBJ_BOSS_SZ_GREAT_FOX - /* 9 */ COL1_9, // OBJ_BOSS_VE2 + /* 9 */ COL1_9, // OBJ_BOSS_VE2_BASE } CollisonId_1; typedef enum { /* 0 */ COL2_0, // default /* 1 */ COL2_1, // OBJ_SCENERY_CO_BUMP_4, OBJ_SCENERY_CO_BUMP_5 /* 2 */ COL2_2, // OBJ_SCENERY_CO_BUMP_2 - /* 3 */ COL2_3, // OBJ_SCENERY_CO_BUMP_3, OBJ_SCENERY_69 - /* 4 */ COL2_4, // OBJ_SCENERY_140 + /* 3 */ COL2_3, // OBJ_SCENERY_CO_BUMP_3, OBJ_SCENERY_MA_TERRAIN_BUMP + /* 4 */ COL2_4, // OBJ_SCENERY_VS_PYRAMID_1 /* 5 */ COL2_5, // PLAYERSHOT_7 ? - /* 6 */ COL2_6, // OBJ_SCENERY_141 - /* 7 */ COL2_7, // OBJ_SCENERY_47 - /* 8 */ COL2_8, // OBJ_SCENERY_70 - /* 9 */ COL2_9, // OBJ_SCENERY_72 - /* 10 */ COL2_10, // OBJ_SCENERY_71 - /* 11 */ COL2_11, // OBJ_SCENERY_73 - /* 12 */ COL2_12, // OBJ_SCENERY_67 - /* 13 */ COL2_13, // OBJ_SCENERY_74 - /* 14 */ COL2_14, // OBJ_SCENERY_117 - /* 15 */ COL2_15, // OBJ_SCENERY_124 - /* 16 */ COL2_16, // OBJ_SCENERY_126 - /* 17 */ COL2_17, // OBJ_SCENERY_143 - /* 18 */ COL2_18, // OBJ_SCENERY_120 + /* 6 */ COL2_6, // OBJ_SCENERY_VS_PYRAMID_2 + /* 7 */ COL2_7, // OBJ_SCENERY_ZO_ISLAND + /* 8 */ COL2_8, // OBJ_SCENERY_MA_FLOOR_1 + /* 9 */ COL2_9, // OBJ_SCENERY_MA_FLOOR_3 + /* 10 */ COL2_10, // OBJ_SCENERY_MA_FLOOR_2 + /* 11 */ COL2_11, // OBJ_SCENERY_MA_FLOOR_4 + /* 12 */ COL2_12, // OBJ_SCENERY_MA_WALL_3 + /* 13 */ COL2_13, // OBJ_SCENERY_MA_FLOOR_5 + /* 14 */ COL2_14, // OBJ_SCENERY_AQ_CORAL_REEF_1 + /* 15 */ COL2_15, // OBJ_SCENERY_AQ_BUMP_1 + /* 16 */ COL2_16, // OBJ_SCENERY_AQ_BUMP_2 + /* 17 */ COL2_17, // OBJ_SCENERY_VS_KA_FLBASE + /* 18 */ COL2_18, // OBJ_SCENERY_AQ_CORAL_REEF_2 } CollisionId_2; typedef struct { @@ -231,7 +231,7 @@ typedef struct Boss { /* 0x046 */ s16 unk_046; /* 0x048 */ s16 unk_048; /* 0x04A */ s16 unk_04A; - /* 0x04C */ s16 unk_04C; + /* 0x04C */ s16 animFrame; /* 0x04E */ s16 state; /* 0x050 */ s16 timer_050; /* 0x052 */ s16 timer_052; @@ -329,7 +329,7 @@ typedef enum ObjectId { /* 20 */ OBJ_SCENERY_CO_ARCH_1, /* 21 */ OBJ_SCENERY_CO_ARCH_2, /* 22 */ OBJ_SCENERY_CO_ARCH_3, - /* 23 */ OBJ_SCENERY_CO_RADAR, + /* 23 */ OBJ_SCENERY_CO_RADAR_DISH, /* 24 */ OBJ_SCENERY_CO_HIGHWAY_5, /* 25 */ OBJ_SCENERY_CO_HIGHWAY_6, /* 26 */ OBJ_SCENERY_CO_HIGHWAY_7, @@ -349,124 +349,124 @@ typedef enum ObjectId { /* 40 */ OBJ_SCENERY_CO_BUILDING_9, /* 41 */ OBJ_SCENERY_CO_BUILDING_10, /* 42 */ OBJ_SCENERY_IBEAM, - /* 43 */ OBJ_SCENERY_ZO_ROCK_1, - /* 44 */ OBJ_SCENERY_44, - /* 45 */ OBJ_SCENERY_45, - /* 46 */ OBJ_SCENERY_46, - /* 47 */ OBJ_SCENERY_47, - /* 48 */ OBJ_SCENERY_48, - /* 49 */ OBJ_SCENERY_49, - /* 50 */ OBJ_SCENERY_50, - /* 51 */ OBJ_SCENERY_51, - /* 52 */ OBJ_SCENERY_52, - /* 53 */ OBJ_SCENERY_53, + /* 43 */ OBJ_SCENERY_ZO_ROCK, + /* 44 */ OBJ_SCENERY_ZO_OIL_RIG_1, + /* 45 */ OBJ_SCENERY_ZO_OIL_RIG_2, + /* 46 */ OBJ_SCENERY_ZO_OIL_RIG_3, + /* 47 */ OBJ_SCENERY_ZO_ISLAND, + /* 48 */ OBJ_SCENERY_VE1_WALL_1, + /* 49 */ OBJ_SCENERY_VE1_WALL_2, + /* 50 */ OBJ_SCENERY_VE1_WALL_3, + /* 51 */ OBJ_SCENERY_VE1_HALLWAY_OBSTACLE, + /* 52 */ OBJ_SCENERY_VE1_GENERATOR, + /* 53 */ OBJ_SCENERY_VE1_WATCH_POST, /* 54 */ OBJ_SCENERY_CO_WATERFALL, /* 55 */ OBJ_SCENERY_CO_ROCKWALL, /* 56 */ OBJ_SCENERY_CO_DOORS, - /* 57 */ OBJ_SCENERY_57, - /* 58 */ OBJ_SCENERY_58, - /* 59 */ OBJ_SCENERY_59, - /* 60 */ OBJ_SCENERY_60, - /* 61 */ OBJ_SCENERY_61, - /* 62 */ OBJ_SCENERY_62, + /* 57 */ OBJ_SCENERY_TI_PILLAR, + /* 58 */ OBJ_SCENERY_TI_BRIDGE, + /* 59 */ OBJ_SCENERY_MA_BUILDING_1, + /* 60 */ OBJ_SCENERY_MA_BUILDING_2, + /* 61 */ OBJ_SCENERY_MA_TOWER, + /* 62 */ OBJ_SCENERY_MA_WALL_1, /* 63 */ OBJ_SCENERY_63, - /* 64 */ OBJ_SCENERY_64, - /* 65 */ OBJ_SCENERY_65, - /* 66 */ OBJ_SCENERY_66, - /* 67 */ OBJ_SCENERY_67, - /* 68 */ OBJ_SCENERY_68, - /* 69 */ OBJ_SCENERY_69, - /* 70 */ OBJ_SCENERY_70, - /* 71 */ OBJ_SCENERY_71, - /* 72 */ OBJ_SCENERY_72, - /* 73 */ OBJ_SCENERY_73, - /* 74 */ OBJ_SCENERY_74, - /* 75 */ OBJ_SCENERY_75, - /* 76 */ OBJ_SCENERY_76, - /* 77 */ OBJ_SCENERY_77, - /* 78 */ OBJ_SCENERY_78, - /* 79 */ OBJ_SCENERY_79, - /* 80 */ OBJ_SCENERY_80, - /* 81 */ OBJ_SCENERY_81, - /* 82 */ OBJ_SCENERY_82, - /* 83 */ OBJ_SCENERY_83, - /* 84 */ OBJ_SCENERY_84, - /* 85 */ OBJ_SCENERY_85, - /* 86 */ OBJ_SCENERY_86, - /* 87 */ OBJ_SCENERY_87, - /* 88 */ OBJ_SCENERY_88, - /* 89 */ OBJ_SCENERY_89, - /* 90 */ OBJ_SCENERY_90, - /* 91 */ OBJ_SCENERY_91, - /* 92 */ OBJ_SCENERY_92, - /* 93 */ OBJ_SCENERY_93, - /* 94 */ OBJ_SCENERY_94, - /* 95 */ OBJ_SCENERY_95, - /* 96 */ OBJ_SCENERY_96, - /* 97 */ OBJ_SCENERY_97, - /* 98 */ OBJ_SCENERY_98, - /* 99 */ OBJ_SCENERY_99, - /* 100 */ OBJ_SCENERY_100, - /* 101 */ OBJ_SCENERY_101, - /* 102 */ OBJ_SCENERY_102, - /* 103 */ OBJ_SCENERY_103, - /* 104 */ OBJ_SCENERY_104, - /* 105 */ OBJ_SCENERY_105, - /* 106 */ OBJ_SCENERY_106, - /* 107 */ OBJ_SCENERY_107, - /* 108 */ OBJ_SCENERY_108, - /* 109 */ OBJ_SCENERY_109, - /* 110 */ OBJ_SCENERY_110, - /* 111 */ OBJ_SCENERY_111, - /* 112 */ OBJ_SCENERY_112, - /* 113 */ OBJ_SCENERY_113, - /* 114 */ OBJ_SCENERY_114, - /* 115 */ OBJ_SCENERY_115, - /* 116 */ OBJ_SCENERY_116, - /* 117 */ OBJ_SCENERY_117, - /* 118 */ OBJ_SCENERY_118, - /* 119 */ OBJ_SCENERY_119, - /* 120 */ OBJ_SCENERY_120, - /* 121 */ OBJ_SCENERY_121, - /* 122 */ OBJ_SCENERY_122, - /* 123 */ OBJ_SCENERY_123, - /* 124 */ OBJ_SCENERY_124, - /* 125 */ OBJ_SCENERY_125, - /* 126 */ OBJ_SCENERY_126, - /* 127 */ OBJ_SCENERY_127, - /* 128 */ OBJ_SCENERY_128, - /* 129 */ OBJ_SCENERY_129, - /* 130 */ OBJ_SCENERY_130, - /* 131 */ OBJ_SCENERY_131, - /* 132 */ OBJ_SCENERY_132, - /* 133 */ OBJ_SCENERY_133, - /* 134 */ OBJ_SCENERY_134, - /* 135 */ OBJ_SCENERY_135, - /* 136 */ OBJ_SCENERY_136, - /* 137 */ OBJ_SCENERY_137, - /* 138 */ OBJ_SCENERY_138, - /* 139 */ OBJ_SCENERY_139, - /* 140 */ OBJ_SCENERY_140, - /* 141 */ OBJ_SCENERY_141, - /* 142 */ OBJ_SCENERY_142, - /* 143 */ OBJ_SCENERY_143, - /* 144 */ OBJ_SCENERY_144, - /* 145 */ OBJ_SCENERY_145, - /* 146 */ OBJ_SCENERY_146, + /* 64 */ OBJ_SCENERY_MA_GUILLOTINE, + /* 65 */ OBJ_SCENERY_MA_PROXIMITY_LIGHT, + /* 66 */ OBJ_SCENERY_MA_WALL_2, + /* 67 */ OBJ_SCENERY_MA_WALL_3, + /* 68 */ OBJ_SCENERY_MA_WALL_4, + /* 69 */ OBJ_SCENERY_MA_TERRAIN_BUMP, + /* 70 */ OBJ_SCENERY_MA_FLOOR_1, + /* 71 */ OBJ_SCENERY_MA_FLOOR_2, + /* 72 */ OBJ_SCENERY_MA_FLOOR_3, + /* 73 */ OBJ_SCENERY_MA_FLOOR_4, + /* 74 */ OBJ_SCENERY_MA_FLOOR_5, + /* 75 */ OBJ_SCENERY_MA_FLOOR_6, + /* 76 */ OBJ_SCENERY_MA_WEAPONS_FACTORY, + /* 77 */ OBJ_SCENERY_MA_INDICATOR_SIGN, + /* 78 */ OBJ_SCENERY_MA_DISTANCE_SIGN_1, + /* 79 */ OBJ_SCENERY_MA_DISTANCE_SIGN_2, + /* 80 */ OBJ_SCENERY_MA_DISTANCE_SIGN_3, + /* 81 */ OBJ_SCENERY_MA_DISTANCE_SIGN_4, + /* 82 */ OBJ_SCENERY_MA_DISTANCE_SIGN_5, + /* 83 */ OBJ_SCENERY_MA_TRAIN_STOP_BLOCK, + /* 84 */ OBJ_SCENERY_MA_RAILROAD_SWITCH_1, + /* 85 */ OBJ_SCENERY_MA_RAILROAD_SWITCH_2, + /* 86 */ OBJ_SCENERY_MA_RAILROAD_SWITCH_3, + /* 87 */ OBJ_SCENERY_MA_RAILROAD_SWITCH_4, + /* 88 */ OBJ_SCENERY_MA_RAILROAD_SWITCH_5, + /* 89 */ OBJ_SCENERY_MA_RAILROAD_SWITCH_6, + /* 90 */ OBJ_SCENERY_MA_RAILROAD_SWITCH_7, + /* 91 */ OBJ_SCENERY_MA_RAILROAD_SWITCH_8, + /* 92 */ OBJ_SCENERY_MA_TRAIN_TRACK_1, + /* 93 */ OBJ_SCENERY_MA_TRAIN_TRACK_2, + /* 94 */ OBJ_SCENERY_MA_TRAIN_TRACK_3, + /* 95 */ OBJ_SCENERY_MA_TRAIN_TRACK_4, + /* 96 */ OBJ_SCENERY_MA_TRAIN_TRACK_5, + /* 97 */ OBJ_SCENERY_MA_TRAIN_TRACK_6, + /* 98 */ OBJ_SCENERY_MA_TRAIN_TRACK_7, + /* 99 */ OBJ_SCENERY_MA_TRAIN_TRACK_8, + /* 100 */ OBJ_SCENERY_MA_TRAIN_TRACK_9, + /* 101 */ OBJ_SCENERY_MA_TRAIN_TRACK_10, + /* 102 */ OBJ_SCENERY_MA_TRAIN_TRACK_11, + /* 103 */ OBJ_SCENERY_MA_TRAIN_TRACK_12, + /* 104 */ OBJ_SCENERY_MA_SWITCH_TRACK, + /* 105 */ OBJ_SCENERY_MA_TRAIN_TRACK_13, + /* 106 */ OBJ_SCENERY_SY_SHIP_1, + /* 107 */ OBJ_SCENERY_SY_SHIP_2, + /* 108 */ OBJ_SCENERY_SY_SHIP_3, + /* 109 */ OBJ_SCENERY_SY_SHIP_3_DESTROYED, + /* 110 */ OBJ_SCENERY_SY_SHIP_4, + /* 111 */ OBJ_SCENERY_SY_SHIP_DEBRIS, + /* 112 */ OBJ_SCENERY_SY_SHIP_2_DESTROYED, + /* 113 */ OBJ_SPRITE_SY_SHIP_2, // Unused + /* 114 */ OBJ_SPRITE_SY_SHIP_3, // Unused + /* 115 */ OBJ_SCENERY_SY_SHIP_PROJECTILE, + /* 116 */ OBJ_SCENERY_SY_SHIP_WINDOWS, + /* 117 */ OBJ_SCENERY_AQ_CORAL_REEF_1, + /* 118 */ OBJ_SCENERY_AQ_TUNNEL_1, + /* 119 */ OBJ_SCENERY_AQ_ARCH, + /* 120 */ OBJ_SCENERY_AQ_CORAL_REEF_2, + /* 121 */ OBJ_SCENERY_AQ_ROCK, + /* 122 */ OBJ_SCENERY_AQ_WALL_1, + /* 123 */ OBJ_SCENERY_AQ_ROOF, + /* 124 */ OBJ_SCENERY_AQ_BUMP_1, + /* 125 */ OBJ_SCENERY_AQ_TUNNEL_2, + /* 126 */ OBJ_SCENERY_AQ_BUMP_2, + /* 127 */ OBJ_SCENERY_VE1_TEMPLE_ENTRANCE, + /* 128 */ OBJ_SCENERY_VE1_TEMPLE_INTERIOR_1, + /* 129 */ OBJ_SCENERY_VE1_TEMPLE_INTERIOR_2, + /* 130 */ OBJ_SCENERY_VE1_TEMPLE_INTERIOR_3, + /* 131 */ OBJ_SCENERY_AND_PASSAGE, + /* 132 */ OBJ_SCENERY_AND_DOOR, + /* 133 */ OBJ_SCENERY_TR_BUILDING, + /* 134 */ OBJ_SCENERY_AND_PATH_INTERSECTION, + /* 135 */ OBJ_SCENERY_AND_PATH_WALLS, + /* 136 */ OBJ_SCENERY_AND_PATH_EXIT, + /* 137 */ OBJ_SCENERY_AND_PATH_ENTRANCE, + /* 138 */ OBJ_SCENERY_VS_BUILDING_1, // Building with Pepper's face. + /* 139 */ OBJ_SCENERY_VS_BUILDING_2, // Building with Pepper's face. Duplicate from previous? + /* 140 */ OBJ_SCENERY_VS_PYRAMID_1, + /* 141 */ OBJ_SCENERY_VS_PYRAMID_2, + /* 142 */ OBJ_SCENERY_VS_ARCH, + /* 143 */ OBJ_SCENERY_VS_KA_FLBASE, + /* 144 */ OBJ_SCENERY_VS_SPACE_JUNK_1, + /* 145 */ OBJ_SCENERY_VS_SPACE_JUNK_2, + /* 146 */ OBJ_SCENERY_VS_SPACE_JUNK_3, /* 147 */ OBJ_SCENERY_147, - /* 148 */ OBJ_SCENERY_148, - /* 149 */ OBJ_SCENERY_149, - /* 150 */ OBJ_SCENERY_150, - /* 151 */ OBJ_SCENERY_151, - /* 152 */ OBJ_SCENERY_152, - /* 153 */ OBJ_SCENERY_153, - /* 154 */ OBJ_SCENERY_154, - /* 155 */ OBJ_SCENERY_155, - /* 156 */ OBJ_SCENERY_156, - /* 157 */ OBJ_SCENERY_157, - /* 158 */ OBJ_SCENERY_158, - /* 159 */ OBJ_SCENERY_159, - /* 160 */ OBJ_SCENERY_160, + /* 148 */ OBJ_SCENERY_FO_MOUNTAIN_1, + /* 149 */ OBJ_SCENERY_FO_MOUNTAIN_2, + /* 150 */ OBJ_SCENERY_FO_MOUNTAIN_3, + /* 151 */ OBJ_SCENERY_FO_TOWER, + /* 152 */ OBJ_SCENERY_BO_POLE, + /* 153 */ OBJ_SCENERY_BO_BUILDING, + /* 154 */ OBJ_SCENERY_KA_FLBASE, + /* 155 */ OBJ_SCENERY_UNK_155, + /* 156 */ OBJ_SCENERY_UNK_156, + /* 157 */ OBJ_SCENERY_SZ_SPACE_JUNK_3, + /* 158 */ OBJ_SCENERY_SZ_SPACE_JUNK_1, + /* 159 */ OBJ_SCENERY_VE2_TOWER, + /* 160 */ OBJ_SCENERY_VE2_MOUNTAIN, /* 161 */ OBJ_SPRITE_CO_POLE, /* 162 */ OBJ_SPRITE_CO_TREE, /* 163 */ OBJ_SPRITE_FO_POLE, @@ -486,148 +486,148 @@ typedef enum ObjectId { /* 177 */ OBJ_ACTOR_CO_GARUDA_2, // Robot that throws I-Beams. /* 178 */ OBJ_ACTOR_CO_GARUDA_3, // Robot that spins I-Beams. /* 179 */ OBJ_ACTOR_CO_GARUDA_DESTROY, - /* 180 */ OBJ_ACTOR_180, - /* 181 */ OBJ_ACTOR_181, - /* 182 */ OBJ_ACTOR_182, - /* 183 */ OBJ_ACTOR_183, - /* 184 */ OBJ_ACTOR_184, - /* 185 */ OBJ_ACTOR_185, - /* 186 */ OBJ_ACTOR_186, - /* 187 */ OBJ_ACTOR_187, - /* 188 */ OBJ_ACTOR_188, + /* 180 */ OBJ_ACTOR_ME_MOLAR_ROCK, + /* 181 */ OBJ_ACTOR_ME_METEOR_1, + /* 182 */ OBJ_ACTOR_ME_METEOR_2, // Smaller than Meteor 1 + /* 183 */ OBJ_ACTOR_ME_METEOR_SHOWER_1, + /* 184 */ OBJ_ACTOR_ME_METEOR_SHOWER_2, + /* 185 */ OBJ_ACTOR_ME_METEOR_SHOWER_3, + /* 186 */ OBJ_ACTOR_ME_LASER_CANNON_1, + /* 187 */ OBJ_ACTOR_ME_LASER_CANNON_2, + /* 188 */ OBJ_ACTOR_AQ_UNK_188, // Unimplemented actor. /* 189 */ OBJ_ACTOR_DEBRIS, /* 190 */ OBJ_MISSILE_SEEK_TEAM, /* 191 */ OBJ_MISSILE_SEEK_PLAYER, - /* 192 */ OBJ_ACTOR_192, - /* 193 */ OBJ_ACTOR_193, - /* 194 */ OBJ_ACTOR_194, + /* 192 */ OBJ_ACTOR_CO_SKIBOT, + /* 193 */ OBJ_ACTOR_CO_RADAR, + /* 194 */ OBJ_ACTOR_ME_MORA, /* 195 */ OBJ_ACTOR_CUTSCENE, - /* 196 */ OBJ_ACTOR_196, + /* 196 */ OBJ_ACTOR_CO_MOLE_MISSILE, /* 197 */ OBJ_ACTOR_ALLRANGE, /* 198 */ OBJ_ACTOR_TEAM_BOSS, /* 199 */ OBJ_ACTOR_199, /* 200 */ OBJ_ACTOR_EVENT, - /* 201 */ OBJ_ACTOR_201, - /* 202 */ OBJ_ACTOR_202, + /* 201 */ OBJ_ACTOR_ME_METEO_BALL, + /* 202 */ OBJ_ACTOR_ME_HOPBOT, /* 203 */ OBJ_ACTOR_SLIPPY_SX, - /* 204 */ OBJ_ACTOR_204, - /* 205 */ OBJ_ACTOR_205, - /* 206 */ OBJ_ACTOR_206, + /* 204 */ OBJ_ACTOR_SY_ROBOT, + /* 205 */ OBJ_ACTOR_MA_LOCOMOTIVE, + /* 206 */ OBJ_ACTOR_MA_TRAIN_CAR_1, /* 207 */ OBJ_ACTOR_207, - /* 208 */ OBJ_ACTOR_208, - /* 209 */ OBJ_ACTOR_209, - /* 210 */ OBJ_ACTOR_210, - /* 211 */ OBJ_ACTOR_211, - /* 212 */ OBJ_ACTOR_212, - /* 213 */ OBJ_ACTOR_213, - /* 214 */ OBJ_ACTOR_214, - /* 215 */ OBJ_ACTOR_215, - /* 216 */ OBJ_ACTOR_216, - /* 217 */ OBJ_ACTOR_217, - /* 218 */ OBJ_ACTOR_218, + /* 208 */ OBJ_ACTOR_MA_TRAIN_CAR_2, + /* 209 */ OBJ_ACTOR_MA_TRAIN_CAR_3, + /* 210 */ OBJ_ACTOR_MA_TRAIN_CAR_4, + /* 211 */ OBJ_ACTOR_MA_TRAIN_CAR_5, + /* 212 */ OBJ_ACTOR_MA_TRAIN_CAR_6, + /* 213 */ OBJ_ACTOR_MA_TRAIN_CAR_7, + /* 214 */ OBJ_ACTOR_MA_RAILROAD_SWITCH, + /* 215 */ OBJ_ACTOR_MA_BOULDER, + /* 216 */ OBJ_ACTOR_MA_HORIZONTAL_LOCK_BAR, + /* 217 */ OBJ_ACTOR_MA_VERTICAL_LOCK_BAR, + /* 218 */ OBJ_ACTOR_MA_BARRIER, /* 219 */ OBJ_ACTOR_219, - /* 220 */ OBJ_ACTOR_220, - /* 221 */ OBJ_ACTOR_221, - /* 222 */ OBJ_ACTOR_222, - /* 223 */ OBJ_ACTOR_223, - /* 224 */ OBJ_ACTOR_224, - /* 225 */ OBJ_ACTOR_225, - /* 226 */ OBJ_ACTOR_226, - /* 227 */ OBJ_ACTOR_227, - /* 228 */ OBJ_ACTOR_228, - /* 229 */ OBJ_ACTOR_229, - /* 230 */ OBJ_ACTOR_230, - /* 231 */ OBJ_ACTOR_231, - /* 232 */ OBJ_ACTOR_232, - /* 233 */ OBJ_ACTOR_233, - /* 234 */ OBJ_ACTOR_234, - /* 235 */ OBJ_ACTOR_235, - /* 236 */ OBJ_ACTOR_236, - /* 237 */ OBJ_ACTOR_237, - /* 238 */ OBJ_ACTOR_238, - /* 239 */ OBJ_ACTOR_239, - /* 240 */ OBJ_ACTOR_240, - /* 241 */ OBJ_ACTOR_241, - /* 242 */ OBJ_ACTOR_242, - /* 243 */ OBJ_ACTOR_243, - /* 244 */ OBJ_ACTOR_244, - /* 245 */ OBJ_ACTOR_245, - /* 246 */ OBJ_ACTOR_246, - /* 247 */ OBJ_ACTOR_247, - /* 248 */ OBJ_ACTOR_248, - /* 249 */ OBJ_ACTOR_249, - /* 250 */ OBJ_ACTOR_250, - /* 251 */ OBJ_ACTOR_251, - /* 252 */ OBJ_ACTOR_252, - /* 253 */ OBJ_ACTOR_253, - /* 254 */ OBJ_ACTOR_254, + /* 220 */ OBJ_ACTOR_MA_BOMBDROP, + /* 221 */ OBJ_ACTOR_MA_SPEAR, + /* 222 */ OBJ_ACTOR_MA_SHOCK_BOX, + /* 223 */ OBJ_ACTOR_MA_RAILWAY_SIGNAL, + /* 224 */ OBJ_ACTOR_TI_TERRAIN, + /* 225 */ OBJ_ACTOR_TI_LANDMINE, + /* 226 */ OBJ_ACTOR_TI_DESERT_ROVER, + /* 227 */ OBJ_ACTOR_TI_DELPHOR, // Tall enemy with laser tracking. + /* 228 */ OBJ_ACTOR_TI_DELPHOR_HEAD, // Delphor's head. + /* 229 */ OBJ_ACTOR_TI_DESERT_CRAWLER, + /* 230 */ OBJ_ACTOR_TI_BOULDER, + /* 231 */ OBJ_ACTOR_TI_BOMB, // Ground time-based bomb. + /* 232 */ OBJ_ACTOR_TI_RASCO, // Flying enemy that throws rocks. + /* 233 */ OBJ_ACTOR_TI_FEKUDA, // Small cannon that fires lasers. + /* 234 */ OBJ_ACTOR_TI_GREAT_FOX, + /* 235 */ OBJ_ACTOR_ZO_BIRD, + /* 236 */ OBJ_ACTOR_ZO_DODORA, // Giant flying snake type enemy. + /* 237 */ OBJ_ACTOR_UNK_237, + /* 238 */ OBJ_ACTOR_ZO_FISH, + /* 239 */ OBJ_ACTOR_ZO_DODORA_WP_COUNT, // Dodora waypoint counter. + /* 240 */ OBJ_ACTOR_ZO_Z_GULL, + /* 241 */ OBJ_ACTOR_ZO_ENERGY_BALL, // Energy balls carried by Z-Gulls. + /* 242 */ OBJ_ACTOR_ZO_TROIKA, + /* 243 */ OBJ_ACTOR_ZO_SHRIMP, + /* 244 */ OBJ_ACTOR_ZO_OBNEMA, // Giant Arachnid type enemy. + /* 245 */ OBJ_ACTOR_ZO_BALL, // Balls shoot by Zoness boss. + /* 246 */ OBJ_ACTOR_ZO_MINE, + /* 247 */ OBJ_ACTOR_ZO_BARRIER, // Barrier with opening rudders on the sides. + /* 248 */ OBJ_ACTOR_ZO_CRANE_MAGNET, + /* 249 */ OBJ_ACTOR_SPIKEBALL, // Spikeball shot by Zoness boss. + /* 250 */ OBJ_ACTOR_ZO_CARGOSHIP, + /* 251 */ OBJ_ACTOR_ZO_CONTAINER, + /* 252 */ OBJ_ACTOR_ZO_RADARBUOY, // Zoness searchlight. + /* 253 */ OBJ_ACTOR_ZO_SUPPLYCRANE, + /* 254 */ OBJ_ACTOR_ZO_SEARCHLIGHT, /* 255 */ OBJ_ACTOR_255, /* 256 */ OBJ_ACTOR_256, /* 257 */ OBJ_ACTOR_257, - /* 258 */ OBJ_ACTOR_258, - /* 259 */ OBJ_ACTOR_259, - /* 260 */ OBJ_ACTOR_260, - /* 261 */ OBJ_ACTOR_261, - /* 262 */ OBJ_ACTOR_262, - /* 263 */ OBJ_ACTOR_263, - /* 264 */ OBJ_ACTOR_264, - /* 265 */ OBJ_ACTOR_265, - /* 266 */ OBJ_ACTOR_266, - /* 267 */ OBJ_ACTOR_267, - /* 268 */ OBJ_ACTOR_268, - /* 269 */ OBJ_ACTOR_269, - /* 270 */ OBJ_ACTOR_270, - /* 271 */ OBJ_ACTOR_271, - /* 272 */ OBJ_ACTOR_272, + /* 258 */ OBJ_ACTOR_AQ_PEARL, + /* 259 */ OBJ_ACTOR_AQ_ANGLERFISH, // Giant fish with search light. + /* 260 */ OBJ_ACTOR_AQ_GAROA, // Blue shellded enemy that throws energy balls. + /* 261 */ OBJ_ACTOR_AQ_SCULPIN, // Fish-type enemy. + /* 262 */ OBJ_ACTOR_AQ_SPINDLYFISH, + /* 263 */ OBJ_ACTOR_AQ_SQUID, + /* 264 */ OBJ_ACTOR_AQ_SEAWEED, + /* 265 */ OBJ_ACTOR_AQ_BOULDER, + /* 266 */ OBJ_ACTOR_AQ_CORAL, + /* 267 */ OBJ_ACTOR_AQ_JELLYFISH, + /* 268 */ OBJ_ACTOR_AQ_FISHGROUP, // A school of small fish. + /* 269 */ OBJ_ACTOR_AQ_STONE_COLUMN, + /* 270 */ OBJ_ACTOR_AQ_OYSTER, + /* 271 */ OBJ_ACTOR_BO_SHIELD_REACTOR, + /* 272 */ OBJ_ACTOR_BO_LASER_CANNON, /* 273 */ OBJ_ACTOR_FO_RADAR, /* 274 */ OBJ_ACTOR_SZ_SPACE_JUNK, - /* 275 */ OBJ_ACTOR_275, - /* 276 */ OBJ_ACTOR_276, - /* 277 */ OBJ_ACTOR_277, - /* 278 */ OBJ_ACTOR_278, - /* 279 */ OBJ_ACTOR_279, - /* 280 */ OBJ_ACTOR_280, - /* 281 */ OBJ_ACTOR_281, - /* 282 */ OBJ_ACTOR_282, - /* 283 */ OBJ_ACTOR_283, - /* 284 */ OBJ_ACTOR_284, - /* 285 */ OBJ_ACTOR_285, - /* 286 */ OBJ_ACTOR_286, - /* 287 */ OBJ_ACTOR_287, - /* 288 */ OBJ_ACTOR_288, - /* 289 */ OBJ_ACTOR_289, - /* 290 */ OBJ_ACTOR_290, + /* 275 */ OBJ_ACTOR_SO_ROCK_1, // Surfacing rock type 1. + /* 276 */ OBJ_ACTOR_SO_ROCK_2, // Surfacing rock type 2. + /* 277 */ OBJ_ACTOR_SO_ROCK_3, // Surfacing rock type 3. + /* 278 */ OBJ_ACTOR_SO_WAVE, + /* 279 */ OBJ_ACTOR_SO_PROMINENCE, + /* 280 */ OBJ_ACTOR_VE1_PILLAR_1, + /* 281 */ OBJ_ACTOR_VE1_PILLAR_2, + /* 282 */ OBJ_ACTOR_VE1_PILLAR_3, + /* 283 */ OBJ_ACTOR_VE1_PILLAR_4, + /* 284 */ OBJ_ACTOR_VE1_MONKEY_STATUE, + /* 285 */ OBJ_ACTOR_AND_LASER_EMITTER, + /* 286 */ OBJ_ACTOR_AND_BRAIN_WASTE, + /* 287 */ OBJ_ACTOR_AND_EXPLOSION, // Explosions that follow Fox during the Andross escape. + /* 288 */ OBJ_ACTOR_AND_RADIO, // Andross radio messages. + /* 289 */ OBJ_ACTOR_AND_JAMES_TRIGGER, + /* 290 */ OBJ_ACTOR_AND_BOSS_TIMER_SET, /* 291 */ OBJ_ACTOR_SUPPLIES, /* 292 */ OBJ_BOSS_CO_GRANGA, /* 293 */ OBJ_BOSS_CO_CARRIER, - /* 294 */ OBJ_BOSS_294, - /* 295 */ OBJ_BOSS_295, - /* 296 */ OBJ_BOSS_296, - /* 297 */ OBJ_BOSS_297, - /* 298 */ OBJ_BOSS_298, - /* 299 */ OBJ_BOSS_299, - /* 300 */ OBJ_BOSS_300, - /* 301 */ OBJ_BOSS_301, - /* 302 */ OBJ_BOSS_A6, + /* 294 */ OBJ_BOSS_CO_CARRIER_LEFT, + /* 295 */ OBJ_BOSS_CO_CARRIER_UPPER, + /* 296 */ OBJ_BOSS_CO_CARRIER_BOTTOM, + /* 297 */ OBJ_BOSS_ME_CRUSHER, + /* 298 */ OBJ_BOSS_ME_CRUSHER_SHIELD, + /* 299 */ OBJ_BOSS_UNK_299, + /* 300 */ OBJ_BOSS_UNK_300, + /* 301 */ OBJ_BOSS_AQ_UNK_301, + /* 302 */ OBJ_BOSS_A6_GORGON, /* 303 */ OBJ_BOSS_SX_SPYBORG, - /* 304 */ OBJ_BOSS_304, - /* 305 */ OBJ_BOSS_305, - /* 306 */ OBJ_BOSS_TI, - /* 307 */ OBJ_BOSS_ZO, - /* 308 */ OBJ_BOSS_FO, - /* 309 */ OBJ_BOSS_309, - /* 310 */ OBJ_BOSS_310, - /* 311 */ OBJ_BOSS_311, - /* 312 */ OBJ_BOSS_VE2, + /* 304 */ OBJ_BOSS_SX_SPYBORG_LEFT_ARM, + /* 305 */ OBJ_BOSS_SX_SPYBORG_RIGHT_ARM, + /* 306 */ OBJ_BOSS_TI_GORAS, + /* 307 */ OBJ_BOSS_ZO_SARUMARINE, + /* 308 */ OBJ_BOSS_FO_BASE, + /* 309 */ OBJ_BOSS_BO_BASE, + /* 310 */ OBJ_BOSS_BO_BASE_SHIELD, // Bolse force field + /* 311 */ OBJ_BOSS_BO_BASE_CORE, + /* 312 */ OBJ_BOSS_VE2_BASE, /* 313 */ OBJ_BOSS_SZ_GREAT_FOX, - /* 314 */ OBJ_BOSS_SY, - /* 315 */ OBJ_BOSS_SO, - /* 316 */ OBJ_BOSS_KA, - /* 317 */ OBJ_BOSS_KA_BASE, - /* 318 */ OBJ_BOSS_AQ, - /* 319 */ OBJ_BOSS_VE1, - /* 320 */ OBJ_BOSS_320, - /* 321 */ OBJ_BOSS_321, + /* 314 */ OBJ_BOSS_SY_SHOGUN, + /* 315 */ OBJ_BOSS_SO_VULKAIN, + /* 316 */ OBJ_BOSS_KA_SAUCERER, + /* 317 */ OBJ_BOSS_KA_FLBASE, + /* 318 */ OBJ_BOSS_AQ_BACOON, + /* 319 */ OBJ_BOSS_VE1_GOLEMECH, + /* 320 */ OBJ_BOSS_AND_ANDROSS, + /* 321 */ OBJ_BOSS_AND_BRAIN, /* 322 */ OBJ_ITEM_LASERS, /* 323 */ OBJ_ITEM_CHECKPOINT, /* 324 */ OBJ_ITEM_SILVER_RING, @@ -645,13 +645,13 @@ typedef enum ObjectId { /* 336 */ OBJ_ITEM_GOLD_RING, /* 337 */ OBJ_ITEM_WING_REPAIR, /* 338 */ OBJ_ITEM_TRAINING_RING, - /* 339 */ OBJ_EFFECT_FIRE_SMOKE, - /* 340 */ OBJ_EFFECT_340, - /* 341 */ OBJ_EFFECT_341, - /* 342 */ OBJ_EFFECT_342, - /* 343 */ OBJ_EFFECT_343, - /* 344 */ OBJ_EFFECT_344, - /* 345 */ OBJ_EFFECT_345, + /* 339 */ OBJ_EFFECT_FIRE_SMOKE_1, + /* 340 */ OBJ_EFFECT_FIRE_SMOKE_2, + /* 341 */ OBJ_EFFECT_FIRE_SMOKE_3, + /* 342 */ OBJ_EFFECT_SMOKE_1, + /* 343 */ OBJ_EFFECT_SMOKE_2, + /* 344 */ OBJ_EFFECT_EXPLOSION_MARK_1, // Explosion mark left on the ground after an enemy explodes. + /* 345 */ OBJ_EFFECT_LASER_MARK_1, // Mark left when lasers hit the ground. /* 346 */ OBJ_EFFECT_346, /* 347 */ OBJ_EFFECT_347, /* 348 */ OBJ_EFFECT_348, @@ -664,7 +664,7 @@ typedef enum ObjectId { /* 355 */ OBJ_EFFECT_355, /* 356 */ OBJ_EFFECT_356, /* 357 */ OBJ_EFFECT_357, - /* 358 */ OBJ_EFFECT_358, + /* 358 */ OBJ_EFFECT_KA_ENERGY_PARTICLES, /* 359 */ OBJ_EFFECT_359, /* 360 */ OBJ_EFFECT_360, /* 361 */ OBJ_EFFECT_361, @@ -672,27 +672,27 @@ typedef enum ObjectId { /* 363 */ OBJ_EFFECT_363, /* 364 */ OBJ_EFFECT_364, /* 365 */ OBJ_EFFECT_365, - /* 366 */ OBJ_EFFECT_366, - /* 367 */ OBJ_EFFECT_367, - /* 368 */ OBJ_EFFECT_368, - /* 369 */ OBJ_EFFECT_369, - /* 370 */ OBJ_EFFECT_370, - /* 371 */ OBJ_EFFECT_371, - /* 372 */ OBJ_EFFECT_372, + /* 366 */ OBJ_EFFECT_366, // ast_blue_marine + /* 367 */ OBJ_EFFECT_367, // ast_bg_planet + /* 368 */ OBJ_EFFECT_368, // TI: ast_landmaster + /* 369 */ OBJ_EFFECT_369, // ME: ast_common + /* 370 */ OBJ_EFFECT_370, // ME: ast_meteo + /* 371 */ OBJ_EFFECT_371, // ME: ast_meteo + /* 372 */ OBJ_EFFECT_372, // ast_arwing /* 373 */ OBJ_EFFECT_TIMED_SFX, - /* 374 */ OBJ_EFFECT_374, + /* 374 */ OBJ_EFFECT_374, // ast_enmy_planet /* 375 */ OBJ_EFFECT_375, - /* 376 */ OBJ_EFFECT_376, - /* 377 */ OBJ_EFFECT_377, - /* 378 */ OBJ_EFFECT_378, + /* 376 */ OBJ_EFFECT_376, // Plasma shot by Granga + /* 377 */ OBJ_EFFECT_377, // Spyborg blue shot + /* 378 */ OBJ_EFFECT_378, // Ball projectiles shot by train car turret in Macbeth /* 379 */ OBJ_EFFECT_379, - /* 380 */ OBJ_EFFECT_380, + /* 380 */ OBJ_EFFECT_380, // Some kind of shot (Macbeth boss) /* 381 */ OBJ_EFFECT_381, /* 382 */ OBJ_EFFECT_382, - /* 383 */ OBJ_EFFECT_383, - /* 384 */ OBJ_EFFECT_384, - /* 385 */ OBJ_EFFECT_385, - /* 386 */ OBJ_EFFECT_386, + /* 383 */ OBJ_EFFECT_383, // Big boss explosion + /* 384 */ OBJ_EFFECT_384, // small explosion + /* 385 */ OBJ_EFFECT_385, // small explosion + /* 386 */ OBJ_EFFECT_386, // some type of explosion /* 387 */ OBJ_EFFECT_387, /* 388 */ OBJ_EFFECT_388, /* 389 */ OBJ_EFFECT_389, @@ -706,13 +706,13 @@ typedef enum ObjectId { /* 397 */ OBJ_EFFECT_397, /* 398 */ OBJ_EFFECT_398, /* 399 */ OBJ_EFFECT_399, - /* 400 */ OBJ_UNK_400, - /* 401 */ OBJ_UNK_401, + /* 400 */ OBJ_ENV_SMALL_ROCKS_ENABLE, + /* 401 */ OBJ_ENV_SMALL_ROCKS_DISABLE, /* 402 */ OBJ_UNK_402, /* 403 */ OBJ_UNK_403, /* 404 */ OBJ_UNK_404, /* 405 */ OBJ_UNK_405, - /* 407 */ OBJ_ID_MAX, + /* 406 */ OBJ_ID_MAX, } ObjectId; #define OBJ_SCENERY_START OBJ_SCENERY_CO_STONE_ARCH @@ -720,8 +720,8 @@ typedef enum ObjectId { #define OBJ_ACTOR_START OBJ_ACTOR_CO_GARUDA_1 #define OBJ_BOSS_START OBJ_BOSS_CO_GRANGA #define OBJ_ITEM_START OBJ_ITEM_LASERS -#define OBJ_EFFECT_START OBJ_EFFECT_FIRE_SMOKE -#define OBJ_ENV_START OBJ_UNK_400 +#define OBJ_EFFECT_START OBJ_EFFECT_FIRE_SMOKE_1 +#define OBJ_ENV_START OBJ_ENV_SMALL_ROCKS_ENABLE #define OBJ_SCENERY_MAX OBJ_SPRITE_START #define OBJ_SPRITE_MAX OBJ_ACTOR_START @@ -935,167 +935,167 @@ typedef enum { /* 50 */ LN_VWK_MAX, } BossLNvwork; -typedef Scenery Scenery_0; -typedef Scenery Scenery_1; -typedef Scenery Scenery_2; -typedef Scenery Scenery_3; -typedef Scenery Scenery_4; -typedef Scenery Scenery_5; -typedef Scenery Scenery_6; -typedef Scenery Scenery_7; -typedef Scenery Scenery_8; -typedef Scenery Scenery_9; -typedef Scenery Scenery_10; -typedef Scenery Scenery_11; -typedef Scenery Scenery_12; -typedef Scenery Scenery_13; -typedef Scenery Scenery_14; -typedef Scenery Scenery_15; -typedef Scenery Scenery_16; -typedef Scenery Scenery_17; +typedef Scenery CoStoneArch; +typedef Scenery CoBump1; +typedef Scenery CoBump2; +typedef Scenery CoBump3; +typedef Scenery CoBump4; +typedef Scenery CoBump5; +typedef Scenery CoHighway1; +typedef Scenery CoHighway2; +typedef Scenery CoHighway3; +typedef Scenery CoHighway4; +typedef Scenery CoBuilding1; +typedef Scenery CoBuilding2; +typedef Scenery CoBuilding3; +typedef Scenery CoBuilding4; +typedef Scenery CoBuilding5; +typedef Scenery CoBuilding6; +typedef Scenery CoBuilding7; +typedef Scenery CoBuilding8; typedef Scenery CoBuildingOnFire; -typedef Scenery Scenery_19; -typedef Scenery Scenery_20; -typedef Scenery Scenery_21; -typedef Scenery Scenery_22; -typedef Scenery Scenery_23; -typedef Scenery Scenery_24; -typedef Scenery Scenery_25; -typedef Scenery Scenery_26; -typedef Scenery Scenery_27; -typedef Scenery Scenery_28; -typedef Scenery Scenery_29; -typedef Scenery Scenery_30; -typedef Scenery Scenery_31; -typedef Scenery Scenery_32; -typedef Scenery Scenery_33; -typedef Scenery Scenery_34; -typedef Scenery Scenery_35; -typedef Scenery Scenery_36; -typedef Scenery Scenery_37; -typedef Scenery Scenery_38; -typedef Scenery MeteoTunnel; +typedef Scenery CoTower; +typedef Scenery CoArch1; +typedef Scenery CoArch2; +typedef Scenery CoArch3; +typedef Scenery CoRadarDish; +typedef Scenery CoHighway5; +typedef Scenery CoHighway6; +typedef Scenery CoHighway7; +typedef Scenery CoHighway8; +typedef Scenery CoHighway9; +typedef Scenery TiSkull; +typedef Scenery TiRib0; +typedef Scenery TiRib1; +typedef Scenery TiRib2; +typedef Scenery TiRib3; +typedef Scenery TiRib4; +typedef Scenery TiRib5; +typedef Scenery TiRib6; +typedef Scenery TiRib7; +typedef Scenery TiRib8; +typedef Scenery MeTunnel; typedef Scenery CoBuilding9; typedef Scenery CoBuilding10; typedef Scenery CoIBeam; -typedef Scenery Scenery_43; -typedef Scenery Scenery_44; -typedef Scenery Scenery_45; -typedef Scenery Scenery_46; -typedef Scenery Scenery_47; -typedef Scenery Scenery_48; -typedef Scenery Scenery_49; -typedef Scenery Scenery_50; -typedef Scenery Scenery_51; -typedef Scenery Scenery_52; -typedef Scenery Scenery_53; +typedef Scenery ZoRock; +typedef Scenery ZoOilRig1; +typedef Scenery ZoOilRig2; +typedef Scenery ZoOilRig3; +typedef Scenery ZoIsland; +typedef Scenery Ve1Wall1; +typedef Scenery Ve1Wall2; +typedef Scenery Ve1Wall3; +typedef Scenery Ve1HallwayObstacle; +typedef Scenery Ve1Generator; +typedef Scenery Ve1WatchPost; typedef Scenery CoWaterfall; -typedef Scenery Scenery_55; +typedef Scenery CoRockWall; typedef Scenery CoDoors; -typedef Scenery Scenery_57; -typedef Scenery Scenery_58; -typedef Scenery Scenery_59; -typedef Scenery Scenery_60; -typedef Scenery Scenery_61; -typedef Scenery Scenery_62; -typedef Scenery Scenery_63; -typedef Scenery Scenery_64; -typedef Scenery Scenery_65; -typedef Scenery Scenery_66; -typedef Scenery Scenery_67; -typedef Scenery Scenery_68; -typedef Scenery Scenery_69; -typedef Scenery Scenery_70; -typedef Scenery Scenery_71; -typedef Scenery Scenery_72; -typedef Scenery Scenery_73; -typedef Scenery Scenery_74; -typedef Scenery Scenery_75; -typedef Scenery Scenery_76; -typedef Scenery Scenery_77; -typedef Scenery Scenery_78; -typedef Scenery Scenery_79; -typedef Scenery Scenery_80; -typedef Scenery Scenery_81; -typedef Scenery Scenery_82; -typedef Scenery Scenery_83; -typedef Scenery Scenery_84; -typedef Scenery Scenery_85; -typedef Scenery Scenery_86; -typedef Scenery Scenery_87; -typedef Scenery Scenery_88; -typedef Scenery Scenery_89; -typedef Scenery Scenery_90; -typedef Scenery Scenery_91; -typedef Scenery Scenery_92; -typedef Scenery Scenery_93; -typedef Scenery Scenery_94; -typedef Scenery Scenery_95; -typedef Scenery Scenery_96; -typedef Scenery Scenery_97; -typedef Scenery Scenery_98; -typedef Scenery Scenery_99; -typedef Scenery Scenery_100; -typedef Scenery Scenery_101; -typedef Scenery Scenery_102; -typedef Scenery Scenery_103; -typedef Scenery Scenery_104; -typedef Scenery Scenery_105; -typedef Scenery Scenery_106; -typedef Scenery Scenery_107; -typedef Scenery Scenery_108; -typedef Scenery Scenery_109; -typedef Scenery Scenery_110; -typedef Scenery Scenery_111; -typedef Scenery Scenery_112; -typedef Scenery Scenery_113; -typedef Scenery Scenery_114; -typedef Scenery Scenery_115; -typedef Scenery Scenery_116; -typedef Scenery Scenery_117; -typedef Scenery Scenery_118; -typedef Scenery Scenery_119; -typedef Scenery Scenery_120; -typedef Scenery Scenery_121; -typedef Scenery Scenery_122; -typedef Scenery Scenery_123; -typedef Scenery Scenery_124; -typedef Scenery Scenery_125; -typedef Scenery Scenery_126; -typedef Scenery Scenery_127; -typedef Scenery Scenery_128; -typedef Scenery Scenery_129; -typedef Scenery Scenery_130; -typedef Scenery Scenery_131; -typedef Scenery Scenery_132; -typedef Scenery Scenery_133; -typedef Scenery Scenery_134; -typedef Scenery Scenery_135; -typedef Scenery Scenery_136; -typedef Scenery Scenery_137; -typedef Scenery Scenery_138; -typedef Scenery Scenery_139; -typedef Scenery Scenery_140; -typedef Scenery Scenery_141; -typedef Scenery Scenery_142; -typedef Scenery Scenery_143; -typedef Scenery Scenery_144; -typedef Scenery Scenery_145; -typedef Scenery Scenery_146; -typedef Scenery Scenery_147; -typedef Scenery Scenery_148; -typedef Scenery Scenery_149; -typedef Scenery Scenery_150; -typedef Scenery Scenery_151; -typedef Scenery Scenery_152; -typedef Scenery Scenery_153; -typedef Scenery Scenery_154; -typedef Scenery Scenery_155; -typedef Scenery Scenery_156; -typedef Scenery Scenery_157; -typedef Scenery Scenery_158; -typedef Scenery Scenery_159; -typedef Scenery Scenery_160; +typedef Scenery TiPillar; +typedef Scenery TiBridge; +typedef Scenery MaBuilding1; +typedef Scenery MaBuilding2; +typedef Scenery MaTower; +typedef Scenery MaWall1; +typedef Scenery Scenery63; +typedef Scenery MaGuillotine; +typedef Scenery MaProximityLight; +typedef Scenery MaWall2; +typedef Scenery MaWall3; +typedef Scenery MaWall4; +typedef Scenery MaTerrainBump; +typedef Scenery MaFloor1; +typedef Scenery MaFloor2; +typedef Scenery MaFloor3; +typedef Scenery MaFloor4; +typedef Scenery MaFloor5; +typedef Scenery MaFloor6; +typedef Scenery MaWeaponsFactory; +typedef Scenery MaIndicatorSign; +typedef Scenery MaDistanceSign1; +typedef Scenery MaDistanceSign2; +typedef Scenery MaDistanceSign3; +typedef Scenery MaDistanceSign4; +typedef Scenery MaDistanceSign5; +typedef Scenery MaTrainStopBlock; +typedef Scenery MaRailroadSwitch1; +typedef Scenery MaRailroadSwitch2; +typedef Scenery MaRailroadSwitch3; +typedef Scenery MaRailroadSwitch4; +typedef Scenery MaRailroadSwitch5; +typedef Scenery MaRailroadSwitch6; +typedef Scenery MaRailroadSwitch7; +typedef Scenery MaRailroadSwitch8; +typedef Scenery MaTrainTrack1; +typedef Scenery MaTrainTrack2; +typedef Scenery MaTrainTrack3; +typedef Scenery MaTrainTrack4; +typedef Scenery MaTrainTrack5; +typedef Scenery MaTrainTrack6; +typedef Scenery MaTrainTrack7; +typedef Scenery MaTrainTrack8; +typedef Scenery MaTrainTrack9; +typedef Scenery MaTrainTrack10; +typedef Scenery MaTrainTrack11; +typedef Scenery MaTrainTrack12; +typedef Scenery MaSwitchTrack; +typedef Scenery MaTrainTrack13; +typedef Scenery SyShip1; +typedef Scenery SyShip2; +typedef Scenery SyShip3; +typedef Scenery SyShip3Destroyed; +typedef Scenery SyShip4; +typedef Scenery SyShipDebris; +typedef Scenery SyShip2Destroyed; +typedef Sprite SpriteSyShip2; +typedef Sprite SpriteSyShip3; +typedef Scenery SyShipProjectile; +typedef Scenery SyShipWindows; +typedef Scenery AqCoralReef1; +typedef Scenery AqTunnel1; +typedef Scenery AqArch; +typedef Scenery AqCoralReef2; +typedef Scenery AqRock; +typedef Scenery AqWall1; +typedef Scenery AqRoof; +typedef Scenery AqBump1; +typedef Scenery AqTunnel2; +typedef Scenery AqBump2; +typedef Scenery Ve1TempleEntrance; +typedef Scenery AqTempleInterior1; +typedef Scenery AqTempleInterior2; +typedef Scenery AqTempleInterior3; +typedef Scenery AndPassage; +typedef Scenery AndDoor; +typedef Scenery TrBuilding; +typedef Scenery AndPathIntersection; +typedef Scenery AndPathWalls; +typedef Scenery AndPathExit; +typedef Scenery AndPathEntrance; +typedef Scenery VsBuilding1; +typedef Scenery VsBuilding2; +typedef Scenery VsPyramid1; +typedef Scenery VsPyramid2; +typedef Scenery VsArch; +typedef Scenery VsKaFlBase; +typedef Scenery VsSpaceJunk1; +typedef Scenery VsSpaceJunk2; +typedef Scenery VsSpaceJunk3; +typedef Scenery Scenery147; +typedef Scenery FoMountain1; +typedef Scenery FoMountain2; +typedef Scenery FoMountain3; +typedef Scenery FoTower; +typedef Scenery BoPole; +typedef Scenery BoBuilding; +typedef Scenery KaFlBase; +typedef Scenery SceneryUnk155; +typedef Scenery SceneryUnk156; +typedef Scenery SzSpaceJunk3; +typedef Scenery SzSpaceJunk1; +typedef Scenery Ve2Tower; +typedef Scenery Ve2Mountain; typedef Sprite CoPole; typedef Sprite CoTree; typedef Sprite FoPole; @@ -1115,148 +1115,148 @@ typedef Actor CoGaruda1; typedef Actor CoGaruda2; typedef Actor CoGaruda3; typedef Actor CoGarudaDestroy; -typedef Actor Actor180; -typedef Actor Actor181; -typedef Actor Actor182; -typedef Actor Actor183; -typedef Actor Actor184; -typedef Actor Actor185; -typedef Actor Actor186; -typedef Actor Actor187; +typedef Actor MeMolarRock; +typedef Actor MeMeteor1; +typedef Actor MeMeteor2; +typedef Actor MeMeteorShower1; +typedef Actor MeMeteorShower2; +typedef Actor MeMeteorShower3; +typedef Actor MeLaserCannon1; +typedef Actor MeLaserCannon2; typedef Actor Actor188; typedef Actor ActorDebris; -typedef Actor Actor190; -typedef Actor Actor191; -typedef Actor Actor192; -typedef Actor Actor193; -typedef Actor Actor194; +typedef Actor ActorMissileSeekTeam; +typedef Actor ActorMissileSeekPlayer; +typedef Actor ActorSkibot; +typedef Actor CoRadar; +typedef Actor MeMora; typedef Actor ActorCutscene; -typedef Actor Actor196; +typedef Actor ActorMoleMissile; typedef Actor ActorAllRange; -typedef Actor ActorTeamBoss; +typedef Actor ActorTeamBoss; // Teammates in a boss battle typedef Actor Actor199; typedef Actor ActorEvent; -typedef Actor Actor201; -typedef Actor Actor202; -typedef Actor ActorSlippySX; -typedef Actor Actor204; -typedef Actor Actor205; -typedef Actor Actor206; +typedef Actor MeteoBall; +typedef Actor ActorHopBot; +typedef Actor SxSlippy; +typedef Actor SyRobot; +typedef Actor MaLocomotive; +typedef Actor MaTrainCar1; typedef Actor Actor207; -typedef Actor Actor208; -typedef Actor Actor209; -typedef Actor Actor210; -typedef Actor Actor211; -typedef Actor Actor212; -typedef Actor Actor213; -typedef Actor Actor214; -typedef Actor Actor215; -typedef Actor Actor216; -typedef Actor Actor217; -typedef Actor Actor218; +typedef Actor MaTrainCar2; +typedef Actor MaTrainCar3; +typedef Actor MaTrainCar4; +typedef Actor MaTrainCar5; +typedef Actor MaTrainCar6; +typedef Actor MaTrainCar7; +typedef Actor MaRailroadSwitch; +typedef Actor MaBoulder; +typedef Actor MaHorizontalLockBar; +typedef Actor MaVerticalLockBar; +typedef Actor MaBarrier; typedef Actor Actor219; -typedef Actor Actor220; -typedef Actor Actor221; -typedef Actor Actor222; -typedef Actor Actor223; -typedef Actor Actor224; -typedef Actor Actor225; -typedef Actor Actor226; -typedef Actor Actor227; -typedef Actor Actor228; -typedef Actor Actor229; -typedef Actor Actor230; -typedef Actor Actor231; -typedef Actor Actor232; -typedef Actor Actor233; -typedef Actor Actor234; -typedef Actor Actor235; -typedef Actor Actor236; +typedef Actor MaBombDrop; +typedef Actor MaSpear; +typedef Actor MaShockBox; +typedef Actor MaRailwaySignal; +typedef Actor TiTerrain; +typedef Actor TiLandmine; +typedef Actor TiDesertRover; +typedef Actor TiDelphor; +typedef Actor TiDelphorHead; +typedef Actor TiDesertCrawler; +typedef Actor TiBoulder; +typedef Actor TiBomb; +typedef Actor TiRasco; +typedef Actor TiFekuda; +typedef Actor TiGreatFox; +typedef Actor ZoBird; +typedef Actor ZoDodora; typedef Actor Actor237; -typedef Actor Actor238; -typedef Actor Actor239; -typedef Actor Actor240; -typedef Actor Actor241; -typedef Actor Actor242; -typedef Actor Actor243; -typedef Actor Actor244; -typedef Actor Actor245; -typedef Actor Actor246; -typedef Actor Actor247; -typedef Actor Actor248; -typedef Actor Actor249; -typedef Actor Actor250; -typedef Actor Actor251; -typedef Actor Actor252; -typedef Actor Actor253; -typedef Actor Actor254; +typedef Actor ZoFish; +typedef Actor ZoDodoraWpCount; +typedef Actor ZGull; +typedef Actor ZoEnergyBall; +typedef Actor ZoTroika; +typedef Actor ZoShrimp; +typedef Actor ZoObnema; +typedef Actor ZoBall; +typedef Actor ZoMine; +typedef Actor ZoBarrier; +typedef Actor ZoCraneMagnet; +typedef Actor ZoSpikeBall; +typedef Actor ZoCargoShip; +typedef Actor ZoContainer; +typedef Actor ZoRadarBuoy; +typedef Actor ZoSupplyCrane; +typedef Actor ZoSearchLight; typedef Actor Actor255; typedef Actor Actor256; typedef Actor Actor257; -typedef Actor Actor258; -typedef Actor Actor259; -typedef Actor Actor260; -typedef Actor Actor261; -typedef Actor Actor262; -typedef Actor Actor263; -typedef Actor Actor264; -typedef Actor Actor265; -typedef Actor Actor266; -typedef Actor Actor267; -typedef Actor Actor268; -typedef Actor Actor269; -typedef Actor Actor270; -typedef Actor Actor271; -typedef Actor Actor272; +typedef Actor AqPearl; +typedef Actor AqAnglerFish; +typedef Actor AqGaroa; +typedef Actor AqSculpin; +typedef Actor AqSpindlyFish; +typedef Actor AqSquid; +typedef Actor AqSeaweed; +typedef Actor AqBoulder; +typedef Actor AqCoral; +typedef Actor AqJellyfish; +typedef Actor AqFishGroup; +typedef Actor AqStoneColumn; +typedef Actor AqOyster; +typedef Actor BoShieldReactor; +typedef Actor BoLaserCannon; typedef Actor FoRadar; -typedef Actor ActorSpaceJunk; -typedef Actor Actor275; -typedef Actor Actor276; -typedef Actor Actor277; -typedef Actor Actor278; -typedef Actor Actor279; -typedef Actor Actor280; -typedef Actor Actor281; -typedef Actor Actor282; -typedef Actor Actor283; -typedef Actor Actor284; -typedef Actor Actor285; -typedef Actor Actor286; -typedef Actor Actor287; -typedef Actor Actor288; -typedef Actor Actor289; -typedef Actor Actor290; +typedef Actor SzSpaceJunk; +typedef Actor SoRock1; +typedef Actor SoRock2; +typedef Actor SoRock3; +typedef Actor SoWave; +typedef Actor SoProminence; +typedef Actor Ve1Pillar1; +typedef Actor Ve1Pillar2; +typedef Actor Ve1Pillar3; +typedef Actor Ve1Pillar4; +typedef Actor Ve1MonkeyStatue; +typedef Actor AndLaserEmitter; +typedef Actor AndBrainWaste; +typedef Actor AndExplosion; +typedef Actor AndRadio; +typedef Actor AndJamesTrigger; +typedef Actor AndBossTimer; typedef Actor ActorSupplies; -typedef Boss Granga; -typedef Boss Carrier; -typedef Boss Boss294; -typedef Boss Boss295; -typedef Boss Boss296; -typedef Boss Boss297; -typedef Boss Boss298; +typedef Boss CoGranga; +typedef Boss CoCarrier; +typedef Boss CoCarrierLeft; +typedef Boss CoCarrierUpper; +typedef Boss CoCarrierBottom; +typedef Boss MeCrusher; +typedef Boss MeCrusherShield; typedef Boss Boss299; typedef Boss Boss300; typedef Boss Boss301; -typedef Boss BossA6; -typedef Boss Spyborg; -typedef Boss Boss304; -typedef Boss Boss305; -typedef Boss Boss306; -typedef Boss BossZO; -typedef Boss BossFO; -typedef Boss Boss309; -typedef Boss Boss310; -typedef Boss Boss311; -typedef Boss BossVE2; +typedef Boss A6Gorgon; +typedef Boss SxSpyborg; +typedef Boss SxSpyborgLeftArm; +typedef Boss SxSpyborgRightArm; +typedef Boss TiGoras; +typedef Boss ZoSarumarine; +typedef Boss FoBase; +typedef Boss BoBase; +typedef Boss BoBaseShield; +typedef Boss BoBaseCore; +typedef Boss Ve2Base; typedef Boss GreatFoxSZ; -typedef Boss BossSY; -typedef Boss BossSO; -typedef Boss Saucerer; -typedef Boss Frontlinebase; -typedef Boss BossAQ; -typedef Boss Boss319; -typedef Boss Boss320; -typedef Boss Boss321; +typedef Boss SyShogun; +typedef Boss SoVulkain; +typedef Boss KaSaucerer; +typedef Boss KaFrontlineBase; +typedef Boss AqBacoon; +typedef Boss Ve1Golemech; +typedef Boss AndAndross; +typedef Boss AndBrain; typedef Item ItemLasers; typedef Item ItemCheckpoint; typedef Item ItemSilverStar; @@ -1287,7 +1287,7 @@ typedef Effect Effect348; typedef Effect Effect349; typedef Effect Effect350; typedef Effect Effect351; -typedef Effect Clouds; +typedef Effect EffectClouds; typedef Effect Effect353; typedef Effect Effect354; typedef Effect Effect355; diff --git a/include/sf64player.h b/include/sf64player.h index 72aee784..2e2fecbc 100644 --- a/include/sf64player.h +++ b/include/sf64player.h @@ -127,23 +127,23 @@ typedef struct PlayerShot { /* 0x6C */ u8 bonus; } PlayerShot; // size = 0x70 -typedef struct WingInfo { - /* 0x00 */ u8 rightState; - /* 0x01 */ u8 leftState; - /* 0x04 */ f32 unk_04; - /* 0x08 */ f32 unk_08; - /* 0x0C */ f32 unk_0C; - /* 0x10 */ f32 unk_10; - /* 0x14 */ f32 unk_14; - /* 0x18 */ f32 unk_18; - /* 0x1C */ f32 unk_1C; - /* 0x20 */ f32 unk_20; - /* 0x24 */ f32 unk_24; +typedef struct WingInfo { // ArwingInfo + /* 0x00 */ u8 rightState; // rightWingState + /* 0x01 */ u8 leftState; // leftWingState + /* 0x04 */ f32 unk_04; // upperRightFlapYrot + /* 0x08 */ f32 unk_08; // bottomRightFlapYrot + /* 0x0C */ f32 unk_0C; // upperLeftFlapYrot + /* 0x10 */ f32 unk_10; // bottomLeftFlapYrot + /* 0x14 */ f32 unk_14; // laserGunsYpos + /* 0x18 */ f32 unk_18; // laserGunsXpos + /* 0x1C */ f32 unk_1C; // wingsXrot + /* 0x20 */ f32 unk_20; // wingsYrot + /* 0x24 */ f32 unk_24; // wingsZrot /* 0x28 */ f32 unk_28; - /* 0x2C */ u8 modelId; - /* 0x30 */ f32 unk_30; - /* 0x34 */ f32 unk_34; - /* 0x38 */ f32 unk_38; + /* 0x2C */ u8 modelId; // teamFaceId + /* 0x30 */ f32 unk_30; // teamFaceXrot + /* 0x34 */ f32 unk_34; // teamFaceYrot + /* 0x38 */ f32 unk_38; // windshieldXrot } WingInfo; // size = 0x3C typedef struct PlayerSfx { diff --git a/include/sfx.h b/include/sfx.h index df789369..37394ccc 100644 --- a/include/sfx.h +++ b/include/sfx.h @@ -475,8 +475,8 @@ typedef enum SfxBankId { #define NA_SE_GOOD_LUCK 0x49002016 #define NA_SE_MESSAGE_MOVE 0x49000017 // Used for text in training mode #define NA_SE_COMMU_REQUEST 0x49002018 // C> call alert -#define NA_SE_MAP_WINDOW_OPEN 0x49000019 // Also crosshairs on -#define NA_SE_MAP_WINDOW_CLOSE 0x4900101A // Also crosshairs off +#define NA_SE_MAP_WINDOW_OPEN 0x49000019 // Also reticles on +#define NA_SE_MAP_WINDOW_CLOSE 0x4900101A // Also reticles off #define NA_SE_MAR_LOCKON 0x4900001B #define NA_SE_MISSILE_ALARM 0x4900001C #define NA_SE_CANCEL 0x4900101D @@ -493,7 +493,7 @@ typedef enum SfxBankId { #define NA_SE_BOSS_GAUGE_OPEN 0x4900C028 #define NA_SE_BANK4_UNK_1 0x40000029 // Unreferenced. Sounds like an item collect jingle #define NA_SE_COUNTDOWN 0x4900C02A -#define NA_SE_VIEW_SITCHW_ON 0x4000002B // Unreferenced. Related to D_ctx_80177C70? +#define NA_SE_VIEW_SITCHW_ON 0x4000002B // Unreferenced. Related to gFovYMode? #define NA_SE_VIEW_MOVE_IN 0x4900002C #define NA_SE_VIEW_MOVE_OUT 0x4900002D #define NA_SE_SEARCHLIGHT_MISS 0x4900402E diff --git a/include/sys.h b/include/sys.h index fa45f79f..f46da4f0 100644 --- a/include/sys.h +++ b/include/sys.h @@ -40,7 +40,7 @@ s32 vsprintf(char* dst, const char* fmt, va_list args); void Game_Initialize(void); void Game_Update(void); -extern bool gShowCrosshairs[]; +extern bool gShowReticles[]; extern bool D_game_800D2870; extern f32 gNextVsViewScale; diff --git a/include/variables.h b/include/variables.h index d31c8e28..9da23ce9 100644 --- a/include/variables.h +++ b/include/variables.h @@ -25,7 +25,7 @@ extern Actor* gTeamHelpActor; extern s32 gTeamHelpTimer; // fox_edata -extern f32 gActor241Hitbox[]; +extern f32 gZoEnergyBallHitbox[]; extern f32 gCubeHitbox100[]; extern f32 gCubeHitbox150[]; extern f32 gCubeHitbox200[]; @@ -39,8 +39,8 @@ extern f32 gMeteoWarpHitbox[]; extern f32 gItemPathChangeHitbox[]; extern f32 gItemLasersHitbox[]; extern f32 gItemBombHitbox[]; -extern f32 gActor190_191Hitbox[]; -extern f32 gActor194Hitbox[]; +extern f32 gActorMissileSeekHitbox[]; +extern f32 gMeMoraHitbox[]; extern f32 gTeamHitbox[]; extern f32 gActorAllRangeHItbox[]; extern f32 gWarpZoneEvent94Hitbox[]; diff --git a/linker_scripts/ln/rev0/symbol_addrs.txt b/linker_scripts/ln/rev0/symbol_addrs.txt new file mode 100644 index 00000000..5a0489c3 --- /dev/null +++ b/linker_scripts/ln/rev0/symbol_addrs.txt @@ -0,0 +1,8 @@ +// dma symbols +gDmaTable = 0x8017DB20; +dma_table_ROM_START = 0xE44F0; //defined:true +audio_seq_ROM_START = 0xE4A90; //defined:true +audio_bank_ROM_START = 0x11F780; //defined:true +audio_table_ROM_START = 0x13D7A0; //defined:true +ovl_ending = 0x00F02520; //defined:true +ovl_unused = 0x00F025C0; //defined:true \ No newline at end of file diff --git a/linker_scripts/us/rev1/symbol_addrs_assets.txt b/linker_scripts/us/rev1/symbol_addrs_assets.txt index f396714e..2aa0f73c 100644 --- a/linker_scripts/us/rev1/symbol_addrs_assets.txt +++ b/linker_scripts/us/rev1/symbol_addrs_assets.txt @@ -60,7 +60,7 @@ D_AQ_6002628 = 0x06002628; D_AQ_60260EC = 0x060260EC; D_AQ_60314AC = 0x060314AC; D_TI1_70067C4 = 0x70067C4; -D_TI1_7006990 = 0x7006990; +aTi1DesertCrawlerSkel = 0x7006990; D_TI1_7006F74 = 0x7006F74; D_TI1_7007130 = 0x7007130; D_TI1_7007234 = 0x7007234; @@ -89,7 +89,7 @@ D_A6_6011910 = 0x6011910; D_A6_601B2B0 = 0x601B2B0; D_A6_6018BA0 = 0x6018BA0; D_A6_6028578 = 0x6028578; -D_A6_6028454 = 0x6028454; +aA6GorgonHitbox = 0x6028454; D_TITLE_60246F8 = 0x60246F8; D_TITLE_60338DC = 0x60338DC; diff --git a/linker_scripts/us/rev1/symbol_addrs_engine.txt b/linker_scripts/us/rev1/symbol_addrs_engine.txt index d3f16df6..0122f86a 100644 --- a/linker_scripts/us/rev1/symbol_addrs_engine.txt +++ b/linker_scripts/us/rev1/symbol_addrs_engine.txt @@ -170,14 +170,14 @@ Object_SetCullDirection = 0x800597C0; Graphics_SetScaleMtx = 0x8005980C; Sprite168_Draw = 0x80059850; Object_dummy_800598DC = 0x800598DC; -Actor201_Draw = 0x800598E8; -Actor202_PostLimbDraw = 0x800599A4; -Actor202_Draw = 0x80059A24; +MeteoBall_Draw = 0x800598E8; +ActorHopBot_PostLimbDraw = 0x800599A4; +ActorHopBot_Draw = 0x80059A24; MeteoTunnel_Draw = 0x80059AEC; Scenery_DrawTitaniaBones = 0x80059B20; func_edisplay_80059BB0 = 0x80059BB0; CoIBeam_Draw = 0x80059BBC; -Actor196_Draw = 0x80059BF0; +ActorMoleMissile_Draw = 0x80059BF0; func_edisplay_80059C28 = 0x80059C28; Sprite167_Draw = 0x80059C34; FogShadow_Draw = 0x80059C40; @@ -190,12 +190,12 @@ ActorDebris_Draw = 0x8005A094; Actor_DrawEngineAndContrails = 0x8005ADAC; Actor_DrawEngineGlow = 0x8005B1E8; func_edisplay_8005B388 = 0x8005B388; -Actor180_Draw = 0x8005B6A4; -Actor182_Draw = 0x8005B71C; -Actor186_Draw = 0x8005B7CC; -Actor190_191_Draw = 0x8005B848; -Actor192_Draw = 0x8005B9A4; -Actor193_Draw = 0x8005BA30; +MeMolarRock_Draw = 0x8005B6A4; +MeMeteor2_Draw = 0x8005B71C; +MeLaserCannon1_Draw = 0x8005B7CC; +ActorMissileSeek_Draw = 0x8005B848; +ActorSkibot_Draw = 0x8005B9A4; +ActorRadar_Draw = 0x8005BA30; func_edisplay_8005BAAC = 0x8005BAAC; Object_SetShadowDL = 0x8005BAB4; ItemCheckpoint_Draw = 0x8005C5F0; @@ -234,22 +234,22 @@ TexturedLine_DrawPath = 0x80060D94; // fox_effect BonusText_Display = 0x80077240; -func_effect_8007783C = 0x8007783C; +Effect_Load = 0x8007783C; func_effect_80079618 = 0x80079618; -func_effect_8007A568 = 0x8007A568; +Effect_Effect383_Spawn = 0x8007A568; Effect_SpawnTimedSfxAtPos = 0x8007A6F0; -func_effect_8007A900 = 0x8007A900; -func_effect_8007AFD0 = 0x8007AFD0; -func_effect_8007B8F8 = 0x8007B8F8; -func_effect_8007BC7C = 0x8007BC7C; -func_effect_8007BFFC = 0x8007BFFC; -func_effect_8007C120 = 0x8007C120; +Effect_Effect359_Spawn = 0x8007A900; +Effect_Effect382_Spawn = 0x8007AFD0; +Effect_Effect364_Spawn = 0x8007B8F8; +Effect_Effect362_Spawn = 0x8007BC7C; +Effect386_Spawn1 = 0x8007BFFC; +Effect_Effect390_Spawn = 0x8007C120; func_effect_8007D0E0 = 0x8007D0E0; func_effect_8007D2C8 = 0x8007D2C8; func_effect_8007EE68 = 0x8007EE68; func_effect_800815DC = 0x800815DC; func_effect_80081A8C = 0x80081A8C; -func_effect_8008377C = 0x8008377C; +Effect_Effect391_Spawn = 0x8008377C; // fox_enmy Object_PlayerSfx = 0x80060F30; @@ -284,9 +284,9 @@ Object_CheckHitboxCollision = 0x80062DBC; Object_CheckSingleHitbox = 0x800631A8; Object_CheckPolyCollision = 0x8006326C; Object_CheckCollision = 0x8006351C; -func_enmy_80063CAC = 0x80063CAC; -func_enmy_80063D58 = 0x80063D58; -func_enmy_80063E5C = 0x80063E5C; +Actor_CoRadar_Init = 0x80063CAC; +Scenery_Corneria_Init = 0x80063D58; +Scenery_CoStoneArch_Init = 0x80063E5C; func_enmy_80063F4C = 0x80063F4C; func_enmy_80063F58 = 0x80063F58; func_enmy_80063F74 = 0x80063F74; @@ -297,13 +297,13 @@ func_enmy_8006546C = 0x8006546C; func_enmy_800654E4 = 0x800654E4; func_enmy_800655C8 = 0x800655C8; func_enmy_8006566C = 0x8006566C; -Actors190_191_Update = 0x800656D4; +ActorMissileSeek_Update = 0x800656D4; func_enmy_800660F0 = 0x800660F0; Actor_Despawn = 0x80066254; -Actor192_Update = 0x8006654C; +ActorSkibot_Update = 0x8006654C; func_enmy_8006684C = 0x8006684C; -Actor193_Update = 0x800669A0; -Actor180_Update = 0x80066A80; +ActorRadar_Update = 0x800669A0; +MeMolarRock_Update = 0x80066A80; func_enmy_80066A8C = 0x80066A8C; func_enmy_80066C00 = 0x80066C00; CoBuilding9_Update = 0x80066D5C; @@ -366,7 +366,7 @@ gGameStandby = 0x80161A39; gFovY = 0x80161A3C; gProjectNear = 0x80161A40; gProjectFar = 0x80161A44; -gShowCrosshairs = 0x800D2860; +gShowReticles = 0x800D2860; D_game_800D2870 = 0x800D2870; sVsCameraULx = 0x800D2874; sVsCameraLRx = 0x800D2884; @@ -431,14 +431,14 @@ gPlayerShots = 0x80174050; //size:0x700 gTexturedLines = 0x80174750; //size:0x12C0 gRadarMarks = 0x80175A10; //size:0xA28 gBonusText = 0x80176438; //size:0x118 -gActor194Status = 0x80176550; -gActor194xPos = 0x80176558; -gActor194yPos = 0x80176878; -gActor194zPos = 0x80176B98; -gActor194xRot = 0x80176EB8; -gActor194yRot = 0x801771D8; +gMeMoraStatus = 0x80176550; +gMeMoraXpos = 0x80176558; +gMeMoraYpos = 0x80176878; +gMeMoraZpos = 0x80176B98; +gMeMoraXrot = 0x80176EB8; +gMeMoraYrot = 0x801771D8; gSceneId = 0x801774F8; -gActor194zRot = 0x80177500; +gMeMoraZrot = 0x80177500; gSceneSetup = 0x80177820; gClearPlayerInfo = 0x80177824; gEnemyShotSpeed = 0x80177828; @@ -622,7 +622,7 @@ gBossDeathCamAtZ = 0x80178448; gCameraShakeY = 0x8017847C; gCameraShake = 0x80178480; gLoadLevelObjects = 0x80178488; -gZOSnakeWaypointCount = 0x801784A4; +gZoDodoraWaypointCount = 0x801784A4; gGroundType = 0x801784AC; gLight1xRot = 0x801784B8; gLight1yRot = 0x801784BC; diff --git a/linker_scripts/us/rev1/symbol_addrs_overlays.txt b/linker_scripts/us/rev1/symbol_addrs_overlays.txt index 1ceb0b8e..3e8124c4 100644 --- a/linker_scripts/us/rev1/symbol_addrs_overlays.txt +++ b/linker_scripts/us/rev1/symbol_addrs_overlays.txt @@ -1,14 +1,14 @@ -Corneria_Boss294_Draw = 0x8018ED78;//segment:ovl_i1 -Corneria_Boss295_Draw = 0x8018EE84;//segment:ovl_i1 -Corneria_IBeam_Init = 0x8018B0B4;//segment:ovl_i1 +Corneria_CoCarrierLeft_Draw = 0x8018ED78;//segment:ovl_i1 +Corneria_CoCarrierUpper_Draw = 0x8018EE84;//segment:ovl_i1 +Corneria_CoIBeam_Init = 0x8018B0B4;//segment:ovl_i1 Corneria_Granga_Init = 0x801878D8;//segment:ovl_i1 -Corneria_Carrier_Init = 0x8018BE7C;//segment:ovl_i1 -Venom1_8019250C = 0x8019250C;//segment:ovl_i1 -Venom1_80192CB0 = 0x80192CB0;//segment:ovl_i1 -Venom1_80192EA4 = 0x80192EA4;//segment:ovl_i1 -Venom1_801933B4 = 0x801933B4;//segment:ovl_i1 -Venom1_Boss319_Init = 0x801935CC;//segment:ovl_i1 -Venom1_Boss_Update = 0x80194398;//segment:ovl_i1 +Corneria_CoCarrier_Init = 0x8018BE7C;//segment:ovl_i1 +Venom1_Ve1Pillar1_Init = 0x8019250C;//segment:ovl_i1 +Venom1_Ve1Pillar2_3_Init = 0x80192CB0;//segment:ovl_i1 +Venom1_Ve1Pillar4_Init = 0x80192EA4;//segment:ovl_i1 +Venom1_Ve1MonkeyStatue_Init = 0x801933B4;//segment:ovl_i1 +Venom1_Ve1Golemech_Init = 0x801935CC;//segment:ovl_i1 +Venom1_Ve1Golemech_Update = 0x80194398;//segment:ovl_i1 Venom1_801920F0 = 0x801920F0;//segment:ovl_i1 D_i1_8019A04C = 0x8019A04C; // size:0xC type:s16 segment:ovl_i1 D_i1_8019B6C0 = 0x8019B6C0;//segment:ovl_i1 @@ -21,7 +21,7 @@ D_i1_8019A500 = 0x8019A500; // segment:ovl_i1 type:s16 size:0x44 D_i1_8019B838 = 0x8019B838; // segment:ovl_i1 size:0x880 Meteo_80187B08 = 0x80187B08;//segment:ovl_i2 -Meteo_Boss297_Init = 0x80188A40;//segment:ovl_i2 +Meteo_MeCrusher_Init = 0x80188A40;//segment:ovl_i2 D_i2_80195D70 = 0x80195D70;//segment:ovl_i2 D_i4_8019F168 = 0x8019F168; // type:Vec3f segment:ovl_i4 D_i4_8019F18C = 0x8019F18C; // type:f32 size:0xC segment:ovl_i4 @@ -55,25 +55,25 @@ D_menu_801AEE6C = 0x801AEE6C; // type:s32 size:0x58 force_migration:True segment D_menu_801AF25C = 0x801AF25C; // type:f32 size:0x18 force_migration:True segment:ovl_menu D_menu_801AF274 = 0x801AF274; // type:f32 size:0x18 force_migration:True segment:ovl_menu -Area6_801875E4 = 0x801875E4;//segment:ovl_i3 -Area6_80187704 = 0x80187704;//segment:ovl_i3 -Area6_BossA6_Init = 0x80187754;//segment:ovl_i3 -Area6_Boss_Update = 0x80187944;//segment:ovl_i3 +Area6_ActorMissileSeekPlayer_Spawn = 0x801875E4;//segment:ovl_i3 +Area6_Effect395_Spawn = 0x80187704;//segment:ovl_i3 +Area6_A6Gorgon_Init = 0x80187754;//segment:ovl_i3 +Area6_A6Gorgon_Update = 0x80187944;//segment:ovl_i3 Area6_8018A1B0 = 0x8018A1B0;//segment:ovl_i3 Area6_8018A2C4 = 0x8018A2C4;//segment:ovl_i3 Area6_8018A464 = 0x8018A464;//segment:ovl_i3 Area6_8018B9BC = 0x8018B9BC;//segment:ovl_i3 Area6_8018BCD4 = 0x8018BCD4;//segment:ovl_i3 Area6_8018C0D0 = 0x8018C0D0;//segment:ovl_i3 -Area6_Boss_Draw = 0x8018C54C;//segment:ovl_i3 -Zoness_SpawnDebris = 0x801900FC;//segment:ovl_i3 -Zoness_801915A4 = 0x801915A4;//segment:ovl_i3 -Zoness_80191BB8 = 0x80191BB8;//segment:ovl_i3 -Zoness_BossZo_Init = 0x801932AC;//segment:ovl_i3 -Zoness_80193908 = 0x80193908;//segment:ovl_i3 -Zoness_80193A98 = 0x80193A98;//segment:ovl_i3 +Area6_A6Gorgon_Draw = 0x8018C54C;//segment:ovl_i3 +Zoness_ActorDebris_Spawn = 0x801900FC;//segment:ovl_i3 +Zoness_ZoEnergyBall_Init = 0x801915A4;//segment:ovl_i3 +Zoness_ZoEnergyBall_Init2 = 0x80191BB8;//segment:ovl_i3 +Zoness_ZoSarumarine_Init = 0x801932AC;//segment:ovl_i3 +Zoness_Effect394_Spawn = 0x80193908;//segment:ovl_i3 +Zoness_Effect394_Spawn2 = 0x80193A98;//segment:ovl_i3 Zoness_80193CC8 = 0x80193CC8;//segment:ovl_i3 -Zoness_Boss_Update = 0x80194A84;//segment:ovl_i3 +Zoness_ZoSarumarine_Update = 0x80194A84;//segment:ovl_i3 Zoness_801986FC = 0x801986FC;//segment:ovl_i3 Zoness_801989FC = 0x801989FC;//segment:ovl_i3 Zoness_80198BE8 = 0x80198BE8;//segment:ovl_i3 @@ -85,31 +85,31 @@ Zoness_801991D0 = 0x801991D0;//segment:ovl_i3 Zoness_80199394 = 0x80199394;//segment:ovl_i3 Zoness_80199470 = 0x80199470;//segment:ovl_i3 Zoness_8019962C = 0x8019962C;//segment:ovl_i3 -Zoness_8019B1F0 = 0x8019B1F0;//segment:ovl_i3 -Zoness_8019B810 = 0x8019B810;//segment:ovl_i3 -Zoness_8019C200 = 0x8019C200;//segment:ovl_i3 -Zoness_Actor247_Init = 0x8019D060;//segment:ovl_i3 +Zoness_ZoCargoShip_Init = 0x8019B1F0;//segment:ovl_i3 +Zoness_ZoContainer_Init = 0x8019B810;//segment:ovl_i3 +Zoness_ZoSupplyCrane_Init = 0x8019C200;//segment:ovl_i3 +Zoness_ZoBarrier_Init = 0x8019D060;//segment:ovl_i3 Solar_LevelComplete = 0x801A7930;//segment:ovl_i3 Aquas_SpawnDebris = 0x801A9448;//segment:ovl_i3 -Aquas_801A94EC = 0x801A94EC;//segment:ovl_i3 +Aquas_SpawnItem = 0x801A94EC;//segment:ovl_i3 Aquas_801A958C = 0x801A958C;//segment:ovl_i3 -Aquas_801AC8A8 = 0x801AC8A8;//segment:ovl_i3 -Aquas_801AD688 = 0x801AD688;//segment:ovl_i3 -Aquas_801AE3AC = 0x801AE3AC;//segment:ovl_i3 -Aquas_801AF9FC = 0x801AF9FC;//segment:ovl_i3 +Aquas_Effect366_Spawn = 0x801AC8A8;//segment:ovl_i3 +Aquas_Actor255_Init = 0x801AD688;//segment:ovl_i3 +Aquas_Actor256_Init = 0x801AE3AC;//segment:ovl_i3 +Aquas_Actor257_Init = 0x801AF9FC;//segment:ovl_i3 Aquas_Actor257_Update = 0x801AFA5C;//segment:ovl_i3 Aquas_801B0F88 = 0x801B0F88;//segment:ovl_i3 Aquas_801B0FCC = 0x801B0FCC;//segment:ovl_i3 Aquas_801B1008 = 0x801B1008;//segment:ovl_i3 -Aquas_BossAq_Init = 0x801B10F8;//segment:ovl_i3 -Aquas_Boss_Update = 0x801B134C;//segment:ovl_i3 -Aquas_801B6344 = 0x801B6344;//segment:ovl_i3 -Aquas_Actor259_Update = 0x801B638C;//segment:ovl_i3 -Aquas_801B6E54 = 0x801B6E54;//segment:ovl_i3 -Aquas_Actor262_Update = 0x801B6FF8;//segment:ovl_i3 -Aquas_801B7AF0 = 0x801B7AF0;//segment:ovl_i3 -Aquas_801BA57C = 0x801BA57C;//segment:ovl_i3 -Aquas_801BB26C = 0x801BB26C;//segment:ovl_i3 +Aquas_AqBacoon_Init = 0x801B10F8;//segment:ovl_i3 +Aquas_AqBacoon_Update = 0x801B134C;//segment:ovl_i3 +Aquas_AqAnglerFish_Init = 0x801B6344;//segment:ovl_i3 +Aquas_AqAnglerFish_Update = 0x801B638C;//segment:ovl_i3 +Aquas_AqSpindlyFish_Init = 0x801B6E54;//segment:ovl_i3 +Aquas_AqSpindlyFish_Update = 0x801B6FF8;//segment:ovl_i3 +Aquas_AqGaroa_Init = 0x801B7AF0;//segment:ovl_i3 +Venom1_AqBoulder_Init = 0x801BA57C;//segment:ovl_i3 +Venom1_AqJellyfish_Init = 0x801BB26C;//segment:ovl_i3 D_i3_801C2240 = 0x801C2240;//segment:ovl_i3 D_AQ_801C4188 = 0x801C4188;//segment:ovl_i3 D_i3_801C2250 = 0x801C2250;//size:0xA0 segment:ovl_i3 @@ -141,7 +141,7 @@ D_i3_801C27C8 = 0x801C27C8; //segment:ovl_i3 size:0x12C0 D_i3_801C3A88 = 0x801C3A88; //segment:ovl_i3 size:0x700 D_i3_801C4190 = 0x801C4190; //segment:ovl_i3 size:0x28 D_i3_801C41B8 = 0x801C41B8; //segment:ovl_i3 size:0x78 -sBossAQlimbTimers = 0x801C4230; //segment:ovl_i3 size:0x70 +sAqBacoonlimbTimers = 0x801C4230; //segment:ovl_i3 size:0x70 D_i3_801C42A0 = 0x801C42A0; //segment:ovl_i3 size:0x68 D_i3_801C4308 = 0x801C4308; //segment:ovl_i3 size:0x148 D_i3_801C0060 = 0x801C0060; //segment:ovl_i3 type:f32 @@ -155,7 +155,7 @@ D_i3_801C2768 = 0x801C2768; //segment:ovl_i3 size:0x38 D_i3_801C27A0 = 0x801C27A0; //segment:ovl_i3 size:0x20 Katina_UpdateEvents = 0x80198594;//segment:ovl_i4 -Katina_BossSetup = 0x80193CA4;//segment:ovl_i4 +Katina_KaSaucerer_Init = 0x80193CA4;//segment:ovl_i4 SectorZ_Missile_Update = 0x80199C60;//segment:ovl_i4 SectorZ_MissileExplode = 0x80199900;//segment:ovl_i4 D_i4_801A03C0 = 0x801A03C0;//segment:ovl_i4 @@ -165,29 +165,29 @@ D_BO_801A03DC = 0x801A03DC;//segment:ovl_i4 Macbeth_801A55D4 = 0x801A55D4;//segment:ovl_i5 Titania_8018E3B0 = 0x8018E3B0;//segment:ovl_i5 -Titania_8018B720 = 0x8018B720;//segment:ovl_i5 +Titania_TiRasco_Dying = 0x8018B720;//segment:ovl_i5 Titania_801990DC = 0x801990DC;//segment:ovl_i5 Ground_801B6AEC = 0x801B6AEC;//segment:ovl_i5 -Titania_80189B80 = 0x80189B80;//segment:ovl_i5 -Titania_8018ADC4 = 0x8018ADC4;//segment:ovl_i5 -Titania_Actor231_Init = 0x8018B96C;//segment:ovl_i5 -Titania_8018BFB0 = 0x8018BFB0;//segment:ovl_i5 -Titania_8018E3CC = 0x8018E3CC;//segment:ovl_i5 -Titania_8018E5E8 = 0x8018E5E8;//segment:ovl_i5 -Titania_8018EFF0 = 0x8018EFF0;//segment:ovl_i5 -Titania_8018F0D8 = 0x8018F0D8;//segment:ovl_i5 -Titania_Boss306_Init = 0x8018FA48;//segment:ovl_i5 -Macbeth_80199F8C = 0x80199F8C;//segment:ovl_i5 +Titania_TiFekuda_Init = 0x80189B80;//segment:ovl_i5 +Titania_TiRasco_Init = 0x8018ADC4;//segment:ovl_i5 +Titania_TiBomb_Init = 0x8018B96C;//segment:ovl_i5 +Titania_TiDesertCrawler_Init = 0x8018BFB0;//segment:ovl_i5 +Titania_TiDelphor_Init = 0x8018E3CC;//segment:ovl_i5 +Titania_TiDelphorHead_Init = 0x8018E5E8;//segment:ovl_i5 +Titania_TiCactus_Init = 0x8018EFF0;//segment:ovl_i5 +Titania_TiPillar_Init = 0x8018F0D8;//segment:ovl_i5 +Titania_TiGoras_Init = 0x8018FA48;//segment:ovl_i5 +Macbeth_Train_Init = 0x80199F8C;//segment:ovl_i5 Titania_80193B30 = 0x80193B30;//segment:ovl_i5 Titania_80193DF0 = 0x80193DF0;//segment:ovl_i5 Titania_80190A08 = 0x80190A08;//segment:ovl_i5 -Macbeth_801A3E70 = 0x801A3E70;//segment:ovl_i5 -Macbeth_801A4660 = 0x801A4660;//segment:ovl_i5 -Macbeth_801A4AF8 = 0x801A4AF8;//segment:ovl_i5 -Macbeth_801A5E2C = 0x801A5E2C;//segment:ovl_i5 -Macbeth_801A6134 = 0x801A6134;//segment:ovl_i5 -Macbeth_801A65E0 = 0x801A65E0;//segment:ovl_i5 -Macbeth_801A7D98 = 0x801A7D98;//segment:ovl_i5 +Macbeth_MaMaRailroadSwitch_Init = 0x801A3E70;//segment:ovl_i5 +Macbeth_MaBoulder_Init = 0x801A4660;//segment:ovl_i5 +Macbeth_MaRailwaySignal_Init = 0x801A4AF8;//segment:ovl_i5 +Macbeth_LockBars_Init = 0x801A5E2C;//segment:ovl_i5 +Macbeth_MaBarrier_Init = 0x801A6134;//segment:ovl_i5 +Macbeth_MaProximityLight_Init = 0x801A65E0;//segment:ovl_i5 +Macbeth_Actor207_Init = 0x801A7D98;//segment:ovl_i5 Ground_801B6E20 = 0x801B6E20;//segment:ovl_i5 D_i5_801B74F0 = 0x801B74F0;//segment:ovl_i5 size:28 D_TI_801B7584 = 0x801B7584;//segment:ovl_i5 @@ -197,7 +197,7 @@ D_MA_801BA1E8 = 0x801BA1E8;//segment:ovl_i5 D_MA_801BE250 = 0x801BE250;//segment:ovl_i5 size:0x20 D_MA_801BE2F0 = 0x801BE2F0;//segment:ovl_i5 size:0x12 D_i5_801B8198 = 0x801B8198;//size:0x210 segment:ovl_i5 -D_TI_801B83A8 = 0x801B83A8;//size:0x814 type:f32 segment:ovl_i5 +aTiGorasHitbox = 0x801B83A8;//size:0x814 type:f32 segment:ovl_i5 D_i5_801BA708 = 0x801BA708;//size:0xC type:Vec3f segment:ovl_i5 D_i5_801BAA50 = 0x801BAA50;//size:0x28 type:s16 segment:ovl_i5 D_i5_801BBEE0 = 0x801BBEE0;//segment:ovl_i5 @@ -211,8 +211,8 @@ D_i5_801B814C = 0x801B814C;//size:0x14 segment:ovl_i5 D_i5_801B7630 = 0x801B7630;//size:0x24 segment:ovl_i5 Andross_801888F4 = 0x801888F4; //segment:ovl_i6 -SectorY_Boss314_Init = 0x80197CC4; //segment:ovl_i6 -Andross_Boss320_Init = 0x8018D16C; //segment:ovl_i6 +SectorY_SyShogun_Init = 0x80197CC4; //segment:ovl_i6 +Andross_AndAndross_Init = 0x8018D16C; //segment:ovl_i6 sTeamInitPos = 0x801A68B0;//size:0x48 type:Vec3f segment:ovl_i6 sTeamInitRot = 0x801A68F8;//size:0xC type:f32 segment:ovl_i6 D_i6_801A7F30 = 0x801A7F30; //segment:ovl_i6 diff --git a/src/audio/audio_general.c b/src/audio/audio_general.c index bdf01981..6bf0178c 100644 --- a/src/audio/audio_general.c +++ b/src/audio/audio_general.c @@ -203,106 +203,37 @@ PlaylistCmd sPlaylists[][100] = { { 255, 0, NA_BGM_STAGE_CO, 50, 255, 50 }, }, { - { 0, 0, NA_BGM_START_DEMO, 0, 255, 1620 }, - { 0, 0, NA_BGM_STAGE_CO, 0, 255, 2490 }, - { 1, 0, NA_BGM_STAGE_CO, 50, 255, 50 }, - { 0, 0, NA_BGM_BOSS_A_CARRIER, 0, 255, 1620 }, - { 1, 0, NA_BGM_BOSS_A_CARRIER, 1, 255, 50 }, - { 0, 0, NA_BGM_COURSE_CLEAR, 0, 255, 1091 }, - { 1, 0, NA_BGM_COURSE_CLEAR, 100, 255, 100 }, - { 0, 0, NA_BGM_START_DEMO_S, 0, 255, 242 }, - { 0, 0, NA_BGM_STAGE_SY, 0, 255, 2096 }, - { 1, 0, NA_BGM_STAGE_SY, 50, 255, 50 }, - { 0, 0, NA_BGM_BOSS_SY, 0, 2, 1600 }, - { 1, 0, NA_BGM_BOSS_SY, 1, 255, 50 }, - { 0, 0, NA_BGM_REAL_BOSS, 0, 255, 1600 }, - { 1, 0, NA_BGM_REAL_BOSS, 1, 255, 50 }, - { 0, 0, NA_BGM_COURSE_CLEAR, 0, 255, 1091 }, - { 1, 0, NA_BGM_COURSE_CLEAR, 100, 255, 100 }, - { 0, 0, NA_BGM_KA_START_DEMO, 0, 255, 241 }, - { 0, 0, NA_BGM_STAGE_KA, 0, 255, 2184 }, - { 1, 0, NA_BGM_STAGE_KA, 1, 255, 100 }, - { 0, 0, NA_BGM_BOSS_KA, 0, 1, 1115 }, - { 1, 0, NA_BGM_BOSS_KA, 50, 255, 100 }, - { 0, 0, NA_BGM_COURSE_CLEAR, 0, 255, 1091 }, - { 1, 0, NA_BGM_COURSE_CLEAR, 100, 255, 100 }, - { 0, 0, NA_BGM_SO_START_DEMO, 0, 255, 250 }, - { 0, 0, NA_BGM_STAGE_SO, 0, 255, 1096 }, - { 3, 0, NA_BGM_BILL, 0, 255, 1000 }, - { 1, 0, NA_BGM_STAGE_SO, 50, 255, 50 }, - { 0, 0, NA_BGM_BOSS_SO, 0, 255, 1600 }, - { 1, 0, NA_BGM_BOSS_SO, 1, 255, 50 }, - { 0, 0, NA_BGM_COURSE_CLEAR, 0, 255, 1091 }, - { 1, 0, NA_BGM_COURSE_CLEAR, 100, 255, 100 }, - { 0, 0, NA_BGM_START_DEMO_S, 0, 255, 260 }, - { 0, 0, NA_BGM_STAGE_MA, 0, 255, 1920 }, - { 1, 0, NA_BGM_STAGE_MA, 50, 255, 50 }, - { 0, 0, NA_BGM_BOSS_MA, 0, 255, 1600 }, - { 1, 0, NA_BGM_BOSS_MA, 1, 255, 50 }, - { 0, 0, NA_BGM_COURSE_CLEAR, 0, 255, 1091 }, - { 1, 0, NA_BGM_COURSE_CLEAR, 100, 255, 100 }, - { 0, 0, NA_BGM_BO_START_DEMO, 0, 255, 241 }, - { 0, 0, NA_BGM_STAGE_BO, 0, 255, 1177 }, - { 1, 0, NA_BGM_STAGE_BO, 100, 255, 100 }, - { 0, 0, NA_BGM_BOSS_BO, 0, 255, 1115 }, - { 1, 0, NA_BGM_BOSS_BO, 50, 255, 50 }, - { 0, 0, NA_BGM_STARWOLF, 0, 255, 2120 }, - { 1, 0, NA_BGM_STARWOLF, 1, 255, 50 }, - { 0, 0, NA_BGM_COURSE_CLEAR, 0, 255, 1091 }, - { 1, 0, NA_BGM_COURSE_CLEAR, 100, 255, 100 }, - { 0, 0, NA_BGM_STAGE_VE1, 0, 255, 1671 }, - { 1, 0, NA_BGM_STAGE_VE1, 50, 255, 50 }, - { 0, 0, NA_BGM_BOSS_VE, 0, 255, 1600 }, - { 1, 0, NA_BGM_BOSS_VE, 1, 255, 50 }, - { 0, 0, NA_BGM_DASH_INTO_BASE, 0, 0, 176 }, - { 0, 0, NA_BGM_STAGE_ANDROSS, 0, 255, 588 }, - { 0, 0, NA_BGM_BOSS_ANDROSS, 0, 0, 2420 }, - { 1, 0, NA_BGM_BOSS_ANDROSS, 10, 255, 50 }, - { 0, 0, NA_BGM_BOSS_ANDROSS, 0, 255, 1200 }, - { 1, 0, NA_BGM_BOSS_ANDROSS, 1, 255, 150 }, - { 0, 0, NA_BGM_ALL_CLEAR, 0, 255, 1091 }, - { 1, 0, NA_BGM_ALL_CLEAR, 80, 255, 160 }, - { 0, 0, NA_BGM_STAFF_ROLL, 0, 255, 9500 }, + { 0, 0, NA_BGM_START_DEMO, 0, 255, 1620 }, { 0, 0, NA_BGM_STAGE_CO, 0, 255, 2490 }, + { 1, 0, NA_BGM_STAGE_CO, 50, 255, 50 }, { 0, 0, NA_BGM_BOSS_A_CARRIER, 0, 255, 1620 }, + { 1, 0, NA_BGM_BOSS_A_CARRIER, 1, 255, 50 }, { 0, 0, NA_BGM_COURSE_CLEAR, 0, 255, 1091 }, + { 1, 0, NA_BGM_COURSE_CLEAR, 100, 255, 100 }, { 0, 0, NA_BGM_START_DEMO_S, 0, 255, 242 }, + { 0, 0, NA_BGM_STAGE_SY, 0, 255, 2096 }, { 1, 0, NA_BGM_STAGE_SY, 50, 255, 50 }, + { 0, 0, NA_BGM_BOSS_SY, 0, 2, 1600 }, { 1, 0, NA_BGM_BOSS_SY, 1, 255, 50 }, + { 0, 0, NA_BGM_REAL_BOSS, 0, 255, 1600 }, { 1, 0, NA_BGM_REAL_BOSS, 1, 255, 50 }, + { 0, 0, NA_BGM_COURSE_CLEAR, 0, 255, 1091 }, { 1, 0, NA_BGM_COURSE_CLEAR, 100, 255, 100 }, + { 0, 0, NA_BGM_KA_START_DEMO, 0, 255, 241 }, { 0, 0, NA_BGM_STAGE_KA, 0, 255, 2184 }, + { 1, 0, NA_BGM_STAGE_KA, 1, 255, 100 }, { 0, 0, NA_BGM_BOSS_KA, 0, 1, 1115 }, + { 1, 0, NA_BGM_BOSS_KA, 50, 255, 100 }, { 0, 0, NA_BGM_COURSE_CLEAR, 0, 255, 1091 }, + { 1, 0, NA_BGM_COURSE_CLEAR, 100, 255, 100 }, { 0, 0, NA_BGM_SO_START_DEMO, 0, 255, 250 }, + { 0, 0, NA_BGM_STAGE_SO, 0, 255, 1096 }, { 3, 0, NA_BGM_BILL, 0, 255, 1000 }, + { 1, 0, NA_BGM_STAGE_SO, 50, 255, 50 }, { 0, 0, NA_BGM_BOSS_SO, 0, 255, 1600 }, + { 1, 0, NA_BGM_BOSS_SO, 1, 255, 50 }, { 0, 0, NA_BGM_COURSE_CLEAR, 0, 255, 1091 }, + { 1, 0, NA_BGM_COURSE_CLEAR, 100, 255, 100 }, { 0, 0, NA_BGM_START_DEMO_S, 0, 255, 260 }, + { 0, 0, NA_BGM_STAGE_MA, 0, 255, 1920 }, { 1, 0, NA_BGM_STAGE_MA, 50, 255, 50 }, + { 0, 0, NA_BGM_BOSS_MA, 0, 255, 1600 }, { 1, 0, NA_BGM_BOSS_MA, 1, 255, 50 }, + { 0, 0, NA_BGM_COURSE_CLEAR, 0, 255, 1091 }, { 1, 0, NA_BGM_COURSE_CLEAR, 100, 255, 100 }, + { 0, 0, NA_BGM_BO_START_DEMO, 0, 255, 241 }, { 0, 0, NA_BGM_STAGE_BO, 0, 255, 1177 }, + { 1, 0, NA_BGM_STAGE_BO, 100, 255, 100 }, { 0, 0, NA_BGM_BOSS_BO, 0, 255, 1115 }, + { 1, 0, NA_BGM_BOSS_BO, 50, 255, 50 }, { 0, 0, NA_BGM_STARWOLF, 0, 255, 2120 }, + { 1, 0, NA_BGM_STARWOLF, 1, 255, 50 }, { 0, 0, NA_BGM_COURSE_CLEAR, 0, 255, 1091 }, + { 1, 0, NA_BGM_COURSE_CLEAR, 100, 255, 100 }, { 0, 0, NA_BGM_STAGE_VE1, 0, 255, 1671 }, + { 1, 0, NA_BGM_STAGE_VE1, 50, 255, 50 }, { 0, 0, NA_BGM_BOSS_VE, 0, 255, 1600 }, + { 1, 0, NA_BGM_BOSS_VE, 1, 255, 50 }, { 0, 0, NA_BGM_DASH_INTO_BASE, 0, 0, 176 }, + { 0, 0, NA_BGM_STAGE_ANDROSS, 0, 255, 588 }, { 0, 0, NA_BGM_BOSS_ANDROSS, 0, 0, 2420 }, + { 1, 0, NA_BGM_BOSS_ANDROSS, 10, 255, 50 }, { 0, 0, NA_BGM_BOSS_ANDROSS, 0, 255, 1200 }, + { 1, 0, NA_BGM_BOSS_ANDROSS, 1, 255, 150 }, { 0, 0, NA_BGM_ALL_CLEAR, 0, 255, 1091 }, + { 1, 0, NA_BGM_ALL_CLEAR, 80, 255, 160 }, { 0, 0, NA_BGM_STAFF_ROLL, 0, 255, 9500 }, { 255, 0, NA_BGM_STAGE_CO, 50, 255, 50 }, - { 0 }, - { 0 }, - { 0 }, - { 0 }, - { 0 }, - { 0 }, - { 0 }, - { 0 }, - { 0 }, - { 0 }, - { 0 }, - { 0 }, - { 0 }, - { 0 }, - { 0 }, - { 0 }, - { 0 }, - { 0 }, - { 0 }, - { 0 }, - { 0 }, - { 0 }, - { 0 }, - { 0 }, - { 0 }, - { 0 }, - { 0 }, - { 0 }, - { 0 }, - { 0 }, - { 0 }, - { 0 }, - { 0 }, - { 0 }, - { 0 }, - { 0 }, - { 0 }, - { 0 }, - { 0 }, }, { { 0, 0, NA_BGM_START_DEMO, 0, 255, 1620 }, { 0, 0, NA_BGM_STAGE_CO, 0, 255, 2490 }, diff --git a/src/audio/audio_heap.c b/src/audio/audio_heap.c index ab2a6127..f19b6b21 100644 --- a/src/audio/audio_heap.c +++ b/src/audio/audio_heap.c @@ -915,7 +915,7 @@ void AudioHeap_DiscardSampleCacheEntry(SampleCacheEntry* entry) { s32 sampleBankId2; s32 sampleBankId1; - numFonts = gSoundFontTable->numEntries; + numFonts = gSoundFontTable->base.numEntries; for (fondId = 0; fondId < numFonts; fondId++) { sampleBankId1 = gSoundFontList[fondId].sampleBankId1; sampleBankId2 = gSoundFontList[fondId].sampleBankId2; @@ -974,7 +974,7 @@ SampleCacheEntry* AudioHeap_AllocPersistentSampleCacheEntry(u32 size) { void AudioHeap_DiscardSampleCaches(void) { s32 fontId; s32 i; - s32 numFonts = gSoundFontTable->numEntries; + s32 numFonts = gSoundFontTable->base.numEntries; s32 pad; s32 sampleBankId2; s32 sampleBankId1; diff --git a/src/audio/audio_load.c b/src/audio/audio_load.c index 486e3deb..641e2fbb 100644 --- a/src/audio/audio_load.c +++ b/src/audio/audio_load.c @@ -50,6 +50,7 @@ void AudioLoad_DecreaseSampleDmaTtls(void) { } } } + for (i = gSampleDmaListSize1; i < gSampleDmaCount; i++) { dma = &gSampleDmas[i]; if (dma->ttl != 0) { @@ -91,6 +92,7 @@ void* AudioLoad_DmaSampleData(u32 devAddr, u32 size, u32 arg2, u8* dmaIndexRef, return &dma->ramAddr[devAddr - dma->devAddr]; } } + if ((gSampleDmaReuseQueue2RdPos != gSampleDmaReuseQueue2WrPos) && (arg2 != 0)) { sp38 = gSampleDmaReuseQueue2[gSampleDmaReuseQueue2RdPos]; gSampleDmaReuseQueue2RdPos++; @@ -156,6 +158,7 @@ void AudioLoad_InitSampleDmaBuffers(s32 numNotes) { u8* dma; gSampleDmaBuffSize = 0x2D0; + for (i = 0; i < (3 * gNumNotes * gAudioBufferParams.count); i++) { dma = AudioHeap_Alloc(&gMiscPool, gSampleDmaBuffSize); gSampleDmas[gSampleDmaCount].ramAddr = dma; @@ -169,17 +172,21 @@ void AudioLoad_InitSampleDmaBuffers(s32 numNotes) { gSampleDmas[gSampleDmaCount].size = gSampleDmaBuffSize; gSampleDmaCount++; } + for (i = 0; i < gSampleDmaCount; i++) { gSampleDmaReuseQueue1[i] = i; gSampleDmas[i].reuseIndex = i; } + for (i = gSampleDmaCount; i < 0x100; i++) { gSampleDmaReuseQueue1[i] = 0; } + gSampleDmaReuseQueue1RdPos = 0; gSampleDmaReuseQueue1WrPos = gSampleDmaCount; gSampleDmaListSize1 = gSampleDmaCount; gSampleDmaBuffSize = 0x200; + for (i = 0; i < gNumNotes; i++) { dma = AudioHeap_Alloc(&gMiscPool, gSampleDmaBuffSize); gSampleDmas[gSampleDmaCount].ramAddr = dma; @@ -193,13 +200,16 @@ void AudioLoad_InitSampleDmaBuffers(s32 numNotes) { gSampleDmas[gSampleDmaCount].size = gSampleDmaBuffSize; gSampleDmaCount++; } + for (i = gSampleDmaListSize1; i < gSampleDmaCount; i++) { gSampleDmaReuseQueue2[i - gSampleDmaListSize1] = i; gSampleDmas[i].reuseIndex = i - gSampleDmaListSize1; } + for (i = gSampleDmaCount; i < 0x100; i++) { gSampleDmaReuseQueue2[i] = gSampleDmaListSize1; } + gSampleDmaReuseQueue2RdPos = 0; gSampleDmaReuseQueue2WrPos = gSampleDmaCount - gSampleDmaListSize1; } @@ -207,12 +217,12 @@ void AudioLoad_InitSampleDmaBuffers(s32 numNotes) { void AudioLoad_InitTable(AudioTable* table, u8* romAddr, u16 unkMediumParam) { s32 i; - table->unkMediumParam = unkMediumParam; - table->romAddr = romAddr; + table->base.unkMediumParam = unkMediumParam; + table->base.romAddr = (uintptr_t) romAddr; - for (i = 0; i < table->numEntries; i++) { + for (i = 0; i < table->base.numEntries; i++) { if ((table->entries[i].size != 0) && (table->entries[i].medium == MEDIUM_CART)) { - table->entries[i].romAddr += (u32) romAddr; + table->entries[i].romAddr += (uintptr_t) romAddr; } } } @@ -227,7 +237,9 @@ void* AudioLoad_SyncLoadSeqFonts(s32 seqId, u32* outFontId) { fontId = gSeqFontTable[index++]; soundFontData = AudioLoad_SyncLoadFont(fontId); } + *outFontId = fontId; + return soundFontData; } @@ -253,7 +265,8 @@ s32 AudioLoad_SyncLoadSample(Sample* sample, s32 fontId) { return -1; } if (sample->medium == MEDIUM_UNK) { - AudioLoad_SyncDmaUnkMedium(sample->sampleAddr, sampleAddr, sample->size, gSampleBankTable->unkMediumParam); + AudioLoad_SyncDmaUnkMedium(sample->sampleAddr, sampleAddr, sample->size, + gSampleBankTable->base.unkMediumParam); } else { AudioLoad_SyncDma(sample->sampleAddr, sampleAddr, sample->size, sample->medium); } @@ -296,7 +309,7 @@ void AudioLoad_AsyncLoadSampleBank(s32 sampleBankId, s32 nChunks, s32 retData, O } void AudioLoad_AsyncLoadSeq(s32 seqId, s32 nChunks, s32 retData, OSMesgQueue* retQueue) { - s32 index = ((u16*) gSeqFontTable)[AudioLoad_GetLoadTableIndex(SEQUENCE_TABLE, seqId)]; + s32 index = *((u16*) gSeqFontTable + AudioLoad_GetLoadTableIndex(SEQUENCE_TABLE, seqId)); s32 fontsLeft = gSeqFontTable[index++]; for (fontsLeft; fontsLeft > 0; fontsLeft--) { @@ -306,17 +319,18 @@ void AudioLoad_AsyncLoadSeq(s32 seqId, s32 nChunks, s32 retData, OSMesgQueue* re } u8* AudioLoad_GetFontsForSequence(s32 seqId, u32* outNumFonts) { - s32 index = ((u16*) gSeqFontTable)[AudioLoad_GetLoadTableIndex(SEQUENCE_TABLE, seqId)]; + s32 index = *((u16*) gSeqFontTable + AudioLoad_GetLoadTableIndex(SEQUENCE_TABLE, seqId)); *outNumFonts = gSeqFontTable[index++]; if (*outNumFonts == 0) { return NULL; + } else { + return &gSeqFontTable[index]; } - return &gSeqFontTable[index]; } void AudioLoad_DiscardSeqFonts(s32 seqId) { - s32 index = ((u16*) gSeqFontTable)[AudioLoad_GetLoadTableIndex(SEQUENCE_TABLE, seqId)]; + s32 index = *((u16*) gSeqFontTable + AudioLoad_GetLoadTableIndex(SEQUENCE_TABLE, seqId)); s32 numFonts = gSeqFontTable[index++]; u32 fontId; @@ -326,8 +340,8 @@ void AudioLoad_DiscardSeqFonts(s32 seqId) { if (AudioHeap_SearchPermanentCache(1, fontId) == NULL) { AudioLoad_DiscardFont(fontId); if (gFontLoadStatus[fontId] != 5) { - if (1) {} gFontLoadStatus[fontId] = 0; + if (1) {} } } } @@ -345,6 +359,7 @@ s32 AudioLoad_DiscardFont(s32 fontId) { } else if (tcache->entries[1].id == fontId) { tcache->entries[1].id = -1; } + pcache = &cache->persistent; for (i = 0; i < pcache->numEntries; i++) { if (pcache->entries[i].id == fontId) { @@ -366,16 +381,22 @@ void AudioLoad_SyncInitSeqPlayerInternal(s32 playerIdx, s32 seqId, s32 arg2) { s32 i; seqId = AudioLoad_GetLoadTableIndex(SEQUENCE_TABLE, seqId); + func_800144E4(&gSeqPlayers[playerIdx]); - index = ((u16*) gSeqFontTable)[seqId]; + + index = *((u16*) gSeqFontTable + seqId); numFonts = gSeqFontTable[index++]; fontId = 0xFF; + for (numFonts; numFonts > 0; numFonts--) { fontId = gSeqFontTable[index++]; AudioLoad_SyncLoadFont(fontId); } + seqData = AudioLoad_SyncLoadSeq(seqId); + func_80016804(playerIdx); + gSeqPlayers[playerIdx].seqId = seqId; gSeqPlayers[playerIdx].defaultFont = fontId; gSeqPlayers[playerIdx].enabled = true; @@ -384,6 +405,7 @@ void AudioLoad_SyncInitSeqPlayerInternal(s32 playerIdx, s32 seqId, s32 arg2) { gSeqPlayers[playerIdx].scriptState.depth = 0; gSeqPlayers[playerIdx].delay = 0; gSeqPlayers[playerIdx].finished = false; + for (i = 0; i < 16; i++) { ; } @@ -411,17 +433,21 @@ void* AudioLoad_SyncLoadSampleBank(u32 sampleBankId, s32* outMedium) { *outMedium = MEDIUM_RAM; return ramAddr; } + cachePolicy = sampleBankTable->entries[sampleBankId].cachePolicy; if (cachePolicy == CACHEPOLICY_4) { *outMedium = sampleBankTable->entries[sampleBankId].medium; return sampleBankTable->entries[sampleBankId].romAddr; } + ramAddr = AudioLoad_SyncLoad(2, sampleBankId, &noLoad); if (ramAddr != NULL) { *outMedium = MEDIUM_RAM; return ramAddr; } + *outMedium = sampleBankTable->entries[sampleBankId].medium; + return sampleBankTable->entries[sampleBankId].romAddr; } @@ -433,25 +459,30 @@ void* AudioLoad_SyncLoadFont(s32 fontId) { SampleBankRelocInfo relocInfo; fontId = AudioLoad_GetLoadTableIndex(FONT_TABLE, fontId); + sampleBankId1 = gSoundFontList[fontId].sampleBankId1; sampleBankId2 = gSoundFontList[fontId].sampleBankId2; relocInfo.sampleBankId1 = sampleBankId1; relocInfo.sampleBankId2 = sampleBankId2; + if (sampleBankId1 != SAMPLES_NONE) { relocInfo.baseAddr1 = AudioLoad_SyncLoadSampleBank(sampleBankId1, &relocInfo.medium1); } else { relocInfo.baseAddr1 = NULL; } + if (sampleBankId2 != SAMPLES_NONE) { relocInfo.baseAddr2 = AudioLoad_SyncLoadSampleBank(sampleBankId2, &relocInfo.medium2); } else { relocInfo.baseAddr2 = NULL; } + fontData = AudioLoad_SyncLoad(1, fontId, &didAllocate); if (fontData == NULL) { return NULL; } + if (didAllocate == 1) { AudioLoad_RelocateFontAndPreloadSamples(fontId, fontData, &relocInfo, AUDIOLOAD_SYNC); } @@ -479,6 +510,7 @@ void* AudioLoad_SyncLoad(u32 tableType, u32 id, s32* didAllocate) { medium = table->entries[id].medium; cachePolicy = table->entries[id].cachePolicy; romAddr = table->entries[id].romAddr; + switch (cachePolicy) { case CACHEPOLICY_0: ramAddr = AudioHeap_AllocPermanent(tableType, id, size); @@ -486,18 +518,21 @@ void* AudioLoad_SyncLoad(u32 tableType, u32 id, s32* didAllocate) { return ramAddr; } break; + case CACHEPOLICY_1: ramAddr = AudioHeap_AllocCached(tableType, size, CACHE_PERSISTENT, id); if (ramAddr == NULL) { return ramAddr; } break; + case CACHEPOLICY_2: ramAddr = AudioHeap_AllocCached(tableType, size, CACHE_TEMPORARY, id); if (ramAddr == NULL) { return ramAddr; } break; + case CACHEPOLICY_3: case CACHEPOLICY_4: ramAddr = AudioHeap_AllocCached(tableType, size, CACHE_EITHER, id); @@ -508,24 +543,28 @@ void* AudioLoad_SyncLoad(u32 tableType, u32 id, s32* didAllocate) { } *didAllocate = true; + if (medium == MEDIUM_UNK) { - AudioLoad_SyncDmaUnkMedium(romAddr, ramAddr, size, table->unkMediumParam); + AudioLoad_SyncDmaUnkMedium(romAddr, ramAddr, size, table->base.unkMediumParam); } else { AudioLoad_SyncDma(romAddr, ramAddr, size, medium); } loadStatus = (cachePolicy == CACHEPOLICY_0) ? 5 : 2; } + switch (tableType) { case SEQUENCE_TABLE: if (gSeqLoadStatus[id] != 5) { gSeqLoadStatus[id] = loadStatus; } break; + case FONT_TABLE: if (gFontLoadStatus[id] != 5) { gFontLoadStatus[id] = loadStatus; } break; + case SAMPLE_TABLE: if (gSampleFontLoadStatus[id] != 5) { gSampleFontLoadStatus[id] = loadStatus; @@ -551,6 +590,7 @@ void* AudioLoad_SearchCaches(s32 tableType, s32 id) { if (ramAddr != NULL) { return ramAddr; } + ramAddr = AudioHeap_SearchCaches(tableType, CACHE_EITHER, id); if (ramAddr != NULL) { return ramAddr; @@ -595,11 +635,11 @@ void AudioLoad_RelocateFont(s32 fontId, u32 fontBaseAddr, void* relocData) { fontDataPtrs[0] += fontBaseAddr; for (i = 0; i < numDrums; i++) { - offset = (*drumDataPtrs)[i]; + offset = *(*drumDataPtrs + i); if (offset != 0) { drum = offset += fontBaseAddr; - (*drumDataPtrs)[i] = drum; - // temp2; + *(*drumDataPtrs + i) = drum; + if (!drum->isRelocated) { AudioLoad_RelocateSample(&drum->tunedSample, fontBaseAddr, relocData); offset = (u32) drum->envelope; @@ -635,7 +675,9 @@ void AudioLoad_RelocateFont(s32 fontId, u32 fontBaseAddr, void* relocData) { void AudioLoad_SyncDma(u32 devAddr, u8* ramAddr, u32 size, s32 medium) { size = ALIGN16(size); + osInvalDCache(ramAddr, size); + while (true) { if (size < 0x400) { break; @@ -646,6 +688,7 @@ void AudioLoad_SyncDma(u32 devAddr, u8* ramAddr, u32 size, s32 medium) { devAddr += 0x400; ramAddr += 0x400; } + if (size != 0) { AudioLoad_Dma(&gSyncDmaIoMsg, 1, 0, devAddr, ramAddr, size, &gSyncDmaQueue, medium, "FastCopy"); MQ_WAIT_FOR_MESG(&gSyncDmaQueue, NULL); @@ -683,11 +726,13 @@ s32 AudioLoad_Dma(OSIoMesg* mesg, u32 priority, s32 direction, u32 devAddr, void if (size & 0xF) { size = ALIGN16(size); } + mesg->hdr.pri = priority; mesg->hdr.retQueue = retQueue; mesg->dramAddr = ramAddr; mesg->devAddr = devAddr; mesg->size = size; + handle->transferInfo.cmdType = 2; osEPiStartDma(handle, mesg, direction); @@ -722,17 +767,20 @@ void* AudioLoad_AsyncLoadInner(s32 tableType, s32 id, s32 nChunks, s32 retData, return NULL; } break; + case FONT_TABLE: if (gFontLoadStatus[id] == 1) { return NULL; } break; + case SAMPLE_TABLE: if (gSampleFontLoadStatus[id] == 1) { return NULL; } break; } + ramAddr = AudioLoad_SearchCaches(tableType, id); if (ramAddr != NULL) { loadStatus = 2; @@ -745,6 +793,7 @@ void* AudioLoad_AsyncLoadInner(s32 tableType, s32 id, s32 nChunks, s32 retData, cachePolicy = table->entries[id].cachePolicy; romAddr = table->entries[id].romAddr; loadStatus = 2; + switch (cachePolicy) { case CACHEPOLICY_0: ramAddr = AudioHeap_AllocPermanent(tableType, id, size); @@ -753,18 +802,21 @@ void* AudioLoad_AsyncLoadInner(s32 tableType, s32 id, s32 nChunks, s32 retData, } loadStatus = 5; break; + case CACHEPOLICY_1: ramAddr = AudioHeap_AllocCached(tableType, size, CACHE_PERSISTENT, id); if (ramAddr == NULL) { return ramAddr; } break; + case CACHEPOLICY_2: ramAddr = AudioHeap_AllocCached(tableType, size, CACHE_TEMPORARY, id); if (ramAddr == NULL) { return ramAddr; } break; + case CACHEPOLICY_3: case CACHEPOLICY_4: ramAddr = AudioHeap_AllocCached(tableType, size, CACHE_EITHER, id); @@ -777,17 +829,20 @@ void* AudioLoad_AsyncLoadInner(s32 tableType, s32 id, s32 nChunks, s32 retData, (retData << 0x18) | (tableType << 0x10) | (id << 8) | loadStatus); loadStatus = 1; } + switch (tableType) { case SEQUENCE_TABLE: if (gSeqLoadStatus[id] != 5) { gSeqLoadStatus[id] = loadStatus; } break; + case FONT_TABLE: if (gFontLoadStatus[id] != 5) { gFontLoadStatus[id] = loadStatus; } break; + case SAMPLE_TABLE: if (gSampleFontLoadStatus[id] != 5) { gSampleFontLoadStatus[id] = loadStatus; @@ -828,7 +883,7 @@ void AudioLoad_Init(void) { gAudioResetTimer = 0; for (i = 0; i < gAudioHeapSize / 8; i++) { - ((u64*) gAudioHeap)[i] = 0; + *((u64*) gAudioHeap + i) = 0; } clearContext = gAudioContextStart; @@ -836,25 +891,31 @@ void AudioLoad_Init(void) { for (; dwordsLeft >= 0; dwordsLeft--) { *clearContext++ = 0; } + switch (osTvType) { case OS_TV_PAL: gMaxTempoTvTypeFactors = 20.03042f; gRefreshRate = 50; break; + case OS_TV_MPAL: gMaxTempoTvTypeFactors = 16.546f; gRefreshRate = 60; break; + default: case OS_TV_NTSC: gMaxTempoTvTypeFactors = 16.713f; gRefreshRate = 60; break; } + AudioThread_Init(); + for (i = 0; i < 3; i++) { gAiBuffLengths[i] = 0xA0; } + gAudioTaskCountQ = 0; gAudioTaskIndexQ = 0; gCurAiBuffIndex = 0; @@ -862,13 +923,17 @@ void AudioLoad_Init(void) { gAudioCurTask = NULL; gAudioRspTasks[0].task.t.data_size = 0; gAudioRspTasks[1].task.t.data_size = 0; + osCreateMesgQueue(&gSyncDmaQueue, gSyncDmaMsg, 1); osCreateMesgQueue(&gCurAudioFrameDmaQueue, gCurAudioFrameDmaMsg, 64); osCreateMesgQueue(&gExternalLoadQueue, gExternalLoadMsg, 16); osCreateMesgQueue(&gPreloadSampleQueue, gPreloadSampleMsg, 16); + gCurAudioFrameDmaCount = 0; gSampleDmaCount = 0; + AudioHeap_InitMainPools(gInitPoolSize); + for (i = 0; i < 3; i++) { gAiBuffers[i] = AudioHeap_Alloc(&gInitPool, AIBUF_SIZE); for (j = 0; j < AIBUF_LEN; j++) { @@ -878,26 +943,33 @@ void AudioLoad_Init(void) { gAudioSpecId = AUDIOSPEC_0; gAudioResetStep = 1; AudioHeap_ResetStep(); - gSequenceTable = (AudioTable*) &gSeqTableInit; - gSoundFontTable = (AudioTable*) &gSoundFontTableInit; - gSampleBankTable = (AudioTable*) &gSampleBankTableInit; + + gSequenceTable = &gSeqTableInit; + gSoundFontTable = &gSoundFontTableInit; + gSampleBankTable = &gSampleBankTableInit; gSeqFontTable = gSeqFontTableInit; - gNumSequences = gSequenceTable->numEntries; + gNumSequences = gSequenceTable->base.numEntries; + AudioLoad_InitTable(gSequenceTable, SEGMENT_ROM_START(audio_seq), gSequenceMedium); AudioLoad_InitTable(gSoundFontTable, SEGMENT_ROM_START(audio_bank), gSoundFontMedium); AudioLoad_InitTable(gSampleBankTable, SEGMENT_ROM_START(audio_table), gSampleBankMedium); - numFonts = gSoundFontTable->numEntries; + + numFonts = gSoundFontTable->base.numEntries; + gSoundFontList = AudioHeap_Alloc(&gInitPool, numFonts * sizeof(SoundFont)); + for (i = 0; i < numFonts; i++) { gSoundFontList[i].sampleBankId1 = (gSoundFontTable->entries[i].shortData1 >> 8) & 0xFF; gSoundFontList[i].sampleBankId2 = gSoundFontTable->entries[i].shortData1 & 0xFF; gSoundFontList[i].numInstruments = (gSoundFontTable->entries[i].shortData2 >> 8) & 0xFF; gSoundFontList[i].numDrums = gSoundFontTable->entries[i].shortData2 & 0xFF; } + ramAddr = AudioHeap_Alloc(&gInitPool, gPermanentPoolSize); if (ramAddr == NULL) { gPermanentPoolSize = 0; } + AudioHeap_InitPool(&gPermanentPool.pool, ramAddr, gPermanentPoolSize); func_800168BC(); } @@ -918,6 +990,7 @@ s32 AudioLoad_SlowLoadSample(s32 fontId, u8 instId, s8* status) { *status = SLOW_LOAD_STATUS_2; return 0; } + slowLoad = &gSlowLoads.slowLoad[gSlowLoads.unk_00]; if (slowLoad->state == SLOW_LOAD_DONE) { slowLoad->state = SLOW_LOAD_WAITING; @@ -1003,7 +1076,7 @@ void AudioLoad_ProcessSlowLoads(s32 resetStatus) { } else if (slowLoad->bytesRemaining < 0x1000) { if (slowLoad->medium == MEDIUM_UNK) { AudioLoad_DmaSlowCopyUnkMedium(slowLoad->curDevAddr, slowLoad->curRamAddr, - slowLoad->bytesRemaining, sampleBankTable->unkMediumParam); + slowLoad->bytesRemaining, sampleBankTable->base.unkMediumParam); } else { AudioLoad_DmaSlowCopy(&gSlowLoads.slowLoad[i], slowLoad->bytesRemaining); } @@ -1011,7 +1084,7 @@ void AudioLoad_ProcessSlowLoads(s32 resetStatus) { } else { if (slowLoad->medium == MEDIUM_UNK) { AudioLoad_DmaSlowCopyUnkMedium(slowLoad->curDevAddr, slowLoad->curRamAddr, 0x1000, - sampleBankTable->unkMediumParam); + sampleBankTable->base.unkMediumParam); } else { AudioLoad_DmaSlowCopy(&gSlowLoads.slowLoad[i], 0x1000); } @@ -1059,6 +1132,7 @@ AudioAsyncLoad* AudioLoad_StartAsyncLoad(u32 devAddr, u8* ramAddr, u32 size, s32 if (i == 16) { return NULL; } + asyncLoad->status = 1; asyncLoad->curDevAddr = devAddr; asyncLoad->ramAddr = ramAddr; @@ -1073,8 +1147,8 @@ AudioAsyncLoad* AudioLoad_StartAsyncLoad(u32 devAddr, u8* ramAddr, u32 size, s32 asyncLoad->chunkSize = 0x100; } } - asyncLoad->retQueue = retQueue; + asyncLoad->retQueue = retQueue; asyncLoad->delay = 3; asyncLoad->medium = medium; asyncLoad->retMsg = retMesg; @@ -1119,35 +1193,42 @@ void AudioLoad_ProcessAsyncLoad(AudioAsyncLoad* asyncLoad, s32 resetStatus) { return; } } + if (asyncLoad->bytesRemaining == 0) { msg = asyncLoad->retMsg; tableType = (msg >> 0x10) & 0xFF; tableIndex = (msg >> 8) & 0xFF; loadStatus = msg & 0xFF; + switch (tableType) { case SEQUENCE_TABLE: if (gSeqLoadStatus[tableIndex] != 5) { gSeqLoadStatus[tableIndex] = loadStatus; } break; + case SAMPLE_TABLE: if (gSampleFontLoadStatus[tableIndex] != 5) { gSampleFontLoadStatus[tableIndex] = loadStatus; } break; + case FONT_TABLE: if (gFontLoadStatus[tableIndex] != 5) { gFontLoadStatus[tableIndex] = loadStatus; } + sampleBankId1 = gSoundFontList[tableIndex].sampleBankId1; sampleBankId2 = gSoundFontList[tableIndex].sampleBankId2; relocInfo.sampleBankId1 = sampleBankId1; relocInfo.sampleBankId2 = sampleBankId2; + if (sampleBankId1 != SAMPLES_NONE) { relocInfo.baseAddr1 = AudioLoad_SyncLoadSampleBank(sampleBankId1, &relocInfo.medium1); } else { relocInfo.baseAddr1 = NULL; } + if (sampleBankId2 != SAMPLES_NONE) { relocInfo.baseAddr2 = AudioLoad_SyncLoadSampleBank(sampleBankId2, &relocInfo.medium2); } else { @@ -1161,7 +1242,7 @@ void AudioLoad_ProcessAsyncLoad(AudioAsyncLoad* asyncLoad, s32 resetStatus) { } else if (asyncLoad->bytesRemaining < asyncLoad->chunkSize) { if (asyncLoad->medium == MEDIUM_UNK) { AudioLoad_AsyncDmaUnkMedium(asyncLoad->curDevAddr, asyncLoad->curRamAddr, asyncLoad->bytesRemaining, - sampleTable->unkMediumParam); + sampleTable->base.unkMediumParam); } else { AudioLoad_AsyncDma(asyncLoad, asyncLoad->bytesRemaining); } @@ -1169,7 +1250,7 @@ void AudioLoad_ProcessAsyncLoad(AudioAsyncLoad* asyncLoad, s32 resetStatus) { } else { if (asyncLoad->medium == MEDIUM_UNK) { AudioLoad_AsyncDmaUnkMedium(asyncLoad->curDevAddr, asyncLoad->curRamAddr, asyncLoad->chunkSize, - sampleTable->unkMediumParam); + sampleTable->base.unkMediumParam); } else { AudioLoad_AsyncDma(asyncLoad, asyncLoad->chunkSize); } @@ -1211,7 +1292,7 @@ void AudioLoad_RelocateSample(TunedSample* tSample, u32 fontDataAddr, SampleBank if ((sample->size != 0) && (sample->isRelocated != 1)) { sample->loop = reloc = (u32) sample->loop + fontDataAddr; sample->book = reloc = (u32) sample->book + fontDataAddr; - switch (sample->medium) { /* irregular */ + switch (sample->medium) { case MEDIUM_RAM: sample->sampleAddr = reloc = sample->sampleAddr + relocInfo->baseAddr1; sample->medium = relocInfo->medium1; @@ -1224,6 +1305,7 @@ void AudioLoad_RelocateSample(TunedSample* tSample, u32 fontDataAddr, SampleBank case MEDIUM_DISK_DRIVE: break; } + sample->isRelocated = true; if (sample->unk_bit26 && (sample->medium != 0)) { gUsedSamples[gNumUsedSamples++] = sample; @@ -1253,9 +1335,11 @@ s32 AudioLoad_RelocateFontAndPreloadSamples(s32 fontId, u32 fontDataAddr, Sample } else { D_80146D80 = 0; } + gNumUsedSamples = 0; AudioLoad_RelocateFont(fontId, fontDataAddr, relocData); size = 0; + for (i = 0; i < gNumUsedSamples; i++) { size += ALIGN16(gUsedSamples[i]->size); } @@ -1268,7 +1352,7 @@ s32 AudioLoad_RelocateFontAndPreloadSamples(s32 fontId, u32 fontDataAddr, Sample #ifdef AVOID_UB sampleRamAddr = NULL; #endif - //! Bug: Those are assignments, not equality checks. + //! @bug Those are assignments, not equality checks. switch (isAsync) { case AUDIOLOAD_SYNC: if (sample->medium = relocData->medium1) { @@ -1279,6 +1363,7 @@ s32 AudioLoad_RelocateFontAndPreloadSamples(s32 fontId, u32 fontDataAddr, Sample sample->sampleAddr, sample->medium); } break; + case AUDIOLOAD_ASYNC: if (sample->medium = relocData->medium1) { sampleRamAddr = AudioHeap_AllocTemporarySampleCache(sample->size, relocData->sampleBankId1, @@ -1289,14 +1374,16 @@ s32 AudioLoad_RelocateFontAndPreloadSamples(s32 fontId, u32 fontDataAddr, Sample } break; } + if (sampleRamAddr == NULL) { continue; } + switch (isAsync) { case AUDIOLOAD_SYNC: if (sample->medium == MEDIUM_UNK) { AudioLoad_SyncDmaUnkMedium(sample->sampleAddr, sampleRamAddr, sample->size, - gSampleBankTable->unkMediumParam); + gSampleBankTable->base.unkMediumParam); sample->sampleAddr = sampleRamAddr; sample->medium = MEDIUM_RAM; } else { @@ -1305,6 +1392,7 @@ s32 AudioLoad_RelocateFontAndPreloadSamples(s32 fontId, u32 fontDataAddr, Sample sample->medium = MEDIUM_RAM; } break; + case AUDIOLOAD_ASYNC: size = gPreloadSampleStackTop; gPreloadSampleStack[size].sample = sample; @@ -1317,7 +1405,9 @@ s32 AudioLoad_RelocateFontAndPreloadSamples(s32 fontId, u32 fontDataAddr, Sample break; } } + gNumUsedSamples = 0; + if ((gPreloadSampleStackTop != 0) && !inProgress) { sample = gPreloadSampleStack[gPreloadSampleStackTop - 1].sample; nChunks = (sample->size / 0x1000) + 1; @@ -1367,6 +1457,7 @@ s32 AudioLoad_ProcessSamplePreloads(s32 resetStatus) { // "============Error: Magic is Broken after loading.\n" gPreloadSampleStack[preloadIndex].isFree = 1; } + while (true) { if (gPreloadSampleStackTop <= 0) { break; @@ -1380,6 +1471,7 @@ s32 AudioLoad_ProcessSamplePreloads(s32 resetStatus) { sampleAddr = sample->sampleAddr; size = sample->size; nChunks = (size >> 0xC) + 1; + key = sampleAddr + size + sample->medium; if (key != gPreloadSampleStack[gPreloadSampleStackTop - 1].endAndMediumKey) { // "============Error: Magic is Broken: %x\n"; @@ -1418,13 +1510,9 @@ s32 AudioLoad_GetSamplesForFont(s32 fontId, Sample** sampleSet) { s32 i; Drum* drum; Instrument* inst; - s32 numLoaded; - s32 numDrums; - s32 numInstruments; - - numLoaded = 0; - numDrums = gSoundFontList[fontId].numDrums; - numInstruments = gSoundFontList[fontId].numInstruments; + s32 numLoaded = 0; + s32 numDrums = gSoundFontList[fontId].numDrums; + s32 numInstruments = gSoundFontList[fontId].numInstruments; for (i = 0; i < numDrums; i++) { drum = Audio_GetDrum(fontId, i); @@ -1433,6 +1521,7 @@ s32 AudioLoad_GetSamplesForFont(s32 fontId, Sample** sampleSet) { } numLoaded = AudioLoad_AddToSampleSet(drum->tunedSample.sample, numLoaded, sampleSet); } + for (i = 0; i < numInstruments; i++) { inst = Audio_GetInstrument(fontId, i); if (inst == NULL) { @@ -1446,5 +1535,6 @@ s32 AudioLoad_GetSamplesForFont(s32 fontId, Sample** sampleSet) { } numLoaded = AudioLoad_AddToSampleSet(inst->normalPitchTunedSample.sample, numLoaded, sampleSet); } + return numLoaded; } diff --git a/src/audio/audio_synthesis.c b/src/audio/audio_synthesis.c index 9f7db3bc..99eb52ad 100644 --- a/src/audio/audio_synthesis.c +++ b/src/audio/audio_synthesis.c @@ -499,23 +499,20 @@ void func_80009124(s16** arg0); void func_80009504(s16* arg0, UnkStruct_800097A8* arg1) { s32 i; - f32 temp_ft0; - f32* var_v0; - f32* var_v0_2; - s32 temp_v0; - void* var_s0; - var_s0 = arg0; if (arg1->unk_0 != NULL) { arg1->unk_C = arg1->unk_0; arg1->unk_0 = 0; } + arg1->unk18 += D_8014C1B4; while (arg1->unk18 > 0x1000) { func_80009124(&arg1->unk_C); arg1->unk18 -= 0x1000; } + func_80008364(D_80145D48, D_80146148, 8, D_80146548); + for (i = 0; i < 0x100; i++) { if (D_80145D48[i] > 32767.0f) { D_80145D48[i] = 32767.0f; @@ -524,6 +521,7 @@ void func_80009504(s16* arg0, UnkStruct_800097A8* arg1) { D_80145D48[i] = -32767.0f; } } + for (i = 0; i < 0x100; i++, arg0++) { *arg0 = D_80145D48[i]; } diff --git a/src/audio/audio_tables.c b/src/audio/audio_tables.c index 370e7c67..2bfea4c3 100644 --- a/src/audio/audio_tables.c +++ b/src/audio/audio_tables.c @@ -1,49 +1,53 @@ #include "sys.h" #include "sf64audio_provisional.h" -AudioTableBase gSampleBankTableInit = { 4, 0, 0 }; -AudioTableEntry gSampleBankTableInitEntries[4] = { - { 0x000000, 0x0E1E30, MEDIUM_CART, CACHEPOLICY_4 }, - { 0x0E1E30, 0x0FF9D0, MEDIUM_CART, CACHEPOLICY_4 }, - { 0x1E1800, 0x497480, MEDIUM_CART, CACHEPOLICY_4 }, - { 0x678C80, 0x0C3900, MEDIUM_CART, CACHEPOLICY_4 }, +AudioTable gSampleBankTableInit = { + { 4, 0, 0 }, + { + { 0x000000, 0x0E1E30, MEDIUM_CART, CACHEPOLICY_4 }, + { 0x0E1E30, 0x0FF9D0, MEDIUM_CART, CACHEPOLICY_4 }, + { 0x1E1800, 0x497480, MEDIUM_CART, CACHEPOLICY_4 }, + { 0x678C80, 0x0C3900, MEDIUM_CART, CACHEPOLICY_4 }, + }, }; -AudioTableBase gSeqTableInit = { SEQ_ID_MAX, 0, 0 }; -AudioTableEntry gSeqTableInitEntries[SEQ_ID_MAX] = { - { 0x00000, 0x3AF0, MEDIUM_CART, CACHEPOLICY_0 }, { 0x03AF0, 0x56B0, MEDIUM_CART, CACHEPOLICY_0 }, - { 0x091A0, 0x2D80, MEDIUM_CART, CACHEPOLICY_3 }, { 0x0BF20, 0x1410, MEDIUM_CART, CACHEPOLICY_3 }, - { 0x0D330, 0x1600, MEDIUM_CART, CACHEPOLICY_3 }, { 0x0E930, 0xF20, MEDIUM_CART, CACHEPOLICY_3 }, - { 0x0F850, 0x13A0, MEDIUM_CART, CACHEPOLICY_3 }, { 0x10BF0, 0x1100, MEDIUM_CART, CACHEPOLICY_3 }, - { 0x11CF0, 0x19E0, MEDIUM_CART, CACHEPOLICY_3 }, { 0x136D0, 0x13E0, MEDIUM_CART, CACHEPOLICY_3 }, - { 0x14AB0, 0x12F0, MEDIUM_CART, CACHEPOLICY_3 }, { SEQ_ID_SECTOR_Y, 0, MEDIUM_CART, CACHEPOLICY_3 }, - { 0x15DA0, 0xB70, MEDIUM_CART, CACHEPOLICY_3 }, { 0x16910, 0x2460, MEDIUM_CART, CACHEPOLICY_3 }, - { 0x18D70, 0xD40, MEDIUM_CART, CACHEPOLICY_3 }, { SEQ_ID_FORTUNA, 0, MEDIUM_CART, CACHEPOLICY_3 }, - { SEQ_ID_TITANIA, 0, MEDIUM_CART, CACHEPOLICY_3 }, { 0x19AB0, 0x7F0, MEDIUM_CART, CACHEPOLICY_3 }, - { 0x1A2A0, 0x1440, MEDIUM_CART, CACHEPOLICY_3 }, { 0x1B6E0, 0x1B20, MEDIUM_CART, CACHEPOLICY_3 }, - { SEQ_ID_BOSS_ME, 0, MEDIUM_CART, CACHEPOLICY_3 }, { SEQ_ID_BOSS_CO_1, 0, MEDIUM_CART, CACHEPOLICY_3 }, - { SEQ_ID_BOSS_CO_1, 0, MEDIUM_CART, CACHEPOLICY_3 }, { SEQ_ID_BOSS_ME, 0, MEDIUM_CART, CACHEPOLICY_3 }, - { SEQ_ID_BOSS_ME, 0, MEDIUM_CART, CACHEPOLICY_3 }, { 0x1D200, 0x1B30, MEDIUM_CART, CACHEPOLICY_3 }, - { SEQ_ID_BOSS_CO_1, 0, MEDIUM_CART, CACHEPOLICY_3 }, { SEQ_ID_BOSS_ME, 0, MEDIUM_CART, CACHEPOLICY_3 }, - { 0x1ED30, 0x10B0, MEDIUM_CART, CACHEPOLICY_3 }, { SEQ_ID_BOSS_BO, 0, MEDIUM_CART, CACHEPOLICY_3 }, - { SEQ_ID_BOSS_ME, 0, MEDIUM_CART, CACHEPOLICY_3 }, { SEQ_ID_BOSS_BO, 0, MEDIUM_CART, CACHEPOLICY_3 }, - { SEQ_ID_BOSS_ME, 0, MEDIUM_CART, CACHEPOLICY_3 }, { 0x1FDE0, 0x1410, MEDIUM_CART, CACHEPOLICY_3 }, - { 0x211F0, 0xF30, MEDIUM_CART, CACHEPOLICY_3 }, { 0x22120, 0x2B30, MEDIUM_CART, CACHEPOLICY_3 }, - { 0x24C50, 0x7F0, MEDIUM_CART, CACHEPOLICY_3 }, { 0x25440, 0x13B0, MEDIUM_CART, CACHEPOLICY_3 }, - { 0x267F0, 0xC70, MEDIUM_CART, CACHEPOLICY_3 }, { 0x27460, 0x180, MEDIUM_CART, CACHEPOLICY_3 }, - { 0x275E0, 0x5C0, MEDIUM_CART, CACHEPOLICY_3 }, { SEQ_ID_TITLE, 0, MEDIUM_CART, CACHEPOLICY_3 }, - { 0x27BA0, 0x4E40, MEDIUM_CART, CACHEPOLICY_3 }, { 0x2C9E0, 0x14E0, MEDIUM_CART, CACHEPOLICY_3 }, - { 0x2DEC0, 0x400, MEDIUM_CART, CACHEPOLICY_3 }, { 0x2E2C0, 0x800, MEDIUM_CART, CACHEPOLICY_3 }, - { 0x2EAC0, 0x1AB0, MEDIUM_CART, CACHEPOLICY_3 }, { 0x30570, 0x1AA0, MEDIUM_CART, CACHEPOLICY_3 }, - { SEQ_ID_BOSS_ME, 0, MEDIUM_CART, CACHEPOLICY_3 }, { 0x32010, 0x1370, MEDIUM_CART, CACHEPOLICY_3 }, - { 0x33380, 0xB80, MEDIUM_CART, CACHEPOLICY_3 }, { 0x33F00, 0x5C0, MEDIUM_CART, CACHEPOLICY_3 }, - { SEQ_ID_CO_INTRO, 0, MEDIUM_CART, CACHEPOLICY_3 }, { SEQ_ID_CO_INTRO, 0, MEDIUM_CART, CACHEPOLICY_3 }, - { 0x344C0, 0x550, MEDIUM_CART, CACHEPOLICY_3 }, { 0x34A10, 0x360, MEDIUM_CART, CACHEPOLICY_3 }, - { 0x34D70, 0x620, MEDIUM_CART, CACHEPOLICY_3 }, { SEQ_ID_VS_MENU, 0, MEDIUM_CART, CACHEPOLICY_3 }, - { 0x35390, 0xA70, MEDIUM_CART, CACHEPOLICY_3 }, { SEQ_ID_STAR_WOLF, 0, MEDIUM_CART, CACHEPOLICY_3 }, - { 0x35E00, 0xAB0, MEDIUM_CART, CACHEPOLICY_3 }, { 0x368B0, 0x13D0, MEDIUM_CART, CACHEPOLICY_3 }, - { 0x37C80, 0x250, MEDIUM_CART, CACHEPOLICY_3 }, { 0x37ED0, 0x6F0, MEDIUM_CART, CACHEPOLICY_3 }, - { 0x385C0, 0xFB0, MEDIUM_CART, CACHEPOLICY_3 }, { 0x39570, 0x1780, MEDIUM_CART, CACHEPOLICY_3 }, +AudioTable gSeqTableInit = { + { SEQ_ID_MAX, 0, 0 }, + { + { 0x00000, 0x3AF0, MEDIUM_CART, CACHEPOLICY_0 }, { 0x03AF0, 0x56B0, MEDIUM_CART, CACHEPOLICY_0 }, + { 0x091A0, 0x2D80, MEDIUM_CART, CACHEPOLICY_3 }, { 0x0BF20, 0x1410, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x0D330, 0x1600, MEDIUM_CART, CACHEPOLICY_3 }, { 0x0E930, 0xF20, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x0F850, 0x13A0, MEDIUM_CART, CACHEPOLICY_3 }, { 0x10BF0, 0x1100, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x11CF0, 0x19E0, MEDIUM_CART, CACHEPOLICY_3 }, { 0x136D0, 0x13E0, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x14AB0, 0x12F0, MEDIUM_CART, CACHEPOLICY_3 }, { SEQ_ID_SECTOR_Y, 0, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x15DA0, 0xB70, MEDIUM_CART, CACHEPOLICY_3 }, { 0x16910, 0x2460, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x18D70, 0xD40, MEDIUM_CART, CACHEPOLICY_3 }, { SEQ_ID_FORTUNA, 0, MEDIUM_CART, CACHEPOLICY_3 }, + { SEQ_ID_TITANIA, 0, MEDIUM_CART, CACHEPOLICY_3 }, { 0x19AB0, 0x7F0, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x1A2A0, 0x1440, MEDIUM_CART, CACHEPOLICY_3 }, { 0x1B6E0, 0x1B20, MEDIUM_CART, CACHEPOLICY_3 }, + { SEQ_ID_BOSS_ME, 0, MEDIUM_CART, CACHEPOLICY_3 }, { SEQ_ID_BOSS_CO_1, 0, MEDIUM_CART, CACHEPOLICY_3 }, + { SEQ_ID_BOSS_CO_1, 0, MEDIUM_CART, CACHEPOLICY_3 }, { SEQ_ID_BOSS_ME, 0, MEDIUM_CART, CACHEPOLICY_3 }, + { SEQ_ID_BOSS_ME, 0, MEDIUM_CART, CACHEPOLICY_3 }, { 0x1D200, 0x1B30, MEDIUM_CART, CACHEPOLICY_3 }, + { SEQ_ID_BOSS_CO_1, 0, MEDIUM_CART, CACHEPOLICY_3 }, { SEQ_ID_BOSS_ME, 0, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x1ED30, 0x10B0, MEDIUM_CART, CACHEPOLICY_3 }, { SEQ_ID_BOSS_BO, 0, MEDIUM_CART, CACHEPOLICY_3 }, + { SEQ_ID_BOSS_ME, 0, MEDIUM_CART, CACHEPOLICY_3 }, { SEQ_ID_BOSS_BO, 0, MEDIUM_CART, CACHEPOLICY_3 }, + { SEQ_ID_BOSS_ME, 0, MEDIUM_CART, CACHEPOLICY_3 }, { 0x1FDE0, 0x1410, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x211F0, 0xF30, MEDIUM_CART, CACHEPOLICY_3 }, { 0x22120, 0x2B30, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x24C50, 0x7F0, MEDIUM_CART, CACHEPOLICY_3 }, { 0x25440, 0x13B0, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x267F0, 0xC70, MEDIUM_CART, CACHEPOLICY_3 }, { 0x27460, 0x180, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x275E0, 0x5C0, MEDIUM_CART, CACHEPOLICY_3 }, { SEQ_ID_TITLE, 0, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x27BA0, 0x4E40, MEDIUM_CART, CACHEPOLICY_3 }, { 0x2C9E0, 0x14E0, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x2DEC0, 0x400, MEDIUM_CART, CACHEPOLICY_3 }, { 0x2E2C0, 0x800, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x2EAC0, 0x1AB0, MEDIUM_CART, CACHEPOLICY_3 }, { 0x30570, 0x1AA0, MEDIUM_CART, CACHEPOLICY_3 }, + { SEQ_ID_BOSS_ME, 0, MEDIUM_CART, CACHEPOLICY_3 }, { 0x32010, 0x1370, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x33380, 0xB80, MEDIUM_CART, CACHEPOLICY_3 }, { 0x33F00, 0x5C0, MEDIUM_CART, CACHEPOLICY_3 }, + { SEQ_ID_CO_INTRO, 0, MEDIUM_CART, CACHEPOLICY_3 }, { SEQ_ID_CO_INTRO, 0, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x344C0, 0x550, MEDIUM_CART, CACHEPOLICY_3 }, { 0x34A10, 0x360, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x34D70, 0x620, MEDIUM_CART, CACHEPOLICY_3 }, { SEQ_ID_VS_MENU, 0, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x35390, 0xA70, MEDIUM_CART, CACHEPOLICY_3 }, { SEQ_ID_STAR_WOLF, 0, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x35E00, 0xAB0, MEDIUM_CART, CACHEPOLICY_3 }, { 0x368B0, 0x13D0, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x37C80, 0x250, MEDIUM_CART, CACHEPOLICY_3 }, { 0x37ED0, 0x6F0, MEDIUM_CART, CACHEPOLICY_3 }, + { 0x385C0, 0xFB0, MEDIUM_CART, CACHEPOLICY_3 }, { 0x39570, 0x1780, MEDIUM_CART, CACHEPOLICY_3 }, + }, }; #define SOUNDFONT_ENTRY(offset, size, medium, cachePolicy, bank1, bank2, numInst, numDrums) \ { \ @@ -51,41 +55,43 @@ AudioTableEntry gSeqTableInitEntries[SEQ_ID_MAX] = { (((numInst) &0xFF) << 8) | ((numDrums) &0xFF) \ } -AudioTableBase gSoundFontTableInit = { 33, 0, 0 }; -AudioTableEntry gSoundFontTableInitEntries[33] = { - SOUNDFONT_ENTRY(0x00000, 0x2F00, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_SFX, SAMPLES_NONE, 127, 0), - SOUNDFONT_ENTRY(0x02F00, 0x0FE0, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_MAP, SAMPLES_NONE, 127, 0), - SOUNDFONT_ENTRY(0x03EE0, 0x0640, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), - SOUNDFONT_ENTRY(0x04520, 0x1560, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), - SOUNDFONT_ENTRY(0x05A80, 0x0C00, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), - SOUNDFONT_ENTRY(0x06680, 0x0DE0, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), - SOUNDFONT_ENTRY(0x07460, 0x1200, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), - SOUNDFONT_ENTRY(0x08660, 0x1040, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), - SOUNDFONT_ENTRY(0x096A0, 0x0E40, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), - SOUNDFONT_ENTRY(0x0A4E0, 0x0C20, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), - SOUNDFONT_ENTRY(0x0B100, 0x1920, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), - SOUNDFONT_ENTRY(0x0CA20, 0x0A20, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), - SOUNDFONT_ENTRY(0x0D440, 0x0A00, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), - SOUNDFONT_ENTRY(0x0DE40, 0x0D60, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), - SOUNDFONT_ENTRY(0x0EBA0, 0x0C20, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), - SOUNDFONT_ENTRY(0x0F7C0, 0x0F00, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), - SOUNDFONT_ENTRY(0x106C0, 0x0F20, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), - SOUNDFONT_ENTRY(0x115E0, 0x0E20, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), - SOUNDFONT_ENTRY(0x12400, 0x10A0, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), - SOUNDFONT_ENTRY(0x134A0, 0x2580, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), - SOUNDFONT_ENTRY(0x15A20, 0x09E0, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), - SOUNDFONT_ENTRY(0x16400, 0x1220, MEDIUM_CART, CACHEPOLICY_3, SAMPLES_INST, SAMPLES_NONE, 16, 64), - SOUNDFONT_ENTRY(0x17620, 0x0180, MEDIUM_CART, CACHEPOLICY_3, SAMPLES_INST, SAMPLES_NONE, 3, 0), - SOUNDFONT_ENTRY(0x177A0, 0x11C0, MEDIUM_CART, CACHEPOLICY_3, SAMPLES_INST, SAMPLES_NONE, 16, 64), - SOUNDFONT_ENTRY(0x18960, 0x0940, MEDIUM_CART, CACHEPOLICY_3, SAMPLES_INST, SAMPLES_NONE, 10, 64), - SOUNDFONT_ENTRY(0x192A0, 0x09E0, MEDIUM_CART, CACHEPOLICY_3, SAMPLES_INST, SAMPLES_NONE, 10, 64), - SOUNDFONT_ENTRY(0x19C80, 0x0920, MEDIUM_CART, CACHEPOLICY_3, SAMPLES_INST, SAMPLES_NONE, 10, 64), - SOUNDFONT_ENTRY(0x1A5A0, 0x09E0, MEDIUM_CART, CACHEPOLICY_3, SAMPLES_INST, SAMPLES_NONE, 10, 64), - SOUNDFONT_ENTRY(0x1AF80, 0x09E0, MEDIUM_CART, CACHEPOLICY_3, SAMPLES_INST, SAMPLES_NONE, 10, 64), - SOUNDFONT_ENTRY(0x1B960, 0x0A10, MEDIUM_CART, CACHEPOLICY_3, SAMPLES_INST, SAMPLES_NONE, 10, 64), - SOUNDFONT_ENTRY(0x1C370, 0x09E0, MEDIUM_CART, CACHEPOLICY_3, SAMPLES_INST, SAMPLES_NONE, 10, 64), - SOUNDFONT_ENTRY(0x1CD50, 0x0A00, MEDIUM_CART, CACHEPOLICY_3, SAMPLES_INST, SAMPLES_NONE, 10, 64), - SOUNDFONT_ENTRY(0x1D750, 0x08D0, MEDIUM_CART, CACHEPOLICY_3, SAMPLES_INST, SAMPLES_NONE, 10, 64), +AudioTable gSoundFontTableInit = { + { 33, 0, 0 }, + { + SOUNDFONT_ENTRY(0x00000, 0x2F00, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_SFX, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x02F00, 0x0FE0, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_MAP, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x03EE0, 0x0640, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x04520, 0x1560, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x05A80, 0x0C00, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x06680, 0x0DE0, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x07460, 0x1200, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x08660, 0x1040, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x096A0, 0x0E40, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x0A4E0, 0x0C20, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x0B100, 0x1920, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x0CA20, 0x0A20, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x0D440, 0x0A00, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x0DE40, 0x0D60, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x0EBA0, 0x0C20, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x0F7C0, 0x0F00, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x106C0, 0x0F20, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x115E0, 0x0E20, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x12400, 0x10A0, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x134A0, 0x2580, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x15A20, 0x09E0, MEDIUM_CART, CACHEPOLICY_0, SAMPLES_VOICE, SAMPLES_NONE, 127, 0), + SOUNDFONT_ENTRY(0x16400, 0x1220, MEDIUM_CART, CACHEPOLICY_3, SAMPLES_INST, SAMPLES_NONE, 16, 64), + SOUNDFONT_ENTRY(0x17620, 0x0180, MEDIUM_CART, CACHEPOLICY_3, SAMPLES_INST, SAMPLES_NONE, 3, 0), + SOUNDFONT_ENTRY(0x177A0, 0x11C0, MEDIUM_CART, CACHEPOLICY_3, SAMPLES_INST, SAMPLES_NONE, 16, 64), + SOUNDFONT_ENTRY(0x18960, 0x0940, MEDIUM_CART, CACHEPOLICY_3, SAMPLES_INST, SAMPLES_NONE, 10, 64), + SOUNDFONT_ENTRY(0x192A0, 0x09E0, MEDIUM_CART, CACHEPOLICY_3, SAMPLES_INST, SAMPLES_NONE, 10, 64), + SOUNDFONT_ENTRY(0x19C80, 0x0920, MEDIUM_CART, CACHEPOLICY_3, SAMPLES_INST, SAMPLES_NONE, 10, 64), + SOUNDFONT_ENTRY(0x1A5A0, 0x09E0, MEDIUM_CART, CACHEPOLICY_3, SAMPLES_INST, SAMPLES_NONE, 10, 64), + SOUNDFONT_ENTRY(0x1AF80, 0x09E0, MEDIUM_CART, CACHEPOLICY_3, SAMPLES_INST, SAMPLES_NONE, 10, 64), + SOUNDFONT_ENTRY(0x1B960, 0x0A10, MEDIUM_CART, CACHEPOLICY_3, SAMPLES_INST, SAMPLES_NONE, 10, 64), + SOUNDFONT_ENTRY(0x1C370, 0x09E0, MEDIUM_CART, CACHEPOLICY_3, SAMPLES_INST, SAMPLES_NONE, 10, 64), + SOUNDFONT_ENTRY(0x1CD50, 0x0A00, MEDIUM_CART, CACHEPOLICY_3, SAMPLES_INST, SAMPLES_NONE, 10, 64), + SOUNDFONT_ENTRY(0x1D750, 0x08D0, MEDIUM_CART, CACHEPOLICY_3, SAMPLES_INST, SAMPLES_NONE, 10, 64), + }, }; #define AS_BYTES(x) (((x) >> 8) & 0xFF), ((x) &0xFF) diff --git a/src/engine/fox_360.c b/src/engine/fox_360.c index cb52d2ef..4071055e 100644 --- a/src/engine/fox_360.c +++ b/src/engine/fox_360.c @@ -106,36 +106,36 @@ void AllRange_DrawCountdown(void) { } } -void Boss309_Update(Boss309* this) { - OvlI4_CallFunction(OVLCALL_BOSS309_UPDATE, this); +void BoBase_Update(BoBase* this) { + OvlI4_CallFunction(OVLCALL_BO_BASE_UPDATE, this); } -void Boss309_Draw(Boss309* this) { - OvlI4_CallFunction(OVLCALL_BOSS309_DRAW, this); +void BoBase_Draw(BoBase* this) { + OvlI4_CallFunction(OVLCALL_BO_BASE_DRAW, this); } -void Boss310_Update(Boss310* this) { - OvlI4_CallFunction(OVLCALL_BOSS310_UPDATE, this); +void BoBaseShield_Update(BoBaseShield* this) { + OvlI4_CallFunction(OVLCALL_BO_BASE_SHIELD_UPDATE, this); } -void Boss310_Draw(Boss310* this) { - OvlI4_CallFunction(OVLCALL_BOSS310_DRAW, this); +void BoBaseShield_Draw(BoBaseShield* this) { + OvlI4_CallFunction(OVLCALL_BO_BASE_SHIELD_DRAW, this); } -void Actor271_Update(Actor271* this) { - OvlI4_CallFunction(OVLCALL_ACTOR271_UPDATE, this); +void BoShieldReactor_Update(BoShieldReactor* this) { + OvlI4_CallFunction(OVLCALL_BO_SHIELD_REACTOR_UPDATE, this); } -void Actor271_Draw(Actor271* this) { - OvlI4_CallFunction(OVLCALL_ACTOR271_DRAW, this); +void BoShieldReactor_Draw(BoShieldReactor* this) { + OvlI4_CallFunction(OVLCALL_BO_SHIELD_REACTOR_DRAW, this); } -void Actor272_Update(Actor272* this) { - OvlI4_CallFunction(OVLCALL_ACTOR272_UPDATE, this); +void BoLaserCannon_Update(BoLaserCannon* this) { + OvlI4_CallFunction(OVLCALL_BO_LASER_CANNON_UPDATE, this); } -void Actor272_Draw(Actor272* this) { - OvlI4_CallFunction(OVLCALL_ACTOR272_DRAW, this); +void BoLaserCannon_Draw(BoLaserCannon* this) { + OvlI4_CallFunction(OVLCALL_BO_LASER_CANNON_DRAW, this); } void AllRange_GreatFoxRepair(Player* player) { @@ -309,8 +309,9 @@ void ActorAllRange_SetShadowData(Actor* this) { if (this->drawShadow && (gLevelMode == LEVELMODE_ALL_RANGE) && (gLevelType == LEVELTYPE_PLANET)) { for (i = 0, scenery360 = gScenery360; i < 200; i++, scenery360++) { if ((scenery360->obj.status == OBJ_ACTIVE) && - ((scenery360->obj.id == OBJ_SCENERY_150) || (scenery360->obj.id == OBJ_SCENERY_149) || - (scenery360->obj.id == OBJ_SCENERY_148) || (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_1) || + ((scenery360->obj.id == OBJ_SCENERY_FO_MOUNTAIN_3) || + (scenery360->obj.id == OBJ_SCENERY_FO_MOUNTAIN_2) || + (scenery360->obj.id == OBJ_SCENERY_FO_MOUNTAIN_1) || (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_1) || (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_3)) && (fabsf(scenery360->obj.pos.x - this->obj.pos.x) < 2500.0f) && (fabsf(scenery360->obj.pos.z - this->obj.pos.z) < 2500.0f)) { @@ -332,8 +333,9 @@ void ActorAllRange_SetShadowData(Actor* this) { spCC.y = spD8.y + temp1.y; spCC.z = spD8.z + temp1.z; - if ((scenery360->obj.id == OBJ_SCENERY_149) || (scenery360->obj.id == OBJ_SCENERY_150)) { - if (scenery360->obj.id == OBJ_SCENERY_149) { + if ((scenery360->obj.id == OBJ_SCENERY_FO_MOUNTAIN_2) || + (scenery360->obj.id == OBJ_SCENERY_FO_MOUNTAIN_3)) { + if (scenery360->obj.id == OBJ_SCENERY_FO_MOUNTAIN_2) { colId = COL1_5; } else { colId = COL1_6; @@ -831,10 +833,10 @@ s32 func_360_8003049C(ActorAllRange* this) { if (boss->obj.id == OBJ_BOSS_CO_CARRIER) { var_ft5 = 350.0f; - } else if (boss->obj.id == OBJ_BOSS_309) { + } else if (boss->obj.id == OBJ_BOSS_BO_BASE) { sp44 = 2000.0f; var_ft5 = 750.0f; - } else if (boss->obj.id == OBJ_BOSS_KA_BASE) { + } else if (boss->obj.id == OBJ_BOSS_KA_FLBASE) { sp44 = 1500.0f; var_ft5 = 700.0f; } @@ -2127,8 +2129,8 @@ void ActorAllRange_Update(ActorAllRange* this) { spA8.y = 70.0f; spA8.z = -70.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &spA8, &sp9C); - func_effect_80078E50(this->obj.pos.x + sp9C.x, this->obj.pos.y + sp9C.y, this->obj.pos.z + sp9C.z, - 3.1f); + Effect_Effect393_Spawn(this->obj.pos.x + sp9C.x, this->obj.pos.y + sp9C.y, this->obj.pos.z + sp9C.z, + 3.1f); } } } @@ -2260,7 +2262,7 @@ void ActorAllRange_Update(ActorAllRange* this) { this->timer_0BE = 2; this->obj.status = OBJ_DYING; this->itemDrop = DROP_NONE; - func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 5.0f, 15); + Effect386_Spawn1(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 5.0f, 15); Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); } else { this->dmgType = DMG_BEAM; @@ -2339,7 +2341,7 @@ void ActorAllRange_DrawBarrelRoll(ActorAllRange* this) { RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, alpha); gDPSetEnvColor(gMasterDisp++, 0, 0, 160, alpha); - gSPDisplayList(gMasterDisp++, D_101DC10); + gSPDisplayList(gMasterDisp++, aBarrelRollTex); Matrix_Pop(&gGfxMatrix); } } diff --git a/src/engine/fox_beam.c b/src/engine/fox_beam.c index fa72deda..0c27fc28 100644 --- a/src/engine/fox_beam.c +++ b/src/engine/fox_beam.c @@ -61,14 +61,14 @@ void PlayerShot_ExplodeBomb(PlayerShot* shot) { if (shot->obj.pos.y < (gGroundHeight + 450.0f)) { gCameraShake = 15; if (gGroundSurface == SURFACE_WATER) { - func_effect_8007D9DC(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, - shot->unk_48 * 3.0f, 0); - func_effect_8007D9DC(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, - shot->unk_48 * 3.0f, 5); - func_effect_8007D9DC(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, - shot->unk_48 * 3.0f, 10); - func_effect_8007ADF4(shot->obj.pos.x, gGroundHeight, shot->obj.pos.z, shot->unk_48 * 0.05f, - shot->unk_48 * 0.5f); + Effect_Effect367_Spawn(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, + shot->unk_48 * 3.0f, 0); + Effect_Effect367_Spawn(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, + shot->unk_48 * 3.0f, 5); + Effect_Effect367_Spawn(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, + shot->unk_48 * 3.0f, 10); + Effect_Effect372_Spawn2(shot->obj.pos.x, gGroundHeight, shot->obj.pos.z, shot->unk_48 * 0.05f, + shot->unk_48 * 0.5f); Effect_SpawnTimedSfxAtPos(&shot->obj.pos, NA_SE_OB_WATER_BOUND_M); } else { func_enmy_80062B60(shot->obj.pos.x, shot->obj.pos.z, 0, shot->unk_48 * 3.0f); @@ -83,8 +83,8 @@ void PlayerShot_ExplodeBomb(PlayerShot* shot) { if (var_fv1 > 2.0f) { var_fv1 = 2.0f; } - func_effect_8007B550(shot->obj.pos.x, gGroundHeight + 6.0f, shot->obj.pos.z, - shot->unk_48 * (1.5f + var_fv1), var_fv0); + Effect_Effect385_Spawn(shot->obj.pos.x, gGroundHeight + 6.0f, shot->obj.pos.z, + shot->unk_48 * (1.5f + var_fv1), var_fv0); } if (gVersusMode) { @@ -92,7 +92,7 @@ void PlayerShot_ExplodeBomb(PlayerShot* shot) { } else { var_v0 = 0; } - func_effect_8007B344(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, shot->unk_48 * 1.5f, var_v0); + Effect_Effect384_Spawn(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, shot->unk_48 * 1.5f, var_v0); if (gUseDynaFloor) { var_fs0 = 5.0f; if (shot->obj.pos.y > 300.0f) { @@ -105,15 +105,15 @@ void PlayerShot_ExplodeBomb(PlayerShot* shot) { var_fs0 = 4.0f; } var_fs0 *= 2.0f; - func_effect_8007AFD0(shot->obj.pos.x, shot->obj.pos.z, 50.0f, 0.0f, var_fs0); - func_effect_8007AFD0(shot->obj.pos.x, shot->obj.pos.z, 46.0f, 19.0f, var_fs0); - func_effect_8007AFD0(shot->obj.pos.x, shot->obj.pos.z, 35.0f, 35.0f, var_fs0); - func_effect_8007AFD0(shot->obj.pos.x, shot->obj.pos.z, 19.0f, 46.0f, var_fs0); - func_effect_8007AFD0(shot->obj.pos.x, shot->obj.pos.z, 0.0f, 50.0f, var_fs0); - func_effect_8007AFD0(shot->obj.pos.x, shot->obj.pos.z, -50.0f, 0.0f, var_fs0); - func_effect_8007AFD0(shot->obj.pos.x, shot->obj.pos.z, -46.0f, 19.0f, var_fs0); - func_effect_8007AFD0(shot->obj.pos.x, shot->obj.pos.z, -35.0f, 35.0f, var_fs0); - func_effect_8007AFD0(shot->obj.pos.x, shot->obj.pos.z, -19.0f, 46.0f, var_fs0); + Effect_Effect382_Spawn(shot->obj.pos.x, shot->obj.pos.z, 50.0f, 0.0f, var_fs0); + Effect_Effect382_Spawn(shot->obj.pos.x, shot->obj.pos.z, 46.0f, 19.0f, var_fs0); + Effect_Effect382_Spawn(shot->obj.pos.x, shot->obj.pos.z, 35.0f, 35.0f, var_fs0); + Effect_Effect382_Spawn(shot->obj.pos.x, shot->obj.pos.z, 19.0f, 46.0f, var_fs0); + Effect_Effect382_Spawn(shot->obj.pos.x, shot->obj.pos.z, 0.0f, 50.0f, var_fs0); + Effect_Effect382_Spawn(shot->obj.pos.x, shot->obj.pos.z, -50.0f, 0.0f, var_fs0); + Effect_Effect382_Spawn(shot->obj.pos.x, shot->obj.pos.z, -46.0f, 19.0f, var_fs0); + Effect_Effect382_Spawn(shot->obj.pos.x, shot->obj.pos.z, -35.0f, 35.0f, var_fs0); + Effect_Effect382_Spawn(shot->obj.pos.x, shot->obj.pos.z, -19.0f, 46.0f, var_fs0); } } } @@ -144,15 +144,15 @@ void PlayerShot_Impact(PlayerShot* shot) { shot->vel.x = shot->vel.y = shot->vel.z = 0.0f; if (gCurrentLevel == LEVEL_AQUAS) { gLight3R = gLight3G = gLight3B = 0; - func_effect_8007B344(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 10.0f, 4); - func_effect_8007C120(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.3f, 30); + Effect_Effect384_Spawn(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 10.0f, 4); + Effect_Effect390_Spawn(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.3f, 30); } else { if (gVersusMode) { var_v0_2 = shot->sourceId + 10; } else { var_v0_2 = 12; } - func_effect_8007B344(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 10.0f, var_v0_2); + Effect_Effect384_Spawn(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 10.0f, var_v0_2); func_effect_8007D2C8(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 4.0f); } } else { @@ -165,7 +165,7 @@ void PlayerShot_SetupEffect344(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 s32 time) { Effect_Initialize(effect); effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_344; + effect->obj.id = OBJ_EFFECT_EXPLOSION_MARK_1; effect->obj.pos.x = xPos; effect->obj.pos.y = yPos; effect->obj.pos.z = zPos; @@ -198,7 +198,7 @@ void PlayerShot_SpawnEffect344(f32 xPos, f32 yPos, f32 zPos, f32 arg3, f32 arg4, void PlayerShot_SetupEffect345(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yRot, f32 scale) { Effect_Initialize(effect); effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_345; + effect->obj.id = OBJ_EFFECT_LASER_MARK_1; effect->obj.pos.x = xPos; effect->obj.pos.y = yPos; effect->obj.pos.z = zPos; @@ -504,7 +504,7 @@ bool PlayerShot_CheckPolyCollision(PlayerShot* shot, ObjectId objId, Object* obj sp58.z = obj->pos.z; useCol2 = false; switch (objId) { - case OBJ_ACTOR_180: + case OBJ_ACTOR_ME_MOLAR_ROCK: objId = COL1_0; break; case OBJ_SCENERY_CO_BUMP_4: @@ -512,19 +512,19 @@ bool PlayerShot_CheckPolyCollision(PlayerShot* shot, ObjectId objId, Object* obj objId = COL2_1; useCol2 = true; break; - case OBJ_SCENERY_149: + case OBJ_SCENERY_FO_MOUNTAIN_2: objId = COL1_5; break; - case OBJ_SCENERY_150: + case OBJ_SCENERY_FO_MOUNTAIN_3: objId = COL1_6; break; - case OBJ_BOSS_FO: + case OBJ_BOSS_FO_BASE: objId = COL1_4; break; - case OBJ_BOSS_VE2: + case OBJ_BOSS_VE2_BASE: objId = COL1_9; break; - case OBJ_BOSS_309: + case OBJ_BOSS_BO_BASE: objId = COL1_7; break; case ACTOR_EVENT_ID: @@ -536,23 +536,23 @@ bool PlayerShot_CheckPolyCollision(PlayerShot* shot, ObjectId objId, Object* obj case OBJ_SCENERY_ME_TUNNEL: objId = COL1_1; break; - case OBJ_SCENERY_120: + case OBJ_SCENERY_AQ_CORAL_REEF_2: objId = COL2_18; useCol2 = true; break; - case OBJ_SCENERY_143: + case OBJ_SCENERY_VS_KA_FLBASE: objId = COL2_17; useCol2 = true; break; - case OBJ_SCENERY_124: + case OBJ_SCENERY_AQ_BUMP_1: objId = COL2_15; useCol2 = true; break; - case OBJ_SCENERY_126: + case OBJ_SCENERY_AQ_BUMP_2: objId = COL2_16; useCol2 = true; break; - case OBJ_SCENERY_47: + case OBJ_SCENERY_ZO_ISLAND: objId = COL2_7; useCol2 = true; break; @@ -561,43 +561,43 @@ bool PlayerShot_CheckPolyCollision(PlayerShot* shot, ObjectId objId, Object* obj useCol2 = true; break; case OBJ_SCENERY_CO_BUMP_3: - case OBJ_SCENERY_69: + case OBJ_SCENERY_MA_TERRAIN_BUMP: objId = COL2_3; useCol2 = true; break; - case OBJ_SCENERY_140: + case OBJ_SCENERY_VS_PYRAMID_1: objId = COL2_4; useCol2 = true; break; - case OBJ_SCENERY_141: + case OBJ_SCENERY_VS_PYRAMID_2: objId = COL2_6; useCol2 = true; break; - case OBJ_SCENERY_117: + case OBJ_SCENERY_AQ_CORAL_REEF_1: objId = COL2_14; useCol2 = true; break; - case OBJ_SCENERY_70: + case OBJ_SCENERY_MA_FLOOR_1: objId = COL2_8; useCol2 = true; break; - case OBJ_SCENERY_72: + case OBJ_SCENERY_MA_FLOOR_3: objId = COL2_9; useCol2 = true; break; - case OBJ_SCENERY_71: + case OBJ_SCENERY_MA_FLOOR_2: objId = COL2_10; useCol2 = true; break; - case OBJ_SCENERY_73: + case OBJ_SCENERY_MA_FLOOR_4: objId = COL2_11; useCol2 = true; break; - case OBJ_SCENERY_67: + case OBJ_SCENERY_MA_WALL_3: objId = COL2_12; useCol2 = true; break; - case OBJ_SCENERY_74: + case OBJ_SCENERY_MA_FLOOR_5: objId = COL2_13; useCol2 = true; break; @@ -625,8 +625,8 @@ bool PlayerShot_CheckPolyCollision(PlayerShot* shot, ObjectId objId, Object* obj shot->obj.pos.z = obj->pos.z + sp70.z; } if (gCurrentLevel == LEVEL_FORTUNA) { - func_effect_8007BC7C(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); - func_effect_8007BC7C(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); + Effect_Effect362_Spawn(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); + Effect_Effect362_Spawn(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); } return true; } @@ -638,8 +638,8 @@ bool PlayerShot_CheckPolyCollision(PlayerShot* shot, ObjectId objId, Object* obj PlayerShot_Impact(shot); Effect_SpawnTimedSfxAtPos(&shot->obj.pos, NA_SE_EN_REFLECT); if (gCurrentLevel == LEVEL_FORTUNA) { - func_effect_8007BC7C(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); - func_effect_8007BC7C(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); + Effect_Effect362_Spawn(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); + Effect_Effect362_Spawn(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); } return true; } @@ -691,10 +691,10 @@ void PlayerShot_ApplyDamageToActor(PlayerShot* shot, Actor* actor, s32 hitIndex) ((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->fwork[23] > 1.0f)) || ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->dmgPart == 0) && (actor->eventType == EVID_METEO_PYRAMID_SHIP)) || - ((actor->obj.id == OBJ_ACTOR_261) && (shot->obj.id != PLAYERSHOT_LOCK_ON) && + ((actor->obj.id == OBJ_ACTOR_AQ_SCULPIN) && (shot->obj.id != PLAYERSHOT_LOCK_ON) && ((actor->state < 3) || (actor->state >= 5))) || - ((actor->obj.id == OBJ_ACTOR_260) && (shot->obj.id != PLAYERSHOT_LOCK_ON) && (actor->timer_0BC != 0))) { - if ((actor->obj.id == OBJ_ACTOR_261) && (actor->state < 2)) { + ((actor->obj.id == OBJ_ACTOR_AQ_GAROA) && (shot->obj.id != PLAYERSHOT_LOCK_ON) && (actor->timer_0BC != 0))) { + if ((actor->obj.id == OBJ_ACTOR_AQ_SCULPIN) && (actor->state < 2)) { actor->state = 2; } if ((shot->obj.id == PLAYERSHOT_LOCK_ON) || (shot->obj.id == PLAYERSHOT_BOMB)) { @@ -713,7 +713,7 @@ void PlayerShot_ApplyDamageToActor(PlayerShot* shot, Actor* actor, s32 hitIndex) shot->obj.pos.y += shot->vel.y * 5.0f; shot->obj.pos.z += shot->vel.z * 5.0f; actor->timer_0C2 = 3; - func_effect_80078E50(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 8.0f); + Effect_Effect393_Spawn(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 8.0f); AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); Play_SpawnHitmark(gShotHitPosX, gShotHitPosY, gShotHitPosZ); } @@ -759,7 +759,7 @@ void PlayerShot_CollisionCheck(PlayerShot* shot) { for (i = 0, actor = gActors; i < ARRAY_COUNT(gActors); i++, actor++) { if ((actor->obj.status >= OBJ_ACTIVE) && (actor->timer_0C2 == 0)) { switch (actor->obj.id) { - case OBJ_ACTOR_180: + case OBJ_ACTOR_ME_MOLAR_ROCK: if (PlayerShot_CheckPolyCollision(shot, actor->obj.id, &actor->obj)) { actor->dmgType = DMG_BEAM; actor->dmgPart = shot->sourceId; @@ -862,7 +862,7 @@ void PlayerShot_CollisionCheck(PlayerShot* shot) { shot->obj.pos.z += 2.0f * shot->vel.z; shot->timer = 5; AUDIO_PLAY_SFX(NA_SE_ROLLING_REFLECT, player->sfxSource, 0); - func_effect_80078E50(player->pos.x, player->pos.y, player->trueZpos, 8.0f); + Effect_Effect393_Spawn(player->pos.x, player->pos.y, player->trueZpos, 8.0f); } else { PlayerShot_Impact(shot); if (player->hitTimer == 0) { @@ -879,7 +879,7 @@ void PlayerShot_CollisionCheck(PlayerShot* shot) { player->knockback.y = shot->vel.y * 0.1f; player->knockback.z = shot->vel.z * 0.1f; if (player->form != FORM_ON_FOOT) { - func_effect_8007D1E0(player->pos.x, player->pos.y, player->trueZpos, 2.0f); + Effect_Effect341_Spawn(player->pos.x, player->pos.y, player->trueZpos, 2.0f); } } } @@ -890,25 +890,28 @@ void PlayerShot_CollisionCheck(PlayerShot* shot) { if ((gGroundType == 4) && Ground_801B6AEC(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z + gPathProgress)) { PlayerShot_Impact(shot); if (shot->obj.id != PLAYERSHOT_LOCK_SEARCH) { - func_effect_8007A900(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 2.0f, 255, 15, 0); + Effect_Effect359_Spawn(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 2.0f, 255, 15, 0); } } if (gUseDynaFloor && Play_CheckDynaFloorCollision(&sp94, &spA4, shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z)) { PlayerShot_Impact(shot); if (shot->obj.id != PLAYERSHOT_LOCK_SEARCH) { - func_effect_8007B228(shot->obj.pos.x, sp94, shot->obj.pos.z, 1.0f); + Effect_Effect381_Spawn(shot->obj.pos.x, sp94, shot->obj.pos.z, 1.0f); } } if ((gLevelMode == LEVELMODE_ALL_RANGE) && (shot->sourceId < 110)) { for (i = 0, scenery360 = gScenery360; i < 200; i++, scenery360++) { if (scenery360->obj.status == OBJ_ACTIVE) { - if ((scenery360->obj.id == OBJ_SCENERY_117) || (scenery360->obj.id == OBJ_SCENERY_141) || - (scenery360->obj.id == OBJ_SCENERY_149) || (scenery360->obj.id == OBJ_SCENERY_150) || - (scenery360->obj.id == OBJ_SCENERY_148) || (scenery360->obj.id == OBJ_SCENERY_143) || - (scenery360->obj.id == OBJ_SCENERY_160) || (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_1) || - (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_3) || (scenery360->obj.id == OBJ_SCENERY_140)) { + if ((scenery360->obj.id == OBJ_SCENERY_AQ_CORAL_REEF_1) || + (scenery360->obj.id == OBJ_SCENERY_VS_PYRAMID_2) || + (scenery360->obj.id == OBJ_SCENERY_FO_MOUNTAIN_2) || + (scenery360->obj.id == OBJ_SCENERY_FO_MOUNTAIN_3) || + (scenery360->obj.id == OBJ_SCENERY_FO_MOUNTAIN_1) || + (scenery360->obj.id == OBJ_SCENERY_VS_KA_FLBASE) || + (scenery360->obj.id == OBJ_SCENERY_VE2_MOUNTAIN) || (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_1) || + (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_3) || (scenery360->obj.id == OBJ_SCENERY_VS_PYRAMID_1)) { PlayerShot_CheckPolyCollision(shot, scenery360->obj.id, &scenery360->obj); } else { PlayerShot_CheckObjectHitbox(shot, scenery360->info.hitbox, &scenery360->obj); @@ -920,10 +923,10 @@ void PlayerShot_CollisionCheck(PlayerShot* shot) { if (scenery->obj.status == OBJ_ACTIVE) { if ((scenery->obj.id == OBJ_SCENERY_CO_BUMP_1) || (scenery->obj.id == OBJ_SCENERY_ME_TUNNEL) || (scenery->obj.id == OBJ_SCENERY_CO_BUMP_4) || (scenery->obj.id == OBJ_SCENERY_CO_BUMP_5) || - (scenery->obj.id == OBJ_SCENERY_120) || (scenery->obj.id == OBJ_SCENERY_124) || - (scenery->obj.id == OBJ_SCENERY_126) || (scenery->obj.id == OBJ_SCENERY_47) || + (scenery->obj.id == OBJ_SCENERY_AQ_CORAL_REEF_2) || (scenery->obj.id == OBJ_SCENERY_AQ_BUMP_1) || + (scenery->obj.id == OBJ_SCENERY_AQ_BUMP_2) || (scenery->obj.id == OBJ_SCENERY_ZO_ISLAND) || (scenery->obj.id == OBJ_SCENERY_CO_BUMP_2) || (scenery->obj.id == OBJ_SCENERY_CO_BUMP_3) || - (scenery->obj.id == OBJ_SCENERY_67) || (scenery->obj.id == OBJ_SCENERY_74) || + (scenery->obj.id == OBJ_SCENERY_MA_WALL_3) || (scenery->obj.id == OBJ_SCENERY_MA_FLOOR_5) || (scenery->obj.id == OBJ_SCENERY_CO_BUMP_3)) { PlayerShot_CheckPolyCollision(shot, scenery->obj.id, &scenery->obj); } else { @@ -941,11 +944,11 @@ void PlayerShot_CollisionCheck(PlayerShot* shot) { if (sprite->obj.status == OBJ_ACTIVE) { if (sprite->obj.id != OBJ_SPRITE_TI_CACTUS) { if (PlayerShot_CheckSpriteHitbox(shot, sprite)) { - sprite->destroy = 1; + sprite->destroy = true; } } else { if (PlayerShot_CheckObjectHitbox(shot, sprite->info.hitbox, &sprite->obj) != 0) { - sprite->destroy = 1; + sprite->destroy = true; } } } @@ -953,10 +956,10 @@ void PlayerShot_CollisionCheck(PlayerShot* shot) { } for (i = 0, boss = gBosses; i < ARRAY_COUNT(gBosses); i++, boss++) { if ((boss->obj.status == OBJ_ACTIVE) && (boss->timer_05A == 0)) { - if ((boss->obj.id == OBJ_BOSS_FO) || (boss->obj.id == OBJ_BOSS_VE2) || (boss->obj.id == OBJ_BOSS_309) || - (boss->obj.id == OBJ_BOSS_SZ_GREAT_FOX)) { + if ((boss->obj.id == OBJ_BOSS_FO_BASE) || (boss->obj.id == OBJ_BOSS_VE2_BASE) || + (boss->obj.id == OBJ_BOSS_BO_BASE) || (boss->obj.id == OBJ_BOSS_SZ_GREAT_FOX)) { PlayerShot_CheckPolyCollision(shot, boss->obj.id, &boss->obj); - } else if (boss->obj.id == OBJ_BOSS_310) { + } else if (boss->obj.id == OBJ_BOSS_BO_BASE_SHIELD) { test.x = fabsf(boss->obj.pos.x - shot->obj.pos.x) * .8333333f; test.y = fabsf(boss->obj.pos.y - shot->obj.pos.y) * 2; test.z = fabsf(boss->obj.pos.z - shot->obj.pos.z) * 0.8333333f; @@ -970,7 +973,7 @@ void PlayerShot_CollisionCheck(PlayerShot* shot) { } } } else { - if (boss->obj.id == OBJ_BOSS_KA) { + if (boss->obj.id == OBJ_BOSS_KA_SAUCERER) { test.x = fabsf(boss->obj.pos.x - shot->obj.pos.x); test.y = fabsf(boss->obj.pos.y - 300.0f - shot->obj.pos.y) * 7.42f; test.z = fabsf(boss->obj.pos.z - shot->obj.pos.z); @@ -990,7 +993,7 @@ void PlayerShot_CollisionCheck(PlayerShot* shot) { if (shot->obj.id == PLAYERSHOT_LOCK_SEARCH) { Object_Kill(&shot->obj, shot->sfxSource); } else { - if ((boss->obj.id == OBJ_BOSS_KA) && (shot->sourceId != TEAM_ID_FOX)) { + if ((boss->obj.id == OBJ_BOSS_KA_SAUCERER) && (shot->sourceId != TEAM_ID_FOX)) { break; } boss->dmgType = DMG_BEAM; @@ -1016,13 +1019,13 @@ void PlayerShot_CollisionCheck(PlayerShot* shot) { } } } - if (boss->obj.id == OBJ_BOSS_SY) { + if (boss->obj.id == OBJ_BOSS_SY_SHOGUN) { boss->swork[19] = shot->sourceId; } boss->dmgPart = temp_v0 - 1; - if (boss->obj.id == OBJ_BOSS_301) { + if (boss->obj.id == OBJ_BOSS_AQ_UNK_301) { boss->swork[5] = shot->obj.id; - } else if (boss->obj.id == OBJ_BOSS_VE1) { + } else if (boss->obj.id == OBJ_BOSS_VE1_GOLEMECH) { boss->fwork[47] = shot->obj.pos.x; boss->fwork[48] = shot->obj.pos.y; boss->fwork[49] = shot->obj.pos.z; @@ -1594,9 +1597,9 @@ void PlayerShot_UpdateShot2(PlayerShot* shot, Player* player) { PlayerShot_Impact(shot); PlayerShot_HitGround(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->obj.rot.y, 2.0f); if (gCurrentLevel == LEVEL_FORTUNA) { - func_effect_8007BC7C(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); - func_effect_8007BC7C(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); - func_effect_8007BC7C(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); + Effect_Effect362_Spawn(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); + Effect_Effect362_Spawn(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); + Effect_Effect362_Spawn(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); } } PlayerShot_CollisionCheck(shot); @@ -1608,8 +1611,8 @@ void PlayerShot_UpdateBeam(PlayerShot* shot, s32 index) { Vec3f sp38; if ((gGroundSurface == SURFACE_WATER) && (shot->obj.pos.y < (gGroundHeight + 50.0f)) && (index == 0)) { - func_effect_8007ACE0(shot->obj.pos.x, gGroundHeight, shot->obj.pos.z, 0.1f, 1.5f, shot->obj.rot.y + 20.0f); - func_effect_8007ACE0(shot->obj.pos.x, gGroundHeight, shot->obj.pos.z, 0.1f, 1.5f, shot->obj.rot.y - 20.0f); + Effect_Effect372_Spawn1(shot->obj.pos.x, gGroundHeight, shot->obj.pos.z, 0.1f, 1.5f, shot->obj.rot.y + 20.0f); + Effect_Effect372_Spawn1(shot->obj.pos.x, gGroundHeight, shot->obj.pos.z, 0.1f, 1.5f, shot->obj.rot.y - 20.0f); } if ((shot->obj.pos.y < gGroundHeight) && (gGroundType != 4)) { PlayerShot_Impact(shot); @@ -1641,20 +1644,20 @@ void PlayerShot_UpdateBeam(PlayerShot* shot, s32 index) { return; } if (gCurrentLevel == LEVEL_FORTUNA) { - func_effect_8007BC7C(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); - func_effect_8007BC7C(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); - func_effect_8007BC7C(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); + Effect_Effect362_Spawn(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); + Effect_Effect362_Spawn(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); + Effect_Effect362_Spawn(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); } if (gCurrentLevel == LEVEL_AQUAS) { - func_effect_8007B8F8(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); - func_effect_8007B8F8(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); - func_effect_8007B8F8(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); - Aquas_801AC8A8(RAND_FLOAT_CENTERED(10.0f) + shot->obj.pos.x, RAND_FLOAT_CENTERED(10.0f) + shot->obj.pos.y, - shot->obj.pos.z, 0.8f, 0); - Aquas_801AC8A8(RAND_FLOAT_CENTERED(10.0f) + shot->obj.pos.x, RAND_FLOAT_CENTERED(10.0f) + shot->obj.pos.y, - shot->obj.pos.z, 0.8f, 0); - Aquas_801AC8A8(RAND_FLOAT_CENTERED(10.0f) + shot->obj.pos.x, RAND_FLOAT_CENTERED(10.0f) + shot->obj.pos.y, - shot->obj.pos.z, 0.8f, 0); + Effect_Effect364_Spawn(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); + Effect_Effect364_Spawn(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); + Effect_Effect364_Spawn(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); + Aquas_Effect366_Spawn(RAND_FLOAT_CENTERED(10.0f) + shot->obj.pos.x, + RAND_FLOAT_CENTERED(10.0f) + shot->obj.pos.y, shot->obj.pos.z, 0.8f, 0); + Aquas_Effect366_Spawn(RAND_FLOAT_CENTERED(10.0f) + shot->obj.pos.x, + RAND_FLOAT_CENTERED(10.0f) + shot->obj.pos.y, shot->obj.pos.z, 0.8f, 0); + Aquas_Effect366_Spawn(RAND_FLOAT_CENTERED(10.0f) + shot->obj.pos.x, + RAND_FLOAT_CENTERED(10.0f) + shot->obj.pos.y, shot->obj.pos.z, 0.8f, 0); } } if (shot->timer == 0) { @@ -1777,7 +1780,7 @@ void PlayerShot_CheckBossHitbox(PlayerShot* shot) { boss = gBosses; for (i = 0; i < ARRAY_COUNT(gBosses); i++, boss++) { if ((boss->obj.status == OBJ_ACTIVE) && (boss->timer_05A == 0)) { - if (boss->obj.id == OBJ_BOSS_KA) { + if (boss->obj.id == OBJ_BOSS_KA_SAUCERER) { var_s6 = gGameFrameCount % 8U; var_fs2 = shot->scale * 40.0f; } else { @@ -1883,17 +1886,17 @@ void PlayerShot_ApplyExplosionDamage(PlayerShot* shot, s32 damage) { dy = sprite->obj.pos.y - shot->obj.pos.y; dz = sprite->obj.pos.z - shot->obj.pos.z; if (sqrtf(SQ(dx) + SQ(dy) + SQ(dz)) < radius) { - sprite->destroy = 1; + sprite->destroy = true; } } } actor = gActors; for (i = 0; i < ARRAY_COUNT(gActors); i++, actor++) { if ((actor->obj.status == OBJ_ACTIVE) && (actor->timer_0C2 == 0) && - !((gCurrentLevel == LEVEL_MACBETH) && (OBJ_ACTOR_205 <= actor->obj.id) && - (actor->obj.id < OBJ_ACTOR_214)) && + !((gCurrentLevel == LEVEL_MACBETH) && (OBJ_ACTOR_MA_LOCOMOTIVE <= actor->obj.id) && + (actor->obj.id < OBJ_ACTOR_MA_RAILROAD_SWITCH)) && !((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->iwork[12] != 0)) && - ((actor->scale >= 0.0f) || (actor->obj.id == OBJ_ACTOR_271))) { + ((actor->scale >= 0.0f) || (actor->obj.id == OBJ_ACTOR_BO_SHIELD_REACTOR))) { dx = actor->obj.pos.x - shot->obj.pos.x; dy = actor->obj.pos.y - shot->obj.pos.y; dz = actor->obj.pos.z - shot->obj.pos.z; @@ -1904,12 +1907,12 @@ void PlayerShot_ApplyExplosionDamage(PlayerShot* shot, s32 damage) { actor->hitPos.y = shot->obj.pos.y; actor->hitPos.z = shot->obj.pos.z; if (sqrtf(SQ(dx) + SQ(dy) + SQ(dz)) < radius) { - if ((actor->obj.id == OBJ_ACTOR_193) || (actor->obj.id == OBJ_ACTOR_186) || - (actor->obj.id == OBJ_MISSILE_SEEK_TEAM) || (actor->obj.id == OBJ_ACTOR_202) || - (actor->obj.id == OBJ_ACTOR_201) || (actor->obj.id == OBJ_ACTOR_187) || + if ((actor->obj.id == OBJ_ACTOR_CO_RADAR) || (actor->obj.id == OBJ_ACTOR_ME_LASER_CANNON_1) || + (actor->obj.id == OBJ_MISSILE_SEEK_TEAM) || (actor->obj.id == OBJ_ACTOR_ME_HOPBOT) || + (actor->obj.id == OBJ_ACTOR_ME_METEO_BALL) || (actor->obj.id == OBJ_ACTOR_ME_LASER_CANNON_2) || ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->eventType == EVID_SUPPLY_CRATE)) || ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->eventType == EVID_SX_WARP_GATE)) || - (actor->obj.id == OBJ_ACTOR_196)) { + (actor->obj.id == OBJ_ACTOR_CO_MOLE_MISSILE)) { actor->dmgType = DMG_EXPLOSION; actor->dmgPart = 0; actor->dmgSource = shot->sourceId + 1; @@ -2088,12 +2091,12 @@ void PlayerShot_UpdateLockOnShot(PlayerShot* shot) { if ((shot->obj.pos.y < gGroundHeight) || (shot->timer == 1)) { if ((gGroundSurface == SURFACE_WATER) && (shot->obj.pos.y < gGroundHeight)) { shot->unk_48 = 10.0f; - func_effect_8007D9DC(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, - shot->unk_48 * 3.0f, 0); - func_effect_8007D9DC(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, - shot->unk_48 * 3.0f, 5); - func_effect_8007ADF4(shot->obj.pos.x, gGroundHeight, shot->obj.pos.z, shot->unk_48 * 0.05f, - shot->unk_48 * 0.5f); + Effect_Effect367_Spawn(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, + shot->unk_48 * 3.0f, 0); + Effect_Effect367_Spawn(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, + shot->unk_48 * 3.0f, 5); + Effect_Effect372_Spawn2(shot->obj.pos.x, gGroundHeight, shot->obj.pos.z, shot->unk_48 * 0.05f, + shot->unk_48 * 0.5f); Effect_SpawnTimedSfxAtPos(&shot->obj.pos, NA_SE_OB_WATER_BOUND_M); } PlayerShot_Impact(shot); diff --git a/src/engine/fox_bg.c b/src/engine/fox_bg.c index 98c1af7a..76c6be8b 100644 --- a/src/engine/fox_bg.c +++ b/src/engine/fox_bg.c @@ -263,7 +263,7 @@ void Background_DrawBackdrop(void) { Matrix_Push(&gGfxMatrix); - if (D_ctx_80177C70 == 2) { + if (gFovYMode == 2) { Matrix_Scale(gGfxMatrix, 1.2f, 1.2f, 1.0f, MTXF_APPLY); } @@ -931,7 +931,7 @@ void Background_DrawGround(void) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, gPlayer[gPlayerNum].xPath, -3.0f + gCameraShakeY, sp1D4, MTXF_APPLY); - if (D_ctx_80177C70 == 2) { + if (gFovYMode == 2) { Matrix_Scale(gGfxMatrix, 1.2f, 1.2f, 1.0f, MTXF_APPLY); } diff --git a/src/engine/fox_boss.c b/src/engine/fox_boss.c index ae9235e0..8243257d 100644 --- a/src/engine/fox_boss.c +++ b/src/engine/fox_boss.c @@ -31,7 +31,7 @@ void Boss_AwardBonus(Boss* this) { yOffset = 0.0f; if (this->obj.id == OBJ_BOSS_CO_GRANGA) { yOffset = 300.0f; - } else if (this->obj.id == OBJ_BOSS_TI) { + } else if (this->obj.id == OBJ_BOSS_TI_GORAS) { yOffset = 200.0f; } BonusText_Display(this->obj.pos.x, this->obj.pos.y + yOffset, this->obj.pos.z, bonus); @@ -42,21 +42,27 @@ void Boss_AwardBonus(Boss* this) { } void Boss299_Init(Boss299* this) { + /* Unimplemented */ } void Boss299_Update(Boss299* this) { + /* Unimplemented */ } void Boss299_Draw(Boss299* this) { + /* Unimplemented */ } void Boss300_Init(Boss300* this) { + /* Unimplemented */ } void Boss300_Update(Boss300* this) { + /* Unimplemented */ } void Boss300_Draw(Boss300* this) { + /* Unimplemented */ } void Boss_SetupDebris(ActorDebris* this, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7, f32 arg8, diff --git a/src/engine/fox_context.c b/src/engine/fox_context.c index 954a2a08..cfe7acf3 100644 --- a/src/engine/fox_context.c +++ b/src/engine/fox_context.c @@ -180,7 +180,7 @@ s32 D_ctx_80178494; // Torpedoes have this set to their unk_5C. Were they f32 gShotHitPosZ; f32 gShotHitPosX; f32 gShotHitPosY; -s32 gZOSnakeWaypointCount; +s32 gZoDodoraWaypointCount; UNK_TYPE F_801784A8; GroundType gGroundType; UNK_TYPE F_801784B0; @@ -276,13 +276,13 @@ PlayerShot gPlayerShots[16]; TexturedLine gTexturedLines[100]; RadarMark gRadarMarks[65]; BonusText gBonusText[10]; -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]; +s32 gMeMoraStatus[2]; +f32 gMeMoraXpos[2][100]; +f32 gMeMoraYpos[2][100]; +f32 gMeMoraZpos[2][100]; +f32 gMeMoraXrot[2][100]; +f32 gMeMoraYrot[2][100]; +f32 gMeMoraZrot[2][100]; UNK_TYPE P_800D31A8 = 0; u16 gEnemyShotSpeed; // enemy shot speed? u8 gShowLevelClearStatusScreen; @@ -330,7 +330,7 @@ u8 gTiStartLandmaster; u16 gControllerRumbleTimers[4]; u16 gPlayerScores[4]; s32 gCircleWipeFrame; -s32 D_ctx_80177C70; // sets camera field of view Y. initialized to 0 and never changed +s32 gFovYMode; // sets camera field of view Y. initialized to 0 and never changed s32 gTraining360MsgTimer; s32 gTraining360MsgIndex; s32 D_ctx_80177C94; // these save player parameters across the Venom -> Andross transition @@ -368,7 +368,7 @@ Scenery360* gScenery360; UNK_TYPE F_801782B0; s32 gDrawSmallRocks; s32 D_ctx_801782BC; // set to 0, never used -PosRot* gZOSnakePosRots; +PosRot* gZoDodoraPosRots; f32* D_ctx_801782CC; // arrays used for dynamic floor f32* D_ctx_801782D4; f32* D_ctx_801782DC; diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index 17a1fc61..10512bf0 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -692,7 +692,7 @@ void func_demo_8004A840(s32 actor) { func_demo_8004A700(&gActors[actor], actor); } -void func_demo_8004A888(Clouds* this) { +void func_demo_8004A888(EffectClouds* this) { Vec3f src; Vec3f dest; @@ -1226,7 +1226,7 @@ void Cutscene_CoComplete2(Player* player) { player->csState = 5; player->baseSpeed = 0.0f; player->csTimer = 10; - func_effect_80078E50(player->pos.x, player->pos.y, player->trueZpos, 30.0f); + Effect_Effect393_Spawn(player->pos.x, player->pos.y, player->trueZpos, 30.0f); } gCsCamAtX = player->pos.x; gCsCamAtY = player->pos.y - D_ctx_80177A48[6]; @@ -1612,7 +1612,7 @@ void Cutscene_KillPlayer(Player* player) { if (gVsPointsToWin == gVsPoints[player->attacker - 1]) { player->attacker = -1; if (player->unk_284 == 0) { - func_effect_8007C688(player->pos.x, player->pos.y, player->trueZpos, 3.0f, 1000); + Effect_Effect387_Spawn(player->pos.x, player->pos.y, player->trueZpos, 3.0f, 1000); } } } @@ -1631,10 +1631,10 @@ void Cutscene_LandmasterDown(Player* player) { player->pos.y += 30.0f; func_effect_8007D0E0(player->pos.x, player->pos.y, player->trueZpos, 6.0f); if (gCamCount == 1) { - func_effect_8007BFFC(player->pos.x, player->pos.y, player->trueZpos, 0.0f, 0.0f, 0.0f, 3.0f, 80); - func_effect_8007C688(player->pos.x, player->pos.y, player->trueZpos, 3.0f, 800); + Effect386_Spawn1(player->pos.x, player->pos.y, player->trueZpos, 0.0f, 0.0f, 0.0f, 3.0f, 80); + Effect_Effect387_Spawn(player->pos.x, player->pos.y, player->trueZpos, 3.0f, 800); } else { - func_effect_8007BFFC(player->pos.x, player->pos.y, player->trueZpos, 0.0f, 0.0f, 0.0f, 3.0f, 10); + Effect386_Spawn1(player->pos.x, player->pos.y, player->trueZpos, 0.0f, 0.0f, 0.0f, 3.0f, 10); } Cutscene_KillPlayer(player); } @@ -1704,7 +1704,8 @@ void Cutscene_ArwingDown360(Player* player) { (player->csTimer == 0)) { if (gCamCount != 4) { if (player->unk_284 == 0) { - func_effect_8007C688(player->pos.x, player->pos.y, player->trueZpos - (2.0f * player->vel.z), 3.0f, 80); + Effect_Effect387_Spawn(player->pos.x, player->pos.y, player->trueZpos - (2.0f * player->vel.z), 3.0f, + 80); } if (player->pos.y < player->pathFloor) { func_enmy_80062C38(player->pos.x, player->pos.z); @@ -1720,8 +1721,7 @@ void Cutscene_ArwingDown360(Player* player) { } } func_effect_8007D0E0(player->pos.x, player->pos.y, player->trueZpos, 5.0f); - func_effect_8007BFFC(player->pos.x, player->pos.y, player->trueZpos, player->vel.x, 0.0f, player->vel.z, 5.0f, - 20); + Effect386_Spawn1(player->pos.x, player->pos.y, player->trueZpos, player->vel.x, 0.0f, player->vel.z, 5.0f, 20); Cutscene_KillPlayer(player); } Math_SmoothStepToF(&player->camRoll, 0.0f, 0.05f, 5.0f, 0.00001f); @@ -1810,14 +1810,14 @@ void Cutscene_ArwingDownOnRails(Player* player) { } else if (((player->radioDamageTimer > 0) || (player->pos.y < player->pathFloor) || (player->csEventTimer == 0)) && (player->csTimer == 0)) { if (player->pos.y < player->pathFloor) { - func_effect_8007C688(player->pos.x, gGroundHeight + 20.0f, player->trueZpos - (2.0f * player->vel.z), 3.0f, - 800); + Effect_Effect387_Spawn(player->pos.x, gGroundHeight + 20.0f, player->trueZpos - (2.0f * player->vel.z), + 3.0f, 800); func_enmy_80062C38(player->pos.x, player->pos.z); } func_effect_8007D0E0(player->pos.x, player->pos.y - (2.0f * player->vel.y), player->trueZpos - (2.0f * player->vel.z), 6.0f); - func_effect_8007BFFC(player->pos.x, player->pos.y - player->vel.y, player->trueZpos - (2.0f * player->vel.z), - 0.0f, 0.0f, 0.0f, 3.0f, 20); + Effect386_Spawn1(player->pos.x, player->pos.y - player->vel.y, player->trueZpos - (2.0f * player->vel.z), 0.0f, + 0.0f, 0.0f, 3.0f, 20); if (gLevelType == LEVELTYPE_PLANET) { for (i = 0; i < 2; i++) { Play_SpawnDebris(2, player->pos.x, player->pos.y, player->trueZpos); @@ -1837,8 +1837,8 @@ void Cutscene_ArwingDownOnRails(Player* player) { } if ((gGroundSurface == SURFACE_WATER) && (player->pos.y <= player->pathFloor)) { - func_effect_8007D9DC(player->pos.x, gGroundHeight + 2.0f, player->trueZpos, 3.0f, 20.0f, 0); - func_effect_8007ADF4(player->pos.x, gGroundHeight, player->trueZpos, 0.1f, 2.0f); + Effect_Effect367_Spawn(player->pos.x, gGroundHeight + 2.0f, player->trueZpos, 3.0f, 20.0f, 0); + Effect_Effect372_Spawn2(player->pos.x, gGroundHeight, player->trueZpos, 0.1f, 2.0f); } } @@ -2103,7 +2103,7 @@ void func_demo_8004EBD0(ActorCutscene* this) { this->vel.z = dest.z; if (this->timer_0BC == 0) { - func_effect_80078E50(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 30.0f); + Effect_Effect393_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 30.0f); Object_Kill(&this->obj, this->sfxSource); } break; @@ -2299,7 +2299,6 @@ void func_demo_8004F798(ActorCutscene* this) { } void ActorCutscene_Update(ActorCutscene* this) { - if (gCurrentLevel == LEVEL_AQUAS) { func_hud_80093164(this); return; @@ -2747,14 +2746,14 @@ void ActorCutscene_Draw(ActorCutscene* this) { Matrix_SetGfxMtx(&gMasterDisp); /* fallthrough */ case 39: - gSPDisplayList(gMasterDisp++, D_SY_60097E0); + gSPDisplayList(gMasterDisp++, aSyShip1DL); func_demo_8004FCB8(this, 4); break; case 36: Matrix_Scale(gGfxMatrix, this->scale, this->scale, this->scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_SY_601D730); + gSPDisplayList(gMasterDisp++, aSyShip2DL); func_demo_8004FCB8(this, 0); break; @@ -2874,15 +2873,15 @@ void ActorCutscene_Draw(ActorCutscene* this) { case 45: Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_AQ_600EEF0); + gSPDisplayList(gMasterDisp++, aAqBump2DL); break; case 46: - gSPDisplayList(gMasterDisp++, D_AQ_601DE60); + gSPDisplayList(gMasterDisp++, aAqCoralReef2DL); break; case 47: - gSPDisplayList(gMasterDisp++, D_AQ_602B4C0); + gSPDisplayList(gMasterDisp++, aAqRockDL); break; } } diff --git a/src/engine/fox_display.c b/src/engine/fox_display.c index c173c4f6..7ef105e8 100644 --- a/src/engine/fox_display.c +++ b/src/engine/fox_display.c @@ -16,17 +16,17 @@ f32 D_display_801615A8[4]; f32 D_display_801615B8[4]; s32 D_display_800CA220 = 0; -u8 sPlayersVisible[] = { 0, 0, 0, 0 }; // -s32 sDrawCockpit = 0; // -s32 D_display_800CA22C = false; // +u8 sPlayersVisible[] = { false, false, false, false }; +bool sDrawCockpit = false; +s32 D_display_800CA22C = false; f32 gCamDistortion = 0.0f; 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 }; // +f32 D_display_800CA23C[3] = { 0.5f, 0.25f, 0.25f }; +f32 D_display_800CA248[3] = { 2.0f, 1.0f, 0.5f }; void Display_DrawHelpAlert(void) { - s32 sp7C; + bool sp7C; f32 sp78; f32 sp74; Vec3f sp68; @@ -60,9 +60,9 @@ void Display_DrawHelpAlert(void) { Matrix_MultVec3f(gCalcMatrix, &sp68, &sp5C); - sp7C = 0; + sp7C = false; if ((sp5C.z < 0.0f) && (sp5C.z > -12000.0f) && (fabsf(sp5C.x) < fabsf(sp5C.z * 0.4f))) { - sp7C = 1; + sp7C = true; } RCP_SetupDL(&gMasterDisp, SETUPDL_12); @@ -80,7 +80,7 @@ void Display_DrawHelpAlert(void) { } switch (sp7C) { - case 0: + case false: if (gTeamHelpActor->sfxSource[0] > 0.0f) { sp78 = 20.0f; sp74 = M_PI / 2; @@ -97,7 +97,7 @@ void Display_DrawHelpAlert(void) { Matrix_Pop(&gGfxMatrix); break; - case 1: + case true: Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 20.0f, 0.0f, -50.0f, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, -M_PI / 2, MTXF_APPLY); @@ -117,7 +117,7 @@ void Display_DrawHelpAlert(void) { } switch (sp7C) { - case 0: + case false: RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255); if (sp78 < 0.0f) { @@ -127,7 +127,7 @@ void Display_DrawHelpAlert(void) { } break; - case 1: + case true: RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255); Graphics_DisplaySmallText(43 - 19, 106, 1.0f, 1.0f, "HELP!!"); @@ -137,7 +137,7 @@ void Display_DrawHelpAlert(void) { } } -bool func_display_800520FC(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, void* data) { +bool Display_OnFootCharacter_OverrideLimbDraw(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, void* data) { Player* player = (Player*) data; gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); @@ -194,7 +194,7 @@ bool func_display_800520FC(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, return false; } -void func_display_800523A8(s32 limbIndex, Vec3f* rot, void* data) { +void Display_OnFootFox_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* data) { Vec3f sp1C; Player* player = (Player*) data; @@ -206,7 +206,7 @@ void func_display_800523A8(s32 limbIndex, Vec3f* rot, void* data) { } } -void func_display_80052420(s32 limbIndex, Vec3f* rot, void* data) { +void Display_OnFootPeppy_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* data) { Vec3f sp1C; Player* player = (Player*) data; @@ -218,7 +218,7 @@ void func_display_80052420(s32 limbIndex, Vec3f* rot, void* data) { } } -void func_display_80052498(s32 limbIndex, Vec3f* rot, void* data) { +void Display_OnFootSlippy_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* data) { Vec3f sp1C; Player* player = (Player*) data; @@ -230,7 +230,7 @@ void func_display_80052498(s32 limbIndex, Vec3f* rot, void* data) { } } -void func_display_8005250C(s32 limbIndex, Vec3f* rot, void* data) { +void Display_OnFootFalco_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* data) { Vec3f sp1C; Player* player = (Player*) data; @@ -242,7 +242,7 @@ void func_display_8005250C(s32 limbIndex, Vec3f* rot, void* data) { } } -void func_display_80052584(Player* player) { +void Display_OnFootMuzzleFlash(Player* player) { Matrix_Push(&gGfxMatrix); Matrix_Copy(gGfxMatrix, &gIdentityMatrix); if ((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (player->csTimer != 0)) { @@ -258,34 +258,34 @@ void func_display_80052584(Player* player) { Matrix_Pop(&gGfxMatrix); } -void func_display_800526B8(Player* player) { +void Display_OnFootCharacter(Player* player) { Matrix_Push(&gGfxMatrix); Matrix_Scale(gCalcMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY); Matrix_Translate(gCalcMatrix, 0.0f, 35.0f, 0.0f, MTXF_APPLY); switch (player->num) { case 0: - Animation_DrawSkeleton(5, D_versus_301D258, player->jointTable, func_display_800520FC, - func_display_800523A8, player, gCalcMatrix); + Animation_DrawSkeleton(5, aVsOnFootFoxSkel, player->jointTable, Display_OnFootCharacter_OverrideLimbDraw, + Display_OnFootFox_PostLimbDraw, player, gCalcMatrix); break; case 1: - Animation_DrawSkeleton(5, D_versus_301DB94, player->jointTable, func_display_800520FC, - func_display_80052420, player, gCalcMatrix); + Animation_DrawSkeleton(5, aVsOnFootPeppySkel, player->jointTable, Display_OnFootCharacter_OverrideLimbDraw, + Display_OnFootPeppy_PostLimbDraw, player, gCalcMatrix); break; case 2: - Animation_DrawSkeleton(5, D_versus_301E3E8, player->jointTable, func_display_800520FC, - func_display_80052498, player, gCalcMatrix); + Animation_DrawSkeleton(5, aVsOnFootSlippySkel, player->jointTable, Display_OnFootCharacter_OverrideLimbDraw, + Display_OnFootSlippy_PostLimbDraw, player, gCalcMatrix); break; case 3: - Animation_DrawSkeleton(5, D_versus_301C614, player->jointTable, func_display_800520FC, - func_display_8005250C, player, gCalcMatrix); + Animation_DrawSkeleton(5, aVsOnFootFalcoSkel, player->jointTable, Display_OnFootCharacter_OverrideLimbDraw, + Display_OnFootFalco_PostLimbDraw, player, gCalcMatrix); break; } Matrix_Pop(&gGfxMatrix); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); } -void func_display_80052884(Player* player) { +void Display_Landmaster(Player* player) { f32 sp64; Vec3f sp58; Vec3f sp4C = { 0.0f, 0.0f, 90.0f }; @@ -294,9 +294,9 @@ void func_display_80052884(Player* player) { Matrix_Push(&gGfxMatrix); if (!gVersusMode) { - gSPDisplayList(gMasterDisp++, D_landmaster_3000090); + gSPDisplayList(gMasterDisp++, aLandmasterModelDL); } else { - gSPDisplayList(gMasterDisp++, D_versus_300FB80); + gSPDisplayList(gMasterDisp++, aVsLandmasterModelDL); } Matrix_MultVec3f(gGfxMatrix, &sp40, &D_display_80161518[player->num]); @@ -324,9 +324,9 @@ void func_display_80052884(Player* player) { RCP_SetupDL_64(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 64, 255, 64, 255); } - gSPDisplayList(gMasterDisp++, D_landmaster_3004680); + gSPDisplayList(gMasterDisp++, aLandmasterCanonDL); } else { - gSPDisplayList(gMasterDisp++, D_versus_301F140); + gSPDisplayList(gMasterDisp++, aVsLandmasterCanonDL); } Matrix_MultVec3f(gGfxMatrix, &sp4C, &D_display_80161548[player->num]); @@ -338,10 +338,10 @@ Gfx* D_display_800CA27C[] = { D_arwing_3001C90, D_arwing_3016CC0, D_arwing_3005A f32 D_display_800CA28C = 2.0f; f32 D_display_800CA290 = 13.0f; f32 D_display_800CA294 = -10.0f; -f32 sCrosshairScales[] = { 0.0f, 0.0f, 0.0f, 0.0f }; +f32 sReticleScales[] = { 0.0f, 0.0f, 0.0f, 0.0f }; f32 sPlayerShadowing = 0.0f; -void func_display_80052B80(Player* player) { +void Display_LandmasterMuzzleFlash(Player* player) { Matrix_Push(&gGfxMatrix); if ((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (player->unk_1A0 != 0)) { @@ -367,7 +367,7 @@ void func_display_80052B80(Player* player) { Matrix_Pop(&gGfxMatrix); } -void func_display_80052D48(Player* player) { +void Display_LandmasterThrusters(Player* player) { f32 sp2C; Matrix_Push(&gGfxMatrix); @@ -387,17 +387,22 @@ void func_display_80052D48(Player* player) { if (!gVersusMode) { sp2C *= 1.1f; } + if ((gGameFrameCount % 2) != 0) { sp2C *= 1.1f; } + Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 20.0f, 30.0f, -10.0f, MTXF_APPLY); + if (!gVersusMode) { Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY); } + Matrix_Scale(gGfxMatrix, sp2C, sp2C, sp2C, MTXF_APPLY); Matrix_Translate(gGfxMatrix, 0.0f, -30.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); + if (!gVersusMode) { gSPDisplayList(gMasterDisp++, D_landmaster_30066B0); } else { @@ -411,17 +416,22 @@ void func_display_80052D48(Player* player) { if (!gVersusMode) { sp2C *= 1.1f; } + if ((gGameFrameCount % 2) != 0) { sp2C *= 1.1f; } + Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, -20.0f, 30.0f, -10.0f, MTXF_APPLY); + if (!gVersusMode) { Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY); } + Matrix_Scale(gGfxMatrix, sp2C, sp2C, sp2C, MTXF_APPLY); Matrix_Translate(gGfxMatrix, 0.0f, -30.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); + if (!gVersusMode) { gSPDisplayList(gMasterDisp++, D_landmaster_30066B0); } else { @@ -432,19 +442,19 @@ void func_display_80052D48(Player* player) { Matrix_Pop(&gGfxMatrix); } -void func_display_8005314C(void) { +void Display_SetCullingMode(void) { if (gReflectY != 0) { gSPSetGeometryMode(gMasterDisp++, G_CULL_FRONT); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); } } -bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, void* wingData) { +bool Display_ArwingWingsOverrideLimbDraw(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, void* wingData) { WingInfo* wings = (WingInfo*) wingData; if (D_display_800CA22C && (gPlayer[0].dmgEffect == 0)) { RCP_SetupDL(&gMasterDisp, SETUPDL_29); - func_display_8005314C(); + Display_SetCullingMode(); } switch (limbIndex) { @@ -457,7 +467,7 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, } if (D_display_800CA22C && ((gRightWingFlashTimer[0] % 2) != 0)) { RCP_SetupDL(&gMasterDisp, SETUPDL_34); - func_display_8005314C(); + Display_SetCullingMode(); if (gRightWingFlashTimer[0] > 1000) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 32, 32, 255, 255); } else { @@ -473,7 +483,7 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, } if (D_display_800CA22C && ((gRightWingFlashTimer[0] % 2) != 0)) { RCP_SetupDL(&gMasterDisp, SETUPDL_34); - func_display_8005314C(); + Display_SetCullingMode(); if (gRightWingFlashTimer[0] > 1000) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 32, 32, 255, 255); } else { @@ -491,7 +501,7 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, } if (D_display_800CA22C && ((gLeftWingFlashTimer[0] % 2) != 0)) { RCP_SetupDL(&gMasterDisp, SETUPDL_34); - func_display_8005314C(); + Display_SetCullingMode(); if (gLeftWingFlashTimer[0] > 1000) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 32, 32, 255, 255); } else { @@ -507,7 +517,7 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, } if (D_display_800CA22C && ((gLeftWingFlashTimer[0] % 2) != 0)) { RCP_SetupDL(&gMasterDisp, SETUPDL_34); - func_display_8005314C(); + Display_SetCullingMode(); if (gLeftWingFlashTimer[0] > 1000) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 32, 32, 255, 255); } else { @@ -548,7 +558,7 @@ bool func_display_800531A4(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, return false; } -void func_display_80053658(WingInfo* wings) { +void Display_ArwingWings(WingInfo* wings) { Vec3f sp68[30]; s32 modelId; @@ -560,15 +570,16 @@ void func_display_80053658(WingInfo* wings) { } if (gGameState == GSTATE_PLAY) { - Animation_DrawSkeleton(1, D_arwing_3016610, gPlayer[0].jointTable, func_display_800531A4, NULL, wings, - &gIdentityMatrix); + Animation_DrawSkeleton(1, D_arwing_3016610, gPlayer[0].jointTable, Display_ArwingWingsOverrideLimbDraw, NULL, + wings, &gIdentityMatrix); } else { if (gGameState == GSTATE_MENU) { Animation_GetFrameData(&D_arwing_3015AF4, 0, sp68); } else { Animation_GetFrameData(&D_arwing_3015C28, 0, sp68); } - Animation_DrawSkeleton(1, D_arwing_3016610, sp68, func_display_800531A4, NULL, wings, &gIdentityMatrix); + Animation_DrawSkeleton(1, D_arwing_3016610, sp68, Display_ArwingWingsOverrideLimbDraw, NULL, wings, + &gIdentityMatrix); } D_display_800CA22C = false; @@ -620,10 +631,11 @@ void func_display_80053658(WingInfo* wings) { Matrix_Pop(&gGfxMatrix); } -void func_display_80053B00(f32 arg0, f32 arg1, UNK_TYPE arg2, UNK_TYPE arg3) { +void Display_Unused(f32 arg0, f32 arg1, UNK_TYPE arg2, UNK_TYPE arg3) { + /* Unimplemented. */ } -void func_display_80053B18(void) { +void Display_CockpitGlass(void) { Matrix_Push(&gGfxMatrix); Matrix_Copy(gGfxMatrix, &D_display_80161418[0]); Matrix_Translate(gGfxMatrix, 0.0f, D_display_800CA290, D_display_800CA294, MTXF_APPLY); @@ -637,11 +649,11 @@ void func_display_80053B18(void) { Matrix_Pop(&gGfxMatrix); } -void func_display_80053C38(Player* player, s32 arg1) { +void Display_Arwing(Player* player, s32 reflectY) { Vec3f sp4C; f32 sp48; - if ((gPlayerNum == player->num) && (arg1 == 0)) { + if ((gPlayerNum == player->num) && (reflectY == 0)) { sp48 = 0.0f; if (gChargeTimers[player->num] >= 20) { sp48 = (s32) (gGameFrameCount % 8U) * 80.0f; @@ -656,8 +668,8 @@ void func_display_80053C38(Player* player, s32 arg1) { if (player->alternateView && (gLevelMode == LEVELMODE_ON_RAILS) && (fabsf(player->trueZpos + gPathProgress - player->cam.eye.z) < 10.0f)) { - if (arg1 == 0) { - sDrawCockpit = 1; + if (reflectY == 0) { + sDrawCockpit = true; Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, -8.0f, 5.0f, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); @@ -684,13 +696,13 @@ void func_display_80053C38(Player* player, s32 arg1) { player->wings.unk_10 = 0.0f; } D_display_800CA22C = true; - gReflectY = arg1; - func_display_80053658(&player->wings); + gReflectY = reflectY; + Display_ArwingWings(&player->wings); } } } -void func_display_80053F7C(Player* player) { +void Display_Reticle(Player* player) { Vec3f* translate; s32 i; @@ -708,7 +720,7 @@ void func_display_80053F7C(Player* player) { if (i == 1) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 255); - Math_SmoothStepToF(&sCrosshairScales[player->num], 2.0f, 1.0f, 0.4f, 0.0f); + Math_SmoothStepToF(&sReticleScales[player->num], 2.0f, 1.0f, 0.4f, 0.0f); } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255); gDPSetEnvColor(gMasterDisp++, 255, 255, 0, 255); @@ -718,9 +730,8 @@ void func_display_80053F7C(Player* player) { } if (i == 1) { - Matrix_Scale(gGfxMatrix, sCrosshairScales[player->num], sCrosshairScales[player->num], 1.0f, - MTXF_APPLY); - Math_SmoothStepToF(&sCrosshairScales[player->num], 1.0f, 1.0f, 0.2f, 0.0f); + Matrix_Scale(gGfxMatrix, sReticleScales[player->num], sReticleScales[player->num], 1.0f, MTXF_APPLY); + Math_SmoothStepToF(&sReticleScales[player->num], 1.0f, 1.0f, 0.2f, 0.0f); } Matrix_Scale(gGfxMatrix, 4.0f, 4.0f, 4.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -730,24 +741,24 @@ void func_display_80053F7C(Player* player) { } } -void func_display_80054280(Player* player, s32 arg1) { +void Display_DrawPlayer(Player* player, s32 reflectY) { switch (player->form) { case FORM_ARWING: - func_display_80053C38(player, arg1); + Display_Arwing(player, reflectY); break; case FORM_LANDMASTER: - func_display_80052884(player); + Display_Landmaster(player); break; case FORM_BLUE_MARINE: - Aquas_801ACBB4(player); + Aquas_BlueMarine_Draw(player); break; case FORM_ON_FOOT: - func_display_800526B8(player); + Display_OnFootCharacter(player); break; } } -void func_display_80054300(Player* player) { +void Display_PlayerShadow_Draw(Player* player) { Math_SmoothStepToF(&sPlayerShadowing, player->shadowing, 1.0f, 10.0f, 0.0f); RCP_SetupDL(&gMasterDisp, SETUPDL_66); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, (s32) sPlayerShadowing); @@ -803,7 +814,7 @@ void func_display_80054300(Player* player) { } } -void Play_DrawEngineGlow(s32 levelType) { +void Display_DrawEngineGlow(s32 levelType) { RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); @@ -824,7 +835,7 @@ void Play_DrawEngineGlow(s32 levelType) { gSPDisplayList(gMasterDisp++, D_1024AC0); } -void func_display_8005478C(Player* player) { +void Display_LandmasterEngineGlow_Draw(Player* player) { RCP_SetupDL_64(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 100); Matrix_Push(&gGfxMatrix); @@ -846,14 +857,14 @@ void func_display_8005478C(Player* player) { Matrix_Scale(gGfxMatrix, 0.9f * 0.9f, 0.9f * 0.63f, 1.0f, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); - Play_DrawEngineGlow(gLevelType); + Display_DrawEngineGlow(gLevelType); Matrix_Pop(&gGfxMatrix); } -void func_display_80054914(Player* player) { - f32 sp4C; - Vec3f sp40; - Vec3f sp34; +void Display_BarrelRollShield(Player* player) { + f32 zRotDirection; + Vec3f src; + Vec3f dest; if (player->barrelRollAlpha != 0) { Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + player->damageShake + 180.0f) * M_DTOR, @@ -866,23 +877,23 @@ void func_display_80054914(Player* player) { Matrix_Translate(gCalcMatrix, player->xShake, player->yBob, 0.0f, MTXF_APPLY); - sp40.x = 0.0f; - sp40.y = 0.0f; - sp40.z = -30.0f; + src.x = 0.0f; + src.y = 0.0f; + src.z = -30.0f; - Matrix_MultVec3f(gCalcMatrix, &sp40, &sp34); + Matrix_MultVec3f(gCalcMatrix, &src, &dest); - sp4C = 1.0f; + zRotDirection = 1.0f; if (player->baseRollRate < 0) { - sp4C = -1.0f; + zRotDirection = -1.0f; } Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, player->pos.x + sp34.x, player->pos.y + sp34.y, - player->trueZpos + player->zPath + sp34.z, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, player->pos.x + dest.x, player->pos.y + dest.y, + player->trueZpos + player->zPath + dest.z, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].camPitch, MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 20.0f * sp4C * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 20.0f * zRotDirection * M_DTOR, MTXF_APPLY); if (player->form == FORM_ARWING) { Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, MTXF_APPLY); @@ -898,12 +909,12 @@ void func_display_80054914(Player* player) { RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, player->barrelRollAlpha); gDPSetEnvColor(gMasterDisp++, 0, 0, 160, player->barrelRollAlpha); - gSPDisplayList(gMasterDisp++, D_101DC10); + gSPDisplayList(gMasterDisp++, aBarrelRollTex); Matrix_Pop(&gGfxMatrix); } } -void func_display_80054CA4(Player* player) { +void Display_UnusedShield(Player* player) { if (gShieldAlpha[player->num] > 1.0f) { Matrix_Push(&gGfxMatrix); Matrix_Copy(gGfxMatrix, &D_display_80161418[player->num]); @@ -913,14 +924,14 @@ void func_display_80054CA4(Player* player) { RCP_SetupDL(&gMasterDisp, SETUPDL_68); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 255, 255, (s32) gShieldAlpha[player->num]); gDPSetEnvColor(gMasterDisp++, 255, 0, 255, (s32) gShieldAlpha[player->num]); - gSPDisplayList(gMasterDisp++, D_101CD70); + gSPDisplayList(gMasterDisp++, aUnusedShieldDL); Matrix_Pop(&gGfxMatrix); - Texture_Scroll(D_101D070, 32, 32, 3); - Texture_Scroll(D_101D070, 32, 32, 3); + Texture_Scroll(aUnusedShieldTex, 32, 32, 3); + Texture_Scroll(aUnusedShieldTex, 32, 32, 3); } } -void func_display_80054E80(Player* player) { +void Display_ArwingLaserCharge(Player* player) { Vec3f spC4 = { 0.0f, -5.0f, 60.0f }; Vec3f spB8 = { 0.0f, -14.0f, 60.0f }; Vec3f spAC = { 30.0f, -10.0f, 30.0f }; @@ -933,6 +944,7 @@ void func_display_80054E80(Player* player) { if (gChargeTimers[player->num] > 10) { RCP_SetupDL(&gMasterDisp, SETUPDL_67); Matrix_Copy(gCalcMatrix, &D_display_80161418[player->num]); + if (player->alternateView && (gLevelMode == LEVELMODE_ON_RAILS)) { Matrix_MultVec3f(gCalcMatrix, &spB8, &sp94); } else { @@ -1013,17 +1025,21 @@ 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->alternateView && (gLevelMode == LEVELMODE_ON_RAILS)) { Matrix_MultVec3f(gCalcMatrix, &spB8, &sp94); } else { Matrix_MultVec3f(gCalcMatrix, &spC4, &sp94); } + Matrix_Push(&gGfxMatrix); + Matrix_Translate(gGfxMatrix, sp94.x, sp94.y, sp94.z, MTXF_NEW); Matrix_Scale(gGfxMatrix, gMuzzleFlashScale[player->num], gMuzzleFlashScale[player->num], 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); + Matrix_Pop(&gGfxMatrix); break; @@ -1045,12 +1061,14 @@ void func_display_80054E80(Player* player) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); Matrix_Pop(&gGfxMatrix); + Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, sp88.x, sp88.y, sp88.z, MTXF_NEW); Matrix_Scale(gGfxMatrix, gMuzzleFlashScale[player->num], gMuzzleFlashScale[player->num], 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); + Matrix_Pop(&gGfxMatrix); break; } @@ -1058,17 +1076,22 @@ void func_display_80054E80(Player* player) { } } -void func_display_80055788(Player* player) { +void Display_LandmasterLaserCharge(Player* player) { f32 sp54; if (gChargeTimers[player->num] > 10) { RCP_SetupDL(&gMasterDisp, SETUPDL_67); Matrix_Push(&gGfxMatrix); + sp54 = gChargeTimers[player->num] / 20.0f; + Matrix_Translate(gGfxMatrix, D_display_80161548[player->num].x, D_display_80161548[player->num].y, D_display_80161548[player->num].z, MTXF_NEW); + Matrix_Scale(gGfxMatrix, sp54, sp54, 1.0f, MTXF_APPLY); + Matrix_Push(&gGfxMatrix); + Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 10.0f, MTXF_APPLY); RCP_SetupDL(&gMasterDisp, SETUPDL_49); @@ -1096,9 +1119,11 @@ void func_display_80055788(Player* player) { Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 53.0f * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_101C2E0); + Matrix_RotateZ(gGfxMatrix, gGameFrameCount * -53.0f * 2.0f * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_101C2E0); + Matrix_Pop(&gGfxMatrix); Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 1.0f, MTXF_APPLY); @@ -1113,9 +1138,9 @@ void func_display_80055788(Player* player) { } } -void func_display_80055B58(Player* player) { - Vec3f sp4C; - Vec3f sp40; +void Display_PlayerFeatures(Player* player) { + Vec3f src; + Vec3f dest; f32 var_fv0; s32 pad[3]; @@ -1137,43 +1162,43 @@ void func_display_80055B58(Player* player) { var_fv0 = 30.0f; } - sp4C.x = 0; - sp4C.y = 0; - sp4C.z = -40.0f - var_fv0; + src.x = 0; + src.y = 0; + src.z = -40.0f - var_fv0; - Matrix_MultVec3f(gCalcMatrix, &sp4C, &sp40); + Matrix_MultVec3f(gCalcMatrix, &src, &dest); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, player->pos.x + sp40.x, player->pos.y + sp40.y, - player->trueZpos + player->zPath + sp40.z, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, player->pos.x + dest.x, player->pos.y + dest.y, + player->trueZpos + player->zPath + dest.z, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].camPitch, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - func_display_8005478C(player); + Display_LandmasterEngineGlow_Draw(player); Matrix_Pop(&gGfxMatrix); - func_display_80054914(player); - func_display_80054CA4(player); - func_display_80054E80(player); + Display_BarrelRollShield(player); + Display_UnusedShield(player); + Display_ArwingLaserCharge(player); break; case FORM_LANDMASTER: - func_display_80052D48(player); + Display_LandmasterThrusters(player); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, D_display_80161518[player->num].x, D_display_80161518[player->num].y, D_display_80161518[player->num].z, MTXF_NEW); Matrix_SetGfxMtx(&gMasterDisp); - func_display_8005478C(player); + Display_LandmasterEngineGlow_Draw(player); Matrix_Pop(&gGfxMatrix); - func_display_80055788(player); + Display_LandmasterLaserCharge(player); break; case FORM_BLUE_MARINE: - func_display_80054914(player); + Display_BarrelRollShield(player); break; } } } -void func_display_80055E98(Player* player) { +void Display_ArwingWingTrail_Draw(Player* player) { f32 sp5C = 70.0f; f32 sp58 = -18.0f; f32 sp54; @@ -1236,7 +1261,7 @@ void func_display_80055E98(Player* player) { } } -void func_display_80056230(Player* player) { +void Display_ArwingWingTrail_Update(Player* player) { if (player->draw && (player->form == FORM_ARWING) && (gCurrentLevel != LEVEL_VENOM_ANDROSS) && (gCurrentLevel != LEVEL_TRAINING) && (gLevelType == LEVELTYPE_PLANET)) { Matrix_Push(&gGfxMatrix); @@ -1247,37 +1272,38 @@ void func_display_80056230(Player* player) { MTXF_APPLY); Matrix_Translate(gGfxMatrix, player->xShake, player->yBob, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - func_display_80055E98(player); + Display_ArwingWingTrail_Draw(player); Matrix_Pop(&gGfxMatrix); } } -bool func_display_800563B4(s32 index, s32 arg1) { - Vec3f sp2C = { 0.0f, 0.0f, 0.0f }; - Vec3f sp20; +bool Display_CheckPlayerVisible(s32 index, s32 reflectY) { + Vec3f src = { 0.0f, 0.0f, 0.0f }; + Vec3f dest; - Matrix_MultVec3f(gGfxMatrix, &sp2C, &sp20); + Matrix_MultVec3f(gGfxMatrix, &src, &dest); - if ((sp20.z < 200.0f) && (sp20.z > -12000.0f)) { - if (fabsf(sp20.x) < (fabsf(sp20.z * 0.5f) + 500.0f)) { - if (fabsf(sp20.y) < (fabsf(sp20.z * 0.5f) + 500.0f)) { - if (arg1 == 0) { - sPlayersVisible[index] = 1; + if ((dest.z < 200.0f) && (dest.z > -12000.0f)) { + if (fabsf(dest.x) < (fabsf(dest.z * 0.5f) + 500.0f)) { + if (fabsf(dest.y) < (fabsf(dest.z * 0.5f) + 500.0f)) { + if (reflectY == 0) { + sPlayersVisible[index] = true; } return true; } } } - if (arg1 == 0) { - sPlayersVisible[index] = 0; + if (reflectY == 0) { + sPlayersVisible[index] = false; } return false; } +// unused s32 D_display_800CA2E8[16] = { 60, 40, 20, 20, 20, 20, 20, 20, 0, 0, 0, 0, 0, 0, 0, 0 }; -void func_display_800564C0(Player* player, s32 arg1) { +void Display_Player_Update(Player* player, s32 reflectY) { s32 i; Vec3f sp50 = { 0.0f, 0.0f, 0.0f }; @@ -1304,7 +1330,7 @@ void func_display_800564C0(Player* player, s32 arg1) { } } - if (!func_display_800563B4(player->num, arg1)) { + if (!Display_CheckPlayerVisible(player->num, reflectY)) { Matrix_Pop(&gGfxMatrix); return; } @@ -1324,7 +1350,7 @@ void func_display_800564C0(Player* player, s32 arg1) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, player->pos.x, player->pos.y, player->trueZpos + player->zPath, MTXF_APPLY); - if (!func_display_800563B4(player->num, arg1)) { + if (!Display_CheckPlayerVisible(player->num, reflectY)) { Matrix_Pop(&gGfxMatrix); Matrix_Pop(&gGfxMatrix); return; @@ -1357,7 +1383,7 @@ void func_display_800564C0(Player* player, s32 arg1) { } } - if (!func_display_800563B4(player->num, arg1)) { + if (!Display_CheckPlayerVisible(player->num, reflectY)) { Matrix_Pop(&gGfxMatrix); return; } @@ -1398,12 +1424,12 @@ void func_display_800564C0(Player* player, s32 arg1) { break; } - if (arg1 != 0) { + if (reflectY != 0) { Object_ApplyWaterDistortion(); } else { Matrix_Copy(&D_display_80161418[player->num], gGfxMatrix); } - func_display_80054280(player, arg1); + Display_DrawPlayer(player, reflectY); Matrix_Pop(&gGfxMatrix); } } @@ -1411,16 +1437,16 @@ void func_display_800564C0(Player* player, s32 arg1) { f32 D_display_800CA334[] = { 0.02f, 0.06f, 0.08f, 0.05f, 0.04f, 0.03f, 0.06f, 0.04f, }; -Gfx* D_display_800CA354[] = { - D_1024570, D_1024570, D_10246D0, D_1024410, D_1024410, D_1024410, - D_1024410, D_1024410, D_D000000, D_D00B5C0, D_D00B720, +Gfx* sTeammateMarkDLs[] = { + aFalcoMarkDL, aFalcoMarkDL, aSlippyMarkDL, aPeppyMarkDL, aPeppyMarkDL, aPeppyMarkDL, + aPeppyMarkDL, aPeppyMarkDL, aKattMarkDL, aBillMarkDL, aJamesMarkDL, }; f32 D_display_800CA380 = 0.0f; f32 D_display_800CA384 = 0.0f; f32 D_display_800CA388 = -300.0f; f32 D_display_800CA38C[] = { 0.0f, -300.0f, -150.0f, -50.0f }; -void func_display_80056E2C(Player* player) { +void Display_PlayerShadow_Update(Player* player) { f32 sp34; f32 sp30; f32 sp2C; @@ -1428,6 +1454,7 @@ void func_display_80056E2C(Player* player) { if (player->draw && !player->hideShadow) { sp34 = D_display_800CA334[gGameFrameCount % 8U]; sp30 = D_display_800CA334[(gGameFrameCount + 4) % 8U]; + if (player->grounded) { sp34 = sp30 = 0.0f; } @@ -1450,6 +1477,7 @@ void func_display_80056E2C(Player* player) { Matrix_RotateY(gGfxMatrix, player->groundRotY, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, player->shadowRotX, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, player->shadowRotZ, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.8f + sp34, 0.0f, 0.8f + sp30, MTXF_APPLY); if ((player->form == FORM_ARWING) || (player->form == FORM_BLUE_MARINE) || (player->form == FORM_ON_FOOT)) { @@ -1472,17 +1500,18 @@ void func_display_80056E2C(Player* player) { Matrix_RotateY(gGfxMatrix, player->rot.y * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, (-player->zRotBank - player->zRotBarrelRoll) * M_DTOR, MTXF_APPLY); } - func_display_80054300(player); + Display_PlayerShadow_Draw(player); Matrix_Pop(&gGfxMatrix); } } -void func_display_80057248(void) { +void Display_ActorMarks(void) { s32 i; f32 var_fs0; if ((gGameFrameCount & 4) == 0) { RCP_SetupDL_40(); + for (i = 0; i < ARRAY_COUNT(gTeamArrowsViewPos); i++) { if (gTeamArrowsViewPos[i].z < 0.0f) { var_fs0 = (VEC3F_MAG(&gTeamArrowsViewPos[i])) * 0.0015f; @@ -1491,20 +1520,24 @@ void func_display_80057248(void) { } else if (var_fs0 < 1.0f) { var_fs0 = 1.0f; } + Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, gTeamArrowsViewPos[i].x, gTeamArrowsViewPos[i].y, gTeamArrowsViewPos[i].z, MTXF_APPLY); Matrix_Scale(gGfxMatrix, var_fs0 * 0.25f, var_fs0 * 0.25f, 1.0f, MTXF_APPLY); + if ((i == 0) && (gCurrentLevel == LEVEL_SECTOR_Z)) { Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 1.0f, MTXF_APPLY); } + Matrix_Translate(gGfxMatrix, 0.0f, 150.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetTextureFilter(gMasterDisp++, G_TF_POINT); + if ((i == 0) && (gCurrentLevel == LEVEL_SECTOR_Z)) { - gSPDisplayList(gMasterDisp++, D_SZ_6004330); + gSPDisplayList(gMasterDisp++, aSzMissileMark); } else { - gSPDisplayList(gMasterDisp++, D_display_800CA354[i]); + gSPDisplayList(gMasterDisp++, sTeammateMarkDLs[i]); } Matrix_Pop(&gGfxMatrix); } @@ -1515,7 +1548,7 @@ void func_display_80057248(void) { } } -void func_display_80057504(void) { +void Display_LockOnIndicator(void) { s32 i; s32 j; f32 var_fs0; @@ -1558,7 +1591,7 @@ void func_display_80057504(void) { } } -void func_display_80057814(Player* player) { +void Display_SetupPlayerSfxPos(Player* player) { Vec3f sp2C; Vec3f sp20; @@ -1578,7 +1611,7 @@ void func_display_80057814(Player* player) { player->sfx.zRot = player->bankAngle; } -void func_display_800578C4(Player* player) { +void Display_CsLevelCompleteHandleCamera(Player* player) { Vec3f sp4C = { 0.0f, 0.0f, -300.0f }; Vec3f sp40; f32 sp3C; @@ -1596,6 +1629,7 @@ void func_display_800578C4(Player* player) { gPlayCamAt.z = player->cam.at.z; break; + // Seems unused. Some sort of debugging code leftover? case 1: case 2: case 3: @@ -1606,6 +1640,7 @@ void func_display_800578C4(Player* player) { if (sp38 < 0.0f) { sp38 += 360.0f; } + sp3C = (Math_RadToDeg(player->camYaw) + 180.0f) - player->rot.y; if (sp3C > 360.0f) { sp3C -= 360.0f; @@ -1614,11 +1649,14 @@ void func_display_800578C4(Player* player) { sp3C += 360.0f; } sp3C = 360.0f - sp3C; + Math_SmoothStepToAngle(&player->wings.unk_30, sp38, 0.2f, 6.0f, 0.0f); Math_SmoothStepToAngle(&player->wings.unk_34, sp3C, 0.2f, 6.0f, 0.0f); - Math_SmoothStepToF(&D_display_800CA380, gControllerPress->stick_y * 0.75f, 0.1f, 2.0f, 0.0f); - Math_SmoothStepToF(&D_display_800CA384, gControllerPress->stick_x * 3.0f, 0.1f, 5.0f, 0.0f); + + Math_SmoothStepToF(&D_display_800CA380, gControllerPress[0].stick_y * 0.75f, 0.1f, 2.0f, 0.0f); + Math_SmoothStepToF(&D_display_800CA384, gControllerPress[0].stick_x * 3.0f, 0.1f, 5.0f, 0.0f); Math_SmoothStepToF(&D_display_800CA388, D_display_800CA38C[D_display_800CA220], 0.1f, 10.0f, 0.0f); + sp4C.z = D_display_800CA388; Matrix_RotateX(gCalcMatrix, (player->rot.y + D_display_800CA380) * M_DTOR, MTXF_NEW); Matrix_RotateY(gCalcMatrix, (player->rot.x + D_display_800CA384) * M_DTOR, MTXF_APPLY); @@ -1633,7 +1671,7 @@ void func_display_800578C4(Player* player) { } } -void Play_Draw(void) { +void Display_Update(void) { s32 i; Vec3f tempVec; Vec3f playerCamUp; @@ -1642,8 +1680,9 @@ void Play_Draw(void) { Player* player; Player* camPlayer = &gPlayer[gPlayerNum]; - sDrawCockpit = 0; + sDrawCockpit = false; + // 511 hit count cap if (gHitCount > 511) { gHitCount = 511; } @@ -1689,7 +1728,7 @@ void Play_Draw(void) { gPlayCamAt.x += SIN_DEG(gGameFrameCount * 150.0f) * camPlayer->boostSpeed * 0.2f; } } else if (camPlayer->state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) { - func_display_800578C4(camPlayer); + Display_CsLevelCompleteHandleCamera(camPlayer); } else { gPlayCamEye.x = camPlayer->cam.eye.x; gPlayCamEye.y = camPlayer->cam.eye.y; @@ -1740,13 +1779,13 @@ void Play_Draw(void) { Lights_SetOneLight(&gMasterDisp, gLight2x, gLight2y, gLight2z, gLight2R, gLight2G, gLight2B, gAmbientR, gAmbientG, gAmbientB); - for (i = 0, player = gPlayer; i < gCamCount; i++, player++) { + for (i = 0, player = &gPlayer[0]; i < gCamCount; i++, player++) { playerPos.x = player->pos.x; playerPos.y = player->pos.y; playerPos.z = player->trueZpos; Display_SetSecondLight(&playerPos); - func_display_800564C0(player, 0); - func_display_80057814(player); + Display_Player_Update(player, 0); + Display_SetupPlayerSfxPos(player); } if ((gGroundSurface == SURFACE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) { @@ -1754,11 +1793,11 @@ void Play_Draw(void) { gAmbientG, gAmbientB); Matrix_Push(&gGfxMatrix); Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, MTXF_APPLY); - for (i = 0, player = gPlayer; i < gCamCount; i++, player++) { + for (i = 0, player = &gPlayer[0]; i < gCamCount; i++, player++) { playerPos.x = player->pos.x; playerPos.y = player->pos.y; playerPos.z = player->trueZpos; - func_display_800564C0(player, 1); + Display_Player_Update(player, 1); } Matrix_Pop(&gGfxMatrix); } @@ -1783,10 +1822,10 @@ void Play_Draw(void) { if ((gGroundSurface == SURFACE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) { Matrix_Push(&gGfxMatrix); Matrix_Scale(gGfxMatrix, 1.0f, -1.0f, 1.0f, MTXF_APPLY); - for (i = 0, player = gPlayer; i < gCamCount; i++, player++) { - if (sPlayersVisible[i] != 0) { - func_display_80055B58(player); - func_display_80056230(player); + for (i = 0, player = &gPlayer[0]; i < gCamCount; i++, player++) { + if (sPlayersVisible[i]) { + Display_PlayerFeatures(player); + Display_ArwingWingTrail_Update(player); } Matrix_Pop(&gGfxMatrix); } @@ -1811,11 +1850,11 @@ void Play_Draw(void) { gReflectY = 1; - for (i = 0, player = gPlayer; i < gCamCount; i++, player++) { - if (sPlayersVisible[i] != 0) { - func_display_80056E2C(player); - func_display_80055B58(player); - func_display_80056230(player); + for (i = 0, player = &gPlayer[0]; i < gCamCount; i++, player++) { + if (sPlayersVisible[i]) { + Display_PlayerShadow_Update(player); + Display_PlayerFeatures(player); + Display_ArwingWingTrail_Update(player); } } @@ -1831,22 +1870,22 @@ void Play_Draw(void) { BonusText_DrawAll(); Matrix_Pop(&gGfxMatrix); - func_display_80057248(); - func_display_80057504(); + Display_ActorMarks(); + Display_LockOnIndicator(); - if (sDrawCockpit != 0) { - func_display_80053B18(); + if (sDrawCockpit) { + Display_CockpitGlass(); } - for (i = 0, player = gPlayer; i < gCamCount; i++, player++) { - if (sPlayersVisible[i] != 0) { - if (gShowCrosshairs[i]) { - func_display_80053F7C(player); + for (i = 0, player = &gPlayer[0]; i < gCamCount; i++, player++) { + if (sPlayersVisible[i]) { + if (gShowReticles[i]) { + Display_Reticle(player); } if (player->form == FORM_LANDMASTER) { - func_display_80052B80(player); + Display_LandmasterMuzzleFlash(player); } else if (player->form == FORM_ON_FOOT) { - func_display_80052584(player); + Display_OnFootMuzzleFlash(player); } } } @@ -1864,6 +1903,6 @@ void Play_Draw(void) { } Matrix_Pop(&gGfxMatrix); Display_DrawHelpAlert(); - sPlayersVisible[gPlayerNum] = 0; + sPlayersVisible[gPlayerNum] = false; Matrix_Pop(&gGfxMatrix); } diff --git a/src/engine/fox_edata.c b/src/engine/fox_edata.c index 56b5af5e..b2c89e75 100644 --- a/src/engine/fox_edata.c +++ b/src/engine/fox_edata.c @@ -4,7 +4,7 @@ f32* D_edata_800CF964[] = { NULL }; // Likely a scrapped array of scenery shadow boxes -void Scenery48_Draw(Scenery* scenery) { +void Ve1SceneryWall1_Draw(Scenery* scenery) { RCP_SetupDL_57(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -12,7 +12,7 @@ void Scenery48_Draw(Scenery* scenery) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } -void Scenery49_Draw(Scenery* scenery) { +void Ve1SceneryWall2_Draw(Scenery* scenery) { RCP_SetupDL_57(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -20,5 +20,5 @@ void Scenery49_Draw(Scenery* scenery) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } -void Actor289_Draw(Actor* actor) { +void AndJamesTrigger_Draw(Actor* actor) { } diff --git a/src/engine/fox_edata_info.c b/src/engine/fox_edata_info.c index 241d4b4e..44484112 100644 --- a/src/engine/fox_edata_info.c +++ b/src/engine/fox_edata_info.c @@ -22,7 +22,7 @@ #include "assets/ast_area_6.h" #include "assets/ast_zoness.h" -f32 gActor241Hitbox[] = { +f32 gZoEnergyBallHitbox[] = { 1.0f, 0.0f, 50.0f, 0.0f, 25.0f, 0.0f, 25.0f, }; f32 gCubeHitbox100[] = { @@ -65,10 +65,10 @@ f32 gItemLasersHitbox[] = { f32 gItemBombHitbox[] = { 1.0f, 0.0f, 120.0f, 0.0f, 120.0f, 0.0f, 120.0f, }; -f32 gActor190_191Hitbox[] = { +f32 gActorMissileSeekHitbox[] = { 1.0f, 0.0f, 40.0f, 0.0f, 40.0f, 0.0f, 40.0f, }; -f32 gActor194Hitbox[] = { +f32 gMeMoraHitbox[] = { 1.0f, 0.0f, 50.0f, 0.0f, 50.0f, 0.0f, 50.0f, }; f32 gTeamHitbox[] = { @@ -93,167 +93,167 @@ f32 gWarpZoneEvent93Hitbox[] = { // clang-format off ObjectInfo gObjectInfo[] = { - /* OBJ_SCENERY_CO_STONE_ARCH, */ {(void*) aCoStoneArchDL, 0, (ObjectFunc) NULL, aCoStoneArchHitbox, 800.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_CO_BUMP_1, */ {(void*) aCoBump1DL, 0, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_CO_BUMP_2, */ {(void*) aCoBump2DL, 0, (ObjectFunc) NULL, gNoHitbox, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_CO_BUMP_3, */ {(void*) aCoBump3DL, 0, (ObjectFunc) NULL, gNoHitbox, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_CO_BUMP_4, */ {(void*) aCoBump4DL, 0, (ObjectFunc) NULL, gNoHitbox, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_CO_BUMP_5, */ {(void*) aCoBump5DL, 0, (ObjectFunc) NULL, gNoHitbox, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_CO_HIGHWAY_1, */ {(void*) aCoHighway1DL, 0, (ObjectFunc) NULL, aCoHighway1Hitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_CO_HIGHWAY_2, */ {(void*) aCoHighway2DL, 0, (ObjectFunc) NULL, aCoHighway2Hitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_CO_HIGHWAY_3, */ {(void*) aCoHighway3DL, 0, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_CO_HIGHWAY_4, */ {(void*) aCoHighway4DL, 0, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_CO_BUILDING_1, */ {(void*) aCoBuilding1DL, 0, (ObjectFunc) NULL, aCoBuilding1Hitbox, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_CO_BUILDING_2, */ {(void*) aCoBuilding2DL, 0, (ObjectFunc) NULL, aCoBuilding2Hitbox, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_CO_BUILDING_3, */ {(void*) aCoBuilding3DL, 0, (ObjectFunc) NULL, aCoBuilding3Hitbox, 500.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_CO_BUILDING_4, */ {(void*) aCoBuilding4DL, 0, (ObjectFunc) NULL, aCoBuilding4Hitbox, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_CO_BUILDING_5, */ {(void*) aCoBuilding5DL, 0, (ObjectFunc) SceneryRotateTowardsCamera, aCoBuilding5Hitbox, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_CO_BUILDING_6, */ {(void*) aCoBuilding6DL, 0, (ObjectFunc) SceneryRotateTowardsCamera, aCoBuilding6Hitbox, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_CO_BUILDING_7, */ {(void*) aCoBuilding7DL, 0, (ObjectFunc) SceneryRotateTowardsCamera, aCoBuilding7Hitbox, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_CO_BUILDING_8, */ {(void*) aCoBuilding8DL, 0, (ObjectFunc) SceneryRotateTowardsCamera, aCoBuilding8Hitbox, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_CO_BUILDING_ON_FIRE, */ {(void*) Corneria_BuildingOnFire_Draw, 1, (ObjectFunc) Corneria_BuildingOnFire_Update, aCoBuildingOnFireHitbox, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_STONE_ARCH */ {(void*) aCoStoneArchDL, 0, (ObjectFunc) NULL, aCoStoneArchHitbox, 800.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUMP_1 */ {(void*) aCoBump1DL, 0, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUMP_2 */ {(void*) aCoBump2DL, 0, (ObjectFunc) NULL, gNoHitbox, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUMP_3 */ {(void*) aCoBump3DL, 0, (ObjectFunc) NULL, gNoHitbox, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUMP_4 */ {(void*) aCoBump4DL, 0, (ObjectFunc) NULL, gNoHitbox, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUMP_5 */ {(void*) aCoBump5DL, 0, (ObjectFunc) NULL, gNoHitbox, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_HIGHWAY_1 */ {(void*) aCoHighway1DL, 0, (ObjectFunc) NULL, aCoHighway1Hitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_HIGHWAY_2 */ {(void*) aCoHighway2DL, 0, (ObjectFunc) NULL, aCoHighway2Hitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_HIGHWAY_3 */ {(void*) aCoHighway3DL, 0, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_HIGHWAY_4 */ {(void*) aCoHighway4DL, 0, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUILDING_1 */ {(void*) aCoBuilding1DL, 0, (ObjectFunc) NULL, aCoBuilding1Hitbox, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUILDING_2 */ {(void*) aCoBuilding2DL, 0, (ObjectFunc) NULL, aCoBuilding2Hitbox, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUILDING_3 */ {(void*) aCoBuilding3DL, 0, (ObjectFunc) NULL, aCoBuilding3Hitbox, 500.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUILDING_4 */ {(void*) aCoBuilding4DL, 0, (ObjectFunc) NULL, aCoBuilding4Hitbox, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUILDING_5 */ {(void*) aCoBuilding5DL, 0, (ObjectFunc) SceneryRotateTowardsCamera, aCoBuilding5Hitbox, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUILDING_6 */ {(void*) aCoBuilding6DL, 0, (ObjectFunc) SceneryRotateTowardsCamera, aCoBuilding6Hitbox, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUILDING_7 */ {(void*) aCoBuilding7DL, 0, (ObjectFunc) SceneryRotateTowardsCamera, aCoBuilding7Hitbox, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUILDING_8 */ {(void*) aCoBuilding8DL, 0, (ObjectFunc) SceneryRotateTowardsCamera, aCoBuilding8Hitbox, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUILDING_ON_FIRE, */ {(void*) Corneria_CoBuildingOnFire_Draw, 1, (ObjectFunc) Corneria_CoBuildingOnFire_Update, aCoBuildingOnFireHitbox, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, /* OBJ_SCENERY_CO_TOWER, */ {(void*) aCoTowerDL, 0, (ObjectFunc) NULL, aCoTowerHitbox, 100.0f, 0, 0, 39, 0, 0.0f, 0 }, /* OBJ_SCENERY_CO_ARCH_1, */ {(void*) aCoArch1DL, 0, (ObjectFunc) NULL, aCoArch1Hitbox, 500.0f, 0, 0, 39, 0, 0.0f, 0 }, /* OBJ_SCENERY_CO_ARCH_2, */ {(void*) aCoArch2DL, 0, (ObjectFunc) NULL, aCoArch2Hitbox, 400.0f, 0, 0, 39, 0, 0.0f, 0 }, /* OBJ_SCENERY_CO_ARCH_3, */ {(void*) aCoArch3DL, 0, (ObjectFunc) NULL, aCoArch3Hitbox, 400.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_CO_RADAR, */ {(void*) aRadarDL, 0, (ObjectFunc) NULL, aCoRadarHitbox, 200.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_RADAR_DISH, */ {(void*) aRadarDL, 0, (ObjectFunc) NULL, aCoRadarHitbox, 200.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_CO_HIGHWAY_5, */ {(void*) aCoHighway5DL, 0, (ObjectFunc) NULL, aCoHighway5Hitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_CO_HIGHWAY_6, */ {(void*) aCoHighway6DL, 0, (ObjectFunc) NULL, aCoHighway6Hitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_CO_HIGHWAY_7, */ {(void*) aCoHighway7DL, 0, (ObjectFunc) NULL, aCoHighway7Hitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_CO_HIGHWAY_8, */ {(void*) aCoHighway8DL, 0, (ObjectFunc) NULL, aCoHighway8Hitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_CO_HIGHWAY_9, */ {(void*) aCoHighway9DL, 0, (ObjectFunc) NULL, aCoHighway9Hitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_TI_SKULL, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, aTiSkullHitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_TI_RIB_0, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, aTiRib0Hitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_TI_RIB_1, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, aTiRib1Hitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_TI_RIB_2, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, aTiRib2Hitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_TI_RIB_3, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, aTiRib3Hitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_TI_RIB_4, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, aTiRib4Hitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_TI_RIB_5, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, aTiRib5Hitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_TI_RIB_6, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, aTiRib6Hitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_TI_RIB_7, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, aTiRib7Hitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_TI_RIB_8, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, aTiRib8Hitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_SKULL, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, aTiSkullHitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_RIB_0, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, aTiRib0Hitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_RIB_1, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, aTiRib1Hitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_RIB_2, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, aTiRib2Hitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_RIB_3, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, aTiRib3Hitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_RIB_4, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, aTiRib4Hitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_RIB_5, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, aTiRib5Hitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_RIB_6, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, aTiRib6Hitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_RIB_7, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, aTiRib7Hitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_RIB_8, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, aTiRib8Hitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_ME_TUNNEL, */ {(void*) MeteoTunnel_Draw, 1, (ObjectFunc) MeteoTunnel_Update, gNoHitbox, 6000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_CO_BUILDING_9, */ {(void*) CoBuilding9_Draw, 1, (ObjectFunc) CoBuilding9_Update, aCoBuilding9Hitbox, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_CO_BUILDING_10, */ {(void*) CoBuilding10_Draw, 1, (ObjectFunc) SceneryRotateTowardsCamera, aCoBuilding10Hitbox, 300.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_IBEAM, */ {(void*) CoIBeam_Draw, 1, (ObjectFunc) CoIBeam_Update, aCoIBeamHitbox, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_ZO_ROCK_1, */ {(void*) aZoRock1DL, 0, (ObjectFunc) NULL, aZoRock1Hitbox, 200.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_44, */ {(void*) D_ZO_600F560, 0, (ObjectFunc) NULL, D_ZO_602BA20, 1500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_45, */ {(void*) D_ZO_600EC90, 0, (ObjectFunc) NULL, D_ZO_602BAE4, 1500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_46, */ {(void*) D_ZO_600E820, 0, (ObjectFunc) NULL, D_ZO_602BBD8, 1500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_47, */ {(void*) D_ZO_601FCB0, 0, (ObjectFunc) NULL, D_ZO_602BC54, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_48, */ {(void*) Scenery48_Draw, 1, (ObjectFunc) NULL, D_VE1_601B4E0, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_49, */ {(void*) Scenery49_Draw, 1, (ObjectFunc) NULL, D_VE1_601B4FC, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_50, */ {(void*) D_VE1_6007410, 0, (ObjectFunc) NULL, D_VE1_601B518, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_51, */ {(void*) D_VE1_6006F50, 0, (ObjectFunc) NULL, D_VE1_601B584, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_52, */ {(void*) D_VE1_6005780, 0, (ObjectFunc) Venom1_Scenery52_Update, D_VE1_601B5F4, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_53, */ {(void*) D_VE1_6003610, 0, (ObjectFunc) NULL, D_VE1_601B644, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_ZO_ROCK, */ {(void*) aZoRockDL, 0, (ObjectFunc) NULL, aZoRockHitbox, 200.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_ZO_OIL_RIG_1, */ {(void*) aZoOilRig1DL, 0, (ObjectFunc) NULL, aZoOilRig1Hitbox, 1500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_ZO_OIL_RIG_2, */ {(void*) aZoOilRig2DL, 0, (ObjectFunc) NULL, aZoOilRig2Hitbox, 1500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_ZO_OIL_RIG_3, */ {(void*) aZoOilRig3DL, 0, (ObjectFunc) NULL, aZoOilRig3Hitbox, 1500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_ZO_ISLAND, */ {(void*) aZoIslandDL, 0, (ObjectFunc) NULL, aZoIslandHitbox, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_VE1_WALL_1, */ {(void*) Ve1SceneryWall1_Draw, 1, (ObjectFunc) NULL, aVe1SceneryWall1Hitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_VE1_WALL_2, */ {(void*) Ve1SceneryWall2_Draw, 1, (ObjectFunc) NULL, aVe1SceneryWall2Hitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_VE1_WALL_3, */ {(void*) aVe1SceneryWall3DL, 0, (ObjectFunc) NULL, aVe1SceneryWall3Hitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_VE1_HALLWAY_OBSTACLE, */ {(void*) aVe1HallwayObstacleDL, 0, (ObjectFunc) NULL, aVe1HallwayObstacleHitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_VE1_GENERATOR, */ {(void*) aVe1GeneratorDL, 0, (ObjectFunc) Venom1_Ve1Generator_Update, aVe1GeneratorHitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_VE1_WATCH_POST, */ {(void*) aVe1WatchPostDL, 0, (ObjectFunc) NULL, aVe1WatchPostHitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_CO_WATERFALL, */ {(void*) aCoWaterfallDL, 0, (ObjectFunc) CoWaterfall_Update, aCoWaterfallHitbox, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_CO_ROCKWALL, */ {(void*) aCoRockwallDL, 0, (ObjectFunc) NULL, aCoRockwallHitbox, 1000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_SCENERY_CO_DOORS, */ {(void*) Corneria_Doors_Draw, 2, (ObjectFunc) Corneria_Doors_Update, aCoDoorsHitbox, 1000.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_57, */ {(void*) Titania_Scenery57_Draw, 1, (ObjectFunc) Titania_Scenery57_Update, D_TI_6006BF0, 800.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_58, */ {(void*) D_TI1_700BE00, 0, (ObjectFunc) NULL, D_TI_6006C44, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_59, */ {(void*) D_MA_6024010, 0, (ObjectFunc) NULL, D_MA_603626C, 300.0f, 0, 0, 5, 0, 0.0f, 0 }, - /* OBJ_SCENERY_60, */ {(void*) D_MA_6027180, 0, (ObjectFunc) NULL, D_MA_6036288, 400.0f, 0, 0, 5, 0, 0.0f, 0 }, - /* OBJ_SCENERY_61, */ {(void*) Macbeth_Scenery61_Draw, 1, (ObjectFunc) NULL, D_MA_60362A4, 200.0f, 0, 0, 5, 0, 0.0f, 0 }, - /* OBJ_SCENERY_62, */ {(void*) D_MA_60270E0, 0, (ObjectFunc) NULL, gNoHitbox, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_DOORS, */ {(void*) Corneria_CoDoors_Draw, 2, (ObjectFunc) Corneria_CoDoors_Update, aCoDoorsHitbox, 1000.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_PILLAR, */ {(void*) Titania_TiPillar_Draw, 1, (ObjectFunc) Titania_TiPillar_Update, aTiPillarHitbox, 800.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_BRIDGE, */ {(void*) aTiBridgeDL, 0, (ObjectFunc) NULL, aTiBridgeHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_BUILDING_1, */ {(void*) aMaBuilding1DL, 0, (ObjectFunc) NULL, aMaBuilding1Hitbox, 300.0f, 0, 0, 5, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_BUILDING_2, */ {(void*) aMaBuilding2DL, 0, (ObjectFunc) NULL, aMaBuilding2Hitbox, 400.0f, 0, 0, 5, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_TOWER, */ {(void*) Macbeth_MaTower_Draw, 1, (ObjectFunc) NULL, aMaTowerHitbox, 200.0f, 0, 0, 5, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_WALL_1, */ {(void*) aMaWall1DL, 0, (ObjectFunc) NULL, gNoHitbox, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_SCENERY_63, */ {(void*) D_MA_6013960, 0, (ObjectFunc) NULL, D_MA_6036894, 500.0f, 0, 0, 5, 0, 0.0f, 0 }, - /* OBJ_SCENERY_64, */ {(void*) D_MA_600AF40, 0, (ObjectFunc) NULL, D_MA_60368E0, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_65, */ {(void*) Macbeth_Scenery65_Draw, 1, (ObjectFunc) NULL, D_MA_6036724, 400.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_66, */ {(void*) D_MA_601F1D0, 0, (ObjectFunc) NULL, D_MA_60362D8, 2500.0f, 0, 0, 5, 0, 0.0f, 0 }, - /* OBJ_SCENERY_67, */ {(void*) D_MA_60238F0, 0, (ObjectFunc) NULL, D_MA_6036328, 2000.0f, 0, 0, 5, 0, 0.0f, 0 }, - /* OBJ_SCENERY_68, */ {(void*) D_MA_601B7C0, 0, (ObjectFunc) NULL, D_MA_60362F4, 2500.0f, 0, 0, 5, 0, 0.0f, 0 }, - /* OBJ_SCENERY_69, */ {(void*) D_MA_6030500, 0, (ObjectFunc) NULL, D_MA_6036370, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_70, */ {(void*) D_MA_602DAE0, 0, (ObjectFunc) NULL, D_MA_603638C, 1900.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_71, */ {(void*) D_MA_6027900, 0, (ObjectFunc) NULL, D_MA_60363B8, 1900.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_72, */ {(void*) D_MA_602DB80, 0, (ObjectFunc) NULL, D_MA_60363E4, 1100.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_73, */ {(void*) D_MA_6030630, 0, (ObjectFunc) NULL, D_MA_6036410, 1100.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_74, */ {(void*) D_MA_602DC20, 0, (ObjectFunc) NULL, D_MA_603643C, 1000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_75, */ {(void*) D_MA_601B0D0, 0, (ObjectFunc) NULL, D_MA_6036760, 3000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_76, */ {(void*) D_MA_60075D0, 0, (ObjectFunc) NULL, gNoHitbox, 1000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_77, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, D_MA_6036344, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_78, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_79, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_80, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_81, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_82, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_83, */ {(void*) Macbeth_Scenery83_Draw, 1, (ObjectFunc) Macbeth_Scenery83_Update, gNoHitbox, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_84, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_85, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_86, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_87, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_88, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_89, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_90, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_91, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_92, */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_93, */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_94, */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_95, */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_96, */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_97, */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_98, */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_99, */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_100 */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_101 */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_102 */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_103 */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_104 */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) Macbeth_Scenery104_Update, D_MA_6036594, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_105 */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) NULL, D_MA_6036204, 1300.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_106 */ {(void*) D_SY_60097E0, 0, (ObjectFunc) NULL, D_SY_6034478, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_SCENERY_107 */ {(void*) D_SY_601D730, 0, (ObjectFunc) NULL, D_SY_603450C, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_SCENERY_108 */ {(void*) D_SY_60102C0, 0, (ObjectFunc) NULL, D_SY_6034588, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_SCENERY_109 */ {(void*) D_SY_60036A0, 0, (ObjectFunc) SectorY_Scenery109_Update, D_SY_6034664, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_SCENERY_110 */ {(void*) D_SY_6005360, 0, (ObjectFunc) NULL, D_SY_6034770, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_SCENERY_111 */ {(void*) Scenery111_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_112 */ {(void*) D_SY_600F6C0, 0, (ObjectFunc) SectorY_Scenery112_Update, D_SY_60347F0, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_SCENERY_113 */ {(void*) D_SY_601B610, 0, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_114 */ {(void*) D_SY_601C6A0, 0, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_115 */ {(void*) D_SY_60188D0, 0, (ObjectFunc) NULL, D_SY_603486C, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_116 */ {(void*) D_SY_60034D0, 0, (ObjectFunc) NULL, D_SY_60347D4, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_117 */ {(void*) D_AQ_60231C0, 0, (ObjectFunc) NULL, D_AQ_6030C60, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_118 */ {(void*) D_AQ_6011EE0, 0, (ObjectFunc) NULL, D_AQ_6030C7C, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_SCENERY_119 */ {(void*) D_AQ_6015730, 0, (ObjectFunc) NULL, D_AQ_6030D74, 2000.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_120 */ {(void*) D_AQ_601DE60, 0, (ObjectFunc) NULL, D_AQ_6030DF8, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_121 */ {(void*) D_AQ_602B4C0, 0, (ObjectFunc) NULL, D_AQ_6030E14, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_122 */ {(void*) D_AQ_600EE10, 0, (ObjectFunc) NULL, D_AQ_6030E30_Hitbox, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_SCENERY_123 */ {(void*) D_AQ_60120F0, 0, (ObjectFunc) NULL, D_AQ_6030E4C, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_SCENERY_124 */ {(void*) D_AQ_600EEF0, 0, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_SCENERY_125 */ {(void*) D_AQ_600BF80, 0, (ObjectFunc) NULL, D_AQ_6030E68, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_SCENERY_126 */ {(void*) Aquas_Scenery126_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_SCENERY_127 */ {(void*) D_VE1_9005C80, 0, (ObjectFunc) Venom1_Scenery127_Update, D_VE1_601B678, 1000.0f, 0, 0, 42, 0, 0.0f, 0 }, - /* OBJ_SCENERY_128 */ {(void*) D_VE1_9003F50, 0, (ObjectFunc) NULL, D_VE1_601B6C4, 3200.0f, 0, 0, 42, 0, 0.0f, 0 }, - /* OBJ_SCENERY_129 */ {(void*) D_VE1_900F060, 0, (ObjectFunc) NULL, D_VE1_601B710, 3200.0f, 0, 0, 42, 0, 0.0f, 0 }, - /* OBJ_SCENERY_130 */ {(void*) D_VE1_900F1D0, 0, (ObjectFunc) NULL, D_VE1_601B75C, 3200.0f, 0, 0, 42, 0, 0.0f, 0 }, - /* OBJ_SCENERY_131 */ {(void*) Andross_Scenery131_Draw, 1, (ObjectFunc) Andross_Scenery131_Update, D_ANDROSS_C038BD8, 500.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_SCENERY_132 */ {(void*) Andross_Scenery132_Draw, 1, (ObjectFunc) Andross_Scenery132_Update, D_ANDROSS_C038A48, 500.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_SCENERY_133 */ {(void*) D_TR_60030F0, 0, (ObjectFunc) NULL, D_TR_6009CC4, 1000.0f, 0, 0, 20, 0, 0.0f, 0 }, - /* OBJ_SCENERY_134 */ {(void*) D_VE2_6003000, 0, (ObjectFunc) NULL, D_ANDROSS_C038BA4, 0.0f, 0, 0, 41, 1, 0.0f, 0 }, - /* OBJ_SCENERY_135 */ {(void*) D_VE2_6006890, 0, (ObjectFunc) NULL, D_ANDROSS_C038B40, 0.0f, 0, 0, 41, 1, 0.0f, 0 }, - /* OBJ_SCENERY_136 */ {(void*) D_VE2_6002990, 0, (ObjectFunc) NULL, D_ANDROSS_C038B40, 0.0f, 0, 0, 41, 1, 0.0f, 0 }, - /* OBJ_SCENERY_137 */ {(void*) D_VE2_6004170, 0, (ObjectFunc) NULL, gNoHitbox, 0.0f, 0, 0, 0, 1, 0.0f, 0 }, - /* OBJ_SCENERY_138 */ {(void*) D_versus_3017600, 0, (ObjectFunc) NULL, D_versus_302EE64, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_139 */ {(void*) D_versus_3017600, 0, (ObjectFunc) NULL, D_versus_302EE80, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_140 */ {(void*) D_versus_30173C0, 0, (ObjectFunc) NULL, gNoHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_141 */ {(void*) D_versus_30174E0, 0, (ObjectFunc) NULL, gNoHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_142 */ {(void*) D_versus_301B080, 0, (ObjectFunc) NULL, D_versus_302EE9C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_143 */ {(void*) D_versus_3016B00, 0, (ObjectFunc) NULL, D_versus_302EE00, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_144 */ {(void*) D_versus_3013780, 0, (ObjectFunc) NULL, D_versus_302ED4C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_145 */ {(void*) D_versus_3013580, 0, (ObjectFunc) NULL, D_versus_302ED98, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_146 */ {(void*) D_versus_3012ED0, 0, (ObjectFunc) NULL, D_versus_302EDB4, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_GUILLOTINE, */ {(void*) aMaGuillotineDL, 0, (ObjectFunc) NULL, aMaGuillotineHitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_PROXIMITY_LIGHT, */ {(void*) Macbeth_MaProximityLight_Draw, 1, (ObjectFunc) NULL, aMaProximityLightHitbox, 400.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_WALL_2, */ {(void*) aMaWall2DL, 0, (ObjectFunc) NULL, aMaWall2Hitbox, 2500.0f, 0, 0, 5, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_WALL_3, */ {(void*) aMaWall3DL, 0, (ObjectFunc) NULL, aMaWall3Hitbox, 2000.0f, 0, 0, 5, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_WALL_4, */ {(void*) aMaWall4DL, 0, (ObjectFunc) NULL, aMaWall4Hitbox, 2500.0f, 0, 0, 5, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_TERRAIN_BUMP, */ {(void*) aMaTerrainBumpDL, 0, (ObjectFunc) NULL, aMaTerrainBumpHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_FLOOR_1, */ {(void*) aMaFloor1DL, 0, (ObjectFunc) NULL, aMaFloor1Hitbox, 1900.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_FLOOR_2, */ {(void*) aMaFloor2DL, 0, (ObjectFunc) NULL, aMaFloor2Hitbox, 1900.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_FLOOR_3, */ {(void*) aMaFloor3DL, 0, (ObjectFunc) NULL, aMaFloor3Hitbox, 1100.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_FLOOR_4, */ {(void*) aMaFloor4DL, 0, (ObjectFunc) NULL, aMaFloor4Hitbox, 1100.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_FLOOR_5, */ {(void*) aMaFloor5DL, 0, (ObjectFunc) NULL, aMaFloor5Hitbox, 1000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_FLOOR_6, */ {(void*) aMaFloor6DL, 0, (ObjectFunc) NULL, aMaFloor6Hitbox, 3000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_WEAPONS_FACTORY, */ {(void*) aMaWeaponsFactoryDL, 0, (ObjectFunc) NULL, gNoHitbox, 1000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_INDICATOR_SIGN, */ {(void*) Macbeth_IndicatorSign_Draw, 1, (ObjectFunc) NULL, aMaIndicatorSignHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_DISTANCE_SIGN_1, */ {(void*) Macbeth_IndicatorSign_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_DISTANCE_SIGN_2, */ {(void*) Macbeth_IndicatorSign_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_DISTANCE_SIGN_3, */ {(void*) Macbeth_IndicatorSign_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_DISTANCE_SIGN_4, */ {(void*) Macbeth_IndicatorSign_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_DISTANCE_SIGN_5, */ {(void*) Macbeth_IndicatorSign_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_TRAIN_STOP_BLOCK, */ {(void*) Macbeth_MaTrainStopBlock_Draw, 1, (ObjectFunc) Macbeth_MaTrainStopBlock_Update, gNoHitbox, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_RAILROAD_SWITCH_1, */ {(void*) Macbeth_IndicatorSign_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_RAILROAD_SWITCH_2, */ {(void*) Macbeth_IndicatorSign_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_RAILROAD_SWITCH_3, */ {(void*) Macbeth_IndicatorSign_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_RAILROAD_SWITCH_4, */ {(void*) Macbeth_IndicatorSign_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_RAILROAD_SWITCH_5, */ {(void*) Macbeth_IndicatorSign_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_RAILROAD_SWITCH_6, */ {(void*) Macbeth_IndicatorSign_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_RAILROAD_SWITCH_7, */ {(void*) Macbeth_IndicatorSign_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_RAILROAD_SWITCH_8, */ {(void*) Macbeth_IndicatorSign_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_TRAIN_TRACK_1, */ {(void*) Macbeth_TrainTrack_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_TRAIN_TRACK_2, */ {(void*) Macbeth_TrainTrack_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_TRAIN_TRACK_3, */ {(void*) Macbeth_TrainTrack_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_TRAIN_TRACK_4, */ {(void*) Macbeth_TrainTrack_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_TRAIN_TRACK_5, */ {(void*) Macbeth_TrainTrack_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_TRAIN_TRACK_6, */ {(void*) Macbeth_TrainTrack_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_TRAIN_TRACK_7, */ {(void*) Macbeth_TrainTrack_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_TRAIN_TRACK_8, */ {(void*) Macbeth_TrainTrack_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_TRAIN_TRACK_9 */ {(void*) Macbeth_TrainTrack_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_TRAIN_TRACK_10 */ {(void*) Macbeth_TrainTrack_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_TRAIN_TRACK_11 */ {(void*) Macbeth_TrainTrack_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_TRAIN_TRACK_12 */ {(void*) Macbeth_TrainTrack_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_SWITCH_TRACK */ {(void*) Macbeth_TrainTrack_Draw, 1, (ObjectFunc) Macbeth_MaSwitchTrack_Update, aMaSwitchTrackHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_TRAIN_TRACK_13 */ {(void*) Macbeth_TrainTrack_Draw, 1, (ObjectFunc) NULL, aMaTrainTrack13Hitbox, 1300.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_SY_SHIP_1 */ {(void*) aSyShip1DL, 0, (ObjectFunc) NULL, aSyShip1Hitbox, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_SY_SHIP_2 */ {(void*) aSyShip2DL, 0, (ObjectFunc) NULL, aSyShip2Hitbox, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_SY_SHIP_3 */ {(void*) aSyShip3DL, 0, (ObjectFunc) NULL, aSyShip3Hitbox, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_SY_SHIP_3_DESTROYED */ {(void*) aSyShip3DestroyedDL, 0, (ObjectFunc) SectorY_SyShip3Destroyed_Update, aSyShip3DestroyedHitbox, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_SY_SHIP_4 */ {(void*) aSyShip4DL, 0, (ObjectFunc) NULL, aSyShip4Hitbox, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_SY_SHIP_DEBRIS */ {(void*) Scenery111_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_SY_SHIP_2_DESTROYED */ {(void*) aSyShip4DestroyedDL, 0, (ObjectFunc) SectorY_SyShip4Destroyed_Update, aSyShip4DestroyedHitbox, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SPRITE_SY_SHIP_2 */ {(void*) aSyShip2SpriteDL, 0, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SPRITE_SY_SHIP_3 */ {(void*) aSyShip3SpriteDL, 0, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_SY_SHIP_PROJECTILE */ {(void*) aSyShipProjectileDL, 0, (ObjectFunc) NULL, aSyShipProjectileHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_SY_SHIP_WINDOWS */ {(void*) aSyShipWindowsDL, 0, (ObjectFunc) NULL, aSyShipWindowsHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_AQ_CORAL_REEF_1 */ {(void*) aAqCoralReef1DL, 0, (ObjectFunc) NULL, aAqCoralReef1Hitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_AQ_TUNNEL_1 */ {(void*) aAqTunnel1DL, 0, (ObjectFunc) NULL, aAqTunnel1Hitbox, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_AQ_ARCH */ {(void*) aAqArchDL, 0, (ObjectFunc) NULL, aAqArchHitbox, 2000.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_AQ_CORAL_REEF_2 */ {(void*) aAqCoralReef2DL, 0, (ObjectFunc) NULL, aAqCoralReef2Hitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_AQ_ROCK */ {(void*) aAqRockDL, 0, (ObjectFunc) NULL, aAqRockHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_AQ_WALL_1 */ {(void*) aAqWall1DL, 0, (ObjectFunc) NULL, aAqWall1Hitbox, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_AQ_ROOF */ {(void*) aAqRoofDL, 0, (ObjectFunc) NULL, aAqRoofHitbox, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_AQ_BUMP_1 */ {(void*) aAqBump2DL, 0, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_AQ_TUNNEL_2 */ {(void*) aAqTunnel2DL, 0, (ObjectFunc) NULL, aAqTunnel2Hitbox, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_AQ_BUMP_2 */ {(void*) Aquas_AqBump2_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_VE1_TEMPLE_ENTRANCE */ {(void*) aVe1TempleEntranceDL, 0, (ObjectFunc) Venom1_Ve1TempleEntrance_Update, aVe1TempleEntranceHitbox, 1000.0f, 0, 0, 42, 0, 0.0f, 0 }, + /* OBJ_SCENERY_VE1_TEMPLE_INTERIOR_1 */ {(void*) aVe1TempleInterior1DL, 0, (ObjectFunc) NULL, aVe1TempleInterior1Hitbox, 3200.0f, 0, 0, 42, 0, 0.0f, 0 }, + /* OBJ_SCENERY_VE1_TEMPLE_INTERIOR_2 */ {(void*) aVe1TempleInterior2DL, 0, (ObjectFunc) NULL, aVe1TempleInterior2Hitbox, 3200.0f, 0, 0, 42, 0, 0.0f, 0 }, + /* OBJ_SCENERY_VE1_TEMPLE_INTERIOR_3 */ {(void*) aVe1TempleInterior3DL, 0, (ObjectFunc) NULL, aVe1TempleInterior3Hitbox, 3200.0f, 0, 0, 42, 0, 0.0f, 0 }, + /* OBJ_SCENERY_AND_PASSAGE */ {(void*) Andross_AndPassage_Draw, 1, (ObjectFunc) Andross_AndPassage_Update, aAndPassageHitbox, 500.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_AND_DOOR */ {(void*) Andross_AndDoor_Draw, 1, (ObjectFunc) Andross_AndDoor_Update, aAndDoorHitbox, 500.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TR_BUILDING */ {(void*) aTrBuildingDL, 0, (ObjectFunc) NULL, aTrBuildingHitbox, 1000.0f, 0, 0, 20, 0, 0.0f, 0 }, + /* OBJ_SCENERY_AND_PATH_INTERSECTION */ {(void*) aAndPathIntersectionDL, 0, (ObjectFunc) NULL, aAndPathIntersectionHitbox, 0.0f, 0, 0, 41, 1, 0.0f, 0 }, + /* OBJ_SCENERY_AND_PATH_WALLS */ {(void*) aAndPathWallsDL, 0, (ObjectFunc) NULL, D_ANDROSS_C038B40, 0.0f, 0, 0, 41, 1, 0.0f, 0 }, + /* OBJ_SCENERY_AND_PATH_EXIT */ {(void*) aAndPathExitDL, 0, (ObjectFunc) NULL, D_ANDROSS_C038B40, 0.0f, 0, 0, 41, 1, 0.0f, 0 }, + /* OBJ_SCENERY_AND_PATH_ENTRANCE */ {(void*) aAndPathEntranceDL, 0, (ObjectFunc) NULL, gNoHitbox, 0.0f, 0, 0, 0, 1, 0.0f, 0 }, + /* OBJ_SCENERY_VS_BUILDING_1 */ {(void*) aVsBuildingDL, 0, (ObjectFunc) NULL, aVsBuilding1Hibox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_VS_BUILDING_2 */ {(void*) aVsBuildingDL, 0, (ObjectFunc) NULL, aVsBuilding2Hibox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_VS_PYRAMID_1 */ {(void*) aVsPyramid1DL, 0, (ObjectFunc) NULL, gNoHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_VS_PYRAMID_2 */ {(void*) aVsPyramid2DL, 0, (ObjectFunc) NULL, gNoHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_VS_ARCH */ {(void*) aVsArchDL, 0, (ObjectFunc) NULL, aVsArchHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_VS_KA_FLBASE */ {(void*) aVsKaFlBaseDL, 0, (ObjectFunc) NULL, aVsKaFlBaseHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_VS_SPACE_JUNK_1 */ {(void*) aVsSpaceJunk1DL, 0, (ObjectFunc) NULL, aVsSpaceJunk1Hitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_VS_SPACE_JUNK_2 */ {(void*) aVsSpaceJunk2DL, 0, (ObjectFunc) NULL, aVsSpaceJunk2Hitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_VS_SPACE_JUNK_3 */ {(void*) aVsSpaceJunk3DL, 0, (ObjectFunc) NULL, aVsSpaceJunk3Hitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_147 */ {(void*) NULL, 0, (ObjectFunc) NULL, gNoHitbox, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_148 */ {(void*) D_FO_60079B0, 0, (ObjectFunc) NULL, D_FO_600FF80, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_149 */ {(void*) D_FO_6007D80, 0, (ObjectFunc) NULL, D_FO_600FFA0, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_150 */ {(void*) D_FO_6006310, 0, (ObjectFunc) NULL, D_FO_600FFC0, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_151 */ {(void*) D_FO_60066E0, 0, (ObjectFunc) NULL, D_FO_600FEB8, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_152 */ {(void*) D_BO_600F4C0, 0, (ObjectFunc) NULL, D_BO_6011C10, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_153 */ {(void*) D_BO_600B8B0, 0, (ObjectFunc) NULL, D_BO_6011C48, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_154 */ {(void*) aKaFLBaseDL, 0, (ObjectFunc) NULL, D_KA_601115C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_155 */ {(void*) NULL, 0, (ObjectFunc) NULL, gNoHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_156 */ {(void*) SectorY_Scenery156_Draw, 1, (ObjectFunc) NULL, D_SY_6034368, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_157 */ {(void*) aSzSpaceJunk3DL, 0, (ObjectFunc) NULL, D_SZ_600924C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_158 */ {(void*) aSzSpaceJunk1DL, 0, (ObjectFunc) NULL, D_SZ_60092E8, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_159 */ {(void*) D_VE2_6008370, 0, (ObjectFunc) NULL, D_VE2_601668C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_160 */ {(void*) D_VE2_6010960, 0, (ObjectFunc) NULL, D_VE2_6016714, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_FO_MOUNTAIN_1 */ {(void*) aFoMountain1DL, 0, (ObjectFunc) NULL, aFoMountain1Hitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_FO_MOUNTAIN_2 */ {(void*) aFoMountain2DL, 0, (ObjectFunc) NULL, aFoMountain2Hitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_FO_MOUNTAIN_3 */ {(void*) aFoMountain3DL, 0, (ObjectFunc) NULL, aFoMountain3Hitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_FO_TOWER */ {(void*) aFoTowerDL, 0, (ObjectFunc) NULL, aFoTowerHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_BO_POLE */ {(void*) aBoPoleDL, 0, (ObjectFunc) NULL, aBoPoleHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_BO_BUILDING */ {(void*) aBoBuildingDL, 0, (ObjectFunc) NULL, aBoBuildingHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_KA_FLBASE */ {(void*) aKaFLBaseDL, 0, (ObjectFunc) NULL, aKaFrontlineBaseHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_UNK_155 */ {(void*) NULL, 0, (ObjectFunc) NULL, gNoHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_UNK_156 */ {(void*) SectorY_Scenery156_Draw, 1, (ObjectFunc) NULL, aSyScenery156Hitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_SZ_SPACE_JUNK_3 */ {(void*) aSzSpaceJunk3DL, 0, (ObjectFunc) NULL, aSzSpaceJunk3Hitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_SZ_SPACE_JUNK_1 */ {(void*) aSzSpaceJunk1DL, 0, (ObjectFunc) NULL, aSzSpaceJunk1Hitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_VE2_TOWER */ {(void*) aVe2TowerDL, 0, (ObjectFunc) NULL, aVe2TowerHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_VE2_MOUNTAIN */ {(void*) aVe2MountainDL, 0, (ObjectFunc) NULL, aVe2MountainHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SPRITE_CO_POLE */ {(void*) aCoPoleDL, 0, (ObjectFunc) Sprite_UpdateDoodad, aCoPoleHitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SPRITE_CO_TREE */ {(void*) aCoTreeDL, 0, (ObjectFunc) Sprite_UpdateDoodad, aCoTreeHitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SPRITE_FO_POLE */ {(void*) aFoPoleDL, 0, (ObjectFunc) Sprite_UpdateDoodad, aFoPoleHitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, @@ -263,7 +263,7 @@ ObjectInfo gObjectInfo[] = { /* OBJ_SPRITE_167 */ {(void*) Sprite167_Draw, 1, (ObjectFunc) Sprite167_Update, gNoHitbox, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SPRITE_168 */ {(void*) Sprite168_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SPRITE_TI_CACTUS */ {(void*) aTiCactusDL, 0, (ObjectFunc) Titania_Cactus_Update, aTiCactusHitbox, 100.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SPRITE_CO_SMOKE */ {(void*) NULL, 1, (ObjectFunc) Corneria_Smoke_Update, gNoHitbox, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SPRITE_CO_SMOKE */ {(void*) NULL, 1, (ObjectFunc) Corneria_CoSmoke_Update, gNoHitbox, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_SPRITE_VE1_BOSS_TRIGGER1 */ {(void*) NULL, 1, (ObjectFunc) Venom1_BossTrigger1_Update, gNoHitbox, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_SPRITE_VE1_BOSS_TRIGGER2 */ {(void*) NULL, 1, (ObjectFunc) Venom1_BossTrigger2_Update, gNoHitbox, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_SPRITE_VE1_BOSS_TRIGGER3 */ {(void*) NULL, 1, (ObjectFunc) Venom1_BossTrigger3_Update, gNoHitbox, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, @@ -273,148 +273,148 @@ ObjectInfo gObjectInfo[] = { /* OBJ_ACTOR_CO_GARUDA_2 */ {(void*) Corneria_CoGaruda2_Draw, 2, (ObjectFunc) Corneria_CoGaruda2_Update, CoGarudaHitbox, 500.0f, 0, 0, 39, 1, 200.0f, 1 }, /* OBJ_ACTOR_CO_GARUDA_3 */ {(void*) Corneria_CoGaruda3_Draw, 2, (ObjectFunc) Corneria_CoGaruda3_Update, CoGarudaHitbox, 500.0f, 0, 0, 39, 1, 200.0f, 1 }, /* OBJ_ACTOR_CO_GARUDA_DESTROY */ {(void*) Corneria_CoGarudaDestroy_Draw, 2, (ObjectFunc) Corneria_CoGarudaDestroy_Update, aCoGarudaDestroyHitbox, 500.0f, 0, 0, 39, 1, 0.0f, 1 }, - /* OBJ_ACTOR_180 */ {(void*) Actor180_Draw, 1, (ObjectFunc) Actor180_Update, gNoHitbox, 1000.0f, 0, 0, 39, 0, 0.0f, 1 }, - /* OBJ_ACTOR_181 */ {(void*) D_ME_6018C00, 0, (ObjectFunc) Meteo_Actor181_Update, D_ME_602F6EC, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_182 */ {(void*) Actor182_Draw, 1, (ObjectFunc) Meteo_Actor182_Update, D_ME_602F708, 100.0f, 0, 1, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_183 */ {(void*) Meteo_Actor183_Draw, 1, (ObjectFunc) Meteo_ActorDoodad_Update, gNoHitbox, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, - /* OBJ_ACTOR_184 */ {(void*) Meteo_Actor184_Draw, 1, (ObjectFunc) Meteo_ActorDoodad_Update, gNoHitbox, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, - /* OBJ_ACTOR_185 */ {(void*) Meteo_Actor185_Draw, 1, (ObjectFunc) Meteo_ActorDoodad_Update, gNoHitbox, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, - /* OBJ_ACTOR_186 */ {(void*) Actor186_Draw, 1, (ObjectFunc) Meteo_Actor186_Update, D_ME_602F724, 200.0f, 0, 1, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_187 */ {(void*) D_ME_6018450, 0, (ObjectFunc) Meteo_Actor187_Update, D_ME_602F740, 200.0f, 0, 1, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_188 */ {(void*) Aquas_Actor188_Draw, 1, (ObjectFunc) Aquas_Actor188_Update, D_AQ_6030BE0, 200.0f, 0, 1, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_ME_MOLAR_ROCK */ {(void*) MeMolarRock_Draw, 1, (ObjectFunc) MeMolarRock_Update, gNoHitbox, 1000.0f, 0, 0, 39, 0, 0.0f, 1 }, + /* OBJ_ACTOR_ME_METEOR_1 */ {(void*) aMeMeteor1DL, 0, (ObjectFunc) Meteo_MeMeteor1_Update, aMeMeteor1Hitbox, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_ME_METEOR_2 */ {(void*) MeMeteor2_Draw, 1, (ObjectFunc) Meteo_MeMeteor2_Update, aMeMeteor2Hitbox, 100.0f, 0, 1, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_ME_METEOR_SHOWER_1 */ {(void*) Meteo_MeMeteorShower1_Draw, 1, (ObjectFunc) Meteo_MeteorShower_Update, gNoHitbox, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, + /* OBJ_ACTOR_ME_METEOR_SHOWER_2 */ {(void*) Meteo_MeMeteorShower2_Draw, 1, (ObjectFunc) Meteo_MeteorShower_Update, gNoHitbox, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, + /* OBJ_ACTOR_ME_METEOR_SHOWER_3 */ {(void*) Meteo_MeMeteorShower3_Draw, 1, (ObjectFunc) Meteo_MeteorShower_Update, gNoHitbox, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, + /* OBJ_ACTOR_ME_LASER_CANNON_1 */ {(void*) MeLaserCannon1_Draw, 1, (ObjectFunc) Meteo_MeLaserCannon1_Update, aMeLaserCannon1Hitbox, 200.0f, 0, 1, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_ME_LASER_CANNON_2 */ {(void*) aMeLaserCannon2DL, 0, (ObjectFunc) Meteo_MeLaserCannon2_Update, aMeLaserCannon2Hitbox, 200.0f, 0, 1, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_AQ_UNK_188 */ {(void*) Aquas_Actor188_Draw, 1, (ObjectFunc) Aquas_Actor188_Update, aAqActor188Hitbox, 200.0f, 0, 1, 39, 0, 1.0f, 1 }, /* OBJ_ACTOR_DEBRIS */ {(void*) ActorDebris_Draw, 1, (ObjectFunc) ActorDebris_Update, gNoHitbox, 0.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_MISSILE_SEEK_TEAM */ {(void*) Actor190_191_Draw, 1, (ObjectFunc) Actors190_191_Update, gActor190_191Hitbox, 100.0f, 0, 1, 39, 0, 1.0f, 0 }, - /* OBJ_MISSILE_SEEK_PLAYER */ {(void*) Actor190_191_Draw, 1, (ObjectFunc) Actors190_191_Update, gActor190_191Hitbox, 100.0f, 0, 1, 39, 0, 1.0f, 0 }, - /* OBJ_ACTOR_192 */ {(void*) Actor192_Draw, 1, (ObjectFunc) Actor192_Update, D_CO_603E54C, 200.0f, 0, 1, 39, 0, 50.0f, 1 }, - /* OBJ_ACTOR_193 */ {(void*) Actor193_Draw, 1, (ObjectFunc) Actor193_Update, 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_MISSILE_SEEK_TEAM */ {(void*) ActorMissileSeek_Draw, 1, (ObjectFunc) ActorMissileSeek_Update, gActorMissileSeekHitbox, 100.0f, 0, 1, 39, 0, 1.0f, 0 }, + /* OBJ_MISSILE_SEEK_PLAYER */ {(void*) ActorMissileSeek_Draw, 1, (ObjectFunc) ActorMissileSeek_Update, gActorMissileSeekHitbox, 100.0f, 0, 1, 39, 0, 1.0f, 0 }, + /* OBJ_ACTOR_CO_SKIBOT */ {(void*) ActorSkibot_Draw, 1, (ObjectFunc) ActorSkibot_Update, aCoActorSkibotHitbox, 200.0f, 0, 1, 39, 0, 50.0f, 1 }, + /* OBJ_ACTOR_CO_RADAR */ {(void*) ActorRadar_Draw, 1, (ObjectFunc) ActorRadar_Update, aCoActorRadarHitbox, 100.0f, 0, 1, 39, 0, 0.0f, 0 }, + /* OBJ_ACTOR_ME_MORA */ {(void*) MeMora_Draw, 1, (ObjectFunc) MeMora_Update, gMeMoraHitbox, 200.0f, 0, 1, 39, 0, 0.0f, 1 }, /* OBJ_ACTOR_CUTSCENE */ {(void*) ActorCutscene_Draw, 1, (ObjectFunc) ActorCutscene_Update, gNoHitbox, 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_CO_MOLE_MISSILE */ {(void*) ActorMoleMissile_Draw, 1, (ObjectFunc) ActorMoleMissile_Update, aCoMoleMissileHitbox, 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 }, /* OBJ_ACTOR_199 */ {(void*) Andross_Actor199_Draw, 1, (ObjectFunc) Andross_Actor199_Update, gNoHitbox, 20000.0f, 0, 0, 39, 1, 0.0f, 0 }, /* OBJ_ACTOR_EVENT */ {(void*) ActorEvent_Draw, 1, (ObjectFunc) ActorEvent_Update, gNoHitbox, 2000.0f, 0, 1, 39, 0, 0.0f, 1 }, - /* OBJ_ACTOR_201 */ {(void*) Actor201_Draw, 1, (ObjectFunc) Actor201_Update, D_ME_602F684, 100.0f, 0, 1, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_202 */ {(void*) Actor202_Draw, 1, (ObjectFunc) Actor202_Update, D_ME_602F6A0, 100.0f, 0, 1, 39, 0, 180.0f, 1 }, - /* OBJ_ACTOR_SLIPPY_SX */ {(void*) SectorX_Slippy_Draw, 1, (ObjectFunc) SectorX_Slippy_Update, gNoHitbox, 1000.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_ACTOR_204 */ {(void*) SectorY_Actor204_Draw, 1, (ObjectFunc) SectorY_Actor204_Update, D_SY_603405C, 1000.0f, 0, 0, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_205 */ {(void*) Macbeth_ActorDoodad_Draw, 1, (ObjectFunc) Macbeth_Actor205_Update, D_MA_60359C8, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_206 */ {(void*) Macbeth_ActorDoodad_Draw, 1, (ObjectFunc) Macbeth_Actor206_Update, D_MA_6035A48, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_207 */ {(void*) Macbeth_Actor207_Draw, 2, (ObjectFunc) Macbeth_Actor207_Update, D_MA_603677C, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_208 */ {(void*) Macbeth_ActorDoodad_Draw, 1, (ObjectFunc) Macbeth_Actor208_Update, D_MA_6035A14, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_209 */ {(void*) Macbeth_ActorDoodad_Draw, 1, (ObjectFunc) Macbeth_Actor209_Update, D_MA_6035AE0, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_210 */ {(void*) Macbeth_ActorDoodad_Draw, 1, (ObjectFunc) Macbeth_Actor210_Update, D_MA_6035D9C, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_211 */ {(void*) Macbeth_ActorDoodad_Draw, 1, (ObjectFunc) Macbeth_Actor211_Update, D_MA_6035E04, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_212 */ {(void*) Macbeth_ActorDoodad_Draw, 1, (ObjectFunc) Macbeth_Actor212_Update, D_MA_60360C0, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_213 */ {(void*) Macbeth_ActorDoodad_Draw, 1, (ObjectFunc) Macbeth_Actor213_Update, D_MA_6036154, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_214 */ {(void*) Macbeth_Actor214_Draw, 1, (ObjectFunc) Macbeth_Actor214_Update, D_MA_6036458, 300.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_215 */ {(void*) Macbeth_Actor215_Draw, 1, (ObjectFunc) Macbeth_Actor215_Update, D_MA_60364C0, 300.0f, 0, 1, 40, 1, 0.0f, 1 }, - /* OBJ_ACTOR_216 */ {(void*) Macbeth_Actor216_Draw, 1, (ObjectFunc) Macbeth_Actor216_Update, D_MA_60366EC, 200.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_217 */ {(void*) Macbeth_Actor217_Draw, 1, (ObjectFunc) Macbeth_Actor217_Update, D_MA_6036708, 200.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_218 */ {(void*) Macbeth_Actor218_Draw, 1, (ObjectFunc) Macbeth_Actor218_Update, D_MA_6036728, 200.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_219 */ {(void*) Macbeth_Actor219_Draw, 1, (ObjectFunc) Macbeth_Actor219_Update, D_MA_6036744, 300.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_220 */ {(void*) Macbeth_Actor220_Draw, 1, (ObjectFunc) Macbeth_Actor220_Update, D_MA_6036930, 200.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_221 */ {(void*) Macbeth_Actor221_Draw, 1, (ObjectFunc) Macbeth_Actor221_Update, D_MA_603694C, 300.0f, 0, 0, 40, 1, 1.0f, 0 }, - /* OBJ_ACTOR_222 */ {(void*) Macbeth_Actor222_Draw, 1, (ObjectFunc) Macbeth_Actor222_Update, D_MA_6036968, 300.0f, 0, 0, 40, 1, 1.0f, 0 }, - /* OBJ_ACTOR_223 */ {(void*) Macbeth_Actor223_Draw, 1, (ObjectFunc) Macbeth_Actor223_Update, D_MA_60364DC, 300.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_224 */ {(void*) NULL, 1, (ObjectFunc) Titania_Actor224_Update, gNoHitbox, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_ACTOR_225 */ {(void*) D_TI1_700AB70, 0, (ObjectFunc) Titania_Actor225_Update, D_TI_60064AC, 50.0f, 0, 0, 39, 1, 1.0f, 0 }, - /* OBJ_ACTOR_226 */ {(void*) Titania_Actor226_Draw, 1, (ObjectFunc) Titania_Actor226_Update, D_TI_60064C8, 300.0f, 0, 0, 39, 1, 70.0f, 1 }, - /* OBJ_ACTOR_227 */ {(void*) Titania_Actor227_Draw, 1, (ObjectFunc) Titania_Actor227_Update, D_TI_60067C4, 0.0f, 0, 0, 39, 1, 0.0f, 0 }, - /* OBJ_ACTOR_228 */ {(void*) Titania_Actor228_Draw, 1, (ObjectFunc) Titania_Actor228_Update, D_TI_6006808, 0.0f, 0, 0, 39, 1, 1.0f, 1 }, - /* OBJ_ACTOR_229 */ {(void*) Titania_Actor229_Draw, 1, (ObjectFunc) Titania_Actor229_Update, D_TI_6006A3C, 1000.0f, 0, 0, 20, 1, 0.0f, 1 }, - /* OBJ_ACTOR_230 */ {(void*) Titania_Actor230_Draw, 1, (ObjectFunc) Titania_Actor230_Update, D_TI_600683C, 0.0f, 0, 1, 39, 1, 0.0f, 1 }, - /* OBJ_ACTOR_231 */ {(void*) Titania_Actor231_Draw, 1, (ObjectFunc) Titania_Actor231_Update, D_TI_6006858, 0.0f, 0, 0, 39, 1, 0.0f, 1 }, - /* OBJ_ACTOR_232 */ {(void*) Titania_Actor232_Draw, 1, (ObjectFunc) Titania_Actor232_Update, D_TI_6006890, 0.0f, 0, 0, 39, 1, 20.0f, 1 }, - /* OBJ_ACTOR_233 */ {(void*) Titania_Actor233_Draw, 1, (ObjectFunc) Titania_Actor233_Update, D_TI_60068F0, 200.0f, 0, 0, 39, 1, 1.0f, 1 }, - /* OBJ_ACTOR_234 */ {(void*) Actor234_Draw, 1, (ObjectFunc) Actor234_Update, gNoHitbox, 2000.0f, 0, 0, 39, 0, 0.0f, 5 }, - /* OBJ_ACTOR_235 */ {(void*) Zoness_Actor235_Draw, 2, (ObjectFunc) Zoness_Actor235_Update, D_ZO_602C294, 1000.0f, 0, 1, 40, 0, 1.0f, 1 }, - /* OBJ_ACTOR_236 */ {(void*) Zoness_Actor236_Draw, 1, (ObjectFunc) Zoness_Actor236_Update, D_ZO_602BC58, 5000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_237 */ {(void*) Actor237_Draw, 1, (ObjectFunc) Actor237_Update, gNoHitbox, 200.0f, 0, 0, 40, 0, 0.0f, 2 }, - /* OBJ_ACTOR_238 */ {(void*) Zoness_Actor238_Draw, 2, (ObjectFunc) Zoness_Actor238_Update, gCubeHitbox100, 200.0f, 0, 1, 40, 0, 1.0f, 1 }, - /* OBJ_ACTOR_239 */ {(void*) NULL, 1, (ObjectFunc) NULL, gNoHitbox, 1000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ACTOR_240 */ {(void*) Zoness_Actor240_Draw, 1, (ObjectFunc) Zoness_Actor240_Update, gCubeHitbox100, 1500.0f, 0, 1, 40, 0, 20.0f, 0 }, - /* OBJ_ACTOR_241 */ {(void*) Zoness_Actor241_Draw, 1, (ObjectFunc) Zoness_Actor241_Update, gActor241Hitbox, 1500.0f, 0, 1, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_242 */ {(void*) Zoness_Actor242_Draw, 2, (ObjectFunc) Zoness_Actor242_Update, D_ZO_602BE3C, 500.0f, 0, 0, 40, 0, 1.0f, 0 }, - /* OBJ_ACTOR_243 */ {(void*) Zoness_Actor243_Draw, 2, (ObjectFunc) Zoness_Actor243_Update, gCubeHitbox100, 0.0f, 0, 1, 40, 0, 1.0f, 1 }, - /* OBJ_ACTOR_244 */ {(void*) Zoness_Actor244_Draw, 2, (ObjectFunc) Zoness_Actor244_Update, D_ZO_602BE58, 2000.0f, 0, 0, 40, 0, 50.0f, 0 }, - /* OBJ_ACTOR_245 */ {(void*) Zoness_Actor245_Draw, 1, (ObjectFunc) Zoness_Actor245_Update, gCubeHitbox100, 200.0f, 0, 0, 40, 0, 1.0f, 0 }, - /* OBJ_ACTOR_246 */ {(void*) Zoness_Actor246_Draw, 1, (ObjectFunc) Zoness_Actor246_Update, gCubeHitbox100, 2000.0f, 0, 0, 40, 0, 1.0f, 0 }, - /* OBJ_ACTOR_247 */ {(void*) Zoness_Actor247_Draw, 1, (ObjectFunc) Zoness_Actor247_Update, D_ZO_602BFC4, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_248 */ {(void*) Zoness_Actor248_Draw, 1, (ObjectFunc) Zoness_Actor248_Update, gCubeHitbox150, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_249 */ {(void*) Zoness_Actor249_Draw, 1, (ObjectFunc) Zoness_Actor249_Update, gCubeHitbox200, 5000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_250 */ {(void*) Zoness_Actor250_Draw, 1, (ObjectFunc) Zoness_Actor250_Update, D_ZO_602C1D4, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_251 */ {(void*) Zoness_Actor251_Draw, 2, (ObjectFunc) Zoness_Actor251_Update, D_ZO_602C218, 1000.0f, 0, 0, 40, 0, 1.0f, 1 }, - /* OBJ_ACTOR_252 */ {(void*) Zoness_Actor252_Draw, 1, (ObjectFunc) Zoness_Actor252_Update, D_ZO_602C234, 200.0f, 0, 0, 40, 0, 80.0f, 1 }, - /* OBJ_ACTOR_253 */ {(void*) Zoness_Actor253_Draw, 1, (ObjectFunc) Zoness_Actor253_Update, D_ZO_602C250, 300.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_254 */ {(void*) Zoness_Actor254_Draw, 1, (ObjectFunc) Zoness_Actor254_Update, D_ZO_602C2B0, 300.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ACTOR_ME_METEO_BALL */ {(void*) MeteoBall_Draw, 1, (ObjectFunc) MeteoBall_Update, aMeMeteoBallHitbox, 100.0f, 0, 1, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_ME_HOPBOT */ {(void*) ActorHopBot_Draw, 1, (ObjectFunc) ActorHopBot_Update, aMeHopBotHitbox, 100.0f, 0, 1, 39, 0, 180.0f, 1 }, + /* OBJ_ACTOR_SLIPPY_SX */ {(void*) SectorX_SxSlippy_Draw, 1, (ObjectFunc) SectorX_SxSlippy_Update, gNoHitbox, 1000.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_ACTOR_SY_ROBOT */ {(void*) SectorY_SyRobot_Draw, 1, (ObjectFunc) SectorY_SyRobot_Update, aSyRobotHitbox, 1000.0f, 0, 0, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_MA_LOCOMOTIVE */ {(void*) Macbeth_Train_Draw, 1, (ObjectFunc) Macbeth_MaLocomotive_Update, aMaLocomotiveHitbox, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_MA_TRAIN_CAR_1 */ {(void*) Macbeth_Train_Draw, 1, (ObjectFunc) Macbeth_MaTrainCar1_Update, aMaTrainCar1Hitbox, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_207 */ {(void*) Macbeth_Actor207_Draw, 2, (ObjectFunc) Macbeth_Actor207_Update, aMaActor207Hitbox, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_MA_TRAIN_CAR_2 */ {(void*) Macbeth_Train_Draw, 1, (ObjectFunc) Macbeth_MaTrainCar2_Update, aMaTrainCar2Hitbox, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_MA_TRAIN_CAR_3 */ {(void*) Macbeth_Train_Draw, 1, (ObjectFunc) Macbeth_MaTrainCar3_Update, aMaTrainCar3Hitbox, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_MA_TRAIN_CAR_4 */ {(void*) Macbeth_Train_Draw, 1, (ObjectFunc) Macbeth_MaTrainCar4_Update, aMaTrainCar4Hitbox, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_MA_TRAIN_CAR_5 */ {(void*) Macbeth_Train_Draw, 1, (ObjectFunc) Macbeth_MaTrainCar5_Update, aMaTrainCar5Hitbox, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_MA_TRAIN_CAR_6 */ {(void*) Macbeth_Train_Draw, 1, (ObjectFunc) Macbeth_MaTrainCar6_Update, aMaTrainCar6Hitbox, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_MA_TRAIN_CAR_7 */ {(void*) Macbeth_Train_Draw, 1, (ObjectFunc) Macbeth_MaTrainCar7_Update, aMaTrainCar7Hitbox, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_MA_RAILROAD_SWITCH */ {(void*) Macbeth_MaRailroadSwitch_Draw, 1, (ObjectFunc) Macbeth_MaRailroadSwitch_Update, aMaMaRailroadSwitchHitbox, 300.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_MA_BOULDER */ {(void*) Macbeth_MaBoulder_Draw, 1, (ObjectFunc) Macbeth_MaBoulder_Update, aMaBoulderHitbox, 300.0f, 0, 1, 40, 1, 0.0f, 1 }, + /* OBJ_ACTOR_MA_HORIZONTAL_LOCK_BAR */ {(void*) Macbeth_MaHorizontalLockBar_Draw, 1, (ObjectFunc) Macbeth_MaHorizontalLockBar_Update, aMaHorizontalLockBarHitbox, 200.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_MA_VERTICAL_LOCK_BAR */ {(void*) Macbeth_MaVerticalLockBar_Draw, 1, (ObjectFunc) Macbeth_MaVerticalLockBar_Update, aMaVerticalLockBarHitbox, 200.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_MA_BARRIER */ {(void*) Macbeth_MaBarrier_Draw, 1, (ObjectFunc) Macbeth_MaBarrier_Update, aMaBarrierHitbox, 200.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_219 */ {(void*) Macbeth_Actor219_Draw, 1, (ObjectFunc) Macbeth_Actor219_Update, aMaActor219Hitbox, 300.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_MA_BOMBDROP */ {(void*) Macbeth_MaBombDrop_Draw, 1, (ObjectFunc) Macbeth_MaBombDrop_Update, aMaBombDropHitbox, 200.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_MA_SPEAR */ {(void*) Macbeth_MaSpear_Draw, 1, (ObjectFunc) Macbeth_MaSpear_Update, aMaSpearHitbox, 300.0f, 0, 0, 40, 1, 1.0f, 0 }, + /* OBJ_ACTOR_MA_SHOCK_BOX */ {(void*) Macbeth_MaShockBox_Draw, 1, (ObjectFunc) Macbeth_MaShockBox_Update, aMaShockBoxHitbox, 300.0f, 0, 0, 40, 1, 1.0f, 0 }, + /* OBJ_ACTOR_MA_RAILWAY_SIGNAL */ {(void*) Macbeth_MaRailwaySignal_Draw, 1, (ObjectFunc) Macbeth_MaRailwaySignal_Update, aMaRailwaySignalHitbox, 300.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_TI_TERRAIN */ {(void*) NULL, 1, (ObjectFunc) Titania_TiTerrain_Update, gNoHitbox, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_ACTOR_TI_LANDMINE */ {(void*) aTi1LandmineDL, 0, (ObjectFunc) Titania_TiLandmine_Update, aTi1LandmineHitbox, 50.0f, 0, 0, 39, 1, 1.0f, 0 }, + /* OBJ_ACTOR_TI_DESERT_ROVER */ {(void*) Titania_TiDesertRover_Draw, 1, (ObjectFunc) Titania_TiDesertRover_Update, aTiDesertRoverHitbox, 300.0f, 0, 0, 39, 1, 70.0f, 1 }, + /* OBJ_ACTOR_TI_DELPHOR */ {(void*) Titania_TiDelphor_Draw, 1, (ObjectFunc) Titania_TiDelphor_Update, aTiDelphorHitbox, 0.0f, 0, 0, 39, 1, 0.0f, 0 }, + /* OBJ_ACTOR_TI_DELPHOR_HEAD */ {(void*) Titania_TiDelphorHead_Draw, 1, (ObjectFunc) Titania_TiDelphorHead_Update, aTiDelphorHeadHitbox, 0.0f, 0, 0, 39, 1, 1.0f, 1 }, + /* OBJ_ACTOR_TI_DESERT_CRAWLER */ {(void*) Titania_TiDesertCrawler_Draw, 1, (ObjectFunc) Titania_TiDesertCrawler_Update, aTiDesertCrawlerHitbox, 1000.0f, 0, 0, 20, 1, 0.0f, 1 }, + /* OBJ_ACTOR_TI_BOULDER */ {(void*) Titania_TiBoulder_Draw, 1, (ObjectFunc) Titania_TiBoulder_Update, aTiBoulderHitbox, 0.0f, 0, 1, 39, 1, 0.0f, 1 }, + /* OBJ_ACTOR_TI_BOMB */ {(void*) Titania_TiBomb_Draw, 1, (ObjectFunc) Titania_TiBomb_Update, aTiBombHitbox, 0.0f, 0, 0, 39, 1, 0.0f, 1 }, + /* OBJ_ACTOR_TI_RASCO */ {(void*) Titania_TiRasco_Draw, 1, (ObjectFunc) Titania_TiRasco_Update, aTiRascoHitbox, 0.0f, 0, 0, 39, 1, 20.0f, 1 }, + /* OBJ_ACTOR_TI_FEKUDA */ {(void*) Titania_TiFekuda_Draw, 1, (ObjectFunc) Titania_TiFekuda_Update, aTiFekudaHitbox, 200.0f, 0, 0, 39, 1, 1.0f, 1 }, + /* OBJ_ACTOR_TI_GREAT_FOX */ {(void*) TiGreatFox_Draw, 1, (ObjectFunc) TiGreatFox_Update, gNoHitbox, 2000.0f, 0, 0, 39, 0, 0.0f, 5 }, + /* OBJ_ACTOR_ZO_BIRD */ {(void*) Zoness_ZoBird_Draw, 2, (ObjectFunc) Zoness_ZoBird_Update, aZoBirdHitbox, 1000.0f, 0, 1, 40, 0, 1.0f, 1 }, + /* OBJ_ACTOR_ZO_DODORA */ {(void*) Zoness_ZoDodora_Draw, 1, (ObjectFunc) Zoness_ZoDodora_Update, aZoDodoraHitbox, 5000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_UNK_237 */ {(void*) Actor237_Draw, 1, (ObjectFunc) Actor237_Update, gNoHitbox, 200.0f, 0, 0, 40, 0, 0.0f, 2 }, + /* OBJ_ACTOR_ZO_FISH */ {(void*) Zoness_ZoFish_Draw, 2, (ObjectFunc) Zoness_ZoFish_Update, gCubeHitbox100, 200.0f, 0, 1, 40, 0, 1.0f, 1 }, + /* OBJ_ACTOR_ZO_DODORA_WP_COUNT */ {(void*) NULL, 1, (ObjectFunc) NULL, gNoHitbox, 1000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ACTOR_ZO_Z_GULL */ {(void*) Zoness_ZGull_Draw, 1, (ObjectFunc) Zoness_ZGull_Update, gCubeHitbox100, 1500.0f, 0, 1, 40, 0, 20.0f, 0 }, + /* OBJ_ACTOR_ZO_ENERGY_BALL */ {(void*) Zoness_ZoEnergyBall_Draw, 1, (ObjectFunc) Zoness_ZoEnergyBall_Update, gZoEnergyBallHitbox, 1500.0f, 0, 1, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_ZO_TROIKA */ {(void*) Zoness_ZoTroika_Draw, 2, (ObjectFunc) Zoness_ZoTroika_Update, aZoTroikaHitbox, 500.0f, 0, 0, 40, 0, 1.0f, 0 }, + /* OBJ_ACTOR_ZO_SHRIMP */ {(void*) Zoness_ZoShrimp_Draw, 2, (ObjectFunc) Zoness_ZoShrimp_Update, gCubeHitbox100, 0.0f, 0, 1, 40, 0, 1.0f, 1 }, + /* OBJ_ACTOR_ZO_OBNEMA */ {(void*) Zoness_ZoObnema_Draw, 2, (ObjectFunc) Zoness_ZoObnema_Update, aZoObnemaHitbox, 2000.0f, 0, 0, 40, 0, 50.0f, 0 }, + /* OBJ_ACTOR_ZO_BALL */ {(void*) Zoness_ZoBall_Draw, 1, (ObjectFunc) Zoness_ZoBall_Update, gCubeHitbox100, 200.0f, 0, 0, 40, 0, 1.0f, 0 }, + /* OBJ_ACTOR_ZO_MINE */ {(void*) Zoness_ZoMine_Draw, 1, (ObjectFunc) Zoness_ZoMine_Update, gCubeHitbox100, 2000.0f, 0, 0, 40, 0, 1.0f, 0 }, + /* OBJ_ACTOR_ZO_BARRIER */ {(void*) Zoness_ZoBarrier_Draw, 1, (ObjectFunc) Zoness_ZoBarrier_Update, aZoBarrierHitbox, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_ZO_CRANE_MAGNET */ {(void*) Zoness_ZoCraneMagnet_Draw, 1, (ObjectFunc) Zoness_ZoCraneMagnet_Update, gCubeHitbox150, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_SPIKEBALL */ {(void*) Zoness_ZoSpikeBall_Draw, 1, (ObjectFunc) Zoness_ZoSpikeBall_Update, gCubeHitbox200, 5000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_ZO_CARGOSHIP */ {(void*) Zoness_ZoCargoShip_Draw, 1, (ObjectFunc) Zoness_ZoCargoShip_Update, aZoCargoShipHitbox, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_ZO_CONTAINER */ {(void*) Zoness_ZoContainer_Draw, 2, (ObjectFunc) Zoness_ZoContainer_Update, aZoContainerHitbox, 1000.0f, 0, 0, 40, 0, 1.0f, 1 }, + /* OBJ_ACTOR_ZO_RADARBUOY */ {(void*) Zoness_ZoRadarBuoy_Draw, 1, (ObjectFunc) Zoness_ZoRadarBuoy_Update, aZoRadarBuoyHitbox, 200.0f, 0, 0, 40, 0, 80.0f, 1 }, + /* OBJ_ACTOR_ZO_SUPPLYCRANE */ {(void*) Zoness_ZoSupplyCrane_Draw, 1, (ObjectFunc) Zoness_ZoSupplyCrane_Update, aZoSupplyCraneHitbox, 300.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_ZO_SEARCHLIGHT */ {(void*) Zoness_ZoSearchLight_Draw, 1, (ObjectFunc) Zoness_ZoSearchLight_Update, aZoSearchLightHitbox, 300.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ACTOR_255 */ {(void*) Aquas_Actor255_Draw, 1, (ObjectFunc) Aquas_Actor255_Update, D_AQ_6030BFC, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_256 */ {(void*) Aquas_Actor256_Draw, 1, (ObjectFunc) Aquas_Actor256_Update, D_AQ_6030C18, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_257 */ {(void*) Aquas_Actor257_Draw, 1, (ObjectFunc) Aquas_Actor257_Update, D_AQ_6030C44, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_258 */ {(void*) Aquas_Actor258_Draw, 1, (ObjectFunc) Aquas_Actor258_Update, gCubeHitbox100, 200.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_259 */ {(void*) Aquas_Actor259_Draw, 2, (ObjectFunc) Aquas_Actor259_Update, D_AQ_6031398, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_260 */ {(void*) Aquas_Actor260_Draw, 2, (ObjectFunc) Aquas_Actor260_Update, D_AQ_60313CC, 300.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_261 */ {(void*) Aquas_Actor261_Draw, 2, (ObjectFunc) Aquas_Actor261_Update, D_AQ_6031400, 300.0f, 0, 0, 40, 0, 0.0f, 1 }, - /* OBJ_ACTOR_262 */ {(void*) Aquas_Actor262_Draw, 2, (ObjectFunc) Aquas_Actor262_Update, D_AQ_603144C, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_263 */ {(void*) Aquas_Actor263_Draw, 2, (ObjectFunc) Aquas_Actor263_Update, D_AQ_6031480, 200.0f, 0, 0, 40, 0, 0.0f, 1 }, - /* OBJ_ACTOR_264 */ {(void*) Aquas_Actor264_Draw, 1, (ObjectFunc) Aquas_Actor264_Update, gCubeHitbox100, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ACTOR_265 */ {(void*) Aquas_Actor265_Draw, 1, (ObjectFunc) Aquas_Actor265_Update, D_AQ_6031500, 200.0f, 0, 0, 40, 0, 0.0f, 1 }, - /* OBJ_ACTOR_266 */ {(void*) Aquas_Actor266_Draw, 2, (ObjectFunc) Aquas_Actor266_Update, D_AQ_6031538, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ACTOR_267 */ {(void*) Aquas_Actor267_Draw, 2, (ObjectFunc) Aquas_Actor267_Update, D_AQ_6031554, 800.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_268 */ {(void*) Aquas_Actor268_Draw, 1, (ObjectFunc) Aquas_Actor268_Update, D_AQ_6031570, 10000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ACTOR_269 */ {(void*) Aquas_Actor269_Draw, 1, (ObjectFunc) Aquas_Actor269_Update, D_AQ_6030D20, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_270 */ {(void*) Aquas_Actor270_Draw, 1, (ObjectFunc) Aquas_Actor270_Update, D_AQ_60314C8, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_271 */ {(void*) Actor271_Draw, 2, (ObjectFunc) Actor271_Update, D_BO_6011B24, 0.0f, 0, 0, 39, 0, 730.0f, 1 }, - /* OBJ_ACTOR_272 */ {(void*) Actor272_Draw, 1, (ObjectFunc) Actor272_Update, D_BO_6011BF4, 0.0f, 0, 0, 39, 0, 150.0f, 1 }, - /* OBJ_ACTOR_FO_RADAR */ {(void*) Fortuna_Radar_Draw, 2, (ObjectFunc) Fortuna_Radar_Update, aFoRadarHitbox, 0.0f, 0, 0, 39, 0, 220.0f, 1 }, + /* OBJ_ACTOR_AQ_PEARL */ {(void*) Aquas_AqPearl_Draw, 1, (ObjectFunc) Aquas_AqPearl_Update, gCubeHitbox100, 200.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_AQ_ANGLERFISH */ {(void*) Aquas_AqAnglerFish_Draw, 2, (ObjectFunc) Aquas_AqAnglerFish_Update, aAqAnglerFishHitbox, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_AQ_GAROA */ {(void*) Aquas_AqGaroa_Draw, 2, (ObjectFunc) Aquas_AqGaroa_Update, aAqGaroaHitbox, 300.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_AQ_SCULPIN */ {(void*) Aquas_AqSculpin_Draw, 2, (ObjectFunc) Aquas_AqSculpin_Update, aAqSculpinHitbox, 300.0f, 0, 0, 40, 0, 0.0f, 1 }, + /* OBJ_ACTOR_AQ_SPINDLYFISH */ {(void*) Aquas_AqSpindlyFish_Draw, 2, (ObjectFunc) Aquas_AqSpindlyFish_Update, aAqSpindlyFishHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_AQ_SQUID */ {(void*) Aquas_AqSquid_Draw, 2, (ObjectFunc) Aquas_AqSquid_Update, aAqSquidHitbox, 200.0f, 0, 0, 40, 0, 0.0f, 1 }, + /* OBJ_ACTOR_AQ_SEAWEED */ {(void*) Aquas_AqSeaweed_Draw, 1, (ObjectFunc) Aquas_AqSeaweed_Update, gCubeHitbox100, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ACTOR_AQ_BOULDER */ {(void*) Aquas_AqBoulder_Draw, 1, (ObjectFunc) Aquas_AqBoulder_Update, aAqBoulderHitbox, 200.0f, 0, 0, 40, 0, 0.0f, 1 }, + /* OBJ_ACTOR_AQ_CORAL */ {(void*) Aquas_AqCoral_Draw, 2, (ObjectFunc) Aquas_AqCoral_Update, aAqCoralHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ACTOR_AQ_JELLYFISH */ {(void*) Aquas_AqJellyfish_Draw, 2, (ObjectFunc) Aquas_AqJellyfish_Update, aAqJellyfishHitbox, 800.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_AQ_FISHGROUP */ {(void*) Aquas_AqFishGroup_Draw, 1, (ObjectFunc) Aquas_AqFishGroup_Update, aAqFishGroupHitbox, 10000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ACTOR_AQ_STONE_COLUMN */ {(void*) Aquas_AqStoneColumn_Draw, 1, (ObjectFunc) Aquas_AqStoneColumn_Update, aAqStoneColumnHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_AQ_OYSTER */ {(void*) Aquas_AqOyster_Draw, 1, (ObjectFunc) Aquas_AqOyster_Update, aAqOysterHitbox, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_BO_SHIELD_REACTOR */ {(void*) BoShieldReactor_Draw, 2, (ObjectFunc) BoShieldReactor_Update, aBoShieldReactorHitbox, 0.0f, 0, 0, 39, 0, 730.0f, 1 }, + /* OBJ_ACTOR_BO_LASER_CANNON */ {(void*) BoLaserCannon_Draw, 1, (ObjectFunc) BoLaserCannon_Update, aBoLaserCannonHitbox, 0.0f, 0, 0, 39, 0, 150.0f, 1 }, + /* OBJ_ACTOR_FO_RADAR */ {(void*) Fortuna_FoRadar_Draw, 2, (ObjectFunc) Fortuna_FoRadar_Update, aFoRadarHitbox, 0.0f, 0, 0, 39, 0, 220.0f, 1 }, /* OBJ_ACTOR_SZ_SPACE_JUNK */ {(void*) SectorZ_SpaceJunkDraw, 1, (ObjectFunc) SectorZ_SpaceJunkUpdate, gCubeHitbox200, 0.0f, 0, 0, 39, 0, 1.0f, 0 }, - /* OBJ_ACTOR_275 */ {(void*) Solar_Doodad_Draw, 1, (ObjectFunc) Solar_Doodad_Update, gCubeHitbox100, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_276 */ {(void*) Solar_Doodad_Draw, 1, (ObjectFunc) Solar_Doodad_Update, gCubeHitbox100, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_277 */ {(void*) Solar_Doodad_Draw, 1, (ObjectFunc) Solar_Doodad_Update, gCubeHitbox200, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_278 */ {(void*) NULL, 1, (ObjectFunc) Solar_Actor278_Update, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* OBJ_ACTOR_279 */ {(void*) NULL, 1, (ObjectFunc) Solar_Actor279_Update, gNoHitbox, 1000.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* OBJ_ACTOR_280 */ {(void*) D_VE1_900DD20, 0, (ObjectFunc) Venom1_Actor280_Update, D_VE1_601B7F8, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_281 */ {(void*) Venom1_Actor281_Draw, 1, (ObjectFunc) Venom1_Doodad_Update, D_VE1_601B830, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_282 */ {(void*) D_VE1_901DA50, 0, (ObjectFunc) Venom1_Doodad_Update, D_VE1_601B868, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_283 */ {(void*) D_VE1_9023AD0, 0, (ObjectFunc) Venom1_Actor283_Update, D_VE1_601B8A0, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_284 */ {(void*) Venom1_Actor284_Draw, 1, (ObjectFunc) Venom1_Actor284_Update, D_VE1_601B8D8, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_285 */ {(void*) Andross_Actor285_Draw, 1, (ObjectFunc) Andross_Actor285_Update, gCubeHitbox100, 1000.0f, 0, 0, 20, 0, 1.0f, 1 }, - /* OBJ_ACTOR_286 */ {(void*) Andross_Actor286_Draw, 1, (ObjectFunc) Andross_Actor286_Update, gCubeHitbox100, 1000.0f, 0, 0, 20, 0, 0.0f, 0 }, - /* OBJ_ACTOR_287 */ {(void*) NULL, 1, (ObjectFunc) Andross_Actor287_Update, gNoHitbox, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_288 */ {(void*) NULL, 1, (ObjectFunc) Andross_Actor288_Update, gNoHitbox, 1000.0f, 0, 0, 20, 1, 0.0f, 0 }, - /* OBJ_ACTOR_289 */ {(void*) Actor289_Draw, 1, (ObjectFunc) Andross_Actor289_Update, gNoHitbox, 1000.0f, 0, 0, 20, 1, 0.0f, 0 }, - /* OBJ_ACTOR_290 */ {(void*) NULL, 1, (ObjectFunc) Andross_Actor290_Update, gNoHitbox, 1000.0f, 0, 0, 20, 0, 0.0f, 0 }, + /* OBJ_ACTOR_SO_ROCK_1 */ {(void*) Solar_SoRock_Draw, 1, (ObjectFunc) Solar_SoRock_Update, gCubeHitbox100, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_SO_ROCK_2 */ {(void*) Solar_SoRock_Draw, 1, (ObjectFunc) Solar_SoRock_Update, gCubeHitbox100, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_SO_ROCK_3 */ {(void*) Solar_SoRock_Draw, 1, (ObjectFunc) Solar_SoRock_Update, gCubeHitbox200, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_SO_WAVE */ {(void*) NULL, 1, (ObjectFunc) Solar_SoWave_Update, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* OBJ_ACTOR_SO_PROMINENCE */ {(void*) NULL, 1, (ObjectFunc) Solar_SoProminence_Update, gNoHitbox, 1000.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* OBJ_ACTOR_VE1_PILLAR_1 */ {(void*) aVe1Pillar1DL, 0, (ObjectFunc) Venom1_Ve1Pillar1_Update, aVe1Pillar1Hitbox, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_VE1_PILLAR_2 */ {(void*) Venom1_Ve1Pillar2_Draw, 1, (ObjectFunc) Venom1_Pillar2_3_Update, aVe1Pillar2Hitbox, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_VE1_PILLAR_3 */ {(void*) aVe1Pillar3DL, 0, (ObjectFunc) Venom1_Pillar2_3_Update, aVe1Pillar3Hitbox, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_VE1_PILLAR_4 */ {(void*) aVe1Pillar4DL, 0, (ObjectFunc) Venom1_Ve1Pillar4_Update, aVe1Pillar4Hitbox, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_VE1_MONKEY_STATUE */ {(void*) Venom1_Ve1MonkeyStatue_Draw, 1, (ObjectFunc) Venom1_Ve1MonkeyStatue_Update, aVe1MonkeyStatueHitbox, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_AND_LASER_EMITTER */ {(void*) Andross_AndLaserEmitter_Draw, 1, (ObjectFunc) Andross_AndLaserEmitter_Update, gCubeHitbox100, 1000.0f, 0, 0, 20, 0, 1.0f, 1 }, + /* OBJ_ACTOR_AND_BRAIN_WASTE */ {(void*) Andross_AndBrainWaste_Draw, 1, (ObjectFunc) Andross_AndBrainWaste_Update, gCubeHitbox100, 1000.0f, 0, 0, 20, 0, 0.0f, 0 }, + /* OBJ_ACTOR_AND_EXPLOSION */ {(void*) NULL, 1, (ObjectFunc) Andross_AndExplosion_Update, gNoHitbox, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_AND_RADIO */ {(void*) NULL, 1, (ObjectFunc) Andross_AndRadio_Update, gNoHitbox, 1000.0f, 0, 0, 20, 1, 0.0f, 0 }, + /* OBJ_ACTOR_AND_JAMES_TRIGGER */ {(void*) AndJamesTrigger_Draw, 1, (ObjectFunc) Andross_AndJamesTrigger_Update, gNoHitbox, 1000.0f, 0, 0, 20, 1, 0.0f, 0 }, + /* OBJ_ACTOR_AND_BOSS_TIMER_SET */ {(void*) NULL, 1, (ObjectFunc) Andross_AndBossTimer_Update, gNoHitbox, 1000.0f, 0, 0, 20, 0, 0.0f, 0 }, /* OBJ_ACTOR_SUPPLIES */ {(void*) ActorSupplies_Draw, 1, (ObjectFunc) ActorSupplies_Update, gCubeHitbox150, 1000.0f, 0, 0, 0, 0, 1.0f, 0 }, - /* OBJ_BOSS_CO_GRANGA */ {(void*) Corneria_Granga_Draw, 2, (ObjectFunc) Corneria_Granga_Update, aCoGrangaHitbox, 20000.0f, 0, 0, 40, 1, 0.0f, 10 }, - /* OBJ_BOSS_CO_CARRIER */ {(void*) Corneria_Carrier_Draw, 1, (ObjectFunc) Corneria_Carrier_Update, aCoCarrierHitbox, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_294 */ {(void*) Corneria_Boss294_Draw, 1, (ObjectFunc) Corneria_Boss294_Update, D_CO_603E714, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_295 */ {(void*) Corneria_Boss295_Draw, 1, (ObjectFunc) Corneria_Boss295_Update, D_CO_603E748, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_296 */ {(void*) Corneria_Boss296_Draw, 1, (ObjectFunc) Corneria_Boss296_Update, D_CO_603E7C4, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_297 */ {(void*) Meteo_Boss297_Draw, 1, (ObjectFunc) Meteo_Boss297_Update, D_ME_602F75C, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_298 */ {(void*) Meteo_Boss298_Draw, 1, (ObjectFunc) Meteo_Boss298_Update, D_ME_602FA50, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_299 */ {(void*) Boss299_Draw, 2, (ObjectFunc) Boss299_Update, gNoHitbox, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_300 */ {(void*) Boss300_Draw, 1, (ObjectFunc) Boss300_Update, gNoHitbox, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_301 */ {(void*) Aquas_Boss301_Draw, 1, (ObjectFunc) Aquas_Boss301_Update, D_AQ_6030B10, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_A6 */ {(void*) Area6_Boss_Draw, 1, (ObjectFunc) Area6_Boss_Update, D_A6_6028454, 2000.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_SX_SPYBORG */ {(void*) SectorX_Boss_Draw, 2, (ObjectFunc) SectorX_Boss_Update, D_SX_6032550, 20000.0f, 0, 0, 20, 0, 0.0f, 10 }, - /* OBJ_BOSS_304 */ {(void*) SectorX_Boss304_Draw, 2, (ObjectFunc) SectorX_Boss304_Update, D_SX_6032488, 1000.0f, 0, 0, 20, 0, 0.0f, 10 }, - /* OBJ_BOSS_305 */ {(void*) SectorX_Boss305_Draw, 2, (ObjectFunc) SectorX_Boss305_Update, D_SX_60324EC, 1000.0f, 0, 0, 20, 0, 0.0f, 10 }, - /* OBJ_BOSS_TI */ {(void*) Titania_Boss_Draw, 1, (ObjectFunc) Titania_Boss_Update,D_TI_801B83A8, 1000.0f, 0, 0, 40, 1, 0.0f, 10 }, - /* OBJ_BOSS_ZO */ {(void*) Zoness_Boss_Draw, 2, (ObjectFunc) Zoness_Boss_Update, D_ZO_602C044, 1000.0f, 0, 0, 40, 0, 1.0f, 10 }, - /* OBJ_BOSS_FO */ {(void*) HUD_BossFO_Draw, 1, (ObjectFunc) HUD_BossFO_Update, D_FO_600FFE0, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, - /* OBJ_BOSS_309 */ {(void*) Boss309_Draw, 1, (ObjectFunc) Boss309_Update, gNoHitbox, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, - /* OBJ_BOSS_310 */ {(void*) Boss310_Draw, 1, (ObjectFunc) Boss310_Update, gNoHitbox, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, - /* OBJ_BOSS_311 */ {(void*) Bolse_Boss311_Draw, 2, (ObjectFunc) Bolse_Boss311_Update, D_BO_6011C80, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, - /* OBJ_BOSS_VE2 */ {(void*) Venom2_Boss_Draw, 2, (ObjectFunc) Venom2_Boss_Update, D_VE2_60166F4, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, - /* OBJ_BOSS_SZ_GREAT_FOX */ {(void*) SectorZ_GreatFoxDraw, 1, (ObjectFunc) SectorZ_GreatFoxUpdate, D_SZ_6009388, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_SY */ {(void*) SectorY_Boss_Draw, 2, (ObjectFunc) SectorY_Boss_Update, gNoHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_SO */ {(void*) Solar_Boss_Draw, 2, (ObjectFunc) Solar_Boss_Update, gNoHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_KA */ {(void*) Katina_BossDraw, 1, (ObjectFunc) Katina_BossUpdate, D_KA_6011058, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_KA_BASE */ {(void*) Katina_Base_Draw, 1, (ObjectFunc) Katina_BaseUpdate, D_KA_601115C, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, - /* OBJ_BOSS_AQ */ {(void*) Aquas_Boss_Draw, 2, (ObjectFunc) Aquas_Boss_Update, D_AQ_6030F74, 10000.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_VE1 */ {(void*) Venom1_Boss_Draw, 1, (ObjectFunc) Venom1_Boss_Update,D_VE1_8019A9B8, 3000.0f, 0, 0, 40, 1, 0.0f, 10 }, - /* OBJ_BOSS_320 */ {(void*) Andross_Boss320_Draw, 2, (ObjectFunc) Andross_Boss320_Update, D_ANDROSS_C038DC0, 10000.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_321 */ {(void*) Andross_Boss321_Draw, 1, (ObjectFunc) Andross_Boss321_Update, D_ANDROSS_C038F24, 10000.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_CO_GRANGA */ {(void*) Corneria_CoGranga_Draw, 2, (ObjectFunc) Corneria_CoGranga_Update, aCoGrangaHitbox, 20000.0f, 0, 0, 40, 1, 0.0f, 10 }, + /* OBJ_BOSS_CO_CARRIER */ {(void*) Corneria_CoCarrier_Draw, 1, (ObjectFunc) Corneria_CoCarrier_Update, aCoCarrierHitbox, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_CO_CARRIER_LEFT */ {(void*) Corneria_CoCarrierLeft_Draw, 1, (ObjectFunc) Corneria_CarrierLeft_Update, aCoCarrierLeftHitbox, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_CO_CARRIER_UPPER */ {(void*) Corneria_CoCarrierUpper_Draw, 1, (ObjectFunc) Corneria_CarrierUpper_Update, aCoCarrierUpperHitbox, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_CO_CARRIER_BOTTOM */ {(void*) Corneria_CoCarrierBottom_Draw, 1, (ObjectFunc) Corneria_CarrierBottom_Update, aCoCarrierBottomHitbox, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_ME_CRUSHER */ {(void*) Meteo_MeCrusher_Draw, 1, (ObjectFunc) Meteo_MeCrusher_Update, aMeCrusherHitbox, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_ME_CRUSHER_SHIELD */ {(void*) Meteo_MeCrusherShield_Draw, 1, (ObjectFunc) Meteo_MeCrusherShield_Update, aMeCrusherShieldHitbox, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_UNK_299 */ {(void*) Boss299_Draw, 2, (ObjectFunc) Boss299_Update, gNoHitbox, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_UNK_300 */ {(void*) Boss300_Draw, 1, (ObjectFunc) Boss300_Update, gNoHitbox, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_AQ_UNK_301 */ {(void*) Aquas_Boss301_Draw, 1, (ObjectFunc) Aquas_Boss301_Update, aBoss301Hitbox, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_A6_GORGON */ {(void*) Area6_A6Gorgon_Draw, 1, (ObjectFunc) Area6_A6Gorgon_Update, aA6GorgonHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_SX_SPYBORG */ {(void*) SectorX_SxSpyborg_Draw, 2, (ObjectFunc) SectorX_SxSpyborg_Update, aSxSpyborgHitbox, 20000.0f, 0, 0, 20, 0, 0.0f, 10 }, + /* OBJ_BOSS_SX_SPYBORG_LEFT_ARM */ {(void*) SectorX_SxSpyborgLeftArm_Draw, 2, (ObjectFunc) SectorX_SxSpyborgLeftArm_Update, aSxSpyborgLeftArmHitbox, 1000.0f, 0, 0, 20, 0, 0.0f, 10 }, + /* OBJ_BOSS_SX_SPYBORG_RIGHT_ARM */ {(void*) SectorX_SxSpyborgRightArm_Draw, 2, (ObjectFunc) SectorX_SxSpyborgRightArm_Update, aSxSpyborgRightArmHitbox, 1000.0f, 0, 0, 20, 0, 0.0f, 10 }, + /* OBJ_BOSS_TI_GORAS */ {(void*) Titania_TiGoras_Draw, 1, (ObjectFunc) Titania_TiGoras_Update, aTiGorasHitbox, 1000.0f, 0, 0, 40, 1, 0.0f, 10 }, + /* OBJ_BOSS_ZO_SARUMARINE */ {(void*) Zoness_ZoSarumarine_Draw, 2, (ObjectFunc) Zoness_ZoSarumarine_Update, aZoSarumarineHitbox, 1000.0f, 0, 0, 40, 0, 1.0f, 10 }, + /* OBJ_BOSS_FO_BASE */ {(void*) HUD_FoBase_Draw, 1, (ObjectFunc) HUD_FoBase_Update, aFoBaseHitbox, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, + /* OBJ_BOSS_BO_BASE */ {(void*) BoBase_Draw, 1, (ObjectFunc) BoBase_Update, gNoHitbox, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, + /* OBJ_BOSS_BO_BASE_SHIELD */ {(void*) BoBaseShield_Draw, 1, (ObjectFunc) BoBaseShield_Update, gNoHitbox, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, + /* OBJ_BOSS_BO_BASE_CORE */ {(void*) Bolse_BoBaseCore_Draw, 2, (ObjectFunc) Bolse_BoBaseCore_Update, aBoBaseCoreHitbox, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, + /* OBJ_BOSS_VE2_BASE */ {(void*) Venom2_Ve2Base_Draw, 2, (ObjectFunc) Venom2_Ve2Base_Update, aVe2BaseHitbox, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, + /* OBJ_BOSS_SZ_GREAT_FOX */ {(void*) SectorZ_SzGreatFox_Draw, 1, (ObjectFunc) SectorZ_SzGreatFox_Update, aSzGreatFoxHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_SY_SHOGUN */ {(void*) SectorY_SyShogun_Draw, 2, (ObjectFunc) SectorY_SyShogun_Update, gNoHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_SO_VULKAIN */ {(void*) Solar_SoVulkain_Draw, 2, (ObjectFunc) Solar_SoVulkain_Update, gNoHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_KA_SAUCERER */ {(void*) Katina_KaSaucerer_Draw, 1, (ObjectFunc) Katina_KaSaucerer_Update, aKaSaucererHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_KA_FLBASE */ {(void*) Katina_KaFrontlineBase_Draw, 1, (ObjectFunc) Katina_KaFrontlineBase_Update, aKaFrontlineBaseHitbox, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, + /* OBJ_BOSS_AQ_BACOON */ {(void*) Aquas_AqBacoon_Draw, 2, (ObjectFunc) Aquas_AqBacoon_Update, aAqBacoonHitbox, 10000.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_VE1_GOLEMECH */ {(void*) Venom1_Ve1Golemech_Draw, 1, (ObjectFunc) Venom1_Ve1Golemech_Update, aVe1GolemechHitbox, 3000.0f, 0, 0, 40, 1, 0.0f, 10 }, + /* OBJ_BOSS_AND_ANDROSS */ {(void*) Andross_AndAndross_Draw, 2, (ObjectFunc) Andross_AndAndross_Update, aAndAndrossHitbox, 10000.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_AND_BRAIN */ {(void*) Andross_AndBrain_Draw, 1, (ObjectFunc) Andross_AndBrain_Update, aAndBrainHitbox, 10000.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_ITEM_LASERS */ {(void*) ItemLasers_Draw, 1, (ObjectFunc) ItemLasers_Update, gItemLasersHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ITEM_CHECKPOINT */ {(void*) ItemCheckpoint_Draw, 1, (ObjectFunc) ItemCheckpoint_Update, gItemCheckpointHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ITEM_SILVER_RING */ {(void*) ItemSilverRing_Draw, 1, (ObjectFunc) ItemSupplyRing_Update, gItemSupplyRingHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, @@ -432,13 +432,13 @@ ObjectInfo gObjectInfo[] = { /* OBJ_ITEM_GOLD_RING */ {(void*) ItemGoldRing_Draw, 1, (ObjectFunc) ItemGoldRing_Update, gItemSupplyRingHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ITEM_WING_REPAIR */ {(void*) aArwingItemLasersDL, 0, (ObjectFunc) ItemWingRepair_Update, gItemLasersHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ITEM_TRAINING_RING */ {(void*) gItemTrainingRingDL, 0, (ObjectFunc) Training_ItemRing_Update, D_TR_6009CFC, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_FIRE_SMOKE */ {(void*) Effect_FireSmoke_Draw, 1, (ObjectFunc) Effect_Effect339_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_340 */ {(void*) Effect_FireSmoke_Draw, 1, (ObjectFunc) Effect_Effect340_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_341 */ {(void*) Effect_FireSmoke_Draw, 1, (ObjectFunc) Effect_Effect341_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_342 */ {(void*) Effect_Effect342_Draw, 1, (ObjectFunc) Effect_Effect342_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_343 */ {(void*) Effect_Effect343_Draw, 1, (ObjectFunc) Effect_Effect343_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_344 */ {(void*) Effect_Effect344_Draw, 1, (ObjectFunc) Effect_Effect344_Update, NULL, -200.0f, -1, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_345 */ {(void*) Effect_Effect345_Draw, 1, (ObjectFunc) Effect_Effect345_Update, NULL, -200.0f, -1, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_FIRE_SMOKE_1 */ {(void*) Effect_FireSmoke_Draw, 1, (ObjectFunc) Effect_Effect339_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_FIRE_SMOKE_2 */ {(void*) Effect_FireSmoke_Draw, 1, (ObjectFunc) Effect_Effect340_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_FIRE_SMOKE_3 */ {(void*) Effect_FireSmoke_Draw, 1, (ObjectFunc) Effect_Effect341_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_SMOKE_1 */ {(void*) Effect_Effect342_Draw, 1, (ObjectFunc) Effect_Effect342_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_SMOKE_2 */ {(void*) Effect_Effect343_Draw, 1, (ObjectFunc) Effect_Effect343_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_EXPLOSION_MARK_1 */ {(void*) Effect_Effect344_Draw, 1, (ObjectFunc) Effect_Effect344_Update, NULL, -200.0f, -1, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_LASER_MARK_1 */ {(void*) Effect_Effect345_Draw, 1, (ObjectFunc) Effect_Effect345_Update, NULL, -200.0f, -1, 1, 0, 0, 0.0f, 0 }, /* OBJ_EFFECT_346 */ {(void*) Effect_Effect346_Draw, 1, (ObjectFunc) Effect_Effect346_Update, NULL, -200.0f, 1, 0, 0, 0, 0.0f, 0 }, /* OBJ_EFFECT_347 */ {(void*) Effect_Effect347_Draw, 1, (ObjectFunc) Effect_Effect347_Update, NULL, 100.0f, 1, 0, 40, 0, 0.0f, 0 }, /* OBJ_EFFECT_348 */ {(void*) Effect_Effect348_Draw, 1, (ObjectFunc) Effect_Effect348_Update, NULL, -200.0f, -1, 1, 0, 0, 0.0f, 0 }, @@ -451,7 +451,7 @@ ObjectInfo gObjectInfo[] = { /* OBJ_EFFECT_355 */ {(void*) Effect_Effect355_Draw, 1, (ObjectFunc) Effect_Effect355_Update, NULL, 100.0f, 1, 0, 20, 1, 0.0f, 0 }, /* OBJ_EFFECT_356 */ {(void*) Effect_Effect356_Draw, 1, (ObjectFunc) Effect_Effect356_Update, NULL, 100.0f, 1, 0, 20, 0, 0.0f, 0 }, /* OBJ_EFFECT_357 */ {(void*) Effect_Effect357_Draw, 1, (ObjectFunc) Effect_Effect357_Update, NULL, 100.0f, 0, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_358 */ {(void*) Katina_LaserEnergyParticlesDraw, 1, (ObjectFunc) Katina_LaserEnergyParticlesUpdate, NULL, 100.0f, 1, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_KA_ENERGY_PARTICLES */ {(void*) Katina_LaserEnergyParticlesDraw, 1, (ObjectFunc) Katina_LaserEnergyParticlesUpdate, NULL, 100.0f, 1, 1, 0, 0, 0.0f, 0 }, /* OBJ_EFFECT_359 */ {(void*) Effect_Effect359_Draw, 1, (ObjectFunc) Effect_Effect359_Update, NULL, -100.0f, 1, 2, 0, 0, 0.0f, 0 }, /* OBJ_EFFECT_360 */ {(void*) Effect_Effect360_361_362_Draw, 1, (ObjectFunc) Effect_Effect360_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, /* OBJ_EFFECT_361 */ {(void*) Effect_Effect360_361_362_Draw, 1, (ObjectFunc) Effect_Effect361_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, @@ -467,10 +467,10 @@ ObjectInfo gObjectInfo[] = { /* OBJ_EFFECT_371 */ {(void*) Meteo_Effect371_Draw, 1, (ObjectFunc) Meteo_Effect371_Update, NULL, 100.0f, 0, 1, 40, 0, 0.0f, 0 }, /* OBJ_EFFECT_372 */ {(void*) Effect_Effect372_Draw, 1, (ObjectFunc) Effect_Effect372_Update, NULL, -200.0f, 0, 1, 0, 0, 0.0f, 0 }, /* OBJ_EFFECT_TIMED_SFX */ {(void*) NULL, 1, (ObjectFunc) Effect_TimedSfx_Update, NULL, 500.0f, 0, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_374 */ {(void*) Macbeth_Effect374_Draw, 1, (ObjectFunc) Effect_Effect374_Update, NULL, 100.0f, 0, 1, 40, 0, 0.0f, 0 }, - /* OBJ_EFFECT_375 */ {(void*) Macbeth_Effect375_Draw, 1, (ObjectFunc) Effect_Effect375_Update, NULL, -200.0f, 0, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_376 */ {(void*) Macbeth_Effect376_Draw, 1, (ObjectFunc) Effect_Effect376_Update, NULL, -200.0f, 1, 0, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_377 */ {(void*) Macbeth_Effect377_Draw, 1, (ObjectFunc) Effect_Effect377_Update, NULL, 100.0f, 1, 0, 20, 0, 0.0f, 0 }, + /* OBJ_EFFECT_374 */ {(void*) Effect_Effect374_Draw, 1, (ObjectFunc) Effect_Effect374_Update, NULL, 100.0f, 0, 1, 40, 0, 0.0f, 0 }, + /* OBJ_EFFECT_375 */ {(void*) Effect_Effect375_Draw, 1, (ObjectFunc) Effect_Effect375_Update, NULL, -200.0f, 0, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_376 */ {(void*) Effect_Effect376_Draw, 1, (ObjectFunc) Effect_Effect376_Update, NULL, -200.0f, 1, 0, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_377 */ {(void*) Effect_Effect377_Draw, 1, (ObjectFunc) Effect_Effect377_Update, NULL, 100.0f, 1, 0, 20, 0, 0.0f, 0 }, /* OBJ_EFFECT_378 */ {(void*) Macbeth_Effect378_Draw, 1, (ObjectFunc) Macbeth_Effect378_Update, NULL, 100.0f, 0, 0, 20, 0, 0.0f, 0 }, /* OBJ_EFFECT_379 */ {(void*) Macbeth_Effect379_Draw, 1, (ObjectFunc) Macbeth_Effect379_Update, NULL, 100.0f, 1, 1, 0, 0, 0.0f, 0 }, /* OBJ_EFFECT_380 */ {(void*) Macbeth_Effect380_Draw, 1, (ObjectFunc) Macbeth_Effect380_Update, NULL, 100.0f, 0, 0, 20, 0, 0.0f, 0 }, diff --git a/src/engine/fox_edisplay.c b/src/engine/fox_edisplay.c index d53269c3..6c2f8c03 100644 --- a/src/engine/fox_edisplay.c +++ b/src/engine/fox_edisplay.c @@ -59,13 +59,13 @@ void Sprite168_Draw(Sprite168* this) { void Object_dummy_800598DC(s32 arg0) { } -void Actor201_Draw(Actor201* this) { +void MeteoBall_Draw(MeteoBall* this) { RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gSPDisplayList(gMasterDisp++, D_MA_6025B50); RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } -void Actor202_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* index) { +void ActorHopBot_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* index) { Vec3f sp24; Vec3f sp18; @@ -88,17 +88,17 @@ f32 D_edisplay_800CFA2C[] = { 1.0f, 1.0f, 0.95f, 0.9f, 0.85f, 0.8f, 0.75f, 0.7f, 0.65f, 0.6f, }; -void Actor202_Draw(Actor202* this) { +void ActorHopBot_Draw(ActorHopBot* this) { Vec3f sp30[30]; f32 temp = D_edisplay_800CF9B0[this->animFrame] - 114.0f; Matrix_Translate(gGfxMatrix, 0.f, -temp, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); Animation_GetFrameData(&D_ME_601E8C4, this->animFrame, sp30); - Animation_DrawSkeleton(1, D_ME_601E9D0, sp30, NULL, Actor202_PostLimbDraw, &this->index, &gIdentityMatrix); + Animation_DrawSkeleton(1, D_ME_601E9D0, sp30, NULL, ActorHopBot_PostLimbDraw, &this->index, &gIdentityMatrix); } -void MeteoTunnel_Draw(MeteoTunnel* this) { +void MeteoTunnel_Draw(MeTunnel* this) { gSPDisplayList(gMasterDisp++, D_ME_601AE40); } @@ -118,7 +118,7 @@ void CoIBeam_Draw(CoIBeam* this) { gSPDisplayList(gMasterDisp++, D_CO_6023AC0); } -void Actor196_Draw(Actor196* this) { +void ActorMoleMissile_Draw(ActorMoleMissile* this) { if (this->animFrame != 0) { gSPDisplayList(gMasterDisp++, D_CO_6032BC0); } @@ -231,7 +231,7 @@ Gfx* D_edisplay_800CFC0C[] = { D_AQ_60294A0, D_AQ_60291B0, D_AQ_60287F0, D_AQ_6029330, D_AQ_6029240, D_AQ_6029790, D_AQ_6029900, D_AQ_6028F50, D_AQ_60290C0, D_AQ_6029530, D_AQ_60296A0, D_AQ_6028A80, D_AQ_6028910, }; -Gfx* D_edisplay_800CFC40[] = { D_AQ_6014FD0, D_AQ_6014FD0, D_AQ_6014FD0, D_AQ_6014FD0 }; +Gfx* D_edisplay_800CFC40[] = { aAqBoulderDL, aAqBoulderDL, aAqBoulderDL, aAqBoulderDL }; Gfx* D_edisplay_800CFC50[] = { D_AQ_601EDE0, D_AQ_601F2F0, D_AQ_601F830, D_AQ_601FD70, D_AQ_601D110 }; Gfx* D_edisplay_800CFC64[] = { D_AQ_6023940, D_AQ_6023D70, D_AQ_60249C0, D_AQ_6023EB0, D_AQ_60249C0, D_AQ_6023B80 }; Gfx* D_edisplay_800CFC7C[] = { D_ZO_601B570, D_ZO_601B710, D_ZO_60209B0, D_ZO_6020B70, D_ZO_6020D50, @@ -448,7 +448,7 @@ void Actor_DrawEngineAndContrails(Actor* actor) { Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].camPitch, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - Play_DrawEngineGlow(gLevelType); + Display_DrawEngineGlow(gLevelType); Matrix_Pop(&gGfxMatrix); } sp5C = actor->fwork[21]; @@ -502,16 +502,17 @@ void Actor_DrawEngineGlow(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); - Play_DrawEngineGlow(levelType); + Display_DrawEngineGlow(levelType); Matrix_Pop(&gGfxMatrix); } } -void func_edisplay_8005B388(Actor* actor) { +void func_edisplay_8005B388(Actor199* actor) { Vec3f sp3C = { 0.0f, 0.0f, 0.0f }; Vec3f sp30; Matrix_MultVec3f(gGfxMatrix, &sp3C, &sp30); + if ((((fabsf(sp30.z) < 3000.0f) && (fabsf(sp30.x) < 3000.0f) && !gBossActive) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) || (gCurrentLevel == LEVEL_VENOM_ANDROSS) || (gCurrentLevel == LEVEL_VENOM_2) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) && @@ -545,7 +546,7 @@ void func_edisplay_8005B388(Actor* actor) { D_edisplay_80161630.unk_04 = D_edisplay_80161630.unk_08 = D_edisplay_80161630.unk_0C = D_edisplay_80161630.unk_10 = 0.0f; } - func_display_80053658(&D_edisplay_80161630); + Display_ArwingWings(&D_edisplay_80161630); } else if (gLevelType == LEVELTYPE_PLANET) { gSPDisplayList(gMasterDisp++, D_ENMY_PLANET_40018A0); } else if (gPlayer[0].wingPosition == 2) { @@ -556,25 +557,25 @@ void func_edisplay_8005B388(Actor* actor) { Actor_DrawEngineAndContrails(actor); } -void Actor180_Draw(Actor* actor) { +void MeMolarRock_Draw(Actor* actor) { Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ME_6024B60); } -void Actor182_Draw(Actor* actor) { +void MeMeteor2_Draw(Actor* actor) { RCP_SetupDL_29(actor->unk_046, gFogGreen, gFogBlue, gFogAlpha, actor->unk_048, gFogFar); Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_ME_6018C00); + gSPDisplayList(gMasterDisp++, aMeMeteor1DL); } -void Actor186_Draw(Actor* actor) { +void MeLaserCannon1_Draw(Actor* actor) { RCP_SetupDL_29(actor->unk_046, gFogGreen, gFogBlue, gFogAlpha, actor->unk_048, gFogFar); gSPDisplayList(gMasterDisp++, D_ME_6022920); } -void Actor190_191_Draw(Actor* actor) { +void ActorMissileSeek_Draw(Actor* actor) { f32 scale; switch (actor->eventType) { @@ -599,13 +600,13 @@ void Actor190_191_Draw(Actor* actor) { Actor_DrawEngineGlow(actor, 2); } -void Actor192_Draw(Actor* actor) { +void ActorSkibot_Draw(Actor* actor) { Matrix_Translate(gGfxMatrix, 0.0f, -124.0f, 0.0f, MTXF_APPLY); Animation_GetFrameData(&D_CO_6029528, actor->animFrame, actor->vwork); Animation_DrawSkeleton(1, D_CO_6029674, actor->vwork, NULL, NULL, actor, &gIdentityMatrix); } -void Actor193_Draw(Actor* actor) { +void ActorRadar_Draw(Actor* actor) { if (actor->timer_0BC != 0) { RCP_SetupDL_27(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); @@ -670,7 +671,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { case OBJ_BOSS_CO_GRANGA: gSPDisplayList(gMasterDisp++, D_CO_6034B90); break; - case OBJ_BOSS_KA: + case OBJ_BOSS_KA_SAUCERER: if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) { RCP_SetupDL(&gMasterDisp, SETUPDL_64); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 200); @@ -680,9 +681,9 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { gSPDisplayList(gMasterDisp++, D_102A8A0); break; case OBJ_BOSS_CO_CARRIER: - case OBJ_BOSS_294: - case OBJ_BOSS_295: - case OBJ_BOSS_296: + case OBJ_BOSS_CO_CARRIER_LEFT: + case OBJ_BOSS_CO_CARRIER_UPPER: + case OBJ_BOSS_CO_CARRIER_BOTTOM: COS_DEG(gBosses[index].obj.rot.z); if (gGroundSurface == SURFACE_WATER) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 90); @@ -693,22 +694,22 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { case OBJ_BOSS_CO_CARRIER: gSPDisplayList(gMasterDisp++, D_CO_6036840); break; - case OBJ_BOSS_294: + case OBJ_BOSS_CO_CARRIER_LEFT: gSPDisplayList(gMasterDisp++, D_CO_6036CD0); break; - case OBJ_BOSS_295: - case OBJ_BOSS_296: + case OBJ_BOSS_CO_CARRIER_UPPER: + case OBJ_BOSS_CO_CARRIER_BOTTOM: gSPDisplayList(gMasterDisp++, D_CO_60363B0); break; } break; - case OBJ_ACTOR_192: + case OBJ_ACTOR_CO_SKIBOT: gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 150); Matrix_Scale(gGfxMatrix, 0.4f, 0.4f, gActors[index].scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_6034B90); break; - case OBJ_ACTOR_230: + case OBJ_ACTOR_TI_BOULDER: RCP_SetupDL_48(); RCP_SetupDL(&gMasterDisp, SETUPDL_69); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); @@ -721,7 +722,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); break; - case OBJ_ACTOR_229: + case OBJ_ACTOR_TI_DESERT_CRAWLER: RCP_SetupDL(&gMasterDisp, SETUPDL_68); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255); @@ -735,7 +736,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); break; - case OBJ_ACTOR_231: + case OBJ_ACTOR_TI_BOMB: RCP_SetupDL(&gMasterDisp, SETUPDL_69); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 0); @@ -747,7 +748,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); break; - case OBJ_ACTOR_215: + case OBJ_ACTOR_MA_BOULDER: RCP_SetupDL_48(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 255); @@ -755,8 +756,8 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); break; - case OBJ_BOSS_VE1: - Venom1_80198310(&gBosses[index]); + case OBJ_BOSS_VE1_GOLEMECH: + Venom1_Ve1Golemech_SetShadow(&gBosses[index]); break; } } @@ -947,7 +948,7 @@ void Scenery_Draw(Scenery* this, s32 arg1) { this->obj.pos.y -= gCameraShakeY; if (this->info.drawType == 0) { if ((this->obj.id == OBJ_SCENERY_CO_TOWER) || (this->obj.id == OBJ_SCENERY_CO_ROCKWALL) || - (this->obj.id == OBJ_SCENERY_CO_HIGHWAY_4) || (this->obj.id == OBJ_SCENERY_50)) { + (this->obj.id == OBJ_SCENERY_CO_HIGHWAY_4) || (this->obj.id == OBJ_SCENERY_VE1_WALL_3)) { RCP_SetupDL_57(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); if (arg1 < 0) { @@ -995,15 +996,15 @@ void Actor_DrawOnRails(Actor* this) { if (this->info.draw != NULL) { switch (this->obj.id) { - case OBJ_ACTOR_194: - Actor194_Draw(this); + case OBJ_ACTOR_ME_MORA: + MeMora_Draw(this); return; - case OBJ_ACTOR_236: - Zoness_Actor236_Draw(this); + case OBJ_ACTOR_ZO_DODORA: + Zoness_ZoDodora_Draw(this); return; } if ((this->obj.id == OBJ_ACTOR_EVENT) && (this->eventType == EVID_200)) { - Actor194_Draw(this); + MeMora_Draw(this); } else { if (this->info.unk_19 != 0) { this->obj.pos.y += gCameraShakeY; @@ -1115,7 +1116,7 @@ void Actor_DrawAllRange(Actor* this) { } if (!sDrewActor) { this->lockOnTimers[gPlayerNum] = 0; - if ((this->obj.id == OBJ_ACTOR_DEBRIS) || (this->obj.id == OBJ_ACTOR_286)) { + if ((this->obj.id == OBJ_ACTOR_DEBRIS) || (this->obj.id == OBJ_ACTOR_AND_BRAIN_WASTE)) { Object_Kill(&this->obj, this->sfxSource); } } @@ -1149,7 +1150,7 @@ void Boss_Draw(Boss* this, s32 arg1) { } Matrix_MultVec3f(&D_edisplay_801615F0, &origin, &D_edisplay_801615D0); Object_SetSfxSourceToView(this->sfxSource, &D_edisplay_801615D0); - if ((this->obj.id == OBJ_BOSS_KA) || (this->obj.id == OBJ_BOSS_KA_BASE)) { + if ((this->obj.id == OBJ_BOSS_KA_SAUCERER) || (this->obj.id == OBJ_BOSS_KA_FLBASE)) { var_fa1 = 6000.0f; var_fv0 = 6000.0f; var_ft5 = 0.9f; @@ -1170,8 +1171,8 @@ void Boss_Draw(Boss* this, s32 arg1) { if (fabsf(D_edisplay_801615D0.x) < (fabsf(D_edisplay_801615D0.z * var_ft5) + var_fa1)) { if (fabsf(D_edisplay_801615D0.y) < (fabsf(D_edisplay_801615D0.z * var_ft5) + var_fa1)) { sp3C = 1.0f; - if (this->obj.id != OBJ_BOSS_309) { - if (this->obj.id != OBJ_BOSS_KA) { + if (this->obj.id != OBJ_BOSS_BO_BASE) { + if (this->obj.id != OBJ_BOSS_KA_SAUCERER) { Display_SetSecondLight(&this->obj.pos); } if (this->info.drawType != 2) { @@ -1186,7 +1187,7 @@ void Boss_Draw(Boss* this, s32 arg1) { } } D_edisplay_801615D0.y = sp3C; - if (this->obj.id == OBJ_BOSS_309) { + if (this->obj.id == OBJ_BOSS_BO_BASE) { this->vwork[30] = D_edisplay_801615D0; Display_SetSecondLight(&this->obj.pos); Matrix_SetGfxMtx(&gMasterDisp); @@ -1321,16 +1322,16 @@ void Object_DrawShadow(s32 index, Object* obj) { ActorAllRange_DrawShadow(&gActors[index]); } else { switch (obj->id) { - case OBJ_ACTOR_230: + case OBJ_ACTOR_TI_BOULDER: Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundHeight + 2.0f + gActors[index].fwork[1], obj->pos.z + gPathProgress, MTXF_APPLY); break; - case OBJ_ACTOR_229: - case OBJ_ACTOR_231: + case OBJ_ACTOR_TI_DESERT_CRAWLER: + case OBJ_ACTOR_TI_BOMB: Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundHeight + 2.0f + gActors[index].fwork[0], obj->pos.z + gPathProgress, MTXF_APPLY); break; - case OBJ_BOSS_KA: + case OBJ_BOSS_KA_SAUCERER: Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundHeight + 2.0f + gCameraShakeY, obj->pos.z, MTXF_APPLY); break; default: @@ -1342,8 +1343,8 @@ void Object_DrawShadow(s32 index, Object* obj) { Matrix_Scale(gGfxMatrix, 1.0f, 0.0f, 1.0f, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, obj->rot.y * M_DTOR, MTXF_APPLY); } - if ((obj->id < OBJ_ACTOR_MAX) && (obj->id != OBJ_ACTOR_230) && (obj->id != OBJ_ACTOR_229) && - (obj->id != OBJ_ACTOR_231)) { + if ((obj->id < OBJ_ACTOR_MAX) && (obj->id != OBJ_ACTOR_TI_BOULDER) && + (obj->id != OBJ_ACTOR_TI_DESERT_CRAWLER) && (obj->id != OBJ_ACTOR_TI_BOMB)) { Matrix_RotateX(gGfxMatrix, obj->rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, obj->rot.z * M_DTOR, MTXF_APPLY); } @@ -1428,14 +1429,14 @@ void Scenery360_Draw(Scenery360* this) { f32 sp3C = 2000.0f; f32 sp38 = 0.5f; - if (this->obj.id == OBJ_SCENERY_156) { + if (this->obj.id == OBJ_SCENERY_UNK_156) { sp44 = 4000.0f; sp40 = -13000.0f; sp3C = 4500.0f; } else if (gCurrentLevel == LEVEL_VENOM_ANDROSS) { sp40 = -20000.0f; sp38 = 0.4f; - } else if (this->obj.id == OBJ_SCENERY_143) { + } else if (this->obj.id == OBJ_SCENERY_VS_KA_FLBASE) { sp44 = 6000.0f; sp40 = -20000.0f; sp3C = 6000.0f; @@ -1451,7 +1452,7 @@ void Scenery360_Draw(Scenery360* this) { if (fabsf(sp48.y) < (fabsf(sp48.z * sp38) + sp3C)) { if (fabsf(sp48.x) < (fabsf(sp48.z * sp38) + sp3C)) { Display_SetSecondLight(&this->obj.pos); - if (this->obj.id == OBJ_SCENERY_131) { + if (this->obj.id == OBJ_SCENERY_AND_PASSAGE) { Matrix_RotateY(gGfxMatrix, this->obj.rot.y * M_DTOR, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); @@ -1583,7 +1584,7 @@ void Object_DrawAll(s32 arg0) { } } for (i = 0, boss = gBosses; i < ARRAY_COUNT(gBosses); i++, boss++) { - if ((boss->obj.status >= OBJ_ACTIVE) && (boss->obj.id != OBJ_BOSS_310)) { + if ((boss->obj.status >= OBJ_ACTIVE) && (boss->obj.id != OBJ_BOSS_BO_BASE_SHIELD)) { if ((boss->timer_05C % 2) == 0) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } else { @@ -1708,7 +1709,7 @@ void Effect_DrawAll(s32 arg0) { } } for (i = 0, boss = gBosses; i < ARRAY_COUNT(gBosses); i++, boss++) { - if ((boss->obj.status >= OBJ_ACTIVE) && (boss->obj.id == OBJ_BOSS_310)) { + if ((boss->obj.status >= OBJ_ACTIVE) && (boss->obj.id == OBJ_BOSS_BO_BASE_SHIELD)) { if ((boss->timer_05C % 2) == 0) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } else { diff --git a/src/engine/fox_effect.c b/src/engine/fox_effect.c index b3e5d6b3..80db07cb 100644 --- a/src/engine/fox_effect.c +++ b/src/engine/fox_effect.c @@ -145,7 +145,7 @@ void BonusText_DrawAll(void) { } } -Effect* func_effect_8007783C(ObjectId objId) { +Effect* Effect_Load(ObjectId objId) { Effect* effect; s32 i; @@ -164,11 +164,11 @@ Effect* func_effect_8007783C(ObjectId objId) { return effect; } -void func_effect_800778C4(EffectFireSmoke* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, - f32 scale2) { +void Effect_FireSmoke_Setup2(EffectFireSmoke* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, + f32 scale2) { Effect_Initialize(this); this->obj.status = OBJ_INIT; - this->obj.id = OBJ_EFFECT_FIRE_SMOKE; + this->obj.id = OBJ_EFFECT_FIRE_SMOKE_1; this->obj.pos.x = xPos; this->obj.pos.y = yPos; @@ -182,16 +182,18 @@ void func_effect_800778C4(EffectFireSmoke* this, f32 xPos, f32 yPos, f32 zPos, f this->unk_4C = 0; this->scale1 = 0.5f; this->obj.rot.z = RAND_FLOAT(360.0f); + Object_SetInfo(&this->info, this->obj.id); + this->unk_44 = 255; } -void func_effect_8007797C(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2) { +void Effect_FireSmoke_Spawn2(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2) { s32 i; for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { - func_effect_800778C4(&gEffects[i], xPos, yPos, zPos, xVel, yVel, zVel, scale2); + Effect_FireSmoke_Setup2(&gEffects[i], xPos, yPos, zPos, xVel, yVel, zVel, scale2); break; } } @@ -373,7 +375,7 @@ void Effect_Effect351_Draw(Effect351* this) { gSPDisplayList(gMasterDisp++, D_102A8A0); } -void Effect_Clouds_Draw(Clouds* this) { +void Effect_Clouds_Draw(EffectClouds* this) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_46); Graphics_SetScaleMtx(this->scale2); Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); @@ -453,6 +455,7 @@ void Effect_Effect348_Draw(Effect348* this) { } void func_effect_80078AE0(Effect* this) { + /* Unimplemented */ } void Effect_Effect355_Draw(Effect355* this) { @@ -467,16 +470,17 @@ void Effect_Effect353_Draw(Effect353* this) { RCP_SetupDL(&gMasterDisp, SETUPDL_64); } -void Macbeth_Effect377_Draw(Effect377* this) { - f32 var_fv0; +void Effect_Effect377_Draw(Effect377* this) { + f32 scale; gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 160); - var_fv0 = 3.0f; + scale = 3.0f; if ((gGameFrameCount % 2) != 0) { - var_fv0 *= 1.2f; + scale *= 1.2f; } - Graphics_SetScaleMtx(this->scale2 * var_fv0); + + Graphics_SetScaleMtx(this->scale2 * scale); gSPDisplayList(gMasterDisp++, D_SX_600F8A0); } @@ -486,13 +490,13 @@ void Effect_Effect356_Draw(Effect356* this) { gSPDisplayList(gMasterDisp++, D_ME_6000A80); } -void Macbeth_Effect376_Draw(Effect376* this) { +void Effect_Effect376_Draw(Effect376* this) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_4A); Graphics_SetScaleMtx(this->scale2); gSPDisplayList(gMasterDisp++, D_CO_6033000); } -void func_effect_80078D60(Effect393* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { +void Effect_Effect393_Setup(Effect393* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { Effect_Initialize(this); this->obj.status = OBJ_INIT; this->obj.id = OBJ_EFFECT_393; @@ -517,12 +521,12 @@ void func_effect_80078D60(Effect393* this, f32 xPos, f32 yPos, f32 zPos, f32 sca Object_SetInfo(&this->info, this->obj.id); } -void func_effect_80078E50(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { +void Effect_Effect393_Spawn(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_effect_80078D60(&gEffects[i], xPos, yPos, zPos, scale2); + Effect_Effect393_Setup(&gEffects[i], xPos, yPos, zPos, scale2); break; } } @@ -553,6 +557,7 @@ void Effect_Effect393_Draw(Effect393* this) { } else { RCP_SetupDL(&gMasterDisp, SETUPDL_63); } + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 255, 255, 0, 255); Graphics_SetScaleMtx(this->scale2 * this->scale1); @@ -560,7 +565,7 @@ void Effect_Effect393_Draw(Effect393* this) { RCP_SetupDL(&gMasterDisp, SETUPDL_64); } -void func_effect_8007905C(Effect357* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2, u8 arg5) { +void Effect_Effect357_Setup(Effect357* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2, u8 arg5) { Vec3f sp54; Vec3f sp48; Vec3f sp3C; @@ -618,35 +623,35 @@ void func_effect_8007905C(Effect357* this, f32 xPos, f32 yPos, f32 zPos, f32 sca Object_SetInfo(&this->info, this->obj.id); } -void func_effect_800794CC(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { +void Effect_Effect357_Spawn50(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { s32 i; for (i = 50; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { - func_effect_8007905C(&gEffects[i], xPos, yPos, zPos, scale2, 0); + Effect_Effect357_Setup(&gEffects[i], xPos, yPos, zPos, scale2, 0); break; } } } // Broken pieces and debris effect -void func_effect_8007953C(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { +void Effect_Effect357_Spawn80(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { s32 i; for (i = (ARRAY_COUNT(gEffects) - 20) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { - func_effect_8007905C(&gEffects[i], xPos, yPos, zPos, scale2, 0); + Effect_Effect357_Setup(&gEffects[i], xPos, yPos, zPos, scale2, 0); break; } } } -void func_effect_800795AC(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { +void Effect_Effect357_Spawn95(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { s32 i; for (i = 0; i < 95; i++) { if (gEffects[i].obj.status == OBJ_FREE) { - func_effect_8007905C(&gEffects[i], xPos, yPos, zPos, scale2, 0); + Effect_Effect357_Setup(&gEffects[i], xPos, yPos, zPos, scale2, 0); break; } } @@ -657,7 +662,7 @@ void func_effect_80079618(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { for (i = 50; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { - func_effect_8007905C(&gEffects[i], xPos, yPos, zPos, scale2, 1); + Effect_Effect357_Setup(&gEffects[i], xPos, yPos, zPos, scale2, 1); break; } } @@ -804,7 +809,7 @@ void Effect_Effect357_Draw(Effect357* this) { case 16: gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - gSPDisplayList(gMasterDisp++, D_SY_600F6C0); + gSPDisplayList(gMasterDisp++, aSyShip4DestroyedDL); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); break; @@ -914,7 +919,7 @@ void Effect_Effect383_Draw(Effect383* this) { } } -void func_effect_8007A4B8(Effect383* this, f32 xPos, f32 yPos, f32 zPos, f32 scale1) { +void Effect_Effect383_Setup(Effect383* this, f32 xPos, f32 yPos, f32 zPos, f32 scale1) { Effect_Initialize(this); this->obj.status = OBJ_INIT; this->obj.id = OBJ_EFFECT_383; @@ -930,16 +935,16 @@ void func_effect_8007A4B8(Effect383* this, f32 xPos, f32 yPos, f32 zPos, f32 sca Object_SetInfo(&this->info, this->obj.id); } -void func_effect_8007A568(f32 xPos, f32 yPos, f32 zPos, f32 scale1) { +void Effect_Effect383_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 scale1) { s32 i; for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { - func_effect_8007A4B8(&gEffects[i], xPos, yPos, zPos, scale1); + Effect_Effect383_Setup(&gEffects[i], xPos, yPos, zPos, scale1); break; } } - func_effect_8007B344(xPos, yPos, zPos, 80.0f, 4); + Effect_Effect384_Spawn(xPos, yPos, zPos, 80.0f, 4); } void Effect_SetupTimedSfxAtPos(TimedSfx* this, Vec3f* pos, u32 sfxId) { @@ -961,6 +966,7 @@ void Effect_SetupTimedSfxAtPos(TimedSfx* this, Vec3f* pos, u32 sfxId) { } else { AUDIO_PLAY_SFX(sfxId, this->sfxSource, 4); } + Object_SetInfo(&this->info, this->obj.id); } @@ -991,7 +997,7 @@ bool func_effect_8007A774(Player* player, Effect* this, f32 arg2) { } } -void func_effect_8007A818(Effect359* this, f32 xPos, f32 yPos, f32 zPos, f32 scale1, u8 arg5, u8 arg6, u16 arg7) { +void Effect_Effect359_Setup(Effect359* this, f32 xPos, f32 yPos, f32 zPos, f32 scale1, u8 arg5, u8 arg6, u16 arg7) { Effect_Initialize(this); this->obj.status = OBJ_INIT; this->obj.id = OBJ_EFFECT_359; @@ -1011,13 +1017,13 @@ void func_effect_8007A818(Effect359* this, f32 xPos, f32 yPos, f32 zPos, f32 sca Object_SetInfo(&this->info, this->obj.id); } -void func_effect_8007A900(f32 xPos, f32 yPos, f32 zPos, f32 scale1, u8 arg4, u8 arg5, u16 arg6) { +void Effect_Effect359_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 scale1, u8 arg4, u8 arg5, u16 arg6) { s32 i; if (gCurrentLevel == LEVEL_TITANIA) { for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { - func_effect_8007A818(&gEffects[i], xPos, yPos, zPos, scale1, arg4, arg5, arg6); + Effect_Effect359_Setup(&gEffects[i], xPos, yPos, zPos, scale1, arg4, arg5, arg6); break; } } @@ -1072,7 +1078,7 @@ void Effect_Effect372_Update(Effect372* this) { } } -void func_effect_8007AC0C(Effect372* this, f32 xPos, f32 unused_posY, f32 zPos, f32 scale2, f32 scale1, f32 yRot) { +void Effect_Effect372_Setup1(Effect372* this, f32 xPos, f32 unused_posY, f32 zPos, f32 scale2, f32 scale1, f32 yRot) { Effect_Initialize(this); this->obj.status = OBJ_INIT; this->obj.id = OBJ_EFFECT_372; @@ -1090,18 +1096,18 @@ void func_effect_8007AC0C(Effect372* this, f32 xPos, f32 unused_posY, f32 zPos, Object_SetInfo(&this->info, this->obj.id); } -void func_effect_8007ACE0(f32 xPos, f32 yPos, f32 zPos, f32 scale2, f32 scale1, f32 yRot) { +void Effect_Effect372_Spawn1(f32 xPos, f32 yPos, f32 zPos, f32 scale2, f32 scale1, f32 yRot) { s32 i; for (i = 0; i < ARRAY_COUNT(gEffects); i++) { if (gEffects[i].obj.status == OBJ_FREE) { - func_effect_8007AC0C(&gEffects[i], xPos, yPos, zPos, scale2, scale1, yRot); + Effect_Effect372_Setup1(&gEffects[i], xPos, yPos, zPos, scale2, scale1, yRot); break; } } } -void func_effect_8007AD58(Effect372* this, f32 xPos, f32 unused_posY, f32 zPos, f32 scale2, f32 scale1, f32 yRot) { +void Effect_Effect372_Setup2(Effect372* this, f32 xPos, f32 unused_posY, f32 zPos, f32 scale2, f32 scale1, f32 yRot) { Effect_Initialize(this); this->obj.status = OBJ_INIT; this->obj.id = OBJ_EFFECT_372; @@ -1118,7 +1124,7 @@ void func_effect_8007AD58(Effect372* this, f32 xPos, f32 unused_posY, f32 zPos, Object_SetInfo(&this->info, this->obj.id); } -void func_effect_8007ADF4(f32 xPos, f32 yPos, f32 zPos, f32 scale2, f32 scale1) { +void Effect_Effect372_Spawn2(f32 xPos, f32 yPos, f32 zPos, f32 scale2, f32 scale1) { f32 cosf; f32 sinf; f32 yRot; @@ -1130,14 +1136,14 @@ void func_effect_8007ADF4(f32 xPos, f32 yPos, f32 zPos, f32 scale2, f32 scale1) if (gEffects[j].obj.status == OBJ_FREE) { sinf = SIN_DEG(yRot) * scale1 * 20.0f; cosf = COS_DEG(yRot) * scale1 * 20.0f; - func_effect_8007AD58(&gEffects[j], xPos + sinf, yPos, zPos + cosf, scale2, scale1, yRot); + Effect_Effect372_Setup2(&gEffects[j], xPos + sinf, yPos, zPos + cosf, scale2, scale1, yRot); break; } } } } -void func_effect_8007AF30(Effect382* this, f32 xPos, f32 zPos, f32 xVel, f32 zVel, f32 scale1) { +void Effect_Effect382_Setup(Effect382* this, f32 xPos, f32 zPos, f32 xVel, f32 zVel, f32 scale1) { Effect_Initialize(this); this->obj.status = OBJ_INIT; this->obj.id = OBJ_EFFECT_382; @@ -1153,12 +1159,12 @@ void func_effect_8007AF30(Effect382* this, f32 xPos, f32 zPos, f32 xVel, f32 zVe Object_SetInfo(&this->info, this->obj.id); } -void func_effect_8007AFD0(f32 xPos, f32 zPos, f32 xVel, f32 zVel, f32 scale1) { +void Effect_Effect382_Spawn(f32 xPos, f32 zPos, f32 xVel, f32 zVel, f32 scale1) { s32 i; for (i = 0; i < ARRAY_COUNT(gEffects); i++) { if (gEffects[i].obj.status == OBJ_FREE) { - func_effect_8007AF30(&gEffects[i], xPos, zPos, xVel, zVel, scale1); + Effect_Effect382_Setup(&gEffects[i], xPos, zPos, xVel, zVel, scale1); break; } } @@ -1187,7 +1193,7 @@ void Effect_Effect381_Update(Effect381* this) { } } -void func_effect_8007B180(Effect381* this, f32 xPos, f32 yPos, f32 zPos, f32 scale1) { +void Effect_Effect381_Setup(Effect381* this, f32 xPos, f32 yPos, f32 zPos, f32 scale1) { Effect_Initialize(this); this->obj.status = OBJ_INIT; this->obj.id = OBJ_EFFECT_381; @@ -1202,18 +1208,18 @@ void func_effect_8007B180(Effect381* this, f32 xPos, f32 yPos, f32 zPos, f32 sca AUDIO_PLAY_SFX(NA_SE_SPLASH_LEVEL_L, this->sfxSource, 0); } -void func_effect_8007B228(f32 xPos, f32 yPos, f32 zPos, f32 scale1) { +void Effect_Effect381_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 scale1) { s32 i; for (i = 0; i < ARRAY_COUNT(gEffects) && gCurrentLevel == LEVEL_ZONESS; i++) { if (gEffects[i].obj.status == OBJ_FREE) { - func_effect_8007B180(&gEffects[i], xPos, yPos, zPos, scale1); + Effect_Effect381_Setup(&gEffects[i], xPos, yPos, zPos, scale1); break; } } } -void func_effect_8007B2BC(Effect384* this, f32 xPos, f32 yPos, f32 zPos, f32 scale1, s32 arg5) { +void Effect_Effect384_Setup(Effect384* this, f32 xPos, f32 yPos, f32 zPos, f32 scale1, s32 arg5) { Effect_Initialize(this); this->obj.status = OBJ_INIT; this->obj.id = OBJ_EFFECT_384; @@ -1225,16 +1231,17 @@ void func_effect_8007B2BC(Effect384* this, f32 xPos, f32 yPos, f32 zPos, f32 sca this->scale1 = scale1; this->unk_44 = 255; this->unk_4C = arg5; + Object_SetInfo(&this->info, this->obj.id); } -// Orange-yellowish light this simulating an explosion -void func_effect_8007B344(f32 xPos, f32 yPos, f32 zPos, f32 scale1, s32 arg4) { +// Orange-yellowish light simulating an explosion +void Effect_Effect384_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 scale1, s32 arg4) { s32 i; for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { - func_effect_8007B2BC(&gEffects[i], xPos, yPos, zPos, scale1, arg4); + Effect_Effect384_Setup(&gEffects[i], xPos, yPos, zPos, scale1, arg4); break; } } @@ -1267,7 +1274,7 @@ void Effect_Effect384_Update(Effect384* this) { } } -void func_effect_8007B494(Effect385* this, f32 xPos, f32 yPos, f32 zPos, f32 scale1, s32 arg5) { +void Effect_Effect385_Setup(Effect385* this, f32 xPos, f32 yPos, f32 zPos, f32 scale1, s32 arg5) { Effect_Initialize(this); this->obj.status = OBJ_INIT; this->obj.id = OBJ_EFFECT_385; @@ -1287,15 +1294,16 @@ void func_effect_8007B494(Effect385* this, f32 xPos, f32 yPos, f32 zPos, f32 sca } else { this->unk_46 = 3; } + Object_SetInfo(&this->info, this->obj.id); } -void func_effect_8007B550(f32 xPos, f32 yPos, f32 zPos, f32 scale1, s32 arg4) { +void Effect_Effect385_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 scale1, s32 arg4) { s32 i; for (i = 0; i < ARRAY_COUNT(gEffects); i++) { if (gEffects[i].obj.status == OBJ_FREE) { - func_effect_8007B494(&gEffects[i], xPos, yPos, zPos, scale1, arg4); + Effect_Effect385_Setup(&gEffects[i], xPos, yPos, zPos, scale1, arg4); break; } } @@ -1309,7 +1317,7 @@ void Effect_Effect385_Update(Effect385* this) { } } -void Effect_Clouds_Update(Clouds* this) { +void Effect_Clouds_Update(EffectClouds* this) { if (this->timer_50 == 0) { this->unk_46 -= 4; if (this->unk_46 <= 0) { @@ -1357,7 +1365,7 @@ void Effect_Effect347_Update(Effect347* this) { func_effect_8007A774(gPlayer, this, this->scale2 * 20.0f); } -void func_effect_8007B7E8(Effect364* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { +void Effect_Effect364_Setup(Effect364* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { Effect_Initialize(this); this->obj.status = OBJ_INIT; this->obj.id = OBJ_EFFECT_364; @@ -1380,12 +1388,12 @@ void func_effect_8007B7E8(Effect364* this, f32 xPos, f32 yPos, f32 zPos, f32 sca Object_SetInfo(&this->info, this->obj.id); } -void func_effect_8007B8F8(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { +void Effect_Effect364_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { s32 i, j; for (i = ARRAY_COUNT(gEffects) - 1, j = 0; j < ARRAY_COUNT(gEffects); i--, j++) { if (gEffects[i].obj.status == OBJ_FREE) { - func_effect_8007B7E8(&gEffects[i], xPos, yPos, zPos, scale2); + Effect_Effect364_Setup(&gEffects[i], xPos, yPos, zPos, scale2); break; } } @@ -1393,6 +1401,7 @@ void func_effect_8007B8F8(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { void Effect_Effect364_Update(Effect364* this) { this->scale2 += 0.07f; + this->unk_4A -= this->unk_46; if (this->unk_4A < 0) { Object_Kill(&this->obj, this->sfxSource); @@ -1425,7 +1434,7 @@ void Effect_Effect364_Draw(Effect364* this) { } } -void func_effect_8007BB14(Effect362* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { +void Effect_Effect362_Setup(Effect362* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { Effect_Initialize(this); this->obj.status = OBJ_INIT; this->obj.id = OBJ_EFFECT_362; @@ -1459,12 +1468,12 @@ void func_effect_8007BB14(Effect362* this, f32 xPos, f32 yPos, f32 zPos, f32 sca Object_SetInfo(&this->info, this->obj.id); } -void func_effect_8007BC7C(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { +void Effect_Effect362_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { s32 i; for (i = ARRAY_COUNT(gEffects) - 20; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { - func_effect_8007BB14(&gEffects[i], xPos, yPos, zPos, scale2); + Effect_Effect362_Setup(&gEffects[i], xPos, yPos, zPos, scale2); break; } } @@ -1492,6 +1501,7 @@ void Effect_Effect362_Update(Effect362* this) { void Effect_Effect361_Update(Effect361* this) { this->scale2 += 0.04f; + this->unk_4A -= 2; if (this->unk_4A < 0) { Object_Kill(&this->obj, this->sfxSource); @@ -1517,8 +1527,8 @@ void Effect_Effect360_361_362_Draw(Effect* this) { gSPDisplayList(gMasterDisp++, D_BG_PLANET_2010A30); } -void func_effect_8007BF64(Effect386* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, - s32 timer50) { +void Effect_Effect386_Setup(Effect386* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, + s32 timer50) { Effect_Initialize(this); this->obj.status = OBJ_INIT; this->obj.id = OBJ_EFFECT_386; @@ -1535,19 +1545,19 @@ void func_effect_8007BF64(Effect386* this, f32 xPos, f32 yPos, f32 zPos, f32 xVe Object_SetInfo(&this->info, this->obj.id); } -void func_effect_8007BFFC(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, s32 timer50) { +void Effect386_Spawn1(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, s32 timer50) { s32 i; for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { - func_effect_8007BF64(&gEffects[i], xPos, yPos, zPos, xVel, yVel, zVel, scale2, timer50); + Effect_Effect386_Setup(&gEffects[i], xPos, yPos, zPos, xVel, yVel, zVel, scale2, timer50); break; } } } -void func_effect_8007C088(Effect390* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, - s32 timer50) { +void Effect_Effect390_Setup(Effect390* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, + s32 timer50) { Effect_Initialize(this); this->obj.status = OBJ_INIT; this->obj.id = OBJ_EFFECT_390; @@ -1564,23 +1574,23 @@ void func_effect_8007C088(Effect390* this, f32 xPos, f32 yPos, f32 zPos, f32 xVe Object_SetInfo(&this->info, this->obj.id); } -void func_effect_8007C120(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, s32 timer50) { +void Effect_Effect390_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, s32 timer50) { s32 i; for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { - func_effect_8007C088(&gEffects[i], xPos, yPos, zPos, xVel, yVel, zVel, scale2, timer50); + Effect_Effect390_Setup(&gEffects[i], xPos, yPos, zPos, xVel, yVel, zVel, scale2, timer50); break; } } } -void func_effect_8007C1AC(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, s32 timer50) { +void Effect386_Spawn2(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, s32 timer50) { s32 i; for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { - func_effect_8007BF64(&gEffects[i], xPos, yPos, zPos, xVel, yVel, zVel, scale2, timer50); + Effect_Effect386_Setup(&gEffects[i], xPos, yPos, zPos, xVel, yVel, zVel, scale2, timer50); Play_PlaySfxNoPlayer(gEffects[i].sfxSource, NA_SE_EXPLOSION_S); break; } @@ -1591,18 +1601,18 @@ void Effect_Effect386_Update(Effect386* this) { f32 randX; f32 randY; f32 randOther; - s32 var_v0; + s32 mask; Math_SmoothStepToF(&this->vel.x, 0.0f, 0.2f, 10.0f, 0.1f); Math_SmoothStepToF(&this->vel.y, 0.0f, 0.2f, 10.0f, 0.1f); Math_SmoothStepToF(&this->vel.z, 0.0f, 0.2f, 10.0f, 0.1f); - var_v0 = 4 - 1; + mask = 4 - 1; if (gLevelMode == LEVELMODE_ALL_RANGE) { - var_v0 = 2 - 1; + mask = 2 - 1; } - if ((this->timer_50 & var_v0) == 0) { + if ((this->timer_50 & mask) == 0) { randX = RAND_FLOAT_CENTERED(40.0f); randY = RAND_FLOAT_CENTERED(40.0f); randOther = RAND_FLOAT(0.5f) + 1.0f; @@ -1614,8 +1624,8 @@ void Effect_Effect386_Update(Effect386* this) { } } -void func_effect_8007C3B4(Effect389* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, - s32 arg8) { +void Effect_Effect389_Setup(Effect389* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, + s32 arg8) { Effect_Initialize(this); this->obj.status = OBJ_INIT; this->obj.id = OBJ_EFFECT_389; @@ -1632,16 +1642,18 @@ void func_effect_8007C3B4(Effect389* this, f32 xPos, f32 yPos, f32 zPos, f32 xVe this->unk_4A = arg8; this->unk_4C = RAND_INT(12.0f); this->obj.rot.z = RAND_FLOAT(360.0f); + Object_SetInfo(&this->info, this->obj.id); + this->unk_44 = 255; } -void func_effect_8007C484(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, s32 arg7) { +void Effect_Effect389_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, s32 arg7) { s32 i; for (i = ARRAY_COUNT(gEffects) - 1; i > 32; i--) { if (gEffects[i].obj.status == OBJ_FREE) { - func_effect_8007C3B4(&gEffects[i], xPos, yPos, zPos, xVel, yVel, zVel, scale2, arg7); + Effect_Effect389_Setup(&gEffects[i], xPos, yPos, zPos, xVel, yVel, zVel, scale2, arg7); break; } } @@ -1656,15 +1668,15 @@ void Effect_Effect390_Update(Effect390* this) { randX = RAND_FLOAT_CENTERED(40.0f) * this->scale2; randY = RAND_FLOAT_CENTERED(40.0f) * this->scale2; randOther = RAND_FLOAT(1.0f) + 1.0f; - func_effect_8007C484(this->obj.pos.x + randX, this->obj.pos.y + randY, this->obj.pos.z, this->vel.x, - this->vel.y, this->vel.z, this->scale2 * randOther, 0); + Effect_Effect389_Spawn(this->obj.pos.x + randX, this->obj.pos.y + randY, this->obj.pos.z, this->vel.x, + this->vel.y, this->vel.z, this->scale2 * randOther, 0); if (this->timer_50 == 0) { Object_Kill(&this->obj, this->sfxSource); } } } -void func_effect_8007C608(Effect387* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 timer50) { +void Effect_Effect387_Setup(Effect387* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 timer50) { Effect_Initialize(this); this->obj.status = OBJ_INIT; this->obj.id = OBJ_EFFECT_387; @@ -1678,21 +1690,21 @@ void func_effect_8007C608(Effect387* this, f32 xPos, f32 yPos, f32 zPos, f32 sca Object_SetInfo(&this->info, this->obj.id); } -void func_effect_8007C688(f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 timer50) { +void Effect_Effect387_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 timer50) { s32 i; for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { - func_effect_8007C608(&gEffects[i], xPos, yPos, zPos, scale2, timer50); + Effect_Effect387_Setup(&gEffects[i], xPos, yPos, zPos, scale2, timer50); break; } } } -void func_effect_8007C6FC(Effect343* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { +void Effect_Effect343_Setup(Effect343* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { Effect_Initialize(this); this->obj.status = OBJ_INIT; - this->obj.id = OBJ_EFFECT_343; + this->obj.id = OBJ_EFFECT_SMOKE_2; this->obj.pos.x = xPos; this->obj.pos.y = yPos; @@ -1700,9 +1712,11 @@ void func_effect_8007C6FC(Effect343* this, f32 xPos, f32 yPos, f32 zPos, f32 sca this->unk_48 = 3; this->vel.y = 5.0f; + if (Rand_ZeroOne() < 0.5f) { this->unk_48 = -this->unk_48; } + if ((gCurrentLevel == LEVEL_FORTUNA) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_NEXT)) { this->unk_4A = 180; } else { @@ -1718,16 +1732,17 @@ void func_effect_8007C6FC(Effect343* this, f32 xPos, f32 yPos, f32 zPos, f32 sca this->unk_4A = 255; this->scale2 = scale2 * 0.3f; } + this->scale1 = RAND_FLOAT(0.2f); Object_SetInfo(&this->info, this->obj.id); } -void func_effect_8007C85C(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { +void Effect_Effect343_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { s32 i; for (i = 0; i < ARRAY_COUNT(gEffects) - 20; i++) { if (gEffects[i].obj.status == OBJ_FREE) { - func_effect_8007C6FC(&gEffects[i], xPos, yPos, zPos, scale2); + Effect_Effect343_Setup(&gEffects[i], xPos, yPos, zPos, scale2); break; } } @@ -1748,8 +1763,8 @@ void Effect_Effect387_Update(Effect387* this) { randX = RAND_FLOAT_CENTERED(10.0f); randY = RAND_FLOAT_CENTERED(10.0f); randOther = RAND_FLOAT(0.5f) + 1.0f; - func_effect_8007C85C(this->obj.pos.x + randX, this->obj.pos.y + randY, this->obj.pos.z, - this->scale2 * randOther); + Effect_Effect343_Spawn(this->obj.pos.x + randX, this->obj.pos.y + randY, this->obj.pos.z, + this->scale2 * randOther); if (this->timer_50 == 0) { Object_Kill(&this->obj, this->sfxSource); } @@ -1791,18 +1806,22 @@ void Effect_Effect343_Draw(Effect343* this) { } } -void func_effect_8007CC00(EffectFireSmoke* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { +void EffectFireSmoke_Setup(EffectFireSmoke* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { Effect_Initialize(this); this->obj.status = OBJ_INIT; - this->obj.id = OBJ_EFFECT_FIRE_SMOKE; + this->obj.id = OBJ_EFFECT_FIRE_SMOKE_1; + this->obj.pos.x = xPos; this->obj.pos.y = yPos; this->obj.pos.z = zPos; + this->scale2 = scale2; this->scale1 = 0.5f; this->unk_4C = 0; this->obj.rot.z = RAND_FLOAT(360.0f); + Object_SetInfo(&this->info, this->obj.id); + if (gLevelType == LEVELTYPE_PLANET) { this->unk_44 = 230; } else { @@ -1810,10 +1829,10 @@ void func_effect_8007CC00(EffectFireSmoke* this, f32 xPos, f32 yPos, f32 zPos, f } } -void func_effect_8007CCBC(Effect340* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { +void Effect_Effect340_Setup(Effect340* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { Effect_Initialize(this); this->obj.status = OBJ_INIT; - this->obj.id = OBJ_EFFECT_340; + this->obj.id = OBJ_EFFECT_FIRE_SMOKE_2; this->obj.pos.x = xPos; this->obj.pos.y = yPos; @@ -1823,7 +1842,9 @@ void func_effect_8007CCBC(Effect340* this, f32 xPos, f32 yPos, f32 zPos, f32 sca this->unk_4C = 3; this->scale1 = 0.2f; this->obj.rot.z = RAND_FLOAT(360.0f); + Object_SetInfo(&this->info, this->obj.id); + if (gLevelType == LEVELTYPE_PLANET) { this->unk_44 = 230; } else { @@ -1831,10 +1852,10 @@ void func_effect_8007CCBC(Effect340* this, f32 xPos, f32 yPos, f32 zPos, f32 sca } } -void func_effect_8007CD7C(Effect342* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 timer50) { +void Effect_Effect342_Setup(Effect342* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 timer50) { Effect_Initialize(this); this->obj.status = OBJ_INIT; - this->obj.id = OBJ_EFFECT_342; + this->obj.id = OBJ_EFFECT_SMOKE_1; this->timer_50 = timer50; this->obj.pos.x = xPos; @@ -1861,45 +1882,45 @@ void func_effect_8007CD7C(Effect342* this, f32 xPos, f32 yPos, f32 zPos, f32 sca Object_SetInfo(&this->info, this->obj.id); } -void func_effect_8007CEBC(f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 timer50) { +void Effect_Effect342_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 timer50) { s32 i; for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { - func_effect_8007CD7C(&gEffects[i], xPos, yPos, zPos, scale2, timer50); + Effect_Effect342_Setup(&gEffects[i], xPos, yPos, zPos, scale2, timer50); break; } } } -void func_effect_8007CF30(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { +void Effect_FireSmoke_Spawn(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_effect_8007CC00(&gEffects[i], xPos, yPos, zPos, scale2); + EffectFireSmoke_Setup(&gEffects[i], xPos, yPos, zPos, scale2); break; } } } -void func_effect_8007CF9C(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { +void Effect_Effect340_Spawn(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_effect_8007CCBC(&gEffects[i], xPos, yPos, zPos, scale2); + Effect_Effect340_Setup(&gEffects[i], xPos, yPos, zPos, scale2); break; } } } -void func_effect_8007D008(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { +void EffectFireSmoke_Spawn2(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_effect_8007CC00(&gEffects[i], xPos, yPos, zPos, scale2); + EffectFireSmoke_Setup(&gEffects[i], xPos, yPos, zPos, scale2); break; } } @@ -1910,24 +1931,24 @@ void func_effect_8007D074(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { - func_effect_8007CCBC(&gEffects[i], xPos, yPos, zPos, scale2); + Effect_Effect340_Setup(&gEffects[i], xPos, yPos, zPos, scale2); break; } } } void func_effect_8007D0E0(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { - func_effect_8007CF30(xPos, yPos, zPos, scale2); + Effect_FireSmoke_Spawn(xPos, yPos, zPos, scale2); } void func_effect_8007D10C(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { - func_effect_8007CF9C(xPos, yPos, zPos, scale2); + Effect_Effect340_Spawn(xPos, yPos, zPos, scale2); } -void func_effect_8007D138(Effect341* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { +void Effect_Effect341_Setup(Effect341* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { Effect_Initialize(this); this->obj.status = OBJ_INIT; - this->obj.id = OBJ_EFFECT_341; + this->obj.id = OBJ_EFFECT_FIRE_SMOKE_3; this->obj.pos.x = xPos; this->obj.pos.y = yPos; @@ -1935,19 +1956,21 @@ void func_effect_8007D138(Effect341* this, f32 xPos, f32 yPos, f32 zPos, f32 sca this->scale2 = scale2; this->obj.rot.z = RAND_FLOAT(360.0f); + Object_SetInfo(&this->info, this->obj.id); + if (gLevelType == LEVELTYPE_PLANET) { this->unk_4C = 15; } this->unk_44 = 180; } -void func_effect_8007D1E0(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { +void Effect_Effect341_Spawn(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_effect_8007D138(&gEffects[i], xPos, yPos, zPos, scale2); + Effect_Effect341_Setup(&gEffects[i], xPos, yPos, zPos, scale2); break; } } @@ -1955,15 +1978,15 @@ void func_effect_8007D1E0(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { void func_effect_8007D24C(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { if (gLevelType == LEVELTYPE_PLANET) { - func_effect_8007D1E0(xPos, yPos, zPos, scale2); - func_effect_8007CEBC(xPos, scale2 + yPos, zPos, scale2, 9); + Effect_Effect341_Spawn(xPos, yPos, zPos, scale2); + Effect_Effect342_Spawn(xPos, scale2 + yPos, zPos, scale2, 9); } else { func_effect_8007D0E0(xPos, yPos, zPos, scale2); } } void func_effect_8007D2C8(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { - func_effect_8007D008(xPos, yPos, zPos, scale2); + EffectFireSmoke_Spawn2(xPos, yPos, zPos, scale2); } void Effect_Effect339_Update(EffectFireSmoke* this) { @@ -2129,7 +2152,7 @@ void Effect_Effect341_Update(Effect341* this) { } } -void func_effect_8007D94C(Effect367* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2, f32 scale1, s32 timer50) { +void Effect_Effect367_Setup(Effect367* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2, f32 scale1, s32 timer50) { Effect_Initialize(this); this->obj.status = OBJ_INIT; this->obj.id = OBJ_EFFECT_367; @@ -2143,12 +2166,12 @@ void func_effect_8007D94C(Effect367* this, f32 xPos, f32 yPos, f32 zPos, f32 sca Object_SetInfo(&this->info, this->obj.id); } -void func_effect_8007D9DC(f32 xPos, f32 yPos, f32 zPos, f32 scale2, f32 scale1, s32 timer50) { +void Effect_Effect367_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 scale2, f32 scale1, s32 timer50) { s32 i; for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { - func_effect_8007D94C(&gEffects[i], xPos, yPos, zPos, scale2, scale1, timer50); + Effect_Effect367_Setup(&gEffects[i], xPos, yPos, zPos, scale2, scale1, timer50); break; } } @@ -2167,7 +2190,7 @@ void Effect_Effect375_Update(Effect375* this) { } } -void Macbeth_Effect375_Draw(Effect375* this) { +void Effect_Effect375_Draw(Effect375* this) { Graphics_SetScaleMtx(this->scale2); RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gSPDisplayList(gMasterDisp++, D_CO_6004900); @@ -2193,8 +2216,7 @@ void Effect_Effect374_Update(Effect374* this) { this->scale1 = 2.5f; AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, this->sfxSource, 4); func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y + 30.0f, this->obj.pos.z, 7.0f); - func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y + 30.0f, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 4.0f, - 5); + Effect386_Spawn1(this->obj.pos.x, this->obj.pos.y + 30.0f, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 4.0f, 5); if ((this->obj.pos.y < (gGroundHeight + 10.0f)) || (gGroundSurface != SURFACE_WATER)) { PlayerShot_SpawnEffect344(this->obj.pos.x, 3.0f, this->obj.pos.z, this->obj.pos.x, this->obj.pos.z, 0.0f, 0.0f, 90.0f, 5.0f, 0, 0); @@ -2212,7 +2234,9 @@ void Effect_Effect374_Update(Effect374* this) { Object_Kill(&this->obj, this->sfxSource); } } + this->obj.rot.y = 180.0f - this->obj.rot.y; + if ((fabsf(gPlayer[0].trueZpos - this->obj.pos.z) < 40.0f) && (fabsf(gPlayer[0].pos.x - this->obj.pos.x) < 80.0f)) { if ((this->obj.pos.y < gPlayer[0].pos.y) && @@ -2224,7 +2248,7 @@ void Effect_Effect374_Update(Effect374* this) { } } -void Macbeth_Effect374_Draw(Effect374* this) { +void Effect_Effect374_Draw(Effect374* this) { switch (this->state) { case 0: Graphics_SetScaleMtx(this->scale2); @@ -2263,8 +2287,8 @@ void Effect_Effect344_Update(Effect344* this) { } for (i = 0; i < ARRAY_COUNT(gEffects); i++) { - if ((gEffects[i].obj.status == OBJ_ACTIVE) && (gEffects[i].obj.id == OBJ_EFFECT_344) && (i != this->index) && - (fabsf(this->obj.pos.z - gEffects[i].obj.pos.z) < 20.0f) && + if ((gEffects[i].obj.status == OBJ_ACTIVE) && (gEffects[i].obj.id == OBJ_EFFECT_EXPLOSION_MARK_1) && + (i != this->index) && (fabsf(this->obj.pos.z - gEffects[i].obj.pos.z) < 20.0f) && (fabsf(this->obj.pos.x - gEffects[i].obj.pos.x) < 20.0f) && (fabsf(this->obj.pos.y - gEffects[i].obj.pos.y) < 20.0f)) { Object_Kill(&this->obj, this->sfxSource); @@ -2489,6 +2513,7 @@ void func_effect_8007EBB8(Effect* this, ObjectId objId, f32 xPos, f32 yPos, f32 this->vel.z = zVel; this->scale2 = scale2; + if (objId == OBJ_EFFECT_355) { AUDIO_PLAY_SFX(NA_SE_EN_ENERGY_BEAM, this->sfxSource, 4); } else { @@ -2536,6 +2561,7 @@ void func_effect_8007ED54(Effect* this, ObjectId objId, f32 xPos, f32 yPos, f32 this->unk_60.z = unkZ; this->scale2 = scale2; + if (this->obj.id != OBJ_EFFECT_380) { AUDIO_PLAY_SFX(NA_SE_EN_SHOT_0, this->sfxSource, 4); } @@ -2728,11 +2754,11 @@ void Effect_Effect348_Update(Effect348* this) { } if (gCurrentLevel == LEVEL_AQUAS) { - func_effect_8007B8F8(this->obj.pos.x + sin, yPos, this->obj.pos.z + cos, 20.0f); + Effect_Effect364_Spawn(this->obj.pos.x + sin, yPos, this->obj.pos.z + cos, 20.0f); } else if (gCurrentLevel == LEVEL_FORTUNA) { - func_effect_8007BC7C(this->obj.pos.x + sin, yPos, this->obj.pos.z + cos, 20.0f); + Effect_Effect362_Spawn(this->obj.pos.x + sin, yPos, this->obj.pos.z + cos, 20.0f); } else if (gCurrentLevel == LEVEL_TITANIA) { - func_effect_8007A900(this->obj.pos.x + sin, yPos, this->obj.pos.z + cos, 10.0f, 255, 15, 0); + Effect_Effect359_Spawn(this->obj.pos.x + sin, yPos, this->obj.pos.z + cos, 10.0f, 255, 15, 0); } } } @@ -2775,9 +2801,9 @@ void Effect_Effect349_Update(Effect349* this) { } if (gCurrentLevel == LEVEL_FORTUNA) { - func_effect_8007BC7C(this->obj.pos.x + sin, yPos, this->obj.pos.z + cos, 8.0f); + Effect_Effect362_Spawn(this->obj.pos.x + sin, yPos, this->obj.pos.z + cos, 8.0f); } else if (gCurrentLevel == LEVEL_TITANIA) { - func_effect_8007A900(this->obj.pos.x + sin, yPos, this->obj.pos.z + cos, 8.0f, 255, 15, 0); + Effect_Effect359_Spawn(this->obj.pos.x + sin, yPos, this->obj.pos.z + cos, 8.0f, 255, 15, 0); } } } @@ -2809,7 +2835,7 @@ void Effect_Effect350_Update(Effect350* this) { sin = __sinf(temp) * this->scale2 * 16.0f; cos = __cosf(temp) * this->scale2 * 16.0f; yPos = gGroundHeight + 10.0f; - func_effect_8007BC7C(this->obj.pos.x + sin, yPos, this->obj.pos.z + cos, 12.0f); + Effect_Effect362_Spawn(this->obj.pos.x + sin, yPos, this->obj.pos.z + cos, 12.0f); } } } @@ -2933,6 +2959,7 @@ void Effect_Effect377_Update(Effect377* this) { void Effect_Effect356_Update(Effect356* this) { Effect_Effect353_354_Update(this); this->obj.rot.z += 10.0f; + this->scale2 = 3.0f; if ((gGameFrameCount % 2) != 0) { this->scale2 = 3.5f; @@ -3492,14 +3519,14 @@ void Effect_Effect395_Update(Effect395* this) { } if ((gGameFrameCount % 2) == 0) { - func_effect_8007C484(RAND_FLOAT_CENTERED(50.0f) + this->obj.pos.x, - RAND_FLOAT_CENTERED(50.0f) + this->obj.pos.y, - RAND_FLOAT_CENTERED(50.0f) + this->obj.pos.z, this->vel.x, this->vel.y, - this->vel.z, RAND_FLOAT(0.05f) + 0.05f, 0); + Effect_Effect389_Spawn(RAND_FLOAT_CENTERED(50.0f) + this->obj.pos.x, + RAND_FLOAT_CENTERED(50.0f) + this->obj.pos.y, + RAND_FLOAT_CENTERED(50.0f) + this->obj.pos.z, this->vel.x, this->vel.y, + this->vel.z, RAND_FLOAT(0.05f) + 0.05f, 0); } if (Object_CheckCollision(this->index, &this->obj.pos, &velocity, 1) != 0) { - func_effect_8007B344(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 3.0f, 7); + Effect_Effect384_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 3.0f, 7); Object_Kill(&this->obj, this->sfxSource); } sp84 = 50.0f; @@ -3558,13 +3585,13 @@ void Effect_Effect395_Update(Effect395* this) { } if ((gGameFrameCount % 4) == 0) { - func_effect_8007C120((RAND_FLOAT_CENTERED(this->scale2) * 50.0f) + this->obj.pos.x, - (RAND_FLOAT_CENTERED(this->scale2) * 50.0f) + this->obj.pos.y, - (RAND_FLOAT_CENTERED(this->scale2) * 50.0f) + this->obj.pos.z, this->vel.x, - this->vel.y, this->vel.z, RAND_FLOAT(0.03f) + 0.05f, 10); + Effect_Effect390_Spawn((RAND_FLOAT_CENTERED(this->scale2) * 50.0f) + this->obj.pos.x, + (RAND_FLOAT_CENTERED(this->scale2) * 50.0f) + this->obj.pos.y, + (RAND_FLOAT_CENTERED(this->scale2) * 50.0f) + this->obj.pos.z, this->vel.x, + this->vel.y, this->vel.z, RAND_FLOAT(0.03f) + 0.05f, 10); } if (Object_CheckCollision(this->index, &this->obj.pos, &velocity, 1) != 0) { - func_effect_8007B344(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 3.0f, 7); + Effect_Effect384_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 3.0f, 7); Object_Kill(&this->obj, this->sfxSource); } sp84 = 50.0f; @@ -3643,7 +3670,7 @@ void Effect_Effect395_Update(Effect395* this) { if ((Play_CheckDynaFloorCollision(&posYOut, &unusedOut, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z)) || (this->timer_50 == 0)) { - func_effect_8007B228(this->obj.pos.x, posYOut, this->obj.pos.z, this->scale2); + Effect_Effect381_Spawn(this->obj.pos.x, posYOut, this->obj.pos.z, this->scale2); Object_Kill(&this->obj, this->sfxSource); } break; @@ -3966,7 +3993,7 @@ void Effect_Effect395_Draw(Effect395* this) { RCP_SetupDL(&gMasterDisp, SETUPDL_64); } -void func_effect_800836C0(Effect391* this, f32 xPos, f32 yPos, f32 zPos, f32 arg4, f32 scale) { +void Effect_Effect391_Setup(Effect391* this, f32 xPos, f32 yPos, f32 zPos, f32 arg4, f32 scale) { Effect_Initialize(this); this->obj.status = OBJ_INIT; this->obj.id = OBJ_EFFECT_391; @@ -3987,12 +4014,12 @@ void func_effect_800836C0(Effect391* this, f32 xPos, f32 yPos, f32 zPos, f32 arg Object_SetInfo(&this->info, this->obj.id); } -void func_effect_8008377C(f32 xPos, f32 yPos, f32 zPos, f32 arg3, f32 scale) { +void Effect_Effect391_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 arg3, f32 scale) { s32 i; for (i = 0; i < ARRAY_COUNT(gEffects); i++) { if (gEffects[i].obj.status == OBJ_FREE) { - func_effect_800836C0(&gEffects[i], xPos, yPos, zPos, arg3, scale); + Effect_Effect391_Setup(&gEffects[i], xPos, yPos, zPos, arg3, scale); break; } } @@ -4063,8 +4090,8 @@ void Effect_Effect391_Draw(Effect391* this) { RCP_SetupDL(&gMasterDisp, SETUPDL_64); } -void func_effect_80083C70(Effect399* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 arg7, - s32 arg8) { +void Effect_Effect399_Setup(Effect399* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 arg7, + s32 arg8) { Effect_Initialize(this); this->obj.status = OBJ_INIT; this->obj.id = OBJ_EFFECT_399; @@ -4132,7 +4159,7 @@ void func_effect_80083D2C(f32 xPos, f32 yPos, f32 zPos, f32 srcZ) { for (i = 0; i < 6; i++) { for (j = 0; j < ARRAY_COUNT(gEffects); j++) { if (gEffects[j].obj.status == OBJ_FREE) { - func_effect_80083C70(&gEffects[j], xPos, yPos, zPos, dest.x, dest.y, dest.z, i * 60.0f, i); + Effect_Effect399_Setup(&gEffects[j], xPos, yPos, zPos, dest.x, dest.y, dest.z, i * 60.0f, i); if (i == 0) { AUDIO_PLAY_SFX(NA_SE_EN_MARBLE_BEAM, gEffects[j].sfxSource, 4); } diff --git a/src/engine/fox_enmy.c b/src/engine/fox_enmy.c index 8273a1bf..2ee7b60d 100644 --- a/src/engine/fox_enmy.c +++ b/src/engine/fox_enmy.c @@ -116,6 +116,7 @@ bool func_enmy_80060FE4(Vec3f* arg0, f32 arg1) { return false; } +// Unused bool func_enmy_80061148(Vec3f* arg0, f32 arg1) { Vec3f src; Vec3f dest; @@ -278,7 +279,7 @@ void Item_Load(Item* this, ObjectInit* objInit) { Object_SetInfo(&this->info, this->obj.id); } -void func_enmy_80061958(Effect346* this, f32 xPos, f32 yPos, f32 zPos) { +void Effect_Effect346_Setup(Effect346* this, f32 xPos, f32 yPos, f32 zPos) { Effect_Initialize(this); this->obj.status = OBJ_INIT; this->obj.id = OBJ_EFFECT_346; @@ -317,12 +318,13 @@ void func_enmy_80061A4C(void) { if (gPathVelZ < 0.0f) { z = -gPathProgress + 500.0f; } - func_enmy_80061958(&gEffects[i], x, y, z); + Effect_Effect346_Setup(&gEffects[i], x, y, z); break; } } } +// For Aquas void func_enmy_80061B68(void) { s32 i; f32 x; @@ -341,12 +343,13 @@ void func_enmy_80061B68(void) { if (gPathVelZ < 0.0f) { z = -gPathProgress + 1000.0f; } - func_enmy_80061958(&gEffects[i], x, y, z); + Effect_Effect346_Setup(&gEffects[i], x, y, z); break; } } } +// Unused void func_enmy_80061CD0(void) { s32 i; f32 x; @@ -361,22 +364,25 @@ void func_enmy_80061CD0(void) { if (gPathVelZ < 0.0f) { z = -gPathProgress + 1000.0f; } - func_enmy_80061958(&gEffects[i], x, y, z); + Effect_Effect346_Setup(&gEffects[i], x, y, z); break; } } } +// Unused void func_enmy_80061E48(Actor* this, f32 xPos, f32 yPos, f32 zPos) { Actor_Initialize(this); this->obj.status = OBJ_INIT; - this->obj.id = OBJ_ACTOR_181; + + this->obj.id = OBJ_ACTOR_ME_METEOR_1; if (Rand_ZeroOne() < 0.5f) { - this->obj.id = OBJ_ACTOR_186; + this->obj.id = OBJ_ACTOR_ME_LASER_CANNON_1; } if (Rand_ZeroOne() < 0.5f) { - this->obj.id = OBJ_ACTOR_182; + this->obj.id = OBJ_ACTOR_ME_METEOR_2; } + this->obj.pos.x = xPos; this->obj.pos.y = yPos; this->obj.pos.z = zPos; @@ -403,17 +409,21 @@ void ActorEvent_Load(ActorEvent* this, ObjectInit* objInit, s32 index) { this->aiType = objInit->id - ACTOR_EVENT_ID; Object_SetInfo(&this->info, this->obj.id); + this->info.cullDistance = 3000.0f; this->fwork[25] = 20000.0f; this->iwork[1] = gPrevEventActorIndex; this->iwork[10] = gActors[gPrevEventActorIndex].aiType; this->fwork[22] = gArwingSpeed; + Matrix_RotateZ(gCalcMatrix, -gFormationInitRot.z * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -gFormationInitRot.x * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, -gFormationInitRot.y * M_DTOR, MTXF_APPLY); + src.x = this->obj.pos.x - gFormationInitPos.x; src.y = this->obj.pos.y - gFormationInitPos.y; src.z = this->obj.pos.z - gFormationInitPos.z; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &this->vwork[28]); this->iwork[9] = gFormationLeaderIndex; gPrevEventActorIndex = index; @@ -442,7 +452,7 @@ void Object_Load(ObjectInit* objInit, f32 xMax, f32 xMin, f32 yMax, f32 yMin) { } } if ((objInit->id >= OBJ_ACTOR_START) && (objInit->id < OBJ_ACTOR_MAX)) { - if ((objInit->id == OBJ_ACTOR_267) || (objInit->id == OBJ_ACTOR_254)) { + if ((objInit->id == OBJ_ACTOR_AQ_JELLYFISH) || (objInit->id == OBJ_ACTOR_ZO_SEARCHLIGHT)) { for (i = ARRAY_COUNT(gActors) - 1; i >= 0; i--) { if (gActors[i].obj.status == OBJ_FREE) { Actor_Load(&gActors[i], objInit); @@ -481,7 +491,7 @@ void Object_Load(ObjectInit* objInit, f32 xMax, f32 xMin, f32 yMax, f32 yMin) { } } } - if (objInit->id >= OBJ_EFFECT_START && objInit->id <= OBJ_ID_MAX) { + if ((objInit->id >= OBJ_EFFECT_START) && (objInit->id <= OBJ_ID_MAX)) { switch (objInit->id) { case OBJ_UNK_403: D_MA_801BA1E8 = 99; @@ -496,10 +506,10 @@ void Object_Load(ObjectInit* objInit, f32 xMax, f32 xMin, f32 yMax, f32 yMin) { D_Andross_801A7F78 = objInit->rot.z * 0.1f; D_Andross_801A7F60 = -(f32) objInit->rot.x; break; - case OBJ_UNK_400: + case OBJ_ENV_SMALL_ROCKS_ENABLE: gDrawSmallRocks++; break; - case OBJ_UNK_401: + case OBJ_ENV_SMALL_ROCKS_DISABLE: if (gDrawSmallRocks > 0) { gDrawSmallRocks--; } @@ -552,6 +562,7 @@ void Object_LoadLevelObjects(void) { } else { gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]); } + if (gGroundClipMode == 0) { for (j = 0; j < gDrawSmallRocks; j++) { if (gCurrentLevel == LEVEL_AQUAS) { @@ -561,6 +572,7 @@ void Object_LoadLevelObjects(void) { } } } + if (gCurrentLevel == LEVEL_METEO) { yMax = xMax = 10000.0f; yMin = xMin = -10000.0f; @@ -581,13 +593,14 @@ void Object_LoadLevelObjects(void) { if ((gPlayer[0].pathChangeTimer != 0) && (gPlayer[0].pathChangeYaw > 0.0f)) { xMin = -10000.0f; } + gLastPathChange = 0; for (i = 0, objInit = &gLevelObjects[gObjectLoadIndex]; i < 10000; i++, gObjectLoadIndex++, objInit++) { if (objInit->id <= OBJ_INVALID) { break; } - if (((gPathProgress <= objInit->zPos1) && (objInit->zPos1 <= gPathProgress + 200.0f))) { + if ((gPathProgress <= objInit->zPos1) && (objInit->zPos1 <= gPathProgress + 200.0f)) { if ((gCurrentLevel == LEVEL_VENOM_1) && (objInit->id >= ACTOR_EVENT_ID)) { if (((objInit->rot.y < 180.0f) && (objInit->xPos < gPlayer[0].xPath)) || ((objInit->rot.y > 180.0f) && (gPlayer[0].xPath < objInit->xPos))) { @@ -680,9 +693,11 @@ bool Object_CheckHitboxCollision(Vec3f* pos, f32* hitboxData, Object* obj, f32 x count = *hitboxData; if (count != 0) { hitboxData++; + for (i = 0; i < count; i++, hitboxData += 6) { rotate = 0.0f; hitRot.x = hitRot.y = hitRot.z = 0.0f; + if (*hitboxData >= HITBOX_SHADOW) { return false; } @@ -693,6 +708,7 @@ bool Object_CheckHitboxCollision(Vec3f* pos, f32* hitboxData, Object* obj, f32 x hitRot.z = hitboxData[3]; hitboxData += 4; } + if ((obj->rot.y == 0.0f) && (obj->rot.z == 0.0f) && (obj->rot.x == 0.0f) && (rotate == 0.0f)) { hitPos.x = pos->x; hitPos.y = pos->y; @@ -701,22 +717,28 @@ bool Object_CheckHitboxCollision(Vec3f* pos, f32* hitboxData, Object* obj, f32 x Matrix_RotateZ(gCalcMatrix, -hitRot.z * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -hitRot.x * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, -hitRot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -obj->rot.z * M_DTOR, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, -obj->rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, -obj->rot.y * M_DTOR, MTXF_APPLY); + if ((xRot != 0.0f) || (yRot != 0.0f) || (zRot != 0.0f)) { Matrix_RotateZ(gCalcMatrix, -zRot * M_DTOR, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, -xRot * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, -yRot * M_DTOR, MTXF_APPLY); } + sp80.x = pos->x - obj->pos.x; sp80.y = pos->y - obj->pos.y; sp80.z = pos->z - obj->pos.z; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp80, &sp74); + hitPos.x = obj->pos.x + sp74.x; hitPos.y = obj->pos.y + sp74.y; hitPos.z = obj->pos.z + sp74.z; } + hitbox = (Hitbox*) hitboxData; if (((hitbox->z.size + 20.0f) > fabsf(hitbox->z.offset + obj->pos.z - hitPos.z)) && ((hitbox->x.size + 20.0f) > fabsf(hitbox->x.offset + obj->pos.x - hitPos.x)) && @@ -752,32 +774,37 @@ bool Object_CheckPolyCollision(Vec3f* pos, Vec3f* vel, ObjectId objId, Object* o sp74.x = pos->x - obj->pos.x; sp74.z = pos->z - obj->pos.z; - if (((fabsf(sp74.x) < 1100.0f) && (fabsf(sp74.z) < 1100.0f)) || (objId == OBJ_ACTOR_180)) { + + if (((fabsf(sp74.x) < 1100.0f) && (fabsf(sp74.z) < 1100.0f)) || (objId == OBJ_ACTOR_ME_MOLAR_ROCK)) { sp74.y = pos->y - obj->pos.y; + Matrix_RotateY(gCalcMatrix, -obj->rot.y * M_DTOR, MTXF_NEW); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp74, &sp68); + relPos.x = obj->pos.x + sp68.x; relPos.y = obj->pos.y + sp68.y; relPos.z = obj->pos.z + sp68.z; + objPos.x = obj->pos.x; objPos.y = obj->pos.y; objPos.z = obj->pos.z; - if ((objId == OBJ_ACTOR_180) || (objId == OBJ_SCENERY_149) || (objId == OBJ_SCENERY_150) || - (objId == OBJ_BOSS_FO) || (objId == OBJ_BOSS_SZ_GREAT_FOX) || (objId == OBJ_BOSS_VE2) || - (objId == OBJ_BOSS_309) || (objId == OBJ_SCENERY_ME_TUNNEL)) { + + if ((objId == OBJ_ACTOR_ME_MOLAR_ROCK) || (objId == OBJ_SCENERY_FO_MOUNTAIN_2) || + (objId == OBJ_SCENERY_FO_MOUNTAIN_3) || (objId == OBJ_BOSS_FO_BASE) || (objId == OBJ_BOSS_SZ_GREAT_FOX) || + (objId == OBJ_BOSS_VE2_BASE) || (objId == OBJ_BOSS_BO_BASE) || (objId == OBJ_SCENERY_ME_TUNNEL)) { colId = COL1_0; - if (objId == OBJ_BOSS_VE2) { + if (objId == OBJ_BOSS_VE2_BASE) { colId = COL1_9; } if (objId == OBJ_SCENERY_ME_TUNNEL) { colId = COL1_1; - } else if (objId == OBJ_BOSS_FO) { + } else if (objId == OBJ_BOSS_FO_BASE) { colId = COL1_4; - } else if (objId == OBJ_BOSS_309) { + } else if (objId == OBJ_BOSS_BO_BASE) { colId = COL1_7; - } else if (objId == OBJ_SCENERY_149) { + } else if (objId == OBJ_SCENERY_FO_MOUNTAIN_2) { colId = COL1_5; - } else if (objId == OBJ_SCENERY_150) { + } else if (objId == OBJ_SCENERY_FO_MOUNTAIN_3) { colId = COL1_6; } else if (objId == OBJ_BOSS_SZ_GREAT_FOX) { colId = COL1_8; @@ -793,17 +820,18 @@ bool Object_CheckPolyCollision(Vec3f* pos, Vec3f* vel, ObjectId objId, Object* o if (objId == OBJ_SCENERY_CO_BUMP_3) { colId = COL2_3; } - if (objId == OBJ_SCENERY_140) { + if (objId == OBJ_SCENERY_VS_PYRAMID_1) { colId = COL2_4; } - if (objId == OBJ_SCENERY_141) { + if (objId == OBJ_SCENERY_VS_PYRAMID_2) { colId = COL2_6; } - if (objId == OBJ_SCENERY_117) { + if (objId == OBJ_SCENERY_AQ_CORAL_REEF_1) { colId = COL2_14; } else if ((objId == OBJ_SCENERY_CO_BUMP_4) || (objId == OBJ_SCENERY_CO_BUMP_5)) { colId = COL2_1; } + if (func_col2_800A3690(&relPos, &objPos, colId, &sp44)) { return true; } @@ -826,9 +854,12 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) { for (i = 0; i < 200; i++, scenery360++) { if (scenery360->obj.status == OBJ_ACTIVE) { if ((scenery360->obj.id == OBJ_SCENERY_CO_BUMP_1) || (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_3) || - (scenery360->obj.id == OBJ_SCENERY_117) || (scenery360->obj.id == OBJ_SCENERY_141) || - (scenery360->obj.id == OBJ_SCENERY_150) || (scenery360->obj.id == OBJ_SCENERY_149) || - (scenery360->obj.id == OBJ_SCENERY_148) || (scenery360->obj.id == OBJ_SCENERY_140)) { + (scenery360->obj.id == OBJ_SCENERY_AQ_CORAL_REEF_1) || + (scenery360->obj.id == OBJ_SCENERY_VS_PYRAMID_2) || + (scenery360->obj.id == OBJ_SCENERY_FO_MOUNTAIN_3) || + (scenery360->obj.id == OBJ_SCENERY_FO_MOUNTAIN_2) || + (scenery360->obj.id == OBJ_SCENERY_FO_MOUNTAIN_1) || + (scenery360->obj.id == OBJ_SCENERY_VS_PYRAMID_1)) { if (Object_CheckPolyCollision(pos, vel, scenery360->obj.id, &scenery360->obj)) { return 999; } @@ -867,7 +898,7 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) { Object_CheckSingleHitbox(pos, sprite->info.hitbox, &sprite->obj.pos)) { if ((sprite->obj.id == OBJ_SPRITE_FO_POLE) || (sprite->obj.id == OBJ_SPRITE_CO_TREE) || (sprite->obj.id == OBJ_SPRITE_CO_TREE)) { - sprite->destroy = 1; + sprite->destroy = true; } return 0; } @@ -878,12 +909,12 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) { boss = &gBosses[0]; for (i = 0; i < ARRAY_COUNT(gBosses); i++, boss++) { if (boss->obj.status == OBJ_ACTIVE) { - if ((boss->obj.id == OBJ_BOSS_FO) || (boss->obj.id == OBJ_BOSS_VE2) || - (boss->obj.id == OBJ_BOSS_SZ_GREAT_FOX) || (boss->obj.id == OBJ_BOSS_309)) { + if ((boss->obj.id == OBJ_BOSS_FO_BASE) || (boss->obj.id == OBJ_BOSS_VE2_BASE) || + (boss->obj.id == OBJ_BOSS_SZ_GREAT_FOX) || (boss->obj.id == OBJ_BOSS_BO_BASE)) { if (Object_CheckPolyCollision(pos, vel, boss->obj.id, &boss->obj)) { return 2; } - } else if (boss->obj.id == OBJ_BOSS_310) { + } else if (boss->obj.id == OBJ_BOSS_BO_BASE_SHIELD) { temp.x = fabsf(boss->obj.pos.x - pos->x) * (5.0f / 6.0f); temp.y = fabsf(boss->obj.pos.y - pos->y) * 2; temp.z = fabsf(boss->obj.pos.z - pos->z) * (5.0f / 6.0f); @@ -892,7 +923,7 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) { return 2; } } else { - if (boss->obj.id == OBJ_BOSS_KA) { + if (boss->obj.id == OBJ_BOSS_KA_SAUCERER) { temp.x = fabsf(boss->obj.pos.x - pos->x); temp.y = fabsf(boss->obj.pos.y - 300.0f - pos->y) * 7.42f; temp.z = fabsf(boss->obj.pos.z - pos->z); @@ -916,7 +947,7 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) { if ((actor->obj.status >= OBJ_ACTIVE) && (fabsf(pos->x - actor->obj.pos.x) < 1000.0f) && (fabsf(pos->z - actor->obj.pos.z) < 1500.0f) && (index != i) && (actor->info.unk_16 != 2) && !((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->aiType <= AI360_PEPPY)) && (actor->timer_0C2 == 0)) { - if (actor->obj.id == OBJ_ACTOR_180) { + if (actor->obj.id == OBJ_ACTOR_ME_MOLAR_ROCK) { if (Object_CheckPolyCollision(pos, vel, actor->obj.id, &actor->obj)) { return 2; } @@ -953,14 +984,14 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) { return 0; } -void func_enmy_80063CAC(Scenery* this) { +void Actor_CoRadar_Init(Scenery* this) { s32 i; for (i = 0; i < ARRAY_COUNT(gActors); i++) { if (gActors[i].obj.status == OBJ_FREE) { Actor_Initialize(&gActors[i]); gActors[i].obj.status = OBJ_INIT; - gActors[i].obj.id = OBJ_ACTOR_193; + gActors[i].obj.id = OBJ_ACTOR_CO_RADAR; gActors[i].obj.pos.x = this->obj.pos.x; gActors[i].obj.pos.y = this->obj.pos.y; gActors[i].obj.pos.z = this->obj.pos.z; @@ -971,7 +1002,7 @@ void func_enmy_80063CAC(Scenery* this) { } } -void func_enmy_80063D58(CoDoors* this) { +void Scenery_Corneria_Init(CoDoors* this) { s32 i; this->obj.pos.y = gGroundHeight; @@ -1001,7 +1032,7 @@ void func_enmy_80063D58(CoDoors* this) { } } -void func_enmy_80063E5C(Scenery* this, f32* hitboxData) { +void Scenery_CoStoneArch_Init(CoStoneArch* this, f32* hitboxData) { s32 i; Item* item; @@ -1021,7 +1052,9 @@ void func_enmy_80063E5C(Scenery* this, f32* hitboxData) { } } +// Unused void func_enmy_80063F4C(s32 arg0) { + /* Unimplemented */ } void func_enmy_80063F58(Item* item) { @@ -1033,10 +1066,10 @@ void func_enmy_80063F74(Item* item) { } void Object_Init(s32 index, ObjectId objId) { - s32 var_a0; - s32 var_a2; - f32 sp54; - f32 sp50; + s32 i; + s32 j; + f32 xRot; + f32 zRot; f32 sp4C; PosRot* var_v0; @@ -1044,7 +1077,7 @@ void Object_Init(s32 index, ObjectId objId) { case OBJ_SPRITE_CO_SMOKE: Effect_SpawnTimedSfxAtPos(&gSprites[index].obj.pos, NA_SE_OB_SMOKE); break; - case OBJ_ACTOR_234: + case OBJ_ACTOR_TI_GREAT_FOX: AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, gActors[index].sfxSource, 0); break; case OBJ_SCENERY_CO_WATERFALL: @@ -1053,52 +1086,52 @@ void Object_Init(s32 index, ObjectId objId) { case OBJ_ACTOR_TEAM_BOSS: ActorTeamBoss_Init(&gActors[index]); break; - case OBJ_ACTOR_235: + case OBJ_ACTOR_ZO_BIRD: gActors[index].fwork[10] = fabsf(Math_ModF(gActors[index].obj.pos.x, 100.0f)); break; - case OBJ_ACTOR_247: - Zoness_Actor247_Init(&gActors[index]); + case OBJ_ACTOR_ZO_BARRIER: + Zoness_ZoBarrier_Init(&gActors[index]); break; case OBJ_EFFECT_368: if (gCurrentLevel == LEVEL_TITANIA) { - Ground_801B6E20(gEffects[index].obj.pos.x, gEffects[index].obj.pos.z + gPathProgress, &sp54, &sp4C, - &sp50); + Ground_801B6E20(gEffects[index].obj.pos.x, gEffects[index].obj.pos.z + gPathProgress, &xRot, &sp4C, + &zRot); gEffects[index].obj.pos.y = sp4C + 3.0f; - gEffects[index].obj.rot.x = RAD_TO_DEG(sp54); - gEffects[index].obj.rot.z = RAD_TO_DEG(sp50); + gEffects[index].obj.rot.x = RAD_TO_DEG(xRot); + gEffects[index].obj.rot.z = RAD_TO_DEG(zRot); } else if (gCurrentLevel == LEVEL_MACBETH) { gEffects[index].obj.status = OBJ_FREE; } break; case OBJ_SCENERY_TI_RIB_0: - func_enmy_80063E5C(&gScenery[index], D_TI_6006940); + Scenery_CoStoneArch_Init(&gScenery[index], D_TI_6006940); break; case OBJ_SCENERY_TI_RIB_1: - func_enmy_80063E5C(&gScenery[index], D_TI_600695C); + Scenery_CoStoneArch_Init(&gScenery[index], D_TI_600695C); break; case OBJ_SCENERY_TI_RIB_2: - func_enmy_80063E5C(&gScenery[index], D_TI_6006978); + Scenery_CoStoneArch_Init(&gScenery[index], D_TI_6006978); break; case OBJ_SCENERY_TI_RIB_3: - func_enmy_80063E5C(&gScenery[index], D_TI_6006994); + Scenery_CoStoneArch_Init(&gScenery[index], D_TI_6006994); break; case OBJ_SCENERY_TI_RIB_4: - func_enmy_80063E5C(&gScenery[index], D_TI_60069B0); + Scenery_CoStoneArch_Init(&gScenery[index], D_TI_60069B0); break; case OBJ_SCENERY_TI_RIB_5: - func_enmy_80063E5C(&gScenery[index], D_TI_60069CC); + Scenery_CoStoneArch_Init(&gScenery[index], D_TI_60069CC); break; case OBJ_SCENERY_TI_RIB_6: - func_enmy_80063E5C(&gScenery[index], D_TI_60069E8); + Scenery_CoStoneArch_Init(&gScenery[index], D_TI_60069E8); break; case OBJ_SCENERY_TI_RIB_7: - func_enmy_80063E5C(&gScenery[index], D_TI_6006A04); + Scenery_CoStoneArch_Init(&gScenery[index], D_TI_6006A04); break; case OBJ_SCENERY_TI_RIB_8: - func_enmy_80063E5C(&gScenery[index], D_TI_6006A20); + Scenery_CoStoneArch_Init(&gScenery[index], D_TI_6006A20); break; - case OBJ_SCENERY_CO_RADAR: - func_enmy_80063CAC(&gScenery[index]); + case OBJ_SCENERY_CO_RADAR_DISH: + Actor_CoRadar_Init(&gScenery[index]); break; case OBJ_ITEM_CHECKPOINT: if (gSavedObjectLoadIndex != 0) { @@ -1128,7 +1161,7 @@ void Object_Init(s32 index, ObjectId objId) { } break; case OBJ_SCENERY_CO_STONE_ARCH: - func_enmy_80063E5C(&gScenery[index], gItemRingCheckHitbox); + Scenery_CoStoneArch_Init(&gScenery[index], gItemRingCheckHitbox); /* fallthrough */ case OBJ_SCENERY_CO_HIGHWAY_1: case OBJ_SCENERY_CO_HIGHWAY_2: @@ -1136,46 +1169,46 @@ void Object_Init(s32 index, ObjectId objId) { case OBJ_SCENERY_CO_ARCH_2: case OBJ_SCENERY_CO_ARCH_3: case OBJ_SCENERY_CO_DOORS: - func_enmy_80063D58(&gScenery[index]); + Scenery_Corneria_Init(&gScenery[index]); break; - case OBJ_ACTOR_187: + case OBJ_ACTOR_ME_LASER_CANNON_2: gActors[index].fwork[0] = gActors[index].obj.pos.x; gActors[index].fwork[1] = gActors[index].obj.pos.y; gActors[index].obj.rot.z = gActors[index].obj.rot.x; gActors[index].obj.rot.x = 0.0f; break; - case OBJ_ACTOR_182: - case OBJ_ACTOR_186: + case OBJ_ACTOR_ME_METEOR_2: + case OBJ_ACTOR_ME_LASER_CANNON_1: gActors[index].unk_046 = gFogRed; gActors[index].unk_048 = gFogNear; gActors[index].obj.rot.x = RAND_FLOAT(360.0f); gActors[index].obj.rot.y = RAND_FLOAT(360.0f); break; - case OBJ_ACTOR_181: + case OBJ_ACTOR_ME_METEOR_1: gActors[index].obj.rot.x = RAND_FLOAT(360.0f); gActors[index].obj.rot.y = RAND_FLOAT(360.0f); gActors[index].health = 200; break; - case OBJ_ACTOR_202: + case OBJ_ACTOR_ME_HOPBOT: gActors[index].health = 30; break; - case OBJ_ACTOR_252: + case OBJ_ACTOR_ZO_RADARBUOY: if (gPlayer[0].pos.z < gActors[index].obj.pos.z) { Object_Kill(&gActors[index].obj, gActors[index].sfxSource); } break; - case OBJ_ACTOR_239: - gActors[index].iwork[0] = gZOSnakeWaypointCount; - gZOSnakeWaypointCount++; + case OBJ_ACTOR_ZO_DODORA_WP_COUNT: + gActors[index].iwork[0] = gZoDodoraWaypointCount; + gZoDodoraWaypointCount++; break; - case OBJ_ACTOR_236: - gZOSnakeWaypointCount = 0; + case OBJ_ACTOR_ZO_DODORA: + gZoDodoraWaypointCount = 0; gActors[index].rot_0F4.x = gActors[index].obj.rot.x; gActors[index].rot_0F4.y = gActors[index].obj.rot.y; gActors[index].obj.rot.x = gActors[index].obj.rot.y = 0.0f; gActors[index].fwork[2] = gActors[index].obj.pos.y; - var_v0 = gZOSnakePosRots; - for (var_a0 = 0; var_a0 < 200; var_a0++, var_v0++) { + var_v0 = gZoDodoraPosRots; + for (i = 0; i < 200; i++, var_v0++) { var_v0->pos.x = gActors[index].obj.pos.x; var_v0->pos.y = gActors[index].obj.pos.y; var_v0->pos.z = gActors[index].obj.pos.z; @@ -1184,15 +1217,15 @@ void Object_Init(s32 index, ObjectId objId) { var_v0->rot.z = gActors[index].obj.rot.z; } break; - case OBJ_ACTOR_194: + case OBJ_ACTOR_ME_MORA: gActors[index].unk_046 = 100; - for (var_a0 = 0; var_a0 < 2; var_a0++) { - if (gActor194Status[var_a0] == 0) { - gActor194Status[var_a0] = 1; - gActors[index].unk_046 = var_a0; - for (var_a2 = 0; var_a2 < 100; var_a2++) { - gActor194yPos[var_a0][var_a2] = gActors[index].obj.pos.y; - gActor194zPos[var_a0][var_a2] = gActors[index].obj.pos.z; + for (i = 0; i < 2; i++) { + if (gMeMoraStatus[i] == 0) { + gMeMoraStatus[i] = 1; + gActors[index].unk_046 = i; + for (j = 0; j < 100; j++) { + gMeMoraYpos[i][j] = gActors[index].obj.pos.y; + gMeMoraZpos[i][j] = gActors[index].obj.pos.z; } break; } @@ -1205,163 +1238,163 @@ void Object_Init(s32 index, ObjectId objId) { case OBJ_MISSILE_SEEK_PLAYER: AUDIO_PLAY_SFX(NA_SE_EN_MISSILE_ENGINE, gActors[index].sfxSource, 4); break; - case OBJ_ACTOR_192: + case OBJ_ACTOR_CO_SKIBOT: gActors[index].drawShadow = true; break; - case OBJ_BOSS_320: - Andross_Boss320_Init(&gBosses[index]); + case OBJ_BOSS_AND_ANDROSS: + Andross_AndAndross_Init(&gBosses[index]); break; - case OBJ_BOSS_KA: - Katina_BossSetup(&gBosses[index]); + case OBJ_BOSS_KA_SAUCERER: + Katina_KaSaucerer_Init(&gBosses[index]); break; - case OBJ_BOSS_SY: - SectorY_Boss314_Init(&gBosses[index]); + case OBJ_BOSS_SY_SHOGUN: + SectorY_SyShogun_Init(&gBosses[index]); break; - case OBJ_ACTOR_205: - case OBJ_ACTOR_206: - case OBJ_ACTOR_208: - case OBJ_ACTOR_209: - case OBJ_ACTOR_210: - case OBJ_ACTOR_211: - case OBJ_ACTOR_212: - case OBJ_ACTOR_213: - Macbeth_80199F8C(&gActors[index]); + case OBJ_ACTOR_MA_LOCOMOTIVE: + case OBJ_ACTOR_MA_TRAIN_CAR_1: + case OBJ_ACTOR_MA_TRAIN_CAR_2: + case OBJ_ACTOR_MA_TRAIN_CAR_3: + case OBJ_ACTOR_MA_TRAIN_CAR_4: + case OBJ_ACTOR_MA_TRAIN_CAR_5: + case OBJ_ACTOR_MA_TRAIN_CAR_6: + case OBJ_ACTOR_MA_TRAIN_CAR_7: + Macbeth_Train_Init(&gActors[index]); break; case OBJ_ACTOR_207: - Macbeth_801A7D98(&gActors[index]); + Macbeth_Actor207_Init(&gActors[index]); break; - case OBJ_ACTOR_214: - Macbeth_801A3E70(&gActors[index]); + case OBJ_ACTOR_MA_RAILROAD_SWITCH: + Macbeth_MaMaRailroadSwitch_Init(&gActors[index]); break; - case OBJ_ACTOR_215: - Macbeth_801A4660(&gActors[index]); + case OBJ_ACTOR_MA_BOULDER: + Macbeth_MaBoulder_Init(&gActors[index]); break; - case OBJ_ACTOR_223: - Macbeth_801A4AF8(&gActors[index]); + case OBJ_ACTOR_MA_RAILWAY_SIGNAL: + Macbeth_MaRailwaySignal_Init(&gActors[index]); break; - case OBJ_ACTOR_216: - case OBJ_ACTOR_217: - Macbeth_801A5E2C(&gActors[index]); + case OBJ_ACTOR_MA_HORIZONTAL_LOCK_BAR: + case OBJ_ACTOR_MA_VERTICAL_LOCK_BAR: + Macbeth_LockBars_Init(&gActors[index]); break; - case OBJ_ACTOR_218: - Macbeth_801A6134(&gActors[index]); + case OBJ_ACTOR_MA_BARRIER: + Macbeth_MaBarrier_Init(&gActors[index]); break; - case OBJ_SCENERY_65: - Macbeth_801A65E0(&gScenery[index]); + case OBJ_SCENERY_MA_PROXIMITY_LIGHT: + Macbeth_MaProximityLight_Init(&gScenery[index]); break; case OBJ_ACTOR_CO_GARUDA_2: case OBJ_ACTOR_CO_GARUDA_3: - Corneria_IBeam_Init(&gActors[index]); + Corneria_CoIBeam_Init(&gActors[index]); /* fallthrough */ case OBJ_ACTOR_CO_GARUDA_1: gActors[index].health = 24; AUDIO_PLAY_SFX(NA_SE_EN_TANK_RB_ENGINE, gActors[index].sfxSource, 4); break; - case OBJ_BOSS_297: - Meteo_Boss297_Init(&gBosses[index]); + case OBJ_BOSS_ME_CRUSHER: + Meteo_MeCrusher_Init(&gBosses[index]); break; - case OBJ_BOSS_299: + case OBJ_BOSS_UNK_299: Boss299_Init(&gBosses[index]); break; - case OBJ_BOSS_300: + case OBJ_BOSS_UNK_300: Boss300_Init(&gBosses[index]); break; case OBJ_BOSS_CO_GRANGA: Corneria_Granga_Init(&gBosses[index]); break; case OBJ_BOSS_CO_CARRIER: - Corneria_Carrier_Init(&gBosses[index]); + Corneria_CoCarrier_Init(&gBosses[index]); break; - case OBJ_BOSS_A6: - Area6_BossA6_Init(&gBosses[index]); + case OBJ_BOSS_A6_GORGON: + Area6_A6Gorgon_Init(&gBosses[index]); break; - case OBJ_ACTOR_231: - Titania_Actor231_Init(&gActors[index]); + case OBJ_ACTOR_TI_BOMB: + Titania_TiBomb_Init(&gActors[index]); break; - case OBJ_ACTOR_232: - Titania_8018ADC4(&gActors[index]); + case OBJ_ACTOR_TI_RASCO: + Titania_TiRasco_Init(&gActors[index]); break; - case OBJ_ACTOR_233: - Titania_80189B80(&gActors[index]); + case OBJ_ACTOR_TI_FEKUDA: + Titania_TiFekuda_Init(&gActors[index]); break; - case OBJ_ACTOR_229: - Titania_8018BFB0(&gActors[index]); + case OBJ_ACTOR_TI_DESERT_CRAWLER: + Titania_TiDesertCrawler_Init(&gActors[index]); break; - case OBJ_ACTOR_227: - Titania_8018E3CC(&gActors[index]); + case OBJ_ACTOR_TI_DELPHOR: + Titania_TiDelphor_Init(&gActors[index]); break; - case OBJ_ACTOR_228: - Titania_8018E5E8(&gActors[index]); + case OBJ_ACTOR_TI_DELPHOR_HEAD: + Titania_TiDelphorHead_Init(&gActors[index]); break; case OBJ_SPRITE_TI_CACTUS: - Titania_8018EFF0(&gSprites[index]); + Titania_TiCactus_Init(&gSprites[index]); break; - case OBJ_BOSS_TI: - Titania_Boss306_Init(&gBosses[index]); + case OBJ_BOSS_TI_GORAS: + Titania_TiGoras_Init(&gBosses[index]); break; - case OBJ_ACTOR_240: - Zoness_801915A4(&gActors[index]); + case OBJ_ACTOR_ZO_Z_GULL: + Zoness_ZoEnergyBall_Init(&gActors[index]); break; - case OBJ_ACTOR_241: - Zoness_80191BB8(&gActors[index]); + case OBJ_ACTOR_ZO_ENERGY_BALL: + Zoness_ZoEnergyBall_Init2(&gActors[index]); break; - case OBJ_BOSS_ZO: - Zoness_BossZo_Init(&gBosses[index]); + case OBJ_BOSS_ZO_SARUMARINE: + Zoness_ZoSarumarine_Init(&gBosses[index]); break; - case OBJ_ACTOR_250: - Zoness_8019B1F0(&gActors[index]); + case OBJ_ACTOR_ZO_CARGOSHIP: + Zoness_ZoCargoShip_Init(&gActors[index]); break; - case OBJ_ACTOR_251: - Zoness_8019B810(&gActors[index]); + case OBJ_ACTOR_ZO_CONTAINER: + Zoness_ZoContainer_Init(&gActors[index]); break; - case OBJ_ACTOR_253: - Zoness_8019C200(&gActors[index]); + case OBJ_ACTOR_ZO_SUPPLYCRANE: + Zoness_ZoSupplyCrane_Init(&gActors[index]); break; case OBJ_ACTOR_255: - Aquas_801AD688(&gActors[index]); + Aquas_Actor255_Init(&gActors[index]); break; case OBJ_ACTOR_256: - Aquas_801AE3AC(&gActors[index]); + Aquas_Actor256_Init(&gActors[index]); break; case OBJ_ACTOR_257: - Aquas_801AF9FC(&gActors[index]); + Aquas_Actor257_Init(&gActors[index]); break; - case OBJ_BOSS_AQ: - Aquas_BossAq_Init(&gBosses[index]); + case OBJ_BOSS_AQ_BACOON: + Aquas_AqBacoon_Init(&gBosses[index]); break; - case OBJ_ACTOR_259: - Aquas_801B6344(&gActors[index]); + case OBJ_ACTOR_AQ_ANGLERFISH: + Aquas_AqAnglerFish_Init(&gActors[index]); break; - case OBJ_ACTOR_262: - Aquas_801B6E54(&gActors[index]); + case OBJ_ACTOR_AQ_SPINDLYFISH: + Aquas_AqSpindlyFish_Init(&gActors[index]); break; - case OBJ_ACTOR_260: - Aquas_801B7AF0(&gActors[index]); + case OBJ_ACTOR_AQ_GAROA: + Aquas_AqGaroa_Init(&gActors[index]); break; - case OBJ_SCENERY_57: - Titania_8018F0D8(&gScenery[index]); + case OBJ_SCENERY_TI_PILLAR: + Titania_TiPillar_Init(&gScenery[index]); break; - case OBJ_BOSS_VE1: - Venom1_Boss319_Init(&gBosses[index]); + case OBJ_BOSS_VE1_GOLEMECH: + Venom1_Ve1Golemech_Init(&gBosses[index]); break; - case OBJ_ACTOR_280: - Venom1_8019250C(&gActors[index]); + case OBJ_ACTOR_VE1_PILLAR_1: + Venom1_Ve1Pillar1_Init(&gActors[index]); break; - case OBJ_ACTOR_281: - case OBJ_ACTOR_282: - Venom1_80192CB0(&gActors[index]); + case OBJ_ACTOR_VE1_PILLAR_2: + case OBJ_ACTOR_VE1_PILLAR_3: + Venom1_Ve1Pillar2_3_Init(&gActors[index]); break; - case OBJ_ACTOR_283: - Venom1_80192EA4(&gActors[index]); + case OBJ_ACTOR_VE1_PILLAR_4: + Venom1_Ve1Pillar4_Init(&gActors[index]); break; - case OBJ_ACTOR_284: - Venom1_801933B4(&gActors[index]); + case OBJ_ACTOR_VE1_MONKEY_STATUE: + Venom1_Ve1MonkeyStatue_Init(&gActors[index]); break; - case OBJ_ACTOR_265: - Aquas_801BA57C(&gActors[index]); + case OBJ_ACTOR_AQ_BOULDER: + Venom1_AqBoulder_Init(&gActors[index]); break; - case OBJ_ACTOR_267: - Aquas_801BB26C(&gActors[index]); + case OBJ_ACTOR_AQ_JELLYFISH: + Venom1_AqJellyfish_Init(&gActors[index]); break; } } @@ -1380,10 +1413,10 @@ void Scenery_UpdateTitaniaBones(Scenery* this) { } } -void func_enmy_80065380(Actor182* this, f32 xPos, f32 yPos, f32 zPos, f32 arg4, f32 arg5, f32 arg6) { +void func_enmy_80065380(MeMeteor2* this, f32 xPos, f32 yPos, f32 zPos, f32 arg4, f32 arg5, f32 arg6) { Actor_Initialize(this); this->obj.status = OBJ_ACTIVE; - this->obj.id = OBJ_ACTOR_182; + this->obj.id = OBJ_ACTOR_ME_METEOR_2; this->timer_0BC = RAND_INT(10.0f) + 10; this->timer_0C2 = 30; this->vel.x = arg4; @@ -1413,23 +1446,24 @@ void func_enmy_8006546C(f32 xPos, f32 yPos, f32 zPos, f32 arg3, f32 arg4, f32 ar void func_enmy_800654E4(Object* obj) { f32 temp_fs0; f32 temp_fs1; - s32 var_s1; + s32 i; func_effect_8007D2C8(obj->pos.x, obj->pos.y, obj->pos.z, 12.0f); - for (var_s1 = 0; var_s1 < 4; var_s1++) { + + for (i = 0; i < 4; i++) { func_enmy_8006546C(obj->pos.x, obj->pos.y, obj->pos.z, RAND_FLOAT_CENTERED(40.0f), RAND_FLOAT_CENTERED(40.0f), RAND_FLOAT(-20.0f)); } } -void func_enmy_800655C8(Actor190* this, f32 xPos, f32 yPos, f32 zPos, s32 arg4) { +void func_enmy_800655C8(ActorMissileSeekTeam* this, f32 xPos, f32 yPos, f32 zPos, s32 eventType) { Actor_Initialize(this); this->obj.status = OBJ_INIT; this->obj.id = OBJ_MISSILE_SEEK_TEAM; this->obj.pos.x = xPos; this->obj.pos.y = yPos; this->obj.pos.z = zPos; - this->eventType = arg4; + this->eventType = eventType; this->timer_0BE = 50; if (this->eventType == 1) { this->timer_0BE = 30; @@ -1449,8 +1483,7 @@ void func_enmy_8006566C(f32 xPos, f32 yPos, f32 zPos, s32 arg3) { } } -// Actors 190 & 191 -void Actors190_191_Update(Actor* this) { +void ActorMissileSeek_Update(Actor* this) { s32 i; s32 j; f32 spD4; @@ -1747,7 +1780,7 @@ void Actor_Despawn(Actor* this) { } } -void Actor192_Update(Actor192* this) { +void ActorSkibot_Update(ActorSkibot* this) { this->gravity = 0.4f; if (this->obj.pos.y <= gGroundHeight + 130.0f) { @@ -1815,7 +1848,7 @@ void Actor192_Update(Actor192* this) { } } -void func_enmy_8006684C(Actor192* this) { +void func_enmy_8006684C(ActorSkibot* this) { s32 pad; if (this->timer_0BE != 0) { @@ -1835,13 +1868,13 @@ void func_enmy_8006684C(Actor192* this) { this->obj.rot.x += 11.0f; this->obj.rot.y += 7.0f; if (this->vel.y < -3.0f) { - func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y + 30.0f, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 7.0f, 5); + Effect386_Spawn1(this->obj.pos.x, this->obj.pos.y + 30.0f, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 7.0f, 5); this->timer_0BE = 3; } } } -void Actor193_Update(Actor193* this) { +void ActorRadar_Update(CoRadar* this) { if (this->timer_0BC != 0) { if (this->timer_0BC == 1) { Object_Kill(&this->obj, this->sfxSource); @@ -1850,14 +1883,14 @@ void Actor193_Update(Actor193* this) { this->obj.rot.y += 5.0f; if (this->dmgType != DMG_NONE) { func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y + 130.0f, this->obj.pos.z, 8.0f); - func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y + 130.0f, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 4.0f, 5); + Effect386_Spawn1(this->obj.pos.x, this->obj.pos.y + 130.0f, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 4.0f, 5); this->timer_0BC = 4; Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_OB_EXPLOSION_S); } } } -void Actor180_Update(Actor180* this) { +void MeMolarRock_Update(MeMolarRock* this) { } void func_enmy_80066A8C(CoBuilding9* this) { @@ -2015,7 +2048,7 @@ void Item_SpinPickup(Item* this) { src.y = RAND_FLOAT_CENTERED(120.0f); src.z = 0.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - func_effect_80078E50(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, 3.0f); + Effect_Effect393_Spawn(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, 3.0f); } this->obj.rot.y += this->unk_50; this->obj.rot.y = Math_ModF(this->obj.rot.y, 360.0f); @@ -2092,7 +2125,7 @@ void ActorSupplies_Update(ActorSupplies* this) { D_enmy_800CFEC4[i].z + this->obj.pos.z, D_enmy_800CFF0C[i].y + this->obj.rot.y, D_enmy_800CFF0C[i].x + this->obj.rot.x, RAND_FLOAT_CENTERED(40.0f), RAND_FLOAT(10.0f) + 10.0f, RAND_FLOAT_CENTERED(40.0f)); - func_effect_800794CC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0.6f); + Effect_Effect357_Spawn50(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0.6f); } Object_Kill(&this->obj, this->sfxSource); } @@ -2316,8 +2349,8 @@ void ItemSupplyRing_Update(Item* this) { src.y = this->width * 100.0f; src.z = 0.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - func_effect_80078E50(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, - 3.5f); + Effect_Effect393_Spawn(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, + 3.5f); } break; } @@ -2568,43 +2601,43 @@ void Object_Dying(s32 index, ObjectId objId) { } break; - case OBJ_ACTOR_202: + case OBJ_ACTOR_ME_HOPBOT: func_enmy2_800763A4(&gActors[index]); break; - case OBJ_ACTOR_194: - Actor194_Dying(&gActors[index]); + case OBJ_ACTOR_ME_MORA: + MeMora_Dying(&gActors[index]); break; - case OBJ_ACTOR_186: + case OBJ_ACTOR_ME_LASER_CANNON_1: Meteo_80187B08(&gActors[index]); break; - case OBJ_ACTOR_181: + case OBJ_ACTOR_ME_METEOR_1: Object_Kill(&gActors[index].obj, gActors[index].sfxSource); func_effect_8007D2C8(gActors[index].obj.pos.x, gActors[index].obj.pos.y, gActors[index].obj.pos.z, 20.0f); break; - case OBJ_ACTOR_182: + case OBJ_ACTOR_ME_METEOR_2: Object_Kill(&gActors[index].obj, gActors[index].sfxSource); func_effect_8007D2C8(gActors[index].obj.pos.x, gActors[index].obj.pos.y, gActors[index].obj.pos.z, 10.0f); Actor_Despawn(&gActors[index]); break; - case OBJ_ACTOR_192: + case OBJ_ACTOR_CO_SKIBOT: func_enmy_8006684C(&gActors[index]); break; - case OBJ_BOSS_TI: + case OBJ_BOSS_TI_GORAS: Titania_801990DC(&gBosses[index]); break; - case OBJ_ACTOR_232: - Titania_8018B720(&gActors[index]); + case OBJ_ACTOR_TI_RASCO: + Titania_TiRasco_Dying(&gActors[index]); break; - case OBJ_BOSS_VE1: - Venom1_80198594(&gBosses[index]); + case OBJ_BOSS_VE1_GOLEMECH: + Venom1_Ve1Golemech_Dying(&gBosses[index]); break; } } @@ -2623,7 +2656,7 @@ void Actor_Move(Actor* this) { } var_fv0 = 4000.0f; - if ((this->obj.id == OBJ_ACTOR_236) || (gCurrentLevel == LEVEL_MACBETH) || + if ((this->obj.id == OBJ_ACTOR_ZO_DODORA) || (gCurrentLevel == LEVEL_MACBETH) || ((this->obj.id == OBJ_ACTOR_EVENT) && (this->eventType == EVID_56))) { var_fv0 = 8000.0f; } else if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ENTER_WARP_ZONE) { @@ -2637,27 +2670,27 @@ void Actor_Move(Actor* this) { Object_Kill(&this->obj, this->sfxSource); switch (this->obj.id) { - case OBJ_ACTOR_236: - gZOSnakeWaypointCount = 0; + case OBJ_ACTOR_ZO_DODORA: + gZoDodoraWaypointCount = 0; break; - case OBJ_ACTOR_229: + case OBJ_ACTOR_TI_DESERT_CRAWLER: Titania_8018E3B0(this); break; - case OBJ_ACTOR_194: - gActor194Status[this->unk_046] = 0; + case OBJ_ACTOR_ME_MORA: + gMeMoraStatus[this->unk_046] = 0; break; case OBJ_ACTOR_EVENT: if ((this->eventType >= EVID_200) && (this->eventType < EVID_300)) { - gActor194Status[this->unk_046] = 0; + gMeMoraStatus[this->unk_046] = 0; } else if ((this->eventType == EVID_SX_WARP_GATE) && (this->unk_046 != 2)) { gRingPassCount = -1; } break; - case OBJ_ACTOR_252: + case OBJ_ACTOR_ZO_RADARBUOY: gMissedZoSearchlight = true; break; } @@ -2791,7 +2824,7 @@ void Actor_Update(Actor* this) { case OBJ_INIT: this->obj.status = OBJ_ACTIVE; Object_Init(this->index, this->obj.id); - if (this->obj.id != OBJ_ACTOR_252) { + if (this->obj.id != OBJ_ACTOR_ZO_RADARBUOY) { Actor_Move(this); } break; @@ -3046,7 +3079,7 @@ void Object_Update(void) { } } else if (gVersusMode) { for (i = 0, scenery360 = gScenery360; i < 200; i++, scenery360++) { - if ((scenery360->obj.status != OBJ_FREE) && (scenery360->obj.id == OBJ_SCENERY_146)) { + if ((scenery360->obj.status != OBJ_FREE) && (scenery360->obj.id == OBJ_SCENERY_VS_SPACE_JUNK_3)) { if ((i % 2) != 0) { scenery360->obj.rot.y += 0.5f; } else { diff --git a/src/engine/fox_enmy2.c b/src/engine/fox_enmy2.c index f647430c..ee920c7e 100644 --- a/src/engine/fox_enmy2.c +++ b/src/engine/fox_enmy2.c @@ -70,9 +70,11 @@ void func_enmy2_8006A900(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { } void Actor237_Update(Actor237* this) { + /* Unimplemented */ } void Actor237_Draw(Actor237* this) { + /* Unimplemented */ } void Obj54_8006A984(Effect* this, f32 xPos, f32 yPos, f32 zPos) { @@ -120,17 +122,18 @@ void CoWaterfall_Update(CoWaterfall* this) { } } -bool Actor201_8006ABA4(Actor201* this) { +bool MeteoBall_IsCloseToPlayer(MeteoBall* this) { if ((fabsf(this->obj.pos.x - gPlayer[0].pos.x) < 700.0f) && (fabsf(this->obj.pos.y - gPlayer[0].pos.y) < 700.0f)) { return true; } return false; } -void Actor201_Update(Actor201* this) { +// Unused Meteo Ball +void MeteoBall_Update(MeteoBall* this) { f32 sp2C; - if (Actor201_8006ABA4(this) && (this->timer_0BC == 0)) { + if (MeteoBall_IsCloseToPlayer(this) && (this->timer_0BC == 0)) { Effect_EnemyLaser(OBJ_EFFECT_ENEMY_LASER_1, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, gEnemyShotSpeed); this->timer_0BC = 20; } @@ -141,7 +144,7 @@ void Actor201_Update(Actor201* this) { sqrtf(SQ(gPlayer[0].cam.eye.z - sp2C) + SQ(gPlayer[0].cam.eye.x - this->obj.pos.x)))); } -void Actor202_Update(Actor202* this) { +void ActorHopBot_Update(ActorHopBot* this) { bool sp34; this->gravity = 1.5f; @@ -213,8 +216,8 @@ void Actor202_Update(Actor202* this) { this->health -= 10; if ((this->health <= 0) || (this->dmgType >= DMG_EXPLOSION)) { func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y + 180.0f, this->obj.pos.z, 10.0f); - func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y + 180.0f, this->obj.pos.z, this->vel.x, this->vel.y, - this->vel.z, 8.0f, 30); + Effect386_Spawn1(this->obj.pos.x, this->obj.pos.y + 180.0f, this->obj.pos.z, this->vel.x, this->vel.y, + this->vel.z, 8.0f, 30); Object_Kill(&this->obj, this->sfxSource); Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); gHitCount += this->info.bonus; @@ -223,12 +226,12 @@ void Actor202_Update(Actor202* this) { this->dmgType = DMG_NONE; this->timer_0C6 = 20; AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, this->sfxSource, 4); - func_effect_8007D1E0(this->obj.pos.x, this->obj.pos.y + 180.0f, this->obj.pos.z, 5.0f); + Effect_Effect341_Spawn(this->obj.pos.x, this->obj.pos.y + 180.0f, this->obj.pos.z, 5.0f); } } } -void Actor194_Update(Actor194* this) { +void MeMora_Update(MeMora* this) { } static s16 D_800CFF94[16] = { @@ -240,9 +243,9 @@ static f32 D_800CFFC4[16] = { }; static Gfx* D_800D0004[3] = { D_ENMY_SPACE_4000170, D_ENMY_SPACE_40084D0, D_ENMY_SPACE_400A630 }; -void Actor194_Dying(Actor194* this) { +void MeMora_Dying(MeMora* this) { Vec3f sp34; - s32 temp_hi; + s32 index; this->counter_04E++; @@ -250,12 +253,12 @@ void Actor194_Dying(Actor194* this) { this->counter_04E = 0; } - gActor194xPos[this->unk_046][this->counter_04E] = this->obj.pos.x; - gActor194yPos[this->unk_046][this->counter_04E] = this->obj.pos.y; - gActor194zPos[this->unk_046][this->counter_04E] = this->obj.pos.z; - gActor194xRot[this->unk_046][this->counter_04E] = this->obj.rot.x; - gActor194yRot[this->unk_046][this->counter_04E] = this->obj.rot.y; - gActor194zRot[this->unk_046][this->counter_04E] = this->obj.rot.z; + gMeMoraXpos[this->unk_046][this->counter_04E] = this->obj.pos.x; + gMeMoraYpos[this->unk_046][this->counter_04E] = this->obj.pos.y; + gMeMoraZpos[this->unk_046][this->counter_04E] = this->obj.pos.z; + gMeMoraXrot[this->unk_046][this->counter_04E] = this->obj.rot.x; + gMeMoraYrot[this->unk_046][this->counter_04E] = this->obj.rot.y; + gMeMoraZrot[this->unk_046][this->counter_04E] = this->obj.rot.z; this->obj.rot.x -= 10.0f; this->obj.rot.y += 3.0f; @@ -268,13 +271,13 @@ void Actor194_Dying(Actor194* this) { this->vel.z = sp34.z; if ((this->timer_0BC == 0) && ((gGameFrameCount % 4) == 0)) { - temp_hi = (D_800CFF94[this->unk_04A] + this->counter_04E) % 100; + index = (D_800CFF94[this->unk_04A] + this->counter_04E) % 100; if (this->unk_04A == 0) { - func_effect_8007D2C8(gActor194xPos[this->unk_046][temp_hi], gActor194yPos[this->unk_046][temp_hi], - gActor194zPos[this->unk_046][temp_hi], 7.0f); + func_effect_8007D2C8(gMeMoraXpos[this->unk_046][index], gMeMoraYpos[this->unk_046][index], + gMeMoraZpos[this->unk_046][index], 7.0f); } else { - func_effect_8007D2C8(gActor194xPos[this->unk_046][temp_hi], gActor194yPos[this->unk_046][temp_hi], - gActor194zPos[this->unk_046][temp_hi], 4.0f); + func_effect_8007D2C8(gMeMoraXpos[this->unk_046][index], gMeMoraYpos[this->unk_046][index], + gMeMoraZpos[this->unk_046][index], 4.0f); } AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, this->sfxSource, 4); @@ -282,15 +285,15 @@ void Actor194_Dying(Actor194* this) { if (this->unk_04A > 15) { Object_Kill(&this->obj, this->sfxSource); - gActor194Status[this->unk_046] = 0; + gMeMoraStatus[this->unk_046] = 0; gHitCount += this->info.bonus; D_ctx_80177850 = 15; } } } -void Actor194_8006B46C(Actor194* this, f32 xTrans, f32 yTrans, f32 zTrans, f32 xRot, f32 yRot, f32 zRot, u8 arg7, - f32 scale, s32 arg9) { +void MeMora_8006B46C(MeMora* 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); @@ -328,16 +331,15 @@ void Actor194_8006B46C(Actor194* this, f32 xTrans, f32 yTrans, f32 zTrans, f32 x RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } -void Actor194_Draw(Actor194* this) { - s16 var_s0; - s16 temp_hi; +void MeMora_Draw(MeMora* this) { + s16 i; + s16 j; - for (var_s0 = this->unk_04A; var_s0 < 16; var_s0++) { - temp_hi = (D_800CFF94[var_s0] + this->counter_04E) % 100; - 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); + for (i = this->unk_04A; i < ARRAY_COUNT(D_800CFF94); i++) { + j = (D_800CFF94[i] + this->counter_04E) % 100; + MeMora_8006B46C(this, gMeMoraXpos[this->unk_046][j], gMeMoraYpos[this->unk_046][j], + gMeMoraZpos[this->unk_046][j], gMeMoraXrot[this->unk_046][j], gMeMoraYrot[this->unk_046][j], + gMeMoraZrot[this->unk_046][j], D_800CFFB4[i], D_800CFFC4[i], this->timer_0C6 % 2U); } } @@ -394,7 +396,7 @@ void func_enmy2_8006BB1C(f32 xPos, f32 yPos, f32 zPos) { } } -void Actor196_Update(Actor196* this) { +void ActorMoleMissile_Update(ActorMoleMissile* this) { Vec3f sp44; switch (this->state) { @@ -481,7 +483,7 @@ void Actor196_Update(Actor196* this) { } if ((this->dmgType != DMG_NONE) && (this->animFrame != 0)) { - func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0.0f, this->vel.y, 0.0f, 3.0f, 5); + Effect386_Spawn1(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0.0f, this->vel.y, 0.0f, 3.0f, 5); Object_Kill(&this->obj, this->sfxSource); this->itemDrop = DROP_SILVER_RING; Actor_Despawn(this); @@ -489,8 +491,8 @@ void Actor196_Update(Actor196* this) { this->dmgType = DMG_NONE; } -static f32 D_800D001C[5] = { 0.0f, 30.0f, 60.0f, -60.0f, -30.0f }; // could be in-function void func_enmy2_8006BF7C(f32 xPos, f32 yPos, f32 zPos) { + static f32 D_800D001C[5] = { 0.0f, 30.0f, 60.0f, -60.0f, -30.0f }; s32 i; for (i = 0; i < ARRAY_COUNT(D_800D001C); i++) { @@ -664,7 +666,7 @@ void ActorDebris_Update(ActorDebris* this) { if (((this->timer_0BC == 0) || (Object_CheckCollision(this->index, &this->obj.pos, &D_800D0030, 1) != 0) || (this->obj.pos.y < (gGroundHeight + 10.0f))) && (this->timer_0BE == 0)) { - func_effect_8007B8F8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 50.0f, this->scale * 10.0f); + Effect_Effect364_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 50.0f, this->scale * 10.0f); Object_Kill(&this->obj, this->sfxSource); Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); } @@ -675,7 +677,7 @@ void ActorDebris_Update(ActorDebris* this) { if (((this->timer_0BC == 0) || (Object_CheckCollision(this->index, &this->obj.pos, &D_800D0030, 1) != 0) || (this->obj.pos.y < (gGroundHeight + 10.0f))) && (this->timer_0BE == 0)) { - func_effect_8007B8F8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 50.0f, this->scale * 10.0f); + Effect_Effect364_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 50.0f, this->scale * 10.0f); Object_Kill(&this->obj, this->sfxSource); Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); } @@ -696,7 +698,7 @@ void ActorDebris_Update(ActorDebris* this) { if (((this->timer_0BC == 0) || (Object_CheckCollision(this->index, &this->obj.pos, &D_800D0030, 1) != 0) || (this->obj.pos.y < (gGroundHeight + 10.0f))) && (this->timer_0BE == 0)) { - func_effect_8007B8F8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 50.0f, this->scale * 10.0f); + Effect_Effect364_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 50.0f, this->scale * 10.0f); Object_Kill(&this->obj, this->sfxSource); Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); } @@ -706,8 +708,8 @@ void ActorDebris_Update(ActorDebris* this) { if (((this->timer_0BC == 0) || (Object_CheckCollision(this->index, &this->obj.pos, &D_800D0030, 1) != 0) || (this->obj.pos.y < (gGroundHeight + 10.0f))) && (this->timer_0BE == 0)) { - func_effect_8007B8F8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 70.0f, this->scale * 20.0f); - func_effect_8007B8F8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 70.0f, this->scale * 20.0f); + Effect_Effect364_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 70.0f, this->scale * 20.0f); + Effect_Effect364_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 70.0f, this->scale * 20.0f); Object_Kill(&this->obj, this->sfxSource); Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); } @@ -792,7 +794,7 @@ void ActorDebris_Update(ActorDebris* this) { Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); } if (Play_CheckDynaFloorCollision(&sp44, &sp40, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z)) { - func_effect_8007B228(this->obj.pos.x, sp44, this->obj.pos.z, 2.0f); + Effect_Effect381_Spawn(this->obj.pos.x, sp44, this->obj.pos.z, 2.0f); Object_Kill(&this->obj, this->sfxSource); } } else if (this->state >= 10) { @@ -803,8 +805,8 @@ void ActorDebris_Update(ActorDebris* this) { (Object_CheckCollision(this->index, &this->obj.pos, &D_800D0030, 1) != 0) || (this->obj.pos.y < (gGroundHeight + 10.0f))) && (this->timer_0BE == 0)) { - func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, - this->vel.z, this->scale * 1.5f, 4); + Effect386_Spawn1(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, + this->vel.z, this->scale * 1.5f, 4); Object_Kill(&this->obj, this->sfxSource); Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); } @@ -831,12 +833,12 @@ void ActorDebris_Update(ActorDebris* this) { if ((this->state != 2) && (this->state != 4)) { func_enmy2_8006BF7C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z); } else if (gCurrentLevel == LEVEL_FORTUNA) { - func_effect_8007BC7C(RAND_FLOAT_CENTERED(10.0f) + this->obj.pos.x, this->obj.pos.y, - this->obj.pos.z, 1.0f); - func_effect_8007BC7C(RAND_FLOAT_CENTERED(10.0f) + this->obj.pos.x, this->obj.pos.y, - this->obj.pos.z, 1.0f); - func_effect_8007BC7C(RAND_FLOAT_CENTERED(10.0f) + this->obj.pos.x, this->obj.pos.y, - this->obj.pos.z, 1.0f); + Effect_Effect362_Spawn(RAND_FLOAT_CENTERED(10.0f) + this->obj.pos.x, this->obj.pos.y, + this->obj.pos.z, 1.0f); + Effect_Effect362_Spawn(RAND_FLOAT_CENTERED(10.0f) + this->obj.pos.x, this->obj.pos.y, + this->obj.pos.z, 1.0f); + Effect_Effect362_Spawn(RAND_FLOAT_CENTERED(10.0f) + this->obj.pos.x, this->obj.pos.y, + this->obj.pos.z, 1.0f); } } @@ -909,7 +911,7 @@ void func_enmy2_8006D0F4(Actor* this) { } } -void MeteoTunnel_Update(MeteoTunnel* this) { +void MeteoTunnel_Update(MeTunnel* this) { this->obj.rot.z += 1.0f; } @@ -952,7 +954,7 @@ static EventActorInfo sEventActorInfo[108] = { /* 10 */ { D_ENMY_SPACE_400BD20, gCubeHitbox200, 2.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, /* 11 */ { D_ENMY_SPACE_4001310, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ALIEN_FLY, 0, 1.0f, 1 }, /* 12 */ { D_ENMY_SPACE_400B390, gCubeHitbox100, 2.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, - /* 13 */ { D_ME_6018C00, gCubeHitbox100, 2.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* 13 */ { aMeMeteor1DL, gCubeHitbox100, 2.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, /* 14 */ { D_ME_601F2A0, gCubeHitbox400, 7.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, /* 15 */ { D_ENMY_SPACE_400AAE0, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, /* 16 */ { D_ENMY_SPACE_4000650, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ALIEN_FLY, 0, 1.0f, 1 }, @@ -980,23 +982,23 @@ static EventActorInfo sEventActorInfo[108] = { /* 38 */ { NULL, D_SX_603238C, 1.0f, 500.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, /* 39 */ { D_SX_6020D20, D_SX_60328CC, -1.0f, 2100.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, /* 40 */ { NULL, gNoHitbox, 1.0f, 100.0f, 3001.0f, 2, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 41 */ { D_SY_60097E0, D_SY_6034478, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 42 */ { D_SY_601D730, D_SY_603450C, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 41 */ { aSyShip1DL, aSyShip1Hitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 42 */ { aSyShip2DL, aSyShip2Hitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, /* 43 */ { NULL, gCubeHitbox100, 1.0f, 20000.0f, 3000.0f, 1, 0, EISFX_ARWING_ENGINE_FG, 0, 0.0f, 0 }, - /* 44 */ { D_SY_60102C0, D_SY_6034588, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 44 */ { aSyShip3DL, aSyShip3Hitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, /* 45 */ { D_ME_6017B60, gCubeHitbox200, -1.0f, 300.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 1.0f, 1 }, /* 46 */ { D_ZO_6004D00, gCubeHitbox200, 1.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_SHIP_ENGINE_S, 0, 1.0f, 1 }, /* 47 */ { D_ME_601A880, gCubeHitbox100, -1.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 48 */ { NULL, D_SY_603405C, 0.3f, 100.0f, 3000.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, - /* 49 */ { NULL, D_SY_603405C, 0.3f, 100.0f, 3000.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, - /* 50 */ { NULL, D_SY_603405C, 0.3f, 100.0f, 3000.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* 48 */ { NULL, aSyRobotHitbox, 0.3f, 100.0f, 3000.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* 49 */ { NULL, aSyRobotHitbox, 0.3f, 100.0f, 3000.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* 50 */ { NULL, aSyRobotHitbox, 0.3f, 100.0f, 3000.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, /* 51 */ { D_SY_6015D60, D_SY_6034124, 2.0f, 100.0f, 3000.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, /* 52 */ { NULL, D_ZO_602C1A0, -1.0f, 1000.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, /* 53 */ { D_SX_600B540, D_SX_60328E8, -1.0f, 2100.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, /* 54 */ { D_ENMY_SPACE_4000EC0, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, /* 55 */ { D_ENMY_SPACE_4008D50, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, /* 56 */ { NULL, gNoHitbox, -1.0f, 2000.0f, 3000.0f, 0, 0, EISFX_GREATFOX_ENGINE, 0, 0.0f, 1 }, - /* 57 */ { D_SY_60102C0, gNoHitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 57 */ { aSyShip3DL, gNoHitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, /* 58 */ { D_SY_601F3D0, gNoHitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, /* 59 */ { D_SY_6022B10, gNoHitbox, 2.0f, 100.0f, 3000.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, /* 60 */ { D_SY_60209F0, gNoHitbox, 2.0f, 100.0f, 3000.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, @@ -1008,17 +1010,18 @@ static EventActorInfo sEventActorInfo[108] = { /* 66 */ { D_ME_600BD40, gCubeHitbox100, -1.0f, 100.0f, 8000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, /* 67 */ { NULL, D_ME_602F604, 3.0f, 100.0f, 3000.0f, 2, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, /* 68 */ { D_SY_60205D0, D_SY_603445C, 3.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 1.0f, 1 }, - /* 69 */ { D_SY_60036A0, D_SY_6034664, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 69 */ { aSyShip3DestroyedDL, aSyShip3DestroyedHitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, /* 70 */ { D_SY_601AD70, gNoHitbox, 4.0f, 100.0f, 3000.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, /* 71 */ { aArwingItemLasersDL, gNoHitbox, 1.0f, 100.0f, 3000.0f, 2, 0, EISFX_OB_WING, 0, 0.0f, 1 }, - /* 72 */ { D_SY_60034D0, D_SY_60347D4, 3.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 73 */ { D_SY_6005360, D_SY_6034770, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 74 */ { D_SY_600F6C0, D_SY_60347F0, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 75 */ { D_SY_601B610, gNoHitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, - /* 76 */ { D_SY_601C6A0, gNoHitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, - /* 77 */ { D_SY_60188D0, D_SY_603486C, 3.0f, 100.0f, 3001.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, + /* 72 */ { aSyShipWindowsDL, aSyShipWindowsHitbox, 3.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 73 */ { aSyShip4DL, aSyShip4Hitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 74 */ { aSyShip4DestroyedDL, aSyShip4DestroyedHitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 75 */ { aSyShip2SpriteDL, gNoHitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, + /* 76 */ { aSyShip3SpriteDL, gNoHitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, + /* 77 */ + { aSyShipProjectileDL, aSyShipProjectileHitbox, 3.0f, 100.0f, 3001.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, /* 78 */ { NULL, gCubeHitbox150, 1.0f, 100.0f, 3000.0f, 2, 0, EISFX_NONE, 0, 1.0f, 0 }, - /* 79 */ { NULL, D_ZO_602C294, 1.0f, 100.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 1.0f, 1 }, + /* 79 */ { NULL, aZoBirdHitbox, 1.0f, 100.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 1.0f, 1 }, /* 80 */ { NULL, D_VE1_601B474, -1.0f, 100.0f, 3000.0f, 2, 0, EISFX_NONE, 0, 0.0f, 1 }, /* 81 */ { NULL, gNoHitbox, -1.0f, 100.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, /* 82 */ { NULL, gCubeHitbox100, 2.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, @@ -1030,14 +1033,14 @@ static EventActorInfo sEventActorInfo[108] = { /* 88 */ { NULL, D_AQ_6030B30, 1.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 1.0f, 1 }, /* 89 */ { NULL, D_AQ_6030B14_f32, 1.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 1.0f, 1 }, /* 90 */ { D_MA_601C520, D_MA_60368FC, 1.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 91 */ { D_MA_600AF40, D_MA_60368E0, -1.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 91 */ { aMaGuillotineDL, aMaGuillotineHitbox, -1.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, /* 92 */ { D_WZ_7000C40, gWarpZoneEvent92Hitbox, -1.0f, 2100.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, /* 93 */ { D_WZ_70010E0, gWarpZoneEvent93Hitbox, -1.0f, 2100.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, /* 94 */ { D_WZ_7000E80, gWarpZoneEvent94Hitbox, 2.5f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 1.0f, 1 }, /* 95 */ { D_WZ_70008F0, gCubeHitbox100, -1.0f, 100.0f, 8000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 0 }, /* 96 */ { D_WZ_7000280, gWarpZoneEvent96Hitbox, -1.0f, 1000.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 0 }, /* 97 */ { D_ME_600AC70, gCubeHitbox100, -1.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 98 */ { D_MA_601A2B0, D_MA_60364C0, 1.0f, 100.0f, 3000.0f, 1, 1, EISFX_NONE, 0, 0.0f, 1 }, + /* 98 */ { D_MA_601A2B0, aMaBoulderHitbox, 1.0f, 100.0f, 3000.0f, 1, 1, EISFX_NONE, 0, 0.0f, 1 }, /* 99 */ { D_VE1_6002500, D_VE1_601B944, -1.0f, 100.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, /* 100 */ { D_VE1_60043F0, gNoHitbox, -1.0f, 100.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, /* 101 */ { D_VE1_6004310, gNoHitbox, -1.0f, 100.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, @@ -1046,7 +1049,7 @@ static EventActorInfo sEventActorInfo[108] = { /* 104 */ { NULL, gNoHitbox, -1.0f, 500.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 0.0f, 0 }, /* 105 */ { NULL, gCubeHitbox200, 1.0f, 100.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 1.0f, 1 }, /* 106 */ { NULL, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 0, 0, EISFX_EN_ALIEN_FLY, 0, 0.0f, 0 }, - /* 107 */ { D_MA_6002890, D_MA_60368E0, -1.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* 107 */ { D_MA_6002890, aMaGuillotineHitbox, -1.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, }; static Color_RGBA32 sEventTexLineColors[6] = { @@ -1148,12 +1151,12 @@ void ActorEvent_ProcessScript(ActorEvent* this) { this->info.targetOffset = 1.0f; for (i = 0; i < 2; i++) { - if (gActor194Status[i] == 0) { - gActor194Status[i] = 1; + if (gMeMoraStatus[i] == 0) { + gMeMoraStatus[i] = 1; this->unk_046 = i; for (j = 0; j < 100; j++) { - gActor194yPos[i][j] = this->obj.pos.y; - gActor194zPos[i][j] = this->obj.pos.z; + gMeMoraYpos[i][j] = this->obj.pos.y; + gMeMoraZpos[i][j] = this->obj.pos.z; } if (this->eventType == EVID_200) { AUDIO_PLAY_SFX(NA_SE_EN_SPACE_SNAKE, this->sfxSource, 4); @@ -1658,7 +1661,7 @@ void ActorEvent_SpawnEffect374(f32 xPos, f32 yPos, f32 zPos) { void ActorEvent_SetupTIMine(Actor* actor, f32 xPos, f32 yPos, f32 zPos) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_225; + actor->obj.id = OBJ_ACTOR_TI_LANDMINE; actor->obj.pos.x = xPos; actor->obj.pos.y = yPos; @@ -1941,8 +1944,8 @@ void ActorEvent_ProcessActions(ActorEvent* this) { break; case EVACT_11: - func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, - this->vel.z, this->scale * 3.0f, 15); + Effect386_Spawn1(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, + this->vel.z, this->scale * 3.0f, 15); Actor_Despawn(this); Object_Kill(&this->obj, this->sfxSource); Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_M); @@ -2043,8 +2046,8 @@ void ActorEvent_8006FEEC(ActorEvent* this) { if (this->health <= 0) { for (i = 3; i < 11; i++) { - Zoness_SpawnDebris(&this->vwork[i], &this->vwork[i + 11], RAND_FLOAT_CENTERED(20.0f), - RAND_FLOAT(-10.0f), RAND_FLOAT(10.0f), 41, this->scale, 200, i); + Zoness_ActorDebris_Spawn(&this->vwork[i], &this->vwork[i + 11], RAND_FLOAT_CENTERED(20.0f), + RAND_FLOAT(-10.0f), RAND_FLOAT(10.0f), 41, this->scale, 200, i); } this->itemDrop = DROP_NONE; Actor_Despawn(this); @@ -2189,7 +2192,7 @@ void ActorEvent_800701E0(ActorEvent* this) { break; case EVID_61: - Meteo_8018CCF8(this); + Meteo_Effect346_Spawn(this); break; case EVID_27: @@ -2218,7 +2221,7 @@ void ActorEvent_800701E0(ActorEvent* this) { if (this->eventType == EVID_82) { AUDIO_PLAY_SFX(NA_SE_OB_SMOKE, this->sfxSource, 0); this->dmgType = DMG_BEAM; - func_effect_8007C688(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 3.0f, 60); + Effect_Effect387_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 3.0f, 60); } } else { this->timer_0C6 = 20; @@ -2292,12 +2295,12 @@ void ActorEvent_800701E0(ActorEvent* this) { this->obj.pos.z -= this->vel.z; this->dmgType = DMG_BEAM; if (this->eventType == EVID_13) { - this->obj.id = OBJ_ACTOR_182; + this->obj.id = OBJ_ACTOR_ME_METEOR_2; func_enmy_800654E4(&this->obj); } if (this->eventType == EVID_61) { - Meteo_8018CCF8(this); + Meteo_Effect346_Spawn(this); } } } @@ -2308,8 +2311,8 @@ void ActorEvent_80070BA8(ActorEvent* this) { this->dmgType = DMG_NONE; if ((this->eventType != EVID_17) || ((this->eventType == EVID_17) && (this->dmgPart == 0))) { this->timer_0C6 = 10; - func_effect_8007C120(this->hitPos.x, this->hitPos.y, this->hitPos.z, this->vel.x, this->vel.y, this->vel.z, - 0.2f, 10); + Effect_Effect390_Spawn(this->hitPos.x, this->hitPos.y, this->hitPos.z, this->vel.x, this->vel.y, + this->vel.z, 0.2f, 10); this->health -= this->damage; AUDIO_PLAY_SFX(NA_SE_EN_SPARK_DAMAGE_M, this->sfxSource, 4); if (this->health <= 0) { @@ -2871,13 +2874,13 @@ void ActorEvent_80071DC0(ActorEvent* this) { } if (((gGameFrameCount % 2) == 0)) { - func_effect_8007C120(this->obj.pos.x + sp38.x, this->obj.pos.y + sp38.y, this->obj.pos.z + sp38.z, this->vel.x, - this->vel.y, this->vel.z, 0.3f, 20); + Effect_Effect390_Spawn(this->obj.pos.x + sp38.x, this->obj.pos.y + sp38.y, this->obj.pos.z + sp38.z, + this->vel.x, this->vel.y, this->vel.z, 0.3f, 20); } if (((gGameFrameCount % 8) == 0)) { - func_effect_8007BFFC(this->obj.pos.x + sp38.x, this->obj.pos.y + sp38.y, this->obj.pos.z + sp38.z, this->vel.x, - this->vel.y, this->vel.z, 10.0f, 9); + Effect386_Spawn1(this->obj.pos.x + sp38.x, this->obj.pos.y + sp38.y, this->obj.pos.z + sp38.z, this->vel.x, + this->vel.y, this->vel.z, 10.0f, 9); } if (((gGameFrameCount % 16) == 0)) { @@ -3033,9 +3036,9 @@ void ActorEvent_Update(ActorEvent* this) { if (this->state == EVSTATE_1000) { this->obj.rot.y += this->fwork[15]; this->obj.rot.x += this->fwork[16]; - if (((gGameFrameCount % 16) == 0)) { - func_effect_8007C120(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, - this->vel.z, 0.3f, 10); + if ((gGameFrameCount % 16) == 0) { + Effect_Effect390_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, + this->vel.z, 0.3f, 10); } return; } @@ -3054,12 +3057,12 @@ void ActorEvent_Update(ActorEvent* this) { this->counter_04E = 0; } - gActor194xPos[this->unk_046][this->counter_04E] = this->obj.pos.x; - gActor194yPos[this->unk_046][this->counter_04E] = this->obj.pos.y; - gActor194zPos[this->unk_046][this->counter_04E] = this->obj.pos.z; - gActor194xRot[this->unk_046][this->counter_04E] = this->obj.rot.x; - gActor194yRot[this->unk_046][this->counter_04E] = this->obj.rot.y; - gActor194zRot[this->unk_046][this->counter_04E] = this->obj.rot.z; + gMeMoraXpos[this->unk_046][this->counter_04E] = this->obj.pos.x; + gMeMoraYpos[this->unk_046][this->counter_04E] = this->obj.pos.y; + gMeMoraZpos[this->unk_046][this->counter_04E] = this->obj.pos.z; + gMeMoraXrot[this->unk_046][this->counter_04E] = this->obj.rot.x; + gMeMoraYrot[this->unk_046][this->counter_04E] = this->obj.rot.y; + gMeMoraZrot[this->unk_046][this->counter_04E] = this->obj.rot.z; if (this->dmgType != DMG_NONE) { this->dmgType = DMG_NONE; @@ -3074,7 +3077,7 @@ void ActorEvent_Update(ActorEvent* this) { func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 8.0f); this->obj.status = OBJ_DYING; this->timer_0BC = 20; - this->obj.id = OBJ_ACTOR_194; + this->obj.id = OBJ_ACTOR_ME_MORA; } } } @@ -3484,7 +3487,7 @@ void ActorEvent_Update(ActorEvent* this) { case EVID_94: case EVID_95: case EVID_96: - if (((gGameFrameCount % 8) == 0)) { + if ((gGameFrameCount % 8) == 0) { this->fwork[18] = RAND_FLOAT(255.0f); this->fwork[19] = RAND_FLOAT(255.0f); this->fwork[20] = RAND_FLOAT(255.0f); @@ -3561,7 +3564,7 @@ void ActorEvent_Update(ActorEvent* this) { case EVID_48: case EVID_49: case EVID_50: - SectorY_Actor204_Update(this); + SectorY_SyRobot_Update(this); break; case EVID_52: @@ -3598,7 +3601,7 @@ void ActorEvent_Update(ActorEvent* this) { if ((this->obj.pos.y + sp90.y) > -30.0f) { for (sp74 = 0; sp74 < 7; sp74++) { - effect = func_effect_8007783C(OBJ_EFFECT_394); + effect = Effect_Load(OBJ_EFFECT_394); if (effect != NULL) { effect->unk_78 = effect->unk_7A = 12; @@ -3630,7 +3633,7 @@ void ActorEvent_Update(ActorEvent* this) { } if ((fabsf(this->fwork[0]) > 10.0f) && ((gGameFrameCount % 2) == 0)) { - effect = func_effect_8007783C(OBJ_EFFECT_394); + effect = Effect_Load(OBJ_EFFECT_394); if (effect != NULL) { Matrix_RotateZ(gCalcMatrix, this->rot_0F4.z * M_DTOR, MTXF_NEW); Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_800D1290, &sp90); @@ -3661,7 +3664,7 @@ void ActorEvent_Update(ActorEvent* this) { } if (((gGameFrameCount % 4) == 0)) { - effect = func_effect_8007783C(OBJ_EFFECT_394); + effect = Effect_Load(OBJ_EFFECT_394); if (effect != NULL) { effect->unk_78 = effect->unk_7A = 11; effect->obj.status = OBJ_ACTIVE; @@ -3724,7 +3727,7 @@ void ActorEvent_Update(ActorEvent* this) { } if ((this->animFrame >= 18) && (this->animFrame < 24)) { - func_effect_8007BC7C(this->obj.pos.x, this->obj.pos.y + 80.0f, this->obj.pos.z + 60.0f, 20.0f); + Effect_Effect362_Spawn(this->obj.pos.x, this->obj.pos.y + 80.0f, this->obj.pos.z + 60.0f, 20.0f); } if (this->animFrame < 49) { @@ -3733,9 +3736,9 @@ void ActorEvent_Update(ActorEvent* this) { this->animFrame = 49; } if ((gGameFrameCount % 2) != 0) { - Aquas_801AC8A8(RAND_FLOAT_CENTERED(100.0f) + this->obj.pos.x, - RAND_FLOAT(50.0f) + this->obj.pos.y, - RAND_FLOAT_CENTERED(100.0f) + this->obj.pos.z, 1.0f, 0); + Aquas_Effect366_Spawn(RAND_FLOAT_CENTERED(100.0f) + this->obj.pos.x, + RAND_FLOAT(50.0f) + this->obj.pos.y, + RAND_FLOAT_CENTERED(100.0f) + this->obj.pos.z, 1.0f, 0); } } this->timer_0C2 = 10000; @@ -3843,7 +3846,7 @@ bool ActorEvent_OverrideLimbDraw3(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* return false; } -s32 Scenery111_Draw(Scenery_111* this) { +s32 Scenery111_Draw(SyShipDebris* this) { RCP_SetupDL(&gMasterDisp, SETUPDL_60); gSPDisplayList(gMasterDisp++, D_SY_601AD70); RCP_SetupDL(&gMasterDisp, SETUPDL_64); @@ -3862,8 +3865,8 @@ void ActorEvent_Draw(ActorEvent* this) { (this->eventType != EVID_62) && (this->eventType != EVID_AQ_CLAM) && (this->eventType != EVID_98) && (this->scale > 0.5f) && (this->timer_0C6 >= 9) && ((this->timer_0C6 & 3) == 0) && (gPlayState != PLAY_PAUSE)) { - func_effect_8007C120(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, - this->vel.z, this->scale * 0.07f, 3); + Effect_Effect390_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, + this->vel.z, this->scale * 0.07f, 3); } if ((this->eventType != EVID_A6_MISSILE) && (this->eventType != EVID_23) && (this->eventType != EVID_79) && @@ -4063,7 +4066,7 @@ void ActorEvent_Draw(ActorEvent* this) { case EVID_48: case EVID_49: case EVID_50: - SectorY_Actor204_Draw(this); + SectorY_SyRobot_Draw(this); break; case EVID_52: @@ -4104,7 +4107,7 @@ void ActorEvent_Draw(ActorEvent* this) { case EVID_79: temp_s0 = this->state; this->state = 2; // actor 235 state - Zoness_Actor235_Draw(this); + Zoness_ZoBird_Draw(this); this->state = temp_s0; break; @@ -4131,8 +4134,8 @@ void ActorEvent_Draw(ActorEvent* this) { case EVID_AQ_CLAM: Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 3.0f, MTXF_APPLY); - Animation_GetFrameData(&D_AQ_602201C, this->animFrame, sp114); - Animation_DrawSkeleton(1, D_AQ_60220E8, sp114, NULL, NULL, this, &gIdentityMatrix); + Animation_GetFrameData(&aAqOysterAnim, this->animFrame, sp114); + Animation_DrawSkeleton(1, aAqOysterSkel, sp114, NULL, NULL, this, &gIdentityMatrix); break; case EVID_BILL: @@ -4260,9 +4263,9 @@ void func_enmy2_800763A4(Actor* actor) { if (gUseDynaFloor && Play_CheckDynaFloorCollision(&sp58, &sp5C, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z)) { - func_effect_8007BFFC(actor->obj.pos.x, sp58 + 20.0f, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, - actor->scale * 3.0f, 5); - func_effect_8007B228(actor->obj.pos.x, sp58, actor->obj.pos.z, 2.0f); + Effect386_Spawn1(actor->obj.pos.x, sp58 + 20.0f, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, actor->scale * 3.0f, + 5); + Effect_Effect381_Spawn(actor->obj.pos.x, sp58, actor->obj.pos.z, 2.0f); actor->timer_0BE = 2; Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); return; @@ -4271,8 +4274,8 @@ void func_enmy2_800763A4(Actor* actor) { if (gGroundType == 4) { if (Ground_801B6AEC(actor->obj.pos.x, actor->obj.pos.y - 10.0f, actor->obj.pos.z + gPathProgress) != 0) { func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y + 20.0f, actor->obj.pos.z, actor->scale * 6.0f); - func_effect_8007BFFC(actor->obj.pos.x - actor->vel.x, actor->obj.pos.y + 30.0f, - actor->obj.pos.z - actor->vel.z, 0.0f, 0.0f, 0.0f, actor->scale * 4.0f, 20); + Effect386_Spawn1(actor->obj.pos.x - actor->vel.x, actor->obj.pos.y + 30.0f, + actor->obj.pos.z - actor->vel.z, 0.0f, 0.0f, 0.0f, actor->scale * 4.0f, 20); func_enmy_80062C38(actor->obj.pos.x, actor->obj.pos.z); actor->timer_0BE = 2; Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); @@ -4326,21 +4329,21 @@ void func_enmy2_800763A4(Actor* actor) { if ((actor->obj.pos.y < (gGroundHeight + 30.0f)) && (gLevelType == LEVELTYPE_PLANET)) { actor->vel.z = 0.0f; if (gGroundSurface == SURFACE_WATER) { - func_effect_8007D9DC(actor->obj.pos.x, gGroundHeight + 2.0f, actor->obj.pos.z, 3.0f, 20.0f, - 0); - func_effect_8007D9DC(actor->obj.pos.x, gGroundHeight + 2.0f, actor->obj.pos.z, 3.0f, 20.0f, - 10); - func_effect_8007D9DC(actor->obj.pos.x, gGroundHeight + 2.0f, actor->obj.pos.z, 3.0f, 20.0f, - 20); - func_effect_8007ADF4(actor->obj.pos.x, gGroundHeight, actor->obj.pos.z, 0.1f, 3.0f); + Effect_Effect367_Spawn(actor->obj.pos.x, gGroundHeight + 2.0f, actor->obj.pos.z, 3.0f, + 20.0f, 0); + Effect_Effect367_Spawn(actor->obj.pos.x, gGroundHeight + 2.0f, actor->obj.pos.z, 3.0f, + 20.0f, 10); + Effect_Effect367_Spawn(actor->obj.pos.x, gGroundHeight + 2.0f, actor->obj.pos.z, 3.0f, + 20.0f, 20); + Effect_Effect372_Spawn2(actor->obj.pos.x, gGroundHeight, actor->obj.pos.z, 0.1f, 3.0f); } else { PlayerShot_SpawnEffect344(actor->obj.pos.x, 3.0f, actor->obj.pos.z, actor->obj.pos.x, actor->obj.pos.z, 0.0f, 0.0f, 90.0f, 6.5f, 0, 0); } - func_effect_8007C120(actor->obj.pos.x, 20.0f, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, - actor->scale * 0.05f, 30); + Effect_Effect390_Spawn(actor->obj.pos.x, 20.0f, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, + actor->scale * 0.05f, 30); if ((gCurrentLevel == LEVEL_FORTUNA) || (gCurrentLevel == LEVEL_VENOM_2)) { - func_effect_8007C688(actor->obj.pos.x, gGroundHeight + 30.0f, actor->obj.pos.z, 3.0f, 60); + Effect_Effect387_Spawn(actor->obj.pos.x, gGroundHeight + 30.0f, actor->obj.pos.z, 3.0f, 60); if (gCurrentLevel == LEVEL_FORTUNA) { func_enmy_80062C38(actor->obj.pos.x, actor->obj.pos.z); } @@ -4351,25 +4354,26 @@ void func_enmy2_800763A4(Actor* actor) { func_effect_8007D0E0(actor->obj.pos.x - actor->vel.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z - actor->vel.z, actor->scale * 5.0f); if (gLevelMode == LEVELMODE_ALL_RANGE) { - func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z, actor->vel.x, - 10.0f, actor->vel.z, actor->scale * 3.0f, 20); + Effect386_Spawn1(actor->obj.pos.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z, actor->vel.x, + 10.0f, actor->vel.z, actor->scale * 3.0f, 20); if (sp60 == 999) { - func_effect_8007C688(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, - actor->scale * 3.0f, 70); + Effect_Effect387_Spawn(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, + actor->scale * 3.0f, 70); } for (var_s0 = 0; var_s0 < 4; var_s0++) { if (Rand_ZeroOne() < 0.7f) { if (gCurrentLevel == LEVEL_FORTUNA) { Play_SpawnDebris(4, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z); } else { - func_effect_800794CC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 1.0f); + Effect_Effect357_Spawn50(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, + 1.0f); } } } } else { - func_effect_8007BFFC(actor->obj.pos.x - actor->vel.x, actor->obj.pos.y + 30.0f, - (actor->obj.pos.z - actor->vel.z) + 48.0f, 0.0f, 0.0f, 0.0f, - actor->scale * 3.0f, 5); + Effect386_Spawn1(actor->obj.pos.x - actor->vel.x, actor->obj.pos.y + 30.0f, + (actor->obj.pos.z - actor->vel.z) + 48.0f, 0.0f, 0.0f, 0.0f, + actor->scale * 3.0f, 5); } actor->timer_0BE = 2; @@ -4390,13 +4394,13 @@ void func_enmy2_800763A4(Actor* actor) { if (gCurrentLevel == LEVEL_FORTUNA) { Play_SpawnDebris(4, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z); } else { - func_effect_800794CC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 1.0f); + Effect_Effect357_Spawn50(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 1.0f); } } } - func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, actor->vel.x, actor->vel.y, - actor->vel.z, 5.0f, 15); + Effect386_Spawn1(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, actor->vel.x, actor->vel.y, + actor->vel.z, 5.0f, 15); func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z - actor->vel.z, 8.0f); } else { if ((actor->eventType != EVID_13) && (actor->eventType != EVID_61)) { @@ -4405,8 +4409,8 @@ void func_enmy2_800763A4(Actor* actor) { } if (actor->eventType == EVID_36) { - func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, actor->vel.x, - actor->vel.y, actor->vel.z, 5.0f, 15); + Effect386_Spawn1(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, actor->vel.x, actor->vel.y, + actor->vel.z, 5.0f, 15); } } @@ -4433,13 +4437,13 @@ void func_enmy2_800763A4(Actor* actor) { void ActorEvent_Dying(ActorEvent* this) { if ((this->eventType == EVID_48) || (this->eventType == EVID_49) || (this->eventType == EVID_50)) { - SectorY_Actor204_Update(this); + SectorY_SyRobot_Update(this); } else { func_enmy2_800763A4(this); } } -void Actor234_Update(Actor234* this) { +void TiGreatFox_Update(TiGreatFox* this) { Vec3f sp24; Math_Vec3fFromAngles(&sp24, this->obj.rot.x, this->obj.rot.y, 50.0f); @@ -4448,6 +4452,6 @@ void Actor234_Update(Actor234* this) { this->vel.z = sp24.z; } -void Actor234_Draw(Actor234* this) { +void TiGreatFox_Draw(TiGreatFox* this) { Cutscene_DrawGreatFox(); } diff --git a/src/engine/fox_fade.c b/src/engine/fox_fade.c index 2999878d..adca18a9 100644 --- a/src/engine/fox_fade.c +++ b/src/engine/fox_fade.c @@ -41,7 +41,7 @@ void Wipe_Draw(WipeMode mode, s32 frame) { Wipe_Vertical(frame); break; default: - (void) "そのような フェード は ない (%d)\n"; // There is no such fade + PRINTF("そのような フェード は ない (%d)\n"); // There is no such fade break; } } diff --git a/src/engine/fox_game.c b/src/engine/fox_game.c index d4006f58..88550a7f 100644 --- a/src/engine/fox_game.c +++ b/src/engine/fox_game.c @@ -20,7 +20,7 @@ f32 gFovY; f32 gProjectNear; f32 gProjectFar; -bool gShowCrosshairs[4] = { true, true, true, true }; +bool gShowReticles[4] = { true, true, true, true }; bool D_game_800D2870 = false; static s32 sVsCameraULx[] = { 0, SCREEN_WIDTH / 2, 0, SCREEN_WIDTH / 2 }; static s32 sVsCameraLRx[] = { SCREEN_WIDTH / 2 - 1, SCREEN_WIDTH - 1, SCREEN_WIDTH / 2 - 1, SCREEN_WIDTH - 1 }; @@ -114,6 +114,7 @@ void Game_SetGameState(void) { gSceneSetup = 0; gFillScreenColor = gBgColor = 0; gPathProgress = 0.0f; + if ((gCurrentLevel == LEVEL_VENOM_2) && (gLevelPhase == 2)) { gFillScreenColor = gBgColor = 0xFFFF; // 248, 248, 248 gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; @@ -281,7 +282,7 @@ void Game_Draw(s32 playerNum) { break; case DRAW_PLAY: gPlayerNum = playerNum; - Play_Draw(); + Display_Update(); break; case DRAW_UNK_MAP: // likely game over Background_DrawStarfield(); @@ -342,29 +343,36 @@ void Game_Update(void) { u8 soundMode; Game_SetGameState(); + if (gGameStandby) { Game_InitStandbyDL(&gUnkDisp1); gGameStandby = false; return; } + Game_InitMasterDL(&gUnkDisp1); Game_SetScene(); + if (Game_ChangeScene() != true) { Lib_InitPerspective(&gUnkDisp1); Game_InitViewport(&gUnkDisp1, gCamCount, 0); + if (gNextGameStateTimer != 0) { gNextGameStateTimer--; } + switch (gGameState) { case GSTATE_BOOT: gNextGameStateTimer = 2; gGameState++; break; + case GSTATE_BOOT_WAIT: if (gNextGameStateTimer == 0) { gGameState++; } break; + case GSTATE_SHOW_LOGO: RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); @@ -375,6 +383,7 @@ void Game_Update(void) { TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 4], 128, 10, 100.0f, 150.0f, 1.0f, 1.0f); gGameState++; break; + case GSTATE_CHECK_SAVE: if (Save_Read() != 0) { #ifdef AVOID_UB @@ -397,11 +406,13 @@ void Game_Update(void) { TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 3], 128, 16, 100.0f, 134.0f, 1.0f, 1.0f); TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 4], 128, 10, 100.0f, 150.0f, 1.0f, 1.0f); break; + case GSTATE_START: gGameState = GSTATE_INIT; gSceneId = SCENE_TITLE; gSceneSetup = 0; break; + case GSTATE_INIT: gGameState = GSTATE_TITLE; gTitleState = 1; @@ -430,17 +441,21 @@ void Game_Update(void) { D_ctx_80177858[i] = 3; gPlayerForms[i] = FORM_ARWING; - gShowCrosshairs[i] = true; + gShowReticles[i] = true; gPlayerGlareAlphas[i] = 0; } + gVersusStage = 0; gVsPointsToWin = 3; gBlurAlpha = 255; + for (i = 0; i < ARRAY_COUNT(gLeveLClearStatus); i++) { gLeveLClearStatus[i] = 0; } + gExpertMode = false; gOptionSoundMode = gSaveFile.save.data.soundMode; + switch (gOptionSoundMode) { case OPTIONSOUND_STEREO: soundMode = SOUNDMODE_STEREO; @@ -456,10 +471,12 @@ void Game_Update(void) { soundMode = SOUNDMODE_STEREO; break; } + SEQCMD_SET_SOUND_MODE(soundMode); gVolumeSettings[AUDIO_TYPE_MUSIC] = gSaveFile.save.data.musicVolume; gVolumeSettings[AUDIO_TYPE_VOICE] = gSaveFile.save.data.voiceVolume; gVolumeSettings[AUDIO_TYPE_SFX] = gSaveFile.save.data.sfxVolume; + if (gVolumeSettings[AUDIO_TYPE_MUSIC] > 99) { gVolumeSettings[AUDIO_TYPE_MUSIC] = 99; } @@ -473,6 +490,7 @@ void Game_Update(void) { Audio_SetVolume(AUDIO_TYPE_VOICE, gVolumeSettings[AUDIO_TYPE_VOICE]); Audio_SetVolume(AUDIO_TYPE_SFX, gVolumeSettings[AUDIO_TYPE_SFX]); break; + case GSTATE_TITLE: OvlMenu_CallFunction(OVLCALL_TITLE_UPDATE, NULL); break; @@ -498,7 +516,9 @@ void Game_Update(void) { default: break; } + Game_Draw(0); + if (gCamCount == 2) { Game_InitViewport(&gMasterDisp, gCamCount, 1); Game_Draw(1); @@ -538,7 +558,9 @@ void Game_Update(void) { HUD_dummy_8008CB8C(); } + partialFill = false; + if (gCamCount == 1) { Graphics_FillRectangle(&gMasterDisp, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, gPlayerGlareReds[0], gPlayerGlareGreens[0], gPlayerGlareBlues[0], gPlayerGlareAlphas[0]); @@ -565,9 +587,11 @@ void Game_Update(void) { } } } + Background_dummy_80040CDC(); HUD_DrawStatusScreens(); AllRange_DrawCountdown(); + if ((gGameState == GSTATE_PLAY) && gVersusMode) { Versus_Draw(); } @@ -584,6 +608,9 @@ void Game_Update(void) { #endif #if MODS_FPS_COUNTER == 1 Play_RenderFps(); +#endif +#if MODS_SPAWNER == 1 + Spawner(); #endif } } @@ -594,6 +621,9 @@ void Game_Update(void) { #if MODS_RAM_MOD == 1 #include "../mods/object_ram.c" #endif +#if MODS_SPAWNER == 1 +#include "../mods/spawner.c" +#endif Actor* Game_SpawnActor(ObjectId objId) { Actor* actor = gActors; diff --git a/src/engine/fox_hud.c b/src/engine/fox_hud.c index f59c8ecb..1589f979 100644 --- a/src/engine/fox_hud.c +++ b/src/engine/fox_hud.c @@ -359,7 +359,7 @@ void func_hud_80085944(void) { y = D_800D1AD8[i + 1]; scale = 0.28f; - if (D_ctx_80177C70 == 2) { + if (gFovYMode == 2) { x -= 7.00f; y += 7.00f; scale += 0.06f; @@ -408,7 +408,7 @@ void func_hud_80085944(void) { y = D_800D1AD8[i + 1]; scale = 0.28f; - if (D_ctx_80177C70 == 2) { + if (gFovYMode == 2) { x -= 7.00f; y += 7.00f; scale += 0.06f; @@ -1834,7 +1834,7 @@ void func_hud_80089D28(void) { gSPDisplayList(gMasterDisp++, D_1024230); } -void RadarMark_Draw(s32 arg0) { +void HUD_RadarMark_Draw(s32 arg0) { s32 var_a1; s32 var_a1_2; @@ -2149,7 +2149,7 @@ s32 func_hud_8008A4DC(void) { Matrix_Scale(gGfxMatrix, scale, scale, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - RadarMark_Draw(gRadarMarks[i].type); + HUD_RadarMark_Draw(gRadarMarks[i].type); Matrix_Pop(&gGfxMatrix); gRadarMarks[i].status = 0; @@ -2160,7 +2160,7 @@ s32 func_hud_8008A4DC(void) { } // Why is this function here in fox_hud? Weird. -s32 Hud_MissileSeekModeCheck(s32 missileSeekMode) { +s32 ActorMissileSeek_ModeCheck(s32 missileSeekMode) { Actor* actor; s32 i; s32 ret = 0; @@ -2191,7 +2191,7 @@ s32 Hud_MissileSeekModeCheck(s32 missileSeekMode) { return ret; } -void func_hud_8008AD94(void) { +void HUD_RadioCharacterName_Draw(void) { if (gGameState == GSTATE_PLAY) { RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); @@ -2316,7 +2316,7 @@ s32 D_800D1EB8 = 255; s32 D_800D1EBC = 255; void func_hud_8008B2F0(void) { - f32 var_fv0; + f32 shields; switch (D_hud_80161730) { case 0: @@ -2330,8 +2330,8 @@ void func_hud_8008B2F0(void) { D_801617A4 = D_801617A8 = 1.0f; } - var_fv0 = gPlayer[0].shields; - D_801617AC = var_fv0 / ((256.0f * D_801617A8) - 1.0f); + shields = gPlayer[0].shields; + D_801617AC = shields / ((256.0f * D_801617A8) - 1.0f); if (gGoldRingCount[0] >= 3) { D_hud_80161730 = 2; @@ -2354,7 +2354,7 @@ void func_hud_8008B2F0(void) { } } - if (((D_801617B0 != 0) || ((D_801617A4 - D_801617A8) > 0.1f)) && (gGameFrameCount & 2)) { + if (((D_801617B0 != 0) || ((D_801617A4 - D_801617A8) > 0.1f)) && ((gGameFrameCount & 2) != 0)) { D_800D1EB4 = 0; D_800D1EB8 = 255; D_800D1EBC = 0; @@ -2368,11 +2368,11 @@ void func_hud_8008B2F0(void) { Math_SmoothStepToF(&D_801617A8, D_801617A4, 0.02f, 1000.0f, 0.001f); - var_fv0 = gPlayer[0].shields; - if (var_fv0 > (256.0f * D_801617A8) - 1.0f) { - var_fv0 = (256.0f * D_801617A8) - 1.0f; + shields = gPlayer[0].shields; + if (shields > (256.0f * D_801617A8) - 1.0f) { + shields = (256.0f * D_801617A8) - 1.0f; } - D_801617AC = var_fv0 / ((256.0f * D_801617A8) - 1.0f); + D_801617AC = shields / ((256.0f * D_801617A8) - 1.0f); break; } } @@ -2465,7 +2465,7 @@ s32 func_hud_8008B774(void) { ((gActors[i].obj.id == OBJ_ACTOR_TEAM_BOSS) && ((gActors[i].aiType == AI360_FALCO) || (gActors[i].aiType == AI360_SLIPPY) || (gActors[i].aiType == AI360_PEPPY)))) { - if (gActors[i].timer_0C6) { + if (gActors[i].timer_0C6 != 0) { ret = 1; } else { ret = 0; @@ -2489,7 +2489,7 @@ s32 func_hud_8008B774(void) { case 6: case 7: if (gLevelMode == LEVELMODE_ALL_RANGE) { - if (gActors[i].timer_0C6) { + if (gActors[i].timer_0C6 != 0) { ret = 1; } if ((ret == 1) && (gActors[i].health <= 0)) { @@ -2503,11 +2503,12 @@ s32 func_hud_8008B774(void) { break; default: - if (gActors[i].timer_0C6) { + if (gActors[i].timer_0C6 != 0) { ret = 1; } break; } + return ret; } @@ -2973,6 +2974,7 @@ void func_hud_8008D4F0(f32 arg0, f32 arg1) { if (temp_fs0 > 0.01f) { func_hud_800857DC(D_800D2108[var_v1] + temp + 1.0f, D_800D211C[var_v1] + sp60, temp_fs0, 1.0f); } + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); func_hud_80085740(D_800D2108[var_v1], D_800D211C[var_v1], 1.0f, 1.0f); @@ -3645,7 +3647,7 @@ void HUD_Draw(void) { func_hud_80088970(); } -void HUD_BossFO_Draw(Boss* boss) { +void HUD_FoBase_Draw(Boss* boss) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gSPDisplayList(gMasterDisp++, D_FO_6003090); RCP_SetupDL_34(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); @@ -3656,7 +3658,7 @@ void HUD_BossFO_Draw(Boss* boss) { gDPSetTextureFilter(gMasterDisp++, G_TF_BILERP); } -void func_hud_8008FFF0(Boss* boss, s32 arg1) { +void func_hud_8008FFF0(FoBase* this, s32 arg1) { Vec3s D_800D21C8[] = { { -385, 54, 233 }, { -324, 148, 193 }, { -267, 186, 136 }, { -128, 430, 180 }, { -231, 584, 140 }, { -431, 551, -120 }, { -285, 516, -32 }, { -285, 601, 18 }, { 300, 596, 18 }, { 300, 529, -65 }, @@ -3670,6 +3672,7 @@ void func_hud_8008FFF0(Boss* boss, s32 arg1) { s32 i; f32 temp; s32 temp2; + if (arg1 >= 7000) { temp2 = arg1 - 7000; @@ -3679,160 +3682,162 @@ void func_hud_8008FFF0(Boss* boss, s32 arg1) { temp = temp2 / 1596.0f; - if (boss->swork[0] != 1) { + if (this->swork[0] != 1) { temp /= 2.0f; } i = RAND_INT(36.0f); if ((gGameFrameCount & 2) == 0) { - func_effect_8007C120(boss->obj.pos.x + D_800D21C8[i].x, boss->obj.pos.y + D_800D21C8[i].y, - boss->obj.pos.z + D_800D21C8[i].z, 0.0f, 0.0f, 0.0f, 0.3f * temp, 20); + Effect_Effect390_Spawn(this->obj.pos.x + D_800D21C8[i].x, this->obj.pos.y + D_800D21C8[i].y, + this->obj.pos.z + D_800D21C8[i].z, 0.0f, 0.0f, 0.0f, 0.3f * temp, 20); } - if (((gGameFrameCount % 8) == 0)) { - func_effect_8007BFFC(boss->obj.pos.x + D_800D21C8[i].x, boss->obj.pos.y + D_800D21C8[i].y, - boss->obj.pos.z + D_800D21C8[i].z, 0.0f, 0.0f, 0.0f, 7.0f * temp, 10); + if ((gGameFrameCount % 8) == 0) { + Effect386_Spawn1(this->obj.pos.x + D_800D21C8[i].x, this->obj.pos.y + D_800D21C8[i].y, + this->obj.pos.z + D_800D21C8[i].z, 0.0f, 0.0f, 0.0f, 7.0f * temp, 10); } } } -s32 func_hud_80090200(Boss* boss) { - Vec3f dest, src; +s32 HUD_FoBase_ExplodeCs(FoBase* this) { + Vec3f dest; + Vec3f src; Player* player; - s32 ret = 0; + s32 csState = 0; - if (boss->swork[0] == 1) { - func_hud_8008FFF0(boss, 8596); + if (this->swork[0] == 1) { + func_hud_8008FFF0(this, 8596); player = &gPlayer[0]; - ret = 1; + csState = 1; - switch (boss->swork[1]) { + switch (this->swork[1]) { case 0: - AUDIO_PLAY_SFX(NA_SE_EARTHQUAKE, boss->sfxSource, 0); - AUDIO_PLAY_SFX(NA_SE_EXPLOSION_DEMO, boss->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_EARTHQUAKE, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_EXPLOSION_DEMO, this->sfxSource, 0); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); - player->cam.eye.x = boss->fwork[4] = boss->obj.pos.x; - player->cam.eye.y = boss->fwork[5] = boss->obj.pos.y + 500.0f; - player->cam.eye.z = boss->fwork[6] = boss->obj.pos.z + 4000.0f; + player->cam.eye.x = this->fwork[4] = this->obj.pos.x; + player->cam.eye.y = this->fwork[5] = this->obj.pos.y + 500.0f; + player->cam.eye.z = this->fwork[6] = this->obj.pos.z + 4000.0f; - player->cam.at.x = boss->obj.pos.x; - player->cam.at.y = boss->obj.pos.y; - player->cam.at.z = boss->obj.pos.z; + player->cam.at.x = this->obj.pos.x; + player->cam.at.y = this->obj.pos.y; + player->cam.at.z = this->obj.pos.z; - boss->fwork[7] = 0.0f; - boss->fwork[8] = 0.0f; - boss->fwork[9] = 10.0f; + this->fwork[7] = 0.0f; + this->fwork[8] = 0.0f; + this->fwork[9] = 10.0f; - boss->timer_050 = 1000; + this->timer_050 = 1000; - boss->swork[1] = 1; + this->swork[1] = 1; break; case 1: - if (boss->timer_050 == 930) { - boss->swork[1] = 2; + if (this->timer_050 == 930) { + this->swork[1] = 2; } - boss->fwork[7] += 0.5f; - if (boss->fwork[7] >= 360.0f) { - boss->fwork[7] = 0.0f; + this->fwork[7] += 0.5f; + if (this->fwork[7] >= 360.0f) { + this->fwork[7] = 0.0f; } - Math_SmoothStepToF(&boss->fwork[9], 80.0f, 0.01f, 10000.0f, 0.0f); - Math_SmoothStepToF(&boss->fwork[4], boss->obj.pos.x + 0.0f, 0.02f, 10000.0f, 0.0f); - Math_SmoothStepToF(&boss->fwork[5], boss->obj.pos.y + 500.0f, 0.02f, 10000.0f, 0.0f); - Math_SmoothStepToF(&boss->fwork[6], boss->obj.pos.z + 1500.0f, 0.02f, 10000.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[9], 80.0f, 0.01f, 10000.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[4], this->obj.pos.x + 0.0f, 0.02f, 10000.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[5], this->obj.pos.y + 500.0f, 0.02f, 10000.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[6], this->obj.pos.z + 1500.0f, 0.02f, 10000.0f, 0.0f); break; case 2: - if (boss->timer_050 == 870) { - boss->swork[1] = 3; + if (this->timer_050 == 870) { + this->swork[1] = 3; } - boss->fwork[7] += 3.0f; - if (boss->fwork[7] >= 360.0f) { - boss->fwork[7] = 0.0f; + this->fwork[7] += 3.0f; + if (this->fwork[7] >= 360.0f) { + this->fwork[7] = 0.0f; } - Math_SmoothStepToF(&boss->fwork[4], boss->obj.pos.x + 0.0f, 0.02f, 10000.0f, 0.0f); - Math_SmoothStepToF(&boss->fwork[5], boss->obj.pos.y + 1500.0f, 0.02f, 10000.0f, 0.0f); - Math_SmoothStepToF(&boss->fwork[6], boss->obj.pos.z + 1500.0f, 0.02f, 10000.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[4], this->obj.pos.x + 0.0f, 0.02f, 10000.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[5], this->obj.pos.y + 1500.0f, 0.02f, 10000.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[6], this->obj.pos.z + 1500.0f, 0.02f, 10000.0f, 0.0f); break; case 3: - if (boss->timer_050 == 770) { - boss->swork[1] = 4; + if (this->timer_050 == 770) { + this->swork[1] = 4; } - Math_SmoothStepToF(&boss->fwork[9], 10.0f, 0.01f, 10000.0f, 0.0f); - Math_SmoothStepToF(&boss->fwork[4], boss->obj.pos.x + 4000.0f, 0.02f, 10000.0f, 0.0f); - Math_SmoothStepToF(&boss->fwork[5], boss->obj.pos.y + 2000.0f, 0.02f, 10000.0f, 0.0f); - Math_SmoothStepToF(&boss->fwork[6], boss->obj.pos.z + 1500.0f, 0.02f, 10000.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[9], 10.0f, 0.01f, 10000.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[4], this->obj.pos.x + 4000.0f, 0.02f, 10000.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[5], this->obj.pos.y + 2000.0f, 0.02f, 10000.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[6], this->obj.pos.z + 1500.0f, 0.02f, 10000.0f, 0.0f); break; case 4: - ret = 2; + csState = 2; + break; } - if (boss->swork[1] < 4) { - src.x = boss->fwork[4] - boss->obj.pos.x; - src.y = boss->fwork[5] - boss->obj.pos.y; - src.z = boss->fwork[6] - boss->obj.pos.z; + if (this->swork[1] < 4) { + src.x = this->fwork[4] - this->obj.pos.x; + src.y = this->fwork[5] - this->obj.pos.y; + src.z = this->fwork[6] - this->obj.pos.z; - Matrix_Translate(gCalcMatrix, boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, MTXF_NEW); - Matrix_RotateY(gCalcMatrix, M_DTOR * boss->fwork[7], MTXF_APPLY); - Matrix_RotateX(gCalcMatrix, M_DTOR * boss->fwork[8], MTXF_APPLY); + Matrix_Translate(gCalcMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, M_DTOR * this->fwork[7], MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, M_DTOR * this->fwork[8], MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &src, &dest); player->cam.eye.x = dest.x; player->cam.eye.y = dest.y; player->cam.eye.z = dest.z; - player->cam.at.x = boss->obj.pos.x; - player->cam.at.y = boss->obj.pos.x; - player->cam.at.z = boss->obj.pos.x; + player->cam.at.x = this->obj.pos.x; + player->cam.at.y = this->obj.pos.x; + player->cam.at.z = this->obj.pos.x; - player->cam.at.x += COS_DEG(boss->timer_050 * 60.0f) * boss->fwork[9]; - player->cam.at.y += SIN_DEG(boss->timer_050 * 179.0f) * boss->fwork[9]; + player->cam.at.x += COS_DEG(this->timer_050 * 60.0f) * this->fwork[9]; + player->cam.at.y += SIN_DEG(this->timer_050 * 179.0f) * this->fwork[9]; } } - return ret; + return csState; } -void HUD_BossFO_Update(Boss* boss) { - switch (boss->state) { +void HUD_FoBase_Update(FoBase* this) { + switch (this->state) { case 0: - if ((boss->fwork[1] == 255.0f) && (boss->fwork[2] == 212.0f)) { - boss->state = 1; + if ((this->fwork[1] == 255.0f) && (this->fwork[2] == 212.0f)) { + this->state = 1; } else { - Math_SmoothStepToF(&boss->fwork[1], 255.0f, 0.3f, 6.0f, 6.0f); - Math_SmoothStepToF(&boss->fwork[2], 212.0f, 0.3f, 4.98f, 4.98f); + Math_SmoothStepToF(&this->fwork[1], 255.0f, 0.3f, 6.0f, 6.0f); + Math_SmoothStepToF(&this->fwork[2], 212.0f, 0.3f, 4.98f, 4.98f); } break; case 1: - if ((boss->fwork[1] == 28.0f) && (boss->fwork[2] == 23.0f)) { - boss->state = 0; + if ((this->fwork[1] == 28.0f) && (this->fwork[2] == 23.0f)) { + this->state = 0; } else { - Math_SmoothStepToF(&boss->fwork[1], 28.0f, 0.3f, 6.0f, 6.0f); - Math_SmoothStepToF(&boss->fwork[2], 23.0f, 0.3f, 4.98f, 4.98f); + Math_SmoothStepToF(&this->fwork[1], 28.0f, 0.3f, 6.0f, 6.0f); + Math_SmoothStepToF(&this->fwork[2], 23.0f, 0.3f, 4.98f, 4.98f); } break; } - func_hud_8008FFF0(boss, gAllRangeEventTimer); + func_hud_8008FFF0(this, gAllRangeEventTimer); } -bool func_hud_8009092C(Actor* actor) { - bool var_s5 = false; +bool func_hud_8009092C(ActorTeamBoss* this) { + bool ret = false; Boss* boss; s32 i = 0; - if (actor->aiIndex != 0) { + if (this->aiIndex != 0) { return true; } @@ -3840,143 +3845,142 @@ bool func_hud_8009092C(Actor* actor) { for (i = 1; i < ARRAY_COUNT(gBosses); i++, boss++) { if (boss->obj.status == OBJ_ACTIVE) { - var_s5 = true; - if (actor->aiIndex == 0) { - actor->aiIndex = i; + ret = true; + if (this->aiIndex == 0) { + this->aiIndex = i; } else if (Rand_ZeroOne() > 0.4f) { - actor->aiIndex = i; + this->aiIndex = i; } - actor->state = 0; + this->state = 0; } } - return var_s5; + return ret; } -bool func_hud_80090A00(Actor* actor) { - switch (actor->iwork[5]) { +bool func_hud_80090A00(ActorTeamBoss* this) { + switch (this->iwork[5]) { case 0: - actor->fwork[8] = 0.0f; - actor->fwork[7] = 360.0f; - actor->timer_0BC = 8; - actor->rot_0F4.y = 100.0f; - actor->rot_0F4.x = 300.0f; - actor->iwork[4] = 1; - actor->iwork[5] = 1; + this->fwork[8] = 0.0f; + this->fwork[7] = 360.0f; + this->timer_0BC = 8; + this->rot_0F4.y = 100.0f; + this->rot_0F4.x = 300.0f; + this->iwork[4] = 1; + this->iwork[5] = 1; case 1: - if (actor->timer_0BC == 0.0f) { - actor->fwork[1] = 20.0f; - actor->fwork[3] = 3.6f; - actor->iwork[2] = 0; - actor->iwork[3] = 36; - actor->iwork[5] = 2; + if (this->timer_0BC == 0.0f) { + this->fwork[1] = 20.0f; + this->fwork[3] = 3.6f; + this->iwork[2] = 0; + this->iwork[3] = 36; + this->iwork[5] = 2; } else { - actor->obj.pos.y -= 8.0f; + this->obj.pos.y -= 8.0f; break; } case 2: - actor->fwork[4] = gBosses[0].obj.pos.x + 1000.0f; - actor->fwork[5] = 300.0f; - actor->fwork[6] = actor->obj.pos.z - 10000.0f; - actor->iwork[2]++; - if (actor->iwork[2] == actor->iwork[3]) { - actor->iwork[5] = 3; - actor->iwork[3] = 40; - actor->iwork[2] = 0; - } else if (actor->iwork[2] == 6) { - actor->iwork[1] = 1; + this->fwork[4] = gBosses[0].obj.pos.x + 1000.0f; + this->fwork[5] = 300.0f; + this->fwork[6] = this->obj.pos.z - 10000.0f; + this->iwork[2]++; + if (this->iwork[2] == this->iwork[3]) { + this->iwork[5] = 3; + this->iwork[3] = 40; + this->iwork[2] = 0; + } else if (this->iwork[2] == 6) { + this->iwork[1] = 1; } break; case 3: - actor->fwork[4] = gBosses[0].obj.pos.x - 1000.0f; - actor->fwork[5] = 400.0f; - actor->fwork[6] = gBosses[0].obj.pos.z; - actor->iwork[2]++; - if (actor->iwork[2] == actor->iwork[3]) { - actor->iwork[5] = 4; - } else if (actor->iwork[2] == 20) { - actor->fwork[1] = 30.0f; + this->fwork[4] = gBosses[0].obj.pos.x - 1000.0f; + this->fwork[5] = 400.0f; + this->fwork[6] = gBosses[0].obj.pos.z; + this->iwork[2]++; + if (this->iwork[2] == this->iwork[3]) { + this->iwork[5] = 4; + } else if (this->iwork[2] == 20) { + this->fwork[1] = 30.0f; } break; case 4: - actor->fwork[6] = gPlayer[0].trueZpos; - actor->fwork[5] = 100.0f; - actor->fwork[4] = gPlayer[0].pos.x; - if ((fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 300.0f) && - (fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 300.0f)) { - actor->iwork[5] = 5; - actor->iwork[3] = 20; - actor->iwork[2] = 0; + this->fwork[6] = gPlayer[0].trueZpos; + this->fwork[5] = 100.0f; + this->fwork[4] = gPlayer[0].pos.x; + if ((fabsf(this->obj.pos.x - gPlayer[0].pos.x) < 300.0f) && + (fabsf(this->obj.pos.z - gPlayer[0].trueZpos) < 300.0f)) { + this->iwork[5] = 5; + this->iwork[3] = 20; + this->iwork[2] = 0; } break; case 5: - actor->fwork[6] = gPlayer[0].trueZpos + 1000.0f; - actor->fwork[5] = 1000.0f; - actor->fwork[4] = gPlayer[0].pos.x - 1000.0f; - actor->iwork[2]++; - if (actor->iwork[2] == actor->iwork[3]) { - Object_Kill(&actor->obj, actor->sfxSource); + this->fwork[6] = gPlayer[0].trueZpos + 1000.0f; + this->fwork[5] = 1000.0f; + this->fwork[4] = gPlayer[0].pos.x - 1000.0f; + this->iwork[2]++; + if (this->iwork[2] == this->iwork[3]) { + Object_Kill(&this->obj, this->sfxSource); } break; } return false; } -bool func_hud_80090CCC(Actor* actor) { +bool func_hud_80090CCC(ActorTeamBoss* this) { bool ret = false; - if (func_hud_8009092C(actor)) { - actor->fwork[6] = gBosses[actor->aiIndex].obj.pos.z; - actor->fwork[5] = gBosses[actor->aiIndex].obj.pos.y; - actor->fwork[4] = gBosses[actor->aiIndex].obj.pos.x; + if (func_hud_8009092C(this)) { + this->fwork[6] = gBosses[this->aiIndex].obj.pos.z; + this->fwork[5] = gBosses[this->aiIndex].obj.pos.y; + this->fwork[4] = gBosses[this->aiIndex].obj.pos.x; } else { - actor->fwork[6] = gBosses[0].obj.pos.z; - actor->fwork[5] = gBosses[0].obj.pos.y; - actor->fwork[4] = gBosses[0].obj.pos.x; + this->fwork[6] = gBosses[0].obj.pos.z; + this->fwork[5] = gBosses[0].obj.pos.y; + this->fwork[4] = gBosses[0].obj.pos.x; } - if ((fabsf(actor->obj.pos.x - actor->fwork[4]) < 2000.0f) && - (fabsf(actor->obj.pos.z - actor->fwork[6]) < 2000.0f)) { - actor->iwork[6]++; - if (actor->iwork[6] >= 9) { - actor->iwork[0] = 1; - actor->iwork[6] = 0; + if ((fabsf(this->obj.pos.x - this->fwork[4]) < 2000.0f) && (fabsf(this->obj.pos.z - this->fwork[6]) < 2000.0f)) { + this->iwork[6]++; + if (this->iwork[6] >= 9) { + this->iwork[0] = 1; + this->iwork[6] = 0; } } - if ((fabsf(actor->obj.pos.x - actor->fwork[4]) < 700.0f) && (fabsf(actor->obj.pos.x - actor->fwork[4]) < 700.0f)) { - actor->state = 1; - actor->iwork[6] = 0; + if ((fabsf(this->obj.pos.x - this->fwork[4]) < 700.0f) && (fabsf(this->obj.pos.x - this->fwork[4]) < 700.0f)) { + this->state = 1; + this->iwork[6] = 0; ret = true; } - if (actor->timer_0BE == 0) { - actor->timer_0BE = RAND_INT(200.0f) + 200; - actor->fwork[10] = 30.0f; + if (this->timer_0BE == 0) { + this->timer_0BE = RAND_INT(200.0f) + 200; + this->fwork[10] = 30.0f; } - if (gBosses[actor->aiIndex].obj.status == OBJ_FREE) { - actor->state = 1; - actor->aiIndex = 0; - actor->iwork[6] = 0; + if (gBosses[this->aiIndex].obj.status == OBJ_FREE) { + this->state = 1; + this->aiIndex = 0; + this->iwork[6] = 0; ret = true; } return ret; } -s32 func_hud_80090E8C(Actor* actor) { +s32 func_hud_80090E8C(ActorTeamBoss* this) { f32 x; f32 y; f32 z; f32 var_fv1_2; - if (actor->timer_0BC == 0) { + if (this->timer_0BC == 0) { if (gLevelType == LEVELTYPE_SPACE) { x = RAND_FLOAT_CENTERED(20000.0f); y = RAND_FLOAT_CENTERED(5000.0f); @@ -3987,95 +3991,94 @@ s32 func_hud_80090E8C(Actor* actor) { z = RAND_FLOAT_CENTERED(10000.0f); } - if ((fabsf(actor->obj.pos.x - x) > 2000.0f) && (fabsf(actor->obj.pos.z - z) > 2000.0f)) { - actor->fwork[4] = x; - actor->fwork[5] = y; - actor->fwork[6] = z; - actor->timer_0BC = RAND_INT(20.0f) + 10; + if ((fabsf(this->obj.pos.x - x) > 2000.0f) && (fabsf(this->obj.pos.z - z) > 2000.0f)) { + this->fwork[4] = x; + this->fwork[5] = y; + this->fwork[6] = z; + this->timer_0BC = RAND_INT(20.0f) + 10; } } - if (actor->aiType == AI360_FALCO) { + if (this->aiType == AI360_FALCO) { var_fv1_2 = 3000.0f; } else { var_fv1_2 = 5000.0f; } - if ((var_fv1_2 < fabsf(actor->obj.pos.x - gBosses[0].obj.pos.x)) && - (var_fv1_2 < fabsf(actor->obj.pos.z - gBosses[0].obj.pos.z))) { - actor->state = 0; + if ((var_fv1_2 < fabsf(this->obj.pos.x - gBosses[0].obj.pos.x)) && + (var_fv1_2 < fabsf(this->obj.pos.z - gBosses[0].obj.pos.z))) { + this->state = 0; } - if (actor->timer_0BE == 0) { - actor->timer_0BE = RAND_INT(200.0f) + 200; - actor->fwork[10] = 30.0f; + if (this->timer_0BE == 0) { + this->timer_0BE = RAND_INT(200.0f) + 200; + this->fwork[10] = 30.0f; } return false; } -bool func_hud_800910C0(Actor* actor) { +bool func_hud_800910C0(ActorTeamBoss* this) { f32 var_fv1; - if (actor->timer_0BC == 0) { - actor->vwork[28].x = RAND_FLOAT_CENTERED(2000.0f); - actor->vwork[28].y = RAND_FLOAT(1000.0f) + 200.0f; - actor->vwork[28].z = RAND_FLOAT_CENTERED(2000.0f); - actor->timer_0BC = RAND_INT(20.0f) + 10; + if (this->timer_0BC == 0) { + this->vwork[28].x = RAND_FLOAT_CENTERED(2000.0f); + this->vwork[28].y = RAND_FLOAT(1000.0f) + 200.0f; + this->vwork[28].z = RAND_FLOAT_CENTERED(2000.0f); + this->timer_0BC = RAND_INT(20.0f) + 10; } - actor->fwork[4] = gBosses[0].obj.pos.x + actor->vwork[28].x; - actor->fwork[5] = actor->vwork[28].y; - actor->fwork[6] = gBosses[0].obj.pos.z + actor->vwork[28].z; + this->fwork[4] = gBosses[0].obj.pos.x + this->vwork[28].x; + this->fwork[5] = this->vwork[28].y; + this->fwork[6] = gBosses[0].obj.pos.z + this->vwork[28].z; - if (actor->aiType == AI360_FALCO) { + if (this->aiType == AI360_FALCO) { var_fv1 = 1500.0f; } else { var_fv1 = 3000.0f; } - if ((var_fv1 < fabsf(actor->obj.pos.x - actor->fwork[4])) && - (var_fv1 < fabsf(actor->obj.pos.z - actor->fwork[6]))) { - actor->state = 0; + if ((var_fv1 < fabsf(this->obj.pos.x - this->fwork[4])) && (var_fv1 < fabsf(this->obj.pos.z - this->fwork[6]))) { + this->state = 0; } - if (actor->timer_0BE == 0) { - actor->timer_0BE = RAND_INT(200.0f) + 200; - actor->fwork[10] = 30.0f; + if (this->timer_0BE == 0) { + this->timer_0BE = RAND_INT(200.0f) + 200; + this->fwork[10] = 30.0f; } return false; } -void func_hud_80091254(Actor* actor) { +void func_hud_80091254(ActorTeamBoss* this) { if (gLevelMode == LEVELMODE_ALL_RANGE) { - func_hud_80090E8C(actor); + func_hud_80090E8C(this); } else { - func_hud_800910C0(actor); + func_hud_800910C0(this); } } -bool func_hud_80091298(Actor* actor) { - actor->fwork[1] = gPlayer[0].baseSpeed + 10.0f; - actor->fwork[3] = 3.6f; - actor->fwork[4] = gPlayer[0].pos.x + ((f32) (actor->aiType - 2) * 700.0f); - actor->fwork[5] = gPlayer[0].pos.y; - actor->fwork[6] = gPlayer[0].trueZpos; +bool func_hud_80091298(ActorTeamBoss* this) { + this->fwork[1] = gPlayer[0].baseSpeed + 10.0f; + this->fwork[3] = 3.6f; + this->fwork[4] = gPlayer[0].pos.x + ((f32) (this->aiType - 2) * 700.0f); + this->fwork[5] = gPlayer[0].pos.y; + this->fwork[6] = gPlayer[0].trueZpos; - if ((fabsf(actor->obj.pos.x - actor->fwork[4]) < 700.0f) || (fabsf(actor->obj.pos.z - actor->fwork[6]) < 700.0f)) { - actor->fwork[1] = gPlayer[0].baseSpeed - 10.0f; - actor->fwork[3] = 1.2f; + if ((fabsf(this->obj.pos.x - this->fwork[4]) < 700.0f) || (fabsf(this->obj.pos.z - this->fwork[6]) < 700.0f)) { + this->fwork[1] = gPlayer[0].baseSpeed - 10.0f; + this->fwork[3] = 1.2f; } return false; } -bool func_hud_80091368(Actor* actor) { - switch (actor->iwork[5]) { +bool func_hud_80091368(ActorTeamBoss* this) { + switch (this->iwork[5]) { case 0: - actor->fwork[5] = 20000.0f; - actor->iwork[1] = 1; - actor->iwork[5] = 1; - gTeamShields[actor->aiType] = 1; + this->fwork[5] = 20000.0f; + this->iwork[1] = 1; + this->iwork[5] = 1; + gTeamShields[this->aiType] = 1; - switch (actor->aiType) { + switch (this->aiType) { case AI360_FALCO: Radio_PlayMessage(gMsg_ID_20220, RCID_FALCO); break; @@ -4088,65 +4091,65 @@ bool func_hud_80091368(Actor* actor) { Radio_PlayMessage(gMsg_ID_20222, RCID_SLIPPY); break; } - gTeamShields[actor->aiType] = -1; + gTeamShields[this->aiType] = -1; break; case 1: - if (actor->fwork[29] < 2.0f) { - actor->fwork[29] = 2.0f; + if (this->fwork[29] < 2.0f) { + this->fwork[29] = 2.0f; } - if (actor->timer_0BC == 0) { - actor->timer_0BC = RAND_INT(20.0f) + 30; - actor->fwork[7] = 360.0f; - actor->fwork[8] = 0.0f; + if (this->timer_0BC == 0) { + this->timer_0BC = RAND_INT(20.0f) + 30; + this->fwork[7] = 360.0f; + this->fwork[8] = 0.0f; } - if (actor->obj.pos.y > 3000.0f) { - Object_Kill(&actor->obj, actor->sfxSource); + if (this->obj.pos.y > 3000.0f) { + Object_Kill(&this->obj, this->sfxSource); } break; } return false; } -void func_hud_800914FC(Actor* actor) { - switch (actor->state) { +void func_hud_800914FC(ActorTeamBoss* this) { + switch (this->state) { case 0: - if (!func_hud_80090CCC(actor)) { + if (!func_hud_80090CCC(this)) { break; } case 1: - func_hud_80091254(actor); + func_hud_80091254(this); break; case 2: - func_hud_80091298(actor); + func_hud_80091298(this); break; case 3: - func_hud_80091368(actor); + func_hud_80091368(this); break; case 7: - func_hud_80090A00(actor); + func_hud_80090A00(this); break; } - if ((gTeamShields[actor->aiType] <= 0) && (actor->state != 3)) { - actor->iwork[5] = 0; - actor->state = 3; + if ((gTeamShields[this->aiType] <= 0) && (this->state != 3)) { + this->iwork[5] = 0; + this->state = 3; } if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) { - if ((actor->state != 2) && (actor->state != 3)) { - actor->iwork[4] = 1; - actor->state = 2; + if ((this->state != 2) && (this->state != 3)) { + this->iwork[4] = 1; + this->state = 2; } } } -bool func_hud_800915FC(Actor* actor) { +bool func_hud_800915FC(ActorTeamBoss* this) { s32 i; f32 y; Vec3f vec; @@ -4154,7 +4157,7 @@ bool func_hud_800915FC(Actor* actor) { Scenery360* scenery360; bool ret = false; - Math_Vec3fFromAngles(&vec, 0.0f, actor->rot_0F4.y, 650.0f + actor->fwork[9] * 10.0f); + Math_Vec3fFromAngles(&vec, 0.0f, this->rot_0F4.y, 650.0f + this->fwork[9] * 10.0f); if (gLevelMode == LEVELMODE_ALL_RANGE) { for (i = 0, scenery360 = &gScenery360[0]; i < 200; i++, scenery360++) { @@ -4162,15 +4165,15 @@ bool func_hud_800915FC(Actor* actor) { continue; } - if (fabsf(scenery360->obj.pos.x - (actor->obj.pos.x + vec.x)) > 1200.0f) { + if (fabsf(scenery360->obj.pos.x - (this->obj.pos.x + vec.x)) > 1200.0f) { continue; } - if (fabsf(scenery360->obj.pos.z - (actor->obj.pos.z + vec.z)) > 1200.0f) { + if (fabsf(scenery360->obj.pos.z - (this->obj.pos.z + vec.z)) > 1200.0f) { continue; } - if (actor->obj.pos.y + vec.y < 650.0f) { + if (this->obj.pos.y + vec.y < 650.0f) { ret = true; } } @@ -4183,7 +4186,7 @@ bool func_hud_800915FC(Actor* actor) { boss = &gBosses[0]; y = 650.0f; - if (actor->aiType < AI360_KATT) { + if (this->aiType < AI360_KATT) { y = 720.0f; } @@ -4191,16 +4194,16 @@ bool func_hud_800915FC(Actor* actor) { y = 280.0f; } - if (!(fabsf(boss->obj.pos.x - (actor->obj.pos.x + vec.x)) > 1000.0f) && - !(fabsf(boss->obj.pos.z - (actor->obj.pos.z + vec.z)) > 1000.0f) && - !(fabsf(boss->obj.pos.y - (actor->obj.pos.y)) > y)) { + if (!(fabsf(boss->obj.pos.x - (this->obj.pos.x + vec.x)) > 1000.0f) && + !(fabsf(boss->obj.pos.z - (this->obj.pos.z + vec.z)) > 1000.0f) && + !(fabsf(boss->obj.pos.y - (this->obj.pos.y)) > y)) { ret = true; } return ret; } -bool func_hud_80091864(Actor* actor) { +bool func_hud_80091864(ActorTeamBoss* this) { f32 sp44; f32 sp40; f32 sp3C; @@ -4210,26 +4213,25 @@ bool func_hud_80091864(Actor* actor) { f32 sp2C; f32 sp28; - x = actor->fwork[4] - actor->obj.pos.x; - y = actor->fwork[5] - actor->obj.pos.y; - z = actor->fwork[6] - actor->obj.pos.z; + x = this->fwork[4] - this->obj.pos.x; + y = this->fwork[5] - this->obj.pos.y; + z = this->fwork[6] - this->obj.pos.z; sp40 = Math_RadToDeg(Math_Atan2F(x, z)); sp44 = Math_RadToDeg(Math_Atan2F(y, sqrtf(SQ(x) + SQ(z)))); - if ((func_hud_800915FC(actor) != 0) && (actor->iwork[4] == 0)) { + if ((func_hud_800915FC(this) != 0) && (this->iwork[4] == 0)) { sp44 += 40.0f; if (sp44 >= 360.0f) { sp44 -= 360.0f; - } else if ((actor->obj.pos.y < (gGroundHeight + 50.0f)) && (gLevelType == LEVELTYPE_PLANET) && - (sp44 > 180.0f)) { + } else if ((this->obj.pos.y < (gGroundHeight + 50.0f)) && (gLevelType == LEVELTYPE_PLANET) && (sp44 > 180.0f)) { sp44 = 0.0f; } - actor->iwork[0] = 0; + this->iwork[0] = 0; } - sp3C = Math_SmoothStepToAngle(&actor->rot_0F4.y, sp40, 0.5f, actor->fwork[2], 0.001f) * 30.0f; - Math_SmoothStepToAngle(&actor->rot_0F4.x, sp44, 0.5f, actor->fwork[2], 0.0001f); + sp3C = Math_SmoothStepToAngle(&this->rot_0F4.y, sp40, 0.5f, this->fwork[2], 0.001f) * 30.0f; + Math_SmoothStepToAngle(&this->rot_0F4.x, sp44, 0.5f, this->fwork[2], 0.0001f); sp2C = sp28 = 0.0f; if (sp3C < 0.0f) { @@ -4238,10 +4240,10 @@ bool func_hud_80091864(Actor* actor) { sp28 = sp3C; } - Math_SmoothStepToF(&actor->fwork[15], sp2C, 0.2f, 30.0f, 0.00f); - Math_SmoothStepToF(&actor->fwork[26], -sp2C, 0.2f, 30.0f, 0.00f); - Math_SmoothStepToF(&actor->fwork[16], sp28, 0.2f, 30.0f, 0.00f); - Math_SmoothStepToF(&actor->fwork[27], -sp28, 0.2f, 30.0f, 0.00f); + Math_SmoothStepToF(&this->fwork[15], sp2C, 0.2f, 30.0f, 0.00f); + Math_SmoothStepToF(&this->fwork[26], -sp2C, 0.2f, 30.0f, 0.00f); + Math_SmoothStepToF(&this->fwork[16], sp28, 0.2f, 30.0f, 0.00f); + Math_SmoothStepToF(&this->fwork[27], -sp28, 0.2f, 30.0f, 0.00f); if (sp3C < 0.0f) { sp3C *= -1.0f; @@ -4249,101 +4251,101 @@ bool func_hud_80091864(Actor* actor) { sp3C = 360.0f - sp3C; } - Math_SmoothStepToF(&actor->fwork[7], actor->fwork[8], 0.2f, 30.0f, 0.0001f); + Math_SmoothStepToF(&this->fwork[7], this->fwork[8], 0.2f, 30.0f, 0.0001f); - if ((actor->fwork[7] > 0.01f) && (actor->fwork[7] < 359.9f)) { - Math_SmoothStepToAngle(&actor->obj.rot.z, actor->fwork[7], 0.2f, 100.0f, 0.01f); + if ((this->fwork[7] > 0.01f) && (this->fwork[7] < 359.9f)) { + Math_SmoothStepToAngle(&this->obj.rot.z, this->fwork[7], 0.2f, 100.0f, 0.01f); } else { - Math_SmoothStepToAngle(&actor->obj.rot.z, sp3C, 0.1f, 3.0f, 0.01f); + Math_SmoothStepToAngle(&this->obj.rot.z, sp3C, 0.1f, 3.0f, 0.01f); } return false; } -bool func_hud_80091B90(Actor* actor) { +bool func_hud_80091B90(ActorTeamBoss* this) { Vec3f vec; - actor->obj.rot.x = -actor->rot_0F4.x; - actor->obj.rot.y = actor->rot_0F4.y; + this->obj.rot.x = -this->rot_0F4.x; + this->obj.rot.y = this->rot_0F4.y; - Math_SmoothStepToF(&actor->fwork[0], actor->fwork[1], 0.2f, 1.0f, 0.0f); - Math_SmoothStepToF(&actor->fwork[2], actor->fwork[3], 1.0f, 1.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[0], this->fwork[1], 0.2f, 1.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[2], this->fwork[3], 1.0f, 1.0f, 0.0f); - Math_Vec3fFromAngles(&vec, actor->obj.rot.x, actor->obj.rot.y, actor->fwork[0] + actor->fwork[9]); + Math_Vec3fFromAngles(&vec, this->obj.rot.x, this->obj.rot.y, this->fwork[0] + this->fwork[9]); - actor->vel.y = actor->fwork[14] + vec.y; - actor->vel.x = actor->fwork[13] + vec.x; - actor->vel.z = actor->fwork[12] + vec.z; + this->vel.y = this->fwork[14] + vec.y; + this->vel.x = this->fwork[13] + vec.x; + this->vel.z = this->fwork[12] + vec.z; - actor->fwork[13] -= actor->fwork[13] * 0.1f; - actor->fwork[14] -= actor->fwork[14] * 0.1f; - actor->fwork[12] -= actor->fwork[12] * 0.1f; + this->fwork[13] -= this->fwork[13] * 0.1f; + this->fwork[14] -= this->fwork[14] * 0.1f; + this->fwork[12] -= this->fwork[12] * 0.1f; - if ((actor->obj.pos.y < gGroundHeight + 40.0f) && (actor->vel.y < 0.0f) && (gLevelType == LEVELTYPE_PLANET)) { - actor->obj.pos.y = gGroundHeight + 40.0f; - actor->vel.y = 0.0f; + if ((this->obj.pos.y < gGroundHeight + 40.0f) && (this->vel.y < 0.0f) && (gLevelType == LEVELTYPE_PLANET)) { + this->obj.pos.y = gGroundHeight + 40.0f; + this->vel.y = 0.0f; } - actor->vel.z -= gPathVelZ; + this->vel.z -= gPathVelZ; return false; } -bool func_hud_80091CF8(Actor* actor) { - if (actor->iwork[1] != 0) { - if (actor->fwork[10] < 0.1f) { - actor->fwork[10] = 20.0f; - AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); - actor->fwork[29] = 5.0f; +bool func_hud_80091CF8(ActorTeamBoss* this) { + if (this->iwork[1] != 0) { + if (this->fwork[10] < 0.1f) { + this->fwork[10] = 20.0f; + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, this->sfxSource, 0); + this->fwork[29] = 5.0f; } - actor->iwork[1] = 0; + this->iwork[1] = 0; } - Math_SmoothStepToF(&actor->fwork[10], 0.0f, 0.1f, 0.2f, 0.0f); - Math_SmoothStepToF(&actor->fwork[9], actor->fwork[10], 0.1f, 2.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[10], 0.0f, 0.1f, 0.2f, 0.0f); + Math_SmoothStepToF(&this->fwork[9], this->fwork[10], 0.1f, 2.0f, 0.0f); - if (actor->fwork[10] < 0.1f) { - actor->iwork[11] = 1; + if (this->fwork[10] < 0.1f) { + this->iwork[11] = 1; } return false; } -bool func_hud_80091DF4(Actor* actor) { - Vec3f sp44; - Vec3f sp38; +bool func_hud_80091DF4(ActorTeamBoss* this) { + Vec3f src; + Vec3f dest; - if ((actor->iwork[0] != 0) && (gBossHealthBar > 70)) { - actor->iwork[0] = 0; - sp44.x = 0.0f; - sp44.y = 0.0f; - sp44.z = 100.0f; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); - Actor_SpawnPlayerLaser(actor->aiType, actor->obj.pos.x + (sp38.x * 1.5), actor->obj.pos.y + (sp38.y * 1.5), - actor->obj.pos.z + (sp38.z * 1.5), sp38.x, sp38.y, sp38.z, actor->obj.rot.x, - actor->obj.rot.y, actor->obj.rot.z); + if ((this->iwork[0] != 0) && (gBossHealthBar > 70)) { + this->iwork[0] = 0; + src.x = 0.0f; + src.y = 0.0f; + src.z = 100.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + Actor_SpawnPlayerLaser(this->aiType, this->obj.pos.x + (dest.x * 1.5), this->obj.pos.y + (dest.y * 1.5), + this->obj.pos.z + (dest.z * 1.5), dest.x, dest.y, dest.z, this->obj.rot.x, + this->obj.rot.y, this->obj.rot.z); } return false; } -bool func_hud_80091F00(Actor* actor) { - u8 temp_v0 = actor->dmgType; +bool func_hud_80091F00(ActorTeamBoss* this) { + u8 temp_v0 = this->dmgType; Vec3f sp40; Vec3f sp34; - actor->dmgType = DMG_NONE; + this->dmgType = DMG_NONE; - if ((actor->state == 3) || (temp_v0 == DMG_EXPLOSION)) { + if ((this->state == 3) || (temp_v0 == DMG_EXPLOSION)) { return false; } - actor->health -= actor->damage; - if (actor->health <= 0) { - actor->health = -1; + this->health -= this->damage; + if (this->health <= 0) { + this->health = -1; } - actor->timer_0C6 = 20; + this->timer_0C6 = 20; - AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, actor->sfxSource, 4); - func_effect_8007D10C(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 1.5f); - Matrix_RotateY(gCalcMatrix, actor->rot_0F4.y * M_DTOR, MTXF_NEW); + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, this->sfxSource, 4); + func_effect_8007D10C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1.5f); + Matrix_RotateY(gCalcMatrix, this->rot_0F4.y * M_DTOR, MTXF_NEW); if (Rand_ZeroOne() < 0.5f) { sp40.x = -20.0f; @@ -4356,18 +4358,18 @@ bool func_hud_80091F00(Actor* actor) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp40, &sp34); - actor->fwork[13] = sp34.x; - actor->fwork[14] = sp34.y; - actor->fwork[12] = sp34.z; + this->fwork[13] = sp34.x; + this->fwork[14] = sp34.y; + this->fwork[12] = sp34.z; - gTeamShields[actor->aiType] = actor->health; + gTeamShields[this->aiType] = this->health; if (gRadioState != 0) { return false; } - if ((actor->dmgType == DMG_COLLISION) && (actor->dmgSource == AI360_FOX + 1)) { - switch (actor->aiType) { + if ((this->dmgType == DMG_COLLISION) && (this->dmgSource == AI360_FOX + 1)) { + switch (this->aiType) { case AI360_FALCO: Radio_PlayMessage(gMsg_ID_20210, RCID_FALCO); break; @@ -4380,8 +4382,8 @@ bool func_hud_80091F00(Actor* actor) { } } - if ((actor->dmgType != DMG_COLLISION) && (actor->dmgSource == AI360_FOX + 1)) { - switch (actor->aiType) { + if ((this->dmgType != DMG_COLLISION) && (this->dmgSource == AI360_FOX + 1)) { + switch (this->aiType) { case AI360_FALCO: Radio_PlayMessage(gMsg_ID_20060, RCID_FALCO); break; @@ -4394,8 +4396,8 @@ bool func_hud_80091F00(Actor* actor) { } } - if ((actor->dmgSource == DMG_SRC_2) || (actor->dmgSource == DMG_SRC_100)) { - switch (actor->aiType) { + if ((this->dmgSource == DMG_SRC_2) || (this->dmgSource == DMG_SRC_100)) { + switch (this->aiType) { case AI360_FALCO: Radio_PlayMessage(gMsg_ID_20030, RCID_FALCO); break; @@ -4407,279 +4409,278 @@ bool func_hud_80091F00(Actor* actor) { break; } } - actor->iwork[8] = 20; + this->iwork[8] = 20; return false; } -void func_hud_80092244(Actor* actor) { - gRadarMarks[actor->index].status = 1; - gRadarMarks[actor->index].type = actor->aiType; - gRadarMarks[actor->index].pos.x = actor->obj.pos.x; - gRadarMarks[actor->index].pos.y = actor->obj.pos.y; - gRadarMarks[actor->index].pos.z = actor->obj.pos.z; - gRadarMarks[actor->index].yRot = actor->rot_0F4.y + 180.0f; +void func_hud_80092244(ActorTeamBoss* this) { + gRadarMarks[this->index].status = 1; + gRadarMarks[this->index].type = this->aiType; + gRadarMarks[this->index].pos.x = this->obj.pos.x; + gRadarMarks[this->index].pos.y = this->obj.pos.y; + gRadarMarks[this->index].pos.z = this->obj.pos.z; + gRadarMarks[this->index].yRot = this->rot_0F4.y + 180.0f; } -void func_hud_800922F4(Actor* actor) { - s32 temp; +void func_hud_800922F4(ActorTeamBoss* this) { + s32 mask; - if ((gTeamShields[actor->aiType] < 64) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) { - temp = 8 - 1; - if (gTeamShields[actor->aiType] > 16) { - temp = 16 - 1; + if ((gTeamShields[this->aiType] < 64) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) { + mask = 8 - 1; + if (gTeamShields[this->aiType] > 16) { + mask = 16 - 1; } - if (gTeamShields[actor->aiType] > 32) { - temp = 32 - 1; + if (gTeamShields[this->aiType] > 32) { + mask = 32 - 1; } - if (gTeamShields[actor->aiType] > 48) { - temp = 64 - 1; + if (gTeamShields[this->aiType] > 48) { + mask = 64 - 1; } - if ((gGameFrameCount & temp) == 0) { - func_effect_8007D10C(actor->obj.pos.x + RAND_FLOAT_CENTERED(10.0f), actor->obj.pos.y + RAND_FLOAT(10.0f), - actor->obj.pos.z + RAND_FLOAT_CENTERED(10.0f), 2.2f); + if ((gGameFrameCount & mask) == 0) { + func_effect_8007D10C(this->obj.pos.x + RAND_FLOAT_CENTERED(10.0f), this->obj.pos.y + RAND_FLOAT(10.0f), + this->obj.pos.z + RAND_FLOAT_CENTERED(10.0f), 2.2f); } - if (!(gGameFrameCount & (temp >> 2)) && (Rand_ZeroOne() < 0.5f)) { - func_effect_8007C120(actor->obj.pos.x + RAND_FLOAT_CENTERED(30.0f), actor->obj.pos.y + RAND_FLOAT(10.0f), - actor->obj.pos.z + RAND_FLOAT_CENTERED(30.0f), actor->vel.x, actor->vel.y, - actor->vel.z, actor->scale * 0.07f, 3); + if (!(gGameFrameCount & (mask >> 2)) && (Rand_ZeroOne() < 0.5f)) { + Effect_Effect390_Spawn(this->obj.pos.x + RAND_FLOAT_CENTERED(30.0f), this->obj.pos.y + RAND_FLOAT(10.0f), + this->obj.pos.z + RAND_FLOAT_CENTERED(30.0f), this->vel.x, this->vel.y, this->vel.z, + this->scale * 0.07f, 3); } } } -bool func_hud_800924E0(Actor* actor) { +bool func_hud_800924E0(ActorTeamBoss* this) { Vec3f src; Vec3f dest; f32 var_fv0; bool ret = false; - if (actor->iwork[7] == 0) { - actor->vwork[29].x = actor->obj.rot.x; - actor->iwork[7] = 1; - actor->iwork[1] = 1; + if (this->iwork[7] == 0) { + this->vwork[29].x = this->obj.rot.x; + this->iwork[7] = 1; + this->iwork[1] = 1; } - if (actor->fwork[29] < 2.0f) { - actor->fwork[29] = 2.0f; + if (this->fwork[29] < 2.0f) { + this->fwork[29] = 2.0f; } var_fv0 = 60.0f; - if (actor->fwork[19] > 240.0f) { + if (this->fwork[19] > 240.0f) { var_fv0 = -50.0f; } - Math_SmoothStepToF(&actor->fwork[15], var_fv0, 0.3f, 100.0f, 0.0f); - Math_SmoothStepToF(&actor->fwork[26], var_fv0, 0.3f, 100.0f, 0.0f); - Math_SmoothStepToF(&actor->fwork[16], var_fv0, 0.3f, 100.0f, 0.0f); - Math_SmoothStepToF(&actor->fwork[27], var_fv0, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[15], var_fv0, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[26], var_fv0, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[16], var_fv0, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[27], var_fv0, 0.3f, 100.0f, 0.0f); - if (actor->fwork[19] < 180.0f) { - actor->obj.pos.y += 2.0f; + if (this->fwork[19] < 180.0f) { + this->obj.pos.y += 2.0f; } - if (Math_SmoothStepToF(&actor->fwork[19], 360.0f, 0.1f, 5.0f, 0.01f) == 0.0f) { - actor->obj.rot.x = actor->vwork[29].x; - actor->fwork[19] = actor->vwork[29].x = 0.0f; + if (Math_SmoothStepToF(&this->fwork[19], 360.0f, 0.1f, 5.0f, 0.01f) == 0.0f) { + this->obj.rot.x = this->vwork[29].x; + this->fwork[19] = this->vwork[29].x = 0.0f; ret = true; - actor->iwork[7] = 0; - actor->fwork[29] = 1.0f; + this->iwork[7] = 0; + this->fwork[29] = 1.0f; } - if (actor->iwork[7] != 0) { - Math_SmoothStepToAngle(&actor->vwork[29].x, 0.0f, 0.1f, 5.0f, 0.0f); - Math_SmoothStepToAngle(&actor->obj.rot.z, 0.0f, 0.1f, 5.0f, 0.0f); - actor->obj.rot.x = actor->vwork[29].x + (360.0f - actor->fwork[19]); + if (this->iwork[7] != 0) { + Math_SmoothStepToAngle(&this->vwork[29].x, 0.0f, 0.1f, 5.0f, 0.0f); + Math_SmoothStepToAngle(&this->obj.rot.z, 0.0f, 0.1f, 5.0f, 0.0f); + this->obj.rot.x = this->vwork[29].x + (360.0f - this->fwork[19]); - Matrix_RotateY(gCalcMatrix, actor->rot_0F4.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(M_DTOR * ((actor->rot_0F4.x + actor->vwork[29].x) + actor->fwork[19])), - MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, this->rot_0F4.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(M_DTOR * ((this->rot_0F4.x + this->vwork[29].x) + this->fwork[19])), MTXF_APPLY); - src.z = actor->fwork[1]; + src.z = this->fwork[1]; src.y = 0.0f; src.x = 0.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - actor->vel.x = dest.x; - actor->vel.y = dest.y; - actor->vel.z = dest.z; + this->vel.x = dest.x; + this->vel.y = dest.y; + this->vel.z = dest.z; - if (actor->obj.pos.y < gGroundHeight + 50.0f) { - actor->obj.pos.y = gGroundHeight + 50.0f; - actor->vel.y = 0.0f; + if (this->obj.pos.y < gGroundHeight + 50.0f) { + this->obj.pos.y = gGroundHeight + 50.0f; + this->vel.y = 0.0f; } } return ret; } -bool func_hud_800927A0(Actor* actor) { +bool func_hud_800927A0(ActorTeamBoss* this) { Vec3f src; Vec3f dest; f32 sp54; f32 sp50; bool ret = false; - if (actor->iwork[11] == 0) { - actor->unk_046 = 0; - actor->iwork[11] = 1; - actor->iwork[1] = 1; - actor->vwork[29].x = actor->obj.rot.x; - actor->vwork[29].y = actor->obj.rot.y; - actor->vwork[29].z = actor->obj.rot.z; + if (this->iwork[11] == 0) { + this->unk_046 = 0; + this->iwork[11] = 1; + this->iwork[1] = 1; + this->vwork[29].x = this->obj.rot.x; + this->vwork[29].y = this->obj.rot.y; + this->vwork[29].z = this->obj.rot.z; } else { - Math_SmoothStepToAngle(&actor->vwork[29].z, 0.0f, 0.1f, 5.0f, 0.0f); - Math_SmoothStepToAngle(&actor->vwork[29].y, 0.0f, 0.1f, 5.0f, 0.0f); - Math_SmoothStepToAngle(&actor->vwork[29].x, 0.0f, 0.1f, 5.0f, 0.0f); - sp50 = Math_RadToDeg(Math_Atan2F(0.0f - actor->obj.pos.x, 0.0f - actor->obj.pos.z)); + Math_SmoothStepToAngle(&this->vwork[29].z, 0.0f, 0.1f, 5.0f, 0.0f); + Math_SmoothStepToAngle(&this->vwork[29].y, 0.0f, 0.1f, 5.0f, 0.0f); + Math_SmoothStepToAngle(&this->vwork[29].x, 0.0f, 0.1f, 5.0f, 0.0f); + sp50 = Math_RadToDeg(Math_Atan2F(0.0f - this->obj.pos.x, 0.0f - this->obj.pos.z)); - switch (actor->unk_046) { + switch (this->unk_046) { case 0: - if (actor->unk_04A != 0) { - actor->timer_0BC = 30; + if (this->unk_04A != 0) { + this->timer_0BC = 30; } else { - actor->timer_0BC = 10; + this->timer_0BC = 10; } - actor->unk_046 = 1; - if (actor->fwork[19] > 180.0f) { - actor->fwork[19] = actor->fwork[19] - 360.0f; + this->unk_046 = 1; + if (this->fwork[19] > 180.0f) { + this->fwork[19] = this->fwork[19] - 360.0f; } case 1: - if (actor->timer_0BC == 0) { - actor->unk_046 = 2; - if (actor->unk_04A != 0) { - actor->timer_0BC = 80; + if (this->timer_0BC == 0) { + this->unk_046 = 2; + if (this->unk_04A != 0) { + this->timer_0BC = 80; } else { - actor->timer_0BC = 60; + this->timer_0BC = 60; } - Math_SmoothStepToF(&actor->fwork[20], 0.0f, 0.1f, 15.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[20], 0.0f, 0.1f, 15.0f, 0.0f); } break; case 2: - if (actor->fwork[19] > 140.0f) { + if (this->fwork[19] > 140.0f) { sp54 = 0.0f; } else { sp54 = 60.0f; } - Math_SmoothStepToF(&actor->fwork[15], sp54, 0.3f, 100.0f, 0.0f); - Math_SmoothStepToF(&actor->fwork[26], sp54, 0.3f, 100.0f, 0.0f); - Math_SmoothStepToF(&actor->fwork[16], sp54, 0.3f, 100.0f, 0.0f); - Math_SmoothStepToF(&actor->fwork[27], sp54, 0.3f, 100.0f, 0.0f); - Math_SmoothStepToF(&actor->fwork[19], 190.0f, 0.1f, 6.0f, 0.001f); - Math_SmoothStepToF(&actor->fwork[20], 0.0f, 0.1f, 15.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[15], sp54, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[26], sp54, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[16], sp54, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[27], sp54, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[19], 190.0f, 0.1f, 6.0f, 0.001f); + Math_SmoothStepToF(&this->fwork[20], 0.0f, 0.1f, 15.0f, 0.0f); - if (actor->fwork[19] > 180.0f) { - actor->rot_0F4.y += 180.0f; - if (actor->rot_0F4.y >= 360.0f) { - actor->rot_0F4.y = actor->rot_0F4.y - 360.0f; + if (this->fwork[19] > 180.0f) { + this->rot_0F4.y += 180.0f; + if (this->rot_0F4.y >= 360.0f) { + this->rot_0F4.y = this->rot_0F4.y - 360.0f; } - actor->fwork[19] -= 180.0f; + this->fwork[19] -= 180.0f; - if ((sp50 - actor->rot_0F4.y) < 180.0f) { - actor->fwork[20] = 180.0f; + if ((sp50 - this->rot_0F4.y) < 180.0f) { + this->fwork[20] = 180.0f; } else { - actor->fwork[20] = -180.0f; + this->fwork[20] = -180.0f; } - actor->iwork[1] = 1; - actor->unk_046 = 3; + this->iwork[1] = 1; + this->unk_046 = 3; } - actor->fwork[28] -= 0.2f; + this->fwork[28] -= 0.2f; break; case 3: - if (actor->fwork[29] < 2.0f) { - actor->fwork[29] = 2.0f; + if (this->fwork[29] < 2.0f) { + this->fwork[29] = 2.0f; } - Math_SmoothStepToF(&actor->fwork[20], 0.0f, 0.1f, 15.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[20], 0.0f, 0.1f, 15.0f, 0.0f); - sp54 = actor->fwork[20] * 0.3f; + sp54 = this->fwork[20] * 0.3f; - Math_SmoothStepToF(&actor->fwork[15], sp54, 0.3f, 100.0f, 0.0f); - Math_SmoothStepToF(&actor->fwork[26], sp54, 0.3f, 100.0f, 0.0f); - Math_SmoothStepToF(&actor->fwork[16], -sp54, 0.3f, 100.0f, 0.0f); - Math_SmoothStepToF(&actor->fwork[27], -sp54, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[15], sp54, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[26], sp54, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[16], -sp54, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[27], -sp54, 0.3f, 100.0f, 0.0f); - if (actor->unk_04A != 0) { - Math_SmoothStepToAngle(&actor->rot_0F4.y, sp50, 0.1f, 2.0f, 0.0f); + if (this->unk_04A != 0) { + Math_SmoothStepToAngle(&this->rot_0F4.y, sp50, 0.1f, 2.0f, 0.0f); } - if (actor->obj.pos.y < gPlayer[0].pathHeight) { - if (actor->fwork[28] < 0.0f) { - actor->fwork[28] = actor->fwork[28] + 0.2f; + if (this->obj.pos.y < gPlayer[0].pathHeight) { + if (this->fwork[28] < 0.0f) { + this->fwork[28] = this->fwork[28] + 0.2f; } } else { - actor->fwork[28] -= 0.2f; + this->fwork[28] -= 0.2f; } - if (actor->timer_0BC == 0) { + if (this->timer_0BC == 0) { ret = true; - actor->iwork[11] = 0; - actor->unk_046 = 0; - actor->fwork[28] = 0.0f; - actor->fwork[20] = 0.0f; - actor->fwork[29] = 1.0f; + this->iwork[11] = 0; + this->unk_046 = 0; + this->fwork[28] = 0.0f; + this->fwork[20] = 0.0f; + this->fwork[29] = 1.0f; } break; } - actor->obj.rot.x = actor->vwork[29].x - actor->fwork[19]; - actor->obj.rot.y = actor->rot_0F4.y; - actor->obj.rot.z = actor->vwork[29].z + actor->fwork[20]; - actor->obj.pos.y += actor->fwork[28]; + this->obj.rot.x = this->vwork[29].x - this->fwork[19]; + this->obj.rot.y = this->rot_0F4.y; + this->obj.rot.z = this->vwork[29].z + this->fwork[20]; + this->obj.pos.y += this->fwork[28]; - Matrix_RotateY(gCalcMatrix, actor->rot_0F4.y * M_DTOR, 0U); - Matrix_RotateX(gCalcMatrix, -(M_DTOR * (actor->rot_0F4.x + actor->vwork[29].x + actor->fwork[19])), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, this->rot_0F4.y * M_DTOR, 0U); + Matrix_RotateX(gCalcMatrix, -(M_DTOR * (this->rot_0F4.x + this->vwork[29].x + this->fwork[19])), MTXF_APPLY); - src.z = actor->fwork[1]; + src.z = this->fwork[1]; src.y = 0.0f; src.x = 0.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - actor->vel.x = dest.x; - actor->vel.y = dest.y; - actor->vel.z = dest.z; + this->vel.x = dest.x; + this->vel.y = dest.y; + this->vel.z = dest.z; } return ret; } -void ActorTeamBoss_Init(Actor* actor) { +void ActorTeamBoss_Init(ActorTeamBoss* this) { s32 D_800D22A8[] = { TEAM_ID_FALCO, TEAM_ID_SLIPPY, TEAM_ID_PEPPY }; if (gCurrentLevel != LEVEL_TITANIA) { - actor->fwork[1] = 40.0f; - actor->fwork[3] = 1.2f; - actor->aiType = (D_hud_800D1970 % 4U) + 1; + this->fwork[1] = 40.0f; + this->fwork[3] = 1.2f; + this->aiType = (D_hud_800D1970 % 4U) + 1; D_hud_800D1970++; } else { - actor->state = 7; - actor->aiType = AI360_SLIPPY; - actor->iwork[5] = 0; + this->state = 7; + this->aiType = AI360_SLIPPY; + this->iwork[5] = 0; gTeamShields[TEAM_ID_SLIPPY] = 255; } - actor->iwork[12] = D_800D22A8[actor->aiType - 1]; - actor->iwork[11] = 1; + this->iwork[12] = D_800D22A8[this->aiType - 1]; + this->iwork[11] = 1; if (gLevelType == LEVELTYPE_PLANET) { - actor->drawShadow = true; + this->drawShadow = true; } - AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); if (((s32) (D_hud_800D1970 % 4U) == AI360_SLIPPY) && (gCurrentLevel == LEVEL_SECTOR_X)) { - Object_Kill(&actor->obj, actor->sfxSource); + Object_Kill(&this->obj, this->sfxSource); } - if (gTeamShields[actor->aiType] <= 0) { - Object_Kill(&actor->obj, actor->sfxSource); + if (gTeamShields[this->aiType] <= 0) { + Object_Kill(&this->obj, this->sfxSource); } } @@ -4761,64 +4762,63 @@ void ActorTeamBoss_Update(ActorTeamBoss* this) { this->iwork[10] = 0; } -void func_hud_80093164(Actor* actor) { +void func_hud_80093164(ActorCutscene* this) { Vec3f src; Vec3f dest; Player* player = &gPlayer[0]; - if (actor->state == 0) { - switch (actor->animFrame) { + if (this->state == 0) { + switch (this->animFrame) { case 1: - if ((player->state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO) || (actor->animFrame != 1)) { + if ((player->state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO) || (this->animFrame != 1)) { if (gCsFrameCount > 1588) { - actor->fwork[0] = 5.0f; + this->fwork[0] = 5.0f; } else { - actor->fwork[0] = 15.0f; + this->fwork[0] = 15.0f; } - actor->fwork[0] = 12.0f; + this->fwork[0] = 12.0f; } break; case 41: - Aquas_801BE034(actor); + Aquas_CsAqFishGroup_Update(this); break; case 44: - actor->iwork[0]++; - if (actor->iwork[0] > 118) { - actor->iwork[0] = 0; + this->iwork[0]++; + if (this->iwork[0] > 118) { + this->iwork[0] = 0; } break; } } - Matrix_RotateY(gCalcMatrix, (actor->rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(actor->rot_0F4.x * M_DTOR), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (this->rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(this->rot_0F4.x * M_DTOR), MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; - src.z = actor->fwork[0]; + src.z = this->fwork[0]; Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - actor->vel.x = dest.x; - actor->vel.y = dest.y; - actor->vel.z = dest.z; - actor->obj.rot.x = -actor->rot_0F4.x; - actor->obj.rot.y = actor->rot_0F4.y + 180.0f; - actor->obj.rot.z = -actor->rot_0F4.z; + this->vel.x = dest.x; + this->vel.y = dest.y; + this->vel.z = dest.z; + this->obj.rot.x = -this->rot_0F4.x; + this->obj.rot.y = this->rot_0F4.y + 180.0f; + this->obj.rot.z = -this->rot_0F4.z; } void func_hud_80093310(void) { - Actor* this = &gActors[0]; + ActorCutscene* actor = &gActors[0]; - Actor_Initialize(this); - this->obj.status = OBJ_INIT; - this->obj.pos.x = 0.0f; - this->obj.pos.y += 1700.0f; - this->obj.pos.z -= 5000.0f; - gActors[0].animFrame = 1; - if (1) {} - this->obj.id = OBJ_ACTOR_CUTSCENE; - Object_SetInfo(&this->info, this->obj.id); - AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, this->sfxSource, 0); + Actor_Initialize(actor); + actor->obj.status = OBJ_INIT; + actor->obj.pos.x = 0.0f; + actor->obj.pos.y += 1700.0f; + actor->obj.pos.z -= 5000.0f; + actor->animFrame = 1; + actor->obj.id = OBJ_ACTOR_CUTSCENE; + Object_SetInfo(&actor->info, actor->obj.id); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); } void func_hud_800933D8(f32 x, f32 y, f32 z, f32 arg3) { @@ -5158,7 +5158,7 @@ void HUD_AquasStart(Player* player) { player->pos.z = dest.z; if (((player->csTimer % 8) == 0) && (player->csTimer > 740)) { - func_effect_8007D9DC(player->cam.eye.x, 1600.0f, player->cam.eye.z, 10.0f, 100.0f, 0); + Effect_Effect367_Spawn(player->cam.eye.x, 1600.0f, player->cam.eye.z, 10.0f, 100.0f, 0); } if ((player->unk_018 > -200.0f) && (D_ctx_80177A10[8] < 6)) { @@ -5173,9 +5173,9 @@ void HUD_AquasStart(Player* player) { if (((gGameFrameCount % 3) == 0) && (player->csTimer <= 740)) { for (i = 0; i < 8; i++) { - Aquas_801AC8A8(player->cam.eye.x + RAND_FLOAT_CENTERED(D_800D22C4), - player->cam.eye.y + 260.0f + RAND_FLOAT_CENTERED(D_800D22C8), - player->cam.eye.z + RAND_FLOAT_CENTERED(D_800D22CC), 1.0f, 0); + Aquas_Effect366_Spawn(player->cam.eye.x + RAND_FLOAT_CENTERED(D_800D22C4), + player->cam.eye.y + 260.0f + RAND_FLOAT_CENTERED(D_800D22C8), + player->cam.eye.z + RAND_FLOAT_CENTERED(D_800D22CC), 1.0f, 0); } } } @@ -5265,8 +5265,9 @@ void HUD_AquasStart(Player* player) { AUDIO_PLAY_BGM(NA_BGM_STAGE_AQ); } - Aquas_801AC8A8(player->pos.x + RAND_FLOAT_CENTERED(10.0f), player->pos.y + RAND_FLOAT_CENTERED(10.0f), - player->pos.z - 65.0f + RAND_FLOAT_CENTERED(10.0f), 0.4f, 1); + Aquas_Effect366_Spawn(player->pos.x + RAND_FLOAT_CENTERED(10.0f), + player->pos.y + RAND_FLOAT_CENTERED(10.0f), + player->pos.z - 65.0f + RAND_FLOAT_CENTERED(10.0f), 0.4f, 1); break; default: @@ -5307,74 +5308,74 @@ f32 D_800D24C0[] = { 128.0f, 128.0f, 255.0f, 128.0f }; s32 D_800D24C8[] = { 0, 900 }; f32 D_800D24CC = 0.02f; -void Hud_Effect363_Update(Effect* effect) { +void Hud_Effect363_Update(Effect363* this) { Player* player = &gPlayer[0]; if ((player->state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && (gCurrentLevel == LEVEL_AQUAS) && (player->csState < 2)) { - switch (effect->state) { + switch (this->state) { case 0: - effect->unk_44 += effect->unk_46; - effect->unk_4A = effect->unk_44; - effect->scale2 += 0.01f; + this->unk_44 += this->unk_46; + this->unk_4A = this->unk_44; + this->scale2 += 0.01f; - if (effect->unk_4A >= 200) { - effect->state = 1; - effect->unk_4A = 200; + if (this->unk_4A >= 200) { + this->state = 1; + this->unk_4A = 200; } break; case 1: - effect->unk_4A -= effect->unk_46; - effect->scale2 -= 0.1f; + this->unk_4A -= this->unk_46; + this->scale2 -= 0.1f; break; } - if ((effect->state == 1) && (effect->unk_4A <= 0)) { - Object_Kill(&effect->obj, effect->sfxSource); + if ((this->state == 1) && (this->unk_4A <= 0)) { + Object_Kill(&this->obj, this->sfxSource); } - effect->vel.y += effect->scale1; - effect->scale1 -= 0.05f; + this->vel.y += this->scale1; + this->scale1 -= 0.05f; - if (effect->scale1 < -1.0f) { - effect->scale1 = -1.0f; + if (this->scale1 < -1.0f) { + this->scale1 = -1.0f; } - effect->obj.rot.z += effect->unk_48; + this->obj.rot.z += this->unk_48; } else { if (player->state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) { - effect->obj.rot.x = RAD_TO_DEG(player->camPitch); - effect->obj.rot.y = RAD_TO_DEG(-player->camYaw); + this->obj.rot.x = RAD_TO_DEG(player->camPitch); + this->obj.rot.y = RAD_TO_DEG(-player->camYaw); } if (player->state_1C8 == PLAYERSTATE_1C8_NEXT) { - effect->unk_46 = 2; + this->unk_46 = 2; if (player->csState >= 4) { - effect->vel.y -= 0.13f; + this->vel.y -= 0.13f; } } - effect->scale2 += 0.8f; - effect->unk_4A -= effect->unk_46; + this->scale2 += 0.8f; + this->unk_4A -= this->unk_46; - if ((effect->unk_4A < 0) || ((player->state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && - (gCurrentLevel == LEVEL_AQUAS) && (player->csState == 5))) { - Object_Kill(&effect->obj, effect->sfxSource); + if ((this->unk_4A < 0) || ((player->state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && + (gCurrentLevel == LEVEL_AQUAS) && (player->csState == 5))) { + Object_Kill(&this->obj, this->sfxSource); } - effect->obj.rot.z += effect->unk_48; + this->obj.rot.z += this->unk_48; } } -void Hud_Effect363_Draw(Effect* effect) { +void Hud_Effect363_Draw(Effect363* this) { if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && (gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].csState < 2)) { RCP_SetupDL(&gMasterDisp, SETUPDL_68); - gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 21, 34, effect->unk_4A); + gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 21, 34, this->unk_4A); gDPSetEnvColor(gMasterDisp++, 255, 255, 251, 0); - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); gSPDisplayList(gMasterDisp++, D_1023750); } else { - Graphics_SetScaleMtx(effect->scale2); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_4A); + Graphics_SetScaleMtx(this->scale2); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_4A); gSPDisplayList(gMasterDisp++, D_1023750); } } @@ -5519,15 +5520,15 @@ void func_hud_80094D20(f32 x, f32 y) { } } -void func_hud_80095350(Actor* actor) { - Actor_Initialize(actor); - actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_CUTSCENE; - actor->animFrame = 9999; - Object_SetInfo(&actor->info, actor->obj.id); +void func_hud_80095350(ActorCutscene* this) { + Actor_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_ACTOR_CUTSCENE; + this->animFrame = 9999; + Object_SetInfo(&this->info, this->obj.id); } -void func_hud_800953A0(Actor* actor, s32 arg1) { +void func_hud_800953A0(ActorCutscene* this, s32 arg1) { Vec3f D_800D2510[] = { { 1800.0f, 0.0f, -4000.0f }, { -1000.0f, 0.0f, -4800.0f }, @@ -5535,31 +5536,31 @@ void func_hud_800953A0(Actor* actor, s32 arg1) { { -200.0f, 0.0f, -7000.0f }, }; - Actor_Initialize(actor); - actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.pos = D_800D2510[arg1]; - actor->obj.pos.z -= gPathProgress; - actor->animFrame = 45; - Object_SetInfo(&actor->info, actor->obj.id); + Actor_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_ACTOR_CUTSCENE; + this->obj.pos = D_800D2510[arg1]; + this->obj.pos.z -= gPathProgress; + this->animFrame = 45; + Object_SetInfo(&this->info, this->obj.id); } -void func_hud_8009546C(Actor* actor, s32 arg1) { +void func_hud_8009546C(ActorCutscene* this, s32 arg1) { Vec3f D_800D2540[] = { { 1300.0f, 0.0f, -2000.0f }, { -1000.0f, 0.0f, -3000.0f }, { 800.0f, 0.0f, 0.0f }, { -1200.0f, 0.0f, -1000.0f }, { -1400.0f, 0.0f, 700.0f }, }; - Actor_Initialize(actor); - actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.pos = D_800D2540[arg1]; - actor->obj.pos.z -= gPathProgress; - actor->animFrame = 46; - Object_SetInfo(&actor->info, actor->obj.id); + Actor_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_ACTOR_CUTSCENE; + this->obj.pos = D_800D2540[arg1]; + this->obj.pos.z -= gPathProgress; + this->animFrame = 46; + Object_SetInfo(&this->info, this->obj.id); } -void func_hud_80095538(Actor* actor, s32 arg1) { +void func_hud_80095538(Actor* actor, s32 index) { Vec3f D_800D257C[] = { { 0.0f, 0.0f, -200.0f }, { -300.0f, 0.0f, -700.0f }, { 400.0f, 0.0f, -900.0f }, { 300.0f, 0.0f, -1700.0f }, { -260.0f, 0.0f, -2000.0f }, { -200.0f, 0.0f, -2600.0f }, @@ -5568,7 +5569,7 @@ void func_hud_80095538(Actor* actor, s32 arg1) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; actor->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.pos = D_800D257C[arg1]; + actor->obj.pos = D_800D257C[index]; actor->obj.pos.z -= gPathProgress; actor->animFrame = 47; Object_SetInfo(&actor->info, actor->obj.id); @@ -5958,9 +5959,9 @@ void HUD_AquasComplete(Player* player) { src.y = 0.0f; src.z = -70.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - Aquas_801AC8A8(player->pos.x + dest.x + RAND_FLOAT_CENTERED(10.0f), - player->pos.y + dest.y + RAND_FLOAT_CENTERED(10.0f), - player->pos.z + dest.z + RAND_FLOAT_CENTERED(10.0f), 0.4f, 1); + Aquas_Effect366_Spawn(player->pos.x + dest.x + RAND_FLOAT_CENTERED(10.0f), + player->pos.y + dest.y + RAND_FLOAT_CENTERED(10.0f), + player->pos.z + dest.z + RAND_FLOAT_CENTERED(10.0f), 0.4f, 1); } player->unk_178 += 20.0f; diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index 6651bf43..7fc39ca5 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -86,6 +86,7 @@ void Play_UpdateDynaFloor(void) { f32 sp84; gDynaFloorTimer++; + switch (gCurrentLevel) { case LEVEL_SOLAR: if ((gGameFrameCount % 2) != 0) { @@ -100,6 +101,7 @@ void Play_UpdateDynaFloor(void) { sp88 = 2.2f; sp84 = 0.5f; break; + case LEVEL_ZONESS: if ((gGameFrameCount % 2) != 0) { spB4 = SEGMENTED_TO_VIRTUAL(D_ZO_6009ED0); @@ -114,29 +116,38 @@ void Play_UpdateDynaFloor(void) { sp84 = 2.0f; break; } + var_s3 = D_ctx_801782CC; var_s5 = D_ctx_801782D4; var_s4 = D_ctx_801782DC; var_s0 = D_ctx_801782E4; var_s1 = D_ctx_801782EC; + for (i = 0; i < 17 * 17; i++, var_s3++, var_s5++, var_s4++, var_s0++, var_s1++, spB0++) { Math_SmoothStepToF(var_s3, *var_s5, sp8C, *var_s4, 0.0f); Math_SmoothStepToF(var_s4, 100.0f, 1.0f, sp84, 0.0f); + if ((gDynaFloorTimer & spA8) == (i & spA8)) { *var_s5 = RAND_FLOAT(sp90); *var_s4 = 0.0f; } + *var_s0 += *var_s1; *var_s1 -= 0.5f; if (*var_s0 < 0.0f) { *var_s1 = *var_s0 = 0.0f; } + spB4[*spB0].n.ob[1] = (s16) *var_s3 + (s16) *var_s0; + Matrix_RotateZ(gCalcMatrix, *var_s3 * sp88 * M_DTOR, MTXF_NEW); + spC4.x = 120.0f; spC4.y = 0.0f; spC4.z = 0.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &spC4, &spB8); + spB4[*spB0].n.n[0] = spB8.x; spB4[*spB0].n.n[1] = spB8.y; spB4[*spB0].n.n[2] = spB8.z; @@ -154,6 +165,7 @@ void Player_WingEffects(Player* player) { player->xRock = SIN_DEG(player->rockPhase * 0.7f) * 0.5f; player->bobPhase += 10.0f; player->rockPhase += 8.0f; + if ((gLevelType == LEVELTYPE_PLANET) || ((player->alternateView == true) && (gLevelMode == LEVELMODE_ON_RAILS))) { player->yBob = -SIN_DEG(player->bobPhase) * 0.5f; @@ -177,9 +189,9 @@ void Player_DamageEffects(Player* player) { player->hit1.z, 1.0f); } if (((gGameFrameCount % 2U) == 0) && (Rand_ZeroOne() < 0.5f) && !gVersusMode) { - func_effect_8007C484(RAND_FLOAT_CENTERED(5.0f) + player->hit1.x, RAND_FLOAT(5.0f) + player->hit1.y, - player->hit1.z, player->vel.x, player->vel.y, player->vel.z, - RAND_FLOAT(0.02f) + 0.02f, player->num + 1); + Effect_Effect389_Spawn(RAND_FLOAT_CENTERED(5.0f) + player->hit1.x, RAND_FLOAT(5.0f) + player->hit1.y, + player->hit1.z, player->vel.x, player->vel.y, player->vel.z, + RAND_FLOAT(0.02f) + 0.02f, player->num + 1); } } if (player->wings.leftState <= WINGSTATE_BROKEN) { @@ -188,12 +200,13 @@ void Player_DamageEffects(Player* player) { player->hit2.z, 1.0f); } if (((gGameFrameCount % 2U) == 0) && (Rand_ZeroOne() < 0.5f) && !gVersusMode) { - func_effect_8007C484(RAND_FLOAT_CENTERED(5.0f) + player->hit2.x, RAND_FLOAT(5.0f) + player->hit2.y, - player->hit2.z, player->vel.x, player->vel.y, player->vel.z, - RAND_FLOAT(0.02f) + 0.02f, player->num + 1); + Effect_Effect389_Spawn(RAND_FLOAT_CENTERED(5.0f) + player->hit2.x, RAND_FLOAT(5.0f) + player->hit2.y, + player->hit2.z, player->vel.x, player->vel.y, player->vel.z, + RAND_FLOAT(0.02f) + 0.02f, player->num + 1); } } } + var_v1 = 7; if (player->shields < 64) { if (player->shields > 16) { @@ -205,21 +218,23 @@ void Player_DamageEffects(Player* player) { if (player->shields > 48) { var_v1 = 64 - 1; } + if (!player->alternateView || (gLevelMode == LEVELMODE_ALL_RANGE)) { sp40 = 0.0f; if (player->form == FORM_LANDMASTER) { sp40 = 30.0f; } + if ((gGameFrameCount & var_v1) == 0) { func_effect_8007D10C(player->pos.x + RAND_FLOAT_CENTERED(10.0f), player->pos.y + sp40 + RAND_FLOAT(10.0f), player->trueZpos + RAND_FLOAT_CENTERED(10.0f), 2.2f); } if (((gGameFrameCount & (var_v1 >> 2)) == 0) && (Rand_ZeroOne() < 0.5f)) { - func_effect_8007C484(player->pos.x + RAND_FLOAT_CENTERED(30.0f), - player->pos.y + sp40 + RAND_FLOAT(10.0f), - player->trueZpos + RAND_FLOAT_CENTERED(30.0f), player->vel.x, player->vel.y, - player->vel.z, 0.04f + RAND_FLOAT(0.03f), player->num + 1); + Effect_Effect389_Spawn(player->pos.x + RAND_FLOAT_CENTERED(30.0f), + player->pos.y + sp40 + RAND_FLOAT(10.0f), + player->trueZpos + RAND_FLOAT_CENTERED(30.0f), player->vel.x, player->vel.y, + player->vel.z, 0.04f + RAND_FLOAT(0.03f), player->num + 1); if (player->dmgEffectTimer == 0) { player->dmgEffectTimer = 2; } @@ -239,22 +254,26 @@ void Player_WaterEffects(Player* player) { if (gGroundSurface == SURFACE_WATER) { Matrix_Translate(gCalcMatrix, player->pos.x, player->pos.y, player->trueZpos, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + 180.0f) * M_DTOR, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, -((player->rot.x + player->aerobaticPitch) * M_DTOR), MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, -(player->bankAngle * M_DTOR), MTXF_APPLY); + Matrix_MultVec3f(gCalcMatrix, &sp54, &sp3C); Matrix_MultVec3f(gCalcMatrix, &sp48, &sp30); + if (player->pos.y < (gGroundHeight + 100.0f)) { if ((sp3C.y < gGroundHeight + 80.0f) && ((gGameFrameCount % 2) == 0)) { if (sPlayWingSplashSfx) {} - func_effect_8007ACE0(sp3C.x, gGroundHeight, sp3C.z, 0.1f, 2.0f, - player->rot.y + player->yRot_114 + 20.0f); + Effect_Effect372_Spawn1(sp3C.x, gGroundHeight, sp3C.z, 0.1f, 2.0f, + player->rot.y + player->yRot_114 + 20.0f); } if ((sp30.y < gGroundHeight + 80.0f) && ((gGameFrameCount % 2) == 0)) { - func_effect_8007ACE0(sp30.x, gGroundHeight, sp30.z, 0.1f, 2.0f, - player->rot.y + player->yRot_114 - 20.0f); + Effect_Effect372_Spawn1(sp30.x, gGroundHeight, sp30.z, 0.1f, 2.0f, + player->rot.y + player->yRot_114 - 20.0f); } } + if ((sp30.y < gGroundHeight + 80.0f) || (sp3C.y < gGroundHeight + 80.0f)) { if (!sPlayWingSplashSfx) { sPlayWingSplashSfx = true; @@ -300,6 +319,7 @@ void Play_InitVsStage(void) { } break; } + for (i = 0, j = 0; i < 199; j++) { if (gLevelObjects[j].id <= OBJ_INVALID) { break; @@ -315,6 +335,7 @@ void Play_InitVsStage(void) { i++; } } + for (i = 5, j = 0; i < 199; j++) { if (gLevelObjects[j].id <= OBJ_INVALID) { break; @@ -337,25 +358,25 @@ void Play_dummy_800A5330(void) { } void Play_Setup360_CO(void) { - Sprite* sprite; + Boss* boss = &gBosses[0]; Scenery360* scenery360; + Sprite* sprite; s32 i; - s32 j; gLevelObjects = SEGMENTED_TO_VIRTUAL(aCoAllRangeLevelObjects); - for (j = 0, scenery360 = gScenery360; j < 200; j++) { - if (gLevelObjects[j].id <= OBJ_INVALID) { + for (i = 0, scenery360 = gScenery360; i < 200; i++) { + if (gLevelObjects[i].id <= OBJ_INVALID) { break; } - if (gLevelObjects[j].id < OBJ_SCENERY_MAX) { + if (gLevelObjects[i].id < OBJ_SCENERY_MAX) { Scenery360_Initialize(scenery360); scenery360->obj.status = OBJ_ACTIVE; - scenery360->obj.id = gLevelObjects[j].id; - scenery360->obj.pos.x = gLevelObjects[j].xPos; - scenery360->obj.pos.z = gLevelObjects[j].zPos1; - scenery360->obj.pos.y = gLevelObjects[j].yPos; - scenery360->obj.rot.y = gLevelObjects[j].rot.y; + scenery360->obj.id = gLevelObjects[i].id; + scenery360->obj.pos.x = gLevelObjects[i].xPos; + scenery360->obj.pos.z = gLevelObjects[i].zPos1; + scenery360->obj.pos.y = gLevelObjects[i].yPos; + scenery360->obj.rot.y = gLevelObjects[i].rot.y; Object_SetInfo(&scenery360->info, scenery360->obj.id); if (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_1) { scenery360->info.dList = D_CO_6020760; @@ -364,90 +385,92 @@ void Play_Setup360_CO(void) { } } - for (j = 0, sprite = gSprites; j < ARRAY_COUNT(gSprites); j++) { - if (gLevelObjects[j].id <= OBJ_INVALID) { + for (i = 0, sprite = gSprites; i < ARRAY_COUNT(gSprites); i++) { + if (gLevelObjects[i].id <= OBJ_INVALID) { break; } - if (gLevelObjects[j].id == OBJ_SPRITE_CO_TREE) { + if (gLevelObjects[i].id == OBJ_SPRITE_CO_TREE) { Sprite_Initialize(sprite); sprite->obj.status = OBJ_INIT; - sprite->obj.id = gLevelObjects[j].id; - sprite->obj.pos.x = gLevelObjects[j].xPos; - sprite->obj.pos.z = gLevelObjects[j].zPos1; - sprite->obj.pos.y = gLevelObjects[j].yPos; + sprite->obj.id = gLevelObjects[i].id; + sprite->obj.pos.x = gLevelObjects[i].xPos; + sprite->obj.pos.z = gLevelObjects[i].zPos1; + sprite->obj.pos.y = gLevelObjects[i].yPos; Object_SetInfo(&sprite->info, sprite->obj.id); sprite++; } } - i = 0; // fake? - Boss_Initialize(&gBosses[i]); - gBosses[i].obj.status = OBJ_INIT; - gBosses[i].obj.pos.x = 0.0f; - gBosses[i].obj.pos.y = 0.0f; - gBosses[i].obj.pos.z = 0.0f; - gBosses[i].obj.id = OBJ_BOSS_CO_GRANGA; - Object_SetInfo(&gBosses[i].info, gBosses[i].obj.id); + + Boss_Initialize(&boss[0]); + boss[0].obj.status = OBJ_INIT; + boss[0].obj.pos.x = 0.0f; + boss[0].obj.pos.y = 0.0f; + boss[0].obj.pos.z = 0.0f; + boss[0].obj.id = OBJ_BOSS_CO_GRANGA; + Object_SetInfo(&boss[0].info, boss[0].obj.id); } void Play_Setup360_SY(void) { + Boss* boss = &gBosses[0]; Scenery360* scenery360; s32 i; - s32 j; gLevelObjects = SEGMENTED_TO_VIRTUAL(D_SY_6030B14); - for (j = 0, scenery360 = gScenery360; j < 200; j++) { - if (gLevelObjects[j].id <= OBJ_INVALID) { + for (i = 0, scenery360 = gScenery360; i < 200; i++) { + if (gLevelObjects[i].id <= OBJ_INVALID) { break; } - if (gLevelObjects[j].id < OBJ_SCENERY_MAX) { + if (gLevelObjects[i].id < OBJ_SCENERY_MAX) { Scenery360_Initialize(scenery360); scenery360->obj.status = OBJ_ACTIVE; - scenery360->obj.id = gLevelObjects[j].id; - scenery360->obj.pos.x = gLevelObjects[j].xPos; - scenery360->obj.pos.z = gLevelObjects[j].zPos1; - scenery360->obj.pos.y = gLevelObjects[j].yPos; - scenery360->obj.rot.y = gLevelObjects[j].rot.y; + scenery360->obj.id = gLevelObjects[i].id; + scenery360->obj.pos.x = gLevelObjects[i].xPos; + scenery360->obj.pos.z = gLevelObjects[i].zPos1; + scenery360->obj.pos.y = gLevelObjects[i].yPos; + scenery360->obj.rot.y = gLevelObjects[i].rot.y; Object_SetInfo(&scenery360->info, scenery360->obj.id); scenery360++; } } - i = 0; // fake? - Boss_Initialize(&gBosses[i]); - gBosses[i].obj.status = OBJ_INIT; - gBosses[i].obj.pos.x = 0.0f; - gBosses[i].obj.pos.y = 0.0f; - gBosses[i].obj.pos.z = 0.0f; - gBosses[i].obj.id = OBJ_BOSS_SY; - Object_SetInfo(&gBosses[i].info, gBosses[i].obj.id); - i = 1; - Boss_Initialize(&gBosses[i]); - gBosses[i].obj.status = OBJ_INIT; - gBosses[i].obj.pos.x = 0.0f; - gBosses[i].obj.pos.y = 0.0f; - gBosses[i].obj.pos.z = 0.0f; - gBosses[i].obj.id = OBJ_BOSS_SY; - Object_SetInfo(&gBosses[i].info, gBosses[i].obj.id); - i = 2; - Boss_Initialize(&gBosses[i]); - gBosses[i].obj.status = OBJ_INIT; - gBosses[i].obj.pos.x = 0.0f; - gBosses[i].obj.pos.y = 0.0f; - gBosses[i].obj.pos.z = 0.0f; - gBosses[i].obj.id = OBJ_BOSS_SY; - Object_SetInfo(&gBosses[i].info, gBosses[i].obj.id); + + Boss_Initialize(&boss[0]); + boss[0].obj.status = OBJ_INIT; + boss[0].obj.pos.x = 0.0f; + boss[0].obj.pos.y = 0.0f; + boss[0].obj.pos.z = 0.0f; + boss[0].obj.id = OBJ_BOSS_SY_SHOGUN; + Object_SetInfo(&boss[0].info, boss[0].obj.id); + + Boss_Initialize(&boss[1]); + boss[1].obj.status = OBJ_INIT; + boss[1].obj.pos.x = 0.0f; + boss[1].obj.pos.y = 0.0f; + boss[1].obj.pos.z = 0.0f; + boss[1].obj.id = OBJ_BOSS_SY_SHOGUN; + Object_SetInfo(&boss[1].info, boss[1].obj.id); + + Boss_Initialize(&boss[2]); + boss[2].obj.status = OBJ_INIT; + boss[2].obj.pos.x = 0.0f; + boss[2].obj.pos.y = 0.0f; + boss[2].obj.pos.z = 0.0f; + boss[2].obj.id = OBJ_BOSS_SY_SHOGUN; + Object_SetInfo(&boss[2].info, boss[2].obj.id); } void Play_Setup360_AND(void) { - s32 i = 0; // fake? + Boss* boss = &gBosses[0]; - Boss_Initialize(&gBosses[i]); - gBosses[i].obj.status = OBJ_INIT; - gBosses[i].obj.pos.x = 0.0f; - gBosses[i].obj.pos.y = 0.0f; - gBosses[i].obj.pos.z = 0.0f; - gBosses[i].obj.id = OBJ_BOSS_321; - Object_SetInfo(&gBosses[i].info, gBosses[i].obj.id); + Boss_Initialize(boss); + boss->obj.status = OBJ_INIT; + + boss->obj.pos.x = 0.0f; + boss->obj.pos.y = 0.0f; + boss->obj.pos.z = 0.0f; + + boss->obj.id = OBJ_BOSS_AND_BRAIN; + Object_SetInfo(&boss->info, boss->obj.id); } void Play_Setup(void) { @@ -500,6 +523,7 @@ void Play_InitEnvironment(void) { } else { sEnvironment = SEGMENTED_TO_VIRTUAL(D_800D2F98[gCurrentLevel]); } + if (!D_ctx_8017782C) { if (gCurrentLevel == LEVEL_SOLAR) { Audio_SetHeatAlarmParams(255, 1); @@ -509,6 +533,7 @@ void Play_InitEnvironment(void) { } else if (gCurrentLevel == LEVEL_AQUAS) { sEnvironment = SEGMENTED_TO_VIRTUAL(&D_AQ_602E584); } + gBgmSeqId = sEnvironment->seqId; gLevelType = sEnvironment->type; gGroundType = sEnvironment->unk04; @@ -518,15 +543,19 @@ void Play_InitEnvironment(void) { gFogBlue = sEnvironment->fogB; gFogNear = sEnvironment->fogN; gFogFar = sEnvironment->fogF; + gLight1R = gLight2R = D_ctx_80161A70 = sEnvironment->lightR; gLight1G = gLight2G = D_ctx_80161A74 = sEnvironment->lightG; gLight1B = gLight2B = D_ctx_80161A78 = sEnvironment->lightB; + gAmbientR = sEnvironment->ambR; gAmbientG = sEnvironment->ambG; gAmbientB = sEnvironment->ambB; + gEnvLightxRot = gLight2xRotTarget = D_ctx_80178520 = gLight1xRot = gLight1xRotTarget = sEnvironment->lightDir.x; gEnvLightyRot = gLight2yRotTarget = D_ctx_80178524 = gLight1yRot = gLight1yRotTarget = sEnvironment->lightDir.y; gEnvLightzRot = gLight2zRotTarget = D_ctx_80178528 = gLight1zRot = gLight1zRotTarget = sEnvironment->lightDir.z; + gProjectFar = 12800.0f; gLight2colorStep = 40; D_ctx_80178544 = 40; @@ -539,7 +568,9 @@ void Play_GenerateStarfield(void) { MEM_ARRAY_ALLOCATE(gStarOffsetsX, 1000); MEM_ARRAY_ALLOCATE(gStarOffsetsY, 1000); MEM_ARRAY_ALLOCATE(gStarFillColors, 1000); + Rand_SetSeed(1, 29000, 9876); + for (i = 0; i < 1000; i++) { gStarOffsetsX[i] = RAND_FLOAT_SEEDED(480.0f) - 80.0f; gStarOffsetsY[i] = RAND_FLOAT_SEEDED(360.0f) - 60.0f; @@ -551,6 +582,7 @@ void Play_SetupStarfield(void) { Play_GenerateStarfield(); gGroundHeight = -25000.0f; gStarCount = 600; + if (gCurrentLevel == LEVEL_AREA_6) { gStarCount = 300; } @@ -659,17 +691,19 @@ void Play_ClearObjectData(void) { Object_Kill(&gPlayerShots[i].obj, gPlayerShots[i].sfxSource); PlayerShot_Initialize(&gPlayerShots[i]); } + gDrawSmallRocks = D_ctx_801782BC = D_ctx_801782C0 = D_ctx_801782D0 = gBossActive = gKillEventActors = gGroundClipMode = gPrevEventActorIndex = gFormationLeaderIndex = gRingPassCount = 0; gFormationInitPos.x = gFormationInitPos.y = gFormationInitPos.z = gFormationInitRot.x = gFormationInitRot.y = gFormationInitRot.z = 0.0f; + 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(gActor194yPos); i++) { - gActor194Status[i] = 0; - for (j = 0; j < ARRAY_COUNT(*gActor194yPos); j++) { - gActor194yPos[i][j] = -5000.0f; + for (i = 0; i < ARRAY_COUNT(gMeMoraYpos); i++) { + gMeMoraStatus[i] = 0; + for (j = 0; j < ARRAY_COUNT(*gMeMoraYpos); j++) { + gMeMoraYpos[i][j] = -5000.0f; } } } @@ -688,8 +722,10 @@ void Play_UpdateFillScreen(void) { } } } + gFillScreenAlphaStep = 16; Math_SmoothStepToF(&gLight3Brightness, 0.0f, 1.0f, 0.04f, 0.001f); + if (gScreenFlashTimer != 0) { gScreenFlashTimer--; if ((gScreenFlashTimer & 2) != 0) { @@ -728,6 +764,7 @@ void Play_SetupDebris(Actor* actor, s32 state, f32 xPos, f32 yPos, f32 zPos) { actor->obj.pos.y = yPos; actor->obj.pos.z = zPos; actor->gravity = 0.5f; + if ((state == 0) || (state == 1)) { actor->vel.y = RAND_FLOAT(5.0f) + 10.0f; actor->vel.x = 10.0f; @@ -752,6 +789,7 @@ void Play_SetupDebris(Actor* actor, s32 state, f32 xPos, f32 yPos, f32 zPos) { actor->timer_0BC = RAND_INT(25.0f) + 25; actor->gravity = 0.0f; } + if (state == 2) { actor->scale = RAND_FLOAT(1.5f) + 0.75f; } else if (state == 4) { @@ -824,19 +862,24 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) { player->dmgType = damage; player->hitDirection = direction; + if ((damage == 39) || (damage == 41) || (damage == 42) || (damage == 43)) { damage = 40; } + if (gExpertMode) { player->damage = damage * 2; } else { player->damage = damage; } + if (player->damage != 0) { player->radioDamageTimer = 4; } + player->unk_284 = 0; player->hitTimer = 20; + if (player->dmgType > 40) { sp34 = (player->boostSpeed * 0.3f) + 20.0f; player->mercyTimer = 5; @@ -847,6 +890,7 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) { } else { player->mercyTimer = 20; } + if (gHasShield[player->num]) { Player_PlaySfx(player->sfxSource, NA_SE_DAMAGE_S, player->num); gShieldTimer[player->num] = 5; @@ -866,9 +910,12 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) { Player_PlaySfx(player->sfxSource, NA_SE_DAMAGE_L, player->num); } } + Matrix_RotateY(gCalcMatrix, player->yRot_114 * M_DTOR, MTXF_NEW); Matrix_RotateZ(gCalcMatrix, player->bankAngle * M_DTOR, MTXF_APPLY); + sp44.z = 0.0f; + switch (player->hitDirection) { case 0: player->dmgEffectTimer = 20; @@ -876,10 +923,10 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) { player->knockback.y = 0.f; player->knockback.z = 0.f; break; + case 1: sp44.x = -sp34; sp44.y = 0.0f; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); player->knockback.x = sp38.x; player->knockback.y = sp38.y; @@ -887,10 +934,10 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) { Play_SpawnHitmark(player->hit1.x - player->vel.x, player->hit1.y, player->hit1.z - player->vel.z); Player_DamageWings(player, 1, 20); break; + case 2: sp44.x = sp34; sp44.y = 0.0f; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); player->knockback.x = sp38.x; player->knockback.y = sp38.y; @@ -898,6 +945,7 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) { Play_SpawnHitmark(player->hit2.x - player->vel.x, player->hit2.y, player->hit2.z - player->vel.z); Player_DamageWings(player, 2, 20); break; + case 3: player->dmgEffectTimer = 20; Play_SpawnHitmark(player->hit4.x - player->vel.x, player->hit4.y, player->hit4.z - player->vel.z); @@ -909,12 +957,14 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) { player->knockback.y = sp38.y; player->knockback.z = sp38.z; } + if (Rand_ZeroOne() < 0.5f) { Player_DamageWings(player, 1, 15); } else { Player_DamageWings(player, 2, 15); } break; + case 4: player->dmgEffectTimer = 20; Play_SpawnHitmark(player->hit3.x - player->vel.x, player->hit3.y, player->hit3.z - player->vel.z); @@ -931,6 +981,7 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) { } break; } + if ((gCurrentLevel == LEVEL_VENOM_1) && (player->dmgType == 42)) { if (player->pos.x > 0.0f) { player->knockback.x = -30.0f; @@ -947,6 +998,7 @@ f32 D_800D2FEC[5] = { void Player_GroundedCollision(Player* player, u32 arg1, f32 arg2, f32 arg3) { player->hitDirection = arg1; + switch (arg1) { case 1: case 2: @@ -958,6 +1010,7 @@ void Player_GroundedCollision(Player* player, u32 arg1, f32 arg2, f32 arg3) { } Math_SmoothStepToF(&player->baseSpeed, 2.0f, 1.0f, 2.0f, 0.00001f); break; + case 3: case 4: player->pos.z = player->basePos.z; @@ -969,6 +1022,7 @@ void Player_GroundedCollision(Player* player, u32 arg1, f32 arg2, f32 arg3) { player->trueZpos = player->pos.z; Math_SmoothStepToF(&player->baseSpeed, 2.0f, 1.0f, 2.0f, 0.00001f); break; + case 0: case 5: break; @@ -1019,15 +1073,19 @@ bool Play_CheckDynaFloorCollision(f32* arg0, s32* arg1, f32 xPos, f32 yPos, f32 sp9C = (s32) ((xPos + 2400.0f) / 300.0f); sp98 = (s32) ((zPos + gPathProgress + 1500.0f + 2400.0f) / 300.0f); + if ((sp9C < 0) || (sp9C >= 16) || (sp98 < 0) || (sp98 >= 16)) { return false; } + sp90 = Math_ModF(xPos + 2400.0f, 300.0f); sp94 = Math_ModF(zPos + gPathProgress + 1500.0f + 2400.0f, 300.0f); sp8C = (sp98 * 17) + sp9C; + x0 = spA4[spA0[sp8C]].n.ob[0] * 3.0f; y0 = spA4[spA0[sp8C]].n.ob[1] * 2.0f; z0 = spA4[spA0[sp8C]].n.ob[2] * 3.0f; + if (sp90 < sp94) { x1 = spA4[spA0[sp8C + 18]].n.ob[0] * 3.0f; y1 = spA4[spA0[sp8C + 18]].n.ob[1] * 2.0f; @@ -1070,8 +1128,9 @@ bool Play_CheckSingleHitbox(Hitbox* hitbox, f32 arg1, f32 arg2, f32 arg3, f32 ar (fabsf(hitbox->x.offset + arg1 - arg4) < (hitbox->x.size + D_ctx_8017853C)) && (fabsf(hitbox->y.offset + arg2 - arg5) < (hitbox->y.size + D_ctx_8017853C))) { return true; + } else { + return false; } - return false; } s32 Player_CheckHitboxCollision(Player* player, f32* hitboxData, s32* index, f32 xPos, f32 yPos, f32 zPos, f32 xRot, @@ -1089,7 +1148,7 @@ s32 Player_CheckHitboxCollision(Player* player, f32* hitboxData, s32* index, f32 if (count != 0) { hitboxData++; for (i = 0; i < count; i++, hitboxData += 6) { - spA0 = 0; + spA0 = false; if (*hitboxData == HITBOX_ROTATED) { Matrix_RotateZ(gCalcMatrix, -hitboxData[3] * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -hitboxData[1] * M_DTOR, MTXF_APPLY); @@ -1098,7 +1157,7 @@ s32 Player_CheckHitboxCollision(Player* player, f32* hitboxData, s32* index, f32 Matrix_RotateX(gCalcMatrix, -xRot * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, -yRot * M_DTOR, MTXF_APPLY); hitboxData += 4; - spA0 = 1; + spA0 = true; } else { if (*hitboxData >= HITBOX_SHADOW) { hitboxData++; @@ -1107,12 +1166,14 @@ s32 Player_CheckHitboxCollision(Player* player, f32* hitboxData, s32* index, f32 Matrix_RotateX(gCalcMatrix, -xRot * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, -yRot * M_DTOR, MTXF_APPLY); } + if (!((arg9 == 0) && (argA == 0) && (argB == 0))) { Matrix_RotateZ(gCalcMatrix, -argB * M_DTOR, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, -arg9 * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, -argA * M_DTOR, MTXF_APPLY); } - if ((yRot == 0.0f) && (zRot == 0.0f) && (xRot == 0.0f) && (spA0 == 0)) { + + if ((yRot == 0.0f) && (zRot == 0.0f) && (xRot == 0.0f) && !spA0) { var_fv0 = player->hit3.x; var_fv1 = player->hit3.y; var_fa0 = player->hit3.z; @@ -1125,6 +1186,7 @@ s32 Player_CheckHitboxCollision(Player* player, f32* hitboxData, s32* index, f32 var_fv1 = sp88.y + yPos; var_fa0 = sp88.z + zPos; } + if (Play_CheckSingleHitbox((Hitbox*) hitboxData, xPos, yPos, zPos, var_fv0, var_fv1, var_fa0)) { *index = i + 1; if (hitboxData[-1] == HITBOX_SHADOW) { @@ -1135,8 +1197,9 @@ s32 Player_CheckHitboxCollision(Player* player, f32* hitboxData, s32* index, f32 } return 3; } + if (hitboxData[-1] < HITBOX_SHADOW) { - if ((yRot == 0.0f) && (zRot == 0.0f) && (xRot == 0.0f) && (spA0 == 0)) { + if ((yRot == 0.0f) && (zRot == 0.0f) && (xRot == 0.0f) && !spA0) { var_fv0 = player->hit4.x; var_fv1 = player->hit4.y; var_fa0 = player->hit4.z; @@ -1149,11 +1212,13 @@ s32 Player_CheckHitboxCollision(Player* player, f32* hitboxData, s32* index, f32 var_fv1 = sp88.y + yPos; var_fa0 = sp88.z + zPos; } + if (Play_CheckSingleHitbox((Hitbox*) hitboxData, xPos, yPos, zPos, var_fv0, var_fv1, var_fa0)) { *index = i + 1; return 4; } - if ((yRot == 0.0f) && (zRot == 0.0f) && (xRot == 0.0f) && (spA0 == 0)) { + + if ((yRot == 0.0f) && (zRot == 0.0f) && (xRot == 0.0f) && !spA0) { var_fv0 = player->hit1.x; var_fv1 = player->hit1.y; var_fa0 = player->hit1.z; @@ -1166,11 +1231,13 @@ s32 Player_CheckHitboxCollision(Player* player, f32* hitboxData, s32* index, f32 var_fv1 = sp88.y + yPos; var_fa0 = sp88.z + zPos; } + if (Play_CheckSingleHitbox((Hitbox*) hitboxData, xPos, yPos, zPos, var_fv0, var_fv1, var_fa0)) { *index = i + 1; return 1; } - if ((yRot == 0.0f) && (zRot == 0.0f) && (xRot == 0.0f) && (spA0 == 0)) { + + if ((yRot == 0.0f) && (zRot == 0.0f) && (xRot == 0.0f) && !spA0) { var_fv0 = player->hit2.x; var_fv1 = player->hit2.y; var_fa0 = player->hit2.z; @@ -1183,6 +1250,7 @@ s32 Player_CheckHitboxCollision(Player* player, f32* hitboxData, s32* index, f32 var_fv1 = sp88.y + yPos; var_fa0 = sp88.z + zPos; } + if (Play_CheckSingleHitbox((Hitbox*) hitboxData, xPos, yPos, zPos, var_fv0, var_fv1, var_fa0)) { *index = i + 1; return 2; @@ -1210,8 +1278,9 @@ bool Play_CheckPolyCollision(ObjectId objId, f32 arg1, f32 arg2, f32 arg3, f32 a sp48.z = arg3; useCol2 = false; + switch (objId) { - case OBJ_ACTOR_180: + case OBJ_ACTOR_ME_MOLAR_ROCK: colId = COL1_0; break; case OBJ_SCENERY_CO_BUMP_4: @@ -1219,19 +1288,19 @@ bool Play_CheckPolyCollision(ObjectId objId, f32 arg1, f32 arg2, f32 arg3, f32 a colId = COL2_1; useCol2 = true; break; - case OBJ_SCENERY_149: + case OBJ_SCENERY_FO_MOUNTAIN_2: colId = COL1_5; break; - case OBJ_SCENERY_150: + case OBJ_SCENERY_FO_MOUNTAIN_3: colId = COL1_6; break; - case OBJ_BOSS_FO: + case OBJ_BOSS_FO_BASE: colId = COL1_4; break; - case OBJ_BOSS_VE2: + case OBJ_BOSS_VE2_BASE: colId = COL1_9; break; - case OBJ_BOSS_309: + case OBJ_BOSS_BO_BASE: colId = COL1_7; break; case ACTOR_EVENT_ID: @@ -1243,19 +1312,19 @@ bool Play_CheckPolyCollision(ObjectId objId, f32 arg1, f32 arg2, f32 arg3, f32 a case OBJ_SCENERY_ME_TUNNEL: colId = COL1_1; break; - case OBJ_SCENERY_120: + case OBJ_SCENERY_AQ_CORAL_REEF_2: colId = COL2_18; useCol2 = true; break; - case OBJ_SCENERY_124: + case OBJ_SCENERY_AQ_BUMP_1: colId = COL2_15; useCol2 = true; break; - case OBJ_SCENERY_126: + case OBJ_SCENERY_AQ_BUMP_2: colId = COL2_16; useCol2 = true; break; - case OBJ_SCENERY_47: + case OBJ_SCENERY_ZO_ISLAND: colId = COL2_7; useCol2 = true; break; @@ -1264,102 +1333,102 @@ bool Play_CheckPolyCollision(ObjectId objId, f32 arg1, f32 arg2, f32 arg3, f32 a useCol2 = true; break; case OBJ_SCENERY_CO_BUMP_3: - case OBJ_SCENERY_69: + case OBJ_SCENERY_MA_TERRAIN_BUMP: colId = COL2_3; useCol2 = true; break; - case OBJ_SCENERY_143: + case OBJ_SCENERY_VS_KA_FLBASE: colId = COL2_17; useCol2 = true; break; - case OBJ_SCENERY_140: + case OBJ_SCENERY_VS_PYRAMID_1: colId = COL2_4; useCol2 = true; break; - case OBJ_SCENERY_141: + case OBJ_SCENERY_VS_PYRAMID_2: colId = COL2_6; useCol2 = true; break; - case OBJ_SCENERY_117: + case OBJ_SCENERY_AQ_CORAL_REEF_1: colId = COL2_14; useCol2 = true; break; - case OBJ_SCENERY_70: + case OBJ_SCENERY_MA_FLOOR_1: colId = COL2_8; useCol2 = true; break; - case OBJ_SCENERY_72: + case OBJ_SCENERY_MA_FLOOR_3: colId = COL2_9; useCol2 = true; break; - case OBJ_SCENERY_71: + case OBJ_SCENERY_MA_FLOOR_2: colId = COL2_10; useCol2 = true; break; - case OBJ_SCENERY_73: + case OBJ_SCENERY_MA_FLOOR_4: colId = COL2_11; useCol2 = true; break; - case OBJ_SCENERY_67: + case OBJ_SCENERY_MA_WALL_3: colId = COL2_12; useCol2 = true; break; - case OBJ_SCENERY_74: + case OBJ_SCENERY_MA_FLOOR_5: colId = COL2_13; useCol2 = true; break; - case OBJ_SCENERY_118: - case OBJ_SCENERY_119: - case OBJ_SCENERY_121: - case OBJ_SCENERY_122: - case OBJ_SCENERY_123: - case OBJ_SCENERY_125: - case OBJ_SCENERY_127: - case OBJ_SCENERY_128: - case OBJ_SCENERY_129: - case OBJ_SCENERY_130: - case OBJ_SCENERY_131: - case OBJ_SCENERY_132: - case OBJ_SCENERY_133: - case OBJ_SCENERY_134: - case OBJ_SCENERY_135: - case OBJ_SCENERY_136: - case OBJ_SCENERY_137: - case OBJ_SCENERY_138: - case OBJ_SCENERY_139: - case OBJ_SCENERY_142: - case OBJ_SCENERY_144: - case OBJ_SCENERY_145: - case OBJ_SCENERY_146: + case OBJ_SCENERY_AQ_TUNNEL_1: + case OBJ_SCENERY_AQ_ARCH: + case OBJ_SCENERY_AQ_ROCK: + case OBJ_SCENERY_AQ_WALL_1: + case OBJ_SCENERY_AQ_ROOF: + case OBJ_SCENERY_AQ_TUNNEL_2: + case OBJ_SCENERY_VE1_TEMPLE_ENTRANCE: + case OBJ_SCENERY_VE1_TEMPLE_INTERIOR_1: + case OBJ_SCENERY_VE1_TEMPLE_INTERIOR_2: + case OBJ_SCENERY_VE1_TEMPLE_INTERIOR_3: + case OBJ_SCENERY_AND_PASSAGE: + case OBJ_SCENERY_AND_DOOR: + case OBJ_SCENERY_TR_BUILDING: + case OBJ_SCENERY_AND_PATH_INTERSECTION: + case OBJ_SCENERY_AND_PATH_WALLS: + case OBJ_SCENERY_AND_PATH_EXIT: + case OBJ_SCENERY_AND_PATH_ENTRANCE: + case OBJ_SCENERY_VS_BUILDING_1: + case OBJ_SCENERY_VS_BUILDING_2: + case OBJ_SCENERY_VS_ARCH: + case OBJ_SCENERY_VS_SPACE_JUNK_1: + case OBJ_SCENERY_VS_SPACE_JUNK_2: + case OBJ_SCENERY_VS_SPACE_JUNK_3: case OBJ_SCENERY_147: - case OBJ_SCENERY_148: + case OBJ_SCENERY_FO_MOUNTAIN_1: case OBJ_SCENERY_CO_BUILDING_9: case OBJ_SCENERY_CO_BUILDING_10: case OBJ_SCENERY_IBEAM: - case OBJ_SCENERY_ZO_ROCK_1: - case OBJ_SCENERY_44: - case OBJ_SCENERY_45: - case OBJ_SCENERY_46: - case OBJ_SCENERY_48: - case OBJ_SCENERY_49: - case OBJ_SCENERY_50: - case OBJ_SCENERY_51: - case OBJ_SCENERY_52: - case OBJ_SCENERY_53: + case OBJ_SCENERY_ZO_ROCK: + case OBJ_SCENERY_ZO_OIL_RIG_1: + case OBJ_SCENERY_ZO_OIL_RIG_2: + case OBJ_SCENERY_ZO_OIL_RIG_3: + case OBJ_SCENERY_VE1_WALL_1: + case OBJ_SCENERY_VE1_WALL_2: + case OBJ_SCENERY_VE1_WALL_3: + case OBJ_SCENERY_VE1_HALLWAY_OBSTACLE: + case OBJ_SCENERY_VE1_GENERATOR: + case OBJ_SCENERY_VE1_WATCH_POST: case OBJ_SCENERY_CO_WATERFALL: case OBJ_SCENERY_CO_ROCKWALL: case OBJ_SCENERY_CO_DOORS: - case OBJ_SCENERY_57: - case OBJ_SCENERY_58: - case OBJ_SCENERY_59: - case OBJ_SCENERY_60: - case OBJ_SCENERY_61: - case OBJ_SCENERY_62: + case OBJ_SCENERY_TI_PILLAR: + case OBJ_SCENERY_TI_BRIDGE: + case OBJ_SCENERY_MA_BUILDING_1: + case OBJ_SCENERY_MA_BUILDING_2: + case OBJ_SCENERY_MA_TOWER: + case OBJ_SCENERY_MA_WALL_1: case OBJ_SCENERY_63: - case OBJ_SCENERY_64: - case OBJ_SCENERY_65: - case OBJ_SCENERY_66: - case OBJ_SCENERY_68: + case OBJ_SCENERY_MA_GUILLOTINE: + case OBJ_SCENERY_MA_PROXIMITY_LIGHT: + case OBJ_SCENERY_MA_WALL_2: + case OBJ_SCENERY_MA_WALL_4: default: colId = COL2_0; useCol2 = true; @@ -1378,27 +1447,32 @@ bool Play_CheckPolyCollision(ObjectId objId, f32 arg1, f32 arg2, f32 arg3, f32 a return false; } -s32 Player_CheckPolyCollision(Player* player, ObjectId objId, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, - f32 arg7) { +s32 Player_CheckPolyCollision(Player* player, ObjectId objId, f32 x, f32 y, f32 z, f32 arg5, f32 arg6, f32 arg7) { Vec3f sp84; Vec3f sp78; Vec3f sp6C; Vec3f sp60; Vec3f sp54; - sp84.x = arg2; - sp84.y = arg3; - sp84.z = arg4; + sp84.x = x; + sp84.y = y; + sp84.z = z; + Matrix_RotateY(gCalcMatrix, -arg6 * M_DTOR, MTXF_NEW); + sp78.x = player->vel.x; sp78.y = player->vel.y; sp78.z = player->vel.z; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp78, &sp54); + if ((player->form == FORM_LANDMASTER) || (player->form == FORM_ON_FOOT)) { sp78.x = player->pos.x - sp84.x; sp78.y = player->pos.y - sp84.y; sp78.z = player->trueZpos - sp84.z; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp78, &sp6C); + if (Play_CheckPolyCollision(objId, sp84.x, sp84.y, sp84.z, sp6C.x + sp84.x, sp6C.y + sp84.y, sp6C.z + sp84.z, &sp60, &sp54)) { player->pos.y = sp60.y; @@ -1414,39 +1488,51 @@ s32 Player_CheckPolyCollision(Player* player, ObjectId objId, f32 arg2, f32 arg3 return 0; } } + sp78.x = player->hit3.x - sp84.x; sp78.y = player->hit3.y - sp84.y; sp78.z = player->hit3.z - sp84.z; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp78, &sp6C); if (Play_CheckPolyCollision(objId, sp84.x, sp84.y, sp84.z, sp6C.x + sp84.x, sp6C.y + sp84.y, sp6C.z + sp84.z, &sp60, &sp54)) { return 3; } + sp78.x = player->hit4.x - sp84.x; sp78.y = player->hit4.y - sp84.y; sp78.z = player->hit4.z - sp84.z; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp78, &sp6C); + if (Play_CheckPolyCollision(objId, sp84.x, sp84.y, sp84.z, sp6C.x + sp84.x, sp6C.y + sp84.y, sp6C.z + sp84.z, &sp60, &sp54)) { return 4; } + sp78.x = player->hit1.x - sp84.x; sp78.y = player->hit1.y - sp84.y; sp78.z = player->hit1.z - sp84.z; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp78, &sp6C); + if (Play_CheckPolyCollision(objId, sp84.x, sp84.y, sp84.z, sp6C.x + sp84.x, sp6C.y + sp84.y, sp6C.z + sp84.z, &sp60, &sp54)) { return 1; } + sp78.x = player->hit2.x - sp84.x; sp78.y = player->hit2.y - sp84.y; sp78.z = player->hit2.z - sp84.z; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp78, &sp6C); + if (Play_CheckPolyCollision(objId, sp84.x, sp84.y, sp84.z, sp6C.x + sp84.x, sp6C.y + sp84.y, sp6C.z + sp84.z, &sp60, &sp54)) { return 2; + } else { + return 0; } - return 0; } void Player_CheckItemCollect(Player* player) { @@ -1609,9 +1695,9 @@ void Player_CollisionCheck(Player* player) { Player_ApplyDamage(player, 1, 21); } if (gCurrentLevel == LEVEL_FORTUNA) { - func_effect_8007BC7C(player->hit1.x, player->hit1.y, player->hit1.z, 6.0f); - func_effect_8007BC7C(player->hit1.x, player->hit1.y, player->hit1.z, 6.0f); - func_effect_8007BC7C(player->hit1.x, player->hit1.y, player->hit1.z, 6.0f); + Effect_Effect362_Spawn(player->hit1.x, player->hit1.y, player->hit1.z, 6.0f); + Effect_Effect362_Spawn(player->hit1.x, player->hit1.y, player->hit1.z, 6.0f); + Effect_Effect362_Spawn(player->hit1.x, player->hit1.y, player->hit1.z, 6.0f); } } if ((player->hit2.y < (gGroundHeight + 13.0f)) && (player->state_1C8 != PLAYERSTATE_1C8_DOWN)) { @@ -1622,9 +1708,9 @@ void Player_CollisionCheck(Player* player) { Player_ApplyDamage(player, 2, 21); } if (gCurrentLevel == LEVEL_FORTUNA) { - func_effect_8007BC7C(player->hit2.x, player->hit2.y, player->hit2.z, 6.0f); - func_effect_8007BC7C(player->hit2.x, player->hit2.y, player->hit2.z, 6.0f); - func_effect_8007BC7C(player->hit2.x, player->hit2.y, player->hit2.z, 6.0f); + Effect_Effect362_Spawn(player->hit2.x, player->hit2.y, player->hit2.z, 6.0f); + Effect_Effect362_Spawn(player->hit2.x, player->hit2.y, player->hit2.z, 6.0f); + Effect_Effect362_Spawn(player->hit2.x, player->hit2.y, player->hit2.z, 6.0f); } } } else if ((player->form == FORM_LANDMASTER) && !gVersusMode) { @@ -1639,16 +1725,23 @@ void Player_CollisionCheck(Player* player) { if ((gCurrentLevel == LEVEL_SECTOR_Y) || (gCurrentLevel == LEVEL_VENOM_ANDROSS)) { sp8C = 4000.0f; } + for (i = 0, scenery360 = gScenery360; i < 200; i++, scenery360++) { if (scenery360->obj.status == OBJ_ACTIVE) { spC8.x = scenery360->obj.pos.x - player->pos.x; spC8.z = scenery360->obj.pos.z - player->trueZpos; + if (sqrtf(SQ(spC8.x) + SQ(spC8.z)) < sp8C) { - if ((scenery360->obj.id == OBJ_SCENERY_117) || (scenery360->obj.id == OBJ_SCENERY_143) || - (scenery360->obj.id == OBJ_SCENERY_141) || (scenery360->obj.id == OBJ_SCENERY_149) || - (scenery360->obj.id == OBJ_SCENERY_150) || (scenery360->obj.id == OBJ_SCENERY_148) || - (scenery360->obj.id == OBJ_SCENERY_160) || (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_1) || - (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_3) || (scenery360->obj.id == OBJ_SCENERY_140)) { + if ((scenery360->obj.id == OBJ_SCENERY_AQ_CORAL_REEF_1) || + (scenery360->obj.id == OBJ_SCENERY_VS_KA_FLBASE) || + (scenery360->obj.id == OBJ_SCENERY_VS_PYRAMID_2) || + (scenery360->obj.id == OBJ_SCENERY_FO_MOUNTAIN_2) || + (scenery360->obj.id == OBJ_SCENERY_FO_MOUNTAIN_3) || + (scenery360->obj.id == OBJ_SCENERY_FO_MOUNTAIN_1) || + (scenery360->obj.id == OBJ_SCENERY_VE2_MOUNTAIN) || + (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_1) || + (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_3) || + (scenery360->obj.id == OBJ_SCENERY_VS_PYRAMID_1)) { temp_v0 = Player_CheckPolyCollision(player, scenery360->obj.id, scenery360->obj.pos.x, scenery360->obj.pos.y, scenery360->obj.pos.z, scenery360->obj.rot.x, scenery360->obj.rot.y, @@ -1661,6 +1754,7 @@ void Player_CollisionCheck(Player* player) { Player_ApplyDamage(player, temp_v0, scenery360->info.damage); } } + if ((gCurrentLevel == LEVEL_FORTUNA) || (gCurrentLevel == LEVEL_VENOM_2)) { temp_v0 = Player_CheckHitboxCollision( player, scenery360->info.hitbox, &sp98, scenery360->obj.pos.x, @@ -1695,7 +1789,8 @@ void Player_CollisionCheck(Player* player) { scenery360->obj.pos.z); } else { Player_ApplyDamage(player, temp_v0, scenery360->info.damage); - if (scenery360->obj.id == OBJ_SCENERY_131) { + + if (scenery360->obj.id == OBJ_SCENERY_AND_PASSAGE) { Matrix_RotateY(gCalcMatrix, (scenery360->obj.rot.y + 180.0f) * M_DTOR, MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, &D_800D3040[sp98 - 1], &spBC); @@ -1710,9 +1805,10 @@ void Player_CollisionCheck(Player* player) { player->yRot_114 = scenery360->obj.rot.y + 180.0f; player->mercyTimer = 5; } - if ((scenery360->obj.id == OBJ_SCENERY_135) || - (scenery360->obj.id == OBJ_SCENERY_136)) { - if (scenery360->obj.id == OBJ_SCENERY_135) { + + if ((scenery360->obj.id == OBJ_SCENERY_AND_PATH_WALLS) || + (scenery360->obj.id == OBJ_SCENERY_AND_PATH_EXIT)) { + if (scenery360->obj.id == OBJ_SCENERY_AND_PATH_WALLS) { Matrix_RotateY(gCalcMatrix, (scenery360->obj.rot.y + 180.0f) * M_DTOR, MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, &D_800D3088[sp98 - 1], &spBC); @@ -1720,15 +1816,19 @@ void Player_CollisionCheck(Player* player) { Matrix_RotateY(gCalcMatrix, scenery360->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, &D_800D30B8[sp98 - 1], &spBC); } + player->knockback.x = spBC.x; player->knockback.y = spBC.y; player->knockback.z = spBC.z; + player->rot.y = 0.0f; player->rot.x = 0.0f; + player->pos.x = player->basePos.x; player->pos.y = player->basePos.y; player->pos.z = player->basePos.z; - if (scenery360->obj.id == OBJ_SCENERY_135) { + + if (scenery360->obj.id == OBJ_SCENERY_AND_PATH_WALLS) { player->yRot_114 = scenery360->obj.rot.y + 180.0f; } else { player->yRot_114 = scenery360->obj.rot.y; @@ -1743,18 +1843,20 @@ void Player_CollisionCheck(Player* player) { } } else { for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) { - if ((scenery->obj.status == OBJ_ACTIVE) && (scenery->obj.id != OBJ_SCENERY_58) && - (scenery->obj.id != OBJ_SCENERY_105) && (scenery->obj.id != OBJ_SCENERY_59) && - (scenery->obj.id != OBJ_SCENERY_60) && (scenery->obj.id != OBJ_SCENERY_61) && - (scenery->obj.id != OBJ_SCENERY_66) && (scenery->obj.id != OBJ_SCENERY_67) && - (scenery->obj.id != OBJ_SCENERY_70) && (scenery->obj.id != OBJ_SCENERY_72) && - (scenery->obj.id != OBJ_SCENERY_71) && (scenery->obj.id != OBJ_SCENERY_73) && - (scenery->obj.id != OBJ_SCENERY_74) && (scenery->obj.id != OBJ_SCENERY_69) && + if ((scenery->obj.status == OBJ_ACTIVE) && (scenery->obj.id != OBJ_SCENERY_TI_BRIDGE) && + (scenery->obj.id != OBJ_SCENERY_MA_TRAIN_TRACK_13) && + (scenery->obj.id != OBJ_SCENERY_MA_BUILDING_1) && (scenery->obj.id != OBJ_SCENERY_MA_BUILDING_2) && + (scenery->obj.id != OBJ_SCENERY_MA_TOWER) && (scenery->obj.id != OBJ_SCENERY_MA_WALL_2) && + (scenery->obj.id != OBJ_SCENERY_MA_WALL_3) && (scenery->obj.id != OBJ_SCENERY_MA_FLOOR_1) && + (scenery->obj.id != OBJ_SCENERY_MA_FLOOR_3) && (scenery->obj.id != OBJ_SCENERY_MA_FLOOR_2) && + (scenery->obj.id != OBJ_SCENERY_MA_FLOOR_4) && (scenery->obj.id != OBJ_SCENERY_MA_FLOOR_5) && + (scenery->obj.id != OBJ_SCENERY_MA_TERRAIN_BUMP) && ((player->trueZpos - 2000.0f) < scenery->obj.pos.z)) { if ((scenery->obj.id == OBJ_SCENERY_CO_BUMP_1) || (scenery->obj.id == OBJ_SCENERY_CO_BUMP_4) || - (scenery->obj.id == OBJ_SCENERY_CO_BUMP_5) || (scenery->obj.id == OBJ_SCENERY_47) || - (scenery->obj.id == OBJ_SCENERY_117) || (scenery->obj.id == OBJ_SCENERY_120) || - (scenery->obj.id == OBJ_SCENERY_124) || (scenery->obj.id == OBJ_SCENERY_126) || + (scenery->obj.id == OBJ_SCENERY_CO_BUMP_5) || (scenery->obj.id == OBJ_SCENERY_ZO_ISLAND) || + (scenery->obj.id == OBJ_SCENERY_AQ_CORAL_REEF_1) || + (scenery->obj.id == OBJ_SCENERY_AQ_CORAL_REEF_2) || + (scenery->obj.id == OBJ_SCENERY_AQ_BUMP_1) || (scenery->obj.id == OBJ_SCENERY_AQ_BUMP_2) || (scenery->obj.id == OBJ_SCENERY_CO_BUMP_2) || (scenery->obj.id == OBJ_SCENERY_CO_BUMP_3)) { spC8.x = scenery->obj.pos.x - player->pos.x; spC8.z = scenery->obj.pos.z - player->trueZpos; @@ -1800,9 +1902,9 @@ void Player_CollisionCheck(Player* player) { } } else { Player_ApplyDamage(player, temp_v0, scenery->info.damage); - if ((scenery->obj.id == OBJ_SCENERY_48) || + if ((scenery->obj.id == OBJ_SCENERY_VE1_WALL_1) || (scenery->obj.id == OBJ_SCENERY_CO_ROCKWALL) || - (scenery->obj.id == OBJ_SCENERY_49)) { + (scenery->obj.id == OBJ_SCENERY_VE1_WALL_2)) { Matrix_RotateY(gCalcMatrix, scenery->obj.rot.y * M_DTOR, MTXF_NEW); spC8.x = -(player->baseSpeed + player->boostSpeed) * 0.7f; spC8.y = 0.0f; @@ -1813,7 +1915,7 @@ void Player_CollisionCheck(Player* player) { player->knockback.y = spBC.y; player->pos.x = player->basePos.x; player->mercyTimer = 5; - } else if (scenery->obj.id == OBJ_SCENERY_50) { + } else if (scenery->obj.id == OBJ_SCENERY_VE1_WALL_3) { if (player->pos.x < scenery->obj.pos.x) { player->knockback.x = -30.0f; player->rot.y = 45.0f; @@ -1824,7 +1926,7 @@ void Player_CollisionCheck(Player* player) { player->knockback.y = 0.0f; player->pos.x = player->basePos.x; player->mercyTimer = 5; - } else if (scenery->obj.id == OBJ_SCENERY_131) { + } else if (scenery->obj.id == OBJ_SCENERY_AND_PASSAGE) { Matrix_RotateY(gCalcMatrix, (scenery->obj.rot.y + 180.0f) * M_DTOR, MTXF_NEW); Matrix_RotateZ(gCalcMatrix, -scenery->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &D_800D3040[sp98 - 1], &spBC); @@ -1842,10 +1944,11 @@ void Player_CollisionCheck(Player* player) { } } } + for (i = 0, boss = gBosses; i < ARRAY_COUNT(gBosses); i++, boss++) { if (boss->obj.status == OBJ_ACTIVE) { - if ((boss->obj.id == OBJ_BOSS_VE2) || (boss->obj.id == OBJ_BOSS_FO) || - (boss->obj.id == OBJ_BOSS_SZ_GREAT_FOX) || (boss->obj.id == OBJ_BOSS_309)) { + if ((boss->obj.id == OBJ_BOSS_VE2_BASE) || (boss->obj.id == OBJ_BOSS_FO_BASE) || + (boss->obj.id == OBJ_BOSS_SZ_GREAT_FOX) || (boss->obj.id == OBJ_BOSS_BO_BASE)) { temp_v0 = Player_CheckPolyCollision(player, boss->obj.id, boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, boss->obj.rot.x, boss->obj.rot.y, boss->obj.rot.z); @@ -1854,7 +1957,8 @@ void Player_CollisionCheck(Player* player) { break; } } - if (boss->obj.id == OBJ_BOSS_310) { + + if (boss->obj.id == OBJ_BOSS_BO_BASE_SHIELD) { spfD4.x = fabsf(boss->obj.pos.x - player->pos.x) * .8333333f; spfD4.y = fabsf(boss->obj.pos.y - player->pos.y) * 2; spfD4.z = fabsf(boss->obj.pos.z - player->trueZpos) * 0.8333333f; @@ -1864,11 +1968,10 @@ void Player_CollisionCheck(Player* player) { player->mercyTimer = 5; player->knockback.y = 30.0f; boss->dmgType = DMG_BEAM; - func_effect_8007BFFC(player->pos.x + RAND_FLOAT_CENTERED(10.0f), - player->pos.y + RAND_FLOAT(10.0f), - player->trueZpos + RAND_FLOAT_CENTERED(10.0f), 0.0f, 15.0f, 0.0f, 2.0f, 5); + Effect386_Spawn1(player->pos.x + RAND_FLOAT_CENTERED(10.0f), player->pos.y + RAND_FLOAT(10.0f), + player->trueZpos + RAND_FLOAT_CENTERED(10.0f), 0.0f, 15.0f, 0.0f, 2.0f, 5); for (j = 0; j < 10; j++) { - func_effect_8007C484( + Effect_Effect389_Spawn( player->pos.x + RAND_FLOAT_CENTERED(30.0f), player->pos.y + RAND_FLOAT(10.0f), player->trueZpos + RAND_FLOAT_CENTERED(30.0f), player->vel.x, 20.0f + player->vel.y, player->vel.z, RAND_FLOAT(0.1f) + 0.1f, player->num + 11); @@ -1876,7 +1979,7 @@ void Player_CollisionCheck(Player* player) { break; } } else { - if (boss->obj.id == OBJ_BOSS_KA) { + if (boss->obj.id == OBJ_BOSS_KA_SAUCERER) { spfD4.x = fabsf(boss->obj.pos.x - player->pos.x); spfD4.y = fabsf(boss->obj.pos.y - 300.0f - player->pos.y) * 7.42f; spfD4.z = fabsf(boss->obj.pos.z - player->trueZpos); @@ -1897,7 +2000,7 @@ void Player_CollisionCheck(Player* player) { player->whooshTimer = 4; } } else { - if ((boss->obj.id == OBJ_BOSS_320) && (boss->timer_056 != 0) && (sp98 == 5)) { + if ((boss->obj.id == OBJ_BOSS_AND_ANDROSS) && (boss->timer_056 != 0) && (sp98 == 5)) { break; } Player_ApplyDamage(player, temp_v0, boss->info.damage); @@ -1905,7 +2008,7 @@ void Player_CollisionCheck(Player* player) { (sp98 >= 9)) { player->knockback.y = -100.0f; } - if ((boss->obj.id == OBJ_BOSS_320) && (sp98 < 5)) { + if ((boss->obj.id == OBJ_BOSS_AND_ANDROSS) && (sp98 < 5)) { player->knockback.x = boss->fwork[14]; player->knockback.y = boss->fwork[15]; } @@ -1914,9 +2017,10 @@ void Player_CollisionCheck(Player* player) { } } } + for (i = 0, actor = gActors; i < ARRAY_COUNT(gActors); i++, actor++) { if ((actor->obj.status == OBJ_ACTIVE) && (actor->timer_0C2 == 0)) { - if (actor->obj.id == OBJ_ACTOR_180) { + if (actor->obj.id == OBJ_ACTOR_ME_MOLAR_ROCK) { temp_v0 = Player_CheckPolyCollision(player, actor->obj.id, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, actor->obj.rot.x, actor->obj.rot.y, actor->obj.rot.z); @@ -1971,7 +2075,7 @@ void Player_CollisionCheck(Player* player) { } } } - } else if ((OBJ_ACTOR_205 <= actor->obj.id) && (actor->obj.id <= OBJ_ACTOR_213)) { + } else if ((OBJ_ACTOR_MA_LOCOMOTIVE <= actor->obj.id) && (actor->obj.id <= OBJ_ACTOR_MA_TRAIN_CAR_7)) { temp_v0 = Player_CheckHitboxCollision( player, actor->info.hitbox, &sp98, actor->fwork[25] + actor->obj.pos.x, actor->fwork[8] + actor->obj.pos.y + 25.0f, actor->obj.pos.z, actor->fwork[29], @@ -2004,7 +2108,7 @@ void Player_CollisionCheck(Player* player) { } if (actor->info.damage) { Player_ApplyDamage(player, temp_v0, actor->info.damage); - if (actor->obj.id == OBJ_ACTOR_225) { + if (actor->obj.id == OBJ_ACTOR_TI_LANDMINE) { player->knockback.y = 0.0f; } } else { @@ -2015,6 +2119,7 @@ void Player_CollisionCheck(Player* player) { } } } + for (i = 0, sprite = gSprites; i < ARRAY_COUNT(gSprites); i++, sprite++) { if (sprite->obj.status == OBJ_ACTIVE) { if ((player->trueZpos - 200.0f) < sprite->obj.pos.z) { @@ -2024,7 +2129,7 @@ void Player_CollisionCheck(Player* player) { if (temp_v0 != 0) { if ((sprite->obj.id == OBJ_SPRITE_FO_POLE) || (sprite->obj.id == OBJ_SPRITE_CO_POLE) || (sprite->obj.id == OBJ_SPRITE_TI_CACTUS) || (sprite->obj.id == OBJ_SPRITE_CO_TREE)) { - sprite->destroy = 1; + sprite->destroy = true; player->hitTimer = 6; player->hitDirection = 0; } else { @@ -2035,7 +2140,9 @@ void Player_CollisionCheck(Player* player) { } } } + Player_CheckItemCollect(player); + if (gCamCount == 4) { for (opponent = &gPlayer[3], i = 3; i >= 0; i--, opponent--) { if ((i != gPlayerNum) && (opponent->state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { @@ -2043,20 +2150,24 @@ void Player_CollisionCheck(Player* player) { if (player->form == FORM_ON_FOOT) { spC8.x = 4.0f; } + spC8.y = 25.0f; if (opponent->form == FORM_ON_FOOT) { spC8.y = 4.0f; } spBC.x = spBC.z = spC8.x + spC8.y; + spC8.x = 23.0f; if (player->form == FORM_ON_FOOT) { spC8.x = 7.0f; } + spC8.y = 23.0f; if (opponent->form == FORM_ON_FOOT) { spC8.y = 7.0f; } spBC.y = spC8.x + spC8.y; + if ((fabsf(opponent->trueZpos - player->trueZpos) <= spBC.z) && (fabsf(opponent->pos.y - player->pos.y) <= spBC.y) && (fabsf(opponent->pos.x - player->pos.x) <= spBC.x)) { @@ -2080,12 +2191,13 @@ void Player_CollisionCheck(Player* player) { } } } + if (gUseDynaFloor) { if (Play_CheckDynaFloorCollision(&sp94, &sp90, player->hit4.x, player->hit4.y, player->hit4.z)) { if (gCurrentLevel == LEVEL_ZONESS) { player->rot.x = (player->baseSpeed + player->boostSpeed) * 0.8f; player->hitTimer = 15; - func_effect_8007B228(player->hit4.x, sp94, player->hit4.z, 1.0f); + Effect_Effect381_Spawn(player->hit4.x, sp94, player->hit4.z, 1.0f); } else { if (player->hitTimer == 0) { Player_ApplyDamage(player, 4, 10); @@ -2095,15 +2207,16 @@ void Player_CollisionCheck(Player* player) { } if (player->state_1C8 == PLAYERSTATE_1C8_DOWN) { player->radioDamageTimer = 2; - func_effect_8007AFD0(player->pos.x, player->trueZpos, 30.0f, 0.0f, 5.0f); - func_effect_8007AFD0(player->pos.x, player->trueZpos, -30.0f, 0.0f, 5.0f); + Effect_Effect382_Spawn(player->pos.x, player->trueZpos, 30.0f, 0.0f, 5.0f); + Effect_Effect382_Spawn(player->pos.x, player->trueZpos, -30.0f, 0.0f, 5.0f); } } + if (Play_CheckDynaFloorCollision(&sp94, &sp90, player->pos.x + ((player->hit1.x - player->pos.x) * 1.5f), player->pos.y + (player->hit1.y - player->pos.y) * 1.5f, player->hit1.z)) { if (gCurrentLevel == LEVEL_ZONESS) { - func_effect_8007B228(player->pos.x + (player->hit1.x - player->pos.x) * 1.5f, sp94, player->hit1.z, - 1.0f); + Effect_Effect381_Spawn(player->pos.x + (player->hit1.x - player->pos.x) * 1.5f, sp94, player->hit1.z, + 1.0f); } else { if (player->hitTimer == 0) { Player_ApplyDamage(player, 1, 10); @@ -2111,11 +2224,12 @@ void Player_CollisionCheck(Player* player) { player->knockback.y = 30.0f; } } + if (Play_CheckDynaFloorCollision(&sp94, &sp90, player->pos.x + ((player->hit2.x - player->pos.x) * 1.5f), player->pos.y + (player->hit2.y - player->pos.y) * 1.5f, player->hit2.z)) { if (gCurrentLevel == LEVEL_ZONESS) { - func_effect_8007B228(player->pos.x + (player->hit2.x - player->pos.x) * 1.5f, sp94, player->hit2.z, - 1.0f); + Effect_Effect381_Spawn(player->pos.x + (player->hit2.x - player->pos.x) * 1.5f, sp94, player->hit2.z, + 1.0f); } else { if (player->hitTimer == 0) { Player_ApplyDamage(player, 2, 40); @@ -2162,8 +2276,10 @@ void Player_FloorCheck(Player* player) { if (player->hideShadow) { return; } + player->groundPos.x = player->pos.x; player->groundPos.z = player->trueZpos - player->pos.y; + if (gGroundType != 4) { if (gCamCount == 1) { player->groundPos.y = gGroundHeight + 3.0f; @@ -2175,16 +2291,19 @@ void Player_FloorCheck(Player* player) { } player->shadowRotX = player->shadowRotZ = player->groundRotY = 0.0f; } + sp100 = 0.0f; spFC = 0.0f; spF8 = 0.0f; + if (gCamCount != 1) { if (player->form == FORM_ON_FOOT) { for (sp144 = 0; sp144 < 200; sp144++) { scenery360 = &gScenery360[sp144]; if ((scenery360->obj.status == OBJ_ACTIVE) && - ((scenery360->obj.id == OBJ_SCENERY_143) || (scenery360->obj.id == OBJ_SCENERY_140) || - (scenery360->obj.id == OBJ_SCENERY_141)) && + ((scenery360->obj.id == OBJ_SCENERY_VS_KA_FLBASE) || + (scenery360->obj.id == OBJ_SCENERY_VS_PYRAMID_1) || + (scenery360->obj.id == OBJ_SCENERY_VS_PYRAMID_2)) && (fabsf(scenery360->obj.pos.x - player->pos.x) < 2000.0f) && (fabsf(scenery360->obj.pos.z - player->trueZpos) < 2000.0f)) { spC8.x = scenery360->obj.pos.x; @@ -2194,9 +2313,9 @@ void Player_FloorCheck(Player* player) { spD4.y = gGroundHeight; spD4.z = player->trueZpos; colId = COL2_4; - if (scenery360->obj.id == OBJ_SCENERY_141) { + if (scenery360->obj.id == OBJ_SCENERY_VS_PYRAMID_2) { colId = COL2_6; - } else if (scenery360->obj.id == OBJ_SCENERY_143) { + } else if (scenery360->obj.id == OBJ_SCENERY_VS_KA_FLBASE) { colId = COL2_17; } if (func_col2_800A3690(&spD4, &spC8, colId, &spBC)) { @@ -2214,9 +2333,10 @@ void Player_FloorCheck(Player* player) { player->groundPos.z = player->trueZpos; for (sp144 = 0, scenery360 = gScenery360; sp144 < 200; sp144++, scenery360++) { if ((scenery360->obj.status == OBJ_ACTIVE) && - ((scenery360->obj.id == OBJ_SCENERY_150) || (scenery360->obj.id == OBJ_SCENERY_149) || - (scenery360->obj.id == OBJ_SCENERY_148) || (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_1) || - (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_3)) && + ((scenery360->obj.id == OBJ_SCENERY_FO_MOUNTAIN_3) || + (scenery360->obj.id == OBJ_SCENERY_FO_MOUNTAIN_2) || + (scenery360->obj.id == OBJ_SCENERY_FO_MOUNTAIN_1) || + (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_1) || (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_3)) && (fabsf(scenery360->obj.pos.x - player->pos.x) < 2500.0f) && (fabsf(scenery360->obj.pos.z - player->trueZpos) < 2500.0f)) { tempx = scenery360->obj.pos.x; @@ -2235,8 +2355,9 @@ void Player_FloorCheck(Player* player) { spC8.y = tempy; spC8.z = tempz; - if ((scenery360->obj.id == OBJ_SCENERY_149) || (scenery360->obj.id == OBJ_SCENERY_150)) { - if (scenery360->obj.id == OBJ_SCENERY_149) { + if ((scenery360->obj.id == OBJ_SCENERY_FO_MOUNTAIN_2) || + (scenery360->obj.id == OBJ_SCENERY_FO_MOUNTAIN_3)) { + if (scenery360->obj.id == OBJ_SCENERY_FO_MOUNTAIN_2) { colId = COL1_5; } else { colId = COL1_6; @@ -2272,7 +2393,7 @@ void Player_FloorCheck(Player* player) { tempz = scenery->obj.pos.z; sp120 = scenery->obj.rot.y; if ((scenery->obj.id == OBJ_SCENERY_CO_BUMP_3) || (scenery->obj.id == OBJ_SCENERY_CO_BUMP_2) || - (scenery->obj.id == OBJ_SCENERY_47) || (scenery->obj.id == OBJ_SCENERY_CO_BUMP_4) || + (scenery->obj.id == OBJ_SCENERY_ZO_ISLAND) || (scenery->obj.id == OBJ_SCENERY_CO_BUMP_4) || (scenery->obj.id == OBJ_SCENERY_CO_BUMP_5)) { Matrix_RotateY(gCalcMatrix, -sp120 * M_DTOR, MTXF_NEW); for (var_fs1 = var_fs0 = -50.0f; var_fs0 > -500.0f; var_fs0 -= 5.0f, var_fs1 -= 5.0f) { @@ -2292,7 +2413,7 @@ void Player_FloorCheck(Player* player) { colId = COL2_0; - if (scenery->obj.id == OBJ_SCENERY_47) { + if (scenery->obj.id == OBJ_SCENERY_ZO_ISLAND) { colId = COL2_7; } if (scenery->obj.id == OBJ_SCENERY_CO_BUMP_2) { @@ -2409,11 +2530,14 @@ void Play_InitLevel(void) { gTeamLowHealthMsgTimer = -1; break; } + gUseDynaFloor = 0; + switch (gCurrentLevel) { case LEVEL_SECTOR_Z: gGreatFoxIntact = true; break; + case LEVEL_METEO: case LEVEL_SECTOR_X: if (gLevelPhase == 1) { @@ -2428,32 +2552,37 @@ void Play_InitLevel(void) { gAmbientB = 100; } break; + case LEVEL_VENOM_ANDROSS: gDrawGround = false; gDrawBackdrop = 6; D_Andross_801A7F58 = D_Andross_801A7F60 = D_Andross_801A7F68 = D_Andross_801A7F70 = D_Andross_801A7F78 = 0.0f; break; + case LEVEL_AQUAS: gVIsPerFrame = 3; D_bg_8015F970 = 1600.0f; D_AQ_801C4188 = 128.0f; - Aquas_801A9824(); + Aquas_InitLevel(); break; + case LEVEL_TITANIA: Titania_80188F30(); gTeamShields[TEAM_ID_SLIPPY] = -2; break; + case LEVEL_MACBETH: - Macbeth_80199920(); + Macbeth_InitLevel(); break; + case LEVEL_ZONESS: - MEM_ARRAY_ALLOCATE(gZOSnakePosRots, 200); - ptr = (u8*) gZOSnakePosRots; - for (i = 0; i < 200 * sizeof(*gZOSnakePosRots); i++, ptr++) { + MEM_ARRAY_ALLOCATE(gZoDodoraPosRots, 200); + ptr = (u8*) gZoDodoraPosRots; + for (i = 0; i < 200 * sizeof(*gZoDodoraPosRots); i++, ptr++) { *ptr = 0; } - gZOSnakeWaypointCount = 0; + gZoDodoraWaypointCount = 0; /* fallthrough */ case LEVEL_SOLAR: gUseDynaFloor = true; @@ -2487,6 +2616,7 @@ void Play_InitLevel(void) { mesh = SEGMENTED_TO_VIRTUAL(D_ZO_6009ED0); break; } + for (i = 0; i < 17 * 17; i++, mesh++) { if (mesh->v.ob[0] == 800) { mesh->v.ob[0] = 1400; @@ -2507,6 +2637,7 @@ void Play_InitLevel(void) { mesh = SEGMENTED_TO_VIRTUAL(D_ZO_600C780); break; } + for (i = 0; i < 17 * 17; i++, mesh++) { if (mesh->v.ob[0] == 800) { mesh->v.ob[0] = 1400; @@ -2527,6 +2658,7 @@ void Player_ResetVsData(void) { s32 j; gVsMatchState = VS_STATE_0; + for (i = 0; i < 4; i++) { gVsPoints[i] = 0; for (j = 0; j < 10; j++) { @@ -2542,6 +2674,7 @@ void Player_InitVersus(void) { s32 i; Player_ResetVsData(); + for (i = 0; i < 4; i++) { gPlayerNum = i; Player_Initialize(&gPlayer[i]); @@ -2556,6 +2689,7 @@ void Play_Init(void) { s32 i; gArwingSpeed = 40.0f; + for (i = 0; i < ARRAY_COUNT(gControllerRumbleEnabled); i++) { gControllerRumbleEnabled[i] = 0; } @@ -2565,21 +2699,27 @@ void Play_Init(void) { } else { gEnemyShotSpeed = 100; } + gPauseEnabled = false; gVIsPerFrame = 2; - D_ctx_80177C70 = 0; + gFovYMode = 0; gTeamHelpActor = NULL; gTeamHelpTimer = 0; + Audio_KillSfxById(NA_SE_OB_ROUTE_EXPLOSION1); Audio_KillSfxById(NA_SE_DEMO_SIREN); + Memory_FreeAll(); + gTraining360MsgTimer = gTraining360MsgIndex = gShowBossHealth = gStarWolfMsgTimer = gAllRangeWingRepairTimer = gAllRangeSuppliesSent = 0; D_display_800CA220 = 0; gShowLevelClearStatusScreen = 0; + if (gCurrentLevel != LEVEL_VERSUS) { gSceneSetup = 0; } + gShowHud = 1; gDrawGround = gDrawBackdrop = 1; gAqDrawMode = sOverheadCam = 0; @@ -2587,6 +2727,7 @@ void Play_Init(void) { gLevelMode = LEVELMODE_ON_RAILS; gPathTexScroll = D_bg_8015F968 = 0.0f; D_hud_800D1970 = gVersusMode = gHideRadio = gChangeTo360 = false; + if (gCurrentLevel >= LEVEL_FORTUNA) { gLevelMode = LEVELMODE_ALL_RANGE; if (gCurrentLevel == LEVEL_VERSUS) { @@ -2597,6 +2738,7 @@ void Play_Init(void) { if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gLevelPhase == 1)) { gLevelMode = LEVELMODE_ALL_RANGE; } + gVsMatchStart = false; Play_InitEnvironment(); gDropHitCountItem = gTeamLowHealthMsgTimer = gStartAndrossFightTimer = gSoShieldsEmpty = gAllRangeEventTimer = @@ -2606,8 +2748,10 @@ void Play_Init(void) { if (gCurrentLevel == LEVEL_SECTOR_X) { gMissionStatus = MISSION_ACCOMPLISHED; } + gWaterLevel = -25000.0f; D_ctx_80177950 = 1.0f; + if ((gCurrentLevel == LEVEL_VENOM_2) && (gLevelPhase == 2)) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; } else { @@ -2633,39 +2777,49 @@ void Play_Init(void) { } else { gStarCount = 0; } + gFogAlpha = 255; gLight1rotStep = 5.0f; gLight2rotStep = 5.0f; D_ctx_80178538 = 5.0f; Play_ClearObjectData(); D_ctx_801782C8 = 0; + if (gCurrentLevel == LEVEL_TITANIA) { Ground_801B5110(0.0f, 0.0f, 200.0f); } if (gCurrentLevel == LEVEL_AQUAS) { gWaterLevel = 1000.0f; } + gLoadLevelObjects = false; gCamCount = 1; + if (gCurrentLevel == LEVEL_VERSUS) { gCamCount = 4; } + for (i = TEAM_ID_FALCO; i < TEAM_ID_MAX; i++) { gTeamShields[i] = gSavedTeamShields[i]; } + MEM_ARRAY_ALLOCATE(gPlayer, gCamCount); Player_InitializeAll(); + for (i = 0; i < gCamCount; i++) { gPlayer[i].state_1C8 = PLAYERSTATE_1C8_INIT; gPlayerGlareAlphas[i] = D_ctx_801783C0[i] = 0; gControllerRumbleTimers[i] = 0; gPlayerScores[i] = 0; } + if (gLevelMode == LEVELMODE_ALL_RANGE) { MEM_ARRAY_ALLOCATE(gScenery360, 200); + for (i = 0; i < 200; i++) { gScenery360[i].obj.status = OBJ_FREE; } + switch (gCurrentLevel) { case LEVEL_SECTOR_Z: if (!D_ctx_8017782C) { @@ -2673,28 +2827,33 @@ void Play_Init(void) { ActorAllRange_SpawnTeam(); } break; + case LEVEL_FORTUNA: Fortuna_LoadLevelObjects(); ActorAllRange_SpawnTeam(); break; + case LEVEL_KATINA: Katina_Init(); if (!D_ctx_8017782C) { ActorAllRange_SpawnTeam(); } break; + case LEVEL_BOLSE: if (!D_ctx_8017782C) { - Bolse_80191ED8(); + Bolse_LoadLevelObjects(); ActorAllRange_SpawnTeam(); } break; + case LEVEL_VENOM_2: Venom2_LoadLevelObjects(); if (gLevelPhase == 0) { ActorAllRange_SpawnTeam(); } break; + case LEVEL_VENOM_ANDROSS: if (gLevelPhase == 1) { if (gAllRangeCheckpoint == 0) { @@ -2704,6 +2863,7 @@ void Play_Init(void) { } } break; + case LEVEL_VERSUS: Play_InitVsStage(); gTeamLowHealthMsgTimer = -1; @@ -2719,21 +2879,29 @@ void Player_SetupArwingShot(Player* player, PlayerShot* shot, f32 arg2, f32 arg3 Vec3f sp2C; PlayerShot_Initialize(shot); + Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -((player->xRot_120 + player->rot.x + player->aerobaticPitch) * M_DTOR), MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, -((player->bankAngle + player->rockAngle) * M_DTOR), MTXF_APPLY); + Matrix_Translate(gCalcMatrix, player->xShake, player->yBob, 0.0f, MTXF_APPLY); + if (gVersusMode && (shotId <= PLAYERSHOT_TWIN_LASER)) { speed *= 0.5f; } + sp44.x = 0.0f; sp44.y = 0.0f; sp44.z = speed; + Matrix_MultVec3f(gCalcMatrix, &sp44, &sp38); + sp44.x = arg2; sp44.y = -5.0f + arg3; sp44.z = 0.0f; + Matrix_MultVec3f(gCalcMatrix, &sp44, &sp2C); + shot->obj.status = SHOT_ACTIVE; shot->vel.x = sp38.x; shot->vel.y = sp38.y; @@ -2746,6 +2914,7 @@ void Player_SetupArwingShot(Player* player, PlayerShot* shot, f32 arg2, f32 arg3 } else { shot->timer = 37; } + if (shot->obj.id == PLAYERSHOT_LOCK_SEARCH) { shot->obj.pos.x = player->pos.x + sp2C.x; shot->obj.pos.y = player->pos.y + sp2C.y; @@ -2756,9 +2925,11 @@ void Player_SetupArwingShot(Player* player, PlayerShot* shot, f32 arg2, f32 arg3 shot->obj.pos.y = player->pos.y + sp2C.y + (sp38.y * 1.2); shot->obj.pos.z = player->trueZpos + sp2C.z + (sp38.z * 1.2f); } + shot->obj.rot.x = player->xRot_120 + player->rot.x + player->aerobaticPitch; shot->obj.rot.y = player->rot.y + player->yRot_114; shot->obj.rot.z = player->bankAngle; + if (shotId == PLAYERSHOT_LOCK_ON) { if (gCurrentLevel == LEVEL_AQUAS) { shot->unk_58 = RAND_INT(360.0f); @@ -2826,8 +2997,8 @@ void Player_SetupTankShot(Player* player, PlayerShot* shot, PlayerShotId shotId, shot->obj.rot.z = player->rot.z; shot->timer = 40; shot->obj.id = shotId; - shot->sourceId = player->num; + if (shotId == PLAYERSHOT_LOCK_ON) { if (speed <= 65.0f) { shot->unk_5C = 1; @@ -2852,11 +3023,13 @@ void Player_TankCannon(Player* player) { void Player_ArwingLaser(Player* player) { s32 i; - LaserStrength laser = gLaserStrength[gPlayerNum]; + LaserStrength laser; + laser = gLaserStrength[gPlayerNum]; if (player->wings.unk_14 > -8.0f) { laser = LASERS_SINGLE; } + switch (laser) { case LASERS_SINGLE: for (i = 0; i < ARRAY_COUNT(gPlayerShots) - 1; i++) { @@ -2897,6 +3070,7 @@ void Player_SmartBomb(Player* player) { } else { gBombCount[player->num]--; } + if (player->form == FORM_ARWING) { Player_SetupArwingShot(player, &gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1], 0.0f, 0.0f, PLAYERSHOT_BOMB, 180.0f); @@ -2905,8 +3079,10 @@ void Player_SmartBomb(Player* player) { } else { Player_SetupOnFootShot(player, &gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1], PLAYERSHOT_BOMB); } + gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1].unk_48 = 30.0f; gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1].unk_60 = 0; + Audio_InitBombSfx(player->num, 1); Audio_PlayBombFlightSfx(player->num, gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1].sfxSource); } @@ -2918,17 +3094,21 @@ void Player_SetupOnFootShot(Player* player, PlayerShot* shot, PlayerShotId shotI Vec3f sp44; PlayerShot_Initialize(shot); + Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + player->damageShake + 180.0f) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -((player->rot.x + player->damageShake) * M_DTOR), MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, -((player->bankAngle + player->rockAngle + player->damageShake) * M_DTOR), MTXF_APPLY); Matrix_RotateX(gCalcMatrix, player->unk_154 * M_DTOR, MTXF_APPLY); + sp5C.x = 0.0f; sp5C.y = 0.0f; + if (shotId == PLAYERSHOT_BOMB) { sp5C.z = 100.0f; } else { sp5C.z = 150.0f; } + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp5C, &sp50); Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + player->damageShake + 180.0f) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -((player->rot.x + player->damageShake) * M_DTOR), MTXF_APPLY); @@ -2936,13 +3116,17 @@ void Player_SetupOnFootShot(Player* player, PlayerShot* shot, PlayerShotId shotI Matrix_Translate(gCalcMatrix, 0.0f, player->yBob, 0, MTXF_APPLY); Matrix_Translate(gCalcMatrix, -10.0f, 25.0f, 0.0f, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, player->unk_154 * M_DTOR, MTXF_APPLY); + sp5C.x = 0.0f; sp5C.y = 0.0f; sp5C.z = 0; + Matrix_MultVec3f(gCalcMatrix, &sp5C, &sp44); + shot->vel.x = sp50.x; shot->vel.y = sp50.y; shot->vel.z = sp50.z; + shot->obj.pos.x = player->pos.x + sp44.x; shot->obj.pos.y = player->pos.y + sp44.y; shot->obj.pos.z = player->trueZpos + sp44.z; @@ -2980,6 +3164,7 @@ bool Player_CanLockOn(s32 playerNum) { return false; } } + if (gVersusMode) { for (i = 0; i < gCamCount; i++) { if (((gPlayer[playerNum].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || @@ -3004,6 +3189,7 @@ bool Player_UpdateLockOn(Player* player) { if (gChargeTimers[player->num] == 20) { Object_PlayerSfx(player->sfxSource, NA_SE_LOCK_SEARCH, player->num); } + if (!((gInputHold->button & R_TRIG) && (gInputHold->button & Z_TRIG) && (player->form == FORM_ARWING) && (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE)) && ((gGameFrameCount % 4) == 0) && Player_CanLockOn(player->num)) { @@ -3047,6 +3233,7 @@ bool Player_UpdateLockOn(Player* player) { break; } } + if (gChargeTimers[player->num] > 10) { if ((gPlayerShots[14 - player->num].obj.status == SHOT_FREE) || (gPlayerShots[14 - player->num].obj.id != PLAYERSHOT_LOCK_ON) || @@ -3066,20 +3253,24 @@ bool Player_UpdateLockOn(Player* player) { } gChargeTimers[player->num] = 0; } + if (gInputPress->button & B_BUTTON) { hasBombTarget = false; + for (i = 0; i < ARRAY_COUNT(gActors); i++) { if ((gActors[i].obj.status == OBJ_ACTIVE) && (gActors[i].lockOnTimers[player->num] != 0)) { hasBombTarget = true; break; } } + for (i = 0; i < gCamCount; i++) { if (gVsLockOnTimers[i][player->num] != 0) { hasBombTarget = true; break; } } + if (hasBombTarget && (gBombCount[player->num] != 0) && (gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1].obj.status == SHOT_FREE)) { gBombCount[player->num]--; @@ -3105,6 +3296,7 @@ void Player_Shoot(Player* player) { if ((player->wings.rightState <= WINGSTATE_BROKEN) || (player->wings.leftState <= WINGSTATE_BROKEN)) { gLaserStrength[player->num] = LASERS_SINGLE; } + if (!Player_UpdateLockOn(player)) { if (gLaserStrength[gPlayerNum] > LASERS_SINGLE) { Math_SmoothStepToF(&player->wings.unk_14, -10.0f, 1.0f, 0.5f, 0.0f); @@ -3124,6 +3316,7 @@ void Player_Shoot(Player* player) { Player_SmartBomb(player); } break; + case FORM_LANDMASTER: if (!Player_UpdateLockOn(player)) { if (gShootButton[player->num] & gInputPress->button) { @@ -3132,6 +3325,7 @@ void Player_Shoot(Player* player) { Player_SmartBomb(player); } break; + case FORM_ON_FOOT: if (gInputPress->button & A_BUTTON) { player->shotTimer = 0; @@ -3160,6 +3354,7 @@ void Player_ArwingBank(Player* player) { } else if ((player->wings.leftState <= WINGSTATE_BROKEN) && (player->wings.rightState == WINGSTATE_INTACT)) { sp3C = 17.0f; } + sp38 = 0.1f; if ((gInputHold->button & Z_TRIG) && !(gInputHold->button & R_TRIG)) { sp3C = 90.0f; @@ -3188,7 +3383,9 @@ void Player_ArwingBank(Player* player) { } } } + Math_SmoothStepToF(&player->zRotBank, sp3C, sp38, 10.0f, 0.f); + if (gInputPress->button & Z_TRIG) { player->sfx.bank = 1; if (player->rollInputTimerL != 0) { @@ -3200,6 +3397,7 @@ void Player_ArwingBank(Player* player) { player->rollInputTimerL = 10; } } + if (gInputPress->button & R_TRIG) { player->sfx.bank = 1; if (player->rollInputTimerR != 0) { @@ -3216,6 +3414,7 @@ void Player_ArwingBank(Player* player) { void Player_UseTankJets(Player* player) { Math_SmoothStepToF(&player->unk_170, 0.0f, 1.0f, 0.2f, 0.0f); Math_SmoothStepToF(&player->unk_16C, 0.0f, 1.0f, 0.2f, 0.0f); + if (gInputPress->button & Z_TRIG) { if ((player->rollInputTimerL != 0) && (player->zRotBank > 0.0f) && (player->boostMeter < 10.0f)) { player->rollState = 1; @@ -3225,6 +3424,7 @@ void Player_UseTankJets(Player* player) { player->rollInputTimerL = 10; } } + if (gInputPress->button & R_TRIG) { if ((player->rollInputTimerR != 0) && (player->zRotBank < 0.0f) && (player->boostMeter < 10.0f)) { player->rollState = 1; @@ -3234,6 +3434,7 @@ void Player_UseTankJets(Player* player) { player->rollInputTimerR = 10; } } + player->unk_18C = fabsf(SIN_DEG(player->zRotBank) * 25.0f); player->unk_18C += fabsf(SIN_DEG(player->zRotBarrelRoll) * 20.0f); } @@ -3245,12 +3446,15 @@ void Player_UpdatePath(Player* player) { player->zPathVel = -player->vel.z; player->zPath += -player->vel.z; + gPathVelZ = -player->vel.z; gPathProgress = player->zPath; gPathTexScroll += player->zPathVel; + if (gGroundType == 4) { gPathGroundScroll = player->zPathVel; } + if (!gBossActive && (player->zPath > 500000.0f)) { player->zPath = 0.0f; player->pos.z = 0.0f; @@ -3267,6 +3471,7 @@ void Player_UpdatePath(Player* player) { break; } } + while (true) { if (player->bankAngle < -360.0f) { player->bankAngle += 360.0f; @@ -3274,6 +3479,7 @@ void Player_UpdatePath(Player* player) { break; } } + if (gCurrentLevel == LEVEL_UNK_15) { Math_SmoothStepToF(&player->pathStep, 10.0f, 0.1f, 0.5f, 0.0001f); player->pos.x += Math_SmoothStepToF(&player->xPath, player->xPathTarget, 0.1f, player->pathStep, 0.0001f); @@ -3283,6 +3489,7 @@ void Player_UpdatePath(Player* player) { gPathVelX = Math_SmoothStepToF(&player->xPath, player->xPathTarget, 0.1f, player->pathStep, 0.0001f); gPathVelY = Math_SmoothStepToF(&player->yPath, player->yPathTarget, 0.1f, player->pathStep, 0.0001f); } + if (player->pathChangeTimer != 0) { player->pathChangeTimer--; Math_SmoothStepToF(&player->yRot_114, player->pathChangeYaw, 0.03f, 0.5f, 0.0001f); @@ -3364,16 +3571,22 @@ void Player_MoveArwing360(Player* player) { gPlayerTurnRate = 2.3f; gPlayerTurnStickMod = 0.68f; + sp7C = -gInputPress->stick_x; sp78 = gInputPress->stick_y; + Math_SmoothStepToAngle(&player->aerobaticPitch, 0.0f, 0.1f, 5.0f, 0.01f); Matrix_RotateZ(gCalcMatrix, -player->zRotBank * M_DTOR, MTXF_NEW); + sp4C.x = sp7C * 0.75f; sp4C.y = sp78 * 0.75f; sp4C.z = 0.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp4C, &sp40); + sp60 = sp40.y; sp5C = sp58 = 0.0f; + if (sp40.x < -5.0f) { sp5C = -sp40.x; } @@ -3386,16 +3599,20 @@ void Player_MoveArwing360(Player* player) { Math_SmoothStepToF(&player->wings.unk_08, -sp60 - sp5C, 0.1f, 100.0f, 0.0f); Math_SmoothStepToF(&player->wings.unk_0C, -sp60 + sp58, 0.1f, 100.0f, 0.0f); Math_SmoothStepToF(&player->wings.unk_10, -sp60 - sp58, 0.1f, 100.0f, 0.0f); + scale = 0.1f; if ((player->zRotBank > 10.0f) && (sp7C > 0)) { gPlayerTurnRate *= 2.0f; scale = 0.2f; } + if ((player->zRotBank < -10.0f) && (sp7C < 0)) { gPlayerTurnRate *= 2.0f; scale = 0.2f; } + Math_SmoothStepToF(&player->rot.y, sp7C * gPlayerTurnStickMod, scale, gPlayerTurnRate, 0.03f); + scale = 0.03f; if ((player->zRotBank > 10.0f) && (sp7C > 0)) { scale = 0.05f; @@ -3403,7 +3620,9 @@ void Player_MoveArwing360(Player* player) { if ((player->zRotBank < -10.0f) && (sp7C < 0)) { scale = 0.05f; } + Math_SmoothStepToF(&player->yRotVel_11C, player->rot.y * scale, 0.1f, 0.8f, 0.05f); + player->yRot_114 += player->yRotVel_11C; if (player->yRot_114 >= 360.0f) { player->yRot_114 -= 360.0f; @@ -3411,33 +3630,44 @@ void Player_MoveArwing360(Player* player) { if (player->yRot_114 < 0.0f) { player->yRot_114 += 360.0f; } + gPlayerTurnRate = 2.3f; var_fa1 = 0.1f; temp = -sp78 * gPlayerTurnStickMod; + if ((temp <= 0.0f) && (player->pos.y < (gGroundHeight + 50.0f))) { gPlayerTurnRate *= 2.0f; temp = 0.0f; var_fa1 = 0.2f; } + Math_SmoothStepToF(&player->rot.x, temp, var_fa1, gPlayerTurnRate, 0.03f); + var_fv1 = 1.5f; if (player->pos.y < (gGroundHeight + 70.0f)) { var_fv1 = 0.8f; } + if (!((gInputHold->button & R_TRIG) && (gInputHold->button & Z_TRIG)) && !(!(gInputHold->button & R_TRIG) && !(gInputHold->button & Z_TRIG))) { var_fv1 = 0.1f; } + var_fv0 = 4.0f; if (sp7C == 0) { var_fv0 = 1.0f; } + Math_SmoothStepToF(&player->rot.z, sp7C * 0.6f * var_fv1, 0.1f, var_fv0, 0.03f); + player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; + Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -((player->xRot_120 + player->rot.x + player->aerobaticPitch) * M_DTOR), MTXF_APPLY); + sp4C.x = 0.0f; sp4C.y = 0.0f; + if (player->wings.rightState <= WINGSTATE_BROKEN) { sp4C.x -= 2.5f; sp4C.y -= 2.5f; @@ -3447,15 +3677,20 @@ void Player_MoveArwing360(Player* player) { sp4C.y -= 2.5f; } sp4C.z = player->baseSpeed + player->boostSpeed; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp4C, &sp40); + player->vel.x = sp40.x; player->vel.z = sp40.z; player->vel.y = sp40.y; + player->pos.x += player->vel.x; player->pos.y += player->vel.y; + if ((player->pathHeight < player->pos.y) && (player->vel.y >= 0.0f)) { Math_SmoothStepToF(&player->pos.y, player->pathHeight, 0.1f, fabsf(player->vel.y * 1.5f) + 5.0f, 0.0f); } + if ((player->pos.y < player->pathFloor) && (player->vel.y <= 0.0f)) { if (player->pathFloor >= 0.0f) { player->pos.y = player->pathFloor; @@ -3463,13 +3698,17 @@ void Player_MoveArwing360(Player* player) { Math_SmoothStepToF(&player->pos.y, player->pathFloor, 0.1f, fabsf(player->vel.y * 1.5f) + 5.0f, 0.0f); } } + player->pos.z += player->vel.z; + if (player->pathHeight - 100.0f < player->pos.y) { player->flags_228 = PFLAG_228_3; } + if (player->pos.y < -(player->pathHeight - 100.0f)) { player->flags_228 = PFLAG_228_2; } + Player_CheckBounds360(player); player->trueZpos = player->pos.z; Player_WingEffects(player); @@ -3478,36 +3717,43 @@ void Player_MoveArwing360(Player* player) { void Player_PerformLoop(Player* player) { f32 temp; - f32 sp58; + f32 sp58 = 60.0f; Vec3f sp4C; Vec3f sp40; - sp58 = 60.0f; if (gVersusMode) { gVsLockOnTimers[player->num][0] = gVsLockOnTimers[player->num][1] = gVsLockOnTimers[player->num][2] = gVsLockOnTimers[player->num][3] = 0; } + if (player->aerobaticPitch > 240.0f) { sp58 = -50.0f; } + Math_SmoothStepToF(&player->wings.unk_04, sp58, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->wings.unk_08, sp58, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->wings.unk_0C, sp58, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->wings.unk_10, sp58, 0.3f, 100.0f, 0.0f); + if (player->aerobaticPitch < 180.0f) { player->pos.y += 2.0f; } + player->boostCooldown = true; + if (gLevelMode == LEVELMODE_ON_RAILS) { player->boostMeter += 2.0f; } else { player->boostMeter += 1.0f; } + if (player->boostMeter > 90.0f) { player->boostMeter = 90.0f; } + player->unk_190 = 2; Math_SmoothStepToF(&player->aerobaticPitch, 360.0f, 0.1f, 5.0f, 0.001f); + if (player->aerobaticPitch > 350.0f) { player->somersault = false; if (gLevelMode != LEVELMODE_ON_RAILS) { @@ -3522,20 +3768,28 @@ void Player_PerformLoop(Player* player) { } Math_SmoothStepToF(&player->rot.z, 0.0f, 0.1f, 5.0f, 0.0f); Math_SmoothStepToF(&player->rot.x, 0.0f, 0.1f, 5.0f, 0.0f); + temp = -gInputPress->stick_x * 0.68f; + Math_SmoothStepToF(&player->rot.y, temp, 0.1f, 2.0f, 0.0f); + player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; + Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -((player->xRot_120 + player->rot.x + player->aerobaticPitch) * M_DTOR), MTXF_APPLY); + sp4C.x = 0.0f; sp4C.y = 0.0f; sp4C.z = player->baseSpeed; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp4C, &sp40); + player->vel.x = sp40.x; player->vel.z = sp40.z; player->vel.y = sp40.y; player->pos.x += player->vel.x; player->pos.y += player->vel.y; + if (player->pos.y < player->pathFloor + player->yPath) { player->pos.y = player->pathFloor + player->yPath; player->vel.y = 0.0f; @@ -3764,14 +4018,17 @@ void Player_MoveTank360(Player* player) { if (var_fv1 < player->unk_17C) { player->unk_17C -= 3.0f; } + if (player->unk_180 < 0) { player->unk_180 += 3.0f; } if (player->unk_180 > 0) { player->unk_180 -= 3.0f; } + gPlayerTurnRate = 3.0f; gPlayerTurnStickMod = 0.6666f; + sp5C = gInputPress->stick_x; if (sp5C == 0) { Math_SmoothStepToF(&player->rot.y, -sp5C * gPlayerTurnStickMod, 0.1f, gPlayerTurnRate * 0.5f, 0.1f); @@ -3779,6 +4036,7 @@ void Player_MoveTank360(Player* player) { Math_SmoothStepToF(&player->rot.y, -sp5C * gPlayerTurnStickMod, 0.1f, gPlayerTurnRate, 0.1f); } player->rot_104.y = player->rot.y; + var_fa0 = 0.03f; var_fa1 = 1.5f; if ((player->zRotBank > 10.0f) && (sp5C < 0.0f)) { @@ -3799,29 +4057,38 @@ void Player_MoveTank360(Player* player) { var_fa1 = 20.0f; } } + Math_SmoothStepToF(&player->yRotVel_11C, player->rot.y * var_fa0, 0.1f, var_fa1, 0.05f); + player->yRot_114 += player->yRotVel_11C; player->yRot_114 = Math_ModF(player->yRot_114, 360.0f); + Matrix_RotateX(gCalcMatrix, player->rot_104.x * M_DTOR, MTXF_NEW); Matrix_RotateZ(gCalcMatrix, player->rot_104.z * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + 180.0f) * M_DTOR, MTXF_APPLY); + sp44.x = 0.0f; sp44.y = 0.0f; sp44.z = player->baseSpeed; sp44.z -= fabsf((player->unk_184 * 0.4f * player->baseSpeed) / 15.0f); sp44.z += SIN_DEG(player->unk_000) * player->boostSpeed; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); + player->vel.x = sp38.x; player->vel.z = sp38.z; + if (player->unk_16C > 0.2f) { Math_SmoothStepToF(&player->unk_184, player->baseSpeed * 0.5f, 1.0f, 1.0f, 0); } + if (player->unk_170 > 0.2f) { Math_SmoothStepToF(&player->unk_184, -player->baseSpeed * 0.5f, 1.0f, 1.0f, 0); } if (!(player->unk_170 > 0.2f) && !(player->unk_16C > 0.2f) && player->grounded) { Math_SmoothStepToF(&player->unk_184, 0.0f, 1.0f, 0.75f, 0.0f); } + if (player->rollState != 0) { if (player->rollRate < 0) { player->unk_184 = 15.0f; @@ -3830,21 +4097,27 @@ void Player_MoveTank360(Player* player) { player->unk_184 = -15.0f; } } + sp44.x = -player->unk_184; sp44.y = 0; sp44.z = 0; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); + player->pos.x += sp38.x; player->pos.z += sp38.z; player->pos.x += player->vel.x; player->vel.y -= player->gravity; player->pos.y += player->vel.y; + if (player->grounded) { Math_SmoothStepToAngle(&player->rot.x, player->rot_104.x, 0.2f, 5.0f, 0.005f); Math_SmoothStepToAngle(&player->rot.z, player->rot_104.z, 0.2f, 5.0f, 0.005f); Math_SmoothStepToF(&player->unk_000, 0.0f, 0.1f, 5.0f, 0.00001f); } + player->grounded = false; + if (player->pos.y <= gGroundHeight - 5.0f) { player->pos.y = gGroundHeight - 5.0f; if (player->vel.y < -20.0f) { @@ -3853,16 +4126,19 @@ void Player_MoveTank360(Player* player) { player->vel.y = 0.0f; player->grounded = true; } + if (player->vel.y < -80.0f) { player->vel.y = -80.0f; } if (player->vel.y > 20.0f) { player->vel.y = 20.0f; } + player->pos.z += player->vel.z; Player_CheckBounds360(player); player->trueZpos = player->pos.z; player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; + if (player->grounded) { player->rockPhase += player->baseSpeed * 5.0f; player->rockAngle = SIN_DEG(player->rockPhase) * 0.7f; @@ -3901,6 +4177,7 @@ void Player_MoveOnFoot(Player* player) { s32 pad; player->camRoll = 0.0f; + var_fa0 = 0.0f; if (player->pos.y > 10.0f) { var_fa0 = 20.0f; @@ -3908,6 +4185,7 @@ void Player_MoveOnFoot(Player* player) { if (player->pos.y > 300.0f) { var_fa0 = 40.0f; } + sp74 = gInputPress->stick_y * 0.8f; if (sp74 < -40.0f) { sp74 = -40.0f; @@ -3915,17 +4193,22 @@ void Player_MoveOnFoot(Player* player) { if (var_fa0 < sp74) { sp74 = var_fa0; } + Math_SmoothStepToF(&player->unk_154, sp74, 0.1f, 3.0f, 0.00001f); Math_SmoothStepToF(&player->unk_180, 0.0f, 0.15f, 5.0f, 0.00001f); Math_SmoothStepToF(&player->unk_158, sp74, 0.2f, 5.0f, 0.00001f); + gPlayerTurnRate = 3.0f; gPlayerTurnStickMod = 0.666f; + sp74 = gInputPress->stick_x; sp70 = gInputPress->stick_y; Math_SmoothStepToF(&player->rot.y, -sp74 * gPlayerTurnStickMod * 0.6f, 0.5f, gPlayerTurnRate, 0.001f); Math_SmoothStepToF(&player->rot.z, -sp74 * gPlayerTurnStickMod * 0.2f * player->baseSpeed / 15.0f, 0.2f, 5.0f, 0.001f); + player->bankAngle = player->rot.z; + if ((sp74 != 0.0f) || (sp70 != 0.0f)) { Math_SmoothStepToF(&player->unk_15C, sp74 * gPlayerTurnStickMod, 0.9f, 2.0f * gPlayerTurnRate, 0.1f); Math_SmoothStepToF(&player->unk_164, sp74 * 0.3f, 0.1f, 10.0f, 0.00001f); @@ -3944,7 +4227,9 @@ void Player_MoveOnFoot(Player* player) { Math_SmoothStepToF(&player->unk_164, player->unk_174, 0.1f, 10.0f, 0.00001f); Math_SmoothStepToF(&player->unk_168, player->unk_178, 0.1f, 10.0f, 0.00001f); } + player->rot_104.y = player->rot.y; + if (player->baseSpeed < 1.5f) { var_fv0 = 0.12f; var_fa0 = 3.0f; @@ -3952,37 +4237,50 @@ void Player_MoveOnFoot(Player* player) { var_fv0 = 0.08f; var_fa0 = 1.5f; } + Math_SmoothStepToF(&player->yRotVel_11C, -sp74 * gPlayerTurnStickMod * var_fv0, 0.2f, var_fa0, 0.0f); + player->yRot_114 += player->yRotVel_11C; player->yRot_114 = Math_ModF(player->yRot_114, 360.0f); + Matrix_RotateX(gCalcMatrix, player->rot_104.x * M_DTOR, MTXF_NEW); Matrix_RotateZ(gCalcMatrix, player->rot_104.z * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + 180.0f) * M_DTOR, MTXF_APPLY); + sp58.x = 0.0f; sp58.y = 0.0f; sp58.z = player->baseSpeed; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp58, &sp4C); + player->vel.x = sp4C.x; player->vel.z = sp4C.z; player->pos.x += player->vel.x; + if ((player->pos.y < 40.0f) || (player->pos.y > 670.0f)) { player->rot_104.z = 0.0f; player->rot_104.x = 0.0f; } + Math_SmoothStepToAngle(&player->xRot_0FC, player->rot_104.x, 0.15f, 15.0f, 0.005f); Math_SmoothStepToAngle(&player->zRot_0FC, player->rot_104.z, 0.15f, 15.0f, 0.005f); + if (player->grounded) { if (player->baseSpeed > 1.0f) { player->unk_00C += player->unk_008; + if ((s32) player->unk_00C >= Animation_GetFrameCount(&D_versus_301CFEC)) { player->unk_00C = 0.0f; } + player->yBob = 2.0f * SIN_DEG((player->unk_20C + 7) * 24.0f); if (player->yBob < -0.5f) { player->yBob = -0.5f; } + player->yBob -= 3.0f; player->unk_20C = player->unk_00C; + switch (gPlayerNum) { case 0: sp44 = Animation_GetFrameData(&D_versus_301CFEC, player->unk_20C, sp78); @@ -3997,10 +4295,13 @@ void Player_MoveOnFoot(Player* player) { sp44 = Animation_GetFrameData(&D_versus_301C3A8, player->unk_20C, sp78); break; } + Math_SmoothStepToVec3fArray(sp78, player->jointTable, 1, sp44, 1.0f, player->unk_010, 0.01f); + if (player->unk_010 < 50.0f) { player->unk_010 += 2.0f; } + sp64 = player->baseSpeed; if (gGameFrameCount & 4) { sp64 = 2.0f * player->baseSpeed; @@ -4014,6 +4315,7 @@ void Player_MoveOnFoot(Player* player) { player->unk_010 = 0.0f; } } + switch (gPlayerNum) { case 0: sp48 = SEGMENTED_TO_VIRTUAL(D_versus_302E56C); @@ -4036,6 +4338,7 @@ void Player_MoveOnFoot(Player* player) { player->unk_00C = 0.0f; } } + if (!player->grounded) { switch (gPlayerNum) { case 0: @@ -4053,6 +4356,7 @@ void Player_MoveOnFoot(Player* player) { } Math_SmoothStepToVec3fArray(sp48, player->jointTable, 1, 24, 0.2f, 10.0f, 0.01f); } + player->gravity = 2.0f; if ((gInputPress->button & Z_TRIG) && player->grounded) { player->vel.y = 12.0f; @@ -4060,15 +4364,18 @@ void Player_MoveOnFoot(Player* player) { if ((gInputHold->button & Z_TRIG) && (player->vel.y > 0.0f)) { player->gravity = 1.5f; } + player->grounded = false; player->vel.y -= player->gravity; player->pos.y += player->vel.y; + if (player->pos.y <= gGroundHeight) { player->grounded = true; player->pos.y = 0.0f; player->vel.y = 0.0f; player->rot.x += (player->pos.y - player->rot.x) * 0.05f; } + if (player->vel.y < -50.0f) { player->vel.y = -50.0f; } @@ -4098,6 +4405,7 @@ void Player_Setup(Player* playerx) { gTiStartLandmaster = 0; player->shields = 255; + if (gVersusMode) { switch (gHandicap[gPlayerNum]) { case 1: @@ -4108,8 +4416,10 @@ void Player_Setup(Player* playerx) { break; } } + player->wings.rightState = WINGSTATE_INTACT; player->wings.leftState = WINGSTATE_INTACT; + if (gExpertMode) { gLeftWingHealth[gPlayerNum] = 10; gRightWingHealth[gPlayerNum] = 10; @@ -4136,6 +4446,7 @@ void Player_Setup(Player* playerx) { player->groundPos.y = -1000.0f; player->cam.at.z = player->cam.eye.z - 1000.0f; D_ctx_80177950 = 1.0f; + if ((gLevelType == LEVELTYPE_SPACE) && (gCurrentLevel != LEVEL_BOLSE)) { player->hideShadow = true; player->unk_0A8 = 3000.0f; @@ -4152,8 +4463,10 @@ void Player_Setup(Player* playerx) { player->pathFloor = gGroundHeight + 40.0f; player->unk_0A8 = 3000.0f; } + player->baseSpeed = gArwingSpeed; player->pos.y = 350.0f; + switch (gCurrentLevel) { case LEVEL_MACBETH: case LEVEL_TITANIA: @@ -4172,6 +4485,7 @@ void Player_Setup(Player* playerx) { player->pos.y = 0.0f; } break; + case LEVEL_AQUAS: player->form = FORM_BLUE_MARINE; player->gravity = 0.0f; @@ -4180,14 +4494,17 @@ void Player_Setup(Player* playerx) { player->pathHeight = 720.0f; player->pathFloor = gGroundHeight + 30.0f; break; + case LEVEL_SOLAR: case LEVEL_ZONESS: player->pathFloor = -450.0f; break; } + if (gCurrentLevel != LEVEL_CORNERIA) { gSavedGroundSurface = SURFACE_GRASS; } + gGoldRingCount[0] = gSavedGoldRingCount[0]; do { if (gGoldRingCount[0] > 3) { @@ -4198,6 +4515,7 @@ void Player_Setup(Player* playerx) { if (gGoldRingCount[0] == 3) { gGoldRingCount[0] = 0; } + gHitCount = gSavedHitCount; if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) || ((gCurrentLevel == LEVEL_VENOM_2) && (gLevelPhase == 2))) { if (D_ctx_80177C9C != 0) { @@ -4213,9 +4531,11 @@ void Player_Setup(Player* playerx) { } gHitCount = gSavedHitCount = D_ctx_80177CA4; } + D_hud_80161720[0] = 0.0f; D_hud_80161720[1] = 0.0f; D_hud_80161720[2] = 0.0f; + gDisplayedHitCount = gHitCount; D_hud_80161730 = 0; gMissedZoSearchlight = gSavedZoSearchlightStatus; @@ -4223,6 +4543,7 @@ void Player_Setup(Player* playerx) { gGroundSurface = gSavedGroundSurface; gPathProgress = player->zPath = gSavedPathProgress; player->pos.z = player->trueZpos = -player->zPath; + if ((gSavedObjectLoadIndex > 0) && (gLevelMode == LEVELMODE_ON_RAILS)) { if (gCurrentLevel == LEVEL_MACBETH) { sp2E = gObjectLoadIndex; @@ -4231,6 +4552,7 @@ void Player_Setup(Player* playerx) { } func_enmy_80062568(); } + if (player->form == FORM_LANDMASTER) { player->pos.z -= 200.0f; player->trueZpos -= 200.0f; @@ -4247,18 +4569,22 @@ void Player_Setup(Player* playerx) { player->pos.z = D_800D3124[gPlayerNum]; player->yRot_114 = D_800D3154[gPlayerNum]; player->form = gPlayerForms[gPlayerNum]; + switch (player->form) { case FORM_ARWING: break; + case FORM_LANDMASTER: player->pos.y = 0.0f; player->baseSpeed = 15.0f; player->gravity = 3.0f; break; + case FORM_ON_FOOT: player->pos.y = 0.0f; player->baseSpeed = 15.0f; player->groundPos.y = 0; + switch (gPlayerNum) { case 0: sp38 = SEGMENTED_TO_VIRTUAL(D_versus_302E56C); @@ -4273,6 +4599,7 @@ void Player_Setup(Player* playerx) { sp38 = SEGMENTED_TO_VIRTUAL(D_versus_302E65C); break; } + for (j = 0; j < 30; j++, sp38++) { player->jointTable[j] = *sp38; } @@ -4280,8 +4607,10 @@ void Player_Setup(Player* playerx) { } Camera_Update360(player, true); } + player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->wingPosition = gLevelType; + if ((gLevelMode == LEVELMODE_ALL_RANGE) && !gVersusMode) { player->pos.z = 8000.0f; player->pos.y = 670.0f; @@ -4300,14 +4629,17 @@ void Player_Setup(Player* playerx) { player->unk_014 = 1.0f; player->unk_018 = 1.0f; } + if (D_ctx_8017782C && (gSavedObjectLoadIndex == 0)) { gLeveLClearStatus[gCurrentLevel] = 0; + for (j = 0; j < 10; j++) { D_ctx_80177A10[j] = 0; D_ctx_80177A48[j] = 0.0f; } D_ctx_8017782C = false; gAllRangeCheckpoint = 0; + switch (gCurrentLevel) { case LEVEL_CORNERIA: player->state_1C8 = PLAYERSTATE_1C8_LEVEL_INTRO; @@ -4359,6 +4691,7 @@ void Player_Setup(Player* playerx) { Macbeth_801ACFBC(); } } + if (player->state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) { player->draw = true; switch (gCurrentLevel) { @@ -4406,6 +4739,7 @@ void Player_Setup(Player* playerx) { if ((gCurrentLevel == LEVEL_TRAINING)) { gClearPlayerInfo = true; } + if (gClearPlayerInfo && !gVersusMode) { for (j = TEAM_ID_FALCO; j < TEAM_ID_MAX; j++) { gTeamShields[j] = gSavedTeamShields[j] = gPrevPlanetTeamShields[j] = gPrevPlanetSavedTeamShields[j] = 255; @@ -4427,16 +4761,21 @@ void Player_Setup(Player* playerx) { gClearPlayerInfo = false; } } + if ((gCurrentLevel == LEVEL_TRAINING)) { gClearPlayerInfo = true; } + player->sfx.levelType = gLevelType; player->sfx.form = player->form; - func_display_80057814(player); + + Display_SetupPlayerSfxPos(player); + if (!gVersusMode && (((gCurrentLevel != LEVEL_TITANIA) && (gCurrentLevel != LEVEL_SOLAR)) || gVersusMode || (player->state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO))) { Audio_StartPlayerNoise(gPlayerNum); } + if ((player->form == FORM_ARWING) && !gVersusMode) { switch (player->wingPosition) { case 0: @@ -4450,6 +4789,7 @@ void Player_Setup(Player* playerx) { break; } } + if (gLaserStrength[gPlayerNum] > LASERS_SINGLE) { player->wings.unk_14 = -10.0f; } @@ -4472,12 +4812,14 @@ void Player_UpdateArwingRoll(Player* player) { Math_SmoothStepToF(&player->unk_150, 1.0f, 0.05f, 10.0f, 0.0001f); player->zRotBarrelRoll = Math_ModF(player->zRotBarrelRoll, 360.0f); + if (player->barrelRollAlpha > 0) { player->barrelRollAlpha -= 30; if (player->barrelRollAlpha <= 0) { player->barrelRollAlpha = 0; } } + if (player->meteoWarpTimer == 0) { if (player->rollState == 0) { Math_SmoothStepToF(&player->zRotBarrelRoll, 0.0f, 0.1f, 10.0f, 0.00001f); @@ -4497,6 +4839,7 @@ void Player_UpdateArwingRoll(Player* player) { if (player->rollTimer != 0) { player->rollTimer--; } + if (player->rollState != 0) { player->rollInputTimerR = 0; player->rollInputTimerL = 0; @@ -4523,20 +4866,9 @@ void Player_UpdateArwingRoll(Player* player) { } void Player_UpdateTankRoll(Player* player) { - f32 temp_fv0; - f32 temp_fv0_2; - s32* temp_v1; - s32 temp_t3; - s32 temp_t4; - s32 temp_v0; - s32 temp_v0_2; - s32 temp_v0_3; - s32 temp_v0_4; - s32 var_v0; - player->zRotBarrelRoll = Math_ModF(player->zRotBarrelRoll, 360.0f); + if (player->rollState == 0) { - temp_fv0 = player->zRotBarrelRoll; if (player->zRotBarrelRoll > 0.0f) { player->zRotBarrelRoll -= (player->zRotBarrelRoll * 0.1f); if (player->zRotBarrelRoll < 0.1f) { @@ -4550,7 +4882,7 @@ void Player_UpdateTankRoll(Player* player) { } } } - temp_v0 = player->rollInputTimerL; + if (player->rollInputTimerL != 0) { player->rollInputTimerL--; } @@ -4560,6 +4892,7 @@ void Player_UpdateTankRoll(Player* player) { if (player->rollTimer != 0) { player->rollTimer--; } + if (player->rollState != 0) { player->rollInputTimerR = 0; player->rollInputTimerL = 0; @@ -4570,12 +4903,14 @@ void Player_UpdateTankRoll(Player* player) { player->zRotBank = 0.0f; } } + if (player->zRotBank < 0.0f) { player->zRotBank += 8.0f; if (player->zRotBank > 0.0f) { player->zRotBank = 0.0f; } } + if (player->rollTimer == 0) { if (player->rollRate > 0) { player->rollRate -= 2; @@ -4589,6 +4924,7 @@ void Player_UpdateTankRoll(Player* player) { } else { Math_SmoothStepToF(&D_ctx_801779A8[player->num], 30.0f, 1.0f, 30.0f, 0.0f); } + if ((player->rollTimer >= 5) && (player->mercyTimer == 0)) { if (player->rollRate > 0) { player->unk_170 = 1.3f; @@ -4597,6 +4933,7 @@ void Player_UpdateTankRoll(Player* player) { player->unk_16C = 1.3f; } } + if (gVersusMode) { gVsLockOnTimers[player->num][0] = gVsLockOnTimers[player->num][1] = gVsLockOnTimers[player->num][2] = gVsLockOnTimers[player->num][3] = 0; @@ -4613,6 +4950,7 @@ void Player_ArwingBoost(Player* player) { (gInputHold->button & gBoostButton[player->num])) { player->boostCooldown = true; } + if (gLevelMode == LEVELMODE_ON_RAILS) { sp28 = 3.0f; sp2C = 0.5f; @@ -4621,8 +4959,11 @@ void Player_ArwingBoost(Player* player) { sp28 = 1.5f; sp2C = 0.35f; } + player->sfx.boost = 0; + var = gInputPress->stick_y; // fake? + if (gLoopDownTimers[gPlayerNum] != 0) { gLoopDownTimers[gPlayerNum]--; } @@ -4739,7 +5080,7 @@ void Player_ArwingBoost2(Player* player) { void Player_ArwingBrake(Player* player) { f32 sp34; f32 sp30; - s32 var; + s32 stickY; if (gLevelMode == LEVELMODE_ON_RAILS) { sp30 = 3.0f; @@ -4748,17 +5089,21 @@ void Player_ArwingBrake(Player* player) { sp30 = 1.5f; sp34 = 0.35f; } - player->sfx.brake = 0; - var = gInputPress->stick_y; // fake? + + player->sfx.brake = false; + + stickY = gInputPress->stick_y; // fake? + if (gUturnDownTimers[gPlayerNum] != 0) { gUturnDownTimers[gPlayerNum]--; } if (gUturnBrakeTimers[gPlayerNum] != 0) { gUturnBrakeTimers[gPlayerNum]--; } - if (var >= -50) { + if (stickY >= -50) { gUturnDownTimers[gPlayerNum] = 5; } + if ((gUturnDownTimers[gPlayerNum] > 0) && (gUturnDownTimers[gPlayerNum] < 5) && (gDrawBackdrop < 5) && (gUturnBrakeTimers[gPlayerNum] != 0)) { gUturnDownTimers[gPlayerNum] = 0; @@ -4774,6 +5119,7 @@ void Player_ArwingBrake(Player* player) { gCoUturnCount++; } } + if ((gInputHold->button & gBrakeButton[player->num]) && !(gInputHold->button & gBoostButton[player->num]) && (player->state_1C8 != PLAYERSTATE_1C8_U_TURN) && !player->boostCooldown) { if (player->boostMeter == 0.0f) { @@ -4782,24 +5128,28 @@ void Player_ArwingBrake(Player* player) { gUturnBrakeTimers[gPlayerNum] = 5; } } + if (gLevelType == LEVELTYPE_PLANET) { Math_SmoothStepToF(&player->wings.unk_04, 90.0f, 0.2f, 100.0f, 0.0f); Math_SmoothStepToF(&player->wings.unk_08, -90.0f, 0.2f, 100.0f, 0.0f); Math_SmoothStepToF(&player->wings.unk_0C, 90.0f, 0.2f, 100.0f, 0.0f); Math_SmoothStepToF(&player->wings.unk_10, -90.0f, 0.2f, 100.0f, 0.0f); } + player->boostMeter += sp30; if (player->boostMeter > 90.0f) { player->boostCooldown = true; player->boostMeter = 90.0f; } + player->unk_190 = 0.3f; player->boostSpeed -= 1.0f; if (player->boostSpeed < -20.0f) { player->boostSpeed = -20.0f; } + Math_SmoothStepToF(&player->camDist, 180.0f, 0.1f, 10.0f, 0.0f); - player->sfx.brake = 1; + player->sfx.brake = true; Math_SmoothStepToF(&D_ctx_801779A8[player->num], 25.0f, 1.0f, 5.0f, 0.0f); } else if (player->boostMeter > 0.0f) { player->boostMeter -= sp34; @@ -4824,12 +5174,14 @@ void Player_TankBoostBrake(Player* player) { Math_SmoothStepToF(&player->boostMeter, 0.0f, 1.0f, 1.0f, 0.0f); } player->boostActive = false; + if (player->boostMeter == 0.0f) { player->boostCooldown = false; } else if (!(gInputHold->button & Z_TRIG) && !(gInputHold->button & R_TRIG) && !(gInputHold->button & gBoostButton[player->num]) && !(gInputHold->button & gBrakeButton[player->num])) { player->boostCooldown = true; } + sp2C = 20.0f; if ((gInputHold->button & gBoostButton[player->num]) && !player->boostCooldown) { if (player->boostMeter == 0.0f) { @@ -4846,6 +5198,7 @@ void Player_TankBoostBrake(Player* player) { player->boostCooldown = true; } } + if ((gInputHold->button & gBrakeButton[player->num]) && !player->boostCooldown) { if (player->boostMeter == 0.0f) { Player_PlaySfx(player->sfxSource, NA_SE_ARWING_BRAKE, player->num); @@ -4862,22 +5215,29 @@ void Player_TankBoostBrake(Player* player) { } void Player_UpdateTankJets(Player* player) { - f32 temp; - f32 temp2; + f32 stickY; + s32 pad; player->gravity = 3.0f; + if ((gInputHold->button & Z_TRIG) && !player->boostCooldown) { if (player->boostMeter == 0.0f) { Player_PlaySfx(player->sfxSource, NA_SE_ARWING_BOOST, player->num); } + player->unk_188 = 0.0f; + player->zRotBank += 4.0f; if (player->zRotBank > 50.0f) { player->zRotBank = 50.0f; } + Math_SmoothStepToF(&player->unk_170, 1.0f, 1.0f, 0.4f, 0.0f); + player->boostActive = true; + Math_SmoothStepToF(&player->boostMeter, 90.0f, 1.0f, 0.7f, 0.0f); + if (player->boostMeter >= 90.0f) { player->boostCooldown = true; } @@ -4898,14 +5258,20 @@ void Player_UpdateTankJets(Player* player) { if (player->boostMeter == 0.0f) { Player_PlaySfx(player->sfxSource, NA_SE_ARWING_BOOST, player->num); } + player->unk_188 = 0.0f; + player->zRotBank -= 4.0f; if (player->zRotBank < -50.0f) { player->zRotBank = -50.0f; } + Math_SmoothStepToF(&player->unk_16C, 1.0f, 1.0f, 0.4f, 0.0f); + player->boostActive = true; + Math_SmoothStepToF(&player->boostMeter, 90.0f, 1.0f, 0.7f, 0.0f); + if (player->boostMeter >= 90.0f) { player->boostCooldown = true; } @@ -4920,27 +5286,28 @@ void Player_UpdateTankJets(Player* player) { } } } + if ((player->unk_16C > 0.2f) && (player->unk_170 > 0.2f) && (player->radioDamageTimer == 0)) { player->zRotBank += (((__cosf(gGameFrameCount * M_DTOR * 8.0f) * 10.0f) - player->zRotBank) * 0.1f); Math_SmoothStepToAngle(&player->rot.x, 0.0f, 0.05f, 5.0f, 0.00001f); Math_SmoothStepToAngle(&player->rot.z, 0.0f, 0.05f, 5.0f, 0.00001f); - temp = gInputPress->stick_y; - Math_SmoothStepToF(&player->unk_000, temp * 0.5f, 0.05f, 5.0f, 0.00001f); + stickY = gInputPress->stick_y; + Math_SmoothStepToF(&player->unk_000, stickY * 0.5f, 0.05f, 5.0f, 0.00001f); Math_SmoothStepToF(&player->boostSpeed, 30.0f, 0.5f, 5.0f, 0.0f); player->gravity = -0.4f; Math_SmoothStepToF(&D_ctx_801779A8[player->num], 30.0f, 1.0f, 10.0f, 0.0f); if ((gCamCount == 1) && ((gGameFrameCount % 2) == 0)) { - func_effect_8007BC7C(RAND_FLOAT_CENTERED(20.0f) + player->pos.x, player->groundPos.y + 10.0f, - player->trueZpos - 10.0f, RAND_FLOAT(2.0f) + 4.0f); + Effect_Effect362_Spawn(RAND_FLOAT_CENTERED(20.0f) + player->pos.x, player->groundPos.y + 10.0f, + player->trueZpos - 10.0f, RAND_FLOAT(2.0f) + 4.0f); } } else if ((gCamCount == 1) && ((gGameFrameCount % 4) == 0) && (player->rollState == 0)) { if ((player->unk_16C > 0.2f) && (player->radioDamageTimer == 0)) { - func_effect_8007BC7C(RAND_FLOAT_CENTERED(10.0f) + (player->pos.x - 57.0f), player->groundPos.y + 10.0f, - player->trueZpos - 10.0f, RAND_FLOAT(2.0f) + 3.0f); + Effect_Effect362_Spawn(RAND_FLOAT_CENTERED(10.0f) + (player->pos.x - 57.0f), player->groundPos.y + 10.0f, + player->trueZpos - 10.0f, RAND_FLOAT(2.0f) + 3.0f); } if ((player->unk_170 > 0.2f) && (player->radioDamageTimer == 0)) { - func_effect_8007BC7C(RAND_FLOAT_CENTERED(10.0f) + (player->pos.x + 57.0f), player->groundPos.y + 10.0f, - player->trueZpos - 10.0f, RAND_FLOAT(2.0f) + 3.0f); + Effect_Effect362_Spawn(RAND_FLOAT_CENTERED(10.0f) + (player->pos.x + 57.0f), player->groundPos.y + 10.0f, + player->trueZpos - 10.0f, RAND_FLOAT(2.0f) + 3.0f); } } } @@ -4953,9 +5320,11 @@ void Player_UpdateEffects(Player* player) { s32 i; player->xShake = 0.0f; + player->basePos.x = player->pos.x; player->basePos.y = player->pos.y; player->basePos.z = player->pos.z; + if (player->csTimer != 0) { player->csTimer--; } @@ -4971,6 +5340,7 @@ void Player_UpdateEffects(Player* player) { if (player->dmgEffectTimer != 0) { player->dmgEffectTimer--; } + if (gVersusMode) { for (i = 0; i < gCamCount; i++) { if ((gVsLockOnTimers[player->num][i] != 0) && !(gControllerHold[i].button & A_BUTTON)) { @@ -4978,6 +5348,7 @@ void Player_UpdateEffects(Player* player) { } } } + if (gRightWingFlashTimer[player->num] != 0) { gRightWingFlashTimer[player->num]--; if (gRightWingFlashTimer[player->num] == 1000) { @@ -4996,17 +5367,22 @@ void Player_UpdateEffects(Player* player) { if (gRightWingDebrisTimer[player->num] != 0) { gRightWingDebrisTimer[player->num]--; } + if (gShieldTimer[player->num] != 0) { gShieldTimer[player->num]--; Math_SmoothStepToF(&gShieldAlpha[player->num], 128.0f, 1.0f, 40.0f, 0.01f); } else { Math_SmoothStepToF(&gShieldAlpha[player->num], 0.0f, 1.0f, 10.0f, 0.01f); } + Math_SmoothStepToF(&gMuzzleFlashScale[player->num], 0.0f, 1.0f, 0.4f, 0.01f); + if ((player->form == FORM_LANDMASTER) && (player->unk_1A0 != 0)) { player->unk_1A0--; } + player->dmgEffect = player->dmgEffectTimer & 1; + if (player->dmgEffectTimer != 0) { gFillScreenAlphaStep = 8; } @@ -5015,6 +5391,7 @@ void Player_UpdateEffects(Player* player) { gFillScreenRed = 255; gFillScreenGreen = gFillScreenBlue = 0; } + if (player->timer_278 != 0) { if ((player->timer_278 % 8) == 0) { if (player->timer_278 & 8) { @@ -5025,11 +5402,13 @@ void Player_UpdateEffects(Player* player) { } player->timer_278--; } + if (player->hitTimer > 0) { if (player->hitTimer > 3) { *gControllerRumble = 1; } player->hitTimer--; + if (player->form == FORM_ARWING) { player->damageShake = SIN_DEG(player->hitTimer * 400.0f) * player->hitTimer * D_800D3164[player->hitDirection]; @@ -5042,6 +5421,7 @@ void Player_UpdateEffects(Player* player) { SIN_DEG(player->hitTimer * 400.0f) * player->hitTimer * D_800D3164[player->hitDirection] * 1.5f; player->xShake = 0.0f; } + if ((gLevelMode != LEVELMODE_UNK_2) && ((player->knockback.x != 0.f) || (player->knockback.y != 0.f) || (player->knockback.z != 0.f)) && ((player->dmgType >= 40) || (player->dmgType == 21))) { @@ -5050,18 +5430,23 @@ void Player_UpdateEffects(Player* player) { player->rot.y = 0; Math_SmoothStepToF(&player->boostSpeed, 0, 1.0f, 5.0f, 0); } + if (player->hitTimer == 0) { player->damageShake = 0; } } + player->pos.x += player->knockback.x; player->pos.y += player->knockback.y; + if (gLevelMode == LEVELMODE_ALL_RANGE) { player->pos.z += player->knockback.z; Math_SmoothStepToF(&player->knockback.z, 0, 0.1f, 1.0f, 0.5f); } + Math_SmoothStepToF(&player->knockback.x, 0, 0.1f, 1.0f, 0.5f); Math_SmoothStepToF(&player->knockback.y, 0, 0.1f, 1.0f, 0.5f); + player->contrailScale -= 0.02f; if (player->contrailScale < 0.0f) { player->contrailScale = 0.0f; @@ -5080,6 +5465,7 @@ void Player_UpdateShields(Player* player) { player->damage = 0; } } + if (player->heal > 0) { player->damage = 0; player->heal -= 2; @@ -5096,19 +5482,19 @@ void Player_UpdateShields(Player* player) { } void Player_LowHealthAlarm(Player* player) { - s32 var_v0; + s32 mask; Player_UpdateShields(player); if (player->shields < 128) { if (player->shields > 80) { - var_v0 = 64 - 1; + mask = 64 - 1; } else if (player->shields > 40) { - var_v0 = 32 - 1; + mask = 32 - 1; } else { - var_v0 = 16 - 1; + mask = 16 - 1; } - if ((gGameFrameCount & var_v0) == 0) { + if ((gGameFrameCount & mask) == 0) { Object_PlayerSfx(player->sfxSource, NA_SE_SHIELD_BUZZER, player->num); } } @@ -5119,6 +5505,7 @@ void Play_dummy_800B41E0(Player* player) { void Player_Down(Player* player) { player->state_1C8 = PLAYERSTATE_1C8_DOWN; + if (!gVersusMode) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); @@ -5147,16 +5534,19 @@ void Player_UpdateOnRails(Player* player) { gInputHold->button = gBoostButton[player->num]; player->boostMeter = 1.0f; } + Player_ArwingBank(player); Player_ArwingBoost(player); Player_ArwingBrake(player); Play_dummy_800B41E0(player); Player_UpdateArwingRoll(player); + if (player->somersault) { Player_PerformLoop(player); } else { Player_MoveArwingOnRails(player); } + Player_UpdatePath(player); Player_Shoot(player); Player_CollisionCheck(player); @@ -5164,6 +5554,7 @@ void Player_UpdateOnRails(Player* player) { Player_WaterEffects(player); Player_FloorCheck(player); Player_LowHealthAlarm(player); + if ((player->shields <= 0) && (player->radioDamageTimer != 0)) { Player_Down(player); player->vel.x *= 0.2f; @@ -5177,9 +5568,11 @@ void Player_UpdateOnRails(Player* player) { player->csEventTimer = 120; } break; + case FORM_LANDMASTER: Tank_UpdateOnRails(player); break; + case FORM_BLUE_MARINE: Aquas_BlueMarineBoost(player); Aquas_BlueMarineBrake(player); @@ -5190,6 +5583,7 @@ void Player_UpdateOnRails(Player* player) { Player_CollisionCheck(player); Player_FloorCheck(player); Player_LowHealthAlarm(player); + if ((player->shields <= 0) && (player->radioDamageTimer != 0)) { Player_Down(player); } @@ -5205,16 +5599,19 @@ void Player_Update360(Player* player) { Player_ArwingBrake(player); Play_dummy_800B41E0(player); Player_UpdateArwingRoll(player); + if (player->somersault) { Player_PerformLoop(player); } else { Player_MoveArwing360(player); } + Player_Shoot(player); Player_CollisionCheck(player); Player_WaterEffects(player); Player_FloorCheck(player); Player_LowHealthAlarm(player); + if ((player->shields <= 0) && (player->radioDamageTimer != 0)) { Player_Down(player); player->vel.y = 5.0f; @@ -5232,6 +5629,7 @@ void Player_Update360(Player* player) { player->aerobaticPitch = 0.0f; } break; + case FORM_LANDMASTER: Player_UseTankJets(player); Player_UpdateTankJets(player); @@ -5247,9 +5645,11 @@ void Player_Update360(Player* player) { Player_Down(player); } break; + case FORM_BLUE_MARINE: Aquas_Update360(player); break; + case FORM_ON_FOOT: Player_OnFootUpdateSpeed(player); Player_MoveOnFoot(player); @@ -5257,6 +5657,7 @@ void Player_Update360(Player* player) { Player_CollisionCheck(player); Player_FloorCheck(player); Player_LowHealthAlarm(player); + if ((player->shields <= 0) && (player->radioDamageTimer != 0)) { Player_Down(player); } @@ -5279,6 +5680,7 @@ void Player_LowHealthMsg(Player* player) { teamId = RAND_INT(2.9f) + 1; } while (gTeamShields[teamId] <= 0); } while (0); // macro? + switch (teamId) { case 1: if (Rand_ZeroOne() < 0.5f) { @@ -5341,7 +5743,9 @@ void Player_Update(Player* player) { if (player->state_1C8 > PLAYERSTATE_1C8_INIT) { Player_UpdateEffects(player); } + player->flags_228 = 0; + if ((player->state_1C8 > PLAYERSTATE_1C8_INIT) && (player->form == FORM_ARWING) && !gVersusMode) { switch (player->wingPosition) { case 0: @@ -5361,28 +5765,33 @@ void Player_Update(Player* player) { if (sp1C4 != 0) { player->whooshTimer--; } + switch (player->state_1C8) { case PLAYERSTATE_1C8_STANDBY: player->draw = false; gShowHud = 0; gPauseEnabled = false; break; + case PLAYERSTATE_1C8_INIT: Player_Setup(player); gFillScreenAlphaTarget = 0; gPauseEnabled = false; break; + case PLAYERSTATE_1C8_LEVEL_INTRO: gShowHud = 0; gPauseEnabled = false; player->wings.modelId = 1; Cutscene_LevelStart(player); break; + case PLAYERSTATE_1C8_ACTIVE: gShowHud = 1; Player_LowHealthMsg(player); player->wings.modelId = 0; D_hud_80161704 = 255; + if ((!gVersusMode || gVsMatchStart) && !player->somersault && (gInputPress->button & U_CBUTTONS) && ((player->form == FORM_ARWING) || (gVersusMode && (player->form == FORM_LANDMASTER)))) { if (player->alternateView = 1 - player->alternateView) { @@ -5395,12 +5804,14 @@ void Player_Update(Player* player) { } player->unk_014 = 0.1f; } + switch (gLevelMode) { case LEVELMODE_ON_RAILS: gLoadLevelObjects = true; Player_UpdateOnRails(player); player->draw = true; break; + case LEVELMODE_ALL_RANGE: if (!gVersusMode) { Player_Update360(player); @@ -5431,6 +5842,7 @@ void Player_Update(Player* player) { gPauseEnabled = false; } break; + case LEVELMODE_UNK_2: gLoadLevelObjects = true; Turret_Update(player); @@ -5438,21 +5850,26 @@ void Player_Update(Player* player) { break; } break; + case PLAYERSTATE_1C8_DOWN: Cutscene_PlayerDown(player); break; + case PLAYERSTATE_1C8_U_TURN: if (gVersusMode) { gVsLockOnTimers[player->num][0] = gVsLockOnTimers[player->num][1] = gVsLockOnTimers[player->num][2] = gVsLockOnTimers[player->num][3] = 0; } player->wings.modelId = 1; + Math_SmoothStepToF(&player->wings.unk_04, 0.0f, 0.1f, 5.0f, 0); Math_SmoothStepToF(&player->wings.unk_08, 0.0f, 0.1f, 5.0f, 0); Math_SmoothStepToF(&player->wings.unk_0C, 0.0f, 0.1f, 5.0f, 0); Math_SmoothStepToF(&player->wings.unk_10, 0.0f, 0.1f, 5.0f, 0); + Player_UpdateShields(player); Cutscene_UTurn(player); + if (gCurrentLevel == LEVEL_KATINA) { Player_CollisionCheck(player); } else { @@ -5460,6 +5877,7 @@ void Player_Update(Player* player) { Player_CheckItemCollect(player); } break; + case PLAYERSTATE_1C8_LEVEL_COMPLETE: player->alternateView = false; gPauseEnabled = false; @@ -5468,12 +5886,14 @@ void Player_Update(Player* player) { Player_WaterEffects(player); gShowHud = gChargeTimers[player->num] = 0; break; + case PLAYERSTATE_1C8_ENTER_WARP_ZONE: gPauseEnabled = false; Player_UpdateShields(player); Cutscene_EnterWarpZone(player); gShowHud = 0; break; + case PLAYERSTATE_1C8_START_360: gPauseEnabled = false; Player_UpdateShields(player); @@ -5481,17 +5901,21 @@ void Player_Update(Player* player) { Player_UpdateArwingRoll(player); gChargeTimers[player->num] = player->alternateView = gShowHud = 0; break; + case PLAYERSTATE_1C8_GFOX_REPAIR: gPauseEnabled = false; AllRange_GreatFoxRepair(player); gShowHud = 0; break; + case PLAYERSTATE_1C8_ANDROSS_MOUTH: Andross_8018C390(player); Player_UpdateShields(player); break; + case PLAYERSTATE_1C8_12: break; + case PLAYERSTATE_1C8_VS_STANDBY: player->draw = false; if (gPlayerInactive[player->num] == true) { @@ -5511,11 +5935,14 @@ void Player_Update(Player* player) { Camera_FollowPlayer(player, player->attacker - 1, 0); } break; + case PLAYERSTATE_1C8_NEXT: gShowHud = 0; + if (!gVersusMode) { gPauseEnabled = false; } + player->draw = false; player->vel.z = player->vel.x = player->vel.y = player->knockback.x = player->knockback.y = 0.0f; @@ -5523,10 +5950,12 @@ void Player_Update(Player* player) { player->cam.eye.x += 1.0f; player->cam.eye.z += 1.5f; } + if ((gCurrentLevel == LEVEL_ZONESS) || (gCurrentLevel == LEVEL_SOLAR)) { Math_SmoothStepToF(&player->cam.eye.y, 500.0f, 0.05f, 10.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.z, player->trueZpos + gPathProgress + 500.0f, 0.05f, 20.0f, 0.0f); } + if (player->csTimer == 0) { if (gCamCount == 4) { player->state_1C8 = PLAYERSTATE_1C8_VS_STANDBY; @@ -5535,6 +5964,7 @@ void Player_Update(Player* player) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; gFillScreenAlphaTarget = 255; } + if (gFillScreenAlpha == 255) { Play_ClearObjectData(); gPathProgress = gPlayer[0].zPath = 0.0f; @@ -5543,9 +5973,11 @@ void Player_Update(Player* player) { Audio_ClearVoice(); Audio_SetEnvSfxReverb(0); gSavedGoldRingCount[0] = gGoldRingCount[0]; + if (gCurrentLevel == LEVEL_VENOM_ANDROSS) { D_ctx_80177C94 = gGoldRingCount[0]; } + switch (gFadeoutType) { case 7: if (gCurrentLevel == LEVEL_TRAINING) { @@ -5571,11 +6003,13 @@ void Player_Update(Player* player) { gDrawMode = DRAW_NONE; } break; + case 4: gNextGameState = GSTATE_MAP; gLastGameState = GSTATE_PLAY; gDrawMode = DRAW_NONE; break; + default: gDrawMode = DRAW_NONE; break; @@ -5584,22 +6018,25 @@ void Player_Update(Player* player) { } } break; + default: break; } - if ((D_ctx_80177C70 == 0) && (player->form == FORM_ARWING)) { + if ((gFovYMode == 0) && (player->form == FORM_ARWING)) { sp1CC = 0.77699995f; sp1C8 = 1100.0f; - } else if (D_ctx_80177C70 == 2) { + } else if (gFovYMode == 2) { sp1CC = 0.77699995f; sp1C8 = 1100.0f; } else { sp1CC = 0.74f; sp1C8 = 700.0f; } + Math_SmoothStepToF(&player->unk_148, sp1CC, 1.0f, 0.05f, 0.0f); Math_SmoothStepToF(&player->unk_14C, sp1CC, 1.0f, 0.05f, 0.0f); Math_SmoothStepToF(&player->pathWidth, sp1C8, 1.0f, 10.0f, 0.0f); + if (player->form == FORM_ARWING) { Math_SmoothStepToF(&player->unk_194, player->unk_190, 0.5f, 5.0f, 0.0f); if (player->boostCooldown && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { @@ -5620,6 +6057,7 @@ void Camera_UpdateArwingOnRails(Player* player) { f32 temp; gCsCamEyeX = (player->pos.x - player->xPath) * player->unk_148; + if (((player->form == FORM_ARWING) && (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE)) || (player->state_1C8 == PLAYERSTATE_1C8_U_TURN)) { gCsCamEyeY = (player->pos.y - player->yPath) * player->unk_148; @@ -5631,6 +6069,7 @@ void Camera_UpdateArwingOnRails(Player* player) { var_fv0 = 0.0f; var_fv1 = 0; } + Math_SmoothStepToF(&player->unk_030, var_fv1 * 1.6f, 0.1f, 3.0f, 0.05f); if (gLevelType == LEVELTYPE_SPACE) { Math_SmoothStepToF(&player->unk_02C, var_fv0 * 0.8f, 0.1f, 3.0f, 0.05f); @@ -5647,6 +6086,7 @@ void Camera_UpdateArwingOnRails(Player* player) { gCsCamAtY = ((player->pos.y - player->yPath) * player->unk_14C) + 20.0f; gCsCamAtY += player->xRock * 5.0f; gCsCamAtY -= player->unk_02C * 0.25f; + switch (sOverheadCam) { case 0: Math_SmoothStepToF(&sOverheadCamDist, 0.0f, 0.4f, 10.0f, 0); @@ -5655,14 +6095,16 @@ void Camera_UpdateArwingOnRails(Player* player) { Math_SmoothStepToF(&sOverheadCamDist, 200.0f, 0.4f, 10.0f, 0); break; } + gCsCamEyeX += player->xPath; gCsCamAtX += player->xPath; gCsCamEyeY += player->yPath + sOverheadCamDist; gCsCamAtZ = player->trueZpos + gPathProgress - 1.0f; gCsCamEyeZ = 400.0f + sOverheadCamDist; - if (D_ctx_80177C70 == 2) { + if (gFovYMode == 2) { gCsCamEyeZ -= 50.0f; } + if (player->somersault) { gCsCamEyeZ += 200.0f; gCsCamAtY = (player->pos.y - player->yPath) * 0.9f; @@ -5673,12 +6115,14 @@ void Camera_UpdateArwingOnRails(Player* player) { Math_SmoothStepToF(&player->unk_018, 1.0f, 1.0f, 0.05f, 0.0f); } gCsCamAtY += player->yPath + (sOverheadCamDist * 0.5f); + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, player->unk_014, 1000.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, player->unk_018, 1000.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, player->unk_014, 1000.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, player->unk_018, 1000.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, player->unk_014, 1000.0f, 0.0f); Math_SmoothStepToF(&player->unk_014, 1.0f, 1.0f, 0.05f, 0.0f); + temp = -player->rot.z; if (gLevelType == LEVELTYPE_PLANET) { Math_SmoothStepToF(&player->camRoll, temp * 0.3f, 0.1f, 1.5f, 0.0f); @@ -5696,16 +6140,20 @@ void Camera_UpdateCockpitOnRails(Player* player, s32 arg1) { Matrix_RotateY(gCalcMatrix, (player->rot.y + player->damageShake) * M_DTOR * 0.75f, MTXF_NEW); Matrix_RotateX(gCalcMatrix, (player->rot.x + player->damageShake) * M_DTOR * 0.75f, MTXF_APPLY); + sp4C.x = 0; sp4C.y = 0; sp4C.z = -1000.0f; + Matrix_MultVec3f(gCalcMatrix, &sp4C, &sp40); + gCsCamEyeX = player->pos.x; gCsCamEyeY = player->pos.y + player->yBob; gCsCamEyeZ = player->trueZpos + gPathProgress; gCsCamAtX = player->pos.x + sp40.x; gCsCamAtY = player->pos.y + player->yBob + sp40.y; gCsCamAtZ = player->trueZpos + gPathProgress + sp40.z; + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, player->unk_014, 100.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, player->unk_014, 100.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, player->unk_014, 50.0f, 0.0f); @@ -5713,6 +6161,7 @@ void Camera_UpdateCockpitOnRails(Player* player, s32 arg1) { Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, player->unk_014, 100.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, player->unk_014, 100.0f, 0.0f); Math_SmoothStepToF(&player->unk_014, 1.0f, 1.0f, 0.05f, 0); + player->camRoll = -(player->bankAngle + player->rockAngle); if (arg1 != 0) { player->cam.eye.x = gCsCamEyeX; @@ -5726,26 +6175,30 @@ void Camera_UpdateCockpitOnRails(Player* player, s32 arg1) { void Camera_FollowPlayer(Player* player, s32 playerNum, bool arg2) { u8 i; - u8 var_v0; + u8 mask; Vec3f sp58; Vec3f sp4C; - var_v0 = 0x7F; + mask = 0x7F; if (gPlayer[playerNum].form == FORM_LANDMASTER) { - var_v0 = 0xFF; + mask = 0xFF; } - if (((var_v0 & gGameFrameCount) == (gPlayerNum * 32)) || arg2) { + + if (((gGameFrameCount & mask) == (gPlayerNum * 32)) || arg2) { for (i = 0; i < 100; i++) { playerNum = RAND_INT(3.9f); if ((gPlayer[playerNum].state_1C8 != PLAYERSTATE_1C8_VS_STANDBY) && !gPlayerInactive[playerNum]) { break; } } + if (i > 90) { playerNum = 0; } player->attacker = playerNum + 1; + Matrix_RotateY(gCalcMatrix, gPlayer[playerNum].yRot_114 * M_DTOR, MTXF_NEW); + switch (gPlayer[playerNum].form) { case FORM_ARWING: sp58.x = 300.0f; @@ -5760,6 +6213,7 @@ void Camera_FollowPlayer(Player* player, s32 playerNum, bool arg2) { sp58.z = -300.0f; break; } + if (Rand_ZeroOne() < 0.5f) { sp58.x *= -1.0f; } @@ -5769,9 +6223,11 @@ void Camera_FollowPlayer(Player* player, s32 playerNum, bool arg2) { player->cam.eye.y = gPlayer[playerNum].pos.y + 50.0f; player->cam.eye.z = gPlayer[playerNum].trueZpos + sp4C.z; } + player->cam.at.x = gPlayer[playerNum].pos.x; player->cam.at.y = gPlayer[playerNum].pos.y; player->cam.at.z = gPlayer[playerNum].trueZpos; + switch (gPlayer[playerNum].form) { case FORM_ARWING: player->cam.eye.x += gPlayer[playerNum].vel.x * 0.5f; @@ -5807,6 +6263,7 @@ void Camera_UpdateArwing360(Player* player, bool arg1) { Matrix_RotateY(gCalcMatrix, (player->yRot_114 + (player->damageShake * 0.2f)) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, player->damageShake * 0.2f * M_DTOR, MTXF_APPLY); + sp74.x = 0.0f; sp74.y = 0.0f; if (player->alternateView) { @@ -5814,16 +6271,21 @@ void Camera_UpdateArwing360(Player* player, bool arg1) { } else { sp74.z = 300.0f - player->camDist; } + if (player->somersault) { sp74.z += 500.0f; } + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp74, &sp68); + if (!gVersusMode) { var_fv0 = -gInputPress->stick_y; } else { var_fv0 = -gControllerPress[player->num].stick_y; } + Math_SmoothStepToF(&player->unk_02C, var_fv0, 0.05f, 5.0f, 0.0f); + eyeX = player->pos.x + sp68.x; eyeY = (player->pos.y * player->unk_148) + 50.0f; eyeY -= (player->unk_02C * 1.5f); @@ -5832,21 +6294,27 @@ void Camera_UpdateArwing360(Player* player, bool arg1) { atX = player->pos.x + player->damageShake; var_fv0 = (player->somersault) ? 1.0f : 0.79f; + atY = (player->pos.y * (var_fv0)) + player->damageShake + (player->xRock * 5.0f); atY += (player->unk_02C * 0.5f); if (player->state_1C8 == PLAYERSTATE_1C8_U_TURN) { atY = player->pos.y; } atZ = player->pos.z; + Math_SmoothStepToF(&player->unk_028, 2.0f * player->rot.y, 0.05f, 2.0f, 0.02f); + sp74.x = -player->unk_028; sp74.y = 0.0f; sp74.z = 0.f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp74, &sp68); + eyeX += sp68.x; eyeZ += sp68.z; atX += sp68.x; atZ += sp68.z; + if (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) { Math_SmoothStepToF(&player->cam.eye.x, eyeX, player->unk_014, 30000.0f, 0); Math_SmoothStepToF(&player->cam.eye.y, eyeY, player->unk_014, 30000.0f, 0); @@ -5854,11 +6322,13 @@ void Camera_UpdateArwing360(Player* player, bool arg1) { Math_SmoothStepToF(&player->camRoll, player->rot.y * -0.3f, 0.1f, 1.0f, 0); Math_SmoothStepToF(&player->unk_014, 0.2f, 0.1f, 0.005f, 0.0f); } + Math_SmoothStepToF(&player->cam.at.x, atX, player->unk_01C, 30000.0f, 0); Math_SmoothStepToF(&player->cam.at.y, atY, player->unk_018, 30000.0f, 0); Math_SmoothStepToF(&player->cam.at.z, atZ, player->unk_01C, 30000.0f, 0); Math_SmoothStepToF(&player->unk_018, 0.2f, 0.1f, 0.005f, 0); Math_SmoothStepToF(&player->unk_01C, 1.0f, 0.1f, 0.005f, 0); + if (arg1) { player->cam.eye.x = eyeX; player->cam.eye.y = eyeY; @@ -5880,6 +6350,7 @@ void Camera_UpdateTank360(Player* player, s32 arg1) { Matrix_RotateZ(gCalcMatrix, player->rot.z * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, (player->yRot_114 + (player->damageShake * 0.2f)) * M_DTOR, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, player->damageShake * 0.2f * M_DTOR, MTXF_APPLY); + sp54.x = 0.0f; if (player->alternateView) { sp54.y = 150.0f; @@ -5888,12 +6359,15 @@ void Camera_UpdateTank360(Player* player, s32 arg1) { sp54.y = 100.0f; sp54.z = 250.0f - player->camDist; } + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48); + if (player->alternateView) { Math_SmoothStepToF(&player->unk_02C, -player->unk_17C * 3.0f + 30.0f, 0.2f, 8.0f, 0.001f); } else { Math_SmoothStepToF(&player->unk_02C, -player->unk_17C * 3.0f, 0.2f, 8.0f, 0.001f); } + sp44 = player->pos.x + sp48.x; sp40 = player->pos.y + sp48.y - (player->unk_02C * 0.6f); sp3C = player->pos.z + sp48.z; @@ -5901,19 +6375,26 @@ void Camera_UpdateTank360(Player* player, s32 arg1) { player->cam.at.x = player->pos.x + player->damageShake; player->cam.at.y = player->pos.y + 60.0f + player->unk_02C + player->damageShake; player->cam.at.z = player->pos.z; + Math_SmoothStepToF(&player->unk_028, 2.0f * player->rot.y, 0.05f, 2.0f, 0.02f); + sp54.x = -player->unk_028; sp54.y = 0.0f; sp54.z = 0.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48); + sp44 += sp48.x; sp3C += sp48.z; + player->cam.at.x += sp48.x; player->cam.at.z += sp48.z; + Math_SmoothStepToF(&player->cam.eye.x, sp44, 0.1f, 200.0f, 0.001f); Math_SmoothStepToF(&player->cam.eye.y, sp40, 0.1f, 200.0f, 0.001f); Math_SmoothStepToF(&player->cam.eye.z, sp3C, 0.1f, 200.0f, 0.001f); Math_SmoothStepToF(&player->camRoll, player->zRotBank * -0.1f, 0.1f, 1.0f, 0.01f); + if (arg1 != 0) { player->cam.eye.x = sp44; player->cam.eye.y = sp40; @@ -5930,9 +6411,11 @@ void Camera_UpdateOnFoot360(Player* player, s32 arg1) { Matrix_RotateZ(gCalcMatrix, player->zRot_0FC * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, (player->yRot_114 + (player->damageShake * 0.02f)) * M_DTOR, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, player->damageShake * 0.02f * M_DTOR, MTXF_APPLY); + sp64.x = 0.0f; sp64.y = 20.0f; sp64.z = 60.0f - player->camDist; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp64, &sp58); Math_SmoothStepToF(&player->unk_02C, -player->unk_158 * 0.5f, 0.07f, 3.0f, 0.001f); @@ -5946,12 +6429,16 @@ void Camera_UpdateOnFoot360(Player* player, s32 arg1) { player->cam.at.z = player->pos.z; Math_SmoothStepToF(&player->unk_028, player->rot.y * (player->baseSpeed + 5.0f) * 0.04f, 0.05f, 2.0f, 0.02f); + sp64.x = -player->unk_028; sp64.y = 0.0f; sp64.z = 0.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp64, &sp58); + sp4C.x += sp58.x; sp4C.z += sp58.z; + player->cam.at.x += sp58.x; player->cam.at.z += sp58.z; @@ -5959,6 +6446,7 @@ void Camera_UpdateOnFoot360(Player* player, s32 arg1) { Math_SmoothStepToF(&player->cam.eye.y, sp4C.y, 0.3f, 65.0f, 0.001f); Math_SmoothStepToF(&player->cam.eye.z, sp4C.z, 0.3f, 65.0f, 0.001f); Math_SmoothStepToF(&player->camRoll, player->zRotBank * -0.1f, 0.1f, 1.0f, 0.01f); + if (arg1 != 0) { player->cam.eye.x = sp4C.x; player->cam.eye.y = sp4C.y; @@ -5983,15 +6471,19 @@ void Camera_SetStarfieldPos(f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 if (yaw <= -M_PI / 2) { yaw += M_PI; } + tempf = 0.0f; if (gCurrentLevel == LEVEL_UNK_15) { tempf = gPlayer[0].cam.eye.y * 0.03f; } + sp30 = (-pitch * (-8.0f / 3.0f * M_RTOD) * 2.0f) + 3000.0f + gStarfieldScrollY + tempf; sp34 = (yaw * (-8.0f / 3.0f * M_RTOD) * 2.0f) + 3000.0f + gStarfieldScrollX; sp20 = gStarfieldX; + gStarfieldX = Math_ModF(sp34, SCREEN_WIDTH * 1.5f); gStarfieldY = Math_ModF(sp30, SCREEN_HEIGHT * 1.5f); + if ((gGameState == GSTATE_PLAY) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && (gCurrentLevel == LEVEL_METEO)) { if (fabsf(gStarfieldX - sp20) < 50.0f) { @@ -6034,18 +6526,22 @@ void Camera_Update(Player* player) { Aquas_UpdateCamera(player); } break; + case LEVELMODE_ALL_RANGE: Camera_Update360(player, false); break; + case LEVELMODE_UNK_2: Turret_UpdateCamera(player); break; } break; + case PLAYERSTATE_1C8_U_TURN: player->camRoll -= player->camRoll * 0.1f; Camera_Update360(player, false); break; + case PLAYERSTATE_1C8_DOWN: if ((gLevelMode == LEVELMODE_ON_RAILS) && (player->form == FORM_ARWING)) { player->cam.eye.x += (player->pos.x - player->cam.eye.x) * 0.1f; @@ -6059,6 +6555,7 @@ void Camera_Update(Player* player) { player->cam.at.z = player->trueZpos + gPathProgress - 1.0f; } break; + case PLAYERSTATE_1C8_NEXT: case PLAYERSTATE_1C8_LEVEL_COMPLETE: break; @@ -6066,8 +6563,8 @@ void Camera_Update(Player* player) { } void Camera_SetupLights(Player* player) { - Vec3f sp44; - Vec3f sp38; + Vec3f src; + Vec3f dest; f32 pad; if ((gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) { @@ -6077,6 +6574,7 @@ void Camera_SetupLights(Player* player) { } gLight1rotStep = gLight2rotStep = D_ctx_80178538 = 1.0f; } + Math_SmoothStepToAngle(&gLight1xRot, gLight1xRotTarget, 1.0f, gLight1rotStep, 0.0f); Math_SmoothStepToAngle(&gLight1yRot, gLight1yRotTarget, 1.0f, gLight1rotStep, 0.0f); Math_SmoothStepToAngle(&gLight1zRot, gLight1zRotTarget, 1.0f, gLight1rotStep, 0.0f); @@ -6117,39 +6615,54 @@ void Camera_SetupLights(Player* player) { gLight2B = gLight2BTarget; } } + Math_SmoothStepToAngle(&gLight2xRot, gLight2xRotTarget, 1.0f, gLight2rotStep, 0.0f); Math_SmoothStepToAngle(&gLight2yRot, gLight2yRotTarget, 1.0f, gLight2rotStep, 0.0f); Math_SmoothStepToAngle(&gLight2zRot, gLight2zRotTarget, 1.0f, gLight2rotStep, 0.0f); + gLight2xRotTarget = gLight1xRotTarget = gEnvLightxRot; gLight2yRotTarget = gLight1yRotTarget = gEnvLightyRot; gLight2zRotTarget = gLight1zRotTarget = gEnvLightzRot; + gLight1rotStep = 5.0f; + gLight2RTarget = gLight1R; gLight2GTarget = gLight1G; gLight2BTarget = gLight1B; + pad = player->camRoll; + Matrix_RotateZ(gCalcMatrix, M_DTOR * pad, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -player->camPitch, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, player->camYaw, MTXF_APPLY); + Matrix_Push(&gCalcMatrix); + Matrix_RotateX(gCalcMatrix, M_DTOR * gLight1xRot, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, M_DTOR * gLight1yRot, MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, M_DTOR * gLight1zRot, MTXF_APPLY); - sp44.x = 0.0f; - sp44.y = 0.0f; - sp44.z = 100.0f; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); - gLight1x = sp38.x; - gLight1y = sp38.y; - gLight1z = sp38.z; + + src.x = 0.0f; + src.y = 0.0f; + src.z = 100.0f; + + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + + gLight1x = dest.x; + gLight1y = dest.y; + gLight1z = dest.z; + Matrix_Pop(&gCalcMatrix); + Matrix_RotateX(gCalcMatrix, M_DTOR * gLight2xRot, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, M_DTOR * gLight2yRot, MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, M_DTOR * gLight2zRot, MTXF_APPLY); - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); - gLight2x = sp38.x; - gLight2y = sp38.y; - gLight2z = sp38.z; + + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + + gLight2x = dest.x; + gLight2y = dest.y; + gLight2z = dest.z; } void Play_UpdateLevel(void) { @@ -6165,6 +6678,7 @@ void Play_UpdateLevel(void) { Training_SpawnEnemies(); } break; + case LEVEL_VERSUS: func_versus_800C26C8(); gVsItemSpawnTimer++; @@ -6181,6 +6695,7 @@ void Play_UpdateLevel(void) { gVsItemSpawnTimer = 0; } break; + case LEVEL_VENOM_2: if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) && (gLevelPhase == 2)) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; @@ -6195,6 +6710,7 @@ void Play_UpdateLevel(void) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; } break; + case LEVEL_VENOM_ANDROSS: Andross_8018BDD8(); gGroundHeight = -25000.0f; @@ -6207,6 +6723,7 @@ void Play_UpdateLevel(void) { } } break; + case LEVEL_METEO: Texture_Scroll(D_102FF08, 8, 8, 1); /* fallthrough */ @@ -6219,6 +6736,7 @@ void Play_UpdateLevel(void) { Math_SmoothStepToF(&gWarpZoneBgAlpha, 128.0f, 1.0f, 1.0f, 0.0f); } } + if ((gCurrentLevel == LEVEL_SECTOR_X) && (gLevelPhase == 0) && (gRingPassCount == 4)) { gRingPassCount++; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ENTER_WARP_ZONE; @@ -6229,15 +6747,18 @@ void Play_UpdateLevel(void) { gLeveLClearStatus[gCurrentLevel] = 1; } break; + case LEVEL_CORNERIA: func_hud_8008C104(D_CO_603EB38, D_CO_6028A60); if ((gGameFrameCount % 2) != 0) { Texture_Scroll(D_CO_600CBD8, 64, 32, 3); } break; + case LEVEL_AQUAS: func_hud_8008C104(D_AQ_603158C, D_AQ_602ACC0); break; + case LEVEL_SOLAR: Play_UpdateDynaFloor(); @@ -6287,18 +6808,24 @@ void Play_UpdateLevel(void) { } } } + shields = MIN(gPlayer[0].shields, 255); + Audio_SetHeatAlarmParams(shields, heightParam); + if (((gGameFrameCount % 8) == 0) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) { Solar_8019E8B8(RAND_FLOAT_CENTERED(6000.0f), -80.0f, gPlayer[0].trueZpos + (RAND_FLOAT(2000.0f) + -6000.0f), RAND_FLOAT(10.0f) + 20.0f); // check } + func_hud_8008C104(D_SO_60229A4, D_SO_6010198); + if (gPlayer[0].shields == 0) { gSoShieldsEmpty = 1; } break; + case LEVEL_ZONESS: Play_UpdateDynaFloor(); for (gPathTexScroll; gPathTexScroll >= 20.0f; gPathTexScroll -= 20.0f) { @@ -6307,7 +6834,9 @@ void Play_UpdateLevel(void) { if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_NEXT) { Texture_Scroll(D_ZO_602C2CC, 32, 32, 1); } + func_hud_8008C104(D_ZO_602C2CC, D_ZO_600D990); + if (Play_CheckDynaFloorCollision(&sp3C, &sp40, gPlayer[0].cam.eye.x, gPlayer[0].cam.eye.y, gPlayer[0].cam.eye.z - gPathProgress)) { gLight1R = 0; @@ -6336,6 +6865,7 @@ void Play_Update(void) { s32 i; Play_UpdateFillScreen(); + for (i = TEAM_ID_FALCO; i <= TEAM_ID_PEPPY; i++) { if (gTeamDamage[i] > 0) { gTeamDamage[i] -= 2; @@ -6345,17 +6875,21 @@ void Play_Update(void) { } } } + for (i = 0; i < gCamCount; i++) { gPlayer[i].num = gPlayerNum = i; Player_Update(&gPlayer[i]); } + Object_Update(); PlayerShot_UpdateAll(); BonusText_Update(); + for (i = 0; i < gCamCount; i++) { gPlayer[i].num = gPlayerNum = i; Camera_Update(&gPlayer[i]); } + gCameraShakeY = 0.0f; if (gCameraShake != 0) { f32 var_fv1; @@ -6400,30 +6934,36 @@ void Play_Main(void) { s32 pad2; s32 pad3; s32 i; - f32 sp34; + f32 fovYtarget; - switch (D_ctx_80177C70) { + switch (gFovYMode) { case 0: - sp34 = 45.0f; + fovYtarget = 45.0f; break; case 1: - sp34 = 45.0f; + fovYtarget = 45.0f; break; case 2: - sp34 = 55.0f; + fovYtarget = 55.0f; break; } - Math_SmoothStepToF(&gFovY, sp34, 0.1f, 5.0f, 0.0f); + + Math_SmoothStepToF(&gFovY, fovYtarget, 0.1f, 5.0f, 0.0f); + if (gChangeTo360) { gChangeTo360 = false; gLevelMode = LEVELMODE_ALL_RANGE; + if (gCurrentLevel != LEVEL_VENOM_ANDROSS) { MEM_ARRAY_ALLOCATE(gScenery360, 200); } + for (i = 0; i < 200; i++) { gScenery360[i].obj.status = OBJ_FREE; } + Play_ClearObjectData(); + if (gCurrentLevel == LEVEL_CORNERIA) { Play_Setup360_CO(); } else if (gCurrentLevel == LEVEL_SECTOR_Y) { @@ -6433,22 +6973,27 @@ void Play_Main(void) { } else if (gCurrentLevel == LEVEL_TRAINING) { Training_Setup360(); } + Play_SetupZPos360(&gPlayer[0].pos.z); Play_SetupZPos360(&gPlayer[0].trueZpos); + gPlayer[0].cam.eye.z += 15000.0f; gPlayer[0].cam.at.z += 15000.0f; gPlayer[0].zPath = gPlayer[0].zPathVel = gPathVelZ = gPathProgress = 0.0f; } + if (gPlayState != PLAY_PAUSE) { - PRINTF("play_time = %d\n"); + PRINTF("play_time = %d\n", gGameFrameCount); gGameFrameCount++; } + switch (gPlayState) { case PLAY_STANDBY: if (gNextGameStateTimer == 0) { gPlayState = PLAY_INIT; } break; + case PLAY_INIT: Play_Init(); sMusicVolume = gVolumeSettings[AUDIO_TYPE_MUSIC]; @@ -6456,24 +7001,30 @@ void Play_Main(void) { sSfxVolume = gVolumeSettings[AUDIO_TYPE_SFX]; gPlayState = PLAY_UPDATE; break; + case PLAY_UPDATE: if ((gLevelStartStatusScreenTimer != 0) || (gLevelClearScreenTimer != 0)) { gPauseEnabled = false; } else { gPauseEnabled = true; } + gDrawMode = DRAW_PLAY; + Play_Update(); + if ((gControllerPress[gMainController].button & START_BUTTON) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && gSaveFile.save.data.planet[sSaveSlotFromLevel[gCurrentLevel]].normalClear) { Audio_ClearVoice(); Audio_SetEnvSfxReverb(0); Play_ClearObjectData(); + for (i = 0; i < gCamCount; i++) { Audio_KillSfxBySource(gPlayer[i].sfxSource); Audio_StopPlayerNoise(i); } + gPlayState = PLAY_INIT; gDrawMode = gVersusMode = 0; gCamCount = 1; @@ -6481,9 +7032,11 @@ void Play_Main(void) { gCsFrameCount = gLevelClearScreenTimer = gLevelStartStatusScreenTimer = gRadioState = 0; D_ctx_8017782C = false; } + if (gVersusMode) { Versus_Main(); } + if ((gControllerPress[gMainController].button & START_BUTTON) && gPauseEnabled) { Audio_PlayPauseSfx(1); gPlayState = PLAY_PAUSE; @@ -6491,11 +7044,12 @@ void Play_Main(void) { D_ctx_80178484 = 100000; } break; + case PLAY_PAUSE: if (!gVersusMode) { if ((gControllerPress[gMainController].button & R_TRIG) && (gPlayer[0].form != FORM_BLUE_MARINE) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_STANDBY)) { - if (gShowCrosshairs[0] = 1 - gShowCrosshairs[0]) { + if (gShowReticles[0] = 1 - gShowReticles[0]) { AUDIO_PLAY_SFX(NA_SE_MAP_WINDOW_OPEN, gDefaultSfxSource, 4); } else { AUDIO_PLAY_SFX(NA_SE_MAP_WINDOW_CLOSE, gDefaultSfxSource, 4); @@ -6504,7 +7058,7 @@ void Play_Main(void) { } else { for (i = 0; i < 4; i++) { if ((gControllerPress[i].button & R_TRIG) && (gPlayer[i].form != FORM_ON_FOOT)) { - if (gShowCrosshairs[i] = 1 - gShowCrosshairs[i]) { + if (gShowReticles[i] = 1 - gShowReticles[i]) { Object_PlayerSfx(gPlayer[i].sfxSource, NA_SE_MAP_WINDOW_OPEN, i); } else { Object_PlayerSfx(gPlayer[i].sfxSource, NA_SE_MAP_WINDOW_CLOSE, i); @@ -6512,6 +7066,7 @@ void Play_Main(void) { } } } + if ((D_ctx_80177868 == 4) && (gControllerPress[gMainController].button & START_BUTTON) && gPauseEnabled) { Audio_PlayPauseSfx(0); gPlayState = PLAY_UPDATE; diff --git a/src/engine/fox_radio.c b/src/engine/fox_radio.c index 645ba22d..3a6200f6 100644 --- a/src/engine/fox_radio.c +++ b/src/engine/fox_radio.c @@ -769,7 +769,7 @@ void Radio_Draw(void) { } if (((gCurrentRadioPortrait != RCID_STATIC) && (gCurrentRadioPortrait != RCID_STATIC + 1)) && (gCurrentRadioPortrait != RCID_1000)) { - func_hud_8008AD94(); + HUD_RadioCharacterName_Draw(); } } diff --git a/src/engine/fox_tank.c b/src/engine/fox_tank.c index 8b604450..0dc3b8cd 100644 --- a/src/engine/fox_tank.c +++ b/src/engine/fox_tank.c @@ -179,12 +179,12 @@ void func_tank_80043B18(Player* player) { func_tank_80043AA0(player->pos.x + sp3C.x, player->pos.y + sp3C.y, player->trueZpos + sp3C.z, 0.2f); } else { if (((gGameFrameCount % 2) == 0)) { - Titania_80189120(player->pos.x + sp3C.x, player->pos.y + sp3C.y, player->trueZpos + sp3C.z, - player->rot.y + sp38, 1.3f); + Titania_Effect368_Spawn(player->pos.x + sp3C.x, player->pos.y + sp3C.y, player->trueZpos + sp3C.z, + player->rot.y + sp38, 1.3f); } if (((gGameFrameCount % 4) == 0)) { - func_effect_8007A900(player->pos.x + sp3C.x, player->pos.y + sp3C.y + 20.0f, player->trueZpos + sp3C.z, - 2.0f, 255, 15, 0); + Effect_Effect359_Spawn(player->pos.x + sp3C.x, player->pos.y + sp3C.y + 20.0f, + player->trueZpos + sp3C.z, 2.0f, 255, 15, 0); } } } else { @@ -198,12 +198,12 @@ void func_tank_80043B18(Player* player) { } } else { if (((gGameFrameCount % 2) == 0)) { - Titania_80189120(player->pos.x + sp3C.x, player->pos.y + sp3C.y, player->trueZpos + sp3C.z, - player->rot.y + sp38, 1.0f); + Titania_Effect368_Spawn(player->pos.x + sp3C.x, player->pos.y + sp3C.y, player->trueZpos + sp3C.z, + player->rot.y + sp38, 1.0f); } if (((gGameFrameCount % 4) == 0) && (player->baseSpeed >= 5.0f)) { - func_effect_8007A900(player->pos.x + sp3C.x, player->pos.y + sp3C.y + 20.0f, - player->trueZpos + sp3C.z, 2.0f, 255, 15, 0); + Effect_Effect359_Spawn(player->pos.x + sp3C.x, player->pos.y + sp3C.y + 20.0f, + player->trueZpos + sp3C.z, 2.0f, 255, 15, 0); } } } @@ -216,12 +216,12 @@ void func_tank_80043B18(Player* player) { } } else { if (((gGameFrameCount % 2) == 0)) { - Titania_80189120(player->pos.x + sp3C.x, player->pos.y + sp3C.y, player->trueZpos + sp3C.z, - player->rot.y + sp38, 1.0f); + Titania_Effect368_Spawn(player->pos.x + sp3C.x, player->pos.y + sp3C.y, player->trueZpos + sp3C.z, + player->rot.y + sp38, 1.0f); } if (((gGameFrameCount % 4) == 0) && (player->baseSpeed >= 5.0f)) { - func_effect_8007A900(player->pos.x + sp3C.x, player->pos.y + sp3C.y + 20.0f, - player->trueZpos + sp3C.z, 2.0f, 255, 15, 0); + Effect_Effect359_Spawn(player->pos.x + sp3C.x, player->pos.y + sp3C.y + 20.0f, + player->trueZpos + sp3C.z, 2.0f, 255, 15, 0); } } } @@ -285,7 +285,7 @@ void func_tank_800443DC(Player* player) { s32 i; for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) { - if ((scenery->obj.status == OBJ_ACTIVE) && (scenery->obj.id == OBJ_SCENERY_58) && + if ((scenery->obj.status == OBJ_ACTIVE) && (scenery->obj.id == OBJ_SCENERY_TI_BRIDGE) && ((player->trueZpos - 2000.0f) < scenery->obj.pos.z)) { func_tank_800441C8(player, scenery->info.hitbox, scenery->obj.pos.x, scenery->obj.pos.y, scenery->obj.pos.z, scenery->obj.rot.x, scenery->obj.rot.y, scenery->obj.rot.z); @@ -673,19 +673,21 @@ void func_tank_80045678(Player* player) { Math_SmoothStepToF(&player->vel.y, 0.0f, 0.1f, 2.0f, 0); } if ((gCamCount == 1) && ((gGameFrameCount % 2) == 0)) { - func_effect_8007A900(RAND_FLOAT_CENTERED(20.0f) + player->pos.x, player->groundPos.y + 10.0f, - player->trueZpos - 10.0f, RAND_FLOAT(2.0f) + 3.5f, 255, 16, 1); + Effect_Effect359_Spawn(RAND_FLOAT_CENTERED(20.0f) + player->pos.x, player->groundPos.y + 10.0f, + player->trueZpos - 10.0f, RAND_FLOAT(2.0f) + 3.5f, 255, 16, 1); } } else { D_800C9F3C = 0; if ((gCamCount == 1) && ((gGameFrameCount % 4) == 0) && (player->rollState == 0)) { if ((player->unk_16C > 0.2f) && (player->radioDamageTimer == 0)) { - func_effect_8007A900(RAND_FLOAT_CENTERED(10.0f) + (player->pos.x - 57.0f), player->groundPos.y + 10.0f, - player->trueZpos - 10.0f, RAND_FLOAT(1.0f) + 1.5f, 255, 15, 0); + Effect_Effect359_Spawn(RAND_FLOAT_CENTERED(10.0f) + (player->pos.x - 57.0f), + player->groundPos.y + 10.0f, player->trueZpos - 10.0f, RAND_FLOAT(1.0f) + 1.5f, + 255, 15, 0); } if ((player->unk_170 > 0.2f) && (player->radioDamageTimer == 0)) { - func_effect_8007A900(RAND_FLOAT_CENTERED(10.0f) + (player->pos.x + 57.0f), player->groundPos.y + 10.0f, - player->trueZpos - 10.0f, RAND_FLOAT(1.0f) + 1.5f, 255, 15, 0); + Effect_Effect359_Spawn(RAND_FLOAT_CENTERED(10.0f) + (player->pos.x + 57.0f), + player->groundPos.y + 10.0f, player->trueZpos - 10.0f, RAND_FLOAT(1.0f) + 1.5f, + 255, 15, 0); } } } @@ -789,7 +791,7 @@ void func_tank_80046260(Player* player) { s32 i; for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) { - if ((scenery->obj.status == OBJ_ACTIVE) && (scenery->obj.id == OBJ_SCENERY_58) && + if ((scenery->obj.status == OBJ_ACTIVE) && (scenery->obj.id == OBJ_SCENERY_TI_BRIDGE) && ((player->trueZpos - 2000.0f) < scenery->obj.pos.z) && (scenery->obj.pos.y < player->pos.y)) { func_tank_800460E0(player, scenery->info.hitbox, scenery->obj.pos.x, scenery->obj.pos.y, scenery->obj.pos.z, scenery->obj.rot.x, scenery->obj.rot.y, scenery->obj.rot.z); @@ -844,14 +846,14 @@ void func_tank_8004641C(Player* player, s32 arg1, f32 arg2, f32 arg3, f32 arg4, if (Play_CheckPolyCollision(arg1, arg2, arg3, arg4, sp84, sp80, sp7C, &sp58, &sp4C)) { if (D_MA_801BE250[27] < arg3 + sp58.y) { D_MA_801BE250[27] = arg3 + sp58.y; - if (arg1 == OBJ_SCENERY_67) { + if (arg1 == OBJ_SCENERY_MA_WALL_3) { player->rollState = 0; D_800C9F04 = 1; } } D_MA_801BE250[28] = sp58.x; D_MA_801BE250[29] = sp58.z; - } else if ((arg1 == OBJ_SCENERY_67) && (D_MA_801BE250[27] == 0.0f) && + } else if ((arg1 == OBJ_SCENERY_MA_WALL_3) && (D_MA_801BE250[27] == 0.0f) && Play_CheckPolyCollision(arg1, arg2 + 20.0f, arg3, arg4, sp84, sp80, sp7C, &sp58, &sp4C)) { player->rollState = 9; player->rollTimer = 15; @@ -886,9 +888,9 @@ void func_tank_80046704(Player* player) { if (1) {} for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) { if ((scenery->obj.status == OBJ_ACTIVE) && ((player->trueZpos - 2000.0f) < scenery->obj.pos.z)) { - if ((scenery->obj.id == OBJ_SCENERY_69) || (scenery->obj.id == OBJ_SCENERY_70) || - (scenery->obj.id == OBJ_SCENERY_71) || (scenery->obj.id == OBJ_SCENERY_72) || - (scenery->obj.id == OBJ_SCENERY_73) || (scenery->obj.id == OBJ_SCENERY_67)) { + if ((scenery->obj.id == OBJ_SCENERY_MA_TERRAIN_BUMP) || (scenery->obj.id == OBJ_SCENERY_MA_FLOOR_1) || + (scenery->obj.id == OBJ_SCENERY_MA_FLOOR_2) || (scenery->obj.id == OBJ_SCENERY_MA_FLOOR_3) || + (scenery->obj.id == OBJ_SCENERY_MA_FLOOR_4) || (scenery->obj.id == OBJ_SCENERY_MA_WALL_3)) { temp1 = scenery->obj.pos.x - player->pos.x; temp2 = scenery->obj.pos.z - player->trueZpos; @@ -896,7 +898,7 @@ void func_tank_80046704(Player* player) { func_tank_8004641C(player, scenery->obj.id, scenery->obj.pos.x, scenery->obj.pos.y, scenery->obj.pos.z, scenery->obj.rot.x, scenery->obj.rot.y, scenery->obj.rot.z); } - } else if (scenery->obj.id == OBJ_SCENERY_74) { + } else if (scenery->obj.id == OBJ_SCENERY_MA_FLOOR_5) { if (((player->pos.x - 820.0f) <= scenery->obj.pos.x) && (scenery->obj.pos.x <= (player->pos.x + 820.0f)) && ((player->pos.y - 50.0f) <= scenery->obj.pos.y) && @@ -907,10 +909,10 @@ void func_tank_80046704(Player* player) { player->groundPos.y = D_MA_801BE250[27] - 3.0f; } } - if ((scenery->obj.id == OBJ_SCENERY_59) || (scenery->obj.id == OBJ_SCENERY_60) || - (scenery->obj.id == OBJ_SCENERY_61) || (scenery->obj.id == OBJ_SCENERY_63) || - (scenery->obj.id == OBJ_SCENERY_105) || (scenery->obj.id == OBJ_SCENERY_66) || - (scenery->obj.id == OBJ_SCENERY_67) || (scenery->obj.id == OBJ_SCENERY_68)) { + if ((scenery->obj.id == OBJ_SCENERY_MA_BUILDING_1) || (scenery->obj.id == OBJ_SCENERY_MA_BUILDING_2) || + (scenery->obj.id == OBJ_SCENERY_MA_TOWER) || (scenery->obj.id == OBJ_SCENERY_63) || + (scenery->obj.id == OBJ_SCENERY_MA_TRAIN_TRACK_13) || (scenery->obj.id == OBJ_SCENERY_MA_WALL_2) || + (scenery->obj.id == OBJ_SCENERY_MA_WALL_3) || (scenery->obj.id == OBJ_SCENERY_MA_WALL_4)) { s32 temp_v0; s32 sp94; @@ -934,9 +936,9 @@ void func_tank_80046704(Player* player) { player->pos.x += (D_800C9F4C[temp_v0] * 5.0f); break; case 3: - if ((scenery->obj.id == OBJ_SCENERY_59) || (scenery->obj.id == OBJ_SCENERY_60) || - (scenery->obj.id == OBJ_SCENERY_63) || (scenery->obj.id == OBJ_SCENERY_66) || - (scenery->obj.id == OBJ_SCENERY_68)) { + if ((scenery->obj.id == OBJ_SCENERY_MA_BUILDING_1) || + (scenery->obj.id == OBJ_SCENERY_MA_BUILDING_2) || (scenery->obj.id == OBJ_SCENERY_63) || + (scenery->obj.id == OBJ_SCENERY_MA_WALL_2) || (scenery->obj.id == OBJ_SCENERY_MA_WALL_4)) { Player_ApplyDamage(player, temp_v0, 5); } player->baseSpeed = -(D_800C9F00 * 1.5f); @@ -945,7 +947,7 @@ void func_tank_80046704(Player* player) { AUDIO_PLAY_SFX(NA_SE_TANK_WALL_HIT, player->sfxSource, 0); break; } - if (scenery->obj.id == OBJ_SCENERY_59) { + if (scenery->obj.id == OBJ_SCENERY_MA_BUILDING_1) { if (((player->pos.x - 230.0f) <= scenery->obj.pos.x) && (scenery->obj.pos.x <= (player->pos.x + 230.0f)) && ((80.0f <= player->pos.y - scenery->obj.pos.y)) && @@ -975,7 +977,7 @@ void func_tank_80046704(Player* player) { (scenery->obj.pos.z <= (player->trueZpos + 220.0f)) && (player->pos.y >= 200.0f)) { player->groundPos.y = scenery->obj.pos.y + 204.0f; } - } else if ((scenery->obj.id == OBJ_SCENERY_105) && Macbeth_801A3C20(player->trueZpos)) { + } else if ((scenery->obj.id == OBJ_SCENERY_MA_TRAIN_TRACK_13) && Macbeth_801A3C20(player->trueZpos)) { if (((player->pos.x - 200.0f) < D_MA_801BE250[21]) && (D_MA_801BE250[21] < (player->pos.x + 200.0f))) { player->groundPos.y = D_MA_801BE250[22] - 1.0f; @@ -1342,14 +1344,15 @@ void func_tank_800481F4(Player* player) { func_tank_800444BC(player); if (player->mercyTimer == 0) { for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) { - if ((scenery->obj.status == OBJ_ACTIVE) && (scenery->obj.id != OBJ_SCENERY_58) && - (scenery->obj.id != OBJ_SCENERY_105) && (scenery->obj.id != OBJ_SCENERY_59) && - (scenery->obj.id != OBJ_SCENERY_60) && (scenery->obj.id != OBJ_SCENERY_63) && - (scenery->obj.id != OBJ_SCENERY_66) && (scenery->obj.id != OBJ_SCENERY_67) && - (scenery->obj.id != OBJ_SCENERY_68) && (scenery->obj.id != OBJ_SCENERY_70) && - (scenery->obj.id != OBJ_SCENERY_72) && (scenery->obj.id != OBJ_SCENERY_71) && - (scenery->obj.id != OBJ_SCENERY_73) && (scenery->obj.id != OBJ_SCENERY_74) && - (scenery->obj.id != OBJ_SCENERY_69) && ((player->trueZpos - 2000.0f) < scenery->obj.pos.z)) { + if ((scenery->obj.status == OBJ_ACTIVE) && (scenery->obj.id != OBJ_SCENERY_TI_BRIDGE) && + (scenery->obj.id != OBJ_SCENERY_MA_TRAIN_TRACK_13) && (scenery->obj.id != OBJ_SCENERY_MA_BUILDING_1) && + (scenery->obj.id != OBJ_SCENERY_MA_BUILDING_2) && (scenery->obj.id != OBJ_SCENERY_63) && + (scenery->obj.id != OBJ_SCENERY_MA_WALL_2) && (scenery->obj.id != OBJ_SCENERY_MA_WALL_3) && + (scenery->obj.id != OBJ_SCENERY_MA_WALL_4) && (scenery->obj.id != OBJ_SCENERY_MA_FLOOR_1) && + (scenery->obj.id != OBJ_SCENERY_MA_FLOOR_3) && (scenery->obj.id != OBJ_SCENERY_MA_FLOOR_2) && + (scenery->obj.id != OBJ_SCENERY_MA_FLOOR_4) && (scenery->obj.id != OBJ_SCENERY_MA_FLOOR_5) && + (scenery->obj.id != OBJ_SCENERY_MA_TERRAIN_BUMP) && + ((player->trueZpos - 2000.0f) < scenery->obj.pos.z)) { var_fv1 = scenery->obj.rot.y; if (scenery->info.action == (ObjectFunc) SceneryRotateTowardsCamera) { var_fv1 = 0.0f; @@ -1429,7 +1432,7 @@ void func_tank_800481F4(Player* player) { Player_ApplyDamage(player, 0, 5); player->mercyTimer = 1; } - } else if ((OBJ_ACTOR_205 <= actor->obj.id) && (actor->obj.id <= OBJ_ACTOR_213)) { + } else if ((OBJ_ACTOR_MA_LOCOMOTIVE <= actor->obj.id) && (actor->obj.id <= OBJ_ACTOR_MA_TRAIN_CAR_7)) { if (func_tank_80046E40(player, actor->info.hitbox, &sp98, actor->fwork[25] + actor->obj.pos.x, actor->fwork[8] + actor->obj.pos.y + 25.0f, actor->obj.pos.z, actor->fwork[29], actor->fwork[26], actor->obj.rot.z, 0.0f, 0.0f, @@ -1463,12 +1466,12 @@ void func_tank_800481F4(Player* player) { actor->obj.rot.y, actor->obj.rot.z, 0.0f, 0.0f, 0.0f); if (temp_v0 != 0) { actor->dmgType = DMG_COLLISION; - if ((actor->obj.id == OBJ_ACTOR_225) || (actor->obj.id == OBJ_MISSILE_SEEK_TEAM)) { + if ((actor->obj.id == OBJ_ACTOR_TI_LANDMINE) || (actor->obj.id == OBJ_MISSILE_SEEK_TEAM)) { actor->dmgType = -1; } if (actor->info.damage) { Player_ApplyDamage(player, temp_v0, actor->info.damage); - if (actor->obj.id == OBJ_ACTOR_225) { + if (actor->obj.id == OBJ_ACTOR_TI_LANDMINE) { player->knockback.y = 0.0f; } } else { @@ -1487,11 +1490,11 @@ void func_tank_800481F4(Player* player) { if (temp_v0 != 0) { if ((sprite->obj.id == OBJ_SPRITE_FO_POLE) || (sprite->obj.id == OBJ_SPRITE_CO_POLE) || (sprite->obj.id == OBJ_SPRITE_CO_TREE)) { - sprite->destroy = 1; + sprite->destroy = true; player->hitTimer = 6; player->hitDirection = 0; } else if (sprite->obj.id == OBJ_SPRITE_TI_CACTUS) { - sprite->destroy = 1; + sprite->destroy = true; } else { Player_ApplyDamage(player, temp_v0, sprite->info.damage); } diff --git a/src/engine/fox_versus.c b/src/engine/fox_versus.c index 28633126..0ea9aa97 100644 --- a/src/engine/fox_versus.c +++ b/src/engine/fox_versus.c @@ -246,7 +246,7 @@ void func_versus_800BD7C4(f32 xPos, f32 yPos, s32 arg2) { s32 i; for (i = 10; i != 1; i /= 10) { - if (xPos > 0 && (yPos > 0)) { + if ((xPos > 0) && (yPos > 0)) { TextureRect_IA8(&gMasterDisp, D_800D4B20[arg2 / i], 16, 8, xPos, yPos, 1.0f, 1.0f); } xPos += 9.0f; diff --git a/src/mods/spawner.c b/src/mods/spawner.c new file mode 100644 index 00000000..b7cb964d --- /dev/null +++ b/src/mods/spawner.c @@ -0,0 +1,458 @@ +/* + * File: spawner.c + * System: Spawner + * Description: Spawner module meant to help documenting the rest of the code + * by being able to spawn Scenery, Sprites, Actors, Bosses, Items, Effects and Events. + * This is not part of the original game. + */ + +#include "global.h" +#include "sf64object.h" + +typedef enum ObjType { + /* 0 */ OBJ_SPAWN_SCENERY, + /* 1 */ OBJ_SPAWN_SCENERY_360, + /* 2 */ OBJ_SPAWN_SPRITE, + /* 3 */ OBJ_SPAWN_ACTOR, + /* 4 */ OBJ_SPAWN_BOSS, + /* 5 */ OBJ_SPAWN_ITEM, + /* 6 */ OBJ_SPAWN_EFFECT, + /* 7 */ OBJ_SPAWN_EVENT, + /* 8 */ OBJ_SPAWN_MAX +} ObjType; + +typedef struct ObjCount { + s32 actor; + s32 boss; + s32 scenery; + s32 sprite; + s32 effect; + s32 item; +} ObjCount; + +static int sObjId = 0; +static int sObjType = 0; + +static int sTextXpos = 239; +static int sTextYpos = 173; + +static OSContPad* sContPress; +static OSContPad* sContHold; + +void Scenery_Load(Scenery* this, ObjectInit* objInit); +void Sprite_Load(Sprite* this, ObjectInit* objInit); +void Item_Load(Item* this, ObjectInit* objInit); +void Boss_Load(Boss* this, ObjectInit* objInit); + +void Spawner_Actor(int actorId) { + if ((gControllerPress[0].button & L_TRIG) && (actorId >= OBJ_ACTOR_CO_GARUDA_1) && + (actorId <= OBJ_ACTOR_SUPPLIES)) { + Vec3f* reticlePos = &D_display_801613E0[0]; + Actor* actorSpawn = Game_SpawnActor(actorId); + + if (actorSpawn != NULL) { + actorSpawn->obj.pos.x = reticlePos->x * 1.7f; + actorSpawn->obj.pos.y = 200.0f; + actorSpawn->obj.pos.z = gPlayer[0].pos.z - 1500.0f - (reticlePos->y * 1.7f); + actorSpawn->state = 0; + } + } +} + +void Spawner_Boss(int bossId) { + if ((gControllerPress[0].button & L_TRIG) && (bossId >= OBJ_BOSS_CO_GRANGA) && (bossId <= OBJ_BOSS_AND_BRAIN)) { + Vec3f* reticlePos = &D_display_801613E0[0]; + ObjectInit objInit; + s32 i; + + objInit.zPos1 = objInit.zPos2 = 0; + objInit.xPos = reticlePos->x * 1.7f; + objInit.yPos = 200.0f; + objInit.rot.x = objInit.rot.y = objInit.rot.z = 0; + objInit.id = bossId; + + for (i = 0; i < ARRAY_COUNT(gBosses); i++) { + if (gBosses[i].obj.status == OBJ_FREE) { + Boss_Load(&gBosses[i], &objInit); + gBosses[i].obj.pos.z = gPlayer[0].pos.z - 1500.0f - (reticlePos->y * 1.7f); + break; + } + } + } +} + +void Spawner_Scenery(int sceneryId) { + if ((gControllerPress[0].button & L_TRIG) && (sceneryId >= OBJ_SCENERY_CO_STONE_ARCH) && + (sceneryId <= OBJ_SCENERY_VE2_MOUNTAIN)) { + Vec3f* reticlePos = &D_display_801613E0[0]; + ObjectInit objInit; + s32 i; + + objInit.zPos1 = objInit.zPos2 = 0; + objInit.xPos = reticlePos->x * 1.7f; + objInit.yPos = 200.0f; + objInit.rot.x = objInit.rot.y = objInit.rot.z = 0; + objInit.id = sceneryId; + + for (i = 0; i < ARRAY_COUNT(gScenery); i++) { + if (gScenery[i].obj.status == OBJ_FREE) { + Scenery_Load(&gScenery[i], &objInit); + gScenery[i].obj.pos.z = gPlayer[0].pos.z - 1500.0f - (reticlePos->y * 4.7f); + break; + } + } + } +} + +void Spawner_Scenery360(s32 scenery360Id) { + if ((gControllerPress[0].button & L_TRIG) && (scenery360Id >= OBJ_SCENERY_AND_PATH_INTERSECTION) && + (scenery360Id <= OBJ_SCENERY_VE2_MOUNTAIN)) { + Vec3f* reticlePos = &D_display_801613E0[0]; + s32 i; + + for (i = 0; i < 200; i++) { + if (gScenery360[i].obj.status == OBJ_FREE) { + Scenery360_Initialize(&gScenery360[i]); + gScenery360[i].obj.status = OBJ_ACTIVE; + gScenery360[i].obj.id = scenery360Id; + + gScenery360[i].obj.pos.x = +reticlePos->x * 5.0f; + gScenery360[i].obj.pos.z = -reticlePos->y * 5.0f; + + if (gLevelType == LEVELTYPE_PLANET) { + gScenery360[i].obj.pos.y = gGroundHeight; + } else { + gScenery360[i].obj.pos.y = gPlayer[0].pos.y; + } + + gScenery360[i].obj.rot.y = 0; + Object_SetInfo(&gScenery360[i].info, gScenery360[i].obj.id); + break; + } + } + } +} + +void Spawner_Sprite(int spriteId) { + if ((gControllerPress[0].button & L_TRIG) && (spriteId >= OBJ_SPRITE_CO_POLE) && + (spriteId <= OBJ_SPRITE_GFOX_TARGET)) { + Vec3f* reticlePos = &D_display_801613E0[0]; + ObjectInit objInit; + s32 i; + + objInit.zPos1 = objInit.zPos2 = 0; + objInit.xPos = reticlePos->x * 1.7f; + objInit.yPos = 200.0f; + objInit.rot.x = objInit.rot.y = objInit.rot.z = 0; + objInit.id = spriteId; + + for (i = 0; i < ARRAY_COUNT(gSprites); i++) { + if (gSprites[i].obj.status == OBJ_FREE) { + Sprite_Load(&gSprites[i], &objInit); + gSprites[i].obj.pos.z = gPlayer[0].pos.z - 1500.0f - (reticlePos->y * 1.7f); + break; + } + } + } +} + +void Spawner_Item(int itemId) { + if ((gControllerPress[0].button & L_TRIG) && (itemId >= OBJ_ITEM_LASERS) && (itemId <= OBJ_ITEM_TRAINING_RING)) { + Vec3f* reticlePos = &D_display_801613E0[0]; + ObjectInit objInit; + s32 i; + + objInit.zPos1 = objInit.zPos2 = 0; + objInit.xPos = reticlePos->x * 1.7f; + objInit.yPos = 200.0f; + objInit.rot.x = objInit.rot.y = objInit.rot.z = 0; + objInit.id = itemId; + + for (i = 0; i < ARRAY_COUNT(gItems); i++) { + if (gItems[i].obj.status == OBJ_FREE) { + Item_Load(&gItems[i], &objInit); + gItems[i].obj.pos.z = gPlayer[0].pos.z - 1500.0f - (reticlePos->y * 1.7f); + break; + } + } + } +} + +void Spawner_Event(int eventId) { + if (gControllerPress[0].button & L_TRIG) { + Vec3f* reticlePos = &D_display_801613E0[0]; + ObjectInit objInit; + s32 i; + + for (i = 0; i < ARRAY_COUNT(gActors); i++) { + if (gActors[i].obj.status == OBJ_FREE) { + objInit.zPos1 = gPlayer[0].pos.z - 1500.0f - (reticlePos->y * 1.7f); + objInit.zPos2 = gPlayer[0].pos.z - 1500.0f - (reticlePos->y * 1.7f) + 300.0f; + objInit.xPos = reticlePos->x * 1.7f; + objInit.yPos = 200.0f; + objInit.rot.x = 0; + objInit.rot.y = 0; + objInit.rot.z = 0; + objInit.id = ACTOR_EVENT_ID + eventId; + ActorEvent_Load(&gActors[i], &objInit, i); + gActors[i].obj.pos.z = gPlayer[0].pos.z - 1500.0f - (reticlePos->y * 1.7f); + break; + } + } + } +} + +void Spawner_Effect(int effectId) { + if ((gControllerPress[0].button & L_TRIG) && (effectId >= OBJ_EFFECT_FIRE_SMOKE_1) && (effectId < OBJ_ID_MAX)) { + Vec3f* reticlePos = &D_display_801613E0[0]; + s32 i; + + for (i = 0; i < ARRAY_COUNT(gEffects); i++) { + if (gEffects[i].obj.status == OBJ_FREE) { + Effect_Initialize(&gEffects[i]); + gEffects[i].obj.status = OBJ_INIT; + gEffects[i].obj.id = effectId; + gEffects[i].obj.pos.x = reticlePos->x * 1.7f; + gEffects[i].obj.pos.y = 200.0f; + gEffects[i].obj.pos.z = gPlayer[0].pos.z - 1000.0f - (reticlePos->y * 1.7f); + gEffects[i].vel.x = 0; + gEffects[i].vel.y = 0; + gEffects[i].vel.z = 0; + gEffects[i].obj.rot.x = 0; + gEffects[i].obj.rot.y = 0; + gEffects[i].obj.rot.z = 0; + // gEffects[i].timer_50 = 200; + Object_SetInfo(&gEffects[i].info, gEffects[i].obj.id); + break; + } + } + } +} + +ObjCount Spawner_ObjCount(void) { + ObjCount counter = { 0, 0, 0, 0, 0, 0 }; + s32 i; + + for (i = 0; i < ARRAY_COUNT(gActors); i++) { + if (gActors[i].obj.status != OBJ_FREE) { + counter.actor++; + } + } + for (i = 0; i < ARRAY_COUNT(gBosses); i++) { + if (gBosses[i].obj.status != OBJ_FREE) { + counter.boss++; + } + } + for (i = 0; i < ARRAY_COUNT(gScenery); i++) { + if (gScenery[i].obj.status != OBJ_FREE) { + counter.scenery++; + } + } + if (gLevelMode == LEVELMODE_ALL_RANGE) { + for (i = 0; i < 200; i++) { + if (gScenery360[i].obj.status != OBJ_FREE) { + counter.scenery++; + } + } + } + for (i = 0; i < ARRAY_COUNT(gSprites); i++) { + if (gSprites[i].obj.status != OBJ_FREE) { + counter.sprite++; + } + } + for (i = 0; i < ARRAY_COUNT(gEffects); i++) { + if (gEffects[i].obj.status != OBJ_FREE) { + counter.effect++; + } + } + for (i = 0; i < ARRAY_COUNT(gItems); i++) { + if (gItems[i].obj.status != OBJ_FREE) { + counter.item++; + } + } + return counter; +} + +void Spawner_ObjKill(void) { + s32 i; + + for (i = 0; i <= ARRAY_COUNT(gActors); i++) { + Object_Kill(&gActors[i].obj, gActors[i].sfxSource); + } + for (i = 0; i <= ARRAY_COUNT(gBosses); i++) { + Object_Kill(&gBosses[i].obj, gBosses[i].sfxSource); + } + for (i = 0; i <= ARRAY_COUNT(gScenery); i++) { + Object_Kill(&gScenery[i].obj, gScenery[i].sfxSource); + } + for (i = 0; i <= ARRAY_COUNT(gSprites); i++) { + Sprite_Initialize(&gSprites[i]); + } + for (i = 0; i <= ARRAY_COUNT(gEffects); i++) { + Object_Kill(&gEffects[i].obj, gEffects[i].sfxSource); + } + for (i = 0; i <= ARRAY_COUNT(gItems); i++) { + Object_Kill(&gItems[i].obj, gItems[i].sfxSource); + } + if (gLevelMode == LEVELMODE_ALL_RANGE) { + for (i = 0; i < 200; i++) { + gScenery360[i].obj.status = OBJ_FREE; + } + } +} + +// Use this function to add code that eases your documentation work! +Spawner_Playground(void) { + Player* player = &gPlayer[0]; + + player->mercyTimer = 100; + gLaserStrength[0] = 2; + gBombCount[0] = 9; + gLifeCount[0] = 9; +} + +void Spawner(void) { + static bool sFreeze = true; + static s32 sHoldTimer = 0; + ObjCount counter; + + /* Prevent execution before gameplay */ + if ((gGameState != GSTATE_PLAY) || (gPlayState <= PLAY_INIT)) { + return; + } + + Spawner_Playground(); + + /* Object Selector */ + sContPress = &gControllerPress[gMainController]; + sContHold = &gControllerHold[gMainController]; + + if (sContHold->button & (L_JPAD | R_JPAD)) { + sHoldTimer++; + } else { + sHoldTimer = 0; + } + + if (((sContHold->button & L_JPAD) && (sHoldTimer > 15)) || (sContPress->button & L_JPAD)) { + sObjId--; + } else if (((sContHold->button & R_JPAD) && (sHoldTimer > 15)) || (sContPress->button & R_JPAD)) { + sObjId++; + } else if (gControllerPress[0].button & D_JPAD) { + sFreeze ^= 1; // Freeze arwing. + } else if (gControllerPress[0].button & U_JPAD) { + Spawner_ObjKill(); + } else if (gControllerPress[0].button & R_CBUTTONS) { + sObjType++; + switch (sObjType) { + case OBJ_SPAWN_EVENT: + sObjId = EVID_0; + break; + case OBJ_SPAWN_SCENERY: + sObjId = OBJ_SCENERY_CO_STONE_ARCH; + break; + case OBJ_SPAWN_SCENERY_360: + sObjId = OBJ_SCENERY_AND_PATH_INTERSECTION; + break; + case OBJ_SPAWN_SPRITE: + sObjId = OBJ_SPRITE_CO_POLE; + break; + case OBJ_SPAWN_ACTOR: + sObjId = OBJ_ACTOR_CO_GARUDA_1; + break; + case OBJ_SPAWN_BOSS: + sObjId = OBJ_BOSS_CO_GRANGA; + break; + case OBJ_SPAWN_ITEM: + sObjId = OBJ_ITEM_LASERS; + break; + case OBJ_SPAWN_EFFECT: + sObjId = OBJ_EFFECT_FIRE_SMOKE_1; + break; + default: + sObjId = 0; + break; + } + } + + if (sObjId < 0) { + sObjId = 0; + } + + if (sObjType >= OBJ_SPAWN_MAX) { + sObjType = OBJ_SPAWN_SCENERY; + } + + /* Freeze arwing */ + if (sFreeze) { + gPlayer[0].baseSpeed = 0; + } else { + gPlayer[0].baseSpeed = gArwingSpeed; + } + + RCP_SetupDL(&gMasterDisp, SETUPDL_83); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); + + /* Spawners */ + switch (sObjType) { + case OBJ_SPAWN_SCENERY: + Graphics_DisplaySmallText(10, 220, 1.0f, 1.0f, "SCENERY:"); + Graphics_DisplaySmallNumber(80, 220, sObjId); + Spawner_Scenery(sObjId); + break; + case OBJ_SPAWN_SCENERY_360: + Graphics_DisplaySmallText(10, 220, 1.0f, 1.0f, "SCENERY360:"); + Graphics_DisplaySmallNumber(100, 220, sObjId); + Spawner_Scenery360(sObjId); + break; + case OBJ_SPAWN_SPRITE: + Graphics_DisplaySmallText(10, 220, 1.0f, 1.0f, "SPRITE:"); + Graphics_DisplaySmallNumber(65, 220, sObjId); + Spawner_Sprite(sObjId); + break; + case OBJ_SPAWN_ACTOR: + Graphics_DisplaySmallText(10, 220, 1.0f, 1.0f, "ACTOR:"); + Graphics_DisplaySmallNumber(60, 220, sObjId); + Spawner_Actor(sObjId); + break; + case OBJ_SPAWN_BOSS: + Graphics_DisplaySmallText(10, 220, 1.0f, 1.0f, "BOSS:"); + Graphics_DisplaySmallNumber(55, 220, sObjId); + Spawner_Boss(sObjId); + break; + case OBJ_SPAWN_ITEM: + Graphics_DisplaySmallText(10, 220, 1.0f, 1.0f, "ITEM:"); + Graphics_DisplaySmallNumber(50, 220, sObjId); + Spawner_Item(sObjId); + break; + case OBJ_SPAWN_EFFECT: + Graphics_DisplaySmallText(10, 220, 1.0f, 1.0f, "EFFECT:"); + Graphics_DisplaySmallNumber(65, 220, sObjId); + Spawner_Effect(sObjId); + break; + case OBJ_SPAWN_EVENT: + Graphics_DisplaySmallText(10, 220, 1.0f, 1.0f, "EVENT:"); + Graphics_DisplaySmallNumber(60, 220, sObjId); + Spawner_Event(sObjId); + break; + default: + break; + } + + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); + + Graphics_DisplaySmallText(sTextXpos - 8, sTextYpos + 00, 1.0f, 1.0f, "SCENERY:"); + Graphics_DisplaySmallText(sTextXpos - 4, sTextYpos + 10, 1.0f, 1.0f, "SPRITES:"); + Graphics_DisplaySmallText(sTextXpos + 0, sTextYpos + 20, 1.0f, 1.0f, "ACTORS:"); + Graphics_DisplaySmallText(sTextXpos + 0, sTextYpos + 30, 1.0f, 1.0f, "BOSSES:"); + Graphics_DisplaySmallText(sTextXpos + 12, sTextYpos + 40, 1.0f, 1.0f, "ITEMS:"); + Graphics_DisplaySmallText(sTextXpos - 8, sTextYpos + 50, 1.0f, 1.0f, "EFFECTS:"); + + counter = Spawner_ObjCount(); + + Graphics_DisplaySmallNumber(sTextXpos + 55, sTextYpos + 00, counter.scenery); + Graphics_DisplaySmallNumber(sTextXpos + 55, sTextYpos + 10, counter.sprite); + Graphics_DisplaySmallNumber(sTextXpos + 55, sTextYpos + 20, counter.actor); + Graphics_DisplaySmallNumber(sTextXpos + 55, sTextYpos + 30, counter.boss); + Graphics_DisplaySmallNumber(sTextXpos + 55, sTextYpos + 40, counter.item); + Graphics_DisplaySmallNumber(sTextXpos + 55, sTextYpos + 50, counter.effect); +} diff --git a/src/overlays/ovl_ending/fox_end2.c b/src/overlays/ovl_ending/fox_end2.c index 97be8082..760eca44 100644 --- a/src/overlays/ovl_ending/fox_end2.c +++ b/src/overlays/ovl_ending/fox_end2.c @@ -865,7 +865,7 @@ void Ending_80191294(u32 arg0, AssetInfo* asset) { D_ending_80198590.unk_30 = +D_ending_801985F0.x; D_ending_80198590.unk_34 = -D_ending_801985F0.y; - func_display_80053658(&D_ending_80198590); + Display_ArwingWings(&D_ending_80198590); } void Ending_80191700(u32 arg0, AssetInfo* asset) { diff --git a/src/overlays/ovl_i1/fox_co.c b/src/overlays/ovl_i1/fox_co.c index 27eb1b1d..7a564f36 100644 --- a/src/overlays/ovl_i1/fox_co.c +++ b/src/overlays/ovl_i1/fox_co.c @@ -9,19 +9,19 @@ #include "assets/ast_corneria.h" #include "fox_co.h" -u8 D_i1_8019B6D0; +u8 sFightCarrier; f32 sCoGrangaWork[68]; -void Corneria_BuildingOnFire_Update(CoBuildingOnFire* this) { +void Corneria_CoBuildingOnFire_Update(CoBuildingOnFire* this) { } -void Corneria_BuildingOnFire_Draw(CoBuildingOnFire* this) { +void Corneria_CoBuildingOnFire_Draw(CoBuildingOnFire* this) { gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_CO_60199D0); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); } -void Corneria_Smoke_Update(CoSmoke* this) { +void Corneria_CoSmoke_Update(CoSmoke* this) { f32 x; f32 y; f32 z; @@ -30,12 +30,12 @@ void Corneria_Smoke_Update(CoSmoke* this) { x = RAND_FLOAT_CENTERED(10.0f); y = RAND_FLOAT_CENTERED(10.0f); z = RAND_FLOAT(0.5f) + 1.0f; - func_effect_8007C85C(this->obj.pos.x + x, this->obj.pos.y + y, this->obj.pos.z, 4.0f * z); + Effect_Effect343_Spawn(this->obj.pos.x + x, this->obj.pos.y + y, this->obj.pos.z, 4.0f * z); } } -void Corneria_Boss_MissileInit(Actor* this, f32 xPos, f32 yPos, f32 zPos, f32 arg4, f32 xRot, f32 yRot, s32 arg7, - s32 eventType, ObjectId objId) { +void Corneria_BossMissile_Setup(Actor* this, f32 xPos, f32 yPos, f32 zPos, f32 arg4, f32 xRot, f32 yRot, s32 arg7, + s32 eventType, ObjectId objId) { Actor_Initialize(this); this->obj.status = OBJ_INIT; this->obj.id = objId; @@ -51,19 +51,19 @@ void Corneria_Boss_MissileInit(Actor* this, f32 xPos, f32 yPos, f32 zPos, f32 ar Object_SetInfo(&this->info, this->obj.id); } -void Corneria_Boss_SpawnMissile(f32 xPos, f32 yPos, f32 zPos, f32 arg3, f32 xRot, f32 yRot, s32 arg6, s32 eventType, +void Corneria_BossMissile_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 arg3, f32 xRot, f32 yRot, s32 arg6, s32 eventType, ObjectId objId) { s32 i; for (i = 0; i < ARRAY_COUNT(gActors); i++) { if (gActors[i].obj.status == OBJ_FREE) { - Corneria_Boss_MissileInit(&gActors[i], xPos, yPos, zPos, arg3, xRot, yRot, arg6, eventType, objId); + Corneria_BossMissile_Setup(&gActors[i], xPos, yPos, zPos, arg3, xRot, yRot, arg6, eventType, objId); break; } } } -void Corneria_Granga_ShootLaser(Granga* this, f32 x, f32 y, f32 z) { +void Corneria_CoGranga_ShootLaser(CoGranga* this, f32 x, f32 y, f32 z) { Vec3f src; Vec3f dest; @@ -77,7 +77,7 @@ void Corneria_Granga_ShootLaser(Granga* this, f32 x, f32 y, f32 z) { this->obj.pos.z + dest.z, 100.0f); } -void Corneria_GrangaSpawnItem(s32 arg0, f32 x, f32 y, f32 z, ObjectId itemId) { +void Corneria_Granga_SpawnItem(s32 arg0, f32 x, f32 y, f32 z, ObjectId itemId) { s32 i; for (i = 0; i < ARRAY_COUNT(gItems); i++) { @@ -95,7 +95,7 @@ void Corneria_GrangaSpawnItem(s32 arg0, f32 x, f32 y, f32 z, ObjectId itemId) { } } -void Corneria_Granga_Init(Granga* this) { +void Corneria_Granga_Init(CoGranga* this) { s32 i; gBossFrameCount = 0; @@ -116,22 +116,22 @@ void Corneria_Granga_Init(Granga* this) { } } -void Corneria_8018798C(Granga* this, f32 xPos, f32 yPos, f32 zPos, f32 scale) { - func_effect_8007BFFC(xPos, yPos, zPos, 0.0f, 0.0f, 0.0f, scale, 30); +void Corneria_8018798C(CoGranga* this, f32 xPos, f32 yPos, f32 zPos, f32 scale) { + Effect386_Spawn1(xPos, yPos, zPos, 0.0f, 0.0f, 0.0f, scale, 30); Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_OB_DAMAGE_M); } -void Corneria_801879F0(Granga* this, f32 xPos, f32 yPos, f32 zPos, f32 scale) { - func_effect_8007D1E0(xPos, yPos, zPos, scale); +void Corneria_801879F0(CoGranga* this, f32 xPos, f32 yPos, f32 zPos, f32 scale) { + Effect_Effect341_Spawn(xPos, yPos, zPos, scale); Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_OB_DAMAGE_M); } -void Corneria_80187A38(Granga* this, f32 xPos, f32 yPos, f32 zPos, f32 scale, s32 timer) { - func_effect_8007C120(xPos, yPos, zPos, this->vel.x, this->vel.y, this->vel.z, scale, timer); +void Corneria_80187A38(CoGranga* this, f32 xPos, f32 yPos, f32 zPos, f32 scale, s32 timer) { + Effect_Effect390_Spawn(xPos, yPos, zPos, this->vel.x, this->vel.y, this->vel.z, scale, timer); } -f32 Corneria_80187A88(s32 arg0) { - f32 ret = arg0 * 0.5f; +f32 Corneria_80187A88(s32 angle) { + f32 ret = angle * 0.5f; if (ret > 8.0f) { ret = 8.0f; @@ -139,7 +139,7 @@ f32 Corneria_80187A88(s32 arg0) { return ret; } -void Corneria_Granga_HandleDamage(Granga* this) { +void Corneria_CoGranga_HandleDamage(CoGranga* this) { CoTree* tree; s32 item; s32 i; @@ -177,7 +177,7 @@ void Corneria_Granga_HandleDamage(Granga* this) { this->swork[GRANGA_SWK_32] = true; } - this->state = GRANGA_STATE_7; + this->state = GRANGA_EXPLODE; this->timer_050 = 100; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 80); @@ -282,8 +282,8 @@ void Corneria_Granga_HandleDamage(Granga* this) { 0.0f, 5.5f, i + 28, RAND_INT(30.0f) + 60.0f); } - if (this->state < GRANGA_STATE_5) { - this->state = GRANGA_STATE_5; + if (this->state < GRANGA_FALL_TO_LEFT) { + this->state = GRANGA_FALL_TO_LEFT; this->timer_050 = 60; } } @@ -305,8 +305,8 @@ void Corneria_Granga_HandleDamage(Granga* this) { 0.0f, 5.5f, i + 28, RAND_INT(30.0f) + 60.0f); } - if (this->state < GRANGA_STATE_5) { - this->state = GRANGA_STATE_6; + if (this->state < GRANGA_FALL_TO_LEFT) { + this->state = GRANGA_FALL_TO_RIGHT; this->timer_050 = 60; } } @@ -316,7 +316,7 @@ void Corneria_Granga_HandleDamage(Granga* this) { this->timer_050 += 10; } - if ((this->state != GRANGA_STATIONARY) && (this->state < GRANGA_STATE_5)) { + if ((this->state != GRANGA_STATIONARY) && (this->state < GRANGA_FALL_TO_LEFT)) { this->fwork[GRANGA_FWK_14] = 0.0f; if (Rand_ZeroOne() < 0.5f) { @@ -324,23 +324,23 @@ void Corneria_Granga_HandleDamage(Granga* this) { } else { item = OBJ_ITEM_BOMB; } - Corneria_GrangaSpawnItem(this, this->obj.pos.x, this->obj.pos.y + 100.0f, this->obj.pos.z, item); + Corneria_Granga_SpawnItem(this, this->obj.pos.x, this->obj.pos.y + 100.0f, this->obj.pos.z, item); } - if (this->state < GRANGA_STATE_5) { + if (this->state < GRANGA_FALL_TO_LEFT) { this->state = GRANGA_STATIONARY; switch (RAND_INT(5.0f)) { case 0: - this->swork[GRANGA_NEXT_STATE] = GRANGA_STATE_2; + this->swork[GRANGA_NEXT_STATE] = GRANGA_BACKWARDS_LASER_PLASMA; break; case 1: - this->swork[GRANGA_NEXT_STATE] = GRANGA_STATE_3; + this->swork[GRANGA_NEXT_STATE] = GRANGA_FORWARD_LASER_PLASMA; break; case 2: case 3: case 4: - this->swork[GRANGA_NEXT_STATE] = GRANGA_STATE_4; + this->swork[GRANGA_NEXT_STATE] = GRANGA_FORWARD; break; } } @@ -354,44 +354,42 @@ void Corneria_Granga_HandleDamage(Granga* this) { if ((tree->obj.status == OBJ_ACTIVE) && (tree->obj.id == OBJ_SPRITE_CO_TREE)) { if ((fabsf(tree->obj.pos.x - sCoGrangaWork[GRANGA_WORK_20]) < 90.0f) && (fabsf(tree->obj.pos.z - sCoGrangaWork[GRANGA_WORK_32]) < 90.0f)) { - tree->destroy = 1; + tree->destroy = true; break; } else if ((fabsf(tree->obj.pos.x - sCoGrangaWork[GRANGA_WORK_23]) < 90.0f) && (fabsf(tree->obj.pos.z - sCoGrangaWork[GRANGA_WORK_35]) < 90.0f)) { - tree->destroy = 1; + tree->destroy = true; break; } } } if ((this->swork[GRANGA_RIGHT_ARM_DMG_IND] == DMG_DESTROYED) && ((gGameFrameCount % 4) == 0)) { - func_effect_8007BFFC(sCoGrangaWork[GRANGA_WORK_03], sCoGrangaWork[GRANGA_WORK_04], - sCoGrangaWork[GRANGA_WORK_05], - (sCoGrangaWork[GRANGA_WORK_03] - this->obj.pos.x) * 0.1f, 0.0f, - (sCoGrangaWork[GRANGA_WORK_05] - this->obj.pos.z) * 0.1f, 1.5f, 5); + Effect386_Spawn1(sCoGrangaWork[GRANGA_WORK_03], sCoGrangaWork[GRANGA_WORK_04], + sCoGrangaWork[GRANGA_WORK_05], (sCoGrangaWork[GRANGA_WORK_03] - this->obj.pos.x) * 0.1f, + 0.0f, (sCoGrangaWork[GRANGA_WORK_05] - this->obj.pos.z) * 0.1f, 1.5f, 5); } if ((this->swork[GRANGA_LEFT_ARM_DMG_IND] == DMG_DESTROYED) && ((gGameFrameCount % 4) == 0)) { - func_effect_8007BFFC(sCoGrangaWork[GRANGA_WORK_09], sCoGrangaWork[GRANGA_WORK_10], - sCoGrangaWork[GRANGA_WORK_11], - (sCoGrangaWork[GRANGA_WORK_09] - this->obj.pos.x) * 0.1f, 0.0f, - (sCoGrangaWork[GRANGA_WORK_11] - this->obj.pos.z) * 0.1f, 1.5f, 5); + Effect386_Spawn1(sCoGrangaWork[GRANGA_WORK_09], sCoGrangaWork[GRANGA_WORK_10], + sCoGrangaWork[GRANGA_WORK_11], (sCoGrangaWork[GRANGA_WORK_09] - this->obj.pos.x) * 0.1f, + 0.0f, (sCoGrangaWork[GRANGA_WORK_11] - this->obj.pos.z) * 0.1f, 1.5f, 5); } if ((this->swork[GRANGA_GUN_DMG_IND] == DMG_DESTROYED) && ((gGameFrameCount % 4) == 0)) { - func_effect_8007BFFC(sCoGrangaWork[GRANGA_WORK_12], sCoGrangaWork[GRANGA_WORK_13], - sCoGrangaWork[GRANGA_WORK_14], 0.0f, 20.0f, 0.0f, 2.0f, 5); + Effect386_Spawn1(sCoGrangaWork[GRANGA_WORK_12], sCoGrangaWork[GRANGA_WORK_13], + sCoGrangaWork[GRANGA_WORK_14], 0.0f, 20.0f, 0.0f, 2.0f, 5); } if ((this->swork[GRANGA_RIGHT_LEG_DMG_IND] == DMG_DESTROYED) && ((gGameFrameCount % 4) == 0)) { - func_effect_8007BFFC(sCoGrangaWork[GRANGA_WORK_56], sCoGrangaWork[GRANGA_WORK_57], - sCoGrangaWork[GRANGA_WORK_58], 0.0f, 10.0f, 0.0f, 2.0f, 5); + Effect386_Spawn1(sCoGrangaWork[GRANGA_WORK_56], sCoGrangaWork[GRANGA_WORK_57], + sCoGrangaWork[GRANGA_WORK_58], 0.0f, 10.0f, 0.0f, 2.0f, 5); } if ((this->swork[GRANGA_LEFT_LEG_DMG_IND] == DMG_DESTROYED) && ((gGameFrameCount % 4) == 0)) { - func_effect_8007BFFC(sCoGrangaWork[GRANGA_WORK_59], sCoGrangaWork[GRANGA_WORK_60], - sCoGrangaWork[GRANGA_WORK_61], 0.0f, 10.0f, 0.0f, 2.0f, 5); + Effect386_Spawn1(sCoGrangaWork[GRANGA_WORK_59], sCoGrangaWork[GRANGA_WORK_60], + sCoGrangaWork[GRANGA_WORK_61], 0.0f, 10.0f, 0.0f, 2.0f, 5); } } } -ObjectId Corneria_Granga_ChooseMissileTarget(Granga* this) { +ObjectId Corneria_CoGranga_ChooseMissileTarget(CoGranga* this) { this->swork[GRANGA_MISSILE_COUNT]++; /* * Spawn up to 5 missiles that seek the teammates @@ -400,14 +398,14 @@ ObjectId Corneria_Granga_ChooseMissileTarget(Granga* this) { if (this->swork[GRANGA_MISSILE_COUNT] >= 5) { this->swork[GRANGA_MISSILE_COUNT] = 0; return OBJ_MISSILE_SEEK_PLAYER; - } else if (Hud_MissileSeekModeCheck(0) < 4) { + } else if (ActorMissileSeek_ModeCheck(0) < 4) { return OBJ_MISSILE_SEEK_TEAM; } else { return 0; } } -void Corneria_Granga_Attack(Granga* this) { +void Corneria_CoGranga_Attack(CoGranga* this) { Vec3f savedPlayerPos; ObjectId objId; @@ -421,15 +419,15 @@ void Corneria_Granga_Attack(Granga* this) { break; case GRANGA_ATTACK_MISSILES: - objId = Corneria_Granga_ChooseMissileTarget(this); + objId = Corneria_CoGranga_ChooseMissileTarget(this); if (objId != 0) { if (this->swork[GRANGA_RIGHT_ARM_DMG_IND] != DMG_DESTROYED) { - Corneria_Boss_SpawnMissile(sCoGrangaWork[GRANGA_WORK_00], sCoGrangaWork[GRANGA_WORK_01], + Corneria_BossMissile_Spawn(sCoGrangaWork[GRANGA_WORK_00], sCoGrangaWork[GRANGA_WORK_01], sCoGrangaWork[GRANGA_WORK_02], 65.0f, 0.0f, sCoGrangaWork[GRANGA_WORK_16] + this->obj.rot.y, 0, 0, objId); } if (this->swork[GRANGA_LEFT_ARM_DMG_IND] != DMG_DESTROYED) { - Corneria_Boss_SpawnMissile(sCoGrangaWork[GRANGA_WORK_06], sCoGrangaWork[GRANGA_WORK_07], + Corneria_BossMissile_Spawn(sCoGrangaWork[GRANGA_WORK_06], sCoGrangaWork[GRANGA_WORK_07], sCoGrangaWork[GRANGA_WORK_08], 65.0f, 0.0f, sCoGrangaWork[GRANGA_WORK_16] + this->obj.rot.y, 0, 0, objId); } @@ -438,8 +436,8 @@ void Corneria_Granga_Attack(Granga* this) { break; case GRANGA_ATTACK_LASERS: - Corneria_Granga_ShootLaser(this, 40.0f, 228.0f, 212.0f); - Corneria_Granga_ShootLaser(this, -40.0f, 228.0f, 212.0f); + Corneria_CoGranga_ShootLaser(this, 40.0f, 228.0f, 212.0f); + Corneria_CoGranga_ShootLaser(this, -40.0f, 228.0f, 212.0f); this->swork[GRANGA_ATTACK_STATE] = GRANGA_ATTACK_IDLE; break; @@ -465,7 +463,7 @@ void Corneria_Granga_Attack(Granga* this) { } } -void Corneria_Granga_DecideNextAction(Granga* this) { +void Corneria_CoGranga_DecideNextAction(CoGranga* this) { if (this->timer_050 == 0) { this->state = GRANGA_STATIONARY; this->timer_050 = RAND_INT(20.0f) + 20; @@ -474,26 +472,26 @@ void Corneria_Granga_DecideNextAction(Granga* this) { switch (RAND_INT(8.0f)) { case 0: case 1: - this->swork[GRANGA_NEXT_STATE] = GRANGA_STATE_1; + this->swork[GRANGA_NEXT_STATE] = GRANGA_FORWARD_MISSILE; break; case 2: case 3: - this->swork[GRANGA_NEXT_STATE] = GRANGA_STATE_2; + this->swork[GRANGA_NEXT_STATE] = GRANGA_BACKWARDS_LASER_PLASMA; break; case 4: if (D_edisplay_801615D0.y < 0.0f) { - this->swork[GRANGA_NEXT_STATE] = GRANGA_STATE_4; + this->swork[GRANGA_NEXT_STATE] = GRANGA_FORWARD; } else { - this->swork[GRANGA_NEXT_STATE] = GRANGA_STATE_3; + this->swork[GRANGA_NEXT_STATE] = GRANGA_FORWARD_LASER_PLASMA; } break; case 5: case 6: case 7: - this->swork[GRANGA_NEXT_STATE] = GRANGA_STATE_4; + this->swork[GRANGA_NEXT_STATE] = GRANGA_FORWARD; break; } @@ -517,7 +515,7 @@ void Corneria_Granga_DecideNextAction(Granga* this) { } } -void Corneria_80188C7C(Granga* this) { +void Corneria_80188C7C(CoGranga* this) { if (this->unk_044 == 0) { this->unk_044++; this->fwork[GRANGA_FWK_12] *= -0.2f; @@ -534,7 +532,7 @@ void Corneria_80188C7C(Granga* this) { } } -void Corneria_Granga_1UpCheck(Granga* this) { +void Corneria_CoGranga_1UpCheck(CoGranga* this) { static s32 sCo1UpHitTimer = 0; s32 i; Vec3f src; @@ -548,7 +546,7 @@ void Corneria_Granga_1UpCheck(Granga* this) { if (sCo1UpHitTimer != 0) { sCo1UpHitTimer--; - } else if ((gPlayer[0].pos.y < 200.0f) && (this->state < GRANGA_STATE_5) && + } else if ((gPlayer[0].pos.y < 200.0f) && (this->state < GRANGA_FALL_TO_LEFT) && (fabsf(this->obj.pos.x - gPlayer[0].pos.x) < 200.0f) && (fabsf(this->obj.pos.z - gPlayer[0].trueZpos) < 200.0f) && (gPlayer[0].aerobaticPitch > 180.0f)) { this->swork[GRANGA_1UP_CHECK]++; @@ -597,7 +595,7 @@ void Corneria_Granga_1UpCheck(Granga* this) { gItems[i].timer_4A = 8; Object_SetInfo(&gItems[i].info, gItems[i].obj.id); - func_effect_8007B344(gItems[i].obj.pos.x, gItems[i].obj.pos.y, gItems[i].obj.pos.z, 5.0f, 0); + Effect_Effect384_Spawn(gItems[i].obj.pos.x, gItems[i].obj.pos.y, gItems[i].obj.pos.z, 5.0f, 0); break; } } @@ -605,7 +603,7 @@ void Corneria_Granga_1UpCheck(Granga* this) { } } -void Corneria_Granga_Update(Granga* this) { +void Corneria_CoGranga_Update(CoGranga* this) { Vec3f sp21C = { 0.0f, 0.0f, 0.0f }; s32 sp218; f32 sp214; @@ -646,14 +644,14 @@ void Corneria_Granga_Update(Granga* this) { this->timer_052 = 100; this->state = GRANGA_STATIONARY; - this->swork[GRANGA_NEXT_STATE] = GRANGA_STATE_1; + this->swork[GRANGA_NEXT_STATE] = GRANGA_FORWARD_MISSILE; sCoGrangaWork[GRANGA_WORK_66] = 0.0f; sCoGrangaWork[GRANGA_WORK_67] = 10000.0f; this->timer_050 = 30; - Animation_GetFrameData(&D_CO_602C0D0, 0, this->vwork); + Animation_GetFrameData(&aCoGrangaStationaryAnim, 0, this->vwork); gBossFrameCount = 0; } @@ -666,7 +664,7 @@ void Corneria_Granga_Update(Granga* this) { gRadarMarks[59].pos.z = this->obj.pos.z; gRadarMarks[59].yRot = this->obj.rot.y + 180.0f; - Corneria_Granga_1UpCheck(this); + Corneria_CoGranga_1UpCheck(this); if (D_edisplay_801615D0.z > 0.0f) { if (D_edisplay_801615D0.x > 0.0f) { @@ -696,7 +694,7 @@ void Corneria_Granga_Update(Granga* this) { Radio_PlayMessage(gMsg_ID_2230, RCID_PEPPY); break; case 3840: - if (this->state < GRANGA_STATE_5) { + if (this->state < GRANGA_FALL_TO_LEFT) { Radio_PlayMessage(gMsg_ID_2230, RCID_PEPPY); } break; @@ -712,7 +710,7 @@ void Corneria_Granga_Update(Granga* this) { } } - Corneria_Granga_HandleDamage(this); + Corneria_CoGranga_HandleDamage(this); this->fwork[GRANGA_FWK_00] = SIN_DEG(this->swork[GRANGA_SWK_18] * 50.0f) * Corneria_80187A88(this->swork[GRANGA_SWK_18]); @@ -725,7 +723,7 @@ void Corneria_Granga_Update(Granga* this) { this->fwork[GRANGA_FWK_04] = SIN_DEG(this->swork[GRANGA_SWK_22] * 50.0f) * Corneria_80187A88(this->swork[GRANGA_SWK_22]); - if (this->state < GRANGA_STATE_5) { + if (this->state < GRANGA_FALL_TO_LEFT) { sp5C = SIN_DEG(this->swork[GRANGA_SWK_23] * 12.0f) * Corneria_80187A88(this->swork[GRANGA_SWK_23]) * 0.3f; Math_SmoothStepToF(&this->obj.rot.z, sp5C, 0.2f, 100.0f, 0.001f); } @@ -734,9 +732,9 @@ void Corneria_Granga_Update(Granga* this) { this->obj.pos.y = 10.0f; } - sp214 = sCoGrangaWork[GRANGA_WORK_17] - this->obj.pos.x; - sp210 = sCoGrangaWork[GRANGA_WORK_18] - (this->obj.pos.y + 300.0f); - sp20C = sCoGrangaWork[GRANGA_WORK_19] - this->obj.pos.z; + sp214 = sCoGrangaWork[GRANGA_TARGET_X] - this->obj.pos.x; + sp210 = sCoGrangaWork[GRANGA_TARGET_Y] - (this->obj.pos.y + 300.0f); + sp20C = sCoGrangaWork[GRANGA_TARGET_Z] - this->obj.pos.z; sp1FC = Math_RadToDeg(Math_Atan2F(sp214, sp20C)); sp204 = sqrtf(SQ(sp214) + SQ(sp20C)); @@ -776,29 +774,29 @@ void Corneria_Granga_Update(Granga* this) { switch (this->state) { case GRANGA_STATIONARY: - this->unk_04C = 0; - sCoGrangaWork[GRANGA_WORK_17] = gPlayer[0].pos.x; - sCoGrangaWork[GRANGA_WORK_18] = gPlayer[0].pos.y; - sCoGrangaWork[GRANGA_WORK_19] = gPlayer[0].trueZpos; + this->animFrame = 0; + sCoGrangaWork[GRANGA_TARGET_X] = gPlayer[0].pos.x; + sCoGrangaWork[GRANGA_TARGET_Y] = gPlayer[0].pos.y; + sCoGrangaWork[GRANGA_TARGET_Z] = gPlayer[0].trueZpos; if (this->timer_050 == 0) { switch (this->swork[GRANGA_NEXT_STATE]) { - case GRANGA_STATE_1: - this->state = GRANGA_STATE_1; + case GRANGA_FORWARD_MISSILE: + this->state = GRANGA_FORWARD_MISSILE; this->timer_050 = RAND_INT(50.0f) + 50; this->fwork[GRANGA_FWK_14] = 0.0f; break; - case GRANGA_STATE_2: - this->state = GRANGA_STATE_2; + case GRANGA_BACKWARDS_LASER_PLASMA: + this->state = GRANGA_BACKWARDS_LASER_PLASMA; this->timer_050 = RAND_INT(100.0f) + 150; this->timer_052 = 40; this->timer_054 = 40; this->fwork[GRANGA_FWK_14] = 0.07f; break; - case GRANGA_STATE_4: - this->state = GRANGA_STATE_4; + case GRANGA_FORWARD: + this->state = GRANGA_FORWARD; this->timer_050 = RAND_INT(70.0f) + 100; this->fwork[GRANGA_FWK_14] = 0.1f; sCoGrangaWork[GRANGA_WORK_66] = RAND_FLOAT_CENTERED(6000.0f); @@ -806,15 +804,15 @@ void Corneria_Granga_Update(Granga* this) { this->fwork[GRANGA_FWK_14] = 0.07f; break; - case GRANGA_STATE_3: - this->state = GRANGA_STATE_3; + case GRANGA_FORWARD_LASER_PLASMA: + this->state = GRANGA_FORWARD_LASER_PLASMA; this->timer_050 = RAND_INT(100.0f) + 150; this->fwork[GRANGA_FWK_14] = 0.07f; break; } } - Animation_GetFrameData(&D_CO_602C0D0, this->unk_04C, frameTable); + Animation_GetFrameData(&aCoGrangaStationaryAnim, this->animFrame, frameTable); if (this->timer_052 == 0) { this->timer_052 = 150; @@ -822,17 +820,17 @@ void Corneria_Granga_Update(Granga* this) { } break; - case GRANGA_STATE_1: - sCoGrangaWork[GRANGA_WORK_17] = sCoGrangaWork[GRANGA_WORK_66] = gPlayer[0].pos.x; - sCoGrangaWork[GRANGA_WORK_18] = gPlayer[0].pos.y; - sCoGrangaWork[GRANGA_WORK_19] = sCoGrangaWork[GRANGA_WORK_67] = gPlayer[0].trueZpos; + case GRANGA_FORWARD_MISSILE: + sCoGrangaWork[GRANGA_TARGET_X] = sCoGrangaWork[GRANGA_WORK_66] = gPlayer[0].pos.x; + sCoGrangaWork[GRANGA_TARGET_Y] = gPlayer[0].pos.y; + sCoGrangaWork[GRANGA_TARGET_Z] = sCoGrangaWork[GRANGA_WORK_67] = gPlayer[0].trueZpos; - this->unk_04C += 2; - if (this->unk_04C >= Animation_GetFrameCount(&D_CO_602BC18)) { - this->unk_04C = 0; + this->animFrame += 2; + if (this->animFrame >= Animation_GetFrameCount(&aCoGrangaWalkingAnim)) { + this->animFrame = 0; } - Animation_GetFrameData(&D_CO_602BC18, this->unk_04C, frameTable); + Animation_GetFrameData(&aCoGrangaWalkingAnim, this->animFrame, frameTable); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp1EC, &sp21C); if (this->timer_052 == 0) { @@ -840,20 +838,20 @@ void Corneria_Granga_Update(Granga* this) { this->swork[GRANGA_ATTACK_STATE] = GRANGA_ATTACK_MISSILES; } - Corneria_Granga_DecideNextAction(this); + Corneria_CoGranga_DecideNextAction(this); break; - case GRANGA_STATE_2: - sCoGrangaWork[GRANGA_WORK_17] = sCoGrangaWork[GRANGA_WORK_66] = gPlayer[0].pos.x; - sCoGrangaWork[GRANGA_WORK_18] = gPlayer[0].pos.y; - sCoGrangaWork[GRANGA_WORK_19] = sCoGrangaWork[GRANGA_WORK_67] = gPlayer[0].trueZpos; + case GRANGA_BACKWARDS_LASER_PLASMA: + sCoGrangaWork[GRANGA_TARGET_X] = sCoGrangaWork[GRANGA_WORK_66] = gPlayer[0].pos.x; + sCoGrangaWork[GRANGA_TARGET_Y] = gPlayer[0].pos.y; + sCoGrangaWork[GRANGA_TARGET_Z] = sCoGrangaWork[GRANGA_WORK_67] = gPlayer[0].trueZpos; - this->unk_04C -= 4; - if (this->unk_04C < 0) { - this->unk_04C = 100; + this->animFrame -= 4; + if (this->animFrame < 0) { + this->animFrame = 100; } - Animation_GetFrameData(&D_CO_602BC18, this->unk_04C, frameTable); + Animation_GetFrameData(&aCoGrangaWalkingAnim, this->animFrame, frameTable); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp6C, &sp21C); if (this->timer_052 == 0) { @@ -865,20 +863,20 @@ void Corneria_Granga_Update(Granga* this) { this->swork[GRANGA_ATTACK_STATE] = GRANGA_ATTACK_PLASMA; } - Corneria_Granga_DecideNextAction(this); + Corneria_CoGranga_DecideNextAction(this); break; - case GRANGA_STATE_3: - sCoGrangaWork[GRANGA_WORK_17] = sCoGrangaWork[GRANGA_WORK_66] = gPlayer[0].pos.x; - sCoGrangaWork[GRANGA_WORK_18] = gPlayer[0].pos.y; - sCoGrangaWork[GRANGA_WORK_19] = sCoGrangaWork[GRANGA_WORK_67] = gPlayer[0].trueZpos; + case GRANGA_FORWARD_LASER_PLASMA: + sCoGrangaWork[GRANGA_TARGET_X] = sCoGrangaWork[GRANGA_WORK_66] = gPlayer[0].pos.x; + sCoGrangaWork[GRANGA_TARGET_Y] = gPlayer[0].pos.y; + sCoGrangaWork[GRANGA_TARGET_Z] = sCoGrangaWork[GRANGA_WORK_67] = gPlayer[0].trueZpos; - this->unk_04C += 4; - if (this->unk_04C > 100) { - this->unk_04C = 0; + this->animFrame += 4; + if (this->animFrame > 100) { + this->animFrame = 0; } - Animation_GetFrameData(&D_CO_602BC18, this->unk_04C, frameTable); + Animation_GetFrameData(&aCoGrangaWalkingAnim, this->animFrame, frameTable); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp78, &sp21C); if (this->timer_052 == 0) { @@ -890,39 +888,39 @@ void Corneria_Granga_Update(Granga* this) { this->swork[GRANGA_ATTACK_STATE] = GRANGA_ATTACK_PLASMA; } - Corneria_Granga_DecideNextAction(this); + Corneria_CoGranga_DecideNextAction(this); break; - case GRANGA_STATE_4: - sCoGrangaWork[GRANGA_WORK_17] = gPlayer[0].pos.x; - sCoGrangaWork[GRANGA_WORK_18] = gPlayer[0].pos.y; - sCoGrangaWork[GRANGA_WORK_19] = gPlayer[0].trueZpos; + case GRANGA_FORWARD: + sCoGrangaWork[GRANGA_TARGET_X] = gPlayer[0].pos.x; + sCoGrangaWork[GRANGA_TARGET_Y] = gPlayer[0].pos.y; + sCoGrangaWork[GRANGA_TARGET_Z] = gPlayer[0].trueZpos; - this->unk_04C += 4; - if (this->unk_04C > 100) { - this->unk_04C = 0; + this->animFrame += 4; + if (this->animFrame > 100) { + this->animFrame = 0; } - Animation_GetFrameData(&D_CO_602BC18, this->unk_04C, frameTable); + Animation_GetFrameData(&aCoGrangaWalkingAnim, this->animFrame, frameTable); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp78, &sp21C); - Corneria_Granga_DecideNextAction(this); + Corneria_CoGranga_DecideNextAction(this); break; - case GRANGA_STATE_5: - case GRANGA_STATE_6: + case GRANGA_FALL_TO_LEFT: + case GRANGA_FALL_TO_RIGHT: this->drawShadow = false; gGroundClipMode = 1; if ((gGameFrameCount % 8) == 0) { - sCoGrangaWork[GRANGA_WORK_17] = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(2000.0f); - sCoGrangaWork[GRANGA_WORK_18] = gPlayer[0].pos.y; - sCoGrangaWork[GRANGA_WORK_19] = gPlayer[0].trueZpos + RAND_FLOAT_CENTERED(2000.0f); + sCoGrangaWork[GRANGA_TARGET_X] = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(2000.0f); + sCoGrangaWork[GRANGA_TARGET_Y] = gPlayer[0].pos.y; + sCoGrangaWork[GRANGA_TARGET_Z] = gPlayer[0].trueZpos + RAND_FLOAT_CENTERED(2000.0f); } this->fwork[GRANGA_FWK_12] += 0.05f; - if (this->state == GRANGA_STATE_6) { + if (this->state == GRANGA_FALL_TO_RIGHT) { this->obj.rot.z += this->fwork[GRANGA_FWK_12]; if (this->obj.rot.z > 60.0f) { this->obj.rot.z = 60.0f; @@ -937,7 +935,7 @@ void Corneria_Granga_Update(Granga* this) { } } this->obj.rot.x = this->obj.rot.z; - } else { // (this->state == GRANGA_STATE_5) + } else { // (this->state == GRANGA_FALL_TO_LEFT) this->obj.rot.z -= this->fwork[GRANGA_FWK_12]; if (this->obj.rot.z < -60.0f) { this->obj.rot.z = -60.0f; @@ -958,9 +956,9 @@ void Corneria_Granga_Update(Granga* this) { this->timer_050 = 60; - objId = Corneria_Granga_ChooseMissileTarget(this); + objId = Corneria_CoGranga_ChooseMissileTarget(this); if (objId != 0) { - Corneria_Boss_SpawnMissile(sCoGrangaWork[GRANGA_WORK_62], sCoGrangaWork[GRANGA_WORK_63], + Corneria_BossMissile_Spawn(sCoGrangaWork[GRANGA_WORK_62], sCoGrangaWork[GRANGA_WORK_63], sCoGrangaWork[GRANGA_WORK_64], 65.0f, 270.0f, 0.0f, 0, 0, objId); } } @@ -968,14 +966,14 @@ void Corneria_Granga_Update(Granga* this) { this->yOffset = SIN_DEG(this->obj.rot.z) * 30.0f; if ((gGameFrameCount % 16) == 0) { - this->unk_04C = RAND_INT(100.0f); + this->animFrame = RAND_INT(100.0f); } - Animation_GetFrameData(&D_CO_602BC18, this->unk_04C, frameTable); + Animation_GetFrameData(&aCoGrangaWalkingAnim, this->animFrame, frameTable); this->fwork[GRANGA_FWK_14] = 0.03f; break; - case GRANGA_STATE_7: + case GRANGA_EXPLODE: if (this->swork[GRANGA_SWK_32]) { this->fwork[GRANGA_FWK_12] += 0.05f; this->obj.rot.x += this->fwork[GRANGA_FWK_12]; @@ -1000,14 +998,14 @@ void Corneria_Granga_Update(Granga* this) { } } - func_effect_8007A568(sCoGrangaWork[GRANGA_WORK_62], sCoGrangaWork[GRANGA_WORK_63] - 100.0f, - sCoGrangaWork[GRANGA_WORK_64], 40.0f); + Effect_Effect383_Spawn(sCoGrangaWork[GRANGA_WORK_62], sCoGrangaWork[GRANGA_WORK_63] - 100.0f, + sCoGrangaWork[GRANGA_WORK_64], 40.0f); func_effect_8007D0E0(sCoGrangaWork[GRANGA_WORK_62], sCoGrangaWork[GRANGA_WORK_63] - 100.0f, sCoGrangaWork[GRANGA_WORK_64], 30.0f); func_enmy_80062B60(sCoGrangaWork[GRANGA_WORK_62], sCoGrangaWork[64], 0, 120.0f); gCameraShake = 25; - gShowBossHealth = 0; + gShowBossHealth = false; for (sp218 = 0; sp218 < 100; sp218++) { func_effect_80079618(sCoGrangaWork[GRANGA_WORK_62] + RAND_FLOAT_CENTERED(600.0f), @@ -1051,39 +1049,39 @@ void Corneria_Granga_Update(Granga* this) { if (this->timer_050 == 0) { Object_Kill(&this->obj, this->sfxSource); } - Animation_GetFrameData(&D_CO_602BC18, 0, frameTable); + Animation_GetFrameData(&aCoGrangaWalkingAnim, 0, frameTable); break; default: - Animation_GetFrameData(&D_CO_602C0D0, this->unk_04C, frameTable); + Animation_GetFrameData(&aCoGrangaStationaryAnim, this->animFrame, frameTable); break; } Math_SmoothStepToF(&this->vel.x, sp21C.x, 0.3f, 5.0f, 0.0f); Math_SmoothStepToF(&this->vel.z, sp21C.z, 0.3f, 5.0f, 0.0f); - Corneria_Granga_Attack(this); + Corneria_CoGranga_Attack(this); Math_SmoothStepToVec3fArray(frameTable, this->vwork, 1, 19, this->fwork[GRANGA_FWK_14], 100.0f, 0.0f); Math_SmoothStepToF(&this->fwork[GRANGA_FWK_14], 1.0f, 1.0f, 0.01f, 0.0f); - if (this->state < GRANGA_STATE_5) { + if (this->state < GRANGA_FALL_TO_LEFT) { if (((fabsf(this->obj.pos.x) > 4000.0f) || (fabsf(this->obj.pos.z) > 4000.0f)) && - (this->state != GRANGA_STATE_4)) { - this->state = GRANGA_STATE_4; + (this->state != GRANGA_FORWARD)) { + this->state = GRANGA_FORWARD; this->timer_050 = 150; sCoGrangaWork[GRANGA_WORK_66] = 0.0f; sCoGrangaWork[GRANGA_WORK_67] = 0.0f; this->swork[GRANGA_NEXT_STATE] = GRANGA_STATIONARY; } - if ((this->state != GRANGA_STATIONARY) && ((this->unk_04C == 0) || (this->unk_04C == 52))) { + if ((this->state != GRANGA_STATIONARY) && ((this->animFrame == 0) || (this->animFrame == 52))) { AUDIO_PLAY_SFX(NA_SE_EN_HEAVY_WALK, this->sfxSource, 4); } if (gPlayer[0].somersault && (this->state != GRANGA_STATIONARY)) { this->state = GRANGA_STATIONARY; - this->swork[GRANGA_NEXT_STATE] = GRANGA_STATE_1; + this->swork[GRANGA_NEXT_STATE] = GRANGA_FORWARD_MISSILE; this->timer_050 = 100; this->fwork[GRANGA_FWK_14] = 0.0f; } @@ -1091,8 +1089,8 @@ void Corneria_Granga_Update(Granga* this) { } } -bool Corneria_Granga_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { - Granga* boss = (Granga*) data; +bool Corneria_CoGranga_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { + CoGranga* boss = (CoGranga*) data; if (boss->swork[limbIndex] == DMG_DESTROYED) { *dList = NULL; @@ -1166,7 +1164,7 @@ bool Corneria_Granga_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Ve return false; } -void Corneria_Granga_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* data) { +void Corneria_CoGranga_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* data) { s32 pad; Vec3f sp80 = { 0.0f, 0.0f, 0.0f }; Vec3f sp74; @@ -1244,16 +1242,16 @@ void Corneria_Granga_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* data) { } } -void Corneria_Granga_Draw(Granga* this) { +void Corneria_CoGranga_Draw(CoGranga* this) { Matrix_Translate(gCalcMatrix, 0.0f, 700.0f, 0.0f, MTXF_APPLY); - Animation_DrawSkeleton(2, D_CO_602BE64, this->vwork, Corneria_Granga_OverrideLimbDraw, Corneria_Granga_PostLimbDraw, - this, gCalcMatrix); + Animation_DrawSkeleton(2, D_CO_602BE64, this->vwork, Corneria_CoGranga_OverrideLimbDraw, + Corneria_CoGranga_PostLimbDraw, this, gCalcMatrix); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); } -bool Corneria_Garuda_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { - Actor* actor = (Actor*) data; +bool Corneria_Garuda_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { + Actor* actor = (Actor*) thisx; if (limbIndex == 1) { rot->x += actor->fwork[GRANGA_FWK_01]; @@ -1264,7 +1262,7 @@ bool Corneria_Garuda_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Ve return false; } -s32 Corneria_Garuda_CheckCollision(CoGaruda1* this) { +s32 Corneria_CoGaruda1_CheckCollision(CoGaruda1* this) { s32 pad[2]; s32 i; s32 collision; @@ -1295,8 +1293,8 @@ void Corneria_Garuda_HandleDamage(Actor* this) { if (this->dmgPart == 0) { AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, this->sfxSource, 4); - func_effect_8007C120(this->obj.pos.x, this->obj.pos.y + 200.0f, this->obj.pos.z, this->vel.x, this->vel.y, - this->vel.z, 0.1f, 20); + Effect_Effect390_Spawn(this->obj.pos.x, this->obj.pos.y + 200.0f, this->obj.pos.z, this->vel.x, this->vel.y, + this->vel.z, 0.1f, 20); this->timer_0C6 = 15; this->health -= this->damage; @@ -1315,8 +1313,8 @@ void Corneria_Garuda_HandleDamage(Actor* this) { func_effect_8007D2C8(this->obj.pos.x + RAND_FLOAT_CENTERED(100.0f), this->obj.pos.y + 200.0f + RAND_FLOAT_CENTERED(100.0f), this->obj.pos.z + 50.0f + RAND_FLOAT(50.0f), 3.0f); - func_effect_8007C120(this->obj.pos.x, this->obj.pos.y + 200.0f, this->obj.pos.z, this->vel.x, this->vel.y, - this->vel.z, 0.1f, 10); + Effect_Effect390_Spawn(this->obj.pos.x, this->obj.pos.y + 200.0f, this->obj.pos.z, this->vel.x, this->vel.y, + this->vel.z, 0.1f, 10); } } @@ -1346,7 +1344,7 @@ void Corneria_CoGaruda1_Update(CoGaruda1* this) { this->fwork[0] = 10.0f; } - this->iwork[0] = Corneria_Garuda_CheckCollision(this); + this->iwork[0] = Corneria_CoGaruda1_CheckCollision(this); if (this->iwork[0] != 0) { this->state++; } @@ -1372,7 +1370,7 @@ void Corneria_CoGaruda1_Update(CoGaruda1* this) { } } -void Corneria_IBeam_Init(Actor* this) { +void Corneria_CoIBeam_Init(CoGaruda3* this) { s32 i; for (i = 0; i < ARRAY_COUNT(gScenery); i++) { @@ -1436,10 +1434,10 @@ void Corneria_CoGaruda2_Update(CoGaruda2* this) { } if (this->animFrame == (Animation_GetFrameCount(&D_CO_602AA04) - this->iwork[2])) { this->iwork[1] = 1; - scenery->state = 1; + scenery->state = 1; // I beam rotating src.x = 0.0f; src.y = 0.0f; - src.z = 30.0f; + src.z = 30.0f; // Ibeam flying towards the camera. Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); scenery->vel.x = dest.x; scenery->vel.y = dest.y; @@ -1523,8 +1521,8 @@ void Corneria_CoGarudaDestroy_Update(CoGarudaDestroy* this) { func_effect_8007D2C8(this->obj.pos.x + RAND_FLOAT_CENTERED(100.0f), this->obj.pos.y + 200.0f + RAND_FLOAT_CENTERED(100.0f), this->obj.pos.z + 50.0f + RAND_FLOAT(50.0f), 3.0f); - func_effect_8007C120(this->obj.pos.x, this->obj.pos.y + 200.0f, this->obj.pos.z, this->vel.x, - this->vel.y, this->vel.z, 0.1f, 10); + Effect_Effect390_Spawn(this->obj.pos.x, this->obj.pos.y + 200.0f, this->obj.pos.z, this->vel.x, + this->vel.y, this->vel.z, 0.1f, 10); AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_S, this->sfxSource, 4); } @@ -1550,16 +1548,16 @@ void Corneria_CoGarudaDestroy_Update(CoGarudaDestroy* this) { } if (this->timer_0BC == 8) { - func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y + 200.0f, this->obj.pos.z + 50.0f, 0.0f, 0.0f, - 0.0f, 5.0f, 30); + Effect386_Spawn1(this->obj.pos.x, this->obj.pos.y + 200.0f, this->obj.pos.z + 50.0f, 0.0f, 0.0f, 0.0f, + 5.0f, 30); AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, this->sfxSource, 4); } break; case 101: if ((this->timer_0BE != 0) && ((gGameFrameCount % 2) == 0)) { - func_effect_8007797C(this->obj.pos.x, this->obj.pos.y + 150.0f, this->obj.pos.z, 0.0f, 10.0f, 0.0f, - 3.0f); + Effect_FireSmoke_Spawn2(this->obj.pos.x, this->obj.pos.y + 150.0f, this->obj.pos.z, 0.0f, 10.0f, 0.0f, + 3.0f); } break; } @@ -1569,18 +1567,18 @@ void Corneria_CoGaruda1_Draw(CoGaruda1* this) { Animation_DrawSkeleton(3, aCoGarudaSkel, this->vwork, Corneria_Garuda_OverrideLimbDraw, NULL, this, gCalcMatrix); } -void Corneria_Garuda_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* data) { - Actor* actor = (Actor*) data; +void Corneria_Garuda_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { + Actor* this = (Actor*) thisx; Vec3f src = { 120.0f, 0.0f, 0.0f }; Vec3f dest; if (limbIndex == 1) { Matrix_MultVec3f(gCalcMatrix, &src, &dest); - actor->fwork[2] = dest.x; - actor->fwork[6] = dest.y; - actor->fwork[10] = dest.z; - if (actor->iwork[1] == 0) { - gScenery[actor->iwork[0]].obj.rot.x = -rot->y; + this->fwork[2] = dest.x; + this->fwork[6] = dest.y; + this->fwork[10] = dest.z; + if (this->iwork[1] == 0) { + gScenery[this->iwork[0]].obj.rot.x = -rot->y; } } } @@ -1594,17 +1592,17 @@ void Corneria_CoGaruda3_Draw(CoGaruda3* this) { Corneria_Garuda_PostLimbDraw, this, gCalcMatrix); } -bool Corneria_CoGarudaDestroy_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { - Actor* actor = (Actor*) data; +bool Corneria_CoGarudaDestroy_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { + CoGarudaDestroy* this = (CoGarudaDestroy*) thisx; - if ((actor->state == 101) && (limbIndex != 8)) { + if ((this->state == 101) && (limbIndex != 8)) { *dList = NULL; } return false; } -void Corneria_CoGarudaDestroy_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* data) { - CoGarudaDestroy* actor = (CoGarudaDestroy*) data; +void Corneria_CoGarudaDestroy_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { + CoGarudaDestroy* this = (CoGarudaDestroy*) thisx; Vec3f src = { 0.0f, 0.0f, 0.0f }; Vec3f dest; @@ -1612,27 +1610,27 @@ void Corneria_CoGarudaDestroy_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* data switch (limbIndex) { case 1: - actor->fwork[2] = dest.x; - actor->fwork[6] = dest.y; - actor->fwork[10] = dest.z; + this->fwork[2] = dest.x; + this->fwork[6] = dest.y; + this->fwork[10] = dest.z; break; case 2: - actor->fwork[3] = dest.x; - actor->fwork[7] = dest.y; - actor->fwork[11] = dest.z; + this->fwork[3] = dest.x; + this->fwork[7] = dest.y; + this->fwork[11] = dest.z; break; case 3: - actor->fwork[4] = dest.x; - actor->fwork[8] = dest.y; - actor->fwork[12] = dest.z; + this->fwork[4] = dest.x; + this->fwork[8] = dest.y; + this->fwork[12] = dest.z; break; case 4: - actor->fwork[5] = dest.x; - actor->fwork[9] = dest.y; - actor->fwork[13] = dest.z; + this->fwork[5] = dest.x; + this->fwork[9] = dest.y; + this->fwork[13] = dest.z; break; } } @@ -1642,19 +1640,19 @@ void Corneria_CoGarudaDestroy_Draw(CoGarudaDestroy* this) { Corneria_CoGarudaDestroy_PostLimbDraw, this, gCalcMatrix); } -void Corneria_Carrier_ChooseMissileTarget(Carrier* this, f32 xPos, f32 yPos, f32 zPos, f32 arg4, s32 arg5, - s32 eventType) { +void Corneria_CoCarrier_ChooseMissileTarget(CoCarrier* this, f32 xPos, f32 yPos, f32 zPos, f32 arg4, s32 arg5, + s32 eventType) { ObjectId objId = OBJ_MISSILE_SEEK_PLAYER; - if (Hud_MissileSeekModeCheck(0) < 4) { + if (ActorMissileSeek_ModeCheck(0) < 4) { objId = OBJ_MISSILE_SEEK_TEAM; } - Corneria_Boss_SpawnMissile(this->obj.pos.x + xPos, this->obj.pos.y + yPos, this->obj.pos.z + zPos, arg4, + Corneria_BossMissile_Spawn(this->obj.pos.x + xPos, this->obj.pos.y + yPos, this->obj.pos.z + zPos, arg4, this->obj.rot.x, this->obj.rot.y, arg5, eventType, objId); } -void Corneria_Carrier_Init(Carrier* this) { +void Corneria_CoCarrier_Init(CoCarrier* this) { s32 i; s16 timer; @@ -1670,9 +1668,9 @@ void Corneria_Carrier_Init(Carrier* this) { this->timer_05A = 30000; this->obj.pos.z = (gPlayer[0].cam.eye.z - gPathProgress) - 2000.0f; AUDIO_PLAY_SFX(NA_SE_A_CARRIER_ENGINE, this->sfxSource, 4); - D_i1_8019B6D0 = false; + sFightCarrier = false; } else { - D_i1_8019B6D0 = true; + sFightCarrier = true; this->obj.rot.y = 180.0f; this->fwork[6] = 800.0f; this->obj.pos.z = gPlayer[0].trueZpos + 2000.0f; @@ -1685,11 +1683,11 @@ void Corneria_Carrier_Init(Carrier* this) { timer = this->timer_05A; - // Bosses OBJ_BOSS_294 to OBJ_BOSS_296 - for (i = 1; i < ARRAY_COUNT(gBosses); i++) { + // OBJ_BOSS_CO_CARRIER_LEFT to OBJ_BOSS_CO_CARRIER_BOTTOM + for (i = CARRIER_LEFT; i < ARRAY_COUNT(gBosses); i++) { Boss_Initialize(&gBosses[i]); gBosses[i].obj.status = OBJ_INIT; - gBosses[i].obj.id = (i - 1) + OBJ_BOSS_294; + gBosses[i].obj.id = (i - 1) + OBJ_BOSS_CO_CARRIER_LEFT; gBosses[i].obj.pos.x = this->obj.pos.x; gBosses[i].obj.pos.y = this->obj.pos.y; gBosses[i].obj.pos.z = this->obj.pos.z; @@ -1697,15 +1695,15 @@ void Corneria_Carrier_Init(Carrier* this) { gBosses[i].drawShadow = true; gBosses[i].timer_05A = timer; Object_SetInfo(&gBosses[i].info, gBosses[i].obj.id); - gBosses[CARRIER_3].drawShadow = false; + gBosses[CARRIER_BOTTOM].drawShadow = false; } } -void Corneria_8018C0B0(Boss* this) { - func_effect_8007D9DC(this->obj.pos.x, gGroundHeight + 2.0f, this->obj.pos.z, 5.0f, 100.0f, 0); - func_effect_8007D9DC(this->obj.pos.x, gGroundHeight + 2.0f, this->obj.pos.z, 5.0f, 100.0f, 5); - func_effect_8007D9DC(this->obj.pos.x, gGroundHeight + 2.0f, this->obj.pos.z, 5.0f, 100.0f, 10); - func_effect_8007ADF4(this->obj.pos.x, gGroundHeight, this->obj.pos.z, 1.0f, 10.0f); +void Corneria_CoCarrier_WaterSplash(CoCarrier* this) { + Effect_Effect367_Spawn(this->obj.pos.x, gGroundHeight + 2.0f, this->obj.pos.z, 5.0f, 100.0f, 0); + Effect_Effect367_Spawn(this->obj.pos.x, gGroundHeight + 2.0f, this->obj.pos.z, 5.0f, 100.0f, 5); + Effect_Effect367_Spawn(this->obj.pos.x, gGroundHeight + 2.0f, this->obj.pos.z, 5.0f, 100.0f, 10); + Effect_Effect372_Spawn2(this->obj.pos.x, gGroundHeight, this->obj.pos.z, 1.0f, 10.0f); } static Vec3f D_i1_801998CC = { 442.0f, 5.0f, 360.0f }; @@ -1734,7 +1732,7 @@ static Vec3f D_i1_8019995C[20] = { static s32 D_i1_80199A4C[4] = { 150, 200, 150, 200 }; static f32 D_i1_80199A5C[4] = { -225.0f, 0.0f, 225.0f, 0.0f }; -void Corneria_Carrier_Update(Carrier* this) { +void Corneria_CoCarrier_Update(CoCarrier* this) { Vec3f sp84[33]; Vec3f src; Vec3f dest; @@ -1754,7 +1752,7 @@ void Corneria_Carrier_Update(Carrier* this) { Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); - if (!D_i1_8019B6D0) { + if (!sFightCarrier) { if (this->obj.pos.x > 6000.0f) { Object_Kill(&this->obj, this->sfxSource); for (i = 1; i < ARRAY_COUNT(gBosses); i++) { @@ -1779,12 +1777,12 @@ void Corneria_Carrier_Update(Carrier* this) { Matrix_MultVec3f(gCalcMatrix, &D_i1_80199914[0], &sp84[6]); Matrix_MultVec3f(gCalcMatrix, &D_i1_80199914[1], &sp84[7]); Matrix_MultVec3f(gCalcMatrix, &D_i1_8019992C, &sp84[8]); - func_effect_8007BC7C(sp84[6].x + this->obj.pos.x, sp84[6].y + this->obj.pos.y, sp84[6].z + this->obj.pos.z, - 20.0f); - func_effect_8007BC7C(sp84[7].x + this->obj.pos.x, sp84[7].y + this->obj.pos.y, sp84[7].z + this->obj.pos.z, - 10.0f); - func_effect_8007BC7C(sp84[8].x + this->obj.pos.x, sp84[8].y + this->obj.pos.y, sp84[8].z + this->obj.pos.z, - 10.0f); + Effect_Effect362_Spawn(sp84[6].x + this->obj.pos.x, sp84[6].y + this->obj.pos.y, + sp84[6].z + this->obj.pos.z, 20.0f); + Effect_Effect362_Spawn(sp84[7].x + this->obj.pos.x, sp84[7].y + this->obj.pos.y, + sp84[7].z + this->obj.pos.z, 10.0f); + Effect_Effect362_Spawn(sp84[8].x + this->obj.pos.x, sp84[8].y + this->obj.pos.y, + sp84[8].z + this->obj.pos.z, 10.0f); } } else { if ((gBossFrameCount > 380) && (gBossFrameCount < 430)) { @@ -1812,15 +1810,16 @@ void Corneria_Carrier_Update(Carrier* this) { Matrix_MultVec3f(gCalcMatrix, &D_i1_8019995C[j], &sp84[k]); func_effect_8007D0E0(sp84[k].x + this->obj.pos.x, sp84[k].y + this->obj.pos.y, sp84[k].z + this->obj.pos.z, this->fwork[17]); - func_effect_8007C120(sp84[k].x + this->obj.pos.x, sp84[k].y + this->obj.pos.y, - sp84[k].z + this->obj.pos.z, this->vel.x, this->vel.y, this->vel.z, 0.1f, 7); + Effect_Effect390_Spawn(sp84[k].x + this->obj.pos.x, sp84[k].y + this->obj.pos.y, + sp84[k].z + this->obj.pos.z, this->vel.x, this->vel.y, this->vel.z, 0.1f, 7); } } } if (this->dmgType != DMG_NONE) { this->dmgType = DMG_NONE; - if ((gBosses[CARRIER_1].state != 0) && (gBosses[CARRIER_2].state != 0) && (gBosses[CARRIER_3].state != 0)) { + if ((gBosses[CARRIER_LEFT].state != 0) && (gBosses[CARRIER_UPPER].state != 0) && + (gBosses[CARRIER_BOTTOM].state != 0)) { if (this->health >= 2) { this->timer_05C = 15; this->health -= this->damage; @@ -1863,32 +1862,33 @@ void Corneria_Carrier_Update(Carrier* this) { } } - if ((gBosses[CARRIER_1].state != 0) && ((gGameFrameCount % 16) == 0)) { + if ((gBosses[CARRIER_LEFT].state != 0) && ((gGameFrameCount % 16) == 0)) { Matrix_MultVec3f(gCalcMatrix, &D_i1_80199908, &sp84[5]); - func_effect_8007D0E0(gBosses[CARRIER_0].obj.pos.x + sp84[5].x, gBosses[CARRIER_0].obj.pos.y + sp84[5].y, - gBosses[CARRIER_0].obj.pos.z + sp84[5].z, 5.0f); + func_effect_8007D0E0(gBosses[CARRIER].obj.pos.x + sp84[5].x, gBosses[CARRIER].obj.pos.y + sp84[5].y, + gBosses[CARRIER].obj.pos.z + sp84[5].z, 5.0f); } - if (gBosses[CARRIER_2].state != 0) { - gBosses[CARRIER_3].drawShadow = true; - if (gBosses[CARRIER_3].state != 0) { + if (gBosses[CARRIER_UPPER].state != 0) { + gBosses[CARRIER_BOTTOM].drawShadow = true; + if (gBosses[CARRIER_BOTTOM].state != 0) { if ((gGameFrameCount % 8) == 0) { Matrix_MultVec3f(gCalcMatrix, &D_i1_80199950, &sp84[11]); - func_effect_8007D0E0(gBosses[CARRIER_0].obj.pos.x + sp84[11].x, - gBosses[CARRIER_0].obj.pos.y + sp84[11].y, - gBosses[CARRIER_0].obj.pos.z + sp84[11].z, 7.0f); + func_effect_8007D0E0(gBosses[CARRIER].obj.pos.x + sp84[11].x, + gBosses[CARRIER].obj.pos.y + sp84[11].y, + gBosses[CARRIER].obj.pos.z + sp84[11].z, 7.0f); } } else if ((gGameFrameCount % 16) == 0) { Matrix_MultVec3f(gCalcMatrix, &D_i1_80199938, &sp84[9]); - func_effect_8007D0E0(gBosses[CARRIER_0].obj.pos.x + sp84[9].x, gBosses[CARRIER_0].obj.pos.y + sp84[9].y, - gBosses[CARRIER_0].obj.pos.z + sp84[9].z, 5.0f); + func_effect_8007D0E0(gBosses[CARRIER].obj.pos.x + sp84[9].x, gBosses[CARRIER].obj.pos.y + sp84[9].y, + gBosses[CARRIER].obj.pos.z + sp84[9].z, 5.0f); } } - if ((gBosses[CARRIER_3].state != 0) && (gBosses[CARRIER_2].state == 0) && ((gGameFrameCount % 16) == 0)) { + if ((gBosses[CARRIER_BOTTOM].state != 0) && (gBosses[CARRIER_UPPER].state == 0) && + ((gGameFrameCount % 16) == 0)) { Matrix_MultVec3f(gCalcMatrix, &D_i1_80199944, &sp84[10]); - func_effect_8007D0E0(gBosses[CARRIER_0].obj.pos.x + sp84[10].x, gBosses[CARRIER_0].obj.pos.y + sp84[10].y, - gBosses[CARRIER_0].obj.pos.z + sp84[10].z, 5.0f); + func_effect_8007D0E0(gBosses[CARRIER].obj.pos.x + sp84[10].x, gBosses[CARRIER].obj.pos.y + sp84[10].y, + gBosses[CARRIER].obj.pos.z + sp84[10].z, 5.0f); } if (((this->state == 1) || (this->state == 2)) && ((gGameFrameCount % 8) == 0)) { @@ -1896,12 +1896,12 @@ void Corneria_Carrier_Update(Carrier* this) { Matrix_MultVec3f(gCalcMatrix, &D_i1_80199914[1], &sp84[7]); Matrix_MultVec3f(gCalcMatrix, &D_i1_8019992C, &sp84[8]); - func_effect_8007BC7C(sp84[6].x + this->obj.pos.x, sp84[6].y + this->obj.pos.y, sp84[6].z + this->obj.pos.z, - 20.0f); - func_effect_8007BC7C(sp84[7].x + this->obj.pos.x, sp84[7].y + this->obj.pos.y, sp84[7].z + this->obj.pos.z, - 10.0f); - func_effect_8007BC7C(sp84[8].x + this->obj.pos.x, sp84[8].y + this->obj.pos.y, sp84[8].z + this->obj.pos.z, - 10.0f); + Effect_Effect362_Spawn(sp84[6].x + this->obj.pos.x, sp84[6].y + this->obj.pos.y, + sp84[6].z + this->obj.pos.z, 20.0f); + Effect_Effect362_Spawn(sp84[7].x + this->obj.pos.x, sp84[7].y + this->obj.pos.y, + sp84[7].z + this->obj.pos.z, 10.0f); + Effect_Effect362_Spawn(sp84[8].x + this->obj.pos.x, sp84[8].y + this->obj.pos.y, + sp84[8].z + this->obj.pos.z, 10.0f); } if (this->timer_052 != 0) { @@ -1909,7 +1909,7 @@ void Corneria_Carrier_Update(Carrier* this) { } switch (this->state) { - case 0: + case CARRIER_STATE_0: this->fwork[3] = gPlayer[0].trueZpos + 1500.0f; if (this->timer_050 == 350) { @@ -1936,7 +1936,7 @@ void Corneria_Carrier_Update(Carrier* this) { } break; - case 1: + case CARRIER_STATE_1: if (this->timer_050 == 0) { this->state = 2; this->fwork[8] = 0.0f; @@ -1945,7 +1945,7 @@ void Corneria_Carrier_Update(Carrier* this) { } break; - case 2: + case CARRIER_STATE_2: if (this->timer_050 == 0) { this->state = 3; this->swork[0] = 4; @@ -1957,7 +1957,7 @@ void Corneria_Carrier_Update(Carrier* this) { } break; - case 3: + case CARRIER_STATE_3: this->fwork[12] = 1.5f; this->fwork[11] = 0.0f; this->fwork[9] = 0.0f; @@ -1972,21 +1972,22 @@ void Corneria_Carrier_Update(Carrier* this) { } break; - case 4: + case CARRIER_STATE_4: this->fwork[11] = 120.0f; this->fwork[13] = 340.0f; - if ((this->timer_050 == 0) || (gBosses[CARRIER_1].state != 0)) { + if ((this->timer_050 == 0) || (gBosses[CARRIER_LEFT].state != 0)) { this->state = 3; this->swork[0] = 5; this->timer_050 = 20; this->fwork[8] = 0.0f; - if (gBosses[CARRIER_1].state == 0) { + if (gBosses[CARRIER_LEFT].state == 0) { AUDIO_PLAY_SFX(NA_SE_EN_HATCH, this->sfxSource, 4); } - if ((this->swork[5] == 0) && ((gBosses[CARRIER_2].state == 0) || (gBosses[CARRIER_3].state == 0))) { + if ((this->swork[5] == 0) && + ((gBosses[CARRIER_UPPER].state == 0) || (gBosses[CARRIER_BOTTOM].state == 0))) { Radio_PlayMessage(gMsg_ID_2292, RCID_BOSS_CORNERIA2); } @@ -1995,30 +1996,31 @@ void Corneria_Carrier_Update(Carrier* this) { } else if ((this->fwork[2] > 60.0f) && (this->timer_054 == 0)) { this->timer_054 = 20; - Corneria_Carrier_ChooseMissileTarget(this, sp84[0].x, sp84[0].y, sp84[0].z, 30.0f, 0, 1); + Corneria_CoCarrier_ChooseMissileTarget(this, sp84[0].x, sp84[0].y, sp84[0].z, 30.0f, 0, 1); } break; - case 5: + case CARRIER_STATE_5: this->fwork[9] = 120.0f; this->fwork[10] = 120.0f; this->fwork[13] = 20.0f; - if ((this->fwork[0] > 60.0f) && (gBosses[CARRIER_2].state == 0) && (this->swork[1] == 0)) { - Corneria_Carrier_ChooseMissileTarget(this, sp84[1].x, sp84[1].y + 50.0f, sp84[1].z, 45.0f, 0, 0); + if ((this->fwork[0] > 60.0f) && (gBosses[CARRIER_UPPER].state == 0) && (this->swork[1] == 0)) { + Corneria_CoCarrier_ChooseMissileTarget(this, sp84[1].x, sp84[1].y + 50.0f, sp84[1].z, 45.0f, 0, 0); AUDIO_PLAY_SFX(NA_SE_EN_BARREL_SHOT, this->sfxSource, 4); - Corneria_Carrier_ChooseMissileTarget(this, sp84[1].x, sp84[1].y - 50.0f, sp84[1].z, 40.0f, 0, 0); + Corneria_CoCarrier_ChooseMissileTarget(this, sp84[1].x, sp84[1].y - 50.0f, sp84[1].z, 40.0f, 0, 0); this->swork[1] = 1; } - if ((this->fwork[1] > 60.0f) && (gBosses[CARRIER_3].state == 0) && (this->swork[2] == 0)) { - Corneria_Carrier_ChooseMissileTarget(this, sp84[2].x, sp84[2].y + 50.0f, sp84[2].z, 35.0f, 0, 0); + if ((this->fwork[1] > 60.0f) && (gBosses[CARRIER_BOTTOM].state == 0) && (this->swork[2] == 0)) { + Corneria_CoCarrier_ChooseMissileTarget(this, sp84[2].x, sp84[2].y + 50.0f, sp84[2].z, 35.0f, 0, 0); AUDIO_PLAY_SFX(NA_SE_EN_BARREL_SHOT, this->sfxSource, 4); - Corneria_Carrier_ChooseMissileTarget(this, sp84[2].x, sp84[2].y - 50.0f, sp84[2].z, 30.0f, 0, 0); + Corneria_CoCarrier_ChooseMissileTarget(this, sp84[2].x, sp84[2].y - 50.0f, sp84[2].z, 30.0f, 0, 0); this->swork[2] = 1; } - if ((this->timer_050 == 0) || ((gBosses[CARRIER_3].state != 0) && (gBosses[CARRIER_2].state != 0))) { + if ((this->timer_050 == 0) || + ((gBosses[CARRIER_BOTTOM].state != 0) && (gBosses[CARRIER_UPPER].state != 0))) { this->state = 3; this->swork[0] = 4; this->timer_050 = 70; @@ -2026,13 +2028,13 @@ void Corneria_Carrier_Update(Carrier* this) { this->swork[2] = 0; this->fwork[8] = 0.0f; - if ((this->swork[4] == 0) && (gBosses[CARRIER_1].state == 0)) { + if ((this->swork[4] == 0) && (gBosses[CARRIER_LEFT].state == 0)) { Radio_PlayMessage(gMsg_ID_2291, RCID_BOSS_CORNERIA2); } if ((this->swork[4] == 2) && (this->swork[7] == 0) && - ((gBosses[CARRIER_3].state == 0) || (gBosses[CARRIER_2].state == 0) || - (gBosses[CARRIER_1].state == 0))) { + ((gBosses[CARRIER_BOTTOM].state == 0) || (gBosses[CARRIER_UPPER].state == 0) || + (gBosses[CARRIER_LEFT].state == 0))) { Radio_PlayMessage(gMsg_ID_2299, RCID_PEPPY); this->swork[7]++; } @@ -2040,13 +2042,13 @@ void Corneria_Carrier_Update(Carrier* this) { this->swork[4]++; this->swork[4] &= 3; - if ((gBosses[CARRIER_3].state == 0) && (gBosses[CARRIER_2].state == 0)) { + if ((gBosses[CARRIER_BOTTOM].state == 0) && (gBosses[CARRIER_UPPER].state == 0)) { AUDIO_PLAY_SFX(NA_SE_EN_HATCH, this->sfxSource, 4); } } break; - case 6: + case CARRIER_STATE_6: Math_SmoothStepToAngle(&this->obj.rot.y, this->fwork[13], 0.1f, 5.0f, 0.01f); Math_SmoothStepToAngle(&this->obj.rot.z, this->fwork[14], 0.1f, 5.0f, 0.01f); @@ -2058,7 +2060,7 @@ void Corneria_Carrier_Update(Carrier* this) { } break; - case 7: + case CARRIER_STATE_7: this->fwork[3] = (gPlayer[0].cam.eye.z - gPathProgress) - 4000.0f; Math_SmoothStepToF(&this->obj.pos.z, this->fwork[3], 0.1f, 15.0f, 0.00001f); @@ -2089,7 +2091,6 @@ void Corneria_Carrier_Update(Carrier* this) { if ((gGameFrameCount % 8) == 0) { if (fabsf(this->obj.pos.z - gPlayer[0].trueZpos) > 700.0f) { - Matrix_MultVec3f(gCalcMatrix, &D_i1_801998F0[0], &sp84[3]); for (effect398 = &gEffects[0], i = 0; i < ARRAY_COUNT(gEffects); i++, effect398++) { @@ -2160,7 +2161,7 @@ void Corneria_Carrier_Update(Carrier* this) { } break; - case 8: + case CARRIER_STATE_8: D_ctx_801779A8[0] = 20.0f; if ((gGameFrameCount % 32) == 0) { @@ -2218,7 +2219,7 @@ void Corneria_Carrier_Update(Carrier* this) { } break; - case 9: + case CARRIER_STATE_9: if ((gGameFrameCount % 16) == 0) { for (i = 0; i < 10; i++) { func_effect_80079618(RAND_FLOAT_CENTERED(300.0f) + this->obj.pos.x, this->obj.pos.y, @@ -2239,12 +2240,12 @@ void Corneria_Carrier_Update(Carrier* this) { this->vel.y = -10.0f; this->gravity = 0.0f; this->fwork[17] = 20.0f; - Corneria_8018C0B0(this); + Corneria_CoCarrier_WaterSplash(this); this->state = 10; } break; - case 10: + case CARRIER_EXPLODE: if ((gGameFrameCount % 8) == 0) { for (i = 0; i < 10; i++) { func_effect_80079618(RAND_FLOAT_CENTERED(300.0f) + this->obj.pos.x, this->obj.pos.y, @@ -2253,14 +2254,14 @@ void Corneria_Carrier_Update(Carrier* this) { } if (this->timer_050 == 0) { - func_effect_8007A568(this->obj.pos.x, this->obj.pos.y + 500.0f, this->obj.pos.z, 120.0f); + Effect_Effect383_Spawn(this->obj.pos.x, this->obj.pos.y + 500.0f, this->obj.pos.z, 120.0f); Object_Kill(&this->obj, this->sfxSource); } break; } - temp_a0 = SEGMENTED_TO_VIRTUAL(D_CO_603E748); - temp_a1 = SEGMENTED_TO_VIRTUAL(D_CO_603E7C4); + temp_a0 = SEGMENTED_TO_VIRTUAL(aCoCarrierUpperHitbox); + temp_a1 = SEGMENTED_TO_VIRTUAL(aCoCarrierBottomHitbox); temp_a0[9] = -100000.0f; temp_a0[3] = 172.0f; temp_a1[9] = -100000.0f; @@ -2304,7 +2305,7 @@ void Corneria_Carrier_Update(Carrier* this) { static Vec3f D_i1_80199A6C = { -270.0f, 0.0f, 200.0f }; static Vec3f D_i1_80199A78 = { 440.0f, 0.0f, 0.0f }; -void Corneria_Boss294_Update(Boss294* this) { +void Corneria_CarrierLeft_Update(CoCarrierLeft* this) { Vec3f sp4C; Vec3f sp40; s32 i; @@ -2319,9 +2320,10 @@ void Corneria_Boss294_Update(Boss294* this) { this->timer_05C = 15; this->health -= this->damage; AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, this->sfxSource, 4); + if (this->health <= 0) { - gBosses[CARRIER_0].swork[8]--; - if (gBosses[CARRIER_0].swork[8] != 0) { + gBosses[CARRIER].swork[8]--; + if (gBosses[CARRIER].swork[8] != 0) { Radio_PlayMessage(gMsg_ID_15130, RCID_FALCO); } else { Radio_PlayMessage(gMsg_ID_7085, RCID_FALCO); @@ -2329,15 +2331,15 @@ void Corneria_Boss294_Update(Boss294* this) { this->info.cullDistance = 300.0f; - gBosses[CARRIER_0].fwork[14] = 25.0f; - gBosses[CARRIER_0].fwork[15] = 0.0f; + gBosses[CARRIER].fwork[14] = 25.0f; + gBosses[CARRIER].fwork[15] = 0.0f; AUDIO_PLAY_SFX(NA_SE_EN_PARTS_BROKEN, this->sfxSource, 4); - if (gBosses[CARRIER_0].swork[10] != 0) { - gBosses[CARRIER_0].swork[10]--; + if (gBosses[CARRIER].swork[10] != 0) { + gBosses[CARRIER].swork[10]--; } - gBosses[CARRIER_0].timer_056 = 30; + gBosses[CARRIER].timer_056 = 30; this->state = 1; Matrix_MultVec3f(gCalcMatrix, &D_i1_80199A6C, &sp4C); @@ -2346,8 +2348,8 @@ void Corneria_Boss294_Update(Boss294* this) { this->obj.pos.z + sp4C.z, 1.0f); } - if ((gBosses[CARRIER_2].state == 1) && (gBosses[CARRIER_3].state == 1)) { - gBosses[CARRIER_0].fwork[14] = 335.0f; + if ((gBosses[CARRIER_UPPER].state == 1) && (gBosses[CARRIER_BOTTOM].state == 1)) { + gBosses[CARRIER].fwork[14] = 335.0f; } } } @@ -2356,9 +2358,9 @@ void Corneria_Boss294_Update(Boss294* this) { AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } } - this->obj.rot.x = gBosses[CARRIER_0].obj.rot.x; - this->obj.rot.y = gBosses[CARRIER_0].obj.rot.y; - this->obj.rot.z = gBosses[CARRIER_0].obj.rot.z; + this->obj.rot.x = gBosses[CARRIER].obj.rot.x; + this->obj.rot.y = gBosses[CARRIER].obj.rot.y; + this->obj.rot.z = gBosses[CARRIER].obj.rot.z; Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); @@ -2366,16 +2368,16 @@ void Corneria_Boss294_Update(Boss294* this) { Matrix_MultVec3f(gCalcMatrix, &D_i1_80199A78, &sp40); - this->obj.pos.x = gBosses[CARRIER_0].obj.pos.x + sp40.x; - this->obj.pos.y = gBosses[CARRIER_0].obj.pos.y + sp40.y; - this->obj.pos.z = gBosses[CARRIER_0].obj.pos.z + sp40.z; + this->obj.pos.x = gBosses[CARRIER].obj.pos.x + sp40.x; + this->obj.pos.y = gBosses[CARRIER].obj.pos.y + sp40.y; + this->obj.pos.z = gBosses[CARRIER].obj.pos.z + sp40.z; - this->fwork[2] = gBosses[CARRIER_0].fwork[2]; + this->fwork[2] = gBosses[CARRIER].fwork[2]; break; case 1: Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_NEW); - gBosses[CARRIER_0].fwork[15] += 0.5f; + gBosses[CARRIER].fwork[15] += 0.5f; if (((gGameFrameCount % 8) == 0) && (Rand_ZeroOne() < 0.5f)) { this->timer_05C = 4; @@ -2383,8 +2385,8 @@ void Corneria_Boss294_Update(Boss294* this) { if ((gGameFrameCount % 2) == 0) { Matrix_MultVec3f(gCalcMatrix, &D_i1_80199A6C, &sp4C); - func_effect_8007C120(this->obj.pos.x + sp4C.x, this->obj.pos.y + sp4C.y, this->obj.pos.z + sp4C.z, - this->vel.x, this->vel.y, this->vel.z, 0.2f, 10); + Effect_Effect390_Spawn(this->obj.pos.x + sp4C.x, this->obj.pos.y + sp4C.y, this->obj.pos.z + sp4C.z, + this->vel.x, this->vel.y, this->vel.z, 0.2f, 10); } if (this->obj.pos.y < (gGroundHeight + 150.0f)) { @@ -2392,7 +2394,7 @@ void Corneria_Boss294_Update(Boss294* this) { this->vel.y = -5.0f; this->swork[0] = 1; this->gravity = 0.0f; - Corneria_8018C0B0(this); + Corneria_CoCarrier_WaterSplash(this); AUDIO_PLAY_SFX(NA_SE_OB_WATER_BOUND_M, this->sfxSource, 4); } } else { @@ -2406,7 +2408,7 @@ void Corneria_Boss294_Update(Boss294* this) { static Vec3f D_i1_80199A84 = { 20.0f, -90.0f, 0.0f }; static Vec3f D_i1_80199A90 = { -440.0f, 210.0f, 0.0f }; -void Corneria_Boss295_Update(Boss295* this) { +void Corneria_CarrierUpper_Update(CoCarrierUpper* this) { Vec3f sp4C; Vec3f sp40; s32 i; @@ -2424,9 +2426,9 @@ void Corneria_Boss295_Update(Boss295* this) { AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, this->sfxSource, 4); if (this->health <= 0) { - gBosses[CARRIER_0].swork[8]--; + gBosses[CARRIER].swork[8]--; - if (gBosses[CARRIER_0].swork[8] != 0) { + if (gBosses[CARRIER].swork[8] != 0) { Radio_PlayMessage(gMsg_ID_15130, RCID_FALCO); } else { Radio_PlayMessage(gMsg_ID_7085, RCID_FALCO); @@ -2434,17 +2436,17 @@ void Corneria_Boss295_Update(Boss295* this) { this->info.cullDistance = 300.0f; - gBosses[CARRIER_0].fwork[15] = 0.0f; - gBosses[CARRIER_0].fwork[14] = 335.0f; + gBosses[CARRIER].fwork[15] = 0.0f; + gBosses[CARRIER].fwork[14] = 335.0f; this->health = 0; AUDIO_PLAY_SFX(NA_SE_EN_PARTS_BROKEN, this->sfxSource, 4); - if (gBosses[CARRIER_0].swork[10] != 0) { - gBosses[CARRIER_0].swork[10]--; + if (gBosses[CARRIER].swork[10] != 0) { + gBosses[CARRIER].swork[10]--; } - gBosses[CARRIER_0].timer_056 = 30; + gBosses[CARRIER].timer_056 = 30; this->state = 1; Matrix_MultVec3f(gCalcMatrix, &D_i1_80199A84, &sp4C); @@ -2454,8 +2456,8 @@ void Corneria_Boss295_Update(Boss295* this) { this->obj.pos.z + sp4C.z, 1.0f); } - if (gBosses[CARRIER_1].state == 1) { - gBosses[CARRIER_0].fwork[14] = 25.0f; + if (gBosses[CARRIER_LEFT].state == 1) { + gBosses[CARRIER].fwork[14] = 25.0f; } } } @@ -2464,9 +2466,9 @@ void Corneria_Boss295_Update(Boss295* this) { AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } } - this->obj.rot.x = gBosses[CARRIER_0].obj.rot.x; - this->obj.rot.y = gBosses[CARRIER_0].obj.rot.y; - this->obj.rot.z = gBosses[CARRIER_0].obj.rot.z; + this->obj.rot.x = gBosses[CARRIER].obj.rot.x; + this->obj.rot.y = gBosses[CARRIER].obj.rot.y; + this->obj.rot.z = gBosses[CARRIER].obj.rot.z; Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); @@ -2474,16 +2476,16 @@ void Corneria_Boss295_Update(Boss295* this) { Matrix_MultVec3f(gCalcMatrix, &D_i1_80199A90, &sp40); - this->obj.pos.x = gBosses[CARRIER_0].obj.pos.x + sp40.x; - this->obj.pos.y = gBosses[CARRIER_0].obj.pos.y + sp40.y; - this->obj.pos.z = gBosses[CARRIER_0].obj.pos.z + sp40.z; + this->obj.pos.x = gBosses[CARRIER].obj.pos.x + sp40.x; + this->obj.pos.y = gBosses[CARRIER].obj.pos.y + sp40.y; + this->obj.pos.z = gBosses[CARRIER].obj.pos.z + sp40.z; - this->fwork[0] = gBosses[CARRIER_0].fwork[0]; + this->fwork[0] = gBosses[CARRIER].fwork[0]; break; case 1: Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_NEW); - gBosses[CARRIER_0].fwork[15] += 0.5f; + gBosses[CARRIER].fwork[15] += 0.5f; if (((gGameFrameCount % 8) == 0) && (Rand_ZeroOne() < 0.5f)) { this->timer_05C = 4; @@ -2491,8 +2493,8 @@ void Corneria_Boss295_Update(Boss295* this) { if ((gGameFrameCount % 2) == 0) { Matrix_MultVec3f(gCalcMatrix, &D_i1_80199A84, &sp4C); - func_effect_8007C120(this->obj.pos.x + sp4C.x, this->obj.pos.y + sp4C.y, this->obj.pos.z + sp4C.z, - this->vel.x, this->vel.y, this->vel.z, 0.2f, 10); + Effect_Effect390_Spawn(this->obj.pos.x + sp4C.x, this->obj.pos.y + sp4C.y, this->obj.pos.z + sp4C.z, + this->vel.x, this->vel.y, this->vel.z, 0.2f, 10); } if (this->obj.pos.y < (gGroundHeight + 150.0f)) { @@ -2500,7 +2502,7 @@ void Corneria_Boss295_Update(Boss295* this) { this->vel.y = -5.0f; this->swork[0] = 1; this->gravity = 0.0f; - Corneria_8018C0B0(this); + Corneria_CoCarrier_WaterSplash(this); AUDIO_PLAY_SFX(NA_SE_OB_WATER_BOUND_M, this->sfxSource, 4); } } else { @@ -2514,7 +2516,7 @@ void Corneria_Boss295_Update(Boss295* this) { static Vec3f D_i1_80199A9C = { 20.0f, 90.0f, 0.0f }; static Vec3f D_i1_80199AA8 = { -440.0f, -210.0f, 0.0f }; -void Corneria_Boss296_Update(Boss296* this) { +void Corneria_CarrierBottom_Update(CoCarrierBottom* this) { Vec3f sp4C; Vec3f sp40; s32 i; @@ -2532,8 +2534,8 @@ void Corneria_Boss296_Update(Boss296* this) { AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, this->sfxSource, 4); if (this->health <= 0) { - gBosses[CARRIER_0].swork[8]--; - if (gBosses[CARRIER_0].swork[8] != 0) { + gBosses[CARRIER].swork[8]--; + if (gBosses[CARRIER].swork[8] != 0) { Radio_PlayMessage(gMsg_ID_15130, RCID_FALCO); } else { Radio_PlayMessage(gMsg_ID_7085, RCID_FALCO); @@ -2541,20 +2543,20 @@ void Corneria_Boss296_Update(Boss296* this) { this->info.cullDistance = 300.0f; - gBosses[CARRIER_0].fwork[15] = 0.0f; - gBosses[CARRIER_0].fwork[14] = 335.0f; + gBosses[CARRIER].fwork[15] = 0.0f; + gBosses[CARRIER].fwork[14] = 335.0f; this->health = 0; AUDIO_PLAY_SFX(NA_SE_EN_PARTS_BROKEN, this->sfxSource, 4); - if (gBosses[CARRIER_0].swork[10] != 0) { - gBosses[CARRIER_0].swork[10]--; + if (gBosses[CARRIER].swork[10] != 0) { + gBosses[CARRIER].swork[10]--; } - gBosses[CARRIER_0].timer_056 = 30; + gBosses[CARRIER].timer_056 = 30; this->state = 1; - gBosses[CARRIER_0].fwork[6] = 500.0f; + gBosses[CARRIER].fwork[6] = 500.0f; Matrix_MultVec3f(gCalcMatrix, &D_i1_80199A9C, &sp4C); @@ -2563,8 +2565,8 @@ void Corneria_Boss296_Update(Boss296* this) { this->obj.pos.z + sp4C.z, 1.0f); } - if (gBosses[CARRIER_1].state == 1) { - gBosses[CARRIER_0].fwork[14] = 25.0f; + if (gBosses[CARRIER_LEFT].state == 1) { + gBosses[CARRIER].fwork[14] = 25.0f; } } } @@ -2573,9 +2575,9 @@ void Corneria_Boss296_Update(Boss296* this) { AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } } - this->obj.rot.x = gBosses[CARRIER_0].obj.rot.x; - this->obj.rot.y = gBosses[CARRIER_0].obj.rot.y; - this->obj.rot.z = gBosses[CARRIER_0].obj.rot.z; + this->obj.rot.x = gBosses[CARRIER].obj.rot.x; + this->obj.rot.y = gBosses[CARRIER].obj.rot.y; + this->obj.rot.z = gBosses[CARRIER].obj.rot.z; Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); @@ -2583,17 +2585,17 @@ void Corneria_Boss296_Update(Boss296* this) { Matrix_MultVec3f(gCalcMatrix, &D_i1_80199AA8, &sp40); - this->obj.pos.x = gBosses[CARRIER_0].obj.pos.x + sp40.x; - this->obj.pos.y = gBosses[CARRIER_0].obj.pos.y + sp40.y; - this->obj.pos.z = gBosses[CARRIER_0].obj.pos.z + sp40.z; + this->obj.pos.x = gBosses[CARRIER].obj.pos.x + sp40.x; + this->obj.pos.y = gBosses[CARRIER].obj.pos.y + sp40.y; + this->obj.pos.z = gBosses[CARRIER].obj.pos.z + sp40.z; - this->fwork[1] = gBosses[CARRIER_0].fwork[1]; + this->fwork[1] = gBosses[CARRIER].fwork[1]; break; case 1: Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_NEW); - gBosses[CARRIER_0].fwork[15] += 0.5f; + gBosses[CARRIER].fwork[15] += 0.5f; if (((gGameFrameCount % 8) == 0) && (Rand_ZeroOne() < 0.5f)) { this->timer_05C = 4; @@ -2601,8 +2603,8 @@ void Corneria_Boss296_Update(Boss296* this) { if ((gGameFrameCount % 2) == 0) { Matrix_MultVec3f(gCalcMatrix, &D_i1_80199A9C, &sp4C); - func_effect_8007C120(this->obj.pos.x + sp4C.x, this->obj.pos.y + sp4C.y, this->obj.pos.z + sp4C.z, - this->vel.x, this->vel.y, this->vel.z, 0.2f, 10); + Effect_Effect390_Spawn(this->obj.pos.x + sp4C.x, this->obj.pos.y + sp4C.y, this->obj.pos.z + sp4C.z, + this->vel.x, this->vel.y, this->vel.z, 0.2f, 10); } if (this->obj.pos.y < (gGroundHeight + 150.0f)) { @@ -2610,7 +2612,7 @@ void Corneria_Boss296_Update(Boss296* this) { this->vel.y = -5.0f; this->swork[0] = 1; this->gravity = 0.0f; - Corneria_8018C0B0(this); + Corneria_CoCarrier_WaterSplash(this); AUDIO_PLAY_SFX(NA_SE_OB_WATER_BOUND_M, this->sfxSource, 4); } } else { @@ -2621,8 +2623,8 @@ void Corneria_Boss296_Update(Boss296* this) { } } -bool Corneria_Carrier_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { - if ((limbIndex == 10) && (gBosses[CARRIER_2].state != 0) && (gBosses[CARRIER_3].state != 0)) { +bool Corneria_CoCarrier_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { + if ((limbIndex == 10) && (gBosses[CARRIER_UPPER].state != 0) && (gBosses[CARRIER_BOTTOM].state != 0)) { *dList = NULL; } if ((limbIndex != 12) && (limbIndex != 10)) { @@ -2631,15 +2633,15 @@ bool Corneria_Carrier_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, V return false; } -void Corneria_Carrier_Draw(Carrier* this) { - Animation_GetFrameData(&D_CO_602D400, 0, this->vwork); - Animation_DrawSkeleton(1, aCoCarrierSkel, this->vwork, Corneria_Carrier_OverrideLimbDraw, NULL, &this->index, +void Corneria_CoCarrier_Draw(CoCarrier* this) { + Animation_GetFrameData(&aCoCarrierAnim, 0, this->vwork); + Animation_DrawSkeleton(1, aCoCarrierSkel, this->vwork, Corneria_CoCarrier_OverrideLimbDraw, NULL, &this->index, &gIdentityMatrix); } -bool Corneria_Boss294_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { +bool Corneria_CoCarrierLeft_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* index) { if (limbIndex == 5) { - rot->y -= gBosses[*(s32*) data].fwork[2]; + rot->y -= gBosses[*(s32*) index].fwork[2]; } if ((limbIndex != 6) && (limbIndex != 5)) { *dList = NULL; @@ -2647,17 +2649,17 @@ bool Corneria_Boss294_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, V return false; } -void Corneria_Boss294_Draw(Boss294* this) { +void Corneria_CoCarrierLeft_Draw(CoCarrierLeft* this) { Matrix_Translate(gGfxMatrix, -D_i1_80199A78.x, -D_i1_80199A78.y, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - Animation_GetFrameData(&D_CO_602D400, 0, this->vwork); - Animation_DrawSkeleton(1, aCoCarrierSkel, this->vwork, Corneria_Boss294_OverrideLimbDraw, NULL, &this->index, + Animation_GetFrameData(&aCoCarrierAnim, 0, this->vwork); + Animation_DrawSkeleton(1, aCoCarrierSkel, this->vwork, Corneria_CoCarrierLeft_OverrideLimbDraw, NULL, &this->index, &gIdentityMatrix); } -bool Corneria_Boss295_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { +bool Corneria_CoCarrierUpper_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* index) { if (limbIndex == 1) { - rot->z -= gBosses[*(s32*) data].fwork[0]; + rot->z -= gBosses[*(s32*) index].fwork[0]; } if ((limbIndex != 1) && (limbIndex != 2)) { *dList = NULL; @@ -2665,17 +2667,17 @@ bool Corneria_Boss295_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, V return false; } -void Corneria_Boss295_Draw(Boss295* this) { +void Corneria_CoCarrierUpper_Draw(CoCarrierUpper* this) { Matrix_Translate(gGfxMatrix, -D_i1_80199A90.x, -D_i1_80199A90.y, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - Animation_GetFrameData(&D_CO_602D400, 0, this->vwork); - Animation_DrawSkeleton(1, aCoCarrierSkel, this->vwork, Corneria_Boss295_OverrideLimbDraw, NULL, &this->index, + Animation_GetFrameData(&aCoCarrierAnim, 0, this->vwork); + Animation_DrawSkeleton(1, aCoCarrierSkel, this->vwork, Corneria_CoCarrierUpper_OverrideLimbDraw, NULL, &this->index, &gIdentityMatrix); } -bool Corneria_Boss296_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { +bool Corneria_CoCarrierBottom_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* index) { if (limbIndex == 3) { - rot->z -= gBosses[*(s32*) data].fwork[1]; + rot->z -= gBosses[*(s32*) index].fwork[1]; } if ((limbIndex != 3) && (limbIndex != 4)) { *dList = NULL; @@ -2683,44 +2685,44 @@ bool Corneria_Boss296_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, V return false; } -void Corneria_Boss296_Draw(Boss296* this) { +void Corneria_CoCarrierBottom_Draw(CoCarrierBottom* this) { Matrix_Translate(gGfxMatrix, -D_i1_80199AA8.x, -D_i1_80199AA8.y, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - Animation_GetFrameData(&D_CO_602D400, 0, this->vwork); - Animation_DrawSkeleton(1, aCoCarrierSkel, this->vwork, Corneria_Boss296_OverrideLimbDraw, NULL, &this->index, - &gIdentityMatrix); + Animation_GetFrameData(&aCoCarrierAnim, 0, this->vwork); + Animation_DrawSkeleton(1, aCoCarrierSkel, this->vwork, Corneria_CoCarrierBottom_OverrideLimbDraw, NULL, + &this->index, &gIdentityMatrix); } -void Corneria_Doors_Update(CoDoors* scenery) { - switch (scenery->state) { +void Corneria_CoDoors_Update(CoDoors* this) { + switch (this->state) { case 0: - if (scenery->dmgType != DMG_NONE) { - scenery->dmgType = DMG_NONE; - if (scenery->dmgPart < 2) { - scenery->unk_44++; - scenery->timer_4C = 5; - scenery->vel.x += 2.0f; - scenery->vel.y += 2.0f; - if (scenery->unk_44 >= 3) { - scenery->state = 1; - scenery->info.hitbox = SEGMENTED_TO_VIRTUAL(&D_CO_603E924); - AUDIO_PLAY_SFX(NA_SE_OB_GATE_OPEN, scenery->sfxSource, 0); + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + if (this->dmgPart < 2) { + this->unk_44++; + this->timer_4C = 5; + this->vel.x += 2.0f; + this->vel.y += 2.0f; + if (this->unk_44 >= 3) { + this->state = 1; + this->info.hitbox = SEGMENTED_TO_VIRTUAL(&D_CO_603E924); + AUDIO_PLAY_SFX(NA_SE_OB_GATE_OPEN, this->sfxSource, 0); } else { - AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, scenery->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, this->sfxSource, 0); } } } break; case 1: - Math_SmoothStepToF(&scenery->vel.x, 80.0f, 0.2f, 10.0f, 0.0f); - Math_SmoothStepToF(&scenery->vel.y, 80.0f, 0.2f, 10.0f, 0.0f); + Math_SmoothStepToF(&this->vel.x, 80.0f, 0.2f, 10.0f, 0.0f); + Math_SmoothStepToF(&this->vel.y, 80.0f, 0.2f, 10.0f, 0.0f); break; } } -bool Corneria_Doors_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { - CoDoors* scenery = (CoDoors*) data; +bool Corneria_CoDoors_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { + CoDoors* scenery = (CoDoors*) thisx; RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); @@ -2742,32 +2744,32 @@ bool Corneria_Doors_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec return 0; } -void Corneria_Doors_Draw(CoDoors* this) { +void Corneria_CoDoors_Draw(CoDoors* this) { Vec3f jointTable[10]; Animation_GetFrameData(&D_CO_602AA7C, 0, jointTable); - Animation_DrawSkeleton(3, aCoDoorsSkel, jointTable, Corneria_Doors_OverrideLimbDraw, NULL, this, gCalcMatrix); + Animation_DrawSkeleton(3, aCoDoorsSkel, jointTable, Corneria_CoDoors_OverrideLimbDraw, NULL, this, gCalcMatrix); RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } // Initializer called by unused function -void Corneria_InitTerrainBumps(Scenery* scenery, f32 xPosOffset) { - Scenery_Initialize(scenery); +void Corneria_SetupTerrainBumps(CoBump1* this, f32 xPosOffset) { + Scenery_Initialize(this); - scenery->obj.status = OBJ_INIT; - scenery->obj.pos.x = RAND_FLOAT_CENTERED(1000.0f) + xPosOffset; - scenery->obj.rot.y = RAND_FLOAT(90.0f) + 45.0f; + this->obj.status = OBJ_INIT; + this->obj.pos.x = RAND_FLOAT_CENTERED(1000.0f) + xPosOffset; + this->obj.rot.y = RAND_FLOAT(90.0f) + 45.0f; if (xPosOffset > 0.0f) { - scenery->obj.rot.y *= -1.0f; + this->obj.rot.y *= -1.0f; } - scenery->obj.pos.y = 0.0f; - scenery->obj.id = OBJ_SCENERY_CO_BUMP_1; - scenery->effectVel.z = 60.0f; - Object_SetInfo(&scenery->info, scenery->obj.id); - scenery->obj.pos.z = -2000.0f; - scenery->info.cullDistance = 15000.0f; + this->obj.pos.y = 0.0f; + this->obj.id = OBJ_SCENERY_CO_BUMP_1; + this->effectVel.z = 60.0f; + Object_SetInfo(&this->info, this->obj.id); + this->obj.pos.z = -2000.0f; + this->info.cullDistance = 15000.0f; } // Unused, seems to be creating some terrain bumps during the intro cutscene. @@ -2777,21 +2779,21 @@ void Corneria_SpawnTerrainBumps(void) { if (((gGameFrameCount % 16) == 0) && (gPlayer[0].csState >= 4)) { for (i = 0; i < ARRAY_COUNT(gScenery); i++) { if (gScenery[i].obj.status == OBJ_FREE) { - Corneria_InitTerrainBumps(&gScenery[i], 4000.0f); + Corneria_SetupTerrainBumps(&gScenery[i], 4000.0f); break; } } for (i = 0; i < ARRAY_COUNT(gScenery); i++) { if (gScenery[i].obj.status == OBJ_FREE) { - Corneria_InitTerrainBumps(&gScenery[i], -4000.0f); + Corneria_SetupTerrainBumps(&gScenery[i], -4000.0f); break; } } } } -void Corneria_InitClouds(Clouds* this) { +void Corneria_SetupClouds(EffectClouds* this) { Effect_Initialize(this); this->obj.status = OBJ_INIT; this->obj.pos.x = gPlayer[0].cam.eye.x + RAND_FLOAT_CENTERED(500.0f); @@ -2816,7 +2818,7 @@ void Corneria_SpawnClouds(void) { if (((gGameFrameCount % 32) == 0) && gPlayer[0].pos.x == 0.0f) { for (i = 0; i < ARRAY_COUNT(gEffects); i++) { if (gEffects[i].obj.status == OBJ_FREE) { - Corneria_InitClouds(&gEffects[i]); + Corneria_SetupClouds(&gEffects[i]); break; } } @@ -2831,7 +2833,7 @@ static f32 sCoLevelStartTeamZpos[3] = { 160.0f, 160.0f, 320.0f }; static f32 sCoLevelStartTeamZrot[3] = { -60.0f, 60.0f, -45.0f }; -void Corneria_CsSFTeamUpdate(ActorCutscene* this, s32 teamIdx) { +void Corneria_CsTeamSetup(ActorCutscene* this, s32 teamIdx) { Actor_Initialize(this); this->obj.status = OBJ_INIT; this->obj.id = OBJ_ACTOR_CUTSCENE; @@ -2871,6 +2873,8 @@ void Corneria_LevelStart(Player* player) { f32 sp30; f32 sp2C; + // Corneria_SpawnTerrainBumps(); // This function call was probably around here. + PRINTF("Enms[1].obj.mode %d\n", gActors[1].obj.status); if (gCsFrameCount < 815) { @@ -2915,27 +2919,28 @@ void Corneria_LevelStart(Player* player) { D_ctx_80177A48[6] += fabsf(sp44); D_ctx_80177A48[7] += fabsf(sp40); + // Cloud reflexions on Arwing windshields if (sp2C >= 0.0f) { - Texture_Scroll(D_arwing_30184D8, 64, 32, 2); - Texture_Scroll(D_arwing_30184D8, 64, 32, 2); + Texture_Scroll(aWindshieldClouldReflextionTex, 64, 32, 2); + Texture_Scroll(aWindshieldClouldReflextionTex, 64, 32, 2); } else { - Texture_Scroll(D_arwing_30184D8, 64, 32, 3); - Texture_Scroll(D_arwing_30184D8, 64, 32, 3); + Texture_Scroll(aWindshieldClouldReflextionTex, 64, 32, 3); + Texture_Scroll(aWindshieldClouldReflextionTex, 64, 32, 3); } - for (i = 0; (i < 40 && D_ctx_80177A48[6] >= 0.2f); i++, D_ctx_80177A48[6] -= 0.2f) { + for (i = 0; (i < 40) && (D_ctx_80177A48[6] >= 0.2f); i++, D_ctx_80177A48[6] -= 0.2f) { if (sp44 >= 0) { - Texture_Scroll(D_arwing_30184D8, 64, 32, 2); + Texture_Scroll(aWindshieldClouldReflextionTex, 64, 32, 2); } else { - Texture_Scroll(D_arwing_30184D8, 64, 32, 3); + Texture_Scroll(aWindshieldClouldReflextionTex, 64, 32, 3); } } for (i = 0; (i < 40) && (D_ctx_80177A48[7] >= 0.3f); i++, D_ctx_80177A48[7] -= 0.3f) { if (sp40 >= 0) { - Texture_Scroll(D_arwing_30184D8, 64, 32, 0); + Texture_Scroll(aWindshieldClouldReflextionTex, 64, 32, 0); } else { - Texture_Scroll(D_arwing_30184D8, 64, 32, 1); + Texture_Scroll(aWindshieldClouldReflextionTex, 64, 32, 1); } } @@ -2962,16 +2967,16 @@ void Corneria_LevelStart(Player* player) { player->wings.unk_30 = 0; switch (player->csState) { - case 0: + case 0: // LevelStart initialization gCsFrameCount = 0; player->csState = 1; player->csTimer = 600; player->pos.y = 6000.0f; player->pos.x = 0.1f; - Corneria_CsSFTeamUpdate(falco, 0); - Corneria_CsSFTeamUpdate(slippy, 1); - Corneria_CsSFTeamUpdate(peppy, 2); + Corneria_CsTeamSetup(falco, 0); + Corneria_CsTeamSetup(slippy, 1); + Corneria_CsTeamSetup(peppy, 2); falco->iwork[14] = 2; slippy->iwork[14] = 3; @@ -2993,7 +2998,7 @@ void Corneria_LevelStart(Player* player) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; break; - case 1: + case 1: // cs phase: camera focus on fox (open the wings!) if (player->csTimer < 550) { gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 3; @@ -3050,7 +3055,7 @@ void Corneria_LevelStart(Player* player) { } break; - case 2: + case 2: // camera goes to the side of Fox. Math_SmoothStepToF(&D_ctx_80177A48[0], 0.1f, 1.0f, 0.001f, 0.0f); gCsCamEyeX = player->pos.x - 50.0f; @@ -3081,7 +3086,7 @@ void Corneria_LevelStart(Player* player) { } break; - case 3: + case 3: // Falco appears on scene from behind if (fabsf(Math_SmoothStepToF(&falco->obj.pos.z, player->pos.z + 100.0f, 0.05f, 5.0f, 0.0f)) < 1.0f) { player->csState = 4; D_ctx_80177A48[0] = 0.0f; @@ -3103,6 +3108,7 @@ void Corneria_LevelStart(Player* player) { Math_SmoothStepToF(&D_ctx_80177A48[0], 0.1f, 1.0f, 0.001f, 0.0f); + // Focus camera on Falco. gCsCamEyeX = falco->obj.pos.x - 50.0f; gCsCamEyeY = falco->obj.pos.y + 10.0f; gCsCamEyeZ = falco->obj.pos.z - 10.0f; @@ -3120,19 +3126,21 @@ void Corneria_LevelStart(Player* player) { Radio_PlayMessage(gMsg_ID_2020, RCID_FALCO); } + // Falco looks towards the camera. if (player->csTimer < 100) { - Math_SmoothStepToF(&falco->fwork[19], 50.0f, 0.1f, 3.0f, 0.01f); + Math_SmoothStepToF(&falco->fwork[TEAM_HEAD_XROT], 50.0f, 0.1f, 3.0f, 0.01f); } - falco->fwork[20] = 0.0f; - + // Falco's head rocks back and forth as he speaks. + falco->fwork[TEAM_HEAD_YROT] = 0.0f; if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) { - falco->fwork[20] = 5.0f; + falco->fwork[TEAM_HEAD_YROT] = 5.0f; } break; case 5: - Math_SmoothStepToF(&falco->fwork[19], 0, 0.1f, 3.0f, 0.01f); + // Falco's head rotates back. + Math_SmoothStepToF(&falco->fwork[TEAM_HEAD_XROT], 0.0f, 0.1f, 3.0f, 0.01f); if (player->csTimer == 0) { player->csState = 6; @@ -3140,16 +3148,19 @@ void Corneria_LevelStart(Player* player) { player->csTimer = 190; } + // Camera moves towards Peppy. gCsCamEyeY = falco->obj.pos.y + 10.0f; gCsCamAtY = falco->obj.pos.y + 10.0f; break; case 6: - Math_SmoothStepToF(&falco->fwork[19], 0.0f, 0.1f, 3.0f, 0.01f); + // Falco's head rotates back. + Math_SmoothStepToF(&falco->fwork[TEAM_HEAD_XROT], 0.0f, 0.1f, 3.0f, 0.01f); Math_SmoothStepToF(&D_ctx_80177A48[0], 0.1f, 1.0f, 0.001f, 0.0f); D_ctx_80177A48[3] -= 0.5f; + // Focus camera on Peppy gCsCamEyeX = peppy->obj.pos.x + 100.0f + D_ctx_80177A48[3]; gCsCamEyeY = peppy->obj.pos.y + 10.0f; gCsCamEyeZ = peppy->obj.pos.z - 70.0f; @@ -3170,16 +3181,17 @@ void Corneria_LevelStart(Player* player) { Radio_PlayMessage(gMsg_ID_2030, RCID_PEPPY); } - peppy->fwork[20] = 0.0f; - + // Peppy's head rocks back and forth as he speaks. + peppy->fwork[TEAM_HEAD_YROT] = 0.0f; if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) { - peppy->fwork[20] = 5.0f; + peppy->fwork[TEAM_HEAD_YROT] = 5.0f; } break; case 7: Math_SmoothStepToF(&D_ctx_80177A48[0], 0.1f, 1.0f, 0.001f, 0.0f); + // Focus camera on Slippy. gCsCamEyeX = slippy->obj.pos.x + 20.0f; gCsCamEyeY = slippy->obj.pos.y + 10.0f; gCsCamEyeZ = slippy->obj.pos.z - 50.0f; @@ -3202,13 +3214,13 @@ void Corneria_LevelStart(Player* player) { } if (player->csTimer < 100) { - Math_SmoothStepToF(&slippy->fwork[19], -20.0f, 0.1f, 3.0f, 0.01f); + Math_SmoothStepToF(&slippy->fwork[TEAM_HEAD_XROT], -20.0f, 0.1f, 3.0f, 0.01f); } - slippy->fwork[20] = 0.0f; - + // Slippy's head rocks back and forth as he speaks. + slippy->fwork[TEAM_HEAD_YROT] = 0.0f; if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) { - slippy->fwork[20] = 5.0f; + slippy->fwork[TEAM_HEAD_YROT] = 5.0f; } break; @@ -3219,6 +3231,8 @@ void Corneria_LevelStart(Player* player) { D_ctx_80177A48[3] += player->unk_004; Math_SmoothStepToF(&player->unk_004, 2.0f, 1.0f, 0.2f, 0.0f); } + + // Focus camera on Fox. gCsCamEyeX = player->pos.x; gCsCamEyeZ = (player->trueZpos - 600.0f) + D_ctx_80177A48[3]; gCsCamEyeY = player->pos.y + D_ctx_80177A48[8]; @@ -3235,8 +3249,8 @@ void Corneria_LevelStart(Player* player) { Radio_PlayMessage(gMsg_ID_2050, RCID_FOX); } + // Fox's head rotates back and forth as he speaks. player->wings.unk_30 = 0.0f; - if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) { player->wings.unk_30 = 5.0f; } @@ -3380,7 +3394,7 @@ static f32 D_i1_80199B20[3] = { 200.0f, 200.0f, 400.0f }; static f32 D_i1_80199B2C[3] = { 180.0f, -120.0f, 180.0f }; -void Corneria_80190F74(ActorCutscene* this, s32 index) { +void Corneria_CsLevelComplete1_TeamSetup(ActorCutscene* this, s32 index) { Vec3f sp5C; Vec3f sp50; Vec3f sp44; @@ -3638,13 +3652,13 @@ void Corneria_LevelComplete1(Player* player) { case 470: Play_ClearObjectData(); if (gTeamShields[TEAM_ID_FALCO] > 0) { - Corneria_80190F74(&gActors[0], 0); + Corneria_CsLevelComplete1_TeamSetup(&gActors[0], 0); } if (gTeamShields[TEAM_ID_SLIPPY] > 0) { - Corneria_80190F74(&gActors[1], 1); + Corneria_CsLevelComplete1_TeamSetup(&gActors[1], 1); } if (gTeamShields[TEAM_ID_PEPPY] > 0) { - Corneria_80190F74(&gActors[2], 2); + Corneria_CsLevelComplete1_TeamSetup(&gActors[2], 2); } break; diff --git a/src/overlays/ovl_i1/fox_ve1.c b/src/overlays/ovl_i1/fox_ve1.c index 117b5330..bf89eac5 100644 --- a/src/overlays/ovl_i1/fox_ve1.c +++ b/src/overlays/ovl_i1/fox_ve1.c @@ -253,7 +253,7 @@ void Venom1_BossTrigger1_Update(Ve1BossTrigger1* this) { s32 i; for (i = 0; i < ARRAY_COUNT(gBosses); i++, boss++) { - if ((boss->obj.status != OBJ_FREE) && (boss->obj.id == OBJ_BOSS_VE1)) { + if ((boss->obj.status != OBJ_FREE) && (boss->obj.id == OBJ_BOSS_VE1_GOLEMECH)) { if (boss->obj.pos.z <= this->obj.pos.z) { D_i1_8019C0B8 = (s32) this->obj.rot.x + 1; this->obj.status = OBJ_FREE; @@ -268,7 +268,7 @@ void Venom1_BossTrigger2_Update(Ve1BossTrigger2* this) { s32 i; for (i = 0; i < ARRAY_COUNT(gBosses); i++, boss++) { - if ((boss->obj.status != OBJ_FREE) && (boss->obj.id == OBJ_BOSS_VE1)) { + if ((boss->obj.status != OBJ_FREE) && (boss->obj.id == OBJ_BOSS_VE1_GOLEMECH)) { if (boss->obj.pos.z <= this->obj.pos.z) { D_i1_8019C0B8 = 0; this->obj.status = OBJ_FREE; @@ -283,7 +283,7 @@ void Venom1_BossTrigger3_Update(Ve1BossTrigger3* this) { s32 i; for (i = 0; i < ARRAY_COUNT(gBosses); i++, boss++) { - if ((boss->obj.status != OBJ_FREE) && (boss->obj.id == OBJ_BOSS_VE1)) { + if ((boss->obj.status != OBJ_FREE) && (boss->obj.id == OBJ_BOSS_VE1_GOLEMECH)) { if (boss->obj.pos.z <= this->obj.pos.z) { D_i1_8019C0BC = (s32) this->obj.rot.x + 1; this->obj.status = OBJ_FREE; @@ -298,7 +298,7 @@ void Venom1_BossTrigger4_Update(Ve1BossTrigger4* this) { s32 i; for (i = 0; i < ARRAY_COUNT(gBosses); i++, boss++) { - if ((boss->obj.status != OBJ_FREE) && (boss->obj.id == OBJ_BOSS_VE1)) { + if ((boss->obj.status != OBJ_FREE) && (boss->obj.id == OBJ_BOSS_VE1_GOLEMECH)) { if (boss->obj.pos.z <= this->obj.pos.z) { D_i1_8019C0C0 = 1; this->obj.status = OBJ_FREE; @@ -308,14 +308,14 @@ void Venom1_BossTrigger4_Update(Ve1BossTrigger4* this) { } } -void Venom1_Scenery127_Update(Scenery* scenery) { - switch (scenery->state) { +void Venom1_Ve1TempleEntrance_Update(Ve1TempleEntrance* this) { + switch (this->state) { case 0: - if (gPlayer[0].pos.z < scenery->obj.pos.z) { + if (gPlayer[0].pos.z < this->obj.pos.z) { gDrawBackdrop = 0; gDrawGround = false; - scenery->state++; + this->state++; } case 1: @@ -323,11 +323,11 @@ void Venom1_Scenery127_Update(Scenery* scenery) { } } -void Venom1_8019250C(Actor* this) { +void Venom1_Ve1Pillar1_Init(Actor* this) { } -void Venom1_Actor280_Update(Actor280* this) { - Scenery* scenery; +void Venom1_Ve1Pillar1_Update(Ve1Pillar1* this) { + Scenery* templeInterior; f32 var_ft4; f32 var_ft5; s32 i; @@ -356,24 +356,24 @@ void Venom1_Actor280_Update(Actor280* this) { var_ft5 = 450.0f; var_ft4 = 0.0f; - scenery = &gScenery[0]; - - for (i = 0; i < ARRAY_COUNT(gScenery); i++, scenery++) { - if ((scenery->obj.id == OBJ_SCENERY_128) || (scenery->obj.id == OBJ_SCENERY_129) || - (scenery->obj.id == OBJ_SCENERY_130)) { - if (((this->obj.pos.z + 1100.0f - scenery->obj.pos.z) < 2200.0f) && - ((this->obj.pos.z + 1100.0f - scenery->obj.pos.z) > 0.0f)) { - switch (scenery->obj.id) { - case OBJ_SCENERY_128: - case OBJ_SCENERY_130: + templeInterior = &gScenery[0]; + for (i = 0; i < ARRAY_COUNT(gScenery); i++, templeInterior++) { + if ((templeInterior->obj.id == OBJ_SCENERY_VE1_TEMPLE_INTERIOR_1) || + (templeInterior->obj.id == OBJ_SCENERY_VE1_TEMPLE_INTERIOR_2) || + (templeInterior->obj.id == OBJ_SCENERY_VE1_TEMPLE_INTERIOR_3)) { + if (((this->obj.pos.z + 1100.0f - templeInterior->obj.pos.z) < 2200.0f) && + ((this->obj.pos.z + 1100.0f - templeInterior->obj.pos.z) > 0.0f)) { + switch (templeInterior->obj.id) { + case OBJ_SCENERY_VE1_TEMPLE_INTERIOR_1: + case OBJ_SCENERY_VE1_TEMPLE_INTERIOR_3: break; - case OBJ_SCENERY_129: + case OBJ_SCENERY_VE1_TEMPLE_INTERIOR_2: var_ft5 = 600.0f; break; } - var_ft4 = scenery->obj.pos.x; + var_ft4 = templeInterior->obj.pos.x; break; } } @@ -405,7 +405,7 @@ void Venom1_Actor280_Update(Actor280* this) { this->obj.pos.y += dest.y; this->obj.pos.z += dest.z; - effect = func_effect_8007783C(OBJ_EFFECT_394); + effect = Effect_Load(OBJ_EFFECT_394); if (effect != NULL) { effect->unk_7A = 11; @@ -494,47 +494,46 @@ void Venom1_80192AA4(Actor* this) { } } -void Venom1_80192CB0(Actor* this) { +void Venom1_Ve1Pillar2_3_Init(Actor* this) { this->iwork[0] = this->obj.rot.x; this->obj.rot.x = 0.0f; } -// Actors OBJ_ACTOR_281 & OBJ_ACTOR_282 -void Venom1_Doodad_Update(Actor* actor) { - if (actor->dmgType == DMG_BEAM) { - actor->dmgType = DMG_NONE; - Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_REFLECT); +void Venom1_Pillar2_3_Update(Actor* this) { + if (this->dmgType == DMG_BEAM) { + this->dmgType = DMG_NONE; + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_REFLECT); } - if (actor->iwork[1] > 0) { + if (this->iwork[1] > 0) { gControllerRumbleFlags[0] = 1; - actor->iwork[1]--; + this->iwork[1]--; } - switch (actor->state) { + switch (this->state) { case 1: - actor->timer_0BC = actor->iwork[0]; + this->timer_0BC = this->iwork[0]; case 2: - if (actor->timer_0BC <= 0) { - actor->state++; + if (this->timer_0BC <= 0) { + this->state++; } break; case 3: - actor->state++; + this->state++; case 4: - actor->fwork[0] += 0.05f; - actor->obj.rot.x += actor->fwork[0]; + this->fwork[0] += 0.05f; + this->obj.rot.x += this->fwork[0]; - if (actor->obj.rot.x >= 90.0f) { + if (this->obj.rot.x >= 90.0f) { gCameraShake = 12; - Venom1_80192AA4(actor); - actor->iwork[1] = 5; - actor->obj.rot.x = 90.0f; - AUDIO_PLAY_SFX(NA_SE_OB_POLE_BOUND, actor->sfxSource, 0); - actor->state++; + Venom1_80192AA4(this); + this->iwork[1] = 5; + this->obj.rot.x = 90.0f; + AUDIO_PLAY_SFX(NA_SE_OB_POLE_BOUND, this->sfxSource, 0); + this->state++; } break; @@ -544,21 +543,21 @@ void Venom1_Doodad_Update(Actor* actor) { } } -void Venom1_Actor281_Draw(Actor281* this) { +void Venom1_Ve1Pillar2_Draw(Ve1Pillar2* this) { Matrix_Scale(gGfxMatrix, 1.0f, 0.5f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_VE1_901DA50); + gSPDisplayList(gMasterDisp++, aVe1Pillar3DL); } -void Venom1_80192EA4(Actor* this) { +void Venom1_Ve1Pillar4_Init(Ve1Pillar4* this) { } -void Venom1_Actor283_Update(Actor283* this) { - Scenery* scenery; +void Venom1_Ve1Pillar4_Update(Ve1Pillar4* this) { + Scenery* templeInterior; Vec3f sp50; Vec3f sp44; f32 sp40; - Effect* effect; + Effect* effect394; s32 i; f32 var_ft4; @@ -573,14 +572,15 @@ void Venom1_Actor283_Update(Actor283* this) { case 1: var_ft4 = 0.0f; - scenery = gScenery; - for (i = 0; i < ARRAY_COUNT(gScenery); i++, scenery++) { - if (((scenery->obj.id == OBJ_SCENERY_128) || (scenery->obj.id == OBJ_SCENERY_129) || - (scenery->obj.id == OBJ_SCENERY_130)) && - ((this->obj.pos.z + 1100.0f - scenery->obj.pos.z) < 2200.0f) && - ((this->obj.pos.z + 1100.0f - scenery->obj.pos.z) > 0.0f)) { - var_ft4 = scenery->obj.pos.y; + templeInterior = &gScenery[0]; + for (i = 0; i < ARRAY_COUNT(gScenery); i++, templeInterior++) { + if (((templeInterior->obj.id == OBJ_SCENERY_VE1_TEMPLE_INTERIOR_1) || + (templeInterior->obj.id == OBJ_SCENERY_VE1_TEMPLE_INTERIOR_2) || + (templeInterior->obj.id == OBJ_SCENERY_VE1_TEMPLE_INTERIOR_3)) && + ((this->obj.pos.z + 1100.0f - templeInterior->obj.pos.z) < 2200.0f) && + ((this->obj.pos.z + 1100.0f - templeInterior->obj.pos.z) > 0.0f)) { + var_ft4 = templeInterior->obj.pos.y; break; } } @@ -601,26 +601,26 @@ void Venom1_Actor283_Update(Actor283* this) { this->obj.pos.x += sp44.x; this->obj.pos.y += sp44.y; this->obj.pos.z += sp44.z; - effect = func_effect_8007783C(OBJ_EFFECT_394); - if (effect != NULL) { - effect->unk_7A = 11; - effect->unk_78 = effect->unk_7A; - effect->obj.status = OBJ_ACTIVE; - effect->obj.pos.x = this->obj.pos.x + RAND_FLOAT_CENTERED(3.0f); - effect->obj.pos.y = this->obj.pos.y + RAND_FLOAT_CENTERED(3.0f); - effect->obj.pos.z = this->obj.pos.z + RAND_FLOAT_CENTERED(3.0f) + 80.0f; - effect->scale2 = 8.0f; - effect->obj.rot.z = RAND_FLOAT(360.0f); - effect->vel.x = RAND_FLOAT_CENTERED(5.0f); - effect->vel.y = 10.0f + RAND_FLOAT_CENTERED(3); - effect->unk_44 = 100; - effect->unk_46 = -5; - effect->unk_60.z = 3.0f; + effect394 = Effect_Load(OBJ_EFFECT_394); + if (effect394 != NULL) { + effect394->unk_7A = 11; + effect394->unk_78 = effect394->unk_7A; + effect394->obj.status = OBJ_ACTIVE; + effect394->obj.pos.x = this->obj.pos.x + RAND_FLOAT_CENTERED(3.0f); + effect394->obj.pos.y = this->obj.pos.y + RAND_FLOAT_CENTERED(3.0f); + effect394->obj.pos.z = this->obj.pos.z + RAND_FLOAT_CENTERED(3.0f) + 80.0f; + effect394->scale2 = 8.0f; + effect394->obj.rot.z = RAND_FLOAT(360.0f); + effect394->vel.x = RAND_FLOAT_CENTERED(5.0f); + effect394->vel.y = 10.0f + RAND_FLOAT_CENTERED(3); + effect394->unk_44 = 100; + effect394->unk_46 = -5; + effect394->unk_60.z = 3.0f; if (Rand_ZeroOne() < 0.5f) { - effect->unk_60.z = -effect->unk_60.z; + effect394->unk_60.z = -effect394->unk_60.z; } if ((this->iwork[0] % 2) != 0) { - effect->vel.y = -effect->vel.y; + effect394->vel.y = -effect394->vel.y; } } @@ -658,12 +658,12 @@ void Venom1_Actor283_Update(Actor283* this) { this->iwork[0]++; } -void Venom1_801933B4(Actor* this) { +void Venom1_Ve1MonkeyStatue_Init(Ve1MonkeyStatue* this) { this->scale = -1.0f; this->obj.pos.y += 488.0f; } -void Venom1_Actor284_Update(Actor284* this) { +void Venom1_Ve1MonkeyStatue_Update(Ve1MonkeyStatue* this) { f32* hitboxData; if (this->dmgType == DMG_BEAM) { @@ -674,9 +674,9 @@ void Venom1_Actor284_Update(Actor284* this) { if ((this->animFrame == 38) || (this->animFrame == 58)) { AUDIO_PLAY_SFX(NA_SE_OB_ARM_SWING, this->sfxSource, 0); } - Animation_GetFrameData(&D_VE1_900D098, this->animFrame, this->vwork); + Animation_GetFrameData(&aVe1MonkeyStatueAnim, this->animFrame, this->vwork); - if (this->animFrame < (Animation_GetFrameCount(&D_VE1_900D098) - 1)) { + if (this->animFrame < (Animation_GetFrameCount(&aVe1MonkeyStatueAnim) - 1)) { this->animFrame++; } else { this->animFrame = 0; @@ -687,14 +687,14 @@ void Venom1_Actor284_Update(Actor284* this) { hitboxData[1 + (10 * 1) + 7] = -this->vwork[2].y; } -void Venom1_Actor284_Draw(Actor* this) { +void Venom1_Ve1MonkeyStatue_Draw(Ve1MonkeyStatue* this) { Matrix_Translate(gGfxMatrix, 0.0f, -488.0f, 0.0f, MTXF_APPLY); Animation_DrawSkeleton(0, D_VE1_900D164, this->vwork, NULL, NULL, this, &gIdentityMatrix); } -void Venom1_Scenery52_Update(Scenery* scenery) { - if (((gPlayer[0].trueZpos - scenery->obj.pos.z) <= 3500.0f) && ((gGameFrameCount % 4) == 0)) { - func_effect_8007C120(scenery->obj.pos.x, scenery->obj.pos.y, scenery->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.2f, 10); +void Venom1_Ve1Generator_Update(Ve1Generator* this) { + if (((gPlayer[0].trueZpos - this->obj.pos.z) <= 3500.0f) && ((gGameFrameCount % 4) == 0)) { + Effect_Effect390_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.2f, 10); } } @@ -770,7 +770,7 @@ UnkStruct_i1_8019A820 D_i1_8019A820[17] = { { 20, 150, 34, 3, -1, -1, 5, -1, -1, -1, -1, 1 }, { 21, 250, 37, 3, -1, -1, 5, 14, 16, 12, 13, 1 }, { 25, 200, 40, 3, -1, -1, 5, 2, 5, -1, -1, 1 }, }; -f32 D_VE1_8019A9B8[199] = { +f32 aVe1GolemechHitbox[199] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, @@ -823,7 +823,7 @@ f32 D_i1_8019AE20[6] = { }; Vec3f D_i1_8019AE38 = { 130.0f, 0.0f, 0.0f }; -void Venom1_Boss319_Init(Boss319* this) { +void Venom1_Ve1Golemech_Init(Ve1Golemech* this) { s32 i; s32 var_v0; s32 j; @@ -867,7 +867,7 @@ void Venom1_Boss319_Init(Boss319* this) { this->fwork[11] = 1.0f; - for (i = 0; i < 33U; i++) { + for (i = 0; i < ARRAY_COUNTU(D_i1_8019B7F0); i++) { D_i1_8019B7F0[i] = 0; } @@ -881,7 +881,7 @@ void Venom1_Boss319_Init(Boss319* this) { bool Venom1_801937F4(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { Boss* this = thisx; - s32 override; + bool override; s32 i; s32 lum; s32 blue; @@ -1013,8 +1013,10 @@ void Venom1_80193D64(s32 limbIndex, Vec3f* rot, void* thisx) { var_s0 += temp1; } } + var_s6 = D_i1_8019A820; var_s7 = D_i1_8019B838; + for (spBC = 0; spBC < ARRAY_COUNTU(D_i1_8019B838); spBC++, var_s6++, var_s7++) { if (limbIndex == var_s6->unk_00) { if (var_s7->unk_7C & 8) { @@ -1069,6 +1071,7 @@ void Venom1_80193D64(s32 limbIndex, Vec3f* rot, void* thisx) { var_s6 = D_i1_8019A820; var_s7 = D_i1_8019B838; + for (spBC = 0; spBC < ARRAY_COUNTU(D_i1_8019B838); spBC++, var_s6++, var_s7++) { if ((limbIndex == var_s6->unk_00) && (var_s7->unk_7C & 0x200) && !((gGameFrameCount + spBC) & 2)) { temp2 = var_s6->unk_04; @@ -1098,7 +1101,7 @@ void Venom1_80193D64(s32 limbIndex, Vec3f* rot, void* thisx) { #ifdef NON_MATCHING // Lots of problems with loop at 2082. Seems related to spE8. https://decomp.me/scratch/gOy2L -void Venom1_Boss_Update(Boss* boss) { +void Venom1_Ve1Golemech_Update(Ve1Golemech* this) { s32 is0; Vec3f sp118[27]; Actor* actor; @@ -1129,13 +1132,13 @@ void Venom1_Boss_Update(Boss* boss) { spB8 = 0; spB4 = 0; gBossFrameCount++; - if (boss->state >= 3) { + if (this->state >= 3) { D_i1_8019C0B8 = 0; D_i1_8019C0BC = 0; } - boss->swork[32]++; - if (boss->swork[31] == 0) { - switch (boss->swork[32]) { + this->swork[32]++; + if (this->swork[31] == 0) { + switch (this->swork[32]) { case 901: if ((gTeamShields[TEAM_ID_SLIPPY] > 0) && (gRadioState == 0)) { Radio_PlayMessage(gMsg_ID_4092, RCID_SLIPPY); @@ -1143,10 +1146,10 @@ void Venom1_Boss_Update(Boss* boss) { break; case 1001: if (gTeamShields[TEAM_ID_SLIPPY] > 0) { - gShowBossHealth = 1; + gShowBossHealth = true; gBossHealthBar = 255; - boss->swork[32] = 0; - boss->swork[31]++; + this->swork[32] = 0; + this->swork[31]++; } break; } @@ -1156,23 +1159,23 @@ void Venom1_Boss_Update(Boss* boss) { D_i1_8019B838[spF4].unk_02[2]--; } } - if (boss->swork[10] > 0) { - boss->swork[10]--; + if (this->swork[10] > 0) { + this->swork[10]--; } - if (boss->swork[28] > 0) { + if (this->swork[28] > 0) { gControllerRumbleFlags[0] = 1; - boss->swork[28]--; + this->swork[28]--; } - if (boss->swork[16] > 0) { - boss->swork[16]--; + if (this->swork[16] > 0) { + this->swork[16]--; } - if ((boss->swork[16] & 3) == 1) { + if ((this->swork[16] & 3) == 1) { for (spF4 = 0; spF4 < (RAND_INT(5.0f) + 2); spF4++) { - effect = func_effect_8007783C(OBJ_EFFECT_394); + effect = Effect_Load(OBJ_EFFECT_394); if (effect != NULL) { - effect->obj.pos.x = boss->obj.pos.x + RAND_FLOAT_CENTERED(400.0f); - effect->obj.pos.y = boss->obj.pos.y + 1250.0f; - effect->obj.pos.z = boss->obj.pos.z + RAND_FLOAT_CENTERED(400.0f); + effect->obj.pos.x = this->obj.pos.x + RAND_FLOAT_CENTERED(400.0f); + effect->obj.pos.y = this->obj.pos.y + 1250.0f; + effect->obj.pos.z = this->obj.pos.z + RAND_FLOAT_CENTERED(400.0f); effect->obj.rot.x = RAND_FLOAT(360.0f); effect->obj.rot.y = RAND_FLOAT(360.0f); effect->obj.rot.z = RAND_FLOAT(360.0f); @@ -1187,14 +1190,14 @@ void Venom1_Boss_Update(Boss* boss) { } } } - if (boss->swork[10] & 2) { - effect = func_effect_8007783C(OBJ_EFFECT_394); + if (this->swork[10] & 2) { + effect = Effect_Load(OBJ_EFFECT_394); if (effect != NULL) { effect->obj.status = OBJ_ACTIVE; effect->unk_78 = effect->unk_7A = 11; - effect->obj.pos.x = boss->obj.pos.x + 125.0f; - effect->obj.pos.y = boss->obj.pos.y; - effect->obj.pos.z = boss->obj.pos.z; + effect->obj.pos.x = this->obj.pos.x + 125.0f; + effect->obj.pos.y = this->obj.pos.y; + effect->obj.pos.z = this->obj.pos.z; effect->scale2 = 10.0f; effect->obj.rot.z = RAND_FLOAT(360.0f); effect->vel.x = RAND_FLOAT_CENTERED(5.0f); @@ -1206,13 +1209,13 @@ void Venom1_Boss_Update(Boss* boss) { effect->unk_60.z = -effect->unk_60.z; } } - effect = func_effect_8007783C(OBJ_EFFECT_394); + effect = Effect_Load(OBJ_EFFECT_394); if (effect != NULL) { effect->obj.status = OBJ_ACTIVE; effect->unk_78 = effect->unk_7A = 11; - effect->obj.pos.x = boss->obj.pos.x - 125.0f; - effect->obj.pos.y = boss->obj.pos.y; - effect->obj.pos.z = boss->obj.pos.z; + effect->obj.pos.x = this->obj.pos.x - 125.0f; + effect->obj.pos.y = this->obj.pos.y; + effect->obj.pos.z = this->obj.pos.z; effect->obj.rot.z = RAND_FLOAT(360.0f); effect->scale2 = 10.0f; effect->vel.x = RAND_FLOAT_CENTERED(5.0f); @@ -1226,39 +1229,39 @@ void Venom1_Boss_Update(Boss* boss) { effect->unk_4A = 50; } } - if (boss->state <= 0) { - switch (boss->swork[20]) { + if (this->state <= 0) { + switch (this->swork[20]) { case 0: break; case 1: - boss->fwork[13] = D_i1_8019AE00[boss->swork[21]].unk_0; - boss->swork[22] = boss->swork[21]; - boss->swork[20]++; + this->fwork[13] = D_i1_8019AE00[this->swork[21]].unk_0; + this->swork[22] = this->swork[21]; + this->swork[20]++; /* fallthrough */ case 2: - boss->fwork[14] = 0.0f; - boss->swork[20]++; + this->fwork[14] = 0.0f; + this->swork[20]++; /* fallthrough */ case 3: - Math_SmoothStepToF(&boss->fwork[14], 12.0f, 1.0f, 1.0f, 0.01f); - Venom1_801920F0(&boss->fwork[6], boss->fwork[13], 1.0f, boss->fwork[14], 0.01f, &spCC); + Math_SmoothStepToF(&this->fwork[14], 12.0f, 1.0f, 1.0f, 0.01f); + Venom1_801920F0(&this->fwork[6], this->fwork[13], 1.0f, this->fwork[14], 0.01f, &spCC); if (fabsf(spCC) <= 45.0f) { - boss->fwork[12] = boss->fwork[13] + (SIGN_OF(spCC) * 20.0f); - boss->swork[20]++; + this->fwork[12] = this->fwork[13] + (SIGN_OF(spCC) * 20.0f); + this->swork[20]++; } break; case 4: - Math_SmoothStepToF(&boss->fwork[14], 12.0f, 1.0f, 1.0f, 0.01f); - Math_SmoothStepToAngle(&boss->fwork[12], boss->fwork[13], 1.0f, boss->fwork[14] / 5.0f, 0.01f); - if (fabsf(Math_SmoothStepToAngle(&boss->fwork[6], boss->fwork[12], 1.0f, boss->fwork[14], 0.01f)) < + Math_SmoothStepToF(&this->fwork[14], 12.0f, 1.0f, 1.0f, 0.01f); + Math_SmoothStepToAngle(&this->fwork[12], this->fwork[13], 1.0f, this->fwork[14] / 5.0f, 0.01f); + if (fabsf(Math_SmoothStepToAngle(&this->fwork[6], this->fwork[12], 1.0f, this->fwork[14], 0.01f)) < 2.0f) { - boss->swork[20] = 0; + this->swork[20] = 0; } break; } } - Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); for (spF4 = 0; spF4 < ARRAY_COUNTU(D_i1_8019B838); spF4++) { if (D_i1_8019B838[spF4].unk_74 < D_i1_8019B838[spF4].unk_78) { @@ -1286,8 +1289,8 @@ void Venom1_Boss_Update(Boss* boss) { D_i1_8019B838[is4].unk_02[0] = 16; D_i1_8019B838[is4].unk_02[1] = D_i1_8019A820[spF4].unk_0C; D_i1_8019B838[is4].unk_7C |= 4; - AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_S, boss->sfxSource, 4); - AUDIO_PLAY_SFX(NA_SE_EN_VEBOSS_BROKEN, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_S, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_VEBOSS_BROKEN, this->sfxSource, 4); } is4 = D_i1_8019A820[spF4].unk_0A; if (is4 != -1) { @@ -1313,14 +1316,14 @@ void Venom1_Boss_Update(Boss* boss) { is4 = D_i1_8019B838[spF4].unk_02[0]; for (is7 = 0; is7 < D_i1_8019A820[spF4].unk_06; is7++) { Matrix_MultVec3f(gCalcMatrix, &D_i1_8019B838[spF4].unk_0C[is7], &spF8); - spF8.x += boss->obj.pos.x + RAND_FLOAT_CENTERED(60.0f); - spF8.y += boss->obj.pos.y + RAND_FLOAT_CENTERED(60.0f); - spF8.z += boss->obj.pos.z; + spF8.x += this->obj.pos.x + RAND_FLOAT_CENTERED(60.0f); + spF8.y += this->obj.pos.y + RAND_FLOAT_CENTERED(60.0f); + spF8.z += this->obj.pos.z; if (D_i1_8019AD80[is4][2] > 0) { func_effect_8007D2C8(spF8.x, spF8.y, spF8.z, D_i1_8019AD80[is4][2]); } for (is1 = 0; is1 < D_i1_8019AD80[is4][0]; is1++) { - if (boss->sfxSource) {} + if (this->sfxSource) {} actor = Game_SpawnActor(OBJ_ACTOR_DEBRIS); if (actor != NULL) { actor->obj.status = OBJ_ACTIVE; @@ -1379,9 +1382,9 @@ void Venom1_Boss_Update(Boss* boss) { } else { for (is7 = 0; is7 < D_i1_8019A820[spF4].unk_06; is7++) { Matrix_MultVec3f(gCalcMatrix, &D_i1_8019B838[spF4].unk_0C[is7], &spF8); - spF8.x += boss->obj.pos.x + RAND_FLOAT_CENTERED(60.0f); - spF8.y += boss->obj.pos.y + RAND_FLOAT_CENTERED(60.0f); - spF8.z += boss->obj.pos.z; + spF8.x += this->obj.pos.x + RAND_FLOAT_CENTERED(60.0f); + spF8.y += this->obj.pos.y + RAND_FLOAT_CENTERED(60.0f); + spF8.z += this->obj.pos.z; for (is1 = 0; is1 < 5; is1++) { actor = Game_SpawnActor(OBJ_ACTOR_DEBRIS); if (actor != NULL) { @@ -1413,16 +1416,16 @@ void Venom1_Boss_Update(Boss* boss) { actor = Game_SpawnActor(OBJ_ACTOR_DEBRIS); if (actor != NULL) { actor->obj.status = OBJ_ACTIVE; - actor->obj.pos.x = boss->obj.pos.x + D_i1_8019B838[spF4].unk_0C[0].x; - actor->obj.pos.y = boss->obj.pos.y + D_i1_8019B838[spF4].unk_0C[0].y; - actor->obj.pos.z = boss->obj.pos.z + D_i1_8019B838[spF4].unk_0C[0].z; + actor->obj.pos.x = this->obj.pos.x + D_i1_8019B838[spF4].unk_0C[0].x; + actor->obj.pos.y = this->obj.pos.y + D_i1_8019B838[spF4].unk_0C[0].y; + actor->obj.pos.z = this->obj.pos.z + D_i1_8019B838[spF4].unk_0C[0].z; actor->obj.rot.x = D_i1_8019B838[spF4].unk_30[0].x; actor->obj.rot.y = D_i1_8019B838[spF4].unk_30[0].y; actor->obj.rot.z = D_i1_8019B838[spF4].unk_30[0].z; actor->state = 57; actor->iwork[0] = 0; actor->unk_048 = spF4; - if (boss->swork[25] == 0) { + if (this->swork[25] == 0) { actor->vel.x = RAND_FLOAT_CENTERED(5.0f); actor->vel.y = 10.0f + RAND_FLOAT_CENTERED(2.0f); actor->vel.z = 10.0f + RAND_FLOAT_CENTERED(2.0f); @@ -1448,15 +1451,15 @@ void Venom1_Boss_Update(Boss* boss) { actor = Game_SpawnActor(OBJ_ACTOR_DEBRIS); if (actor != NULL) { actor->obj.status = OBJ_ACTIVE; - actor->obj.pos.x = boss->obj.pos.x + D_i1_8019B838[spF4].unk_0C[0].x; - actor->obj.pos.y = boss->obj.pos.y + D_i1_8019B838[spF4].unk_0C[0].y; - actor->obj.pos.z = boss->obj.pos.z + D_i1_8019B838[spF4].unk_0C[0].z; + actor->obj.pos.x = this->obj.pos.x + D_i1_8019B838[spF4].unk_0C[0].x; + actor->obj.pos.y = this->obj.pos.y + D_i1_8019B838[spF4].unk_0C[0].y; + actor->obj.pos.z = this->obj.pos.z + D_i1_8019B838[spF4].unk_0C[0].z; actor->obj.rot.x = RAND_FLOAT(360.0f); actor->obj.rot.y = RAND_FLOAT(360.0f); actor->obj.rot.z = RAND_FLOAT(360.0f); actor->state = 50; actor->iwork[0] = RAND_INT(2) + 2; - if (boss->swork[25] == 0) { + if (this->swork[25] == 0) { actor->vel.x = RAND_FLOAT_CENTERED(6.0f); actor->vel.y = RAND_FLOAT_CENTERED(6.0f); actor->vel.z = 40.0f + RAND_FLOAT_CENTERED(2.0f); @@ -1520,118 +1523,118 @@ void Venom1_Boss_Update(Boss* boss) { } if (D_i1_8019B838[spF4].unk_7C & 0x1000) { Matrix_MultVec3f(gCalcMatrix, &D_tank_800C9F2C, &spF8); - spF8.x += boss->obj.pos.x + D_i1_8019B838[spF4].unk_0C[1].x + RAND_FLOAT_CENTERED(60.0f); - spF8.y += boss->obj.pos.y + D_i1_8019B838[spF4].unk_0C[1].y + RAND_FLOAT_CENTERED(60.0f); - spF8.z += boss->obj.pos.z + D_i1_8019B838[spF4].unk_0C[1].z; + spF8.x += this->obj.pos.x + D_i1_8019B838[spF4].unk_0C[1].x + RAND_FLOAT_CENTERED(60.0f); + spF8.y += this->obj.pos.y + D_i1_8019B838[spF4].unk_0C[1].y + RAND_FLOAT_CENTERED(60.0f); + spF8.z += this->obj.pos.z + D_i1_8019B838[spF4].unk_0C[1].z; func_effect_8007D2C8(spF8.x, spF8.y, spF8.z, D_i1_8019B838[spF4].unk_60); D_i1_8019B838[spF4].unk_7C &= ~0x1000; } } - if ((boss->state == 0) || (boss->state == 1)) { + if ((this->state == 0) || (this->state == 1)) { is4 = 0; for (spF4 = 0; spF4 < ARRAY_COUNTU(D_i1_8019B838); spF4++) { if (D_i1_8019B838[spF4].unk_00 <= 0) { is4++; } } - if ((boss->state == 0) && (boss->swork[20] == 0)) { - if ((is4 > 0) && (boss->swork[21] < (is4 - 1) / 5)) { - boss->swork[21] = (is4 - 1) / 5; - boss->swork[20] = 1; + if ((this->state == 0) && (this->swork[20] == 0)) { + if ((is4 > 0) && (this->swork[21] < (is4 - 1) / 5)) { + this->swork[21] = (is4 - 1) / 5; + this->swork[20] = 1; } if (D_i1_8019C0C0 == 1) { D_i1_8019C0C0 = 0; - if (boss->swork[21] < 5) { - boss->swork[21]++; - boss->swork[20] = 1; + if (this->swork[21] < 5) { + this->swork[21]++; + this->swork[20] = 1; } } } if (is4 == 17) { - boss->swork[9] = 2; - boss->swork[22] = 4; - boss->fwork[6] = boss->fwork[12] = boss->fwork[13] = 0.0f; - } else if ((is4 == 16) && (boss->state == 0)) { - boss->swork[9] = 1; - boss->fwork[16] = 0.0f; - boss->fwork[15] = 255.0f; + this->swork[9] = 2; + this->swork[22] = 4; + this->fwork[6] = this->fwork[12] = this->fwork[13] = 0.0f; + } else if ((is4 == 16) && (this->state == 0)) { + this->swork[9] = 1; + this->fwork[16] = 0.0f; + this->fwork[15] = 255.0f; - if (boss->swork[22] < 3) { - boss->swork[22] = 3; + if (this->swork[22] < 3) { + this->swork[22] = 3; } } } - if (boss->dmgType == DMG_BEAM) { - boss->dmgType = DMG_NONE; - switch (boss->state) { + if (this->dmgType == DMG_BEAM) { + this->dmgType = DMG_NONE; + switch (this->state) { case 0: case 1: - is4 = D_i1_8019A500[boss->dmgPart]; + is4 = D_i1_8019A500[this->dmgPart]; if (D_i1_8019B838[is4].unk_00 > 0) { - if ((is4 != 14) || (boss->state != 0)) { - D_i1_8019B838[is4].unk_00 -= boss->damage; + if ((is4 != 14) || (this->state != 0)) { + D_i1_8019B838[is4].unk_00 -= this->damage; D_i1_8019B838[is4].unk_02[2] = 15; if (D_i1_8019B838[is4].unk_00 <= 0) { - AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_S, boss->sfxSource, 4); - AUDIO_PLAY_SFX(NA_SE_EN_VEBOSS_BROKEN, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_S, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_VEBOSS_BROKEN, this->sfxSource, 4); D_i1_8019B838[is4].unk_00 = -1; D_i1_8019B838[is4].unk_02[0] = 16; D_i1_8019B838[is4].unk_02[1] = 0; D_i1_8019B838[is4].unk_7C |= 0xC; } else { - AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, this->sfxSource, 4); if (is4 == 14) { D_i1_8019B838[is4].unk_7C |= 8; } } } else { - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } } else { - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } break; case 2: - if (D_i1_8019A500[boss->dmgPart] == 15) { - AUDIO_PLAY_SFX(NA_SE_EN_VEBOSS_DAMAGE, boss->sfxSource, 4); + if (D_i1_8019A500[this->dmgPart] == 15) { + AUDIO_PLAY_SFX(NA_SE_EN_VEBOSS_DAMAGE, this->sfxSource, 4); D_i1_8019B838[15].unk_02[2] = 10; D_i1_8019B838[15].unk_02[3] = 0; D_i1_8019B838[15].unk_7C |= 0x80; - if (boss->health > 0) { - boss->health -= boss->damage; - boss->timer_05A = 18; + if (this->health > 0) { + this->health -= this->damage; + this->timer_05A = 18; - if (boss->health <= 0) { + if (this->health <= 0) { gScreenFlashTimer = 8; gTeamLowHealthMsgTimer = -1; gKillEventActors = true; - AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, boss->sfxSource, 4); - boss->health = 0; + AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, this->sfxSource, 4); + this->health = 0; } } } else { - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } break; } } - switch (boss->state) { + switch (this->state) { case 0: case 1: for (spF4 = 0; spF4 < 33U; spF4++) { if (((gGameFrameCount % 4) == 0) && (D_i1_8019B7F0[spF4] != 0)) { is4 = D_i1_8019A500[spF4]; - if ((D_i1_8019B838[is4].unk_00 > 0) && ((is4 != 14) || (boss->state != 0))) { + if ((D_i1_8019B838[is4].unk_00 > 0) && ((is4 != 14) || (this->state != 0))) { D_i1_8019B838[is4].unk_00 -= 2; if (D_i1_8019B838[is4].unk_00 <= 0) { D_i1_8019B838[is4].unk_00 = -1; D_i1_8019B838[is4].unk_02[0] = 16; D_i1_8019B838[is4].unk_02[1] = 0; D_i1_8019B838[is4].unk_7C |= 0xC; - AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_S, boss->sfxSource, 4); - AUDIO_PLAY_SFX(NA_SE_EN_VEBOSS_BROKEN, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_S, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_VEBOSS_BROKEN, this->sfxSource, 4); } else if (is4 == 14) { D_i1_8019B838[is4].unk_7C |= 8; } @@ -1641,22 +1644,22 @@ void Venom1_Boss_Update(Boss* boss) { } break; case 2: - if (((gGameFrameCount % 4) == 0) && (boss->timer_05A == 0)) { + if (((gGameFrameCount % 4) == 0) && (this->timer_05A == 0)) { for (spF4 = 0; spF4 < 33U; spF4++) { if ((D_i1_8019A500[spF4] == 15) && (D_i1_8019B7F0[spF4] != 0)) { - AUDIO_PLAY_SFX(NA_SE_EN_VEBOSS_DAMAGE, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_VEBOSS_DAMAGE, this->sfxSource, 4); D_i1_8019B838[15].unk_02[3] = 10; D_i1_8019B838[15].unk_02[4] = 0; D_i1_8019B838[15].unk_7C |= 0x80; - if (boss->health > 0) { - boss->health -= 10; - boss->timer_05A = 35; - if (boss->health <= 0) { + if (this->health > 0) { + this->health -= 10; + this->timer_05A = 35; + if (this->health <= 0) { gScreenFlashTimer = 8; gTeamLowHealthMsgTimer = -1; gKillEventActors = true; - AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, boss->sfxSource, 4); - boss->health = 0; + AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, this->sfxSource, 4); + this->health = 0; } } } @@ -1669,130 +1672,130 @@ void Venom1_Boss_Update(Boss* boss) { for (spF4 = 0; spF4 < 17U; spF4++) { is4 += (D_i1_8019B838[spF4].unk_00 < 0) ? 0 : D_i1_8019B838[spF4].unk_00; } - boss->swork[30] = boss->health + is4; - gBossHealthBar = 255.0f * boss->swork[30] / boss->swork[29]; - switch (boss->state) { + this->swork[30] = this->health + is4; + gBossHealthBar = 255.0f * this->swork[30] / this->swork[29]; + switch (this->state) { case 4: case 5: break; case 1: - boss->fwork[6] += 5.0f; - Math_SmoothStepToF(&boss->fwork[16], boss->fwork[15], 1.0f, 4.0f, 0.01f); + this->fwork[6] += 5.0f; + Math_SmoothStepToF(&this->fwork[16], this->fwork[15], 1.0f, 4.0f, 0.01f); break; case 2: - boss->fwork[9] = 200.0f / (boss->health + 100.0f); - boss->fwork[8] -= boss->fwork[9]; - if (boss->fwork[8] < 0.0f) { - boss->fwork[8] = 22.0f; + this->fwork[9] = 200.0f / (this->health + 100.0f); + this->fwork[8] -= this->fwork[9]; + if (this->fwork[8] < 0.0f) { + this->fwork[8] = 22.0f; } break; case 3: - boss->fwork[9] = 200.0f / ((2.0f * boss->health) + 100.0f); - boss->fwork[8] -= boss->fwork[9]; - if (boss->fwork[8] <= 0.0f) { - boss->fwork[8] = 22.0f; + this->fwork[9] = 200.0f / ((2.0f * this->health) + 100.0f); + this->fwork[8] -= this->fwork[9]; + if (this->fwork[8] <= 0.0f) { + this->fwork[8] = 22.0f; } break; } - switch (boss->swork[6]) { + switch (this->swork[6]) { case 0: - temp_fs0 = gPlayer[0].trueZpos + boss->fwork[2]; - if (boss->swork[15] == 0) { - if (boss->obj.pos.z >= temp_fs0) { - if (boss->obj.pos.z > (gPlayer[0].trueZpos - 200.0f)) { - var_fv0 = Math_SmoothStepToF(&boss->obj.pos.z, temp_fs0, 0.5f, 35.0f, 0.01f); + temp_fs0 = gPlayer[0].trueZpos + this->fwork[2]; + if (this->swork[15] == 0) { + if (this->obj.pos.z >= temp_fs0) { + if (this->obj.pos.z > (gPlayer[0].trueZpos - 200.0f)) { + var_fv0 = Math_SmoothStepToF(&this->obj.pos.z, temp_fs0, 0.5f, 35.0f, 0.01f); } else { - var_fv0 = Math_SmoothStepToF(&boss->obj.pos.z, temp_fs0, 0.4f, 10.0f, 0.01f); + var_fv0 = Math_SmoothStepToF(&this->obj.pos.z, temp_fs0, 0.4f, 10.0f, 0.01f); } } else { - var_fv0 = Math_SmoothStepToF(&boss->obj.pos.z, temp_fs0, 0.2f, 25.0f, 0.01f); + var_fv0 = Math_SmoothStepToF(&this->obj.pos.z, temp_fs0, 0.2f, 25.0f, 0.01f); } - boss->fwork[11] = (-40.0f + var_fv0) / -40.0f; - if (boss->fwork[11] < 0.8f) { - boss->fwork[11] = 0.8f; + this->fwork[11] = (-40.0f + var_fv0) / -40.0f; + if (this->fwork[11] < 0.8f) { + this->fwork[11] = 0.8f; } if (fabsf(var_fv0) <= 2.0f) { - boss->swork[15] = 1; - boss->swork[14] = D_i1_8019A04C[boss->swork[13]][1]; + this->swork[15] = 1; + this->swork[14] = D_i1_8019A04C[this->swork[13]][1]; } } else { - if ((gPlayer[0].pos.z - boss->obj.pos.z < 500.0f) || (gPlayer[0].pos.z - boss->obj.pos.z > 8000.0f)) { - boss->swork[14] = 0; + if ((gPlayer[0].pos.z - this->obj.pos.z < 500.0f) || (gPlayer[0].pos.z - this->obj.pos.z > 8000.0f)) { + this->swork[14] = 0; } - if (boss->swork[14] <= 0) { - boss->swork[15] = 0; - boss->swork[13]++; - if (boss->swork[13] >= 3U) { - boss->swork[13] = 0; + if (this->swork[14] <= 0) { + this->swork[15] = 0; + this->swork[13]++; + if (this->swork[13] >= 3U) { + this->swork[13] = 0; } - boss->fwork[2] = D_i1_8019A04C[boss->swork[13]][0]; - boss->swork[14] = D_i1_8019A04C[boss->swork[13]][1]; + this->fwork[2] = D_i1_8019A04C[this->swork[13]][0]; + this->swork[14] = D_i1_8019A04C[this->swork[13]][1]; } else { - boss->swork[14]--; + this->swork[14]--; } } - boss->vel.z = -40.0f; + this->vel.z = -40.0f; break; case 1: - if ((boss->vel.y <= -10.0f) && (boss->swork[5] != 5)) { + if ((this->vel.y <= -10.0f) && (this->swork[5] != 5)) { spE8 = 1; } - if (boss->obj.pos.y < 0.f) { - boss->obj.pos.y = 0.f; - boss->vel.y = 0.f; - boss->gravity = 0.f; - boss->swork[6] = 2; - boss->swork[10] = 16; + if (this->obj.pos.y < 0.f) { + this->obj.pos.y = 0.f; + this->vel.y = 0.f; + this->gravity = 0.f; + this->swork[6] = 2; + this->swork[10] = 16; gCameraShake = 40; - boss->swork[23] = RAND_FLOAT(5.0f); - AUDIO_PLAY_SFX(NA_SE_OB_VEBOSS_LAND, boss->sfxSource, 4); + this->swork[23] = RAND_FLOAT(5.0f); + AUDIO_PLAY_SFX(NA_SE_OB_VEBOSS_LAND, this->sfxSource, 4); spB8 = 3; - boss->swork[28] = 5; + this->swork[28] = 5; } break; case 2: - boss->vel.z *= 0.7f; + this->vel.z *= 0.7f; break; case 4: - temp_fs0 = gPlayer[0].pos.z + boss->fwork[2]; - if (temp_fs0 <= boss->obj.pos.z) { - var_fv0 = Math_SmoothStepToF(&boss->obj.pos.z, temp_fs0, 0.4f, 20.0f, 0.01f); + temp_fs0 = gPlayer[0].pos.z + this->fwork[2]; + if (temp_fs0 <= this->obj.pos.z) { + var_fv0 = Math_SmoothStepToF(&this->obj.pos.z, temp_fs0, 0.4f, 20.0f, 0.01f); } else { - var_fv0 = Math_SmoothStepToF(&boss->obj.pos.z, temp_fs0, 0.2f, 30.0f, 0.01f); + var_fv0 = Math_SmoothStepToF(&this->obj.pos.z, temp_fs0, 0.2f, 30.0f, 0.01f); } - if (boss->state < 4) { - boss->fwork[11] = (-40.0f + var_fv0) / -40.0f; - if (boss->fwork[11] < 0.8f) { - boss->fwork[11] = 0.8f; + if (this->state < 4) { + this->fwork[11] = (-40.0f + var_fv0) / -40.0f; + if (this->fwork[11] < 0.8f) { + this->fwork[11] = 0.8f; } } - temp_fs0 = gPlayer[0].trueZpos + boss->fwork[2] - boss->obj.pos.z; - if ((fabsf(temp_fs0) <= 70.0f) && (boss->state == 3)) { - boss->swork[5] = D_i1_8019AD2C[4].unk_0->unk_0; - boss->swork[4] = boss->swork[4]; - boss->fwork[0] = 0.0f; - boss->fwork[10] = 0.0f; - boss->fwork[11] = 1.0f; - boss->swork[7] = 2; - boss->swork[9] = 4; - boss->swork[1] = 4; - boss->swork[2] = 0; - boss->swork[6] = 5; - boss->timer_050 = 3; - boss->timer_052 = 150; + temp_fs0 = gPlayer[0].trueZpos + this->fwork[2] - this->obj.pos.z; + if ((fabsf(temp_fs0) <= 70.0f) && (this->state == 3)) { + this->swork[5] = D_i1_8019AD2C[4].unk_0->unk_0; + this->swork[4] = this->swork[4]; + this->fwork[0] = 0.0f; + this->fwork[10] = 0.0f; + this->fwork[11] = 1.0f; + this->swork[7] = 2; + this->swork[9] = 4; + this->swork[1] = 4; + this->swork[2] = 0; + this->swork[6] = 5; + this->timer_050 = 3; + this->timer_052 = 150; } - boss->vel.z = -40.0f; + this->vel.z = -40.0f; break; case 5: - boss->vel.z = gPlayer[0].vel.z; + this->vel.z = gPlayer[0].vel.z; break; case 3: - Math_SmoothStepToF(&boss->vel.z, 0.0f, 0.5f, 0.3f, 0.01f); + Math_SmoothStepToF(&this->vel.z, 0.0f, 0.5f, 0.3f, 0.01f); break; case 6: break; } - switch (boss->swork[5]) { + switch (this->swork[5]) { case 0: case 1: case 2: @@ -1801,31 +1804,31 @@ void Venom1_Boss_Update(Boss* boss) { case 5: case 6: case 7: - Animation_GetFrameData(D_i1_8019ACD4[boss->swork[5]], boss->fwork[10], sp118); + Animation_GetFrameData(D_i1_8019ACD4[this->swork[5]], this->fwork[10], sp118); break; case 8: break; } - if ((boss->swork[5] == 0) || (boss->swork[5] == 1) || (boss->swork[5] == 3)) { + if ((this->swork[5] == 0) || (this->swork[5] == 1) || (this->swork[5] == 3)) { if (1) {} - switch (boss->swork[27]) { + switch (this->swork[27]) { case 0: - if (boss->fwork[10] > 14.0f) { - AUDIO_PLAY_SFX(NA_SE_OB_VEBOSS_WALK, boss->sfxSource, 4); - boss->swork[27]++; + if (this->fwork[10] > 14.0f) { + AUDIO_PLAY_SFX(NA_SE_OB_VEBOSS_WALK, this->sfxSource, 4); + this->swork[27]++; } break; case 1: - if (boss->fwork[10] > 45.0f) { - AUDIO_PLAY_SFX(NA_SE_OB_VEBOSS_WALK, boss->sfxSource, 4); - boss->swork[27]++; + if (this->fwork[10] > 45.0f) { + AUDIO_PLAY_SFX(NA_SE_OB_VEBOSS_WALK, this->sfxSource, 4); + this->swork[27]++; } break; case 2: break; } } - switch (boss->swork[5]) { + switch (this->swork[5]) { case 0: case 1: case 3: @@ -1834,18 +1837,18 @@ void Venom1_Boss_Update(Boss* boss) { case 6: break; case 7: - if (boss->timer_052 >= 37) { - if (boss->timer_050 == 1) { - boss->swork[11] |= 4; - } else if (boss->timer_050 == 0) { - spF8.x = boss->obj.pos.x + boss->fwork[3]; - spF8.y = boss->obj.pos.y + boss->fwork[4]; - spF8.z = boss->obj.pos.z + boss->fwork[5]; + if (this->timer_052 >= 37) { + if (this->timer_050 == 1) { + this->swork[11] |= 4; + } else if (this->timer_050 == 0) { + spF8.x = this->obj.pos.x + this->fwork[3]; + spF8.y = this->obj.pos.y + this->fwork[4]; + spF8.z = this->obj.pos.z + this->fwork[5]; func_effect_8007D2C8(spF8.x, spF8.y, spF8.z, 5.0f); - boss->timer_050 = 3; + this->timer_050 = 3; } } - switch (boss->timer_052) { + switch (this->timer_052) { case 126: D_i1_8019B838[6].unk_7C |= 0x800; D_i1_8019B838[6].unk_60 = 10.0f; @@ -1855,8 +1858,8 @@ void Venom1_Boss_Update(Boss* boss) { break; case 122: gCameraShake = 20; - boss->swork[28] = 7; - AUDIO_PLAY_SFX(NA_SE_OB_VEBOSS_BOUND, boss->sfxSource, 4); + this->swork[28] = 7; + AUDIO_PLAY_SFX(NA_SE_OB_VEBOSS_BOUND, this->sfxSource, 4); D_i1_8019B838[2].unk_60 = 5.0f; D_i1_8019B838[2].unk_7C |= 0x800; D_i1_8019B838[5].unk_7C |= 0x800; @@ -1871,8 +1874,8 @@ void Venom1_Boss_Update(Boss* boss) { break; case 118: gCameraShake = 30; - boss->swork[28] = 7; - AUDIO_PLAY_SFX(NA_SE_OB_VEBOSS_BOUND, boss->sfxSource, 4); + this->swork[28] = 7; + AUDIO_PLAY_SFX(NA_SE_OB_VEBOSS_BOUND, this->sfxSource, 4); D_i1_8019B838[8].unk_7C |= 0x800; D_i1_8019B838[8].unk_60 = 10.0f; break; @@ -1880,12 +1883,12 @@ void Venom1_Boss_Update(Boss* boss) { D_i1_8019B838[7].unk_7C |= 0x20; break; case 91: - boss->swork[28] = 7; - AUDIO_PLAY_SFX(NA_SE_OB_VEBOSS_BOUND, boss->sfxSource, 4); + this->swork[28] = 7; + AUDIO_PLAY_SFX(NA_SE_OB_VEBOSS_BOUND, this->sfxSource, 4); break; case 78: - boss->swork[28] = 7; - AUDIO_PLAY_SFX(NA_SE_OB_VEBOSS_BOUND, boss->sfxSource, 4); + this->swork[28] = 7; + AUDIO_PLAY_SFX(NA_SE_OB_VEBOSS_BOUND, this->sfxSource, 4); gCameraShake = 20; D_i1_8019B838[10].unk_7C |= 0x800; D_i1_8019B838[10].unk_60 = 10.0f; @@ -1894,8 +1897,8 @@ void Venom1_Boss_Update(Boss* boss) { D_i1_8019B838[9].unk_7C |= 0x20; break; case 66: - boss->swork[28] = 7; - AUDIO_PLAY_SFX(NA_SE_OB_VEBOSS_BOUND, boss->sfxSource, 4); + this->swork[28] = 7; + AUDIO_PLAY_SFX(NA_SE_OB_VEBOSS_BOUND, this->sfxSource, 4); D_i1_8019B838[11].unk_7C |= 0x20; break; case 65: @@ -1911,10 +1914,10 @@ void Venom1_Boss_Update(Boss* boss) { D_i1_8019B838->unk_7C |= 0x20; break; case 60: - spF8.x = boss->obj.pos.x + boss->fwork[3]; - spF8.y = boss->obj.pos.y + boss->fwork[4]; - spF8.z = boss->obj.pos.z + boss->fwork[5]; - func_effect_8007BFFC(spF8.x, spF8.y, spF8.z, 0, 0, 0, 25.0f, 5); + spF8.x = this->obj.pos.x + this->fwork[3]; + spF8.y = this->obj.pos.y + this->fwork[4]; + spF8.z = this->obj.pos.z + this->fwork[5]; + Effect386_Spawn1(spF8.x, spF8.y, spF8.z, 0, 0, 0, 25.0f, 5); gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; gFillScreenAlpha = gFillScreenAlphaTarget = 255; break; @@ -1926,7 +1929,7 @@ void Venom1_Boss_Update(Boss* boss) { gFillScreenAlpha = gFillScreenAlphaTarget = 0; break; case 50: - boss->swork[25] = 1; + this->swork[25] = 1; for (spF4 = 0; spF4 < ARRAY_COUNTU(D_i1_8019B838); spF4++) { if (!(D_i1_8019B838[spF4].unk_7C & 1)) { D_i1_8019B838[spF4].unk_7C |= 0x20; @@ -1934,14 +1937,14 @@ void Venom1_Boss_Update(Boss* boss) { } break; case 49: - Boss_AwardBonus(boss); - gShowBossHealth = 0; - boss->swork[28] = 9; - AUDIO_PLAY_SFX(NA_SE_OB_VEBOSS_BOUND, boss->sfxSource, 4); - boss->swork[26] = 1; - boss->info.hitbox = gNoHitbox; - boss->drawShadow = false; - func_effect_8007A568(boss->obj.pos.x, boss->obj.pos.y + 10.0f, boss->obj.pos.z, 40.0f); + Boss_AwardBonus(this); + gShowBossHealth = false; + this->swork[28] = 9; + AUDIO_PLAY_SFX(NA_SE_OB_VEBOSS_BOUND, this->sfxSource, 4); + this->swork[26] = 1; + this->info.hitbox = gNoHitbox; + this->drawShadow = false; + Effect_Effect383_Spawn(this->obj.pos.x, this->obj.pos.y + 10.0f, this->obj.pos.z, 40.0f); gCameraShake = 40; break; case 12: @@ -1949,42 +1952,42 @@ void Venom1_Boss_Update(Boss* boss) { gFillScreenAlpha = 0; gFillScreenAlphaTarget = 255; gFillScreenAlphaStep = 5; - boss->obj.status = OBJ_DYING; - boss->timer_052 = 80; + this->obj.status = OBJ_DYING; + this->timer_052 = 80; break; } break; case 2: - if (boss->fwork[10] >= 16.0f) { - switch (boss->swork[18]) { + if (this->fwork[10] >= 16.0f) { + switch (this->swork[18]) { case 0: - boss->swork[18]++; - boss->swork[11] |= 1; + this->swork[18]++; + this->swork[11] |= 1; break; case 1: - AUDIO_PLAY_SFX(NA_SE_OB_VEBOSS_ATTACK, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_VEBOSS_ATTACK, this->sfxSource, 4); gCameraShake = 40; - boss->swork[28] = 5; + this->swork[28] = 5; spB8 = spB4 = 1; - boss->swork[18]++; + this->swork[18]++; break; case 2: break; } } - if (boss->fwork[10] >= 43.0f) { - switch (boss->swork[19]) { + if (this->fwork[10] >= 43.0f) { + switch (this->swork[19]) { case 0: - boss->swork[19]++; - boss->swork[11] |= 2; + this->swork[19]++; + this->swork[11] |= 2; break; case 1: spB4 = 1; - AUDIO_PLAY_SFX(NA_SE_OB_VEBOSS_ATTACK, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_VEBOSS_ATTACK, this->sfxSource, 4); gCameraShake = 40; - boss->swork[28] = 5; + this->swork[28] = 5; spB8 = 2; - boss->swork[19]++; + this->swork[19]++; break; case 2: break; @@ -1992,105 +1995,105 @@ void Venom1_Boss_Update(Boss* boss) { } break; } - switch (boss->swork[7]) { + switch (this->swork[7]) { case 0: - if (boss->fwork[11] < 0.9f) { - Math_SmoothStepToF(&boss->fwork[0], 0.2f, 0.5f, 0.05f, 0.01f); - Math_SmoothStepToVec3fArray(sp118, boss->vwork, 1, 27, boss->fwork[0], 360.0f, 0.01f); + if (this->fwork[11] < 0.9f) { + Math_SmoothStepToF(&this->fwork[0], 0.2f, 0.5f, 0.05f, 0.01f); + Math_SmoothStepToVec3fArray(sp118, this->vwork, 1, 27, this->fwork[0], 360.0f, 0.01f); } else { - Math_SmoothStepToF(&boss->fwork[0], 1.0f, 0.5f, 0.05f, 0.01f); - Math_SmoothStepToVec3fArray(sp118, boss->vwork, 1, 27, boss->fwork[0], 360.0f, 0.01f); + Math_SmoothStepToF(&this->fwork[0], 1.0f, 0.5f, 0.05f, 0.01f); + Math_SmoothStepToVec3fArray(sp118, this->vwork, 1, 27, this->fwork[0], 360.0f, 0.01f); } break; case 1: - Math_SmoothStepToF(&boss->fwork[0], 1.0f, 0.1f, 0.05f, 0.01f); - Math_SmoothStepToVec3fArray(sp118, boss->vwork, 1, 27, boss->fwork[0], 360.0f, 0.01f); + Math_SmoothStepToF(&this->fwork[0], 1.0f, 0.1f, 0.05f, 0.01f); + Math_SmoothStepToVec3fArray(sp118, this->vwork, 1, 27, this->fwork[0], 360.0f, 0.01f); break; case 2: - Math_SmoothStepToF(&boss->fwork[0], 0.7f, 0.07f, 0.05f, 0.01f); - Math_SmoothStepToVec3fArray(sp118, boss->vwork, 1, 27, boss->fwork[0], 45.0f, 0.01f); + Math_SmoothStepToF(&this->fwork[0], 0.7f, 0.07f, 0.05f, 0.01f); + Math_SmoothStepToVec3fArray(sp118, this->vwork, 1, 27, this->fwork[0], 45.0f, 0.01f); break; } - switch (boss->swork[5]) { + switch (this->swork[5]) { case 0: case 1: case 2: case 3: case 6: - boss->fwork[10] += boss->fwork[11]; - if ((s32) boss->fwork[10] >= Animation_GetFrameCount(D_i1_8019ACD4[boss->swork[5]])) { + this->fwork[10] += this->fwork[11]; + if ((s32) this->fwork[10] >= Animation_GetFrameCount(D_i1_8019ACD4[this->swork[5]])) { spE8 = 1; } break; case 4: - if ((s32) boss->fwork[10] == 17) { + if ((s32) this->fwork[10] == 17) { if (gPlayer[0].vel.z < 0.0f) { - boss->vel.z = 2.0f * gPlayer[0].vel.z; + this->vel.z = 2.0f * gPlayer[0].vel.z; } else { - boss->vel.z = 0.0f; + this->vel.z = 0.0f; } - boss->swork[6] = 1; - boss->gravity = 3.0f; - boss->vel.y = 30.0f; + this->swork[6] = 1; + this->gravity = 3.0f; + this->vel.y = 30.0f; } - if (boss->fwork[10] < (Animation_GetFrameCount(D_i1_8019ACD4[boss->swork[5]]) - 1)) { - boss->fwork[10] += 1.0f; + if (this->fwork[10] < (Animation_GetFrameCount(D_i1_8019ACD4[this->swork[5]]) - 1)) { + this->fwork[10] += 1.0f; } break; case 5: - if ((s32) boss->fwork[10] == 2) { - boss->swork[17] = 5; + if ((s32) this->fwork[10] == 2) { + this->swork[17] = 5; } - if (boss->fwork[10] > 1.0f) { - boss->fwork[10] += -1.0f; - } else if (boss->swork[17] > 0) { - boss->swork[17]--; + if (this->fwork[10] > 1.0f) { + this->fwork[10] += -1.0f; + } else if (this->swork[17] > 0) { + this->swork[17]--; } else { spE8 = 1; } break; case 7: - if (boss->fwork[10] < (Animation_GetFrameCount(D_i1_8019ACD4[boss->swork[5]]) - 1.0f)) { - boss->fwork[10] += boss->fwork[11]; - Math_SmoothStepToF(&boss->fwork[11], 0.5f, 0.7f, 0.02f, 0.01f); - if (boss->fwork[11] < 0.7f) { - boss->fwork[11] = 0.7f; + if (this->fwork[10] < (Animation_GetFrameCount(D_i1_8019ACD4[this->swork[5]]) - 1.0f)) { + this->fwork[10] += this->fwork[11]; + Math_SmoothStepToF(&this->fwork[11], 0.5f, 0.7f, 0.02f, 0.01f); + if (this->fwork[11] < 0.7f) { + this->fwork[11] = 0.7f; } } else { - boss->swork[9] = 5; + this->swork[9] = 5; } break; case 8: break; } - temp_fv1 = gPlayer[0].pos.z - boss->obj.pos.z; - // is0 = boss->swork[1]; - // is5 = boss->swork[2]; + temp_fv1 = gPlayer[0].pos.z - this->obj.pos.z; + // is0 = this->swork[1]; + // is5 = this->swork[2]; // pad1 = spE8; // probably fake, but unclear how to resolve if (spE8 != 0) { - pad2 = D_i1_8019AD2C[boss->swork[1]].unk_0; - if ((pad2[boss->swork[2]].unk_2 & 1) && (boss->swork[3] != 0)) { + pad2 = D_i1_8019AD2C[this->swork[1]].unk_0; + if ((pad2[this->swork[2]].unk_2 & 1) && (this->swork[3] != 0)) { spE4 = 1; - if (boss->swork[3] > 0) { - boss->swork[3]--; + if (this->swork[3] > 0) { + this->swork[3]--; } } } - if ((D_i1_8019C0BC != 0) && (boss->state >= 3)) { + if ((D_i1_8019C0BC != 0) && (this->state >= 3)) { D_i1_8019C0BC = 0; } - if ((D_i1_8019C0BC != 0) && (boss->swork[1] != 2) && (boss->state < 3)) { + if ((D_i1_8019C0BC != 0) && (this->swork[1] != 2) && (this->state < 3)) { spE8 |= 2; spE4 = 1; } if (spE8 != 0) { - is0 = boss->swork[1]; - is5 = boss->swork[2] - spE4 + 1; - is1 = boss->swork[4]; + is0 = this->swork[1]; + is5 = this->swork[2] - spE4 + 1; + is1 = this->swork[4]; if (D_i1_8019C0BC != 0) { if (temp_fv1 < 5000.0f) { - boss->swork[24] = D_i1_8019C0BC - 1; + this->swork[24] = D_i1_8019C0BC - 1; is5 = 0; is0 = 2; } else { @@ -2104,7 +2107,7 @@ void Venom1_Boss_Update(Boss* boss) { // spE8 = pad1; do { is4 = 0; - is1 = boss->swork[4] + 1; + is1 = this->swork[4] + 1; is0 = D_i1_8019AD54[is1]; if (is0 == -1) { is0 = D_i1_8019AD54[0]; @@ -2112,7 +2115,7 @@ void Venom1_Boss_Update(Boss* boss) { } if (((is0 == 2) && (temp_fv1 < 5000.0f)) || ((is0 == 1) && (D_i1_8019C0B8 == 0)) || ((is0 == 0) && (D_i1_8019C0B8 == 1))) { - boss->swork[4] = is1; + this->swork[4] = is1; is4 = 1; } if (D_i1_8019C0B8 >= 2) { @@ -2121,22 +2124,22 @@ void Venom1_Boss_Update(Boss* boss) { switch (is0) { case 1: if (is3 > 0) { - boss->swork[3] = is3 - 1; + this->swork[3] = is3 - 1; } else { is4 = 1; - boss->swork[4] = is1; + this->swork[4] = is1; } break; case 0: if (ia0 > 0) { - boss->swork[3] = ia0 - 1; + this->swork[3] = ia0 - 1; } else { is4 = 1; - boss->swork[4] = is1; + this->swork[4] = is1; } break; case 3: - boss->swork[3] = -1; + this->swork[3] = -1; break; } } @@ -2149,82 +2152,82 @@ void Venom1_Boss_Update(Boss* boss) { pad2 = D_i1_8019AD2C[is0].unk_0; is2 = pad2[is5].unk_0; if (spE8 != 0) { - boss->swork[27] = 0; + this->swork[27] = 0; switch (is2) { case 2: - boss->swork[23] = RAND_FLOAT(2.0f); - boss->swork[18] = 0; - boss->swork[19] = 0; + this->swork[23] = RAND_FLOAT(2.0f); + this->swork[18] = 0; + this->swork[19] = 0; /* fallthrough */ case 3: if ((is2 == 3) && (D_i1_8019C0B8 == 2)) { is2 = 2; is5--; - boss->swork[18] = 0; - boss->swork[19] = 0; + this->swork[18] = 0; + this->swork[19] = 0; } /* fallthrough */ case 0: case 1: - boss->swork[6] = 0; - boss->fwork[10] = 0; - if (boss->swork[5] == 5) { - boss->fwork[0] = 0; - boss->swork[7] = 1; + this->swork[6] = 0; + this->fwork[10] = 0; + if (this->swork[5] == 5) { + this->fwork[0] = 0; + this->swork[7] = 1; } else { - boss->swork[7] = 0; + this->swork[7] = 0; } break; case 4: - AUDIO_PLAY_SFX(NA_SE_OB_VEBOSS_JUMP, boss->sfxSource, 4); - boss->swork[7] = 1; - boss->fwork[10] = 0; - boss->gravity = 0; - boss->fwork[0] = 0; + AUDIO_PLAY_SFX(NA_SE_OB_VEBOSS_JUMP, this->sfxSource, 4); + this->swork[7] = 1; + this->fwork[10] = 0; + this->gravity = 0; + this->fwork[0] = 0; break; case 5: - boss->fwork[10] = Animation_GetFrameCount(D_i1_8019ACD4[boss->swork[5]]) - 1; - boss->swork[7] = 1; - boss->gravity = 0; - boss->fwork[0] = 0; + this->fwork[10] = Animation_GetFrameCount(D_i1_8019ACD4[this->swork[5]]) - 1; + this->swork[7] = 1; + this->gravity = 0; + this->fwork[0] = 0; break; case 6: - boss->fwork[10] = 0; + this->fwork[10] = 0; break; case 7: break; } - boss->swork[4] = is1; - boss->swork[1] = is0; - boss->swork[2] = is5; - boss->swork[5] = is2; + this->swork[4] = is1; + this->swork[1] = is0; + this->swork[2] = is5; + this->swork[5] = is2; } } - if ((boss->health <= 0) && (boss->state == 2) && (boss->swork[1] != 2) && (boss->obj.pos.y <= 0)) { - boss->swork[5] = D_i1_8019AD2C[3].unk_0->unk_0; - boss->swork[4] = boss->swork[4]; - boss->swork[9] = 3; - boss->swork[3] = -1; - boss->fwork[10] = 0; - boss->fwork[11] = 1.0f; - boss->fwork[2] = -2000.0f; - boss->swork[7] = 0; - boss->swork[1] = 3; - boss->swork[2] = 0; - boss->swork[6] = 4; + if ((this->health <= 0) && (this->state == 2) && (this->swork[1] != 2) && (this->obj.pos.y <= 0)) { + this->swork[5] = D_i1_8019AD2C[3].unk_0->unk_0; + this->swork[4] = this->swork[4]; + this->swork[9] = 3; + this->swork[3] = -1; + this->fwork[10] = 0; + this->fwork[11] = 1.0f; + this->fwork[2] = -2000.0f; + this->swork[7] = 0; + this->swork[1] = 3; + this->swork[2] = 0; + this->swork[6] = 4; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 0); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 0); } if ((spB4 == 1) || (spB4 == 2)) { - effect = func_effect_8007783C(OBJ_EFFECT_394); + effect = Effect_Load(OBJ_EFFECT_394); if (effect != NULL) { - Matrix_MultVec3f(gCalcMatrix, (Vec3f*) &boss->fwork[3], &spF8); + Matrix_MultVec3f(gCalcMatrix, (Vec3f*) &this->fwork[3], &spF8); effect->unk_78 = effect->unk_7A = 11; - effect->obj.pos.x = boss->obj.pos.x + spF8.x; - effect->obj.pos.y = boss->obj.pos.y + spF8.y; - effect->obj.pos.z = boss->obj.pos.z + spF8.z; + effect->obj.pos.x = this->obj.pos.x + spF8.x; + effect->obj.pos.y = this->obj.pos.y + spF8.y; + effect->obj.pos.z = this->obj.pos.z + spF8.z; effect->scale2 = 8.0f; effect->obj.rot.z = RAND_FLOAT(360.0f); @@ -2241,73 +2244,73 @@ void Venom1_Boss_Update(Boss* boss) { switch (spB8) { case 1: is3 = 0; - actor = gActors; - is4 = boss->swork[23]; - temp_fs0 = boss->obj.pos.z; + actor = &gActors[0]; + is4 = this->swork[23]; + temp_fs0 = this->obj.pos.z; var_fv0 = -1500.0f; for (spF4 = 0; spF4 < ARRAY_COUNT(gActors); spF4++, actor++) { if (actor->obj.status == OBJ_FREE) { - while ((is3 <= boss->swork[22]) && + while ((is3 <= this->swork[22]) && ((temp_fs0 + D_i1_80199CD0[is4][is3].z) >= (var_fv0 + gPlayer[0].trueZpos))) { is3++; } - if (is3 <= boss->swork[22]) { + if (is3 <= this->swork[22]) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_280; + actor->obj.id = OBJ_ACTOR_VE1_PILLAR_1; actor->obj.pos.x = D_i1_80199CD0[is4][is3].x; actor->obj.pos.y = D_i1_80199CD0[is4][is3].y; - actor->obj.pos.z = D_i1_80199CD0[is4][is3].z + boss->obj.pos.z; + actor->obj.pos.z = D_i1_80199CD0[is4][is3].z + this->obj.pos.z; actor->state = 1; Object_SetInfo(&actor->info, actor->obj.id); } is3++; - if (is3 > boss->swork[22]) { + if (is3 > this->swork[22]) { break; } } - boss->swork[16] = 8; + this->swork[16] = 8; } break; case 2: is3 = 0; - actor = gActors; - is4 = boss->swork[23]; - temp_fs0 = boss->obj.pos.z; + actor = &gActors[0]; + is4 = this->swork[23]; + temp_fs0 = this->obj.pos.z; var_fv0 = -1500.0f; for (spF4 = 0; spF4 < ARRAY_COUNT(gActors); spF4++, actor++) { if (actor->obj.status == OBJ_FREE) { - while ((is3 < boss->swork[22]) && + while ((is3 < this->swork[22]) && (D_i1_80199B40[is4][is3].z + temp_fs0) >= (gPlayer[0].pos.z + var_fv0)) { is3++; } - if (is3 <= boss->swork[22]) { + if (is3 <= this->swork[22]) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_280; + actor->obj.id = OBJ_ACTOR_VE1_PILLAR_1; actor->obj.pos.x = D_i1_80199B40[is4][is3].x; actor->obj.pos.y = D_i1_80199B40[is4][is3].y; - actor->obj.pos.z = D_i1_80199B40[is4][is3].z + boss->obj.pos.z; + actor->obj.pos.z = D_i1_80199B40[is4][is3].z + this->obj.pos.z; actor->obj.rot.y = 180.0f; actor->state = 1; Object_SetInfo(&actor->info, actor->obj.id); } is3++; - if (is3 > boss->swork[22]) { + if (is3 > this->swork[22]) { break; } } } - boss->swork[16] = 8; + this->swork[16] = 8; break; case 3: - if (boss->swork[24] == 1) { + if (this->swork[24] == 1) { is3 = 0; - actor = gActors; - is4 = boss->swork[23]; - temp_fs0 = boss->obj.pos.z; + actor = &gActors[0]; + is4 = this->swork[23]; + temp_fs0 = this->obj.pos.z; var_fv0 = gPlayer[0].pos.z + -1500.0f; for (spF4 = 0; spF4 < ARRAY_COUNT(gActors); spF4++, actor++) { if (actor->obj.status == OBJ_FREE) { @@ -2317,10 +2320,10 @@ void Venom1_Boss_Update(Boss* boss) { if (is3 <= D_i1_80199E60[is4]) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_283; + actor->obj.id = OBJ_ACTOR_VE1_PILLAR_4; actor->obj.pos.x = D_i1_80199E6C[is4][is3].x; actor->obj.pos.y = D_i1_80199E6C[is4][is3].y; - actor->obj.pos.z = D_i1_80199E6C[is4][is3].z + boss->obj.pos.z; + actor->obj.pos.z = D_i1_80199E6C[is4][is3].z + this->obj.pos.z; actor->state = 1; Object_SetInfo(&actor->info, actor->obj.id); } @@ -2331,23 +2334,23 @@ void Venom1_Boss_Update(Boss* boss) { } } } - actor = gActors; + actor = &gActors[0]; for (spF4 = 0; spF4 < ARRAY_COUNT(gActors); spF4++, actor++) { - if (((actor->obj.id == OBJ_ACTOR_281) || (actor->obj.id == OBJ_ACTOR_282)) && (actor->state == 0) && - (100.f <= (actor->obj.pos.z - boss->obj.pos.z)) && - ((actor->obj.pos.z - boss->obj.pos.z) <= 2400.0f)) { + if (((actor->obj.id == OBJ_ACTOR_VE1_PILLAR_2) || (actor->obj.id == OBJ_ACTOR_VE1_PILLAR_3)) && + (actor->state == 0) && (100.f <= (actor->obj.pos.z - this->obj.pos.z)) && + ((actor->obj.pos.z - this->obj.pos.z) <= 2400.0f)) { actor->state = 1; } } - boss->swork[16] = 8; + this->swork[16] = 8; } } #else -void Venom1_Boss_Update(Boss* boss); -#pragma GLOBAL_ASM("asm/us/rev1/nonmatchings/overlays/ovl_i1/fox_ve1/Venom1_Boss_Update.s") +void Venom1_Ve1Golemech_Update(Ve1Golemech* this); +#pragma GLOBAL_ASM("asm/us/rev1/nonmatchings/overlays/ovl_i1/fox_ve1/Venom1_Ve1Golemech_Update.s") #endif -void Venom1_80198310(Boss* boss) { +void Venom1_Ve1Golemech_SetShadow(Ve1Golemech* this) { RCP_SetupDL(&gMasterDisp, SETUPDL_65); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 0); @@ -2381,18 +2384,18 @@ void Venom1_80198414(void) { Audio_KillSfxBySource(gPlayer[0].sfxSource); } -void Venom1_80198594(Boss* boss) { - boss->obj.pos.z = gPlayer[0].pos.z; - if ((boss->timer_052 <= 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { +void Venom1_Ve1Golemech_Dying(Ve1Golemech* this) { + this->obj.pos.z = gPlayer[0].pos.z; + if ((this->timer_052 <= 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { Venom1_80198414(); } } -void Venom1_Boss_Draw(Boss319* boss) { - if (boss->swork[26] == 0) { - Animation_DrawSkeleton(0, D_VE1_901C0F4, boss->vwork, Venom1_801937F4, Venom1_80193D64, boss, &gIdentityMatrix); +void Venom1_Ve1Golemech_Draw(Ve1Golemech* this) { + if (this->swork[26] == 0) { + Animation_DrawSkeleton(0, D_VE1_901C0F4, this->vwork, Venom1_801937F4, Venom1_80193D64, this, &gIdentityMatrix); } - boss->state = boss->swork[9]; + this->state = this->swork[9]; } void Venom1_8019864C(PlayerShot* shot) { @@ -2400,28 +2403,28 @@ void Venom1_8019864C(PlayerShot* shot) { s32 j; s32 count; f32* hitboxData; - Boss* boss; + Ve1Golemech* golemech = &gBosses[0]; Vec3f sp88; f32 temp_fs1; Vec3f sp78; Vec3f diff; - boss = gBosses; - for (i = 0; i < ARRAY_COUNT(gBosses); i++, boss++) { - if ((boss->obj.id == OBJ_BOSS_VE1) && (boss->obj.status == OBJ_ACTIVE) && (boss->timer_05A == 0)) { + for (i = 0; i < ARRAY_COUNT(gBosses); i++, golemech++) { + if ((golemech->obj.id == OBJ_BOSS_VE1_GOLEMECH) && (golemech->obj.status == OBJ_ACTIVE) && + (golemech->timer_05A == 0)) { temp_fs1 = shot->scale * 30.0f; - hitboxData = boss->info.hitbox; + hitboxData = golemech->info.hitbox; count = *hitboxData++; if (count != 0) { for (j = 0; j < count; j++, hitboxData += 6) { if (hitboxData[1] > -100.0f) { - Matrix_RotateZ(gCalcMatrix, -boss->obj.rot.z * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -boss->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gCalcMatrix, -boss->obj.rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -golemech->obj.rot.z * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -golemech->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -golemech->obj.rot.y * M_DTOR, MTXF_APPLY); - sp88.x = shot->obj.pos.x - boss->obj.pos.x; - sp88.y = shot->obj.pos.y - boss->obj.pos.y; - sp88.z = shot->obj.pos.z - boss->obj.pos.z; + sp88.x = shot->obj.pos.x - golemech->obj.pos.x; + sp88.y = shot->obj.pos.y - golemech->obj.pos.y; + sp88.z = shot->obj.pos.z - golemech->obj.pos.z; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp88, &sp78); diff --git a/src/overlays/ovl_i2/fox_me.c b/src/overlays/ovl_i2/fox_me.c index e30a1917..fac00b76 100644 --- a/src/overlays/ovl_i2/fox_me.c +++ b/src/overlays/ovl_i2/fox_me.c @@ -50,7 +50,7 @@ void Meteo_ReflectDamage(Actor* this) { } } -void Meteo_Actor181_Update(Actor181* this) { +void Meteo_MeMeteor1_Update(MeMeteor1* this) { Vec3f vec; if (this->dmgType != DMG_NONE) { @@ -75,7 +75,7 @@ void Meteo_Actor181_Update(Actor181* this) { Meteo_ReflectDamage(this); } -void Meteo_Actor182_Update(Actor182* this) { +void Meteo_MeMeteor2_Update(MeMeteor2* this) { Vec3f vec; this->obj.rot.y += 1.7f; @@ -114,7 +114,7 @@ void Meteo_Actor182_Update(Actor182* this) { Meteo_ReflectDamage(this); } -void Meteo_Actor187_Update(Actor187* this) { +void Meteo_MeLaserCannon2_Update(MeLaserCannon2* this) { Vec3f dest; Vec3f src; @@ -136,7 +136,7 @@ void Meteo_Actor187_Update(Actor187* this) { Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); Object_Kill(&this->obj, this->sfxSource); func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y + 30.0f, this->obj.pos.z, 5.0f); - func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y + 30.0f, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 3.0f, 10); + Effect386_Spawn1(this->obj.pos.x, this->obj.pos.y + 30.0f, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 3.0f, 10); } if (this->timer_0BC == 0) { @@ -147,7 +147,7 @@ void Meteo_Actor187_Update(Actor187* this) { } } -void Meteo_Actor186_Update(Actor186* this) { +void Meteo_MeLaserCannon1_Update(MeLaserCannon1* this) { Vec3f vec; s32 pad[2]; @@ -159,8 +159,8 @@ void Meteo_Actor186_Update(Actor186* this) { Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); Object_Kill(&this->obj, this->sfxSource); func_effect_8007D0E0(this->obj.pos.x - this->vel.x, this->obj.pos.y, this->obj.pos.z - this->vel.z, 8.0f); - func_effect_8007BFFC(this->obj.pos.x - this->vel.x, this->obj.pos.y + 30.0f, this->obj.pos.z - this->vel.z, - 0.0f, 0.0f, 0.0f, 4.0f, 10); + Effect386_Spawn1(this->obj.pos.x - this->vel.x, this->obj.pos.y + 30.0f, this->obj.pos.z - this->vel.z, 0.0f, + 0.0f, 0.0f, 4.0f, 10); } if ((gGameFrameCount % 8) == 0) { @@ -171,7 +171,7 @@ void Meteo_Actor186_Update(Actor186* this) { } } -void Meteo_80187B08(Actor186* this) { +void Meteo_80187B08(MeLaserCannon1* this) { this->obj.rot.y += 7.0f; this->obj.rot.x += 3.3f; @@ -194,8 +194,8 @@ void Meteo_80187B08(Actor186* this) { Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); Object_Kill(&this->obj, this->sfxSource); func_effect_8007D0E0(this->obj.pos.x - this->vel.x, this->obj.pos.y, this->obj.pos.z - this->vel.z, 8.0f); - func_effect_8007BFFC(this->obj.pos.x - this->vel.x, this->obj.pos.y + 30.0f, this->obj.pos.z - this->vel.z, - 0.0f, 0.0f, 0.0f, 4.0f, 10); + Effect386_Spawn1(this->obj.pos.x - this->vel.x, this->obj.pos.y + 30.0f, this->obj.pos.z - this->vel.z, 0.0f, + 0.0f, 0.0f, 4.0f, 10); } } @@ -297,7 +297,7 @@ void Meteo_80187FF8(Effect371* this, f32 x, f32 y, f32 z) { Object_SetInfo(&this->info, this->obj.id); } -void Meteo_80188088(Boss297* this) { +void Meteo_80188088(MeCrusher* this) { s32 i; for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { @@ -316,7 +316,7 @@ void Meteo_80188088(Boss297* this) { } } -void Meteo_801881A8(Effect370* this, f32 x, f32 y, f32 z, f32 zRot, s32 arg5) { +void Meteo_Effect370_Setup1(Effect370* this, f32 x, f32 y, f32 z, f32 zRot, s32 arg5) { Effect_Initialize(this); this->obj.status = OBJ_INIT; this->obj.id = OBJ_EFFECT_370; @@ -331,30 +331,30 @@ void Meteo_801881A8(Effect370* this, f32 x, f32 y, f32 z, f32 zRot, s32 arg5) { Object_SetInfo(&this->info, this->obj.id); } -void Meteo_80188228(f32 x, f32 y, f32 z, f32 zRot) { +void Meteo_Effect370_Spawn1(f32 x, f32 y, f32 z, f32 zRot) { s32 i; for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { - Meteo_801881A8(&gEffects[i], x, y, z, zRot, 0); + Meteo_Effect370_Setup1(&gEffects[i], x, y, z, zRot, 0); break; } } } -void Meteo_80188298(f32 x, f32 y, f32 z, f32 zRot) { +void Meteo_Effect370_Spawn2(f32 x, f32 y, f32 z, f32 zRot) { s32 i; for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { - Meteo_801881A8(&gEffects[i], x, y, z, zRot, -1); + Meteo_Effect370_Setup1(&gEffects[i], x, y, z, zRot, -1); AUDIO_PLAY_SFX(NA_SE_EN_GRN_BEAM_SHOT, gEffects[i].sfxSource, 4); break; } } } -void Meteo_Boss298_Update(Boss298* this) { +void Meteo_MeCrusherShield_Update(MeCrusherShield* this) { Vec3f src; Vec3f dest; f32 temp; @@ -421,12 +421,12 @@ void Meteo_Boss298_Update(Boss298* this) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - Meteo_80188298(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, - this->obj.rot.z - 45.0f); - Meteo_80188228(this->obj.pos.x - dest.x, this->obj.pos.y - dest.y, this->obj.pos.z + dest.z, - this->obj.rot.z - 45.0f); - Meteo_80188228(this->obj.pos.x + dest.y, this->obj.pos.y - dest.x, this->obj.pos.z + dest.z, - (this->obj.rot.z - 45.0f) + 90.0f); + Meteo_Effect370_Spawn2(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, + this->obj.rot.z - 45.0f); + Meteo_Effect370_Spawn1(this->obj.pos.x - dest.x, this->obj.pos.y - dest.y, this->obj.pos.z + dest.z, + this->obj.rot.z - 45.0f); + Meteo_Effect370_Spawn1(this->obj.pos.x + dest.y, this->obj.pos.y - dest.x, this->obj.pos.z + dest.z, + (this->obj.rot.z - 45.0f) + 90.0f); } } break; @@ -441,8 +441,8 @@ void Meteo_Boss298_Update(Boss298* this) { case 4: if (this->timer_050 == 0) { func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 500.0f, 30.0f); - func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 500.0f, 0.0f, 0.0f, 0.0f, - 20.0f, 30); + Effect386_Spawn1(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 500.0f, 0.0f, 0.0f, 0.0f, 20.0f, + 30); this->state = 5; this->info.cullDistance = 1000.0f; @@ -468,7 +468,7 @@ void Meteo_Boss298_Update(Boss298* this) { } } -void Meteo_Boss298_Draw(Boss298* this) { +void Meteo_MeCrusherShield_Draw(MeCrusherShield* this) { s32 i; if ((this->timer_054 % 2) != 0) { @@ -502,7 +502,7 @@ void Meteo_Boss298_Draw(Boss298* this) { } } -void Meteo_Boss297_Init(Boss297* this) { +void Meteo_MeCrusher_Init(MeCrusher* this) { s32 i; AUDIO_PLAY_BGM(gBossBgms[gCurrentLevel]); @@ -525,7 +525,7 @@ void Meteo_Boss297_Init(Boss297* this) { Boss_Initialize(&gBosses[i]); gBosses[i].obj.status = OBJ_INIT; - gBosses[i].obj.id = OBJ_BOSS_298; + gBosses[i].obj.id = OBJ_BOSS_ME_CRUSHER_SHIELD; gBosses[i].obj.pos.x = this->obj.pos.x; gBosses[i].obj.pos.y = this->obj.pos.y; gBosses[i].obj.pos.z = this->obj.pos.z; @@ -535,7 +535,7 @@ void Meteo_Boss297_Init(Boss297* this) { AUDIO_PLAY_SFX(NA_SE_EN_BURNER_L, this->sfxSource, 4); } -void Meteo_80188B84(Effect369* this, f32 x, f32 y, f32 z, f32 xRot, f32 yRot, f32 arg6, f32 arg7) { +void Meteo_Effect369_Setup(Effect369* this, f32 x, f32 y, f32 z, f32 xRot, f32 yRot, f32 arg6, f32 arg7) { Effect_Initialize(this); this->obj.status = OBJ_INIT; this->obj.id = OBJ_EFFECT_369; @@ -555,12 +555,12 @@ void Meteo_80188B84(Effect369* this, f32 x, f32 y, f32 z, f32 xRot, f32 yRot, f3 Object_SetInfo(&this->info, this->obj.id); } -void Meteo_80188C2C(f32 x, f32 y, f32 z, f32 xRot, f32 yRot, f32 arg5, f32 arg6) { +void Meteo_Effect369_Spawn(f32 x, f32 y, f32 z, f32 xRot, f32 yRot, f32 arg5, f32 arg6) { s32 i; for (i = 0; i < ARRAY_COUNT(gEffects); i++) { if (gEffects[i].obj.status == OBJ_FREE) { - Meteo_80188B84(&gEffects[i], x, y, z, xRot, yRot, arg5, arg6); + Meteo_Effect369_Setup(&gEffects[i], x, y, z, xRot, yRot, arg5, arg6); return; } } @@ -604,8 +604,8 @@ void Meteo_Effect369_Update(Effect369* this) { this->vel.y = dest.y; this->vel.z = dest.z; - Meteo_80188C2C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->obj.rot.x, this->obj.rot.y, - this->unk_60.z, 1.0f); + Meteo_Effect369_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->obj.rot.x, this->obj.rot.y, + this->unk_60.z, 1.0f); } else if (this->timer_50 == 0) { Object_Kill(&this->obj, this->sfxSource); } @@ -613,7 +613,7 @@ void Meteo_Effect369_Update(Effect369* this) { func_effect_8007A774(gPlayer, this, 90.0f); } -void Meteo_80188E8C(Effect370* this, f32 x, f32 y, f32 z, f32 xRot, f32 yRot, f32 zRot, f32 scale) { +void Meteo_Effect370_Setup2(Effect370* this, f32 x, f32 y, f32 z, f32 xRot, f32 yRot, f32 zRot, f32 scale) { Effect_Initialize(this); this->obj.status = OBJ_INIT; this->obj.id = OBJ_EFFECT_370; @@ -632,12 +632,12 @@ void Meteo_80188E8C(Effect370* this, f32 x, f32 y, f32 z, f32 xRot, f32 yRot, f3 Object_SetInfo(&this->info, this->obj.id); } -void Meteo_80188F2C(f32 x, f32 y, f32 z, f32 xRot, f32 yRot, f32 arg5, f32 scale) { +void Meteo_Effect370_Spawn3(f32 x, f32 y, f32 z, f32 xRot, f32 yRot, f32 arg5, f32 scale) { s32 i; for (i = 0; i < ARRAY_COUNT(gEffects); i++) { if (gEffects[i].obj.status == OBJ_FREE) { - Meteo_80188E8C(&gEffects[i], x, y, z, xRot, yRot, arg5, scale); + Meteo_Effect370_Setup2(&gEffects[i], x, y, z, xRot, yRot, arg5, scale); return; } } @@ -664,9 +664,9 @@ void Meteo_Effect370_Update(Effect370* this) { this->vel.y = dest.y; this->vel.z = dest.z; - if (((gGameFrameCount % 2) == 0)) { - Meteo_80188F2C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->obj.rot.x, this->obj.rot.y, - this->obj.rot.z, 5.0f); + if ((gGameFrameCount % 2) == 0) { + Meteo_Effect370_Spawn3(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->obj.rot.x, this->obj.rot.y, + this->obj.rot.z, 5.0f); } } else { this->unk_44 -= 8; @@ -719,7 +719,7 @@ void Meteo_Effect371_Update(Effect371* this) { func_effect_8007A774(gPlayer, this, 100.0f); } -void Meteo_801892F0(Boss297* this, s32 dmgPart) { +void Meteo_801892F0(MeCrusher* this, s32 dmgPart) { Vec3f dest; Vec3f src; @@ -727,19 +727,19 @@ void Meteo_801892F0(Boss297* this, s32 dmgPart) { if (dmgPart == 7) { func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y + 330.0f, this->obj.pos.z + 1020.0f, 15.0f); - func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y + 330.0f, this->obj.pos.z + 1020.0f, 0.0f, 0.0f, 0.0f, - 7.0f, 20); + Effect386_Spawn1(this->obj.pos.x, this->obj.pos.y + 330.0f, this->obj.pos.z + 1020.0f, 0.0f, 0.0f, 0.0f, 7.0f, + 20); } if (dmgPart == 5) { func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y - 330.0f, this->obj.pos.z + 1020.0f, 15.0f); - func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y - 330.0f, this->obj.pos.z + 1020.0f, 0.0f, 0.0f, 0.0f, - 7.0f, 20); + Effect386_Spawn1(this->obj.pos.x, this->obj.pos.y - 330.0f, this->obj.pos.z + 1020.0f, 0.0f, 0.0f, 0.0f, 7.0f, + 20); } if (dmgPart == 4) { func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 300.0f, 20.0f); - func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 300.0f, 0.0f, 0.0f, 0.0f, 10.0f, 25); + Effect386_Spawn1(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 300.0f, 0.0f, 0.0f, 0.0f, 10.0f, 25); } if (dmgPart < 4) { @@ -755,8 +755,8 @@ void Meteo_801892F0(Boss297* this, s32 dmgPart) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); func_effect_8007D2C8(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, 10.0f); - func_effect_8007BFFC(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, 0.0f, 0.0f, - 0.0f, 5.0f, 15); + Effect386_Spawn1(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, 0.0f, 0.0f, 0.0f, + 5.0f, 15); } } @@ -778,7 +778,7 @@ void Meteo_80189624(void) { } } -void Meteo_Boss297_Update(Boss297* this) { +void Meteo_MeCrusher_Update(MeCrusher* this) { f32 sp7C; f32 rand; s32 i; @@ -1038,7 +1038,7 @@ void Meteo_Boss297_Update(Boss297* this) { if (this->swork[18] != 0) { s32 objId; - if (Hud_MissileSeekModeCheck(0) >= 4) { + if (ActorMissileSeek_ModeCheck(0) >= 4) { objId = OBJ_MISSILE_SEEK_PLAYER; } else { objId = OBJ_MISSILE_SEEK_TEAM; @@ -1426,12 +1426,12 @@ void Meteo_Boss297_Update(Boss297* this) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_i2_80195430[RAND_INT(19.9f)], &dest); if (((gGameFrameCount % 2) == 0)) { - func_effect_8007C120(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, - this->vel.x, this->vel.y, this->vel.z, 0.3f, 20); + Effect_Effect390_Spawn(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, + this->vel.x, this->vel.y, this->vel.z, 0.3f, 20); } if (((gGameFrameCount % 4) == 0)) { - func_effect_8007BFFC(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, - this->vel.x, this->vel.y, this->vel.z, 10.0f, 10); + Effect386_Spawn1(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, + this->vel.x, this->vel.y, this->vel.z, 10.0f, 10); } this->vel.y = -5.0f; @@ -1443,7 +1443,7 @@ void Meteo_Boss297_Update(Boss297* this) { Object_Kill(&this->obj, this->sfxSource); } if (this->timer_050 == 20) { - func_effect_8007A568(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 80.0f); + Effect_Effect383_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 80.0f); AUDIO_PLAY_SFX(NA_SE_EN_STAR_EXPLOSION, this->sfxSource, 4); gControllerRumbleTimers[0] = 60; for (i = 0; i < ARRAY_COUNT(gActors); i++) { @@ -1461,7 +1461,7 @@ void Meteo_Boss297_Update(Boss297* this) { case 5: case 10: case 15: - func_effect_8007B344(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 71.0f, 5); + Effect_Effect384_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 71.0f, 5); case 0: for (i = 0; i < ARRAY_COUNT(gEffects); i++) { @@ -1545,7 +1545,7 @@ void Meteo_8018B7C4(s32 arg0) { gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); } -void Meteo_Boss297_Draw(Boss297* this) { +void Meteo_MeCrusher_Draw(MeCrusher* this) { s32 i; f32 var_fs0; f32 var_fs1; @@ -1799,10 +1799,10 @@ void Meteo_8018C77C(ActorCutscene* this, s32 arg1) { AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, this->sfxSource, 0); } -void Meteo_8018C8F4(Actor182* actor182, ActorCutscene* actorCs) { +void Meteo_8018C8F4(MeMeteor2* actor182, ActorCutscene* actorCs) { Actor_Initialize(actor182); actor182->obj.status = OBJ_INIT; - actor182->obj.id = OBJ_ACTOR_182; + actor182->obj.id = OBJ_ACTOR_ME_METEOR_2; actor182->obj.pos.x = RAND_FLOAT_CENTERED_SEEDED(2000.0f) + actorCs->obj.pos.x; actor182->obj.pos.y = RAND_FLOAT_CENTERED_SEEDED(2000.0f) + actorCs->obj.pos.y; @@ -1819,7 +1819,7 @@ void Meteo_8018C8F4(Actor182* actor182, ActorCutscene* actorCs) { void Meteo_8018CA10(Actor* actor182, ActorCutscene* actorCs, f32 x, f32 y, f32 z) { Actor_Initialize(actor182); actor182->obj.status = OBJ_INIT; - actor182->obj.id = OBJ_ACTOR_182; + actor182->obj.id = OBJ_ACTOR_ME_METEOR_2; actor182->obj.pos.x = actorCs->obj.pos.x + x; actor182->obj.pos.y = actorCs->obj.pos.y + y; @@ -1848,7 +1848,7 @@ void Meteo_8018CAD8(void) { Object_SetInfo(&actorCs->info, actorCs->obj.id); } -void Meteo_8018CB50(Effect346* this, Actor* actor) { +void Meteo_Effect346_Setup(Effect346* this, Actor* actor) { Effect_Initialize(this); this->obj.status = OBJ_ACTIVE; this->obj.id = OBJ_EFFECT_346; @@ -1868,7 +1868,7 @@ void Meteo_8018CB50(Effect346* this, Actor* actor) { Object_SetInfo(&this->info, this->obj.id); } -void Meteo_8018CCF8(ActorEvent* this) { +void Meteo_Effect346_Spawn(ActorEvent* this) { s32 i; s32 j; @@ -1877,7 +1877,7 @@ void Meteo_8018CCF8(ActorEvent* this) { for (i = 0; i < 25; ++i) { for (j = 0; j < ARRAY_COUNT(gEffects); j++) { if (gEffects[j].obj.status == OBJ_FREE) { - Meteo_8018CB50(&gEffects[j], this); + Meteo_Effect346_Setup(&gEffects[j], this); break; } } @@ -1901,7 +1901,7 @@ void Meteo_LevelStart(Player* player) { gFillScreenAlphaStep = 4; - PRINTF("Demo_Time %d\n"); + PRINTF("Demo_Time %d\n", gCsFrameCount); switch (player->csState) { case 0: @@ -2026,7 +2026,7 @@ void Meteo_LevelStart(Player* player) { if (gCsFrameCount == 340) { func_effect_8007D2C8(gActors[8].obj.pos.x, gActors[8].obj.pos.y, gActors[8].obj.pos.z, 10.0f); gActors[8].obj.status = OBJ_FREE; - Meteo_8018CCF8(&gActors[8]); + Meteo_Effect346_Spawn(&gActors[8]); } if (player->csEventTimer != 0) { @@ -2055,7 +2055,7 @@ void Meteo_LevelStart(Player* player) { gActors[player->meTargetIndex].obj.pos.y, gActors[player->meTargetIndex].obj.pos.z, 10.0f); gActors[player->meTargetIndex].obj.status = OBJ_FREE; - Meteo_8018CCF8(&gActors[player->meTargetIndex]); + Meteo_Effect346_Spawn(&gActors[player->meTargetIndex]); Object_Kill(&gPlayerShots[0].obj, gPlayerShots[0].sfxSource); } } @@ -2120,8 +2120,7 @@ void Meteo_LevelStart(Player* player) { Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 20000.0f, 0.0f); } -// Actors from OBJ_ACTOR_183 to OBJ_ACTOR_185 -void Meteo_ActorDoodad_Update(Actor* this) { +void Meteo_MeteorShower_Update(Actor* this) { switch (this->state) { case 0: this->fwork[0] = RAND_FLOAT_CENTERED(10.0f); @@ -2134,22 +2133,19 @@ void Meteo_ActorDoodad_Update(Actor* this) { Meteo_ReflectDamage(this); } -// Little Meteor piece 1 -void Meteo_Actor183_Draw(Actor183* this) { +void Meteo_MeMeteorShower1_Draw(MeMeteorShower1* this) { RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); - gSPDisplayList(gMasterDisp++, D_ME_6017AD0); + gSPDisplayList(gMasterDisp++, aMeMeteorShower1DL); } -// Little Meteor piece 2 -void Meteo_Actor184_Draw(Actor184* this) { +void Meteo_MeMeteorShower2_Draw(MeMeteorShower2* this) { RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); - gSPDisplayList(gMasterDisp++, D_ME_6016240); + gSPDisplayList(gMasterDisp++, aMeMeteorShower2DL); } -// Little Meteor piece 3 -void Meteo_Actor185_Draw(Actor185* this) { +void Meteo_MeMeteorShower3_Draw(MeMeteorShower3* this) { RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); - gSPDisplayList(gMasterDisp++, D_ME_600CD60); + gSPDisplayList(gMasterDisp++, aMeMeteorShower3DL); } void Meteo_Effect370_Draw(Effect370* this) { diff --git a/src/overlays/ovl_i2/fox_sx.c b/src/overlays/ovl_i2/fox_sx.c index 30dde896..08c76137 100644 --- a/src/overlays/ovl_i2/fox_sx.c +++ b/src/overlays/ovl_i2/fox_sx.c @@ -12,8 +12,8 @@ Vec3f D_i2_80195650 = { 90.0f, 0.0f, 0.0f }; Vec3f D_i2_8019565C = { 73.0f, -102.0f, -80.0f }; Vec3f D_i2_80195668 = { 90.0f, 0.0f, 0.0f }; -bool SectorX_Boss_OverrideLimbDraw(s32, Gfx**, Vec3f*, Vec3f*, void*); -void SectorX_Boss_PostLimbDraw(s32, Vec3f*, void*); +bool SectorX_SxSpyborg_OverrideLimbDraw(s32, Gfx**, Vec3f*, Vec3f*, void*); +void SectorX_SxSpyborg_PostLimbDraw(s32, Vec3f*, void*); void SectorX_8018F030(void) { s32 i; @@ -38,8 +38,8 @@ void SectorX_8018F030(void) { } } -void SectorX_SlippyThrowToTitania(void) { - ActorSlippySX* slippy = &gActors[50]; +void SectorX_SxSlippy_Setup(void) { + SxSlippy* slippy = &gActors[50]; Actor_Initialize(slippy); slippy->obj.status = OBJ_INIT; @@ -54,7 +54,7 @@ void SectorX_SlippyThrowToTitania(void) { slippy->info.cullDistance = 100000.0f; } -void SectorX_SlippyShootBoss(ActorSlippySX* this) { +void SectorX_SxSlippy_ShootBoss(SxSlippy* this) { Vec3f src; Vec3f dest; @@ -72,7 +72,7 @@ void SectorX_SlippyShootBoss(ActorSlippySX* this) { this->rot_0F4.y + 180.0f, 0.0f); } -void SectorX_Slippy_Update(ActorSlippySX* this) { +void SectorX_SxSlippy_Update(SxSlippy* this) { f32 sp34; switch (this->animFrame) { @@ -96,10 +96,10 @@ void SectorX_Slippy_Update(ActorSlippySX* this) { } if (((gGameFrameCount % 4) == 0) && (Rand_ZeroOne() < 0.2f)) { - SectorX_SlippyShootBoss(this); + SectorX_SxSlippy_ShootBoss(this); } - if ((gBosses[0].unk_04C == 75) && (gBosses[0].state == 85)) { + if ((gBosses[0].animFrame == 75) && (gBosses[0].state == 85)) { this->animFrame = 2; this->vel.x = 10.0f; @@ -120,7 +120,7 @@ void SectorX_Slippy_Update(ActorSlippySX* this) { gProjectFar = 30000.0f; - SectorX_SlippyThrowToTitania(); + SectorX_SxSlippy_Setup(); } break; @@ -165,7 +165,7 @@ void SectorX_Slippy_Update(ActorSlippySX* this) { } } -void SectorX_Slippy_Draw(ActorSlippySX* this) { +void SectorX_SxSlippy_Draw(SxSlippy* this) { switch (this->animFrame) { case 0: gSPDisplayList(gMasterDisp++, D_SX_6020D20); @@ -264,19 +264,19 @@ void SectorX_8018FBBC(Vec3f* pos) { } } -void SectorX_Boss304_Update(Boss304* this) { +void SectorX_SxSpyborgLeftArm_Update(SxSpyborgLeftArm* this) { Vec3f sp2C; Vec3f sp20; if (this->state == 0) { - Animation_GetFrameData(&D_SX_60206DC, this->unk_04C, this->vwork); + Animation_GetFrameData(&D_SX_60206DC, this->animFrame, this->vwork); Math_Vec3fFromAngles(&sp20, this->obj.rot.x, this->obj.rot.y, 20.0f); this->vel.x = sp20.x; this->vel.y = sp20.y; this->vel.z = sp20.z; this->state++; } else { - if (this->obj.id == OBJ_BOSS_304) { + if (this->obj.id == OBJ_BOSS_SX_SPYBORG_LEFT_ARM) { sp2C.x = this->fwork[11]; sp2C.y = this->fwork[12]; sp2C.z = this->fwork[13]; @@ -294,9 +294,8 @@ void SectorX_Boss304_Update(Boss304* this) { } } -// Doors that open when the robot arm hits them? -void SectorX_Boss305_Update(Boss305* this) { - SectorX_Boss304_Update(this); +void SectorX_SxSpyborgRightArm_Update(SxSpyborgRightArm* this) { + SectorX_SxSpyborgLeftArm_Update(this); } bool SectorX_8018FF40(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { @@ -307,8 +306,8 @@ bool SectorX_8018FF40(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return 0; } -void SectorX_Boss304_Draw(Boss304* this) { - Animation_DrawSkeleton(3, D_SX_6020C68, this->vwork, SectorX_8018FF40, SectorX_Boss_PostLimbDraw, this, +void SectorX_SxSpyborgLeftArm_Draw(SxSpyborgLeftArm* this) { + Animation_DrawSkeleton(3, D_SX_6020C68, this->vwork, SectorX_8018FF40, SectorX_SxSpyborg_PostLimbDraw, this, gCalcMatrix); } @@ -320,12 +319,12 @@ bool SectorX_8018FFDC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return 0; } -void SectorX_Boss305_Draw(Boss305* this) { - Animation_DrawSkeleton(3, D_SX_6020C68, this->vwork, SectorX_8018FFDC, SectorX_Boss_PostLimbDraw, this, +void SectorX_SxSpyborgRightArm_Draw(SxSpyborgRightArm* this) { + Animation_DrawSkeleton(3, D_SX_6020C68, this->vwork, SectorX_8018FFDC, SectorX_SxSpyborg_PostLimbDraw, this, gCalcMatrix); } -void SectorX_Boss_Update(Spyborg* this) { +void SectorX_SxSpyborg_Update(SxSpyborg* this) { u8 attack; s32 i; Vec3f frameTable[50]; @@ -364,7 +363,7 @@ void SectorX_Boss_Update(Spyborg* this) { break; case 556: - gShowBossHealth = 1; + gShowBossHealth = true; break; case 540: @@ -418,15 +417,15 @@ void SectorX_Boss_Update(Spyborg* this) { AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, this->sfxSource, 4); this->swork[3] -= this->damage; this->timer_054 = 20; - func_effect_8007C120(this->obj.pos.x, this->obj.pos.y + 334.0f, -237.0f + this->obj.pos.z, this->vel.x, - this->vel.y, this->vel.z, 0.2f, 20); + Effect_Effect390_Spawn(this->obj.pos.x, this->obj.pos.y + 334.0f, -237.0f + this->obj.pos.z, + this->vel.x, this->vel.y, this->vel.z, 0.2f, 20); if (this->swork[3] <= 0) { - func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y + 300.0f, this->obj.pos.z, 0.0f, 0.0f, 0.0f, - 10.0f, 50); + Effect386_Spawn1(this->obj.pos.x, this->obj.pos.y + 300.0f, this->obj.pos.z, 0.0f, 0.0f, 0.0f, + 10.0f, 50); - func_effect_8007C120(this->obj.pos.x, this->obj.pos.y + 334.0f, -237.0f + this->obj.pos.z, - this->vel.x, this->vel.y, this->vel.z, 0.15f, 70); + Effect_Effect390_Spawn(this->obj.pos.x, this->obj.pos.y + 334.0f, -237.0f + this->obj.pos.z, + this->vel.x, this->vel.y, this->vel.z, 0.15f, 70); for (i = 0; i < 10; i++) { Play_SpawnDebris(4, this->obj.pos.x, this->obj.pos.y + 334.0f, -237.0f + this->obj.pos.z); } @@ -438,7 +437,7 @@ void SectorX_Boss_Update(Spyborg* this) { this->timer_05C = 80; this->swork[1] = 0; this->fwork[0] = 0.0f; - this->unk_04C = 0; + this->animFrame = 0; this->swork[4] = 1; this->health = 1; this->swork[7] = 1; @@ -469,15 +468,15 @@ void SectorX_Boss_Update(Spyborg* this) { this->state = 20; this->timer_050 = 300; this->fwork[0] = 0.0f; - this->unk_04C = 0; + this->animFrame = 0; Radio_PlayMessage(gMsg_ID_5499, RCID_BOSS_SECTORX); - func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y + 300.0f, this->obj.pos.z, 0.0f, 0.0f, 0.0f, - 10.0f, 50); + Effect386_Spawn1(this->obj.pos.x, this->obj.pos.y + 300.0f, this->obj.pos.z, 0.0f, 0.0f, 0.0f, + 10.0f, 50); - func_effect_8007C120(this->obj.pos.x, this->obj.pos.y + 334.0f, -237.0f + this->obj.pos.z, - this->vel.x, this->vel.y, this->vel.z, 0.15f, 70); + Effect_Effect390_Spawn(this->obj.pos.x, this->obj.pos.y + 334.0f, -237.0f + this->obj.pos.z, + this->vel.x, this->vel.y, this->vel.z, 0.15f, 70); for (i = 0; i < 10; i++) { Play_SpawnDebris(4, this->obj.pos.x, this->obj.pos.y + 334.0f, -237.0f + this->obj.pos.z); @@ -496,8 +495,8 @@ void SectorX_Boss_Update(Spyborg* this) { this->timer_054 = 20; this->timer_05C = this->timer_054; - func_effect_8007C120(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, - this->vel.z, 0.2f, 10); + Effect_Effect390_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, + this->vel.z, 0.2f, 10); } else { Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_REFLECT); } @@ -518,7 +517,7 @@ void SectorX_Boss_Update(Spyborg* this) { this->swork[7] = 1; this->obj.pos.x = gPlayer[0].xPath; this->swork[0] = 0; - Animation_GetFrameData(&D_SX_60206DC, this->unk_04C, this->vwork); + Animation_GetFrameData(&D_SX_60206DC, this->animFrame, this->vwork); this->fwork[1] = -2000.0f; this->fwork[14] = 300.0f; this->fwork[17] = -300.0f; @@ -528,7 +527,7 @@ void SectorX_Boss_Update(Spyborg* this) { this->timer_050 = 450; this->swork[3] = 400; this->health = 300; - this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SX_6032550); + this->info.hitbox = SEGMENTED_TO_VIRTUAL(aSxSpyborgHitbox); gBossActive = true; AUDIO_PLAY_BGM(gBossBgms[gCurrentLevel]); this->swork[6] = 1; @@ -545,16 +544,16 @@ void SectorX_Boss_Update(Spyborg* this) { if (fabsf(Math_SmoothStepToF(&this->fwork[16], 0.0f, 0.1f, 10.0f, 0)) < 8.0f) { Math_SmoothStepToF(&this->fwork[14], 0.0f, 0.2f, 10.0f, 0); if ((this->timer_050 % 8) == 0) { - func_effect_8007C120(this->obj.pos.x + 312.0f, this->obj.pos.y, this->obj.pos.z - 173.0f, - this->vel.x, this->vel.y, this->vel.z, 0.2f, 8); + Effect_Effect390_Spawn(this->obj.pos.x + 312.0f, this->obj.pos.y, this->obj.pos.z - 173.0f, + this->vel.x, this->vel.y, this->vel.z, 0.2f, 8); } } if (fabsf(Math_SmoothStepToF(&this->fwork[19], 0.0f, 0.1f, 10.0f, 0)) < 8.0f) { Math_SmoothStepToF(&this->fwork[17], 0.0f, 0.2f, 10.0f, 0); if ((this->timer_050 % 8) == 0) { - func_effect_8007C120(this->obj.pos.x - 312.0f, this->obj.pos.y, this->obj.pos.z - 173.0f, - this->vel.x, this->vel.y, this->vel.z, 0.2f, 8); + Effect_Effect390_Spawn(this->obj.pos.x - 312.0f, this->obj.pos.y, this->obj.pos.z - 173.0f, + this->vel.x, this->vel.y, this->vel.z, 0.2f, 8); } } @@ -570,14 +569,14 @@ void SectorX_Boss_Update(Spyborg* this) { case 100: this->fwork[1] = -2000.0f; - frameData = Animation_GetFrameData(&D_SX_60206DC, this->unk_04C, frameTable); + frameData = Animation_GetFrameData(&D_SX_60206DC, this->animFrame, frameTable); Math_SmoothStepToVec3fArray(frameTable, this->vwork, 1, frameData, this->fwork[0], 100.0f, 0.0f); Math_SmoothStepToF(&this->fwork[0], 1.0f, 1.0f, 0.05f, 0); - this->unk_04C++; + this->animFrame++; - if (this->unk_04C >= Animation_GetFrameCount(&D_SX_60206DC)) { - this->unk_04C = 0; + if (this->animFrame >= Animation_GetFrameCount(&D_SX_60206DC)) { + this->animFrame = 0; this->state = 1; this->fwork[0] = 0.0f; AUDIO_PLAY_SFX(NA_SE_EN_UNIT_COMBINE, this->sfxSource, 4); @@ -595,14 +594,14 @@ void SectorX_Boss_Update(Spyborg* this) { this->fwork[44] = 5.0f; this->fwork[43] = 5.0f; - frameData = Animation_GetFrameData(&D_SX_6016E28, this->unk_04C, frameTable); + frameData = Animation_GetFrameData(&D_SX_6016E28, this->animFrame, frameTable); Math_SmoothStepToVec3fArray(frameTable, this->vwork, 1, frameData, this->fwork[0], 100.0f, 0.0f); Math_SmoothStepToF(&this->fwork[0], 1.0f, 1.0f, 0.05f, 0); - this->unk_04C++; - if (this->unk_04C >= Animation_GetFrameCount(&D_SX_6016E28)) { - this->unk_04C = 0; + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_SX_6016E28)) { + this->animFrame = 0; this->state = 2; this->fwork[0] = 0.0f; this->swork[1] = 1; @@ -616,7 +615,7 @@ void SectorX_Boss_Update(Spyborg* this) { this->fwork[3] = gPlayer[0].pos.x; this->fwork[2] = gPlayer[0].pos.y; - if (this->unk_04C > 60) { + if (this->animFrame > 60) { this->fwork[1] = -1000.0f; Math_SmoothStepToF(&this->fwork[42], 100.0f, 1.0f, 20.0f, 0); this->fwork[43] = this->fwork[44] = 10.0f; @@ -626,19 +625,19 @@ void SectorX_Boss_Update(Spyborg* this) { this->fwork[43] = this->fwork[44] = 10.0f; } - if (this->unk_04C == 60) { + if (this->animFrame == 60) { AUDIO_PLAY_SFX(NA_SE_EN_THROW, this->sfxSource, 4); this->fwork[42] = 0.0f; } - frameData = Animation_GetFrameData(&D_SX_60123BC, this->unk_04C, frameTable); + frameData = Animation_GetFrameData(&D_SX_60123BC, this->animFrame, frameTable); Math_SmoothStepToVec3fArray(frameTable, this->vwork, 1, frameData, this->fwork[0], 100.0f, 0.0f); Math_SmoothStepToF(&this->fwork[0], 1.0f, 1.0f, 0.05f, 0); - this->unk_04C++; - if (this->unk_04C >= Animation_GetFrameCount(&D_SX_60123BC)) { - this->unk_04C = 0; + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_SX_60123BC)) { + this->animFrame = 0; this->state = 3; this->fwork[42] = this->fwork[43] = this->fwork[44] = this->fwork[0] = 0.0f; this->swork[7] = 0; @@ -650,7 +649,7 @@ void SectorX_Boss_Update(Spyborg* this) { this->fwork[3] = gPlayer[0].pos.x; this->fwork[2] = gPlayer[0].pos.y; - if (this->unk_04C > 60) { + if (this->animFrame > 60) { this->fwork[1] = -1000.0f; Math_SmoothStepToF(&this->fwork[42], 100.0f, 1.0f, 20.0f, 0); this->fwork[44] = 10.0f; @@ -662,19 +661,19 @@ void SectorX_Boss_Update(Spyborg* this) { this->fwork[43] = 10.0f; } - if (this->unk_04C == 60) { + if (this->animFrame == 60) { AUDIO_PLAY_SFX(NA_SE_EN_THROW, this->sfxSource, 4); this->fwork[42] = 0.0f; } - frameData = Animation_GetFrameData(&D_SX_6013798, this->unk_04C, frameTable); + frameData = Animation_GetFrameData(&D_SX_6013798, this->animFrame, frameTable); Math_SmoothStepToVec3fArray(frameTable, this->vwork, 1, frameData, this->fwork[0], 100.0f, 0.0f); Math_SmoothStepToF(&this->fwork[0], 1.0f, 1.0f, 0.05f, 0); - this->unk_04C++; - if (this->unk_04C >= Animation_GetFrameCount(&D_SX_6013798)) { - this->unk_04C = 0; + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_SX_6013798)) { + this->animFrame = 0; this->fwork[0] = 0.0f; if (this->swork[3] <= 250) { this->state = 4; @@ -807,7 +806,7 @@ void SectorX_Boss_Update(Spyborg* this) { } if (this->timer_050 == 0) { - this->unk_04C = 0; + this->animFrame = 0; this->state = 1; this->swork[1] = 1; Audio_KillSfxBySourceAndId(D_i2_80195D88, NA_SE_EN_SZMIS_ENGINE); @@ -828,16 +827,16 @@ void SectorX_Boss_Update(Spyborg* this) { this->fwork[2] = -400.0f; this->fwork[42] = 30.0f; - frameData = Animation_GetFrameData(&D_SX_601C690, this->unk_04C, frameTable); + frameData = Animation_GetFrameData(&D_SX_601C690, this->animFrame, frameTable); Math_SmoothStepToVec3fArray(frameTable, this->vwork, 1, frameData, this->fwork[0], 100.0f, 0.0f); Math_SmoothStepToF(&this->fwork[0], 1.0f, 1.0f, 0.05f, 0); - this->unk_04C++; - if (this->unk_04C >= Animation_GetFrameCount(&D_SX_601C690)) { + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_SX_601C690)) { this->state = 75; this->fwork[0] = 0.0f; - this->unk_04C = 0; + this->animFrame = 0; this->timer_050 = 120; } break; @@ -854,7 +853,7 @@ void SectorX_Boss_Update(Spyborg* this) { if (this->timer_050 == 0) { this->state = 8; this->fwork[0] = 0.0f; - this->unk_04C = 0; + this->animFrame = 0; this->health = 300; Audio_PlaySequenceDistorted(0, gBossBgms[gCurrentLevel], 1121, 25, -1); Radio_PlayMessage(gMsg_ID_19205, RCID_FOX); @@ -874,14 +873,14 @@ void SectorX_Boss_Update(Spyborg* this) { this->fwork[43] = 5.0f; this->fwork[42] = 30.0f; - frameData = Animation_GetFrameData(&D_SX_600F890, this->unk_04C, frameTable); + frameData = Animation_GetFrameData(&D_SX_600F890, this->animFrame, frameTable); Math_SmoothStepToVec3fArray(frameTable, this->vwork, 1, frameData, this->fwork[0], 100.0f, 0.0f); Math_SmoothStepToF(&this->fwork[0], 1.0f, 1.0f, 0.02f, 0); - this->unk_04C++; - if (this->unk_04C >= Animation_GetFrameCount(&D_SX_600F890)) { - this->unk_04C = 0; + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_SX_600F890)) { + this->animFrame = 0; this->fwork[0] = 0.0f; this->state = 9; this->swork[0] = 2; @@ -894,23 +893,23 @@ void SectorX_Boss_Update(Spyborg* this) { this->fwork[2] = gPlayer[0].pos.y; this->fwork[3] = gPlayer[0].pos.x; - frameData = Animation_GetFrameData(&D_SX_60123BC, this->unk_04C, frameTable); + frameData = Animation_GetFrameData(&D_SX_60123BC, this->animFrame, frameTable); Math_SmoothStepToVec3fArray(frameTable, this->vwork, 1, frameData, this->fwork[0], 50.0f, 0.0f); Math_SmoothStepToF(&this->fwork[0], 1.0f, 1.0f, 0.01f, 0); if (this->timer_050 == 0) { - this->unk_04C++; - if (this->unk_04C >= Animation_GetFrameCount(&D_SX_60123BC)) { - this->unk_04C = Animation_GetFrameCount(&D_SX_60123BC) - 1; + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_SX_60123BC)) { + this->animFrame = Animation_GetFrameCount(&D_SX_60123BC) - 1; if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_STANDBY) { - this->unk_04C = 0; + this->animFrame = 0; this->state = 10; this->fwork[0] = 0.0f; this->fwork[42] = 0.0f; } } - if (this->unk_04C == 60) { + if (this->animFrame == 60) { AUDIO_PLAY_SFX(NA_SE_EN_THROW, this->sfxSource, 4); } } else if (this->timer_050 == 1) { @@ -926,14 +925,14 @@ void SectorX_Boss_Update(Spyborg* this) { this->fwork[2] = gPlayer[0].pos.y; this->fwork[3] = gPlayer[0].pos.x; - frameData = Animation_GetFrameData(&D_SX_601AA28, this->unk_04C, frameTable); + frameData = Animation_GetFrameData(&D_SX_601AA28, this->animFrame, frameTable); Math_SmoothStepToVec3fArray(frameTable, this->vwork, 1, frameData, this->fwork[0], 50.0f, 0.0f); Math_SmoothStepToF(&this->fwork[0], 1.0f, 1.0f, 0.01f, 0); - this->unk_04C++; + this->animFrame++; - if (this->unk_04C >= Animation_GetFrameCount(&D_SX_601AA28)) { - this->unk_04C = 0; + if (this->animFrame >= Animation_GetFrameCount(&D_SX_601AA28)) { + this->animFrame = 0; this->state = 10; this->fwork[0] = 0.0f; this->fwork[42] = 0.0f; @@ -943,7 +942,7 @@ void SectorX_Boss_Update(Spyborg* this) { this->swork[10] = 1; } - if (this->unk_04C == 70) { + if (this->animFrame == 70) { SectorX_8018FA04(this->fwork[11] + this->obj.pos.x, this->fwork[12] + this->obj.pos.y, this->fwork[13] + this->obj.pos.z); AUDIO_PLAY_SFX(NA_SE_EN_THROW, this->sfxSource, 4); @@ -955,18 +954,18 @@ void SectorX_Boss_Update(Spyborg* this) { this->fwork[1] = -1000.0f; Math_SmoothStepToF(&this->fwork[42], 50.0f, 1.0f, 3.0f, 0); - frameData = Animation_GetFrameData(&D_SX_60158C4, this->unk_04C, frameTable); + frameData = Animation_GetFrameData(&D_SX_60158C4, this->animFrame, frameTable); Math_SmoothStepToVec3fArray(frameTable, this->vwork, 1, frameData, this->fwork[0], 100.0f, 0.0f); Math_SmoothStepToF(&this->fwork[0], 1.0f, 1.0f, 0.05f, 0); - this->unk_04C++; - if ((this->unk_04C % 16) == 0) { + this->animFrame++; + if ((this->animFrame % 16) == 0) { AUDIO_PLAY_SFX(NA_SE_EN_THROW, this->sfxSource, 4); } - if (this->unk_04C >= Animation_GetFrameCount(&D_SX_60158C4)) { - this->unk_04C = 0; + if (this->animFrame >= Animation_GetFrameCount(&D_SX_60158C4)) { + this->animFrame = 0; this->fwork[0] = 0.0f; if ((gBossFrameCount < 2200) || (gTeamShields[TEAM_ID_SLIPPY] <= 0)) { @@ -1027,7 +1026,7 @@ void SectorX_Boss_Update(Spyborg* this) { if ((this->timer_050 == 0) && (this->obj.rot.y == 2880.0f)) { this->obj.rot.y = 0.0f; - this->unk_04C = 0; + this->animFrame = 0; this->fwork[0] = 0.0f; if ((gBossFrameCount < 2200) || (gTeamShields[TEAM_ID_SLIPPY] <= 0)) { this->state = 9; @@ -1046,14 +1045,14 @@ void SectorX_Boss_Update(Spyborg* this) { this->fwork[41] = 340.0f; this->fwork[2] = -400.0f; - frameData = Animation_GetFrameData(&D_SX_601C690, this->unk_04C, frameTable); + frameData = Animation_GetFrameData(&D_SX_601C690, this->animFrame, frameTable); Math_SmoothStepToVec3fArray(frameTable, this->vwork, 1, frameData, this->fwork[0], 100.0f, 0.0f); Math_SmoothStepToF(&this->fwork[0], 1.0f, 1.0f, 0.05f, 0); - this->unk_04C++; + this->animFrame++; - if (this->unk_04C >= Animation_GetFrameCount(&D_SX_601C690)) { - this->unk_04C = Animation_GetFrameCount(&D_SX_601C690); + if (this->animFrame >= Animation_GetFrameCount(&D_SX_601C690)) { + this->animFrame = Animation_GetFrameCount(&D_SX_601C690); } if ((this->timer_050 & 3) == 0) { @@ -1067,8 +1066,8 @@ void SectorX_Boss_Update(Spyborg* this) { } if ((this->timer_050 & 3) == 0) { - func_effect_8007C120(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, - this->vel.z, 0.3f, 10); + Effect_Effect390_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, + this->vel.z, 0.3f, 10); } if (this->timer_050 < 230) { @@ -1077,9 +1076,9 @@ void SectorX_Boss_Update(Spyborg* this) { } if (this->timer_050 == 230) { - gShowBossHealth = 0; - func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 30.0f, 40); - func_effect_8007A568(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 40.0f); + gShowBossHealth = false; + Effect386_Spawn1(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 30.0f, 40); + Effect_Effect383_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 40.0f); } if (this->timer_050 == 210) { @@ -1104,8 +1103,8 @@ void SectorX_Boss_Update(Spyborg* this) { D_i2_80195640 = 1; - Animation_DrawSkeleton(1, D_SX_6020C68, this->vwork, SectorX_Boss_OverrideLimbDraw, SectorX_Boss_PostLimbDraw, this, - &gIdentityMatrix); + Animation_DrawSkeleton(1, D_SX_6020C68, this->vwork, SectorX_SxSpyborg_OverrideLimbDraw, + SectorX_SxSpyborg_PostLimbDraw, this, &gIdentityMatrix); if (((this->swork[1] != 0) && (this->swork[3] > 0)) && ((this->fwork[4] < 45.0f) || (this->fwork[4] > 315.0f))) { this->swork[1]++; @@ -1123,7 +1122,7 @@ void SectorX_Boss_Update(Spyborg* this) { } if (this->state != 35) { - this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SX_6032550); + this->info.hitbox = SEGMENTED_TO_VIRTUAL(aSxSpyborgHitbox); this->info.hitbox[43] = -211.0f + this->fwork[16]; this->info.hitbox[45] = -35.0f + this->fwork[15]; this->info.hitbox[47] = 442.0f + this->fwork[14]; @@ -1163,10 +1162,10 @@ void SectorX_Boss_Update(Spyborg* this) { } } -bool SectorX_Boss_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { +bool SectorX_SxSpyborg_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { Vec3f src = { 0.0f, 0.0f, 0.0f }; Vec3f dest; - Spyborg* boss = (Spyborg*) data; + SxSpyborg* boss = (SxSpyborg*) data; if (D_i2_80195640 != 0) { *dList = NULL; @@ -1285,7 +1284,7 @@ bool SectorX_Boss_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f return false; } -void SectorX_Boss_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* data) { +void SectorX_SxSpyborg_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* data) { Vec3f sp64 = { 87.0f, -323.0f, 200.0f }; Vec3f sp58 = { 87.0f, -323.0f, -200.0f }; Vec3f sp4C = { 87.0f, -323.0f, 200.0f }; @@ -1365,12 +1364,12 @@ f32 D_i2_80195760[4] = { -250.0f, -200.0f, -400.0f, -8000.0f }; f32 D_i2_80195770[3] = { 120.0f, 180.0f, -150.0f }; s16 D_i2_8019577C[3] = { 2, 3, 4 }; -void SectorX_Boss_Draw(Spyborg* this) { +void SectorX_SxSpyborg_Draw(SxSpyborg* this) { f32 fwork; if (this->swork[5] == 0) { D_i2_80195640 = 0; - Animation_DrawSkeleton(3, D_SX_6020C68, this->vwork, SectorX_Boss_OverrideLimbDraw, 0, this, gCalcMatrix); + Animation_DrawSkeleton(3, D_SX_6020C68, this->vwork, SectorX_SxSpyborg_OverrideLimbDraw, 0, this, gCalcMatrix); RCP_SetupDL_64(); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 96); @@ -1534,10 +1533,10 @@ void SectorX_LevelStart(Player* player) { if (gCsFrameCount == 143) { Object_Kill(&gPlayerShots[0].obj, gPlayerShots[0].sfxSource); - func_effect_8007BFFC(gActors[5].obj.pos.x, gActors[5].obj.pos.y, gActors[5].obj.pos.z, 0.0f, 0.0f, 0.0f, - 3.0f, 40); + Effect386_Spawn1(gActors[5].obj.pos.x, gActors[5].obj.pos.y, gActors[5].obj.pos.z, 0.0f, 0.0f, 0.0f, + 3.0f, 40); func_effect_8007D2C8(gActors[5].obj.pos.x, gActors[5].obj.pos.y, gActors[5].obj.pos.z, 6.0f); - func_effect_8007B344(gActors[5].obj.pos.x, gActors[5].obj.pos.y, gActors[5].obj.pos.z, 5.0f, 5); + Effect_Effect384_Spawn(gActors[5].obj.pos.x, gActors[5].obj.pos.y, gActors[5].obj.pos.z, 5.0f, 5); Object_Kill(&gActors[5].obj, gActors[5].sfxSource); for (i = 0; i < 20; i++) { func_effect_80079618(gActors[5].obj.pos.x, gActors[5].obj.pos.y, gActors[5].obj.pos.z, 0.5f); diff --git a/src/overlays/ovl_i3/fox_a6.c b/src/overlays/ovl_i3/fox_a6.c index a2f1fbbd..592a19d7 100644 --- a/src/overlays/ovl_i3/fox_a6.c +++ b/src/overlays/ovl_i3/fox_a6.c @@ -67,7 +67,7 @@ typedef enum { /* 38 */ A6_SWK_38, /* 39 */ A6_SWK_39, /* 40 */ A6_SWK_MAX, -} BossA6swork; +} A6Gorgonswork; typedef enum { /* 0 */ A6_FWK_0, @@ -121,7 +121,7 @@ typedef enum { /* 48 */ A6_FWK_48, /* 49 */ A6_FWK_49, /* 50 */ A6_FWK_MAX, -} BossA6fwork; +} A6Gorgonfwork; typedef enum { /* 0 */ A6_VWK_0, @@ -175,7 +175,7 @@ typedef enum { /* 48 */ A6_VWK_48, /* 49 */ A6_VWK_49, /* 50 */ A6_VWK_MAX, -} BossA6vwork; +} A6Gorgonvwork; typedef enum { /* 0 */ A6_BSS_0, @@ -219,7 +219,7 @@ typedef enum { /* 38 */ A6_BSS_38, /* 39 */ A6_BSS_39, /* 40 */ A6_BSS_MAX, -} BossA6bsswork; +} A6Gorgonbsswork; typedef struct { /* 0x00 */ f32 r[3]; @@ -355,8 +355,8 @@ f32 D_i3_801BF494[12] = { -90.0f, 30.0f, 26.0f, 22.0f, 18.0f, 11.0f, 8.0f, 5.0f, 3.0f, 2.0f, 1.0f, 0.0f, }; -void Area6_80187530(Actor191* this, f32 xPos, f32 yPos, f32 zPos, f32 fwork6, f32 xRot, f32 yRot, s32 timer0BC, - s32 unk0B4) { +void Area6_ActorMissileSeekPlayer_Setup(ActorMissileSeekPlayer* this, f32 xPos, f32 yPos, f32 zPos, f32 fwork6, + f32 xRot, f32 yRot, s32 timer0BC, s32 unk0B4) { PRINTF("おん\n"); // On PRINTF("おふ\n"); // Off Actor_Initialize(this); @@ -378,20 +378,21 @@ void Area6_80187530(Actor191* this, f32 xPos, f32 yPos, f32 zPos, f32 fwork6, f3 Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_BARREL_SHOT); } -void Area6_801875E4(f32 xPos, f32 yPos, f32 zPos, f32 fwork6, f32 xRot, f32 yRot, s32 timer0BC, s32 unk0B4) { +void Area6_ActorMissileSeekPlayer_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 fwork6, f32 xRot, f32 yRot, s32 timer0BC, + s32 unk0B4) { s32 i; - Actor191* actor191; + ActorMissileSeekPlayer* missile; - for (i = 0, actor191 = &gActors[0]; i < ARRAY_COUNT(gActors); i++, actor191++) { - if (actor191->obj.status == OBJ_FREE) { - Area6_80187530(actor191, xPos, yPos, zPos, fwork6, xRot, yRot, timer0BC, unk0B4); + for (i = 0, missile = &gActors[0]; i < ARRAY_COUNT(gActors); i++, missile++) { + if (missile->obj.status == OBJ_FREE) { + Area6_ActorMissileSeekPlayer_Setup(missile, xPos, yPos, zPos, fwork6, xRot, yRot, timer0BC, unk0B4); D_i3_801C2250[A6_BSS_11] = i + 1; break; } } } -void Area6_8018767C(Effect395* this) { +void Area6_Effect395_Setup(Effect395* this) { Effect_Initialize(this); this->obj.status = OBJ_INIT; this->obj.id = OBJ_EFFECT_395; @@ -405,18 +406,18 @@ void Area6_8018767C(Effect395* this) { Object_SetInfo(&this->info, this->obj.id); } -void Area6_80187704(void) { +void Area6_Effect395_Spawn(void) { s32 i; for (i = 0; i < ARRAY_COUNT(gEffects); i++) { if (gEffects[i].obj.status == OBJ_FREE) { - Area6_8018767C(&gEffects[i]); + Area6_Effect395_Setup(&gEffects[i]); break; } } } -void Area6_BossA6_Init(BossA6* this) { +void Area6_A6Gorgon_Init(A6Gorgon* this) { Hitbox* hitbox; s32 i; @@ -462,7 +463,7 @@ void Area6_BossA6_Init(BossA6* this) { AUDIO_PLAY_SFX(NA_SE_EN_SHIELD_ROLL_LEVEL, this->sfxSource, 4); } -void Area6_Boss_Update(BossA6* this) { +void Area6_A6Gorgon_Update(A6Gorgon* this) { s32 i; s32 pad; s32 var_s0; @@ -520,7 +521,7 @@ void Area6_Boss_Update(BossA6* this) { AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, this->sfxSource, 4); - gShowBossHealth = 0; + gShowBossHealth = false; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 40); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 40); @@ -579,8 +580,8 @@ void Area6_Boss_Update(BossA6* this) { if ((this->swork[A6_SWK_15 + 0] == 0) && (this->swork[A6_SWK_15 + 1] == 0) && (this->swork[A6_SWK_15 + 2] == 0) && (this->fwork[A6_FWK_0] != 0) && !(gGameFrameCount % 2U)) { - func_effect_8007C120(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 200.0f, this->vel.x, this->vel.y, - this->vel.z, 0.3f, 1); + Effect_Effect390_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 200.0f, this->vel.x, this->vel.y, + this->vel.z, 0.3f, 1); } sp120 = 0.5f; @@ -682,12 +683,12 @@ void Area6_Boss_Update(BossA6* this) { } if (!(gGameFrameCount % 32U)) { - func_effect_8007C120(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 300.0f, this->vel.x, this->vel.y, - this->vel.z, 0.5f, 70); + Effect_Effect390_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 300.0f, this->vel.x, this->vel.y, + this->vel.z, 0.5f, 70); } } - if (!(gGameFrameCount % 16U)) { + if ((gGameFrameCount % 16U) == 0) { dz_114 = fabsf(this->fwork[A6_FWK_3] / -1700.0f); if (dz_114 < 1.0f) { dz_114 = 1.0f; @@ -929,7 +930,7 @@ void Area6_Boss_Update(BossA6* this) { D_i3_801C2250[A6_BSS_28] = 0; this->state = 4; this->fwork[A6_FWK_2] = 1.0f; - this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_A6_6028454); + this->info.hitbox = SEGMENTED_TO_VIRTUAL(aA6GorgonHitbox); D_i3_801C2250[A6_BSS_6] = 1; Audio_KillSfxBySource(this->sfxSource); AUDIO_PLAY_SFX(NA_SE_EN_COVER_CLOSE, this->sfxSource, 4); @@ -1010,7 +1011,7 @@ void Area6_Boss_Update(BossA6* this) { case 5: if (this->timer_050 == 1) { - Area6_80187704(); + Area6_Effect395_Spawn(); AUDIO_PLAY_SFX(NA_SE_EN_A6BOSS_CHARGE, this->sfxSource, 4); D_i3_801C2250[A6_BSS_33] = 120; } @@ -1150,8 +1151,9 @@ void Area6_Boss_Update(BossA6* this) { spf124 = 1; } - Area6_801875E4(this->obj.pos.x + sp8C.x, this->obj.pos.y + sp8C.y, this->obj.pos.z + sp8C.z, - 25.0f, pitch_110, yaw_10C, 10, spf124); + Area6_ActorMissileSeekPlayer_Spawn(this->obj.pos.x + sp8C.x, this->obj.pos.y + sp8C.y, + this->obj.pos.z + sp8C.z, 25.0f, pitch_110, yaw_10C, 10, + spf124); D_i3_801C2250[A6_BSS_12_0 + var_s0] = D_i3_801C2250[A6_BSS_11]; } @@ -1195,7 +1197,7 @@ void Area6_Boss_Update(BossA6* this) { } if (this->timer_052 == 0) { - gShowBossHealth = 0; + gShowBossHealth = false; Object_Kill(&this->obj, this->sfxSource); } break; @@ -1230,7 +1232,7 @@ void Area6_Boss_Update(BossA6* this) { Radio_PlayMessage(gMsg_ID_2225, RCID_SLIPPY); } if (gBossFrameCount == 756) { - gShowBossHealth = 1; + gShowBossHealth = true; } if (gBossFrameCount > 756) { gBossHealthBar = (this->health / 780.0f) * 255.0f; @@ -1258,7 +1260,7 @@ void Area6_Boss_Update(BossA6* this) { } } -void Area6_8018A1B0(BossA6* this, s32 arg1) { +void Area6_8018A1B0(A6Gorgon* this, s32 arg1) { switch (D_i3_801C2250[A6_BSS_2_0 + arg1]) { case 0: this->swork[A6_SWK_27 + arg1] = 12; @@ -1290,7 +1292,7 @@ void Area6_8018A1B0(BossA6* this, s32 arg1) { } } -void Area6_8018A2C4(BossA6* this) { +void Area6_8018A2C4(A6Gorgon* this) { s32 i; Vec3f effectPos; @@ -1330,7 +1332,7 @@ void Area6_8018A2C4(BossA6* this) { } } -void Area6_8018A464(BossA6* this, s32 arg1) { +void Area6_8018A464(A6Gorgon* this, s32 arg1) { s32 i; s32 j; f32 var_fs0; @@ -1692,7 +1694,7 @@ void Area6_8018A464(BossA6* this, s32 arg1) { } } -void Area6_8018B9BC(BossA6* this) { +void Area6_8018B9BC(A6Gorgon* this) { s32 i; s32 j; Vec3f dest; @@ -1726,8 +1728,8 @@ void Area6_8018B9BC(BossA6* this) { sfxPos.z = this->obj.pos.z + dest.z; Effect_SpawnTimedSfxAtPos(&sfxPos, NA_SE_EN_EXPLOSION_M); - func_effect_8007C120(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 150.0f, this->vel.x, - this->vel.y, this->vel.z, 0.2f, 50); + Effect_Effect390_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 150.0f, this->vel.x, + this->vel.y, this->vel.z, 0.2f, 50); } if ((this->swork[A6_SWK_15] == 0) && (this->swork[A6_SWK_16] == 0) && (this->swork[A6_SWK_17] == 0)) { @@ -1871,7 +1873,7 @@ void Area6_8018C0D0(f32* arg0, f32 arg1, Vec3f* arg2, f32 arg3, s32 arg4) { Matrix_Pop(&gGfxMatrix); } -void Area6_Boss_Draw(BossA6* this) { +void Area6_A6Gorgon_Draw(A6Gorgon* this) { Vec3f jointTable[30]; Vec3f spC4; Vec3f spB8; @@ -2122,14 +2124,14 @@ void Area6_8018D3CC(s32 arg0, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, void Area6_8018D4E0(Actor* this) { s32 i; - func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 4.0f, 20); + Effect386_Spawn1(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 4.0f, 20); func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 7.0f); - func_effect_8007B344(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 6.0f, 5); + Effect_Effect384_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 6.0f, 5); Object_Kill(&this->obj, this->sfxSource); for (i = 0; i < 15; i++) { - func_effect_800794CC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1.0f); + Effect_Effect357_Spawn50(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1.0f); } Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_M); } diff --git a/src/overlays/ovl_i3/fox_aq.c b/src/overlays/ovl_i3/fox_aq.c index ccb70c55..8bd61976 100644 --- a/src/overlays/ovl_i3/fox_aq.c +++ b/src/overlays/ovl_i3/fox_aq.c @@ -12,7 +12,7 @@ const char D_i3_801C1A30[] = "プレイヤーのすべてをクリア \n"; // Clear of all players const char D_i3_801C1A50[] = "i %d\n"; -typedef enum BossAQLimbs { +typedef enum AqBacoonLimbs { /* 0 */ AQ_LIMB_0, /* 1 */ AQ_LIMB_1, /* 2 */ AQ_LIMB_2, @@ -42,9 +42,9 @@ typedef enum BossAQLimbs { /* 26 */ AQ_LIMB_26, /* 27 */ AQ_LIMB_27, /* 28 */ AQ_LIMB_MAX, -} BossAQLimbs; +} AqBacoonLimbs; -typedef enum BossAQswork { +typedef enum AqBacoonswork { /* 0 */ AQ_SWK_0, /* 1 */ AQ_SWK_1, /* 2 */ AQ_SWK_2, @@ -86,9 +86,9 @@ typedef enum BossAQswork { /* 38 */ AQ_SWK_38, /* 39 */ AQ_SWK_39, /* 40 */ AQ_SWK_MAX, -} BossAQswork; +} AqBacoonswork; -typedef enum BossAQfwork { +typedef enum AqBacoonfwork { /* 0 */ AQ_FWK_0, /* 1 */ AQ_FWK_1, /* 2 */ AQ_FWK_2, @@ -140,9 +140,9 @@ typedef enum BossAQfwork { /* 48 */ AQ_FWK_48, /* 49 */ AQ_FWK_49, /* 50 */ AQ_FWK_MAX, -} BossAQfwork; +} AqBacoonfwork; -typedef enum BossAQvwork { +typedef enum AqBacoonvwork { /* 0 */ AQ_VWK_0, /* 1 */ AQ_VWK_1, /* 2 */ AQ_VWK_2, @@ -194,12 +194,12 @@ typedef enum BossAQvwork { /* 48 */ AQ_VWK_48, /* 49 */ AQ_VWK_49, /* 50 */ AQ_VWK_MAX, -} BossAQvwork; +} AqBacoonvwork; f32 D_AQ_801C4188; s32 D_i3_801C4190[10]; f32 D_i3_801C41B8[30]; -s32 sBossAQlimbTimers[AQ_LIMB_MAX]; +s32 sAqBacoonlimbTimers[AQ_LIMB_MAX]; s32 D_i3_801C42A0[25]; f32 D_i3_801C4308[82]; s32 D_i3_801C4450; @@ -323,12 +323,12 @@ void Aquas_801A8E30(void) { } } -void Aquas_801A92EC(Actor* actor, f32 xUnk, f32 yUnk, f32 zUnk, s32 index, s32 mode) { +void Aquas_801A92EC(AqJellyfish* this, f32 xUnk, f32 yUnk, f32 zUnk, s32 index, s32 mode) { gTexturedLines[index].mode = mode; gTexturedLines[index].xyScale = 10.0f; - gTexturedLines[index].posAA.x = actor->obj.pos.x; - gTexturedLines[index].posAA.y = actor->obj.pos.y; - gTexturedLines[index].posAA.z = actor->obj.pos.z; + gTexturedLines[index].posAA.x = this->obj.pos.x; + gTexturedLines[index].posAA.y = this->obj.pos.y; + gTexturedLines[index].posAA.z = this->obj.pos.z; gTexturedLines[index].posBB.x = xUnk; gTexturedLines[index].posBB.y = yUnk; gTexturedLines[index].posBB.z = zUnk; @@ -337,22 +337,22 @@ void Aquas_801A92EC(Actor* actor, f32 xUnk, f32 yUnk, f32 zUnk, s32 index, s32 m gTexturedLines[index].timer = 3; } -void Aquas_SetupDebris(Actor* actor, Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32 state, f32 scale, +void Aquas_SetupDebris(ActorDebris* this, Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32 state, f32 scale, s32 timerBC, s32 unk48) { - Actor_Initialize(actor); - actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_DEBRIS; - actor->state = state; - actor->scale = scale; - actor->unk_048 = unk48; - actor->obj.pos = *pos; - actor->obj.rot = *rot; - actor->vel.x = xVel; - actor->vel.y = yVel; - actor->vel.z = zVel; - actor->timer_0BC = timerBC; - actor->gravity = 0.5f; - Object_SetInfo(&actor->info, actor->obj.id); + Actor_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_ACTOR_DEBRIS; + this->state = state; + this->scale = scale; + this->unk_048 = unk48; + this->obj.pos = *pos; + this->obj.rot = *rot; + this->vel.x = xVel; + this->vel.y = yVel; + this->vel.z = zVel; + this->timer_0BC = timerBC; + this->gravity = 0.5f; + Object_SetInfo(&this->info, this->obj.id); } void Aquas_SpawnDebris(Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32 state, f32 scale, s32 timerBC, @@ -367,11 +367,11 @@ void Aquas_SpawnDebris(Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32 } } -void Aquas_801A94EC(Vec3f* pos, ObjectId objId) { +void Aquas_SpawnItem(Vec3f* pos, ObjectId objId) { s32 i; Item* item; - for (i = 0, item = gItems; i < ARRAY_COUNT(gItems); i++, item++) { + for (i = 0, item = &gItems[0]; i < ARRAY_COUNT(gItems); i++, item++) { if (item->obj.status == OBJ_FREE) { Item_Initialize(item); item->obj.status = OBJ_INIT; @@ -404,26 +404,26 @@ void Aquas_801A95C8(void) { Math_SmoothStepToF(&gPlayer[0].cam.at.z, gCsCamAtZ, 0.1f, 50.0f, 0.0001f); } -void Aquas_801A96DC(Actor* actor) { - actor->obj.rot.y = RAD_TO_DEG(-gPlayer[0].camYaw); - actor->obj.rot.x = RAD_TO_DEG(gPlayer[0].camPitch); +void Aquas_801A96DC(AqPearl* this) { + this->obj.rot.y = RAD_TO_DEG(-gPlayer[0].camYaw); + this->obj.rot.x = RAD_TO_DEG(gPlayer[0].camPitch); } -void Aquas_801A9728(Actor* actor, f32 radius, f32 scale, s32 spread) { - f32 temp_fs0; - f32 temp_fs1; - f32 temp; +void Aquas_801A9728(AqSculpin* this, f32 radius, f32 scale, s32 spread) { s32 i; + f32 x; + f32 y; + f32 z; for (i = 0; i < 36; i += spread) { - temp_fs1 = SIN_DEG(i * 10.0f) * radius; - temp_fs0 = COS_DEG(i * 10.0f) * radius; - temp = gGroundHeight + 30.0f; - func_effect_8007B8F8(actor->obj.pos.x + temp_fs1, temp, actor->obj.pos.z + temp_fs0, scale); + x = SIN_DEG(i * 10.0f) * radius; + z = COS_DEG(i * 10.0f) * radius; + y = gGroundHeight + 30.0f; + Effect_Effect364_Spawn(this->obj.pos.x + x, y, this->obj.pos.z + z, scale); } } -void Aquas_801A9824(void) { +void Aquas_InitLevel(void) { s32 i; f32* var_v0; f32* var_v0_4; @@ -442,7 +442,7 @@ void Aquas_801A9824(void) { } for (i = 0; i < AQ_LIMB_MAX; i++) { - sBossAQlimbTimers[i] = 0; + sAqBacoonlimbTimers[i] = 0; } for (i = 0; i < ARRAY_COUNT(D_i3_801C42A0); i++) { @@ -621,7 +621,7 @@ void Aquas_801A9ED0(Player* player) { fabsf(player->trueZpos - gBosses[0].obj.pos.z - gBosses[0].info.hitbox[j]); D_i3_801C4190[0] = 777; D_i3_801C4190[4] = i; - D_i3_801C4190[1] = OBJ_BOSS_AQ; + D_i3_801C4190[1] = OBJ_BOSS_AQ_BACOON; } if (((j == 129) && (gBosses[0].swork[AQ_SWK_8] == 0)) || @@ -644,9 +644,9 @@ void Aquas_801A9ED0(Player* player) { } void Aquas_801AA20C(void) { - f32 var_fs1; - f32 var_fs2; s32 i; + f32 x; + f32 y; if (gPlayer[0].draw) { Matrix_Push(&gGfxMatrix); @@ -655,20 +655,20 @@ void Aquas_801AA20C(void) { if (D_i3_801C4190[3] == 0) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); - var_fs1 = -10.0f; - var_fs2 = 10.0f; + x = -10.0f; + y = 10.0f; if (D_i3_801C4190[0] != 0) { - var_fs1 = var_fs2 = 0.0f; + x = y = 0.0f; } - Matrix_Translate(gGfxMatrix, D_i3_801C41B8[0] + var_fs1, D_i3_801C41B8[1] + var_fs2, + Matrix_Translate(gGfxMatrix, D_i3_801C41B8[0] + x, D_i3_801C41B8[1] + y, D_i3_801C41B8[2] + gPlayer[0].zPath, MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_i3_801C41B8[5], D_i3_801C41B8[5], D_i3_801C41B8[5], MTXF_APPLY); for (i = 0; i < 4; i++) { Matrix_RotateZ(gGfxMatrix, M_PI / 2, MTXF_APPLY); - Matrix_Translate(gGfxMatrix, var_fs1, var_fs2, 0.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, x, y, 0.0f, MTXF_APPLY); Matrix_Push(&gGfxMatrix); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_blue_marine_3000470); @@ -687,15 +687,15 @@ void Aquas_801AA20C(void) { } void Aquas_801AA4BC(Player* player) { - f32 sp3C; - f32 sp38; + f32 rotBankTarget; + f32 rotBankScale; if (player->unk_230 == 0) { - sp3C = 0.0f; - sp38 = 0.1f; + rotBankTarget = 0.0f; + rotBankScale = 0.1f; if ((gInputHold->button & Z_TRIG) && !(gInputHold->button & R_TRIG)) { - sp3C = 90.0f; - sp38 = 0.2f; + rotBankTarget = 90.0f; + rotBankScale = 0.2f; if (player->zRotBank < 70.0f) { Math_SmoothStepToF(&player->wings.unk_04, -70.0f, 0.3f, 100.0f, 0); Math_SmoothStepToF(&player->wings.unk_08, -70.0f, 0.3f, 100.0f, 0); @@ -705,8 +705,8 @@ void Aquas_801AA4BC(Player* player) { } if ((gInputHold->button & R_TRIG) && !(gInputHold->button & Z_TRIG)) { - sp3C = -90.0f; - sp38 = 0.2f; + rotBankTarget = -90.0f; + rotBankScale = 0.2f; if (player->zRotBank > -70.0f) { Math_SmoothStepToF(&player->wings.unk_04, 70.0f, 0.3f, 100.0f, 0); Math_SmoothStepToF(&player->wings.unk_08, 70.0f, 0.3f, 100.0f, 0); @@ -715,7 +715,7 @@ void Aquas_801AA4BC(Player* player) { } } - Math_SmoothStepToF(&player->zRotBank, sp3C, sp38, 10.0f, 0); + Math_SmoothStepToF(&player->zRotBank, rotBankTarget, rotBankScale, 10.0f, 0); } if ((gInputPress->button & Z_TRIG) && (player->unk_230 == 0)) { @@ -1059,15 +1059,15 @@ void Aquas_BlueMarineMove(Player* player) { if (player->boostSpeed > 1.0f) { player->unk_178 -= 30.0f; - Aquas_801AC8A8(player->pos.x + RAND_FLOAT_CENTERED(10.0f) + sp80.x, - player->pos.y + RAND_FLOAT_CENTERED(10.0f) + sp80.y, - player->trueZpos + RAND_FLOAT_CENTERED(10.0f) + (sp80.z * -1.0f), 0.4f, 1); + Aquas_Effect366_Spawn(player->pos.x + RAND_FLOAT_CENTERED(10.0f) + sp80.x, + player->pos.y + RAND_FLOAT_CENTERED(10.0f) + sp80.y, + player->trueZpos + RAND_FLOAT_CENTERED(10.0f) + (sp80.z * -1.0f), 0.4f, 1); } else { player->unk_178 -= 10.0f; - if (((gGameFrameCount % 8) == 0)) { - Aquas_801AC8A8(player->pos.x + RAND_FLOAT_CENTERED(10.0f) + sp80.x, - player->pos.y + RAND_FLOAT_CENTERED(10.0f) + sp80.y, - player->trueZpos + RAND_FLOAT_CENTERED(20.0f) + sp80.z, 0.4f, 0); + if ((gGameFrameCount % 8) == 0) { + Aquas_Effect366_Spawn(player->pos.x + RAND_FLOAT_CENTERED(10.0f) + sp80.x, + player->pos.y + RAND_FLOAT_CENTERED(10.0f) + sp80.y, + player->trueZpos + RAND_FLOAT_CENTERED(20.0f) + sp80.z, 0.4f, 0); } } } @@ -1075,8 +1075,8 @@ void Aquas_BlueMarineMove(Player* player) { void Aquas_BlueMarineDown(Player* player) { func_effect_8007D0E0(player->pos.x, player->pos.y, player->trueZpos, 6.0f); - func_effect_8007B344(player->pos.x, player->pos.y, player->trueZpos, 3.0f, 5); - func_effect_8007BFFC(player->pos.x, player->pos.y, player->trueZpos, 0.0f, 0.0f, 0.0f, 3.0f, 80); + Effect_Effect384_Spawn(player->pos.x, player->pos.y, player->trueZpos, 3.0f, 5); + Effect386_Spawn1(player->pos.x, player->pos.y, player->trueZpos, 0.0f, 0.0f, 0.0f, 3.0f, 80); Cutscene_KillPlayer(player); } @@ -1103,18 +1103,18 @@ void Aquas_801ABA40(PlayerShot* shot) { shot->obj.pos.y = gGroundHeight + 2.0f; PlayerShot_SpawnEffect344(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.0f, 90.0f, 2.0f, 0, 0); - func_effect_8007CF30(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 1.2f); + Effect_FireSmoke_Spawn(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 1.2f); D_i3_801C4190[5] = D_i3_801C4190[3] = 0; PlayerShot_Impact(shot); } else if (((shot->timer == 0) || (D_i3_801C4454 == 0)) && (shot->unk_5C != 0)) { - func_effect_8007CF30(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 1.2f); + Effect_FireSmoke_Spawn(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 1.2f); D_i3_801C41B8[21] = D_i3_801C41B8[22] = D_i3_801C41B8[23] = 0.0f; D_i3_801C4190[5] = D_i3_801C4190[3] = 0; PlayerShot_Impact(shot); } else { Math_SmoothStepToF(&shot->unk_48, 50.0f, 0.2f, 10.0f, 0.00001f); shot->obj.rot.z += shot->unk_48; - if (((gGameFrameCount % 2) == 0)) { + if ((gGameFrameCount % 2) == 0) { PlayerShot_SpawnEffect351(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z); } @@ -1277,7 +1277,7 @@ void Aquas_BlueMarineShoot(Player* player) { D_i3_801C41B8[11] = 10000.0f; temp = D_i3_801C4190[0]; - for (i = 0, actor = gActors; i < ARRAY_COUNT(gActors); i++, actor++) { + for (i = 0, actor = &gActors[0]; i < ARRAY_COUNT(gActors); i++, actor++) { if ((actor->obj.status == OBJ_ACTIVE) && (actor->obj.id != OBJ_ACTOR_DEBRIS)) { var_v1 = 1; if (actor->info.hitbox[1] == HITBOX_ROTATED) { @@ -1350,88 +1350,87 @@ void Aquas_BlueMarineShoot(Player* player) { } } -void Aquas_801AC7C8(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 state) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_366; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; - effect->scale1 = RAND_FLOAT(360.0f); - effect->state = state; - effect->unk_4A = 40; - effect->scale2 = scale2 * 0.2f; - effect->unk_46 = 50; - effect->unk_60.y = gPlayer[0].rot.y + gPlayer[0].yRot_114; +void Aquas_Effect366_Setup(Effect366* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 state) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_366; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + this->scale1 = RAND_FLOAT(360.0f); + this->state = state; + this->unk_4A = 40; + this->scale2 = scale2 * 0.2f; + this->unk_46 = 50; + this->unk_60.y = gPlayer[0].rot.y + gPlayer[0].yRot_114; - if (effect->state == 2) { - effect->unk_46 = 100; + if (this->state == 2) { + this->unk_46 = 100; } - Object_SetInfo(&effect->info, effect->obj.id); + Object_SetInfo(&this->info, this->obj.id); } -void Aquas_801AC8A8(f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 unk4E) { +void Aquas_Effect366_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 unk4E) { s32 i; for (i = 0; i < 95; i++) { if (gEffects[i].obj.status == OBJ_FREE) { - Aquas_801AC7C8(&gEffects[i], xPos, yPos, zPos, scale2, unk4E); + Aquas_Effect366_Setup(&gEffects[i], xPos, yPos, zPos, scale2, unk4E); break; } } } -// OBJ_EFFECT_366 action -void Aquas_Effect366_Update(Effect* effect) { +void Aquas_Effect366_Update(Effect366* this) { f32 temp_fs0; - if (effect->unk_46 != 0) { - effect->unk_46--; + if (this->unk_46 != 0) { + this->unk_46--; } - switch (effect->state) { + switch (this->state) { case 0: - if (effect->vel.y < 5.0f) { - effect->vel.y += 0.1f; + if (this->vel.y < 5.0f) { + this->vel.y += 0.1f; } - if (effect->unk_46 == 0) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->unk_46 == 0) { + Object_Kill(&this->obj, this->sfxSource); } - effect->scale1 += 33.0f; - temp_fs0 = COS_DEG(effect->scale1) * 1.5f; - effect->vel.x = __cosf(gPlayer[0].camYaw) * temp_fs0; - effect->vel.z = __sinf(gPlayer[0].camYaw) * temp_fs0; + this->scale1 += 33.0f; + temp_fs0 = COS_DEG(this->scale1) * 1.5f; + this->vel.x = __cosf(gPlayer[0].camYaw) * temp_fs0; + this->vel.z = __sinf(gPlayer[0].camYaw) * temp_fs0; break; case 1: - if (effect->unk_46 == 0) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->unk_46 == 0) { + Object_Kill(&this->obj, this->sfxSource); } - effect->unk_60.x += 0.07f; - effect->scale1 += 33.0f; + this->unk_60.x += 0.07f; + this->scale1 += 33.0f; - effect->vel.y = effect->unk_60.x + (SIN_DEG(effect->scale1) * 3.0f); - temp_fs0 = COS_DEG(effect->scale1) * 3.0f; - effect->vel.x = COS_DEG(effect->unk_60.y) * temp_fs0; - effect->vel.z = -SIN_DEG(effect->unk_60.y) * temp_fs0; + this->vel.y = this->unk_60.x + (SIN_DEG(this->scale1) * 3.0f); + temp_fs0 = COS_DEG(this->scale1) * 3.0f; + this->vel.x = COS_DEG(this->unk_60.y) * temp_fs0; + this->vel.z = -SIN_DEG(this->unk_60.y) * temp_fs0; break; case 2: - if (effect->vel.y < 10.0f) { - effect->vel.y += 0.2f; + if (this->vel.y < 10.0f) { + this->vel.y += 0.2f; } - if (effect->unk_46 == 0) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->unk_46 == 0) { + Object_Kill(&this->obj, this->sfxSource); } - effect->scale1 += 55.0f; - temp_fs0 = COS_DEG(effect->scale1) * 2.5f; - effect->vel.x = __cosf(gPlayer[0].camYaw) * temp_fs0; - effect->vel.z = __sinf(gPlayer[0].camYaw) * temp_fs0; + this->scale1 += 55.0f; + temp_fs0 = COS_DEG(this->scale1) * 2.5f; + this->vel.x = __cosf(gPlayer[0].camYaw) * temp_fs0; + this->vel.z = __sinf(gPlayer[0].camYaw) * temp_fs0; break; } } -void Aquas_801ACBB4(Player* player) { +void Aquas_BlueMarine_Draw(Player* player) { Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -40.0f, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -1480,9 +1479,9 @@ void Aquas_BlueMarineBoost(Player* player) { sp54.z = 70.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48); - Aquas_801AC8A8(player->pos.x + RAND_FLOAT_CENTERED(10.0f) + sp48.x, - player->pos.y + RAND_FLOAT_CENTERED(10.0f) + sp48.y, - player->trueZpos + RAND_FLOAT_CENTERED(10.0f) + (sp48.z * -1.0f), 0.4f, 1); + Aquas_Effect366_Spawn(player->pos.x + RAND_FLOAT_CENTERED(10.0f) + sp48.x, + player->pos.y + RAND_FLOAT_CENTERED(10.0f) + sp48.y, + player->trueZpos + RAND_FLOAT_CENTERED(10.0f) + (sp48.z * -1.0f), 0.4f, 1); Math_SmoothStepToF(&player->camDist, -130.0f, 0.1f, 10.0f, 0.00001f); player->zRotBarrelRoll -= player->meteoWarpSpinSpeed; @@ -1555,9 +1554,9 @@ void Aquas_BlueMarineBoost(Player* player) { } void Aquas_BlueMarineBrake(Player* player) { - player->sfx.brake = 0; + player->sfx.brake = false; - if ((gBrakeButton[player->num] & gInputHold->button) && (player->unk_230 == 0) && + if ((gInputHold->button & gBrakeButton[player->num]) && (player->unk_230 == 0) && (player->state_1C8 != PLAYERSTATE_1C8_U_TURN) && (player->boostCooldown == 0)) { if (player->boostMeter == 0) { AUDIO_PLAY_SFX(NA_SE_MARINE_BRAKE, player->sfxSource, 4); @@ -1577,7 +1576,7 @@ void Aquas_BlueMarineBrake(Player* player) { Math_SmoothStepToF(&D_i3_801C41B8[28], 10.0f, 1.0f, 2.0f, 0.00001f); Math_SmoothStepToF(&player->camDist, 180.0f, 0.1f, D_i3_801C41B8[28], 0.0f); - player->sfx.brake = 1; + player->sfx.brake = true; Math_SmoothStepToF(&D_ctx_801779A8[0], 25.0f, 1.0f, 5.0f, 0.0f); } else { @@ -1602,33 +1601,32 @@ void Aquas_BlueMarineBrake(Player* player) { Math_SmoothStepToF(&player->camDist, 0.0f, 0.1f, 2.0f, 0.0f); } -void Aquas_801AD598(Actor* actor) { +void Aquas_801AD598(Actor255* this) { s32 i; - D_i3_801C27C0 = &D_i3_801C27C8[50 * actor->iwork[0]]; + D_i3_801C27C0 = &D_i3_801C27C8[50 * this->iwork[0]]; - for (i = 50 * actor->iwork[0]; i < 50 * actor->iwork[0] + 50; i++, D_i3_801C27C0++) { - D_i3_801C27C0->pos.x = actor->obj.pos.x; - D_i3_801C27C0->pos.y = actor->obj.pos.y; - D_i3_801C27C0->pos.z = actor->obj.pos.z; - D_i3_801C27C0->rot.x = actor->obj.rot.x; - D_i3_801C27C0->rot.y = actor->obj.rot.y; - D_i3_801C27C0->rot.z = actor->obj.rot.z; - D_i3_801C27C0->rot.x = actor->rot_0F4.x; - D_i3_801C27C0->rot.y = actor->rot_0F4.y; - D_i3_801C27C0->rot.z = actor->rot_0F4.z; + for (i = 50 * this->iwork[0]; i < 50 * this->iwork[0] + 50; i++, D_i3_801C27C0++) { + D_i3_801C27C0->pos.x = this->obj.pos.x; + D_i3_801C27C0->pos.y = this->obj.pos.y; + D_i3_801C27C0->pos.z = this->obj.pos.z; + D_i3_801C27C0->rot.x = this->obj.rot.x; + D_i3_801C27C0->rot.y = this->obj.rot.y; + D_i3_801C27C0->rot.z = this->obj.rot.z; + D_i3_801C27C0->rot.x = this->rot_0F4.x; + D_i3_801C27C0->rot.y = this->rot_0F4.y; + D_i3_801C27C0->rot.z = this->rot_0F4.z; } } -void Aquas_801AD688(Actor* actor) { - Aquas_801AD598(actor); - actor->iwork[1] = 10; - actor->scale = 1.0f; +void Aquas_Actor255_Init(Actor255* this) { + Aquas_801AD598(this); + this->iwork[1] = 10; + this->scale = 1.0f; } -// OBJ_ACTOR_255 action -void Aquas_Actor255_Update(Actor* actor) { - s32 var_v0 = actor->iwork[2] - 1; +void Aquas_Actor255_Update(Actor255* this) { + s32 var_v0 = this->iwork[2] - 1; f32 sp80; f32 sp7C; f32 sp78; @@ -1641,157 +1639,156 @@ void Aquas_Actor255_Update(Actor* actor) { Vec3f sp44; if ((D_i3_801C42A0[23] == 0) || (gActors[var_v0].state >= 4)) { - actor->timer_0C2 = 30000; - actor->state = 2; - actor->vel.y = 0.0f; - actor->vel.x = 0.0f; - actor->vel.z = 0.0f; + this->timer_0C2 = 30000; + this->state = 2; + this->vel.y = 0.0f; + this->vel.x = 0.0f; + this->vel.z = 0.0f; } - if ((gPlayer[0].trueZpos + 500.0f) <= actor->obj.pos.z) { - Object_Kill(&actor->obj, actor->sfxSource); + if ((gPlayer[0].trueZpos + 500.0f) <= this->obj.pos.z) { + Object_Kill(&this->obj, this->sfxSource); } - actor->counter_04E++; - - if (actor->counter_04E >= 50) { - actor->counter_04E = 0; + this->counter_04E++; + if (this->counter_04E >= 50) { + this->counter_04E = 0; } - switch (actor->state) { + switch (this->state) { case 0: - if (actor->timer_0BC != 0) { - actor->rot_0F4.x += D_i3_801C4308[10]; - actor->rot_0F4.z += 10.0f; - actor->rot_0F4.z = Math_ModF(actor->rot_0F4.z, 360.0f); + if (this->timer_0BC != 0) { + this->rot_0F4.x += D_i3_801C4308[10]; + this->rot_0F4.z += 10.0f; + this->rot_0F4.z = Math_ModF(this->rot_0F4.z, 360.0f); } else { - actor->health = 30; - AUDIO_PLAY_SFX(NA_SE_EN_SANADA_SWIM, actor->sfxSource, 4); - actor->state++; + this->health = 30; + AUDIO_PLAY_SFX(NA_SE_EN_SANADA_SWIM, this->sfxSource, 4); + this->state++; } break; case 1: - if (actor->dmgType != DMG_NONE) { - if (actor->health > 0) { - actor->dmgType = DMG_NONE; - actor->timer_0C6 = 15; - actor->health -= actor->damage; + if (this->dmgType != DMG_NONE) { + if (this->health > 0) { + this->dmgType = DMG_NONE; + this->timer_0C6 = 15; + this->health -= this->damage; - AUDIO_PLAY_SFX(NA_SE_EN_SANADA_DAMAGE, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SANADA_DAMAGE, this->sfxSource, 4); - if (actor->health <= 0) { - actor->timer_0C2 = 30000; - actor->state = 2; - actor->vel.y = 0.0f; - actor->vel.x = 0.0f; - actor->vel.z = 0.0f; - AUDIO_PLAY_SFX(NA_SE_EN_SANADA_DOWN, actor->sfxSource, 4); + if (this->health <= 0) { + this->timer_0C2 = 30000; + this->state = 2; + this->vel.y = 0.0f; + this->vel.x = 0.0f; + this->vel.z = 0.0f; + AUDIO_PLAY_SFX(NA_SE_EN_SANADA_DOWN, this->sfxSource, 4); } } } - if (actor->obj.pos.z <= (gPlayer[0].trueZpos - 200.0f)) { - actor->fwork[7] = sp80 = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(100.0f) - actor->obj.pos.x; - actor->fwork[8] = sp7C = gPlayer[0].pos.y - 30.0f - actor->obj.pos.y; - actor->fwork[9] = sp78 = gPlayer[0].trueZpos - actor->obj.pos.z; + if (this->obj.pos.z <= (gPlayer[0].trueZpos - 200.0f)) { + this->fwork[7] = sp80 = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(100.0f) - this->obj.pos.x; + this->fwork[8] = sp7C = gPlayer[0].pos.y - 30.0f - this->obj.pos.y; + this->fwork[9] = sp78 = gPlayer[0].trueZpos - this->obj.pos.z; } else { - sp80 = actor->fwork[7]; - sp7C = actor->fwork[8]; - sp78 = actor->fwork[9] + 600.0f; + sp80 = this->fwork[7]; + sp7C = this->fwork[8]; + sp78 = this->fwork[9] + 600.0f; } Math_RadToDeg(Math_Atan2F(sp80, sp78)); sp70 = sqrtf(SQ(sp80) + SQ(sp78)); Math_RadToDeg(-Math_Atan2F(sp7C, sp70)); - actor->fwork[0] += (actor->iwork[0] + 1) * 5.0f; - actor->fwork[1] += 10.0f + (actor->iwork[0] + 1) * 5.0f; - actor->fwork[5] = (actor->iwork[0] + 1) * 0.2f; - actor->fwork[6] = (actor->iwork[0] + 1) * 0.2f; + this->fwork[0] += (this->iwork[0] + 1) * 5.0f; + this->fwork[1] += 10.0f + (this->iwork[0] + 1) * 5.0f; + this->fwork[5] = (this->iwork[0] + 1) * 0.2f; + this->fwork[6] = (this->iwork[0] + 1) * 0.2f; - sp7C = SIN_DEG(actor->fwork[0]) * sp70 * actor->fwork[5]; - sp74 = COS_DEG(actor->fwork[1]) * sp70 * actor->fwork[6]; - sp80 = COS_DEG(actor->rot_0F4.y) * sp74; - sp78 = -SIN_DEG(actor->rot_0F4.y) * sp74; + sp7C = SIN_DEG(this->fwork[0]) * sp70 * this->fwork[5]; + sp74 = COS_DEG(this->fwork[1]) * sp70 * this->fwork[6]; + sp80 = COS_DEG(this->rot_0F4.y) * sp74; + sp78 = -SIN_DEG(this->rot_0F4.y) * sp74; if (sp7C < 20.0f) { sp7C = 20.0f; } - if ((Rand_ZeroOne() < 0.7) && (actor->obj.rot.z == 0.0f)) { - actor->fwork[2] = 360.0f; + if ((Rand_ZeroOne() < 0.7) && (this->obj.rot.z == 0.0f)) { + this->fwork[2] = 360.0f; } - Math_SmoothStepToF(&actor->rot_0F4.z, actor->fwork[2], 0.1f, 10.0f, 0.001f); + Math_SmoothStepToF(&this->rot_0F4.z, this->fwork[2], 0.1f, 10.0f, 0.001f); - if (actor->rot_0F4.z >= 360.0f) { - actor->rot_0F4.z = 0.0f; - actor->fwork[2] = 0.0f; + if (this->rot_0F4.z >= 360.0f) { + this->rot_0F4.z = 0.0f; + this->fwork[2] = 0.0f; } - sp68 = Math_RadToDeg(Math_Atan2F(gPlayer[0].pos.x + sp80 + RAND_FLOAT_CENTERED(200.0f) - actor->obj.pos.x, - gPlayer[0].trueZpos + sp78 - actor->obj.pos.z)); - sp6C = Math_RadToDeg(-Math_Atan2F(gPlayer[0].pos.y - 30.0f + sp7C - actor->obj.pos.y, sp70)); + sp68 = Math_RadToDeg(Math_Atan2F(gPlayer[0].pos.x + sp80 + RAND_FLOAT_CENTERED(200.0f) - this->obj.pos.x, + gPlayer[0].trueZpos + sp78 - this->obj.pos.z)); + sp6C = Math_RadToDeg(-Math_Atan2F(gPlayer[0].pos.y - 30.0f + sp7C - this->obj.pos.y, sp70)); - if (gPlayer[0].trueZpos <= actor->obj.pos.z) { - sp68 = actor->rot_0F4.y; - sp6C = actor->rot_0F4.x; + if (gPlayer[0].trueZpos <= this->obj.pos.z) { + sp68 = this->rot_0F4.y; + sp6C = this->rot_0F4.x; } - Math_SmoothStepToAngle(&actor->rot_0F4.y, sp68, 1.0f, 5.0f, 0.001f); - Math_SmoothStepToAngle(&actor->rot_0F4.x, sp6C, 1.0f, 5.0f, 0.001f); - Matrix_RotateY(gCalcMatrix, actor->rot_0F4.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, actor->rot_0F4.x * M_DTOR, MTXF_APPLY); + Math_SmoothStepToAngle(&this->rot_0F4.y, sp68, 1.0f, 5.0f, 0.001f); + Math_SmoothStepToAngle(&this->rot_0F4.x, sp6C, 1.0f, 5.0f, 0.001f); + Matrix_RotateY(gCalcMatrix, this->rot_0F4.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->rot_0F4.x * M_DTOR, MTXF_APPLY); sp5C.x = 0.0f; sp5C.y = 0.0f; sp5C.z = 40.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp5C, &sp50); - sp5C.z = 10.0f + (actor->iwork[0] + 1) * RAND_FLOAT(10.0f); + sp5C.z = 10.0f + (this->iwork[0] + 1) * RAND_FLOAT(10.0f); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp5C, &sp44); - actor->vel.x = sp50.x; - actor->vel.y = sp50.y; - actor->vel.z = sp44.z; + this->vel.x = sp50.x; + this->vel.y = sp50.y; + this->vel.z = sp44.z; break; case 2: - if (actor->timer_0C6 == 0) { - actor->timer_0C6 = 15; + if (this->timer_0C6 == 0) { + this->timer_0C6 = 15; } - if (actor->timer_0BC == 0) { - var_v0 = actor->iwork[0] * 50 + actor->counter_04E - D_i3_801BFB64[actor->iwork[1]]; - if (var_v0 < actor->iwork[0] * 50) { + if (this->timer_0BC == 0) { + var_v0 = this->iwork[0] * 50 + this->counter_04E - D_i3_801BFB64[this->iwork[1]]; + if (var_v0 < this->iwork[0] * 50) { if (var_v0 > 0) { - var_v0 -= actor->iwork[0] * 50; + var_v0 -= this->iwork[0] * 50; } - var_v0 = var_v0 + (actor->iwork[0] + 1) * 50; + var_v0 = var_v0 + (this->iwork[0] + 1) * 50; } D_i3_801C27C0 = &D_i3_801C27C8[var_v0]; func_effect_800815DC(); - actor->iwork[1]--; - if (actor->iwork[1] <= 0) { - actor->itemDrop = DROP_NONE; - actor->dmgSource = DMG_SRC_2; - Actor_Despawn(actor); - Object_Kill(&actor->obj, actor->sfxSource); + this->iwork[1]--; + if (this->iwork[1] <= 0) { + this->itemDrop = DROP_NONE; + this->dmgSource = DMG_SRC_2; + Actor_Despawn(this); + Object_Kill(&this->obj, this->sfxSource); } - actor->timer_0BC = 4; + this->timer_0BC = 4; func_effect_8007D0E0(D_i3_801C27C0->pos.x, D_i3_801C27C0->pos.y, D_i3_801C27C0->pos.z, 3.0f); - AUDIO_PLAY_SFX(NA_SE_EN_SEA_EXPLOSION_S, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SEA_EXPLOSION_S, this->sfxSource, 4); } break; } - D_i3_801C27C0 = &D_i3_801C27C8[50 * actor->iwork[0] + actor->counter_04E]; + D_i3_801C27C0 = &D_i3_801C27C8[50 * this->iwork[0] + this->counter_04E]; - D_i3_801C27C0->pos.x = actor->obj.pos.x; - D_i3_801C27C0->pos.y = actor->obj.pos.y; - D_i3_801C27C0->pos.z = actor->obj.pos.z; + D_i3_801C27C0->pos.x = this->obj.pos.x; + D_i3_801C27C0->pos.y = this->obj.pos.y; + D_i3_801C27C0->pos.z = this->obj.pos.z; - D_i3_801C27C0->rot.x = actor->rot_0F4.x; - D_i3_801C27C0->rot.y = actor->rot_0F4.y; - D_i3_801C27C0->rot.z = actor->rot_0F4.z; + D_i3_801C27C0->rot.x = this->rot_0F4.x; + D_i3_801C27C0->rot.y = this->rot_0F4.y; + D_i3_801C27C0->rot.z = this->rot_0F4.z; } void Aquas_801ADF7C(f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 zRot, u8 type, s32 flag, f32 scale, @@ -1824,8 +1821,7 @@ void Aquas_801ADF7C(f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 zRot, Matrix_Pop(&gGfxMatrix); } -// OBJ_ACTOR_255 draw -void Aquas_Actor255_Draw(Actor* actor) { +void Aquas_Actor255_Draw(Actor255* this) { s32 i; f32 xz; f32 yRot; @@ -1835,18 +1831,18 @@ void Aquas_Actor255_Draw(Actor* actor) { Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - for (i = 0; i <= actor->iwork[1]; i++) { - if ((actor->iwork[1] != 10) && (i == 0)) { + for (i = 0; i <= this->iwork[1]; i++) { + if ((this->iwork[1] != 10) && (i == 0)) { i = 1; } - index = ((actor->iwork[0] * 50) + actor->counter_04E) - D_i3_801BFB64[i]; + index = ((this->iwork[0] * 50) + this->counter_04E) - D_i3_801BFB64[i]; - if (index < (actor->iwork[0] * 50)) { + if (index < (this->iwork[0] * 50)) { if (index > 0) { - index -= actor->iwork[0] * 50; + index -= this->iwork[0] * 50; } - index = index + ((actor->iwork[0] + 1) * 50); + index = index + ((this->iwork[0] + 1) * 50); } D_i3_801C27C0 = &D_i3_801C27C8[index]; @@ -1864,55 +1860,54 @@ void Aquas_Actor255_Draw(Actor* actor) { } Aquas_801ADF7C(D_i3_801C27C0->pos.x, D_i3_801C27C0->pos.y, D_i3_801C27C0->pos.z, xRot, yRot, - D_i3_801C27C0->rot.z, D_i3_801BFB90[i], actor->timer_0C6 % 2U, actor->scale, i); + D_i3_801C27C0->rot.z, D_i3_801BFB90[i], this->timer_0C6 % 2U, this->scale, i); } } -void Aquas_801AE3AC(Actor* actor) { - actor->fwork[1] = 1.0f; - actor->obj.rot.x = 336.0f; - actor->scale = 0.5f; +void Aquas_Actor256_Init(Actor256* this) { + this->fwork[1] = 1.0f; + this->obj.rot.x = 336.0f; + this->scale = 0.5f; } -// OBJ_ACTOR_256 action -void Aquas_Actor256_Update(Actor* actor) { +void Aquas_Actor256_Update(Actor256* this) { s32 i; - switch (actor->state) { + switch (this->state) { case 0: - actor->obj.pos.y = fabsf(D_i3_801C4308[10] * 15.0f) + 347.0f; - if (actor->obj.pos.y >= 757.0f) { - actor->obj.pos.y = 757.0f; + this->obj.pos.y = fabsf(D_i3_801C4308[10] * 15.0f) + 347.0f; + if (this->obj.pos.y >= 757.0f) { + this->obj.pos.y = 757.0f; } - if (actor->obj.pos.y <= 347.0f) { - actor->obj.pos.y = 347.0f; + if (this->obj.pos.y <= 347.0f) { + this->obj.pos.y = 347.0f; } - actor->scale = fabsf(D_i3_801C4308[10] / -28.0f) + 0.5f; + this->scale = fabsf(D_i3_801C4308[10] / -28.0f) + 0.5f; - if (actor->scale > 1.3f) { - actor->scale = 1.3f; + if (this->scale > 1.3f) { + this->scale = 1.3f; } - if (actor->scale <= 0.5f) { - actor->scale = 0.5f; + if (this->scale <= 0.5f) { + this->scale = 0.5f; } if (gBosses[0].timer_052 == 0) { - actor->health = 0; - if (actor->info.hitbox[10] != 116.0f) { - actor->info.hitbox[10] = 116.0f; + this->health = 0; + if (this->info.hitbox[10] != 116.0f) { + this->info.hitbox[10] = 116.0f; } } - if (actor->dmgType != DMG_NONE) { - actor->dmgType = DMG_NONE; + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; if ((fabsf(D_i3_801C4308[10]) >= 6.0f) && (gBosses[0].state >= 10) && (gBosses[0].swork[AQ_SWK_0] < 2)) { - actor->timer_0C6 = 30; - actor->iwork[1] = 0; + this->timer_0C6 = 30; + this->iwork[1] = 0; D_i3_801C4308[79] -= 5.0f; - AUDIO_PLAY_SFX(NA_SE_EN_KAIBASHIRA_DAMAGE, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_KAIBASHIRA_DAMAGE, this->sfxSource, 4); if (D_i3_801C4308[79] <= -28.0f) { D_i3_801C4308[79] = -28.0f; @@ -1922,38 +1917,38 @@ void Aquas_Actor256_Update(Actor* actor) { if (gBosses[0].timer_052 == 0) { gBosses[0].timer_052 = 72; - actor->health = 10; + this->health = 10; for (i = 0; i < ARRAY_COUNT(gActors); i++) { - if ((gActors[i].obj.id == OBJ_ACTOR_256) && (actor->index != gActors[i].index)) { + if ((gActors[i].obj.id == OBJ_ACTOR_256) && (this->index != gActors[i].index)) { gActors[i].health = 10; } } } else { - actor->iwork[1] = 0; - actor->timer_0C6 = 0; + this->iwork[1] = 0; + this->timer_0C6 = 0; } if (gBosses[0].swork[AQ_SWK_0] == 0) { gBosses[0].swork[AQ_SWK_0] = 1; - actor->info.hitbox[10] = 300.0f; - if (actor->iwork[23] == 0) { + this->info.hitbox[10] = 300.0f; + if (this->iwork[23] == 0) { Radio_PlayMessage(gMsg_ID_15120, RCID_SLIPPY); } - actor->iwork[23]++; - actor->iwork[23] &= 1; - } else if (actor->damage == 31) { - actor->health -= actor->damage; + this->iwork[23]++; + this->iwork[23] &= 1; + } else if (this->damage == 31) { + this->health -= this->damage; Radio_PlayMessage(gMsg_ID_15130, RCID_FALCO); - if (actor->health <= 0) { + if (this->health <= 0) { gBosses[0].swork[AQ_SWK_0] = 2; - actor->health = 0; - actor->timer_0C6 = 300; - actor->fwork[2] = actor->scale; - AUDIO_PLAY_SFX(NA_SE_EN_WT_DISAPPEAR_L, actor->sfxSource, 4); - actor->state++; + this->health = 0; + this->timer_0C6 = 300; + this->fwork[2] = this->scale; + AUDIO_PLAY_SFX(NA_SE_EN_WT_DISAPPEAR_L, this->sfxSource, 4); + this->state++; } } } @@ -1963,43 +1958,43 @@ void Aquas_Actor256_Update(Actor* actor) { case 1: if ((gGameFrameCount % 2) == 0) { - func_effect_8007C120(actor->obj.pos.x, actor->fwork[0] + actor->obj.pos.y, actor->obj.pos.z, - actor->vel.x, actor->vel.y, actor->vel.z, 0.1f, 10); - func_effect_8007C120(actor->obj.pos.x, actor->obj.pos.y + (actor->fwork[0] * -1.0f), - actor->obj.pos.z + 200.0f, actor->vel.x, actor->vel.y, actor->vel.z, 0.1f, 10); - actor->fwork[0] += 40.0f; + Effect_Effect390_Spawn(this->obj.pos.x, this->fwork[0] + this->obj.pos.y, this->obj.pos.z, this->vel.x, + this->vel.y, this->vel.z, 0.1f, 10); + Effect_Effect390_Spawn(this->obj.pos.x, this->obj.pos.y + (this->fwork[0] * -1.0f), + this->obj.pos.z + 200.0f, this->vel.x, this->vel.y, this->vel.z, 0.1f, 10); + this->fwork[0] += 40.0f; } - if ((actor->fwork[2] * 400.0f) <= actor->fwork[0]) { - actor->timer_0BC = 20; - actor->state++; + if ((this->fwork[2] * 400.0f) <= this->fwork[0]) { + this->timer_0BC = 20; + this->state++; } break; case 2: - if (actor->timer_0BC == 0) { + if (this->timer_0BC == 0) { for (i = 0; i < 6; i++) { - func_effect_8007B8F8(actor->obj.pos.x, actor->obj.pos.y + 450.0f, actor->obj.pos.z + 50.0f, 50.0f); - func_effect_8007B8F8(actor->obj.pos.x, actor->obj.pos.y - 420.0f, actor->obj.pos.z + 300.0f, 50.0f); + Effect_Effect364_Spawn(this->obj.pos.x, this->obj.pos.y + 450.0f, this->obj.pos.z + 50.0f, 50.0f); + Effect_Effect364_Spawn(this->obj.pos.x, this->obj.pos.y - 420.0f, this->obj.pos.z + 300.0f, 50.0f); } - actor->fwork[3] = 0.7f; - actor->timer_0BC = 10; + this->fwork[3] = 0.7f; + this->timer_0BC = 10; - actor->state++; + this->state++; } break; case 3: - if (actor->timer_0BC == 0) { - Math_SmoothStepToF(&actor->fwork[3], 0.0f, 0.1f, 2.0f, 0); - Math_SmoothStepToF(&actor->scale, 0.0f, actor->fwork[3], 10.0f, 0); + if (this->timer_0BC == 0) { + Math_SmoothStepToF(&this->fwork[3], 0.0f, 0.1f, 2.0f, 0); + Math_SmoothStepToF(&this->scale, 0.0f, this->fwork[3], 10.0f, 0); - if (actor->scale <= 0.2f) { - func_effect_8007BC7C(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 50.0f); - func_effect_8007BC7C(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 50.0f); - func_effect_8007BC7C(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 50.0f); + if (this->scale <= 0.2f) { + Effect_Effect362_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 50.0f); + Effect_Effect362_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 50.0f); + Effect_Effect362_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 50.0f); - Object_Kill(&actor->obj, actor->sfxSource); + Object_Kill(&this->obj, this->sfxSource); D_i3_801C42A0[23]--; @@ -2011,80 +2006,80 @@ void Aquas_Actor256_Update(Actor* actor) { if (D_i3_801C42A0[23] == 0) { D_i3_801C4308[79] = -180.0f; for (i = 0; i < 60; i++) { - Aquas_801AC8A8(gBosses[0].obj.pos.x + RAND_FLOAT_CENTERED(1800.0f), - gBosses[0].obj.pos.y + 400.0f + RAND_FLOAT_CENTERED(1000.0f), - gBosses[0].obj.pos.z + 700.0f + RAND_FLOAT_CENTERED(1000.0f), 7.0f, 2); + Aquas_Effect366_Spawn(gBosses[0].obj.pos.x + RAND_FLOAT_CENTERED(1800.0f), + gBosses[0].obj.pos.y + 400.0f + RAND_FLOAT_CENTERED(1000.0f), + gBosses[0].obj.pos.z + 700.0f + RAND_FLOAT_CENTERED(1000.0f), 7.0f, + 2); } gBosses[0].timer_052 = 0; gBosses[0].timer_056 = 60; gBosses[0].state = 14; } - D_i3_801C4308[80] += D_i3_801BFBA8[actor->iwork[0]]; + D_i3_801C4308[80] += D_i3_801BFBA8[this->iwork[0]]; } } break; } } -// OBJ_ACTOR_256 draw -void Aquas_Actor256_Draw(Actor* actor) { +void Aquas_Actor256_Draw(Actor256* this) { f32 var_fv0; u8 var_t1; u8 i; Vtx* var_t5; Vtx* temp_v1_2; - if ((actor->timer_0C6 != 0) && (actor->state == 0) && (gPlayState != PLAY_PAUSE)) { - actor->iwork[1]++; - actor->iwork[1] %= 8; + if ((this->timer_0C6 != 0) && (this->state == 0) && (gPlayState != PLAY_PAUSE)) { + this->iwork[1]++; + this->iwork[1] %= 8; } temp_v1_2 = SEGMENTED_TO_VIRTUAL(D_AQ_6019078); - if (actor->iwork[1] < 4) { + if (this->iwork[1] < 4) { var_t5 = SEGMENTED_TO_VIRTUAL(D_AQ_6018C78); } else { var_t5 = SEGMENTED_TO_VIRTUAL(D_AQ_6018878); } - var_t1 = actor->iwork[1] % 4; + var_t1 = this->iwork[1] % 4; if (var_t1 >= 3) { var_t1 = 4 - var_t1; } - var_fv0 = actor->timer_0C6 / 60.0f; + var_fv0 = this->timer_0C6 / 60.0f; if (var_fv0 < 0.1f) { var_fv0 = 0.1f; } for (i = 0; i < 28; i += 1) { - D_i3_801C3A88[actor->iwork[0]][gSysFrameCount % 2][i].n.ob[0] = + D_i3_801C3A88[this->iwork[0]][gSysFrameCount % 2][i].n.ob[0] = temp_v1_2[i].n.ob[0] + (s16) ((((var_t5[i].n.ob[0] - temp_v1_2[i].n.ob[0]) * var_t1) / 2) * var_fv0); - D_i3_801C3A88[actor->iwork[0]][gSysFrameCount % 2][i].n.ob[1] = + D_i3_801C3A88[this->iwork[0]][gSysFrameCount % 2][i].n.ob[1] = temp_v1_2[i].n.ob[1] + (((var_t5[i].n.ob[1] - temp_v1_2[i].n.ob[1]) * var_t1) / 2); - D_i3_801C3A88[actor->iwork[0]][gSysFrameCount % 2][i].n.ob[2] = + D_i3_801C3A88[this->iwork[0]][gSysFrameCount % 2][i].n.ob[2] = temp_v1_2[i].n.ob[2] + (((var_t5[i].n.ob[2] - temp_v1_2[i].n.ob[2]) * var_t1) / 2); - D_i3_801C3A88[actor->iwork[0]][gSysFrameCount % 2][i].n.flag = temp_v1_2[i].n.flag; - D_i3_801C3A88[actor->iwork[0]][gSysFrameCount % 2][i].n.tc[0] = + D_i3_801C3A88[this->iwork[0]][gSysFrameCount % 2][i].n.flag = temp_v1_2[i].n.flag; + D_i3_801C3A88[this->iwork[0]][gSysFrameCount % 2][i].n.tc[0] = temp_v1_2[i].n.tc[0] + (((var_t5[i].n.tc[0] - temp_v1_2[i].n.tc[0]) * var_t1) / 2); - D_i3_801C3A88[actor->iwork[0]][gSysFrameCount % 2][i].n.tc[1] = + D_i3_801C3A88[this->iwork[0]][gSysFrameCount % 2][i].n.tc[1] = temp_v1_2[i].n.tc[1] + (((var_t5[i].n.tc[1] - temp_v1_2[i].n.tc[1]) * var_t1) / 2); - D_i3_801C3A88[actor->iwork[0]][gSysFrameCount % 2][i].n.n[0] = + D_i3_801C3A88[this->iwork[0]][gSysFrameCount % 2][i].n.n[0] = temp_v1_2[i].n.n[0] + (((var_t5[i].n.n[0] - temp_v1_2[i].n.n[0]) * var_t1) / 2); - D_i3_801C3A88[actor->iwork[0]][gSysFrameCount % 2][i].n.n[1] = + D_i3_801C3A88[this->iwork[0]][gSysFrameCount % 2][i].n.n[1] = temp_v1_2[i].n.n[1] + (((var_t5[i].n.n[1] - temp_v1_2[i].n.n[1]) * var_t1) / 2); - D_i3_801C3A88[actor->iwork[0]][gSysFrameCount % 2][i].n.n[2] = + D_i3_801C3A88[this->iwork[0]][gSysFrameCount % 2][i].n.n[2] = temp_v1_2[i].n.n[2] + (((var_t5[i].n.n[2] - temp_v1_2[i].n.n[2]) * var_t1) / 2); - D_i3_801C3A88[actor->iwork[0]][gSysFrameCount % 2][i].n.a = temp_v1_2[i].n.a; + D_i3_801C3A88[this->iwork[0]][gSysFrameCount % 2][i].n.a = temp_v1_2[i].n.a; } - Matrix_Scale(gGfxMatrix, actor->fwork[1] - 0.25f + ((1.5f - actor->scale) * 0.5f), actor->scale, actor->fwork[1], + Matrix_Scale(gGfxMatrix, this->fwork[1] - 0.25f + ((1.5f - this->scale) * 0.5f), this->scale, this->fwork[1], MTXF_APPLY); - if (actor->state != 0) { + if (this->state != 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_32); } else if (gBosses[0].swork[AQ_SWK_0] == 1) { RCP_SetupDL(&gMasterDisp, SETUPDL_4); - } else if ((actor->timer_0C6 % 2) == 0) { + } else if ((this->timer_0C6 % 2) == 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_29); } else { RCP_SetupDL(&gMasterDisp, SETUPDL_22); @@ -2097,7 +2092,7 @@ void Aquas_Actor256_Draw(Actor* actor) { gDPLoadTLUT_pal256(gMasterDisp++, D_AQ_6008FC8); gDPLoadTextureBlock(gMasterDisp++, D_AQ_6008EC8, G_IM_FMT_CI, G_IM_SIZ_8b, 16, 16, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 4, 4, G_TX_NOLOD, G_TX_NOLOD); - gSPVertex(gMasterDisp++, D_i3_801C3A88[actor->iwork[0]][gSysFrameCount % 2], 14, 0); + gSPVertex(gMasterDisp++, D_i3_801C3A88[this->iwork[0]][gSysFrameCount % 2], 14, 0); gSP1Triangle(gMasterDisp++, 0, 1, 2, 0); gSP1Triangle(gMasterDisp++, 3, 1, 0, 0); gSP1Triangle(gMasterDisp++, 4, 5, 0, 0); @@ -2118,9 +2113,9 @@ void Aquas_Actor256_Draw(Actor* actor) { gSP1Triangle(gMasterDisp++, 7, 6, 13, 0); gSP1Triangle(gMasterDisp++, 13, 12, 7, 0); gSP1Triangle(gMasterDisp++, 10, 7, 12, 0); - gSPVertex(gMasterDisp++, &D_i3_801C3A88[actor->iwork[0]][gSysFrameCount % 2][1], 3, 0); - gSPVertex(gMasterDisp++, &D_i3_801C3A88[actor->iwork[0]][gSysFrameCount % 2][9], 2, 3); - gSPVertex(gMasterDisp++, &D_i3_801C3A88[actor->iwork[0]][gSysFrameCount % 2][12], 8, 5); + gSPVertex(gMasterDisp++, &D_i3_801C3A88[this->iwork[0]][gSysFrameCount % 2][1], 3, 0); + gSPVertex(gMasterDisp++, &D_i3_801C3A88[this->iwork[0]][gSysFrameCount % 2][9], 2, 3); + gSPVertex(gMasterDisp++, &D_i3_801C3A88[this->iwork[0]][gSysFrameCount % 2][12], 8, 5); gSP1Triangle(gMasterDisp++, 0, 2, 7, 0); gSP1Triangle(gMasterDisp++, 7, 2, 8, 0); gSP1Triangle(gMasterDisp++, 6, 8, 2, 0); @@ -2136,7 +2131,7 @@ void Aquas_Actor256_Draw(Actor* actor) { gDPLoadTLUT_pal256(gMasterDisp++, D_AQ_6019338); gDPLoadTextureBlock(gMasterDisp++, D_AQ_6019238, G_IM_FMT_CI, G_IM_SIZ_8b, 16, 16, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 4, 4, G_TX_NOLOD, G_TX_NOLOD); - gSPVertex(gMasterDisp++, &D_i3_801C3A88[actor->iwork[0]][gSysFrameCount % 2][20], 8, 0); + gSPVertex(gMasterDisp++, &D_i3_801C3A88[this->iwork[0]][gSysFrameCount % 2][20], 8, 0); gSP1Triangle(gMasterDisp++, 0, 1, 2, 0); gSP1Triangle(gMasterDisp++, 2, 3, 0, 0); gSP1Triangle(gMasterDisp++, 4, 5, 6, 0); @@ -2145,18 +2140,17 @@ void Aquas_Actor256_Draw(Actor* actor) { gDPSetTextureLUT(gMasterDisp++, G_TT_NONE); } -void Aquas_801AF9FC(Actor* actor) { - s32 temp = actor->iwork[0]; +void Aquas_Actor257_Init(Actor257* this) { + s32 temp = this->iwork[0]; - actor->fwork[0] = actor->fwork[1] = actor->fwork[2] = 1.0f; - actor->obj.pos.x = D_i3_801C4308[1 + temp]; - actor->obj.pos.y = D_i3_801C4308[4 + temp]; - actor->obj.pos.z = D_i3_801C4308[7 + temp]; - actor->obj.rot.x = D_i3_801BFBBC[temp] + D_i3_801C4308[10]; + this->fwork[0] = this->fwork[1] = this->fwork[2] = 1.0f; + this->obj.pos.x = D_i3_801C4308[1 + temp]; + this->obj.pos.y = D_i3_801C4308[4 + temp]; + this->obj.pos.z = D_i3_801C4308[7 + temp]; + this->obj.rot.x = D_i3_801BFBBC[temp] + D_i3_801C4308[10]; } -// OBJ_ACTOR_257 action -void Aquas_Actor257_Update(Actor* actor) { +void Aquas_Actor257_Update(Actor257* this) { s32 i; f32 sp70; f32 sp6C; @@ -2166,128 +2160,125 @@ void Aquas_Actor257_Update(Actor* actor) { Vec3f sp4C; Actor* sp48; - if (actor->state < 4) { - i = actor->iwork[0]; + if (this->state < 4) { + i = this->iwork[0]; - actor->obj.pos.x = D_i3_801C4308[1 + i]; - actor->obj.pos.y = D_i3_801C4308[4 + i]; - actor->obj.pos.z = D_i3_801C4308[7 + i]; + this->obj.pos.x = D_i3_801C4308[1 + i]; + this->obj.pos.y = D_i3_801C4308[4 + i]; + this->obj.pos.z = D_i3_801C4308[7 + i]; - actor->obj.rot.x = D_i3_801BFBBC[i] + D_i3_801C4308[10]; - if (actor->obj.rot.x < 0.0f) { - actor->obj.rot.x += 359.0f; + this->obj.rot.x = D_i3_801BFBBC[i] + D_i3_801C4308[10]; + if (this->obj.rot.x < 0.0f) { + this->obj.rot.x += 359.0f; } - if (actor->obj.rot.x >= 360.0f) { - actor->obj.rot.x -= 360.0f; + if (this->obj.rot.x >= 360.0f) { + this->obj.rot.x -= 360.0f; } - actor->obj.rot.y = D_i3_801BFBC8[i]; - actor->obj.rot.z = D_i3_801BFBD4[i]; + this->obj.rot.y = D_i3_801BFBC8[i]; + this->obj.rot.z = D_i3_801BFBD4[i]; } - if (actor->dmgType != DMG_NONE) { - actor->dmgType = DMG_NONE; + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; - if ((gBosses[0].state >= 10) && (actor->health != 0) && (actor->damage == 31)) { - actor->timer_0BE = 70; - actor->health -= actor->damage; + if ((gBosses[0].state >= 10) && (this->health != 0) && (this->damage == 31)) { + this->timer_0BE = 70; + this->health -= this->damage; - AUDIO_PLAY_SFX(NA_SE_EN_WT_DAMAGE_S, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_WT_DAMAGE_S, this->sfxSource, 4); - if (actor->timer_0C6 == 0) { - actor->timer_0C6 = 70; + if (this->timer_0C6 == 0) { + this->timer_0C6 = 70; } - if (actor->health <= 0) { - actor->health = actor->timer_0BE = 0; - BonusText_Display(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 200.0f, 3); + if (this->health <= 0) { + this->health = this->timer_0BE = 0; + BonusText_Display(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 200.0f, 3); gHitCount += 4; D_ctx_80177850 = 15; - actor->info.bonus = 0; - actor->state = 4; + this->info.bonus = 0; + this->state = 4; } } } if (D_i3_801C42A0[23] == 0) { - Object_Kill(&actor->obj, actor->sfxSource); + Object_Kill(&this->obj, this->sfxSource); } - if (actor->timer_0C6 & 1) { - func_effect_8007C120(actor->obj.pos.x, actor->obj.pos.y + 100.0f, actor->obj.pos.z + RAND_FLOAT(500.0f), - actor->vel.x, actor->vel.y, actor->vel.z, actor->scale * 0.2f, 10); + if (this->timer_0C6 & 1) { + Effect_Effect390_Spawn(this->obj.pos.x, this->obj.pos.y + 100.0f, this->obj.pos.z + RAND_FLOAT(500.0f), + this->vel.x, this->vel.y, this->vel.z, this->scale * 0.2f, 10); } - switch (actor->state) { + switch (this->state) { case 0: if (gBosses[0].state >= 10) { - actor->timer_0BC = D_i3_801BFBB0[actor->iwork[0]] + RAND_FLOAT(20.0f); - actor->health = 90; - actor->state++; + this->timer_0BC = D_i3_801BFBB0[this->iwork[0]] + RAND_FLOAT(20.0f); + this->health = 90; + this->state++; } break; case 1: - if ((actor->timer_0BC == 0) && (fabsf(D_i3_801C4308[10]) < 5.0f) && (actor->timer_0C6 == 0)) { - i = actor->iwork[3] - 1; + if ((this->timer_0BC == 0) && (fabsf(D_i3_801C4308[10]) < 5.0f) && (this->timer_0C6 == 0)) { + i = this->iwork[3] - 1; if (i >= 0) { if (!((gActors[i].obj.status == OBJ_ACTIVE) && (gActors[i].obj.id == OBJ_ACTOR_255) && - (gActors[i].iwork[0] == actor->iwork[0]))) { - actor->iwork[3] = 0; - actor->state = 2; + (gActors[i].iwork[0] == this->iwork[0]))) { + this->iwork[3] = 0; + this->state = 2; } } else { - actor->iwork[3] = 0; - actor->state = 2; + this->iwork[3] = 0; + this->state = 2; } } break; case 2: - Math_SmoothStepToF(&actor->fwork[0], 1.0f, 0.2f, 0.5f, 0.01f); - actor->fwork[2] = actor->fwork[1] = actor->fwork[0]; - if (actor->fwork[0] == 1.0f) { - actor->state = 3; + Math_SmoothStepToF(&this->fwork[0], 1.0f, 0.2f, 0.5f, 0.01f); + this->fwork[2] = this->fwork[1] = this->fwork[0]; + if (this->fwork[0] == 1.0f) { + this->state = 3; } break; case 3: - i = actor->iwork[2] * 4; - Math_SmoothStepToF(&actor->fwork[0], D_i3_801BFBE0[i], D_i3_801BFBE0[i + 1], D_i3_801BFBE0[i + 2], - 0.00001f); - Math_SmoothStepToF(&actor->fwork[1], D_i3_801BFC10[i], D_i3_801BFC10[i + 1], D_i3_801BFC10[i + 2], - 0.00001f); - Math_SmoothStepToF(&actor->fwork[2], D_i3_801BFC40[i], D_i3_801BFC40[i + 1], D_i3_801BFC40[i + 2], - 0.00001f); - actor->iwork[1]++; - i = actor->iwork[3] - 1; + i = this->iwork[2] * 4; + Math_SmoothStepToF(&this->fwork[0], D_i3_801BFBE0[i], D_i3_801BFBE0[i + 1], D_i3_801BFBE0[i + 2], 0.00001f); + Math_SmoothStepToF(&this->fwork[1], D_i3_801BFC10[i], D_i3_801BFC10[i + 1], D_i3_801BFC10[i + 2], 0.00001f); + Math_SmoothStepToF(&this->fwork[2], D_i3_801BFC40[i], D_i3_801BFC40[i + 1], D_i3_801BFC40[i + 2], 0.00001f); + this->iwork[1]++; + i = this->iwork[3] - 1; if ((i >= 0) && !((gActors[i].obj.status == OBJ_ACTIVE) && (gActors[i].obj.id == OBJ_ACTOR_255) && - (gActors[i].iwork[0] == actor->iwork[0]))) { - actor->iwork[3] = 0; + (gActors[i].iwork[0] == this->iwork[0]))) { + this->iwork[3] = 0; i = -1; } - if ((actor->iwork[1] == 13) && (i < 0)) { - AUDIO_PLAY_SFX(NA_SE_EN_SANADA_APPEAR, actor->sfxSource, 4); - for (i = 0, sp48 = gActors; i < ARRAY_COUNT(gActors); i++, sp48++) { + if ((this->iwork[1] == 13) && (i < 0)) { + AUDIO_PLAY_SFX(NA_SE_EN_SANADA_APPEAR, this->sfxSource, 4); + for (i = 0, sp48 = &gActors[0]; i < ARRAY_COUNT(gActors); i++, sp48++) { if (sp48->obj.status == OBJ_FREE) { Actor_Initialize(sp48); sp48->obj.status = OBJ_INIT; sp48->obj.id = OBJ_ACTOR_255; - sp48->obj.pos.x = actor->obj.pos.x; - sp48->obj.pos.y = actor->obj.pos.y; - sp48->obj.pos.z = actor->obj.pos.z; + sp48->obj.pos.x = this->obj.pos.x; + sp48->obj.pos.y = this->obj.pos.y; + sp48->obj.pos.z = this->obj.pos.z; sp48->obj.rot.x = sp48->rot_0F4.x = - Math_ModF(actor->obj.rot.x + 270.0f + D_i3_801BFC7C[actor->iwork[0]], 360.0f); + Math_ModF(this->obj.rot.x + 270.0f + D_i3_801BFC7C[this->iwork[0]], 360.0f); sp48->obj.rot.y = sp48->rot_0F4.y = - Math_ModF(actor->obj.rot.y + D_i3_801BFC88[actor->iwork[0]], 360.0f); - sp48->rot_0F4.z = actor->obj.rot.z; - sp48->obj.rot.z = actor->obj.rot.z; + Math_ModF(this->obj.rot.y + D_i3_801BFC88[this->iwork[0]], 360.0f); + sp48->rot_0F4.z = this->obj.rot.z; + sp48->obj.rot.z = this->obj.rot.z; sp48->timer_0BC = 10; Object_SetInfo(&sp48->info, sp48->obj.id); - actor->iwork[3] = i + 1; - sp48->iwork[0] = actor->iwork[0]; - sp48->iwork[2] = actor->index + 1; + this->iwork[3] = i + 1; + sp48->iwork[0] = this->iwork[0]; + sp48->iwork[2] = this->index + 1; Matrix_RotateY(gCalcMatrix, sp48->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, sp48->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, sp48->obj.rot.z * M_DTOR, MTXF_APPLY); @@ -2301,84 +2292,84 @@ void Aquas_Actor257_Update(Actor* actor) { } } if (i >= ARRAY_COUNT(gActors)) { - actor->iwork[3] = 0; + this->iwork[3] = 0; sp48->obj.status = OBJ_FREE; } } - if (actor->iwork[1] == D_i3_801BFC70[actor->iwork[2]]) { - actor->iwork[2]++; - if (actor->iwork[2] >= 3) { - actor->iwork[1] = actor->iwork[2] = 0; - actor->state = 1; - actor->fwork[0] = actor->fwork[1] = actor->fwork[2] = 1.0f; - actor->timer_0BC = D_i3_801BFBB0[actor->iwork[0]] + 70.0f - RAND_FLOAT_CENTERED(30.0f); + if (this->iwork[1] == D_i3_801BFC70[this->iwork[2]]) { + this->iwork[2]++; + if (this->iwork[2] >= 3) { + this->iwork[1] = this->iwork[2] = 0; + this->state = 1; + this->fwork[0] = this->fwork[1] = this->fwork[2] = 1.0f; + this->timer_0BC = D_i3_801BFBB0[this->iwork[0]] + 70.0f - RAND_FLOAT_CENTERED(30.0f); } } break; case 4: - actor->state = 5; - actor->vel.y = 10.0f; - actor->vel.z = 5.0f; - AUDIO_PLAY_SFX(NA_SE_EN_WT_BROKEN, actor->sfxSource, 4); + this->state = 5; + this->vel.y = 10.0f; + this->vel.z = 5.0f; + AUDIO_PLAY_SFX(NA_SE_EN_WT_BROKEN, this->sfxSource, 4); break; case 5: - if (actor->obj.pos.y > (gGroundHeight + 70.0f)) { - Math_SmoothStepToF(&actor->fwork[0], 1.0f, 0.1f, 0.2f, 0.0001f); - Math_SmoothStepToF(&actor->fwork[1], 1.0f, 0.1f, 0.2f, 0.0001f); - Math_SmoothStepToF(&actor->fwork[2], 1.0f, 0.1f, 0.2f, 0.0001f); - Math_SmoothStepToF(&actor->vel.y, -10.0f, 0.1f, 1.0f, 0.001f); - Math_SmoothStepToAngle(&actor->obj.rot.x, 80.0f, 0.1f, 1.0f, 0.001f); + if (this->obj.pos.y > (gGroundHeight + 70.0f)) { + Math_SmoothStepToF(&this->fwork[0], 1.0f, 0.1f, 0.2f, 0.0001f); + Math_SmoothStepToF(&this->fwork[1], 1.0f, 0.1f, 0.2f, 0.0001f); + Math_SmoothStepToF(&this->fwork[2], 1.0f, 0.1f, 0.2f, 0.0001f); + Math_SmoothStepToF(&this->vel.y, -10.0f, 0.1f, 1.0f, 0.001f); + Math_SmoothStepToAngle(&this->obj.rot.x, 80.0f, 0.1f, 1.0f, 0.001f); if (((gGameFrameCount % 2) == 0)) { - Aquas_801AC8A8(actor->obj.pos.x + RAND_FLOAT_CENTERED(300.0f), - actor->obj.pos.y + RAND_FLOAT_CENTERED(200.0f), actor->obj.pos.z, 4.0f, 2); + Aquas_Effect366_Spawn(this->obj.pos.x + RAND_FLOAT_CENTERED(300.0f), + this->obj.pos.y + RAND_FLOAT_CENTERED(200.0f), this->obj.pos.z, 4.0f, 2); } - if (actor->timer_0C6 == 0) { - actor->timer_0C6 = 70; + if (this->timer_0C6 == 0) { + this->timer_0C6 = 70; } - actor->fwork[6] = 10.0f; - actor->timer_0C0 = 20; + this->fwork[6] = 10.0f; + this->timer_0C0 = 20; } else { - Math_SmoothStepToF(&actor->fwork[6], 30.0f, 0.1f, 12.0f, 0.1f); + Math_SmoothStepToF(&this->fwork[6], 30.0f, 0.1f, 12.0f, 0.1f); sp70 = RAND_FLOAT(30.0f); if (((gGameFrameCount % 4) == 0)) { for (i = 0; i < 36; i += 2) { - sp6C = __sinf(sp70 + (i * 10.0f * M_DTOR)) * actor->fwork[6] * 10.0f; - sp68 = __cosf(sp70 + (i * 10.0f * M_DTOR)) * actor->fwork[6] * 10.0f; + sp6C = __sinf(sp70 + (i * 10.0f * M_DTOR)) * this->fwork[6] * 10.0f; + sp68 = __cosf(sp70 + (i * 10.0f * M_DTOR)) * this->fwork[6] * 10.0f; pad64 = gGroundHeight + 30.0f; - func_effect_8007B8F8(actor->obj.pos.x + sp6C, pad64, actor->obj.pos.z + sp68, 20.0f); + Effect_Effect364_Spawn(this->obj.pos.x + sp6C, pad64, this->obj.pos.z + sp68, 20.0f); } } - if (actor->vel.z != 0) { - actor->vel.y = actor->vel.z = 0.0f; - AUDIO_PLAY_SFX(NA_SE_EN_WT_BOUND_M, actor->sfxSource, 4); + if (this->vel.z != 0) { + this->vel.y = this->vel.z = 0.0f; + AUDIO_PLAY_SFX(NA_SE_EN_WT_BOUND_M, this->sfxSource, 4); } - if (actor->timer_0C0 == 1) { - AUDIO_PLAY_SFX(NA_SE_EN_WT_DISAPPEAR_S, actor->sfxSource, 4); + if (this->timer_0C0 == 1) { + AUDIO_PLAY_SFX(NA_SE_EN_WT_DISAPPEAR_S, this->sfxSource, 4); } - if (actor->timer_0C0 == 0) { - if (actor->timer_0BE == 0) { - actor->timer_0BE = 10; + if (this->timer_0C0 == 0) { + if (this->timer_0BE == 0) { + this->timer_0BE = 10; } - Math_SmoothStepToF(&actor->fwork[0], 0.0f, 0.05f, 0.1f, 0.001f); - Math_SmoothStepToF(&actor->fwork[1], 0.0f, 0.05f, 0.1f, 0.001f); - Math_SmoothStepToF(&actor->fwork[2], 0.0f, 0.05f, 0.1f, 0.001f); - Math_SmoothStepToF(&actor->obj.pos.y, -300.0f, 0.1f, 1.0f, 0.001f); + Math_SmoothStepToF(&this->fwork[0], 0.0f, 0.05f, 0.1f, 0.001f); + Math_SmoothStepToF(&this->fwork[1], 0.0f, 0.05f, 0.1f, 0.001f); + Math_SmoothStepToF(&this->fwork[2], 0.0f, 0.05f, 0.1f, 0.001f); + Math_SmoothStepToF(&this->obj.pos.y, -300.0f, 0.1f, 1.0f, 0.001f); - if (actor->fwork[0] <= 0.2f) { + if (this->fwork[0] <= 0.2f) { for (i = 0; i < 5; i++) { - func_effect_8007BC7C(actor->obj.pos.x, gGroundHeight + 50.0f, actor->obj.pos.z, 20.0f); - Aquas_801AC8A8(actor->obj.pos.x + RAND_FLOAT_CENTERED(300.0f), gGroundHeight + (i * 20.0f), - actor->obj.pos.z, 5.0f, 2); + Effect_Effect362_Spawn(this->obj.pos.x, gGroundHeight + 50.0f, this->obj.pos.z, 20.0f); + Aquas_Effect366_Spawn(this->obj.pos.x + RAND_FLOAT_CENTERED(300.0f), + gGroundHeight + (i * 20.0f), this->obj.pos.z, 5.0f, 2); } if (gBosses[0].state < 13) { @@ -2387,36 +2378,35 @@ void Aquas_Actor257_Update(Actor* actor) { gBosses[0].swork[AQ_SWK_19] = 30; } } - Object_Kill(&actor->obj, actor->sfxSource); + Object_Kill(&this->obj, this->sfxSource); } } } break; } - if (actor->timer_0BE != 0) { - actor->fwork[3] = SIN_DEG(actor->timer_0BE * 20.0f) * Aquas_801A958C(actor->timer_0BE, 20.0f); - actor->fwork[4] = SIN_DEG(actor->timer_0BE * 20.0f) * Aquas_801A958C(actor->timer_0BE, 20.0f); - actor->fwork[5] = SIN_DEG(actor->timer_0BE * 20.0f) * Aquas_801A958C(actor->timer_0BE, 20.0f); + if (this->timer_0BE != 0) { + this->fwork[3] = SIN_DEG(this->timer_0BE * 20.0f) * Aquas_801A958C(this->timer_0BE, 20.0f); + this->fwork[4] = SIN_DEG(this->timer_0BE * 20.0f) * Aquas_801A958C(this->timer_0BE, 20.0f); + this->fwork[5] = SIN_DEG(this->timer_0BE * 20.0f) * Aquas_801A958C(this->timer_0BE, 20.0f); } } -// OBJ_ACTOR_257 draw -void Aquas_Actor257_Draw(Actor* actor) { - Matrix_RotateY(gGfxMatrix, (actor->obj.rot.x + actor->fwork[3]) * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, (actor->obj.rot.y + actor->fwork[4]) * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, (actor->obj.rot.z + actor->fwork[5]) * M_DTOR, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, actor->fwork[0], actor->fwork[1], actor->fwork[2], MTXF_APPLY); +void Aquas_Actor257_Draw(Actor257* this) { + Matrix_RotateY(gGfxMatrix, (this->obj.rot.x + this->fwork[3]) * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, (this->obj.rot.y + this->fwork[4]) * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, (this->obj.rot.z + this->fwork[5]) * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->fwork[0], this->fwork[1], this->fwork[2], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - if ((actor->timer_0C6 % 2) == 0) { + if ((this->timer_0C6 % 2) == 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_57); } else { RCP_SetupDL(&gMasterDisp, SETUPDL_61); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } - switch (actor->iwork[0]) { + switch (this->iwork[0]) { case 0: gSPDisplayList(gMasterDisp++, D_AQ_6019E80); break; @@ -2429,125 +2419,123 @@ void Aquas_Actor257_Draw(Actor* actor) { } } -// OBJ_ACTOR_258 action -void Aquas_Actor258_Update(Actor* actor) { +void Aquas_AqPearl_Update(AqPearl* this) { Vec3f sp44; Vec3f sp38; - if ((actor->dmgType != DMG_NONE) || (gBosses[0].state >= 16)) { - actor->state = 3; + if ((this->dmgType != DMG_NONE) || (gBosses[0].state >= 16)) { + this->state = 3; } - switch (actor->state) { + switch (this->state) { case 0: - if (actor->timer_0BC == 0) { - Matrix_RotateY(gCalcMatrix, actor->fwork[2] * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, actor->fwork[1] * M_DTOR, MTXF_APPLY); + if (this->timer_0BC == 0) { + Matrix_RotateY(gCalcMatrix, this->fwork[2] * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->fwork[1] * M_DTOR, MTXF_APPLY); sp44.x = sp44.y = 0.0f; sp44.z = 50.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); - actor->vel.x = sp38.x; - actor->vel.y = sp38.y; - actor->vel.z = sp38.z; - actor->timer_0BE = 5; - actor->iwork[1] = 255; - actor->iwork[2] = 255; - actor->iwork[3] = 255; - actor->state++; + this->vel.x = sp38.x; + this->vel.y = sp38.y; + this->vel.z = sp38.z; + this->timer_0BE = 5; + this->iwork[1] = 255; + this->iwork[2] = 255; + this->iwork[3] = 255; + this->state++; } break; case 1: - if (actor->timer_0BE == 0) { - Matrix_RotateY(gCalcMatrix, actor->fwork[4] * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, actor->fwork[3] * M_DTOR, MTXF_APPLY); + if (this->timer_0BE == 0) { + Matrix_RotateY(gCalcMatrix, this->fwork[4] * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->fwork[3] * M_DTOR, MTXF_APPLY); sp44.x = sp44.y = 0.0f; sp44.z = 30.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); - actor->vel.x = sp38.x; - actor->vel.y = sp38.y; - actor->vel.z = sp38.z; - actor->timer_0C0 = 10; - actor->state++; + this->vel.x = sp38.x; + this->vel.y = sp38.y; + this->vel.z = sp38.z; + this->timer_0C0 = 10; + this->state++; } break; case 2: - if (actor->timer_0C0 == 0) { - actor->iwork[1] -= 20; - actor->iwork[2] -= 20; - actor->iwork[3] -= 20; - if (actor->iwork[1] < 5) { - actor->iwork[1] = actor->iwork[2] = actor->iwork[3] = 5; + if (this->timer_0C0 == 0) { + this->iwork[1] -= 20; + this->iwork[2] -= 20; + this->iwork[3] -= 20; + if (this->iwork[1] < 5) { + this->iwork[1] = this->iwork[2] = this->iwork[3] = 5; } } break; case 3: if (Rand_ZeroOne() < 0.1) { - actor->itemDrop = DROP_SILVER_RING_10p; - actor->dmgSource = DMG_SRC_2; - Actor_Despawn(actor); + this->itemDrop = DROP_SILVER_RING_10p; + this->dmgSource = DMG_SRC_2; + Actor_Despawn(this); } - Object_Kill(&actor->obj, actor->sfxSource); + Object_Kill(&this->obj, this->sfxSource); func_effect_800815DC(); - func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 50.0f, 5.0f); - Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_SEA_EXPLOSION_S); + func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 50.0f, 5.0f); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_SEA_EXPLOSION_S); break; } if (((gGameFrameCount % 16) == 0)) { - Aquas_801AC8A8(actor->obj.pos.x + RAND_FLOAT_CENTERED(10.0f), actor->obj.pos.y + RAND_FLOAT_CENTERED(10.0f), - actor->obj.pos.z + RAND_FLOAT_CENTERED(10.0f), 2.0f, 1); + Aquas_Effect366_Spawn(this->obj.pos.x + RAND_FLOAT_CENTERED(10.0f), + this->obj.pos.y + RAND_FLOAT_CENTERED(10.0f), + this->obj.pos.z + RAND_FLOAT_CENTERED(10.0f), 2.0f, 1); } - Aquas_801A96DC(actor); + Aquas_801A96DC(this); } -// OBJ_ACTOR_258 draw -void Aquas_Actor258_Draw(Actor* actor) { - if (actor->timer_0BC == 0) { +void Aquas_AqPearl_Draw(AqPearl* this) { + if (this->timer_0BC == 0) { Graphics_SetScaleMtx(0.8f); RCP_SetupDL(&gMasterDisp, SETUPDL_61); - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, actor->iwork[1], actor->iwork[2], actor->iwork[3], 255); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, this->iwork[1], this->iwork[2], this->iwork[3], 255); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_AQ_6024A50); + gSPDisplayList(gMasterDisp++, aAqPearlDL); } } -void Aquas_801B0F88(Boss* bossAQ) { - if ((D_i3_801C42A0[23] != 0) && (bossAQ->swork[AQ_SWK_0] < 2)) { - bossAQ->swork[AQ_SWK_19] = 30; +void Aquas_801B0F88(AqBacoon* this) { + if ((D_i3_801C42A0[23] != 0) && (this->swork[AQ_SWK_0] < 2)) { + this->swork[AQ_SWK_19] = 30; D_i3_801C4308[79] = 0.0f; - bossAQ->swork[AQ_SWK_0] = 3; + this->swork[AQ_SWK_0] = 3; } } -void Aquas_801B0FCC(Boss* bossAQ) { +void Aquas_801B0FCC(AqBacoon* this) { D_i3_801C4308[54] = D_i3_801C4308[61] = D_i3_801C4308[68] = 0.1f; - bossAQ->swork[AQ_SWK_19] = 500; + this->swork[AQ_SWK_19] = 500; D_i3_801C4308[79] = -28.0f; } -void Aquas_801B1008(Boss* bossAQ, s32 timer) { - if ((bossAQ->swork[AQ_SWK_19] == 0) && (fabsf(D_i3_801C4308[10]) <= 1.0f) && (bossAQ->swork[AQ_SWK_0] == 0)) { +void Aquas_801B1008(AqBacoon* this, s32 timer) { + if ((this->swork[AQ_SWK_19] == 0) && (fabsf(D_i3_801C4308[10]) <= 1.0f) && (this->swork[AQ_SWK_0] == 0)) { D_i3_801C4308[79] = -28.0f; - bossAQ->swork[AQ_SWK_19] = timer; - bossAQ->swork[AQ_SWK_0] = 0; - if (bossAQ->swork[AQ_SWK_22] == 0) { + this->swork[AQ_SWK_19] = timer; + this->swork[AQ_SWK_0] = 0; + if (this->swork[AQ_SWK_22] == 0) { Radio_PlayMessage(gMsg_ID_15110, RCID_PEPPY); } - bossAQ->swork[AQ_SWK_22]++; - bossAQ->swork[AQ_SWK_22] &= 3; + this->swork[AQ_SWK_22]++; + this->swork[AQ_SWK_22] &= 3; } - if ((fabsf(D_i3_801C4308[10]) >= 15.0f) && (bossAQ->timer_056 == 0)) { - bossAQ->swork[AQ_SWK_2] = bossAQ->swork[AQ_SWK_3] = 1; - bossAQ->timer_056 = 60; + if ((fabsf(D_i3_801C4308[10]) >= 15.0f) && (this->timer_056 == 0)) { + this->swork[AQ_SWK_2] = this->swork[AQ_SWK_3] = 1; + this->timer_056 = 60; } } -// OBJ_BOSS_AQ init -void Aquas_BossAq_Init(BossAQ* this) { +void Aquas_AqBacoon_Init(AqBacoon* this) { s32 i; Actor* actor; @@ -2556,7 +2544,7 @@ void Aquas_BossAq_Init(BossAQ* this) { this->health = 150; - for (i = 0, actor = gActors; i < 2; actor++) { + for (i = 0, actor = &gActors[0]; i < 2; actor++) { if (actor->obj.status == OBJ_FREE) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; @@ -2591,7 +2579,7 @@ void Aquas_BossAq_Init(BossAQ* this) { (D_i3_801C42A0[6] = D_i3_801C42A0[7] = 0) ^ 0; // fake for (i = 0; i < AQ_LIMB_MAX; i++) { - sBossAQlimbTimers[i] = 0; + sAqBacoonlimbTimers[i] = 0; } this->obj.pos.y += 400.0f; @@ -2604,13 +2592,13 @@ void Aquas_BossAq_Init(BossAQ* this) { AUDIO_PLAY_SFX(NA_SE_EN_SHELL_BEAT, this->sfxSource, 4); } -// OBJ_BOSS_AQ action +// OBJ_BOSS_AQ_BACOON action #ifdef NON_MATCHING // unclear how to use the 4 indices // loop at 2854 unrolls incorrectly // sp100 shouldn't be on the stack // https://decomp.me/scratch/M6ghQ -void Aquas_Boss_Update(Boss* bossAQ) { +void Aquas_AqBacoon_Update(AqBacoon* this) { s32 i; s32 i2; s32 i3; @@ -2635,10 +2623,10 @@ void Aquas_Boss_Update(Boss* bossAQ) { gBossFrameCount++; - switch (bossAQ->state) { + switch (this->state) { case 0: - if (bossAQ->swork[AQ_SWK_21] == 0) { - for (i2 = 0, actor = gActors; i2 < 3; actor++) { + if (this->swork[AQ_SWK_21] == 0) { + for (i2 = 0, actor = &gActors[0]; i2 < 3; actor++) { if (actor->obj.status == OBJ_FREE) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; @@ -2648,130 +2636,130 @@ void Aquas_Boss_Update(Boss* bossAQ) { i2++; } } - bossAQ->swork[AQ_SWK_21] = 1; + this->swork[AQ_SWK_21] = 1; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 40); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 40); Radio_PlayMessage(gMsg_ID_15100, RCID_FOX); } - if (fabsf(bossAQ->obj.pos.z - gPlayer[0].trueZpos) <= 3000.0f) { + if (fabsf(this->obj.pos.z - gPlayer[0].trueZpos) <= 3000.0f) { D_i3_801C4190[6] = 1; - bossAQ->timer_056 = 20; + this->timer_056 = 20; Audio_PlaySequence(SEQ_PLAYER_BGM, NA_BGM_BOSS_AQ, 0, 1); - bossAQ->state = 1; + this->state = 1; } break; case 1: - if (bossAQ->timer_056 == 0) { + if (this->timer_056 == 0) { D_i3_801C4308[14] = 80.0f; D_i3_801C4308[12] = D_i3_801C4308[13] = 0.0f; - bossAQ->timer_056 = 20; - bossAQ->state = 2; - AUDIO_PLAY_SFX(NA_SE_BUBBLE_UP, bossAQ->sfxSource, 0); + this->timer_056 = 20; + this->state = 2; + AUDIO_PLAY_SFX(NA_SE_BUBBLE_UP, this->sfxSource, 0); } break; case 2: - Aquas_801B0FCC(bossAQ); - if (!(bossAQ->timer_056 & 1)) { + Aquas_801B0FCC(this); + if (!(this->timer_056 & 1)) { for (i3 = 0; i3 < 30; i3++) { - Aquas_801AC8A8(gBosses[0].obj.pos.x + RAND_FLOAT_CENTERED(1800.0f), - gBosses[0].obj.pos.y + RAND_FLOAT_CENTERED(500.0f), - gBosses[0].obj.pos.z + 700.0f + RAND_FLOAT_CENTERED(1000.0f), 7.0f, 2); + Aquas_Effect366_Spawn(gBosses[0].obj.pos.x + RAND_FLOAT_CENTERED(1800.0f), + gBosses[0].obj.pos.y + RAND_FLOAT_CENTERED(500.0f), + gBosses[0].obj.pos.z + 700.0f + RAND_FLOAT_CENTERED(1000.0f), 7.0f, 2); } } - if (bossAQ->timer_056 == 0) { - bossAQ->timer_056 = 40; - bossAQ->state = 3; + if (this->timer_056 == 0) { + this->timer_056 = 40; + this->state = 3; } break; case 3: - Aquas_801B0FCC(bossAQ); + Aquas_801B0FCC(this); Math_SmoothStepToF(&D_i3_801C4308[12], -45.0f, 0.5f, 1.0f, 0.01f); Math_SmoothStepToF(&D_i3_801C4308[13], 30.0f, 0.5f, 1.0f, 0.01f); Math_SmoothStepToAngle(&D_i3_801C4308[14], 0.0f, 1.0f, 2.0f, 0.0f); - Math_SmoothStepToAngle(&D_i3_801C4308[15], D_i3_801C0190[bossAQ->swork[AQ_SWK_20]], 1.0f, 10, 0.0f); - if (bossAQ->timer_056 == 0) { - bossAQ->timer_056 = 10; - bossAQ->swork[AQ_SWK_20]++; - if (bossAQ->swork[AQ_SWK_20] >= 5) { - bossAQ->state = 4; + Math_SmoothStepToAngle(&D_i3_801C4308[15], D_i3_801C0190[this->swork[AQ_SWK_20]], 1.0f, 10, 0.0f); + if (this->timer_056 == 0) { + this->timer_056 = 10; + this->swork[AQ_SWK_20]++; + if (this->swork[AQ_SWK_20] >= 5) { + this->state = 4; } } break; case 4: - Aquas_801B0FCC(bossAQ); + Aquas_801B0FCC(this); Math_SmoothStepToF(&D_i3_801C4308[58], 0.25f, 0.3f, 1.0f, 0.0f); - if (bossAQ->timer_056 == 0) { - bossAQ->timer_056 = 20; - bossAQ->state = 5; + if (this->timer_056 == 0) { + this->timer_056 = 20; + this->state = 5; } break; case 5: - Aquas_801B0FCC(bossAQ); + Aquas_801B0FCC(this); Math_SmoothStepToF(&D_i3_801C4308[58], 0.25f, 0.3f, 1.0f, 0.0f); - if (bossAQ->timer_056 == 0) { - bossAQ->timer_056 = 30; - bossAQ->state = 6; + if (this->timer_056 == 0) { + this->timer_056 = 30; + this->state = 6; } break; case 6: - Aquas_801B0FCC(bossAQ); - if (bossAQ->timer_056 == 0) { - bossAQ->state = 7; + Aquas_801B0FCC(this); + if (this->timer_056 == 0) { + this->state = 7; } break; case 7: - bossAQ->swork[AQ_SWK_19] = 500; + this->swork[AQ_SWK_19] = 500; D_i3_801C4308[79] = -28.0f; Math_SmoothStepToF(&D_i3_801C4308[54], 1.0f, 0.001f, 0.01f, 0.0f); Math_SmoothStepToF(&D_i3_801C4308[61], 1.0f, 0.001f, 0.01f, 0.0f); if (D_i3_801C4308[54] >= 0.9f) { - bossAQ->timer_056 = 20; + this->timer_056 = 20; D_i3_801C4308[79] = 0.0f; - bossAQ->swork[AQ_SWK_0] = 3; - bossAQ->state = 8; + this->swork[AQ_SWK_0] = 3; + this->state = 8; } break; case 8: - if (bossAQ->timer_056 == 0) { - bossAQ->timer_056 = 20; - bossAQ->swork[AQ_SWK_12] = 10; + if (this->timer_056 == 0) { + this->timer_056 = 20; + this->swork[AQ_SWK_12] = 10; D_i3_801C42A0[3] = 0; Radio_PlayMessage(gMsg_ID_2225, RCID_SLIPPY); - bossAQ->swork[AQ_SWK_26] = gBossFrameCount + 156; - bossAQ->state = 9; + this->swork[AQ_SWK_26] = gBossFrameCount + 156; + this->state = 9; } break; case 9: - if (bossAQ->timer_056 == 0) { - bossAQ->state = 10; + if (this->timer_056 == 0) { + this->state = 10; } break; case 10: case 11: case 12: - Aquas_801B1008(bossAQ, 500); + Aquas_801B1008(this, 500); break; case 13: - Aquas_801B1008(bossAQ, 60); + Aquas_801B1008(this, 60); break; case 14: - if (bossAQ->timer_056 == 58) { - AUDIO_PLAY_SFX(NA_SE_EN_SHELL_FILLOPEN, bossAQ->sfxSource, 4); + if (this->timer_056 == 58) { + AUDIO_PLAY_SFX(NA_SE_EN_SHELL_FILLOPEN, this->sfxSource, 4); } - if ((bossAQ->timer_056 == 0) && (D_i3_801C4308[12] <= -44.0f)) { - bossAQ->swork[AQ_SWK_2] = bossAQ->swork[AQ_SWK_3] = 20; - bossAQ->state = 15; + if ((this->timer_056 == 0) && (D_i3_801C4308[12] <= -44.0f)) { + this->swork[AQ_SWK_2] = this->swork[AQ_SWK_3] = 20; + this->state = 15; } - if (bossAQ->timer_056 == 40) { + if (this->timer_056 == 40) { Radio_PlayMessage(gMsg_ID_15140, RCID_PEPPY); } break; case 15: - if (bossAQ->swork[AQ_SWK_2] == 0) { - bossAQ->swork[AQ_SWK_2] = 100 + RAND_INT(50.0f); + if (this->swork[AQ_SWK_2] == 0) { + this->swork[AQ_SWK_2] = 100 + RAND_INT(50.0f); } - if (bossAQ->swork[AQ_SWK_3] == 0) { - bossAQ->swork[AQ_SWK_3] = 100 + RAND_INT(50.0f); + if (this->swork[AQ_SWK_3] == 0) { + this->swork[AQ_SWK_3] = 100 + RAND_INT(50.0f); } break; case 16: @@ -2790,8 +2778,8 @@ void Aquas_Boss_Update(Boss* bossAQ) { Math_SmoothStepToF(&D_i3_801C41B8[25], D_bg_8015F970, 1.0f, 100, 0.f); Math_SmoothStepToF(&D_i3_801C41B8[26], 128.0f, 1.0f, 100, 0.f); for (i3 = 0; i3 < AQ_LIMB_MAX; i3++) { - if (sBossAQlimbTimers[i3] == 0) { - sBossAQlimbTimers[i3] = 100; + if (sAqBacoonlimbTimers[i3] == 0) { + sAqBacoonlimbTimers[i3] = 100; } } @@ -2800,38 +2788,38 @@ void Aquas_Boss_Update(Boss* bossAQ) { D_i3_801C42A0[7] = 50; } if (((gGameFrameCount % 2) == 0)) { - func_effect_8007C120(bossAQ->obj.pos.x + RAND_FLOAT_CENTERED(1200.0f), - bossAQ->obj.pos.y + 400.0f + RAND_FLOAT_CENTERED(400.0f), - bossAQ->obj.pos.z + 1000.0f + RAND_FLOAT_CENTERED(800.0f), bossAQ->vel.x, - bossAQ->vel.y, bossAQ->vel.z, 0.5f, 10); - func_effect_8007D0E0(bossAQ->obj.pos.x + RAND_FLOAT_CENTERED(1200.0f), - bossAQ->obj.pos.y + 200.0f + RAND_FLOAT_CENTERED(400.0f), - bossAQ->obj.pos.z + 1000.0f + RAND_FLOAT_CENTERED(800.0f), 10.0f); + Effect_Effect390_Spawn(this->obj.pos.x + RAND_FLOAT_CENTERED(1200.0f), + this->obj.pos.y + 400.0f + RAND_FLOAT_CENTERED(400.0f), + this->obj.pos.z + 1000.0f + RAND_FLOAT_CENTERED(800.0f), this->vel.x, + this->vel.y, this->vel.z, 0.5f, 10); + func_effect_8007D0E0(this->obj.pos.x + RAND_FLOAT_CENTERED(1200.0f), + this->obj.pos.y + 200.0f + RAND_FLOAT_CENTERED(400.0f), + this->obj.pos.z + 1000.0f + RAND_FLOAT_CENTERED(800.0f), 10.0f); } if (i3 && i3) {} for (i3 = 0; i3 < 3; i3++) { - func_effect_80081A8C(bossAQ->obj.pos.x + RAND_FLOAT_CENTERED(1200.0f), - bossAQ->obj.pos.y + 200.0f + RAND_FLOAT_CENTERED(200.0f), - bossAQ->obj.pos.z + 1000.0f + RAND_FLOAT_CENTERED(800.0f), 3.0f + RAND_FLOAT(3.0f), + func_effect_80081A8C(this->obj.pos.x + RAND_FLOAT_CENTERED(1200.0f), + this->obj.pos.y + 200.0f + RAND_FLOAT_CENTERED(200.0f), + this->obj.pos.z + 1000.0f + RAND_FLOAT_CENTERED(800.0f), 3.0f + RAND_FLOAT(3.0f), 5); } - if (bossAQ->timer_056 == 0) { + if (this->timer_056 == 0) { gEffects[98].obj.status = OBJ_FREE; gEffects[99].obj.status = OBJ_FREE; - func_effect_8007A568(bossAQ->obj.pos.x, bossAQ->obj.pos.y, bossAQ->obj.pos.z + 600.0f, 40.0f); - bossAQ->timer_056 = 50; + Effect_Effect383_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 600.0f, 40.0f); + this->timer_056 = 50; for (i3 = 0; i3 < AQ_LIMB_MAX; i3++) { - sBossAQlimbTimers[i3] = 100; + sAqBacoonlimbTimers[i3] = 100; } gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 0; - bossAQ->state = 17; + this->state = 17; } break; case 17: - if (bossAQ->timer_056 == 20) { + if (this->timer_056 == 20) { gEffects[96].obj.status = OBJ_FREE; gEffects[97].obj.status = OBJ_FREE; - func_effect_8007A568(bossAQ->obj.pos.x, bossAQ->obj.pos.y, bossAQ->obj.pos.z + 600.0f, 80.0f); + Effect_Effect383_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 600.0f, 80.0f); } D_i3_801C42A0[0] -= 4; if (D_i3_801C42A0[0] < 0) { @@ -2840,38 +2828,38 @@ void Aquas_Boss_Update(Boss* bossAQ) { for (i3 = 0; i3 < 21; i3++) { Math_SmoothStepToF(&D_i3_801C4308[52 + i3], 0.1f, 0.1f, 1.0f, 0.0f); } - Math_SmoothStepToF(&bossAQ->fwork[AQ_FWK_8], 0.1f, 0.1f, 1.0f, 0.0f); - Math_SmoothStepToF(&bossAQ->fwork[AQ_FWK_9], 0.1f, 0.1f, 1.0f, 0.0f); - Math_SmoothStepToF(&bossAQ->fwork[AQ_FWK_10], 0.1f, 0.1f, 1.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[AQ_FWK_8], 0.1f, 0.1f, 1.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[AQ_FWK_9], 0.1f, 0.1f, 1.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[AQ_FWK_10], 0.1f, 0.1f, 1.0f, 0.0f); if (((gGameFrameCount % 2) == 0)) { - func_effect_8007C120(bossAQ->obj.pos.x + RAND_FLOAT_CENTERED(1200.0f), - bossAQ->obj.pos.y + 400.0f + RAND_FLOAT_CENTERED(400.0f), - bossAQ->obj.pos.z + 1000.0f + RAND_FLOAT_CENTERED(800.0f), bossAQ->vel.x, - bossAQ->vel.y, bossAQ->vel.z, 0.7f, 15); + Effect_Effect390_Spawn(this->obj.pos.x + RAND_FLOAT_CENTERED(1200.0f), + this->obj.pos.y + 400.0f + RAND_FLOAT_CENTERED(400.0f), + this->obj.pos.z + 1000.0f + RAND_FLOAT_CENTERED(800.0f), this->vel.x, + this->vel.y, this->vel.z, 0.7f, 15); } - if (bossAQ->timer_056 == 1) { + if (this->timer_056 == 1) { for (i3 = 0; i3 < AQ_LIMB_MAX; i3++) { if (i3 != AQ_LIMB_27) { - sBossAQlimbTimers[i3] = 1000; + sAqBacoonlimbTimers[i3] = 1000; } } } - if (bossAQ->timer_056 == 0) { - bossAQ->timer_056 = 300; - bossAQ->state = 18; + if (this->timer_056 == 0) { + this->timer_056 = 300; + this->state = 18; } break; case 18: - if (bossAQ->timer_056 != 0) { + if (this->timer_056 != 0) { for (i3 = 0; i3 < 30; i3++) { - Aquas_801AC8A8(gBosses[0].obj.pos.x + RAND_FLOAT_CENTERED(1800.0f), - gBosses[0].obj.pos.y + RAND_FLOAT_CENTERED(500.0f), - gBosses[0].obj.pos.z + 700.0f + RAND_FLOAT_CENTERED(1000.0f), 7.0f, 2); + Aquas_Effect366_Spawn(gBosses[0].obj.pos.x + RAND_FLOAT_CENTERED(1800.0f), + gBosses[0].obj.pos.y + RAND_FLOAT_CENTERED(500.0f), + gBosses[0].obj.pos.z + 700.0f + RAND_FLOAT_CENTERED(1000.0f), 7.0f, 2); } } break; } - switch (bossAQ->swork[AQ_SWK_0]) { + switch (this->swork[AQ_SWK_0]) { case 0: if (D_i3_801C42A0[23] == 0) { D_i3_801C4308[79] = -180.0f; @@ -2882,8 +2870,8 @@ void Aquas_Boss_Update(Boss* bossAQ) { break; case 1: Math_SmoothStepToF(&D_i3_801C4308[10], -28.0f, 0.05f, 0.3f, 0.0f); - if (bossAQ->timer_052 < 3) { - Aquas_801B0F88(bossAQ); + if (this->timer_052 < 3) { + Aquas_801B0F88(this); } break; case 2: @@ -2891,42 +2879,42 @@ void Aquas_Boss_Update(Boss* bossAQ) { case 3: Math_SmoothStepToF(&D_i3_801C4308[10], D_i3_801C4308[79], 0.5f, 10.0f, 0.0f); if (fabsf(D_i3_801C4308[10]) <= 5.0f) { - bossAQ->swork[AQ_SWK_0] = 0; - bossAQ->timer_052 = 0; - bossAQ->swork[AQ_SWK_19] = 500; + this->swork[AQ_SWK_0] = 0; + this->timer_052 = 0; + this->swork[AQ_SWK_19] = 500; D_i3_801C4308[79] = 0.0f; - AUDIO_PLAY_SFX(NA_SE_EN_SHELL_CLOSE, bossAQ->sfxSource, 4); - if (bossAQ->state < 14) { - for (i3 = 0, actor = gActors; i3 < ARRAY_COUNT(gActors); i3++, actor++) { - if ((actor->obj.id == OBJ_ACTOR_260) && (actor->obj.status == OBJ_ACTIVE)) { + AUDIO_PLAY_SFX(NA_SE_EN_SHELL_CLOSE, this->sfxSource, 4); + if (this->state < 14) { + for (i3 = 0, actor = &gActors[0]; i3 < ARRAY_COUNT(gActors); i3++, actor++) { + if ((actor->obj.id == OBJ_ACTOR_AQ_GAROA) && (actor->obj.status == OBJ_ACTIVE)) { actor->iwork[0] = 1; } } - bossAQ->timer_058 = 30; - bossAQ->swork[AQ_SWK_0] = 4; + this->timer_058 = 30; + this->swork[AQ_SWK_0] = 4; gCameraShake = 50; - AUDIO_PLAY_SFX(NA_SE_WATER_PRESSURE, bossAQ->sfxSource, 0); - func_enmy_80062B60(bossAQ->obj.pos.x, bossAQ->obj.pos.z + 800.0f, 0, 100.0f); + AUDIO_PLAY_SFX(NA_SE_WATER_PRESSURE, this->sfxSource, 0); + func_enmy_80062B60(this->obj.pos.x, this->obj.pos.z + 800.0f, 0, 100.0f); var_fs3 = 80.0f; for (i2 = 0; i2 < 3; i2++, var_fs3 += 10.0f) { for (i3 = 0; i3 < 9; i3++) { var_fs0 = SIN_DEG((27 + 2 * i3) * (10.0f + 3 * i2)) * var_fs3 * 10.0f; var_fs1 = COS_DEG((27 + 2 * i3) * (10.0f + 3 * i2)) * var_fs3 * 10.0f; temp3 = gGroundHeight + 30.0f; - func_effect_8007B8F8(bossAQ->obj.pos.x + var_fs0, temp3, - bossAQ->obj.pos.z + 1000.0f + var_fs1, 20.0f); + Effect_Effect364_Spawn(this->obj.pos.x + var_fs0, temp3, + this->obj.pos.z + 1000.0f + var_fs1, 20.0f); } } } } break; case 4: - bossAQ->swork[AQ_SWK_19] = 50; + this->swork[AQ_SWK_19] = 50; Math_SmoothStepToF(&D_i3_801C4308[10], D_i3_801C4308[79], 0.5f, 5.0f, 0.0f); - if (bossAQ->timer_058 > 10) { + if (this->timer_058 > 10) { Math_SmoothStepToF(D_ctx_801779A8, 20.0f, 1.0f, 5.0f, 0.0f); } - if (bossAQ->timer_058 != 0) { + if (this->timer_058 != 0) { gPlayer[0].boostCooldown = 1; Math_SmoothStepToF(&D_i3_801C41B8[24], 20.0f, 0.1f, 1.0f, 0.0f); Math_SmoothStepToF(&gPlayer[0].camDist, 180.0f, 0.4f, 20.0f, 0.0f); @@ -2936,110 +2924,110 @@ void Aquas_Boss_Update(Boss* bossAQ) { if (gPlayer[0].camDist < 0.1f) { gPlayer[0].boostCooldown = 0; gPlayer[0].camDist = D_i3_801C41B8[24] = 0.0f; - bossAQ->swork[AQ_SWK_0] = 0; + this->swork[AQ_SWK_0] = 0; } } break; } Math_SmoothStepToF(&D_i3_801C4308[80], 0.0f, 1.0f, 2.0f, 0); Math_SmoothStepToF(&D_i3_801C4308[11], D_i3_801C4308[80], 0.1f, 2.0f, 0); - if (bossAQ->dmgType != DMG_NONE) { - bossAQ->dmgType = DMG_NONE; + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; if (fabsf(D_i3_801C4308[10]) >= 5.0f) { - switch (bossAQ->dmgPart) { + switch (this->dmgPart) { case 13: - if ((bossAQ->swork[AQ_SWK_12] != 0) && (bossAQ->state >= 15)) { + if ((this->swork[AQ_SWK_12] != 0) && (this->state >= 15)) { if (D_i3_801C42A0[23] == 0) { - sBossAQlimbTimers[AQ_LIMB_9] = D_i3_801C42A0[3] = 50; + sAqBacoonlimbTimers[AQ_LIMB_9] = D_i3_801C42A0[3] = 50; D_i3_801C42A0[22] = 0; - bossAQ->swork[AQ_SWK_12]--; - bossAQ->swork[AQ_SWK_13] = 70; - AUDIO_PLAY_SFX(NA_SE_EN_EYEFILM_DAMAGE, bossAQ->sfxSource, 4); + this->swork[AQ_SWK_12]--; + this->swork[AQ_SWK_13] = 70; + AUDIO_PLAY_SFX(NA_SE_EN_EYEFILM_DAMAGE, this->sfxSource, 4); } - } else if (bossAQ->state >= 10) { - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, bossAQ->sfxSource, 4); + } else if (this->state >= 10) { + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } break; case 14: - if (bossAQ->damage == 31) { + if (this->damage == 31) { if (D_i3_801C42A0[23] != 0) { - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, bossAQ->sfxSource, 4); - } else if ((bossAQ->state >= 15) && (bossAQ->swork[AQ_SWK_8] != 0)) { + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); + } else if ((this->state >= 15) && (this->swork[AQ_SWK_8] != 0)) { D_i3_801C42A0[1] = 50; - sBossAQlimbTimers[AQ_LIMB_7] = 50; - bossAQ->swork[AQ_SWK_8]--; - AUDIO_PLAY_SFX(NA_SE_EN_WT_DAMAGE_S, bossAQ->sfxSource, 4); - if (bossAQ->swork[AQ_SWK_8] == 0) { + sAqBacoonlimbTimers[AQ_LIMB_7] = 50; + this->swork[AQ_SWK_8]--; + AUDIO_PLAY_SFX(NA_SE_EN_WT_DAMAGE_S, this->sfxSource, 4); + if (this->swork[AQ_SWK_8] == 0) { spD4.x = D_i3_801C4308[73]; spD4.y = D_i3_801C4308[74]; spD4.z = D_i3_801C4308[75]; // 74? Effect_SpawnTimedSfxAtPos(&spD4, NA_SE_EN_WT_DISAPPEAR_L); - bossAQ->swork[AQ_SWK_10] = 250.0f + RAND_FLOAT(50.0f); + this->swork[AQ_SWK_10] = 250.0f + RAND_FLOAT(50.0f); } } } break; case 15: - if (bossAQ->damage == 31) { + if (this->damage == 31) { if (D_i3_801C42A0[23] != 0) { - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, bossAQ->sfxSource, 4); - } else if ((bossAQ->state >= 15) && (bossAQ->swork[AQ_SWK_9] != 0)) { + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); + } else if ((this->state >= 15) && (this->swork[AQ_SWK_9] != 0)) { D_i3_801C42A0[2] = 50; - sBossAQlimbTimers[AQ_LIMB_8] = 50; - bossAQ->swork[AQ_SWK_9]--; - AUDIO_PLAY_SFX(NA_SE_EN_WT_DAMAGE_S, bossAQ->sfxSource, 4); - if (bossAQ->swork[AQ_SWK_9] == 0) { + sAqBacoonlimbTimers[AQ_LIMB_8] = 50; + this->swork[AQ_SWK_9]--; + AUDIO_PLAY_SFX(NA_SE_EN_WT_DAMAGE_S, this->sfxSource, 4); + if (this->swork[AQ_SWK_9] == 0) { spD4.x = D_i3_801C4308[76]; spD4.y = D_i3_801C4308[77]; // 76? spD4.z = D_i3_801C4308[78]; Effect_SpawnTimedSfxAtPos(&spD4, NA_SE_EN_WT_DISAPPEAR_L); - bossAQ->swork[AQ_SWK_11] = 250.0f + RAND_FLOAT(50.0f); + this->swork[AQ_SWK_11] = 250.0f + RAND_FLOAT(50.0f); } } } break; case 16: - if (bossAQ->damage == 31) { + if (this->damage == 31) { if (D_i3_801C42A0[23] != 0) { - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, bossAQ->sfxSource, 4); - } else if (bossAQ->state >= 15) { + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); + } else if (this->state >= 15) { D_i3_801C42A0[4] = 75; } } break; case 17: - if (bossAQ->damage == 31) { + if (this->damage == 31) { if (D_i3_801C42A0[23] != 0) { - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, bossAQ->sfxSource, 4); - } else if (bossAQ->state >= 15) { + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); + } else if (this->state >= 15) { D_i3_801C42A0[5] = 75; } } break; case 18: - if ((bossAQ->damage == 31) && (bossAQ->swork[AQ_SWK_1] != 2) && (bossAQ->swork[AQ_SWK_12] == 0) && - (bossAQ->state == 15) && (bossAQ->health != 0)) { + if ((this->damage == 31) && (this->swork[AQ_SWK_1] != 2) && (this->swork[AQ_SWK_12] == 0) && + (this->state == 15) && (this->health != 0)) { if (D_i3_801C42A0[23] != 0) { - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, bossAQ->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } else { for (i7 = 0; i7 < AQ_LIMB_MAX; i7++) { - sBossAQlimbTimers[i7] = 50; + sAqBacoonlimbTimers[i7] = 50; } D_i3_801C42A0[1] = D_i3_801C42A0[2] = D_i3_801C42A0[4] = D_i3_801C42A0[5] = D_i3_801C42A0[6] = D_i3_801C42A0[7] = 50; - bossAQ->swork[AQ_SWK_13] = 40; - bossAQ->swork[AQ_SWK_1] = 2; - AUDIO_PLAY_SFX(NA_SE_EN_SHELL_DAMAGE, bossAQ->sfxSource, 4); - bossAQ->health -= bossAQ->damage; - if ((bossAQ->swork[AQ_SWK_25] == 0) || (bossAQ->swork[AQ_SWK_25] == 2)) { + this->swork[AQ_SWK_13] = 40; + this->swork[AQ_SWK_1] = 2; + AUDIO_PLAY_SFX(NA_SE_EN_SHELL_DAMAGE, this->sfxSource, 4); + this->health -= this->damage; + if ((this->swork[AQ_SWK_25] == 0) || (this->swork[AQ_SWK_25] == 2)) { Radio_PlayMessage(gMsg_ID_7086, RCID_SLIPPY); } - bossAQ->swork[AQ_SWK_25]++; - if (bossAQ->health <= 0) { + this->swork[AQ_SWK_25]++; + if (this->health <= 0) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 40); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 40); - Boss_AwardBonus(bossAQ); + Boss_AwardBonus(this); Radio_PlayMessage(gMsg_ID_15252, RCID_SLIPPY); gTeamLowHealthMsgTimer = -1; if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || @@ -3052,50 +3040,50 @@ void Aquas_Boss_Update(Boss* bossAQ) { D_i3_801C4190[3] = 0; D_i3_801C4190[4] = 0; D_i3_801C4190[0] = 0; - bossAQ->health = 0; - bossAQ->swork[AQ_SWK_13] = 40; - bossAQ->swork[AQ_SWK_1] = 2; - bossAQ->timer_056 = 50; - AUDIO_PLAY_SFX(NA_SE_EN_SHELL_DOWN, bossAQ->sfxSource, 4); + this->health = 0; + this->swork[AQ_SWK_13] = 40; + this->swork[AQ_SWK_1] = 2; + this->timer_056 = 50; + AUDIO_PLAY_SFX(NA_SE_EN_SHELL_DOWN, this->sfxSource, 4); gShowBossHealth = false; - bossAQ->state = 16; + this->state = 16; } } } break; case 19: case 20: - if (bossAQ->damage == 31) { + if (this->damage == 31) { if (D_i3_801C42A0[23] != 0) { - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, bossAQ->sfxSource, 4); - } else if (bossAQ->state >= 15) { + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); + } else if (this->state >= 15) { D_i3_801C42A0[6] = 50; } } break; default: - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, bossAQ->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); break; } } } - if (bossAQ->state >= 15) { - switch (bossAQ->swork[AQ_SWK_1]) { + if (this->state >= 15) { + switch (this->swork[AQ_SWK_1]) { case 0: - Math_SmoothStepToF(&D_i3_801C4308[12], -45.0f, 1.0f, bossAQ->fwork[AQ_FWK_1], 0.01f); - Math_SmoothStepToF(&D_i3_801C4308[13], 30.0f, 1.0f, bossAQ->fwork[AQ_FWK_1], 0.01f); - if ((bossAQ->timer_050 == 0) && (*(&D_i3_801C4308[12]) == -45.0f)) { - bossAQ->timer_050 = 7; - bossAQ->swork[AQ_SWK_1]++; + Math_SmoothStepToF(&D_i3_801C4308[12], -45.0f, 1.0f, this->fwork[AQ_FWK_1], 0.01f); + Math_SmoothStepToF(&D_i3_801C4308[13], 30.0f, 1.0f, this->fwork[AQ_FWK_1], 0.01f); + if ((this->timer_050 == 0) && (*(&D_i3_801C4308[12]) == -45.0f)) { + this->timer_050 = 7; + this->swork[AQ_SWK_1]++; } break; case 1: - var_fs0 = 2.0f * bossAQ->fwork[AQ_FWK_1]; + var_fs0 = 2.0f * this->fwork[AQ_FWK_1]; Math_SmoothStepToF(&D_i3_801C4308[12], 0.0f, 1.0f, var_fs0, 0.0001f); Math_SmoothStepToF(&D_i3_801C4308[13], 0.0f, 1.0f, var_fs0, 0.0001f); - if (bossAQ->timer_050 == 0) { - bossAQ->swork[AQ_SWK_1] = 0; - bossAQ->timer_050 = 40.0f - ((bossAQ->health - 150) / 5.0f); + if (this->timer_050 == 0) { + this->swork[AQ_SWK_1] = 0; + this->timer_050 = 40.0f - ((this->health - 150) / 5.0f); } break; case 2: @@ -3103,33 +3091,33 @@ void Aquas_Boss_Update(Boss* bossAQ) { Math_SmoothStepToF(&D_i3_801C4308[12], -80.0f, 1.0f, 10.0f, 0.0001f); Math_SmoothStepToF(&D_i3_801C4308[13], 30.0f, 1.0f, 10.0f, 0.0001f); } else { - bossAQ->timer_050 = 50; - bossAQ->swork[AQ_SWK_1] = 0; + this->timer_050 = 50; + this->swork[AQ_SWK_1] = 0; } break; } } - bossAQ->swork[AQ_SWK_14] += D_i3_801C0150[bossAQ->swork[AQ_SWK_18]][0]; - bossAQ->swork[AQ_SWK_15] += D_i3_801C0150[bossAQ->swork[AQ_SWK_18]][1]; - bossAQ->swork[AQ_SWK_16] += D_i3_801C0150[bossAQ->swork[AQ_SWK_18]][2]; - if (bossAQ->swork[AQ_SWK_14] < 0) { - bossAQ->swork[AQ_SWK_14] = 0; + this->swork[AQ_SWK_14] += D_i3_801C0150[this->swork[AQ_SWK_18]][0]; + this->swork[AQ_SWK_15] += D_i3_801C0150[this->swork[AQ_SWK_18]][1]; + this->swork[AQ_SWK_16] += D_i3_801C0150[this->swork[AQ_SWK_18]][2]; + if (this->swork[AQ_SWK_14] < 0) { + this->swork[AQ_SWK_14] = 0; } - if (bossAQ->swork[AQ_SWK_15] < 0) { - bossAQ->swork[AQ_SWK_15] = 0; + if (this->swork[AQ_SWK_15] < 0) { + this->swork[AQ_SWK_15] = 0; } - if (bossAQ->swork[AQ_SWK_16] < 0) { - bossAQ->swork[AQ_SWK_16] = 0; + if (this->swork[AQ_SWK_16] < 0) { + this->swork[AQ_SWK_16] = 0; } - if (bossAQ->swork[AQ_SWK_17] == 0) { - bossAQ->swork[AQ_SWK_17] = 10; - bossAQ->swork[AQ_SWK_18]++; - bossAQ->swork[AQ_SWK_18] &= 3; + if (this->swork[AQ_SWK_17] == 0) { + this->swork[AQ_SWK_17] = 10; + this->swork[AQ_SWK_18]++; + this->swork[AQ_SWK_18] &= 3; } - if ((bossAQ->state >= 4) && (bossAQ->state < 16)) { - sp104 = gPlayer[0].pos.x - bossAQ->obj.pos.x; - sp100 = gPlayer[0].pos.y - bossAQ->obj.pos.y; - spFC = gPlayer[0].trueZpos - bossAQ->obj.pos.z; + if ((this->state >= 4) && (this->state < 16)) { + sp104 = gPlayer[0].pos.x - this->obj.pos.x; + sp100 = gPlayer[0].pos.y - this->obj.pos.y; + spFC = gPlayer[0].trueZpos - this->obj.pos.z; spE8 = Math_RadToDeg(Math_Atan2F(sp104, spFC)); // spEC = sqrtf(SQ(sp104) + SQ(spFC)); spE4 = Math_RadToDeg(-Math_Atan2F(sp100, sqrtf(SQ(sp104) + SQ(spFC)))); @@ -3141,8 +3129,8 @@ void Aquas_Boss_Update(Boss* bossAQ) { } } for (i3 = 0; i3 < 6; i3++) { - if ((D_i3_801C42A0[i3 + 1] == 0) && (bossAQ->state < 17)) { - if ((i3 + 1 != bossAQ->swork[AQ_SWK_6]) && (i3 + 1 != bossAQ->swork[AQ_SWK_7])) { + if ((D_i3_801C42A0[i3 + 1] == 0) && (this->state < 17)) { + if ((i3 + 1 != this->swork[AQ_SWK_6]) && (i3 + 1 != this->swork[AQ_SWK_7])) { i2 = D_i3_801C42A0[i3 + 16]; Math_SmoothStepToF(&D_i3_801C4308[52 + i3], D_i3_801BFC94[4 * i3 + i2].x, D_i3_801BFE18[4 * i3 + i2].x, D_i3_801BFF38[4 * i3 + i2].x, 0.00001f); @@ -3187,20 +3175,20 @@ void Aquas_Boss_Update(Boss* bossAQ) { if ((spEC <= 12.0f) || (spEC >= 330.0f)) { Math_SmoothStepToAngle(&D_i3_801C4308[17], spEC, 1.0f, 5.0f, 0.001f); } - if ((bossAQ->swork[AQ_SWK_2] == 1) && (bossAQ->swork[AQ_SWK_8] != 0) && (bossAQ->health != 0) && - (bossAQ->swork[AQ_SWK_6] == 0)) { + if ((this->swork[AQ_SWK_2] == 1) && (this->swork[AQ_SWK_8] != 0) && (this->health != 0) && + (this->swork[AQ_SWK_6] == 0)) { D_i3_801C42A0[10] = D_i3_801C42A0[16] = 0; - bossAQ->swork[AQ_SWK_6] = 1; + this->swork[AQ_SWK_6] = 1; } - if ((bossAQ->swork[AQ_SWK_3] == 1) && (bossAQ->swork[AQ_SWK_9] != 0) && (bossAQ->health != 0) && - (bossAQ->swork[AQ_SWK_7] == 0)) { + if ((this->swork[AQ_SWK_3] == 1) && (this->swork[AQ_SWK_9] != 0) && (this->health != 0) && + (this->swork[AQ_SWK_7] == 0)) { D_i3_801C42A0[11] = D_i3_801C42A0[17] = 0; - bossAQ->swork[AQ_SWK_7] = 2; + this->swork[AQ_SWK_7] = 2; } - if (bossAQ->health != 0) { + if (this->health != 0) { for (i7 = 0; i7 < 2; i7++) { - if (bossAQ->swork[AQ_SWK_6 + i7] != 0) { - i2 = bossAQ->swork[AQ_SWK_4 + i7]; + if (this->swork[AQ_SWK_6 + i7] != 0) { + i2 = this->swork[AQ_SWK_4 + i7]; Math_SmoothStepToF(&D_i3_801C4308[52 + i7], D_i3_801C00B0[0][i2], D_i3_801C00F0[0][i2], D_i3_801C0120[0][i2], 0.00001f); Math_SmoothStepToF(&D_i3_801C4308[59 + i7], D_i3_801C00B0[1][i2], D_i3_801C00F0[1][i2], @@ -3209,13 +3197,13 @@ void Aquas_Boss_Update(Boss* bossAQ) { D_i3_801C0120[2][i2], 0.00001f); D_i3_801C42A0[i7 + 10]++; if (D_i3_801C42A0[i7 + 10] >= D_i3_801C00E0[i2]) { - bossAQ->swork[AQ_SWK_4 + i7]++; - if (bossAQ->swork[AQ_SWK_4 + i7] == 2) { + this->swork[AQ_SWK_4 + i7]++; + if (this->swork[AQ_SWK_4 + i7] == 2) { i = 4; if (D_i3_801C42A0[23] == 0) { - i = ((160 - bossAQ->health) / 10) + 10; - if (bossAQ->health < 31) { + i = ((160 - this->health) / 10) + 10; + if (this->health < 31) { i += 10; } if (i > 40) { @@ -3232,14 +3220,14 @@ void Aquas_Boss_Update(Boss* bossAQ) { Actor_Initialize(&gActors[i3]); gActors[i3].obj.status = OBJ_INIT; - gActors[i3].obj.id = OBJ_ACTOR_258; + gActors[i3].obj.id = OBJ_ACTOR_AQ_PEARL; gActors[i3].obj.pos.x = D_i3_801C4308[73 + 3 * i7]; gActors[i3].obj.pos.y = D_i3_801C4308[74 + 3 * i7] + 30.0f; gActors[i3].obj.pos.z = D_i3_801C4308[75 + 3 * i7] + 150.0f; if (Rand_ZeroOne() < 0.5f) { var_fs1 = Math_ModF(D_i3_801C4308[i7 + 16] + RAND_FLOAT_CENTERED(60.0f), 360.0f); var_fs0 = Math_ModF(D_i3_801C4308[i7 + 18] + RAND_FLOAT_CENTERED(60.0f), 360.0f); - if (bossAQ->health < 61) { + if (this->health < 61) { if (i7 == 0) { var_fs1 = Math_ModF(D_i3_801C4308[i7 + 16] + RAND_FLOAT_CENTERED(30.0f), 360.0f); @@ -3271,8 +3259,8 @@ void Aquas_Boss_Update(Boss* bossAQ) { } } } - if (bossAQ->swork[AQ_SWK_4 + i7] >= 4) { - D_i3_801C42A0[10 + i7] = bossAQ->swork[AQ_SWK_6 + i7] = bossAQ->swork[AQ_SWK_4 + i7] = 0; + if (this->swork[AQ_SWK_4 + i7] >= 4) { + D_i3_801C42A0[10 + i7] = this->swork[AQ_SWK_6 + i7] = this->swork[AQ_SWK_4 + i7] = 0; } } } @@ -3283,12 +3271,12 @@ void Aquas_Boss_Update(Boss* bossAQ) { if (fabsf(D_i3_801C4308[10]) <= 5.0f) { var_fs0 = 0.0f; } - bossAQ->info.hitbox[i7] = var_fs0; + this->info.hitbox[i7] = var_fs0; } - if (bossAQ->state >= 10) { + if (this->state >= 10) { sp110 = D_i3_801C42A0[9]; i2 = (gGameFrameCount & 0x1F); // % 0x20 if possible - if (sBossAQlimbTimers[AQ_LIMB_9] != 0) { + if (sAqBacoonlimbTimers[AQ_LIMB_9] != 0) { Math_SmoothStepToF(&sp110, 255.0f, 1.0f, 10, 0.0001f); } else if ((i2 & 0x10) == 0) { Math_SmoothStepToF(&sp110, D_i3_801C005C, 1.0f, 10, 0.0001f); @@ -3307,7 +3295,7 @@ void Aquas_Boss_Update(Boss* bossAQ) { D_i3_801C42A0[i3]--; } } - if (bossAQ->swork[AQ_SWK_12] != 0) { + if (this->swork[AQ_SWK_12] != 0) { if (D_i3_801C42A0[3] != 0) { var_fs3 = 1.0f; if (D_i3_801C42A0[22] < 4) { @@ -3322,19 +3310,19 @@ void Aquas_Boss_Update(Boss* bossAQ) { } } else { D_i3_801C42A0[3] = 10; - if (bossAQ->swork[AQ_SWK_13] != 0) { + if (this->swork[AQ_SWK_13] != 0) { Math_SmoothStepToF(&D_i3_801C4308[54], 0.0f, 0.3f, 0.5f, 0.0f); Math_SmoothStepToF(&D_i3_801C4308[61], 0.0f, 0.3f, 0.5f, 0.0f); - bossAQ->info.hitbox[119] = -10000.0f; - if (bossAQ->swork[AQ_SWK_13] == 1) { - AUDIO_PLAY_SFX(NA_SE_EN_EYEFILM_REVIVAL, bossAQ->sfxSource, 4); + this->info.hitbox[119] = -10000.0f; + if (this->swork[AQ_SWK_13] == 1) { + AUDIO_PLAY_SFX(NA_SE_EN_EYEFILM_REVIVAL, this->sfxSource, 4); } - } else if ((bossAQ->health != 0) || (bossAQ->state < 16)) { + } else if ((this->health != 0) || (this->state < 16)) { Math_SmoothStepToF(&D_i3_801C4308[54], 1.0f, 0.3f, 0.5f, 0.0f); Math_SmoothStepToF(&D_i3_801C4308[61], 1.0f, 0.3f, 0.5f, 0.0f); if (D_i3_801C4308[61] >= 0.9f) { - bossAQ->swork[AQ_SWK_12] = 10; - bossAQ->info.hitbox[119] = 1028.0f; + this->swork[AQ_SWK_12] = 10; + this->info.hitbox[119] = 1028.0f; } } else { Math_SmoothStepToF(&D_i3_801C4308[54], 0, 0.1f, 10, 0); @@ -3345,21 +3333,21 @@ void Aquas_Boss_Update(Boss* bossAQ) { } } } - if ((D_i3_801C42A0[7] != 0) || (bossAQ->state >= 16)) { + if ((D_i3_801C42A0[7] != 0) || (this->state >= 16)) { var_fs3 = 0.25f; } else { var_fs3 = 1.0f; } Math_SmoothStepToF(&D_i3_801C4308[58], var_fs3, 0.3f, 1.0f, 0); for (i3 = 0; i3 < 2; i3++) { - if (bossAQ->swork[AQ_SWK_8 + i3] == 0) { - if (bossAQ->swork[AQ_SWK_10 + i3] == 1) { + if (this->swork[AQ_SWK_8 + i3] == 0) { + if (this->swork[AQ_SWK_10 + i3] == 1) { spD4.x = D_i3_801C4308[73 + 3 * i3]; spD4.y = D_i3_801C4308[74 + 3 * i3]; spD4.z = D_i3_801C4308[75 + 3 * i3]; Effect_SpawnTimedSfxAtPos(&spD4, NA_SE_EN_P_GUN_APPEAR); } - if ((fabsf(D_i3_801C4308[10]) <= 3.0f) || (bossAQ->swork[AQ_SWK_10 + i3] == 0)) { + if ((fabsf(D_i3_801C4308[10]) <= 3.0f) || (this->swork[AQ_SWK_10 + i3] == 0)) { Math_SmoothStepToF(&D_i3_801C4308[52 + i3], 1.0f, 0.1f, 0.5f, 0.0f); Math_SmoothStepToF(&D_i3_801C4308[59 + i3], 1.0f, 0.1f, 0.5f, 0.0f); Math_SmoothStepToF(&D_i3_801C4308[66 + i3], 1.0f, 0.1f, 0.5f, 0.0f); @@ -3368,9 +3356,9 @@ void Aquas_Boss_Update(Boss* bossAQ) { spD4.x = D_i3_801C4308[73 + 3 * i3] + RAND_FLOAT(i * 200.0f); spD4.y = D_i3_801C4308[74 + 3 * i3] + RAND_FLOAT(i * 200.0f); spD4.z = D_i3_801C4308[75 + 3 * i3] + RAND_FLOAT(i * 400.0f); - Aquas_801A94EC(&spD4, OBJ_ITEM_SILVER_RING); + Aquas_SpawnItem(&spD4, OBJ_ITEM_SILVER_RING); } - bossAQ->swork[AQ_SWK_8 + i3] = 2; + this->swork[AQ_SWK_8 + i3] = 2; } } else { Math_SmoothStepToF(&D_i3_801C4308[52 + i3], 0, 0.1f, 0.5f, 0.0f); @@ -3380,40 +3368,40 @@ void Aquas_Boss_Update(Boss* bossAQ) { } } } - if (bossAQ->swork[AQ_SWK_2] != 0) { - bossAQ->swork[AQ_SWK_2]--; + if (this->swork[AQ_SWK_2] != 0) { + this->swork[AQ_SWK_2]--; } - if (bossAQ->swork[AQ_SWK_3] != 0) { - bossAQ->swork[AQ_SWK_3]--; + if (this->swork[AQ_SWK_3] != 0) { + this->swork[AQ_SWK_3]--; } - if (bossAQ->swork[AQ_SWK_10] != 0) { - bossAQ->swork[AQ_SWK_10]--; + if (this->swork[AQ_SWK_10] != 0) { + this->swork[AQ_SWK_10]--; } - if (bossAQ->swork[AQ_SWK_11] != 0) { - bossAQ->swork[AQ_SWK_11]--; + if (this->swork[AQ_SWK_11] != 0) { + this->swork[AQ_SWK_11]--; } - if (bossAQ->swork[AQ_SWK_13] != 0) { - bossAQ->swork[AQ_SWK_13]--; + if (this->swork[AQ_SWK_13] != 0) { + this->swork[AQ_SWK_13]--; } - if (bossAQ->swork[AQ_SWK_17] != 0) { - bossAQ->swork[AQ_SWK_17]--; + if (this->swork[AQ_SWK_17] != 0) { + this->swork[AQ_SWK_17]--; } - if (bossAQ->swork[AQ_SWK_19] != 0) { - bossAQ->swork[AQ_SWK_19]--; + if (this->swork[AQ_SWK_19] != 0) { + this->swork[AQ_SWK_19]--; } - if (bossAQ->swork[AQ_SWK_26] == gBossFrameCount) { + if (this->swork[AQ_SWK_26] == gBossFrameCount) { gShowBossHealth = true; } - if (bossAQ->swork[AQ_SWK_26] < gBossFrameCount) { - gBossHealthBar = (bossAQ->health / 150.0f) * 255.0f; + if (this->swork[AQ_SWK_26] < gBossFrameCount) { + gBossHealthBar = (this->health / 150.0f) * 255.0f; } } #else -void Aquas_Boss_Update(Boss* bossAQ); -#pragma GLOBAL_ASM("asm/us/rev1/nonmatchings/overlays/ovl_i3/fox_aq/Aquas_Boss_Update.s") +void Aquas_AqBacoon_Update(AqBacoon* this); +#pragma GLOBAL_ASM("asm/us/rev1/nonmatchings/overlays/ovl_i3/fox_aq/Aquas_AqBacoon_Update.s") #endif -bool Aquas_801B42AC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { +bool Aquas_AqBacoon_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { Vec3f sp6C = { 0.0f, 0.0f, 0.0f }; Vec3f sp60; f32 sp5C = 0.0f; @@ -3422,10 +3410,10 @@ bool Aquas_801B42AC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th s32 sp50 = false; Boss* this = thisx; - if (sBossAQlimbTimers[limbIndex] >= 1000) { + if (sAqBacoonlimbTimers[limbIndex] >= 1000) { *dList = NULL; - } else if ((sBossAQlimbTimers[limbIndex] != 0) && (gPlayState != PLAY_PAUSE)) { - sBossAQlimbTimers[limbIndex]--; + } else if ((sAqBacoonlimbTimers[limbIndex] != 0) && (gPlayState != PLAY_PAUSE)) { + sAqBacoonlimbTimers[limbIndex]--; } gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); @@ -3433,7 +3421,7 @@ bool Aquas_801B42AC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th if ((D_i3_801C42A0[0] != 255) && (limbIndex != 27)) { RCP_SetupDL(&gMasterDisp, SETUPDL_58); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, D_i3_801C42A0[0]); - } else if ((sBossAQlimbTimers[limbIndex] % 2) == 0) { + } else if ((sAqBacoonlimbTimers[limbIndex] % 2) == 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_57); } else { sp50 = true; @@ -3581,7 +3569,7 @@ bool Aquas_801B42AC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th return false; } -void Aquas_801B49DC(s32 limbIndex, Vec3f* rot, void* thisx) { +void Aquas_AqBacoon_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp6C; Vec3f sp60 = { 0.0f, 0.0f, 0.0f }; Vec3f sp54 = { 340.0f, 600.0f, 1480.0f }; @@ -3675,9 +3663,9 @@ void Aquas_801B49DC(s32 limbIndex, Vec3f* rot, void* thisx) { } } -// OBJ_BOSS_AQ draw -void Aquas_Boss_Draw(Boss* bossAQ) { - Animation_DrawSkeleton(3, D_AQ_602BD60, bossAQ->vwork, Aquas_801B42AC, Aquas_801B49DC, bossAQ, gCalcMatrix); +void Aquas_AqBacoon_Draw(AqBacoon* this) { + Animation_DrawSkeleton(3, D_AQ_602BD60, this->vwork, Aquas_AqBacoon_OverrideLimbDraw, Aquas_AqBacoon_PostLimbDraw, + this, gCalcMatrix); } f32 D_i3_801C01F8[11] = { @@ -3688,7 +3676,7 @@ f32 D_i3_801C0224[11] = { }; Vec3f D_i3_801C0250 = { 0.0f, 0.0f, 0.0f }; -bool Aquas_801B4DDC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { +bool Aquas_AqSculpin_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { Actor* this = (Actor*) thisx; if ((this->timer_0C6 % 2) == 0) { @@ -3703,7 +3691,7 @@ bool Aquas_801B4DDC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th return false; } -void Aquas_801B4E94(s32 limbIndex, Vec3f* rot, void* thisx) { +void Aquas_AqSculpin_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp24 = D_i3_801C0250; Actor* this = (Actor*) thisx; @@ -3752,13 +3740,13 @@ void Aquas_801B4E94(s32 limbIndex, Vec3f* rot, void* thisx) { } } -// OBJ_ACTOR_261 draw -void Aquas_Actor261_Draw(Actor* actor) { +void Aquas_AqSculpin_Draw(AqSculpin* this) { Vec3f jointTable[30]; - Matrix_Scale(gCalcMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY); - Animation_GetFrameData(&D_AQ_6005954, actor->animFrame, jointTable); - Animation_DrawSkeleton(3, D_AQ_6005A80, jointTable, Aquas_801B4DDC, Aquas_801B4E94, actor, gCalcMatrix); + Matrix_Scale(gCalcMatrix, this->scale, this->scale, this->scale, MTXF_APPLY); + Animation_GetFrameData(&D_AQ_6005954, this->animFrame, jointTable); + Animation_DrawSkeleton(3, D_AQ_6005A80, jointTable, Aquas_AqSculpin_OverrideLimbDraw, Aquas_AqSculpin_PostLimbDraw, + this, gCalcMatrix); } f32 D_i3_801C025C[2] = { 120.0f, 0.0f }; @@ -3766,169 +3754,168 @@ s32 D_i3_801C0264[19] = { 0, 0, 3, 4, 0, 5, 6, 7, 1, 2, 0, 0, 0, 0, 0, 0, 8, 9, 0, }; -// OBJ_ACTOR_261 action -void Aquas_Actor261_Update(Actor* actor) { +void Aquas_AqSculpin_Update(AqSculpin* this) { s32 i; Vec3f sp88; Vec3f sp7C; Vec3f sp70; - Actor* var_v0; + AqSculpin* sculpin; - if ((actor->health == 0) && (actor->state != 0)) { + if ((this->health == 0) && (this->state != 0)) { for (i = 0; i < 5; i++) { - func_effect_80081A8C(actor->obj.pos.x + RAND_FLOAT(i * 15.0f), actor->obj.pos.y + RAND_FLOAT(i * 3.0f), - actor->obj.pos.z + RAND_FLOAT(i * 5.0f), 0.4f + RAND_FLOAT(0.4f), 7); + func_effect_80081A8C(this->obj.pos.x + RAND_FLOAT(i * 15.0f), this->obj.pos.y + RAND_FLOAT(i * 3.0f), + this->obj.pos.z + RAND_FLOAT(i * 5.0f), 0.4f + RAND_FLOAT(0.4f), 7); } - actor->health = 0; - actor->state = 7; - Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_AQ_ZAKO_DOWN); + this->health = 0; + this->state = 7; + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_AQ_ZAKO_DOWN); } - switch (actor->state) { + switch (this->state) { case 0: for (i = 0; i < 8; i++) { - actor->vwork[i].x = actor->obj.pos.x; - actor->vwork[i].y = actor->obj.pos.y; - actor->vwork[i].z = actor->obj.pos.z; - actor->vwork[8 + i].x = actor->obj.rot.x; - actor->vwork[8 + i].y = actor->obj.rot.y; - actor->vwork[8 + i].z = actor->obj.rot.z; + this->vwork[i].x = this->obj.pos.x; + this->vwork[i].y = this->obj.pos.y; + this->vwork[i].z = this->obj.pos.z; + this->vwork[8 + i].x = this->obj.rot.x; + this->vwork[8 + i].y = this->obj.rot.y; + this->vwork[8 + i].z = this->obj.rot.z; } - actor->info.bonus = 0; - actor->health = 10; - actor->fwork[4] = 1000.0f + RAND_FLOAT_CENTERED(400.0f); - actor->state++; + this->info.bonus = 0; + this->health = 10; + this->fwork[4] = 1000.0f + RAND_FLOAT_CENTERED(400.0f); + this->state++; break; case 2: - Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].trueZpos, 1.0f, 10.0f, 0); - if (fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < actor->fwork[4]) { - Aquas_801A9728(actor, 50.0f, 10.0f, 8); - actor->state = 3; - actor->vel.y = 30.0f; + Math_SmoothStepToF(&this->obj.pos.z, gPlayer[0].trueZpos, 1.0f, 10.0f, 0); + if (fabsf(this->obj.pos.z - gPlayer[0].trueZpos) < this->fwork[4]) { + Aquas_801A9728(this, 50.0f, 10.0f, 8); + this->state = 3; + this->vel.y = 30.0f; } else if (((gGameFrameCount % 16) == 0)) { - func_effect_8007B8F8(actor->obj.pos.x, gGroundHeight + 30.0f, actor->obj.pos.z, 10.0f); + Effect_Effect364_Spawn(this->obj.pos.x, gGroundHeight + 30.0f, this->obj.pos.z, 10.0f); } break; case 3: - Math_SmoothStepToAngle(&actor->obj.rot.x, 270.0f, 1.0f, 100.0f, 0.0001f); - if (actor->obj.rot.x == 270.0f) { - actor->iwork[1] = RAND_FLOAT(10.0f); - actor->fwork[0] = D_i3_801C01F8[actor->iwork[1]]; - actor->state = 4; + Math_SmoothStepToAngle(&this->obj.rot.x, 270.0f, 1.0f, 100.0f, 0.0001f); + if (this->obj.rot.x == 270.0f) { + this->iwork[1] = RAND_FLOAT(10.0f); + this->fwork[0] = D_i3_801C01F8[this->iwork[1]]; + this->state = 4; } break; case 4: - Math_SmoothStepToF(&actor->vel.y, 0.0f, 1.0f, 4.0f, 0.0001f); - actor->vel.z = gPlayer[0].vel.z; - Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].trueZpos - actor->fwork[4], 0.1f, 100.0f, 0); - Math_SmoothStepToF(&actor->obj.pos.y, actor->fwork[0], 1.0f, D_i3_801C0224[actor->iwork[1]], 0); - actor->fwork[1] += 10.0f; - actor->vel.x = COS_DEG(actor->fwork[1]) * actor->iwork[1] * 0.1f; - if ((actor->fwork[0] - 1.0f) <= actor->obj.pos.y) { - actor->state = 5; + Math_SmoothStepToF(&this->vel.y, 0.0f, 1.0f, 4.0f, 0.0001f); + this->vel.z = gPlayer[0].vel.z; + Math_SmoothStepToF(&this->obj.pos.z, gPlayer[0].trueZpos - this->fwork[4], 0.1f, 100.0f, 0); + Math_SmoothStepToF(&this->obj.pos.y, this->fwork[0], 1.0f, D_i3_801C0224[this->iwork[1]], 0); + this->fwork[1] += 10.0f; + this->vel.x = COS_DEG(this->fwork[1]) * this->iwork[1] * 0.1f; + if ((this->fwork[0] - 1.0f) <= this->obj.pos.y) { + this->state = 5; } if (((gGameFrameCount % 8) == 0)) { - Aquas_801AC8A8(actor->obj.pos.x + RAND_FLOAT_CENTERED(100.0f), - actor->obj.pos.y + RAND_FLOAT_CENTERED(100.0f), - actor->obj.pos.z + RAND_FLOAT_CENTERED(100.0f), 1.0f, 1); + Aquas_Effect366_Spawn(this->obj.pos.x + RAND_FLOAT_CENTERED(100.0f), + this->obj.pos.y + RAND_FLOAT_CENTERED(100.0f), + this->obj.pos.z + RAND_FLOAT_CENTERED(100.0f), 1.0f, 1); } break; case 5: - actor->vel.z = gPlayer[0].vel.z; - Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].trueZpos - 1000.0f, 0.1f, 100.0f, 0); - Math_SmoothStepToF(&actor->vel.x, 0.0f, 1.0f, 2.0f, 0.001f); - Math_SmoothStepToAngle(&actor->obj.rot.x, D_i3_801C025C[actor->iwork[0]], 1.0f, 20.0f, 0); - if (actor->obj.rot.x == D_i3_801C025C[actor->iwork[0]]) { - actor->iwork[0]++; - if (actor->iwork[0] >= 2) { - sp88.x = gPlayer[0].pos.x - actor->obj.pos.x; - sp88.y = gPlayer[0].pos.y - actor->obj.pos.y; - sp88.z = gPlayer[0].trueZpos - actor->obj.pos.z; - actor->fwork[2] = Math_RadToDeg(Math_Atan2F(sp88.x, sp88.z)); - actor->fwork[3] = Math_RadToDeg(-Math_Atan2F(sp88.y, sqrtf(SQ(sp88.x) + SQ(sp88.z)))); - Matrix_RotateY(gCalcMatrix, actor->fwork[2] * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, actor->fwork[3] * M_DTOR, MTXF_APPLY); + this->vel.z = gPlayer[0].vel.z; + Math_SmoothStepToF(&this->obj.pos.z, gPlayer[0].trueZpos - 1000.0f, 0.1f, 100.0f, 0); + Math_SmoothStepToF(&this->vel.x, 0.0f, 1.0f, 2.0f, 0.001f); + Math_SmoothStepToAngle(&this->obj.rot.x, D_i3_801C025C[this->iwork[0]], 1.0f, 20.0f, 0); + if (this->obj.rot.x == D_i3_801C025C[this->iwork[0]]) { + this->iwork[0]++; + if (this->iwork[0] >= 2) { + sp88.x = gPlayer[0].pos.x - this->obj.pos.x; + sp88.y = gPlayer[0].pos.y - this->obj.pos.y; + sp88.z = gPlayer[0].trueZpos - this->obj.pos.z; + this->fwork[2] = Math_RadToDeg(Math_Atan2F(sp88.x, sp88.z)); + this->fwork[3] = Math_RadToDeg(-Math_Atan2F(sp88.y, sqrtf(SQ(sp88.x) + SQ(sp88.z)))); + Matrix_RotateY(gCalcMatrix, this->fwork[2] * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->fwork[3] * M_DTOR, MTXF_APPLY); sp7C.x = sp7C.y = 0.0f; sp7C.z = 40.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp7C, &sp70); - actor->vel.x = sp70.x; - actor->vel.y = sp70.y; - actor->vel.z = sp70.z; - actor->state = 6; + this->vel.x = sp70.x; + this->vel.y = sp70.y; + this->vel.z = sp70.z; + this->state = 6; } } break; case 6: - Math_SmoothStepToAngle(&actor->obj.rot.x, actor->fwork[3], 1.0f, 5.0f, 0); - Math_SmoothStepToAngle(&actor->obj.rot.y, actor->fwork[2], 1.0f, 5.0f, 0); + Math_SmoothStepToAngle(&this->obj.rot.x, this->fwork[3], 1.0f, 5.0f, 0); + Math_SmoothStepToAngle(&this->obj.rot.y, this->fwork[2], 1.0f, 5.0f, 0); if (((gGameFrameCount % 4) == 0)) { - Aquas_801AC8A8(actor->obj.pos.x + RAND_FLOAT_CENTERED(100.0f), - actor->obj.pos.y + RAND_FLOAT_CENTERED(100.0f), - actor->obj.pos.z + RAND_FLOAT_CENTERED(100.0f), 1.0f, 1); + Aquas_Effect366_Spawn(this->obj.pos.x + RAND_FLOAT_CENTERED(100.0f), + this->obj.pos.y + RAND_FLOAT_CENTERED(100.0f), + this->obj.pos.z + RAND_FLOAT_CENTERED(100.0f), 1.0f, 1); } break; case 7: for (i = 0; i < 8; i++) { - Aquas_SpawnDebris(&actor->vwork[i], &actor->vwork[8 + i], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(5.0f), - RAND_FLOAT_CENTERED(10.0f), 49, actor->scale, 200, i); - func_effect_8007BC7C(actor->vwork[i].x, actor->vwork[i].y, actor->vwork[i].z + 100.0f, 6.0f); + Aquas_SpawnDebris(&this->vwork[i], &this->vwork[8 + i], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(5.0f), + RAND_FLOAT_CENTERED(10.0f), 49, this->scale, 200, i); + Effect_Effect362_Spawn(this->vwork[i].x, this->vwork[i].y, this->vwork[i].z + 100.0f, 6.0f); } - actor->itemDrop = DROP_NONE; - Actor_Despawn(actor); + this->itemDrop = DROP_NONE; + Actor_Despawn(this); func_effect_800815DC(); - Object_Kill(&actor->obj, actor->sfxSource); - func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 6.0f); + Object_Kill(&this->obj, this->sfxSource); + func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 6.0f); break; } - if (actor->state >= 2) { - if (actor->state < 3) { - actor->animFrame++; + if (this->state >= 2) { + if (this->state < 3) { + this->animFrame++; } else { - actor->animFrame += 3; + this->animFrame += 3; } - if (actor->animFrame >= Animation_GetFrameCount(&D_AQ_6005954)) { - actor->animFrame = 0; + if (this->animFrame >= Animation_GetFrameCount(&D_AQ_6005954)) { + this->animFrame = 0; } } - if (actor->dmgType != DMG_NONE) { - actor->dmgType = DMG_NONE; - if (actor->health != 0) { - if (actor->damage == 31) { - actor->info.bonus = 1; - actor->health -= actor->damage; - if (actor->health <= 0) { - actor->health = 0; + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + if (this->health != 0) { + if (this->damage == 31) { + this->info.bonus = 1; + this->health -= this->damage; + if (this->health <= 0) { + this->health = 0; } - } else if (actor->damage == 30) { - for (i = 0, var_v0 = gActors; i < ARRAY_COUNT(gActors); i++, var_v0++) { - if ((var_v0->obj.status == OBJ_ACTIVE) && (var_v0->obj.id == OBJ_ACTOR_261) && - (var_v0->state == 1) && (i != actor->index) && - (fabsf(var_v0->obj.pos.x - actor->obj.pos.x) <= 300.0f) && - (fabsf(var_v0->obj.pos.z - actor->obj.pos.z) <= 300.0f)) { - var_v0->state = 2; + } else if (this->damage == 30) { + for (i = 0, sculpin = &gActors[0]; i < ARRAY_COUNT(gActors); i++, sculpin++) { + if ((sculpin->obj.status == OBJ_ACTIVE) && (sculpin->obj.id == OBJ_ACTOR_AQ_SCULPIN) && + (sculpin->state == 1) && (i != this->index) && + (fabsf(sculpin->obj.pos.x - this->obj.pos.x) <= 300.0f) && + (fabsf(sculpin->obj.pos.z - this->obj.pos.z) <= 300.0f)) { + sculpin->state = 2; } } - } else if ((actor->state >= 3) && (actor->state < 5)) { - actor->info.bonus = 1; - actor->timer_0C6 = 15; - actor->health -= actor->damage; - if (actor->health <= 0) { - actor->health = 0; + } else if ((this->state >= 3) && (this->state < 5)) { + this->info.bonus = 1; + this->timer_0C6 = 15; + this->health -= this->damage; + if (this->health <= 0) { + this->health = 0; } } } } } -bool Aquas_801B5C18(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { +bool Aquas_AqAnglerFish_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { f32 sp6C = 1.0f; f32 sp68 = 1.0f; f32 sp64 = 1.0f; @@ -3980,7 +3967,7 @@ bool Aquas_801B5C18(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th return false; } -void Aquas_801B5F68(s32 limbIndex, Vec3f* rot, void* thisx) { +void Aquas_AqAnglerFish_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp3C = { 0.0f, 0.0f, 0.0f }; Vec3f sp30; Vec3f sp24; @@ -4049,37 +4036,36 @@ void Aquas_801B5F68(s32 limbIndex, Vec3f* rot, void* thisx) { f32 D_i3_801C02C8[2] = { 255.0f, 68.0f }; s32 D_i3_801C02D0[2] = { 70, 100 }; -// OBJ_ACTOR_259 draw -void Aquas_Actor259_Draw(Actor* actor) { +void Aquas_AqAnglerFish_Draw(AqAnglerFish* this) { Vec3f sp40[30]; Matrix_Push(&gCalcMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Scale(gCalcMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY); - Animation_GetFrameData(&D_AQ_6002628, actor->animFrame, sp40); - Animation_DrawSkeleton(3, D_AQ_6002874, sp40, Aquas_801B5C18, Aquas_801B5F68, actor, gCalcMatrix); + Matrix_Scale(gCalcMatrix, this->scale, this->scale, this->scale, MTXF_APPLY); + Animation_GetFrameData(&D_AQ_6002628, this->animFrame, sp40); + Animation_DrawSkeleton(3, D_AQ_6002874, sp40, Aquas_AqAnglerFish_OverrideLimbDraw, Aquas_AqAnglerFish_PostLimbDraw, + this, gCalcMatrix); Matrix_Pop(&gGfxMatrix); Matrix_Pop(&gCalcMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, actor->fwork[8], actor->fwork[9], actor->fwork[10], MTXF_APPLY); - Matrix_Scale(gGfxMatrix, actor->fwork[5], actor->fwork[6], actor->fwork[7], MTXF_APPLY); + Matrix_Translate(gGfxMatrix, this->fwork[8], this->fwork[9], this->fwork[10], MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->fwork[5], this->fwork[6], this->fwork[7], MTXF_APPLY); RCP_SetupDL(&gMasterDisp, SETUPDL_49); - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) actor->iwork[12]); - gDPSetEnvColor(gMasterDisp++, 127, 127, 0, (s32) actor->iwork[12]); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) this->iwork[12]); + gDPSetEnvColor(gMasterDisp++, 127, 127, 0, (s32) this->iwork[12]); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); Matrix_Pop(&gGfxMatrix); } -void Aquas_801B6344(Actor* actor) { - actor->health = 200; - actor->iwork[13] = actor->fwork[4] = 255.0f; - actor->fwork[12] = actor->obj.rot.y; - actor->iwork[14] = actor->iwork[16] = actor->obj.rot.z; +void Aquas_AqAnglerFish_Init(AqAnglerFish* this) { + this->health = 200; + this->iwork[13] = this->fwork[4] = 255.0f; + this->fwork[12] = this->obj.rot.y; + this->iwork[14] = this->iwork[16] = this->obj.rot.z; } -// OBJ_ACTOR_259 action -void Aquas_Actor259_Update(Actor* actor) { +void Aquas_AqAnglerFish_Update(AqAnglerFish* this) { Actor* var_v0; s32 i; f32 spB4; @@ -4094,167 +4080,167 @@ void Aquas_Actor259_Update(Actor* actor) { Vec3f sp80; f32 var_rxd; - if (actor->health == 0) { + if (this->health == 0) { for (i = 0; i < 9; i++) { - Aquas_SpawnDebris(&actor->vwork[i], &actor->vwork[9 + i], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(5.0f), - RAND_FLOAT_CENTERED(10.0f), 48, actor->scale, 200, i); - func_effect_8007BC7C(actor->vwork[i].x, actor->vwork[i].y, actor->vwork[i].z, 10.0f); + Aquas_SpawnDebris(&this->vwork[i], &this->vwork[9 + i], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(5.0f), + RAND_FLOAT_CENTERED(10.0f), 48, this->scale, 200, i); + Effect_Effect362_Spawn(this->vwork[i].x, this->vwork[i].y, this->vwork[i].z, 10.0f); } func_effect_800815DC(); - func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 150.0f, 10.0f); - func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 150.0f, 10.0f); - func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 150.0f, 10.0f); + func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 150.0f, 10.0f); + func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 150.0f, 10.0f); + func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 150.0f, 10.0f); for (i = 0; i < 5; i++) { - func_effect_80081A8C(actor->obj.pos.x + RAND_FLOAT(i * 15.0f), actor->obj.pos.y + RAND_FLOAT(i * 3.0f), - actor->obj.pos.z + RAND_FLOAT(i * 5.0f), 1.0f + RAND_FLOAT(1.0f), 7); + func_effect_80081A8C(this->obj.pos.x + RAND_FLOAT(i * 15.0f), this->obj.pos.y + RAND_FLOAT(i * 3.0f), + this->obj.pos.z + RAND_FLOAT(i * 5.0f), 1.0f + RAND_FLOAT(1.0f), 7); } - actor->itemDrop = DROP_SILVER_RING_50p; - if (actor->iwork[16] != 0) { - actor->itemDrop = DROP_GOLD_RING_1; + this->itemDrop = DROP_SILVER_RING_50p; + if (this->iwork[16] != 0) { + this->itemDrop = DROP_GOLD_RING_1; } - Actor_Despawn(actor); - Object_Kill(&actor->obj, actor->sfxSource); - AUDIO_PLAY_SFX(NA_SE_OB_MINI_BOMB, actor->sfxSource, 4); - Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_AQ_ZAKO_DOWN); + Actor_Despawn(this); + Object_Kill(&this->obj, this->sfxSource); + AUDIO_PLAY_SFX(NA_SE_OB_MINI_BOMB, this->sfxSource, 4); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_AQ_ZAKO_DOWN); } - actor->fwork[5] = (actor->obj.pos.y * 0.01f) + 2.5f; - actor->fwork[6] = (actor->obj.pos.y * 0.003f) + 0.8f; - actor->fwork[7] = (actor->obj.pos.y * 0.001f) + 0.8f; + this->fwork[5] = (this->obj.pos.y * 0.01f) + 2.5f; + this->fwork[6] = (this->obj.pos.y * 0.003f) + 0.8f; + this->fwork[7] = (this->obj.pos.y * 0.001f) + 0.8f; - actor->iwork[12] = (actor->obj.pos.y * -0.24f) + 150.0f; - if (actor->iwork[12] < 30.0f) { - actor->iwork[12] = 30; + this->iwork[12] = (this->obj.pos.y * -0.24f) + 150.0f; + if (this->iwork[12] < 30.0f) { + this->iwork[12] = 30; } - actor->fwork[1] = (actor->obj.pos.y * 0.0032f) + 1.0f; - actor->fwork[2] = (actor->obj.pos.y * 0.0032f) + 1.5f; - actor->fwork[3] = (actor->obj.pos.y * 0.0032f) + 2.0f; + this->fwork[1] = (this->obj.pos.y * 0.0032f) + 1.0f; + this->fwork[2] = (this->obj.pos.y * 0.0032f) + 1.5f; + this->fwork[3] = (this->obj.pos.y * 0.0032f) + 2.0f; - actor->fwork[11] = actor->obj.pos.y + 300.0f; - if (actor->fwork[11] > 1200.0f) { - actor->fwork[11] = 1200.0f; + this->fwork[11] = this->obj.pos.y + 300.0f; + if (this->fwork[11] > 1200.0f) { + this->fwork[11] = 1200.0f; } - actor->animFrame++; - if (actor->animFrame >= Animation_GetFrameCount(&D_AQ_6002628)) { - actor->animFrame = 0; + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_AQ_6002628)) { + this->animFrame = 0; } - switch (actor->state) { + switch (this->state) { case 0: for (i = 0; i < 9; i++) { - actor->vwork[0 + i].x = actor->obj.pos.x; - actor->vwork[0 + i].y = actor->obj.pos.y; - actor->vwork[0 + i].z = actor->obj.pos.z; - actor->vwork[9 + i].x = actor->obj.rot.x; - actor->vwork[9 + i].y = actor->obj.rot.y; - actor->vwork[9 + i].z = actor->obj.rot.z; + this->vwork[0 + i].x = this->obj.pos.x; + this->vwork[0 + i].y = this->obj.pos.y; + this->vwork[0 + i].z = this->obj.pos.z; + this->vwork[9 + i].x = this->obj.rot.x; + this->vwork[9 + i].y = this->obj.rot.y; + this->vwork[9 + i].z = this->obj.rot.z; } - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); sp8C.x = sp8C.y = 0.0f; sp8C.z = -1400.0f; - if (actor->iwork[14] != 0) { + if (this->iwork[14] != 0) { sp8C.z = -5000.0f; } Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp8C, &sp80); - actor->fwork[15] = actor->obj.pos.x + sp80.x; - actor->fwork[16] = actor->obj.pos.z + sp80.z; + this->fwork[15] = this->obj.pos.x + sp80.x; + this->fwork[16] = this->obj.pos.z + sp80.z; - actor->state = 1; + this->state = 1; break; case 1: - if (actor->timer_0BC == 1) { - actor->iwork[15] = 1; + if (this->timer_0BC == 1) { + this->iwork[15] = 1; } - if (actor->iwork[15] != 0) { - if ((gPlayer[0].trueZpos + 300.0f) < actor->obj.pos.z) { - Object_Kill(&actor->obj, actor->sfxSource); + if (this->iwork[15] != 0) { + if ((gPlayer[0].trueZpos + 300.0f) < this->obj.pos.z) { + Object_Kill(&this->obj, this->sfxSource); } } else { if (((gGameFrameCount % 2) == 0)) { - for (i = 0, var_v0 = gActors; i < ARRAY_COUNT(gActors); i++, var_v0++) { - if ((var_v0->obj.status == OBJ_ACTIVE) && (var_v0->obj.id == OBJ_ACTOR_261) && + for (i = 0, var_v0 = &gActors[0]; i < ARRAY_COUNT(gActors); i++, var_v0++) { + if ((var_v0->obj.status == OBJ_ACTIVE) && (var_v0->obj.id == OBJ_ACTOR_AQ_SCULPIN) && (var_v0->state == 1) && - (fabsf(var_v0->obj.pos.x - actor->fwork[8]) <= (actor->fwork[5] * 48.0f)) && - (var_v0->obj.pos.y <= (actor->obj.pos.y + 50.0f)) && - (fabsf(var_v0->obj.pos.z - actor->fwork[10]) <= (actor->fwork[7] * 125.0f))) { + (fabsf(var_v0->obj.pos.x - this->fwork[8]) <= (this->fwork[5] * 48.0f)) && + (var_v0->obj.pos.y <= (this->obj.pos.y + 50.0f)) && + (fabsf(var_v0->obj.pos.z - this->fwork[10]) <= (this->fwork[7] * 125.0f))) { var_v0->state = 2; } } } - sp98 = sqrtf(SQ(actor->obj.pos.z - actor->fwork[16]) + SQ(actor->obj.pos.x - actor->fwork[15])); - actor->fwork[13] -= 20.0f; - actor->fwork[14] += 5.0f; + sp98 = sqrtf(SQ(this->obj.pos.z - this->fwork[16]) + SQ(this->obj.pos.x - this->fwork[15])); + this->fwork[13] -= 20.0f; + this->fwork[14] += 5.0f; - spB4 = SIN_DEG(actor->fwork[13]) * sp98 * 0.1f; - temp_fsc = COS_DEG(actor->fwork[14]) * sp98 * 0.8f; - temp_fscc = COS_DEG(actor->obj.rot.y) * temp_fsc; - temp2 = -SIN_DEG(actor->obj.rot.y) * temp_fsc; + spB4 = SIN_DEG(this->fwork[13]) * sp98 * 0.1f; + temp_fsc = COS_DEG(this->fwork[14]) * sp98 * 0.8f; + temp_fscc = COS_DEG(this->obj.rot.y) * temp_fsc; + temp2 = -SIN_DEG(this->obj.rot.y) * temp_fsc; - temp_fscc = Math_Atan2F(actor->obj.pos.x - actor->fwork[15] + temp_fscc, - actor->obj.pos.z - actor->fwork[16] + temp2); - temp_fsc = -Math_Atan2F(actor->obj.pos.y - spB4, sp98); + temp_fscc = Math_Atan2F(this->obj.pos.x - this->fwork[15] + temp_fscc, + this->obj.pos.z - this->fwork[16] + temp2); + temp_fsc = -Math_Atan2F(this->obj.pos.y - spB4, sp98); temp_fscc = Math_RadToDeg(temp_fscc); - Math_SmoothStepToAngle(&actor->obj.rot.y, temp_fscc, 0.1f, 100.0f, 0.001f); + Math_SmoothStepToAngle(&this->obj.rot.y, temp_fscc, 0.1f, 100.0f, 0.001f); temp_fscc = Math_RadToDeg(temp_fsc); - if (actor->obj.pos.y >= 1000.0f) { + if (this->obj.pos.y >= 1000.0f) { temp_fscc = 0.0f; } - Math_SmoothStepToAngle(&actor->obj.rot.x, temp_fscc, 0.1f, 100.0f, 0.001f); - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); + Math_SmoothStepToAngle(&this->obj.rot.x, temp_fscc, 0.1f, 100.0f, 0.001f); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); sp8C.x = sp8C.y = 0.0f; sp8C.z = 10.0f; - if (actor->iwork[14] != 0) { + if (this->iwork[14] != 0) { sp8C.z = 30.0f; } Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp8C, &sp80); - actor->vel.x = sp80.x; - actor->vel.y = sp80.y; - actor->vel.z = sp80.z; + this->vel.x = sp80.x; + this->vel.y = sp80.y; + this->vel.z = sp80.z; - if (actor->iwork[15] != 0) { - actor->vel.x = actor->vel.y = actor->vel.z = 0.0f; + if (this->iwork[15] != 0) { + this->vel.x = this->vel.y = this->vel.z = 0.0f; } - if ((actor->iwork[14] != 0) && (actor->obj.pos.z < (gPlayer[0].trueZpos - 2000.0f))) { - actor->iwork[14] = 0; - actor->timer_0BC = 500; + if ((this->iwork[14] != 0) && (this->obj.pos.z < (gPlayer[0].trueZpos - 2000.0f))) { + this->iwork[14] = 0; + this->timer_0BC = 500; } } break; } - if (actor->dmgType != DMG_NONE) { - actor->dmgType = DMG_NONE; - if ((actor->health != 0) && (actor->dmgPart == 0)) { - actor->health -= actor->damage; - actor->timer_0C6 = 30; + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + if ((this->health != 0) && (this->dmgPart == 0)) { + this->health -= this->damage; + this->timer_0C6 = 30; - AUDIO_PLAY_SFX(NA_SE_EN_AQ_ZAKO_DAMAGE, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_AQ_ZAKO_DAMAGE, this->sfxSource, 4); - if (actor->health <= 0) { - actor->health = 0; - BonusText_Display(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 200.0f, 3); + if (this->health <= 0) { + this->health = 0; + BonusText_Display(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 200.0f, 3); gHitCount += 4; D_ctx_80177850 = 15; } @@ -4262,30 +4248,29 @@ void Aquas_Actor259_Update(Actor* actor) { } } -void Aquas_801B6E54(Actor* actor) { +void Aquas_AqSpindlyFish_Init(AqSpindlyFish* this) { s32 i; for (i = 0; i < 15; i++) { - actor->vwork[0 + i].x = actor->obj.pos.x; - actor->vwork[0 + i].y = actor->obj.pos.y; - actor->vwork[0 + i].z = actor->obj.pos.z; + this->vwork[0 + i].x = this->obj.pos.x; + this->vwork[0 + i].y = this->obj.pos.y; + this->vwork[0 + i].z = this->obj.pos.z; - actor->vwork[15 + i].x = actor->obj.rot.x; - actor->vwork[15 + i].y = actor->obj.rot.y; - actor->vwork[15 + i].z = actor->obj.rot.z; + this->vwork[15 + i].x = this->obj.rot.x; + this->vwork[15 + i].y = this->obj.rot.y; + this->vwork[15 + i].z = this->obj.rot.z; } - actor->health = 0; + this->health = 0; - if (actor->obj.rot.z != 0) { - actor->obj.rot.z = 0.0f; - actor->state = 1; + if (this->obj.rot.z != 0) { + this->obj.rot.z = 0.0f; + this->state = 1; } - actor->fwork[4] = actor->obj.pos.z; + this->fwork[4] = this->obj.pos.z; } -// OBJ_ACTOR_262 action -void Aquas_Actor262_Update(Actor* actor) { +void Aquas_AqSpindlyFish_Update(AqSpindlyFish* this) { s32 i; f32 temp_dx; f32 temp_dy; @@ -4295,117 +4280,117 @@ void Aquas_Actor262_Update(Actor* actor) { Vec3f sp9C; Vec3f sp90; - if (actor->health == -100) { - actor->itemDrop = DROP_SILVER_RING_50p; - Actor_Despawn(actor); + if (this->health == -100) { + this->itemDrop = DROP_SILVER_RING_50p; + Actor_Despawn(this); for (i = 0; i < 15; i++) { - Aquas_SpawnDebris(&actor->vwork[i], &actor->vwork[15 + i], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(5.0f), - RAND_FLOAT_CENTERED(10.0f), 51, actor->scale, 200, i); + Aquas_SpawnDebris(&this->vwork[i], &this->vwork[15 + i], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(5.0f), + RAND_FLOAT_CENTERED(10.0f), 51, this->scale, 200, i); func_effect_800815DC(); - func_effect_8007D0E0(actor->vwork[i].x, actor->vwork[i].y, actor->vwork[i].z + 100.0f, 6.0f); + func_effect_8007D0E0(this->vwork[i].x, this->vwork[i].y, this->vwork[i].z + 100.0f, 6.0f); } - Object_Kill(&actor->obj, actor->sfxSource); - Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_AQ_ZAKO_DOWN); + Object_Kill(&this->obj, this->sfxSource); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_AQ_ZAKO_DOWN); } - switch (actor->state) { + switch (this->state) { case 0: - if (actor->timer_0BC == 0) { - actor->timer_0BC = 200; + if (this->timer_0BC == 0) { + this->timer_0BC = 200; - actor->fwork[1] = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(800.0f); - actor->fwork[2] = gPlayer[0].pos.y + 50.0f + RAND_FLOAT(100.0f); - actor->fwork[3] = gPlayer[0].trueZpos - 1500.0f; + this->fwork[1] = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(800.0f); + this->fwork[2] = gPlayer[0].pos.y + 50.0f + RAND_FLOAT(100.0f); + this->fwork[3] = gPlayer[0].trueZpos - 1500.0f; - if (actor->fwork[1] > 700.0f) { - actor->fwork[1] = 700.0f; + if (this->fwork[1] > 700.0f) { + this->fwork[1] = 700.0f; } - if (actor->fwork[1] < -700.0f) { - actor->fwork[1] = -700.0f; + if (this->fwork[1] < -700.0f) { + this->fwork[1] = -700.0f; } if (Rand_ZeroOne() < 0.2f) { - actor->fwork[3] = gPlayer[0].trueZpos - 800.0f; - actor->fwork[1] = gPlayer[0].pos.x; - actor->fwork[2] = gPlayer[0].pos.y + 50.0f; + this->fwork[3] = gPlayer[0].trueZpos - 800.0f; + this->fwork[1] = gPlayer[0].pos.x; + this->fwork[2] = gPlayer[0].pos.y + 50.0f; } - if (fabsf(actor->fwork[4] - actor->obj.pos.z) >= 20000.0f) { - actor->fwork[3] = -10000.0f; + if (fabsf(this->fwork[4] - this->obj.pos.z) >= 20000.0f) { + this->fwork[3] = -10000.0f; } } - actor->fwork[3] += gPlayer[0].vel.z; + this->fwork[3] += gPlayer[0].vel.z; - temp_dx = actor->fwork[1] - actor->obj.pos.x; - temp_dy = actor->fwork[2] - actor->obj.pos.y; - temp_dz = actor->fwork[3] - actor->obj.pos.z; + temp_dx = this->fwork[1] - this->obj.pos.x; + temp_dy = this->fwork[2] - this->obj.pos.y; + temp_dz = this->fwork[3] - this->obj.pos.z; spA8 = Math_RadToDeg(Math_Atan2F(temp_dx, temp_dz)); temp_dz = Math_RadToDeg(-Math_Atan2F(temp_dy, sqrtf(SQ(temp_dx) + SQ(temp_dz)))); - temp_dy = Math_SmoothStepToAngle(&actor->obj.rot.y, spA8, 0.1f, 1.0f, 0); - Math_SmoothStepToAngle(&actor->obj.rot.x, temp_dz, 0.1f, 1.0f, 0); + temp_dy = Math_SmoothStepToAngle(&this->obj.rot.y, spA8, 0.1f, 1.0f, 0); + Math_SmoothStepToAngle(&this->obj.rot.x, temp_dz, 0.1f, 1.0f, 0); temp_dz = 340.0f; if (temp_dy < 0.0f) { temp_dz = 20.0f; } - Math_SmoothStepToAngle(&actor->obj.rot.z, temp_dz, 0.1f, 1.0f, 0.f); - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); + Math_SmoothStepToAngle(&this->obj.rot.z, temp_dz, 0.1f, 1.0f, 0.f); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); sp9C.x = sp9C.y = 0.0f; sp9C.z = 10.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp9C, &sp90); - actor->vel.x = sp90.x; - actor->vel.y = sp90.y; - actor->vel.z = sp90.z - 20.0f; + this->vel.x = sp90.x; + this->vel.y = sp90.y; + this->vel.z = sp90.z - 20.0f; break; case 1: - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); sp9C.y = sp9C.x = 0.0f; sp9C.z = 19.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp9C, &sp90); - actor->vel.x = sp90.x; - actor->vel.y = sp90.y; - actor->vel.z = sp90.z; + this->vel.x = sp90.x; + this->vel.y = sp90.y; + this->vel.z = sp90.z; break; } - if (((gGameFrameCount % 4) == 0)) { + if ((gGameFrameCount % 4) == 0) { for (i = 0; i < 3; i++) { - func_effect_80081A8C(actor->obj.pos.x + RAND_FLOAT_CENTERED(70.0f), - actor->obj.pos.y + RAND_FLOAT_CENTERED(70.0f), - actor->obj.pos.z + RAND_FLOAT_CENTERED(70.0f), 1.0f, 1); + func_effect_80081A8C(this->obj.pos.x + RAND_FLOAT_CENTERED(70.0f), + this->obj.pos.y + RAND_FLOAT_CENTERED(70.0f), + this->obj.pos.z + RAND_FLOAT_CENTERED(70.0f), 1.0f, 1); } } - actor->animFrame++; - if (Animation_GetFrameCount(&D_AQ_60260EC) < actor->animFrame) { - actor->animFrame = 0; + this->animFrame++; + if (Animation_GetFrameCount(&D_AQ_60260EC) < this->animFrame) { + this->animFrame = 0; } - if (actor->dmgType != DMG_NONE) { - actor->dmgType = DMG_NONE; - if (actor->health > -100) { - actor->timer_0C6 = 15; - actor->health -= actor->damage; + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + if (this->health > -100) { + this->timer_0C6 = 15; + this->health -= this->damage; for (i = 0; i < 10; i++) { - func_effect_80081A8C(actor->hitPos.x + RAND_FLOAT_CENTERED(70.0f), - actor->hitPos.y + RAND_FLOAT_CENTERED(70.0f), - actor->hitPos.z + RAND_FLOAT_CENTERED(70.0f), 1.0f, 1); + func_effect_80081A8C(this->hitPos.x + RAND_FLOAT_CENTERED(70.0f), + this->hitPos.y + RAND_FLOAT_CENTERED(70.0f), + this->hitPos.z + RAND_FLOAT_CENTERED(70.0f), 1.0f, 1); } - AUDIO_PLAY_SFX(NA_SE_EN_AQ_ZAKO_DAMAGE, actor->sfxSource, 4); - if (actor->health <= -100) { - actor->health = -100; - BonusText_Display(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 200.0f, 3); + AUDIO_PLAY_SFX(NA_SE_EN_AQ_ZAKO_DAMAGE, this->sfxSource, 4); + if (this->health <= -100) { + this->health = -100; + BonusText_Display(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 200.0f, 3); gHitCount += 4; D_ctx_80177850 = 15; } @@ -4413,7 +4398,7 @@ void Aquas_Actor262_Update(Actor* actor) { } } -bool Aquas_801B76EC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { +bool Aquas_AqSpindlyFish_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); if ((limbIndex >= 4) && (limbIndex < 14)) { gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); @@ -4421,7 +4406,7 @@ bool Aquas_801B76EC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th return false; } -void Aquas_801B7754(s32 limbIndex, Vec3f* rot, void* thisx) { +void Aquas_AqSpindlyFish_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp24 = { 0.0f, 0.0f, 0.0f }; Actor* this = (Actor*) thisx; @@ -4505,46 +4490,45 @@ void Aquas_801B7754(s32 limbIndex, Vec3f* rot, void* thisx) { } } -// OBJ_ACTOR_262 draw -void Aquas_Actor262_Draw(Actor* actor) { +void Aquas_AqSpindlyFish_Draw(Actor* this) { Vec3f sp30[30]; RCP_SetupDL(&gMasterDisp, SETUPDL_57); - if ((actor->timer_0C6 % 2) != 0) { + if ((this->timer_0C6 % 2) != 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_61); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } - Animation_GetFrameData(&D_AQ_60260EC, actor->animFrame, sp30); - Animation_DrawSkeleton(3, D_AQ_60263F8, sp30, Aquas_801B76EC, Aquas_801B7754, actor, gCalcMatrix); + Animation_GetFrameData(&D_AQ_60260EC, this->animFrame, sp30); + Animation_DrawSkeleton(3, D_AQ_60263F8, sp30, Aquas_AqSpindlyFish_OverrideLimbDraw, + Aquas_AqSpindlyFish_PostLimbDraw, this, gCalcMatrix); } -void Aquas_801B7AF0(Actor* actor) { +void Aquas_AqGaroa_Init(AqGaroa* this) { s32 i; - actor->fwork[4] = 10.0f; - actor->fwork[3] = -1000.0f; - actor->fwork[2] = 30.0f; + this->fwork[4] = 10.0f; + this->fwork[3] = -1000.0f; + this->fwork[2] = 30.0f; - actor->obj.pos.y = 150.0f; + this->obj.pos.y = 150.0f; - actor->fwork[5] = 20.0f; - actor->fwork[6] = 20.0f; + this->fwork[5] = 20.0f; + this->fwork[6] = 20.0f; - actor->health = 60; + this->health = 60; for (i = 0; i < 10; i++) { - actor->vwork[0 + i].x = actor->obj.pos.x; - actor->vwork[0 + i].y = actor->obj.pos.y; - actor->vwork[0 + i].z = actor->obj.pos.z; + this->vwork[0 + i].x = this->obj.pos.x; + this->vwork[0 + i].y = this->obj.pos.y; + this->vwork[0 + i].z = this->obj.pos.z; - actor->vwork[10 + i].x = actor->obj.rot.x; - actor->vwork[10 + i].y = actor->obj.rot.y; - actor->vwork[10 + i].z = actor->obj.rot.z; + this->vwork[10 + i].x = this->obj.rot.x; + this->vwork[10 + i].y = this->obj.rot.y; + this->vwork[10 + i].z = this->obj.rot.z; } } -// OBJ_ACTOR_260 action -void Aquas_Actor260_Update(Actor* actor) { +void Aquas_AqGaroa_Update(AqGaroa* this) { s32 i; s32 j; f32 spAC; @@ -4556,145 +4540,145 @@ void Aquas_Actor260_Update(Actor* actor) { Vec3f sp84; Effect* effect; - if (actor->health == 0) { + if (this->health == 0) { for (i = 0; i < 10; i++) { - func_effect_80081A8C(actor->obj.pos.x + RAND_FLOAT(i * 15.0f), actor->obj.pos.y + RAND_FLOAT(i * 3.0f), - actor->obj.pos.z + RAND_FLOAT(i * 5.0f), 1.0f + RAND_FLOAT(0.5f), 7); + func_effect_80081A8C(this->obj.pos.x + RAND_FLOAT(i * 15.0f), this->obj.pos.y + RAND_FLOAT(i * 3.0f), + this->obj.pos.z + RAND_FLOAT(i * 5.0f), 1.0f + RAND_FLOAT(0.5f), 7); } for (i = 0; i < 10; i++) { - Aquas_SpawnDebris(&actor->vwork[0 + i], &actor->vwork[10 + i], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(5.0f), - RAND_FLOAT_CENTERED(10.0f), 52, actor->scale, 200, i); - func_effect_8007BC7C(actor->vwork[0 + i].x, actor->vwork[0 + i].y, actor->vwork[0 + i].z + 100.0f, 6.0f); + Aquas_SpawnDebris(&this->vwork[0 + i], &this->vwork[10 + i], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(5.0f), + RAND_FLOAT_CENTERED(10.0f), 52, this->scale, 200, i); + Effect_Effect362_Spawn(this->vwork[0 + i].x, this->vwork[0 + i].y, this->vwork[0 + i].z + 100.0f, 6.0f); } for (i = 0; i < 2; i++) { - if (actor->iwork[2 + i] != 0) { - j = actor->iwork[2 + i] - 1; + if (this->iwork[2 + i] != 0) { + j = this->iwork[2 + i] - 1; effect = &gEffects[j]; if ((effect->obj.id == OBJ_EFFECT_395) && (effect->state == 2) && (effect->timer_50 != 0)) { effect->unk_44 = 3; - actor->iwork[2 + i] = 0; + this->iwork[2 + i] = 0; } } } func_effect_800815DC(); - func_effect_8007D0E0(actor->vwork[7].x, actor->vwork[7].y, actor->vwork[7].z, 5.0f); - actor->itemDrop = DROP_SILVER_RING_25p; - Actor_Despawn(actor); - Object_Kill(&actor->obj, actor->sfxSource); - Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_AQ_ZAKO_DOWN); + func_effect_8007D0E0(this->vwork[7].x, this->vwork[7].y, this->vwork[7].z, 5.0f); + this->itemDrop = DROP_SILVER_RING_25p; + Actor_Despawn(this); + Object_Kill(&this->obj, this->sfxSource); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_AQ_ZAKO_DOWN); } - if (actor->state != 6) { - spAC = gPlayer[0].pos.x - actor->obj.pos.x; - Math_SmoothStepToAngle(&actor->obj.rot.y, - Math_RadToDeg(Math_Atan2F(spAC, gPlayer[0].trueZpos - actor->obj.pos.z)), 1.0f, 5.0f, + if (this->state != 6) { + spAC = gPlayer[0].pos.x - this->obj.pos.x; + Math_SmoothStepToAngle(&this->obj.rot.y, + Math_RadToDeg(Math_Atan2F(spAC, gPlayer[0].trueZpos - this->obj.pos.z)), 1.0f, 5.0f, 0.001f); } - if (((actor->state >= 2) && (actor->state < 4)) || (actor->state >= 5)) { - Math_SmoothStepToF(&actor->fwork[4], 10.0f, 0.2f, 20.0f, 0); - Math_SmoothStepToF(&actor->fwork[5], 20.0f, 0.2f, 20.0f, 0); - Math_SmoothStepToF(&actor->fwork[6], 20.0f, 0.2f, 20.0f, 0); + if (((this->state >= 2) && (this->state < 4)) || (this->state >= 5)) { + Math_SmoothStepToF(&this->fwork[4], 10.0f, 0.2f, 20.0f, 0); + Math_SmoothStepToF(&this->fwork[5], 20.0f, 0.2f, 20.0f, 0); + Math_SmoothStepToF(&this->fwork[6], 20.0f, 0.2f, 20.0f, 0); } - if ((actor->state >= 4) && (actor->state < 5)) { - Math_SmoothStepToF(&actor->fwork[4], 159.0f, 0.1f, 10.0f, 0); - Math_SmoothStepToF(&actor->fwork[5], 159.0f, 0.1f, 10.0f, 0); - Math_SmoothStepToF(&actor->fwork[6], 255.0f, 0.1f, 10.0f, 0); + if ((this->state >= 4) && (this->state < 5)) { + Math_SmoothStepToF(&this->fwork[4], 159.0f, 0.1f, 10.0f, 0); + Math_SmoothStepToF(&this->fwork[5], 159.0f, 0.1f, 10.0f, 0); + Math_SmoothStepToF(&this->fwork[6], 255.0f, 0.1f, 10.0f, 0); } - if (((actor->state < 5) || (actor->state == 7)) && (actor->health != 0) && ((gGameFrameCount % 16) == 0)) { - func_effect_8007B8F8(actor->vwork[22].x, gGroundHeight, actor->vwork[22].z, 5.0f); + if (((this->state < 5) || (this->state == 7)) && (this->health != 0) && ((gGameFrameCount % 16) == 0)) { + Effect_Effect364_Spawn(this->vwork[22].x, gGroundHeight, this->vwork[22].z, 5.0f); } - Math_SmoothStepToF(&actor->fwork[1], actor->fwork[2], 0.1f, 2.0f, 0.00001f); - Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].cam.eye.z - gPathProgress + actor->fwork[3], 0.1f, actor->fwork[1], + Math_SmoothStepToF(&this->fwork[1], this->fwork[2], 0.1f, 2.0f, 0.00001f); + Math_SmoothStepToF(&this->obj.pos.z, gPlayer[0].cam.eye.z - gPathProgress + this->fwork[3], 0.1f, this->fwork[1], 0.00001); - if ((actor->state == 1) && (fabsf(actor->fwork[7] - actor->obj.pos.z) >= 10000.0f)) { - actor->timer_0C0 = 20; - actor->state = 5; + if ((this->state == 1) && (fabsf(this->fwork[7] - this->obj.pos.z) >= 10000.0f)) { + this->timer_0C0 = 20; + this->state = 5; } - switch (actor->state) { + switch (this->state) { case 0: - actor->timer_0BE = (s32) (100.0f + RAND_FLOAT(150.0f)); - actor->state = 1; - actor->fwork[7] = actor->obj.pos.z; + this->timer_0BE = (s32) (100.0f + RAND_FLOAT(150.0f)); + this->state = 1; + this->fwork[7] = this->obj.pos.z; break; case 1: - if (actor->timer_0BC != 0) { - Math_SmoothStepToF(&actor->fwork[4], 255.0f, 0.1f, 50.0f, 0); - Math_SmoothStepToF(&actor->fwork[5], 255.0f, 0.1f, 50.0f, 0); - Math_SmoothStepToF(&actor->fwork[6], 0.0f, 0.1f, 50.0f, 0); + if (this->timer_0BC != 0) { + Math_SmoothStepToF(&this->fwork[4], 255.0f, 0.1f, 50.0f, 0); + Math_SmoothStepToF(&this->fwork[5], 255.0f, 0.1f, 50.0f, 0); + Math_SmoothStepToF(&this->fwork[6], 0.0f, 0.1f, 50.0f, 0); } else { - Math_SmoothStepToF(&actor->fwork[4], 10.0f, 0.2f, 20.0f, 0); - Math_SmoothStepToF(&actor->fwork[5], 20.0f, 0.2f, 20.0f, 0); - Math_SmoothStepToF(&actor->fwork[6], 20.0f, 0.2f, 20.0f, 0); - if (actor->timer_0BE == 0) { - actor->iwork[1] = 1; - actor->state = 2; + Math_SmoothStepToF(&this->fwork[4], 10.0f, 0.2f, 20.0f, 0); + Math_SmoothStepToF(&this->fwork[5], 20.0f, 0.2f, 20.0f, 0); + Math_SmoothStepToF(&this->fwork[6], 20.0f, 0.2f, 20.0f, 0); + if (this->timer_0BE == 0) { + this->iwork[1] = 1; + this->state = 2; } } - if (((gGameFrameCount % 4) == 0)) { - Aquas_801AC8A8(actor->vwork[7].x + RAND_FLOAT_CENTERED(120.0f), - actor->vwork[7].y + RAND_FLOAT_CENTERED(50.0f), - actor->vwork[7].z + 100.0f + RAND_FLOAT_CENTERED(100.0f), 1.0f, 0); + if ((gGameFrameCount % 4) == 0) { + Aquas_Effect366_Spawn(this->vwork[7].x + RAND_FLOAT_CENTERED(120.0f), + this->vwork[7].y + RAND_FLOAT_CENTERED(50.0f), + this->vwork[7].z + 100.0f + RAND_FLOAT_CENTERED(100.0f), 1.0f, 0); } break; case 2: - actor->animFrame += actor->iwork[1]; - if (actor->animFrame >= Animation_GetFrameCount(&D_AQ_6024F80)) { - actor->animFrame = 0; - actor->timer_0BE = 0; + this->animFrame += this->iwork[1]; + if (this->animFrame >= Animation_GetFrameCount(&D_AQ_6024F80)) { + this->animFrame = 0; + this->timer_0BE = 0; - if (actor->iwork[1] >= 2) { - actor->timer_0BE = 30; + if (this->iwork[1] >= 2) { + this->timer_0BE = 30; } for (i = 0; i < 10; i++) { - Aquas_801AC8A8(actor->vwork[7].x + RAND_FLOAT_CENTERED(120.0f), - actor->vwork[7].y + RAND_FLOAT_CENTERED(50.0f), - actor->vwork[7].z + 100.0f + RAND_FLOAT_CENTERED(100.0f), 2.0f, 0); + Aquas_Effect366_Spawn(this->vwork[7].x + RAND_FLOAT_CENTERED(120.0f), + this->vwork[7].y + RAND_FLOAT_CENTERED(50.0f), + this->vwork[7].z + 100.0f + RAND_FLOAT_CENTERED(100.0f), 2.0f, 0); } - actor->state = 3; + this->state = 3; } break; case 3: - if (actor->timer_0BE == 0) { + if (this->timer_0BE == 0) { for (i = 0; i < 2; i++) { - actor->iwork[2 + i] = func_effect_80081B24(actor->vwork[20 + i].x, actor->vwork[20 + i].y, - actor->vwork[20 + i].z, 0.1f) + - 1; + this->iwork[2 + i] = func_effect_80081B24(this->vwork[20 + i].x, this->vwork[20 + i].y, + this->vwork[20 + i].z, 0.1f) + + 1; } - actor->timer_0C0 = 10; - AUDIO_PLAY_SFX(NA_SE_EN_WT_SPARK_CHARGE, actor->sfxSource, 4); - actor->state = 4; + this->timer_0C0 = 10; + AUDIO_PLAY_SFX(NA_SE_EN_WT_SPARK_CHARGE, this->sfxSource, 4); + this->state = 4; } break; case 4: - actor->iwork[5]++; - if (actor->timer_0C0 == 0) { - Audio_KillSfxBySource(actor->sfxSource); - actor->animFrame++; - if (Animation_GetFrameCount(&D_AQ_602AC28) < actor->animFrame) { - actor->animFrame = Animation_GetFrameCount(&D_AQ_6024F80) - 1; - actor->state = 7; + this->iwork[5]++; + if (this->timer_0C0 == 0) { + Audio_KillSfxBySource(this->sfxSource); + this->animFrame++; + if (Animation_GetFrameCount(&D_AQ_602AC28) < this->animFrame) { + this->animFrame = Animation_GetFrameCount(&D_AQ_6024F80) - 1; + this->state = 7; } } - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); - if ((actor->animFrame < 21) && (actor->state == 4) && (actor->iwork[3] != 0)) { - j = actor->iwork[3] - 1; + if ((this->animFrame < 21) && (this->state == 4) && (this->iwork[3] != 0)) { + j = this->iwork[3] - 1; effect = &gEffects[j]; - if (actor->animFrame == 20) { + if (this->animFrame == 20) { spAC = gPlayer[0].pos.x - effect->obj.pos.x; temp_dy = gPlayer[0].pos.y - effect->obj.pos.y; temp_dz = gPlayer[0].trueZpos - 50.0f - effect->obj.pos.z; @@ -4716,19 +4700,19 @@ void Aquas_Actor260_Update(Actor* actor) { effect->unk_44 = 2; effect->timer_50 = 100; - actor->iwork[3] = 0; - AUDIO_PLAY_SFX(NA_SE_EN_WT_THROW, actor->sfxSource, 4); + this->iwork[3] = 0; + AUDIO_PLAY_SFX(NA_SE_EN_WT_THROW, this->sfxSource, 4); } else { - effect->obj.pos.x = actor->vwork[21].x; - effect->obj.pos.y = actor->vwork[21].y; - effect->obj.pos.z = actor->vwork[21].z; + effect->obj.pos.x = this->vwork[21].x; + effect->obj.pos.y = this->vwork[21].y; + effect->obj.pos.z = this->vwork[21].z; } } - if ((actor->animFrame < 58) && (actor->state == 4) && (actor->iwork[2] != 0)) { - j = actor->iwork[2] - 1; + if ((this->animFrame < 58) && (this->state == 4) && (this->iwork[2] != 0)) { + j = this->iwork[2] - 1; effect = &gEffects[j]; - if (actor->animFrame == 57) { + if (this->animFrame == 57) { spAC = gPlayer[0].pos.x - effect->obj.pos.x; temp_dy = gPlayer[0].pos.y - effect->obj.pos.y; temp_dz = gPlayer[0].trueZpos - 50.0f - effect->obj.pos.z; @@ -4750,28 +4734,28 @@ void Aquas_Actor260_Update(Actor* actor) { effect->unk_44 = 2; effect->timer_50 = 100; - actor->iwork[2] = 0; + this->iwork[2] = 0; } else { - effect->obj.pos.x = actor->vwork[20].x; - effect->obj.pos.y = actor->vwork[20].y; - effect->obj.pos.z = actor->vwork[20].z; + effect->obj.pos.x = this->vwork[20].x; + effect->obj.pos.y = this->vwork[20].y; + effect->obj.pos.z = this->vwork[20].z; } } break; case 5: - Math_SmoothStepToAngle(&actor->obj.rot.x, 40.0f, 0.1f, 10.0f, 0); + Math_SmoothStepToAngle(&this->obj.rot.x, 40.0f, 0.1f, 10.0f, 0); - actor->animFrame++; - if (actor->animFrame >= Animation_GetFrameCount(&D_AQ_6024F80)) { - actor->animFrame = Animation_GetFrameCount(&D_AQ_6024F80) - 1; + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_AQ_6024F80)) { + this->animFrame = Animation_GetFrameCount(&D_AQ_6024F80) - 1; } - if (actor->timer_0C0 == 0) { - temp_dy = gPlayer[0].pos.y - 50.0f - actor->obj.pos.y; - temp_dz = gPlayer[0].trueZpos - actor->obj.pos.z; + if (this->timer_0C0 == 0) { + temp_dy = gPlayer[0].pos.y - 50.0f - this->obj.pos.y; + temp_dz = gPlayer[0].trueZpos - this->obj.pos.z; temp1 = Math_RadToDeg(-Math_Atan2F(temp_dy, sqrtf(SQ(spAC) + SQ(temp_dz)))); - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, M_DTOR * temp1, MTXF_APPLY); sp90.x = sp90.y = 0.0f; @@ -4779,72 +4763,72 @@ void Aquas_Actor260_Update(Actor* actor) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp90, &sp84); - actor->vel.x = sp84.x; - actor->vel.y = sp84.y; - actor->vel.z = sp84.z; - actor->state = 6; + this->vel.x = sp84.x; + this->vel.y = sp84.y; + this->vel.z = sp84.z; + this->state = 6; } break; case 6: - actor->animFrame++; - if (actor->animFrame >= Animation_GetFrameCount(&D_AQ_6024F80)) { - actor->animFrame = Animation_GetFrameCount(&D_AQ_6024F80) - 1; + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_AQ_6024F80)) { + this->animFrame = Animation_GetFrameCount(&D_AQ_6024F80) - 1; } - Math_SmoothStepToAngle(&actor->obj.rot.x, 30.0f, 0.1f, 10.0f, 0); + Math_SmoothStepToAngle(&this->obj.rot.x, 30.0f, 0.1f, 10.0f, 0); if (((gGameFrameCount % 2) == 0)) { - Aquas_801AC8A8(actor->vwork[7].x + RAND_FLOAT_CENTERED(120.0f), - actor->vwork[7].y + RAND_FLOAT_CENTERED(50.0f), - actor->vwork[7].z + RAND_FLOAT_CENTERED(100.0f), 2.0f, 0); + Aquas_Effect366_Spawn(this->vwork[7].x + RAND_FLOAT_CENTERED(120.0f), + this->vwork[7].y + RAND_FLOAT_CENTERED(50.0f), + this->vwork[7].z + RAND_FLOAT_CENTERED(100.0f), 2.0f, 0); } break; case 7: - actor->animFrame--; - if (actor->animFrame <= 0) { - actor->animFrame = 0; - actor->timer_0BE = (s32) (100.0f + RAND_FLOAT(150.0f)); - actor->state = 1; + this->animFrame--; + if (this->animFrame <= 0) { + this->animFrame = 0; + this->timer_0BE = (s32) (100.0f + RAND_FLOAT(150.0f)); + this->state = 1; } break; } - if (actor->iwork[0] != 0) { - actor->health = 0; + if (this->iwork[0] != 0) { + this->health = 0; } - if (actor->dmgType != DMG_NONE) { - actor->dmgType = DMG_NONE; - if (actor->health != 0) { - actor->info.bonus = 0; - if (actor->damage == 31) { - if (actor->state >= 2) { - actor->info.bonus = 1; - actor->timer_0C6 = 30; - actor->health -= actor->damage; + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + if (this->health != 0) { + this->info.bonus = 0; + if (this->damage == 31) { + if (this->state >= 2) { + this->info.bonus = 1; + this->timer_0C6 = 30; + this->health -= this->damage; } - if (actor->state == 1) { - actor->info.bonus = 1; - actor->iwork[1] = 7; - actor->state = 2; + if (this->state == 1) { + this->info.bonus = 1; + this->iwork[1] = 7; + this->state = 2; } - } else if (actor->state >= 2) { - actor->info.bonus = 1; - actor->timer_0C6 = 30; - actor->health -= actor->damage; - AUDIO_PLAY_SFX(NA_SE_EN_AQ_ZAKO_DAMAGE, actor->sfxSource, 4); + } else if (this->state >= 2) { + this->info.bonus = 1; + this->timer_0C6 = 30; + this->health -= this->damage; + AUDIO_PLAY_SFX(NA_SE_EN_AQ_ZAKO_DAMAGE, this->sfxSource, 4); } else { - actor->timer_0BC = 50; + this->timer_0BC = 50; } - if (actor->health <= 0) { - actor->health = 0; + if (this->health <= 0) { + this->health = 0; } } } } -bool Aquas_801B8C50(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { +bool Aquas_AqGaroa_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { Actor* this = thisx; RCP_SetupDL(&gMasterDisp, SETUPDL_58); @@ -4861,7 +4845,7 @@ bool Aquas_801B8C50(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th return false; } -void Aquas_801B8D7C(s32 limbIndex, Vec3f* rot, void* thisx) { +void Aquas_AqGaroa_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp4C = { 0.0f, 0.0f, 0.0f }; Vec3f sp40 = { 108.0f, 0.0f, 24.0f }; Vec3f sp34 = { 102.0f, 14.0f, -21.0f }; @@ -4950,22 +4934,21 @@ void Aquas_801B8D7C(s32 limbIndex, Vec3f* rot, void* thisx) { } } -// OBJ_ACTOR_260 draw -void Aquas_Actor260_Draw(Actor* actor) { +void Aquas_AqGaroa_Draw(AqGaroa* this) { Vec3f sp30[30]; - if ((actor->state >= 3) && (actor->state < 5)) { - Animation_GetFrameData(&D_AQ_602AC28, actor->animFrame, sp30); + if ((this->state >= 3) && (this->state < 5)) { + Animation_GetFrameData(&D_AQ_602AC28, this->animFrame, sp30); } else { - Animation_GetFrameData(&D_AQ_6024F80, actor->animFrame, sp30); + Animation_GetFrameData(&D_AQ_6024F80, this->animFrame, sp30); } Matrix_Translate(gCalcMatrix, 0.0f, -150.0f, 100.0f, MTXF_APPLY); - Animation_DrawSkeleton(3, D_AQ_602512C, sp30, Aquas_801B8C50, Aquas_801B8D7C, actor, gCalcMatrix); + Animation_DrawSkeleton(3, D_AQ_602512C, sp30, Aquas_AqGaroa_OverrideLimbDraw, Aquas_AqGaroa_PostLimbDraw, this, + gCalcMatrix); } -// OBJ_ACTOR_263 action -void Aquas_Actor263_Update(Actor* actor) { +void Aquas_AqSquid_Update(AqSquid* this) { Vec3f spDC = { 0.0f, 0.0f, 50.0f }; Vec3f spD0; Vec3f spC4; @@ -4978,101 +4961,101 @@ void Aquas_Actor263_Update(Actor* actor) { f32 spf98; f32 sp94; - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); - if ((actor->health == 0) && (actor->state > 0)) { - actor->itemDrop = DROP_NONE; - Actor_Despawn(actor); + if ((this->health == 0) && (this->state > 0)) { + this->itemDrop = DROP_NONE; + Actor_Despawn(this); for (i = 0; i < 5; i++) { - func_effect_80081A8C(actor->obj.pos.x + RAND_FLOAT(i * 15.0f), actor->obj.pos.y + RAND_FLOAT(i * 3.0f), - actor->obj.pos.z + RAND_FLOAT(i * 5.0f), 0.5f + RAND_FLOAT(0.3f), 7); + func_effect_80081A8C(this->obj.pos.x + RAND_FLOAT(i * 15.0f), this->obj.pos.y + RAND_FLOAT(i * 3.0f), + this->obj.pos.z + RAND_FLOAT(i * 5.0f), 0.5f + RAND_FLOAT(0.3f), 7); } for (i = RAND_INT(10.0f); i < 13; i++) { - Aquas_SpawnDebris(&actor->vwork[0 + i], &actor->vwork[13 + i], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(5.0f), - RAND_FLOAT_CENTERED(10.0f), 53, actor->scale, 200, i); - func_effect_8007BC7C(actor->vwork[0 + i].x, actor->vwork[0 + i].y, actor->vwork[0 + i].z + 100.0f, 6.0f); + Aquas_SpawnDebris(&this->vwork[0 + i], &this->vwork[13 + i], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(5.0f), + RAND_FLOAT_CENTERED(10.0f), 53, this->scale, 200, i); + Effect_Effect362_Spawn(this->vwork[0 + i].x, this->vwork[0 + i].y, this->vwork[0 + i].z + 100.0f, 6.0f); } - Object_Kill(&actor->obj, actor->sfxSource); + Object_Kill(&this->obj, this->sfxSource); func_effect_800815DC(); - func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 5.0f); - Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_AQ_ZAKO_DOWN); + func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 5.0f); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_AQ_ZAKO_DOWN); } - switch (actor->state) { + switch (this->state) { case 0: for (i = 0; i < 13; i++) { - actor->vwork[0 + i].x = actor->obj.pos.x; - actor->vwork[0 + i].y = actor->obj.pos.y; - actor->vwork[0 + i].z = actor->obj.pos.z; - actor->vwork[13 + i].x = actor->obj.rot.x; - actor->vwork[13 + i].y = actor->obj.rot.y; - actor->vwork[13 + i].z = actor->obj.rot.z; + this->vwork[0 + i].x = this->obj.pos.x; + this->vwork[0 + i].y = this->obj.pos.y; + this->vwork[0 + i].z = this->obj.pos.z; + this->vwork[13 + i].x = this->obj.rot.x; + this->vwork[13 + i].y = this->obj.rot.y; + this->vwork[13 + i].z = this->obj.rot.z; } - actor->health = 30; - actor->animFrame = 19; - actor->fwork[1] = actor->obj.pos.z; + this->health = 30; + this->animFrame = 19; + this->fwork[1] = this->obj.pos.z; - if (actor->obj.rot.z >= 4.0f) { - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_AQ_60314AC); - actor->health = 200; - actor->info.bonus = 1; - actor->state = 2; - actor->obj.rot.x = actor->obj.rot.y = actor->obj.rot.z = 0.0f; - actor->fwork[7] = actor->obj.pos.y; - actor->scale = 2.0f; + if (this->obj.rot.z >= 4.0f) { + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_AQ_60314AC); + this->health = 200; + this->info.bonus = 1; + this->state = 2; + this->obj.rot.x = this->obj.rot.y = this->obj.rot.z = 0.0f; + this->fwork[7] = this->obj.pos.y; + this->scale = 2.0f; } else { - if (actor->obj.rot.z >= 2.0f) { - actor->iwork[1] = 1; + if (this->obj.rot.z >= 2.0f) { + this->iwork[1] = 1; } spC4.x = spC4.y = 0.0f; spC4.z = 40.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &spC4, &spB8); - actor->fwork[4] = spB8.x; - actor->fwork[5] = spB8.y; - actor->fwork[6] = spB8.z; - actor->state = 1; - actor->obj.rot.z = 0.0f; + this->fwork[4] = spB8.x; + this->fwork[5] = spB8.y; + this->fwork[6] = spB8.z; + this->state = 1; + this->obj.rot.z = 0.0f; } break; case 1: - actor->animFrame++; - if (actor->animFrame >= Animation_GetFrameCount(&D_AQ_6000AE4)) { - actor->animFrame = 0; + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_AQ_6000AE4)) { + this->animFrame = 0; } - if (actor->animFrame == 36) { - actor->vel.x = actor->fwork[4]; - actor->vel.y = actor->fwork[5]; - actor->vel.z = actor->fwork[6]; + if (this->animFrame == 36) { + this->vel.x = this->fwork[4]; + this->vel.y = this->fwork[5]; + this->vel.z = this->fwork[6]; } - Math_SmoothStepToF(&actor->vel.x, 0.0f, 0.1f, 1.0f, 0.00001f); - Math_SmoothStepToF(&actor->vel.y, 0.0f, 0.1f, 1.0f, 0.00001f); - Math_SmoothStepToF(&actor->vel.z, 0.0f, 0.1f, 1.0f, 0.00001f); + Math_SmoothStepToF(&this->vel.x, 0.0f, 0.1f, 1.0f, 0.00001f); + Math_SmoothStepToF(&this->vel.y, 0.0f, 0.1f, 1.0f, 0.00001f); + Math_SmoothStepToF(&this->vel.z, 0.0f, 0.1f, 1.0f, 0.00001f); i = 0; - if (actor->iwork[1] != 0) { - if ((actor->animFrame % 8) == 0) { + if (this->iwork[1] != 0) { + if ((this->animFrame % 8) == 0) { i = 1; } } else { - if ((actor->animFrame % 2) == 0) { + if ((this->animFrame % 2) == 0) { i = 1; } } - if ((actor->animFrame > 36) && (i != 0) && (fabsf(gPlayer[0].trueZpos - actor->obj.pos.z) > 1000.0f)) { - spfA4 = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(200.0f) - actor->vwork[26].x; - spA0 = gPlayer[0].pos.y + RAND_FLOAT_CENTERED(200.0f) - actor->vwork[26].y; - spf9C = gPlayer[0].trueZpos + RAND_FLOAT_CENTERED(200.0f) - actor->vwork[26].z; + if ((this->animFrame > 36) && (i != 0) && (fabsf(gPlayer[0].trueZpos - this->obj.pos.z) > 1000.0f)) { + spfA4 = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(200.0f) - this->vwork[26].x; + spA0 = gPlayer[0].pos.y + RAND_FLOAT_CENTERED(200.0f) - this->vwork[26].y; + spf9C = gPlayer[0].trueZpos + RAND_FLOAT_CENTERED(200.0f) - this->vwork[26].z; sp94 = Math_RadToDeg(Math_Atan2F(spfA4, spf9C)); spf98 = Math_RadToDeg(-Math_Atan2F(spA0, sqrtf(SQ(spfA4) + SQ(spf9C)))); @@ -5085,61 +5068,61 @@ void Aquas_Actor263_Update(Actor* actor) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &spC4, &spAC); - func_effect_8007F04C(OBJ_EFFECT_ENEMY_LASER_1, actor->vwork[26].x + RAND_FLOAT_CENTERED(200.0f), - actor->vwork[26].y + RAND_FLOAT_CENTERED(200.0f), actor->vwork[26].z, spf98, sp94, + func_effect_8007F04C(OBJ_EFFECT_ENEMY_LASER_1, this->vwork[26].x + RAND_FLOAT_CENTERED(200.0f), + this->vwork[26].y + RAND_FLOAT_CENTERED(200.0f), this->vwork[26].z, spf98, sp94, 0.0f, 0.0f, 0.0f, 0.0f, spAC.x, spAC.y, spAC.z, 1.0f); } break; case 2: - actor->animFrame++; - if ((actor->animFrame >= Animation_GetFrameCount(&D_AQ_6000AE4)) && (actor->fwork[8] < 1.0f)) { - actor->animFrame = 0; + this->animFrame++; + if ((this->animFrame >= Animation_GetFrameCount(&D_AQ_6000AE4)) && (this->fwork[8] < 1.0f)) { + this->animFrame = 0; } - if (actor->animFrame == 40) { - actor->fwork[8] = 700.0f; - Aquas_801A9728(actor, 50.0f, 10.0f, 8); + if (this->animFrame == 40) { + this->fwork[8] = 700.0f; + Aquas_801A9728(this, 50.0f, 10.0f, 8); } - Math_SmoothStepToF(&actor->obj.pos.y, actor->fwork[7] + actor->fwork[8], 0.1f, 10.0f, 0.00001f); - Math_SmoothStepToF(&actor->fwork[8], 0.0f, 0.1f, 10.0f, 0.0001f); + Math_SmoothStepToF(&this->obj.pos.y, this->fwork[7] + this->fwork[8], 0.1f, 10.0f, 0.00001f); + Math_SmoothStepToF(&this->fwork[8], 0.0f, 0.1f, 10.0f, 0.0001f); - if (actor->animFrame >= 40) { - Aquas_801AC8A8(actor->obj.pos.x + RAND_FLOAT_CENTERED(70.0f), - actor->obj.pos.y - 50.0f + RAND_FLOAT_CENTERED(50.0f), - actor->obj.pos.z + RAND_FLOAT_CENTERED(100.0f), 1.0f, 0); + if (this->animFrame >= 40) { + Aquas_Effect366_Spawn(this->obj.pos.x + RAND_FLOAT_CENTERED(70.0f), + this->obj.pos.y - 50.0f + RAND_FLOAT_CENTERED(50.0f), + this->obj.pos.z + RAND_FLOAT_CENTERED(100.0f), 1.0f, 0); } - if (actor->animFrame >= 37) { - actor->obj.rot.y += 20.0f; - actor->fwork[2] += 20.0f; + if (this->animFrame >= 37) { + this->obj.rot.y += 20.0f; + this->fwork[2] += 20.0f; if (((gGameFrameCount % 4) == 0)) { - Matrix_RotateY(gCalcMatrix, actor->fwork[2] * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, actor->vwork[27].x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, actor->vwork[27].z * M_DTOR, MTXF_APPLY); - Aquas_801AC8A8(actor->vwork[11].x + RAND_FLOAT_CENTERED(120.0f), - actor->vwork[11].y + RAND_FLOAT_CENTERED(50.0f), - actor->vwork[11].z + RAND_FLOAT_CENTERED(100.0f), 2.0f, 0); + Matrix_RotateY(gCalcMatrix, this->fwork[2] * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->vwork[27].x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, this->vwork[27].z * M_DTOR, MTXF_APPLY); + Aquas_Effect366_Spawn(this->vwork[11].x + RAND_FLOAT_CENTERED(120.0f), + this->vwork[11].y + RAND_FLOAT_CENTERED(50.0f), + this->vwork[11].z + RAND_FLOAT_CENTERED(100.0f), 2.0f, 0); Matrix_MultVec3fNoTranslate(gCalcMatrix, &spDC, &spD0); - func_effect_8007F04C(OBJ_EFFECT_ENEMY_LASER_1, actor->vwork[26].x + spD0.x, - actor->vwork[26].y + spD0.y, actor->vwork[26].z + spD0.z, actor->vwork[27].x, - actor->fwork[2], actor->vwork[27].z, 0.0f, 0.0f, 0.0f, spD0.x, spD0.y, spD0.z, + func_effect_8007F04C(OBJ_EFFECT_ENEMY_LASER_1, this->vwork[26].x + spD0.x, + this->vwork[26].y + spD0.y, this->vwork[26].z + spD0.z, this->vwork[27].x, + this->fwork[2], this->vwork[27].z, 0.0f, 0.0f, 0.0f, spD0.x, spD0.y, spD0.z, 1.0f); } } break; } - if (actor->dmgType != DMG_NONE) { - actor->dmgType = DMG_NONE; - if ((actor->health != 0) && (actor->state != 0)) { - actor->timer_0C6 = 15; - actor->health -= actor->damage; - AUDIO_PLAY_SFX(NA_SE_EN_AQ_ZAKO_DAMAGE, actor->sfxSource, 4); - if (actor->health <= 0) { - actor->health = 0; - if (actor->scale > 1.0f) { - BonusText_Display(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 200.0f, 2); + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + if ((this->health != 0) && (this->state != 0)) { + this->timer_0C6 = 15; + this->health -= this->damage; + AUDIO_PLAY_SFX(NA_SE_EN_AQ_ZAKO_DAMAGE, this->sfxSource, 4); + if (this->health <= 0) { + this->health = 0; + if (this->scale > 1.0f) { + BonusText_Display(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 200.0f, 2); gHitCount += 2; D_ctx_80177850 = 15; } @@ -5148,7 +5131,7 @@ void Aquas_Actor263_Update(Actor* actor) { } } -void Aquas_801B9DB0(s32 limbIndex, Vec3f* rot, void* thisx) { +void Aquas_AqSquid_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp34 = { 0.0f, 0.0f, 0.0f }; Vec3f sp28 = { -27.0f, 7.0f, 5.0f }; Actor* this = (Actor*) thisx; @@ -5231,247 +5214,241 @@ void Aquas_801B9DB0(s32 limbIndex, Vec3f* rot, void* thisx) { } } -// OBJ_ACTOR_263 draw -void Aquas_Actor263_Draw(Actor* actor) { +void Aquas_AqSquid_Draw(AqSquid* this) { Vec3f sp40[30]; RCP_SetupDL(&gMasterDisp, SETUPDL_29); - if ((actor->timer_0C6 % 2) != 0) { + if ((this->timer_0C6 % 2) != 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_30); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); - } else if (actor->state == 2) { + } else if (this->state == 2) { RCP_SetupDL(&gMasterDisp, SETUPDL_30); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 95, 31, 255); } - Matrix_Scale(gCalcMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY); + Matrix_Scale(gCalcMatrix, this->scale, this->scale, this->scale, MTXF_APPLY); - if (actor->state == 1) { - Matrix_RotateX(gCalcMatrix, (actor->obj.rot.x + 90.0f) * M_DTOR, MTXF_APPLY); + if (this->state == 1) { + Matrix_RotateX(gCalcMatrix, (this->obj.rot.x + 90.0f) * M_DTOR, MTXF_APPLY); } - Animation_GetFrameData(&D_AQ_6000AE4, actor->animFrame, sp40); - Animation_DrawSkeleton(3, D_AQ_6000DB0, sp40, NULL, Aquas_801B9DB0, actor, gCalcMatrix); + Animation_GetFrameData(&D_AQ_6000AE4, this->animFrame, sp40); + Animation_DrawSkeleton(3, D_AQ_6000DB0, sp40, NULL, Aquas_AqSquid_PostLimbDraw, this, gCalcMatrix); } -// OBJ_ACTOR_264 action -void Aquas_Actor264_Update(Actor* actor) { - Vec3f sp40[30]; +void Aquas_AqSeaweed_Update(AqSeaweed* this) { + Vec3f frameTable[30]; u16 sp3E; - switch (actor->state) { + switch (this->state) { case 0: - actor->animFrame = RAND_INT(50.0f); - actor->state++; + this->animFrame = RAND_INT(50.0f); + this->state++; /* fallthrough */ case 1: - actor->animFrame += 2; - if (actor->animFrame >= Animation_GetFrameCount(&D_AQ_6020A40)) { - actor->animFrame = 0; + this->animFrame += 2; + if (this->animFrame >= Animation_GetFrameCount(&D_AQ_6020A40)) { + this->animFrame = 0; } - sp3E = Animation_GetFrameData(&D_AQ_6020A40, actor->animFrame, sp40); + sp3E = Animation_GetFrameData(&D_AQ_6020A40, this->animFrame, frameTable); - if ((fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 150.0f) && - (fabsf(actor->obj.pos.y - gPlayer[0].pos.y) < 500.0f) && - (fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 700.0f)) { - actor->state = 2; - actor->fwork[0] = 0.0f; + if ((fabsf(this->obj.pos.x - gPlayer[0].pos.x) < 150.0f) && + (fabsf(this->obj.pos.y - gPlayer[0].pos.y) < 500.0f) && + (fabsf(this->obj.pos.z - gPlayer[0].trueZpos) < 700.0f)) { + this->state = 2; + this->fwork[0] = 0.0f; } break; case 2: - actor->animFrame += 2; - if (actor->animFrame >= Animation_GetFrameCount(&D_AQ_601DE50)) { - actor->animFrame = 0; + this->animFrame += 2; + if (this->animFrame >= Animation_GetFrameCount(&D_AQ_601DE50)) { + this->animFrame = 0; } - sp3E = Animation_GetFrameData(&D_AQ_601DE50, actor->animFrame, sp40); - if ((fabsf(actor->obj.pos.x - gPlayer[0].pos.x) > 150.0f) || - (fabsf(actor->obj.pos.y - gPlayer[0].pos.y) > 500.0f) || - (fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) > 700.0f)) { - actor->state = 1; - actor->fwork[0] = 0.0f; + sp3E = Animation_GetFrameData(&D_AQ_601DE50, this->animFrame, frameTable); + if ((fabsf(this->obj.pos.x - gPlayer[0].pos.x) > 150.0f) || + (fabsf(this->obj.pos.y - gPlayer[0].pos.y) > 500.0f) || + (fabsf(this->obj.pos.z - gPlayer[0].trueZpos) > 700.0f)) { + this->state = 1; + this->fwork[0] = 0.0f; } break; } - Math_SmoothStepToVec3fArray(sp40, actor->vwork, 1, sp3E, actor->fwork[0], 100.0f, 0.0f); - Math_SmoothStepToF(&actor->fwork[0], 0.5f, 1.0f, 0.008f, 0.0f); + Math_SmoothStepToVec3fArray(frameTable, this->vwork, 1, sp3E, this->fwork[0], 100.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[0], 0.5f, 1.0f, 0.008f, 0.0f); } -// OBJ_ACTOR_264 draw -void Aquas_Actor264_Draw(Actor* actor) { +void Aquas_AqSeaweed_Draw(AqSeaweed* this) { gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - Animation_DrawSkeleton(1, D_AQ_6020C6C, actor->vwork, NULL, NULL, &actor->index, &gIdentityMatrix); + Animation_DrawSkeleton(1, D_AQ_6020C6C, this->vwork, NULL, NULL, &this->index, &gIdentityMatrix); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); } -void Aquas_801BA57C(Actor* actor) { - if (actor->state == 0) { - actor->scale = 1.0f; - actor->gravity = 0.3f; - actor->health = 10; - actor->fwork[2] = RAND_FLOAT_CENTERED((s32) (actor->index % 8U) + 3.0f); +void Venom1_AqBoulder_Init(AqBoulder* this) { + if (this->state == 0) { + this->scale = 1.0f; + this->gravity = 0.3f; + this->health = 10; + this->fwork[2] = RAND_FLOAT_CENTERED((s32) (this->index % 8U) + 3.0f); } else { - actor->info.bonus = 0; - actor->scale = 0.5f; - actor->gravity = 0.1f; - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_AQ_603151C); - actor->fwork[2] = RAND_FLOAT_CENTERED((s32) (actor->index % 4U) + 1.0f); + this->info.bonus = 0; + this->scale = 0.5f; + this->gravity = 0.1f; + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_AQ_603151C); + this->fwork[2] = RAND_FLOAT_CENTERED((s32) (this->index % 4U) + 1.0f); } - actor->fwork[1] = RAND_FLOAT(50.0f); + this->fwork[1] = RAND_FLOAT(50.0f); } -// OBJ_ACTOR_265 action -void Aquas_Actor265_Update(Actor* actor) { +void Aquas_AqBoulder_Update(AqBoulder* this) { s32 i; s32 var_s2; - Actor* actor265; + Actor* boulder; - switch (actor->state) { + switch (this->state) { case 0: - if (actor->iwork[1] == 0) { - actor->obj.rot.z += actor->fwork[2]; + if (this->iwork[1] == 0) { + this->obj.rot.z += this->fwork[2]; if (((gGameFrameCount % 2) == 0)) { - Aquas_801AC8A8(actor->obj.pos.x + RAND_FLOAT_CENTERED(120.0f), - actor->obj.pos.y + RAND_FLOAT_CENTERED(50.0f), - actor->obj.pos.z + RAND_FLOAT_CENTERED(100.0f), 2.0f, 0); + Aquas_Effect366_Spawn(this->obj.pos.x + RAND_FLOAT_CENTERED(120.0f), + this->obj.pos.y + RAND_FLOAT_CENTERED(50.0f), + this->obj.pos.z + RAND_FLOAT_CENTERED(100.0f), 2.0f, 0); } - actor->fwork[1] += 10.0f; - actor->vel.x = SIN_DEG(actor->fwork[1]) * 10.0f; + this->fwork[1] += 10.0f; + this->vel.x = SIN_DEG(this->fwork[1]) * 10.0f; - if (actor->obj.pos.y < (gGroundHeight + 30.0f)) { - AUDIO_PLAY_SFX(NA_SE_OB_AQ_ROCK_BOUND, actor->sfxSource, 4); - actor->iwork[1] = 1; - actor->vel.x = actor->vel.y = actor->vel.z = 0.0f; - actor->gravity = 0.0f; - func_effect_8007B8F8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 100.0f, - actor->scale * 30.0f); - func_effect_8007B8F8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 100.0f, - actor->scale * 30.0f); + if (this->obj.pos.y < (gGroundHeight + 30.0f)) { + AUDIO_PLAY_SFX(NA_SE_OB_AQ_ROCK_BOUND, this->sfxSource, 4); + this->iwork[1] = 1; + this->vel.x = this->vel.y = this->vel.z = 0.0f; + this->gravity = 0.0f; + Effect_Effect364_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 100.0f, + this->scale * 30.0f); + Effect_Effect364_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 100.0f, + this->scale * 30.0f); } } break; case 1: - if (actor->iwork[1] == 0) { - actor->obj.rot.z += actor->fwork[2]; + if (this->iwork[1] == 0) { + this->obj.rot.z += this->fwork[2]; if (((gGameFrameCount % 4) == 0)) { - Aquas_801AC8A8(actor->obj.pos.x + RAND_FLOAT_CENTERED(70.0f), - actor->obj.pos.y + RAND_FLOAT_CENTERED(50.0f), - actor->obj.pos.z + RAND_FLOAT_CENTERED(50.0f), 1.0f, 0); + Aquas_Effect366_Spawn(this->obj.pos.x + RAND_FLOAT_CENTERED(70.0f), + this->obj.pos.y + RAND_FLOAT_CENTERED(50.0f), + this->obj.pos.z + RAND_FLOAT_CENTERED(50.0f), 1.0f, 0); } - Math_SmoothStepToF(&actor->vel.y, -7.0f, 0.1f, 1.0f, 0.0001f); + Math_SmoothStepToF(&this->vel.y, -7.0f, 0.1f, 1.0f, 0.0001f); - if (actor->obj.pos.y < (gGroundHeight + 20.0f)) { - actor->gravity = 0.0f; - if (actor->vel.y < 0.0f) { - actor->vel.y = 0.0f; + if (this->obj.pos.y < (gGroundHeight + 20.0f)) { + this->gravity = 0.0f; + if (this->vel.y < 0.0f) { + this->vel.y = 0.0f; } - actor->iwork[1] = 1; - AUDIO_PLAY_SFX(NA_SE_OB_AQ_ROCK_BOUND, actor->sfxSource, 4); - func_effect_8007B8F8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 100.0f, - actor->scale * 30.0f); + this->iwork[1] = 1; + AUDIO_PLAY_SFX(NA_SE_OB_AQ_ROCK_BOUND, this->sfxSource, 4); + Effect_Effect364_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 100.0f, + this->scale * 30.0f); } } else { - Math_SmoothStepToF(&actor->vel.y, 0.0f, 0.1f, 1.0f, 0.0001f); + Math_SmoothStepToF(&this->vel.y, 0.0f, 0.1f, 1.0f, 0.0001f); } - Math_SmoothStepToF(&actor->vel.x, 0.0f, 0.1f, 1.0f, 0.0001f); - Math_SmoothStepToF(&actor->vel.z, 0.0f, 0.1f, 1.0f, 0.0001f); + Math_SmoothStepToF(&this->vel.x, 0.0f, 0.1f, 1.0f, 0.0001f); + Math_SmoothStepToF(&this->vel.z, 0.0f, 0.1f, 1.0f, 0.0001f); break; } - if (actor->dmgType != DMG_NONE) { - actor->dmgType = DMG_NONE; - actor->health -= actor->damage; - if (actor->health <= 0) { - actor->health = actor->itemDrop = 0; - Actor_Despawn(actor); - if (actor->state == 0) { - for (i = 0, var_s2 = 0, actor265 = gActors; i < ARRAY_COUNT(gActors) && var_s2 < 4; i++, actor265++) { - if (actor265->obj.status == OBJ_FREE) { - Actor_Initialize(actor265); - actor265->obj.status = OBJ_INIT; - actor265->obj.id = OBJ_ACTOR_265; - actor265->obj.pos.x = actor->obj.pos.x; - actor265->obj.pos.y = actor->obj.pos.y + 20.0f; - actor265->obj.pos.z = actor->obj.pos.z; - actor265->vel.x = RAND_FLOAT_CENTERED(50.0f); - actor265->vel.y = RAND_FLOAT(5.0f); - actor265->vel.z = RAND_FLOAT_CENTERED(50.0f); - actor265->state = 1; + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + this->health -= this->damage; + if (this->health <= 0) { + this->health = this->itemDrop = 0; + Actor_Despawn(this); + if (this->state == 0) { + for (i = 0, var_s2 = 0, boulder = &gActors[0]; (i < ARRAY_COUNT(gActors)) && (var_s2 < 4); + i++, boulder++) { + if (boulder->obj.status == OBJ_FREE) { + Actor_Initialize(boulder); + boulder->obj.status = OBJ_INIT; + boulder->obj.id = OBJ_ACTOR_AQ_BOULDER; + boulder->obj.pos.x = this->obj.pos.x; + boulder->obj.pos.y = this->obj.pos.y + 20.0f; + boulder->obj.pos.z = this->obj.pos.z; + boulder->vel.x = RAND_FLOAT_CENTERED(50.0f); + boulder->vel.y = RAND_FLOAT(5.0f); + boulder->vel.z = RAND_FLOAT_CENTERED(50.0f); + boulder->state = 1; - Object_SetInfo(&actor265->info, actor265->obj.id); + Object_SetInfo(&boulder->info, boulder->obj.id); var_s2++; } } if (i >= ARRAY_COUNT(gActors)) { - actor265->obj.status = OBJ_FREE; + boulder->obj.status = OBJ_FREE; } } else { for (i = 0; i < 4; i++) { - Aquas_SpawnDebris(&actor->obj.pos, &actor->obj.rot, RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT(5.0f), + Aquas_SpawnDebris(&this->obj.pos, &this->obj.rot, RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT(5.0f), RAND_FLOAT_CENTERED(10.0f), 54, 0.1f, 200, i); } } - func_effect_8007BC7C(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 130.0f, actor->scale * 30.0f); - func_effect_8007BC7C(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 130.0f, actor->scale * 30.0f); - func_effect_8007BC7C(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 130.0f, actor->scale * 30.0f); - Object_Kill(&actor->obj, actor->sfxSource); - Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_Effect362_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 130.0f, this->scale * 30.0f); + Effect_Effect362_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 130.0f, this->scale * 30.0f); + Effect_Effect362_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 130.0f, this->scale * 30.0f); + Object_Kill(&this->obj, this->sfxSource); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); } } } -// OBJ_ACTOR_265 draw -void Aquas_Actor265_Draw(Actor* actor) { - Matrix_Scale(gGfxMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY); +void Aquas_AqBoulder_Draw(AqBoulder* this) { + Matrix_Scale(gGfxMatrix, this->scale, this->scale, this->scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_AQ_6014FD0); + gSPDisplayList(gMasterDisp++, aAqBoulderDL); } -// OBJ_ACTOR_266 action -void Aquas_Actor266_Update(Actor* actor) { +void Aquas_AqCoral_Update(AqCoral* this) { s32 i; - switch (actor->state) { + switch (this->state) { case 0: for (i = 0; i < 5; i++) { - actor->vwork[0 + i].x = actor->obj.pos.x; - actor->vwork[0 + i].y = actor->obj.pos.y; - actor->vwork[0 + i].z = actor->obj.pos.z; - actor->vwork[5 + i].x = actor->obj.rot.x; - actor->vwork[5 + i].y = actor->obj.rot.y; - actor->vwork[5 + i].z = actor->obj.rot.z; + this->vwork[0 + i].x = this->obj.pos.x; + this->vwork[0 + i].y = this->obj.pos.y; + this->vwork[0 + i].z = this->obj.pos.z; + this->vwork[5 + i].x = this->obj.rot.x; + this->vwork[5 + i].y = this->obj.rot.y; + this->vwork[5 + i].z = this->obj.rot.z; } - actor->state++; + this->state++; break; case 1: - if (actor->dmgType != DMG_NONE) { - actor->dmgType = DMG_NONE; - if (actor->damage == 0) { + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + if (this->damage == 0) { gPlayer[0].hitTimer = 6; gPlayer[0].hitDirection = 0; } - actor->state++; + this->state++; } break; case 2: for (i = 0; i < 5; i++) { - Aquas_SpawnDebris(&actor->vwork[0 + i], &actor->vwork[5 + i], RAND_FLOAT_CENTERED(20.0f), - RAND_FLOAT(5.0f), RAND_FLOAT_CENTERED(10.0f), 55, actor->scale, 200, i); - func_effect_8007BC7C(actor->vwork[0 + i].x, actor->vwork[0 + i].y, actor->vwork[0 + i].z + 100.0f, - 6.0f); + Aquas_SpawnDebris(&this->vwork[0 + i], &this->vwork[5 + i], RAND_FLOAT_CENTERED(20.0f), + RAND_FLOAT(5.0f), RAND_FLOAT_CENTERED(10.0f), 55, this->scale, 200, i); + Effect_Effect362_Spawn(this->vwork[0 + i].x, this->vwork[0 + i].y, this->vwork[0 + i].z + 100.0f, 6.0f); } - Object_Kill(&actor->obj, actor->sfxSource); + Object_Kill(&this->obj, this->sfxSource); break; } } -void Aquas_801BB0C4(s32 limbIndex, Vec3f* rot, void* thisx) { +void Aquas_AqCoral_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp24 = { 0.0f, 0.0f, 0.0f }; Actor* this = (Actor*) thisx; @@ -5501,12 +5478,11 @@ void Aquas_801BB0C4(s32 limbIndex, Vec3f* rot, void* thisx) { } } -// OBJ_ACTOR_266 draw -void Aquas_Actor266_Draw(Actor* actor) { - Vec3f sp28[30]; +void Aquas_AqCoral_Draw(AqCoral* this) { + Vec3f frameTable[30]; - Animation_GetFrameData(&D_AQ_601EC68, 0, sp28); - Animation_DrawSkeleton(3, D_AQ_601EDB4, sp28, NULL, Aquas_801BB0C4, actor, gCalcMatrix); + Animation_GetFrameData(&aAqCoralAnim, 0, frameTable); + Animation_DrawSkeleton(3, aAqCoralSkel, frameTable, NULL, Aquas_AqCoral_PostLimbDraw, this, gCalcMatrix); } Vec3f D_i3_801C0344[4] = { @@ -5528,107 +5504,107 @@ s32 D_i3_801C04A0[6] = { 15, -15, 10, -10, 7, -7, }; -void Aquas_801BB26C(Actor* actor) { +void Venom1_AqJellyfish_Init(AqJellyfish* this) { s32 sp64; s32 sp60; Vec3f sp54; Vec3f sp48; - Actor* actor267; - Actor* actor267_2; + AqJellyfish* jellyfish; + AqJellyfish* jellyfish2; - actor->fwork[1] = RAND_FLOAT(100.0f); - actor->timer_0BC = RAND_INT(50.0f); - actor->iwork[3] = RAND_INT(10.0f) % 2U; - actor->fwork[11] = actor->fwork[14] = actor->fwork[17] = actor->fwork[12] = actor->fwork[15] = actor->fwork[18] = - actor->fwork[13] = actor->fwork[16] = actor->fwork[19] = 1.0f; - actor->fwork[2] = 213.0f; - actor->fwork[3] = 160.0f; - actor->fwork[4] = 255.0f; - actor->fwork[8] = 255.0f; - actor->fwork[7] = 255.0f; - actor->fwork[6] = 197.0f; - actor->fwork[5] = 197.0f; - actor->fwork[10] = 231.0f; - actor->fwork[9] = 231.0f; - actor->fwork[22] = actor->obj.pos.x; - actor->fwork[23] = actor->obj.pos.y; - actor->fwork[24] = actor->obj.pos.z; - actor->iwork[4] = RAND_INT(60.0f); - actor->iwork[5] = 15 + RAND_INT(45.0f); - actor->iwork[6] = 45 + RAND_INT(15.0f); - actor->iwork[7] = RAND_INT(120.0f); - actor->iwork[8] = RAND_INT(120.0f); - actor->iwork[9] = RAND_INT(120.0f); + this->fwork[1] = RAND_FLOAT(100.0f); + this->timer_0BC = RAND_INT(50.0f); + this->iwork[3] = RAND_INT(10.0f) % 2U; + this->fwork[11] = this->fwork[14] = this->fwork[17] = this->fwork[12] = this->fwork[15] = this->fwork[18] = + this->fwork[13] = this->fwork[16] = this->fwork[19] = 1.0f; + this->fwork[2] = 213.0f; + this->fwork[3] = 160.0f; + this->fwork[4] = 255.0f; + this->fwork[8] = 255.0f; + this->fwork[7] = 255.0f; + this->fwork[6] = 197.0f; + this->fwork[5] = 197.0f; + this->fwork[10] = 231.0f; + this->fwork[9] = 231.0f; + this->fwork[22] = this->obj.pos.x; + this->fwork[23] = this->obj.pos.y; + this->fwork[24] = this->obj.pos.z; + this->iwork[4] = RAND_INT(60.0f); + this->iwork[5] = 15 + RAND_INT(45.0f); + this->iwork[6] = 45 + RAND_INT(15.0f); + this->iwork[7] = RAND_INT(120.0f); + this->iwork[8] = RAND_INT(120.0f); + this->iwork[9] = RAND_INT(120.0f); - actor->animFrame = RAND_INT(Animation_GetFrameCount(&D_AQ_6023780)); + this->animFrame = RAND_INT(Animation_GetFrameCount(&aAqJellyfishAnim)); - if (actor->iwork[2] == 0) { - actor->iwork[18] = fabsf(actor->obj.rot.y / 10.0f); - if ((actor->iwork[18] == 0) || (actor->iwork[18] == 2)) { - actor->iwork[19] = 1; + if (this->iwork[2] == 0) { + this->iwork[18] = fabsf(this->obj.rot.y / 10.0f); + if ((this->iwork[18] == 0) || (this->iwork[18] == 2)) { + this->iwork[19] = 1; } - actor->iwork[13] = D_i3_801C4450 * 3; + this->iwork[13] = D_i3_801C4450 * 3; - Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, MTXF_NEW); + Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_NEW); sp54.x = 0.0f; - sp54.y = actor->obj.rot.x * 10.0f; + sp54.y = this->obj.rot.x * 10.0f; sp54.z = 0.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48); - for (sp64 = 0, actor267 = gActors; sp64 < ARRAY_COUNT(gActors); sp64++, actor267++) { - if (actor267->obj.status == OBJ_FREE) { - Actor_Initialize(actor267); - actor267->obj.status = OBJ_INIT; - actor267->obj.id = OBJ_ACTOR_267; - actor267->obj.pos.x = actor->obj.pos.x + sp48.x; - actor267->obj.pos.y = actor->obj.pos.y + sp48.y; - actor267->obj.pos.z = actor->obj.pos.z; - actor267->iwork[0] = actor->index + 1; - actor267->iwork[2] = 1; - actor267->iwork[13] = actor->iwork[13]; - actor267->iwork[18] = actor->iwork[18]; - actor267->iwork[19] = actor->iwork[19]; - actor->iwork[0] = sp64 + 1; - Object_SetInfo(&actor267->info, actor267->obj.id); + for (sp64 = 0, jellyfish = &gActors[0]; sp64 < ARRAY_COUNT(gActors); sp64++, jellyfish++) { + if (jellyfish->obj.status == OBJ_FREE) { + Actor_Initialize(jellyfish); + jellyfish->obj.status = OBJ_INIT; + jellyfish->obj.id = OBJ_ACTOR_AQ_JELLYFISH; + jellyfish->obj.pos.x = this->obj.pos.x + sp48.x; + jellyfish->obj.pos.y = this->obj.pos.y + sp48.y; + jellyfish->obj.pos.z = this->obj.pos.z; + jellyfish->iwork[0] = this->index + 1; + jellyfish->iwork[2] = 1; + jellyfish->iwork[13] = this->iwork[13]; + jellyfish->iwork[18] = this->iwork[18]; + jellyfish->iwork[19] = this->iwork[19]; + this->iwork[0] = sp64 + 1; + Object_SetInfo(&jellyfish->info, jellyfish->obj.id); break; } } - Matrix_RotateZ(gCalcMatrix, (actor->obj.rot.z + 90.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateZ(gCalcMatrix, (this->obj.rot.z + 90.0f) * M_DTOR, MTXF_NEW); sp54.x = 0.0f; - sp54.y = actor->obj.rot.x * 10.0f; + sp54.y = this->obj.rot.x * 10.0f; sp54.z = 0.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48); - for (sp60 = 0, actor267_2 = gActors; sp60 < ARRAY_COUNT(gActors); sp60++, actor267_2++) { - if (actor267_2->obj.status == OBJ_FREE) { - Actor_Initialize(actor267_2); - actor267_2->obj.status = OBJ_INIT; - actor267_2->obj.id = OBJ_ACTOR_267; - actor267_2->obj.pos.x = actor->obj.pos.x + sp48.x; - actor267_2->obj.pos.y = actor->obj.pos.y + sp48.y; - actor267_2->obj.pos.z = actor->obj.pos.z; - actor267_2->iwork[0] = actor->index + 1; - actor267_2->iwork[1] = actor267->index + 1; - actor267_2->iwork[2] = 2; - actor267_2->iwork[13] = actor->iwork[13]; - actor267_2->iwork[18] = actor->iwork[18]; - actor267_2->iwork[19] = actor->iwork[19]; - actor267->iwork[1] = sp60 + 1; - actor->iwork[1] = sp60 + 1; - Object_SetInfo(&actor267_2->info, actor267_2->obj.id); + for (sp60 = 0, jellyfish2 = &gActors[0]; sp60 < ARRAY_COUNT(gActors); sp60++, jellyfish2++) { + if (jellyfish2->obj.status == OBJ_FREE) { + Actor_Initialize(jellyfish2); + jellyfish2->obj.status = OBJ_INIT; + jellyfish2->obj.id = OBJ_ACTOR_AQ_JELLYFISH; + jellyfish2->obj.pos.x = this->obj.pos.x + sp48.x; + jellyfish2->obj.pos.y = this->obj.pos.y + sp48.y; + jellyfish2->obj.pos.z = this->obj.pos.z; + jellyfish2->iwork[0] = this->index + 1; + jellyfish2->iwork[1] = jellyfish->index + 1; + jellyfish2->iwork[2] = 2; + jellyfish2->iwork[13] = this->iwork[13]; + jellyfish2->iwork[18] = this->iwork[18]; + jellyfish2->iwork[19] = this->iwork[19]; + jellyfish->iwork[1] = sp60 + 1; + this->iwork[1] = sp60 + 1; + Object_SetInfo(&jellyfish2->info, jellyfish2->obj.id); break; } } - actor->fwork[21] = actor->obj.rot.x * 10.0f; - actor->iwork[17] = fabsf(Math_ModF(actor->obj.rot.y, 10.0f)); - actor->fwork[20] = actor->obj.rot.z; + this->fwork[21] = this->obj.rot.x * 10.0f; + this->iwork[17] = fabsf(Math_ModF(this->obj.rot.y, 10.0f)); + this->fwork[20] = this->obj.rot.z; - actor->obj.rot.x = actor->obj.rot.y = actor->obj.rot.z = 0.0f; + this->obj.rot.x = this->obj.rot.y = this->obj.rot.z = 0.0f; D_i3_801C4450++; if (D_i3_801C4450 > 20) { D_i3_801C4450 = 0; @@ -5636,8 +5612,7 @@ void Aquas_801BB26C(Actor* actor) { } } -// OBJ_ACTOR_267 action -void Aquas_Actor267_Update(Actor* actor) { +void Aquas_AqJellyfish_Update(AqJellyfish* this) { s32 i; s32 it0; s32 it1; @@ -5645,30 +5620,30 @@ void Aquas_Actor267_Update(Actor* actor) { Vec3f sp74; Actor* sp70; Actor* sp6C; - Scenery* actor122; + AqWall1* wall1; - if (actor->timer_0C0 == 0) { - switch (actor->iwork[18]) { + if (this->timer_0C0 == 0) { + switch (this->iwork[18]) { case 1: case 2: - i = actor->iwork[19] + (actor->iwork[2] * 2); - actor->vel.x = D_i3_801C04A0[i]; - if (((gGameFrameCount % 4) == 0)) { - if (fabsf(actor->fwork[22] - actor->obj.pos.x) >= 100.0f) { - if (actor->iwork[20] == 0) { - actor->iwork[19]++; - actor->iwork[19] &= 1; - actor->iwork[20] = 50; + i = this->iwork[19] + (this->iwork[2] * 2); + this->vel.x = D_i3_801C04A0[i]; + if ((gGameFrameCount % 4) == 0) { + if (fabsf(this->fwork[22] - this->obj.pos.x) >= 100.0f) { + if (this->iwork[20] == 0) { + this->iwork[19]++; + this->iwork[19] &= 1; + this->iwork[20] = 50; } } else { - for (i = 0, actor122 = gScenery; i < ARRAY_COUNT(gScenery); i++, actor122++) { - if ((actor122->obj.status == OBJ_ACTIVE) && (actor122->obj.id == OBJ_SCENERY_122) && - Object_CheckHitboxCollision(&actor->obj.pos, actor122->info.hitbox, &actor122->obj, - 0.0f, 0.0f, 0.0f) && - (actor->iwork[20] == 0)) { - actor->iwork[20] = 50; - actor->iwork[19]++; - actor->iwork[19] &= 1; + for (i = 0, wall1 = &gScenery[0]; i < ARRAY_COUNT(gScenery); i++, wall1++) { + if ((wall1->obj.status == OBJ_ACTIVE) && (wall1->obj.id == OBJ_SCENERY_AQ_WALL_1) && + Object_CheckHitboxCollision(&this->obj.pos, wall1->info.hitbox, &wall1->obj, 0.0f, 0.0f, + 0.0f) && + (this->iwork[20] == 0)) { + this->iwork[20] = 50; + this->iwork[19]++; + this->iwork[19] &= 1; } } } @@ -5677,25 +5652,25 @@ void Aquas_Actor267_Update(Actor* actor) { case 3: case 4: - i = actor->iwork[19] + (actor->iwork[2] * 2); - actor->vel.y = D_i3_801C04A0[i]; + i = this->iwork[19] + (this->iwork[2] * 2); + this->vel.y = D_i3_801C04A0[i]; if (((gGameFrameCount % 4) == 0)) { - if (fabsf(actor->fwork[23] - actor->obj.pos.y) >= 100.0f) { - if (actor->iwork[20] == 0) { - actor->iwork[19]++; - actor->iwork[19] &= 1; - actor->iwork[20] = 50; + if (fabsf(this->fwork[23] - this->obj.pos.y) >= 100.0f) { + if (this->iwork[20] == 0) { + this->iwork[19]++; + this->iwork[19] &= 1; + this->iwork[20] = 50; } } else { - for (i = 0, actor122 = gScenery; i < ARRAY_COUNT(gScenery); i++, actor122++) { - if ((actor122->obj.status == OBJ_ACTIVE) && (actor122->obj.id == OBJ_SCENERY_122) && - (Object_CheckHitboxCollision(&actor->obj.pos, actor122->info.hitbox, &actor122->obj, - 0.0f, 0.0f, 0.0f) || - (actor->obj.pos.y < (gGroundHeight + 30.0f))) && - (actor->iwork[20] == 0)) { - actor->iwork[20] = 50; - actor->iwork[19]++; - actor->iwork[19] &= 1; + for (i = 0, wall1 = gScenery; i < ARRAY_COUNT(gScenery); i++, wall1++) { + if ((wall1->obj.status == OBJ_ACTIVE) && (wall1->obj.id == OBJ_SCENERY_AQ_WALL_1) && + (Object_CheckHitboxCollision(&this->obj.pos, wall1->info.hitbox, &wall1->obj, 0.0f, + 0.0f, 0.0f) || + (this->obj.pos.y < (gGroundHeight + 30.0f))) && + (this->iwork[20] == 0)) { + this->iwork[20] = 50; + this->iwork[19]++; + this->iwork[19] &= 1; } } } @@ -5703,29 +5678,29 @@ void Aquas_Actor267_Update(Actor* actor) { break; } } else { - actor->vel.x = actor->vel.y = 0.0f; + this->vel.x = this->vel.y = 0.0f; } - if (actor->iwork[2] == 0) { - sp70 = &gActors[actor->iwork[0] - 1]; - sp6C = &gActors[actor->iwork[1] - 1]; + if (this->iwork[2] == 0) { + sp70 = &gActors[this->iwork[0] - 1]; + sp6C = &gActors[this->iwork[1] - 1]; - Math_SmoothStepToF(&actor->fwork[21], 200.0f, 0.1f, 2.0f, 0.0001f); + Math_SmoothStepToF(&this->fwork[21], 200.0f, 0.1f, 2.0f, 0.0001f); - if ((actor->iwork[13] == sp70->iwork[13]) && (actor->iwork[14] == 0)) { + if ((this->iwork[13] == sp70->iwork[13]) && (this->iwork[14] == 0)) { i = 1; - if (!((sp70->obj.id == OBJ_ACTOR_267) && (sp70->obj.status == OBJ_ACTIVE))) { - actor->iwork[14] = 1; + if (!((sp70->obj.id == OBJ_ACTOR_AQ_JELLYFISH) && (sp70->obj.status == OBJ_ACTIVE))) { + this->iwork[14] = 1; i = 0; } if (i != 0) { - if (!actor->timer_0C0 && sp70->timer_0C0 >= 2) { - actor->timer_0C0 = sp70->timer_0C0; - actor->timer_0C6 = sp70->timer_0C6; + if (!this->timer_0C0 && sp70->timer_0C0 >= 2) { + this->timer_0C0 = sp70->timer_0C0; + this->timer_0C6 = sp70->timer_0C6; } - if (actor->timer_0C0 && !sp70->timer_0C0 >= 2) { - sp70->timer_0C0 = actor->timer_0C0; - sp70->timer_0C6 = actor->timer_0C6; + if (this->timer_0C0 && !sp70->timer_0C0 >= 2) { + sp70->timer_0C0 = this->timer_0C0; + sp70->timer_0C6 = this->timer_0C6; } } @@ -5733,69 +5708,69 @@ void Aquas_Actor267_Update(Actor* actor) { Effect_SpawnTimedSfxAtPos(&sp70->obj.pos, NA_SE_EN_WT_SPARK_BEAM); } - Aquas_801A92EC(actor, sp70->obj.pos.x, sp70->obj.pos.y, sp70->obj.pos.z, actor->iwork[13], i); + Aquas_801A92EC(this, sp70->obj.pos.x, sp70->obj.pos.y, sp70->obj.pos.z, this->iwork[13], i); - if ((actor->fwork[21] > 200.0f) && (actor->iwork[17] != 0)) { - Matrix_RotateZ(gCalcMatrix, actor->fwork[20] * M_DTOR, MTXF_NEW); + if ((this->fwork[21] > 200.0f) && (this->iwork[17] != 0)) { + Matrix_RotateZ(gCalcMatrix, this->fwork[20] * M_DTOR, MTXF_NEW); sp80.x = 0.0f; - sp80.y = actor->fwork[21]; + sp80.y = this->fwork[21]; sp80.z = 0.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp80, &sp74); - sp70->obj.pos.x = actor->obj.pos.x + sp74.x; - sp70->obj.pos.y = actor->obj.pos.y + sp74.y; - sp70->obj.pos.z = actor->obj.pos.z; + sp70->obj.pos.x = this->obj.pos.x + sp74.x; + sp70->obj.pos.y = this->obj.pos.y + sp74.y; + sp70->obj.pos.z = this->obj.pos.z; } } - if ((actor->iwork[13] == sp6C->iwork[13]) && (actor->iwork[15] == 0)) { + if ((this->iwork[13] == sp6C->iwork[13]) && (this->iwork[15] == 0)) { i = 1; - if (!((sp6C->obj.id == OBJ_ACTOR_267) && (sp6C->obj.status == OBJ_ACTIVE))) { - actor->iwork[15] = 1; + if (!((sp6C->obj.id == OBJ_ACTOR_AQ_JELLYFISH) && (sp6C->obj.status == OBJ_ACTIVE))) { + this->iwork[15] = 1; i = 0; } if (i != 0) { - if (!actor->timer_0C0 && sp6C->timer_0C0 >= 2) { - actor->timer_0C0 = sp6C->timer_0C0; - actor->timer_0C6 = sp6C->timer_0C6; + if (!this->timer_0C0 && sp6C->timer_0C0 >= 2) { + this->timer_0C0 = sp6C->timer_0C0; + this->timer_0C6 = sp6C->timer_0C6; } - if (actor->timer_0C0 && !sp6C->timer_0C0 >= 2) { - sp6C->timer_0C0 = actor->timer_0C0; - sp6C->timer_0C6 = actor->timer_0C6; + if (this->timer_0C0 && !sp6C->timer_0C0 >= 2) { + sp6C->timer_0C0 = this->timer_0C0; + sp6C->timer_0C6 = this->timer_0C6; } } if (((gGameFrameCount % 4) == 0)) { Effect_SpawnTimedSfxAtPos(&sp6C->obj.pos, NA_SE_EN_WT_SPARK_BEAM); } - Aquas_801A92EC(actor, sp6C->obj.pos.x, sp6C->obj.pos.y, sp6C->obj.pos.z, actor->iwork[13] + 1, i); + Aquas_801A92EC(this, sp6C->obj.pos.x, sp6C->obj.pos.y, sp6C->obj.pos.z, this->iwork[13] + 1, i); - if ((actor->fwork[21] > 200.0f) && (actor->iwork[17] != 0)) { - Matrix_RotateZ(gCalcMatrix, (actor->fwork[20] + 90.0f) * M_DTOR, MTXF_NEW); + if ((this->fwork[21] > 200.0f) && (this->iwork[17] != 0)) { + Matrix_RotateZ(gCalcMatrix, (this->fwork[20] + 90.0f) * M_DTOR, MTXF_NEW); sp80.x = 0.0f; - sp80.y = actor->fwork[21]; + sp80.y = this->fwork[21]; sp80.z = 0.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp80, &sp74); - sp6C->obj.pos.x = actor->obj.pos.x + sp74.x; - sp6C->obj.pos.y = actor->obj.pos.y + sp74.y; - sp6C->obj.pos.z = actor->obj.pos.z; + sp6C->obj.pos.x = this->obj.pos.x + sp74.x; + sp6C->obj.pos.y = this->obj.pos.y + sp74.y; + sp6C->obj.pos.z = this->obj.pos.z; } } - } else if (actor->iwork[2] == 1) { - sp70 = &gActors[actor->iwork[1] - 1]; - if ((actor->iwork[13] == sp70->iwork[13]) && (actor->iwork[16] == 0)) { + } else if (this->iwork[2] == 1) { + sp70 = &gActors[this->iwork[1] - 1]; + if ((this->iwork[13] == sp70->iwork[13]) && (this->iwork[16] == 0)) { i = 1; - if (!((sp70->obj.id == OBJ_ACTOR_267) && (sp70->obj.status == OBJ_ACTIVE))) { - actor->iwork[16] = 1; + if (!((sp70->obj.id == OBJ_ACTOR_AQ_JELLYFISH) && (sp70->obj.status == OBJ_ACTIVE))) { + this->iwork[16] = 1; i = 0; } if (i != 0) { - if (!actor->timer_0C0 && sp70->timer_0C0 >= 2) { - actor->timer_0C0 = sp70->timer_0C0; - actor->timer_0C6 = sp70->timer_0C6; + if (!this->timer_0C0 && sp70->timer_0C0 >= 2) { + this->timer_0C0 = sp70->timer_0C0; + this->timer_0C6 = sp70->timer_0C6; } - if (actor->timer_0C0 && !sp70->timer_0C0 >= 2) { - sp70->timer_0C0 = actor->timer_0C0; - sp70->timer_0C6 = actor->timer_0C6; + if (this->timer_0C0 && !sp70->timer_0C0 >= 2) { + sp70->timer_0C0 = this->timer_0C0; + sp70->timer_0C6 = this->timer_0C6; } } @@ -5803,138 +5778,138 @@ void Aquas_Actor267_Update(Actor* actor) { Effect_SpawnTimedSfxAtPos(&sp70->obj.pos, NA_SE_EN_WT_SPARK_BEAM); } - Aquas_801A92EC(actor, sp70->obj.pos.x, sp70->obj.pos.y, sp70->obj.pos.z, actor->iwork[13] + 2, i); + Aquas_801A92EC(this, sp70->obj.pos.x, sp70->obj.pos.y, sp70->obj.pos.z, this->iwork[13] + 2, i); } } - if (((gGameFrameCount % 4) == 0)) { - func_effect_8007C120(actor->obj.pos.x + RAND_FLOAT_CENTERED(100.0f), - actor->obj.pos.y + RAND_FLOAT_CENTERED(100.0f), - actor->obj.pos.z + RAND_FLOAT_CENTERED(50.0f), actor->vel.x, actor->vel.y, actor->vel.z, - 0.05f + RAND_FLOAT(0.03f), 10); + if ((gGameFrameCount % 4) == 0) { + Effect_Effect390_Spawn(this->obj.pos.x + RAND_FLOAT_CENTERED(100.0f), + this->obj.pos.y + RAND_FLOAT_CENTERED(100.0f), + this->obj.pos.z + RAND_FLOAT_CENTERED(50.0f), this->vel.x, this->vel.y, this->vel.z, + 0.05f + RAND_FLOAT(0.03f), 10); } - if (actor->timer_0BE == 0) { + if (this->timer_0BE == 0) { D_i3_801C41B8[18] = 255.0f; D_i3_801C41B8[19] = 255.0f; D_i3_801C41B8[20] = 255.0f; - actor->timer_0BE = 10; + this->timer_0BE = 10; } - if (actor->iwork[3] == 0) { - Math_SmoothStepToF(&actor->fwork[1], 30.0f, 0.1f, 1.0f, 0.00001f); + if (this->iwork[3] == 0) { + Math_SmoothStepToF(&this->fwork[1], 30.0f, 0.1f, 1.0f, 0.00001f); } else { - Math_SmoothStepToF(&actor->fwork[1], 100.0f, 0.1f, 1.0f, 0.00001f); + Math_SmoothStepToF(&this->fwork[1], 100.0f, 0.1f, 1.0f, 0.00001f); } - if (actor->timer_0BC == 0) { - actor->timer_0BC = 100; - actor->iwork[3]++; - actor->iwork[3] &= 1; + if (this->timer_0BC == 0) { + this->timer_0BC = 100; + this->iwork[3]++; + this->iwork[3] &= 1; } - actor->animFrame += 2; - if (actor->animFrame >= Animation_GetFrameCount(&D_AQ_6023780)) { - actor->animFrame = 0; + this->animFrame += 2; + if (this->animFrame >= Animation_GetFrameCount(&aAqJellyfishAnim)) { + this->animFrame = 0; } - if (actor->iwork[4] < 30) { - actor->fwork[2] += D_i3_801C0344[0].x; - actor->fwork[3] += D_i3_801C0344[0].y; - actor->fwork[4] += D_i3_801C0344[0].z; - if (actor->fwork[2] < 0.0f) { - actor->fwork[2] = actor->fwork[3] = actor->fwork[4] = 0.0f; + if (this->iwork[4] < 30) { + this->fwork[2] += D_i3_801C0344[0].x; + this->fwork[3] += D_i3_801C0344[0].y; + this->fwork[4] += D_i3_801C0344[0].z; + if (this->fwork[2] < 0.0f) { + this->fwork[2] = this->fwork[3] = this->fwork[4] = 0.0f; } } else { - actor->fwork[2] += D_i3_801C0344[1].x; - actor->fwork[3] += D_i3_801C0344[1].y; - actor->fwork[4] += D_i3_801C0344[1].z; - if (actor->fwork[3] >= 160.0f) { - actor->fwork[2] = 213.0f; - actor->fwork[3] = 160.0f; - actor->fwork[4] = 255.0f; + this->fwork[2] += D_i3_801C0344[1].x; + this->fwork[3] += D_i3_801C0344[1].y; + this->fwork[4] += D_i3_801C0344[1].z; + if (this->fwork[3] >= 160.0f) { + this->fwork[2] = 213.0f; + this->fwork[3] = 160.0f; + this->fwork[4] = 255.0f; } } for (i = 0; i < 2; i++) { - if (actor->iwork[i + 5] < 30) { - actor->fwork[i + 5] += D_i3_801C0344[2].x; - actor->fwork[i + 7] += D_i3_801C0344[2].y; - actor->fwork[i + 9] += D_i3_801C0344[2].z; - if (actor->fwork[i + 7] < 0.0f) { - actor->fwork[i + 5] = actor->fwork[i + 7] = actor->fwork[i + 9] = 0.0f; + if (this->iwork[i + 5] < 30) { + this->fwork[i + 5] += D_i3_801C0344[2].x; + this->fwork[i + 7] += D_i3_801C0344[2].y; + this->fwork[i + 9] += D_i3_801C0344[2].z; + if (this->fwork[i + 7] < 0.0f) { + this->fwork[i + 5] = this->fwork[i + 7] = this->fwork[i + 9] = 0.0f; } } else { - actor->fwork[i + 5] += D_i3_801C0344[3].x; - actor->fwork[i + 7] += D_i3_801C0344[3].y; - actor->fwork[i + 9] += D_i3_801C0344[3].z; - if (actor->fwork[i + 7] >= 255.0f) { - actor->fwork[i + 5] = 197.0f; - actor->fwork[i + 7] = 255.0f; - actor->fwork[i + 9] = 231.0f; + this->fwork[i + 5] += D_i3_801C0344[3].x; + this->fwork[i + 7] += D_i3_801C0344[3].y; + this->fwork[i + 9] += D_i3_801C0344[3].z; + if (this->fwork[i + 7] >= 255.0f) { + this->fwork[i + 5] = 197.0f; + this->fwork[i + 7] = 255.0f; + this->fwork[i + 9] = 231.0f; } } } for (i = 0; i < 3; i++) { - it0 = i * 12 + 3 * actor->iwork[10 + i]; - Math_SmoothStepToF(&actor->fwork[11 + i], D_i3_801C0374[it0 + 0], 0.1f, 5.0f, 0.000001f); - Math_SmoothStepToF(&actor->fwork[14 + i], D_i3_801C0374[it0 + 1], 0.1f, 5.0f, 0.000001f); - Math_SmoothStepToF(&actor->fwork[17 + i], D_i3_801C0374[it0 + 2], 0.1f, 5.0f, 0.000001f); + it0 = i * 12 + 3 * this->iwork[10 + i]; + Math_SmoothStepToF(&this->fwork[11 + i], D_i3_801C0374[it0 + 0], 0.1f, 5.0f, 0.000001f); + Math_SmoothStepToF(&this->fwork[14 + i], D_i3_801C0374[it0 + 1], 0.1f, 5.0f, 0.000001f); + Math_SmoothStepToF(&this->fwork[17 + i], D_i3_801C0374[it0 + 2], 0.1f, 5.0f, 0.000001f); - it0 = 8 * i + actor->iwork[10 + i]; - if (actor->iwork[7 + i] == D_i3_801C0440[it0]) { - actor->iwork[10 + i]++; + it0 = 8 * i + this->iwork[10 + i]; + if (this->iwork[7 + i] == D_i3_801C0440[it0]) { + this->iwork[10 + i]++; } } - actor->iwork[4]++; - if (actor->iwork[4] >= 60) { - actor->iwork[4] = 0; + this->iwork[4]++; + if (this->iwork[4] >= 60) { + this->iwork[4] = 0; } - actor->iwork[5]++; - if (actor->iwork[5] >= 60) { - actor->iwork[5] = 0; + this->iwork[5]++; + if (this->iwork[5] >= 60) { + this->iwork[5] = 0; } - actor->iwork[6]++; - if (actor->iwork[6] >= 60) { - actor->iwork[6] = 0; + this->iwork[6]++; + if (this->iwork[6] >= 60) { + this->iwork[6] = 0; } - actor->iwork[7]++; - if (actor->iwork[7] >= 120) { - actor->iwork[7] = actor->iwork[10] = 0; + this->iwork[7]++; + if (this->iwork[7] >= 120) { + this->iwork[7] = this->iwork[10] = 0; } - actor->iwork[8]++; - if (actor->iwork[8] >= 60) { - actor->iwork[8] = actor->iwork[11] = 0; + this->iwork[8]++; + if (this->iwork[8] >= 60) { + this->iwork[8] = this->iwork[11] = 0; } - actor->iwork[9]++; - if (actor->iwork[9] >= 120) { - actor->iwork[9] = actor->iwork[12] = 0; + this->iwork[9]++; + if (this->iwork[9] >= 120) { + this->iwork[9] = this->iwork[12] = 0; } - if (actor->dmgType != DMG_NONE) { - actor->dmgType = DMG_NONE; - AUDIO_PLAY_SFX(NA_SE_EN_AQ_ZAKO_DAMAGE, actor->sfxSource, 4); - if (actor->damage != 31) { - actor->timer_0C0 = actor->timer_0C6 = 40; + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + AUDIO_PLAY_SFX(NA_SE_EN_AQ_ZAKO_DAMAGE, this->sfxSource, 4); + if (this->damage != 31) { + this->timer_0C0 = this->timer_0C6 = 40; } else { - actor->timer_0C0 = actor->timer_0C6 = 80; + this->timer_0C0 = this->timer_0C6 = 80; } } - if (actor->iwork[20] != 0) { - actor->iwork[20]--; + if (this->iwork[20] != 0) { + this->iwork[20]--; } - Aquas_801A96DC(actor); + Aquas_801A96DC(this); } -bool Aquas_801BC530(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { +bool Aquas_AqJellyfish_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { Vec3f sp64 = { 0.0f, 0.0f, 0.0f }; Vec3f sp58; f32 sp54 = 0.0f; @@ -6007,15 +5982,16 @@ bool Aquas_801BC530(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th } } -void Aquas_801BC91C(s32 limbIndex, Vec3f* rot, void* thisx) { +void Aquas_AqJellyfish_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { + /* Unimplemented */ } -// OBJ_ACTOR_267 draw -void Aquas_Actor267_Draw(Actor* actor) { - Vec3f sp28[30]; +void Aquas_AqJellyfish_Draw(AqJellyfish* this) { + Vec3f frameTable[30]; - Animation_GetFrameData(&D_AQ_6023780, actor->animFrame, sp28); - Animation_DrawSkeleton(3, D_AQ_602390C, sp28, Aquas_801BC530, Aquas_801BC91C, actor, gCalcMatrix); + Animation_GetFrameData(&aAqJellyfishAnim, this->animFrame, frameTable); + Animation_DrawSkeleton(3, aAqJellyfishSkel, frameTable, Aquas_AqJellyfish_OverrideLimbDraw, + Aquas_AqJellyfish_PostLimbDraw, this, gCalcMatrix); } s32 D_i3_801C04C4[9] = { @@ -6023,55 +5999,54 @@ s32 D_i3_801C04C4[9] = { DROP_GOLD_RING_3, DROP_GOLD_RING_4, DROP_NONE, DROP_1UP, }; -// OBJ_ACTOR_269 action -void Aquas_Actor269_Update(Actor* actor) { +void Aquas_AqStoneColumn_Update(AqStoneColumn* this) { s32 j; s32 i; Vec3f spA4; Vec3f sp98; - Actor* actor269; + AqStoneColumn* stoneColumn; - switch (actor->state) { + switch (this->state) { case 0: - actor->vwork[0].x = actor->obj.pos.x; - actor->vwork[0].y = actor->obj.pos.y; - actor->vwork[0].z = actor->obj.pos.z; + this->vwork[0].x = this->obj.pos.x; + this->vwork[0].y = this->obj.pos.y; + this->vwork[0].z = this->obj.pos.z; - actor->vwork[1].x = actor->obj.pos.x; - actor->vwork[1].y = actor->obj.pos.y; - actor->vwork[1].z = actor->obj.pos.z; + this->vwork[1].x = this->obj.pos.x; + this->vwork[1].y = this->obj.pos.y; + this->vwork[1].z = this->obj.pos.z; - actor->vwork[4].x = actor->obj.pos.x; - actor->vwork[4].y = actor->obj.pos.y; - actor->vwork[4].z = actor->obj.pos.z; + this->vwork[4].x = this->obj.pos.x; + this->vwork[4].y = this->obj.pos.y; + this->vwork[4].z = this->obj.pos.z; - actor->iwork[1] = actor->obj.rot.z; - if (actor->iwork[1] >= 9) { - actor->iwork[1] = 7; + this->iwork[1] = this->obj.rot.z; + if (this->iwork[1] >= 9) { + this->iwork[1] = 7; } - if (actor->obj.rot.y != 0) { - actor->health = 7650; - actor->iwork[3] = 1; - actor->state = 2; + if (this->obj.rot.y != 0) { + this->health = 7650; + this->iwork[3] = 1; + this->state = 2; } else { - actor->health = 10; - actor->info.drawType = 2; - actor->info.bonus = 1; - actor->state++; + this->health = 10; + this->info.drawType = 2; + this->info.bonus = 1; + this->state++; } - actor->obj.rot.y = actor->obj.rot.z = 0.0f; + this->obj.rot.y = this->obj.rot.z = 0.0f; break; case 1: - if (actor->dmgType != DMG_NONE) { - actor->dmgType = DMG_NONE; - if ((actor->health != 0) && (actor->iwork[3] == 0) && (actor->damage == 31)) { - actor->health -= actor->damage; - AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, actor->sfxSource, 4); - if (actor->health <= 0) { - actor->health = 0; - actor->state = 3; + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + if ((this->health != 0) && (this->iwork[3] == 0) && (this->damage == 31)) { + this->health -= this->damage; + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, this->sfxSource, 4); + if (this->health <= 0) { + this->health = 0; + this->state = 3; } } } @@ -6089,31 +6064,31 @@ void Aquas_Actor269_Update(Actor* actor) { } for (i = 0; i < 2; i++) { - for (j = 0, actor269 = gActors; j < ARRAY_COUNT(gActors); j++, actor269++) { - if (actor269->obj.status == OBJ_FREE) { - Actor_Initialize(actor269); - actor269->obj.status = OBJ_INIT; - actor269->obj.id = OBJ_ACTOR_269; - actor269->obj.pos.x = actor->vwork[i].x; - actor269->obj.pos.y = actor->vwork[i].y; - actor269->obj.pos.z = actor->vwork[i].z; - actor269->iwork[0] = i + 1; + for (j = 0, stoneColumn = &gActors[0]; j < ARRAY_COUNT(gActors); j++, stoneColumn++) { + if (stoneColumn->obj.status == OBJ_FREE) { + Actor_Initialize(stoneColumn); + stoneColumn->obj.status = OBJ_INIT; + stoneColumn->obj.id = OBJ_ACTOR_AQ_STONE_COLUMN; + stoneColumn->obj.pos.x = this->vwork[i].x; + stoneColumn->obj.pos.y = this->vwork[i].y; + stoneColumn->obj.pos.z = this->vwork[i].z; + stoneColumn->iwork[0] = i + 1; - Object_SetInfo(&actor269->info, actor269->obj.id); + Object_SetInfo(&stoneColumn->info, stoneColumn->obj.id); if (i == 0) { - actor269->fwork[0] = RAND_FLOAT(360.0f); - Matrix_RotateY(gCalcMatrix, actor269->fwork[0] * M_DTOR, MTXF_NEW); + stoneColumn->fwork[0] = RAND_FLOAT(360.0f); + Matrix_RotateY(gCalcMatrix, stoneColumn->fwork[0] * M_DTOR, MTXF_NEW); spA4.x = spA4.y = spA4.z = 5.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &spA4, &sp98); - actor269->vel.x = sp98.x; - actor269->vel.z = sp98.z; - actor269->gravity = 0.4f; - actor269->state = 5; - actor269->info.hitbox = SEGMENTED_TO_VIRTUAL(D_AQ_6030D3C); + stoneColumn->vel.x = sp98.x; + stoneColumn->vel.z = sp98.z; + stoneColumn->gravity = 0.4f; + stoneColumn->state = 5; + stoneColumn->info.hitbox = SEGMENTED_TO_VIRTUAL(D_AQ_6030D3C); } else { - actor269->state = 2; - actor269->info.hitbox = SEGMENTED_TO_VIRTUAL(D_AQ_6030D58); + stoneColumn->state = 2; + stoneColumn->info.hitbox = SEGMENTED_TO_VIRTUAL(D_AQ_6030D58); } break; } @@ -6121,62 +6096,62 @@ void Aquas_Actor269_Update(Actor* actor) { } for (j = 0; j < 10; j++) { - Aquas_SpawnDebris(&actor->vwork[4], &actor->vwork[5], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(5.0f), + Aquas_SpawnDebris(&this->vwork[4], &this->vwork[5], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(5.0f), RAND_FLOAT_CENTERED(10.0f), 58, 0.2f + RAND_FLOAT(1.0f), 200, 0); - func_effect_8007BC7C(actor->vwork[4].x, actor->vwork[4].y, actor->vwork[4].z + 50.0f, 6.0f); + Effect_Effect362_Spawn(this->vwork[4].x, this->vwork[4].y, this->vwork[4].z + 50.0f, 6.0f); } func_effect_800815DC(); - func_effect_8007D0E0(actor->vwork[4].x, actor->vwork[4].y, actor->vwork[4].z, 10.0f); + func_effect_8007D0E0(this->vwork[4].x, this->vwork[4].y, this->vwork[4].z, 10.0f); for (j = 0; j < 20; j++) { - Aquas_801AC8A8(actor->vwork[4].x + RAND_FLOAT_CENTERED(100.0f), - actor->vwork[4].y + RAND_FLOAT_CENTERED(200.0f), - actor->vwork[4].z + 100.0f + RAND_FLOAT_CENTERED(200.0f), 6.0f, 2); + Aquas_Effect366_Spawn(this->vwork[4].x + RAND_FLOAT_CENTERED(100.0f), + this->vwork[4].y + RAND_FLOAT_CENTERED(200.0f), + this->vwork[4].z + 100.0f + RAND_FLOAT_CENTERED(200.0f), 6.0f, 2); } func_effect_800815DC(); - func_effect_8007D0E0(actor->vwork[4].x, actor->vwork[4].y, actor->vwork[4].z + 150.0f, 10.0f); - actor->timer_0BC = 4; - actor->state = 4; + func_effect_8007D0E0(this->vwork[4].x, this->vwork[4].y, this->vwork[4].z + 150.0f, 10.0f); + this->timer_0BC = 4; + this->state = 4; break; case 4: - if (actor->timer_0BC == 0) { - actor->obj.pos.x = actor->vwork[4].x; - actor->obj.pos.y = actor->vwork[4].y; - actor->obj.pos.z = actor->vwork[4].z; - actor->itemDrop = D_i3_801C04C4[actor->iwork[1]]; - Actor_Despawn(actor); - Object_Kill(&actor->obj, actor->sfxSource); - Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_OB_AQ_PILLAR_BROKE); + if (this->timer_0BC == 0) { + this->obj.pos.x = this->vwork[4].x; + this->obj.pos.y = this->vwork[4].y; + this->obj.pos.z = this->vwork[4].z; + this->itemDrop = D_i3_801C04C4[this->iwork[1]]; + Actor_Despawn(this); + Object_Kill(&this->obj, this->sfxSource); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_OB_AQ_PILLAR_BROKE); } break; case 5: - Math_SmoothStepToAngle(&actor->obj.rot.y, actor->fwork[0], 0.1f, 10.0f, 0.0001f); - Math_SmoothStepToAngle(&actor->obj.rot.x, 90.0f, 0.1f, 1.0f, 0.0001f); - if (((gGameFrameCount % 2) == 0) && (actor->iwork[2] == 0)) { - Aquas_801AC8A8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f), - actor->obj.pos.y + RAND_RANGE(-45.0f, 105.0f), - actor->obj.pos.z + RAND_FLOAT_CENTERED(200.0f), 6.0f, 2); + Math_SmoothStepToAngle(&this->obj.rot.y, this->fwork[0], 0.1f, 10.0f, 0.0001f); + Math_SmoothStepToAngle(&this->obj.rot.x, 90.0f, 0.1f, 1.0f, 0.0001f); + if (((gGameFrameCount % 2) == 0) && (this->iwork[2] == 0)) { + Aquas_Effect366_Spawn(this->obj.pos.x + RAND_FLOAT_CENTERED(200.0f), + this->obj.pos.y + RAND_RANGE(-45.0f, 105.0f), + this->obj.pos.z + RAND_FLOAT_CENTERED(200.0f), 6.0f, 2); } - if ((actor->obj.pos.y < (gGroundHeight + 30.0f)) && (actor->iwork[2] == 0)) { - actor->iwork[2] = 1; - actor->vel.x = actor->vel.y = actor->vel.z = actor->gravity = 0.0f; - Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_OB_AQ_ROCK_BOUND); + if ((this->obj.pos.y < (gGroundHeight + 30.0f)) && (this->iwork[2] == 0)) { + this->iwork[2] = 1; + this->vel.x = this->vel.y = this->vel.z = this->gravity = 0.0f; + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_OB_AQ_ROCK_BOUND); for (j = 0; j < 6; j++) { - func_effect_8007B8F8(actor->obj.pos.x + RAND_FLOAT_CENTERED(100.0f), - actor->obj.pos.y + RAND_RANGE(-9.0f, 21.0f), - actor->obj.pos.z + RAND_FLOAT_CENTERED(200.0f), 20.0f); + Effect_Effect364_Spawn(this->obj.pos.x + RAND_FLOAT_CENTERED(100.0f), + this->obj.pos.y + RAND_RANGE(-9.0f, 21.0f), + this->obj.pos.z + RAND_FLOAT_CENTERED(200.0f), 20.0f); } } break; } } -void Aquas_801BD17C(s32 limbIndex, Vec3f* rot, void* thisx) { +void Aquas_AqStoneColumn_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp2C = { 0.0f, 0.0f, 0.0f }; Actor* this = (Actor*) thisx; @@ -6200,18 +6175,18 @@ void Aquas_801BD17C(s32 limbIndex, Vec3f* rot, void* thisx) { } } -// OBJ_ACTOR_269 draw -void Aquas_Actor269_Draw(Actor* actor) { - Vec3f sp40[30]; +void Aquas_AqStoneColumn_Draw(AqStoneColumn* this) { + Vec3f frameTable[30]; - if (actor->state != 0) { + if (this->state != 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_55); - switch (actor->iwork[0]) { + switch (this->iwork[0]) { case 0: - if (actor->state != 0) { - if ((actor->iwork[3] == 0) && (actor->info.drawType == 2)) { - Animation_GetFrameData(&D_AQ_6014438, 0, sp40); - Animation_DrawSkeleton(3, D_AQ_6014504, sp40, NULL, Aquas_801BD17C, actor, gCalcMatrix); + if (this->state != 0) { + if ((this->iwork[3] == 0) && (this->info.drawType == 2)) { + Animation_GetFrameData(&aAqStoneColumnAnim, 0, frameTable); + Animation_DrawSkeleton(3, aAqStoneColumnSkel, frameTable, NULL, + Aquas_AqStoneColumn_PostLimbDraw, this, gCalcMatrix); } else { gSPDisplayList(gMasterDisp++, D_AQ_6014520); } @@ -6227,210 +6202,210 @@ void Aquas_Actor269_Draw(Actor* actor) { } } -void Aquas_801BD3B0(Actor* actor, f32 x, f32 y, f32 z) { +void Aquas_801BD3B0(AqFishGroup* this, f32 x, f32 y, f32 z) { f32 temp; - Vec3f sp38; - Vec3f sp2C; + Vec3f src; + Vec3f dest; - Math_SmoothStepToAngle(&actor->obj.rot.y, actor->fwork[6], 0.1f, 100.0f, 0.00001f); - Math_SmoothStepToAngle(&actor->obj.rot.x, actor->fwork[7], 0.1f, 100.0f, 0.00001f); + Math_SmoothStepToAngle(&this->obj.rot.y, this->fwork[6], 0.1f, 100.0f, 0.00001f); + Math_SmoothStepToAngle(&this->obj.rot.x, this->fwork[7], 0.1f, 100.0f, 0.00001f); - if (((gGameFrameCount % 4) == 0)) { - actor->fwork[6] = Math_RadToDeg(Math_Atan2F(x, z)); + if ((gGameFrameCount % 4) == 0) { + this->fwork[6] = Math_RadToDeg(Math_Atan2F(x, z)); temp = sqrtf(SQ(x) + SQ(z)); - actor->fwork[7] = Math_RadToDeg(-Math_Atan2F(y, temp)); + this->fwork[7] = Math_RadToDeg(-Math_Atan2F(y, temp)); - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); - Math_SmoothStepToF(&actor->fwork[4], 5.0f, 0.1f, 10.0f, 0); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Math_SmoothStepToF(&this->fwork[4], 5.0f, 0.1f, 10.0f, 0); - sp38.z = actor->fwork[4]; - if (actor->iwork[2] != 0) { - sp38.z = 50.0f; + src.z = this->fwork[4]; + if (this->iwork[2] != 0) { + src.z = 50.0f; } - sp38.x = sp38.y = 0.0f; + src.x = src.y = 0.0f; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp38, &sp2C); + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - actor->vel.x = sp2C.x; - actor->vel.y = sp2C.y; - actor->vel.z = sp2C.z; + this->vel.x = dest.x; + this->vel.y = dest.y; + this->vel.z = dest.z; } } f32 D_i3_801C04F4[4] = { 700.0f, 300.0f, 600.0f, 400.0f }; -// OBJ_ACTOR_268 action -void Aquas_Actor268_Update(Actor* actor) { - s32 sp6C; - s32 sp68; - s32 sp64; + +void Aquas_AqFishGroup_Update(AqFishGroup* this) { + s32 j; + s32 i; + s32 fishIndex; f32 var_fs0; f32 sp5C; f32 sp58; f32 sp54; - Actor* actor268; + Actor* fishGroup; - if (actor->state == 2) { - var_fs0 = (actor->iwork[3] != 0) ? 2800.0f : 9000.0f; - if (fabsf(actor->fwork[5] - actor->obj.pos.z) >= var_fs0) { - actor->state = 3; - if (actor->iwork[0] == 0) { - AUDIO_PLAY_SFX(NA_SE_OB_FISH_AWAY, actor->sfxSource, 4); + if (this->state == 2) { + var_fs0 = (this->iwork[3] != 0) ? 2800.0f : 9000.0f; + if (fabsf(this->fwork[5] - this->obj.pos.z) >= var_fs0) { + this->state = 3; + if (this->iwork[0] == 0) { + AUDIO_PLAY_SFX(NA_SE_OB_FISH_AWAY, this->sfxSource, 4); } } else { // needed to match } } - switch (actor->state) { + switch (this->state) { case 0: - if (actor->obj.rot.z != 0) { - actor->iwork[3] = 1; - actor->obj.rot.z = 0.0f; + if (this->obj.rot.z != 0) { + this->iwork[3] = 1; + this->obj.rot.z = 0.0f; } - actor->state = 1; - actor->fwork[5] = actor->obj.pos.z; + this->state = 1; + this->fwork[5] = this->obj.pos.z; break; case 1: - sp64 = actor->index; - for (sp68 = 0; sp68 < 15; sp68++) { - for (sp6C = 0, actor268 = gActors; sp6C < ARRAY_COUNT(gActors); sp6C++, actor268++) { - if (actor268->obj.status == OBJ_FREE) { - Actor_Initialize(actor268); - actor268->obj.status = OBJ_INIT; - actor268->obj.id = OBJ_ACTOR_268; - actor268->iwork[4] = sp64; - actor268->iwork[0] = sp68 + 1; - actor268->iwork[3] = actor->iwork[3]; + fishIndex = this->index; + for (i = 0; i < 15; i++) { + for (j = 0, fishGroup = &gActors[0]; j < ARRAY_COUNT(gActors); j++, fishGroup++) { + if (fishGroup->obj.status == OBJ_FREE) { + Actor_Initialize(fishGroup); + fishGroup->obj.status = OBJ_INIT; + fishGroup->obj.id = OBJ_ACTOR_AQ_FISHGROUP; + fishGroup->iwork[4] = fishIndex; + fishGroup->iwork[0] = i + 1; + fishGroup->iwork[3] = this->iwork[3]; - sp64 = sp6C; + fishIndex = j; var_fs0 = 100.0f; if (Rand_ZeroOne() < 0.5f) { var_fs0 = -100.0f; } - actor268->obj.pos.x = actor->obj.pos.x + ((s32) (sp68 % 8U) * var_fs0) + RAND_FLOAT(50.0f); - actor268->obj.pos.y = - actor->obj.pos.y + ((s32) (sp68 % 8U) * (var_fs0 / 2.0f)) + RAND_FLOAT(30.0f); - actor268->obj.pos.z = actor->obj.pos.z + (sp68 * 20.0f) + RAND_FLOAT(-18.0f); - actor268->animFrame = RAND_FLOAT(20.0f); - actor268->fwork[5] = actor->fwork[5]; - actor268->state = 2; + fishGroup->obj.pos.x = this->obj.pos.x + ((s32) (i % 8U) * var_fs0) + RAND_FLOAT(50.0f); + fishGroup->obj.pos.y = + this->obj.pos.y + ((s32) (i % 8U) * (var_fs0 / 2.0f)) + RAND_FLOAT(30.0f); + fishGroup->obj.pos.z = this->obj.pos.z + (i * 20.0f) + RAND_FLOAT(-18.0f); + fishGroup->animFrame = RAND_FLOAT(20.0f); + fishGroup->fwork[5] = this->fwork[5]; + fishGroup->state = 2; - Object_SetInfo(&actor268->info, actor268->obj.id); + Object_SetInfo(&fishGroup->info, fishGroup->obj.id); break; } } } - actor->state = 2; + this->state = 2; break; case 2: - if (actor->obj.pos.y < gGroundHeight + 30.0f) { - actor->obj.pos.y = gGroundHeight + 30.0f; + if (this->obj.pos.y < gGroundHeight + 30.0f) { + this->obj.pos.y = gGroundHeight + 30.0f; } - if ((actor->iwork[2] != 0) || (actor->timer_0BE != 0)) { - actor->timer_0BC = 0; + if ((this->iwork[2] != 0) || (this->timer_0BE != 0)) { + this->timer_0BC = 0; } else { - Math_SmoothStepToF(&actor->fwork[3], D_i3_801C04F4[actor->iwork[1]], 0.1f, 30.0f, 0.0001f); - Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].cam.eye.z - gPathProgress - actor->fwork[3], 0.1f, - 30.0f, 0.00001f); + Math_SmoothStepToF(&this->fwork[3], D_i3_801C04F4[this->iwork[1]], 0.1f, 30.0f, 0.0001f); + Math_SmoothStepToF(&this->obj.pos.z, gPlayer[0].cam.eye.z - gPathProgress - this->fwork[3], 0.1f, 30.0f, + 0.00001f); } - if ((actor->timer_0BC == 0) && (actor->iwork[2] == 0) && (actor->timer_0BE == 0)) { - actor->timer_0BC = 60; - actor->fwork[1] = RAND_FLOAT_CENTERED(300.0f); - actor->fwork[2] = 50.0f + RAND_FLOAT_CENTERED(100.0f); - if (actor->fwork[2] < gGroundHeight + 30.0f) { - actor->fwork[2] = gGroundHeight + 30.0f; + if ((this->timer_0BC == 0) && (this->iwork[2] == 0) && (this->timer_0BE == 0)) { + this->timer_0BC = 60; + this->fwork[1] = RAND_FLOAT_CENTERED(300.0f); + this->fwork[2] = 50.0f + RAND_FLOAT_CENTERED(100.0f); + if (this->fwork[2] < gGroundHeight + 30.0f) { + this->fwork[2] = gGroundHeight + 30.0f; } - actor->iwork[1]++; - actor->iwork[1] &= 3; + this->iwork[1]++; + this->iwork[1] &= 3; } - sp5C = gPlayer[0].pos.x - actor->obj.pos.x; - sp58 = gPlayer[0].pos.y - actor->obj.pos.y; - sp54 = gPlayer[0].trueZpos - actor->obj.pos.z; + sp5C = gPlayer[0].pos.x - this->obj.pos.x; + sp58 = gPlayer[0].pos.y - this->obj.pos.y; + sp54 = gPlayer[0].trueZpos - this->obj.pos.z; - if (actor->timer_0BE == 0) { - actor->iwork[2] = 0; - if (actor->iwork[0] == 0) { + if (this->timer_0BE == 0) { + this->iwork[2] = 0; + if (this->iwork[0] == 0) { if (D_i3_801C4190[5] == 0) { - sp5C = gPlayer[0].pos.x + actor->fwork[1] - actor->obj.pos.x; - sp58 = gPlayer[0].pos.y - 100.0f + actor->fwork[2] - actor->obj.pos.y; - sp54 = gPlayer[0].trueZpos - actor->fwork[3] - actor->obj.pos.z; + sp5C = gPlayer[0].pos.x + this->fwork[1] - this->obj.pos.x; + sp58 = gPlayer[0].pos.y - 100.0f + this->fwork[2] - this->obj.pos.y; + sp54 = gPlayer[0].trueZpos - this->fwork[3] - this->obj.pos.z; } else if ((D_i3_801C41B8[21] != 0) && (D_i3_801C41B8[22] != 0) && (D_i3_801C41B8[23] != 0)) { - sp5C = D_i3_801C41B8[21] - actor->obj.pos.x; - sp58 = D_i3_801C41B8[22] - actor->obj.pos.y; - sp54 = D_i3_801C41B8[23] - actor->obj.pos.z; - actor->iwork[2] = 1; + sp5C = D_i3_801C41B8[21] - this->obj.pos.x; + sp58 = D_i3_801C41B8[22] - this->obj.pos.y; + sp54 = D_i3_801C41B8[23] - this->obj.pos.z; + this->iwork[2] = 1; } } else if (D_i3_801C4190[5] == 0) { - actor268 = &gActors[actor->iwork[4]]; - if ((actor->iwork[0] - 1 == actor268->iwork[0]) && (actor268->obj.status != OBJ_FREE) && - (actor268->obj.id == OBJ_ACTOR_268)) { - sp5C = actor268->obj.pos.x + (actor->fwork[1] / 2.0f) - actor->obj.pos.x; - sp58 = actor268->obj.pos.y + (actor->fwork[2] / 2.0f) - actor->obj.pos.y; - sp54 = actor268->obj.pos.z - actor->obj.pos.z; + fishGroup = &gActors[this->iwork[4]]; + if ((this->iwork[0] - 1 == fishGroup->iwork[0]) && (fishGroup->obj.status != OBJ_FREE) && + (fishGroup->obj.id == OBJ_ACTOR_AQ_FISHGROUP)) { + sp5C = fishGroup->obj.pos.x + (this->fwork[1] / 2.0f) - this->obj.pos.x; + sp58 = fishGroup->obj.pos.y + (this->fwork[2] / 2.0f) - this->obj.pos.y; + sp54 = fishGroup->obj.pos.z - this->obj.pos.z; } else { - actor->iwork[0]--; - sp5C = gPlayer[0].pos.x + actor->fwork[1] - actor->obj.pos.x; - sp58 = gPlayer[0].pos.y + actor->fwork[2] - actor->obj.pos.y; - sp54 = gPlayer[0].trueZpos - actor->fwork[3] - actor->obj.pos.z; - if (actor->iwork[0] < 0) { - actor->iwork[0] = 0; + this->iwork[0]--; + sp5C = gPlayer[0].pos.x + this->fwork[1] - this->obj.pos.x; + sp58 = gPlayer[0].pos.y + this->fwork[2] - this->obj.pos.y; + sp54 = gPlayer[0].trueZpos - this->fwork[3] - this->obj.pos.z; + if (this->iwork[0] < 0) { + this->iwork[0] = 0; } } } else if ((D_i3_801C41B8[21] != 0) && (D_i3_801C41B8[22] != 0) && (D_i3_801C41B8[23] != 0)) { - sp68 = actor->iwork[0]; + i = this->iwork[0]; var_fs0 = 50.0f; if (Rand_ZeroOne() < 0.5f) { var_fs0 = -50.0f; } - sp5C = D_i3_801C41B8[21] + ((s32) (sp68 % 8U) * var_fs0) + RAND_FLOAT(50.0f) - actor->obj.pos.x; - sp58 = D_i3_801C41B8[22] + ((s32) (sp68 % 8U) * (var_fs0 / 2.0f)) + RAND_FLOAT(50.0f) - - actor->obj.pos.y; - sp54 = D_i3_801C41B8[23] + RAND_FLOAT(50.0f) - actor->obj.pos.z; - actor->iwork[2] = 1; + sp5C = D_i3_801C41B8[21] + ((s32) (i % 8U) * var_fs0) + RAND_FLOAT(50.0f) - this->obj.pos.x; + sp58 = + D_i3_801C41B8[22] + ((s32) (i % 8U) * (var_fs0 / 2.0f)) + RAND_FLOAT(50.0f) - this->obj.pos.y; + sp54 = D_i3_801C41B8[23] + RAND_FLOAT(50.0f) - this->obj.pos.z; + this->iwork[2] = 1; } if (1) {} } - if ((actor->iwork[2] != 0) && (D_i3_801C4190[5] == 0)) { - actor->iwork[2] = 0; - actor->fwork[4] = 40.0f; - actor->timer_0BE = 20; + if ((this->iwork[2] != 0) && (D_i3_801C4190[5] == 0)) { + this->iwork[2] = 0; + this->fwork[4] = 40.0f; + this->timer_0BE = 20; } - Aquas_801BD3B0(actor, sp5C, sp58, sp54); + Aquas_801BD3B0(this, sp5C, sp58, sp54); break; case 3: - sp5C = gPlayer[0].pos.x + actor->fwork[1] - actor->obj.pos.x; - sp58 = gPlayer[0].pos.y + actor->fwork[2] - actor->obj.pos.y; - sp54 = gPlayer[0].trueZpos + 10000.0f - actor->fwork[3] - actor->obj.pos.z; + sp5C = gPlayer[0].pos.x + this->fwork[1] - this->obj.pos.x; + sp58 = gPlayer[0].pos.y + this->fwork[2] - this->obj.pos.y; + sp54 = gPlayer[0].trueZpos + 10000.0f - this->fwork[3] - this->obj.pos.z; - actor->iwork[2] = 1; + this->iwork[2] = 1; - Aquas_801BD3B0(actor, sp5C, sp58, sp54); + Aquas_801BD3B0(this, sp5C, sp58, sp54); - if ((gPlayer[0].trueZpos + 1000.0f) < actor->obj.pos.z) { - Object_Kill(&actor->obj, actor->sfxSource); + if ((gPlayer[0].trueZpos + 1000.0f) < this->obj.pos.z) { + Object_Kill(&this->obj, this->sfxSource); } break; } - actor->animFrame++; - if (Animation_GetFrameCount(&D_AQ_60135E0) < actor->animFrame) { - actor->animFrame = 0; + this->animFrame++; + if (Animation_GetFrameCount(&aAqFishGroupAnim) < this->animFrame) { + this->animFrame = 0; } } -bool Aquas_801BDDFC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { +bool Aquas_AqFishGroup_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); if ((limbIndex == 1) || (limbIndex == 2) || (limbIndex == 5)) { gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); @@ -6438,13 +6413,14 @@ bool Aquas_801BDDFC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th return false; } -// OBJ_ACTOR_268 draw -void Aquas_Actor268_Draw(Actor* actor) { - Animation_GetFrameData(&D_AQ_60135E0, actor->animFrame, actor->vwork); - if (actor->iwork[3] == 0) { - Animation_DrawSkeleton(1, D_AQ_60136CC, actor->vwork, Aquas_801BDDFC, NULL, actor, &gIdentityMatrix); +void Aquas_AqFishGroup_Draw(AqFishGroup* this) { + Animation_GetFrameData(&aAqFishGroupAnim, this->animFrame, this->vwork); + if (this->iwork[3] == 0) { + Animation_DrawSkeleton(1, aAqFishGroupSkel1, this->vwork, Aquas_AqFishGroup_OverrideLimbDraw, NULL, this, + &gIdentityMatrix); } else { - Animation_DrawSkeleton(1, D_AQ_60137CC, actor->vwork, Aquas_801BDDFC, NULL, actor, &gIdentityMatrix); + Animation_DrawSkeleton(1, aAqFishGroupSkel2, this->vwork, Aquas_AqFishGroup_OverrideLimbDraw, NULL, this, + &gIdentityMatrix); } } @@ -6481,7 +6457,7 @@ f32 D_i3_801C0828[51] = { }; void Aquas_801BDF14(void) { - Actor* actor = &gActors[1]; + ActorCutscene* actor = &gActors[1]; s32 i; for (i = 0; i < 50; i++, actor++) { @@ -6501,44 +6477,43 @@ void Aquas_801BDF14(void) { } } -void Aquas_801BE034(Actor* actor) { +void Aquas_CsAqFishGroup_Update(AqFishGroup* this) { f32 temp; - if (actor->timer_0BC == 0) { - actor->fwork[0] = 10.0f; - temp = D_i3_801C0828[actor->iwork[2]]; - Math_SmoothStepToAngle(&actor->rot_0F4.y, temp, 1.0f, 100.0f, 0.00001f); + if (this->timer_0BC == 0) { + this->fwork[0] = 10.0f; + temp = D_i3_801C0828[this->iwork[2]]; + Math_SmoothStepToAngle(&this->rot_0F4.y, temp, 1.0f, 100.0f, 0.00001f); } - actor->iwork[0]++; - if (actor->iwork[0] >= Animation_GetFrameCount(&D_AQ_60135E0)) { - actor->iwork[0] = 0; + this->iwork[0]++; + if (this->iwork[0] >= Animation_GetFrameCount(&aAqFishGroupAnim)) { + this->iwork[0] = 0; } if (gPlayer[0].csState >= 5) { - Object_Kill(&actor->obj, actor->sfxSource); + Object_Kill(&this->obj, this->sfxSource); } } -void Aquas_801BE0F0(Actor* actor) { +void Aquas_801BE0F0(ActorCutscene* this) { RCP_SetupDL(&gMasterDisp, SETUPDL_61); Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 255, 255, 255); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); Matrix_SetGfxMtx(&gMasterDisp); - Animation_GetFrameData(&D_AQ_60135E0, actor->iwork[0], actor->vwork); - Animation_DrawSkeleton(1, D_AQ_60136CC, actor->vwork, NULL, NULL, actor, &gIdentityMatrix); + Animation_GetFrameData(&aAqFishGroupAnim, this->iwork[0], this->vwork); + Animation_DrawSkeleton(1, aAqFishGroupSkel1, this->vwork, NULL, NULL, this, &gIdentityMatrix); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); } -// OBJ_SCENERY_126 draw -void Aquas_Scenery126_Draw(Scenery* scenery) { +void Aquas_AqBump2_Draw(AqBump2* this) { Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_AQ_600EEF0); + gSPDisplayList(gMasterDisp++, aAqBump2DL); } -void Aquas_801BE274(Actor* actor, f32 yRot, f32 xRot) { +void Aquas_801BE274(AqOyster* this, f32 yRot, f32 xRot) { Vec3f sp64; Vec3f sp58; Vec3f sp4C = { 0.0f, 0.0f, 0.0f }; @@ -6552,9 +6527,9 @@ void Aquas_801BE274(Actor* actor, f32 yRot, f32 xRot) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp40, &sp64); - sp64.x += actor->obj.pos.x; - sp64.y += actor->obj.pos.y + 8.0f; - sp64.z = actor->obj.pos.z; + sp64.x += this->obj.pos.x; + sp64.y += this->obj.pos.y + 8.0f; + sp64.z = this->obj.pos.z; sp40.x = sp40.y = 0.0f; sp40.z = 80.0f; @@ -6564,8 +6539,7 @@ void Aquas_801BE274(Actor* actor, f32 yRot, f32 xRot) { sp58.z, 1.0f); } -// OBJ_ACTOR_270 action -void Aquas_Actor270_Update(Actor* actor) { +void Aquas_AqOyster_Update(AqOyster* this) { s32 i; f32 sp68; f32 sp64; @@ -6573,58 +6547,58 @@ void Aquas_Actor270_Update(Actor* actor) { f32 sp5C; f32 sp58; - switch (actor->state) { + switch (this->state) { case 0: - actor->health = 30; - actor->fwork[0] = 1.0f; - actor->fwork[1] = 0.9f; - actor->fwork[2] = 0.8f; - actor->state++; + this->health = 30; + this->fwork[0] = 1.0f; + this->fwork[1] = 0.9f; + this->fwork[2] = 0.8f; + this->state++; break; case 1: - if (fabsf(gPlayer[0].pos.z - actor->obj.pos.z) <= 3000.0f) { - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_AQ_60314E4); - actor->info.damage = 0; - actor->info.bonus = 1; - actor->timer_0BC = 40.0f + RAND_FLOAT(30.0f); - actor->state++; + if (fabsf(gPlayer[0].pos.z - this->obj.pos.z) <= 3000.0f) { + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_AQ_60314E4); + this->info.damage = 0; + this->info.bonus = 1; + this->timer_0BC = 40.0f + RAND_FLOAT(30.0f); + this->state++; } break; case 2: - actor->animFrame++; - if (actor->animFrame == 10) { + this->animFrame++; + if (this->animFrame == 10) { for (i = 0; i < 10; i++) { - Aquas_801AC8A8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f), - actor->obj.pos.y + 50.0f + RAND_FLOAT_CENTERED(70.0f), actor->obj.pos.z + 100.0f, - 3.0f, 2); + Aquas_Effect366_Spawn(this->obj.pos.x + RAND_FLOAT_CENTERED(200.0f), + this->obj.pos.y + 50.0f + RAND_FLOAT_CENTERED(70.0f), + this->obj.pos.z + 100.0f, 3.0f, 2); } } - if ((actor->animFrame == 18) && (actor->health != 0)) { - actor->animFrame = 17; - if ((fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) > 1000.0f) && (actor->timer_0BC < 20) && - ((actor->timer_0BC & 3) == 0)) { - sp68 = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(200.0f) - actor->obj.pos.x; - sp64 = gPlayer[0].pos.y + RAND_FLOAT_CENTERED(200.0f) - actor->obj.pos.y; - sp60 = gPlayer[0].trueZpos - actor->obj.pos.z; + if ((this->animFrame == 18) && (this->health != 0)) { + this->animFrame = 17; + if ((fabsf(this->obj.pos.z - gPlayer[0].trueZpos) > 1000.0f) && (this->timer_0BC < 20) && + ((this->timer_0BC & 3) == 0)) { + sp68 = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(200.0f) - this->obj.pos.x; + sp64 = gPlayer[0].pos.y + RAND_FLOAT_CENTERED(200.0f) - this->obj.pos.y; + sp60 = gPlayer[0].trueZpos - this->obj.pos.z; sp58 = Math_RadToDeg(Math_Atan2F(sp68, sp60)); sp5C = Math_RadToDeg(-Math_Atan2F(sp64, sqrtf(SQ(sp68) + SQ(sp60)))); - Aquas_801BE274(actor, sp58, sp5C); + Aquas_801BE274(this, sp58, sp5C); - if (actor->timer_0BC == 0) { - actor->timer_0BC = 40.0f + RAND_FLOAT(30.0f); + if (this->timer_0BC == 0) { + this->timer_0BC = 40.0f + RAND_FLOAT(30.0f); } } } - if (actor->animFrame >= Animation_GetFrameCount(&D_AQ_602201C)) { - actor->info.bonus = 0; - actor->animFrame = Animation_GetFrameCount(&D_AQ_602201C) - 1; - actor->state++; + if (this->animFrame >= Animation_GetFrameCount(&aAqOysterAnim)) { + this->info.bonus = 0; + this->animFrame = Animation_GetFrameCount(&aAqOysterAnim) - 1; + this->state++; } break; @@ -6632,75 +6606,80 @@ void Aquas_Actor270_Update(Actor* actor) { break; } - if (actor->dmgType != DMG_NONE) { - actor->dmgType = DMG_NONE; - if (actor->health != 0) { - if (actor->state == 2) { - actor->health -= actor->damage; - if (actor->health <= 0) { - actor->health = actor->itemDrop = 0; - Actor_Despawn(actor); + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + if (this->health != 0) { + if (this->state == 2) { + this->health -= this->damage; + if (this->health <= 0) { + this->health = this->itemDrop = 0; + Actor_Despawn(this); for (i = 0; i < 10; i++) { - Aquas_801AC8A8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f), - actor->obj.pos.y + 50.0f + RAND_FLOAT_CENTERED(70.0f), actor->obj.pos.z + 100.0f, - 3.0f, 2); + Aquas_Effect366_Spawn(this->obj.pos.x + RAND_FLOAT_CENTERED(200.0f), + this->obj.pos.y + 50.0f + RAND_FLOAT_CENTERED(70.0f), + this->obj.pos.z + 100.0f, 3.0f, 2); } for (i = 0; i < 3; i++) { - func_effect_80081A8C(actor->obj.pos.x + RAND_FLOAT(15.0f), actor->obj.pos.y + RAND_FLOAT(3.0f), - actor->obj.pos.z + RAND_FLOAT(5.0f), 1.0f + RAND_FLOAT(0.5f), 7); + func_effect_80081A8C(this->obj.pos.x + RAND_FLOAT(15.0f), this->obj.pos.y + RAND_FLOAT(3.0f), + this->obj.pos.z + RAND_FLOAT(5.0f), 1.0f + RAND_FLOAT(0.5f), 7); } func_effect_800815DC(); - func_effect_8007CF30(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + 51.0f, 10.0f); + Effect_FireSmoke_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 51.0f, 10.0f); } } - if (actor->state == 1) { - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_AQ_60314E4); - actor->info.damage = 0; - actor->info.bonus = 1; - actor->state = 2; + if (this->state == 1) { + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_AQ_60314E4); + this->info.damage = 0; + this->info.bonus = 1; + this->state = 2; } } } } -// OBJ_ACTOR_270 draw -void Aquas_Actor270_Draw(Actor* actor) { +void Aquas_AqOyster_Draw(AqOyster* this) { Graphics_SetScaleMtx(3.0f); RCP_SetupDL(&gMasterDisp, SETUPDL_56); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 143, 143, 255); - Animation_GetFrameData(&D_AQ_602201C, actor->animFrame, actor->vwork); - Animation_DrawSkeleton(1, D_AQ_60220E8, actor->vwork, NULL, NULL, &actor->index, &gIdentityMatrix); + Animation_GetFrameData(&aAqOysterAnim, this->animFrame, this->vwork); + Animation_DrawSkeleton(1, aAqOysterSkel, this->vwork, NULL, NULL, &this->index, &gIdentityMatrix); - if (actor->health != 0) { + if (this->health != 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_55); - Matrix_Scale(gGfxMatrix, actor->fwork[0], actor->fwork[1], actor->fwork[2], MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->fwork[0], this->fwork[1], this->fwork[2], MTXF_APPLY); Matrix_Translate(gGfxMatrix, 0.0f, -8.0f, 51.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_AQ_6002C10); + gSPDisplayList(gMasterDisp++, aAqOysterDL); } } -// OBJ_BOSS_301 action -void Aquas_Boss301_Update(Boss* boss301) { +// OBJ_BOSS_AQ_UNK_301 action +void Aquas_Boss301_Update(Boss301* this) { + /* Unimplemented */ } -// OBJ_BOSS_301 draw -void Aquas_Boss301_Draw(Boss* boss301) { +// OBJ_BOSS_AQ_UNK_301 draw +void Aquas_Boss301_Draw(Boss301* this) { + /* Unimplemented */ } -// OBJ_ACTOR_188 action -void Aquas_Actor188_Update(Actor* actor) { +// OBJ_ACTOR_AQ_UNK_188 action +void Aquas_Actor188_Update(Actor188* this) { + /* Unimplemented */ } -// OBJ_ACTOR_188 draw -void Aquas_Actor188_Draw(Actor* actor) { +// OBJ_ACTOR_AQ_UNK_188 draw +void Aquas_Actor188_Draw(Actor188* this) { + /* Unimplemented */ } void Aquas_Update360(Player* player) { + /* Unimplemented */ } void Aquas_801BEC8C(void* arg0) { + /* Unimplemented */ } diff --git a/src/overlays/ovl_i3/fox_so.c b/src/overlays/ovl_i3/fox_so.c index 2b9f8a5b..eb4c4469 100644 --- a/src/overlays/ovl_i3/fox_so.c +++ b/src/overlays/ovl_i3/fox_so.c @@ -8,7 +8,7 @@ #include "assets/ast_bg_planet.h" #include "assets/ast_solar.h" -typedef void (*BossSOfunc)(BossSO*); +typedef void (*SoVulkainfunc)(SoVulkain*); typedef enum { /* 0 */ SO_SWK_0, @@ -52,7 +52,7 @@ typedef enum { /* 38 */ SO_SWK_38, /* 39 */ SO_SWK_39, /* 40 */ SO_SWK_MAX, -} BossSOswork; +} SoVulkainswork; typedef enum { /* 0 */ SO_FWK_0, @@ -106,7 +106,7 @@ typedef enum { /* 48 */ SO_FWK_48, /* 49 */ SO_FWK_49, /* 50 */ SO_FWK_MAX, -} BossSOfwork; +} SoVulkainfwork; typedef enum { /* 0 */ SO_VWK_0, @@ -160,13 +160,13 @@ typedef enum { /* 48 */ SO_VWK_48, /* 49 */ SO_VWK_49, /* 50 */ SO_VWK_MAX, -} BossSOvwork; +} SoVulkainvwork; -void Solar_801A239C(BossSO* this); -void Solar_801A2C3C(BossSO* this); -void Solar_801A3468(BossSO* this); -void Solar_801A48B8(BossSO* this); -void Solar_801A4EC0(BossSO* this); +void Solar_801A239C(SoVulkain* this); +void Solar_801A2C3C(SoVulkain* this); +void Solar_801A3468(SoVulkain* this); +void Solar_801A48B8(SoVulkain* this); +void Solar_801A4EC0(SoVulkain* this); void Solar_801A8DB8(Vec3f* pos, u32 sfxId, f32 zVel); s32 D_i3_801C2740[10]; @@ -241,7 +241,7 @@ void Solar_8019E9F4(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, } } -void Solar_Actor278_Update(Actor278* this) { +void Solar_SoWave_Update(SoWave* this) { f32 sp34; s32 sp30; @@ -316,10 +316,10 @@ void Solar_Actor278_Update(Actor278* this) { void Solar_8019EF30(Actor* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel) { Actor_Initialize(this); this->obj.status = OBJ_ACTIVE; - this->obj.id = OBJ_ACTOR_275; + this->obj.id = OBJ_ACTOR_SO_ROCK_1; if (Rand_ZeroOne() < 0.1f) { - this->obj.id = OBJ_ACTOR_276; + this->obj.id = OBJ_ACTOR_SO_ROCK_2; } this->obj.pos.x = xPos; @@ -354,10 +354,10 @@ void Solar_8019F038(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel) } } -void Solar_8019F0B0(Actor277* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel) { +void Solar_8019F0B0(SoRock1* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel) { Actor_Initialize(this); this->obj.status = OBJ_ACTIVE; - this->obj.id = OBJ_ACTOR_277; + this->obj.id = OBJ_ACTOR_SO_ROCK_3; this->obj.pos.x = xPos; this->obj.pos.y = yPos; @@ -408,16 +408,16 @@ Vec3f D_i3_801BF95C[3] = { { 180.0f, 0.0f, 240.0f }, }; -// Actors OBJ_ACTOR_275 to OBJ_ACTOR_277 -void Solar_Doodad_Update(Actor* this) { +// Actors OBJ_ACTOR_SO_ROCK_1 to OBJ_ACTOR_SO_ROCK_3 +void Solar_SoRock_Update(SoRock1* this) { f32 sp8C = 0.0f; s32 sp88; s32 i; - if (this->obj.id == OBJ_ACTOR_277) { + if (this->obj.id == OBJ_ACTOR_SO_ROCK_3) { this->scale = 2.0f; } - if (this->obj.id == OBJ_ACTOR_276) { + if (this->obj.id == OBJ_ACTOR_SO_ROCK_2) { this->rot_0F4.x -= 6.6f; this->rot_0F4.y -= 4.0f; } else { @@ -461,19 +461,19 @@ void Solar_Doodad_Update(Actor* this) { 2); } - if ((this->dmgType != DMG_NONE) || ((this->obj.id == OBJ_ACTOR_277) && (this->vel.y < 0.0f))) { + if ((this->dmgType != DMG_NONE) || ((this->obj.id == OBJ_ACTOR_SO_ROCK_3) && (this->vel.y < 0.0f))) { func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->scale * 4.0f); Object_Kill(&this->obj, this->sfxSource); - if (this->obj.id == OBJ_ACTOR_277) { + if (this->obj.id == OBJ_ACTOR_SO_ROCK_3) { for (i = 0; i < 4; i++) { Solar_8019F038(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, D_i3_801BF8F0[i].x + RAND_FLOAT_CENTERED(3.0f), D_i3_801BF8F0[i].y + RAND_FLOAT_CENTERED(3.0f), RAND_FLOAT(-10.0f) - 10.0f); } - } else if (this->obj.id == OBJ_ACTOR_275) { + } else if (this->obj.id == OBJ_ACTOR_SO_ROCK_1) { this->itemDrop = DROP_SILVER_RING; - } else if (this->obj.id == OBJ_ACTOR_276) { + } else if (this->obj.id == OBJ_ACTOR_SO_ROCK_2) { if (gGoldRingCount[0] != 4) { this->itemDrop = DROP_GOLD_RING_1; } else { @@ -484,7 +484,7 @@ void Solar_Doodad_Update(Actor* this) { Actor_Despawn(this); for (i = 0; i < 3; i++) { - func_effect_800794CC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0.3f); + Effect_Effect357_Spawn50(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0.3f); } for (i = 0; i < 7; i++) { Solar_8019E9F4(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, RAND_FLOAT_CENTERED(30.0f), @@ -506,8 +506,8 @@ void Solar_Doodad_Update(Actor* this) { } } -// Actors OBJ_ACTOR_275 to OBJ_ACTOR_277 -void Solar_Doodad_Draw(Actor* this) { +// Actors OBJ_ACTOR_SO_ROCK_1 to OBJ_ACTOR_SO_ROCK_3 +void Solar_SoRock_Draw(SoRock1* this) { if (this->state != 0) { Matrix_Push(&gGfxMatrix); Matrix_RotateY(gGfxMatrix, this->rot_0F4.y * M_DTOR, MTXF_APPLY); @@ -515,11 +515,11 @@ void Solar_Doodad_Draw(Actor* this) { Matrix_SetGfxMtx(&gMasterDisp); switch (this->obj.id) { - case OBJ_ACTOR_275: + case OBJ_ACTOR_SO_ROCK_1: gSPDisplayList(gMasterDisp++, D_SO_6017370); break; - case OBJ_ACTOR_276: + case OBJ_ACTOR_SO_ROCK_2: if ((gGameFrameCount % 2) == 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_41); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255); @@ -527,7 +527,7 @@ void Solar_Doodad_Draw(Actor* this) { gSPDisplayList(gMasterDisp++, D_SO_6017090); break; - case OBJ_ACTOR_277: + case OBJ_ACTOR_SO_ROCK_3: gSPDisplayList(gMasterDisp++, D_SO_6016CF0); break; } @@ -540,7 +540,7 @@ void Solar_Doodad_Draw(Actor* this) { } } -void Solar_8019F99C(Actor279* this, Effect392* effect, f32 scale1) { +void Solar_8019F99C(SoProminence* this, Effect392* effect, f32 scale1) { Effect_Initialize(effect); effect->obj.status = OBJ_ACTIVE; effect->obj.id = OBJ_EFFECT_392; @@ -563,7 +563,7 @@ void Solar_8019F99C(Actor279* this, Effect392* effect, f32 scale1) { Object_SetInfo(&effect->info, effect->obj.id); } -void Solar_8019FAA4(BossSO* this, Effect392* effect, f32 xPos, f32 yPos, f32 zPos, f32 yVel, f32 hVelMod) { +void Solar_8019FAA4(SoVulkain* this, Effect392* effect, f32 xPos, f32 yPos, f32 zPos, f32 yVel, f32 hVelMod) { Vec3f sp44; Vec3f sp38; Vec3f sp2C = D_i3_801BF920; @@ -630,7 +630,7 @@ void Solar_8019FAA4(BossSO* this, Effect392* effect, f32 xPos, f32 yPos, f32 zPo Object_SetInfo(&effect->info, effect->obj.id); } -void Solar_8019FDE0(BossSO* this, Effect392* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 state) { +void Solar_8019FDE0(SoVulkain* this, Effect392* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 state) { Effect_Initialize(effect); effect->obj.status = OBJ_ACTIVE; effect->obj.id = OBJ_EFFECT_392; @@ -655,7 +655,7 @@ void Solar_8019FDE0(BossSO* this, Effect392* effect, f32 xPos, f32 yPos, f32 zPo effect->info.damage = 40; } -void Solar_8019FEE8(Actor279* this, f32 scale1) { +void Solar_8019FEE8(SoProminence* this, f32 scale1) { s32 i; for (i = 70; i >= 0; i--) { @@ -666,7 +666,7 @@ void Solar_8019FEE8(Actor279* this, f32 scale1) { } } -void Solar_8019FF44(BossSO* this, f32 xPos, f32 yPos, f32 zPos, f32 yVel, f32 hVelMod) { +void Solar_8019FF44(SoVulkain* this, f32 xPos, f32 yPos, f32 zPos, f32 yVel, f32 hVelMod) { s32 i; for (i = 70; i >= 0; i--) { @@ -677,7 +677,7 @@ void Solar_8019FF44(BossSO* this, f32 xPos, f32 yPos, f32 zPos, f32 yVel, f32 hV } } -void Solar_8019FFC0(BossSO* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 unk4E) { +void Solar_8019FFC0(SoVulkain* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 unk4E) { s32 i; for (i = 70; i >= 0; i--) { @@ -688,7 +688,7 @@ void Solar_8019FFC0(BossSO* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 } } -void Solar_Actor279_Update(Actor279* this) { +void Solar_SoProminence_Update(SoProminence* this) { switch (this->state) { case 0: if (this->timer_0BE == 0) { @@ -940,10 +940,10 @@ void Solar_Effect392_Draw(Effect392* this) { } } -void Solar_801A0CEC(Actor278* this, f32 xPos, f32 zPos, f32 zVel, s32 unkB8) { +void Solar_801A0CEC(SoWave* this, f32 xPos, f32 zPos, f32 zVel, s32 unkB8) { Actor_Initialize(this); this->obj.status = OBJ_ACTIVE; - this->obj.id = OBJ_ACTOR_278; + this->obj.id = OBJ_ACTOR_SO_WAVE; this->obj.pos.x = xPos; this->obj.pos.z = zPos; @@ -996,7 +996,7 @@ void Solar_801A0DF8(f32 xPos, f32 zPos, f32 yRot, s32 index, f32 yPos) { Actor_Initialize(&gActors[actorIndex]); gActors[actorIndex].obj.status = OBJ_ACTIVE; - gActors[actorIndex].obj.id = OBJ_ACTOR_279; + gActors[actorIndex].obj.id = OBJ_ACTOR_SO_PROMINENCE; Object_SetInfo(&gActors[actorIndex].info, gActors[actorIndex].obj.id); @@ -1149,7 +1149,7 @@ void Solar_LevelStart(Player* player) { AUDIO_PLAY_BGM(NA_BGM_SO_START_DEMO); - func_display_80057814(player); + Display_SetupPlayerSfxPos(player); Audio_StartPlayerNoise(gPlayerNum); D_ctx_80177A48[0] = 0.01f; @@ -1326,12 +1326,12 @@ void Solar_801A1E14(f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 zRot, } } -void Solar_801A1EB0(BossSO* this, f32 xPos, f32 xOffset, f32 yPos, f32 zPos) { +void Solar_801A1EB0(SoVulkain* this, f32 xPos, f32 xOffset, f32 yPos, f32 zPos) { Solar_8019E9F4(xPos + xOffset, yPos, zPos, 20.0f, RAND_FLOAT(10.0f) + 20.0f, 0.0f, 20.0f, 1); Solar_8019E9F4(xPos - xOffset, yPos, zPos, -20.0f, RAND_FLOAT(10.0f) + 20.0f, 0.0f, 20.0f, 1); } -void Solar_801A1F80(BossSO* this) { +void Solar_801A1F80(SoVulkain* this) { if (gBossActive) { this->scale = 5.5f; } @@ -1357,7 +1357,7 @@ void Solar_801A1F80(BossSO* this) { this->fwork[SO_FWK_3] = 2400.0f; this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SO_60231A4); - this->unk_04C = 0; + this->animFrame = 0; this->swork[SO_SWK_1] = 0; this->info.hitbox[8] = this->info.hitbox[12] = this->info.hitbox[14] = this->info.hitbox[18] = this->info.hitbox[20] = this->info.hitbox[24] = this->info.hitbox[26] = this->info.hitbox[30] = @@ -1401,7 +1401,7 @@ void Solar_801A1F80(BossSO* this) { } if (this->timer_050 == 100) { - this->unk_04C = 0; + this->animFrame = 0; this->swork[SO_SWK_1] = 1; } @@ -1415,7 +1415,7 @@ void Solar_801A1F80(BossSO* this) { } } -void Solar_801A239C(BossSO* this) { +void Solar_801A239C(SoVulkain* this) { this->swork[SO_SWK_0] = 1; if ((this->swork[SO_SWK_2] != 0) || (this->swork[SO_SWK_3] != 0)) { if (this->swork[SO_SWK_3] != 0) { @@ -1426,10 +1426,10 @@ void Solar_801A239C(BossSO* this) { } else { this->swork[SO_SWK_1] = 7; } - this->unk_04C = 0; + this->animFrame = 0; } -void Solar_801A23F4(BossSO* this) { +void Solar_801A23F4(SoVulkain* this) { s32 i; Vec3f sp58; Vec3f sp4C; @@ -1438,8 +1438,8 @@ void Solar_801A23F4(BossSO* this) { switch (this->swork[SO_SWK_1]) { case 3: - if ((this->unk_04C == 119) || (this->swork[SO_SWK_3] == 0)) { - this->unk_04C = 0; + if ((this->animFrame == 119) || (this->swork[SO_SWK_3] == 0)) { + this->animFrame = 0; if (this->swork[SO_SWK_2] != 0) { if (Rand_ZeroOne() >= 0.5f) { this->swork[SO_SWK_1] = 4; @@ -1455,22 +1455,22 @@ void Solar_801A23F4(BossSO* this) { } } - if (this->unk_04C >= 28) { + if (this->animFrame >= 28) { this->info.hitbox[38] = 715.0f; this->info.hitbox[40] = 440.0f; this->info.hitbox[42] = 110.0f; } - if (this->unk_04C == 29) { + if (this->animFrame == 29) { Object_SetSfxSourceToPos(this->sfxSource, &this->obj.pos); AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, this->sfxSource, 4); } - if (this->unk_04C == 80) { + if (this->animFrame == 80) { AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_SWING, this->sfxSource, 4); } - if (this->unk_04C >= 94) { + if (this->animFrame >= 94) { this->info.hitbox[38] = 220.0f; this->info.hitbox[40] = 715.0f; this->info.hitbox[42] = 220.0f; @@ -1478,8 +1478,8 @@ void Solar_801A23F4(BossSO* this) { break; case 4: - if ((this->unk_04C == 99) || (this->swork[SO_SWK_2] == 0)) { - this->unk_04C = 0; + if ((this->animFrame == 99) || (this->swork[SO_SWK_2] == 0)) { + this->animFrame = 0; if ((this->swork[SO_SWK_3] != 0) || (this->swork[SO_SWK_2] != 0)) { this->swork[SO_SWK_1] = 5; } else { @@ -1487,22 +1487,22 @@ void Solar_801A23F4(BossSO* this) { } } - if (this->unk_04C > 20) { + if (this->animFrame > 20) { this->info.hitbox[20] = 715.0f; this->info.hitbox[22] = 110.0f; this->info.hitbox[24] = 275.0f; } - if (this->unk_04C == 10) { + if (this->animFrame == 10) { Object_SetSfxSourceToPos(this->sfxSource, &this->obj.pos); AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, this->sfxSource, 4); } - if (this->unk_04C == 50) { + if (this->animFrame == 50) { AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_SWING, this->sfxSource, 4); } - if (this->unk_04C >= 85) { + if (this->animFrame >= 85) { this->info.hitbox[20] = 220.0f; this->info.hitbox[22] = 715.0f; this->info.hitbox[24] = 220.0f; @@ -1514,7 +1514,7 @@ void Solar_801A23F4(BossSO* this) { Math_SmoothStepToAngle(&this->obj.rot.y, 0.0f, 1.0f, 1.5f, 1.0f); - if (this->unk_04C == 65) { + if (this->animFrame == 65) { Matrix_RotateX(gCalcMatrix, D_i3_801C2768[0] * M_DTOR, MTXF_NEW); Matrix_RotateY(gCalcMatrix, D_i3_801C2768[1] * M_DTOR, MTXF_APPLY); sp40.x = 0.0f; @@ -1532,7 +1532,7 @@ void Solar_801A23F4(BossSO* this) { } } - if (this->unk_04C == 99) { + if (this->animFrame == 99) { if ((this->swork[SO_SWK_2] != 0) || (this->swork[SO_SWK_3] != 0)) { Solar_801A2C3C(this); } else { @@ -1542,14 +1542,14 @@ void Solar_801A23F4(BossSO* this) { break; case 7: - if (this->unk_04C < 50) { + if (this->animFrame < 50) { if (this->fwork[SO_FWK_31] < 22.0f) { this->fwork[SO_FWK_31] += 0.5f; } this->obj.rot.y += this->fwork[SO_FWK_31]; } - if ((this->unk_04C >= 50) && (this->unk_04C <= 100)) { + if ((this->animFrame >= 50) && (this->animFrame <= 100)) { if (this->fwork[SO_FWK_31] > 0.0f) { this->fwork[SO_FWK_31] -= 0.5f; } @@ -1561,24 +1561,24 @@ void Solar_801A23F4(BossSO* this) { AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_ROLL, this->sfxSource, 4); } - if (this->unk_04C == 1) { + if (this->animFrame == 1) { AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_ROLL, this->sfxSource, 4); } - if (this->unk_04C >= 100) { + if (this->animFrame >= 100) { Math_SmoothStepToAngle(&this->obj.rot.y, 0.0f, 1.0f, 2.0f, 1.0f); this->fwork[SO_FWK_31] = 0.0f; } - if (this->unk_04C == 120) { + if (this->animFrame == 120) { this->swork[SO_SWK_1] = 5; - this->unk_04C = 0; + this->animFrame = 0; this->fwork[SO_FWK_0] = 0.1f; } break; case 2: - if (((this->unk_04C == 89) && (this->state == 2)) || (this->swork[SO_SWK_2] == 0)) { - this->unk_04C = 0; + if (((this->animFrame == 89) && (this->state == 2)) || (this->swork[SO_SWK_2] == 0)) { + this->animFrame = 0; if ((this->swork[SO_SWK_3] != 0) || (this->swork[SO_SWK_2] != 0)) { this->swork[SO_SWK_1] = 5; @@ -1587,7 +1587,7 @@ void Solar_801A23F4(BossSO* this) { } } - if (this->unk_04C == 80) { + if (this->animFrame == 80) { this->rot_078.y += 15.0f; this->state++; if (this->rot_078.y >= 30.0f) { @@ -1597,22 +1597,22 @@ void Solar_801A23F4(BossSO* this) { Math_SmoothStepToAngle(&this->obj.rot.y, this->rot_078.y, 1.0f, 1.5f, 1.0f); - if (this->unk_04C >= 19) { + if (this->animFrame >= 19) { this->info.hitbox[20] = 715.0f; this->info.hitbox[22] = 440.0f; this->info.hitbox[24] = 110.0f; } - if (this->unk_04C == 5) { + if (this->animFrame == 5) { Object_SetSfxSourceToPos(this->sfxSource, &this->obj.pos); AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, this->sfxSource, 4); } - if (this->unk_04C == 20) { + if (this->animFrame == 20) { AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_SWING, this->sfxSource, 4); } - if (this->unk_04C > 36) { + if (this->animFrame > 36) { this->info.hitbox[20] = 220.0f; this->info.hitbox[22] = 715.0f; this->info.hitbox[24] = 220.0f; @@ -1621,16 +1621,16 @@ void Solar_801A23F4(BossSO* this) { } } -void Solar_801A2C3C(BossSO* this) { +void Solar_801A2C3C(SoVulkain* this) { this->swork[SO_SWK_0] = 2; this->swork[SO_SWK_1] = 0; this->fwork[SO_FWK_0] = 0.05f; - this->unk_04C = Animation_GetFrameCount(&D_SO_601388C) - 2; + this->animFrame = Animation_GetFrameCount(&D_SO_601388C) - 2; this->state = 0; this->swork[SO_SWK_11] = 15; } -void Solar_801A2C98(BossSO* this) { +void Solar_801A2C98(SoVulkain* this) { s32 i; if (this->swork[SO_SWK_11] != 0) { @@ -1639,18 +1639,18 @@ void Solar_801A2C98(BossSO* this) { if (this->state == 0) { if (this->swork[SO_SWK_11] == 0) { - this->unk_04C -= 2; + this->animFrame -= 2; Math_SmoothStepToF(&this->obj.pos.y, -1000.0f, 0.1f, 10.0f, 0.1f); Math_SmoothStepToAngle(&this->obj.rot.y, 181.0f, 1.0f, 3.0f, 1.0f); - if (this->unk_04C == 50) { + if (this->animFrame == 50) { Solar_801A0CEC(&gActors[10], this->obj.pos.x, this->obj.pos.z + 1000.0f, 20.0f, 1); gControllerRumbleFlags[gMainController] = 1; gControllerRumbleTimers[gMainController] = 70; } - if (this->unk_04C == 60) { + if (this->animFrame == 60) { for (i = 0; i < 4; i++) { Solar_8019F038(this->obj.pos.x + 100.0f, 100.0f, this->obj.pos.z + 1100.0f, D_i3_801BF8F0[i].x + RAND_FLOAT_CENTERED(2.0f), @@ -1661,12 +1661,12 @@ void Solar_801A2C98(BossSO* this) { } } - if (this->unk_04C == 20) { + if (this->animFrame == 20) { gActors[10].dmgType = DMG_COLLISION; AUDIO_PLAY_SFX(NA_SE_EN_IN_MAGMA, this->sfxSource, 4); } - if (this->unk_04C == 0) { + if (this->animFrame == 0) { this->state++; this->swork[SO_SWK_11] = 100; this->obj.pos.y = -500.0f; @@ -1675,7 +1675,7 @@ void Solar_801A2C98(BossSO* this) { this->obj.rot.y = -this->obj.rot.y; } } else { - this->unk_04C = Animation_GetFrameCount(&D_SO_601388C) - 2; + this->animFrame = Animation_GetFrameCount(&D_SO_601388C) - 2; } } else { Math_SmoothStepToAngle(&this->obj.rot.y, 0.0f, 1.0f, 1.5f, 1.0f); @@ -1689,7 +1689,7 @@ void Solar_801A2C98(BossSO* this) { } if (this->swork[SO_SWK_11] == 210) { - this->unk_04C = 0; + this->animFrame = 0; this->swork[SO_SWK_1] = 1; this->fwork[SO_FWK_0] = 0.05f; } @@ -1709,36 +1709,36 @@ void Solar_801A2C98(BossSO* this) { } } -void Solar_801A30CC(BossSO* this) { +void Solar_801A30CC(SoVulkain* this) { this->swork[SO_SWK_0] = 3; this->swork[SO_SWK_1] = 0; this->fwork[SO_FWK_0] = 0.1f; - this->unk_04C = Animation_GetFrameCount(&D_SO_601388C) - 2; + this->animFrame = Animation_GetFrameCount(&D_SO_601388C) - 2; this->state = 0; this->swork[SO_SWK_11] = 15; } -void Solar_801A3128(BossSO* this) { +void Solar_801A3128(SoVulkain* this) { if (this->swork[SO_SWK_11] != 0) { this->swork[SO_SWK_11]--; } if (this->state == 0) { if (this->swork[SO_SWK_11] == 0) { - this->unk_04C -= 2; + this->animFrame -= 2; Math_SmoothStepToF(&this->obj.pos.y, -1000.0f, 0.1f, 10.0f, 0.1f); - if (this->unk_04C == 50) { + if (this->animFrame == 50) { Solar_801A0CEC(&gActors[10], this->obj.pos.x, this->obj.pos.z + 2000.0f, 10.0f, 1); } - if (this->unk_04C == 40) { + if (this->animFrame == 40) { gActors[10].dmgType = DMG_COLLISION; AUDIO_PLAY_SFX(NA_SE_EN_IN_MAGMA, this->sfxSource, 4); } - if (this->unk_04C == 0) { + if (this->animFrame == 0) { this->state++; this->swork[SO_SWK_11] = 100; this->obj.pos.y = -500.0f; @@ -1746,7 +1746,7 @@ void Solar_801A3128(BossSO* this) { this->obj.pos.z = gPlayer[0].trueZpos - 2100.0f; } } else { - this->unk_04C = Animation_GetFrameCount(&D_SO_601388C) - 2; + this->animFrame = Animation_GetFrameCount(&D_SO_601388C) - 2; } } else { if (this->swork[SO_SWK_11] == 80) { @@ -1775,7 +1775,7 @@ void Solar_801A3128(BossSO* this) { } if (this->swork[SO_SWK_11] == 210) { - this->unk_04C = 0; + this->animFrame = 0; this->swork[SO_SWK_1] = 1; } @@ -1799,7 +1799,7 @@ void Solar_801A3128(BossSO* this) { } } -void Solar_801A3468(BossSO* this) { +void Solar_801A3468(SoVulkain* this) { this->swork[SO_SWK_0] = 4; this->unk_048 = 0; @@ -1818,17 +1818,17 @@ void Solar_801A3468(BossSO* this) { this->swork[SO_SWK_1] = 8; } } - this->unk_04C = 0; + this->animFrame = 0; this->fwork[SO_FWK_0] = 0.01f; } -void Solar_801A3510(BossSO* this) { +void Solar_801A3510(SoVulkain* this) { s32 i; switch (this->swork[SO_SWK_1]) { case 3: - if ((this->unk_04C == 119) || (this->swork[SO_SWK_3] == 0)) { - this->unk_04C = 0; + if ((this->animFrame == 119) || (this->swork[SO_SWK_3] == 0)) { + this->animFrame = 0; if (this->swork[SO_SWK_2] != 0) { this->swork[SO_SWK_1] = 4; } else { @@ -1836,39 +1836,39 @@ void Solar_801A3510(BossSO* this) { } } - if (this->unk_04C == 29) { + if (this->animFrame == 29) { Object_SetSfxSourceToPos(this->sfxSource, &this->obj.pos); AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, this->sfxSource, 4); } - if (this->unk_04C == 80) { + if (this->animFrame == 80) { AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_SWING, this->sfxSource, 4); } - if (this->unk_04C == 94) { + if (this->animFrame == 94) { Solar_801A0DF8(this->fwork[SO_FWK_13], this->fwork[SO_FWK_15], RAND_FLOAT_CENTERED(60.0f), 4, 2.0f); this->timer_050 = 90; } break; case 4: - if ((this->unk_04C == 99) || (this->swork[SO_SWK_2] == 0)) { - this->unk_04C = 0; + if ((this->animFrame == 99) || (this->swork[SO_SWK_2] == 0)) { + this->animFrame = 0; this->swork[SO_SWK_1] = 5; } Math_SmoothStepToAngle(&this->obj.rot.x, 20.0f, 0.1f, 10.0f, 0.1f); - if (this->unk_04C == 10) { + if (this->animFrame == 10) { Object_SetSfxSourceToPos(this->sfxSource, &this->obj.pos); AUDIO_PLAY_SFX(NA_SE_EN_OUT_PROMINENCE, this->sfxSource, 4); } - if (this->unk_04C == 50) { + if (this->animFrame == 50) { AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_SWING, this->sfxSource, 4); } - if (this->unk_04C == 60) { + if (this->animFrame == 60) { Solar_801A0D90(this->obj.pos.x, this->obj.pos.z + 1600.0f, 80.0f, 2); gControllerRumbleFlags[gMainController] = 1; gControllerRumbleTimers[gMainController] = 100; @@ -1877,7 +1877,7 @@ void Solar_801A3510(BossSO* this) { case 5: Math_SmoothStepToAngle(&this->obj.rot.x, 0.0f, 0.1f, 10.0f, 0.1f); - if (this->unk_04C == 65) { + if (this->animFrame == 65) { for (i = 0; i < 4; i++) { Solar_8019F194(this->obj.pos.x, this->obj.pos.y + 300.0f, this->obj.pos.z + 1000.0f, D_i3_801BF8F0[i].x + RAND_FLOAT_CENTERED(0.25f), @@ -1885,55 +1885,55 @@ void Solar_801A3510(BossSO* this) { } } - if ((this->unk_048 != 0) && (this->unk_04C == 68)) { + if ((this->unk_048 != 0) && (this->animFrame == 68)) { this->swork[SO_SWK_1] = 9; this->fwork[SO_FWK_0] = 0.01f; - this->unk_04C = 20; + this->animFrame = 20; } - if (this->unk_04C == 99) { + if (this->animFrame == 99) { Solar_801A30CC(this); } break; case 8: - if (this->unk_04C == 65) { + if (this->animFrame == 65) { AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_BREATH, this->sfxSource, 4); this->timer_050 = 30; } if (this->timer_050 != 0) { - this->unk_04C = 65; + this->animFrame = 65; } - if ((this->unk_04C == 65) && (gGameFrameCount % 2) == 0) { + if ((this->animFrame == 65) && (gGameFrameCount % 2) == 0) { Solar_8019FFC0(this, this->fwork[SO_FWK_4], this->fwork[SO_FWK_5] - 100.0f, this->fwork[SO_FWK_6] + 600.0f, (this->timer_050 * 0.2f) + 4.0f, 0); Solar_801A1EB0(this, this->fwork[SO_FWK_4], 25.0f, this->fwork[SO_FWK_5] - 100.0f, this->fwork[SO_FWK_6] + 300.0f); } - if (this->unk_04C == 75) { + if (this->animFrame == 75) { Audio_KillSfxBySourceAndId(this->sfxSource, NA_SE_EN_SOBOSS_BREATH); } - if (this->unk_04C == 99) { + if (this->animFrame == 99) { this->swork[SO_SWK_1] = 5; - this->unk_04C = 0; + this->animFrame = 0; } break; case 9: - this->unk_04C++; - if (this->unk_04C == 66) { + this->animFrame++; + if (this->animFrame == 66) { AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_BREATH, this->sfxSource, 4); this->timer_050 = 30; } if (this->timer_050 != 0) { - this->unk_04C = 66; + this->animFrame = 66; } - if ((this->unk_04C == 66) && ((gGameFrameCount % 2) == 0)) { + if ((this->animFrame == 66) && ((gGameFrameCount % 2) == 0)) { Solar_8019FFC0(this, this->fwork[SO_FWK_4] + 125.0f, this->fwork[SO_FWK_5] - 100.0f, this->fwork[SO_FWK_6] + 600.0f, (this->timer_050 * 0.2f) + 4.0f, 1); Solar_8019FFC0(this, this->fwork[SO_FWK_4] - 125.0f, this->fwork[SO_FWK_5] - 100.0f, @@ -1942,11 +1942,11 @@ void Solar_801A3510(BossSO* this) { this->fwork[SO_FWK_6] + 300.0f); } - if (this->unk_04C == 76) { + if (this->animFrame == 76) { Audio_KillSfxBySourceAndId(this->sfxSource, NA_SE_EN_SOBOSS_BREATH); } - if (this->unk_04C >= 99) { + if (this->animFrame >= 99) { Solar_801A30CC(this); } break; @@ -1959,7 +1959,7 @@ void Solar_801A3510(BossSO* this) { } } -void Solar_801A3C4C(BossSO* this) { +void Solar_801A3C4C(SoVulkain* this) { s32 i; if ((this->swork[SO_SWK_2] == 0) && (this->swork[SO_SWK_3] == 0) && @@ -2015,7 +2015,7 @@ void Solar_801A3C4C(BossSO* this) { } if (this->health <= 0) { - this->unk_04C = 21; + this->animFrame = 21; this->state = 0; this->swork[SO_SWK_1] = 1; this->fwork[SO_FWK_0] = 0.01f; @@ -2060,7 +2060,7 @@ void Solar_801A3C4C(BossSO* this) { } } -void Solar_801A4214(BossSO* this) { +void Solar_801A4214(SoVulkain* this) { s32 i; Vec3f sp50; Vec3f sp44; @@ -2072,8 +2072,8 @@ void Solar_801A4214(BossSO* this) { Math_SmoothStepToAngle(&this->obj.rot.y, 0.0f, 0.1f, 3.0f, 0.0f); Math_SmoothStepToAngle(&this->obj.rot.x, 0.0f, 0.1f, 3.0f, 0.0f); - if ((this->unk_04C == 52) && (this->swork[SO_SWK_1] == 5)) { - this->unk_04C = 38; + if ((this->animFrame == 52) && (this->swork[SO_SWK_1] == 5)) { + this->animFrame = 38; this->fwork[SO_FWK_0] = 0.05f; } @@ -2099,7 +2099,7 @@ void Solar_801A4214(BossSO* this) { if (this->timer_058 == 19910) { this->state++; this->swork[SO_SWK_1] = 5; - this->unk_04C = 0; + this->animFrame = 0; this->fwork[SO_FWK_0] = 0.05f; } @@ -2107,8 +2107,8 @@ void Solar_801A4214(BossSO* this) { break; case 1: - if (this->unk_04C == 51) { - this->unk_04C = 50; + if (this->animFrame == 51) { + this->animFrame = 50; this->state++; gShowBossHealth = false; @@ -2211,7 +2211,7 @@ void Solar_801A4214(BossSO* this) { } } -void Solar_801A48B8(BossSO* this) { +void Solar_801A48B8(SoVulkain* this) { s32 i; AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_BROKEN, this->sfxSource, 4); @@ -2222,12 +2222,12 @@ void Solar_801A48B8(BossSO* this) { if (this->swork[SO_SWK_0] != 6) { this->swork[SO_SWK_5] = this->swork[SO_SWK_0]; this->swork[SO_SWK_6] = this->swork[SO_SWK_1]; - this->swork[SO_SWK_7] = this->unk_04C; + this->swork[SO_SWK_7] = this->animFrame; } - if ((this->swork[SO_SWK_0] == 4) && (this->unk_04C >= 60) && (this->unk_04C < 67)) { + if ((this->swork[SO_SWK_0] == 4) && (this->animFrame >= 60) && (this->animFrame < 67)) { for (i = 4; i < ARRAY_COUNT(gActors); i++) { - if (gActors[i].obj.id == OBJ_ACTOR_278) { + if (gActors[i].obj.id == OBJ_ACTOR_SO_WAVE) { gActors[i].dmgType = DMG_EXPLOSION; break; } @@ -2239,7 +2239,7 @@ void Solar_801A48B8(BossSO* this) { this->swork[SO_SWK_0] = 6; this->swork[SO_SWK_1] = 6; - this->unk_04C = 0; + this->animFrame = 0; this->fwork[SO_FWK_0] = 0.01f; if (((this->swork[SO_SWK_2] > 0) || (this->swork[SO_SWK_3] > 0)) && (gTeamShields[TEAM_ID_SLIPPY] > 0)) { @@ -2247,7 +2247,7 @@ void Solar_801A48B8(BossSO* this) { } } -void Solar_801A4A34(BossSO* this) { +void Solar_801A4A34(SoVulkain* this) { if (this->swork[SO_SWK_2] < 0) { this->swork[SO_SWK_2] = 0; Solar_801A1E14(this->fwork[SO_FWK_28], this->fwork[SO_FWK_29], this->fwork[SO_FWK_30], this->fwork[SO_FWK_41], @@ -2274,7 +2274,7 @@ void Solar_801A4A34(BossSO* this) { RAND_FLOAT(25.0f) + 30.0f, RAND_FLOAT_CENTERED(25.0f) - 50.0f, 3); } - switch (this->unk_04C) { + switch (this->animFrame) { case 30: AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_DAMAGE, this->sfxSource, 4); /* fallthrough */ @@ -2284,28 +2284,28 @@ void Solar_801A4A34(BossSO* this) { break; } - if (this->unk_04C == 119) { + if (this->animFrame == 119) { this->swork[SO_SWK_0] = this->swork[SO_SWK_5]; this->swork[SO_SWK_1] = this->swork[SO_SWK_6]; if ((this->swork[SO_SWK_5] == 2) || (this->swork[SO_SWK_5] == 3)) { - this->unk_04C = this->swork[SO_SWK_7]; + this->animFrame = this->swork[SO_SWK_7]; } else { - this->unk_04C = 0; + this->animFrame = 0; } this->fwork[SO_FWK_0] = 0.01f; } } -void Solar_801A4EC0(BossSO* this) { +void Solar_801A4EC0(SoVulkain* this) { this->swork[SO_SWK_0] = 7; this->swork[SO_SWK_1] = 5; this->fwork[SO_FWK_0] = 0.01f; - this->unk_04C = 0; + this->animFrame = 0; this->state = 0; this->fwork[SO_FWK_31] = this->obj.rot.y = 0.0f; } -void Solar_801A4EF8(BossSO* this) { +void Solar_801A4EF8(SoVulkain* this) { s32 i; if (this->swork[SO_SWK_11] != 0) { @@ -2314,12 +2314,12 @@ void Solar_801A4EF8(BossSO* this) { switch (this->state) { case 0: - this->unk_04C = 0; + this->animFrame = 0; if (this->fwork[SO_FWK_31] > 20.0f) { this->state++; this->swork[SO_SWK_11] = 108; this->fwork[SO_FWK_0] = 0.01f; - this->unk_04C = 56; + this->animFrame = 56; } if (this->obj.rot.y == 0.0f) { @@ -2338,7 +2338,7 @@ void Solar_801A4EF8(BossSO* this) { case 1: this->obj.rot.y += this->fwork[SO_FWK_31]; - this->unk_04C = 56; + this->animFrame = 56; if (this->obj.rot.y >= 360.0f) { this->obj.rot.y -= 360.0f; AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_ROLL, this->sfxSource, 4); @@ -2382,7 +2382,7 @@ void Solar_801A4EF8(BossSO* this) { break; case 2: - this->unk_04C = 0; + this->animFrame = 0; if (this->swork[SO_SWK_11] == 300) { gControllerRumbleFlags[gMainController] = 1; @@ -2395,7 +2395,7 @@ void Solar_801A4EF8(BossSO* this) { } if (this->swork[SO_SWK_11] < 200) { - this->unk_04C = 98; + this->animFrame = 98; this->rot_078.y += this->fwork[SO_FWK_31]; if (this->swork[SO_SWK_11] == 170) { @@ -2426,7 +2426,7 @@ void Solar_801A4EF8(BossSO* this) { this->obj.pos.y = -500.0f; this->fwork[SO_FWK_3] = 4800.0f; this->obj.pos.z = gPlayer[0].trueZpos - this->fwork[SO_FWK_3]; - this->unk_04C = 0; + this->animFrame = 0; this->obj.rot.x = 0.0f; this->fwork[SO_FWK_31] = this->vel.y = this->vel.z = 0.0f; this->obj.rot.y = 330.0f; @@ -2443,7 +2443,7 @@ void Solar_801A4EF8(BossSO* this) { this->swork[SO_SWK_11] = 220; } if (this->swork[SO_SWK_11] == 210) { - this->unk_04C = 0; + this->animFrame = 0; this->swork[SO_SWK_1] = 1; } if (this->swork[SO_SWK_11] >= 100) { @@ -2460,27 +2460,27 @@ void Solar_801A4EF8(BossSO* this) { } } -void Solar_801A56B8(BossSO* this) { +void Solar_801A56B8(SoVulkain* this) { switch (this->swork[SO_SWK_1]) { case 2: - if (((this->unk_04C == 89) && (this->state == 2)) || (this->swork[SO_SWK_2] == 0)) { - this->unk_04C = 0; + if (((this->animFrame == 89) && (this->state == 2)) || (this->swork[SO_SWK_2] == 0)) { + this->animFrame = 0; this->state = 0; this->rot_078.y = 0.0f; } - if (this->unk_04C == 89) { + if (this->animFrame == 89) { this->state++; this->rot_078.y += 15.0f; } Math_SmoothStepToAngle(&this->obj.rot.y, this->rot_078.y, 1.0f, 3.0f, 1.0f); - if (this->unk_04C > 18) { + if (this->animFrame > 18) { this->info.hitbox[20] = 715.0f; this->info.hitbox[22] = 440.0f; this->info.hitbox[24] = 110.0f; } - if (this->unk_04C > 36) { + if (this->animFrame > 36) { this->info.hitbox[20] = 220.0f; this->info.hitbox[22] = 715.0f; this->info.hitbox[24] = 220.0f; @@ -2488,8 +2488,8 @@ void Solar_801A56B8(BossSO* this) { break; case 4: - if ((this->unk_04C == 99) || (this->swork[SO_SWK_2] == 0)) { - this->unk_04C = 0; + if ((this->animFrame == 99) || (this->swork[SO_SWK_2] == 0)) { + this->animFrame = 0; if ((this->swork[SO_SWK_3] != 0) || (this->swork[SO_SWK_2] != 0)) { this->swork[SO_SWK_1] = 5; } else { @@ -2497,12 +2497,12 @@ void Solar_801A56B8(BossSO* this) { } } - if (this->unk_04C > 20) { + if (this->animFrame > 20) { this->info.hitbox[20] = 715.0f; this->info.hitbox[22] = 110.0f; this->info.hitbox[24] = 275.0f; } - if (this->unk_04C > 84) { + if (this->animFrame > 84) { this->info.hitbox[20] = 220.0f; this->info.hitbox[22] = 715.0f; this->info.hitbox[24] = 220.0f; @@ -2512,15 +2512,15 @@ void Solar_801A56B8(BossSO* this) { case 5: this->fwork[SO_FWK_3] = 4800.0f; - if (this->unk_04C == 65) { + if (this->animFrame == 65) { this->timer_050 = 30; } if (this->timer_050 != 0) { - this->unk_04C = 65; + this->animFrame = 65; } - if ((this->unk_04C == 65) && ((gGameFrameCount % 4) == 0)) { + if ((this->animFrame == 65) && ((gGameFrameCount % 4) == 0)) { Solar_8019FFC0(this, this->fwork[SO_FWK_4] + 125.0f, this->fwork[SO_FWK_5] - 100.0f, this->fwork[SO_FWK_6] + 600.0f, ((f32) this->timer_050 * 0.2f) + 4.0f, 1); Solar_8019FFC0(this, this->fwork[SO_FWK_4] - 125.0f, this->fwork[SO_FWK_5] - 100.0f, @@ -2531,37 +2531,37 @@ void Solar_801A56B8(BossSO* this) { break; case 7: - if (this->unk_04C < 50) { + if (this->animFrame < 50) { if (this->fwork[SO_FWK_31] < 22.0f) { this->fwork[SO_FWK_31] += 0.5f; } this->obj.rot.y += this->fwork[SO_FWK_31]; } - if ((this->unk_04C >= 50) && (this->unk_04C <= 100)) { + if ((this->animFrame >= 50) && (this->animFrame <= 100)) { if (this->fwork[SO_FWK_31] > 0.0f) { this->fwork[SO_FWK_31] -= 0.5f; } this->obj.rot.y += this->fwork[SO_FWK_31]; } - if (this->unk_04C >= 100) { + if (this->animFrame >= 100) { Math_SmoothStepToAngle(&this->obj.rot.y, 0.0f, 1.0f, 2.0f, 1.0f); this->fwork[SO_FWK_31] = 0.0f; } - if (this->unk_04C == 120) { + if (this->animFrame == 120) { this->swork[SO_SWK_1] = 5; - this->unk_04C = 0; + this->animFrame = 0; this->fwork[SO_FWK_0] = 0.1f; } break; } } -BossSOfunc D_i3_801BF980[9] = { +SoVulkainfunc D_i3_801BF980[9] = { Solar_801A1F80, Solar_801A23F4, Solar_801A2C98, Solar_801A3128, Solar_801A3510, Solar_801A4214, Solar_801A4A34, Solar_801A4EF8, Solar_801A56B8, }; -void Solar_Boss_Update(BossSO* this) { +void Solar_SoVulkain_Update(SoVulkain* this) { f32 sp1CC; f32 sp1C8; f32 sp1C4; @@ -2674,81 +2674,81 @@ void Solar_Boss_Update(BossSO* this) { switch (this->swork[SO_SWK_1]) { case 0: - this->unk_04C++; - if (this->unk_04C == 75) { + this->animFrame++; + if (this->animFrame == 75) { AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_CRY, this->sfxSource, 4); } - if (this->unk_04C >= Animation_GetFrameCount(&D_SO_601388C)) { + if (this->animFrame >= Animation_GetFrameCount(&D_SO_601388C)) { if (this->health != 0) { - this->unk_04C = 0; + this->animFrame = 0; this->swork[SO_SWK_1]++; this->fwork[SO_FWK_0] = 0.01f; } else { - this->unk_04C = Animation_GetFrameCount(&D_SO_601388C) - 1; + this->animFrame = Animation_GetFrameCount(&D_SO_601388C) - 1; } } - sp1BC = Animation_GetFrameData(&D_SO_601388C, this->unk_04C, frameTable); + sp1BC = Animation_GetFrameData(&D_SO_601388C, this->animFrame, frameTable); break; case 1: - this->unk_04C++; - if (this->unk_04C >= Animation_GetFrameCount(&D_SO_600D3DC)) { - this->unk_04C = 0; + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_SO_600D3DC)) { + this->animFrame = 0; } - sp1BC = Animation_GetFrameData(&D_SO_600D3DC, this->unk_04C, frameTable); + sp1BC = Animation_GetFrameData(&D_SO_600D3DC, this->animFrame, frameTable); break; case 2: - this->unk_04C++; - if (this->unk_04C >= Animation_GetFrameCount(&D_SO_600E2C4)) { - this->unk_04C = 0; + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_SO_600E2C4)) { + this->animFrame = 0; } - sp1BC = Animation_GetFrameData(&D_SO_600E2C4, this->unk_04C, frameTable); + sp1BC = Animation_GetFrameData(&D_SO_600E2C4, this->animFrame, frameTable); break; case 3: - this->unk_04C++; - if (this->unk_04C >= Animation_GetFrameCount(&D_SO_600F744)) { - this->unk_04C = 0; + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_SO_600F744)) { + this->animFrame = 0; } - sp1BC = Animation_GetFrameData(&D_SO_600F744, this->unk_04C, frameTable); + sp1BC = Animation_GetFrameData(&D_SO_600F744, this->animFrame, frameTable); break; case 4: - this->unk_04C++; - if (this->unk_04C >= Animation_GetFrameCount(&D_SO_600C15C)) { - this->unk_04C = 0; + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_SO_600C15C)) { + this->animFrame = 0; } - sp1BC = Animation_GetFrameData(&D_SO_600C15C, this->unk_04C, frameTable); + sp1BC = Animation_GetFrameData(&D_SO_600C15C, this->animFrame, frameTable); break; case 5: case 8: case 9: - this->unk_04C++; - if ((this->unk_04C == 45) && (this->health != 0)) { + this->animFrame++; + if ((this->animFrame == 45) && (this->health != 0)) { AUDIO_PLAY_SFX(NA_SE_EN_SOBOSS_CRY, this->sfxSource, 4); } - if (this->unk_04C >= Animation_GetFrameCount(&D_SO_6012C00)) { - this->unk_04C = 0; + if (this->animFrame >= Animation_GetFrameCount(&D_SO_6012C00)) { + this->animFrame = 0; } - sp1BC = Animation_GetFrameData(&D_SO_6012C00, this->unk_04C, frameTable); + sp1BC = Animation_GetFrameData(&D_SO_6012C00, this->animFrame, frameTable); break; case 6: - this->unk_04C++; - if (this->unk_04C >= Animation_GetFrameCount(&D_SO_600B1B4)) { - this->unk_04C = 0; + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_SO_600B1B4)) { + this->animFrame = 0; } - sp1BC = Animation_GetFrameData(&D_SO_600B1B4, this->unk_04C, frameTable); + sp1BC = Animation_GetFrameData(&D_SO_600B1B4, this->animFrame, frameTable); break; case 7: - this->unk_04C++; - if (this->unk_04C >= Animation_GetFrameCount(&D_SO_6009D30)) { - this->unk_04C = 0; + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_SO_6009D30)) { + this->animFrame = 0; } - sp1BC = Animation_GetFrameData(&D_SO_6009D30, this->unk_04C, frameTable); + sp1BC = Animation_GetFrameData(&D_SO_6009D30, this->animFrame, frameTable); break; } Matrix_RotateZ(gCalcMatrix, -this->vwork[SO_VWK_29].z * M_DTOR, MTXF_NEW); @@ -2808,8 +2808,8 @@ void Solar_Boss_Update(BossSO* this) { } } -bool Solar_801A68A8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { - BossSO* this = (BossSO*) thisx; +bool Solar_SoVulkain_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { + SoVulkain* this = (SoVulkain*) thisx; Vec3f sp58 = { 0.0f, 0.0f, 0.0f }; Vec3f sp4C = { 10.0f, 0.0f, 0.0f }; Vec3f sp40 = { -10.0f, 0.0f, 0.0f }; @@ -2876,8 +2876,8 @@ bool Solar_801A68A8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th return false; } -void Solar_801A6BDC(s32 limbIndex, Vec3f* rot, void* thisx) { - BossSO* this = (BossSO*) thisx; +void Solar_SoVulkain_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { + SoVulkain* this = (SoVulkain*) thisx; Vec3f spA0 = { 90.0f, 0.0f, -10.0f }; Vec3f sp94 = { 135.0f, 0.0f, -40.0f }; Vec3f sp88 = { 106.0f, 0.0f, 0.0f }; @@ -3018,7 +3018,7 @@ void Solar_801A6BDC(s32 limbIndex, Vec3f* rot, void* thisx) { } } -void Solar_Boss_Draw(BossSO* this) { +void Solar_SoVulkain_Draw(SoVulkain* this) { s32 i; Vec3f spE8[9] = { { 150.0f, 300.0f, 100.0f }, { -100.0f, 200.0f, 100.0f }, { 50.0f, 100.0f, 100.0f }, @@ -3035,7 +3035,8 @@ void Solar_Boss_Draw(BossSO* this) { Matrix_Scale(gCalcMatrix, this->scale, this->scale, this->scale, MTXF_APPLY); if (gBossActive) { - Animation_DrawSkeleton(2, D_SO_600E470, this->vwork, Solar_801A68A8, Solar_801A6BDC, this, gCalcMatrix); + Animation_DrawSkeleton(2, D_SO_600E470, this->vwork, Solar_SoVulkain_OverrideLimbDraw, + Solar_SoVulkain_PostLimbDraw, this, gCalcMatrix); } if (this->health <= 0) { @@ -3140,7 +3141,7 @@ void Solar_LevelComplete(Player* player) { f32 dz; Vec3f sp60; Vec3f sp54; - BossSO* boss = &gBosses[0]; + SoVulkain* boss = &gBosses[0]; switch (player->csState) { case 0: diff --git a/src/overlays/ovl_i3/fox_zo.c b/src/overlays/ovl_i3/fox_zo.c index 49d20d51..1a882af8 100644 --- a/src/overlays/ovl_i3/fox_zo.c +++ b/src/overlays/ovl_i3/fox_zo.c @@ -84,7 +84,7 @@ typedef enum { /* 38 */ ZO_LIMB_38, /* 39 */ ZO_LIMB_39, /* 40 */ ZO_LIMB_MAX, -} BossZOLimbs; +} ZoSarumarineLimbs; typedef enum { /* 0 */ ZO_BSF_0, @@ -238,7 +238,7 @@ typedef enum { /* 148 */ ZO_BSF_148, /* 149 */ ZO_BSF_149, /* 150 */ ZO_BSF_MAX, -} BossZObsfwork; +} ZoSarumarinebsfwork; typedef enum { /* 0 */ ZO_BSS_0, @@ -312,7 +312,7 @@ typedef enum { /* 68 */ ZO_BSS_68, /* 69 */ ZO_BSS_69, /* 70 */ ZO_BSS_MAX, -} BossZObsswork; +} ZoSarumarinebsswork; typedef enum { /* 0 */ ZO_SWK_0, @@ -356,7 +356,7 @@ typedef enum { /* 38 */ ZO_SWK_38, /* 39 */ ZO_SWK_39, /* 40 */ ZO_SWK_MAX, -} BossZOswork; +} ZoSarumarineswork; typedef enum { /* 0 */ ZO_FWK_0, @@ -410,7 +410,7 @@ typedef enum { /* 48 */ ZO_FWK_48, /* 49 */ ZO_FWK_49, /* 50 */ ZO_FWK_MAX, -} BossZOfwork; +} ZoSarumarinefwork; typedef enum { /* 0 */ ZO_VWK_0, @@ -464,24 +464,24 @@ typedef enum { /* 48 */ ZO_VWK_48, /* 49 */ ZO_VWK_49, /* 50 */ ZO_VWK_MAX, -} BossZOvwork; +} ZoSarumarinevwork; s32 sZoLimbTimers[ZO_LIMB_MAX]; s32 sZoSwork[ZO_BSS_MAX]; f32 sZoFwork[ZO_BSF_MAX]; -void Zoness_8018FF50(Actor* this) { - f32 temp; +void Zoness_8018FF50(ZoEnergyBall* this) { + f32 x; this->obj.rot.y = RAD_TO_DEG( Math_Atan2F(gPlayer[0].cam.eye.x - this->obj.pos.x, gPlayer[0].cam.eye.z - (this->obj.pos.z + gPathProgress))); - temp = sqrtf(SQ(gPlayer[0].cam.eye.z - (this->obj.pos.z + gPathProgress)) + - SQ(gPlayer[0].cam.eye.x - this->obj.pos.x)); - this->obj.rot.x = RAD_TO_DEG(-Math_Atan2F(gPlayer[0].cam.eye.y - this->obj.pos.y, temp)); + x = sqrtf(SQ(gPlayer[0].cam.eye.z - (this->obj.pos.z + gPathProgress)) + + SQ(gPlayer[0].cam.eye.x - this->obj.pos.x)); + this->obj.rot.x = RAD_TO_DEG(-Math_Atan2F(gPlayer[0].cam.eye.y - this->obj.pos.y, x)); } -void Zoness_SetupDebris(ActorDebris* this, Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32 state, f32 scale, - s32 timerBC, s32 unk48) { +void Zoness_ActorDebris_Setup(ActorDebris* this, Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32 state, + f32 scale, s32 timerBC, s32 unk48) { Actor_Initialize(this); this->obj.status = OBJ_ACTIVE; this->obj.id = OBJ_ACTOR_DEBRIS; @@ -500,19 +500,19 @@ void Zoness_SetupDebris(ActorDebris* this, Vec3f* pos, Vec3f* rot, f32 xVel, f32 Object_SetInfo(&this->info, this->obj.id); } -void Zoness_SpawnDebris(Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32 state, f32 scale, s32 timerBC, - s32 unk48) { +void Zoness_ActorDebris_Spawn(Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32 state, f32 scale, s32 timerBC, + s32 unk48) { s32 i; for (i = ARRAY_COUNT(gActors) - 1; i > 0; i--) { if (gActors[i].obj.status == OBJ_FREE) { - Zoness_SetupDebris(&gActors[i], pos, rot, xVel, yVel, zVel, state, scale, timerBC, unk48); + Zoness_ActorDebris_Setup(&gActors[i], pos, rot, xVel, yVel, zVel, state, scale, timerBC, unk48); break; } } } -bool Zoness_8019019C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { +bool Zoness_ZoBird_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); if ((limbIndex >= 4) && (limbIndex < 10)) { gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); @@ -520,9 +520,9 @@ bool Zoness_8019019C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* t return false; } -void Zoness_80190204(s32 limbIndex, Vec3f* rot, void* thisx) { +void Zoness_ZoBird_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp24 = { 0.0f, 0.0f, 0.0f }; - Actor* this = (Actor*) thisx; + ZoBird* this = (ZoBird*) thisx; if (this->state == 1) { switch (limbIndex) { @@ -574,15 +574,16 @@ void Zoness_80190204(s32 limbIndex, Vec3f* rot, void* thisx) { } } -void Zoness_Actor235_Draw(Actor235* this) { +void Zoness_ZoBird_Draw(ZoBird* this) { Vec3f frameTable[30]; Matrix_Scale(gCalcMatrix, this->scale, this->scale, this->scale, MTXF_APPLY); Animation_GetFrameData(&D_ZO_600E5EC, this->animFrame, frameTable); - Animation_DrawSkeleton(3, D_ZO_600E7D8, frameTable, Zoness_8019019C, Zoness_80190204, this, gCalcMatrix); + Animation_DrawSkeleton(3, D_ZO_600E7D8, frameTable, Zoness_ZoBird_OverrideLimbDraw, Zoness_ZoBird_PostLimbDraw, + this, gCalcMatrix); } -void Zoness_Actor235_Update(Actor235* this) { +void Zoness_ZoBird_Update(ZoBird* this) { Vec3f src; Vec3f dest; s32 i; @@ -604,8 +605,8 @@ void Zoness_Actor235_Update(Actor235* this) { case 1: for (i = 0; i < 11; i++) { - Zoness_SpawnDebris(&this->vwork[i], &this->vwork[i + 11], RAND_FLOAT_CENTERED(20.0f), - RAND_FLOAT(-10.0f), RAND_FLOAT(10.0f), 41, this->scale, 200, i); + Zoness_ActorDebris_Spawn(&this->vwork[i], &this->vwork[i + 11], RAND_FLOAT_CENTERED(20.0f), + RAND_FLOAT(-10.0f), RAND_FLOAT(10.0f), 41, this->scale, 200, i); } this->itemDrop = DROP_NONE; Actor_Despawn(this); @@ -635,10 +636,10 @@ void Zoness_Actor235_Update(Actor235* this) { } } -void Zoness_80190790(Actor* this) { +void Zoness_80190790(ZoDodora* this) { s32 pad[2]; f32 temp1; - PosRot* temp2; + PosRot* snakePosRot; Vec3f sp44; Vec3f sp38; s32 i; @@ -648,6 +649,7 @@ void Zoness_80190790(Actor* this) { if (this->counter_04E >= 200) { this->counter_04E = 0; } + this->fwork[0] += 4.0f; this->vel.y = SIN_DEG(this->fwork[0]) * 20.0f; this->rot_0F4.x = -this->vel.y * 2.5f; @@ -655,7 +657,7 @@ void Zoness_80190790(Actor* this) { this->rot_0F4.z = SIN_DEG(this->fwork[1]) * 30.0f; for (i = 0, otherActor = gActors; i < ARRAY_COUNT(gActors); i++, otherActor++) { - if ((otherActor->obj.status == OBJ_ACTIVE) && (otherActor->obj.id == OBJ_ACTOR_239) && + if ((otherActor->obj.status == OBJ_ACTIVE) && (otherActor->obj.id == OBJ_ACTOR_ZO_DODORA_WP_COUNT) && (otherActor->iwork[0] == this->iwork[0])) { temp1 = Math_RadToDeg( Math_Atan2F(otherActor->obj.pos.x - this->obj.pos.x, otherActor->obj.pos.z - this->obj.pos.z)); @@ -668,29 +670,34 @@ void Zoness_80190790(Actor* this) { break; } } + Matrix_RotateY(gCalcMatrix, this->rot_0F4.y * M_DTOR, MTXF_NEW); + sp44.x = 0.f; sp44.y = 0.f; sp44.z = 20.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); + this->vel.x = sp38.x; this->vel.z = sp38.z; - temp2 = &gZOSnakePosRots[this->counter_04E]; - temp2->pos.x = this->obj.pos.x; - temp2->pos.y = this->obj.pos.y; - temp2->pos.z = this->obj.pos.z; - temp2->rot.x = this->rot_0F4.x; - temp2->rot.y = this->rot_0F4.y; - temp2->rot.z = this->rot_0F4.z; + + snakePosRot = &gZoDodoraPosRots[this->counter_04E]; + snakePosRot->pos.x = this->obj.pos.x; + snakePosRot->pos.y = this->obj.pos.y; + snakePosRot->pos.z = this->obj.pos.z; + snakePosRot->rot.x = this->rot_0F4.x; + snakePosRot->rot.y = this->rot_0F4.y; + snakePosRot->rot.z = this->rot_0F4.z; } -void Zoness_Actor236_Update(Actor* this) { +void Zoness_ZoDodora_Update(ZoDodora* this) { f32 sp2C; s32 sp28; if ((this->timer_0C0 == 0) && Play_CheckDynaFloorCollision(&sp2C, &sp28, this->obj.pos.x, this->obj.pos.y - 50.0f, this->obj.pos.z)) { - func_effect_8008377C(this->obj.pos.x, sp2C, this->obj.pos.z + 150.0f, 0.0f, 1.7f); + Effect_Effect391_Spawn(this->obj.pos.x, sp2C, this->obj.pos.z + 150.0f, 0.0f, 1.7f); if (this->vel.y >= 0.0f) { AUDIO_PLAY_SFX(NA_SE_OUT_SPLASH_L, this->sfxSource, 4); } else { @@ -698,7 +705,9 @@ void Zoness_Actor236_Update(Actor* this) { } this->timer_0C0 = 30; } + Zoness_80190790(this); + if (this->dmgType != DMG_NONE) { this->dmgType = DMG_NONE; AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); @@ -722,6 +731,7 @@ void Zoness_80190B4C(f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 zRot, Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); + if (arg7 != 0) { RCP_SetupDL_64(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 40, 40, 255, 255); @@ -735,20 +745,19 @@ typedef struct { Hitbox boxes[1]; } JntHitbox; -void Zoness_80190D0C(Actor* this) { - Hitbox* var_s2 = (((JntHitbox*) SEGMENTED_TO_VIRTUAL(D_ZO_602BC58))->boxes); +void Zoness_80190D0C(ZoDodora* this) { + Hitbox* hitbox = (((JntHitbox*) SEGMENTED_TO_VIRTUAL(aZoDodoraHitbox))->boxes); s32 i; s32 k; PosRot* temp_s0; - this->unk_04A = 0; - for (i = this->unk_04A; i < 20; i++, var_s2++) { + for (i = this->unk_04A = 0; i < 20; i++, hitbox++) { k = (D_i3_801BF56C[i] + this->counter_04E) % 200; - temp_s0 = &gZOSnakePosRots[k]; + temp_s0 = &gZoDodoraPosRots[k]; - var_s2->z.offset = temp_s0->pos.z - this->obj.pos.z; - var_s2->y.offset = temp_s0->pos.y - this->obj.pos.y; - var_s2->x.offset = temp_s0->pos.x - this->obj.pos.x; + hitbox->z.offset = temp_s0->pos.z - this->obj.pos.z; + hitbox->y.offset = temp_s0->pos.y - this->obj.pos.y; + hitbox->x.offset = temp_s0->pos.x - this->obj.pos.x; Zoness_80190B4C(temp_s0->pos.x, temp_s0->pos.y, temp_s0->pos.z, temp_s0->rot.x, temp_s0->rot.y, temp_s0->rot.z, D_i3_801BF594[i], this->timer_0C6 % 2U); if (gPlayState != PLAY_PAUSE) { @@ -757,13 +766,13 @@ void Zoness_80190D0C(Actor* this) { } } -void Zoness_Actor236_Draw(Actor236* this) { +void Zoness_ZoDodora_Draw(ZoDodora* this) { Zoness_80190D0C(this); } -void Zoness_80190F28(s32 limbIndex, Vec3f* rot, void* thisx) { +void Zoness_ZoFish_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp2C = { 0.0f, 0.0f, 0.0f }; - Actor* this = (Actor*) thisx; + ZoFish* this = (ZoFish*) thisx; if (this->state == 3) { switch (limbIndex) { @@ -783,7 +792,7 @@ void Zoness_80190F28(s32 limbIndex, Vec3f* rot, void* thisx) { } } -void Zoness_Actor238_Update(Actor238* this) { +void Zoness_ZoFish_Update(ZoFish* this) { Vec3f src; Vec3f dest; f32 sp7C; @@ -851,14 +860,14 @@ void Zoness_Actor238_Update(Actor238* this) { } this->timer_0C0 = 10; this->iwork[0]++; - func_effect_8008377C(this->obj.pos.x, sp7C, this->obj.pos.z, 0.0f, 0.7f); + Effect_Effect391_Spawn(this->obj.pos.x, sp7C, this->obj.pos.z, 0.0f, 0.7f); } break; case 3: for (i = 0; i < 3; i++) { - Zoness_SpawnDebris(&this->vwork[i], &this->vwork[3 + i], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(-10.0f), - RAND_FLOAT(10.0f), 42, this->scale, 200, i); + Zoness_ActorDebris_Spawn(&this->vwork[i], &this->vwork[3 + i], RAND_FLOAT_CENTERED(20.0f), + RAND_FLOAT(-10.0f), RAND_FLOAT(10.0f), 42, this->scale, 200, i); } this->itemDrop = DROP_SILVER_RING_25p; Actor_Despawn(this); @@ -880,44 +889,43 @@ void Zoness_Actor238_Update(Actor238* this) { } } -void Zoness_Actor238_Draw(Actor238* this) { +void Zoness_ZoFish_Draw(ZoFish* this) { Vec3f frameTable[20]; Matrix_Scale(gCalcMatrix, this->scale, this->scale, this->scale, MTXF_APPLY); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); Animation_GetFrameData(&D_ZO_601AA48, this->animFrame, frameTable); - Animation_DrawSkeleton(3, D_ZO_601AB14, frameTable, NULL, Zoness_80190F28, this, gCalcMatrix); + Animation_DrawSkeleton(3, D_ZO_601AB14, frameTable, NULL, Zoness_ZoFish_PostLimbDraw, this, gCalcMatrix); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); } -void Zoness_801915A4(Actor* this) { +void Zoness_ZoEnergyBall_Init(ZoEnergyBall* this) { s32 i; - Actor* actor241; + Actor* energyBall; this->health = 50; this->fwork[0] = this->obj.pos.z - 10000.0f; - for (i = 0, actor241 = &gActors[0]; i < ARRAY_COUNT(gActors); i++, actor241++) { - if (actor241->obj.status == OBJ_FREE) { - Actor_Initialize(actor241); - actor241->obj.status = OBJ_INIT; - actor241->obj.id = OBJ_ACTOR_241; - actor241->obj.pos.x = this->obj.pos.x; - actor241->obj.pos.y = this->obj.pos.y; - actor241->obj.pos.z = this->obj.pos.z; - actor241->iwork[0] = this->index + 1; - Object_SetInfo(&actor241->info, actor241->obj.id); + for (i = 0, energyBall = &gActors[0]; i < ARRAY_COUNT(gActors); i++, energyBall++) { + if (energyBall->obj.status == OBJ_FREE) { + Actor_Initialize(energyBall); + energyBall->obj.status = OBJ_INIT; + energyBall->obj.id = OBJ_ACTOR_ZO_ENERGY_BALL; + energyBall->obj.pos.x = this->obj.pos.x; + energyBall->obj.pos.y = this->obj.pos.y; + energyBall->obj.pos.z = this->obj.pos.z; + energyBall->iwork[0] = this->index + 1; + Object_SetInfo(&energyBall->info, energyBall->obj.id); this->iwork[0] = i; break; } } - if (i >= ARRAY_COUNT(gActors)) { - actor241->obj.status = OBJ_FREE; + energyBall->obj.status = OBJ_FREE; } } -void Zoness_Actor240_Update(Actor240* this) { +void Zoness_ZGull_Update(ZGull* this) { f32 sp64; f32 sp60; f32 sp5C; @@ -945,7 +953,6 @@ void Zoness_Actor240_Update(Actor240* this) { } this->animFrame++; - if (this->animFrame >= Animation_GetFrameCount(&D_ENMY_PLANET_40057AC)) { this->animFrame = 0; } @@ -1020,15 +1027,16 @@ void Zoness_Actor240_Update(Actor240* this) { } } -void Zoness_Actor240_Draw(Actor240* this) { +void Zoness_ZGull_Draw(ZGull* this) { Animation_GetFrameData(&D_ENMY_PLANET_40057AC, this->animFrame, this->vwork); Animation_DrawSkeleton(1, D_ENMY_PLANET_40058B8, this->vwork, NULL, NULL, &this->index, &gIdentityMatrix); } -void Zoness_80191BB8(Actor* this) { +void Zoness_ZoEnergyBall_Init2(ZoEnergyBall* this) { + /* Unimplemented */ } -void Zoness_Actor241_Update(Actor241* this) { +void Zoness_ZoEnergyBall_Update(ZoEnergyBall* this) { f32 sp4C; s32 sp48; @@ -1039,8 +1047,8 @@ void Zoness_Actor241_Update(Actor241* this) { if (Play_CheckDynaFloorCollision(&sp4C, &sp48, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z) && (this->state == 0)) { - func_effect_8007B344(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 20.0f, 7); - func_effect_8007C120(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.5f, 50); + Effect_Effect384_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 20.0f, 7); + Effect_Effect390_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.5f, 50); Object_Kill(&this->obj, this->sfxSource); this->iwork[0] = 0; Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_OB_MINI_BOMB); @@ -1050,14 +1058,15 @@ void Zoness_Actor241_Update(Actor241* this) { Zoness_8018FF50(this); - if (((gGameFrameCount % 2) == 0)) { - func_effect_8007C484(RAND_FLOAT_CENTERED(50.0f) + this->obj.pos.x, RAND_FLOAT_CENTERED(50.0f) + this->obj.pos.y, - RAND_FLOAT_CENTERED(50.0f) + this->obj.pos.z, this->vel.x, this->vel.y, this->vel.z, - RAND_FLOAT(0.05f) + 0.05f, 0); + if ((gGameFrameCount % 2) == 0) { + Effect_Effect389_Spawn(RAND_FLOAT_CENTERED(50.0f) + this->obj.pos.x, + RAND_FLOAT_CENTERED(50.0f) + this->obj.pos.y, + RAND_FLOAT_CENTERED(50.0f) + this->obj.pos.z, this->vel.x, this->vel.y, this->vel.z, + RAND_FLOAT(0.05f) + 0.05f, 0); } } -void Zoness_Actor241_Draw(Actor241* this) { +void Zoness_ZoEnergyBall_Draw(ZoEnergyBall* this) { RCP_SetupDL_40(); gSPDisplayList(gMasterDisp++, D_ZO_6019EB0); Matrix_RotateY(gGfxMatrix, this->fwork[0] * 0.7f * M_DTOR, MTXF_APPLY); @@ -1066,32 +1075,32 @@ void Zoness_Actor241_Draw(Actor241* this) { gSPDisplayList(gMasterDisp++, D_ZO_6023D50); } -void Zoness_80191E94(s32 limbIndex, Vec3f* rot, void* thisx) { +void Zoness_ZoTroika_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp24 = { 0.0f, 0.0f, 0.0f }; - Actor* this = thisx; + ZoTroika* this = (ZoTroika*) thisx; if (this->state == 4) { switch (limbIndex) { case 1: Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[0]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[6]); - return; + break; case 2: Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[1]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[7]); - return; + break; case 3: Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[2]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[8]); - return; + break; case 4: Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[3]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[9]); - return; + break; case 8: Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[4]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[10]); - return; + break; case 9: Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[5]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[11]); @@ -1100,15 +1109,15 @@ void Zoness_80191E94(s32 limbIndex, Vec3f* rot, void* thisx) { } } -void Zoness_Actor242_Draw(Actor242* this) { +void Zoness_ZoTroika_Draw(ZoTroika* this) { Vec3f jointTable[20]; Matrix_Scale(gCalcMatrix, this->scale, this->scale, this->scale, MTXF_APPLY); Animation_GetFrameData(&D_ZO_60195EC, this->animFrame, jointTable); - Animation_DrawSkeleton(3, D_ZO_6019738, jointTable, NULL, Zoness_80191E94, this, gCalcMatrix); + Animation_DrawSkeleton(3, D_ZO_6019738, jointTable, NULL, Zoness_ZoTroika_PostLimbDraw, this, gCalcMatrix); } -void Zoness_Actor242_Update(Actor242* this) { +void Zoness_ZoTroika_Update(ZoTroika* this) { s32 i; f32 spB8; f32 x; @@ -1135,7 +1144,7 @@ void Zoness_Actor242_Update(Actor242* this) { if ((this->iwork[0] == 0) && (Play_CheckDynaFloorCollision(&spB8, &spA0, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z) != 0)) { - func_effect_8008377C(this->obj.pos.x, spB8, this->obj.pos.z + 100.0f, 0.0f, 1.5f); + Effect_Effect391_Spawn(this->obj.pos.x, spB8, this->obj.pos.z + 100.0f, 0.0f, 1.5f); this->iwork[0]++; @@ -1220,8 +1229,8 @@ void Zoness_Actor242_Update(Actor242* this) { case 4: for (i = 0; i < 6; i++) { - Zoness_SpawnDebris(&this->vwork[i], &this->vwork[i + 6], RAND_FLOAT_CENTERED(40.0f), RAND_FLOAT(-10.0f), - RAND_FLOAT(20.0f), 44, this->scale, 200, i); + Zoness_ActorDebris_Spawn(&this->vwork[i], &this->vwork[i + 6], RAND_FLOAT_CENTERED(40.0f), + RAND_FLOAT(-10.0f), RAND_FLOAT(20.0f), 44, this->scale, 200, i); } this->itemDrop = DROP_BOMB; Actor_Despawn(this); @@ -1241,9 +1250,9 @@ void Zoness_Actor242_Update(Actor242* this) { } } -void Zoness_801926F4(s32 limbIndex, Vec3f* rot, void* thisx) { +void Zoness_ZoShrimp_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp24 = { 0.0f, 0.0f, 0.0f }; - Actor* this = (Actor*) thisx; + ZoShrimp* this = (ZoShrimp*) thisx; if (this->state == 2) { switch (limbIndex) { @@ -1271,7 +1280,7 @@ void Zoness_801926F4(s32 limbIndex, Vec3f* rot, void* thisx) { } } -void Zoness_Actor243_Update(Actor243* this) { +void Zoness_ZoShrimp_Update(ZoShrimp* this) { Vec3f src; Vec3f dest; f32 sp74; @@ -1328,8 +1337,8 @@ void Zoness_Actor243_Update(Actor243* this) { case 2: for (i = 0; i < 5; i++) { - Zoness_SpawnDebris(&this->vwork[i], &this->vwork[5 + i], RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(-10.0f), - RAND_FLOAT(10.0f), 43, this->scale, 200, i); + Zoness_ActorDebris_Spawn(&this->vwork[i], &this->vwork[5 + i], RAND_FLOAT_CENTERED(20.0f), + RAND_FLOAT(-10.0f), RAND_FLOAT(10.0f), 43, this->scale, 200, i); } this->itemDrop = DROP_NONE; Actor_Despawn(this); @@ -1342,7 +1351,7 @@ void Zoness_Actor243_Update(Actor243* this) { if ((this->iwork[0] == 0) && (Play_CheckDynaFloorCollision(&sp74, &sp70, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z) != 0)) { this->iwork[0]++; - func_effect_8008377C(this->obj.pos.x, sp74, this->obj.pos.z, 0.0f, 0.7f); + Effect_Effect391_Spawn(this->obj.pos.x, sp74, this->obj.pos.z, 0.0f, 0.7f); if (this->vel.y >= 0.0f) { AUDIO_PLAY_SFX(NA_SE_OUT_SPLASH_L, this->sfxSource, 4); } else { @@ -1351,16 +1360,16 @@ void Zoness_Actor243_Update(Actor243* this) { } } -void Zoness_Actor243_Draw(Actor243* this) { +void Zoness_ZoShrimp_Draw(ZoShrimp* this) { Vec3f frameTable[20]; Animation_GetFrameData(&D_ZO_6021ABC, this->animFrame, frameTable); - Animation_DrawSkeleton(3, D_ZO_6021B88, frameTable, NULL, Zoness_801926F4, this, gCalcMatrix); + Animation_DrawSkeleton(3, D_ZO_6021B88, frameTable, NULL, Zoness_ZoShrimp_PostLimbDraw, this, gCalcMatrix); } -void Zoness_80192C84(s32 limbIndex, Vec3f* rot, void* thisx) { +void Zoness_ZoObnema_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp24 = { 0.0f, 0.0f, 0.0f }; - Actor* this = (Actor*) thisx; + ZoObnema* this = (ZoObnema*) thisx; if (this->state == 3) { switch (limbIndex) { @@ -1404,7 +1413,7 @@ void Zoness_80192C84(s32 limbIndex, Vec3f* rot, void* thisx) { } } -void Zoness_Actor244_Update(Actor244* this) { +void Zoness_ZoObnema_Update(ZoObnema* this) { s32 i; Vec3f src; Vec3f dest; @@ -1449,8 +1458,8 @@ void Zoness_Actor244_Update(Actor244* this) { case 3: for (i = 0; i < 9; i++) { - Zoness_SpawnDebris(&this->vwork[i], &this->vwork[9 + i], RAND_FLOAT_CENTERED(40.0f), RAND_FLOAT(-10.0f), - RAND_FLOAT(20.0f), 59, this->scale, 200, i); + Zoness_ActorDebris_Spawn(&this->vwork[i], &this->vwork[9 + i], RAND_FLOAT_CENTERED(40.0f), + RAND_FLOAT(-10.0f), RAND_FLOAT(20.0f), 59, this->scale, 200, i); } this->itemDrop = DROP_BOMB_33p; Actor_Despawn(this); @@ -1478,11 +1487,11 @@ void Zoness_Actor244_Update(Actor244* this) { } } -void Zoness_Actor244_Draw(Actor* actor) { +void Zoness_ZoObnema_Draw(Actor* actor) { Vec3f sp28[30]; Animation_GetFrameData(&D_ZO_601AFB8, actor->animFrame, sp28); - Animation_DrawSkeleton(2, D_ZO_601B184, sp28, NULL, Zoness_80192C84, actor, gCalcMatrix); + Animation_DrawSkeleton(2, D_ZO_601B184, sp28, NULL, Zoness_ZoObnema_PostLimbDraw, actor, gCalcMatrix); } s32 D_i3_801BF5F0[6] = { @@ -1492,7 +1501,7 @@ f32 D_i3_801BF608[6] = { -45.0f, 0.0f, -45.0f, 0.0f, -45.0f, 0.0f, }; -void Zoness_BossZo_Init(BossZO* this) { +void Zoness_ZoSarumarine_Init(ZoSarumarine* this) { s32 i; gBossActive = true; @@ -1554,7 +1563,7 @@ void Zoness_BossZo_Init(BossZO* this) { for (i = 0; i < 2; i++) { Actor_Initialize(&gActors[i]); gActors[i].obj.status = OBJ_INIT; - gActors[i].obj.id = OBJ_ACTOR_248 + i; + gActors[i].obj.id = OBJ_ACTOR_ZO_CRANE_MAGNET + i; gActors[i].obj.pos.x = this->obj.pos.x; gActors[i].obj.pos.y = this->obj.pos.y; gActors[i].obj.pos.z = this->obj.pos.z; @@ -1588,7 +1597,7 @@ void Zoness_80193628(Object* obj, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 ar obj->rot.x, obj->rot.y, obj->rot.z, dest.x + arg6, dest.y, dest.z, 1.0f); } -void Zoness_801937D8(Effect394* this, f32 xPos, f32 yPos, f32 zPos, f32 yRot) { +void Zoness_Effect394_Setup(Effect394* this, f32 xPos, f32 yPos, f32 zPos, f32 yRot) { Vec3f src; Vec3f dest; @@ -1615,18 +1624,18 @@ void Zoness_801937D8(Effect394* this, f32 xPos, f32 yPos, f32 zPos, f32 yRot) { Object_SetInfo(&this->info, this->obj.id); } -void Zoness_80193908(f32 xPos, f32 yPos, f32 zPos, f32 yRot) { +void Zoness_Effect394_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 yRot) { s32 i; for (i = 0; i < ARRAY_COUNT(gEffects); i++) { if (gEffects[i].obj.status == OBJ_FREE) { - Zoness_801937D8(&gEffects[i], xPos, yPos, zPos, yRot); + Zoness_Effect394_Setup(&gEffects[i], xPos, yPos, zPos, yRot); break; } } } -void Zoness_80193970(Effect394* this, f32 xPos, f32 yPos, f32 zPos, f32 yRot, s32 arg5) { +void Zoness_Effect394_Setup2(Effect394* this, f32 xPos, f32 yPos, f32 zPos, f32 yRot, s32 arg5) { Vec3f src; Vec3f dest; @@ -1652,18 +1661,18 @@ void Zoness_80193970(Effect394* this, f32 xPos, f32 yPos, f32 zPos, f32 yRot, s3 Object_SetInfo(&this->info, this->obj.id); } -void Zoness_80193A98(f32 xPos, f32 yPos, f32 zPos, f32 yRot, s32 arg5) { +void Zoness_Effect394_Spawn2(f32 xPos, f32 yPos, f32 zPos, f32 yRot, s32 arg5) { s32 i; for (i = 0; i < ARRAY_COUNT(gEffects); i++) { if (gEffects[i].obj.status == OBJ_FREE) { - Zoness_80193970(&gEffects[i], xPos, yPos, zPos, yRot, arg5); + Zoness_Effect394_Setup2(&gEffects[i], xPos, yPos, zPos, yRot, arg5); break; } } } -void Zoness_80193B08(Effect394* this, f32 xPos, f32 yPos, f32 zPos, f32 scale) { +void Zoness_Effect394_Setup3(Effect394* this, f32 xPos, f32 yPos, f32 zPos, f32 scale) { Effect_Initialize(this); this->obj.status = OBJ_INIT; this->obj.id = OBJ_EFFECT_394; @@ -1690,12 +1699,12 @@ void Zoness_80193B08(Effect394* this, f32 xPos, f32 yPos, f32 zPos, f32 scale) { Object_SetInfo(&this->info, this->obj.id); } -void Zoness_80193C5C(f32 xPos, f32 yPos, f32 zPos, f32 scale) { +void Zoness_Effect394_Spawn3(f32 xPos, f32 yPos, f32 zPos, f32 scale) { s32 i; for (i = 80; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { - Zoness_80193B08(&gEffects[i], xPos, yPos, zPos, scale); + Zoness_Effect394_Setup3(&gEffects[i], xPos, yPos, zPos, scale); break; } } @@ -1710,8 +1719,8 @@ f32 Zoness_80193CC8(s32 arg0) { return var_fv1; } -bool Zoness_80193D08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { - Boss* this = (Boss*) thisx; +bool Zoness_ZoSarumarine_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { + ZoSarumarine* this = (ZoSarumarine*) thisx; if (sZoLimbTimers[limbIndex] == LIMB_DESTROYED) { *dList = NULL; @@ -1856,9 +1865,9 @@ bool Zoness_80193D08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* t return false; } -void Zoness_80194394(s32 limbIndex, Vec3f* rot, void* thisx) { +void Zoness_ZoSarumarine_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f spB4; - Boss* this = (Boss*) thisx; + ZoSarumarine* this = (ZoSarumarine*) thisx; Vec3f spA4 = { 96.0f, 199.0f, -9.0f }; Vec3f sp98 = { 50.0f, 150.0f, -20.0f }; Vec3f sp8C = { 50.0f, 150.0f, 20.0f }; @@ -2002,10 +2011,11 @@ void Zoness_80194394(s32 limbIndex, Vec3f* rot, void* thisx) { } } -void Zoness_Boss_Draw(BossZO* this) { +void Zoness_ZoSarumarine_Draw(ZoSarumarine* this) { Matrix_Translate(gCalcMatrix, 0.0f, this->fwork[ZO_FWK_3], 0.0f, MTXF_APPLY); Matrix_Scale(gCalcMatrix, 2.6f, 2.6f, 2.6f, MTXF_APPLY); - Animation_DrawSkeleton(3, D_ZO_6019E18, this->vwork, Zoness_80193D08, Zoness_80194394, this, gCalcMatrix); + Animation_DrawSkeleton(3, D_ZO_6019E18, this->vwork, Zoness_ZoSarumarine_OverrideLimbDraw, + Zoness_ZoSarumarine_PostLimbDraw, this, gCalcMatrix); } f32 D_i3_801BF6BC[2] = { -600.0f, -3400.0f }; @@ -2013,8 +2023,7 @@ f32 D_i3_801BF6C4[2] = { 330.0f, 30.0f }; f32 D_i3_801BF6CC[2] = { 250.0f, -250.0f }; f32 D_i3_801BF6D4[2] = { 330.0f, 30.0f }; -// OBJ_BOSS_ZO action -void Zoness_Boss_Update(BossZO* this) { +void Zoness_ZoSarumarine_Update(ZoSarumarine* this) { f32 sp134; s32 sp130; s32 i; @@ -2072,8 +2081,8 @@ void Zoness_Boss_Update(BossZO* this) { if (sZoSwork[ZO_BSS_43] < 0) { sZoSwork[ZO_BSS_43] = 0; } - Zoness_80193A98(sZoFwork[ZO_BSF_102_X], sZoFwork[ZO_BSF_102_Y], sZoFwork[ZO_BSF_102_Z], this->obj.rot.y, - sZoSwork[ZO_BSS_43]); + Zoness_Effect394_Spawn2(sZoFwork[ZO_BSF_102_X], sZoFwork[ZO_BSF_102_Y], sZoFwork[ZO_BSF_102_Z], + this->obj.rot.y, sZoSwork[ZO_BSS_43]); sZoSwork[ZO_BSS_44] = 255; } else { sZoSwork[ZO_BSS_44] = (s32) this->obj.rot.y - 180.0f; @@ -2085,8 +2094,8 @@ void Zoness_Boss_Update(BossZO* this) { if (sZoSwork[ZO_BSS_44] < 0) { sZoSwork[ZO_BSS_44] = 0; } - Zoness_80193A98(sZoFwork[ZO_BSF_99_X], sZoFwork[ZO_BSF_99_Y], sZoFwork[ZO_BSF_99_Z], this->obj.rot.y, - sZoSwork[ZO_BSS_44]); + Zoness_Effect394_Spawn2(sZoFwork[ZO_BSF_99_X], sZoFwork[ZO_BSF_99_Y], sZoFwork[ZO_BSF_99_Z], + this->obj.rot.y, sZoSwork[ZO_BSS_44]); sZoSwork[ZO_BSS_43] = 255; } } @@ -2103,17 +2112,17 @@ void Zoness_Boss_Update(BossZO* this) { if ((this->swork[ZO_SWK_9] == 0) && (this->state >= 2) && (this->health != 0)) { if (this->swork[ZO_SWK_10] == 0) { - func_effect_8007AFD0(this->obj.pos.x, this->obj.pos.z, 50.0f, 0.0f, 5.0f); - func_effect_8007AFD0(this->obj.pos.x, this->obj.pos.z, 46.0f, 19.0f, 5.0f); - func_effect_8007AFD0(this->obj.pos.x, this->obj.pos.z, 35.0f, 35.0f, 5.0f); - func_effect_8007AFD0(this->obj.pos.x, this->obj.pos.z, 19.0f, 46.0f, 5.0f); - func_effect_8007AFD0(this->obj.pos.x, this->obj.pos.z, 0.0f, 50.0f, 5.0f); + Effect_Effect382_Spawn(this->obj.pos.x, this->obj.pos.z, 50.0f, 0.0f, 5.0f); + Effect_Effect382_Spawn(this->obj.pos.x, this->obj.pos.z, 46.0f, 19.0f, 5.0f); + Effect_Effect382_Spawn(this->obj.pos.x, this->obj.pos.z, 35.0f, 35.0f, 5.0f); + Effect_Effect382_Spawn(this->obj.pos.x, this->obj.pos.z, 19.0f, 46.0f, 5.0f); + Effect_Effect382_Spawn(this->obj.pos.x, this->obj.pos.z, 0.0f, 50.0f, 5.0f); } else { - func_effect_8007AFD0(this->obj.pos.x, this->obj.pos.z, -50.0f, 0.0f, 5.0f); - func_effect_8007AFD0(this->obj.pos.x, this->obj.pos.z, -46.0f, 19.0f, 5.0f); - func_effect_8007AFD0(this->obj.pos.x, this->obj.pos.z, -35.0f, 35.0f, 5.0f); - func_effect_8007AFD0(this->obj.pos.x, this->obj.pos.z, -19.0f, 46.0f, 5.0f); - func_effect_8007AFD0(this->obj.pos.x, this->obj.pos.z, 0.0f, 50.0f, 5.0f); + Effect_Effect382_Spawn(this->obj.pos.x, this->obj.pos.z, -50.0f, 0.0f, 5.0f); + Effect_Effect382_Spawn(this->obj.pos.x, this->obj.pos.z, -46.0f, 19.0f, 5.0f); + Effect_Effect382_Spawn(this->obj.pos.x, this->obj.pos.z, -35.0f, 35.0f, 5.0f); + Effect_Effect382_Spawn(this->obj.pos.x, this->obj.pos.z, -19.0f, 46.0f, 5.0f); + Effect_Effect382_Spawn(this->obj.pos.x, this->obj.pos.z, 0.0f, 50.0f, 5.0f); } this->swork[ZO_SWK_11]++; this->swork[ZO_SWK_11] &= 1; @@ -2146,10 +2155,14 @@ void Zoness_Boss_Update(BossZO* this) { AUDIO_PLAY_BGM(NA_BGM_BOSS_ZO); sZoSwork[ZO_BSS_55] = 1; } - func_effect_8008377C(sZoFwork[ZO_BSF_43_X], sp134, sZoFwork[ZO_BSF_43_Z] + 100.0f, 5.0f, 3.0f); - func_effect_8008377C(sZoFwork[ZO_BSF_43_X], sp134, sZoFwork[ZO_BSF_43_Z] + 100.0f, 5.0f, 3.0f); + Effect_Effect391_Spawn(sZoFwork[ZO_BSF_43_X], sp134, sZoFwork[ZO_BSF_43_Z] + 100.0f, 5.0f, + 3.0f); + Effect_Effect391_Spawn(sZoFwork[ZO_BSF_43_X], sp134, sZoFwork[ZO_BSF_43_Z] + 100.0f, 5.0f, + 3.0f); } - func_effect_8008377C(sZoFwork[ZO_BSF_43_X], sp134, sZoFwork[ZO_BSF_43_Z] + 100.0f, sp100, spFC); + + Effect_Effect391_Spawn(sZoFwork[ZO_BSF_43_X], sp134, sZoFwork[ZO_BSF_43_Z] + 100.0f, sp100, spFC); + if (this->timer_050 == 43) { AUDIO_PLAY_SFX(NA_SE_OUT_SPLASH_L, this->sfxSource, 4); } else { @@ -2189,12 +2202,12 @@ void Zoness_Boss_Update(BossZO* this) { if ((this->timer_050 == 0) && ((gGameFrameCount % 4) == 0)) { if (sZoSwork[ZO_BSS_9] != 0) { - Zoness_80193908(sZoFwork[ZO_BSF_29_X], sZoFwork[ZO_BSF_29_Y], sZoFwork[ZO_BSF_29_Z], - this->obj.rot.y); + Zoness_Effect394_Spawn(sZoFwork[ZO_BSF_29_X], sZoFwork[ZO_BSF_29_Y], sZoFwork[ZO_BSF_29_Z], + this->obj.rot.y); } if (sZoSwork[ZO_BSS_10] != 0) { - Zoness_80193908(sZoFwork[ZO_BSF_32_X], sZoFwork[ZO_BSF_32_Y], sZoFwork[ZO_BSF_32_Z], - this->obj.rot.y); + Zoness_Effect394_Spawn(sZoFwork[ZO_BSF_32_X], sZoFwork[ZO_BSF_32_Y], sZoFwork[ZO_BSF_32_Z], + this->obj.rot.y); } sZoSwork[ZO_BSS_6]++; @@ -2296,49 +2309,65 @@ void Zoness_Boss_Update(BossZO* this) { } if (sZoSwork[ZO_BSS_24] != 0) { sZoSwork[ZO_BSS_20] = 1; + if (this->swork[ZO_SWK_7] == 0) { this->swork[ZO_SWK_7]++; this->swork[ZO_SWK_7] &= 1; Radio_PlayMessage(gMsg_ID_6078, RCID_BOSS_ZONESS); } + if (this->timer_056 == 0) { this->swork[ZO_SWK_1]++; this->swork[ZO_SWK_1] &= 1; this->timer_056 = 100; } + this->fwork[ZO_FWK_5] += 4.0f; this->vel.x = COS_DEG(this->fwork[ZO_FWK_5]) * 40.0f; padF4 = Math_Atan2F(this->fwork[ZO_FWK_6] - this->obj.pos.x, gPlayer[0].cam.eye.z - gPathProgress + D_i3_801BF6BC[this->swork[ZO_SWK_1]] - this->obj.pos.z); padF4 = Math_RadToDeg(padF4); + Math_SmoothStepToAngle(&this->fwork[ZO_FWK_7], padF4, 0.1f, 100.0f, 0.001f); Matrix_RotateY(gCalcMatrix, this->fwork[ZO_FWK_7] * M_DTOR, MTXF_NEW); + spE4.x = spE4.y = 0.0f; spE4.z = 20.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &spE4, &spCC); + var_s0 = 0; this->vel.z = spCC.z - gPathVelZ; + if (this->vel.x > 0.0f) { var_s0 = 1; } + if (var_s0 != this->swork[ZO_SWK_2]) { this->swork[ZO_SWK_2] = var_s0; this->fwork[ZO_FWK_8] = 0.0f; } + Math_SmoothStepToF(&this->fwork[ZO_FWK_8], 10.0f, 0.01f, 0.1f, 0.0f); Math_SmoothStepToAngle(&this->obj.rot.z, D_i3_801BF6C4[var_s0], 0.1f, this->fwork[ZO_FWK_8], 0.00001f); Math_SmoothStepToAngle(&this->obj.rot.y, D_i3_801BF6D4[var_s0], 0.1f, this->fwork[ZO_FWK_8], 0.00001f); + Matrix_RotateX(gCalcMatrix, -this->obj.rot.x * M_DTOR, MTXF_NEW); Matrix_RotateY(gCalcMatrix, -this->obj.rot.y * M_DTOR, MTXF_APPLY); + spE4.x = gPlayer[0].pos.x - sZoFwork[ZO_BSF_93_X]; spE4.y = gPlayer[0].pos.y - sZoFwork[ZO_BSF_93_Y]; spE4.z = gPlayer[0].trueZpos - sZoFwork[ZO_BSF_93_Z]; + Matrix_MultVec3f(gCalcMatrix, &spE4, &spC0); + sp10C = Math_Atan2F(spC0.x, spC0.z); sp10C = Math_RadToDeg(sp10C); + sp110 = Math_Atan2F(spC0.y, sqrtf(SQ(spC0.x) + SQ(spC0.z))); sp110 = Math_RadToDeg(-sp110); + if ((sp10C > 40.0f) && (sp10C < 180.0f)) { sp10C = 40.0f; } @@ -2351,14 +2380,18 @@ void Zoness_Boss_Update(BossZO* this) { if ((sp10C < 320.0f) && (sp10C > 180.0f)) { sp110 = 320.0f; } + spE4.x = gPlayer[0].pos.x - sZoFwork[ZO_BSF_96_X]; spE4.y = gPlayer[0].pos.y - sZoFwork[ZO_BSF_96_Y]; spE4.z = gPlayer[0].trueZpos - sZoFwork[ZO_BSF_96_Z]; + Matrix_MultVec3f(gCalcMatrix, &spE4, &spB4); + sp104 = Math_Atan2F(spB4.x, spB4.z); sp104 = Math_RadToDeg(sp104); sp108 = Math_Atan2F(spB4.y, sqrtf(SQ(spB4.x) + SQ(spB4.z))); sp108 = Math_RadToDeg(-sp108); + if ((sp104 > 40.0f) && (sp104 < 180.0f)) { sp104 = 40.0f; } @@ -2371,10 +2404,12 @@ void Zoness_Boss_Update(BossZO* this) { if ((sp104 < 320.0f) && (sp104 > 180.0f)) { sp108 = 320.0f; } + Math_SmoothStepToAngle(&sZoFwork[ZO_BSF_8], sp10C, 0.2f, 2.0f, 0.0f); Math_SmoothStepToAngle(&sZoFwork[ZO_BSF_7], sp110, 0.2f, 2.0f, 0.0f); Math_SmoothStepToAngle(&sZoFwork[ZO_BSF_10], sp104, 0.2f, 2.0f, 0.0f); Math_SmoothStepToAngle(&sZoFwork[ZO_BSF_9], sp108, 0.2f, 2.0f, 0.0f); + Zoness_80198BE8(this, 0); Zoness_80198BE8(this, 1); } @@ -2384,8 +2419,10 @@ void Zoness_Boss_Update(BossZO* this) { if (this->swork[ZO_SWK_15] == 0) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 0; } + Math_SmoothStepToAngle(&this->obj.rot.z, this->fwork[ZO_FWK_9], 0.1f, 100.0f, 0.00001f); Math_SmoothStepToAngle(&this->fwork[ZO_FWK_9], 0.0f, 0.1f, 100.0f, 0.00001f); + if ((sZoSwork[ZO_BSS_11] == 0) && (sZoLimbTimers[ZO_LIMB_7] != LIMB_DESTROYED)) { Zoness_80198F3C(this, 0, 46); if (sZoFwork[ZO_BSF_17] > -400.0f) { @@ -2421,6 +2458,7 @@ void Zoness_Boss_Update(BossZO* this) { case 5: Math_SmoothStepToAngle(&this->obj.rot.z, this->fwork[ZO_FWK_9], 0.1f, 100.0f, 0.00001f); Math_SmoothStepToAngle(&this->fwork[ZO_FWK_9], 0.0f, 0.1f, 100.0f, 0.00001f); + switch (sZoSwork[ZO_BSS_16]) { case 0: if (sZoSwork[ZO_BSS_13] != 0) { @@ -2511,9 +2549,9 @@ void Zoness_Boss_Update(BossZO* this) { spD8.y = Math_ModF(RAND_FLOAT_CENTERED(60.0f) + 360.0f, 360.0f); spD8.z = this->obj.rot.z; for (i = 0; i < 5; i++) { - Zoness_SpawnDebris(&spE4, &spD8, RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(20.0f), - RAND_FLOAT_CENTERED(30.0f), 4, 1.0f, RAND_FLOAT(15.0f) + (this->scale * 10.0f), - 0); + Zoness_ActorDebris_Spawn(&spE4, &spD8, RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(20.0f), + RAND_FLOAT_CENTERED(30.0f), 4, 1.0f, + RAND_FLOAT(15.0f) + (this->scale * 10.0f), 0); } } @@ -2524,10 +2562,12 @@ void Zoness_Boss_Update(BossZO* this) { sZoLimbTimers[ZO_LIMB_36] = 15; sZoLimbTimers[ZO_LIMB_25] = 15; } - func_effect_8007C120(sZoFwork[ZO_BSF_55_X], sZoFwork[ZO_BSF_55_Y], sZoFwork[ZO_BSF_55_Z], this->vel.x, - this->vel.y, this->vel.z, 0.2f, 10); + + Effect_Effect390_Spawn(sZoFwork[ZO_BSF_55_X], sZoFwork[ZO_BSF_55_Y], sZoFwork[ZO_BSF_55_Z], this->vel.x, + this->vel.y, this->vel.z, 0.2f, 10); func_effect_8007D0E0(sZoFwork[ZO_BSF_55_X] + RAND_FLOAT_CENTERED(200.0f), sZoFwork[ZO_BSF_55_Y] + RAND_RANGE(-160.0f, 640.0f), sZoFwork[ZO_BSF_55_Z], 10.0f); + if (this->timer_050 == 30) { Radio_PlayMessage(gMsg_ID_6079, RCID_BOSS_ZONESS); } @@ -2535,8 +2575,8 @@ void Zoness_Boss_Update(BossZO* this) { gEffects[99].obj.status = gEffects[98].obj.status = OBJ_FREE; sZoFwork[ZO_BSF_25] = -1000.0f; sZoFwork[ZO_BSF_23] = 10.0f; - gShowBossHealth = 0; - func_effect_8007A568(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 80.0f); + gShowBossHealth = false; + Effect_Effect383_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 80.0f); if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { gCsFrameCount = 0; @@ -2564,8 +2604,8 @@ void Zoness_Boss_Update(BossZO* this) { D_ctx_801779A8[0] = 20; if (((gGameFrameCount % 8) == 0) && (Play_CheckDynaFloorCollision(&sp134, &sp130, this->obj.pos.x, -300.0f, this->obj.pos.z) != 0)) { - func_effect_8008377C(RAND_FLOAT_CENTERED(500.0f) + this->obj.pos.x, sp134 - 300.0f, - RAND_FLOAT_CENTERED(3000.0f) + this->obj.pos.z, 5.0f, 2.0f); + Effect_Effect391_Spawn(RAND_FLOAT_CENTERED(500.0f) + this->obj.pos.x, sp134 - 300.0f, + RAND_FLOAT_CENTERED(3000.0f) + this->obj.pos.z, 5.0f, 2.0f); } if ((this->timer_050 == 0) || (this->obj.pos.y < -800.0f)) { Object_Kill(&this->obj, this->sfxSource); @@ -2578,9 +2618,12 @@ void Zoness_Boss_Update(BossZO* this) { ((sZoSwork[ZO_BSS_33] == 0) || (sZoSwork[ZO_BSS_33] >= 30))) { sZoSwork[ZO_BSS_18]--; } + Zoness_8019962C(this, 0.0f); + Math_SmoothStepToF(&sZoFwork[ZO_BSF_1], -130.0f, 0.1f, 2.0f, 0.00001f); Math_SmoothStepToF(&sZoFwork[ZO_BSF_11], 130.0f, 0.1f, 2.0f, 0.00001f); + if (sZoSwork[ZO_BSS_18] < 331) { if (sZoSwork[ZO_BSS_8] != 0) { if ((sZoSwork[ZO_BSS_20] == 0) && (this->swork[ZO_SWK_6] == 1)) { @@ -2642,8 +2685,10 @@ void Zoness_Boss_Update(BossZO* this) { break; } sZoFwork[ZO_BSF_2] += 20.0f; + spE4.x = gPlayer[0].pos.x - this->obj.pos.x; spE4.z = gPlayer[0].trueZpos - this->obj.pos.z; + Math_SmoothStepToAngle(&sZoFwork[ZO_BSF_14], Math_RadToDeg(Math_Atan2F(spE4.x, spE4.z)), 0.5f, 100.0f, 0.001f); Math_SmoothStepToAngle(&sZoFwork[ZO_BSF_0], sZoFwork[ZO_BSF_76], 0.2f, 4.0f, 0.0001f); @@ -2666,32 +2711,45 @@ void Zoness_Boss_Update(BossZO* this) { if ((this->state >= 3) && (this->state < 6)) { Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_MultVec3f(gCalcMatrix, &spA8, &spD8); Matrix_MultVec3f(gCalcMatrix, &sp9C, &spCC); + sp78 = spD8; sp6C = spCC; + Matrix_RotateX(gCalcMatrix, -this->obj.rot.x * M_DTOR, MTXF_NEW); Matrix_RotateY(gCalcMatrix, -this->obj.rot.y * M_DTOR, MTXF_APPLY); + spE4.x = gPlayer[0].pos.x - (this->obj.pos.x + spD8.x); spE4.y = gPlayer[0].pos.y - (this->obj.pos.y + spD8.y); spE4.z = gPlayer[0].trueZpos - (this->obj.pos.z + spD8.z); + Matrix_MultVec3f(gCalcMatrix, &spE4, &spD8); + sp11C = Math_Atan2F(spD8.x, spD8.z); sp11C = Math_RadToDeg(sp11C); + sp120 = Math_Atan2F(spD8.y, sqrtf(SQ(spD8.x) + SQ(spD8.z))); sp120 = Math_RadToDeg(-sp120); + spE4.x = gPlayer[0].pos.x - (this->obj.pos.x + spCC.x); spE4.y = gPlayer[0].pos.y - (this->obj.pos.y + spCC.y); spE4.z = gPlayer[0].trueZpos - (this->obj.pos.z + spCC.z); + Matrix_MultVec3f(gCalcMatrix, &spE4, &spCC); + sp114 = Math_Atan2F(spCC.x, spCC.z); sp114 = Math_RadToDeg(sp114); + sp118 = Math_Atan2F(spCC.y, sqrtf(SQ(spCC.x) + SQ(spCC.z))); sp118 = Math_RadToDeg(-sp118); + Math_SmoothStepToAngle(&sZoFwork[ZO_BSF_15], sp11C, 0.2f, 2.0f, 0.0f); Math_SmoothStepToAngle(&sZoFwork[ZO_BSF_5], sp120, 0.2f, 2.0f, 0.0f); Math_SmoothStepToAngle(&sZoFwork[ZO_BSF_16], sp114, 0.2f, 2.0f, 0.0f); Math_SmoothStepToAngle(&sZoFwork[ZO_BSF_12], sp118, 0.2f, 2.0f, 0.0f); + if ((this->obj.rot.y >= 330.0f) || (this->obj.rot.y <= 30.0f) || ((this->obj.rot.y <= 200.0f) && (this->obj.rot.y >= 160.0f))) { if ((sZoFwork[ZO_BSF_15] > 315.0f) || (sZoFwork[ZO_BSF_15] < 215.0f)) { @@ -2720,7 +2778,7 @@ void Zoness_Boss_Update(BossZO* this) { sZoFwork[ZO_BSF_43_Z]) != 0) && (sZoSwork[ZO_BSS_45] == 0)) { if (gPlayer) {} - func_effect_8008377C(sZoFwork[ZO_BSF_43_X], sp134, sZoFwork[ZO_BSF_43_Z] + 30.0f, 0.0f, 2.0f); + Effect_Effect391_Spawn(sZoFwork[ZO_BSF_43_X], sp134, sZoFwork[ZO_BSF_43_Z] + 30.0f, 0.0f, 2.0f); sZoSwork[ZO_BSS_45]++; } } @@ -2734,11 +2792,13 @@ void Zoness_Boss_Update(BossZO* this) { sZoFwork[ZO_BSF_80] -= 5.0f; sZoFwork[ZO_BSF_81] += 12.0f; sZoFwork[ZO_BSF_82] -= 10.0f; + func_effect_8007D0E0(sZoFwork[ZO_BSF_29_X], sZoFwork[ZO_BSF_29_Y], sZoFwork[ZO_BSF_29_Z], 5.0f); + if ((Play_CheckDynaFloorCollision(&sp134, &sp130, sZoFwork[ZO_BSF_29_X], sZoFwork[ZO_BSF_29_Y] - 100.0f, sZoFwork[ZO_BSF_29_Z]) != 0) && (sZoSwork[ZO_BSS_46] == 0)) { - func_effect_8008377C(sZoFwork[ZO_BSF_29_X], sp134, sZoFwork[ZO_BSF_29_Z] + 30.0f, 0.0f, 2.0f); + Effect_Effect391_Spawn(sZoFwork[ZO_BSF_29_X], sp134, sZoFwork[ZO_BSF_29_Z] + 30.0f, 0.0f, 2.0f); sZoSwork[ZO_BSS_46]++; } } @@ -2756,7 +2816,7 @@ void Zoness_Boss_Update(BossZO* this) { if ((Play_CheckDynaFloorCollision(&sp134, &sp130, sZoFwork[ZO_BSF_32_X], sZoFwork[ZO_BSF_32_Y] - 100.0f, sZoFwork[ZO_BSF_32_Z]) != 0) && (sZoSwork[ZO_BSS_47] == 0)) { - func_effect_8008377C(sZoFwork[ZO_BSF_32_X], sp134, sZoFwork[ZO_BSF_32_Z] + 30.0f, 0.0f, 2.0f); + Effect_Effect391_Spawn(sZoFwork[ZO_BSF_32_X], sp134, sZoFwork[ZO_BSF_32_Z] + 30.0f, 0.0f, 2.0f); sZoSwork[ZO_BSS_47]++; } } @@ -2764,11 +2824,12 @@ void Zoness_Boss_Update(BossZO* this) { if ((sZoSwork[ZO_BSS_13] < 2) && (sZoLimbTimers[ZO_LIMB_5] != LIMB_DESTROYED)) { D_ctx_801779A8[0] = 20; - if (((gGameFrameCount % 2) == 0)) { + if ((gGameFrameCount % 2) == 0) { func_effect_8007D0E0(sZoFwork[ZO_BSF_52_X] + RAND_FLOAT_CENTERED(200.0f), sZoFwork[ZO_BSF_52_Y] + RAND_FLOAT_CENTERED(200.0f), sZoFwork[ZO_BSF_52_Z] + RAND_FLOAT_CENTERED(100.0f), 5.0f); } + if (this->swork[ZO_SWK_14] != 0) { if (sZoLimbTimers[ZO_LIMB_5] == 0) { sZoLimbTimers[ZO_LIMB_5] = sZoLimbTimers[ZO_LIMB_6] = 15; @@ -2789,7 +2850,7 @@ void Zoness_Boss_Update(BossZO* this) { if ((Play_CheckDynaFloorCollision(&sp134, &sp130, sZoFwork[ZO_BSF_52_X], sZoFwork[ZO_BSF_52_Y] - 100.0f, sZoFwork[ZO_BSF_52_Z]) != 0) && (sZoSwork[ZO_BSS_48] == 0)) { - func_effect_8008377C(sZoFwork[ZO_BSF_52_X], sp134, sZoFwork[ZO_BSF_52_Z] + 100.0f, 0.0f, 2.0f); + Effect_Effect391_Spawn(sZoFwork[ZO_BSF_52_X], sp134, sZoFwork[ZO_BSF_52_Z] + 100.0f, 0.0f, 2.0f); sZoSwork[ZO_BSS_48]++; } } @@ -2853,6 +2914,7 @@ void Zoness_Boss_Update(BossZO* this) { (sZoSwork[ZO_BSS_50] == 0)) { sZoLimbTimers[ZO_LIMB_10] = 15; sZoSwork[ZO_BSS_50] = 50; + sZoSwork[ZO_BSS_9] -= this->damage; if (sZoSwork[ZO_BSS_9] <= 0) { sZoSwork[ZO_BSS_50] = sZoSwork[ZO_BSS_9] = 0; @@ -2882,6 +2944,7 @@ void Zoness_Boss_Update(BossZO* this) { (sZoSwork[ZO_BSS_11] == 0) && (sZoSwork[ZO_BSS_12] == 0) && (sZoSwork[ZO_BSS_13] == 0) && (this->state == 3)) { sZoLimbTimers[ZO_LIMB_25] = sZoLimbTimers[ZO_LIMB_36] = 15; + this->health -= this->damage; if (this->health < 150) { AUDIO_PLAY_SFX(NA_SE_EN_KNOCK_DOWN, this->sfxSource, 4); @@ -2911,6 +2974,7 @@ void Zoness_Boss_Update(BossZO* this) { if ((sZoSwork[ZO_BSS_13] >= 2) && (this->state == 5) && (dmgType == DMG_BOMB)) { sZoLimbTimers[ZO_LIMB_5] = sZoLimbTimers[ZO_LIMB_6] = 15; sZoSwork[ZO_BSS_52] = 30; + sZoSwork[ZO_BSS_13] -= this->damage; if (sZoSwork[ZO_BSS_13] < 2) { this->swork[ZO_SWK_14] = 30; @@ -2930,19 +2994,25 @@ void Zoness_Boss_Update(BossZO* this) { (sZoSwork[ZO_BSS_53] == 0)) { sZoLimbTimers[ZO_LIMB_7] = sZoLimbTimers[ZO_LIMB_21] = sZoLimbTimers[ZO_LIMB_22] = 15; sZoSwork[ZO_BSS_53] = 50; + sZoSwork[ZO_BSS_11] -= this->damage; if (sZoSwork[ZO_BSS_11] <= 0) { sZoSwork[ZO_BSS_11] = 0; gCameraShake = 30; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; gFillScreenAlpha = gFillScreenAlphaTarget = 255; gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 25; + this->swork[ZO_SWK_15] = 3; + spD8.x = sZoFwork[ZO_BSF_106_X]; spD8.y = sZoFwork[ZO_BSF_106_Y]; spD8.z = sZoFwork[ZO_BSF_106_Z]; + Effect_SpawnTimedSfxAtPos(&spD8, NA_SE_EN_SINK_PARTS); + sZoSwork[ZO_BSS_16] = 0; ZO_HIT_8(this, 0)->z.offset = ZO_HIT_10(this, 0)->z.offset = 100000.0f; this->state = 4; @@ -2957,19 +3027,25 @@ void Zoness_Boss_Update(BossZO* this) { (sZoSwork[ZO_BSS_54] == 0)) { sZoLimbTimers[ZO_LIMB_11] = sZoLimbTimers[ZO_LIMB_23] = sZoLimbTimers[ZO_LIMB_24] = 15; sZoSwork[ZO_BSS_54] = 50; + sZoSwork[ZO_BSS_12] -= this->damage; if (sZoSwork[ZO_BSS_12] <= 0) { sZoSwork[ZO_BSS_12] = 0; gCameraShake = 30; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; gFillScreenAlpha = gFillScreenAlphaTarget = 255; gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 25; + this->swork[ZO_SWK_15] = 3; + spCC.x = sZoFwork[ZO_BSF_109_X]; spCC.y = sZoFwork[ZO_BSF_109_Y]; spCC.z = sZoFwork[ZO_BSF_109_Z]; + Effect_SpawnTimedSfxAtPos(&spCC, NA_SE_EN_SINK_PARTS); + sZoSwork[ZO_BSS_16] = 0; ZO_HIT_8(this, 1)->z.offset = ZO_HIT_10(this, 1)->z.offset = 100000.0f; this->state = 4; @@ -3077,16 +3153,17 @@ void Zoness_Boss_Update(BossZO* this) { this->fwork[ZO_FWK_1] = SIN_DEG(gGameFrameCount * 7.0f) * 12.0f; this->fwork[ZO_FWK_2] = COS_DEG(gGameFrameCount * 9.0f) * 12.0f; this->fwork[ZO_FWK_3] = SIN_DEG(gGameFrameCount * 10.0f) * 30.0f; + if ((this->timer_054 == 0) && (sZoSwork[ZO_BSS_5] < 2)) { - func_effect_8007AFD0(this->obj.pos.x, this->obj.pos.z, 50.0f, 0.0f, 5.0f); - func_effect_8007AFD0(this->obj.pos.x, this->obj.pos.z, 46.0f, 19.0f, 5.0f); - func_effect_8007AFD0(this->obj.pos.x, this->obj.pos.z, 35.0f, 35.0f, 5.0f); - func_effect_8007AFD0(this->obj.pos.x, this->obj.pos.z, 19.0f, 46.0f, 5.0f); - func_effect_8007AFD0(this->obj.pos.x, this->obj.pos.z, 0.0f, 50.0f, 5.0f); - func_effect_8007AFD0(this->obj.pos.x, this->obj.pos.z, -50.0f, 0.0f, 5.0f); - func_effect_8007AFD0(this->obj.pos.x, this->obj.pos.z, -46.0f, 19.0f, 5.0f); - func_effect_8007AFD0(this->obj.pos.x, this->obj.pos.z, -35.0f, 35.0f, 5.0f); - func_effect_8007AFD0(this->obj.pos.x, this->obj.pos.z, -19.0f, 46.0f, 5.0f); + Effect_Effect382_Spawn(this->obj.pos.x, this->obj.pos.z, 50.0f, 0.0f, 5.0f); + Effect_Effect382_Spawn(this->obj.pos.x, this->obj.pos.z, 46.0f, 19.0f, 5.0f); + Effect_Effect382_Spawn(this->obj.pos.x, this->obj.pos.z, 35.0f, 35.0f, 5.0f); + Effect_Effect382_Spawn(this->obj.pos.x, this->obj.pos.z, 19.0f, 46.0f, 5.0f); + Effect_Effect382_Spawn(this->obj.pos.x, this->obj.pos.z, 0.0f, 50.0f, 5.0f); + Effect_Effect382_Spawn(this->obj.pos.x, this->obj.pos.z, -50.0f, 0.0f, 5.0f); + Effect_Effect382_Spawn(this->obj.pos.x, this->obj.pos.z, -46.0f, 19.0f, 5.0f); + Effect_Effect382_Spawn(this->obj.pos.x, this->obj.pos.z, -35.0f, 35.0f, 5.0f); + Effect_Effect382_Spawn(this->obj.pos.x, this->obj.pos.z, -19.0f, 46.0f, 5.0f); this->timer_054 = 20; sZoSwork[ZO_BSS_5]++; } @@ -3131,8 +3208,8 @@ void Zoness_Boss_Update(BossZO* this) { } } -void Zoness_801986FC(BossZO* this, s32 arg1, f32 xOff, f32 yOff, f32 zOff, f32 yRot) { - Actor245* actor245; +void Zoness_801986FC(ZoSarumarine* this, s32 arg1, f32 xOff, f32 yOff, f32 zOff, f32 yRot) { + ZoBall* actor245; Vec3f src = { 0.0f, 0.0f, 50.0f }; Vec3f dest; s32 i; @@ -3153,29 +3230,35 @@ void Zoness_801986FC(BossZO* this, s32 arg1, f32 xOff, f32 yOff, f32 zOff, f32 y D_ctx_801779A8[0] = 20.0f; Actor_Initialize(actor245); actor245->obj.status = OBJ_INIT; - actor245->obj.id = OBJ_ACTOR_245; + actor245->obj.id = OBJ_ACTOR_ZO_BALL; actor245->obj.pos.x = this->obj.pos.x + xOff; actor245->obj.pos.y = this->obj.pos.y + yOff; actor245->obj.pos.z = this->obj.pos.z + zOff; actor245->health = 10; + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, sZoFwork[ZO_BSF_15 + arg1] * M_DTOR, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, M_DTOR * yRot, MTXF_APPLY); + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + actor245->vel.x = dest.x; actor245->vel.y = dest.y; actor245->vel.z = this->vel.z + dest.z; + Object_SetInfo(&actor245->info, actor245->obj.id); sZoFwork[ZO_BSF_35 + arg1] = 40.0f; AUDIO_PLAY_SFX(NA_SE_EN_S_BALL_SHOT, this->sfxSource, 4); for (i = 0; i < 4; i++) { - Zoness_80193C5C(actor245->obj.pos.x + (dest.x * 4.3f), actor245->obj.pos.y + (dest.y * 4.3f), - actor245->obj.pos.z + (dest.z * 4.3f) + 100.0f, 30.0f); + Zoness_Effect394_Spawn3(actor245->obj.pos.x + (dest.x * 4.3f), + actor245->obj.pos.y + (dest.y * 4.3f), + actor245->obj.pos.z + (dest.z * 4.3f) + 100.0f, 30.0f); } break; } @@ -3187,11 +3270,11 @@ void Zoness_801986FC(BossZO* this, s32 arg1, f32 xOff, f32 yOff, f32 zOff, f32 y } } -void Zoness_801989FC(BossZO* this) { +void Zoness_801989FC(ZoSarumarine* this) { s32 i; Vec3f sp70 = { 0.0f, 0.0f, 20.0f }; Vec3f sp64; - Actor246* actor246; + ZoMine* actor246; s32 j; for (i = 0; i < 2; i++) { @@ -3200,7 +3283,7 @@ void Zoness_801989FC(BossZO* this) { if (actor246->obj.status == OBJ_FREE) { Actor_Initialize(actor246); actor246->obj.status = OBJ_INIT; - actor246->obj.id = OBJ_ACTOR_246; + actor246->obj.id = OBJ_ACTOR_ZO_MINE; actor246->obj.pos.x = sZoFwork[ZO_BSF_37_X + 3 * i]; actor246->obj.pos.y = sZoFwork[ZO_BSF_37_Y + 3 * i]; @@ -3224,7 +3307,7 @@ void Zoness_801989FC(BossZO* this) { } } -void Zoness_80198BE8(BossZO* this, s32 arg1) { +void Zoness_80198BE8(ZoSarumarine* this, s32 arg1) { s32 var_s1; Effect398* effect398; Vec3f src = { 0.0f, 0.0f, 100.0f }; @@ -3275,7 +3358,7 @@ void Zoness_80198BE8(BossZO* this, s32 arg1) { } } -void Zoness_80198ECC(BossZO* this) { +void Zoness_80198ECC(ZoSarumarine* this) { sZoSwork[ZO_BSS_18] = 500; this->timer_050 = 100; this->timer_054 = 0; @@ -3288,7 +3371,7 @@ void Zoness_80198ECC(BossZO* this) { this->fwork[ZO_FWK_4] = 1.0f; } -void Zoness_80198F3C(BossZO* this, s32 arg1, s32 arg2) { +void Zoness_80198F3C(ZoSarumarine* this, s32 arg1, s32 arg2) { if (((gGameFrameCount % 8) == 0) && (Rand_ZeroOne() < 0.5f)) { sZoLimbTimers[ZO_LIMB_7 + 4 * arg1] = sZoLimbTimers[ZO_LIMB_21 + 2 * arg1] = sZoLimbTimers[ZO_LIMB_22 + 2 * arg1] = 15; @@ -3296,12 +3379,12 @@ void Zoness_80198F3C(BossZO* this, s32 arg1, s32 arg2) { func_effect_8007D0E0(sZoFwork[ZO_BSF_0 + arg2] + RAND_FLOAT_CENTERED(400.0f), sZoFwork[ZO_BSF_1 + arg2] + RAND_RANGE(-160.0f, 640.0f), sZoFwork[ZO_BSF_2 + arg2], 7.0f); if ((gGameFrameCount % 2) == 0) { - func_effect_8007C120(sZoFwork[ZO_BSF_0 + arg2], sZoFwork[ZO_BSF_1 + arg2], sZoFwork[ZO_BSF_2 + arg2], - this->vel.x, this->vel.y, this->vel.z, 0.2f, 10); + Effect_Effect390_Spawn(sZoFwork[ZO_BSF_0 + arg2], sZoFwork[ZO_BSF_1 + arg2], sZoFwork[ZO_BSF_2 + arg2], + this->vel.x, this->vel.y, this->vel.z, 0.2f, 10); } } -void Zoness_8019907C(BossZO* this) { +void Zoness_8019907C(ZoSarumarine* this) { if ((sZoSwork[ZO_BSS_9] == 0) && (sZoSwork[ZO_BSS_10] == 0)) { if ((sZoSwork[ZO_BSS_31] == 0) && (sZoSwork[ZO_BSS_30] != 0)) { Radio_PlayMessage(gMsg_ID_6082, RCID_PEPPY); @@ -3319,7 +3402,7 @@ void Zoness_8019907C(BossZO* this) { } } -void Zoness_8019914C(BossZO* this, s32 arg1) { +void Zoness_8019914C(ZoSarumarine* this, s32 arg1) { sZoLimbTimers[ZO_LIMB_7 + 4 * arg1] = sZoLimbTimers[ZO_LIMB_21 + arg1 * 2] = sZoLimbTimers[ZO_LIMB_22 + arg1 * 2] = LIMB_DESTROYED; sZoFwork[ZO_BSF_77] = 0.0f; @@ -3366,7 +3449,7 @@ void Zoness_801991D0(Boss* this, s32 arg1) { #define ZO_HIT_8_2(bossZO, index) ((Hitbox*) (ZO_HIT_7(bossZO) + 1) + (index)) #define ZO_HIT_10_2(bossZO, index) ((Hitbox*) (ZO_HIT_8(bossZO, 0) + 2) + (index)) -void Zoness_80199394(BossZO* this, s32 arg1) { +void Zoness_80199394(ZoSarumarine* this, s32 arg1) { sZoSwork[ZO_BSS_11 + arg1] = 20; ZO_HIT_8(this, arg1)->z.offset = -213.2f; @@ -3377,7 +3460,7 @@ void Zoness_80199394(BossZO* this, s32 arg1) { AUDIO_PLAY_SFX(NA_SE_EN_COMBINE, this->sfxSource, 4); } -void Zoness_80199470(BossZO* this, s32 arg1) { +void Zoness_80199470(ZoSarumarine* this, s32 arg1) { if (sZoSwork[ZO_BSS_13] == 0) { if (sZoFwork[ZO_BSF_17 + arg1] > -400.0f) { sZoFwork[ZO_BSF_17 + arg1] -= 4.0f; @@ -3407,12 +3490,12 @@ void Zoness_80199470(BossZO* this, s32 arg1) { } } -void Zoness_8019962C(BossZO* this, f32 arg1) { +void Zoness_8019962C(ZoSarumarine* this, f32 arg1) { Math_SmoothStepToF(&sZoFwork[ZO_BSF_77], 2.0f, 0.1f, 0.5f, 0.0001f); Math_SmoothStepToAngle(&this->obj.rot.y, arg1, 1.0f, sZoFwork[ZO_BSF_77], 0.0001f); } -void Zoness_Actor245_Update(Actor245* this) { +void Zoness_ZoBall_Update(ZoBall* this) { s32 i; if ((this->dmgType != DMG_NONE) && (this->health != 0)) { @@ -3438,15 +3521,15 @@ void Zoness_Actor245_Update(Actor245* this) { Zoness_8018FF50(this); } -void Zoness_Actor245_Draw(Actor245* this) { +void Zoness_ZoBall_Draw(ZoBall* this) { RCP_SetupDL(&gMasterDisp, SETUPDL_70); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); Matrix_Scale(gGfxMatrix, 2.6f, 2.6f, 2.6f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_ZO_6017950); + gSPDisplayList(gMasterDisp++, aZoBallDL); } -void Zoness_801998E0(Effect374* this, f32 xPos, f32 yPos, f32 zPos) { +void Zoness_Effect374_Setup(Effect374* this, f32 xPos, f32 yPos, f32 zPos) { Effect_Initialize(this); this->obj.status = OBJ_INIT; this->obj.id = OBJ_EFFECT_374; @@ -3459,22 +3542,22 @@ void Zoness_801998E0(Effect374* this, f32 xPos, f32 yPos, f32 zPos) { this->obj.pos.x = xPos; this->scale1 = this->scale2 = 2.5f; func_effect_8007D0E0(xPos, yPos + 30.0f, zPos, 7.0f); - func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y + 30.0f, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 4.0f, 5); + Effect386_Spawn1(this->obj.pos.x, this->obj.pos.y + 30.0f, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 4.0f, 5); Object_SetInfo(&this->info, this->obj.id); } -void Zoness_801999CC(f32 xPos, f32 yPos, f32 zPos) { +void Zoness_Effect374_Spawn(f32 xPos, f32 yPos, f32 zPos) { s32 i; for (i = 0; i < ARRAY_COUNT(gEffects); i++) { if (gEffects[i].obj.status == OBJ_FREE) { - Zoness_801998E0(&gEffects[i], xPos, yPos, zPos); + Zoness_Effect374_Setup(&gEffects[i], xPos, yPos, zPos); break; } } } -void Zoness_Actor246_Update(Actor246* this) { +void Zoness_ZoMine_Update(ZoMine* this) { f32 sp3C; f32 sp38; s32 sp34; @@ -3502,7 +3585,7 @@ void Zoness_Actor246_Update(Actor246* this) { case 1: if ((Play_CheckDynaFloorCollision(&sp3C, &sp34, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z) != 0) && (this->iwork[1] == 0)) { - func_effect_8008377C(this->obj.pos.x, sp3C, this->obj.pos.z, 0.0f, 0.5f); + Effect_Effect391_Spawn(this->obj.pos.x, sp3C, this->obj.pos.z, 0.0f, 0.5f); this->iwork[1]++; AUDIO_PLAY_SFX(NA_SE_ON_SPLASH_S, this->sfxSource, 4); } @@ -3541,7 +3624,7 @@ void Zoness_Actor246_Update(Actor246* this) { Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_OB_EXPLOSION_S); } else { if ((fabsf(this->obj.pos.z - gPlayer[0].trueZpos) < 800.0f) || (this->dmgType != DMG_NONE)) { - Zoness_801999CC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z); + Zoness_Effect374_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z); Object_Kill(&this->obj, this->sfxSource); Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_M); } @@ -3559,20 +3642,20 @@ void Zoness_Actor246_Update(Actor246* this) { } } -void Zoness_Actor246_Draw(Actor246* this) { +void Zoness_ZoMine_Draw(ZoMine* this) { Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ZO_6025E60); } -void Zoness_80199E9C(Actor248* this, f32 arg1, f32 arg2) { +void Zoness_80199E9C(ZoCraneMagnet* this, f32 arg1, f32 arg2) { this->obj.pos.x = sZoFwork[ZO_BSF_60_X]; Math_SmoothStepToF(&this->fwork[0], arg1, 1.0f, arg2, 0.001f); this->obj.pos.y = sZoFwork[ZO_BSF_60_Y] + this[0].fwork[0]; this->obj.pos.z = sZoFwork[ZO_BSF_60_Z]; } -void Zoness_Actor248_Update(Actor248* this) { +void Zoness_ZoCraneMagnet_Update(ZoCraneMagnet* this) { if (sZoSwork[ZO_BSS_13] == 0) { this->state = 3; this->vel.y = -50.0f; @@ -3638,7 +3721,7 @@ void Zoness_Actor248_Update(Actor248* this) { } } -void Zoness_Actor248_Draw(Actor248* this) { +void Zoness_ZoCraneMagnet_Draw(ZoCraneMagnet* this) { f32 var_fv0; s32 i; s32 j; @@ -3698,12 +3781,13 @@ void Zoness_8019A4E0(Actor* this, f32 xPos, f32 yPos, f32 zPos, f32 arg4) { src.z = arg4; Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + this->vel.x = dest.x; this->vel.y = dest.y; this->vel.z = dest.z; } -void Zoness_Actor249_Update(Actor249* this) { +void Zoness_ZoSpikeBall_Update(ZoSpikeBall* this) { f32 sp4C; f32 sp48; f32 sp44; @@ -3716,6 +3800,7 @@ void Zoness_Actor249_Update(Actor249* this) { this->state = 10; this->vel.z = 40.0f; } + this->fwork[3] += 10.0f; this->fwork[1] = 70.0f; @@ -3724,6 +3809,7 @@ void Zoness_Actor249_Update(Actor249* this) { this->obj.pos.x = sZoFwork[ZO_BSF_65_X]; this->obj.pos.y = sZoFwork[ZO_BSF_65_Y]; this->obj.pos.z = sZoFwork[ZO_BSF_65_Z]; + if ((sZoSwork[ZO_BSS_20] != 0) && (this->timer_0BC == 0)) { if ((sZoSwork[ZO_BSS_8] == 0) && (gBosses[0].state == 8)) { var_fv1 = RAND_FLOAT_CENTERED(3000.0f); @@ -3734,9 +3820,9 @@ void Zoness_Actor249_Update(Actor249* this) { } Zoness_8019A4E0(this, gPlayer[0].pos.x + var_fv1, gPlayer[0].pos.y + var_fa0, gPlayer[0].pos.z, 80.0f); this->vel.z -= gPathVelZ; - Zoness_80193C5C(sZoFwork[ZO_BSF_65_X], sZoFwork[ZO_BSF_65_Y], sZoFwork[ZO_BSF_65_Z], 30.0f); - Zoness_80193C5C(sZoFwork[ZO_BSF_65_X], sZoFwork[ZO_BSF_65_Y], sZoFwork[ZO_BSF_65_Z], 30.0f); - Zoness_80193C5C(sZoFwork[ZO_BSF_65_X], sZoFwork[ZO_BSF_65_Y], sZoFwork[ZO_BSF_65_Z], 30.0f); + Zoness_Effect394_Spawn3(sZoFwork[ZO_BSF_65_X], sZoFwork[ZO_BSF_65_Y], sZoFwork[ZO_BSF_65_Z], 30.0f); + Zoness_Effect394_Spawn3(sZoFwork[ZO_BSF_65_X], sZoFwork[ZO_BSF_65_Y], sZoFwork[ZO_BSF_65_Z], 30.0f); + Zoness_Effect394_Spawn3(sZoFwork[ZO_BSF_65_X], sZoFwork[ZO_BSF_65_Y], sZoFwork[ZO_BSF_65_Z], 30.0f); this->timer_0BC = (s32) ((fabsf(sZoFwork[ZO_BSF_28] - -2600.0f) / 100.0f) + 30.0f); this->timer_0C0 = 3; @@ -3814,7 +3900,7 @@ void Zoness_Actor249_Update(Actor249* this) { if (((gGameFrameCount % 8) == 0) && (this->state != 0) && (this->iwork[0] < 8) && (Play_CheckDynaFloorCollision(&sp44, &sp40, this->obj.pos.x, this->obj.pos.y - 100.0f, this->obj.pos.z) != 0)) { - func_effect_8008377C(this->obj.pos.x, sp44, this->obj.pos.z, 0.0f, 0.7f); + Effect_Effect391_Spawn(this->obj.pos.x, sp44, this->obj.pos.z, 0.0f, 0.7f); this->iwork[0]++; if (this->vel.y >= 0.0f) { AUDIO_PLAY_SFX(NA_SE_OUT_SPLASH_L, this->sfxSource, 4); @@ -3824,7 +3910,7 @@ void Zoness_Actor249_Update(Actor249* this) { } } -void Zoness_Actor249_Draw(Actor249* this) { +void Zoness_ZoSpikeBall_Draw(ZoSpikeBall* this) { f32 temp_fa0; f32 temp_fa1; f32 temp_fs0; @@ -3917,7 +4003,7 @@ s32 D_i3_801BF78C[30] = { }; f32 D_i3_801BF804[8] = { 0.0f, 0.0f, 270.0f, 90.0f, 0.0f, 180.0f, 400.0f, 400.0f }; -void Zoness_8019B1F0(Actor* actor) { +void Zoness_ZoCargoShip_Init(Actor* actor) { s32 temp_v1; s32 var_s3; s32 i; @@ -3943,7 +4029,7 @@ void Zoness_8019B1F0(Actor* actor) { actor->obj.rot.x = (s32) fabsf(Math_ModF(actor->obj.rot.x, 100.0f)); } - for (i = 0, var_s6 = 0; var_s3 < 3 && i < ARRAY_COUNT(gActors); i++) { + for (i = 0, var_s6 = 0; (var_s3 < 3) && (i < ARRAY_COUNT(gActors)); i++) { if (gActors[i].obj.status == OBJ_FREE) { if (actor->state == 0) { Matrix_MultVec3f(gCalcMatrix, &D_i3_801BF744[var_s3], &sp84); @@ -3954,10 +4040,10 @@ void Zoness_8019B1F0(Actor* actor) { Actor_Initialize(&gActors[i]); gActors[i].obj.status = OBJ_INIT; if (actor->state == 0) { - gActors[i].obj.id = OBJ_ACTOR_251; + gActors[i].obj.id = OBJ_ACTOR_ZO_CONTAINER; gActors[i].iwork[3] = 777; } else { - gActors[i].obj.id = OBJ_ACTOR_253; + gActors[i].obj.id = OBJ_ACTOR_ZO_SUPPLYCRANE; } gActors[i].obj.pos.x = actor->obj.pos.x + sp84.x; gActors[i].obj.pos.y = actor->obj.pos.y + sp84.y; @@ -3987,7 +4073,7 @@ void Zoness_8019B1F0(Actor* actor) { AUDIO_PLAY_SFX(NA_SE_EN_SHIP_ENGINE_L, actor->sfxSource, 4); } -void Zoness_Actor250_Update(Actor* this) { +void Zoness_ZoCargoShip_Update(Actor* this) { f32 sp6C; s32 sp68; s32 i; @@ -4001,7 +4087,7 @@ void Zoness_Actor250_Update(Actor* this) { for (i = 1; i < 3; i++) { otherActor = &gActors[this->iwork[i]]; if ((otherActor->obj.status != OBJ_FREE) && (otherActor->iwork[1] == this->index) && - (otherActor->obj.id == OBJ_ACTOR_251)) { + (otherActor->obj.id == OBJ_ACTOR_ZO_CONTAINER)) { Matrix_MultVec3f(gCalcMatrix, &D_i3_801BF744[i], &sp58); otherActor->obj.pos.x = this->obj.pos.x + sp58.x; otherActor->obj.pos.y = this->obj.pos.y + sp58.y; @@ -4013,7 +4099,7 @@ void Zoness_Actor250_Update(Actor* this) { case 1: for (i = 1; i < 3; i++) { otherActor = &gActors[this->iwork[i]]; - if ((otherActor->obj.status != OBJ_FREE) && (otherActor->obj.id == OBJ_ACTOR_253) && + if ((otherActor->obj.status != OBJ_FREE) && (otherActor->obj.id == OBJ_ACTOR_ZO_SUPPLYCRANE) && (otherActor->iwork[1] == this->index)) { Matrix_MultVec3f(gCalcMatrix, &D_i3_801BF768[i], &sp58); otherActor->obj.pos.x = this->obj.pos.x + sp58.x; @@ -4030,11 +4116,11 @@ void Zoness_Actor250_Update(Actor* this) { } } -void Zoness_Actor250_Draw(Actor* this) { +void Zoness_ZoCargoShip_Draw(Actor* this) { gSPDisplayList(gMasterDisp++, D_ZO_6006360); } -void Zoness_8019B810(Actor* this) { +void Zoness_ZoContainer_Init(Actor* this) { if (this->iwork[3] == 0) { this->iwork[0] = this->obj.rot.z / 10.0f; this->obj.rot.z = 0.0f; @@ -4049,7 +4135,7 @@ Vec3f D_i3_801BF84C[6] = { { -5.0f, -10.0f, 0.0f }, { -10.0f, 0.0f, 0.0f }, { -5.0f, 10.0f, 0.0f }, }; -void Zoness_Actor251_Update(Actor251* this) { +void Zoness_ZoContainer_Update(ZoContainer* this) { s32 i; s32 j; Vec3f spB4; @@ -4073,9 +4159,9 @@ void Zoness_Actor251_Update(Actor251* this) { case 1: for (i = 0; i < 6; i++) { - Zoness_SpawnDebris(&this->vwork[i], &this->vwork[6 + i], RAND_FLOAT_CENTERED(50.0f), - RAND_FLOAT(10.0f) + 20.0f, RAND_FLOAT_CENTERED(50.0f), 39, this->scale, - RAND_FLOAT(15.0f) + (this->scale * 10.0f), i); + Zoness_ActorDebris_Spawn(&this->vwork[i], &this->vwork[6 + i], RAND_FLOAT_CENTERED(50.0f), + RAND_FLOAT(10.0f) + 20.0f, RAND_FLOAT_CENTERED(50.0f), 39, this->scale, + RAND_FLOAT(15.0f) + (this->scale * 10.0f), i); } for (i = 0; i < 10; i++) { func_effect_80079618(RAND_FLOAT_CENTERED(50.0f) + this->obj.pos.x, @@ -4116,9 +4202,9 @@ void Zoness_Actor251_Update(Actor251* this) { } } -void Zoness_8019BC78(s32 limbIndex, Vec3f* rot, void* thisx) { +void Zoness_ZoContainer_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp24 = { 0.0f, 0.0f, 0.0f }; - Actor* this = (Actor*) thisx; + ZoContainer* this = (ZoContainer*) thisx; if (this->state != 0) { switch (limbIndex) { @@ -4150,44 +4236,45 @@ void Zoness_8019BC78(s32 limbIndex, Vec3f* rot, void* thisx) { } } -void Zoness_Actor251_Draw(Actor* this) { +void Zoness_ZoContainer_Draw(ZoContainer* this) { Vec3f frameTable[20]; Animation_GetFrameData(&D_ZO_6018550, 0, frameTable); - Animation_DrawSkeleton(3, D_ZO_601863C, frameTable, NULL, Zoness_8019BC78, this, gCalcMatrix); + Animation_DrawSkeleton(3, D_ZO_601863C, frameTable, NULL, Zoness_ZoContainer_PostLimbDraw, this, gCalcMatrix); } -void Zoness_Actor252_Update(Actor252* this) { +void Zoness_ZoRadarBuoy_Update(ZoRadarBuoy* this) { s32 pad; f32 sp40; f32 sp3C; s32 sp38; s32 i; - Actor254* actor254; + ZoSearchLight* searchLight; switch (this->state) { case 0: - for (i = 0, actor254 = gActors; i < ARRAY_COUNT(gActors); i++, actor254++) { - if (actor254->obj.status == OBJ_FREE) { - Actor_Initialize(actor254); - actor254->obj.status = OBJ_INIT; - actor254->obj.id = OBJ_ACTOR_254; - actor254->obj.pos.x = this->obj.pos.x; - actor254->obj.pos.y = this->obj.pos.y; - actor254->obj.pos.z = this->obj.pos.z + 30.0f; - actor254->fwork[0] = 230.0f; - actor254->fwork[1] = 0.8f; - actor254->fwork[2] = 1.0f; - actor254->fwork[3] = 1.0f; - actor254->iwork[0] = this->index + 1; - Object_SetInfo(&actor254->info, actor254->obj.id); + for (i = 0, searchLight = gActors; i < ARRAY_COUNT(gActors); i++, searchLight++) { + if (searchLight->obj.status == OBJ_FREE) { + Actor_Initialize(searchLight); + searchLight->obj.status = OBJ_INIT; + searchLight->obj.id = OBJ_ACTOR_ZO_SEARCHLIGHT; + searchLight->obj.pos.x = this->obj.pos.x; + searchLight->obj.pos.y = this->obj.pos.y; + searchLight->obj.pos.z = this->obj.pos.z + 30.0f; + searchLight->fwork[0] = 230.0f; + searchLight->fwork[1] = 0.8f; + searchLight->fwork[2] = 1.0f; + searchLight->fwork[3] = 1.0f; + searchLight->iwork[0] = this->index + 1; + Object_SetInfo(&searchLight->info, searchLight->obj.id); this->iwork[0] = i; break; } } if (i >= ARRAY_COUNT(gActors)) { - actor254->obj.status = OBJ_FREE; + searchLight->obj.status = OBJ_FREE; } + this->health = 10; this->state++; break; @@ -4211,10 +4298,10 @@ void Zoness_Actor252_Update(Actor252* this) { case 2: this->timer_0C2 = 30000; - actor254 = &gActors[this->iwork[0]]; + searchLight = &gActors[this->iwork[0]]; - actor254->iwork[0] = 777; - func_effect_8008377C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 5.0f, 0.7f); + searchLight->iwork[0] = 777; + Effect_Effect391_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 5.0f, 0.7f); func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y + 50.0f, this->obj.pos.z, 5.0f); Object_Kill(&this->obj, this->sfxSource); Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_WT_EXPLOSION_S); @@ -4229,24 +4316,24 @@ void Zoness_Actor252_Update(Actor252* this) { sp3C = 350.0f; } Math_SmoothStepToAngle(&this->obj.rot.z, sp3C, 0.1f, 1.0f, 0); - actor254 = &gActors[this->iwork[0]]; - Math_SmoothStepToAngle(&actor254->obj.rot.z, sp3C, 0.1f, 1.0f, 0); - actor254->obj.pos.y = this->obj.pos.y; + searchLight = &gActors[this->iwork[0]]; + Math_SmoothStepToAngle(&searchLight->obj.rot.z, sp3C, 0.1f, 1.0f, 0); + searchLight->obj.pos.y = this->obj.pos.y; } } -void Zoness_Actor252_Draw(Actor* this) { +void Zoness_ZoRadarBuoy_Draw(Actor* this) { gSPDisplayList(gMasterDisp++, D_ZO_6002E10); } Vec3f D_i3_801BF8AC = { 230.0f, -50.0f, 0.0f }; Vec3f D_i3_801BF8B8 = { 230.0f, -250.0f, 0.0f }; -void Zoness_8019C200(Actor* this) { +void Zoness_ZoSupplyCrane_Init(Actor* this) { s32 i; s32 sp38; Vec3f dest; - Actor251* actor251; + ZoContainer* actor251; this->scale = -1.0f; @@ -4282,7 +4369,7 @@ void Zoness_8019C200(Actor* this) { if (actor251->obj.status == OBJ_FREE) { Actor_Initialize(actor251); actor251->obj.status = OBJ_INIT; - actor251->obj.id = OBJ_ACTOR_251; + actor251->obj.id = OBJ_ACTOR_ZO_CONTAINER; actor251->obj.pos.x = this->obj.pos.x + dest.x; actor251->obj.pos.y = this->obj.pos.y + dest.y + this->fwork[2]; actor251->obj.pos.z = this->obj.pos.z + dest.z + this->fwork[0]; @@ -4299,7 +4386,7 @@ void Zoness_8019C200(Actor* this) { } } -void Zoness_Actor253_Update(Actor* this) { +void Zoness_ZoSupplyCrane_Update(ZoSupplyCrane* this) { Vec3f sp34; Actor* otherActor; @@ -4324,7 +4411,7 @@ void Zoness_Actor253_Update(Actor* this) { Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, &D_i3_801BF8B8, &sp34); - if ((otherActor->obj.status != OBJ_FREE) && (otherActor->obj.id == OBJ_ACTOR_251)) { + if ((otherActor->obj.status != OBJ_FREE) && (otherActor->obj.id == OBJ_ACTOR_ZO_CONTAINER)) { otherActor->obj.pos.x = this->obj.pos.x + sp34.x; otherActor->obj.pos.y = this->obj.pos.y + sp34.y + this->fwork[2]; otherActor->obj.pos.z = this->obj.pos.z + sp34.z; @@ -4336,7 +4423,7 @@ void Zoness_Actor253_Update(Actor* this) { case 1: if ((this->fwork[5] == this->obj.rot.y) && (fabsf(this->obj.pos.z - gPlayer[0].trueZpos) < 1000.0f)) { - if (otherActor->obj.id == OBJ_ACTOR_251) { + if (otherActor->obj.id == OBJ_ACTOR_ZO_CONTAINER) { otherActor->gravity = 1.0f; } this->state = 1; @@ -4375,7 +4462,7 @@ void Zoness_Actor253_Update(Actor* this) { } } -void Zoness_Actor253_Draw(Actor253* this) { +void Zoness_ZoSupplyCrane_Draw(ZoSupplyCrane* this) { f32 var_fv1; s32 i; s32 var_s1; @@ -4431,7 +4518,7 @@ void Zoness_Actor253_Draw(Actor253* this) { f32 D_i3_801BF8C4[2] = { 46.0f, 314.0f }; f32 D_i3_801BF8CC[2] = { 23.0f, 337.0f }; -void Zoness_Actor254_Update(Actor254* this) { +void Zoness_ZoSearchLight_Update(ZoSearchLight* this) { this->timer_0C2 = 30000; switch (this->state) { @@ -4486,7 +4573,7 @@ void Zoness_Actor254_Update(Actor254* this) { this->obj.rot.x = 0.0f; } -void Zoness_Actor254_Draw(Actor254* this) { +void Zoness_ZoSearchLight_Draw(ZoSearchLight* this) { RCP_SetupDL(&gMasterDisp, SETUPDL_72); if (this->iwork[0] != 0) { @@ -4511,14 +4598,14 @@ void Zoness_Actor254_Draw(Actor254* this) { gSPDisplayList(gMasterDisp++, D_ZO_60181E0); } -void Zoness_Actor247_Init(Actor247* this) { +void Zoness_ZoBarrier_Init(ZoBarrier* this) { s32 i; for (i = 0; i < ARRAY_COUNT(gActors); i++) { if (gActors[i].obj.status == OBJ_FREE) { Actor_Initialize(&gActors[i]); gActors[i].obj.status = OBJ_ACTIVE; - gActors[i].obj.id = OBJ_ACTOR_247; + gActors[i].obj.id = OBJ_ACTOR_ZO_BARRIER; gActors[i].obj.pos.x = this->obj.pos.x; gActors[i].obj.pos.y = this->obj.pos.y - 60.0f; gActors[i].fwork[2] = gActors[i].obj.pos.y; @@ -4534,7 +4621,7 @@ void Zoness_Actor247_Init(Actor247* this) { } } -void Zoness_Actor247_Update(Actor247* this) { +void Zoness_ZoBarrier_Update(ZoBarrier* this) { Actor* otherActor; if (this->state == 0) { @@ -4570,8 +4657,8 @@ void Zoness_Actor247_Update(Actor247* this) { } } -bool Zoness_8019D340(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { - Actor* this = (Actor*) thisx; +bool Zoness_ZoBarrier_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { + ZoBarrier* this = (ZoBarrier*) thisx; switch (this->state) { case 0: @@ -4593,11 +4680,12 @@ bool Zoness_8019D340(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* t return false; } -void Zoness_Actor247_Draw(Actor* this) { +void Zoness_ZoBarrier_Draw(Actor* this) { Vec3f frameTable[10]; Animation_GetFrameData(&D_ZO_601FBC4, 0, frameTable); - Animation_DrawSkeleton(1, D_ZO_601FC90, frameTable, Zoness_8019D340, NULL, this, &gIdentityMatrix); + Animation_DrawSkeleton(1, D_ZO_601FC90, frameTable, Zoness_ZoBarrier_OverrideLimbDraw, NULL, this, + &gIdentityMatrix); } void Zoness_LevelStart(Player* player) { @@ -4997,18 +5085,23 @@ void Zoness_8019E5F0(ActorCutscene* this) { this->iwork[11] = 2; this->fwork[0] += 2.0f; this->rot_0F4.x += 0.1f; + this->fwork[21] += 0.2f; if (this->fwork[21] > 0.6f) { this->fwork[21] = 0.6f; } break; } + Matrix_RotateY(gCalcMatrix, (this->rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -(this->rot_0F4.x * M_DTOR), MTXF_APPLY); + src.x = 0.0f; src.y = 0.0f; src.z = this->fwork[0]; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + this->vel.x = dest.x; this->vel.y = dest.y; this->vel.z = dest.z; diff --git a/src/overlays/ovl_i4/fox_bo.c b/src/overlays/ovl_i4/fox_bo.c index f625ee21..ba16a201 100644 --- a/src/overlays/ovl_i4/fox_bo.c +++ b/src/overlays/ovl_i4/fox_bo.c @@ -95,9 +95,9 @@ Matrix D_BO_8019EE80 = { { f32 D_i4_8019EEC0 = 0.0f; -void Bolse_8018BD60(Actor* this) { +void Bolse_8018BD60(ActorEvent* this) { s32 i; - Actor* actor; + ActorAllRange* actor; f32 D_i4_8019EEC4[4] = { 8000.0f, -8000.0f, 8000.0f, -8000.0f }; f32 D_i4_8019EED4[4] = { 8000.0f, 8000.0f, -8000.0f, -8000.0f }; @@ -132,9 +132,9 @@ void Bolse_8018BD60(Actor* this) { f32 D_i4_8019EEE4[] = { -200.0f, -100.0f, -0.0f, 100.0f, 200.0f }; -void Bolse_SpawnEnemies(Actor* this, s32 count) { +void Bolse_SpawnEnemies(ActorEvent* this, s32 count) { s32 i; - Actor* enemy; + ActorAllRange* enemy; for (i = AI360_ENEMY, enemy = &gActors[AI360_ENEMY]; i < count + AI360_ENEMY; i++, enemy++) { if (enemy->obj.status == OBJ_FREE) { @@ -202,7 +202,7 @@ void Bolse_SpawnEnemies(Actor* this, s32 count) { } } -void Bolse_UpdateEventHandler(Actor* this) { +void Bolse_UpdateEventHandler(ActorEvent* this) { s32 i; Player* player = &gPlayer[0]; s32 pad; @@ -448,23 +448,23 @@ void Bolse_UpdateEventHandler(Actor* this) { } } -s32 Bolse_8018CC60(Actor* actor) { - Vec3f sp1C; +s32 Bolse_8018CC60(Actor* this) { + Vec3f src; if (gAllRangeCheckpoint == 0) { - actor->obj.pos.x = sp1C.x = actor->fwork[10]; - actor->obj.pos.y = sp1C.y = actor->fwork[11]; - actor->obj.pos.z = sp1C.z = actor->fwork[12]; - Matrix_MultVec3fNoTranslate(&D_BO_8019EE80, &sp1C, &actor->obj.pos); - actor->fwork[13] = gBosses[0].obj.rot.y; + this->obj.pos.x = src.x = this->fwork[10]; + this->obj.pos.y = src.y = this->fwork[11]; + this->obj.pos.z = src.z = this->fwork[12]; + Matrix_MultVec3fNoTranslate(&D_BO_8019EE80, &src, &this->obj.pos); + this->fwork[13] = gBosses[0].obj.rot.y; } return 0; } -s32 Bolse_8018CCE8(Actor* actor) { +s32 Bolse_8018CCE8(BoLaserCannon* this) { s32 i; - s32 var_v0; + s32 actorIndex; f32 temp_fs0; f32 temp_fv0; f32 x; @@ -473,7 +473,7 @@ s32 Bolse_8018CCE8(Actor* actor) { f32 var_fv1 = 10000.0f; f32 var_fa0 = 10000.0f; - var_v0 = 0; + actorIndex = 0; for (i = 0; i < 4; i += 2) { if (i != 0) { @@ -484,13 +484,13 @@ s32 Bolse_8018CCE8(Actor* actor) { z = gPlayer[0].pos.z; } - temp_fs0 = fabsf(x - actor->obj.pos.x); - temp_fv0 = fabsf(z - actor->obj.pos.z); + temp_fs0 = fabsf(x - this->obj.pos.x); + temp_fv0 = fabsf(z - this->obj.pos.z); if (!((var_fv1 < temp_fs0) || (var_fa0 < temp_fv0))) { var_fv1 = temp_fs0; var_fa0 = temp_fv0; - var_v0 = i; + actorIndex = i; //! FAKE: if (gPlayer) {} } @@ -503,76 +503,76 @@ s32 Bolse_8018CCE8(Actor* actor) { z = gPlayer[0].pos.z; } - temp_fs0 = fabsf(x - actor->obj.pos.x); - temp_fv0 = fabsf(z - actor->obj.pos.z); + temp_fs0 = fabsf(x - this->obj.pos.x); + temp_fv0 = fabsf(z - this->obj.pos.z); if (!((var_fv1 < temp_fs0) || (var_fa0 < temp_fv0))) { var_fv1 = temp_fs0; var_fa0 = temp_fv0; - var_v0 = i + 1; + actorIndex = i + 1; } } - if (var_v0 == 0) { + if (actorIndex == 0) { x = gPlayer[0].pos.x; y = gPlayer[0].pos.y; z = gPlayer[0].pos.z; } else { - x = gActors[var_v0].obj.pos.x; - y = gActors[var_v0].obj.pos.y; - z = gActors[var_v0].obj.pos.z; + x = gActors[actorIndex].obj.pos.x; + y = gActors[actorIndex].obj.pos.y; + z = gActors[actorIndex].obj.pos.z; } - actor->fwork[0] = x; - actor->fwork[1] = y; - actor->fwork[2] = z; + this->fwork[0] = x; + this->fwork[1] = y; + this->fwork[2] = z; return 0; } -s32 Bolse_8018CE5C(Actor* actor) { +s32 Bolse_8018CE5C(BoLaserCannon* this) { f32 x; f32 y; f32 z; - if (actor->iwork[0] == 0) { + if (this->iwork[0] == 0) { return 0; } - if (((actor->index + gGameFrameCount) & 3) == 0) { - x = actor->fwork[0] - actor->obj.pos.x + RAND_FLOAT_CENTERED(100.0f); - y = actor->fwork[1] - (actor->obj.pos.y + 180.0f) + RAND_FLOAT_CENTERED(100.0f); - z = actor->fwork[2] - actor->obj.pos.z; + if (((this->index + gGameFrameCount) % 4) == 0) { + x = this->fwork[0] - this->obj.pos.x + RAND_FLOAT_CENTERED(100.0f); + y = this->fwork[1] - (this->obj.pos.y + 180.0f) + RAND_FLOAT_CENTERED(100.0f); + z = this->fwork[2] - this->obj.pos.z; - actor->fwork[6] = Math_RadToDeg(Math_Atan2F(x, z)) - actor->obj.rot.y; + this->fwork[6] = Math_RadToDeg(Math_Atan2F(x, z)) - this->obj.rot.y; - if (actor->fwork[6] >= 360.0f) { - actor->fwork[6] -= 360.0f; + if (this->fwork[6] >= 360.0f) { + this->fwork[6] -= 360.0f; } - if (actor->fwork[6] < 0.0f) { - actor->fwork[6] += 360.0f; + if (this->fwork[6] < 0.0f) { + this->fwork[6] += 360.0f; } - actor->fwork[5] = Math_RadToDeg(Math_Atan2F(y, sqrtf(SQ(x) + SQ(z)))); + this->fwork[5] = Math_RadToDeg(Math_Atan2F(y, sqrtf(SQ(x) + SQ(z)))); } - Math_SmoothStepToF(&actor->rot_0F4.x, actor->fwork[5], 0.1f, 4.8f, 0.1f); - Math_SmoothStepToF(&actor->rot_0F4.y, actor->fwork[6], 0.1f, 4.8f, 0.1f); + Math_SmoothStepToF(&this->rot_0F4.x, this->fwork[5], 0.1f, 4.8f, 0.1f); + Math_SmoothStepToF(&this->rot_0F4.y, this->fwork[6], 0.1f, 4.8f, 0.1f); return 0; } -bool Bolse_8018D008(Actor* actor) { +bool Bolse_8018D008(BoLaserCannon* this) { f32 x; f32 y; f32 z; - if (actor->iwork[0] == 0) { + if (this->iwork[0] == 0) { return 0; } - if (actor->timer_0BC != 0) { + if (this->timer_0BC != 0) { return 0; } - x = actor->fwork[0] - actor->obj.pos.x; - z = actor->fwork[2] - actor->obj.pos.z; + x = this->fwork[0] - this->obj.pos.x; + z = this->fwork[2] - this->obj.pos.z; if (fabsf(x) >= 3000.0f) { return 0; @@ -581,81 +581,81 @@ bool Bolse_8018D008(Actor* actor) { return 0; } - y = Math_RadToDeg(Math_Atan2F(x, z)) - actor->obj.rot.y; + y = Math_RadToDeg(Math_Atan2F(x, z)) - this->obj.rot.y; if ((y > 100.0f) && (y < 259.0f)) { return false; } - actor->timer_0BC = (s32) RAND_FLOAT(20.0f) + 10; + this->timer_0BC = (s32) RAND_FLOAT(20.0f) + 10; return true; } -void Bolse_8018D124(Actor* actor) { +void Bolse_8018D124(BoLaserCannon* this) { Vec3f src; Vec3f dest; - Matrix_RotateY(gCalcMatrix, (actor->rot_0F4.y + actor->obj.rot.y) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -actor->rot_0F4.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, (this->rot_0F4.y + this->obj.rot.y) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -this->rot_0F4.x * M_DTOR, MTXF_APPLY); src.y = 0.0f; src.x = 0.0f; src.z = gEnemyShotSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - func_effect_8007F04C(OBJ_EFFECT_ENEMY_LASER_1, actor->obj.pos.x + dest.x, actor->obj.pos.y + 180.0f + dest.y, - actor->obj.pos.z + dest.z, -actor->rot_0F4.x, actor->rot_0F4.y + actor->obj.rot.y, 0.0f, 0.0f, + func_effect_8007F04C(OBJ_EFFECT_ENEMY_LASER_1, this->obj.pos.x + dest.x, this->obj.pos.y + 180.0f + dest.y, + this->obj.pos.z + dest.z, -this->rot_0F4.x, this->rot_0F4.y + this->obj.rot.y, 0.0f, 0.0f, 0.0f, 0.0f, dest.x, dest.y, dest.z, 1.0f); } -bool Bolse_8018D278(Actor* actor) { +bool Bolse_8018D278(BoLaserCannon* this) { s32 i; - if (actor->dmgType == DMG_NONE) { + if (this->dmgType == DMG_NONE) { return false; } - actor->dmgType = DMG_NONE; - actor->obj.pos.y += 150.0f; + this->dmgType = DMG_NONE; + this->obj.pos.y += 150.0f; - func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, 8.0f, 15); + Effect386_Spawn1(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 8.0f, 15); for (i = 0; i < 3; i++) { if (Rand_ZeroOne() >= 0.5f) { - Play_SpawnDebris(4, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z); + Play_SpawnDebris(4, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z); } } - Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); - actor->itemDrop = DROP_SILVER_RING; + this->itemDrop = DROP_SILVER_RING; - Actor_Despawn(actor); - Object_Kill(&actor->obj, actor->sfxSource); + Actor_Despawn(this); + Object_Kill(&this->obj, this->sfxSource); - actor->info.bonus = 0; - actor->lockOnTimers[TEAM_ID_FOX] = 0; - actor->info.targetOffset = 0.0f; + this->info.bonus = 0; + this->lockOnTimers[TEAM_ID_FOX] = 0; + this->info.targetOffset = 0.0f; return true; } -void Bolse_8018D394(Actor* actor) { - Bolse_8018CC60(actor); +void Bolse_BoLaserCannon_Update(BoLaserCannon* this) { + Bolse_8018CC60(this); if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_STANDBY) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) { - Bolse_8018CCE8(actor); - Bolse_8018CE5C(actor); - if (Bolse_8018D008(actor)) { - Bolse_8018D124(actor); + Bolse_8018CCE8(this); + Bolse_8018CE5C(this); + if (Bolse_8018D008(this)) { + Bolse_8018D124(this); } } - Bolse_8018D278(actor); - actor->iwork[0] = 0; + Bolse_8018D278(this); + this->iwork[0] = 0; } -bool Bolse_8018D414(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* this) { - Actor* actor = (Actor*) this; +bool Bolse_BoLaserCannon_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { + BoLaserCannon* actor = (BoLaserCannon*) thisx; if (limbIndex == 2) { rot->x -= actor->rot_0F4.x; @@ -664,14 +664,15 @@ bool Bolse_8018D414(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th return false; } -void Bolse_8018D454(Actor* actor) { +void Bolse_BoLaserCannon_Draw(BoLaserCannon* this) { Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, MTXF_APPLY); - Animation_GetFrameData(&D_BO_600F2E0, 0, actor->vwork); - Animation_DrawSkeleton(1, D_BO_600F36C, actor->vwork, Bolse_8018D414, NULL, actor, &gIdentityMatrix); - actor->iwork[0] = 1; + Animation_GetFrameData(&aBoLaserCannonAnim, 0, this->vwork); + Animation_DrawSkeleton(1, aBoLaserCannonSkel, this->vwork, Bolse_BoLaserCannon_OverrideLimbDraw, NULL, this, + &gIdentityMatrix); + this->iwork[0] = 1; } -s32 Bolse_8018D4F0(Actor* actor) { +s32 Bolse_8018D4F0(BoShieldReactor* this) { s32 i; for (i = 0; i < 6; i++) { @@ -684,81 +685,80 @@ s32 Bolse_8018D4F0(Actor* actor) { return 0; } - D_i4_801A03E0[i].unk_00 = actor->obj.pos.x; - D_i4_801A03E0[i].unk_04 = actor->obj.pos.y + 730.0f; - D_i4_801A03E0[i].unk_08 = actor->obj.pos.z; - D_i4_801A03E0[i].unk_0C = actor->fwork[10]; - D_i4_801A03E0[i].unk_10 = actor->fwork[11]; - D_i4_801A03E0[i].unk_14 = actor->fwork[12]; + D_i4_801A03E0[i].unk_00 = this->obj.pos.x; + D_i4_801A03E0[i].unk_04 = this->obj.pos.y + 730.0f; + D_i4_801A03E0[i].unk_08 = this->obj.pos.z; + D_i4_801A03E0[i].unk_0C = this->fwork[10]; + D_i4_801A03E0[i].unk_10 = this->fwork[11]; + D_i4_801A03E0[i].unk_14 = this->fwork[12]; D_i4_801A03E0[i].unk_18 = 1; return 0; } -bool Bolse_8018D584(Actor* actor) { +bool Bolse_8018D584(BoShieldReactor* this) { s32 i; - if (actor->dmgType == DMG_NONE) { + if (this->dmgType == DMG_NONE) { return false; } - if ((actor->dmgPart < 2) && (actor->state == 0)) { - actor->timer_0C6 = 20; - actor->dmgType = DMG_NONE; - AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_M, actor->sfxSource, 0); - actor->health += actor->damage; + if ((this->dmgPart < 2) && (this->state == 0)) { + this->timer_0C6 = 20; + this->dmgType = DMG_NONE; + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_M, this->sfxSource, 0); + this->health += this->damage; - if (actor->health < 100) { + if (this->health < 100) { return false; } - BonusText_Display(actor->obj.pos.x, actor->obj.pos.y + 730.0f, actor->obj.pos.z, 3); + BonusText_Display(this->obj.pos.x, this->obj.pos.y + 730.0f, this->obj.pos.z, 3); gHitCount += 4; D_ctx_80177850 = 15; D_BO_801A03DC--; if (1) {} - actor->state = 1; + this->state = 1; - func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y + 730.0f, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, 10.0f, - 15); + Effect386_Spawn1(this->obj.pos.x, this->obj.pos.y + 730.0f, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 10.0f, 15); for (i = 0; i < 10; i++) { if (!(Rand_ZeroOne() >= 0.5f)) { - Play_SpawnDebris(4, actor->obj.pos.x, actor->obj.pos.y + 730.0f, actor->obj.pos.z); + Play_SpawnDebris(4, this->obj.pos.x, this->obj.pos.y + 730.0f, this->obj.pos.z); } } - func_effect_8007B344(actor->obj.pos.x, actor->obj.pos.y + 730.0f, actor->obj.pos.z, 10.0f, 5); - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_BO_6011BA4); - Audio_KillSfxBySourceAndId(actor->sfxSource, NA_SE_OB_SPARK_BEAM); - AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, actor->sfxSource, 0); + Effect_Effect384_Spawn(this->obj.pos.x, this->obj.pos.y + 730.0f, this->obj.pos.z, 10.0f, 5); + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_BO_6011BA4); + Audio_KillSfxBySourceAndId(this->sfxSource, NA_SE_OB_SPARK_BEAM); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, this->sfxSource, 0); } else { - Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_REFLECT); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_REFLECT); } return true; } -void Bolse_8018D7F0(Actor* actor) { +void Bolse_BoShieldReactor_Update(BoShieldReactor* this) { if (gAllRangeCheckpoint != 0) { - actor->state = 1; + this->state = 1; } - Bolse_8018CC60(actor); + Bolse_8018CC60(this); - if (actor->state == 0) { - Bolse_8018D4F0(actor); - Bolse_8018D584(actor); + if (this->state == 0) { + Bolse_8018D4F0(this); + Bolse_8018D584(this); } else { - actor->lockOnTimers[TEAM_ID_FOX] = 0; - actor->info.bonus = 0; - actor->info.targetOffset = 0.0f; + this->lockOnTimers[TEAM_ID_FOX] = 0; + this->info.bonus = 0; + this->info.targetOffset = 0.0f; } - actor->scale = -1.0f; + this->scale = -1.0f; } -bool Bolse_8018D874(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* this) { - Actor* actor = (Actor*) this; +bool Bolse_BoShieldReactor_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { + BoShieldReactor* actor = (BoShieldReactor*) thisx; RCP_SetupDL(&gMasterDisp, SETUPDL_29); if (((limbIndex == 1) || (limbIndex == 2)) && ((actor->timer_0C6 % 2) != 0)) { @@ -772,9 +772,10 @@ bool Bolse_8018D874(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th return false; } -void Bolse_8018D960(Actor* actor) { - Animation_GetFrameData(&D_BO_600F3D8, 0, actor->vwork); - Animation_DrawSkeleton(3, D_BO_600F4A4, actor->vwork, Bolse_8018D874, NULL, actor, gCalcMatrix); +void Bolse_BoShieldReactor_Draw(BoShieldReactor* this) { + Animation_GetFrameData(&aBoShieldReactorAnim, 0, this->vwork); + Animation_DrawSkeleton(3, aBoShieldReactorSkel, this->vwork, Bolse_BoShieldReactor_OverrideLimbDraw, NULL, this, + gCalcMatrix); } s32 Bolse_8018D9CC(void) { @@ -803,7 +804,7 @@ s32 Bolse_8018D9CC(void) { return 0; } -s32 Bolse_8018DE8C(Boss* boss) { +s32 Bolse_8018DE8C(BoBase* this) { Vec3s D_i4_8019EEF8[26] = { { -81, 220, -4 }, { 635, 66, -362 }, { 677, 231, 1063 }, { 370, 340, 650 }, { -191, 478, -616 }, { 30, 210, -593 }, { 1321, 83, -2 }, { 458, 340, 518 }, { -312, 478, -561 }, { 646, 66, -362 }, @@ -815,19 +816,20 @@ s32 Bolse_8018DE8C(Boss* boss) { s32 index = RAND_FLOAT(26); if (!(gGameFrameCount % 2)) { // has to be ! instead of == 0 - func_effect_8007C120(D_i4_8019EEF8[index].x + boss->obj.pos.x, D_i4_8019EEF8[index].y + boss->obj.pos.y - 10.0f, - D_i4_8019EEF8[index].z + boss->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.2f, 20); + Effect_Effect390_Spawn(D_i4_8019EEF8[index].x + this->obj.pos.x, + D_i4_8019EEF8[index].y + this->obj.pos.y - 10.0f, + D_i4_8019EEF8[index].z + this->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.2f, 20); } - if ((gGameFrameCount % 5) == 0) { - func_effect_8007BFFC(D_i4_8019EEF8[index].x + boss->obj.pos.x, D_i4_8019EEF8[index].y + boss->obj.pos.y - 10.0f, - D_i4_8019EEF8[index].z + boss->obj.pos.z, 0.0f, 0.0f, 0.0f, 8.0f, 10); + if (!(gGameFrameCount % 5)) { + Effect386_Spawn1(D_i4_8019EEF8[index].x + this->obj.pos.x, D_i4_8019EEF8[index].y + this->obj.pos.y - 10.0f, + D_i4_8019EEF8[index].z + this->obj.pos.z, 0.0f, 0.0f, 0.0f, 8.0f, 10); } return 0; } -s32 Bolse_8018E05C(Boss* boss, s32 index) { +s32 Bolse_8018E05C(BoBase* this, s32 index) { s32 i; f32 temp_fs0; f32 temp_fs1; @@ -848,16 +850,16 @@ s32 Bolse_8018E05C(Boss* boss, s32 index) { Matrix_Push(&gGfxMatrix); Matrix_RotateX(gCalcMatrix, -temp_fs1 * M_DTOR, MTXF_NEW); - var_fs0 += boss->obj.rot.y; + var_fs0 += this->obj.rot.y; if (var_fs0 >= 360.0f) { var_fs0 -= 360.0f; } Matrix_RotateY(gCalcMatrix, (-var_fs0) * M_DTOR, MTXF_APPLY); - src.x = gPlayer[0].pos.x - (boss->obj.pos.x + temp_fs2); - src.y = gPlayer[0].pos.y - (boss->obj.pos.y + 580.0f); - src.z = gPlayer[0].trueZpos - (boss->obj.pos.z + temp_fs3); + src.x = gPlayer[0].pos.x - (this->obj.pos.x + temp_fs2); + src.y = gPlayer[0].pos.y - (this->obj.pos.y + 580.0f); + src.z = gPlayer[0].trueZpos - (this->obj.pos.z + temp_fs3); Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); @@ -872,15 +874,15 @@ s32 Bolse_8018E05C(Boss* boss, s32 index) { } for (i = 0; i < 5; i++) { - func_effect_8007C484(gPlayer[0].pos.x + RAND_FLOAT_CENTERED(30.0f), - gPlayer[0].pos.y + RAND_FLOAT(10.0f), - gPlayer[0].trueZpos + RAND_FLOAT_CENTERED(30.0f), gPlayer[0].vel.x, - gPlayer[0].vel.y + gPlayer[0].knockback.y, gPlayer[0].vel.z, - RAND_FLOAT(0.1f) + 0.1f, gPlayer[0].num + 11); + Effect_Effect389_Spawn(gPlayer[0].pos.x + RAND_FLOAT_CENTERED(30.0f), + gPlayer[0].pos.y + RAND_FLOAT(10.0f), + gPlayer[0].trueZpos + RAND_FLOAT_CENTERED(30.0f), gPlayer[0].vel.x, + gPlayer[0].vel.y + gPlayer[0].knockback.y, gPlayer[0].vel.z, + RAND_FLOAT(0.1f) + 0.1f, gPlayer[0].num + 11); } - func_effect_8007BFFC(gPlayer[0].pos.x + RAND_FLOAT_CENTERED(10.0f), gPlayer[0].pos.y + RAND_FLOAT(10.0f), - gPlayer[0].trueZpos + RAND_FLOAT_CENTERED(10.0f), 0.0f, 15.0f, 0.0f, 2.0f, 5); + Effect386_Spawn1(gPlayer[0].pos.x + RAND_FLOAT_CENTERED(10.0f), gPlayer[0].pos.y + RAND_FLOAT(10.0f), + gPlayer[0].trueZpos + RAND_FLOAT_CENTERED(10.0f), 0.0f, 15.0f, 0.0f, 2.0f, 5); } ret = true; } @@ -890,7 +892,7 @@ s32 Bolse_8018E05C(Boss* boss, s32 index) { return ret; } -s32 Bolse_8018E3FC(Boss* boss) { +s32 Bolse_8018E3FC(BoBase* this) { s32 i; s32 j; f32 D_i4_8019EF94[6] = { 31.0f, 91.0f, 151.0f, 211.0f, 271.0f, 331.0f }; @@ -906,8 +908,8 @@ s32 Bolse_8018E3FC(Boss* boss) { if (D_i4_801A03E0[i].unk_18 == 0) { D_i4_801A0488[i].unk_18 = 0; } else { - x = D_i4_801A03E0[i].unk_0C - boss->obj.pos.x; - var_fs0 = Math_RadToDeg(Math_Atan2F(x, D_i4_801A03E0[i].unk_14 - boss->obj.pos.z)); + x = D_i4_801A03E0[i].unk_0C - this->obj.pos.x; + var_fs0 = Math_RadToDeg(Math_Atan2F(x, D_i4_801A03E0[i].unk_14 - this->obj.pos.z)); if (var_fs0 >= 360.0f) { var_fs0 = var_fs0 - 360.0f; } @@ -923,9 +925,9 @@ s32 Bolse_8018E3FC(Boss* boss) { } if (j < 6) { - x = D_i4_801A03E0[i].unk_0C - (boss->obj.pos.x + D_i4_8019EFAC[j]); - y = D_i4_801A03E0[i].unk_04 - (boss->obj.pos.y + 580.0f); - z = D_i4_801A03E0[i].unk_14 - (boss->obj.pos.z + D_i4_8019EFC4[j]); + x = D_i4_801A03E0[i].unk_0C - (this->obj.pos.x + D_i4_8019EFAC[j]); + y = D_i4_801A03E0[i].unk_04 - (this->obj.pos.y + 580.0f); + z = D_i4_801A03E0[i].unk_14 - (this->obj.pos.z + D_i4_8019EFC4[j]); var_fs0 = Math_RadToDeg(Math_Atan2F(x, z)); @@ -947,7 +949,7 @@ s32 Bolse_8018E3FC(Boss* boss) { D_i4_801A0488[i].unk_18 = 1; D_i4_801A0488[i].unk_08 = (z / 400.0f); - Bolse_8018E05C(boss, i); + Bolse_8018E05C(this, i); D_i4_801A03E0[i].unk_18 = 0; } @@ -957,44 +959,44 @@ s32 Bolse_8018E3FC(Boss* boss) { return 0; } -void Bolse_8018E710(Boss* boss) { - if (boss->state == 1) { - Bolse_8018DE8C(boss); - } else if (boss->swork[0] == 0) { - boss->fwork[2] += 8.0f; - if (boss->fwork[2] >= 100.0f) { - boss->swork[0] = 1; - boss->fwork[2] = 100.0f; +void Bolse_BoBase_Update(BoBase* this) { + if (this->state == 1) { + Bolse_8018DE8C(this); + } else if (this->swork[0] == 0) { + this->fwork[2] += 8.0f; + if (this->fwork[2] >= 100.0f) { + this->swork[0] = 1; + this->fwork[2] = 100.0f; } } else { - boss->fwork[2] -= 8.0f; - if (boss->fwork[2] <= 0.0f) { - boss->swork[0] = 0; - boss->fwork[2] = 0.0f; + this->fwork[2] -= 8.0f; + if (this->fwork[2] <= 0.0f) { + this->swork[0] = 0; + this->fwork[2] = 0.0f; } } Bolse_8018D9CC(); - Bolse_8018E3FC(boss); + Bolse_8018E3FC(this); - if (boss->fwork[1] != 0.0f) { - boss->obj.rot.y += boss->fwork[1]; - if (boss->obj.rot.y >= 360.0f) { - boss->obj.rot.y -= 360.0f; + if (this->fwork[1] != 0.0f) { + this->obj.rot.y += this->fwork[1]; + if (this->obj.rot.y >= 360.0f) { + this->obj.rot.y -= 360.0f; } } - boss->fwork[0] += 2.0f; + this->fwork[0] += 2.0f; Matrix_RotateY(&D_BO_8019EE80, gBosses[0].obj.rot.y * M_DTOR, MTXF_NEW); } -void Bolse_8018E870(Boss* boss) { +void Bolse_BoBase_Draw(BoBase* this) { s32 i; s32 alpha; - Matrix_Scale(gGfxMatrix, boss->scale, boss->scale, boss->scale, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->scale, this->scale, this->scale, MTXF_APPLY); - if (boss->vwork[30].y >= 0.0f) { + if (this->vwork[30].y >= 0.0f) { gSPDisplayList(gMasterDisp++, D_BO_6002020); } @@ -1032,25 +1034,25 @@ s32 D_i4_8019F000[] = { 0, 0, 0 }; f32 D_i4_8019F00C[] = { 0.0f, 80.0f, 150.0f }; f32 D_i4_8019F018[] = { 3.0f, -4.0f, 5.0f, 700.0f, 300.0f, 1000.0f }; -void Bolse_8018EAEC(Actor* actor, s32 index) { - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.pos.x = D_i4_8019EFDC[index] + gPlayer[0].pos.x; - actor->obj.pos.y = D_i4_8019EFE8[index] + gPlayer[0].pos.y; - actor->obj.pos.z = D_i4_8019EFF4[index] + gPlayer[0].pos.z; - actor->animFrame = D_i4_8019F000[index]; - actor->obj.rot.y = 180.0f; - actor->vel.z = -gPlayer[0].baseSpeed; - actor->rot_0F4.z = D_i4_8019F00C[index]; - actor->rot_0F4.y = D_i4_8019F018[index]; - Object_SetInfo(&actor->info, actor->obj.id); - actor->iwork[11] = 1; - AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); +void Bolse_8018EAEC(ActorCutscene* this, s32 index) { + Actor_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_ACTOR_CUTSCENE; + this->obj.pos.x = D_i4_8019EFDC[index] + gPlayer[0].pos.x; + this->obj.pos.y = D_i4_8019EFE8[index] + gPlayer[0].pos.y; + this->obj.pos.z = D_i4_8019EFF4[index] + gPlayer[0].pos.z; + this->animFrame = D_i4_8019F000[index]; + this->obj.rot.y = 180.0f; + this->vel.z = -gPlayer[0].baseSpeed; + this->rot_0F4.z = D_i4_8019F00C[index]; + this->rot_0F4.y = D_i4_8019F018[index]; + Object_SetInfo(&this->info, this->obj.id); + this->iwork[11] = 1; + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); } void Bolse_8018EC1C(void) { - Actor* actor = &gActors[50]; + ActorCutscene* actor = &gActors[50]; Actor_Initialize(actor); actor->obj.status = OBJ_INIT; @@ -1064,8 +1066,8 @@ void Bolse_8018EC1C(void) { actor->info.bonus = 1; } -void Bolse_8018ECB4(void) { - Boss* boss = &gBosses[1]; +void Bolse_BoBaseShield_Setup(void) { + BoBaseShield* boss = &gBosses[1]; Boss_Initialize(boss); boss->obj.status = OBJ_INIT; @@ -1074,12 +1076,12 @@ void Bolse_8018ECB4(void) { boss->obj.pos.z = -9000.0f; boss->obj.rot.x = 20.0f; boss->scale = 0.15f; - boss->obj.id = OBJ_BOSS_310; + boss->obj.id = OBJ_BOSS_BO_BASE_SHIELD; Object_SetInfo(&boss->info, boss->obj.id); } void Bolse_8018ED44(void) { - Actor* actor = &gActors[0]; + ActorCutscene* actor = &gActors[0]; s32 i; for (i = 0; i < ARRAY_COUNT(gActors); actor++, i++) { @@ -1101,10 +1103,10 @@ void Bolse_8018ED44(void) { } void Bolse_8018EE4C(f32 x, f32 y) { - Actor* actor = &gActors[0]; + ActorCutscene* actor; s32 i; - for (i = 0; i < ARRAY_COUNT(gActors); actor++, i++) { + for (actor = &gActors[0], i = 0; i < ARRAY_COUNT(gActors); actor++, i++) { if (actor->obj.status == OBJ_FREE) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; @@ -1141,9 +1143,9 @@ f32 D_i4_8019F090[] = { 70.0f, -80.0f, -65.0f }; void Bolse_LevelStart(Player* player) { s32 i; f32 sp60 = 0.0f; - Vec3f sp54; - Vec3f sp48; - Actor* actor; + Vec3f src; + Vec3f dest; + ActorCutscene* actor; s32 pad[4]; switch (player->csState) { @@ -1177,7 +1179,7 @@ void Bolse_LevelStart(Player* player) { } Bolse_8018EC1C(); - Bolse_8018ECB4(); + Bolse_BoBaseShield_Setup(); D_ctx_80177A48[1] = -13000.0f; D_ctx_80177A48[2] = -13000.0f; @@ -1249,7 +1251,7 @@ void Bolse_LevelStart(Player* player) { case 127: Play_ClearObjectData(); - Bolse_80191ED8(); + Bolse_LoadLevelObjects(); ActorAllRange_SpawnTeam(); player->csState = 2; @@ -1323,15 +1325,15 @@ void Bolse_LevelStart(Player* player) { Matrix_RotateY(gCalcMatrix, (player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -(player->rot.x * M_DTOR), MTXF_APPLY); - sp54.x = 0.0f; - sp54.y = 0; - sp54.z = player->baseSpeed; + src.x = 0.0f; + src.y = 0; + src.z = player->baseSpeed; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48); + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - player->vel.x = sp48.x + sp60; - player->vel.z = sp48.z; - player->vel.y = sp48.y; + player->vel.x = dest.x + sp60; + player->vel.z = dest.z; + player->vel.y = dest.y; player->pos.x += player->vel.x; player->pos.y += player->vel.y; @@ -1348,19 +1350,19 @@ void Bolse_LevelStart(Player* player) { Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0); } -void Bolse_8018F83C(Actor* actor, s32 arg1) { - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.pos.x = D_i4_8019F06C[arg1] + gPlayer[0].pos.x; - actor->obj.pos.y = D_i4_8019F078[arg1] + gPlayer[0].pos.y; - actor->obj.pos.z = D_i4_8019F084[arg1] + gPlayer[0].pos.z; - actor->obj.rot.y = 180.0f; - actor->obj.rot.z = D_i4_8019F090[arg1]; - actor->vel.z = -gPlayer[0].baseSpeed; - Object_SetInfo(&actor->info, actor->obj.id); - actor->iwork[11] = 1; - AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); +void Bolse_8018F83C(Actor* this, s32 index) { + Actor_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_ACTOR_CUTSCENE; + this->obj.pos.x = D_i4_8019F06C[index] + gPlayer[0].pos.x; + this->obj.pos.y = D_i4_8019F078[index] + gPlayer[0].pos.y; + this->obj.pos.z = D_i4_8019F084[index] + gPlayer[0].pos.z; + this->obj.rot.y = 180.0f; + this->obj.rot.z = D_i4_8019F090[index]; + this->vel.z = -gPlayer[0].baseSpeed; + Object_SetInfo(&this->info, this->obj.id); + this->iwork[11] = 1; + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); } void Bolse_LevelComplete(Player* player) { @@ -1477,19 +1479,19 @@ void Bolse_LevelComplete(Player* player) { actor50->obj.pos.y -= 5; if (gCsFrameCount < 92) { - if (((gGameFrameCount % 2U) == 0)) { - func_effect_8007C484(actor50->obj.pos.x + RAND_FLOAT_CENTERED(1000.0f), actor50->obj.pos.y + 100.0f, - actor50->obj.pos.z + RAND_FLOAT_CENTERED(1000.0f), 0.0f, 0.0f, 0.0f, - RAND_FLOAT(0.4f) + 0.4f, 0.0f); + if ((gGameFrameCount % 2U) == 0) { + Effect_Effect389_Spawn(actor50->obj.pos.x + RAND_FLOAT_CENTERED(1000.0f), + actor50->obj.pos.y + 100.0f, + actor50->obj.pos.z + RAND_FLOAT_CENTERED(1000.0f), 0.0f, 0.0f, 0.0f, + RAND_FLOAT(0.4f) + 0.4f, 0.0f); } - if (((gGameFrameCount % 2U) == 0)) { + if ((gGameFrameCount % 2U) == 0) { //! FAKE: do { } while (0); - func_effect_8007BFFC(RAND_FLOAT_CENTERED(1000.0f) + actor50->obj.pos.x, actor50->obj.pos.y + 100.0f, - RAND_FLOAT_CENTERED(1000.0f) + actor50->obj.pos.z, 0.0f, 0.0f, 0.0f, 10.0f, - 5.0f); + Effect386_Spawn1(RAND_FLOAT_CENTERED(1000.0f) + actor50->obj.pos.x, actor50->obj.pos.y + 100.0f, + RAND_FLOAT_CENTERED(1000.0f) + actor50->obj.pos.z, 0.0f, 0.0f, 0.0f, 10.0f, 5.0f); } } @@ -1514,13 +1516,13 @@ void Bolse_LevelComplete(Player* player) { Object_Kill(&gEffects[i].obj, gEffects[i].sfxSource); } - func_effect_8007B344(actor50->obj.pos.x, actor50->obj.pos.y, actor50->obj.pos.z, 400.0f, 4); + Effect_Effect384_Spawn(actor50->obj.pos.x, actor50->obj.pos.y, actor50->obj.pos.z, 400.0f, 4); break; case 100: case 105: case 110: - func_effect_8007B344(actor50->obj.pos.x, actor50->obj.pos.y, actor50->obj.pos.z, 250.0f, 6); + Effect_Effect384_Spawn(actor50->obj.pos.x, actor50->obj.pos.y, actor50->obj.pos.z, 250.0f, 6); break; case 130: @@ -1531,9 +1533,9 @@ void Bolse_LevelComplete(Player* player) { }; for (i = 0; i < 100; i++) { - func_effect_800795AC(RAND_FLOAT_CENTERED(300.0f) + actor50->obj.pos.x, - actor50->obj.pos.y - RAND_FLOAT(2000.0f), - RAND_FLOAT_CENTERED(300.0f) + actor50->obj.pos.z, 5.11f); + Effect_Effect357_Spawn95(RAND_FLOAT_CENTERED(300.0f) + actor50->obj.pos.x, + actor50->obj.pos.y - RAND_FLOAT(2000.0f), + RAND_FLOAT_CENTERED(300.0f) + actor50->obj.pos.z, 5.11f); }; actor50->unk_046 = 1; break; @@ -1673,13 +1675,13 @@ void Bolse_LevelComplete(Player* player) { if (actor50->unk_046 != 0) { Math_SmoothStepToF(&actor50->fwork[20], 3.0f, 0.03f, 0.01f, 0); - if (((gGameFrameCount % 2U) == 0)) { - func_effect_8007C484( + if ((gGameFrameCount % 2U) == 0) { + Effect_Effect389_Spawn( RAND_FLOAT_CENTERED(5000.0f) + actor50->obj.pos.x, RAND_FLOAT_CENTERED(5000.0f) + actor50->obj.pos.y, RAND_FLOAT_CENTERED(5000.0f) + actor50->obj.pos.z, 0.0f, 0.0f, 0.0f, RAND_FLOAT(0.8f) + 0.8f, 0); } - if (((gGameFrameCount % 2U) == 0)) { - func_effect_8007BFFC( + if ((gGameFrameCount % 2U) == 0) { + Effect386_Spawn1( RAND_FLOAT_CENTERED(5000.0f) + actor50->obj.pos.x, RAND_FLOAT_CENTERED(5000.0f) + actor50->obj.pos.y, RAND_FLOAT_CENTERED(5000.0f) + actor50->obj.pos.z, 0.0f, 0.0f, 0.0f, RAND_FLOAT(10.0f) + 20.0f, 5); } @@ -1743,112 +1745,112 @@ void Bolse_LevelComplete(Player* player) { player->rockAngle = SIN_DEG(player->rockPhase); } -void Bolse_80190D98(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot) { +void Bolse_Effect397_Setup1(Effect397* this, f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot) { Vec3f src; Vec3f dest; - Effect_Initialize(effect); - effect->obj.status = OBJ_ACTIVE; - effect->obj.id = OBJ_EFFECT_397; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; - effect->obj.rot.x = xRot; - effect->obj.rot.y = yRot; - effect->scale2 = 1.0f; + Effect_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_EFFECT_397; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + this->obj.rot.x = xRot; + this->obj.rot.y = yRot; + this->scale2 = 1.0f; Matrix_RotateY(gCalcMatrix, M_DTOR * yRot, MTXF_NEW); Matrix_RotateX(gCalcMatrix, M_DTOR * xRot, MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; src.z = 200.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - effect->vel.x = dest.x; - effect->vel.y = dest.y; - effect->vel.z = dest.z; - effect->timer_50 = 60; - AUDIO_PLAY_SFX(NA_SE_EN_LONG_BEAM, effect->sfxSource, 4); - Object_SetInfo(&effect->info, effect->obj.id); + this->vel.x = dest.x; + this->vel.y = dest.y; + this->vel.z = dest.z; + this->timer_50 = 60; + AUDIO_PLAY_SFX(NA_SE_EN_LONG_BEAM, this->sfxSource, 4); + Object_SetInfo(&this->info, this->obj.id); } -void Bolse_80190EE4(f32 x, f32 y, f32 z, f32 arg3, f32 arg4) { +void Bolse_Effect397_Spawn1(f32 x, f32 y, f32 z, f32 arg3, f32 arg4) { s32 i; for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { - Bolse_80190D98(&gEffects[i], x, y, z, arg3, arg4); + Bolse_Effect397_Setup1(&gEffects[i], x, y, z, arg3, arg4); break; } } } -void Bolse_80190F58(Effect* effect, f32 x, f32 y, f32 z, f32 scale) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_397; - effect->obj.pos.x = x; - effect->obj.pos.y = y; - effect->obj.pos.z = z; - effect->state = 1; - effect->scale1 = scale; - effect->unk_44 = 255; - Object_SetInfo(&effect->info, effect->obj.id); - effect->info.unk_14 = 1; +void Bolse_Effect397_Setup2(Effect397* this, f32 x, f32 y, f32 z, f32 scale) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_397; + this->obj.pos.x = x; + this->obj.pos.y = y; + this->obj.pos.z = z; + this->state = 1; + this->scale1 = scale; + this->unk_44 = 255; + Object_SetInfo(&this->info, this->obj.id); + this->info.unk_14 = 1; } -void Bolse_80190FE8(f32 x, f32 y, f32 z, f32 scale) { +void Bolse_Effect397_Spawn2(f32 x, f32 y, f32 z, f32 scale) { s32 i; for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { - Bolse_80190F58(&gEffects[i], x, y, z, scale); + Bolse_Effect397_Setup2(&gEffects[i], x, y, z, scale); break; } } } -void Bolse_Effect397_Update(Effect* effect) { - switch (effect->state) { +void Bolse_Effect397_Update(Effect397* this) { + switch (this->state) { case 0: if (gPlayer[0].barrelRollAlpha == 0) { - func_effect_8007A774(gPlayer, effect, 150.0f); + func_effect_8007A774(gPlayer, this, 150.0f); } - Math_SmoothStepToF(&effect->scale2, 30.0f, 1.0f, 10.0f, 0.0f); + Math_SmoothStepToF(&this->scale2, 30.0f, 1.0f, 10.0f, 0.0f); - if (effect->timer_50 == 0) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->timer_50 == 0) { + Object_Kill(&this->obj, this->sfxSource); } - if (effect->obj.pos.y < gGroundHeight + 50.0f) { - Bolse_80190FE8(effect->obj.pos.x, gGroundHeight + 50.0f, effect->obj.pos.z, 3.0f); - Object_Kill(&effect->obj, effect->sfxSource); + if (this->obj.pos.y < gGroundHeight + 50.0f) { + Bolse_Effect397_Spawn2(this->obj.pos.x, gGroundHeight + 50.0f, this->obj.pos.z, 3.0f); + Object_Kill(&this->obj, this->sfxSource); } break; case 1: - Math_SmoothStepToF(&effect->scale2, effect->scale1, 0.1f, 20.0f, 0.0f); - effect->unk_44 -= 20; - if (effect->unk_44 < 0) { - Object_Kill(&effect->obj, effect->sfxSource); + Math_SmoothStepToF(&this->scale2, this->scale1, 0.1f, 20.0f, 0.0f); + this->unk_44 -= 20; + if (this->unk_44 < 0) { + Object_Kill(&this->obj, this->sfxSource); } break; } } -void Bolse_Effect397_Draw(Effect* effect) { - switch (effect->state) { +void Bolse_Effect397_Draw(Effect397* this) { + switch (this->state) { case 0: gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 192); - Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, effect->scale2, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, this->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_BO_6006910); break; case 1: RCP_SetupDL(&gMasterDisp, SETUPDL_67); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_44); - gDPSetEnvColor(gMasterDisp++, 0, 128, 255, effect->unk_44); - Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_44); + gDPSetEnvColor(gMasterDisp++, 0, 128, 255, this->unk_44); + Matrix_Scale(gGfxMatrix, this->scale2, this->scale2, this->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); RCP_SetupDL(&gMasterDisp, SETUPDL_64); @@ -1858,7 +1860,7 @@ void Bolse_Effect397_Draw(Effect* effect) { f32 D_i4_8019F09C[12] = { 0.0f, 0.0f, 60.0f, 60.0f, 120.0f, 120.0f, 180.0f, 180.0f, 240.0f, 240.0f, 300.0f, 300.0f }; -void Bolse_Boss311_Update(Boss* boss) { +void Bolse_BoBaseCore_Update(BoBaseCore* this) { s32 i; Vec3f src; Vec3f dest; @@ -1869,112 +1871,113 @@ void Bolse_Boss311_Update(Boss* boss) { Math_SmoothStepToF(&D_i4_8019EEC0, 255.0f, 1.0f, 30.0f, 0); } - switch (boss->state) { + switch (this->state) { case 0: if (gAllRangeCheckpoint == 2) { - boss->state = 1; + this->state = 1; } - boss->dmgType = DMG_NONE; + this->dmgType = DMG_NONE; gBossFrameCount = 0; break; case 1: if (((gHitCount - gActors[0].iwork[1]) >= 5) || (D_i4_801A0530 > 8000)) { - boss->state = 2; + this->state = 2; Radio_PlayMessage(gMsg_ID_11150, RCID_PEPPY); - boss->timer_050 = 1000; - AUDIO_PLAY_SFX(NA_SE_BO_CORE_APPEAR, boss->sfxSource, 0); + this->timer_050 = 1000; + AUDIO_PLAY_SFX(NA_SE_BO_CORE_APPEAR, this->sfxSource, 0); } break; case 2: gBossFrameCount++; - Math_SmoothStepToF(&boss->obj.pos.y, 0.0f, 0.1f, 10.0f, 0); - boss->obj.rot.y += 1.0f; - if (boss->timer_050 == 1) { - boss->timer_050 = 2000; + Math_SmoothStepToF(&this->obj.pos.y, 0.0f, 0.1f, 10.0f, 0); + this->obj.rot.y += 1.0f; + if (this->timer_050 == 1) { + this->timer_050 = 2000; Radio_PlayMessage(gMsg_ID_11160, RCID_PEPPY); - Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_BO_CORE_APPEAR); + Audio_KillSfxBySourceAndId(this->sfxSource, NA_SE_BO_CORE_APPEAR); } break; case 10: - Math_SmoothStepToF(&boss->obj.pos.y, -500.0f, 0.1f, 5.0f, 0); - boss->obj.rot.y += 1.0f; + Math_SmoothStepToF(&this->obj.pos.y, -500.0f, 0.1f, 5.0f, 0); + this->obj.rot.y += 1.0f; break; } for (i = 0; i < 8; i++) { - if (boss->swork[12 + i] != 0) { - boss->swork[12 + i]--; - if (boss->swork[12 + i] == 1000) { - boss->swork[12 + i] = 0; + if (this->swork[12 + i] != 0) { + this->swork[12 + i]--; + if (this->swork[12 + i] == 1000) { + this->swork[12 + i] = 0; } } } - if (boss->state == 2) { - if (boss->dmgType != DMG_NONE) { - boss->dmgType = DMG_NONE; + if (this->state == 2) { + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; - if (boss->damage >= 16) { - boss->damage = 3; + if (this->damage >= 16) { + this->damage = 3; } - if (boss->dmgPart < 8) { - boss->swork[boss->dmgPart] -= boss->damage; - if (boss->swork[boss->dmgPart] <= 0) { - boss->swork[24 + boss->dmgPart] = 30; - AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, boss->sfxSource, 4); - boss->swork[36]--; - if (boss->swork[36] <= 0) { - boss->state = 10; + if (this->dmgPart < 8) { + this->swork[this->dmgPart] -= this->damage; + if (this->swork[this->dmgPart] <= 0) { + this->swork[24 + this->dmgPart] = 30; + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, this->sfxSource, 4); + this->swork[36]--; + if (this->swork[36] <= 0) { + this->state = 10; gBosses[0].state = 1; } - boss->obj.pos.y += 300.0f; - Boss_AwardBonus(boss); - boss->obj.pos.y -= 300.0f; + this->obj.pos.y += 300.0f; + Boss_AwardBonus(this); + this->obj.pos.y -= 300.0f; } else { - boss->swork[12 + boss->dmgPart] = 20; - AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, boss->sfxSource, 4); + this->swork[12 + this->dmgPart] = 20; + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, this->sfxSource, 4); } } } - Matrix_RotateY(gCalcMatrix, -boss->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, -this->obj.rot.y * M_DTOR, MTXF_NEW); for (i = 0; i < 8; i++) { - if (boss->swork[i + 24] != 0) { - boss->swork[i + 24]--; - if (((gGameFrameCount % 2) == 0)) { - func_effect_8007797C(boss->vwork[i].x, boss->vwork[i].y, boss->vwork[i].z, boss->vwork[i].x * 0.2f, - 0.0f, boss->vwork[i].z * 0.2f, 5.0f); + if (this->swork[i + 24] != 0) { + this->swork[i + 24]--; + if ((gGameFrameCount % 2) == 0) { + Effect_FireSmoke_Spawn2(this->vwork[i].x, this->vwork[i].y, this->vwork[i].z, + this->vwork[i].x * 0.2f, 0.0f, this->vwork[i].z * 0.2f, 5.0f); } } - if (boss->swork[i] <= 0) { - boss->info.hitbox[i * 6 + 4] = -200.0f; + if (this->swork[i] <= 0) { + this->info.hitbox[i * 6 + 4] = -200.0f; if (((gGameFrameCount + i) % 8) == 0) { - Bolse_80190EE4(boss->vwork[i].x, boss->vwork[i].y, boss->vwork[i].z, RAND_FLOAT_CENTERED(30.0f), - boss->obj.rot.y + D_i4_8019F09C[i] + RAND_FLOAT_CENTERED(30.0f)); - boss->swork[i + 12] = 1003; + Bolse_Effect397_Spawn1(this->vwork[i].x, this->vwork[i].y, this->vwork[i].z, + RAND_FLOAT_CENTERED(30.0f), + this->obj.rot.y + D_i4_8019F09C[i] + RAND_FLOAT_CENTERED(30.0f)); + this->swork[i + 12] = 1003; } } else { - src.x = boss->vwork[i].x - boss->obj.pos.x; - src.y = boss->vwork[i].y - boss->obj.pos.y; - src.z = boss->vwork[i].z - boss->obj.pos.z; + src.x = this->vwork[i].x - this->obj.pos.x; + src.y = this->vwork[i].y - this->obj.pos.y; + src.z = this->vwork[i].z - this->obj.pos.z; Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - boss->info.hitbox[i * 6 + 4] = 50.0f; - boss->info.hitbox[i * 6 + 5] = dest.x; - boss->info.hitbox[i * 6 + 3] = dest.y; - boss->info.hitbox[i * 6 + 1] = dest.z; + this->info.hitbox[i * 6 + 4] = 50.0f; + this->info.hitbox[i * 6 + 5] = dest.x; + this->info.hitbox[i * 6 + 3] = dest.y; + this->info.hitbox[i * 6 + 1] = dest.z; } } } } -bool Bolse_801918E4(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* this) { - Boss* boss = (Boss*) this; +bool Bolse_BoBaseCore_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { + BoBaseCore* baseCore = (BoBaseCore*) thisx; RCP_SetupDL(&gMasterDisp, SETUPDL_29); @@ -1989,7 +1992,7 @@ bool Bolse_801918E4(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th case 8: RCP_SetupDL(&gMasterDisp, SETUPDL_41); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, (s32) D_i4_8019EEC0, 255); - if (boss->swork[limbIndex - 1] <= 0) { + if (baseCore->swork[limbIndex - 1] <= 0) { *dList = NULL; } break; @@ -2002,15 +2005,15 @@ bool Bolse_801918E4(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th case 14: case 15: case 16: - if ((boss->swork[3 + limbIndex] % 2) != 0) { + if ((baseCore->swork[3 + limbIndex] % 2) != 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_41); - if (boss->swork[3 + limbIndex] > 1000) { + if (baseCore->swork[3 + limbIndex] > 1000) { gDPSetPrimColor(gMasterDisp++, 0, 0, 64, 64, 255, 255); } else { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 0, 0, 255); } } - if (boss->swork[0 + limbIndex - 9] <= 0) { + if (baseCore->swork[0 + limbIndex - 9] <= 0) { *dList = D_BO_6009BC0; } break; @@ -2018,9 +2021,9 @@ bool Bolse_801918E4(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th return false; } -void Bolse_80191A6C(s32 index, Vec3f* vec, void* ptr) { +void Bolse_BoBaseCore_PostLimbDraw(s32 index, Vec3f* vec, void* thisx) { Vec3f src = { 0.0f, 0.0f, 0.0f }; - Boss* boss = (Boss*) ptr; + BoBaseCore* baseCore = (BoBaseCore*) thisx; switch (index) { case 1: @@ -2031,36 +2034,37 @@ void Bolse_80191A6C(s32 index, Vec3f* vec, void* ptr) { case 6: case 7: case 8: - Matrix_MultVec3f(gCalcMatrix, &src, &boss->vwork[index - 1]); + Matrix_MultVec3f(gCalcMatrix, &src, &baseCore->vwork[index - 1]); break; } } -void Bolse_Boss311_Draw(Boss* boss) { - Animation_GetFrameData(&D_BO_6001C64, 0, boss->vwork); - if (boss->state >= 2) { - Animation_DrawSkeleton(3, D_BO_6001FB0, boss->vwork, Bolse_801918E4, Bolse_80191A6C, boss, gCalcMatrix); +void Bolse_BoBaseCore_Draw(BoBaseCore* this) { + Animation_GetFrameData(&D_BO_6001C64, 0, this->vwork); + if (this->state >= 2) { + Animation_DrawSkeleton(3, D_BO_6001FB0, this->vwork, Bolse_BoBaseCore_OverrideLimbDraw, + Bolse_BoBaseCore_PostLimbDraw, this, gCalcMatrix); } else { - Animation_DrawSkeleton(3, D_BO_6001FB0, boss->vwork, NULL, NULL, boss, gCalcMatrix); + Animation_DrawSkeleton(3, D_BO_6001FB0, this->vwork, NULL, NULL, this, gCalcMatrix); } } -void Bolse_80191BAC(Boss* boss) { +void Bolse_BoBaseShield_Update(BoBaseShield* this) { D_i4_801A0530 = 0; - Math_SmoothStepToF(&boss->fwork[0], D_BO_801A03DC * 9.0f + 10.0f, 1.0f, 10.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[0], D_BO_801A03DC * 9.0f + 10.0f, 1.0f, 10.0f, 0.0f); - Texture_Scroll(D_BO_600CF88, 16, 16, 0); - Texture_Scroll(D_BO_600CF88, 16, 16, 0); + Texture_Scroll(aBoBaseShieldTex, 16, 16, 0); + Texture_Scroll(aBoBaseShieldTex, 16, 16, 0); - switch (boss->state) { + switch (this->state) { case 2: break; case 0: if (D_BO_801A03DC == 0) { - boss->timer_052 = 130; - boss->state = 1; + this->timer_052 = 130; + this->state = 1; Radio_PlayMessage(gMsg_ID_11050, RCID_FOX); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); @@ -2069,46 +2073,47 @@ void Bolse_80191BAC(Boss* boss) { case 1: Math_SmoothStepToF(&gBosses[0].fwork[1], 0.0f, 1.0f, 0.01f, 0.001f); - if (boss->timer_052 == 0) { - boss->state = 2; - AUDIO_PLAY_SFX(NA_SE_OB_BARRIER_RELEASE, boss->sfxSource, 0); + if (this->timer_052 == 0) { + this->state = 2; + AUDIO_PLAY_SFX(NA_SE_OB_BARRIER_RELEASE, this->sfxSource, 0); } break; } if (gGroundClipMode == 0) { - if (((gGameFrameCount % 2) == 0)) { + if ((gGameFrameCount % 2) == 0) { gLight3Brightness = 0.0f; } else { gLight3Brightness = 0.5f; } - gLight3x = boss->obj.pos.x; - gLight3y = boss->obj.pos.y; - gLight3z = boss->obj.pos.z; + gLight3x = this->obj.pos.x; + gLight3y = this->obj.pos.y; + gLight3z = this->obj.pos.z; gLight3R = 255; gLight3G = 128; gLight3B = 128; } } -void Bolse_80191DB0(Boss* boss) { +void Bolse_BoBaseShield_Draw(BoBaseShield* this) { s32 alpha; - Matrix_Scale(gGfxMatrix, boss->scale, boss->scale, boss->scale, MTXF_APPLY); - alpha = boss->fwork[0]; + Matrix_Scale(gGfxMatrix, this->scale, this->scale, this->scale, MTXF_APPLY); + + alpha = this->fwork[0]; if (alpha != 0) { - if (((gGameFrameCount % 2) == 0)) { + if ((gGameFrameCount % 2) == 0) { alpha *= 1.7f; } RCP_SetupDL(&gMasterDisp, SETUPDL_41); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, alpha); Matrix_Scale(gGfxMatrix, 1.2f, 0.55f, 1.2f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_BO_600C4E0); + gSPDisplayList(gMasterDisp++, aBoBaseShieldDL); } } -void Bolse_80191ED8(void) { +void Bolse_LoadLevelObjects(void) { s32 i; Actor* actor; Boss* boss; @@ -2141,7 +2146,7 @@ void Bolse_80191ED8(void) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; actor->obj.id = gLevelObjects[i].id; - if ((actor->obj.id == OBJ_ACTOR_271) && (gAllRangeCheckpoint == 0)) { + if ((actor->obj.id == OBJ_ACTOR_BO_SHIELD_REACTOR) && (gAllRangeCheckpoint == 0)) { AUDIO_PLAY_SFX(NA_SE_OB_SPARK_BEAM, actor->sfxSource, 0); } actor->fwork[10] = actor->obj.pos.x = gLevelObjects[i].xPos; @@ -2157,21 +2162,21 @@ void Bolse_80191ED8(void) { Boss_Initialize(boss); boss->obj.status = OBJ_INIT; - boss->obj.id = OBJ_BOSS_309; + boss->obj.id = OBJ_BOSS_BO_BASE; Object_SetInfo(&boss->info, boss->obj.id); boss++; Boss_Initialize(boss); boss->obj.status = OBJ_INIT; - boss->obj.id = OBJ_BOSS_310; + boss->obj.id = OBJ_BOSS_BO_BASE_SHIELD; Object_SetInfo(&boss->info, boss->obj.id); boss++; Boss_Initialize(boss); boss->obj.status = OBJ_INIT; - boss->obj.id = OBJ_BOSS_311; + boss->obj.id = OBJ_BOSS_BO_BASE_CORE; boss->swork[36] = 8; boss->obj.pos.y = -700.0f; diff --git a/src/overlays/ovl_i4/fox_fo.c b/src/overlays/ovl_i4/fox_fo.c index 6d452b64..fac911ac 100644 --- a/src/overlays/ovl_i4/fox_fo.c +++ b/src/overlays/ovl_i4/fox_fo.c @@ -457,7 +457,7 @@ void Fortuna_UpdateEvents(ActorEvent* this) { } } -void Fortuna_SetupDebris(ActorDebris* this, Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32 state) { +void Fortuna_ActorDebris_Setup(ActorDebris* this, Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32 state) { Actor_Initialize(this); this->obj.status = OBJ_ACTIVE; this->obj.id = OBJ_ACTOR_DEBRIS; @@ -476,30 +476,30 @@ void Fortuna_SetupDebris(ActorDebris* this, Vec3f* pos, Vec3f* rot, f32 xVel, f3 Object_SetInfo(&this->info, this->obj.id); } -void Fortuna_SpawnDebris(Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32 state) { +void Fortuna_ActorDebris_Spawn(Vec3f* pos, Vec3f* rot, f32 xVel, f32 yVel, f32 zVel, s32 state) { s32 i; for (i = ARRAY_COUNT(gActors) - 1; i >= 30; i--) { if (gActors[i].obj.status == 0) { - Fortuna_SetupDebris(&gActors[i], pos, rot, xVel, yVel, zVel, state); + Fortuna_ActorDebris_Setup(&gActors[i], pos, rot, xVel, yVel, zVel, state); break; } } } -void Fortuna_Radar_Update(FoRadar* this) { +void Fortuna_FoRadar_Update(FoRadar* this) { this->fwork[0] += 2.0f; if (this->state == 2) { this->state = 3; - Fortuna_SpawnDebris(this->vwork, &this->vwork[6], RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT(10.0f) + 10.0f, - RAND_FLOAT_CENTERED(50.0f), 36); - Fortuna_SpawnDebris(&this->vwork[1], &this->vwork[7], RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT(10.0f) + 10.0f, - RAND_FLOAT_CENTERED(50.0f), 36); - Fortuna_SpawnDebris(&this->vwork[2], &this->vwork[8], RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT(10.0f) + 10.0f, - RAND_FLOAT_CENTERED(50.0f), 35); - Fortuna_SpawnDebris(&this->vwork[3], &this->vwork[9], RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT(10.0f) + 10.0f, - RAND_FLOAT_CENTERED(50.0f), 35); - func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y + 180.0f, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 5.0f, 10); + Fortuna_ActorDebris_Spawn(this->vwork, &this->vwork[6], RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT(10.0f) + 10.0f, + RAND_FLOAT_CENTERED(50.0f), 36); + Fortuna_ActorDebris_Spawn(&this->vwork[1], &this->vwork[7], RAND_FLOAT_CENTERED(50.0f), + RAND_FLOAT(10.0f) + 10.0f, RAND_FLOAT_CENTERED(50.0f), 36); + Fortuna_ActorDebris_Spawn(&this->vwork[2], &this->vwork[8], RAND_FLOAT_CENTERED(50.0f), + RAND_FLOAT(10.0f) + 10.0f, RAND_FLOAT_CENTERED(50.0f), 35); + Fortuna_ActorDebris_Spawn(&this->vwork[3], &this->vwork[9], RAND_FLOAT_CENTERED(50.0f), + RAND_FLOAT(10.0f) + 10.0f, RAND_FLOAT_CENTERED(50.0f), 35); + Effect386_Spawn1(this->obj.pos.x, this->obj.pos.y + 180.0f, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 5.0f, 10); this->itemDrop = DROP_SILVER_RING; this->obj.pos.y += 230.0f; Actor_Despawn(this); @@ -517,9 +517,9 @@ void Fortuna_Radar_Update(FoRadar* this) { } } -void Fortuna_Radar_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* ptr) { +void Fortuna_FoRadar_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f vec = { 0.0f, 0.0f, 0.0f }; - FoRadar* actor = (FoRadar*) ptr; + FoRadar* actor = (FoRadar*) thisx; if (actor->state == 1) { switch (limbIndex) { @@ -556,8 +556,8 @@ void Fortuna_Radar_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* ptr) { } } -bool Fortuna_Radar_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* ptr) { - FoRadar* actor = (FoRadar*) ptr; +bool Fortuna_FoRadar_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { + FoRadar* actor = (FoRadar*) thisx; gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); @@ -587,11 +587,11 @@ bool Fortuna_Radar_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3 return false; } -void Fortuna_Radar_Draw(FoRadar* this) { +void Fortuna_FoRadar_Draw(FoRadar* this) { Vec3f frameTable[20]; - Animation_GetFrameData(&D_FO_6007854, 0, frameTable); - Animation_DrawSkeleton(3, D_FO_6007980, frameTable, Fortuna_Radar_OverrideLimbDraw, Fortuna_Radar_PostLimbDraw, + Animation_GetFrameData(&aFoRadarAnim, 0, frameTable); + Animation_DrawSkeleton(3, aFoRadarSkel, frameTable, Fortuna_FoRadar_OverrideLimbDraw, Fortuna_FoRadar_PostLimbDraw, this, gCalcMatrix); if (this->state == 1) { @@ -618,7 +618,7 @@ f32 sLevelCompleteCsActorInitPosX[] = { -200.0f, 200.0f, -50.0f, -2000.0f }; f32 sLevelCompleteCsActorInitPosY[] = { 0.0f, 30.0f, -90.0f, 0.0f }; f32 sLevelCompleteCsActorInitPosZ[] = { -100.0f, -200.0f, -300.0f, 0.0f }; -void Fortuna_LevelCompleteCsSpawnTeam(ActorCutscene* this, s32 actorIdx) { +void Fortuna_LevelComplete_CsSpawnTeam(ActorCutscene* this, s32 actorIdx) { Actor_Initialize(this); this->obj.status = OBJ_INIT; this->obj.id = OBJ_ACTOR_CUTSCENE; @@ -795,7 +795,7 @@ void Fortuna_LevelComplete(Player* player) { gBosses[0].swork[0] = 1; - if ((func_hud_80090200(&gBosses[0]) == 2) || (gMissionStatus != MISSION_COMPLETE)) { + if ((HUD_FoBase_ExplodeCs(&gBosses[0]) == 2) || (gMissionStatus != MISSION_COMPLETE)) { Play_ClearObjectData(); if (gMissionStatus == MISSION_COMPLETE) { player->csState = 10; @@ -849,7 +849,7 @@ void Fortuna_LevelComplete(Player* player) { Audio_StartPlayerNoise(0); if (gMissionStatus == MISSION_COMPLETE) { - Fortuna_LevelCompleteCsSpawnTeam(greatFox, 3); + Fortuna_LevelComplete_CsSpawnTeam(greatFox, 3); } } break; @@ -868,13 +868,13 @@ void Fortuna_LevelComplete(Player* player) { if (gCsFrameCount == 100) { player->baseSpeed = 30.0f; if (gTeamShields[TEAM_ID_FALCO] > 0) { - Fortuna_LevelCompleteCsSpawnTeam(falco, 0); + Fortuna_LevelComplete_CsSpawnTeam(falco, 0); } if (gTeamShields[TEAM_ID_SLIPPY] > 0) { - Fortuna_LevelCompleteCsSpawnTeam(slippy, 1); + Fortuna_LevelComplete_CsSpawnTeam(slippy, 1); } if (gTeamShields[TEAM_ID_PEPPY] > 0) { - Fortuna_LevelCompleteCsSpawnTeam(peppy, 2); + Fortuna_LevelComplete_CsSpawnTeam(peppy, 2); } } @@ -1126,26 +1126,26 @@ void Fortuna_LevelComplete(Player* player) { case 20: if (gTeamShields[TEAM_ID_FALCO] > 0) { - Fortuna_LevelCompleteCsSpawnTeam(falco, 0); + Fortuna_LevelComplete_CsSpawnTeam(falco, 0); falco->obj.pos.x = (player->pos.x - 100.0f) - 400.0f; falco->obj.pos.y = player->pos.y + 400.0f; falco->obj.pos.z = player->trueZpos - 150.0f; falco->obj.rot.z = 90.0f; } if (gTeamShields[TEAM_ID_SLIPPY] > 0) { - Fortuna_LevelCompleteCsSpawnTeam(slippy, 1); + Fortuna_LevelComplete_CsSpawnTeam(slippy, 1); slippy->obj.pos.x = player->pos.x + 100.0f + 400.0f; slippy->obj.pos.y = player->pos.y + 400.0f; slippy->obj.pos.z = player->trueZpos - 150.0f; slippy->obj.rot.z = -90.0f; } if (gTeamShields[TEAM_ID_PEPPY] > 0) { - Fortuna_LevelCompleteCsSpawnTeam(peppy, 2); + Fortuna_LevelComplete_CsSpawnTeam(peppy, 2); peppy->obj.pos.x = player->pos.x; peppy->obj.pos.y = player->pos.y + 100.0f + 400.0f; peppy->obj.pos.z = player->trueZpos - 250.0f; } - Fortuna_LevelCompleteCsSpawnTeam(greatFox, 3); + Fortuna_LevelComplete_CsSpawnTeam(greatFox, 3); greatFox->obj.pos.z = player->pos.z + 400.0f; greatFox->vel.z = 0.0f; @@ -1457,7 +1457,7 @@ void Fortuna_LoadLevelObjects(void) { Actor* actor; Sprite* sprite; Scenery360* scenery360; - BossFO* boss = &gBosses[0]; + FoBase* base = &gBosses[0]; gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]); @@ -1510,11 +1510,11 @@ void Fortuna_LoadLevelObjects(void) { } } - Boss_Initialize(boss); - boss->obj.status = OBJ_INIT; - boss->obj.pos.x = 0.0f; - boss->obj.pos.y = 0.0f; - boss->obj.pos.z = 0.0f; - boss->obj.id = OBJ_BOSS_FO; - Object_SetInfo(&boss->info, boss->obj.id); + Boss_Initialize(base); + base->obj.status = OBJ_INIT; + base->obj.pos.x = 0.0f; + base->obj.pos.y = 0.0f; + base->obj.pos.z = 0.0f; + base->obj.id = OBJ_BOSS_FO_BASE; + Object_SetInfo(&base->info, base->obj.id); } diff --git a/src/overlays/ovl_i4/fox_i4.c b/src/overlays/ovl_i4/fox_i4.c index 68bbbe7d..6beeb7f2 100644 --- a/src/overlays/ovl_i4/fox_i4.c +++ b/src/overlays/ovl_i4/fox_i4.c @@ -1,14 +1,14 @@ #include "global.h" void Fortuna_LevelComplete(Player*); -void Bolse_8018D394(Boss*); -void Bolse_8018D454(Boss*); -void Bolse_8018D7F0(Boss*); -void Bolse_8018D960(Boss*); -void Bolse_8018E710(Actor*); -void Bolse_8018E870(Actor*); -void Bolse_80191BAC(Actor*); -void Bolse_80191DB0(Actor*); +void Bolse_BoLaserCannon_Update(Boss*); +void Bolse_BoLaserCannon_Draw(BoLaserCannon*); +void Bolse_BoShieldReactor_Update(BoShieldReactor*); +void Bolse_BoShieldReactor_Draw(Boss*); +void Bolse_BoBase_Update(Actor*); +void Bolse_BoBase_Draw(Actor*); +void Bolse_BoBaseShield_Update(Actor*); +void Bolse_BoBaseShield_Draw(Actor*); UNK_TYPE D_i4_801A03C0; s32 D_i4_8019EDD0 = 0; @@ -18,29 +18,29 @@ void OvlI4_CallFunction(u32 mode, void* ptr) { case OVLCALL_FO_CS_COMPLETE: Fortuna_LevelComplete(ptr); break; - case OVLCALL_BOSS309_UPDATE: - Bolse_8018E710(ptr); + case OVLCALL_BO_BASE_UPDATE: + Bolse_BoBase_Update(ptr); break; - case OVLCALL_BOSS309_DRAW: - Bolse_8018E870(ptr); + case OVLCALL_BO_BASE_DRAW: + Bolse_BoBase_Draw(ptr); break; - case OVLCALL_BOSS310_UPDATE: - Bolse_80191BAC(ptr); + case OVLCALL_BO_BASE_SHIELD_UPDATE: + Bolse_BoBaseShield_Update(ptr); break; - case OVLCALL_BOSS310_DRAW: - Bolse_80191DB0(ptr); + case OVLCALL_BO_BASE_SHIELD_DRAW: + Bolse_BoBaseShield_Draw(ptr); break; - case OVLCALL_ACTOR271_UPDATE: - Bolse_8018D7F0(ptr); + case OVLCALL_BO_SHIELD_REACTOR_UPDATE: + Bolse_BoShieldReactor_Update(ptr); break; - case OVLCALL_ACTOR271_DRAW: - Bolse_8018D960(ptr); + case OVLCALL_BO_SHIELD_REACTOR_DRAW: + Bolse_BoShieldReactor_Draw(ptr); break; - case OVLCALL_ACTOR272_UPDATE: - Bolse_8018D394(ptr); + case OVLCALL_BO_LASER_CANNON_UPDATE: + Bolse_BoLaserCannon_Update(ptr); break; - case OVLCALL_ACTOR272_DRAW: - Bolse_8018D454(ptr); + case OVLCALL_BO_LASER_CANNON_DRAW: + Bolse_BoLaserCannon_Draw(ptr); default: PRINTF("i4 指定外!\n"); // Not specified! break; diff --git a/src/overlays/ovl_i4/fox_ka.c b/src/overlays/ovl_i4/fox_ka.c index c2864824..6e1ee05f 100644 --- a/src/overlays/ovl_i4/fox_ka.c +++ b/src/overlays/ovl_i4/fox_ka.c @@ -179,7 +179,7 @@ typedef enum KaBaseStates { /* 2 */ KA_BASE_STATE_2 } KaBaseStates; -typedef enum KaSaucererStates { +typedef enum KaKaSaucererStates { /* 0 */ SAUCERER_STAND_BY, /* 1 */ SAUCERER_CS_APPROACH_BASE, /* 2 */ SAUCERER_CS_CLOSE_UP, @@ -197,9 +197,9 @@ typedef enum KaSaucererStates { /* 18 */ SAUCERER_CS_LASER_HIT, /* 20 */ SAUCERER_DEFEAT = 20, /* 21 */ SAUCERER_CS_FALL_TO_GROUND, -} KaSaucererStates; +} KaKaSaucererStates; -// Particle effects visible while the Saucerer is charging it's laser +// Particle effects visible while the KaSaucerer is charging it's laser void Katina_LaserEnergyParticlesSetup(Effect358* this, f32 x, f32 y, f32 z, f32 x2, f32 y2, f32 z2) { f32 yRot; f32 xRot; @@ -209,7 +209,7 @@ void Katina_LaserEnergyParticlesSetup(Effect358* this, f32 x, f32 y, f32 z, f32 Effect_Initialize(this); this->obj.status = OBJ_ACTIVE; - this->obj.id = OBJ_EFFECT_358; + this->obj.id = OBJ_EFFECT_KA_ENERGY_PARTICLES; this->obj.pos.x = x; this->obj.pos.y = y; @@ -235,7 +235,7 @@ void Katina_LaserEnergyParticlesSetup(Effect358* this, f32 x, f32 y, f32 z, f32 Object_SetInfo(&this->info, this->obj.id); } -// Particle effects visible while the Saucerer is charging it's laser +// Particle effects visible while the KaSaucerer is charging it's laser void Katina_LaserEnergyParticlesSpawn(f32 x, f32 y, f32 z, f32 x2, f32 y2, f32 z2) { s32 i; @@ -283,7 +283,7 @@ void Katina_FireSmokeEffectSetup(EffectFireSmoke* this, f32 x, f32 y, f32 z, f32 Effect_Initialize(this); this->obj.status = OBJ_INIT; - this->obj.id = OBJ_EFFECT_FIRE_SMOKE; + this->obj.id = OBJ_EFFECT_FIRE_SMOKE_1; this->obj.pos.x = x; this->obj.pos.y = y; @@ -492,7 +492,7 @@ void Katina_LevelStart(Player* player) { func_effect_8007D2C8(gActors[5].obj.pos.x, gActors[5].obj.pos.y, gActors[5].obj.pos.z, 10.0f); for (j = 0; j < 10; j++) { - func_effect_800794CC(gActors[5].obj.pos.x, gActors[5].obj.pos.y, gActors[5].obj.pos.z, 1.0f); + Effect_Effect357_Spawn50(gActors[5].obj.pos.x, gActors[5].obj.pos.y, gActors[5].obj.pos.z, 1.0f); } Effect_SpawnTimedSfxAtPos(&gActors[5].obj.pos, NA_SE_EN_EXPLOSION_M); @@ -531,7 +531,7 @@ void Katina_LevelStart(Player* player) { Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0.0f); } -void Katina_BaseUpdate(Frontlinebase* this) { +void Katina_KaFrontlineBase_Update(KaFrontlineBase* this) { s32 i; f32 posX; Vec3f src; @@ -545,7 +545,7 @@ void Katina_BaseUpdate(Frontlinebase* this) { case KA_BASE_STATE_1: this->timer_050 = 4; this->state++; - func_effect_8007B344(this->obj.pos.x, this->obj.pos.y + 250.0f, this->obj.pos.z + 600.0f, 71.0f, 5); + Effect_Effect384_Spawn(this->obj.pos.x, this->obj.pos.y + 250.0f, this->obj.pos.z + 600.0f, 71.0f, 5); gCameraShake = 25; gLight1R = 255; gLight1G = 0; @@ -562,7 +562,7 @@ void Katina_BaseUpdate(Frontlinebase* this) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); if (dest.z > 0.0f) { - func_effect_8007953C(dest.x, posX, dest.z, 1.3f); + Effect_Effect357_Spawn80(dest.x, posX, dest.z, 1.3f); posX += 6.25f; src.z -= 6.0f; } @@ -593,7 +593,7 @@ void Katina_BaseUpdate(Frontlinebase* this) { } } -void Katina_Base_Draw(Frontlinebase* this) { +void Katina_KaFrontlineBase_Draw(KaFrontlineBase* this) { gSPFogPosition(gMasterDisp++, gFogNear, 1002); Matrix_Translate(gGfxMatrix, 0.0f, 20.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -607,7 +607,7 @@ void Katina_Base_Draw(Frontlinebase* this) { } } -void Katina_BossSetup(Saucerer* this) { +void Katina_KaSaucerer_Init(KaSaucerer* this) { this->swork[BOSS_HATCH_1_HP] = 100; this->swork[BOSS_HATCH_2_HP] = 100; this->swork[BOSS_HATCH_3_HP] = 100; @@ -618,7 +618,7 @@ void Katina_BossSetup(Saucerer* this) { this->vwork[0].y = 1000.0f; } -void Katina_Hatch_Destroy(Saucerer* this, s32 hatchIdx) { +void Katina_Hatch_Destroy(KaSaucerer* this, s32 hatchIdx) { s32 i; Vec3f pos; @@ -628,10 +628,10 @@ void Katina_Hatch_Destroy(Saucerer* this, s32 hatchIdx) { this->swork[hatchIdx + 5] = 60; for (i = 0; i < 20; i++) { - func_effect_800794CC(this->obj.pos.x + RAND_FLOAT_CENTERED(300.0f) + (this->vwork[hatchIdx + 1].x * 1.3f), - this->obj.pos.y + RAND_FLOAT_CENTERED(300.0f) + (this->vwork[hatchIdx + 1].y * 1.3f), - this->obj.pos.z + RAND_FLOAT_CENTERED(300.0f) + (this->vwork[hatchIdx + 1].z * 1.3f), - 1.55f); + Effect_Effect357_Spawn50(this->obj.pos.x + RAND_FLOAT_CENTERED(300.0f) + (this->vwork[hatchIdx + 1].x * 1.3f), + this->obj.pos.y + RAND_FLOAT_CENTERED(300.0f) + (this->vwork[hatchIdx + 1].y * 1.3f), + this->obj.pos.z + RAND_FLOAT_CENTERED(300.0f) + (this->vwork[hatchIdx + 1].z * 1.3f), + 1.55f); } pos.x = this->obj.pos.x + (this->vwork[hatchIdx + 1].x * 1.3f); @@ -648,7 +648,7 @@ void Katina_Hatch_Destroy(Saucerer* this, s32 hatchIdx) { D_ctx_80177850 = 15; } -void Katina_BossHandleDamage(Saucerer* this) { +void Katina_BossHandleDamage(KaSaucerer* this) { s32 i; s32 pad; Vec3f src; @@ -700,7 +700,7 @@ void Katina_BossHandleDamage(Saucerer* this) { } if (this->swork[BOSS_CORE_HP] <= 0) { - // OBJ_EFFECT_FIRE_SMOKE + // OBJ_EFFECT_FIRE_SMOKE_1 func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y - 1000.0f, this->obj.pos.z, 15.0f); y = 0.0f; @@ -717,8 +717,8 @@ void Katina_BossHandleDamage(Saucerer* this) { // Broken pieces of the core // OBJ_EFFECT_357 - func_effect_800794CC(this->obj.pos.x + dest.x, this->obj.pos.y - 1200.0f + y, - this->obj.pos.z + dest.z, 1.6f); + Effect_Effect357_Spawn50(this->obj.pos.x + dest.x, this->obj.pos.y - 1200.0f + y, + this->obj.pos.z + dest.z, 1.6f); } AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, this->sfxSource, 4); @@ -747,10 +747,10 @@ void Katina_BossHandleDamage(Saucerer* this) { if ((gGameFrameCount % 16) == 0) { for (i = 0; i < 4; i++) { if ((this->swork[10 + i] <= 0) && (Rand_ZeroOne() < 0.2f)) { - func_effect_8007BFFC((this->vwork[1 + i].x * 1.3f) + this->obj.pos.x, - (this->vwork[1 + i].y * 1.3f) + this->obj.pos.y, - (this->vwork[1 + i].z * 1.3f) + this->obj.pos.z, this->vel.x, this->vel.y, - this->vel.z, 7.0f, 5); + Effect386_Spawn1((this->vwork[1 + i].x * 1.3f) + this->obj.pos.x, + (this->vwork[1 + i].y * 1.3f) + this->obj.pos.y, + (this->vwork[1 + i].z * 1.3f) + this->obj.pos.z, this->vel.x, this->vel.y, + this->vel.z, 7.0f, 5); } } } @@ -772,7 +772,7 @@ void Katina_BossHandleDamage(Saucerer* this) { } } -void Katina_BossSpawnEnemies(Saucerer* this, Vec3f* pos, f32 arg2) { +void Katina_BossSpawnEnemies(KaSaucerer* this, Vec3f* pos, f32 arg2) { s32 i; ActorAllRange* actor = &gActors[20]; @@ -821,9 +821,9 @@ void Katina_BossSpawnEnemies(Saucerer* this, Vec3f* pos, f32 arg2) { } /** - * Sets the angle for the enemies coming out of the Saucerer + * Sets the angle for the enemies coming out of the KaSaucerer */ -void Katina_SetOutcomingEnemyAngle(Saucerer* this) { +void Katina_SetOutcomingEnemyAngle(KaSaucerer* this) { f32 angle; f32 distY; s32 i; @@ -840,7 +840,7 @@ void Katina_SetOutcomingEnemyAngle(Saucerer* this) { } } -void Katina_BossUpdate(Saucerer* this) { +void Katina_KaSaucerer_Update(KaSaucerer* this) { s32 i; s32 rotCount; s32 enemyCount; @@ -867,7 +867,7 @@ void Katina_BossUpdate(Saucerer* this) { } /** - * Summon core if all hatches are destroyed or after 3 minutes from Saucerer appearance. + * Summon core if all hatches are destroyed or after 3 minutes from KaSaucerer appearance. */ if ((((this->swork[BOSS_HATCH_1_HP] <= 0) && (this->swork[BOSS_HATCH_2_HP] <= 0) && (this->swork[BOSS_HATCH_3_HP] <= 0) && (this->swork[BOSS_HATCH_4_HP] <= 0)) || @@ -882,7 +882,7 @@ void Katina_BossUpdate(Saucerer* this) { } switch (this->state) { - // Send Saucerer whether you killed 10 enemies or after 2 minutes of gameplay + // Send KaSaucerer whether you killed 10 enemies or after 2 minutes of gameplay case SAUCERER_STAND_BY: if ((gHitCount >= 10) || (gAllRangeEventTimer > 3840)) { if ((D_edisplay_801615D0.y < 0.0f)) { @@ -912,7 +912,7 @@ void Katina_BossUpdate(Saucerer* this) { break; /** - * Wait for Saucerer to be near the base to start cutscene. + * Wait for KaSaucerer to be near the base to start cutscene. * Set checkpoint. */ case SAUCERER_CS_APPROACH_BASE: @@ -1026,7 +1026,7 @@ void Katina_BossUpdate(Saucerer* this) { break; /** - * Cutscene: Boss music starts, enemies coming out of the Saucerer. + * Cutscene: Boss music starts, enemies coming out of the KaSaucerer. * Return control to the player after cutscene ends and close the hatches. */ case SAUCERER_CS_SEND_ENEMIES: @@ -1149,7 +1149,7 @@ void Katina_BossUpdate(Saucerer* this) { } break; - // Set a 1 minute timer for Saucerer attack. + // Set a 1 minute timer for KaSaucerer attack. case SAUCERER_LASER_CHARGE_START: if (this->timer_050 == 0) { AUDIO_PLAY_SFX(NA_SE_KA_UFO_HATCH_STOP, this->sfxSource, 0); @@ -1161,7 +1161,7 @@ void Katina_BossUpdate(Saucerer* this) { break; /** - * Start Saucerer attack after 13 seconds from Bill's warning + * Start KaSaucerer attack after 13 seconds from Bill's warning * Start cutscene for base destruction. */ case SAUCERER_CS_LASER_CHARGE_END: @@ -1205,7 +1205,7 @@ void Katina_BossUpdate(Saucerer* this) { } break; - // Rotate Saucerer into fire position. + // Rotate KaSaucerer into fire position. case SAUCERER_CS_ROTATE: if (this->timer_050 == 700) { Radio_PlayMessage(gMsg_ID_18070, RCID_BILL); @@ -1262,7 +1262,7 @@ void Katina_BossUpdate(Saucerer* this) { } break; - // Cutscene: Close up, start Saucerer attack. + // Cutscene: Close up, start KaSaucerer attack. case SAUCERER_CS_LASER_FIRE_START: Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 30.0f, 1.0f, 1.6f, 0.0f); Math_SmoothStepToF(&gPlayer[0].cam.eye.z, 0.0f, 0.05f, 5.0f, 0.0f); @@ -1311,7 +1311,7 @@ void Katina_BossUpdate(Saucerer* this) { if ((this->timer_052 == 700) || (this->timer_052 == 697)) { i = gGameFrameCount % 64U; Object_Kill(&gEffects[i].obj, gEffects[i].sfxSource); - func_effect_8007B344(this->obj.pos.x, this->obj.pos.y - 600.0f, this->obj.pos.z, 90.0f, 0); + Effect_Effect384_Spawn(this->obj.pos.x, this->obj.pos.y - 600.0f, this->obj.pos.z, 90.0f, 0); AUDIO_PLAY_SFX(NA_SE_KA_UFO_BEAM, this->sfxSource, 0); } @@ -1319,7 +1319,7 @@ void Katina_BossUpdate(Saucerer* this) { this->state = 17; for (i = 0; i < ARRAY_COUNT(gEffects); i++) { - if (gEffects[i].obj.id == OBJ_EFFECT_358) { + if (gEffects[i].obj.id == OBJ_EFFECT_KA_ENERGY_PARTICLES) { Object_Kill(&gEffects[i].obj, gEffects[i].sfxSource); } } @@ -1343,7 +1343,7 @@ void Katina_BossUpdate(Saucerer* this) { } break; - // Cutscene: Saucerer fires laser to the base. + // Cutscene: KaSaucerer fires laser to the base. case SAUCERER_CS_LASER_FIRE_END: this->fwork[BOSS_FWORK_13] += 0.1f; @@ -1358,7 +1358,7 @@ void Katina_BossUpdate(Saucerer* this) { } break; - // Cutscene: Base is hit by Saucerer's laser. + // Cutscene: Base is hit by KaSaucerer's laser. case SAUCERER_CS_LASER_HIT: Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 100.0f, 1.0f, 100.0f, 0.0f); Math_SmoothStepToF(&gPlayer[0].cam.at.y, 525.0f, 0.3f, 50.0f, 0.0f); @@ -1396,7 +1396,7 @@ void Katina_BossUpdate(Saucerer* this) { } break; - // Saucerer core destroyed, setup for MISSION_ACCOMPLISHED. + // KaSaucerer core destroyed, setup for MISSION_ACCOMPLISHED. case SAUCERER_DEFEAT: gShowAllRangeCountdown = false; @@ -1424,7 +1424,7 @@ void Katina_BossUpdate(Saucerer* this) { } break; - // Cutscene: Saucerer falling to the ground. + // Cutscene: KaSaucerer falling to the ground. case SAUCERER_CS_FALL_TO_GROUND: Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); @@ -1445,8 +1445,8 @@ void Katina_BossUpdate(Saucerer* this) { src.y = -800.0f; src.z = RAND_FLOAT_CENTERED(3000.0f); Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - func_effect_800794CC(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, - 1.55f); + Effect_Effect357_Spawn50(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, + 1.55f); } else { this->obj.rot.x -= 0.06f; this->vel.y = 0.0f; @@ -1550,7 +1550,7 @@ void Katina_BossUpdate(Saucerer* this) { } bool Katina_BossOverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { - Saucerer* boss = (Saucerer*) data; + KaSaucerer* boss = (KaSaucerer*) data; RCP_SetupDL(&gMasterDisp, SETUPDL_29); gDPSetPrimColor(gMasterDisp++, 0, 0, 40, 40, 255, 255); @@ -1630,14 +1630,14 @@ bool Katina_BossOverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* if (boss->health < 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_57); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - *dList = aKaDestroyedSaucererDL; + *dList = aKaDestroyedKaSaucererDL; } break; } return 0; } -void Katina_BossDraw(Saucerer* this) { +void Katina_KaSaucerer_Draw(KaSaucerer* this) { Vec3f jointTable[30]; if (this->state != 0) { @@ -1794,7 +1794,7 @@ void Katina_SFTeam_LevelComplete_Update(void) { void Katina_LevelComplete(Player* player) { s32 i; - Saucerer* boss = &gBosses[KA_BOSS_SAUCERER]; + KaSaucerer* boss = &gBosses[KA_BOSS_SAUCERER]; Vec3f src; Vec3f dest; f32 angle; @@ -2094,7 +2094,7 @@ void Katina_LevelComplete(Player* player) { player->rockAngle = SIN_DEG(player->rockPhase); } -// Makes your teammates fly towards the camera after defeating the Saucerer. +// Makes your teammates fly towards the camera after defeating the KaSaucerer. void Katina_SFTeamFlyTowardsCamera(ActorCutscene* this) { Vec3f src; Vec3f dest; @@ -2343,15 +2343,15 @@ void Katina_UpdateEvents(ActorAllRange* this) { } void Katina_Init(void) { - Frontlinebase* base = &gBosses[KA_BOSS_BASE]; - Saucerer* saucerer = &gBosses[KA_BOSS_SAUCERER]; + KaFrontlineBase* base = &gBosses[KA_BOSS_BASE]; + KaSaucerer* saucerer = &gBosses[KA_BOSS_SAUCERER]; Boss_Initialize(saucerer); saucerer->obj.status = OBJ_INIT; saucerer->obj.pos.x = -15000.0f; saucerer->obj.pos.y = 3240.0f; saucerer->obj.pos.z = 15000.0f; - saucerer->obj.id = OBJ_BOSS_KA; + saucerer->obj.id = OBJ_BOSS_KA_SAUCERER; Object_SetInfo(&saucerer->info, saucerer->obj.id); Boss_Initialize(base); @@ -2359,7 +2359,7 @@ void Katina_Init(void) { base->obj.pos.x = 0.0f; base->obj.pos.y = 0.0f; base->obj.pos.z = 0.0f; - base->obj.id = OBJ_BOSS_KA_BASE; + base->obj.id = OBJ_BOSS_KA_FLBASE; Object_SetInfo(&base->info, base->obj.id); } diff --git a/src/overlays/ovl_i4/fox_sz.c b/src/overlays/ovl_i4/fox_sz.c index 5eb40225..12750276 100644 --- a/src/overlays/ovl_i4/fox_sz.c +++ b/src/overlays/ovl_i4/fox_sz.c @@ -48,12 +48,12 @@ void SectorZ_MissileExplode(ActorAllRange* this, bool shotDown) { Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_MS_EXPLOSION_S); for (i = 0; i < 20; i++) { - func_effect_800794CC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1.0f); + Effect_Effect357_Spawn50(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1.0f); func_effect_80079618(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1.0f); } - func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 20.0f, 30); - func_effect_8007B344(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 20.0f, 5); + Effect386_Spawn1(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 20.0f, 30); + Effect_Effect384_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 20.0f, 5); if (shotDown) { sMissileDestroyCount++; @@ -77,30 +77,30 @@ void SectorZ_MissileExplode(ActorAllRange* this, bool shotDown) { } } -void SectorZ_FireSmokeEffectSetup(EffectFireSmoke* effect, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, +void SectorZ_FireSmokeEffectSetup(EffectFireSmoke* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_FIRE_SMOKE; + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_FIRE_SMOKE_1; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->vel.x = xVel; - effect->vel.y = yVel; - effect->vel.z = zVel; + this->vel.x = xVel; + this->vel.y = yVel; + this->vel.z = zVel; - effect->scale2 = scale; - effect->scale1 = 0.5f; + this->scale2 = scale; + this->scale1 = 0.5f; - effect->unk_4C = 2; - effect->obj.rot.z = RAND_FLOAT(360.0f); + this->unk_4C = 2; + this->obj.rot.z = RAND_FLOAT(360.0f); - Object_SetInfo(&effect->info, effect->obj.id); + Object_SetInfo(&this->info, this->obj.id); - effect->unk_44 = 255; - effect->unk_46 = 2; + this->unk_44 = 255; + this->unk_46 = 2; } void SectorZ_FireSmokeEffectSpawn(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale) { @@ -551,7 +551,7 @@ void SectorZ_UpdateEvents(ActorAllRange* this) { gCsFrameCount++; if (gCsFrameCount == 3) { - func_effect_80078E50(katt->obj.pos.x, katt->obj.pos.y, katt->obj.pos.z, 30.0f); + Effect_Effect393_Spawn(katt->obj.pos.x, katt->obj.pos.y, katt->obj.pos.z, 30.0f); } player->cam.eye.x += katt->vel.x * 0.23f; player->cam.eye.y += katt->vel.y * 0.23f; @@ -1146,7 +1146,7 @@ void SectorZ_LevelComplete(Player* player) { PRINTF("Enm->time0 %d\n"); PRINTF("time0 %d\n"); - PRINTF("Demo_Time=%d\n"); + PRINTF("Demo_Time=%d\n", gGameFrameCount); direction = 1.0f; if (!gGreatFoxIntact) { @@ -1691,8 +1691,8 @@ void SectorZ_LevelCompleteCsUpdate(ActorCutscene* this) { src.y = 70.0f; src.z = -70.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - func_effect_80078E50(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, - 3.1f); + Effect_Effect393_Spawn(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, + 3.1f); } } } @@ -1715,7 +1715,7 @@ void SectorZ_LevelCompleteCsUpdate(ActorCutscene* this) { this->obj.rot.z = -this->rot_0F4.z; } -void SectorZ_SpaceJunkUpdate(ActorSpaceJunk* this) { +void SectorZ_SpaceJunkUpdate(SzSpaceJunk* this) { s32 i; this->obj.rot.x += this->rot_0F4.x; @@ -1728,7 +1728,7 @@ void SectorZ_SpaceJunkUpdate(ActorSpaceJunk* this) { AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, this->sfxSource, 4); if (this->health <= 0) { - func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 5.0f, 10); + Effect386_Spawn1(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 5.0f, 10); Actor_Despawn(this); BonusText_Display(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 2); @@ -1736,7 +1736,7 @@ void SectorZ_SpaceJunkUpdate(ActorSpaceJunk* this) { D_ctx_80177850 = 15; for (i = 0; i < 6; i++) { - func_effect_800794CC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1.0f); + Effect_Effect357_Spawn50(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1.0f); } Object_Kill(&this->obj, this->sfxSource); @@ -1745,7 +1745,7 @@ void SectorZ_SpaceJunkUpdate(ActorSpaceJunk* this) { } } -void SectorZ_SpaceJunkDraw(ActorSpaceJunk* this) { +void SectorZ_SpaceJunkDraw(SzSpaceJunk* this) { gSPDisplayList(gMasterDisp++, aSzSpaceJunk2DL); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); RCP_SetupDL(&gMasterDisp, SETUPDL_57); @@ -1758,7 +1758,7 @@ Vec3f sFireSmokeOffsetPos[] = { { 612.0f, 409.0f, 386.0f }, { 1027.0f, 141.0f, 3 { 600.0f, 385.0f, 380.0f }, { 776.0f, 245.0f, 384.0f }, { 376.0f, 123.0f, 384.0f }, { 428.0f, 174.0f, 383.0f }, { 722.0f, 306.0f, 383.0f }, { 530.0f, 380.0f, 385.0f } }; -void SectorZ_GreatFoxUpdate(GreatFoxSZ* this) { +void SectorZ_SzGreatFox_Update(GreatFoxSZ* this) { s32 i; s32 j; f32 x; @@ -1786,10 +1786,10 @@ void SectorZ_GreatFoxUpdate(GreatFoxSZ* this) { // Effects for broken pieces for (i = 0; i < 25; i++) { - func_effect_800794CC(x + RAND_FLOAT_CENTERED(300.0f), y + RAND_FLOAT_CENTERED(100.0f), z, 2.0f); + Effect_Effect357_Spawn50(x + RAND_FLOAT_CENTERED(300.0f), y + RAND_FLOAT_CENTERED(100.0f), z, 2.0f); func_effect_80079618(x + RAND_FLOAT_CENTERED(300.0f), y + RAND_FLOAT_CENTERED(100.0f), z, 2.0f); } - func_effect_8007BFFC(x, y, z, 0.0f, 0.0f, 0.0f, 20.0f, 30); + Effect386_Spawn1(x, y, z, 0.0f, 0.0f, 0.0f, 20.0f, 30); } if (this->timer_052 != 0) { @@ -1824,8 +1824,8 @@ void SectorZ_GreatFoxUpdate(GreatFoxSZ* this) { Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sFireSmokeOffsetPos[RAND_INT(11.99f)], &dest); - func_effect_8007C484(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, this->vel.x, - this->vel.y, this->vel.z, RAND_FLOAT(0.1f) + 0.15f, 0); + Effect_Effect389_Spawn(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, + this->vel.x, this->vel.y, this->vel.z, RAND_FLOAT(0.1f) + 0.15f, 0); if (((gGameFrameCount % 7) == 0) && (Rand_ZeroOne() < 0.5f)) { SectorZ_FireSmokeEffectSpawn(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, @@ -1834,7 +1834,7 @@ void SectorZ_GreatFoxUpdate(GreatFoxSZ* this) { } } -void SectorZ_GreatFoxDraw(GreatFoxSZ* this) { +void SectorZ_SzGreatFox_Draw(GreatFoxSZ* this) { gSPFogPosition(gMasterDisp++, gFogNear, 1005); Cutscene_DrawGreatFox(); } diff --git a/src/overlays/ovl_i5/fox_ground.c b/src/overlays/ovl_i5/fox_ground.c index 5d3665dc..411c553d 100644 --- a/src/overlays/ovl_i5/fox_ground.c +++ b/src/overlays/ovl_i5/fox_ground.c @@ -261,19 +261,21 @@ void Ground_801B4AA8(s32* arg0, s32* arg1) { } } -void Ground_801B5110(f32 arg0, f32 arg1, f32 arg2) { +void Ground_801B5110(f32 x, f32 y, f32 z) { UnkStruct_801C62E8* ptr; s32 i; s32 k; + z = 200.0f; + D_i5_801C5C04 = 0; D_i5_801C5C08 = 0; D_i5_801C5C0C = 0; D_i5_801C5C10 = 0.0f; D_i5_801BE740 = D_i5_801BE744 = 1.0f; - D_i5_801C62D8.x = arg0; - D_i5_801C62D8.y = arg1; - D_i5_801C62D8.z = 200.0f; // Probably used to be arg2 + D_i5_801C62D8.x = x; + D_i5_801C62D8.y = y; + D_i5_801C62D8.z = z; D_i5_801C5C14 = 1; for (i = 0, ptr = D_i5_801C62E8; i < ARRAY_COUNT(D_i5_801C62E8); i++, ptr++) { @@ -556,8 +558,8 @@ void Ground_801B5FE0(s32 arg0, s32 arg1, s32 arg2) { } void Ground_801B68A8(Gfx** dlist, s32 arg1, s32 arg2) { - s32 var_a0; - s32 var_a1; + s32 i; + s32 j; s32 var; gDPSetupTile((*dlist)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32, 0, 0, G_TX_MIRROR | G_TX_WRAP, @@ -568,10 +570,10 @@ void Ground_801B68A8(Gfx** dlist, s32 arg1, s32 arg2) { gSPMatrix((*dlist)++, gGfxMtx++, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW); var = 1; - var_a0 = (arg1 + 25) % 27; - for (var_a1 = 26; var_a1 >= var; var_a1--) { - gSPDisplayList((*dlist)++, &D_i5_801C2528[var_a0]); - var_a0 = (var_a0 + 26) % 27; + j = (arg1 + 25) % 27; + for (i = 26; i >= var; i--) { + gSPDisplayList((*dlist)++, &D_i5_801C2528[j]); + j = (j + 26) % 27; } } @@ -760,6 +762,7 @@ s32 Ground_801B6E20(f32 arg0, f32 arg1, f32* arg2, f32* arg3, f32* arg4) { return 1; } +// Unused void Ground_801B7240(f32 arg0, f32 arg1, f32* arg2, f32* arg3, f32* arg4) { s32 pad; f32 sp28; diff --git a/src/overlays/ovl_i5/fox_ma.c b/src/overlays/ovl_i5/fox_ma.c index 0312825d..01ecd3a3 100644 --- a/src/overlays/ovl_i5/fox_ma.c +++ b/src/overlays/ovl_i5/fox_ma.c @@ -27,20 +27,20 @@ typedef struct { /* 0x10 */ s16 unk_10; } UnkStruct_D_i5_801BA1EC; // size = 0x14 -void Macbeth_801AD624(f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, s16, s16, f32); +void Macbeth_Effect357_Spawn1(f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, s16, s16, f32); bool Macbeth_801A0308(Actor*, f32, f32, u8); -void Macbeth_801AF200(f32, f32, f32, f32, f32, f32); +void Macbeth_MaShockBox_Spawn(f32, f32, f32, f32, f32, f32); void Macbeth_801A015C(Actor*); void Macbeth_8019D048(Actor*); void Macbeth_8019FC54(Actor*, s32*, s32*, s32, s32, f32, f32, s32*); -void Macbeth_8019D670(f32, f32, f32, f32, f32, f32, f32, s32, u8); +void Macbeth_MaBoulder_Spawn(f32, f32, f32, f32, f32, f32, f32, s32, u8); void Macbeth_8019D910(Actor*, s32*, s32*, s32, f32, f32, s32*, s32*); -bool Macbeth_801AC5AC(s32, Gfx**, Vec3f*, Vec3f*, void*); -void Macbeth_801A49B8(Actor*); -void Macbeth_801ADCEC(f32, f32, f32, f32, f32, f32); -void Macbeth_801AE610(f32, f32, f32, f32, f32, f32, s16); -void Macbeth_801AE800(f32, f32, f32, f32, f32, f32); -void Macbeth_801ACF6C(void); +bool Macbeth_MaTrainCar1_OverrideLimbDraw(s32, Gfx**, Vec3f*, Vec3f*, void*); +void Macbeth_MaBoulder_HandleDamage(Actor*); +void Macbeth_MaBombDrop_Spawn(f32, f32, f32, f32, f32, f32); +void Macbeth_MaSpear_Spawn(f32, f32, f32, f32, f32, f32, s16); +void Macbeth_Effect379_Spawn(f32, f32, f32, f32, f32, f32); +void Macbeth_EffectClouds_Spawn(void); f32 D_MA_801BE250[40]; s16 D_MA_801BE2F0[9]; @@ -61,130 +61,249 @@ Vec3f D_i5_801BE6E8[6]; s32 D_i5_801BE734[4]; static UnkStruct_D_i5_801B8E50 D_i5_801B8E50[156] = { - { 5174.4f, -2141.0f, 0.0f, 350.0f, OBJ_SCENERY_94 }, { 3401.4f, -1828.0f, 0.0f, 350.0f, OBJ_SCENERY_94 }, - { 1627.8999f, -1515.0f, 0.0f, 350.0f, OBJ_SCENERY_94 }, { -145.0f, -1202.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, - { -1933.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -3733.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -5533.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -7333.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -9133.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -10933.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -12733.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -14533.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -16333.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -18133.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_95 }, - { -19921.6f, -889.0f, 0.0f, 350.0f, OBJ_SCENERY_95 }, { -21656.4f, -423.0f, 0.0f, 340.0f, OBJ_SCENERY_96 }, - { -23390.7f, 40.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, { -25125.0f, 197.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -26925.0f, 197.0f, 0.0f, 0.0f, OBJ_SCENERY_96 }, { -28713.6f, 40.0f, 0.0f, 10.0f, OBJ_SCENERY_96 }, - { -30447.3f, -424.0f, 0.0f, 20.0f, OBJ_SCENERY_95 }, { -32181.3f, -889.0f, 0.0f, 10.0f, OBJ_SCENERY_95 }, - { -33971.1f, -1045.0f, 0.0f, 0.0f, OBJ_SCENERY_100 }, { -35771.1f, -1045.0f, 90.0f, 0.0f, OBJ_SCENERY_100 }, - { -37571.1f, -1045.0f, 180.0f, 0.0f, OBJ_SCENERY_100 }, { -39371.1f, -1045.0f, 270.0f, 0.0f, OBJ_SCENERY_100 }, - { -41171.1f, -1045.0f, 360.0f, 0.0f, OBJ_SCENERY_100 }, { -42971.1f, -1045.0f, 450.0f, 0.0f, OBJ_SCENERY_95 }, - { -44760.0f, -889.0f, 450.0f, 350.0f, OBJ_SCENERY_96 }, { -46547.9f, -733.0f, 450.0f, 0.0f, OBJ_SCENERY_94 }, - { -48347.5f, -733.0f, 450.0f, 0.0f, OBJ_SCENERY_95 }, { -50136.4f, -576.0f, 450.0f, 350.0f, OBJ_SCENERY_95 }, - { -51872.1f, -111.0f, 450.0f, 340.0f, OBJ_SCENERY_96 }, { -53606.4f, 352.0f, 450.0f, 350.0f, OBJ_SCENERY_96 }, - { -55395.4f, 509.0f, 450.0f, 0.0f, OBJ_SCENERY_96 }, { -57184.2f, 353.0f, 450.0f, 10.0f, OBJ_SCENERY_94 }, - { -58957.5f, 40.0f, 450.0f, 10.0f, OBJ_SCENERY_95 }, { -60746.9f, -115.0f, 450.0f, 0.0f, OBJ_SCENERY_94 }, - { -62548.2f, -114.0f, 450.0f, 0.0f, OBJ_SCENERY_101 }, { -64349.1f, -114.0f, 360.0f, 0.0f, OBJ_SCENERY_101 }, - { -66149.3f, -115.0f, 270.0f, 0.0f, OBJ_SCENERY_101 }, { -67950.3f, -115.0f, 180.0f, 0.0f, OBJ_SCENERY_101 }, - { -69751.2f, -115.0f, 90.0f, 0.0f, OBJ_SCENERY_101 }, { -71551.2f, -115.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -73351.0f, -116.0f, 0.0f, 0.0f, OBJ_SCENERY_96 }, { -75139.2f, -273.0f, 0.0f, 10.0f, OBJ_SCENERY_94 }, - { -76912.4f, -587.0f, 0.0f, 10.0f, OBJ_SCENERY_95 }, { -78702.0f, -743.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -80502.2f, -743.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -82302.2f, -743.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -84102.0f, -743.0f, 0.0f, 0.0f, OBJ_SCENERY_95 }, { -85890.6f, -586.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, - { -87679.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -89479.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -91279.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -93079.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -94879.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -96680.0f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -98480.0f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -100280.0f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -102079.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -103879.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -105679.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -107479.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -109279.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -111079.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -112879.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -114679.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -116479.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -118279.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -120079.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -121879.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -123679.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -125479.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -127279.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_95 }, { -129068.2f, -274.0f, 0.0f, 350.0f, OBJ_SCENERY_94 }, - { -130841.2f, 38.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, { -132630.4f, 194.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -134430.4f, 194.0f, 0.0f, 0.0f, OBJ_SCENERY_96 }, { -136219.4f, 37.0f, 0.0f, 10.0f, OBJ_SCENERY_95 }, - { -138009.0f, -119.0f, 0.0f, 0.0f, OBJ_SCENERY_96 }, { -139798.6f, -277.0f, 0.0f, 10.0f, OBJ_SCENERY_95 }, - { -141587.6f, -433.0f, 0.0f, 0.0f, OBJ_SCENERY_95 }, { -143376.3f, -276.0f, 0.0f, 350.0f, OBJ_SCENERY_94 }, - { -145149.0f, 35.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, { -146883.3f, 192.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -148683.3f, 192.0f, 0.0f, 0.0f, OBJ_SCENERY_96 }, { -150471.9f, 34.0f, 0.0f, 10.0f, OBJ_SCENERY_94 }, - { -152244.8f, -278.0f, 0.0f, 10.0f, OBJ_SCENERY_95 }, { -154034.2f, -434.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -155834.2f, -434.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -157634.2f, -434.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -159434.2f, -434.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -161234.2f, -434.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -163034.2f, -434.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -164834.2f, -434.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -166634.2f, -434.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -168435.2f, -435.0f, 0.0f, 0.0f, OBJ_SCENERY_95 }, - { -170223.8f, -278.0f, 0.0f, 350.0f, OBJ_SCENERY_94 }, { -171996.6f, 34.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, - { -173785.4f, 191.0f, 0.0f, 0.0f, OBJ_SCENERY_96 }, { -175574.2f, 33.0f, 0.0f, 10.0f, OBJ_SCENERY_95 }, - { -177364.0f, -123.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -179164.9f, -122.0f, 0.0f, 0.0f, OBJ_SCENERY_95 }, - { -180954.4f, 32.0f, 0.0f, 350.0f, OBJ_SCENERY_94 }, { -182727.1f, 345.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, - { -184515.8f, 501.0f, 0.0f, 0.0f, OBJ_SCENERY_96 }, { -186304.5f, 344.0f, 0.0f, 10.0f, OBJ_SCENERY_94 }, - { -188077.7f, 30.0f, 0.0f, 10.0f, OBJ_SCENERY_95 }, { -189866.6f, -125.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -191667.3f, -125.0f, 0.0f, 0.0f, OBJ_SCENERY_95 }, { -193455.9f, 31.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, - { -195245.1f, 187.0f, 0.0f, 0.0f, OBJ_SCENERY_95 }, { -197033.7f, 344.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, - { -198823.2f, 500.0f, 0.0f, 0.0f, OBJ_SCENERY_96 }, { -200612.3f, 343.0f, 0.0f, 10.0f, OBJ_SCENERY_94 }, - { -202385.6f, 30.0f, 0.0f, 10.0f, OBJ_SCENERY_95 }, { -204175.1f, -125.0f, 0.0f, 0.0f, OBJ_SCENERY_96 }, - { -205964.3f, -282.0f, 0.0f, 10.0f, OBJ_SCENERY_95 }, { -207754.0f, -440.0f, 0.0f, 0.0f, OBJ_SCENERY_95 }, - { -209542.5f, -283.0f, 0.0f, 350.0f, OBJ_SCENERY_94 }, { -211315.1f, 29.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, - { -213104.5f, 185.0f, 0.0f, 0.0f, OBJ_SCENERY_96 }, { -214893.4f, 28.0f, 0.0f, 10.0f, OBJ_SCENERY_95 }, - { -216683.2f, -128.0f, 0.0f, 0.0f, OBJ_SCENERY_95 }, { -218471.8f, 28.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, - { -220261.3f, 184.0f, 0.0f, 0.0f, OBJ_SCENERY_96 }, { -222050.1f, 27.0f, 0.0f, 10.0f, OBJ_SCENERY_95 }, - { -223839.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -225639.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -227439.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -229239.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -231039.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -232839.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -234639.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -236439.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -238239.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -240039.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -241839.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -243639.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -245439.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -247239.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -249039.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -250839.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -252639.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -254439.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -256240.5f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -258040.5f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -259840.5f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -261640.5f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -263440.5f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -265240.5f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -267040.5f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -268840.5f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -507035.0f, -319.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { 0.0f, 0.0f, 0.0f, 0.0f, 0 }, + { 5174.4f, -2141.0f, 0.0f, 350.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { 3401.4f, -1828.0f, 0.0f, 350.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { 1627.8999f, -1515.0f, 0.0f, 350.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -145.0f, -1202.0f, 0.0f, 350.0f, OBJ_SCENERY_MA_TRAIN_TRACK_5 }, + { -1933.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -3733.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -5533.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -7333.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -9133.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -10933.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -12733.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -14533.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -16333.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -18133.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_4 }, + { -19921.6f, -889.0f, 0.0f, 350.0f, OBJ_SCENERY_MA_TRAIN_TRACK_4 }, + { -21656.4f, -423.0f, 0.0f, 340.0f, OBJ_SCENERY_MA_TRAIN_TRACK_5 }, + { -23390.7f, 40.0f, 0.0f, 350.0f, OBJ_SCENERY_MA_TRAIN_TRACK_5 }, + { -25125.0f, 197.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -26925.0f, 197.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_5 }, + { -28713.6f, 40.0f, 0.0f, 10.0f, OBJ_SCENERY_MA_TRAIN_TRACK_5 }, + { -30447.3f, -424.0f, 0.0f, 20.0f, OBJ_SCENERY_MA_TRAIN_TRACK_4 }, + { -32181.3f, -889.0f, 0.0f, 10.0f, OBJ_SCENERY_MA_TRAIN_TRACK_4 }, + { -33971.1f, -1045.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_9 }, + { -35771.1f, -1045.0f, 90.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_9 }, + { -37571.1f, -1045.0f, 180.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_9 }, + { -39371.1f, -1045.0f, 270.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_9 }, + { -41171.1f, -1045.0f, 360.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_9 }, + { -42971.1f, -1045.0f, 450.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_4 }, + { -44760.0f, -889.0f, 450.0f, 350.0f, OBJ_SCENERY_MA_TRAIN_TRACK_5 }, + { -46547.9f, -733.0f, 450.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -48347.5f, -733.0f, 450.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_4 }, + { -50136.4f, -576.0f, 450.0f, 350.0f, OBJ_SCENERY_MA_TRAIN_TRACK_4 }, + { -51872.1f, -111.0f, 450.0f, 340.0f, OBJ_SCENERY_MA_TRAIN_TRACK_5 }, + { -53606.4f, 352.0f, 450.0f, 350.0f, OBJ_SCENERY_MA_TRAIN_TRACK_5 }, + { -55395.4f, 509.0f, 450.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_5 }, + { -57184.2f, 353.0f, 450.0f, 10.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -58957.5f, 40.0f, 450.0f, 10.0f, OBJ_SCENERY_MA_TRAIN_TRACK_4 }, + { -60746.9f, -115.0f, 450.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -62548.2f, -114.0f, 450.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_10 }, + { -64349.1f, -114.0f, 360.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_10 }, + { -66149.3f, -115.0f, 270.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_10 }, + { -67950.3f, -115.0f, 180.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_10 }, + { -69751.2f, -115.0f, 90.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_10 }, + { -71551.2f, -115.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -73351.0f, -116.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_5 }, + { -75139.2f, -273.0f, 0.0f, 10.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -76912.4f, -587.0f, 0.0f, 10.0f, OBJ_SCENERY_MA_TRAIN_TRACK_4 }, + { -78702.0f, -743.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -80502.2f, -743.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -82302.2f, -743.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -84102.0f, -743.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_4 }, + { -85890.6f, -586.0f, 0.0f, 350.0f, OBJ_SCENERY_MA_TRAIN_TRACK_5 }, + { -87679.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -89479.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -91279.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -93079.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -94879.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -96680.0f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -98480.0f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -100280.0f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -102079.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -103879.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -105679.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -107479.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -109279.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -111079.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -112879.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -114679.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -116479.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -118279.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -120079.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -121879.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -123679.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -125479.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -127279.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_4 }, + { -129068.2f, -274.0f, 0.0f, 350.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -130841.2f, 38.0f, 0.0f, 350.0f, OBJ_SCENERY_MA_TRAIN_TRACK_5 }, + { -132630.4f, 194.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -134430.4f, 194.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_5 }, + { -136219.4f, 37.0f, 0.0f, 10.0f, OBJ_SCENERY_MA_TRAIN_TRACK_4 }, + { -138009.0f, -119.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_5 }, + { -139798.6f, -277.0f, 0.0f, 10.0f, OBJ_SCENERY_MA_TRAIN_TRACK_4 }, + { -141587.6f, -433.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_4 }, + { -143376.3f, -276.0f, 0.0f, 350.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -145149.0f, 35.0f, 0.0f, 350.0f, OBJ_SCENERY_MA_TRAIN_TRACK_5 }, + { -146883.3f, 192.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -148683.3f, 192.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_5 }, + { -150471.9f, 34.0f, 0.0f, 10.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -152244.8f, -278.0f, 0.0f, 10.0f, OBJ_SCENERY_MA_TRAIN_TRACK_4 }, + { -154034.2f, -434.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -155834.2f, -434.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -157634.2f, -434.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -159434.2f, -434.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -161234.2f, -434.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -163034.2f, -434.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -164834.2f, -434.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -166634.2f, -434.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -168435.2f, -435.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_4 }, + { -170223.8f, -278.0f, 0.0f, 350.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -171996.6f, 34.0f, 0.0f, 350.0f, OBJ_SCENERY_MA_TRAIN_TRACK_5 }, + { -173785.4f, 191.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_5 }, + { -175574.2f, 33.0f, 0.0f, 10.0f, OBJ_SCENERY_MA_TRAIN_TRACK_4 }, + { -177364.0f, -123.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -179164.9f, -122.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_4 }, + { -180954.4f, 32.0f, 0.0f, 350.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -182727.1f, 345.0f, 0.0f, 350.0f, OBJ_SCENERY_MA_TRAIN_TRACK_5 }, + { -184515.8f, 501.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_5 }, + { -186304.5f, 344.0f, 0.0f, 10.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -188077.7f, 30.0f, 0.0f, 10.0f, OBJ_SCENERY_MA_TRAIN_TRACK_4 }, + { -189866.6f, -125.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -191667.3f, -125.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_4 }, + { -193455.9f, 31.0f, 0.0f, 350.0f, OBJ_SCENERY_MA_TRAIN_TRACK_5 }, + { -195245.1f, 187.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_4 }, + { -197033.7f, 344.0f, 0.0f, 350.0f, OBJ_SCENERY_MA_TRAIN_TRACK_5 }, + { -198823.2f, 500.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_5 }, + { -200612.3f, 343.0f, 0.0f, 10.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -202385.6f, 30.0f, 0.0f, 10.0f, OBJ_SCENERY_MA_TRAIN_TRACK_4 }, + { -204175.1f, -125.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_5 }, + { -205964.3f, -282.0f, 0.0f, 10.0f, OBJ_SCENERY_MA_TRAIN_TRACK_4 }, + { -207754.0f, -440.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_4 }, + { -209542.5f, -283.0f, 0.0f, 350.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -211315.1f, 29.0f, 0.0f, 350.0f, OBJ_SCENERY_MA_TRAIN_TRACK_5 }, + { -213104.5f, 185.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_5 }, + { -214893.4f, 28.0f, 0.0f, 10.0f, OBJ_SCENERY_MA_TRAIN_TRACK_4 }, + { -216683.2f, -128.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_4 }, + { -218471.8f, 28.0f, 0.0f, 350.0f, OBJ_SCENERY_MA_TRAIN_TRACK_5 }, + { -220261.3f, 184.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_5 }, + { -222050.1f, 27.0f, 0.0f, 10.0f, OBJ_SCENERY_MA_TRAIN_TRACK_4 }, + { -223839.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -225639.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -227439.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -229239.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -231039.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -232839.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -234639.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -236439.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -238239.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -240039.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -241839.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -243639.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -245439.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -247239.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -249039.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -250839.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -252639.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -254439.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -256240.5f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -258040.5f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -259840.5f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -261640.5f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -263440.5f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -265240.5f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -267040.5f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -268840.5f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -507035.0f, -319.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, }; static UnkStruct_D_i5_801B8E50 D_i5_801B9A80[86] = { - { 5174.4f, -2141.0f, 0.0f, 350.0f, OBJ_SCENERY_94 }, { 3401.4f, -1828.0f, 0.0f, 350.0f, OBJ_SCENERY_94 }, - { 1627.8999f, -1515.0f, 0.0f, 350.0f, OBJ_SCENERY_94 }, { -145.0f, -1202.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, - { -1933.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -3733.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -5533.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -7333.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -9133.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -10933.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -12733.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -14533.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -16333.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -18133.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_95 }, - { -19921.6f, -889.0f, 0.0f, 350.0f, OBJ_SCENERY_95 }, { -21656.4f, -423.0f, 0.0f, 340.0f, OBJ_SCENERY_96 }, - { -23390.7f, 40.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, { -25125.0f, 197.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -26925.0f, 197.0f, 0.0f, 0.0f, OBJ_SCENERY_96 }, { -28713.6f, 40.0f, 0.0f, 10.0f, OBJ_SCENERY_96 }, - { -30447.3f, -424.0f, 0.0f, 20.0f, OBJ_SCENERY_95 }, { -32181.3f, -889.0f, 0.0f, 10.0f, OBJ_SCENERY_95 }, - { -33971.1f, -1045.0f, 0.0f, 0.0f, OBJ_SCENERY_100 }, { -35771.1f, -1045.0f, 90.0f, 0.0f, OBJ_SCENERY_100 }, - { -37571.1f, -1045.0f, 180.0f, 0.0f, OBJ_SCENERY_100 }, { -39371.1f, -1045.0f, 270.0f, 0.0f, OBJ_SCENERY_100 }, - { -41171.1f, -1045.0f, 360.0f, 0.0f, OBJ_SCENERY_100 }, { -42971.1f, -1045.0f, 450.0f, 0.0f, OBJ_SCENERY_95 }, - { -44760.0f, -889.0f, 450.0f, 350.0f, OBJ_SCENERY_96 }, { -46547.9f, -733.0f, 450.0f, 0.0f, OBJ_SCENERY_94 }, - { -48347.5f, -733.0f, 450.0f, 0.0f, OBJ_SCENERY_95 }, { -50136.4f, -576.0f, 450.0f, 350.0f, OBJ_SCENERY_95 }, - { -51872.1f, -111.0f, 450.0f, 340.0f, OBJ_SCENERY_96 }, { -53606.4f, 352.0f, 450.0f, 350.0f, OBJ_SCENERY_96 }, - { -55395.4f, 509.0f, 450.0f, 0.0f, OBJ_SCENERY_96 }, { -57184.2f, 353.0f, 450.0f, 10.0f, OBJ_SCENERY_94 }, - { -58957.5f, 40.0f, 450.0f, 10.0f, OBJ_SCENERY_95 }, { -60746.9f, -115.0f, 450.0f, 0.0f, OBJ_SCENERY_94 }, - { -62548.2f, -114.0f, 450.0f, 0.0f, OBJ_SCENERY_101 }, { -64349.1f, -114.0f, 360.0f, 0.0f, OBJ_SCENERY_101 }, - { -66149.3f, -115.0f, 270.0f, 0.0f, OBJ_SCENERY_101 }, { -67950.3f, -115.0f, 180.0f, 0.0f, OBJ_SCENERY_101 }, - { -69751.2f, -115.0f, 90.0f, 0.0f, OBJ_SCENERY_101 }, { -71551.2f, -115.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -73351.0f, -116.0f, 0.0f, 0.0f, OBJ_SCENERY_96 }, { -75139.2f, -273.0f, 0.0f, 10.0f, OBJ_SCENERY_94 }, - { -76912.4f, -587.0f, 0.0f, 10.0f, OBJ_SCENERY_95 }, { -78702.0f, -743.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -80502.2f, -743.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -82302.2f, -743.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -84102.0f, -743.0f, 0.0f, 0.0f, OBJ_SCENERY_95 }, { -85890.6f, -586.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, - { -87679.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -89479.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -91279.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -93079.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -94879.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -96680.0f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -98480.0f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -100280.0f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -102079.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -103879.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -105679.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -107479.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -109279.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -111079.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, - { -112879.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -114679.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_104 }, - { -116453.5f, -118.0f, 0.0f, 350.0f, OBJ_SCENERY_98 }, { -118188.5f, 346.0f, 0.0f, 340.0f, OBJ_SCENERY_98 }, - { -119815.5f, 1105.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, { -121374.3f, 2005.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, - { -122933.3f, 2905.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, { -124491.9f, 3806.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, - { -126051.4f, 4707.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, { -127609.9f, 5607.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, - { -129168.9f, 6507.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, { -130728.1f, 7408.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, - { -132287.2f, 8308.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, { -133846.4f, 9208.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, - { -135405.4f, 10109.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, { -136964.0f, 11009.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, - { -138522.9f, 11909.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, { -140082.1f, 12810.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, - { -507035.0f, -489.0f, 0.0f, 0.0f, OBJ_SCENERY_97 }, { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f }, + { 5174.4f, -2141.0f, 0.0f, 350.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { 3401.4f, -1828.0f, 0.0f, 350.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { 1627.8999f, -1515.0f, 0.0f, 350.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -145.0f, -1202.0f, 0.0f, 350.0f, OBJ_SCENERY_MA_TRAIN_TRACK_5 }, + { -1933.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -3733.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -5533.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -7333.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -9133.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -10933.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -12733.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -14533.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -16333.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -18133.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_4 }, + { -19921.6f, -889.0f, 0.0f, 350.0f, OBJ_SCENERY_MA_TRAIN_TRACK_4 }, + { -21656.4f, -423.0f, 0.0f, 340.0f, OBJ_SCENERY_MA_TRAIN_TRACK_5 }, + { -23390.7f, 40.0f, 0.0f, 350.0f, OBJ_SCENERY_MA_TRAIN_TRACK_5 }, + { -25125.0f, 197.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -26925.0f, 197.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_5 }, + { -28713.6f, 40.0f, 0.0f, 10.0f, OBJ_SCENERY_MA_TRAIN_TRACK_5 }, + { -30447.3f, -424.0f, 0.0f, 20.0f, OBJ_SCENERY_MA_TRAIN_TRACK_4 }, + { -32181.3f, -889.0f, 0.0f, 10.0f, OBJ_SCENERY_MA_TRAIN_TRACK_4 }, + { -33971.1f, -1045.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_9 }, + { -35771.1f, -1045.0f, 90.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_9 }, + { -37571.1f, -1045.0f, 180.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_9 }, + { -39371.1f, -1045.0f, 270.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_9 }, + { -41171.1f, -1045.0f, 360.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_9 }, + { -42971.1f, -1045.0f, 450.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_4 }, + { -44760.0f, -889.0f, 450.0f, 350.0f, OBJ_SCENERY_MA_TRAIN_TRACK_5 }, + { -46547.9f, -733.0f, 450.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -48347.5f, -733.0f, 450.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_4 }, + { -50136.4f, -576.0f, 450.0f, 350.0f, OBJ_SCENERY_MA_TRAIN_TRACK_4 }, + { -51872.1f, -111.0f, 450.0f, 340.0f, OBJ_SCENERY_MA_TRAIN_TRACK_5 }, + { -53606.4f, 352.0f, 450.0f, 350.0f, OBJ_SCENERY_MA_TRAIN_TRACK_5 }, + { -55395.4f, 509.0f, 450.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_5 }, + { -57184.2f, 353.0f, 450.0f, 10.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -58957.5f, 40.0f, 450.0f, 10.0f, OBJ_SCENERY_MA_TRAIN_TRACK_4 }, + { -60746.9f, -115.0f, 450.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -62548.2f, -114.0f, 450.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_10 }, + { -64349.1f, -114.0f, 360.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_10 }, + { -66149.3f, -115.0f, 270.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_10 }, + { -67950.3f, -115.0f, 180.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_10 }, + { -69751.2f, -115.0f, 90.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_10 }, + { -71551.2f, -115.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -73351.0f, -116.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_5 }, + { -75139.2f, -273.0f, 0.0f, 10.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -76912.4f, -587.0f, 0.0f, 10.0f, OBJ_SCENERY_MA_TRAIN_TRACK_4 }, + { -78702.0f, -743.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -80502.2f, -743.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -82302.2f, -743.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -84102.0f, -743.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_4 }, + { -85890.6f, -586.0f, 0.0f, 350.0f, OBJ_SCENERY_MA_TRAIN_TRACK_5 }, + { -87679.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -89479.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -91279.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -93079.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -94879.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -96680.0f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -98480.0f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -100280.0f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -102079.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -103879.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -105679.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -107479.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -109279.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -111079.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -112879.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, + { -114679.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_SWITCH_TRACK }, + { -116453.5f, -118.0f, 0.0f, 350.0f, OBJ_SCENERY_MA_TRAIN_TRACK_7 }, + { -118188.5f, 346.0f, 0.0f, 340.0f, OBJ_SCENERY_MA_TRAIN_TRACK_7 }, + { -119815.5f, 1105.0f, 0.0f, 330.0f, OBJ_SCENERY_MA_TRAIN_TRACK_6 }, + { -121374.3f, 2005.0f, 0.0f, 330.0f, OBJ_SCENERY_MA_TRAIN_TRACK_6 }, + { -122933.3f, 2905.0f, 0.0f, 330.0f, OBJ_SCENERY_MA_TRAIN_TRACK_6 }, + { -124491.9f, 3806.0f, 0.0f, 330.0f, OBJ_SCENERY_MA_TRAIN_TRACK_6 }, + { -126051.4f, 4707.0f, 0.0f, 330.0f, OBJ_SCENERY_MA_TRAIN_TRACK_6 }, + { -127609.9f, 5607.0f, 0.0f, 330.0f, OBJ_SCENERY_MA_TRAIN_TRACK_6 }, + { -129168.9f, 6507.0f, 0.0f, 330.0f, OBJ_SCENERY_MA_TRAIN_TRACK_6 }, + { -130728.1f, 7408.0f, 0.0f, 330.0f, OBJ_SCENERY_MA_TRAIN_TRACK_6 }, + { -132287.2f, 8308.0f, 0.0f, 330.0f, OBJ_SCENERY_MA_TRAIN_TRACK_6 }, + { -133846.4f, 9208.0f, 0.0f, 330.0f, OBJ_SCENERY_MA_TRAIN_TRACK_6 }, + { -135405.4f, 10109.0f, 0.0f, 330.0f, OBJ_SCENERY_MA_TRAIN_TRACK_6 }, + { -136964.0f, 11009.0f, 0.0f, 330.0f, OBJ_SCENERY_MA_TRAIN_TRACK_6 }, + { -138522.9f, 11909.0f, 0.0f, 330.0f, OBJ_SCENERY_MA_TRAIN_TRACK_6 }, + { -140082.1f, 12810.0f, 0.0f, 330.0f, OBJ_SCENERY_MA_TRAIN_TRACK_6 }, + { -507035.0f, -489.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_6 }, }; static UnkStruct_D_i5_801B8E50 D_i5_801BA138[8] = { @@ -196,7 +315,7 @@ static UnkStruct_D_i5_801B8E50 D_i5_801BA138[8] = { static u8 D_i5_801BA1D8 = 0; -static f32 D_i5_801BA1DC = 0.0f; +static f32 sMaTrainSpeedTarget = 0.0f; static f32 D_i5_801BA1E0 = 10000000.0f; static u8 D_i5_801BA1E4 = 0; u8 D_MA_801BA1E8 = 0; @@ -245,10 +364,10 @@ static f32 D_i5_801BA638[5][10] = { static f32 D_i5_801BA700[] = { 610.0f, 0.0f }; // unused? -void Macbeth_80199920(void) { +void Macbeth_InitLevel(void) { s16 i; - D_i5_801BA1DC = -15.0f; + sMaTrainSpeedTarget = -15.0f; D_MA_801BE2F0[0] = 0; D_MA_801BE2F0[1] = 999; D_MA_801BE2F0[2] = 0; @@ -265,6 +384,7 @@ void Macbeth_80199920(void) { D_i5_801BE312 = 0; D_i5_801BE313 = 1; D_i5_801BA1D8 = 0; + Graphics_ClearPrintBuffer(D_i5_801BE308, 0, 8); for (i = 0; i < 35; i++) { @@ -276,232 +396,245 @@ void Macbeth_80199920(void) { } } -void Macbeth_80199A40(u8* arg0, u8* arg1, f32 arg2) { - s32 pad; +/* 32 x 32 pixels texture rotation */ +void Macbeth_Texture_RotateZ(u8* destTex, u8* srcTex, f32 angle) { s32 i; s32 j; - f32 var_fs0; - f32 var_fs4; - s32 temp_ft2; - s32 temp_ft5; - Vec3f sp80; - Vec3f sp74; + s32 xDest; + s32 yDest; + Vec3f var_fs0; + Vec3f dest; + Vec3f src; Matrix_Push(&gCalcMatrix); - arg0 = SEGMENTED_TO_VIRTUAL(arg0); - arg1 = SEGMENTED_TO_VIRTUAL(arg1); - Matrix_RotateZ(gCalcMatrix, M_DTOR * arg2, MTXF_NEW); - sp74.z = 0.0f; - for (i = 0, var_fs4 = 0.0f; i < 32; i++, var_fs4++) { - for (j = 0, var_fs0 = 0.0f; j < 32; j++, var_fs0++) { - sp74.y = var_fs4 - 16.0f; - sp74.x = var_fs0 - 16.0f; - Matrix_MultVec3f(gCalcMatrix, &sp74, &sp80); - temp_ft5 = (s32) (sp80.x + 16.0f); - temp_ft2 = (s32) (sp80.y + 16.0f); - if ((temp_ft5 >= 0) && (temp_ft5 < 32) && (temp_ft2 >= 0) && (temp_ft2 < 32)) { - arg0[temp_ft5 + (temp_ft2 << 5)] = arg1[(i << 5) + j]; + + destTex = SEGMENTED_TO_VIRTUAL(destTex); + srcTex = SEGMENTED_TO_VIRTUAL(srcTex); + + Matrix_RotateZ(gCalcMatrix, M_DTOR * angle, MTXF_NEW); + + src.z = 0.0f; + + for (i = 0, var_fs0.y = 0.0f; i < 32; i++, var_fs0.y++) { + for (j = 0, var_fs0.x = 0.0f; j < 32; j++, var_fs0.x++) { + src.y = var_fs0.y - 16.0f; + src.x = var_fs0.x - 16.0f; + + Matrix_MultVec3f(gCalcMatrix, &src, &dest); + + xDest = (s32) (dest.x + 16.0f); + yDest = (s32) (dest.y + 16.0f); + + if ((xDest >= 0) && (xDest < 32) && (yDest >= 0) && (yDest < 32)) { + destTex[xDest + (yDest << 5)] = srcTex[(i << 5) + j]; } } } Matrix_Pop(&gCalcMatrix); } -void Macbeth_80199C20(u8* arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) { - u8* temp_v1; +void Macbeth_Texture_Scroll(u8* tex, s32 arg1, s32 arg2, s32 arg3, s32 arg4) { + u8* texPtr = SEGMENTED_TO_VIRTUAL(tex); s32 i; s32 j; u8 a; u8 b; - temp_v1 = SEGMENTED_TO_VIRTUAL(arg0); - for (i = arg3; i < arg3 + arg4; i++) { - b = temp_v1[i]; - a = temp_v1[i + arg1]; + b = texPtr[i]; + a = texPtr[i + arg1]; + for (j = 1; j < arg2; j += 2) { - temp_v1[arg1 * (j - 1) + i] = temp_v1[arg1 * (j + 1) + i]; - temp_v1[arg1 * j + i] = temp_v1[arg1 * (j + 2) + i]; + texPtr[arg1 * (j - 1) + i] = texPtr[arg1 * (j + 1) + i]; + texPtr[arg1 * j + i] = texPtr[arg1 * (j + 2) + i]; } - temp_v1[((arg2 - 2) * arg1) + i] = b; - temp_v1[((arg2 - 1) * arg1) + i] = a; + texPtr[((arg2 - 2) * arg1) + i] = b; + texPtr[((arg2 - 1) * arg1) + i] = a; } } -void Macbeth_80199D88(u16* arg0, s32 arg1, s32 arg2) { - u16* temp_t1; +void Macbeth_Texture_Scroll2(u16* tex, s32 arg1, s32 arg2) { + u16* texPtr = SEGMENTED_TO_VIRTUAL(tex); u16 a; s32 i; s32 j; - temp_t1 = SEGMENTED_TO_VIRTUAL(arg0); - for (i = 0; i < arg1; i++) { - a = temp_t1[(arg2 - 1) * arg1 + i]; + a = texPtr[(arg2 - 1) * arg1 + i]; for (j = arg2; j > 0; j--) { - temp_t1[j * arg1 + i] = temp_t1[(j - 1) * arg1 + i]; + texPtr[j * arg1 + i] = texPtr[(j - 1) * arg1 + i]; } - temp_t1[i] = a; + texPtr[i] = a; } } -void Macbeth_80199F8C(Actor* actor) { - actor->state = 0; - actor->iwork[1] = 0; - actor->iwork[2] = 0; - actor->iwork[3] = 0; - actor->iwork[4] = 0; - actor->iwork[5] = D_i5_801BA1E4; - actor->iwork[7] = 0; - actor->iwork[8] = 0; - actor->iwork[9] = 0; - actor->iwork[10] = 0; - switch (actor->obj.id) { - case OBJ_ACTOR_205: - actor->health = 50; - D_i5_801BE314 = actor->index; +void Macbeth_Train_Init(Actor* this) { + this->state = 0; + this->iwork[1] = 0; + this->iwork[2] = 0; + this->iwork[3] = 0; + this->iwork[4] = 0; + this->iwork[5] = D_i5_801BA1E4; + this->iwork[7] = 0; + this->iwork[8] = 0; + this->iwork[9] = 0; + this->iwork[10] = 0; + + switch (this->obj.id) { + case OBJ_ACTOR_MA_LOCOMOTIVE: + this->health = 50; + D_i5_801BE314 = this->index; break; case OBJ_ACTOR_207: - actor->health = 250; - D_i5_801BE316 = actor->index; + this->health = 250; + D_i5_801BE316 = this->index; break; - case OBJ_ACTOR_208: - actor->health = 20; + case OBJ_ACTOR_MA_TRAIN_CAR_2: + this->health = 20; /* fallthrough */ - case OBJ_ACTOR_209: - actor->health = 20; + case OBJ_ACTOR_MA_TRAIN_CAR_3: + this->health = 20; break; - case OBJ_ACTOR_211: - actor->health = 20; + case OBJ_ACTOR_MA_TRAIN_CAR_5: + this->health = 20; break; - case OBJ_ACTOR_212: - actor->health = 200; + case OBJ_ACTOR_MA_TRAIN_CAR_6: + this->health = 200; break; - case OBJ_ACTOR_213: - actor->health = 80; + case OBJ_ACTOR_MA_TRAIN_CAR_7: + this->health = 80; break; - case OBJ_ACTOR_210: - actor->health = 160; + case OBJ_ACTOR_MA_TRAIN_CAR_4: + this->health = 160; default: break; } - actor->iwork[12] = 20; - actor->iwork[13] = 0; - actor->iwork[14] = 0; - actor->iwork[16] = 20; - actor->iwork[17] = 0; - actor->iwork[18] = 0; - actor->iwork[20] = 20; - actor->iwork[21] = 0; - actor->iwork[22] = 0; - actor->iwork[23] = 0; - actor->iwork[24] = 0; - actor->iwork[11] = actor->health; - actor->iwork[15] = actor->health; - actor->iwork[19] = actor->health; - actor->fwork[1] = 0.0f; - actor->fwork[5] = 0.0f; - actor->fwork[6] = 0.0f; - actor->fwork[7] = 0.0f; - actor->fwork[8] = 0.0f; - actor->fwork[9] = 0.0f; - actor->fwork[10] = 0.0f; - actor->fwork[11] = 0.0f; - actor->fwork[12] = 0.0f; - actor->fwork[13] = 0.0f; - actor->fwork[14] = 0.0f; - actor->fwork[15] = 0.0f; - actor->fwork[16] = 0.0f; - actor->fwork[17] = 0.0f; - actor->fwork[18] = 0.0f; - actor->fwork[19] = 0.0f; - actor->fwork[20] = 0.0f; - actor->fwork[21] = 0.0f; - actor->fwork[22] = 0.0f; - actor->fwork[23] = 0.0f; - actor->fwork[24] = 0.0f; - actor->fwork[25] = 0.0f; - actor->fwork[26] = 0.0f; - actor->fwork[27] = 0.0f; - actor->fwork[28] = 0.0f; - actor->fwork[29] = 0.0f; + this->iwork[12] = 20; + this->iwork[13] = 0; + this->iwork[14] = 0; + this->iwork[16] = 20; + this->iwork[17] = 0; + this->iwork[18] = 0; + this->iwork[20] = 20; + this->iwork[21] = 0; + this->iwork[22] = 0; + this->iwork[23] = 0; + this->iwork[24] = 0; + this->iwork[11] = this->health; + this->iwork[15] = this->health; + this->iwork[19] = this->health; + this->fwork[1] = 0.0f; + this->fwork[5] = 0.0f; + this->fwork[6] = 0.0f; + this->fwork[7] = 0.0f; + this->fwork[8] = 0.0f; + this->fwork[9] = 0.0f; + this->fwork[10] = 0.0f; + this->fwork[11] = 0.0f; + this->fwork[12] = 0.0f; + this->fwork[13] = 0.0f; + this->fwork[14] = 0.0f; + this->fwork[15] = 0.0f; + this->fwork[16] = 0.0f; + this->fwork[17] = 0.0f; + this->fwork[18] = 0.0f; + this->fwork[19] = 0.0f; + this->fwork[20] = 0.0f; + this->fwork[21] = 0.0f; + this->fwork[22] = 0.0f; + this->fwork[23] = 0.0f; + this->fwork[24] = 0.0f; + this->fwork[25] = 0.0f; + this->fwork[26] = 0.0f; + this->fwork[27] = 0.0f; + this->fwork[28] = 0.0f; + this->fwork[29] = 0.0f; D_i5_801BA1E4++; } -void Macbeth_8019A128(void) { - Macbeth_80199C20(D_MA_6023228, 16, 16, 0, 8); - Macbeth_80199A40(D_MA_6023388, D_Tex_800DB4B8, gGameFrameCount * -20.0f); +void Macbeth_RotateTrainWheels(void) { + Macbeth_Texture_Scroll(D_MA_6023228, 16, 16, 0, 8); + Macbeth_Texture_RotateZ(D_MA_6023388, D_Tex_800DB4B8, gGameFrameCount * -20.0f); } -void Macbeth_8019A198(Actor* actor) { - if ((actor->iwork[5] >= D_i5_801BA1E4) || (actor->iwork[5] >= D_MA_801BE2F0[3])) { - Math_SmoothStepToF(&actor->vel.z, 0.0f, 0.02f, 10.0f, 0.01f); +void Macbeth_8019A198(Actor* this) { + if ((this->iwork[5] >= D_i5_801BA1E4) || (this->iwork[5] >= D_MA_801BE2F0[3])) { + Math_SmoothStepToF(&this->vel.z, 0.0f, 0.02f, 10.0f, 0.01f); } else { - actor->vel.z = D_i5_801BA1DC; - if ((actor->iwork[5] == D_MA_801BE2F0[3] - 1) || (actor->iwork[5] == D_i5_801BA1E4 - 1)) { - if (D_i5_801BE310 != actor->iwork[5]) { - if (actor->vel.z > -6.0f) { + this->vel.z = sMaTrainSpeedTarget; + if ((this->iwork[5] == D_MA_801BE2F0[3] - 1) || (this->iwork[5] == D_i5_801BA1E4 - 1)) { + if (D_i5_801BE310 != this->iwork[5]) { + if (this->vel.z > -6.0f) { Audio_SetSfxSpeedModulation(-6.0f); } else { - Audio_SetSfxSpeedModulation(actor->vel.z); + Audio_SetSfxSpeedModulation(this->vel.z); } - Audio_PlaySfxModulated(actor->sfxSource, NA_SE_EN_FREIGHT_TRAIN); - D_i5_801BE310 = actor->iwork[5]; + Audio_PlaySfxModulated(this->sfxSource, NA_SE_EN_FREIGHT_TRAIN); + D_i5_801BE310 = this->iwork[5]; } - D_i5_801BA1E0 = actor->obj.pos.z; + + D_i5_801BA1E0 = this->obj.pos.z; + if (D_i5_801BE313 != 0) { - if (actor->vel.z > -6.0f) { + if (this->vel.z > -6.0f) { Audio_SetSfxSpeedModulation(-6.0f); } else { - Audio_SetSfxSpeedModulation(actor->vel.z); + Audio_SetSfxSpeedModulation(this->vel.z); } } } } } -void Macbeth_8019A2F4(Actor* actor) { +void Macbeth_8019A2F4(MaLocomotive* this) { f32 var_fa1 = 0.0f; f32 var_ft4 = 0.0f; - u8 var_v0; - s32 var_a0; + u8 i; + s32 j; - for (var_v0 = D_MA_801BE2F0[0]; D_i5_801BA1EC[var_v0].unk_00 != -1.0f; var_v0++) { - if (D_i5_801BA1EC[var_v0].unk_00 < gPlayer[0].trueZpos) { - var_a0 = var_v0; - if (var_v0 == 0) { - var_a0 = 1; + for (i = D_MA_801BE2F0[0]; D_i5_801BA1EC[i].unk_00 != -1.0f; i++) { + if (D_i5_801BA1EC[i].unk_00 < gPlayer[0].trueZpos) { + j = i; + if (i == 0) { + j = 1; } - D_MA_801BE2F0[0] = var_a0; - if (D_i5_801BA1E4 != D_i5_801BA1EC[var_a0 - 1].unk_04) { - AUDIO_PLAY_SFX(NA_SE_OB_CONNECT_CUT, actor->sfxSource, 0); + + D_MA_801BE2F0[0] = j; + + if (D_i5_801BA1E4 != D_i5_801BA1EC[j - 1].unk_04) { + AUDIO_PLAY_SFX(NA_SE_OB_CONNECT_CUT, this->sfxSource, 0); } - D_i5_801BA1E4 = D_i5_801BA1EC[var_a0 - 1].unk_04; - var_fa1 = D_i5_801BA1EC[var_a0 - 1].unk_08; - var_ft4 = D_i5_801BA1EC[var_a0 - 1].unk_0C; - D_MA_801BE2F0[4] = D_i5_801BA1EC[var_a0 - 1].unk_10; - if (D_i5_801BA1EC[var_a0 - 1].unk_10 >= 300) { - D_i5_801BE320[18] = (D_i5_801BA1EC[var_a0 - 1].unk_10 - 300); - } else if (D_i5_801BA1EC[var_a0 - 1].unk_10 == 200) { + + D_i5_801BA1E4 = D_i5_801BA1EC[j - 1].unk_04; + + var_fa1 = D_i5_801BA1EC[j - 1].unk_08; + var_ft4 = D_i5_801BA1EC[j - 1].unk_0C; + + D_MA_801BE2F0[4] = D_i5_801BA1EC[j - 1].unk_10; + + if (D_i5_801BA1EC[j - 1].unk_10 >= 300) { + D_i5_801BE320[18] = (D_i5_801BA1EC[j - 1].unk_10 - 300); + } else if (D_i5_801BA1EC[j - 1].unk_10 == 200) { if (D_i5_801BE320[16] == 0) { D_i5_801BE320[16] = 1; } - } else if (D_i5_801BA1EC[var_a0 - 1].unk_10 == 201) { + } else if (D_i5_801BA1EC[j - 1].unk_10 == 201) { D_i5_801BE320[17] = 1; - } else if (D_i5_801BA1EC[var_a0 - 1].unk_10 == 202) { + } else if (D_i5_801BA1EC[j - 1].unk_10 == 202) { D_i5_801BE320[26] = 0; - } else if (D_i5_801BA1EC[var_a0 - 1].unk_10 == 203) { + } else if (D_i5_801BA1EC[j - 1].unk_10 == 203) { D_i5_801BE320[26] = 1; - } else if (D_i5_801BA1EC[var_a0 - 1].unk_10 >= 100) { - D_MA_801BA1E8 = D_i5_801BA1EC[var_a0 - 1].unk_10; + } else if (D_i5_801BA1EC[j - 1].unk_10 >= 100) { + D_MA_801BA1E8 = D_i5_801BA1EC[j - 1].unk_10; } break; } } + if (D_i5_801BE320[16] != 0) { switch (D_i5_801BE320[19]) { case 0: @@ -514,243 +647,250 @@ void Macbeth_8019A2F4(Actor* actor) { break; } } + if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) { - if (var_fa1 < (gPlayer[0].trueZpos - actor->obj.pos.z - (D_i5_801BA1E4 * 1416 - 1416))) { - Math_SmoothStepToF(&D_i5_801BA1DC, -6.0f, 0.1f, 0.2f, 0.01f); + if (var_fa1 < (gPlayer[0].trueZpos - this->obj.pos.z - (D_i5_801BA1E4 * 1416 - 1416))) { + Math_SmoothStepToF(&sMaTrainSpeedTarget, -6.0f, 0.1f, 0.2f, 0.01f); } - if ((gPlayer[0].trueZpos - actor->obj.pos.z - (D_i5_801BA1E4 * 1416 - 1416)) < var_ft4) { - Math_SmoothStepToF(&D_i5_801BA1DC, -30.0f, 0.1f, 0.2f, 0.01f); + + if ((gPlayer[0].trueZpos - this->obj.pos.z - (D_i5_801BA1E4 * 1416 - 1416)) < var_ft4) { + Math_SmoothStepToF(&sMaTrainSpeedTarget, -30.0f, 0.1f, 0.2f, 0.01f); } - if ((D_i5_801BA1E4 < 5) && (gPlayer[0].trueZpos - actor->obj.pos.z > 4000.0f)) { - Math_SmoothStepToF(&D_i5_801BA1DC, 0.0f, 0.1f, 1.0f, 0.01f); + + if ((D_i5_801BA1E4 < 5) && (gPlayer[0].trueZpos - this->obj.pos.z > 4000.0f)) { + Math_SmoothStepToF(&sMaTrainSpeedTarget, 0.0f, 0.1f, 1.0f, 0.01f); } - if (gPlayer[0].trueZpos - actor->obj.pos.z > 25000.0f) { - D_i5_801BA1DC = 0.0f; + + if (gPlayer[0].trueZpos - this->obj.pos.z > 25000.0f) { + sMaTrainSpeedTarget = 0.0f; } - if (gPlayer[0].trueZpos - actor->obj.pos.z < -8000.0f) { - D_i5_801BA1DC = -200.0f; + if (gPlayer[0].trueZpos - this->obj.pos.z < -8000.0f) { + sMaTrainSpeedTarget = -200.0f; } } } -void Macbeth_8019A728(Actor* actor) { - f32 var_fv0; - u32 var_v1; - u8 var_v0; +void Macbeth_8019A728(Actor* this) { + u8 i; + u32 j; - for (var_v0 = actor->iwork[2]; D_i5_801BA1EC[var_v0].unk_00 != -1.0f; var_v0++) { - if (D_i5_801BA1EC[var_v0].unk_00 < actor->obj.pos.z) { - var_v1 = var_v0; - if (var_v0 == 0) { - var_v1 = 1; + for (i = this->iwork[2]; D_i5_801BA1EC[i].unk_00 != -1.0f; i++) { + if (D_i5_801BA1EC[i].unk_00 < this->obj.pos.z) { + j = i; + if (i == 0) { + j = 1; } - actor->iwork[2] = var_v1; - if ((D_i5_801BA1EC[var_v1 - 1].unk_10 == actor->iwork[5]) && (actor->iwork[1] == 0)) { - if (actor->obj.id == OBJ_ACTOR_212) { - actor->timer_0BC = 30; + this->iwork[2] = j; + + if ((D_i5_801BA1EC[j - 1].unk_10 == this->iwork[5]) && (this->iwork[1] == 0)) { + if (this->obj.id == OBJ_ACTOR_MA_TRAIN_CAR_6) { + this->timer_0BC = 30; Radio_PlayMessage(gMsg_ID_17476, RCID_BOSS_MACBETH); } - actor->iwork[1] = 1; + this->iwork[1] = 1; } break; } } } -void Macbeth_8019A830(Actor* actor) { - if ((gPlayer[0].trueZpos - actor->obj.pos.z) < -20000.0f) { - Object_Kill(&actor->obj, actor->sfxSource); +void Macbeth_8019A830(Actor* this) { + if ((gPlayer[0].trueZpos - this->obj.pos.z) < -20000.0f) { + Object_Kill(&this->obj, this->sfxSource); } } -void Macbeth_8019A87C(Actor* actor) { - if ((gPlayer[0].trueZpos - actor->obj.pos.z) < -2000.0f) { - Object_Kill(&actor->obj, actor->sfxSource); +void Macbeth_8019A87C(Actor* this) { + if ((gPlayer[0].trueZpos - this->obj.pos.z) < -2000.0f) { + Object_Kill(&this->obj, this->sfxSource); } } -void Macbeth_8019A8C8(Actor* actor, s16 arg1) { +void Macbeth_8019A8C8(Actor* this, s16 arg1) { s32 i; - func_effect_8007BFFC(actor->obj.pos.x + actor->fwork[25], actor->obj.pos.y + 290.0f, actor->obj.pos.z, 0.0f, 0.0f, - 0.0f, 22.0f, 5); + Effect386_Spawn1(this->obj.pos.x + this->fwork[25], this->obj.pos.y + 290.0f, this->obj.pos.z, 0.0f, 0.0f, 0.0f, + 22.0f, 5); for (i = 0; i < 10; i++) { - Macbeth_801AD624(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[21], - actor->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f), - actor->obj.pos.z - 420.0f + RAND_FLOAT(50.0f), RAND_FLOAT_CENTERED(10.0f), - RAND_FLOAT(7.0f) + 7.0f, RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), - RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), - RAND_FLOAT_CENTERED(30.0f), (s32) (RAND_FLOAT(50.0f) + 70.0f), arg1, RAND_FLOAT(0.8f) + 0.3f); - Macbeth_801AD624(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[25], - actor->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f), actor->obj.pos.z + RAND_FLOAT(50.0f), - RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT(7.0f) + 7.0f, RAND_FLOAT_CENTERED(10.0f), - RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(30.0f), - RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), (s32) (RAND_FLOAT(50.0f) + 70.0f), - arg1, RAND_FLOAT(0.8f) + 0.3f); - Macbeth_801AD624(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[23], - actor->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f), - actor->obj.pos.z + 420.0f + 100.0f + RAND_FLOAT(50.0f), RAND_FLOAT_CENTERED(10.0f), - RAND_FLOAT(7.0f) + 7.0f, RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), - RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), - RAND_FLOAT_CENTERED(30.0f), (s32) (RAND_FLOAT(50.0f) + 70.0f), arg1, RAND_FLOAT(0.8f) + 0.3f); + Macbeth_Effect357_Spawn1( + this->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + this->fwork[21], + this->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f), this->obj.pos.z - 420.0f + RAND_FLOAT(50.0f), + RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT(7.0f) + 7.0f, RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT(360.0f), + RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), + RAND_FLOAT_CENTERED(30.0f), (s32) (RAND_FLOAT(50.0f) + 70.0f), arg1, RAND_FLOAT(0.8f) + 0.3f); + Macbeth_Effect357_Spawn1( + this->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + this->fwork[25], + this->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f), this->obj.pos.z + RAND_FLOAT(50.0f), + RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT(7.0f) + 7.0f, RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT(360.0f), + RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), + RAND_FLOAT_CENTERED(30.0f), (s32) (RAND_FLOAT(50.0f) + 70.0f), arg1, RAND_FLOAT(0.8f) + 0.3f); + Macbeth_Effect357_Spawn1(this->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + this->fwork[23], + this->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f), + this->obj.pos.z + 420.0f + 100.0f + RAND_FLOAT(50.0f), RAND_FLOAT_CENTERED(10.0f), + RAND_FLOAT(7.0f) + 7.0f, RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT(360.0f), + RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(30.0f), + RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), + (s32) (RAND_FLOAT(50.0f) + 70.0f), arg1, RAND_FLOAT(0.8f) + 0.3f); } - AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_L, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_L, this->sfxSource, 4); } -void Macbeth_8019AF34(Actor* actor) { +void Macbeth_8019AF34(Actor* this) { s32 i; - func_effect_8007BFFC(actor->obj.pos.x + actor->fwork[25], actor->obj.pos.y + 290.0f, actor->obj.pos.z, 0.0f, 0.0f, - 0.0f, 22.0f, 5); + Effect386_Spawn1(this->obj.pos.x + this->fwork[25], this->obj.pos.y + 290.0f, this->obj.pos.z, 0.0f, 0.0f, 0.0f, + 22.0f, 5); for (i = 0; i < 10; i++) { - Macbeth_801AD624(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[21], - actor->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f), - actor->obj.pos.z - 420.0f + RAND_FLOAT(50.0f), RAND_FLOAT_CENTERED(50.0f), - RAND_FLOAT(30.0f) + 7.0f, RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), - RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), - RAND_FLOAT_CENTERED(30.0f), (s32) (RAND_FLOAT(50.0f) + 70.0f), 1, RAND_FLOAT(0.8f) + 0.3f); - Macbeth_801AD624(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[25], - actor->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f), actor->obj.pos.z + RAND_FLOAT(50.0f), - RAND_FLOAT_CENTERED(45.0f), RAND_FLOAT(25.0f) + 7.0f, RAND_FLOAT_CENTERED(20.0f), - RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(30.0f), - RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), (s32) (RAND_FLOAT(50.0f) + 70.0f), 1, - 2.0f * (RAND_FLOAT(0.8f) + 0.3f)); - Macbeth_801AD624(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[23], - actor->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f), - actor->obj.pos.z + 420.0f + 100.0f + RAND_FLOAT(50.0f), RAND_FLOAT_CENTERED(40.0f), - RAND_FLOAT(35.0f) + 7.0f, RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), - RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), - RAND_FLOAT_CENTERED(30.0f), (s32) (RAND_FLOAT(50.0f) + 70.0f), 1, RAND_FLOAT(0.8f) + 0.3f); + Macbeth_Effect357_Spawn1( + this->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + this->fwork[21], + this->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f), this->obj.pos.z - 420.0f + RAND_FLOAT(50.0f), + RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT(30.0f) + 7.0f, RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT(360.0f), + RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), + RAND_FLOAT_CENTERED(30.0f), (s32) (RAND_FLOAT(50.0f) + 70.0f), 1, RAND_FLOAT(0.8f) + 0.3f); + Macbeth_Effect357_Spawn1( + this->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + this->fwork[25], + this->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f), this->obj.pos.z + RAND_FLOAT(50.0f), + RAND_FLOAT_CENTERED(45.0f), RAND_FLOAT(25.0f) + 7.0f, RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(360.0f), + RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), + RAND_FLOAT_CENTERED(30.0f), (s32) (RAND_FLOAT(50.0f) + 70.0f), 1, 2.0f * (RAND_FLOAT(0.8f) + 0.3f)); + Macbeth_Effect357_Spawn1(this->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + this->fwork[23], + this->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f), + this->obj.pos.z + 420.0f + 100.0f + RAND_FLOAT(50.0f), RAND_FLOAT_CENTERED(40.0f), + RAND_FLOAT(35.0f) + 7.0f, RAND_FLOAT_CENTERED(20.0f), RAND_FLOAT(360.0f), + RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(30.0f), + RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), + (s32) (RAND_FLOAT(50.0f) + 70.0f), 1, RAND_FLOAT(0.8f) + 0.3f); } - AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_L, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_L, this->sfxSource, 4); } -void Macbeth_8019B580(Actor* actor, s32* arg1) { +void Macbeth_8019B580(Actor* this, s32* arg1) { if (*arg1 > 10) { return; } if ((gGameFrameCount % 32U) == 0) { - func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[21], - actor->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f), - actor->obj.pos.z - 420.0f + RAND_FLOAT(50.0f), 10.0f); + func_effect_8007D2C8(this->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + this->fwork[21], + this->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f), + this->obj.pos.z - 420.0f + RAND_FLOAT(50.0f), 10.0f); } else if ((gGameFrameCount % 32U) == 8) { - func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[25], - actor->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f), - actor->obj.pos.z + RAND_FLOAT(50.0f), 10.0f); + func_effect_8007D2C8(this->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + this->fwork[25], + this->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f), + this->obj.pos.z + RAND_FLOAT(50.0f), 10.0f); } else if ((gGameFrameCount % 32U) == 16) { - func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[23], - actor->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f), - (actor->obj.pos.z + 320.0f) + RAND_FLOAT(50.0f), 10.0f); + func_effect_8007D2C8(this->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + this->fwork[23], + this->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f), + (this->obj.pos.z + 320.0f) + RAND_FLOAT(50.0f), 10.0f); } else if ((gGameFrameCount % 32U) == 24) { - func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[25], - actor->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f), - actor->obj.pos.z + RAND_FLOAT(50.0f), 10.0f); + func_effect_8007D2C8(this->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + this->fwork[25], + this->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f), + this->obj.pos.z + RAND_FLOAT(50.0f), 10.0f); } if ((u16) (gGameFrameCount % 4U) == 0) { // fake? - func_effect_8007C120(actor->obj.pos.x + actor->fwork[25], actor->obj.pos.y + 350.0f, actor->obj.pos.z, - actor->vel.x, actor->vel.y, actor->vel.z, 0.2f, 10); + Effect_Effect390_Spawn(this->obj.pos.x + this->fwork[25], this->obj.pos.y + 350.0f, this->obj.pos.z, + this->vel.x, this->vel.y, this->vel.z, 0.2f, 10); } } -void Macbeth_8019B8B0(Actor* actor) { +void Macbeth_8019B8B0(Actor* this) { if ((gGameFrameCount % 4U) == 0) { - func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[21], - actor->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f), - actor->obj.pos.z - 420.0f + RAND_FLOAT(50.0f), 20.0f); + func_effect_8007D2C8(this->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + this->fwork[21], + this->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f), + this->obj.pos.z - 420.0f + RAND_FLOAT(50.0f), 20.0f); } else if ((gGameFrameCount % 4U) == 1) { - func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[25], - actor->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f), - RAND_FLOAT(50.0f) + actor->obj.pos.z, 20.0f); + func_effect_8007D2C8(this->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + this->fwork[25], + this->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f), + RAND_FLOAT(50.0f) + this->obj.pos.z, 20.0f); } else if ((gGameFrameCount % 4U) == 2) { - func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[23], - actor->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f), - RAND_FLOAT(50.0f) + (actor->obj.pos.z + 420.0f), 20.0f); + func_effect_8007D2C8(this->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + this->fwork[23], + this->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f), + RAND_FLOAT(50.0f) + (this->obj.pos.z + 420.0f), 20.0f); } else if ((gGameFrameCount % 4U) == 3) { - func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[25], - actor->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f), - RAND_FLOAT(50.0f) + actor->obj.pos.z, 20.0f); + func_effect_8007D2C8(this->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + this->fwork[25], + this->obj.pos.y + 280.0f + RAND_FLOAT_CENTERED(100.0f), + RAND_FLOAT(50.0f) + this->obj.pos.z, 20.0f); } if ((gGameFrameCount % 4U) == 0) { - func_effect_8007C120(actor->obj.pos.x + actor->fwork[25], actor->obj.pos.y + 350.0f, actor->obj.pos.z, - actor->vel.x, actor->vel.y, actor->vel.z, 0.2f, 20); + Effect_Effect390_Spawn(this->obj.pos.x + this->fwork[25], this->obj.pos.y + 350.0f, this->obj.pos.z, + this->vel.x, this->vel.y, this->vel.z, 0.2f, 20); } } -void Macbeth_8019BBEC(Actor* actor) { - if ((actor->timer_0BC % 16U) == 0) { - func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[21], - RAND_FLOAT_CENTERED(100.0f) + (actor->obj.pos.y + 100.0f), - RAND_FLOAT(50.0f) + (actor->obj.pos.z - 400.0f), 3.0f); - } else if ((actor->timer_0BC % 16U) == 4) { - func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[25], - RAND_FLOAT_CENTERED(100.0f) + (actor->obj.pos.y + 100.0f), - RAND_FLOAT(50.0f) + actor->obj.pos.z, 3.0f); - } else if ((actor->timer_0BC % 16U) == 8) { - func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[23], - RAND_FLOAT_CENTERED(100.0f) + (actor->obj.pos.y + 100.0f), - RAND_FLOAT(50.0f) + (actor->obj.pos.z + 450.0f), 3.0f); - } else if ((actor->timer_0BC % 16U) == 12) { - func_effect_8007C120(actor->obj.pos.x + actor->fwork[25], actor->obj.pos.y + 100.0f, actor->obj.pos.z, - actor->vel.x, actor->vel.y, actor->vel.z, 0.15f, 10); +void Macbeth_8019BBEC(Actor* this) { + if ((this->timer_0BC % 16U) == 0) { + func_effect_8007D2C8(this->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + this->fwork[21], + RAND_FLOAT_CENTERED(100.0f) + (this->obj.pos.y + 100.0f), + RAND_FLOAT(50.0f) + (this->obj.pos.z - 400.0f), 3.0f); + } else if ((this->timer_0BC % 16U) == 4) { + func_effect_8007D2C8(this->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + this->fwork[25], + RAND_FLOAT_CENTERED(100.0f) + (this->obj.pos.y + 100.0f), + RAND_FLOAT(50.0f) + this->obj.pos.z, 3.0f); + } else if ((this->timer_0BC % 16U) == 8) { + func_effect_8007D2C8(this->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + this->fwork[23], + RAND_FLOAT_CENTERED(100.0f) + (this->obj.pos.y + 100.0f), + RAND_FLOAT(50.0f) + (this->obj.pos.z + 450.0f), 3.0f); + } else if ((this->timer_0BC % 16U) == 12) { + Effect_Effect390_Spawn(this->obj.pos.x + this->fwork[25], this->obj.pos.y + 100.0f, this->obj.pos.z, + this->vel.x, this->vel.y, this->vel.z, 0.15f, 10); } } -void Macbeth_8019BE50(Actor* actor) { +void Macbeth_8019BE50(Actor* this) { s16 i; - func_effect_8007BFFC(actor->obj.pos.x + actor->fwork[25], actor->obj.pos.y + 90.0f, actor->obj.pos.z, 0.0f, 0.0f, - 0.0f, 10.0f, 5); - func_effect_8007BFFC(actor->obj.pos.x + actor->fwork[23], actor->obj.pos.y + 90.0f, - actor->obj.pos.z + 420.0f + 300.0f, 0.0f, 0.0f, 0.0f, 10.0f, 5); + Effect386_Spawn1(this->obj.pos.x + this->fwork[25], this->obj.pos.y + 90.0f, this->obj.pos.z, 0.0f, 0.0f, 0.0f, + 10.0f, 5); + Effect386_Spawn1(this->obj.pos.x + this->fwork[23], this->obj.pos.y + 90.0f, this->obj.pos.z + 420.0f + 300.0f, + 0.0f, 0.0f, 0.0f, 10.0f, 5); for (i = 0; i < 10; i++) { - Macbeth_801AD624(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[21], - actor->obj.pos.y + 80.0f + RAND_FLOAT_CENTERED(100.0f), - actor->obj.pos.z - 420.0f + RAND_FLOAT(50.0f), RAND_FLOAT_CENTERED(10.0f), - RAND_FLOAT(7.0f) + 7.0f, RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), - RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), - RAND_FLOAT_CENTERED(30.0f), (s32) (RAND_FLOAT(50.0f) + 70.0f), 0, RAND_FLOAT(0.8f) + 0.3f); - Macbeth_801AD624(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[25], - actor->obj.pos.y + 80.0f + RAND_FLOAT_CENTERED(100.0f), actor->obj.pos.z + RAND_FLOAT(50.0f), - RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT(10.0f) + 7.0f, RAND_FLOAT_CENTERED(10.0f), - RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(30.0f), - RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), (s32) (RAND_FLOAT(50.0f) + 70.0f), 0, - (RAND_FLOAT(0.8f) + 0.3f)); - Macbeth_801AD624(actor->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + actor->fwork[23], - actor->obj.pos.y + 80.0f + RAND_FLOAT_CENTERED(100.0f), - actor->obj.pos.z + 420.0f + 100.0f + RAND_FLOAT(50.0f), RAND_FLOAT_CENTERED(10.0f), - RAND_FLOAT(7.0f) + 7.0f, RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), - RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), - RAND_FLOAT_CENTERED(30.0f), (s32) (RAND_FLOAT(50.0f) + 70.0f), 0, RAND_FLOAT(0.8f) + 0.3f); + Macbeth_Effect357_Spawn1( + this->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + this->fwork[21], + this->obj.pos.y + 80.0f + RAND_FLOAT_CENTERED(100.0f), this->obj.pos.z - 420.0f + RAND_FLOAT(50.0f), + RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT(7.0f) + 7.0f, RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT(360.0f), + RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), + RAND_FLOAT_CENTERED(30.0f), (s32) (RAND_FLOAT(50.0f) + 70.0f), 0, RAND_FLOAT(0.8f) + 0.3f); + Macbeth_Effect357_Spawn1( + this->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + this->fwork[25], + this->obj.pos.y + 80.0f + RAND_FLOAT_CENTERED(100.0f), this->obj.pos.z + RAND_FLOAT(50.0f), + RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT(10.0f) + 7.0f, RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT(360.0f), + RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), + RAND_FLOAT_CENTERED(30.0f), (s32) (RAND_FLOAT(50.0f) + 70.0f), 0, (RAND_FLOAT(0.8f) + 0.3f)); + Macbeth_Effect357_Spawn1(this->obj.pos.x + RAND_FLOAT_CENTERED(200.0f) + this->fwork[23], + this->obj.pos.y + 80.0f + RAND_FLOAT_CENTERED(100.0f), + this->obj.pos.z + 420.0f + 100.0f + RAND_FLOAT(50.0f), RAND_FLOAT_CENTERED(10.0f), + RAND_FLOAT(7.0f) + 7.0f, RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT(360.0f), + RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(30.0f), + RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), + (s32) (RAND_FLOAT(50.0f) + 70.0f), 0, RAND_FLOAT(0.8f) + 0.3f); } - Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_L); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_L); gHitCount++; } -bool Macbeth_8019C4EC(Actor* actor) { - if (actor->dmgType != DMG_NONE) { - actor->dmgType = DMG_NONE; - if (actor->dmgPart == 1) { - AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, actor->sfxSource, 4); - actor->dmgType = DMG_NONE; - actor->iwork[7] = 15; +bool Macbeth_MaLocomotive_HandleDamage(MaLocomotive* this) { + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + if (this->dmgPart == 1) { + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, this->sfxSource, 4); + this->dmgType = DMG_NONE; + this->iwork[7] = 15; D_i5_801BE320[22] = 0; D_i5_801BE320[4] = 120; D_i5_801BE320[21] = 2; return true; } - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } return false; } -void Macbeth_8019C5B8(Actor* actor) { +void Macbeth_8019C5B8(Actor* this) { f32 var_ft4; - Macbeth_801A0308(actor, actor->obj.pos.z + 520.0f, actor->obj.rot.y, 0); + Macbeth_801A0308(this, this->obj.pos.z + 520.0f, this->obj.rot.y, 0); var_ft4 = RAND_FLOAT_CENTERED(12.0f); if ((var_ft4 > -2.0f) && (var_ft4 < 2.0f)) { if (var_ft4 >= 0.0f) { @@ -759,729 +899,814 @@ void Macbeth_8019C5B8(Actor* actor) { var_ft4 = -2.5f; } } - Macbeth_801AF200(actor->fwork[19], actor->obj.pos.y + 300.0f, actor->obj.pos.z + 520.0f, var_ft4, 10.0f, 0.0f); + Macbeth_MaShockBox_Spawn(this->fwork[19], this->obj.pos.y + 300.0f, this->obj.pos.z + 520.0f, var_ft4, 10.0f, 0.0f); } -void Macbeth_8019C6C4(Actor* actor) { - s32 var_a3; +void Macbeth_Boss_HitCountBonus(MaLocomotive* this) { + s32 hitBonus; if (gBossFrameCount < 3840) { - var_a3 = 10; + hitBonus = 10; } else if (gBossFrameCount < 5760) { - var_a3 = 5; + hitBonus = 5; } else if (gBossFrameCount < 7680) { - var_a3 = 2; + hitBonus = 2; + } else if (gBossFrameCount < 9600) { + hitBonus = 1; } else { - if (gBossFrameCount < 9600) { - var_a3 = 1; - } else { - var_a3 = 0; - } + hitBonus = 0; } - if (var_a3 != 0) { - BonusText_Display(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, var_a3); + + if (hitBonus != 0) { + BonusText_Display(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, hitBonus); } - gHitCount += var_a3 + 1; + + gHitCount += hitBonus + 1; D_ctx_80177850 = 15; } -void Macbeth_Actor205_Update(Actor* actor) { - if (actor->vel.z < -3.0f) { - Macbeth_8019A128(); +void Macbeth_MaLocomotive_Update(MaLocomotive* this) { + if (this->vel.z < -3.0f) { + Macbeth_RotateTrainWheels(); } - D_i5_801BE368[4] = actor->vwork[0].x + actor->obj.pos.x; - D_i5_801BE368[5] = actor->vwork[0].y + actor->obj.pos.y; - D_i5_801BE368[6] = actor->vwork[0].z + actor->obj.pos.z; - Macbeth_8019A2F4(actor); - Macbeth_8019A198(actor); - Macbeth_801A015C(actor); - Macbeth_8019A830(actor); - switch (actor->state) { - s32 unused; + + D_i5_801BE368[4] = this->vwork[0].x + this->obj.pos.x; + D_i5_801BE368[5] = this->vwork[0].y + this->obj.pos.y; + D_i5_801BE368[6] = this->vwork[0].z + this->obj.pos.z; + + Macbeth_8019A2F4(this); + Macbeth_8019A198(this); + Macbeth_801A015C(this); + Macbeth_8019A830(this); + + switch (this->state) { + s32 pad; + case 0: D_i5_801BE320[25] = 1; if ((D_i5_801BE320[9] <= 0) && (D_i5_801BE320[10] <= 0) && (D_i5_801BE320[17] != 0) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) { D_i5_801BE320[30] = 0; - actor->timer_0BC = 150; - actor->timer_0BE = 200; + this->timer_0BC = 150; + this->timer_0BE = 200; D_i5_801BE320[19] = 1; - actor->state++; + this->state++; } break; + case 1: - if (actor->timer_0BC == 1) { - AUDIO_PLAY_SFX(NA_SE_OB_GATE_OPEN, actor->sfxSource, 4); + if (this->timer_0BC == 1) { + AUDIO_PLAY_SFX(NA_SE_OB_GATE_OPEN, this->sfxSource, 4); } - if (actor->timer_0BC <= 0) { - Math_SmoothStepToF(&actor->fwork[2], -60.0f, 0.4f, 10.0f, 0.01f); - if (actor->timer_0BE == 30) { - Macbeth_8019C5B8(actor); + if (this->timer_0BC <= 0) { + Math_SmoothStepToF(&this->fwork[2], -60.0f, 0.4f, 10.0f, 0.01f); + if (this->timer_0BE == 30) { + Macbeth_8019C5B8(this); Radio_PlayMessage(gMsg_ID_17470, RCID_BOSS_MACBETH); } - if ((actor->fwork[2] < -58.0f) && ((Macbeth_8019C4EC(actor) != 0) || (actor->timer_0BE <= 0))) { - actor->timer_0BC = 200; + if ((this->fwork[2] < -58.0f) && + ((Macbeth_MaLocomotive_HandleDamage(this) != 0) || (this->timer_0BE <= 0))) { + this->timer_0BC = 200; D_i5_801BE320[19] = 0; - actor->state++; - AUDIO_PLAY_SFX(NA_SE_OB_GATE_CLOSE, actor->sfxSource, 4); + this->state++; + AUDIO_PLAY_SFX(NA_SE_OB_GATE_CLOSE, this->sfxSource, 4); } } break; + case 2: - Math_SmoothStepToF(&actor->fwork[2], 0.0f, 0.4f, 30.0f, 0.01f); - if ((actor->timer_0BC <= 0) && (D_i5_801BE320[25] == 1)) { - actor->timer_0BC = 60; - actor->state++; - AUDIO_PLAY_SFX(NA_SE_OB_GATE_OPEN, actor->sfxSource, 4); + Math_SmoothStepToF(&this->fwork[2], 0.0f, 0.4f, 30.0f, 0.01f); + if ((this->timer_0BC <= 0) && (D_i5_801BE320[25] == 1)) { + this->timer_0BC = 60; + this->state++; + AUDIO_PLAY_SFX(NA_SE_OB_GATE_OPEN, this->sfxSource, 4); } break; + case 3: - Math_SmoothStepToF(&actor->fwork[2], -60.0f, 0.4f, 10.0f, 0.01f); - if ((actor->fwork[2] < -58.0f) && (Macbeth_8019C4EC(actor) != 0)) { - actor->timer_0BC = 150; - actor->state--; + Math_SmoothStepToF(&this->fwork[2], -60.0f, 0.4f, 10.0f, 0.01f); + + if ((this->fwork[2] < -58.0f) && (Macbeth_MaLocomotive_HandleDamage(this) != 0)) { + this->timer_0BC = 150; + this->state--; D_i5_801BE320[30]++; if (D_i5_801BE320[30] >= 2) { D_i5_801BE320[30] = 0; D_i5_801BE320[25] = 0; } - AUDIO_PLAY_SFX(NA_SE_OB_GATE_CLOSE, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_GATE_CLOSE, this->sfxSource, 4); } - if (actor->timer_0BC <= 0) { + + if (this->timer_0BC <= 0) { D_i5_801BE320[30]++; if (D_i5_801BE320[30] >= 2) { D_i5_801BE320[30] = 0; D_i5_801BE320[25] = 0; } - actor->timer_0BC = 100; - actor->state--; - AUDIO_PLAY_SFX(NA_SE_OB_GATE_CLOSE, actor->sfxSource, 4); + this->timer_0BC = 100; + this->state--; + AUDIO_PLAY_SFX(NA_SE_OB_GATE_CLOSE, this->sfxSource, 4); } - if (actor->timer_0BC == 30) { - Macbeth_8019C5B8(actor); + + if (this->timer_0BC == 30) { + Macbeth_8019C5B8(this); } break; + case 4: - Macbeth_8019AF34(actor); - actor->health = 0; - actor->timer_0BC = 200; + Macbeth_8019AF34(this); + this->health = 0; + this->timer_0BC = 200; gCameraShake = 30; - actor->state++; + this->state++; break; + case 5: - if (actor->timer_0BC == 198) { + if (this->timer_0BC == 198) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 255; - } else if (actor->timer_0BC == 197) { + } else if (this->timer_0BC == 197) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 0; } - if (((actor->timer_0BC < 150) || (actor->timer_0BC > 170)) && (actor->timer_0BC > 80)) { - Macbeth_8019B8B0(actor); + if (((this->timer_0BC < 150) || (this->timer_0BC > 170)) && (this->timer_0BC > 80)) { + Macbeth_8019B8B0(this); } - if (actor->timer_0BC == 160) { - gShowBossHealth = 0; + if (this->timer_0BC == 160) { + gShowBossHealth = false; Radio_PlayMessage(gMsg_ID_17440, RCID_BOSS_MACBETH); - func_effect_8007A568(actor->obj.pos.x + actor->fwork[25], actor->obj.pos.y, actor->obj.pos.z, 40.0f); - Macbeth_8019C6C4(actor); - actor->vel.z = 0.0f; + Effect_Effect383_Spawn(this->obj.pos.x + this->fwork[25], this->obj.pos.y, this->obj.pos.z, 40.0f); + Macbeth_Boss_HitCountBonus(this); + this->vel.z = 0.0f; gCameraShake = 25; } - if (actor->timer_0BC == 100) { - Object_Kill(&actor->obj, actor->sfxSource); + if (this->timer_0BC == 100) { + Object_Kill(&this->obj, this->sfxSource); if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].csState = 0; gMissionStatus = MISSION_COMPLETE; } - actor->state++; + this->state++; Audio_KillSfxBySourceAndId(gPlayer[0].sfxSource, NA_SE_TANK_SLIDE); Audio_KillSfxBySourceAndId(gPlayer[0].sfxSource, NA_SE_TANK_BURNER_HALF); } break; } - if (actor->dmgType != DMG_NONE) { - actor->dmgType = DMG_NONE; - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } if (D_i5_801BE320[4] > 0) { D_i5_801BE320[4]--; } - actor->fwork[3] = 0.0f; + + this->fwork[3] = 0.0f; + if (D_i5_801BE320[21] != 0) { D_i5_801BE320[22]++; + if (D_i5_801BE320[22] >= 30) { if (D_i5_801BE320[4] == 0) { D_i5_801BE320[21] = 0; } D_i5_801BE320[22] = 0; } - if (((gGameFrameCount % 2) == 0)) { - actor->fwork[3] = 15.0f; + + if ((gGameFrameCount % 2) == 0) { + this->fwork[3] = 15.0f; } else { - actor->fwork[3] = -15.0f; + this->fwork[3] = -15.0f; } } - D_i5_801BE320[20] = actor->state; + + D_i5_801BE320[20] = this->state; + if (D_i5_801BE320[23] != 0) { D_i5_801BE320[23] = 0; - actor->state = 4; + this->state = 4; } + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) && (gCsFrameCount > 630)) { - Object_Kill(&actor->obj, actor->sfxSource); + Object_Kill(&this->obj, this->sfxSource); } } -void Macbeth_Actor210_Update(Actor* actor) { - switch (actor->state) { +void Macbeth_MaTrainCar4_Update(Actor* this) { + switch (this->state) { case 0: - Macbeth_8019A198(actor); - Macbeth_801A015C(actor); - Macbeth_8019FC54(actor, &actor->iwork[10], &actor->iwork[11], 1, 1, actor->fwork[25], 0.0f, - &actor->iwork[13]); - Macbeth_8019A728(actor); - if (actor->iwork[1] != 0) { - Macbeth_8019D048(actor); + Macbeth_8019A198(this); + Macbeth_801A015C(this); + Macbeth_8019FC54(this, &this->iwork[10], &this->iwork[11], 1, 1, this->fwork[25], 0.0f, &this->iwork[13]); + Macbeth_8019A728(this); + if (this->iwork[1] != 0) { + Macbeth_8019D048(this); } - Macbeth_8019A830(actor); + Macbeth_8019A830(this); break; + case 1: - if (actor->iwork[5] < D_MA_801BE2F0[3]) { - D_MA_801BE2F0[3] = actor->iwork[5]; + if (this->iwork[5] < D_MA_801BE2F0[3]) { + D_MA_801BE2F0[3] = this->iwork[5]; } - actor->state = 2; - Macbeth_801A015C(actor); - Macbeth_8019A830(actor); + this->state = 2; + Macbeth_801A015C(this); + Macbeth_8019A830(this); break; + case 2: - Macbeth_8019BBEC(actor); - if (actor->timer_0BC == 0) { - actor->timer_0BC = 60; + Macbeth_8019BBEC(this); + + if (this->timer_0BC == 0) { + this->timer_0BC = 60; } - Math_SmoothStepToF(&actor->vel.z, 0.0f, 0.02f, 10.0f, 0.01f); - Macbeth_801A015C(actor); - Macbeth_8019A87C(actor); - if (actor->dmgType != DMG_NONE) { - actor->dmgType = DMG_NONE; - actor->timer_0BC = 20; - Macbeth_8019BE50(actor); - actor->state = 3; + + Math_SmoothStepToF(&this->vel.z, 0.0f, 0.02f, 10.0f, 0.01f); + Macbeth_801A015C(this); + Macbeth_8019A87C(this); + + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + this->timer_0BC = 20; + Macbeth_8019BE50(this); + this->state = 3; } break; + case 3: - Macbeth_801A015C(actor); - Math_SmoothStepToF(&actor->scale, 0.0f, 0.02f, 10.0f, 0.01f); - if (actor->timer_0BC <= 0) { - Object_Kill(&actor->obj, actor->sfxSource); + Macbeth_801A015C(this); + Math_SmoothStepToF(&this->scale, 0.0f, 0.02f, 10.0f, 0.01f); + if (this->timer_0BC <= 0) { + Object_Kill(&this->obj, this->sfxSource); } break; } } -void Macbeth_8019D048(Actor* actor) { - switch (actor->iwork[3]) { +void Macbeth_8019D048(Actor* this) { + switch (this->iwork[3]) { case 0: if (D_i5_801BE320[28] != 0) { D_i5_801BE320[28]--; } - if (actor->fwork[25] == 0.0f) { + + if (this->fwork[25] == 0.0f) { if (D_i5_801BE320[28] <= 0) { Radio_PlayMessage(gMsg_ID_17390, RCID_BOSS_MACBETH); D_i5_801BE320[28] = 100; } - if (actor->obj.pos.x <= gPlayer[0].pos.x) { - actor->iwork[4] = 1; + + if (this->obj.pos.x <= gPlayer[0].pos.x) { + this->iwork[4] = 1; } else { - actor->iwork[4] = -1; + this->iwork[4] = -1; } - actor->iwork[3]++; + this->iwork[3]++; } break; + case 1: - Math_SmoothStepToF(&actor->fwork[4], actor->iwork[4] * -60.0f, 0.5f, 2.0f, 1.0f); - if ((actor->fwork[4] < -30.0f) || (actor->fwork[4] > 30.0f)) { - Macbeth_8019D670(actor->obj.pos.x + actor->fwork[25] + actor->iwork[4] * 73.0f, - actor->obj.pos.y + actor->fwork[8] + 330.0f, actor->obj.pos.z, actor->iwork[4] * 70.0f, - actor->vel.z, actor->iwork[4] * -34.0f, 0.0f, 2, 5); - Macbeth_8019D670(actor->obj.pos.x + actor->fwork[25] + actor->iwork[4] * 74.0f, - actor->obj.pos.y + actor->fwork[8] + 330.0f, actor->obj.pos.z - 350.0f, - actor->iwork[4] * 38.0f, actor->vel.z, actor->iwork[4] * -34.0f, 0.0f, 4, 6); - Macbeth_8019D670(actor->obj.pos.x + actor->fwork[25] + actor->iwork[4] * 74.0f, - actor->obj.pos.y + actor->fwork[8] + 330.0f, actor->obj.pos.z + 350.0f, - actor->iwork[4] * 40.0f, actor->vel.z, actor->iwork[4] * -35.0f, 0.0f, 0, 7); - Macbeth_8019D670(actor->obj.pos.x + actor->fwork[25] + actor->iwork[4] * 35.0f, - actor->obj.pos.y + actor->fwork[8] + 290.0f, actor->obj.pos.z - 175.0f, - actor->iwork[4] * 20.0f, actor->vel.z, actor->iwork[4] * -35.0f, 0.0f, 12, 4); - Macbeth_8019D670(actor->obj.pos.x + actor->fwork[25] + actor->iwork[4] * 35.0f, - actor->obj.pos.y + actor->fwork[8] + 290.0f, actor->obj.pos.z + 175.0f, - actor->iwork[4] * 35.0f, actor->vel.z, actor->iwork[4] * -35.0f, 0.0f, 14, 5); - actor->iwork[3]++; - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_6035DD0); + Math_SmoothStepToF(&this->fwork[4], this->iwork[4] * -60.0f, 0.5f, 2.0f, 1.0f); + + if ((this->fwork[4] < -30.0f) || (this->fwork[4] > 30.0f)) { + Macbeth_MaBoulder_Spawn(this->obj.pos.x + this->fwork[25] + this->iwork[4] * 73.0f, + this->obj.pos.y + this->fwork[8] + 330.0f, this->obj.pos.z, + this->iwork[4] * 70.0f, this->vel.z, this->iwork[4] * -34.0f, 0.0f, 2, 5); + Macbeth_MaBoulder_Spawn(this->obj.pos.x + this->fwork[25] + this->iwork[4] * 74.0f, + this->obj.pos.y + this->fwork[8] + 330.0f, this->obj.pos.z - 350.0f, + this->iwork[4] * 38.0f, this->vel.z, this->iwork[4] * -34.0f, 0.0f, 4, 6); + Macbeth_MaBoulder_Spawn(this->obj.pos.x + this->fwork[25] + this->iwork[4] * 74.0f, + this->obj.pos.y + this->fwork[8] + 330.0f, this->obj.pos.z + 350.0f, + this->iwork[4] * 40.0f, this->vel.z, this->iwork[4] * -35.0f, 0.0f, 0, 7); + Macbeth_MaBoulder_Spawn(this->obj.pos.x + this->fwork[25] + this->iwork[4] * 35.0f, + this->obj.pos.y + this->fwork[8] + 290.0f, this->obj.pos.z - 175.0f, + this->iwork[4] * 20.0f, this->vel.z, this->iwork[4] * -35.0f, 0.0f, 12, 4); + Macbeth_MaBoulder_Spawn(this->obj.pos.x + this->fwork[25] + this->iwork[4] * 35.0f, + this->obj.pos.y + this->fwork[8] + 290.0f, this->obj.pos.z + 175.0f, + this->iwork[4] * 35.0f, this->vel.z, this->iwork[4] * -35.0f, 0.0f, 14, 5); + this->iwork[3]++; + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_6035DD0); } break; + case 2: - Math_SmoothStepToF(&actor->fwork[4], actor->iwork[4] * -70.0f, 0.5f, 2.0f, 1.0f); - actor->iwork[3]++; + Math_SmoothStepToF(&this->fwork[4], this->iwork[4] * -70.0f, 0.5f, 2.0f, 1.0f); + this->iwork[3]++; break; + case 3: - Math_SmoothStepToF(&actor->fwork[4], actor->iwork[4] * -70.0f, 0.2f, 2.0f, 0.0f); - if ((actor->fwork[4] < -69.0f) || (actor->fwork[4] > 69.0f)) { - actor->timer_0BC = 20; - actor->iwork[3]++; + Math_SmoothStepToF(&this->fwork[4], this->iwork[4] * -70.0f, 0.2f, 2.0f, 0.0f); + if ((this->fwork[4] < -69.0f) || (this->fwork[4] > 69.0f)) { + this->timer_0BC = 20; + this->iwork[3]++; } break; + case 4: - if (actor->timer_0BC == 0) { - Math_SmoothStepToF(&actor->fwork[4], 0.0f, 0.02f, 2.0f, 0.0f); + if (this->timer_0BC == 0) { + Math_SmoothStepToF(&this->fwork[4], 0.0f, 0.02f, 2.0f, 0.0f); } break; + default: break; } } -void Macbeth_8019D5C8(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 arg4, f32 zVel, f32 zRot, f32 yRot, s32 arg8, - u8 arg9) { - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_215; - actor->obj.pos.x = xPos; - actor->obj.pos.y = yPos; - actor->obj.pos.z = zPos; - actor->obj.rot.z = zRot; - actor->obj.rot.y = yRot; - actor->timer_0BC = arg8; - actor->timer_0BE = 20; - actor->fwork[0] = arg4; - actor->vel.z = zVel; - actor->unk_046 = arg9; - Object_SetInfo(&actor->info, actor->obj.id); +void Macbeth_MaBoulder_Setup(MaBoulder* this, f32 xPos, f32 yPos, f32 zPos, f32 arg4, f32 zVel, f32 zRot, f32 yRot, + s32 arg8, u8 arg9) { + Actor_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_ACTOR_MA_BOULDER; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + this->obj.rot.z = zRot; + this->obj.rot.y = yRot; + this->timer_0BC = arg8; + this->timer_0BE = 20; + this->fwork[0] = arg4; + this->vel.z = zVel; + this->unk_046 = arg9; + Object_SetInfo(&this->info, this->obj.id); } -void Macbeth_8019D670(f32 xPos, f32 yPos, f32 zPos, f32 arg3, f32 zVel, f32 zRot, f32 yRot, s32 arg7, u8 arg8) { +void Macbeth_MaBoulder_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 arg3, f32 zVel, f32 zRot, f32 yRot, s32 arg7, u8 arg8) { s32 i; for (i = 0; i < ARRAY_COUNT(gActors); i++) { if (gActors[i].obj.status == OBJ_FREE) { - Macbeth_8019D5C8(&gActors[i], xPos, yPos, zPos, arg3, zVel, zRot, yRot, arg7, arg8); + Macbeth_MaBoulder_Setup(&gActors[i], xPos, yPos, zPos, arg3, zVel, zRot, yRot, arg7, arg8); break; } } } -void Macbeth_Actor209_Update(Actor* actor) { - switch (actor->state) { +void Macbeth_MaTrainCar3_Update(MaTrainCar3* this) { + switch (this->state) { case 0: - Macbeth_8019A198(actor); - Macbeth_801A015C(actor); - Macbeth_8019D910(actor, &actor->iwork[10], &actor->iwork[11], 1, actor->fwork[21], -420.0f, - &actor->iwork[12], &actor->iwork[13]); - Macbeth_8019D910(actor, &actor->iwork[14], &actor->iwork[15], 2, actor->fwork[25], 0.0f, &actor->iwork[16], - &actor->iwork[17]); - Macbeth_8019D910(actor, &actor->iwork[18], &actor->iwork[19], 3, actor->fwork[23], 420.0f, - &actor->iwork[20], &actor->iwork[21]); - Macbeth_8019A830(actor); + Macbeth_8019A198(this); + Macbeth_801A015C(this); + Macbeth_8019D910(this, &this->iwork[10], &this->iwork[11], 1, this->fwork[21], -420.0f, &this->iwork[12], + &this->iwork[13]); + Macbeth_8019D910(this, &this->iwork[14], &this->iwork[15], 2, this->fwork[25], 0.0f, &this->iwork[16], + &this->iwork[17]); + Macbeth_8019D910(this, &this->iwork[18], &this->iwork[19], 3, this->fwork[23], 420.0f, &this->iwork[20], + &this->iwork[21]); + Macbeth_8019A830(this); break; + case 1: - if (actor->iwork[5] < D_MA_801BE2F0[3]) { - D_MA_801BE2F0[3] = actor->iwork[5]; + if (this->iwork[5] < D_MA_801BE2F0[3]) { + D_MA_801BE2F0[3] = this->iwork[5]; } - actor->state = 2; - Macbeth_801A015C(actor); - Macbeth_8019A830(actor); + this->state = 2; + Macbeth_801A015C(this); + Macbeth_8019A830(this); break; + case 2: - Macbeth_8019BBEC(actor); - if (actor->timer_0BC == 0) { - actor->timer_0BC = 60; + Macbeth_8019BBEC(this); + if (this->timer_0BC == 0) { + this->timer_0BC = 60; } - Math_SmoothStepToF(&actor->vel.z, 0.0f, 0.02f, 10.0f, 0); - Macbeth_801A015C(actor); - Macbeth_8019A830(actor); - if (actor->dmgType != DMG_NONE) { - actor->dmgType = DMG_NONE; - actor->timer_0BC = 20; - Macbeth_8019BE50(actor); - actor->state = 3; + + Math_SmoothStepToF(&this->vel.z, 0.0f, 0.02f, 10.0f, 0); + Macbeth_801A015C(this); + Macbeth_8019A830(this); + + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + this->timer_0BC = 20; + Macbeth_8019BE50(this); + this->state = 3; } break; + case 3: - Macbeth_801A015C(actor); - Math_SmoothStepToF(&actor->scale, 0.0f, 0.02f, 10.0f, 0.01f); - if (actor->timer_0BC <= 0) { - Object_Kill(&actor->obj, actor->sfxSource); + Macbeth_801A015C(this); + Math_SmoothStepToF(&this->scale, 0.0f, 0.02f, 10.0f, 0.01f); + if (this->timer_0BC <= 0) { + Object_Kill(&this->obj, this->sfxSource); } break; } } -void Macbeth_8019D910(Actor* actor, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f32 arg5, s32* arg6, s32* arg7) { +void Macbeth_8019D910(Actor* this, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f32 arg5, s32* arg6, s32* arg7) { s32 var_v0; u8 i; switch (*arg1) { case 0: - if (((actor->dmgType != DMG_NONE) && (arg3 == actor->dmgPart)) || - ((D_MA_801BE2F0[1] - 1 == actor->iwork[5]) && (actor->iwork[5] < D_MA_801BE2F0[3])) || - (((D_MA_801BE2F0[1] + 1) == actor->iwork[5]) && (D_MA_801BE2F0[3] < actor->iwork[5]))) { - AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, actor->sfxSource, 4); - actor->dmgType = DMG_NONE; - func_effect_8007C120(actor->obj.pos.x + arg4, actor->obj.pos.y + 200.0f, actor->obj.pos.z + arg5, - actor->vel.x, actor->vel.y, actor->vel.z, 0.15f, 20); - actor->iwork[arg3 + 6] = 15; - *arg2 -= actor->damage; - if ((*arg2 <= 0) || - ((D_MA_801BE2F0[1] - 1 == actor->iwork[5]) && (actor->iwork[5] < D_MA_801BE2F0[3])) || - (((D_MA_801BE2F0[1] + 1) == actor->iwork[5]) && (D_MA_801BE2F0[3] < actor->iwork[5]))) { + if (((this->dmgType != DMG_NONE) && (arg3 == this->dmgPart)) || + ((D_MA_801BE2F0[1] - 1 == this->iwork[5]) && (this->iwork[5] < D_MA_801BE2F0[3])) || + (((D_MA_801BE2F0[1] + 1) == this->iwork[5]) && (D_MA_801BE2F0[3] < this->iwork[5]))) { + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, this->sfxSource, 4); + + this->dmgType = DMG_NONE; + + Effect_Effect390_Spawn(this->obj.pos.x + arg4, this->obj.pos.y + 200.0f, this->obj.pos.z + arg5, + this->vel.x, this->vel.y, this->vel.z, 0.15f, 20); + + this->iwork[arg3 + 6] = 15; + + *arg2 -= this->damage; + if ((*arg2 <= 0) || ((D_MA_801BE2F0[1] - 1 == this->iwork[5]) && (this->iwork[5] < D_MA_801BE2F0[3])) || + (((D_MA_801BE2F0[1] + 1) == this->iwork[5]) && (D_MA_801BE2F0[3] < this->iwork[5]))) { (*arg1)++; } - } else if ((actor->dmgType != DMG_NONE) && (actor->dmgPart == 0)) { - actor->dmgType = DMG_NONE; - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); + } else if ((this->dmgType != DMG_NONE) && (this->dmgPart == 0)) { + this->dmgType = DMG_NONE; + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } break; + case 1: - func_effect_8007BFFC(actor->obj.pos.x + arg4, actor->obj.pos.y + 250.0f, actor->obj.pos.z + arg5, 0.0f, - 0.0f, 0.0f, 10.0f, 5); + Effect386_Spawn1(this->obj.pos.x + arg4, this->obj.pos.y + 250.0f, this->obj.pos.z + arg5, 0.0f, 0.0f, 0.0f, + 10.0f, 5); for (i = 0; i < 10; i++) { - Macbeth_801AD624( - actor->obj.pos.x + arg4, actor->obj.pos.y + 200.0f, actor->obj.pos.z + arg5 + RAND_FLOAT(80.0f), + Macbeth_Effect357_Spawn1( + this->obj.pos.x + arg4, this->obj.pos.y + 200.0f, this->obj.pos.z + arg5 + RAND_FLOAT(80.0f), RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT(7.0f) + 7.0f, RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), (s32) (RAND_FLOAT(50.0f) + 70.0f), 3, (RAND_FLOAT(0.8f) + 0.3f) * 2.0f); } - AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, this->sfxSource, 4); *arg7 = 1; *arg2 = 20; (*arg1)++; break; + case 2: - if (((actor->dmgType != DMG_NONE) && (arg3 == actor->dmgPart)) || - ((D_MA_801BE2F0[1] - 1 == actor->iwork[5]) && (actor->iwork[5] < D_MA_801BE2F0[3])) || - (((D_MA_801BE2F0[1] + 1) == actor->iwork[5]) && (D_MA_801BE2F0[3] < actor->iwork[5])) || - ((actor->obj.id == OBJ_ACTOR_209) && (arg3 == 2))) { - AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, actor->sfxSource, 4); - actor->dmgType = DMG_NONE; - func_effect_8007C120(actor->obj.pos.x + arg4, actor->obj.pos.y + 200.0f, actor->obj.pos.z + arg5, - actor->vel.x, actor->vel.y, actor->vel.z, 0.15f, 20); - actor->iwork[arg3 + 6] = 20; - *arg2 -= actor->damage; + if (((this->dmgType != DMG_NONE) && (arg3 == this->dmgPart)) || + ((D_MA_801BE2F0[1] - 1 == this->iwork[5]) && (this->iwork[5] < D_MA_801BE2F0[3])) || + (((D_MA_801BE2F0[1] + 1) == this->iwork[5]) && (D_MA_801BE2F0[3] < this->iwork[5])) || + ((this->obj.id == OBJ_ACTOR_MA_TRAIN_CAR_3) && (arg3 == 2))) { + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, this->sfxSource, 4); + this->dmgType = DMG_NONE; + Effect_Effect390_Spawn(this->obj.pos.x + arg4, this->obj.pos.y + 200.0f, this->obj.pos.z + arg5, + this->vel.x, this->vel.y, this->vel.z, 0.15f, 20); + this->iwork[arg3 + 6] = 20; + *arg2 -= this->damage; if ((*arg2 <= 0) || - ((D_MA_801BE2F0[1] - 1 == (actor->iwork[5])) && (actor->iwork[5] < D_MA_801BE2F0[3])) || - (((D_MA_801BE2F0[1] + 1) == actor->iwork[5]) && (D_MA_801BE2F0[3] < actor->iwork[5])) || - ((actor->obj.id == OBJ_ACTOR_209) && (arg3 == 2))) { + ((D_MA_801BE2F0[1] - 1 == (this->iwork[5])) && (this->iwork[5] < D_MA_801BE2F0[3])) || + (((D_MA_801BE2F0[1] + 1) == this->iwork[5]) && (D_MA_801BE2F0[3] < this->iwork[5])) || + ((this->obj.id == OBJ_ACTOR_MA_TRAIN_CAR_3) && (arg3 == 2))) { gHitCount++; (*arg1)++; } - } else if ((actor->dmgType != DMG_NONE) && (actor->dmgPart == 0)) { - actor->dmgType = DMG_NONE; - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); + } else if ((this->dmgType != DMG_NONE) && (this->dmgPart == 0)) { + this->dmgType = DMG_NONE; + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } break; + case 3: - func_effect_8007BFFC(actor->obj.pos.x + arg4, actor->obj.pos.y + 250.0f, actor->obj.pos.z + arg5, 0.0f, - 0.0f, 0.0f, 10.0f, 5); - if ((actor->obj.id != OBJ_ACTOR_209) || (arg3 != 2)) { + Effect386_Spawn1(this->obj.pos.x + arg4, this->obj.pos.y + 250.0f, this->obj.pos.z + arg5, 0.0f, 0.0f, 0.0f, + 10.0f, 5); + if ((this->obj.id != OBJ_ACTOR_MA_TRAIN_CAR_3) || (arg3 != 2)) { for (i = 0; i < 15; i++) { - Macbeth_801AD624(actor->obj.pos.x + arg4, actor->obj.pos.y + 200.0f, - actor->obj.pos.z + arg5 + RAND_FLOAT(20.0f), RAND_FLOAT_CENTERED(10.0f), - RAND_FLOAT(7.0f) + 7.0f, RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT(360.0f), - RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(30.0f), - RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), - (s32) (RAND_FLOAT(50.0f) + 70.0f), 2, (RAND_FLOAT(0.8f) + 0.3f) * 1.5f); + Macbeth_Effect357_Spawn1(this->obj.pos.x + arg4, this->obj.pos.y + 200.0f, + this->obj.pos.z + arg5 + RAND_FLOAT(20.0f), RAND_FLOAT_CENTERED(10.0f), + RAND_FLOAT(7.0f) + 7.0f, RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT(360.0f), + RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(30.0f), + RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), + (s32) (RAND_FLOAT(50.0f) + 70.0f), 2, (RAND_FLOAT(0.8f) + 0.3f) * 1.5f); } } - AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, actor->sfxSource, 4); + + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, this->sfxSource, 4); + *arg7 = 2; + var_v0 = arg3; if (var_v0 == 3) { var_v0 = 4; } + this->iwork[22] |= var_v0; - actor->iwork[22] |= (var_v0); - switch (actor->iwork[22]) { + switch (this->iwork[22]) { case 1: - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_6035E68); + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_6035E68); break; case 2: - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_6035ECC); + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_6035ECC); break; case 3: - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_6035F30); + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_6035F30); break; case 4: - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_6035F94); + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_6035F94); break; case 5: - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_6035FF8); + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_6035FF8); break; case 6: - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_603605C); + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_603605C); break; case 7: - actor->state = 1; - actor->timer_0BC = 60; - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_60359AC); + this->state = 1; + this->timer_0BC = 60; + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_60359AC); break; } (*arg1)++; break; + case 4: break; + default: break; } } -void Macbeth_Actor211_Update(Actor* actor) { - switch (actor->state) { +void Macbeth_MaTrainCar5_Update(MaTrainCar5* this) { + switch (this->state) { case 0: - Macbeth_8019A198(actor); - Macbeth_801A015C(actor); - Macbeth_8019D910(actor, &actor->iwork[10], &actor->iwork[11], 1, actor->fwork[21], -420.0f, - &actor->iwork[12], &actor->iwork[13]); - Macbeth_8019D910(actor, &actor->iwork[14], &actor->iwork[15], 2, actor->fwork[25], 0.0f, &actor->iwork[16], - &actor->iwork[17]); - Macbeth_8019D910(actor, &actor->iwork[18], &actor->iwork[19], 3, actor->fwork[23], 420.0f, - &actor->iwork[20], &actor->iwork[21]); - Macbeth_8019A830(actor); + Macbeth_8019A198(this); + Macbeth_801A015C(this); + Macbeth_8019D910(this, &this->iwork[10], &this->iwork[11], 1, this->fwork[21], -420.0f, &this->iwork[12], + &this->iwork[13]); + Macbeth_8019D910(this, &this->iwork[14], &this->iwork[15], 2, this->fwork[25], 0.0f, &this->iwork[16], + &this->iwork[17]); + Macbeth_8019D910(this, &this->iwork[18], &this->iwork[19], 3, this->fwork[23], 420.0f, &this->iwork[20], + &this->iwork[21]); + Macbeth_8019A830(this); break; + case 1: - if (actor->iwork[5] < D_MA_801BE2F0[3]) { - D_MA_801BE2F0[3] = actor->iwork[5]; + if (this->iwork[5] < D_MA_801BE2F0[3]) { + D_MA_801BE2F0[3] = this->iwork[5]; } - actor->state = 2; - Macbeth_801A015C(actor); - Macbeth_8019A830(actor); + this->state = 2; + Macbeth_801A015C(this); + Macbeth_8019A830(this); break; + case 2: - Macbeth_8019BBEC(actor); - if (actor->timer_0BC == 0) { - actor->timer_0BC = 60; + Macbeth_8019BBEC(this); + if (this->timer_0BC == 0) { + this->timer_0BC = 60; } - Math_SmoothStepToF(&actor->vel.z, 0.0f, 0.02f, 10.0f, 0.01f); - Macbeth_801A015C(actor); - Macbeth_8019A87C(actor); - if (actor->dmgType != DMG_NONE) { - actor->dmgType = DMG_NONE; - actor->timer_0BC = 20; - Macbeth_8019BE50(actor); - actor->state = 3; + Math_SmoothStepToF(&this->vel.z, 0.0f, 0.02f, 10.0f, 0.01f); + Macbeth_801A015C(this); + Macbeth_8019A87C(this); + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + this->timer_0BC = 20; + Macbeth_8019BE50(this); + this->state = 3; } break; + case 3: - Macbeth_801A015C(actor); - Math_SmoothStepToF(&actor->scale, 0.0f, 0.02f, 10.0f, 0.01f); - if (actor->timer_0BC <= 0) { - Object_Kill(&actor->obj, actor->sfxSource); + Macbeth_801A015C(this); + Math_SmoothStepToF(&this->scale, 0.0f, 0.02f, 10.0f, 0.01f); + if (this->timer_0BC <= 0) { + Object_Kill(&this->obj, this->sfxSource); } break; } } + f32 D_i5_801BE240; f32 D_i5_801BE244; f32 D_i5_801BE248; f32 D_i5_801BE24C; -void Macbeth_8019E624(Actor* actor, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f32 arg5, s32* arg6) { + +void Macbeth_8019E624(Actor* this, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f32 arg5, s32* arg6) { switch (*arg1) { case 0: - if (((actor->dmgType != DMG_NONE) && (arg3 == actor->dmgPart)) || - ((D_MA_801BE2F0[1] - 1 == actor->iwork[5]) && (actor->iwork[5] < D_MA_801BE2F0[3])) || - (((D_MA_801BE2F0[1] + 1) == actor->iwork[5]) && (D_MA_801BE2F0[3] < actor->iwork[5]))) { - AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, actor->sfxSource, 4); - actor->dmgType = DMG_NONE; - func_effect_8007C120(actor->obj.pos.x + arg4, actor->obj.pos.y + 200.0f, actor->obj.pos.z + arg5, - actor->vel.x, actor->vel.y, actor->vel.z, 0.15f, 10); - actor->iwork[7] = 15; - *arg2 -= actor->damage; - if ((*arg2 <= 0) || - ((D_MA_801BE2F0[1] - 1 == actor->iwork[5]) && (actor->iwork[5] < D_MA_801BE2F0[3])) || - (((D_MA_801BE2F0[1] + 1) == actor->iwork[5]) && (D_MA_801BE2F0[3] < actor->iwork[5]))) { + if (((this->dmgType != DMG_NONE) && (arg3 == this->dmgPart)) || + ((D_MA_801BE2F0[1] - 1 == this->iwork[5]) && (this->iwork[5] < D_MA_801BE2F0[3])) || + (((D_MA_801BE2F0[1] + 1) == this->iwork[5]) && (D_MA_801BE2F0[3] < this->iwork[5]))) { + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, this->sfxSource, 4); + + this->dmgType = DMG_NONE; + + Effect_Effect390_Spawn(this->obj.pos.x + arg4, this->obj.pos.y + 200.0f, this->obj.pos.z + arg5, + this->vel.x, this->vel.y, this->vel.z, 0.15f, 10); + + this->iwork[7] = 15; + + *arg2 -= this->damage; + if ((*arg2 <= 0) || ((D_MA_801BE2F0[1] - 1 == this->iwork[5]) && (this->iwork[5] < D_MA_801BE2F0[3])) || + (((D_MA_801BE2F0[1] + 1) == this->iwork[5]) && (D_MA_801BE2F0[3] < this->iwork[5]))) { (*arg1)++; } - } else if (actor->dmgType != DMG_NONE) { - actor->dmgType = DMG_NONE; - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); + } else if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } - Macbeth_8019B580(actor, arg2); + Macbeth_8019B580(this, arg2); break; + case 1: - Macbeth_8019A8C8(actor, 5); + Macbeth_8019A8C8(this, 5); *arg6 = 1; *arg2 = 80; (*arg1)++; break; + case 2: - if (((actor->dmgType != DMG_NONE) && (arg3 == actor->dmgPart)) || - ((D_MA_801BE2F0[1] - 1 == actor->iwork[5]) && (actor->iwork[5] < D_MA_801BE2F0[3])) || - (((D_MA_801BE2F0[1] + 1) == actor->iwork[5]) && (D_MA_801BE2F0[3] < actor->iwork[5]))) { - AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, actor->sfxSource, 4); - actor->dmgType = DMG_NONE; - func_effect_8007C120(actor->obj.pos.x + arg4, actor->obj.pos.y + 200.0f, actor->obj.pos.z + arg5, - actor->vel.x, actor->vel.y, actor->vel.z, 0.2f, 10); - actor->iwork[7] = 15; - *arg2 -= actor->damage; - if ((*arg2 <= 0) || - ((D_MA_801BE2F0[1] - 1 == actor->iwork[5]) && (actor->iwork[5] < D_MA_801BE2F0[3])) || - (((D_MA_801BE2F0[1] + 1) == actor->iwork[5]) && (D_MA_801BE2F0[3] < actor->iwork[5]))) { + if (((this->dmgType != DMG_NONE) && (arg3 == this->dmgPart)) || + ((D_MA_801BE2F0[1] - 1 == this->iwork[5]) && (this->iwork[5] < D_MA_801BE2F0[3])) || + (((D_MA_801BE2F0[1] + 1) == this->iwork[5]) && (D_MA_801BE2F0[3] < this->iwork[5]))) { + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, this->sfxSource, 4); + + this->dmgType = DMG_NONE; + + Effect_Effect390_Spawn(this->obj.pos.x + arg4, this->obj.pos.y + 200.0f, this->obj.pos.z + arg5, + this->vel.x, this->vel.y, this->vel.z, 0.2f, 10); + + this->iwork[7] = 15; + + *arg2 -= this->damage; + if ((*arg2 <= 0) || ((D_MA_801BE2F0[1] - 1 == this->iwork[5]) && (this->iwork[5] < D_MA_801BE2F0[3])) || + (((D_MA_801BE2F0[1] + 1) == this->iwork[5]) && (D_MA_801BE2F0[3] < this->iwork[5]))) { gHitCount++; (*arg1)++; } } else { - if (actor->dmgType != DMG_NONE) { - actor->dmgType = DMG_NONE; - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } } break; + case 3: - Macbeth_8019A8C8(actor, 1); + Macbeth_8019A8C8(this, 1); *arg6 = 2; - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_60359AC); + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_60359AC); (*arg1)++; - actor->state = 1; + this->state = 1; break; + case 4: break; } } -void Macbeth_Actor208_Update(Actor* actor) { - switch (actor->state) { +void Macbeth_MaTrainCar2_Update(Actor* this) { + switch (this->state) { case 0: - Macbeth_8019A198(actor); - Macbeth_801A015C(actor); - Macbeth_8019E624(actor, &actor->iwork[10], &actor->iwork[11], 1, actor->fwork[25], 0.0f, &actor->iwork[13]); - Macbeth_8019A830(actor); + Macbeth_8019A198(this); + Macbeth_801A015C(this); + Macbeth_8019E624(this, &this->iwork[10], &this->iwork[11], 1, this->fwork[25], 0.0f, &this->iwork[13]); + Macbeth_8019A830(this); break; + case 1: - if (actor->iwork[5] < D_MA_801BE2F0[3]) { - D_MA_801BE2F0[3] = actor->iwork[5]; + if (this->iwork[5] < D_MA_801BE2F0[3]) { + D_MA_801BE2F0[3] = this->iwork[5]; } - Macbeth_801A015C(actor); - Macbeth_8019A830(actor); - actor->state = 2; + Macbeth_801A015C(this); + Macbeth_8019A830(this); + this->state = 2; break; + case 2: - Macbeth_8019BBEC(actor); - if (actor->timer_0BC == 0) { - actor->timer_0BC = 60; + Macbeth_8019BBEC(this); + + if (this->timer_0BC == 0) { + this->timer_0BC = 60; } - Math_SmoothStepToF(&actor->vel.z, 0.0f, 0.02f, 10.0f, 0.01f); - Macbeth_801A015C(actor); - Macbeth_8019A87C(actor); - if (actor->dmgType != DMG_NONE) { - actor->dmgType = DMG_NONE; - actor->timer_0BC = 20; - Macbeth_8019BE50(actor); - actor->state = 3; - break; + + Math_SmoothStepToF(&this->vel.z, 0.0f, 0.02f, 10.0f, 0.01f); + Macbeth_801A015C(this); + Macbeth_8019A87C(this); + + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + this->timer_0BC = 20; + Macbeth_8019BE50(this); + this->state = 3; } break; + case 3: - Macbeth_801A015C(actor); - Math_SmoothStepToF(&actor->scale, 0.0f, 0.02f, 10.0f, 0.01f); - if (actor->timer_0BC <= 0) { - Object_Kill(&actor->obj, actor->sfxSource); + Macbeth_801A015C(this); + Math_SmoothStepToF(&this->scale, 0.0f, 0.02f, 10.0f, 0.01f); + if (this->timer_0BC <= 0) { + Object_Kill(&this->obj, this->sfxSource); } break; } } -void Macbeth_8019EBF8(Actor* actor, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f32 arg5, s32* arg6) { +void Macbeth_8019EBF8(Actor* this, s32* arg1, s32* arg2, s32 arg3, f32 arg4, f32 arg5, s32* arg6) { switch (*arg1) { case 0: - if (((actor->dmgType != DMG_NONE) && (arg3 == actor->dmgPart)) || - ((D_MA_801BE2F0[1] - 1 == actor->iwork[5]) && (actor->iwork[5] < D_MA_801BE2F0[3])) || - (((D_MA_801BE2F0[1] + 1) == actor->iwork[5]) && (D_MA_801BE2F0[3] < actor->iwork[5]))) { - AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, actor->sfxSource, 4); - actor->dmgType = DMG_NONE; - func_effect_8007C120(actor->obj.pos.x + arg4, actor->obj.pos.y + 200.0f, actor->obj.pos.z + arg5, - actor->vel.x, actor->vel.y, actor->vel.z, 0.15f, 10); - actor->iwork[7] = 15; - *arg2 -= actor->damage; - if ((*arg2 <= 0) || - ((D_MA_801BE2F0[1] - 1 == actor->iwork[5]) && (actor->iwork[5] < D_MA_801BE2F0[3])) || - (((D_MA_801BE2F0[1] + 1) == actor->iwork[5]) && (D_MA_801BE2F0[3] < actor->iwork[5]))) { + if (((this->dmgType != DMG_NONE) && (arg3 == this->dmgPart)) || + ((D_MA_801BE2F0[1] - 1 == this->iwork[5]) && (this->iwork[5] < D_MA_801BE2F0[3])) || + (((D_MA_801BE2F0[1] + 1) == this->iwork[5]) && (D_MA_801BE2F0[3] < this->iwork[5]))) { + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, this->sfxSource, 4); + + this->dmgType = DMG_NONE; + + Effect_Effect390_Spawn(this->obj.pos.x + arg4, this->obj.pos.y + 200.0f, this->obj.pos.z + arg5, + this->vel.x, this->vel.y, this->vel.z, 0.15f, 10); + + this->iwork[7] = 15; + + *arg2 -= this->damage; + if ((*arg2 <= 0) || ((D_MA_801BE2F0[1] - 1 == this->iwork[5]) && (this->iwork[5] < D_MA_801BE2F0[3])) || + (((D_MA_801BE2F0[1] + 1) == this->iwork[5]) && (D_MA_801BE2F0[3] < this->iwork[5]))) { gHitCount++; (*arg1)++; } - } else if (actor->dmgType != DMG_NONE) { - actor->dmgType = DMG_NONE; - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); + } else if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } - Macbeth_8019B580(actor, arg2); - return; + Macbeth_8019B580(this, arg2); + break; + case 1: - Macbeth_8019AF34(actor); + Macbeth_8019AF34(this); *arg6 = 2; - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_60359AC); + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_60359AC); (*arg1)++; - return; + break; + case 2: - actor->state = 1; - return; + this->state = 1; + break; } } -void Macbeth_Actor213_Update(Actor* actor) { - switch (actor->state) { +void Macbeth_MaTrainCar7_Update(Actor* this) { + switch (this->state) { case 0: - Macbeth_8019A198(actor); - Macbeth_801A015C(actor); - Macbeth_8019EBF8(actor, &actor->iwork[10], &actor->iwork[11], 1, actor->fwork[25], 0.0f, &actor->iwork[13]); - Macbeth_8019A830(actor); + Macbeth_8019A198(this); + Macbeth_801A015C(this); + Macbeth_8019EBF8(this, &this->iwork[10], &this->iwork[11], 1, this->fwork[25], 0.0f, &this->iwork[13]); + Macbeth_8019A830(this); break; + case 1: - if (actor->iwork[5] < D_MA_801BE2F0[3]) { - D_MA_801BE2F0[3] = actor->iwork[5]; + if (this->iwork[5] < D_MA_801BE2F0[3]) { + D_MA_801BE2F0[3] = this->iwork[5]; } + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 255; gCameraShake = 35; - if ((gPlayer[0].trueZpos - actor->obj.pos.z > -200.0f) && - (gPlayer[0].trueZpos - actor->obj.pos.z < 200.0f) && (gPlayer[0].pos.y - actor->obj.pos.y > -300.0f) && - (gPlayer[0].pos.y - actor->obj.pos.y < 300.0f) && (gPlayer[0].pos.x - actor->obj.pos.x > -800.0f) && - (gPlayer[0].pos.x - actor->obj.pos.x < 800.0f)) { + + if ((gPlayer[0].trueZpos - this->obj.pos.z > -200.0f) && (gPlayer[0].trueZpos - this->obj.pos.z < 200.0f) && + (gPlayer[0].pos.y - this->obj.pos.y > -300.0f) && (gPlayer[0].pos.y - this->obj.pos.y < 300.0f) && + (gPlayer[0].pos.x - this->obj.pos.x > -800.0f) && (gPlayer[0].pos.x - this->obj.pos.x < 800.0f)) { gFillScreenRed = gFillScreenAlpha = 255; gFillScreenGreen = gFillScreenBlue = 0; Player_ApplyDamage(&gPlayer[0], 0, 60); } - Macbeth_801A015C(actor); - Macbeth_8019A830(actor); + + Macbeth_801A015C(this); + Macbeth_8019A830(this); + D_ctx_801779A8[gMainController] = 100.0f; - actor->state = 2; + this->state = 2; break; + case 2: if (gCameraShake == 20) { - D_MA_801BE2F0[1] = actor->iwork[5]; + D_MA_801BE2F0[1] = this->iwork[5]; } - Macbeth_8019BBEC(actor); - if (actor->timer_0BC == 0) { - actor->timer_0BC = 60; + + Macbeth_8019BBEC(this); + + if (this->timer_0BC == 0) { + this->timer_0BC = 60; } - Math_SmoothStepToF(&actor->vel.z, 0.0f, 0.02f, 10.0f, 0.01f); - Macbeth_801A015C(actor); - Macbeth_8019A87C(actor); + + Math_SmoothStepToF(&this->vel.z, 0.0f, 0.02f, 10.0f, 0.01f); + + Macbeth_801A015C(this); + Macbeth_8019A87C(this); + if (gCameraShake == 20) { - actor->dmgType = DMG_NONE; - actor->timer_0BC = 20; - Macbeth_8019BE50(actor); - actor->state = 3; + this->dmgType = DMG_NONE; + this->timer_0BC = 20; + Macbeth_8019BE50(this); + this->state = 3; } break; + case 3: - Macbeth_801A015C(actor); - Math_SmoothStepToF(&actor->scale, 0.0f, 0.02f, 10.0f, 0.01f); - if (actor->timer_0BC <= 0) { - Object_Kill(&actor->obj, actor->sfxSource); + Macbeth_801A015C(this); + Math_SmoothStepToF(&this->scale, 0.0f, 0.02f, 10.0f, 0.01f); + if (this->timer_0BC <= 0) { + Object_Kill(&this->obj, this->sfxSource); } break; } } -void Macbeth_8019F164(Actor* actor) { +void Macbeth_8019F164(MaTrainCar6* this) { static Vec3f D_i5_801BA708 = { 0.0f, 610.0f, 0.0f }; static Vec3f D_i5_801BA714 = { 0.0f, 0.0f, 65.0f }; Vec3f sp84; @@ -1491,277 +1716,312 @@ void Macbeth_8019F164(Actor* actor) { Vec3f sp54; Vec3f sp48; s16 i; - s16 sp44; + s16 sp44 = 0; - sp44 = 0; - sp6C.x = gPlayer[0].pos.x - actor->obj.pos.x + actor->fwork[25]; - sp6C.y = gPlayer[0].pos.y - 25.0f - actor->obj.pos.y + actor->fwork[8] + 25.0f; - sp6C.z = gPlayer[0].trueZpos - 500.0f - actor->obj.pos.z; + sp6C.x = gPlayer[0].pos.x - this->obj.pos.x + this->fwork[25]; + sp6C.y = gPlayer[0].pos.y - 25.0f - this->obj.pos.y + this->fwork[8] + 25.0f; + sp6C.z = gPlayer[0].trueZpos - 500.0f - this->obj.pos.z; for (i = 0; i < ARRAY_COUNT(gActors); i++) { if ((gActors[i].obj.id == OBJ_ACTOR_219) && (gActors[i].obj.status == OBJ_ACTIVE)) { - if ((actor->obj.pos.z < (gActors[i].obj.pos.z + 3000.0f)) && - ((gActors[i].obj.pos.z - actor->obj.pos.z) < 5000.0f)) { - sp6C.x = gActors[i].obj.pos.x - actor->obj.pos.x + actor->fwork[25]; - sp6C.y = gActors[i].obj.pos.y - actor->obj.pos.y + actor->fwork[8] + 25.0f; - sp6C.z = gActors[i].obj.pos.z + 300.0f - actor->obj.pos.z; + if ((this->obj.pos.z < (gActors[i].obj.pos.z + 3000.0f)) && + ((gActors[i].obj.pos.z - this->obj.pos.z) < 5000.0f)) { + sp6C.x = gActors[i].obj.pos.x - this->obj.pos.x + this->fwork[25]; + sp6C.y = gActors[i].obj.pos.y - this->obj.pos.y + this->fwork[8] + 25.0f; + sp6C.z = gActors[i].obj.pos.z + 300.0f - this->obj.pos.z; sp44 = 1; } break; } } - if ((actor->iwork[4] == 0) || (sp44 != 0)) { - Matrix_RotateZ(gCalcMatrix, -actor->obj.rot.z * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -(actor->obj.rot.x + actor->fwork[29]) * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gCalcMatrix, -(actor->obj.rot.y + actor->fwork[26]) * M_DTOR, MTXF_APPLY); + + if ((this->iwork[4] == 0) || (sp44 != 0)) { + Matrix_RotateZ(gCalcMatrix, -this->obj.rot.z * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(this->obj.rot.x + this->fwork[29]) * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -(this->obj.rot.y + this->fwork[26]) * M_DTOR, MTXF_APPLY); + Matrix_MultVec3f(gCalcMatrix, &sp6C, &sp84); + sp78.x = sp84.x - D_i5_801BA708.x; sp78.y = sp84.y - D_i5_801BA708.y; sp78.z = sp84.z - D_i5_801BA708.z; - Math_SmoothStepToAngle(&actor->fwork[4], Math_RadToDeg(Math_Atan2F(sp78.x, sp78.z)), 0.1f, 2.0f, 0.01f); - Math_SmoothStepToAngle(&actor->fwork[3], Math_RadToDeg(-Math_Atan2F(sp78.y, sqrtf(SQ(sp78.x) + SQ(sp78.z)))), + + Math_SmoothStepToAngle(&this->fwork[4], Math_RadToDeg(Math_Atan2F(sp78.x, sp78.z)), 0.1f, 2.0f, 0.01f); + Math_SmoothStepToAngle(&this->fwork[3], Math_RadToDeg(-Math_Atan2F(sp78.y, sqrtf(SQ(sp78.x) + SQ(sp78.z)))), 0.1f, 2.0f, 0.01f); - if ((actor->fwork[4] > 120.0f) && (actor->fwork[4] < 180.0f)) { - actor->fwork[4] = 120.0f; + if ((this->fwork[4] > 120.0f) && (this->fwork[4] < 180.0f)) { + this->fwork[4] = 120.0f; } - if ((actor->fwork[4] < 240.0f) && (actor->fwork[4] > 180.0f)) { - actor->fwork[4] = 240.0f; + if ((this->fwork[4] < 240.0f) && (this->fwork[4] > 180.0f)) { + this->fwork[4] = 240.0f; } - if ((actor->fwork[3] > 60.0f) && (actor->fwork[3] < 180.0f)) { - actor->fwork[3] = 60.0f; + if ((this->fwork[3] > 60.0f) && (this->fwork[3] < 180.0f)) { + this->fwork[3] = 60.0f; } - if ((actor->fwork[3] < 300.0f) && (actor->fwork[3] > 180.0f)) { - actor->fwork[3] = 300.0f; + if ((this->fwork[3] < 300.0f) && (this->fwork[3] > 180.0f)) { + this->fwork[3] = 300.0f; } } - Math_SmoothStepToAngle(&actor->fwork[2], actor->fwork[4], 0.2f, 5.0f, 0.01f); - Math_SmoothStepToAngle(&actor->fwork[1], actor->fwork[3], 0.2f, 5.0f, 0.01f); - Matrix_RotateY(gCalcMatrix, (actor->obj.rot.y + actor->fwork[26]) * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, (actor->obj.rot.x + actor->fwork[29]) * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, MTXF_APPLY); + + Math_SmoothStepToAngle(&this->fwork[2], this->fwork[4], 0.2f, 5.0f, 0.01f); + Math_SmoothStepToAngle(&this->fwork[1], this->fwork[3], 0.2f, 5.0f, 0.01f); + + Matrix_RotateY(gCalcMatrix, (this->obj.rot.y + this->fwork[26]) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, (this->obj.rot.x + this->fwork[29]) * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_MultVec3f(gCalcMatrix, &D_i5_801BA708, &sp84); - sp60.x = sp84.x + actor->obj.pos.x + actor->fwork[25]; - sp60.y = sp84.y + actor->obj.pos.y + actor->fwork[8] + 25.0f; - sp60.z = sp84.z + actor->obj.pos.z; - sp54.x = actor->fwork[1]; - sp54.y = actor->fwork[2]; + + sp60.x = sp84.x + this->obj.pos.x + this->fwork[25]; + sp60.y = sp84.y + this->obj.pos.y + this->fwork[8] + 25.0f; + sp60.z = sp84.z + this->obj.pos.z; + + sp54.x = this->fwork[1]; + sp54.y = this->fwork[2]; sp54.z = 0.0f; - sp48.x = actor->obj.rot.x + actor->fwork[29]; - sp48.y = actor->obj.rot.y + actor->fwork[26]; - sp48.z = actor->obj.rot.z; - switch (actor->iwork[4]) { + + sp48.x = this->obj.rot.x + this->fwork[29]; + sp48.y = this->obj.rot.y + this->fwork[26]; + sp48.z = this->obj.rot.z; + + switch (this->iwork[4]) { case 0: if (sp44 != 0) { sp60.x -= 60.0f; func_effect_8007EE68(OBJ_EFFECT_378, &sp60, &sp54, &sp48, &D_i5_801BA714, 1.0f); - AUDIO_PLAY_SFX(NA_SE_EN_MISSILE_SHOT, actor->sfxSource, 4); - actor->iwork[4]++; - } else if ((D_i5_801BE310 == actor->iwork[5]) || - ((gPlayer[0].pos.x - actor->obj.pos.x > 300.0f) && - (gPlayer[0].pos.x - actor->obj.pos.x < 3000.0f)) || - ((gPlayer[0].pos.x - actor->obj.pos.x < -300.0f) && - (gPlayer[0].pos.x - actor->obj.pos.x > -3000.0f))) { - if ((gPlayer[0].trueZpos - actor->obj.pos.z < 5000.0f) && - (gPlayer[0].trueZpos - actor->obj.pos.z > 200.0f) && (actor->timer_0BC == 0) && - (actor->health != 0)) { + AUDIO_PLAY_SFX(NA_SE_EN_MISSILE_SHOT, this->sfxSource, 4); + this->iwork[4]++; + } else if ((D_i5_801BE310 == this->iwork[5]) || + ((gPlayer[0].pos.x - this->obj.pos.x > 300.0f) && + (gPlayer[0].pos.x - this->obj.pos.x < 3000.0f)) || + ((gPlayer[0].pos.x - this->obj.pos.x < -300.0f) && + (gPlayer[0].pos.x - this->obj.pos.x > -3000.0f))) { + if ((gPlayer[0].trueZpos - this->obj.pos.z < 5000.0f) && + (gPlayer[0].trueZpos - this->obj.pos.z > 200.0f) && (this->timer_0BC == 0) && (this->health != 0)) { sp60.x -= 60.0f; func_effect_8007EE68(OBJ_EFFECT_378, &sp60, &sp54, &sp48, &D_i5_801BA714, 1.0f); - AUDIO_PLAY_SFX(NA_SE_EN_MISSILE_SHOT, actor->sfxSource, 4); - actor->iwork[4]++; + AUDIO_PLAY_SFX(NA_SE_EN_MISSILE_SHOT, this->sfxSource, 4); + this->iwork[4]++; } } break; + case 1: - Math_SmoothStepToF(&actor->fwork[0], -100.0f, 0.8f, 30.0f, 20.0f); - if (actor->fwork[0] <= -100.0f) { - actor->iwork[4]++; + Math_SmoothStepToF(&this->fwork[0], -100.0f, 0.8f, 30.0f, 20.0f); + if (this->fwork[0] <= -100.0f) { + this->iwork[4]++; } break; + case 2: - Math_SmoothStepToF(&actor->fwork[0], 0.0f, 0.6f, 30.0f, 0.2f); - if (actor->fwork[0] >= 0.0f) { + Math_SmoothStepToF(&this->fwork[0], 0.0f, 0.6f, 30.0f, 0.2f); + if (this->fwork[0] >= 0.0f) { if (sp44 == 0) { - actor->timer_0BC = 15; + this->timer_0BC = 15; } - actor->iwork[4]++; + this->iwork[4]++; } break; + case 3: - if ((actor->timer_0BC == 0) && (actor->health != 0)) { + if ((this->timer_0BC == 0) && (this->health != 0)) { func_effect_8007EE68(OBJ_EFFECT_378, &sp60, &sp54, &sp48, &D_i5_801BA714, 1.0f); - AUDIO_PLAY_SFX(NA_SE_EN_MISSILE_SHOT, actor->sfxSource, 4); - actor->iwork[4]++; + AUDIO_PLAY_SFX(NA_SE_EN_MISSILE_SHOT, this->sfxSource, 4); + this->iwork[4]++; } break; + case 4: - Math_SmoothStepToF(&actor->fwork[0], -100.0f, 0.8f, 30.0f, 20.0f); - if (actor->fwork[0] <= -100.0f) { - actor->iwork[4]++; + Math_SmoothStepToF(&this->fwork[0], -100.0f, 0.8f, 30.0f, 20.0f); + if (this->fwork[0] <= -100.0f) { + this->iwork[4]++; } break; + case 5: - Math_SmoothStepToF(&actor->fwork[0], 0.0f, 0.6f, 30.0f, 0.2f); - if (actor->fwork[0] >= 0.0f) { + Math_SmoothStepToF(&this->fwork[0], 0.0f, 0.6f, 30.0f, 0.2f); + if (this->fwork[0] >= 0.0f) { if (sp44 == 0) { - actor->timer_0BC = 15; + this->timer_0BC = 15; } - actor->iwork[4]++; + this->iwork[4]++; } break; + case 6: - if ((actor->timer_0BC == 0) && (actor->health != 0)) { + if ((this->timer_0BC == 0) && (this->health != 0)) { sp60.x += 60.0f; func_effect_8007EE68(OBJ_EFFECT_378, &sp60, &sp54, &sp48, &D_i5_801BA714, 1.0f); - AUDIO_PLAY_SFX(NA_SE_EN_MISSILE_SHOT, actor->sfxSource, 4); - actor->iwork[4]++; + AUDIO_PLAY_SFX(NA_SE_EN_MISSILE_SHOT, this->sfxSource, 4); + this->iwork[4]++; } break; + case 7: - Math_SmoothStepToF(&actor->fwork[0], -100.0f, 0.8f, 30.0f, 20.0f); - if (actor->fwork[0] <= -100.0f) { - actor->iwork[4]++; + Math_SmoothStepToF(&this->fwork[0], -100.0f, 0.8f, 30.0f, 20.0f); + if (this->fwork[0] <= -100.0f) { + this->iwork[4]++; } break; + case 8: - Math_SmoothStepToF(&actor->fwork[0], 0.0f, 0.6f, 30.0f, 0.2f); - if (actor->fwork[0] >= 0.0f) { + Math_SmoothStepToF(&this->fwork[0], 0.0f, 0.6f, 30.0f, 0.2f); + if (this->fwork[0] >= 0.0f) { if (sp44 == 0) { - actor->timer_0BC = (u32) (RAND_FLOAT(100.0f) + 50.0f); + this->timer_0BC = (u32) (RAND_FLOAT(100.0f) + 50.0f); } - actor->iwork[4] = 0; + this->iwork[4] = 0; } break; + default: break; } } -void Macbeth_8019FC54(Actor* actor, s32* arg1, s32* arg2, s32 arg3, s32 arg4, f32 arg5, f32 arg6, s32* arg7) { +void Macbeth_8019FC54(Actor* this, s32* arg1, s32* arg2, s32 arg3, s32 arg4, f32 arg5, f32 arg6, s32* arg7) { switch (*arg1) { case 0: - if (((actor->dmgType != DMG_NONE) && (actor->dmgPart >= arg3) && (arg4 >= actor->dmgPart)) || - ((D_MA_801BE2F0[1] - 1 == actor->iwork[5]) && (actor->iwork[5] < D_MA_801BE2F0[3])) || - (((D_MA_801BE2F0[1] + 1) == actor->iwork[5]) && (D_MA_801BE2F0[3] < actor->iwork[5]))) { - AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, actor->sfxSource, 4); - actor->dmgType = DMG_NONE; - func_effect_8007C120(actor->obj.pos.x + arg5, actor->obj.pos.y + 200.0f, actor->obj.pos.z + arg6, - actor->vel.x, actor->vel.y, actor->vel.z, 0.15f, 10); - actor->iwork[7] = 15; - *arg2 -= actor->damage; - if ((*arg2 <= 0) || - ((D_MA_801BE2F0[1] - 1 == actor->iwork[5]) && (actor->iwork[5] < D_MA_801BE2F0[3])) || - (((D_MA_801BE2F0[1] + 1) == actor->iwork[5]) && (D_MA_801BE2F0[3] < actor->iwork[5]))) { + if (((this->dmgType != DMG_NONE) && (this->dmgPart >= arg3) && (arg4 >= this->dmgPart)) || + ((D_MA_801BE2F0[1] - 1 == this->iwork[5]) && (this->iwork[5] < D_MA_801BE2F0[3])) || + (((D_MA_801BE2F0[1] + 1) == this->iwork[5]) && (D_MA_801BE2F0[3] < this->iwork[5]))) { + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, this->sfxSource, 4); + + this->dmgType = DMG_NONE; + + Effect_Effect390_Spawn(this->obj.pos.x + arg5, this->obj.pos.y + 200.0f, this->obj.pos.z + arg6, + this->vel.x, this->vel.y, this->vel.z, 0.15f, 10); + this->iwork[7] = 15; + + *arg2 -= this->damage; + if ((*arg2 <= 0) || ((D_MA_801BE2F0[1] - 1 == this->iwork[5]) && (this->iwork[5] < D_MA_801BE2F0[3])) || + (((D_MA_801BE2F0[1] + 1) == this->iwork[5]) && (D_MA_801BE2F0[3] < this->iwork[5]))) { gHitCount++; - if ((actor->obj.id == OBJ_ACTOR_210) && (actor->iwork[3] < 2)) { + if ((this->obj.id == OBJ_ACTOR_MA_TRAIN_CAR_4) && (this->iwork[3] < 2)) { gHitCount += 5; } (*arg1)++; } - } else if (actor->dmgType != DMG_NONE) { - actor->dmgType = DMG_NONE; - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); + } else if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } - Macbeth_8019B580(actor, arg2); + Macbeth_8019B580(this, arg2); break; + case 1: - Macbeth_8019A8C8(actor, 6); - if (actor->obj.id == OBJ_ACTOR_212) { - func_effect_8007BFFC(actor->obj.pos.x + actor->fwork[25], actor->obj.pos.y + 360.0f, actor->obj.pos.z, - 0.0f, 0.0f, 0.0f, 20.0f, 20); - func_effect_8007BFFC(actor->obj.pos.x + actor->fwork[25], actor->obj.pos.y + 660.0f, actor->obj.pos.z, - 0.0f, 0.0f, 0.0f, 20.0f, 20); + Macbeth_8019A8C8(this, 6); + if (this->obj.id == OBJ_ACTOR_MA_TRAIN_CAR_6) { + Effect386_Spawn1(this->obj.pos.x + this->fwork[25], this->obj.pos.y + 360.0f, this->obj.pos.z, 0.0f, + 0.0f, 0.0f, 20.0f, 20); + Effect386_Spawn1(this->obj.pos.x + this->fwork[25], this->obj.pos.y + 660.0f, this->obj.pos.z, 0.0f, + 0.0f, 0.0f, 20.0f, 20); } *arg7 = 2; - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_60359AC); + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_60359AC); (*arg1)++; - actor->state = 1; + this->state = 1; break; + case 2: break; } } -void Macbeth_Actor212_Update(Actor* actor) { - switch (actor->state) { +void Macbeth_MaTrainCar6_Update(MaTrainCar6* this) { + switch (this->state) { case 0: - Macbeth_8019A198(actor); - Macbeth_801A015C(actor); - Macbeth_8019FC54(actor, &actor->iwork[10], &actor->iwork[11], 1, 3, actor->fwork[25], 0.0f, - &actor->iwork[13]); - Macbeth_8019A728(actor); - if (actor->iwork[1] != 0) { - Macbeth_8019F164(actor); + Macbeth_8019A198(this); + Macbeth_801A015C(this); + Macbeth_8019FC54(this, &this->iwork[10], &this->iwork[11], 1, 3, this->fwork[25], 0.0f, &this->iwork[13]); + Macbeth_8019A728(this); + + if (this->iwork[1] != 0) { + Macbeth_8019F164(this); } - Macbeth_8019A830(actor); + + Macbeth_8019A830(this); break; + case 1: - if (actor->iwork[5] < D_MA_801BE2F0[3]) { - D_MA_801BE2F0[3] = actor->iwork[5]; + if (this->iwork[5] < D_MA_801BE2F0[3]) { + D_MA_801BE2F0[3] = this->iwork[5]; } - actor->state = 2; - Macbeth_801A015C(actor); - Macbeth_8019A830(actor); + this->state = 2; + Macbeth_801A015C(this); + Macbeth_8019A830(this); break; + case 2: - Macbeth_8019BBEC(actor); - if (actor->timer_0BC == 0) { - actor->timer_0BC = 60; + Macbeth_8019BBEC(this); + + if (this->timer_0BC == 0) { + this->timer_0BC = 60; } - Math_SmoothStepToF(&actor->vel.z, 0.0f, 0.02f, 10.0f, 0.01f); - Macbeth_801A015C(actor); - Macbeth_8019A87C(actor); - if (actor->dmgType != DMG_NONE) { - actor->dmgType = DMG_NONE; - actor->timer_0BC = 20; - Macbeth_8019BE50(actor); - actor->state = 3; + + Math_SmoothStepToF(&this->vel.z, 0.0f, 0.02f, 10.0f, 0.01f); + + Macbeth_801A015C(this); + Macbeth_8019A87C(this); + + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + this->timer_0BC = 20; + Macbeth_8019BE50(this); + this->state = 3; } break; + case 3: - Macbeth_801A015C(actor); - Math_SmoothStepToF(&actor->scale, 0.0f, 0.02f, 10.0f, 0.01f); - if (actor->timer_0BC <= 0) { - Object_Kill(&actor->obj, actor->sfxSource); + Macbeth_801A015C(this); + Math_SmoothStepToF(&this->scale, 0.0f, 0.02f, 10.0f, 0.01f); + + if (this->timer_0BC <= 0) { + Object_Kill(&this->obj, this->sfxSource); } break; } } -void Macbeth_801A015C(Actor* actor) { - if (!Macbeth_801A0308(actor, actor->obj.pos.z, actor->obj.rot.y, 0)) { - actor->obj.pos.x = actor->fwork[19]; - actor->obj.pos.y = actor->fwork[5]; - if (!Macbeth_801A0308(actor, actor->obj.pos.z - 420.0f, actor->fwork[22], 1)) { - actor->fwork[21] = actor->fwork[19] - actor->obj.pos.x; - actor->fwork[22] = actor->fwork[20]; - actor->fwork[6] = actor->fwork[5] - actor->obj.pos.y; - actor->fwork[27] = actor->fwork[9]; - if (!Macbeth_801A0308(actor, actor->obj.pos.z + 420.0f, actor->fwork[24], 2)) { - actor->fwork[23] = actor->fwork[19] - actor->obj.pos.x; - actor->fwork[24] = actor->fwork[20]; - actor->fwork[7] = actor->fwork[5] - actor->obj.pos.y; - actor->fwork[28] = actor->fwork[9]; - if (actor->fwork[19] - actor->obj.pos.x < actor->fwork[21]) { - actor->fwork[25] = actor->fwork[23] + ((actor->fwork[21] - actor->fwork[23]) / 2); +void Macbeth_801A015C(Actor* this) { + if (!Macbeth_801A0308(this, this->obj.pos.z, this->obj.rot.y, 0)) { + this->obj.pos.x = this->fwork[19]; + this->obj.pos.y = this->fwork[5]; + + if (!Macbeth_801A0308(this, this->obj.pos.z - 420.0f, this->fwork[22], 1)) { + this->fwork[21] = this->fwork[19] - this->obj.pos.x; + this->fwork[22] = this->fwork[20]; + this->fwork[6] = this->fwork[5] - this->obj.pos.y; + this->fwork[27] = this->fwork[9]; + + if (!Macbeth_801A0308(this, this->obj.pos.z + 420.0f, this->fwork[24], 2)) { + this->fwork[23] = this->fwork[19] - this->obj.pos.x; + this->fwork[24] = this->fwork[20]; + this->fwork[7] = this->fwork[5] - this->obj.pos.y; + this->fwork[28] = this->fwork[9]; + + if (this->fwork[19] - this->obj.pos.x < this->fwork[21]) { + this->fwork[25] = this->fwork[23] + ((this->fwork[21] - this->fwork[23]) / 2); } else { - actor->fwork[25] = actor->fwork[21] + ((actor->fwork[23] - actor->fwork[21]) / 2); + this->fwork[25] = this->fwork[21] + ((this->fwork[23] - this->fwork[21]) / 2); } - if (actor->fwork[7] < actor->fwork[6]) { - actor->fwork[8] = actor->fwork[7] + ((actor->fwork[6] - actor->fwork[7]) / 2); + if (this->fwork[7] < this->fwork[6]) { + this->fwork[8] = this->fwork[7] + ((this->fwork[6] - this->fwork[7]) / 2); } else { - actor->fwork[8] = actor->fwork[6] + ((actor->fwork[7] - actor->fwork[6]) / 2); + this->fwork[8] = this->fwork[6] + ((this->fwork[7] - this->fwork[6]) / 2); } - actor->fwork[26] = (actor->fwork[22] + actor->fwork[24]) / 2; - actor->fwork[29] = (actor->fwork[27] + actor->fwork[28]) / 2; + + this->fwork[26] = (this->fwork[22] + this->fwork[24]) / 2; + this->fwork[29] = (this->fwork[27] + this->fwork[28]) / 2; } } } } -bool Macbeth_801A0308(Actor* actor, f32 arg1, f32 arg2, u8 arg3) { +bool Macbeth_801A0308(Actor* this, f32 arg1, f32 arg2, u8 arg3) { s16 var_a0; s16 sp4C; f32 temp_fv0; @@ -1777,8 +2037,7 @@ bool Macbeth_801A0308(Actor* actor, f32 arg1, f32 arg2, u8 arg3) { switch (D_MA_801BE2F0[5]) { case 0: - - for (var_a0 = actor->fwork[arg3 + 16]; D_i5_801B8E50[var_a0].unk_10 != 0; var_a0++) { + for (var_a0 = this->fwork[arg3 + 16]; D_i5_801B8E50[var_a0].unk_10 != 0; var_a0++) { if (D_i5_801B8E50[var_a0].unk_00 < arg1) { if (var_a0 == 0) { var_a0 = 1; @@ -1793,28 +2052,33 @@ bool Macbeth_801A0308(Actor* actor, f32 arg1, f32 arg2, u8 arg3) { sp34 = D_i5_801B8E50[var_a0].unk_04; sp30 = D_i5_801B8E50[var_a0].unk_08; sp28 = D_i5_801B8E50[var_a0].unk_0C; + if (sp38 >= 180.0f) { sp38 -= 360.0f; } if (sp28 >= 180.0f) { sp28 -= 360.0f; } - if (D_i5_801B8E50[var_a0 - 1].unk_10 == OBJ_SCENERY_104) { + + if (D_i5_801B8E50[var_a0 - 1].unk_10 == OBJ_SCENERY_MA_SWITCH_TRACK) { sp38 = 0.0f; } - if (D_i5_801B8E50[var_a0].unk_10 == OBJ_SCENERY_104) { + if (D_i5_801B8E50[var_a0].unk_10 == OBJ_SCENERY_MA_SWITCH_TRACK) { sp28 = 0.0f; } - actor->fwork[arg3 + 16] = var_a0; + + this->fwork[arg3 + 16] = var_a0; break; } } + if (D_i5_801B8E50[var_a0].unk_10 == 0) { - actor->fwork[arg3 + 16] = 1.0f; + this->fwork[arg3 + 16] = 1.0f; } break; + case 1: - for (var_a0 = actor->fwork[arg3 + 16]; D_i5_801B9A80[var_a0].unk_10 != 0; var_a0++) { + for (var_a0 = this->fwork[arg3 + 16]; D_i5_801B9A80[var_a0].unk_10 != 0; var_a0++) { if (D_i5_801B9A80[var_a0].unk_00 < arg1) { if (var_a0 == 0) { var_a0 = 1; @@ -1829,76 +2093,87 @@ bool Macbeth_801A0308(Actor* actor, f32 arg1, f32 arg2, u8 arg3) { sp34 = D_i5_801B9A80[var_a0].unk_04; sp30 = D_i5_801B9A80[var_a0].unk_08; sp28 = D_i5_801B9A80[var_a0].unk_0C; + if (sp38 >= 180.0f) { sp38 -= 360.0f; } if (sp28 >= 180.0f) { sp28 -= 360.0f; } - if (D_i5_801B8E50[var_a0 - 1].unk_10 == OBJ_SCENERY_104) { + + if (D_i5_801B8E50[var_a0 - 1].unk_10 == OBJ_SCENERY_MA_SWITCH_TRACK) { sp38 = 0.0f; } - if (D_i5_801B8E50[var_a0].unk_10 == OBJ_SCENERY_104) { + if (D_i5_801B8E50[var_a0].unk_10 == OBJ_SCENERY_MA_SWITCH_TRACK) { sp28 = 0.0f; } - actor->fwork[arg3 + 16] = var_a0; + + this->fwork[arg3 + 16] = var_a0; break; } } + if (D_i5_801B9A80[var_a0].unk_10 == 0) { - actor->fwork[arg3 + 16] = 1.0f; + this->fwork[arg3 + 16] = 1.0f; } break; } sp24 = 1.0f - ((sp2C - arg1) / (sp2C - sp3C)); - if ((sp4C == OBJ_SCENERY_95) || (sp4C == OBJ_SCENERY_96) || (sp4C == OBJ_SCENERY_98) || (sp4C == OBJ_SCENERY_99)) { - if ((actor->iwork[5] < (s32) D_i5_801BA1E4) && (actor->iwork[5] < D_MA_801BE2F0[3])) { - actor->vel.z *= 0.98f; + + if ((sp4C == OBJ_SCENERY_MA_TRAIN_TRACK_4) || (sp4C == OBJ_SCENERY_MA_TRAIN_TRACK_5) || + (sp4C == OBJ_SCENERY_MA_TRAIN_TRACK_7) || (sp4C == OBJ_SCENERY_MA_TRAIN_TRACK_8)) { + if ((this->iwork[5] < (s32) D_i5_801BA1E4) && (this->iwork[5] < D_MA_801BE2F0[3])) { + this->vel.z *= 0.98f; } + temp_fv0 = fabsf((sp2C - sp3C) / 3.0f); + if (sp24 < 0.3333333f) { - if ((sp4C == OBJ_SCENERY_95) || (sp4C == OBJ_SCENERY_98)) { - actor->fwork[19] = (((sp34 - sp44) * sp24) + sp44) - - (52.160667f * (1.0f - (((sp3C - temp_fv0) - arg1) / ((sp3C - temp_fv0) - sp3C)))); + if ((sp4C == OBJ_SCENERY_MA_TRAIN_TRACK_4) || (sp4C == OBJ_SCENERY_MA_TRAIN_TRACK_7)) { + this->fwork[19] = (((sp34 - sp44) * sp24) + sp44) - + (52.160667f * (1.0f - (((sp3C - temp_fv0) - arg1) / ((sp3C - temp_fv0) - sp3C)))); } else { - actor->fwork[19] = ((sp34 - sp44) * sp24) + sp44 + - (52.160667f * (1.0f - (((sp3C - temp_fv0) - arg1) / ((sp3C - temp_fv0) - sp3C)))); + this->fwork[19] = ((sp34 - sp44) * sp24) + sp44 + + (52.160667f * (1.0f - (((sp3C - temp_fv0) - arg1) / ((sp3C - temp_fv0) - sp3C)))); } } else if (sp24 < 0.666666f) { - if ((sp4C == OBJ_SCENERY_95) || (sp4C == OBJ_SCENERY_98)) { - actor->fwork[19] = (((sp34 - sp44) * sp24) + sp44) - 52.160667f; + if ((sp4C == OBJ_SCENERY_MA_TRAIN_TRACK_4) || (sp4C == OBJ_SCENERY_MA_TRAIN_TRACK_7)) { + this->fwork[19] = (((sp34 - sp44) * sp24) + sp44) - 52.160667f; } else { - actor->fwork[19] = ((sp34 - sp44) * sp24) + sp44 + 52.160667f; + this->fwork[19] = ((sp34 - sp44) * sp24) + sp44 + 52.160667f; } - } else if ((sp4C == OBJ_SCENERY_95) || (sp4C == OBJ_SCENERY_98)) { - actor->fwork[19] = (((sp34 - sp44) * sp24) + sp44) - - (52.160667f * (1.0f - (1.0f - ((sp2C - arg1) / (sp2C - (sp3C - (temp_fv0 * 2))))))); + } else if ((sp4C == OBJ_SCENERY_MA_TRAIN_TRACK_4) || (sp4C == OBJ_SCENERY_MA_TRAIN_TRACK_7)) { + this->fwork[19] = (((sp34 - sp44) * sp24) + sp44) - + (52.160667f * (1.0f - (1.0f - ((sp2C - arg1) / (sp2C - (sp3C - (temp_fv0 * 2))))))); } else { - actor->fwork[19] = ((sp34 - sp44) * sp24) + sp44 + - (52.160667f * (1.0f - (1.0f - ((sp2C - arg1) / (sp2C - (sp3C - (temp_fv0 * 2))))))); + this->fwork[19] = ((sp34 - sp44) * sp24) + sp44 + + (52.160667f * (1.0f - (1.0f - ((sp2C - arg1) / (sp2C - (sp3C - (temp_fv0 * 2))))))); } } else { - if (sp4C == OBJ_SCENERY_104) { - if ((actor->iwork[5] < (s32) D_i5_801BA1E4) && (actor->iwork[5] < D_MA_801BE2F0[3])) { - actor->vel.z *= 0.94f; + if (sp4C == OBJ_SCENERY_MA_SWITCH_TRACK) { + if ((this->iwork[5] < (s32) D_i5_801BA1E4) && (this->iwork[5] < D_MA_801BE2F0[3])) { + this->vel.z *= 0.94f; } } - actor->fwork[19] = ((sp34 - sp44) * sp24) + sp44; + this->fwork[19] = ((sp34 - sp44) * sp24) + sp44; } - actor->fwork[5] = ((sp30 - sp40) * sp24) + sp40; - if ((sp4C == OBJ_SCENERY_100) || (sp4C == OBJ_SCENERY_102)) { - Math_SmoothStepToF(&actor->fwork[9], 3.0f, 0.05f, 1.0f, 0.001f); - } else if ((sp4C == OBJ_SCENERY_101) || (sp4C == OBJ_SCENERY_103)) { - Math_SmoothStepToF(&actor->fwork[9], -3.0f, 0.05f, 1.0f, 0.001f); + + this->fwork[5] = ((sp30 - sp40) * sp24) + sp40; + + if ((sp4C == OBJ_SCENERY_MA_TRAIN_TRACK_9) || (sp4C == OBJ_SCENERY_MA_TRAIN_TRACK_11)) { + Math_SmoothStepToF(&this->fwork[9], 3.0f, 0.05f, 1.0f, 0.001f); + } else if ((sp4C == OBJ_SCENERY_MA_TRAIN_TRACK_10) || (sp4C == OBJ_SCENERY_MA_TRAIN_TRACK_12)) { + Math_SmoothStepToF(&this->fwork[9], -3.0f, 0.05f, 1.0f, 0.001f); } else { - Math_SmoothStepToF(&actor->fwork[9], 0.0f, 0.05f, 1.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[9], 0.0f, 0.05f, 1.0f, 0.0f); } - actor->fwork[20] = ((sp28 - sp38) * sp24) + sp38; + + this->fwork[20] = ((sp28 - sp38) * sp24) + sp38; return false; } -bool Macbeth_801A0A74(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { +bool Macbeth_801A0A74(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { if ((limbIndex == 5) || (limbIndex == 6)) { gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); } else { @@ -1910,22 +2185,21 @@ bool Macbeth_801A0A74(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return false; } -bool Macbeth_801A0B00(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { +bool Macbeth_801A0B00(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { if (limbIndex == 3) { *dList = NULL; } return false; } -bool Macbeth_801A0B20(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { - Actor* actor = (Actor*) data; +bool Macbeth_801A0B20(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { + Actor* actor = (Actor*) thisx; if ((limbIndex == 3) || (limbIndex == 7)) { gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); } else { gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); } - if (limbIndex == 1) { pos->z += actor->fwork[0]; } @@ -1936,59 +2210,63 @@ bool Macbeth_801A0B20(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return false; } -void Macbeth_Scenery104_Update(Scenery* scenery) { - switch (scenery->state) { +void Macbeth_MaSwitchTrack_Update(MaSwitchTrack* this) { + switch (this->state) { case 0: - scenery->vel.y = 0.0f; - scenery->vel.x = 0.0f; + this->vel.y = 0.0f; + this->vel.x = 0.0f; if (D_i5_801BE312 != 0) { - scenery->state = 1; - scenery->timer_4C = 20; + this->state = 1; + this->timer_4C = 20; } break; + case 1: - if (scenery->timer_4C == 1) { + if (this->timer_4C == 1) { AUDIO_PLAY_SFX(NA_SE_TANK_BURNER_HALF, gPlayer[0].sfxSource, 0); } - if (scenery->timer_4C <= 0) { - Math_SmoothStepToF(&scenery->vel.x, 1751.0f, 0.2f, 80.0f, 1.0f); - if (scenery->vel.x >= 1750.0) { - AUDIO_PLAY_SFX(NA_SE_OB_POINT_SWITCH, scenery->sfxSource, 0); + if (this->timer_4C <= 0) { + Math_SmoothStepToF(&this->vel.x, 1751.0f, 0.2f, 80.0f, 1.0f); + if (this->vel.x >= 1750.0) { + AUDIO_PLAY_SFX(NA_SE_OB_POINT_SWITCH, this->sfxSource, 0); Audio_KillSfxBySourceAndId(gPlayer[0].sfxSource, NA_SE_TANK_BURNER_HALF); - scenery->timer_4C = 5; - scenery->state = 2; + this->timer_4C = 5; + this->state = 2; } } break; + case 2: - Math_SmoothStepToF(&scenery->vel.y, -11.0f, 0.1f, 2.5f, 0.01f); - if (scenery->vel.y <= -10.0f) { - scenery->state = 3; + Math_SmoothStepToF(&this->vel.y, -11.0f, 0.1f, 2.5f, 0.01f); + if (this->vel.y <= -10.0f) { + this->state = 3; } break; + case 3: break; } - if (scenery->timer_4C != 0) { - scenery->vel.z = 2.0f + RAND_FLOAT(1.0f); + + if (this->timer_4C != 0) { + this->vel.z = 2.0f + RAND_FLOAT(1.0f); } else { - scenery->vel.z = 1.0f + RAND_FLOAT(1.0f); + this->vel.z = 1.0f + RAND_FLOAT(1.0f); } } -bool Macbeth_801A0DD8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { - Scenery* scenery = (Scenery*) data; +bool Macbeth_801A0DD8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { + Scenery* this = (Scenery*) thisx; if (limbIndex == 5) { - rot->y += scenery->vel.y; + rot->y += this->vel.y; } if ((limbIndex == 1) || (limbIndex == 2)) { - pos->z -= scenery->vel.x; + pos->z -= this->vel.x; } return false; } -void Macbeth_801A0E2C(s32 limbIndex, Vec3f* rot, void* data) { +void Macbeth_801A0E2C(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp24 = { 0.0f, 0.0f, 0.0f }; s32 pad; @@ -2002,24 +2280,26 @@ void Macbeth_801A0E2C(s32 limbIndex, Vec3f* rot, void* data) { } } -bool Macbeth_801A0EB8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { - Actor* actor = (Actor*) data; +bool Macbeth_MaLocomotive_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { + MaLocomotive* this = (MaLocomotive*) thisx; RCP_SetupDL(&gMasterDisp, SETUPDL_29); gSPClearGeometryMode(gMasterDisp++, G_TEXTURE_GEN); + if ((limbIndex == 3) || (limbIndex == 6) || (limbIndex == 9)) { gSPTexture(gMasterDisp++, 3000, 3000, 0, G_TX_RENDERTILE, G_ON); gSPSetGeometryMode(gMasterDisp++, G_TEXTURE_GEN); } + if ((limbIndex == 5) || (limbIndex == 9)) { - if ((actor->iwork[7] % 2) != 0) { + if ((this->iwork[7] % 2) != 0) { RCP_SetupDL_27(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } - if ((actor->iwork[7] > 0) && (limbIndex == 5)) { - actor->iwork[7]--; + if ((this->iwork[7] > 0) && (limbIndex == 5)) { + this->iwork[7]--; } - rot->x += actor->fwork[2]; + rot->x += this->fwork[2]; if (limbIndex == 5) { RCP_SetupDL(&gMasterDisp, SETUPDL_34); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, D_i5_801BE368[20], D_i5_801BE368[21], D_i5_801BE368[22], 255); @@ -2027,121 +2307,130 @@ bool Macbeth_801A0EB8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* RCP_SetupDL(&gMasterDisp, SETUPDL_29); } } + switch (limbIndex) { case 1: - rot->x += actor->fwork[3] / 2; + rot->x += this->fwork[3] / 2; break; case 2: - rot->x -= actor->fwork[3] / 2; + rot->x -= this->fwork[3] / 2; break; } return false; } -void Macbeth_801A1268(s32 limbIndex, Vec3f* rot, void* data) { - Vec3f sp1C = { 0.0f, 0.0f, 0.0f }; - Actor* actor = (Actor*) data; +void Macbeth_MaLocomotive_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { + Vec3f src = { 0.0f, 0.0f, 0.0f }; + MaLocomotive* this = (MaLocomotive*) thisx; if (limbIndex == 4) { - Matrix_MultVec3f(gCalcMatrix, &sp1C, actor->vwork); + Matrix_MultVec3f(gCalcMatrix, &src, this->vwork); } } // Actors 205, 206, 208, 209, 210, 211, 212, 213 -void Macbeth_ActorDoodad_Draw(Actor* actor) { - Vec3f spD0[50]; +void Macbeth_Train_Draw(Actor* this) { + Vec3f frameTable[50]; s32 id; if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) { - if (((gPlayer[0].trueZpos - actor->obj.pos.z) > 7000.0f) || - ((gPlayer[0].trueZpos - actor->obj.pos.z) < -1000.0f)) { + if (((gPlayer[0].trueZpos - this->obj.pos.z) > 7000.0f) || + ((gPlayer[0].trueZpos - this->obj.pos.z) < -1000.0f)) { return; } } else { - if (((gPlayer[0].trueZpos - actor->obj.pos.z) > 7000.0f) || - ((gPlayer[0].trueZpos - actor->obj.pos.z) < -5000.0f)) { + if (((gPlayer[0].trueZpos - this->obj.pos.z) > 7000.0f) || + ((gPlayer[0].trueZpos - this->obj.pos.z) < -5000.0f)) { return; } } Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, actor->fwork[25], actor->fwork[8] + 25.0f, 0.0f, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, actor->fwork[26] * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, actor->fwork[29] * M_DTOR, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, this->fwork[25], this->fwork[8] + 25.0f, 0.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, this->fwork[26] * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, this->fwork[29] * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - if ((actor->obj.id != OBJ_ACTOR_206) && (actor->obj.id != OBJ_ACTOR_205)) { - if (((gPlayer[0].trueZpos - actor->obj.pos.z) > 3000.0f) && (D_i5_801BE310 != actor->iwork[5])) { + if ((this->obj.id != OBJ_ACTOR_MA_TRAIN_CAR_1) && (this->obj.id != OBJ_ACTOR_MA_LOCOMOTIVE)) { + if (((gPlayer[0].trueZpos - this->obj.pos.z) > 3000.0f) && (D_i5_801BE310 != this->iwork[5])) { gSPDisplayList(gMasterDisp++, D_MA_6027BF0); gSPDisplayList(gMasterDisp++, D_MA_601BE90); } else { - Matrix_Scale(gGfxMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY); - Animation_GetFrameData(&D_MA_602EA0C, 0, spD0); - Animation_DrawSkeleton(1, D_MA_602EBB8, spD0, Macbeth_801A0A74, NULL, actor, &gIdentityMatrix); + Matrix_Scale(gGfxMatrix, this->scale, this->scale, this->scale, MTXF_APPLY); + Animation_GetFrameData(&D_MA_602EA0C, 0, frameTable); + Animation_DrawSkeleton(1, D_MA_602EBB8, frameTable, Macbeth_801A0A74, NULL, this, &gIdentityMatrix); } } - switch (actor->obj.id) { - case OBJ_ACTOR_212: - if (actor->iwork[13] == 0) { - if ((actor->iwork[7] % 2) != 0) { + + switch (this->obj.id) { + case OBJ_ACTOR_MA_TRAIN_CAR_6: + if (this->iwork[13] == 0) { + if ((this->iwork[7] % 2) != 0) { RCP_SetupDL_27(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } - if (actor->iwork[7] > 0) { - actor->iwork[7]--; + if (this->iwork[7] > 0) { + this->iwork[7]--; } - Animation_GetFrameData(&D_MA_6027320, 0, spD0); - Animation_DrawSkeleton(1, D_MA_602742C, spD0, Macbeth_801A0B20, NULL, actor, &gIdentityMatrix); + Animation_GetFrameData(&D_MA_6027320, 0, frameTable); + Animation_DrawSkeleton(1, D_MA_602742C, frameTable, Macbeth_801A0B20, NULL, this, &gIdentityMatrix); } break; - case OBJ_ACTOR_210: - if (actor->iwork[13] == 0) { - Animation_GetFrameData(&D_MA_6027A04, 0, spD0); - Animation_DrawSkeleton(1, D_MA_6027AF0, spD0, Macbeth_801A0B00, NULL, actor, &gIdentityMatrix); + + case OBJ_ACTOR_MA_TRAIN_CAR_4: + if (this->iwork[13] == 0) { + Animation_GetFrameData(&D_MA_6027A04, 0, frameTable); + Animation_DrawSkeleton(1, D_MA_6027AF0, frameTable, Macbeth_801A0B00, NULL, this, &gIdentityMatrix); + Matrix_Translate(gGfxMatrix, 0.0f, 205.0f, 0.0f, MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, actor->fwork[4] * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, this->fwork[4] * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - if ((actor->iwork[7] % 2) != 0) { + + if ((this->iwork[7] % 2) != 0) { RCP_SetupDL_27(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } - if (actor->iwork[7] > 0) { - actor->iwork[7]--; + if (this->iwork[7] > 0) { + this->iwork[7]--; } - if (actor->iwork[3] >= 3) { + + if (this->iwork[3] >= 3) { gSPDisplayList(gMasterDisp++, D_MA_6027EB0); } else { gSPDisplayList(gMasterDisp++, D_MA_60288A0); } } break; - case OBJ_ACTOR_209: - if (actor->iwork[17] != 2) { + + case OBJ_ACTOR_MA_TRAIN_CAR_3: + if (this->iwork[17] != 2) { Matrix_Translate(gGfxMatrix, 0.0f, 5.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - if ((actor->iwork[8] % 2) != 0) { + if ((this->iwork[8] % 2) != 0) { RCP_SetupDL_27(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } - if (actor->iwork[8] > 0) { - actor->iwork[8]--; + if (this->iwork[8] > 0) { + this->iwork[8]--; } gSPDisplayList(gMasterDisp++, D_MA_6029890); RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } break; - case OBJ_ACTOR_211: - if (actor->iwork[17] != 2) { + + case OBJ_ACTOR_MA_TRAIN_CAR_5: + if (this->iwork[17] != 2) { Matrix_Translate(gGfxMatrix, 0.0f, -15.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - if ((actor->iwork[8] % 2) != 0) { + + if ((this->iwork[8] % 2) != 0) { RCP_SetupDL_27(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } - if (actor->iwork[8] > 0) { - actor->iwork[8]--; + if (this->iwork[8] > 0) { + this->iwork[8]--; } - if (actor->iwork[17] == 0) { + if (this->iwork[17] == 0) { gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_MA_6004440); } else { @@ -2153,32 +2442,34 @@ void Macbeth_ActorDoodad_Draw(Actor* actor) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } break; - case OBJ_ACTOR_213: - if (actor->iwork[13] < 2) { + + case OBJ_ACTOR_MA_TRAIN_CAR_7: + if (this->iwork[13] < 2) { Matrix_Translate(gGfxMatrix, 0.0f, -5.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL(&gMasterDisp, SETUPDL_57); - if ((actor->iwork[7] % 2) != 0) { + if ((this->iwork[7] % 2) != 0) { RCP_SetupDL_27(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } - if (actor->iwork[7] > 0) { - actor->iwork[7]--; + if (this->iwork[7] > 0) { + this->iwork[7]--; } gSPDisplayList(gMasterDisp++, D_MA_6024670); RCP_SetupDL(&gMasterDisp, SETUPDL_29); } break; - case OBJ_ACTOR_208: - if (actor->iwork[13] < 2) { - if ((actor->iwork[7] % 2) != 0) { + + case OBJ_ACTOR_MA_TRAIN_CAR_2: + if (this->iwork[13] < 2) { + if ((this->iwork[7] % 2) != 0) { RCP_SetupDL_27(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } - if (actor->iwork[7] > 0) { - actor->iwork[7]--; + if (this->iwork[7] > 0) { + this->iwork[7]--; } - if (actor->iwork[13] == 0) { + if (this->iwork[13] == 0) { Matrix_Translate(gGfxMatrix, 0.0f, -5.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_MA_60269E0); @@ -2190,20 +2481,27 @@ void Macbeth_ActorDoodad_Draw(Actor* actor) { gDPSetTextureFilter(gMasterDisp++, G_TF_BILERP); } break; - case OBJ_ACTOR_206: - Animation_GetFrameData(&D_MA_601EAB0, 0, spD0); - Animation_DrawSkeleton(1, D_MA_601EBBC, spD0, Macbeth_801AC5AC, NULL, actor, &gIdentityMatrix); + + case OBJ_ACTOR_MA_TRAIN_CAR_1: + Animation_GetFrameData(&D_MA_601EAB0, 0, frameTable); + Animation_DrawSkeleton(1, D_MA_601EBBC, frameTable, Macbeth_MaTrainCar1_OverrideLimbDraw, NULL, this, + &gIdentityMatrix); break; - case OBJ_ACTOR_205: - Matrix_Translate(gGfxMatrix, actor->fwork[3], 0.0f, 0.0f, MTXF_APPLY); + + case OBJ_ACTOR_MA_LOCOMOTIVE: + Matrix_Translate(gGfxMatrix, this->fwork[3], 0.0f, 0.0f, MTXF_APPLY); + if (D_i5_801BE320[21] == 0) { - Animation_GetFrameData(&D_MA_6010220, 0, spD0); + Animation_GetFrameData(&D_MA_6010220, 0, frameTable); } else if (D_i5_801BE320[21] == 1) { - Animation_GetFrameData(&D_MA_600FEC4, D_i5_801BE320[22], spD0); + Animation_GetFrameData(&D_MA_600FEC4, D_i5_801BE320[22], frameTable); } else { - Animation_GetFrameData(&D_MA_6010144, D_i5_801BE320[22], spD0); + Animation_GetFrameData(&D_MA_6010144, D_i5_801BE320[22], frameTable); } - Animation_DrawSkeleton(1, D_MA_601042C, spD0, Macbeth_801A0EB8, Macbeth_801A1268, actor, &gIdentityMatrix); + + Animation_DrawSkeleton(1, D_MA_601042C, frameTable, Macbeth_MaLocomotive_OverrideLimbDraw, + Macbeth_MaLocomotive_PostLimbDraw, this, &gIdentityMatrix); + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) { RCP_SetupDL(&gMasterDisp, SETUPDL_29); gSPClearGeometryMode(gMasterDisp++, G_TEXTURE_GEN); @@ -2211,52 +2509,60 @@ void Macbeth_ActorDoodad_Draw(Actor* actor) { } break; } + Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, actor->fwork[21], actor->fwork[6] + 65.0f, -420.0f, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, actor->fwork[22] * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, actor->fwork[27] * M_DTOR, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, this->fwork[21], this->fwork[6] + 65.0f, -420.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, this->fwork[22] * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, this->fwork[27] * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - Matrix_Scale(gGfxMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY); - if ((gPlayer[0].trueZpos - actor->obj.pos.z) > 3000.0f) { + Matrix_Scale(gGfxMatrix, this->scale, this->scale, this->scale, MTXF_APPLY); + + if ((gPlayer[0].trueZpos - this->obj.pos.z) > 3000.0f) { gSPDisplayList(gMasterDisp++, D_MA_6027D40); - } else if (actor->vel.z > -2.0f) { + } else if (this->vel.z > -2.0f) { gSPDisplayList(gMasterDisp++, D_MA_60227F0); } else { gSPDisplayList(gMasterDisp++, D_MA_60239D0); } + Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, actor->fwork[23], actor->fwork[7] + 65.0f, 420.0f, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, actor->fwork[24] * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, actor->fwork[28] * M_DTOR, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, this->fwork[23], this->fwork[7] + 65.0f, 420.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, this->fwork[24] * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, this->fwork[28] * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->scale, this->scale, this->scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL(&gMasterDisp, SETUPDL_29); - if ((gPlayer[0].trueZpos - actor->obj.pos.z) > 3000.0f) { + + if ((gPlayer[0].trueZpos - this->obj.pos.z) > 3000.0f) { gSPDisplayList(gMasterDisp++, D_MA_6027D40); - } else if (actor->vel.z > -2.0f) { + } else if (this->vel.z > -2.0f) { gSPDisplayList(gMasterDisp++, D_MA_60227F0); } else { gSPDisplayList(gMasterDisp++, D_MA_60239D0); } + Matrix_Pop(&gGfxMatrix); - id = actor->obj.id; - if ((id == OBJ_ACTOR_209) || (id == OBJ_ACTOR_211)) { - if (actor->iwork[13] != 2) { + + id = this->obj.id; + if ((id == OBJ_ACTOR_MA_TRAIN_CAR_3) || (id == OBJ_ACTOR_MA_TRAIN_CAR_5)) { + if (this->iwork[13] != 2) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, actor->fwork[21], actor->fwork[6] + 10.0f, -420.0f, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, actor->fwork[26] * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, actor->fwork[29] * M_DTOR, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, this->fwork[21], this->fwork[6] + 10.0f, -420.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, this->fwork[26] * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, this->fwork[29] * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - if ((actor->iwork[7] % 2) != 0) { + + if ((this->iwork[7] % 2) != 0) { RCP_SetupDL_27(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } - if (actor->iwork[7] > 0) { - actor->iwork[7]--; + if (this->iwork[7] > 0) { + this->iwork[7]--; } - if (actor->iwork[13] == 0) { + + if (this->iwork[13] == 0) { gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_MA_6004440); } else { @@ -2268,20 +2574,23 @@ void Macbeth_ActorDoodad_Draw(Actor* actor) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); Matrix_Pop(&gGfxMatrix); } - if (actor->iwork[21] != 2) { + + if (this->iwork[21] != 2) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, actor->fwork[23], actor->fwork[7] + 10.0f, 420.0f, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, actor->fwork[26] * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, actor->fwork[29] * M_DTOR, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, this->fwork[23], this->fwork[7] + 10.0f, 420.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, this->fwork[26] * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, this->fwork[29] * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - if ((actor->iwork[9] % 2) != 0) { + + if ((this->iwork[9] % 2) != 0) { RCP_SetupDL_27(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } - if (actor->iwork[9] > 0) { - actor->iwork[9]--; + if (this->iwork[9] > 0) { + this->iwork[9]--; } - if (actor->iwork[21] == 0) { + + if (this->iwork[21] == 0) { gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_MA_6004440); } else { @@ -2296,51 +2605,58 @@ void Macbeth_ActorDoodad_Draw(Actor* actor) { } } -// Scenery 92 to 105 -void Macbeth_SceneryDoodad_Draw(Scenery* scenery) { - Vec3f sp78[50]; +void Macbeth_TrainTrack_Draw(Scenery* this) { + Vec3f frameTable[50]; RCP_SetupDL(&gMasterDisp, SETUPDL_57); - switch (scenery->obj.id) { - case OBJ_SCENERY_94: - case OBJ_SCENERY_97: + + switch (this->obj.id) { + case OBJ_SCENERY_MA_TRAIN_TRACK_3: + case OBJ_SCENERY_MA_TRAIN_TRACK_6: if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) && - ((gPlayer[0].trueZpos - scenery->obj.pos.z) < -2500.0f)) { - Object_Kill(&scenery->obj, scenery->sfxSource); + ((gPlayer[0].trueZpos - this->obj.pos.z) < -2500.0f)) { + Object_Kill(&this->obj, this->sfxSource); } gSPDisplayList(gMasterDisp++, D_MA_6026860); break; - case OBJ_SCENERY_95: - case OBJ_SCENERY_98: + + case OBJ_SCENERY_MA_TRAIN_TRACK_4: + case OBJ_SCENERY_MA_TRAIN_TRACK_7: if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) && - ((gPlayer[0].trueZpos - scenery->obj.pos.z) < -2500.0f)) { - Object_Kill(&scenery->obj, scenery->sfxSource); + ((gPlayer[0].trueZpos - this->obj.pos.z) < -2500.0f)) { + Object_Kill(&this->obj, this->sfxSource); } gSPDisplayList(gMasterDisp++, D_MA_602FBF0); break; - case OBJ_SCENERY_96: - case OBJ_SCENERY_99: + + case OBJ_SCENERY_MA_TRAIN_TRACK_5: + case OBJ_SCENERY_MA_TRAIN_TRACK_8: gSPDisplayList(gMasterDisp++, D_MA_6022610); break; - case OBJ_SCENERY_100: - case OBJ_SCENERY_102: + + case OBJ_SCENERY_MA_TRAIN_TRACK_9: + case OBJ_SCENERY_MA_TRAIN_TRACK_11: gSPDisplayList(gMasterDisp++, D_MA_60309D0); break; - case OBJ_SCENERY_101: - case OBJ_SCENERY_103: + + case OBJ_SCENERY_MA_TRAIN_TRACK_10: + case OBJ_SCENERY_MA_TRAIN_TRACK_12: gSPDisplayList(gMasterDisp++, D_MA_6030750); break; - case OBJ_SCENERY_105: + + case OBJ_SCENERY_MA_TRAIN_TRACK_13: RCP_SetupDL(&gMasterDisp, SETUPDL_29); gSPDisplayList(gMasterDisp++, D_MA_602D380); break; - case OBJ_SCENERY_104: + + case OBJ_SCENERY_MA_SWITCH_TRACK: Matrix_Push(&gGfxMatrix); - Animation_GetFrameData(&D_MA_6025CA0, 0, sp78); - Animation_DrawSkeleton(1, D_MA_6025DAC, sp78, Macbeth_801A0DD8, Macbeth_801A0E2C, scenery, + Animation_GetFrameData(&D_MA_6025CA0, 0, frameTable); + Animation_DrawSkeleton(1, D_MA_6025DAC, frameTable, Macbeth_801A0DD8, Macbeth_801A0E2C, this, &gIdentityMatrix); Matrix_Pop(&gGfxMatrix); - if ((scenery->state == 1) && (scenery->timer_4C <= 0)) { + + if ((this->state == 1) && (this->timer_4C <= 0)) { Matrix_Push(&gGfxMatrix); RCP_SetupDL_49(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); @@ -2348,7 +2664,7 @@ void Macbeth_SceneryDoodad_Draw(Scenery* scenery) { Matrix_Translate(gGfxMatrix, D_i5_801BE688[0].x, D_i5_801BE688[0].y + 50.0f, D_i5_801BE688[0].z + 100.0f, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, (D_PI / 2), MTXF_APPLY); - Matrix_Scale(gGfxMatrix, scenery->vel.z, scenery->vel.z / 2, scenery->vel.z, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->vel.z, this->vel.z / 2, this->vel.z, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); Matrix_Pop(&gGfxMatrix); @@ -2356,12 +2672,12 @@ void Macbeth_SceneryDoodad_Draw(Scenery* scenery) { Matrix_Translate(gGfxMatrix, D_i5_801BE688[1].x, D_i5_801BE688[1].y + 50.0f, D_i5_801BE688[1].z + 100.0f, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, (D_PI / 2), MTXF_APPLY); - Matrix_Scale(gGfxMatrix, scenery->vel.z, scenery->vel.z / 2, scenery->vel.z, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->vel.z, this->vel.z / 2, this->vel.z, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); RCP_SetupDL(&gMasterDisp, SETUPDL_29); Matrix_Pop(&gGfxMatrix); - } else if (scenery->state == 2) { + } else if (this->state == 2) { Matrix_Push(&gGfxMatrix); RCP_SetupDL_49(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); @@ -2369,12 +2685,13 @@ void Macbeth_SceneryDoodad_Draw(Scenery* scenery) { Matrix_Translate(gGfxMatrix, D_i5_801BE688[1].x - 50.0f, D_i5_801BE688[1].y + 50.0f, D_i5_801BE688[1].z + 50.0f, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, (D_PI / 2), MTXF_APPLY); - Matrix_Scale(gGfxMatrix, scenery->vel.z, scenery->vel.z / 2, scenery->vel.z, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->vel.z, this->vel.z / 2, this->vel.z, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); RCP_SetupDL(&gMasterDisp, SETUPDL_29); Matrix_Pop(&gGfxMatrix); } + if (D_MA_801BE2F0[5] != 0) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -1800.0f, MTXF_APPLY); @@ -2390,17 +2707,19 @@ void Macbeth_SceneryDoodad_Draw(Scenery* scenery) { Matrix_Pop(&gGfxMatrix); } break; - case OBJ_SCENERY_92: + + case OBJ_SCENERY_MA_TRAIN_TRACK_1: gSPDisplayList(gMasterDisp++, D_MA_60014A0); break; - case OBJ_SCENERY_93: + + case OBJ_SCENERY_MA_TRAIN_TRACK_2: gSPDisplayList(gMasterDisp++, D_MA_6001180); break; } RCP_SetupDL(&gMasterDisp, SETUPDL_29); } -void Macbeth_Scenery61_Draw(Scenery* scenery) { +void Macbeth_MaTower_Draw(Scenery* this) { RCP_SetupDL(&gMasterDisp, SETUPDL_57); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_MA_60253E0); @@ -2410,133 +2729,140 @@ void Macbeth_Scenery61_Draw(Scenery* scenery) { } // Scenery 77 to 82, and 84 to 91 -void Macbeth_SceneryDoodad2_Draw(Scenery* scenery) { +void Macbeth_IndicatorSign_Draw(Scenery* this) { if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) { - Object_Kill(&scenery->obj, scenery->sfxSource); + Object_Kill(&this->obj, this->sfxSource); } + RCP_SetupDL(&gMasterDisp, SETUPDL_57); - switch (scenery->obj.id) { - case OBJ_SCENERY_77: + + switch (this->obj.id) { + case OBJ_SCENERY_MA_INDICATOR_SIGN: gSPDisplayList(gMasterDisp++, D_MA_60066A0); break; - case OBJ_SCENERY_78: + case OBJ_SCENERY_MA_DISTANCE_SIGN_1: gSPDisplayList(gMasterDisp++, D_MA_6007430); break; - case OBJ_SCENERY_79: + case OBJ_SCENERY_MA_DISTANCE_SIGN_2: gSPDisplayList(gMasterDisp++, D_MA_6007360); break; - case OBJ_SCENERY_80: + case OBJ_SCENERY_MA_DISTANCE_SIGN_3: gSPDisplayList(gMasterDisp++, D_MA_6007290); break; - case OBJ_SCENERY_81: + case OBJ_SCENERY_MA_DISTANCE_SIGN_4: gSPDisplayList(gMasterDisp++, D_MA_60071C0); break; - case OBJ_SCENERY_82: + case OBJ_SCENERY_MA_DISTANCE_SIGN_5: gSPDisplayList(gMasterDisp++, D_MA_6007500); break; - case OBJ_SCENERY_84: + case OBJ_SCENERY_MA_RAILROAD_SWITCH_1: gSPDisplayList(gMasterDisp++, D_MA_600AD50); break; - case OBJ_SCENERY_85: + case OBJ_SCENERY_MA_RAILROAD_SWITCH_2: gSPDisplayList(gMasterDisp++, D_MA_600AA70); break; - case OBJ_SCENERY_86: + case OBJ_SCENERY_MA_RAILROAD_SWITCH_3: gSPDisplayList(gMasterDisp++, D_MA_6003070); break; - case OBJ_SCENERY_87: + case OBJ_SCENERY_MA_RAILROAD_SWITCH_4: gSPDisplayList(gMasterDisp++, D_MA_600A7D0); break; - case OBJ_SCENERY_88: + case OBJ_SCENERY_MA_RAILROAD_SWITCH_5: gSPDisplayList(gMasterDisp++, D_MA_600A4D0); break; - case OBJ_SCENERY_89: + case OBJ_SCENERY_MA_RAILROAD_SWITCH_6: gSPDisplayList(gMasterDisp++, D_MA_600A1F0); break; - case OBJ_SCENERY_90: + case OBJ_SCENERY_MA_RAILROAD_SWITCH_7: gSPDisplayList(gMasterDisp++, D_MA_6009F10); break; - case OBJ_SCENERY_91: + case OBJ_SCENERY_MA_RAILROAD_SWITCH_8: gSPDisplayList(gMasterDisp++, D_MA_6009C50); break; } RCP_SetupDL(&gMasterDisp, SETUPDL_29); } -void Macbeth_Scenery83_Update(Scenery* scenery) { +void Macbeth_MaTrainStopBlock_Update(MaTrainStopBlock* this) { s16 i; - switch (scenery->state) { + switch (this->state) { case 0: - if ((D_i5_801BE312 != 0) && (gActors[D_i5_801BE314].obj.pos.z - 900.0f < scenery->obj.pos.z)) { - scenery->state = 1; + if ((D_i5_801BE312 != 0) && (gActors[D_i5_801BE314].obj.pos.z - 900.0f < this->obj.pos.z)) { + this->state = 1; } break; + case 1: - Effect_SpawnTimedSfxAtPos(&scenery->obj.pos, NA_SE_EN_EXPLOSION_M); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_M); + gControllerRumbleFlags[gMainController] = 1; gControllerRumbleTimers[gMainController] = 15; + for (i = 0; i < 6; i++) { - func_effect_8007D2C8(scenery->obj.pos.x + D_i5_801BE6A0[i].x, scenery->obj.pos.y + D_i5_801BE6A0[i].y, - scenery->obj.pos.z + D_i5_801BE6A0[i].z, 18.0f); - Macbeth_801AD624( - scenery->obj.pos.x + D_i5_801BE6A0[i].x, scenery->obj.pos.y + D_i5_801BE6A0[i].y, - scenery->obj.pos.z + D_i5_801BE6A0[i].z, RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT(30.0f) + 30.0f, - RAND_FLOAT(-50.0f), scenery->obj.rot.x + D_i5_801BE6A0[i + 6].x, - scenery->obj.rot.y + D_i5_801BE6A0[i + 6].y, scenery->obj.rot.z + D_i5_801BE6A0[i + 6].z, + func_effect_8007D2C8(this->obj.pos.x + D_i5_801BE6A0[i].x, this->obj.pos.y + D_i5_801BE6A0[i].y, + this->obj.pos.z + D_i5_801BE6A0[i].z, 18.0f); + Macbeth_Effect357_Spawn1( + this->obj.pos.x + D_i5_801BE6A0[i].x, this->obj.pos.y + D_i5_801BE6A0[i].y, + this->obj.pos.z + D_i5_801BE6A0[i].z, RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT(30.0f) + 30.0f, + RAND_FLOAT(-50.0f), this->obj.rot.x + D_i5_801BE6A0[i + 6].x, + this->obj.rot.y + D_i5_801BE6A0[i + 6].y, this->obj.rot.z + D_i5_801BE6A0[i + 6].z, RAND_FLOAT_CENTERED(5.0f), RAND_FLOAT_CENTERED(5.0f), RAND_FLOAT_CENTERED(5.0f), (s32) (RAND_FLOAT(50.0f) + 70.0f), i + 12, 1.0f); } - Object_Kill(&scenery->obj, scenery->sfxSource); + Object_Kill(&this->obj, this->sfxSource); break; } } -void Macbeth_801A30B8(s32 limbIndex, Vec3f* rot, void* data) { - Vec3f sp24 = { 0.0f, 0.0f, 0.0f }; +void Macbeth_MaTrainStopBlock_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { + Vec3f src = { 0.0f, 0.0f, 0.0f }; switch (limbIndex) { case 1: - Matrix_MultVec3f(gCalcMatrix, &sp24, &D_i5_801BE6A0[0]); + Matrix_MultVec3f(gCalcMatrix, &src, &D_i5_801BE6A0[0]); Matrix_GetYRPAngles(gCalcMatrix, &D_i5_801BE6E8[0]); break; case 2: - Matrix_MultVec3f(gCalcMatrix, &sp24, &D_i5_801BE6A0[1]); + Matrix_MultVec3f(gCalcMatrix, &src, &D_i5_801BE6A0[1]); Matrix_GetYRPAngles(gCalcMatrix, &D_i5_801BE6E8[1]); break; case 3: - Matrix_MultVec3f(gCalcMatrix, &sp24, &D_i5_801BE6A0[2]); + Matrix_MultVec3f(gCalcMatrix, &src, &D_i5_801BE6A0[2]); Matrix_GetYRPAngles(gCalcMatrix, &D_i5_801BE6E8[2]); break; case 4: - Matrix_MultVec3f(gCalcMatrix, &sp24, &D_i5_801BE6A0[3]); + Matrix_MultVec3f(gCalcMatrix, &src, &D_i5_801BE6A0[3]); Matrix_GetYRPAngles(gCalcMatrix, &D_i5_801BE6E8[3]); break; case 5: - Matrix_MultVec3f(gCalcMatrix, &sp24, &D_i5_801BE6A0[4]); + Matrix_MultVec3f(gCalcMatrix, &src, &D_i5_801BE6A0[4]); Matrix_GetYRPAngles(gCalcMatrix, &D_i5_801BE6E8[4]); break; case 11: - Matrix_MultVec3f(gCalcMatrix, &sp24, &D_i5_801BE6A0[5]); + Matrix_MultVec3f(gCalcMatrix, &src, &D_i5_801BE6A0[5]); Matrix_GetYRPAngles(gCalcMatrix, &D_i5_801BE6E8[5]); break; + default: break; } } -void Macbeth_Scenery83_Draw(Scenery* scenery) { - Vec3f sp38[50]; +void Macbeth_MaTrainStopBlock_Draw(MaTrainStopBlock* this) { + Vec3f frameTable[50]; RCP_SetupDL(&gMasterDisp, SETUPDL_29); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - Animation_GetFrameData(&D_MA_600C4D0, 0, sp38); - Animation_DrawSkeleton(1, D_MA_600C65C, sp38, NULL, Macbeth_801A30B8, scenery, &gIdentityMatrix); + Animation_GetFrameData(&D_MA_600C4D0, 0, frameTable); + Animation_DrawSkeleton(1, D_MA_600C65C, frameTable, NULL, Macbeth_MaTrainStopBlock_PostLimbDraw, this, + &gIdentityMatrix); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); } bool Macbeth_801A3300(Player* player, f32 arg1, f32 arg2) { + s16 var_v1 = D_MA_801BE250[6]; s16 temp_a0; - s16 var_v1; f32 temp_ft4; f32 temp_fa0; f32 sp40; @@ -2547,7 +2873,6 @@ bool Macbeth_801A3300(Player* player, f32 arg1, f32 arg2) { f32 sp2C; s32 pad; - var_v1 = D_MA_801BE250[6]; while (true) { if (D_i5_801B8E50[var_v1].unk_10 == 0) { return true; @@ -2565,18 +2890,19 @@ bool Macbeth_801A3300(Player* player, f32 arg1, f32 arg2) { sp30 = D_i5_801B8E50[var_v1].unk_00; sp38 = D_i5_801B8E50[var_v1].unk_04; sp34 = D_i5_801B8E50[var_v1].unk_08; + if (var_v1 != D_MA_801BE250[6]) { D_MA_801BE250[7] = arg2; switch (D_i5_801B8E50[var_v1 - 1].unk_10) { - case OBJ_SCENERY_94: - case OBJ_SCENERY_100: - case OBJ_SCENERY_101: + case OBJ_SCENERY_MA_TRAIN_TRACK_3: + case OBJ_SCENERY_MA_TRAIN_TRACK_9: + case OBJ_SCENERY_MA_TRAIN_TRACK_10: D_MA_801BE250[8] = 0.0f; break; - case OBJ_SCENERY_95: + case OBJ_SCENERY_MA_TRAIN_TRACK_4: D_MA_801BE250[8] = -10.0f; break; - case OBJ_SCENERY_96: + case OBJ_SCENERY_MA_TRAIN_TRACK_5: D_MA_801BE250[8] = 10.0f; break; } @@ -2590,11 +2916,11 @@ bool Macbeth_801A3300(Player* player, f32 arg1, f32 arg2) { sp2C = 1.0f - ((sp30 - arg1) / (sp30 - temp_ft4)); - if ((temp_a0 == OBJ_SCENERY_95) || (temp_a0 == OBJ_SCENERY_96) || (temp_a0 == OBJ_SCENERY_98) || - (temp_a0 == OBJ_SCENERY_99)) { + if ((temp_a0 == OBJ_SCENERY_MA_TRAIN_TRACK_4) || (temp_a0 == OBJ_SCENERY_MA_TRAIN_TRACK_5) || + (temp_a0 == OBJ_SCENERY_MA_TRAIN_TRACK_7) || (temp_a0 == OBJ_SCENERY_MA_TRAIN_TRACK_8)) { temp_fv0_2 = fabsf((sp30 - temp_ft4) / 3.0f); if (sp2C < 0.3333333f) { - if ((temp_a0 == OBJ_SCENERY_95) || (temp_a0 == OBJ_SCENERY_98)) { + if ((temp_a0 == OBJ_SCENERY_MA_TRAIN_TRACK_4) || (temp_a0 == OBJ_SCENERY_MA_TRAIN_TRACK_7)) { D_MA_801BE250[9] = (((sp38 - temp_fa0) * sp2C) + temp_fa0) - (52.160667f * (1.0f - (((temp_ft4 - temp_fv0_2) - arg1) / ((temp_ft4 - temp_fv0_2) - temp_ft4)))); @@ -2604,12 +2930,12 @@ bool Macbeth_801A3300(Player* player, f32 arg1, f32 arg2) { (52.160667f * (1.0f - (((temp_ft4 - temp_fv0_2) - arg1) / ((temp_ft4 - temp_fv0_2) - temp_ft4)))); } } else if (sp2C < 0.666666f) { - if ((temp_a0 == OBJ_SCENERY_95) || (temp_a0 == OBJ_SCENERY_98)) { + if ((temp_a0 == OBJ_SCENERY_MA_TRAIN_TRACK_4) || (temp_a0 == OBJ_SCENERY_MA_TRAIN_TRACK_7)) { D_MA_801BE250[9] = (((sp38 - temp_fa0) * sp2C) + temp_fa0) - 52.160667f; } else { D_MA_801BE250[9] = (((sp38 - temp_fa0) * sp2C) + temp_fa0 + 52.160667f); } - } else if ((temp_a0 == OBJ_SCENERY_95) || (temp_a0 == OBJ_SCENERY_98)) { + } else if ((temp_a0 == OBJ_SCENERY_MA_TRAIN_TRACK_4) || (temp_a0 == OBJ_SCENERY_MA_TRAIN_TRACK_7)) { D_MA_801BE250[9] = (((sp38 - temp_fa0) * sp2C) + temp_fa0) - (52.160667f * (1.0f - (1.0f - ((sp30 - arg1) / (sp30 - (temp_ft4 - (temp_fv0_2 * 2))))))); @@ -2621,22 +2947,25 @@ bool Macbeth_801A3300(Player* player, f32 arg1, f32 arg2) { } else { D_MA_801BE250[9] = ((sp38 - temp_fa0) * sp2C) + temp_fa0; } + D_MA_801BE250[2] = (((sp34 - sp40) * sp2C) + sp40); - if ((temp_a0 == 100) || (temp_a0 == OBJ_SCENERY_102)) { + + if ((temp_a0 == 100) || (temp_a0 == OBJ_SCENERY_MA_TRAIN_TRACK_11)) { Math_SmoothStepToF(&D_MA_801BE250[3], 3.0f, 0.05f, 1.0f, 0.0f); - } else if ((temp_a0 == OBJ_SCENERY_101) || (temp_a0 == OBJ_SCENERY_103)) { + } else if ((temp_a0 == OBJ_SCENERY_MA_TRAIN_TRACK_10) || (temp_a0 == OBJ_SCENERY_MA_TRAIN_TRACK_12)) { Math_SmoothStepToF(&D_MA_801BE250[3], -3.0f, 0.05f, 1.0f, 0.0f); } else { Math_SmoothStepToF(&D_MA_801BE250[3], 0.0f, 0.05f, 1.0f, 0.0f); } + D_MA_801BE250[4] = (D_MA_801BE250[8] * sp2C) + D_MA_801BE250[7]; return false; } bool Macbeth_801A3790(Player* player, f32 arg1, f32 arg2) { + s16 var_v1 = D_MA_801BE250[16]; s16 temp_a0; - s16 var_v1; f32 temp_ft4; f32 temp_fa0; f32 sp40; @@ -2647,7 +2976,6 @@ bool Macbeth_801A3790(Player* player, f32 arg1, f32 arg2) { f32 sp2C; s32 pad; - var_v1 = D_MA_801BE250[16]; while (true) { if (D_i5_801B9A80[var_v1].unk_10 == 0) { return true; @@ -2665,18 +2993,19 @@ bool Macbeth_801A3790(Player* player, f32 arg1, f32 arg2) { sp30 = D_i5_801B9A80[var_v1].unk_00; sp38 = D_i5_801B9A80[var_v1].unk_04; sp34 = D_i5_801B9A80[var_v1].unk_08; + if (var_v1 != D_MA_801BE250[16]) { D_MA_801BE250[17] = arg2; switch (D_i5_801B9A80[var_v1 - 1].unk_10) { - case OBJ_SCENERY_97: - case OBJ_SCENERY_100: - case OBJ_SCENERY_101: + case OBJ_SCENERY_MA_TRAIN_TRACK_6: + case OBJ_SCENERY_MA_TRAIN_TRACK_9: + case OBJ_SCENERY_MA_TRAIN_TRACK_10: D_MA_801BE250[18] = 0.0f; break; - case OBJ_SCENERY_98: + case OBJ_SCENERY_MA_TRAIN_TRACK_7: D_MA_801BE250[18] = -10.0f; break; - case OBJ_SCENERY_99: + case OBJ_SCENERY_MA_TRAIN_TRACK_8: D_MA_801BE250[18] = 10.0f; break; } @@ -2690,11 +3019,11 @@ bool Macbeth_801A3790(Player* player, f32 arg1, f32 arg2) { sp2C = 1.0f - ((sp30 - arg1) / (sp30 - temp_ft4)); - if ((temp_a0 == OBJ_SCENERY_95) || (temp_a0 == OBJ_SCENERY_96) || (temp_a0 == OBJ_SCENERY_98) || - (temp_a0 == OBJ_SCENERY_99)) { + if ((temp_a0 == OBJ_SCENERY_MA_TRAIN_TRACK_4) || (temp_a0 == OBJ_SCENERY_MA_TRAIN_TRACK_5) || + (temp_a0 == OBJ_SCENERY_MA_TRAIN_TRACK_7) || (temp_a0 == OBJ_SCENERY_MA_TRAIN_TRACK_8)) { temp_fv0_2 = fabsf((sp30 - temp_ft4) / 3.0f); if (sp2C < 0.3333333f) { - if ((temp_a0 == OBJ_SCENERY_95) || (temp_a0 == OBJ_SCENERY_98)) { + if ((temp_a0 == OBJ_SCENERY_MA_TRAIN_TRACK_4) || (temp_a0 == OBJ_SCENERY_MA_TRAIN_TRACK_7)) { D_MA_801BE250[19] = (((sp38 - temp_fa0) * sp2C) + temp_fa0) - (52.160667f * (1.0f - (((temp_ft4 - temp_fv0_2) - arg1) / ((temp_ft4 - temp_fv0_2) - temp_ft4)))); @@ -2704,12 +3033,12 @@ bool Macbeth_801A3790(Player* player, f32 arg1, f32 arg2) { (52.160667f * (1.0f - (((temp_ft4 - temp_fv0_2) - arg1) / ((temp_ft4 - temp_fv0_2) - temp_ft4)))); } } else if (sp2C < 0.666666f) { - if ((temp_a0 == OBJ_SCENERY_95) || (temp_a0 == OBJ_SCENERY_98)) { + if ((temp_a0 == OBJ_SCENERY_MA_TRAIN_TRACK_4) || (temp_a0 == OBJ_SCENERY_MA_TRAIN_TRACK_7)) { D_MA_801BE250[19] = (((sp38 - temp_fa0) * sp2C) + temp_fa0) - 52.160667f; } else { D_MA_801BE250[19] = (((sp38 - temp_fa0) * sp2C) + temp_fa0 + 52.160667f); } - } else if ((temp_a0 == OBJ_SCENERY_95) || (temp_a0 == OBJ_SCENERY_98)) { + } else if ((temp_a0 == OBJ_SCENERY_MA_TRAIN_TRACK_4) || (temp_a0 == OBJ_SCENERY_MA_TRAIN_TRACK_7)) { D_MA_801BE250[19] = (((sp38 - temp_fa0) * sp2C) + temp_fa0) - (52.160667f * (1.0f - (1.0f - ((sp30 - arg1) / (sp30 - (temp_ft4 - (temp_fv0_2 * 2))))))); @@ -2721,14 +3050,17 @@ bool Macbeth_801A3790(Player* player, f32 arg1, f32 arg2) { } else { D_MA_801BE250[19] = ((sp38 - temp_fa0) * sp2C) + temp_fa0; } + D_MA_801BE250[12] = (((sp34 - sp40) * sp2C) + sp40); - if ((temp_a0 == OBJ_SCENERY_100) || (temp_a0 == OBJ_SCENERY_102)) { + + if ((temp_a0 == OBJ_SCENERY_MA_TRAIN_TRACK_9) || (temp_a0 == OBJ_SCENERY_MA_TRAIN_TRACK_11)) { Math_SmoothStepToF(&D_MA_801BE250[13], 2.0f, 0.05f, 1.0f, 0.0f); - } else if ((temp_a0 == OBJ_SCENERY_101) || (temp_a0 == OBJ_SCENERY_103)) { + } else if ((temp_a0 == OBJ_SCENERY_MA_TRAIN_TRACK_10) || (temp_a0 == OBJ_SCENERY_MA_TRAIN_TRACK_12)) { Math_SmoothStepToF(&D_MA_801BE250[13], -2.0f, 0.05f, 1.0f, 0.0f); } else { Math_SmoothStepToF(&D_MA_801BE250[13], 0.0f, 0.05f, 1.0f, 0.0f); } + D_MA_801BE250[14] = (D_MA_801BE250[18] * sp2C) + D_MA_801BE250[17]; return false; @@ -2757,12 +3089,16 @@ bool Macbeth_801A3C20(f32 arg0) { break; } } + if (D_i5_801BA138[var_a0].unk_10 == 0) { return false; } + temp_fv0_2 = 1.0f - ((sp2C - arg0) / (sp2C - sp38)); + D_MA_801BE250[21] = (((sp34 - sp40) * temp_fv0_2) + sp40); D_MA_801BE250[22] = (((sp30 - sp3C) * temp_fv0_2) + sp3C); + if (sp30 < sp3C) { Math_SmoothStepToF(&D_MA_801BE250[23], -10.0f, 0.05f, 1.0f, 0); } else if (sp3C < sp30) { @@ -2773,70 +3109,77 @@ bool Macbeth_801A3C20(f32 arg0) { return true; } -void Macbeth_801A3E70(Actor* actor) { - actor->state = 0; - actor->unk_046 = D_i5_801BA1D8; +void Macbeth_MaMaRailroadSwitch_Init(MaRailroadSwitch* this) { + this->state = 0; + this->unk_046 = D_i5_801BA1D8; D_i5_801BA1D8++; } -void Macbeth_Actor214_Update(Actor* actor) { - if ((gPlayer[0].trueZpos - actor->obj.pos.z) < -500.0f) { - Object_Kill(&actor->obj, actor->sfxSource); +void Macbeth_MaRailroadSwitch_Update(MaRailroadSwitch* this) { + if ((gPlayer[0].trueZpos - this->obj.pos.z) < -500.0f) { + Object_Kill(&this->obj, this->sfxSource); } - switch (actor->state) { + switch (this->state) { case 0: - if ((actor->dmgType != DMG_NONE) && (actor->dmgType != DMG_COLLISION)) { - actor->dmgType = DMG_NONE; - AUDIO_PLAY_SFX(NA_SE_OB_MA_SWITCH_ON, actor->sfxSource, 0); - actor->state = 1; + if ((this->dmgType != DMG_NONE) && (this->dmgType != DMG_COLLISION)) { + this->dmgType = DMG_NONE; + AUDIO_PLAY_SFX(NA_SE_OB_MA_SWITCH_ON, this->sfxSource, 0); + this->state = 1; } break; + case 1: - Math_SmoothStepToF(&actor->fwork[1], -181.0f, 0.6f, 20.0f, 0.0f); - if (actor->fwork[1] <= -180.0f) { - AUDIO_PLAY_SFX(NA_SE_OB_MA_SWITCH_UP, actor->sfxSource, 0); - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_603648C); - actor->iwork[0] = 2; - actor->state = 2; + Math_SmoothStepToF(&this->fwork[1], -181.0f, 0.6f, 20.0f, 0.0f); + if (this->fwork[1] <= -180.0f) { + AUDIO_PLAY_SFX(NA_SE_OB_MA_SWITCH_UP, this->sfxSource, 0); + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_603648C); + this->iwork[0] = 2; + this->state = 2; } break; + case 2: - if (actor->iwork[0] <= 0) { - Math_SmoothStepToF(&actor->fwork[2], 41.0f, 0.6f, 8.0f, 0.0f); - if (actor->fwork[2] >= 40.0f) { - actor->state = 3; - D_i5_801BE308[actor->unk_046] = 1; + if (this->iwork[0] <= 0) { + Math_SmoothStepToF(&this->fwork[2], 41.0f, 0.6f, 8.0f, 0.0f); + if (this->fwork[2] >= 40.0f) { + this->state = 3; + D_i5_801BE308[this->unk_046] = 1; } } else { - actor->iwork[0]--; + this->iwork[0]--; } break; + case 3: break; } - if (actor->dmgType != DMG_NONE) { - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); - actor->dmgType = DMG_NONE; + + if (this->dmgType != DMG_NONE) { + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); + this->dmgType = DMG_NONE; } - Math_SmoothStepToF(&actor->fwork[0], 30.0f, 0.4f, 10.0f, 0.0f); - Math_SmoothStepToF(&actor->fwork[4], 30.0f, 0.4f, 10.0f, 0.0f); - if (actor->fwork[0] < 31.0f) { - if (actor->state >= 3) { - AUDIO_PLAY_SFX(NA_SE_OB_MA_SWITCH_GRN, actor->sfxSource, 0); + + Math_SmoothStepToF(&this->fwork[0], 30.0f, 0.4f, 10.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[4], 30.0f, 0.4f, 10.0f, 0.0f); + + if (this->fwork[0] < 31.0f) { + if (this->state >= 3) { + AUDIO_PLAY_SFX(NA_SE_OB_MA_SWITCH_GRN, this->sfxSource, 0); } else { - AUDIO_PLAY_SFX(NA_SE_OB_MA_SWITCH_RED, actor->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_OB_MA_SWITCH_RED, this->sfxSource, 0); } - actor->fwork[0] = 255.0f; - actor->fwork[4] = 170.0f; + this->fwork[0] = 255.0f; + this->fwork[4] = 170.0f; } } -bool Macbeth_801A41B0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { - Actor* actor = (Actor*) data; +bool Macbeth_MaRailroadSwitch_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { + MaRailroadSwitch* actor = (MaRailroadSwitch*) thisx; RCP_SetupDL(&gMasterDisp, SETUPDL_29); gDPSetTextureFilter(gMasterDisp++, G_TF_BILERP); + if (limbIndex == 2) { RCP_SetupDL(&gMasterDisp, SETUPDL_34); gDPSetTextureFilter(gMasterDisp++, G_TF_POINT); @@ -2850,152 +3193,158 @@ bool Macbeth_801A41B0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return false; } -void Macbeth_Actor214_Draw(Actor* actor) { - Vec3f sp50[50]; +void Macbeth_MaRailroadSwitch_Draw(MaRailroadSwitch* this) { + Vec3f frameTable[50]; Matrix_Push(&gGfxMatrix); - Animation_GetFrameData(&D_MA_602FEB4, 0, sp50); - Animation_DrawSkeleton(1, D_MA_602FFA0, sp50, Macbeth_801A41B0, NULL, actor, &gIdentityMatrix); + Animation_GetFrameData(&D_MA_602FEB4, 0, frameTable); + Animation_DrawSkeleton(1, D_MA_602FFA0, frameTable, Macbeth_MaRailroadSwitch_OverrideLimbDraw, NULL, this, + &gIdentityMatrix); Matrix_Pop(&gGfxMatrix); RCP_SetupDL(&gMasterDisp, SETUPDL_29); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, actor->fwork[2] + 204.0f, 0.0f, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, actor->fwork[1] * M_DTOR, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, this->fwork[2] + 204.0f, 0.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, this->fwork[1] * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_MA_602FFC0); Matrix_Pop(&gGfxMatrix); RCP_SetupDL(&gMasterDisp, SETUPDL_34); gDPSetTextureFilter(gMasterDisp++, G_TF_POINT); - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, actor->fwork[0], 0, 0, 255); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, this->fwork[0], 0, 0, 255); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, actor->fwork[2] + 204.0f, 0.0f, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, actor->fwork[1] * M_DTOR, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, this->fwork[2] + 204.0f, 0.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, this->fwork[1] * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_MA_602F380); gDPSetTextureFilter(gMasterDisp++, G_TF_BILERP); Matrix_Pop(&gGfxMatrix); } -void Macbeth_801A4660(Actor* actor) { - actor->gravity = 0; - actor->unk_04A = actor->unk_046; - actor->health = 60; - if (actor->fwork[0] < 0.0f) { - actor->unk_048 = 0; +void Macbeth_MaBoulder_Init(MaBoulder* this) { + this->gravity = 0; + this->unk_04A = this->unk_046; + this->health = 60; + if (this->fwork[0] < 0.0f) { + this->unk_048 = 0; } else { - actor->unk_048 = 1; + this->unk_048 = 1; } } -void Macbeth_Actor215_Update(Actor* actor) { - if ((gPlayer[0].trueZpos - actor->obj.pos.z) < -500.0f) { - Object_Kill(&actor->obj, actor->sfxSource); +void Macbeth_MaBoulder_Update(MaBoulder* this) { + if ((gPlayer[0].trueZpos - this->obj.pos.z) < -500.0f) { + Object_Kill(&this->obj, this->sfxSource); } - switch (actor->state) { + switch (this->state) { case 0: - if (actor->timer_0BC == 0) { - Math_SmoothStepToF(&actor->vel.x, actor->fwork[0], 0.5f, 3.0f, 0.0f); - Math_SmoothStepToF(&actor->gravity, 5.0f, 0.08f, 1.0f, 0.0f); - if (actor->obj.pos.y < 80.0f) { - if (actor->unk_046 != 0) { - AUDIO_PLAY_SFX(NA_SE_OB_ROCK_BOUND, actor->sfxSource, 0); - actor->obj.pos.y = 80.0f; - if (actor->vel.y < 0) { - actor->vel.y = -actor->vel.y * (actor->unk_046 * 0.07f); + if (this->timer_0BC == 0) { + Math_SmoothStepToF(&this->vel.x, this->fwork[0], 0.5f, 3.0f, 0.0f); + Math_SmoothStepToF(&this->gravity, 5.0f, 0.08f, 1.0f, 0.0f); + + if (this->obj.pos.y < 80.0f) { + if (this->unk_046 != 0) { + AUDIO_PLAY_SFX(NA_SE_OB_ROCK_BOUND, this->sfxSource, 0); + this->obj.pos.y = 80.0f; + if (this->vel.y < 0) { + this->vel.y = -this->vel.y * (this->unk_046 * 0.07f); } - actor->fwork[0] /= 1.2f + RAND_FLOAT(1.0f) / 2; - actor->unk_046--; - actor->vel.z /= 1.5f; - if (actor->unk_046 == 0) { - actor->timer_0BE = RAND_INT(30.0f); + this->fwork[0] /= 1.2f + RAND_FLOAT(1.0f) / 2; + this->unk_046--; + this->vel.z /= 1.5f; + if (this->unk_046 == 0) { + this->timer_0BE = RAND_INT(30.0f); } } else { - if (actor->timer_0BE <= 0) { - actor->fwork[0] = 0; - actor->vel.x = 0; + if (this->timer_0BE <= 0) { + this->fwork[0] = 0; + this->vel.x = 0; } - actor->vel.y = 0; - actor->vel.z = 0; + this->vel.y = 0; + this->vel.z = 0; } } - if (actor->unk_048 != 0) { - actor->obj.rot.z -= 0.5f * actor->vel.x; + + if (this->unk_048 != 0) { + this->obj.rot.z -= 0.5f * this->vel.x; } else { - actor->obj.rot.z -= 0.5f * actor->vel.x; + this->obj.rot.z -= 0.5f * this->vel.x; } - if (actor->unk_046 != actor->unk_04A) { - actor->obj.rot.x = actor->obj.rot.x + (0.1 * actor->vel.z); + + if (this->unk_046 != this->unk_04A) { + this->obj.rot.x = this->obj.rot.x + (0.1 * this->vel.z); } } - if (actor->unk_046 == 7) { - if (actor->unk_048 != 0) { - actor->obj.rot.z -= 1.0f; + + if (this->unk_046 == 7) { + if (this->unk_048 != 0) { + this->obj.rot.z -= 1.0f; } else { - actor->obj.rot.z += 1.0f; + this->obj.rot.z += 1.0f; } } - Macbeth_801A49B8(actor); + + Macbeth_MaBoulder_HandleDamage(this); break; + case 1: - Macbeth_801A49B8(actor); + Macbeth_MaBoulder_HandleDamage(this); break; + case 2: - func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f); - Object_Kill(&actor->obj, actor->sfxSource); + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 10.0f); + Object_Kill(&this->obj, this->sfxSource); break; } } -void Macbeth_801A49B8(Actor* actor) { - if (actor->dmgType != DMG_NONE) { - AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_M, actor->sfxSource, 0); - actor->timer_0C6 = 15; - actor->health -= actor->damage; - if (actor->health <= 0) { - Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); +void Macbeth_MaBoulder_HandleDamage(MaBoulder* this) { + if (this->dmgType != DMG_NONE) { + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_M, this->sfxSource, 0); + this->timer_0C6 = 15; + this->health -= this->damage; + if (this->health <= 0) { + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_M); gHitCount++; - actor->state = 2; + this->state = 2; } - actor->dmgType = DMG_NONE; + this->dmgType = DMG_NONE; } } -void Macbeth_Actor215_Draw(Actor* actor) { - if (actor->state < 2) { - if (actor->scale != 1.0f) { - Matrix_Scale(gGfxMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY); +void Macbeth_MaBoulder_Draw(MaBoulder* this) { + if (this->state < 2) { + if (this->scale != 1.0f) { + Matrix_Scale(gGfxMatrix, this->scale, this->scale, this->scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); } gSPDisplayList(gMasterDisp++, D_MA_601A2B0); } } -void Macbeth_801A4AF8(Actor* actor) { - actor->fwork[1] = 10.0f; - actor->fwork[6] = -100.0f; - D_i5_801BE318 = actor->index; +void Macbeth_MaRailwaySignal_Init(MaRailwaySignal* this) { + this->fwork[1] = 10.0f; + this->fwork[6] = -100.0f; + D_i5_801BE318 = this->index; } -void Macbeth_Actor223_Update(Actor* actor) { +void Macbeth_MaRailwaySignal_Update(MaRailwaySignal* this) { s32 pad[2]; s32 i; ObjectInit* objInit; - u8 var_s0; + u8 var_s0 = 0; u8 j; - var_s0 = 0; - if ((gPlayer[0].trueZpos - actor->obj.pos.z) < -700.0f) { + if ((gPlayer[0].trueZpos - this->obj.pos.z) < -700.0f) { if (D_MA_801BE2F0[5] == 0) { Radio_PlayMessage(gMsg_ID_17170, RCID_PEPPY); } - Object_Kill(&actor->obj, actor->sfxSource); + Object_Kill(&this->obj, this->sfxSource); } - switch (actor->state) { + switch (this->state) { case 0: - for (j = 0; j < 8; j++) { if (D_i5_801BE308[j] != 0) { var_s0++; @@ -3003,39 +3352,44 @@ void Macbeth_Actor223_Update(Actor* actor) { } if (var_s0 >= 8) { Radio_PlayMessage(gMsg_ID_17150, RCID_PEPPY); - actor->state = 1; + this->state = 1; } break; + case 1: - if ((gPlayer[0].trueZpos - actor->obj.pos.z) < 2000.0f) { - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_6036520); - actor->state = 2; + if ((gPlayer[0].trueZpos - this->obj.pos.z) < 2000.0f) { + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_6036520); + this->state = 2; } break; + case 2: - Math_SmoothStepToF(&actor->fwork[2], -76.0f, 0.2f, 10.0f, 0.01f); - Math_SmoothStepToF(&actor->fwork[3], 76.0f, 0.2f, 10.0f, 0.01f); - Math_SmoothStepToF(&actor->fwork[6], 0.0f, 0.2f, 4.0f, 0.00001f); - if (actor->fwork[3] >= 75.0f) { - actor->state = 3; + Math_SmoothStepToF(&this->fwork[2], -76.0f, 0.2f, 10.0f, 0.01f); + Math_SmoothStepToF(&this->fwork[3], 76.0f, 0.2f, 10.0f, 0.01f); + Math_SmoothStepToF(&this->fwork[6], 0.0f, 0.2f, 4.0f, 0.00001f); + if (this->fwork[3] >= 75.0f) { + this->state = 3; } break; + case 3: - Math_SmoothStepToF(&actor->fwork[5], -75.0f, 0.2f, 10.0f, 0.00001f); - Math_SmoothStepToF(&actor->fwork[6], 1.0f, 0.2f, 4.0f, 0.01f); - if (actor->fwork[6] >= 0.0f) { - actor->state = 4; + Math_SmoothStepToF(&this->fwork[5], -75.0f, 0.2f, 10.0f, 0.00001f); + Math_SmoothStepToF(&this->fwork[6], 1.0f, 0.2f, 4.0f, 0.01f); + if (this->fwork[6] >= 0.0f) { + this->state = 4; } break; + case 4: - Math_SmoothStepToF(&actor->fwork[7], 31.0f, 0.2f, 2.0f, 0.01f); - if (actor->fwork[7] >= 30.0f) { - actor->state = 5; + Math_SmoothStepToF(&this->fwork[7], 31.0f, 0.2f, 2.0f, 0.01f); + if (this->fwork[7] >= 30.0f) { + this->state = 5; } break; + case 5: - if ((actor->dmgType != DMG_NONE) && (actor->dmgPart == 3)) { - actor->dmgType = DMG_NONE; + if ((this->dmgType != DMG_NONE) && (this->dmgPart == 3)) { + this->dmgType = DMG_NONE; D_MA_801BE2F0[5] = 1; gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]); @@ -3048,48 +3402,55 @@ void Macbeth_Actor223_Update(Actor* actor) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].csState = 0; gMissionStatus = MISSION_ACCOMPLISHED; - actor->timer_0BC = 5; - actor->state = 6; + this->timer_0BC = 5; + this->state = 6; Audio_KillSfxBySourceAndId(gPlayer[0].sfxSource, NA_SE_TANK_SLIDE); Audio_KillSfxBySourceAndId(gPlayer[0].sfxSource, NA_SE_TANK_BURNER_HALF); } break; + case 6: - if (actor->timer_0BC == 1) { - AUDIO_PLAY_SFX(NA_SE_OB_HEAVY_SWITCH, actor->sfxSource, 0); + if (this->timer_0BC == 1) { + AUDIO_PLAY_SFX(NA_SE_OB_HEAVY_SWITCH, this->sfxSource, 0); } - if (actor->timer_0BC == 0) { - Math_SmoothStepToF(&actor->fwork[7], -41.0f, 0.2f, 5.0f, 0.01f); - if (actor->fwork[7] <= -40.0f) { - actor->fwork[1] = 150.0f; + if (this->timer_0BC == 0) { + Math_SmoothStepToF(&this->fwork[7], -41.0f, 0.2f, 5.0f, 0.01f); + if (this->fwork[7] <= -40.0f) { + this->fwork[1] = 150.0f; Radio_PlayMessage(gMsg_ID_17160, RCID_PEPPY); - actor->timer_0BC = 30; - actor->state = 7; + this->timer_0BC = 30; + this->state = 7; } } break; + case 7: break; + default: break; } - if (actor->dmgType != DMG_NONE) { - actor->dmgType = DMG_NONE; - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); + + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } - Math_SmoothStepToF(&actor->fwork[0], 30, 0.4f, actor->fwork[1], 0.0f); - Math_SmoothStepToF(&actor->fwork[4], 30, 0.4f, actor->fwork[1], 0.0f); - if (actor->fwork[0] < 31.0f) { - actor->fwork[0] = 255.0f; - actor->fwork[4] = 170.0f; + + Math_SmoothStepToF(&this->fwork[0], 30, 0.4f, this->fwork[1], 0.0f); + Math_SmoothStepToF(&this->fwork[4], 30, 0.4f, this->fwork[1], 0.0f); + + if (this->fwork[0] < 31.0f) { + this->fwork[0] = 255.0f; + this->fwork[4] = 170.0f; } } -bool Macbeth_801A5124(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { - Actor* actor = (Actor*) data; +bool Macbeth_MaRailwaySignal_OverrideLimbDraw2(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { + MaRailwaySignal* this = (MaRailwaySignal*) thisx; RCP_SetupDL(&gMasterDisp, SETUPDL_29); gDPSetTextureFilter(gMasterDisp++, G_TF_BILERP); + if ((limbIndex == 9) || (limbIndex == 10)) { RCP_SetupDL(&gMasterDisp, SETUPDL_57); } @@ -3097,42 +3458,44 @@ bool Macbeth_801A5124(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* RCP_SetupDL(&gMasterDisp, SETUPDL_34); gDPSetTextureFilter(gMasterDisp++, G_TF_POINT); if (D_i5_801BE308[limbIndex - 1] != 0) { - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, actor->fwork[0], actor->fwork[4], 255); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, this->fwork[0], this->fwork[4], 255); } else { - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, actor->fwork[0], 0, 0, 255); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, this->fwork[0], 0, 0, 255); } } if ((limbIndex == 1) || (limbIndex == 3) || (limbIndex == 5) || (limbIndex == 7) || (limbIndex == 9)) { - pos->x = actor->fwork[2] + pos->x; - pos->y = actor->fwork[5] + pos->y; + pos->x = this->fwork[2] + pos->x; + pos->y = this->fwork[5] + pos->y; } if ((limbIndex == 2) || (limbIndex == 4) || (limbIndex == 6) || (limbIndex == 8) || (limbIndex == 10)) { - pos->x = actor->fwork[3] + pos->x; - pos->y = actor->fwork[5] + pos->y; + pos->x = this->fwork[3] + pos->x; + pos->y = this->fwork[5] + pos->y; } return false; } -bool Macbeth_801A54AC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { - Actor* actor = (Actor*) data; +bool Macbeth_MaRailwaySignal_OverrideLimbDraw1(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { + MaRailwaySignal* this = (MaRailwaySignal*) thisx; - pos->y = actor->fwork[6] + pos->y; + pos->y = this->fwork[6] + pos->y; if (limbIndex == 1) { - rot->x = actor->fwork[7] + rot->x; + rot->x = this->fwork[7] + rot->x; } return false; } -void Macbeth_Actor223_Draw(Actor* actor) { - Vec3f sp28[50]; +void Macbeth_MaRailwaySignal_Draw(MaRailwaySignal* this) { + Vec3f frameTable[50]; Matrix_Push(&gGfxMatrix); - Animation_GetFrameData(&D_MA_602F2E0, 0, sp28); - Animation_DrawSkeleton(1, D_MA_602F36C, sp28, Macbeth_801A54AC, NULL, actor, &gIdentityMatrix); + Animation_GetFrameData(&D_MA_602F2E0, 0, frameTable); + Animation_DrawSkeleton(1, D_MA_602F36C, frameTable, Macbeth_MaRailwaySignal_OverrideLimbDraw1, NULL, this, + &gIdentityMatrix); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Animation_GetFrameData(&D_MA_602F098, 0, sp28); - Animation_DrawSkeleton(1, D_MA_602F264, sp28, Macbeth_801A5124, NULL, actor, &gIdentityMatrix); + Animation_GetFrameData(&D_MA_602F098, 0, frameTable); + Animation_DrawSkeleton(1, D_MA_602F264, frameTable, Macbeth_MaRailwaySignal_OverrideLimbDraw2, NULL, this, + &gIdentityMatrix); Matrix_Pop(&gGfxMatrix); RCP_SetupDL(&gMasterDisp, SETUPDL_29); } @@ -3142,17 +3505,15 @@ s32 Macbeth_801A55D4(s32 arg0, Vec3f* arg1, Vec3f* arg2, s32 arg3) { Actor* actor; s32 i; - scenery = &gScenery[0]; - for (i = 0; i < ARRAY_COUNT(gScenery); i++, scenery++) { - if ((scenery->obj.status == OBJ_ACTIVE) && (scenery->obj.id != OBJ_SCENERY_68) && + for (scenery = &gScenery[0], i = 0; i < ARRAY_COUNT(gScenery); i++, scenery++) { + if ((scenery->obj.status == OBJ_ACTIVE) && (scenery->obj.id != OBJ_SCENERY_MA_WALL_4) && (fabsf(arg1->x - scenery->obj.pos.x) < 2000.0f) && (fabsf(arg1->z - scenery->obj.pos.z) < 2000.0f) && (Object_CheckHitboxCollision(arg1, scenery->info.hitbox, &scenery->obj, 0.0f, 0.0f, 0.0f) != 0)) { return i + 10; } } - actor = &gActors[0]; - for (i = 0; i < ARRAY_COUNT(gActors); i++, actor++) { + for (actor = &gActors[0], i = 0; i < ARRAY_COUNT(gActors); i++, actor++) { if ((actor->obj.status >= OBJ_ACTIVE) && (fabsf(arg1->x - actor->obj.pos.x) < 1000.0f) && (fabsf(arg1->z - actor->obj.pos.z) < 1500.0f) && (arg0 != i) && (actor->info.unk_16 != 2) && (actor->timer_0C2 == 0) && (Object_CheckSingleHitbox(arg1, actor->info.hitbox, &actor->obj.pos) != 0)) { @@ -3167,239 +3528,254 @@ s32 Macbeth_801A55D4(s32 arg0, Vec3f* arg1, Vec3f* arg2, s32 arg3) { return 0; } -void Macbeth_Effect378_Update(Effect* effect) { +void Macbeth_Effect378_Update(Effect378* this) { u8 i; Vec3f sp50; Vec3f sp44; Vec3f sp38; - if ((gPlayer[0].trueZpos - effect->obj.pos.z) < -2000.0f) { - Object_Kill(&effect->obj, effect->sfxSource); + if ((gPlayer[0].trueZpos - this->obj.pos.z) < -2000.0f) { + Object_Kill(&this->obj, this->sfxSource); } - effect->obj.rot.x = 0.0f; - effect->obj.rot.y = 0.0f; - effect->obj.rot.z = 0.0f; - if (effect->timer_50 == 96) { + + this->obj.rot.x = 0.0f; + this->obj.rot.y = 0.0f; + this->obj.rot.z = 0.0f; + + if (this->timer_50 == 96) { for (i = 0; i < 2; i++) { - func_effect_8007BC7C(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 6.0f); + Effect_Effect362_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 6.0f); } } - if ((fabsf(gPlayer[0].trueZpos - effect->obj.pos.z) < 50.0f) && - (fabsf(gPlayer[0].pos.x - effect->obj.pos.x) < 30.0f) && - (fabsf(gPlayer[0].pos.y - effect->obj.pos.y) < 30.0f)) { + + if ((fabsf(gPlayer[0].trueZpos - this->obj.pos.z) < 50.0f) && (fabsf(gPlayer[0].pos.x - this->obj.pos.x) < 30.0f) && + (fabsf(gPlayer[0].pos.y - this->obj.pos.y) < 30.0f)) { if ((gPlayer[0].barrelRollAlpha != 0) || (gPlayer[0].meteoWarpTimer != 0)) { sp50.x = 0.0f; sp50.y = 0.0f; sp50.z = 100.0f; Matrix_MultVec3f(gCalcMatrix, &sp50, &sp44); - effect->vel.x = sp44.x; - effect->vel.y = sp44.y; - effect->vel.z = sp44.z; - AUDIO_PLAY_SFX(NA_SE_ROLLING_REFLECT, effect->sfxSource, 4); + this->vel.x = sp44.x; + this->vel.y = sp44.y; + this->vel.z = sp44.z; + AUDIO_PLAY_SFX(NA_SE_ROLLING_REFLECT, this->sfxSource, 4); } if ((gPlayer[0].barrelRollAlpha == 0) && (gPlayer[0].mercyTimer == 0)) { - Player_ApplyDamage(&gPlayer[0], 0, effect->info.damage); + Player_ApplyDamage(&gPlayer[0], 0, this->info.damage); gPlayer[0].knockback.x = 20.0f; - if (effect->vel.x < 0.0f) { + if (this->vel.x < 0.0f) { gPlayer[0].knockback.x *= -1.0f; } - Object_Kill(&effect->obj, effect->sfxSource); + Object_Kill(&this->obj, this->sfxSource); } } - if (effect->obj.pos.y < gGroundHeight) { - Macbeth_801ADCEC(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 999.9f, -10.0f, 5.0f); - Object_Kill(&effect->obj, effect->sfxSource); + if (this->obj.pos.y < gGroundHeight) { + Macbeth_MaBombDrop_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 999.9f, -10.0f, 5.0f); + Object_Kill(&this->obj, this->sfxSource); if (gGroundSurface != SURFACE_WATER) { - effect->obj.pos.y = gGroundHeight; + this->obj.pos.y = gGroundHeight; } } - sp38.x = effect->vel.x; - sp38.y = effect->vel.y; - sp38.z = effect->vel.z; - if (Macbeth_801A55D4(1000, &effect->obj.pos, &sp38, 0) != 0) { - Macbeth_801ADCEC(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 999.9f, -10.0f, 5.0f); - Object_Kill(&effect->obj, effect->sfxSource); + + sp38.x = this->vel.x; + sp38.y = this->vel.y; + sp38.z = this->vel.z; + + if (Macbeth_801A55D4(1000, &this->obj.pos, &sp38, 0) != 0) { + Macbeth_MaBombDrop_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 999.9f, -10.0f, 5.0f); + Object_Kill(&this->obj, this->sfxSource); } } -void Macbeth_Effect378_Draw(Effect* effect) { +void Macbeth_Effect378_Draw(Effect378* this) { RCP_SetupDL(&gMasterDisp, SETUPDL_60); gSPDisplayList(gMasterDisp++, D_MA_601A840); RCP_SetupDL(&gMasterDisp, SETUPDL_64); } -void Macbeth_Effect380_Update(Effect380* effect) { - if ((gPlayer[0].trueZpos - effect->obj.pos.z) < -2000.0f) { - Object_Kill(&effect->obj, effect->sfxSource); +void Macbeth_Effect380_Update(Effect380* this) { + if ((gPlayer[0].trueZpos - this->obj.pos.z) < -2000.0f) { + Object_Kill(&this->obj, this->sfxSource); } - effect->obj.rot.x = 20.0f; - if (effect->scale2 < 10.0f) { - effect->obj.rot.y = 180.0f; + + this->obj.rot.x = 20.0f; + if (this->scale2 < 10.0f) { + this->obj.rot.y = 180.0f; } else { - effect->obj.rot.y = 0.0f; + this->obj.rot.y = 0.0f; } - effect->obj.rot.z = 0.0f; - if ((fabsf(gPlayer[0].trueZpos - effect->obj.pos.z) < 100.0f) && - (fabsf(gPlayer[0].pos.x - effect->obj.pos.x) < 100.0f) && - (fabsf(gPlayer[0].pos.y - effect->obj.pos.y) < 30.0f) && (gPlayer[0].mercyTimer == 0)) { - Player_ApplyDamage(gPlayer, 0, effect->info.damage); + this->obj.rot.z = 0.0f; + + if ((fabsf(gPlayer[0].trueZpos - this->obj.pos.z) < 100.0f) && + (fabsf(gPlayer[0].pos.x - this->obj.pos.x) < 100.0f) && (fabsf(gPlayer[0].pos.y - this->obj.pos.y) < 30.0f) && + (gPlayer[0].mercyTimer == 0)) { + Player_ApplyDamage(gPlayer, 0, this->info.damage); gPlayer[0].knockback.x = 20.0f; - if (effect->vel.x < 0.0f) { + if (this->vel.x < 0.0f) { gPlayer[0].knockback.x *= -1.0f; } gPlayer[0].knockback.y = 20.0f; - if (effect->vel.y < 0.0f) { + if (this->vel.y < 0.0f) { gPlayer[0].knockback.y *= -1.0f; } - Object_Kill(&effect->obj, effect->sfxSource); - } - if (effect->obj.pos.y < (gGroundHeight - 100.0f)) { - Object_Kill(&effect->obj, effect->sfxSource); + Object_Kill(&this->obj, this->sfxSource); } - if (effect->unk_44 < 235) { - effect->unk_44 += 20; + if (this->obj.pos.y < (gGroundHeight - 100.0f)) { + Object_Kill(&this->obj, this->sfxSource); + } + + if (this->unk_44 < 235) { + this->unk_44 += 20; } } -void Macbeth_Effect380_Draw(Effect* effect) { +void Macbeth_Effect380_Draw(Effect380* this) { RCP_SetupDL(&gMasterDisp, SETUPDL_67); - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 112, 255, 243, effect->unk_44); - gDPSetEnvColor(gMasterDisp++, 255, 255, 255, effect->unk_44); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 112, 255, 243, this->unk_44); + gDPSetEnvColor(gMasterDisp++, 255, 255, 255, this->unk_44); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_MA_6012A60); RCP_SetupDL(&gMasterDisp, SETUPDL_64); } -void Macbeth_801A5E2C(Actor* actor) { - actor->fwork[0] = actor->obj.pos.x; - actor->fwork[1] = actor->obj.pos.y; - actor->fwork[2] = actor->obj.rot.z; - actor->obj.rot.z = 0.0f; +void Macbeth_LockBars_Init(Actor* this) { + this->fwork[0] = this->obj.pos.x; + this->fwork[1] = this->obj.pos.y; + this->fwork[2] = this->obj.rot.z; + this->obj.rot.z = 0.0f; } -void Macbeth_Actor216_Update(Actor* actor) { - if ((gPlayer[0].trueZpos - actor->obj.pos.z) < -500.0f) { - Object_Kill(&actor->obj, actor->sfxSource); +void Macbeth_MaHorizontalLockBar_Update(MaHorizontalLockBar* this) { + if ((gPlayer[0].trueZpos - this->obj.pos.z) < -500.0f) { + Object_Kill(&this->obj, this->sfxSource); } - if ((D_i5_801BA1E0 - actor->obj.pos.z) < -800.0f) { - if (actor->iwork[0] == 0) { - AUDIO_PLAY_SFX(NA_SE_OB_SIDE_GATE_CLOSE, actor->sfxSource, 0); - actor->iwork[0]++; + + if ((D_i5_801BA1E0 - this->obj.pos.z) < -800.0f) { + if (this->iwork[0] == 0) { + AUDIO_PLAY_SFX(NA_SE_OB_SIDE_GATE_CLOSE, this->sfxSource, 0); + this->iwork[0]++; } - Math_SmoothStepToF(&actor->obj.pos.x, actor->fwork[0] + (actor->fwork[2] * 400.0f), 0.1f, 4.0f, 0.01f); + Math_SmoothStepToF(&this->obj.pos.x, this->fwork[0] + (this->fwork[2] * 400.0f), 0.1f, 4.0f, 0.01f); } - if (actor->dmgType != DMG_NONE) { - actor->dmgType = DMG_NONE; - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); + + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } } -void Macbeth_Actor216_Draw(Actor* actor) { - gSPDisplayList(gMasterDisp++, D_MA_60251A0); +void Macbeth_MaHorizontalLockBar_Draw(MaHorizontalLockBar* this) { + gSPDisplayList(gMasterDisp++, aMaHorizontalLockBarDL); } void Macbeth_801A5FC4(s32 arg0) { } -void Macbeth_Actor217_Update(Actor* actor) { - if (gPlayer[0].trueZpos - actor->obj.pos.z < -500.0f) { - Object_Kill(&actor->obj, actor->sfxSource); +void Macbeth_MaVerticalLockBar_Update(MaVerticalLockBar* this) { + if (gPlayer[0].trueZpos - this->obj.pos.z < -500.0f) { + Object_Kill(&this->obj, this->sfxSource); } - if (gPlayer[0].trueZpos - actor->obj.pos.z < actor->fwork[2]) { - if (actor->iwork[0] == 0) { - AUDIO_PLAY_SFX(NA_SE_OB_POST_UP, actor->sfxSource, 0); - actor->iwork[0]++; + if (gPlayer[0].trueZpos - this->obj.pos.z < this->fwork[2]) { + if (this->iwork[0] == 0) { + AUDIO_PLAY_SFX(NA_SE_OB_POST_UP, this->sfxSource, 0); + this->iwork[0]++; } - Math_SmoothStepToF(&actor->obj.pos.y, actor->fwork[1] + 356.0f, 0.4f, 20.0f, 0.01f); + Math_SmoothStepToF(&this->obj.pos.y, this->fwork[1] + 356.0f, 0.4f, 20.0f, 0.01f); } - if (actor->dmgType != DMG_NONE) { - actor->dmgType = DMG_NONE; - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); + + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } } -void Macbeth_Actor217_Draw(Actor* actor) { - gSPDisplayList(gMasterDisp++, D_MA_6025850); +void Macbeth_MaVerticalLockBar_Draw(MaVerticalLockBar* this) { + gSPDisplayList(gMasterDisp++, aMaVerticalLockBarDL); } -void Macbeth_801A6134(Actor* actor) { - actor->health = 30; +void Macbeth_MaBarrier_Init(MaBarrier* this) { + this->health = 30; } -void Macbeth_Actor218_Update(Actor* actor) { +void Macbeth_MaBarrier_Update(MaBarrier* this) { s16 i; - if ((gPlayer[0].trueZpos - actor->obj.pos.z) < -500.0f) { - Object_Kill(&actor->obj, actor->sfxSource); + if ((gPlayer[0].trueZpos - this->obj.pos.z) < -500.0f) { + Object_Kill(&this->obj, this->sfxSource); } - switch (actor->state) { + switch (this->state) { case 0: - if (actor->dmgType != DMG_NONE) { - func_effect_8007C120(actor->obj.pos.x, actor->obj.pos.y + 100.0f, actor->obj.pos.z, actor->vel.x, - actor->vel.y, actor->vel.z, 0.15f, 20); - AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, actor->sfxSource, 4); - actor->health -= actor->damage; - actor->timer_0C6 = 15; - if ((gPlayer[0].trueZpos - 20.0f) < actor->obj.pos.z) { - actor->health = 0; + if (this->dmgType != DMG_NONE) { + Effect_Effect390_Spawn(this->obj.pos.x, this->obj.pos.y + 100.0f, this->obj.pos.z, this->vel.x, + this->vel.y, this->vel.z, 0.15f, 20); + + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, this->sfxSource, 4); + + this->health -= this->damage; + this->timer_0C6 = 15; + + if ((gPlayer[0].trueZpos - 20.0f) < this->obj.pos.z) { + this->health = 0; } - if (actor->health <= 0) { - AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, actor->sfxSource, 0); - func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y + 100.0f, actor->obj.pos.z, 0.0f, 0.0f, - 0.0f, 14.0f, 5); + + if (this->health <= 0) { + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, this->sfxSource, 0); + Effect386_Spawn1(this->obj.pos.x, this->obj.pos.y + 100.0f, this->obj.pos.z, 0.0f, 0.0f, 0.0f, + 14.0f, 5); for (i = 0; i < 20; i++) { - Macbeth_801AD624(RAND_FLOAT_CENTERED(500.0f) + actor->obj.pos.x, actor->obj.pos.y + 100.0f, - RAND_FLOAT(150.0f) + actor->obj.pos.z, RAND_FLOAT_CENTERED(10.0f), - RAND_FLOAT(7.0f) + 7.0f, RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT(360.0f), - RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(30.0f), - RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), - (s32) (RAND_FLOAT(50.0f) + 70.0f), 4, (RAND_FLOAT(0.8f) + 0.3f) * 1.5f); + Macbeth_Effect357_Spawn1( + RAND_FLOAT_CENTERED(500.0f) + this->obj.pos.x, this->obj.pos.y + 100.0f, + RAND_FLOAT(150.0f) + this->obj.pos.z, RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT(7.0f) + 7.0f, + RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), + RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), + (s32) (RAND_FLOAT(50.0f) + 70.0f), 4, (RAND_FLOAT(0.8f) + 0.3f) * 1.5f); } - actor->timer_0BC = 20; - actor->state = 1; + this->timer_0BC = 20; + this->state = 1; } - actor->dmgType = DMG_NONE; + this->dmgType = DMG_NONE; } break; + case 1: - Math_SmoothStepToF(&actor->obj.rot.x, -90.0f, 0.5f, 5.0f, 0.01f); - if (actor->timer_0BC == 0) { - Object_Kill(&actor->obj, actor->sfxSource); + Math_SmoothStepToF(&this->obj.rot.x, -90.0f, 0.5f, 5.0f, 0.01f); + if (this->timer_0BC == 0) { + Object_Kill(&this->obj, this->sfxSource); } break; } } -void Macbeth_Actor218_Draw(Actor* actor) { +void Macbeth_MaBarrier_Draw(MaBarrier* this) { RCP_SetupDL(&gMasterDisp, SETUPDL_57); - if ((actor->timer_0C6 % 2) != 0) { + if ((this->timer_0C6 % 2) != 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_58); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } - gSPDisplayList(gMasterDisp++, D_MA_60257B0); + gSPDisplayList(gMasterDisp++, aMaBarrierDL); RCP_SetupDL(&gMasterDisp, SETUPDL_29); } -void Macbeth_801A65E0(Scenery* scenery) { - scenery->vel.x = scenery->obj.pos.x; - scenery->vel.y = scenery->obj.pos.y; - scenery->vel.z = scenery->obj.rot.z; - scenery->obj.rot.z = 0.0f; +void Macbeth_MaProximityLight_Init(MaProximityLight* this) { + this->vel.x = this->obj.pos.x; + this->vel.y = this->obj.pos.y; + this->vel.z = this->obj.rot.z; + this->obj.rot.z = 0.0f; } -void Macbeth_Scenery65_Draw(Scenery* scenery) { - if ((gPlayer[0].trueZpos - scenery->obj.pos.z) < scenery->vel.z) { +void Macbeth_MaProximityLight_Draw(MaProximityLight* this) { + if ((gPlayer[0].trueZpos - this->obj.pos.z) < this->vel.z) { if (gPlayState != PLAY_PAUSE) { - Math_SmoothStepToF(&scenery->vel.x, 30, 0.5f, 30.0f, 0.0f); - if (scenery->vel.x < 31.0f) { - scenery->vel.x = 255.0f; + Math_SmoothStepToF(&this->vel.x, 30, 0.5f, 30.0f, 0.0f); + if (this->vel.x < 31.0f) { + this->vel.x = 255.0f; } } RCP_SetupDL(&gMasterDisp, SETUPDL_34); - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, scenery->vel.x, 0, 0, 255); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, this->vel.x, 0, 0, 255); } gSPDisplayList(gMasterDisp++, D_MA_6010700); RCP_SetupDL(&gMasterDisp, SETUPDL_29); @@ -3409,28 +3785,29 @@ void Macbeth_Scenery65_Draw(Scenery* scenery) { void Macbeth_801A67BC(s32 arg0) { } -void Macbeth_Actor219_Update(Actor* actor) { - if ((gPlayer[0].trueZpos - actor->obj.pos.z) < -300.0f) { - Object_Kill(&actor->obj, actor->sfxSource); +void Macbeth_Actor219_Update(Actor219* this) { + if ((gPlayer[0].trueZpos - this->obj.pos.z) < -300.0f) { + Object_Kill(&this->obj, this->sfxSource); } - if ((actor->dmgType != DMG_NONE) && (actor->dmgPart == -1)) { - actor->dmgType = DMG_NONE; - if (actor->obj.pos.x <= gPlayer[0].pos.x) { - actor->iwork[4] = 1; + + if ((this->dmgType != DMG_NONE) && (this->dmgPart == -1)) { + this->dmgType = DMG_NONE; + if (this->obj.pos.x <= gPlayer[0].pos.x) { + this->iwork[4] = 1; } else { - actor->iwork[4] = -1; + this->iwork[4] = -1; } - Macbeth_8019D670(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, - (RAND_FLOAT(2.0f) + 20.0f) * actor->iwork[4], 0.0f, actor->iwork[4] * -34.0f, 0.0f, 2, 3); - Object_Kill(&actor->obj, actor->sfxSource); + Macbeth_MaBoulder_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, + (RAND_FLOAT(2.0f) + 20.0f) * this->iwork[4], 0.0f, this->iwork[4] * -34.0f, 0.0f, 2, 3); + Object_Kill(&this->obj, this->sfxSource); } } -void Macbeth_Actor219_Draw(Actor* actor) { +void Macbeth_Actor219_Draw(Actor219* this) { } -void Macbeth_801A68F8(Actor* actor, s16 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7) { +void Macbeth_801A68F8(Actor207* this, s16 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7) { gTexturedLines[arg1].mode = 3; gTexturedLines[arg1].posAA.x = arg2; gTexturedLines[arg1].posAA.y = arg3; @@ -3444,8 +3821,8 @@ void Macbeth_801A68F8(Actor* actor, s16 arg1, f32 arg2, f32 arg3, f32 arg4, f32 gTexturedLines[arg1].posBB.z = arg7; } -void Macbeth_801A6984(Actor* actor) { - s16 var_s3; +void Macbeth_801A6984(Actor207* this) { + s16 var_s3 = 0; Vec3f test; f32 temp_fs3; s32 var_s4; @@ -3464,28 +3841,33 @@ void Macbeth_801A6984(Actor* actor) { f32 sp84; f32 sp80; - var_s3 = 0; - if ((gPlayer[0].trueZpos - actor->obj.pos.z) > 7000.0f) { + if ((gPlayer[0].trueZpos - this->obj.pos.z) > 7000.0f) { return; } - test.x = actor->obj.pos.x - D_i5_801BE368[4]; - test.y = actor->obj.pos.y - D_i5_801BE368[5]; - test.z = actor->obj.pos.z - D_i5_801BE368[6]; + + test.x = this->obj.pos.x - D_i5_801BE368[4]; + test.y = this->obj.pos.y - D_i5_801BE368[5]; + test.z = this->obj.pos.z - D_i5_801BE368[6]; + temp_fs3 = VEC3F_MAG(&test); + Math_Atan2F(test.x, test.z); Math_Atan2F(test.y, sqrtf(SQ(test.x) + SQ(test.z))); + var_s4 = (s32) (temp_fs3 / 40.0f); if (var_s4 == 0) { var_s4 = 1; } - spA8 = (180.0f / var_s4) + 1.0f; - var_fs5 = actor->obj.pos.x; - spA0 = actor->obj.pos.y; - sp9C = actor->obj.pos.z; - sp88 = (D_i5_801BE368[4] - actor->obj.pos.x) / var_s4; - sp84 = (D_i5_801BE368[5] - actor->obj.pos.y) / var_s4; - sp80 = (D_i5_801BE368[6] - actor->obj.pos.z) / var_s4; + spA8 = (180.0f / var_s4) + 1.0f; + var_fs5 = this->obj.pos.x; + spA0 = this->obj.pos.y; + sp9C = this->obj.pos.z; + + sp88 = (D_i5_801BE368[4] - this->obj.pos.x) / var_s4; + sp84 = (D_i5_801BE368[5] - this->obj.pos.y) / var_s4; + sp80 = (D_i5_801BE368[6] - this->obj.pos.z) / var_s4; + for (i = 0; i < var_s4; i++) { if (D_i5_801BE320[1] == 0) { Math_SmoothStepToF(&D_i5_801BE368[7], 0.0f, 0.01f, 0.05f, 0.01f); @@ -3493,21 +3875,23 @@ void Macbeth_801A6984(Actor* actor) { Math_SmoothStepToF(&D_i5_801BE368[7], 100.0f, 0.01f, 0.01f, 0.01f); } temp = SIN_DEG(i * spA8) * (-(D_i5_801BE368[7] * 3.0f) * (1.0f - ((f32) i / var_s4))); - temp_fs2_2 = actor->obj.pos.x + (sp88 * i); - temp_fs3_2 = actor->obj.pos.y + (sp84 * i) + temp; - temp_fs4 = actor->obj.pos.z + (sp80 * i); - Macbeth_801A68F8(actor, var_s3++, var_fs5, spA0, sp9C, temp_fs2_2, temp_fs3_2, temp_fs4); + temp_fs2_2 = this->obj.pos.x + (sp88 * i); + temp_fs3_2 = this->obj.pos.y + (sp84 * i) + temp; + temp_fs4 = this->obj.pos.z + (sp80 * i); + Macbeth_801A68F8(this, var_s3++, var_fs5, spA0, sp9C, temp_fs2_2, temp_fs3_2, temp_fs4); var_fs5 = temp_fs2_2; spA0 = temp_fs3_2; sp9C = temp_fs4; } - Macbeth_80199D88(D_MA_6012C98, 4, 8); + Macbeth_Texture_Scroll2(D_MA_6012C98, 4, 8); } -void Macbeth_801A6C78(Actor* actor) { +void Macbeth_801A6C78(Actor207* this) { // FAKE if (1) {} - Macbeth_801A0308(actor, actor->obj.pos.z, actor->obj.rot.y, 0); + + Macbeth_801A0308(this, this->obj.pos.z, this->obj.rot.y, 0); + switch (D_i5_801BE320[0]) { case 0: Math_SmoothStepToF(&D_i5_801BE368[0], 30.0f, 0.1f, RAND_FLOAT(1.0f) + 1.0f, 0.01f); @@ -3516,6 +3900,7 @@ void Macbeth_801A6C78(Actor* actor) { D_i5_801BE320[0] = 1; } break; + case 1: Math_SmoothStepToF(&D_i5_801BE368[0], -30.0f, 0.1f, RAND_FLOAT(1.0f) + 1.0f, 0.01f); D_i5_801BE368[1] += D_i5_801BE368[0]; @@ -3524,40 +3909,49 @@ void Macbeth_801A6C78(Actor* actor) { } break; } + switch (D_i5_801BE320[1]) { case 0: D_i5_801BE320[6] = 1; D_i5_801BE320[8] = 1; D_i5_801BE320[5] = 0; D_i5_801BE320[7] = 0; + Math_SmoothStepToF(&D_i5_801BE368[2], 15.0f, 0.2f, 2.0f, 0.01f); + D_i5_801BE368[3] += D_i5_801BE368[2]; - if ((((gPlayer[0].trueZpos - actor->obj.pos.z) * 0.25f) < D_i5_801BE368[3]) || + + if ((((gPlayer[0].trueZpos - this->obj.pos.z) * 0.25f) < D_i5_801BE368[3]) || (D_i5_801BE368[3] > 8000.0f)) { D_i5_801BE320[1] = 1; } break; + case 1: D_i5_801BE320[6] = 0; D_i5_801BE320[8] = 0; D_i5_801BE320[5] = 0; D_i5_801BE320[7] = 0; + Math_SmoothStepToF(&D_i5_801BE368[2], -4.0f, 0.1f, 2.0f, 0.01f); + D_i5_801BE368[3] += D_i5_801BE368[2]; if (D_i5_801BE368[3] < -300.0f) { D_i5_801BE320[1] = 0; } break; } - Math_SmoothStepToF(&actor->obj.pos.x, actor->fwork[19] + D_i5_801BE368[1], 0.2f, 30.0f, 0.01f); - Math_SmoothStepToF(&actor->obj.pos.y, (actor->fwork[5] + 600.0f) + D_i5_801BE368[3], 0.2f, 30.0f, 0.01f); - Math_SmoothStepToF(&actor->obj.pos.z, 1200.0f + D_i5_801BE368[6], 0.2f, 30.0f, 0.01f); + Math_SmoothStepToF(&this->obj.pos.x, this->fwork[19] + D_i5_801BE368[1], 0.2f, 30.0f, 0.01f); + Math_SmoothStepToF(&this->obj.pos.y, (this->fwork[5] + 600.0f) + D_i5_801BE368[3], 0.2f, 30.0f, 0.01f); + Math_SmoothStepToF(&this->obj.pos.z, 1200.0f + D_i5_801BE368[6], 0.2f, 30.0f, 0.01f); } -void Macbeth_801A6FB4(Actor* actor) { +void Macbeth_801A6FB4(Actor207* this) { // FAKE if (1) {} - Macbeth_801A0308(actor, actor->obj.pos.z, actor->obj.rot.y, 0); + + Macbeth_801A0308(this, this->obj.pos.z, this->obj.rot.y, 0); + switch (D_i5_801BE320[0]) { case 0: Math_SmoothStepToF(&D_i5_801BE368[0], 20.0f, 0.1f, RAND_FLOAT(1.0f) + 1.0f, 0.01f); @@ -3566,6 +3960,7 @@ void Macbeth_801A6FB4(Actor* actor) { D_i5_801BE320[0] = 1; } break; + case 1: Math_SmoothStepToF(&D_i5_801BE368[0], -20.0f, 0.1f, RAND_FLOAT(1.0f) + 1.0f, 0.01f); D_i5_801BE368[1] += D_i5_801BE368[0]; @@ -3574,17 +3969,22 @@ void Macbeth_801A6FB4(Actor* actor) { } break; } + switch (D_i5_801BE320[1]) { case 0: D_i5_801BE320[6] = 1; D_i5_801BE320[8] = 1; + Math_SmoothStepToF(&D_i5_801BE368[2], 15.0f, 0.2f, 2.0f, 0.01f); + D_i5_801BE368[3] += D_i5_801BE368[2]; - if ((((gPlayer[0].trueZpos - actor->obj.pos.z) * 0.25f) < D_i5_801BE368[3]) || + + if ((((gPlayer[0].trueZpos - this->obj.pos.z) * 0.25f) < D_i5_801BE368[3]) || (D_i5_801BE368[3] > 8000.0f)) { D_i5_801BE320[1] = 1; } break; + case 1: D_i5_801BE320[6] = 0; D_i5_801BE320[8] = 0; @@ -3595,13 +3995,14 @@ void Macbeth_801A6FB4(Actor* actor) { } break; } - Math_SmoothStepToF(&actor->obj.pos.x, actor->fwork[19] + D_i5_801BE368[1], 0.2f, 30.0f, 0.01f); - Math_SmoothStepToF(&actor->obj.pos.y, (actor->fwork[5] + 600.0f) + D_i5_801BE368[3], 0.2f, 30.0f, 0.01f); - Math_SmoothStepToF(&actor->obj.pos.z, 1200.0f + D_i5_801BE368[6], 0.2f, 30.0f, 0.01f); + Math_SmoothStepToF(&this->obj.pos.x, this->fwork[19] + D_i5_801BE368[1], 0.2f, 30.0f, 0.01f); + Math_SmoothStepToF(&this->obj.pos.y, (this->fwork[5] + 600.0f) + D_i5_801BE368[3], 0.2f, 30.0f, 0.01f); + Math_SmoothStepToF(&this->obj.pos.z, 1200.0f + D_i5_801BE368[6], 0.2f, 30.0f, 0.01f); } -void Macbeth_801A72DC(Actor* actor) { - Macbeth_801A0308(actor, actor->obj.pos.z, actor->obj.rot.y, 0); +void Macbeth_801A72DC(Actor207* this) { + Macbeth_801A0308(this, this->obj.pos.z, this->obj.rot.y, 0); + switch (D_i5_801BE320[0]) { case 0: Math_SmoothStepToF(&D_i5_801BE368[0], 5.0f, 0.1f, RAND_FLOAT(1.0f) + 0.3f, 0.01f); @@ -3610,6 +4011,7 @@ void Macbeth_801A72DC(Actor* actor) { D_i5_801BE320[0] = 1; } break; + case 1: Math_SmoothStepToF(&D_i5_801BE368[0], -5.0f, 0.1f, RAND_FLOAT(1.0f) + 0.3f, 0.01f); D_i5_801BE368[1] += D_i5_801BE368[0]; @@ -3618,13 +4020,14 @@ void Macbeth_801A72DC(Actor* actor) { } break; } - Math_SmoothStepToF(&actor->obj.pos.x, actor->fwork[19] + D_i5_801BE368[1], 0.2f, 30.0f, 0.01f); - Math_SmoothStepToF(&actor->obj.pos.y, actor->fwork[5] + 600.0f, 0.2f, 30.0f, 0.01f); - Math_SmoothStepToF(&actor->obj.pos.z, 1200.0f + D_i5_801BE368[6], 0.2f, 30.0f, 0.01f); + Math_SmoothStepToF(&this->obj.pos.x, this->fwork[19] + D_i5_801BE368[1], 0.2f, 30.0f, 0.01f); + Math_SmoothStepToF(&this->obj.pos.y, this->fwork[5] + 600.0f, 0.2f, 30.0f, 0.01f); + Math_SmoothStepToF(&this->obj.pos.z, 1200.0f + D_i5_801BE368[6], 0.2f, 30.0f, 0.01f); } -void Macbeth_801A74C4(Actor* actor) { - Macbeth_801A0308(actor, actor->obj.pos.z, actor->obj.rot.y, 0); +void Macbeth_801A74C4(Actor207* this) { + Macbeth_801A0308(this, this->obj.pos.z, this->obj.rot.y, 0); + switch (D_i5_801BE320[0]) { case 0: Math_SmoothStepToF(&D_i5_801BE368[0], 22.0f, 0.1f, RAND_FLOAT(1.0f) + 1.0f, 0.01f); @@ -3633,6 +4036,7 @@ void Macbeth_801A74C4(Actor* actor) { D_i5_801BE320[0] = 1; } break; + case 1: Math_SmoothStepToF(&D_i5_801BE368[0], -22.0f, 0.1f, RAND_FLOAT(1.0f) + 1.0f, 0.01f); D_i5_801BE368[1] += D_i5_801BE368[0]; @@ -3641,17 +4045,19 @@ void Macbeth_801A74C4(Actor* actor) { } break; } + switch (D_i5_801BE320[1]) { case 0: D_i5_801BE320[5] = 1; D_i5_801BE320[7] = 1; Math_SmoothStepToF(&D_i5_801BE368[2], 10.0f, 0.4f, 10.0f, 0.01f); D_i5_801BE368[3] += D_i5_801BE368[2]; - if ((((gPlayer[0].trueZpos - actor->obj.pos.z) * 0.25f) < D_i5_801BE368[3]) || + if ((((gPlayer[0].trueZpos - this->obj.pos.z) * 0.25f) < D_i5_801BE368[3]) || (D_i5_801BE368[3] > 8000.0f)) { D_i5_801BE320[1] = 1; } break; + case 1: D_i5_801BE320[5] = 0; D_i5_801BE320[7] = 0; @@ -3664,27 +4070,30 @@ void Macbeth_801A74C4(Actor* actor) { } break; } + switch (D_i5_801BE320[12]) { case 0: - Math_SmoothStepToF(&actor->obj.rot.z, 45.0f, 0.4f, 10.0f, 1.0f); - if (actor->obj.rot.z >= 45.0f) { + Math_SmoothStepToF(&this->obj.rot.z, 45.0f, 0.4f, 10.0f, 1.0f); + if (this->obj.rot.z >= 45.0f) { D_i5_801BE320[12] = 1; } break; + case 1: - Math_SmoothStepToF(&actor->obj.rot.z, -45.0f, 0.4f, 10.0f, 1.0f); - if (actor->obj.rot.z <= -45.0f) { + Math_SmoothStepToF(&this->obj.rot.z, -45.0f, 0.4f, 10.0f, 1.0f); + if (this->obj.rot.z <= -45.0f) { D_i5_801BE320[12] = 0; } break; } - Math_SmoothStepToF(&actor->obj.pos.x, actor->fwork[19] + D_i5_801BE368[1], 0.2f, 30.0f, 0.01f); - Math_SmoothStepToF(&actor->obj.pos.y, (actor->fwork[5] + 600.0f) + D_i5_801BE368[3], 0.2f, 30.0f, 0.01f); - Math_SmoothStepToF(&actor->obj.pos.z, 1200.0f + D_i5_801BE368[6], 0.2f, 30.0f, 0.01f); + Math_SmoothStepToF(&this->obj.pos.x, this->fwork[19] + D_i5_801BE368[1], 0.2f, 30.0f, 0.01f); + Math_SmoothStepToF(&this->obj.pos.y, (this->fwork[5] + 600.0f) + D_i5_801BE368[3], 0.2f, 30.0f, 0.01f); + Math_SmoothStepToF(&this->obj.pos.z, 1200.0f + D_i5_801BE368[6], 0.2f, 30.0f, 0.01f); } -void Macbeth_801A78B0(Actor* actor) { - Macbeth_801A0308(actor, actor->obj.pos.z, actor->obj.rot.y, 0); +void Macbeth_801A78B0(Actor207* this) { + Macbeth_801A0308(this, this->obj.pos.z, this->obj.rot.y, 0); + switch (D_i5_801BE320[0]) { case 0: Math_SmoothStepToF(&D_i5_801BE368[0], 10.0f, 0.1f, RAND_FLOAT(1.0f) + 1.0f, 0.01f); @@ -3693,6 +4102,7 @@ void Macbeth_801A78B0(Actor* actor) { D_i5_801BE320[0] = 1; } break; + case 1: Math_SmoothStepToF(&D_i5_801BE368[0], -10.0f, 0.1f, RAND_FLOAT(1.0f) + 1.0f, 0.01f); D_i5_801BE368[1] += D_i5_801BE368[0]; @@ -3701,12 +4111,12 @@ void Macbeth_801A78B0(Actor* actor) { } break; } - - Math_SmoothStepToF(&actor->obj.pos.x, actor->fwork[19] + D_i5_801BE368[1], 0.1f, 10.0f, 0.01f); + Math_SmoothStepToF(&this->obj.pos.x, this->fwork[19] + D_i5_801BE368[1], 0.1f, 10.0f, 0.01f); } -void Macbeth_801A7A30(Actor* actor) { - Macbeth_801A0308(actor, actor->obj.pos.z, actor->obj.rot.y, 0); +void Macbeth_801A7A30(Actor207* this) { + Macbeth_801A0308(this, this->obj.pos.z, this->obj.rot.y, 0); + switch (D_i5_801BE320[0]) { case 0: Math_SmoothStepToF(&D_i5_801BE368[0], 30.0f, 0.1f, RAND_FLOAT(1.0f) + 1.0f, 0.01f); @@ -3715,6 +4125,7 @@ void Macbeth_801A7A30(Actor* actor) { D_i5_801BE320[0] = 1; } break; + case 1: Math_SmoothStepToF(&D_i5_801BE368[0], -30.0f, 0.1f, RAND_FLOAT(1.0f) + 1.0f, 0.01f); D_i5_801BE368[1] += D_i5_801BE368[0]; @@ -3723,6 +4134,7 @@ void Macbeth_801A7A30(Actor* actor) { } break; } + switch (D_i5_801BE320[1]) { case 0: D_i5_801BE320[6] = 0; @@ -3735,6 +4147,7 @@ void Macbeth_801A7A30(Actor* actor) { D_i5_801BE320[1] = 1; } break; + case 1: D_i5_801BE320[6] = 0; D_i5_801BE320[8] = 0; @@ -3747,31 +4160,34 @@ void Macbeth_801A7A30(Actor* actor) { } break; } - actor->obj.pos.x = actor->fwork[19] + D_i5_801BE368[1]; - actor->obj.pos.y = actor->fwork[5] + D_i5_801BE368[3]; - actor->obj.pos.z = 1200.0f + D_i5_801BE368[6]; + this->obj.pos.x = this->fwork[19] + D_i5_801BE368[1]; + this->obj.pos.y = this->fwork[5] + D_i5_801BE368[3]; + this->obj.pos.z = 1200.0f + D_i5_801BE368[6]; } -void Macbeth_801A7CAC(Actor* actor) { - f32 temp_fa0; - f32 temp_fa1; - f32 sp34; - f32 sp30; - f32 sp2C; +void Macbeth_Actor207_FacePlayer(Actor207* this) { + f32 xDist; + f32 yDist; + f32 xRot; + f32 yRot; + f32 EuclDist; - temp_fa0 = gPlayer[0].pos.x - actor->obj.pos.x; - temp_fa1 = (gPlayer[0].trueZpos - 130.0f) - actor->obj.pos.z; - sp2C = sqrtf(SQ(temp_fa0) + SQ(temp_fa1)); - sp30 = Math_Atan2F(temp_fa0, temp_fa1); - sp34 = -Math_Atan2F(gPlayer[0].pos.y - actor->obj.pos.y, sp2C); - Math_SmoothStepToAngle(&actor->obj.rot.y, Math_RadToDeg(sp30), 0.1f, 20.0f, 0.01f); - Math_SmoothStepToAngle(&actor->obj.rot.x, Math_RadToDeg(sp34), 0.1f, 20.0f, 0.01f); + xDist = gPlayer[0].pos.x - this->obj.pos.x; + yDist = (gPlayer[0].trueZpos - 130.0f) - this->obj.pos.z; + + EuclDist = sqrtf(SQ(xDist) + SQ(yDist)); + + yRot = Math_Atan2F(xDist, yDist); + xRot = -Math_Atan2F(gPlayer[0].pos.y - this->obj.pos.y, EuclDist); + + Math_SmoothStepToAngle(&this->obj.rot.y, Math_RadToDeg(yRot), 0.1f, 20.0f, 0.01f); + Math_SmoothStepToAngle(&this->obj.rot.x, Math_RadToDeg(xRot), 0.1f, 20.0f, 0.01f); } -void Macbeth_801A7D98(Actor* actor) { +void Macbeth_Actor207_Init(Actor207* this) { u8 i; - Macbeth_80199F8C(actor); + Macbeth_Train_Init(this); // clang-format off for (i = 0; i < 35; i++) { D_i5_801BE320[i] = 0; } for (i = 0; i < 50; i++) { D_i5_801BE368[i] = 0.0f; } @@ -3779,16 +4195,19 @@ void Macbeth_801A7D98(Actor* actor) { D_i5_801BE320[29] = 250; D_i5_801BE320[9] = 200; D_i5_801BE320[10] = 250; - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(gNoHitbox); + + this->info.hitbox = SEGMENTED_TO_VIRTUAL(gNoHitbox); + D_i5_801BE320[14] = 0; D_i5_801BE320[15] = 0; + gBossFrameCount = 0; } static Vec3f D_i5_801BA744 = { 0.0f, 0.0f, 0.0f }; static Vec3f D_i5_801BA750 = { 0.0f, 0.0f, 30.0f }; -void Macbeth_Actor207_Update(Actor* actor) { +void Macbeth_Actor207_Update(Actor207* this) { s32 pad; f32 temp; f32 sp374; @@ -3807,52 +4226,61 @@ void Macbeth_Actor207_Update(Actor* actor) { s16 spC6; u8 i; - switch (actor->state) { + switch (this->state) { case 0: - Macbeth_8019A198(actor); - Macbeth_801A015C(actor); - actor->obj.pos.y += 250.0f; + Macbeth_8019A198(this); + Macbeth_801A015C(this); + + this->obj.pos.y += 250.0f; D_i5_801BE320[3] = 0; - Macbeth_8019A830(actor); - Macbeth_8019A728(actor); - if (actor->iwork[1] != 0) { + + Macbeth_8019A830(this); + Macbeth_8019A728(this); + + if (this->iwork[1] != 0) { AUDIO_PLAY_BGM(NA_BGM_BOSS_MA); - actor->state = 1; + this->state = 1; } - Macbeth_801A6984(actor); + Macbeth_801A6984(this); break; + case 1: - Macbeth_8019A198(actor); - Macbeth_801A015C(actor); - actor->obj.pos.y += 250.0f; + Macbeth_8019A198(this); + Macbeth_801A015C(this); + this->obj.pos.y += 250.0f; + D_i5_801BE320[3]++; if (D_i5_801BE320[3] >= 20) { - actor->timer_0BC = 20; - actor->state = 2; + this->timer_0BC = 20; + this->state = 2; } - Macbeth_8019A830(actor); - Macbeth_801A6984(actor); + Macbeth_8019A830(this); + Macbeth_801A6984(this); break; + case 2: - Macbeth_8019A198(actor); - Macbeth_801A0308(actor, actor->obj.pos.z, actor->obj.rot.y, 0); - if (actor->timer_0BC == 0) { - Math_SmoothStepToF(&actor->obj.pos.y, actor->fwork[5] + 500.0f, 0.5f, 5.0f, 5.0f); + Macbeth_8019A198(this); + Macbeth_801A0308(this, this->obj.pos.z, this->obj.rot.y, 0); + + if (this->timer_0BC == 0) { + Math_SmoothStepToF(&this->obj.pos.y, this->fwork[5] + 500.0f, 0.5f, 5.0f, 5.0f); D_i5_801BE320[5] = 1; D_i5_801BE320[7] = 1; - if ((actor->fwork[5] + 500.0f) <= actor->obj.pos.y) { + if ((this->fwork[5] + 500.0f) <= this->obj.pos.y) { Radio_PlayMessage(gMsg_ID_17430, RCID_BOSS_MACBETH); - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_603677C); - actor->state = 3; + this->info.hitbox = SEGMENTED_TO_VIRTUAL(aMaActor207Hitbox); + this->state = 3; } } - Macbeth_8019A830(actor); - Macbeth_801A6984(actor); + Macbeth_8019A830(this); + Macbeth_801A6984(this); break; + case 3: - Macbeth_8019A198(actor); - if (actor->timer_0BC == 0) { - actor->obj.pos.z -= 2.0f; + Macbeth_8019A198(this); + + if (this->timer_0BC == 0) { + this->obj.pos.z -= 2.0f; if (D_i5_801BE320[3] < 70) { D_i5_801BE320[3] = (s16) (D_i5_801BE320[3] + 1); } @@ -3862,30 +4290,36 @@ void Macbeth_Actor207_Update(Actor* actor) { D_i5_801BE320[6] = 1; D_i5_801BE320[8] = 1; } - Math_SmoothStepToF(&actor->obj.pos.y, actor->fwork[5] + 1600.0f, 0.2f, 30.0f, 10.0f); - if ((actor->fwork[5] + 1600.0f) <= actor->obj.pos.y) { + + Math_SmoothStepToF(&this->obj.pos.y, this->fwork[5] + 1600.0f, 0.2f, 30.0f, 10.0f); + + if ((this->fwork[5] + 1600.0f) <= this->obj.pos.y) { D_i5_801BE320[6] = 0; D_i5_801BE320[8] = 0; D_i5_801BE320[3] = 0; D_i5_801BE320[2] = 1; D_i5_801BE320[31] = 30; - actor->timer_0C0 = 1500; - actor->state = 4; + this->timer_0C0 = 1500; + this->state = 4; } } - Macbeth_8019A830(actor); - Macbeth_801A6984(actor); + Macbeth_8019A830(this); + Macbeth_801A6984(this); break; + case 4: - Math_SmoothStepToAngle(&actor->obj.rot.z, 0.0f, 0.1f, 20.0f, 0.01f); - Macbeth_8019A198(actor); + Math_SmoothStepToAngle(&this->obj.rot.z, 0.0f, 0.1f, 20.0f, 0.01f); + Macbeth_8019A198(this); + D_i5_801BE320[3]++; if (D_i5_801BE320[3] >= 60) { D_i5_801BE320[3] = 0; } - Macbeth_801A6C78(actor); - Macbeth_801A6984(actor); - Macbeth_801A7CAC(actor); + + Macbeth_801A6C78(this); + Macbeth_801A6984(this); + Macbeth_Actor207_FacePlayer(this); + if ((D_i5_801BE320[16] != 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { var_v1 = 0xFF; if (D_i5_801BE320[18] == 2) { @@ -3896,17 +4330,18 @@ void Macbeth_Actor207_Update(Actor* actor) { D_i5_801BE320[3] = 0; D_i5_801BE320[2] = 2; D_i5_801BE320[31] = 30; - actor->iwork[7] = 0; - actor->iwork[8] = 0; - actor->iwork[9] = 0; + this->iwork[7] = 0; + this->iwork[8] = 0; + this->iwork[9] = 0; Radio_PlayMessage(gMsg_ID_17475, RCID_BOSS_MACBETH); - actor->state = 18; + this->state = 18; break; } - if (!(var_v1 & gGameFrameCount)) { + + if ((var_v1 & gGameFrameCount) == 0) { if ((D_i5_801BE320[9] > 0) || (D_i5_801BE320[10] > 0)) { - if (actor->timer_0C0 == 0) { - actor->timer_0C0 = 1500; + if (this->timer_0C0 == 0) { + this->timer_0C0 = 1500; Radio_PlayMessage(gMsg_ID_17460, RCID_BOSS_MACBETH); } if (((D_i5_801BE320[9] > 0) && (Rand_ZeroOne() > 0.5f)) || (D_i5_801BE320[10] <= 0) || @@ -3919,9 +4354,9 @@ void Macbeth_Actor207_Update(Actor* actor) { D_i5_801BE320[3] = 0; D_i5_801BE320[2] = 5; D_i5_801BE320[31] = 30; - actor->timer_0BC = 100; - AUDIO_PLAY_SFX(NA_SE_EN_MABOSS_CHARGE0, actor->sfxSource, 4); - actor->state = 12; + this->timer_0BC = 100; + AUDIO_PLAY_SFX(NA_SE_EN_MABOSS_CHARGE0, this->sfxSource, 4); + this->state = 12; } } else if ((D_i5_801BE320[26] != 0) && (D_i5_801BE320[10] > 0)) { D_i5_801BE320[6] = 1; @@ -3931,7 +4366,7 @@ void Macbeth_Actor207_Update(Actor* actor) { D_i5_801BE320[3] = 0; D_i5_801BE320[2] = 2; D_i5_801BE320[31] = 30; - actor->state = 5; + this->state = 5; } } else if ((D_i5_801BE320[20] != 3) && (D_i5_801BE320[25] == 0)) { if ((Rand_ZeroOne() > 0.5f) && (D_i5_801BE320[26] != 0)) { @@ -3942,8 +4377,8 @@ void Macbeth_Actor207_Update(Actor* actor) { D_i5_801BE320[3] = 0; D_i5_801BE320[2] = 7; D_i5_801BE320[31] = 30; - actor->timer_0BC = 100; - actor->state = 15; + this->timer_0BC = 100; + this->state = 15; } else { D_i5_801BE320[6] = 1; D_i5_801BE320[8] = 0; @@ -3952,56 +4387,63 @@ void Macbeth_Actor207_Update(Actor* actor) { D_i5_801BE320[3] = 0; D_i5_801BE320[2] = 4; D_i5_801BE320[31] = 30; - actor->timer_0BC = 20; - actor->state = 11; + this->timer_0BC = 20; + this->state = 11; } } } } break; + case 5: - Macbeth_8019A198(actor); - Macbeth_801A0308(actor, actor->obj.pos.z, actor->obj.rot.y, 0); - Math_SmoothStepToF(&actor->obj.pos.x, gPlayer[0].pos.x, 0.1f, 10.0f, 0.01f); - Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].trueZpos - 1500.0f, 0.1f, 20.0f, 0.01f); - Math_SmoothStepToF(&actor->obj.pos.y, - (actor->fwork[5] + 600.0f + (gPlayer[0].trueZpos - actor->obj.pos.z) * 0.25f) + 10.0f, + Macbeth_8019A198(this); + Macbeth_801A0308(this, this->obj.pos.z, this->obj.rot.y, 0); + + Math_SmoothStepToF(&this->obj.pos.x, gPlayer[0].pos.x, 0.1f, 10.0f, 0.01f); + Math_SmoothStepToF(&this->obj.pos.z, gPlayer[0].trueZpos - 1500.0f, 0.1f, 20.0f, 0.01f); + Math_SmoothStepToF(&this->obj.pos.y, + (this->fwork[5] + 600.0f + (gPlayer[0].trueZpos - this->obj.pos.z) * 0.25f) + 10.0f, 0.1f, 10.0f, 0.01f); - if (((actor->fwork[5] + 600.0f + (gPlayer[0].trueZpos - actor->obj.pos.z) * 0.25f) <= actor->obj.pos.y) && - (actor->obj.pos.z < (gPlayer[0].trueZpos - 1300.0f))) { - actor->timer_0BC = 0; - actor->state = 6; + if (((this->fwork[5] + 600.0f + (gPlayer[0].trueZpos - this->obj.pos.z) * 0.25f) <= this->obj.pos.y) && + (this->obj.pos.z < (gPlayer[0].trueZpos - 1300.0f))) { + this->timer_0BC = 0; + this->state = 6; } - Macbeth_801A7CAC(actor); - Macbeth_801A6984(actor); + Macbeth_Actor207_FacePlayer(this); + Macbeth_801A6984(this); break; + case 6: - Macbeth_8019A198(actor); - if (actor->timer_0BC <= 0) { - actor->state = 7; + Macbeth_8019A198(this); + + if (this->timer_0BC <= 0) { + this->state = 7; } + D_i5_801BE368[9] = gPlayer[0].pos.x; - Macbeth_801A7CAC(actor); - Macbeth_801A6984(actor); + + Macbeth_Actor207_FacePlayer(this); + Macbeth_801A6984(this); break; + case 7: - if ((gPlayer[0].trueZpos - actor->obj.pos.z) < 1200.0f) { + if ((gPlayer[0].trueZpos - this->obj.pos.z) < 1200.0f) { if (D_i5_801BE320[3] < (Animation_GetFrameCount(&D_MA_601D188) - 1)) { D_i5_801BE320[3] = (s16) (D_i5_801BE320[3] + 1); if ((D_i5_801BE320[3] == 26) && (D_i5_801BE320[10] > 0)) { - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_6036818); - AUDIO_PLAY_SFX(NA_SE_EN_CATCH, actor->sfxSource, 4); + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_6036818); + AUDIO_PLAY_SFX(NA_SE_EN_CATCH, this->sfxSource, 4); } } else { - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(gNoHitbox); - if ((gPlayer[0].pos.y + 1200.0f) < actor->obj.pos.y) { - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_603677C); + this->info.hitbox = SEGMENTED_TO_VIRTUAL(gNoHitbox); + if ((gPlayer[0].pos.y + 1200.0f) < this->obj.pos.y) { + this->info.hitbox = SEGMENTED_TO_VIRTUAL(aMaActor207Hitbox); D_i5_801BE320[3] = 0; D_i5_801BE320[2] = 1; D_i5_801BE320[31] = 30; D_i5_801BE320[6] = 0; D_i5_801BE320[8] = 0; - actor->state = 4; + this->state = 4; } } } @@ -4021,36 +4463,45 @@ void Macbeth_Actor207_Update(Actor* actor) { var_fv0 = 100.0f; break; } - if (var_fv0 < (gPlayer[0].trueZpos - actor->obj.pos.z)) { - Macbeth_801A7CAC(actor); + + if (var_fv0 < (gPlayer[0].trueZpos - this->obj.pos.z)) { + Macbeth_Actor207_FacePlayer(this); D_i5_801BE368[9] = gPlayer[0].pos.x; } - Math_SmoothStepToF(&actor->obj.pos.x, D_i5_801BE368[9], 0.2f, 30.0f, 0.01f); + + Math_SmoothStepToF(&this->obj.pos.x, D_i5_801BE368[9], 0.2f, 30.0f, 0.01f); + if (D_i5_801BE320[3] < 29) { - Math_SmoothStepToF(&actor->obj.pos.y, gPlayer[0].pos.y + 250.0f, 0.3f, 45.0f, 0.01f); + Math_SmoothStepToF(&this->obj.pos.y, gPlayer[0].pos.y + 250.0f, 0.3f, 45.0f, 0.01f); } else { - Math_SmoothStepToF(&actor->obj.pos.y, gPlayer[0].pos.y + 1210.0f, 0.1f, 20.0f, 0.01f); + Math_SmoothStepToF(&this->obj.pos.y, gPlayer[0].pos.y + 1210.0f, 0.1f, 20.0f, 0.01f); } - Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].trueZpos - 100.0f, 0.3f, 60.0f, 0.01f); - Math_SmoothStepToF(&actor->obj.rot.x, 0.0f, 0.2f, 20.0f, 0.01f); - Macbeth_801A6984(actor); + + Math_SmoothStepToF(&this->obj.pos.z, gPlayer[0].trueZpos - 100.0f, 0.3f, 60.0f, 0.01f); + Math_SmoothStepToF(&this->obj.rot.x, 0.0f, 0.2f, 20.0f, 0.01f); + Macbeth_801A6984(this); break; + case 8: - Macbeth_8019A198(actor); + Macbeth_8019A198(this); + if (((gGameFrameCount % 16) == 0)) { - AUDIO_PLAY_SFX(NA_SE_EN_MABOSS_RAGE, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MABOSS_RAGE, this->sfxSource, 4); } - Macbeth_801A74C4(actor); - Macbeth_801A6984(actor); + + Macbeth_801A74C4(this); + Macbeth_801A6984(this); + if (D_i5_801BE320[3] < (Animation_GetFrameCount(&D_MA_6017714) - 1)) { D_i5_801BE320[3] = (s16) (D_i5_801BE320[3] + 1); } else { D_i5_801BE320[3] = 0; } + if (D_i5_801BE320[4] <= 0) { D_i5_801BE320[3] = 0; D_i5_801BE320[2] = 1; - actor->obj.rot.x -= 360.0f; + this->obj.rot.x -= 360.0f; D_i5_801BE320[3] = 0; D_i5_801BE320[2] = 1; D_i5_801BE320[31] = 30; @@ -4058,61 +4509,71 @@ void Macbeth_Actor207_Update(Actor* actor) { D_i5_801BE320[7] = 0; D_i5_801BE320[6] = 0; D_i5_801BE320[8] = 0; - actor->state = 4; + this->state = 4; break; } - if (actor->dmgType != DMG_NONE) { - actor->dmgType = DMG_NONE; - actor->iwork[9] = 15; - D_i5_801BE320[29] -= actor->damage; + + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + this->iwork[9] = 15; + + D_i5_801BE320[29] -= this->damage; if (D_i5_801BE320[29] <= 0) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 255; - AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, this->sfxSource, 4); Radio_PlayMessage(gMsg_ID_17450, RCID_BOSS_MACBETH); - func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f); - Macbeth_801AD624(actor->vwork[2].x, actor->vwork[2].y, actor->vwork[2].z, - RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT(7.0f) + 7.0f, -2.0f, RAND_FLOAT(360.0f), - RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(30.0f), - RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), - (s32) (RAND_FLOAT(50.0f) + 70.0f), 11, 1.0f); + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 10.0f); + Macbeth_Effect357_Spawn1(this->vwork[2].x, this->vwork[2].y, this->vwork[2].z, + RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT(7.0f) + 7.0f, -2.0f, + RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), + RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), + RAND_FLOAT_CENTERED(30.0f), (s32) (RAND_FLOAT(50.0f) + 70.0f), 11, 1.0f); D_i5_801BE320[3] = 0; D_i5_801BE320[2] = 1; D_i5_801BE320[31] = 30; - actor->state = 9; + this->state = 9; break; } + D_i5_801BE368[12] = 30.0f; D_i5_801BE368[13] = 30.0f; + if (D_i5_801BE320[29] > 0) { if (D_i5_801BE320[29] > 100) { - AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, this->sfxSource, 4); } else { - AUDIO_PLAY_SFX(NA_SE_EN_KNOCK_DOWN, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_KNOCK_DOWN, this->sfxSource, 4); } } } - if (((gGameFrameCount % 2) == 0)) { - actor->obj.pos.x += D_i5_801BE368[12]; - actor->obj.pos.y += D_i5_801BE368[13]; + + if ((gGameFrameCount % 2) == 0) { + this->obj.pos.x += D_i5_801BE368[12]; + this->obj.pos.y += D_i5_801BE368[13]; } else { - actor->obj.pos.x -= D_i5_801BE368[12]; - actor->obj.pos.y -= D_i5_801BE368[13]; + this->obj.pos.x -= D_i5_801BE368[12]; + this->obj.pos.y -= D_i5_801BE368[13]; } + if (D_i5_801BE368[12] > 0.0f) { D_i5_801BE368[12] -= 1.0f; } + if (D_i5_801BE368[13] > 0.0f) { D_i5_801BE368[13] -= 1.0f; } - Math_SmoothStepToAngle(&actor->obj.rot.x, 0.0f, 0.1f, 20.0f, 0.01f); - Math_SmoothStepToAngle(&actor->obj.rot.y, 0.0f, 0.1f, 20.0f, 0.01f); - if (((gGameFrameCount % 32) == 0)) { + + Math_SmoothStepToAngle(&this->obj.rot.x, 0.0f, 0.1f, 20.0f, 0.01f); + Math_SmoothStepToAngle(&this->obj.rot.y, 0.0f, 0.1f, 20.0f, 0.01f); + + if ((gGameFrameCount % 32) == 0) { D_i5_801BE320[6] = 0; D_i5_801BE320[8] = 0; D_i5_801BE320[5] = 0; D_i5_801BE320[7] = 0; + if (Rand_ZeroOne() >= 0.5f) { D_i5_801BE320[6] = 1; } @@ -4127,48 +4588,59 @@ void Macbeth_Actor207_Update(Actor* actor) { } } break; + case 9: - if (D_i5_801BE368[6] < actor->obj.pos.z) { + if (D_i5_801BE368[6] < this->obj.pos.z) { D_i5_801BE320[1] = 1; - Macbeth_801A6984(actor); + Macbeth_801A6984(this); } - if ((actor->obj.pos.z - D_i5_801BE368[6]) < 500) { - Math_SmoothStepToF(&actor->obj.pos.x, D_i5_801BE368[4], 0.1f, 10.0f, 1.0f); - Math_SmoothStepToF(&actor->obj.pos.y, D_i5_801BE368[5] - 100.0f, 0.1f, 15.0f, 10.0f); + + if ((this->obj.pos.z - D_i5_801BE368[6]) < 500) { + Math_SmoothStepToF(&this->obj.pos.x, D_i5_801BE368[4], 0.1f, 10.0f, 1.0f); + Math_SmoothStepToF(&this->obj.pos.y, D_i5_801BE368[5] - 100.0f, 0.1f, 15.0f, 10.0f); } else { - Math_SmoothStepToF(&actor->obj.pos.y, D_i5_801BE368[5] + 600.0f, 0.1f, 20.0f, 10.0f); + Math_SmoothStepToF(&this->obj.pos.y, D_i5_801BE368[5] + 600.0f, 0.1f, 20.0f, 10.0f); } - Math_SmoothStepToF(&actor->obj.pos.z, D_i5_801BE368[6] - 100.0f, 0.2f, 5.0f - gActors[D_i5_801BE314].vel.z, + + Math_SmoothStepToF(&this->obj.pos.z, D_i5_801BE368[6] - 100.0f, 0.2f, 5.0f - gActors[D_i5_801BE314].vel.z, 1.0f); - actor->obj.rot.x += 10.0f; - actor->obj.rot.z += 10.0f; - if (((gGameFrameCount % 8) == 0)) { - func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f); - func_effect_8007C688(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 5.0f, 8); + + this->obj.rot.x += 10.0f; + this->obj.rot.z += 10.0f; + + if ((gGameFrameCount % 8) == 0) { + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 10.0f); + Effect_Effect387_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 5.0f, 8); } - if ((actor->obj.pos.z <= D_i5_801BE368[6]) && (actor->obj.pos.y <= D_i5_801BE368[5])) { + + if ((this->obj.pos.z <= D_i5_801BE368[6]) && (this->obj.pos.y <= D_i5_801BE368[5])) { D_i5_801BE320[23] = 1; gTeamLowHealthMsgTimer = -1; - actor->state = 10; - actor->timer_0BC = 50; + this->state = 10; + this->timer_0BC = 50; } break; + case 10: - Object_Kill(&actor->obj, actor->sfxSource); + Object_Kill(&this->obj, this->sfxSource); break; + case 11: - Math_SmoothStepToAngle(&actor->obj.rot.y, 0.0f, 0.1f, 20.0f, 0.01f); - Math_SmoothStepToAngle(&actor->obj.rot.x, 0.0f, 0.1f, 20.0f, 0.01f); - Math_SmoothStepToAngle(&actor->obj.rot.z, 0.0f, 0.1f, 20.0f, 0.01f); - Macbeth_8019A198(actor); - Macbeth_801A6FB4(actor); - Macbeth_801A6984(actor); - if (actor->timer_0BC == 0) { + Math_SmoothStepToAngle(&this->obj.rot.y, 0.0f, 0.1f, 20.0f, 0.01f); + Math_SmoothStepToAngle(&this->obj.rot.x, 0.0f, 0.1f, 20.0f, 0.01f); + Math_SmoothStepToAngle(&this->obj.rot.z, 0.0f, 0.1f, 20.0f, 0.01f); + + Macbeth_8019A198(this); + Macbeth_801A6FB4(this); + Macbeth_801A6984(this); + + if (this->timer_0BC == 0) { if (D_i5_801BE320[3] < (Animation_GetFrameCount(&D_MA_6016B2C) - 1)) { D_i5_801BE320[3]++; } else { D_i5_801BE320[3] = 0; } + switch (D_i5_801BE320[18]) { case 0: case 1: @@ -4183,34 +4655,36 @@ void Macbeth_Actor207_Update(Actor* actor) { var_v0 = 8 - 1; var_s0 = 20; break; - default: var_v0 = 4 - 1; var_s0 = 10; break; } + if ((var_v0 & gGameFrameCount) == 0) { - Macbeth_801ADCEC(actor->obj.pos.x, actor->obj.pos.y - 90.0f, actor->obj.pos.z - 50.0f, - D_i5_801BE368[0] * 0.8f, -10.0f, 8.0f); + Macbeth_MaBombDrop_Spawn(this->obj.pos.x, this->obj.pos.y - 90.0f, this->obj.pos.z - 50.0f, + D_i5_801BE368[0] * 0.8f, -10.0f, 8.0f); D_i5_801BE320[11]++; if (D_i5_801BE320[11] >= var_s0) { - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_603677C); + this->info.hitbox = SEGMENTED_TO_VIRTUAL(aMaActor207Hitbox); D_i5_801BE320[3] = 0; D_i5_801BE320[2] = 1; D_i5_801BE320[31] = 30; D_i5_801BE320[5] = 0; D_i5_801BE320[7] = 0; D_i5_801BE320[11] = 0; - actor->state = 4; + this->state = 4; D_i5_801BE320[25] = 1; } } } - if (((gGameFrameCount % 32) == 0)) { + + if ((gGameFrameCount % 32) == 0) { D_i5_801BE320[6] = 0; D_i5_801BE320[8] = 0; D_i5_801BE320[5] = 0; D_i5_801BE320[7] = 0; + if (Rand_ZeroOne() >= 0.5f) { D_i5_801BE320[6] = 1; } @@ -4225,133 +4699,167 @@ void Macbeth_Actor207_Update(Actor* actor) { } } break; + case 12: - Math_SmoothStepToAngle(&actor->obj.rot.y, 0.0f, 0.1f, 20.0f, 0.01f); - Math_SmoothStepToAngle(&actor->obj.rot.x, 0.0f, 0.1f, 20.0f, 0.01f); - Math_SmoothStepToAngle(&actor->obj.rot.z, 0.0f, 0.1f, 20.0f, 0.01f); + Math_SmoothStepToAngle(&this->obj.rot.y, 0.0f, 0.1f, 20.0f, 0.01f); + Math_SmoothStepToAngle(&this->obj.rot.x, 0.0f, 0.1f, 20.0f, 0.01f); + Math_SmoothStepToAngle(&this->obj.rot.z, 0.0f, 0.1f, 20.0f, 0.01f); + if (D_i5_801BE320[3] < (Animation_GetFrameCount(&D_MA_60163F0) - 1)) { D_i5_801BE320[3]++; } else { D_i5_801BE320[3] = 0; } - Macbeth_8019A198(actor); - Macbeth_801A72DC(actor); - Macbeth_801A6984(actor); + + Macbeth_8019A198(this); + Macbeth_801A72DC(this); + Macbeth_801A6984(this); + if (D_i5_801BE320[9] <= 0) { - Audio_KillSfxBySourceAndId(actor->sfxSource, NA_SE_EN_MABOSS_CHARGE0); - actor->state = 14; - actor->vel.y = -20.0f; + Audio_KillSfxBySourceAndId(this->sfxSource, NA_SE_EN_MABOSS_CHARGE0); + this->state = 14; + this->vel.y = -20.0f; } - D_i5_801BE368[14] = actor->vwork[0].x; - D_i5_801BE368[15] = actor->vwork[0].y; - D_i5_801BE368[16] = actor->vwork[0].z; - if (actor->timer_0BC > 15) { + + D_i5_801BE368[14] = this->vwork[0].x; + D_i5_801BE368[15] = this->vwork[0].y; + D_i5_801BE368[16] = this->vwork[0].z; + + if (this->timer_0BC > 15) { for (i = 0; i < 2; i++) { D_i5_801BE368[23] = 3.0f; - Macbeth_801AE800(actor->vwork[2].x + RAND_FLOAT_CENTERED(400.0f), - actor->vwork[2].y + RAND_FLOAT_CENTERED(400.0f), actor->vwork[2].z + 50.0f, - actor->vwork[2].x - 200.0f, actor->vwork[2].y, actor->vwork[2].z); + Macbeth_Effect379_Spawn(this->vwork[2].x + RAND_FLOAT_CENTERED(400.0f), + this->vwork[2].y + RAND_FLOAT_CENTERED(400.0f), this->vwork[2].z + 50.0f, + this->vwork[2].x - 200.0f, this->vwork[2].y, this->vwork[2].z); D_i5_801BE368[23] = 4.0f; - Macbeth_801AE800(actor->vwork[4].x + RAND_FLOAT_CENTERED(400.0f), - actor->vwork[4].y + RAND_FLOAT_CENTERED(400.0f), actor->vwork[4].z + 50.0f, - actor->vwork[4].x + 200.0f, actor->vwork[4].y, actor->vwork[4].z); + Macbeth_Effect379_Spawn(this->vwork[4].x + RAND_FLOAT_CENTERED(400.0f), + this->vwork[4].y + RAND_FLOAT_CENTERED(400.0f), this->vwork[4].z + 50.0f, + this->vwork[4].x + 200.0f, this->vwork[4].y, this->vwork[4].z); } } - if (actor->timer_0BC == 0) { - Audio_KillSfxBySourceAndId(actor->sfxSource, NA_SE_EN_MABOSS_CHARGE0); + + if (this->timer_0BC == 0) { + Audio_KillSfxBySourceAndId(this->sfxSource, NA_SE_EN_MABOSS_CHARGE0); D_i5_801BE320[3] = 0; D_i5_801BE320[2] = 6; D_i5_801BE320[31] = 30; - actor->timer_0BC = 70; - actor->state = 13; + this->timer_0BC = 70; + this->state = 13; } - break; + case 13: - Math_SmoothStepToAngle(&actor->obj.rot.y, 0.0f, 0.1f, 20.0f, 0.01f); - Math_SmoothStepToAngle(&actor->obj.rot.x, 0.0f, 0.1f, 20.0f, 0.01f); - Math_SmoothStepToAngle(&actor->obj.rot.z, 0.0f, 0.1f, 20.0f, 0.01f); + Math_SmoothStepToAngle(&this->obj.rot.y, 0.0f, 0.1f, 20.0f, 0.01f); + Math_SmoothStepToAngle(&this->obj.rot.x, 0.0f, 0.1f, 20.0f, 0.01f); + Math_SmoothStepToAngle(&this->obj.rot.z, 0.0f, 0.1f, 20.0f, 0.01f); + if (D_i5_801BE320[3] < (Animation_GetFrameCount(&D_MA_6016040) - 1)) { D_i5_801BE320[3]++; } - Macbeth_8019A198(actor); - Macbeth_801A72DC(actor); - Macbeth_801A6984(actor); + + Macbeth_8019A198(this); + Macbeth_801A72DC(this); + Macbeth_801A6984(this); + D_i5_801BE320[5] = 0; D_i5_801BE320[7] = 0; - if (actor->timer_0BC == 60) { - AUDIO_PLAY_SFX(NA_SE_EN_MABOSS_SHOT0, actor->sfxSource, 4); + + if (this->timer_0BC == 60) { + AUDIO_PLAY_SFX(NA_SE_EN_MABOSS_SHOT0, this->sfxSource, 4); D_i5_801BE320[24] = 0; spC6 = RAND_INT(5.0f); + for (i = 0; i < 10; i++) { - Macbeth_801AE610(actor->vwork[0].x, actor->vwork[0].y + 100.0f, actor->vwork[0].z, - RAND_FLOAT_CENTERED(35.0f), RAND_FLOAT(80) + 90.0f, RAND_RANGE(-72.0f, 8.0f), - spC6); + Macbeth_MaSpear_Spawn(this->vwork[0].x, this->vwork[0].y + 100.0f, this->vwork[0].z, + RAND_FLOAT_CENTERED(35.0f), RAND_FLOAT(80) + 90.0f, RAND_RANGE(-72.0f, 8.0f), + spC6); } for (i = 0; i < 20; i++) { - Macbeth_801AD624(actor->vwork[0].x, actor->vwork[0].y + 50.0f + RAND_FLOAT(50.0f), - actor->vwork[0].z, RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT(5.0f), - actor->vel.z + 2.0f, RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), - RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), - (s32) (RAND_FLOAT(25.0f) + 30.f), 10, RAND_FLOAT(1.0f)); + Macbeth_Effect357_Spawn1( + this->vwork[0].x, this->vwork[0].y + 50.0f + RAND_FLOAT(50.0f), this->vwork[0].z, + RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT(5.0f), this->vel.z + 2.0f, RAND_FLOAT(360.0f), + RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), + RAND_FLOAT_CENTERED(30.0f), (s32) (RAND_FLOAT(25.0f) + 30.f), 10, RAND_FLOAT(1.0f)); } - actor->timer_0BC = 80; - actor->state = 14; - actor->vel.y = -20.0f; + this->timer_0BC = 80; + this->state = 14; + this->vel.y = -20.0f; } break; + case 14: - Math_SmoothStepToAngle(&actor->obj.rot.y, 0.0f, 0.1f, 20.0f, 0.01f); - Math_SmoothStepToAngle(&actor->obj.rot.x, 0.0f, 0.1f, 20.0f, 0.01f); - Math_SmoothStepToAngle(&actor->obj.rot.z, 0.0f, 0.1f, 20.0f, 0.01f); + Math_SmoothStepToAngle(&this->obj.rot.y, 0.0f, 0.1f, 20.0f, 0.01f); + Math_SmoothStepToAngle(&this->obj.rot.x, 0.0f, 0.1f, 20.0f, 0.01f); + Math_SmoothStepToAngle(&this->obj.rot.z, 0.0f, 0.1f, 20.0f, 0.01f); + if (D_i5_801BE320[3] < (Animation_GetFrameCount(&D_MA_6016040) - 1)) { D_i5_801BE320[3]++; } - Macbeth_8019A198(actor); - actor->vel.y += 1.0f; - Macbeth_801A6984(actor); + + Macbeth_8019A198(this); + + this->vel.y += 1.0f; + + Macbeth_801A6984(this); + D_i5_801BE320[6] = 1; D_i5_801BE320[8] = 1; - if (actor->timer_0BC == 0) { - actor->vel.y = 0.0f; - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_603677C); + + if (this->timer_0BC == 0) { + this->vel.y = 0.0f; + this->info.hitbox = SEGMENTED_TO_VIRTUAL(aMaActor207Hitbox); D_i5_801BE320[3] = 0; D_i5_801BE320[2] = 1; D_i5_801BE320[31] = 30; - actor->state = 4; + this->state = 4; } break; + case 15: - Math_SmoothStepToAngle(&actor->obj.rot.y, 0.0f, 0.1f, 20.0f, 0.01f); - Math_SmoothStepToAngle(&actor->obj.rot.x, 0.0f, 0.1f, 20.0f, 0.01f); - Math_SmoothStepToAngle(&actor->obj.rot.z, 0.0f, 0.1f, 20.0f, 0.01f); - Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].trueZpos - 700.0f, 0.2f, 15.0f, 0.01f); - Math_SmoothStepToF(&actor->obj.pos.y, gPlayer[0].pos.y + 400.0f, 0.2f, 10.0f, 0.01f); - Math_SmoothStepToF(&actor->obj.pos.x, gPlayer[0].pos.x, 0.1f, 10.0f, 0.01f); + Math_SmoothStepToAngle(&this->obj.rot.y, 0.0f, 0.1f, 20.0f, 0.01f); + Math_SmoothStepToAngle(&this->obj.rot.x, 0.0f, 0.1f, 20.0f, 0.01f); + Math_SmoothStepToAngle(&this->obj.rot.z, 0.0f, 0.1f, 20.0f, 0.01f); + + Math_SmoothStepToF(&this->obj.pos.z, gPlayer[0].trueZpos - 700.0f, 0.2f, 15.0f, 0.01f); + Math_SmoothStepToF(&this->obj.pos.y, gPlayer[0].pos.y + 400.0f, 0.2f, 10.0f, 0.01f); + Math_SmoothStepToF(&this->obj.pos.x, gPlayer[0].pos.x, 0.1f, 10.0f, 0.01f); + if (D_i5_801BE320[3] < 15) { D_i5_801BE320[3]++; } - Macbeth_8019A198(actor); - Macbeth_801A6984(actor); - if (actor->timer_0BC < 100) { - if (actor->timer_0BC == 98) { - AUDIO_PLAY_SFX(NA_SE_EN_MABOSS_PLATECHARGE, actor->sfxSource, 4); + + Macbeth_8019A198(this); + Macbeth_801A6984(this); + + if (this->timer_0BC < 100) { + if (this->timer_0BC == 98) { + AUDIO_PLAY_SFX(NA_SE_EN_MABOSS_PLATECHARGE, this->sfxSource, 4); } + Matrix_RotateY(gCalcMatrix, RAND_FLOAT(2.0f) * (M_DTOR * 180.0f), MTXF_NEW); + sp360.x = 0.0f; sp360.y = RAND_FLOAT(100.0f); sp360.z = RAND_FLOAT(200.0f) + 100.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp360, &sp354); + D_i5_801BE368[23] = 1.0f; - Macbeth_801AE800(actor->vwork[2].x + sp354.x - 50.0f, actor->vwork[2].y + sp354.y + 100.0f, - actor->vwork[2].z + sp354.z, actor->vwork[2].x, actor->vwork[2].y, actor->vwork[2].z); + + Macbeth_Effect379_Spawn(this->vwork[2].x + sp354.x - 50.0f, this->vwork[2].y + sp354.y + 100.0f, + this->vwork[2].z + sp354.z, this->vwork[2].x, this->vwork[2].y, + this->vwork[2].z); + D_i5_801BE368[23] = 2.0f; - Macbeth_801AE800(actor->vwork[4].x + sp354.x + 50.0f, actor->vwork[4].y + sp354.y + 100.0f, - actor->vwork[4].z + sp354.z, actor->vwork[4].x, actor->vwork[4].y, actor->vwork[4].z); + + Macbeth_Effect379_Spawn(this->vwork[4].x + sp354.x + 50.0f, this->vwork[4].y + sp354.y + 100.0f, + this->vwork[4].z + sp354.z, this->vwork[4].x, this->vwork[4].y, + this->vwork[4].z); } - if (actor->timer_0BC == 0) { + + if (this->timer_0BC == 0) { switch (D_i5_801BE320[18]) { case 0: case 1: @@ -4367,236 +4875,299 @@ void Macbeth_Actor207_Update(Actor* actor) { D_i5_801BE320[27] = 300; break; } - actor->timer_0BC = D_i5_801BE320[27]; - actor->state = 16; - Audio_KillSfxBySourceAndId(actor->sfxSource, NA_SE_EN_MABOSS_PLATECHARGE); + this->timer_0BC = D_i5_801BE320[27]; + this->state = 16; + Audio_KillSfxBySourceAndId(this->sfxSource, NA_SE_EN_MABOSS_PLATECHARGE); } break; + case 16: - Math_SmoothStepToAngle(&actor->obj.rot.y, 0.0f, 0.1f, 20.0f, 0.01f); - Math_SmoothStepToAngle(&actor->obj.rot.x, 0.0f, 0.1f, 20.0f, 0.01f); - Math_SmoothStepToAngle(&actor->obj.rot.z, 0.0f, 0.1f, 20.0f, 0.01f); - Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].trueZpos - 250.0f, 0.1f, 15.0f, 0.01f); - Math_SmoothStepToF(&actor->obj.pos.y, 250.0f, 0.1f, 10.0f, 0.01f); + Math_SmoothStepToAngle(&this->obj.rot.y, 0.0f, 0.1f, 20.0f, 0.01f); + Math_SmoothStepToAngle(&this->obj.rot.x, 0.0f, 0.1f, 20.0f, 0.01f); + Math_SmoothStepToAngle(&this->obj.rot.z, 0.0f, 0.1f, 20.0f, 0.01f); + + Math_SmoothStepToF(&this->obj.pos.z, gPlayer[0].trueZpos - 250.0f, 0.1f, 15.0f, 0.01f); + Math_SmoothStepToF(&this->obj.pos.y, 250.0f, 0.1f, 10.0f, 0.01f); + if (D_i5_801BE320[3] < (Animation_GetFrameCount(&D_MA_6015C24) - 1)) { D_i5_801BE320[3]++; } - Macbeth_8019A198(actor); - Macbeth_801A6984(actor); - if (actor->timer_0BC < (D_i5_801BE320[27] - 40)) { - if ((actor->timer_0BC + 42) == D_i5_801BE320[27]) { - actor->sfxSource[0] = actor->vwork[2].x; - AUDIO_PLAY_SFX(NA_SE_EN_RNG_BEAM_SHOT, actor->sfxSource, 4); - actor->sfxSource[0] = actor->vwork[4].x; - AUDIO_PLAY_SFX(NA_SE_EN_RNG_BEAM_SHOT, actor->sfxSource, 4); - actor->sfxSource[0] = actor->obj.pos.x; + Macbeth_8019A198(this); + Macbeth_801A6984(this); + + if (this->timer_0BC < (D_i5_801BE320[27] - 40)) { + if ((this->timer_0BC + 42) == D_i5_801BE320[27]) { + this->sfxSource[0] = this->vwork[2].x; + AUDIO_PLAY_SFX(NA_SE_EN_RNG_BEAM_SHOT, this->sfxSource, 4); + this->sfxSource[0] = this->vwork[4].x; + AUDIO_PLAY_SFX(NA_SE_EN_RNG_BEAM_SHOT, this->sfxSource, 4); + this->sfxSource[0] = this->obj.pos.x; } + if (((gGameFrameCount % 2) == 0) && (D_i5_801BE320[15] == 0)) { - actor->vwork[6].x = actor->vwork[2].x + 80.0f; - actor->vwork[6].y = 0.0f; - actor->vwork[6].z = gPlayer[0].trueZpos + 50.0f; - actor->vwork[7].x = actor->vwork[4].x - 80.0f; - actor->vwork[7].y = 0.0f; - actor->vwork[7].z = gPlayer[0].trueZpos + 50.0f; - actor->vwork[6].z += actor->vel.z; - actor->vwork[7].z += actor->vel.z; - sp348.x = actor->vwork[6].x - actor->vwork[2].x; - sp348.y = actor->vwork[6].y - actor->vwork[2].y + 25.0f; - sp348.z = actor->vwork[6].z - actor->vwork[2].z; - Matrix_RotateZ(gCalcMatrix, -actor->vwork[3].z * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -actor->vwork[3].x * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gCalcMatrix, -actor->vwork[3].y * M_DTOR, MTXF_APPLY); + this->vwork[6].x = this->vwork[2].x + 80.0f; + this->vwork[6].y = 0.0f; + this->vwork[6].z = gPlayer[0].trueZpos + 50.0f; + this->vwork[7].x = this->vwork[4].x - 80.0f; + this->vwork[7].y = 0.0f; + this->vwork[7].z = gPlayer[0].trueZpos + 50.0f; + this->vwork[6].z += this->vel.z; + this->vwork[7].z += this->vel.z; + + sp348.x = this->vwork[6].x - this->vwork[2].x; + sp348.y = this->vwork[6].y - this->vwork[2].y + 25.0f; + sp348.z = this->vwork[6].z - this->vwork[2].z; + + Matrix_RotateZ(gCalcMatrix, -this->vwork[3].z * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -this->vwork[3].x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -this->vwork[3].y * M_DTOR, MTXF_APPLY); + Matrix_MultVec3f(gCalcMatrix, &sp348, &sp354); + D_i5_801BE368[14] = Math_RadToDeg(Math_Atan2F(sp354.x, sp354.z)); + temp = sqrtf(SQ(sp354.x) + SQ(sp354.z)); + D_i5_801BE368[13] = Math_RadToDeg(-Math_Atan2F(sp354.y, temp)); - Matrix_RotateY(gCalcMatrix, actor->vwork[3].y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, actor->vwork[3].x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, actor->vwork[3].z * M_DTOR, MTXF_APPLY); + + Matrix_RotateY(gCalcMatrix, this->vwork[3].y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->vwork[3].x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, this->vwork[3].z * M_DTOR, MTXF_APPLY); + Matrix_MultVec3f(gCalcMatrix, &D_i5_801BA744, &sp354); - sp348.x = actor->vwork[2].x + sp354.x; - sp348.y = actor->vwork[2].y + sp354.y + 25.0f; - sp348.z = actor->vwork[2].z + sp354.z; + + sp348.x = this->vwork[2].x + sp354.x; + sp348.y = this->vwork[2].y + sp354.y + 25.0f; + sp348.z = this->vwork[2].z + sp354.z; + sp33C.x = D_i5_801BE368[13]; sp33C.y = D_i5_801BE368[14]; sp33C.z = 0.0f; - sp330.x = actor->vwork[3].x; - sp330.y = actor->vwork[3].y; - sp330.z = actor->vwork[3].z; + + sp330.x = this->vwork[3].x; + sp330.y = this->vwork[3].y; + sp330.z = this->vwork[3].z; + func_effect_8007EE68(OBJ_EFFECT_380, &sp348, &sp33C, &sp330, &D_i5_801BA750, 5.0f); - sp348.x = actor->vwork[7].x - actor->vwork[4].x; - sp348.y = actor->vwork[7].y - actor->vwork[4].y + 25.0f; - sp348.z = actor->vwork[7].z - actor->vwork[4].z; - Matrix_RotateZ(gCalcMatrix, -actor->vwork[5].z * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -actor->vwork[5].x * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gCalcMatrix, -actor->vwork[5].y * M_DTOR, MTXF_APPLY); + + sp348.x = this->vwork[7].x - this->vwork[4].x; + sp348.y = this->vwork[7].y - this->vwork[4].y + 25.0f; + sp348.z = this->vwork[7].z - this->vwork[4].z; + + Matrix_RotateZ(gCalcMatrix, -this->vwork[5].z * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -this->vwork[5].x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -this->vwork[5].y * M_DTOR, MTXF_APPLY); + Matrix_MultVec3f(gCalcMatrix, &sp348, &sp354); + D_i5_801BE368[14] = Math_RadToDeg(Math_Atan2F(sp354.x, sp354.z)); + temp = sqrtf(SQ(sp354.x) + SQ(sp354.z)); + D_i5_801BE368[13] = Math_RadToDeg(-Math_Atan2F(sp354.y, temp)); - Matrix_RotateY(gCalcMatrix, actor->vwork[5].y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, actor->vwork[5].x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, actor->vwork[5].z * M_DTOR, MTXF_APPLY); + + Matrix_RotateY(gCalcMatrix, this->vwork[5].y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->vwork[5].x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, this->vwork[5].z * M_DTOR, MTXF_APPLY); + Matrix_MultVec3f(gCalcMatrix, &D_i5_801BA744, &sp354); - sp348.x = actor->vwork[4].x + sp354.x; - sp348.y = actor->vwork[4].y + sp354.y + 25.0f; - sp348.z = actor->vwork[4].z + sp354.z; + + sp348.x = this->vwork[4].x + sp354.x; + sp348.y = this->vwork[4].y + sp354.y + 25.0f; + sp348.z = this->vwork[4].z + sp354.z; + sp33C.x = D_i5_801BE368[13]; sp33C.y = D_i5_801BE368[14]; sp33C.z = 0.0f; - sp330.x = actor->vwork[5].x; - sp330.y = actor->vwork[5].y; - sp330.z = actor->vwork[5].z; + + sp330.x = this->vwork[5].x; + sp330.y = this->vwork[5].y; + sp330.z = this->vwork[5].z; func_effect_8007EE68(OBJ_EFFECT_380, &sp348, &sp33C, &sp330, &D_i5_801BA750, 10.0f); } } - if (actor->timer_0BC < (D_i5_801BE320[27] - 50)) { - Macbeth_801A78B0(actor); + + if (this->timer_0BC < (D_i5_801BE320[27] - 50)) { + Macbeth_801A78B0(this); } - if (actor->timer_0BC == 0) { - Audio_KillSfxBySourceAndId(actor->sfxSource, NA_SE_EN_RNG_BEAM_SHOT); - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_603677C); + if (this->timer_0BC == 0) { + Audio_KillSfxBySourceAndId(this->sfxSource, NA_SE_EN_RNG_BEAM_SHOT); + this->info.hitbox = SEGMENTED_TO_VIRTUAL(aMaActor207Hitbox); D_i5_801BE320[3] = 0; D_i5_801BE320[2] = 1; D_i5_801BE320[31] = 30; - actor->state = 4; + this->state = 4; D_i5_801BE320[25] = 1; } break; + case 18: - Macbeth_8019A198(actor); - Macbeth_801A0308(actor, actor->obj.pos.z, actor->obj.rot.y, 0); - Math_SmoothStepToF(&actor->obj.pos.x, gPlayer[0].pos.x, 0.1f, 10.0f, 0.01f); - Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].trueZpos - 1200.0f, 0.1f, 35.0f, 0.01f); - Math_SmoothStepToF(&actor->obj.pos.y, actor->fwork[5] + 600.0f + D_i5_801BE368[3], 0.1f, 20.0f, 10.0f); - if (D_i5_801BE368[3] < ((gPlayer[0].trueZpos - actor->obj.pos.z) / 5.0f)) { + Macbeth_8019A198(this); + Macbeth_801A0308(this, this->obj.pos.z, this->obj.rot.y, 0); + + Math_SmoothStepToF(&this->obj.pos.x, gPlayer[0].pos.x, 0.1f, 10.0f, 0.01f); + Math_SmoothStepToF(&this->obj.pos.z, gPlayer[0].trueZpos - 1200.0f, 0.1f, 35.0f, 0.01f); + Math_SmoothStepToF(&this->obj.pos.y, this->fwork[5] + 600.0f + D_i5_801BE368[3], 0.1f, 20.0f, 10.0f); + + if (D_i5_801BE368[3] < ((gPlayer[0].trueZpos - this->obj.pos.z) / 5.0f)) { Math_SmoothStepToF(&D_i5_801BE368[2], 15.0f, 0.2f, 2.0f, 0.01f); D_i5_801BE368[3] += D_i5_801BE368[2]; - } else if (((actor->fwork[5] + 600.0f) + D_i5_801BE368[3]) <= actor->obj.pos.y) { - actor->timer_0BC = 0; - actor->state = 19; + } else if (((this->fwork[5] + 600.0f) + D_i5_801BE368[3]) <= this->obj.pos.y) { + this->timer_0BC = 0; + this->state = 19; } - Macbeth_801A7CAC(actor); - Macbeth_801A6984(actor); + + Macbeth_Actor207_FacePlayer(this); + Macbeth_801A6984(this); break; + case 19: - actor->vel.z = gPlayer[0].vel.z; - Macbeth_801A7CAC(actor); + this->vel.z = gPlayer[0].vel.z; + + Macbeth_Actor207_FacePlayer(this); + D_i5_801BE368[4] += D_i5_801BE368[32]; D_i5_801BE368[5] += D_i5_801BE368[33]; D_i5_801BE368[6] += D_i5_801BE368[34]; + if (D_i5_801BE320[1] < 200) { D_i5_801BE320[1]++; } - Math_SmoothStepToF(&D_i5_801BE368[32], actor->obj.pos.x + RAND_FLOAT(500.0f), 0.2f, 20.0f, 0.01f); - Math_SmoothStepToF(&D_i5_801BE368[33], actor->obj.pos.y + RAND_FLOAT(100.0f), 0.2f, 10.0f, 0.01f); - Math_SmoothStepToF(&D_i5_801BE368[34], actor->obj.pos.y + RAND_FLOAT(500.0f), 0.2f, 20.0f, 0.01f); - if (actor->dmgType != DMG_NONE) { + + Math_SmoothStepToF(&D_i5_801BE368[32], this->obj.pos.x + RAND_FLOAT(500.0f), 0.2f, 20.0f, 0.01f); + Math_SmoothStepToF(&D_i5_801BE368[33], this->obj.pos.y + RAND_FLOAT(100.0f), 0.2f, 10.0f, 0.01f); + Math_SmoothStepToF(&D_i5_801BE368[34], this->obj.pos.y + RAND_FLOAT(500.0f), 0.2f, 20.0f, 0.01f); + + if (this->dmgType != DMG_NONE) { gPlayer[0].shields = 0; } - if (((gGameFrameCount % 16) == 0)) { - func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f); + + if ((gGameFrameCount % 16) == 0) { + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 10.0f); } + D_i5_801BE368[9] = gPlayer[0].pos.x; - Math_SmoothStepToF(&actor->obj.pos.x, D_i5_801BE368[9], 0.2f, 35.0f, 0.01f); - Math_SmoothStepToF(&actor->obj.pos.y, gPlayer[0].pos.y, 0.3f, 15.0f, 0.01f); - Math_SmoothStepToF(&actor->obj.pos.z, gPlayer[0].trueZpos, 0.3f, 20.0f, 0.01f); - Math_SmoothStepToF(&actor->obj.rot.x, 60.0f, 0.2f, 20.0f, 0.01f); - Macbeth_801A6984(actor); + + Math_SmoothStepToF(&this->obj.pos.x, D_i5_801BE368[9], 0.2f, 35.0f, 0.01f); + Math_SmoothStepToF(&this->obj.pos.y, gPlayer[0].pos.y, 0.3f, 15.0f, 0.01f); + Math_SmoothStepToF(&this->obj.pos.z, gPlayer[0].trueZpos, 0.3f, 20.0f, 0.01f); + Math_SmoothStepToF(&this->obj.rot.x, 60.0f, 0.2f, 20.0f, 0.01f); + + Macbeth_801A6984(this); break; + case 20: - Math_SmoothStepToF(&actor->obj.rot.z, 0.0f, 0.1f, 20.0f, 0.01f); - Macbeth_8019A198(actor); - actor->vel.z = gActors[D_i5_801BE314].vel.z; + Math_SmoothStepToF(&this->obj.rot.z, 0.0f, 0.1f, 20.0f, 0.01f); + Macbeth_8019A198(this); + + this->vel.z = gActors[D_i5_801BE314].vel.z; + D_i5_801BE320[3]++; if (D_i5_801BE320[3] >= 60) { D_i5_801BE320[3] = 0; } - Macbeth_801A7A30(actor); - Macbeth_801A6984(actor); - Math_SmoothStepToF(&actor->obj.rot.y, 0.0f, 0.1f, 20.0f, 0.01f); - if (actor->obj.pos.z < -135200.0f) { - BonusText_Display(actor->obj.pos.x, actor->obj.pos.y + sp374, actor->obj.pos.z, 50); + + Macbeth_801A7A30(this); + Macbeth_801A6984(this); + + Math_SmoothStepToF(&this->obj.rot.y, 0.0f, 0.1f, 20.0f, 0.01f); + + if (this->obj.pos.z < -135200.0f) { + BonusText_Display(this->obj.pos.x, this->obj.pos.y + sp374, this->obj.pos.z, 50); if (1) {} gHitCount += 51; D_ctx_80177850 = 15; - func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 20.0f); - Macbeth_801AD624(actor->vwork[2].x, actor->vwork[2].y, actor->vwork[2].z, RAND_FLOAT_CENTERED(10.0f), - RAND_FLOAT(7.0f) + 7.0f, 2.0f, RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), - RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT_CENTERED(10.0f), - RAND_FLOAT_CENTERED(10.0f), (s32) (RAND_FLOAT(50.0f) + 70.0f), 11, 1.0f); + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 20.0f); + Macbeth_Effect357_Spawn1(this->vwork[2].x, this->vwork[2].y, this->vwork[2].z, + RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT(7.0f) + 7.0f, 2.0f, RAND_FLOAT(360.0f), + RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(10.0f), + RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT_CENTERED(10.0f), + (s32) (RAND_FLOAT(50.0f) + 70.0f), 11, 1.0f); gControllerRumbleFlags[gMainController] = 1; gControllerRumbleTimers[gMainController] = 15; - AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_L, actor->sfxSource, 4); - actor->state = 21; + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_L, this->sfxSource, 4); + this->state = 21; } break; + case 21: - Object_Kill(&actor->obj, actor->sfxSource); + Object_Kill(&this->obj, this->sfxSource); break; + default: break; } - if ((actor->dmgType != DMG_NONE) && (actor->state >= 2)) { - actor->dmgType = DMG_NONE; - if ((actor->dmgPart == 0) && (D_i5_801BE320[9] > 0) && ((gPlayer[0].trueZpos - actor->obj.pos.z) > 200.0f)) { - AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, actor->sfxSource, 4); - actor->iwork[7] = 15; - D_i5_801BE320[9] -= actor->damage; - Macbeth_801AD624(actor->obj.pos.x, actor->obj.pos.y + 80, actor->obj.pos.z + 50.0f, - RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT(5.0f), RAND_FLOAT_CENTERED(3.0f), - RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(30.0f), - RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), (s32) (RAND_FLOAT(50.0f) + 70.0f), - 3, RAND_FLOAT(1.0f)); - if (D_i5_801BE320[9] <= 0) { - AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, actor->sfxSource, 4); - func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y + 80.0f, actor->obj.pos.z + 50.0f, 5.0f); - for (i = 0; i < 2; i++) { - Macbeth_801AD624(actor->obj.pos.x, actor->obj.pos.y + 80.0f, actor->obj.pos.z + 50.0f, + + if ((this->dmgType != DMG_NONE) && (this->state >= 2)) { + this->dmgType = DMG_NONE; + if ((this->dmgPart == 0) && (D_i5_801BE320[9] > 0) && ((gPlayer[0].trueZpos - this->obj.pos.z) > 200.0f)) { + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, this->sfxSource, 4); + + this->iwork[7] = 15; + + D_i5_801BE320[9] -= this->damage; + + Macbeth_Effect357_Spawn1(this->obj.pos.x, this->obj.pos.y + 80, this->obj.pos.z + 50.0f, RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT(5.0f), RAND_FLOAT_CENTERED(3.0f), RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), - RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.f), + RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), (s32) (RAND_FLOAT(50.0f) + 70.0f), 3, RAND_FLOAT(1.0f)); - } - Macbeth_801AD624(actor->obj.pos.x, actor->obj.pos.y + 80.0f, actor->obj.pos.z + 50.0f, - RAND_FLOAT_CENTERED(3.0f), RAND_FLOAT(15.0f), -2.0f, RAND_FLOAT(360.0f), - RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(10.0f), - RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT_CENTERED(10.0f), - (s32) (RAND_FLOAT(50.0f) + 70.0f), 8, 1.0f); - } - } else if ((actor->dmgPart == 1) && (D_i5_801BE320[10] > 0) && - ((gPlayer[0].trueZpos - actor->obj.pos.z) > 200.0f)) { - AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, actor->sfxSource, 4); - actor->iwork[8] = 16; - D_i5_801BE320[10] -= actor->damage; - Macbeth_801AD624(actor->obj.pos.x, actor->obj.pos.y - 30.0f, actor->obj.pos.z, RAND_FLOAT_CENTERED(10.0f), - RAND_FLOAT(7.0f) + 7.0f, RAND_FLOAT_CENTERED(3.0f), RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), - RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), - RAND_FLOAT_CENTERED(30.0f), (s32) (RAND_FLOAT(50.0f) + 70.0f), 3, RAND_FLOAT(1.0f)); - if (D_i5_801BE320[10] <= 0) { - AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, actor->sfxSource, 4); - func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y - 30.0f, actor->obj.pos.z, 6.0f); - for (i = 0; i < 10; i++) { - Macbeth_801AD624(actor->obj.pos.x, actor->obj.pos.y - 30.0f, actor->obj.pos.z, + if (D_i5_801BE320[9] <= 0) { + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, this->sfxSource, 4); + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y + 80.0f, this->obj.pos.z + 50.0f, 5.0f); + for (i = 0; i < 2; i++) { + Macbeth_Effect357_Spawn1( + this->obj.pos.x, this->obj.pos.y + 80.0f, this->obj.pos.z + 50.0f, RAND_FLOAT_CENTERED(10.0f), + RAND_FLOAT(5.0f), RAND_FLOAT_CENTERED(3.0f), RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), + RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), + RAND_FLOAT_CENTERED(30.f), (s32) (RAND_FLOAT(50.0f) + 70.0f), 3, RAND_FLOAT(1.0f)); + } + Macbeth_Effect357_Spawn1(this->obj.pos.x, this->obj.pos.y + 80.0f, this->obj.pos.z + 50.0f, + RAND_FLOAT_CENTERED(3.0f), RAND_FLOAT(15.0f), -2.0f, RAND_FLOAT(360.0f), + RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(10.0f), + RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT_CENTERED(10.0f), + (s32) (RAND_FLOAT(50.0f) + 70.0f), 8, 1.0f); + } + } else if ((this->dmgPart == 1) && (D_i5_801BE320[10] > 0) && + ((gPlayer[0].trueZpos - this->obj.pos.z) > 200.0f)) { + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, this->sfxSource, 4); + + this->iwork[8] = 16; + + D_i5_801BE320[10] -= this->damage; + + Macbeth_Effect357_Spawn1(this->obj.pos.x, this->obj.pos.y - 30.0f, this->obj.pos.z, RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT(7.0f) + 7.0f, RAND_FLOAT_CENTERED(3.0f), RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), (s32) (RAND_FLOAT(50.0f) + 70.0f), 3, RAND_FLOAT(1.0f)); + + if (D_i5_801BE320[10] <= 0) { + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, this->sfxSource, 4); + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y - 30.0f, this->obj.pos.z, 6.0f); + + for (i = 0; i < 10; i++) { + Macbeth_Effect357_Spawn1( + this->obj.pos.x, this->obj.pos.y - 30.0f, this->obj.pos.z, RAND_FLOAT_CENTERED(10.0f), + RAND_FLOAT(7.0f) + 7.0f, RAND_FLOAT_CENTERED(3.0f), RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), + RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT_CENTERED(30.0f), + RAND_FLOAT_CENTERED(30.0f), (s32) (RAND_FLOAT(50.0f) + 70.0f), 3, RAND_FLOAT(1.0f)); } - Macbeth_801AD624(actor->obj.pos.x, actor->obj.pos.y - 30.0f, actor->obj.pos.z + 50.0f, - RAND_FLOAT_CENTERED(3.0f), RAND_FLOAT(15.0f), -2.0f, RAND_FLOAT(360.0f), - RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(10.0f), - RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT_CENTERED(10.0f), - (s32) (RAND_FLOAT(50.0f) + 70.0f), 9, 1.0f); + Macbeth_Effect357_Spawn1(this->obj.pos.x, this->obj.pos.y - 30.0f, this->obj.pos.z + 50.0f, + RAND_FLOAT_CENTERED(3.0f), RAND_FLOAT(15.0f), -2.0f, RAND_FLOAT(360.0f), + RAND_FLOAT(360.0f), RAND_FLOAT(360.0f), RAND_FLOAT_CENTERED(10.0f), + RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT_CENTERED(10.0f), + (s32) (RAND_FLOAT(50.0f) + 70.0f), 9, 1.0f); } } else { - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } } + if (D_i5_801BE320[4] != 0) { - if ((actor->state != 8) && (actor->state != 10) && (actor->state != 9)) { + if ((this->state != 8) && (this->state != 10) && (this->state != 9)) { D_i5_801BE320[5] = 1; D_i5_801BE320[7] = 1; D_i5_801BE320[6] = 1; @@ -4606,14 +5177,15 @@ void Macbeth_Actor207_Update(Actor* actor) { D_i5_801BE320[31] = 30; D_i5_801BE368[12] = 0.0f; D_i5_801BE368[13] = 0.0f; - actor->state = 8; + this->state = 8; } } + if ((D_i5_801BE320[16] != 0) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) { if (gBossFrameCount == 0) { Radio_PlayMessage(gMsg_ID_2225, RCID_SLIPPY); } else if (gBossFrameCount > 155) { - gShowBossHealth = 1; + gShowBossHealth = true; gBossHealthBar = (s32) ((D_i5_801BE320[29] / 250.f) * 85.0f); gBossHealthBar += (s32) ((D_i5_801BE320[9] / 200.f) * 85.0f); gBossHealthBar += (s32) ((D_i5_801BE320[10] / 250.f) * 85.0f); @@ -4621,48 +5193,53 @@ void Macbeth_Actor207_Update(Actor* actor) { gBossFrameCount++; } - if (actor->iwork[7] > 0) { - actor->iwork[7]--; + if (this->iwork[7] > 0) { + this->iwork[7]--; } - if (actor->iwork[8] > 0) { - actor->iwork[8]--; + if (this->iwork[8] > 0) { + this->iwork[8]--; } - if (actor->iwork[9] > 0) { - actor->iwork[9]--; + if (this->iwork[9] > 0) { + this->iwork[9]--; } - D_i5_801BE368[14] = actor->vwork[0].x; - D_i5_801BE368[15] = actor->vwork[0].y; - D_i5_801BE368[16] = actor->vwork[0].z; - D_i5_801BE368[24] = actor->vwork[2].x; - D_i5_801BE368[25] = actor->vwork[2].y; - D_i5_801BE368[26] = actor->vwork[2].z; - D_i5_801BE368[27] = actor->vwork[4].x; - D_i5_801BE368[28] = actor->vwork[4].y; - D_i5_801BE368[29] = actor->vwork[4].z; - D_i5_801BE368[19] = actor->vel.z; + + D_i5_801BE368[14] = this->vwork[0].x; + D_i5_801BE368[15] = this->vwork[0].y; + D_i5_801BE368[16] = this->vwork[0].z; + D_i5_801BE368[24] = this->vwork[2].x; + D_i5_801BE368[25] = this->vwork[2].y; + D_i5_801BE368[26] = this->vwork[2].z; + D_i5_801BE368[27] = this->vwork[4].x; + D_i5_801BE368[28] = this->vwork[4].y; + D_i5_801BE368[29] = this->vwork[4].z; + D_i5_801BE368[19] = this->vel.z; D_i5_801BE368[30] = RAND_FLOAT(1.0f); D_i5_801BE368[31] = RAND_FLOAT(1.0f); + if (D_i5_801BE368[30] < 0.5f) { D_i5_801BE368[30] = 0.6f; } if (D_i5_801BE368[31] < 0.8f) { D_i5_801BE368[31] = 0.8f; } + Math_SmoothStepToF(&D_i5_801BE368[20], 0.0f, 0.4f, 25.0f, 0.1f); Math_SmoothStepToF(&D_i5_801BE368[21], 0.0f, 0.4f, 20.0f, 0.1f); Math_SmoothStepToF(&D_i5_801BE368[22], 0.0f, 0.2f, 20.0f, 0.1f); + if ((D_i5_801BE368[20] <= 1.0f) && (D_i5_801BE368[21] <= 1.0f)) { D_i5_801BE368[20] = 255.0f; D_i5_801BE368[21] = 160.0f; D_i5_801BE368[22] = 16.0f; } - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) && (actor->state < 20)) { + + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) && (this->state < 20)) { D_i5_801BE320[3] = 0; D_i5_801BE320[2] = 1; D_i5_801BE320[31] = 30; - actor->state = 20; + this->state = 20; } switch (D_i5_801BE320[2]) { @@ -4670,10 +5247,12 @@ void Macbeth_Actor207_Update(Actor* actor) { temp_a3 = Animation_GetFrameData(&D_MA_600CD18, D_i5_801BE320[3], spD4); Math_SmoothStepToVec3fArray(spD4, D_i5_801BE430, 1, temp_a3, 0.2f, 100.0f, 0.01f); break; + case 2: temp_a3 = Animation_GetFrameData(&D_MA_601D188, D_i5_801BE320[3], spD4); Math_SmoothStepToVec3fArray(spD4, D_i5_801BE430, 1, temp_a3, 0.15f, 100.0f, 0.01f); break; + case 3: temp_a3 = Animation_GetFrameData(&D_MA_6017714, D_i5_801BE320[3], spD4); if (D_i5_801BE320[31] != 0) { @@ -4682,18 +5261,22 @@ void Macbeth_Actor207_Update(Actor* actor) { Math_SmoothStepToVec3fArray(spD4, D_i5_801BE430, 1, temp_a3, 1.0f, 100.0f, 0.01f); } break; + case 4: temp_a3 = Animation_GetFrameData(&D_MA_6016B2C, D_i5_801BE320[3], spD4); Math_SmoothStepToVec3fArray(spD4, D_i5_801BE430, 1, temp_a3, 0.2f, 50.0f, 0.01f); break; + case 5: temp_a3 = Animation_GetFrameData(&D_MA_60163F0, D_i5_801BE320[3], spD4); Math_SmoothStepToVec3fArray(spD4, D_i5_801BE430, 1, temp_a3, 0.2f, 100.0f, 0.01f); break; + case 6: temp_a3 = Animation_GetFrameData(&D_MA_6016040, D_i5_801BE320[3], spD4); Math_SmoothStepToVec3fArray(spD4, D_i5_801BE430, 1, temp_a3, 0.1f, 50.0f, 0.01f); break; + case 7: temp_a3 = Animation_GetFrameData(&D_MA_6015C24, D_i5_801BE320[3], spD4); Math_SmoothStepToVec3fArray(spD4, D_i5_801BE430, 1, temp_a3, 0.1f, 50.0f, 0.01f); @@ -4705,13 +5288,14 @@ void Macbeth_Actor207_Update(Actor* actor) { } } -bool Macbeth_801ABC14(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { - Actor* actor = (Actor*) data; +bool Macbeth_Actor207_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { + Actor* this = (Actor*) thisx; s16 sp62; RCP_SetupDL(&gMasterDisp, SETUPDL_29); gSPClearGeometryMode(gMasterDisp++, G_TEXTURE_GEN); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); + switch (limbIndex) { case 2: case 3: @@ -4719,7 +5303,7 @@ bool Macbeth_801ABC14(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* case 25: case 26: case 27: - if (actor->state == 9) { + if (this->state == 9) { *dList = NULL; return false; } @@ -4780,13 +5364,14 @@ bool Macbeth_801ABC14(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return true; } break; + default: break; } switch (limbIndex) { case 14: - if ((actor->iwork[7] % 2) != 0) { + if ((this->iwork[7] % 2) != 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_28); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } @@ -4794,6 +5379,7 @@ bool Macbeth_801ABC14(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* *dList = NULL; } break; + case 9: case 10: case 11: @@ -4801,7 +5387,7 @@ bool Macbeth_801ABC14(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* case 18: case 19: case 20: - if ((actor->iwork[8] % 2) != 0) { + if ((this->iwork[8] % 2) != 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_28); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } @@ -4809,92 +5395,97 @@ bool Macbeth_801ABC14(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* *dList = NULL; } break; + default: break; } - if ((actor->iwork[9] % 2) != 0) { + if ((this->iwork[9] % 2) != 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_28); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } return false; } -void Macbeth_801AC1C0(s32 limbIndex, Vec3f* rot, void* data) { +void Macbeth_Actor207_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp2C = { 0.0f, 0.0f, 0.0f }; - Actor* actor = (Actor*) data; + Actor207* this = (Actor207*) thisx; switch (limbIndex) { case 14: - Matrix_MultVec3f(gCalcMatrix, &sp2C, &actor->vwork[0]); - Matrix_GetYRPAngles(gCalcMatrix, &actor->vwork[1]); + Matrix_MultVec3f(gCalcMatrix, &sp2C, &this->vwork[0]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[1]); break; case 4: - Matrix_MultVec3f(gCalcMatrix, &sp2C, &actor->vwork[2]); - Matrix_GetYRPAngles(gCalcMatrix, &actor->vwork[3]); + Matrix_MultVec3f(gCalcMatrix, &sp2C, &this->vwork[2]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[3]); break; case 7: - Matrix_MultVec3f(gCalcMatrix, &sp2C, &actor->vwork[4]); - Matrix_GetYRPAngles(gCalcMatrix, &actor->vwork[5]); + Matrix_MultVec3f(gCalcMatrix, &sp2C, &this->vwork[4]); + Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[5]); break; } } -void Macbeth_Actor207_Draw(Actor* actor) { +void Macbeth_Actor207_Draw(Actor207* this) { if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) { - if (((gPlayer[0].trueZpos - actor->obj.pos.z) > 7000.0f) || - ((gPlayer[0].trueZpos - actor->obj.pos.z) < -1000.0f)) { + if (((gPlayer[0].trueZpos - this->obj.pos.z) > 7000.0f) || + ((gPlayer[0].trueZpos - this->obj.pos.z) < -1000.0f)) { return; } } else { - if (((gPlayer[0].trueZpos - actor->obj.pos.z) > 7000.0f) || - ((gPlayer[0].trueZpos - actor->obj.pos.z) < -5000.0f)) { + if (((gPlayer[0].trueZpos - this->obj.pos.z) > 7000.0f) || + ((gPlayer[0].trueZpos - this->obj.pos.z) < -5000.0f)) { return; } } if (D_i5_801BE320[2] == 0) { - Matrix_Translate(gCalcMatrix, actor->fwork[25], 0.0f, 0.0f, MTXF_APPLY); - Matrix_RotateY(gCalcMatrix, actor->fwork[26] * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gCalcMatrix, actor->fwork[29] * M_DTOR, MTXF_APPLY); + Matrix_Translate(gCalcMatrix, this->fwork[25], 0.0f, 0.0f, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, this->fwork[26] * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, this->fwork[29] * M_DTOR, MTXF_APPLY); Animation_GetFrameData(&D_MA_601EA28, D_i5_801BE320[3], D_i5_801BE430); } - Animation_DrawSkeleton(3, D_MA_600D1E4, D_i5_801BE430, Macbeth_801ABC14, Macbeth_801AC1C0, actor, gCalcMatrix); + Animation_DrawSkeleton(3, D_MA_600D1E4, D_i5_801BE430, Macbeth_Actor207_OverrideLimbDraw, + Macbeth_Actor207_PostLimbDraw, this, gCalcMatrix); } void Macbeth_801AC42C(s32 arg0) { } -void Macbeth_Actor206_Update(Actor* actor) { - switch (actor->state) { +void Macbeth_MaTrainCar1_Update(MaTrainCar1* this) { + switch (this->state) { case 0: - Macbeth_8019A198(actor); - Macbeth_801A015C(actor); - Macbeth_8019A728(actor); - if (actor->iwork[1] != 0) { + Macbeth_8019A198(this); + Macbeth_801A015C(this); + Macbeth_8019A728(this); + if (this->iwork[1] != 0) { Radio_PlayMessage(gMsg_ID_17420, RCID_BOSS_MACBETH); - AUDIO_PLAY_SFX(NA_SE_EN_MABOSS_HATCH, actor->sfxSource, 4); - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_6035A94); - actor->state++; + AUDIO_PLAY_SFX(NA_SE_EN_MABOSS_HATCH, this->sfxSource, 4); + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_6035A94); + this->state++; } - Macbeth_8019A830(actor); + Macbeth_8019A830(this); break; + case 1: - Macbeth_8019A198(actor); - Macbeth_801A015C(actor); + Macbeth_8019A198(this); + Macbeth_801A015C(this); Math_SmoothStepToF(&D_i5_801BE368[8], 160.0f, 0.1f, 3.0f, 0.01f); - Macbeth_8019A830(actor); + Macbeth_8019A830(this); break; } - if (actor->dmgType != DMG_NONE) { - actor->dmgType = DMG_NONE; - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, actor->sfxSource, 4); + + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } } -bool Macbeth_801AC5AC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { +bool Macbeth_MaTrainCar1_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { RCP_SetupDL(&gMasterDisp, SETUPDL_29); gSPClearGeometryMode(gMasterDisp++, G_TEXTURE_GEN); + if ((limbIndex == 1) || (limbIndex == 3)) { gSPTexture(gMasterDisp++, 3000, 3000, 0, G_TX_RENDERTILE, G_ON); gSPSetGeometryMode(gMasterDisp++, G_TEXTURE_GEN); @@ -4907,17 +5498,17 @@ bool Macbeth_801AC5AC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return false; } -void Macbeth_801AC6B4(Actor* actor) { - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.pos.x = 0.0f; - actor->obj.pos.y = 3000.0f; - actor->obj.pos.z = 0.0f; - actor->obj.rot.y = 180.0f; - Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); - actor->animFrame = 1; +void Macbeth_801AC6B4(ActorCutscene* this) { + Actor_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_ACTOR_CUTSCENE; + this->obj.pos.x = 0.0f; + this->obj.pos.y = 3000.0f; + this->obj.pos.z = 0.0f; + this->obj.rot.y = 180.0f; + Object_SetInfo(&this->info, this->obj.id); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, this->sfxSource, 0); + this->animFrame = 1; } static f32 D_i5_801BA768 = 0.0f; @@ -4933,11 +5524,11 @@ void Macbeth_LevelStart(Player* player) { sp4C = 0.0f; sp48 = 0.0f; sp44 = 0.0f; + Player_UpdatePath(player); switch (player->csState) { case 0: - gLevelObjects = SEGMENTED_TO_VIRTUAL(D_MA_6035678); for (i = 0, objInit = gLevelObjects; objInit->id != OBJ_INVALID; i++, objInit++) { @@ -4951,11 +5542,14 @@ void Macbeth_LevelStart(Player* player) { } gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 255; + player->zPath -= 800.0f; player->csState = 1; + D_i5_801BE24C = 8.0f; D_i5_801BA768 = 0.0f; break; + case 1: gCsFrameCount = 0; player->gravity = 0.0f; @@ -4972,7 +5566,7 @@ void Macbeth_LevelStart(Player* player) { player->csState = 2; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; gFillScreenAlpha = 255; - Macbeth_801ACF6C(); + Macbeth_EffectClouds_Spawn(); /* fallthrough */ case 2: if (gCsFrameCount < 30) { @@ -4980,9 +5574,9 @@ void Macbeth_LevelStart(Player* player) { gFillScreenAlpha = 255; } if ((gCsFrameCount < 60) && ((gCsFrameCount % 16U) == 0)) { - Macbeth_801ACF6C(); + Macbeth_EffectClouds_Spawn(); } else if ((gCsFrameCount < 100) && ((gCsFrameCount % 32) == 0)) { - Macbeth_801ACF6C(); + Macbeth_EffectClouds_Spawn(); } if (gCsFrameCount > 50) { gCsCamEyeX = zeroVar; @@ -4991,9 +5585,11 @@ void Macbeth_LevelStart(Player* player) { gCsCamAtX = zeroVar; gCsCamAtY = 42.0f; gCsCamAtZ = -800.0f; + D_ctx_80177A48[0] = 0.1f; D_ctx_80177A48[1] = 0.1f; D_ctx_80177A48[2] = 0.1f; + if (gCsFrameCount < 80) { sp4C = 5.0f; sp48 = 8.0f; @@ -5012,6 +5608,7 @@ void Macbeth_LevelStart(Player* player) { } } break; + case 3: AUDIO_PLAY_BGM(NA_BGM_STAGE_MA); gLevelStartStatusScreenTimer = 50; @@ -5025,6 +5622,7 @@ void Macbeth_LevelStart(Player* player) { gObjectLoadIndex = 40; player->csState = 4; break; + case 4: default: break; @@ -5036,10 +5634,13 @@ void Macbeth_LevelStart(Player* player) { Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], sp4C, 0); Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[1], sp48, 0); Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[2], sp44, 0); + player->pathHeight = 0.0f; player->rockPhase += player->vel.z * 5.0f; player->rockAngle = SIN_DEG(player->rockPhase) * 0.7f; + Texture_Scroll(D_landmaster_3002E80, 32, 32, 0); + if ((gCsFrameCount > 150) && ((-player->trueZpos - player->zPath) > 200.0f)) { if (D_i5_801BA768 < 11.5f) { D_i5_801BA768 += 0.2f; @@ -5048,31 +5649,32 @@ void Macbeth_LevelStart(Player* player) { } } -void Macbeth_801ACE40(Effect* effect) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.pos.x = gPlayer[0].cam.eye.x + RAND_FLOAT_CENTERED(600.0f); - effect->obj.pos.y = gPlayer[0].cam.eye.y - 1000.0f; - effect->obj.pos.z = gPlayer[0].trueZpos - 2000.0f; - effect->obj.id = OBJ_EFFECT_CLOUDS; - effect->timer_50 = 80; - effect->unk_46 = 144; - effect->vel.x = 10.0f; - effect->vel.z = 40.0f; - effect->vel.y = 8.0f; - effect->scale2 = RAND_FLOAT(15.0f) + 10.0f; +void Macbeth_EffectClouds_Setup(EffectClouds* this) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.pos.x = gPlayer[0].cam.eye.x + RAND_FLOAT_CENTERED(600.0f); + this->obj.pos.y = gPlayer[0].cam.eye.y - 1000.0f; + this->obj.pos.z = gPlayer[0].trueZpos - 2000.0f; + this->obj.id = OBJ_EFFECT_CLOUDS; + this->timer_50 = 80; + this->unk_46 = 144; + this->vel.x = 10.0f; + this->vel.z = 40.0f; + this->vel.y = 8.0f; + this->scale2 = RAND_FLOAT(15.0f) + 10.0f; + if (Rand_ZeroOne() < 0.5f) { - effect->obj.rot.z = 180.0f; + this->obj.rot.z = 180.0f; } - Object_SetInfo(&effect->info, effect->obj.id); + Object_SetInfo(&this->info, this->obj.id); } -void Macbeth_801ACF6C(void) { +void Macbeth_EffectClouds_Spawn(void) { s32 i; for (i = 0; i < ARRAY_COUNT(gEffects); i++) { if (gEffects[i].obj.status == OBJ_FREE) { - Macbeth_801ACE40(&gEffects[i]); + Macbeth_EffectClouds_Setup(&gEffects[i]); break; } } @@ -5114,12 +5716,13 @@ void Macbeth_801AD144(PlayerShot* shot) { actor = &gActors[0]; for (i = 0; i < ARRAY_COUNT(gActors); i++, actor++) { - if ((actor->obj.status == OBJ_ACTIVE) && (actor->timer_0C2 == 0) && (actor->obj.id >= OBJ_ACTOR_205) && - (actor->obj.id <= OBJ_ACTOR_213)) { + if ((actor->obj.status == OBJ_ACTIVE) && (actor->timer_0C2 == 0) && + (actor->obj.id >= OBJ_ACTOR_MA_LOCOMOTIVE) && (actor->obj.id <= OBJ_ACTOR_MA_TRAIN_CAR_7)) { temp_s6 = gGameFrameCount % 8U; var_s1 = &actor->info.hitbox[0]; temp_ft3 = var_s1[0]; var_s1++; + if (temp_ft3 != 0) { for (j = 0; j < temp_ft3; j++, var_s1 += 6) { if (var_s1[0] == 200000.0f) { @@ -5135,17 +5738,22 @@ void Macbeth_801AD144(PlayerShot* shot) { Matrix_RotateX(gCalcMatrix, -actor->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, -actor->obj.rot.y * M_DTOR, MTXF_APPLY); } + if ((j == temp_s6) && (var_s1[1] > -100.0f) && (var_s1[3] > -100.0f)) { sp8C.x = shot->obj.pos.x - actor->obj.pos.x; sp8C.y = shot->obj.pos.y - actor->obj.pos.y; sp8C.z = shot->obj.pos.z - actor->obj.pos.z; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp8C, &sp80); + test.x = (var_s1[4] + actor->obj.pos.x) - (actor->obj.pos.x + sp80.x); test.y = (var_s1[2] + actor->obj.pos.y) - (actor->obj.pos.y + sp80.y); test.z = (var_s1[0] + actor->obj.pos.z) - (actor->obj.pos.z + sp80.z); + if ((gLevelMode == LEVELMODE_ON_RAILS) && (test.z < 0.0f)) { test.z *= 0.6f; } + if (VEC3F_MAG(&test) < temp_fs2) { actor->dmgPart = j; actor->dmgType = -1; @@ -5165,110 +5773,120 @@ void Macbeth_801AD144(PlayerShot* shot) { } } -void Macbeth_801AD554(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 xRot, f32 yRot, - f32 zRot, f32 argA, f32 argB, f32 argC, s16 argD, s16 argE, f32 scale2) { - Effect_Initialize(effect); - effect->obj.status = OBJ_ACTIVE; - effect->obj.id = OBJ_EFFECT_357; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; - effect->obj.rot.x = xRot; - effect->obj.rot.y = yRot; - effect->obj.rot.z = zRot; - effect->vel.x = xVel; - effect->vel.y = yVel; - effect->vel.z = zVel; - effect->scale2 = scale2; - effect->timer_50 = argD; - effect->unk_60.x = argA; - effect->unk_60.y = argB; - effect->unk_60.z = argC; - effect->unk_44 = argE; - Object_SetInfo(&effect->info, effect->obj.id); +void Macbeth_Effect357_Setup(Effect357* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 xRot, + f32 yRot, f32 zRot, f32 argA, f32 argB, f32 argC, s16 argD, s16 argE, f32 scale2) { + Effect_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_EFFECT_357; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + this->obj.rot.x = xRot; + this->obj.rot.y = yRot; + this->obj.rot.z = zRot; + this->vel.x = xVel; + this->vel.y = yVel; + this->vel.z = zVel; + this->scale2 = scale2; + this->timer_50 = argD; + this->unk_60.x = argA; + this->unk_60.y = argB; + this->unk_60.z = argC; + this->unk_44 = argE; + Object_SetInfo(&this->info, this->obj.id); } -void Macbeth_801AD624(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 xRot, f32 yRot, f32 zRot, - f32 arg9, f32 argA, f32 argB, s16 argC, s16 argD, f32 scale2) { +void Macbeth_Effect357_Spawn1(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 xRot, f32 yRot, f32 zRot, + f32 arg9, f32 argA, f32 argB, s16 argC, s16 argD, f32 scale2) { s32 i; for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { - Macbeth_801AD554(&gEffects[i], xPos, yPos, zPos, xVel, yVel, zVel, xRot, yRot, zRot, arg9, argA, argB, argC, - argD, scale2); + Macbeth_Effect357_Setup(&gEffects[i], xPos, yPos, zPos, xVel, yVel, zVel, xRot, yRot, zRot, arg9, argA, + argB, argC, argD, scale2); break; } } } + void Macbeth_801AD6E8(void) { } -void Macbeth_Actor220_Update(Actor* actor) { +void Macbeth_MaBombDrop_Update(MaBombDrop* this) { Vec3f sp4C = { 0.0f, -10.0f, 0.0f }; - if ((gPlayer[0].trueZpos - actor->obj.pos.z) < -500.0f) { - Object_Kill(&actor->obj, actor->sfxSource); + if ((gPlayer[0].trueZpos - this->obj.pos.z) < -500.0f) { + Object_Kill(&this->obj, this->sfxSource); } - switch (actor->state) { + switch (this->state) { case 0: - if ((actor->timer_0BC == 0) && - ((actor->vel.y -= 0.5f, (Object_CheckCollision(actor->index, &actor->obj.pos, &sp4C, 1) != 0)) || - (actor->obj.pos.y < (gGroundHeight + 10.0f)) || (actor->iwork[0] != 0))) { - actor->vel.x = 0.0f; - actor->vel.y = 0.0f; - actor->vel.z = 0.0f; - if (actor->obj.pos.y < (gGroundHeight + 10.0f)) { - actor->obj.pos.y = gGroundHeight; + if ((this->timer_0BC == 0) && + ((this->vel.y -= 0.5f, (Object_CheckCollision(this->index, &this->obj.pos, &sp4C, 1) != 0)) || + (this->obj.pos.y < (gGroundHeight + 10.0f)) || (this->iwork[0] != 0))) { + this->vel.x = 0.0f; + this->vel.y = 0.0f; + this->vel.z = 0.0f; + + if (this->obj.pos.y < (gGroundHeight + 10.0f)) { + this->obj.pos.y = gGroundHeight; } - actor->state = 1; - actor->timer_0BC = 200; - actor->unk_046 = 192; - actor->scale = 2.5f; - actor->fwork[0] = 2.5f; - AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, actor->sfxSource, 4); - func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z, 7.0f); - func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, - 4.0f, 5); - if (actor->obj.pos.y < (gGroundHeight + 10.0f)) { - PlayerShot_SpawnEffect344(actor->obj.pos.x, 3.0f, actor->obj.pos.z, actor->obj.pos.x, - actor->obj.pos.z, 0.0f, 0.0f, 90.0f, 5.0f, 0, 0); + + this->state = 1; + this->timer_0BC = 200; + this->unk_046 = 192; + this->scale = 2.5f; + this->fwork[0] = 2.5f; + + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, this->sfxSource, 4); + + func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y + 30.0f, this->obj.pos.z, 7.0f); + + Effect386_Spawn1(this->obj.pos.x, this->obj.pos.y + 30.0f, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 4.0f, 5); + + if (this->obj.pos.y < (gGroundHeight + 10.0f)) { + PlayerShot_SpawnEffect344(this->obj.pos.x, 3.0f, this->obj.pos.z, this->obj.pos.x, this->obj.pos.z, + 0.0f, 0.0f, 90.0f, 5.0f, 0, 0); } gControllerRumbleFlags[gMainController] = 1; gControllerRumbleTimers[gMainController] = 10; } break; + case 1: - actor->scale += ((20.0f - actor->scale) * 0.1f); - if (actor->scale > 19.0f) { - actor->fwork[0] -= 0.3f; - actor->unk_046 -= 20; - if (actor->unk_046 < 0) { - Object_Kill(&actor->obj, actor->sfxSource); + this->scale += ((20.0f - this->scale) * 0.1f); + if (this->scale > 19.0f) { + this->fwork[0] -= 0.3f; + this->unk_046 -= 20; + if (this->unk_046 < 0) { + Object_Kill(&this->obj, this->sfxSource); } } - actor->obj.rot.y = 180.0f - actor->obj.rot.y; - if ((fabsf(gPlayer[0].trueZpos - actor->obj.pos.z) < 40.0f) && - (fabsf(gPlayer[0].pos.x - actor->obj.pos.x) < 80.0f)) { - if ((gPlayer[0].pos.y - actor->obj.pos.y > -5.0f) && - (gPlayer[0].pos.y - actor->obj.pos.y < (actor->scale * 35.0f)) && (gPlayer[0].mercyTimer == 0)) { - Player_ApplyDamage(&gPlayer[0], 0, actor->info.damage); + + this->obj.rot.y = 180.0f - this->obj.rot.y; + + if ((fabsf(gPlayer[0].trueZpos - this->obj.pos.z) < 40.0f) && + (fabsf(gPlayer[0].pos.x - this->obj.pos.x) < 80.0f)) { + if ((gPlayer[0].pos.y - this->obj.pos.y > -5.0f) && + (gPlayer[0].pos.y - this->obj.pos.y < (this->scale * 35.0f)) && (gPlayer[0].mercyTimer == 0)) { + Player_ApplyDamage(&gPlayer[0], 0, this->info.damage); } } break; } } -void Macbeth_Actor220_Draw(Actor* actor) { - switch (actor->state) { +void Macbeth_MaBombDrop_Draw(MaBombDrop* this) { + switch (this->state) { case 0: - Graphics_SetScaleMtx(actor->scale); + Graphics_SetScaleMtx(this->scale); RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gSPDisplayList(gMasterDisp++, D_ENMY_PLANET_4008CE0); RCP_SetupDL(&gMasterDisp, SETUPDL_64); break; + case 1: - Matrix_Scale(gGfxMatrix, actor->fwork[0], actor->scale, 2.5f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->fwork[0], this->scale, 2.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL_40(); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); @@ -5278,51 +5896,54 @@ void Macbeth_Actor220_Draw(Actor* actor) { } } -void Macbeth_801ADC08(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel) { - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_220; - actor->obj.pos.x = xPos; - actor->obj.pos.y = yPos; - actor->obj.pos.z = zPos; +void Macbeth_MaBombDrop_Setup(MaBombDrop* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel) { + Actor_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_ACTOR_MA_BOMBDROP; + + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + if (xVel == 999.9f) { - actor->iwork[0] = 1; - actor->vel.x = 0.0f; + this->iwork[0] = 1; + this->vel.x = 0.0f; } else { - actor->vel.x = xVel; - actor->iwork[0] = 0; + this->vel.x = xVel; + this->iwork[0] = 0; } - actor->vel.y = yVel; - actor->vel.z = zVel; - actor->timer_0BC = 0; - Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(NA_SE_EN_FALLING_DOWN, actor->sfxSource, 4); + + this->vel.y = yVel; + this->vel.z = zVel; + this->timer_0BC = 0; + Object_SetInfo(&this->info, this->obj.id); + AUDIO_PLAY_SFX(NA_SE_EN_FALLING_DOWN, this->sfxSource, 4); } -void Macbeth_801ADCEC(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel) { +void Macbeth_MaBombDrop_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel) { s32 i; for (i = ARRAY_COUNT(gActors) - 1; i >= 0; i--) { if (gActors[i].obj.status == OBJ_FREE) { - Macbeth_801ADC08(&gActors[i], xPos, yPos, zPos, xVel, yVel, zVel); + Macbeth_MaBombDrop_Setup(&gActors[i], xPos, yPos, zPos, xVel, yVel, zVel); break; } } } -void Macbeth_Actor221_Update(Actor* actor) { +void Macbeth_MaSpear_Update(MaSpear* this) { Vec3f sp3C = { 0.0f, -10.0f, 0.0f }; s32 var_v0; - if ((gPlayer[0].trueZpos - actor->obj.pos.z) < -500.0f) { - Object_Kill(&actor->obj, actor->sfxSource); + if ((gPlayer[0].trueZpos - this->obj.pos.z) < -500.0f) { + Object_Kill(&this->obj, this->sfxSource); } - switch (actor->state) { + switch (this->state) { case 0: - if (actor->timer_0BC == 0) { - actor->vel.y -= 2.5f; - if (actor->vel.y < 20.0f) { + if (this->timer_0BC == 0) { + this->vel.y -= 2.5f; + if (this->vel.y < 20.0f) { switch (D_i5_801BE320[18]) { case 0: case 1: @@ -5339,69 +5960,73 @@ void Macbeth_Actor221_Update(Actor* actor) { break; } - Math_SmoothStepToF(&actor->obj.pos.x, - gPlayer[0].pos.x + D_i5_801BA570[actor->iwork[2]][actor->iwork[1]] / var_v0, - 0.2f, 30.0f, 0.01f); - Math_SmoothStepToF(&actor->obj.pos.z, - gPlayer[0].trueZpos - D_i5_801BA638[actor->iwork[2]][actor->iwork[1]] / var_v0, + Math_SmoothStepToF(&this->obj.pos.x, + gPlayer[0].pos.x + D_i5_801BA570[this->iwork[2]][this->iwork[1]] / var_v0, 0.2f, + 30.0f, 0.01f); + Math_SmoothStepToF(&this->obj.pos.z, + gPlayer[0].trueZpos - D_i5_801BA638[this->iwork[2]][this->iwork[1]] / var_v0, 0.2f, 40.0f, 0.01f); - Math_SmoothStepToF(&actor->obj.rot.z, RAND_FLOAT_CENTERED(15.0f), 0.1f, 10.0f, 0.01f); + Math_SmoothStepToF(&this->obj.rot.z, RAND_FLOAT_CENTERED(15.0f), 0.1f, 10.0f, 0.01f); - if (actor->fwork[2] < 1.0f) { - actor->fwork[2] += 0.02; + if (this->fwork[2] < 1.0f) { + this->fwork[2] += 0.02; } } } - if ((Object_CheckCollision(actor->index, &actor->obj.pos, &sp3C, 1) != 0) || - (actor->obj.pos.y < (gGroundHeight + 200.0f))) { - AUDIO_PLAY_SFX(NA_SE_OB_SPEAR_STICK, actor->sfxSource, 4); + + if ((Object_CheckCollision(this->index, &this->obj.pos, &sp3C, 1) != 0) || + (this->obj.pos.y < (gGroundHeight + 200.0f))) { + AUDIO_PLAY_SFX(NA_SE_OB_SPEAR_STICK, this->sfxSource, 4); gControllerRumbleFlags[gMainController] = 1; gControllerRumbleTimers[gMainController] = 5; - actor->vel.x = 0.0f; - actor->vel.y = 0.0f; - actor->vel.z = 0.0f; - if (actor->obj.pos.y < gGroundHeight + 200.0f) { - actor->obj.pos.y = gGroundHeight + 200.0f; + this->vel.x = 0.0f; + this->vel.y = 0.0f; + this->vel.z = 0.0f; + if (this->obj.pos.y < gGroundHeight + 200.0f) { + this->obj.pos.y = gGroundHeight + 200.0f; } - actor->state = 1; + this->state = 1; } - if (actor->obj.pos.y < (gGroundHeight + 800.0f)) { - if (actor->iwork[0] > 10) { - actor->iwork[0] -= 10; - } else if (actor->iwork[0] > 0) { - actor->iwork[0] -= 1; + + if (this->obj.pos.y < (gGroundHeight + 800.0f)) { + if (this->iwork[0] > 10) { + this->iwork[0] -= 10; + } else if (this->iwork[0] > 0) { + this->iwork[0] -= 1; } } break; - case 1: - if (actor->iwork[0] > 10) { - actor->iwork[0] -= 10; - } else if (actor->iwork[0] > 0) { - actor->iwork[0] -= 1; - } - if (actor->dmgType != DMG_NONE) { - actor->dmgType = DMG_NONE; - actor->iwork[7] = 15; - actor->health -= actor->damage; - if (actor->health <= 0) { - Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); - func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(20.0f), actor->obj.pos.y - 200.0f, - actor->obj.pos.z, 8.0f); - func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(20.0f), actor->obj.pos.y, - actor->obj.pos.z, 8.0f); - func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(20.0f), actor->obj.pos.y + 200.0f, - actor->obj.pos.z, 7.0f); - func_effect_8007D2C8(actor->obj.pos.x + RAND_FLOAT_CENTERED(20.0f), actor->obj.pos.y + 400.0f, - actor->obj.pos.z, 7.0f); - Object_Kill(&actor->obj, actor->sfxSource); + case 1: + if (this->iwork[0] > 10) { + this->iwork[0] -= 10; + } else if (this->iwork[0] > 0) { + this->iwork[0] -= 1; + } + + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + this->iwork[7] = 15; + this->health -= this->damage; + + if (this->health <= 0) { + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); + func_effect_8007D2C8(this->obj.pos.x + RAND_FLOAT_CENTERED(20.0f), this->obj.pos.y - 200.0f, + this->obj.pos.z, 8.0f); + func_effect_8007D2C8(this->obj.pos.x + RAND_FLOAT_CENTERED(20.0f), this->obj.pos.y, this->obj.pos.z, + 8.0f); + func_effect_8007D2C8(this->obj.pos.x + RAND_FLOAT_CENTERED(20.0f), this->obj.pos.y + 200.0f, + this->obj.pos.z, 7.0f); + func_effect_8007D2C8(this->obj.pos.x + RAND_FLOAT_CENTERED(20.0f), this->obj.pos.y + 400.0f, + this->obj.pos.z, 7.0f); + Object_Kill(&this->obj, this->sfxSource); } else { - AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, this->sfxSource, 4); } } break; } - actor->dmgType = DMG_NONE; + this->dmgType = DMG_NONE; } static Vec3f D_i5_801BA784[8] = { @@ -5409,134 +6034,145 @@ static Vec3f D_i5_801BA784[8] = { { -40.0f, 10.0f, 30.0f }, { -41.0f, 10.0f, 10.0f }, { -43.0f, 10.0f, -10.0f }, { -45.0f, 10.0f, -30.0f }, }; // unused? -void Macbeth_Actor221_Draw(Actor* actor) { - if (actor->state < 2) { - Graphics_SetScaleMtx(actor->scale); - if (actor->iwork[0] >= 128) { +void Macbeth_MaSpear_Draw(MaSpear* this) { + if (this->state < 2) { + Graphics_SetScaleMtx(this->scale); + if (this->iwork[0] >= 128) { RCP_SetupDL(&gMasterDisp, SETUPDL_67); - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, actor->iwork[0]); - gDPSetEnvColor(gMasterDisp++, 255, 48, 0, actor->iwork[0]); - Matrix_Scale(gGfxMatrix, 1.0f, actor->fwork[2], 1.0f, MTXF_APPLY); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, this->iwork[0]); + gDPSetEnvColor(gMasterDisp++, 255, 48, 0, this->iwork[0]); + Matrix_Scale(gGfxMatrix, 1.0f, this->fwork[2], 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_MA_6013060); RCP_SetupDL(&gMasterDisp, SETUPDL_67); - Matrix_Scale(gGfxMatrix, 1.0f, actor->fwork[2], 1.0f, MTXF_APPLY); - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 53, 53, 53, 255 - actor->iwork[0]); - gDPSetEnvColor(gMasterDisp++, 0, 0, 0, actor->iwork[0]); + Matrix_Scale(gGfxMatrix, 1.0f, this->fwork[2], 1.0f, MTXF_APPLY); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 53, 53, 53, 255 - this->iwork[0]); + gDPSetEnvColor(gMasterDisp++, 0, 0, 0, this->iwork[0]); } else { RCP_SetupDL(&gMasterDisp, SETUPDL_23); - if ((actor->iwork[7] % 2) != 0) { + if ((this->iwork[7] % 2) != 0) { RCP_SetupDL_27(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } - if (actor->iwork[7] > 0) { - actor->iwork[7]--; + if (this->iwork[7] > 0) { + this->iwork[7]--; } } - gSPDisplayList(gMasterDisp++, D_MA_600D480); + gSPDisplayList(gMasterDisp++, aMaSpearDL); } } -void Macbeth_801AE4CC(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 arg4, f32 yVel, f32 arg6, s16 arg7) { - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_221; - actor->obj.pos.x = xPos; - actor->obj.pos.y = yPos; - actor->obj.pos.z = zPos; - actor->vel.y = yVel; - actor->iwork[0] = 255; - actor->fwork[1] = arg6; - actor->fwork[2] = 0.2f; - actor->timer_0BC = 0; - actor->iwork[1] = D_i5_801BE320[24]++; - actor->iwork[2] = arg7; - if (D_i5_801BA570[actor->iwork[2]][actor->iwork[1]] < 0.0f) { - actor->obj.rot.z = -180.0f; +void Macbeth_MaSpear_Setup(MaSpear* this, f32 xPos, f32 yPos, f32 zPos, f32 arg4, f32 yVel, f32 arg6, s16 arg7) { + Actor_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_ACTOR_MA_SPEAR; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + this->vel.y = yVel; + this->iwork[0] = 255; + this->fwork[1] = arg6; + this->fwork[2] = 0.2f; + this->timer_0BC = 0; + this->iwork[1] = D_i5_801BE320[24]++; + this->iwork[2] = arg7; + + if (D_i5_801BA570[this->iwork[2]][this->iwork[1]] < 0.0f) { + this->obj.rot.z = -180.0f; } else { - actor->obj.rot.z = 180.0f; + this->obj.rot.z = 180.0f; } - actor->health = 30; - Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(NA_SE_EN_FALLING_DOWN, actor->sfxSource, 4); + + this->health = 30; + Object_SetInfo(&this->info, this->obj.id); + AUDIO_PLAY_SFX(NA_SE_EN_FALLING_DOWN, this->sfxSource, 4); } -void Macbeth_801AE610(f32 xPos, f32 yPos, f32 zPos, f32 arg3, f32 yVel, f32 arg5, s16 arg6) { +void Macbeth_MaSpear_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 arg3, f32 yVel, f32 arg5, s16 arg6) { s32 i; for (i = ARRAY_COUNT(gActors) - 1; i >= 0; i--) { if (gActors[i].obj.status == OBJ_FREE) { - Macbeth_801AE4CC(&gActors[i], xPos, yPos, zPos, arg3, yVel, arg5, arg6); + Macbeth_MaSpear_Setup(&gActors[i], xPos, yPos, zPos, arg3, yVel, arg5, arg6); break; } } } -void Macbeth_801AE694(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 arg4, f32 arg5, f32 arg6) { +void Macbeth_Effect379_Setup(Effect379* this, f32 xPos, f32 yPos, f32 zPos, f32 arg4, f32 arg5, f32 arg6) { f32 sp4C; f32 sp48; f32 sp44; Vec3f sp38; Vec3f sp2C; - Effect_Initialize(effect); - effect->obj.status = OBJ_ACTIVE; - effect->obj.id = OBJ_EFFECT_379; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; - effect->scale2 = D_i5_801BE368[23]; - effect->unk_46 = xPos - arg4; - effect->unk_48 = yPos - arg5; - effect->unk_4A = zPos - arg6; + Effect_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_EFFECT_379; + + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + + this->scale2 = D_i5_801BE368[23]; + + this->unk_46 = xPos - arg4; + this->unk_48 = yPos - arg5; + this->unk_4A = zPos - arg6; + sp48 = Math_Atan2F(arg4 - xPos, arg6 - zPos); sp44 = sqrtf(SQ(arg4 - xPos) + SQ(arg6 - zPos)); sp4C = -Math_Atan2F(arg5 - yPos, sp44); + Matrix_RotateY(gCalcMatrix, sp48, MTXF_NEW); Matrix_RotateX(gCalcMatrix, sp4C, MTXF_APPLY); + sp38.x = 0.0f; sp38.y = 0.0f; sp38.z = 30.0f; + Matrix_MultVec3f(gCalcMatrix, &sp38, &sp2C); - effect->unk_60.x = sp2C.x; - effect->unk_60.y = sp2C.y; - effect->unk_60.z = sp2C.z; - Object_SetInfo(&effect->info, effect->obj.id); + this->unk_60.x = sp2C.x; + this->unk_60.y = sp2C.y; + this->unk_60.z = sp2C.z; + + Object_SetInfo(&this->info, this->obj.id); } -void Macbeth_801AE800(f32 xPos, f32 yPos, f32 zPos, f32 arg3, f32 arg4, f32 arg5) { +void Macbeth_Effect379_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 arg3, f32 arg4, f32 arg5) { s32 i; for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { - Macbeth_801AE694(&gEffects[i], xPos, yPos, zPos, arg3, arg4, arg5); + Macbeth_Effect379_Setup(&gEffects[i], xPos, yPos, zPos, arg3, arg4, arg5); break; } } } -void Macbeth_Effect379_Update(Effect* effect) { +void Macbeth_Effect379_Update(Effect* this) { f32 sp34; f32 sp30; f32 sp2C; - effect->vel.x = effect->unk_60.x * effect->scale1; - effect->vel.y = effect->unk_60.y * effect->scale1; - effect->vel.z = effect->unk_60.z * effect->scale1; - effect->unk_46 += (s16) effect->vel.x; - effect->unk_48 += (s16) effect->vel.y; - effect->unk_4A += (s16) effect->vel.z; + this->vel.x = this->unk_60.x * this->scale1; + this->vel.y = this->unk_60.y * this->scale1; + this->vel.z = this->unk_60.z * this->scale1; - if (effect->scale2 == 3.0f) { + this->unk_46 += (s16) this->vel.x; + this->unk_48 += (s16) this->vel.y; + this->unk_4A += (s16) this->vel.z; + + if (this->scale2 == 3.0f) { sp34 = D_i5_801BE368[24]; sp30 = D_i5_801BE368[25]; sp2C = D_i5_801BE368[26]; - } else if (effect->scale2 == 4.0f) { + } else if (this->scale2 == 4.0f) { sp34 = D_i5_801BE368[27]; sp30 = D_i5_801BE368[28]; sp2C = D_i5_801BE368[29]; - } else if (effect->scale2 == 1.0f) { + } else if (this->scale2 == 1.0f) { sp34 = D_i5_801BE368[24]; sp30 = D_i5_801BE368[25]; sp2C = D_i5_801BE368[26]; @@ -5546,130 +6182,138 @@ void Macbeth_Effect379_Update(Effect* effect) { sp2C = D_i5_801BE368[29]; } - effect->obj.pos.x = effect->unk_46 + sp34; - effect->obj.pos.y = effect->unk_48 + sp30; - effect->obj.pos.z = effect->unk_4A + sp2C; - Math_SmoothStepToF(&effect->scale1, 1.0f, 1.0f, 0.1f, 0.0f); - if (effect->unk_44 < 240) { - effect->unk_44 += 15; + this->obj.pos.x = this->unk_46 + sp34; + this->obj.pos.y = this->unk_48 + sp30; + this->obj.pos.z = this->unk_4A + sp2C; + + Math_SmoothStepToF(&this->scale1, 1.0f, 1.0f, 0.1f, 0.0f); + + if (this->unk_44 < 240) { + this->unk_44 += 15; } else { - Object_Kill(&effect->obj, effect->sfxSource); + Object_Kill(&this->obj, this->sfxSource); } - if ((fabsf(effect->obj.pos.x - sp34) <= 30.0f) && (fabsf(effect->obj.pos.z - sp2C) <= 30.0f)) { - Object_Kill(&effect->obj, effect->sfxSource); + + if ((fabsf(this->obj.pos.x - sp34) <= 30.0f) && (fabsf(this->obj.pos.z - sp2C) <= 30.0f)) { + Object_Kill(&this->obj, this->sfxSource); } } -void Macbeth_Effect379_Draw(Effect* effect) { +void Macbeth_Effect379_Draw(Effect379* this) { RCP_SetupDL(&gMasterDisp, SETUPDL_67); - if (effect->scale2 >= 3.0f) { - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, effect->unk_44); - gDPSetEnvColor(gMasterDisp++, 255, 0, 0, effect->unk_44); + + if (this->scale2 >= 3.0f) { + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, this->unk_44); + gDPSetEnvColor(gMasterDisp++, 255, 0, 0, this->unk_44); } else { - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, effect->unk_44); - gDPSetEnvColor(gMasterDisp++, 0, 128, 255, effect->unk_44); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, this->unk_44); + gDPSetEnvColor(gMasterDisp++, 0, 128, 255, this->unk_44); } + Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); RCP_SetupDL(&gMasterDisp, SETUPDL_64); } -void Macbeth_Actor222_Update(Actor* actor) { - if ((gPlayer[0].trueZpos - actor->obj.pos.z) < -300.0f) { - Object_Kill(&actor->obj, actor->sfxSource); +void Macbeth_MaShockBox_Update(MaShockBox* this) { + if ((gPlayer[0].trueZpos - this->obj.pos.z) < -300.0f) { + Object_Kill(&this->obj, this->sfxSource); } - switch (actor->state) { + switch (this->state) { case 0: - actor->vel.y -= 0.5f; - if (actor->obj.pos.y < (gGroundHeight + 35.0f)) { - actor->vel.x = 0.0f; - actor->vel.y = 0.0f; - actor->vel.z = 0.0f; - if (actor->obj.pos.y < gGroundHeight + 35.0f) { - actor->obj.pos.y = gGroundHeight + 35.0f; + this->vel.y -= 0.5f; + if (this->obj.pos.y < (gGroundHeight + 35.0f)) { + this->vel.x = 0.0f; + this->vel.y = 0.0f; + this->vel.z = 0.0f; + if (this->obj.pos.y < gGroundHeight + 35.0f) { + this->obj.pos.y = gGroundHeight + 35.0f; } - actor->state = 1; - actor->timer_0BC = 200; - AUDIO_PLAY_SFX(NA_SE_OB_SPARK_BEAM, actor->sfxSource, 4); + this->state = 1; + this->timer_0BC = 200; + AUDIO_PLAY_SFX(NA_SE_OB_SPARK_BEAM, this->sfxSource, 4); } break; + case 1: - - if (actor->fwork[0] < 10.0f) { - actor->fwork[0] += 1.0f; + if (this->fwork[0] < 10.0f) { + this->fwork[0] += 1.0f; } - if (actor->fwork[2] < 3.0f) { - actor->fwork[2] += 0.1f; + if (this->fwork[2] < 3.0f) { + this->fwork[2] += 0.1f; } - if (((gGameFrameCount % 16) == 0)) { - func_effect_8007C120(actor->obj.pos.x - 35.0f, actor->obj.pos.y + 15.0f, actor->obj.pos.z, -3.0f, 0.0f, - 0.0f, 0.1f, 20); - func_effect_8007C120(actor->obj.pos.x + 35.0f, actor->obj.pos.y + 15.0f, actor->obj.pos.z, 3.0f, 0.0f, - 0.0f, 0.1f, 20); + if ((gGameFrameCount % 16) == 0) { + Effect_Effect390_Spawn(this->obj.pos.x - 35.0f, this->obj.pos.y + 15.0f, this->obj.pos.z, -3.0f, 0.0f, + 0.0f, 0.1f, 20); + Effect_Effect390_Spawn(this->obj.pos.x + 35.0f, this->obj.pos.y + 15.0f, this->obj.pos.z, 3.0f, 0.0f, + 0.0f, 0.1f, 20); } break; + default: break; } + if ((gGameFrameCount % 2) != 0) { - actor->fwork[1] = 255.0f; + this->fwork[1] = 255.0f; } else { - actor->fwork[1] = 32.0f; + this->fwork[1] = 32.0f; } - if ((actor->dmgType != DMG_NONE) && (actor->dmgPart == 0)) { - AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, actor->sfxSource, 4); - actor->dmgType = DMG_NONE; - actor->health -= actor->damage; - actor->timer_0C6 = 15; - if (actor->health <= 0) { - Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EXPLOSION_S); - func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 8.0f); - Object_Kill(&actor->obj, actor->sfxSource); + + if ((this->dmgType != DMG_NONE) && (this->dmgPart == 0)) { + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, this->sfxSource, 4); + this->dmgType = DMG_NONE; + this->health -= this->damage; + this->timer_0C6 = 15; + if (this->health <= 0) { + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EXPLOSION_S); + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 8.0f); + Object_Kill(&this->obj, this->sfxSource); } } } -void Macbeth_Actor222_Draw(Actor* actor) { - gSPDisplayList(gMasterDisp++, D_MA_6015510); - Matrix_Scale(gGfxMatrix, actor->fwork[0], actor->fwork[2], 1.0f, MTXF_APPLY); +void Macbeth_MaShockBox_Draw(MaShockBox* this) { + gSPDisplayList(gMasterDisp++, aMaShockBoxDL); + Matrix_Scale(gGfxMatrix, this->fwork[0], this->fwork[2], 1.0f, MTXF_APPLY); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, -10.0f, 0.0f, MTXF_APPLY); RCP_SetupDL(&gMasterDisp, SETUPDL_67); - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 111, 175, 64, actor->fwork[1]); - gDPSetEnvColor(gMasterDisp++, 255, 255, 208, actor->fwork[1]); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 111, 175, 64, this->fwork[1]); + gDPSetEnvColor(gMasterDisp++, 255, 255, 208, this->fwork[1]); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_MA_6012F50); + gSPDisplayList(gMasterDisp++, aMaShockBoxLightDL); Matrix_Pop(&gGfxMatrix); } -void Macbeth_801AF134(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel) { - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_222; - actor->obj.pos.x = xPos; - actor->obj.pos.y = yPos; - actor->obj.pos.z = zPos; - actor->vel.x = xVel; - actor->vel.y = yVel; - actor->vel.z = zVel; - actor->timer_0BC = 0; - actor->health = 30; - actor->fwork[0] = 1.0f; - actor->fwork[2] = 1.0f; - Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(NA_SE_EN_FALLING_DOWN, actor->sfxSource, 4); +void Macbeth_MaShockBox_Setup(MaShockBox* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel) { + Actor_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_ACTOR_MA_SHOCK_BOX; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + this->vel.x = xVel; + this->vel.y = yVel; + this->vel.z = zVel; + this->timer_0BC = 0; + this->health = 30; + this->fwork[0] = 1.0f; + this->fwork[2] = 1.0f; + Object_SetInfo(&this->info, this->obj.id); + AUDIO_PLAY_SFX(NA_SE_EN_FALLING_DOWN, this->sfxSource, 4); } -void Macbeth_801AF200(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel) { +void Macbeth_MaShockBox_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel) { s32 i; for (i = ARRAY_COUNT(gActors) - 1; i >= 0; i--) { if (gActors[i].obj.status == OBJ_FREE) { - Macbeth_801AF134(&gActors[i], xPos, yPos, zPos, xVel, yVel, zVel); + Macbeth_MaShockBox_Setup(&gActors[i], xPos, yPos, zPos, xVel, yVel, zVel); break; } } @@ -5683,63 +6327,76 @@ static f32 D_i5_801BA80C[5] = { 500.0f, 600.0f, 200.0f, 4500.0f, 2300.0f }; static f32 D_i5_801BA820[5] = { 90.0f, -90.0f, 25.0f, 0.0f, 225.0f }; -void Macbeth_801AF27C(Actor* actor, s32 arg1) { +void Macbeth_801AF27C(ActorCutscene* this, s32 arg1) { Player* player = &gPlayer[0]; - Actor_Initialize(actor); - actor->obj.pos.x = D_i5_801BA7E4[arg1] + player->pos.x; - actor->obj.pos.y = D_i5_801BA7F8[arg1] + player->pos.y; - actor->obj.pos.z = D_i5_801BA80C[arg1] + player->pos.z; - actor->fwork[7] = RAND_FLOAT(360.0f); - actor->fwork[8] = RAND_FLOAT(360.0f); - actor->vel.x = player->vel.x; - actor->vel.y = player->vel.y; - actor->vel.z = player->vel.z; - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.rot.y = 180.0f; - Object_SetInfo(&actor->info, actor->obj.id); + Actor_Initialize(this); + + this->obj.pos.x = D_i5_801BA7E4[arg1] + player->pos.x; + this->obj.pos.y = D_i5_801BA7F8[arg1] + player->pos.y; + this->obj.pos.z = D_i5_801BA80C[arg1] + player->pos.z; + + this->fwork[7] = RAND_FLOAT(360.0f); + this->fwork[8] = RAND_FLOAT(360.0f); + + this->vel.x = player->vel.x; + this->vel.y = player->vel.y; + this->vel.z = player->vel.z; + + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_ACTOR_CUTSCENE; + this->obj.rot.y = 180.0f; + + Object_SetInfo(&this->info, this->obj.id); + if (arg1 < 3) { - actor->iwork[11] = 1; - actor->drawShadow = true; - actor->fwork[3] = D_i5_801BA820[arg1]; - actor->state = 30; - AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); + this->iwork[11] = 1; + this->drawShadow = true; + this->fwork[3] = D_i5_801BA820[arg1]; + this->state = 30; + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); } else { - actor->animFrame = 1; - actor->state = 21; - actor->obj.rot.z = 32.5f; - AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); - actor->fwork[9] = 20.0f; + this->animFrame = 1; + this->state = 21; + this->obj.rot.z = 32.5f; + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, this->sfxSource, 0); + this->fwork[9] = 20.0f; } } void Macbeth_801AF44C(void) { - Actor* actor = &gActors[8]; + ActorCutscene* actor = &gActors[8]; Actor_Initialize(actor); actor->obj.status = OBJ_INIT; actor->obj.id = OBJ_ACTOR_CUTSCENE; + actor->obj.pos.x = gPlayer[0].pos.x + D_i5_801BA7E4[4]; actor->obj.pos.y = gPlayer[0].pos.y + D_i5_801BA7F8[4]; actor->obj.pos.z = gPlayer[0].pos.z + D_i5_801BA80C[4]; + actor->vel.x = gPlayer[0].vel.x; actor->vel.y = gPlayer[0].vel.y; actor->vel.z = gPlayer[0].vel.z; + actor->fwork[7] = RAND_FLOAT(360.0f); actor->fwork[8] = RAND_FLOAT(360.0f); actor->fwork[9] = 30.0f; + actor->rot_0F4.y = D_i5_801BA820[4]; actor->rot_0F4.x = 0.0f; actor->rot_0F4.z = 330.0f; + actor->obj.rot.x = -0.0f; actor->obj.rot.y = actor->rot_0F4.y; actor->obj.rot.z = -330.0f; + actor->fwork[0] = 0.0f; actor->animFrame = 24; actor->iwork[11] = 1; actor->state = 15; actor->fwork[3] = D_i5_801BA820[4]; + Object_SetInfo(&actor->info, actor->obj.id); AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } @@ -5751,30 +6408,28 @@ static Vec3f D_i5_801BA834[2] = { static f32 D_i5_801BA84C[2] = { 0.0f, 60.0f }; -void Macbeth_801AF628(Actor* actor, s32 arg1) { - Actor_Initialize(actor); - actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.pos.x = gPlayer[0].xPath + D_i5_801BA834[arg1].x; - actor->obj.pos.y = D_i5_801BA834[arg1].y; - actor->obj.pos.z = D_i5_801BA834[arg1].z - gPathProgress; - actor->animFrame = 37; - actor->obj.rot.y = D_i5_801BA84C[arg1]; - actor->iwork[4] = actor->iwork[5] = 192; - actor->iwork[0] = actor->iwork[1] = actor->iwork[2] = actor->iwork[7] = actor->iwork[3] = 255; - actor->iwork[6] = 128; - Object_SetInfo(&actor->info, actor->obj.id); +// Unused +void Macbeth_801AF628(ActorCutscene* this, s32 index) { + Actor_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_ACTOR_CUTSCENE; + this->obj.pos.x = gPlayer[0].xPath + D_i5_801BA834[index].x; + this->obj.pos.y = D_i5_801BA834[index].y; + this->obj.pos.z = D_i5_801BA834[index].z - gPathProgress; + this->animFrame = 37; + this->obj.rot.y = D_i5_801BA84C[index]; + this->iwork[4] = this->iwork[5] = 192; + this->iwork[0] = this->iwork[1] = this->iwork[2] = this->iwork[7] = this->iwork[3] = 255; + this->iwork[6] = 128; + Object_SetInfo(&this->info, this->obj.id); } -void Macbeth_801AF70C(f32 xPos, f32 yPos, f32 zPos, f32 arg3) { - Effect* effect; +void Macbeth_Effect357_Spawn2(f32 xPos, f32 yPos, f32 zPos, f32 arg3) { + Effect* effect = NULL; Effect* effectPtr; - f32 temp_ft1; s32 i; - effect = NULL; - effectPtr = &gEffects[0]; - for (i = 0; i < 99; i++, effectPtr++) { + for (effectPtr = &gEffects[0], i = 0; i < 99; i++, effectPtr++) { if (effectPtr->obj.status == OBJ_FREE) { effect = effectPtr; break; @@ -5828,26 +6483,35 @@ void Macbeth_LevelComplete2(Player* player) { gCsFrameCount = 0; gLoadLevelObjects = 1; player->draw = false; + SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 30); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 30); + player->csState = 1; + D_ctx_80177A48[0] = 0.0f; D_ctx_80177A48[4] = -60.0f; D_ctx_80177A48[5] = 240.0f; + player->gravity = 3.0f; + gCameraShakeY = player->vel.x = player->vel.y = player->vel.z = player->baseSpeed = 0.0f; + if (player->shields <= 0) { player->shields = 1; } + player->cam.eye.x = gCsCamEyeX = gActors[D_i5_801BE318].obj.pos.x - 250.0f; player->cam.eye.y = gCsCamEyeY = gActors[D_i5_801BE318].obj.pos.y + 150.0f; player->cam.eye.z = gCsCamEyeZ = gActors[D_i5_801BE318].obj.pos.z + gPathProgress + 500.0f; player->cam.at.x = gCsCamAtX = gActors[D_i5_801BE318].obj.pos.x; player->cam.at.y = gCsCamAtY = gActors[D_i5_801BE318].obj.pos.y + 200.0f; player->cam.at.z = gCsCamAtZ = gActors[D_i5_801BE318].obj.pos.z + gPathProgress; + player->pos.x = 500.0f; player->pos.y = -3.0f; - D_i5_801BA1DC = 0.0f; + + sMaTrainSpeedTarget = 0.0f; player->aerobaticPitch = 0.0f; player->camRoll = 0.0f; player->boostSpeed = 0.0f; @@ -5860,38 +6524,45 @@ void Macbeth_LevelComplete2(Player* player) { player->wings.unk_04 = 0.0f; /* fallthrough */ case 1: - gShowBossHealth = 0; + gShowBossHealth = false; if (gCsFrameCount == 70) { gObjectLoadIndex = 498; for (i = 0; i < ARRAY_COUNT(gActors); i++) { - if (gActors[i].obj.id == OBJ_ACTOR_223) { + if (gActors[i].obj.id == OBJ_ACTOR_MA_RAILWAY_SIGNAL) { gActors[i].state++; break; } } player->csState++; + gCsCamEyeX = -100.0f; gCsCamEyeY = 250.0f; gCsCamEyeZ = 2090.0f; gCsCamAtX = -250.0f; gCsCamAtY = 10.0f; gCsCamAtZ = -3210.0f; + player->cam.eye.x = -250.0f; player->cam.eye.y = 50.0f; player->cam.eye.z = 1580.0f; player->cam.at.x = -250.0f; player->cam.at.y = 10.0f; player->cam.at.z = -3210.0f; + D_i5_801BE312 = 1; + player->pos.x = 500.0f; player->pos.y = -3.0f; player->pos.z = player->trueZpos = -111130.0f; player->zPath = gPathProgress = 115930.0f; player->flags_228 = PFLAG_228_4; + gLastPathChange = OBJ_ITEM_PATH_TURN_RIGHT; - D_i5_801BA1DC = 0.0f; + + sMaTrainSpeedTarget = 0.0f; + gActors[D_i5_801BE314].obj.pos.x = -431.0f; gActors[D_i5_801BE314].obj.pos.y = 0.0f; gActors[D_i5_801BE314].obj.pos.z = -111174.0f; @@ -5903,8 +6574,8 @@ void Macbeth_LevelComplete2(Player* player) { gActors[D_i5_801BE316].obj.pos.z = -109864.0f; } break; - case 2: + case 2: if (gCsFrameCount > 105) { Math_SmoothStepToF(&D_ctx_80177A48[0], 1.0f, 1.0f, 0.005f, 0.0f); } @@ -5920,7 +6591,7 @@ void Macbeth_LevelComplete2(Player* player) { gActors[D_i5_801BE316].obj.pos.z = -109864.0f; } else { D_ctx_80177A48[0] = 0.0f; - D_i5_801BA1DC = -40.0f; + sMaTrainSpeedTarget = -40.0f; player->csState++; } /* fallthrough */ @@ -5937,11 +6608,15 @@ void Macbeth_LevelComplete2(Player* player) { player->pos.x = gActors[D_i5_801BE314].obj.pos.x + 500.0f; player->zPathVel = -gActors[D_i5_801BE314].vel.z; player->zPath += player->zPathVel; + gPathVelZ = player->zPathVel; gPathProgress = player->zPath; gPathTexScroll += player->zPathVel; + player->pos.z = player->trueZpos = -(gPathProgress + 210.0f); + Math_SmoothStepToF(&D_ctx_80177A48[0], 1.0f, 0.1f, 0.00025f, 0.0f); + gCsCamAtX = gActors[D_i5_801BE314].obj.pos.x + 2500.0f; gCsCamAtZ = gActors[D_i5_801BE314].obj.pos.z + gPathProgress - 2000.0f; gCsCamEyeX = gCsCamAtX - 2340.0f; @@ -5951,22 +6626,27 @@ void Macbeth_LevelComplete2(Player* player) { player->csState++; player->vel.z = 0.0f; player->zPathVel = 0.0f; + gPathVelX = 0.0f; gPathVelY = 0.0f; + player->pathChangeTimer = 0; + player->cam.eye.x = gCsCamEyeX = 2750.0f; player->cam.eye.y = gCsCamEyeY = 50.0f; player->cam.eye.z = gCsCamEyeZ = -620.0f; player->cam.at.x = gCsCamAtX = -650.0f; player->cam.at.y = gCsCamAtY = 30.0f; player->cam.at.z = gCsCamAtZ = 1900.0f; + player->yRot_114 = 0.0f; - D_i5_801BA1DC = -100.0f; + sMaTrainSpeedTarget = -100.0f; Audio_KillSfxById(NA_SE_EN_FREIGHT_TRAIN); AUDIO_PLAY_SFX(NA_SE_EN_TRAIN_BREAK, gActors[D_i5_801BE314].sfxSource, 4); D_i5_801BE313 = 0; } break; + case 4: if (gCsFrameCount == 403) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; @@ -5975,32 +6655,41 @@ void Macbeth_LevelComplete2(Player* player) { } if (gCsFrameCount == 416) { player->csState++; + D_ctx_80177A48[0] = 1.0f; + player->yRot_114 = 30.0f; player->xPath = 4600.0f; - D_i5_801BA1DC = -80.0f; + + sMaTrainSpeedTarget = -80.0f; + player->zPath = gPathProgress += 300.0f; + D_ctx_80177A48[5] = 0.0f; D_ctx_80177A48[6] = 0.5f; D_ctx_80177A48[7] = 1560.0f; D_ctx_80177A48[8] = 2400.0f; + player->cam.at.x = gCsCamAtX = gActors[D_i5_801BE314].obj.pos.x; player->cam.at.z = gCsCamAtZ = (gActors[D_i5_801BE314].obj.pos.z + gPathProgress) - 2000.0f; player->cam.eye.y = gCsCamEyeY = 50.0f; player->cam.at.y = gCsCamAtY = 10.0f; player->cam.eye.x = gCsCamEyeX = D_ctx_80177A48[7] + gCsCamAtX; player->cam.eye.z = gCsCamEyeZ = D_ctx_80177A48[8] + gCsCamAtZ; + player->pathChangeYaw = -30.0f; player->xPathTarget = 10014.0f; player->pathChangeTimer = 1000; player->pathStep = 0.0f; + gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 127; } break; + case 5: if (gCsFrameCount <= 625) { - Math_SmoothStepToF(&D_i5_801BA1DC, 0.0f, 0.1f, 0.05f, 0.0f); + Math_SmoothStepToF(&sMaTrainSpeedTarget, 0.0f, 0.1f, 0.05f, 0.0f); } if (gCsFrameCount >= 430) { Math_SmoothStepToF(&D_ctx_80177A48[6], 22.0f, 0.1f, 1.0f, 0.0f); @@ -6017,21 +6706,23 @@ void Macbeth_LevelComplete2(Player* player) { player->zPathVel = -gActors[D_i5_801BE314].vel.z; gCsCamEyeX = D_ctx_80177A48[7] + gCsCamAtX; gCsCamEyeZ = D_ctx_80177A48[8] + gCsCamAtZ; - func_effect_8007C120(gActors[D_i5_801BE314].obj.pos.x + 480.0f, - gActors[D_i5_801BE314].obj.pos.y + 15.0f, - gActors[D_i5_801BE314].obj.pos.z - 400.0f, gActors[D_i5_801BE314].vel.x, - gActors[D_i5_801BE314].vel.y, 0.0f, 0.2f, 10); + Effect_Effect390_Spawn(gActors[D_i5_801BE314].obj.pos.x + 480.0f, + gActors[D_i5_801BE314].obj.pos.y + 15.0f, + gActors[D_i5_801BE314].obj.pos.z - 400.0f, gActors[D_i5_801BE314].vel.x, + gActors[D_i5_801BE314].vel.y, 0.0f, 0.2f, 10); } else { player->vel.z = 0.0f; - if (((gGameFrameCount % 16) == 0)) { + if ((gGameFrameCount % 16) == 0) { gFogRed -= 1; gFogGreen -= 1; gFogBlue -= 2; } + Math_SmoothStepToF(&player->zPathVel, 0.0f, 1.0f, 0.6f, 0.0f); Math_SmoothStepToF(&gCsCamAtX, 11700.0f, 0.1f, 50.0f, 0.0f); Math_SmoothStepToF(&D_ctx_80177A48[5], 30.0f, 0.1f, 0.05f, 0.0f); Math_SmoothStepToF(&gCsCamAtY, 1600.0f, 0.1f, D_ctx_80177A48[5], 0.0f); + if (player->zPathVel >= 2.5f) { player->pos.x = gActors[D_i5_801BE314].obj.pos.x + 500.0f; player->pos.z = player->trueZpos = -(gPathProgress + 210.0f); @@ -6040,66 +6731,82 @@ void Macbeth_LevelComplete2(Player* player) { gPathVelX = 0.0f; } - func_effect_8007BC7C(gActors[D_i5_801BE314].obj.pos.x + 190.0f, - gActors[D_i5_801BE314].obj.pos.y + 30.0f, - gActors[D_i5_801BE314].obj.pos.z - 100.0f, 6.0f); - func_effect_8007BC7C(gActors[D_i5_801BE314].obj.pos.x + 190.0f, - gActors[D_i5_801BE314].obj.pos.y + 30.0f, - gActors[D_i5_801BE314].obj.pos.z - 120.0f, 6.0f); - func_effect_8007BC7C(gActors[D_i5_801BE314].obj.pos.x - 190.0f, - gActors[D_i5_801BE314].obj.pos.y + 30.0f, - gActors[D_i5_801BE314].obj.pos.z - 100.0f, 6.0f); - func_effect_8007BC7C(gActors[D_i5_801BE314].obj.pos.x - 190.0f, - gActors[D_i5_801BE314].obj.pos.y + 30.0f, - gActors[D_i5_801BE314].obj.pos.z - 120.0f, 6.0f); + Effect_Effect362_Spawn(gActors[D_i5_801BE314].obj.pos.x + 190.0f, + gActors[D_i5_801BE314].obj.pos.y + 30.0f, + gActors[D_i5_801BE314].obj.pos.z - 100.0f, 6.0f); + Effect_Effect362_Spawn(gActors[D_i5_801BE314].obj.pos.x + 190.0f, + gActors[D_i5_801BE314].obj.pos.y + 30.0f, + gActors[D_i5_801BE314].obj.pos.z - 120.0f, 6.0f); + Effect_Effect362_Spawn(gActors[D_i5_801BE314].obj.pos.x - 190.0f, + gActors[D_i5_801BE314].obj.pos.y + 30.0f, + gActors[D_i5_801BE314].obj.pos.z - 100.0f, 6.0f); + Effect_Effect362_Spawn(gActors[D_i5_801BE314].obj.pos.x - 190.0f, + gActors[D_i5_801BE314].obj.pos.y + 30.0f, + gActors[D_i5_801BE314].obj.pos.z - 120.0f, 6.0f); } + player->zPath += player->zPathVel; gPathVelZ = player->zPathVel; gPathProgress = player->zPath; gPathTexScroll += player->zPathVel; + if (gCsFrameCount == 630) { Audio_KillSfxBySourceAndId(gActors[D_i5_801BE314].sfxSource, NA_SE_EN_TRAIN_BREAK); AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_L, gActors[D_i5_801BE314].sfxSource, 4); player->csState++; player->vel.z = 0.0f; player->zPathVel = 0.0f; + gPathVelZ = 0.0f; gPathVelX = 0.0f; gPathVelY = 0.0f; + player->pathChangeTimer = 10000; + D_ctx_80177A48[0] = 1.0f; - D_i5_801BA1DC = 0.0f; + + sMaTrainSpeedTarget = 0.0f; + gControllerRumbleFlags[0] = 1; gControllerRumbleTimers[0] = 10; + gCameraShake = 10; + D_ctx_80177A48[4] = -70.0f; D_ctx_80177A48[5] = 280.0f; } break; + case 6: Math_SmoothStepToF(&D_ctx_80177A48[4], -60.0f, 1.0f, 0.5f, 0.0f); Math_SmoothStepToF(&D_ctx_80177A48[5], 240.0f, 1.0f, 2.0f, 0.0f); - if (((gGameFrameCount % 2) == 0)) { - func_effect_8007797C(11000.0f, 200.0f, -139000.0f, D_ctx_80177A48[4], 4.0f, D_ctx_80177A48[5], 20.0f); + + if ((gGameFrameCount % 2) == 0) { + Effect_FireSmoke_Spawn2(11000.0f, 200.0f, -139000.0f, D_ctx_80177A48[4], 4.0f, D_ctx_80177A48[5], + 20.0f); } if (gCsFrameCount == 710) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 255; gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 128; - func_effect_8007D9DC(gActors[D_i5_801BE314].obj.pos.x + 1000.0f, - gActors[D_i5_801BE314].obj.pos.y + 20.0f, -138500.0f, 100.0f, 1000.0f, 0); - func_effect_8007A568(gActors[D_i5_801BE314].obj.pos.x + 200.0f, - gActors[D_i5_801BE314].obj.pos.y + 700.0f, -137750.0f, 100.0f); + + Effect_Effect367_Spawn(gActors[D_i5_801BE314].obj.pos.x + 1000.0f, + gActors[D_i5_801BE314].obj.pos.y + 20.0f, -138500.0f, 100.0f, 1000.0f, 0); + Effect_Effect383_Spawn(gActors[D_i5_801BE314].obj.pos.x + 200.0f, + gActors[D_i5_801BE314].obj.pos.y + 700.0f, -137750.0f, 100.0f); + for (i = 0; i < 8; i++) { - func_effect_800794CC(gActors[D_i5_801BE314].obj.pos.x + RAND_FLOAT_CENTERED(1000.0f), - gActors[D_i5_801BE314].obj.pos.y + 1300.0f, - gActors[D_i5_801BE314].obj.pos.z + 700.0f + RAND_FLOAT_CENTERED(1000.0f), - 6.0f); - Macbeth_801AF70C(RAND_FLOAT_CENTERED(650.0f) + 11250.0f, 300.0f, RAND_FLOAT(650.0f) + -139000.0f, - 0.7f); + Effect_Effect357_Spawn50(gActors[D_i5_801BE314].obj.pos.x + RAND_FLOAT_CENTERED(1000.0f), + gActors[D_i5_801BE314].obj.pos.y + 1300.0f, + gActors[D_i5_801BE314].obj.pos.z + 700.0f + RAND_FLOAT_CENTERED(1000.0f), + 6.0f); + Macbeth_Effect357_Spawn2(RAND_FLOAT_CENTERED(650.0f) + 11250.0f, 300.0f, + RAND_FLOAT(650.0f) + -139000.0f, 0.7f); } + gActors[58].scale = 0.8f; + func_effect_8007D0E0(gActors[D_i5_801BE314].obj.pos.x + 500.0f + RAND_FLOAT_CENTERED(700.0f), gActors[D_i5_801BE314].obj.pos.y + 500.0f + RAND_FLOAT_CENTERED(700.0f), gActors[D_i5_801BE314].obj.pos.z + 3000.0f + RAND_FLOAT_CENTERED(700.0f), 30.0f); @@ -6125,110 +6832,120 @@ void Macbeth_LevelComplete2(Player* player) { gActors[D_i5_801BE314].obj.pos.z + 1300.0f + RAND_FLOAT_CENTERED(700.0f), 30.0f); } if (gCsFrameCount == 800) { - func_effect_8007A568(gActors[D_i5_801BE314].obj.pos.x - 3000.0f, - gActors[D_i5_801BE314].obj.pos.y + 500.0f, - gActors[D_i5_801BE314].obj.pos.z + 1600.0f, 10000.0f); + Effect_Effect383_Spawn(gActors[D_i5_801BE314].obj.pos.x - 3000.0f, + gActors[D_i5_801BE314].obj.pos.y + 500.0f, + gActors[D_i5_801BE314].obj.pos.z + 1600.0f, 10000.0f); for (i = 0; i < 8; i++) { - func_effect_800794CC(gActors[D_i5_801BE314].obj.pos.x - 3000.0f + RAND_FLOAT_CENTERED(1000.0f), - gActors[D_i5_801BE314].obj.pos.y + 700.0f, - gActors[D_i5_801BE314].obj.pos.z + 1600.0f + RAND_FLOAT_CENTERED(1000.0f), - 6.0f); - Macbeth_801AF70C(RAND_FLOAT_CENTERED(650.0f) + 11250.0f, 300.0f, RAND_FLOAT(650.0f) + -139000.0f, - 0.7f); + Effect_Effect357_Spawn50(gActors[D_i5_801BE314].obj.pos.x - 3000.0f + RAND_FLOAT_CENTERED(1000.0f), + gActors[D_i5_801BE314].obj.pos.y + 700.0f, + gActors[D_i5_801BE314].obj.pos.z + 1600.0f + RAND_FLOAT_CENTERED(1000.0f), + 6.0f); + Macbeth_Effect357_Spawn2(RAND_FLOAT_CENTERED(650.0f) + 11250.0f, 300.0f, + RAND_FLOAT(650.0f) + -139000.0f, 0.7f); } } if (gCsFrameCount == 820) { - func_effect_8007A568(gActors[D_i5_801BE314].obj.pos.x, gActors[D_i5_801BE314].obj.pos.y + 500.0f, - gActors[D_i5_801BE314].obj.pos.z + 3300.0f, 14000.0f); + Effect_Effect383_Spawn(gActors[D_i5_801BE314].obj.pos.x, gActors[D_i5_801BE314].obj.pos.y + 500.0f, + gActors[D_i5_801BE314].obj.pos.z + 3300.0f, 14000.0f); for (i = 0; i < 8; i++) { - func_effect_800794CC(gActors[D_i5_801BE314].obj.pos.x + 500.0f + RAND_FLOAT_CENTERED(1000.0f), - gActors[D_i5_801BE314].obj.pos.y + 900.0f, - gActors[D_i5_801BE314].obj.pos.z + 3300.0f + RAND_FLOAT_CENTERED(1000.0f), - 6.0f); - Macbeth_801AF70C(RAND_FLOAT_CENTERED(650.0f) + 11250.0f, 300.0f, RAND_FLOAT(650.0f) + -139000.0f, - 0.7f); + Effect_Effect357_Spawn50(gActors[D_i5_801BE314].obj.pos.x + 500.0f + RAND_FLOAT_CENTERED(1000.0f), + gActors[D_i5_801BE314].obj.pos.y + 900.0f, + gActors[D_i5_801BE314].obj.pos.z + 3300.0f + RAND_FLOAT_CENTERED(1000.0f), + 6.0f); + Macbeth_Effect357_Spawn2(RAND_FLOAT_CENTERED(650.0f) + 11250.0f, 300.0f, + RAND_FLOAT(650.0f) + -139000.0f, 0.7f); } } if (gCsFrameCount == 835) { - func_effect_8007A568(gActors[D_i5_801BE314].obj.pos.x - 1500.0f, - gActors[D_i5_801BE314].obj.pos.y + 500.0f, - gActors[D_i5_801BE314].obj.pos.z + 2000.0f, 80.0f); + Effect_Effect383_Spawn(gActors[D_i5_801BE314].obj.pos.x - 1500.0f, + gActors[D_i5_801BE314].obj.pos.y + 500.0f, + gActors[D_i5_801BE314].obj.pos.z + 2000.0f, 80.0f); for (i = 0; i < 8; i++) { - func_effect_800794CC(gActors[D_i5_801BE314].obj.pos.x - 1500.0f + RAND_FLOAT_CENTERED(1000.0f), - gActors[D_i5_801BE314].obj.pos.y + 1200.0f, - gActors[D_i5_801BE314].obj.pos.z + 2000.0f + RAND_FLOAT_CENTERED(1000.0f), - 6.0f); - Macbeth_801AF70C(RAND_FLOAT_CENTERED(650.0f) + 11250.0f, 300.0f, RAND_FLOAT(650.0f) + -139000.0f, - 0.7f); + Effect_Effect357_Spawn50(gActors[D_i5_801BE314].obj.pos.x - 1500.0f + RAND_FLOAT_CENTERED(1000.0f), + gActors[D_i5_801BE314].obj.pos.y + 1200.0f, + gActors[D_i5_801BE314].obj.pos.z + 2000.0f + RAND_FLOAT_CENTERED(1000.0f), + 6.0f); + Macbeth_Effect357_Spawn2(RAND_FLOAT_CENTERED(650.0f) + 11250.0f, 300.0f, + RAND_FLOAT(650.0f) + -139000.0f, 0.7f); } } if (gCsFrameCount == 845) { - func_effect_8007A568(gActors[D_i5_801BE314].obj.pos.x - 500.0f, - gActors[D_i5_801BE314].obj.pos.y + 500.0f, - gActors[D_i5_801BE314].obj.pos.z + 2800.0f, 10000.0f); + Effect_Effect383_Spawn(gActors[D_i5_801BE314].obj.pos.x - 500.0f, + gActors[D_i5_801BE314].obj.pos.y + 500.0f, + gActors[D_i5_801BE314].obj.pos.z + 2800.0f, 10000.0f); for (i = 0; i < 11; i++) { - func_effect_800794CC(gActors[D_i5_801BE314].obj.pos.x - 500.0f + RAND_FLOAT_CENTERED(1000.0f), - gActors[D_i5_801BE314].obj.pos.y + 900.0f, - gActors[D_i5_801BE314].obj.pos.z + 2800.0f + RAND_FLOAT_CENTERED(1000.0f), - 6.0f); - Macbeth_801AF70C(RAND_FLOAT_CENTERED(650.0f) + 11250.0f, 300.0f, RAND_FLOAT(650.0f) + -139000.0f, - 0.7f); + Effect_Effect357_Spawn50(gActors[D_i5_801BE314].obj.pos.x - 500.0f + RAND_FLOAT_CENTERED(1000.0f), + gActors[D_i5_801BE314].obj.pos.y + 900.0f, + gActors[D_i5_801BE314].obj.pos.z + 2800.0f + RAND_FLOAT_CENTERED(1000.0f), + 6.0f); + Macbeth_Effect357_Spawn2(RAND_FLOAT_CENTERED(650.0f) + 11250.0f, 300.0f, + RAND_FLOAT(650.0f) + -139000.0f, 0.7f); } } if (gCsFrameCount == 853) { - func_effect_8007A568(gActors[D_i5_801BE314].obj.pos.x - 3500.0f, - gActors[D_i5_801BE314].obj.pos.y + 500.0f, - gActors[D_i5_801BE314].obj.pos.z + 2500.0f, 14000.0f); + Effect_Effect383_Spawn(gActors[D_i5_801BE314].obj.pos.x - 3500.0f, + gActors[D_i5_801BE314].obj.pos.y + 500.0f, + gActors[D_i5_801BE314].obj.pos.z + 2500.0f, 14000.0f); for (i = 0; i < 8; i++) { - func_effect_800794CC(gActors[D_i5_801BE314].obj.pos.x - 3500.0f + RAND_FLOAT_CENTERED(1000.0f), - gActors[D_i5_801BE314].obj.pos.y + 900.0f, - gActors[D_i5_801BE314].obj.pos.z + 1500.0f + RAND_FLOAT_CENTERED(1000.0f), - 6.0f); - Macbeth_801AF70C(RAND_FLOAT_CENTERED(650.0f) + 11250.0f, 300.0f, RAND_FLOAT(650.0f) + -139000.0f, - 0.7f); + Effect_Effect357_Spawn50(gActors[D_i5_801BE314].obj.pos.x - 3500.0f + RAND_FLOAT_CENTERED(1000.0f), + gActors[D_i5_801BE314].obj.pos.y + 900.0f, + gActors[D_i5_801BE314].obj.pos.z + 1500.0f + RAND_FLOAT_CENTERED(1000.0f), + 6.0f); + Macbeth_Effect357_Spawn2(RAND_FLOAT_CENTERED(650.0f) + 11250.0f, 300.0f, + RAND_FLOAT(650.0f) + -139000.0f, 0.7f); } gCameraShake = 30; } if (gCsFrameCount == 860) { - func_effect_8007D9DC(gActors[D_i5_801BE314].obj.pos.x + 1000.0f, - gActors[D_i5_801BE314].obj.pos.y + 20.0f, -138500.0f, 100.0f, 1000.0f, 0); - func_effect_8007A568(gActors[D_i5_801BE314].obj.pos.x - 1500.0f, - gActors[D_i5_801BE314].obj.pos.y + 700.0f, - gActors[D_i5_801BE314].obj.pos.z + 3000.0f, 180.0f); + Effect_Effect367_Spawn(gActors[D_i5_801BE314].obj.pos.x + 1000.0f, + gActors[D_i5_801BE314].obj.pos.y + 20.0f, -138500.0f, 100.0f, 1000.0f, 0); + Effect_Effect383_Spawn(gActors[D_i5_801BE314].obj.pos.x - 1500.0f, + gActors[D_i5_801BE314].obj.pos.y + 700.0f, + gActors[D_i5_801BE314].obj.pos.z + 3000.0f, 180.0f); for (i = 0; i < 8; i++) { - func_effect_800794CC(gActors[D_i5_801BE314].obj.pos.x - 1500.0f + RAND_FLOAT_CENTERED(1000.0f), - gActors[D_i5_801BE314].obj.pos.y + 1300.0f, - gActors[D_i5_801BE314].obj.pos.z + 2500.0f + RAND_FLOAT_CENTERED(1000.0f), - 6.0f); - Macbeth_801AF70C(RAND_FLOAT_CENTERED(650.0f) + 11250.0f, 300.0f, RAND_FLOAT(650.0f) + -139000.0f, - 0.7f); + Effect_Effect357_Spawn50(gActors[D_i5_801BE314].obj.pos.x - 1500.0f + RAND_FLOAT_CENTERED(1000.0f), + gActors[D_i5_801BE314].obj.pos.y + 1300.0f, + gActors[D_i5_801BE314].obj.pos.z + 2500.0f + RAND_FLOAT_CENTERED(1000.0f), + 6.0f); + Macbeth_Effect357_Spawn2(RAND_FLOAT_CENTERED(650.0f) + 11250.0f, 300.0f, + RAND_FLOAT(650.0f) + -139000.0f, 0.7f); } } if (gCsFrameCount == 880) { gControllerRumbleFlags[0] = 1; gControllerRumbleTimers[0] = 10; + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; gFillScreenAlphaTarget = 255; gFillScreenAlphaStep = 20; + AUDIO_PLAY_SFX(NA_SE_EN_STAR_EXPLOSION, gActors[D_i5_801BE314].sfxSource, 4); gBossActive = gLoadLevelObjects = false; } if (gCsFrameCount == 940) { player->csState++; + Play_ClearObjectData(); + player->pos.z = player->trueZpos = -(gPathProgress + 210.0f); player->pos.x = player->xPath; - func_effect_8007A568(player->pos.x - 1800.0f, -50.0f, player->pos.z + 5000.0f, 40.0f); + + Effect_Effect383_Spawn(player->pos.x - 1800.0f, -50.0f, player->pos.z + 5000.0f, 40.0f); + gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 255; gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 8; + D_ctx_80177A48[0] = 0.0f; + player->draw = true; + player->cam.at.x = gCsCamAtX = player->cam.eye.x = gCsCamEyeX = player->pos.x; player->cam.at.y = gCsCamAtY = player->pos.y + 70.0f; player->cam.eye.y = gCsCamEyeY = player->pos.y + 30.0f; player->cam.eye.z = gCsCamEyeZ = (player->trueZpos + gPathProgress) - 300.0f; player->cam.at.z = gCsCamAtZ = player->trueZpos + gPathProgress; + player->savedAlternateView = player->pathChangeTimer = 0; player->unk_190 = player->unk_194 = player->unk_188 = player->unk_18C = player->pathChangeYaw = player->yRot_114 = player->aerobaticPitch = player->camRoll = player->unk_174 = player->unk_178 = @@ -6236,23 +6953,28 @@ void Macbeth_LevelComplete2(Player* player) { player->unk_16C = player->rockAngle = player->yBob = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = player->zRotBarrelRoll = player->zRotBank = player->boostSpeed = 0.0f; + player->baseSpeed = 5.0f; + D_ctx_80177A48[3] = D_ctx_80177A48[6] = D_ctx_80177A48[7] = D_ctx_80177A48[8] = 0.0f; + player->grounded = true; player->hitTimer = 0; player->pos.y = gGroundHeight - 3.0f; player->vel.y = -3.0f; + player->rollState = player->boostCooldown = player->boostMeter = player->unk_184 = player->rot_104.y = player->rot_104.z = player->rot.y = player->rot.x = player->rot_104.x = 0.0f; player->rollInputTimerL = player->sfx.bank = 0; } break; + case 7: - if (((gGameFrameCount % 4) == 0)) { + if ((gGameFrameCount % 4) == 0) { func_effect_8007D0E0(player->pos.x - 1750.0f + RAND_FLOAT_CENTERED(700.0f), 10.0f, player->pos.z + 5000.0f + RAND_FLOAT_CENTERED(700.0f), 5.0f); - func_effect_8007C85C(player->pos.x - 1800.0f + RAND_FLOAT_CENTERED(40.0f), -100.0f, - player->pos.z + 5000.0f + RAND_FLOAT_CENTERED(40.0f), 9.0f); + Effect_Effect343_Spawn(player->pos.x - 1800.0f + RAND_FLOAT_CENTERED(40.0f), -100.0f, + player->pos.z + 5000.0f + RAND_FLOAT_CENTERED(40.0f), 9.0f); } if ((gCsFrameCount >= 1059) && (gCsFrameCount < 2120)) { @@ -6284,18 +7006,21 @@ void Macbeth_LevelComplete2(Player* player) { Math_SmoothStepToF(&player->unk_170, 2.0f, 1.0f, 0.3f, 0.0f); Math_SmoothStepToF(&player->unk_16C, 2.0f, 1.0f, 0.3f, 0.0f); if ((gCsFrameCount >= 2165) && (gCsFrameCount <= 2180)) { - func_effect_8007BC7C(player->pos.x + RAND_FLOAT_CENTERED(30.0f), 0.0f, - RAND_FLOAT_CENTERED(30.0f) + player->trueZpos, RAND_FLOAT(2.0f) + 3.5f); - func_effect_8007BC7C(player->pos.x - RAND_FLOAT_CENTERED(30.0f), 0.0f, - RAND_FLOAT_CENTERED(30.0f) + player->trueZpos, RAND_FLOAT(2.0f) + 3.5f); + Effect_Effect362_Spawn(player->pos.x + RAND_FLOAT_CENTERED(30.0f), 0.0f, + RAND_FLOAT_CENTERED(30.0f) + player->trueZpos, RAND_FLOAT(2.0f) + 3.5f); + Effect_Effect362_Spawn(player->pos.x - RAND_FLOAT_CENTERED(30.0f), 0.0f, + RAND_FLOAT_CENTERED(30.0f) + player->trueZpos, RAND_FLOAT(2.0f) + 3.5f); } Math_SmoothStepToF(&D_ctx_80177A48[7], 4.5f, 0.1f, 0.3f, 0.0f); player->trueZpos = player->pos.z; } + func_tank_80045130(player); func_tank_80044868(player); func_tank_800444BC(player); + Player_UpdatePath(player); + if (gCsFrameCount >= 2175) { Math_SmoothStepToF(&gCsCamAtZ, gActors[3].obj.pos.z + gPathProgress - 300.0f, 0.1f, 20.0f, 0.0f); Math_SmoothStepToF(&gCsCamAtY, gActors[3].obj.pos.y + 100.0f, 0.1f, 10.0f, 0.0f); @@ -6310,12 +7035,15 @@ void Macbeth_LevelComplete2(Player* player) { case 973: gLevelClearScreenTimer = 100; break; + case 340: Radio_PlayMessage(gMsg_ID_17471, RCID_BOSS_MACBETH); break; + case 520: Radio_PlayMessage(gMsg_ID_17472, RCID_BOSS_MACBETH); break; + case 710: case 800: case 820: @@ -6326,17 +7054,21 @@ void Macbeth_LevelComplete2(Player* player) { D_ctx_80177A48[4] = -90.0f; D_ctx_80177A48[5] = 360.0f; break; + case 910: AUDIO_PLAY_BGM(NA_BGM_COURSE_CLEAR); break; + case 1040: Radio_PlayMessage(gMsg_ID_20010, RCID_FOX); break; + case 1060: if (gTeamShields[TEAM_ID_SLIPPY] > 0) { Macbeth_801AF27C(&gActors[5], 0); } break; + case 1130: switch (gTeamShields[TEAM_ID_SLIPPY]) { case 0: @@ -6350,14 +7082,17 @@ void Macbeth_LevelComplete2(Player* player) { break; } break; + case 1240: if (gTeamShields[TEAM_ID_PEPPY] > 0) { Macbeth_801AF27C(&gActors[6], 1); } break; + case 1310: D_i5_801BA888 = 220.0f; break; + case 1350: switch (gTeamShields[TEAM_ID_PEPPY]) { case 0: @@ -6371,24 +7106,29 @@ void Macbeth_LevelComplete2(Player* player) { break; } break; + case 1420: if (gLeveLClearStatus[LEVEL_ZONESS] != 0) { Macbeth_801AF44C(); } break; + case 1460: D_i5_801BA88C = 170.0f; break; + case 1500: if (gLeveLClearStatus[LEVEL_ZONESS] != 0) { Radio_PlayMessage(gMsg_ID_17300, RCID_KATT); } break; + case 1640: if (gTeamShields[TEAM_ID_FALCO] > 0) { Macbeth_801AF27C(&gActors[7], 2); } break; + case 1660: switch (gTeamShields[TEAM_ID_FALCO]) { case 0: @@ -6402,41 +7142,52 @@ void Macbeth_LevelComplete2(Player* player) { break; } break; + case 1661: D_i5_801BA86C = -0.5f; break; + case 1810: Object_Kill(&gActors[8].obj, gActors[8].sfxSource); gSceneSetup = 1; break; + case 1817: gShowLevelClearStatusScreen = 1; break; + case 1960: Macbeth_801AF27C(&gActors[3], 3); gActors[3].info.hitbox = SEGMENTED_TO_VIRTUAL(gNoHitbox); break; + case 2017: gShowLevelClearStatusScreen = 0; break; + case 2040: gActors[5].state++; break; + case 2080: gActors[6].state++; break; + case 2130: gActors[7].state++; break; + case 2160: gProjectFar = 30000.0f; player->hideShadow = true; Audio_StopPlayerNoise(0); AUDIO_PLAY_SFX(NA_SE_TANK_GO_UP, player->sfxSource, 0); break; + case 2310: gActors[3].state++; break; + case 2440: SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 60); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 60); @@ -6452,19 +7203,24 @@ void Macbeth_LevelComplete2(Player* player) { } else { Math_SmoothStepToF(&player->yRot_114, 0.0f, 0.03f, 0.5f, 0.0001f); } + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 20000.0f, 0); Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 20000.0f, 0); Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 20000.0f, 0); Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], 20000.0f, 0); Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], 20000.0f, 0); Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 20000.0f, 0); + player->cam.at.y += zeroVar; + if (player->csState >= 6) { player->cam.eye.y += gCameraShakeY * 10.0f; } + if (gCsFrameCount > 2500) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; gFillScreenAlphaTarget = 255; + if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; gFadeoutType = 4; @@ -6475,171 +7231,205 @@ void Macbeth_LevelComplete2(Player* player) { } } -void Macbeth_801B28BC(Actor* actor) { +void Macbeth_801B28BC(ActorCutscene* this) { Vec3f sp5C; Vec3f sp50; Vec3f sp44; - Player* player; + Player* player = &gPlayer[0]; f32 sp3C; - player = &gPlayer[0]; - actor->fwork[7] += 3.0f; - actor->rot_0F4.z = SIN_DEG(actor->fwork[7]) * 1.5f; - actor->fwork[8] += 2.0f; - sp3C = SIN_DEG(actor->fwork[8]) * 10.0f; + this->fwork[7] += 3.0f; + this->rot_0F4.z = SIN_DEG(this->fwork[7]) * 1.5f; + this->fwork[8] += 2.0f; + sp3C = SIN_DEG(this->fwork[8]) * 10.0f; - switch (actor->state) { + switch (this->state) { case 10: - actor->fwork[3] += D_i5_801BA864; - Matrix_RotateY(gCalcMatrix, actor->fwork[3] * M_DTOR, MTXF_NEW); + this->fwork[3] += D_i5_801BA864; + + Matrix_RotateY(gCalcMatrix, this->fwork[3] * M_DTOR, MTXF_NEW); + sp5C.x = 0.0f; sp5C.y = D_i5_801BA884; sp5C.z = D_i5_801BA894[4]; + Math_SmoothStepToF(&D_i5_801BA894[4], 100.0f, 0.05f, 0.5f, 0.01f); Matrix_MultVec3f(gCalcMatrix, &sp5C, &sp44); - actor->fwork[0] = sp44.x; - actor->fwork[1] = sp44.y; - actor->fwork[2] = sp44.z - 100.0f; - Math_SmoothStepToF(&actor->obj.rot.z, SIN_DEG(actor->fwork[3]) * -30.0f, 0.1f, 2.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.pos.x, actor->fwork[0] + player->pos.x, 0.03f, 10.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.pos.y, actor->fwork[1] + player->pos.y + sp3C, 0.03f, 10.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.pos.z, actor->fwork[2] + player->trueZpos, 0.03f, 10.0f, 0.0f); + + this->fwork[0] = sp44.x; + this->fwork[1] = sp44.y; + this->fwork[2] = sp44.z - 100.0f; + + Math_SmoothStepToF(&this->obj.rot.z, SIN_DEG(this->fwork[3]) * -30.0f, 0.1f, 2.0f, 0.0f); + Math_SmoothStepToF(&this->obj.pos.x, this->fwork[0] + player->pos.x, 0.03f, 10.0f, 0.0f); + Math_SmoothStepToF(&this->obj.pos.y, this->fwork[1] + player->pos.y + sp3C, 0.03f, 10.0f, 0.0f); + Math_SmoothStepToF(&this->obj.pos.z, this->fwork[2] + player->trueZpos, 0.03f, 10.0f, 0.0f); break; + case 11: - AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); - actor->timer_0BC = 10; - actor->state++; - actor->fwork[29] = 5.0f; + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, this->sfxSource, 0); + this->timer_0BC = 10; + this->state++; + this->fwork[29] = 5.0f; /* fallthrough */ case 12: - Math_SmoothStepToF(&actor->obj.rot.z, 0.0f, 0.1f, 2.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.pos.x, player->pos.x - 150.0f, 0.1f, 1.0f, 0.0f); - actor->iwork[11] = 2; - Math_SmoothStepToF(&actor->fwork[9], 20.0f, 0.1f, 2.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.rot.z, 0.0f, 0.1f, 1.0f, 0.0f); - if (actor->timer_0BC <= 0) { - actor->timer_0BC = 10; - actor->state++; + Math_SmoothStepToF(&this->obj.rot.z, 0.0f, 0.1f, 2.0f, 0.0f); + Math_SmoothStepToF(&this->obj.pos.x, player->pos.x - 150.0f, 0.1f, 1.0f, 0.0f); + + this->iwork[11] = 2; + + Math_SmoothStepToF(&this->fwork[9], 20.0f, 0.1f, 2.0f, 0.0f); + Math_SmoothStepToF(&this->obj.rot.z, 0.0f, 0.1f, 1.0f, 0.0f); + + if (this->timer_0BC <= 0) { + this->timer_0BC = 10; + this->state++; } break; + case 13: - Math_SmoothStepToF(&actor->obj.pos.x, player->pos.x - 150.0f, 0.1f, 2.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.rot.x, -120.0f, 0.1f, 5.0f, 0.0f); - Math_SmoothStepToF(&actor->fwork[9], -20.0f, 0.05f, 0.2f, 0.0f); - actor->fwork[29] = 3.0f; - if (actor->timer_0BC <= 0) { - actor->state++; + Math_SmoothStepToF(&this->obj.pos.x, player->pos.x - 150.0f, 0.1f, 2.0f, 0.0f); + Math_SmoothStepToF(&this->obj.rot.x, -120.0f, 0.1f, 5.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[9], -20.0f, 0.05f, 0.2f, 0.0f); + + this->fwork[29] = 3.0f; + if (this->timer_0BC <= 0) { + this->state++; } break; + case 14: - Math_SmoothStepToF(&actor->obj.pos.x, player->pos.x - 150.0f, 0.1f, 3.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.rot.x, -120.0f, 0.1f, 5.0f, 0.0f); - Math_SmoothStepToF(&actor->fwork[9], 22.0f, 0.05f, 0.2f, 0.0f); - if (actor->obj.rot.x <= -115.0f) { - Math_SmoothStepToF(&actor->obj.rot.z, 800.0f, 0.1f, 18.0f, 0.0f); - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, MTXF_APPLY); + Math_SmoothStepToF(&this->obj.pos.x, player->pos.x - 150.0f, 0.1f, 3.0f, 0.0f); + Math_SmoothStepToF(&this->obj.rot.x, -120.0f, 0.1f, 5.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[9], 22.0f, 0.05f, 0.2f, 0.0f); + + if (this->obj.rot.x <= -115.0f) { + Math_SmoothStepToF(&this->obj.rot.z, 800.0f, 0.1f, 18.0f, 0.0f); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); sp5C.x = 0.0f; sp5C.y = 70.0f; sp5C.z = -70.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp5C, &sp44); - func_effect_80078E50(actor->obj.pos.x + sp44.x, actor->obj.pos.y + sp44.y, actor->obj.pos.z + sp44.z, - 3.1f); + Effect_Effect393_Spawn(this->obj.pos.x + sp44.x, this->obj.pos.y + sp44.y, this->obj.pos.z + sp44.z, + 3.1f); } break; + case 15: - Math_SmoothStepToAngle(&actor->obj.rot.z, 0.0f, 0.05f, 0.05f, 0); - Math_SmoothStepToAngle(&actor->obj.rot.y, 180.0f, 1.0f, 0.3f, 0); - Math_SmoothStepToF(&actor->obj.pos.y, player->pos.y + 240.0f, 0.03f, 20.0f, 0.0f); - if (actor->obj.rot.y == 180.0f) { - actor->state++; + Math_SmoothStepToAngle(&this->obj.rot.z, 0.0f, 0.05f, 0.05f, 0); + Math_SmoothStepToAngle(&this->obj.rot.y, 180.0f, 1.0f, 0.3f, 0); + Math_SmoothStepToF(&this->obj.pos.y, player->pos.y + 240.0f, 0.03f, 20.0f, 0.0f); + + if (this->obj.rot.y == 180.0f) { + this->state++; } break; + case 16: - actor->fwork[0] += 2.0f; - actor->obj.rot.y = 180.0f - actor->fwork[0]; - Math_SmoothStepToAngle(&actor->obj.rot.z, 62.0f, 1.0f, 0.5f, 0); - if (actor->fwork[0] > 180.0f) { - actor->state++; - AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); - actor->timer_0BC = 160; - actor->fwork[29] = 5.0f; + this->fwork[0] += 2.0f; + this->obj.rot.y = 180.0f - this->fwork[0]; + + Math_SmoothStepToAngle(&this->obj.rot.z, 62.0f, 1.0f, 0.5f, 0); + + if (this->fwork[0] > 180.0f) { + this->state++; + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, this->sfxSource, 0); + this->timer_0BC = 160; + this->fwork[29] = 5.0f; } break; + case 17: - Math_SmoothStepToAngle(&actor->obj.rot.y, 345.0f, 1.0f, 0.5f, 0.01f); - Math_SmoothStepToAngle(&actor->obj.rot.x, 328.0f, 0.1f, 1.0f, 0.0f); - Math_SmoothStepToF(&actor->fwork[9], 35.0f, 0.1f, 0.5f, 0.0f); - actor->fwork[29] = 3.0f; - Math_SmoothStepToF(&actor->obj.rot.z, 405.0f, 0.1f, 10.0f, 0.0f); - if (actor->timer_0BC == 0) { - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, MTXF_APPLY); + Math_SmoothStepToAngle(&this->obj.rot.y, 345.0f, 1.0f, 0.5f, 0.01f); + Math_SmoothStepToAngle(&this->obj.rot.x, 328.0f, 0.1f, 1.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[9], 35.0f, 0.1f, 0.5f, 0.0f); + + this->fwork[29] = 3.0f; + + Math_SmoothStepToF(&this->obj.rot.z, 405.0f, 0.1f, 10.0f, 0.0f); + + if (this->timer_0BC == 0) { + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); sp5C.x = 0.0f; sp5C.y = 70.0f; sp5C.z = -70.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp5C, &sp44); - func_effect_80078E50(actor->obj.pos.x + sp44.x, actor->obj.pos.y + sp44.y, actor->obj.pos.z + sp44.z, - 3.1f); + Effect_Effect393_Spawn(this->obj.pos.x + sp44.x, this->obj.pos.y + sp44.y, this->obj.pos.z + sp44.z, + 3.1f); } break; + case 20: - Math_SmoothStepToAngle(&actor->obj.rot.x, 345.0f, 0.01f, actor->fwork[4], 0.0f); - Math_SmoothStepToF(&actor->vel.z, -300.0f, 0.1f, 0.25f, 0.0f); + Math_SmoothStepToAngle(&this->obj.rot.x, 345.0f, 0.01f, this->fwork[4], 0.0f); + Math_SmoothStepToF(&this->vel.z, -300.0f, 0.1f, 0.25f, 0.0f); break; + case 21: - Math_SmoothStepToF(&actor->obj.rot.z, 0.0f, 0.1f, 0.25f, 0.0f); - Math_SmoothStepToF(&actor->obj.pos.x, player->pos.x, 0.1f, 5.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.pos.y, 800.0f, 0.1f, 10.0f, 0.0f); + Math_SmoothStepToF(&this->obj.rot.z, 0.0f, 0.1f, 0.25f, 0.0f); + Math_SmoothStepToF(&this->obj.pos.x, player->pos.x, 0.1f, 5.0f, 0.0f); + Math_SmoothStepToF(&this->obj.pos.y, 800.0f, 0.1f, 10.0f, 0.0f); break; + case 22: - Math_SmoothStepToAngle(&actor->fwork[4], 0.25f, 0.1f, 0.005f, 0.0f); - Math_SmoothStepToAngle(&actor->obj.rot.x, 345.0f, 0.01f, actor->fwork[4], 0.0f); + Math_SmoothStepToAngle(&this->fwork[4], 0.25f, 0.1f, 0.005f, 0.0f); + Math_SmoothStepToAngle(&this->obj.rot.x, 345.0f, 0.01f, this->fwork[4], 0.0f); break; + case 30: - actor->fwork[3] += D_i5_801BA854[actor->index]; - Matrix_RotateY(gCalcMatrix, actor->fwork[3] * M_DTOR, MTXF_NEW); + this->fwork[3] += D_i5_801BA854[this->index]; + + Matrix_RotateY(gCalcMatrix, this->fwork[3] * M_DTOR, MTXF_NEW); + sp5C.x = 0.0f; - sp5C.y = D_i5_801BA874[actor->index]; - sp5C.z = D_i5_801BA894[actor->index]; - Math_SmoothStepToF(&D_i5_801BA894[actor->index], 250.0f, 0.05f, 0.5f, 0.01f); + sp5C.y = D_i5_801BA874[this->index]; + sp5C.z = D_i5_801BA894[this->index]; + + Math_SmoothStepToF(&D_i5_801BA894[this->index], 250.0f, 0.05f, 0.5f, 0.01f); Matrix_MultVec3f(gCalcMatrix, &sp5C, &sp44); - actor->fwork[0] = sp44.x; - actor->fwork[1] = sp44.y; - actor->fwork[2] = sp44.z - 100.0f; - Math_SmoothStepToF(&actor->obj.rot.z, SIN_DEG(actor->fwork[3]) * -30.0f, 0.1f, 2.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.pos.x, actor->fwork[0] + player->pos.x, 0.03f, 10.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.pos.y, actor->fwork[1] + player->pos.y + sp3C, 0.03f, 10.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.pos.z, actor->fwork[2] + player->trueZpos, 0.03f, 10.0f, 0.0f); + + this->fwork[0] = sp44.x; + this->fwork[1] = sp44.y; + this->fwork[2] = sp44.z - 100.0f; + + Math_SmoothStepToF(&this->obj.rot.z, SIN_DEG(this->fwork[3]) * -30.0f, 0.1f, 2.0f, 0.0f); + Math_SmoothStepToF(&this->obj.pos.x, this->fwork[0] + player->pos.x, 0.03f, 10.0f, 0.0f); + Math_SmoothStepToF(&this->obj.pos.y, this->fwork[1] + player->pos.y + sp3C, 0.03f, 10.0f, 0.0f); + Math_SmoothStepToF(&this->obj.pos.z, this->fwork[2] + player->trueZpos, 0.03f, 10.0f, 0.0f); break; + case 31: - AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); - actor->drawShadow = false; - actor->timer_0BC = 20; - actor->state++; - actor->fwork[29] = 5.0f; + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, this->sfxSource, 0); + this->drawShadow = false; + this->timer_0BC = 20; + this->state++; + this->fwork[29] = 5.0f; /* fallthrough */ case 32: - if (actor->timer_0BC <= 0) { - actor->drawShadow = true; + if (this->timer_0BC <= 0) { + this->drawShadow = true; } - actor->iwork[11] = 2; - Math_SmoothStepToF(&actor->obj.rot.x, -20.0f, 0.1f, 0.5f, 0.0f); - Math_SmoothStepToF(&actor->fwork[9], 25.0f, 0.1f, 2.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.rot.z, 0.0f, 0.1f, 0.5f, 0.0f); + this->iwork[11] = 2; + Math_SmoothStepToF(&this->obj.rot.x, -20.0f, 0.1f, 0.5f, 0.0f); + Math_SmoothStepToF(&this->fwork[9], 25.0f, 0.1f, 2.0f, 0.0f); + Math_SmoothStepToF(&this->obj.rot.z, 0.0f, 0.1f, 0.5f, 0.0f); break; } - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + sp5C.x = 0.0f; sp5C.y = 0.0f; - sp5C.z = actor->fwork[9]; + sp5C.z = this->fwork[9]; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp5C, &sp50); - actor->vel.x = sp50.x; - actor->vel.y = sp50.y; - actor->vel.z = sp50.z; + + this->vel.x = sp50.x; + this->vel.y = sp50.y; + this->vel.z = sp50.z; } static f32 D_i5_801BA8B4[5] = { -100.0f, 380.0f, -450.0f, 0.0f, -340.0f }; @@ -6650,63 +7440,75 @@ static f32 D_i5_801BA8DC[5] = { 500.0f, 500.0f, 600.0f, 2500.0f, 590.0f }; static f32 D_i5_801BA8F0[4] = { 90.0f, -90.0f, 0.0f, 0.0f }; -void Macbeth_801B3554(Actor* actor, s32 arg1) { - Player* player; +void Macbeth_LevelComplete1_TeamSetup(Actor* this, s32 teamIndex) { + Player* player = &gPlayer[0]; - player = &gPlayer[0]; - Actor_Initialize(actor); - actor->obj.pos.x = player->pos.x + D_i5_801BA8B4[arg1]; - actor->obj.pos.y = player->pos.y + D_i5_801BA8C8[arg1]; - actor->obj.pos.z = player->pos.z + D_i5_801BA8DC[arg1]; - actor->fwork[7] = RAND_FLOAT(360.0f); - actor->fwork[8] = RAND_FLOAT(360.0f); - actor->vel.x = player->vel.x; - actor->vel.y = player->vel.y; - actor->vel.z = player->vel.z; - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.rot.y = 180.0f; - Object_SetInfo(&actor->info, actor->obj.id); - if (arg1 < 3) { - actor->iwork[11] = 1; - actor->drawShadow = true; - actor->fwork[3] = D_i5_801BA8F0[arg1]; - actor->state = 30; - AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); + Actor_Initialize(this); + + this->obj.pos.x = player->pos.x + D_i5_801BA8B4[teamIndex]; + this->obj.pos.y = player->pos.y + D_i5_801BA8C8[teamIndex]; + this->obj.pos.z = player->pos.z + D_i5_801BA8DC[teamIndex]; + + this->fwork[7] = RAND_FLOAT(360.0f); + this->fwork[8] = RAND_FLOAT(360.0f); + + this->vel.x = player->vel.x; + this->vel.y = player->vel.y; + this->vel.z = player->vel.z; + + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_ACTOR_CUTSCENE; + this->obj.rot.y = 180.0f; + + Object_SetInfo(&this->info, this->obj.id); + + if (teamIndex < 3) { + this->iwork[11] = 1; + this->drawShadow = true; + this->fwork[3] = D_i5_801BA8F0[teamIndex]; + this->state = 30; + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); return; } - actor->animFrame = 1; - actor->state = 20; - AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); - actor->fwork[9] = 20.0f; + this->animFrame = 1; + this->state = 20; + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, this->sfxSource, 0); + this->fwork[9] = 20.0f; } static f32 D_i5_801BA900 = 90.0f; void Macbeth_801B3718(void) { - Actor* actor = &gActors[8]; + ActorCutscene* actor = &gActors[8]; Actor_Initialize(actor); actor->obj.status = OBJ_INIT; actor->obj.id = OBJ_ACTOR_CUTSCENE; + actor->obj.pos.x = gPlayer[0].pos.x + D_i5_801BA8B4[4]; actor->obj.pos.y = gPlayer[0].pos.y + D_i5_801BA8C8[4]; actor->obj.pos.z = gPlayer[0].pos.z + D_i5_801BA8DC[4]; + actor->vel.x = gPlayer[0].vel.x; actor->vel.y = gPlayer[0].vel.y; actor->vel.z = gPlayer[0].vel.z; + actor->fwork[7] = RAND_FLOAT(360.0f); actor->fwork[8] = RAND_FLOAT(360.0f); + actor->rot_0F4.y = 180.0f; actor->rot_0F4.x = 0.0f; + actor->obj.rot.x = -0.0f; actor->obj.rot.y = actor->rot_0F4.y; actor->obj.rot.z = -actor->rot_0F4.z; + actor->fwork[0] = 30.0f; actor->animFrame = 24; actor->iwork[11] = 1; actor->state = 10; actor->fwork[3] = D_i5_801BA900; + Object_SetInfo(&actor->info, actor->obj.id); AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } @@ -6724,7 +7526,8 @@ void Macbeth_801B38E0(void) { } for (i = 0; i < ARRAY_COUNT(gScenery); i++) { - if ((gScenery[i].obj.id <= OBJ_SCENERY_91) || (gScenery[i].obj.id >= OBJ_SCENERY_97)) { + if ((gScenery[i].obj.id <= OBJ_SCENERY_MA_RAILROAD_SWITCH_8) || + (gScenery[i].obj.id >= OBJ_SCENERY_MA_TRAIN_TRACK_6)) { Object_Kill(&gScenery[i].obj, gScenery[i].sfxSource); Scenery_Initialize(&gScenery[i]); } @@ -6770,9 +7573,9 @@ void Macbeth_801B38E0(void) { } for (i = 0; i < 2; i++) { - gActor194Status[i] = 0; + gMeMoraStatus[i] = 0; for (j = 0; j < 100; j++) { - gActor194yPos[i][j] = -5000.0f; + gMeMoraYpos[i][j] = -5000.0f; } } } @@ -6783,6 +7586,7 @@ void Macbeth_LevelComplete1(Player* player) { gCsCamEyeX = player->pos.x; gCsCamEyeY = player->pos.y; gCsCamEyeZ = player->pos.z + player->zPath + 50.0f; + switch (player->csState) { case 0: gCsFrameCount = gBossActive = gLoadLevelObjects = 1; @@ -6791,38 +7595,49 @@ void Macbeth_LevelComplete1(Player* player) { D_i5_801BA894[2] = D_i5_801BA894[4]; D_i5_801BA894[1] = D_i5_801BA894[4]; D_i5_801BA894[0] = D_i5_801BA894[4]; + gFillScreenRed = 255; gFillScreenGreen = 255; gFillScreenBlue = 255; gFillScreenAlpha = gFillScreenAlphaTarget = D_ctx_80177A10[9] = 0; + D_ctx_80177A48[0] = 0.0f; + player->csState++; /* fallthrough */ case 1: D_i5_801BE240 = 2000.0f; D_i5_801BE244 = 2000.0f; D_i5_801BE248 = 2000.0f; + Math_SmoothStepToF(D_ctx_80177A48, 0.1f, 1.0f, 0.01f, 0.0f); Math_SmoothStepToF(&player->baseSpeed, 4.9f, 0.1f, 1.0f, 0.0f); Math_SmoothStepToF(&player->camDist, 0.0f, 0.1f, 1.0f, 0.0f); + gCsCamEyeX = player->pos.x; gCsCamEyeY = player->pos.y; gCsCamEyeZ = player->pos.z + player->zPath + 50.0f; + if (gCsCamEyeY < 5.0f) { gCsCamEyeY = 5.0f; } + gCsCamAtX = player->pos.x; gCsCamAtY = player->pos.y + 30.0f; gCsCamAtZ = player->pos.z + player->zPath; + gFillScreenRed = 255; gFillScreenGreen = 255; gFillScreenBlue = 255; + if (D_ctx_80177A10[9] >= 248) { D_ctx_80177A10[9] = 255; } else { D_ctx_80177A10[9] += 8; } + gFillScreenAlpha = gFillScreenAlphaTarget = D_ctx_80177A10[9]; + if (gCsFrameCount > 40) { D_ctx_80177A10[9] = 255; player->cam.eye.x = gCsCamEyeX = 0.0f; @@ -6844,16 +7659,20 @@ void Macbeth_LevelComplete1(Player* player) { Player_CollisionCheck(player); Player_UpdatePath(player); break; + case 2: Math_SmoothStepToF(D_ctx_80177A48, 0.01f, 0.1f, 0.01f, 0.0f); + gCsCamEyeX = gCsCamAtX = player->pos.x; gCsCamEyeY = 3520.0f; gCsCamAtY = 0.0f; gCsCamEyeZ = 350.0f; gCsCamAtZ = -300.0f; + D_i5_801BE240 = 2.0f; D_i5_801BE244 = 2.0f; D_i5_801BE248 = 2.0f; + if (gCsFrameCount > 85) { gFillScreenAlphaTarget = gFillScreenAlpha = D_ctx_80177A10[9]; D_ctx_80177A10[9] -= 10; @@ -6862,13 +7681,16 @@ void Macbeth_LevelComplete1(Player* player) { player->csState = 10; } } + func_tank_80045130(player); func_tank_80044868(player); func_tank_80045678(player); func_tank_80045E7C(player); + Player_CollisionCheck(player); Player_UpdatePath(player); break; + case 10: player->csState = 11; player->gravity = 3.0f; @@ -6876,10 +7698,12 @@ void Macbeth_LevelComplete1(Player* player) { /* fallthrough */ case 11: Math_SmoothStepToF(D_ctx_80177A48, 0.01f, 0.1f, 0.01f, 0.0f); + gCsCamEyeX = gCsCamAtX = player->pos.x; gCsCamEyeY = 3520.0f; gCsCamAtY = 0.0f; gCsCamEyeZ = 350.0f; + if (gCsFrameCount < 1265) { gCsCamAtZ = -300.0f; } else { @@ -6897,39 +7721,50 @@ void Macbeth_LevelComplete1(Player* player) { Math_SmoothStepToF(&D_i5_801BE244, 1.5f, 0.1f, 0.05f, 0.01f); Math_SmoothStepToF(&D_i5_801BE248, 2.0f, 0.1f, 0.1f, 0.01f); } + Math_SmoothStepToF(&player->baseSpeed, 4.9f, 0.1f, 1.0f, 0.0f); Math_SmoothStepToF(&player->camDist, 0.0f, 0.1f, 1.0f, 0.0f); + func_tank_80045130(player); func_tank_80044868(player); func_tank_80045678(player); func_tank_80045E7C(player); + Player_CollisionCheck(player); Player_UpdatePath(player); break; + case 12: break; } + switch (gCsFrameCount) { case 755: gShowLevelClearStatusScreen = 1; break; + case 1025: gShowLevelClearStatusScreen = 0; break; + case 50: AUDIO_PLAY_BGM(NA_BGM_COURSE_CLEAR); break; + case 100: gLevelClearScreenTimer = 100; break; + case 160: Radio_PlayMessage(gMsg_ID_20010, RCID_FOX); break; + case 230: if (gTeamShields[TEAM_ID_SLIPPY] > 0.0f) { - Macbeth_801B3554(&gActors[0], 0); + Macbeth_LevelComplete1_TeamSetup(&gActors[0], 0); } break; + case 260: switch (gTeamShields[TEAM_ID_SLIPPY]) { case 0: @@ -6943,11 +7778,13 @@ void Macbeth_LevelComplete1(Player* player) { break; } break; + case 380: if (gTeamShields[TEAM_ID_PEPPY] > 0.0f) { - Macbeth_801B3554(&gActors[1], 1); + Macbeth_LevelComplete1_TeamSetup(&gActors[1], 1); } break; + case 410: switch (gTeamShields[TEAM_ID_PEPPY]) { case 0: @@ -6961,11 +7798,13 @@ void Macbeth_LevelComplete1(Player* player) { break; } break; + case 530: if (gTeamShields[TEAM_ID_FALCO] > 0.0f) { - Macbeth_801B3554(&gActors[2], 2); + Macbeth_LevelComplete1_TeamSetup(&gActors[2], 2); } break; + case 560: switch (gTeamShields[TEAM_ID_FALCO]) { case 0: @@ -6979,30 +7818,37 @@ void Macbeth_LevelComplete1(Player* player) { break; } break; + case 680: if (gLeveLClearStatus[LEVEL_ZONESS] != 0) { Macbeth_801B3718(); } break; + case 1027: if (gLeveLClearStatus[LEVEL_ZONESS] != 0) { Radio_PlayMessage(gMsg_ID_17350, RCID_KATT); } break; + case 1065: if (gLeveLClearStatus[LEVEL_ZONESS] != 0) { gActors[8].state++; } break; + case 1157: gActors[0].state++; break; + case 1136: gActors[1].state++; break; + case 1197: gActors[2].state++; break; + case 1158: if (gLeveLClearStatus[LEVEL_ZONESS] != 0) { Object_Kill(&gActors[8].obj, gActors[8].sfxSource); @@ -7011,8 +7857,9 @@ void Macbeth_LevelComplete1(Player* player) { case 1195: gSceneSetup = 1; break; + case 1200: - Macbeth_801B3554(&gActors[3], 3); + Macbeth_LevelComplete1_TeamSetup(&gActors[3], 3); gLoadLevelObjects = 0; break; } @@ -7022,10 +7869,11 @@ void Macbeth_LevelComplete1(Player* player) { Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[0], D_i5_801BE240, 0.0f); Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[0], D_i5_801BE244, 0.0f); Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], D_i5_801BE248, 0.0f); + player->cam.at.y += zeroVar; if ((gCsFrameCount >= 850) && ((gGameFrameCount % 16) == 0)) { - Macbeth_801ACF6C(); + Macbeth_EffectClouds_Spawn(); } if (gCsFrameCount == 1220) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 60); diff --git a/src/overlays/ovl_i5/fox_ti.c b/src/overlays/ovl_i5/fox_ti.c index 3f82e728..87c763f2 100644 --- a/src/overlays/ovl_i5/fox_ti.c +++ b/src/overlays/ovl_i5/fox_ti.c @@ -79,72 +79,72 @@ void Titania_80188F30(void) { D_MA_801BA1E8 = 99; } -void Titania_Effect368_Update(Effect* effect) { - if (effect->timer_50 == 0) { - effect->unk_44 -= 16; - if (effect->unk_44 < 17) { - Object_Kill(&effect->obj, effect->sfxSource); +void Titania_Effect368_Update(Effect368* this) { + if (this->timer_50 == 0) { + this->unk_44 -= 16; + if (this->unk_44 < 17) { + Object_Kill(&this->obj, this->sfxSource); } } } -void Titania_Effect368_Draw(Effect* effect) { - Matrix_Scale(gGfxMatrix, effect->scale2 * 0.5f, effect->scale2, effect->scale2, MTXF_APPLY); +void Titania_Effect368_Draw(Effect368* this) { + Matrix_Scale(gGfxMatrix, this->scale2 * 0.5f, this->scale2, this->scale2, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, -(M_DTOR * 90), MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, effect->unk_44); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, this->unk_44); gSPDisplayList(gMasterDisp++, D_landmaster_3007E70); } -void Titania_80189090(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yRot, f32 scale2) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_368; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; - effect->obj.rot.y = yRot; - effect->scale2 = scale2; - effect->timer_50 = 25; - effect->unk_44 = 255; - Object_SetInfo(&effect->info, effect->obj.id); +void Titania_Effect368_Setup(Effect368* this, f32 xPos, f32 yPos, f32 zPos, f32 yRot, f32 scale2) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_368; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + this->obj.rot.y = yRot; + this->scale2 = scale2; + this->timer_50 = 25; + this->unk_44 = 255; + Object_SetInfo(&this->info, this->obj.id); } -void Titania_80189120(f32 xPos, f32 yPos, f32 zPos, f32 yRot, f32 scale2) { +void Titania_Effect368_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 yRot, f32 scale2) { s32 i; for (i = 50; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { - Titania_80189090(&gEffects[i], xPos, yPos, zPos, yRot, scale2); + Titania_Effect368_Setup(&gEffects[i], xPos, yPos, zPos, yRot, scale2); break; } } } -void Titania_Actor224_Update(Actor* actor) { - Ground_801B49D0(actor); +void Titania_TiTerrain_Update(TiTerrain* this) { + Ground_801B49D0(this); } static Vec3f D_i5_801B7520 = { -150.0f, 0.0f, 0.0f }; -void Titania_801891B4(s32 limbIndex, Vec3f* rot, void* data) { - Actor* actor = (Actor*) data; +void Titania_TiDesertRover_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* data) { + TiDesertRover* this = (TiDesertRover*) data; if (limbIndex == 2) { - Matrix_MultVec3f(gCalcMatrix, &D_i5_801B7520, (Vec3f*) &actor->fwork[0]); + Matrix_MultVec3f(gCalcMatrix, &D_i5_801B7520, (Vec3f*) &this->fwork[0]); } } -void Titania_801891F4(Actor* actor) { +void Titania_801891F4(TiDesertRover* this) { f32 temp_fs0; f32 temp_fs1; f32 var_fv1; f32 temp; f32 temp2; - temp_fs0 = gPlayer[0].pos.x - actor->obj.pos.x; - temp_fs1 = (gPlayer[0].trueZpos + gPlayer[0].camDist) - actor->obj.pos.z; + temp_fs0 = gPlayer[0].pos.x - this->obj.pos.x; + temp_fs1 = (gPlayer[0].trueZpos + gPlayer[0].camDist) - this->obj.pos.z; var_fv1 = Math_RadToDeg(Math_Atan2F(temp_fs0, temp_fs1)); @@ -155,15 +155,15 @@ void Titania_801891F4(Actor* actor) { var_fv1 = 315.0f; } - Math_SmoothStepToAngle(&actor->obj.rot.y, var_fv1, 0.2f, 6.0f, 0.01f); - temp_fs0 = (actor->obj.pos.x + actor->fwork[0]) - gPlayer[0].pos.x; - temp2 = (actor->obj.pos.y + actor->fwork[1]) - (gPlayer[0].pos.y + 30.0f); - temp_fs1 = ((actor->obj.pos.z + actor->fwork[2]) - gPlayer[0].trueZpos) + gPlayer[0].camDist; + Math_SmoothStepToAngle(&this->obj.rot.y, var_fv1, 0.2f, 6.0f, 0.01f); + temp_fs0 = (this->obj.pos.x + this->fwork[0]) - gPlayer[0].pos.x; + temp2 = (this->obj.pos.y + this->fwork[1]) - (gPlayer[0].pos.y + 30.0f); + temp_fs1 = ((this->obj.pos.z + this->fwork[2]) - gPlayer[0].trueZpos) + gPlayer[0].camDist; temp = sqrtf(SQ(temp_fs0) + SQ(temp_fs1)); - Math_SmoothStepToAngle(&actor->fwork[5], Math_RadToDeg(Math_Atan2F(temp2, temp)), 0.2f, 5.0f, 0.01f); + Math_SmoothStepToAngle(&this->fwork[5], Math_RadToDeg(Math_Atan2F(temp2, temp)), 0.2f, 5.0f, 0.01f); } -void Titania_80189380(Actor* actor) { +void Titania_80189380(TiDesertRover* this) { Vec3f sp8C; Vec3f sp80; Vec3f sp74; @@ -173,37 +173,37 @@ void Titania_80189380(Actor* actor) { Vec3f sp44; Vec3f pad; - sp50.x = actor->fwork[0]; - sp50.y = actor->fwork[1]; - sp50.z = actor->fwork[2]; + sp50.x = this->fwork[0]; + sp50.y = this->fwork[1]; + sp50.z = this->fwork[2]; - sp44.x = gPlayer[0].pos.x - actor->obj.pos.x; - sp44.y = gPlayer[0].pos.y - actor->obj.pos.y; - sp44.z = gPlayer[0].pos.z - actor->obj.pos.z; + sp44.x = gPlayer[0].pos.x - this->obj.pos.x; + sp44.y = gPlayer[0].pos.y - this->obj.pos.y; + sp44.z = gPlayer[0].pos.z - this->obj.pos.z; - Matrix_RotateZ(gCalcMatrix, -actor->obj.rot.z * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -actor->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gCalcMatrix, -actor->obj.rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, -this->obj.rot.z * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -this->obj.rot.y * M_DTOR, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &sp44, &sp8C); - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &sp50, &sp8C); - sp80.x = actor->obj.pos.x + sp8C.x; - sp80.y = actor->obj.pos.y + sp8C.y; - sp80.z = actor->obj.pos.z + sp8C.z; + sp80.x = this->obj.pos.x + sp8C.x; + sp80.y = this->obj.pos.y + sp8C.y; + sp80.z = this->obj.pos.z + sp8C.z; - sp74.x = actor->fwork[5]; - sp74.y = actor->obj.rot.y; + sp74.x = this->fwork[5]; + sp74.y = this->obj.rot.y; sp74.z = 0.0f; - sp68.x = actor->obj.rot.x; - sp68.y = actor->obj.rot.y; - sp68.z = actor->obj.rot.z; + sp68.x = this->obj.rot.x; + sp68.y = this->obj.rot.y; + sp68.z = this->obj.rot.z; sp5C.x = 0.0f; sp5C.y = 0.0f; @@ -217,133 +217,135 @@ void Titania_80189380(Actor* actor) { static Vec3f D_i5_801B752C = { -50.0f, 0.0f, -20.0f }; static Vec3f D_i5_801B7538 = { 50.0f, 0.0f, -20.0f }; -void Titania_Actor226_Update(Actor* actor) { +void Titania_TiDesertRover_Update(TiDesertRover* this) { Vec3f sp54; Vec3f sp48; f32 sp44; f32 sp40; f32 sp3C; - actor->iwork[2]++; + this->iwork[2]++; - switch (actor->state) { + switch (this->state) { case 0: - AUDIO_PLAY_SFX(NA_SE_EN_TANK_ENGINE, actor->sfxSource, 4); - if (actor->obj.rot.z > 1.0f) { - actor->iwork[0] = 1; + AUDIO_PLAY_SFX(NA_SE_EN_TANK_ENGINE, this->sfxSource, 4); + if (this->obj.rot.z > 1.0f) { + this->iwork[0] = 1; } - actor->state = 1; + this->state = 1; /* fallthrough */ case 1: - actor->fwork[7] = 20.0f; - if (fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 3000.0f) { - actor->state = 2; - actor->timer_0BC = 30; + this->fwork[7] = 20.0f; + if (fabsf(this->obj.pos.z - gPlayer[0].trueZpos) < 3000.0f) { + this->state = 2; + this->timer_0BC = 30; } break; case 2: - if (actor->iwork[0] == 1) { - actor->fwork[7] = 5.0f; - if (fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 200.0f) { - actor->fwork[7] = 0.0f; + if (this->iwork[0] == 1) { + this->fwork[7] = 5.0f; + if (fabsf(this->obj.pos.z - gPlayer[0].trueZpos) < 200.0f) { + this->fwork[7] = 0.0f; } - Titania_801891F4(actor); + Titania_801891F4(this); } - if (actor->timer_0BC == 0) { - actor->timer_0BC = 40; - Titania_80189380(actor); - if ((fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) > 200.0f) && (actor->iwork[0] == 1)) { - actor->fwork[6] = -10.0f; + + if (this->timer_0BC == 0) { + this->timer_0BC = 40; + Titania_80189380(this); + if ((fabsf(this->obj.pos.z - gPlayer[0].trueZpos) > 200.0f) && (this->iwork[0] == 1)) { + this->fwork[6] = -10.0f; } } break; } - Ground_801B6E20(actor->obj.pos.x, actor->obj.pos.z + gPathProgress, &sp44, &sp3C, &sp40); - actor->obj.pos.y = sp3C; + Ground_801B6E20(this->obj.pos.x, this->obj.pos.z + gPathProgress, &sp44, &sp3C, &sp40); + this->obj.pos.y = sp3C; - if (actor->obj.rot.x < sp44 * M_RTOD) { - actor->obj.rot.x += 2.0f; + if (this->obj.rot.x < sp44 * M_RTOD) { + this->obj.rot.x += 2.0f; } - if (sp44 * M_RTOD < actor->obj.rot.x) { - actor->obj.rot.x -= 2.0f; + if (sp44 * M_RTOD < this->obj.rot.x) { + this->obj.rot.x -= 2.0f; } - if (actor->obj.rot.z < sp40 * M_RTOD) { - actor->obj.rot.z += 2.0f; + if (this->obj.rot.z < sp40 * M_RTOD) { + this->obj.rot.z += 2.0f; } - if (sp40 * M_RTOD < actor->obj.rot.z) { - actor->obj.rot.z -= 2.0f; + if (sp40 * M_RTOD < this->obj.rot.z) { + this->obj.rot.z -= 2.0f; } - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_Push(&gCalcMatrix); - if (((actor->iwork[2] % 2) == 0) && ((actor->obj.pos.z + gPathProgress) > -3800.0f)) { - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, MTXF_APPLY); + if (((this->iwork[2] % 2) == 0) && ((this->obj.pos.z + gPathProgress) > -3800.0f)) { + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_i5_801B752C, &sp48); - Titania_80189120(actor->obj.pos.x + sp48.x, actor->obj.pos.y + sp48.y, actor->obj.pos.z + sp48.z, - actor->obj.pos.y, 1.3f); + Titania_Effect368_Spawn(this->obj.pos.x + sp48.x, this->obj.pos.y + sp48.y, this->obj.pos.z + sp48.z, + this->obj.pos.y, 1.3f); Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_i5_801B7538, &sp48); - Titania_80189120(actor->obj.pos.x + sp48.x, actor->obj.pos.y + sp48.y, actor->obj.pos.z + sp48.z, - actor->obj.pos.y, 1.3f); + Titania_Effect368_Spawn(this->obj.pos.x + sp48.x, this->obj.pos.y + sp48.y, this->obj.pos.z + sp48.z, + this->obj.pos.y, 1.3f); } - Math_SmoothStepToF(&actor->fwork[6], actor->fwork[7], 0.1f, 2.0f, 0.00001f); + Math_SmoothStepToF(&this->fwork[6], this->fwork[7], 0.1f, 2.0f, 0.00001f); Matrix_Pop(&gCalcMatrix); sp54.x = 0.0f; sp54.y = 0.0f; - sp54.z = actor->fwork[6]; + sp54.z = this->fwork[6]; Matrix_MultVec3f(gCalcMatrix, &sp54, &sp48); - actor->vel.x = sp48.x; - actor->vel.y = sp48.y; - actor->vel.z = sp48.z; + this->vel.x = sp48.x; + this->vel.y = sp48.y; + this->vel.z = sp48.z; - if (actor->dmgType > DMG_NONE) { + if (this->dmgType > DMG_NONE) { if (Rand_ZeroOne() <= 0.25f) { - actor->itemDrop = DROP_SILVER_RING_50p; + this->itemDrop = DROP_SILVER_RING_50p; } else { - actor->itemDrop = DROP_NONE; + this->itemDrop = DROP_NONE; } - Actor_Despawn(actor); - actor->info.bonus = 0; - func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z, 8.0f); - func_effect_8007C120(actor->obj.pos.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z, actor->vel.x, actor->vel.y, - actor->vel.z, 0.1f, 30); - Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); - Object_Kill(&actor->obj, actor->sfxSource); + Actor_Despawn(this); + this->info.bonus = 0; + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y + 30.0f, this->obj.pos.z, 8.0f); + Effect_Effect390_Spawn(this->obj.pos.x, this->obj.pos.y + 30.0f, this->obj.pos.z, this->vel.x, this->vel.y, + this->vel.z, 0.1f, 30); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); + Object_Kill(&this->obj, this->sfxSource); } } -void Titania_Actor226_Draw(Actor* actor) { - Animation_GetFrameData(&D_TI1_700C8D8, 0, actor->vwork); - actor->vwork[3].z = actor->fwork[5] + 270.0f; - Animation_DrawSkeleton(1, D_TI1_700C964, actor->vwork, NULL, Titania_801891B4, actor, &gIdentityMatrix); +void Titania_TiDesertRover_Draw(TiDesertRover* this) { + Animation_GetFrameData(&aTi1DesertRoverAnim, 0, this->vwork); + this->vwork[3].z = this->fwork[5] + 270.0f; + Animation_DrawSkeleton(1, aTi1DesertRoverSkel, this->vwork, NULL, Titania_TiDesertRover_PostLimbDraw, this, + &gIdentityMatrix); } static Vec3f D_i5_801B7544 = { 0.0f, -50.0f, 178.0f }; -void Titania_80189B80(Actor* actor) { +void Titania_TiFekuda_Init(TiFekuda* this) { f32 sp2C; - Ground_801B6E20(actor->obj.pos.x, actor->obj.pos.z + gPathProgress, &sp2C, &actor->obj.pos.y, &sp2C); - actor->health = 10; - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_TI_60068F0); - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, MTXF_APPLY); - Matrix_MultVec3f(gCalcMatrix, &D_i5_801B7544, (Vec3f*) &actor->fwork[0]); - actor->fwork[0] += actor->obj.pos.x; - actor->fwork[1] += actor->obj.pos.y; - actor->fwork[2] += actor->obj.pos.z; + Ground_801B6E20(this->obj.pos.x, this->obj.pos.z + gPathProgress, &sp2C, &this->obj.pos.y, &sp2C); + this->health = 10; + this->info.hitbox = SEGMENTED_TO_VIRTUAL(aTiFekudaHitbox); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_MultVec3f(gCalcMatrix, &D_i5_801B7544, (Vec3f*) &this->fwork[0]); + this->fwork[0] += this->obj.pos.x; + this->fwork[1] += this->obj.pos.y; + this->fwork[2] += this->obj.pos.z; } -void Titania_Actor233_Update(Actor* actor) { +void Titania_TiFekuda_Update(TiFekuda* this) { static Vec3f D_i5_801B7550 = { 0.0f, -50.0f, 178.0f }; static Vec3f D_i5_801B755C = { 0.0f, 0.0f, 90.0f }; Vec3f sp64; @@ -352,271 +354,270 @@ void Titania_Actor233_Update(Actor* actor) { Vec3f sp40; f32 temp; - if (actor->health > 0) { - if (actor->dmgType != DMG_NONE) { - actor->dmgType = DMG_NONE; - actor->timer_0C6 = 15; - actor->health -= actor->damage; - if (actor->health <= 0) { - actor->health = 0; - AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_S, actor->sfxSource, 4); - actor->lockOnTimers[TEAM_ID_FOX] = actor->itemDrop = 0; - actor->info.targetOffset = 0.0f; - Actor_Despawn(actor); - actor->info.bonus = 0; - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_TI_6006924); - func_effect_8007D0E0(actor->fwork[0], actor->fwork[1], actor->fwork[2], 2.0f); + if (this->health > 0) { + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + this->timer_0C6 = 15; + this->health -= this->damage; + if (this->health <= 0) { + this->health = 0; + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_S, this->sfxSource, 4); + this->lockOnTimers[TEAM_ID_FOX] = this->itemDrop = 0; + this->info.targetOffset = 0.0f; + Actor_Despawn(this); + this->info.bonus = 0; + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_TI_6006924); + func_effect_8007D0E0(this->fwork[0], this->fwork[1], this->fwork[2], 2.0f); } } - if (actor->timer_0BC >= 15) { - sp4C.x = gPlayer[0].pos.x - actor->obj.pos.x; - sp4C.y = (gPlayer[0].pos.y + 30.0f) - actor->obj.pos.y; - sp4C.z = gPlayer[0].pos.z - actor->obj.pos.z; - Matrix_RotateZ(gCalcMatrix, -actor->obj.rot.z * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -actor->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gCalcMatrix, -actor->obj.rot.y * M_DTOR, MTXF_APPLY); + if (this->timer_0BC >= 15) { + sp4C.x = gPlayer[0].pos.x - this->obj.pos.x; + sp4C.y = (gPlayer[0].pos.y + 30.0f) - this->obj.pos.y; + sp4C.z = gPlayer[0].pos.z - this->obj.pos.z; + Matrix_RotateZ(gCalcMatrix, -this->obj.rot.z * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -this->obj.rot.y * M_DTOR, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &sp4C, &sp64); sp58.x = sp64.x - D_i5_801B7550.x; sp58.y = sp64.y - D_i5_801B7550.y; sp58.z = sp64.z - D_i5_801B7550.z; temp = sqrtf(SQ(sp58.x) + SQ(sp58.z)); - actor->fwork[5] = Math_RadToDeg(-Math_Atan2F(sp58.y, temp)); - actor->fwork[6] = Math_RadToDeg(Math_Atan2F(sp58.x, sp58.z)); - Math_SmoothStepToAngle(&actor->fwork[3], actor->fwork[5], 0.2f, 5.0f, 0.01f); - Math_SmoothStepToAngle(&actor->fwork[4], actor->fwork[6], 0.2f, 5.0f, 0.01f); + this->fwork[5] = Math_RadToDeg(-Math_Atan2F(sp58.y, temp)); + this->fwork[6] = Math_RadToDeg(Math_Atan2F(sp58.x, sp58.z)); + Math_SmoothStepToAngle(&this->fwork[3], this->fwork[5], 0.2f, 5.0f, 0.01f); + Math_SmoothStepToAngle(&this->fwork[4], this->fwork[6], 0.2f, 5.0f, 0.01f); - if ((actor->fwork[4] > 45.0f) && (actor->fwork[4] < 180.0f)) { - actor->fwork[4] = 45.0f; + if ((this->fwork[4] > 45.0f) && (this->fwork[4] < 180.0f)) { + this->fwork[4] = 45.0f; } - if ((actor->fwork[4] < 315.0f) && (actor->fwork[4] > 180.0f)) { - actor->fwork[4] = 315.0f; + if ((this->fwork[4] < 315.0f) && (this->fwork[4] > 180.0f)) { + this->fwork[4] = 315.0f; } - if ((actor->fwork[3] > 45.0f) && (actor->fwork[3] < 180.0f)) { - actor->fwork[3] = 45.0f; + if ((this->fwork[3] > 45.0f) && (this->fwork[3] < 180.0f)) { + this->fwork[3] = 45.0f; } - if ((actor->fwork[3] < 315.0f) && (actor->fwork[3] > 180.0f)) { - actor->fwork[3] = 315.0f; + if ((this->fwork[3] < 315.0f) && (this->fwork[3] > 180.0f)) { + this->fwork[3] = 315.0f; } } - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &D_i5_801B7550, &sp64); - sp40.x = actor->fwork[3]; - sp40.y = actor->fwork[4]; + sp40.x = this->fwork[3]; + sp40.y = this->fwork[4]; sp40.z = 0.0f; - if ((actor->timer_0BC < 15) && ((actor->timer_0BC % 7) == 0)) { - func_effect_8007EE68(OBJ_EFFECT_ENEMY_LASER_1, (Vec3f*) &actor->fwork[0], &sp40, &actor->obj.rot, + if ((this->timer_0BC < 15) && ((this->timer_0BC % 7) == 0)) { + func_effect_8007EE68(OBJ_EFFECT_ENEMY_LASER_1, (Vec3f*) &this->fwork[0], &sp40, &this->obj.rot, &D_i5_801B755C, 1.0f); - if (actor->timer_0BC == 0) { - actor->timer_0BC = 90; + if (this->timer_0BC == 0) { + this->timer_0BC = 90; } } } else if (((gGameFrameCount % 8) == 0) && (Rand_ZeroOne() < 0.5f)) { - AUDIO_PLAY_SFX(NA_SE_EN_BROKEN_SPARK, actor->sfxSource, 4); - func_effect_8007C120(actor->fwork[0], actor->fwork[1], actor->fwork[2], 0.0f, 0.0f, 0.0f, 0.1f, 7); - actor->timer_0C6 = 4; + AUDIO_PLAY_SFX(NA_SE_EN_BROKEN_SPARK, this->sfxSource, 4); + Effect_Effect390_Spawn(this->fwork[0], this->fwork[1], this->fwork[2], 0.0f, 0.0f, 0.0f, 0.1f, 7); + this->timer_0C6 = 4; } } -void Titania_Actor233_Draw(Actor* actor) { +void Titania_TiFekuda_Draw(TiFekuda* this) { gSPDisplayList(gMasterDisp++, D_TI1_700C4B0); Matrix_Translate(gGfxMatrix, 0.0f, -50.0f, 178.0f, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, actor->fwork[4] * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, actor->fwork[3] * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, this->fwork[4] * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, this->fwork[3] * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - if (actor->health != 0) { + if (this->health != 0) { gSPDisplayList(gMasterDisp++, D_TI1_700B9C0); RCP_SetupDL(&gMasterDisp, SETUPDL_33); gSPDisplayList(gMasterDisp++, D_TI1_700C980); } } -static f32 D_i5_801B7568[7] = { 1.0f, 0.0f, 25.0f, 0.0f, 12.0f, 0.0f, 12.0f }; +static f32 sTiBoulderHitbox[7] = { 1.0f, 0.0f, 25.0f, 0.0f, 12.0f, 0.0f, 12.0f }; Gfx* D_TI_801B7584[10] = { D_TI1_700DDF0, D_TI1_700D9B0, D_TI1_700DF70, D_TI1_700DC50, D_TI1_700DED0, D_TI1_700DAD0, D_TI1_700DBB0, D_TI1_700E030, D_TI1_700D880, D_TI1_700D740, }; -void Titania_8018A2E8(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel) { - - Actor_Initialize(actor); - actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_230; - actor->timer_0BC = RAND_INT(20.0f) + 20; - actor->timer_0C2 = 8; - actor->vel.x = xVel; - actor->vel.y = yVel; - actor->vel.z = zVel; - actor->obj.pos.x = xPos; - actor->obj.pos.y = yPos; - actor->obj.pos.z = zPos; - actor->scale = RAND_FLOAT(0.2f) + 0.3f; - Object_SetInfo(&actor->info, actor->obj.id); - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_i5_801B7568); +void Titania_TiBoulder_Setup(TiBoulder* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel) { + Actor_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_ACTOR_TI_BOULDER; + this->timer_0BC = RAND_INT(20.0f) + 20; + this->timer_0C2 = 8; + this->vel.x = xVel; + this->vel.y = yVel; + this->vel.z = zVel; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + this->scale = RAND_FLOAT(0.2f) + 0.3f; + Object_SetInfo(&this->info, this->obj.id); + this->info.hitbox = SEGMENTED_TO_VIRTUAL(sTiBoulderHitbox); } -void Titania_8018A3F4(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel) { +void Titania_TiBoulder_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel) { s32 i; for (i = 0; i < ARRAY_COUNT(gActors); i++) { if (gActors[i].obj.status == OBJ_FREE) { - Titania_8018A2E8(&gActors[i], xPos, yPos, zPos, xVel, yVel, zVel); + Titania_TiBoulder_Setup(&gActors[i], xPos, yPos, zPos, xVel, yVel, zVel); gActors[i].info.damage = 0; break; } } } -void Titania_8018A474(Actor* actor) { +void Titania_TiBoulder_Spawn2(TiBoulder* this) { s32 i; for (i = 0; i < 4; i++) { - Titania_8018A3F4(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, RAND_FLOAT_CENTERED(40.0f), - RAND_FLOAT_CENTERED(40.0f), RAND_FLOAT(-20.0f)); + Titania_TiBoulder_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, RAND_FLOAT_CENTERED(40.0f), + RAND_FLOAT_CENTERED(40.0f), RAND_FLOAT(-20.0f)); } } -void Titania_Actor230_Update(Actor* actor) { +void Titania_TiBoulder_Update(TiBoulder* this) { f32 temp_fv0; f32 temp_fv1; f32 sp4C; f32 sp48; f32 sp44; - actor->drawShadow = true; + this->drawShadow = true; - if ((actor->scale != 1.0f) && (actor->dmgType == DMG_COLLISION)) { - Object_Kill(&actor->obj, actor->sfxSource); + if ((this->scale != 1.0f) && (this->dmgType == DMG_COLLISION)) { + Object_Kill(&this->obj, this->sfxSource); } - if (actor->dmgType != DMG_NONE) { - actor->dmgType = DMG_NONE; - actor->timer_0C6 = 15; - actor->health += actor->damage; - if (actor->scale == 1.0f) { - if (actor->health >= 10) { - Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_OB_EXPLOSION_S); - if ((Actor*) actor->iwork[0] != NULL) { - ((Actor*) actor->iwork[0])->iwork[actor->iwork[1]] = 0; + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + this->timer_0C6 = 15; + this->health += this->damage; + if (this->scale == 1.0f) { + if (this->health >= 10) { + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_OB_EXPLOSION_S); + if ((Actor*) this->iwork[0] != NULL) { + ((Actor*) this->iwork[0])->iwork[this->iwork[1]] = 0; } - func_effect_8007A900(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 8.0f, 255, 8, 1); + Effect_Effect359_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 8.0f, 255, 8, 1); if (Rand_ZeroOne() < 0.3f) { - actor->itemDrop = DROP_SILVER_RING; + this->itemDrop = DROP_SILVER_RING; } else { - Titania_8018A474(actor); - actor->itemDrop = DROP_NONE; + Titania_TiBoulder_Spawn2(this); + this->itemDrop = DROP_NONE; } - Actor_Despawn(actor); - actor->info.bonus = 0; + Actor_Despawn(this); + this->info.bonus = 0; } - Object_Kill(&actor->obj, actor->sfxSource); + Object_Kill(&this->obj, this->sfxSource); } else { - func_effect_8007A900(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 8.0f, 255, 8, 1); - Object_Kill(&actor->obj, actor->sfxSource); + Effect_Effect359_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 8.0f, 255, 8, 1); + Object_Kill(&this->obj, this->sfxSource); - if ((Actor*) actor->iwork[0] != NULL) { - ((Actor*) actor->iwork[0])->iwork[actor->iwork[1]] = 0; + if ((Actor*) this->iwork[0] != NULL) { + ((Actor*) this->iwork[0])->iwork[this->iwork[1]] = 0; } } } - if (actor->unk_046 == 2) { - actor->gravity = 0.0f; - Ground_801B6E20(actor->obj.pos.x, actor->obj.pos.z + gPathProgress, &sp4C, &sp44, &sp48); - actor->fwork[0] = sp4C; - actor->fwork[1] = sp44; - actor->fwork[2] = sp48; + if (this->unk_046 == 2) { + this->gravity = 0.0f; + Ground_801B6E20(this->obj.pos.x, this->obj.pos.z + gPathProgress, &sp4C, &sp44, &sp48); + this->fwork[0] = sp4C; + this->fwork[1] = sp44; + this->fwork[2] = sp48; return; } - actor->gravity = 3.0f; - Ground_801B6E20(actor->obj.pos.x, actor->obj.pos.z + gPathProgress, &sp4C, &sp44, &sp48); - actor->fwork[0] = sp4C; - actor->fwork[1] = sp44; - actor->fwork[2] = sp48; - temp_fv1 = (actor->scale * 50.0f); + this->gravity = 3.0f; + Ground_801B6E20(this->obj.pos.x, this->obj.pos.z + gPathProgress, &sp4C, &sp44, &sp48); + this->fwork[0] = sp4C; + this->fwork[1] = sp44; + this->fwork[2] = sp48; + temp_fv1 = (this->scale * 50.0f); - if (actor->obj.pos.y > sp44 + temp_fv1) { - actor->unk_046 = 0; + if (this->obj.pos.y > sp44 + temp_fv1) { + this->unk_046 = 0; } else { - actor->obj.pos.y = sp44 + temp_fv1; - if (actor->unk_046 == 0) { - if (actor->vel.y < -6.0f) { - AUDIO_PLAY_SFX(NA_SE_OB_BOUND_M, actor->sfxSource, 4); + this->obj.pos.y = sp44 + temp_fv1; + if (this->unk_046 == 0) { + if (this->vel.y < -6.0f) { + AUDIO_PLAY_SFX(NA_SE_OB_BOUND_M, this->sfxSource, 4); } - if (actor->vel.y < 0.0f) { - actor->vel.y = -actor->vel.y * 0.2f; + if (this->vel.y < 0.0f) { + this->vel.y = -this->vel.y * 0.2f; } - actor->vel.x -= (10.0f * sp48) / (M_DTOR * 90); - actor->vel.z += (10.0f * sp4C) / (M_DTOR * 90); - if (actor->vel.y < 10.0f) { - actor->vel.y = 0.0f; + this->vel.x -= (10.0f * sp48) / (M_DTOR * 90); + this->vel.z += (10.0f * sp4C) / (M_DTOR * 90); + if (this->vel.y < 10.0f) { + this->vel.y = 0.0f; } - actor->unk_046 = 1; + this->unk_046 = 1; } else { if ((s32) sp48 == 0) { - actor->vel.x *= 0.9; + this->vel.x *= 0.9; } if ((s32) sp4C == 0) { - actor->vel.z *= 0.9; + this->vel.z *= 0.9; } - actor->vel.y = 0.0f; + this->vel.y = 0.0f; } - actor->vel.x -= (3.0f * sp48) / (M_DTOR * 90); - actor->vel.z += (3.0f * sp4C) / (M_DTOR * 90); + this->vel.x -= (3.0f * sp48) / (M_DTOR * 90); + this->vel.z += (3.0f * sp4C) / (M_DTOR * 90); } - temp_fv1 = actor->scale * 314.0f; + temp_fv1 = this->scale * 314.0f; - if (actor->vel.x != 0.0f) { - actor->obj.rot.x += ((sqrtf(SQ(actor->vel.x) + SQ(actor->vel.z)) * 360.0f) / temp_fv1) * SIGN_OF(actor->vel.x); + if (this->vel.x != 0.0f) { + this->obj.rot.x += ((sqrtf(SQ(this->vel.x) + SQ(this->vel.z)) * 360.0f) / temp_fv1) * SIGN_OF(this->vel.x); } else { - actor->obj.rot.x += ((sqrtf(SQ(actor->vel.x) + SQ(actor->vel.z)) * 360.0f) / temp_fv1) * SIGN_OF(actor->vel.z); + this->obj.rot.x += ((sqrtf(SQ(this->vel.x) + SQ(this->vel.z)) * 360.0f) / temp_fv1) * SIGN_OF(this->vel.z); } - actor->obj.rot.y = Math_RadToDeg(Math_Atan2F(actor->vel.x, actor->vel.z)); + this->obj.rot.y = Math_RadToDeg(Math_Atan2F(this->vel.x, this->vel.z)); - if (actor->obj.rot.y >= 180.0f) { - actor->obj.rot.y -= 180.0f; + if (this->obj.rot.y >= 180.0f) { + this->obj.rot.y -= 180.0f; } - if (actor->obj.rot.y < 0) { - actor->obj.rot.y += 180.0f; + if (this->obj.rot.y < 0) { + this->obj.rot.y += 180.0f; } } -void Titania_Actor230_Draw(Actor* actor) { - if (actor->scale != 1.0f) { - Matrix_Scale(gGfxMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY); +void Titania_TiBoulder_Draw(TiBoulder* this) { + if (this->scale != 1.0f) { + Matrix_Scale(gGfxMatrix, this->scale, this->scale, this->scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); } gSPDisplayList(gMasterDisp++, D_TI1_700E3F0); } -void Titania_Actor225_Update(Actor* actor) { +void Titania_TiLandmine_Update(TiLandmine* this) { f32 sp3C; f32 sp38; f32 sp34; - switch (actor->state) { + switch (this->state) { case 0: - actor->gravity = 1.0f; - Ground_801B6E20(actor->obj.pos.x, actor->obj.pos.z + gPathProgress, &sp3C, &sp34, &sp38); - if (actor->obj.pos.y <= (sp34 + 3.0f)) { - AUDIO_PLAY_SFX(NA_SE_OB_SAND_BOUND_S, actor->sfxSource, 4); - actor->obj.pos.y = sp34 + 3.0f; - actor->obj.rot.x = sp3C * (M_RTOD); - actor->obj.rot.z = sp38 * (M_RTOD); - actor->vel.y = 0.0f; - actor->gravity = 0.0f; - actor->state++; + this->gravity = 1.0f; + Ground_801B6E20(this->obj.pos.x, this->obj.pos.z + gPathProgress, &sp3C, &sp34, &sp38); + if (this->obj.pos.y <= (sp34 + 3.0f)) { + AUDIO_PLAY_SFX(NA_SE_OB_SAND_BOUND_S, this->sfxSource, 4); + this->obj.pos.y = sp34 + 3.0f; + this->obj.rot.x = sp3C * (M_RTOD); + this->obj.rot.z = sp38 * (M_RTOD); + this->vel.y = 0.0f; + this->gravity = 0.0f; + this->state++; } break; @@ -624,41 +625,41 @@ void Titania_Actor225_Update(Actor* actor) { break; } - switch (actor->dmgType) { + switch (this->dmgType) { case 1: - AUDIO_PLAY_SFX(NA_SE_EN_MABOSS_REFLECT, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_MABOSS_REFLECT, this->sfxSource, 4); break; case 2: - actor->itemDrop = DROP_NONE; - Actor_Despawn(actor); - actor->info.bonus = 0; - func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y + 10.0f, actor->obj.pos.z, 6.0f); - Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); - Object_Kill(&actor->obj, actor->sfxSource); + this->itemDrop = DROP_NONE; + Actor_Despawn(this); + this->info.bonus = 0; + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y + 10.0f, this->obj.pos.z, 6.0f); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_M); + Object_Kill(&this->obj, this->sfxSource); break; case 3: - Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); - func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y + 50.0f, actor->obj.pos.z, (10.0f / 3.0f)); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_M); + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y + 50.0f, this->obj.pos.z, (10.0f / 3.0f)); gPlayer[0].vel.y = 20.0f; gPlayer[0].pos.y += 15.0f; gPlayer[0].rollState = 1; gPlayer[0].rollTimer = 15; gPlayer[0].rollRate = 20; - if (actor->obj.pos.x < gPlayer[0].pos.x) { + if (this->obj.pos.x < gPlayer[0].pos.x) { gPlayer[0].rollRate = -20; } - Object_Kill(&actor->obj, actor->sfxSource); + Object_Kill(&this->obj, this->sfxSource); break; } - actor->dmgType = DMG_NONE; + this->dmgType = DMG_NONE; } static Vec3f D_i5_801B75AC = { -70.0f, 50.0f, 212.0f }; static Vec3f D_i5_801B75B8 = { 70.0f, 50.0f, 212.0f }; -void Titania_8018ADC4(Actor* actor) { +void Titania_TiRasco_Init(TiRasco* this) { Vec3f sp68[2]; s32 i; s32 k; @@ -666,58 +667,59 @@ void Titania_8018ADC4(Actor* actor) { f32 sp58; f32 sp54; - actor->fwork[0] = actor->obj.rot.z; - actor->fwork[1] = actor->obj.rot.x; + this->fwork[0] = this->obj.rot.z; + this->fwork[1] = this->obj.rot.x; - actor->obj.rot.z = 0.0f; - actor->obj.rot.x = 0.0f; + this->obj.rot.z = 0.0f; + this->obj.rot.x = 0.0f; - Ground_801B6E20(actor->obj.pos.x, actor->obj.pos.z + gPathProgress, &sp54, &sp58, &sp54); + Ground_801B6E20(this->obj.pos.x, this->obj.pos.z + gPathProgress, &sp54, &sp58, &sp54); - actor->obj.pos.y = sp58; + this->obj.pos.y = sp58; - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_i5_801B75AC, &sp68[0]); Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_i5_801B75B8, &sp68[1]); k = 0; - actorPtr = gActors; - for (i = 0; i < ARRAY_COUNT(gActors); i++, actorPtr++) { + for (actorPtr = &gActors[0], i = 0; i < ARRAY_COUNT(gActors); i++, actorPtr++) { if (actorPtr->obj.status == OBJ_FREE) { Actor_Initialize(actorPtr); actorPtr->obj.status = OBJ_INIT; - actorPtr->obj.id = OBJ_ACTOR_230; - actorPtr->obj.pos.x = actor->obj.pos.x + sp68[k].x; - actorPtr->obj.pos.y = actor->obj.pos.y + sp68[k].y; - actorPtr->obj.pos.z = actor->obj.pos.z + sp68[k].z; + actorPtr->obj.id = OBJ_ACTOR_TI_BOULDER; + actorPtr->obj.pos.x = this->obj.pos.x + sp68[k].x; + actorPtr->obj.pos.y = this->obj.pos.y + sp68[k].y; + actorPtr->obj.pos.z = this->obj.pos.z + sp68[k].z; actorPtr->unk_046 = 2; - actorPtr->iwork[0] = (uintptr_t) actor; + actorPtr->iwork[0] = (uintptr_t) this; actorPtr->iwork[1] = k; Object_SetInfo(&actorPtr->info, actorPtr->obj.id); - actor->iwork[k] = (uintptr_t) actorPtr; + this->iwork[k] = (uintptr_t) actorPtr; k++; if (k >= 2) { break; } } } - actor->health = 40; + + this->health = 40; + if (k < 2) { for (i = 0; i < k; i++) { - Object_Kill(&gActors[actor->iwork[k]].obj, gActors[actor->iwork[k]].sfxSource); + Object_Kill(&gActors[this->iwork[k]].obj, gActors[this->iwork[k]].sfxSource); } - Object_Kill(&actor->obj, actor->sfxSource); + Object_Kill(&this->obj, this->sfxSource); } } -bool Titania_8018AFD4(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { +bool Titania_8018AFD4(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { *dList = NULL; return false; } -bool Titania_8018AFF0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { +bool Titania_TiRasco_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { if ((limbIndex == 2) || (limbIndex == 3) || (limbIndex == 4)) { Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, MTXF_APPLY); @@ -736,15 +738,15 @@ bool Titania_8018AFF0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* static Vec3f D_i5_801B75C4 = { 110.0f, 0.0f, 0.0f }; -void Titania_8018B144(s32 limbIndex, Vec3f* rot, void* data) { - Actor* actor = (Actor*) data; +void Titania_TiRasco_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { + TiRasco* this = (TiRasco*) thisx; switch (limbIndex) { case 2: - Matrix_MultVec3f(gCalcMatrix, &D_i5_801B75C4, (Vec3f*) &actor->fwork[3]); + Matrix_MultVec3f(gCalcMatrix, &D_i5_801B75C4, (Vec3f*) &this->fwork[3]); break; case 4: - Matrix_MultVec3f(gCalcMatrix, &D_i5_801B75C4, (Vec3f*) &actor->fwork[6]); + Matrix_MultVec3f(gCalcMatrix, &D_i5_801B75C4, (Vec3f*) &this->fwork[6]); break; } } @@ -753,7 +755,7 @@ static s16 D_i5_801B75D0[] = { 1, 2, 3, 4, 5, 6, 7, 10, 12, 13, }; -void Titania_8018B1B4(s32 limbIndex, Vec3f* rot, void* data) { +void Titania_8018B1B4(s32 limbIndex, Vec3f* rot, void* thisx) { s32 i; PosRot* var_a2; @@ -768,43 +770,43 @@ void Titania_8018B1B4(s32 limbIndex, Vec3f* rot, void* data) { } } -void Titania_Actor232_Update(Actor* actor) { +void Titania_TiRasco_Update(Actor* this) { Vec3f src; Vec3f dest; - Actor* sp3C = actor->iwork[0]; - Actor* sp38 = actor->iwork[1]; + Actor* sp3C = this->iwork[0]; + Actor* sp38 = this->iwork[1]; - if (actor->dmgType > DMG_NONE) { - actor->dmgType = DMG_NONE; - if (actor->health > 0) { - actor->health -= actor->damage; - if (actor->health <= 0) { - actor->health = actor->itemDrop = 0; - Actor_Despawn(actor); - actor->info.bonus = 0; + if (this->dmgType > DMG_NONE) { + this->dmgType = DMG_NONE; + if (this->health > 0) { + this->health -= this->damage; + if (this->health <= 0) { + this->health = this->itemDrop = 0; + Actor_Despawn(this); + this->info.bonus = 0; } } - actor->timer_0C6 = 10; + this->timer_0C6 = 10; } - switch (actor->state) { + switch (this->state) { case 0: - if ((gPlayer[0].pos.z - actor->obj.pos.z) < actor->fwork[0]) { - actor->state++; + if ((gPlayer[0].pos.z - this->obj.pos.z) < this->fwork[0]) { + this->state++; } break; case 1: - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); - if ((actor->animFrame >= 26) && (actor->animFrame <= 53) && (sp3C != NULL)) { - if (actor->animFrame == 26) { + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + if ((this->animFrame >= 26) && (this->animFrame <= 53) && (sp3C != NULL)) { + if (this->animFrame == 26) { sp3C->unk_046 = 2; sp3C->vel.x = 0.0f; sp3C->vel.y = 0.0f; sp3C->vel.z = 0.0f; - } else if (actor->animFrame == 53) { + } else if (this->animFrame == 53) { src.x = 0.0f; - src.y = actor->fwork[1]; + src.y = this->fwork[1]; src.z = 20.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); sp3C->vel.x = dest.x; @@ -812,27 +814,27 @@ void Titania_Actor232_Update(Actor* actor) { sp3C->vel.z = dest.z; sp3C->unk_046 = 0; sp3C->iwork[0] = (uintptr_t) NULL; - actor->iwork[0] = (uintptr_t) NULL; + this->iwork[0] = (uintptr_t) NULL; } - src.x = actor->fwork[3]; - src.y = actor->fwork[4] + 50.0f; - src.z = actor->fwork[5]; + src.x = this->fwork[3]; + src.y = this->fwork[4] + 50.0f; + src.z = this->fwork[5]; Matrix_MultVec3f(gCalcMatrix, &src, &dest); - sp3C->obj.pos.x = actor->obj.pos.x + dest.x; - sp3C->obj.pos.y = actor->obj.pos.y + dest.y; - sp3C->obj.pos.z = actor->obj.pos.z + dest.z; + sp3C->obj.pos.x = this->obj.pos.x + dest.x; + sp3C->obj.pos.y = this->obj.pos.y + dest.y; + sp3C->obj.pos.z = this->obj.pos.z + dest.z; } - if ((actor->animFrame >= 26) && (actor->animFrame <= 57) && (sp38 != NULL)) { - if (actor->animFrame == 26) { + if ((this->animFrame >= 26) && (this->animFrame <= 57) && (sp38 != NULL)) { + if (this->animFrame == 26) { sp38->unk_046 = 2; sp38->vel.x = 0.0f; sp38->vel.y = 0.0f; sp38->vel.z = 0.0f; - } else if (actor->animFrame == 57) { - AUDIO_PLAY_SFX(NA_SE_EN_THROW_S, actor->sfxSource, 4); + } else if (this->animFrame == 57) { + AUDIO_PLAY_SFX(NA_SE_EN_THROW_S, this->sfxSource, 4); src.x = 0.0f; - src.y = actor->fwork[1]; + src.y = this->fwork[1]; src.z = 20.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); sp38->vel.x = dest.x; @@ -840,19 +842,19 @@ void Titania_Actor232_Update(Actor* actor) { sp38->vel.z = dest.z; sp38->unk_046 = 0; sp38->iwork[0] = (uintptr_t) NULL; - actor->iwork[1] = (uintptr_t) NULL; + this->iwork[1] = (uintptr_t) NULL; } - src.x = actor->fwork[6]; - src.y = actor->fwork[7] + 50.0f; - src.z = actor->fwork[8]; + src.x = this->fwork[6]; + src.y = this->fwork[7] + 50.0f; + src.z = this->fwork[8]; Matrix_MultVec3f(gCalcMatrix, &src, &dest); - sp38->obj.pos.x = actor->obj.pos.x + dest.x; - sp38->obj.pos.y = actor->obj.pos.y + dest.y; - sp38->obj.pos.z = actor->obj.pos.z + dest.z; + sp38->obj.pos.x = this->obj.pos.x + dest.x; + sp38->obj.pos.y = this->obj.pos.y + dest.y; + sp38->obj.pos.z = this->obj.pos.z + dest.z; } - if (++actor->animFrame >= Animation_GetFrameCount(&D_TI1_700D534)) { - actor->state++; + if (++this->animFrame >= Animation_GetFrameCount(&D_TI1_700D534)) { + this->state++; } break; @@ -860,29 +862,30 @@ void Titania_Actor232_Update(Actor* actor) { break; } - if (actor->health == 0) { - actor->obj.status = OBJ_DYING; - Animation_GetFrameData(&D_TI1_700D534, actor->animFrame, actor->vwork); - Animation_DrawSkeleton(0, D_TI1_700D700, actor->vwork, Titania_8018AFD4, Titania_8018B1B4, actor, + if (this->health == 0) { + this->obj.status = OBJ_DYING; + Animation_GetFrameData(&D_TI1_700D534, this->animFrame, this->vwork); + Animation_DrawSkeleton(0, aTiRascoSkel, this->vwork, Titania_8018AFD4, Titania_8018B1B4, this, &gIdentityMatrix); - func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f); - actor->lockOnTimers[TEAM_ID_FOX] = 0; - actor->info.targetOffset = 0.0f; + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 10.0f); + this->lockOnTimers[TEAM_ID_FOX] = 0; + this->info.targetOffset = 0.0f; } } -void Titania_Actor232_Draw(Actor* actor) { - Animation_GetFrameData(&D_TI1_700D534, actor->animFrame, actor->vwork); - Animation_DrawSkeleton(0, D_TI1_700D700, actor->vwork, Titania_8018AFF0, Titania_8018B144, actor, &gIdentityMatrix); +void Titania_TiRasco_Draw(TiRasco* this) { + Animation_GetFrameData(&D_TI1_700D534, this->animFrame, this->vwork); + Animation_DrawSkeleton(0, aTiRascoSkel, this->vwork, Titania_TiRasco_OverrideLimbDraw, Titania_TiRasco_PostLimbDraw, + this, &gIdentityMatrix); } -void Titania_8018B720(Actor* actor) { +void Titania_TiRasco_Dying(TiRasco* this) { PosRot* var_s1; Actor* actorPtr; s32 i; Vec3f sp70; - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); var_s1 = SEGMENTED_TO_VIRTUAL(D_i5_801BDA30); @@ -893,12 +896,12 @@ void Titania_8018B720(Actor* actor) { actorPtr->state = 46; actorPtr->unk_048 = i; Matrix_MultVec3f(gCalcMatrix, &var_s1->pos, &sp70); - actorPtr->obj.pos.x = actor->obj.pos.x + sp70.x; - actorPtr->obj.pos.y = actor->obj.pos.y + sp70.y; - actorPtr->obj.pos.z = actor->obj.pos.z + sp70.z; - actorPtr->obj.rot.x = actor->obj.rot.x + var_s1->rot.x; - actorPtr->obj.rot.y = actor->obj.rot.y + var_s1->rot.y; - actorPtr->obj.rot.z = actor->obj.rot.z + var_s1->rot.z; + actorPtr->obj.pos.x = this->obj.pos.x + sp70.x; + actorPtr->obj.pos.y = this->obj.pos.y + sp70.y; + actorPtr->obj.pos.z = this->obj.pos.z + sp70.z; + actorPtr->obj.rot.x = this->obj.rot.x + var_s1->rot.x; + actorPtr->obj.rot.y = this->obj.rot.y + var_s1->rot.y; + actorPtr->obj.rot.z = this->obj.rot.z + var_s1->rot.z; actorPtr->gravity = 1.0f; actorPtr->vel.x = sp70.x * 0.05f; actorPtr->vel.y = 20.0f; @@ -909,31 +912,31 @@ void Titania_8018B720(Actor* actor) { } } - actorPtr = actor->iwork[0]; + actorPtr = (Actor*) this->iwork[0]; if (actorPtr != NULL) { actorPtr->iwork[0] = (uintptr_t) NULL; - actor->iwork[0] = (uintptr_t) NULL; + this->iwork[0] = (uintptr_t) NULL; actorPtr->unk_046 = 0; } - actorPtr = actor->iwork[1]; + actorPtr = (Actor*) this->iwork[1]; if (actorPtr != NULL) { actorPtr->unk_046 = 0; actorPtr->iwork[0] = (uintptr_t) NULL; - actor->iwork[1] = (uintptr_t) NULL; + this->iwork[1] = (uintptr_t) NULL; } - Object_Kill(&actor->obj, actor->sfxSource); + Object_Kill(&this->obj, this->sfxSource); } -void Titania_Actor231_Init(Actor* actor) { +void Titania_TiBomb_Init(TiBomb* this) { f32 sp24; - Ground_801B6E20(actor->obj.pos.x, actor->obj.pos.z + gPathProgress, &sp24, &actor->obj.pos.y, &sp24); - actor->obj.rot.x = actor->obj.rot.y = actor->obj.rot.z = 0.0f; - actor->obj.pos.y -= 20.0f; + Ground_801B6E20(this->obj.pos.x, this->obj.pos.z + gPathProgress, &sp24, &this->obj.pos.y, &sp24); + this->obj.rot.x = this->obj.rot.y = this->obj.rot.z = 0.0f; + this->obj.pos.y -= 20.0f; } -void Titania_Actor231_Update(Actor* actor) { +void Titania_TiBomb_Update(TiBomb* this) { f32 var_fa0; f32 sp50; f32 sp4C; @@ -943,94 +946,96 @@ void Titania_Actor231_Update(Actor* actor) { f32 sp3C; f32 temp_fa1; - actor->drawShadow = true; + this->drawShadow = true; - switch (actor->state) { + switch (this->state) { case 0: - sp44 = gPlayer[0].pos.x - actor->obj.pos.x; - sp40 = gPlayer[0].pos.y - actor->obj.pos.y; - sp3C = gPlayer[0].pos.z - actor->obj.pos.z; + sp44 = gPlayer[0].pos.x - this->obj.pos.x; + sp40 = gPlayer[0].pos.y - this->obj.pos.y; + sp3C = gPlayer[0].pos.z - this->obj.pos.z; - if (actor->timer_0BE == 7) { - actor->iwork[0] = 2; - AUDIO_PLAY_SFX(NA_SE_OB_BOMB_ALARM_LAST, actor->sfxSource, 0); + if (this->timer_0BE == 7) { + this->iwork[0] = 2; + AUDIO_PLAY_SFX(NA_SE_OB_BOMB_ALARM_LAST, this->sfxSource, 0); } - if (actor->timer_0BE == 0) { + if (this->timer_0BE == 0) { temp_fa1 = SQ(sp44) + SQ(sp40) + SQ(sp3C); if (temp_fa1 < SQ(166.25f)) { - actor->timer_0BE = 8; + this->timer_0BE = 8; } else if (temp_fa1 < SQ(600.0f)) { - actor->timer_0BE = 0; - if (actor->timer_0BC == 0) { - AUDIO_PLAY_SFX(NA_SE_OB_BOMB_ALARM, actor->sfxSource, 4); - actor->iwork[0] = 1 - actor->iwork[0]; - actor->timer_0BC = 5; + this->timer_0BE = 0; + if (this->timer_0BC == 0) { + AUDIO_PLAY_SFX(NA_SE_OB_BOMB_ALARM, this->sfxSource, 4); + this->iwork[0] = 1 - this->iwork[0]; + this->timer_0BC = 5; } } else { - actor->iwork[0] = 0; + this->iwork[0] = 0; } } - if (actor->timer_0BE == 1) { - func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f); - Object_Kill(&actor->obj, actor->sfxSource); + if (this->timer_0BE == 1) { + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 10.0f); + Object_Kill(&this->obj, this->sfxSource); Player_ApplyDamage(gPlayer, 0, 60); + gPlayer[0].vel.y = 20.0f; gPlayer[0].pos.y += 15.0f; gPlayer[0].rollState = 1; gPlayer[0].rollTimer = 15; gPlayer[0].rollRate = 20; - if (actor->obj.pos.x < gPlayer[0].pos.x) { + + if (this->obj.pos.x < gPlayer[0].pos.x) { gPlayer[0].rollRate = -20; } } break; case 1: - Ground_801B6E20(actor->obj.pos.x, actor->obj.pos.z + gPathProgress, &sp4C, &sp50, &sp48); - actor->fwork[0] = sp50; - actor->fwork[1] = sp4C; - actor->fwork[2] = sp48; - if (actor->vel.y <= 0.0f) { - actor->itemDrop = DROP_NONE; - Actor_Despawn(actor); - Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); - func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f); - Object_Kill(&actor->obj, actor->sfxSource); + Ground_801B6E20(this->obj.pos.x, this->obj.pos.z + gPathProgress, &sp4C, &sp50, &sp48); + this->fwork[0] = sp50; + this->fwork[1] = sp4C; + this->fwork[2] = sp48; + if (this->vel.y <= 0.0f) { + this->itemDrop = DROP_NONE; + Actor_Despawn(this); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_M); + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 10.0f); + Object_Kill(&this->obj, this->sfxSource); } break; } - if (fabsf(actor->vel.x) > 130.0f) { - var_fa0 = SIGN_OF(actor->vel.x) * 130.0f; + if (fabsf(this->vel.x) > 130.0f) { + var_fa0 = SIGN_OF(this->vel.x) * 130.0f; } else { - var_fa0 = actor->vel.x; + var_fa0 = this->vel.x; } - actor->obj.rot.z = (-var_fa0 / 130.0f) * 90.0f; + this->obj.rot.z = (-var_fa0 / 130.0f) * 90.0f; - if (fabsf(actor->vel.z) > 130.0f) { - var_fa0 = SIGN_OF(actor->vel.z) * 130.0f; + if (fabsf(this->vel.z) > 130.0f) { + var_fa0 = SIGN_OF(this->vel.z) * 130.0f; } else { - var_fa0 = actor->vel.z; + var_fa0 = this->vel.z; } - actor->obj.rot.x = (var_fa0 / 130.0f) * 90.0f; + this->obj.rot.x = (var_fa0 / 130.0f) * 90.0f; - if (actor->dmgType == DMG_BEAM) { - AUDIO_PLAY_SFX(NA_SE_METALBOMB_REFLECT, actor->sfxSource, 4); - sp44 = actor->obj.pos.x - actor->hitPos.x; + if (this->dmgType == DMG_BEAM) { + AUDIO_PLAY_SFX(NA_SE_METALBOMB_REFLECT, this->sfxSource, 4); + sp44 = this->obj.pos.x - this->hitPos.x; sp40 = fabsf(sp44); - actor->dmgType = DMG_NONE; - actor->state = 1; - actor->timer_0BC = 0; - actor->timer_0BE = 0; - actor->iwork[0] = 0; - actor->vel.x += sp44 * 0.5f * 0.8f; - actor->vel.z -= (80.0f - sp40) * 0.8f; - actor->vel.y += 34.0f; - actor->gravity = 2.0f; + this->dmgType = DMG_NONE; + this->state = 1; + this->timer_0BC = 0; + this->timer_0BE = 0; + this->iwork[0] = 0; + this->vel.x += sp44 * 0.5f * 0.8f; + this->vel.z -= (80.0f - sp40) * 0.8f; + this->vel.y += 34.0f; + this->gravity = 2.0f; } } @@ -1045,7 +1050,7 @@ Gfx* D_TI_801B7608[10] = { D_TI1_7003A90, D_TI1_7005420, D_TI1_7003FC0, D_TI1_7002930, D_TI1_7002490, }; -void Titania_Actor231_Draw(Actor* actor) { +void Titania_TiBomb_Draw(TiBomb* this) { s32 index; RCP_SetupDL(&gMasterDisp, SETUPDL_30); @@ -1054,35 +1059,35 @@ void Titania_Actor231_Draw(Actor* actor) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_TI1_7009D60); RCP_SetupDL(&gMasterDisp, SETUPDL_34); - index = actor->iwork[0]; + index = this->iwork[0]; gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, D_i5_801B75E4[0][index], D_i5_801B75E4[1][index], D_i5_801B75E4[2][index], 255); - gSPDisplayList(gMasterDisp++, D_TI1_700A990); + gSPDisplayList(gMasterDisp++, aTi1BombDL); } -void Titania_8018BFB0(Actor* actor) { +void Titania_TiDesertCrawler_Init(TiDesertCrawler* this) { UnkStruct_i5_801BD738* temp_a1; - s32 temp_a2; + s32 index; s32 i; for (i = 0; i < 3; i++) { if (!D_i5_801B750C[i]) { D_i5_801B750C[i] = true; - actor->iwork[0] = i; + this->iwork[0] = i; break; } } if (i == 3) { - Object_Kill(&actor->obj, actor->sfxSource); + Object_Kill(&this->obj, this->sfxSource); return; } - temp_a2 = actor->iwork[0]; - actor->info.hitbox = D_i5_801BDB20[temp_a2]; - actor->health = 80; - actor->iwork[8] = 1; - temp_a1 = D_i5_801BD738[temp_a2]; + index = this->iwork[0]; + this->info.hitbox = D_i5_801BDB20[index]; + this->health = 80; + this->iwork[8] = 1; + temp_a1 = D_i5_801BD738[index]; for (i = 0; i < 9; i++) { temp_a1[i].unk_00.pos.x = temp_a1[i].unk_00.pos.y = temp_a1[i].unk_00.pos.z = temp_a1[i].unk_00.rot.x = @@ -1091,7 +1096,7 @@ void Titania_8018BFB0(Actor* actor) { } } -bool Titania_8018C118(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { +bool Titania_8018C118(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { *dList = NULL; return false; } @@ -1100,13 +1105,13 @@ static s16 D_i5_801B7630[9][2] = { { 1, 0 }, { 2, 1 }, { 3, 0 }, { 4, 1 }, { 5, 1 }, { 6, 0 }, { 7, 1 }, { 8, 0 }, { 13, 1 }, }; -bool Titania_8018C134(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { - Actor* actor = (Actor*) data; +bool Titania_TiDesertCrawler_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { + TiDesertCrawler* this = (TiDesertCrawler*) thisx; s32 sp58; s32 i; s32 sp50; - sp50 = actor->iwork[0]; + sp50 = this->iwork[0]; sp58 = false; for (i = 0; i < 9; i++) { @@ -1119,7 +1124,8 @@ bool Titania_8018C134(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, MTXF_APPLY); Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - if ((limbIndex == 13) && (actor->iwork[5] & 2) && (actor->iwork[6] == 0)) { + + if ((limbIndex == 13) && (this->iwork[5] & 2) && (this->iwork[6] == 0)) { RCP_SetupDL(&gMasterDisp, SETUPDL_30); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); gSPDisplayList(gMasterDisp++, *dList); @@ -1136,10 +1142,10 @@ bool Titania_8018C134(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return sp58; } -void Titania_8018C370(s32 limbIndex, Vec3f* rot, void* data) { - Actor* actor = (Actor*) data; +void Titania_TiDesertCrawler_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { + TiDesertCrawler* this = (TiDesertCrawler*) thisx; - if ((limbIndex == 13) && !(D_i5_801BD738[actor->iwork[0]][8].unk_18 & 1)) { + if ((limbIndex == 13) && !(D_i5_801BD738[this->iwork[0]][8].unk_18 & 1)) { gSPDisplayList(gMasterDisp++, D_TI1_7002490); } } @@ -1147,7 +1153,7 @@ void Titania_8018C370(s32 limbIndex, Vec3f* rot, void* data) { static Vec3f D_i5_801B7654 = { 387.0f, 0.0f, 0.0f }; static Vec3f D_i5_801B7660 = { 199.5f, 0.0f, 0.0f }; -void Titania_8018C3D8(s32 limbIndex, Vec3f* rot, void* data) { +void Titania_8018C3D8(s32 limbIndex, Vec3f* rot, void* thisx) { s32 i; s32 j; Vec3f sp54; @@ -1157,9 +1163,9 @@ void Titania_8018C3D8(s32 limbIndex, Vec3f* rot, void* data) { f32* var_v0_2; f32* var_s0_2; s32 temp; - Actor* actor = (Actor*) data; + Actor* this = (Actor*) thisx; - var_s0 = D_i5_801BD738[actor->iwork[0]]; + var_s0 = D_i5_801BD738[this->iwork[0]]; var_s0[8].unk_18 |= 2; for (i = 0; i < 9U; i++, var_s0++) { @@ -1171,22 +1177,22 @@ void Titania_8018C3D8(s32 limbIndex, Vec3f* rot, void* data) { } } - actor->fwork[27] = D_i5_801BD738[actor->iwork[0]][8].unk_00.pos.y; + this->fwork[27] = D_i5_801BD738[this->iwork[0]][8].unk_00.pos.y; - switch (actor->iwork[2]) { + switch (this->iwork[2]) { case 0: switch (limbIndex) { case 1: - Matrix_MultVec3f(gCalcMatrix, &D_i5_801B7660, (Vec3f*) &actor->fwork[12]); + Matrix_MultVec3f(gCalcMatrix, &D_i5_801B7660, (Vec3f*) &this->fwork[12]); break; case 3: - Matrix_MultVec3f(gCalcMatrix, &D_i5_801B7660, (Vec3f*) &actor->fwork[9]); + Matrix_MultVec3f(gCalcMatrix, &D_i5_801B7660, (Vec3f*) &this->fwork[9]); break; case 5: - Matrix_MultVec3f(gCalcMatrix, &D_i5_801B7654, (Vec3f*) &actor->fwork[3]); + Matrix_MultVec3f(gCalcMatrix, &D_i5_801B7654, (Vec3f*) &this->fwork[3]); break; case 7: - Matrix_MultVec3f(gCalcMatrix, &D_i5_801B7654, (Vec3f*) &actor->fwork[6]); + Matrix_MultVec3f(gCalcMatrix, &D_i5_801B7654, (Vec3f*) &this->fwork[6]); break; } break; @@ -1194,24 +1200,24 @@ void Titania_8018C3D8(s32 limbIndex, Vec3f* rot, void* data) { case 1: switch (limbIndex) { case 1: - Matrix_MultVec3f(gCalcMatrix, &D_tank_800C9F2C, (Vec3f*) &actor->fwork[12]); + Matrix_MultVec3f(gCalcMatrix, &D_tank_800C9F2C, (Vec3f*) &this->fwork[12]); break; case 3: - Matrix_MultVec3f(gCalcMatrix, &D_tank_800C9F2C, (Vec3f*) &actor->fwork[9]); + Matrix_MultVec3f(gCalcMatrix, &D_tank_800C9F2C, (Vec3f*) &this->fwork[9]); break; case 5: - Matrix_MultVec3f(gCalcMatrix, &D_tank_800C9F2C, (Vec3f*) &actor->fwork[3]); + Matrix_MultVec3f(gCalcMatrix, &D_tank_800C9F2C, (Vec3f*) &this->fwork[3]); break; case 7: - Matrix_MultVec3f(gCalcMatrix, &D_tank_800C9F2C, (Vec3f*) &actor->fwork[6]); + Matrix_MultVec3f(gCalcMatrix, &D_tank_800C9F2C, (Vec3f*) &this->fwork[6]); break; } break; } - var_v0_2 = actor->info.hitbox; + var_v0_2 = this->info.hitbox; - if (actor->iwork[8] != 0) { + if (this->iwork[8] != 0) { var_v0_2[0] = 25.0f; var_v0_2++; @@ -1242,28 +1248,29 @@ void Titania_8018C3D8(s32 limbIndex, Vec3f* rot, void* data) { } } -void Titania_8018C72C(Actor* actor) { +void Titania_8018C72C(TiDesertCrawler* this) { s32 i; f32 sp30; - actor->state = 8; - AUDIO_PLAY_SFX(NA_SE_EN_KANI_STOP, actor->sfxSource, 4); + this->state = 8; + AUDIO_PLAY_SFX(NA_SE_EN_KANI_STOP, this->sfxSource, 4); for (i = 0; i < 9; i++) { - D_i5_801BD738[actor->iwork[0]][i].unk_18 |= 2; + D_i5_801BD738[this->iwork[0]][i].unk_18 |= 2; } - sp30 = actor->vwork[0].y; - actor->vwork[0].y += actor->fwork[26]; - Animation_DrawSkeleton(0, D_TI1_7006990, actor->vwork, Titania_8018C118, Titania_8018C3D8, actor, &gIdentityMatrix); - actor->vwork[0].y = sp30; - actor->iwork[7] = 0; - actor->iwork[8] = 0; + sp30 = this->vwork[0].y; + this->vwork[0].y += this->fwork[26]; + Animation_DrawSkeleton(0, aTi1DesertCrawlerSkel, this->vwork, Titania_8018C118, Titania_8018C3D8, this, + &gIdentityMatrix); + this->vwork[0].y = sp30; + this->iwork[7] = 0; + this->iwork[8] = 0; } static Vec3f D_i5_801B766C = { 0.0f, 0.0f, 15.0f }; -void Titania_Actor229_Update(Actor* actor) { +void Titania_TiDesertCrawler_Update(TiDesertCrawler* this) { s32 i; f32 sp170; f32 temp_fs0; @@ -1281,337 +1288,337 @@ void Titania_Actor229_Update(Actor* actor) { f32 z; s32 pad; - actor->iwork[7]++; - sp88 = gPlayer[0].trueZpos - actor->obj.pos.z; + this->iwork[7]++; + sp88 = gPlayer[0].trueZpos - this->obj.pos.z; - if (actor->iwork[4] > 0) { - actor->iwork[4]--; - } else if ((gPlayer[0].grounded != 0) && (actor->iwork[3] > 0)) { + if (this->iwork[4] > 0) { + this->iwork[4]--; + } else if ((gPlayer[0].grounded != 0) && (this->iwork[3] > 0)) { gControllerRumbleFlags[0] = 1; - actor->iwork[3]--; + this->iwork[3]--; } - if (actor->iwork[5] > 0) { - actor->iwork[5]--; + if (this->iwork[5] > 0) { + this->iwork[5]--; } - if (actor->iwork[6] > 0) { - actor->iwork[6]--; + if (this->iwork[6] > 0) { + this->iwork[6]--; } - if ((actor->health > 0) && (actor->dmgType > DMG_NONE) && (actor->dmgType != DMG_COLLISION) && - (actor->state >= 3)) { - if ((actor->health > 0) && (actor->dmgPart >= 0) && (actor->dmgPart < 3)) { - actor->iwork[5] = 10; - if (actor->state == 4) { - Audio_KillSfxBySourceAndId(actor->sfxSource, NA_SE_EN_KANI_MOTOR); - actor->timer_0BC = 20; - actor->fwork[24] = 1.0f; - actor->fwork[23] = actor->animFrame; + if ((this->health > 0) && (this->dmgType > DMG_NONE) && (this->dmgType != DMG_COLLISION) && (this->state >= 3)) { + if ((this->health > 0) && (this->dmgPart >= 0) && (this->dmgPart < 3)) { + this->iwork[5] = 10; + + if (this->state == 4) { + Audio_KillSfxBySourceAndId(this->sfxSource, NA_SE_EN_KANI_MOTOR); + this->timer_0BC = 20; + this->fwork[24] = 1.0f; + this->fwork[23] = this->animFrame; } - actor->health -= actor->damage; - if (actor->health <= 0) { - BonusText_Display(actor->obj.pos.x, actor->obj.pos.y, actor->fwork[27] + actor->obj.pos.z, 3); + + this->health -= this->damage; + if (this->health <= 0) { + BonusText_Display(this->obj.pos.x, this->obj.pos.y, this->fwork[27] + this->obj.pos.z, 3); gHitCount += 3; - actor->health = actor->itemDrop = 0; - Actor_Despawn(actor); - actor->info.bonus = 0; - actor->timer_0BC = 20; - actor->animFrame = 0; - actor->fwork[15] = 0.0f; + this->health = this->itemDrop = 0; + Actor_Despawn(this); + this->info.bonus = 0; + this->timer_0BC = 20; + this->animFrame = 0; + this->fwork[15] = 0.0f; } else { - AUDIO_PLAY_SFX(NA_SE_EN_SNAKE_DAMAGE, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SNAKE_DAMAGE, this->sfxSource, 4); } - } else if (actor->dmgType == DMG_BEAM) { - Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_REFLECT); + } else if (this->dmgType == DMG_BEAM) { + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_REFLECT); } - actor->dmgType = DMG_NONE; + this->dmgType = DMG_NONE; } - switch (actor->state) { + switch (this->state) { case 0: - AUDIO_PLAY_SFX(NA_SE_EN_HEAVY_JUMP, actor->sfxSource, 4); - actor->rot_0F4.y = actor->obj.rot.y; - actor->obj.rot.y = 180.0f; - actor->obj.pos.y += 125.0f; - actor->gravity = 1.0f; - actor->drawShadow = true; - actor->vel.y = 20.0f; - actor->vel.z = -70.0f; - Animation_GetFrameData(&D_TI1_700733C, 0, actor->vwork); - Animation_DrawSkeleton(1, D_TI1_7006990, actor->vwork, Titania_8018C118, Titania_8018C3D8, actor, + AUDIO_PLAY_SFX(NA_SE_EN_HEAVY_JUMP, this->sfxSource, 4); + this->rot_0F4.y = this->obj.rot.y; + this->obj.rot.y = 180.0f; + this->obj.pos.y += 125.0f; + this->gravity = 1.0f; + this->drawShadow = true; + this->vel.y = 20.0f; + this->vel.z = -70.0f; + Animation_GetFrameData(&D_TI1_700733C, 0, this->vwork); + Animation_DrawSkeleton(1, aTi1DesertCrawlerSkel, this->vwork, Titania_8018C118, Titania_8018C3D8, this, &gIdentityMatrix); - actor->state = 1; + this->state = 1; break; case 1: - Ground_801B6E20(actor->obj.pos.x, actor->obj.pos.z + gPlayer->zPath, &spA0, &sp9C, &sp98); - actor->fwork[0] = sp9C; - actor->fwork[1] = spA0; - actor->fwork[2] = sp98; + Ground_801B6E20(this->obj.pos.x, this->obj.pos.z + gPlayer->zPath, &spA0, &sp9C, &sp98); + this->fwork[0] = sp9C; + this->fwork[1] = spA0; + this->fwork[2] = sp98; Animation_GetFrameData(&D_TI1_700733C, 0, spA4); - Math_SmoothStepToVec3fArray(spA4, actor->vwork, 1, 15, 0.2f, 10.0f, 0.01f); - Animation_DrawSkeleton(1, D_TI1_7006990, actor->vwork, Titania_8018C118, Titania_8018C3D8, actor, + Math_SmoothStepToVec3fArray(spA4, this->vwork, 1, 15, 0.2f, 10.0f, 0.01f); + Animation_DrawSkeleton(1, aTi1DesertCrawlerSkel, this->vwork, Titania_8018C118, Titania_8018C3D8, this, &gIdentityMatrix); - if (actor->obj.pos.z <= gPlayer[0].pos.z) { - Math_SmoothStepToAngle(&actor->obj.rot.y, actor->rot_0F4.y, 0.2f, 10.0f, 0.01f); + if (this->obj.pos.z <= gPlayer[0].pos.z) { + Math_SmoothStepToAngle(&this->obj.rot.y, this->rot_0F4.y, 0.2f, 10.0f, 0.01f); } - if ((actor->obj.pos.y + actor->fwork[7] + actor->fwork[26]) <= sp9C) { - AUDIO_PLAY_SFX(NA_SE_EN_HEAVY_BOUND, actor->sfxSource, 4); - actor->fwork[16] = actor->obj.pos.y = sp9C; - actor->rot_0F4.x = spA0 * M_RTOD; - actor->rot_0F4.z = sp98 * M_RTOD; - actor->gravity = 0.0f; - actor->vel.x = actor->vel.y = actor->vel.z = 0.0f; - actor->timer_0BC = 10; - x = actor->obj.pos.x + actor->fwork[6]; - y = actor->obj.pos.y + actor->fwork[7] + actor->fwork[26]; - z = actor->obj.pos.z + actor->fwork[8]; - func_effect_8007A900(x, y, z, 20.0f, 255, 8, 0); - x = actor->obj.pos.x + actor->fwork[3]; - y = actor->obj.pos.y + actor->fwork[4] + actor->fwork[26]; - z = actor->obj.pos.z + actor->fwork[5]; - func_effect_8007A900(x, y, z, 20.0f, 255, 8, 0); + if ((this->obj.pos.y + this->fwork[7] + this->fwork[26]) <= sp9C) { + AUDIO_PLAY_SFX(NA_SE_EN_HEAVY_BOUND, this->sfxSource, 4); + this->fwork[16] = this->obj.pos.y = sp9C; + this->rot_0F4.x = spA0 * M_RTOD; + this->rot_0F4.z = sp98 * M_RTOD; + this->gravity = 0.0f; + this->vel.x = this->vel.y = this->vel.z = 0.0f; + this->timer_0BC = 10; + x = this->obj.pos.x + this->fwork[6]; + y = this->obj.pos.y + this->fwork[7] + this->fwork[26]; + z = this->obj.pos.z + this->fwork[8]; + Effect_Effect359_Spawn(x, y, z, 20.0f, 255, 8, 0); + x = this->obj.pos.x + this->fwork[3]; + y = this->obj.pos.y + this->fwork[4] + this->fwork[26]; + z = this->obj.pos.z + this->fwork[5]; + Effect_Effect359_Spawn(x, y, z, 20.0f, 255, 8, 0); sp88 = fabsf(sp88); if (sp88 < 5000.0f) { - actor->iwork[4] = (s32) (sp88 / 200.0f); - actor->iwork[3] = (s32) ((5000.0f - sp88) / 714.0f); + this->iwork[4] = (s32) (sp88 / 200.0f); + this->iwork[3] = (s32) ((5000.0f - sp88) / 714.0f); } - actor->state = 2; + this->state = 2; } - actor->fwork[15] = 0.0f; - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_NEW); - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, MTXF_APPLY); - Matrix_MultVec3f(gCalcMatrix, (Vec3f*) &actor->fwork[12], &sp8C); - actor->fwork[12] = sp8C.x; - actor->fwork[13] = sp8C.y; - actor->fwork[14] = sp8C.z; - Matrix_MultVec3f(gCalcMatrix, (Vec3f*) &actor->fwork[9], &sp8C); - actor->fwork[9] = sp8C.x; - actor->fwork[10] = sp8C.y; - actor->fwork[11] = sp8C.z; - Matrix_MultVec3f(gCalcMatrix, (Vec3f*) &actor->fwork[3], &sp8C); - actor->fwork[3] = sp8C.x; - actor->fwork[4] = sp8C.y; - actor->fwork[5] = sp8C.z; - Matrix_MultVec3f(gCalcMatrix, (Vec3f*) &actor->fwork[6], &sp8C); - actor->fwork[6] = sp8C.x; - actor->fwork[7] = sp8C.y; - actor->fwork[8] = sp8C.z; + this->fwork[15] = 0.0f; + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_MultVec3f(gCalcMatrix, (Vec3f*) &this->fwork[12], &sp8C); + this->fwork[12] = sp8C.x; + this->fwork[13] = sp8C.y; + this->fwork[14] = sp8C.z; + Matrix_MultVec3f(gCalcMatrix, (Vec3f*) &this->fwork[9], &sp8C); + this->fwork[9] = sp8C.x; + this->fwork[10] = sp8C.y; + this->fwork[11] = sp8C.z; + Matrix_MultVec3f(gCalcMatrix, (Vec3f*) &this->fwork[3], &sp8C); + this->fwork[3] = sp8C.x; + this->fwork[4] = sp8C.y; + this->fwork[5] = sp8C.z; + Matrix_MultVec3f(gCalcMatrix, (Vec3f*) &this->fwork[6], &sp8C); + this->fwork[6] = sp8C.x; + this->fwork[7] = sp8C.y; + this->fwork[8] = sp8C.z; break; case 2: - Math_SmoothStepToAngle(&actor->obj.rot.x, actor->rot_0F4.x, 0.5f, 5.0f, 0.01f); - Math_SmoothStepToAngle(&actor->obj.rot.z, actor->rot_0F4.z, 0.5f, 5.0f, 0.01f); - actor->obj.pos.y = actor->fwork[0] = actor->fwork[16]; - actor->fwork[1] = actor->rot_0F4.x; - actor->fwork[2] = actor->rot_0F4.z; + Math_SmoothStepToAngle(&this->obj.rot.x, this->rot_0F4.x, 0.5f, 5.0f, 0.01f); + Math_SmoothStepToAngle(&this->obj.rot.z, this->rot_0F4.z, 0.5f, 5.0f, 0.01f); + this->obj.pos.y = this->fwork[0] = this->fwork[16]; + this->fwork[1] = this->rot_0F4.x; + this->fwork[2] = this->rot_0F4.z; Animation_GetFrameData(&D_TI1_7007234, 0, spA4); - Math_SmoothStepToVec3fArray(spA4, actor->vwork, 1, 15, 0.5f, 7.0f, 0.1f); - temp_fs0 = actor->vwork[0].y; - actor->vwork[0].y += actor->fwork[26]; - Animation_DrawSkeleton(0, D_TI1_7006990, actor->vwork, Titania_8018C118, Titania_8018C3D8, actor, + Math_SmoothStepToVec3fArray(spA4, this->vwork, 1, 15, 0.5f, 7.0f, 0.1f); + temp_fs0 = this->vwork[0].y; + this->vwork[0].y += this->fwork[26]; + Animation_DrawSkeleton(0, aTi1DesertCrawlerSkel, this->vwork, Titania_8018C118, Titania_8018C3D8, this, &gIdentityMatrix); - actor->vwork[0].y = temp_fs0; - actor->fwork[15] = 0.0f; - if (actor->timer_0BC == 0) { - actor->timer_0BC = 15; - actor->state++; - AUDIO_PLAY_SFX(NA_SE_EN_KANI_MOTOR, actor->sfxSource, 4); + this->vwork[0].y = temp_fs0; + this->fwork[15] = 0.0f; + if (this->timer_0BC == 0) { + this->timer_0BC = 15; + this->state++; + AUDIO_PLAY_SFX(NA_SE_EN_KANI_MOTOR, this->sfxSource, 4); } - Math_SmoothStepToF(&actor->fwork[26], -60.0f, actor->fwork[15], 500.0f, 0.01f); + Math_SmoothStepToF(&this->fwork[26], -60.0f, this->fwork[15], 500.0f, 0.01f); break; case 3: - if (actor->timer_0BC == 0) { - actor->state = 4; + if (this->timer_0BC == 0) { + this->state = 4; } - Animation_GetFrameData(&D_TI1_70067C4, actor->animFrame, spA4); - Math_SmoothStepToVec3fArray(spA4, actor->vwork, 1, 15, 0.1f, 3.0f, 0.01f); - temp_fs0 = actor->vwork[0].y; - actor->vwork[0].y += actor->fwork[26]; - Animation_DrawSkeleton(0, D_TI1_7006990, actor->vwork, Titania_8018C118, Titania_8018C3D8, actor, + Animation_GetFrameData(&D_TI1_70067C4, this->animFrame, spA4); + Math_SmoothStepToVec3fArray(spA4, this->vwork, 1, 15, 0.1f, 3.0f, 0.01f); + temp_fs0 = this->vwork[0].y; + this->vwork[0].y += this->fwork[26]; + Animation_DrawSkeleton(0, aTi1DesertCrawlerSkel, this->vwork, Titania_8018C118, Titania_8018C3D8, this, &gIdentityMatrix); - actor->vwork[0].y = temp_fs0; - actor->fwork[15] = 0.0f; - Math_SmoothStepToF(&actor->fwork[26], -60.0f, 0.0f, 500.0f, 0.01f); - if (actor->health <= 0) { - actor->state = 5; - actor->animFrame = 0; - actor->timer_0BC = 30; - actor->iwork[6] = 30; - actor->fwork[15] = 0.0f; + this->vwork[0].y = temp_fs0; + this->fwork[15] = 0.0f; + Math_SmoothStepToF(&this->fwork[26], -60.0f, 0.0f, 500.0f, 0.01f); + if (this->health <= 0) { + this->state = 5; + this->animFrame = 0; + this->timer_0BC = 30; + this->iwork[6] = 30; + this->fwork[15] = 0.0f; } break; case 4: - Ground_801B6E20(actor->obj.pos.x, actor->obj.pos.z + gPathProgress, &spA0, &sp9C, &sp98); - actor->fwork[0] = sp9C; - actor->fwork[1] = spA0; - actor->fwork[2] = sp98; - actor->obj.pos.y = sp9C; - Math_SmoothStepToAngle(&actor->obj.rot.x, spA0 * M_RTOD, 0.1f, 1.0f, 0.01f); - Math_SmoothStepToAngle(&actor->obj.rot.z, sp98 * M_RTOD, 0.1f, 1.0f, 0.01f); + Ground_801B6E20(this->obj.pos.x, this->obj.pos.z + gPathProgress, &spA0, &sp9C, &sp98); + this->fwork[0] = sp9C; + this->fwork[1] = spA0; + this->fwork[2] = sp98; + this->obj.pos.y = sp9C; + Math_SmoothStepToAngle(&this->obj.rot.x, spA0 * M_RTOD, 0.1f, 1.0f, 0.01f); + Math_SmoothStepToAngle(&this->obj.rot.z, sp98 * M_RTOD, 0.1f, 1.0f, 0.01f); - if (actor->timer_0BC == 0) { - if (((actor->animFrame == 40) || (actor->animFrame == 80)) && (actor->timer_0BC == 0)) { - AUDIO_PLAY_SFX(NA_SE_EN_HEAVY_WALK1, actor->sfxSource, 4); + if (this->timer_0BC == 0) { + if (((this->animFrame == 40) || (this->animFrame == 80)) && (this->timer_0BC == 0)) { + AUDIO_PLAY_SFX(NA_SE_EN_HEAVY_WALK1, this->sfxSource, 4); } - Math_SmoothStepToF(&actor->fwork[15], 1.0f, 0.7f, 0.1f, 0.01f); - actor->animFrame++; - if (actor->animFrame >= Animation_GetFrameCount(&D_TI1_70067C4)) { - actor->animFrame = 0; + Math_SmoothStepToF(&this->fwork[15], 1.0f, 0.7f, 0.1f, 0.01f); + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_TI1_70067C4)) { + this->animFrame = 0; } - if ((actor->fwork[4] > 0.0f) || (actor->fwork[7] > 0.0f)) { - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + if ((this->fwork[4] > 0.0f) || (this->fwork[7] > 0.0f)) { + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, &D_i5_801B766C, &sp158); - actor->obj.pos.x += sp158.x; - actor->obj.pos.z += sp158.z; + this->obj.pos.x += sp158.x; + this->obj.pos.z += sp158.z; } } else { - Math_SmoothStepToF(&actor->fwork[15], 0.0f, 1.0f, 0.2f, 0.01f); - Math_SmoothStepToF(&actor->fwork[24], 0.0f, 1.0f, 0.1f, 0.01f); - actor->fwork[23] += actor->fwork[24]; - if (Animation_GetFrameCount(&D_TI1_70067C4) <= actor->fwork[23]) { - actor->fwork[23] = 0.0f; + Math_SmoothStepToF(&this->fwork[15], 0.0f, 1.0f, 0.2f, 0.01f); + Math_SmoothStepToF(&this->fwork[24], 0.0f, 1.0f, 0.1f, 0.01f); + this->fwork[23] += this->fwork[24]; + if (Animation_GetFrameCount(&D_TI1_70067C4) <= this->fwork[23]) { + this->fwork[23] = 0.0f; } - actor->animFrame = actor->fwork[23]; - if (actor->timer_0BC == 1) { - AUDIO_PLAY_SFX(NA_SE_EN_KANI_MOTOR, actor->sfxSource, 4); + this->animFrame = this->fwork[23]; + if (this->timer_0BC == 1) { + AUDIO_PLAY_SFX(NA_SE_EN_KANI_MOTOR, this->sfxSource, 4); } } - Animation_GetFrameData(&D_TI1_70067C4, actor->animFrame, spA4); - Math_SmoothStepToVec3fArray(spA4, actor->vwork, 1, 15, actor->fwork[15], 360.0f, 0.01f); - temp_fs0 = actor->vwork[0].y; - actor->vwork[0].y += actor->fwork[26]; - Animation_DrawSkeleton(0, D_TI1_7006990, actor->vwork, Titania_8018C118, Titania_8018C3D8, actor, + Animation_GetFrameData(&D_TI1_70067C4, this->animFrame, spA4); + Math_SmoothStepToVec3fArray(spA4, this->vwork, 1, 15, this->fwork[15], 360.0f, 0.01f); + temp_fs0 = this->vwork[0].y; + this->vwork[0].y += this->fwork[26]; + Animation_DrawSkeleton(0, aTi1DesertCrawlerSkel, this->vwork, Titania_8018C118, Titania_8018C3D8, this, &gIdentityMatrix); - actor->vwork[0].y = temp_fs0; - Math_SmoothStepToF(&actor->fwork[26], -60.0f, actor->fwork[15], 500.0f, 0.01f); + this->vwork[0].y = temp_fs0; + Math_SmoothStepToF(&this->fwork[26], -60.0f, this->fwork[15], 500.0f, 0.01f); - if (actor->health <= 0) { - actor->iwork[6] = 300; - actor->state = 5; - actor->animFrame = 0; - actor->timer_0BC = 30; - actor->fwork[15] = 0.0f; - AUDIO_PLAY_SFX(NA_SE_EN_KANI_STOP, actor->sfxSource, 4); + if (this->health <= 0) { + this->iwork[6] = 300; + this->state = 5; + this->animFrame = 0; + this->timer_0BC = 30; + this->fwork[15] = 0.0f; + AUDIO_PLAY_SFX(NA_SE_EN_KANI_STOP, this->sfxSource, 4); } break; case 5: - Math_SmoothStepToF(&actor->fwork[15], 1.0f, 1.0f, 0.015f, 0.01f); - Animation_GetFrameData(&D_TI1_7007130, actor->animFrame, spA4); - Math_SmoothStepToVec3fArray(spA4, actor->vwork, 1, 15, actor->fwork[15], 360.0f, 0.01f); - Math_SmoothStepToF(&actor->fwork[26], -40.0f, actor->fwork[15], 500.0f, 0.01f); - temp_fs0 = actor->vwork[0].y; - actor->vwork[0].y += actor->fwork[26]; - Animation_DrawSkeleton(0, D_TI1_7006990, actor->vwork, Titania_8018C118, Titania_8018C3D8, actor, + Math_SmoothStepToF(&this->fwork[15], 1.0f, 1.0f, 0.015f, 0.01f); + Animation_GetFrameData(&D_TI1_7007130, this->animFrame, spA4); + Math_SmoothStepToVec3fArray(spA4, this->vwork, 1, 15, this->fwork[15], 360.0f, 0.01f); + Math_SmoothStepToF(&this->fwork[26], -40.0f, this->fwork[15], 500.0f, 0.01f); + temp_fs0 = this->vwork[0].y; + this->vwork[0].y += this->fwork[26]; + Animation_DrawSkeleton(0, aTi1DesertCrawlerSkel, this->vwork, Titania_8018C118, Titania_8018C3D8, this, &gIdentityMatrix); - actor->vwork[0].y = temp_fs0; - actor->animFrame++; - if (actor->animFrame >= Animation_GetFrameCount(&D_TI1_7007130)) { - actor->animFrame = 0; + this->vwork[0].y = temp_fs0; + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_TI1_7007130)) { + this->animFrame = 0; } - if (actor->timer_0BC == 0) { - actor->state = 6; - actor->animFrame = 0; - actor->fwork[15] = 0.0f; + if (this->timer_0BC == 0) { + this->state = 6; + this->animFrame = 0; + this->fwork[15] = 0.0f; } break; case 6: - if (actor->animFrame == 18) { - actor->iwork[8] = 0; + if (this->animFrame == 18) { + this->iwork[8] = 0; } - actor->iwork[2] = 1; - Math_SmoothStepToF(&actor->fwork[15], 1.0f, 1.0f, 0.005f, 0.01f); - Animation_GetFrameData(&D_TI1_7006F74, actor->animFrame, spA4); - Math_SmoothStepToVec3fArray(spA4, actor->vwork, 1, 15, actor->fwork[15], 360.0f, 0.01f); - temp_fs0 = actor->vwork[0].y; - actor->vwork[0].y += actor->fwork[26]; - Animation_DrawSkeleton(0, D_TI1_7006990, actor->vwork, Titania_8018C118, Titania_8018C3D8, actor, + this->iwork[2] = 1; + Math_SmoothStepToF(&this->fwork[15], 1.0f, 1.0f, 0.005f, 0.01f); + Animation_GetFrameData(&D_TI1_7006F74, this->animFrame, spA4); + Math_SmoothStepToVec3fArray(spA4, this->vwork, 1, 15, this->fwork[15], 360.0f, 0.01f); + temp_fs0 = this->vwork[0].y; + this->vwork[0].y += this->fwork[26]; + Animation_DrawSkeleton(0, aTi1DesertCrawlerSkel, this->vwork, Titania_8018C118, Titania_8018C3D8, this, &gIdentityMatrix); - actor->vwork[0].y = temp_fs0; - if (actor->animFrame == 21) { - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, MTXF_APPLY); + this->vwork[0].y = temp_fs0; + if (this->animFrame == 21) { + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); - Matrix_MultVec3f(gCalcMatrix, (Vec3f*) &actor->fwork[12], &sp158); - func_effect_8007A900(actor->obj.pos.x + sp158.x, actor->obj.pos.y + sp158.y, actor->obj.pos.z + sp158.z, - 20.0f, 255, 8, 0); - Matrix_MultVec3f(gCalcMatrix, (Vec3f*) &actor->fwork[9], &sp158); - func_effect_8007A900(actor->obj.pos.x + sp158.x, actor->obj.pos.y + sp158.y, actor->obj.pos.z + sp158.z, - 20.0f, 255, 8, 0); - Matrix_MultVec3f(gCalcMatrix, (Vec3f*) &actor->fwork[3], &sp158); - func_effect_8007A900(actor->obj.pos.x + sp158.x, actor->obj.pos.y + sp158.y, actor->obj.pos.z + sp158.z, - 20.0f, 255, 8, 0); - Matrix_MultVec3f(gCalcMatrix, (Vec3f*) &actor->fwork[6], &sp158); - func_effect_8007A900(actor->obj.pos.x + sp158.x, actor->obj.pos.y + sp158.y, actor->obj.pos.z + sp158.z, - 20.0f, 255, 8, 0); - AUDIO_PLAY_SFX(NA_SE_OB_METAL_BOUND_M, actor->sfxSource, 4); + Matrix_MultVec3f(gCalcMatrix, (Vec3f*) &this->fwork[12], &sp158); + Effect_Effect359_Spawn(this->obj.pos.x + sp158.x, this->obj.pos.y + sp158.y, this->obj.pos.z + sp158.z, + 20.0f, 255, 8, 0); + Matrix_MultVec3f(gCalcMatrix, (Vec3f*) &this->fwork[9], &sp158); + Effect_Effect359_Spawn(this->obj.pos.x + sp158.x, this->obj.pos.y + sp158.y, this->obj.pos.z + sp158.z, + 20.0f, 255, 8, 0); + Matrix_MultVec3f(gCalcMatrix, (Vec3f*) &this->fwork[3], &sp158); + Effect_Effect359_Spawn(this->obj.pos.x + sp158.x, this->obj.pos.y + sp158.y, this->obj.pos.z + sp158.z, + 20.0f, 255, 8, 0); + Matrix_MultVec3f(gCalcMatrix, (Vec3f*) &this->fwork[6], &sp158); + Effect_Effect359_Spawn(this->obj.pos.x + sp158.x, this->obj.pos.y + sp158.y, this->obj.pos.z + sp158.z, + 20.0f, 255, 8, 0); + AUDIO_PLAY_SFX(NA_SE_OB_METAL_BOUND_M, this->sfxSource, 4); } - if ((actor->timer_0BC % 8) == 0) { - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, MTXF_APPLY); - Matrix_MultVec3f(gCalcMatrix, (Vec3f*) &actor->fwork[12], &sp158); - func_effect_8007D2C8(actor->obj.pos.x + sp158.x, actor->obj.pos.y + sp158.y, actor->obj.pos.z + sp158.z, + if ((this->timer_0BC % 8) == 0) { + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_MultVec3f(gCalcMatrix, (Vec3f*) &this->fwork[12], &sp158); + func_effect_8007D2C8(this->obj.pos.x + sp158.x, this->obj.pos.y + sp158.y, this->obj.pos.z + sp158.z, 1.5f); - Matrix_MultVec3f(gCalcMatrix, (Vec3f*) &actor->fwork[9], &sp158); - func_effect_8007D2C8(actor->obj.pos.x + sp158.x, actor->obj.pos.y + sp158.y, actor->obj.pos.z + sp158.z, + Matrix_MultVec3f(gCalcMatrix, (Vec3f*) &this->fwork[9], &sp158); + func_effect_8007D2C8(this->obj.pos.x + sp158.x, this->obj.pos.y + sp158.y, this->obj.pos.z + sp158.z, 1.5f); - Matrix_MultVec3f(gCalcMatrix, (Vec3f*) &actor->fwork[3], &sp158); - func_effect_8007D2C8(actor->obj.pos.x + sp158.x, actor->obj.pos.y + sp158.y, actor->obj.pos.z + sp158.z, + Matrix_MultVec3f(gCalcMatrix, (Vec3f*) &this->fwork[3], &sp158); + func_effect_8007D2C8(this->obj.pos.x + sp158.x, this->obj.pos.y + sp158.y, this->obj.pos.z + sp158.z, 1.5f); - Matrix_MultVec3f(gCalcMatrix, (Vec3f*) &actor->fwork[6], &sp158); - func_effect_8007D2C8(actor->obj.pos.x + sp158.x, actor->obj.pos.y + sp158.y, actor->obj.pos.z + sp158.z, + Matrix_MultVec3f(gCalcMatrix, (Vec3f*) &this->fwork[6], &sp158); + func_effect_8007D2C8(this->obj.pos.x + sp158.x, this->obj.pos.y + sp158.y, this->obj.pos.z + sp158.z, 1.5f); } - if (actor->animFrame < (Animation_GetFrameCount(&D_TI1_7006F74) - 1)) { - actor->animFrame++; + if (this->animFrame < (Animation_GetFrameCount(&D_TI1_7006F74) - 1)) { + this->animFrame++; } else { - Titania_8018C72C(actor); + Titania_8018C72C(this); } break; case 7: - Animation_GetFrameData(&D_TI1_7006F74, actor->animFrame, spA4); - Math_SmoothStepToVec3fArray(spA4, actor->vwork, 1, 15, actor->fwork[15], 360.0f, 0.01f); + Animation_GetFrameData(&D_TI1_7006F74, this->animFrame, spA4); + Math_SmoothStepToVec3fArray(spA4, this->vwork, 1, 15, this->fwork[15], 360.0f, 0.01f); break; case 8: - switch (actor->iwork[7]) { + switch (this->iwork[7]) { case 1: for (i = 0; i < 9U; i++) { - D_i5_801BD738[actor->iwork[0]][i].unk_18 |= 1; + D_i5_801BD738[this->iwork[0]][i].unk_18 |= 1; } - AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_L, actor->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_L, this->sfxSource, 4); gCameraShake = 20; gControllerRumbleTimers[0] = 16; - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, actor->obj.rot.z * M_DTOR, MTXF_APPLY); - func_effect_8007D2C8(actor->obj.pos.x, actor->fwork[27] + actor->obj.pos.y, actor->obj.pos.z, - 15.0f); - var_s1 = D_i5_801BD738[actor->iwork[0]]; + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); + func_effect_8007D2C8(this->obj.pos.x, this->fwork[27] + this->obj.pos.y, this->obj.pos.z, 15.0f); + var_s1 = D_i5_801BD738[this->iwork[0]]; for (i = 0; i < 9U; i++, var_s1++) { actorPtr = Game_SpawnActor(OBJ_ACTOR_DEBRIS); if ((actorPtr != NULL) && D_i5_801B7630[i][1] == 1) { actorPtr->state = 47; actorPtr->unk_048 = i; Matrix_MultVec3f(gCalcMatrix, &var_s1->unk_00.pos, &sp158); - actorPtr->obj.pos.x = actor->obj.pos.x + sp158.x; - actorPtr->obj.pos.y = actor->obj.pos.y + sp158.y; - actorPtr->obj.pos.z = actor->obj.pos.z + sp158.z; - actorPtr->obj.rot.x = var_s1->unk_00.rot.x + actor->obj.rot.x; - actorPtr->obj.rot.y = var_s1->unk_00.rot.y + actor->obj.rot.y; - actorPtr->obj.rot.z = var_s1->unk_00.rot.z + actor->obj.rot.z; + actorPtr->obj.pos.x = this->obj.pos.x + sp158.x; + actorPtr->obj.pos.y = this->obj.pos.y + sp158.y; + actorPtr->obj.pos.z = this->obj.pos.z + sp158.z; + actorPtr->obj.rot.x = var_s1->unk_00.rot.x + this->obj.rot.x; + actorPtr->obj.rot.y = var_s1->unk_00.rot.y + this->obj.rot.y; + actorPtr->obj.rot.z = var_s1->unk_00.rot.z + this->obj.rot.z; sp170 = Math_Atan2F(var_s1->unk_00.pos.z, var_s1->unk_00.pos.x); actorPtr->vel.x = __sinf(sp170) * (7.0f + RAND_FLOAT(5.0f)); actorPtr->vel.z = __cosf(sp170) * (7.0f + RAND_FLOAT(5.0f)); @@ -1642,12 +1649,12 @@ void Titania_Actor229_Update(Actor* actor) { actorPtr->state = 47; actorPtr->unk_048 = 9; Matrix_MultVec3f(gCalcMatrix, &var_s1->unk_00.pos, &sp158); - actorPtr->obj.pos.x = actor->obj.pos.x + sp158.x; - actorPtr->obj.pos.y = actor->obj.pos.y + sp158.y; - actorPtr->obj.pos.z = actor->obj.pos.z + sp158.z; - actorPtr->obj.rot.x = var_s1->unk_00.rot.x + actor->obj.rot.x; - actorPtr->obj.rot.y = var_s1->unk_00.rot.y + actor->obj.rot.y; - actorPtr->obj.rot.z = var_s1->unk_00.rot.z + actor->obj.rot.z; + actorPtr->obj.pos.x = this->obj.pos.x + sp158.x; + actorPtr->obj.pos.y = this->obj.pos.y + sp158.y; + actorPtr->obj.pos.z = this->obj.pos.z + sp158.z; + actorPtr->obj.rot.x = var_s1->unk_00.rot.x + this->obj.rot.x; + actorPtr->obj.rot.y = var_s1->unk_00.rot.y + this->obj.rot.y; + actorPtr->obj.rot.z = var_s1->unk_00.rot.z + this->obj.rot.z; sp170 = Math_Atan2F(var_s1->unk_00.pos.z, var_s1->unk_00.pos.x); actorPtr->vel.x = __sinf(sp170) * (7.0f + RAND_FLOAT(5.0f)); actorPtr->vel.z = __cosf(sp170) * (7.0f + RAND_FLOAT(5.0f)); @@ -1670,96 +1677,96 @@ void Titania_Actor229_Update(Actor* actor) { break; case 5: - D_i5_801B750C[actor->iwork[0]] = false; - Object_Kill(&actor->obj, actor->sfxSource); + D_i5_801B750C[this->iwork[0]] = false; + Object_Kill(&this->obj, this->sfxSource); break; } break; } - if (actor->health > 0) { - actor->info.targetOffset = actor->fwork[27]; + if (this->health > 0) { + this->info.targetOffset = this->fwork[27]; } else { - actor->lockOnTimers[TEAM_ID_FOX] = 0; - actor->info.targetOffset = 0.0f; + this->lockOnTimers[TEAM_ID_FOX] = 0; + this->info.targetOffset = 0.0f; } - actor->dmgType = DMG_NONE; + this->dmgType = DMG_NONE; } -void Titania_Actor229_Draw(Actor* actor) { +void Titania_TiDesertCrawler_Draw(TiDesertCrawler* this) { f32 sp34; - if ((actor->iwork[6] % 2) != 0) { + if ((this->iwork[6] % 2) != 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_31); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 127, 0, 0, 255); gDPSetEnvColor(gMasterDisp++, 255, 255, 255, 255); } - sp34 = actor->vwork[0].y; - actor->vwork[0].y += actor->fwork[26]; - Animation_DrawSkeleton(0, D_TI1_7006990, actor->vwork, Titania_8018C134, Titania_8018C370, actor, &gIdentityMatrix); - actor->vwork[0].y = sp34; + sp34 = this->vwork[0].y; + this->vwork[0].y += this->fwork[26]; + Animation_DrawSkeleton(0, aTi1DesertCrawlerSkel, this->vwork, Titania_TiDesertCrawler_OverrideLimbDraw, + Titania_TiDesertCrawler_PostLimbDraw, this, &gIdentityMatrix); + this->vwork[0].y = sp34; } -void Titania_8018E3B0(Actor* actor) { - D_i5_801B750C[actor->iwork[0]] = false; +void Titania_8018E3B0(TiDesertCrawler* this) { + D_i5_801B750C[this->iwork[0]] = false; } static Vec3f D_i5_801B7678 = { 0.0f, 388.0f, 103.0f }; static Vec3f D_i5_801B7684 = { 0.0f, 0.0f, 0.0f }; // unused -void Titania_8018E3CC(Actor* actor) { - Actor* actorPtr; +void Titania_TiDelphor_Init(TiDelphor* this) { + Actor* delphorHead; f32 sp40; Vec3f sp34; s32 i; - Ground_801B6E20(actor->obj.pos.x, actor->obj.pos.z + gPathProgress, &sp40, &actor->obj.pos.y, &sp40); + Ground_801B6E20(this->obj.pos.x, this->obj.pos.z + gPathProgress, &sp40, &this->obj.pos.y, &sp40); - actor->obj.pos.y -= 20.0f; - actorPtr = gActors; + this->obj.pos.y -= 20.0f; + delphorHead = gActors; - for (i = 0; i < ARRAY_COUNT(gActors); i++, actorPtr++) { - if (actorPtr->obj.status == OBJ_FREE) { - Actor_Initialize(actorPtr); - actorPtr->obj.status = OBJ_INIT; - actorPtr->obj.id = OBJ_ACTOR_228; - Object_SetInfo(&actorPtr->info, actorPtr->obj.id); - actorPtr->iwork[4] = (uintptr_t) actor; - actor->iwork[0] = (uintptr_t) actorPtr; - actorPtr->fwork[6] = D_i5_801B7518[0]; - actorPtr->obj.rot.x = (D_i5_801B7518[0] + D_i5_801B7518[1]) * 0.5f; - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + for (i = 0; i < ARRAY_COUNT(gActors); i++, delphorHead++) { + if (delphorHead->obj.status == OBJ_FREE) { + Actor_Initialize(delphorHead); + delphorHead->obj.status = OBJ_INIT; + delphorHead->obj.id = OBJ_ACTOR_TI_DELPHOR_HEAD; + Object_SetInfo(&delphorHead->info, delphorHead->obj.id); + delphorHead->iwork[4] = (uintptr_t) this; + this->iwork[0] = (uintptr_t) delphorHead; + delphorHead->fwork[6] = D_i5_801B7518[0]; + delphorHead->obj.rot.x = (D_i5_801B7518[0] + D_i5_801B7518[1]) * 0.5f; + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, &D_i5_801B7678, &sp34); - actorPtr->obj.pos.x = actor->fwork[0] = actor->obj.pos.x + sp34.x; - actorPtr->obj.pos.y = actor->fwork[1] = actor->obj.pos.y + sp34.y; - actorPtr->obj.pos.z = actor->fwork[2] = actor->obj.pos.z + sp34.z; - actorPtr->obj.rot.y = actor->obj.rot.y; + delphorHead->obj.pos.x = this->fwork[0] = this->obj.pos.x + sp34.x; + delphorHead->obj.pos.y = this->fwork[1] = this->obj.pos.y + sp34.y; + delphorHead->obj.pos.z = this->fwork[2] = this->obj.pos.z + sp34.z; + delphorHead->obj.rot.y = this->obj.rot.y; break; } } if (i == 60) { - Object_Kill(&actor->obj, actor->sfxSource); + Object_Kill(&this->obj, this->sfxSource); } } -void Titania_Actor227_Update(Actor* actor) { - - actor->iwork[1]++; - if ((actor->iwork[0] == (uintptr_t) NULL) && ((actor->iwork[1] & 3) == 0)) { - func_effect_8007C120(actor->fwork[0], actor->fwork[1], actor->fwork[2], 0.0f, 0.0f, 0.0f, 0.0625f, 10); +void Titania_TiDelphor_Update(TiDelphor* this) { + this->iwork[1]++; + if ((this->iwork[0] == (uintptr_t) NULL) && ((this->iwork[1] & 3) == 0)) { + Effect_Effect390_Spawn(this->fwork[0], this->fwork[1], this->fwork[2], 0.0f, 0.0f, 0.0f, 0.0625f, 10); } } -void Titania_Actor227_Draw(Actor* actor) { - gSPDisplayList(gMasterDisp++, D_TI1_70098E0); +void Titania_TiDelphor_Draw(TiDelphor* this) { + gSPDisplayList(gMasterDisp++, aTiDelphorDL); } -void Titania_8018E5E8(Actor* actor) { - actor->health = 100; +void Titania_TiDelphorHead_Init(TiDelphorHead* this) { + this->health = 100; } -void Titania_Actor228_Update(Actor* actor) { +void Titania_TiDelphorHead_Update(TiDelphorHead* this) { f32 spA4; f32 spA0; f32 sp9C; @@ -1784,132 +1791,153 @@ void Titania_Actor228_Update(Actor* actor) { f32 sp40; s32 index; - sp9C = gPlayer[0].pos.x - actor->obj.pos.x; - spA0 = (gPlayer[0].pos.y - actor->obj.pos.y) - 30.0f; - spA4 = gPlayer[0].trueZpos - actor->obj.pos.z; + sp9C = gPlayer[0].pos.x - this->obj.pos.x; + spA0 = (gPlayer[0].pos.y - this->obj.pos.y) - 30.0f; + spA4 = gPlayer[0].trueZpos - this->obj.pos.z; - switch (actor->state) { + switch (this->state) { case 0: - if (Math_SmoothStepToAngle(&actor->obj.rot.x, actor->fwork[6], 0.2f, 1.0f, 0.01f) == 0.0f) { - actor->iwork[1] = 1 - actor->iwork[1]; - actor->fwork[6] = D_i5_801B7518[actor->iwork[1]]; + if (Math_SmoothStepToAngle(&this->obj.rot.x, this->fwork[6], 0.2f, 1.0f, 0.01f) == 0.0f) { + this->iwork[1] = 1 - this->iwork[1]; + this->fwork[6] = D_i5_801B7518[this->iwork[1]]; } + if (spA4 <= 2500.0f) { - actor->state++; + this->state++; } break; + case 1: - actor->fwork[7] = Math_Atan2F(sp9C, spA4) * M_RTOD; - actor->fwork[6] = -Math_Atan2F(spA0, sqrtf(SQ(sp9C) + SQ(spA4))) * M_RTOD; - Math_SmoothStepToAngle(&actor->obj.rot.y, actor->fwork[7], 0.1f, 1.3333334f, 0.01f); - Math_SmoothStepToAngle(&actor->obj.rot.x, actor->fwork[6], 0.1f, 1.3333334f, 0.01f); + this->fwork[7] = Math_Atan2F(sp9C, spA4) * M_RTOD; + this->fwork[6] = -Math_Atan2F(spA0, sqrtf(SQ(sp9C) + SQ(spA4))) * M_RTOD; + + Math_SmoothStepToAngle(&this->obj.rot.y, this->fwork[7], 0.1f, 1.3333334f, 0.01f); + Math_SmoothStepToAngle(&this->obj.rot.x, this->fwork[6], 0.1f, 1.3333334f, 0.01f); break; + case 2: - if (actor->obj.rot.y < 0.0f) { - actor->obj.rot.y += 360.0f; - } else if (actor->obj.rot.y >= 360.0f) { - actor->obj.rot.y -= 360.0f; + if (this->obj.rot.y < 0.0f) { + this->obj.rot.y += 360.0f; + } else if (this->obj.rot.y >= 360.0f) { + this->obj.rot.y -= 360.0f; } - if (actor->obj.rot.y > 180.0f) { - actor->fwork[8] = 90.0f; + if (this->obj.rot.y > 180.0f) { + this->fwork[8] = 90.0f; } else { - actor->fwork[8] = 270.0f; + this->fwork[8] = 270.0f; } - actor->fwork[9] = 0.0f; - actor->timer_0BC = 10; - func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f); - actor->iwork[2] = 1; - index = actor->iwork[3]; + + this->fwork[9] = 0.0f; + this->timer_0BC = 10; + + func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 10.0f); + + this->iwork[2] = 1; + + index = this->iwork[3]; if (index > 0) { gTexturedLines[index - 1].mode = 0; } - actor->state++; + this->state++; break; + case 3: - Math_SmoothStepToF(&actor->fwork[9], 5.0f, 0.05f, 0.5f, 0.01f); - Math_SmoothStepToAngle(&actor->obj.rot.z, actor->fwork[8], 1.0f, actor->fwork[9], 0.01f); - if (actor->timer_0BC == 0) { - actor->gravity = 0.5f; + Math_SmoothStepToF(&this->fwork[9], 5.0f, 0.05f, 0.5f, 0.01f); + Math_SmoothStepToAngle(&this->obj.rot.z, this->fwork[8], 1.0f, this->fwork[9], 0.01f); + + if (this->timer_0BC == 0) { + this->gravity = 0.5f; } - if (actor->timer_0BE == 0) { - func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f); - actor->timer_0BE = 10; + if (this->timer_0BE == 0) { + func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 10.0f); + this->timer_0BE = 10; } - Ground_801B6E20(actor->obj.pos.x, actor->obj.pos.z + gPathProgress, &sp80, &sp7C, &sp80); - if (actor->obj.pos.y < (94.0f + sp7C)) { + + Ground_801B6E20(this->obj.pos.x, this->obj.pos.z + gPathProgress, &sp80, &sp7C, &sp80); + + if (this->obj.pos.y < (94.0f + sp7C)) { spA4 = fabsf(spA4); if (spA4 < 5000.0f) { - actor->iwork[7] = (s32) (spA4 / 200.0f); - actor->iwork[8] = (s32) ((5000.0f - spA4) / 714.0f); + this->iwork[7] = (s32) (spA4 / 200.0f); + this->iwork[8] = (s32) ((5000.0f - spA4) / 714.0f); } - AUDIO_PLAY_SFX(NA_SE_EN_METAL_BOUND_M, actor->sfxSource, 4); - actor->vel.y = 0.0f; - actor->gravity = 0.0f; - actor->obj.pos.y = 94.0f + sp7C; - actor->state++; + AUDIO_PLAY_SFX(NA_SE_EN_METAL_BOUND_M, this->sfxSource, 4); + this->vel.y = 0.0f; + this->gravity = 0.0f; + this->obj.pos.y = 94.0f + sp7C; + this->state++; } break; + case 4: - if (actor->iwork[7] > 0) { - actor->iwork[7]--; - } else if ((gPlayer[0].grounded != 0) && (actor->iwork[8] > 0)) { + if (this->iwork[7] > 0) { + this->iwork[7]--; + } else if ((gPlayer[0].grounded != 0) && (this->iwork[8] > 0)) { gControllerRumbleFlags[0] = 1; - actor->iwork[8]--; + this->iwork[8]--; } break; } - if ((actor->state == 0) || (actor->state == 1)) { - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, actor->obj.rot.x * M_DTOR, MTXF_APPLY); + + if ((this->state == 0) || (this->state == 1)) { + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + sp90.x = 0.0f; sp90.y = 39.0f; sp90.z = 115.0f; + Matrix_MultVec3f(gCalcMatrix, &sp90, &sp84); - actor->fwork[0] = sp84.x; - actor->fwork[1] = sp84.y; - actor->fwork[2] = sp84.z; + + this->fwork[0] = sp84.x; + this->fwork[1] = sp84.y; + this->fwork[2] = sp84.z; + sp90.x = 0.0f; sp90.y = 39.0f; sp90.z = 3115.0f; + Matrix_MultVec3f(gCalcMatrix, &sp90, &sp84); - actor->fwork[3] = sp84.x; - actor->fwork[4] = sp84.y; - actor->fwork[5] = sp84.z; - if (actor->dmgType > DMG_NONE) { - actor->dmgType = DMG_NONE; - actor->timer_0C6 = 10; - if (actor->health > 0) { - actor->health -= actor->damage; - if (actor->health <= 0) { - BonusText_Display(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + actor->fwork[27], 2); + + this->fwork[3] = sp84.x; + this->fwork[4] = sp84.y; + this->fwork[5] = sp84.z; + + if (this->dmgType > DMG_NONE) { + this->dmgType = DMG_NONE; + this->timer_0C6 = 10; + if (this->health > 0) { + this->health -= this->damage; + if (this->health <= 0) { + BonusText_Display(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + this->fwork[27], 2); gHitCount += 2; - actor->lockOnTimers[TEAM_ID_FOX] = actor->health = actor->itemDrop = 0; - actor->info.targetOffset = 0.0f; - Actor_Despawn(actor); - actor->info.bonus = 0; - ((Actor*) actor->iwork[4])->iwork[0] = 0; - actor->iwork[5] = 0; - actor->state = 2; + this->lockOnTimers[TEAM_ID_FOX] = this->health = this->itemDrop = 0; + this->info.targetOffset = 0.0f; + Actor_Despawn(this); + this->info.bonus = 0; + ((Actor*) this->iwork[4])->iwork[0] = 0; + this->iwork[5] = 0; + this->state = 2; } } } } - if (actor->iwork[3] == 0) { + if (this->iwork[3] == 0) { for (i = 0; i < ARRAY_COUNT(gTexturedLines); i++) { if (gTexturedLines[i].mode == 0) { - actor->iwork[3] = i + 1; + this->iwork[3] = i + 1; break; } } } - sp68 = (actor->fwork[3] - actor->fwork[0]) / 3000.0f; - sp64 = (actor->fwork[4] - actor->fwork[1]) / 3000.0f; - sp60 = (actor->fwork[5] - actor->fwork[2]) / 3000.0f; - sp40 = actor->obj.pos.x + actor->fwork[0]; - sp44 = actor->obj.pos.y + actor->fwork[1]; - sp48 = actor->obj.pos.z + actor->fwork[2]; + sp68 = (this->fwork[3] - this->fwork[0]) / 3000.0f; + sp64 = (this->fwork[4] - this->fwork[1]) / 3000.0f; + sp60 = (this->fwork[5] - this->fwork[2]) / 3000.0f; + sp40 = this->obj.pos.x + this->fwork[0]; + sp44 = this->obj.pos.y + this->fwork[1]; + sp48 = this->obj.pos.z + this->fwork[2]; for (i = 0; i <= 3000; i += 50) { sp5C = (sp68 * i) + sp40; @@ -1920,12 +1948,13 @@ void Titania_Actor228_Update(Actor* actor) { } } - if (actor->iwork[2] == 0) { - index = actor->iwork[3] - 1; + if (this->iwork[2] == 0) { + index = this->iwork[3] - 1; + gTexturedLines[index].mode = 101; - gTexturedLines[index].posAA.x = actor->obj.pos.x + actor->fwork[0]; - gTexturedLines[index].posAA.y = actor->obj.pos.y + actor->fwork[1]; - gTexturedLines[index].posAA.z = actor->obj.pos.z + actor->fwork[2]; + gTexturedLines[index].posAA.x = this->obj.pos.x + this->fwork[0]; + gTexturedLines[index].posAA.y = this->obj.pos.y + this->fwork[1]; + gTexturedLines[index].posAA.z = this->obj.pos.z + this->fwork[2]; gTexturedLines[index].prim.r = 255; gTexturedLines[index].prim.g = 255; gTexturedLines[index].prim.b = 0; @@ -1934,7 +1963,8 @@ void Titania_Actor228_Update(Actor* actor) { gTexturedLines[index].posBB.y = sp70; gTexturedLines[index].posBB.z = sp54; gTexturedLines[index].xyScale = 3.0f; - if (actor->timer_0C0 == 0) { + + if (this->timer_0C0 == 0) { gTexturedLines[index].prim.r = 255; gTexturedLines[index].prim.g = 255; gTexturedLines[index].prim.b = 64; @@ -1943,20 +1973,23 @@ void Titania_Actor228_Update(Actor* actor) { gTexturedLines[index].prim.g = 100; gTexturedLines[index].prim.b = 0; } + if (i <= 3000) { - if (actor->timer_0C0 == 0) { - func_effect_8007D1E0(sp5C, sp70 + 5.0f, sp54, 2.0f); + if (this->timer_0C0 == 0) { + Effect_Effect341_Spawn(sp5C, sp70 + 5.0f, sp54, 2.0f); } - temp_v0_3 = actor->iwork[5]; + + temp_v0_3 = (Effect*) this->iwork[5]; + if (temp_v0_3 == NULL) { - temp_v0_4 = func_effect_8007783C(OBJ_EFFECT_TIMED_SFX); + temp_v0_4 = Effect_Load(OBJ_EFFECT_TIMED_SFX); if (temp_v0_4 != NULL) { temp_v0_4->obj.status = OBJ_ACTIVE; temp_v0_4->obj.pos.x = sp5C; temp_v0_4->obj.pos.y = sp70 + 5.0f; temp_v0_4->obj.pos.z = sp54; temp_v0_4->timer_50 = 2; - actor->iwork[5] = (uintptr_t) temp_v0_4; + this->iwork[5] = (uintptr_t) temp_v0_4; AUDIO_PLAY_SFX(NA_SE_EN_LASER_BEAM, temp_v0_4->sfxSource, 4); } } else { @@ -1966,18 +1999,18 @@ void Titania_Actor228_Update(Actor* actor) { temp_v0_3->timer_50 = 2; } } else { - actor->iwork[5] = 0; + this->iwork[5] = 0; } - if (actor->timer_0C0 == 0) { - actor->timer_0C0 = 3; + + if (this->timer_0C0 == 0) { + this->timer_0C0 = 3; } } } -void Titania_Actor228_Draw(Actor* actor) { - +void Titania_TiDelphorHead_Draw(Actor* this) { gSPDisplayList(gMasterDisp++, D_TI1_7008930); - if ((actor->timer_0C6 % 2) == 0) { + if ((this->timer_0C6 % 2) == 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_34); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 220, 220, 220, 255); } else { @@ -1987,36 +2020,35 @@ void Titania_Actor228_Draw(Actor* actor) { gSPDisplayList(gMasterDisp++, D_TI1_7009510); } -void Titania_8018EFF0(Sprite* sprite) { +void Titania_TiCactus_Init(TiCactus* this) { f32 sp24; f32 sp20; - Ground_801B6E20(sprite->obj.pos.x, sprite->obj.pos.z + gPathProgress, &sp20, &sp24, &sp20); - sprite->obj.pos.y = sp24; + Ground_801B6E20(this->obj.pos.x, this->obj.pos.z + gPathProgress, &sp20, &sp24, &sp20); + this->obj.pos.y = sp24; } -void Titania_Cactus_Update(Sprite* sprite) { - sprite->obj.rot.y = Math_Atan2F(gPlayer[0].cam.eye.x - sprite->obj.pos.x, - gPlayer[0].cam.eye.z - (sprite->obj.pos.z + gPathProgress)) * - M_RTOD; - if (sprite->destroy != 0) { - func_effect_8007D074(sprite->obj.pos.x, sprite->obj.pos.y + 96.0f, sprite->obj.pos.z, 4.0f); - sprite->obj.status = OBJ_FREE; - Effect_SpawnTimedSfxAtPos(&sprite->obj.pos, NA_SE_OB_EXPLOSION_S); +void Titania_Cactus_Update(TiCactus* this) { + this->obj.rot.y = + Math_Atan2F(gPlayer[0].cam.eye.x - this->obj.pos.x, gPlayer[0].cam.eye.z - (this->obj.pos.z + gPathProgress)) * + M_RTOD; + if (this->destroy) { + func_effect_8007D074(this->obj.pos.x, this->obj.pos.y + 96.0f, this->obj.pos.z, 4.0f); + this->obj.status = OBJ_FREE; + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_OB_EXPLOSION_S); } } -void Titania_8018F0D8(Scenery* scenery) { - - if (scenery->obj.rot.x != 0.0f) { - if (scenery->obj.rot.x >= 10000.0f) { - scenery->unk_44 = 1; - scenery->obj.rot.x -= 10000.0f; +void Titania_TiPillar_Init(TiPillar* this) { + if (this->obj.rot.x != 0.0f) { + if (this->obj.rot.x >= 10000.0f) { + this->unk_44 = 1; + this->obj.rot.x -= 10000.0f; } - scenery->vel.y = scenery->obj.rot.x; - scenery->obj.rot.x = 0.0f; + this->vel.y = this->obj.rot.x; + this->obj.rot.x = 0.0f; } - scenery->vel.z = scenery->obj.pos.x; + this->vel.z = this->obj.pos.x; } static Vec3f D_i5_801B7690 = { 0.0f, 460.0f, 0.0f }; @@ -2029,138 +2061,145 @@ Gfx* D_TI_801B769C[39] = { D_TI2_7004400, D_TI2_7009890, D_TI_8001A80, D_TI_A001DB0, D_TI_A001EC0, D_TI_A001BE0, D_TI2_7004270, }; -void Titania_8018F134(Scenery* scenery) { +void Titania_8018F134(TiPillar* this) { Vec3f sp7C; Vec3f sp70; f32 i; f32* j = &D_i5_801B7690.x; - switch (scenery->unk_44) { + switch (this->unk_44) { case 0: - Matrix_RotateY(gCalcMatrix, scenery->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, scenery->obj.rot.x * M_DTOR, MTXF_APPLY); - if ((scenery->obj.rot.y <= 30.0f) || (scenery->obj.rot.y >= 330.0f)) { + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + + if ((this->obj.rot.y <= 30.0f) || (this->obj.rot.y >= 330.0f)) { for (*j = -80.0f; *j <= 80.0f; *j += 40.0f) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_i5_801B7690, &sp70); - func_effect_8007A900(scenery->obj.pos.x + sp70.x, scenery->obj.pos.y + sp70.y, - scenery->obj.pos.z + sp70.z, 10.0f, 255, 15, 0); + Effect_Effect359_Spawn(this->obj.pos.x + sp70.x, this->obj.pos.y + sp70.y, this->obj.pos.z + sp70.z, + 10.0f, 255, 15, 0); } } else { sp7C.z = 0.0f; sp7C.x = -80.0f; - if (scenery->obj.rot.y > 90.0f) { + if (this->obj.rot.y > 90.0f) { sp7C.x = 80.0f; } for (i = 0.0f; i <= 450.0f; i += 50.0f) { - Matrix_RotateY(gCalcMatrix, scenery->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, scenery->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); sp7C.y = i; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp7C, &sp70); - func_effect_8007A900(scenery->obj.pos.x + sp70.x, scenery->obj.pos.y + sp70.y, - scenery->obj.pos.z + sp70.z, 10.0f, 255, 15, 0); + Effect_Effect359_Spawn(this->obj.pos.x + sp70.x, this->obj.pos.y + sp70.y, this->obj.pos.z + sp70.z, + 10.0f, 255, 15, 0); } } break; + case 1: - Matrix_RotateZ(gCalcMatrix, scenery->obj.rot.z * M_DTOR, MTXF_NEW); + Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_NEW); sp7C.z = 0.0f; sp7C.x = 0.0f; for (i = 0.0f; i <= 450.0f; i += 50.0f) { sp7C.y = i; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp7C, &sp70); - func_effect_8007A900(scenery->obj.pos.x + sp70.x, scenery->obj.pos.y + sp70.y, - scenery->obj.pos.z + sp70.z, 10.0f, 255, 15, 0); + Effect_Effect359_Spawn(this->obj.pos.x + sp70.x, this->obj.pos.y + sp70.y, this->obj.pos.z + sp70.z, + 10.0f, 255, 15, 0); } break; } } -void Titania_Scenery57_Update(Scenery* scenery) { - f32 temp; +void Titania_TiPillar_Update(TiPillar* this) { + f32 zDist; - switch (scenery->state) { + switch (this->state) { case 0: - temp = gPlayer[0].pos.z - scenery->obj.pos.z; - if ((scenery->vel.y != 0.0f) && (temp < scenery->vel.y)) { - if ((scenery->unk_44 == 1) && (scenery->obj.pos.x < gPlayer[0].pos.x)) { - scenery->unk_44 = 2; + zDist = gPlayer[0].pos.z - this->obj.pos.z; + if ((this->vel.y != 0.0f) && (zDist < this->vel.y)) { + if ((this->unk_44 == 1) && (this->obj.pos.x < gPlayer[0].pos.x)) { + this->unk_44 = 2; } - scenery->state++; + this->state++; } break; + case 1: - scenery->state++; + this->state++; /* fallthrough */ case 2: - scenery->vel.x += 0.05f; - switch (scenery->unk_44) { + this->vel.x += 0.05f; + switch (this->unk_44) { case 0: - scenery->obj.rot.x += scenery->vel.x; - if (scenery->obj.rot.x >= 90.0f) { - scenery->obj.rot.x = 90.0f; - scenery->state++; + this->obj.rot.x += this->vel.x; + if (this->obj.rot.x >= 90.0f) { + this->obj.rot.x = 90.0f; + this->state++; gControllerRumbleTimers[0] = 7; gCameraShake = 12; - Titania_8018F134(scenery); - AUDIO_PLAY_SFX(NA_SE_EN_METAL_BOUND_M, scenery->sfxSource, 4); + Titania_8018F134(this); + AUDIO_PLAY_SFX(NA_SE_EN_METAL_BOUND_M, this->sfxSource, 4); } break; + case 1: - scenery->obj.rot.z += scenery->vel.x; - if (scenery->obj.rot.z >= 90.0f) { - scenery->obj.rot.z = 90.0f; + this->obj.rot.z += this->vel.x; + if (this->obj.rot.z >= 90.0f) { + this->obj.rot.z = 90.0f; gControllerRumbleTimers[0] = 7; gCameraShake = 12; - Titania_8018F134(scenery); - AUDIO_PLAY_SFX(NA_SE_EN_METAL_BOUND_M, scenery->sfxSource, 4); - scenery->state++; + Titania_8018F134(this); + AUDIO_PLAY_SFX(NA_SE_EN_METAL_BOUND_M, this->sfxSource, 4); + this->state++; } break; + case 2: - scenery->obj.rot.z -= scenery->vel.x; - if (scenery->obj.rot.z <= -90.0f) { - scenery->obj.rot.z = -90.0f; + this->obj.rot.z -= this->vel.x; + if (this->obj.rot.z <= -90.0f) { + this->obj.rot.z = -90.0f; gControllerRumbleTimers[0] = 7; gCameraShake = 12; - Titania_8018F134(scenery); - AUDIO_PLAY_SFX(NA_SE_EN_METAL_BOUND_M, scenery->sfxSource, 4); - scenery->state++; + Titania_8018F134(this); + AUDIO_PLAY_SFX(NA_SE_EN_METAL_BOUND_M, this->sfxSource, 4); + this->state++; } break; } break; + case 3: break; } - if (scenery->unk_44 != 0) { - if (scenery->obj.rot.z == 0.0f) { - scenery->obj.pos.x = scenery->vel.z; - scenery->info.hitbox = SEGMENTED_TO_VIRTUAL(D_TI_6006BF0); - } else if (scenery->obj.rot.z > 0.0f) { - scenery->obj.pos.x = scenery->vel.z - 75.0f; - scenery->info.hitbox = SEGMENTED_TO_VIRTUAL(D_TI_6006C28); + + if (this->unk_44 != 0) { + if (this->obj.rot.z == 0.0f) { + this->obj.pos.x = this->vel.z; + this->info.hitbox = SEGMENTED_TO_VIRTUAL(aTiPillarHitbox); + } else if (this->obj.rot.z > 0.0f) { + this->obj.pos.x = this->vel.z - 75.0f; + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_TI_6006C28); } else { - scenery->obj.pos.x = scenery->vel.z + 75.0f; - scenery->info.hitbox = SEGMENTED_TO_VIRTUAL(D_TI_6006C0C); + this->obj.pos.x = this->vel.z + 75.0f; + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_TI_6006C0C); } } } -void Titania_Scenery57_Draw(Scenery* scenery) { - - switch (scenery->unk_44) { +void Titania_TiPillar_Draw(TiPillar* this) { + switch (this->unk_44) { case 0: - if (scenery->unk_44 == 0) { + if (this->unk_44 == 0) { gSPDisplayList(gMasterDisp++, D_TI1_7002270); } else { gSPDisplayList(gMasterDisp++, D_TI1_7000A80); } break; + case 1: case 2: - if (scenery->obj.rot.z != 0.0f) { - if (scenery->obj.rot.z > 0.0f) { + if (this->obj.rot.z != 0.0f) { + if (this->obj.rot.z > 0.0f) { Matrix_Translate(gGfxMatrix, 75.0f, 0.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); } else { @@ -2168,7 +2207,8 @@ void Titania_Scenery57_Draw(Scenery* scenery) { Matrix_SetGfxMtx(&gMasterDisp); } } - if (scenery->unk_44 == 0) { + + if (this->unk_44 == 0) { gSPDisplayList(gMasterDisp++, D_TI1_7002270); } else { gSPDisplayList(gMasterDisp++, D_TI1_7000A80); @@ -2177,7 +2217,7 @@ void Titania_Scenery57_Draw(Scenery* scenery) { } } -void Titania_Boss306_Init(Boss306* this) { +void Titania_TiGoras_Init(TiGoras* this) { s32 pad[2]; f32* sp1C; s32 i; @@ -2198,14 +2238,16 @@ void Titania_Boss306_Init(Boss306* this) { gBossActive = true; this->fwork[2] = 1.0f; this->fwork[4] = 730.0f; + for (i = 0; i < ARRAY_COUNT(D_i5_801BD668); i++) { D_i5_801BD668[i] = 0; D_i5_801BD6B0[i] = 0.0f; } + this->fwork[49] = this->obj.rot.y; this->obj.rot.y = 0.0f; - var_v1 = D_i5_801BBF00; - for (i = 0; i < ARRAY_COUNTU(D_i5_801BBF00); i++, var_v1++) { + + for (var_v1 = D_i5_801BBF00, i = 0; i < ARRAY_COUNTU(D_i5_801BBF00); i++, var_v1++) { var_v1->unk_26 = 0; var_v1->unk_00.pos.x = var_v1->unk_00.pos.y = var_v1->unk_00.pos.z = var_v1->unk_00.rot.x = var_v1->unk_00.rot.y = var_v1->unk_00.rot.z = var_v1->unk_18 = var_v1->unk_1C = var_v1->unk_20 = 0.0f; @@ -2216,13 +2258,16 @@ void Titania_Boss306_Init(Boss306* this) { D_i5_801BCDC8[i].x = D_i5_801BCDC8[i].y = D_i5_801BCDC8[i].z = 0.0f; D_i5_801BC978[i].x = D_i5_801BC978[i].y = D_i5_801BC978[i].z = 0.0f; } + this->swork[9] = 50; this->swork[10] = 50; this->swork[11] = 50; this->swork[12] = 50; this->swork[21] = 100; + sp1C = D_i5_801BBEF4 = Memory_Allocate(76 * sizeof(f32)); var_a1_2 = D_i5_801BBEF0 = Memory_Allocate(50 * sizeof(s32)); + for (i = 0; i < 50; i++, var_a1_2++) { *var_a1_2 = 0; } @@ -2234,59 +2279,70 @@ void Titania_Boss306_Init(Boss306* this) { D_i5_801BBEF8 = SEGMENTED_TO_VIRTUAL(D_TI_8000FC0); } -bool Titania_8018FC70(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { +bool Titania_8018FC70(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { f32 sp24; if (D_i5_801BBEF0[30] != 0) { sp24 = (D_i5_801BBEF0[30] / 15.0f) * D_i5_801BBEF0[32]; rot->z += SIN_DEG((D_i5_801BBEF0[30] / (f32) D_i5_801BBEF0[31]) * 360.0f) * sp24; } + switch (limbIndex) { case 0: Matrix_Translate(gCalcMatrix, D_i5_801BBEF4[36], D_i5_801BBEF4[37], D_i5_801BBEF4[38], MTXF_APPLY); Matrix_RotateY(gCalcMatrix, D_i5_801BBEF4[64] * M_DTOR, MTXF_APPLY); break; + case 1: case 2: case 3: rot->z += D_i5_801BBEF4[66]; break; } + Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, MTXF_APPLY); Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); + switch (limbIndex) { case 1: case 2: case 3: case 7: RCP_SetupDL(&gMasterDisp, SETUPDL_30); + if ((D_i5_801BBEF0[30] % 2) != 0) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); } + if (*dList != NULL) { gSPDisplayList(gMasterDisp++, *dList); } break; + case 8: case 9: case 10: case 11: RCP_SetupDL(&gMasterDisp, SETUPDL_61); + if ((D_i5_801BBEF0[30] % 2) != 0) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); } + gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); + if (*dList != NULL) { gSPDisplayList(gMasterDisp++, *dList); } + RCP_SetupDL(&gMasterDisp, SETUPDL_29); break; } @@ -2393,7 +2449,7 @@ static UnkStruct_i5_801B8198 D_i5_801B8198[33] = { { 18, 15, NULL, 0 }, { 19, 10, NULL, 0 }, { 58, 5, NULL, 0 }, }; -f32 D_TI_801B83A8[517] = { +f32 aTiGorasHitbox[517] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, @@ -2462,8 +2518,8 @@ static Vec3f D_i5_801B8D30 = { 47.0f, 0.0f, 0.0f }; static Vec3f D_i5_801B8D3C = { 158.0f, 4.0f, 0.0f }; static Vec3f D_i5_801B8D48 = { 0.0f, 0.0f, 60.0f }; -void Titania_8019002C(s32 limbIndex, Vec3f* rot, void* data) { - Boss* boss = (Boss*) data; +void Titania_8019002C(s32 limbIndex, Vec3f* rot, void* thisx) { + TiGoras* this = (TiGoras*) thisx; s32 i; s32 j; s32* var_s6; @@ -2478,7 +2534,7 @@ void Titania_8019002C(s32 limbIndex, Vec3f* rot, void* data) { var_s6 = D_i5_801B8C24[i]; temp_s3 = var_s6[2]; if (limbIndex == var_s6[0]) { - var_s0 = &D_TI_801B83A8[D_i5_801B8CF4[D_i5_801BBEF0[25]] * 6 + var_s6[3] * 6 + 1]; + var_s0 = &aTiGorasHitbox[D_i5_801B8CF4[D_i5_801BBEF0[25]] * 6 + var_s6[3] * 6 + 1]; temp = var_s6[1]; for (j = 0; j < temp_s3; j++) { @@ -2496,6 +2552,7 @@ void Titania_8019002C(s32 limbIndex, Vec3f* rot, void* data) { } } } + if (limbIndex == 7) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 180.0f, 36.0f, 0.0f, MTXF_APPLY); @@ -2516,11 +2573,11 @@ void Titania_8019002C(s32 limbIndex, Vec3f* rot, void* data) { gSPDisplayList(gMasterDisp++, D_1024AC0); RCP_SetupDL(&gMasterDisp, SETUPDL_30); Matrix_Pop(&gGfxMatrix); - Matrix_MultVec3f(gCalcMatrix, &D_i5_801B8D3C, (Vec3f*) &boss->fwork[29]); + Matrix_MultVec3f(gCalcMatrix, &D_i5_801B8D3C, (Vec3f*) &this->fwork[29]); } } -bool Titania_801903A0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { +bool Titania_801903A0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { f32 sp24; s32 sp20; @@ -2533,6 +2590,7 @@ bool Titania_801903A0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* Matrix_RotateY(gCalcMatrix, D_i5_801BBEF4[56] * M_DTOR, MTXF_APPLY); } } + if (D_i5_801BBEF0[25] == 1) { sp20 = D_i5_801BBEF0[33] % 2U; if (D_i5_801BBEF0[33] != 0) { @@ -2546,46 +2604,55 @@ bool Titania_801903A0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* rot->z += SIN_DEG((D_i5_801BBEF0[34] / (f32) D_i5_801BBEF0[36]) * 360.0f) * sp24; } } + Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, MTXF_APPLY); Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); + switch (limbIndex) { case 1: case 2: RCP_SetupDL(&gMasterDisp, SETUPDL_30); + if ((sp20 % 2) != 0) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); } + if (*dList != NULL) { gSPDisplayList(gMasterDisp++, *dList); } break; + case 3: case 4: case 5: case 6: RCP_SetupDL(&gMasterDisp, SETUPDL_61); + if ((sp20 % 2) != 0) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); } + gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); + if (*dList != NULL) { gSPDisplayList(gMasterDisp++, *dList); } + RCP_SetupDL(&gMasterDisp, SETUPDL_29); break; } return true; } -void Titania_8019081C(s32 limbIndex, Vec3f* rot, void* data) { +void Titania_8019081C(s32 limbIndex, Vec3f* rot, void* thisx) { s32 i; s32 j; f32* var_s0; @@ -2597,13 +2664,15 @@ void Titania_8019081C(s32 limbIndex, Vec3f* rot, void* data) { for (i = 0; i < 2; i++) { temp_s3 = D_i5_801B8CD4[i][2]; if (limbIndex == D_i5_801B8CD4[i][0]) { - var_s0 = &D_TI_801B83A8[D_i5_801B8CF4[D_i5_801BBEF0[25]] * 6 + D_i5_801B8CD4[i][3] * 6 + 1]; + var_s0 = &aTiGorasHitbox[D_i5_801B8CF4[D_i5_801BBEF0[25]] * 6 + D_i5_801B8CD4[i][3] * 6 + 1]; temp = D_i5_801B8CD4[i][1]; for (j = 0; j < temp_s3; j++) { sp5C.x = D_i5_801B8C64[temp + j][0]; sp5C.y = D_i5_801B8C64[temp + j][1]; sp5C.z = D_i5_801B8C64[temp + j][2]; + Matrix_MultVec3f(gCalcMatrix, &sp5C, &sp50); + var_s0[0] = sp50.z; var_s0[1] = D_i5_801B8C64[temp + j][3]; var_s0[2] = sp50.y; @@ -2614,13 +2683,14 @@ void Titania_8019081C(s32 limbIndex, Vec3f* rot, void* data) { } } } + if (limbIndex == 1) { // FAKE if (1) {} switch ((s32) D_i5_801BBEF0[25]) { case 0: Matrix_MultVec3f(gCalcMatrix, &D_i5_801B8D00, (Vec3f*) &D_i5_801BBEF4[68]); - return; + break; case 1: Matrix_MultVec3f(gCalcMatrix, &D_i5_801B8D00, (Vec3f*) &D_i5_801BBEF4[71]); break; @@ -2632,19 +2702,19 @@ void Titania_8019081C(s32 limbIndex, Vec3f* rot, void* data) { // float regalloc starting with the spherical angle calculation // https://decomp.me/scratch/9ewO1 -bool Titania_80190A08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { +bool Titania_80190A08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { Vec3f spCC; Vec3f spC0; // f32 spBC; // f32 padB8; Vec3f padB4; // Vec3f? Seems kind of wasteful s32 i; - Boss* boss = (Boss*) data; + TiGoras* this = (TiGoras*) thisx; s32 spA8; s32 temp_v1; s32 spA0; f32 sp9C; - s32 ret; + s32 ret = false; Vec3f sp8C; s32 sp88; Vec3f sp7C; @@ -2656,9 +2726,8 @@ bool Titania_80190A08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* Vec3f sp5C; // Vec3f? s32 sp58; - ret = false; if (limbIndex == 0) { - rot->y += boss->fwork[0x31]; + rot->y += this->fwork[0x31]; } for (i = 0; i < ARRAY_COUNT(D_i5_801B7770); i++) { @@ -2672,11 +2741,13 @@ bool Titania_80190A08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* case 9: rot->z += D_i5_801BBEF4[8]; break; + case 22: case 23: case 24: rot->z += D_i5_801BBEF4[6]; break; + case 25: case 26: if (D_i5_801BBEF4[2] != 0.0f) { @@ -2687,31 +2758,36 @@ bool Titania_80190A08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* } } break; + case 89: rot->x += D_i5_801BBEF4[13]; break; } + sp88 = 0; + switch (limbIndex) { case 55: - if (boss->fwork[0x28] != 0.0f) { + if (this->fwork[0x28] != 0.0f) { sp88 = 1; } break; case 61: - if (boss->fwork[39] != 0.0f) { + if (this->fwork[39] != 0.0f) { sp88 = 2; } break; case 71: - if (boss->fwork[38] != 0.0f) { + if (this->fwork[38] != 0.0f) { sp88 = 3; } break; } + if (sp88 != 0) { Matrix_GetYRPAngles(gCalcMatrix, &spCC); } + sp9C = 0.0f; temp_v1 = D_i5_801B7770[i][3] - 1; spA0 = (temp_v1 != -1) && (D_i5_801BD668[temp_v1] != 0); @@ -2724,25 +2800,31 @@ bool Titania_80190A08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* switch (spA8) { case 0: break; + case 1: spC0.x = 0.0f; spC0.z = spC0.y = sp9C; break; + case 2: if (sp88 == 0) { Matrix_RotateZ(gCalcMatrix, sp9C * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, sp9C * M_DTOR, MTXF_APPLY); } break; + case 3: rot->y += sp9C; break; + case 4: padB4.z = sp9C; break; } } + Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, MTXF_APPLY); + if (sp88 != 0) { Matrix_RotateZ(gCalcMatrix, D_i5_801BBF00[i].unk_20 * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, D_i5_801BBF00[i].unk_1C * M_DTOR, MTXF_APPLY); @@ -2752,6 +2834,7 @@ bool Titania_80190A08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* rot->y += D_i5_801BBF00[i].unk_1C; rot->x += D_i5_801BBF00[i].unk_18; } + if (sp88 != 0) { Matrix_Push(&gCalcMatrix); Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, MTXF_APPLY); @@ -2760,27 +2843,30 @@ bool Titania_80190A08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* Matrix_GetYRPAngles(gCalcMatrix, &sp8C); Matrix_MultVec3f(gCalcMatrix, &D_tank_800C9F2C, &sp7C); - if ((limbIndex == 71) && (boss->fwork[0x2E] != 0.0f)) { - sp70.x = (gPlayer[0].pos.x - (boss->obj.pos.x + sp7C.x)) * boss->fwork[0x2E]; - sp70.y = (gPlayer[0].pos.y + 50.0f) - (boss->obj.pos.y + sp7C.y); - sp70.z = (gPlayer[0].trueZpos - (boss->obj.pos.z + sp7C.z)) * boss->fwork[0x2E]; + if ((limbIndex == 71) && (this->fwork[0x2E] != 0.0f)) { + sp70.x = (gPlayer[0].pos.x - (this->obj.pos.x + sp7C.x)) * this->fwork[0x2E]; + sp70.y = (gPlayer[0].pos.y + 50.0f) - (this->obj.pos.y + sp7C.y); + sp70.z = (gPlayer[0].trueZpos - (this->obj.pos.z + sp7C.z)) * this->fwork[0x2E]; + // Regalloc starts here sp5C.y = Math_Atan2F(sp70.x, sp70.z) * M_RTOD; sp5C.x = -Math_Atan2F(sp70.y, sqrtf(SQ(sp70.x) + SQ(sp70.z))) * M_RTOD; } else { - sp70.x = gPlayer[0].pos.x - (boss->obj.pos.x + sp7C.x); - sp70.y = (gPlayer[0].pos.y + 30.0f) - (boss->obj.pos.y + sp7C.y); - sp70.z = gPlayer[0].trueZpos - (boss->obj.pos.z + sp7C.z); + sp70.x = gPlayer[0].pos.x - (this->obj.pos.x + sp7C.x); + sp70.y = (gPlayer[0].pos.y + 30.0f) - (this->obj.pos.y + sp7C.y); + sp70.z = gPlayer[0].trueZpos - (this->obj.pos.z + sp7C.z); sp5C.y = Math_Atan2F(sp70.x, sp70.z) * M_RTOD; sp5C.x = -Math_Atan2F(sp70.y, sqrtf(SQ(sp70.x) + SQ(sp70.z))) * M_RTOD; } Matrix_Pop(&gCalcMatrix); + Matrix_RotateZ(gCalcMatrix, -(spCC.z * M_DTOR), MTXF_APPLY); Matrix_RotateX(gCalcMatrix, -(spCC.x * M_DTOR), MTXF_APPLY); Matrix_RotateY(gCalcMatrix, -(spCC.y * M_DTOR), MTXF_APPLY); + switch (limbIndex) { case 55: if (D_i5_801BBEF0[15] == 1) { @@ -2791,13 +2877,14 @@ bool Titania_80190A08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* } D_i5_801BBEF4[29] = 0.0f; D_i5_801BBEF4[30] = sp5C.y - 90.0f; - D_i5_801BBEF4[31] = -sp5C.x; sp8C.x = 0.0f; - Math_SmoothStepToAngle(&sp8C.y, D_i5_801BBEF4[21], boss->fwork[0x28], 360.0f, 0.01f); - Math_SmoothStepToAngle(&sp8C.z, D_i5_801BBEF4[22], boss->fwork[0x28], 360.0f, 0.01f); + + Math_SmoothStepToAngle(&sp8C.y, D_i5_801BBEF4[21], this->fwork[40], 360.0f, 0.01f); + Math_SmoothStepToAngle(&sp8C.z, D_i5_801BBEF4[22], this->fwork[40], 360.0f, 0.01f); break; + case 61: if (D_i5_801BBEF0[14] == 1) { D_i5_801BBEF4[17] = 0.0f; @@ -2808,10 +2895,13 @@ bool Titania_80190A08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* D_i5_801BBEF4[26] = 0.0f; D_i5_801BBEF4[27] = sp5C.y - 90.0f; D_i5_801BBEF4[28] = -sp5C.x; + sp8C.x = 0.0f; - Math_SmoothStepToAngle(&sp8C.y, D_i5_801BBEF4[18], boss->fwork[39], 360.0f, 0.01f); - Math_SmoothStepToAngle(&sp8C.z, D_i5_801BBEF4[19], boss->fwork[39], 360.0f, 0.01f); + + Math_SmoothStepToAngle(&sp8C.y, D_i5_801BBEF4[18], this->fwork[39], 360.0f, 0.01f); + Math_SmoothStepToAngle(&sp8C.z, D_i5_801BBEF4[19], this->fwork[39], 360.0f, 0.01f); break; + case 71: if (D_i5_801BBEF0[13] == 1) { D_i5_801BBEF4[14] = 0.0f; @@ -2819,8 +2909,10 @@ bool Titania_80190A08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* D_i5_801BBEF4[16] = sp5C.x + 180.0f; D_i5_801BBEF0[13] = 0; } + D_i5_801BBEF4[24] = sp5C.y + 90.0f; D_i5_801BBEF4[25] = sp5C.x + 180.0f; + while (D_i5_801BBEF4[24] >= 270.0f) { D_i5_801BBEF4[24] -= 360.0f; } @@ -2835,9 +2927,11 @@ bool Titania_80190A08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* if (D_i5_801BBEF4[24] > 225.0f) { D_i5_801BBEF4[24] = 225.0f; } + sp8C.x = 0.0f; - Math_SmoothStepToAngle(&sp8C.y, D_i5_801BBEF4[15], boss->fwork[38], 360.0f, 0.01f); - Math_SmoothStepToAngle(&sp8C.z, D_i5_801BBEF4[16], boss->fwork[38], 360.0f, 0.01f); + + Math_SmoothStepToAngle(&sp8C.y, D_i5_801BBEF4[15], this->fwork[38], 360.0f, 0.01f); + Math_SmoothStepToAngle(&sp8C.z, D_i5_801BBEF4[16], this->fwork[38], 360.0f, 0.01f); break; } Matrix_RotateY(gCalcMatrix, (sp8C.y + sp9C) * M_DTOR, MTXF_APPLY); @@ -2848,7 +2942,9 @@ bool Titania_80190A08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, MTXF_APPLY); } + sp6C = 0; + if ((limbIndex == 51) || (limbIndex == 66)) { if (D_i5_801BBEF0[1] != 0) { sp68 = 1.1f - (fabsf(__sinf(((f32) D_i5_801BBEF0[0] / D_i5_801BBEF0[1]) * 360.0f * M_DTOR))) * @@ -2858,6 +2954,7 @@ bool Titania_80190A08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* sp6C = 1; } } + if (spA0 != 0) { switch (spA8) { case 1: @@ -2872,43 +2969,55 @@ bool Titania_80190A08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* break; } } + Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); + sp58 = 0; + switch (D_i5_801B7770[i][1]) { case 0: break; + case 1: RCP_SetupDL(&gMasterDisp, SETUPDL_61); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); break; + case 2: RCP_SetupDL(&gMasterDisp, SETUPDL_58); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); break; + case 3: RCP_SetupDL(&gMasterDisp, SETUPDL_34); break; } - if ((boss->swork[22] & 1) || - ((D_i5_801B7770[i][2] != 0) && (boss->swork[D_i5_801B7770[i][2] + 4] & 1))) { + + if ((this->swork[22] & 1) || + ((D_i5_801B7770[i][2] != 0) && (this->swork[D_i5_801B7770[i][2] + 4] & 1))) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); sp58 = 1; } + if (*dList != NULL) { gSPDisplayList(gMasterDisp++, *dList); } + if (D_i5_801B7770[i][1] > 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_30); } else { gDPPipeSync(gMasterDisp++); } + if (sp58 == 1) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); } + if (sp6C != 0) { Matrix_Pop(&gCalcMatrix); } + if ((spA0 != 0) && ((spA8 == 1) || (spA8 == 4))) { Matrix_Pop(&gCalcMatrix); } @@ -2918,7 +3027,6 @@ bool Titania_80190A08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* break; } } - return ret; } #else @@ -2926,14 +3034,14 @@ bool Titania_80190A08(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* bool Titania_80190A08(s32, Gfx**, Vec3f*, Vec3f*, void*); #endif -void Titania_80191AE8(s32 limbIndex, Vec3f* rot, void* data) { - Boss* boss = (Boss*) data; +void Titania_80191AE8(s32 limbIndex, Vec3f* rot, void* thisx) { + TiGoras* this = (TiGoras*) thisx; f32* var_s0_2; Vec3f spB4; Vec3f spA8; s32 pad[2]; f32* var_s1; - UnkStruct_i5_801BBF00* var_s0; + UnkStruct_i5_801BBF00* var_s0 = D_i5_801BBF00; s32 temp_s4; s16 temp_s6; s32 i; @@ -2941,7 +3049,6 @@ void Titania_80191AE8(s32 limbIndex, Vec3f* rot, void* data) { s32 cond; Vec3f sp78; - var_s0 = D_i5_801BBF00; for (i = 0; i < ARRAY_COUNTU(D_i5_801B7770); i++, var_s0++) { if ((var_s0->unk_26 & 1) && (limbIndex == D_i5_801B7770[i][0])) { Matrix_MultVec3f(gCalcMatrix, &D_tank_800C9F2C, &var_s0->unk_00.pos); @@ -2951,8 +3058,8 @@ void Titania_80191AE8(s32 limbIndex, Vec3f* rot, void* data) { } } - var_s0_2 = D_TI_801B83A8; - *var_s0_2++ = 86.0f; + var_s0_2 = aTiGorasHitbox; + *(var_s0_2++) = 86.0f; for (i = 0; i < ARRAY_COUNTU(D_i5_801B7FD0); i++) { temp_s4 = D_i5_801B7FD0[i][2]; @@ -2960,7 +3067,7 @@ void Titania_80191AE8(s32 limbIndex, Vec3f* rot, void* data) { temp_s6 = D_i5_801B7FD0[i][1]; cond = (D_i5_801BBF00[D_i5_801B7FD0[i][3]].unk_26 & 0xC); - cond = !(cond || (i >= 20 && i < 23 && boss->state == 10)); + cond = !(cond || ((i >= 20) && (i < 23) && (this->state == 10))); for (j = 0; j < temp_s4; j++) { if (cond && (D_i5_801BBEF0[8] == 0 || i != 23 || j != 2)) { @@ -2992,9 +3099,10 @@ void Titania_80191AE8(s32 limbIndex, Vec3f* rot, void* data) { } var_s0_2 += temp_s4 * 6; } + switch (limbIndex) { case 3: - Matrix_MultVec3f(gCalcMatrix, &D_i5_801B8D30, (Vec3f*) &boss->fwork[17]); + Matrix_MultVec3f(gCalcMatrix, &D_i5_801B8D30, (Vec3f*) &this->fwork[17]); break; case 10: Matrix_MultVec3f(gCalcMatrix, &D_i5_801B8D00, (Vec3f*) &D_i5_801BBEF4[68]); @@ -3003,12 +3111,13 @@ void Titania_80191AE8(s32 limbIndex, Vec3f* rot, void* data) { Matrix_MultVec3f(gCalcMatrix, &D_i5_801B8D00, (Vec3f*) &D_i5_801BBEF4[71]); break; case 71: - Matrix_GetYRPAngles(gCalcMatrix, (Vec3f*) &boss->fwork[20]); + Matrix_GetYRPAngles(gCalcMatrix, (Vec3f*) &this->fwork[20]); break; case 61: - Matrix_MultVec3f(gCalcMatrix, &D_i5_801B8D3C, (Vec3f*) &boss->fwork[0x17]); - Matrix_GetYRPAngles(gCalcMatrix, (Vec3f*) &boss->fwork[0x1A]); + Matrix_MultVec3f(gCalcMatrix, &D_i5_801B8D3C, (Vec3f*) &this->fwork[0x17]); + Matrix_GetYRPAngles(gCalcMatrix, (Vec3f*) &this->fwork[0x1A]); break; + case 55: if (D_i5_801BBEF0[8] == 0) { Matrix_Push(&gGfxMatrix); @@ -3030,24 +3139,25 @@ void Titania_80191AE8(s32 limbIndex, Vec3f* rot, void* data) { gSPDisplayList(gMasterDisp++, D_1024AC0); RCP_SetupDL(&gMasterDisp, SETUPDL_30); Matrix_Pop(&gGfxMatrix); - Matrix_MultVec3f(gCalcMatrix, &D_i5_801B8D3C, (Vec3f*) &boss->fwork[29]); + Matrix_MultVec3f(gCalcMatrix, &D_i5_801B8D3C, (Vec3f*) &this->fwork[29]); break; } - Matrix_MultVec3f(gCalcMatrix, &D_i5_801B8D3C, (Vec3f*) &boss->fwork[29]); - Matrix_GetYRPAngles(gCalcMatrix, (Vec3f*) &boss->fwork[32]); + Matrix_MultVec3f(gCalcMatrix, &D_i5_801B8D3C, (Vec3f*) &this->fwork[29]); + Matrix_GetYRPAngles(gCalcMatrix, (Vec3f*) &this->fwork[32]); break; + case 34: - Matrix_MultVec3f(gCalcMatrix, &D_i5_801B8D24, (Vec3f*) &boss->fwork[5]); + Matrix_MultVec3f(gCalcMatrix, &D_i5_801B8D24, (Vec3f*) &this->fwork[5]); break; case 37: - Matrix_MultVec3f(gCalcMatrix, &D_i5_801B8D24, (Vec3f*) &boss->fwork[8]); + Matrix_MultVec3f(gCalcMatrix, &D_i5_801B8D24, (Vec3f*) &this->fwork[8]); break; default: break; } } -void Titania_80192118(Boss* boss) { +void Titania_80192118(TiGoras* this) { Vec3f sp54; Effect* effect; f32 temp_ft2; @@ -3071,7 +3181,7 @@ void Titania_80192118(Boss* boss) { D_i5_801BBEF0[29]--; } - if ((boss->state == 3) || (boss->state == 4)) { + if ((this->state == 3) || (this->state == 4)) { Math_SmoothStepToF(&D_i5_801BBEF4[36], D_i5_801BBEF4[51], 0.5f, 10.0f, 0.01f); Math_SmoothStepToF(&D_i5_801BBEF4[37], D_i5_801BBEF4[52], 0.5f, 10.0f, 0.01f); Math_SmoothStepToF(&D_i5_801BBEF4[38], D_i5_801BBEF4[53], 0.5f, 10.0f, 0.01f); @@ -3085,7 +3195,8 @@ void Titania_80192118(Boss* boss) { Math_SmoothStepToAngle(&D_i5_801BBEF4[54], D_i5_801BBEF4[55], 0.5f, 3.0f, 0.01f); Math_SmoothStepToAngle(&D_i5_801BBEF4[56], D_i5_801BBEF4[63], 0.5f, 3.0f, 0.01f); } - switch (boss->state) { + + switch (this->state) { case 0: D_i5_801BBEF4[36] = D_i5_801BBEF4[51] = 120.0f; D_i5_801BBEF4[37] = D_i5_801BBEF4[52] = -250.0f; @@ -3096,12 +3207,12 @@ void Titania_80192118(Boss* boss) { D_i5_801BBEF4[42] = D_i5_801BBEF4[48] = -40.0f; D_i5_801BBEF4[43] = D_i5_801BBEF4[49] = -80.0f; D_i5_801BBEF4[44] = D_i5_801BBEF4[50] = -40.0f; - D_i5_801BBEF4[57] = D_i5_801BBEF4[36] + boss->obj.pos.x; - D_i5_801BBEF4[58] = D_i5_801BBEF4[38] + boss->obj.pos.z; - D_i5_801BBEF4[59] = D_i5_801BBEF4[39] + boss->obj.pos.x; - D_i5_801BBEF4[60] = D_i5_801BBEF4[41] + boss->obj.pos.z; - D_i5_801BBEF4[61] = D_i5_801BBEF4[42] + boss->obj.pos.x; - D_i5_801BBEF4[62] = D_i5_801BBEF4[44] + boss->obj.pos.z; + D_i5_801BBEF4[57] = D_i5_801BBEF4[36] + this->obj.pos.x; + D_i5_801BBEF4[58] = D_i5_801BBEF4[38] + this->obj.pos.z; + D_i5_801BBEF4[59] = D_i5_801BBEF4[39] + this->obj.pos.x; + D_i5_801BBEF4[60] = D_i5_801BBEF4[41] + this->obj.pos.z; + D_i5_801BBEF4[61] = D_i5_801BBEF4[42] + this->obj.pos.x; + D_i5_801BBEF4[62] = D_i5_801BBEF4[44] + this->obj.pos.z; D_i5_801BBEF4[54] = D_i5_801BBEF4[55] = 70.0f; D_i5_801BBEF4[56] = D_i5_801BBEF4[63] = -80.0f; D_i5_801BBEF4[64] = D_i5_801BBEF4[65] = 0.0f; @@ -3110,8 +3221,9 @@ void Titania_80192118(Boss* boss) { D_i5_801BBEF0[22] = 0; D_i5_801BBEF0[23] = 0; D_i5_801BBEF0[24] = 0; - boss->swork[1] = 1; + this->swork[1] = 1; break; + case 1: Animation_GetFrameData(&D_TI_A0002BC, 0, &D_i5_801BC978[0]); Animation_GetFrameData(&D_TI_A0002BC, 0, &D_i5_801BCDC8[0]); @@ -3119,36 +3231,36 @@ void Titania_80192118(Boss* boss) { Animation_GetFrameData(&D_TI_A0002BC, 0, &D_i5_801BCDC8[8]); Animation_GetFrameData(&D_TI_A000934, 0, &D_i5_801BC978[16]); Animation_GetFrameData(&D_TI_A000934, 0, &D_i5_801BCDC8[16]); - if ((gPlayer[0].trueZpos - boss->obj.pos.z) <= 450.0f) { + + if ((gPlayer[0].trueZpos - this->obj.pos.z) <= 450.0f) { gPlayer[0].unk_19C = -1; gPlayer[0].unk_000 = 0.0f; - boss->swork[1] = 2; - boss->swork[31] = 0; - boss->swork[30]++; + this->swork[1] = 2; + this->swork[31] = 0; + this->swork[30]++; } break; - case 2: - if (boss->dmgType == DMG_BEAM) { - switch (D_i5_801B8C0C[boss->dmgPart]) { + case 2: + if (this->dmgType == DMG_BEAM) { + switch (D_i5_801B8C0C[this->dmgPart]) { case 0: D_i5_801BBEF0[30] = 15; - AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, this->sfxSource, 4); break; case 1: D_i5_801BBEF0[33] = 15; - AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, this->sfxSource, 4); break; case 2: D_i5_801BBEF0[34] = 15; - AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, this->sfxSource, 4); break; } } - if (boss->dmgType == DMG_BOMB) { - - if ((boss->dmgPart == 5) || (boss->dmgPart == 7) || (boss->dmgPart == 14)) { - switch (D_i5_801B8C0C[boss->dmgPart]) { + if (this->dmgType == DMG_BOMB) { + if ((this->dmgPart == 5) || (this->dmgPart == 7) || (this->dmgPart == 14)) { + switch (D_i5_801B8C0C[this->dmgPart]) { case 0: D_i5_801BBEF0[30] = 15; break; @@ -3161,10 +3273,12 @@ void Titania_80192118(Boss* boss) { } } } - if (boss->dmgType != DMG_NONE) { + + if (this->dmgType != DMG_NONE) { D_i5_801BBEF0[48]++; } - if ((D_i5_801BBEF0[48] >= 3) || (boss->swork[31] >= 90)) { + + if ((D_i5_801BBEF0[48] >= 3) || (this->swork[31] >= 90)) { D_i5_801BBEF4[45] = -240.0f; D_i5_801BBEF4[46] = -40.0f; D_i5_801BBEF4[47] = -200.0f; @@ -3176,7 +3290,7 @@ void Titania_80192118(Boss* boss) { D_i5_801BBEF4[53] = -450.0f; D_i5_801BBEF4[55] = 0.0f; D_i5_801BBEF4[63] = 0.0f; - boss->vel.z = gPlayer[0].vel.z; + this->vel.z = gPlayer[0].vel.z; D_i5_801BBEF0[27] = 100; D_i5_801BBEF0[29] = 30; D_i5_801BBEF0[31] = 5; @@ -3186,75 +3300,82 @@ void Titania_80192118(Boss* boss) { D_i5_801BBEF0[36] = 5; D_i5_801BBEF0[38] = 2; gPlayer[0].unk_19C = 0; - boss->swork[1] = 3; + this->swork[1] = 3; AUDIO_PLAY_BGM(NA_BGM_BOSS_TI); } break; + case 3: - if (D_i5_801BBEF0[22] == 37) { - sp54.x = (boss->obj.pos.x + D_i5_801BBEF4[39]) + D_i5_801BBEF4[68]; + sp54.x = (this->obj.pos.x + D_i5_801BBEF4[39]) + D_i5_801BBEF4[68]; sp54.y = 0.0f; - sp54.z = (boss->obj.pos.z + D_i5_801BBEF4[41]) + D_i5_801BBEF4[70]; + sp54.z = (this->obj.pos.z + D_i5_801BBEF4[41]) + D_i5_801BBEF4[70]; Effect_SpawnTimedSfxAtPos(&sp54, NA_SE_EN_BOSS_ATTACK); - boss->swork[39] = 5; + this->swork[39] = 5; gCameraShake = 5; } + if (D_i5_801BBEF0[23] == 37) { - sp54.x = (boss->obj.pos.x + D_i5_801BBEF4[42]) + D_i5_801BBEF4[71]; + sp54.x = (this->obj.pos.x + D_i5_801BBEF4[42]) + D_i5_801BBEF4[71]; sp54.y = 0.0f; - sp54.z = (boss->obj.pos.z + D_i5_801BBEF4[44]) + D_i5_801BBEF4[73]; + sp54.z = (this->obj.pos.z + D_i5_801BBEF4[44]) + D_i5_801BBEF4[73]; Effect_SpawnTimedSfxAtPos(&sp54, NA_SE_EN_BOSS_ATTACK); - boss->swork[39] = 5; + this->swork[39] = 5; gCameraShake = 5; } - if (boss->dmgType == DMG_BEAM) { - switch (D_i5_801B8C0C[boss->dmgPart]) { + + if (this->dmgType == DMG_BEAM) { + switch (D_i5_801B8C0C[this->dmgPart]) { + case 0: + D_i5_801BBEF0[30] = 15; + D_i5_801BBEF0[27] -= this->damage; + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, this->sfxSource, 4); + break; + + case 1: + D_i5_801BBEF0[33] = 15; + D_i5_801BBEF0[27] -= this->damage; + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, this->sfxSource, 4); + break; + + case 2: + D_i5_801BBEF0[34] = 15; + D_i5_801BBEF0[27] -= this->damage; + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, this->sfxSource, 4); + break; + } + this->dmgType = DMG_NONE; + } + + if ((this->dmgType == DMG_BOMB) && + ((this->dmgPart == 5) || (this->dmgPart == 7) || (this->dmgPart == 14))) { + this->dmgType = DMG_NONE; + + switch (D_i5_801B8C0C[this->dmgPart]) { case 0: D_i5_801BBEF0[30] = 15; - D_i5_801BBEF0[27] -= boss->damage; - AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, boss->sfxSource, 4); + D_i5_801BBEF0[27] -= this->damage; break; + case 1: D_i5_801BBEF0[33] = 15; - D_i5_801BBEF0[27] -= boss->damage; - AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, boss->sfxSource, 4); + D_i5_801BBEF0[27] -= this->damage; break; + case 2: D_i5_801BBEF0[34] = 15; - D_i5_801BBEF0[27] -= boss->damage; - AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, boss->sfxSource, 4); - break; - } - boss->dmgType = DMG_NONE; - } - if ((boss->dmgType == DMG_BOMB) && - ((boss->dmgPart == 5) || (boss->dmgPart == 7) || (boss->dmgPart == 14))) { - boss->dmgType = DMG_NONE; - switch (D_i5_801B8C0C[boss->dmgPart]) { - case 0: - D_i5_801BBEF0[30] = 15; - - D_i5_801BBEF0[27] -= boss->damage; - break; - case 1: - D_i5_801BBEF0[33] = 15; - - D_i5_801BBEF0[27] -= boss->damage; - break; - case 2: - D_i5_801BBEF0[34] = 15; - - D_i5_801BBEF0[27] -= boss->damage; + D_i5_801BBEF0[27] -= this->damage; break; } } - Math_SmoothStepToF(&boss->vel.z, gPlayer[0].vel.z, 0.7f, 1.0f, 0.01f); - Math_SmoothStepToF(&boss->obj.pos.x, gPlayer[0].pos.x, 0.1f, 6.0f, 0.01f); - Math_SmoothStepToF(&boss->obj.pos.z, gPlayer[0].trueZpos - 450.0f, 0.1f, 1.0f, 0.01f); + + Math_SmoothStepToF(&this->vel.z, gPlayer[0].vel.z, 0.7f, 1.0f, 0.01f); + Math_SmoothStepToF(&this->obj.pos.x, gPlayer[0].pos.x, 0.1f, 6.0f, 0.01f); + Math_SmoothStepToF(&this->obj.pos.z, gPlayer[0].trueZpos - 450.0f, 0.1f, 1.0f, 0.01f); + Animation_GetFrameData(&D_TI_A000D50, D_i5_801BBEF0[24] >> 1, &D_i5_801BC978[16]); switch (D_i5_801BBEF0[39]) { @@ -3277,6 +3398,7 @@ void Titania_80192118(Boss* boss) { Math_SmoothStepToVec3fArray(&D_i5_801BC978[0], &D_i5_801BCDC8[0], 1, 8, 0.5f, 360.0f, 0.01f); Math_SmoothStepToVec3fArray(&D_i5_801BC978[8], &D_i5_801BCDC8[8], 1, 8, 0.5f, 360.0f, 0.01f); Math_SmoothStepToVec3fArray(&D_i5_801BC978[16], &D_i5_801BCDC8[16], 1, 13, 0.5f, 5.0f, 0.01f); + D_i5_801BBEF0[24]++; D_i5_801BBEF0[22]++; D_i5_801BBEF0[23]++; @@ -3287,13 +3409,12 @@ void Titania_80192118(Boss* boss) { switch (D_i5_801BBEF0[39]) { case 0: - if (D_i5_801BBEF0[22] >= (Animation_GetFrameCount(&D_TI_A000858) * 2)) { D_i5_801BBEF0[22] = 0; } break; - case 1: + case 1: if (D_i5_801BBEF0[22] >= (Animation_GetFrameCount(&D_TI_A00047C) * 2)) { D_i5_801BBEF0[22] = 0; } @@ -3312,7 +3433,8 @@ void Titania_80192118(Boss* boss) { } break; } - D_i5_801BBEF4[51] = SIN_DEG((((s32) (boss->swork[38] % 128U) * 360.0f) / 128)) * 40.0f; + + D_i5_801BBEF4[51] = SIN_DEG((((s32) (this->swork[38] % 128U) * 360.0f) / 128)) * 40.0f; switch (D_i5_801BBEF0[28]) { case 0: @@ -3320,6 +3442,7 @@ void Titania_80192118(Boss* boss) { D_i5_801BBEF0[28] = 1; } break; + case 1: if (D_i5_801BBEF0[22] == 0) { D_i5_801BBEF0[39] = 1; @@ -3329,6 +3452,7 @@ void Titania_80192118(Boss* boss) { D_i5_801BBEF0[28] = 2; } break; + case 2: if (D_i5_801BBEF0[22] == 0) { D_i5_801BBEF0[39] = 0; @@ -3338,6 +3462,7 @@ void Titania_80192118(Boss* boss) { D_i5_801BBEF0[28] = 3; } break; + case 3: if (D_i5_801BBEF0[23] == 0) { D_i5_801BBEF0[40] = 1; @@ -3347,6 +3472,7 @@ void Titania_80192118(Boss* boss) { D_i5_801BBEF0[28] = 4; } break; + case 4: if (D_i5_801BBEF0[23] == 0) { D_i5_801BBEF0[40] = 0; @@ -3356,9 +3482,11 @@ void Titania_80192118(Boss* boss) { D_i5_801BBEF0[28] = 1; } break; + default: break; } + if (D_i5_801BBEF0[27] <= 0) { D_i5_801BBEF4[45] = -90.0f; D_i5_801BBEF4[46] = -70.0f; @@ -3371,65 +3499,74 @@ void Titania_80192118(Boss* boss) { D_i5_801BBEF4[53] = -350.0f; D_i5_801BBEF4[63] = 0.0f; D_i5_801BBEF4[55] = D_i5_801BBEF4[63]; - AUDIO_PLAY_SFX(NA_SE_EN_APPEAR_SAND, boss->sfxSource, 4); - AUDIO_PLAY_SFX(NA_SE_EN_TIBOSS_DM_CRY, boss->sfxSource, 4); - boss->swork[1] = 4; - boss->timer_050 = 120; + + AUDIO_PLAY_SFX(NA_SE_EN_APPEAR_SAND, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_TIBOSS_DM_CRY, this->sfxSource, 4); + + this->swork[1] = 4; + this->timer_050 = 120; + D_i5_801BBEF0[22] = 0; D_i5_801BBEF0[23] = 0; D_i5_801BBEF0[24] = 0; - boss->swork[31] = 0; - boss->fwork[0] = 0.0f; - boss->swork[30]++; + + this->swork[31] = 0; + this->fwork[0] = 0.0f; + this->swork[30]++; } break; + case 4: - boss->vel.z = gPlayer[0].vel.z; + this->vel.z = gPlayer[0].vel.z; + Animation_GetFrameData(&D_TI_8000D80, D_i5_801BBEF0[22] >> 1, &D_i5_801BC978[0]); Animation_GetFrameData(&D_TI_8000D80, D_i5_801BBEF0[23] >> 1, &D_i5_801BC978[8]); Animation_GetFrameData(&D_TI_8000708, D_i5_801BBEF0[24] >> 1, &D_i5_801BC978[16]); - Math_SmoothStepToF(&boss->fwork[0], 0.5f, 0.05f, 0.05f, 0.01f); - Math_SmoothStepToVec3fArray(&D_i5_801BC978[0], &D_i5_801BCDC8[0], 1, 8, boss->fwork[0], 360.0f, 0.01f); - Math_SmoothStepToVec3fArray(&D_i5_801BC978[8], &D_i5_801BCDC8[8], 1, 8, boss->fwork[0], 360.0f, 0.01f); - Math_SmoothStepToVec3fArray(&D_i5_801BC978[16], &D_i5_801BCDC8[16], 1, 13, boss->fwork[0], 360.0f, 0.01f); - if (boss->timer_050 <= 120) { + + Math_SmoothStepToF(&this->fwork[0], 0.5f, 0.05f, 0.05f, 0.01f); + + Math_SmoothStepToVec3fArray(&D_i5_801BC978[0], &D_i5_801BCDC8[0], 1, 8, this->fwork[0], 360.0f, 0.01f); + Math_SmoothStepToVec3fArray(&D_i5_801BC978[8], &D_i5_801BCDC8[8], 1, 8, this->fwork[0], 360.0f, 0.01f); + Math_SmoothStepToVec3fArray(&D_i5_801BC978[16], &D_i5_801BCDC8[16], 1, 13, this->fwork[0], 360.0f, 0.01f); + + if (this->timer_050 <= 120) { if (D_i5_801BBEF0[22] < ((Animation_GetFrameCount(&D_TI_8000D80) * 2) - 1)) { D_i5_801BBEF0[22]++; } } - if (boss->timer_050 < 108) { + if (this->timer_050 < 108) { if (D_i5_801BBEF0[23] < ((Animation_GetFrameCount(&D_TI_8000D80) * 2) - 1)) { D_i5_801BBEF0[23]++; } } - if (boss->timer_050 <= 120) { + if (this->timer_050 <= 120) { if (D_i5_801BBEF0[24] < ((Animation_GetFrameCount(&D_TI_8000708) * 2) - 1)) { D_i5_801BBEF0[24]++; } } - if (boss->timer_050 == 0) { - boss->swork[1] = 5; - boss->timer_050 = 90; + if (this->timer_050 == 0) { + this->swork[1] = 5; + this->timer_050 = 90; } break; } - if ((boss->state >= 3) && (boss->state < 5)) { - if ((boss->state != 4) || (boss->swork[31] < 100)) { - temp_ft2 = boss->obj.pos.x + D_i5_801BBEF4[36]; - temp_ft4 = boss->obj.pos.z + D_i5_801BBEF4[38]; + + if ((this->state >= 3) && (this->state < 5)) { + if ((this->state != 4) || (this->swork[31] < 100)) { + temp_ft2 = this->obj.pos.x + D_i5_801BBEF4[36]; + temp_ft4 = this->obj.pos.z + D_i5_801BBEF4[38]; temp_fa1 = D_i5_801BBEF4[57] - temp_ft2; temp_fv1 = D_i5_801BBEF4[58] - temp_ft4; if ((s32) sqrtf(SQ(temp_fa1) + SQ(temp_fv1)) > 50.0f) { - - effect = func_effect_8007783C(OBJ_EFFECT_394); + effect = Effect_Load(OBJ_EFFECT_394); if (effect != NULL) { effect->obj.status = OBJ_ACTIVE; effect->unk_7A = 10; effect->unk_78 = effect->unk_7A; effect->obj.pos.x = temp_ft2; - effect->obj.pos.y = boss->obj.pos.y; + effect->obj.pos.y = this->obj.pos.y; effect->obj.pos.z = temp_ft4; effect->obj.rot.y = (Math_Atan2F(-temp_fv1, temp_fa1) * M_RTOD) - 90.0f; @@ -3440,27 +3577,27 @@ void Titania_80192118(Boss* boss) { D_i5_801BBEF4[57] = temp_ft2; D_i5_801BBEF4[58] = temp_ft4; } - if ((boss->swork[38] & 3) == 0) { - func_effect_8007A900(temp_ft2, boss->obj.pos.y, temp_ft4, 10.0f, 192, 16, 0); + + if ((this->swork[38] & 3) == 0) { + Effect_Effect359_Spawn(temp_ft2, this->obj.pos.y, temp_ft4, 10.0f, 192, 16, 0); } } - if ((boss->state != 4) || (boss->swork[31] < 90)) { - temp_ft2 = boss->obj.pos.x + D_i5_801BBEF4[39]; - temp_ft4 = boss->obj.pos.z + D_i5_801BBEF4[41]; + + if ((this->state != 4) || (this->swork[31] < 90)) { + temp_ft2 = this->obj.pos.x + D_i5_801BBEF4[39]; + temp_ft4 = this->obj.pos.z + D_i5_801BBEF4[41]; temp_fa1 = D_i5_801BBEF4[59] - temp_ft2; temp_fv1 = D_i5_801BBEF4[60] - temp_ft4; if ((s32) sqrtf(SQ(temp_fa1) + SQ(temp_fv1)) > 50.0f) { - - effect = func_effect_8007783C(OBJ_EFFECT_394); - + effect = Effect_Load(OBJ_EFFECT_394); if (effect != NULL) { effect->obj.status = OBJ_ACTIVE; effect->unk_7A = 10; effect->unk_78 = effect->unk_7A; effect->obj.pos.x = temp_ft2; - effect->obj.pos.y = boss->obj.pos.y; + effect->obj.pos.y = this->obj.pos.y; effect->obj.pos.z = temp_ft4; effect->obj.rot.y = (Math_Atan2F(-temp_fv1, temp_fa1) * M_RTOD) - 90.0f; @@ -3471,27 +3608,27 @@ void Titania_80192118(Boss* boss) { D_i5_801BBEF4[59] = temp_ft2; D_i5_801BBEF4[60] = temp_ft4; } - if ((boss->swork[38] & 3) == 0) { - func_effect_8007A900(temp_ft2, boss->obj.pos.y, temp_ft4, 10.0f, 192, 16, 0); + + if ((this->swork[38] & 3) == 0) { + Effect_Effect359_Spawn(temp_ft2, this->obj.pos.y, temp_ft4, 10.0f, 192, 16, 0); } } - if ((boss->state != 4) || (boss->swork[31] < 102)) { - temp_ft2 = boss->obj.pos.x + D_i5_801BBEF4[42]; - temp_ft4 = boss->obj.pos.z + D_i5_801BBEF4[44]; + + if ((this->state != 4) || (this->swork[31] < 102)) { + temp_ft2 = this->obj.pos.x + D_i5_801BBEF4[42]; + temp_ft4 = this->obj.pos.z + D_i5_801BBEF4[44]; temp_fa1 = D_i5_801BBEF4[61] - temp_ft2; temp_fv1 = D_i5_801BBEF4[62] - temp_ft4; if ((s32) sqrtf(SQ(temp_fa1) + SQ(temp_fv1)) > 50.0f) { - - effect = func_effect_8007783C(OBJ_EFFECT_394); - + effect = Effect_Load(OBJ_EFFECT_394); if (effect != NULL) { effect->state = 10; effect->unk_7A = 10; effect->unk_78 = effect->unk_7A; effect->obj.pos.x = temp_ft2; - effect->obj.pos.y = boss->obj.pos.y; + effect->obj.pos.y = this->obj.pos.y; effect->obj.pos.z = temp_ft4; effect->obj.rot.y = (Math_Atan2F(-temp_fv1, temp_fa1) * M_RTOD) - 90.0f; @@ -3502,110 +3639,127 @@ void Titania_80192118(Boss* boss) { D_i5_801BBEF4[61] = temp_ft2; D_i5_801BBEF4[62] = temp_ft4; } - if ((boss->swork[38] & 3) == 0) { - func_effect_8007A900(temp_ft2, boss->obj.pos.y, temp_ft4, 10.0f, 192, 16, 0); + + if ((this->swork[38] & 3) == 0) { + Effect_Effect359_Spawn(temp_ft2, this->obj.pos.y, temp_ft4, 10.0f, 192, 16, 0); } } } - boss->dmgType = DMG_NONE; + this->dmgType = DMG_NONE; } -void Titania_80193B30(Boss* boss) { - if (boss->state == boss->swork[1]) { - if (boss->swork[1] != 11) { - boss->swork[1] = 11; +void Titania_80193B30(TiGoras* this) { + if (this->state == this->swork[1]) { + if (this->swork[1] != 11) { + this->swork[1] = 11; } else { - boss->swork[1] = 9; + this->swork[1] = 9; } } - switch (boss->swork[1]) { + + switch (this->swork[1]) { case 8: - if ((boss->swork[11] <= 0) && (boss->swork[12] <= 0)) { - if (boss->swork[35] == 0) { - boss->swork[1] = 12; + if ((this->swork[11] <= 0) && (this->swork[12] <= 0)) { + if (this->swork[35] == 0) { + this->swork[1] = 12; } else { - boss->swork[1] = 11; + this->swork[1] = 11; } } break; + case 10: if (D_i5_801BBEF0[8] != 0) { - boss->swork[1] = 12; + this->swork[1] = 12; } break; - case 11: - if (boss->swork[35] == 0) { - boss->swork[1] = 8; - } - break; - } - if (boss->swork[1] != 7) { - boss->swork[36]++; - } else { - boss->swork[36] = 0; - } - if (boss->swork[36] >= 2) { - boss->swork[1] = 7; - boss->swork[36] = 0; - } - if (boss->swork[1] == 8) { - boss->swork[3] = 2; - } else { - boss->swork[3] = 1; - } - D_i5_801BBEF4[11] = D_i5_801B7738[boss->swork[1]]; - switch (boss->swork[1]) { + case 11: + if (this->swork[35] == 0) { + this->swork[1] = 8; + } + break; + } + + if (this->swork[1] != 7) { + this->swork[36]++; + } else { + this->swork[36] = 0; + } + + if (this->swork[36] >= 2) { + this->swork[1] = 7; + this->swork[36] = 0; + } + + if (this->swork[1] == 8) { + this->swork[3] = 2; + } else { + this->swork[3] = 1; + } + + D_i5_801BBEF4[11] = D_i5_801B7738[this->swork[1]]; + + switch (this->swork[1]) { case 7: case 8: case 9: case 10: - if (boss->fwork[35] != 1.0f) { + if (this->fwork[35] != 1.0f) { D_i5_801BBEF0[13] = 1; - boss->fwork[35] = 1.0f; + this->fwork[35] = 1.0f; D_i5_801BBEF4[32] = 10.0f; D_i5_801BBEF4[33] = 10.0f; } break; + case 11: - boss->fwork[35] = 0.0f; + this->fwork[35] = 0.0f; break; + case 12: - boss->fwork[35] = 0.0f; + this->fwork[35] = 0.0f; break; } - switch (boss->swork[1]) { + + switch (this->swork[1]) { case 7: - if (boss->swork[9] > 0) { - boss->fwork[36] = 1.0f; + if (this->swork[9] > 0) { + this->fwork[36] = 1.0f; D_i5_801BBEF0[14] = 1; D_i5_801BBEF4[34] = 1.0f; } - if ((boss->swork[10] > 0) && (D_i5_801BBEF0[8] != 0)) { - boss->fwork[37] = 1.0f; + if ((this->swork[10] > 0) && (D_i5_801BBEF0[8] != 0)) { + this->fwork[37] = 1.0f; D_i5_801BBEF0[15] = 1; D_i5_801BBEF4[35] = 1.0f; } - boss->swork[34] = 1; + this->swork[34] = 1; break; + case 8: - boss->swork[34] = 1; + this->swork[34] = 1; break; + case 9: - boss->swork[34] = 1; + this->swork[34] = 1; break; + case 10: - boss->swork[34] = 1; + this->swork[34] = 1; break; + case 11: - boss->swork[34] = 1; - boss->swork[24] = 1; - boss->fwork[45] = 230.0f; + this->swork[34] = 1; + this->swork[24] = 1; + this->fwork[45] = 230.0f; break; + case 12: - boss->swork[34] = 2; - boss->fwork[48] = 0.0f; + this->swork[34] = 2; + this->fwork[48] = 0.0f; break; + default: break; } @@ -3636,10 +3790,9 @@ const s16 D_i5_801BAB0C[4][10] = { const char D_i5_801BAB5C[] = "Enm->chpt=<%d>\n"; #ifdef NON_MATCHING -// Regalloc in the random ternary. Can't be a temp as it's too low on stack // https://decomp.me/scratch/KiTNa - -void Titania_80193DF0(Boss* boss) { +// Regalloc in the random ternary. Can't be a temp as it's too low on stack +void Titania_80193DF0(TiGoras* this) { Vec3f spD4; Vec3f spC8; Actor* actor; @@ -3656,28 +3809,29 @@ void Titania_80193DF0(Boss* boss) { Vec3f sp90; Vec3f sp84; - Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); for (i = 0; i < ARRAY_COUNTU(D_i5_801BBF00); i++) { if (D_i5_801BBF00[i].unk_26 & 0x10) { if ((i == 39) && (D_i5_801BBEF0[8] == 0)) { - boss->swork[37] |= 0x10 | 0x8; + this->swork[37] |= 0x10 | 0x8; D_i5_801BBEF0[44] = 0; D_i5_801BBEF0[8] = -1; D_i5_801BBEF0[41] = 1; actor = Game_SpawnActor(OBJ_ACTOR_TEAM_BOSS); if (actor != NULL) { Matrix_MultVec3f(gCalcMatrix, &D_i5_801BBF00[i].unk_00.pos, &spC8); - actor->obj.pos.x = boss->obj.pos.x + spC8.x; - actor->obj.pos.y = boss->obj.pos.y + spC8.y; - actor->obj.pos.z = boss->obj.pos.z + spC8.z; - actor->obj.rot.x = boss->obj.rot.x + D_i5_801BBF00[i].unk_00.rot.x; - actor->obj.rot.y = boss->obj.rot.y + D_i5_801BBF00[i].unk_00.rot.y; - actor->obj.rot.z = boss->obj.rot.z + D_i5_801BBF00[i].unk_00.rot.z; + actor->obj.pos.x = this->obj.pos.x + spC8.x; + actor->obj.pos.y = this->obj.pos.y + spC8.y; + actor->obj.pos.z = this->obj.pos.z + spC8.z; + actor->obj.rot.x = this->obj.rot.x + D_i5_801BBF00[i].unk_00.rot.x; + actor->obj.rot.y = this->obj.rot.y + D_i5_801BBF00[i].unk_00.rot.y; + actor->obj.rot.z = this->obj.rot.z + D_i5_801BBF00[i].unk_00.rot.z; } } D_i5_801BBF00[i].unk_26 &= ~16; } + if (D_i5_801BBF00[i].unk_26 & 2) { actor = Game_SpawnActor(OBJ_ACTOR_DEBRIS); if (actor != NULL) { @@ -3687,33 +3841,42 @@ void Titania_80193DF0(Boss* boss) { if (D_i5_801B7770[i][0] == 85) { actor->fwork[0] = 5.0f; actor->fwork[1] = 5.0f; - actor->obj.pos.x = boss->obj.pos.x + D_i5_801BBF00[i].unk_00.pos.x; - actor->obj.pos.y = boss->obj.pos.y + D_i5_801BBF00[i].unk_00.pos.y; - actor->obj.pos.z = boss->obj.pos.z + D_i5_801BBF00[i].unk_00.pos.z; - actor->obj.rot.x = boss->obj.rot.x + D_i5_801BBF00[i].unk_00.rot.x; - actor->obj.rot.y = boss->obj.rot.y + D_i5_801BBF00[i].unk_00.rot.y; - actor->obj.rot.z = boss->obj.rot.z + D_i5_801BBF00[i].unk_00.rot.z; + + actor->obj.pos.x = this->obj.pos.x + D_i5_801BBF00[i].unk_00.pos.x; + actor->obj.pos.y = this->obj.pos.y + D_i5_801BBF00[i].unk_00.pos.y; + actor->obj.pos.z = this->obj.pos.z + D_i5_801BBF00[i].unk_00.pos.z; + + actor->obj.rot.x = this->obj.rot.x + D_i5_801BBF00[i].unk_00.rot.x; + actor->obj.rot.y = this->obj.rot.y + D_i5_801BBF00[i].unk_00.rot.y; + actor->obj.rot.z = this->obj.rot.z + D_i5_801BBF00[i].unk_00.rot.z; + Matrix_Push(&gCalcMatrix); Matrix_RotateY(gCalcMatrix, 0.0f, MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, &D_i5_801B8D18, &spC8); Matrix_Pop(&gCalcMatrix); + actor->vel.x = spC8.x; actor->vel.y = 5.0f; actor->vel.z = spC8.z; + actor->gravity = 0.8f; } else { actor->fwork[0] = 10.0f + RAND_FLOAT(10.0f); actor->fwork[1] = 10.0f + RAND_FLOAT(10.0f); - actor->obj.pos.x = boss->obj.pos.x + D_i5_801BBF00[i].unk_00.pos.x; - actor->obj.pos.y = boss->obj.pos.y + D_i5_801BBF00[i].unk_00.pos.y; - actor->obj.pos.z = boss->obj.pos.z + D_i5_801BBF00[i].unk_00.pos.z; - actor->obj.rot.x = boss->obj.rot.x + D_i5_801BBF00[i].unk_00.rot.x; - actor->obj.rot.y = boss->obj.rot.y + D_i5_801BBF00[i].unk_00.rot.y; - actor->obj.rot.z = boss->obj.rot.z + D_i5_801BBF00[i].unk_00.rot.z; + + actor->obj.pos.x = this->obj.pos.x + D_i5_801BBF00[i].unk_00.pos.x; + actor->obj.pos.y = this->obj.pos.y + D_i5_801BBF00[i].unk_00.pos.y; + actor->obj.pos.z = this->obj.pos.z + D_i5_801BBF00[i].unk_00.pos.z; + + actor->obj.rot.x = this->obj.rot.x + D_i5_801BBF00[i].unk_00.rot.x; + actor->obj.rot.y = this->obj.rot.y + D_i5_801BBF00[i].unk_00.rot.y; + actor->obj.rot.z = this->obj.rot.z + D_i5_801BBF00[i].unk_00.rot.z; + Matrix_Push(&gCalcMatrix); Matrix_RotateY(gCalcMatrix, RAND_FLOAT(360.0f) * M_DTOR, MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, &D_i5_801B8D0C, &spC8); Matrix_Pop(&gCalcMatrix); + actor->vel.x = spC8.x; // pad2 = ((Rand_ZeroOne() < 0.5f) ? -1 : 1); actor->vel.y = ((Rand_ZeroOne() < 0.5f) ? -1 : 1) * (15.0f + RAND_FLOAT(2.0f)); @@ -3722,24 +3885,27 @@ void Titania_80193DF0(Boss* boss) { } } D_i5_801BBF00[i].unk_26 = 4; - AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, this->sfxSource, 4); } } - if (boss->fwork[38] != 0.0f) { + + if (this->fwork[38] != 0.0f) { Math_SmoothStepToF(&D_i5_801BBEF4[15], D_i5_801BBEF4[24], 1.0f, D_i5_801BBEF4[32], 0.01f); Math_SmoothStepToAngle(&D_i5_801BBEF4[16], D_i5_801BBEF4[25], 1.0f, D_i5_801BBEF4[33], 0.01f); } - if (boss->fwork[39] != 0.0f) { + if (this->fwork[39] != 0.0f) { Math_SmoothStepToAngle(&D_i5_801BBEF4[18], D_i5_801BBEF4[27], 1.0f, D_i5_801BBEF4[34], 0.01f); Math_SmoothStepToAngle(&D_i5_801BBEF4[19], D_i5_801BBEF4[28], 1.0f, D_i5_801BBEF4[34], 0.01f); } - if (boss->fwork[40] != 0.0f) { + if (this->fwork[40] != 0.0f) { Math_SmoothStepToAngle(&D_i5_801BBEF4[21], D_i5_801BBEF4[30], 1.0f, D_i5_801BBEF4[35], 0.01f); Math_SmoothStepToAngle(&D_i5_801BBEF4[22], D_i5_801BBEF4[31], 1.0f, D_i5_801BBEF4[35], 0.01f); } - Math_SmoothStepToF(&boss->fwork[38], boss->fwork[35], 1.0f, 0.3f, 0.01f); - Math_SmoothStepToF(&boss->fwork[39], boss->fwork[36], 0.2f, 0.5f, 0.01f); - Math_SmoothStepToF(&boss->fwork[40], boss->fwork[37], 0.2f, 0.5f, 0.01f); + + Math_SmoothStepToF(&this->fwork[38], this->fwork[35], 1.0f, 0.3f, 0.01f); + Math_SmoothStepToF(&this->fwork[39], this->fwork[36], 0.2f, 0.5f, 0.01f); + Math_SmoothStepToF(&this->fwork[40], this->fwork[37], 0.2f, 0.5f, 0.01f); + if (D_i5_801BBEF0[6] > 0) { D_i5_801BBEF0[6]--; if (D_i5_801BBEF0[6] == 0) { @@ -3750,8 +3916,8 @@ void Titania_80193DF0(Boss* boss) { } for (i = 0; i < 4; i++) { - if (boss->swork[5 + i] > 0) { - boss->swork[5 + i]--; + if (this->swork[5 + i] > 0) { + this->swork[5 + i]--; } } @@ -3762,12 +3928,12 @@ void Titania_80193DF0(Boss* boss) { } } - if (boss->swork[22] > 0) { - boss->swork[22]--; + if (this->swork[22] > 0) { + this->swork[22]--; } - if (boss->swork[28] != 0) { - if (boss->swork[27] > 0) { - boss->swork[27]--; + if (this->swork[28] != 0) { + if (this->swork[27] > 0) { + this->swork[27]--; } } @@ -3788,6 +3954,7 @@ void Titania_80193DF0(Boss* boss) { D_i5_801BBEF0[3]--; } } + if ((D_i5_801BBEF0[5] != 0) && (Math_SmoothStepToAngle(&D_i5_801BBEF4[8], D_i5_801BBEF4[9], 1.0f, 8.0f, 0.01f) == 0.0f)) { if (D_i5_801BBEF4[9] == 48.0f) { @@ -3797,6 +3964,7 @@ void Titania_80193DF0(Boss* boss) { D_i5_801BBEF0[5]--; } } + if (D_i5_801BBEF0[6] != 0) { for (i = 0; i < ARRAY_COUNTU(D_i5_801BBF00); i++) { for (j = 0; j < ARRAY_COUNT(D_i5_801B8160); j++) { @@ -3804,7 +3972,7 @@ void Titania_80193DF0(Boss* boss) { break; } } - if (boss->unk_04C) {} + if (this->animFrame) {} if (j == ARRAY_COUNT(D_i5_801B8160)) { D_i5_801BBF00[i].unk_20 = RAND_FLOAT(5.0f) - 2.5f; @@ -3813,40 +3981,40 @@ void Titania_80193DF0(Boss* boss) { } for (i = 0; i < 4; i++) { - if ((boss->swork[9 + i] > 0) && (boss->swork[9 + i] <= 10)) { + if ((this->swork[9 + i] > 0) && (this->swork[9 + i] <= 10)) { D_i5_801BD668[24 + i] = 1; } } - if ((boss->state >= 7) && (boss->state < 14) && (boss->dmgType == DMG_BEAM) && - (D_i5_801BAA78[D_i5_801B7904[boss->dmgPart]] == 2) && (D_i5_801BBEF0[8] == 0)) { - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, boss->sfxSource, 4); - boss->dmgType = DMG_NONE; + if ((this->state >= 7) && (this->state < 14) && (this->dmgType == DMG_BEAM) && + (D_i5_801BAA78[D_i5_801B7904[this->dmgPart]] == 2) && (D_i5_801BBEF0[8] == 0)) { + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); + this->dmgType = DMG_NONE; } - if ((boss->state >= 7) && (boss->state < 14)) { - if (boss->dmgType == DMG_BEAM) { - boss->dmgType = DMG_NONE; - D_i5_801BD668[D_i5_801B7904[boss->dmgPart]] = D_i5_801B7960[D_i5_801B7904[boss->dmgPart]][1]; - D_i5_801BD6B0[D_i5_801B7904[boss->dmgPart]] = 0; + if ((this->state >= 7) && (this->state < 14)) { + if (this->dmgType == DMG_BEAM) { + this->dmgType = DMG_NONE; + D_i5_801BD668[D_i5_801B7904[this->dmgPart]] = D_i5_801B7960[D_i5_801B7904[this->dmgPart]][1]; + D_i5_801BD6B0[D_i5_801B7904[this->dmgPart]] = 0; - if ((D_i5_801B7904[boss->dmgPart] == 6) && (boss->state == 11)) { - D_i5_801BD668[D_i5_801B7904[boss->dmgPart]] = 0; + if ((D_i5_801B7904[this->dmgPart] == 6) && (this->state == 11)) { + D_i5_801BD668[D_i5_801B7904[this->dmgPart]] = 0; } - if (D_i5_801BAA78[D_i5_801B7904[boss->dmgPart]] != 0) { - AUDIO_PLAY_SFX(NA_SE_EN_TIBOSS_DM_CRY, boss->sfxSource, 4); - boss->swork[D_i5_801BAA78[D_i5_801B7904[boss->dmgPart]] + 4] = 20; - if (boss->swork[D_i5_801BAA78[D_i5_801B7904[boss->dmgPart]] + 8] > 0) { - boss->swork[D_i5_801BAA78[D_i5_801B7904[boss->dmgPart]] + 8] -= boss->damage; - if (boss->swork[D_i5_801BAA78[D_i5_801B7904[boss->dmgPart]] + 8] <= 0) { - boss->swork[D_i5_801BAA78[D_i5_801B7904[boss->dmgPart]] + 8] = 0; + if (D_i5_801BAA78[D_i5_801B7904[this->dmgPart]] != 0) { + AUDIO_PLAY_SFX(NA_SE_EN_TIBOSS_DM_CRY, this->sfxSource, 4); + this->swork[D_i5_801BAA78[D_i5_801B7904[this->dmgPart]] + 4] = 20; + if (this->swork[D_i5_801BAA78[D_i5_801B7904[this->dmgPart]] + 8] > 0) { + this->swork[D_i5_801BAA78[D_i5_801B7904[this->dmgPart]] + 8] -= this->damage; + if (this->swork[D_i5_801BAA78[D_i5_801B7904[this->dmgPart]] + 8] <= 0) { + this->swork[D_i5_801BAA78[D_i5_801B7904[this->dmgPart]] + 8] = 0; D_i5_801BBEF0[6] = 40; D_i5_801BBEF4[10] = 2.0f; } } pad = 0; for (i = 0; i < 4; i++) { - if (boss->swork[9 + i] <= 0) { + if (this->swork[9 + i] <= 0) { pad++; } } @@ -3855,62 +4023,67 @@ void Titania_80193DF0(Boss* boss) { } if (pad == 4) { D_i5_801BBEF0[41] = 0; - boss->swork[28] = 1; - boss->swork[27] = 80; - boss->swork[35]++; + this->swork[28] = 1; + this->swork[27] = 80; + this->swork[35]++; } - } else if ((gBossHealthBar > 0) && (D_i5_801B7904[boss->dmgPart] == 23) && (boss->swork[29] != 0) && - (boss->swork[21] > 0)) { - boss->swork[21] -= boss->damage; - if (boss->swork[21] <= 0) { + } else if ((gBossHealthBar > 0) && (D_i5_801B7904[this->dmgPart] == 23) && (this->swork[29] != 0) && + (this->swork[21] > 0)) { + this->swork[21] -= this->damage; + if (this->swork[21] <= 0) { gTeamLowHealthMsgTimer = -1; - boss->swork[21] = 0; + this->swork[21] = 0; gScreenFlashTimer = 8; - AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, this->sfxSource, 4); } else { - AUDIO_PLAY_SFX(NA_SE_EN_TIBOSS_DM_CRY, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_TIBOSS_DM_CRY, this->sfxSource, 4); - if (boss->swork[21] <= 10) { + if (this->swork[21] <= 10) { D_i5_801BBEF0[1] = 15; - } else if (boss->swork[21] <= 20) { + } else if (this->swork[21] <= 20) { D_i5_801BBEF0[1] = 20; } } - gBossHealthBar = (s32) ((boss->swork[21] * 255.0f) / 100.0f); - boss->swork[22] = 20; + gBossHealthBar = (s32) ((this->swork[21] * 255.0f) / 100.0f); + this->swork[22] = 20; D_i5_801BBEF0[6] = 20; D_i5_801BBEF4[10] = 4.0f; - } else if (D_i5_801B7904[boss->dmgPart] == 28) { - boss->swork[37] |= 4; + } else if (D_i5_801B7904[this->dmgPart] == 28) { + this->swork[37] |= 4; D_i5_801BBEF0[43] = 0; } else { - AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); } } - if ((boss->dmgType == DMG_BOMB) && (boss->dmgPart == 1) && (D_i5_801BBEF0[8] == 0)) { - boss->dmgType = DMG_NONE; + + if ((this->dmgType == DMG_BOMB) && (this->dmgPart == 1) && (D_i5_801BBEF0[8] == 0)) { + this->dmgType = DMG_NONE; } - if (boss->dmgType == DMG_BOMB) { - boss->dmgType = DMG_NONE; - switch (boss->dmgPart) { + if (this->dmgType == DMG_BOMB) { + this->dmgType = DMG_NONE; + switch (this->dmgPart) { case 0: case 1: case 2: case 3: - AUDIO_PLAY_SFX(NA_SE_EN_TIBOSS_DM_CRY, boss->sfxSource, 4); - boss->swork[boss->dmgPart + 5] = 20; - if (boss->swork[boss->dmgPart + 9] <= 0) { + AUDIO_PLAY_SFX(NA_SE_EN_TIBOSS_DM_CRY, this->sfxSource, 4); + this->swork[this->dmgPart + 5] = 20; + + if (this->swork[this->dmgPart + 9] <= 0) { break; } - boss->swork[boss->dmgPart + 9] -= boss->damage; - if (boss->swork[boss->dmgPart + 9] <= 0) { - boss->swork[boss->dmgPart + 9] = 0; + + this->swork[this->dmgPart + 9] -= this->damage; + + if (this->swork[this->dmgPart + 9] <= 0) { + this->swork[this->dmgPart + 9] = 0; D_i5_801BBEF0[6] = 40; D_i5_801BBEF4[10] = 2.0f; pad = 0; + for (i = 0; i < 4; i++) { - if (boss->swork[9 + i] <= 0) { + if (this->swork[9 + i] <= 0) { pad++; } } @@ -3920,32 +4093,35 @@ void Titania_80193DF0(Boss* boss) { } if (pad == 4) { D_i5_801BBEF0[41] = 0; - boss->swork[28] = 1; - boss->swork[27] = 80; - boss->swork[35]++; + this->swork[28] = 1; + this->swork[27] = 80; + this->swork[35]++; } } break; + case 4: - if ((gBossHealthBar > 0) && (boss->swork[29] != 0) && (boss->swork[21] > 0)) { - AUDIO_PLAY_SFX(NA_SE_EN_TIBOSS_DM_CRY, boss->sfxSource, 4); - boss->swork[21] -= boss->damage; - if (boss->swork[21] <= 0) { - boss->swork[21] = 0; + if ((gBossHealthBar > 0) && (this->swork[29] != 0) && (this->swork[21] > 0)) { + AUDIO_PLAY_SFX(NA_SE_EN_TIBOSS_DM_CRY, this->sfxSource, 4); + + this->swork[21] -= this->damage; + + if (this->swork[21] <= 0) { + this->swork[21] = 0; gScreenFlashTimer = 8; gTeamLowHealthMsgTimer = -1; - AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, this->sfxSource, 4); } else { - AUDIO_PLAY_SFX(NA_SE_EN_TIBOSS_DM_CRY, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_TIBOSS_DM_CRY, this->sfxSource, 4); - if (boss->swork[21] < 11) { + if (this->swork[21] < 11) { D_i5_801BBEF0[1] = 15; - } else if (boss->swork[21] < 21) { + } else if (this->swork[21] < 21) { D_i5_801BBEF0[1] = 20; } } - gBossHealthBar = (s32) ((boss->swork[21] * 255.0f) / 100.0f); - boss->swork[22] = 20; + gBossHealthBar = (s32) ((this->swork[21] * 255.0f) / 100.0f); + this->swork[22] = 20; D_i5_801BBEF0[6] = 20; D_i5_801BBEF4[10] = 4.0f; } @@ -3954,75 +4130,82 @@ void Titania_80193DF0(Boss* boss) { } } - if ((boss->state >= 6) && (boss->state < 14) && (D_i5_801BBEF0[1] != 0)) { + if ((this->state >= 6) && (this->state < 14) && (D_i5_801BBEF0[1] != 0)) { D_i5_801BBEF0[0]++; if (D_i5_801BBEF0[0] >= D_i5_801BBEF0[1]) { D_i5_801BBEF0[0] -= D_i5_801BBEF0[1]; } } - switch (boss->swork[28]) { + switch (this->swork[28]) { case 1: - if (boss->swork[27] == 0) { - boss->swork[28]++; + if (this->swork[27] == 0) { + this->swork[28]++; } break; + case 2: D_i5_801BBF00[61].unk_26 = 3; D_i5_801BBEF4[2] = 0.0f; D_i5_801BBEF4[1] = 20.0f; - boss->swork[28]++; - AUDIO_PLAY_SFX(NA_SE_EN_HEART_OPEN, boss->sfxSource, 4); - AUDIO_PLAY_SFX(NA_SE_EN_HEARTBEAT, boss->sfxSource, 4); + this->swork[28]++; + AUDIO_PLAY_SFX(NA_SE_EN_HEART_OPEN, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_HEARTBEAT, this->sfxSource, 4); break; + case 3: D_i5_801BBEF4[2] += D_i5_801BBEF4[1]; D_i5_801BBEF4[1] += 4.0; if (D_i5_801BBEF4[2] >= 116.0f) { - boss->swork[28]++; + this->swork[28]++; D_i5_801BBEF4[3] = 40.0f; D_i5_801BBEF4[5] = 5.0f; D_i5_801BBEF4[4] = 20.0f; - boss->swork[29] = 1; - boss->swork[37] |= 1; - AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, boss->sfxSource, 4); + this->swork[29] = 1; + this->swork[37] |= 1; + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, this->sfxSource, 4); } break; + case 4: D_i5_801BBEF4[3]--; if (D_i5_801BBEF4[3] == 0) { - boss->swork[27] = 300; - boss->swork[28]++; + this->swork[27] = 300; + this->swork[28]++; } break; + case 5: - if (boss->swork[27] == 0) { + if (this->swork[27] == 0) { D_i5_801BBEF4[3] = 40.0f; D_i5_801BBEF4[5] = 5.0f; D_i5_801BBEF4[4] = 20.0f; - boss->swork[28]++; + this->swork[28]++; } break; + case 6: D_i5_801BBEF4[3] -= 1; if (D_i5_801BBEF4[3] == 0) { D_i5_801BBEF4[1] = -40.0f; D_i5_801BBEF4[4] = 0.0f; - boss->swork[28]++; + this->swork[28]++; } break; + case 7: D_i5_801BBEF4[2] += D_i5_801BBEF4[1]; D_i5_801BBEF4[1] -= 3.0; if (D_i5_801BBEF4[2] <= 0.0f) { - Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_HEARTBEAT); - boss->swork[29] = 0; + Audio_KillSfxBySourceAndId(this->sfxSource, NA_SE_EN_HEARTBEAT); + this->swork[29] = 0; D_i5_801BBEF4[2] = 0.0f; - boss->swork[28]++; + this->swork[28]++; } break; + case 8: - AUDIO_PLAY_SFX(NA_SE_EN_GATHER_PARTS, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_GATHER_PARTS, this->sfxSource, 4); for (i = 0; i < 33; i++) { actor = Game_SpawnActor(OBJ_ACTOR_DEBRIS); @@ -4030,47 +4213,53 @@ void Titania_80193DF0(Boss* boss) { actor->state = 40; actor->obj.pos.x = 0.0f; actor->obj.pos.y = 0.0f; - actor->obj.pos.z = boss->obj.pos.z + 2000.0f; + actor->obj.pos.z = this->obj.pos.z + 2000.0f; actor->info.cullDistance = 5000.0f; actor->unk_046 = D_i5_801B7770[D_i5_801B8198[i].unk_00][5]; actor->unk_048 = D_i5_801B7770[D_i5_801B8198[i].unk_00][1]; D_i5_801B8198[i].unk_0C = D_i5_801B8198[i].unk_04; - actor->vel.z = boss->vel.z; + actor->vel.z = this->vel.z; D_i5_801BBF00[D_i5_801B8198[i].unk_00].unk_26 |= 1; } D_i5_801B8198[i].actor = actor; } - boss->swork[28]++; + this->swork[28]++; break; + case 9: for (i = 0; i < 33; i++) { actor = D_i5_801B8198[i].actor; if (actor != NULL) { pad2 = D_i5_801B8198[i].unk_00; - actor->obj.pos.x = boss->obj.pos.x + (D_i5_801BBF00[pad2].unk_00.pos.x * 2.0f); - actor->obj.pos.y = boss->obj.pos.y + D_i5_801BBF00[pad2].unk_00.pos.y; + actor->obj.pos.x = this->obj.pos.x + (D_i5_801BBF00[pad2].unk_00.pos.x * 2.0f); + actor->obj.pos.y = this->obj.pos.y + D_i5_801BBF00[pad2].unk_00.pos.y; } } - boss->swork[28]++; + this->swork[28]++; break; + case 10: - Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); spA4 = 0; + for (i = 0; i < 33; i++) { actor = D_i5_801B8198[i].actor; if (actor != NULL) { if (D_i5_801B8198[i].unk_0C == 0) { pad2 = D_i5_801B8198[i].unk_00; Matrix_MultVec3f(gCalcMatrix, &D_i5_801BBF00[pad2].unk_00.pos, &spC8); + sp9C = - fabsf(Math_SmoothStepToF(&actor->obj.pos.x, boss->obj.pos.x + spC8.x, 1.0f, 40.0f, 0.01f)); + fabsf(Math_SmoothStepToF(&actor->obj.pos.x, this->obj.pos.x + spC8.x, 1.0f, 40.0f, 0.01f)); sp9C += - fabsf(Math_SmoothStepToF(&actor->obj.pos.y, boss->obj.pos.y + spC8.y, 1.0f, 40.0f, 0.01f)); + fabsf(Math_SmoothStepToF(&actor->obj.pos.y, this->obj.pos.y + spC8.y, 1.0f, 40.0f, 0.01f)); sp9C += - fabsf(Math_SmoothStepToF(&actor->obj.pos.z, boss->obj.pos.z + spC8.z, 1.0f, 90.0f, 0.01f)); + fabsf(Math_SmoothStepToF(&actor->obj.pos.z, this->obj.pos.z + spC8.z, 1.0f, 90.0f, 0.01f)); + actor->obj.rot.x += 20.0f; actor->obj.rot.y += 20.0f; actor->obj.rot.z += 20.0f; + if (sp9C <= 25.0f) { D_i5_801BBF00[D_i5_801B8198[i].unk_00].unk_26 = 8; Object_Kill(&actor->obj, actor->sfxSource); @@ -4085,190 +4274,217 @@ void Titania_80193DF0(Boss* boss) { } if (spA4 == 33) { - boss->swork[28]++; + this->swork[28]++; } break; + case 11: for (i = 0; i < 33U; i++) { D_i5_801BBF00[D_i5_801B8198[i].unk_00].unk_26 = 0; } for (i = 0; i < 4; i++) { - boss->swork[9 + i] = 30; - boss->swork[13 + i] = 0; - boss->swork[17 + i] = 0; + this->swork[9 + i] = 30; + this->swork[13 + i] = 0; + this->swork[17 + i] = 0; } - boss->swork[28] = 0; - boss->swork[37] |= 2; + this->swork[28] = 0; + this->swork[37] |= 2; break; + case 0: break; } + Math_SmoothStepToAngle(&D_i5_801BBEF4[13], D_i5_801BBEF4[12], 0.5f, 1.5f, 0.01f); spB8 = 0; - switch (boss->state) { + switch (this->state) { case 7: - Animation_GetFrameData(&D_TI2_70084CC, boss->unk_04C >> 1, D_i5_801BC978); + Animation_GetFrameData(&D_TI2_70084CC, this->animFrame >> 1, D_i5_801BC978); break; case 8: - Animation_GetFrameData(&D_TI2_7003EE8, boss->unk_04C >> 1, D_i5_801BC978); + Animation_GetFrameData(&D_TI2_7003EE8, this->animFrame >> 1, D_i5_801BC978); break; case 9: - Animation_GetFrameData(&D_TI_8008FE8, boss->unk_04C >> 1, D_i5_801BC978); + Animation_GetFrameData(&D_TI_8008FE8, this->animFrame >> 1, D_i5_801BC978); break; case 10: - Animation_GetFrameData(&D_TI2_700E244, boss->unk_04C >> 1, D_i5_801BC978); + Animation_GetFrameData(&D_TI2_700E244, this->animFrame >> 1, D_i5_801BC978); break; case 11: case 13: - Animation_GetFrameData(&D_TI_9004288, boss->unk_04C >> 1, D_i5_801BC978); + Animation_GetFrameData(&D_TI_9004288, this->animFrame >> 1, D_i5_801BC978); break; case 12: - Animation_GetFrameData(&D_TI_A009990, boss->unk_04C >> 1, D_i5_801BC978); + Animation_GetFrameData(&D_TI_A009990, this->animFrame >> 1, D_i5_801BC978); break; } - pad2 = boss->swork[34]; + + pad2 = this->swork[34]; + switch (pad2) { case 0: break; case 1: - Animation_GetFrameData(&D_TI2_70096EC, (s32) boss->fwork[48] >> 1, D_i5_801BD218); + Animation_GetFrameData(&D_TI2_70096EC, (s32) this->fwork[48] >> 1, D_i5_801BD218); // might need to copy individual values for (i = 0; i < 19; i++) { D_i5_801BC978[D_i5_801BAA50[i]] = D_i5_801BD218[D_i5_801BAA50[i]]; } - break; + case 2: - Animation_GetFrameData(&D_TI_A009990, (s32) boss->fwork[48] >> 1, D_i5_801BD218); + Animation_GetFrameData(&D_TI_A009990, (s32) this->fwork[48] >> 1, D_i5_801BD218); for (i = 0; i < 19; i++) { D_i5_801BC978[D_i5_801BAA50[i]] = D_i5_801BD218[D_i5_801BAA50[i]]; } break; } - if ((boss->state >= 7) && (boss->state <= 12) && ((boss->fwork[9] > 0.0f) || (boss->fwork[6] > 0.0f))) { - if (boss->state == 12) { - if ((boss->fwork[9] > 0.0f) && (boss->fwork[6] > 0.0f)) { - Math_SmoothStepToF(&boss->obj.pos.x, gPlayer[0].pos.x, 0.1f, 10.0f, 0.01f); + + if ((this->state >= 7) && (this->state <= 12) && ((this->fwork[9] > 0.0f) || (this->fwork[6] > 0.0f))) { + if (this->state == 12) { + if ((this->fwork[9] > 0.0f) && (this->fwork[6] > 0.0f)) { + Math_SmoothStepToF(&this->obj.pos.x, gPlayer[0].pos.x, 0.1f, 10.0f, 0.01f); } else { - Math_SmoothStepToF(&boss->obj.pos.x, gPlayer[0].pos.x, 0.1f, 4.0f, 0.01f); + Math_SmoothStepToF(&this->obj.pos.x, gPlayer[0].pos.x, 0.1f, 4.0f, 0.01f); } } else { - Math_SmoothStepToF(&boss->obj.pos.x, gPlayer[0].pos.x, 0.1f, 3.0f, 0.01f); + Math_SmoothStepToF(&this->obj.pos.x, gPlayer[0].pos.x, 0.1f, 3.0f, 0.01f); } } - switch (boss->state) { + + switch (this->state) { case 5: - if (boss->timer_050 == 0) { + if (this->timer_050 == 0) { D_i5_801BBEF0[0] = 0; D_i5_801BBEF0[1] = 25; D_i5_801BBEF4[0] = 0.25f; - boss->obj.pos.x = gPlayer[0].pos.x; - boss->obj.pos.z = gPlayer[0].trueZpos - 1070.0f; - boss->vel.z = 0.0f; + + this->obj.pos.x = gPlayer[0].pos.x; + this->obj.pos.z = gPlayer[0].trueZpos - 1070.0f; + this->vel.z = 0.0f; + Animation_GetFrameData(&D_TI_900FC4C, 0, D_i5_801BCDC8); + D_i5_801BBEF4[8] = 48.0f; D_i5_801BBEF4[9] = 48.0f; - boss->fwork[35] = 1.0f; + + this->fwork[35] = 1.0f; + D_i5_801BBEF0[13] = 1; D_i5_801BBEF4[32] = 10.0f; D_i5_801BBEF4[33] = 10.0f; - boss->swork[1] = 6; - D_i5_801BBEF4[11] = D_i5_801B7738[boss->swork[1]]; - boss->swork[31] = 0; - boss->swork[30]++; + + this->swork[1] = 6; + + D_i5_801BBEF4[11] = D_i5_801B7738[this->swork[1]]; + + this->swork[31] = 0; + this->swork[30]++; + for (i = 0; i < ARRAY_COUNTU(D_i5_801BBF00); i++) { D_i5_801BBF00[i].unk_26 = 1; D_i5_801BBF00[i].unk_24 = -1; } } break; + case 6: - boss->fwork[47] = (f32) boss->unk_04C / (f32) (Animation_GetFrameCount(&D_TI_900FC4C) * 2); - if ((boss->unk_04C == 0) || (boss->unk_04C == 68) || (boss->unk_04C == 96) || (boss->unk_04C == 149)) { - AUDIO_PLAY_SFX(NA_SE_EN_APPEAR_SAND, boss->sfxSource, 4); + this->fwork[47] = (f32) this->animFrame / (f32) (Animation_GetFrameCount(&D_TI_900FC4C) * 2); + + if ((this->animFrame == 0) || (this->animFrame == 68) || (this->animFrame == 96) || + (this->animFrame == 149)) { + AUDIO_PLAY_SFX(NA_SE_EN_APPEAR_SAND, this->sfxSource, 4); } - temp_f = gPlayer[0].trueZpos - boss->obj.pos.z - 530.0f; + + temp_f = gPlayer[0].trueZpos - this->obj.pos.z - 530.0f; if (temp_f < 0.0f) { - boss->obj.pos.z += temp_f; + this->obj.pos.z += temp_f; } - if (boss->unk_04C == 26) { + + if (this->animFrame == 26) { gPlayer[0].unk_19C = -1; gPlayer[0].unk_000 = 0.0f; } for (i = 0; i < ARRAY_COUNTU(D_i5_801BBF00); i++) { - if ((D_i5_801BBF00[i].unk_24 < 0) && ((boss->obj.pos.y + D_i5_801BBF00[i].unk_00.pos.y) > 0.0f)) { + if ((D_i5_801BBF00[i].unk_24 < 0) && ((this->obj.pos.y + D_i5_801BBF00[i].unk_00.pos.y) > 0.0f)) { D_i5_801BBF00[i].unk_24 = 30; } if (D_i5_801BBF00[i].unk_24 > 0) { D_i5_801BBF00[i].unk_24--; if (!(D_i5_801BBF00[i].unk_24 & 1)) { // prefer == 0 - func_effect_8007A900(boss->obj.pos.x + D_i5_801BBF00[i].unk_00.pos.x, - boss->obj.pos.y + D_i5_801BBF00[i].unk_00.pos.y, - boss->obj.pos.z + D_i5_801BBF00[i].unk_00.pos.z, 7.0f, 160, 16, 0); + Effect_Effect359_Spawn(this->obj.pos.x + D_i5_801BBF00[i].unk_00.pos.x, + this->obj.pos.y + D_i5_801BBF00[i].unk_00.pos.y, + this->obj.pos.z + D_i5_801BBF00[i].unk_00.pos.z, 7.0f, 160, 16, 0); } } if (D_i5_801BBF00[i].unk_24 != 0) { D_i5_801BBF00[i].unk_26 = 1; } } - Animation_GetFrameData(&D_TI_900FC4C, boss->unk_04C >> 1, D_i5_801BC978); - Math_SmoothStepToF(&boss->fwork[0], 0.5f, 1.0f, 0.02f, 0.0f); - Math_SmoothStepToVec3fArray(D_i5_801BC978, D_i5_801BCDC8, 1, 92, boss->fwork[0], 360.0f, 0.01f); - boss->unk_04C++; - if (boss->unk_04C >= (Animation_GetFrameCount(&D_TI_900FC4C) * 2)) { - AUDIO_PLAY_SFX(NA_SE_EN_TIBOSS_AT_CRY, boss->sfxSource, 4); + + Animation_GetFrameData(&D_TI_900FC4C, this->animFrame >> 1, D_i5_801BC978); + Math_SmoothStepToF(&this->fwork[0], 0.5f, 1.0f, 0.02f, 0.0f); + Math_SmoothStepToVec3fArray(D_i5_801BC978, D_i5_801BCDC8, 1, 92, this->fwork[0], 360.0f, 0.01f); + this->animFrame++; + + if (this->animFrame >= (Animation_GetFrameCount(&D_TI_900FC4C) * 2)) { + AUDIO_PLAY_SFX(NA_SE_EN_TIBOSS_AT_CRY, this->sfxSource, 4); gPlayer[0].unk_19C = 0; - boss->unk_04C = 0; - boss->fwork[48] = 0; + this->animFrame = 0; + this->fwork[48] = 0; Animation_GetFrameData(&D_TI2_70084CC, 0, D_i5_801BC978); - boss->swork[31] = 0; - boss->swork[30]++; - boss->vel.z = -15.0f; + this->swork[31] = 0; + this->swork[30]++; + this->vel.z = -15.0f; spB8 = 1; } break; - case 7: { - if (boss->swork[9] > 0) { + case 7: + if (this->swork[9] > 0) { for (i = 0; i < 9; i++) { - if (boss->unk_04C == D_i5_801B8138[i]) { - sp90.x = boss->obj.pos.x + boss->fwork[23]; - sp90.y = boss->obj.pos.y + boss->fwork[24]; - sp90.z = boss->obj.pos.z + boss->fwork[25]; - sp84.x = -boss->fwork[28]; - sp84.y = boss->fwork[27] + 90.0f; + if (this->animFrame == D_i5_801B8138[i]) { + sp90.x = this->obj.pos.x + this->fwork[23]; + sp90.y = this->obj.pos.y + this->fwork[24]; + sp90.z = this->obj.pos.z + this->fwork[25]; + sp84.x = -this->fwork[28]; + sp84.y = this->fwork[27] + 90.0f; sp84.z = 0.0f; func_effect_8007EE68(OBJ_EFFECT_ENEMY_LASER_1, &sp90, &sp84, &D_tank_800C9F2C, &D_i5_801B8D48, 1.0f); } } } - if ((boss->swork[10] > 0) && ((D_i5_801BBEF0[41] == 2) || (D_i5_801BBEF0[8] != 0))) { + + if ((this->swork[10] > 0) && ((D_i5_801BBEF0[41] == 2) || (D_i5_801BBEF0[8] != 0))) { for (i = 0; i < 9; i++) { - if (boss->unk_04C == D_i5_801B814C[i]) { - sp90.x = boss->obj.pos.x + boss->fwork[29]; - sp90.y = boss->obj.pos.y + boss->fwork[30]; - sp90.z = boss->obj.pos.z + boss->fwork[31]; - sp84.x = -boss->fwork[34]; - sp84.y = boss->fwork[33] + 90.0f; + if (this->animFrame == D_i5_801B814C[i]) { + sp90.x = this->obj.pos.x + this->fwork[29]; + sp90.y = this->obj.pos.y + this->fwork[30]; + sp90.z = this->obj.pos.z + this->fwork[31]; + sp84.x = -this->fwork[34]; + sp84.y = this->fwork[33] + 90.0f; sp84.z = 0.0f; func_effect_8007EE68(OBJ_EFFECT_ENEMY_LASER_1, &sp90, &sp84, &D_tank_800C9F2C, &D_i5_801B8D48, 1.0f); } } } + if (D_i5_801BBEF0[41] == 1) { D_i5_801BBEF0[41] = 2; } + if (D_i5_801BBEF0[2] == 0) { D_i5_801BBEF4[7] = 48; D_i5_801BBEF0[2] = 90; D_i5_801BBEF0[3] = 2; } + if (D_i5_801BBEF0[8] != 0) { if (D_i5_801BBEF0[4] == 0) { D_i5_801BBEF4[9] = 48; @@ -4279,83 +4495,94 @@ void Titania_80193DF0(Boss* boss) { D_i5_801BBEF4[8] = 48; D_i5_801BBEF4[9] = 48; } - Math_SmoothStepToF(&boss->fwork[0], 0.5f, 1.0f, 0.02f, 0.0f); - Math_SmoothStepToVec3fArray(D_i5_801BC978, D_i5_801BCDC8, 1, 92, boss->fwork[0], 360.0f, 0.01f); - boss->unk_04C++; - if (boss->unk_04C >= (Animation_GetFrameCount(&D_TI2_70084CC) * 2)) { - boss->fwork[36] = 0.0f; - boss->fwork[37] = 0.0f; + + Math_SmoothStepToF(&this->fwork[0], 0.5f, 1.0f, 0.02f, 0.0f); + Math_SmoothStepToVec3fArray(D_i5_801BC978, D_i5_801BCDC8, 1, 92, this->fwork[0], 360.0f, 0.01f); + + this->animFrame++; + if (this->animFrame >= (Animation_GetFrameCount(&D_TI2_70084CC) * 2)) { + this->fwork[36] = 0.0f; + this->fwork[37] = 0.0f; spB8 = 1; } - } break; + break; + case 8: - if ((boss->unk_04C == 0) && (boss->swork[11] <= 0)) { - boss->unk_04C = 62; + if ((this->animFrame == 0) && (this->swork[11] <= 0)) { + this->animFrame = 62; } - if ((boss->unk_04C == 62) && (boss->swork[12] <= 0)) { - boss->unk_04C = (Animation_GetFrameCount(&D_TI2_7003EE8) * 2) - 1; + if ((this->animFrame == 62) && (this->swork[12] <= 0)) { + this->animFrame = (Animation_GetFrameCount(&D_TI2_7003EE8) * 2) - 1; D_i5_801BBEF4[12] = 0.0f; } - if (boss->unk_04C == 98) { + if (this->animFrame == 98) { D_i5_801BBEF4[12] = 0.0f; } - if ((boss->unk_04C == 22) || (boss->unk_04C == 80)) { - AUDIO_PLAY_SFX(NA_SE_EN_TIBOSS_AT_CRY, boss->sfxSource, 4); + if ((this->animFrame == 22) || (this->animFrame == 80)) { + AUDIO_PLAY_SFX(NA_SE_EN_TIBOSS_AT_CRY, this->sfxSource, 4); } - if (((boss->unk_04C >= 0) && (boss->unk_04C < 18)) || ((boss->unk_04C >= 62) && (boss->unk_04C < 80))) { + if (((this->animFrame >= 0) && (this->animFrame < 18)) || + ((this->animFrame >= 62) && (this->animFrame < 80))) { D_i5_801BBEF4[12] = - Math_Atan2F(gPlayer[0].pos.x - boss->obj.pos.x, gPlayer[0].pos.z - boss->obj.pos.z) * M_RTOD; + Math_Atan2F(gPlayer[0].pos.x - this->obj.pos.x, gPlayer[0].pos.z - this->obj.pos.z) * M_RTOD; D_i5_801BBEF4[11] = __cosf(D_i5_801BBEF4[12] * M_DTOR) * 580.0f; } - if ((boss->unk_04C >= 37) && (boss->unk_04C < 41) && (boss->swork[11] > 0)) { - spD4.x = boss->obj.pos.x + D_i5_801BBEF4[68]; + if ((this->animFrame >= 37) && (this->animFrame < 41) && (this->swork[11] > 0)) { + spD4.x = this->obj.pos.x + D_i5_801BBEF4[68]; spD4.y = 0.0f; - spD4.z = boss->obj.pos.z + D_i5_801BBEF4[70]; - if (boss->unk_04C & 1) { - func_effect_8007A900(spD4.x, 0.0f, spD4.z, 10.0f, 255, 8, 0); + spD4.z = this->obj.pos.z + D_i5_801BBEF4[70]; + if (this->animFrame & 1) { + Effect_Effect359_Spawn(spD4.x, 0.0f, spD4.z, 10.0f, 255, 8, 0); } - if (boss->unk_04C == 38) { + if (this->animFrame == 38) { Effect_SpawnTimedSfxAtPos(&spD4, NA_SE_EN_BOSS_ATTACK); - boss->swork[39] = 5; + this->swork[39] = 5; gCameraShake = 20; } } - if ((boss->unk_04C >= 97) && (boss->unk_04C < 101) && (boss->swork[12] > 0)) { - spD4.x = boss->obj.pos.x + D_i5_801BBEF4[71]; + if ((this->animFrame >= 97) && (this->animFrame < 101) && (this->swork[12] > 0)) { + spD4.x = this->obj.pos.x + D_i5_801BBEF4[71]; spD4.y = 0.0f; - spD4.z = boss->obj.pos.z + D_i5_801BBEF4[73]; - if (boss->unk_04C & 1) { - func_effect_8007A900(spD4.x, 0.0f, spD4.z, 10.0f, 255, 8, 0); + spD4.z = this->obj.pos.z + D_i5_801BBEF4[73]; + if (this->animFrame & 1) { + Effect_Effect359_Spawn(spD4.x, 0.0f, spD4.z, 10.0f, 255, 8, 0); } - if (boss->unk_04C == 98) { + if (this->animFrame == 98) { Effect_SpawnTimedSfxAtPos(&spD4, NA_SE_EN_BOSS_ATTACK); - boss->swork[39] = 5; + this->swork[39] = 5; gCameraShake = 20; } } - Math_SmoothStepToF(&boss->fwork[0], 0.5f, 1.0f, 0.02f, 0.0f); - Math_SmoothStepToVec3fArray(D_i5_801BC978, D_i5_801BCDC8, 1, 92, boss->fwork[0], 360.0f, 0.01f); - boss->unk_04C++; - if (boss->unk_04C >= (Animation_GetFrameCount(&D_TI2_7003EE8) * 2)) { + + Math_SmoothStepToF(&this->fwork[0], 0.5f, 1.0f, 0.02f, 0.0f); + Math_SmoothStepToVec3fArray(D_i5_801BC978, D_i5_801BCDC8, 1, 92, this->fwork[0], 360.0f, 0.01f); + + this->animFrame++; + if (this->animFrame >= (Animation_GetFrameCount(&D_TI2_7003EE8) * 2)) { spB8 = 1; } break; + case 9: - Math_SmoothStepToF(&boss->fwork[0], 0.5f, 1.0f, 0.02f, 0.0f); - Math_SmoothStepToVec3fArray(D_i5_801BC978, D_i5_801BCDC8, 1, 92, boss->fwork[0], 360.0f, 0.01f); - boss->unk_04C++; - if (boss->unk_04C >= (Animation_GetFrameCount(&D_TI_8008FE8) * 2)) { + Math_SmoothStepToF(&this->fwork[0], 0.5f, 1.0f, 0.02f, 0.0f); + Math_SmoothStepToVec3fArray(D_i5_801BC978, D_i5_801BCDC8, 1, 92, this->fwork[0], 360.0f, 0.01f); + + this->animFrame++; + if (this->animFrame >= (Animation_GetFrameCount(&D_TI_8008FE8) * 2)) { spB8 = 1; } break; + case 10: - Math_SmoothStepToF(&boss->fwork[0], 0.5f, 1.0f, 0.02f, 0.0f); - Math_SmoothStepToVec3fArray(D_i5_801BC978, D_i5_801BCDC8, 1, 92, boss->fwork[0], 360.0f, 0.01f); - boss->unk_04C++; - if (boss->unk_04C >= (Animation_GetFrameCount(&D_TI2_700E244) * 2)) { + Math_SmoothStepToF(&this->fwork[0], 0.5f, 1.0f, 0.02f, 0.0f); + Math_SmoothStepToVec3fArray(D_i5_801BC978, D_i5_801BCDC8, 1, 92, this->fwork[0], 360.0f, 0.01f); + + this->animFrame++; + if (this->animFrame >= (Animation_GetFrameCount(&D_TI2_700E244) * 2)) { spB8 = 1; } break; + case 11: if (D_i5_801BBEF0[26] > 0) { D_i5_801BBEF0[26]--; @@ -4368,31 +4595,31 @@ void Titania_80193DF0(Boss* boss) { if (D_i5_801BBEF0[17] > 0) { D_i5_801BBEF0[17]--; } - if (boss->unk_04C == 0) { - AUDIO_PLAY_SFX(NA_SE_EN_BOSS_CHARGE, boss->sfxSource, 4); + if (this->animFrame == 0) { + AUDIO_PLAY_SFX(NA_SE_EN_BOSS_CHARGE, this->sfxSource, 4); } - if (boss->unk_04C == 15) { + if (this->animFrame == 15) { D_i5_801BBEF0[16] = 25; } - if ((boss->unk_04C >= 44) && (boss->unk_04C < 51)) { + if ((this->animFrame >= 44) && (this->animFrame < 51)) { D_i5_801BBEF0[7]++; } - if (boss->unk_04C == 43) { + if (this->animFrame == 43) { D_i5_801BBEF0[7] = 0; D_i5_801BBEF4[11] = 1300.0f; } - if (boss->unk_04C == 51) { + if (this->animFrame == 51) { D_i5_801BBEF0[7] = 0; } - // pad = boss->unk_04C == 45; - if (boss->unk_04C == 45) { - AUDIO_PLAY_SFX(NA_SE_EN_BOSS_BEAM0, boss->sfxSource, 4); - boss->swork[32] = 0; - boss->fwork[42] = 0.0f; - boss->fwork[41] = 40.0f; + // pad = this->animFrame == 45; + if (this->animFrame == 45) { + AUDIO_PLAY_SFX(NA_SE_EN_BOSS_BEAM0, this->sfxSource, 4); + this->swork[32] = 0; + this->fwork[42] = 0.0f; + this->fwork[41] = 40.0f; D_i5_801BBEF0[26] = 3; - boss->swork[25] = 1; + this->swork[25] = 1; D_i5_801BBEF0[17] = 3; D_i5_801BBEF0[13] = 1; D_i5_801BBEF4[32] = 1.0f; @@ -4409,137 +4636,153 @@ void Titania_80193DF0(Boss* boss) { } } } - if (boss->unk_04C == 130) { + if (this->animFrame == 130) { for (i = 0; i < 4; i++) { gTexturedLines[D_i5_801BBEF0[9 + i] - 1].mode = 0; } - boss->swork[32] = 0; - Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_BOSS_BEAM0); - boss->swork[25] = 0; - boss->fwork[41] = 0.0f; - boss->fwork[42] = 0.0f; + this->swork[32] = 0; + Audio_KillSfxBySourceAndId(this->sfxSource, NA_SE_EN_BOSS_BEAM0); + this->swork[25] = 0; + this->fwork[41] = 0.0f; + this->fwork[42] = 0.0f; } - if (boss->unk_04C == 53) { - boss->swork[32] = 1; + if (this->animFrame == 53) { + this->swork[32] = 1; } - if (boss->unk_04C == 120) { - boss->swork[32] = 0; + if (this->animFrame == 120) { + this->swork[32] = 0; } + if (D_i5_801BBEF0[26] != 0) { gFillScreenRed = 255; gFillScreenGreen = 255; gFillScreenBlue = 255; gFillScreenAlpha = (D_i5_801BBEF0[26] * 255.0f) / 3.0f; } - if ((boss->unk_04C >= 54) && (boss->unk_04C < 120)) { - boss->fwork[46] += 0.04f; - if (boss->fwork[46] > 1.0f) { - boss->fwork[46] = 1.0f; + + if ((this->animFrame >= 54) && (this->animFrame < 120)) { + this->fwork[46] += 0.04f; + if (this->fwork[46] > 1.0f) { + this->fwork[46] = 1.0f; } } - if (boss->unk_04C == 51) { + if (this->animFrame == 51) { D_i5_801BBEF4[32] = 360.0f; D_i5_801BBEF4[33] = 10.0f; - boss->fwork[46] = 0.3f; + this->fwork[46] = 0.3f; } - if (boss->fwork[46] == 1.0f) { + + if (this->fwork[46] == 1.0f) { D_i5_801BBEF4[33] = 0.01f; D_i5_801BBEF4[32] = 0.5f; } - if (boss->unk_04C == 52) { + + if (this->animFrame == 52) { D_i5_801BBEF4[32] = 0.0f; } - if (boss->unk_04C == 120) { - boss->fwork[46] = 0.0f; + if (this->animFrame == 120) { + this->fwork[46] = 0.0f; } - if ((boss->unk_04C >= 51) && (boss->unk_04C < 120)) { - boss->fwork[35] = 1.0f; + if ((this->animFrame >= 51) && (this->animFrame < 120)) { + this->fwork[35] = 1.0f; } else { - boss->fwork[35] = 0.0f; + this->fwork[35] = 0.0f; } - if ((boss->unk_04C >= 45) && (boss->unk_04C < 47)) { - boss->fwork[41] += 20.0f; - boss->fwork[42] += 1050.0f; + if ((this->animFrame >= 45) && (this->animFrame < 47)) { + this->fwork[41] += 20.0f; + this->fwork[42] += 1050.0f; } - if (boss->unk_04C >= 47) { - if (boss->fwork[41] > 40.0f) { - boss->fwork[41] -= 20.0f; + if (this->animFrame >= 47) { + if (this->fwork[41] > 40.0f) { + this->fwork[41] -= 20.0f; } } - if ((boss->unk_04C >= 126) && (boss->unk_04C < 129)) { - boss->fwork[41] *= 0.5f; + if ((this->animFrame >= 126) && (this->animFrame < 129)) { + this->fwork[41] *= 0.5f; } - if (boss->unk_04C >= 128) { - boss->fwork[42] *= 0.3f; + if (this->animFrame >= 128) { + this->fwork[42] *= 0.3f; } - if (boss->unk_04C >= 129) { - boss->fwork[42] *= 0.5f; - boss->fwork[41] *= 0.5f; + if (this->animFrame >= 129) { + this->fwork[42] *= 0.5f; + this->fwork[41] *= 0.5f; } - if (boss->swork[24] != 0) { - Math_SmoothStepToF(&boss->fwork[45], 0.0f, 0.8f, 2.5f, 0.01f); - if (boss->fwork[43] == 0.0f) { - boss->fwork[43] = 1.0f; + + if (this->swork[24] != 0) { + Math_SmoothStepToF(&this->fwork[45], 0.0f, 0.8f, 2.5f, 0.01f); + if (this->fwork[43] == 0.0f) { + this->fwork[43] = 1.0f; } - Math_SmoothStepToF(&boss->fwork[43], 0.0f, 1.0f, 0.1f, 0.001f); - if (boss->unk_04C == 30) { - boss->fwork[41] = 0.0f; - boss->fwork[42] = 0.0f; - boss->swork[24] = 0; - Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_BOSS_CHARGE); + Math_SmoothStepToF(&this->fwork[43], 0.0f, 1.0f, 0.1f, 0.001f); + if (this->animFrame == 30) { + this->fwork[41] = 0.0f; + this->fwork[42] = 0.0f; + this->swork[24] = 0; + Audio_KillSfxBySourceAndId(this->sfxSource, NA_SE_EN_BOSS_CHARGE); } } - Math_SmoothStepToF(&boss->fwork[0], 0.5f, 1.0f, 0.02f, 0.0f); - Math_SmoothStepToVec3fArray(D_i5_801BC978, D_i5_801BCDC8, 1, 92, boss->fwork[0], 360.0f, 0.01f); - boss->unk_04C++; - if (boss->unk_04C >= (Animation_GetFrameCount(&D_TI_9004288) * 2)) { - boss->swork[24] = 0; - boss->fwork[43] = 0.0f; - boss->swork[25] = 0; + + Math_SmoothStepToF(&this->fwork[0], 0.5f, 1.0f, 0.02f, 0.0f); + Math_SmoothStepToVec3fArray(D_i5_801BC978, D_i5_801BCDC8, 1, 92, this->fwork[0], 360.0f, 0.01f); + + this->animFrame++; + if (this->animFrame >= (Animation_GetFrameCount(&D_TI_9004288) * 2)) { + this->swork[24] = 0; + this->fwork[43] = 0.0f; + this->swork[25] = 0; spB8 = 1; } break; + case 12: - boss->swork[33] = 1; - if ((boss->unk_04C >= 38) && (boss->unk_04C < 141)) { - boss->fwork[1] = ((boss->unk_04C - 38) * 360.0f) / 102.0f; + this->swork[33] = 1; + + if ((this->animFrame >= 38) && (this->animFrame < 141)) { + this->fwork[1] = ((this->animFrame - 38) * 360.0f) / 102.0f; } - Math_SmoothStepToAngle(&boss->fwork[49], boss->fwork[1], 0.5f, 180.0f, 0.0f); - Math_SmoothStepToF(&boss->fwork[0], 0.5f, 1.0f, 0.02f, 0.0f); - Math_SmoothStepToVec3fArray(D_i5_801BC978, D_i5_801BCDC8, 1, 92, boss->fwork[0], 360.0f, 0.01f); - boss->unk_04C++; - if (boss->unk_04C >= (Animation_GetFrameCount(&D_TI_A009990) * 2)) { - boss->swork[33] = 0; - boss->fwork[48] = 0; + + Math_SmoothStepToAngle(&this->fwork[49], this->fwork[1], 0.5f, 180.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[0], 0.5f, 1.0f, 0.02f, 0.0f); + Math_SmoothStepToVec3fArray(D_i5_801BC978, D_i5_801BCDC8, 1, 92, this->fwork[0], 360.0f, 0.01f); + + this->animFrame++; + if (this->animFrame >= (Animation_GetFrameCount(&D_TI_A009990) * 2)) { + this->swork[33] = 0; + this->fwork[48] = 0; spB8 = 1; } break; + case 13: - if (boss->swork[34] == 2) { - if ((boss->fwork[48] >= 38.0f) && (boss->fwork[48] <= 140.0f)) { - boss->fwork[1] = ((boss->fwork[48] - 38.0f) * 360.0f) / 102.0f; + if (this->swork[34] == 2) { + if ((this->fwork[48] >= 38.0f) && (this->fwork[48] <= 140.0f)) { + this->fwork[1] = ((this->fwork[48] - 38.0f) * 360.0f) / 102.0f; } - Math_SmoothStepToAngle(&boss->fwork[49], boss->fwork[1], 0.5f, 180.0f, 0.0f); + Math_SmoothStepToAngle(&this->fwork[49], this->fwork[1], 0.5f, 180.0f, 0.0f); } - Math_SmoothStepToF(&boss->fwork[0], 0.5f, 1.0f, 0.02f, 0.01f); - Math_SmoothStepToVec3fArray(D_i5_801BC978, D_i5_801BCDC8, 1, 92, boss->fwork[0], 360.0f, 0.01f); - if (boss->swork[38] & 1) { - boss->unk_04C++; + + Math_SmoothStepToF(&this->fwork[0], 0.5f, 1.0f, 0.02f, 0.01f); + Math_SmoothStepToVec3fArray(D_i5_801BC978, D_i5_801BCDC8, 1, 92, this->fwork[0], 360.0f, 0.01f); + + if (this->swork[38] & 1) { + this->animFrame++; } + D_i5_801BBEF0[6] = 2; - if (boss->unk_04C == 30) { - Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_HEARTBEAT); + + if (this->animFrame == 30) { + Audio_KillSfxBySourceAndId(this->sfxSource, NA_SE_EN_HEARTBEAT); D_i5_801BBEF0[7] = 0; - boss->obj.status = OBJ_DYING; + this->obj.status = OBJ_DYING; D_i5_801BBEF4[12] = 0.0f; - boss->fwork[35] = 0.0f; - boss->unk_044 = 0; - boss->timer_050 = 280; + this->fwork[35] = 0.0f; + this->unk_044 = 0; + this->timer_050 = 280; D_i5_801BBEF0[16] = 0; D_i5_801BBEF0[17] = 0; - boss->swork[23] = 0; + this->swork[23] = 0; D_i5_801BBEF0[6] = 80; D_i5_801BBEF0[7] = 0; for (i = 0; i < ARRAY_COUNTU(D_i5_801BBF00); i++) { @@ -4550,51 +4793,60 @@ void Titania_80193DF0(Boss* boss) { } break; } - pad2 = boss->swork[34]; + + pad2 = this->swork[34]; switch (pad2) { case 0: break; + case 1: - boss->fwork[48] += boss->fwork[2]; - if (Animation_GetFrameCount(&D_TI2_70096EC) * 2 <= boss->fwork[48]) { - boss->fwork[48] -= Animation_GetFrameCount(&D_TI2_70096EC) * 2; - } else if (boss->fwork[48] < 0.0f) { - boss->fwork[48] = boss->fwork[48] + (Animation_GetFrameCount(&D_TI2_70096EC) * 2 - 1.0f); + this->fwork[48] += this->fwork[2]; + if (Animation_GetFrameCount(&D_TI2_70096EC) * 2 <= this->fwork[48]) { + this->fwork[48] -= Animation_GetFrameCount(&D_TI2_70096EC) * 2; + } else if (this->fwork[48] < 0.0f) { + this->fwork[48] = this->fwork[48] + (Animation_GetFrameCount(&D_TI2_70096EC) * 2 - 1.0f); } break; + case 2: - boss->fwork[48] += 1.0f; - if (Animation_GetFrameCount(&D_TI_A009990) * 2 <= boss->fwork[48]) { - if (boss->state == 13) { - boss->fwork[0] = 0.0f; - boss->swork[34] = 1; - boss->fwork[48] = 0; + this->fwork[48] += 1.0f; + if (Animation_GetFrameCount(&D_TI_A009990) * 2 <= this->fwork[48]) { + if (this->state == 13) { + this->fwork[0] = 0.0f; + this->swork[34] = 1; + this->fwork[48] = 0; } else { - boss->fwork[48] = 0; + this->fwork[48] = 0; } } break; } + if (spB8 == 1) { - boss->unk_04C = 0; - boss->fwork[0] = 0.0f; - boss->swork[3]--; - if (boss->swork[3] <= 0) { - boss->swork[1] = 7 + RAND_INT(6.0f); - Titania_80193B30(boss); + this->animFrame = 0; + this->fwork[0] = 0.0f; + + this->swork[3]--; + if (this->swork[3] <= 0) { + this->swork[1] = 7 + RAND_INT(6.0f); + Titania_80193B30(this); } - boss->swork[4]++; - if (boss->swork[37] & 0x18) { + + this->swork[4]++; + + if (this->swork[37] & 0x18) { D_i5_801BBEF0[44]++; } + D_i5_801BBEF0[42] = 0; - pad2 = boss->swork[1]; + + pad2 = this->swork[1]; switch (pad2) { case 7: - if (boss->swork[37] & 2) { + if (this->swork[37] & 2) { pad = 0; for (i = 0; i < 4; i++) { - if (boss->swork[9 + i] <= 0) { + if (this->swork[9 + i] <= 0) { pad++; } } @@ -4602,88 +4854,91 @@ void Titania_80193DF0(Boss* boss) { if ((pad != 4) && gTeamShields[TEAM_ID_PEPPY] > 0) { Radio_PlayMessage(gMsg_ID_4095, RCID_PEPPY); } - boss->swork[37] &= ~2; + this->swork[37] &= ~2; } break; + case 9: - if (boss->swork[37] & 1) { - if ((boss->swork[29] != 0) && gTeamShields[TEAM_ID_FALCO] > 0) { + if (this->swork[37] & 1) { + if ((this->swork[29] != 0) && gTeamShields[TEAM_ID_FALCO] > 0) { Radio_PlayMessage(gMsg_ID_4099, RCID_FALCO); } - boss->swork[37] &= ~1; + this->swork[37] &= ~1; } break; } } - while (boss->fwork[49] >= 360.0f) { - boss->fwork[49] -= 360.0f; + while (this->fwork[49] >= 360.0f) { + this->fwork[49] -= 360.0f; } - while (boss->fwork[49] < 0.0f) { - boss->fwork[49] += 360.0f; + while (this->fwork[49] < 0.0f) { + this->fwork[49] += 360.0f; } for (i = 0; i < 4; i++) { - if (boss->swork[9 + i] == 0) { - var_v1 = boss->swork[17 + i]; - if (boss->swork[13 + i] == D_i5_801BAB0C[i][var_v1]) { + if (this->swork[9 + i] == 0) { + var_v1 = this->swork[17 + i]; + if (this->swork[13 + i] == D_i5_801BAB0C[i][var_v1]) { do { D_i5_801BBF00[D_i5_801BAABC[i][var_v1]].unk_26 = 3; - boss->swork[17 + i]++; + this->swork[17 + i]++; var_v1++; } while (D_i5_801BAB0C[i][var_v1] == 0); if (D_i5_801BAB0C[i][var_v1] == -1) { - boss->swork[9 + i] = -1; + this->swork[9 + i] = -1; } else { - boss->swork[13 + i] = 0; + this->swork[13 + i] = 0; } } else { - boss->swork[13 + i]++; + this->swork[13 + i]++; } } } - if ((boss->state != 13) && (boss->swork[21] <= 0)) { - boss->swork[1] = 13; - boss->unk_04C = 0; - if (boss->swork[25] != 0) { - Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_BOSS_BEAM0); - boss->swork[25] = 0; + + if ((this->state != 13) && (this->swork[21] <= 0)) { + this->swork[1] = 13; + this->animFrame = 0; + if (this->swork[25] != 0) { + Audio_KillSfxBySourceAndId(this->sfxSource, NA_SE_EN_BOSS_BEAM0); + this->swork[25] = 0; } - if (boss->swork[24] != 0) { - Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_BOSS_CHARGE); - boss->swork[24] = 0; + if (this->swork[24] != 0) { + Audio_KillSfxBySourceAndId(this->sfxSource, NA_SE_EN_BOSS_CHARGE); + this->swork[24] = 0; } } - if (boss->state >= 7) { - if ((boss->fwork[15] <= 0.0f) && (boss->fwork[9] > 0.0f)) { - effect = func_effect_8007783C(OBJ_EFFECT_394); + if (this->state >= 7) { + if ((this->fwork[15] <= 0.0f) && (this->fwork[9] > 0.0f)) { + effect = Effect_Load(OBJ_EFFECT_394); if (effect != NULL) { - Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_MultVec3f(gCalcMatrix, (Vec3f*) &boss->fwork[8], &spC8); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_MultVec3f(gCalcMatrix, (Vec3f*) &this->fwork[8], &spC8); effect->obj.status = OBJ_ACTIVE; effect->unk_78 = effect->unk_7A = 0; - effect->obj.pos.x = boss->obj.pos.x + spC8.x; - effect->obj.pos.y = boss->obj.pos.y + 3.0f; - effect->obj.pos.z = boss->obj.pos.z + spC8.z; - effect->obj.rot.y = boss->fwork[49] + -44.0f; + effect->obj.pos.x = this->obj.pos.x + spC8.x; + effect->obj.pos.y = this->obj.pos.y + 3.0f; + effect->obj.pos.z = this->obj.pos.z + spC8.z; + effect->obj.rot.y = this->fwork[49] + -44.0f; effect->unk_44 = 53; effect->info.cullDistance = 400.0f; effect->info.unk_14 = -1; effect->unk_74 = D_TI2_7009A80; } } - if ((boss->fwork[12] <= 0.0f) && (boss->fwork[6] > 0.0f)) { - effect = func_effect_8007783C(OBJ_EFFECT_394); + + if ((this->fwork[12] <= 0.0f) && (this->fwork[6] > 0.0f)) { + effect = Effect_Load(OBJ_EFFECT_394); if (effect != NULL) { - Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_MultVec3f(gCalcMatrix, (Vec3f*) &boss->fwork[5], &spC8); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_MultVec3f(gCalcMatrix, (Vec3f*) &this->fwork[5], &spC8); effect->obj.status = OBJ_ACTIVE; effect->unk_78 = effect->unk_7A = 0; - effect->obj.pos.x = boss->obj.pos.x + spC8.x; - effect->obj.pos.y = boss->obj.pos.y + 3.0f; - effect->obj.pos.z = boss->obj.pos.z + spC8.z; - effect->obj.rot.y = boss->fwork[49] + 44.0f; + effect->obj.pos.x = this->obj.pos.x + spC8.x; + effect->obj.pos.y = this->obj.pos.y + 3.0f; + effect->obj.pos.z = this->obj.pos.z + spC8.z; + effect->obj.rot.y = this->fwork[49] + 44.0f; effect->unk_44 = 53; effect->info.cullDistance = 400.0f; effect->info.unk_14 = -1; @@ -4691,33 +4946,34 @@ void Titania_80193DF0(Boss* boss) { } } } - if ((boss->state == 6) && ((boss->unk_04C == 134) || (boss->unk_04C == 188))) { - AUDIO_PLAY_SFX(NA_SE_EN_HEAVY_WALK2, boss->sfxSource, 4); - boss->swork[39] = 4; + + if ((this->state == 6) && ((this->animFrame == 134) || (this->animFrame == 188))) { + AUDIO_PLAY_SFX(NA_SE_EN_HEAVY_WALK2, this->sfxSource, 4); + this->swork[39] = 4; gCameraShake = 7; } - if (boss->state >= 7) { - if (((boss->fwork[15] > 0.0f) && (boss->fwork[9] <= 0.0f)) || - ((boss->fwork[12] > 0.0f) && (boss->fwork[6] <= 0.0f))) { - AUDIO_PLAY_SFX(NA_SE_EN_HEAVY_WALK2, boss->sfxSource, 4); - if (boss->state == 12) { - boss->swork[39] = 4; + if (this->state >= 7) { + if (((this->fwork[15] > 0.0f) && (this->fwork[9] <= 0.0f)) || + ((this->fwork[12] > 0.0f) && (this->fwork[6] <= 0.0f))) { + AUDIO_PLAY_SFX(NA_SE_EN_HEAVY_WALK2, this->sfxSource, 4); + if (this->state == 12) { + this->swork[39] = 4; gCameraShake = 20; } else { - boss->swork[39] = 2; + this->swork[39] = 2; gCameraShake = 5; } } - boss->fwork[12] = boss->fwork[6]; - boss->fwork[15] = boss->fwork[9]; + this->fwork[12] = this->fwork[6]; + this->fwork[15] = this->fwork[9]; } - if ((boss->state >= 7) && (D_i5_801B7738[boss->state] > 0.0f)) { + if ((this->state >= 7) && (D_i5_801B7738[this->state] > 0.0f)) { // Can use temp here - temp_f = Math_SmoothStepToF(&boss->obj.pos.z, gPlayer[0].pos.z - D_i5_801BBEF4[11], 0.1f, 14.0f, 0.001f); - boss->fwork[2] = (((-temp_f / 14.0f) * 1.2f) + 1.0f) * 2.0f; - boss->vel.z = -12.0f; + temp_f = Math_SmoothStepToF(&this->obj.pos.z, gPlayer[0].pos.z - D_i5_801BBEF4[11], 0.1f, 14.0f, 0.001f); + this->fwork[2] = (((-temp_f / 14.0f) * 1.2f) + 1.0f) * 2.0f; + this->vel.z = -12.0f; } - boss->dmgType = DMG_NONE; + this->dmgType = DMG_NONE; } #else #pragma GLOBAL_ASM("asm/us/rev1/nonmatchings/overlays/ovl_i5/fox_ti/Titania_80193DF0.s") @@ -4726,19 +4982,22 @@ void Titania_80193DF0(Boss*); static s16 D_i5_801B8D54[4] = { 30, 35, 60, 70 }; -void Titania_Boss_Update(Boss* boss) { +void Titania_TiGoras_Update(Boss* boss) { Vec3f sp3C; boss->swork[38]++; + if ((boss->dmgType != DMG_NONE) && (((boss->state >= 0) && (boss->state <= 1)) || ((boss->state >= 4) && (boss->state <= 6)))) { AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, boss->sfxSource, 4); boss->dmgType = DMG_NONE; } + if ((gPlayer[0].grounded != 0) && (boss->swork[39] > 0)) { gControllerRumbleFlags[0] = 1; boss->swork[39]--; } + if (boss->swork[28] == 2) { if (gTeamShields[TEAM_ID_PEPPY] > 0) { Radio_PlayMessage(gMsg_ID_4091, RCID_PEPPY); @@ -4749,6 +5008,7 @@ void Titania_Boss_Update(Boss* boss) { if (D_i5_801BBEF0[45] >= 2) { D_i5_801BBEF0[45]--; } + if (boss->swork[30] == 4) { if ((boss->swork[37] & 8) && (D_i5_801BBEF0[44] == 0)) { Radio_PlayMessage(gMsg_ID_4110, RCID_SLIPPY); @@ -4759,9 +5019,10 @@ void Titania_Boss_Update(Boss* boss) { boss->swork[37] &= ~0x10; D_i5_801BBEF0[45] = 101; } + if (D_i5_801BBEF0[45] == 1) { gBossHealthBar = ((boss->swork[21] * 255.0f) / 100.0f); - gShowBossHealth = 1; + gShowBossHealth = true; D_i5_801BBEF0[45] = 0; } } @@ -4769,6 +5030,7 @@ void Titania_Boss_Update(Boss* boss) { if ((boss->state >= 3) && (boss->state <= 13)) { gBossFrameCount++; } + switch (boss->state) { case 0: case 1: @@ -4807,14 +5069,15 @@ void Titania_Boss_Update(Boss* boss) { gTeamShields[TEAM_ID_SLIPPY] = -2; break; } - break; + case 1: if (boss->swork[31] == 1) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 90); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 90); } break; + case 2: if (boss->swork[31] == 11) { gTeamShields[TEAM_ID_SLIPPY] = 1; @@ -4822,6 +5085,7 @@ void Titania_Boss_Update(Boss* boss) { gTeamShields[TEAM_ID_SLIPPY] = -2; } break; + case 3: switch (boss->swork[31]) { case 1: @@ -4834,6 +5098,7 @@ void Titania_Boss_Update(Boss* boss) { break; } break; + case 4: if (boss->swork[35] == 0) { if (D_i5_801BBEF0[42] == 0) { @@ -4844,12 +5109,14 @@ void Titania_Boss_Update(Boss* boss) { } D_i5_801BBEF0[42] = 1; break; + case 3: if ((D_i5_801BBEF0[8] == 0) && (gTeamShields[TEAM_ID_FALCO] > 0)) { Radio_PlayMessage(gMsg_ID_4097, RCID_FALCO); } D_i5_801BBEF0[42] = 1; break; + default: break; } @@ -4866,6 +5133,7 @@ void Titania_Boss_Update(Boss* boss) { } } } + if (boss->swork[37] & 4) { D_i5_801BBEF0[43]++; switch (D_i5_801BBEF0[43]) { @@ -4933,7 +5201,7 @@ static f32 D_i5_801B8E24[4][2] = { { 1.0f, -1.0f }, }; -void Titania_Boss_Draw(Boss* boss) { +void Titania_TiGoras_Draw(TiGoras* boss) { TexturedLine* temp_v0_6; f32 sp120; f32 temp_fs0; @@ -4955,6 +5223,9 @@ void Titania_Boss_Draw(Boss* boss) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); switch (boss->state) { + case 0: + break; + case 1: case 2: case 3: @@ -4964,7 +5235,7 @@ void Titania_Boss_Draw(Boss* boss) { Animation_DrawSkeleton(0, D_TI_A000EDC, &D_i5_801BCDC8[16], Titania_8018FC70, Titania_8019002C, boss, &gIdentityMatrix); Matrix_Pop(&gGfxMatrix); - D_TI_801B83A8[0] = 22.0f; + aTiGorasHitbox[0] = 22.0f; Matrix_Push(&gGfxMatrix); D_i5_801BBEF0[25] = 1; Animation_DrawSkeleton(0, D_TI_A000568, &D_i5_801BCDC8[0], Titania_801903A0, Titania_8019081C, boss, @@ -4976,10 +5247,12 @@ void Titania_Boss_Draw(Boss* boss) { &gIdentityMatrix); Matrix_Pop(&gGfxMatrix); break; + case 6: Animation_DrawSkeleton(0, D_TI_A001A70, D_i5_801BCDC8, Titania_80190A08, Titania_80191AE8, boss, &gIdentityMatrix); break; + case 7: case 8: case 9: @@ -4990,23 +5263,29 @@ void Titania_Boss_Draw(Boss* boss) { Animation_DrawSkeleton(0, D_TI_A001A70, D_i5_801BCDC8, Titania_80190A08, Titania_80191AE8, boss, &gIdentityMatrix); break; - case 0: - break; } + Matrix_Pop(&gGfxMatrix); + if (boss->obj.status != OBJ_DYING) { switch (boss->state) { case 6: Matrix_Push(&gGfxMatrix); + RCP_SetupDL(&gMasterDisp, SETUPDL_69); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 0); + Matrix_RotateX(gGfxMatrix, -M_PI / 2, MTXF_APPLY); Matrix_Scale(gGfxMatrix, boss->fwork[47] * 10.0f, boss->fwork[47] * 10.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); + gSPDisplayList(gMasterDisp++, D_1024AC0); + Matrix_Pop(&gGfxMatrix); break; + case 7: case 8: case 9: @@ -5015,21 +5294,28 @@ void Titania_Boss_Draw(Boss* boss) { case 12: case 13: Matrix_Push(&gGfxMatrix); + RCP_SetupDL(&gMasterDisp, SETUPDL_69); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 0); + Matrix_RotateX(gGfxMatrix, -M_PI / 2, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); + gSPDisplayList(gMasterDisp++, D_1024AC0); + Matrix_Pop(&gGfxMatrix); break; } + if (boss->state == 11) { if (boss->swork[24] != 0) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, boss->fwork[17], boss->fwork[18], boss->fwork[19] + 50.0f, MTXF_APPLY); RCP_SetupDL_14(); + for (i = 0; i < 3; i++) { sp120 = (boss->fwork[43] + i) / 3.0f; temp_fs2 = boss->fwork[45] * sp120; @@ -5048,6 +5334,7 @@ void Titania_Boss_Draw(Boss* boss) { } Matrix_Pop(&gGfxMatrix); } + Matrix_Translate(gGfxMatrix, boss->fwork[17], boss->fwork[18], boss->fwork[19], MTXF_APPLY); if (D_i5_801BBEF0[7] != 0) { @@ -5061,6 +5348,7 @@ void Titania_Boss_Draw(Boss* boss) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 120, 255, 220, D_i5_801BBEF0[7] * 50); gSPDisplayList(gMasterDisp++, D_BG_PLANET_20112C0); Matrix_Pop(&gGfxMatrix); + if (D_i5_801BBEF0[7] > 0) { sp120 = (D_i5_801BBEF0[7] - 1) * 24.0f; Matrix_Scale(gGfxMatrix, sp120, 1.0f, sp120, MTXF_APPLY); @@ -5074,78 +5362,101 @@ void Titania_Boss_Draw(Boss* boss) { if (D_i5_801BBEF0[16] > 0) { temp = D_i5_801BBEF0[16] - 1; Matrix_Push(&gGfxMatrix); + Matrix_RotateY(gGfxMatrix, (boss->fwork[21] - 90.0f) * M_DTOR, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, (boss->fwork[22] - 180.0f) * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, (boss->fwork[20] + ((boss->unk_04C - 15) * 15.6f)) * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, (boss->fwork[20] + ((boss->animFrame - 15) * 15.6f)) * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, D_i5_801B8D5C[temp], D_i5_801B8D5C[temp], D_i5_801B8D5C[temp + 25], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL(&gMasterDisp, SETUPDL_49); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 178); gDPSetEnvColor(gMasterDisp++, 0, 128, 60, 0); gSPDisplayList(gMasterDisp++, D_TI2_7005300); + Matrix_Pop(&gGfxMatrix); } + if (D_i5_801BBEF0[17] > 0) { Matrix_Push(&gGfxMatrix); + Matrix_RotateY(gGfxMatrix, (boss->fwork[21] - 90.0f) * M_DTOR, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, (boss->fwork[22] - 180.0f) * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, (boss->fwork[20] + ((boss->unk_04C - 15) * 15.6f)) * M_DTOR * 3.0f, + Matrix_RotateZ(gGfxMatrix, (boss->fwork[20] + ((boss->animFrame - 15) * 15.6f)) * M_DTOR * 3.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 4.0f, 4.0f, 4.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); + RCP_SetupDL(&gMasterDisp, SETUPDL_49); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) ((D_i5_801BBEF0[17] * 89.0f) / 3.0f)); gDPSetEnvColor(gMasterDisp++, 0, 128, 60, 0); gSPDisplayList(gMasterDisp++, D_TI2_7005300); + Matrix_Pop(&gGfxMatrix); } if (boss->swork[25] != 0) { sp120 = boss->fwork[41] / 40.0f; temp_fs2 = boss->fwork[42] / 700.0f; + Matrix_RotateY(gGfxMatrix, (boss->fwork[21] - 90.0f) * M_DTOR, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, (boss->fwork[22] - 180.0f) * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, (boss->fwork[20] - ((s32) (boss->swork[38] % 8U) * 43.0f)) * M_DTOR, MTXF_APPLY); + Matrix_Push(&gGfxMatrix); Matrix_Scale(gGfxMatrix, half * sp120, half * sp120, temp_fs2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL(&gMasterDisp, SETUPDL_72); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 178); gDPSetEnvColor(gMasterDisp++, 0, 128, 60, 0); gSPDisplayList(gMasterDisp++, D_TI_8000D90); + Matrix_Pop(&gGfxMatrix); Matrix_Scale(gGfxMatrix, sp120, sp120, temp_fs2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); + gDPPipeSync(gMasterDisp++); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 64); gDPSetEnvColor(gMasterDisp++, 0, 128, 110, 0); gSPDisplayList(gMasterDisp++, D_TI_8000D90); + Matrix_RotateY(gCalcMatrix, (boss->fwork[21] - 90.0f) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, (boss->fwork[22] - 180.0f) * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, (boss->fwork[20] + boss->fwork[42]) * M_DTOR, MTXF_APPLY); + temp_fs0 = boss->obj.pos.x + boss->fwork[17]; temp_fs1 = boss->obj.pos.y + boss->fwork[18]; temp_fs2 = boss->obj.pos.z + boss->fwork[19]; + for (i = 0; i < 4; i++) { if (D_i5_801BBEF0[9 + i] != 0) { temp_v1_28 = D_i5_801BBEF0[9 + i] - 1; + spF4.x = D_i5_801B8E24[i][0] * boss->fwork[41]; spF4.y = D_i5_801B8E24[i][1] * boss->fwork[41]; spF4.z = boss->fwork[42]; + Matrix_MultVec3f(gCalcMatrix, &spF4, &spE8); + gTexturedLines[temp_v1_28].posAA.x = temp_fs0; gTexturedLines[temp_v1_28].posAA.y = temp_fs1; gTexturedLines[temp_v1_28].posAA.z = temp_fs2; gTexturedLines[temp_v1_28].posBB.x = temp_fs0 + spE8.x; gTexturedLines[temp_v1_28].posBB.y = temp_fs1 + spE8.y; gTexturedLines[temp_v1_28].posBB.z = temp_fs2 + spE8.z; + if (boss->swork[32] == 0) { gTexturedLines[temp_v1_28].mode = 0; } else { gTexturedLines[temp_v1_28].mode = 1; } + gTexturedLines[temp_v1_28].prim.r = 0; gTexturedLines[temp_v1_28].prim.b = 0; gTexturedLines[temp_v1_28].prim.g = 0; @@ -5161,19 +5472,23 @@ void Titania_Boss_Draw(Boss* boss) { static Vec3f D_i5_801B8E44 = { 3.0f, 0.0f, 0.0f }; -void Titania_801990DC(Boss* boss) { +void Titania_801990DC(TiGoras* this) { s32 i; Vec3f sp60; Actor* actor; - if (boss->unk_044 == 0) { - AUDIO_PLAY_SFX(NA_SE_EN_TIBOSS_DW_CRY, boss->sfxSource, 4); + if (this->unk_044 == 0) { + AUDIO_PLAY_SFX(NA_SE_EN_TIBOSS_DW_CRY, this->sfxSource, 4); + SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); - func_effect_8007A568(boss->obj.pos.x, boss->obj.pos.y + 250.0f, boss->obj.pos.z, 40.0f); - Boss_AwardBonus(boss); - gShowBossHealth = 0; - actor = gActors; + + Effect_Effect383_Spawn(this->obj.pos.x, this->obj.pos.y + 250.0f, this->obj.pos.z, 40.0f); + Boss_AwardBonus(this); + + gShowBossHealth = false; + + actor = &gActors[0]; for (i = 0; i < ARRAY_COUNT(gActors); i++, actor++) { if ((actor->obj.status == OBJ_ACTIVE) && (actor->obj.id == OBJ_ACTOR_DEBRIS) && (actor->state == 40)) { actor->gravity = 0.2f; @@ -5185,16 +5500,21 @@ void Titania_801990DC(Boss* boss) { actor = Game_SpawnActor(OBJ_ACTOR_DEBRIS); if (actor != NULL) { actor->state = 40; + actor->unk_046 = D_i5_801B7770[i][5]; actor->unk_048 = D_i5_801B7770[i][1]; - Matrix_RotateY(gCalcMatrix, boss->obj.rot.y * M_DTOR, MTXF_NEW); + + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, &D_i5_801BBF00[i].unk_00.pos, &sp60); - actor->obj.pos.x = boss->obj.pos.x + sp60.x; - actor->obj.pos.y = boss->obj.pos.y + sp60.y; - actor->obj.pos.z = boss->obj.pos.z + sp60.z; - actor->obj.rot.x = D_i5_801BBF00[i].unk_00.rot.x + boss->obj.rot.x; - actor->obj.rot.y = D_i5_801BBF00[i].unk_00.rot.y + boss->obj.rot.y; - actor->obj.rot.z = D_i5_801BBF00[i].unk_00.rot.z + boss->obj.rot.z; + + actor->obj.pos.x = this->obj.pos.x + sp60.x; + actor->obj.pos.y = this->obj.pos.y + sp60.y; + actor->obj.pos.z = this->obj.pos.z + sp60.z; + + actor->obj.rot.x = D_i5_801BBF00[i].unk_00.rot.x + this->obj.rot.x; + actor->obj.rot.y = D_i5_801BBF00[i].unk_00.rot.y + this->obj.rot.y; + actor->obj.rot.z = D_i5_801BBF00[i].unk_00.rot.z + this->obj.rot.z; + if (i == 51) { actor->vel.x = RAND_FLOAT(10.0f) - 5.0f; actor->vel.y = 30.0f; @@ -5209,84 +5529,103 @@ void Titania_801990DC(Boss* boss) { Matrix_Pop(&gCalcMatrix); actor->vel.x = sp60.x; actor->vel.y = SIGN_OF(D_i5_801BBF00[i].unk_00.pos.y - 250.0f) - RAND_FLOAT(0.5f) + 0.5f; - actor->vel.z = (boss->vel.z * 0.5f) + sp60.z; + actor->vel.z = (this->vel.z * 0.5f) + sp60.z; actor->gravity = 0.1f; } } D_i5_801BBF00[i].unk_26 = 4; } } - boss->unk_044 = 1; + this->unk_044 = 1; } else { - boss->obj.pos.z = gPlayer[0].pos.z; + this->obj.pos.z = gPlayer[0].pos.z; } - switch (boss->timer_050) { + switch (this->timer_050) { case 100: actor = Game_SpawnActor(OBJ_ACTOR_DEBRIS); if (actor != NULL) { actor->fwork[0] = ((Rand_ZeroOne() < 0.5f) ? -1 : 1) * (RAND_FLOAT(1.0f) + 1.0f); actor->fwork[1] = ((Rand_ZeroOne() < 0.5f) ? -1 : 1) * (RAND_FLOAT(1.0f) + 1.0f); + actor->state = 40; + actor->unk_046 = 25; actor->unk_048 = 0; actor->unk_04A = 4 | 2; + actor->fwork[3] = 0.0f; actor->fwork[4] = -200.0f; + actor->obj.pos.x = gPlayer[0].pos.x; actor->obj.pos.y = 500.0f; actor->obj.pos.z = gPlayer[0].trueZpos + actor->fwork[4]; + actor->obj.rot.y = (RAND_FLOAT(5.0f) + 90.0f) - 2.5f; actor->obj.rot.z = (RAND_FLOAT(5.0f) + 180.0f) - 2.5f; + actor->vel.y = -10.0f; actor->gravity = 0.8f; } break; + case 120: actor = Game_SpawnActor(OBJ_ACTOR_DEBRIS); if (actor != NULL) { actor->fwork[0] = ((Rand_ZeroOne() < 0.5f) ? -1 : 1) * (RAND_FLOAT(5.0f) + 5.0f); actor->fwork[1] = ((Rand_ZeroOne() < 0.5f) ? -1 : 1) * (RAND_FLOAT(5.0f) + 5.0f); + actor->state = 40; + actor->unk_046 = 2; actor->unk_048 = 1; actor->unk_04A = 4 | 2; + actor->iwork[1] = (s32) 1; actor->fwork[3] = -150.0f; actor->fwork[4] = -200.0f; actor->fwork[5] = 200.0f; + actor->obj.pos.x = gPlayer[0].pos.x + actor->fwork[3]; actor->obj.pos.y = 500.0f; actor->obj.pos.z = gPlayer[0].trueZpos + actor->fwork[4]; + actor->obj.rot.z = 90.0f; actor->vel.y = -10.0f; actor->gravity = 0.8f; } break; + case 140: actor = Game_SpawnActor(OBJ_ACTOR_DEBRIS); if (actor != NULL) { actor->fwork[0] = ((Rand_ZeroOne() < 0.5f) ? -1 : 1) * (RAND_FLOAT(1.0f) + 1.0f); actor->fwork[1] = ((Rand_ZeroOne() < 0.5f) ? -1 : 1) * (RAND_FLOAT(1.0f) + 1.0f); + actor->state = 40; + actor->unk_046 = 2; actor->unk_048 = 1; actor->unk_04A = 4 | 2; + actor->iwork[1] = 2; actor->fwork[3] = 100.0f; actor->fwork[4] = -100.0f; actor->fwork[5] = 200.0f; + actor->obj.pos.x = gPlayer[0].pos.x + actor->fwork[3]; actor->obj.pos.y = 500.0f; actor->obj.pos.z = gPlayer[0].trueZpos + actor->fwork[4]; + actor->obj.rot.z = 90.0f; actor->vel.y = -10.0f; actor->gravity = 0.8f; } break; } - if ((boss->timer_050 == 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { - Object_Kill(&boss->obj, boss->sfxSource); + + if ((this->timer_050 == 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { + Object_Kill(&this->obj, this->sfxSource); gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].csState = 0; } diff --git a/src/overlays/ovl_i5/fox_ti_cs.c b/src/overlays/ovl_i5/fox_ti_cs.c index 5425912f..ad1013fa 100644 --- a/src/overlays/ovl_i5/fox_ti_cs.c +++ b/src/overlays/ovl_i5/fox_ti_cs.c @@ -8,34 +8,34 @@ f32 D_i5_801B7328[] = { 1000.0f, 1000.0f, 1000.0f, 4000.0f }; f32 D_i5_801B7338[] = { 1000.0f, 1000.0f, 1000.0f, -4000.0f }; f32 D_i5_801B7348[] = { 90.0f, -90.0f, 0.0f }; -void Titania_80187530(Actor* actor) { - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_CUTSCENE; +void Titania_80187530(ActorCutscene* this) { + Actor_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.pos.x = 0.0f; - actor->obj.pos.y = 3000.0f; - actor->obj.pos.z = 0.0f; + this->obj.pos.x = 0.0f; + this->obj.pos.y = 3000.0f; + this->obj.pos.z = 0.0f; - actor->obj.rot.y = 180.0f; - Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); - actor->animFrame = 1; + this->obj.rot.y = 180.0f; + Object_SetInfo(&this->info, this->obj.id); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, this->sfxSource, 0); + this->animFrame = 1; } -void Titania_801875D0(Actor* actor, s32 arg1) { - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_CUTSCENE; +void Titania_801875D0(ActorCutscene* this, s32 arg1) { + Actor_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.pos.x = D_i5_801B72A0[arg1].x; - actor->obj.pos.y = D_i5_801B72A0[arg1].y + 3000.0f; - actor->obj.pos.z = D_i5_801B72A0[arg1].z; + this->obj.pos.x = D_i5_801B72A0[arg1].x; + this->obj.pos.y = D_i5_801B72A0[arg1].y + 3000.0f; + this->obj.pos.z = D_i5_801B72A0[arg1].z; - actor->obj.rot.y = 180.0f; - actor->iwork[11] = 1; - Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); + this->obj.rot.y = 180.0f; + this->iwork[11] = 1; + Object_SetInfo(&this->info, this->obj.id); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); } void Titania_LevelStart(Player* player) { @@ -211,9 +211,9 @@ void Titania_LevelStart(Player* player) { } if (player->pos.y < 100.0f) { - func_effect_8007A900(RAND_FLOAT_CENTERED(30.0f) + player->pos.x, 30.0f, - RAND_FLOAT_CENTERED(30.0f) + player->trueZpos, RAND_FLOAT(2.0f) + 3.5f, 255, 12, - 1); + Effect_Effect359_Spawn(RAND_FLOAT_CENTERED(30.0f) + player->pos.x, 30.0f, + RAND_FLOAT_CENTERED(30.0f) + player->trueZpos, RAND_FLOAT(2.0f) + 3.5f, 255, 12, + 1); Object_Kill(&gActors[3].obj, gActors[3].sfxSource); } @@ -248,38 +248,38 @@ void Titania_LevelStart(Player* player) { Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], sp64, 0.00f); } -void Titania_80188108(Actor* actor, s32 arg1) { +void Titania_80188108(Actor* this, s32 index) { Player* player = &gPlayer[0]; - Actor_Initialize(actor); - actor->obj.pos.x = D_i5_801B7318[arg1] + player->pos.x; - actor->obj.pos.y = D_i5_801B7328[arg1] + player->pos.y; - actor->obj.pos.z = D_i5_801B7338[arg1] + player->pos.z; + Actor_Initialize(this); + this->obj.pos.x = D_i5_801B7318[index] + player->pos.x; + this->obj.pos.y = D_i5_801B7328[index] + player->pos.y; + this->obj.pos.z = D_i5_801B7338[index] + player->pos.z; - actor->fwork[7] = RAND_FLOAT(360.0f); - actor->fwork[8] = RAND_FLOAT(360.0f); + this->fwork[7] = RAND_FLOAT(360.0f); + this->fwork[8] = RAND_FLOAT(360.0f); - actor->vel.x = player->vel.x; - actor->vel.y = player->vel.y; - actor->vel.z = player->vel.z; + this->vel.x = player->vel.x; + this->vel.y = player->vel.y; + this->vel.z = player->vel.z; - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.rot.y = 180.0f; + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_ACTOR_CUTSCENE; + this->obj.rot.y = 180.0f; - Object_SetInfo(&actor->info, actor->obj.id); + Object_SetInfo(&this->info, this->obj.id); - if (arg1 < 3) { - actor->iwork[11] = 1; - actor->drawShadow = true; - actor->fwork[3] = D_i5_801B7348[arg1]; - actor->state = 30; - AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); + if (index < 3) { + this->iwork[11] = 1; + this->drawShadow = true; + this->fwork[3] = D_i5_801B7348[index]; + this->state = 30; + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); } else { - actor->animFrame = 1; - actor->state = 20; - AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); - actor->fwork[9] = 20.0f; + this->animFrame = 1; + this->state = 20; + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, this->sfxSource, 0); + this->fwork[9] = 20.0f; } } @@ -357,7 +357,7 @@ void Titania_LevelComplete(Player* player) { Player_CollisionCheck(player); Player_UpdatePath(player); - if (((gGameFrameCount % 4) == 0)) { + if ((gGameFrameCount % 4) == 0) { f32 x; f32 y; f32 z; @@ -367,8 +367,8 @@ void Titania_LevelComplete(Player* player) { y = D_i5_801B72B8[i].y + RAND_FLOAT_CENTERED(10.0f); z = D_i5_801B72B8[i].z; - func_effect_8007A900(player->pos.x + x, player->pos.y + y, player->trueZpos + z, - RAND_FLOAT(0.5f) + 0.5f, 255, 21, 0); + Effect_Effect359_Spawn(player->pos.x + x, player->pos.y + y, player->trueZpos + z, + RAND_FLOAT(0.5f) + 0.5f, 255, 21, 0); } } break; @@ -390,13 +390,13 @@ void Titania_LevelComplete(Player* player) { Math_SmoothStepToF(&player->unk_16C, 2.0f, 1.0f, 0.2f, 0.0f); if (gCsFrameCount < 1470) { - func_effect_8007A900(RAND_FLOAT_CENTERED(30.0f) + (player->pos.x + 30.0f), 30.0f, - RAND_FLOAT_CENTERED(30.0f) + player->trueZpos, RAND_FLOAT(2.0f) + 3.5f, 255, 12, - 1); + Effect_Effect359_Spawn(RAND_FLOAT_CENTERED(30.0f) + (player->pos.x + 30.0f), 30.0f, + RAND_FLOAT_CENTERED(30.0f) + player->trueZpos, RAND_FLOAT(2.0f) + 3.5f, 255, 12, + 1); } - func_effect_8007A900(RAND_FLOAT_CENTERED(30.0f) + (player->pos.x - 30.0f), 30.0f, - RAND_FLOAT_CENTERED(30.0f) + player->trueZpos, RAND_FLOAT(2.0f) + 3.5f, 255, 12, 1); + Effect_Effect359_Spawn(RAND_FLOAT_CENTERED(30.0f) + (player->pos.x - 30.0f), 30.0f, + RAND_FLOAT_CENTERED(30.0f) + player->trueZpos, RAND_FLOAT(2.0f) + 3.5f, 255, 12, 1); Math_SmoothStepToF(&player->rockAngle, SIN_DEG(gGameFrameCount * 6.0f) * 18.0f, 0.1f, 100.0f, 0.0f); Math_SmoothStepToF(&player->yBob, SIN_DEG(gGameFrameCount * 3.0f) * 5.0f, 0.1f, 100.0f, 0.0f); diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index 314ec180..0522d18c 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -29,45 +29,48 @@ static f32* D_i6_801A6760[12] = { void Andross_80193710(void); -void Andross_80187530(Actor* actor) { +void Andross_80187530(ActorEvent* this) { s32 index; - switch (actor->unk_048) { + switch (this->unk_048) { case 0: break; + case 1: - actor->animFrame += (s32) actor->fwork[22]; - if (actor->animFrame >= Animation_GetFrameCount(&D_VE2_6014658)) { - actor->animFrame = Animation_GetFrameCount(&D_VE2_6014658) - 1; + this->animFrame += (s32) this->fwork[22]; + if (this->animFrame >= Animation_GetFrameCount(&D_VE2_6014658)) { + this->animFrame = Animation_GetFrameCount(&D_VE2_6014658) - 1; } break; + case 2: - actor->animFrame -= (s32) actor->fwork[22]; - if (actor->animFrame <= 0) { - actor->animFrame = 0; + this->animFrame -= (s32) this->fwork[22]; + if (this->animFrame <= 0) { + this->animFrame = 0; } break; + default: break; } - index = actor->animFrame / 18.0f; - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_i6_801A6760[index]); - actor->obj.rot.z = D_Andross_801A7F68; + index = this->animFrame / 18.0f; + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_i6_801A6760[index]); + this->obj.rot.z = D_Andross_801A7F68; } -bool Andross_8018767C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { +bool Andross_8018767C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { if (limbIndex == 13) { *dList = NULL; } return 0; } -void Andross_8018769C(Actor* actor) { - Vec3f sp28[20]; +void Andross_8018769C(ActorEvent* this) { + Vec3f frameTable[20]; - Animation_GetFrameData(&D_VE2_6014658, actor->animFrame, sp28); - Animation_DrawSkeleton(1, D_VE2_6014844, sp28, Andross_8018767C, NULL, NULL, &gIdentityMatrix); + Animation_GetFrameData(&D_VE2_6014658, this->animFrame, frameTable); + Animation_DrawSkeleton(1, D_VE2_6014844, frameTable, Andross_8018767C, NULL, NULL, &gIdentityMatrix); } void Andross_801876FC(void) { @@ -112,7 +115,7 @@ void Andross_801878A8() { scenery360->obj.pos.y = gLevelObjects[i].yPos; scenery360->obj.rot.y = gLevelObjects[i].rot.y; Object_SetInfo(&scenery360->info, scenery360->obj.id); - if (scenery360->obj.id == OBJ_SCENERY_131) { + if (scenery360->obj.id == OBJ_SCENERY_AND_PASSAGE) { scenery360->info.hitbox = SEGMENTED_TO_VIRTUAL(&D_ANDROSS_C038CCC); } scenery360++; @@ -138,7 +141,7 @@ void Andross_801878A8() { } } - for (item = gItems, i = 0; i < 1000; i++) { + for (item = &gItems[0], i = 0; i < 1000; i++) { if (gLevelObjects[i].id <= OBJ_INVALID) { break; } @@ -193,7 +196,7 @@ void Andross_80187C5C(void) { scenery360->pathIndex = gLevelObjects[i].rot.z; } Object_SetInfo(&scenery360->info, scenery360->obj.id); - if (scenery360->obj.id == OBJ_SCENERY_131) { + if (scenery360->obj.id == OBJ_SCENERY_AND_PASSAGE) { scenery360->info.hitbox = SEGMENTED_TO_VIRTUAL(&D_ANDROSS_C038CCC); } scenery360++; @@ -219,7 +222,7 @@ void Andross_80187C5C(void) { } } - for (item = gItems, i = 0; i < 1000; i++) { + for (item = &gItems[0], i = 0; i < 1000; i++) { if (gLevelObjects[i].id <= OBJ_INVALID) { break; } @@ -237,7 +240,7 @@ void Andross_80187C5C(void) { } } -void Andross_Actor199_Update(Actor* actor) { +void Andross_Actor199_Update(Actor199* this) { s32 i; f32 xDisplacement; f32 yDisplacement; @@ -250,59 +253,69 @@ void Andross_Actor199_Update(Actor* actor) { f32 temp_fv1; for (scenery360 = gScenery360, i = 0; i < 200; i++, scenery360++) { - if ((scenery360->obj.id == OBJ_SCENERY_147) && (scenery360->pathIndex == (u8) actor->counter_04E)) { - actor->fwork[3] = scenery360->obj.pos.x; - actor->fwork[4] = scenery360->obj.pos.y; - actor->fwork[5] = scenery360->obj.pos.z; + if ((scenery360->obj.id == OBJ_SCENERY_147) && (scenery360->pathIndex == (u8) this->counter_04E)) { + this->fwork[3] = scenery360->obj.pos.x; + this->fwork[4] = scenery360->obj.pos.y; + this->fwork[5] = scenery360->obj.pos.z; break; } } - actor->fwork[2] = 3.0f; - xDisplacement = actor->fwork[3] - actor->obj.pos.x; - yDisplacement = actor->fwork[4] - actor->obj.pos.y; - zDisplacement = actor->fwork[5] - actor->obj.pos.z; + + this->fwork[2] = 3.0f; + + xDisplacement = this->fwork[3] - this->obj.pos.x; + yDisplacement = this->fwork[4] - this->obj.pos.y; + zDisplacement = this->fwork[5] - this->obj.pos.z; + if ((fabsf(xDisplacement) < 300.0f) && (fabsf(yDisplacement) < 300.0f) && (fabsf(zDisplacement) < 300.0f)) { - actor->counter_04E++; + this->counter_04E++; } - if (((gGameFrameCount % 32) == 0)) { - actor->iwork[11] = 1; - actor->fwork[1] = 47.0f; - if ((fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 1000.0f) && - (fabsf(actor->obj.pos.y - gPlayer[0].pos.y) < 500.0f) && - (fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 1000.0f)) { - actor->iwork[11] = 2; - actor->fwork[1] = 65.0f; + + if ((gGameFrameCount % 32) == 0) { + this->iwork[11] = 1; + this->fwork[1] = 47.0f; + if ((fabsf(this->obj.pos.x - gPlayer[0].pos.x) < 1000.0f) && + (fabsf(this->obj.pos.y - gPlayer[0].pos.y) < 500.0f) && + (fabsf(this->obj.pos.z - gPlayer[0].trueZpos) < 1000.0f)) { + this->iwork[11] = 2; + this->fwork[1] = 65.0f; } } - Math_SmoothStepToF(&actor->fwork[0], actor->fwork[1], 0.2f, 3.0f, 0.00001f); + Math_SmoothStepToF(&this->fwork[0], this->fwork[1], 0.2f, 3.0f, 0.00001f); + yaw = Math_RadToDeg(Math_Atan2F(xDisplacement, zDisplacement)); - Math_SmoothStepToAngle(&actor->rot_0F4.x, + + Math_SmoothStepToAngle(&this->rot_0F4.x, Math_RadToDeg(Math_Atan2F(yDisplacement, sqrtf(SQ(xDisplacement) + SQ(zDisplacement)))), - 0.1f, actor->fwork[2], 0.0f); - temp_fv1 = Math_SmoothStepToAngle(&actor->rot_0F4.y, yaw, 0.1f, actor->fwork[2], 0.0001f) * 40.0f; + 0.1f, this->fwork[2], 0.0f); + temp_fv1 = Math_SmoothStepToAngle(&this->rot_0F4.y, yaw, 0.1f, this->fwork[2], 0.0001f) * 40.0f; if (temp_fv1 < 0.0f) { var_fv0 = temp_fv1 * -1.0f; } else { var_fv0 = 360.0f - temp_fv1; } - Math_SmoothStepToAngle(&actor->obj.rot.z, var_fv0, 0.1f, 3.0f, 0.01f); + Math_SmoothStepToAngle(&this->obj.rot.z, var_fv0, 0.1f, 3.0f, 0.01f); + + this->obj.rot.y = this->rot_0F4.y; + this->obj.rot.x = -this->rot_0F4.x; + + Matrix_RotateY(gCalcMatrix, this->rot_0F4.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -this->rot_0F4.x * M_DTOR, MTXF_APPLY); - actor->obj.rot.y = actor->rot_0F4.y; - actor->obj.rot.x = -actor->rot_0F4.x; - Matrix_RotateY(gCalcMatrix, actor->rot_0F4.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, -actor->rot_0F4.x * M_DTOR, MTXF_APPLY); sp48.x = 0; sp48.y = 0; - sp48.z = actor->fwork[0]; + sp48.z = this->fwork[0]; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp48, &vel); - actor->vel.x = vel.x; - actor->vel.y = vel.y; - actor->vel.z = vel.z; + + this->vel.x = vel.x; + this->vel.y = vel.y; + this->vel.z = vel.z; } -void Andross_Actor199_Draw(Actor* actor) { - func_edisplay_8005B388(actor); +void Andross_Actor199_Draw(Actor199* this) { + func_edisplay_8005B388(this); } void Andross_80188468(void) { @@ -320,137 +333,147 @@ void Andross_80188468(void) { AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } -void Andross_Actor286_Update(Actor* actor) { - Math_SmoothStepToF(&actor->vel.x, 0.0f, 0.2f, 0.5f, 0.0f); - Math_SmoothStepToF(&actor->vel.y, 0.0f, 0.2f, 0.5f, 0.0f); - Math_SmoothStepToF(&actor->vel.z, 0.0f, 0.2f, 0.5f, 0.0f); - if (actor->dmgType != DMG_NONE) { - Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); - Object_Kill(&actor->obj, actor->sfxSource); - func_effect_8007B344(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 3.0f, 5); - } else if (actor->timer_0BC == 0) { - Object_Kill(&actor->obj, actor->sfxSource); +void Andross_AndBrainWaste_Update(AndBrainWaste* this) { + Math_SmoothStepToF(&this->vel.x, 0.0f, 0.2f, 0.5f, 0.0f); + Math_SmoothStepToF(&this->vel.y, 0.0f, 0.2f, 0.5f, 0.0f); + Math_SmoothStepToF(&this->vel.z, 0.0f, 0.2f, 0.5f, 0.0f); + + if (this->dmgType != DMG_NONE) { + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); + Object_Kill(&this->obj, this->sfxSource); + Effect_Effect384_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 3.0f, 5); + } else if (this->timer_0BC == 0) { + Object_Kill(&this->obj, this->sfxSource); } - actor->obj.rot.y = RAD_TO_DEG(-gPlayer[0].camYaw); - actor->obj.rot.x = RAD_TO_DEG(gPlayer[0].camPitch); - actor->rot_0F4.z += actor->fwork[0]; + + this->obj.rot.y = RAD_TO_DEG(-gPlayer[0].camYaw); + this->obj.rot.x = RAD_TO_DEG(gPlayer[0].camPitch); + this->rot_0F4.z += this->fwork[0]; } -void Andross_Actor286_Draw(Actor* actor) { +void Andross_AndBrainWaste_Draw(AndBrainWaste* this) { RCP_SetupDL(&gMasterDisp, SETUPDL_61); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); - Matrix_RotateZ(gGfxMatrix, actor->rot_0F4.z * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, this->rot_0F4.z * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 1.1f, 0.9f, 1.0f, MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, -actor->rot_0F4.z * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, -this->rot_0F4.z * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 1.1f, 0.9f, 1.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_VE2_6009300); } -void Andross_801887B0(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel) { - Actor_Initialize(actor); - actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_286; - actor->vel.x = xVel; - actor->vel.y = yVel; - actor->vel.z = zVel; - actor->obj.pos.x = xPos; - actor->obj.pos.y = yPos; - actor->obj.pos.z = zPos; +void Andross_AndBrainWaste_Setup(AndBrainWaste* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel) { + Actor_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_ACTOR_AND_BRAIN_WASTE; + this->vel.x = xVel; + this->vel.y = yVel; + this->vel.z = zVel; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + if (Rand_ZeroOne() < 0.5f) { - actor->fwork[0] = 10.0f; + this->fwork[0] = 10.0f; } else { - actor->fwork[0] = -10.0f; + this->fwork[0] = -10.0f; } - actor->timer_0BC = 300; - Object_SetInfo(&actor->info, actor->obj.id); + + this->timer_0BC = 300; + Object_SetInfo(&this->info, this->obj.id); } -void Andross_8018887C(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel) { +void Andross_AndBrainWaste_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel) { s32 i; for (i = 0; i < ARRAY_COUNT(gActors); i++) { if (gActors[i].obj.status == OBJ_FREE) { - Andross_801887B0(&gActors[i], xPos, yPos, zPos, xVel, yVel, zVel); + Andross_AndBrainWaste_Setup(&gActors[i], xPos, yPos, zPos, xVel, yVel, zVel); break; } } } -void Andross_801888F4(Actor* actor) { +void Andross_801888F4(ActorAllRange* this) { s32 i; - actor->obj.rot.z -= 8.0f; - if ((actor->timer_0BC % 2U) == 1) { - func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 5.0f); + this->obj.rot.z -= 8.0f; + if ((this->timer_0BC % 2U) == 1) { + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 5.0f); } - if ((actor->timer_0BC == 0) || (actor->dmgType != DMG_NONE)) { - func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, actor->vel.x, actor->vel.y, - actor->vel.z, 7.0f, 20); - func_effect_8007B344(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f, 5); + if ((this->timer_0BC == 0) || (this->dmgType != DMG_NONE)) { + Effect386_Spawn1(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, this->vel.z, 7.0f, + 20); + Effect_Effect384_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 10.0f, 5); for (i = 0; i < 6; i++) { - func_effect_800794CC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 1.0f); + Effect_Effect357_Spawn50(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1.0f); } - Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); - Object_Kill(&actor->obj, actor->sfxSource); - BonusText_Display(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 5); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_M); + Object_Kill(&this->obj, this->sfxSource); + BonusText_Display(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 5); gHitCount += 6; D_ctx_80177850 = 15; } } -void Andross_80188A4C(Boss* boss) { +void Andross_80188A4C(AndBrain* this) { - if (boss->damage > 20) { - boss->damage = 20; + if (this->damage > 20) { + this->damage = 20; } - if (boss->dmgType != DMG_NONE) { - boss->dmgType = DMG_NONE; - if (boss->state < 10 && !(boss->fwork[21] < 250.0f)) { - switch (boss->dmgPart) { + + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + + if (this->state < 10 && !(this->fwork[21] < 250.0f)) { + switch (this->dmgPart) { case 0: - boss->swork[1] = 15; - boss->swork[7] = 30; + this->swork[1] = 15; + this->swork[7] = 30; break; + case 1: case 2: - if (boss->swork[4] == 0) { - boss->swork[2] = 10; - boss->swork[3] = 15; - AUDIO_PLAY_SFX(NA_SE_EN_KNOCK_DOWN, boss->sfxSource, 4); - boss->health -= boss->damage; - if ((boss->health != 0) && (boss->health <= 0)) { + if (this->swork[4] == 0) { + this->swork[2] = 10; + this->swork[3] = 15; + + AUDIO_PLAY_SFX(NA_SE_EN_KNOCK_DOWN, this->sfxSource, 4); + + this->health -= this->damage; + if ((this->health != 0) && (this->health <= 0)) { gScreenFlashTimer = 8; - AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, boss->sfxSource, 4); - Boss_AwardBonus(boss); + AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, this->sfxSource, 4); + Boss_AwardBonus(this); gPlayer[0].state_1C8 = PLAYERSTATE_1C8_STANDBY; - boss->state = 20; - boss->swork[1] = 1000; - boss->swork[2] = 1000; - boss->swork[6] = 1; + this->state = 20; + this->swork[1] = 1000; + this->swork[2] = 1000; + this->swork[6] = 1; D_ctx_80177A48[0] = 0.0f; D_ctx_80177A48[1] = 0.1f; gCsFrameCount = 0; - Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_ANDROSS_BRAIN); - Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_ANDROSS_CATCH); + Audio_KillSfxBySourceAndId(this->sfxSource, NA_SE_EN_ANDROSS_BRAIN); + Audio_KillSfxBySourceAndId(this->sfxSource, NA_SE_EN_ANDROSS_CATCH); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); } } break; + default: - if (boss->swork[4] == 0) { - boss->swork[8]++; - if (boss->swork[8] >= 6) { - boss->swork[8] = 0; - boss->state = 12; - boss->timer_050 = 50; - boss->fwork[3] = gPlayer[0].pos.x; - boss->fwork[5] = gPlayer[0].trueZpos; - AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_WARP, boss->sfxSource, 4); + if (this->swork[4] == 0) { + this->swork[8]++; + if (this->swork[8] >= 6) { + this->swork[8] = 0; + this->state = 12; + this->timer_050 = 50; + this->fwork[3] = gPlayer[0].pos.x; + this->fwork[5] = gPlayer[0].trueZpos; + AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_WARP, this->sfxSource, 4); } } break; @@ -459,79 +482,86 @@ void Andross_80188A4C(Boss* boss) { } } -void Andross_80188CB8(Boss* boss) { +void Andross_80188CB8(AndBrain* this) { s32 i; Vec3f sp50; Vec3f sp44; - boss->unk_04C++; - if (boss->unk_04C >= Animation_GetFrameCount(&D_VE2_600C038)) { - boss->unk_04C = 0; + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_VE2_600C038)) { + this->animFrame = 0; } - Animation_GetFrameData(&D_VE2_600C038, boss->unk_04C, boss->vwork); + Animation_GetFrameData(&D_VE2_600C038, this->animFrame, this->vwork); - if (boss->swork[3] != 0) { - boss->swork[3]--; + if (this->swork[3] != 0) { + this->swork[3]--; } - if (boss->swork[2] != 0) { - boss->swork[2]--; - Math_SmoothStepToF(&boss->fwork[15], -15.0f, 0.8f, 5.0f, 0.0f); - Math_SmoothStepToF(&boss->fwork[16], 0.05f, 0.8f, 0.02f, 0.0f); + if (this->swork[2] != 0) { + this->swork[2]--; + Math_SmoothStepToF(&this->fwork[15], -15.0f, 0.8f, 5.0f, 0.0f); + Math_SmoothStepToF(&this->fwork[16], 0.05f, 0.8f, 0.02f, 0.0f); } else { - Math_SmoothStepToF(&boss->fwork[15], 4.0f, 0.05f, 0.2f, 0.0f); - Math_SmoothStepToF(&boss->fwork[16], 0.03f, 0.05f, 0.001f, 0.0f); - } - Math_SmoothStepToF(&boss->fwork[10], boss->fwork[11], boss->fwork[12], boss->fwork[13], 0.0f); - if (boss->swork[1] != 0) { - boss->swork[1]--; - boss->fwork[11] = 30.0f; - boss->fwork[12] = 0.8f; - boss->fwork[13] = 3.0f; - } else { - boss->fwork[11] = 8.0f; - boss->fwork[12] = 0.05f; - boss->fwork[13] = 0.5f; + Math_SmoothStepToF(&this->fwork[15], 4.0f, 0.05f, 0.2f, 0.0f); + Math_SmoothStepToF(&this->fwork[16], 0.03f, 0.05f, 0.001f, 0.0f); } - if (boss->swork[7] != 0) { - boss->swork[7]--; - if (((gGameFrameCount % 2) == 0)) { - Andross_8018887C(RAND_FLOAT_CENTERED(100.0f) + boss->obj.pos.x, - RAND_FLOAT_CENTERED(300.0f) + (boss->obj.pos.y - 250.0f), - RAND_FLOAT_CENTERED(100.0f) + boss->obj.pos.z, RAND_FLOAT_CENTERED(50.0f), - RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT_CENTERED(50.0f)); + Math_SmoothStepToF(&this->fwork[10], this->fwork[11], this->fwork[12], this->fwork[13], 0.0f); + + if (this->swork[1] != 0) { + this->swork[1]--; + this->fwork[11] = 30.0f; + this->fwork[12] = 0.8f; + this->fwork[13] = 3.0f; + } else { + this->fwork[11] = 8.0f; + this->fwork[12] = 0.05f; + this->fwork[13] = 0.5f; + } + + if (this->swork[7] != 0) { + this->swork[7]--; + if ((gGameFrameCount % 2) == 0) { + Andross_AndBrainWaste_Spawn(RAND_FLOAT_CENTERED(100.0f) + this->obj.pos.x, + RAND_FLOAT_CENTERED(300.0f) + (this->obj.pos.y - 250.0f), + RAND_FLOAT_CENTERED(100.0f) + this->obj.pos.z, RAND_FLOAT_CENTERED(50.0f), + RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT_CENTERED(50.0f)); } } - boss->fwork[14] += boss->fwork[15]; + + this->fwork[14] += this->fwork[15]; + Matrix_RotateY(gCalcMatrix, -gPlayer[0].camYaw, MTXF_NEW); - sp50.x = boss->vel.z * 0.25f; + + sp50.x = this->vel.z * 0.25f; sp50.y = 0.0f; - sp50.z = boss->vel.x * 0.25f; + sp50.z = this->vel.x * 0.25f; + Matrix_MultVec3f(gCalcMatrix, &sp50, &sp44); - boss->fwork[18] = -sp44.z; - boss->fwork[17] = sp44.x; - boss->swork[4] = 0; - boss->fwork[19] = -26.0f; + + this->fwork[18] = -sp44.z; + this->fwork[17] = sp44.x; + this->swork[4] = 0; + this->fwork[19] = -26.0f; for (i = 10; i < 12; i++) { if ((gActors[i].obj.status == OBJ_ACTIVE) && (gActors[i].obj.id == OBJ_ACTOR_ALLRANGE)) { gTexturedLines[i].mode = 50; gTexturedLines[i].xyScale = 1.0f; - gTexturedLines[i].posAA.x = boss->obj.pos.x; - gTexturedLines[i].posAA.y = boss->obj.pos.y - 200.0f; - gTexturedLines[i].posAA.z = boss->obj.pos.z; + gTexturedLines[i].posAA.x = this->obj.pos.x; + gTexturedLines[i].posAA.y = this->obj.pos.y - 200.0f; + gTexturedLines[i].posAA.z = this->obj.pos.z; gTexturedLines[i].timer = 3; gTexturedLines[i].posBB.x = gActors[i].obj.pos.x; gTexturedLines[i].posBB.y = gActors[i].obj.pos.y; gTexturedLines[i].posBB.z = gActors[i].obj.pos.z; - boss->swork[4] = 1; + this->swork[4] = 1; } } } -void Andross_80189098(Boss* boss) { - Actor* actor = &gActors[10]; +void Andross_80189098(AndBrain* this) { + ActorAllRange* actor = &gActors[10]; Actor_Initialize(actor); actor->obj.status = OBJ_INIT; @@ -541,7 +571,7 @@ void Andross_80189098(Boss* boss) { actor->health = 200; actor->obj.pos.x = 200.0f; actor->obj.pos.y = 0.0f; - actor->obj.pos.z = boss->obj.pos.z; + actor->obj.pos.z = this->obj.pos.z; Object_SetInfo(&actor->info, actor->obj.id); actor->info.hitbox = SEGMENTED_TO_VIRTUAL(&gCubeHitbox150); @@ -555,7 +585,7 @@ void Andross_80189098(Boss* boss) { actor->health = 200; actor->obj.pos.x = -200.0f; actor->obj.pos.y = 0.0f; - actor->obj.pos.z = boss->obj.pos.z; + actor->obj.pos.z = this->obj.pos.z; Object_SetInfo(&actor->info, actor->obj.id); actor->info.hitbox = SEGMENTED_TO_VIRTUAL(&gCubeHitbox150); @@ -583,7 +613,6 @@ void Andross_80189214(void) { gObjectLoadIndex = 0; // FAKE if (1) {} - PRINTF("FO_Game_Sw %d\n"); player->cam.at.x = 0.0f; player->cam.at.y = 0.0f; player->yRot_114 = 0.0f; @@ -594,19 +623,19 @@ void Andross_80189214(void) { Camera_UpdateArwingOnRails(player); } -void Andross_Actor290_Update(Actor* actor) { - if ((fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 1000.0f) && - (fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 1000.0f)) { +void Andross_AndBossTimer_Update(AndBossTimer* this) { + PRINTF("FO_Game_Sw %d\n"); + if ((fabsf(this->obj.pos.x - gPlayer[0].pos.x) < 1000.0f) && + (fabsf(this->obj.pos.z - gPlayer[0].trueZpos) < 1000.0f)) { gStartAndrossFightTimer = 50; - Object_Kill(&actor->obj, actor->sfxSource); + Object_Kill(&this->obj, this->sfxSource); } } -void Andross_Actor288_Update(Actor* actor) { - +void Andross_AndRadio_Update(AndRadio* this) { if (gAllRangeCheckpoint == 0) { - actor->counter_04E++; - switch (actor->counter_04E) { + this->counter_04E++; + switch (this->counter_04E) { case 200: Radio_PlayMessage(gMsg_ID_8250, RCID_ANDROSS_RED); return; @@ -623,21 +652,21 @@ void Andross_Actor288_Update(Actor* actor) { } } -void Andross_Actor289_Update(Actor* actor) { +void Andross_AndJamesTrigger_Update(AndJamesTrigger* this) { s32 i; Player* player = &gPlayer[0]; if ((gDrawBackdrop != 7) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && - (fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 9000.0f) && - (fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 9000.0f)) { + (fabsf(this->obj.pos.x - gPlayer[0].pos.x) < 9000.0f) && + (fabsf(this->obj.pos.z - gPlayer[0].trueZpos) < 9000.0f)) { gDrawBackdrop = 7; Radio_PlayMessage(gMsg_ID_19370, RCID_JAMES); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 20); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 20); } - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 500.0f) && - (fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 500.0f)) { + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (fabsf(this->obj.pos.x - gPlayer[0].pos.x) < 500.0f) && + (fabsf(this->obj.pos.z - gPlayer[0].trueZpos) < 500.0f)) { Audio_KillSfxById(NA_SE_OB_ROUTE_EXPLOSION1); Audio_SetEnvSfxReverb(0); gCurrentLevel = LEVEL_VENOM_2; @@ -673,15 +702,15 @@ void Andross_Actor289_Update(Actor* actor) { } } -void Andross_Actor287_Update(Actor* actor) { +void Andross_AndExplosion_Update(AndExplosion* this) { s32 i; Vec3f vec; Vec3f displacement; Vec3f vel; - if ((fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 2000.0f) && - (fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 2000.0f)) { - Matrix_RotateY(gCalcMatrix, actor->obj.rot.y * M_DTOR, MTXF_NEW); + if ((fabsf(this->obj.pos.x - gPlayer[0].pos.x) < 2000.0f) && + (fabsf(this->obj.pos.z - gPlayer[0].trueZpos) < 2000.0f)) { + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); vec.x = 0.0f; vec.y = 0.0f; vec.z = -30.0f; @@ -692,60 +721,60 @@ void Andross_Actor287_Update(Actor* actor) { vec.z = 0.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &vec, &displacement); - actor->vel.x = vel.x * 0.2f; - actor->vel.y = vel.y * 0.2f; - actor->vel.z = vel.z * 0.2f; + this->vel.x = vel.x * 0.2f; + this->vel.y = vel.y * 0.2f; + this->vel.z = vel.z * 0.2f; for (i = 0; i < 1; i++) { - func_effect_8007797C(actor->obj.pos.x + displacement.x, actor->obj.pos.y + displacement.y, - actor->obj.pos.z + displacement.z, vel.x, vel.y, vel.z, RAND_FLOAT(2.5f) + 15.5f); + Effect_FireSmoke_Spawn2(this->obj.pos.x + displacement.x, this->obj.pos.y + displacement.y, + this->obj.pos.z + displacement.z, vel.x, vel.y, vel.z, RAND_FLOAT(2.5f) + 15.5f); } } - if ((fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 500.0f) && - (fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 500.0f)) { + + if ((fabsf(this->obj.pos.x - gPlayer[0].pos.x) < 500.0f) && + (fabsf(this->obj.pos.z - gPlayer[0].trueZpos) < 500.0f)) { if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE || gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN)) { gPlayer[0].shields = 0; gRightWingHealth[0] = gLeftWingHealth[0] = 0; Player_ApplyDamage(&gPlayer[0], 1, 60); Player_ApplyDamage(&gPlayer[0], 2, 60); - actor->timer_0BC = 10; + this->timer_0BC = 10; gPlayer[0].radioDamageTimer = 200; } } - if (actor->timer_0BC == 1) { + if (this->timer_0BC == 1) { Cutscene_KillPlayer(&gPlayer[0]); } } -void Andross_801899E4(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2, u8 arg5) { - - Effect_Initialize(effect); - effect->obj.status = OBJ_ACTIVE; - effect->obj.id = OBJ_EFFECT_357; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; - effect->unk_4C = arg5; - effect->scale2 = (RAND_FLOAT(0.8f) + 0.3f) * scale2; - effect->timer_50 = 100; - effect->obj.rot.x = RAND_FLOAT(360.0f); - effect->unk_60.x = RAND_FLOAT_CENTERED(30.0f); - effect->unk_60.y = RAND_FLOAT_CENTERED(30.0f); - effect->unk_60.z = RAND_FLOAT_CENTERED(30.0f); - Object_SetInfo(&effect->info, effect->obj.id); +void Andross_Effect357_Setup(Effect357* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2, u8 arg5) { + Effect_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_EFFECT_357; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + this->unk_4C = arg5; + this->scale2 = (RAND_FLOAT(0.8f) + 0.3f) * scale2; + this->timer_50 = 100; + this->obj.rot.x = RAND_FLOAT(360.0f); + this->unk_60.x = RAND_FLOAT_CENTERED(30.0f); + this->unk_60.y = RAND_FLOAT_CENTERED(30.0f); + this->unk_60.z = RAND_FLOAT_CENTERED(30.0f); + Object_SetInfo(&this->info, this->obj.id); } -void Andross_80189B00(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { +void Andross_Effect357_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { s32 i; for (i = 50; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { - Andross_801899E4(&gEffects[i], xPos, yPos, zPos, scale2, 0); + Andross_Effect357_Setup(&gEffects[i], xPos, yPos, zPos, scale2, 0); break; } } } -void Andross_Boss321_Update(Boss* boss) { +void Andross_AndBrain_Update(AndBrain* this) { s32 i; s32 sp98; s32 frameCountMask; @@ -760,188 +789,225 @@ void Andross_Boss321_Update(Boss* boss) { Vec3f sp58; s32 pad; - Andross_80188A4C(boss); - Andross_80188CB8(boss); - boss->info.hitbox = SEGMENTED_TO_VIRTUAL(&D_ANDROSS_C038F24); + Andross_80188A4C(this); + Andross_80188CB8(this); + + this->info.hitbox = SEGMENTED_TO_VIRTUAL(&aAndBrainHitbox); + Math_SmoothStepToF(&gAndrossUnkAlpha, 255.0f, 1.0f, 4.0f, 0); - Math_SmoothStepToF(&boss->scale, 10.0f, 0.2f, 0.2f, 0); + Math_SmoothStepToF(&this->scale, 10.0f, 0.2f, 0.2f, 0); + if ((gGameFrameCount & 0x10) == 0) { - Math_SmoothStepToF(&boss->fwork[25], 255.0f, 1.0f, 10.0f, 0); + Math_SmoothStepToF(&this->fwork[25], 255.0f, 1.0f, 10.0f, 0); } else { - Math_SmoothStepToF(&boss->fwork[25], 100.0f, 1.0f, 10.0f, 0); - } - if ((fabsf(boss->obj.pos.x - gPlayer[0].pos.x) < 300.0f) && - (fabsf(boss->obj.pos.y - 300.0f - gPlayer[0].pos.y) < 300.0f) && - (fabsf(boss->obj.pos.z - gPlayer[0].trueZpos) < 300.0f) && (boss->state < 11) && (boss->timer_05A == 0)) { - boss->state = 11; - boss->timer_050 = 150; - AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_CATCH, boss->sfxSource, 4); + Math_SmoothStepToF(&this->fwork[25], 100.0f, 1.0f, 10.0f, 0); } - switch (boss->state) { + if ((fabsf(this->obj.pos.x - gPlayer[0].pos.x) < 300.0f) && + (fabsf(this->obj.pos.y - 300.0f - gPlayer[0].pos.y) < 300.0f) && + (fabsf(this->obj.pos.z - gPlayer[0].trueZpos) < 300.0f) && (this->state < 11) && (this->timer_05A == 0)) { + this->state = 11; + this->timer_050 = 150; + AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_CATCH, this->sfxSource, 4); + } + + switch (this->state) { case 0: - boss->health = 200; + this->health = 200; gDrawBackdrop = 3; - boss->fwork[19] = -26.0f; - boss->fwork[10] = 8.0f; - Andross_80189098(boss); - boss->swork[5] = 300; - boss->state++; - AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_BRAIN, boss->sfxSource, 4); - boss->fwork[21] = 255.0f; - boss->fwork[22] = 255.0f; - boss->fwork[23] = 0.0f; - boss->fwork[24] = 0.0f; + this->fwork[19] = -26.0f; + this->fwork[10] = 8.0f; + Andross_80189098(this); + this->swork[5] = 300; + this->state++; + AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_BRAIN, this->sfxSource, 4); + this->fwork[21] = 255.0f; + this->fwork[22] = 255.0f; + this->fwork[23] = 0.0f; + this->fwork[24] = 0.0f; break; + case 10: - boss->fwork[23] = 0.0f; - boss->fwork[24] = 0.0f; - boss->fwork[21] = 255.0f; - boss->fwork[22] = 255.0f; - boss->fwork[1] = 10.0f; - boss->fwork[2] = 2.0f; - boss->fwork[3] = 0.0f; - boss->fwork[4] = 0.0f; - boss->fwork[5] = gPlayer[0].pos.z - 3000.0f; - boss->fwork[19] = -26.0f; - boss->swork[5] = 100; - if (boss->timer_050 == 0) { + this->fwork[23] = 0.0f; + this->fwork[24] = 0.0f; + this->fwork[21] = 255.0f; + this->fwork[22] = 255.0f; + this->fwork[1] = 10.0f; + this->fwork[2] = 2.0f; + this->fwork[3] = 0.0f; + this->fwork[4] = 0.0f; + this->fwork[5] = gPlayer[0].pos.z - 3000.0f; + this->fwork[19] = -26.0f; + this->swork[5] = 100; + + if (this->timer_050 == 0) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_START_360; gPlayer[0].csState = 0; - boss->state = 1; + this->state = 1; gPlayer[0].hideShadow = true; } break; + case 1: - if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_START_360) && (boss->timer_050 == 0)) { - boss->fwork[2] = 1.6f; - boss->timer_050 = RAND_INT(1.0f) * 50.0f + 50; - boss->fwork[3] = RAND_FLOAT_CENTERED(10000.0f); - boss->fwork[4] = RAND_FLOAT_CENTERED(1000.0f); - boss->fwork[5] = RAND_FLOAT_CENTERED(10000.0f); + if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_START_360) && (this->timer_050 == 0)) { + this->fwork[2] = 1.6f; + this->timer_050 = RAND_INT(1.0f) * 50.0f + 50; + this->fwork[3] = RAND_FLOAT_CENTERED(10000.0f); + this->fwork[4] = RAND_FLOAT_CENTERED(1000.0f); + this->fwork[5] = RAND_FLOAT_CENTERED(10000.0f); + if (Rand_ZeroOne() < 0.3f) { - boss->state = 2; - boss->timer_050 = RAND_INT(1.0f) * 100.0f + 50; - boss->fwork[1] = 0.0f; + this->state = 2; + this->timer_050 = RAND_INT(1.0f) * 100.0f + 50; + this->fwork[1] = 0.0f; } } break; + case 2: - if (boss->timer_050 == 0) { - boss->state = 1; - boss->timer_050 = RAND_INT(1.0f) * 50.0f + 50; - boss->fwork[1] = 50.0f; + if (this->timer_050 == 0) { + this->state = 1; + this->timer_050 = RAND_INT(1.0f) * 50.0f + 50; + this->fwork[1] = 50.0f; } break; + case 11: - boss->info.hitbox = SEGMENTED_TO_VIRTUAL(&gNoHitbox); - if (boss->timer_050 < 120) { + this->info.hitbox = SEGMENTED_TO_VIRTUAL(&gNoHitbox); + if (this->timer_050 < 120) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; gFillScreenAlphaTarget = 80; gFillScreenAlphaStep = 1; gPlayer[0].dmgEffectTimer = gGameFrameCount % 8U; gPlayer[0].radioDamageTimer = 3; + Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 40.0f, 1.0f, 3.0f, 0.0f); + if (((gGameFrameCount % 32) == 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { Player_ApplyDamage(&gPlayer[0], 3, 10); } } + Math_SmoothStepToF(&gPlayer[0].baseSpeed, 0.0f, 2.0f, 2.0f, 0.0f); - Math_SmoothStepToF(&gPlayer[0].pos.x, boss->obj.pos.x, 0.8f, 50.0f, 0.0f); - Math_SmoothStepToF(&gPlayer[0].pos.y, boss->obj.pos.y - 300.0f, 0.8f, 50.0f, 0.0f); - Math_SmoothStepToF(&gPlayer[0].pos.z, boss->obj.pos.z, 0.8f, 50.0f, 0.0f); - boss->fwork[11] = 45.0f; - boss->fwork[12] = 0.8f; - boss->fwork[13] = 1.0f; - boss->fwork[19] = 23.0f; - boss->fwork[1] = 0.0f; + Math_SmoothStepToF(&gPlayer[0].pos.x, this->obj.pos.x, 0.8f, 50.0f, 0.0f); + Math_SmoothStepToF(&gPlayer[0].pos.y, this->obj.pos.y - 300.0f, 0.8f, 50.0f, 0.0f); + Math_SmoothStepToF(&gPlayer[0].pos.z, this->obj.pos.z, 0.8f, 50.0f, 0.0f); + + this->fwork[11] = 45.0f; + this->fwork[12] = 0.8f; + this->fwork[13] = 1.0f; + this->fwork[19] = 23.0f; + this->fwork[1] = 0.0f; + gPlayer[0].alternateView = true; + Math_SmoothStepToF(&gCamDistortion, 0.15f, 0.2f, 0.004f, 0.0f); - if (boss->timer_050 == 120) { - AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_LAUGH, boss->sfxSource, 4); + + if (this->timer_050 == 120) { + AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_LAUGH, this->sfxSource, 4); } - if (boss->timer_050 == 0) { + if (this->timer_050 == 0) { gPlayer[0].baseSpeed = gArwingSpeed; gPlayer[0].alternateView = false; + gFillScreenAlphaTarget = 0; - boss->timer_05A = 50; - if (boss->swork[4] != 0) { - boss->state = 1; - boss->timer_050 = RAND_INT(1.0f) * 50.0f + 50; - boss->fwork[1] = 50.0f; + + this->timer_05A = 50; + + if (this->swork[4] != 0) { + this->state = 1; + this->timer_050 = RAND_INT(1.0f) * 50.0f + 50; + this->fwork[1] = 50.0f; } else { - boss->state = 3; + this->state = 3; } - Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_ANDROSS_CATCH); + Audio_KillSfxBySourceAndId(this->sfxSource, NA_SE_EN_ANDROSS_CATCH); } break; + case 3: - boss->fwork[1] = 42.0f; - boss->fwork[2] = 1.3f; - boss->fwork[3] = gPlayer[0].pos.x; - boss->fwork[4] = gPlayer[0].pos.y; - boss->fwork[5] = gPlayer[0].trueZpos; + this->fwork[1] = 42.0f; + this->fwork[2] = 1.3f; + this->fwork[3] = gPlayer[0].pos.x; + this->fwork[4] = gPlayer[0].pos.y; + this->fwork[5] = gPlayer[0].trueZpos; break; + case 12: - boss->info.hitbox = SEGMENTED_TO_VIRTUAL(&gNoHitbox); - boss->fwork[1] = 0; - boss->fwork[24] = 0.2f; - boss->fwork[22] = 0.0f; - if ((boss->fwork[22] < 1.0f) && (boss->timer_050 == 0)) { - xDisplacement = boss->fwork[3] - boss->obj.pos.x; - zDisplacement = boss->fwork[5] - boss->obj.pos.z; + this->info.hitbox = SEGMENTED_TO_VIRTUAL(&gNoHitbox); + this->fwork[1] = 0; + this->fwork[24] = 0.2f; + this->fwork[22] = 0.0f; + + if ((this->fwork[22] < 1.0f) && (this->timer_050 == 0)) { + xDisplacement = this->fwork[3] - this->obj.pos.x; + zDisplacement = this->fwork[5] - this->obj.pos.z; Matrix_RotateY(gCalcMatrix, Math_Atan2F(xDisplacement, zDisplacement), MTXF_NEW); vec.x = 0.0f; vec.y = 0.0f; vec.z = 4000.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &vec, &sp64); - boss->obj.pos.x = boss->fwork[3] + sp64.x; - boss->obj.pos.z = boss->fwork[5] + sp64.z; - boss->rot_078.y = Math_RadToDeg(Math_Atan2F(xDisplacement, zDisplacement)); - boss->state = 13; - AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_LAUGH, boss->sfxSource, 4); - boss->timer_054 = 90; + this->obj.pos.x = this->fwork[3] + sp64.x; + this->obj.pos.z = this->fwork[5] + sp64.z; + this->rot_078.y = Math_RadToDeg(Math_Atan2F(xDisplacement, zDisplacement)); + this->state = 13; + AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_LAUGH, this->sfxSource, 4); + this->timer_054 = 90; } break; + case 13: - boss->info.hitbox = SEGMENTED_TO_VIRTUAL(&gNoHitbox); - boss->fwork[24] = 0.0f; - boss->fwork[22] = 255.0f; - if (250.0f < boss->fwork[22]) { - boss->state = 3; + this->info.hitbox = SEGMENTED_TO_VIRTUAL(&gNoHitbox); + this->fwork[24] = 0.0f; + this->fwork[22] = 255.0f; + if (250.0f < this->fwork[22]) { + this->state = 3; } break; + case 20: gCsFrameCount++; - boss->fwork[0] = 0.0f; - boss->fwork[1] = 0.0f; - boss->obj.rot.z += 0.2f; - boss->obj.rot.x += 0.1f; - boss->obj.pos.y -= 3.0f; + + this->fwork[0] = 0.0f; + this->fwork[1] = 0.0f; + + this->obj.rot.z += 0.2f; + this->obj.rot.x += 0.1f; + this->obj.pos.y -= 3.0f; + Matrix_RotateY(gCalcMatrix, -gPlayer[0].camYaw, 0U); + vec.x = RAND_FLOAT_CENTERED(700.0f); vec.y = RAND_FLOAT_CENTERED(300.0f); vec.z = 500.0f; + Matrix_MultVec3f(gCalcMatrix, &vec, &sp64); - func_effect_8007797C(boss->obj.pos.x + sp64.x, boss->obj.pos.y + sp64.y, boss->obj.pos.z + sp64.z, 0.0f, - 0.0f, 0.0f, RAND_FLOAT(5.0f) + 7.0f); - if (((gGameFrameCount % 2) == 0)) { - func_effect_8007C484(RAND_FLOAT_CENTERED(600.0f) + boss->obj.pos.x, - RAND_FLOAT(100.0f) + (boss->obj.pos.y + 100.0f), boss->obj.pos.z, 0.0f, 0.0f, 0.0f, - RAND_FLOAT(0.3f) + 0.5f, 0); + + Effect_FireSmoke_Spawn2(this->obj.pos.x + sp64.x, this->obj.pos.y + sp64.y, this->obj.pos.z + sp64.z, 0.0f, + 0.0f, 0.0f, RAND_FLOAT(5.0f) + 7.0f); + if ((gGameFrameCount % 2) == 0) { + Effect_Effect389_Spawn(RAND_FLOAT_CENTERED(600.0f) + this->obj.pos.x, + RAND_FLOAT(100.0f) + (this->obj.pos.y + 100.0f), this->obj.pos.z, 0.0f, 0.0f, + 0.0f, RAND_FLOAT(0.3f) + 0.5f, 0); } + vec.x = 0.0f; vec.y = 0.0f; vec.z = 2000.0f; + Matrix_MultVec3f(gCalcMatrix, &vec, &sp64); + Math_SmoothStepToF(&D_ctx_80177A48[0], 100.0f, 1.0f, 2.0f, 0.0f); Math_SmoothStepToF(&D_ctx_80177A48[1], 100.0f, 1.0f, 10.0f, 0.0f); - Math_SmoothStepToF(&gPlayer[0].cam.eye.x, boss->obj.pos.x + sp64.x, 0.02f, D_ctx_80177A48[0], 0.0f); - Math_SmoothStepToF(&gPlayer[0].cam.eye.y, boss->obj.pos.y + sp64.y, 0.02f, D_ctx_80177A48[0], 0.0f); - Math_SmoothStepToF(&gPlayer[0].cam.eye.z, boss->obj.pos.z + sp64.z, 0.02f, D_ctx_80177A48[0], 0.0f); - Math_SmoothStepToF(&gPlayer[0].cam.at.x, boss->obj.pos.x, 0.05f, D_ctx_80177A48[1], 0.0f); - Math_SmoothStepToF(&gPlayer[0].cam.at.y, boss->obj.pos.y, 0.05f, D_ctx_80177A48[1], 0.0f); - Math_SmoothStepToF(&gPlayer[0].cam.at.z, boss->obj.pos.z, 0.05f, D_ctx_80177A48[1], 0.0f); + + Math_SmoothStepToF(&gPlayer[0].cam.eye.x, this->obj.pos.x + sp64.x, 0.02f, D_ctx_80177A48[0], 0.0f); + Math_SmoothStepToF(&gPlayer[0].cam.eye.y, this->obj.pos.y + sp64.y, 0.02f, D_ctx_80177A48[0], 0.0f); + Math_SmoothStepToF(&gPlayer[0].cam.eye.z, this->obj.pos.z + sp64.z, 0.02f, D_ctx_80177A48[0], 0.0f); + + Math_SmoothStepToF(&gPlayer[0].cam.at.x, this->obj.pos.x, 0.05f, D_ctx_80177A48[1], 0.0f); + Math_SmoothStepToF(&gPlayer[0].cam.at.y, this->obj.pos.y, 0.05f, D_ctx_80177A48[1], 0.0f); + Math_SmoothStepToF(&gPlayer[0].cam.at.z, this->obj.pos.z, 0.05f, D_ctx_80177A48[1], 0.0f); + Math_SmoothStepToF(&gPlayer[0].camRoll, 0.0f, 0.5f, 0.5f, 0.0f); if (gCsFrameCount == 50) { @@ -951,12 +1017,12 @@ void Andross_Boss321_Update(Boss* boss) { gBossActive = false; gPlayer[0].baseSpeed = gArwingSpeed; Audio_StopPlayerNoise(0); - boss->state = 21; - func_effect_8007B344(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 60.0f, 5); - func_effect_8007A568(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 40.0f); + this->state = 21; + Effect_Effect384_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 60.0f, 5); + Effect_Effect383_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 40.0f); for (i = 0; i < ARRAY_COUNT(gActors); i++) { - if ((gActors[i].obj.status == OBJ_ACTIVE) && (gActors[i].obj.id == OBJ_ACTOR_286)) { + if ((gActors[i].obj.status == OBJ_ACTIVE) && (gActors[i].obj.id == OBJ_ACTOR_AND_BRAIN_WASTE)) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); } } @@ -964,6 +1030,7 @@ void Andross_Boss321_Update(Boss* boss) { gCsFrameCount = 0; } break; + case 21: Andross_801876FC(); gCsFrameCount++; @@ -977,19 +1044,23 @@ void Andross_Boss321_Update(Boss* boss) { Math_SmoothStepToF(&gCamDistortion, 0.15f, 0.2f, 0.004f, 0.0f); Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 70.0f, 1.0f, 4.0f, 0.0f); } + switch (gCsFrameCount) { case 30: gRadioState = 0; Radio_PlayMessage(gMsg_ID_20318, RCID_FOX); gPlayer[0].radioDamageTimer = 200; break; + case 350: Radio_PlayMessage(gMsg_ID_19468, RCID_JAMES); break; + case 500: Radio_PlayMessage(gMsg_ID_19350, RCID_FOX); gAllRangeCheckpoint = 1; break; + case 600: gDrawBackdrop = 5; gFogRed = 129; @@ -1025,23 +1096,28 @@ void Andross_Boss321_Update(Boss* boss) { D_ctx_80177CA4 = gHitCount; break; + case 800: Radio_PlayMessage(gMsg_ID_19340, RCID_JAMES); break; + case 1000: Audio_SetEnvSfxReverb(0); break; + case 1300: Radio_PlayMessage(gMsg_ID_19355, RCID_JAMES); break; + case 1800: Radio_PlayMessage(gMsg_ID_19360, RCID_JAMES); break; } + if (gCsFrameCount > 600) { Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 10.0f, 1.0f, 2.0f, 0.0f); } - boss->obj.pos.y = 10000.0f; + this->obj.pos.y = 10000.0f; if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && ((gGameFrameCount % 4) == 0)) { Matrix_RotateY(gCalcMatrix, (gPlayer[0].yRot_114 + gPlayer[0].rot.y) * M_DTOR, 0U); @@ -1049,19 +1125,24 @@ void Andross_Boss321_Update(Boss* boss) { vec.y = 600.0f; vec.z = RAND_FLOAT(1000.0f) + -3000.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &vec, &sp64); - Andross_80189B00(gPlayer[0].pos.x + sp64.x, sp64.y, gPlayer[0].trueZpos + sp64.z, 1.2f); + Andross_Effect357_Spawn(gPlayer[0].pos.x + sp64.x, sp64.y, gPlayer[0].trueZpos + sp64.z, 1.2f); } if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_STANDBY) { Matrix_RotateY(gCalcMatrix, -gPlayer[0].camYaw, MTXF_NEW); + vec.x = 0.0f; vec.y = 0.0f; vec.z = -50.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &vec, &sp58); Matrix_RotateZ(gCalcMatrix, 2.0f * RAND_FLOAT(M_PI), MTXF_APPLY); + vec.x = RAND_FLOAT(50.0f) + 120.0f; vec.y = 0.0f; vec.z = 0.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &vec, &sp64); + if (gCsFrameCount < 1000) { frameCountMask = 2 - 1; } else if (gCsFrameCount < 1500) { @@ -1071,114 +1152,133 @@ void Andross_Boss321_Update(Boss* boss) { } else { frameCountMask = 2 - 1; } + sp98 = 1; if ((gGameFrameCount & frameCountMask) == 0) { for (i = 0; i < sp98; i++) { - func_effect_8007797C(gPlayer[0].cam.eye.x + sp64.x, gPlayer[0].cam.eye.y + sp64.y, - gPlayer[0].cam.eye.z + sp64.z, sp58.x, sp58.y, sp58.z, - RAND_FLOAT(2.5f) + 2.5f); + Effect_FireSmoke_Spawn2(gPlayer[0].cam.eye.x + sp64.x, gPlayer[0].cam.eye.y + sp64.y, + gPlayer[0].cam.eye.z + sp64.z, sp58.x, sp58.y, sp58.z, + RAND_FLOAT(2.5f) + 2.5f); } } } break; } - xDisplacement = boss->fwork[3] - boss->obj.pos.x; - yDisplacement = boss->fwork[4] - boss->obj.pos.y; - zDisplacement = boss->fwork[5] - boss->obj.pos.z; + + xDisplacement = this->fwork[3] - this->obj.pos.x; + yDisplacement = this->fwork[4] - this->obj.pos.y; + zDisplacement = this->fwork[5] - this->obj.pos.z; + yaw = Math_RadToDeg(Math_Atan2F(xDisplacement, zDisplacement)); - Math_SmoothStepToAngle(&boss->rot_078.x, + + Math_SmoothStepToAngle(&this->rot_078.x, Math_RadToDeg(Math_Atan2F(yDisplacement, sqrtf(SQ(xDisplacement) + SQ(zDisplacement)))), - 0.1f, boss->fwork[2], 0.0f); - Math_SmoothStepToAngle(&boss->rot_078.y, yaw, 0.1f, boss->fwork[2], 0.0f); - if (boss->swork[4] != 0) { - Math_SmoothStepToAngle(&boss->obj.rot.y, Math_RadToDeg(-gPlayer[0].camYaw), 0.3f, 5.0f, 0.0f); - } else if (boss->timer_054 == 0) { - Math_SmoothStepToAngle(&boss->obj.rot.y, Math_RadToDeg(-gPlayer[0].camYaw), 0.3f, 1.5f, 0.0f); + 0.1f, this->fwork[2], 0.0f); + Math_SmoothStepToAngle(&this->rot_078.y, yaw, 0.1f, this->fwork[2], 0.0f); + + if (this->swork[4] != 0) { + Math_SmoothStepToAngle(&this->obj.rot.y, Math_RadToDeg(-gPlayer[0].camYaw), 0.3f, 5.0f, 0.0f); + } else if (this->timer_054 == 0) { + Math_SmoothStepToAngle(&this->obj.rot.y, Math_RadToDeg(-gPlayer[0].camYaw), 0.3f, 1.5f, 0.0f); } - Math_SmoothStepToF(&boss->fwork[0], boss->fwork[1], 0.2f, 1.0f, 0.00001f); - Matrix_RotateY(gCalcMatrix, boss->rot_078.y * M_DTOR, 0U); - Matrix_RotateX(gCalcMatrix, -boss->rot_078.x * M_DTOR, 1U); + + Math_SmoothStepToF(&this->fwork[0], this->fwork[1], 0.2f, 1.0f, 0.00001f); + + Matrix_RotateY(gCalcMatrix, this->rot_078.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -this->rot_078.x * M_DTOR, MTXF_APPLY); + vec.x = 0.0f; vec.y = 0.0f; - vec.z = boss->fwork[0]; + vec.z = this->fwork[0]; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &vec, &sp64); - boss->vel.x = sp64.x; - boss->vel.y = sp64.y; - boss->vel.z = sp64.z - gPathVelZ; - if (boss->state < 20) { + + this->vel.x = sp64.x; + this->vel.y = sp64.y; + this->vel.z = sp64.z - gPathVelZ; + + if (this->state < 20) { gRadarMarks[59].status = 1; gRadarMarks[59].type = 102; - gRadarMarks[59].pos.x = boss->obj.pos.x; - gRadarMarks[59].pos.y = boss->obj.pos.y; - gRadarMarks[59].pos.z = boss->obj.pos.z; - gRadarMarks[59].yRot = boss->rot_078.y + 180.0f; + gRadarMarks[59].pos.x = this->obj.pos.x; + gRadarMarks[59].pos.y = this->obj.pos.y; + gRadarMarks[59].pos.z = this->obj.pos.z; + gRadarMarks[59].yRot = this->rot_078.y + 180.0f; } + gActors[10].info.targetOffset = 1.0f; gActors[11].info.targetOffset = 1.0f; - if (boss->swork[5] != 0) { - boss->swork[5]--; - if (boss->swork[5] == 0) { + + if (this->swork[5] != 0) { + this->swork[5]--; + if (this->swork[5] == 0) { AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_EYE, gActors[10].sfxSource, 4); AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_EYE, gActors[11].sfxSource, 4); AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_SPARK, gActors[10].sfxSource, 4); AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_SPARK, gActors[11].sfxSource, 4); } - gActors[10].obj.pos.x = boss->obj.pos.x + 200.0f; - gActors[10].obj.pos.y = boss->obj.pos.y - 200.0f; - gActors[10].obj.pos.z = boss->obj.pos.z + 200.0f; + gActors[10].obj.pos.x = this->obj.pos.x + 200.0f; + gActors[10].obj.pos.y = this->obj.pos.y - 200.0f; + gActors[10].obj.pos.z = this->obj.pos.z + 200.0f; gActors[10].state = 0; gActors[10].timer_0C2 = 20; gActors[10].info.targetOffset = 0.0f; - gActors[11].obj.pos.x = boss->obj.pos.x - 200.0f; - gActors[11].obj.pos.y = boss->obj.pos.y - 200.0f; - gActors[11].obj.pos.z = boss->obj.pos.z + 200.0f; + gActors[11].obj.pos.x = this->obj.pos.x - 200.0f; + gActors[11].obj.pos.y = this->obj.pos.y - 200.0f; + gActors[11].obj.pos.z = this->obj.pos.z + 200.0f; gActors[11].state = 0; gActors[11].timer_0C2 = 20; gActors[11].info.targetOffset = 0.0f; } - Math_SmoothStepToF(&boss->fwork[21], boss->fwork[22], 1.0f, 6.0f, 0); - Math_SmoothStepToF(&boss->fwork[23], boss->fwork[24], 0.3f, 0.01f, 0); + Math_SmoothStepToF(&this->fwork[21], this->fwork[22], 1.0f, 6.0f, 0); + Math_SmoothStepToF(&this->fwork[23], this->fwork[24], 0.3f, 0.01f, 0); } -bool Andross_8018B47C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { - Boss* boss = (Boss*) data; +bool Andross_8018B47C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { + Boss* this = (Boss*) thisx; - if (boss->fwork[21] >= 254.0f) { + if (this->fwork[21] >= 254.0f) { if (limbIndex == 2) { RCP_SetupDL(&gMasterDisp, SETUPDL_22); - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, (s32) boss->fwork[25], 255, 255, 255); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, (s32) this->fwork[25], 255, 255, 255); } else { RCP_SetupDL(&gMasterDisp, SETUPDL_23); } } else { RCP_SetupDL(&gMasterDisp, SETUPDL_51); - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) boss->fwork[21]); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) this->fwork[21]); } - if ((limbIndex == 2) && (boss->swork[6] != 0)) { + + if ((limbIndex == 2) && (this->swork[6] != 0)) { *dList = NULL; return false; } + if ((limbIndex == 1) || (limbIndex == 2)) { Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, MTXF_APPLY); + if (*dList != NULL) { Matrix_Push(&gGfxMatrix); Matrix_Push(&gCalcMatrix); Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); + if (limbIndex == 1) { - Matrix_RotateY(gGfxMatrix, -boss->fwork[14] * M_DTOR, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, boss->fwork[16] + 1.0f, 1.0f, 1.0f - boss->fwork[16], MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, boss->fwork[14] * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, -this->fwork[14] * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->fwork[16] + 1.0f, 1.0f, 1.0f - this->fwork[16], MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, this->fwork[14] * M_DTOR, MTXF_APPLY); } else { - Matrix_RotateY(gGfxMatrix, boss->fwork[14] * 1.5f * M_DTOR, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, 2.0f * boss->fwork[16] + 1.0f, 1.0f, 1.0f - 2.0f * boss->fwork[16], + Matrix_RotateY(gGfxMatrix, this->fwork[14] * 1.5f * M_DTOR, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 2.0f * this->fwork[16] + 1.0f, 1.0f, 1.0f - 2.0f * this->fwork[16], MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, -boss->fwork[14] * 1.5f * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, -this->fwork[14] * 1.5f * M_DTOR, MTXF_APPLY); } + Matrix_SetGfxMtx(&gMasterDisp); - if (((boss->swork[3] % 2) != 0) && (boss->fwork[21] >= 254.0f)) { + + if (((this->swork[3] % 2) != 0) && (this->fwork[21] >= 254.0f)) { RCP_SetupDL(&gMasterDisp, SETUPDL_27); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } @@ -1192,7 +1292,7 @@ bool Andross_8018B47C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return false; } -void Andross_Boss321_Draw(Boss* boss) { +void Andross_AndBrain_Draw(AndBrain* this) { s32 j; s32 i; f32 temp; @@ -1200,19 +1300,19 @@ void Andross_Boss321_Draw(Boss* boss) { Vec3f spAC; Vec3f spA0; - if (boss->state != 21) { + if (this->state != 21) { Matrix_RotateZ(gGfxMatrix, -(f32) gGameFrameCount * 20.0f * M_DTOR, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, boss->fwork[23] + 1.0f, 1.0f - boss->fwork[23], 1.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->fwork[23] + 1.0f, 1.0f - this->fwork[23], 1.0f, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 20.0f * M_DTOR, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, boss->fwork[23] + 1.0f, 1.0f - boss->fwork[23], 1.0f, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, boss->scale, boss->scale, boss->scale, MTXF_APPLY); - Animation_DrawSkeleton(0, D_VE2_600C0A4, boss->vwork, Andross_8018B47C, NULL, boss, &gIdentityMatrix); - if (boss->fwork[21] >= 254) { + Matrix_Scale(gGfxMatrix, this->fwork[23] + 1.0f, 1.0f - this->fwork[23], 1.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->scale, this->scale, this->scale, MTXF_APPLY); + Animation_DrawSkeleton(0, D_VE2_600C0A4, this->vwork, Andross_8018B47C, NULL, this, &gIdentityMatrix); + if (this->fwork[21] >= 254) { RCP_SetupDL(&gMasterDisp, SETUPDL_54); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 64, 64, 255); } else { RCP_SetupDL(&gMasterDisp, SETUPDL_70); - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 64, 64, (s32) boss->fwork[21]); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 64, 64, (s32) this->fwork[21]); } gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); Matrix_Translate(gGfxMatrix, 0.0f, -16.0f, 0.0f, MTXF_APPLY); @@ -1226,13 +1326,13 @@ void Andross_Boss321_Draw(Boss* boss) { spAC.z = i * 0.8f; Matrix_MultVec3f(gCalcMatrix, &spAC, &spA0); Matrix_Translate(gGfxMatrix, spA0.x, 10.0f, spA0.z, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, M_DTOR * -boss->obj.rot.y - gPlayer[0].camYaw, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_DTOR * -this->obj.rot.y - gPlayer[0].camYaw, MTXF_APPLY); for (j = 0; j < 10; j++) { Matrix_Translate(gGfxMatrix, 0.0f, -10.0f, 0.0f, MTXF_APPLY); - temp = SIN_DEG((s32) boss->fwork[19] * (i * 10 + j) + (gGameFrameCount * 5)) * boss->fwork[10]; - Matrix_RotateZ(gGfxMatrix, (boss->fwork[18] + temp) * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, boss->fwork[17] * M_DTOR, MTXF_APPLY); + temp = SIN_DEG((s32) this->fwork[19] * (i * 10 + j) + (gGameFrameCount * 5)) * this->fwork[10]; + Matrix_RotateZ(gGfxMatrix, (this->fwork[18] + temp) * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, this->fwork[17] * M_DTOR, MTXF_APPLY); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, -5.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -1289,36 +1389,39 @@ void Andross_8018BDD8(void) { } void Andross_8018C390(Player* player) { - player->boostCooldown = 1; player->barrelRollAlpha = 0; + switch (player->csState) { - case 2: - case 3: - break; case 0: Math_SmoothStepToF(&player->pos.x, gBosses[0].obj.pos.x, 0.5f, 30.0f, 0); Math_SmoothStepToF(&player->pos.y, gBosses[0].obj.pos.y - 150.0f, 0.5f, 30.0f, 0); Math_SmoothStepToF(&player->pos.z, gBosses[0].obj.pos.z - 100.0f, 0.5f, 60.0f, 0); + gPathProgress = player->zPath = -player->pos.z; + Math_SmoothStepToF(&player->cam.eye.z, 2000.0f, 0.05f, 20.0f, 0); Math_SmoothStepToF(&player->cam.eye.x, 0.0f, 0.05f, 10.0f, 0); Math_SmoothStepToF(&player->cam.eye.y, 0.0f, 0.05f, 10.0f, 0); + Math_SmoothStepToF(&player->cam.at.x, 0.0f, 0.05f, 10.0f, 0); Math_SmoothStepToF(&player->cam.at.y, 0.0f, 0.05f, 10.0f, 0); Math_SmoothStepToF(&player->cam.at.z, 100.0f, 0.05f, 10.0f, 0.0f); break; + case 1: player->rot.x += 15.0f; - if (player->rot.x > 180.0f) { player->rot.x -= 360.0f; } + player->rot.y += 9.0f; if (player->rot.y > 180.0f) { player->rot.y -= 360.0f; } + Math_SmoothStepToF(&player->cam.eye.z, 400.0f, 0.05f, 20.0f, 0.0f); + if (player->csTimer != 0) { if (gControllerPress[gMainController].button != 0) { player->csTimer--; @@ -1330,103 +1433,109 @@ void Andross_8018C390(Player* player) { player->unk_018 = 0.0f; } break; + + case 2: + case 3: + break; } player->trueZpos = player->pos.z + player->camDist; Player_DamageEffects(player); } -void Andross_8018C660(Effect* effect, f32 xPos, f32 yPos, f32 zPos, s32 arg4) { - Effect_Initialize(effect); - effect->obj.status = OBJ_ACTIVE; - effect->obj.id = OBJ_EFFECT_396; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; - effect->unk_4C = arg4; - effect->scale2 = RAND_FLOAT(2.5f) + 5.0f; - effect->unk_60.x = RAND_FLOAT_CENTERED(20.0f); - effect->unk_60.y = RAND_FLOAT_CENTERED(20.0f); - Object_SetInfo(&effect->info, effect->obj.id); +void Andross_Effect396_Setup1(Effect* this, f32 xPos, f32 yPos, f32 zPos, s32 arg4) { + Effect_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_EFFECT_396; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + this->unk_4C = arg4; + this->scale2 = RAND_FLOAT(2.5f) + 5.0f; + this->unk_60.x = RAND_FLOAT_CENTERED(20.0f); + this->unk_60.y = RAND_FLOAT_CENTERED(20.0f); + Object_SetInfo(&this->info, this->obj.id); } -void Andross_8018C734(f32 xPos, f32 yPos, f32 zPos, s32 arg3) { +void Andross_Effect396_Spawn1(f32 xPos, f32 yPos, f32 zPos, s32 arg3) { s32 i; for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { - Andross_8018C660(&gEffects[i], xPos, yPos, zPos, arg3); + Andross_Effect396_Setup1(&gEffects[i], xPos, yPos, zPos, arg3); break; } } } -void Andross_8018C7A0(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, s32 arg7) { - Effect_Initialize(effect); - effect->obj.status = OBJ_ACTIVE; - effect->obj.id = OBJ_EFFECT_396; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; - effect->vel.x = xVel; - effect->vel.y = yVel; - effect->vel.z = zVel; - effect->state = 1; - effect->unk_4C = arg7; +void Andross_Effect396_Setup2(Effect396* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, s32 arg7) { + Effect_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_EFFECT_396; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + this->vel.x = xVel; + this->vel.y = yVel; + this->vel.z = zVel; + this->state = 1; + this->unk_4C = arg7; + if (arg7 < 8) { - effect->scale2 = RAND_FLOAT(2.5f) + 5.0f; + this->scale2 = RAND_FLOAT(2.5f) + 5.0f; } - effect->obj.rot.x = RAND_FLOAT(360.0f); - effect->obj.rot.y = RAND_FLOAT(360.0f); - effect->unk_60.x = RAND_FLOAT(10.0f) + 10.0f; - effect->unk_60.y = RAND_FLOAT(10.0f) + 10.0f; - Object_SetInfo(&effect->info, effect->obj.id); - effect->info.cullDistance = 100.0f; + + this->obj.rot.x = RAND_FLOAT(360.0f); + this->obj.rot.y = RAND_FLOAT(360.0f); + this->unk_60.x = RAND_FLOAT(10.0f) + 10.0f; + this->unk_60.y = RAND_FLOAT(10.0f) + 10.0f; + Object_SetInfo(&this->info, this->obj.id); + this->info.cullDistance = 100.0f; } -void Andross_8018C8D4(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, s32 arg6) { +void Andross_Effect396_Spawn2(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, s32 arg6) { s32 i; for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { - Andross_8018C7A0(&gEffects[i], xPos, yPos, zPos, xVel, yVel, zVel, arg6); + Andross_Effect396_Setup2(&gEffects[i], xPos, yPos, zPos, xVel, yVel, zVel, arg6); break; } } } -void Andross_8018C958(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale) { - Effect_Initialize(effect); - effect->obj.status = OBJ_ACTIVE; - effect->obj.id = OBJ_EFFECT_396; - effect->state = 10; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; - effect->vel.x = xVel; - effect->vel.y = yVel; - effect->vel.z = zVel; - effect->scale1 = scale; - effect->scale2 = scale * 0.1f; - effect->unk_44 = 100; - effect->obj.rot.z = RAND_FLOAT(360.0f); - effect->unk_60.z = RAND_FLOAT_CENTERED(20.0f); - Object_SetInfo(&effect->info, effect->obj.id); - effect->info.unk_14 = 1; - effect->info.cullDistance = 100.0f; +void Andross_Effect396_Setup3(Effect396* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale) { + Effect_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_EFFECT_396; + this->state = 10; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + this->vel.x = xVel; + this->vel.y = yVel; + this->vel.z = zVel; + this->scale1 = scale; + this->scale2 = scale * 0.1f; + this->unk_44 = 100; + this->obj.rot.z = RAND_FLOAT(360.0f); + this->unk_60.z = RAND_FLOAT_CENTERED(20.0f); + Object_SetInfo(&this->info, this->obj.id); + this->info.unk_14 = 1; + this->info.cullDistance = 100.0f; } -void Andross_8018CA50(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale) { +void Andross_Effect396_Spawn3(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale) { s32 i; for (i = ARRAY_COUNT(gEffects) - 1; i >= 0; i--) { if (gEffects[i].obj.status == OBJ_FREE) { - Andross_8018C958(&gEffects[i], xPos, yPos, zPos, xVel, yVel, zVel, scale); + Andross_Effect396_Setup3(&gEffects[i], xPos, yPos, zPos, xVel, yVel, zVel, scale); break; } } } -void Andross_Effect396_Update(Effect* effect) { +void Andross_Effect396_Update(Effect396* this) { s32 i; Item* item; Vec3f vec; @@ -1441,57 +1550,69 @@ void Andross_Effect396_Update(Effect* effect) { f32 sp38; f32 sp34; - effect->obj.rot.x += effect->unk_60.x; - effect->obj.rot.y += effect->unk_60.y; - switch (effect->state) { + this->obj.rot.x += this->unk_60.x; + this->obj.rot.y += this->unk_60.y; + + switch (this->state) { case 0: if (gBosses[0].state == 17) { - Math_SmoothStepToF(&effect->obj.pos.x, gBosses[0].obj.pos.x, 0.03f, 10.0f, 0); - Math_SmoothStepToF(&effect->obj.pos.y, gBosses[0].obj.pos.y - 200.0f, 0.03f, 10.0f, 0); - effectXpos = effect->obj.pos.x; - effectYpos = effect->obj.pos.y; - effectZpos = effect->obj.pos.z; + Math_SmoothStepToF(&this->obj.pos.x, gBosses[0].obj.pos.x, 0.03f, 10.0f, 0); + Math_SmoothStepToF(&this->obj.pos.y, gBosses[0].obj.pos.y - 200.0f, 0.03f, 10.0f, 0); + + effectXpos = this->obj.pos.x; + effectYpos = this->obj.pos.y; + effectZpos = this->obj.pos.z; + sp3C = gBosses[0].obj.pos.x; sp38 = gBosses[0].obj.pos.y - 150.0f; sp34 = gBosses[0].obj.pos.z - 100.0f; + yaw = Math_Atan2F(sp3C - effectXpos, sp34 - effectZpos); sp40 = sqrtf(SQ(sp3C - effectXpos) + SQ(sp34 - effectZpos)); pitch = -Math_Atan2F(sp38 - effectYpos, sp40); + Matrix_RotateY(gCalcMatrix, yaw, MTXF_NEW); Matrix_RotateX(gCalcMatrix, pitch, MTXF_APPLY); + vec.x = 0.0f; vec.y = 0.0f; vec.z = 30.0f; + Matrix_MultVec3f(gCalcMatrix, &vec, &vel); - effect->vel.x = vel.x; - effect->vel.y = vel.y; - effect->vel.z = vel.z - gPathVelZ; - if ((fabsf(effect->obj.pos.x - gBosses[0].obj.pos.x) <= 100.0f) && - (fabsf(effect->obj.pos.z - (gBosses[0].obj.pos.z - 100.0f)) <= 100.0f)) { - Object_Kill(&effect->obj, effect->sfxSource); + + this->vel.x = vel.x; + this->vel.y = vel.y; + this->vel.z = vel.z - gPathVelZ; + + if ((fabsf(this->obj.pos.x - gBosses[0].obj.pos.x) <= 100.0f) && + (fabsf(this->obj.pos.z - (gBosses[0].obj.pos.z - 100.0f)) <= 100.0f)) { + Object_Kill(&this->obj, this->sfxSource); } } else { - effect->info.cullDistance = 100.0f; - Math_SmoothStepToF(&effect->vel.x, 0.0f, 0.05f, 1.0f, 0); - Math_SmoothStepToF(&effect->vel.y, 0.0f, 0.05f, 1.0f, 0); - Math_SmoothStepToF(&effect->vel.z, 70.0f, 0.05f, 2.0f, 0); - func_effect_8007A774(&gPlayer[0], effect, 100.0f); - if (effect->unk_44 != 0) { - func_effect_8007D0E0(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 10.0f); - Effect_SpawnTimedSfxAtPos(&effect->obj.pos, NA_SE_EN_EXPLOSION_S); - Object_Kill(&effect->obj, effect->sfxSource); + this->info.cullDistance = 100.0f; + Math_SmoothStepToF(&this->vel.x, 0.0f, 0.05f, 1.0f, 0); + Math_SmoothStepToF(&this->vel.y, 0.0f, 0.05f, 1.0f, 0); + Math_SmoothStepToF(&this->vel.z, 70.0f, 0.05f, 2.0f, 0); + + func_effect_8007A774(&gPlayer[0], this, 100.0f); + + if (this->unk_44 != 0) { + func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 10.0f); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); + Object_Kill(&this->obj, this->sfxSource); } } - effect->unk_44 = 0; + this->unk_44 = 0; break; + case 1: - func_effect_8007A774(&gPlayer[0], effect, 100.0f); - if (effect->unk_44 != 0) { - func_effect_8007D0E0(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 10.0f); - Effect_SpawnTimedSfxAtPos(&effect->obj.pos, NA_SE_EN_EXPLOSION_S); - Object_Kill(&effect->obj, effect->sfxSource); + func_effect_8007A774(&gPlayer[0], this, 100.0f); + if (this->unk_44 != 0) { + func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 10.0f); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); + Object_Kill(&this->obj, this->sfxSource); if (Rand_ZeroOne() < 0.1f) { - item = gItems; + item = &gItems[0]; for (i = 0; i < ARRAY_COUNT(gItems); i++, item++) { if (item->obj.status == OBJ_FREE) { Item_Initialize(item); @@ -1501,9 +1622,9 @@ void Andross_Effect396_Update(Effect* effect) { } else { item->obj.id = OBJ_ITEM_BOMB; } - item->obj.pos.x = effect->obj.pos.x; - item->obj.pos.y = effect->obj.pos.y; - item->obj.pos.z = effect->obj.pos.z; + item->obj.pos.x = this->obj.pos.x; + item->obj.pos.y = this->obj.pos.y; + item->obj.pos.z = this->obj.pos.z; item->timer_4A = 8; Object_SetInfo(&item->info, item->obj.id); item->unk_50 = 90.0f; @@ -1513,14 +1634,17 @@ void Andross_Effect396_Update(Effect* effect) { } } break; + case 10: - effect->obj.rot.z += effect->unk_60.z; - Math_SmoothStepToF(&effect->scale2, effect->scale1, 0.05f, 0.3f, 0); - Math_SmoothStepToF(&effect->vel.y, 0.0f, 0.05f, 0.5f, 0.0f); - Math_SmoothStepToF(&effect->vel.x, 0.0f, 0.05f, 0.5f, 0.0f); - effect->unk_44 -= 10; - if (effect->unk_44 < 0) { - Object_Kill(&effect->obj, effect->sfxSource); + this->obj.rot.z += this->unk_60.z; + + Math_SmoothStepToF(&this->scale2, this->scale1, 0.05f, 0.3f, 0); + Math_SmoothStepToF(&this->vel.y, 0.0f, 0.05f, 0.5f, 0.0f); + Math_SmoothStepToF(&this->vel.x, 0.0f, 0.05f, 0.5f, 0.0f); + + this->unk_44 -= 10; + if (this->unk_44 < 0) { + Object_Kill(&this->obj, this->sfxSource); } break; } @@ -1531,33 +1655,32 @@ static Gfx* D_i6_801A6790[10] = { D_ANDROSS_C001880, D_ANDROSS_C001880, D_ANDROSS_C001880, D_arwing_3016660, D_arwing_3015D80, }; -void Andross_Effect396_Draw(Effect* effect) { - - if (effect->state == 10) { - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, effect->unk_44); - Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY); +void Andross_Effect396_Draw(Effect396* this) { + if (this->state == 10) { + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, this->unk_44); + Matrix_Scale(gGfxMatrix, this->scale2, this->scale2, this->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_BG_PLANET_2010A30); } else { RCP_SetupDL(&gMasterDisp, SETUPDL_29); - if (effect->unk_4C < 8) { - Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY); + if (this->unk_4C < 8) { + Matrix_Scale(gGfxMatrix, this->scale2, this->scale2, this->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); } - gSPDisplayList(gMasterDisp++, D_i6_801A6790[effect->unk_4C]); + gSPDisplayList(gMasterDisp++, D_i6_801A6790[this->unk_4C]); RCP_SetupDL(&gMasterDisp, SETUPDL_64); } } -void Andross_8018D0D8(Boss* boss) { +void Andross_8018D0D8(AndAndross* this) { if ((gPlayer[0].mercyTimer == 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && - (fabsf(boss->vwork[10].x - gPlayer[0].pos.x) < 700.0f) && - (fabsf(boss->vwork[10].y - gPlayer[0].pos.y) < 700.0f)) { + (fabsf(this->vwork[10].x - gPlayer[0].pos.x) < 700.0f) && + (fabsf(this->vwork[10].y - gPlayer[0].pos.y) < 700.0f)) { Player_ApplyDamage(&gPlayer[0], 0, 40); } } -void Andross_Boss320_Init(Boss320* this) { +void Andross_AndAndross_Init(AndAndross* this) { Audio_SetEnvSfxReverb(24); D_i6_801A7F5C = D_i6_801A7F64 = D_i6_801A7F6C = D_i6_801A7F74 = D_i6_801A7F7C = D_i6_801A8430 = 0.0f; gAndrossUnkAlpha = 0.0f; @@ -1580,124 +1703,136 @@ void Andross_Boss320_Init(Boss320* this) { Audio_PlaySequence(SEQ_PLAYER_BGM, NA_BGM_BOSS_ANDROSS, 0, 0); } -void Andross_8018D2B0(Boss* boss) { +void Andross_8018D2B0(AndAndross* this) { s32 i; Vec3f sp68; - if ((boss->swork[5] < 0) && (boss->swork[4] < 0)) { - if ((boss->dmgType != DMG_NONE) && (boss->dmgPart == 0 || boss->dmgPart == 1)) { - boss->dmgType = DMG_NONE; - if (boss->state < 12) { - boss->health -= boss->damage; - boss->timer_05C = 20; - if ((boss->state == 9) || (boss->state == 10)) { - if (boss->health <= 0) { + if ((this->swork[5] < 0) && (this->swork[4] < 0)) { + if ((this->dmgType != DMG_NONE) && (this->dmgPart == 0 || this->dmgPart == 1)) { + this->dmgType = DMG_NONE; + if (this->state < 12) { + this->health -= this->damage; + this->timer_05C = 20; + if ((this->state == 9) || (this->state == 10)) { + if (this->health <= 0) { gScreenFlashTimer = 8; - AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, boss->sfxSource, 4); - AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_EXPLOSION, boss->sfxSource, 4); - AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_DEATH, boss->sfxSource, 4); - Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_ANDROSS_ROBOT); + + AUDIO_PLAY_SFX(NA_SE_EN_DOWN_IMPACT, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_EXPLOSION, this->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_DEATH, this->sfxSource, 4); + + Audio_KillSfxBySourceAndId(this->sfxSource, NA_SE_EN_ANDROSS_ROBOT); + SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); - boss->state = 31; - boss->timer_050 = 200; + + this->state = 31; + this->timer_050 = 200; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].csState = 0; - } else if (boss->health < 50) { - AUDIO_PLAY_SFX(NA_SE_EN_KNOCK_DOWN, boss->sfxSource, 4); + } else if (this->health < 50) { + AUDIO_PLAY_SFX(NA_SE_EN_KNOCK_DOWN, this->sfxSource, 4); } else { - AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, this->sfxSource, 4); } - } else if (boss->health <= 0) { - AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_DEATH, boss->sfxSource, 4); + } else if (this->health <= 0) { + AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_DEATH, this->sfxSource, 4); + SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); + if (gLevelPhase == 0) { - boss->state = 30; + this->state = 30; } else { - boss->state = 32; + this->state = 32; } - boss->fwork[9] = 0.0f; - boss->unk_04C = 0; + this->fwork[9] = 0.0f; + this->animFrame = 0; gCsFrameCount = 0; - boss->timer_05C = 100; + this->timer_05C = 100; } else { - AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, boss->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, this->sfxSource, 4); } } } - } else if (boss->dmgType != DMG_NONE) { - switch (boss->dmgPart) { + } else if (this->dmgType != DMG_NONE) { + switch (this->dmgPart) { case 0: - if (boss->state < 11) { - boss->swork[6] -= boss->damage; - boss->swork[0] = 30; - AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, boss->sfxSource, 4); - if (boss->swork[6] <= 0) { - boss->swork[6] = 100; - boss->state = 12; - boss->timer_050 = 120; - boss->unk_04C = 0; - boss->fwork[9] = 0.0f; - AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_GROAN, boss->sfxSource, 4); + if (this->state < 11) { + this->swork[6] -= this->damage; + this->swork[0] = 30; + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, this->sfxSource, 4); + if (this->swork[6] <= 0) { + this->swork[6] = 100; + this->state = 12; + this->timer_050 = 120; + this->animFrame = 0; + this->fwork[9] = 0.0f; + AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_GROAN, this->sfxSource, 4); } } break; + case 1: - if (boss->state < 12) { - boss->swork[6] -= boss->damage; - boss->swork[1] = 30; - AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, boss->sfxSource, 4); - if (boss->swork[6] <= 0) { - boss->swork[6] = 100; - boss->state = 13; - boss->timer_050 = 120; - boss->unk_04C = 0; - boss->fwork[9] = 0.0f; - AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_GROAN, boss->sfxSource, 4); + if (this->state < 12) { + this->swork[6] -= this->damage; + this->swork[1] = 30; + AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, this->sfxSource, 4); + if (this->swork[6] <= 0) { + this->swork[6] = 100; + this->state = 13; + this->timer_050 = 120; + this->animFrame = 0; + this->fwork[9] = 0.0f; + AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_GROAN, this->sfxSource, 4); } } break; + case 2: case 3: - if (boss->swork[7] == 0) { - boss->swork[boss->dmgPart] = 30; - if (boss->dmgPart == 2) { - sp68.x = boss->vwork[0].x; - sp68.y = boss->vwork[0].y; - sp68.z = boss->vwork[0].z; - boss->swork[4] -= boss->damage; - if (boss->swork[4] < 0) { - boss->info.hitbox[16] = 0.0f; - func_effect_8007BFFC(boss->vwork[0].x, boss->vwork[0].y, boss->vwork[0].z, 0.0f, 0.0f, 0.0f, - 20.0f, 15); + if (this->swork[7] == 0) { + this->swork[this->dmgPart] = 30; + if (this->dmgPart == 2) { + sp68.x = this->vwork[0].x; + sp68.y = this->vwork[0].y; + sp68.z = this->vwork[0].z; + + this->swork[4] -= this->damage; + + if (this->swork[4] < 0) { + this->info.hitbox[16] = 0.0f; + Effect386_Spawn1(this->vwork[0].x, this->vwork[0].y, this->vwork[0].z, 0.0f, 0.0f, 0.0f, + 20.0f, 15); for (i = 0; i < 30; i++) { - func_effect_800794CC(boss->vwork[0].x + RAND_FLOAT_CENTERED(500.0f), - boss->vwork[0].y + RAND_FLOAT_CENTERED(500.0f), boss->vwork[0].z, - RAND_FLOAT(1.0f) + 1.0f); + Effect_Effect357_Spawn50(this->vwork[0].x + RAND_FLOAT_CENTERED(500.0f), + this->vwork[0].y + RAND_FLOAT_CENTERED(500.0f), + this->vwork[0].z, RAND_FLOAT(1.0f) + 1.0f); } - func_effect_8007B344(boss->vwork[0].x, boss->vwork[0].y, boss->vwork[0].z, 20.0f, 5); + Effect_Effect384_Spawn(this->vwork[0].x, this->vwork[0].y, this->vwork[0].z, 20.0f, 5); Effect_SpawnTimedSfxAtPos(&sp68, NA_SE_EN_EXPLOSION_M); } else { Effect_SpawnTimedSfxAtPos(&sp68, NA_SE_OB_DAMAGE_M); } } else { - sp68.x = boss->vwork[1].x; - sp68.y = boss->vwork[1].y; - sp68.z = boss->vwork[1].z; - boss->swork[5] -= boss->damage; - if (boss->swork[5] < 0) { - boss->info.hitbox[22] = 0.0f; - func_effect_8007BFFC(boss->vwork[1].x, boss->vwork[1].y, boss->vwork[1].z, 0.0f, 0.0f, 0.0f, - 20.0f, 15); + sp68.x = this->vwork[1].x; + sp68.y = this->vwork[1].y; + sp68.z = this->vwork[1].z; + + this->swork[5] -= this->damage; + + if (this->swork[5] < 0) { + this->info.hitbox[22] = 0.0f; + Effect386_Spawn1(this->vwork[1].x, this->vwork[1].y, this->vwork[1].z, 0.0f, 0.0f, 0.0f, + 20.0f, 15); for (i = 0; i < 30; i++) { - func_effect_800794CC(boss->vwork[1].x + RAND_FLOAT_CENTERED(500.0f), - boss->vwork[1].y + RAND_FLOAT_CENTERED(500.0f), boss->vwork[1].z, - RAND_FLOAT(1.0f) + 1.0f); + Effect_Effect357_Spawn50(this->vwork[1].x + RAND_FLOAT_CENTERED(500.0f), + this->vwork[1].y + RAND_FLOAT_CENTERED(500.0f), + this->vwork[1].z, RAND_FLOAT(1.0f) + 1.0f); } - func_effect_8007B344(boss->vwork[1].x, boss->vwork[1].y, boss->vwork[1].z, 20.0f, 5); + Effect_Effect384_Spawn(this->vwork[1].x, this->vwork[1].y, this->vwork[1].z, 20.0f, 5); Effect_SpawnTimedSfxAtPos(&sp68, NA_SE_EN_EXPLOSION_M); } else { Effect_SpawnTimedSfxAtPos(&sp68, NA_SE_OB_DAMAGE_M); @@ -1706,64 +1841,69 @@ void Andross_8018D2B0(Boss* boss) { } break; } - boss->dmgType = DMG_NONE; + this->dmgType = DMG_NONE; } } -void Andross_8018D9C0(Boss* boss) { - - switch (boss->state) { +void Andross_8018D9C0(AndAndross* this) { + switch (this->state) { case 2: - boss->state = 3; + this->state = 3; break; + case 3: - boss->state = 4; + this->state = 4; break; + case 4: - boss->state = 5; - boss->timer_050 = 30; + this->state = 5; + this->timer_050 = 30; break; + case 5: - boss->state = 6; - boss->timer_050 = 40; + this->state = 6; + this->timer_050 = 40; break; + case 6: - boss->state = 17; - boss->timer_050 = 180; - boss->fwork[16] = 0.0f; + this->state = 17; + this->timer_050 = 180; + this->fwork[16] = 0.0f; break; + case 12: case 13: case 14: - boss->state = 7; - boss->timer_050 = 150; + this->state = 7; + this->timer_050 = 150; break; + default: - boss->state = 2; + this->state = 2; break; } - boss->fwork[9] = 0.0f; - boss->unk_04C = 0; - boss->fwork[1] = 0.0f; - boss->fwork[4] = 0.0f; - boss->fwork[7] = 0.0f; + this->fwork[9] = 0.0f; + this->animFrame = 0; + this->fwork[1] = 0.0f; + this->fwork[4] = 0.0f; + this->fwork[7] = 0.0f; } -void Andross_8018DA94(Boss* boss, Vec3f* arg1) { +void Andross_8018DA94(AndAndross* this, Vec3f* arg1) { s32 i; - func_effect_8007BFFC(arg1->x, arg1->y, arg1->z, 0.0f, 0.0f, 0.0f, 10.0f, 10); + Effect386_Spawn1(arg1->x, arg1->y, arg1->z, 0.0f, 0.0f, 0.0f, 10.0f, 10); for (i = 0; i < 7; i++) { - func_effect_800794CC(RAND_FLOAT_CENTERED(200.0f) + arg1->x, RAND_FLOAT_CENTERED(200.0f) + arg1->y, arg1->z, - RAND_FLOAT(0.5f) + 1.0f); + Effect_Effect357_Spawn50(RAND_FLOAT_CENTERED(200.0f) + arg1->x, RAND_FLOAT_CENTERED(200.0f) + arg1->y, arg1->z, + RAND_FLOAT(0.5f) + 1.0f); } - func_effect_8007B344(arg1->x, arg1->y, arg1->z, 10.0f, 5); - AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, boss->sfxSource, 4); + Effect_Effect384_Spawn(arg1->x, arg1->y, arg1->z, 10.0f, 5); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, this->sfxSource, 4); } static f32 D_i6_801A67B8[] = { 0.0f, 0.0f, 0.0f }; -void Andross_Boss320_Update(Boss* boss) { +void Andross_AndAndross_Update(AndAndross* this) { s32 i; s32 frameCountMask; Vec3f spD0[100]; @@ -1773,74 +1913,85 @@ void Andross_Boss320_Update(Boss* boss) { Effect* effect; PlayerShot* playerShot; Boss* boss1; - Player* player; + Player* player = &gPlayer[0]; f32 yaw; f32 pitch; s16 limbCount; s32 initialstate; s32 pad; - player = &gPlayer[0]; gBossFrameCount++; - initialstate = boss->state; + initialstate = this->state; Andross_801876FC(); + gAmbientR = 10; gAmbientG = 0; gAmbientB = 20; gGroundClipMode = 0; - boss->fwork[19] += 5.0f; - if (boss->swork[9] != 0) { - boss->swork[9]--; - Math_SmoothStepToF(&boss->fwork[17], 1.5f, 0.7f, 0.4f, 0); + + this->fwork[19] += 5.0f; + + if (this->swork[9] != 0) { + this->swork[9]--; + Math_SmoothStepToF(&this->fwork[17], 1.5f, 0.7f, 0.4f, 0); } else { - Math_SmoothStepToF(&boss->fwork[17], 1.0f, 0.2f, 0.3f, 0); + Math_SmoothStepToF(&this->fwork[17], 1.0f, 0.2f, 0.3f, 0); } - boss->fwork[18] = boss->fwork[17]; - if (boss->swork[10] != 0) { - boss->swork[10]--; - if (boss->swork[10] < 20) { + this->fwork[18] = this->fwork[17]; + + if (this->swork[10] != 0) { + this->swork[10]--; + if (this->swork[10] < 20) { frameCountMask = 32 - 1; - } else if (boss->swork[10] < 30) { + } else if (this->swork[10] < 30) { frameCountMask = 8 - 1; - } else if (boss->swork[10] < 40) { + } else if (this->swork[10] < 40) { frameCountMask = 2 - 1; } else { frameCountMask = 1 - 1; } + if ((gGameFrameCount & frameCountMask) == 0) { - Andross_8018CA50(boss->vwork[6].x, boss->vwork[6].y, boss->vwork[6].z, 0.0f, -30.0f, 0.0f, 30.0f); - Andross_8018CA50(boss->vwork[7].x, boss->vwork[7].y, boss->vwork[7].z, 0.0f, -30.0f, 0.0f, 30.0f); - Andross_8018CA50(boss->vwork[8].x, boss->vwork[8].y, boss->vwork[8].z, -30.0f, 0.0f, 0.0f, 30.0f); - Andross_8018CA50(boss->vwork[9].x, boss->vwork[9].y, boss->vwork[9].z, 30.0f, 0.0f, 0.0f, 30.0f); + Andross_Effect396_Spawn3(this->vwork[6].x, this->vwork[6].y, this->vwork[6].z, 0.0f, -30.0f, 0.0f, 30.0f); + Andross_Effect396_Spawn3(this->vwork[7].x, this->vwork[7].y, this->vwork[7].z, 0.0f, -30.0f, 0.0f, 30.0f); + Andross_Effect396_Spawn3(this->vwork[8].x, this->vwork[8].y, this->vwork[8].z, -30.0f, 0.0f, 0.0f, 30.0f); + Andross_Effect396_Spawn3(this->vwork[9].x, this->vwork[9].y, this->vwork[9].z, 30.0f, 0.0f, 0.0f, 30.0f); } } - Math_SmoothStepToF(&boss->fwork[20], 0.0f, 1.0f, 0.1f, 0.01f); - Math_SmoothStepToF(&boss->fwork[21], 0.0f, 1.0f, 0.05f, 0.001f); - Andross_8018D2B0(boss); - boss->swork[7] = 0; - boss->fwork[14] = boss->fwork[15] = 0.0f; - if (boss->state >= 2) { + + Math_SmoothStepToF(&this->fwork[20], 0.0f, 1.0f, 0.1f, 0.01f); + Math_SmoothStepToF(&this->fwork[21], 0.0f, 1.0f, 0.05f, 0.001f); + + Andross_8018D2B0(this); + + this->swork[7] = 0; + this->fwork[14] = this->fwork[15] = 0.0f; + + if (this->state >= 2) { gBlurAlpha = 128; } for (i = 0; i < 4; i++) { - if (boss->swork[i] > 0) { - boss->swork[i]--; + if (this->swork[i] > 0) { + this->swork[i]--; } } - Math_SmoothStepToF(&boss->obj.pos.z, gPlayer[0].pos.z + boss->fwork[6], boss->fwork[8], boss->fwork[7], 0); - Math_SmoothStepToF(&boss->obj.pos.x, boss->fwork[0], boss->fwork[2], boss->fwork[1], 0); - Math_SmoothStepToF(&boss->obj.pos.y, boss->fwork[3], boss->fwork[5], boss->fwork[4], 0); - Math_SmoothStepToF(&boss->fwork[11], 0.0f, 0.1f, 2.0f, 0); - Math_SmoothStepToF(&boss->fwork[12], 0.0f, 0.1f, 2.0f, 0); - Math_SmoothStepToF(&boss->fwork[13], 0.0f, 0.1f, 2.0f, 0); + + Math_SmoothStepToF(&this->obj.pos.z, gPlayer[0].pos.z + this->fwork[6], this->fwork[8], this->fwork[7], 0); + Math_SmoothStepToF(&this->obj.pos.x, this->fwork[0], this->fwork[2], this->fwork[1], 0); + Math_SmoothStepToF(&this->obj.pos.y, this->fwork[3], this->fwork[5], this->fwork[4], 0); + + Math_SmoothStepToF(&this->fwork[11], 0.0f, 0.1f, 2.0f, 0); + Math_SmoothStepToF(&this->fwork[12], 0.0f, 0.1f, 2.0f, 0); + Math_SmoothStepToF(&this->fwork[13], 0.0f, 0.1f, 2.0f, 0); + if (player->draw) { - xDisplacement = gPlayer[0].pos.x - boss->vwork[2].x; - yDisplacement = gPlayer[0].pos.y - boss->vwork[2].y; - zDisplacement = gPlayer[0].trueZpos - boss->vwork[2].z; + xDisplacement = gPlayer[0].pos.x - this->vwork[2].x; + yDisplacement = gPlayer[0].pos.y - this->vwork[2].y; + zDisplacement = gPlayer[0].trueZpos - this->vwork[2].z; yaw = Math_RadToDeg(Math_Atan2F(xDisplacement, zDisplacement)); pitch = Math_RadToDeg(Math_Atan2F(yDisplacement, sqrtf(SQ(xDisplacement) + SQ(zDisplacement)))); @@ -1860,20 +2011,25 @@ void Andross_Boss320_Update(Boss* boss) { yaw = 0.0f; pitch = 345.0f; } - Math_SmoothStepToAngle(&boss->vwork[4].x, pitch, 0.5f, 5.0f, 0); - Math_SmoothStepToAngle(&boss->vwork[4].y, yaw, 0.5f, 5.0f, 0); + + Math_SmoothStepToAngle(&this->vwork[4].x, pitch, 0.5f, 5.0f, 0); + Math_SmoothStepToAngle(&this->vwork[4].y, yaw, 0.5f, 5.0f, 0); + if (player->draw) { - xDisplacement = gPlayer[0].pos.x - boss->vwork[3].x; - yDisplacement = gPlayer[0].pos.y - boss->vwork[3].y; - zDisplacement = gPlayer[0].trueZpos - boss->vwork[3].z; + xDisplacement = gPlayer[0].pos.x - this->vwork[3].x; + yDisplacement = gPlayer[0].pos.y - this->vwork[3].y; + zDisplacement = gPlayer[0].trueZpos - this->vwork[3].z; + yaw = Math_RadToDeg(Math_Atan2F(xDisplacement, zDisplacement)); pitch = Math_RadToDeg(Math_Atan2F(yDisplacement, sqrtf(SQ(xDisplacement) + SQ(zDisplacement)))); + if ((yaw > 30.0f) && (yaw < 180.0f)) { yaw = 30.0f; } if ((yaw < 330.0f) && (yaw > 180.0f)) { yaw = 330.0f; } + if ((pitch > 30.0f) && (pitch < 180.0f)) { pitch = 30.0f; } @@ -1884,27 +2040,30 @@ void Andross_Boss320_Update(Boss* boss) { yaw = 0.0f; pitch = 345.0f; } - Math_SmoothStepToAngle(&boss->vwork[5].x, pitch, 0.5f, 5.0f, 0); - Math_SmoothStepToAngle(&boss->vwork[5].y, yaw, 0.5f, 5.0f, 0); - switch (boss->state) { + + Math_SmoothStepToAngle(&this->vwork[5].x, pitch, 0.5f, 5.0f, 0); + Math_SmoothStepToAngle(&this->vwork[5].y, yaw, 0.5f, 5.0f, 0); + + switch (this->state) { case 0: - boss->fwork[8] = 0.1f; - boss->fwork[7] = 50.0f; - boss->state = 1; - boss->timer_050 = 60; - boss->timer_052 = 80; - boss->timer_054 = 150; - boss->fwork[9] = 1.0f; + this->fwork[8] = 0.1f; + this->fwork[7] = 50.0f; + this->state = 1; + this->timer_050 = 60; + this->timer_052 = 80; + this->timer_054 = 150; + this->fwork[9] = 1.0f; /* fallthrough */ case 1: - boss->timer_05A = 100; - if (boss->timer_054 == 65) { - AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_LAUGH, boss->sfxSource, 4); + this->timer_05A = 100; + if (this->timer_054 == 65) { + AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_LAUGH, this->sfxSource, 4); } - if (boss->timer_050 != 0) { - boss->fwork[6] = -3000.0f; + + if (this->timer_050 != 0) { + this->fwork[6] = -3000.0f; } else { - boss->fwork[6] = -1000.0f; + this->fwork[6] = -1000.0f; Math_SmoothStepToF(&D_i6_801A7F5C, gLight1R, 1.0f, 4.0f, 0.0f); Math_SmoothStepToF(&D_i6_801A7F64, gLight1G, 1.0f, 3.0f, 0.0f); Math_SmoothStepToF(&D_i6_801A7F6C, gLight1B, 1.0f, 3.0f, 0.0f); @@ -1912,237 +2071,284 @@ void Andross_Boss320_Update(Boss* boss) { Math_SmoothStepToF(&D_i6_801A7F7C, gAmbientG, 1.0f, 2.0f, 0.0f); Math_SmoothStepToF(&D_i6_801A8430, gAmbientB, 1.0f, 2.0f, 0.0f); } + Math_SmoothStepToF(&gAndrossUnkAlpha, 32.0f, 1.0f, 0.5f, 0.0f); Math_SmoothStepToF(&player->camRoll, 0.0f, 0.2f, 3.0f, 0); - boss->fwork[8] = 0.1f; - Math_SmoothStepToF(&boss->fwork[7], 200.0f, 1.0f, 10.0f, 0); - if (boss->timer_052 == 0) { - boss->unk_04C++; - if (boss->unk_04C >= Animation_GetFrameCount(&D_ANDROSS_C002B08)) { - boss->unk_04C = 0; + + this->fwork[8] = 0.1f; + + Math_SmoothStepToF(&this->fwork[7], 200.0f, 1.0f, 10.0f, 0); + + if (this->timer_052 == 0) { + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_ANDROSS_C002B08)) { + this->animFrame = 0; } - limbCount = Animation_GetFrameData(&D_ANDROSS_C002B08, boss->unk_04C, spD0); - Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, boss->fwork[9], 100.0f, 0.0f); + limbCount = Animation_GetFrameData(&D_ANDROSS_C002B08, this->animFrame, spD0); + Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, this->fwork[9], 100.0f, 0.0f); } else { - if (boss->timer_052 < 16) { - boss->unk_04C++; - if (boss->unk_04C >= Animation_GetFrameCount(&D_ANDROSS_C033D98)) { - boss->unk_04C = Animation_GetFrameCount(&D_ANDROSS_C033D98) - 1; + if (this->timer_052 < 16) { + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_ANDROSS_C033D98)) { + this->animFrame = Animation_GetFrameCount(&D_ANDROSS_C033D98) - 1; } } - limbCount = Animation_GetFrameData(&D_ANDROSS_C033D98, boss->unk_04C, spD0); - Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, boss->fwork[9], 100.0f, 0.0f); - if (boss->timer_052 == 1) { - boss->unk_04C = 0; + limbCount = Animation_GetFrameData(&D_ANDROSS_C033D98, this->animFrame, spD0); + Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, this->fwork[9], 100.0f, 0.0f); + if (this->timer_052 == 1) { + this->animFrame = 0; } } - Math_SmoothStepToF(&boss->fwork[9], 0.2f, 1.0f, 0.01f, 0); - if (boss->timer_054 == 0) { - boss->state = 2; - boss->unk_04C = 0; - boss->fwork[7] = boss->fwork[9] = 0.0f; - boss->vel.z = -20.0f; + + Math_SmoothStepToF(&this->fwork[9], 0.2f, 1.0f, 0.01f, 0); + + if (this->timer_054 == 0) { + this->state = 2; + this->animFrame = 0; + this->fwork[7] = this->fwork[9] = 0.0f; + this->vel.z = -20.0f; } break; + case 2: - boss->fwork[6] = -4000.0f; - boss->fwork[8] = 0.05f; - Math_SmoothStepToF(&boss->fwork[7], 30.0f, 1.0f, 5.0f, 0); - boss->fwork[0] = 0.0f; - boss->fwork[2] = 0.05f; - boss->fwork[3] = 0.0f; - boss->fwork[5] = 0.05f; - Math_SmoothStepToF(&boss->fwork[1], 10.0f, 1.0f, 0.5f, 0); - Math_SmoothStepToF(&boss->fwork[4], 10.0f, 1.0f, 0.5f, 0); - Math_SmoothStepToF(&boss->fwork[9], 0.7f, 1.0f, 0.005f, 0); - boss->unk_04C++; - if (boss->unk_04C >= Animation_GetFrameCount(&D_ANDROSS_C033780)) { - Andross_8018D9C0(boss); + this->fwork[6] = -4000.0f; + this->fwork[8] = 0.05f; + + Math_SmoothStepToF(&this->fwork[7], 30.0f, 1.0f, 5.0f, 0); + + this->fwork[0] = 0.0f; + this->fwork[2] = 0.05f; + this->fwork[3] = 0.0f; + this->fwork[5] = 0.05f; + + Math_SmoothStepToF(&this->fwork[1], 10.0f, 1.0f, 0.5f, 0); + Math_SmoothStepToF(&this->fwork[4], 10.0f, 1.0f, 0.5f, 0); + Math_SmoothStepToF(&this->fwork[9], 0.7f, 1.0f, 0.005f, 0); + + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_ANDROSS_C033780)) { + Andross_8018D9C0(this); } - limbCount = Animation_GetFrameData(&D_ANDROSS_C033780, boss->unk_04C, spD0); - Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, boss->fwork[9], 100.0f, 0.0f); + limbCount = Animation_GetFrameData(&D_ANDROSS_C033780, this->animFrame, spD0); + Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, this->fwork[9], 100.0f, 0.0f); break; + case 3: - if (boss->swork[4] < 0) { - Andross_8018D9C0(boss); + if (this->swork[4] < 0) { + Andross_8018D9C0(this); } else { - boss->fwork[0] = player->pos.x; - boss->fwork[3] = player->pos.y + 1000.0f; - if (boss->unk_04C == 60) { - AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_PUNCH, boss->sfxSource, 4); + this->fwork[0] = player->pos.x; + this->fwork[3] = player->pos.y + 1000.0f; + + if (this->animFrame == 60) { + AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_PUNCH, this->sfxSource, 4); } - if (boss->unk_04C > 60) { - if (boss->unk_04C == 76) { - boss->fwork[7] = 0.0f; + if (this->animFrame > 60) { + if (this->animFrame == 76) { + this->fwork[7] = 0.0f; } - if (boss->unk_04C > 76) { - boss->fwork[6] = -2500.0f; - boss->fwork[8] = 0.1f; - Math_SmoothStepToF(&boss->fwork[7], 100.0f, 1.0f, 10.0f, 0); + if (this->animFrame > 76) { + this->fwork[6] = -2500.0f; + this->fwork[8] = 0.1f; + Math_SmoothStepToF(&this->fwork[7], 100.0f, 1.0f, 10.0f, 0); } else { - boss->fwork[6] = -1500.0f; - boss->fwork[8] = 0.3f; - Math_SmoothStepToF(&boss->fwork[7], 200.0f, 1.0f, 40.0f, 0); + this->fwork[6] = -1500.0f; + this->fwork[8] = 0.3f; + Math_SmoothStepToF(&this->fwork[7], 200.0f, 1.0f, 40.0f, 0); } - boss->fwork[2] = 0.05f; - boss->fwork[5] = 0.05f; - Math_SmoothStepToF(&boss->fwork[1], 2.0f, 1.0f, 0.5f, 0); - Math_SmoothStepToF(&boss->fwork[4], 2.0f, 1.0f, 0.5f, 0); - boss->swork[7] = 1; - boss->fwork[14] = -100.0f; - boss->fwork[15] = -50.0f; + + this->fwork[2] = 0.05f; + this->fwork[5] = 0.05f; + + Math_SmoothStepToF(&this->fwork[1], 2.0f, 1.0f, 0.5f, 0); + Math_SmoothStepToF(&this->fwork[4], 2.0f, 1.0f, 0.5f, 0); + + this->swork[7] = 1; + this->fwork[14] = -100.0f; + this->fwork[15] = -50.0f; } else { - boss->fwork[6] = -4000.0f; - boss->fwork[8] = 0.05f; - Math_SmoothStepToF(&boss->fwork[7], 30.0f, 1.0f, 2.0f, 0); - boss->fwork[2] = 0.1f; - boss->fwork[5] = 0.1f; - boss->fwork[14] = 50.0f; - Math_SmoothStepToF(&boss->fwork[1], 20.0f, 1.0f, 1.0f, 0); - Math_SmoothStepToF(&boss->fwork[4], 20.0f, 1.0f, 1.0f, 0); + this->fwork[6] = -4000.0f; + this->fwork[8] = 0.05f; + + Math_SmoothStepToF(&this->fwork[7], 30.0f, 1.0f, 2.0f, 0); + + this->fwork[2] = 0.1f; + this->fwork[5] = 0.1f; + this->fwork[14] = 50.0f; + + Math_SmoothStepToF(&this->fwork[1], 20.0f, 1.0f, 1.0f, 0); + Math_SmoothStepToF(&this->fwork[4], 20.0f, 1.0f, 1.0f, 0); } - Math_SmoothStepToF(&boss->fwork[9], 1.0f, 1.0f, 0.01f, 0); - boss->unk_04C++; - if (boss->unk_04C >= Animation_GetFrameCount(&D_ANDROSS_C029F74)) { - Andross_8018D9C0(boss); + + Math_SmoothStepToF(&this->fwork[9], 1.0f, 1.0f, 0.01f, 0); + + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_ANDROSS_C029F74)) { + Andross_8018D9C0(this); } - limbCount = Animation_GetFrameData(&D_ANDROSS_C029F74, boss->unk_04C, spD0); - Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, boss->fwork[9], 100.0f, 0.0f); + limbCount = Animation_GetFrameData(&D_ANDROSS_C029F74, this->animFrame, spD0); + Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, this->fwork[9], 100.0f, 0.0f); } break; + case 4: - if (boss->swork[4] < 0) { - Andross_8018D9C0(boss); + if (this->swork[4] < 0) { + Andross_8018D9C0(this); } else { - boss->fwork[0] = player->pos.x; - boss->fwork[3] = player->pos.y; - if (boss->unk_04C == 55) { - AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_PUNCH, boss->sfxSource, 4); + this->fwork[0] = player->pos.x; + this->fwork[3] = player->pos.y; + + if (this->animFrame == 55) { + AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_PUNCH, this->sfxSource, 4); } - if (boss->unk_04C > 55) { - boss->fwork[6] = -1500.0f; - boss->fwork[8] = 0.3f; - Math_SmoothStepToF(&boss->fwork[7], 200.0f, 1.0f, 40.0f, 0); - boss->swork[7] = 1; - boss->fwork[2] = 0.05f; - boss->fwork[5] = 0.05f; - boss->fwork[14] = -100.0f; - Math_SmoothStepToF(&boss->fwork[1], 2.0f, 1.0f, 1.0f, 0); - Math_SmoothStepToF(&boss->fwork[4], 2.0f, 1.0f, 1.0f, 0); + if (this->animFrame > 55) { + this->fwork[6] = -1500.0f; + this->fwork[8] = 0.3f; + Math_SmoothStepToF(&this->fwork[7], 200.0f, 1.0f, 40.0f, 0); + this->swork[7] = 1; + this->fwork[2] = 0.05f; + this->fwork[5] = 0.05f; + this->fwork[14] = -100.0f; + Math_SmoothStepToF(&this->fwork[1], 2.0f, 1.0f, 1.0f, 0); + Math_SmoothStepToF(&this->fwork[4], 2.0f, 1.0f, 1.0f, 0); } else { - boss->fwork[6] = -4000.0f; - boss->fwork[8] = 0.05f; - Math_SmoothStepToF(&boss->fwork[7], 30.0f, 1.0f, 2.0f, 0); - boss->fwork[2] = 0.1f; - boss->fwork[5] = 0.1f; - boss->fwork[14] = 50.0f; - Math_SmoothStepToF(&boss->fwork[1], 30.0f, 1.0f, 1.0f, 0); - Math_SmoothStepToF(&boss->fwork[4], 30.0f, 1.0f, 1.0f, 0); + this->fwork[6] = -4000.0f; + this->fwork[8] = 0.05f; + Math_SmoothStepToF(&this->fwork[7], 30.0f, 1.0f, 2.0f, 0); + this->fwork[2] = 0.1f; + this->fwork[5] = 0.1f; + this->fwork[14] = 50.0f; + Math_SmoothStepToF(&this->fwork[1], 30.0f, 1.0f, 1.0f, 0); + Math_SmoothStepToF(&this->fwork[4], 30.0f, 1.0f, 1.0f, 0); } - Math_SmoothStepToF(&boss->fwork[9], 1.0f, 1.0f, 0.01f, 0); - boss->unk_04C++; - if (boss->unk_04C >= Animation_GetFrameCount(&D_ANDROSS_C02E494)) { - Andross_8018D9C0(boss); + + Math_SmoothStepToF(&this->fwork[9], 1.0f, 1.0f, 0.01f, 0); + + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_ANDROSS_C02E494)) { + Andross_8018D9C0(this); } - limbCount = Animation_GetFrameData(&D_ANDROSS_C02E494, boss->unk_04C, spD0); - Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, boss->fwork[9], 100.0f, 0.0f); + limbCount = Animation_GetFrameData(&D_ANDROSS_C02E494, this->animFrame, spD0); + Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, this->fwork[9], 100.0f, 0.0f); } break; + case 5: - if (boss->swork[5] < 0) { - Andross_8018D9C0(boss); + if (this->swork[5] < 0) { + Andross_8018D9C0(this); } else { - boss->fwork[0] = player->pos.x; - boss->fwork[3] = player->pos.y + 500.0f; - if (boss->timer_050 != 0) { - boss->fwork[6] = -4000.0f; - boss->fwork[8] = 0.05f; - Math_SmoothStepToF(&boss->fwork[7], 30.0f, 1.0f, 5.0f, 0); - boss->fwork[2] = 0.1f; - boss->fwork[5] = 0.1f; - Math_SmoothStepToF(&boss->fwork[1], 30.0f, 1.0f, 2.0f, 0); - Math_SmoothStepToF(&boss->fwork[4], 30.0f, 1.0f, 2.0f, 0); + this->fwork[0] = player->pos.x; + this->fwork[3] = player->pos.y + 500.0f; + if (this->timer_050 != 0) { + this->fwork[6] = -4000.0f; + this->fwork[8] = 0.05f; + + Math_SmoothStepToF(&this->fwork[7], 30.0f, 1.0f, 5.0f, 0); + + this->fwork[2] = 0.1f; + this->fwork[5] = 0.1f; + + Math_SmoothStepToF(&this->fwork[1], 30.0f, 1.0f, 2.0f, 0); + Math_SmoothStepToF(&this->fwork[4], 30.0f, 1.0f, 2.0f, 0); } else { - boss->unk_04C++; - boss->fwork[6] = -1400.0f; - boss->fwork[8] = 0.2f; - Math_SmoothStepToF(&boss->fwork[7], 200.0f, 1.0f, 40.0f, 0); - boss->fwork[2] = 0.05f; - boss->fwork[5] = 0.05f; - Math_SmoothStepToF(&boss->fwork[1], 2.0f, 1.0f, 1.0f, 0); - Math_SmoothStepToF(&boss->fwork[4], 2.0f, 1.0f, 1.0f, 0); - if (boss->unk_04C == 5) { - AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_SLAP, boss->sfxSource, 4); + this->animFrame++; + + this->fwork[6] = -1400.0f; + this->fwork[8] = 0.2f; + + Math_SmoothStepToF(&this->fwork[7], 200.0f, 1.0f, 40.0f, 0); + + this->fwork[2] = 0.05f; + this->fwork[5] = 0.05f; + + Math_SmoothStepToF(&this->fwork[1], 2.0f, 1.0f, 1.0f, 0); + Math_SmoothStepToF(&this->fwork[4], 2.0f, 1.0f, 1.0f, 0); + + if (this->animFrame == 5) { + AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_SLAP, this->sfxSource, 4); } - boss->swork[7] = 1; - boss->fwork[14] = 100.0f; + this->swork[7] = 1; + this->fwork[14] = 100.0f; } - Math_SmoothStepToF(&boss->fwork[9], 1.0f, 1.0f, 0.01f, 0); - if (boss->unk_04C >= Animation_GetFrameCount(&D_ANDROSS_C030244)) { - Andross_8018D9C0(boss); + Math_SmoothStepToF(&this->fwork[9], 1.0f, 1.0f, 0.01f, 0); + + if (this->animFrame >= Animation_GetFrameCount(&D_ANDROSS_C030244)) { + Andross_8018D9C0(this); } - limbCount = Animation_GetFrameData(&D_ANDROSS_C030244, boss->unk_04C, spD0); - Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, boss->fwork[9], 100.0f, 0.0f); + + limbCount = Animation_GetFrameData(&D_ANDROSS_C030244, this->animFrame, spD0); + Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, this->fwork[9], 100.0f, 0.0f); } break; case 6: - if ((boss->swork[4] < 0) || (boss->swork[5] < 0)) { - Andross_8018D9C0(boss); + if ((this->swork[4] < 0) || (this->swork[5] < 0)) { + Andross_8018D9C0(this); } else { - if (boss->timer_050 == 1) { - AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_WHAND, boss->sfxSource, 4); + if (this->timer_050 == 1) { + AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_WHAND, this->sfxSource, 4); } - if (boss->timer_050 != 0) { - boss->fwork[6] = -4000.0f; - boss->fwork[8] = 0.05f; - Math_SmoothStepToF(&boss->fwork[7], 40.0f, 1.0f, 3.0f, 0); - boss->fwork[2] = 0.05f; - boss->fwork[5] = 0.05f; - Math_SmoothStepToF(&boss->fwork[1], 30.0f, 1.0f, 1.0f, 0); - Math_SmoothStepToF(&boss->fwork[4], 30.0f, 1.0f, 1.0f, 0); - boss->fwork[0] = player->pos.x; - boss->fwork[3] = player->pos.y + 300.0f; + if (this->timer_050 != 0) { + this->fwork[6] = -4000.0f; + this->fwork[8] = 0.05f; + + Math_SmoothStepToF(&this->fwork[7], 40.0f, 1.0f, 3.0f, 0); + + this->fwork[2] = 0.05f; + this->fwork[5] = 0.05f; + + Math_SmoothStepToF(&this->fwork[1], 30.0f, 1.0f, 1.0f, 0); + Math_SmoothStepToF(&this->fwork[4], 30.0f, 1.0f, 1.0f, 0); + + this->fwork[0] = player->pos.x; + this->fwork[3] = player->pos.y + 300.0f; } else { - boss->unk_04C++; - boss->fwork[6] = -2000.0f; - boss->fwork[8] = 0.2f; - Math_SmoothStepToF(&boss->fwork[7], 50.0f, 1.0f, 10.0f, 0); - boss->fwork[2] = 0.1f; - boss->fwork[5] = 0.1f; - Math_SmoothStepToF(&boss->fwork[1], 10.0f, 1.0f, 1.0f, 0); - Math_SmoothStepToF(&boss->fwork[4], 10.0f, 1.0f, 1.0f, 0); - boss->swork[7] = 1; - if (boss->unk_04C > 18) { - Math_SmoothStepToF(&boss->fwork[11], 110.0f, 1.0f, 18.0f, 0); - Math_SmoothStepToF(&boss->fwork[12], 20.0f, 1.0f, 3.6f, 0); - Math_SmoothStepToF(&boss->fwork[13], 80.0f, 1.0f, 15.0f, 0); + this->animFrame++; + + this->fwork[6] = -2000.0f; + this->fwork[8] = 0.2f; + + Math_SmoothStepToF(&this->fwork[7], 50.0f, 1.0f, 10.0f, 0); + + this->fwork[2] = 0.1f; + this->fwork[5] = 0.1f; + + Math_SmoothStepToF(&this->fwork[1], 10.0f, 1.0f, 1.0f, 0); + Math_SmoothStepToF(&this->fwork[4], 10.0f, 1.0f, 1.0f, 0); + + this->swork[7] = 1; + + if (this->animFrame > 18) { + Math_SmoothStepToF(&this->fwork[11], 110.0f, 1.0f, 18.0f, 0); + Math_SmoothStepToF(&this->fwork[12], 20.0f, 1.0f, 3.6f, 0); + Math_SmoothStepToF(&this->fwork[13], 80.0f, 1.0f, 15.0f, 0); } - if (boss->unk_04C == 25) { + if (this->animFrame == 25) { // Why tank? AUDIO_PLAY_SFX(NA_SE_TANK_BOUND, D_i6_801A67B8, 4); } } - Math_SmoothStepToF(&boss->fwork[9], 1.0f, 1.0f, 0.01f, 0); - if (boss->unk_04C >= Animation_GetFrameCount(&D_ANDROSS_C02EDA0)) { - Andross_8018D9C0(boss); + Math_SmoothStepToF(&this->fwork[9], 1.0f, 1.0f, 0.01f, 0); + if (this->animFrame >= Animation_GetFrameCount(&D_ANDROSS_C02EDA0)) { + Andross_8018D9C0(this); } - limbCount = Animation_GetFrameData(&D_ANDROSS_C02EDA0, boss->unk_04C, spD0); - Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, boss->fwork[9], 100.0f, 0.0f); + limbCount = Animation_GetFrameData(&D_ANDROSS_C02EDA0, this->animFrame, spD0); + Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, this->fwork[9], 100.0f, 0.0f); } break; + case 7: - if (boss->swork[5] < 0) { - Andross_8018D9C0(boss); + if (this->swork[5] < 0) { + Andross_8018D9C0(this); } else { - if (boss->unk_04C == 48) { - AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_SPARK, boss->sfxSource, 4); + if (this->animFrame == 48) { + AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_SPARK, this->sfxSource, 4); } - if (boss->unk_04C > 48) { - Andross_8018D0D8(boss); + if (this->animFrame > 48) { + Andross_8018D0D8(this); } - if (boss->unk_04C > 45) { - Math_SmoothStepToF(&boss->fwork[20], 1.0f, 1.0f, 0.2f, 0.01f); - Math_SmoothStepToF(&boss->fwork[21], 1.0f, 0.5f, 0.15f, 0.01f); + if (this->animFrame > 45) { + Math_SmoothStepToF(&this->fwork[20], 1.0f, 1.0f, 0.2f, 0.01f); + Math_SmoothStepToF(&this->fwork[21], 1.0f, 0.5f, 0.15f, 0.01f); if (((gGameFrameCount % 2) == 0)) { gAmbientR = 200; gAmbientG = 90; @@ -2153,130 +2359,166 @@ void Andross_Boss320_Update(Boss* boss) { gAmbientB = 127; } } else { - Math_SmoothStepToF(&boss->fwork[20], 0.15f, 1.0f, 0.15f, 0.01f); - Math_SmoothStepToF(&boss->fwork[21], 0.5f, 1.0f, 0.11f, 0.001f); + Math_SmoothStepToF(&this->fwork[20], 0.15f, 1.0f, 0.15f, 0.01f); + Math_SmoothStepToF(&this->fwork[21], 0.5f, 1.0f, 0.11f, 0.001f); } - boss->fwork[0] = player->pos.x + 500.0f; - boss->fwork[3] = player->pos.y + 750.0f; - boss->fwork[6] = -5000.0f; - boss->fwork[8] = 0.05f; - Math_SmoothStepToF(&boss->fwork[7], 60.0f, 1.0f, 5.0f, 0); - boss->fwork[2] = 0.05f; - boss->fwork[5] = 0.05f; - Math_SmoothStepToF(&boss->fwork[1], 5.0f, 1.0f, 2.0f, 0); - Math_SmoothStepToF(&boss->fwork[4], 5.0f, 1.0f, 2.0f, 0); - Math_SmoothStepToF(&boss->fwork[9], 1.0f, 1.0f, 0.01f, 0); - boss->unk_04C++; - if (boss->unk_04C >= Animation_GetFrameCount(&D_ANDROSS_C018BC4)) { - boss->unk_04C = Animation_GetFrameCount(&D_ANDROSS_C018BC4) - 1; - if (boss->timer_050 == 0) { - Andross_8018D9C0(boss); + + this->fwork[0] = player->pos.x + 500.0f; + this->fwork[3] = player->pos.y + 750.0f; + this->fwork[6] = -5000.0f; + this->fwork[8] = 0.05f; + + Math_SmoothStepToF(&this->fwork[7], 60.0f, 1.0f, 5.0f, 0); + + this->fwork[2] = 0.05f; + this->fwork[5] = 0.05f; + + Math_SmoothStepToF(&this->fwork[1], 5.0f, 1.0f, 2.0f, 0); + Math_SmoothStepToF(&this->fwork[4], 5.0f, 1.0f, 2.0f, 0); + Math_SmoothStepToF(&this->fwork[9], 1.0f, 1.0f, 0.01f, 0); + + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_ANDROSS_C018BC4)) { + this->animFrame = Animation_GetFrameCount(&D_ANDROSS_C018BC4) - 1; + if (this->timer_050 == 0) { + Andross_8018D9C0(this); } } - limbCount = Animation_GetFrameData(&D_ANDROSS_C018BC4, boss->unk_04C, spD0); - Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, boss->fwork[9], 100.0f, 0.0f); + + limbCount = Animation_GetFrameData(&D_ANDROSS_C018BC4, this->animFrame, spD0); + Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, this->fwork[9], 100.0f, 0.0f); } break; + case 12: - if ((boss->swork[4] < 0) || (boss->swork[5] < 0)) { - boss->state = 14; - boss->unk_04C = 0; - boss->fwork[9] = 0.0f; + if ((this->swork[4] < 0) || (this->swork[5] < 0)) { + this->state = 14; + this->animFrame = 0; + this->fwork[9] = 0.0f; } else { - boss->fwork[6] = -3000.0f; - boss->fwork[8] = 0.05f; - Math_SmoothStepToF(&boss->fwork[7], 40.0f, 1.0f, 2.0f, 0); - boss->fwork[2] = 0.05f; - boss->fwork[5] = 0.05f; - Math_SmoothStepToF(&boss->fwork[1], 20.0f, 1.0f, 1.0f, 0); - Math_SmoothStepToF(&boss->fwork[4], 20.0f, 1.0f, 1.0f, 0); - boss->fwork[0] = player->pos.x; - boss->fwork[3] = player->pos.y; - Math_SmoothStepToF(&boss->fwork[9], 1.0f, 1.0f, 0.01f, 0); - boss->unk_04C++; - if (boss->unk_04C >= Animation_GetFrameCount(&D_ANDROSS_C025C00)) { - boss->unk_04C = Animation_GetFrameCount(&D_ANDROSS_C025C00) - 1; - if (boss->timer_050 == 0) { - Andross_8018D9C0(boss); + this->fwork[6] = -3000.0f; + this->fwork[8] = 0.05f; + + Math_SmoothStepToF(&this->fwork[7], 40.0f, 1.0f, 2.0f, 0); + + this->fwork[2] = 0.05f; + this->fwork[5] = 0.05f; + + Math_SmoothStepToF(&this->fwork[1], 20.0f, 1.0f, 1.0f, 0); + Math_SmoothStepToF(&this->fwork[4], 20.0f, 1.0f, 1.0f, 0); + + this->fwork[0] = player->pos.x; + this->fwork[3] = player->pos.y; + + Math_SmoothStepToF(&this->fwork[9], 1.0f, 1.0f, 0.01f, 0); + + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_ANDROSS_C025C00)) { + this->animFrame = Animation_GetFrameCount(&D_ANDROSS_C025C00) - 1; + if (this->timer_050 == 0) { + Andross_8018D9C0(this); } } - limbCount = Animation_GetFrameData(&D_ANDROSS_C025C00, boss->unk_04C, spD0); - Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, boss->fwork[9], 100.0f, 0.0f); + + limbCount = Animation_GetFrameData(&D_ANDROSS_C025C00, this->animFrame, spD0); + Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, this->fwork[9], 100.0f, 0.0f); } break; case 13: - if ((boss->swork[4] < 0) || (boss->swork[5] < 0)) { - boss->state = 14; - boss->unk_04C = 0; - boss->fwork[9] = 0.0f; + if ((this->swork[4] < 0) || (this->swork[5] < 0)) { + this->state = 14; + this->animFrame = 0; + this->fwork[9] = 0.0f; } else { - boss->fwork[6] = -3000.0f; - boss->fwork[8] = 0.05f; - Math_SmoothStepToF(&boss->fwork[7], 20.0f, 1.0f, 2.0f, 0); - boss->fwork[2] = 0.05f; - boss->fwork[5] = 0.05f; - Math_SmoothStepToF(&boss->fwork[1], 20.0f, 1.0f, 1.0f, 0); - Math_SmoothStepToF(&boss->fwork[4], 20.0f, 1.0f, 1.0f, 0); - boss->fwork[0] = player->pos.x; - boss->fwork[3] = player->pos.y; - Math_SmoothStepToF(&boss->fwork[9], 1.0f, 1.0f, 0.01f, 0); - boss->unk_04C++; - if (boss->unk_04C >= Animation_GetFrameCount(&D_ANDROSS_C006F08)) { - boss->unk_04C = Animation_GetFrameCount(&D_ANDROSS_C006F08) - 1; - if (boss->timer_050 == 0) { - Andross_8018D9C0(boss); + this->fwork[6] = -3000.0f; + this->fwork[8] = 0.05f; + + Math_SmoothStepToF(&this->fwork[7], 20.0f, 1.0f, 2.0f, 0); + + this->fwork[2] = 0.05f; + this->fwork[5] = 0.05f; + + Math_SmoothStepToF(&this->fwork[1], 20.0f, 1.0f, 1.0f, 0); + Math_SmoothStepToF(&this->fwork[4], 20.0f, 1.0f, 1.0f, 0); + + this->fwork[0] = player->pos.x; + this->fwork[3] = player->pos.y; + + Math_SmoothStepToF(&this->fwork[9], 1.0f, 1.0f, 0.01f, 0); + + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_ANDROSS_C006F08)) { + this->animFrame = Animation_GetFrameCount(&D_ANDROSS_C006F08) - 1; + if (this->timer_050 == 0) { + Andross_8018D9C0(this); } } - limbCount = Animation_GetFrameData(&D_ANDROSS_C006F08, boss->unk_04C, spD0); - Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, boss->fwork[9], 100.0f, 0.0f); + + limbCount = Animation_GetFrameData(&D_ANDROSS_C006F08, this->animFrame, spD0); + Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, this->fwork[9], 100.0f, 0.0f); } break; + case 14: - boss->fwork[6] = -3000.0f; - boss->fwork[8] = 0.05f; - Math_SmoothStepToF(&boss->fwork[7], 20.0f, 1.0f, 2.0f, 0); - boss->fwork[2] = 0.05f; - boss->fwork[5] = 0.05f; - Math_SmoothStepToF(&boss->fwork[1], 20.0f, 1.0f, 1.0f, 0); - Math_SmoothStepToF(&boss->fwork[4], 20.0f, 1.0f, 1.0f, 0); - boss->fwork[0] = player->pos.x; - boss->fwork[3] = player->pos.y; - Math_SmoothStepToF(&boss->fwork[9], 1.0f, 1.0f, 0.01f, 0); - boss->unk_04C++; - if (boss->unk_04C >= Animation_GetFrameCount(&D_ANDROSS_C002654)) { - boss->unk_04C = 0; - if (boss->timer_050 == 0) { - Andross_8018D9C0(boss); + this->fwork[6] = -3000.0f; + this->fwork[8] = 0.05f; + + Math_SmoothStepToF(&this->fwork[7], 20.0f, 1.0f, 2.0f, 0); + + this->fwork[2] = 0.05f; + this->fwork[5] = 0.05f; + + Math_SmoothStepToF(&this->fwork[1], 20.0f, 1.0f, 1.0f, 0); + Math_SmoothStepToF(&this->fwork[4], 20.0f, 1.0f, 1.0f, 0); + + this->fwork[0] = player->pos.x; + this->fwork[3] = player->pos.y; + + Math_SmoothStepToF(&this->fwork[9], 1.0f, 1.0f, 0.01f, 0); + + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_ANDROSS_C002654)) { + this->animFrame = 0; + if (this->timer_050 == 0) { + Andross_8018D9C0(this); } } - limbCount = Animation_GetFrameData(&D_ANDROSS_C002654, boss->unk_04C, spD0); - Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, boss->fwork[9], 100.0f, 0.0f); + + limbCount = Animation_GetFrameData(&D_ANDROSS_C002654, this->animFrame, spD0); + Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, this->fwork[9], 100.0f, 0.0f); break; + case 15: - if (boss->swork[8] == 1) { - boss->fwork[6] = 100.0f; + if (this->swork[8] == 1) { + this->fwork[6] = 100.0f; } else { - boss->fwork[6] = -3000.0f; + this->fwork[6] = -3000.0f; } - boss->fwork[8] = 0.05f; - Math_SmoothStepToF(&boss->fwork[7], 60.0f, 1.0f, 5.0f, 0); - boss->fwork[2] = 0.05f; - boss->fwork[5] = 0.05f; - Math_SmoothStepToF(&boss->fwork[1], 20.0f, 1.0f, 1.0f, 0); - Math_SmoothStepToF(&boss->fwork[4], 20.0f, 1.0f, 1.0f, 0); - boss->fwork[0] = 0.0f; - boss->fwork[3] = 0.0f; - Math_SmoothStepToF(&boss->fwork[9], 1.0f, 1.0f, 0.01f, 0); - if (boss->unk_04C == 15) { - AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_BITE0, boss->sfxSource, 4); + this->fwork[8] = 0.05f; + + Math_SmoothStepToF(&this->fwork[7], 60.0f, 1.0f, 5.0f, 0); + + this->fwork[2] = 0.05f; + this->fwork[5] = 0.05f; + + Math_SmoothStepToF(&this->fwork[1], 20.0f, 1.0f, 1.0f, 0); + Math_SmoothStepToF(&this->fwork[4], 20.0f, 1.0f, 1.0f, 0); + + this->fwork[0] = 0.0f; + this->fwork[3] = 0.0f; + + Math_SmoothStepToF(&this->fwork[9], 1.0f, 1.0f, 0.01f, 0); + + if (this->animFrame == 15) { + AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_BITE0, this->sfxSource, 4); } - if ((boss->unk_04C > 35) && (boss->unk_04C < 150) && ((boss->unk_04C % 32) == 0)) { - AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_BITE1, boss->sfxSource, 4); + if ((this->animFrame > 35) && (this->animFrame < 150) && ((this->animFrame % 32) == 0)) { + AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_BITE1, this->sfxSource, 4); if (player->state_1C8 == PLAYERSTATE_1C8_ANDROSS_MOUTH) { gControllerRumbleTimers[0] = 10; } } - if ((boss->unk_04C == 20) && (player->state_1C8 == PLAYERSTATE_1C8_ANDROSS_MOUTH)) { + if ((this->animFrame == 20) && (player->state_1C8 == PLAYERSTATE_1C8_ANDROSS_MOUTH)) { player->draw = false; for (i = 0; i < ARRAY_COUNT(gEffects); i++) { if (gEffects[i].obj.id == OBJ_EFFECT_396) { @@ -2284,79 +2526,93 @@ void Andross_Boss320_Update(Boss* boss) { } } } - boss->unk_04C++; - if (boss->unk_04C >= Animation_GetFrameCount(&D_ANDROSS_C00DE48)) { - boss->unk_04C = Animation_GetFrameCount(&D_ANDROSS_C00DE48) - 1; - if (boss->timer_050 == 0) { - boss->state = 16; - boss->unk_04C = 0; - boss->timer_050 = 30; - boss->fwork[9] = 0.0f; + + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_ANDROSS_C00DE48)) { + this->animFrame = Animation_GetFrameCount(&D_ANDROSS_C00DE48) - 1; + if (this->timer_050 == 0) { + this->state = 16; + this->animFrame = 0; + this->timer_050 = 30; + this->fwork[9] = 0.0f; } } - limbCount = Animation_GetFrameData(&D_ANDROSS_C00DE48, boss->unk_04C, spD0); - Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, boss->fwork[9], 100.0f, 0.0f); - if ((boss->unk_04C == 45) && (boss->swork[8] == 2)) { - boss->state = 18; - boss->unk_04C = 0; - boss->unk_044 = 0; - boss->timer_050 = 40; - boss->fwork[9] = 0.0f; + + limbCount = Animation_GetFrameData(&D_ANDROSS_C00DE48, this->animFrame, spD0); + Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, this->fwork[9], 100.0f, 0.0f); + + if ((this->animFrame == 45) && (this->swork[8] == 2)) { + this->state = 18; + this->animFrame = 0; + this->unk_044 = 0; + this->timer_050 = 40; + this->fwork[9] = 0.0f; } break; + case 16: - if (boss->swork[8] == 1) { - boss->fwork[6] = 100.0f; + if (this->swork[8] == 1) { + this->fwork[6] = 100.0f; } else { - boss->fwork[6] = -3000.0f; + this->fwork[6] = -3000.0f; } - boss->fwork[8] = 0.05f; - Math_SmoothStepToF(&boss->fwork[7], 50.0f, 1.0f, 2.0f, 0); - boss->fwork[2] = 0.05f; - boss->fwork[5] = 0.05f; - Math_SmoothStepToF(&boss->fwork[1], 20.0f, 1.0f, 1.0f, 0); - Math_SmoothStepToF(&boss->fwork[4], 20.0f, 1.0f, 1.0f, 0); - boss->fwork[0] = player->pos.x; - boss->fwork[3] = player->pos.y + 100.0f; - Math_SmoothStepToF(&boss->fwork[9], 1.0f, 1.0f, 0.01f, 0); - if (boss->timer_050 == 0) { - boss->unk_04C++; - if (boss->unk_04C >= Animation_GetFrameCount(&D_ANDROSS_C023B54)) { - boss->unk_04C = Animation_GetFrameCount(&D_ANDROSS_C023B54) - 1; - Andross_8018D9C0(boss); + this->fwork[8] = 0.05f; + + Math_SmoothStepToF(&this->fwork[7], 50.0f, 1.0f, 2.0f, 0); + + this->fwork[2] = 0.05f; + this->fwork[5] = 0.05f; + + Math_SmoothStepToF(&this->fwork[1], 20.0f, 1.0f, 1.0f, 0); + Math_SmoothStepToF(&this->fwork[4], 20.0f, 1.0f, 1.0f, 0); + + this->fwork[0] = player->pos.x; + this->fwork[3] = player->pos.y + 100.0f; + + Math_SmoothStepToF(&this->fwork[9], 1.0f, 1.0f, 0.01f, 0); + + if (this->timer_050 == 0) { + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_ANDROSS_C023B54)) { + this->animFrame = Animation_GetFrameCount(&D_ANDROSS_C023B54) - 1; + Andross_8018D9C0(this); } } - limbCount = Animation_GetFrameData(&D_ANDROSS_C023B54, boss->unk_04C, spD0); - Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, boss->fwork[9], 100.0f, 0.0f); - if (boss->unk_04C == 10) { - AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_VOMIT, boss->sfxSource, 4); + + limbCount = Animation_GetFrameData(&D_ANDROSS_C023B54, this->animFrame, spD0); + Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, this->fwork[9], 100.0f, 0.0f); + + if (this->animFrame == 10) { + AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_VOMIT, this->sfxSource, 4); } - if ((boss->unk_04C == 13) && (player->state_1C8 == PLAYERSTATE_1C8_ANDROSS_MOUTH)) { + + if ((this->animFrame == 13) && (player->state_1C8 == PLAYERSTATE_1C8_ANDROSS_MOUTH)) { player->draw = true; player->csState = 1; player->csTimer = 60; player->mercyTimer = 50; - boss->swork[8] = 0; + this->swork[8] = 0; gControllerRumbleTimers[0] = 30; + if (player->wings.rightState == 2) { gRightWingHealth[0] = 0; player->wings.rightState = 1; - Andross_8018C8D4(boss->obj.pos.x, boss->obj.pos.y - 200.0f, boss->obj.pos.z, - RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT_CENTERED(10.0f), 10.0f, 8); + Andross_Effect396_Spawn2(this->obj.pos.x, this->obj.pos.y - 200.0f, this->obj.pos.z, + RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT_CENTERED(10.0f), 10.0f, 8); } if (player->wings.leftState == 2) { gLeftWingHealth[0] = 0; player->wings.leftState = 1; - Andross_8018C8D4(boss->obj.pos.x, boss->obj.pos.y - 200.0f, boss->obj.pos.z, - RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT_CENTERED(10.0f), 10.0f, 9); + Andross_Effect396_Spawn2(this->obj.pos.x, this->obj.pos.y - 200.0f, this->obj.pos.z, + RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT_CENTERED(10.0f), 10.0f, 9); } } - if (boss->unk_04C >= 10 && boss->unk_04C < 20) { + if ((this->animFrame >= 10) && (this->animFrame < 20)) { for (i = 0; i < 10; i++) { - Andross_8018C8D4(boss->obj.pos.x + RAND_FLOAT_CENTERED(100.0f), - (boss->obj.pos.y - 200.0f) + RAND_FLOAT_CENTERED(100.0f), boss->obj.pos.z, - RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT(5.0f) + 5.0f, - RAND_INT(7.9)); + Andross_Effect396_Spawn2(this->obj.pos.x + RAND_FLOAT_CENTERED(100.0f), + (this->obj.pos.y - 200.0f) + RAND_FLOAT_CENTERED(100.0f), this->obj.pos.z, + RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT_CENTERED(50.0f), + RAND_FLOAT(5.0f) + 5.0f, RAND_INT(7.9)); } } break; @@ -2367,57 +2623,64 @@ void Andross_Boss320_Update(Boss* boss) { if (1) {} if (1) {} Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 50.0f, 1.0f, 1.8f, 0.0f); - boss->timer_056 = 50; + this->timer_056 = 50; - if ((boss->timer_050 > 70) && (boss->timer_050 < 1000) && ((gGameFrameCount % 4) == 0)) { - Andross_8018C734(gPlayer[0].cam.eye.x + RAND_FLOAT_CENTERED(3000.0f), - gPlayer[0].cam.eye.y + RAND_FLOAT_CENTERED(3000.0f), - gPlayer[0].cam.eye.z - gPathProgress, RAND_INT(7.9)); + if ((this->timer_050 > 70) && (this->timer_050 < 1000) && ((gGameFrameCount % 4) == 0)) { + Andross_Effect396_Spawn1(gPlayer[0].cam.eye.x + RAND_FLOAT_CENTERED(3000.0f), + gPlayer[0].cam.eye.y + RAND_FLOAT_CENTERED(3000.0f), + gPlayer[0].cam.eye.z - gPathProgress, RAND_INT(7.9)); } - if (boss->timer_050 > 0) { + if (this->timer_050 > 0) { playerShot = gPlayerShots; effect = gEffects; for (i = 0; i < ARRAY_COUNT(gPlayerShots); i++, playerShot++) { - Math_SmoothStepToF(&playerShot->obj.pos.x, boss->obj.pos.x, 0.5f, boss->fwork[16], 0); - Math_SmoothStepToF(&playerShot->obj.pos.y, boss->obj.pos.y - 100.0f, 0.5f, boss->fwork[16], 0); + Math_SmoothStepToF(&playerShot->obj.pos.x, this->obj.pos.x, 0.5f, this->fwork[16], 0); + Math_SmoothStepToF(&playerShot->obj.pos.y, this->obj.pos.y - 100.0f, 0.5f, this->fwork[16], 0); + Math_SmoothStepToF(&playerShot->vel.x, 0.0f, 0.9f, 5.0f, 0); Math_SmoothStepToF(&playerShot->vel.y, 0.0f, 0.9f, 5.0f, 0); + if ((playerShot->obj.id == PLAYERSHOT_BOMB) && (playerShot->obj.status == 1) && - (playerShot->unk_5C == 0) && (fabsf(playerShot->obj.pos.x - boss->obj.pos.x) < 200.0f) && - (fabsf(playerShot->obj.pos.y - (boss->obj.pos.y - 100.0f)) < 200.0f) && - (fabsf(playerShot->obj.pos.z - (boss->obj.pos.z - 200.0f)) < 100.0f)) { + (playerShot->unk_5C == 0) && (fabsf(playerShot->obj.pos.x - this->obj.pos.x) < 200.0f) && + (fabsf(playerShot->obj.pos.y - (this->obj.pos.y - 100.0f)) < 200.0f) && + (fabsf(playerShot->obj.pos.z - (this->obj.pos.z - 200.0f)) < 100.0f)) { Object_Kill(&playerShot->obj, playerShot->sfxSource); - boss->state = 15; - boss->fwork[9] = 0.2f; - boss->unk_04C = 0; - boss->swork[8] = 2; - AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_CHOKE, boss->sfxSource, 4); + this->state = 15; + this->fwork[9] = 0.2f; + this->animFrame = 0; + this->swork[8] = 2; + AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_CHOKE, this->sfxSource, 4); break; } } + for (i = 0; i < ARRAY_COUNT(gEffects); i++, effect++) { if ((effect->obj.status != OBJ_FREE) && (effect->obj.id != OBJ_EFFECT_396)) { - Math_SmoothStepToF(&effect->obj.pos.x, boss->obj.pos.x, 0.5f, boss->fwork[16], 0); - Math_SmoothStepToF(&effect->obj.pos.y, boss->obj.pos.y - 100.0f, 0.5f, boss->fwork[16], 0); - Math_SmoothStepToF(&effect->obj.pos.z, boss->obj.pos.z - 200.0f, 0.5f, boss->fwork[16], 0); + Math_SmoothStepToF(&effect->obj.pos.x, this->obj.pos.x, 0.5f, this->fwork[16], 0); + Math_SmoothStepToF(&effect->obj.pos.y, this->obj.pos.y - 100.0f, 0.5f, this->fwork[16], 0); + Math_SmoothStepToF(&effect->obj.pos.z, this->obj.pos.z - 200.0f, 0.5f, this->fwork[16], 0); + Math_SmoothStepToF(&effect->vel.x, 0.0f, 0.9f, 5.0f, 0); Math_SmoothStepToF(&effect->vel.y, 0.0f, 0.9f, 5.0f, 0); Math_SmoothStepToF(&effect->vel.z, 0.0f, 0.9f, 10.0f, 0); - if ((fabsf(effect->obj.pos.x - boss->obj.pos.x) < 200.0f) && - (fabsf(effect->obj.pos.y - (boss->obj.pos.y - 100.0f)) < 200.0f) && - (fabsf(effect->obj.pos.z - (boss->obj.pos.z - 200.0f)) < 100.0f)) { + + if ((fabsf(effect->obj.pos.x - this->obj.pos.x) < 200.0f) && + (fabsf(effect->obj.pos.y - (this->obj.pos.y - 100.0f)) < 200.0f) && + (fabsf(effect->obj.pos.z - (this->obj.pos.z - 200.0f)) < 100.0f)) { Object_Kill(&effect->obj, effect->sfxSource); } } } - Math_SmoothStepToF(&player->pos.x, boss->obj.pos.x, 0.1f, boss->fwork[16], 0); - Math_SmoothStepToF(&player->pos.y, boss->obj.pos.y - 150.0f, 0.1f, boss->fwork[16], 0); - Math_SmoothStepToF(&boss->fwork[16], 35.0f, 1.0f, 0.5f, 0); - if (fabsf(player->trueZpos - boss->obj.pos.z) < 200.0f) { - boss->state = 15; - boss->swork[8] = 1; - boss->fwork[9] = 0.2f; - boss->unk_04C = 0; + + Math_SmoothStepToF(&player->pos.x, this->obj.pos.x, 0.1f, this->fwork[16], 0); + Math_SmoothStepToF(&player->pos.y, this->obj.pos.y - 150.0f, 0.1f, this->fwork[16], 0); + Math_SmoothStepToF(&this->fwork[16], 35.0f, 1.0f, 0.5f, 0); + + if (fabsf(player->trueZpos - this->obj.pos.z) < 200.0f) { + this->state = 15; + this->swork[8] = 1; + this->fwork[9] = 0.2f; + this->animFrame = 0; if (player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) { player->state_1C8 = PLAYERSTATE_1C8_ANDROSS_MOUTH; player->csState = 0; @@ -2425,125 +2688,157 @@ void Andross_Boss320_Update(Boss* boss) { break; } } - boss->fwork[8] = 0.1f; - boss->fwork[2] = 0.1f; - boss->fwork[5] = 0.1f; - boss->fwork[6] = -300.0f; - Math_SmoothStepToF(&boss->fwork[1], 20.0f, 1.0f, 1.0f, 0); - Math_SmoothStepToF(&boss->fwork[4], 30.0f, 1.0f, 1.0f, 0); - boss->fwork[0] = 0.0f; - boss->fwork[3] = 150.0f; - Math_SmoothStepToF(&boss->fwork[7], 20.0f, 0.1f, 0.1f, 0); - Math_SmoothStepToF(&boss->fwork[9], 1.0f, 1.0f, 0.01f, 0); - if (boss->unk_04C == 10) { - AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_BREATH, boss->sfxSource, 4); + + this->fwork[8] = 0.1f; + this->fwork[2] = 0.1f; + this->fwork[5] = 0.1f; + this->fwork[6] = -300.0f; + + Math_SmoothStepToF(&this->fwork[1], 20.0f, 1.0f, 1.0f, 0); + Math_SmoothStepToF(&this->fwork[4], 30.0f, 1.0f, 1.0f, 0); + + this->fwork[0] = 0.0f; + this->fwork[3] = 150.0f; + + Math_SmoothStepToF(&this->fwork[7], 20.0f, 0.1f, 0.1f, 0); + Math_SmoothStepToF(&this->fwork[9], 1.0f, 1.0f, 0.01f, 0); + + if (this->animFrame == 10) { + AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_BREATH, this->sfxSource, 4); } - boss->unk_04C++; - if (boss->unk_04C >= Animation_GetFrameCount(&D_ANDROSS_C0240D0)) { - boss->unk_04C = 0; - if (boss->timer_050 == 0) { - boss->state = 15; - boss->swork[8] = 0; - boss->fwork[9] = 0.0f; + + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_ANDROSS_C0240D0)) { + this->animFrame = 0; + if (this->timer_050 == 0) { + this->state = 15; + this->swork[8] = 0; + this->fwork[9] = 0.0f; } } - limbCount = Animation_GetFrameData(&D_ANDROSS_C0240D0, boss->unk_04C, spD0); - Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, boss->fwork[9], 100.0f, 0.0f); + limbCount = Animation_GetFrameData(&D_ANDROSS_C0240D0, this->animFrame, spD0); + Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, this->fwork[9], 100.0f, 0.0f); break; + case 18: - boss->fwork[6] = -3000.0f; - boss->fwork[8] = 0.05f; - Math_SmoothStepToF(&boss->fwork[7], 70.0f, 1.0f, 7.0f, 0); - boss->fwork[2] = 0.05f; - boss->fwork[5] = 0.05f; - Math_SmoothStepToF(&boss->fwork[1], 30.0f, 1.0f, 3.0f, 0); - Math_SmoothStepToF(&boss->fwork[4], 30.0f, 1.0f, 3.0f, 0); - boss->fwork[0] = 0.0f; - boss->fwork[3] = 0.0f; - Math_SmoothStepToF(&boss->fwork[9], 1.0f, 1.0f, 0.05f, 0); - switch (boss->unk_044) { + this->fwork[6] = -3000.0f; + this->fwork[8] = 0.05f; + + Math_SmoothStepToF(&this->fwork[7], 70.0f, 1.0f, 7.0f, 0); + + this->fwork[2] = 0.05f; + this->fwork[5] = 0.05f; + + Math_SmoothStepToF(&this->fwork[1], 30.0f, 1.0f, 3.0f, 0); + Math_SmoothStepToF(&this->fwork[4], 30.0f, 1.0f, 3.0f, 0); + + this->fwork[0] = 0.0f; + this->fwork[3] = 0.0f; + + Math_SmoothStepToF(&this->fwork[9], 1.0f, 1.0f, 0.05f, 0); + + switch (this->unk_044) { case 0: - if (boss->timer_050 != 0) { + if (this->timer_050 != 0) { limbCount = Animation_GetFrameData(&D_ANDROSS_C00DE48, 45, spD0); - Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, boss->fwork[9], 100.0f, 0.0f); + Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, this->fwork[9], 100.0f, 0.0f); } else { - boss->unk_044 = 1; - boss->timer_050 = 30; - boss->swork[9] = 20; - boss->fwork[9] = 0.0f; - Audio_PlayBombExplodeSfx(0, boss->sfxSource); - boss->timer_05C = 50; + this->unk_044 = 1; + this->timer_050 = 30; + this->swork[9] = 20; + this->fwork[9] = 0.0f; + Audio_PlayBombExplodeSfx(0, this->sfxSource); + this->timer_05C = 50; } break; + case 1: - if (boss->timer_050 != 0) { + if (this->timer_050 != 0) { limbCount = Animation_GetFrameData(&D_ANDROSS_C017430, 0, spD0); - Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, boss->fwork[9], 100.0f, 0.0f); + Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, this->fwork[9], 100.0f, 0.0f); } else { - boss->unk_044 = 2; - boss->timer_050 = 70; - boss->fwork[9] = 0.0f; - AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_EXCITE, boss->sfxSource, 4); + this->unk_044 = 2; + this->timer_050 = 70; + this->fwork[9] = 0.0f; + AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_EXCITE, this->sfxSource, 4); } - if (boss->timer_050 == 15) { - boss->swork[10] = 80; + if (this->timer_050 == 15) { + this->swork[10] = 80; } break; + case 2: - if (boss->timer_050 == 0) { - Andross_8018D9C0(boss); + if (this->timer_050 == 0) { + Andross_8018D9C0(this); } - boss->unk_04C++; - if (boss->unk_04C >= Animation_GetFrameCount(&D_ANDROSS_C00E598)) { - boss->unk_04C = 0; + + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_ANDROSS_C00E598)) { + this->animFrame = 0; } - limbCount = Animation_GetFrameData(&D_ANDROSS_C00E598, boss->unk_04C, spD0); - Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, boss->fwork[9], 100.0f, 0.0f); + + limbCount = Animation_GetFrameData(&D_ANDROSS_C00E598, this->animFrame, spD0); + Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, this->fwork[9], 100.0f, 0.0f); break; } break; + case 20: - boss->fwork[6] = -3000.0f; - boss->fwork[8] = 0.05f; - Math_SmoothStepToF(&boss->fwork[7], 70.0f, 1.0f, 7.0f, 0); - boss->fwork[2] = 0.05f; - boss->fwork[5] = 0.05f; - Math_SmoothStepToF(&boss->fwork[1], 50.0f, 1.0f, 5.0f, 0); - Math_SmoothStepToF(&boss->fwork[4], 50.0f, 1.0f, 5.0f, 0); - Math_SmoothStepToF(&boss->fwork[9], 1.0f, 1.0f, 0.05f, 0); - boss->unk_04C++; - if (boss->unk_04C >= Animation_GetFrameCount(&D_ANDROSS_C017050)) { - Andross_8018D9C0(boss); + this->fwork[6] = -3000.0f; + this->fwork[8] = 0.05f; + + Math_SmoothStepToF(&this->fwork[7], 70.0f, 1.0f, 7.0f, 0); + + this->fwork[2] = 0.05f; + this->fwork[5] = 0.05f; + + Math_SmoothStepToF(&this->fwork[1], 50.0f, 1.0f, 5.0f, 0); + Math_SmoothStepToF(&this->fwork[4], 50.0f, 1.0f, 5.0f, 0); + Math_SmoothStepToF(&this->fwork[9], 1.0f, 1.0f, 0.05f, 0); + + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_ANDROSS_C017050)) { + Andross_8018D9C0(this); } - limbCount = Animation_GetFrameData(&D_ANDROSS_C017050, boss->unk_04C, spD0); - Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, boss->fwork[9], 100.0f, 0.0f); + + limbCount = Animation_GetFrameData(&D_ANDROSS_C017050, this->animFrame, spD0); + Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, this->fwork[9], 100.0f, 0.0f); break; + case 30: - boss->fwork[6] = -3000.0f; - boss->fwork[8] = 0.05f; - Math_SmoothStepToF(&boss->fwork[7], 70.0f, 1.0f, 7.0f, 0); - boss->fwork[2] = 0.05f; - boss->fwork[5] = 0.05f; - Math_SmoothStepToF(&boss->fwork[1], 30.0f, 1.0f, 3.0f, 0); - Math_SmoothStepToF(&boss->fwork[4], 30.0f, 1.0f, 3.0f, 0); - boss->fwork[0] = 0.0f; - boss->fwork[3] = 0.0f; - Math_SmoothStepToF(&boss->fwork[9], 1.0f, 1.0f, 0.05f, 0); - boss->unk_04C++; - if (boss->unk_04C >= Animation_GetFrameCount(&D_ANDROSS_C017050)) { - boss->unk_04C = 0; + this->fwork[6] = -3000.0f; + this->fwork[8] = 0.05f; + + Math_SmoothStepToF(&this->fwork[7], 70.0f, 1.0f, 7.0f, 0); + + this->fwork[2] = 0.05f; + this->fwork[5] = 0.05f; + + Math_SmoothStepToF(&this->fwork[1], 30.0f, 1.0f, 3.0f, 0); + Math_SmoothStepToF(&this->fwork[4], 30.0f, 1.0f, 3.0f, 0); + + this->fwork[0] = 0.0f; + this->fwork[3] = 0.0f; + + Math_SmoothStepToF(&this->fwork[9], 1.0f, 1.0f, 0.05f, 0); + + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_ANDROSS_C017050)) { + this->animFrame = 0; } - limbCount = Animation_GetFrameData(&D_ANDROSS_C017050, boss->unk_04C, spD0); - Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, boss->fwork[9], 100.0f, 0.0f); - if (((gGameFrameCount % 2) == 0)) { - func_effect_8007C484(boss->obj.pos.x + RAND_FLOAT_CENTERED(1000.0f), - boss->obj.pos.y + RAND_FLOAT_CENTERED(1000.0f), boss->obj.pos.z, 0.0f, 0.0f, - boss->vel.z, RAND_FLOAT(0.2f) + 0.2f, 0); + + limbCount = Animation_GetFrameData(&D_ANDROSS_C017050, this->animFrame, spD0); + Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, this->fwork[9], 100.0f, 0.0f); + + if ((gGameFrameCount % 2) == 0) { + Effect_Effect389_Spawn(this->obj.pos.x + RAND_FLOAT_CENTERED(1000.0f), + this->obj.pos.y + RAND_FLOAT_CENTERED(1000.0f), this->obj.pos.z, 0.0f, 0.0f, + this->vel.z, RAND_FLOAT(0.2f) + 0.2f, 0); } if (gCsFrameCount > 50) { - func_effect_8007D0E0(boss->obj.pos.x + RAND_FLOAT_CENTERED(1000.0f), - boss->obj.pos.y + RAND_FLOAT_CENTERED(1000.0f), boss->obj.pos.z, + func_effect_8007D0E0(this->obj.pos.x + RAND_FLOAT_CENTERED(1000.0f), + this->obj.pos.y + RAND_FLOAT_CENTERED(1000.0f), this->obj.pos.z, RAND_FLOAT(3.0f) + 3.0f); } @@ -2551,131 +2846,157 @@ void Andross_Boss320_Update(Boss* boss) { switch (gCsFrameCount) { case 60: - boss->swork[17] = 1; - Andross_8018DA94(boss, &boss->vwork[19]); + this->swork[17] = 1; + Andross_8018DA94(this, &this->vwork[19]); break; case 70: - boss->swork[19] = 1; - Andross_8018DA94(boss, &boss->vwork[21]); + this->swork[19] = 1; + Andross_8018DA94(this, &this->vwork[21]); break; case 80: - boss->swork[11] = 1; - Andross_8018DA94(boss, &boss->vwork[13]); + this->swork[11] = 1; + Andross_8018DA94(this, &this->vwork[13]); break; case 90: - boss->swork[12] = 1; - Andross_8018DA94(boss, &boss->vwork[14]); + this->swork[12] = 1; + Andross_8018DA94(this, &this->vwork[14]); break; case 100: - boss->swork[22] = 1; - Andross_8018DA94(boss, &boss->vwork[24]); + this->swork[22] = 1; + Andross_8018DA94(this, &this->vwork[24]); break; case 110: - boss->swork[23] = 1; - Andross_8018DA94(boss, &boss->vwork[25]); + this->swork[23] = 1; + Andross_8018DA94(this, &this->vwork[25]); break; case 120: - boss->swork[18] = 1; - Andross_8018DA94(boss, &boss->vwork[19]); - boss->state = 9; - boss->health = 100; - boss->timer_050 = 50; - boss->fwork[9] = 0.0f; - AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_ROBOT, boss->sfxSource, 4); + this->swork[18] = 1; + Andross_8018DA94(this, &this->vwork[19]); + this->state = 9; + this->health = 100; + this->timer_050 = 50; + this->fwork[9] = 0.0f; + AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_ROBOT, this->sfxSource, 4); AUDIO_PLAY_BGM(NA_BGM_BOSS_ANDROSS); break; } break; + case 9: - boss->fwork[6] = -3000.0f; - if (boss->timer_050 == 0) { - boss->state = 10; - boss->timer_050 = 100; + this->fwork[6] = -3000.0f; + if (this->timer_050 == 0) { + this->state = 10; + this->timer_050 = 100; } - boss->fwork[8] = 0.05f; - Math_SmoothStepToF(&boss->fwork[7], 60.0f, 1.0f, 3.0f, 0); - boss->fwork[0] = player->pos.x; - boss->fwork[3] = player->pos.y; - Math_SmoothStepToF(&boss->fwork[9], 1.0f, 1.0f, 0.05f, 0); - boss->unk_04C++; - if (boss->unk_04C >= Animation_GetFrameCount(&D_ANDROSS_C00208C)) { - boss->unk_04C = 0; - } - limbCount = Animation_GetFrameData(&D_ANDROSS_C00208C, boss->unk_04C, spD0); - Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, boss->fwork[9], 100.0f, 0.0f); + this->fwork[8] = 0.05f; - func_effect_8007C484(boss->obj.pos.x + RAND_FLOAT_CENTERED(700.0f), - boss->obj.pos.y + RAND_FLOAT_CENTERED(700.0f), boss->obj.pos.z, 0.0f, 0.0f, - gPlayer[0].vel.z, RAND_FLOAT(0.15f) + 0.15f, 0); + Math_SmoothStepToF(&this->fwork[7], 60.0f, 1.0f, 3.0f, 0); + + this->fwork[0] = player->pos.x; + this->fwork[3] = player->pos.y; + + Math_SmoothStepToF(&this->fwork[9], 1.0f, 1.0f, 0.05f, 0); + + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_ANDROSS_C00208C)) { + this->animFrame = 0; + } + + limbCount = Animation_GetFrameData(&D_ANDROSS_C00208C, this->animFrame, spD0); + Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, this->fwork[9], 100.0f, 0.0f); + + Effect_Effect389_Spawn(this->obj.pos.x + RAND_FLOAT_CENTERED(700.0f), + this->obj.pos.y + RAND_FLOAT_CENTERED(700.0f), this->obj.pos.z, 0.0f, 0.0f, + gPlayer[0].vel.z, RAND_FLOAT(0.15f) + 0.15f, 0); break; + case 10: - boss->fwork[6] = 0.0f; - boss->fwork[8] = 0.05f; - Math_SmoothStepToF(&boss->fwork[7], 60.0f, 1.0f, 3.0f, 0); - Math_SmoothStepToF(&boss->fwork[9], 1.0f, 1.0f, 0.05f, 0); - boss->unk_04C++; - if (boss->unk_04C >= Animation_GetFrameCount(&D_ANDROSS_C00208C)) { - boss->unk_04C = 0; - } - limbCount = Animation_GetFrameData(&D_ANDROSS_C00208C, boss->unk_04C, spD0); - Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, boss->fwork[9], 100.0f, 0.0f); + this->fwork[6] = 0.0f; + this->fwork[8] = 0.05f; - func_effect_8007C484(boss->obj.pos.x + RAND_FLOAT_CENTERED(700.0f), - boss->obj.pos.y + RAND_FLOAT_CENTERED(700.0f), boss->obj.pos.z, 0.0f, 0.0f, - gPlayer[0].vel.z, RAND_FLOAT(0.15f) + 0.15f, 0); - if (boss->timer_050 == 0) { - boss->state = 9; - boss->timer_050 = 130; + Math_SmoothStepToF(&this->fwork[7], 60.0f, 1.0f, 3.0f, 0); + Math_SmoothStepToF(&this->fwork[9], 1.0f, 1.0f, 0.05f, 0); + + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_ANDROSS_C00208C)) { + this->animFrame = 0; + } + + limbCount = Animation_GetFrameData(&D_ANDROSS_C00208C, this->animFrame, spD0); + Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, this->fwork[9], 100.0f, 0.0f); + + Effect_Effect389_Spawn(this->obj.pos.x + RAND_FLOAT_CENTERED(700.0f), + this->obj.pos.y + RAND_FLOAT_CENTERED(700.0f), this->obj.pos.z, 0.0f, 0.0f, + gPlayer[0].vel.z, RAND_FLOAT(0.15f) + 0.15f, 0); + if (this->timer_050 == 0) { + this->state = 9; + this->timer_050 = 130; } break; + case 31: - boss->obj.rot.x += 1.0f; - boss->obj.rot.y += 0.3f; - boss->obj.rot.z += 0.7f; - boss->fwork[6] = -3000.0f; - boss->fwork[8] = 0.05f; - Math_SmoothStepToF(&boss->fwork[7], 70.0f, 1.0f, 7.0f, 0); - boss->fwork[2] = 0.05f; - boss->fwork[5] = 0.05f; - Math_SmoothStepToF(&boss->fwork[1], 30.0f, 1.0f, 3.0f, 0); - Math_SmoothStepToF(&boss->fwork[4], 30.0f, 1.0f, 3.0f, 0); - boss->fwork[0] = 0.0f; - boss->fwork[3] = 0.0f; - if (((gGameFrameCount % 2) == 0)) { - func_effect_8007C484(boss->obj.pos.x + RAND_FLOAT_CENTERED(1000.0f), - boss->obj.pos.y + RAND_FLOAT_CENTERED(1000.0f), boss->obj.pos.z, 0.0f, 0.0f, - boss->vel.z, RAND_FLOAT(0.2f) + 0.2f, 0); + this->obj.rot.x += 1.0f; + this->obj.rot.y += 0.3f; + this->obj.rot.z += 0.7f; + + this->fwork[6] = -3000.0f; + this->fwork[8] = 0.05f; + + Math_SmoothStepToF(&this->fwork[7], 70.0f, 1.0f, 7.0f, 0); + + this->fwork[2] = 0.05f; + this->fwork[5] = 0.05f; + + Math_SmoothStepToF(&this->fwork[1], 30.0f, 1.0f, 3.0f, 0); + Math_SmoothStepToF(&this->fwork[4], 30.0f, 1.0f, 3.0f, 0); + + this->fwork[0] = 0.0f; + this->fwork[3] = 0.0f; + + if ((gGameFrameCount % 2) == 0) { + Effect_Effect389_Spawn(this->obj.pos.x + RAND_FLOAT_CENTERED(1000.0f), + this->obj.pos.y + RAND_FLOAT_CENTERED(1000.0f), this->obj.pos.z, 0.0f, 0.0f, + this->vel.z, RAND_FLOAT(0.2f) + 0.2f, 0); } - func_effect_8007D0E0(boss->obj.pos.x + RAND_FLOAT_CENTERED(1000.0f), - boss->obj.pos.y + RAND_FLOAT_CENTERED(1000.0f), boss->obj.pos.z, + func_effect_8007D0E0(this->obj.pos.x + RAND_FLOAT_CENTERED(1000.0f), + this->obj.pos.y + RAND_FLOAT_CENTERED(1000.0f), this->obj.pos.z, RAND_FLOAT(5.0f) + 5.0f); break; + case 32: - boss->fwork[6] = -3000.0f; - boss->fwork[8] = 0.05f; - Math_SmoothStepToF(&boss->fwork[7], 70.0f, 1.0f, 7.0f, 0); - boss->fwork[2] = 0.05f; - boss->fwork[5] = 0.05f; - Math_SmoothStepToF(&boss->fwork[1], 30.0f, 1.0f, 3.0f, 0); - Math_SmoothStepToF(&boss->fwork[4], 30.0f, 1.0f, 3.0f, 0); - boss->fwork[0] = 0.0f; - boss->fwork[3] = 0.0f; - Math_SmoothStepToF(&boss->fwork[9], 1.0f, 1.0f, 0.05f, 0); - boss->unk_04C++; - if (boss->unk_04C >= Animation_GetFrameCount(&D_ANDROSS_C017050)) { - boss->unk_04C = 0; + this->fwork[6] = -3000.0f; + this->fwork[8] = 0.05f; + + Math_SmoothStepToF(&this->fwork[7], 70.0f, 1.0f, 7.0f, 0); + + this->fwork[2] = 0.05f; + this->fwork[5] = 0.05f; + + Math_SmoothStepToF(&this->fwork[1], 30.0f, 1.0f, 3.0f, 0); + Math_SmoothStepToF(&this->fwork[4], 30.0f, 1.0f, 3.0f, 0); + + this->fwork[0] = 0.0f; + this->fwork[3] = 0.0f; + + Math_SmoothStepToF(&this->fwork[9], 1.0f, 1.0f, 0.05f, 0); + + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_ANDROSS_C017050)) { + this->animFrame = 0; } - limbCount = Animation_GetFrameData(&D_ANDROSS_C017050, boss->unk_04C, spD0); - Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, boss->fwork[9], 100.0f, 0.0f); - if (((gGameFrameCount % 2) == 0)) { - func_effect_8007C484(boss->obj.pos.x + RAND_FLOAT_CENTERED(1000.0f), - boss->obj.pos.y + RAND_FLOAT_CENTERED(1000.0f), boss->obj.pos.z, 0.0f, 0.0f, - boss->vel.z, RAND_FLOAT(0.2f) + 0.2f, 0); + + limbCount = Animation_GetFrameData(&D_ANDROSS_C017050, this->animFrame, spD0); + Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, this->fwork[9], 100.0f, 0.0f); + + if ((gGameFrameCount % 2) == 0) { + Effect_Effect389_Spawn(this->obj.pos.x + RAND_FLOAT_CENTERED(1000.0f), + this->obj.pos.y + RAND_FLOAT_CENTERED(1000.0f), this->obj.pos.z, 0.0f, 0.0f, + this->vel.z, RAND_FLOAT(0.2f) + 0.2f, 0); } if (gCsFrameCount > 50) { - func_effect_8007D0E0(boss->obj.pos.x + RAND_FLOAT_CENTERED(1000.0f), - boss->obj.pos.y + RAND_FLOAT_CENTERED(1000.0f), boss->obj.pos.z, + func_effect_8007D0E0(this->obj.pos.x + RAND_FLOAT_CENTERED(1000.0f), + this->obj.pos.y + RAND_FLOAT_CENTERED(1000.0f), this->obj.pos.z, RAND_FLOAT(3.0f) + 3.0f); } @@ -2683,120 +3004,125 @@ void Andross_Boss320_Update(Boss* boss) { switch (gCsFrameCount) { case 60: - boss->swork[17] = 2; - Andross_8018DA94(boss, &boss->vwork[19]); + this->swork[17] = 2; + Andross_8018DA94(this, &this->vwork[19]); break; case 70: - boss->swork[19] = 2; - Andross_8018DA94(boss, &boss->vwork[21]); + this->swork[19] = 2; + Andross_8018DA94(this, &this->vwork[21]); break; case 80: - boss->swork[14] = 2; - Andross_8018DA94(boss, &boss->vwork[16]); + this->swork[14] = 2; + Andross_8018DA94(this, &this->vwork[16]); break; case 90: - boss->swork[13] = 2; - Andross_8018DA94(boss, &boss->vwork[15]); + this->swork[13] = 2; + Andross_8018DA94(this, &this->vwork[15]); break; case 100: - Andross_8018DA94(boss, &boss->vwork[13]); + Andross_8018DA94(this, &this->vwork[13]); break; case 110: - Andross_8018DA94(boss, &boss->vwork[14]); + Andross_8018DA94(this, &this->vwork[14]); break; case 120: - boss->swork[20] = 2; - Andross_8018DA94(boss, &boss->vwork[22]); + this->swork[20] = 2; + Andross_8018DA94(this, &this->vwork[22]); break; case 130: - boss->swork[21] = 2; - Andross_8018DA94(boss, &boss->vwork[23]); + this->swork[21] = 2; + Andross_8018DA94(this, &this->vwork[23]); break; case 140: - boss->swork[22] = 2; - Andross_8018DA94(boss, &boss->vwork[24]); + this->swork[22] = 2; + Andross_8018DA94(this, &this->vwork[24]); break; case 150: - boss->swork[23] = 2; - Andross_8018DA94(boss, &boss->vwork[25]); + this->swork[23] = 2; + Andross_8018DA94(this, &this->vwork[25]); break; case 160: - boss->swork[16] = 1; - Andross_8018DA94(boss, &boss->vwork[18]); + this->swork[16] = 1; + Andross_8018DA94(this, &this->vwork[18]); break; case 170: - boss->swork[15] = 1; - Andross_8018DA94(boss, &boss->vwork[17]); + this->swork[15] = 1; + Andross_8018DA94(this, &this->vwork[17]); break; case 173: - Effect_SpawnTimedSfxAtPos(&boss->obj.pos, NA_SE_EN_EXPLOSION_L); - func_effect_8007B344(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 100.0f, 4); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_L); + Effect_Effect384_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 100.0f, 4); break; + case 180: boss1 = &gBosses[1]; Boss_Initialize(boss1); boss1->obj.status = OBJ_INIT; - boss1->obj.id = OBJ_BOSS_321; - boss1->obj.pos.x = boss->obj.pos.x; - boss1->obj.pos.y = boss->obj.pos.y; - boss1->obj.pos.z = boss->obj.pos.z; + boss1->obj.id = OBJ_BOSS_AND_BRAIN; + boss1->obj.pos.x = this->obj.pos.x; + boss1->obj.pos.y = this->obj.pos.y; + boss1->obj.pos.z = this->obj.pos.z; boss1->swork[1] = 100; boss1->state = 10; boss1->timer_050 = 180; boss1->scale = 5.0f; Object_SetInfo(&boss1->info, boss1->obj.id); - Object_Kill(&boss->obj, boss->sfxSource); + Object_Kill(&this->obj, this->sfxSource); gDrawBackdrop = 3; - Andross_80189098(boss); + Andross_80189098(this); Radio_PlayMessage(gMsg_ID_19330, RCID_ANDROSS_RED); break; } Math_SmoothStepToF(&gAndrossUnkAlpha, 0.0f, 1.0f, 0.3f, 0.0f); break; } - if (boss->swork[4] >= 0) { - boss->info.hitbox[13] = boss->vwork[0].z - boss->obj.pos.z; - boss->info.hitbox[15] = boss->vwork[0].y - boss->obj.pos.y; - boss->info.hitbox[17] = boss->vwork[0].x - boss->obj.pos.x; - if (boss->swork[7] != 0) { - boss->info.hitbox[14] = 280.0f; - boss->info.hitbox[16] = 200.0f; - boss->info.hitbox[18] = 200.0f; + + if (this->swork[4] >= 0) { + this->info.hitbox[13] = this->vwork[0].z - this->obj.pos.z; + this->info.hitbox[15] = this->vwork[0].y - this->obj.pos.y; + this->info.hitbox[17] = this->vwork[0].x - this->obj.pos.x; + if (this->swork[7] != 0) { + this->info.hitbox[14] = 280.0f; + this->info.hitbox[16] = 200.0f; + this->info.hitbox[18] = 200.0f; } else { - boss->info.hitbox[14] = 100.0f; - boss->info.hitbox[16] = 100.0f; - boss->info.hitbox[18] = 100.0f; + this->info.hitbox[14] = 100.0f; + this->info.hitbox[16] = 100.0f; + this->info.hitbox[18] = 100.0f; } } else { - boss->info.hitbox[16] = 0.0f; + this->info.hitbox[16] = 0.0f; } - if (boss->swork[5] >= 0) { - boss->info.hitbox[19] = boss->vwork[1].z - boss->obj.pos.z; - boss->info.hitbox[21] = boss->vwork[1].y - boss->obj.pos.y; - boss->info.hitbox[23] = boss->vwork[1].x - boss->obj.pos.x; - if (boss->swork[7] != 0) { - boss->info.hitbox[20] = 280.0f; - boss->info.hitbox[22] = 200.0f; - boss->info.hitbox[24] = 200.0f; + + if (this->swork[5] >= 0) { + this->info.hitbox[19] = this->vwork[1].z - this->obj.pos.z; + this->info.hitbox[21] = this->vwork[1].y - this->obj.pos.y; + this->info.hitbox[23] = this->vwork[1].x - this->obj.pos.x; + if (this->swork[7] != 0) { + this->info.hitbox[20] = 280.0f; + this->info.hitbox[22] = 200.0f; + this->info.hitbox[24] = 200.0f; } else { - boss->info.hitbox[20] = 100.0f; - boss->info.hitbox[22] = 100.0f; - boss->info.hitbox[24] = 100.0f; + this->info.hitbox[20] = 100.0f; + this->info.hitbox[22] = 100.0f; + this->info.hitbox[24] = 100.0f; } } else { - boss->info.hitbox[22] = 0.0f; + this->info.hitbox[22] = 0.0f; } - boss->info.hitbox[1] = boss->vwork[2].z - boss->obj.pos.z; - boss->info.hitbox[3] = boss->vwork[2].y - boss->obj.pos.y; - boss->info.hitbox[5] = boss->vwork[2].x - boss->obj.pos.x; - boss->info.hitbox[7] = boss->vwork[3].z - boss->obj.pos.z; - boss->info.hitbox[9] = boss->vwork[3].y - boss->obj.pos.y; - boss->info.hitbox[11] = boss->vwork[3].x - boss->obj.pos.x; - if ((initialstate == 17) && (boss->state != 17)) { - Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_ANDROSS_BREATH); + + this->info.hitbox[1] = this->vwork[2].z - this->obj.pos.z; + this->info.hitbox[3] = this->vwork[2].y - this->obj.pos.y; + this->info.hitbox[5] = this->vwork[2].x - this->obj.pos.x; + this->info.hitbox[7] = this->vwork[3].z - this->obj.pos.z; + this->info.hitbox[9] = this->vwork[3].y - this->obj.pos.y; + this->info.hitbox[11] = this->vwork[3].x - this->obj.pos.x; + + if ((initialstate == 17) && (this->state != 17)) { + Audio_KillSfxBySourceAndId(this->sfxSource, NA_SE_EN_ANDROSS_BREATH); } - if ((initialstate == 7) && (boss->state != 7)) { - Audio_KillSfxBySourceAndId(boss->sfxSource, NA_SE_EN_ANDROSS_SPARK); + if ((initialstate == 7) && (this->state != 7)) { + Audio_KillSfxBySourceAndId(this->sfxSource, NA_SE_EN_ANDROSS_SPARK); } } @@ -2814,32 +3140,33 @@ bool Andross_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* Vec3f sp94; Vec3f sp88; f32 scale; - Boss* boss = (Boss*) data; + Boss* this = (Boss*) data; sp94 = D_i6_801A67F4; scale = 1.0f; + if ((limbIndex >= 13) && (limbIndex <= 50)) { - if (boss->state < 2) { + if (this->state < 2) { *dList = NULL; } else { RCP_SetupDL(&gMasterDisp, SETUPDL_29); gSPTexture(gMasterDisp++, 6600, 6600, 0, G_TX_RENDERTILE, G_ON); gSPSetGeometryMode(gMasterDisp++, G_TEXTURE_GEN); if (((limbIndex >= 23) && (limbIndex <= 32)) || (limbIndex == 50)) { - if (boss->swork[5] < 0) { + if (this->swork[5] < 0) { *dList = NULL; - } else if ((boss->swork[3] % 2) != 0) { + } else if ((this->swork[3] % 2) != 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_27); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } - } else if (boss->swork[4] < 0) { + } else if (this->swork[4] < 0) { *dList = NULL; - } else if ((boss->swork[2] % 2) != 0) { + } else if ((this->swork[2] % 2) != 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_27); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } } - } else if ((boss->timer_05C % 2) == 0) { + } else if ((this->timer_05C % 2) == 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_29); } else { RCP_SetupDL(&gMasterDisp, SETUPDL_27); @@ -2848,109 +3175,129 @@ bool Andross_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* switch (limbIndex) { case 59: - if (boss->swork[18] == 1) { + if (this->swork[18] == 1) { *dList = D_ANDROSS_C004860; } - if (boss->swork[18] == 2) { + if (this->swork[18] == 2) { *dList = NULL; } break; + case 3: - rot->z -= boss->vwork[4].x; - rot->y -= boss->vwork[4].y; - if ((boss->swork[0] % 2) != 0) { + rot->z -= this->vwork[4].x; + rot->y -= this->vwork[4].y; + + if ((this->swork[0] % 2) != 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_27); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } - if (boss->swork[11] != 0) { + + if (this->swork[11] != 0) { *dList = D_ANDROSS_C0043D0; RCP_SetupDL(&gMasterDisp, SETUPDL_21); } - scale = boss->fwork[17]; + scale = this->fwork[17]; break; + case 4: - rot->z -= boss->vwork[5].x; - rot->y -= boss->vwork[5].y; - if ((boss->swork[1] % 2) != 0) { + rot->z -= this->vwork[5].x; + rot->y -= this->vwork[5].y; + + if ((this->swork[1] % 2) != 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_27); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } - if (boss->swork[12] != 0) { + + if (this->swork[12] != 0) { *dList = D_ANDROSS_C015740; RCP_SetupDL(&gMasterDisp, SETUPDL_21); } - scale = boss->fwork[17]; + scale = this->fwork[17]; break; + case 5: - if (boss->swork[17] == 1) { + if (this->swork[17] == 1) { *dList = D_ANDROSS_C002B20; } - if (boss->swork[17] == 2) { + if (this->swork[17] == 2) { *dList = NULL; } - scale = boss->fwork[17]; + scale = this->fwork[17]; break; + case 6: - if (boss->swork[19] == 1) { + if (this->swork[19] == 1) { *dList = D_ANDROSS_C002F00; } - if (boss->swork[19] == 2) { + if (this->swork[19] == 2) { *dList = NULL; } - scale = boss->fwork[17]; + scale = this->fwork[17]; break; + case 1: - if (boss->swork[14] != 0) { + if (this->swork[14] != 0) { *dList = NULL; } break; + case 2: - if (boss->swork[13] != 0) { + if (this->swork[13] != 0) { *dList = NULL; } break; + case 7: - if (boss->swork[20] != 0) { + if (this->swork[20] != 0) { *dList = NULL; } - scale = boss->fwork[18]; + scale = this->fwork[18]; break; + case 8: - if (boss->swork[21] != 0) { + if (this->swork[21] != 0) { *dList = NULL; } - scale = boss->fwork[18]; + scale = this->fwork[18]; break; + case 9: - if (boss->swork[23] != 0) { + if (this->swork[23] != 0) { *dList = NULL; } - scale = boss->fwork[18]; + scale = this->fwork[18]; break; + case 10: - if (boss->swork[22] != 0) { + if (this->swork[22] != 0) { *dList = NULL; } - scale = boss->fwork[18]; + scale = this->fwork[18]; break; + case 11: - if (boss->swork[16] != 0) { + if (this->swork[16] != 0) { *dList = NULL; } break; + case 12: - if (boss->swork[15] != 0) { + if (this->swork[15] != 0) { *dList = NULL; } break; + case 49: - pos->x -= boss->fwork[11]; - pos->y += boss->fwork[12]; - pos->z += boss->fwork[13]; + pos->x -= this->fwork[11]; + pos->y += this->fwork[12]; + pos->z += this->fwork[13]; + Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, MTXF_APPLY); + if (*dList != NULL) { Matrix_Push(&gGfxMatrix); Matrix_Push(&gCalcMatrix); @@ -2958,6 +3305,7 @@ bool Andross_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, *dList); RCP_SetupDL(&gMasterDisp, SETUPDL_41); + switch (gGameFrameCount % 4U) { case 0: gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); @@ -2972,6 +3320,7 @@ bool Andross_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); break; } + Matrix_Translate(gGfxMatrix, D_i6_801A67DC.x, D_i6_801A67DC.y, D_i6_801A67DC.z, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, D_i6_801A67F0 * M_DTOR, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, D_i6_801A67EC * M_DTOR, MTXF_APPLY); @@ -2982,14 +3331,18 @@ bool Andross_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* Matrix_Pop(&gCalcMatrix); } return true; + case 50: - pos->x -= boss->fwork[11]; - pos->y += boss->fwork[12]; - pos->z -= boss->fwork[13]; + pos->x -= this->fwork[11]; + pos->y += this->fwork[12]; + pos->z -= this->fwork[13]; + Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, MTXF_APPLY); + if (*dList != NULL) { Matrix_Push(&gGfxMatrix); Matrix_Push(&gCalcMatrix); @@ -2997,6 +3350,7 @@ bool Andross_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, *dList); RCP_SetupDL(&gMasterDisp, SETUPDL_41); + switch (gGameFrameCount % 4U) { case 0: gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); @@ -3011,6 +3365,7 @@ bool Andross_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); break; } + Matrix_Translate(gGfxMatrix, D_i6_801A67C4.x, D_i6_801A67C4.y, D_i6_801A67C4.z, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, D_i6_801A67D8 * M_DTOR, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, D_i6_801A67D4 * M_DTOR, MTXF_APPLY); @@ -3021,16 +3376,20 @@ bool Andross_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* Matrix_Pop(&gCalcMatrix); } return true; + default: break; } Matrix_Translate(gCalcMatrix, pos->x, pos->y, pos->z, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, rot->z * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, rot->y * M_DTOR, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, MTXF_APPLY); + Matrix_Push(&gCalcMatrix); Matrix_Scale(gCalcMatrix, scale, scale, scale, MTXF_APPLY); + if (*dList != NULL) { Matrix_MultVec3f(gCalcMatrix, &sp94, &sp88); Display_SetSecondLight(&sp88); @@ -3042,7 +3401,7 @@ bool Andross_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return true; } -void Andross_801924B4(s32 limbIndex, Vec3f* rot, void* data) { +void Andross_801924B4(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp94 = { 0.0f, 0.0f, 0.0f }; Vec3f sp88 = { 33.0f, 0.0f, 0.0f }; Vec3f sp7C = { 20.0f, 0.0f, 0.0f }; @@ -3053,101 +3412,104 @@ void Andross_801924B4(s32 limbIndex, Vec3f* rot, void* data) { Vec3f sp40 = { 10.0f, -2.0f, 2.0f }; Vec3f sp34 = { 10.0f, -2.0f, 2.0f }; Vec3f sp28 = { -80.0f, 0.0f, 0.0f }; - Boss* boss = (Boss*) data; + Boss* this = (Boss*) thisx; switch (limbIndex) { case 3: - Matrix_MultVec3f(gCalcMatrix, &sp7C, &boss->vwork[2]); + Matrix_MultVec3f(gCalcMatrix, &sp7C, &this->vwork[2]); break; case 4: - Matrix_MultVec3f(gCalcMatrix, &sp7C, &boss->vwork[3]); + Matrix_MultVec3f(gCalcMatrix, &sp7C, &this->vwork[3]); break; case 5: - Matrix_MultVec3f(gCalcMatrix, &sp4C, &boss->vwork[6]); - Matrix_MultVec3f(gCalcMatrix, &sp58, &boss->vwork[7]); + Matrix_MultVec3f(gCalcMatrix, &sp4C, &this->vwork[6]); + Matrix_MultVec3f(gCalcMatrix, &sp58, &this->vwork[7]); break; case 12: - Matrix_MultVec3f(gCalcMatrix, &sp34, &boss->vwork[9]); + Matrix_MultVec3f(gCalcMatrix, &sp34, &this->vwork[9]); break; case 11: - Matrix_MultVec3f(gCalcMatrix, &sp40, &boss->vwork[8]); + Matrix_MultVec3f(gCalcMatrix, &sp40, &this->vwork[8]); break; case 20: - Matrix_MultVec3f(gCalcMatrix, &sp70, &boss->vwork[0]); + Matrix_MultVec3f(gCalcMatrix, &sp70, &this->vwork[0]); break; case 28: - Matrix_MultVec3f(gCalcMatrix, &sp64, &boss->vwork[1]); + Matrix_MultVec3f(gCalcMatrix, &sp64, &this->vwork[1]); break; case 25: - Matrix_MultVec3f(gCalcMatrix, &sp88, &boss->vwork[10]); + Matrix_MultVec3f(gCalcMatrix, &sp88, &this->vwork[10]); break; } - if (boss->state >= 30) { + + if (this->state >= 30) { switch (limbIndex) { case 1: - Matrix_MultVec3f(gCalcMatrix, &sp94, &boss->vwork[16]); + Matrix_MultVec3f(gCalcMatrix, &sp94, &this->vwork[16]); return; case 2: - Matrix_MultVec3f(gCalcMatrix, &sp94, &boss->vwork[15]); + Matrix_MultVec3f(gCalcMatrix, &sp94, &this->vwork[15]); return; case 3: - Matrix_MultVec3f(gCalcMatrix, &sp94, &boss->vwork[13]); + Matrix_MultVec3f(gCalcMatrix, &sp94, &this->vwork[13]); return; case 4: - Matrix_MultVec3f(gCalcMatrix, &sp94, &boss->vwork[14]); + Matrix_MultVec3f(gCalcMatrix, &sp94, &this->vwork[14]); return; case 5: - Matrix_MultVec3f(gCalcMatrix, &sp94, &boss->vwork[19]); + Matrix_MultVec3f(gCalcMatrix, &sp94, &this->vwork[19]); return; case 6: - Matrix_MultVec3f(gCalcMatrix, &sp94, &boss->vwork[21]); + Matrix_MultVec3f(gCalcMatrix, &sp94, &this->vwork[21]); return; case 7: - Matrix_MultVec3f(gCalcMatrix, &sp94, &boss->vwork[22]); + Matrix_MultVec3f(gCalcMatrix, &sp94, &this->vwork[22]); return; case 8: - Matrix_MultVec3f(gCalcMatrix, &sp94, &boss->vwork[23]); + Matrix_MultVec3f(gCalcMatrix, &sp94, &this->vwork[23]); return; case 9: - Matrix_MultVec3f(gCalcMatrix, &sp94, &boss->vwork[25]); + Matrix_MultVec3f(gCalcMatrix, &sp94, &this->vwork[25]); return; case 10: - Matrix_MultVec3f(gCalcMatrix, &sp94, &boss->vwork[24]); + Matrix_MultVec3f(gCalcMatrix, &sp94, &this->vwork[24]); return; case 11: - Matrix_MultVec3f(gCalcMatrix, &sp28, &boss->vwork[18]); + Matrix_MultVec3f(gCalcMatrix, &sp28, &this->vwork[18]); return; case 12: - Matrix_MultVec3f(gCalcMatrix, &sp28, &boss->vwork[17]); + Matrix_MultVec3f(gCalcMatrix, &sp28, &this->vwork[17]); break; } } } -void Andross_Boss320_Draw(Boss* boss) { +void Andross_AndAndross_Draw(AndAndross* this) { + if (this->timer_058 == 0) { + if (1) {} //! FAKE - if (boss->timer_058 == 0) { - // FAKE - if (1) {} PRINTF("Enm->count %d\n"); - if (boss->state < 2) { + + if (this->state < 2) { Lights_SetOneLight(&gMasterDisp, gLight1x, gLight1y, gLight1z, D_i6_801A7F5C, D_i6_801A7F64, D_i6_801A7F6C, D_i6_801A7F74, D_i6_801A7F7C, D_i6_801A8430); } + Matrix_Scale(gCalcMatrix, 10.0f, 10.0f, 10.0f, MTXF_APPLY); - Animation_DrawSkeleton(2, D_ANDROSS_C01CC3C, D_i6_801A7F80, Andross_801917F0, Andross_801924B4, boss, + Animation_DrawSkeleton(2, D_ANDROSS_C01CC3C, D_i6_801A7F80, Andross_801917F0, Andross_801924B4, this, gCalcMatrix); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - if (boss->fwork[20] > 0.05f) { - Matrix_Translate(gGfxMatrix, boss->vwork[10].x, boss->vwork[10].y, boss->vwork[10].z + gPathProgress, + + if (this->fwork[20] > 0.05f) { + Matrix_Translate(gGfxMatrix, this->vwork[10].x, this->vwork[10].y, this->vwork[10].z + gPathProgress, MTXF_APPLY); - if (boss->fwork[21] > 0.05f) { + if (this->fwork[21] > 0.05f) { Matrix_Push(&gGfxMatrix); RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 192); gDPSetEnvColor(gMasterDisp++, 255, 0, 128, 192); - Matrix_Scale(gGfxMatrix, boss->fwork[21] * 7.0f, boss->fwork[21] * 7.0f, boss->fwork[21] * 7.0f, + Matrix_Scale(gGfxMatrix, this->fwork[21] * 7.0f, this->fwork[21] * 7.0f, this->fwork[21] * 7.0f, MTXF_APPLY); if ((gGameFrameCount % 2) != 0) { Matrix_Scale(gGfxMatrix, 1.1f, 1.1f, 1.1f, MTXF_APPLY); @@ -3156,15 +3518,18 @@ void Andross_Boss320_Draw(Boss* boss) { gSPDisplayList(gMasterDisp++, D_1024AC0); Matrix_Pop(&gGfxMatrix); } - Matrix_Scale(gGfxMatrix, boss->fwork[20] * 10.0f, boss->fwork[20] * 10.0f, boss->fwork[20] * 10.0f, + + Matrix_Scale(gGfxMatrix, this->fwork[20] * 10.0f, this->fwork[20] * 10.0f, this->fwork[20] * 10.0f, MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, boss->fwork[19] * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, this->fwork[19] * M_DTOR, MTXF_APPLY); RCP_SetupDL(&gMasterDisp, SETUPDL_64); + if ((gGameFrameCount % 2) != 0) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 128); } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 30); } + Matrix_Push(&gGfxMatrix); Matrix_RotateZ(gGfxMatrix, 0.0f, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, 15.0f * M_DTOR, MTXF_APPLY); @@ -3195,78 +3560,77 @@ void Andross_Boss320_Draw(Boss* boss) { } } -void Andross_Actor285_Update(Actor* actor) { +void Andross_AndLaserEmitter_Update(AndLaserEmitter* this) { Actor* otherActor; s32 i; - switch (actor->state) { + switch (this->state) { case 0: - if (actor->obj.pos.x >= 0.0f) { - actor->state = 1; + if (this->obj.pos.x >= 0.0f) { + this->state = 1; } else { - actor->state = 2; + this->state = 2; } - actor->vwork[0].x = actor->obj.pos.x; - actor->vwork[0].y = actor->obj.pos.y - 300.0f; - actor->vwork[0].z = actor->obj.pos.z; - actor->health = 30; - actor->rot_0F4.z = actor->obj.rot.z; - AUDIO_PLAY_SFX(NA_SE_OB_SPARK_BEAM, actor->sfxSource, 0); + this->vwork[0].x = this->obj.pos.x; + this->vwork[0].y = this->obj.pos.y - 300.0f; + this->vwork[0].z = this->obj.pos.z; + this->health = 30; + this->rot_0F4.z = this->obj.rot.z; + AUDIO_PLAY_SFX(NA_SE_OB_SPARK_BEAM, this->sfxSource, 0); break; + case 1: otherActor = gActors; for (i = 0; i < ARRAY_COUNT(gActors); i++, otherActor++) { - if ((i != actor->index) && (otherActor->obj.status == OBJ_ACTIVE) && - (otherActor->obj.id == OBJ_ACTOR_285) && - (fabsf(otherActor->obj.pos.z - actor->obj.pos.z) < 200.0f)) { - actor->timer_0BC = 5; + if ((i != this->index) && (otherActor->obj.status == OBJ_ACTIVE) && + (otherActor->obj.id == OBJ_ACTOR_AND_LASER_EMITTER) && + (fabsf(otherActor->obj.pos.z - this->obj.pos.z) < 200.0f)) { + this->timer_0BC = 5; otherActor->timer_0BC = 5; - gTexturedLines[actor->index].mode = 50; - gTexturedLines[actor->index].xyScale = 1.0f; - gTexturedLines[actor->index].posAA.x = actor->obj.pos.x; - gTexturedLines[actor->index].posAA.y = actor->obj.pos.y; - gTexturedLines[actor->index].posAA.z = actor->obj.pos.z; - gTexturedLines[actor->index].posBB.x = otherActor->obj.pos.x; - gTexturedLines[actor->index].posBB.y = otherActor->obj.pos.y; - gTexturedLines[actor->index].posBB.z = otherActor->obj.pos.z; - gTexturedLines[actor->index].timer = 3; + gTexturedLines[this->index].mode = 50; + gTexturedLines[this->index].xyScale = 1.0f; + gTexturedLines[this->index].posAA.x = this->obj.pos.x; + gTexturedLines[this->index].posAA.y = this->obj.pos.y; + gTexturedLines[this->index].posAA.z = this->obj.pos.z; + gTexturedLines[this->index].posBB.x = otherActor->obj.pos.x; + gTexturedLines[this->index].posBB.y = otherActor->obj.pos.y; + gTexturedLines[this->index].posBB.z = otherActor->obj.pos.z; + gTexturedLines[this->index].timer = 3; break; } } /* fallthrough */ case 2: - actor->obj.rot.z = actor->rot_0F4.z + D_Andross_801A7F68; + this->obj.rot.z = this->rot_0F4.z + D_Andross_801A7F68; Matrix_RotateZ(gCalcMatrix, M_DTOR * D_Andross_801A7F68, MTXF_NEW); - Matrix_MultVec3fNoTranslate(gCalcMatrix, actor->vwork, &actor->obj.pos); - actor->obj.pos.y += 300.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, this->vwork, &this->obj.pos); + this->obj.pos.y += 300.0f; break; } - if (actor->dmgType != DMG_NONE) { - actor->dmgType = DMG_NONE; - actor->health -= actor->damage; - if (actor->health <= 0) { - func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 5.0f); + if (this->dmgType != DMG_NONE) { + this->dmgType = DMG_NONE; + this->health -= this->damage; + if (this->health <= 0) { + func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 5.0f); for (i = 0; i < 7; i++) { - func_effect_80079618(RAND_FLOAT_CENTERED(10.0f) + actor->obj.pos.x, - RAND_FLOAT_CENTERED(10.0f) + actor->obj.pos.y, actor->obj.pos.z, + func_effect_80079618(RAND_FLOAT_CENTERED(10.0f) + this->obj.pos.x, + RAND_FLOAT_CENTERED(10.0f) + this->obj.pos.y, this->obj.pos.z, RAND_FLOAT(0.5f) + 0.5f); } - Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); - Object_Kill(&actor->obj, actor->sfxSource); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); + Object_Kill(&this->obj, this->sfxSource); } } } -void Andross_Actor285_Draw(Actor* actor) { +void Andross_AndLaserEmitter_Draw(AndLaserEmitter* this) { gSPDisplayList(gMasterDisp++, D_VE2_6007E20); - if (actor->timer_0BC != 0) { - f32 scale; - u8 alpha; + if (this->timer_0BC != 0) { + f32 scale = 2.5f; + u8 alpha = 16; - scale = 2.5f; - alpha = 16; if ((gGameFrameCount % 2) != 0) { alpha = 64; scale *= 1.2f; @@ -3281,78 +3645,79 @@ void Andross_Actor285_Draw(Actor* actor) { } } -void Andross_Scenery132_Update(Scenery* scenery) { +void Andross_AndDoor_Update(AndDoor* this) { - switch (scenery->state) { + switch (this->state) { case 0: - if (fabsf(scenery->obj.pos.z - gPlayer[0].trueZpos) < 1800.0f) { - scenery->state = 1; - scenery->info.hitbox = SEGMENTED_TO_VIRTUAL(D_ANDROSS_C038AC4); + if (fabsf(this->obj.pos.z - gPlayer[0].trueZpos) < 1800.0f) { + this->state = 1; + this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_ANDROSS_C038AC4); } break; + case 1: - scenery->info.hitbox[7] = -130.0f - (scenery->unk_44 * 1.6f); - scenery->info.hitbox[17] = -130.0f - (scenery->unk_44 * 1.6f); - scenery->info.hitbox[27] = -130.0f - (scenery->unk_44 * 1.6f); - scenery->unk_44 += 2; - if (scenery->unk_44 >= Animation_GetFrameCount(&D_VE2_6014658)) { - scenery->unk_44 = Animation_GetFrameCount(&D_VE2_6014658) - 1; + this->info.hitbox[7] = -130.0f - (this->unk_44 * 1.6f); + this->info.hitbox[17] = -130.0f - (this->unk_44 * 1.6f); + this->info.hitbox[27] = -130.0f - (this->unk_44 * 1.6f); + this->unk_44 += 2; + if (this->unk_44 >= Animation_GetFrameCount(&D_VE2_6014658)) { + this->unk_44 = Animation_GetFrameCount(&D_VE2_6014658) - 1; } break; } - scenery->obj.rot.z = D_Andross_801A7F68; + this->obj.rot.z = D_Andross_801A7F68; } -bool Andross_801934EC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { +bool Andross_801934EC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { if (limbIndex == 13) { *dList = NULL; } return false; } -void Andross_Scenery132_Draw(Scenery* scenery) { +void Andross_AndDoor_Draw(AndDoor* this) { Vec3f frameTable[20]; - Animation_GetFrameData(&D_VE2_6014658, scenery->unk_44, frameTable); + Animation_GetFrameData(&D_VE2_6014658, this->unk_44, frameTable); Animation_DrawSkeleton(1, D_VE2_6014844, frameTable, Andross_801934EC, NULL, NULL, &gIdentityMatrix); } -void Andross_Scenery131_Update(Scenery* scenery) { - scenery->obj.rot.z = D_Andross_801A7F68; - scenery->obj.pos.z += scenery->effectVel.z; - if (scenery->timer_4C == 1) { - Object_Kill(&scenery->obj, scenery->sfxSource); +void Andross_AndPassage_Update(AndPassage* this) { + this->obj.rot.z = D_Andross_801A7F68; + this->obj.pos.z += this->effectVel.z; + if (this->timer_4C == 1) { + Object_Kill(&this->obj, this->sfxSource); } } -bool Andross_801935B4(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { +bool Andross_801935B4(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { if (limbIndex != 13) { *dList = NULL; } return false; } -void Andross_Scenery131_Draw(Scenery* scenery) { +void Andross_AndPassage_Draw(AndPassage* this) { Vec3f frameTable[20]; - Animation_GetFrameData(&D_VE2_6014658, scenery->unk_44, frameTable); + Animation_GetFrameData(&D_VE2_6014658, this->unk_44, frameTable); if (gLevelMode == LEVELMODE_ALL_RANGE) { gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); } Animation_DrawSkeleton(1, D_VE2_6014844, frameTable, Andross_801935B4, NULL, NULL, &gIdentityMatrix); } -void Andross_80193668(Scenery* scenery, f32 xPos, f32 yPos, f32 zPos, s32 arg4) { - Scenery_Initialize(scenery); - scenery->obj.status = OBJ_ACTIVE; - scenery->obj.id = OBJ_SCENERY_131; - scenery->obj.pos.x = xPos; - scenery->obj.pos.y = yPos; - scenery->obj.pos.z = zPos; - scenery->effectVel.z = -40.0f; - Object_SetInfo(&scenery->info, scenery->obj.id); - scenery->timer_4C = (arg4 * 50) + 100; - scenery->info.cullDistance = 100000.0f; +void Andross_AndPassage_Setup(AndPassage* this, f32 xPos, f32 yPos, f32 zPos, s32 arg4) { + Scenery_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_SCENERY_AND_PASSAGE; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + this->effectVel.z = -40.0f; + Object_SetInfo(&this->info, this->obj.id); + this->timer_4C = (arg4 * 50) + 100; + this->info.cullDistance = 100000.0f; } void Andross_80193710(void) { @@ -3402,7 +3767,7 @@ void Andross_80193710(void) { boss = &gBosses[0]; Boss_Initialize(boss); boss->obj.status = OBJ_INIT; - boss->obj.id = OBJ_BOSS_VE2; + boss->obj.id = OBJ_BOSS_VE2_BASE; Object_SetInfo(&boss->info, boss->obj.id); } @@ -3419,6 +3784,7 @@ void Andross_801939A0(s32 actorIndex) { actor->rot_0F4.x = 90.0f; actor->fwork[0] = 50.0f; actor->fwork[1] = 6.5f; + if (actorIndex == 10) { actor->iwork[14] = 1; } @@ -3427,6 +3793,7 @@ void Andross_801939A0(s32 actorIndex) { actor->unk_046 = 255; actor->animFrame = 1000; } + Object_SetInfo(&actor->info, actor->obj.id); AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); @@ -3445,10 +3812,13 @@ void Andross_80193AE4(s32 actorIndex) { Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; actor->obj.id = OBJ_ACTOR_CUTSCENE; + actor->obj.pos.x = D_i6_801A6878[actorIndex].x; actor->obj.pos.y = D_i6_801A6878[actorIndex].y; actor->obj.pos.z = D_i6_801A6878[actorIndex].z; + Object_SetInfo(&actor->info, actor->obj.id); + if (actorIndex == 0) { actor->state = 200; actor->animFrame = 1; @@ -3486,7 +3856,9 @@ void Andross_80193C4C(Player* player) { s32 temp_v0_2; Math_SmoothStepToF(D_ctx_80177A48, 1.0f, 1.0f, 0.01f, 0.0f); + player->wings.unk_04 = player->wings.unk_08 = player->wings.unk_0C = player->wings.unk_10 = 0.0f; + switch (player->csState) { case 0: gCsFrameCount = 0; @@ -3507,6 +3879,7 @@ void Andross_80193C4C(Player* player) { Math_SmoothStepToF(&player->vel.y, 0.0f, 1.0f, 3.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.x, player->pos.x, 0.1f, 15.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.y, player->pos.y + 30.0f, 0.1f, 15.0f, 0.0f); + if (player->csTimer == 0) { player->pos.y += SIN_DEG(player->rot.x) * 15.0f; Math_SmoothStepToF(&player->rot.x, 180.0f, 0.1f, 5.0f, 0.0f); @@ -3516,19 +3889,22 @@ void Andross_80193C4C(Player* player) { Math_SmoothStepToF(&player->rot.x, 0.0f, 0.1f, 10.0f, 0.0f); } player->cam.eye.z += player->vel.z * 0.5f; + switch (gCsFrameCount) { case 80: - func_effect_8007A568(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 40.0f); + Effect_Effect383_Spawn(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 40.0f); Effect_SpawnTimedSfxAtPos(&boss->obj.pos, NA_SE_EN_EXPLOSION_L); /* fallthrough */ case 85: case 90: - func_effect_8007B344(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 250.0f, 6); + Effect_Effect384_Spawn(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 250.0f, 6); break; + case 86: Object_Kill(&boss->obj, boss->sfxSource); gDrawBackdrop = 0; break; + case 111: player->csState = 2; AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, player->sfxSource, 0); @@ -3547,12 +3923,14 @@ void Andross_80193C4C(Player* player) { gCsCamAtZ = gBosses[0].obj.pos.z + gPathProgress; Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f); break; + case 2: player->unk_190 = D_ctx_80177A48[8]; sp90 = 0; sp68.x = RAND_FLOAT_CENTERED(150.0f); sp68.y = RAND_FLOAT_CENTERED(150.0f); sp68.z = 0.0f; + if (gCsFrameCount == 50) { AUDIO_PLAY_SFX(NA_SE_OB_ROUTE_EXPLOSION0, player->sfxSource, 0); Audio_SetEnvSfxReverb(0); @@ -3581,8 +3959,10 @@ void Andross_80193C4C(Player* player) { sp74.z = 0.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp74, &sp68); } + Math_SmoothStepToF(&D_ctx_80177A48[5], 3.0f, 1.0f, 0.05f, 0.0f); player->cam.eye.z += player->vel.z * D_ctx_80177A48[2]; + if (gCsFrameCount > 230) { player->camDist -= 7.0f; } @@ -3592,18 +3972,20 @@ void Andross_80193C4C(Player* player) { } for (i = 0; i < sp90; i++) { - func_effect_8007797C(player->pos.x + sp68.x, player->pos.y + sp68.y, - player->pos.z - (D_ctx_80177A48[3] + D_ctx_80177A48[4]), 0.0f, 0.0f, 50.0f, - RAND_FLOAT(2.5f) + 2.5f); + Effect_FireSmoke_Spawn2(player->pos.x + sp68.x, player->pos.y + sp68.y, + player->pos.z - (D_ctx_80177A48[3] + D_ctx_80177A48[4]), 0.0f, 0.0f, 50.0f, + RAND_FLOAT(2.5f) + 2.5f); } Math_SmoothStepToF(&player->cam.eye.x, D_ctx_80177A48[1] + player->pos.x, 0.1f, 15.0f, 0.0f); Math_SmoothStepToF(&player->cam.eye.y, player->pos.y + 30.0f, 0.1f, 15.0f, 0.0f); Math_SmoothStepToF(&player->rot.z, -180.0f, 0.02f, D_ctx_80177A48[6], 0.0f); Math_SmoothStepToF(&D_ctx_80177A48[6], 3.0f, 1.0f, 0.05f, 0.0f); + gCsCamAtX = player->pos.x; gCsCamAtY = player->pos.y; gCsCamAtZ = player->trueZpos + gPathProgress; + if (gCsFrameCount > 200) { player->contrailScale += 0.03f; if (player->contrailScale > 0.6f) { @@ -3622,15 +4004,18 @@ void Andross_80193C4C(Player* player) { } } break; + case 25: for (i = 0; i < 12; i++) { - Andross_80193668(&gScenery[i], player->pos.x, player->pos.y, - player->cam.eye.z - gPathProgress + (2195.0f * i), i); + Andross_AndPassage_Setup(&gScenery[i], player->pos.x, player->pos.y, + player->cam.eye.z - gPathProgress + (2195.0f * i), i); } break; + case 150: AUDIO_PLAY_SFX(NA_SE_WARP_HOLE, gDefaultSfxSource, 0); break; + case 340: Audio_KillSfxBySourceAndId(player->sfxSource, NA_SE_OB_ROUTE_EXPLOSION0); Audio_SetEnvSfxReverb(0); @@ -3652,10 +4037,12 @@ void Andross_80193C4C(Player* player) { player->draw = false; D_ctx_80177A48[0] = 1.0f; Play_ClearObjectData(); + gScenery360 = Memory_Allocate(200 * sizeof(Scenery360)); for (i = 0; i < 200; i++) { gScenery360[i].obj.status = OBJ_FREE; } + Andross_80193710(); D_ctx_8017782C = true; Play_InitEnvironment(); @@ -3667,6 +4054,7 @@ void Andross_80193C4C(Player* player) { break; } break; + case 3: if (player->csTimer == 0) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; @@ -3688,9 +4076,9 @@ void Andross_80193C4C(Player* player) { } if (gCsFrameCount > 40) { for (i = 0; i < 3; i++) { - func_effect_8007797C(boss->obj.pos.x + RAND_FLOAT_CENTERED(150.0f), boss->obj.pos.y + 500.0f, - boss->obj.pos.z + RAND_FLOAT_CENTERED(150.0f), RAND_FLOAT_CENTERED(10.0f), - 60.0f, RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT(5.5f) + 5.5f); + Effect_FireSmoke_Spawn2(boss->obj.pos.x + RAND_FLOAT_CENTERED(150.0f), boss->obj.pos.y + 500.0f, + boss->obj.pos.z + RAND_FLOAT_CENTERED(150.0f), RAND_FLOAT_CENTERED(10.0f), + 60.0f, RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT(5.5f) + 5.5f); } Math_SmoothStepToF(&gCsCamAtY, gActors[10].obj.pos.y, 1.0f, D_ctx_80177A48[1], 0.0f); Math_SmoothStepToF(&D_ctx_80177A48[1], 1000.0f, 1.0f, 5.0f, 0.0f); @@ -3727,8 +4115,10 @@ void Andross_80193C4C(Player* player) { } } break; + case 4: player->camRoll += D_ctx_80177A48[3]; + if (gCsFrameCount > 190) { Math_SmoothStepToF(&D_ctx_80177A48[3], 0.3f, 0.05f, 0.02f, 0.0f); } @@ -3743,28 +4133,35 @@ void Andross_80193C4C(Player* player) { gLight1R = D_i6_801A7F40; gLight1G = D_i6_801A7F44; gLight1B = D_i6_801A7F48; + gAmbientR = D_i6_801A7F4C; gAmbientG = D_i6_801A7F50; gAmbientB = D_i6_801A7F54; + Math_SmoothStepToF(&D_ctx_80177A48[1], -5000.0f, 0.05f, 15.0f, 0.0f); + player->cam.eye.x = gActors[10].obj.pos.x + 50.0f; player->cam.eye.y = gActors[10].obj.pos.y + D_ctx_80177A48[1]; player->cam.eye.z = gActors[10].obj.pos.z; + gCsCamAtX = gActors[10].obj.pos.x; gCsCamAtY = gActors[10].obj.pos.y + 50.0f; gCsCamAtZ = gActors[10].obj.pos.z; + if (((gGameFrameCount % 4) == 0) && (gCsFrameCount < 215)) { - func_effect_8007797C(boss->obj.pos.x + RAND_FLOAT_CENTERED(350.0f), boss->obj.pos.y + 500.0f, - boss->obj.pos.z + RAND_FLOAT_CENTERED(350.0f), RAND_FLOAT_CENTERED(10.0f), 60.0f, - RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT(5.5f) + 15.5f); + Effect_FireSmoke_Spawn2(boss->obj.pos.x + RAND_FLOAT_CENTERED(350.0f), boss->obj.pos.y + 500.0f, + boss->obj.pos.z + RAND_FLOAT_CENTERED(350.0f), RAND_FLOAT_CENTERED(10.0f), + 60.0f, RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT(5.5f) + 15.5f); } sp80 = RAND_FLOAT(40.0f); for (i = 0; i < 36; i += 4) { sp8C = __sinf((i * 10.0f * M_DTOR) + sp80) * D_ctx_80177A48[2]; sp84 = __cosf((i * 10.0f * M_DTOR) + sp80) * D_ctx_80177A48[2]; - func_effect_8007797C(sp8C, 300.0f, sp84, 0.0f, 0.0f, 0.0f, RAND_FLOAT(5.5f) + 15.5f); + Effect_FireSmoke_Spawn2(sp8C, 300.0f, sp84, 0.0f, 0.0f, 0.0f, RAND_FLOAT(5.5f) + 15.5f); } + Math_SmoothStepToF(&D_ctx_80177A48[2], 10000.0f, 0.05f, 20.0f, 0.0f); + if (gCsFrameCount == 220) { Andross_80193AE4(0); if (gTeamShields[TEAM_ID_FALCO] > 0) { @@ -3812,10 +4209,12 @@ void Andross_80193C4C(Player* player) { gLevelClearScreenTimer = 100; } break; + case 5: if (player->csTimer == 1) { gFillScreenAlpha = gFillScreenAlphaTarget = 0; } + if (gVenomHardClear != 0) { if (gCsFrameCount >= 1000) { gCsCamAtX += D_ctx_80177A48[4] * 0.15f; @@ -3885,6 +4284,7 @@ void Andross_80193C4C(Player* player) { Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0); Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0); } + if (gVenomHardClear != 0) { switch (gCsFrameCount) { case 400: @@ -3952,6 +4352,7 @@ void Andross_80193C4C(Player* player) { } } break; + case 100: gPlayerGlareAlphas[0] -= 4; if (gPlayerGlareAlphas[0] > 255) { @@ -3960,13 +4361,17 @@ void Andross_80193C4C(Player* player) { Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -((player->xRot_120 + player->rot.x + player->aerobaticPitch) * M_DTOR), MTXF_APPLY); + sp74.x = 0.0f; sp74.y = 0.0f; sp74.z = player->baseSpeed; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp74, &sp68); + player->vel.x = sp68.x; player->vel.z = sp68.z; player->vel.y = sp68.y; + if (player->csTimer == 0) { player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_014 = 0.2f; @@ -3975,6 +4380,7 @@ void Andross_80193C4C(Player* player) { gDrawBackdrop = 6; gProjectFar = 12800.0f; } + D_ctx_80177A48[0] = 1.0f; gCsCamAtX = (2.0f * SIN_DEG(gGameFrameCount * 40.0f)) + player->pos.x; gCsCamAtY = (2.0f * SIN_DEG(gGameFrameCount * 30.0f)) + player->pos.y; @@ -4006,65 +4412,75 @@ void Andross_80193C4C(Player* player) { Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0); } -void Andross_80195E44(Actor* actor) { +void Andross_80195E44(ActorCutscene* this) { Vec3f sp44; Vec3f sp38; f32 sp34; sp34 = 0.0f; - switch (actor->state) { + switch (this->state) { case 0: - actor->rot_0F4.z += actor->fwork[1]; + this->rot_0F4.z += this->fwork[1]; if (gCsFrameCount > 250) { - Math_SmoothStepToF(&actor->fwork[1], 0.5f, 0.1f, 0.04f, 0.0f); + Math_SmoothStepToF(&this->fwork[1], 0.5f, 0.1f, 0.04f, 0.0f); } else { - Math_SmoothStepToF(&actor->fwork[1], -2.0f, 0.1f, 0.04f, 0.0f); + Math_SmoothStepToF(&this->fwork[1], -2.0f, 0.1f, 0.04f, 0.0f); } break; + case 1: - actor->rot_0F4.z += actor->fwork[1]; - Math_SmoothStepToF(&actor->fwork[1], -2.0f, 0.1f, 0.04f, 0.0f); + this->rot_0F4.z += this->fwork[1]; + Math_SmoothStepToF(&this->fwork[1], -2.0f, 0.1f, 0.04f, 0.0f); if (gCsFrameCount == 55) { - actor->state++; + this->state++; } break; + case 2: - Math_SmoothStepToF(&actor->rot_0F4.x, 180.0f, 0.1f, 1.0f, 0.0f); - Math_SmoothStepToF(&actor->rot_0F4.y, 200.0f, 0.1f, 1.0f, 0.0f); - actor->unk_046 -= 5; - if (actor->unk_046 < 0) { - actor->unk_046 = 0; - Object_Kill(&actor->obj, actor->sfxSource); + Math_SmoothStepToF(&this->rot_0F4.x, 180.0f, 0.1f, 1.0f, 0.0f); + Math_SmoothStepToF(&this->rot_0F4.y, 200.0f, 0.1f, 1.0f, 0.0f); + this->unk_046 -= 5; + if (this->unk_046 < 0) { + this->unk_046 = 0; + Object_Kill(&this->obj, this->sfxSource); } break; + case 101: - Math_SmoothStepToF(&actor->rot_0F4.z, 0.0f, 0.03f, 0.5f, 0.0f); - Math_SmoothStepToF(&actor->obj.pos.x, 0.0f, 0.03f, 5.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.pos.y, 15000.0f, 0.03f, 5.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.pos.z, 0.0f, 0.03f, 5.0f, 0.0f); + Math_SmoothStepToF(&this->rot_0F4.z, 0.0f, 0.03f, 0.5f, 0.0f); + Math_SmoothStepToF(&this->obj.pos.x, 0.0f, 0.03f, 5.0f, 0.0f); + Math_SmoothStepToF(&this->obj.pos.y, 15000.0f, 0.03f, 5.0f, 0.0f); + Math_SmoothStepToF(&this->obj.pos.z, 0.0f, 0.03f, 5.0f, 0.0f); break; + case 100: - actor->fwork[7] += 3.0f; - actor->rot_0F4.z = SIN_DEG(actor->fwork[7]) * 1.5f; - actor->fwork[8] += 2.0f; - sp34 = SIN_DEG(actor->fwork[8]) * 0.5f; + this->fwork[7] += 3.0f; + this->rot_0F4.z = SIN_DEG(this->fwork[7]) * 1.5f; + this->fwork[8] += 2.0f; + sp34 = SIN_DEG(this->fwork[8]) * 0.5f; break; + case 200: break; } - Matrix_RotateY(gCalcMatrix, (actor->rot_0F4.y + 180.0f) * M_DTOR, 0U); - Matrix_RotateX(gCalcMatrix, -(actor->rot_0F4.x * M_DTOR), 1U); + + Matrix_RotateY(gCalcMatrix, (this->rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, -(this->rot_0F4.x * M_DTOR), MTXF_APPLY); + sp44.x = 0.0f; sp44.y = 0.0f; - sp44.z = actor->fwork[0]; + sp44.z = this->fwork[0]; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); - actor->vel.x = sp38.x; - actor->vel.y = sp38.y + sp34; - actor->vel.z = sp38.z; - actor->obj.rot.x = -actor->rot_0F4.x; - actor->obj.rot.y = actor->rot_0F4.y + 180.0f; - actor->obj.rot.z = -actor->rot_0F4.z; + + this->vel.x = sp38.x; + this->vel.y = sp38.y + sp34; + this->vel.z = sp38.z; + + this->obj.rot.x = -this->rot_0F4.x; + this->obj.rot.y = this->rot_0F4.y + 180.0f; + this->obj.rot.z = -this->rot_0F4.z; } void Andross_801961AC(void) { @@ -4073,7 +4489,7 @@ void Andross_801961AC(void) { Boss_Initialize(boss); boss->obj.status = OBJ_ACTIVE; boss->state = 21; - boss->obj.id = OBJ_BOSS_321; + boss->obj.id = OBJ_BOSS_AND_BRAIN; Object_SetInfo(&boss->info, boss->obj.id); gCsFrameCount = 599; } diff --git a/src/overlays/ovl_i6/fox_sy.c b/src/overlays/ovl_i6/fox_sy.c index f87aa39a..a6b96a4a 100644 --- a/src/overlays/ovl_i6/fox_sy.c +++ b/src/overlays/ovl_i6/fox_sy.c @@ -7,25 +7,25 @@ #include "global.h" #include "assets/ast_sector_y.h" -typedef void (*BossFuncs)(Boss*); +typedef void (*BossFuncs)(SyShogun*); -void SectorY_80198244(Boss*); -void SectorY_80198ABC(Boss*); -void SectorY_80199D64(Boss*); -void SectorY_8019AA08(Boss*); -void SectorY_8019AEC0(Boss*); -void SectorY_8019A434(Boss*); -void SectorY_8019A640(Boss*); -void SectorY_8019A82C(Boss*); -bool SectorY_8019B528(Boss*); -bool SectorY_8019B5CC(Boss*); -void SectorY_8019B6E8(Boss*); -void SectorY_8019BBBC(Boss*); -void SectorY_8019BC14(Boss*); -void SectorY_8019C194(Boss*, f32, f32); -void SectorY_801A0510(Actor*, s32); -void SectorY_SetupDebris(Actor*, f32, f32, f32, f32, f32, f32, s32); -void SectorY_SpawnDebris(f32, f32, f32, f32, f32, f32, s32); +void SectorY_80198244(SyShogun*); +void SectorY_80198ABC(SyShogun*); +void SectorY_80199D64(SyShogun*); +void SectorY_8019AA08(SyShogun*); +void SectorY_8019AEC0(SyShogun*); +void SectorY_8019A434(SyShogun*); +void SectorY_8019A640(SyShogun*); +void SectorY_8019A82C(SyShogun*); +bool SectorY_8019B528(SyShogun*); +bool SectorY_8019B5CC(SyShogun*); +void SectorY_8019B6E8(SyShogun*); +void SectorY_8019BBBC(SyShogun*); +void SectorY_8019BC14(SyShogun*); +void SectorY_8019C194(SyShogun*, f32, f32); +void SectorY_801A0510(ActorCutscene*, s32); +void SectorY_ActorDebris_Setup(Actor*, f32, f32, f32, f32, f32, f32, s32); +void SectorY_ActorDebris_Spawn(f32, f32, f32, f32, f32, f32, s32); f32 D_i6_801A8440[3]; @@ -61,10 +61,11 @@ void SectorY_Effect354_Draw(Effect354* this) { RCP_SetupDL(&gMasterDisp, SETUPDL_64); } -void SectorY_Scenery156_Draw(Scenery* scenery) { +void SectorY_Scenery156_Draw(SceneryUnk156* this) { + /* Unimplemented */ } -void SectorY_Boss314_Init(BossSY* this) { +void SectorY_SyShogun_Init(SyShogun* this) { this->fwork[9] = 0.0f; this->swork[33] = 5500; this->timer_050 = 10; @@ -118,7 +119,7 @@ void SectorY_Boss314_Init(BossSY* this) { } } -void SectorY_80197F18(Boss* this) { +void SectorY_80197F18(SyShogun* this) { this->swork[20] = 0; this->swork[21] = 3; this->fwork[9] = 0.0f; @@ -128,7 +129,7 @@ void SectorY_80197F18(Boss* this) { } } -void SectorY_80197F84(Boss* this) { +void SectorY_80197F84(SyShogun* this) { f32 yaw; Math_SmoothStepToF(&this->obj.pos.y, 0.0f, 0.5f, 15.0f, 0.1f); @@ -174,10 +175,10 @@ void SectorY_80197F84(Boss* this) { } } -void SectorY_80198238(Boss* this) { +void SectorY_80198238(SyShogun* this) { } -void SectorY_80198244(Boss* this) { +void SectorY_80198244(SyShogun* this) { f32 speed; this->swork[20] = 3; @@ -201,7 +202,7 @@ void SectorY_80198244(Boss* this) { AUDIO_PLAY_SFX(NA_SE_EN_MS_DASH, this->sfxSource, 4); } -void SectorY_801983E4(Boss* this) { +void SectorY_801983E4(SyShogun* this) { f32 yAngle; f32 xSpeed; f32 zSpeed; @@ -310,7 +311,7 @@ void SectorY_801983E4(Boss* this) { } } -void SectorY_80198ABC(Boss* this) { +void SectorY_80198ABC(SyShogun* this) { f32 yAngle = Math_RadToDeg(Math_Atan2F(-this->obj.pos.x, -300.0f - this->obj.pos.z)) - this->rot_078.y; if (yAngle < 0.0f) { @@ -363,7 +364,7 @@ void SectorY_80198ABC(Boss* this) { D_ctx_80177A10[8] %= 4U; } -void SectorY_80198CE4(Boss* this) { +void SectorY_80198CE4(SyShogun* this) { f32 yAngle; SectorY_8019B6E8(this); @@ -408,7 +409,7 @@ void SectorY_80198CE4(Boss* this) { } } -void SectorY_80198F5C(Boss* this) { +void SectorY_80198F5C(SyShogun* this) { Vec3f vec; Vec3f sp48; f32 xDisplacement; @@ -416,8 +417,8 @@ void SectorY_80198F5C(Boss* this) { s32 i; this->timer_05C = 20; - func_effect_8007C120(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, this->vel.z, 0.1f, - 10); + Effect_Effect390_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, this->vel.z, + 0.1f, 10); this->health -= this->damage; if (this->health < 0) { @@ -427,7 +428,7 @@ void SectorY_80198F5C(Boss* this) { this->timer_058 = 20; if (this->health <= 0) { - this->unk_04C = 0; + this->animFrame = 0; this->swork[36] = 0; this->swork[21] = 9; this->info.hitbox = SEGMENTED_TO_VIRTUAL(gNoHitbox); @@ -512,7 +513,7 @@ void SectorY_80198F5C(Boss* this) { } } -void SectorY_80199438(Boss* this) { +void SectorY_80199438(SyShogun* this) { s32 i; s32 j; Vec3f vec; @@ -565,15 +566,15 @@ void SectorY_80199438(Boss* this) { D_ctx_80177850 = 15; this->swork[36]++; - func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, - this->vel.z, 8.0f, 10); - func_effect_8007B344(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 8.0f, 5); + Effect386_Spawn1(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, + this->vel.z, 8.0f, 10); + Effect_Effect384_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 8.0f, 5); for (i = 10; i < 24; i++) { if (i != 15) { - SectorY_SpawnDebris(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, - RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT_CENTERED(50.0f), - RAND_FLOAT_CENTERED(50.0f) + this->vel.z, i); + SectorY_ActorDebris_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, + RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT_CENTERED(50.0f), + RAND_FLOAT_CENTERED(50.0f) + this->vel.z, i); } } } @@ -586,8 +587,8 @@ void SectorY_80199438(Boss* this) { } if (((gGameFrameCount % 4) == 0) && (this->swork[36] == 0)) { - func_effect_8007C120(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, - this->vel.z, 0.1f, 5); + Effect_Effect390_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, + this->vel.z, 0.1f, 5); } if ((gCsFrameCount == 120) && (this->swork[36] == 0) && (this->index == 0)) { @@ -602,8 +603,8 @@ void SectorY_80199438(Boss* this) { } Audio_KillSfxBySource(this->sfxSource); - gShowBossHealth = 0; - func_effect_8007A568(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 40.0f); + gShowBossHealth = false; + Effect_Effect383_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 40.0f); func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 30.0f); func_enmy_80062B60(this->obj.pos.x, this->obj.pos.z, 0, 120.0f); gCameraShake = 25; @@ -611,8 +612,9 @@ void SectorY_80199438(Boss* this) { for (i = 10; i < 24; i++) { if (i != 15) { - SectorY_SpawnDebris(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, RAND_FLOAT_CENTERED(50.0f), - RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT_CENTERED(50.0f) + this->vel.z, i); + SectorY_ActorDebris_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, + RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT_CENTERED(50.0f), + RAND_FLOAT_CENTERED(50.0f) + this->vel.z, i); } } this->timer_058 = 100; @@ -644,9 +646,9 @@ void SectorY_80199438(Boss* this) { for (j = ARRAY_COUNT(gActors) - 1; j >= 0; j--) { if (gActors[j].obj.status == OBJ_FREE) { - SectorY_SetupDebris(&gActors[j], this->fwork[28], this->fwork[29], this->fwork[30], - RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT_CENTERED(50.0f), - RAND_FLOAT_CENTERED(50.0f) + this->vel.z, 15); + SectorY_ActorDebris_Setup(&gActors[j], this->fwork[28], this->fwork[29], this->fwork[30], + RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT_CENTERED(50.0f), + RAND_FLOAT_CENTERED(50.0f) + this->vel.z, 15); break; } } @@ -673,7 +675,7 @@ void SectorY_80199438(Boss* this) { } } -void SectorY_80199D64(Boss* this) { +void SectorY_80199D64(SyShogun* this) { if (this->swork[34] >= 2) { this->swork[20] = 6; this->swork[21] = 1; @@ -684,7 +686,7 @@ void SectorY_80199D64(Boss* this) { } } -void SectorY_80199DAC(Boss* this) { +void SectorY_80199DAC(SyShogun* this) { f32 sp34; f32 zSpeed; f32 xSpeed; @@ -722,7 +724,7 @@ void SectorY_80199DAC(Boss* this) { (ABS(this->obj.pos.z + 300.0f) <= 300.0f)) { Math_SmoothStepToF(&this->fwork[43], 3.0f, 0.1f, 0.1f, 0.1f); this->swork[21] = 6; - this->unk_04C = 27; + this->animFrame = 27; this->fwork[12] = 320.0f; if (this->timer_056 == 0) { this->timer_056 = 51; @@ -774,7 +776,7 @@ void SectorY_80199DAC(Boss* this) { } } -void SectorY_8019A434(Boss* this) { +void SectorY_8019A434(SyShogun* this) { this->swork[20] = 7; this->swork[21] = 5; this->timer_056 = (s32) (RAND_FLOAT(130.0f) + 60.0f); @@ -785,7 +787,7 @@ void SectorY_8019A434(Boss* this) { AUDIO_PLAY_SFX(NA_SE_EN_MS_LAND, this->sfxSource, 4); } -void SectorY_8019A520(Boss* this) { +void SectorY_8019A520(SyShogun* this) { SectorY_8019B6E8(this); if (this->timer_052 == 0) { @@ -803,12 +805,12 @@ void SectorY_8019A520(Boss* this) { this->fwork[0] = 1.0f; } - if ((this->unk_04C == 0) || (this->unk_04C == 27)) { + if ((this->animFrame == 0) || (this->animFrame == 27)) { AUDIO_PLAY_SFX(NA_SE_EN_HEAVY_WALK, this->sfxSource, 4); } } -void SectorY_8019A640(Boss* this) { +void SectorY_8019A640(SyShogun* this) { this->swork[20] = 8; this->swork[21] = 0; this->vel.x = 0.0f; @@ -817,7 +819,7 @@ void SectorY_8019A640(Boss* this) { this->timer_056 = 80; } -void SectorY_8019A66C(Boss* this) { +void SectorY_8019A66C(SyShogun* this) { SectorY_8019B6E8(this); if (this->timer_052 == 0) { @@ -849,7 +851,7 @@ void SectorY_8019A66C(Boss* this) { } } -void SectorY_8019A82C(Boss* this) { +void SectorY_8019A82C(SyShogun* this) { this->swork[20] = 9; this->fwork[9] = 0.0f; this->timer_050 = RAND_INT(150.0f) + 340; @@ -857,7 +859,7 @@ void SectorY_8019A82C(Boss* this) { AllRange_PlayMessage(gMsg_ID_14340, RCID_BOSS_SECTORY); } -void SectorY_8019A898(Boss* this) { +void SectorY_8019A898(SyShogun* this) { f32 yAngle1; f32 yAngle2; @@ -874,11 +876,11 @@ void SectorY_8019A898(Boss* this) { this->swork[21] = 6; - if (((yAngle2 >= 30.0f) && (yAngle2 <= 330.0f)) || ((this->unk_04C != 0)) && (this->unk_04C != 27)) { + if (((yAngle2 >= 30.0f) && (yAngle2 <= 330.0f)) || ((this->animFrame != 0)) && (this->animFrame != 27)) { this->swork[21] = 5; Math_SmoothStepToAngle(&this->rot_078.y, yAngle1, 0.1f, 2.0f, 0.1f); this->fwork[0] = 1.0f; - if ((this->unk_04C == 0) || (this->unk_04C == 27)) { + if ((this->animFrame == 0) || (this->animFrame == 27)) { AUDIO_PLAY_SFX(NA_SE_EN_HEAVY_WALK, this->sfxSource, 4); } } else { @@ -890,7 +892,7 @@ void SectorY_8019A898(Boss* this) { } } -void SectorY_8019AA08(Boss* this) { +void SectorY_8019AA08(SyShogun* this) { if (SectorY_8019B5CC(this)) { return; } @@ -914,11 +916,11 @@ void SectorY_8019AA08(Boss* this) { } this->swork[20] = 10; - this->unk_04C = 0; + this->animFrame = 0; this->fwork[34] = 2.8f; } -void SectorY_8019AAF0(Boss* this) { +void SectorY_8019AAF0(SyShogun* this) { f32 var_fv1; f32 xAngle; f32 yAngle; @@ -934,13 +936,13 @@ void SectorY_8019AAF0(Boss* this) { var_fv1 += 200.0f; } - if ((this->swork[31] >= this->unk_04C) && (fabsf(this->obj.pos.z - this->fwork[20]) < (var_fv1 + 1000.0f)) && + if ((this->swork[31] >= this->animFrame) && (fabsf(this->obj.pos.z - this->fwork[20]) < (var_fv1 + 1000.0f)) && (fabsf(this->obj.pos.x - this->fwork[18]) < var_fv1)) { - this->unk_04C++; + this->animFrame++; } - if (this->unk_04C >= this->swork[32] - 29) { - if (this->unk_04C == this->swork[32] - 29) { + if (this->animFrame >= this->swork[32] - 29) { + if (this->animFrame == this->swork[32] - 29) { if (this->swork[31] == 11) { AUDIO_PLAY_SFX(NA_SE_EN_MS_PUNCH, this->sfxSource, 4); } else { @@ -948,7 +950,7 @@ void SectorY_8019AAF0(Boss* this) { } } - if (this->unk_04C >= (this->swork[32] - 5)) { + if (this->animFrame >= (this->swork[32] - 5)) { SectorY_80198244(this); } } else { @@ -989,12 +991,12 @@ void SectorY_8019AAF0(Boss* this) { if (this->swork[20] == 10) { this->fwork[0] = 0.25f; } - if ((this->swork[20] == 10) && (this->unk_04C >= 12)) { + if ((this->swork[20] == 10) && (this->animFrame >= 12)) { this->fwork[0] = 1.0f; } } -void SectorY_8019AEC0(Boss* this) { +void SectorY_8019AEC0(SyShogun* this) { this->swork[20] = 11; this->swork[21] = 8; this->vel.x = 0.0f; @@ -1003,7 +1005,7 @@ void SectorY_8019AEC0(Boss* this) { this->unk_044 = 0; } -void SectorY_8019AEEC(Boss* this) { +void SectorY_8019AEEC(SyShogun* this) { if ((this->obj.pos.y != 365.0f) && (this->swork[21] != 1)) { if (this->unk_04A != 0) { if (this->unk_04A == 1) { @@ -1063,8 +1065,8 @@ void SectorY_8019AEEC(Boss* this) { Math_SmoothStepToF(&this->vel.z, 80.0f, 0.1f, 2.0f, 0.5f); Math_SmoothStepToF(&gActors[59].vel.z, 80.0f, 0.1f, 2.0f, 0.5f); if ((gGameFrameCount % 2) == 0) { - func_effect_8007C120(this->obj.pos.x, this->obj.pos.y - 150.0f, this->obj.pos.z, 0.0f, 0.0f, 0.0f, - 0.1f, 5); + Effect_Effect390_Spawn(this->obj.pos.x, this->obj.pos.y - 150.0f, this->obj.pos.z, 0.0f, 0.0f, 0.0f, + 0.1f, 5); } } } @@ -1102,7 +1104,7 @@ void SectorY_8019AEEC(Boss* this) { } } -bool SectorY_8019B528(Boss* this) { +bool SectorY_8019B528(SyShogun* this) { if (this->timer_050 != 0) { return false; } @@ -1117,7 +1119,7 @@ bool SectorY_8019B528(Boss* this) { return false; } -bool SectorY_8019B5CC(Boss* this) { +bool SectorY_8019B5CC(SyShogun* this) { f32 pad; Vec3f pos; @@ -1140,7 +1142,7 @@ bool SectorY_8019B5CC(Boss* this) { return false; } -void SectorY_8019B6E8(Boss* this) { +void SectorY_8019B6E8(SyShogun* this) { f32 var4; f32 var3; f32 var2; @@ -1199,7 +1201,7 @@ void SectorY_8019B6E8(Boss* this) { } } -void SectorY_8019BBBC(Boss* this) { +void SectorY_8019BBBC(SyShogun* this) { this->fwork[18] = gPlayer[0].pos.x; this->fwork[19] = gPlayer[0].pos.y; this->fwork[20] = gPlayer[0].pos.z; @@ -1208,7 +1210,7 @@ void SectorY_8019BBBC(Boss* this) { this->fwork[26] = gPlayer[0].vel.z; } -void SectorY_8019BC14(Boss* this) { +void SectorY_8019BC14(SyShogun* this) { f32 sp4C; f32 sp48; f32 sp44; @@ -1288,7 +1290,7 @@ void SectorY_8019BC14(Boss* this) { } } -void SectorY_8019C194(Boss* this, f32 zSpeed, f32 xSpeed) { +void SectorY_8019C194(SyShogun* this, f32 zSpeed, f32 xSpeed) { f32 sp2C; f32 sp28; @@ -1390,7 +1392,7 @@ static BossFuncs D_i6_801A6910[] = { SectorY_80199DAC, SectorY_8019A520, SectorY_8019A66C, SectorY_8019A898, SectorY_8019AAF0, SectorY_8019AEEC, }; -void SectorY_Boss_Update(BossSY* this) { +void SectorY_SyShogun_Update(SyShogun* this) { s32 i; f32 sp1E8; f32 sp1E4; @@ -1447,71 +1449,71 @@ void SectorY_Boss_Update(BossSY* this) { } if ((this->swork[29] != 0) && !(this->swork[29] & gGameFrameCount)) { - func_effect_8007C120(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, - this->vel.z, 0.1f, 5); + Effect_Effect390_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, + this->vel.z, 0.1f, 5); } switch (this->swork[21]) { case 0: - this->unk_04C = Animation_GetFrameCount(&D_SY_602B778) - 1; - sp1D0 = Animation_GetFrameData(&D_SY_602B778, this->unk_04C, frameTable); + this->animFrame = Animation_GetFrameCount(&D_SY_602B778) - 1; + sp1D0 = Animation_GetFrameData(&D_SY_602B778, this->animFrame, frameTable); break; case 1: - this->unk_04C = Animation_GetFrameCount(&D_SY_60265B4) - 1; - sp1D0 = Animation_GetFrameData(&D_SY_60265B4, this->unk_04C, frameTable); + this->animFrame = Animation_GetFrameCount(&D_SY_60265B4) - 1; + sp1D0 = Animation_GetFrameData(&D_SY_60265B4, this->animFrame, frameTable); break; case 2: - this->unk_04C = Animation_GetFrameCount(&D_SY_6029B48) - 1; - sp1D0 = Animation_GetFrameData(&D_SY_6029B48, this->unk_04C, frameTable); + this->animFrame = Animation_GetFrameCount(&D_SY_6029B48) - 1; + sp1D0 = Animation_GetFrameData(&D_SY_6029B48, this->animFrame, frameTable); break; case 3: - this->unk_04C = Animation_GetFrameCount(&D_SY_602B8DC) - 1; - sp1D0 = Animation_GetFrameData(&D_SY_602B8DC, this->unk_04C, frameTable); + this->animFrame = Animation_GetFrameCount(&D_SY_602B8DC) - 1; + sp1D0 = Animation_GetFrameData(&D_SY_602B8DC, this->animFrame, frameTable); break; case 4: - this->unk_04C++; - if (this->unk_04C >= Animation_GetFrameCount(&D_SY_6003348)) { - this->unk_04C = Animation_GetFrameCount(&D_SY_6003348) - 1; + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_SY_6003348)) { + this->animFrame = Animation_GetFrameCount(&D_SY_6003348) - 1; } - sp1D0 = Animation_GetFrameData(&D_SY_6003348, this->unk_04C, frameTable); + sp1D0 = Animation_GetFrameData(&D_SY_6003348, this->animFrame, frameTable); break; case 5: - this->unk_04C++; - if (this->unk_04C >= Animation_GetFrameCount(&D_SY_602738C)) { - this->unk_04C = 0; + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_SY_602738C)) { + this->animFrame = 0; } - sp1D0 = Animation_GetFrameData(&D_SY_602738C, this->unk_04C, frameTable); + sp1D0 = Animation_GetFrameData(&D_SY_602738C, this->animFrame, frameTable); break; case 6: - sp1D0 = Animation_GetFrameData(&D_SY_602738C, this->unk_04C, frameTable); + sp1D0 = Animation_GetFrameData(&D_SY_602738C, this->animFrame, frameTable); break; case 7: - if (this->unk_04C < (Animation_GetFrameCount(&D_SY_602645C) - 1)) { - this->unk_04C++; + if (this->animFrame < (Animation_GetFrameCount(&D_SY_602645C) - 1)) { + this->animFrame++; } - sp1D0 = Animation_GetFrameData(&D_SY_602645C, this->unk_04C, frameTable); + sp1D0 = Animation_GetFrameData(&D_SY_602645C, this->animFrame, frameTable); break; case 8: - if (this->unk_04C < (Animation_GetFrameCount(&D_SY_60258A0) - 1)) { - this->unk_04C++; + if (this->animFrame < (Animation_GetFrameCount(&D_SY_60258A0) - 1)) { + this->animFrame++; } - sp1D0 = Animation_GetFrameData(&D_SY_60258A0, this->unk_04C, frameTable); + sp1D0 = Animation_GetFrameData(&D_SY_60258A0, this->animFrame, frameTable); break; case 9: - this->unk_04C++; - if (this->unk_04C >= Animation_GetFrameCount(&D_SY_60034C4)) { - this->unk_04C = 0; + this->animFrame++; + if (this->animFrame >= Animation_GetFrameCount(&D_SY_60034C4)) { + this->animFrame = 0; } - sp1D0 = Animation_GetFrameData(&D_SY_60034C4, this->unk_04C, frameTable); + sp1D0 = Animation_GetFrameData(&D_SY_60034C4, this->animFrame, frameTable); break; } @@ -1554,10 +1556,13 @@ void SectorY_Boss_Update(BossSY* this) { Math_SmoothStepToAngle(&this->fwork[5], sp1E8, 0.2f, 4.0f, 0.1f); Matrix_RotateX(gCalcMatrix, -this->fwork[5] * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, -this->fwork[6] * M_DTOR, MTXF_APPLY); + src.x = this->fwork[18] - this->obj.pos.x; src.y = (this->fwork[19] - this->obj.pos.y) + 20.0f; src.z = this->fwork[20] - this->obj.pos.z; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + sp1E0 = Math_RadToDeg(Math_Atan2F(dest.x, dest.z)); sp1DC = Math_RadToDeg(-Math_Atan2F(dest.y, sqrtf(SQ(dest.x) + SQ(dest.z)))); @@ -1576,10 +1581,13 @@ void SectorY_Boss_Update(BossSY* this) { Math_SmoothStepToAngle(&this->fwork[8], sp1E0, 0.4f, 8.0f, 0.1f); Math_SmoothStepToAngle(&this->fwork[7], sp1DC, 0.4f, 8.0f, 0.1f); + src.x = (this->fwork[18] - this->obj.pos.x) + (COS_DEG(this->obj.rot.y) * 100.0f); src.y = (this->fwork[19] - this->obj.pos.y) - 80.0f; src.z = this->fwork[20] - this->obj.pos.z; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + sp1D8 = Math_RadToDeg(Math_Atan2F(dest.x, dest.z)); sp1D4 = Math_RadToDeg(-Math_Atan2F(dest.y, sqrtf(SQ(dest.x) + SQ(dest.z)))); @@ -1598,12 +1606,16 @@ void SectorY_Boss_Update(BossSY* this) { Math_SmoothStepToAngle(&this->fwork[15], sp1D8, 0.2f, 4.0f, 0.1f); Math_SmoothStepToAngle(&this->fwork[14], sp1D4, 0.2f, 4.0f, 0.1f); + Matrix_RotateX(gCalcMatrix, -this->fwork[14] * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, -this->fwork[15] * M_DTOR, MTXF_APPLY); + src.x = this->fwork[18] - this->obj.pos.x; src.y = (this->fwork[19] - this->obj.pos.y) + (COS_DEG(this->obj.rot.z) * 40.0f); src.z = (this->fwork[20] - this->obj.pos.z) - (COS_DEG(this->obj.rot.y) * 60.0f); + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + sp1E4 = Math_RadToDeg(Math_Atan2F(dest.x, dest.z)); sp1E8 = Math_RadToDeg(-Math_Atan2F(dest.y, sqrtf(SQ(dest.x) + SQ(dest.z)))); @@ -1679,7 +1691,7 @@ void SectorY_Boss_Update(BossSY* this) { Radio_PlayMessage(gMsg_ID_2225, RCID_SLIPPY); } if ((gBossFrameCount == 620) && (this->swork[34] == 0)) { - gShowBossHealth = 1; + gShowBossHealth = true; } if ((gBossFrameCount >= 350) || (this->swork[34] != 0)) { if (this->swork[34] != 0) { @@ -1718,8 +1730,8 @@ void SectorY_Boss_Update(BossSY* this) { } } -bool SectorY_8019DC4C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { - Boss* boss = (Boss*) data; +bool SectorY_8019DC4C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { + SyShogun* boss = (SyShogun*) thisx; Vec3f sp10 = { 0.0f, 0.0f, 0.0f }; if ((boss->timer_05C % 2) == 0) { @@ -1763,15 +1775,15 @@ bool SectorY_8019DC4C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return false; } -bool SectorY_Boss_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { - Boss* boss = (Boss*) data; +bool SectorY_SyShogun_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { + SyShogun* this = (SyShogun*) thisx; Vec3f sp38 = { 0.0f, 0.0f, 0.0f }; - if (boss->index != 0) { - return SectorY_8019DC4C(limbIndex, dList, pos, rot, boss); + if (this->index != 0) { + return SectorY_8019DC4C(limbIndex, dList, pos, rot, this); } - if ((boss->timer_05C % 2) != 0) { + if ((this->timer_05C % 2) != 0) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 32, 32, 255, 255); } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); @@ -1779,21 +1791,21 @@ bool SectorY_Boss_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f switch (limbIndex) { case 2: - rot->z -= boss->fwork[4]; - rot->z += boss->fwork[16]; - rot->y -= boss->fwork[17]; + rot->z -= this->fwork[4]; + rot->z += this->fwork[16]; + rot->y -= this->fwork[17]; break; case 3: - rot->z -= boss->fwork[4]; - rot->z += boss->fwork[14]; - rot->x -= boss->fwork[15]; + rot->z -= this->fwork[4]; + rot->z += this->fwork[14]; + rot->x -= this->fwork[15]; break; case 4: - if (boss->swork[25] == 0) { + if (this->swork[25] == 0) { *dList = D_SY_6013600; - if ((boss->swork[24] % 2) != 0) { + if ((this->swork[24] % 2) != 0) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 255, 0, 255); } } else { @@ -1802,20 +1814,20 @@ bool SectorY_Boss_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f break; case 17: - rot->x += boss->fwork[8]; - rot->y -= boss->fwork[7]; + rot->x += this->fwork[8]; + rot->y -= this->fwork[7]; *dList = D_SY_6014BD0; break; case 18: - rot->x += boss->fwork[6]; - rot->y -= boss->fwork[5]; + rot->x += this->fwork[6]; + rot->y -= this->fwork[5]; break; } return false; } -void SectorY_Boss_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* data) { +void SectorY_SyShogun_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp7C = { 40.0f, -30.0f, 0.0f }; Vec3f sp70 = { -40.0f, -30.0f, 0.0f }; Vec3f sp64 = { 0.0f, 0.0f, 0.0f }; @@ -1824,57 +1836,57 @@ void SectorY_Boss_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* data) { Vec3f sp40 = { 0.0f, 0.0f, 66.0f }; Vec3f sp34 = { 0.0f, 30.0f, -60.0f }; Vec3f sp28; - Boss* boss = (Boss*) data; + SyShogun* this = (SyShogun*) thisx; switch (limbIndex) { case 0: - if (boss->index != 0) { + if (this->index != 0) { Matrix_MultVec3f(gCalcMatrix, &sp58, &sp28); } else { Matrix_MultVec3f(gCalcMatrix, &sp34, &sp28); } - boss->fwork[31] = sp28.x; - boss->fwork[32] = sp28.y; - boss->fwork[33] = sp28.z; + this->fwork[31] = sp28.x; + this->fwork[32] = sp28.y; + this->fwork[33] = sp28.z; break; case 1: Matrix_Push(&gCalcMatrix); Matrix_MultVec3f(gCalcMatrix, &sp70, &sp28); - boss->fwork[21] = sp28.x; - boss->fwork[22] = sp28.y; - boss->fwork[23] = sp28.z; + this->fwork[21] = sp28.x; + this->fwork[22] = sp28.y; + this->fwork[23] = sp28.z; Matrix_Pop(&gCalcMatrix); Matrix_MultVec3f(gCalcMatrix, &sp7C, &sp28); - boss->fwork[1] = sp28.x; - boss->fwork[2] = sp28.y; - boss->fwork[3] = sp28.z; + this->fwork[1] = sp28.x; + this->fwork[2] = sp28.y; + this->fwork[3] = sp28.z; break; case 3: - if (boss->index == 0) { + if (this->index == 0) { Matrix_MultVec3f(gCalcMatrix, &sp4C, &sp28); - boss->fwork[35] = sp28.x; - boss->fwork[36] = sp28.y; - boss->fwork[37] = sp28.z; + this->fwork[35] = sp28.x; + this->fwork[36] = sp28.y; + this->fwork[37] = sp28.z; } break; case 4: - if (boss->index == 0) { + if (this->index == 0) { Matrix_MultVec3f(gCalcMatrix, &sp64, &sp28); - boss->fwork[28] = sp28.x; - boss->fwork[29] = sp28.y; - boss->fwork[30] = sp28.z; + this->fwork[28] = sp28.x; + this->fwork[29] = sp28.y; + this->fwork[30] = sp28.z; } break; case 6: - if (boss->index == 0) { + if (this->index == 0) { Matrix_MultVec3f(gCalcMatrix, &sp40, &sp28); - boss->fwork[38] = sp28.x; - boss->fwork[39] = sp28.y; - boss->fwork[40] = sp28.z; + this->fwork[38] = sp28.x; + this->fwork[39] = sp28.y; + this->fwork[40] = sp28.z; } break; @@ -1886,7 +1898,7 @@ void SectorY_Boss_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* data) { static f32 D_i6_801A69AC[20] = { 0.3f, 0.7f, 1.3f, 0.7f, 0.3f, 0.0f, 10.0f, 20.0f, 300.0f, 100.0f, 200.0f, 100.0f, 60.0f, -260.0f, 80.0f, 100.0f, 80.0f, 262.0f, 285.0f, 252.0f }; -void SectorY_Boss_Draw(Boss* this) { +void SectorY_SyShogun_Draw(SyShogun* this) { f32 sp9C; f32 sp98; f32 sp94; @@ -1901,8 +1913,8 @@ void SectorY_Boss_Draw(Boss* this) { } if ((this->health > 0) || (this->swork[36] == 0)) { - Animation_DrawSkeleton(2, D_SY_602D140, this->vwork, SectorY_Boss_OverrideLimbDraw, SectorY_Boss_PostLimbDraw, - this, gCalcMatrix); + Animation_DrawSkeleton(2, D_SY_602D140, this->vwork, SectorY_SyShogun_OverrideLimbDraw, + SectorY_SyShogun_PostLimbDraw, this, gCalcMatrix); if (this->timer_054 != 0) { sp9C = D_i6_801A69AC[this->timer_054]; RCP_SetupDL_49(); @@ -2065,7 +2077,7 @@ void SectorY_LevelComplete(Player* player) { s32 pad[2]; Vec3f sp60; Vec3f sp54; - Boss* boss = &gBosses[0]; + SyShogun* boss = &gBosses[0]; f32 temp_ft1; switch (player->csState) { @@ -2395,7 +2407,7 @@ void SectorY_LevelComplete(Player* player) { player->rockAngle = SIN_DEG(player->rockPhase); } -void SectorY_8019FF00(Actor* this) { +void SectorY_8019FF00(ActorCutscene* this) { Vec3f sp4C; Vec3f sp40; f32 x; @@ -2777,9 +2789,9 @@ void SectorY_801A0AC0(Player* player) { spA4.y = RAND_FLOAT_CENTERED(500.0f) + -500.0f; spA4.z = RAND_FLOAT_CENTERED(5000.0f) + 170.0f; Matrix_MultVec3f(gCalcMatrix, &spA4, &sp98); - func_effect_8007C120(gActors[8].obj.pos.x + sp98.x, gActors[8].obj.pos.y + sp98.y, - gActors[8].obj.pos.z + sp98.z, gActors[8].vel.x, gActors[8].vel.y, - gActors[8].vel.z, 0.8f, 5); + Effect_Effect390_Spawn(gActors[8].obj.pos.x + sp98.x, gActors[8].obj.pos.y + sp98.y, + gActors[8].obj.pos.z + sp98.z, gActors[8].vel.x, gActors[8].vel.y, + gActors[8].vel.z, 0.8f, 5); func_effect_8007D2C8(gActors[8].obj.pos.x - 2000.0f + RAND_FLOAT_CENTERED(500.0f), gActors[8].obj.pos.y - 500.0f + RAND_FLOAT_CENTERED(1000.0f), gActors[8].obj.pos.z + RAND_FLOAT_CENTERED(3000.0f), 8); @@ -2846,9 +2858,9 @@ void SectorY_801A0AC0(Player* player) { break; case 145: - func_effect_8007BFFC(gActors[11].obj.pos.x, gActors[11].obj.pos.y, gActors[11].obj.pos.z, - gActors[11].vel.x, gActors[11].vel.y, gActors[11].vel.z, 8, 10); - func_effect_8007B344(gActors[11].obj.pos.x, gActors[11].obj.pos.y, gActors[11].obj.pos.z, 8, 5); + Effect386_Spawn1(gActors[11].obj.pos.x, gActors[11].obj.pos.y, gActors[11].obj.pos.z, + gActors[11].vel.x, gActors[11].vel.y, gActors[11].vel.z, 8, 10); + Effect_Effect384_Spawn(gActors[11].obj.pos.x, gActors[11].obj.pos.y, gActors[11].obj.pos.z, 8, 5); AUDIO_PLAY_SFX(NA_SE_EN_MS_EXPLOSION_S, gActors[11].sfxSource, 4); break; @@ -2862,9 +2874,9 @@ void SectorY_801A0AC0(Player* player) { case 150: Object_Kill(&gActors[11].obj, gActors[11].sfxSource); for (i = 10; i < 24; i++) { - SectorY_SpawnDebris(gActors[11].obj.pos.x, gActors[11].obj.pos.y, gActors[11].obj.pos.z, - RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT_CENTERED(50.0f), - RAND_FLOAT_CENTERED(50.0f), i); + SectorY_ActorDebris_Spawn(gActors[11].obj.pos.x, gActors[11].obj.pos.y, gActors[11].obj.pos.z, + RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT_CENTERED(50.0f), + RAND_FLOAT_CENTERED(50.0f), i); } break; @@ -3435,7 +3447,8 @@ void SectorY_801A0AC0(Player* player) { player->trueZpos = player->pos.z + player->camDist; } -void SectorY_SetupDebris(ActorDebris* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, s32 state) { +void SectorY_ActorDebris_Setup(ActorDebris* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, + s32 state) { Actor_Initialize(this); this->obj.status = OBJ_INIT; this->obj.id = OBJ_ACTOR_DEBRIS; @@ -3452,18 +3465,18 @@ void SectorY_SetupDebris(ActorDebris* this, f32 xPos, f32 yPos, f32 zPos, f32 xV Object_SetInfo(&this->info, this->obj.id); } -void SectorY_SpawnDebris(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, s32 state) { +void SectorY_ActorDebris_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, s32 state) { s32 i; for (i = ARRAY_COUNT(gActors) - 1; i >= 0; i--) { if (gActors[i].obj.status == OBJ_FREE) { - SectorY_SetupDebris(&gActors[i], xPos, yPos, zPos, xVel, yVel, zVel, state); + SectorY_ActorDebris_Setup(&gActors[i], xPos, yPos, zPos, xVel, yVel, zVel, state); break; } } } -void SectorY_Actor204_Update(Actor204* this) { +void SectorY_SyRobot_Update(SyRobot* this) { f32 sp1E4; f32 sp1E0; s32 i; @@ -3655,9 +3668,9 @@ void SectorY_Actor204_Update(Actor204* this) { } if (this->timer_0BE == 5U) { - func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, - this->vel.z, 8.0f, 10); - func_effect_8007B344(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 8.0f, 5); + Effect386_Spawn1(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, + this->vel.z, 8.0f, 10); + Effect_Effect384_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 8.0f, 5); AUDIO_PLAY_SFX(NA_SE_EN_MS_EXPLOSION_S, this->sfxSource, 4); } @@ -3665,8 +3678,9 @@ void SectorY_Actor204_Update(Actor204* this) { Object_Kill(&this->obj, this->sfxSource); Actor_Despawn(this); for (i = 10; i < 24; i++) { - SectorY_SpawnDebris(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, RAND_FLOAT_CENTERED(50.0f), - RAND_FLOAT_CENTERED(50.0f), this->vel.z + RAND_FLOAT_CENTERED(50.0f), i); + SectorY_ActorDebris_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, + RAND_FLOAT_CENTERED(50.0f), RAND_FLOAT_CENTERED(50.0f), + this->vel.z + RAND_FLOAT_CENTERED(50.0f), i); } } break; @@ -3739,7 +3753,7 @@ void SectorY_Actor204_Update(Actor204* this) { Math_SmoothStepToF(&this->fwork[27], 0.0f, 1.0f, 0.05f, 0.0f); } - this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_603405C); + this->info.hitbox = SEGMENTED_TO_VIRTUAL(aSyRobotHitbox); if (this->unk_046 == 1) { this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_603421C); } @@ -3769,8 +3783,8 @@ void SectorY_Actor204_Update(Actor204* this) { } else { AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, this->sfxSource, 4); this->timer_0C6 = 15; - func_effect_8007C120(this->hitPos.x, this->hitPos.y, this->hitPos.z, this->vel.x, this->vel.y, this->vel.z, - 0.1f, 10); + Effect_Effect390_Spawn(this->hitPos.x, this->hitPos.y, this->hitPos.z, this->vel.x, this->vel.y, + this->vel.z, 0.1f, 10); this->health -= this->damage; if (this->health <= 0) { @@ -3788,8 +3802,8 @@ static s32 D_i6_801A6B28[3] = { 255, 150, 150 }; static s32 D_i6_801A6B34[3] = { 150, 255, 150 }; static s32 D_i6_801A6B40[6] = { 150, 150, 255 }; -bool SectorY_Actor204_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { - Actor* actor = (Actor*) data; +bool SectorY_SyRobot_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { + SyRobot* actor = (SyRobot*) thisx; if (limbIndex == 4) { if ((actor->iwork[18] % 2) == 0) { @@ -3814,7 +3828,7 @@ bool SectorY_Actor204_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, V if (limbIndex == 17) { rot->x += actor->fwork[28]; rot->y -= actor->fwork[29]; - if (actor->eventType == 48) { + if (actor->eventType == EVID_48) { *dList = D_SY_6014BD0; } } @@ -3825,10 +3839,10 @@ bool SectorY_Actor204_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, V return false; } -void SectorY_Actor204_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* data) { +void SectorY_SyRobot_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp2C = { 40.0f, -30.0f, 0.0f }; Vec3f sp20; - Actor* actor = (Actor*) data; + SyRobot* actor = (SyRobot*) thisx; if (limbIndex == 1) { Matrix_MultVec3f(gCalcMatrix, &sp2C, &sp20); @@ -3842,12 +3856,12 @@ static f32 D_i6_801A6B64[5] = { 0.3f, 0.7f, 1.3f, 0.7f, 0.3f, }; -void SectorY_Actor204_Draw(Actor204* this) { +void SectorY_SyRobot_Draw(SyRobot* this) { f32 scale; RCP_SetupDL_30(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); - Animation_DrawSkeleton(2, D_SY_602D140, this->vwork, SectorY_Actor204_OverrideLimbDraw, - SectorY_Actor204_PostLimbDraw, this, gCalcMatrix); + Animation_DrawSkeleton(2, D_SY_602D140, this->vwork, SectorY_SyRobot_OverrideLimbDraw, SectorY_SyRobot_PostLimbDraw, + this, gCalcMatrix); if (this->timer_0C4 != 0) { scale = D_i6_801A6B64[this->timer_0C4]; @@ -3864,7 +3878,7 @@ void SectorY_Actor204_Draw(Actor204* this) { } } -void SectorY_Scenery109_Update(Scenery* scenery) { +void SectorY_SyShip3Destroyed_Update(SyShip3Destroyed* scenery) { Vec3f src; Vec3f dest; @@ -3881,30 +3895,30 @@ void SectorY_Scenery109_Update(Scenery* scenery) { src.y = RAND_FLOAT_CENTERED(900.0f) + -150.0f; src.z = 90.0f - RAND_FLOAT(50.0f); Matrix_MultVec3f(gCalcMatrix, &src, &dest); - func_effect_8007C120(scenery->obj.pos.x + dest.x, scenery->obj.pos.y + dest.y, scenery->obj.pos.z + dest.z, - scenery->effectVel.x, scenery->effectVel.y, scenery->effectVel.z, 0.2f, 5); + Effect_Effect390_Spawn(scenery->obj.pos.x + dest.x, scenery->obj.pos.y + dest.y, scenery->obj.pos.z + dest.z, + scenery->effectVel.x, scenery->effectVel.y, scenery->effectVel.z, 0.2f, 5); src.x = RAND_FLOAT_CENTERED(100.0f) + -500.0f; src.y = RAND_FLOAT_CENTERED(900.0f); src.z = 80.0f - RAND_FLOAT(50.0f); Matrix_MultVec3f(gCalcMatrix, &src, &dest); - func_effect_8007C120(scenery->obj.pos.x + dest.x, scenery->obj.pos.y + dest.y, scenery->obj.pos.z + dest.z, - scenery->effectVel.x, scenery->effectVel.y, scenery->effectVel.z, 0.2f, 5); + Effect_Effect390_Spawn(scenery->obj.pos.x + dest.x, scenery->obj.pos.y + dest.y, scenery->obj.pos.z + dest.z, + scenery->effectVel.x, scenery->effectVel.y, scenery->effectVel.z, 0.2f, 5); src.x = RAND_FLOAT_CENTERED(100.0f) + 500.0f; src.y = RAND_FLOAT_CENTERED(900.0f) + -50.0f; src.z = 1900.0f - RAND_FLOAT(50.0f); Matrix_MultVec3f(gCalcMatrix, &src, &dest); - func_effect_8007C120(scenery->obj.pos.x + dest.x, scenery->obj.pos.y + dest.y, scenery->obj.pos.z + dest.z, - scenery->effectVel.x, scenery->effectVel.y, scenery->effectVel.z, 0.2f, 5); + Effect_Effect390_Spawn(scenery->obj.pos.x + dest.x, scenery->obj.pos.y + dest.y, scenery->obj.pos.z + dest.z, + scenery->effectVel.x, scenery->effectVel.y, scenery->effectVel.z, 0.2f, 5); src.x = RAND_FLOAT_CENTERED(100.0f) + -1000.0f; src.y = RAND_FLOAT_CENTERED(900.0f) + -250.0f; src.z = 1100.0f - RAND_FLOAT(50.0f); Matrix_MultVec3f(gCalcMatrix, &src, &dest); - func_effect_8007C120(scenery->obj.pos.x + dest.x, scenery->obj.pos.y + dest.y, scenery->obj.pos.z + dest.z, - scenery->effectVel.x, scenery->effectVel.y, scenery->effectVel.z, 0.2f, 5); + Effect_Effect390_Spawn(scenery->obj.pos.x + dest.x, scenery->obj.pos.y + dest.y, scenery->obj.pos.z + dest.z, + scenery->effectVel.x, scenery->effectVel.y, scenery->effectVel.z, 0.2f, 5); } } -void SectorY_Scenery112_Update(Scenery* scenery) { +void SectorY_SyShip4Destroyed_Update(SyShip2Destroyed* scenery) { Vec3f src; Vec3f dest; @@ -3921,13 +3935,13 @@ void SectorY_Scenery112_Update(Scenery* scenery) { src.y = RAND_FLOAT_CENTERED(300.0f) + -100.0f; src.z = RAND_FLOAT_CENTERED(5000.0f) + 500.0f; Matrix_MultVec3f(gCalcMatrix, &src, &dest); - func_effect_8007C120(scenery->obj.pos.x + dest.x, scenery->obj.pos.y + dest.y, scenery->obj.pos.z + dest.z, - scenery->effectVel.x, scenery->effectVel.y, scenery->effectVel.z, 0.3f, 5); + Effect_Effect390_Spawn(scenery->obj.pos.x + dest.x, scenery->obj.pos.y + dest.y, scenery->obj.pos.z + dest.z, + scenery->effectVel.x, scenery->effectVel.y, scenery->effectVel.z, 0.3f, 5); src.x = RAND_FLOAT_CENTERED(100.0f) + -600.0f; src.y = RAND_FLOAT_CENTERED(250.0f) + 300.0f; src.z = RAND_FLOAT_CENTERED(1500.0f) + -1650.0f; Matrix_MultVec3f(gCalcMatrix, &src, &dest); - func_effect_8007C120(scenery->obj.pos.x + dest.x, scenery->obj.pos.y + dest.y, scenery->obj.pos.z + dest.z, - scenery->effectVel.x, scenery->effectVel.y, scenery->effectVel.z, 0.2f, 5); + Effect_Effect390_Spawn(scenery->obj.pos.x + dest.x, scenery->obj.pos.y + dest.y, scenery->obj.pos.z + dest.z, + scenery->effectVel.x, scenery->effectVel.y, scenery->effectVel.z, 0.2f, 5); } } diff --git a/src/overlays/ovl_i6/fox_turret.c b/src/overlays/ovl_i6/fox_turret.c index e06c6d4d..c0b2086a 100644 --- a/src/overlays/ovl_i6/fox_turret.c +++ b/src/overlays/ovl_i6/fox_turret.c @@ -118,6 +118,7 @@ void Turret_Shoot(Player* player) { gTexturedLines[i].posBB.z = gActors[i].obj.pos.z; } } + if (gControllerHold[player->num].button & R_TRIG) { player->turretLockOnCount++; if (player->turretLockOnCount > ARRAY_COUNT(gActors)) { @@ -260,11 +261,13 @@ void Turret_Draw(Player* player) { Matrix_Translate(gGfxMatrix, 0.0f, -100.0f, 0.0f, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, player->rot.y * M_DTOR, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, -player->rot.x * M_DTOR, MTXF_APPLY); + if (player->turretState < 2) { Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -5000.0f + (player->turretRecoil * 25), MTXF_APPLY); } else { Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -5000.0f, MTXF_APPLY); } + Matrix_Scale(gGfxMatrix, 12.0f, 12.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); Matrix_Pop(&gGfxMatrix); diff --git a/src/overlays/ovl_i6/fox_ve2.c b/src/overlays/ovl_i6/fox_ve2.c index 70d1f6a0..cbd97cc9 100644 --- a/src/overlays/ovl_i6/fox_ve2.c +++ b/src/overlays/ovl_i6/fox_ve2.c @@ -7,27 +7,27 @@ #include "global.h" #include "assets/ast_venom_2.h" -void Venom2_Boss_Update(BossVE2* boss) { - Math_SmoothStepToF(&boss->fwork[0], boss->fwork[1], 0.5f, 5.0f, 0.0f); +void Venom2_Ve2Base_Update(Ve2Base* this) { + Math_SmoothStepToF(&this->fwork[0], this->fwork[1], 0.5f, 5.0f, 0.0f); } -bool Venom2_Boss_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { - BossVE2* boss = (BossVE2*) data; +bool Venom2_Ve2Base_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { + Ve2Base* this = (Ve2Base*) thisx; if ((limbIndex == 1) || (limbIndex == 2)) { - pos->x -= boss->fwork[0]; + pos->x -= this->fwork[0]; } return false; } -void Venom2_Boss_Draw(BossVE2* boss) { - Animation_GetFrameData(&D_VE2_6014904, 0, boss->vwork); - Animation_DrawSkeleton(3, D_VE2_60149D0, boss->vwork, Venom2_Boss_OverrideLimbDraw, NULL, boss, gCalcMatrix); +void Venom2_Ve2Base_Draw(Ve2Base* this) { + Animation_GetFrameData(&D_VE2_6014904, 0, this->vwork); + Animation_DrawSkeleton(3, D_VE2_60149D0, this->vwork, Venom2_Ve2Base_OverrideLimbDraw, NULL, this, gCalcMatrix); } -void Venom2_UpdateStarWolfEvents(ActorAllRange* actor) { - ActorAllRange_UpdateStarWolfEvents(actor); +void Venom2_UpdateStarWolfEvents(ActorAllRange* this) { + ActorAllRange_UpdateStarWolfEvents(this); } static Vec3f sTeamInitPos[6] = { @@ -63,13 +63,17 @@ void Venom2_UpdateEvents(ActorAllRange* this) { } else { gAllRangeSpawnEvent = 320; gStarWolfMsgTimer = 1200; + this->state = 1; + player->pos.x = 0.0f; player->pos.z = 16000.0f; player->pos.y = 4350.0f; player->rot.x = -20.0f; player->yRot_114 = 0.0f; + this->timer_0BC = 210; + for (team = &gActors[AI360_FALCO], i = AI360_FALCO; i <= AI360_PEPPY; i++, team++) { team->obj.pos.x = sTeamInitPos[i - 1].x; team->obj.pos.y = sTeamInitPos[i - 1].y + 750.f; @@ -178,7 +182,7 @@ void Venom2_UpdateEvents(ActorAllRange* this) { void Venom2_LoadLevelObjects(void) { Actor* actor; - BossVE2* boss; + Boss* boss; Scenery360* scenery360; s32 i; @@ -224,7 +228,7 @@ void Venom2_LoadLevelObjects(void) { boss = &gBosses[0]; Boss_Initialize(boss); boss->obj.status = OBJ_INIT; - boss->obj.id = OBJ_BOSS_VE2; + boss->obj.id = OBJ_BOSS_VE2_BASE; Object_SetInfo(&boss->info, boss->obj.id); } @@ -476,12 +480,17 @@ void Venom2_LevelComplete(Player* player) { gCsCamAtX = player->pos.x; gCsCamAtY = player->pos.y; gCsCamAtZ = player->trueZpos; + Matrix_RotateY(gCalcMatrix, (player->yRot_114 + player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -((player->xRot_120 + player->rot.x + player->aerobaticPitch) * M_DTOR), MTXF_APPLY); + sp64.x = 0.0f; sp64.y = 0.0f; + sp64.z = player->baseSpeed + player->boostSpeed; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp64, &sp58); + player->vel.x = sp58.x; player->vel.z = sp58.z; player->vel.y = sp58.y; @@ -490,14 +499,18 @@ void Venom2_LevelComplete(Player* player) { player->pos.z += player->vel.z; player->trueZpos = player->pos.z; player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; + Math_SmoothStepToF(&player->zRotBarrelRoll, 0.0f, 0.1f, 15.0f, 0.0f); Math_SmoothStepToAngle(&player->aerobaticPitch, 0.0f, 0.1f, 5.0f, 0.0f); + Math_SmoothStepToF(&player->cam.eye.x, gCsCamEyeX, D_ctx_80177A48[0], 100.0f, 0); Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 100.0f, 0); Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 100.0f, 0); + Math_SmoothStepToF(&player->cam.at.x, gCsCamAtX, D_ctx_80177A48[1], 100.0f, 0); Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY, D_ctx_80177A48[1], 100.0f, 0); Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[1], 100.0f, 0); + player->bobPhase += 10.0f; player->yBob = -SIN_DEG(player->bobPhase) * 0.3f; player->rockPhase += 8.0f; diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index 5d675202..77849035 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -2281,7 +2281,7 @@ void Map_801A116C(void) { wings.unk_34 = 0.0f; wings.unk_38 = 0.0f; - func_display_80053658(&wings); + Display_ArwingWings(&wings); Matrix_Pop(&gGfxMatrix); Matrix_Pop(&gGfxMatrix); diff --git a/src/overlays/ovl_menu/fox_title.c b/src/overlays/ovl_menu/fox_title.c index 7ef95caf..2498addb 100644 --- a/src/overlays/ovl_menu/fox_title.c +++ b/src/overlays/ovl_menu/fox_title.c @@ -2263,7 +2263,7 @@ void Title_8018D2B8(s32 arg0) { wings.unk_34 = D_menu_801B84E8[arg0].unk_30; wings.unk_38 = D_menu_801B84E8[arg0].unk_24; - func_display_80053658(&wings); + Display_ArwingWings(&wings); Object_UpdateSfxSource(D_menu_801B84E8[arg0].unk_50); diff --git a/src/overlays/ovl_unused/fox_unused.c b/src/overlays/ovl_unused/fox_unused.c index 8b64d56b..4295a1aa 100644 --- a/src/overlays/ovl_unused/fox_unused.c +++ b/src/overlays/ovl_unused/fox_unused.c @@ -4,7 +4,7 @@ UNK_TYPE D_unused_801875C0; f32* D_unused_80187530[] = { - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, D_ANDROSS_C038DC0, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, aAndAndrossHitbox, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, diff --git a/yamls/ln/rev0/assets.yaml b/yamls/ln/rev0/assets.yaml new file mode 100644 index 00000000..e69de29b diff --git a/yamls/ln/rev0/header.yaml b/yamls/ln/rev0/header.yaml new file mode 100644 index 00000000..c08b512c --- /dev/null +++ b/yamls/ln/rev0/header.yaml @@ -0,0 +1,77 @@ +name: Starfox64 (Gateway 64 (NTSC)) +sha1: 3400e9c2b77fc1f1204f26a32b09b6f759746ae2 +options: + basename: starfox64 + target_path: baserom.ln.rev0.uncompressed.z64 + elf_path: build/starfox64.ln.rev0.elf + ld_script_path: linker_scripts/ln/rev0/starfox64.ld + base_path: . + compiler: GCC + find_file_boundaries: True + header_encoding: ASCII + platform: n64 + undefined_funcs_auto_path: linker_scripts/ln/rev0/auto/undefined_funcs_auto.ld + undefined_syms_auto_path: linker_scripts/ln/rev0/auto/undefined_syms_auto.ld + + symbol_addrs_path: + - linker_scripts/ln/rev0/symbol_addrs.txt + # - linker_scripts/ln/rev0/symbol_addrs_engine.txt + # - linker_scripts/ln/rev0/symbol_addrs_libultra.txt + # - linker_scripts/ln/rev0/symbol_addrs_nlib_funcs.txt + # - linker_scripts/ln/rev0/symbol_addrs_nlib_vars.txt + # - linker_scripts/ln/rev0/symbol_addrs_assets.txt + # - linker_scripts/ln/rev0/symbol_addrs_mesg.txt + # - linker_scripts/ln/rev0/symbol_addrs_audio.txt + # - linker_scripts/ln/rev0/symbol_addrs_overlays.txt + # - linker_scripts/ln/rev0/symbol_addrs_EBFBE0.txt + # - linker_scripts/ln/rev0/ignored_addresses.txt + + asm_path: asm/ln/rev0 + src_path: srcln + asset_path: bin/ln/rev0 + + build_path: build + + extensions_path: tools/splat_ext + mips_abi_float_regs: o32 + create_asm_dependencies: True + do_c_func_detection: True + o_as_suffix: True + gfx_ucode: f3dex + mnemonic_ljust: 12 + rom_address_padding: True + dump_symbols: True + include_macro_inc: False + libultra_symbols: True + hardware_regs: True + + ld_dependencies: True + + + use_legacy_include_asm: False + + asm_function_macro: glabel + asm_jtbl_label_macro: jlabel + asm_data_macro: dlabel + + ld_legacy_generation: True + check_consecutive_segment_types: False + + # section_order: [".text", ".data", ".rodata", ".bss", "bin"] + # auto_all_sections: [".data", ".rodata", ".bss"] + + + + + mips_abi_float_regs: o32 + + + disasm_unknown: True + # string_encoding: ASCII + # data_string_encoding: ASCII + rodata_string_guesser_level: 2 + data_string_guesser_level: 2 + # libultra_symbols: True + # hardware_regs: True + # gfx_ucode: # one of [f3d, f3db, f3dex, f3dexb, f3dex2] +segments: diff --git a/yamls/ln/rev0/main.yaml b/yamls/ln/rev0/main.yaml new file mode 100644 index 00000000..d6d3ee81 --- /dev/null +++ b/yamls/ln/rev0/main.yaml @@ -0,0 +1,156 @@ + - name: header + type: header + start: 0x0 + + - name: boot + type: bin + start: 0x40 + + - name: entry + type: code + start: 0x1000 + vram: 0x80000400 + subsegments: + - [0x1000, hasm] + + - name: main + type: code + start: 0x1060 + vram: 0x80000460 + follows_vram: entry + #bss_size: 0x9A230 + subsegments: + - [0x1060, asm] + # - [0x1290, data] + # - { start: 0xE44F0, type: bss, vram: 0x800E38F0 } + + - name: dma_table + type: code + start: 0xE44F0 + vram: 0x8017DB20 + follows_vram: main + subsegments: + - [0xE44F0, data, dmatable] + + - name: assets + # ast_logo: D28610 + # ast_ending: D2AB10 + # ast_ending_award_front: D46910 + # ast_ending_award_back: D6B990 + # ast_ending_expert: D95420 + # ast_training: DDF520 + # ast_radio: DE9250 + type: bin + start: 0xE4A90 + # vram: 0x800E3E90 + follows_vram: main + + - name: ovl_i1 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i1 + start: 0xDF7760 + vram: 0x8018C5D0 + follows_vram: assets + # bss_size: 0xA10 + symbol_name_format: i1_$VRAM + subsegments: + - [0xDF7760, asm, fox_i1] + + - name: ovl_i2 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i2 + start: 0xE0B930 + vram: 0x8018C5D0 + follows_vram: assets + # bss_size: 0xA10 + symbol_name_format: i2_$VRAM + subsegments: + - [0xE0B930, asm, fox_i2] + + - name: ovl_i3 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i3 + start: 0xE1A180 + vram: 0x8018C5D0 + follows_vram: assets + # bss_size: 0xA10 + symbol_name_format: i3_$VRAM + subsegments: + - [0xE1A180, asm, fox_i3] + + - name: ovl_i4 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i4 + start: 0xE55020 + vram: 0x8018C5D0 + follows_vram: assets + # bss_size: 0xA10 + symbol_name_format: i4_$VRAM + subsegments: + - [0xE55020, asm, fox_i4] + + - name: ovl_i5 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i5 + start: 0xE6DF00 + vram: 0x8018C5D0 + follows_vram: assets + # bss_size: 0xA10 + symbol_name_format: i5_$VRAM + subsegments: + - [0xE6DF00, asm, fox_i5] + + - name: ovl_i6 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i6 + start: 0xEA2850 + vram: 0x8018C5D0 + follows_vram: assets + # bss_size: 0xA10 + symbol_name_format: i6_$VRAM + subsegments: + - [0xEA2850, asm, fox_i6] + + - name: ovl_menu + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_menu + start: 0xEC32A0 + vram: 0x8018C5D0 + follows_vram: assets + # bss_size: 0xA10 + symbol_name_format: menu_$VRAM + subsegments: + - [0xEC32A0, asm, fox_i_menu] + + - name: ovl_ending + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_ending + start: 0xEF2DB0 + vram: 0x8018C5D0 + follows_vram: assets + # bss_size: 0xA10 + symbol_name_format: ending_$VRAM + subsegments: + - [0xEF2DB0, asm, fox_end1] + + - name: ovl_unused + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_unused + start: 0xF02520 + vram: 0x8018C5D0 + follows_vram: assets + # bss_size: 0xA10 + symbol_name_format: unused_$VRAM + subsegments: + - [0xF02520, asm, fox_unused] + + - [0xF025C0] diff --git a/yamls/ln/rev0/overlays.yaml b/yamls/ln/rev0/overlays.yaml new file mode 100644 index 00000000..e69de29b From e42657e8b59d509ba51b27223996827a56aebb85 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Mon, 12 Aug 2024 12:02:50 -0300 Subject: [PATCH 130/151] Katina comment --- src/overlays/ovl_i4/fox_ka.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/overlays/ovl_i4/fox_ka.c b/src/overlays/ovl_i4/fox_ka.c index 6e1ee05f..98f6757a 100644 --- a/src/overlays/ovl_i4/fox_ka.c +++ b/src/overlays/ovl_i4/fox_ka.c @@ -996,6 +996,7 @@ void Katina_KaSaucerer_Update(KaSaucerer* this) { this->fwork[BOSS_Y_ROT_SPEED_TARGET] = 0.0f; this->obj.rot.y = 217.0f; + // Kill remaining enemies from past phase for (i = 10; i < ARRAY_COUNT(gActors); i++) { if (gActors[i].animFrame == 0) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); From e291a588e5035165013896bd6c3cd01189149bd2 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Thu, 15 Aug 2024 01:02:52 -0300 Subject: [PATCH 131/151] LEVELMODE_TURRET --- include/sf64player.h | 2 +- src/engine/fox_display.c | 2 +- src/engine/fox_edisplay.c | 2 +- src/engine/fox_enmy.c | 2 +- src/engine/fox_enmy2.c | 4 ++-- src/engine/fox_hud.c | 2 +- src/engine/fox_play.c | 6 +++--- src/sys/sys_joybus.c | 8 ++++---- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/include/sf64player.h b/include/sf64player.h index 2e2fecbc..85ad278f 100644 --- a/include/sf64player.h +++ b/include/sf64player.h @@ -54,7 +54,7 @@ typedef enum DrawMode { typedef enum LevelMode { /* 0 */ LEVELMODE_ON_RAILS, /* 1 */ LEVELMODE_ALL_RANGE, - /* 2 */ LEVELMODE_UNK_2, + /* 2 */ LEVELMODE_TURRET, // Unused scrapped turret mode /* 3 */ LEVELMODE_MAX, } LevelMode; diff --git a/src/engine/fox_display.c b/src/engine/fox_display.c index 7ef105e8..b95501e3 100644 --- a/src/engine/fox_display.c +++ b/src/engine/fox_display.c @@ -1890,7 +1890,7 @@ void Display_Update(void) { } } - if ((gLevelMode == LEVELMODE_UNK_2) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { + if ((gLevelMode == LEVELMODE_TURRET) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { Turret_Draw(gPlayer); } diff --git a/src/engine/fox_edisplay.c b/src/engine/fox_edisplay.c index 6c2f8c03..bfc66fcb 100644 --- a/src/engine/fox_edisplay.c +++ b/src/engine/fox_edisplay.c @@ -1634,7 +1634,7 @@ void Object_DrawAll(s32 arg0) { } switch (gLevelMode) { case LEVELMODE_ON_RAILS: - case LEVELMODE_UNK_2: + case LEVELMODE_TURRET: Matrix_Push(&gGfxMatrix); if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) || (gCurrentLevel == LEVEL_AQUAS)) { diff --git a/src/engine/fox_enmy.c b/src/engine/fox_enmy.c index 2ee7b60d..a794b8fd 100644 --- a/src/engine/fox_enmy.c +++ b/src/engine/fox_enmy.c @@ -146,7 +146,7 @@ bool func_enmy_80061148(Vec3f* arg0, f32 arg1) { void Object_SetInfo(ObjectInfo* info, u32 objId) { *info = gObjectInfo[objId]; info->hitbox = SEGMENTED_TO_VIRTUAL(gObjectInfo[objId].hitbox); - if (gLevelMode == LEVELMODE_UNK_2) { + if (gLevelMode == LEVELMODE_TURRET) { info->cullDistance += 200.0f; } } diff --git a/src/engine/fox_enmy2.c b/src/engine/fox_enmy2.c index ee920c7e..d3333906 100644 --- a/src/engine/fox_enmy2.c +++ b/src/engine/fox_enmy2.c @@ -2237,7 +2237,7 @@ void ActorEvent_800701E0(ActorEvent* this) { func_effect_8007D10C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->scale * 1.5f); } - if (((gLevelMode == LEVELMODE_ALL_RANGE) || (gLevelMode == LEVELMODE_UNK_2)) && + if (((gLevelMode == LEVELMODE_ALL_RANGE) || (gLevelMode == LEVELMODE_TURRET)) && (this->eventType != EVID_A6_MISSILE) && (this->eventType != EVID_23)) { this->fwork[13] = 20.0f; if (this->obj.pos.x < this->hitPos.x) { @@ -3362,7 +3362,7 @@ void ActorEvent_Update(ActorEvent* this) { } if (this->iwork[6] != 0) { - if ((gLevelMode == LEVELMODE_UNK_2) && (this->eventType == EVID_200)) { + if ((gLevelMode == LEVELMODE_TURRET) && (this->eventType == EVID_200)) { Math_SmoothStepToAngle(&this->obj.rot.x, this->rot_0F4.x, 0.1f, 10.0f, 0.00001f); Math_SmoothStepToAngle(&this->obj.rot.y, this->rot_0F4.y, 0.1f, 10.0f, 0.00001f); } else { diff --git a/src/engine/fox_hud.c b/src/engine/fox_hud.c index 1589f979..8149d6ea 100644 --- a/src/engine/fox_hud.c +++ b/src/engine/fox_hud.c @@ -3514,7 +3514,7 @@ void func_hud_8008F96C(void) { RCP_SetupDL_36(); - if ((gLevelMode != LEVELMODE_UNK_2) && (D_hud_80161708 != 0)) { + if ((gLevelMode != LEVELMODE_TURRET) && (D_hud_80161708 != 0)) { func_hud_8008D4F0(246.0f, 28.0f); func_hud_8008EA14(250.0f, 38.0f); } diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index 7fc39ca5..3589f2ea 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -5422,7 +5422,7 @@ void Player_UpdateEffects(Player* player) { player->xShake = 0.0f; } - if ((gLevelMode != LEVELMODE_UNK_2) && + if ((gLevelMode != LEVELMODE_TURRET) && ((player->knockback.x != 0.f) || (player->knockback.y != 0.f) || (player->knockback.z != 0.f)) && ((player->dmgType >= 40) || (player->dmgType == 21))) { player->boostCooldown = true; @@ -5843,7 +5843,7 @@ void Player_Update(Player* player) { } break; - case LEVELMODE_UNK_2: + case LEVELMODE_TURRET: gLoadLevelObjects = true; Turret_Update(player); Player_CollisionCheck(player); @@ -6531,7 +6531,7 @@ void Camera_Update(Player* player) { Camera_Update360(player, false); break; - case LEVELMODE_UNK_2: + case LEVELMODE_TURRET: Turret_UpdateCamera(player); break; } diff --git a/src/sys/sys_joybus.c b/src/sys/sys_joybus.c index 46ba7fb2..ef4c4e26 100644 --- a/src/sys/sys_joybus.c +++ b/src/sys/sys_joybus.c @@ -5,10 +5,10 @@ OSContPad gControllerPress[4]; u8 gControllerPlugged[4]; u32 gControllerLock; u8 gControllerRumbleEnabled[4]; -OSContPad sNextController[4]; // -OSContPad sPrevController[4]; // -OSContStatus sControllerStatus[4]; // -OSPfs sControllerMotor[4]; // +OSContPad sNextController[4]; +OSContPad sPrevController[4]; +OSContStatus sControllerStatus[4]; +OSPfs sControllerMotor[4]; void Controller_AddDeadZone(s32 contrNum) { s32 temp_v0 = gControllerHold[contrNum].stick_x; From 8d3d4cd2d06b3efb4716b39d9f2f1391037ed737 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Thu, 15 Aug 2024 02:05:53 -0300 Subject: [PATCH 132/151] WingInfo -> ArwingInfo --- include/functions.h | 2 +- include/sf64player.h | 6 +++--- src/engine/fox_display.c | 4 ++-- src/engine/fox_edisplay.c | 2 +- src/overlays/ovl_ending/fox_end2.c | 2 +- src/overlays/ovl_menu/fox_map.c | 2 +- src/overlays/ovl_menu/fox_title.c | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/functions.h b/include/functions.h index 62f1efcc..f97773a5 100644 --- a/include/functions.h +++ b/include/functions.h @@ -86,7 +86,7 @@ void ActorCutscene_Draw(Actor*); void Cutscene_DrawGreatFox(void); // fox_display -void Display_ArwingWings(WingInfo*); +void Display_ArwingWings(ArwingInfo*); void Display_DrawEngineGlow(s32); void Display_SetupPlayerSfxPos(Player*); void Display_Update(void); diff --git a/include/sf64player.h b/include/sf64player.h index 85ad278f..622eb792 100644 --- a/include/sf64player.h +++ b/include/sf64player.h @@ -127,7 +127,7 @@ typedef struct PlayerShot { /* 0x6C */ u8 bonus; } PlayerShot; // size = 0x70 -typedef struct WingInfo { // ArwingInfo +typedef struct ArwingInfo { // ArArwingInfo /* 0x00 */ u8 rightState; // rightWingState /* 0x01 */ u8 leftState; // leftWingState /* 0x04 */ f32 unk_04; // upperRightFlapYrot @@ -144,7 +144,7 @@ typedef struct WingInfo { // ArwingInfo /* 0x30 */ f32 unk_30; // teamFaceXrot /* 0x34 */ f32 unk_34; // teamFaceYrot /* 0x38 */ f32 unk_38; // windshieldXrot -} WingInfo; // size = 0x3C +} ArwingInfo; // size = 0x3C typedef struct PlayerSfx { /* 0x00 */ u8 levelType; @@ -316,7 +316,7 @@ typedef struct Player { /* 0x46C */ f32 sfxVel[3]; /* 0x478 */ PlayerSfx sfx; /* 0x498 */ s32 mercyTimer; - /* 0x49C */ WingInfo wings; + /* 0x49C */ ArwingInfo wings; /* 0x4D8 */ f32 aerobaticPitch; /* 0x4DC */ bool somersault; } Player; // size = 0x4E0 diff --git a/src/engine/fox_display.c b/src/engine/fox_display.c index b95501e3..0f54600c 100644 --- a/src/engine/fox_display.c +++ b/src/engine/fox_display.c @@ -450,7 +450,7 @@ void Display_SetCullingMode(void) { } bool Display_ArwingWingsOverrideLimbDraw(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, void* wingData) { - WingInfo* wings = (WingInfo*) wingData; + ArwingInfo* wings = (ArwingInfo*) wingData; if (D_display_800CA22C && (gPlayer[0].dmgEffect == 0)) { RCP_SetupDL(&gMasterDisp, SETUPDL_29); @@ -558,7 +558,7 @@ bool Display_ArwingWingsOverrideLimbDraw(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos return false; } -void Display_ArwingWings(WingInfo* wings) { +void Display_ArwingWings(ArwingInfo* wings) { Vec3f sp68[30]; s32 modelId; diff --git a/src/engine/fox_edisplay.c b/src/engine/fox_edisplay.c index bfc66fcb..be786487 100644 --- a/src/engine/fox_edisplay.c +++ b/src/engine/fox_edisplay.c @@ -26,7 +26,7 @@ Vec3f D_edisplay_801615D0; Vec3f sViewPos; bool sDrewActor; Matrix D_edisplay_801615F0; -WingInfo D_edisplay_80161630; +ArwingInfo D_edisplay_80161630; char D_edisplay_800CF970[] = "$Id: fox_edisplay.c,v 1.196 1997/05/08 08:31:50 morita Exp $"; diff --git a/src/overlays/ovl_ending/fox_end2.c b/src/overlays/ovl_ending/fox_end2.c index 760eca44..c1402d74 100644 --- a/src/overlays/ovl_ending/fox_end2.c +++ b/src/overlays/ovl_ending/fox_end2.c @@ -3,7 +3,7 @@ #include "assets/ast_ending_expert.h" #include "assets/ast_allies.h" -WingInfo D_ending_80198590; +ArwingInfo D_ending_80198590; Vec3f D_ending_801985D0; Vec3f D_ending_801985E0; Vec3f D_ending_801985F0; diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index 77849035..ca0f8e2f 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -2215,7 +2215,7 @@ void Map_801A0D14(void) { void Map_801A116C(void) { static f32 D_menu_801B6970 = 35.0f; - WingInfo wings; + ArwingInfo wings; Vec3f dest; Vec3f src; s32 colR = 30, colG = 9, colB = 5; diff --git a/src/overlays/ovl_menu/fox_title.c b/src/overlays/ovl_menu/fox_title.c index 2498addb..8baef4d0 100644 --- a/src/overlays/ovl_menu/fox_title.c +++ b/src/overlays/ovl_menu/fox_title.c @@ -2232,7 +2232,7 @@ void Title_8018CD9C(CameraPoint* pos, CameraPoint* arg1, f32 weight, s32 arg3) { } void Title_8018D2B8(s32 arg0) { - WingInfo wings; + ArwingInfo wings; Lights_SetOneLight(&gMasterDisp, D_menu_801B82E0, D_menu_801B82E4, D_menu_801B82E8, gLight1R, gLight1G, gLight1B, gAmbientR, gAmbientG, gAmbientB); From e073a7d0d7d7713283467a9ad8ef6b9aef527f41 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Thu, 15 Aug 2024 02:52:41 -0300 Subject: [PATCH 133/151] wings -> arwing --- include/sf64player.h | 2 +- src/engine/fox_360.c | 8 +- src/engine/fox_demo.c | 62 +++++++------- src/engine/fox_display.c | 84 +++++++++---------- src/engine/fox_edisplay.c | 4 +- src/engine/fox_enmy.c | 13 +-- src/engine/fox_enmy2.c | 11 +-- src/engine/fox_play.c | 127 ++++++++++++++--------------- src/mods/object_ram.c | 2 +- src/overlays/ovl_ending/fox_end2.c | 2 +- src/overlays/ovl_i1/fox_co.c | 24 +++--- src/overlays/ovl_i1/fox_ve1.c | 4 +- src/overlays/ovl_i2/fox_me.c | 4 +- src/overlays/ovl_i2/fox_sx.c | 2 +- src/overlays/ovl_i3/fox_a6.c | 2 +- src/overlays/ovl_i3/fox_aq.c | 16 ++-- src/overlays/ovl_i3/fox_so.c | 6 +- src/overlays/ovl_i3/fox_zo.c | 4 +- src/overlays/ovl_i4/fox_bo.c | 2 +- src/overlays/ovl_i4/fox_fo.c | 12 +-- src/overlays/ovl_i4/fox_ka.c | 8 +- src/overlays/ovl_i5/fox_ma.c | 10 +-- src/overlays/ovl_i6/fox_andross.c | 12 +-- src/overlays/ovl_i6/fox_sy.c | 6 +- src/overlays/ovl_i6/fox_ve2.c | 16 ++-- src/overlays/ovl_menu/fox_map.c | 20 ++--- src/overlays/ovl_menu/fox_title.c | 20 ++--- 27 files changed, 242 insertions(+), 241 deletions(-) diff --git a/include/sf64player.h b/include/sf64player.h index 622eb792..a420875f 100644 --- a/include/sf64player.h +++ b/include/sf64player.h @@ -316,7 +316,7 @@ typedef struct Player { /* 0x46C */ f32 sfxVel[3]; /* 0x478 */ PlayerSfx sfx; /* 0x498 */ s32 mercyTimer; - /* 0x49C */ ArwingInfo wings; + /* 0x49C */ ArwingInfo arwing; /* 0x4D8 */ f32 aerobaticPitch; /* 0x4DC */ bool somersault; } Player; // size = 0x4E0 diff --git a/src/engine/fox_360.c b/src/engine/fox_360.c index 4071055e..115f16c7 100644 --- a/src/engine/fox_360.c +++ b/src/engine/fox_360.c @@ -170,7 +170,7 @@ void AllRange_GreatFoxRepair(Player* player) { player->pos.z = 0.0f; gCsCamAtZ = 0.0f; D_ctx_80177A48[0] = 1.0f; - player->wings.modelId = 1; + player->arwing.modelId = 1; player->csState++; break; @@ -199,8 +199,8 @@ void AllRange_GreatFoxRepair(Player* player) { gCsCamEyeZ = 305.0f; player->shields = Play_GetMaxShields(); - player->wings.rightState = WINGSTATE_INTACT; - player->wings.leftState = WINGSTATE_INTACT; + player->arwing.rightState = WINGSTATE_INTACT; + player->arwing.leftState = WINGSTATE_INTACT; if (gExpertMode) { gRightWingHealth[0] = gLeftWingHealth[0] = 10; @@ -230,7 +230,7 @@ void AllRange_GreatFoxRepair(Player* player) { player->rot.x += 0.4f; if (gCsFrameCount >= 130) { player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; - player->wings.modelId = 0; + player->arwing.modelId = 0; player->unk_014 = 0; player->unk_018 = 0; player->unk_01C = 0; diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index 10512bf0..7c4f5858 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -130,7 +130,7 @@ void Cutscene_WarpZoneComplete(Player* player) { D_ctx_80177A48[0] = 0.0f; D_ctx_80177A48[1] = 0.0f; D_ctx_80177A48[2] = 0.0f; - player->wings.modelId = 1; + player->arwing.modelId = 1; gCsFrameCount = 0; /* fallthrough */ case 1: @@ -776,10 +776,10 @@ void Cutscene_AllRangeMode(Player* player) { } } } - player->wings.unk_10 = 0.0f; - player->wings.unk_08 = 0.0f; - player->wings.unk_0C = 0.0f; - player->wings.unk_04 = 0.0f; + player->arwing.unk_10 = 0.0f; + player->arwing.unk_08 = 0.0f; + player->arwing.unk_0C = 0.0f; + player->arwing.unk_04 = 0.0f; Math_SmoothStepToF(&player->rot.x, 0.0f, 0.1f, 5.0f, 0.0f); Math_SmoothStepToF(&player->rot.y, 0.0f, 0.1f, 5.0f, 0.0f); @@ -796,7 +796,7 @@ void Cutscene_AllRangeMode(Player* player) { D_ctx_80177A48[1] = 0.0f; D_ctx_80177A48[2] = 60.0f; D_ctx_80177A48[3] = 0.0f; - player->wings.modelId = 1; + player->arwing.modelId = 1; player->csState++; gCsFrameCount = 0; /* fallthrough */ @@ -918,14 +918,14 @@ void Cutscene_CoComplete2(Player* player) { case 10: D_ctx_80177A48[2] = 0.0f; player->csState++; - player->wings.unk_04 = 0.0f; - player->wings.unk_0C = 0.0f; - player->wings.unk_08 = 0.0f; - player->wings.unk_10 = 0.0f; + player->arwing.unk_04 = 0.0f; + player->arwing.unk_0C = 0.0f; + player->arwing.unk_08 = 0.0f; + player->arwing.unk_10 = 0.0f; player->zRotBarrelRoll = 0.0f; player->zRotBank = 0.0f; player->boostSpeed = 0.0f; - player->wings.modelId = 1; + player->arwing.modelId = 1; player->baseSpeed = 40.0f; /* fallthrough */ @@ -1020,10 +1020,10 @@ void Cutscene_CoComplete2(Player* player) { if (player->csTimer == 0) { player->csState = 1; player->csTimer = 150; - player->wings.unk_10 = 0.0f; - player->wings.unk_08 = 0.0f; - player->wings.unk_0C = 0.0f; - player->wings.unk_04 = 0.0f; + player->arwing.unk_10 = 0.0f; + player->arwing.unk_08 = 0.0f; + player->arwing.unk_0C = 0.0f; + player->arwing.unk_04 = 0.0f; } break; @@ -1448,10 +1448,10 @@ void Cutscene_UTurn(Player* player) { sp58.y = 60.0f; } - Math_SmoothStepToF(&player->wings.unk_04, sp58.y, 0.3f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->wings.unk_08, sp58.y, 0.3f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->wings.unk_0C, sp58.y, 0.3f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->wings.unk_10, sp58.y, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_04, sp58.y, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_08, sp58.y, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_0C, sp58.y, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_10, sp58.y, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->zRotBank, 0.0f, 0.1f, 15.0f, 0.0f); Math_SmoothStepToF(&player->aerobaticPitch, 190.0f, 0.1f, 6.0f, 0.001f); @@ -1479,13 +1479,13 @@ void Cutscene_UTurn(Player* player) { sp58.y = player->zRotBank * 0.3f; - Math_SmoothStepToF(&player->wings.unk_04, sp58.y, 0.3f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->wings.unk_08, sp58.y, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_04, sp58.y, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_08, sp58.y, 0.3f, 100.0f, 0.0f); sp58.z = -sp58.y; - Math_SmoothStepToF(&player->wings.unk_0C, sp58.z, 0.3f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->wings.unk_10, sp58.z, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_0C, sp58.z, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_10, sp58.z, 0.3f, 100.0f, 0.0f); player->unk_190 = 2.0f; player->cam.eye.x += player->vel.x * 0.1f; @@ -1689,14 +1689,14 @@ void Cutscene_ArwingDown360(Player* player) { func_effect_8007D0E0(player->pos.x, player->pos.y, player->trueZpos, 3.0f); } - if (player->wings.rightState == WINGSTATE_INTACT) { + if (player->arwing.rightState == WINGSTATE_INTACT) { Play_SpawnDebris(1, player->hit1.x, player->hit1.y, player->hit1.z); - player->wings.rightState = WINGSTATE_BROKEN; + player->arwing.rightState = WINGSTATE_BROKEN; func_effect_8007D0E0(player->hit1.x, player->hit1.y, player->hit1.z, 2.0f); } - if (player->wings.leftState == WINGSTATE_INTACT) { + if (player->arwing.leftState == WINGSTATE_INTACT) { Play_SpawnDebris(0, player->hit2.x, player->hit2.y, player->hit2.z); - player->wings.leftState = WINGSTATE_BROKEN; + player->arwing.leftState = WINGSTATE_BROKEN; func_effect_8007D0E0(player->hit2.x, player->hit2.y, player->hit2.z, 2.0f); } } else if (((player->radioDamageTimer > 0) || (player->pos.y < player->pathFloor) || @@ -1796,15 +1796,15 @@ void Cutscene_ArwingDownOnRails(Player* player) { func_enmy_80062C38(player->pos.x, player->pos.z); } - if (player->wings.rightState == WINGSTATE_INTACT) { + if (player->arwing.rightState == WINGSTATE_INTACT) { Play_SpawnDebris(1, player->hit1.x, player->hit1.y, player->hit1.z); - player->wings.rightState = WINGSTATE_NONE; + player->arwing.rightState = WINGSTATE_NONE; func_effect_8007D0E0(player->hit1.x, player->hit1.y, player->hit1.z, 2.0f); } - if (player->wings.leftState == WINGSTATE_INTACT) { + if (player->arwing.leftState == WINGSTATE_INTACT) { Play_SpawnDebris(0, player->hit2.x, player->hit2.y, player->hit2.z); - player->wings.leftState = WINGSTATE_NONE; + player->arwing.leftState = WINGSTATE_NONE; func_effect_8007D0E0(player->hit2.x, player->hit2.y, player->hit2.z, 2.0f); } } else if (((player->radioDamageTimer > 0) || (player->pos.y < player->pathFloor) || (player->csEventTimer == 0)) && diff --git a/src/engine/fox_display.c b/src/engine/fox_display.c index 0f54600c..e1a6d5fe 100644 --- a/src/engine/fox_display.c +++ b/src/engine/fox_display.c @@ -450,7 +450,7 @@ void Display_SetCullingMode(void) { } bool Display_ArwingWingsOverrideLimbDraw(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos, Vec3f* rot, void* wingData) { - ArwingInfo* wings = (ArwingInfo*) wingData; + ArwingInfo* arwing = (ArwingInfo*) wingData; if (D_display_800CA22C && (gPlayer[0].dmgEffect == 0)) { RCP_SetupDL(&gMasterDisp, SETUPDL_29); @@ -459,10 +459,10 @@ bool Display_ArwingWingsOverrideLimbDraw(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos switch (limbIndex) { case 13: - if (wings->rightState == WINGSTATE_NONE) { + if (arwing->rightState == WINGSTATE_NONE) { *gfxPtr = NULL; } - if (wings->rightState == WINGSTATE_BROKEN) { + if (arwing->rightState == WINGSTATE_BROKEN) { *gfxPtr = D_arwing_3015120; } if (D_display_800CA22C && ((gRightWingFlashTimer[0] % 2) != 0)) { @@ -478,7 +478,7 @@ bool Display_ArwingWingsOverrideLimbDraw(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos case 1: case 2: - if (wings->rightState != 2) { + if (arwing->rightState != 2) { *gfxPtr = NULL; } if (D_display_800CA22C && ((gRightWingFlashTimer[0] % 2) != 0)) { @@ -493,10 +493,10 @@ bool Display_ArwingWingsOverrideLimbDraw(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos break; case 12: - if (wings->rightState == WINGSTATE_NONE) { // should be leftState? + if (arwing->rightState == WINGSTATE_NONE) { // should be leftState? *gfxPtr = NULL; } - if (wings->leftState == WINGSTATE_BROKEN) { + if (arwing->leftState == WINGSTATE_BROKEN) { *gfxPtr = D_arwing_3014BF0; } if (D_display_800CA22C && ((gLeftWingFlashTimer[0] % 2) != 0)) { @@ -512,7 +512,7 @@ bool Display_ArwingWingsOverrideLimbDraw(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos case 5: case 6: - if (wings->leftState != 2) { + if (arwing->leftState != 2) { *gfxPtr = NULL; } if (D_display_800CA22C && ((gLeftWingFlashTimer[0] % 2) != 0)) { @@ -529,62 +529,62 @@ bool Display_ArwingWingsOverrideLimbDraw(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos switch (limbIndex) { case 1: - rot->y -= wings->unk_04; + rot->y -= arwing->unk_04; break; case 2: - rot->y -= wings->unk_08; + rot->y -= arwing->unk_08; break; case 5: - rot->y -= wings->unk_10; + rot->y -= arwing->unk_10; break; case 6: - rot->y -= wings->unk_0C; + rot->y -= arwing->unk_0C; break; case 12: - rot->z += wings->unk_20; + rot->z += arwing->unk_20; break; case 13: - rot->z += wings->unk_20; + rot->z += arwing->unk_20; break; case 4: - pos->z -= wings->unk_14; - pos->x += wings->unk_18; + pos->z -= arwing->unk_14; + pos->x += arwing->unk_18; break; case 8: - pos->z += wings->unk_14; - pos->x += wings->unk_18; + pos->z += arwing->unk_14; + pos->x += arwing->unk_18; break; } return false; } -void Display_ArwingWings(ArwingInfo* wings) { +void Display_ArwingWings(ArwingInfo* arwing) { Vec3f sp68[30]; s32 modelId; Matrix_Push(&gGfxMatrix); - wings->unk_18 = 0.0f; - if (wings->unk_14 < -7.0f) { - wings->unk_18 = (-wings->unk_14 - 7.0f) * 2.5f; + arwing->unk_18 = 0.0f; + if (arwing->unk_14 < -7.0f) { + arwing->unk_18 = (-arwing->unk_14 - 7.0f) * 2.5f; } if (gGameState == GSTATE_PLAY) { Animation_DrawSkeleton(1, D_arwing_3016610, gPlayer[0].jointTable, Display_ArwingWingsOverrideLimbDraw, NULL, - wings, &gIdentityMatrix); + arwing, &gIdentityMatrix); } else { if (gGameState == GSTATE_MENU) { Animation_GetFrameData(&D_arwing_3015AF4, 0, sp68); } else { Animation_GetFrameData(&D_arwing_3015C28, 0, sp68); } - Animation_DrawSkeleton(1, D_arwing_3016610, sp68, Display_ArwingWingsOverrideLimbDraw, NULL, wings, + Animation_DrawSkeleton(1, D_arwing_3016610, sp68, Display_ArwingWingsOverrideLimbDraw, NULL, arwing, &gIdentityMatrix); } D_display_800CA22C = false; - modelId = wings->modelId; + modelId = arwing->modelId; if (D_display_800CA220 != 0) { modelId = 1; } @@ -592,8 +592,8 @@ void Display_ArwingWings(ArwingInfo* wings) { if (modelId != 0) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, 6.4f, -16.5f, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, wings->unk_34 * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, wings->unk_30 * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, arwing->unk_34 * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, arwing->unk_30 * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 1.0f / 70.925f, 1.0f / 70.925f, 1.0f / 70.925f, MTXF_APPLY); if (gGameState == GSTATE_ENDING) { Matrix_Scale(gGfxMatrix, 0.95f, 0.95f, 0.95f, MTXF_APPLY); @@ -608,7 +608,7 @@ void Display_ArwingWings(ArwingInfo* wings) { } Matrix_Translate(gGfxMatrix, 0.0f, 17.2f, -25.8f, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, wings->unk_38 * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, arwing->unk_38 * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL_64_2(); @@ -679,25 +679,25 @@ void Display_Arwing(Player* player, s32 reflectY) { } } else { if (gVersusMode) { - if ((player->wings.rightState == WINGSTATE_INTACT) && (player->wings.leftState == WINGSTATE_INTACT)) { + if ((player->arwing.rightState == WINGSTATE_INTACT) && (player->arwing.leftState == WINGSTATE_INTACT)) { gSPDisplayList(gMasterDisp++, D_versus_300EE80); - } else if ((player->wings.rightState <= WINGSTATE_BROKEN) && - (player->wings.leftState == WINGSTATE_INTACT)) { + } else if ((player->arwing.rightState <= WINGSTATE_BROKEN) && + (player->arwing.leftState == WINGSTATE_INTACT)) { gSPDisplayList(gMasterDisp++, D_versus_3010A90); - } else if ((player->wings.rightState == WINGSTATE_INTACT) && - (player->wings.leftState <= WINGSTATE_BROKEN)) { + } else if ((player->arwing.rightState == WINGSTATE_INTACT) && + (player->arwing.leftState <= WINGSTATE_BROKEN)) { gSPDisplayList(gMasterDisp++, D_versus_3011470); } else { gSPDisplayList(gMasterDisp++, D_versus_300D550); } } else { if ((gLevelType == LEVELTYPE_SPACE) || (gCurrentLevel == LEVEL_BOLSE)) { - player->wings.unk_28 = player->wings.unk_04 = player->wings.unk_08 = player->wings.unk_0C = - player->wings.unk_10 = 0.0f; + player->arwing.unk_28 = player->arwing.unk_04 = player->arwing.unk_08 = player->arwing.unk_0C = + player->arwing.unk_10 = 0.0f; } D_display_800CA22C = true; gReflectY = reflectY; - Display_ArwingWings(&player->wings); + Display_ArwingWings(&player->arwing); } } } @@ -1017,7 +1017,7 @@ void Display_ArwingLaserCharge(Player* player) { Matrix_Copy(gCalcMatrix, &D_display_80161418[player->num]); laserStrength = gLaserStrength[player->num]; - if (player->wings.unk_14 > -8.0f) { + if (player->arwing.unk_14 > -8.0f) { laserStrength = LASERS_SINGLE; } @@ -1232,7 +1232,7 @@ void Display_ArwingWingTrail_Draw(Player* player) { RCP_SetupDL_64(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 100); - if (player->wings.leftState == WINGSTATE_INTACT) { + if (player->arwing.leftState == WINGSTATE_INTACT) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, sp5C, sp58, -100.0f, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_DTOR * sp50, MTXF_APPLY); @@ -1245,7 +1245,7 @@ void Display_ArwingWingTrail_Draw(Player* player) { gSPDisplayList(gMasterDisp++, D_102A8A0); Matrix_Pop(&gGfxMatrix); } - if (player->wings.rightState == WINGSTATE_INTACT) { + if (player->arwing.rightState == WINGSTATE_INTACT) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, -sp5C, sp58, -100.0f, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_DTOR * sp50, MTXF_APPLY); @@ -1619,8 +1619,8 @@ void Display_CsLevelCompleteHandleCamera(Player* player) { switch (D_display_800CA220) { case 0: - Math_SmoothStepToAngle(&player->wings.unk_30, 0.0f, 0.2f, 3.0f, 0.0f); - Math_SmoothStepToAngle(&player->wings.unk_34, 0.0f, 0.2f, 3.0f, 0.0f); + Math_SmoothStepToAngle(&player->arwing.unk_30, 0.0f, 0.2f, 3.0f, 0.0f); + Math_SmoothStepToAngle(&player->arwing.unk_34, 0.0f, 0.2f, 3.0f, 0.0f); gPlayCamEye.x = player->cam.eye.x; gPlayCamEye.y = player->cam.eye.y; gPlayCamEye.z = player->cam.eye.z; @@ -1650,8 +1650,8 @@ void Display_CsLevelCompleteHandleCamera(Player* player) { } sp3C = 360.0f - sp3C; - Math_SmoothStepToAngle(&player->wings.unk_30, sp38, 0.2f, 6.0f, 0.0f); - Math_SmoothStepToAngle(&player->wings.unk_34, sp3C, 0.2f, 6.0f, 0.0f); + Math_SmoothStepToAngle(&player->arwing.unk_30, sp38, 0.2f, 6.0f, 0.0f); + Math_SmoothStepToAngle(&player->arwing.unk_34, sp3C, 0.2f, 6.0f, 0.0f); Math_SmoothStepToF(&D_display_800CA380, gControllerPress[0].stick_y * 0.75f, 0.1f, 2.0f, 0.0f); Math_SmoothStepToF(&D_display_800CA384, gControllerPress[0].stick_x * 3.0f, 0.1f, 5.0f, 0.0f); diff --git a/src/engine/fox_edisplay.c b/src/engine/fox_edisplay.c index be786487..34beeb77 100644 --- a/src/engine/fox_edisplay.c +++ b/src/engine/fox_edisplay.c @@ -524,8 +524,8 @@ void func_edisplay_8005B388(Actor199* actor) { (gCurrentLevel == LEVEL_KATINA) && (actor->index == 1)) || ((gCurrentLevel == LEVEL_SECTOR_Y) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) && (actor->state == 5))) { - D_edisplay_80161630.rightState = gPlayer[0].wings.rightState; - D_edisplay_80161630.leftState = gPlayer[0].wings.leftState; + D_edisplay_80161630.rightState = gPlayer[0].arwing.rightState; + D_edisplay_80161630.leftState = gPlayer[0].arwing.leftState; } else { D_edisplay_80161630.rightState = D_edisplay_80161630.leftState = WINGSTATE_INTACT; } diff --git a/src/engine/fox_enmy.c b/src/engine/fox_enmy.c index a794b8fd..d593fe2b 100644 --- a/src/engine/fox_enmy.c +++ b/src/engine/fox_enmy.c @@ -2107,7 +2107,8 @@ void ActorSupplies_Update(ActorSupplies* this) { Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 5.0f); - if (((player[0].wings.rightState <= WINGSTATE_BROKEN) || (player[0].wings.leftState <= WINGSTATE_BROKEN)) && + if (((player[0].arwing.rightState <= WINGSTATE_BROKEN) || + (player[0].arwing.leftState <= WINGSTATE_BROKEN)) && (player[0].form != FORM_LANDMASTER)) { this->itemDrop = DROP_WING_REPAIR; } else if (gPlayer[0].shields < 128) { @@ -2160,13 +2161,13 @@ void ActorSupplies_Draw(Actor* this) { void func_enmy_80067A40(void) { AUDIO_PLAY_SFX(NA_SE_WING_REPAIR, gPlayer[0].sfxSource, 0); - if (gPlayer[0].wings.rightState <= WINGSTATE_BROKEN) { + if (gPlayer[0].arwing.rightState <= WINGSTATE_BROKEN) { gRightWingFlashTimer[0] = 1050; - gPlayer[0].wings.rightState = WINGSTATE_INTACT; + gPlayer[0].arwing.rightState = WINGSTATE_INTACT; } - if (gPlayer[0].wings.leftState <= WINGSTATE_BROKEN) { + if (gPlayer[0].arwing.leftState <= WINGSTATE_BROKEN) { gLeftWingFlashTimer[0] = 1050; - gPlayer[0].wings.leftState = WINGSTATE_INTACT; + gPlayer[0].arwing.leftState = WINGSTATE_INTACT; } if (gExpertMode) { @@ -2260,7 +2261,7 @@ void ItemPickup_Update(Item* this) { void ItemLasers_Update(ItemLasers* this) { if (!gVersusMode && - ((gPlayer[0].wings.leftState <= WINGSTATE_BROKEN) || (gPlayer[0].wings.rightState <= WINGSTATE_BROKEN))) { + ((gPlayer[0].arwing.leftState <= WINGSTATE_BROKEN) || (gPlayer[0].arwing.rightState <= WINGSTATE_BROKEN))) { this->obj.id = OBJ_ITEM_WING_REPAIR; Object_SetInfo(&this->info, this->obj.id); this->timer_48 = 2000; diff --git a/src/engine/fox_enmy2.c b/src/engine/fox_enmy2.c index d3333906..760067a6 100644 --- a/src/engine/fox_enmy2.c +++ b/src/engine/fox_enmy2.c @@ -2570,25 +2570,25 @@ void ActorEvent_ProcessTriggers(ActorEvent* this) { break; case EVC_SINGLE_LASER: - if (gPlayer[0].wings.unk_14 > -8.0f) { + if (gPlayer[0].arwing.unk_14 > -8.0f) { ActorEvent_TriggerBranch(this); } break; case EVC_TWIN_LASER: - if ((gPlayer[0].wings.unk_14 < -8.0f) && (gLaserStrength[0] == LASERS_TWIN)) { + if ((gPlayer[0].arwing.unk_14 < -8.0f) && (gLaserStrength[0] == LASERS_TWIN)) { ActorEvent_TriggerBranch(this); } break; case EVC_HYPER_LASER: - if ((gPlayer[0].wings.unk_14 < -8.0f) && (gLaserStrength[0] == LASERS_HYPER)) { + if ((gPlayer[0].arwing.unk_14 < -8.0f) && (gLaserStrength[0] == LASERS_HYPER)) { ActorEvent_TriggerBranch(this); } break; case EVC_UNK3_LASER: - if ((gPlayer[0].wings.unk_14 < -8.0f) && (gLaserStrength[0] == LASERS_UNK_3)) { + if ((gPlayer[0].arwing.unk_14 < -8.0f) && (gLaserStrength[0] == LASERS_UNK_3)) { ActorEvent_TriggerBranch(this); } break; @@ -2688,7 +2688,8 @@ void ActorEvent_ProcessTriggers(ActorEvent* this) { break; case EVC_WING_BROKEN: - if ((gPlayer[0].wings.rightState <= WINGSTATE_BROKEN) || (gPlayer[0].wings.leftState <= WINGSTATE_BROKEN)) { + if ((gPlayer[0].arwing.rightState <= WINGSTATE_BROKEN) || + (gPlayer[0].arwing.leftState <= WINGSTATE_BROKEN)) { ActorEvent_TriggerBranch(this); } break; diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index 3589f2ea..7ebe456a 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -169,7 +169,7 @@ void Player_WingEffects(Player* player) { if ((gLevelType == LEVELTYPE_PLANET) || ((player->alternateView == true) && (gLevelMode == LEVELMODE_ON_RAILS))) { player->yBob = -SIN_DEG(player->bobPhase) * 0.5f; - if ((player->wings.rightState <= WINGSTATE_BROKEN) || (player->wings.leftState <= WINGSTATE_BROKEN)) { + if ((player->arwing.rightState <= WINGSTATE_BROKEN) || (player->arwing.leftState <= WINGSTATE_BROKEN)) { player->rockAngle = SIN_DEG(player->rockPhase) * 5.0f; } else { player->rockAngle = SIN_DEG(player->rockPhase) * 1.5f; @@ -183,7 +183,7 @@ void Player_DamageEffects(Player* player) { f32 sp40; if (!player->alternateView || (gLevelMode == LEVELMODE_ALL_RANGE)) { - if (player->wings.rightState <= WINGSTATE_BROKEN) { + if (player->arwing.rightState <= WINGSTATE_BROKEN) { if (((gGameFrameCount % 2U) == 0) && (gRightWingDebrisTimer[player->num] != 0)) { func_effect_8007D10C(RAND_FLOAT_CENTERED(10.0f) + player->hit1.x, RAND_FLOAT(5.0f) + player->hit1.y, player->hit1.z, 1.0f); @@ -194,7 +194,7 @@ void Player_DamageEffects(Player* player) { RAND_FLOAT(0.02f) + 0.02f, player->num + 1); } } - if (player->wings.leftState <= WINGSTATE_BROKEN) { + if (player->arwing.leftState <= WINGSTATE_BROKEN) { if (((gGameFrameCount % 2U) == 0) && (gLeftWingDebrisTimer[player->num] != 0)) { func_effect_8007D10C(RAND_FLOAT_CENTERED(10.0f) + player->hit2.x, RAND_FLOAT(5.0f) + player->hit2.y, player->hit2.z, 1.0f); @@ -823,11 +823,11 @@ void Player_DamageWings(Player* player, s32 side, s32 damage) { if ((player->form == FORM_ARWING) && (gShieldAlpha[player->num] < 1.0f)) { if (side == 1) { gRightWingFlashTimer[player->num] = 30; - if (player->wings.rightState == WINGSTATE_INTACT) { + if (player->arwing.rightState == WINGSTATE_INTACT) { gRightWingHealth[player->num] -= damage; if (gRightWingHealth[player->num] <= 0) { Play_SpawnDebris(1, player->hit1.x, player->hit1.y, player->hit1.z); - player->wings.rightState = WINGSTATE_BROKEN; + player->arwing.rightState = WINGSTATE_BROKEN; func_effect_8007D0E0(player->hit1.x, player->hit1.y, player->hit1.z, 2.0f); gRightWingDebrisTimer[player->num] = 50; Player_PlaySfx(player->sfxSource, NA_SE_ARWING_WING_BROKEN, player->num); @@ -838,11 +838,11 @@ void Player_DamageWings(Player* player, s32 side, s32 damage) { } } else if (side == 2) { gLeftWingFlashTimer[player->num] = 30; - if (player->wings.leftState == WINGSTATE_INTACT) { + if (player->arwing.leftState == WINGSTATE_INTACT) { gLeftWingHealth[player->num] -= damage; if (gLeftWingHealth[player->num] <= 0) { Play_SpawnDebris(0, player->hit2.x, player->hit2.y, player->hit2.z); - player->wings.leftState = WINGSTATE_BROKEN; + player->arwing.leftState = WINGSTATE_BROKEN; func_effect_8007D0E0(player->hit2.x, player->hit2.y, player->hit2.z, 2.0f); gLeftWingDebrisTimer[player->num] = 50; Player_PlaySfx(player->sfxSource, NA_SE_ARWING_WING_BROKEN, player->num); @@ -1621,7 +1621,7 @@ void Player_UpdateHitbox(Player* player) { Matrix_RotateZ(gCalcMatrix, -(player->bankAngle * M_DTOR), MTXF_APPLY); sp3C.y = 0.0f; sp3C.z = 0.0f; - if (player->wings.leftState == WINGSTATE_INTACT) { + if (player->arwing.leftState == WINGSTATE_INTACT) { sp3C.x = 40.0f; } else { sp3C.y = -10.0f; @@ -1632,7 +1632,7 @@ void Player_UpdateHitbox(Player* player) { } Matrix_MultVec3f(gCalcMatrix, &sp3C, &player->hit2); - if (player->wings.rightState == WINGSTATE_INTACT) { + if (player->arwing.rightState == WINGSTATE_INTACT) { sp3C.x = -40.0f; } else { sp3C.x = -30.0f; @@ -3026,7 +3026,7 @@ void Player_ArwingLaser(Player* player) { LaserStrength laser; laser = gLaserStrength[gPlayerNum]; - if (player->wings.unk_14 > -8.0f) { + if (player->arwing.unk_14 > -8.0f) { laser = LASERS_SINGLE; } @@ -3293,15 +3293,15 @@ bool Player_UpdateLockOn(Player* player) { void Player_Shoot(Player* player) { switch (player->form) { case FORM_ARWING: - if ((player->wings.rightState <= WINGSTATE_BROKEN) || (player->wings.leftState <= WINGSTATE_BROKEN)) { + if ((player->arwing.rightState <= WINGSTATE_BROKEN) || (player->arwing.leftState <= WINGSTATE_BROKEN)) { gLaserStrength[player->num] = LASERS_SINGLE; } if (!Player_UpdateLockOn(player)) { if (gLaserStrength[gPlayerNum] > LASERS_SINGLE) { - Math_SmoothStepToF(&player->wings.unk_14, -10.0f, 1.0f, 0.5f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_14, -10.0f, 1.0f, 0.5f, 0.0f); } else { - Math_SmoothStepToF(&player->wings.unk_14, 0.0f, 1.0f, 0.5f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_14, 0.0f, 1.0f, 0.5f, 0.0f); } if (gShootButton[player->num] & gInputPress->button) { Player_ArwingLaser(player); @@ -3349,9 +3349,9 @@ void Player_ArwingBank(Player* player) { f32 sp38; sp3C = 0.0f; - if ((player->wings.rightState <= WINGSTATE_BROKEN) && (player->wings.leftState == WINGSTATE_INTACT)) { + if ((player->arwing.rightState <= WINGSTATE_BROKEN) && (player->arwing.leftState == WINGSTATE_INTACT)) { sp3C = -17.0f; - } else if ((player->wings.leftState <= WINGSTATE_BROKEN) && (player->wings.rightState == WINGSTATE_INTACT)) { + } else if ((player->arwing.leftState <= WINGSTATE_BROKEN) && (player->arwing.rightState == WINGSTATE_INTACT)) { sp3C = 17.0f; } @@ -3360,10 +3360,10 @@ void Player_ArwingBank(Player* player) { sp3C = 90.0f; sp38 = 0.2f; if (player->zRotBank < 70.0f) { - Math_SmoothStepToF(&player->wings.unk_04, -70.0f, 0.3f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->wings.unk_08, -70.0f, 0.3f, 100.0f, 0.f); - Math_SmoothStepToF(&player->wings.unk_0C, 70.0f, 0.3f, 100.0f, 0.f); - Math_SmoothStepToF(&player->wings.unk_10, 70.0f, 0.3f, 100.0f, 0.f); + Math_SmoothStepToF(&player->arwing.unk_04, -70.0f, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_08, -70.0f, 0.3f, 100.0f, 0.f); + Math_SmoothStepToF(&player->arwing.unk_0C, 70.0f, 0.3f, 100.0f, 0.f); + Math_SmoothStepToF(&player->arwing.unk_10, 70.0f, 0.3f, 100.0f, 0.f); if (player->pos.y < (gGroundHeight + 70.0f)) { player->pos.y += 6.0f; } @@ -3374,10 +3374,10 @@ void Player_ArwingBank(Player* player) { sp3C = -90.0f; sp38 = 0.2f; if (player->zRotBank > -70.0f) { - Math_SmoothStepToF(&player->wings.unk_04, 70.0f, 0.3f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->wings.unk_08, 70.0f, 0.3f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->wings.unk_0C, -70.0f, 0.3f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->wings.unk_10, -70.0f, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_04, 70.0f, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_08, 70.0f, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_0C, -70.0f, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_10, -70.0f, 0.3f, 100.0f, 0.0f); if (player->pos.y < (gGroundHeight + 70.0f)) { player->pos.y += 6.0f; } @@ -3594,11 +3594,11 @@ void Player_MoveArwing360(Player* player) { sp58 = sp40.x; } - Math_SmoothStepToF(&player->wings.unk_28, 0.0f, 0.1f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->wings.unk_04, -sp60 + sp5C, 0.1f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->wings.unk_08, -sp60 - sp5C, 0.1f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->wings.unk_0C, -sp60 + sp58, 0.1f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->wings.unk_10, -sp60 - sp58, 0.1f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_28, 0.0f, 0.1f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_04, -sp60 + sp5C, 0.1f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_08, -sp60 - sp5C, 0.1f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_0C, -sp60 + sp58, 0.1f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_10, -sp60 - sp58, 0.1f, 100.0f, 0.0f); scale = 0.1f; if ((player->zRotBank > 10.0f) && (sp7C > 0)) { @@ -3668,11 +3668,11 @@ void Player_MoveArwing360(Player* player) { sp4C.x = 0.0f; sp4C.y = 0.0f; - if (player->wings.rightState <= WINGSTATE_BROKEN) { + if (player->arwing.rightState <= WINGSTATE_BROKEN) { sp4C.x -= 2.5f; sp4C.y -= 2.5f; } - if (player->wings.leftState <= WINGSTATE_BROKEN) { + if (player->arwing.leftState <= WINGSTATE_BROKEN) { sp4C.x += 2.5f; sp4C.y -= 2.5f; } @@ -3730,10 +3730,10 @@ void Player_PerformLoop(Player* player) { sp58 = -50.0f; } - Math_SmoothStepToF(&player->wings.unk_04, sp58, 0.3f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->wings.unk_08, sp58, 0.3f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->wings.unk_0C, sp58, 0.3f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->wings.unk_10, sp58, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_04, sp58, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_08, sp58, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_0C, sp58, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_10, sp58, 0.3f, 100.0f, 0.0f); if (player->aerobaticPitch < 180.0f) { player->pos.y += 2.0f; @@ -3857,20 +3857,19 @@ void Player_MoveArwingOnRails(Player* player) { if (sp5C.x > 5.0f) { sp74 = sp5C.x; } - Math_SmoothStepToF(&player->wings.unk_28, 0.0f, 0.1f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->wings.unk_04, (-sp7C) + sp78, 0.1f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->wings.unk_08, (-sp7C) - sp78, 0.1f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->wings.unk_0C, (-sp7C) + sp74, 0.1f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->wings.unk_10, (-sp7C) - sp74, 0.1f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_28, 0.0f, 0.1f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_04, (-sp7C) + sp78, 0.1f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_08, (-sp7C) - sp78, 0.1f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_0C, (-sp7C) + sp74, 0.1f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_10, (-sp7C) - sp74, 0.1f, 100.0f, 0.0f); } sp84 = 0.1f; - if ((player->zRotBank > 10.0f) && (stickX > 0)) { sp84 = 0.2f; gPlayerTurnRate *= 2.0f; } - if ((player->zRotBank < (-10.0f)) && (stickX < 0)) { + if ((player->zRotBank < -10.0f) && (stickX < 0)) { sp84 = 0.2f; gPlayerTurnRate *= 2.0f; } @@ -3944,11 +3943,11 @@ void Player_MoveArwingOnRails(Player* player) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp68, &sp50); - if (player->wings.rightState <= WINGSTATE_BROKEN) { + if (player->arwing.rightState <= WINGSTATE_BROKEN) { player->vel.x += 2.5f; player->vel.y -= 2.5f; } - if (player->wings.leftState <= WINGSTATE_BROKEN) { + if (player->arwing.leftState <= WINGSTATE_BROKEN) { player->vel.x -= 2.5f; player->vel.y -= 2.5f; } @@ -4417,8 +4416,8 @@ void Player_Setup(Player* playerx) { } } - player->wings.rightState = WINGSTATE_INTACT; - player->wings.leftState = WINGSTATE_INTACT; + player->arwing.rightState = WINGSTATE_INTACT; + player->arwing.leftState = WINGSTATE_INTACT; if (gExpertMode) { gLeftWingHealth[gPlayerNum] = 10; @@ -4521,8 +4520,8 @@ void Player_Setup(Player* playerx) { if (D_ctx_80177C9C != 0) { player->shields = D_ctx_80177C9C - 1; gGoldRingCount[0] = D_ctx_80177C94; - player->wings.rightState = D_ctx_80177CAC; - player->wings.leftState = D_ctx_80177CB4; + player->arwing.rightState = D_ctx_80177CAC; + player->arwing.leftState = D_ctx_80177CB4; gRightWingHealth[0] = D_ctx_80177CBC; gLeftWingHealth[0] = D_ctx_80177CC4; if (gCurrentLevel == LEVEL_VENOM_ANDROSS) { @@ -4791,7 +4790,7 @@ void Player_Setup(Player* playerx) { } if (gLaserStrength[gPlayerNum] > LASERS_SINGLE) { - player->wings.unk_14 = -10.0f; + player->arwing.unk_14 = -10.0f; } gPauseEnabled = false; } @@ -5031,11 +5030,11 @@ void Player_ArwingBoost(Player* player) { } } if (gLevelType == LEVELTYPE_PLANET) { - player->wings.unk_28 += (35.0f - player->wings.unk_28) * 0.1f; - Math_SmoothStepToF(&player->wings.unk_04, 0.0f, 0.5f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->wings.unk_08, 0.0f, 0.5f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->wings.unk_0C, 0.0f, 0.5f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->wings.unk_10, 0.0f, 0.5f, 100.0f, 0.0f); + player->arwing.unk_28 += (35.0f - player->arwing.unk_28) * 0.1f; + Math_SmoothStepToF(&player->arwing.unk_04, 0.0f, 0.5f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_08, 0.0f, 0.5f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_0C, 0.0f, 0.5f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_10, 0.0f, 0.5f, 100.0f, 0.0f); } player->boostMeter += sp28; if (player->boostMeter > 90.0f) { @@ -5130,10 +5129,10 @@ void Player_ArwingBrake(Player* player) { } if (gLevelType == LEVELTYPE_PLANET) { - Math_SmoothStepToF(&player->wings.unk_04, 90.0f, 0.2f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->wings.unk_08, -90.0f, 0.2f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->wings.unk_0C, 90.0f, 0.2f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->wings.unk_10, -90.0f, 0.2f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_04, 90.0f, 0.2f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_08, -90.0f, 0.2f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_0C, 90.0f, 0.2f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_10, -90.0f, 0.2f, 100.0f, 0.0f); } player->boostMeter += sp30; @@ -5782,14 +5781,14 @@ void Player_Update(Player* player) { case PLAYERSTATE_1C8_LEVEL_INTRO: gShowHud = 0; gPauseEnabled = false; - player->wings.modelId = 1; + player->arwing.modelId = 1; Cutscene_LevelStart(player); break; case PLAYERSTATE_1C8_ACTIVE: gShowHud = 1; Player_LowHealthMsg(player); - player->wings.modelId = 0; + player->arwing.modelId = 0; D_hud_80161704 = 255; if ((!gVersusMode || gVsMatchStart) && !player->somersault && (gInputPress->button & U_CBUTTONS) && @@ -5860,12 +5859,12 @@ void Player_Update(Player* player) { gVsLockOnTimers[player->num][0] = gVsLockOnTimers[player->num][1] = gVsLockOnTimers[player->num][2] = gVsLockOnTimers[player->num][3] = 0; } - player->wings.modelId = 1; + player->arwing.modelId = 1; - Math_SmoothStepToF(&player->wings.unk_04, 0.0f, 0.1f, 5.0f, 0); - Math_SmoothStepToF(&player->wings.unk_08, 0.0f, 0.1f, 5.0f, 0); - Math_SmoothStepToF(&player->wings.unk_0C, 0.0f, 0.1f, 5.0f, 0); - Math_SmoothStepToF(&player->wings.unk_10, 0.0f, 0.1f, 5.0f, 0); + Math_SmoothStepToF(&player->arwing.unk_04, 0.0f, 0.1f, 5.0f, 0); + Math_SmoothStepToF(&player->arwing.unk_08, 0.0f, 0.1f, 5.0f, 0); + Math_SmoothStepToF(&player->arwing.unk_0C, 0.0f, 0.1f, 5.0f, 0); + Math_SmoothStepToF(&player->arwing.unk_10, 0.0f, 0.1f, 5.0f, 0); Player_UpdateShields(player); Cutscene_UTurn(player); diff --git a/src/mods/object_ram.c b/src/mods/object_ram.c index 2ceb3153..e3a461ce 100644 --- a/src/mods/object_ram.c +++ b/src/mods/object_ram.c @@ -402,7 +402,7 @@ void CheatRam_Select(void) { } void CheatRam_RepairWings(void) { - if ((gPlayer[0].wings.rightState <= WINGSTATE_BROKEN) || (gPlayer[0].wings.leftState <= WINGSTATE_BROKEN)) { + if ((gPlayer[0].arwing.rightState <= WINGSTATE_BROKEN) || (gPlayer[0].arwing.leftState <= WINGSTATE_BROKEN)) { func_enmy_80067A40(); } } diff --git a/src/overlays/ovl_ending/fox_end2.c b/src/overlays/ovl_ending/fox_end2.c index c1402d74..7c1ef9d7 100644 --- a/src/overlays/ovl_ending/fox_end2.c +++ b/src/overlays/ovl_ending/fox_end2.c @@ -1077,7 +1077,7 @@ void Ending_801926D4(void) { if ((0 <= D_ending_80192E70) && (D_ending_80192E70 < 100)) { D_ending_80192E70 = 100; if (!gClearPlayerInfo) { - D_ending_80198590 = gPlayer[0].wings; + D_ending_80198590 = gPlayer[0].arwing; } else { D_ending_80198590.rightState = D_ending_80198590.leftState = WINGSTATE_INTACT; } diff --git a/src/overlays/ovl_i1/fox_co.c b/src/overlays/ovl_i1/fox_co.c index 7a564f36..bebb702f 100644 --- a/src/overlays/ovl_i1/fox_co.c +++ b/src/overlays/ovl_i1/fox_co.c @@ -2964,7 +2964,7 @@ void Corneria_LevelStart(Player* player) { Corneria_SpawnClouds(); - player->wings.unk_30 = 0; + player->arwing.unk_30 = 0; switch (player->csState) { case 0: // LevelStart initialization @@ -3037,7 +3037,7 @@ void Corneria_LevelStart(Player* player) { } if ((player->csTimer < 190) && (player->csTimer > 150)) { - Math_SmoothStepToF(&player->wings.unk_24, 2.0f, 0.2f, 0.5f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_24, 2.0f, 0.2f, 0.5f, 0.0f); } if (player->csTimer < 150) { @@ -3082,7 +3082,7 @@ void Corneria_LevelStart(Player* player) { } if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) { - player->wings.unk_30 = 5.0f; + player->arwing.unk_30 = 5.0f; } break; @@ -3094,7 +3094,7 @@ void Corneria_LevelStart(Player* player) { } if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) { - player->wings.unk_30 = 5.0f; + player->arwing.unk_30 = 5.0f; } gCsCamEyeY = player->pos.y + 10.0f; @@ -3103,7 +3103,7 @@ void Corneria_LevelStart(Player* player) { case 4: if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) { - player->wings.unk_30 = 5.0f; + player->arwing.unk_30 = 5.0f; } Math_SmoothStepToF(&D_ctx_80177A48[0], 0.1f, 1.0f, 0.001f, 0.0f); @@ -3250,9 +3250,9 @@ void Corneria_LevelStart(Player* player) { } // Fox's head rotates back and forth as he speaks. - player->wings.unk_30 = 0.0f; + player->arwing.unk_30 = 0.0f; if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) { - player->wings.unk_30 = 5.0f; + player->arwing.unk_30 = 5.0f; } if (player->csTimer == 80) { @@ -3362,11 +3362,11 @@ void Corneria_LevelStart(Player* player) { Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY - player->yBob, D_ctx_80177A48[0], 20000.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 20000.0f, 0.0f); - Math_SmoothStepToF(&player->wings.unk_04, D_ctx_80177A48[1], 0.2f, 1.0f, 0.0f); - Math_SmoothStepToF(&player->wings.unk_0C, D_ctx_80177A48[2], 0.2f, 1.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_04, D_ctx_80177A48[1], 0.2f, 1.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_0C, D_ctx_80177A48[2], 0.2f, 1.0f, 0.0f); - player->wings.unk_08 = player->wings.unk_04; - player->wings.unk_10 = player->wings.unk_0C; + player->arwing.unk_08 = player->arwing.unk_04; + player->arwing.unk_10 = player->arwing.unk_0C; player->cam.eye.y -= 3.0f; player->cam.at.y -= 3.0f; @@ -3450,7 +3450,7 @@ void Corneria_LevelComplete1(Player* player) { f32 temp_fa1; f32 temp_deg; - player->wings.unk_04 = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = 0.0f; + player->arwing.unk_04 = player->arwing.unk_0C = player->arwing.unk_08 = player->arwing.unk_10 = 0.0f; Math_SmoothStepToF(&player->zRotBarrelRoll, 0.0f, 0.1f, 15.0f, 0.0f); Math_SmoothStepToF(&player->zRotBank, 0.0f, 0.1f, 15.0f, 0.0f); diff --git a/src/overlays/ovl_i1/fox_ve1.c b/src/overlays/ovl_i1/fox_ve1.c index bf89eac5..a3308147 100644 --- a/src/overlays/ovl_i1/fox_ve1.c +++ b/src/overlays/ovl_i1/fox_ve1.c @@ -2376,8 +2376,8 @@ void Venom1_80198414(void) { D_ctx_80177C94 = gGoldRingCount[0]; D_ctx_80177C9C = gPlayer[0].shields + 1; D_ctx_80177CA4 = gHitCount; - D_ctx_80177CAC = gPlayer[0].wings.rightState; - D_ctx_80177CB4 = gPlayer[0].wings.leftState; + D_ctx_80177CAC = gPlayer[0].arwing.rightState; + D_ctx_80177CB4 = gPlayer[0].arwing.leftState; D_ctx_80177CBC = gRightWingHealth[0]; D_ctx_80177CC4 = gLeftWingHealth[0]; Audio_StopPlayerNoise(0); diff --git a/src/overlays/ovl_i2/fox_me.c b/src/overlays/ovl_i2/fox_me.c index fac00b76..bf811364 100644 --- a/src/overlays/ovl_i2/fox_me.c +++ b/src/overlays/ovl_i2/fox_me.c @@ -2020,7 +2020,7 @@ void Meteo_LevelStart(Player* player) { } if (gCsFrameCount > 660) { - player->wings.modelId = 0; + player->arwing.modelId = 0; } if (gCsFrameCount == 340) { @@ -2238,7 +2238,7 @@ void Meteo_LevelComplete(Player* player) { D_ctx_80177A48[1] = 0.0f; D_ctx_80177A48[2] = 0.0f; - player->wings.modelId = 1; + player->arwing.modelId = 1; gCsFrameCount = 0; diff --git a/src/overlays/ovl_i2/fox_sx.c b/src/overlays/ovl_i2/fox_sx.c index 08c76137..8853a624 100644 --- a/src/overlays/ovl_i2/fox_sx.c +++ b/src/overlays/ovl_i2/fox_sx.c @@ -1741,7 +1741,7 @@ void SectorX_LevelComplete(Player* player) { D_ctx_80177A48[2] = 100.0f; D_ctx_80177A48[4] = 100.0f; D_ctx_80177A48[5] = 0.0f; - player->wings.modelId = 1; + player->arwing.modelId = 1; Play_ClearObjectData(); case 1: diff --git a/src/overlays/ovl_i3/fox_a6.c b/src/overlays/ovl_i3/fox_a6.c index 592a19d7..8fc6689e 100644 --- a/src/overlays/ovl_i3/fox_a6.c +++ b/src/overlays/ovl_i3/fox_a6.c @@ -2653,7 +2653,7 @@ void Area6_LevelComplete(Player* player) { case 0: gCsFrameCount = 0; player->csState = 1; - player->wings.modelId = 1; + player->arwing.modelId = 1; player->unk_194 = 5.0f; player->unk_190 = 2.0f; player->baseSpeed = 60.0f; diff --git a/src/overlays/ovl_i3/fox_aq.c b/src/overlays/ovl_i3/fox_aq.c index 8bd61976..c12fd764 100644 --- a/src/overlays/ovl_i3/fox_aq.c +++ b/src/overlays/ovl_i3/fox_aq.c @@ -697,10 +697,10 @@ void Aquas_801AA4BC(Player* player) { rotBankTarget = 90.0f; rotBankScale = 0.2f; if (player->zRotBank < 70.0f) { - Math_SmoothStepToF(&player->wings.unk_04, -70.0f, 0.3f, 100.0f, 0); - Math_SmoothStepToF(&player->wings.unk_08, -70.0f, 0.3f, 100.0f, 0); - Math_SmoothStepToF(&player->wings.unk_0C, 70.0f, 0.3f, 100.0f, 0); - Math_SmoothStepToF(&player->wings.unk_10, 70.0f, 0.3f, 100.0f, 0); + Math_SmoothStepToF(&player->arwing.unk_04, -70.0f, 0.3f, 100.0f, 0); + Math_SmoothStepToF(&player->arwing.unk_08, -70.0f, 0.3f, 100.0f, 0); + Math_SmoothStepToF(&player->arwing.unk_0C, 70.0f, 0.3f, 100.0f, 0); + Math_SmoothStepToF(&player->arwing.unk_10, 70.0f, 0.3f, 100.0f, 0); } } @@ -708,10 +708,10 @@ void Aquas_801AA4BC(Player* player) { rotBankTarget = -90.0f; rotBankScale = 0.2f; if (player->zRotBank > -70.0f) { - Math_SmoothStepToF(&player->wings.unk_04, 70.0f, 0.3f, 100.0f, 0); - Math_SmoothStepToF(&player->wings.unk_08, 70.0f, 0.3f, 100.0f, 0); - Math_SmoothStepToF(&player->wings.unk_0C, -70.0f, 0.3f, 100.0f, 0); - Math_SmoothStepToF(&player->wings.unk_10, -70.0f, 0.3f, 100.0f, 0); + Math_SmoothStepToF(&player->arwing.unk_04, 70.0f, 0.3f, 100.0f, 0); + Math_SmoothStepToF(&player->arwing.unk_08, 70.0f, 0.3f, 100.0f, 0); + Math_SmoothStepToF(&player->arwing.unk_0C, -70.0f, 0.3f, 100.0f, 0); + Math_SmoothStepToF(&player->arwing.unk_10, -70.0f, 0.3f, 100.0f, 0); } } diff --git a/src/overlays/ovl_i3/fox_so.c b/src/overlays/ovl_i3/fox_so.c index eb4c4469..348101f5 100644 --- a/src/overlays/ovl_i3/fox_so.c +++ b/src/overlays/ovl_i3/fox_so.c @@ -3149,7 +3149,7 @@ void Solar_LevelComplete(Player* player) { player->camRoll = player->aerobaticPitch = 0.0f; player->baseSpeed = 40.0f; - player->wings.unk_04 = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = + player->arwing.unk_04 = player->arwing.unk_0C = player->arwing.unk_08 = player->arwing.unk_10 = player->zRotBarrelRoll = player->zRotBank = player->boostSpeed = 0.0f; player->draw = true; @@ -3243,7 +3243,7 @@ void Solar_LevelComplete(Player* player) { player->pos.y = 200.0f; player->pos.z = -(gPathProgress - 500.0f); player->csState++; - player->wings.modelId = 1; + player->arwing.modelId = 1; Audio_StartPlayerNoise(0); @@ -3278,7 +3278,7 @@ void Solar_LevelComplete(Player* player) { gFillScreenAlphaStep = 4; if (gMsgCharIsPrinting) { - player->wings.unk_30 = (s32) (gGameFrameCount % 2U) * 5.0f; + player->arwing.unk_30 = (s32) (gGameFrameCount % 2U) * 5.0f; } switch (gCsFrameCount) { diff --git a/src/overlays/ovl_i3/fox_zo.c b/src/overlays/ovl_i3/fox_zo.c index 1a882af8..5d90544e 100644 --- a/src/overlays/ovl_i3/fox_zo.c +++ b/src/overlays/ovl_i3/fox_zo.c @@ -4763,7 +4763,7 @@ void Zoness_LevelComplete(Player* player) { player->camRoll = 0.0f; player->baseSpeed = 40.0f; player->draw = true; - player->wings.unk_04 = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = + player->arwing.unk_04 = player->arwing.unk_0C = player->arwing.unk_08 = player->arwing.unk_10 = player->zRotBarrelRoll = player->zRotBank = player->boostSpeed = 0.0f; gCsCamEyeX = player->cam.eye.x; @@ -4824,7 +4824,7 @@ void Zoness_LevelComplete(Player* player) { Audio_KillSfxBySource(player->sfxSource); gFillScreenAlpha = 250; player->csTimer = 20; - player->wings.modelId = 1; + player->arwing.modelId = 1; player->baseSpeed = 0.0f; player->rot.x = 0.0f; player->rot.y = 0.0f; diff --git a/src/overlays/ovl_i4/fox_bo.c b/src/overlays/ovl_i4/fox_bo.c index ba16a201..1e3ac8f8 100644 --- a/src/overlays/ovl_i4/fox_bo.c +++ b/src/overlays/ovl_i4/fox_bo.c @@ -1461,7 +1461,7 @@ void Bolse_LevelComplete(Player* player) { gCsFrameCount = 0; gGroundHeight = -10000.0f; player->hideShadow = true; - player->wings.modelId = 1; + player->arwing.modelId = 1; AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_EXPLOSION, actor50->sfxSource, 0); Audio_StartPlayerNoise(0); } diff --git a/src/overlays/ovl_i4/fox_fo.c b/src/overlays/ovl_i4/fox_fo.c index fac911ac..64b5c332 100644 --- a/src/overlays/ovl_i4/fox_fo.c +++ b/src/overlays/ovl_i4/fox_fo.c @@ -673,16 +673,16 @@ void Fortuna_LevelComplete(Player* player) { player->cam.eye.z += player->vel.z * 0.1f; } - player->wings.unk_04 = 0.0f; - player->wings.unk_0C = 0.0f; - player->wings.unk_08 = 0.0f; - player->wings.unk_10 = 0.0f; + player->arwing.unk_04 = 0.0f; + player->arwing.unk_0C = 0.0f; + player->arwing.unk_08 = 0.0f; + player->arwing.unk_10 = 0.0f; Math_SmoothStepToF(&player->boostSpeed, 0.0f, 0.1f, 1.5f, 0.0f); switch (player->csState) { case -1: - player->wings.modelId = 1; + player->arwing.modelId = 1; player->rot.y = 0.0f; player->baseSpeed = 30.0f; player->yRot_114 = 180.0f; @@ -841,7 +841,7 @@ void Fortuna_LevelComplete(Player* player) { } player->pos.z = -10000.0f; gCsFrameCount = 0; - player->wings.modelId = 1; + player->arwing.modelId = 1; player->wingPosition = 1; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 100); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 100); diff --git a/src/overlays/ovl_i4/fox_ka.c b/src/overlays/ovl_i4/fox_ka.c index 98f6757a..af1d4045 100644 --- a/src/overlays/ovl_i4/fox_ka.c +++ b/src/overlays/ovl_i4/fox_ka.c @@ -1800,10 +1800,10 @@ void Katina_LevelComplete(Player* player) { Vec3f dest; f32 angle; - player->wings.unk_10 = 0.0f; - player->wings.unk_0C = 0.0f; - player->wings.unk_08 = 0.0f; - player->wings.unk_04 = 0.0f; + player->arwing.unk_10 = 0.0f; + player->arwing.unk_0C = 0.0f; + player->arwing.unk_08 = 0.0f; + player->arwing.unk_04 = 0.0f; player->aerobaticPitch = 0.0f; diff --git a/src/overlays/ovl_i5/fox_ma.c b/src/overlays/ovl_i5/fox_ma.c index 01ecd3a3..19f7b853 100644 --- a/src/overlays/ovl_i5/fox_ma.c +++ b/src/overlays/ovl_i5/fox_ma.c @@ -6515,13 +6515,13 @@ void Macbeth_LevelComplete2(Player* player) { player->aerobaticPitch = 0.0f; player->camRoll = 0.0f; player->boostSpeed = 0.0f; - player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = player->zRotBarrelRoll = + player->arwing.unk_0C = player->arwing.unk_08 = player->arwing.unk_10 = player->zRotBarrelRoll = player->zRotBank = 0.0f; player->yBob = 0.0f; player->rockAngle = 0.0f; player->unk_16C = 0.0f; player->unk_170 = 0.0f; - player->wings.unk_04 = 0.0f; + player->arwing.unk_04 = 0.0f; /* fallthrough */ case 1: gShowBossHealth = false; @@ -6949,9 +6949,9 @@ void Macbeth_LevelComplete2(Player* player) { player->savedAlternateView = player->pathChangeTimer = 0; player->unk_190 = player->unk_194 = player->unk_188 = player->unk_18C = player->pathChangeYaw = player->yRot_114 = player->aerobaticPitch = player->camRoll = player->unk_174 = player->unk_178 = - player->unk_17C = player->unk_180 = player->unk_184 = player->wings.unk_04 = player->unk_170 = - player->unk_16C = player->rockAngle = player->yBob = player->wings.unk_0C = - player->wings.unk_08 = player->wings.unk_10 = player->zRotBarrelRoll = + player->unk_17C = player->unk_180 = player->unk_184 = player->arwing.unk_04 = player->unk_170 = + player->unk_16C = player->rockAngle = player->yBob = player->arwing.unk_0C = + player->arwing.unk_08 = player->arwing.unk_10 = player->zRotBarrelRoll = player->zRotBank = player->boostSpeed = 0.0f; player->baseSpeed = 5.0f; diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index 0522d18c..650f86f7 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -2594,15 +2594,15 @@ void Andross_AndAndross_Update(AndAndross* this) { this->swork[8] = 0; gControllerRumbleTimers[0] = 30; - if (player->wings.rightState == 2) { + if (player->arwing.rightState == 2) { gRightWingHealth[0] = 0; - player->wings.rightState = 1; + player->arwing.rightState = 1; Andross_Effect396_Spawn2(this->obj.pos.x, this->obj.pos.y - 200.0f, this->obj.pos.z, RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT_CENTERED(10.0f), 10.0f, 8); } - if (player->wings.leftState == 2) { + if (player->arwing.leftState == 2) { gLeftWingHealth[0] = 0; - player->wings.leftState = 1; + player->arwing.leftState = 1; Andross_Effect396_Spawn2(this->obj.pos.x, this->obj.pos.y - 200.0f, this->obj.pos.z, RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT_CENTERED(10.0f), 10.0f, 9); } @@ -3857,12 +3857,12 @@ void Andross_80193C4C(Player* player) { Math_SmoothStepToF(D_ctx_80177A48, 1.0f, 1.0f, 0.01f, 0.0f); - player->wings.unk_04 = player->wings.unk_08 = player->wings.unk_0C = player->wings.unk_10 = 0.0f; + player->arwing.unk_04 = player->arwing.unk_08 = player->arwing.unk_0C = player->arwing.unk_10 = 0.0f; switch (player->csState) { case 0: gCsFrameCount = 0; - player->wings.modelId = 1; + player->arwing.modelId = 1; D_ctx_80177A48[0] = 0.0f; if (player->aerobaticPitch > 180.0f) { player->aerobaticPitch -= 360.0f; diff --git a/src/overlays/ovl_i6/fox_sy.c b/src/overlays/ovl_i6/fox_sy.c index a6b96a4a..def14099 100644 --- a/src/overlays/ovl_i6/fox_sy.c +++ b/src/overlays/ovl_i6/fox_sy.c @@ -2087,7 +2087,7 @@ void SectorY_LevelComplete(Player* player) { player->camRoll = 0.0f; player->baseSpeed = 40.0f; player->boostSpeed = 0.0f; - player->wings.unk_04 = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = + player->arwing.unk_04 = player->arwing.unk_0C = player->arwing.unk_08 = player->arwing.unk_10 = player->zRotBarrelRoll = player->zRotBank = 0.0f; player->draw = true; D_ctx_80177A48[8] = Math_RadToDeg( @@ -2193,13 +2193,13 @@ void SectorY_LevelComplete(Player* player) { D_ctx_80177A48[7] = 25.0f; D_ctx_80177A48[8] = 500.0f; D_ctx_80177A48[9] = 3600.0f; - player->wings.modelId = 1; + player->arwing.modelId = 1; } break; case 3: if ((gCsFrameCount < 720) && gMsgCharIsPrinting) { - player->wings.unk_30 = (f32) (gGameFrameCount & 2) * 5.0f; + player->arwing.unk_30 = (f32) (gGameFrameCount & 2) * 5.0f; } gFillScreenAlphaTarget = 0; diff --git a/src/overlays/ovl_i6/fox_ve2.c b/src/overlays/ovl_i6/fox_ve2.c index cbd97cc9..7bd035f6 100644 --- a/src/overlays/ovl_i6/fox_ve2.c +++ b/src/overlays/ovl_i6/fox_ve2.c @@ -124,8 +124,8 @@ void Venom2_UpdateEvents(ActorAllRange* this) { D_ctx_80177C94 = gGoldRingCount[0]; D_ctx_80177C9C = player->shields + 1; D_play_80161A5C = D_ctx_80177CA4 = gHitCount; - D_ctx_80177CAC = player->wings.rightState; - D_ctx_80177CB4 = player->wings.leftState; + D_ctx_80177CAC = player->arwing.rightState; + D_ctx_80177CB4 = player->arwing.leftState; D_ctx_80177CBC = gRightWingHealth[0]; D_ctx_80177CC4 = gLeftWingHealth[0]; } @@ -302,10 +302,10 @@ void Venom2_LevelComplete(Player* player) { sp70 = temp_fv1; } - Math_SmoothStepToF(&player->wings.unk_04, -var_fa0 + sp74, 0.1f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->wings.unk_08, -var_fa0 - sp74, 0.1f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->wings.unk_0C, -var_fa0 + sp70, 0.1f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->wings.unk_10, -var_fa0 - sp70, 0.1f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_04, -var_fa0 + sp74, 0.1f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_08, -var_fa0 - sp74, 0.1f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_0C, -var_fa0 + sp70, 0.1f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.unk_10, -var_fa0 - sp70, 0.1f, 100.0f, 0.0f); sp94 = player->pos.x - gBosses[0].obj.pos.x; sp90 = player->pos.y - (gBosses[0].obj.pos.y + 700.0f); sp8C = player->pos.z - gBosses[0].obj.pos.z; @@ -313,8 +313,8 @@ void Venom2_LevelComplete(Player* player) { switch (player->csState) { case 0: player->csState++; - player->wings.unk_04 = player->wings.unk_0C = player->wings.unk_08 = player->wings.unk_10 = 0.0f; - player->wings.modelId = 1; + player->arwing.unk_04 = player->arwing.unk_0C = player->arwing.unk_08 = player->arwing.unk_10 = 0.0f; + player->arwing.modelId = 1; D_ctx_80177A48[0] = 0.0f; D_ctx_80177A48[1] = 0.1f; diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index ca0f8e2f..e8cb6ee3 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -2215,7 +2215,7 @@ void Map_801A0D14(void) { void Map_801A116C(void) { static f32 D_menu_801B6970 = 35.0f; - ArwingInfo wings; + ArwingInfo arwing; Vec3f dest; Vec3f src; s32 colR = 30, colG = 9, colB = 5; @@ -2269,19 +2269,19 @@ void Map_801A116C(void) { Matrix_SetGfxMtx(&gMasterDisp); - wings.rightState = wings.leftState = WINGSTATE_INTACT; + arwing.rightState = arwing.leftState = WINGSTATE_INTACT; // clang-format off - wings.unk_18 = wings.unk_1C = wings.unk_20 = wings.unk_24 = wings.unk_04 = - wings.unk_08 = wings.unk_0C = wings.unk_10 = wings.unk_28 = 0.0f; + arwing.unk_18 = arwing.unk_1C = arwing.unk_20 = arwing.unk_24 = arwing.unk_04 = + arwing.unk_08 = arwing.unk_0C = arwing.unk_10 = arwing.unk_28 = 0.0f; // clang-format on - wings.unk_14 = 0.0f; - wings.modelId = 1; - wings.unk_30 = 0.0f; - wings.unk_34 = 0.0f; - wings.unk_38 = 0.0f; + arwing.unk_14 = 0.0f; + arwing.modelId = 1; + arwing.unk_30 = 0.0f; + arwing.unk_34 = 0.0f; + arwing.unk_38 = 0.0f; - Display_ArwingWings(&wings); + Display_ArwingWings(&arwing); Matrix_Pop(&gGfxMatrix); Matrix_Pop(&gGfxMatrix); diff --git a/src/overlays/ovl_menu/fox_title.c b/src/overlays/ovl_menu/fox_title.c index 8baef4d0..a38ab2e3 100644 --- a/src/overlays/ovl_menu/fox_title.c +++ b/src/overlays/ovl_menu/fox_title.c @@ -2232,7 +2232,7 @@ void Title_8018CD9C(CameraPoint* pos, CameraPoint* arg1, f32 weight, s32 arg3) { } void Title_8018D2B8(s32 arg0) { - ArwingInfo wings; + ArwingInfo arwing; Lights_SetOneLight(&gMasterDisp, D_menu_801B82E0, D_menu_801B82E4, D_menu_801B82E8, gLight1R, gLight1G, gLight1B, gAmbientR, gAmbientG, gAmbientB); @@ -2253,17 +2253,17 @@ void Title_8018D2B8(s32 arg0) { Matrix_SetGfxMtx(&gMasterDisp); - wings.rightState = wings.leftState = WINGSTATE_INTACT; - wings.unk_18 = wings.unk_1C = wings.unk_20 = wings.unk_24 = wings.unk_04 = wings.unk_08 = wings.unk_0C = - wings.unk_10 = wings.unk_28 = 0.0f; + arwing.rightState = arwing.leftState = WINGSTATE_INTACT; + arwing.unk_18 = arwing.unk_1C = arwing.unk_20 = arwing.unk_24 = arwing.unk_04 = arwing.unk_08 = arwing.unk_0C = + arwing.unk_10 = arwing.unk_28 = 0.0f; - wings.unk_14 = D_menu_801B84E8[arg0].unk_28; - wings.modelId = D_menu_801B84E8[arg0].unk_34; - wings.unk_30 = D_menu_801B84E8[arg0].unk_2C; - wings.unk_34 = D_menu_801B84E8[arg0].unk_30; - wings.unk_38 = D_menu_801B84E8[arg0].unk_24; + arwing.unk_14 = D_menu_801B84E8[arg0].unk_28; + arwing.modelId = D_menu_801B84E8[arg0].unk_34; + arwing.unk_30 = D_menu_801B84E8[arg0].unk_2C; + arwing.unk_34 = D_menu_801B84E8[arg0].unk_30; + arwing.unk_38 = D_menu_801B84E8[arg0].unk_24; - Display_ArwingWings(&wings); + Display_ArwingWings(&arwing); Object_UpdateSfxSource(D_menu_801B84E8[arg0].unk_50); From ccb74bd0fe37f6de5516e2ecd2eb52487a02f416 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Thu, 15 Aug 2024 02:55:25 -0300 Subject: [PATCH 134/151] rightState -> rightWingState --- include/sf64player.h | 2 +- src/engine/fox_360.c | 2 +- src/engine/fox_demo.c | 8 ++++---- src/engine/fox_display.c | 16 ++++++++-------- src/engine/fox_edisplay.c | 6 +++--- src/engine/fox_enmy.c | 8 ++++---- src/engine/fox_enmy2.c | 2 +- src/engine/fox_play.c | 24 ++++++++++++------------ src/mods/object_ram.c | 2 +- src/overlays/ovl_ending/fox_end2.c | 2 +- src/overlays/ovl_i1/fox_ve1.c | 2 +- src/overlays/ovl_i6/fox_andross.c | 4 ++-- src/overlays/ovl_i6/fox_ve2.c | 2 +- src/overlays/ovl_menu/fox_map.c | 2 +- src/overlays/ovl_menu/fox_title.c | 2 +- 15 files changed, 42 insertions(+), 42 deletions(-) diff --git a/include/sf64player.h b/include/sf64player.h index a420875f..3c75f49a 100644 --- a/include/sf64player.h +++ b/include/sf64player.h @@ -128,7 +128,7 @@ typedef struct PlayerShot { } PlayerShot; // size = 0x70 typedef struct ArwingInfo { // ArArwingInfo - /* 0x00 */ u8 rightState; // rightWingState + /* 0x00 */ u8 rightWingState; // rightWingState /* 0x01 */ u8 leftState; // leftWingState /* 0x04 */ f32 unk_04; // upperRightFlapYrot /* 0x08 */ f32 unk_08; // bottomRightFlapYrot diff --git a/src/engine/fox_360.c b/src/engine/fox_360.c index 115f16c7..99769bbd 100644 --- a/src/engine/fox_360.c +++ b/src/engine/fox_360.c @@ -199,7 +199,7 @@ void AllRange_GreatFoxRepair(Player* player) { gCsCamEyeZ = 305.0f; player->shields = Play_GetMaxShields(); - player->arwing.rightState = WINGSTATE_INTACT; + player->arwing.rightWingState = WINGSTATE_INTACT; player->arwing.leftState = WINGSTATE_INTACT; if (gExpertMode) { diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index 7c4f5858..82fc373b 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -1689,9 +1689,9 @@ void Cutscene_ArwingDown360(Player* player) { func_effect_8007D0E0(player->pos.x, player->pos.y, player->trueZpos, 3.0f); } - if (player->arwing.rightState == WINGSTATE_INTACT) { + if (player->arwing.rightWingState == WINGSTATE_INTACT) { Play_SpawnDebris(1, player->hit1.x, player->hit1.y, player->hit1.z); - player->arwing.rightState = WINGSTATE_BROKEN; + player->arwing.rightWingState = WINGSTATE_BROKEN; func_effect_8007D0E0(player->hit1.x, player->hit1.y, player->hit1.z, 2.0f); } if (player->arwing.leftState == WINGSTATE_INTACT) { @@ -1796,9 +1796,9 @@ void Cutscene_ArwingDownOnRails(Player* player) { func_enmy_80062C38(player->pos.x, player->pos.z); } - if (player->arwing.rightState == WINGSTATE_INTACT) { + if (player->arwing.rightWingState == WINGSTATE_INTACT) { Play_SpawnDebris(1, player->hit1.x, player->hit1.y, player->hit1.z); - player->arwing.rightState = WINGSTATE_NONE; + player->arwing.rightWingState = WINGSTATE_NONE; func_effect_8007D0E0(player->hit1.x, player->hit1.y, player->hit1.z, 2.0f); } diff --git a/src/engine/fox_display.c b/src/engine/fox_display.c index e1a6d5fe..d717b922 100644 --- a/src/engine/fox_display.c +++ b/src/engine/fox_display.c @@ -459,10 +459,10 @@ bool Display_ArwingWingsOverrideLimbDraw(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos switch (limbIndex) { case 13: - if (arwing->rightState == WINGSTATE_NONE) { + if (arwing->rightWingState == WINGSTATE_NONE) { *gfxPtr = NULL; } - if (arwing->rightState == WINGSTATE_BROKEN) { + if (arwing->rightWingState == WINGSTATE_BROKEN) { *gfxPtr = D_arwing_3015120; } if (D_display_800CA22C && ((gRightWingFlashTimer[0] % 2) != 0)) { @@ -478,7 +478,7 @@ bool Display_ArwingWingsOverrideLimbDraw(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos case 1: case 2: - if (arwing->rightState != 2) { + if (arwing->rightWingState != 2) { *gfxPtr = NULL; } if (D_display_800CA22C && ((gRightWingFlashTimer[0] % 2) != 0)) { @@ -493,7 +493,7 @@ bool Display_ArwingWingsOverrideLimbDraw(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos break; case 12: - if (arwing->rightState == WINGSTATE_NONE) { // should be leftState? + if (arwing->rightWingState == WINGSTATE_NONE) { // should be leftState? *gfxPtr = NULL; } if (arwing->leftState == WINGSTATE_BROKEN) { @@ -679,12 +679,12 @@ void Display_Arwing(Player* player, s32 reflectY) { } } else { if (gVersusMode) { - if ((player->arwing.rightState == WINGSTATE_INTACT) && (player->arwing.leftState == WINGSTATE_INTACT)) { + if ((player->arwing.rightWingState == WINGSTATE_INTACT) && (player->arwing.leftState == WINGSTATE_INTACT)) { gSPDisplayList(gMasterDisp++, D_versus_300EE80); - } else if ((player->arwing.rightState <= WINGSTATE_BROKEN) && + } else if ((player->arwing.rightWingState <= WINGSTATE_BROKEN) && (player->arwing.leftState == WINGSTATE_INTACT)) { gSPDisplayList(gMasterDisp++, D_versus_3010A90); - } else if ((player->arwing.rightState == WINGSTATE_INTACT) && + } else if ((player->arwing.rightWingState == WINGSTATE_INTACT) && (player->arwing.leftState <= WINGSTATE_BROKEN)) { gSPDisplayList(gMasterDisp++, D_versus_3011470); } else { @@ -1245,7 +1245,7 @@ void Display_ArwingWingTrail_Draw(Player* player) { gSPDisplayList(gMasterDisp++, D_102A8A0); Matrix_Pop(&gGfxMatrix); } - if (player->arwing.rightState == WINGSTATE_INTACT) { + if (player->arwing.rightWingState == WINGSTATE_INTACT) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, -sp5C, sp58, -100.0f, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_DTOR * sp50, MTXF_APPLY); diff --git a/src/engine/fox_edisplay.c b/src/engine/fox_edisplay.c index 34beeb77..b85685df 100644 --- a/src/engine/fox_edisplay.c +++ b/src/engine/fox_edisplay.c @@ -524,13 +524,13 @@ void func_edisplay_8005B388(Actor199* actor) { (gCurrentLevel == LEVEL_KATINA) && (actor->index == 1)) || ((gCurrentLevel == LEVEL_SECTOR_Y) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) && (actor->state == 5))) { - D_edisplay_80161630.rightState = gPlayer[0].arwing.rightState; + D_edisplay_80161630.rightWingState = gPlayer[0].arwing.rightWingState; D_edisplay_80161630.leftState = gPlayer[0].arwing.leftState; } else { - D_edisplay_80161630.rightState = D_edisplay_80161630.leftState = WINGSTATE_INTACT; + D_edisplay_80161630.rightWingState = D_edisplay_80161630.leftState = WINGSTATE_INTACT; } } else { - D_edisplay_80161630.rightState = D_edisplay_80161630.leftState = WINGSTATE_INTACT; + D_edisplay_80161630.rightWingState = D_edisplay_80161630.leftState = WINGSTATE_INTACT; } D_edisplay_80161630.unk_04 = actor->fwork[15]; D_edisplay_80161630.unk_0C = actor->fwork[16]; diff --git a/src/engine/fox_enmy.c b/src/engine/fox_enmy.c index d593fe2b..c1c34ef6 100644 --- a/src/engine/fox_enmy.c +++ b/src/engine/fox_enmy.c @@ -2107,7 +2107,7 @@ void ActorSupplies_Update(ActorSupplies* this) { Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 5.0f); - if (((player[0].arwing.rightState <= WINGSTATE_BROKEN) || + if (((player[0].arwing.rightWingState <= WINGSTATE_BROKEN) || (player[0].arwing.leftState <= WINGSTATE_BROKEN)) && (player[0].form != FORM_LANDMASTER)) { this->itemDrop = DROP_WING_REPAIR; @@ -2161,9 +2161,9 @@ void ActorSupplies_Draw(Actor* this) { void func_enmy_80067A40(void) { AUDIO_PLAY_SFX(NA_SE_WING_REPAIR, gPlayer[0].sfxSource, 0); - if (gPlayer[0].arwing.rightState <= WINGSTATE_BROKEN) { + if (gPlayer[0].arwing.rightWingState <= WINGSTATE_BROKEN) { gRightWingFlashTimer[0] = 1050; - gPlayer[0].arwing.rightState = WINGSTATE_INTACT; + gPlayer[0].arwing.rightWingState = WINGSTATE_INTACT; } if (gPlayer[0].arwing.leftState <= WINGSTATE_BROKEN) { gLeftWingFlashTimer[0] = 1050; @@ -2261,7 +2261,7 @@ void ItemPickup_Update(Item* this) { void ItemLasers_Update(ItemLasers* this) { if (!gVersusMode && - ((gPlayer[0].arwing.leftState <= WINGSTATE_BROKEN) || (gPlayer[0].arwing.rightState <= WINGSTATE_BROKEN))) { + ((gPlayer[0].arwing.leftState <= WINGSTATE_BROKEN) || (gPlayer[0].arwing.rightWingState <= WINGSTATE_BROKEN))) { this->obj.id = OBJ_ITEM_WING_REPAIR; Object_SetInfo(&this->info, this->obj.id); this->timer_48 = 2000; diff --git a/src/engine/fox_enmy2.c b/src/engine/fox_enmy2.c index 760067a6..4e27e646 100644 --- a/src/engine/fox_enmy2.c +++ b/src/engine/fox_enmy2.c @@ -2688,7 +2688,7 @@ void ActorEvent_ProcessTriggers(ActorEvent* this) { break; case EVC_WING_BROKEN: - if ((gPlayer[0].arwing.rightState <= WINGSTATE_BROKEN) || + if ((gPlayer[0].arwing.rightWingState <= WINGSTATE_BROKEN) || (gPlayer[0].arwing.leftState <= WINGSTATE_BROKEN)) { ActorEvent_TriggerBranch(this); } diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index 7ebe456a..d69cd22e 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -169,7 +169,7 @@ void Player_WingEffects(Player* player) { if ((gLevelType == LEVELTYPE_PLANET) || ((player->alternateView == true) && (gLevelMode == LEVELMODE_ON_RAILS))) { player->yBob = -SIN_DEG(player->bobPhase) * 0.5f; - if ((player->arwing.rightState <= WINGSTATE_BROKEN) || (player->arwing.leftState <= WINGSTATE_BROKEN)) { + if ((player->arwing.rightWingState <= WINGSTATE_BROKEN) || (player->arwing.leftState <= WINGSTATE_BROKEN)) { player->rockAngle = SIN_DEG(player->rockPhase) * 5.0f; } else { player->rockAngle = SIN_DEG(player->rockPhase) * 1.5f; @@ -183,7 +183,7 @@ void Player_DamageEffects(Player* player) { f32 sp40; if (!player->alternateView || (gLevelMode == LEVELMODE_ALL_RANGE)) { - if (player->arwing.rightState <= WINGSTATE_BROKEN) { + if (player->arwing.rightWingState <= WINGSTATE_BROKEN) { if (((gGameFrameCount % 2U) == 0) && (gRightWingDebrisTimer[player->num] != 0)) { func_effect_8007D10C(RAND_FLOAT_CENTERED(10.0f) + player->hit1.x, RAND_FLOAT(5.0f) + player->hit1.y, player->hit1.z, 1.0f); @@ -823,11 +823,11 @@ void Player_DamageWings(Player* player, s32 side, s32 damage) { if ((player->form == FORM_ARWING) && (gShieldAlpha[player->num] < 1.0f)) { if (side == 1) { gRightWingFlashTimer[player->num] = 30; - if (player->arwing.rightState == WINGSTATE_INTACT) { + if (player->arwing.rightWingState == WINGSTATE_INTACT) { gRightWingHealth[player->num] -= damage; if (gRightWingHealth[player->num] <= 0) { Play_SpawnDebris(1, player->hit1.x, player->hit1.y, player->hit1.z); - player->arwing.rightState = WINGSTATE_BROKEN; + player->arwing.rightWingState = WINGSTATE_BROKEN; func_effect_8007D0E0(player->hit1.x, player->hit1.y, player->hit1.z, 2.0f); gRightWingDebrisTimer[player->num] = 50; Player_PlaySfx(player->sfxSource, NA_SE_ARWING_WING_BROKEN, player->num); @@ -1632,7 +1632,7 @@ void Player_UpdateHitbox(Player* player) { } Matrix_MultVec3f(gCalcMatrix, &sp3C, &player->hit2); - if (player->arwing.rightState == WINGSTATE_INTACT) { + if (player->arwing.rightWingState == WINGSTATE_INTACT) { sp3C.x = -40.0f; } else { sp3C.x = -30.0f; @@ -3293,7 +3293,7 @@ bool Player_UpdateLockOn(Player* player) { void Player_Shoot(Player* player) { switch (player->form) { case FORM_ARWING: - if ((player->arwing.rightState <= WINGSTATE_BROKEN) || (player->arwing.leftState <= WINGSTATE_BROKEN)) { + if ((player->arwing.rightWingState <= WINGSTATE_BROKEN) || (player->arwing.leftState <= WINGSTATE_BROKEN)) { gLaserStrength[player->num] = LASERS_SINGLE; } @@ -3349,9 +3349,9 @@ void Player_ArwingBank(Player* player) { f32 sp38; sp3C = 0.0f; - if ((player->arwing.rightState <= WINGSTATE_BROKEN) && (player->arwing.leftState == WINGSTATE_INTACT)) { + if ((player->arwing.rightWingState <= WINGSTATE_BROKEN) && (player->arwing.leftState == WINGSTATE_INTACT)) { sp3C = -17.0f; - } else if ((player->arwing.leftState <= WINGSTATE_BROKEN) && (player->arwing.rightState == WINGSTATE_INTACT)) { + } else if ((player->arwing.leftState <= WINGSTATE_BROKEN) && (player->arwing.rightWingState == WINGSTATE_INTACT)) { sp3C = 17.0f; } @@ -3668,7 +3668,7 @@ void Player_MoveArwing360(Player* player) { sp4C.x = 0.0f; sp4C.y = 0.0f; - if (player->arwing.rightState <= WINGSTATE_BROKEN) { + if (player->arwing.rightWingState <= WINGSTATE_BROKEN) { sp4C.x -= 2.5f; sp4C.y -= 2.5f; } @@ -3943,7 +3943,7 @@ void Player_MoveArwingOnRails(Player* player) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp68, &sp50); - if (player->arwing.rightState <= WINGSTATE_BROKEN) { + if (player->arwing.rightWingState <= WINGSTATE_BROKEN) { player->vel.x += 2.5f; player->vel.y -= 2.5f; } @@ -4416,7 +4416,7 @@ void Player_Setup(Player* playerx) { } } - player->arwing.rightState = WINGSTATE_INTACT; + player->arwing.rightWingState = WINGSTATE_INTACT; player->arwing.leftState = WINGSTATE_INTACT; if (gExpertMode) { @@ -4520,7 +4520,7 @@ void Player_Setup(Player* playerx) { if (D_ctx_80177C9C != 0) { player->shields = D_ctx_80177C9C - 1; gGoldRingCount[0] = D_ctx_80177C94; - player->arwing.rightState = D_ctx_80177CAC; + player->arwing.rightWingState = D_ctx_80177CAC; player->arwing.leftState = D_ctx_80177CB4; gRightWingHealth[0] = D_ctx_80177CBC; gLeftWingHealth[0] = D_ctx_80177CC4; diff --git a/src/mods/object_ram.c b/src/mods/object_ram.c index e3a461ce..aee12afc 100644 --- a/src/mods/object_ram.c +++ b/src/mods/object_ram.c @@ -402,7 +402,7 @@ void CheatRam_Select(void) { } void CheatRam_RepairWings(void) { - if ((gPlayer[0].arwing.rightState <= WINGSTATE_BROKEN) || (gPlayer[0].arwing.leftState <= WINGSTATE_BROKEN)) { + if ((gPlayer[0].arwing.rightWingState <= WINGSTATE_BROKEN) || (gPlayer[0].arwing.leftState <= WINGSTATE_BROKEN)) { func_enmy_80067A40(); } } diff --git a/src/overlays/ovl_ending/fox_end2.c b/src/overlays/ovl_ending/fox_end2.c index 7c1ef9d7..59fe162d 100644 --- a/src/overlays/ovl_ending/fox_end2.c +++ b/src/overlays/ovl_ending/fox_end2.c @@ -1079,7 +1079,7 @@ void Ending_801926D4(void) { if (!gClearPlayerInfo) { D_ending_80198590 = gPlayer[0].arwing; } else { - D_ending_80198590.rightState = D_ending_80198590.leftState = WINGSTATE_INTACT; + D_ending_80198590.rightWingState = D_ending_80198590.leftState = WINGSTATE_INTACT; } AUDIO_PLAY_BGM(NA_BGM_STAFF_ROLL); } diff --git a/src/overlays/ovl_i1/fox_ve1.c b/src/overlays/ovl_i1/fox_ve1.c index a3308147..4942bdaf 100644 --- a/src/overlays/ovl_i1/fox_ve1.c +++ b/src/overlays/ovl_i1/fox_ve1.c @@ -2376,7 +2376,7 @@ void Venom1_80198414(void) { D_ctx_80177C94 = gGoldRingCount[0]; D_ctx_80177C9C = gPlayer[0].shields + 1; D_ctx_80177CA4 = gHitCount; - D_ctx_80177CAC = gPlayer[0].arwing.rightState; + D_ctx_80177CAC = gPlayer[0].arwing.rightWingState; D_ctx_80177CB4 = gPlayer[0].arwing.leftState; D_ctx_80177CBC = gRightWingHealth[0]; D_ctx_80177CC4 = gLeftWingHealth[0]; diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index 650f86f7..14037d44 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -2594,9 +2594,9 @@ void Andross_AndAndross_Update(AndAndross* this) { this->swork[8] = 0; gControllerRumbleTimers[0] = 30; - if (player->arwing.rightState == 2) { + if (player->arwing.rightWingState == 2) { gRightWingHealth[0] = 0; - player->arwing.rightState = 1; + player->arwing.rightWingState = 1; Andross_Effect396_Spawn2(this->obj.pos.x, this->obj.pos.y - 200.0f, this->obj.pos.z, RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT_CENTERED(10.0f), 10.0f, 8); } diff --git a/src/overlays/ovl_i6/fox_ve2.c b/src/overlays/ovl_i6/fox_ve2.c index 7bd035f6..000488d0 100644 --- a/src/overlays/ovl_i6/fox_ve2.c +++ b/src/overlays/ovl_i6/fox_ve2.c @@ -124,7 +124,7 @@ void Venom2_UpdateEvents(ActorAllRange* this) { D_ctx_80177C94 = gGoldRingCount[0]; D_ctx_80177C9C = player->shields + 1; D_play_80161A5C = D_ctx_80177CA4 = gHitCount; - D_ctx_80177CAC = player->arwing.rightState; + D_ctx_80177CAC = player->arwing.rightWingState; D_ctx_80177CB4 = player->arwing.leftState; D_ctx_80177CBC = gRightWingHealth[0]; D_ctx_80177CC4 = gLeftWingHealth[0]; diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index e8cb6ee3..47d0741e 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -2269,7 +2269,7 @@ void Map_801A116C(void) { Matrix_SetGfxMtx(&gMasterDisp); - arwing.rightState = arwing.leftState = WINGSTATE_INTACT; + arwing.rightWingState = arwing.leftState = WINGSTATE_INTACT; // clang-format off arwing.unk_18 = arwing.unk_1C = arwing.unk_20 = arwing.unk_24 = arwing.unk_04 = arwing.unk_08 = arwing.unk_0C = arwing.unk_10 = arwing.unk_28 = 0.0f; diff --git a/src/overlays/ovl_menu/fox_title.c b/src/overlays/ovl_menu/fox_title.c index a38ab2e3..1ea5117a 100644 --- a/src/overlays/ovl_menu/fox_title.c +++ b/src/overlays/ovl_menu/fox_title.c @@ -2253,7 +2253,7 @@ void Title_8018D2B8(s32 arg0) { Matrix_SetGfxMtx(&gMasterDisp); - arwing.rightState = arwing.leftState = WINGSTATE_INTACT; + arwing.rightWingState = arwing.leftState = WINGSTATE_INTACT; arwing.unk_18 = arwing.unk_1C = arwing.unk_20 = arwing.unk_24 = arwing.unk_04 = arwing.unk_08 = arwing.unk_0C = arwing.unk_10 = arwing.unk_28 = 0.0f; From bef7345bf77c3a9f6868d260c7e120b1747b8c4e Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Thu, 15 Aug 2024 02:56:41 -0300 Subject: [PATCH 135/151] leftState -> leftWingState --- include/sf64player.h | 2 +- src/engine/fox_360.c | 2 +- src/engine/fox_demo.c | 8 ++++---- src/engine/fox_display.c | 14 +++++++------- src/engine/fox_edisplay.c | 6 +++--- src/engine/fox_enmy.c | 8 ++++---- src/engine/fox_enmy2.c | 2 +- src/engine/fox_play.c | 24 ++++++++++++------------ src/mods/object_ram.c | 2 +- src/overlays/ovl_ending/fox_end2.c | 2 +- src/overlays/ovl_i1/fox_ve1.c | 2 +- src/overlays/ovl_i6/fox_andross.c | 4 ++-- src/overlays/ovl_i6/fox_ve2.c | 2 +- src/overlays/ovl_menu/fox_map.c | 2 +- src/overlays/ovl_menu/fox_title.c | 2 +- 15 files changed, 41 insertions(+), 41 deletions(-) diff --git a/include/sf64player.h b/include/sf64player.h index 3c75f49a..e6749a77 100644 --- a/include/sf64player.h +++ b/include/sf64player.h @@ -129,7 +129,7 @@ typedef struct PlayerShot { typedef struct ArwingInfo { // ArArwingInfo /* 0x00 */ u8 rightWingState; // rightWingState - /* 0x01 */ u8 leftState; // leftWingState + /* 0x01 */ u8 leftWingState; // leftWingState /* 0x04 */ f32 unk_04; // upperRightFlapYrot /* 0x08 */ f32 unk_08; // bottomRightFlapYrot /* 0x0C */ f32 unk_0C; // upperLeftFlapYrot diff --git a/src/engine/fox_360.c b/src/engine/fox_360.c index 99769bbd..a829bdd5 100644 --- a/src/engine/fox_360.c +++ b/src/engine/fox_360.c @@ -200,7 +200,7 @@ void AllRange_GreatFoxRepair(Player* player) { player->shields = Play_GetMaxShields(); player->arwing.rightWingState = WINGSTATE_INTACT; - player->arwing.leftState = WINGSTATE_INTACT; + player->arwing.leftWingState = WINGSTATE_INTACT; if (gExpertMode) { gRightWingHealth[0] = gLeftWingHealth[0] = 10; diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index 82fc373b..875d7073 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -1694,9 +1694,9 @@ void Cutscene_ArwingDown360(Player* player) { player->arwing.rightWingState = WINGSTATE_BROKEN; func_effect_8007D0E0(player->hit1.x, player->hit1.y, player->hit1.z, 2.0f); } - if (player->arwing.leftState == WINGSTATE_INTACT) { + if (player->arwing.leftWingState == WINGSTATE_INTACT) { Play_SpawnDebris(0, player->hit2.x, player->hit2.y, player->hit2.z); - player->arwing.leftState = WINGSTATE_BROKEN; + player->arwing.leftWingState = WINGSTATE_BROKEN; func_effect_8007D0E0(player->hit2.x, player->hit2.y, player->hit2.z, 2.0f); } } else if (((player->radioDamageTimer > 0) || (player->pos.y < player->pathFloor) || @@ -1802,9 +1802,9 @@ void Cutscene_ArwingDownOnRails(Player* player) { func_effect_8007D0E0(player->hit1.x, player->hit1.y, player->hit1.z, 2.0f); } - if (player->arwing.leftState == WINGSTATE_INTACT) { + if (player->arwing.leftWingState == WINGSTATE_INTACT) { Play_SpawnDebris(0, player->hit2.x, player->hit2.y, player->hit2.z); - player->arwing.leftState = WINGSTATE_NONE; + player->arwing.leftWingState = WINGSTATE_NONE; func_effect_8007D0E0(player->hit2.x, player->hit2.y, player->hit2.z, 2.0f); } } else if (((player->radioDamageTimer > 0) || (player->pos.y < player->pathFloor) || (player->csEventTimer == 0)) && diff --git a/src/engine/fox_display.c b/src/engine/fox_display.c index d717b922..3671b0d0 100644 --- a/src/engine/fox_display.c +++ b/src/engine/fox_display.c @@ -493,10 +493,10 @@ bool Display_ArwingWingsOverrideLimbDraw(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos break; case 12: - if (arwing->rightWingState == WINGSTATE_NONE) { // should be leftState? + if (arwing->rightWingState == WINGSTATE_NONE) { // should be leftWingState? *gfxPtr = NULL; } - if (arwing->leftState == WINGSTATE_BROKEN) { + if (arwing->leftWingState == WINGSTATE_BROKEN) { *gfxPtr = D_arwing_3014BF0; } if (D_display_800CA22C && ((gLeftWingFlashTimer[0] % 2) != 0)) { @@ -512,7 +512,7 @@ bool Display_ArwingWingsOverrideLimbDraw(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos case 5: case 6: - if (arwing->leftState != 2) { + if (arwing->leftWingState != 2) { *gfxPtr = NULL; } if (D_display_800CA22C && ((gLeftWingFlashTimer[0] % 2) != 0)) { @@ -679,13 +679,13 @@ void Display_Arwing(Player* player, s32 reflectY) { } } else { if (gVersusMode) { - if ((player->arwing.rightWingState == WINGSTATE_INTACT) && (player->arwing.leftState == WINGSTATE_INTACT)) { + if ((player->arwing.rightWingState == WINGSTATE_INTACT) && (player->arwing.leftWingState == WINGSTATE_INTACT)) { gSPDisplayList(gMasterDisp++, D_versus_300EE80); } else if ((player->arwing.rightWingState <= WINGSTATE_BROKEN) && - (player->arwing.leftState == WINGSTATE_INTACT)) { + (player->arwing.leftWingState == WINGSTATE_INTACT)) { gSPDisplayList(gMasterDisp++, D_versus_3010A90); } else if ((player->arwing.rightWingState == WINGSTATE_INTACT) && - (player->arwing.leftState <= WINGSTATE_BROKEN)) { + (player->arwing.leftWingState <= WINGSTATE_BROKEN)) { gSPDisplayList(gMasterDisp++, D_versus_3011470); } else { gSPDisplayList(gMasterDisp++, D_versus_300D550); @@ -1232,7 +1232,7 @@ void Display_ArwingWingTrail_Draw(Player* player) { RCP_SetupDL_64(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 100); - if (player->arwing.leftState == WINGSTATE_INTACT) { + if (player->arwing.leftWingState == WINGSTATE_INTACT) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, sp5C, sp58, -100.0f, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_DTOR * sp50, MTXF_APPLY); diff --git a/src/engine/fox_edisplay.c b/src/engine/fox_edisplay.c index b85685df..84756c19 100644 --- a/src/engine/fox_edisplay.c +++ b/src/engine/fox_edisplay.c @@ -525,12 +525,12 @@ void func_edisplay_8005B388(Actor199* actor) { ((gCurrentLevel == LEVEL_SECTOR_Y) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) && (actor->state == 5))) { D_edisplay_80161630.rightWingState = gPlayer[0].arwing.rightWingState; - D_edisplay_80161630.leftState = gPlayer[0].arwing.leftState; + D_edisplay_80161630.leftWingState = gPlayer[0].arwing.leftWingState; } else { - D_edisplay_80161630.rightWingState = D_edisplay_80161630.leftState = WINGSTATE_INTACT; + D_edisplay_80161630.rightWingState = D_edisplay_80161630.leftWingState = WINGSTATE_INTACT; } } else { - D_edisplay_80161630.rightWingState = D_edisplay_80161630.leftState = WINGSTATE_INTACT; + D_edisplay_80161630.rightWingState = D_edisplay_80161630.leftWingState = WINGSTATE_INTACT; } D_edisplay_80161630.unk_04 = actor->fwork[15]; D_edisplay_80161630.unk_0C = actor->fwork[16]; diff --git a/src/engine/fox_enmy.c b/src/engine/fox_enmy.c index c1c34ef6..9a0dc215 100644 --- a/src/engine/fox_enmy.c +++ b/src/engine/fox_enmy.c @@ -2108,7 +2108,7 @@ void ActorSupplies_Update(ActorSupplies* this) { func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 5.0f); if (((player[0].arwing.rightWingState <= WINGSTATE_BROKEN) || - (player[0].arwing.leftState <= WINGSTATE_BROKEN)) && + (player[0].arwing.leftWingState <= WINGSTATE_BROKEN)) && (player[0].form != FORM_LANDMASTER)) { this->itemDrop = DROP_WING_REPAIR; } else if (gPlayer[0].shields < 128) { @@ -2165,9 +2165,9 @@ void func_enmy_80067A40(void) { gRightWingFlashTimer[0] = 1050; gPlayer[0].arwing.rightWingState = WINGSTATE_INTACT; } - if (gPlayer[0].arwing.leftState <= WINGSTATE_BROKEN) { + if (gPlayer[0].arwing.leftWingState <= WINGSTATE_BROKEN) { gLeftWingFlashTimer[0] = 1050; - gPlayer[0].arwing.leftState = WINGSTATE_INTACT; + gPlayer[0].arwing.leftWingState = WINGSTATE_INTACT; } if (gExpertMode) { @@ -2261,7 +2261,7 @@ void ItemPickup_Update(Item* this) { void ItemLasers_Update(ItemLasers* this) { if (!gVersusMode && - ((gPlayer[0].arwing.leftState <= WINGSTATE_BROKEN) || (gPlayer[0].arwing.rightWingState <= WINGSTATE_BROKEN))) { + ((gPlayer[0].arwing.leftWingState <= WINGSTATE_BROKEN) || (gPlayer[0].arwing.rightWingState <= WINGSTATE_BROKEN))) { this->obj.id = OBJ_ITEM_WING_REPAIR; Object_SetInfo(&this->info, this->obj.id); this->timer_48 = 2000; diff --git a/src/engine/fox_enmy2.c b/src/engine/fox_enmy2.c index 4e27e646..6ea5aac8 100644 --- a/src/engine/fox_enmy2.c +++ b/src/engine/fox_enmy2.c @@ -2689,7 +2689,7 @@ void ActorEvent_ProcessTriggers(ActorEvent* this) { case EVC_WING_BROKEN: if ((gPlayer[0].arwing.rightWingState <= WINGSTATE_BROKEN) || - (gPlayer[0].arwing.leftState <= WINGSTATE_BROKEN)) { + (gPlayer[0].arwing.leftWingState <= WINGSTATE_BROKEN)) { ActorEvent_TriggerBranch(this); } break; diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index d69cd22e..b59617ad 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -169,7 +169,7 @@ void Player_WingEffects(Player* player) { if ((gLevelType == LEVELTYPE_PLANET) || ((player->alternateView == true) && (gLevelMode == LEVELMODE_ON_RAILS))) { player->yBob = -SIN_DEG(player->bobPhase) * 0.5f; - if ((player->arwing.rightWingState <= WINGSTATE_BROKEN) || (player->arwing.leftState <= WINGSTATE_BROKEN)) { + if ((player->arwing.rightWingState <= WINGSTATE_BROKEN) || (player->arwing.leftWingState <= WINGSTATE_BROKEN)) { player->rockAngle = SIN_DEG(player->rockPhase) * 5.0f; } else { player->rockAngle = SIN_DEG(player->rockPhase) * 1.5f; @@ -194,7 +194,7 @@ void Player_DamageEffects(Player* player) { RAND_FLOAT(0.02f) + 0.02f, player->num + 1); } } - if (player->arwing.leftState <= WINGSTATE_BROKEN) { + if (player->arwing.leftWingState <= WINGSTATE_BROKEN) { if (((gGameFrameCount % 2U) == 0) && (gLeftWingDebrisTimer[player->num] != 0)) { func_effect_8007D10C(RAND_FLOAT_CENTERED(10.0f) + player->hit2.x, RAND_FLOAT(5.0f) + player->hit2.y, player->hit2.z, 1.0f); @@ -838,11 +838,11 @@ void Player_DamageWings(Player* player, s32 side, s32 damage) { } } else if (side == 2) { gLeftWingFlashTimer[player->num] = 30; - if (player->arwing.leftState == WINGSTATE_INTACT) { + if (player->arwing.leftWingState == WINGSTATE_INTACT) { gLeftWingHealth[player->num] -= damage; if (gLeftWingHealth[player->num] <= 0) { Play_SpawnDebris(0, player->hit2.x, player->hit2.y, player->hit2.z); - player->arwing.leftState = WINGSTATE_BROKEN; + player->arwing.leftWingState = WINGSTATE_BROKEN; func_effect_8007D0E0(player->hit2.x, player->hit2.y, player->hit2.z, 2.0f); gLeftWingDebrisTimer[player->num] = 50; Player_PlaySfx(player->sfxSource, NA_SE_ARWING_WING_BROKEN, player->num); @@ -1621,7 +1621,7 @@ void Player_UpdateHitbox(Player* player) { Matrix_RotateZ(gCalcMatrix, -(player->bankAngle * M_DTOR), MTXF_APPLY); sp3C.y = 0.0f; sp3C.z = 0.0f; - if (player->arwing.leftState == WINGSTATE_INTACT) { + if (player->arwing.leftWingState == WINGSTATE_INTACT) { sp3C.x = 40.0f; } else { sp3C.y = -10.0f; @@ -3293,7 +3293,7 @@ bool Player_UpdateLockOn(Player* player) { void Player_Shoot(Player* player) { switch (player->form) { case FORM_ARWING: - if ((player->arwing.rightWingState <= WINGSTATE_BROKEN) || (player->arwing.leftState <= WINGSTATE_BROKEN)) { + if ((player->arwing.rightWingState <= WINGSTATE_BROKEN) || (player->arwing.leftWingState <= WINGSTATE_BROKEN)) { gLaserStrength[player->num] = LASERS_SINGLE; } @@ -3349,9 +3349,9 @@ void Player_ArwingBank(Player* player) { f32 sp38; sp3C = 0.0f; - if ((player->arwing.rightWingState <= WINGSTATE_BROKEN) && (player->arwing.leftState == WINGSTATE_INTACT)) { + if ((player->arwing.rightWingState <= WINGSTATE_BROKEN) && (player->arwing.leftWingState == WINGSTATE_INTACT)) { sp3C = -17.0f; - } else if ((player->arwing.leftState <= WINGSTATE_BROKEN) && (player->arwing.rightWingState == WINGSTATE_INTACT)) { + } else if ((player->arwing.leftWingState <= WINGSTATE_BROKEN) && (player->arwing.rightWingState == WINGSTATE_INTACT)) { sp3C = 17.0f; } @@ -3672,7 +3672,7 @@ void Player_MoveArwing360(Player* player) { sp4C.x -= 2.5f; sp4C.y -= 2.5f; } - if (player->arwing.leftState <= WINGSTATE_BROKEN) { + if (player->arwing.leftWingState <= WINGSTATE_BROKEN) { sp4C.x += 2.5f; sp4C.y -= 2.5f; } @@ -3947,7 +3947,7 @@ void Player_MoveArwingOnRails(Player* player) { player->vel.x += 2.5f; player->vel.y -= 2.5f; } - if (player->arwing.leftState <= WINGSTATE_BROKEN) { + if (player->arwing.leftWingState <= WINGSTATE_BROKEN) { player->vel.x -= 2.5f; player->vel.y -= 2.5f; } @@ -4417,7 +4417,7 @@ void Player_Setup(Player* playerx) { } player->arwing.rightWingState = WINGSTATE_INTACT; - player->arwing.leftState = WINGSTATE_INTACT; + player->arwing.leftWingState = WINGSTATE_INTACT; if (gExpertMode) { gLeftWingHealth[gPlayerNum] = 10; @@ -4521,7 +4521,7 @@ void Player_Setup(Player* playerx) { player->shields = D_ctx_80177C9C - 1; gGoldRingCount[0] = D_ctx_80177C94; player->arwing.rightWingState = D_ctx_80177CAC; - player->arwing.leftState = D_ctx_80177CB4; + player->arwing.leftWingState = D_ctx_80177CB4; gRightWingHealth[0] = D_ctx_80177CBC; gLeftWingHealth[0] = D_ctx_80177CC4; if (gCurrentLevel == LEVEL_VENOM_ANDROSS) { diff --git a/src/mods/object_ram.c b/src/mods/object_ram.c index aee12afc..ce2aa84f 100644 --- a/src/mods/object_ram.c +++ b/src/mods/object_ram.c @@ -402,7 +402,7 @@ void CheatRam_Select(void) { } void CheatRam_RepairWings(void) { - if ((gPlayer[0].arwing.rightWingState <= WINGSTATE_BROKEN) || (gPlayer[0].arwing.leftState <= WINGSTATE_BROKEN)) { + if ((gPlayer[0].arwing.rightWingState <= WINGSTATE_BROKEN) || (gPlayer[0].arwing.leftWingState <= WINGSTATE_BROKEN)) { func_enmy_80067A40(); } } diff --git a/src/overlays/ovl_ending/fox_end2.c b/src/overlays/ovl_ending/fox_end2.c index 59fe162d..34f0e79a 100644 --- a/src/overlays/ovl_ending/fox_end2.c +++ b/src/overlays/ovl_ending/fox_end2.c @@ -1079,7 +1079,7 @@ void Ending_801926D4(void) { if (!gClearPlayerInfo) { D_ending_80198590 = gPlayer[0].arwing; } else { - D_ending_80198590.rightWingState = D_ending_80198590.leftState = WINGSTATE_INTACT; + D_ending_80198590.rightWingState = D_ending_80198590.leftWingState = WINGSTATE_INTACT; } AUDIO_PLAY_BGM(NA_BGM_STAFF_ROLL); } diff --git a/src/overlays/ovl_i1/fox_ve1.c b/src/overlays/ovl_i1/fox_ve1.c index 4942bdaf..32b8e7c5 100644 --- a/src/overlays/ovl_i1/fox_ve1.c +++ b/src/overlays/ovl_i1/fox_ve1.c @@ -2377,7 +2377,7 @@ void Venom1_80198414(void) { D_ctx_80177C9C = gPlayer[0].shields + 1; D_ctx_80177CA4 = gHitCount; D_ctx_80177CAC = gPlayer[0].arwing.rightWingState; - D_ctx_80177CB4 = gPlayer[0].arwing.leftState; + D_ctx_80177CB4 = gPlayer[0].arwing.leftWingState; D_ctx_80177CBC = gRightWingHealth[0]; D_ctx_80177CC4 = gLeftWingHealth[0]; Audio_StopPlayerNoise(0); diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index 14037d44..3493e049 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -2600,9 +2600,9 @@ void Andross_AndAndross_Update(AndAndross* this) { Andross_Effect396_Spawn2(this->obj.pos.x, this->obj.pos.y - 200.0f, this->obj.pos.z, RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT_CENTERED(10.0f), 10.0f, 8); } - if (player->arwing.leftState == 2) { + if (player->arwing.leftWingState == 2) { gLeftWingHealth[0] = 0; - player->arwing.leftState = 1; + player->arwing.leftWingState = 1; Andross_Effect396_Spawn2(this->obj.pos.x, this->obj.pos.y - 200.0f, this->obj.pos.z, RAND_FLOAT_CENTERED(10.0f), RAND_FLOAT_CENTERED(10.0f), 10.0f, 9); } diff --git a/src/overlays/ovl_i6/fox_ve2.c b/src/overlays/ovl_i6/fox_ve2.c index 000488d0..6bcfdb70 100644 --- a/src/overlays/ovl_i6/fox_ve2.c +++ b/src/overlays/ovl_i6/fox_ve2.c @@ -125,7 +125,7 @@ void Venom2_UpdateEvents(ActorAllRange* this) { D_ctx_80177C9C = player->shields + 1; D_play_80161A5C = D_ctx_80177CA4 = gHitCount; D_ctx_80177CAC = player->arwing.rightWingState; - D_ctx_80177CB4 = player->arwing.leftState; + D_ctx_80177CB4 = player->arwing.leftWingState; D_ctx_80177CBC = gRightWingHealth[0]; D_ctx_80177CC4 = gLeftWingHealth[0]; } diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index 47d0741e..1aa5cd8b 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -2269,7 +2269,7 @@ void Map_801A116C(void) { Matrix_SetGfxMtx(&gMasterDisp); - arwing.rightWingState = arwing.leftState = WINGSTATE_INTACT; + arwing.rightWingState = arwing.leftWingState = WINGSTATE_INTACT; // clang-format off arwing.unk_18 = arwing.unk_1C = arwing.unk_20 = arwing.unk_24 = arwing.unk_04 = arwing.unk_08 = arwing.unk_0C = arwing.unk_10 = arwing.unk_28 = 0.0f; diff --git a/src/overlays/ovl_menu/fox_title.c b/src/overlays/ovl_menu/fox_title.c index 1ea5117a..6204bc53 100644 --- a/src/overlays/ovl_menu/fox_title.c +++ b/src/overlays/ovl_menu/fox_title.c @@ -2253,7 +2253,7 @@ void Title_8018D2B8(s32 arg0) { Matrix_SetGfxMtx(&gMasterDisp); - arwing.rightWingState = arwing.leftState = WINGSTATE_INTACT; + arwing.rightWingState = arwing.leftWingState = WINGSTATE_INTACT; arwing.unk_18 = arwing.unk_1C = arwing.unk_20 = arwing.unk_24 = arwing.unk_04 = arwing.unk_08 = arwing.unk_0C = arwing.unk_10 = arwing.unk_28 = 0.0f; From 885a20e29f4852521d5edb32de3655fdd26bb765 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Thu, 15 Aug 2024 03:00:22 -0300 Subject: [PATCH 136/151] unk_04 -> upperRightFlapYrot --- include/sf64player.h | 2 +- src/engine/fox_demo.c | 10 +++++----- src/engine/fox_display.c | 9 +++++---- src/engine/fox_edisplay.c | 4 ++-- src/engine/fox_enmy.c | 4 ++-- src/engine/fox_play.c | 25 ++++++++++++++----------- src/mods/object_ram.c | 3 ++- src/overlays/ovl_ending/fox_end2.c | 4 ++-- src/overlays/ovl_i1/fox_co.c | 6 +++--- src/overlays/ovl_i3/fox_aq.c | 4 ++-- src/overlays/ovl_i3/fox_so.c | 2 +- src/overlays/ovl_i3/fox_zo.c | 2 +- src/overlays/ovl_i4/fox_fo.c | 2 +- src/overlays/ovl_i4/fox_ka.c | 2 +- src/overlays/ovl_i5/fox_ma.c | 10 +++++----- src/overlays/ovl_i6/fox_andross.c | 2 +- src/overlays/ovl_i6/fox_sy.c | 2 +- src/overlays/ovl_i6/fox_ve2.c | 5 +++-- src/overlays/ovl_menu/fox_map.c | 2 +- src/overlays/ovl_menu/fox_title.c | 4 ++-- 20 files changed, 55 insertions(+), 49 deletions(-) diff --git a/include/sf64player.h b/include/sf64player.h index e6749a77..9e344d0b 100644 --- a/include/sf64player.h +++ b/include/sf64player.h @@ -130,7 +130,7 @@ typedef struct PlayerShot { typedef struct ArwingInfo { // ArArwingInfo /* 0x00 */ u8 rightWingState; // rightWingState /* 0x01 */ u8 leftWingState; // leftWingState - /* 0x04 */ f32 unk_04; // upperRightFlapYrot + /* 0x04 */ f32 upperRightFlapYrot; // upperRightFlapYrot /* 0x08 */ f32 unk_08; // bottomRightFlapYrot /* 0x0C */ f32 unk_0C; // upperLeftFlapYrot /* 0x10 */ f32 unk_10; // bottomLeftFlapYrot diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index 875d7073..6eb6fca7 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -779,7 +779,7 @@ void Cutscene_AllRangeMode(Player* player) { player->arwing.unk_10 = 0.0f; player->arwing.unk_08 = 0.0f; player->arwing.unk_0C = 0.0f; - player->arwing.unk_04 = 0.0f; + player->arwing.upperRightFlapYrot = 0.0f; Math_SmoothStepToF(&player->rot.x, 0.0f, 0.1f, 5.0f, 0.0f); Math_SmoothStepToF(&player->rot.y, 0.0f, 0.1f, 5.0f, 0.0f); @@ -918,7 +918,7 @@ void Cutscene_CoComplete2(Player* player) { case 10: D_ctx_80177A48[2] = 0.0f; player->csState++; - player->arwing.unk_04 = 0.0f; + player->arwing.upperRightFlapYrot = 0.0f; player->arwing.unk_0C = 0.0f; player->arwing.unk_08 = 0.0f; player->arwing.unk_10 = 0.0f; @@ -1023,7 +1023,7 @@ void Cutscene_CoComplete2(Player* player) { player->arwing.unk_10 = 0.0f; player->arwing.unk_08 = 0.0f; player->arwing.unk_0C = 0.0f; - player->arwing.unk_04 = 0.0f; + player->arwing.upperRightFlapYrot = 0.0f; } break; @@ -1448,7 +1448,7 @@ void Cutscene_UTurn(Player* player) { sp58.y = 60.0f; } - Math_SmoothStepToF(&player->arwing.unk_04, sp58.y, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, sp58.y, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_08, sp58.y, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_0C, sp58.y, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_10, sp58.y, 0.3f, 100.0f, 0.0f); @@ -1479,7 +1479,7 @@ void Cutscene_UTurn(Player* player) { sp58.y = player->zRotBank * 0.3f; - Math_SmoothStepToF(&player->arwing.unk_04, sp58.y, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, sp58.y, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_08, sp58.y, 0.3f, 100.0f, 0.0f); sp58.z = -sp58.y; diff --git a/src/engine/fox_display.c b/src/engine/fox_display.c index 3671b0d0..3dcc595c 100644 --- a/src/engine/fox_display.c +++ b/src/engine/fox_display.c @@ -529,7 +529,7 @@ bool Display_ArwingWingsOverrideLimbDraw(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos switch (limbIndex) { case 1: - rot->y -= arwing->unk_04; + rot->y -= arwing->upperRightFlapYrot; break; case 2: rot->y -= arwing->unk_08; @@ -679,7 +679,8 @@ void Display_Arwing(Player* player, s32 reflectY) { } } else { if (gVersusMode) { - if ((player->arwing.rightWingState == WINGSTATE_INTACT) && (player->arwing.leftWingState == WINGSTATE_INTACT)) { + if ((player->arwing.rightWingState == WINGSTATE_INTACT) && + (player->arwing.leftWingState == WINGSTATE_INTACT)) { gSPDisplayList(gMasterDisp++, D_versus_300EE80); } else if ((player->arwing.rightWingState <= WINGSTATE_BROKEN) && (player->arwing.leftWingState == WINGSTATE_INTACT)) { @@ -692,8 +693,8 @@ void Display_Arwing(Player* player, s32 reflectY) { } } else { if ((gLevelType == LEVELTYPE_SPACE) || (gCurrentLevel == LEVEL_BOLSE)) { - player->arwing.unk_28 = player->arwing.unk_04 = player->arwing.unk_08 = player->arwing.unk_0C = - player->arwing.unk_10 = 0.0f; + player->arwing.unk_28 = player->arwing.upperRightFlapYrot = player->arwing.unk_08 = + player->arwing.unk_0C = player->arwing.unk_10 = 0.0f; } D_display_800CA22C = true; gReflectY = reflectY; diff --git a/src/engine/fox_edisplay.c b/src/engine/fox_edisplay.c index 84756c19..9ea4a027 100644 --- a/src/engine/fox_edisplay.c +++ b/src/engine/fox_edisplay.c @@ -532,7 +532,7 @@ void func_edisplay_8005B388(Actor199* actor) { } else { D_edisplay_80161630.rightWingState = D_edisplay_80161630.leftWingState = WINGSTATE_INTACT; } - D_edisplay_80161630.unk_04 = actor->fwork[15]; + D_edisplay_80161630.upperRightFlapYrot = actor->fwork[15]; D_edisplay_80161630.unk_0C = actor->fwork[16]; D_edisplay_80161630.unk_08 = actor->fwork[26]; D_edisplay_80161630.unk_10 = actor->fwork[27]; @@ -543,7 +543,7 @@ void func_edisplay_8005B388(Actor199* actor) { D_edisplay_80161630.unk_30 = actor->fwork[20]; D_edisplay_80161630.unk_34 = actor->fwork[19]; if (gLevelType == LEVELTYPE_SPACE) { - D_edisplay_80161630.unk_04 = D_edisplay_80161630.unk_08 = D_edisplay_80161630.unk_0C = + D_edisplay_80161630.upperRightFlapYrot = D_edisplay_80161630.unk_08 = D_edisplay_80161630.unk_0C = D_edisplay_80161630.unk_10 = 0.0f; } Display_ArwingWings(&D_edisplay_80161630); diff --git a/src/engine/fox_enmy.c b/src/engine/fox_enmy.c index 9a0dc215..a38f9943 100644 --- a/src/engine/fox_enmy.c +++ b/src/engine/fox_enmy.c @@ -2260,8 +2260,8 @@ void ItemPickup_Update(Item* this) { } void ItemLasers_Update(ItemLasers* this) { - if (!gVersusMode && - ((gPlayer[0].arwing.leftWingState <= WINGSTATE_BROKEN) || (gPlayer[0].arwing.rightWingState <= WINGSTATE_BROKEN))) { + if (!gVersusMode && ((gPlayer[0].arwing.leftWingState <= WINGSTATE_BROKEN) || + (gPlayer[0].arwing.rightWingState <= WINGSTATE_BROKEN))) { this->obj.id = OBJ_ITEM_WING_REPAIR; Object_SetInfo(&this->info, this->obj.id); this->timer_48 = 2000; diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index b59617ad..e924c393 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -169,7 +169,8 @@ void Player_WingEffects(Player* player) { if ((gLevelType == LEVELTYPE_PLANET) || ((player->alternateView == true) && (gLevelMode == LEVELMODE_ON_RAILS))) { player->yBob = -SIN_DEG(player->bobPhase) * 0.5f; - if ((player->arwing.rightWingState <= WINGSTATE_BROKEN) || (player->arwing.leftWingState <= WINGSTATE_BROKEN)) { + if ((player->arwing.rightWingState <= WINGSTATE_BROKEN) || + (player->arwing.leftWingState <= WINGSTATE_BROKEN)) { player->rockAngle = SIN_DEG(player->rockPhase) * 5.0f; } else { player->rockAngle = SIN_DEG(player->rockPhase) * 1.5f; @@ -3293,7 +3294,8 @@ bool Player_UpdateLockOn(Player* player) { void Player_Shoot(Player* player) { switch (player->form) { case FORM_ARWING: - if ((player->arwing.rightWingState <= WINGSTATE_BROKEN) || (player->arwing.leftWingState <= WINGSTATE_BROKEN)) { + if ((player->arwing.rightWingState <= WINGSTATE_BROKEN) || + (player->arwing.leftWingState <= WINGSTATE_BROKEN)) { gLaserStrength[player->num] = LASERS_SINGLE; } @@ -3351,7 +3353,8 @@ void Player_ArwingBank(Player* player) { sp3C = 0.0f; if ((player->arwing.rightWingState <= WINGSTATE_BROKEN) && (player->arwing.leftWingState == WINGSTATE_INTACT)) { sp3C = -17.0f; - } else if ((player->arwing.leftWingState <= WINGSTATE_BROKEN) && (player->arwing.rightWingState == WINGSTATE_INTACT)) { + } else if ((player->arwing.leftWingState <= WINGSTATE_BROKEN) && + (player->arwing.rightWingState == WINGSTATE_INTACT)) { sp3C = 17.0f; } @@ -3360,7 +3363,7 @@ void Player_ArwingBank(Player* player) { sp3C = 90.0f; sp38 = 0.2f; if (player->zRotBank < 70.0f) { - Math_SmoothStepToF(&player->arwing.unk_04, -70.0f, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, -70.0f, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_08, -70.0f, 0.3f, 100.0f, 0.f); Math_SmoothStepToF(&player->arwing.unk_0C, 70.0f, 0.3f, 100.0f, 0.f); Math_SmoothStepToF(&player->arwing.unk_10, 70.0f, 0.3f, 100.0f, 0.f); @@ -3374,7 +3377,7 @@ void Player_ArwingBank(Player* player) { sp3C = -90.0f; sp38 = 0.2f; if (player->zRotBank > -70.0f) { - Math_SmoothStepToF(&player->arwing.unk_04, 70.0f, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, 70.0f, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_08, 70.0f, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_0C, -70.0f, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_10, -70.0f, 0.3f, 100.0f, 0.0f); @@ -3595,7 +3598,7 @@ void Player_MoveArwing360(Player* player) { } Math_SmoothStepToF(&player->arwing.unk_28, 0.0f, 0.1f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->arwing.unk_04, -sp60 + sp5C, 0.1f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, -sp60 + sp5C, 0.1f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_08, -sp60 - sp5C, 0.1f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_0C, -sp60 + sp58, 0.1f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_10, -sp60 - sp58, 0.1f, 100.0f, 0.0f); @@ -3730,7 +3733,7 @@ void Player_PerformLoop(Player* player) { sp58 = -50.0f; } - Math_SmoothStepToF(&player->arwing.unk_04, sp58, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, sp58, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_08, sp58, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_0C, sp58, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_10, sp58, 0.3f, 100.0f, 0.0f); @@ -3858,7 +3861,7 @@ void Player_MoveArwingOnRails(Player* player) { sp74 = sp5C.x; } Math_SmoothStepToF(&player->arwing.unk_28, 0.0f, 0.1f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->arwing.unk_04, (-sp7C) + sp78, 0.1f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, (-sp7C) + sp78, 0.1f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_08, (-sp7C) - sp78, 0.1f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_0C, (-sp7C) + sp74, 0.1f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_10, (-sp7C) - sp74, 0.1f, 100.0f, 0.0f); @@ -5031,7 +5034,7 @@ void Player_ArwingBoost(Player* player) { } if (gLevelType == LEVELTYPE_PLANET) { player->arwing.unk_28 += (35.0f - player->arwing.unk_28) * 0.1f; - Math_SmoothStepToF(&player->arwing.unk_04, 0.0f, 0.5f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, 0.0f, 0.5f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_08, 0.0f, 0.5f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_0C, 0.0f, 0.5f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_10, 0.0f, 0.5f, 100.0f, 0.0f); @@ -5129,7 +5132,7 @@ void Player_ArwingBrake(Player* player) { } if (gLevelType == LEVELTYPE_PLANET) { - Math_SmoothStepToF(&player->arwing.unk_04, 90.0f, 0.2f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, 90.0f, 0.2f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_08, -90.0f, 0.2f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_0C, 90.0f, 0.2f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_10, -90.0f, 0.2f, 100.0f, 0.0f); @@ -5861,7 +5864,7 @@ void Player_Update(Player* player) { } player->arwing.modelId = 1; - Math_SmoothStepToF(&player->arwing.unk_04, 0.0f, 0.1f, 5.0f, 0); + Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, 0.0f, 0.1f, 5.0f, 0); Math_SmoothStepToF(&player->arwing.unk_08, 0.0f, 0.1f, 5.0f, 0); Math_SmoothStepToF(&player->arwing.unk_0C, 0.0f, 0.1f, 5.0f, 0); Math_SmoothStepToF(&player->arwing.unk_10, 0.0f, 0.1f, 5.0f, 0); diff --git a/src/mods/object_ram.c b/src/mods/object_ram.c index ce2aa84f..6cf283c3 100644 --- a/src/mods/object_ram.c +++ b/src/mods/object_ram.c @@ -402,7 +402,8 @@ void CheatRam_Select(void) { } void CheatRam_RepairWings(void) { - if ((gPlayer[0].arwing.rightWingState <= WINGSTATE_BROKEN) || (gPlayer[0].arwing.leftWingState <= WINGSTATE_BROKEN)) { + if ((gPlayer[0].arwing.rightWingState <= WINGSTATE_BROKEN) || + (gPlayer[0].arwing.leftWingState <= WINGSTATE_BROKEN)) { func_enmy_80067A40(); } } diff --git a/src/overlays/ovl_ending/fox_end2.c b/src/overlays/ovl_ending/fox_end2.c index 34f0e79a..6b44ced1 100644 --- a/src/overlays/ovl_ending/fox_end2.c +++ b/src/overlays/ovl_ending/fox_end2.c @@ -849,8 +849,8 @@ void Ending_80191294(u32 arg0, AssetInfo* asset) { D_ending_80198590.unk_14 = 0.0f; D_ending_80198590.unk_0C = D_ending_80198590.unk_10; D_ending_80198590.unk_08 = D_ending_80198590.unk_0C; - D_ending_80198590.unk_04 = D_ending_80198590.unk_08; - D_ending_80198590.unk_24 = D_ending_80198590.unk_04; + D_ending_80198590.upperRightFlapYrot = D_ending_80198590.unk_08; + D_ending_80198590.unk_24 = D_ending_80198590.upperRightFlapYrot; D_ending_80198590.unk_20 = D_ending_80198590.unk_24; D_ending_80198590.unk_1C = D_ending_80198590.unk_20; D_ending_80198590.unk_18 = D_ending_80198590.unk_1C; diff --git a/src/overlays/ovl_i1/fox_co.c b/src/overlays/ovl_i1/fox_co.c index bebb702f..af6fc822 100644 --- a/src/overlays/ovl_i1/fox_co.c +++ b/src/overlays/ovl_i1/fox_co.c @@ -3362,10 +3362,10 @@ void Corneria_LevelStart(Player* player) { Math_SmoothStepToF(&player->cam.at.y, gCsCamAtY - player->yBob, D_ctx_80177A48[0], 20000.0f, 0.0f); Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 20000.0f, 0.0f); - Math_SmoothStepToF(&player->arwing.unk_04, D_ctx_80177A48[1], 0.2f, 1.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, D_ctx_80177A48[1], 0.2f, 1.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_0C, D_ctx_80177A48[2], 0.2f, 1.0f, 0.0f); - player->arwing.unk_08 = player->arwing.unk_04; + player->arwing.unk_08 = player->arwing.upperRightFlapYrot; player->arwing.unk_10 = player->arwing.unk_0C; player->cam.eye.y -= 3.0f; @@ -3450,7 +3450,7 @@ void Corneria_LevelComplete1(Player* player) { f32 temp_fa1; f32 temp_deg; - player->arwing.unk_04 = player->arwing.unk_0C = player->arwing.unk_08 = player->arwing.unk_10 = 0.0f; + player->arwing.upperRightFlapYrot = player->arwing.unk_0C = player->arwing.unk_08 = player->arwing.unk_10 = 0.0f; Math_SmoothStepToF(&player->zRotBarrelRoll, 0.0f, 0.1f, 15.0f, 0.0f); Math_SmoothStepToF(&player->zRotBank, 0.0f, 0.1f, 15.0f, 0.0f); diff --git a/src/overlays/ovl_i3/fox_aq.c b/src/overlays/ovl_i3/fox_aq.c index c12fd764..60fdc829 100644 --- a/src/overlays/ovl_i3/fox_aq.c +++ b/src/overlays/ovl_i3/fox_aq.c @@ -697,7 +697,7 @@ void Aquas_801AA4BC(Player* player) { rotBankTarget = 90.0f; rotBankScale = 0.2f; if (player->zRotBank < 70.0f) { - Math_SmoothStepToF(&player->arwing.unk_04, -70.0f, 0.3f, 100.0f, 0); + Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, -70.0f, 0.3f, 100.0f, 0); Math_SmoothStepToF(&player->arwing.unk_08, -70.0f, 0.3f, 100.0f, 0); Math_SmoothStepToF(&player->arwing.unk_0C, 70.0f, 0.3f, 100.0f, 0); Math_SmoothStepToF(&player->arwing.unk_10, 70.0f, 0.3f, 100.0f, 0); @@ -708,7 +708,7 @@ void Aquas_801AA4BC(Player* player) { rotBankTarget = -90.0f; rotBankScale = 0.2f; if (player->zRotBank > -70.0f) { - Math_SmoothStepToF(&player->arwing.unk_04, 70.0f, 0.3f, 100.0f, 0); + Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, 70.0f, 0.3f, 100.0f, 0); Math_SmoothStepToF(&player->arwing.unk_08, 70.0f, 0.3f, 100.0f, 0); Math_SmoothStepToF(&player->arwing.unk_0C, -70.0f, 0.3f, 100.0f, 0); Math_SmoothStepToF(&player->arwing.unk_10, -70.0f, 0.3f, 100.0f, 0); diff --git a/src/overlays/ovl_i3/fox_so.c b/src/overlays/ovl_i3/fox_so.c index 348101f5..54f9a014 100644 --- a/src/overlays/ovl_i3/fox_so.c +++ b/src/overlays/ovl_i3/fox_so.c @@ -3149,7 +3149,7 @@ void Solar_LevelComplete(Player* player) { player->camRoll = player->aerobaticPitch = 0.0f; player->baseSpeed = 40.0f; - player->arwing.unk_04 = player->arwing.unk_0C = player->arwing.unk_08 = player->arwing.unk_10 = + player->arwing.upperRightFlapYrot = player->arwing.unk_0C = player->arwing.unk_08 = player->arwing.unk_10 = player->zRotBarrelRoll = player->zRotBank = player->boostSpeed = 0.0f; player->draw = true; diff --git a/src/overlays/ovl_i3/fox_zo.c b/src/overlays/ovl_i3/fox_zo.c index 5d90544e..8f1da9b5 100644 --- a/src/overlays/ovl_i3/fox_zo.c +++ b/src/overlays/ovl_i3/fox_zo.c @@ -4763,7 +4763,7 @@ void Zoness_LevelComplete(Player* player) { player->camRoll = 0.0f; player->baseSpeed = 40.0f; player->draw = true; - player->arwing.unk_04 = player->arwing.unk_0C = player->arwing.unk_08 = player->arwing.unk_10 = + player->arwing.upperRightFlapYrot = player->arwing.unk_0C = player->arwing.unk_08 = player->arwing.unk_10 = player->zRotBarrelRoll = player->zRotBank = player->boostSpeed = 0.0f; gCsCamEyeX = player->cam.eye.x; diff --git a/src/overlays/ovl_i4/fox_fo.c b/src/overlays/ovl_i4/fox_fo.c index 64b5c332..4312f9ae 100644 --- a/src/overlays/ovl_i4/fox_fo.c +++ b/src/overlays/ovl_i4/fox_fo.c @@ -673,7 +673,7 @@ void Fortuna_LevelComplete(Player* player) { player->cam.eye.z += player->vel.z * 0.1f; } - player->arwing.unk_04 = 0.0f; + player->arwing.upperRightFlapYrot = 0.0f; player->arwing.unk_0C = 0.0f; player->arwing.unk_08 = 0.0f; player->arwing.unk_10 = 0.0f; diff --git a/src/overlays/ovl_i4/fox_ka.c b/src/overlays/ovl_i4/fox_ka.c index af1d4045..67ca5505 100644 --- a/src/overlays/ovl_i4/fox_ka.c +++ b/src/overlays/ovl_i4/fox_ka.c @@ -1803,7 +1803,7 @@ void Katina_LevelComplete(Player* player) { player->arwing.unk_10 = 0.0f; player->arwing.unk_0C = 0.0f; player->arwing.unk_08 = 0.0f; - player->arwing.unk_04 = 0.0f; + player->arwing.upperRightFlapYrot = 0.0f; player->aerobaticPitch = 0.0f; diff --git a/src/overlays/ovl_i5/fox_ma.c b/src/overlays/ovl_i5/fox_ma.c index 19f7b853..3ba634b6 100644 --- a/src/overlays/ovl_i5/fox_ma.c +++ b/src/overlays/ovl_i5/fox_ma.c @@ -6521,7 +6521,7 @@ void Macbeth_LevelComplete2(Player* player) { player->rockAngle = 0.0f; player->unk_16C = 0.0f; player->unk_170 = 0.0f; - player->arwing.unk_04 = 0.0f; + player->arwing.upperRightFlapYrot = 0.0f; /* fallthrough */ case 1: gShowBossHealth = false; @@ -6949,10 +6949,10 @@ void Macbeth_LevelComplete2(Player* player) { player->savedAlternateView = player->pathChangeTimer = 0; player->unk_190 = player->unk_194 = player->unk_188 = player->unk_18C = player->pathChangeYaw = player->yRot_114 = player->aerobaticPitch = player->camRoll = player->unk_174 = player->unk_178 = - player->unk_17C = player->unk_180 = player->unk_184 = player->arwing.unk_04 = player->unk_170 = - player->unk_16C = player->rockAngle = player->yBob = player->arwing.unk_0C = - player->arwing.unk_08 = player->arwing.unk_10 = player->zRotBarrelRoll = - player->zRotBank = player->boostSpeed = 0.0f; + player->unk_17C = player->unk_180 = player->unk_184 = player->arwing.upperRightFlapYrot = + player->unk_170 = player->unk_16C = player->rockAngle = player->yBob = + player->arwing.unk_0C = player->arwing.unk_08 = player->arwing.unk_10 = + player->zRotBarrelRoll = player->zRotBank = player->boostSpeed = 0.0f; player->baseSpeed = 5.0f; diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index 3493e049..47932f0f 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -3857,7 +3857,7 @@ void Andross_80193C4C(Player* player) { Math_SmoothStepToF(D_ctx_80177A48, 1.0f, 1.0f, 0.01f, 0.0f); - player->arwing.unk_04 = player->arwing.unk_08 = player->arwing.unk_0C = player->arwing.unk_10 = 0.0f; + player->arwing.upperRightFlapYrot = player->arwing.unk_08 = player->arwing.unk_0C = player->arwing.unk_10 = 0.0f; switch (player->csState) { case 0: diff --git a/src/overlays/ovl_i6/fox_sy.c b/src/overlays/ovl_i6/fox_sy.c index def14099..e25302a3 100644 --- a/src/overlays/ovl_i6/fox_sy.c +++ b/src/overlays/ovl_i6/fox_sy.c @@ -2087,7 +2087,7 @@ void SectorY_LevelComplete(Player* player) { player->camRoll = 0.0f; player->baseSpeed = 40.0f; player->boostSpeed = 0.0f; - player->arwing.unk_04 = player->arwing.unk_0C = player->arwing.unk_08 = player->arwing.unk_10 = + player->arwing.upperRightFlapYrot = player->arwing.unk_0C = player->arwing.unk_08 = player->arwing.unk_10 = player->zRotBarrelRoll = player->zRotBank = 0.0f; player->draw = true; D_ctx_80177A48[8] = Math_RadToDeg( diff --git a/src/overlays/ovl_i6/fox_ve2.c b/src/overlays/ovl_i6/fox_ve2.c index 6bcfdb70..906c33ec 100644 --- a/src/overlays/ovl_i6/fox_ve2.c +++ b/src/overlays/ovl_i6/fox_ve2.c @@ -302,7 +302,7 @@ void Venom2_LevelComplete(Player* player) { sp70 = temp_fv1; } - Math_SmoothStepToF(&player->arwing.unk_04, -var_fa0 + sp74, 0.1f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, -var_fa0 + sp74, 0.1f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_08, -var_fa0 - sp74, 0.1f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_0C, -var_fa0 + sp70, 0.1f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_10, -var_fa0 - sp70, 0.1f, 100.0f, 0.0f); @@ -313,7 +313,8 @@ void Venom2_LevelComplete(Player* player) { switch (player->csState) { case 0: player->csState++; - player->arwing.unk_04 = player->arwing.unk_0C = player->arwing.unk_08 = player->arwing.unk_10 = 0.0f; + player->arwing.upperRightFlapYrot = player->arwing.unk_0C = player->arwing.unk_08 = player->arwing.unk_10 = + 0.0f; player->arwing.modelId = 1; D_ctx_80177A48[0] = 0.0f; diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index 1aa5cd8b..e5242ed6 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -2271,7 +2271,7 @@ void Map_801A116C(void) { arwing.rightWingState = arwing.leftWingState = WINGSTATE_INTACT; // clang-format off - arwing.unk_18 = arwing.unk_1C = arwing.unk_20 = arwing.unk_24 = arwing.unk_04 = + arwing.unk_18 = arwing.unk_1C = arwing.unk_20 = arwing.unk_24 = arwing.upperRightFlapYrot = arwing.unk_08 = arwing.unk_0C = arwing.unk_10 = arwing.unk_28 = 0.0f; // clang-format on diff --git a/src/overlays/ovl_menu/fox_title.c b/src/overlays/ovl_menu/fox_title.c index 6204bc53..70b7e5a8 100644 --- a/src/overlays/ovl_menu/fox_title.c +++ b/src/overlays/ovl_menu/fox_title.c @@ -2254,8 +2254,8 @@ void Title_8018D2B8(s32 arg0) { Matrix_SetGfxMtx(&gMasterDisp); arwing.rightWingState = arwing.leftWingState = WINGSTATE_INTACT; - arwing.unk_18 = arwing.unk_1C = arwing.unk_20 = arwing.unk_24 = arwing.unk_04 = arwing.unk_08 = arwing.unk_0C = - arwing.unk_10 = arwing.unk_28 = 0.0f; + arwing.unk_18 = arwing.unk_1C = arwing.unk_20 = arwing.unk_24 = arwing.upperRightFlapYrot = arwing.unk_08 = + arwing.unk_0C = arwing.unk_10 = arwing.unk_28 = 0.0f; arwing.unk_14 = D_menu_801B84E8[arg0].unk_28; arwing.modelId = D_menu_801B84E8[arg0].unk_34; From 5f5c0d2edfbfd04ce2b1b665942201597bd56bab Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Thu, 15 Aug 2024 03:24:04 -0300 Subject: [PATCH 137/151] unk_08 -> bottomRightFlapYrot --- include/sf64player.h | 2 +- src/engine/fox_demo.c | 10 +++++----- src/engine/fox_display.c | 4 ++-- src/engine/fox_edisplay.c | 4 ++-- src/engine/fox_play.c | 16 ++++++++-------- src/overlays/ovl_ending/fox_end2.c | 4 ++-- src/overlays/ovl_i1/fox_co.c | 4 ++-- src/overlays/ovl_i3/fox_aq.c | 4 ++-- src/overlays/ovl_i3/fox_so.c | 2 +- src/overlays/ovl_i3/fox_zo.c | 2 +- src/overlays/ovl_i4/fox_fo.c | 2 +- src/overlays/ovl_i4/fox_ka.c | 2 +- src/overlays/ovl_i5/fox_ma.c | 4 ++-- src/overlays/ovl_i6/fox_andross.c | 2 +- src/overlays/ovl_i6/fox_sy.c | 2 +- src/overlays/ovl_i6/fox_ve2.c | 4 ++-- src/overlays/ovl_menu/fox_map.c | 2 +- src/overlays/ovl_menu/fox_title.c | 2 +- 18 files changed, 36 insertions(+), 36 deletions(-) diff --git a/include/sf64player.h b/include/sf64player.h index 9e344d0b..25639979 100644 --- a/include/sf64player.h +++ b/include/sf64player.h @@ -131,7 +131,7 @@ typedef struct ArwingInfo { // ArArwingInfo /* 0x00 */ u8 rightWingState; // rightWingState /* 0x01 */ u8 leftWingState; // leftWingState /* 0x04 */ f32 upperRightFlapYrot; // upperRightFlapYrot - /* 0x08 */ f32 unk_08; // bottomRightFlapYrot + /* 0x08 */ f32 bottomRightFlapYrot; // bottomRightFlapYrot /* 0x0C */ f32 unk_0C; // upperLeftFlapYrot /* 0x10 */ f32 unk_10; // bottomLeftFlapYrot /* 0x14 */ f32 unk_14; // laserGunsYpos diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index 6eb6fca7..8bdd4feb 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -777,7 +777,7 @@ void Cutscene_AllRangeMode(Player* player) { } } player->arwing.unk_10 = 0.0f; - player->arwing.unk_08 = 0.0f; + player->arwing.bottomRightFlapYrot = 0.0f; player->arwing.unk_0C = 0.0f; player->arwing.upperRightFlapYrot = 0.0f; @@ -920,7 +920,7 @@ void Cutscene_CoComplete2(Player* player) { player->csState++; player->arwing.upperRightFlapYrot = 0.0f; player->arwing.unk_0C = 0.0f; - player->arwing.unk_08 = 0.0f; + player->arwing.bottomRightFlapYrot = 0.0f; player->arwing.unk_10 = 0.0f; player->zRotBarrelRoll = 0.0f; player->zRotBank = 0.0f; @@ -1021,7 +1021,7 @@ void Cutscene_CoComplete2(Player* player) { player->csState = 1; player->csTimer = 150; player->arwing.unk_10 = 0.0f; - player->arwing.unk_08 = 0.0f; + player->arwing.bottomRightFlapYrot = 0.0f; player->arwing.unk_0C = 0.0f; player->arwing.upperRightFlapYrot = 0.0f; } @@ -1449,7 +1449,7 @@ void Cutscene_UTurn(Player* player) { } Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, sp58.y, 0.3f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->arwing.unk_08, sp58.y, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, sp58.y, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_0C, sp58.y, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_10, sp58.y, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->zRotBank, 0.0f, 0.1f, 15.0f, 0.0f); @@ -1480,7 +1480,7 @@ void Cutscene_UTurn(Player* player) { sp58.y = player->zRotBank * 0.3f; Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, sp58.y, 0.3f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->arwing.unk_08, sp58.y, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, sp58.y, 0.3f, 100.0f, 0.0f); sp58.z = -sp58.y; diff --git a/src/engine/fox_display.c b/src/engine/fox_display.c index 3dcc595c..df67b55d 100644 --- a/src/engine/fox_display.c +++ b/src/engine/fox_display.c @@ -532,7 +532,7 @@ bool Display_ArwingWingsOverrideLimbDraw(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos rot->y -= arwing->upperRightFlapYrot; break; case 2: - rot->y -= arwing->unk_08; + rot->y -= arwing->bottomRightFlapYrot; break; case 5: rot->y -= arwing->unk_10; @@ -693,7 +693,7 @@ void Display_Arwing(Player* player, s32 reflectY) { } } else { if ((gLevelType == LEVELTYPE_SPACE) || (gCurrentLevel == LEVEL_BOLSE)) { - player->arwing.unk_28 = player->arwing.upperRightFlapYrot = player->arwing.unk_08 = + player->arwing.unk_28 = player->arwing.upperRightFlapYrot = player->arwing.bottomRightFlapYrot = player->arwing.unk_0C = player->arwing.unk_10 = 0.0f; } D_display_800CA22C = true; diff --git a/src/engine/fox_edisplay.c b/src/engine/fox_edisplay.c index 9ea4a027..0f10961d 100644 --- a/src/engine/fox_edisplay.c +++ b/src/engine/fox_edisplay.c @@ -534,7 +534,7 @@ void func_edisplay_8005B388(Actor199* actor) { } D_edisplay_80161630.upperRightFlapYrot = actor->fwork[15]; D_edisplay_80161630.unk_0C = actor->fwork[16]; - D_edisplay_80161630.unk_08 = actor->fwork[26]; + D_edisplay_80161630.bottomRightFlapYrot = actor->fwork[26]; D_edisplay_80161630.unk_10 = actor->fwork[27]; D_edisplay_80161630.unk_14 = D_edisplay_80161630.unk_18 = D_edisplay_80161630.unk_1C = D_edisplay_80161630.unk_20 = D_edisplay_80161630.unk_38 = D_edisplay_80161630.unk_24 = 0.0f; @@ -543,7 +543,7 @@ void func_edisplay_8005B388(Actor199* actor) { D_edisplay_80161630.unk_30 = actor->fwork[20]; D_edisplay_80161630.unk_34 = actor->fwork[19]; if (gLevelType == LEVELTYPE_SPACE) { - D_edisplay_80161630.upperRightFlapYrot = D_edisplay_80161630.unk_08 = D_edisplay_80161630.unk_0C = + D_edisplay_80161630.upperRightFlapYrot = D_edisplay_80161630.bottomRightFlapYrot = D_edisplay_80161630.unk_0C = D_edisplay_80161630.unk_10 = 0.0f; } Display_ArwingWings(&D_edisplay_80161630); diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index e924c393..b047ea34 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -3364,7 +3364,7 @@ void Player_ArwingBank(Player* player) { sp38 = 0.2f; if (player->zRotBank < 70.0f) { Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, -70.0f, 0.3f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->arwing.unk_08, -70.0f, 0.3f, 100.0f, 0.f); + Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, -70.0f, 0.3f, 100.0f, 0.f); Math_SmoothStepToF(&player->arwing.unk_0C, 70.0f, 0.3f, 100.0f, 0.f); Math_SmoothStepToF(&player->arwing.unk_10, 70.0f, 0.3f, 100.0f, 0.f); if (player->pos.y < (gGroundHeight + 70.0f)) { @@ -3378,7 +3378,7 @@ void Player_ArwingBank(Player* player) { sp38 = 0.2f; if (player->zRotBank > -70.0f) { Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, 70.0f, 0.3f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->arwing.unk_08, 70.0f, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, 70.0f, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_0C, -70.0f, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_10, -70.0f, 0.3f, 100.0f, 0.0f); if (player->pos.y < (gGroundHeight + 70.0f)) { @@ -3599,7 +3599,7 @@ void Player_MoveArwing360(Player* player) { Math_SmoothStepToF(&player->arwing.unk_28, 0.0f, 0.1f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, -sp60 + sp5C, 0.1f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->arwing.unk_08, -sp60 - sp5C, 0.1f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, -sp60 - sp5C, 0.1f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_0C, -sp60 + sp58, 0.1f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_10, -sp60 - sp58, 0.1f, 100.0f, 0.0f); @@ -3734,7 +3734,7 @@ void Player_PerformLoop(Player* player) { } Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, sp58, 0.3f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->arwing.unk_08, sp58, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, sp58, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_0C, sp58, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_10, sp58, 0.3f, 100.0f, 0.0f); @@ -3862,7 +3862,7 @@ void Player_MoveArwingOnRails(Player* player) { } Math_SmoothStepToF(&player->arwing.unk_28, 0.0f, 0.1f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, (-sp7C) + sp78, 0.1f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->arwing.unk_08, (-sp7C) - sp78, 0.1f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, (-sp7C) - sp78, 0.1f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_0C, (-sp7C) + sp74, 0.1f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_10, (-sp7C) - sp74, 0.1f, 100.0f, 0.0f); } @@ -5035,7 +5035,7 @@ void Player_ArwingBoost(Player* player) { if (gLevelType == LEVELTYPE_PLANET) { player->arwing.unk_28 += (35.0f - player->arwing.unk_28) * 0.1f; Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, 0.0f, 0.5f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->arwing.unk_08, 0.0f, 0.5f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, 0.0f, 0.5f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_0C, 0.0f, 0.5f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_10, 0.0f, 0.5f, 100.0f, 0.0f); } @@ -5133,7 +5133,7 @@ void Player_ArwingBrake(Player* player) { if (gLevelType == LEVELTYPE_PLANET) { Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, 90.0f, 0.2f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->arwing.unk_08, -90.0f, 0.2f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, -90.0f, 0.2f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_0C, 90.0f, 0.2f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_10, -90.0f, 0.2f, 100.0f, 0.0f); } @@ -5865,7 +5865,7 @@ void Player_Update(Player* player) { player->arwing.modelId = 1; Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, 0.0f, 0.1f, 5.0f, 0); - Math_SmoothStepToF(&player->arwing.unk_08, 0.0f, 0.1f, 5.0f, 0); + Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, 0.0f, 0.1f, 5.0f, 0); Math_SmoothStepToF(&player->arwing.unk_0C, 0.0f, 0.1f, 5.0f, 0); Math_SmoothStepToF(&player->arwing.unk_10, 0.0f, 0.1f, 5.0f, 0); diff --git a/src/overlays/ovl_ending/fox_end2.c b/src/overlays/ovl_ending/fox_end2.c index 6b44ced1..db7b5e0d 100644 --- a/src/overlays/ovl_ending/fox_end2.c +++ b/src/overlays/ovl_ending/fox_end2.c @@ -848,8 +848,8 @@ void Ending_80191294(u32 arg0, AssetInfo* asset) { D_ending_80198590.unk_10 = D_ending_80198590.unk_28; D_ending_80198590.unk_14 = 0.0f; D_ending_80198590.unk_0C = D_ending_80198590.unk_10; - D_ending_80198590.unk_08 = D_ending_80198590.unk_0C; - D_ending_80198590.upperRightFlapYrot = D_ending_80198590.unk_08; + D_ending_80198590.bottomRightFlapYrot = D_ending_80198590.unk_0C; + D_ending_80198590.upperRightFlapYrot = D_ending_80198590.bottomRightFlapYrot; D_ending_80198590.unk_24 = D_ending_80198590.upperRightFlapYrot; D_ending_80198590.unk_20 = D_ending_80198590.unk_24; D_ending_80198590.unk_1C = D_ending_80198590.unk_20; diff --git a/src/overlays/ovl_i1/fox_co.c b/src/overlays/ovl_i1/fox_co.c index af6fc822..9586228f 100644 --- a/src/overlays/ovl_i1/fox_co.c +++ b/src/overlays/ovl_i1/fox_co.c @@ -3365,7 +3365,7 @@ void Corneria_LevelStart(Player* player) { Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, D_ctx_80177A48[1], 0.2f, 1.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_0C, D_ctx_80177A48[2], 0.2f, 1.0f, 0.0f); - player->arwing.unk_08 = player->arwing.upperRightFlapYrot; + player->arwing.bottomRightFlapYrot = player->arwing.upperRightFlapYrot; player->arwing.unk_10 = player->arwing.unk_0C; player->cam.eye.y -= 3.0f; @@ -3450,7 +3450,7 @@ void Corneria_LevelComplete1(Player* player) { f32 temp_fa1; f32 temp_deg; - player->arwing.upperRightFlapYrot = player->arwing.unk_0C = player->arwing.unk_08 = player->arwing.unk_10 = 0.0f; + player->arwing.upperRightFlapYrot = player->arwing.unk_0C = player->arwing.bottomRightFlapYrot = player->arwing.unk_10 = 0.0f; Math_SmoothStepToF(&player->zRotBarrelRoll, 0.0f, 0.1f, 15.0f, 0.0f); Math_SmoothStepToF(&player->zRotBank, 0.0f, 0.1f, 15.0f, 0.0f); diff --git a/src/overlays/ovl_i3/fox_aq.c b/src/overlays/ovl_i3/fox_aq.c index 60fdc829..4a15e754 100644 --- a/src/overlays/ovl_i3/fox_aq.c +++ b/src/overlays/ovl_i3/fox_aq.c @@ -698,7 +698,7 @@ void Aquas_801AA4BC(Player* player) { rotBankScale = 0.2f; if (player->zRotBank < 70.0f) { Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, -70.0f, 0.3f, 100.0f, 0); - Math_SmoothStepToF(&player->arwing.unk_08, -70.0f, 0.3f, 100.0f, 0); + Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, -70.0f, 0.3f, 100.0f, 0); Math_SmoothStepToF(&player->arwing.unk_0C, 70.0f, 0.3f, 100.0f, 0); Math_SmoothStepToF(&player->arwing.unk_10, 70.0f, 0.3f, 100.0f, 0); } @@ -709,7 +709,7 @@ void Aquas_801AA4BC(Player* player) { rotBankScale = 0.2f; if (player->zRotBank > -70.0f) { Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, 70.0f, 0.3f, 100.0f, 0); - Math_SmoothStepToF(&player->arwing.unk_08, 70.0f, 0.3f, 100.0f, 0); + Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, 70.0f, 0.3f, 100.0f, 0); Math_SmoothStepToF(&player->arwing.unk_0C, -70.0f, 0.3f, 100.0f, 0); Math_SmoothStepToF(&player->arwing.unk_10, -70.0f, 0.3f, 100.0f, 0); } diff --git a/src/overlays/ovl_i3/fox_so.c b/src/overlays/ovl_i3/fox_so.c index 54f9a014..9c860ae2 100644 --- a/src/overlays/ovl_i3/fox_so.c +++ b/src/overlays/ovl_i3/fox_so.c @@ -3149,7 +3149,7 @@ void Solar_LevelComplete(Player* player) { player->camRoll = player->aerobaticPitch = 0.0f; player->baseSpeed = 40.0f; - player->arwing.upperRightFlapYrot = player->arwing.unk_0C = player->arwing.unk_08 = player->arwing.unk_10 = + player->arwing.upperRightFlapYrot = player->arwing.unk_0C = player->arwing.bottomRightFlapYrot = player->arwing.unk_10 = player->zRotBarrelRoll = player->zRotBank = player->boostSpeed = 0.0f; player->draw = true; diff --git a/src/overlays/ovl_i3/fox_zo.c b/src/overlays/ovl_i3/fox_zo.c index 8f1da9b5..3beb7cd6 100644 --- a/src/overlays/ovl_i3/fox_zo.c +++ b/src/overlays/ovl_i3/fox_zo.c @@ -4763,7 +4763,7 @@ void Zoness_LevelComplete(Player* player) { player->camRoll = 0.0f; player->baseSpeed = 40.0f; player->draw = true; - player->arwing.upperRightFlapYrot = player->arwing.unk_0C = player->arwing.unk_08 = player->arwing.unk_10 = + player->arwing.upperRightFlapYrot = player->arwing.unk_0C = player->arwing.bottomRightFlapYrot = player->arwing.unk_10 = player->zRotBarrelRoll = player->zRotBank = player->boostSpeed = 0.0f; gCsCamEyeX = player->cam.eye.x; diff --git a/src/overlays/ovl_i4/fox_fo.c b/src/overlays/ovl_i4/fox_fo.c index 4312f9ae..d6a4fdf8 100644 --- a/src/overlays/ovl_i4/fox_fo.c +++ b/src/overlays/ovl_i4/fox_fo.c @@ -675,7 +675,7 @@ void Fortuna_LevelComplete(Player* player) { player->arwing.upperRightFlapYrot = 0.0f; player->arwing.unk_0C = 0.0f; - player->arwing.unk_08 = 0.0f; + player->arwing.bottomRightFlapYrot = 0.0f; player->arwing.unk_10 = 0.0f; Math_SmoothStepToF(&player->boostSpeed, 0.0f, 0.1f, 1.5f, 0.0f); diff --git a/src/overlays/ovl_i4/fox_ka.c b/src/overlays/ovl_i4/fox_ka.c index 67ca5505..ab41ba7e 100644 --- a/src/overlays/ovl_i4/fox_ka.c +++ b/src/overlays/ovl_i4/fox_ka.c @@ -1802,7 +1802,7 @@ void Katina_LevelComplete(Player* player) { player->arwing.unk_10 = 0.0f; player->arwing.unk_0C = 0.0f; - player->arwing.unk_08 = 0.0f; + player->arwing.bottomRightFlapYrot = 0.0f; player->arwing.upperRightFlapYrot = 0.0f; player->aerobaticPitch = 0.0f; diff --git a/src/overlays/ovl_i5/fox_ma.c b/src/overlays/ovl_i5/fox_ma.c index 3ba634b6..6e88ea65 100644 --- a/src/overlays/ovl_i5/fox_ma.c +++ b/src/overlays/ovl_i5/fox_ma.c @@ -6515,7 +6515,7 @@ void Macbeth_LevelComplete2(Player* player) { player->aerobaticPitch = 0.0f; player->camRoll = 0.0f; player->boostSpeed = 0.0f; - player->arwing.unk_0C = player->arwing.unk_08 = player->arwing.unk_10 = player->zRotBarrelRoll = + player->arwing.unk_0C = player->arwing.bottomRightFlapYrot = player->arwing.unk_10 = player->zRotBarrelRoll = player->zRotBank = 0.0f; player->yBob = 0.0f; player->rockAngle = 0.0f; @@ -6951,7 +6951,7 @@ void Macbeth_LevelComplete2(Player* player) { player->yRot_114 = player->aerobaticPitch = player->camRoll = player->unk_174 = player->unk_178 = player->unk_17C = player->unk_180 = player->unk_184 = player->arwing.upperRightFlapYrot = player->unk_170 = player->unk_16C = player->rockAngle = player->yBob = - player->arwing.unk_0C = player->arwing.unk_08 = player->arwing.unk_10 = + player->arwing.unk_0C = player->arwing.bottomRightFlapYrot = player->arwing.unk_10 = player->zRotBarrelRoll = player->zRotBank = player->boostSpeed = 0.0f; player->baseSpeed = 5.0f; diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index 47932f0f..78186abb 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -3857,7 +3857,7 @@ void Andross_80193C4C(Player* player) { Math_SmoothStepToF(D_ctx_80177A48, 1.0f, 1.0f, 0.01f, 0.0f); - player->arwing.upperRightFlapYrot = player->arwing.unk_08 = player->arwing.unk_0C = player->arwing.unk_10 = 0.0f; + player->arwing.upperRightFlapYrot = player->arwing.bottomRightFlapYrot = player->arwing.unk_0C = player->arwing.unk_10 = 0.0f; switch (player->csState) { case 0: diff --git a/src/overlays/ovl_i6/fox_sy.c b/src/overlays/ovl_i6/fox_sy.c index e25302a3..db5cb049 100644 --- a/src/overlays/ovl_i6/fox_sy.c +++ b/src/overlays/ovl_i6/fox_sy.c @@ -2087,7 +2087,7 @@ void SectorY_LevelComplete(Player* player) { player->camRoll = 0.0f; player->baseSpeed = 40.0f; player->boostSpeed = 0.0f; - player->arwing.upperRightFlapYrot = player->arwing.unk_0C = player->arwing.unk_08 = player->arwing.unk_10 = + player->arwing.upperRightFlapYrot = player->arwing.unk_0C = player->arwing.bottomRightFlapYrot = player->arwing.unk_10 = player->zRotBarrelRoll = player->zRotBank = 0.0f; player->draw = true; D_ctx_80177A48[8] = Math_RadToDeg( diff --git a/src/overlays/ovl_i6/fox_ve2.c b/src/overlays/ovl_i6/fox_ve2.c index 906c33ec..a53f04a7 100644 --- a/src/overlays/ovl_i6/fox_ve2.c +++ b/src/overlays/ovl_i6/fox_ve2.c @@ -303,7 +303,7 @@ void Venom2_LevelComplete(Player* player) { } Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, -var_fa0 + sp74, 0.1f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->arwing.unk_08, -var_fa0 - sp74, 0.1f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, -var_fa0 - sp74, 0.1f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_0C, -var_fa0 + sp70, 0.1f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_10, -var_fa0 - sp70, 0.1f, 100.0f, 0.0f); sp94 = player->pos.x - gBosses[0].obj.pos.x; @@ -313,7 +313,7 @@ void Venom2_LevelComplete(Player* player) { switch (player->csState) { case 0: player->csState++; - player->arwing.upperRightFlapYrot = player->arwing.unk_0C = player->arwing.unk_08 = player->arwing.unk_10 = + player->arwing.upperRightFlapYrot = player->arwing.unk_0C = player->arwing.bottomRightFlapYrot = player->arwing.unk_10 = 0.0f; player->arwing.modelId = 1; diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index e5242ed6..22d8985e 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -2272,7 +2272,7 @@ void Map_801A116C(void) { arwing.rightWingState = arwing.leftWingState = WINGSTATE_INTACT; // clang-format off arwing.unk_18 = arwing.unk_1C = arwing.unk_20 = arwing.unk_24 = arwing.upperRightFlapYrot = - arwing.unk_08 = arwing.unk_0C = arwing.unk_10 = arwing.unk_28 = 0.0f; + arwing.bottomRightFlapYrot = arwing.unk_0C = arwing.unk_10 = arwing.unk_28 = 0.0f; // clang-format on arwing.unk_14 = 0.0f; diff --git a/src/overlays/ovl_menu/fox_title.c b/src/overlays/ovl_menu/fox_title.c index 70b7e5a8..fe092646 100644 --- a/src/overlays/ovl_menu/fox_title.c +++ b/src/overlays/ovl_menu/fox_title.c @@ -2254,7 +2254,7 @@ void Title_8018D2B8(s32 arg0) { Matrix_SetGfxMtx(&gMasterDisp); arwing.rightWingState = arwing.leftWingState = WINGSTATE_INTACT; - arwing.unk_18 = arwing.unk_1C = arwing.unk_20 = arwing.unk_24 = arwing.upperRightFlapYrot = arwing.unk_08 = + arwing.unk_18 = arwing.unk_1C = arwing.unk_20 = arwing.unk_24 = arwing.upperRightFlapYrot = arwing.bottomRightFlapYrot = arwing.unk_0C = arwing.unk_10 = arwing.unk_28 = 0.0f; arwing.unk_14 = D_menu_801B84E8[arg0].unk_28; From 02ea67c9ccdc2c1fefb1eab8405764efb859462e Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Thu, 15 Aug 2024 03:26:01 -0300 Subject: [PATCH 138/151] unk_0C -> upperLeftFlapYrot --- include/sf64player.h | 2 +- src/engine/fox_demo.c | 10 +++++----- src/engine/fox_display.c | 4 ++-- src/engine/fox_edisplay.c | 4 ++-- src/engine/fox_play.c | 16 ++++++++-------- src/overlays/ovl_ending/fox_end2.c | 4 ++-- src/overlays/ovl_i1/fox_co.c | 6 +++--- src/overlays/ovl_i3/fox_aq.c | 4 ++-- src/overlays/ovl_i3/fox_so.c | 2 +- src/overlays/ovl_i3/fox_zo.c | 2 +- src/overlays/ovl_i4/fox_fo.c | 2 +- src/overlays/ovl_i4/fox_ka.c | 2 +- src/overlays/ovl_i5/fox_ma.c | 4 ++-- src/overlays/ovl_i6/fox_andross.c | 2 +- src/overlays/ovl_i6/fox_sy.c | 2 +- src/overlays/ovl_i6/fox_ve2.c | 4 ++-- src/overlays/ovl_menu/fox_map.c | 2 +- src/overlays/ovl_menu/fox_title.c | 2 +- 18 files changed, 37 insertions(+), 37 deletions(-) diff --git a/include/sf64player.h b/include/sf64player.h index 25639979..b52e76f1 100644 --- a/include/sf64player.h +++ b/include/sf64player.h @@ -132,7 +132,7 @@ typedef struct ArwingInfo { // ArArwingInfo /* 0x01 */ u8 leftWingState; // leftWingState /* 0x04 */ f32 upperRightFlapYrot; // upperRightFlapYrot /* 0x08 */ f32 bottomRightFlapYrot; // bottomRightFlapYrot - /* 0x0C */ f32 unk_0C; // upperLeftFlapYrot + /* 0x0C */ f32 upperLeftFlapYrot; // upperLeftFlapYrot /* 0x10 */ f32 unk_10; // bottomLeftFlapYrot /* 0x14 */ f32 unk_14; // laserGunsYpos /* 0x18 */ f32 unk_18; // laserGunsXpos diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index 8bdd4feb..0a9f1a81 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -778,7 +778,7 @@ void Cutscene_AllRangeMode(Player* player) { } player->arwing.unk_10 = 0.0f; player->arwing.bottomRightFlapYrot = 0.0f; - player->arwing.unk_0C = 0.0f; + player->arwing.upperLeftFlapYrot = 0.0f; player->arwing.upperRightFlapYrot = 0.0f; Math_SmoothStepToF(&player->rot.x, 0.0f, 0.1f, 5.0f, 0.0f); @@ -919,7 +919,7 @@ void Cutscene_CoComplete2(Player* player) { D_ctx_80177A48[2] = 0.0f; player->csState++; player->arwing.upperRightFlapYrot = 0.0f; - player->arwing.unk_0C = 0.0f; + player->arwing.upperLeftFlapYrot = 0.0f; player->arwing.bottomRightFlapYrot = 0.0f; player->arwing.unk_10 = 0.0f; player->zRotBarrelRoll = 0.0f; @@ -1022,7 +1022,7 @@ void Cutscene_CoComplete2(Player* player) { player->csTimer = 150; player->arwing.unk_10 = 0.0f; player->arwing.bottomRightFlapYrot = 0.0f; - player->arwing.unk_0C = 0.0f; + player->arwing.upperLeftFlapYrot = 0.0f; player->arwing.upperRightFlapYrot = 0.0f; } break; @@ -1450,7 +1450,7 @@ void Cutscene_UTurn(Player* player) { Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, sp58.y, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, sp58.y, 0.3f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->arwing.unk_0C, sp58.y, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, sp58.y, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_10, sp58.y, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->zRotBank, 0.0f, 0.1f, 15.0f, 0.0f); Math_SmoothStepToF(&player->aerobaticPitch, 190.0f, 0.1f, 6.0f, 0.001f); @@ -1484,7 +1484,7 @@ void Cutscene_UTurn(Player* player) { sp58.z = -sp58.y; - Math_SmoothStepToF(&player->arwing.unk_0C, sp58.z, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, sp58.z, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_10, sp58.z, 0.3f, 100.0f, 0.0f); player->unk_190 = 2.0f; diff --git a/src/engine/fox_display.c b/src/engine/fox_display.c index df67b55d..76d7fb97 100644 --- a/src/engine/fox_display.c +++ b/src/engine/fox_display.c @@ -538,7 +538,7 @@ bool Display_ArwingWingsOverrideLimbDraw(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos rot->y -= arwing->unk_10; break; case 6: - rot->y -= arwing->unk_0C; + rot->y -= arwing->upperLeftFlapYrot; break; case 12: rot->z += arwing->unk_20; @@ -694,7 +694,7 @@ void Display_Arwing(Player* player, s32 reflectY) { } else { if ((gLevelType == LEVELTYPE_SPACE) || (gCurrentLevel == LEVEL_BOLSE)) { player->arwing.unk_28 = player->arwing.upperRightFlapYrot = player->arwing.bottomRightFlapYrot = - player->arwing.unk_0C = player->arwing.unk_10 = 0.0f; + player->arwing.upperLeftFlapYrot = player->arwing.unk_10 = 0.0f; } D_display_800CA22C = true; gReflectY = reflectY; diff --git a/src/engine/fox_edisplay.c b/src/engine/fox_edisplay.c index 0f10961d..297b701d 100644 --- a/src/engine/fox_edisplay.c +++ b/src/engine/fox_edisplay.c @@ -533,7 +533,7 @@ void func_edisplay_8005B388(Actor199* actor) { D_edisplay_80161630.rightWingState = D_edisplay_80161630.leftWingState = WINGSTATE_INTACT; } D_edisplay_80161630.upperRightFlapYrot = actor->fwork[15]; - D_edisplay_80161630.unk_0C = actor->fwork[16]; + D_edisplay_80161630.upperLeftFlapYrot = actor->fwork[16]; D_edisplay_80161630.bottomRightFlapYrot = actor->fwork[26]; D_edisplay_80161630.unk_10 = actor->fwork[27]; D_edisplay_80161630.unk_14 = D_edisplay_80161630.unk_18 = D_edisplay_80161630.unk_1C = @@ -543,7 +543,7 @@ void func_edisplay_8005B388(Actor199* actor) { D_edisplay_80161630.unk_30 = actor->fwork[20]; D_edisplay_80161630.unk_34 = actor->fwork[19]; if (gLevelType == LEVELTYPE_SPACE) { - D_edisplay_80161630.upperRightFlapYrot = D_edisplay_80161630.bottomRightFlapYrot = D_edisplay_80161630.unk_0C = + D_edisplay_80161630.upperRightFlapYrot = D_edisplay_80161630.bottomRightFlapYrot = D_edisplay_80161630.upperLeftFlapYrot = D_edisplay_80161630.unk_10 = 0.0f; } Display_ArwingWings(&D_edisplay_80161630); diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index b047ea34..a63a3a04 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -3365,7 +3365,7 @@ void Player_ArwingBank(Player* player) { if (player->zRotBank < 70.0f) { Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, -70.0f, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, -70.0f, 0.3f, 100.0f, 0.f); - Math_SmoothStepToF(&player->arwing.unk_0C, 70.0f, 0.3f, 100.0f, 0.f); + Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, 70.0f, 0.3f, 100.0f, 0.f); Math_SmoothStepToF(&player->arwing.unk_10, 70.0f, 0.3f, 100.0f, 0.f); if (player->pos.y < (gGroundHeight + 70.0f)) { player->pos.y += 6.0f; @@ -3379,7 +3379,7 @@ void Player_ArwingBank(Player* player) { if (player->zRotBank > -70.0f) { Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, 70.0f, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, 70.0f, 0.3f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->arwing.unk_0C, -70.0f, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, -70.0f, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_10, -70.0f, 0.3f, 100.0f, 0.0f); if (player->pos.y < (gGroundHeight + 70.0f)) { player->pos.y += 6.0f; @@ -3600,7 +3600,7 @@ void Player_MoveArwing360(Player* player) { Math_SmoothStepToF(&player->arwing.unk_28, 0.0f, 0.1f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, -sp60 + sp5C, 0.1f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, -sp60 - sp5C, 0.1f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->arwing.unk_0C, -sp60 + sp58, 0.1f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, -sp60 + sp58, 0.1f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_10, -sp60 - sp58, 0.1f, 100.0f, 0.0f); scale = 0.1f; @@ -3735,7 +3735,7 @@ void Player_PerformLoop(Player* player) { Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, sp58, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, sp58, 0.3f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->arwing.unk_0C, sp58, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, sp58, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_10, sp58, 0.3f, 100.0f, 0.0f); if (player->aerobaticPitch < 180.0f) { @@ -3863,7 +3863,7 @@ void Player_MoveArwingOnRails(Player* player) { Math_SmoothStepToF(&player->arwing.unk_28, 0.0f, 0.1f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, (-sp7C) + sp78, 0.1f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, (-sp7C) - sp78, 0.1f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->arwing.unk_0C, (-sp7C) + sp74, 0.1f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, (-sp7C) + sp74, 0.1f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_10, (-sp7C) - sp74, 0.1f, 100.0f, 0.0f); } @@ -5036,7 +5036,7 @@ void Player_ArwingBoost(Player* player) { player->arwing.unk_28 += (35.0f - player->arwing.unk_28) * 0.1f; Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, 0.0f, 0.5f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, 0.0f, 0.5f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->arwing.unk_0C, 0.0f, 0.5f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, 0.0f, 0.5f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_10, 0.0f, 0.5f, 100.0f, 0.0f); } player->boostMeter += sp28; @@ -5134,7 +5134,7 @@ void Player_ArwingBrake(Player* player) { if (gLevelType == LEVELTYPE_PLANET) { Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, 90.0f, 0.2f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, -90.0f, 0.2f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->arwing.unk_0C, 90.0f, 0.2f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, 90.0f, 0.2f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_10, -90.0f, 0.2f, 100.0f, 0.0f); } @@ -5866,7 +5866,7 @@ void Player_Update(Player* player) { Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, 0.0f, 0.1f, 5.0f, 0); Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, 0.0f, 0.1f, 5.0f, 0); - Math_SmoothStepToF(&player->arwing.unk_0C, 0.0f, 0.1f, 5.0f, 0); + Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, 0.0f, 0.1f, 5.0f, 0); Math_SmoothStepToF(&player->arwing.unk_10, 0.0f, 0.1f, 5.0f, 0); Player_UpdateShields(player); diff --git a/src/overlays/ovl_ending/fox_end2.c b/src/overlays/ovl_ending/fox_end2.c index db7b5e0d..ec4bcfba 100644 --- a/src/overlays/ovl_ending/fox_end2.c +++ b/src/overlays/ovl_ending/fox_end2.c @@ -847,8 +847,8 @@ void Ending_80191294(u32 arg0, AssetInfo* asset) { D_ending_80198590.unk_28 = 0.0f; D_ending_80198590.unk_10 = D_ending_80198590.unk_28; D_ending_80198590.unk_14 = 0.0f; - D_ending_80198590.unk_0C = D_ending_80198590.unk_10; - D_ending_80198590.bottomRightFlapYrot = D_ending_80198590.unk_0C; + D_ending_80198590.upperLeftFlapYrot = D_ending_80198590.unk_10; + D_ending_80198590.bottomRightFlapYrot = D_ending_80198590.upperLeftFlapYrot; D_ending_80198590.upperRightFlapYrot = D_ending_80198590.bottomRightFlapYrot; D_ending_80198590.unk_24 = D_ending_80198590.upperRightFlapYrot; D_ending_80198590.unk_20 = D_ending_80198590.unk_24; diff --git a/src/overlays/ovl_i1/fox_co.c b/src/overlays/ovl_i1/fox_co.c index 9586228f..f0509026 100644 --- a/src/overlays/ovl_i1/fox_co.c +++ b/src/overlays/ovl_i1/fox_co.c @@ -3363,10 +3363,10 @@ void Corneria_LevelStart(Player* player) { Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 20000.0f, 0.0f); Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, D_ctx_80177A48[1], 0.2f, 1.0f, 0.0f); - Math_SmoothStepToF(&player->arwing.unk_0C, D_ctx_80177A48[2], 0.2f, 1.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, D_ctx_80177A48[2], 0.2f, 1.0f, 0.0f); player->arwing.bottomRightFlapYrot = player->arwing.upperRightFlapYrot; - player->arwing.unk_10 = player->arwing.unk_0C; + player->arwing.unk_10 = player->arwing.upperLeftFlapYrot; player->cam.eye.y -= 3.0f; player->cam.at.y -= 3.0f; @@ -3450,7 +3450,7 @@ void Corneria_LevelComplete1(Player* player) { f32 temp_fa1; f32 temp_deg; - player->arwing.upperRightFlapYrot = player->arwing.unk_0C = player->arwing.bottomRightFlapYrot = player->arwing.unk_10 = 0.0f; + player->arwing.upperRightFlapYrot = player->arwing.upperLeftFlapYrot = player->arwing.bottomRightFlapYrot = player->arwing.unk_10 = 0.0f; Math_SmoothStepToF(&player->zRotBarrelRoll, 0.0f, 0.1f, 15.0f, 0.0f); Math_SmoothStepToF(&player->zRotBank, 0.0f, 0.1f, 15.0f, 0.0f); diff --git a/src/overlays/ovl_i3/fox_aq.c b/src/overlays/ovl_i3/fox_aq.c index 4a15e754..ffeeb0c0 100644 --- a/src/overlays/ovl_i3/fox_aq.c +++ b/src/overlays/ovl_i3/fox_aq.c @@ -699,7 +699,7 @@ void Aquas_801AA4BC(Player* player) { if (player->zRotBank < 70.0f) { Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, -70.0f, 0.3f, 100.0f, 0); Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, -70.0f, 0.3f, 100.0f, 0); - Math_SmoothStepToF(&player->arwing.unk_0C, 70.0f, 0.3f, 100.0f, 0); + Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, 70.0f, 0.3f, 100.0f, 0); Math_SmoothStepToF(&player->arwing.unk_10, 70.0f, 0.3f, 100.0f, 0); } } @@ -710,7 +710,7 @@ void Aquas_801AA4BC(Player* player) { if (player->zRotBank > -70.0f) { Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, 70.0f, 0.3f, 100.0f, 0); Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, 70.0f, 0.3f, 100.0f, 0); - Math_SmoothStepToF(&player->arwing.unk_0C, -70.0f, 0.3f, 100.0f, 0); + Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, -70.0f, 0.3f, 100.0f, 0); Math_SmoothStepToF(&player->arwing.unk_10, -70.0f, 0.3f, 100.0f, 0); } } diff --git a/src/overlays/ovl_i3/fox_so.c b/src/overlays/ovl_i3/fox_so.c index 9c860ae2..2f716690 100644 --- a/src/overlays/ovl_i3/fox_so.c +++ b/src/overlays/ovl_i3/fox_so.c @@ -3149,7 +3149,7 @@ void Solar_LevelComplete(Player* player) { player->camRoll = player->aerobaticPitch = 0.0f; player->baseSpeed = 40.0f; - player->arwing.upperRightFlapYrot = player->arwing.unk_0C = player->arwing.bottomRightFlapYrot = player->arwing.unk_10 = + player->arwing.upperRightFlapYrot = player->arwing.upperLeftFlapYrot = player->arwing.bottomRightFlapYrot = player->arwing.unk_10 = player->zRotBarrelRoll = player->zRotBank = player->boostSpeed = 0.0f; player->draw = true; diff --git a/src/overlays/ovl_i3/fox_zo.c b/src/overlays/ovl_i3/fox_zo.c index 3beb7cd6..49b5eecb 100644 --- a/src/overlays/ovl_i3/fox_zo.c +++ b/src/overlays/ovl_i3/fox_zo.c @@ -4763,7 +4763,7 @@ void Zoness_LevelComplete(Player* player) { player->camRoll = 0.0f; player->baseSpeed = 40.0f; player->draw = true; - player->arwing.upperRightFlapYrot = player->arwing.unk_0C = player->arwing.bottomRightFlapYrot = player->arwing.unk_10 = + player->arwing.upperRightFlapYrot = player->arwing.upperLeftFlapYrot = player->arwing.bottomRightFlapYrot = player->arwing.unk_10 = player->zRotBarrelRoll = player->zRotBank = player->boostSpeed = 0.0f; gCsCamEyeX = player->cam.eye.x; diff --git a/src/overlays/ovl_i4/fox_fo.c b/src/overlays/ovl_i4/fox_fo.c index d6a4fdf8..1394c70e 100644 --- a/src/overlays/ovl_i4/fox_fo.c +++ b/src/overlays/ovl_i4/fox_fo.c @@ -674,7 +674,7 @@ void Fortuna_LevelComplete(Player* player) { } player->arwing.upperRightFlapYrot = 0.0f; - player->arwing.unk_0C = 0.0f; + player->arwing.upperLeftFlapYrot = 0.0f; player->arwing.bottomRightFlapYrot = 0.0f; player->arwing.unk_10 = 0.0f; diff --git a/src/overlays/ovl_i4/fox_ka.c b/src/overlays/ovl_i4/fox_ka.c index ab41ba7e..b0e912c6 100644 --- a/src/overlays/ovl_i4/fox_ka.c +++ b/src/overlays/ovl_i4/fox_ka.c @@ -1801,7 +1801,7 @@ void Katina_LevelComplete(Player* player) { f32 angle; player->arwing.unk_10 = 0.0f; - player->arwing.unk_0C = 0.0f; + player->arwing.upperLeftFlapYrot = 0.0f; player->arwing.bottomRightFlapYrot = 0.0f; player->arwing.upperRightFlapYrot = 0.0f; diff --git a/src/overlays/ovl_i5/fox_ma.c b/src/overlays/ovl_i5/fox_ma.c index 6e88ea65..86a2ca0e 100644 --- a/src/overlays/ovl_i5/fox_ma.c +++ b/src/overlays/ovl_i5/fox_ma.c @@ -6515,7 +6515,7 @@ void Macbeth_LevelComplete2(Player* player) { player->aerobaticPitch = 0.0f; player->camRoll = 0.0f; player->boostSpeed = 0.0f; - player->arwing.unk_0C = player->arwing.bottomRightFlapYrot = player->arwing.unk_10 = player->zRotBarrelRoll = + player->arwing.upperLeftFlapYrot = player->arwing.bottomRightFlapYrot = player->arwing.unk_10 = player->zRotBarrelRoll = player->zRotBank = 0.0f; player->yBob = 0.0f; player->rockAngle = 0.0f; @@ -6951,7 +6951,7 @@ void Macbeth_LevelComplete2(Player* player) { player->yRot_114 = player->aerobaticPitch = player->camRoll = player->unk_174 = player->unk_178 = player->unk_17C = player->unk_180 = player->unk_184 = player->arwing.upperRightFlapYrot = player->unk_170 = player->unk_16C = player->rockAngle = player->yBob = - player->arwing.unk_0C = player->arwing.bottomRightFlapYrot = player->arwing.unk_10 = + player->arwing.upperLeftFlapYrot = player->arwing.bottomRightFlapYrot = player->arwing.unk_10 = player->zRotBarrelRoll = player->zRotBank = player->boostSpeed = 0.0f; player->baseSpeed = 5.0f; diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index 78186abb..d989d5c0 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -3857,7 +3857,7 @@ void Andross_80193C4C(Player* player) { Math_SmoothStepToF(D_ctx_80177A48, 1.0f, 1.0f, 0.01f, 0.0f); - player->arwing.upperRightFlapYrot = player->arwing.bottomRightFlapYrot = player->arwing.unk_0C = player->arwing.unk_10 = 0.0f; + player->arwing.upperRightFlapYrot = player->arwing.bottomRightFlapYrot = player->arwing.upperLeftFlapYrot = player->arwing.unk_10 = 0.0f; switch (player->csState) { case 0: diff --git a/src/overlays/ovl_i6/fox_sy.c b/src/overlays/ovl_i6/fox_sy.c index db5cb049..b1638c19 100644 --- a/src/overlays/ovl_i6/fox_sy.c +++ b/src/overlays/ovl_i6/fox_sy.c @@ -2087,7 +2087,7 @@ void SectorY_LevelComplete(Player* player) { player->camRoll = 0.0f; player->baseSpeed = 40.0f; player->boostSpeed = 0.0f; - player->arwing.upperRightFlapYrot = player->arwing.unk_0C = player->arwing.bottomRightFlapYrot = player->arwing.unk_10 = + player->arwing.upperRightFlapYrot = player->arwing.upperLeftFlapYrot = player->arwing.bottomRightFlapYrot = player->arwing.unk_10 = player->zRotBarrelRoll = player->zRotBank = 0.0f; player->draw = true; D_ctx_80177A48[8] = Math_RadToDeg( diff --git a/src/overlays/ovl_i6/fox_ve2.c b/src/overlays/ovl_i6/fox_ve2.c index a53f04a7..886c54fe 100644 --- a/src/overlays/ovl_i6/fox_ve2.c +++ b/src/overlays/ovl_i6/fox_ve2.c @@ -304,7 +304,7 @@ void Venom2_LevelComplete(Player* player) { Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, -var_fa0 + sp74, 0.1f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, -var_fa0 - sp74, 0.1f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->arwing.unk_0C, -var_fa0 + sp70, 0.1f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, -var_fa0 + sp70, 0.1f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.unk_10, -var_fa0 - sp70, 0.1f, 100.0f, 0.0f); sp94 = player->pos.x - gBosses[0].obj.pos.x; sp90 = player->pos.y - (gBosses[0].obj.pos.y + 700.0f); @@ -313,7 +313,7 @@ void Venom2_LevelComplete(Player* player) { switch (player->csState) { case 0: player->csState++; - player->arwing.upperRightFlapYrot = player->arwing.unk_0C = player->arwing.bottomRightFlapYrot = player->arwing.unk_10 = + player->arwing.upperRightFlapYrot = player->arwing.upperLeftFlapYrot = player->arwing.bottomRightFlapYrot = player->arwing.unk_10 = 0.0f; player->arwing.modelId = 1; diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index 22d8985e..a26a34fe 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -2272,7 +2272,7 @@ void Map_801A116C(void) { arwing.rightWingState = arwing.leftWingState = WINGSTATE_INTACT; // clang-format off arwing.unk_18 = arwing.unk_1C = arwing.unk_20 = arwing.unk_24 = arwing.upperRightFlapYrot = - arwing.bottomRightFlapYrot = arwing.unk_0C = arwing.unk_10 = arwing.unk_28 = 0.0f; + arwing.bottomRightFlapYrot = arwing.upperLeftFlapYrot = arwing.unk_10 = arwing.unk_28 = 0.0f; // clang-format on arwing.unk_14 = 0.0f; diff --git a/src/overlays/ovl_menu/fox_title.c b/src/overlays/ovl_menu/fox_title.c index fe092646..85096bb7 100644 --- a/src/overlays/ovl_menu/fox_title.c +++ b/src/overlays/ovl_menu/fox_title.c @@ -2255,7 +2255,7 @@ void Title_8018D2B8(s32 arg0) { arwing.rightWingState = arwing.leftWingState = WINGSTATE_INTACT; arwing.unk_18 = arwing.unk_1C = arwing.unk_20 = arwing.unk_24 = arwing.upperRightFlapYrot = arwing.bottomRightFlapYrot = - arwing.unk_0C = arwing.unk_10 = arwing.unk_28 = 0.0f; + arwing.upperLeftFlapYrot = arwing.unk_10 = arwing.unk_28 = 0.0f; arwing.unk_14 = D_menu_801B84E8[arg0].unk_28; arwing.modelId = D_menu_801B84E8[arg0].unk_34; From 76f7d6e335d65f4dee3839b1d9a4013bc0b9272b Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Thu, 15 Aug 2024 04:01:44 -0300 Subject: [PATCH 139/151] replace all ArwingInfo unks for names --- include/sf64player.h | 32 +++++++++---------- src/engine/fox_360.c | 4 +-- src/engine/fox_demo.c | 16 +++++----- src/engine/fox_display.c | 50 +++++++++++++++--------------- src/engine/fox_edisplay.c | 16 +++++----- src/engine/fox_enmy2.c | 8 ++--- src/engine/fox_play.c | 30 +++++++++--------- src/overlays/ovl_ending/fox_end2.c | 24 +++++++------- src/overlays/ovl_i1/fox_co.c | 19 ++++++------ src/overlays/ovl_i2/fox_me.c | 4 +-- src/overlays/ovl_i2/fox_sx.c | 2 +- src/overlays/ovl_i3/fox_a6.c | 2 +- src/overlays/ovl_i3/fox_aq.c | 4 +-- src/overlays/ovl_i3/fox_so.c | 9 +++--- src/overlays/ovl_i3/fox_zo.c | 7 +++-- src/overlays/ovl_i4/fox_bo.c | 2 +- src/overlays/ovl_i4/fox_fo.c | 6 ++-- src/overlays/ovl_i4/fox_ka.c | 2 +- src/overlays/ovl_i5/fox_ma.c | 9 +++--- src/overlays/ovl_i6/fox_andross.c | 5 +-- src/overlays/ovl_i6/fox_sy.c | 8 ++--- src/overlays/ovl_i6/fox_ve2.c | 8 ++--- src/overlays/ovl_menu/fox_map.c | 14 ++++----- src/overlays/ovl_menu/fox_title.c | 14 ++++----- 24 files changed, 150 insertions(+), 145 deletions(-) diff --git a/include/sf64player.h b/include/sf64player.h index b52e76f1..2ab36ea9 100644 --- a/include/sf64player.h +++ b/include/sf64player.h @@ -127,23 +127,23 @@ typedef struct PlayerShot { /* 0x6C */ u8 bonus; } PlayerShot; // size = 0x70 -typedef struct ArwingInfo { // ArArwingInfo - /* 0x00 */ u8 rightWingState; // rightWingState - /* 0x01 */ u8 leftWingState; // leftWingState - /* 0x04 */ f32 upperRightFlapYrot; // upperRightFlapYrot - /* 0x08 */ f32 bottomRightFlapYrot; // bottomRightFlapYrot - /* 0x0C */ f32 upperLeftFlapYrot; // upperLeftFlapYrot - /* 0x10 */ f32 unk_10; // bottomLeftFlapYrot - /* 0x14 */ f32 unk_14; // laserGunsYpos - /* 0x18 */ f32 unk_18; // laserGunsXpos - /* 0x1C */ f32 unk_1C; // wingsXrot - /* 0x20 */ f32 unk_20; // wingsYrot - /* 0x24 */ f32 unk_24; // wingsZrot +typedef struct ArwingInfo { + /* 0x00 */ u8 rightWingState; + /* 0x01 */ u8 leftWingState; + /* 0x04 */ f32 upperRightFlapYrot; + /* 0x08 */ f32 bottomRightFlapYrot; + /* 0x0C */ f32 upperLeftFlapYrot; + /* 0x10 */ f32 bottomLeftFlapYrot; + /* 0x14 */ f32 laserGunsYpos; + /* 0x18 */ f32 laserGunsXpos; + /* 0x1C */ f32 wingsXrot; + /* 0x20 */ f32 wingsYrot; + /* 0x24 */ f32 wingsZrot; /* 0x28 */ f32 unk_28; - /* 0x2C */ u8 modelId; // teamFaceId - /* 0x30 */ f32 unk_30; // teamFaceXrot - /* 0x34 */ f32 unk_34; // teamFaceYrot - /* 0x38 */ f32 unk_38; // windshieldXrot + /* 0x2C */ u8 teamFaceId; + /* 0x30 */ f32 teamFaceXrot; + /* 0x34 */ f32 teamFaceYrot; + /* 0x38 */ f32 windshieldXrot; } ArwingInfo; // size = 0x3C typedef struct PlayerSfx { diff --git a/src/engine/fox_360.c b/src/engine/fox_360.c index a829bdd5..26a352da 100644 --- a/src/engine/fox_360.c +++ b/src/engine/fox_360.c @@ -170,7 +170,7 @@ void AllRange_GreatFoxRepair(Player* player) { player->pos.z = 0.0f; gCsCamAtZ = 0.0f; D_ctx_80177A48[0] = 1.0f; - player->arwing.modelId = 1; + player->arwing.teamFaceId = 1; player->csState++; break; @@ -230,7 +230,7 @@ void AllRange_GreatFoxRepair(Player* player) { player->rot.x += 0.4f; if (gCsFrameCount >= 130) { player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; - player->arwing.modelId = 0; + player->arwing.teamFaceId = 0; player->unk_014 = 0; player->unk_018 = 0; player->unk_01C = 0; diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index 0a9f1a81..e4dd528d 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -130,7 +130,7 @@ void Cutscene_WarpZoneComplete(Player* player) { D_ctx_80177A48[0] = 0.0f; D_ctx_80177A48[1] = 0.0f; D_ctx_80177A48[2] = 0.0f; - player->arwing.modelId = 1; + player->arwing.teamFaceId = 1; gCsFrameCount = 0; /* fallthrough */ case 1: @@ -776,7 +776,7 @@ void Cutscene_AllRangeMode(Player* player) { } } } - player->arwing.unk_10 = 0.0f; + player->arwing.bottomLeftFlapYrot = 0.0f; player->arwing.bottomRightFlapYrot = 0.0f; player->arwing.upperLeftFlapYrot = 0.0f; player->arwing.upperRightFlapYrot = 0.0f; @@ -796,7 +796,7 @@ void Cutscene_AllRangeMode(Player* player) { D_ctx_80177A48[1] = 0.0f; D_ctx_80177A48[2] = 60.0f; D_ctx_80177A48[3] = 0.0f; - player->arwing.modelId = 1; + player->arwing.teamFaceId = 1; player->csState++; gCsFrameCount = 0; /* fallthrough */ @@ -921,11 +921,11 @@ void Cutscene_CoComplete2(Player* player) { player->arwing.upperRightFlapYrot = 0.0f; player->arwing.upperLeftFlapYrot = 0.0f; player->arwing.bottomRightFlapYrot = 0.0f; - player->arwing.unk_10 = 0.0f; + player->arwing.bottomLeftFlapYrot = 0.0f; player->zRotBarrelRoll = 0.0f; player->zRotBank = 0.0f; player->boostSpeed = 0.0f; - player->arwing.modelId = 1; + player->arwing.teamFaceId = 1; player->baseSpeed = 40.0f; /* fallthrough */ @@ -1020,7 +1020,7 @@ void Cutscene_CoComplete2(Player* player) { if (player->csTimer == 0) { player->csState = 1; player->csTimer = 150; - player->arwing.unk_10 = 0.0f; + player->arwing.bottomLeftFlapYrot = 0.0f; player->arwing.bottomRightFlapYrot = 0.0f; player->arwing.upperLeftFlapYrot = 0.0f; player->arwing.upperRightFlapYrot = 0.0f; @@ -1451,7 +1451,7 @@ void Cutscene_UTurn(Player* player) { Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, sp58.y, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, sp58.y, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, sp58.y, 0.3f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->arwing.unk_10, sp58.y, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.bottomLeftFlapYrot, sp58.y, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->zRotBank, 0.0f, 0.1f, 15.0f, 0.0f); Math_SmoothStepToF(&player->aerobaticPitch, 190.0f, 0.1f, 6.0f, 0.001f); @@ -1485,7 +1485,7 @@ void Cutscene_UTurn(Player* player) { sp58.z = -sp58.y; Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, sp58.z, 0.3f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->arwing.unk_10, sp58.z, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.bottomLeftFlapYrot, sp58.z, 0.3f, 100.0f, 0.0f); player->unk_190 = 2.0f; player->cam.eye.x += player->vel.x * 0.1f; diff --git a/src/engine/fox_display.c b/src/engine/fox_display.c index 76d7fb97..dabc2a6a 100644 --- a/src/engine/fox_display.c +++ b/src/engine/fox_display.c @@ -535,24 +535,24 @@ bool Display_ArwingWingsOverrideLimbDraw(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos rot->y -= arwing->bottomRightFlapYrot; break; case 5: - rot->y -= arwing->unk_10; + rot->y -= arwing->bottomLeftFlapYrot; break; case 6: rot->y -= arwing->upperLeftFlapYrot; break; case 12: - rot->z += arwing->unk_20; + rot->z += arwing->wingsYrot; break; case 13: - rot->z += arwing->unk_20; + rot->z += arwing->wingsYrot; break; case 4: - pos->z -= arwing->unk_14; - pos->x += arwing->unk_18; + pos->z -= arwing->laserGunsYpos; + pos->x += arwing->laserGunsXpos; break; case 8: - pos->z += arwing->unk_14; - pos->x += arwing->unk_18; + pos->z += arwing->laserGunsYpos; + pos->x += arwing->laserGunsXpos; break; } return false; @@ -560,13 +560,13 @@ bool Display_ArwingWingsOverrideLimbDraw(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos void Display_ArwingWings(ArwingInfo* arwing) { Vec3f sp68[30]; - s32 modelId; + s32 teamFaceId; Matrix_Push(&gGfxMatrix); - arwing->unk_18 = 0.0f; - if (arwing->unk_14 < -7.0f) { - arwing->unk_18 = (-arwing->unk_14 - 7.0f) * 2.5f; + arwing->laserGunsXpos = 0.0f; + if (arwing->laserGunsYpos < -7.0f) { + arwing->laserGunsXpos = (-arwing->laserGunsYpos - 7.0f) * 2.5f; } if (gGameState == GSTATE_PLAY) { @@ -584,31 +584,31 @@ void Display_ArwingWings(ArwingInfo* arwing) { D_display_800CA22C = false; - modelId = arwing->modelId; + teamFaceId = arwing->teamFaceId; if (D_display_800CA220 != 0) { - modelId = 1; + teamFaceId = 1; } - if (modelId != 0) { + if (teamFaceId != 0) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, 6.4f, -16.5f, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, arwing->unk_34 * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, arwing->unk_30 * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, arwing->teamFaceYrot * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, arwing->teamFaceXrot * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 1.0f / 70.925f, 1.0f / 70.925f, 1.0f / 70.925f, MTXF_APPLY); if (gGameState == GSTATE_ENDING) { Matrix_Scale(gGfxMatrix, 0.95f, 0.95f, 0.95f, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); if (gExpertMode) { - gSPDisplayList(gMasterDisp++, D_display_800CA27C[modelId - 1]); + gSPDisplayList(gMasterDisp++, D_display_800CA27C[teamFaceId - 1]); } else { - gSPDisplayList(gMasterDisp++, D_display_800CA26C[modelId - 1]); + gSPDisplayList(gMasterDisp++, D_display_800CA26C[teamFaceId - 1]); } Matrix_Pop(&gGfxMatrix); } Matrix_Translate(gGfxMatrix, 0.0f, 17.2f, -25.8f, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, arwing->unk_38 * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, arwing->windshieldXrot * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL_64_2(); @@ -694,7 +694,7 @@ void Display_Arwing(Player* player, s32 reflectY) { } else { if ((gLevelType == LEVELTYPE_SPACE) || (gCurrentLevel == LEVEL_BOLSE)) { player->arwing.unk_28 = player->arwing.upperRightFlapYrot = player->arwing.bottomRightFlapYrot = - player->arwing.upperLeftFlapYrot = player->arwing.unk_10 = 0.0f; + player->arwing.upperLeftFlapYrot = player->arwing.bottomLeftFlapYrot = 0.0f; } D_display_800CA22C = true; gReflectY = reflectY; @@ -1018,7 +1018,7 @@ void Display_ArwingLaserCharge(Player* player) { Matrix_Copy(gCalcMatrix, &D_display_80161418[player->num]); laserStrength = gLaserStrength[player->num]; - if (player->arwing.unk_14 > -8.0f) { + if (player->arwing.laserGunsYpos > -8.0f) { laserStrength = LASERS_SINGLE; } @@ -1620,8 +1620,8 @@ void Display_CsLevelCompleteHandleCamera(Player* player) { switch (D_display_800CA220) { case 0: - Math_SmoothStepToAngle(&player->arwing.unk_30, 0.0f, 0.2f, 3.0f, 0.0f); - Math_SmoothStepToAngle(&player->arwing.unk_34, 0.0f, 0.2f, 3.0f, 0.0f); + Math_SmoothStepToAngle(&player->arwing.teamFaceXrot, 0.0f, 0.2f, 3.0f, 0.0f); + Math_SmoothStepToAngle(&player->arwing.teamFaceYrot, 0.0f, 0.2f, 3.0f, 0.0f); gPlayCamEye.x = player->cam.eye.x; gPlayCamEye.y = player->cam.eye.y; gPlayCamEye.z = player->cam.eye.z; @@ -1651,8 +1651,8 @@ void Display_CsLevelCompleteHandleCamera(Player* player) { } sp3C = 360.0f - sp3C; - Math_SmoothStepToAngle(&player->arwing.unk_30, sp38, 0.2f, 6.0f, 0.0f); - Math_SmoothStepToAngle(&player->arwing.unk_34, sp3C, 0.2f, 6.0f, 0.0f); + Math_SmoothStepToAngle(&player->arwing.teamFaceXrot, sp38, 0.2f, 6.0f, 0.0f); + Math_SmoothStepToAngle(&player->arwing.teamFaceYrot, sp3C, 0.2f, 6.0f, 0.0f); Math_SmoothStepToF(&D_display_800CA380, gControllerPress[0].stick_y * 0.75f, 0.1f, 2.0f, 0.0f); Math_SmoothStepToF(&D_display_800CA384, gControllerPress[0].stick_x * 3.0f, 0.1f, 5.0f, 0.0f); diff --git a/src/engine/fox_edisplay.c b/src/engine/fox_edisplay.c index 297b701d..7a0676c7 100644 --- a/src/engine/fox_edisplay.c +++ b/src/engine/fox_edisplay.c @@ -535,16 +535,16 @@ void func_edisplay_8005B388(Actor199* actor) { D_edisplay_80161630.upperRightFlapYrot = actor->fwork[15]; D_edisplay_80161630.upperLeftFlapYrot = actor->fwork[16]; D_edisplay_80161630.bottomRightFlapYrot = actor->fwork[26]; - D_edisplay_80161630.unk_10 = actor->fwork[27]; - D_edisplay_80161630.unk_14 = D_edisplay_80161630.unk_18 = D_edisplay_80161630.unk_1C = - D_edisplay_80161630.unk_20 = D_edisplay_80161630.unk_38 = D_edisplay_80161630.unk_24 = 0.0f; + D_edisplay_80161630.bottomLeftFlapYrot = actor->fwork[27]; + D_edisplay_80161630.laserGunsYpos = D_edisplay_80161630.laserGunsXpos = D_edisplay_80161630.wingsXrot = + D_edisplay_80161630.wingsYrot = D_edisplay_80161630.windshieldXrot = D_edisplay_80161630.wingsZrot = 0.0f; D_edisplay_80161630.unk_28 = actor->fwork[17]; - D_edisplay_80161630.modelId = actor->iwork[14]; - D_edisplay_80161630.unk_30 = actor->fwork[20]; - D_edisplay_80161630.unk_34 = actor->fwork[19]; + D_edisplay_80161630.teamFaceId = actor->iwork[14]; + D_edisplay_80161630.teamFaceXrot = actor->fwork[20]; + D_edisplay_80161630.teamFaceYrot = actor->fwork[19]; if (gLevelType == LEVELTYPE_SPACE) { - D_edisplay_80161630.upperRightFlapYrot = D_edisplay_80161630.bottomRightFlapYrot = D_edisplay_80161630.upperLeftFlapYrot = - D_edisplay_80161630.unk_10 = 0.0f; + D_edisplay_80161630.upperRightFlapYrot = D_edisplay_80161630.bottomRightFlapYrot = + D_edisplay_80161630.upperLeftFlapYrot = D_edisplay_80161630.bottomLeftFlapYrot = 0.0f; } Display_ArwingWings(&D_edisplay_80161630); } else if (gLevelType == LEVELTYPE_PLANET) { diff --git a/src/engine/fox_enmy2.c b/src/engine/fox_enmy2.c index 6ea5aac8..d1913234 100644 --- a/src/engine/fox_enmy2.c +++ b/src/engine/fox_enmy2.c @@ -2570,25 +2570,25 @@ void ActorEvent_ProcessTriggers(ActorEvent* this) { break; case EVC_SINGLE_LASER: - if (gPlayer[0].arwing.unk_14 > -8.0f) { + if (gPlayer[0].arwing.laserGunsYpos > -8.0f) { ActorEvent_TriggerBranch(this); } break; case EVC_TWIN_LASER: - if ((gPlayer[0].arwing.unk_14 < -8.0f) && (gLaserStrength[0] == LASERS_TWIN)) { + if ((gPlayer[0].arwing.laserGunsYpos < -8.0f) && (gLaserStrength[0] == LASERS_TWIN)) { ActorEvent_TriggerBranch(this); } break; case EVC_HYPER_LASER: - if ((gPlayer[0].arwing.unk_14 < -8.0f) && (gLaserStrength[0] == LASERS_HYPER)) { + if ((gPlayer[0].arwing.laserGunsYpos < -8.0f) && (gLaserStrength[0] == LASERS_HYPER)) { ActorEvent_TriggerBranch(this); } break; case EVC_UNK3_LASER: - if ((gPlayer[0].arwing.unk_14 < -8.0f) && (gLaserStrength[0] == LASERS_UNK_3)) { + if ((gPlayer[0].arwing.laserGunsYpos < -8.0f) && (gLaserStrength[0] == LASERS_UNK_3)) { ActorEvent_TriggerBranch(this); } break; diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index a63a3a04..5c823d7d 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -3027,7 +3027,7 @@ void Player_ArwingLaser(Player* player) { LaserStrength laser; laser = gLaserStrength[gPlayerNum]; - if (player->arwing.unk_14 > -8.0f) { + if (player->arwing.laserGunsYpos > -8.0f) { laser = LASERS_SINGLE; } @@ -3301,9 +3301,9 @@ void Player_Shoot(Player* player) { if (!Player_UpdateLockOn(player)) { if (gLaserStrength[gPlayerNum] > LASERS_SINGLE) { - Math_SmoothStepToF(&player->arwing.unk_14, -10.0f, 1.0f, 0.5f, 0.0f); + Math_SmoothStepToF(&player->arwing.laserGunsYpos, -10.0f, 1.0f, 0.5f, 0.0f); } else { - Math_SmoothStepToF(&player->arwing.unk_14, 0.0f, 1.0f, 0.5f, 0.0f); + Math_SmoothStepToF(&player->arwing.laserGunsYpos, 0.0f, 1.0f, 0.5f, 0.0f); } if (gShootButton[player->num] & gInputPress->button) { Player_ArwingLaser(player); @@ -3366,7 +3366,7 @@ void Player_ArwingBank(Player* player) { Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, -70.0f, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, -70.0f, 0.3f, 100.0f, 0.f); Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, 70.0f, 0.3f, 100.0f, 0.f); - Math_SmoothStepToF(&player->arwing.unk_10, 70.0f, 0.3f, 100.0f, 0.f); + Math_SmoothStepToF(&player->arwing.bottomLeftFlapYrot, 70.0f, 0.3f, 100.0f, 0.f); if (player->pos.y < (gGroundHeight + 70.0f)) { player->pos.y += 6.0f; } @@ -3380,7 +3380,7 @@ void Player_ArwingBank(Player* player) { Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, 70.0f, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, 70.0f, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, -70.0f, 0.3f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->arwing.unk_10, -70.0f, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.bottomLeftFlapYrot, -70.0f, 0.3f, 100.0f, 0.0f); if (player->pos.y < (gGroundHeight + 70.0f)) { player->pos.y += 6.0f; } @@ -3601,7 +3601,7 @@ void Player_MoveArwing360(Player* player) { Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, -sp60 + sp5C, 0.1f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, -sp60 - sp5C, 0.1f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, -sp60 + sp58, 0.1f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->arwing.unk_10, -sp60 - sp58, 0.1f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.bottomLeftFlapYrot, -sp60 - sp58, 0.1f, 100.0f, 0.0f); scale = 0.1f; if ((player->zRotBank > 10.0f) && (sp7C > 0)) { @@ -3736,7 +3736,7 @@ void Player_PerformLoop(Player* player) { Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, sp58, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, sp58, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, sp58, 0.3f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->arwing.unk_10, sp58, 0.3f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.bottomLeftFlapYrot, sp58, 0.3f, 100.0f, 0.0f); if (player->aerobaticPitch < 180.0f) { player->pos.y += 2.0f; @@ -3864,7 +3864,7 @@ void Player_MoveArwingOnRails(Player* player) { Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, (-sp7C) + sp78, 0.1f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, (-sp7C) - sp78, 0.1f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, (-sp7C) + sp74, 0.1f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->arwing.unk_10, (-sp7C) - sp74, 0.1f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.bottomLeftFlapYrot, (-sp7C) - sp74, 0.1f, 100.0f, 0.0f); } sp84 = 0.1f; @@ -4793,7 +4793,7 @@ void Player_Setup(Player* playerx) { } if (gLaserStrength[gPlayerNum] > LASERS_SINGLE) { - player->arwing.unk_14 = -10.0f; + player->arwing.laserGunsYpos = -10.0f; } gPauseEnabled = false; } @@ -5037,7 +5037,7 @@ void Player_ArwingBoost(Player* player) { Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, 0.0f, 0.5f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, 0.0f, 0.5f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, 0.0f, 0.5f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->arwing.unk_10, 0.0f, 0.5f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.bottomLeftFlapYrot, 0.0f, 0.5f, 100.0f, 0.0f); } player->boostMeter += sp28; if (player->boostMeter > 90.0f) { @@ -5135,7 +5135,7 @@ void Player_ArwingBrake(Player* player) { Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, 90.0f, 0.2f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, -90.0f, 0.2f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, 90.0f, 0.2f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->arwing.unk_10, -90.0f, 0.2f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.bottomLeftFlapYrot, -90.0f, 0.2f, 100.0f, 0.0f); } player->boostMeter += sp30; @@ -5784,14 +5784,14 @@ void Player_Update(Player* player) { case PLAYERSTATE_1C8_LEVEL_INTRO: gShowHud = 0; gPauseEnabled = false; - player->arwing.modelId = 1; + player->arwing.teamFaceId = 1; Cutscene_LevelStart(player); break; case PLAYERSTATE_1C8_ACTIVE: gShowHud = 1; Player_LowHealthMsg(player); - player->arwing.modelId = 0; + player->arwing.teamFaceId = 0; D_hud_80161704 = 255; if ((!gVersusMode || gVsMatchStart) && !player->somersault && (gInputPress->button & U_CBUTTONS) && @@ -5862,12 +5862,12 @@ void Player_Update(Player* player) { gVsLockOnTimers[player->num][0] = gVsLockOnTimers[player->num][1] = gVsLockOnTimers[player->num][2] = gVsLockOnTimers[player->num][3] = 0; } - player->arwing.modelId = 1; + player->arwing.teamFaceId = 1; Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, 0.0f, 0.1f, 5.0f, 0); Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, 0.0f, 0.1f, 5.0f, 0); Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, 0.0f, 0.1f, 5.0f, 0); - Math_SmoothStepToF(&player->arwing.unk_10, 0.0f, 0.1f, 5.0f, 0); + Math_SmoothStepToF(&player->arwing.bottomLeftFlapYrot, 0.0f, 0.1f, 5.0f, 0); Player_UpdateShields(player); Cutscene_UTurn(player); diff --git a/src/overlays/ovl_ending/fox_end2.c b/src/overlays/ovl_ending/fox_end2.c index ec4bcfba..a43c0aad 100644 --- a/src/overlays/ovl_ending/fox_end2.c +++ b/src/overlays/ovl_ending/fox_end2.c @@ -845,25 +845,25 @@ void Ending_80191294(u32 arg0, AssetInfo* asset) { Matrix_SetGfxMtx(&gMasterDisp); D_ending_80198590.unk_28 = 0.0f; - D_ending_80198590.unk_10 = D_ending_80198590.unk_28; - D_ending_80198590.unk_14 = 0.0f; - D_ending_80198590.upperLeftFlapYrot = D_ending_80198590.unk_10; + D_ending_80198590.bottomLeftFlapYrot = D_ending_80198590.unk_28; + D_ending_80198590.laserGunsYpos = 0.0f; + D_ending_80198590.upperLeftFlapYrot = D_ending_80198590.bottomLeftFlapYrot; D_ending_80198590.bottomRightFlapYrot = D_ending_80198590.upperLeftFlapYrot; D_ending_80198590.upperRightFlapYrot = D_ending_80198590.bottomRightFlapYrot; - D_ending_80198590.unk_24 = D_ending_80198590.upperRightFlapYrot; - D_ending_80198590.unk_20 = D_ending_80198590.unk_24; - D_ending_80198590.unk_1C = D_ending_80198590.unk_20; - D_ending_80198590.unk_18 = D_ending_80198590.unk_1C; + D_ending_80198590.wingsZrot = D_ending_80198590.upperRightFlapYrot; + D_ending_80198590.wingsYrot = D_ending_80198590.wingsZrot; + D_ending_80198590.wingsXrot = D_ending_80198590.wingsYrot; + D_ending_80198590.laserGunsXpos = D_ending_80198590.wingsXrot; if ((arg0 > 520) && (arg0 < 720)) { - D_ending_80198590.modelId = 1; + D_ending_80198590.teamFaceId = 1; } else { - D_ending_80198590.modelId = 0; + D_ending_80198590.teamFaceId = 0; } - D_ending_80198590.unk_38 = 0.0f; - D_ending_80198590.unk_30 = +D_ending_801985F0.x; - D_ending_80198590.unk_34 = -D_ending_801985F0.y; + D_ending_80198590.windshieldXrot = 0.0f; + D_ending_80198590.teamFaceXrot = +D_ending_801985F0.x; + D_ending_80198590.teamFaceYrot = -D_ending_801985F0.y; Display_ArwingWings(&D_ending_80198590); } diff --git a/src/overlays/ovl_i1/fox_co.c b/src/overlays/ovl_i1/fox_co.c index f0509026..c3fd6b13 100644 --- a/src/overlays/ovl_i1/fox_co.c +++ b/src/overlays/ovl_i1/fox_co.c @@ -2964,7 +2964,7 @@ void Corneria_LevelStart(Player* player) { Corneria_SpawnClouds(); - player->arwing.unk_30 = 0; + player->arwing.teamFaceXrot = 0; switch (player->csState) { case 0: // LevelStart initialization @@ -3037,7 +3037,7 @@ void Corneria_LevelStart(Player* player) { } if ((player->csTimer < 190) && (player->csTimer > 150)) { - Math_SmoothStepToF(&player->arwing.unk_24, 2.0f, 0.2f, 0.5f, 0.0f); + Math_SmoothStepToF(&player->arwing.wingsZrot, 2.0f, 0.2f, 0.5f, 0.0f); } if (player->csTimer < 150) { @@ -3082,7 +3082,7 @@ void Corneria_LevelStart(Player* player) { } if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) { - player->arwing.unk_30 = 5.0f; + player->arwing.teamFaceXrot = 5.0f; } break; @@ -3094,7 +3094,7 @@ void Corneria_LevelStart(Player* player) { } if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) { - player->arwing.unk_30 = 5.0f; + player->arwing.teamFaceXrot = 5.0f; } gCsCamEyeY = player->pos.y + 10.0f; @@ -3103,7 +3103,7 @@ void Corneria_LevelStart(Player* player) { case 4: if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) { - player->arwing.unk_30 = 5.0f; + player->arwing.teamFaceXrot = 5.0f; } Math_SmoothStepToF(&D_ctx_80177A48[0], 0.1f, 1.0f, 0.001f, 0.0f); @@ -3250,9 +3250,9 @@ void Corneria_LevelStart(Player* player) { } // Fox's head rotates back and forth as he speaks. - player->arwing.unk_30 = 0.0f; + player->arwing.teamFaceXrot = 0.0f; if (gMsgCharIsPrinting && ((gGameFrameCount & 2) != 0)) { - player->arwing.unk_30 = 5.0f; + player->arwing.teamFaceXrot = 5.0f; } if (player->csTimer == 80) { @@ -3366,7 +3366,7 @@ void Corneria_LevelStart(Player* player) { Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, D_ctx_80177A48[2], 0.2f, 1.0f, 0.0f); player->arwing.bottomRightFlapYrot = player->arwing.upperRightFlapYrot; - player->arwing.unk_10 = player->arwing.upperLeftFlapYrot; + player->arwing.bottomLeftFlapYrot = player->arwing.upperLeftFlapYrot; player->cam.eye.y -= 3.0f; player->cam.at.y -= 3.0f; @@ -3450,7 +3450,8 @@ void Corneria_LevelComplete1(Player* player) { f32 temp_fa1; f32 temp_deg; - player->arwing.upperRightFlapYrot = player->arwing.upperLeftFlapYrot = player->arwing.bottomRightFlapYrot = player->arwing.unk_10 = 0.0f; + player->arwing.upperRightFlapYrot = player->arwing.upperLeftFlapYrot = player->arwing.bottomRightFlapYrot = + player->arwing.bottomLeftFlapYrot = 0.0f; Math_SmoothStepToF(&player->zRotBarrelRoll, 0.0f, 0.1f, 15.0f, 0.0f); Math_SmoothStepToF(&player->zRotBank, 0.0f, 0.1f, 15.0f, 0.0f); diff --git a/src/overlays/ovl_i2/fox_me.c b/src/overlays/ovl_i2/fox_me.c index bf811364..b52d06fc 100644 --- a/src/overlays/ovl_i2/fox_me.c +++ b/src/overlays/ovl_i2/fox_me.c @@ -2020,7 +2020,7 @@ void Meteo_LevelStart(Player* player) { } if (gCsFrameCount > 660) { - player->arwing.modelId = 0; + player->arwing.teamFaceId = 0; } if (gCsFrameCount == 340) { @@ -2238,7 +2238,7 @@ void Meteo_LevelComplete(Player* player) { D_ctx_80177A48[1] = 0.0f; D_ctx_80177A48[2] = 0.0f; - player->arwing.modelId = 1; + player->arwing.teamFaceId = 1; gCsFrameCount = 0; diff --git a/src/overlays/ovl_i2/fox_sx.c b/src/overlays/ovl_i2/fox_sx.c index 8853a624..9f07fd38 100644 --- a/src/overlays/ovl_i2/fox_sx.c +++ b/src/overlays/ovl_i2/fox_sx.c @@ -1741,7 +1741,7 @@ void SectorX_LevelComplete(Player* player) { D_ctx_80177A48[2] = 100.0f; D_ctx_80177A48[4] = 100.0f; D_ctx_80177A48[5] = 0.0f; - player->arwing.modelId = 1; + player->arwing.teamFaceId = 1; Play_ClearObjectData(); case 1: diff --git a/src/overlays/ovl_i3/fox_a6.c b/src/overlays/ovl_i3/fox_a6.c index 8fc6689e..4891bb23 100644 --- a/src/overlays/ovl_i3/fox_a6.c +++ b/src/overlays/ovl_i3/fox_a6.c @@ -2653,7 +2653,7 @@ void Area6_LevelComplete(Player* player) { case 0: gCsFrameCount = 0; player->csState = 1; - player->arwing.modelId = 1; + player->arwing.teamFaceId = 1; player->unk_194 = 5.0f; player->unk_190 = 2.0f; player->baseSpeed = 60.0f; diff --git a/src/overlays/ovl_i3/fox_aq.c b/src/overlays/ovl_i3/fox_aq.c index ffeeb0c0..d2c3c147 100644 --- a/src/overlays/ovl_i3/fox_aq.c +++ b/src/overlays/ovl_i3/fox_aq.c @@ -700,7 +700,7 @@ void Aquas_801AA4BC(Player* player) { Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, -70.0f, 0.3f, 100.0f, 0); Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, -70.0f, 0.3f, 100.0f, 0); Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, 70.0f, 0.3f, 100.0f, 0); - Math_SmoothStepToF(&player->arwing.unk_10, 70.0f, 0.3f, 100.0f, 0); + Math_SmoothStepToF(&player->arwing.bottomLeftFlapYrot, 70.0f, 0.3f, 100.0f, 0); } } @@ -711,7 +711,7 @@ void Aquas_801AA4BC(Player* player) { Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, 70.0f, 0.3f, 100.0f, 0); Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, 70.0f, 0.3f, 100.0f, 0); Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, -70.0f, 0.3f, 100.0f, 0); - Math_SmoothStepToF(&player->arwing.unk_10, -70.0f, 0.3f, 100.0f, 0); + Math_SmoothStepToF(&player->arwing.bottomLeftFlapYrot, -70.0f, 0.3f, 100.0f, 0); } } diff --git a/src/overlays/ovl_i3/fox_so.c b/src/overlays/ovl_i3/fox_so.c index 2f716690..cb7fe63c 100644 --- a/src/overlays/ovl_i3/fox_so.c +++ b/src/overlays/ovl_i3/fox_so.c @@ -3149,8 +3149,9 @@ void Solar_LevelComplete(Player* player) { player->camRoll = player->aerobaticPitch = 0.0f; player->baseSpeed = 40.0f; - player->arwing.upperRightFlapYrot = player->arwing.upperLeftFlapYrot = player->arwing.bottomRightFlapYrot = player->arwing.unk_10 = - player->zRotBarrelRoll = player->zRotBank = player->boostSpeed = 0.0f; + player->arwing.upperRightFlapYrot = player->arwing.upperLeftFlapYrot = player->arwing.bottomRightFlapYrot = + player->arwing.bottomLeftFlapYrot = player->zRotBarrelRoll = player->zRotBank = player->boostSpeed = + 0.0f; player->draw = true; gCsCamEyeX = player->cam.eye.x; @@ -3243,7 +3244,7 @@ void Solar_LevelComplete(Player* player) { player->pos.y = 200.0f; player->pos.z = -(gPathProgress - 500.0f); player->csState++; - player->arwing.modelId = 1; + player->arwing.teamFaceId = 1; Audio_StartPlayerNoise(0); @@ -3278,7 +3279,7 @@ void Solar_LevelComplete(Player* player) { gFillScreenAlphaStep = 4; if (gMsgCharIsPrinting) { - player->arwing.unk_30 = (s32) (gGameFrameCount % 2U) * 5.0f; + player->arwing.teamFaceXrot = (s32) (gGameFrameCount % 2U) * 5.0f; } switch (gCsFrameCount) { diff --git a/src/overlays/ovl_i3/fox_zo.c b/src/overlays/ovl_i3/fox_zo.c index 49b5eecb..dafaab5b 100644 --- a/src/overlays/ovl_i3/fox_zo.c +++ b/src/overlays/ovl_i3/fox_zo.c @@ -4763,8 +4763,9 @@ void Zoness_LevelComplete(Player* player) { player->camRoll = 0.0f; player->baseSpeed = 40.0f; player->draw = true; - player->arwing.upperRightFlapYrot = player->arwing.upperLeftFlapYrot = player->arwing.bottomRightFlapYrot = player->arwing.unk_10 = - player->zRotBarrelRoll = player->zRotBank = player->boostSpeed = 0.0f; + player->arwing.upperRightFlapYrot = player->arwing.upperLeftFlapYrot = player->arwing.bottomRightFlapYrot = + player->arwing.bottomLeftFlapYrot = player->zRotBarrelRoll = player->zRotBank = player->boostSpeed = + 0.0f; gCsCamEyeX = player->cam.eye.x; gCsCamEyeY = player->cam.eye.y; @@ -4824,7 +4825,7 @@ void Zoness_LevelComplete(Player* player) { Audio_KillSfxBySource(player->sfxSource); gFillScreenAlpha = 250; player->csTimer = 20; - player->arwing.modelId = 1; + player->arwing.teamFaceId = 1; player->baseSpeed = 0.0f; player->rot.x = 0.0f; player->rot.y = 0.0f; diff --git a/src/overlays/ovl_i4/fox_bo.c b/src/overlays/ovl_i4/fox_bo.c index 1e3ac8f8..523206f2 100644 --- a/src/overlays/ovl_i4/fox_bo.c +++ b/src/overlays/ovl_i4/fox_bo.c @@ -1461,7 +1461,7 @@ void Bolse_LevelComplete(Player* player) { gCsFrameCount = 0; gGroundHeight = -10000.0f; player->hideShadow = true; - player->arwing.modelId = 1; + player->arwing.teamFaceId = 1; AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_EXPLOSION, actor50->sfxSource, 0); Audio_StartPlayerNoise(0); } diff --git a/src/overlays/ovl_i4/fox_fo.c b/src/overlays/ovl_i4/fox_fo.c index 1394c70e..f29d7441 100644 --- a/src/overlays/ovl_i4/fox_fo.c +++ b/src/overlays/ovl_i4/fox_fo.c @@ -676,13 +676,13 @@ void Fortuna_LevelComplete(Player* player) { player->arwing.upperRightFlapYrot = 0.0f; player->arwing.upperLeftFlapYrot = 0.0f; player->arwing.bottomRightFlapYrot = 0.0f; - player->arwing.unk_10 = 0.0f; + player->arwing.bottomLeftFlapYrot = 0.0f; Math_SmoothStepToF(&player->boostSpeed, 0.0f, 0.1f, 1.5f, 0.0f); switch (player->csState) { case -1: - player->arwing.modelId = 1; + player->arwing.teamFaceId = 1; player->rot.y = 0.0f; player->baseSpeed = 30.0f; player->yRot_114 = 180.0f; @@ -841,7 +841,7 @@ void Fortuna_LevelComplete(Player* player) { } player->pos.z = -10000.0f; gCsFrameCount = 0; - player->arwing.modelId = 1; + player->arwing.teamFaceId = 1; player->wingPosition = 1; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 100); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 100); diff --git a/src/overlays/ovl_i4/fox_ka.c b/src/overlays/ovl_i4/fox_ka.c index b0e912c6..47b05099 100644 --- a/src/overlays/ovl_i4/fox_ka.c +++ b/src/overlays/ovl_i4/fox_ka.c @@ -1800,7 +1800,7 @@ void Katina_LevelComplete(Player* player) { Vec3f dest; f32 angle; - player->arwing.unk_10 = 0.0f; + player->arwing.bottomLeftFlapYrot = 0.0f; player->arwing.upperLeftFlapYrot = 0.0f; player->arwing.bottomRightFlapYrot = 0.0f; player->arwing.upperRightFlapYrot = 0.0f; diff --git a/src/overlays/ovl_i5/fox_ma.c b/src/overlays/ovl_i5/fox_ma.c index 86a2ca0e..e0e31d4b 100644 --- a/src/overlays/ovl_i5/fox_ma.c +++ b/src/overlays/ovl_i5/fox_ma.c @@ -6515,8 +6515,8 @@ void Macbeth_LevelComplete2(Player* player) { player->aerobaticPitch = 0.0f; player->camRoll = 0.0f; player->boostSpeed = 0.0f; - player->arwing.upperLeftFlapYrot = player->arwing.bottomRightFlapYrot = player->arwing.unk_10 = player->zRotBarrelRoll = - player->zRotBank = 0.0f; + player->arwing.upperLeftFlapYrot = player->arwing.bottomRightFlapYrot = player->arwing.bottomLeftFlapYrot = + player->zRotBarrelRoll = player->zRotBank = 0.0f; player->yBob = 0.0f; player->rockAngle = 0.0f; player->unk_16C = 0.0f; @@ -6951,8 +6951,9 @@ void Macbeth_LevelComplete2(Player* player) { player->yRot_114 = player->aerobaticPitch = player->camRoll = player->unk_174 = player->unk_178 = player->unk_17C = player->unk_180 = player->unk_184 = player->arwing.upperRightFlapYrot = player->unk_170 = player->unk_16C = player->rockAngle = player->yBob = - player->arwing.upperLeftFlapYrot = player->arwing.bottomRightFlapYrot = player->arwing.unk_10 = - player->zRotBarrelRoll = player->zRotBank = player->boostSpeed = 0.0f; + player->arwing.upperLeftFlapYrot = player->arwing.bottomRightFlapYrot = + player->arwing.bottomLeftFlapYrot = player->zRotBarrelRoll = player->zRotBank = + player->boostSpeed = 0.0f; player->baseSpeed = 5.0f; diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index d989d5c0..6706dfc3 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -3857,12 +3857,13 @@ void Andross_80193C4C(Player* player) { Math_SmoothStepToF(D_ctx_80177A48, 1.0f, 1.0f, 0.01f, 0.0f); - player->arwing.upperRightFlapYrot = player->arwing.bottomRightFlapYrot = player->arwing.upperLeftFlapYrot = player->arwing.unk_10 = 0.0f; + player->arwing.upperRightFlapYrot = player->arwing.bottomRightFlapYrot = player->arwing.upperLeftFlapYrot = + player->arwing.bottomLeftFlapYrot = 0.0f; switch (player->csState) { case 0: gCsFrameCount = 0; - player->arwing.modelId = 1; + player->arwing.teamFaceId = 1; D_ctx_80177A48[0] = 0.0f; if (player->aerobaticPitch > 180.0f) { player->aerobaticPitch -= 360.0f; diff --git a/src/overlays/ovl_i6/fox_sy.c b/src/overlays/ovl_i6/fox_sy.c index b1638c19..ee7133d6 100644 --- a/src/overlays/ovl_i6/fox_sy.c +++ b/src/overlays/ovl_i6/fox_sy.c @@ -2087,8 +2087,8 @@ void SectorY_LevelComplete(Player* player) { player->camRoll = 0.0f; player->baseSpeed = 40.0f; player->boostSpeed = 0.0f; - player->arwing.upperRightFlapYrot = player->arwing.upperLeftFlapYrot = player->arwing.bottomRightFlapYrot = player->arwing.unk_10 = - player->zRotBarrelRoll = player->zRotBank = 0.0f; + player->arwing.upperRightFlapYrot = player->arwing.upperLeftFlapYrot = player->arwing.bottomRightFlapYrot = + player->arwing.bottomLeftFlapYrot = player->zRotBarrelRoll = player->zRotBank = 0.0f; player->draw = true; D_ctx_80177A48[8] = Math_RadToDeg( Math_Atan2F(gPlayer[0].cam.eye.x - boss->obj.pos.x, gPlayer[0].cam.eye.z - boss->obj.pos.z)); @@ -2193,13 +2193,13 @@ void SectorY_LevelComplete(Player* player) { D_ctx_80177A48[7] = 25.0f; D_ctx_80177A48[8] = 500.0f; D_ctx_80177A48[9] = 3600.0f; - player->arwing.modelId = 1; + player->arwing.teamFaceId = 1; } break; case 3: if ((gCsFrameCount < 720) && gMsgCharIsPrinting) { - player->arwing.unk_30 = (f32) (gGameFrameCount & 2) * 5.0f; + player->arwing.teamFaceXrot = (f32) (gGameFrameCount & 2) * 5.0f; } gFillScreenAlphaTarget = 0; diff --git a/src/overlays/ovl_i6/fox_ve2.c b/src/overlays/ovl_i6/fox_ve2.c index 886c54fe..4bdc2eb5 100644 --- a/src/overlays/ovl_i6/fox_ve2.c +++ b/src/overlays/ovl_i6/fox_ve2.c @@ -305,7 +305,7 @@ void Venom2_LevelComplete(Player* player) { Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, -var_fa0 + sp74, 0.1f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, -var_fa0 - sp74, 0.1f, 100.0f, 0.0f); Math_SmoothStepToF(&player->arwing.upperLeftFlapYrot, -var_fa0 + sp70, 0.1f, 100.0f, 0.0f); - Math_SmoothStepToF(&player->arwing.unk_10, -var_fa0 - sp70, 0.1f, 100.0f, 0.0f); + Math_SmoothStepToF(&player->arwing.bottomLeftFlapYrot, -var_fa0 - sp70, 0.1f, 100.0f, 0.0f); sp94 = player->pos.x - gBosses[0].obj.pos.x; sp90 = player->pos.y - (gBosses[0].obj.pos.y + 700.0f); sp8C = player->pos.z - gBosses[0].obj.pos.z; @@ -313,9 +313,9 @@ void Venom2_LevelComplete(Player* player) { switch (player->csState) { case 0: player->csState++; - player->arwing.upperRightFlapYrot = player->arwing.upperLeftFlapYrot = player->arwing.bottomRightFlapYrot = player->arwing.unk_10 = - 0.0f; - player->arwing.modelId = 1; + player->arwing.upperRightFlapYrot = player->arwing.upperLeftFlapYrot = player->arwing.bottomRightFlapYrot = + player->arwing.bottomLeftFlapYrot = 0.0f; + player->arwing.teamFaceId = 1; D_ctx_80177A48[0] = 0.0f; D_ctx_80177A48[1] = 0.1f; diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index a26a34fe..1561816e 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -2271,15 +2271,15 @@ void Map_801A116C(void) { arwing.rightWingState = arwing.leftWingState = WINGSTATE_INTACT; // clang-format off - arwing.unk_18 = arwing.unk_1C = arwing.unk_20 = arwing.unk_24 = arwing.upperRightFlapYrot = - arwing.bottomRightFlapYrot = arwing.upperLeftFlapYrot = arwing.unk_10 = arwing.unk_28 = 0.0f; + arwing.laserGunsXpos = arwing.wingsXrot = arwing.wingsYrot = arwing.wingsZrot = arwing.upperRightFlapYrot = + arwing.bottomRightFlapYrot = arwing.upperLeftFlapYrot = arwing.bottomLeftFlapYrot = arwing.unk_28 = 0.0f; // clang-format on - arwing.unk_14 = 0.0f; - arwing.modelId = 1; - arwing.unk_30 = 0.0f; - arwing.unk_34 = 0.0f; - arwing.unk_38 = 0.0f; + arwing.laserGunsYpos = 0.0f; + arwing.teamFaceId = 1; + arwing.teamFaceXrot = 0.0f; + arwing.teamFaceYrot = 0.0f; + arwing.windshieldXrot = 0.0f; Display_ArwingWings(&arwing); diff --git a/src/overlays/ovl_menu/fox_title.c b/src/overlays/ovl_menu/fox_title.c index 85096bb7..a1709772 100644 --- a/src/overlays/ovl_menu/fox_title.c +++ b/src/overlays/ovl_menu/fox_title.c @@ -2254,14 +2254,14 @@ void Title_8018D2B8(s32 arg0) { Matrix_SetGfxMtx(&gMasterDisp); arwing.rightWingState = arwing.leftWingState = WINGSTATE_INTACT; - arwing.unk_18 = arwing.unk_1C = arwing.unk_20 = arwing.unk_24 = arwing.upperRightFlapYrot = arwing.bottomRightFlapYrot = - arwing.upperLeftFlapYrot = arwing.unk_10 = arwing.unk_28 = 0.0f; + arwing.laserGunsXpos = arwing.wingsXrot = arwing.wingsYrot = arwing.wingsZrot = arwing.upperRightFlapYrot = + arwing.bottomRightFlapYrot = arwing.upperLeftFlapYrot = arwing.bottomLeftFlapYrot = arwing.unk_28 = 0.0f; - arwing.unk_14 = D_menu_801B84E8[arg0].unk_28; - arwing.modelId = D_menu_801B84E8[arg0].unk_34; - arwing.unk_30 = D_menu_801B84E8[arg0].unk_2C; - arwing.unk_34 = D_menu_801B84E8[arg0].unk_30; - arwing.unk_38 = D_menu_801B84E8[arg0].unk_24; + arwing.laserGunsYpos = D_menu_801B84E8[arg0].unk_28; + arwing.teamFaceId = D_menu_801B84E8[arg0].unk_34; + arwing.teamFaceXrot = D_menu_801B84E8[arg0].unk_2C; + arwing.teamFaceYrot = D_menu_801B84E8[arg0].unk_30; + arwing.windshieldXrot = D_menu_801B84E8[arg0].unk_24; Display_ArwingWings(&arwing); From f17c7bdc2717f43ddef04c1a297492e6405068d4 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Thu, 15 Aug 2024 04:28:42 -0300 Subject: [PATCH 140/151] teamFaceId -> drawFace --- include/sf64player.h | 2 +- src/engine/fox_360.c | 4 ++-- src/engine/fox_demo.c | 6 +++--- src/engine/fox_display.c | 20 ++++++++++---------- src/engine/fox_edisplay.c | 2 +- src/engine/fox_play.c | 6 +++--- src/overlays/ovl_ending/fox_end2.c | 4 ++-- src/overlays/ovl_i2/fox_me.c | 4 ++-- src/overlays/ovl_i2/fox_sx.c | 2 +- src/overlays/ovl_i3/fox_a6.c | 2 +- src/overlays/ovl_i3/fox_so.c | 2 +- src/overlays/ovl_i3/fox_zo.c | 2 +- src/overlays/ovl_i4/fox_bo.c | 2 +- src/overlays/ovl_i4/fox_fo.c | 4 ++-- src/overlays/ovl_i6/fox_andross.c | 2 +- src/overlays/ovl_i6/fox_sy.c | 2 +- src/overlays/ovl_i6/fox_ve2.c | 2 +- src/overlays/ovl_menu/fox_map.c | 2 +- src/overlays/ovl_menu/fox_title.c | 2 +- 19 files changed, 36 insertions(+), 36 deletions(-) diff --git a/include/sf64player.h b/include/sf64player.h index 2ab36ea9..0ac36061 100644 --- a/include/sf64player.h +++ b/include/sf64player.h @@ -140,7 +140,7 @@ typedef struct ArwingInfo { /* 0x20 */ f32 wingsYrot; /* 0x24 */ f32 wingsZrot; /* 0x28 */ f32 unk_28; - /* 0x2C */ u8 teamFaceId; + /* 0x2C */ u8 drawFace; /* 0x30 */ f32 teamFaceXrot; /* 0x34 */ f32 teamFaceYrot; /* 0x38 */ f32 windshieldXrot; diff --git a/src/engine/fox_360.c b/src/engine/fox_360.c index 26a352da..9a42f37d 100644 --- a/src/engine/fox_360.c +++ b/src/engine/fox_360.c @@ -170,7 +170,7 @@ void AllRange_GreatFoxRepair(Player* player) { player->pos.z = 0.0f; gCsCamAtZ = 0.0f; D_ctx_80177A48[0] = 1.0f; - player->arwing.teamFaceId = 1; + player->arwing.drawFace = true; player->csState++; break; @@ -230,7 +230,7 @@ void AllRange_GreatFoxRepair(Player* player) { player->rot.x += 0.4f; if (gCsFrameCount >= 130) { player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; - player->arwing.teamFaceId = 0; + player->arwing.drawFace = false; player->unk_014 = 0; player->unk_018 = 0; player->unk_01C = 0; diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index e4dd528d..da745f1a 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -130,7 +130,7 @@ void Cutscene_WarpZoneComplete(Player* player) { D_ctx_80177A48[0] = 0.0f; D_ctx_80177A48[1] = 0.0f; D_ctx_80177A48[2] = 0.0f; - player->arwing.teamFaceId = 1; + player->arwing.drawFace = true; gCsFrameCount = 0; /* fallthrough */ case 1: @@ -796,7 +796,7 @@ void Cutscene_AllRangeMode(Player* player) { D_ctx_80177A48[1] = 0.0f; D_ctx_80177A48[2] = 60.0f; D_ctx_80177A48[3] = 0.0f; - player->arwing.teamFaceId = 1; + player->arwing.drawFace = true; player->csState++; gCsFrameCount = 0; /* fallthrough */ @@ -925,7 +925,7 @@ void Cutscene_CoComplete2(Player* player) { player->zRotBarrelRoll = 0.0f; player->zRotBank = 0.0f; player->boostSpeed = 0.0f; - player->arwing.teamFaceId = 1; + player->arwing.drawFace = true; player->baseSpeed = 40.0f; /* fallthrough */ diff --git a/src/engine/fox_display.c b/src/engine/fox_display.c index dabc2a6a..38ead565 100644 --- a/src/engine/fox_display.c +++ b/src/engine/fox_display.c @@ -559,8 +559,8 @@ bool Display_ArwingWingsOverrideLimbDraw(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos } void Display_ArwingWings(ArwingInfo* arwing) { - Vec3f sp68[30]; - s32 teamFaceId; + Vec3f frameTable[30]; + s32 drawFace; Matrix_Push(&gGfxMatrix); @@ -574,22 +574,22 @@ void Display_ArwingWings(ArwingInfo* arwing) { arwing, &gIdentityMatrix); } else { if (gGameState == GSTATE_MENU) { - Animation_GetFrameData(&D_arwing_3015AF4, 0, sp68); + Animation_GetFrameData(&D_arwing_3015AF4, 0, frameTable); } else { - Animation_GetFrameData(&D_arwing_3015C28, 0, sp68); + Animation_GetFrameData(&D_arwing_3015C28, 0, frameTable); } - Animation_DrawSkeleton(1, D_arwing_3016610, sp68, Display_ArwingWingsOverrideLimbDraw, NULL, arwing, + Animation_DrawSkeleton(1, D_arwing_3016610, frameTable, Display_ArwingWingsOverrideLimbDraw, NULL, arwing, &gIdentityMatrix); } D_display_800CA22C = false; - teamFaceId = arwing->teamFaceId; + drawFace = arwing->drawFace; if (D_display_800CA220 != 0) { - teamFaceId = 1; + drawFace = true; } - if (teamFaceId != 0) { + if (drawFace != 0) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, 6.4f, -16.5f, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, arwing->teamFaceYrot * M_DTOR, MTXF_APPLY); @@ -600,9 +600,9 @@ void Display_ArwingWings(ArwingInfo* arwing) { } Matrix_SetGfxMtx(&gMasterDisp); if (gExpertMode) { - gSPDisplayList(gMasterDisp++, D_display_800CA27C[teamFaceId - 1]); + gSPDisplayList(gMasterDisp++, D_display_800CA27C[drawFace - 1]); } else { - gSPDisplayList(gMasterDisp++, D_display_800CA26C[teamFaceId - 1]); + gSPDisplayList(gMasterDisp++, D_display_800CA26C[drawFace - 1]); } Matrix_Pop(&gGfxMatrix); } diff --git a/src/engine/fox_edisplay.c b/src/engine/fox_edisplay.c index 7a0676c7..ffe67524 100644 --- a/src/engine/fox_edisplay.c +++ b/src/engine/fox_edisplay.c @@ -539,7 +539,7 @@ void func_edisplay_8005B388(Actor199* actor) { D_edisplay_80161630.laserGunsYpos = D_edisplay_80161630.laserGunsXpos = D_edisplay_80161630.wingsXrot = D_edisplay_80161630.wingsYrot = D_edisplay_80161630.windshieldXrot = D_edisplay_80161630.wingsZrot = 0.0f; D_edisplay_80161630.unk_28 = actor->fwork[17]; - D_edisplay_80161630.teamFaceId = actor->iwork[14]; + D_edisplay_80161630.drawFace = actor->iwork[14]; D_edisplay_80161630.teamFaceXrot = actor->fwork[20]; D_edisplay_80161630.teamFaceYrot = actor->fwork[19]; if (gLevelType == LEVELTYPE_SPACE) { diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index 5c823d7d..c20df7e1 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -5784,14 +5784,14 @@ void Player_Update(Player* player) { case PLAYERSTATE_1C8_LEVEL_INTRO: gShowHud = 0; gPauseEnabled = false; - player->arwing.teamFaceId = 1; + player->arwing.drawFace = true; Cutscene_LevelStart(player); break; case PLAYERSTATE_1C8_ACTIVE: gShowHud = 1; Player_LowHealthMsg(player); - player->arwing.teamFaceId = 0; + player->arwing.drawFace = false; D_hud_80161704 = 255; if ((!gVersusMode || gVsMatchStart) && !player->somersault && (gInputPress->button & U_CBUTTONS) && @@ -5862,7 +5862,7 @@ void Player_Update(Player* player) { gVsLockOnTimers[player->num][0] = gVsLockOnTimers[player->num][1] = gVsLockOnTimers[player->num][2] = gVsLockOnTimers[player->num][3] = 0; } - player->arwing.teamFaceId = 1; + player->arwing.drawFace = true; Math_SmoothStepToF(&player->arwing.upperRightFlapYrot, 0.0f, 0.1f, 5.0f, 0); Math_SmoothStepToF(&player->arwing.bottomRightFlapYrot, 0.0f, 0.1f, 5.0f, 0); diff --git a/src/overlays/ovl_ending/fox_end2.c b/src/overlays/ovl_ending/fox_end2.c index a43c0aad..dd652136 100644 --- a/src/overlays/ovl_ending/fox_end2.c +++ b/src/overlays/ovl_ending/fox_end2.c @@ -856,9 +856,9 @@ void Ending_80191294(u32 arg0, AssetInfo* asset) { D_ending_80198590.laserGunsXpos = D_ending_80198590.wingsXrot; if ((arg0 > 520) && (arg0 < 720)) { - D_ending_80198590.teamFaceId = 1; + D_ending_80198590.drawFace = true; } else { - D_ending_80198590.teamFaceId = 0; + D_ending_80198590.drawFace = false; } D_ending_80198590.windshieldXrot = 0.0f; diff --git a/src/overlays/ovl_i2/fox_me.c b/src/overlays/ovl_i2/fox_me.c index b52d06fc..7807287e 100644 --- a/src/overlays/ovl_i2/fox_me.c +++ b/src/overlays/ovl_i2/fox_me.c @@ -2020,7 +2020,7 @@ void Meteo_LevelStart(Player* player) { } if (gCsFrameCount > 660) { - player->arwing.teamFaceId = 0; + player->arwing.drawFace = false; } if (gCsFrameCount == 340) { @@ -2238,7 +2238,7 @@ void Meteo_LevelComplete(Player* player) { D_ctx_80177A48[1] = 0.0f; D_ctx_80177A48[2] = 0.0f; - player->arwing.teamFaceId = 1; + player->arwing.drawFace = true; gCsFrameCount = 0; diff --git a/src/overlays/ovl_i2/fox_sx.c b/src/overlays/ovl_i2/fox_sx.c index 9f07fd38..d996891a 100644 --- a/src/overlays/ovl_i2/fox_sx.c +++ b/src/overlays/ovl_i2/fox_sx.c @@ -1741,7 +1741,7 @@ void SectorX_LevelComplete(Player* player) { D_ctx_80177A48[2] = 100.0f; D_ctx_80177A48[4] = 100.0f; D_ctx_80177A48[5] = 0.0f; - player->arwing.teamFaceId = 1; + player->arwing.drawFace = true; Play_ClearObjectData(); case 1: diff --git a/src/overlays/ovl_i3/fox_a6.c b/src/overlays/ovl_i3/fox_a6.c index 4891bb23..3307d341 100644 --- a/src/overlays/ovl_i3/fox_a6.c +++ b/src/overlays/ovl_i3/fox_a6.c @@ -2653,7 +2653,7 @@ void Area6_LevelComplete(Player* player) { case 0: gCsFrameCount = 0; player->csState = 1; - player->arwing.teamFaceId = 1; + player->arwing.drawFace = true; player->unk_194 = 5.0f; player->unk_190 = 2.0f; player->baseSpeed = 60.0f; diff --git a/src/overlays/ovl_i3/fox_so.c b/src/overlays/ovl_i3/fox_so.c index cb7fe63c..e6be1f26 100644 --- a/src/overlays/ovl_i3/fox_so.c +++ b/src/overlays/ovl_i3/fox_so.c @@ -3244,7 +3244,7 @@ void Solar_LevelComplete(Player* player) { player->pos.y = 200.0f; player->pos.z = -(gPathProgress - 500.0f); player->csState++; - player->arwing.teamFaceId = 1; + player->arwing.drawFace = true; Audio_StartPlayerNoise(0); diff --git a/src/overlays/ovl_i3/fox_zo.c b/src/overlays/ovl_i3/fox_zo.c index dafaab5b..ac5d4133 100644 --- a/src/overlays/ovl_i3/fox_zo.c +++ b/src/overlays/ovl_i3/fox_zo.c @@ -4825,7 +4825,7 @@ void Zoness_LevelComplete(Player* player) { Audio_KillSfxBySource(player->sfxSource); gFillScreenAlpha = 250; player->csTimer = 20; - player->arwing.teamFaceId = 1; + player->arwing.drawFace = true; player->baseSpeed = 0.0f; player->rot.x = 0.0f; player->rot.y = 0.0f; diff --git a/src/overlays/ovl_i4/fox_bo.c b/src/overlays/ovl_i4/fox_bo.c index 523206f2..8bec81f5 100644 --- a/src/overlays/ovl_i4/fox_bo.c +++ b/src/overlays/ovl_i4/fox_bo.c @@ -1461,7 +1461,7 @@ void Bolse_LevelComplete(Player* player) { gCsFrameCount = 0; gGroundHeight = -10000.0f; player->hideShadow = true; - player->arwing.teamFaceId = 1; + player->arwing.drawFace = true; AUDIO_PLAY_SFX(NA_SE_EN_ANDROSS_EXPLOSION, actor50->sfxSource, 0); Audio_StartPlayerNoise(0); } diff --git a/src/overlays/ovl_i4/fox_fo.c b/src/overlays/ovl_i4/fox_fo.c index f29d7441..ddea95a6 100644 --- a/src/overlays/ovl_i4/fox_fo.c +++ b/src/overlays/ovl_i4/fox_fo.c @@ -682,7 +682,7 @@ void Fortuna_LevelComplete(Player* player) { switch (player->csState) { case -1: - player->arwing.teamFaceId = 1; + player->arwing.drawFace = true; player->rot.y = 0.0f; player->baseSpeed = 30.0f; player->yRot_114 = 180.0f; @@ -841,7 +841,7 @@ void Fortuna_LevelComplete(Player* player) { } player->pos.z = -10000.0f; gCsFrameCount = 0; - player->arwing.teamFaceId = 1; + player->arwing.drawFace = true; player->wingPosition = 1; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 100); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 100); diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index 6706dfc3..bae0875b 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -3863,7 +3863,7 @@ void Andross_80193C4C(Player* player) { switch (player->csState) { case 0: gCsFrameCount = 0; - player->arwing.teamFaceId = 1; + player->arwing.drawFace = true; D_ctx_80177A48[0] = 0.0f; if (player->aerobaticPitch > 180.0f) { player->aerobaticPitch -= 360.0f; diff --git a/src/overlays/ovl_i6/fox_sy.c b/src/overlays/ovl_i6/fox_sy.c index ee7133d6..6534def2 100644 --- a/src/overlays/ovl_i6/fox_sy.c +++ b/src/overlays/ovl_i6/fox_sy.c @@ -2193,7 +2193,7 @@ void SectorY_LevelComplete(Player* player) { D_ctx_80177A48[7] = 25.0f; D_ctx_80177A48[8] = 500.0f; D_ctx_80177A48[9] = 3600.0f; - player->arwing.teamFaceId = 1; + player->arwing.drawFace = true; } break; diff --git a/src/overlays/ovl_i6/fox_ve2.c b/src/overlays/ovl_i6/fox_ve2.c index 4bdc2eb5..1ec85a07 100644 --- a/src/overlays/ovl_i6/fox_ve2.c +++ b/src/overlays/ovl_i6/fox_ve2.c @@ -315,7 +315,7 @@ void Venom2_LevelComplete(Player* player) { player->csState++; player->arwing.upperRightFlapYrot = player->arwing.upperLeftFlapYrot = player->arwing.bottomRightFlapYrot = player->arwing.bottomLeftFlapYrot = 0.0f; - player->arwing.teamFaceId = 1; + player->arwing.drawFace = true; D_ctx_80177A48[0] = 0.0f; D_ctx_80177A48[1] = 0.1f; diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index 1561816e..76e07b7f 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -2276,7 +2276,7 @@ void Map_801A116C(void) { // clang-format on arwing.laserGunsYpos = 0.0f; - arwing.teamFaceId = 1; + arwing.drawFace = true; arwing.teamFaceXrot = 0.0f; arwing.teamFaceYrot = 0.0f; arwing.windshieldXrot = 0.0f; diff --git a/src/overlays/ovl_menu/fox_title.c b/src/overlays/ovl_menu/fox_title.c index a1709772..6dc2e693 100644 --- a/src/overlays/ovl_menu/fox_title.c +++ b/src/overlays/ovl_menu/fox_title.c @@ -2258,7 +2258,7 @@ void Title_8018D2B8(s32 arg0) { arwing.bottomRightFlapYrot = arwing.upperLeftFlapYrot = arwing.bottomLeftFlapYrot = arwing.unk_28 = 0.0f; arwing.laserGunsYpos = D_menu_801B84E8[arg0].unk_28; - arwing.teamFaceId = D_menu_801B84E8[arg0].unk_34; + arwing.drawFace = D_menu_801B84E8[arg0].unk_34; arwing.teamFaceXrot = D_menu_801B84E8[arg0].unk_2C; arwing.teamFaceYrot = D_menu_801B84E8[arg0].unk_30; arwing.windshieldXrot = D_menu_801B84E8[arg0].unk_24; From 56d49ec7674c2f4db9256a5f7967e46d0cd69bf3 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Thu, 15 Aug 2024 05:10:00 -0300 Subject: [PATCH 141/151] corrections --- include/functions.h | 12 +- include/sf64object.h | 4 +- .../us/rev1/symbol_addrs_engine.txt | 10 +- src/engine/fox_edata_info.c | 6 +- src/engine/fox_edisplay.c | 323 +++++++++++++----- src/engine/fox_enmy.c | 6 +- src/engine/fox_enmy2.c | 2 +- 7 files changed, 256 insertions(+), 107 deletions(-) diff --git a/include/functions.h b/include/functions.h index f97773a5..090c227e 100644 --- a/include/functions.h +++ b/include/functions.h @@ -105,7 +105,7 @@ void ActorHopBot_Draw(Actor*); void MeteoTunnel_Draw(Scenery*); void Scenery_DrawTitaniaBones(Scenery*); void CoIBeam_Draw(Scenery*); -void ActorMoleMissile_Draw(ActorMoleMissile*); +void CoMoleMissile_Draw(CoMoleMissile*); void Sprite167_Draw(Sprite*); void FogShadow_Draw(Sprite*); void CoBuilding9_Draw(Scenery*); @@ -118,8 +118,8 @@ void MeMolarRock_Draw(Actor*); void MeMeteor2_Draw(MeMeteor2*); void MeLaserCannon1_Draw(MeLaserCannon1*); void ActorMissileSeek_Draw(Actor*); -void ActorSkibot_Draw(ActorSkibot*); -void ActorRadar_Draw(CoRadar*); +void CoSkibot_Draw(CoSkibot*); +void CoRadar_Draw(CoRadar*); void ItemCheckpoint_Draw(Item*); void ItemSilverRing_Draw(Item*); void ItemSilverStar_Draw(Item*); @@ -166,9 +166,9 @@ void func_enmy_800654E4(Object*); void ActorMissileSeek_Update(Actor*); void func_enmy_800660F0(Actor*); void Actor_Despawn(Actor*); -void ActorSkibot_Update(ActorSkibot*); +void CoSkibot_Update(CoSkibot*); void func_enmy_8006684C(Actor*); -void ActorRadar_Update(CoRadar*); +void CoRadar_Update(CoRadar*); void MeMolarRock_Update(Actor*); void func_enmy_80066C00(Scenery*); void CoBuilding9_Update(Scenery*); @@ -219,7 +219,7 @@ void MeMora_Update(Actor*); void MeMora_Dying(Actor*); void MeMora_Draw(Actor*); void CoIBeam_Update(Scenery*); -void ActorMoleMissile_Update(ActorMoleMissile*); +void CoMoleMissile_Update(CoMoleMissile*); void ActorDebris_Update(Actor*); void MeteoTunnel_Update(Scenery*); void Actor_SetupPlayerShot(PlayerShotId, PlayerShot*, s32, f32, f32, f32, f32, f32, f32, f32, f32, f32); diff --git a/include/sf64object.h b/include/sf64object.h index 8b465bb4..f5e4669d 100644 --- a/include/sf64object.h +++ b/include/sf64object.h @@ -1127,11 +1127,11 @@ typedef Actor Actor188; typedef Actor ActorDebris; typedef Actor ActorMissileSeekTeam; typedef Actor ActorMissileSeekPlayer; -typedef Actor ActorSkibot; +typedef Actor CoSkibot; typedef Actor CoRadar; typedef Actor MeMora; typedef Actor ActorCutscene; -typedef Actor ActorMoleMissile; +typedef Actor CoMoleMissile; typedef Actor ActorAllRange; typedef Actor ActorTeamBoss; // Teammates in a boss battle typedef Actor Actor199; diff --git a/linker_scripts/us/rev1/symbol_addrs_engine.txt b/linker_scripts/us/rev1/symbol_addrs_engine.txt index 0122f86a..2a10a0ce 100644 --- a/linker_scripts/us/rev1/symbol_addrs_engine.txt +++ b/linker_scripts/us/rev1/symbol_addrs_engine.txt @@ -177,7 +177,7 @@ MeteoTunnel_Draw = 0x80059AEC; Scenery_DrawTitaniaBones = 0x80059B20; func_edisplay_80059BB0 = 0x80059BB0; CoIBeam_Draw = 0x80059BBC; -ActorMoleMissile_Draw = 0x80059BF0; +CoMoleMissile_Draw = 0x80059BF0; func_edisplay_80059C28 = 0x80059C28; Sprite167_Draw = 0x80059C34; FogShadow_Draw = 0x80059C40; @@ -194,8 +194,8 @@ MeMolarRock_Draw = 0x8005B6A4; MeMeteor2_Draw = 0x8005B71C; MeLaserCannon1_Draw = 0x8005B7CC; ActorMissileSeek_Draw = 0x8005B848; -ActorSkibot_Draw = 0x8005B9A4; -ActorRadar_Draw = 0x8005BA30; +CoSkibot_Draw = 0x8005B9A4; +CoRadar_Draw = 0x8005BA30; func_edisplay_8005BAAC = 0x8005BAAC; Object_SetShadowDL = 0x8005BAB4; ItemCheckpoint_Draw = 0x8005C5F0; @@ -300,9 +300,9 @@ func_enmy_8006566C = 0x8006566C; ActorMissileSeek_Update = 0x800656D4; func_enmy_800660F0 = 0x800660F0; Actor_Despawn = 0x80066254; -ActorSkibot_Update = 0x8006654C; +CoSkibot_Update = 0x8006654C; func_enmy_8006684C = 0x8006684C; -ActorRadar_Update = 0x800669A0; +CoRadar_Update = 0x800669A0; MeMolarRock_Update = 0x80066A80; func_enmy_80066A8C = 0x80066A8C; func_enmy_80066C00 = 0x80066C00; diff --git a/src/engine/fox_edata_info.c b/src/engine/fox_edata_info.c index 44484112..f1fdf4a2 100644 --- a/src/engine/fox_edata_info.c +++ b/src/engine/fox_edata_info.c @@ -285,11 +285,11 @@ ObjectInfo gObjectInfo[] = { /* OBJ_ACTOR_DEBRIS */ {(void*) ActorDebris_Draw, 1, (ObjectFunc) ActorDebris_Update, gNoHitbox, 0.0f, 0, 0, 39, 0, 0.0f, 0 }, /* OBJ_MISSILE_SEEK_TEAM */ {(void*) ActorMissileSeek_Draw, 1, (ObjectFunc) ActorMissileSeek_Update, gActorMissileSeekHitbox, 100.0f, 0, 1, 39, 0, 1.0f, 0 }, /* OBJ_MISSILE_SEEK_PLAYER */ {(void*) ActorMissileSeek_Draw, 1, (ObjectFunc) ActorMissileSeek_Update, gActorMissileSeekHitbox, 100.0f, 0, 1, 39, 0, 1.0f, 0 }, - /* OBJ_ACTOR_CO_SKIBOT */ {(void*) ActorSkibot_Draw, 1, (ObjectFunc) ActorSkibot_Update, aCoActorSkibotHitbox, 200.0f, 0, 1, 39, 0, 50.0f, 1 }, - /* OBJ_ACTOR_CO_RADAR */ {(void*) ActorRadar_Draw, 1, (ObjectFunc) ActorRadar_Update, aCoActorRadarHitbox, 100.0f, 0, 1, 39, 0, 0.0f, 0 }, + /* OBJ_ACTOR_CO_SKIBOT */ {(void*) CoSkibot_Draw, 1, (ObjectFunc) CoSkibot_Update, aCoActorSkibotHitbox, 200.0f, 0, 1, 39, 0, 50.0f, 1 }, + /* OBJ_ACTOR_CO_RADAR */ {(void*) CoRadar_Draw, 1, (ObjectFunc) CoRadar_Update, aCoActorRadarHitbox, 100.0f, 0, 1, 39, 0, 0.0f, 0 }, /* OBJ_ACTOR_ME_MORA */ {(void*) MeMora_Draw, 1, (ObjectFunc) MeMora_Update, gMeMoraHitbox, 200.0f, 0, 1, 39, 0, 0.0f, 1 }, /* OBJ_ACTOR_CUTSCENE */ {(void*) ActorCutscene_Draw, 1, (ObjectFunc) ActorCutscene_Update, gNoHitbox, 20000.0f, 0, 1, 39, 0, 0.0f, 0 }, - /* OBJ_ACTOR_CO_MOLE_MISSILE */ {(void*) ActorMoleMissile_Draw, 1, (ObjectFunc) ActorMoleMissile_Update, aCoMoleMissileHitbox, 200.0f, 0, 1, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_CO_MOLE_MISSILE */ {(void*) CoMoleMissile_Draw, 1, (ObjectFunc) CoMoleMissile_Update, aCoMoleMissileHitbox, 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 }, /* OBJ_ACTOR_199 */ {(void*) Andross_Actor199_Draw, 1, (ObjectFunc) Andross_Actor199_Update, gNoHitbox, 20000.0f, 0, 0, 39, 1, 0.0f, 0 }, diff --git a/src/engine/fox_edisplay.c b/src/engine/fox_edisplay.c index ffe67524..2dfc2869 100644 --- a/src/engine/fox_edisplay.c +++ b/src/engine/fox_edisplay.c @@ -118,7 +118,7 @@ void CoIBeam_Draw(CoIBeam* this) { gSPDisplayList(gMasterDisp++, D_CO_6023AC0); } -void ActorMoleMissile_Draw(ActorMoleMissile* this) { +void CoMoleMissile_Draw(CoMoleMissile* this) { if (this->animFrame != 0) { gSPDisplayList(gMasterDisp++, D_CO_6032BC0); } @@ -133,33 +133,39 @@ void Sprite167_Draw(Sprite167* this) { void FogShadow_Draw(FogShadow* this) { RCP_SetupDL_47(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 180); + switch (this->sceneryId) { case OBJ_SCENERY_CO_STONE_ARCH: Matrix_Scale(gGfxMatrix, 2.0f, 1.0f, 0.7f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_6034B90); break; + case OBJ_SCENERY_CO_ARCH_2: Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.7f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_6034B90); break; + case OBJ_SCENERY_CO_HIGHWAY_1: case OBJ_SCENERY_CO_HIGHWAY_2: Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 10.55f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_Gfx_800DAC20); break; + case OBJ_SCENERY_CO_DOORS: Matrix_Scale(gGfxMatrix, 1.6f, 1.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_6034B90); break; + case OBJ_SCENERY_CO_ARCH_1: Matrix_Scale(gGfxMatrix, 1.2f, 1.0f, 1.3f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_6034B90); break; + case OBJ_SCENERY_CO_ARCH_3: Matrix_Scale(gGfxMatrix, 2.2f, 1.0f, 1.4f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -169,19 +175,19 @@ void FogShadow_Draw(FogShadow* this) { RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } -void CoBuilding9_Draw(Scenery* scenery) { +void CoBuilding9_Draw(CoBuilding9* this) { Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -95.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_602DA20); } -void CoBuilding10_Draw(Scenery* scenery) { +void CoBuilding10_Draw(CoBuilding10* this) { gSPDisplayList(gMasterDisp++, D_CO_6035DA0); } // repurposed into OBJ_SCENERY_CO_BUILDING_6 -void func_edisplay_8005A010(Sprite* sprite) { - if (!sprite->toLeft) { +void func_edisplay_8005A010(Sprite* this) { + if (!this->toLeft) { Matrix_RotateY(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, aCoBuilding6DL); @@ -245,19 +251,23 @@ void ActorDebris_Draw(ActorDebris* this) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_arwing_3016660); break; + case 1: Matrix_Translate(gGfxMatrix, -18.0f, 15.0f, -15.0f, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_arwing_3015D80); break; + case 2: Graphics_SetScaleMtx(this->scale); gSPDisplayList(gMasterDisp++, D_arwing_30155E0); break; + case 3: gSPDisplayList(gMasterDisp++, D_arwing_3011720); break; + case 4: Graphics_SetScaleMtx(this->scale); if ((this->index % 2) != 0) { @@ -266,10 +276,12 @@ void ActorDebris_Draw(ActorDebris* this) { gSPDisplayList(gMasterDisp++, D_1024290); } break; + case 39: gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_edisplay_800CFAC4[this->unk_048]); break; + case 40: gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); switch (this->unk_048) { @@ -287,6 +299,7 @@ void ActorDebris_Draw(ActorDebris* this) { RCP_SetupDL(&gMasterDisp, SETUPDL_33); break; } + if (gCurrentLevel != LEVEL_SOLAR) { gSPDisplayList(gMasterDisp++, D_TI_801B769C[this->unk_046]); } else { @@ -303,25 +316,31 @@ void ActorDebris_Draw(ActorDebris* this) { gSPDisplayList(gMasterDisp++, D_edisplay_800CFB40[this->unk_046]); } break; + case 41: Graphics_SetScaleMtx(this->scale); gSPDisplayList(gMasterDisp++, D_edisplay_800CFADC[this->unk_048]); break; + case 42: Graphics_SetScaleMtx(this->scale); gSPDisplayList(gMasterDisp++, D_edisplay_800CFB08[this->unk_048]); break; + case 43: Graphics_SetScaleMtx(this->scale); gSPDisplayList(gMasterDisp++, D_edisplay_800CFB14[this->unk_048]); break; + case 44: Graphics_SetScaleMtx(this->scale); gSPDisplayList(gMasterDisp++, D_edisplay_800CFB28[this->unk_048]); break; + case 45: gSPDisplayList(gMasterDisp++, D_ENMY_PLANET_40018A0); break; + case 46: if ((this->unk_048 == 2) || (this->unk_048 == 3) || (this->unk_048 == 4)) { RCP_SetupDL(&gMasterDisp, SETUPDL_33); @@ -329,19 +348,24 @@ void ActorDebris_Draw(ActorDebris* this) { gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_TI_801B7584[this->unk_048]); break; + case 47: gSPDisplayList(gMasterDisp++, D_TI_801B7608[this->unk_048]); break; + case 48: Graphics_SetScaleMtx(this->scale); gSPDisplayList(gMasterDisp++, D_edisplay_800CFB64[this->unk_048]); break; + case 49: Graphics_SetScaleMtx(this->scale); gSPDisplayList(gMasterDisp++, D_edisplay_800CFB88[this->unk_048]); break; + case 50: Graphics_SetScaleMtx(0.7f); + if (this->iwork[1] == 1) { RCP_SetupDL(&gMasterDisp, SETUPDL_30); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); @@ -350,6 +374,7 @@ void ActorDebris_Draw(ActorDebris* this) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); Graphics_SetScaleMtx(0.7f); } + switch (this->iwork[0]) { case 0: gSPDisplayList(gMasterDisp++, D_VE1_90234D0); @@ -364,31 +389,38 @@ void ActorDebris_Draw(ActorDebris* this) { gSPDisplayList(gMasterDisp++, D_VE1_9010FD0); break; } + if (this->iwork[1] != 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_29); Graphics_SetScaleMtx(0.7f); } break; + case 51: Graphics_SetScaleMtx(this->scale); gSPDisplayList(gMasterDisp++, D_edisplay_800CFBA8[this->unk_048]); break; + case 52: Graphics_SetScaleMtx(this->scale); gSPDisplayList(gMasterDisp++, D_edisplay_800CFBE4[this->unk_048]); break; + case 53: Graphics_SetScaleMtx(this->scale); gSPDisplayList(gMasterDisp++, D_edisplay_800CFC0C[this->unk_048]); break; + case 54: Graphics_SetScaleMtx(this->scale); gSPDisplayList(gMasterDisp++, D_edisplay_800CFC40[this->unk_048]); break; + case 55: Graphics_SetScaleMtx(this->scale); gSPDisplayList(gMasterDisp++, D_edisplay_800CFC50[this->unk_048]); break; + case 56: Graphics_SetScaleMtx(this->scale); RCP_SetupDL(&gMasterDisp, SETUPDL_41); @@ -396,22 +428,27 @@ void ActorDebris_Draw(ActorDebris* this) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 191, 255, 223, 255); gSPDisplayList(gMasterDisp++, D_edisplay_800CFC64[this->unk_048]); break; + case 58: Graphics_SetScaleMtx(this->scale); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_AQ_60148B0); break; + case 59: Graphics_SetScaleMtx(this->scale); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_edisplay_800CFC7C[this->unk_048]); break; + case 70: gSPDisplayList(gMasterDisp++, D_10177C0); break; + case 57: gSPDisplayList(gMasterDisp++, D_VE1_8019A008[this->unk_048]); break; + default: if (this->state >= 10) { if (this->state == 36) { @@ -423,35 +460,38 @@ void ActorDebris_Draw(ActorDebris* this) { } } -void Actor_DrawEngineAndContrails(Actor* actor) { +void Actor_DrawEngineAndContrails(Actor* this) { f32 sp5C; f32 temp1; f32 sp54; s32 pad[5]; // fake? seems like a lot of padding - if ((actor->iwork[11] != 0) && (actor->obj.status == OBJ_ACTIVE)) { + if ((this->iwork[11] != 0) && (this->obj.status == OBJ_ACTIVE)) { temp1 = 652.5f * 0.001f; // 0.65250003f; - if (actor->iwork[11] >= 2) { + if (this->iwork[11] >= 2) { temp1 = 1.3050001f; } - Math_SmoothStepToF(&actor->fwork[29], temp1, 0.3f, 5.0f, 0.0f); - sp5C = actor->fwork[29]; + + Math_SmoothStepToF(&this->fwork[29], temp1, 0.3f, 5.0f, 0.0f); + + sp5C = this->fwork[29]; if ((gGameFrameCount % 2) != 0) { sp5C *= 1.111f; } Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, sp5C, sp5C * 0.7f, sp5C, 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, -actor->obj.rot.y * M_DTOR, 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, -this->obj.rot.y * M_DTOR, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, gPlayer[gPlayerNum].camPitch, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); Display_DrawEngineGlow(gLevelType); Matrix_Pop(&gGfxMatrix); } - sp5C = actor->fwork[21]; + + sp5C = this->fwork[21]; if ((sp5C != 0.0f) && (gLevelType == LEVELTYPE_PLANET)) { sp54 = 0.0f; if ((gGameFrameCount % 2) != 0) { @@ -507,23 +547,23 @@ void Actor_DrawEngineGlow(Actor* actor, s32 levelType) { } } -void func_edisplay_8005B388(Actor199* actor) { - Vec3f sp3C = { 0.0f, 0.0f, 0.0f }; - Vec3f sp30; +void func_edisplay_8005B388(Actor199* this) { + Vec3f src = { 0.0f, 0.0f, 0.0f }; + Vec3f dest; - Matrix_MultVec3f(gGfxMatrix, &sp3C, &sp30); + Matrix_MultVec3f(gGfxMatrix, &src, &dest); - if ((((fabsf(sp30.z) < 3000.0f) && (fabsf(sp30.x) < 3000.0f) && !gBossActive) || + if ((((fabsf(dest.z) < 3000.0f) && (fabsf(dest.x) < 3000.0f) && !gBossActive) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) || (gCurrentLevel == LEVEL_VENOM_ANDROSS) || (gCurrentLevel == LEVEL_VENOM_2) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) && (gCurrentLevel != LEVEL_MACBETH) && (gCurrentLevel != LEVEL_TITANIA)) { - if (actor->obj.id == OBJ_ACTOR_CUTSCENE) { + if (this->obj.id == OBJ_ACTOR_CUTSCENE) { if (((gCurrentLevel == LEVEL_VENOM_2) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) && - (actor->index == 10)) || + (this->index == 10)) || ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) && (gPlayer[0].csState >= 100) && - (gCurrentLevel == LEVEL_KATINA) && (actor->index == 1)) || + (gCurrentLevel == LEVEL_KATINA) && (this->index == 1)) || ((gCurrentLevel == LEVEL_SECTOR_Y) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) && - (actor->state == 5))) { + (this->state == 5))) { D_edisplay_80161630.rightWingState = gPlayer[0].arwing.rightWingState; D_edisplay_80161630.leftWingState = gPlayer[0].arwing.leftWingState; } else { @@ -532,16 +572,16 @@ void func_edisplay_8005B388(Actor199* actor) { } else { D_edisplay_80161630.rightWingState = D_edisplay_80161630.leftWingState = WINGSTATE_INTACT; } - D_edisplay_80161630.upperRightFlapYrot = actor->fwork[15]; - D_edisplay_80161630.upperLeftFlapYrot = actor->fwork[16]; - D_edisplay_80161630.bottomRightFlapYrot = actor->fwork[26]; - D_edisplay_80161630.bottomLeftFlapYrot = actor->fwork[27]; + D_edisplay_80161630.upperRightFlapYrot = this->fwork[15]; + D_edisplay_80161630.upperLeftFlapYrot = this->fwork[16]; + D_edisplay_80161630.bottomRightFlapYrot = this->fwork[26]; + D_edisplay_80161630.bottomLeftFlapYrot = this->fwork[27]; D_edisplay_80161630.laserGunsYpos = D_edisplay_80161630.laserGunsXpos = D_edisplay_80161630.wingsXrot = D_edisplay_80161630.wingsYrot = D_edisplay_80161630.windshieldXrot = D_edisplay_80161630.wingsZrot = 0.0f; - D_edisplay_80161630.unk_28 = actor->fwork[17]; - D_edisplay_80161630.drawFace = actor->iwork[14]; - D_edisplay_80161630.teamFaceXrot = actor->fwork[20]; - D_edisplay_80161630.teamFaceYrot = actor->fwork[19]; + D_edisplay_80161630.unk_28 = this->fwork[17]; + D_edisplay_80161630.drawFace = this->iwork[14]; + D_edisplay_80161630.teamFaceXrot = this->fwork[20]; + D_edisplay_80161630.teamFaceYrot = this->fwork[19]; if (gLevelType == LEVELTYPE_SPACE) { D_edisplay_80161630.upperRightFlapYrot = D_edisplay_80161630.bottomRightFlapYrot = D_edisplay_80161630.upperLeftFlapYrot = D_edisplay_80161630.bottomLeftFlapYrot = 0.0f; @@ -554,34 +594,35 @@ void func_edisplay_8005B388(Actor199* actor) { } else { gSPDisplayList(gMasterDisp++, D_ENMY_SPACE_4007870); } - Actor_DrawEngineAndContrails(actor); + Actor_DrawEngineAndContrails(this); } -void MeMolarRock_Draw(Actor* actor) { +void MeMolarRock_Draw(MeMolarRock* this) { Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ME_6024B60); } -void MeMeteor2_Draw(Actor* actor) { - RCP_SetupDL_29(actor->unk_046, gFogGreen, gFogBlue, gFogAlpha, actor->unk_048, gFogFar); +void MeMeteor2_Draw(MeMeteor2* this) { + RCP_SetupDL_29(this->unk_046, gFogGreen, gFogBlue, gFogAlpha, this->unk_048, gFogFar); Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, aMeMeteor1DL); } -void MeLaserCannon1_Draw(Actor* actor) { - RCP_SetupDL_29(actor->unk_046, gFogGreen, gFogBlue, gFogAlpha, actor->unk_048, gFogFar); +void MeLaserCannon1_Draw(MeLaserCannon1* this) { + RCP_SetupDL_29(this->unk_046, gFogGreen, gFogBlue, gFogAlpha, this->unk_048, gFogFar); gSPDisplayList(gMasterDisp++, D_ME_6022920); } -void ActorMissileSeek_Draw(Actor* actor) { +void ActorMissileSeek_Draw(Actor* missile) { f32 scale; - switch (actor->eventType) { + switch (missile->eventType) { case 0: gSPDisplayList(gMasterDisp++, D_1028230); break; + case 1: if (gCurrentLevel == LEVEL_AREA_6) { gSPDisplayList(gMasterDisp++, D_ENMY_SPACE_400B390); @@ -590,24 +631,26 @@ void ActorMissileSeek_Draw(Actor* actor) { } break; } + scale = 2.0f; if ((gGameFrameCount % 2) != 0) { scale = 1.7f; } + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY); - actor->iwork[11] = 1; + missile->iwork[11] = 1; Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY); - Actor_DrawEngineGlow(actor, 2); + Actor_DrawEngineGlow(missile, 2); } -void ActorSkibot_Draw(Actor* actor) { +void CoSkibot_Draw(CoSkibot* this) { Matrix_Translate(gGfxMatrix, 0.0f, -124.0f, 0.0f, MTXF_APPLY); - Animation_GetFrameData(&D_CO_6029528, actor->animFrame, actor->vwork); - Animation_DrawSkeleton(1, D_CO_6029674, actor->vwork, NULL, NULL, actor, &gIdentityMatrix); + Animation_GetFrameData(&D_CO_6029528, this->animFrame, this->vwork); + Animation_DrawSkeleton(1, D_CO_6029674, this->vwork, NULL, NULL, this, &gIdentityMatrix); } -void ActorRadar_Draw(Actor* actor) { - if (actor->timer_0BC != 0) { +void CoRadar_Draw(CoRadar* this) { + if (this->timer_0BC != 0) { RCP_SetupDL_27(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } @@ -636,6 +679,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { } RCP_SetupDL(&gMasterDisp, SETUPDL_64); break; + case OBJ_ACTOR_CUTSCENE: case OBJ_ACTOR_TEAM_BOSS: case OBJ_ACTOR_EVENT: @@ -646,6 +690,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_102A010); break; + case EVID_81: RCP_SetupDL(&gMasterDisp, SETUPDL_48); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255); @@ -656,6 +701,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); break; + default: temp1 = D_edisplay_800CFCCC[gGameFrameCount % 8U]; temp2 = D_edisplay_800CFCCC[(gGameFrameCount + 4) % 8U]; @@ -668,9 +714,11 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { break; } break; + case OBJ_BOSS_CO_GRANGA: gSPDisplayList(gMasterDisp++, D_CO_6034B90); break; + case OBJ_BOSS_KA_SAUCERER: if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) { RCP_SetupDL(&gMasterDisp, SETUPDL_64); @@ -680,16 +728,19 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { Graphics_SetScaleMtx(150.0f); gSPDisplayList(gMasterDisp++, D_102A8A0); break; + case OBJ_BOSS_CO_CARRIER: case OBJ_BOSS_CO_CARRIER_LEFT: case OBJ_BOSS_CO_CARRIER_UPPER: case OBJ_BOSS_CO_CARRIER_BOTTOM: COS_DEG(gBosses[index].obj.rot.z); + if (gGroundSurface == SURFACE_WATER) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 90); } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 150); } + switch (objId) { case OBJ_BOSS_CO_CARRIER: gSPDisplayList(gMasterDisp++, D_CO_6036840); @@ -703,12 +754,14 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { break; } break; + case OBJ_ACTOR_CO_SKIBOT: gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 150); Matrix_Scale(gGfxMatrix, 0.4f, 0.4f, gActors[index].scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_6034B90); break; + case OBJ_ACTOR_TI_BOULDER: RCP_SetupDL_48(); RCP_SetupDL(&gMasterDisp, SETUPDL_69); @@ -722,6 +775,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); break; + case OBJ_ACTOR_TI_DESERT_CRAWLER: RCP_SetupDL(&gMasterDisp, SETUPDL_68); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); @@ -736,6 +790,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); break; + case OBJ_ACTOR_TI_BOMB: RCP_SetupDL(&gMasterDisp, SETUPDL_69); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255); @@ -748,6 +803,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); break; + case OBJ_ACTOR_MA_BOULDER: RCP_SetupDL_48(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255); @@ -756,6 +812,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); break; + case OBJ_BOSS_VE1_GOLEMECH: Venom1_Ve1Golemech_SetShadow(&gBosses[index]); break; @@ -862,7 +919,9 @@ void ItemMeteoWarp_Draw(ItemMeteoWarp* this) { } else { RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } + gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK | G_LIGHTING); + for (i = 0; i < 7; i++) { Matrix_Push(&gGfxMatrix); Matrix_RotateZ(gGfxMatrix, (i * 360.0f / 7.0f) * M_DTOR, MTXF_APPLY); @@ -871,6 +930,7 @@ void ItemMeteoWarp_Draw(ItemMeteoWarp* this) { gSPDisplayList(gMasterDisp++, D_102FE80); Matrix_Pop(&gGfxMatrix); } + gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK | G_LIGHTING); } @@ -946,14 +1006,17 @@ void Scenery_Draw(Scenery* this, s32 arg1) { this->obj.pos.y += gCameraShakeY; func_edisplay_8005D008(&this->obj, this->info.drawType); this->obj.pos.y -= gCameraShakeY; + if (this->info.drawType == 0) { if ((this->obj.id == OBJ_SCENERY_CO_TOWER) || (this->obj.id == OBJ_SCENERY_CO_ROCKWALL) || (this->obj.id == OBJ_SCENERY_CO_HIGHWAY_4) || (this->obj.id == OBJ_SCENERY_VE1_WALL_3)) { RCP_SetupDL_57(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); + if (arg1 < 0) { Object_ApplyWaterDistortion(); } + gSPDisplayList(gMasterDisp++, this->info.dList); RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } else { @@ -963,11 +1026,15 @@ void Scenery_Draw(Scenery* this, s32 arg1) { } RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } + Object_SetCullDirection(arg1); + if (arg1 < 0) { Object_ApplyWaterDistortion(); } + gSPDisplayList(gMasterDisp++, this->info.dList); + if (this->obj.id == OBJ_SCENERY_CO_HIGHWAY_3) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } @@ -983,6 +1050,7 @@ void Sprite_Draw(Sprite* this, s32 arg1) { this->obj.pos.y += gCameraShakeY; func_edisplay_8005D008(&this->obj, 0); this->obj.pos.y -= gCameraShakeY; + if (this->info.drawType == 0) { gSPDisplayList(gMasterDisp++, this->info.dList); } else if (this->info.draw != NULL) { @@ -1003,6 +1071,7 @@ void Actor_DrawOnRails(Actor* this) { Zoness_ZoDodora_Draw(this); return; } + if ((this->obj.id == OBJ_ACTOR_EVENT) && (this->eventType == EVID_200)) { MeMora_Draw(this); } else { @@ -1016,6 +1085,7 @@ void Actor_DrawOnRails(Actor* this) { } else { func_edisplay_8005D008(&this->obj, this->info.drawType); } + if (this->info.drawType == 0) { gSPDisplayList(gMasterDisp++, this->info.dList); Object_UpdateSfxSource(this->sfxSource); @@ -1028,6 +1098,7 @@ void Actor_DrawOnRails(Actor* this) { Matrix_MultVec3f(gGfxMatrix, &sp34, &gTeamArrowsViewPos[this->aiType]); } } + if ((this->lockOnTimers[TEAM_ID_FOX] != 0) && (gReflectY > 0)) { sp34.y += this->info.targetOffset; Matrix_MultVec3f(gGfxMatrix, &sp34, &gLockOnTargetViewPos[TEAM_ID_FOX]); @@ -1041,26 +1112,29 @@ void Actor_DrawOnRails(Actor* this) { void Actor_DrawAllRange(Actor* this) { s32 playerNum; - Vec3f sp50 = { 0.0f, 0.0f, 0.0f }; + Vec3f srcViewPos = { 0.0f, 0.0f, 0.0f }; f32 var_fa1; f32 var_ft5; f32 var_fv0; f32 var_fv1; sDrewActor = false; + if (this->info.drawType == 2) { Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, gPathProgress, MTXF_APPLY); Matrix_Translate(gCalcMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, MTXF_NEW); Matrix_Push(&gGfxMatrix); Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); - Matrix_MultVec3f(gGfxMatrix, &sp50, &sViewPos); + Matrix_MultVec3f(gGfxMatrix, &srcViewPos, &sViewPos); Matrix_Pop(&gGfxMatrix); + var_fv0 = 0.0f; var_fv1 = -12000.0f; if ((this->obj.id == OBJ_ACTOR_ALLRANGE) && (this->aiType >= AI360_GREAT_FOX)) { var_fv0 = 1000.0f; var_fv1 = -25000.0f; } + if ((var_fv0 > sViewPos.z) && (sViewPos.z > var_fv1)) { if (fabsf(sViewPos.x) < (fabsf(sViewPos.z * 0.5f) + 500.0f)) { if (fabsf(sViewPos.y) < (fabsf(sViewPos.z * 0.5f) + 500.0f)) { @@ -1078,7 +1152,8 @@ void Actor_DrawAllRange(Actor* this) { } } else { Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, MTXF_APPLY); - Matrix_MultVec3f(gGfxMatrix, &sp50, &sViewPos); + Matrix_MultVec3f(gGfxMatrix, &srcViewPos, &sViewPos); + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) || ((this->obj.id == OBJ_ACTOR_ALLRANGE) && (this->aiType >= AI360_GREAT_FOX)) || @@ -1092,6 +1167,7 @@ void Actor_DrawAllRange(Actor* this) { var_fv1 = -20000.0f; var_fa1 = 0.5f; } + if ((var_fv0 > sViewPos.z) && (sViewPos.z > var_fv1)) { if (fabsf(sViewPos.x) < (fabsf(sViewPos.z * var_fa1) + var_ft5)) { if (fabsf(sViewPos.y) < (fabsf(sViewPos.z * var_fa1) + var_ft5)) { @@ -1114,12 +1190,14 @@ void Actor_DrawAllRange(Actor* this) { } } } + if (!sDrewActor) { this->lockOnTimers[gPlayerNum] = 0; if ((this->obj.id == OBJ_ACTOR_DEBRIS) || (this->obj.id == OBJ_ACTOR_AND_BRAIN_WASTE)) { Object_Kill(&this->obj, this->sfxSource); } } + for (playerNum = 0; playerNum < gCamCount; playerNum++) { if (this->lockOnTimers[playerNum] != 0) { gLockOnTargetViewPos[playerNum] = sViewPos; @@ -1129,6 +1207,7 @@ void Actor_DrawAllRange(Actor* this) { } } } + Object_SetSfxSourceToView(this->sfxSource, &sViewPos); this->iwork[24] = sDrewActor; } @@ -1148,8 +1227,10 @@ void Boss_Draw(Boss* this, s32 arg1) { } else { func_edisplay_8005D1F0(&this->obj, this->info.drawType); } + Matrix_MultVec3f(&D_edisplay_801615F0, &origin, &D_edisplay_801615D0); Object_SetSfxSourceToView(this->sfxSource, &D_edisplay_801615D0); + if ((this->obj.id == OBJ_BOSS_KA_SAUCERER) || (this->obj.id == OBJ_BOSS_KA_FLBASE)) { var_fa1 = 6000.0f; var_fv0 = 6000.0f; @@ -1166,6 +1247,7 @@ void Boss_Draw(Boss* this, s32 arg1) { var_fv0 = 1000.0f; var_fv1 = -15000.0f; } + sp3C = -1.0f; if ((D_edisplay_801615D0.z < var_fv0) && (var_fv1 < D_edisplay_801615D0.z)) { if (fabsf(D_edisplay_801615D0.x) < (fabsf(D_edisplay_801615D0.z * var_ft5) + var_fa1)) { @@ -1187,6 +1269,7 @@ void Boss_Draw(Boss* this, s32 arg1) { } } D_edisplay_801615D0.y = sp3C; + if (this->obj.id == OBJ_BOSS_BO_BASE) { this->vwork[30] = D_edisplay_801615D0; Display_SetSecondLight(&this->obj.pos); @@ -1199,6 +1282,7 @@ void Effect_DrawOnRails(Effect* this, s32 arg1) { if ((arg1 < 0) && (this->obj.pos.y < 7.0f)) { return; } + if ((this->obj.id == OBJ_EFFECT_ENEMY_LASER_1) || (this->obj.id == OBJ_EFFECT_369)) { func_edisplay_8005D3CC(&this->obj, this->unk_60.x, this->unk_60.y, this->unk_60.z, 0); } else if (this->info.unk_14 == -1) { @@ -1208,14 +1292,15 @@ void Effect_DrawOnRails(Effect* this, s32 arg1) { } else { func_edisplay_8005D008(&this->obj, 0); } + if (this->info.draw != NULL) { this->info.draw(&this->obj); } } void Effect_DrawAllRange(Effect* this) { - Vec3f sp4C = { 0.0f, 0.0f, 0.0f }; - Vec3f sp40; + Vec3f src = { 0.0f, 0.0f, 0.0f }; + Vec3f dest; f32 minZ; u8 drawn = false; @@ -1225,15 +1310,18 @@ void Effect_DrawAllRange(Effect* this) { } else { Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + gPathProgress, MTXF_APPLY); } - Matrix_MultVec3f(gGfxMatrix, &sp4C, &sp40); + + Matrix_MultVec3f(gGfxMatrix, &src, &dest); + if ((gCurrentLevel == LEVEL_SECTOR_Z) || (gCurrentLevel == LEVEL_BOLSE)) { minZ = -20000.0f; } else { minZ = -10000.0f; } - if ((0.0f > sp40.z) && (sp40.z > minZ)) { - if (fabsf(sp40.x) < (fabsf(sp40.z * 0.5f) + 500.0f)) { - if (fabsf(sp40.y) < (fabsf(sp40.z * 0.5f) + 500.0f)) { + + if ((dest.z < 0.0f) && (minZ < dest.z)) { + if (fabsf(dest.x) < (fabsf(dest.z * 0.5f) + 500.0f)) { + if (fabsf(dest.y) < (fabsf(dest.z * 0.5f) + 500.0f)) { if (this->info.draw != NULL) { Matrix_RotateY(gGfxMatrix, this->obj.rot.y * M_DTOR, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); @@ -1245,23 +1333,27 @@ void Effect_DrawAllRange(Effect* this) { } } } - Object_SetSfxSourceToView(this->sfxSource, &sp40); + + Object_SetSfxSourceToView(this->sfxSource, &dest); + if (!drawn && (this->obj.id != OBJ_EFFECT_CLOUDS) && (this->obj.id != OBJ_EFFECT_TIMED_SFX) && (!gVersusMode)) { Object_Kill(&this->obj, this->sfxSource); } } void Item_Draw(Item* this, s32 arg1) { - Vec3f sp44 = { 0.0f, 0.0f, 0.0f }; - Vec3f sp38; + Vec3f src = { 0.0f, 0.0f, 0.0f }; + Vec3f dest; u8 drawn; Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + gPathProgress, MTXF_APPLY); - Matrix_MultVec3f(gGfxMatrix, &sp44, &sp38); + Matrix_MultVec3f(gGfxMatrix, &src, &dest); + drawn = false; - if ((0.0f > sp38.z) && (sp38.z > -12000.0f)) { - if (fabsf(sp38.x) < (fabsf(sp38.z * 0.5f) + 500.0f)) { - if (fabsf(sp38.y) < (fabsf(sp38.z * 0.5f) + 500.0f)) { + + if ((dest.z < 0.0f) && (dest.z > -12000.0f)) { + if (fabsf(dest.x) < (fabsf(dest.z * 0.5f) + 500.0f)) { + if (fabsf(dest.y) < (fabsf(dest.z * 0.5f) + 500.0f)) { if (this->info.draw != NULL) { Matrix_RotateY(gGfxMatrix, this->obj.rot.y * M_DTOR, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); @@ -1277,7 +1369,9 @@ void Item_Draw(Item* this, s32 arg1) { } } } - Object_SetSfxSourceToView(this->sfxSource, &sp38); + + Object_SetSfxSourceToView(this->sfxSource, &dest); + if (!drawn && (gLevelMode == LEVELMODE_ALL_RANGE) && (gCamCount == 1) && (this->obj.id < OBJ_ITEM_GOLD_RING) && (gCurrentLevel != LEVEL_VENOM_ANDROSS)) { Object_Kill(&this->obj, this->sfxSource); @@ -1286,16 +1380,19 @@ void Item_Draw(Item* this, s32 arg1) { 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); Matrix_RotateX(gGfxMatrix, actor->fwork[26], MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, actor->fwork[28], MTXF_APPLY); Matrix_RotateY(gGfxMatrix, -actor->fwork[27], MTXF_APPLY); } + Matrix_Scale(gGfxMatrix, 1.4f, 0.0f, 1.4f, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, (actor->obj.rot.y + 180.0f) * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, actor->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); + if (actor->aiType <= AI360_PEPPY) { Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 30.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -1318,6 +1415,7 @@ void ActorAllRange_DrawShadow(Actor* actor) { void Object_DrawShadow(s32 index, Object* obj) { RCP_SetupDL(&gMasterDisp, SETUPDL_66); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 180); + if (obj->id == OBJ_ACTOR_ALLRANGE) { ActorAllRange_DrawShadow(&gActors[index]); } else { @@ -1326,23 +1424,28 @@ void Object_DrawShadow(s32 index, Object* obj) { Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundHeight + 2.0f + gActors[index].fwork[1], obj->pos.z + gPathProgress, MTXF_APPLY); break; + case OBJ_ACTOR_TI_DESERT_CRAWLER: case OBJ_ACTOR_TI_BOMB: Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundHeight + 2.0f + gActors[index].fwork[0], obj->pos.z + gPathProgress, MTXF_APPLY); break; + case OBJ_BOSS_KA_SAUCERER: Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundHeight + 2.0f + gCameraShakeY, obj->pos.z, MTXF_APPLY); break; + default: Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundHeight + 2.0f, obj->pos.z + gPathProgress, MTXF_APPLY); break; } + if ((gGroundType != 4) || (obj->id == OBJ_ACTOR_EVENT) || (obj->id == OBJ_ACTOR_CUTSCENE) || (obj->id == OBJ_ACTOR_TEAM_BOSS)) { Matrix_Scale(gGfxMatrix, 1.0f, 0.0f, 1.0f, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, obj->rot.y * M_DTOR, MTXF_APPLY); } + if ((obj->id < OBJ_ACTOR_MAX) && (obj->id != OBJ_ACTOR_TI_BOULDER) && (obj->id != OBJ_ACTOR_TI_DESERT_CRAWLER) && (obj->id != OBJ_ACTOR_TI_BOMB)) { Matrix_RotateX(gGfxMatrix, obj->rot.x * M_DTOR, MTXF_APPLY); @@ -1375,37 +1478,37 @@ void Object_ClampSfxSource(f32* sfxSrc) { } void Object_SetSfxSourceToPos(f32* sfxSrc, Vec3f* pos) { - Vec3f sp2C; - Vec3f sp20; + Vec3f src; + Vec3f dest; if (gCamCount != 1) { sfxSrc[0] = sfxSrc[1] = sfxSrc[2] = 0.0f; } else { Matrix_RotateY(gCalcMatrix, gPlayer[0].camYaw, MTXF_NEW); Matrix_RotateX(gCalcMatrix, gPlayer[0].camPitch, MTXF_APPLY); - sp2C.x = pos->x - gPlayCamEye.x; - sp2C.y = pos->y - gPlayCamEye.y; - sp2C.z = pos->z + gPathProgress - gPlayCamEye.z; - Matrix_MultVec3f(gCalcMatrix, &sp2C, &sp20); - sfxSrc[0] = sp20.x; - sfxSrc[1] = sp20.y; - sfxSrc[2] = sp20.z; + src.x = pos->x - gPlayCamEye.x; + src.y = pos->y - gPlayCamEye.y; + src.z = pos->z + gPathProgress - gPlayCamEye.z; + Matrix_MultVec3f(gCalcMatrix, &src, &dest); + sfxSrc[0] = dest.x; + sfxSrc[1] = dest.y; + sfxSrc[2] = dest.z; } Object_ClampSfxSource(sfxSrc); } void Object_UpdateSfxSource(f32* sfxSrc) { - Vec3f origin = { 0.0f, 0.0f, 0.0f }; - Vec3f sp20; + Vec3f src = { 0.0f, 0.0f, 0.0f }; + Vec3f dest; s32 pad; if (gCamCount != 1) { sfxSrc[0] = sfxSrc[1] = sfxSrc[2] = 0.0f; } else { - Matrix_MultVec3f(&D_edisplay_801615F0, &origin, &sp20); - sfxSrc[0] = sp20.x; - sfxSrc[1] = sp20.y; - sfxSrc[2] = sp20.z; + Matrix_MultVec3f(&D_edisplay_801615F0, &src, &dest); + sfxSrc[0] = dest.x; + sfxSrc[1] = dest.y; + sfxSrc[2] = dest.z; } Object_ClampSfxSource(sfxSrc); } @@ -1442,12 +1545,15 @@ void Scenery360_Draw(Scenery360* this) { sp3C = 6000.0f; sp38 = 0.9f; } + if ((gLevelType == LEVELTYPE_PLANET) || (gCurrentLevel == LEVEL_BOLSE)) { Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y + gCameraShakeY, this->obj.pos.z, MTXF_APPLY); } else { Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, MTXF_APPLY); } + Matrix_MultVec3f(gGfxMatrix, &sp54, &sp48); + if ((sp48.z < sp44) && (sp40 < sp48.z)) { if (fabsf(sp48.y) < (fabsf(sp48.z * sp38) + sp3C)) { if (fabsf(sp48.x) < (fabsf(sp48.z * sp38) + sp3C)) { @@ -1487,55 +1593,69 @@ void Display_SetSecondLight(Vec3f* pos) { sp9C.x = pos->x - gLight3x; sp9C.y = pos->y - gLight3y; sp9C.z = pos->z - gLight3z; + lightDist = VEC3F_MAG(&sp9C); if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) { lightFade = 700.0f / lightDist; } else { lightFade = 200.0f / lightDist; } + if (lightFade > 1.0f) { lightFade = 1.0f; } + if (gGroundClipMode == 2) { lightFade = 1.0f; } + sp94 = Math_Atan2F(sp9C.x, sp9C.z); sp98 = -Math_Atan2F(sp9C.y, sqrtf(SQ(sp9C.x) + SQ(sp9C.z))); + Matrix_Push(&gCalcMatrix); Matrix_RotateZ(gCalcMatrix, gPlayer[gPlayerNum].camRoll * D_ctx_80177950 * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -gPlayer[gPlayerNum].camPitch, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, gPlayer[gPlayerNum].camYaw + sp94, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, sp98, MTXF_APPLY); + sp6C.x = 0.0f; sp6C.y = 0.0f; sp6C.z = -100.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp6C, &sp84); + Matrix_Pop(&gCalcMatrix); + temp1 = gLight3R * gLight3Brightness * lightFade; temp2 = gLight3G * gLight3Brightness * lightFade; temp3 = gLight3B * gLight3Brightness * lightFade; + Lights_SetTwoLights(&gMasterDisp, gLight1x, gLight1y, gLight1z, sp84.x, sp84.y, sp84.z, gLight1R, gLight1G, gLight1B, temp1, temp2, temp3, gAmbientR, gAmbientG, gAmbientB); } } bool func_edisplay_8005F9DC(Vec3f* arg0) { - Vec3f sp2C; - Vec3f sp20; + Vec3f src; + Vec3f dest; Matrix_RotateY(gCalcMatrix, gPlayer[gPlayerNum].camYaw, MTXF_NEW); Matrix_RotateX(gCalcMatrix, gPlayer[gPlayerNum].camPitch, MTXF_APPLY); - sp2C.x = arg0->x - gPlayer[gPlayerNum].cam.eye.x; - sp2C.y = arg0->y - gPlayer[gPlayerNum].cam.eye.y; - sp2C.z = arg0->z - gPlayer[gPlayerNum].cam.eye.z; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp2C, &sp20); - if ((sp20.z < 1000.0f) && (sp20.z > -13000.0f)) { - if (fabsf(sp20.x) < (fabsf(sp20.z * 0.4f) + 2000.0f)) { - if (fabsf(sp20.y) < (fabsf(sp20.y * 0.4f) + 2000.0f)) { + + src.x = arg0->x - gPlayer[gPlayerNum].cam.eye.x; + src.y = arg0->y - gPlayer[gPlayerNum].cam.eye.y; + src.z = arg0->z - gPlayer[gPlayerNum].cam.eye.z; + + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + + if ((dest.z < 1000.0f) && (dest.z > -13000.0f)) { + if (fabsf(dest.x) < (fabsf(dest.z * 0.4f) + 2000.0f)) { + if (fabsf(dest.y) < (fabsf(dest.y * 0.4f) + 2000.0f)) { return true; } } } + return false; } @@ -1552,9 +1672,11 @@ void Object_DrawAll(s32 arg0) { if ((gLevelMode == LEVELMODE_ALL_RANGE) && (gCurrentLevel != LEVEL_KATINA)) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); + if (gDrawBackdrop == 5) { gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); } + for (i = 0, scenery360 = gScenery360; i < 200; i++, scenery360++) { if ((scenery360->obj.status == OBJ_ACTIVE) && (scenery360->obj.id != OBJ_SCENERY_147)) { if (gCurrentLevel == LEVEL_BOLSE) { @@ -1571,6 +1693,7 @@ void Object_DrawAll(s32 arg0) { } } else { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); + for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) { if (scenery->obj.status >= OBJ_ACTIVE) { if (arg0 > 0) { @@ -1583,6 +1706,7 @@ void Object_DrawAll(s32 arg0) { } } } + for (i = 0, boss = gBosses; i < ARRAY_COUNT(gBosses); i++, boss++) { if ((boss->obj.status >= OBJ_ACTIVE) && (boss->obj.id != OBJ_BOSS_BO_BASE_SHIELD)) { if ((boss->timer_05C % 2) == 0) { @@ -1591,6 +1715,7 @@ void Object_DrawAll(s32 arg0) { RCP_SetupDL_27(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 64, 64, 255, 255); } + Object_SetCullDirection(arg0); Matrix_Push(&gGfxMatrix); Boss_Draw(boss, arg0); @@ -1602,20 +1727,25 @@ void Object_DrawAll(s32 arg0) { } } } + Lights_SetOneLight(&gMasterDisp, gLight1x, gLight1y, gLight1z, gLight1R, gLight1G, gLight1B, gAmbientR, gAmbientG, gAmbientB); + for (i = 0, sprite = gSprites; i < ARRAY_COUNT(gSprites); i++, sprite++) { if ((sprite->obj.status >= OBJ_ACTIVE) && func_enmy_80060FE4(&sprite->obj.pos, -12000.0f)) { Matrix_Push(&gGfxMatrix); + if ((sprite->obj.id == OBJ_SPRITE_CO_RUIN1) || (sprite->obj.id == OBJ_SPRITE_CO_RUIN2)) { RCP_SetupDL_57(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } else { RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } + Sprite_Draw(sprite, arg0); Matrix_Pop(&gGfxMatrix); } } + for (i = 0, actor = gActors; i < ARRAY_COUNT(gActors); i++, actor++) { if (actor->obj.status >= OBJ_ACTIVE) { if ((actor->timer_0C6 % 2) == 0) { @@ -1626,29 +1756,35 @@ void Object_DrawAll(s32 arg0) { } } else { RCP_SetupDL_27(); + if (actor->scale >= 0.0f) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 64, 64, 255, 255); } } + switch (gLevelMode) { case LEVELMODE_ON_RAILS: case LEVELMODE_TURRET: Matrix_Push(&gGfxMatrix); + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) || (gCurrentLevel == LEVEL_AQUAS)) { Display_SetSecondLight(&actor->obj.pos); } + Object_SetCullDirection(arg0); Actor_DrawOnRails(actor); Matrix_Pop(&gGfxMatrix); + if (actor->drawShadow) { Matrix_Push(&gGfxMatrix); Object_DrawShadow(i, &actor->obj); Matrix_Pop(&gGfxMatrix); } break; + case LEVELMODE_ALL_RANGE: Matrix_Push(&gGfxMatrix); Actor_DrawAllRange(actor); @@ -1663,9 +1799,12 @@ void Object_DrawAll(s32 arg0) { } } } + gDPSetFogColor(gMasterDisp++, gFogRed, gFogGreen, gFogBlue, gFogAlpha); gSPFogPosition(gMasterDisp++, gFogNear, gFogFar); + Lights_SetOneLight(&gMasterDisp, -60, -60, 60, 150, 150, 150, 20, 20, 20); + for (i = 0, item = gItems; i < ARRAY_COUNT(gItems); i++, item++) { if (item->obj.status >= OBJ_ACTIVE) { Matrix_Push(&gGfxMatrix); @@ -1675,6 +1814,7 @@ void Object_DrawAll(s32 arg0) { Matrix_Pop(&gGfxMatrix); } } + Lights_SetOneLight(&gMasterDisp, gLight1x, gLight1y, gLight1z, gLight1R, gLight1G, gLight1B, gAmbientR, gAmbientG, gAmbientB); } @@ -1685,12 +1825,14 @@ void Effect_DrawAll(s32 arg0) { Effect* effect; RCP_SetupDL(&gMasterDisp, SETUPDL_64); + for (i = 0, effect = gEffects; i < ARRAY_COUNT(gEffects); i++, effect++) { if (effect->obj.status >= OBJ_ACTIVE) { if (effect->info.unk_14 == 1) { effect->obj.rot.y = RAD_TO_DEG(-gPlayer[gPlayerNum].camYaw); effect->obj.rot.x = RAD_TO_DEG(gPlayer[gPlayerNum].camPitch); } + if (gLevelMode == LEVELMODE_ALL_RANGE) { Matrix_Push(&gGfxMatrix); Effect_DrawAllRange(effect); @@ -1708,6 +1850,7 @@ void Effect_DrawAll(s32 arg0) { } } } + for (i = 0, boss = gBosses; i < ARRAY_COUNT(gBosses); i++, boss++) { if ((boss->obj.status >= OBJ_ACTIVE) && (boss->obj.id == OBJ_BOSS_BO_BASE_SHIELD)) { if ((boss->timer_05C % 2) == 0) { @@ -1726,6 +1869,7 @@ void Effect_DrawAll(s32 arg0) { void Object_Draw(s32 arg0) { gReflectY = 1; Object_DrawAll(1); + if ((gGroundSurface == SURFACE_WATER) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) { gReflectY = -1; Lights_SetOneLight(&gMasterDisp, gLight1x, -1 * gLight1y, gLight1z, gLight1R, gLight1G, gLight1B, gAmbientR, @@ -1776,6 +1920,7 @@ void TexturedLine_Draw(void) { } else { RCP_SetupDL_14(); } + for (i = 0; i < ARRAY_COUNT(gTexturedLines); i++) { TexturedLine* texLine = &gTexturedLines[i]; @@ -1828,7 +1973,9 @@ void TexturedLine_DrawPath(s32 index) { } else { RCP_SetupDL(&gMasterDisp, SETUPDL_14); } + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, texLine->prim.r, texLine->prim.g, texLine->prim.b, texLine->prim.a); + Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, texLine->posAA.x, texLine->posAA.y, texLine->posAA.z, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, texLine->yRot, MTXF_APPLY); @@ -1836,8 +1983,10 @@ void TexturedLine_DrawPath(s32 index) { Matrix_RotateZ(gGfxMatrix, texLine->xRot, MTXF_APPLY); Matrix_Scale(gGfxMatrix, texLine->xyScale, 1.0f, texLine->zScale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); + gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_edisplay_800CFD80); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); + Matrix_Pop(&gGfxMatrix); } diff --git a/src/engine/fox_enmy.c b/src/engine/fox_enmy.c index a38f9943..73c3f337 100644 --- a/src/engine/fox_enmy.c +++ b/src/engine/fox_enmy.c @@ -1780,7 +1780,7 @@ void Actor_Despawn(Actor* this) { } } -void ActorSkibot_Update(ActorSkibot* this) { +void CoSkibot_Update(CoSkibot* this) { this->gravity = 0.4f; if (this->obj.pos.y <= gGroundHeight + 130.0f) { @@ -1848,7 +1848,7 @@ void ActorSkibot_Update(ActorSkibot* this) { } } -void func_enmy_8006684C(ActorSkibot* this) { +void func_enmy_8006684C(CoSkibot* this) { s32 pad; if (this->timer_0BE != 0) { @@ -1874,7 +1874,7 @@ void func_enmy_8006684C(ActorSkibot* this) { } } -void ActorRadar_Update(CoRadar* this) { +void CoRadar_Update(CoRadar* this) { if (this->timer_0BC != 0) { if (this->timer_0BC == 1) { Object_Kill(&this->obj, this->sfxSource); diff --git a/src/engine/fox_enmy2.c b/src/engine/fox_enmy2.c index d1913234..f931b99d 100644 --- a/src/engine/fox_enmy2.c +++ b/src/engine/fox_enmy2.c @@ -396,7 +396,7 @@ void func_enmy2_8006BB1C(f32 xPos, f32 yPos, f32 zPos) { } } -void ActorMoleMissile_Update(ActorMoleMissile* this) { +void CoMoleMissile_Update(CoMoleMissile* this) { Vec3f sp44; switch (this->state) { From e2f6ce3075d61db0ea93ccb977c3a74b7be3bcad Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Thu, 15 Aug 2024 05:20:30 -0300 Subject: [PATCH 142/151] actor docs --- assets/yaml/jp/rev0/ast_andross.yaml | 4 ++-- assets/yaml/jp/rev0/ast_macbeth.yaml | 8 ++++---- assets/yaml/us/rev1/ast_andross.yaml | 4 ++-- assets/yaml/us/rev1/ast_macbeth.yaml | 8 ++++---- include/mods.h | 2 +- include/sf64object.h | 2 +- src/engine/fox_edata_info.c | 6 +++--- src/engine/fox_play.c | 2 +- src/engine/fox_tank.c | 7 ++++--- 9 files changed, 22 insertions(+), 21 deletions(-) diff --git a/assets/yaml/jp/rev0/ast_andross.yaml b/assets/yaml/jp/rev0/ast_andross.yaml index c296a5a1..ea967a85 100644 --- a/assets/yaml/jp/rev0/ast_andross.yaml +++ b/assets/yaml/jp/rev0/ast_andross.yaml @@ -238,8 +238,8 @@ aAndDoorHitbox: D_ANDROSS_C038AC4: {type: SF64:HITBOX, offset: 0xC038AC4, symbol: D_ANDROSS_C038AC4} -D_ANDROSS_C038B40: - {type: SF64:HITBOX, offset: 0xC038B40, symbol: D_ANDROSS_C038B40} +aAndPathHitbox: + {type: SF64:HITBOX, offset: 0xC038B40, symbol: aAndPathHitbox} aAndPathIntersectionHitbox: {type: SF64:HITBOX, offset: 0xC038BA4, symbol: aAndPathIntersectionHitbox} diff --git a/assets/yaml/jp/rev0/ast_macbeth.yaml b/assets/yaml/jp/rev0/ast_macbeth.yaml index 04859b16..486da617 100644 --- a/assets/yaml/jp/rev0/ast_macbeth.yaml +++ b/assets/yaml/jp/rev0/ast_macbeth.yaml @@ -373,8 +373,8 @@ D_MA_6013060: D_MA_6013158: { type: TEXTURE, format: IA16, ctype: u16, width: 32, height: 32, offset: 0x6013158, symbol: D_MA_6013158} -D_MA_6013960: - {type: GFX, offset: 0x6013960, symbol: D_MA_6013960} +aMaGuillotineHousingDL: + {type: GFX, offset: 0x6013960, symbol: aMaGuillotineHousingDL} D_MA_6013F58: { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x6013F58, symbol: D_MA_6013F58, tlut: 0x6014058} @@ -916,8 +916,8 @@ aMaActor207Hitbox: D_MA_6036818: {type: SF64:HITBOX, offset: 0x6036818, symbol: D_MA_6036818} -D_MA_6036894: - {type: SF64:HITBOX, offset: 0x6036894, symbol: D_MA_6036894} +aMaGuillotineHousingHitbox: + {type: SF64:HITBOX, offset: 0x6036894, symbol: aMaGuillotineHousingHitbox} aMaGuillotineHitbox: {type: SF64:HITBOX, offset: 0x60368E0, symbol: aMaGuillotineHitbox} diff --git a/assets/yaml/us/rev1/ast_andross.yaml b/assets/yaml/us/rev1/ast_andross.yaml index a2954394..e6019ac5 100644 --- a/assets/yaml/us/rev1/ast_andross.yaml +++ b/assets/yaml/us/rev1/ast_andross.yaml @@ -238,8 +238,8 @@ aAndDoorHitbox: D_ANDROSS_C038AC4: {type: SF64:HITBOX, offset: 0xC038AC4, symbol: D_ANDROSS_C038AC4} -D_ANDROSS_C038B40: - {type: SF64:HITBOX, offset: 0xC038B40, symbol: D_ANDROSS_C038B40} +aAndPathHitbox: + {type: SF64:HITBOX, offset: 0xC038B40, symbol: aAndPathHitbox} aAndPathIntersectionHitbox: {type: SF64:HITBOX, offset: 0xC038BA4, symbol: aAndPathIntersectionHitbox} diff --git a/assets/yaml/us/rev1/ast_macbeth.yaml b/assets/yaml/us/rev1/ast_macbeth.yaml index fe1c9de1..b08087cc 100644 --- a/assets/yaml/us/rev1/ast_macbeth.yaml +++ b/assets/yaml/us/rev1/ast_macbeth.yaml @@ -373,8 +373,8 @@ D_MA_6013060: D_MA_6013158: { type: TEXTURE, format: IA16, ctype: u16, width: 32, height: 32, offset: 0x6013158, symbol: D_MA_6013158} -D_MA_6013960: - {type: GFX, offset: 0x6013960, symbol: D_MA_6013960} +aMaGuillotineHousingDL: + {type: GFX, offset: 0x6013960, symbol: aMaGuillotineHousingDL} D_MA_6013F58: { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x6013F58, symbol: D_MA_6013F58, tlut: 0x6014058} @@ -916,8 +916,8 @@ aMaActor207Hitbox: D_MA_6036818: {type: SF64:HITBOX, offset: 0x6036818, symbol: D_MA_6036818} -D_MA_6036894: - {type: SF64:HITBOX, offset: 0x6036894, symbol: D_MA_6036894} +aMaGuillotineHousingHitbox: + {type: SF64:HITBOX, offset: 0x6036894, symbol: aMaGuillotineHousingHitbox} aMaGuillotineHitbox: {type: SF64:HITBOX, offset: 0x60368E0, symbol: aMaGuillotineHitbox} diff --git a/include/mods.h b/include/mods.h index 3392f4ba..5e9118a0 100644 --- a/include/mods.h +++ b/include/mods.h @@ -58,7 +58,7 @@ /** * Spawner: - * Spawn Scenery, Actors, Bosses, Sprites, Items, Effects or even Event Actors. + * Spawn Scenery, Actors, Bosses, Sprites, Items, Effects and even Event Actors. * * Controls: * D-Pad left and right to set the object Id. diff --git a/include/sf64object.h b/include/sf64object.h index f5e4669d..8c596a5f 100644 --- a/include/sf64object.h +++ b/include/sf64object.h @@ -369,7 +369,7 @@ typedef enum ObjectId { /* 60 */ OBJ_SCENERY_MA_BUILDING_2, /* 61 */ OBJ_SCENERY_MA_TOWER, /* 62 */ OBJ_SCENERY_MA_WALL_1, - /* 63 */ OBJ_SCENERY_63, + /* 63 */ OBJ_SCENERY_GUILLOTINE_HOUSING, /* 64 */ OBJ_SCENERY_MA_GUILLOTINE, /* 65 */ OBJ_SCENERY_MA_PROXIMITY_LIGHT, /* 66 */ OBJ_SCENERY_MA_WALL_2, diff --git a/src/engine/fox_edata_info.c b/src/engine/fox_edata_info.c index f1fdf4a2..81cc18af 100644 --- a/src/engine/fox_edata_info.c +++ b/src/engine/fox_edata_info.c @@ -156,7 +156,7 @@ ObjectInfo gObjectInfo[] = { /* OBJ_SCENERY_MA_BUILDING_2, */ {(void*) aMaBuilding2DL, 0, (ObjectFunc) NULL, aMaBuilding2Hitbox, 400.0f, 0, 0, 5, 0, 0.0f, 0 }, /* OBJ_SCENERY_MA_TOWER, */ {(void*) Macbeth_MaTower_Draw, 1, (ObjectFunc) NULL, aMaTowerHitbox, 200.0f, 0, 0, 5, 0, 0.0f, 0 }, /* OBJ_SCENERY_MA_WALL_1, */ {(void*) aMaWall1DL, 0, (ObjectFunc) NULL, gNoHitbox, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_63, */ {(void*) D_MA_6013960, 0, (ObjectFunc) NULL, D_MA_6036894, 500.0f, 0, 0, 5, 0, 0.0f, 0 }, + /* OBJ_SCENERY_GUILLOTINE_HOUSING, */ {(void*) aMaGuillotineHousingDL, 0, (ObjectFunc) NULL, aMaGuillotineHousingHitbox, 500.0f, 0, 0, 5, 0, 0.0f, 0 }, /* OBJ_SCENERY_MA_GUILLOTINE, */ {(void*) aMaGuillotineDL, 0, (ObjectFunc) NULL, aMaGuillotineHitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_MA_PROXIMITY_LIGHT, */ {(void*) Macbeth_MaProximityLight_Draw, 1, (ObjectFunc) NULL, aMaProximityLightHitbox, 400.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_SCENERY_MA_WALL_2, */ {(void*) aMaWall2DL, 0, (ObjectFunc) NULL, aMaWall2Hitbox, 2500.0f, 0, 0, 5, 0, 0.0f, 0 }, @@ -228,8 +228,8 @@ ObjectInfo gObjectInfo[] = { /* OBJ_SCENERY_AND_DOOR */ {(void*) Andross_AndDoor_Draw, 1, (ObjectFunc) Andross_AndDoor_Update, aAndDoorHitbox, 500.0f, 0, 0, 41, 0, 0.0f, 0 }, /* OBJ_SCENERY_TR_BUILDING */ {(void*) aTrBuildingDL, 0, (ObjectFunc) NULL, aTrBuildingHitbox, 1000.0f, 0, 0, 20, 0, 0.0f, 0 }, /* OBJ_SCENERY_AND_PATH_INTERSECTION */ {(void*) aAndPathIntersectionDL, 0, (ObjectFunc) NULL, aAndPathIntersectionHitbox, 0.0f, 0, 0, 41, 1, 0.0f, 0 }, - /* OBJ_SCENERY_AND_PATH_WALLS */ {(void*) aAndPathWallsDL, 0, (ObjectFunc) NULL, D_ANDROSS_C038B40, 0.0f, 0, 0, 41, 1, 0.0f, 0 }, - /* OBJ_SCENERY_AND_PATH_EXIT */ {(void*) aAndPathExitDL, 0, (ObjectFunc) NULL, D_ANDROSS_C038B40, 0.0f, 0, 0, 41, 1, 0.0f, 0 }, + /* OBJ_SCENERY_AND_PATH_WALLS */ {(void*) aAndPathWallsDL, 0, (ObjectFunc) NULL, aAndPathHitbox, 0.0f, 0, 0, 41, 1, 0.0f, 0 }, + /* OBJ_SCENERY_AND_PATH_EXIT */ {(void*) aAndPathExitDL, 0, (ObjectFunc) NULL, aAndPathHitbox, 0.0f, 0, 0, 41, 1, 0.0f, 0 }, /* OBJ_SCENERY_AND_PATH_ENTRANCE */ {(void*) aAndPathEntranceDL, 0, (ObjectFunc) NULL, gNoHitbox, 0.0f, 0, 0, 0, 1, 0.0f, 0 }, /* OBJ_SCENERY_VS_BUILDING_1 */ {(void*) aVsBuildingDL, 0, (ObjectFunc) NULL, aVsBuilding1Hibox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_VS_BUILDING_2 */ {(void*) aVsBuildingDL, 0, (ObjectFunc) NULL, aVsBuilding2Hibox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index c20df7e1..93c4a5e9 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -1425,7 +1425,7 @@ bool Play_CheckPolyCollision(ObjectId objId, f32 arg1, f32 arg2, f32 arg3, f32 a case OBJ_SCENERY_MA_BUILDING_2: case OBJ_SCENERY_MA_TOWER: case OBJ_SCENERY_MA_WALL_1: - case OBJ_SCENERY_63: + case OBJ_SCENERY_GUILLOTINE_HOUSING: case OBJ_SCENERY_MA_GUILLOTINE: case OBJ_SCENERY_MA_PROXIMITY_LIGHT: case OBJ_SCENERY_MA_WALL_2: diff --git a/src/engine/fox_tank.c b/src/engine/fox_tank.c index 0dc3b8cd..3ef5166f 100644 --- a/src/engine/fox_tank.c +++ b/src/engine/fox_tank.c @@ -910,7 +910,7 @@ void func_tank_80046704(Player* player) { } } if ((scenery->obj.id == OBJ_SCENERY_MA_BUILDING_1) || (scenery->obj.id == OBJ_SCENERY_MA_BUILDING_2) || - (scenery->obj.id == OBJ_SCENERY_MA_TOWER) || (scenery->obj.id == OBJ_SCENERY_63) || + (scenery->obj.id == OBJ_SCENERY_MA_TOWER) || (scenery->obj.id == OBJ_SCENERY_GUILLOTINE_HOUSING) || (scenery->obj.id == OBJ_SCENERY_MA_TRAIN_TRACK_13) || (scenery->obj.id == OBJ_SCENERY_MA_WALL_2) || (scenery->obj.id == OBJ_SCENERY_MA_WALL_3) || (scenery->obj.id == OBJ_SCENERY_MA_WALL_4)) { s32 temp_v0; @@ -937,7 +937,8 @@ void func_tank_80046704(Player* player) { break; case 3: if ((scenery->obj.id == OBJ_SCENERY_MA_BUILDING_1) || - (scenery->obj.id == OBJ_SCENERY_MA_BUILDING_2) || (scenery->obj.id == OBJ_SCENERY_63) || + (scenery->obj.id == OBJ_SCENERY_MA_BUILDING_2) || + (scenery->obj.id == OBJ_SCENERY_GUILLOTINE_HOUSING) || (scenery->obj.id == OBJ_SCENERY_MA_WALL_2) || (scenery->obj.id == OBJ_SCENERY_MA_WALL_4)) { Player_ApplyDamage(player, temp_v0, 5); } @@ -1346,7 +1347,7 @@ void func_tank_800481F4(Player* player) { for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) { if ((scenery->obj.status == OBJ_ACTIVE) && (scenery->obj.id != OBJ_SCENERY_TI_BRIDGE) && (scenery->obj.id != OBJ_SCENERY_MA_TRAIN_TRACK_13) && (scenery->obj.id != OBJ_SCENERY_MA_BUILDING_1) && - (scenery->obj.id != OBJ_SCENERY_MA_BUILDING_2) && (scenery->obj.id != OBJ_SCENERY_63) && + (scenery->obj.id != OBJ_SCENERY_MA_BUILDING_2) && (scenery->obj.id != OBJ_SCENERY_GUILLOTINE_HOUSING) && (scenery->obj.id != OBJ_SCENERY_MA_WALL_2) && (scenery->obj.id != OBJ_SCENERY_MA_WALL_3) && (scenery->obj.id != OBJ_SCENERY_MA_WALL_4) && (scenery->obj.id != OBJ_SCENERY_MA_FLOOR_1) && (scenery->obj.id != OBJ_SCENERY_MA_FLOOR_3) && (scenery->obj.id != OBJ_SCENERY_MA_FLOOR_2) && From 92ccdeb991bf0419c39b3051208c0ab35954039e Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Thu, 15 Aug 2024 06:19:21 -0300 Subject: [PATCH 143/151] more actor docs --- assets/yaml/jp/rev0/ast_aquas.yaml | 12 ++-- assets/yaml/jp/rev0/ast_corneria.yaml | 32 ++++----- assets/yaml/jp/rev0/ast_macbeth.yaml | 72 +++++++++---------- assets/yaml/jp/rev0/ast_meteo.yaml | 16 ++--- assets/yaml/jp/rev0/ast_training.yaml | 8 +-- assets/yaml/jp/rev0/ast_venom_1.yaml | 16 ++--- assets/yaml/us/rev1/ast_aquas.yaml | 12 ++-- assets/yaml/us/rev1/ast_corneria.yaml | 32 ++++----- assets/yaml/us/rev1/ast_macbeth.yaml | 72 +++++++++---------- assets/yaml/us/rev1/ast_meteo.yaml | 16 ++--- assets/yaml/us/rev1/ast_training.yaml | 8 +-- assets/yaml/us/rev1/ast_venom_1.yaml | 16 ++--- include/functions.h | 6 +- include/variables.h | 2 +- linker_scripts/eu/rev0/symbol_addrs.txt | 2 +- linker_scripts/jp/rev0/symbol_addrs.txt | 2 +- .../us/rev1/symbol_addrs_assets.txt | 6 +- src/engine/fox_bg.c | 2 +- src/engine/fox_edata.c | 11 +-- src/engine/fox_edata_info.c | 20 +++--- src/engine/fox_edisplay.c | 34 ++++----- src/engine/fox_enmy2.c | 4 +- src/engine/fox_shapes.c | 14 ++-- src/overlays/ovl_i1/fox_co.c | 2 +- src/overlays/ovl_i5/fox_ma.c | 36 +++++----- src/overlays/ovl_i5/fox_ti.c | 2 +- src/overlays/ovl_i6/fox_sy.c | 67 ++++++++--------- 27 files changed, 264 insertions(+), 258 deletions(-) diff --git a/assets/yaml/jp/rev0/ast_aquas.yaml b/assets/yaml/jp/rev0/ast_aquas.yaml index d56b32e7..437296fb 100644 --- a/assets/yaml/jp/rev0/ast_aquas.yaml +++ b/assets/yaml/jp/rev0/ast_aquas.yaml @@ -677,14 +677,14 @@ D_AQ_6030BAC: aAqActor188Hitbox: { type: SF64:HITBOX, offset: 0x6030BE0, symbol: aAqActor188Hitbox } -D_AQ_6030BFC: - { type: SF64:HITBOX, offset: 0x6030BFC, symbol: D_AQ_6030BFC } +aAqActor255Hitbox: + { type: SF64:HITBOX, offset: 0x6030BFC, symbol: aAqActor255Hitbox } -D_AQ_6030C18: - { type: SF64:HITBOX, offset: 0x6030C18, symbol: D_AQ_6030C18 } +aAqActor256Hitbox: + { type: SF64:HITBOX, offset: 0x6030C18, symbol: aAqActor256Hitbox } -D_AQ_6030C44: - { type: SF64:HITBOX, offset: 0x6030C44, symbol: D_AQ_6030C44 } +aAqActor257Hitbox: + { type: SF64:HITBOX, offset: 0x6030C44, symbol: aAqActor257Hitbox } aAqCoralReef1Hitbox: { type: SF64:HITBOX, offset: 0x6030C60, symbol: aAqCoralReef1Hitbox } diff --git a/assets/yaml/jp/rev0/ast_corneria.yaml b/assets/yaml/jp/rev0/ast_corneria.yaml index 7c50e853..0ae734bc 100644 --- a/assets/yaml/jp/rev0/ast_corneria.yaml +++ b/assets/yaml/jp/rev0/ast_corneria.yaml @@ -231,8 +231,8 @@ D_CO_601EAA0: D_CO_601ED00: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601ED00, symbol: D_CO_601ED00 } -D_CO_601F500: - { type: GFX, offset: 0x601F500, symbol: D_CO_601F500 } +aCoRuin2DL: + { type: GFX, offset: 0x601F500, symbol: aCoRuin2DL } aCoArch1DL: { type: GFX, offset: 0x601F5A0, symbol: aCoArch1DL } @@ -249,8 +249,8 @@ D_CO_6021188: D_CO_60220D0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x060220D0, symbol: D_CO_60220D0 } -D_CO_6023AC0: - { type: GFX, offset: 0x6023AC0, symbol: D_CO_6023AC0 } +aCoIBeamDL: + { type: GFX, offset: 0x6023AC0, symbol: aCoIBeamDL } D_CO_6023DE8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06023DE8, symbol: D_CO_6023DE8 } @@ -297,8 +297,8 @@ aCoGaruda3Anim: D_CO_602AA04: { type: SF64:ANIM, offset: 0x602AA04, symbol: D_CO_602AA04 } -D_CO_602AA7C: - { type: SF64:ANIM, offset: 0x602AA7C, symbol: D_CO_602AA7C } +aCoDoorsAnim: + { type: SF64:ANIM, offset: 0x602AA7C, symbol: aCoDoorsAnim } aCoDoorsSkel: { type: SF64:SKELETON, offset: 0x602AB48, symbol: aCoDoorsSkel } @@ -324,11 +324,11 @@ aCoCarrierSkel: aCoBuilding1DL: { type: GFX, offset: 0x602D5F0, symbol: aCoBuilding1DL } -D_CO_602DA20: - { type: GFX, offset: 0x602DA20, symbol: D_CO_602DA20 } +aCoBuilding9DL: + { type: GFX, offset: 0x602DA20, symbol: aCoBuilding9DL } -D_CO_602DCA0: - { type: GFX, offset: 0x602DCA0, symbol: D_CO_602DCA0 } +aCoRuin1DL: + { type: GFX, offset: 0x602DCA0, symbol: aCoRuin1DL } D_CO_602DD40: { type: GFX, offset: 0x602DD40, symbol: D_CO_602DD40 } @@ -372,8 +372,8 @@ D_CO_6031280: D_CO_60329C0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x060329C0, symbol: D_CO_60329C0 } -D_CO_6032BC0: - { type: GFX, offset: 0x6032BC0, symbol: D_CO_6032BC0 } +CoMoleMissileDL: + { type: GFX, offset: 0x6032BC0, symbol: CoMoleMissileDL } D_CO_6033000: { type: GFX, offset: 0x6033000, symbol: D_CO_6033000 } @@ -390,8 +390,8 @@ D_CO_6033AF0: D_CO_6034388: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06034388, symbol: D_CO_6034388 } -D_CO_6034B90: - { type: GFX, offset: 0x6034B90, symbol: D_CO_6034B90 } +aCoShadow1DL: + { type: GFX, offset: 0x6034B90, symbol: aCoShadow1DL } D_CO_6034C28: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06034C28, symbol: D_CO_6034C28 } @@ -405,8 +405,8 @@ D_CO_60354F0: D_CO_60355A0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x060355A0, symbol: D_CO_60355A0 } -D_CO_6035DA0: - { type: GFX, offset: 0x6035DA0, symbol: D_CO_6035DA0 } +aCoBuilding10DL: + { type: GFX, offset: 0x6035DA0, symbol: aCoBuilding10DL } aCoBuilding8DL: { type: GFX, offset: 0x6035F10, symbol: aCoBuilding8DL } diff --git a/assets/yaml/jp/rev0/ast_macbeth.yaml b/assets/yaml/jp/rev0/ast_macbeth.yaml index 486da617..596eaf65 100644 --- a/assets/yaml/jp/rev0/ast_macbeth.yaml +++ b/assets/yaml/jp/rev0/ast_macbeth.yaml @@ -82,8 +82,8 @@ D_MA_6002FF0: D_MA_6003030: { type: TEXTURE, format: TLUT, ctype: u16, colors: 32, offset: 0x6003030, symbol: D_MA_6003030} -D_MA_6003070: - {type: GFX, offset: 0x6003070, symbol: D_MA_6003070} +aMaRailroadSwitch3DL: + {type: GFX, offset: 0x6003070, symbol: aMaRailroadSwitch3DL} D_MA_6003138: { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x6003138, symbol: D_MA_6003138, tlut: 0x6003238} @@ -133,8 +133,8 @@ D_MA_6005828: D_MA_6006030: {type: GFX, offset: 0x6006030, symbol: D_MA_6006030} -D_MA_60066A0: - {type: GFX, offset: 0x60066A0, symbol: D_MA_60066A0} +aMaIndicatorSignDL: + {type: GFX, offset: 0x60066A0, symbol: aMaIndicatorSignDL} D_MA_60069A8: { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x60069A8, symbol: D_MA_60069A8, tlut: 0x6006AA8} @@ -148,20 +148,20 @@ D_MA_6006BE8: D_MA_6006FE8: { type: TEXTURE, format: TLUT, ctype: u16, colors: 232, offset: 0x6006FE8, symbol: D_MA_6006FE8} -D_MA_60071C0: - {type: GFX, offset: 0x60071C0, symbol: D_MA_60071C0} +aMaDistanceSign4DL: + {type: GFX, offset: 0x60071C0, symbol: aMaDistanceSign4DL} -D_MA_6007290: - {type: GFX, offset: 0x6007290, symbol: D_MA_6007290} +aMaDistanceSign3DL: + {type: GFX, offset: 0x6007290, symbol: aMaDistanceSign3DL} -D_MA_6007360: - {type: GFX, offset: 0x6007360, symbol: D_MA_6007360} +aMaDistanceSign2DL: + {type: GFX, offset: 0x6007360, symbol: aMaDistanceSign2DL} -D_MA_6007430: - {type: GFX, offset: 0x6007430, symbol: D_MA_6007430} +aMaDistanceSign1DL: + {type: GFX, offset: 0x6007430, symbol: aMaDistanceSign1DL} -D_MA_6007500: - {type: GFX, offset: 0x6007500, symbol: D_MA_6007500} +aMaDistanceSign5DL: + {type: GFX, offset: 0x6007500, symbol: aMaDistanceSign5DL} aMaWeaponsFactoryDL: {type: GFX, offset: 0x60075D0, symbol: aMaWeaponsFactoryDL} @@ -175,8 +175,8 @@ D_MA_6009AE0: D_MA_6009BE0: { type: TEXTURE, format: TLUT, ctype: u16, colors: 56, offset: 0x6009BE0, symbol: D_MA_6009BE0} -D_MA_6009C50: - {type: GFX, offset: 0x6009C50, symbol: D_MA_6009C50} +aMaRailroadSwitch8DL: + {type: GFX, offset: 0x6009C50, symbol: aMaRailroadSwitch8DL} D_MA_6009D18: { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x6009D18, symbol: D_MA_6009D18, tlut: 0x6009E18} @@ -184,8 +184,8 @@ D_MA_6009D18: D_MA_6009E18: { type: TEXTURE, format: TLUT, ctype: u16, colors: 120, offset: 0x6009E18, symbol: D_MA_6009E18} -D_MA_6009F10: - {type: GFX, offset: 0x6009F10, symbol: D_MA_6009F10} +aMaRailroadSwitch7DL: + {type: GFX, offset: 0x6009F10, symbol: aMaRailroadSwitch7DL} D_MA_6009FD8: { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x6009FD8, symbol: D_MA_6009FD8, tlut: 0x600A0D8} @@ -193,8 +193,8 @@ D_MA_6009FD8: D_MA_600A0D8: { type: TEXTURE, format: TLUT, ctype: u16, colors: 136, offset: 0x600A0D8, symbol: D_MA_600A0D8} -D_MA_600A1F0: - {type: GFX, offset: 0x600A1F0, symbol: D_MA_600A1F0} +aMaRailroadSwitch6DL: + {type: GFX, offset: 0x600A1F0, symbol: aMaRailroadSwitch6DL} D_MA_600A2B8: { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x600A2B8, symbol: D_MA_600A2B8, tlut: 0x600A3B8} @@ -202,8 +202,8 @@ D_MA_600A2B8: D_MA_600A3B8: { type: TEXTURE, format: TLUT, ctype: u16, colors: 136, offset: 0x600A3B8, symbol: D_MA_600A3B8} -D_MA_600A4D0: - {type: GFX, offset: 0x600A4D0, symbol: D_MA_600A4D0} +aMaRailroadSwitch5DL: + {type: GFX, offset: 0x600A4D0, symbol: aMaRailroadSwitch5DL} D_MA_600A598: { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x600A598, symbol: D_MA_600A598, tlut: 0x600A698} @@ -211,8 +211,8 @@ D_MA_600A598: D_MA_600A698: { type: TEXTURE, format: TLUT, ctype: u16, colors: 152, offset: 0x600A698, symbol: D_MA_600A698} -D_MA_600A7D0: - {type: GFX, offset: 0x600A7D0, symbol: D_MA_600A7D0} +aMaRailroadSwitch4DL: + {type: GFX, offset: 0x600A7D0, symbol: aMaRailroadSwitch4DL} D_MA_600A898: { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x600A898, symbol: D_MA_600A898, tlut: 0x600A998} @@ -220,8 +220,8 @@ D_MA_600A898: D_MA_600A998: { type: TEXTURE, format: TLUT, ctype: u16, colors: 104, offset: 0x600A998, symbol: D_MA_600A998} -D_MA_600AA70: - {type: GFX, offset: 0x600AA70, symbol: D_MA_600AA70} +aMaRailroadSwitch2DL: + {type: GFX, offset: 0x600AA70, symbol: aMaRailroadSwitch2DL} D_MA_600AB38: { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x600AB38, symbol: D_MA_600AB38, tlut: 0x600AC38} @@ -229,8 +229,8 @@ D_MA_600AB38: D_MA_600AC38: { type: TEXTURE, format: TLUT, ctype: u16, colors: 136, offset: 0x600AC38, symbol: D_MA_600AC38} -D_MA_600AD50: - {type: GFX, offset: 0x600AD50, symbol: D_MA_600AD50} +aMaRailroadSwitch1DL: + {type: GFX, offset: 0x600AD50, symbol: aMaRailroadSwitch1DL} D_MA_600AE18: { type: TEXTURE, format: CI8, ctype: u8, width: 8, height: 16, offset: 0x600AE18, symbol: D_MA_600AE18, tlut: 0x600AE98} @@ -340,8 +340,8 @@ D_MA_601042C: D_MA_6010470: {type: GFX, offset: 0x6010470, symbol: D_MA_6010470} -D_MA_6010700: - {type: GFX, offset: 0x6010700, symbol: D_MA_6010700} +aMaProximityLightSidesDL: + {type: GFX, offset: 0x6010700, symbol: aMaProximityLightSidesDL} D_MA_6010C20: { type: TEXTURE, format: RGBA16, ctype: u16, width: 44, height: 44, offset: 0x6010C20, symbol: D_MA_6010C20} @@ -472,8 +472,8 @@ D_MA_601BE08: D_MA_601BE90: {type: GFX, offset: 0x601BE90, symbol: D_MA_601BE90} -D_MA_601C000: - {type: GFX, offset: 0x601C000, symbol: D_MA_601C000} +aMaTowerTopDL: + {type: GFX, offset: 0x601C000, symbol: aMaTowerTopDL} D_MA_601C170: {type: GFX, offset: 0x601C170, symbol: D_MA_601C170} @@ -496,8 +496,8 @@ D_MA_601EBBC: aMaWall2DL: {type: GFX, offset: 0x601F1D0, symbol: aMaWall2DL} -D_MA_601F270: - {type: GFX, offset: 0x601F270, symbol: D_MA_601F270} +aMaProximityLightTopDL: + {type: GFX, offset: 0x601F270, symbol: aMaProximityLightTopDL} D_MA_6020A30: {type: GFX, offset: 0x6020A30, symbol: D_MA_6020A30} @@ -571,8 +571,8 @@ D_MA_6024670: aMaHorizontalLockBarDL: {type: GFX, offset: 0x60251A0, symbol: aMaHorizontalLockBarDL} -D_MA_60253E0: - {type: GFX, offset: 0x60253E0, symbol: D_MA_60253E0} +aMaTowerBottomDL: + {type: GFX, offset: 0x60253E0, symbol: aMaTowerBottomDL} aMaBarrierDL: {type: GFX, offset: 0x60257B0, symbol: aMaBarrierDL} diff --git a/assets/yaml/jp/rev0/ast_meteo.yaml b/assets/yaml/jp/rev0/ast_meteo.yaml index f97e017e..0b2c9796 100644 --- a/assets/yaml/jp/rev0/ast_meteo.yaml +++ b/assets/yaml/jp/rev0/ast_meteo.yaml @@ -158,8 +158,8 @@ aMeLaserCannon2DL: D_ME_6018960: { type: GFX, offset: 0x06018960, symbol: D_ME_6018960 } -aMeMeteor1DL: - { type: GFX, offset: 0x06018C00, symbol: aMeMeteor1DL } +aMeMeteorDL: + { type: GFX, offset: 0x06018C00, symbol: aMeMeteorDL } D_ME_6019430: { type: GFX, offset: 0x06019430, symbol: D_ME_6019430 } @@ -173,8 +173,8 @@ D_ME_601A080: D_ME_601A880: { type: GFX, offset: 0x0601A880, symbol: D_ME_601A880 } -D_ME_601AE40: - { type: GFX, offset: 0x0601AE40, symbol: D_ME_601AE40 } +aMeMeteoTunnelDL: + { type: GFX, offset: 0x0601AE40, symbol: aMeMeteoTunnelDL } D_ME_601C8E0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x0601C8E0, symbol: D_ME_601C8E0 } @@ -216,8 +216,8 @@ D_ME_6020920: D_ME_6021920: { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06021920, symbol: D_ME_6021920 } -D_ME_6022920: - { type: GFX, offset: 0x06022920, symbol: D_ME_6022920 } +aMeLaserCannon1DL: + { type: GFX, offset: 0x06022920, symbol: aMeLaserCannon1DL } D_ME_6022E50: { type: GFX, offset: 0x06022E50, symbol: D_ME_6022E50 } @@ -249,8 +249,8 @@ D_ME_60240B0: D_ME_6024AD0: { type: GFX, offset: 0x06024AD0, symbol: D_ME_6024AD0 } -D_ME_6024B60: - { type: GFX, offset: 0x06024B60, symbol: D_ME_6024B60 } +aMeMolarRockDL: + { type: GFX, offset: 0x06024B60, symbol: aMeMolarRockDL } # Unused Meteo Ball D_ME_6025B50: diff --git a/assets/yaml/jp/rev0/ast_training.yaml b/assets/yaml/jp/rev0/ast_training.yaml index ca3aee22..8c2f5bc9 100644 --- a/assets/yaml/jp/rev0/ast_training.yaml +++ b/assets/yaml/jp/rev0/ast_training.yaml @@ -55,8 +55,8 @@ D_TR_6005880: D_TR_6005938: { type: TEXTURE, format: RGBA16, offset: 0x06005938, width: 32, height: 32, ctype: u16, symbol: D_TR_6005938 } -gItemTrainingRingDL: - { type: GFX, offset: 0x6006140, symbol: gItemTrainingRingDL } +aItemTrainingRingDL: + { type: GFX, offset: 0x6006140, symbol: aItemTrainingRingDL } D_TR_6006958: { type: TEXTURE, format: RGBA16, offset: 0x06006958, width: 8, height: 8, ctype: u16, symbol: D_TR_6006958 } @@ -79,8 +79,8 @@ D_TR_6009B34: aTrBuildingHitbox: { type: SF64:HITBOX, offset: 0x6009CC4, symbol: aTrBuildingHitbox } -D_TR_6009CFC: - { type: SF64:HITBOX, offset: 0x6009CFC, symbol: D_TR_6009CFC } +aItemTrainingRingHitbox: + { type: SF64:HITBOX, offset: 0x6009CFC, symbol: aItemTrainingRingHitbox } D_TR_6009D18: { type: SF64:HITBOX, offset: 0x6009D18, symbol: D_TR_6009D18 } diff --git a/assets/yaml/jp/rev0/ast_venom_1.yaml b/assets/yaml/jp/rev0/ast_venom_1.yaml index b012c997..777321f2 100644 --- a/assets/yaml/jp/rev0/ast_venom_1.yaml +++ b/assets/yaml/jp/rev0/ast_venom_1.yaml @@ -106,11 +106,11 @@ aVe1SceneryWall3DL: D_VE1_60074E8: { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x60074E8, ctype: u16, symbol: D_VE1_60074E8 } -D_VE1_6007CF0: - { type: GFX, offset: 0x6007CF0, symbol: D_VE1_6007CF0 } +aVe1Wall2DL: + { type: GFX, offset: 0x6007CF0, symbol: aVe1Wall2DL } -D_VE1_6007D90: - { type: GFX, offset: 0x6007D90, symbol: D_VE1_6007D90 } +aVe1Wall1DL: + { type: GFX, offset: 0x6007D90, symbol: aVe1Wall1DL } D_VE1_6007E30: { type: SF64:ENVIRONMENT, offset: 0x6007E30, symbol: D_VE1_6007E30 } @@ -133,11 +133,11 @@ D_VE1_601B474: D_VE1_601B4C4: { type: SF64:HITBOX, offset: 0x601B4C4, symbol: D_VE1_601B4C4 } -aVe1SceneryWall1Hitbox: - { type: SF64:HITBOX, offset: 0x601B4E0, symbol: aVe1SceneryWall1Hitbox } +Ve1Wall1Hitbox: + { type: SF64:HITBOX, offset: 0x601B4E0, symbol: Ve1Wall1Hitbox } -aVe1SceneryWall2Hitbox: - { type: SF64:HITBOX, offset: 0x601B4FC, symbol: aVe1SceneryWall2Hitbox } +aVe1Wall2Hitbox: + { type: SF64:HITBOX, offset: 0x601B4FC, symbol: aVe1Wall2Hitbox } aVe1SceneryWall3Hitbox: { type: SF64:HITBOX, offset: 0x601B518, symbol: aVe1SceneryWall3Hitbox } diff --git a/assets/yaml/us/rev1/ast_aquas.yaml b/assets/yaml/us/rev1/ast_aquas.yaml index 654d670d..33d3d78b 100644 --- a/assets/yaml/us/rev1/ast_aquas.yaml +++ b/assets/yaml/us/rev1/ast_aquas.yaml @@ -677,14 +677,14 @@ D_AQ_6030BAC: aAqActor188Hitbox: { type: SF64:HITBOX, offset: 0x6030BE0, symbol: aAqActor188Hitbox } -D_AQ_6030BFC: - { type: SF64:HITBOX, offset: 0x6030BFC, symbol: D_AQ_6030BFC } +aAqActor255Hitbox: + { type: SF64:HITBOX, offset: 0x6030BFC, symbol: aAqActor255Hitbox } -D_AQ_6030C18: - { type: SF64:HITBOX, offset: 0x6030C18, symbol: D_AQ_6030C18 } +aAqActor256Hitbox: + { type: SF64:HITBOX, offset: 0x6030C18, symbol: aAqActor256Hitbox } -D_AQ_6030C44: - { type: SF64:HITBOX, offset: 0x6030C44, symbol: D_AQ_6030C44 } +aAqActor257Hitbox: + { type: SF64:HITBOX, offset: 0x6030C44, symbol: aAqActor257Hitbox } aAqCoralReef1Hitbox: { type: SF64:HITBOX, offset: 0x6030C60, symbol: aAqCoralReef1Hitbox } diff --git a/assets/yaml/us/rev1/ast_corneria.yaml b/assets/yaml/us/rev1/ast_corneria.yaml index 96933be6..54525ff1 100644 --- a/assets/yaml/us/rev1/ast_corneria.yaml +++ b/assets/yaml/us/rev1/ast_corneria.yaml @@ -231,8 +231,8 @@ D_CO_601EAA0: D_CO_601ED00: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601ED00, symbol: D_CO_601ED00 } -D_CO_601F500: - { type: GFX, offset: 0x601F500, symbol: D_CO_601F500 } +aCoRuin2DL: + { type: GFX, offset: 0x601F500, symbol: aCoRuin2DL } aCoArch1DL: { type: GFX, offset: 0x601F5A0, symbol: aCoArch1DL } @@ -249,8 +249,8 @@ D_CO_6021188: D_CO_60220D0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x060220D0, symbol: D_CO_60220D0 } -D_CO_6023AC0: - { type: GFX, offset: 0x6023AC0, symbol: D_CO_6023AC0 } +aCoIBeamDL: + { type: GFX, offset: 0x6023AC0, symbol: aCoIBeamDL } D_CO_6023DE8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06023DE8, symbol: D_CO_6023DE8 } @@ -297,8 +297,8 @@ aCoGaruda3Anim: D_CO_602AA04: { type: SF64:ANIM, offset: 0x602AA04, symbol: D_CO_602AA04 } -D_CO_602AA7C: - { type: SF64:ANIM, offset: 0x602AA7C, symbol: D_CO_602AA7C } +aCoDoorsAnim: + { type: SF64:ANIM, offset: 0x602AA7C, symbol: aCoDoorsAnim } aCoDoorsSkel: { type: SF64:SKELETON, offset: 0x602AB48, symbol: aCoDoorsSkel } @@ -324,11 +324,11 @@ aCoCarrierSkel: aCoBuilding1DL: { type: GFX, offset: 0x602D5F0, symbol: aCoBuilding1DL } -D_CO_602DA20: - { type: GFX, offset: 0x602DA20, symbol: D_CO_602DA20 } +aCoBuilding9DL: + { type: GFX, offset: 0x602DA20, symbol: aCoBuilding9DL } -D_CO_602DCA0: - { type: GFX, offset: 0x602DCA0, symbol: D_CO_602DCA0 } +aCoRuin1DL: + { type: GFX, offset: 0x602DCA0, symbol: aCoRuin1DL } D_CO_602DD40: { type: GFX, offset: 0x602DD40, symbol: D_CO_602DD40 } @@ -372,8 +372,8 @@ D_CO_6031280: D_CO_60329C0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x060329C0, symbol: D_CO_60329C0 } -D_CO_6032BC0: - { type: GFX, offset: 0x6032BC0, symbol: D_CO_6032BC0 } +CoMoleMissileDL: + { type: GFX, offset: 0x6032BC0, symbol: CoMoleMissileDL } D_CO_6033000: { type: GFX, offset: 0x6033000, symbol: D_CO_6033000 } @@ -390,8 +390,8 @@ D_CO_6033AF0: D_CO_6034388: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06034388, symbol: D_CO_6034388 } -D_CO_6034B90: - { type: GFX, offset: 0x6034B90, symbol: D_CO_6034B90 } +aCoShadow1DL: + { type: GFX, offset: 0x6034B90, symbol: aCoShadow1DL } D_CO_6034C28: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06034C28, symbol: D_CO_6034C28 } @@ -405,8 +405,8 @@ D_CO_60354F0: D_CO_60355A0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x060355A0, symbol: D_CO_60355A0 } -D_CO_6035DA0: - { type: GFX, offset: 0x6035DA0, symbol: D_CO_6035DA0 } +aCoBuilding10DL: + { type: GFX, offset: 0x6035DA0, symbol: aCoBuilding10DL } aCoBuilding8DL: { type: GFX, offset: 0x6035F10, symbol: aCoBuilding8DL } diff --git a/assets/yaml/us/rev1/ast_macbeth.yaml b/assets/yaml/us/rev1/ast_macbeth.yaml index b08087cc..2235bdb7 100644 --- a/assets/yaml/us/rev1/ast_macbeth.yaml +++ b/assets/yaml/us/rev1/ast_macbeth.yaml @@ -82,8 +82,8 @@ D_MA_6002FF0: D_MA_6003030: { type: TEXTURE, format: TLUT, ctype: u16, colors: 32, offset: 0x6003030, symbol: D_MA_6003030} -D_MA_6003070: - {type: GFX, offset: 0x6003070, symbol: D_MA_6003070} +aMaRailroadSwitch3DL: + {type: GFX, offset: 0x6003070, symbol: aMaRailroadSwitch3DL} D_MA_6003138: { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x6003138, symbol: D_MA_6003138, tlut: 0x6003238} @@ -133,8 +133,8 @@ D_MA_6005828: D_MA_6006030: {type: GFX, offset: 0x6006030, symbol: D_MA_6006030} -D_MA_60066A0: - {type: GFX, offset: 0x60066A0, symbol: D_MA_60066A0} +aMaIndicatorSignDL: + {type: GFX, offset: 0x60066A0, symbol: aMaIndicatorSignDL} D_MA_60069A8: { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x60069A8, symbol: D_MA_60069A8, tlut: 0x6006AA8} @@ -148,20 +148,20 @@ D_MA_6006BE8: D_MA_6006FE8: { type: TEXTURE, format: TLUT, ctype: u16, colors: 232, offset: 0x6006FE8, symbol: D_MA_6006FE8} -D_MA_60071C0: - {type: GFX, offset: 0x60071C0, symbol: D_MA_60071C0} +aMaDistanceSign4DL: + {type: GFX, offset: 0x60071C0, symbol: aMaDistanceSign4DL} -D_MA_6007290: - {type: GFX, offset: 0x6007290, symbol: D_MA_6007290} +aMaDistanceSign3DL: + {type: GFX, offset: 0x6007290, symbol: aMaDistanceSign3DL} -D_MA_6007360: - {type: GFX, offset: 0x6007360, symbol: D_MA_6007360} +aMaDistanceSign2DL: + {type: GFX, offset: 0x6007360, symbol: aMaDistanceSign2DL} -D_MA_6007430: - {type: GFX, offset: 0x6007430, symbol: D_MA_6007430} +aMaDistanceSign1DL: + {type: GFX, offset: 0x6007430, symbol: aMaDistanceSign1DL} -D_MA_6007500: - {type: GFX, offset: 0x6007500, symbol: D_MA_6007500} +aMaDistanceSign5DL: + {type: GFX, offset: 0x6007500, symbol: aMaDistanceSign5DL} aMaWeaponsFactoryDL: {type: GFX, offset: 0x60075D0, symbol: aMaWeaponsFactoryDL} @@ -175,8 +175,8 @@ D_MA_6009AE0: D_MA_6009BE0: { type: TEXTURE, format: TLUT, ctype: u16, colors: 56, offset: 0x6009BE0, symbol: D_MA_6009BE0} -D_MA_6009C50: - {type: GFX, offset: 0x6009C50, symbol: D_MA_6009C50} +aMaRailroadSwitch8DL: + {type: GFX, offset: 0x6009C50, symbol: aMaRailroadSwitch8DL} D_MA_6009D18: { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x6009D18, symbol: D_MA_6009D18, tlut: 0x6009E18} @@ -184,8 +184,8 @@ D_MA_6009D18: D_MA_6009E18: { type: TEXTURE, format: TLUT, ctype: u16, colors: 120, offset: 0x6009E18, symbol: D_MA_6009E18} -D_MA_6009F10: - {type: GFX, offset: 0x6009F10, symbol: D_MA_6009F10} +aMaRailroadSwitch7DL: + {type: GFX, offset: 0x6009F10, symbol: aMaRailroadSwitch7DL} D_MA_6009FD8: { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x6009FD8, symbol: D_MA_6009FD8, tlut: 0x600A0D8} @@ -193,8 +193,8 @@ D_MA_6009FD8: D_MA_600A0D8: { type: TEXTURE, format: TLUT, ctype: u16, colors: 136, offset: 0x600A0D8, symbol: D_MA_600A0D8} -D_MA_600A1F0: - {type: GFX, offset: 0x600A1F0, symbol: D_MA_600A1F0} +aMaRailroadSwitch6DL: + {type: GFX, offset: 0x600A1F0, symbol: aMaRailroadSwitch6DL} D_MA_600A2B8: { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x600A2B8, symbol: D_MA_600A2B8, tlut: 0x600A3B8} @@ -202,8 +202,8 @@ D_MA_600A2B8: D_MA_600A3B8: { type: TEXTURE, format: TLUT, ctype: u16, colors: 136, offset: 0x600A3B8, symbol: D_MA_600A3B8} -D_MA_600A4D0: - {type: GFX, offset: 0x600A4D0, symbol: D_MA_600A4D0} +aMaRailroadSwitch5DL: + {type: GFX, offset: 0x600A4D0, symbol: aMaRailroadSwitch5DL} D_MA_600A598: { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x600A598, symbol: D_MA_600A598, tlut: 0x600A698} @@ -211,8 +211,8 @@ D_MA_600A598: D_MA_600A698: { type: TEXTURE, format: TLUT, ctype: u16, colors: 152, offset: 0x600A698, symbol: D_MA_600A698} -D_MA_600A7D0: - {type: GFX, offset: 0x600A7D0, symbol: D_MA_600A7D0} +aMaRailroadSwitch4DL: + {type: GFX, offset: 0x600A7D0, symbol: aMaRailroadSwitch4DL} D_MA_600A898: { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x600A898, symbol: D_MA_600A898, tlut: 0x600A998} @@ -220,8 +220,8 @@ D_MA_600A898: D_MA_600A998: { type: TEXTURE, format: TLUT, ctype: u16, colors: 104, offset: 0x600A998, symbol: D_MA_600A998} -D_MA_600AA70: - {type: GFX, offset: 0x600AA70, symbol: D_MA_600AA70} +aMaRailroadSwitch2DL: + {type: GFX, offset: 0x600AA70, symbol: aMaRailroadSwitch2DL} D_MA_600AB38: { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x600AB38, symbol: D_MA_600AB38, tlut: 0x600AC38} @@ -229,8 +229,8 @@ D_MA_600AB38: D_MA_600AC38: { type: TEXTURE, format: TLUT, ctype: u16, colors: 136, offset: 0x600AC38, symbol: D_MA_600AC38} -D_MA_600AD50: - {type: GFX, offset: 0x600AD50, symbol: D_MA_600AD50} +aMaRailroadSwitch1DL: + {type: GFX, offset: 0x600AD50, symbol: aMaRailroadSwitch1DL} D_MA_600AE18: { type: TEXTURE, format: CI8, ctype: u8, width: 8, height: 16, offset: 0x600AE18, symbol: D_MA_600AE18, tlut: 0x600AE98} @@ -340,8 +340,8 @@ D_MA_601042C: D_MA_6010470: {type: GFX, offset: 0x6010470, symbol: D_MA_6010470} -D_MA_6010700: - {type: GFX, offset: 0x6010700, symbol: D_MA_6010700} +aMaProximityLightSidesDL: + {type: GFX, offset: 0x6010700, symbol: aMaProximityLightSidesDL} D_MA_6010C20: { type: TEXTURE, format: RGBA16, ctype: u16, width: 44, height: 44, offset: 0x6010C20, symbol: D_MA_6010C20} @@ -472,8 +472,8 @@ D_MA_601BE08: D_MA_601BE90: {type: GFX, offset: 0x601BE90, symbol: D_MA_601BE90} -D_MA_601C000: - {type: GFX, offset: 0x601C000, symbol: D_MA_601C000} +aMaTowerTopDL: + {type: GFX, offset: 0x601C000, symbol: aMaTowerTopDL} D_MA_601C170: {type: GFX, offset: 0x601C170, symbol: D_MA_601C170} @@ -496,8 +496,8 @@ D_MA_601EBBC: aMaWall2DL: {type: GFX, offset: 0x601F1D0, symbol: aMaWall2DL} -D_MA_601F270: - {type: GFX, offset: 0x601F270, symbol: D_MA_601F270} +aMaProximityLightTopDL: + {type: GFX, offset: 0x601F270, symbol: aMaProximityLightTopDL} D_MA_6020A30: {type: GFX, offset: 0x6020A30, symbol: D_MA_6020A30} @@ -571,8 +571,8 @@ D_MA_6024670: aMaHorizontalLockBarDL: {type: GFX, offset: 0x60251A0, symbol: aMaHorizontalLockBarDL} -D_MA_60253E0: - {type: GFX, offset: 0x60253E0, symbol: D_MA_60253E0} +aMaTowerBottomDL: + {type: GFX, offset: 0x60253E0, symbol: aMaTowerBottomDL} aMaBarrierDL: {type: GFX, offset: 0x60257B0, symbol: aMaBarrierDL} diff --git a/assets/yaml/us/rev1/ast_meteo.yaml b/assets/yaml/us/rev1/ast_meteo.yaml index 26757edd..32e4a222 100644 --- a/assets/yaml/us/rev1/ast_meteo.yaml +++ b/assets/yaml/us/rev1/ast_meteo.yaml @@ -158,8 +158,8 @@ aMeLaserCannon2DL: D_ME_6018960: { type: GFX, offset: 0x06018960, symbol: D_ME_6018960 } -aMeMeteor1DL: - { type: GFX, offset: 0x06018C00, symbol: aMeMeteor1DL } +aMeMeteorDL: + { type: GFX, offset: 0x06018C00, symbol: aMeMeteorDL } D_ME_6019430: { type: GFX, offset: 0x06019430, symbol: D_ME_6019430 } @@ -173,8 +173,8 @@ D_ME_601A080: D_ME_601A880: { type: GFX, offset: 0x0601A880, symbol: D_ME_601A880 } -D_ME_601AE40: - { type: GFX, offset: 0x0601AE40, symbol: D_ME_601AE40 } +aMeMeteoTunnelDL: + { type: GFX, offset: 0x0601AE40, symbol: aMeMeteoTunnelDL } D_ME_601C8E0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x0601C8E0, symbol: D_ME_601C8E0 } @@ -216,8 +216,8 @@ D_ME_6020920: D_ME_6021920: { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06021920, symbol: D_ME_6021920 } -D_ME_6022920: - { type: GFX, offset: 0x06022920, symbol: D_ME_6022920 } +aMeLaserCannon1DL: + { type: GFX, offset: 0x06022920, symbol: aMeLaserCannon1DL } D_ME_6022E50: { type: GFX, offset: 0x06022E50, symbol: D_ME_6022E50 } @@ -249,8 +249,8 @@ D_ME_60240B0: D_ME_6024AD0: { type: GFX, offset: 0x06024AD0, symbol: D_ME_6024AD0 } -D_ME_6024B60: - { type: GFX, offset: 0x06024B60, symbol: D_ME_6024B60 } +aMeMolarRockDL: + { type: GFX, offset: 0x06024B60, symbol: aMeMolarRockDL } # Unused Meteo Ball D_ME_6025B50: diff --git a/assets/yaml/us/rev1/ast_training.yaml b/assets/yaml/us/rev1/ast_training.yaml index 6ac1d8e2..3fe0e9fb 100644 --- a/assets/yaml/us/rev1/ast_training.yaml +++ b/assets/yaml/us/rev1/ast_training.yaml @@ -55,8 +55,8 @@ D_TR_6005880: D_TR_6005938: { type: TEXTURE, format: RGBA16, offset: 0x06005938, width: 32, height: 32, ctype: u16, symbol: D_TR_6005938 } -gItemTrainingRingDL: - { type: GFX, offset: 0x6006140, symbol: gItemTrainingRingDL } +aItemTrainingRingDL: + { type: GFX, offset: 0x6006140, symbol: aItemTrainingRingDL } D_TR_6006958: { type: TEXTURE, format: RGBA16, offset: 0x06006958, width: 8, height: 8, ctype: u16, symbol: D_TR_6006958 } @@ -79,8 +79,8 @@ D_TR_6009B34: aTrBuildingHitbox: { type: SF64:HITBOX, offset: 0x6009CC4, symbol: aTrBuildingHitbox } -D_TR_6009CFC: - { type: SF64:HITBOX, offset: 0x6009CFC, symbol: D_TR_6009CFC } +aItemTrainingRingHitbox: + { type: SF64:HITBOX, offset: 0x6009CFC, symbol: aItemTrainingRingHitbox } D_TR_6009D18: { type: SF64:HITBOX, offset: 0x6009D18, symbol: D_TR_6009D18 } diff --git a/assets/yaml/us/rev1/ast_venom_1.yaml b/assets/yaml/us/rev1/ast_venom_1.yaml index a8bbfaf9..2b67e7ba 100644 --- a/assets/yaml/us/rev1/ast_venom_1.yaml +++ b/assets/yaml/us/rev1/ast_venom_1.yaml @@ -106,11 +106,11 @@ aVe1SceneryWall3DL: D_VE1_60074E8: { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x60074E8, ctype: u16, symbol: D_VE1_60074E8 } -D_VE1_6007CF0: - { type: GFX, offset: 0x6007CF0, symbol: D_VE1_6007CF0 } +aVe1Wall2DL: + { type: GFX, offset: 0x6007CF0, symbol: aVe1Wall2DL } -D_VE1_6007D90: - { type: GFX, offset: 0x6007D90, symbol: D_VE1_6007D90 } +aVe1Wall1DL: + { type: GFX, offset: 0x6007D90, symbol: aVe1Wall1DL } D_VE1_6007E30: { type: SF64:ENVIRONMENT, offset: 0x6007E30, symbol: D_VE1_6007E30 } @@ -133,11 +133,11 @@ D_VE1_601B474: D_VE1_601B4C4: { type: SF64:HITBOX, offset: 0x601B4C4, symbol: D_VE1_601B4C4 } -aVe1SceneryWall1Hitbox: - { type: SF64:HITBOX, offset: 0x601B4E0, symbol: aVe1SceneryWall1Hitbox } +Ve1Wall1Hitbox: + { type: SF64:HITBOX, offset: 0x601B4E0, symbol: Ve1Wall1Hitbox } -aVe1SceneryWall2Hitbox: - { type: SF64:HITBOX, offset: 0x601B4FC, symbol: aVe1SceneryWall2Hitbox } +aVe1Wall2Hitbox: + { type: SF64:HITBOX, offset: 0x601B4FC, symbol: aVe1Wall2Hitbox } aVe1SceneryWall3Hitbox: { type: SF64:HITBOX, offset: 0x601B518, symbol: aVe1SceneryWall3Hitbox } diff --git a/include/functions.h b/include/functions.h index 090c227e..9c302d0c 100644 --- a/include/functions.h +++ b/include/functions.h @@ -92,8 +92,8 @@ void Display_SetupPlayerSfxPos(Player*); void Display_Update(void); // fox_edata -void Ve1SceneryWall1_Draw(Scenery*); -void Ve1SceneryWall2_Draw(Scenery*); +void Ve1Wall1_Draw(Scenery*); +void Ve1Wall2_Draw(Scenery*); void Object_ApplyWaterDistortion(void); void AndJamesTrigger_Draw(Actor*); @@ -230,7 +230,7 @@ void Actor_SpawnGreatFoxLaser(s32 actorId, f32 xPos, f32 yPos, f32 zPos, f32 xVe void ActorEvent_SpawnEffect347(f32 xPos, f32 yPos, f32 zPos, f32 scale1); void ActorEvent_8006F254(Actor*); void ActorEvent_Update(Actor*); -s32 Scenery111_Draw(Scenery*); +s32 SyShipDebris_Draw(Scenery*); void ActorEvent_Draw(Actor*); void func_enmy2_800763A4(Actor*); void ActorEvent_Dying(Actor*); diff --git a/include/variables.h b/include/variables.h index 9da23ce9..a0019f4e 100644 --- a/include/variables.h +++ b/include/variables.h @@ -197,7 +197,7 @@ extern u16 D_Tex_800DACB8[][32]; extern u16 D_Tex_800D99F8[]; extern u16 gTextCharPalettes[]; extern Gfx gRcpInitDL[]; -extern Gfx D_Gfx_800DAC20[]; +extern Gfx aCoHighwayShadowDL[]; extern Gfx D_Gfx_800D9688[]; extern u8 D_Tex_800DB4B8[]; extern Gfx D_Gfx_800D94D0[]; diff --git a/linker_scripts/eu/rev0/symbol_addrs.txt b/linker_scripts/eu/rev0/symbol_addrs.txt index 0a546268..dc8958ef 100644 --- a/linker_scripts/eu/rev0/symbol_addrs.txt +++ b/linker_scripts/eu/rev0/symbol_addrs.txt @@ -2413,7 +2413,7 @@ D_800DBEC8 = 0x800DBEC8; D_800DBF68 = 0x800DBF68; D_800DBFB0 = 0x800DBFB0; D_800DC050 = 0x800DC050; -D_Gfx_800DAC20 = 0x800DC090; +aCoHighwayShadowDL = 0x800DC090; D_800DC0F0 = 0x800DC0F0; D_Tex_800DACB8 = 0x800DC128; D_Tex_800DB4B8 = 0x800DC928; diff --git a/linker_scripts/jp/rev0/symbol_addrs.txt b/linker_scripts/jp/rev0/symbol_addrs.txt index 0812be15..40ff4f45 100644 --- a/linker_scripts/jp/rev0/symbol_addrs.txt +++ b/linker_scripts/jp/rev0/symbol_addrs.txt @@ -3055,7 +3055,7 @@ D_800E5998 = 0x800E5998; D_800E5A38 = 0x800E5A38; D_800E5A80 = 0x800E5A80; D_800E5B20 = 0x800E5B20; -D_Gfx_800DAC20 = 0x800E5B60; +aCoHighwayShadowDL = 0x800E5B60; D_800E5BC0 = 0x800E5BC0; D_Tex_800DACB8 = 0x800E5BF8; D_Tex_800DB4B8 = 0x800E63F8; diff --git a/linker_scripts/us/rev1/symbol_addrs_assets.txt b/linker_scripts/us/rev1/symbol_addrs_assets.txt index 2aa0f73c..cb8cdc4c 100644 --- a/linker_scripts/us/rev1/symbol_addrs_assets.txt +++ b/linker_scripts/us/rev1/symbol_addrs_assets.txt @@ -8,11 +8,11 @@ D_Gfx_800DA9F8 = 0x800DA9F8; // type:Gfx D_Gfx_800DAA98 = 0x800DAA98; // type:Gfx D_Gfx_800DAB28 = 0x800DAB28; // type:Gfx D_Gfx_800DAB80 = 0x800DAB80; // type:Gfx -D_Gfx_800DAC20 = 0x800DAC20; // type:Gfx +aCoHighwayShadowDL = 0x800DAC20; // type:Gfx D_Gfx_800DACA0 = 0x800DACA0; // type:Gfx gRcpInitDL = 0x800DBAA0; // type:Gfx -D_Tex_800DA1F8 = 0x800DA1F8; +aCoHighwayShadowTex = 0x800DA1F8; D_Tex_800D99F8 = 0x800D99F8; gTextCharPalettes = 0x800DBA20; @@ -26,7 +26,7 @@ D_Vtx_800D9910 = 0x800D9910; D_Vtx_800DAA58 = 0x800DAA58; D_Vtx_800DAAF8 = 0x800DAAF8; D_Vtx_800DAB40 = 0x800DAB40; -D_Vtx_800DABE0 = 0x800DABE0; +aCoHighwayShadowVTX = 0x800DABE0; D_Vtx_800DAC80 = 0x800DAC80; D_Tex_800DACB8 = 0x800DACB8; diff --git a/src/engine/fox_bg.c b/src/engine/fox_bg.c index 76c6be8b..09669d29 100644 --- a/src/engine/fox_bg.c +++ b/src/engine/fox_bg.c @@ -1145,7 +1145,7 @@ void Background_DrawGround(void) { } else if (gCurrentLevel == LEVEL_BOLSE) { gSPDisplayList(gMasterDisp++, D_BO_600A810); } else if (gCurrentLevel == LEVEL_VENOM_2) { - gSPDisplayList(gMasterDisp++, D_MA_6010700); + gSPDisplayList(gMasterDisp++, aMaProximityLightSidesDL); } Matrix_Pop(&gGfxMatrix); } diff --git a/src/engine/fox_edata.c b/src/engine/fox_edata.c index b2c89e75..d53cfa51 100644 --- a/src/engine/fox_edata.c +++ b/src/engine/fox_edata.c @@ -4,21 +4,22 @@ f32* D_edata_800CF964[] = { NULL }; // Likely a scrapped array of scenery shadow boxes -void Ve1SceneryWall1_Draw(Scenery* scenery) { +void Ve1Wall1_Draw(Ve1Wall1* this) { RCP_SetupDL_57(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_VE1_6007D90); + gSPDisplayList(gMasterDisp++, aVe1Wall1DL); RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } -void Ve1SceneryWall2_Draw(Scenery* scenery) { +void Ve1Wall2_Draw(Ve1Wall2* this) { RCP_SetupDL_57(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_VE1_6007CF0); + gSPDisplayList(gMasterDisp++, aVe1Wall2DL); RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } -void AndJamesTrigger_Draw(Actor* actor) { +void AndJamesTrigger_Draw(AndJamesTrigger* this) { + /* Unimplemented */ } diff --git a/src/engine/fox_edata_info.c b/src/engine/fox_edata_info.c index 81cc18af..3b73923c 100644 --- a/src/engine/fox_edata_info.c +++ b/src/engine/fox_edata_info.c @@ -141,8 +141,8 @@ ObjectInfo gObjectInfo[] = { /* OBJ_SCENERY_ZO_OIL_RIG_2, */ {(void*) aZoOilRig2DL, 0, (ObjectFunc) NULL, aZoOilRig2Hitbox, 1500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_ZO_OIL_RIG_3, */ {(void*) aZoOilRig3DL, 0, (ObjectFunc) NULL, aZoOilRig3Hitbox, 1500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_ZO_ISLAND, */ {(void*) aZoIslandDL, 0, (ObjectFunc) NULL, aZoIslandHitbox, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_VE1_WALL_1, */ {(void*) Ve1SceneryWall1_Draw, 1, (ObjectFunc) NULL, aVe1SceneryWall1Hitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_VE1_WALL_2, */ {(void*) Ve1SceneryWall2_Draw, 1, (ObjectFunc) NULL, aVe1SceneryWall2Hitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_VE1_WALL_1, */ {(void*) Ve1Wall1_Draw, 1, (ObjectFunc) NULL, Ve1Wall1Hitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_VE1_WALL_2, */ {(void*) Ve1Wall2_Draw, 1, (ObjectFunc) NULL, aVe1Wall2Hitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_VE1_WALL_3, */ {(void*) aVe1SceneryWall3DL, 0, (ObjectFunc) NULL, aVe1SceneryWall3Hitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_VE1_HALLWAY_OBSTACLE, */ {(void*) aVe1HallwayObstacleDL, 0, (ObjectFunc) NULL, aVe1HallwayObstacleHitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_VE1_GENERATOR, */ {(void*) aVe1GeneratorDL, 0, (ObjectFunc) Venom1_Ve1Generator_Update, aVe1GeneratorHitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, @@ -204,7 +204,7 @@ ObjectInfo gObjectInfo[] = { /* OBJ_SCENERY_SY_SHIP_3 */ {(void*) aSyShip3DL, 0, (ObjectFunc) NULL, aSyShip3Hitbox, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, /* OBJ_SCENERY_SY_SHIP_3_DESTROYED */ {(void*) aSyShip3DestroyedDL, 0, (ObjectFunc) SectorY_SyShip3Destroyed_Update, aSyShip3DestroyedHitbox, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, /* OBJ_SCENERY_SY_SHIP_4 */ {(void*) aSyShip4DL, 0, (ObjectFunc) NULL, aSyShip4Hitbox, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_SCENERY_SY_SHIP_DEBRIS */ {(void*) Scenery111_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_SY_SHIP_DEBRIS */ {(void*) SyShipDebris_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_SCENERY_SY_SHIP_2_DESTROYED */ {(void*) aSyShip4DestroyedDL, 0, (ObjectFunc) SectorY_SyShip4Destroyed_Update, aSyShip4DestroyedHitbox, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, /* OBJ_SPRITE_SY_SHIP_2 */ {(void*) aSyShip2SpriteDL, 0, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SPRITE_SY_SHIP_3 */ {(void*) aSyShip3SpriteDL, 0, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, @@ -258,8 +258,8 @@ ObjectInfo gObjectInfo[] = { /* OBJ_SPRITE_CO_TREE */ {(void*) aCoTreeDL, 0, (ObjectFunc) Sprite_UpdateDoodad, aCoTreeHitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SPRITE_FO_POLE */ {(void*) aFoPoleDL, 0, (ObjectFunc) Sprite_UpdateDoodad, aFoPoleHitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SPRITE_FOG_SHADOW */ {(void*) FogShadow_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 1800.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SPRITE_CO_RUIN1 */ {(void*) D_CO_602DCA0, 0, (ObjectFunc) NULL, gNoHitbox, -100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SPRITE_CO_RUIN2 */ {(void*) D_CO_601F500, 0, (ObjectFunc) NULL, gNoHitbox, -100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SPRITE_CO_RUIN1 */ {(void*) aCoRuin1DL, 0, (ObjectFunc) NULL, gNoHitbox, -100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SPRITE_CO_RUIN2 */ {(void*) aCoRuin2DL, 0, (ObjectFunc) NULL, gNoHitbox, -100.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SPRITE_167 */ {(void*) Sprite167_Draw, 1, (ObjectFunc) Sprite167_Update, gNoHitbox, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SPRITE_168 */ {(void*) Sprite168_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SPRITE_TI_CACTUS */ {(void*) aTiCactusDL, 0, (ObjectFunc) Titania_Cactus_Update, aTiCactusHitbox, 100.0f, 0, 0, 0, 0, 0.0f, 0 }, @@ -274,7 +274,7 @@ ObjectInfo gObjectInfo[] = { /* OBJ_ACTOR_CO_GARUDA_3 */ {(void*) Corneria_CoGaruda3_Draw, 2, (ObjectFunc) Corneria_CoGaruda3_Update, CoGarudaHitbox, 500.0f, 0, 0, 39, 1, 200.0f, 1 }, /* OBJ_ACTOR_CO_GARUDA_DESTROY */ {(void*) Corneria_CoGarudaDestroy_Draw, 2, (ObjectFunc) Corneria_CoGarudaDestroy_Update, aCoGarudaDestroyHitbox, 500.0f, 0, 0, 39, 1, 0.0f, 1 }, /* OBJ_ACTOR_ME_MOLAR_ROCK */ {(void*) MeMolarRock_Draw, 1, (ObjectFunc) MeMolarRock_Update, gNoHitbox, 1000.0f, 0, 0, 39, 0, 0.0f, 1 }, - /* OBJ_ACTOR_ME_METEOR_1 */ {(void*) aMeMeteor1DL, 0, (ObjectFunc) Meteo_MeMeteor1_Update, aMeMeteor1Hitbox, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_ME_METEOR_1 */ {(void*) aMeMeteorDL, 0, (ObjectFunc) Meteo_MeMeteor1_Update, aMeMeteor1Hitbox, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, /* OBJ_ACTOR_ME_METEOR_2 */ {(void*) MeMeteor2_Draw, 1, (ObjectFunc) Meteo_MeMeteor2_Update, aMeMeteor2Hitbox, 100.0f, 0, 1, 39, 0, 1.0f, 1 }, /* OBJ_ACTOR_ME_METEOR_SHOWER_1 */ {(void*) Meteo_MeMeteorShower1_Draw, 1, (ObjectFunc) Meteo_MeteorShower_Update, gNoHitbox, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, /* OBJ_ACTOR_ME_METEOR_SHOWER_2 */ {(void*) Meteo_MeMeteorShower2_Draw, 1, (ObjectFunc) Meteo_MeteorShower_Update, gNoHitbox, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, @@ -348,9 +348,9 @@ ObjectInfo gObjectInfo[] = { /* OBJ_ACTOR_ZO_RADARBUOY */ {(void*) Zoness_ZoRadarBuoy_Draw, 1, (ObjectFunc) Zoness_ZoRadarBuoy_Update, aZoRadarBuoyHitbox, 200.0f, 0, 0, 40, 0, 80.0f, 1 }, /* OBJ_ACTOR_ZO_SUPPLYCRANE */ {(void*) Zoness_ZoSupplyCrane_Draw, 1, (ObjectFunc) Zoness_ZoSupplyCrane_Update, aZoSupplyCraneHitbox, 300.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_ZO_SEARCHLIGHT */ {(void*) Zoness_ZoSearchLight_Draw, 1, (ObjectFunc) Zoness_ZoSearchLight_Update, aZoSearchLightHitbox, 300.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ACTOR_255 */ {(void*) Aquas_Actor255_Draw, 1, (ObjectFunc) Aquas_Actor255_Update, D_AQ_6030BFC, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_256 */ {(void*) Aquas_Actor256_Draw, 1, (ObjectFunc) Aquas_Actor256_Update, D_AQ_6030C18, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_257 */ {(void*) Aquas_Actor257_Draw, 1, (ObjectFunc) Aquas_Actor257_Update, D_AQ_6030C44, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_255 */ {(void*) Aquas_Actor255_Draw, 1, (ObjectFunc) Aquas_Actor255_Update, aAqActor255Hitbox, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_256 */ {(void*) Aquas_Actor256_Draw, 1, (ObjectFunc) Aquas_Actor256_Update, aAqActor256Hitbox, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_257 */ {(void*) Aquas_Actor257_Draw, 1, (ObjectFunc) Aquas_Actor257_Update, aAqActor257Hitbox, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_AQ_PEARL */ {(void*) Aquas_AqPearl_Draw, 1, (ObjectFunc) Aquas_AqPearl_Update, gCubeHitbox100, 200.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_AQ_ANGLERFISH */ {(void*) Aquas_AqAnglerFish_Draw, 2, (ObjectFunc) Aquas_AqAnglerFish_Update, aAqAnglerFishHitbox, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_AQ_GAROA */ {(void*) Aquas_AqGaroa_Draw, 2, (ObjectFunc) Aquas_AqGaroa_Update, aAqGaroaHitbox, 300.0f, 0, 0, 40, 0, 0.0f, 0 }, @@ -431,7 +431,7 @@ ObjectInfo gObjectInfo[] = { /* OBJ_ITEM_1UP */ {(void*) D_1022120, 0, (ObjectFunc) Item1up_Update, gCubeHitbox100, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ITEM_GOLD_RING */ {(void*) ItemGoldRing_Draw, 1, (ObjectFunc) ItemGoldRing_Update, gItemSupplyRingHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ITEM_WING_REPAIR */ {(void*) aArwingItemLasersDL, 0, (ObjectFunc) ItemWingRepair_Update, gItemLasersHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ITEM_TRAINING_RING */ {(void*) gItemTrainingRingDL, 0, (ObjectFunc) Training_ItemRing_Update, D_TR_6009CFC, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ITEM_TRAINING_RING */ {(void*) aItemTrainingRingDL, 0, (ObjectFunc) Training_ItemRing_Update, aItemTrainingRingHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_EFFECT_FIRE_SMOKE_1 */ {(void*) Effect_FireSmoke_Draw, 1, (ObjectFunc) Effect_Effect339_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, /* OBJ_EFFECT_FIRE_SMOKE_2 */ {(void*) Effect_FireSmoke_Draw, 1, (ObjectFunc) Effect_Effect340_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, /* OBJ_EFFECT_FIRE_SMOKE_3 */ {(void*) Effect_FireSmoke_Draw, 1, (ObjectFunc) Effect_Effect341_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, diff --git a/src/engine/fox_edisplay.c b/src/engine/fox_edisplay.c index 2dfc2869..a6086437 100644 --- a/src/engine/fox_edisplay.c +++ b/src/engine/fox_edisplay.c @@ -53,6 +53,7 @@ void Graphics_SetScaleMtx(f32 scale) { void Sprite168_Draw(Sprite168* this) { RCP_SetupDL(&gMasterDisp, SETUPDL_64); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 60); + // Missing DList RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } @@ -99,7 +100,7 @@ void ActorHopBot_Draw(ActorHopBot* this) { } void MeteoTunnel_Draw(MeTunnel* this) { - gSPDisplayList(gMasterDisp++, D_ME_601AE40); + gSPDisplayList(gMasterDisp++, aMeMeteoTunnelDL); } void Scenery_DrawTitaniaBones(Scenery* scenery) { @@ -115,12 +116,12 @@ void func_edisplay_80059BB0(void* arg0) { } void CoIBeam_Draw(CoIBeam* this) { - gSPDisplayList(gMasterDisp++, D_CO_6023AC0); + gSPDisplayList(gMasterDisp++, aCoIBeamDL); } void CoMoleMissile_Draw(CoMoleMissile* this) { if (this->animFrame != 0) { - gSPDisplayList(gMasterDisp++, D_CO_6032BC0); + gSPDisplayList(gMasterDisp++, CoMoleMissileDL); } } @@ -128,6 +129,7 @@ void func_edisplay_80059C28(void* arg0) { } void Sprite167_Draw(Sprite167* this) { + /* Unimplemented */ } void FogShadow_Draw(FogShadow* this) { @@ -138,38 +140,38 @@ void FogShadow_Draw(FogShadow* this) { case OBJ_SCENERY_CO_STONE_ARCH: Matrix_Scale(gGfxMatrix, 2.0f, 1.0f, 0.7f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_CO_6034B90); + gSPDisplayList(gMasterDisp++, aCoShadow1DL); break; case OBJ_SCENERY_CO_ARCH_2: Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.7f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_CO_6034B90); + gSPDisplayList(gMasterDisp++, aCoShadow1DL); break; case OBJ_SCENERY_CO_HIGHWAY_1: case OBJ_SCENERY_CO_HIGHWAY_2: Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 10.55f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_Gfx_800DAC20); + gSPDisplayList(gMasterDisp++, aCoHighwayShadowDL); break; case OBJ_SCENERY_CO_DOORS: Matrix_Scale(gGfxMatrix, 1.6f, 1.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_CO_6034B90); + gSPDisplayList(gMasterDisp++, aCoShadow1DL); break; case OBJ_SCENERY_CO_ARCH_1: Matrix_Scale(gGfxMatrix, 1.2f, 1.0f, 1.3f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_CO_6034B90); + gSPDisplayList(gMasterDisp++, aCoShadow1DL); break; case OBJ_SCENERY_CO_ARCH_3: Matrix_Scale(gGfxMatrix, 2.2f, 1.0f, 1.4f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_CO_6034B90); + gSPDisplayList(gMasterDisp++, aCoShadow1DL); break; } RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); @@ -178,11 +180,11 @@ void FogShadow_Draw(FogShadow* this) { void CoBuilding9_Draw(CoBuilding9* this) { Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -95.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_CO_602DA20); + gSPDisplayList(gMasterDisp++, aCoBuilding9DL); } void CoBuilding10_Draw(CoBuilding10* this) { - gSPDisplayList(gMasterDisp++, D_CO_6035DA0); + gSPDisplayList(gMasterDisp++, aCoBuilding10DL); } // repurposed into OBJ_SCENERY_CO_BUILDING_6 @@ -600,19 +602,19 @@ void func_edisplay_8005B388(Actor199* this) { void MeMolarRock_Draw(MeMolarRock* this) { Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_ME_6024B60); + gSPDisplayList(gMasterDisp++, aMeMolarRockDL); } void MeMeteor2_Draw(MeMeteor2* this) { RCP_SetupDL_29(this->unk_046, gFogGreen, gFogBlue, gFogAlpha, this->unk_048, gFogFar); Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, aMeMeteor1DL); + gSPDisplayList(gMasterDisp++, aMeMeteorDL); } void MeLaserCannon1_Draw(MeLaserCannon1* this) { RCP_SetupDL_29(this->unk_046, gFogGreen, gFogBlue, gFogAlpha, this->unk_048, gFogFar); - gSPDisplayList(gMasterDisp++, D_ME_6022920); + gSPDisplayList(gMasterDisp++, aMeLaserCannon1DL); } void ActorMissileSeek_Draw(Actor* missile) { @@ -716,7 +718,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { break; case OBJ_BOSS_CO_GRANGA: - gSPDisplayList(gMasterDisp++, D_CO_6034B90); + gSPDisplayList(gMasterDisp++, aCoShadow1DL); break; case OBJ_BOSS_KA_SAUCERER: @@ -759,7 +761,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 150); Matrix_Scale(gGfxMatrix, 0.4f, 0.4f, gActors[index].scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_CO_6034B90); + gSPDisplayList(gMasterDisp++, aCoShadow1DL); break; case OBJ_ACTOR_TI_BOULDER: diff --git a/src/engine/fox_enmy2.c b/src/engine/fox_enmy2.c index f931b99d..97b79cf7 100644 --- a/src/engine/fox_enmy2.c +++ b/src/engine/fox_enmy2.c @@ -954,7 +954,7 @@ static EventActorInfo sEventActorInfo[108] = { /* 10 */ { D_ENMY_SPACE_400BD20, gCubeHitbox200, 2.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, /* 11 */ { D_ENMY_SPACE_4001310, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ALIEN_FLY, 0, 1.0f, 1 }, /* 12 */ { D_ENMY_SPACE_400B390, gCubeHitbox100, 2.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, - /* 13 */ { aMeMeteor1DL, gCubeHitbox100, 2.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* 13 */ { aMeMeteorDL, gCubeHitbox100, 2.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, /* 14 */ { D_ME_601F2A0, gCubeHitbox400, 7.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, /* 15 */ { D_ENMY_SPACE_400AAE0, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, /* 16 */ { D_ENMY_SPACE_4000650, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ALIEN_FLY, 0, 1.0f, 1 }, @@ -3847,7 +3847,7 @@ bool ActorEvent_OverrideLimbDraw3(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* return false; } -s32 Scenery111_Draw(SyShipDebris* this) { +s32 SyShipDebris_Draw(SyShipDebris* this) { RCP_SetupDL(&gMasterDisp, SETUPDL_60); gSPDisplayList(gMasterDisp++, D_SY_601AD70); RCP_SetupDL(&gMasterDisp, SETUPDL_64); diff --git a/src/engine/fox_shapes.c b/src/engine/fox_shapes.c index f3be1210..411817ff 100644 --- a/src/engine/fox_shapes.c +++ b/src/engine/fox_shapes.c @@ -9,7 +9,7 @@ Vtx D_Vtx_800D94A0[] = { }; Gfx D_Gfx_800D94D0[] = { - // used in fox_ti for the triangular light rays before firing his lazor + // used in fox_ti for the triangular light rays before firing his laser gsSPVertex(D_Vtx_800D94A0, 3, 0), gsSP1Triangle(0, 1, 2, 0), gsSPEndDisplayList(), @@ -42,7 +42,7 @@ Vtx D_Vtx_800D9658[] = { }; Gfx D_Gfx_800D9688[] = { - // used fox_fade for unused spinning fade + // used in fox_fade for unused spinning fade gsSPVertex(D_Vtx_800D9658, 3, 0), gsSP1Triangle(0, 1, 2, 0), gsSPEndDisplayList(), @@ -208,7 +208,7 @@ u16 D_Tex_800D99F8[1024] = { 0xFFFF, 0xFFFF, }; -u16 D_Tex_800DA1F8[1024] = { +u16 aCoHighwayShadowTex[1024] = { 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, @@ -345,19 +345,19 @@ Gfx D_Gfx_800DAB80[] = { gsSPEndDisplayList(), }; -Vtx D_Vtx_800DABE0[] = { +Vtx aCoHighwayShadowVTX[] = { VTX(-170, 0, -170, 0, 255, 0, 127, 0, 0), VTX(170, 0, -170, 255, 255, 0, 127, 0, 0), VTX(170, 0, 170, 255, 0, 0, 127, 0, 0), VTX(-179, 0, 170, 0, 0, 0, 127, 0, 0), }; -Gfx D_Gfx_800DAC20[] = { +Gfx aCoHighwayShadowDL[] = { // used in fox_edisplay gsDPSetupTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 8, 0, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, 3, 3, G_TX_NOLOD, G_TX_NOLOD), - gsDPLoadTileTexture(D_Tex_800DA1F8, G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 8), - gsSPVertex(D_Vtx_800DABE0, 4, 0), + gsDPLoadTileTexture(aCoHighwayShadowTex, G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 8), + gsSPVertex(aCoHighwayShadowVTX, 4, 0), gsSP1Triangle(0, 2, 1, 0), gsSP1Triangle(0, 3, 2, 0), gsSPEndDisplayList(), diff --git a/src/overlays/ovl_i1/fox_co.c b/src/overlays/ovl_i1/fox_co.c index c3fd6b13..4eef3cc8 100644 --- a/src/overlays/ovl_i1/fox_co.c +++ b/src/overlays/ovl_i1/fox_co.c @@ -2747,7 +2747,7 @@ bool Corneria_CoDoors_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, V void Corneria_CoDoors_Draw(CoDoors* this) { Vec3f jointTable[10]; - Animation_GetFrameData(&D_CO_602AA7C, 0, jointTable); + Animation_GetFrameData(&aCoDoorsAnim, 0, jointTable); Animation_DrawSkeleton(3, aCoDoorsSkel, jointTable, Corneria_CoDoors_OverrideLimbDraw, NULL, this, gCalcMatrix); RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } diff --git a/src/overlays/ovl_i5/fox_ma.c b/src/overlays/ovl_i5/fox_ma.c index e0e31d4b..d2683872 100644 --- a/src/overlays/ovl_i5/fox_ma.c +++ b/src/overlays/ovl_i5/fox_ma.c @@ -2722,8 +2722,8 @@ void Macbeth_TrainTrack_Draw(Scenery* this) { void Macbeth_MaTower_Draw(Scenery* this) { RCP_SetupDL(&gMasterDisp, SETUPDL_57); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - gSPDisplayList(gMasterDisp++, D_MA_60253E0); - gSPDisplayList(gMasterDisp++, D_MA_601C000); + gSPDisplayList(gMasterDisp++, aMaTowerBottomDL); + gSPDisplayList(gMasterDisp++, aMaTowerTopDL); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); RCP_SetupDL(&gMasterDisp, SETUPDL_29); } @@ -2738,46 +2738,46 @@ void Macbeth_IndicatorSign_Draw(Scenery* this) { switch (this->obj.id) { case OBJ_SCENERY_MA_INDICATOR_SIGN: - gSPDisplayList(gMasterDisp++, D_MA_60066A0); + gSPDisplayList(gMasterDisp++, aMaIndicatorSignDL); break; case OBJ_SCENERY_MA_DISTANCE_SIGN_1: - gSPDisplayList(gMasterDisp++, D_MA_6007430); + gSPDisplayList(gMasterDisp++, aMaDistanceSign1DL); break; case OBJ_SCENERY_MA_DISTANCE_SIGN_2: - gSPDisplayList(gMasterDisp++, D_MA_6007360); + gSPDisplayList(gMasterDisp++, aMaDistanceSign2DL); break; case OBJ_SCENERY_MA_DISTANCE_SIGN_3: - gSPDisplayList(gMasterDisp++, D_MA_6007290); + gSPDisplayList(gMasterDisp++, aMaDistanceSign3DL); break; case OBJ_SCENERY_MA_DISTANCE_SIGN_4: - gSPDisplayList(gMasterDisp++, D_MA_60071C0); + gSPDisplayList(gMasterDisp++, aMaDistanceSign4DL); break; case OBJ_SCENERY_MA_DISTANCE_SIGN_5: - gSPDisplayList(gMasterDisp++, D_MA_6007500); + gSPDisplayList(gMasterDisp++, aMaDistanceSign5DL); break; case OBJ_SCENERY_MA_RAILROAD_SWITCH_1: - gSPDisplayList(gMasterDisp++, D_MA_600AD50); + gSPDisplayList(gMasterDisp++, aMaRailroadSwitch1DL); break; case OBJ_SCENERY_MA_RAILROAD_SWITCH_2: - gSPDisplayList(gMasterDisp++, D_MA_600AA70); + gSPDisplayList(gMasterDisp++, aMaRailroadSwitch2DL); break; case OBJ_SCENERY_MA_RAILROAD_SWITCH_3: - gSPDisplayList(gMasterDisp++, D_MA_6003070); + gSPDisplayList(gMasterDisp++, aMaRailroadSwitch3DL); break; case OBJ_SCENERY_MA_RAILROAD_SWITCH_4: - gSPDisplayList(gMasterDisp++, D_MA_600A7D0); + gSPDisplayList(gMasterDisp++, aMaRailroadSwitch4DL); break; case OBJ_SCENERY_MA_RAILROAD_SWITCH_5: - gSPDisplayList(gMasterDisp++, D_MA_600A4D0); + gSPDisplayList(gMasterDisp++, aMaRailroadSwitch5DL); break; case OBJ_SCENERY_MA_RAILROAD_SWITCH_6: - gSPDisplayList(gMasterDisp++, D_MA_600A1F0); + gSPDisplayList(gMasterDisp++, aMaRailroadSwitch6DL); break; case OBJ_SCENERY_MA_RAILROAD_SWITCH_7: - gSPDisplayList(gMasterDisp++, D_MA_6009F10); + gSPDisplayList(gMasterDisp++, aMaRailroadSwitch7DL); break; case OBJ_SCENERY_MA_RAILROAD_SWITCH_8: - gSPDisplayList(gMasterDisp++, D_MA_6009C50); + gSPDisplayList(gMasterDisp++, aMaRailroadSwitch8DL); break; } RCP_SetupDL(&gMasterDisp, SETUPDL_29); @@ -3777,9 +3777,9 @@ void Macbeth_MaProximityLight_Draw(MaProximityLight* this) { RCP_SetupDL(&gMasterDisp, SETUPDL_34); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, this->vel.x, 0, 0, 255); } - gSPDisplayList(gMasterDisp++, D_MA_6010700); + gSPDisplayList(gMasterDisp++, aMaProximityLightSidesDL); RCP_SetupDL(&gMasterDisp, SETUPDL_29); - gSPDisplayList(gMasterDisp++, D_MA_601F270); + gSPDisplayList(gMasterDisp++, aMaProximityLightTopDL); } void Macbeth_801A67BC(s32 arg0) { diff --git a/src/overlays/ovl_i5/fox_ti.c b/src/overlays/ovl_i5/fox_ti.c index 87c763f2..bce3610a 100644 --- a/src/overlays/ovl_i5/fox_ti.c +++ b/src/overlays/ovl_i5/fox_ti.c @@ -2208,7 +2208,7 @@ void Titania_TiPillar_Draw(TiPillar* this) { } } - if (this->unk_44 == 0) { + if (this->unk_44 == 0) { // Can never be true, this condition is never going to pass. gSPDisplayList(gMasterDisp++, D_TI1_7002270); } else { gSPDisplayList(gMasterDisp++, D_TI1_7000A80); diff --git a/src/overlays/ovl_i6/fox_sy.c b/src/overlays/ovl_i6/fox_sy.c index 6534def2..9e719808 100644 --- a/src/overlays/ovl_i6/fox_sy.c +++ b/src/overlays/ovl_i6/fox_sy.c @@ -3840,15 +3840,15 @@ bool SectorY_SyRobot_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Ve } void SectorY_SyRobot_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { - Vec3f sp2C = { 40.0f, -30.0f, 0.0f }; - Vec3f sp20; + Vec3f src = { 40.0f, -30.0f, 0.0f }; + Vec3f dest; SyRobot* actor = (SyRobot*) thisx; if (limbIndex == 1) { - Matrix_MultVec3f(gCalcMatrix, &sp2C, &sp20); - actor->fwork[16] = sp20.x; - actor->fwork[17] = sp20.y; - actor->fwork[18] = sp20.z; + Matrix_MultVec3f(gCalcMatrix, &src, &dest); + actor->fwork[16] = dest.x; + actor->fwork[17] = dest.y; + actor->fwork[18] = dest.z; } } @@ -3878,70 +3878,73 @@ void SectorY_SyRobot_Draw(SyRobot* this) { } } -void SectorY_SyShip3Destroyed_Update(SyShip3Destroyed* scenery) { +void SectorY_SyShip3Destroyed_Update(SyShip3Destroyed* this) { Vec3f src; Vec3f dest; - if (scenery->state == 0) { - AUDIO_PLAY_SFX(NA_SE_OB_BROKEN_SPARK_L, scenery->sfxSource, 4); - scenery->state++; + if (this->state == 0) { + AUDIO_PLAY_SFX(NA_SE_OB_BROKEN_SPARK_L, this->sfxSource, 4); + this->state++; } if ((gGameFrameCount % 4) == 0) { - Matrix_RotateY(gCalcMatrix, scenery->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, scenery->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, scenery->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); src.x = RAND_FLOAT_CENTERED(100.0f) + 500.0f; src.y = RAND_FLOAT_CENTERED(900.0f) + -150.0f; src.z = 90.0f - RAND_FLOAT(50.0f); Matrix_MultVec3f(gCalcMatrix, &src, &dest); - Effect_Effect390_Spawn(scenery->obj.pos.x + dest.x, scenery->obj.pos.y + dest.y, scenery->obj.pos.z + dest.z, - scenery->effectVel.x, scenery->effectVel.y, scenery->effectVel.z, 0.2f, 5); + Effect_Effect390_Spawn(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, + this->effectVel.x, this->effectVel.y, this->effectVel.z, 0.2f, 5); + src.x = RAND_FLOAT_CENTERED(100.0f) + -500.0f; src.y = RAND_FLOAT_CENTERED(900.0f); src.z = 80.0f - RAND_FLOAT(50.0f); Matrix_MultVec3f(gCalcMatrix, &src, &dest); - Effect_Effect390_Spawn(scenery->obj.pos.x + dest.x, scenery->obj.pos.y + dest.y, scenery->obj.pos.z + dest.z, - scenery->effectVel.x, scenery->effectVel.y, scenery->effectVel.z, 0.2f, 5); + Effect_Effect390_Spawn(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, + this->effectVel.x, this->effectVel.y, this->effectVel.z, 0.2f, 5); + src.x = RAND_FLOAT_CENTERED(100.0f) + 500.0f; src.y = RAND_FLOAT_CENTERED(900.0f) + -50.0f; src.z = 1900.0f - RAND_FLOAT(50.0f); Matrix_MultVec3f(gCalcMatrix, &src, &dest); - Effect_Effect390_Spawn(scenery->obj.pos.x + dest.x, scenery->obj.pos.y + dest.y, scenery->obj.pos.z + dest.z, - scenery->effectVel.x, scenery->effectVel.y, scenery->effectVel.z, 0.2f, 5); + Effect_Effect390_Spawn(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, + this->effectVel.x, this->effectVel.y, this->effectVel.z, 0.2f, 5); + src.x = RAND_FLOAT_CENTERED(100.0f) + -1000.0f; src.y = RAND_FLOAT_CENTERED(900.0f) + -250.0f; src.z = 1100.0f - RAND_FLOAT(50.0f); Matrix_MultVec3f(gCalcMatrix, &src, &dest); - Effect_Effect390_Spawn(scenery->obj.pos.x + dest.x, scenery->obj.pos.y + dest.y, scenery->obj.pos.z + dest.z, - scenery->effectVel.x, scenery->effectVel.y, scenery->effectVel.z, 0.2f, 5); + Effect_Effect390_Spawn(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, + this->effectVel.x, this->effectVel.y, this->effectVel.z, 0.2f, 5); } } -void SectorY_SyShip4Destroyed_Update(SyShip2Destroyed* scenery) { +void SectorY_SyShip4Destroyed_Update(SyShip2Destroyed* this) { Vec3f src; Vec3f dest; - if (scenery->state == 0) { - AUDIO_PLAY_SFX(NA_SE_OB_BROKEN_SPARK_L, scenery->sfxSource, 4); - scenery->state++; + if (this->state == 0) { + AUDIO_PLAY_SFX(NA_SE_OB_BROKEN_SPARK_L, this->sfxSource, 4); + this->state++; } if ((gGameFrameCount % 4) == 0) { - Matrix_RotateY(gCalcMatrix, scenery->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, scenery->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, scenery->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); src.x = RAND_FLOAT_CENTERED(100.0f) + -800.0f; src.y = RAND_FLOAT_CENTERED(300.0f) + -100.0f; src.z = RAND_FLOAT_CENTERED(5000.0f) + 500.0f; Matrix_MultVec3f(gCalcMatrix, &src, &dest); - Effect_Effect390_Spawn(scenery->obj.pos.x + dest.x, scenery->obj.pos.y + dest.y, scenery->obj.pos.z + dest.z, - scenery->effectVel.x, scenery->effectVel.y, scenery->effectVel.z, 0.3f, 5); + Effect_Effect390_Spawn(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, + this->effectVel.x, this->effectVel.y, this->effectVel.z, 0.3f, 5); src.x = RAND_FLOAT_CENTERED(100.0f) + -600.0f; src.y = RAND_FLOAT_CENTERED(250.0f) + 300.0f; src.z = RAND_FLOAT_CENTERED(1500.0f) + -1650.0f; Matrix_MultVec3f(gCalcMatrix, &src, &dest); - Effect_Effect390_Spawn(scenery->obj.pos.x + dest.x, scenery->obj.pos.y + dest.y, scenery->obj.pos.z + dest.z, - scenery->effectVel.x, scenery->effectVel.y, scenery->effectVel.z, 0.2f, 5); + Effect_Effect390_Spawn(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, + this->effectVel.x, this->effectVel.y, this->effectVel.z, 0.2f, 5); } } From a1134c296a66145a0381f8b0701ab407d2f09a14 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Thu, 15 Aug 2024 11:54:53 -0300 Subject: [PATCH 144/151] actor docs --- assets/yaml/jp/rev0/ast_7_ti_1.yaml | 28 +-- assets/yaml/jp/rev0/ast_aquas.yaml | 40 ++-- assets/yaml/jp/rev0/ast_bolse.yaml | 8 +- assets/yaml/jp/rev0/ast_common.yaml | 4 +- assets/yaml/jp/rev0/ast_corneria.yaml | 16 +- assets/yaml/jp/rev0/ast_enmy_space.yaml | 12 +- assets/yaml/jp/rev0/ast_fortuna.yaml | 8 +- assets/yaml/jp/rev0/ast_great_fox.yaml | 8 +- assets/yaml/jp/rev0/ast_macbeth.yaml | 8 +- assets/yaml/jp/rev0/ast_meteo.yaml | 12 +- assets/yaml/jp/rev0/ast_sector_x.yaml | 4 +- assets/yaml/jp/rev0/ast_sector_z.yaml | 4 +- assets/yaml/jp/rev0/ast_solar.yaml | 12 +- assets/yaml/jp/rev0/ast_ve1_boss.yaml | 4 +- assets/yaml/jp/rev0/ast_venom_2.yaml | 16 +- assets/yaml/jp/rev0/ast_zoness.yaml | 24 +-- assets/yaml/us/rev1/ast_7_ti_1.yaml | 28 +-- assets/yaml/us/rev1/ast_aquas.yaml | 40 ++-- assets/yaml/us/rev1/ast_bolse.yaml | 8 +- assets/yaml/us/rev1/ast_common.yaml | 4 +- assets/yaml/us/rev1/ast_corneria.yaml | 16 +- assets/yaml/us/rev1/ast_enmy_space.yaml | 12 +- assets/yaml/us/rev1/ast_fortuna.yaml | 8 +- assets/yaml/us/rev1/ast_great_fox.yaml | 8 +- assets/yaml/us/rev1/ast_macbeth.yaml | 8 +- assets/yaml/us/rev1/ast_meteo.yaml | 12 +- assets/yaml/us/rev1/ast_sector_x.yaml | 4 +- assets/yaml/us/rev1/ast_sector_z.yaml | 4 +- assets/yaml/us/rev1/ast_solar.yaml | 12 +- assets/yaml/us/rev1/ast_ve1_boss.yaml | 4 +- assets/yaml/us/rev1/ast_venom_2.yaml | 16 +- assets/yaml/us/rev1/ast_zoness.yaml | 24 +-- include/functions.h | 8 +- include/i5.h | 4 +- include/i6.h | 4 +- include/sf64object.h | 16 +- .../us/rev1/symbol_addrs_assets.txt | 6 +- .../us/rev1/symbol_addrs_engine.txt | 6 +- src/engine/fox_360.c | 2 +- src/engine/fox_demo.c | 27 +-- src/engine/fox_edata_info.c | 10 +- src/engine/fox_edisplay.c | 63 +++--- src/engine/fox_enmy.c | 4 +- src/engine/fox_enmy2.c | 43 ++-- src/engine/fox_hud.c | 4 +- src/engine/fox_play.c | 184 +++++++++--------- src/overlays/ovl_ending/fox_end1.c | 4 +- src/overlays/ovl_i1/fox_co.c | 2 +- src/overlays/ovl_i1/fox_ve1.c | 2 +- src/overlays/ovl_i2/fox_sx.c | 17 +- src/overlays/ovl_i3/fox_aq.c | 61 +++--- src/overlays/ovl_i3/fox_so.c | 6 +- src/overlays/ovl_i3/fox_zo.c | 111 ++++++----- src/overlays/ovl_i4/fox_bo.c | 6 +- src/overlays/ovl_i4/fox_sz.c | 2 +- src/overlays/ovl_i5/fox_ma.c | 9 +- src/overlays/ovl_i5/fox_ti.c | 18 +- src/overlays/ovl_i6/fox_andross.c | 17 +- src/overlays/ovl_i6/fox_ve2.c | 4 +- 59 files changed, 542 insertions(+), 514 deletions(-) diff --git a/assets/yaml/jp/rev0/ast_7_ti_1.yaml b/assets/yaml/jp/rev0/ast_7_ti_1.yaml index 3d70040b..75a2ee61 100644 --- a/assets/yaml/jp/rev0/ast_7_ti_1.yaml +++ b/assets/yaml/jp/rev0/ast_7_ti_1.yaml @@ -152,14 +152,14 @@ aTiDelphorDL: D_TI1_7009B58: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x07009B58, symbol: D_TI1_7009B58 } -D_TI1_7009D60: - { type: GFX, offset: 0x7009D60, symbol: D_TI1_7009D60 } +aTi1Bomb1DL: + { type: GFX, offset: 0x7009D60, symbol: aTi1Bomb1DL } D_TI1_700A190: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0700A190, symbol: D_TI1_700A190 } -aTi1BombDL: - { type: GFX, offset: 0x700A990, symbol: aTi1BombDL } +aTi1Bomb2DL: + { type: GFX, offset: 0x700A990, symbol: aTi1Bomb2DL } D_TI1_700AAD8: { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x700AAD8, symbol: D_TI1_700AAD8, tlut: 0x700AB58 } @@ -182,8 +182,8 @@ D_TI1_700B5B8: D_TI1_700B7B8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x0700B7B8, symbol: D_TI1_700B7B8 } -D_TI1_700B9C0: - { type: GFX, offset: 0x700B9C0, symbol: D_TI1_700B9C0 } +aTi1FekudaGun1DL: + { type: GFX, offset: 0x700B9C0, symbol: aTi1FekudaGun1DL } D_TI1_700BB10: { type: GFX, offset: 0x700BB10, symbol: D_TI1_700BB10 } @@ -197,8 +197,8 @@ D_TI1_700BFB0: D_TI1_700C3B0: { type: TEXTURE, ctype: u16, format: TLUT, colors: 128, offset: 0x0700C3B0, symbol: D_TI1_700C3B0 } -D_TI1_700C4B0: - { type: GFX, offset: 0x700C4B0, symbol: D_TI1_700C4B0 } +aTi1FekudaDL: + { type: GFX, offset: 0x700C4B0, symbol: aTi1FekudaDL } aTi1DesertRoverAnim: { type: SF64:ANIM, offset: 0x700C8D8, symbol: aTi1DesertRoverAnim } @@ -206,8 +206,8 @@ aTi1DesertRoverAnim: aTi1DesertRoverSkel: { type: SF64:SKELETON, offset: 0x700C964, symbol: aTi1DesertRoverSkel } -D_TI1_700C980: - { type: GFX, offset: 0x700C980, symbol: D_TI1_700C980 } +aTi1FekudaGun2DL: + { type: GFX, offset: 0x700C980, symbol: aTi1FekudaGun2DL } D_TI1_700CAF4: { type: SF64:ANIM, offset: 0x700CAF4, symbol: D_TI1_700CAF4} @@ -215,8 +215,8 @@ D_TI1_700CAF4: D_TI1_700CB60: {type: SF64:SKELETON, offset: 0x700CB60, symbol: D_TI1_700CB60} -D_TI1_700D534: - { type: SF64:ANIM, offset: 0x700D534, symbol: D_TI1_700D534 } +aTiRascoAnim: + { type: SF64:ANIM, offset: 0x700D534, symbol: aTiRascoAnim } aTiRascoSkel: {type: SF64:SKELETON, offset: 0x700D700, symbol: aTiRascoSkel} @@ -257,8 +257,8 @@ D_TI1_700E030: D_TI1_700E1E8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x0700E1E8, symbol: D_TI1_700E1E8 } -D_TI1_700E3F0: - { type: GFX, offset: 0x700E3F0, symbol: D_TI1_700E3F0 } +aTiBoulderDL: + { type: GFX, offset: 0x700E3F0, symbol: aTiBoulderDL } D_TI1_700E858: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x0700E858, symbol: D_TI1_700E858 } diff --git a/assets/yaml/jp/rev0/ast_aquas.yaml b/assets/yaml/jp/rev0/ast_aquas.yaml index 437296fb..7140515e 100644 --- a/assets/yaml/jp/rev0/ast_aquas.yaml +++ b/assets/yaml/jp/rev0/ast_aquas.yaml @@ -16,11 +16,11 @@ D_AQ_6000000: { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 13, offset: 0x6000000, symbol: D_AQ_6000000 } -D_AQ_6000AE4: - { type: SF64:ANIM, offset: 0x6000AE4, symbol: D_AQ_6000AE4 } +aAqSquidAnim: + { type: SF64:ANIM, offset: 0x6000AE4, symbol: aAqSquidAnim } -D_AQ_6000DB0: - { type: SF64:SKELETON, offset: 0x6000DB0, symbol: D_AQ_6000DB0 } +aAqSquidSkel: + { type: SF64:SKELETON, offset: 0x6000DB0, symbol: aAqSquidSkel } D_AQ_6000E10: { type: GFX, offset: 0x6000E10, symbol: D_AQ_6000E10 } @@ -28,11 +28,11 @@ D_AQ_6000E10: D_AQ_6001130: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6001130, symbol: D_AQ_6001130 } -D_AQ_6002628: - { type: SF64:ANIM, offset: 0x6002628, symbol: D_AQ_6002628 } +aAqAnglerFishAnim: + { type: SF64:ANIM, offset: 0x6002628, symbol: aAqAnglerFishAnim } -D_AQ_6002874: - { type: SF64:SKELETON, offset: 0x6002874, symbol: D_AQ_6002874 } +aAqAnglerFishSkel: + { type: SF64:SKELETON, offset: 0x6002874, symbol: aAqAnglerFishSkel } # aAqOysterDL: @@ -65,11 +65,11 @@ D_AQ_6004DB0: D_AQ_60050F0: { type: GFX, offset: 0x60050F0, symbol: D_AQ_60050F0 } -D_AQ_6005954: - { type: SF64:ANIM, offset: 0x6005954, symbol: D_AQ_6005954 } +aAqSculpinAnim: + { type: SF64:ANIM, offset: 0x6005954, symbol: aAqSculpinAnim } -D_AQ_6005A80: - { type: SF64:SKELETON, offset: 0x6005A80, symbol: D_AQ_6005A80 } +aAqSculpinSkel: + { type: SF64:SKELETON, offset: 0x6005A80, symbol: aAqSculpinSkel } D_AQ_6006160: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6006160, symbol: D_AQ_6006160 } @@ -413,8 +413,8 @@ D_AQ_601FD70: D_AQ_6020A40: { type: SF64:ANIM, offset: 0x6020A40, symbol: D_AQ_6020A40 } -D_AQ_6020C6C: - { type: SF64:SKELETON, offset: 0x6020C6C, symbol: D_AQ_6020C6C } +aAqSeaweedSkel: + { type: SF64:SKELETON, offset: 0x6020C6C, symbol: aAqSeaweedSkel } D_AQ_6021058: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6021058, symbol: D_AQ_6021058 } @@ -488,14 +488,14 @@ aAqPearlDL: D_AQ_6024F80: { type: SF64:ANIM, offset: 0x6024F80, symbol: D_AQ_6024F80 } -D_AQ_602512C: - { type: SF64:SKELETON, offset: 0x602512C, symbol: D_AQ_602512C } +aAqGaroaSkel: + { type: SF64:SKELETON, offset: 0x602512C, symbol: aAqGaroaSkel } -D_AQ_60260EC: - { type: SF64:ANIM, offset: 0x60260EC, symbol: D_AQ_60260EC } +aAqSpindlyFishAnim: + { type: SF64:ANIM, offset: 0x60260EC, symbol: aAqSpindlyFishAnim } -D_AQ_60263F8: - { type: SF64:SKELETON, offset: 0x60263F8, symbol: D_AQ_60263F8 } +aAqSpindlyFishSkel: + { type: SF64:SKELETON, offset: 0x60263F8, symbol: aAqSpindlyFishSkel } D_AQ_6026460: { type: GFX, offset: 0x6026460, symbol: D_AQ_6026460 } diff --git a/assets/yaml/jp/rev0/ast_bolse.yaml b/assets/yaml/jp/rev0/ast_bolse.yaml index 8f033e51..a1c3c57b 100644 --- a/assets/yaml/jp/rev0/ast_bolse.yaml +++ b/assets/yaml/jp/rev0/ast_bolse.yaml @@ -25,11 +25,11 @@ D_BO_6000D80: D_BO_6001908: { type: TEXTURE, format: RGBA16, offset: 0x6001908, width: 16, height: 16, ctype: u16, symbol: D_BO_6001908 } -D_BO_6001C64: - { type: SF64:ANIM, offset: 0x6001C64, symbol: D_BO_6001C64 } +aBoBaseCoreAnim: + { type: SF64:ANIM, offset: 0x6001C64, symbol: aBoBaseCoreAnim } -D_BO_6001FB0: - { type: SF64:SKELETON, offset: 0x6001FB0, symbol: D_BO_6001FB0 } +aBoBaseCoreSkel: + { type: SF64:SKELETON, offset: 0x6001FB0, symbol: aBoBaseCoreSkel } D_BO_6002020: { type: GFX, offset: 0x6002020, symbol: D_BO_6002020 } diff --git a/assets/yaml/jp/rev0/ast_common.yaml b/assets/yaml/jp/rev0/ast_common.yaml index 66c29972..c35f3bba 100644 --- a/assets/yaml/jp/rev0/ast_common.yaml +++ b/assets/yaml/jp/rev0/ast_common.yaml @@ -494,8 +494,8 @@ D_1017698: D_1017798: { type: TEXTURE, format: TLUT, colors: 16, offset: 0x1017798, ctype: u16, symbol: D_1017798 } -D_10177C0: - { type: GFX, offset: 0x10177C0, symbol: D_10177C0 } +aActorSuppliesDL: + { type: GFX, offset: 0x10177C0, symbol: aActorSuppliesDL } D_1017A38: { type: TEXTURE, format: RGBA16, width: 32, height: 32, ctype: u16, offset: 0x1017A38, symbol: D_1017A38 } diff --git a/assets/yaml/jp/rev0/ast_corneria.yaml b/assets/yaml/jp/rev0/ast_corneria.yaml index 0ae734bc..a037337a 100644 --- a/assets/yaml/jp/rev0/ast_corneria.yaml +++ b/assets/yaml/jp/rev0/ast_corneria.yaml @@ -240,8 +240,8 @@ aCoArch1DL: D_CO_6020760: { type: GFX, offset: 0x6020760, symbol: D_CO_6020760 } -D_CO_6020B40: - { type: GFX, offset: 0x6020B40, symbol: D_CO_6020B40 } +aCoRadarDL: + { type: GFX, offset: 0x6020B40, symbol: aCoRadarDL } D_CO_6021188: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06021188, symbol: D_CO_6021188 } @@ -279,11 +279,11 @@ D_CO_6028260: D_CO_6028A60: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06028A60, symbol: D_CO_6028A60 } -D_CO_6029528: - { type: SF64:ANIM, offset: 0x6029528, symbol: D_CO_6029528 } +aCoSkibotAnim: + { type: SF64:ANIM, offset: 0x6029528, symbol: aCoSkibotAnim } -D_CO_6029674: - { type: SF64:SKELETON, offset: 0x6029674, symbol: D_CO_6029674 } +aCoSkibotSkel: + { type: SF64:SKELETON, offset: 0x6029674, symbol: aCoSkibotSkel } aCoGaruda1Anim: { type: SF64:ANIM, offset: 0x602991C, symbol: aCoGaruda1Anim } @@ -306,8 +306,8 @@ aCoDoorsSkel: aCoGrangaWalkingAnim: { type: SF64:ANIM, offset: 0x602BC18, symbol: aCoGrangaWalkingAnim } -D_CO_602BE64: - { type: SF64:SKELETON, offset: 0x602BE64, symbol: D_CO_602BE64 } +aCoGrangaSkel: + { type: SF64:SKELETON, offset: 0x602BE64, symbol: aCoGrangaSkel } aCoGrangaStationaryAnim: { type: SF64:ANIM, offset: 0x602C0D0, symbol: aCoGrangaStationaryAnim } diff --git a/assets/yaml/jp/rev0/ast_enmy_space.yaml b/assets/yaml/jp/rev0/ast_enmy_space.yaml index 3ad506ea..af0fd04e 100644 --- a/assets/yaml/jp/rev0/ast_enmy_space.yaml +++ b/assets/yaml/jp/rev0/ast_enmy_space.yaml @@ -14,8 +14,8 @@ D_ENMY_SPACE_4000080: D_ENMY_SPACE_400014C: { type: SF64:SKELETON, offset: 0x400014C, symbol: D_ENMY_SPACE_400014C } -D_ENMY_SPACE_4000170: - { type: GFX, offset: 0x4000170, symbol: D_ENMY_SPACE_4000170 } +aEnmySpMeMora1DL: + { type: GFX, offset: 0x4000170, symbol: aEnmySpMeMora1DL } D_ENMY_SPACE_4000650: { type: GFX, offset: 0x4000650, symbol: D_ENMY_SPACE_4000650 } @@ -89,8 +89,8 @@ D_ENMY_SPACE_4007870: D_ENMY_SPACE_4006FE8: { type: TEXTURE, format: RGBA16, offset: 0x4006FE8, width: 32, height: 32, ctype: u16, symbol: D_ENMY_SPACE_4006FE8 } -D_ENMY_SPACE_40084D0: - { type: GFX, offset: 0x40084D0, symbol: D_ENMY_SPACE_40084D0 } +aEnmySpMeMora2DL: + { type: GFX, offset: 0x40084D0, symbol: aEnmySpMeMora2DL } D_ENMY_SPACE_4008550: { type: TEXTURE, format: RGBA16, offset: 0x04008550, width: 32, height: 32, ctype: u16, symbol: D_ENMY_SPACE_4008550 } @@ -116,8 +116,8 @@ D_ENMY_SPACE_400A30C: D_ENMY_SPACE_400A398: { type: SF64:SKELETON, offset: 0x400A398, symbol: D_ENMY_SPACE_400A398 } -D_ENMY_SPACE_400A630: - { type: GFX, offset: 0x400A630, symbol: D_ENMY_SPACE_400A630 } +aEnmySpMeMora3DL: + { type: GFX, offset: 0x400A630, symbol: aEnmySpMeMora3DL } D_ENMY_SPACE_400AAE0: diff --git a/assets/yaml/jp/rev0/ast_fortuna.yaml b/assets/yaml/jp/rev0/ast_fortuna.yaml index bf24079b..5e9c029f 100644 --- a/assets/yaml/jp/rev0/ast_fortuna.yaml +++ b/assets/yaml/jp/rev0/ast_fortuna.yaml @@ -32,8 +32,8 @@ D_FO_6002090: D_FO_6002890: { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6002890, ctype: u16, symbol: D_FO_6002890 } -D_FO_6003090: - { type: GFX, offset: 0x6003090, symbol: D_FO_6003090 } +aFoBaseDL2: + { type: GFX, offset: 0x6003090, symbol: aFoBaseDL2 } D_FO_6003EC0: { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6003EC0, ctype: u16, symbol: D_FO_6003EC0 } @@ -131,8 +131,8 @@ D_FO_600B5C0: D_FO_600C5C0: { type: TEXTURE, format: RGBA16, width: 64, height: 32, offset: 0x600C5C0, ctype: u16, symbol: D_FO_600C5C0 } -D_FO_600D5C0: - { type: GFX, offset: 0x600D5C0, symbol: D_FO_600D5C0 } +aFoBaseDL1: + { type: GFX, offset: 0x600D5C0, symbol: aFoBaseDL1 } D_FO_600D7E8: { type: TEXTURE, format: RGBA16, width: 16, height: 16, offset: 0x600D7E8, ctype: u16, symbol: D_FO_600D7E8 } diff --git a/assets/yaml/jp/rev0/ast_great_fox.yaml b/assets/yaml/jp/rev0/ast_great_fox.yaml index eecfe756..6a0a0ff1 100644 --- a/assets/yaml/jp/rev0/ast_great_fox.yaml +++ b/assets/yaml/jp/rev0/ast_great_fox.yaml @@ -9,8 +9,8 @@ - '#include "sf64object.h"' # Great Fox Model -D_GREAT_FOX_E000000: - { type: GFX, offset: 0xE000000, symbol: D_GREAT_FOX_E000000 } +aGreatFoxIntactDL: + { type: GFX, offset: 0xE000000, symbol: aGreatFoxIntactDL } D_GREAT_FOX_E0094B0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0E0094B0, symbol: D_GREAT_FOX_E0094B0 } @@ -50,8 +50,8 @@ D_GREAT_FOX_E007430: { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x0E007430, symbol: D_GREAT_FOX_E007430 } # Great Fox Model (damaged) -D_GREAT_FOX_E003AB0: - { type: GFX, offset: 0xE003AB0, symbol: D_GREAT_FOX_E003AB0 } +aGreatFoxDamagedDL: + { type: GFX, offset: 0xE003AB0, symbol: aGreatFoxDamagedDL } D_GREAT_FOX_E0074B0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x0E0074B0, symbol: D_GREAT_FOX_E0074B0 } diff --git a/assets/yaml/jp/rev0/ast_macbeth.yaml b/assets/yaml/jp/rev0/ast_macbeth.yaml index 596eaf65..2209552e 100644 --- a/assets/yaml/jp/rev0/ast_macbeth.yaml +++ b/assets/yaml/jp/rev0/ast_macbeth.yaml @@ -433,8 +433,8 @@ D_MA_6019220: D_MA_60192B0: {type: TEXTURE, format: RGBA16, ctype: u16, width: 64, height: 32, offset: 0x60192B0, symbol: D_MA_60192B0} -D_MA_601A2B0: - {type: GFX, offset: 0x601A2B0, symbol: D_MA_601A2B0} +aMaBoulderDL: + {type: GFX, offset: 0x601A2B0, symbol: aMaBoulderDL} D_MA_601A5E8: { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x601A5E8, symbol: D_MA_601A5E8, tlut: 0x601A6E8} @@ -904,8 +904,8 @@ aMaProximityLightHitbox: aMaBarrierHitbox: {type: SF64:HITBOX, offset: 0x6036728, symbol: aMaBarrierHitbox} -aMaActor219Hitbox: - {type: SF64:HITBOX, offset: 0x6036744, symbol: aMaActor219Hitbox} +aMaFallingBoulderHitbox: + {type: SF64:HITBOX, offset: 0x6036744, symbol: aMaFallingBoulderHitbox} aMaFloor6Hitbox: {type: SF64:HITBOX, offset: 0x6036760, symbol: aMaFloor6Hitbox} diff --git a/assets/yaml/jp/rev0/ast_meteo.yaml b/assets/yaml/jp/rev0/ast_meteo.yaml index 0b2c9796..c6bd7384 100644 --- a/assets/yaml/jp/rev0/ast_meteo.yaml +++ b/assets/yaml/jp/rev0/ast_meteo.yaml @@ -182,11 +182,11 @@ D_ME_601C8E0: D_ME_601D800: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x0601D800, symbol: D_ME_601D800 } -D_ME_601E8C4: - { type: SF64:ANIM, offset: 0x601E8C4, symbol: D_ME_601E8C4 } +aMeHopBotAnim: + { type: SF64:ANIM, offset: 0x601E8C4, symbol: aMeHopBotAnim } -D_ME_601E9D0: - { type: SF64:SKELETON, offset: 0x601E9D0, symbol: D_ME_601E9D0 } +aMeHopBotSkel: + { type: SF64:SKELETON, offset: 0x601E9D0, symbol: aMeHopBotSkel } # Beta Meteo background, unused D_ME_601EA00: @@ -253,8 +253,8 @@ aMeMolarRockDL: { type: GFX, offset: 0x06024B60, symbol: aMeMolarRockDL } # Unused Meteo Ball -D_ME_6025B50: - { type: GFX, offset: 0x06025B50, symbol: D_ME_6025B50 } +aMeMeteoBallDL: + { type: GFX, offset: 0x06025B50, symbol: aMeMeteoBallDL } D_ME_6025350: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6025350, symbol: D_ME_6025350 } diff --git a/assets/yaml/jp/rev0/ast_sector_x.yaml b/assets/yaml/jp/rev0/ast_sector_x.yaml index 77373c91..6cef80a6 100644 --- a/assets/yaml/jp/rev0/ast_sector_x.yaml +++ b/assets/yaml/jp/rev0/ast_sector_x.yaml @@ -186,8 +186,8 @@ D_SX_601C690: D_SX_60206DC: { type: SF64:ANIM, offset: 0x60206DC, symbol: D_SX_60206DC } -D_SX_6020C68: - { type: SF64:SKELETON, offset: 0x6020C68, symbol: D_SX_6020C68 } +aSxSpyborgSkel: + { type: SF64:SKELETON, offset: 0x6020C68, symbol: aSxSpyborgSkel } D_SX_6020D20: { type: GFX, offset: 0x6020D20, symbol: D_SX_6020D20 } diff --git a/assets/yaml/jp/rev0/ast_sector_z.yaml b/assets/yaml/jp/rev0/ast_sector_z.yaml index 7357255e..112044ad 100644 --- a/assets/yaml/jp/rev0/ast_sector_z.yaml +++ b/assets/yaml/jp/rev0/ast_sector_z.yaml @@ -97,8 +97,8 @@ D_SZ_6004558: D_SZ_6004570: { type: GFX, offset: 0x6004570, symbol: D_SZ_6004570 } -aSZSpaceJunk4DL: - { type: GFX, offset: 0x60045E0, symbol: aSZSpaceJunk4DL } +aSzSpaceJunk4DL: + { type: GFX, offset: 0x60045E0, symbol: aSzSpaceJunk4DL } D_SZ_60047E0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60047E0, symbol: D_SZ_60047E0 } diff --git a/assets/yaml/jp/rev0/ast_solar.yaml b/assets/yaml/jp/rev0/ast_solar.yaml index 610b9598..d5c5aa0a 100644 --- a/assets/yaml/jp/rev0/ast_solar.yaml +++ b/assets/yaml/jp/rev0/ast_solar.yaml @@ -127,8 +127,8 @@ D_SO_60151A0: D_SO_6015810: { type: GFX, offset: 0x6015810, symbol: D_SO_6015810} -D_SO_6016CF0: - { type: GFX, offset: 0x6016CF0, symbol: D_SO_6016CF0} +aSoRock3DL: + { type: GFX, offset: 0x6016CF0, symbol: aSoRock3DL} D_SO_6016F08: { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x6016F08, symbol: D_SO_6016F08} @@ -136,8 +136,8 @@ D_SO_6016F08: D_SO_6017008: { type: TEXTURE, ctype: u16, format: TLUT, colors: 64, offset: 0x6017008, symbol: D_SO_6017008} -D_SO_6017090: - { type: GFX, offset: 0x6017090, symbol: D_SO_6017090} +aSoRock2DL: + { type: GFX, offset: 0x6017090, symbol: aSoRock2DL} D_SO_6017200: { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x6017200, symbol: D_SO_6017200} @@ -145,8 +145,8 @@ D_SO_6017200: D_SO_6017300: { type: TEXTURE, ctype: u16, format: TLUT, colors: 56, offset: 0x6017300, symbol: D_SO_6017300} -D_SO_6017370: - { type: GFX, offset: 0x6017370, symbol: D_SO_6017370} +aSoRock1DL: + { type: GFX, offset: 0x6017370, symbol: aSoRock1DL} D_SO_60174E0: { type: TEXTURE, ctype: u8, format: CI8, width: 8, height: 8, offset: 0x60174E0, symbol: D_SO_60174E0} diff --git a/assets/yaml/jp/rev0/ast_ve1_boss.yaml b/assets/yaml/jp/rev0/ast_ve1_boss.yaml index a5d6a967..436fc334 100644 --- a/assets/yaml/jp/rev0/ast_ve1_boss.yaml +++ b/assets/yaml/jp/rev0/ast_ve1_boss.yaml @@ -95,8 +95,8 @@ D_VE1_900C700: aVe1MonkeyStatueAnim: {type: SF64:ANIM, offset: 0x900D098, symbol: aVe1MonkeyStatueAnim} -D_VE1_900D164: - {type: SF64:SKELETON, offset: 0x900D164, symbol: D_VE1_900D164} +aVe1MonkeyStatueSkel: + {type: SF64:SKELETON, offset: 0x900D164, symbol: aVe1MonkeyStatueSkel} D_VE1_900D180: {type: GFX, offset: 0x900D180, symbol: D_VE1_900D180} diff --git a/assets/yaml/jp/rev0/ast_venom_2.yaml b/assets/yaml/jp/rev0/ast_venom_2.yaml index 8f644d57..c1f15a4b 100644 --- a/assets/yaml/jp/rev0/ast_venom_2.yaml +++ b/assets/yaml/jp/rev0/ast_venom_2.yaml @@ -66,8 +66,8 @@ D_VE2_6006E20: D_VE2_6007650: { type: GFX, offset: 0x6007650, symbol: D_VE2_6007650 } -D_VE2_6007E20: - { type: GFX, offset: 0x6007E20, symbol: D_VE2_6007E20 } +aAndLaserEmitterDL: + { type: GFX, offset: 0x6007E20, symbol: aAndLaserEmitterDL } D_VE2_6008170: { type: TEXTURE, format: RGBA16, width: 16, height: 16, offset: 0x6008170, ctype: u16, symbol: D_VE2_6008170 } @@ -78,8 +78,8 @@ aVe2TowerDL: D_VE2_6008AF8: { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6008AF8, ctype: u16, symbol: D_VE2_6008AF8 } -D_VE2_6009300: - { type: GFX, offset: 0x6009300, symbol: D_VE2_6009300 } +aAndBrainWasteDL: + { type: GFX, offset: 0x6009300, symbol: aAndBrainWasteDL } D_VE2_6009390: { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6009390, ctype: u16, symbol: D_VE2_6009390 } @@ -180,11 +180,11 @@ D_VE2_6014658: D_VE2_6014844: { type: SF64:SKELETON, offset: 0x6014844, symbol: D_VE2_6014844 } -D_VE2_6014904: - { type: SF64:ANIM, offset: 0x6014904, symbol: D_VE2_6014904 } +aVe2BaseAnim: + { type: SF64:ANIM, offset: 0x6014904, symbol: aVe2BaseAnim } -D_VE2_60149D0: - { type: SF64:SKELETON, offset: 0x60149D0, symbol: D_VE2_60149D0 } +aVe2BaseSkel: + { type: SF64:SKELETON, offset: 0x60149D0, symbol: aVe2BaseSkel } D_VE2_6014D50: { type: SF64:ENVIRONMENT, offset: 0x6014D50, symbol: D_VE2_6014D50 } diff --git a/assets/yaml/jp/rev0/ast_zoness.yaml b/assets/yaml/jp/rev0/ast_zoness.yaml index 1dd6ae6a..f61f560b 100644 --- a/assets/yaml/jp/rev0/ast_zoness.yaml +++ b/assets/yaml/jp/rev0/ast_zoness.yaml @@ -24,8 +24,8 @@ D_ZO_6000E98: D_ZO_6001098: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6001098, symbol: D_ZO_6001098} -D_ZO_60012A0: - { type: GFX, offset: 0x60012A0, symbol: D_ZO_60012A0} +aZoDodoraHeadDL: + { type: GFX, offset: 0x60012A0, symbol: aZoDodoraHeadDL} D_ZO_6001810: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6001810, symbol: D_ZO_6001810} @@ -135,11 +135,11 @@ D_ZO_600C780: D_ZO_600D990: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x600D990, symbol: D_ZO_600D990} -D_ZO_600E5EC: - { type: SF64:ANIM, offset: 0x600E5EC, symbol: D_ZO_600E5EC} +aZoBirdAnim: + { type: SF64:ANIM, offset: 0x600E5EC, symbol: aZoBirdAnim} -D_ZO_600E7D8: - { type: SF64:SKELETON, offset: 0x600E7D8, symbol: D_ZO_600E7D8} +aZoBirdSkel: + { type: SF64:SKELETON, offset: 0x600E7D8, symbol: aZoBirdSkel} aZoOilRig3DL: { type: GFX, offset: 0x600E820, symbol: aZoOilRig3DL} @@ -273,8 +273,8 @@ D_ZO_6019738: D_ZO_601996C: { type: SF64:ANIM, offset: 0x601996C, symbol: D_ZO_601996C} -D_ZO_6019E18: - { type: SF64:SKELETON, offset: 0x6019E18, symbol: D_ZO_6019E18} +aZoSarumarineSkel: + { type: SF64:SKELETON, offset: 0x6019E18, symbol: aZoSarumarineSkel} D_ZO_6019EB0: { type: GFX, offset: 0x6019EB0, symbol: D_ZO_6019EB0} @@ -450,14 +450,14 @@ D_ZO_6023488: D_ZO_6023690: { type: GFX, offset: 0x6023690, symbol: D_ZO_6023690} -D_ZO_6023730: - { type: GFX, offset: 0x6023730, symbol: D_ZO_6023730} +aZoDodoraTailDL: + { type: GFX, offset: 0x6023730, symbol: aZoDodoraTailDL} D_ZO_60237E0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x60237E0, symbol: D_ZO_60237E0} -D_ZO_60239E0: - { type: GFX, offset: 0x60239E0, symbol: D_ZO_60239E0} +aZoDodoraBodyDL: + { type: GFX, offset: 0x60239E0, symbol: aZoDodoraBodyDL} D_ZO_6023D50: { type: GFX, offset: 0x6023D50, symbol: D_ZO_6023D50} diff --git a/assets/yaml/us/rev1/ast_7_ti_1.yaml b/assets/yaml/us/rev1/ast_7_ti_1.yaml index 53dd2d2c..c755070c 100644 --- a/assets/yaml/us/rev1/ast_7_ti_1.yaml +++ b/assets/yaml/us/rev1/ast_7_ti_1.yaml @@ -152,14 +152,14 @@ aTiDelphorDL: D_TI1_7009B58: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x07009B58, symbol: D_TI1_7009B58 } -D_TI1_7009D60: - { type: GFX, offset: 0x7009D60, symbol: D_TI1_7009D60 } +aTi1Bomb1DL: + { type: GFX, offset: 0x7009D60, symbol: aTi1Bomb1DL } D_TI1_700A190: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0700A190, symbol: D_TI1_700A190 } -aTi1BombDL: - { type: GFX, offset: 0x700A990, symbol: aTi1BombDL } +aTi1Bomb2DL: + { type: GFX, offset: 0x700A990, symbol: aTi1Bomb2DL } D_TI1_700AAD8: { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x700AAD8, symbol: D_TI1_700AAD8, tlut: 0x700AB58 } @@ -182,8 +182,8 @@ D_TI1_700B5B8: D_TI1_700B7B8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x0700B7B8, symbol: D_TI1_700B7B8 } -D_TI1_700B9C0: - { type: GFX, offset: 0x700B9C0, symbol: D_TI1_700B9C0 } +aTi1FekudaGun1DL: + { type: GFX, offset: 0x700B9C0, symbol: aTi1FekudaGun1DL } D_TI1_700BB10: { type: GFX, offset: 0x700BB10, symbol: D_TI1_700BB10 } @@ -197,8 +197,8 @@ D_TI1_700BFB0: D_TI1_700C3B0: { type: TEXTURE, ctype: u16, format: TLUT, colors: 128, offset: 0x0700C3B0, symbol: D_TI1_700C3B0 } -D_TI1_700C4B0: - { type: GFX, offset: 0x700C4B0, symbol: D_TI1_700C4B0 } +aTi1FekudaDL: + { type: GFX, offset: 0x700C4B0, symbol: aTi1FekudaDL } aTi1DesertRoverAnim: { type: SF64:ANIM, offset: 0x700C8D8, symbol: aTi1DesertRoverAnim } @@ -206,8 +206,8 @@ aTi1DesertRoverAnim: aTi1DesertRoverSkel: { type: SF64:SKELETON, offset: 0x700C964, symbol: aTi1DesertRoverSkel } -D_TI1_700C980: - { type: GFX, offset: 0x700C980, symbol: D_TI1_700C980 } +aTi1FekudaGun2DL: + { type: GFX, offset: 0x700C980, symbol: aTi1FekudaGun2DL } D_TI1_700CAF4: { type: SF64:ANIM, offset: 0x700CAF4, symbol: D_TI1_700CAF4} @@ -215,8 +215,8 @@ D_TI1_700CAF4: D_TI1_700CB60: {type: SF64:SKELETON, offset: 0x700CB60, symbol: D_TI1_700CB60} -D_TI1_700D534: - { type: SF64:ANIM, offset: 0x700D534, symbol: D_TI1_700D534 } +aTiRascoAnim: + { type: SF64:ANIM, offset: 0x700D534, symbol: aTiRascoAnim } aTiRascoSkel: {type: SF64:SKELETON, offset: 0x700D700, symbol: aTiRascoSkel} @@ -257,8 +257,8 @@ D_TI1_700E030: D_TI1_700E1E8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x0700E1E8, symbol: D_TI1_700E1E8 } -D_TI1_700E3F0: - { type: GFX, offset: 0x700E3F0, symbol: D_TI1_700E3F0 } +aTiBoulderDL: + { type: GFX, offset: 0x700E3F0, symbol: aTiBoulderDL } D_TI1_700E858: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x0700E858, symbol: D_TI1_700E858 } diff --git a/assets/yaml/us/rev1/ast_aquas.yaml b/assets/yaml/us/rev1/ast_aquas.yaml index 33d3d78b..b45cb0cd 100644 --- a/assets/yaml/us/rev1/ast_aquas.yaml +++ b/assets/yaml/us/rev1/ast_aquas.yaml @@ -16,11 +16,11 @@ D_AQ_6000000: { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 13, offset: 0x6000000, symbol: D_AQ_6000000 } -D_AQ_6000AE4: - { type: SF64:ANIM, offset: 0x6000AE4, symbol: D_AQ_6000AE4 } +aAqSquidAnim: + { type: SF64:ANIM, offset: 0x6000AE4, symbol: aAqSquidAnim } -D_AQ_6000DB0: - { type: SF64:SKELETON, offset: 0x6000DB0, symbol: D_AQ_6000DB0 } +aAqSquidSkel: + { type: SF64:SKELETON, offset: 0x6000DB0, symbol: aAqSquidSkel } D_AQ_6000E10: { type: GFX, offset: 0x6000E10, symbol: D_AQ_6000E10 } @@ -28,11 +28,11 @@ D_AQ_6000E10: D_AQ_6001130: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6001130, symbol: D_AQ_6001130 } -D_AQ_6002628: - { type: SF64:ANIM, offset: 0x6002628, symbol: D_AQ_6002628 } +aAqAnglerFishAnim: + { type: SF64:ANIM, offset: 0x6002628, symbol: aAqAnglerFishAnim } -D_AQ_6002874: - { type: SF64:SKELETON, offset: 0x6002874, symbol: D_AQ_6002874 } +aAqAnglerFishSkel: + { type: SF64:SKELETON, offset: 0x6002874, symbol: aAqAnglerFishSkel } # aAqOysterDL: @@ -65,11 +65,11 @@ D_AQ_6004DB0: D_AQ_60050F0: { type: GFX, offset: 0x60050F0, symbol: D_AQ_60050F0 } -D_AQ_6005954: - { type: SF64:ANIM, offset: 0x6005954, symbol: D_AQ_6005954 } +aAqSculpinAnim: + { type: SF64:ANIM, offset: 0x6005954, symbol: aAqSculpinAnim } -D_AQ_6005A80: - { type: SF64:SKELETON, offset: 0x6005A80, symbol: D_AQ_6005A80 } +aAqSculpinSkel: + { type: SF64:SKELETON, offset: 0x6005A80, symbol: aAqSculpinSkel } D_AQ_6006160: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6006160, symbol: D_AQ_6006160 } @@ -413,8 +413,8 @@ D_AQ_601FD70: D_AQ_6020A40: { type: SF64:ANIM, offset: 0x6020A40, symbol: D_AQ_6020A40 } -D_AQ_6020C6C: - { type: SF64:SKELETON, offset: 0x6020C6C, symbol: D_AQ_6020C6C } +aAqSeaweedSkel: + { type: SF64:SKELETON, offset: 0x6020C6C, symbol: aAqSeaweedSkel } D_AQ_6021058: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6021058, symbol: D_AQ_6021058 } @@ -488,14 +488,14 @@ aAqPearlDL: D_AQ_6024F80: { type: SF64:ANIM, offset: 0x6024F80, symbol: D_AQ_6024F80 } -D_AQ_602512C: - { type: SF64:SKELETON, offset: 0x602512C, symbol: D_AQ_602512C } +aAqGaroaSkel: + { type: SF64:SKELETON, offset: 0x602512C, symbol: aAqGaroaSkel } -D_AQ_60260EC: - { type: SF64:ANIM, offset: 0x60260EC, symbol: D_AQ_60260EC } +aAqSpindlyFishAnim: + { type: SF64:ANIM, offset: 0x60260EC, symbol: aAqSpindlyFishAnim } -D_AQ_60263F8: - { type: SF64:SKELETON, offset: 0x60263F8, symbol: D_AQ_60263F8 } +aAqSpindlyFishSkel: + { type: SF64:SKELETON, offset: 0x60263F8, symbol: aAqSpindlyFishSkel } D_AQ_6026460: { type: GFX, offset: 0x6026460, symbol: D_AQ_6026460 } diff --git a/assets/yaml/us/rev1/ast_bolse.yaml b/assets/yaml/us/rev1/ast_bolse.yaml index ff8e45e5..40808dd0 100644 --- a/assets/yaml/us/rev1/ast_bolse.yaml +++ b/assets/yaml/us/rev1/ast_bolse.yaml @@ -25,11 +25,11 @@ D_BO_6000D80: D_BO_6001908: { type: TEXTURE, format: RGBA16, offset: 0x6001908, width: 16, height: 16, ctype: u16, symbol: D_BO_6001908 } -D_BO_6001C64: - { type: SF64:ANIM, offset: 0x6001C64, symbol: D_BO_6001C64 } +aBoBaseCoreAnim: + { type: SF64:ANIM, offset: 0x6001C64, symbol: aBoBaseCoreAnim } -D_BO_6001FB0: - { type: SF64:SKELETON, offset: 0x6001FB0, symbol: D_BO_6001FB0 } +aBoBaseCoreSkel: + { type: SF64:SKELETON, offset: 0x6001FB0, symbol: aBoBaseCoreSkel } D_BO_6002020: { type: GFX, offset: 0x6002020, symbol: D_BO_6002020 } diff --git a/assets/yaml/us/rev1/ast_common.yaml b/assets/yaml/us/rev1/ast_common.yaml index dbd1724d..81a615f3 100644 --- a/assets/yaml/us/rev1/ast_common.yaml +++ b/assets/yaml/us/rev1/ast_common.yaml @@ -494,8 +494,8 @@ D_1017698: D_1017798: { type: TEXTURE, format: TLUT, colors: 16, offset: 0x1017798, ctype: u16, symbol: D_1017798 } -D_10177C0: - { type: GFX, offset: 0x10177C0, symbol: D_10177C0 } +aActorSuppliesDL: + { type: GFX, offset: 0x10177C0, symbol: aActorSuppliesDL } D_1017A38: { type: TEXTURE, format: RGBA16, width: 32, height: 32, ctype: u16, offset: 0x1017A38, symbol: D_1017A38 } diff --git a/assets/yaml/us/rev1/ast_corneria.yaml b/assets/yaml/us/rev1/ast_corneria.yaml index 54525ff1..424a0f8c 100644 --- a/assets/yaml/us/rev1/ast_corneria.yaml +++ b/assets/yaml/us/rev1/ast_corneria.yaml @@ -240,8 +240,8 @@ aCoArch1DL: D_CO_6020760: { type: GFX, offset: 0x6020760, symbol: D_CO_6020760 } -D_CO_6020B40: - { type: GFX, offset: 0x6020B40, symbol: D_CO_6020B40 } +aCoRadarDL: + { type: GFX, offset: 0x6020B40, symbol: aCoRadarDL } D_CO_6021188: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06021188, symbol: D_CO_6021188 } @@ -279,11 +279,11 @@ D_CO_6028260: D_CO_6028A60: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06028A60, symbol: D_CO_6028A60 } -D_CO_6029528: - { type: SF64:ANIM, offset: 0x6029528, symbol: D_CO_6029528 } +aCoSkibotAnim: + { type: SF64:ANIM, offset: 0x6029528, symbol: aCoSkibotAnim } -D_CO_6029674: - { type: SF64:SKELETON, offset: 0x6029674, symbol: D_CO_6029674 } +aCoSkibotSkel: + { type: SF64:SKELETON, offset: 0x6029674, symbol: aCoSkibotSkel } aCoGaruda1Anim: { type: SF64:ANIM, offset: 0x602991C, symbol: aCoGaruda1Anim } @@ -306,8 +306,8 @@ aCoDoorsSkel: aCoGrangaWalkingAnim: { type: SF64:ANIM, offset: 0x602BC18, symbol: aCoGrangaWalkingAnim } -D_CO_602BE64: - { type: SF64:SKELETON, offset: 0x602BE64, symbol: D_CO_602BE64 } +aCoGrangaSkel: + { type: SF64:SKELETON, offset: 0x602BE64, symbol: aCoGrangaSkel } aCoGrangaStationaryAnim: { type: SF64:ANIM, offset: 0x602C0D0, symbol: aCoGrangaStationaryAnim } diff --git a/assets/yaml/us/rev1/ast_enmy_space.yaml b/assets/yaml/us/rev1/ast_enmy_space.yaml index 9bfb991f..0b4663af 100644 --- a/assets/yaml/us/rev1/ast_enmy_space.yaml +++ b/assets/yaml/us/rev1/ast_enmy_space.yaml @@ -14,8 +14,8 @@ D_ENMY_SPACE_4000080: D_ENMY_SPACE_400014C: { type: SF64:SKELETON, offset: 0x400014C, symbol: D_ENMY_SPACE_400014C } -D_ENMY_SPACE_4000170: - { type: GFX, offset: 0x4000170, symbol: D_ENMY_SPACE_4000170 } +aEnmySpMeMora1DL: + { type: GFX, offset: 0x4000170, symbol: aEnmySpMeMora1DL } D_ENMY_SPACE_4000650: { type: GFX, offset: 0x4000650, symbol: D_ENMY_SPACE_4000650 } @@ -89,8 +89,8 @@ D_ENMY_SPACE_4007870: D_ENMY_SPACE_4006FE8: { type: TEXTURE, format: RGBA16, offset: 0x4006FE8, width: 32, height: 32, ctype: u16, symbol: D_ENMY_SPACE_4006FE8 } -D_ENMY_SPACE_40084D0: - { type: GFX, offset: 0x40084D0, symbol: D_ENMY_SPACE_40084D0 } +aEnmySpMeMora2DL: + { type: GFX, offset: 0x40084D0, symbol: aEnmySpMeMora2DL } D_ENMY_SPACE_4008550: { type: TEXTURE, format: RGBA16, offset: 0x04008550, width: 32, height: 32, ctype: u16, symbol: D_ENMY_SPACE_4008550 } @@ -116,8 +116,8 @@ D_ENMY_SPACE_400A30C: D_ENMY_SPACE_400A398: { type: SF64:SKELETON, offset: 0x400A398, symbol: D_ENMY_SPACE_400A398 } -D_ENMY_SPACE_400A630: - { type: GFX, offset: 0x400A630, symbol: D_ENMY_SPACE_400A630 } +aEnmySpMeMora3DL: + { type: GFX, offset: 0x400A630, symbol: aEnmySpMeMora3DL } D_ENMY_SPACE_400AAE0: diff --git a/assets/yaml/us/rev1/ast_fortuna.yaml b/assets/yaml/us/rev1/ast_fortuna.yaml index 46466a80..81adb759 100644 --- a/assets/yaml/us/rev1/ast_fortuna.yaml +++ b/assets/yaml/us/rev1/ast_fortuna.yaml @@ -32,8 +32,8 @@ D_FO_6002090: D_FO_6002890: { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6002890, ctype: u16, symbol: D_FO_6002890 } -D_FO_6003090: - { type: GFX, offset: 0x6003090, symbol: D_FO_6003090 } +aFoBaseDL2: + { type: GFX, offset: 0x6003090, symbol: aFoBaseDL2 } D_FO_6003EC0: { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6003EC0, ctype: u16, symbol: D_FO_6003EC0 } @@ -131,8 +131,8 @@ D_FO_600B5C0: D_FO_600C5C0: { type: TEXTURE, format: RGBA16, width: 64, height: 32, offset: 0x600C5C0, ctype: u16, symbol: D_FO_600C5C0 } -D_FO_600D5C0: - { type: GFX, offset: 0x600D5C0, symbol: D_FO_600D5C0 } +aFoBaseDL1: + { type: GFX, offset: 0x600D5C0, symbol: aFoBaseDL1 } D_FO_600D7E8: { type: TEXTURE, format: RGBA16, width: 16, height: 16, offset: 0x600D7E8, ctype: u16, symbol: D_FO_600D7E8 } diff --git a/assets/yaml/us/rev1/ast_great_fox.yaml b/assets/yaml/us/rev1/ast_great_fox.yaml index 03ad5207..e56b7b7f 100644 --- a/assets/yaml/us/rev1/ast_great_fox.yaml +++ b/assets/yaml/us/rev1/ast_great_fox.yaml @@ -9,8 +9,8 @@ - '#include "sf64object.h"' # Great Fox Model -D_GREAT_FOX_E000000: - { type: GFX, offset: 0xE000000, symbol: D_GREAT_FOX_E000000 } +aGreatFoxIntactDL: + { type: GFX, offset: 0xE000000, symbol: aGreatFoxIntactDL } D_GREAT_FOX_E0094B0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0E0094B0, symbol: D_GREAT_FOX_E0094B0 } @@ -50,8 +50,8 @@ D_GREAT_FOX_E007430: { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x0E007430, symbol: D_GREAT_FOX_E007430 } # Great Fox Model (damaged) -D_GREAT_FOX_E003AB0: - { type: GFX, offset: 0xE003AB0, symbol: D_GREAT_FOX_E003AB0 } +aGreatFoxDamagedDL: + { type: GFX, offset: 0xE003AB0, symbol: aGreatFoxDamagedDL } D_GREAT_FOX_E0074B0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x0E0074B0, symbol: D_GREAT_FOX_E0074B0 } diff --git a/assets/yaml/us/rev1/ast_macbeth.yaml b/assets/yaml/us/rev1/ast_macbeth.yaml index 2235bdb7..771ccfef 100644 --- a/assets/yaml/us/rev1/ast_macbeth.yaml +++ b/assets/yaml/us/rev1/ast_macbeth.yaml @@ -433,8 +433,8 @@ D_MA_6019220: D_MA_60192B0: {type: TEXTURE, format: RGBA16, ctype: u16, width: 64, height: 32, offset: 0x60192B0, symbol: D_MA_60192B0} -D_MA_601A2B0: - {type: GFX, offset: 0x601A2B0, symbol: D_MA_601A2B0} +aMaBoulderDL: + {type: GFX, offset: 0x601A2B0, symbol: aMaBoulderDL} D_MA_601A5E8: { type: TEXTURE, format: CI8, ctype: u8, width: 16, height: 16, offset: 0x601A5E8, symbol: D_MA_601A5E8, tlut: 0x601A6E8} @@ -904,8 +904,8 @@ aMaProximityLightHitbox: aMaBarrierHitbox: {type: SF64:HITBOX, offset: 0x6036728, symbol: aMaBarrierHitbox} -aMaActor219Hitbox: - {type: SF64:HITBOX, offset: 0x6036744, symbol: aMaActor219Hitbox} +aMaFallingBoulderHitbox: + {type: SF64:HITBOX, offset: 0x6036744, symbol: aMaFallingBoulderHitbox} aMaFloor6Hitbox: {type: SF64:HITBOX, offset: 0x6036760, symbol: aMaFloor6Hitbox} diff --git a/assets/yaml/us/rev1/ast_meteo.yaml b/assets/yaml/us/rev1/ast_meteo.yaml index 32e4a222..88d29573 100644 --- a/assets/yaml/us/rev1/ast_meteo.yaml +++ b/assets/yaml/us/rev1/ast_meteo.yaml @@ -182,11 +182,11 @@ D_ME_601C8E0: D_ME_601D800: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x0601D800, symbol: D_ME_601D800 } -D_ME_601E8C4: - { type: SF64:ANIM, offset: 0x601E8C4, symbol: D_ME_601E8C4 } +aMeHopBotAnim: + { type: SF64:ANIM, offset: 0x601E8C4, symbol: aMeHopBotAnim } -D_ME_601E9D0: - { type: SF64:SKELETON, offset: 0x601E9D0, symbol: D_ME_601E9D0 } +aMeHopBotSkel: + { type: SF64:SKELETON, offset: 0x601E9D0, symbol: aMeHopBotSkel } # Beta Meteo background, unused D_ME_601EA00: @@ -253,8 +253,8 @@ aMeMolarRockDL: { type: GFX, offset: 0x06024B60, symbol: aMeMolarRockDL } # Unused Meteo Ball -D_ME_6025B50: - { type: GFX, offset: 0x06025B50, symbol: D_ME_6025B50 } +aMeMeteoBallDL: + { type: GFX, offset: 0x06025B50, symbol: aMeMeteoBallDL } D_ME_6025350: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6025350, symbol: D_ME_6025350 } diff --git a/assets/yaml/us/rev1/ast_sector_x.yaml b/assets/yaml/us/rev1/ast_sector_x.yaml index 7dfa09e5..9faf8795 100644 --- a/assets/yaml/us/rev1/ast_sector_x.yaml +++ b/assets/yaml/us/rev1/ast_sector_x.yaml @@ -186,8 +186,8 @@ D_SX_601C690: D_SX_60206DC: { type: SF64:ANIM, offset: 0x60206DC, symbol: D_SX_60206DC } -D_SX_6020C68: - { type: SF64:SKELETON, offset: 0x6020C68, symbol: D_SX_6020C68 } +aSxSpyborgSkel: + { type: SF64:SKELETON, offset: 0x6020C68, symbol: aSxSpyborgSkel } D_SX_6020D20: { type: GFX, offset: 0x6020D20, symbol: D_SX_6020D20 } diff --git a/assets/yaml/us/rev1/ast_sector_z.yaml b/assets/yaml/us/rev1/ast_sector_z.yaml index f6e4284a..c8eb2fec 100644 --- a/assets/yaml/us/rev1/ast_sector_z.yaml +++ b/assets/yaml/us/rev1/ast_sector_z.yaml @@ -97,8 +97,8 @@ D_SZ_6004558: D_SZ_6004570: { type: GFX, offset: 0x6004570, symbol: D_SZ_6004570 } -aSZSpaceJunk4DL: - { type: GFX, offset: 0x60045E0, symbol: aSZSpaceJunk4DL } +aSzSpaceJunk4DL: + { type: GFX, offset: 0x60045E0, symbol: aSzSpaceJunk4DL } D_SZ_60047E0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60047E0, symbol: D_SZ_60047E0 } diff --git a/assets/yaml/us/rev1/ast_solar.yaml b/assets/yaml/us/rev1/ast_solar.yaml index 3e2cee43..edd4f615 100644 --- a/assets/yaml/us/rev1/ast_solar.yaml +++ b/assets/yaml/us/rev1/ast_solar.yaml @@ -127,8 +127,8 @@ D_SO_60151A0: D_SO_6015810: { type: GFX, offset: 0x6015810, symbol: D_SO_6015810} -D_SO_6016CF0: - { type: GFX, offset: 0x6016CF0, symbol: D_SO_6016CF0} +aSoRock3DL: + { type: GFX, offset: 0x6016CF0, symbol: aSoRock3DL} D_SO_6016F08: { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x6016F08, symbol: D_SO_6016F08} @@ -136,8 +136,8 @@ D_SO_6016F08: D_SO_6017008: { type: TEXTURE, ctype: u16, format: TLUT, colors: 64, offset: 0x6017008, symbol: D_SO_6017008} -D_SO_6017090: - { type: GFX, offset: 0x6017090, symbol: D_SO_6017090} +aSoRock2DL: + { type: GFX, offset: 0x6017090, symbol: aSoRock2DL} D_SO_6017200: { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x6017200, symbol: D_SO_6017200} @@ -145,8 +145,8 @@ D_SO_6017200: D_SO_6017300: { type: TEXTURE, ctype: u16, format: TLUT, colors: 56, offset: 0x6017300, symbol: D_SO_6017300} -D_SO_6017370: - { type: GFX, offset: 0x6017370, symbol: D_SO_6017370} +aSoRock1DL: + { type: GFX, offset: 0x6017370, symbol: aSoRock1DL} D_SO_60174E0: { type: TEXTURE, ctype: u8, format: CI8, width: 8, height: 8, offset: 0x60174E0, symbol: D_SO_60174E0} diff --git a/assets/yaml/us/rev1/ast_ve1_boss.yaml b/assets/yaml/us/rev1/ast_ve1_boss.yaml index a87b71cc..0be1c082 100644 --- a/assets/yaml/us/rev1/ast_ve1_boss.yaml +++ b/assets/yaml/us/rev1/ast_ve1_boss.yaml @@ -95,8 +95,8 @@ D_VE1_900C700: aVe1MonkeyStatueAnim: {type: SF64:ANIM, offset: 0x900D098, symbol: aVe1MonkeyStatueAnim} -D_VE1_900D164: - {type: SF64:SKELETON, offset: 0x900D164, symbol: D_VE1_900D164} +aVe1MonkeyStatueSkel: + {type: SF64:SKELETON, offset: 0x900D164, symbol: aVe1MonkeyStatueSkel} D_VE1_900D180: {type: GFX, offset: 0x900D180, symbol: D_VE1_900D180} diff --git a/assets/yaml/us/rev1/ast_venom_2.yaml b/assets/yaml/us/rev1/ast_venom_2.yaml index ae6f652e..92e8061f 100644 --- a/assets/yaml/us/rev1/ast_venom_2.yaml +++ b/assets/yaml/us/rev1/ast_venom_2.yaml @@ -66,8 +66,8 @@ D_VE2_6006E20: D_VE2_6007650: { type: GFX, offset: 0x6007650, symbol: D_VE2_6007650 } -D_VE2_6007E20: - { type: GFX, offset: 0x6007E20, symbol: D_VE2_6007E20 } +aAndLaserEmitterDL: + { type: GFX, offset: 0x6007E20, symbol: aAndLaserEmitterDL } D_VE2_6008170: { type: TEXTURE, format: RGBA16, width: 16, height: 16, offset: 0x6008170, ctype: u16, symbol: D_VE2_6008170 } @@ -78,8 +78,8 @@ aVe2TowerDL: D_VE2_6008AF8: { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6008AF8, ctype: u16, symbol: D_VE2_6008AF8 } -D_VE2_6009300: - { type: GFX, offset: 0x6009300, symbol: D_VE2_6009300 } +aAndBrainWasteDL: + { type: GFX, offset: 0x6009300, symbol: aAndBrainWasteDL } D_VE2_6009390: { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6009390, ctype: u16, symbol: D_VE2_6009390 } @@ -180,11 +180,11 @@ D_VE2_6014658: D_VE2_6014844: { type: SF64:SKELETON, offset: 0x6014844, symbol: D_VE2_6014844 } -D_VE2_6014904: - { type: SF64:ANIM, offset: 0x6014904, symbol: D_VE2_6014904 } +aVe2BaseAnim: + { type: SF64:ANIM, offset: 0x6014904, symbol: aVe2BaseAnim } -D_VE2_60149D0: - { type: SF64:SKELETON, offset: 0x60149D0, symbol: D_VE2_60149D0 } +aVe2BaseSkel: + { type: SF64:SKELETON, offset: 0x60149D0, symbol: aVe2BaseSkel } D_VE2_6014D50: { type: SF64:ENVIRONMENT, offset: 0x6014D50, symbol: D_VE2_6014D50 } diff --git a/assets/yaml/us/rev1/ast_zoness.yaml b/assets/yaml/us/rev1/ast_zoness.yaml index 69f313f7..c2dda637 100644 --- a/assets/yaml/us/rev1/ast_zoness.yaml +++ b/assets/yaml/us/rev1/ast_zoness.yaml @@ -24,8 +24,8 @@ D_ZO_6000E98: D_ZO_6001098: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6001098, symbol: D_ZO_6001098} -D_ZO_60012A0: - { type: GFX, offset: 0x60012A0, symbol: D_ZO_60012A0} +aZoDodoraHeadDL: + { type: GFX, offset: 0x60012A0, symbol: aZoDodoraHeadDL} D_ZO_6001810: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6001810, symbol: D_ZO_6001810} @@ -135,11 +135,11 @@ D_ZO_600C780: D_ZO_600D990: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x600D990, symbol: D_ZO_600D990} -D_ZO_600E5EC: - { type: SF64:ANIM, offset: 0x600E5EC, symbol: D_ZO_600E5EC} +aZoBirdAnim: + { type: SF64:ANIM, offset: 0x600E5EC, symbol: aZoBirdAnim} -D_ZO_600E7D8: - { type: SF64:SKELETON, offset: 0x600E7D8, symbol: D_ZO_600E7D8} +aZoBirdSkel: + { type: SF64:SKELETON, offset: 0x600E7D8, symbol: aZoBirdSkel} aZoOilRig3DL: { type: GFX, offset: 0x600E820, symbol: aZoOilRig3DL} @@ -273,8 +273,8 @@ D_ZO_6019738: D_ZO_601996C: { type: SF64:ANIM, offset: 0x601996C, symbol: D_ZO_601996C} -D_ZO_6019E18: - { type: SF64:SKELETON, offset: 0x6019E18, symbol: D_ZO_6019E18} +aZoSarumarineSkel: + { type: SF64:SKELETON, offset: 0x6019E18, symbol: aZoSarumarineSkel} D_ZO_6019EB0: { type: GFX, offset: 0x6019EB0, symbol: D_ZO_6019EB0} @@ -450,14 +450,14 @@ D_ZO_6023488: D_ZO_6023690: { type: GFX, offset: 0x6023690, symbol: D_ZO_6023690} -D_ZO_6023730: - { type: GFX, offset: 0x6023730, symbol: D_ZO_6023730} +aZoDodoraTailDL: + { type: GFX, offset: 0x6023730, symbol: aZoDodoraTailDL} D_ZO_60237E0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x60237E0, symbol: D_ZO_60237E0} -D_ZO_60239E0: - { type: GFX, offset: 0x60239E0, symbol: D_ZO_60239E0} +aZoDodoraBodyDL: + { type: GFX, offset: 0x60239E0, symbol: aZoDodoraBodyDL} D_ZO_6023D50: { type: GFX, offset: 0x6023D50, symbol: D_ZO_6023D50} diff --git a/include/functions.h b/include/functions.h index 9c302d0c..0754d9dc 100644 --- a/include/functions.h +++ b/include/functions.h @@ -101,7 +101,7 @@ void AndJamesTrigger_Draw(Actor*); void Graphics_SetScaleMtx(f32); void Sprite168_Draw(Sprite*); void MeteoBall_Draw(Actor*); -void ActorHopBot_Draw(Actor*); +void MeHopBot_Draw(Actor*); void MeteoTunnel_Draw(Scenery*); void Scenery_DrawTitaniaBones(Scenery*); void CoIBeam_Draw(Scenery*); @@ -113,7 +113,7 @@ void CoBuilding10_Draw(Scenery*); void ActorDebris_Draw(Actor*); void Actor_DrawEngineAndContrails(Actor*); void Actor_DrawEngineGlow(Actor*, s32); -void func_edisplay_8005B388(Actor*); +void ActorTeamArwing_Draw(Actor*); void MeMolarRock_Draw(Actor*); void MeMeteor2_Draw(MeMeteor2*); void MeLaserCannon1_Draw(MeLaserCannon1*); @@ -214,7 +214,7 @@ void Actor237_Update(Actor*); void Actor237_Draw(Actor*); void CoWaterfall_Update(Scenery*); void MeteoBall_Update(Actor*); -void ActorHopBot_Update(Actor*); +void MeHopBot_Update(Actor*); void MeMora_Update(Actor*); void MeMora_Dying(Actor*); void MeMora_Draw(Actor*); @@ -452,7 +452,7 @@ void Play_PlaySfxNoPlayer(f32* , u32 ); void Play_ClearObjectData(void); void Play_SpawnDebris(s32 , f32 , f32 , f32 ); void Player_ApplyDamage(Player* player, s32 direction, s32 damage); -bool Play_CheckDynaFloorCollision(f32* , s32* , f32 xPos, f32 yPos, f32 zPos); +bool Play_CheckDynaFloorCollision(f32* floorHeight, s32* triangleIndex, f32 xPos, f32 yPos, f32 zPos); bool Play_CheckSingleHitbox(Hitbox* hitbox, f32 , f32 , f32 , f32 , f32 , f32 ); void Player_CollisionCheck(Player* player); void Player_FloorCheck(Player* player); diff --git a/include/i5.h b/include/i5.h index 71c8b1c1..aa26402e 100644 --- a/include/i5.h +++ b/include/i5.h @@ -115,8 +115,8 @@ void Macbeth_MaVerticalLockBar_Draw(Actor*); void Macbeth_MaBarrier_Update(Actor*); void Macbeth_MaBarrier_Draw(Actor*); void Macbeth_MaProximityLight_Draw(Scenery*); -void Macbeth_Actor219_Update(Actor*); -void Macbeth_Actor219_Draw(Actor*); +void Macbeth_MaFallingBoulder_Update(Actor*); +void Macbeth_MaFallingBoulder_Draw(Actor*); void Macbeth_Actor207_Update(Actor*); void Macbeth_Actor207_Draw(Actor*); void Macbeth_MaTrainCar1_Update(Actor*); diff --git a/include/i6.h b/include/i6.h index 92934e30..a7c7f6c1 100644 --- a/include/i6.h +++ b/include/i6.h @@ -40,8 +40,8 @@ void Turret_Update(Player*); void Turret_UpdateCamera(Player*); void Turret_Draw(Player *); -void Andross_Actor199_Update(Actor*); -void Andross_Actor199_Draw(Actor*); +void Andross_ActorTeamArwing_Update(Actor*); +void Andross_ActorTeamArwing_Draw(Actor*); void Andross_AndBrainWaste_Update(Actor*); void Andross_AndBrainWaste_Draw(Actor*); void Andross_AndBossTimer_Update(Actor*); diff --git a/include/sf64object.h b/include/sf64object.h index 8c596a5f..af326665 100644 --- a/include/sf64object.h +++ b/include/sf64object.h @@ -453,7 +453,7 @@ typedef enum ObjectId { /* 144 */ OBJ_SCENERY_VS_SPACE_JUNK_1, /* 145 */ OBJ_SCENERY_VS_SPACE_JUNK_2, /* 146 */ OBJ_SCENERY_VS_SPACE_JUNK_3, - /* 147 */ OBJ_SCENERY_147, + /* 147 */ OBJ_SCENERY_LEVEL_OBJECTS, // Level specific scenery objects, used in Andross and Versus /* 148 */ OBJ_SCENERY_FO_MOUNTAIN_1, /* 149 */ OBJ_SCENERY_FO_MOUNTAIN_2, /* 150 */ OBJ_SCENERY_FO_MOUNTAIN_3, @@ -505,11 +505,11 @@ typedef enum ObjectId { /* 196 */ OBJ_ACTOR_CO_MOLE_MISSILE, /* 197 */ OBJ_ACTOR_ALLRANGE, /* 198 */ OBJ_ACTOR_TEAM_BOSS, - /* 199 */ OBJ_ACTOR_199, + /* 199 */ OBJ_ACTOR_TEAM_ARWING, /* 200 */ OBJ_ACTOR_EVENT, /* 201 */ OBJ_ACTOR_ME_METEO_BALL, /* 202 */ OBJ_ACTOR_ME_HOPBOT, - /* 203 */ OBJ_ACTOR_SLIPPY_SX, + /* 203 */ OBJ_ACTOR_SX_SLIPPY, /* 204 */ OBJ_ACTOR_SY_ROBOT, /* 205 */ OBJ_ACTOR_MA_LOCOMOTIVE, /* 206 */ OBJ_ACTOR_MA_TRAIN_CAR_1, @@ -525,7 +525,7 @@ typedef enum ObjectId { /* 216 */ OBJ_ACTOR_MA_HORIZONTAL_LOCK_BAR, /* 217 */ OBJ_ACTOR_MA_VERTICAL_LOCK_BAR, /* 218 */ OBJ_ACTOR_MA_BARRIER, - /* 219 */ OBJ_ACTOR_219, + /* 219 */ OBJ_ACTOR_MA_FALLING_BOULDER, /* 220 */ OBJ_ACTOR_MA_BOMBDROP, /* 221 */ OBJ_ACTOR_MA_SPEAR, /* 222 */ OBJ_ACTOR_MA_SHOCK_BOX, @@ -1134,10 +1134,10 @@ typedef Actor ActorCutscene; typedef Actor CoMoleMissile; typedef Actor ActorAllRange; typedef Actor ActorTeamBoss; // Teammates in a boss battle -typedef Actor Actor199; +typedef Actor ActorTeamArwing; typedef Actor ActorEvent; typedef Actor MeteoBall; -typedef Actor ActorHopBot; +typedef Actor MeHopBot; typedef Actor SxSlippy; typedef Actor SyRobot; typedef Actor MaLocomotive; @@ -1154,7 +1154,7 @@ typedef Actor MaBoulder; typedef Actor MaHorizontalLockBar; typedef Actor MaVerticalLockBar; typedef Actor MaBarrier; -typedef Actor Actor219; +typedef Actor MaFallingBoulder; typedef Actor MaBombDrop; typedef Actor MaSpear; typedef Actor MaShockBox; @@ -1171,7 +1171,7 @@ typedef Actor TiRasco; typedef Actor TiFekuda; typedef Actor TiGreatFox; typedef Actor ZoBird; -typedef Actor ZoDodora; +typedef Actor ZoDodora; // Snake type enemy typedef Actor Actor237; typedef Actor ZoFish; typedef Actor ZoDodoraWpCount; diff --git a/linker_scripts/us/rev1/symbol_addrs_assets.txt b/linker_scripts/us/rev1/symbol_addrs_assets.txt index cb8cdc4c..6c36a3a3 100644 --- a/linker_scripts/us/rev1/symbol_addrs_assets.txt +++ b/linker_scripts/us/rev1/symbol_addrs_assets.txt @@ -55,9 +55,9 @@ gHeadsetPanVolume = 0x800DD280; // size:0x200 type:f32 gStereoPanVolume = 0x800DD480; // size:0x200 type:f32 gDefaultPanVolume = 0x800DD680; // size:0x200 type:f32 -D_AQ_6000AE4 = 0x06000AE4; -D_AQ_6002628 = 0x06002628; -D_AQ_60260EC = 0x060260EC; +aAqSquidAnim = 0x06000AE4; +aAqAnglerFishAnim = 0x06002628; +aAqSpindlyFishAnim = 0x060260EC; D_AQ_60314AC = 0x060314AC; D_TI1_70067C4 = 0x70067C4; aTi1DesertCrawlerSkel = 0x7006990; diff --git a/linker_scripts/us/rev1/symbol_addrs_engine.txt b/linker_scripts/us/rev1/symbol_addrs_engine.txt index 2a10a0ce..e622ea48 100644 --- a/linker_scripts/us/rev1/symbol_addrs_engine.txt +++ b/linker_scripts/us/rev1/symbol_addrs_engine.txt @@ -171,8 +171,8 @@ Graphics_SetScaleMtx = 0x8005980C; Sprite168_Draw = 0x80059850; Object_dummy_800598DC = 0x800598DC; MeteoBall_Draw = 0x800598E8; -ActorHopBot_PostLimbDraw = 0x800599A4; -ActorHopBot_Draw = 0x80059A24; +MeHopBot_PostLimbDraw = 0x800599A4; +MeHopBot_Draw = 0x80059A24; MeteoTunnel_Draw = 0x80059AEC; Scenery_DrawTitaniaBones = 0x80059B20; func_edisplay_80059BB0 = 0x80059BB0; @@ -189,7 +189,7 @@ func_edisplay_8005A088 = 0x8005A088; ActorDebris_Draw = 0x8005A094; Actor_DrawEngineAndContrails = 0x8005ADAC; Actor_DrawEngineGlow = 0x8005B1E8; -func_edisplay_8005B388 = 0x8005B388; +ActorTeamArwing_Draw = 0x8005B388; MeMolarRock_Draw = 0x8005B6A4; MeMeteor2_Draw = 0x8005B71C; MeLaserCannon1_Draw = 0x8005B7CC; diff --git a/src/engine/fox_360.c b/src/engine/fox_360.c index 9a42f37d..8cb0499d 100644 --- a/src/engine/fox_360.c +++ b/src/engine/fox_360.c @@ -2394,7 +2394,7 @@ void ActorAllRange_Draw(ActorAllRange* this) { case AI360_SLIPPY: case AI360_PEPPY: Matrix_Push(&gGfxMatrix); - func_edisplay_8005B388(this); + ActorTeamArwing_Draw(this); Matrix_Pop(&gGfxMatrix); ActorAllRange_DrawBarrelRoll(this); break; diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index da745f1a..fe973584 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -2535,7 +2535,7 @@ void ActorCutscene_Draw(ActorCutscene* this) { break; case 0: - func_edisplay_8005B388(this); + ActorTeamArwing_Draw(this); break; case 1: @@ -2866,7 +2866,7 @@ void ActorCutscene_Draw(ActorCutscene* this) { case 44: Animation_GetFrameData(&D_AQ_6020A40, this->iwork[0], this->vwork); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - Animation_DrawSkeleton(1, D_AQ_6020C6C, this->vwork, 0, 0, &this->index, &gIdentityMatrix); + Animation_DrawSkeleton(1, aAqSeaweedSkel, this->vwork, 0, 0, &this->index, &gIdentityMatrix); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); break; @@ -2891,18 +2891,18 @@ void Cutscene_DrawGreatFox(void) { s32 i; s32 j; f32 sp9C[4]; - Gfx* var_fp; + Gfx* dList; PRINTF("Demo_Time=%d\n"); PRINTF("Demo_Time=%d\n"); PRINTF("d Enm->wrk0 %d\n"); if (gGameState == GSTATE_TITLE) { - var_fp = D_TITLE_60320E0; + dList = D_TITLE_60320E0; } else if (gGameState == GSTATE_ENDING) { - var_fp = D_END_7010970; + dList = D_END_7010970; } else { - var_fp = D_1024AC0; + dList = D_1024AC0; } if (gCurrentLevel == LEVEL_TITANIA) { @@ -2910,18 +2910,20 @@ void Cutscene_DrawGreatFox(void) { } if (gGreatFoxIntact) { - gSPDisplayList(gMasterDisp++, D_GREAT_FOX_E000000); + gSPDisplayList(gMasterDisp++, aGreatFoxIntactDL); } else { - gSPDisplayList(gMasterDisp++, D_GREAT_FOX_E003AB0); + gSPDisplayList(gMasterDisp++, aGreatFoxDamagedDL); } if ((gCurrentLevel != LEVEL_AQUAS) && ((gCurrentLevel != LEVEL_SECTOR_Z) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE))) { RCP_SetupDL_49(); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); + for (i = 0, var_s6_2 = D_demo_800CA0BC; i < ARRAY_COUNT(sp9C); i++, var_s6_2++) { if ((i != 1) || gGreatFoxIntact) { sp9C[i] = 0.0f; + if (i < 2) { if ((gGameFrameCount & ((64 - 1) & ~(8 - 1))) == 0) { sp9C[i] = D_demo_800CA170[gGameFrameCount % 8U]; @@ -2933,11 +2935,12 @@ void Cutscene_DrawGreatFox(void) { } gDPSetEnvColor(gMasterDisp++, 32, 32, 255, 128); } + Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, var_s6_2->x, var_s6_2->y, var_s6_2->z, MTXF_APPLY); Matrix_Scale(gGfxMatrix, sp9C[i], sp9C[i], 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, var_fp); + gSPDisplayList(gMasterDisp++, dList); Matrix_Pop(&gGfxMatrix); } } @@ -2951,14 +2954,14 @@ void Cutscene_DrawGreatFox(void) { Matrix_Translate(gGfxMatrix, var_s6_2->x, var_s6_2->y, var_s6_2->z, MTXF_APPLY); Matrix_Scale(gGfxMatrix, sp9C[i], sp9C[i], 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, var_fp); + gSPDisplayList(gMasterDisp++, dList); for (j = 0; j < 4; j++) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, D_demo_800CA1B4[2 * j], MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_demo_800CA1D4[2 * j], D_demo_800CA1D4[2 * j], 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, var_fp); + gSPDisplayList(gMasterDisp++, dList); Matrix_Pop(&gGfxMatrix); } Matrix_Pop(&gGfxMatrix); @@ -2971,7 +2974,7 @@ void Cutscene_DrawGreatFox(void) { Matrix_Scale(gGfxMatrix, D_demo_800CA198[gPlayer[0].csEventTimer], D_demo_800CA198[gPlayer[0].csEventTimer], 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, var_fp); + gSPDisplayList(gMasterDisp++, dList); } } } diff --git a/src/engine/fox_edata_info.c b/src/engine/fox_edata_info.c index 3b73923c..a070fe3c 100644 --- a/src/engine/fox_edata_info.c +++ b/src/engine/fox_edata_info.c @@ -240,7 +240,7 @@ ObjectInfo gObjectInfo[] = { /* OBJ_SCENERY_VS_SPACE_JUNK_1 */ {(void*) aVsSpaceJunk1DL, 0, (ObjectFunc) NULL, aVsSpaceJunk1Hitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_VS_SPACE_JUNK_2 */ {(void*) aVsSpaceJunk2DL, 0, (ObjectFunc) NULL, aVsSpaceJunk2Hitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_VS_SPACE_JUNK_3 */ {(void*) aVsSpaceJunk3DL, 0, (ObjectFunc) NULL, aVsSpaceJunk3Hitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_147 */ {(void*) NULL, 0, (ObjectFunc) NULL, gNoHitbox, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_LEVEL_OBJECTS */ {(void*) NULL, 0, (ObjectFunc) NULL, gNoHitbox, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_SCENERY_FO_MOUNTAIN_1 */ {(void*) aFoMountain1DL, 0, (ObjectFunc) NULL, aFoMountain1Hitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_FO_MOUNTAIN_2 */ {(void*) aFoMountain2DL, 0, (ObjectFunc) NULL, aFoMountain2Hitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_FO_MOUNTAIN_3 */ {(void*) aFoMountain3DL, 0, (ObjectFunc) NULL, aFoMountain3Hitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, @@ -292,11 +292,11 @@ ObjectInfo gObjectInfo[] = { /* OBJ_ACTOR_CO_MOLE_MISSILE */ {(void*) CoMoleMissile_Draw, 1, (ObjectFunc) CoMoleMissile_Update, aCoMoleMissileHitbox, 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 }, - /* OBJ_ACTOR_199 */ {(void*) Andross_Actor199_Draw, 1, (ObjectFunc) Andross_Actor199_Update, gNoHitbox, 20000.0f, 0, 0, 39, 1, 0.0f, 0 }, + /* OBJ_ACTOR_TEAM_ARWING */ {(void*) Andross_ActorTeamArwing_Draw, 1, (ObjectFunc) Andross_ActorTeamArwing_Update, gNoHitbox, 20000.0f, 0, 0, 39, 1, 0.0f, 0 }, /* OBJ_ACTOR_EVENT */ {(void*) ActorEvent_Draw, 1, (ObjectFunc) ActorEvent_Update, gNoHitbox, 2000.0f, 0, 1, 39, 0, 0.0f, 1 }, /* OBJ_ACTOR_ME_METEO_BALL */ {(void*) MeteoBall_Draw, 1, (ObjectFunc) MeteoBall_Update, aMeMeteoBallHitbox, 100.0f, 0, 1, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_ME_HOPBOT */ {(void*) ActorHopBot_Draw, 1, (ObjectFunc) ActorHopBot_Update, aMeHopBotHitbox, 100.0f, 0, 1, 39, 0, 180.0f, 1 }, - /* OBJ_ACTOR_SLIPPY_SX */ {(void*) SectorX_SxSlippy_Draw, 1, (ObjectFunc) SectorX_SxSlippy_Update, gNoHitbox, 1000.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_ACTOR_ME_HOPBOT */ {(void*) MeHopBot_Draw, 1, (ObjectFunc) MeHopBot_Update, aMeHopBotHitbox, 100.0f, 0, 1, 39, 0, 180.0f, 1 }, + /* OBJ_ACTOR_SX_SLIPPY */ {(void*) SectorX_SxSlippy_Draw, 1, (ObjectFunc) SectorX_SxSlippy_Update, gNoHitbox, 1000.0f, 0, 0, 39, 0, 0.0f, 0 }, /* OBJ_ACTOR_SY_ROBOT */ {(void*) SectorY_SyRobot_Draw, 1, (ObjectFunc) SectorY_SyRobot_Update, aSyRobotHitbox, 1000.0f, 0, 0, 39, 0, 1.0f, 1 }, /* OBJ_ACTOR_MA_LOCOMOTIVE */ {(void*) Macbeth_Train_Draw, 1, (ObjectFunc) Macbeth_MaLocomotive_Update, aMaLocomotiveHitbox, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, /* OBJ_ACTOR_MA_TRAIN_CAR_1 */ {(void*) Macbeth_Train_Draw, 1, (ObjectFunc) Macbeth_MaTrainCar1_Update, aMaTrainCar1Hitbox, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, @@ -312,7 +312,7 @@ ObjectInfo gObjectInfo[] = { /* OBJ_ACTOR_MA_HORIZONTAL_LOCK_BAR */ {(void*) Macbeth_MaHorizontalLockBar_Draw, 1, (ObjectFunc) Macbeth_MaHorizontalLockBar_Update, aMaHorizontalLockBarHitbox, 200.0f, 0, 0, 40, 1, 0.0f, 0 }, /* OBJ_ACTOR_MA_VERTICAL_LOCK_BAR */ {(void*) Macbeth_MaVerticalLockBar_Draw, 1, (ObjectFunc) Macbeth_MaVerticalLockBar_Update, aMaVerticalLockBarHitbox, 200.0f, 0, 0, 40, 1, 0.0f, 0 }, /* OBJ_ACTOR_MA_BARRIER */ {(void*) Macbeth_MaBarrier_Draw, 1, (ObjectFunc) Macbeth_MaBarrier_Update, aMaBarrierHitbox, 200.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_219 */ {(void*) Macbeth_Actor219_Draw, 1, (ObjectFunc) Macbeth_Actor219_Update, aMaActor219Hitbox, 300.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_MA_FALLING_BOULDER */ {(void*) Macbeth_MaFallingBoulder_Draw, 1, (ObjectFunc) Macbeth_MaFallingBoulder_Update, aMaFallingBoulderHitbox, 300.0f, 0, 0, 40, 1, 0.0f, 0 }, /* OBJ_ACTOR_MA_BOMBDROP */ {(void*) Macbeth_MaBombDrop_Draw, 1, (ObjectFunc) Macbeth_MaBombDrop_Update, aMaBombDropHitbox, 200.0f, 0, 0, 40, 1, 0.0f, 0 }, /* OBJ_ACTOR_MA_SPEAR */ {(void*) Macbeth_MaSpear_Draw, 1, (ObjectFunc) Macbeth_MaSpear_Update, aMaSpearHitbox, 300.0f, 0, 0, 40, 1, 1.0f, 0 }, /* OBJ_ACTOR_MA_SHOCK_BOX */ {(void*) Macbeth_MaShockBox_Draw, 1, (ObjectFunc) Macbeth_MaShockBox_Update, aMaShockBoxHitbox, 300.0f, 0, 0, 40, 1, 1.0f, 0 }, diff --git a/src/engine/fox_edisplay.c b/src/engine/fox_edisplay.c index a6086437..8ebda74c 100644 --- a/src/engine/fox_edisplay.c +++ b/src/engine/fox_edisplay.c @@ -1,5 +1,6 @@ #include "prevent_bss_reordering.h" #include "global.h" +#include "sf64object.h" #include "assets/ast_katina.h" #include "assets/ast_venom_1.h" #include "assets/ast_venom_2.h" @@ -26,7 +27,7 @@ Vec3f D_edisplay_801615D0; Vec3f sViewPos; bool sDrewActor; Matrix D_edisplay_801615F0; -ArwingInfo D_edisplay_80161630; +ArwingInfo gActorTeamArwing; char D_edisplay_800CF970[] = "$Id: fox_edisplay.c,v 1.196 1997/05/08 08:31:50 morita Exp $"; @@ -62,11 +63,11 @@ void Object_dummy_800598DC(s32 arg0) { void MeteoBall_Draw(MeteoBall* this) { RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); - gSPDisplayList(gMasterDisp++, D_MA_6025B50); + gSPDisplayList(gMasterDisp++, aMeMeteoBallDL); RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } -void ActorHopBot_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* index) { +void MeHopBot_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* index) { Vec3f sp24; Vec3f sp18; @@ -89,14 +90,14 @@ f32 D_edisplay_800CFA2C[] = { 1.0f, 1.0f, 0.95f, 0.9f, 0.85f, 0.8f, 0.75f, 0.7f, 0.65f, 0.6f, }; -void ActorHopBot_Draw(ActorHopBot* this) { +void MeHopBot_Draw(MeHopBot* this) { Vec3f sp30[30]; f32 temp = D_edisplay_800CF9B0[this->animFrame] - 114.0f; Matrix_Translate(gGfxMatrix, 0.f, -temp, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - Animation_GetFrameData(&D_ME_601E8C4, this->animFrame, sp30); - Animation_DrawSkeleton(1, D_ME_601E9D0, sp30, NULL, ActorHopBot_PostLimbDraw, &this->index, &gIdentityMatrix); + Animation_GetFrameData(&aMeHopBotAnim, this->animFrame, sp30); + Animation_DrawSkeleton(1, aMeHopBotSkel, sp30, NULL, MeHopBot_PostLimbDraw, &this->index, &gIdentityMatrix); } void MeteoTunnel_Draw(MeTunnel* this) { @@ -444,7 +445,7 @@ void ActorDebris_Draw(ActorDebris* this) { break; case 70: - gSPDisplayList(gMasterDisp++, D_10177C0); + gSPDisplayList(gMasterDisp++, aActorSuppliesDL); break; case 57: @@ -549,7 +550,7 @@ void Actor_DrawEngineGlow(Actor* actor, s32 levelType) { } } -void func_edisplay_8005B388(Actor199* this) { +void ActorTeamArwing_Draw(ActorTeamArwing* this) { Vec3f src = { 0.0f, 0.0f, 0.0f }; Vec3f dest; @@ -566,29 +567,31 @@ void func_edisplay_8005B388(Actor199* this) { (gCurrentLevel == LEVEL_KATINA) && (this->index == 1)) || ((gCurrentLevel == LEVEL_SECTOR_Y) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY) && (this->state == 5))) { - D_edisplay_80161630.rightWingState = gPlayer[0].arwing.rightWingState; - D_edisplay_80161630.leftWingState = gPlayer[0].arwing.leftWingState; + gActorTeamArwing.rightWingState = gPlayer[0].arwing.rightWingState; + gActorTeamArwing.leftWingState = gPlayer[0].arwing.leftWingState; } else { - D_edisplay_80161630.rightWingState = D_edisplay_80161630.leftWingState = WINGSTATE_INTACT; + gActorTeamArwing.rightWingState = gActorTeamArwing.leftWingState = WINGSTATE_INTACT; } } else { - D_edisplay_80161630.rightWingState = D_edisplay_80161630.leftWingState = WINGSTATE_INTACT; + gActorTeamArwing.rightWingState = gActorTeamArwing.leftWingState = WINGSTATE_INTACT; } - D_edisplay_80161630.upperRightFlapYrot = this->fwork[15]; - D_edisplay_80161630.upperLeftFlapYrot = this->fwork[16]; - D_edisplay_80161630.bottomRightFlapYrot = this->fwork[26]; - D_edisplay_80161630.bottomLeftFlapYrot = this->fwork[27]; - D_edisplay_80161630.laserGunsYpos = D_edisplay_80161630.laserGunsXpos = D_edisplay_80161630.wingsXrot = - D_edisplay_80161630.wingsYrot = D_edisplay_80161630.windshieldXrot = D_edisplay_80161630.wingsZrot = 0.0f; - D_edisplay_80161630.unk_28 = this->fwork[17]; - D_edisplay_80161630.drawFace = this->iwork[14]; - D_edisplay_80161630.teamFaceXrot = this->fwork[20]; - D_edisplay_80161630.teamFaceYrot = this->fwork[19]; + + gActorTeamArwing.upperRightFlapYrot = this->fwork[15]; + gActorTeamArwing.upperLeftFlapYrot = this->fwork[16]; + gActorTeamArwing.bottomRightFlapYrot = this->fwork[26]; + gActorTeamArwing.bottomLeftFlapYrot = this->fwork[27]; + gActorTeamArwing.laserGunsYpos = gActorTeamArwing.laserGunsXpos = gActorTeamArwing.wingsXrot = + gActorTeamArwing.wingsYrot = gActorTeamArwing.windshieldXrot = gActorTeamArwing.wingsZrot = 0.0f; + gActorTeamArwing.unk_28 = this->fwork[17]; + gActorTeamArwing.drawFace = this->iwork[14]; + gActorTeamArwing.teamFaceXrot = this->fwork[20]; + gActorTeamArwing.teamFaceYrot = this->fwork[19]; + if (gLevelType == LEVELTYPE_SPACE) { - D_edisplay_80161630.upperRightFlapYrot = D_edisplay_80161630.bottomRightFlapYrot = - D_edisplay_80161630.upperLeftFlapYrot = D_edisplay_80161630.bottomLeftFlapYrot = 0.0f; + gActorTeamArwing.upperRightFlapYrot = gActorTeamArwing.bottomRightFlapYrot = + gActorTeamArwing.upperLeftFlapYrot = gActorTeamArwing.bottomLeftFlapYrot = 0.0f; } - Display_ArwingWings(&D_edisplay_80161630); + Display_ArwingWings(&gActorTeamArwing); } else if (gLevelType == LEVELTYPE_PLANET) { gSPDisplayList(gMasterDisp++, D_ENMY_PLANET_40018A0); } else if (gPlayer[0].wingPosition == 2) { @@ -647,8 +650,8 @@ void ActorMissileSeek_Draw(Actor* missile) { void CoSkibot_Draw(CoSkibot* this) { Matrix_Translate(gGfxMatrix, 0.0f, -124.0f, 0.0f, MTXF_APPLY); - Animation_GetFrameData(&D_CO_6029528, this->animFrame, this->vwork); - Animation_DrawSkeleton(1, D_CO_6029674, this->vwork, NULL, NULL, this, &gIdentityMatrix); + Animation_GetFrameData(&aCoSkibotAnim, this->animFrame, this->vwork); + Animation_DrawSkeleton(1, aCoSkibotSkel, this->vwork, NULL, NULL, this, &gIdentityMatrix); } void CoRadar_Draw(CoRadar* this) { @@ -656,7 +659,7 @@ void CoRadar_Draw(CoRadar* this) { RCP_SetupDL_27(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } - gSPDisplayList(gMasterDisp++, D_CO_6020B40); + gSPDisplayList(gMasterDisp++, aCoRadarDL); } void func_edisplay_8005BAAC(void) { @@ -1095,7 +1098,7 @@ void Actor_DrawOnRails(Actor* this) { this->info.draw(&this->obj); Object_UpdateSfxSource(this->sfxSource); if (((this->obj.id == OBJ_ACTOR_TEAM_BOSS) || - ((this->obj.id == OBJ_ACTOR_SLIPPY_SX) && (this->animFrame > 0))) && + ((this->obj.id == OBJ_ACTOR_SX_SLIPPY) && (this->animFrame > 0))) && (gReflectY > 0)) { Matrix_MultVec3f(gGfxMatrix, &sp34, &gTeamArrowsViewPos[this->aiType]); } @@ -1680,7 +1683,7 @@ void Object_DrawAll(s32 arg0) { } for (i = 0, scenery360 = gScenery360; i < 200; i++, scenery360++) { - if ((scenery360->obj.status == OBJ_ACTIVE) && (scenery360->obj.id != OBJ_SCENERY_147)) { + if ((scenery360->obj.status == OBJ_ACTIVE) && (scenery360->obj.id != OBJ_SCENERY_LEVEL_OBJECTS)) { if (gCurrentLevel == LEVEL_BOLSE) { spAC.x = scenery360->sfxSource[0]; spAC.y = scenery360->sfxSource[1]; diff --git a/src/engine/fox_enmy.c b/src/engine/fox_enmy.c index 73c3f337..6d9d1f9e 100644 --- a/src/engine/fox_enmy.c +++ b/src/engine/fox_enmy.c @@ -1798,7 +1798,7 @@ void CoSkibot_Update(CoSkibot* this) { } this->animFrame++; - if (Animation_GetFrameCount(&D_CO_6029528) < this->animFrame) { + if (Animation_GetFrameCount(&aCoSkibotAnim) < this->animFrame) { this->animFrame = 0; } @@ -2150,7 +2150,7 @@ void ActorSupplies_Draw(Actor* this) { Matrix_RotateY(gGfxMatrix, D_enmy_800CFF0C[i].y * M_DTOR, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, D_enmy_800CFF0C[i].x * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_10177C0); + gSPDisplayList(gMasterDisp++, aActorSuppliesDL); Matrix_Pop(&gGfxMatrix); } diff --git a/src/engine/fox_enmy2.c b/src/engine/fox_enmy2.c index 97b79cf7..b3548bb5 100644 --- a/src/engine/fox_enmy2.c +++ b/src/engine/fox_enmy2.c @@ -144,13 +144,16 @@ void MeteoBall_Update(MeteoBall* this) { sqrtf(SQ(gPlayer[0].cam.eye.z - sp2C) + SQ(gPlayer[0].cam.eye.x - this->obj.pos.x)))); } -void ActorHopBot_Update(ActorHopBot* this) { +void MeHopBot_Update(MeHopBot* this) { bool sp34; this->gravity = 1.5f; + sp34 = false; + this->obj.rot.y = Math_RadToDeg( Math_Atan2F(gPlayer[gPlayerNum].pos.x - this->obj.pos.x, gPlayer[gPlayerNum].trueZpos - this->obj.pos.z)); + if (this->obj.pos.y < -500.0f) { this->obj.pos.y = -500.0f; this->vel.y = 0.0f; @@ -237,11 +240,11 @@ void MeMora_Update(MeMora* this) { static s16 D_800CFF94[16] = { 0, 98, 96, 94, 92, 90, 88, 86, 84, 82, 80, 78, 76, 74, 72, 70, }; -static u8 D_800CFFB4[16] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2 }; -static f32 D_800CFFC4[16] = { +static u8 gMeMoraPartIdx[16] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2 }; +static f32 gMeMoraScale[16] = { 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.99f, 0.98f, 0.94f, 0.88f, 0.8f, 1.0f, }; -static Gfx* D_800D0004[3] = { D_ENMY_SPACE_4000170, D_ENMY_SPACE_40084D0, D_ENMY_SPACE_400A630 }; +static Gfx* gMemoraPartDL[3] = { aEnmySpMeMora1DL, aEnmySpMeMora2DL, aEnmySpMeMora3DL }; void MeMora_Dying(MeMora* this) { Vec3f sp34; @@ -292,14 +295,14 @@ void MeMora_Dying(MeMora* this) { } } -void MeMora_8006B46C(MeMora* 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 }; +void Memora_DrawParts(MeMora* this, f32 xTrans, f32 yTrans, f32 zTrans, f32 xRot, f32 yRot, f32 zRot, u8 partIdx, + f32 scale, bool colorFlicker) { + Vec3f src = { 0.0f, 0.0f, 0.0f }; Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, xTrans, yTrans, zTrans + gPathProgress, MTXF_APPLY); - if (arg7 != 1) { + if (partIdx != 1) { Matrix_RotateY(gGfxMatrix, M_DTOR * yRot, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_DTOR * xRot, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, M_DTOR * zRot, MTXF_APPLY); @@ -308,11 +311,11 @@ void MeMora_8006B46C(MeMora* this, f32 xTrans, f32 yTrans, f32 zTrans, f32 xRot, Matrix_Scale(gGfxMatrix, scale, scale, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - if (arg7 != 1) { + if (partIdx != 1) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); - if ((arg7 == 0) && (this->lockOnTimers[TEAM_ID_FOX] != 0)) { - sp34.y += this->info.targetOffset; - Matrix_MultVec3f(gGfxMatrix, &sp34, &gLockOnTargetViewPos[TEAM_ID_FOX]); + if ((partIdx == 0) && (this->lockOnTimers[TEAM_ID_FOX] != 0)) { + src.y += this->info.targetOffset; + Matrix_MultVec3f(gGfxMatrix, &src, &gLockOnTargetViewPos[TEAM_ID_FOX]); if (gLockOnTargetViewPos[TEAM_ID_FOX].z > -500.0f) { this->lockOnTimers[TEAM_ID_FOX] = 0; } @@ -321,12 +324,12 @@ void MeMora_8006B46C(MeMora* this, f32 xTrans, f32 yTrans, f32 zTrans, f32 xRot, RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } - if (arg9 != 0) { + if (colorFlicker) { RCP_SetupDL_64(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } - gSPDisplayList(gMasterDisp++, D_800D0004[arg7]); + gSPDisplayList(gMasterDisp++, gMemoraPartDL[partIdx]); Matrix_Pop(&gGfxMatrix); RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } @@ -337,9 +340,9 @@ void MeMora_Draw(MeMora* this) { for (i = this->unk_04A; i < ARRAY_COUNT(D_800CFF94); i++) { j = (D_800CFF94[i] + this->counter_04E) % 100; - MeMora_8006B46C(this, gMeMoraXpos[this->unk_046][j], gMeMoraYpos[this->unk_046][j], - gMeMoraZpos[this->unk_046][j], gMeMoraXrot[this->unk_046][j], gMeMoraYrot[this->unk_046][j], - gMeMoraZrot[this->unk_046][j], D_800CFFB4[i], D_800CFFC4[i], this->timer_0C6 % 2U); + Memora_DrawParts(this, gMeMoraXpos[this->unk_046][j], gMeMoraYpos[this->unk_046][j], + gMeMoraZpos[this->unk_046][j], gMeMoraXrot[this->unk_046][j], gMeMoraYrot[this->unk_046][j], + gMeMoraZrot[this->unk_046][j], gMeMoraPartIdx[i], gMeMoraScale[i], this->timer_0C6 % 2U); } } @@ -1040,7 +1043,7 @@ static EventActorInfo sEventActorInfo[108] = { /* 95 */ { D_WZ_70008F0, gCubeHitbox100, -1.0f, 100.0f, 8000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 0 }, /* 96 */ { D_WZ_7000280, gWarpZoneEvent96Hitbox, -1.0f, 1000.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 0 }, /* 97 */ { D_ME_600AC70, gCubeHitbox100, -1.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 98 */ { D_MA_601A2B0, aMaBoulderHitbox, 1.0f, 100.0f, 3000.0f, 1, 1, EISFX_NONE, 0, 0.0f, 1 }, + /* 98 */ { aMaBoulderDL, aMaBoulderHitbox, 1.0f, 100.0f, 3000.0f, 1, 1, EISFX_NONE, 0, 0.0f, 1 }, /* 99 */ { D_VE1_6002500, D_VE1_601B944, -1.0f, 100.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, /* 100 */ { D_VE1_60043F0, gNoHitbox, -1.0f, 100.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, /* 101 */ { D_VE1_6004310, gNoHitbox, -1.0f, 100.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, @@ -3579,7 +3582,7 @@ void ActorEvent_Update(ActorEvent* this) { case EVID_79: if (this->timer_0C4 == 0) { this->animFrame++; - if (Animation_GetFrameCount(&D_ZO_600E5EC) < this->animFrame) { + if (Animation_GetFrameCount(&aZoBirdAnim) < this->animFrame) { this->animFrame = 0; } } @@ -3942,7 +3945,7 @@ void ActorEvent_Draw(ActorEvent* this) { this->fwork[16] += (-this->obj.rot.z * 0.7f - this->fwork[16]) * 0.2f; this->fwork[27] += (this->obj.rot.z * 0.7f - this->fwork[27]) * 0.2f; } - func_edisplay_8005B388(this); + ActorTeamArwing_Draw(this); break; case EVID_TEAMMATE: diff --git a/src/engine/fox_hud.c b/src/engine/fox_hud.c index 8149d6ea..825ce5a7 100644 --- a/src/engine/fox_hud.c +++ b/src/engine/fox_hud.c @@ -3649,12 +3649,12 @@ void HUD_Draw(void) { void HUD_FoBase_Draw(Boss* boss) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); - gSPDisplayList(gMasterDisp++, D_FO_6003090); + gSPDisplayList(gMasterDisp++, aFoBaseDL2); RCP_SetupDL_34(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); gDPSetTextureFilter(gMasterDisp++, G_TF_POINT); gDPSetPrimColor(gMasterDisp++, 0, 0, 0, (s32) boss->fwork[1], (s32) boss->fwork[2], 255); - gSPDisplayList(gMasterDisp++, D_FO_600D5C0); + gSPDisplayList(gMasterDisp++, aFoBaseDL1); gDPSetTextureFilter(gMasterDisp++, G_TF_BILERP); } diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index 93c4a5e9..1605f40c 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -325,7 +325,7 @@ void Play_InitVsStage(void) { if (gLevelObjects[j].id <= OBJ_INVALID) { break; } - if (gLevelObjects[j].id == OBJ_SCENERY_147) { + if (gLevelObjects[j].id == OBJ_SCENERY_LEVEL_OBJECTS) { Scenery360_Initialize(&gScenery360[i]); gScenery360[i].obj.status = OBJ_ACTIVE; gScenery360[i].obj.id = gLevelObjects[j].id; @@ -341,7 +341,7 @@ void Play_InitVsStage(void) { if (gLevelObjects[j].id <= OBJ_INVALID) { break; } - if (gLevelObjects[j].id != OBJ_SCENERY_147) { + if (gLevelObjects[j].id != OBJ_SCENERY_LEVEL_OBJECTS) { Scenery360_Initialize(&gScenery360[i]); gScenery360[i].obj.status = OBJ_ACTIVE; gScenery360[i].obj.id = gLevelObjects[j].id; @@ -975,6 +975,7 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) { player->knockback.x = sp38.x; player->knockback.y = sp38.y; player->knockback.z = sp38.z; + if (Rand_ZeroOne() < 0.5f) { Player_DamageWings(player, 1, 15); } else { @@ -1030,14 +1031,14 @@ void Player_GroundedCollision(Player* player, u32 arg1, f32 arg2, f32 arg3) { } } -bool Play_CheckDynaFloorCollision(f32* arg0, s32* arg1, f32 xPos, f32 yPos, f32 zPos) { - Vtx* spA4; - u16* spA0; - s32 sp9C; - s32 sp98; - f32 sp94; - f32 sp90; - s32 sp8C; +bool Play_CheckDynaFloorCollision(f32* floorHeight, s32* triangleIndex, f32 xPos, f32 yPos, f32 zPos) { + Vtx* vertexData; + u16* indexData; + s32 gridX; + s32 gridZ; + f32 modZ; + f32 modX; + s32 vertIndex; f32 x0; f32 y0; f32 z0; @@ -1047,80 +1048,85 @@ bool Play_CheckDynaFloorCollision(f32* arg0, s32* arg1, f32 xPos, f32 yPos, f32 f32 x2; f32 y2; f32 z2; - f32 temp1; - f32 dz21; - f32 dx10; - f32 dx21; - f32 dy10; - f32 dy21; - f32 dz10; - f32 sp48; - f32 crz; - f32 cry; - f32 crx; + f32 tempVar; + f32 deltaZ21; + f32 deltaX10; + f32 deltaX21; + f32 deltaY10; + f32 deltaY21; + f32 deltaZ10; + f32 heightVal; + f32 crossProductX; + f32 crossProductY; + f32 crossProductZ; switch (gCurrentLevel) { case LEVEL_SOLAR: - spA4 = SEGMENTED_TO_VIRTUAL(D_SO_6001C50); - spA0 = SEGMENTED_TO_VIRTUAL(D_SO_6022760); + vertexData = SEGMENTED_TO_VIRTUAL(D_SO_6001C50); + indexData = SEGMENTED_TO_VIRTUAL(D_SO_6022760); break; + case LEVEL_ZONESS: - spA4 = SEGMENTED_TO_VIRTUAL(D_ZO_6009ED0); - spA0 = SEGMENTED_TO_VIRTUAL(D_ZO_602AC50); + vertexData = SEGMENTED_TO_VIRTUAL(D_ZO_6009ED0); + indexData = SEGMENTED_TO_VIRTUAL(D_ZO_602AC50); break; + default: return false; } - sp9C = (s32) ((xPos + 2400.0f) / 300.0f); - sp98 = (s32) ((zPos + gPathProgress + 1500.0f + 2400.0f) / 300.0f); + gridX = (s32) ((xPos + 2400.0f) / 300.0f); + gridZ = (s32) ((zPos + gPathProgress + 1500.0f + 2400.0f) / 300.0f); - if ((sp9C < 0) || (sp9C >= 16) || (sp98 < 0) || (sp98 >= 16)) { + if ((gridX < 0) || (gridX >= 16) || (gridZ < 0) || (gridZ >= 16)) { return false; } - sp90 = Math_ModF(xPos + 2400.0f, 300.0f); - sp94 = Math_ModF(zPos + gPathProgress + 1500.0f + 2400.0f, 300.0f); - sp8C = (sp98 * 17) + sp9C; + modX = Math_ModF(xPos + 2400.0f, 300.0f); + modZ = Math_ModF(zPos + gPathProgress + 1500.0f + 2400.0f, 300.0f); - x0 = spA4[spA0[sp8C]].n.ob[0] * 3.0f; - y0 = spA4[spA0[sp8C]].n.ob[1] * 2.0f; - z0 = spA4[spA0[sp8C]].n.ob[2] * 3.0f; + vertIndex = (gridZ * 17) + gridX; - if (sp90 < sp94) { - x1 = spA4[spA0[sp8C + 18]].n.ob[0] * 3.0f; - y1 = spA4[spA0[sp8C + 18]].n.ob[1] * 2.0f; - z1 = spA4[spA0[sp8C + 18]].n.ob[2] * 3.0f; - x2 = spA4[spA0[sp8C + 17]].n.ob[0] * 3.0f; - y2 = spA4[spA0[sp8C + 17]].n.ob[1] * 2.0f; - z2 = spA4[spA0[sp8C + 17]].n.ob[2] * 3.0f; + x0 = vertexData[indexData[vertIndex]].n.ob[0] * 3.0f; + y0 = vertexData[indexData[vertIndex]].n.ob[1] * 2.0f; + z0 = vertexData[indexData[vertIndex]].n.ob[2] * 3.0f; + + if (modX < modZ) { + x1 = vertexData[indexData[vertIndex + 18]].n.ob[0] * 3.0f; + y1 = vertexData[indexData[vertIndex + 18]].n.ob[1] * 2.0f; + z1 = vertexData[indexData[vertIndex + 18]].n.ob[2] * 3.0f; + x2 = vertexData[indexData[vertIndex + 17]].n.ob[0] * 3.0f; + y2 = vertexData[indexData[vertIndex + 17]].n.ob[1] * 2.0f; + z2 = vertexData[indexData[vertIndex + 17]].n.ob[2] * 3.0f; } else { - x1 = spA4[spA0[sp8C + 1]].n.ob[0] * 3.0f; - y1 = spA4[spA0[sp8C + 1]].n.ob[1] * 2.0f; - z1 = spA4[spA0[sp8C + 1]].n.ob[2] * 3.0f; - x2 = spA4[spA0[sp8C + 18]].n.ob[0] * 3.0f; - y2 = spA4[spA0[sp8C + 18]].n.ob[1] * 2.0f; - z2 = spA4[spA0[sp8C + 18]].n.ob[2] * 3.0f; + x1 = vertexData[indexData[vertIndex + 1]].n.ob[0] * 3.0f; + y1 = vertexData[indexData[vertIndex + 1]].n.ob[1] * 2.0f; + z1 = vertexData[indexData[vertIndex + 1]].n.ob[2] * 3.0f; + x2 = vertexData[indexData[vertIndex + 18]].n.ob[0] * 3.0f; + y2 = vertexData[indexData[vertIndex + 18]].n.ob[1] * 2.0f; + z2 = vertexData[indexData[vertIndex + 18]].n.ob[2] * 3.0f; } - dx10 = x1 - x0; - dx21 = x2 - x1; - dy10 = y1 - y0; - dy21 = y2 - y1; - dz10 = z1 - z0; - dz21 = z2 - z1; + deltaX10 = x1 - x0; + deltaX21 = x2 - x1; + deltaY10 = y1 - y0; + deltaY21 = y2 - y1; + deltaZ10 = z1 - z0; + deltaZ21 = z2 - z1; - crx = (dy10 * dz21) - (dz10 * dy21); - cry = (dz10 * dx21) - (dx10 * dz21); - crz = (dx10 * dy21) - (dy10 * dx21); + crossProductX = (deltaY10 * deltaZ21) - (deltaZ10 * deltaY21); + crossProductY = (deltaZ10 * deltaX21) - (deltaX10 * deltaZ21); + crossProductZ = (deltaX10 * deltaY21) - (deltaY10 * deltaX21); - temp1 = -crx * x0 - cry * y0 - crz * z0; - sp48 = (-temp1 - crx * xPos - crz * (zPos + gPathProgress + 1500.0f)) / cry; - if (yPos < sp48) { - *arg0 = sp48; - *arg1 = sp8C; + tempVar = -crossProductX * x0 - crossProductY * y0 - crossProductZ * z0; + heightVal = (-tempVar - crossProductX * xPos - crossProductZ * (zPos + gPathProgress + 1500.0f)) / crossProductY; + + if (yPos < heightVal) { + *floorHeight = heightVal; + *triangleIndex = vertIndex; return true; } + return false; } @@ -1401,7 +1407,7 @@ bool Play_CheckPolyCollision(ObjectId objId, f32 arg1, f32 arg2, f32 arg3, f32 a case OBJ_SCENERY_VS_SPACE_JUNK_1: case OBJ_SCENERY_VS_SPACE_JUNK_2: case OBJ_SCENERY_VS_SPACE_JUNK_3: - case OBJ_SCENERY_147: + case OBJ_SCENERY_LEVEL_OBJECTS: case OBJ_SCENERY_FO_MOUNTAIN_1: case OBJ_SCENERY_CO_BUILDING_9: case OBJ_SCENERY_CO_BUILDING_10: @@ -1448,9 +1454,9 @@ bool Play_CheckPolyCollision(ObjectId objId, f32 arg1, f32 arg2, f32 arg3, f32 a return false; } -s32 Player_CheckPolyCollision(Player* player, ObjectId objId, f32 x, f32 y, f32 z, f32 arg5, f32 arg6, f32 arg7) { +s32 Player_CheckPolyCollision(Player* player, ObjectId objId, f32 x, f32 y, f32 z, f32 arg5, f32 angle, f32 arg7) { Vec3f sp84; - Vec3f sp78; + Vec3f src; Vec3f sp6C; Vec3f sp60; Vec3f sp54; @@ -1459,20 +1465,20 @@ s32 Player_CheckPolyCollision(Player* player, ObjectId objId, f32 x, f32 y, f32 sp84.y = y; sp84.z = z; - Matrix_RotateY(gCalcMatrix, -arg6 * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, -angle * M_DTOR, MTXF_NEW); - sp78.x = player->vel.x; - sp78.y = player->vel.y; - sp78.z = player->vel.z; + src.x = player->vel.x; + src.y = player->vel.y; + src.z = player->vel.z; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp78, &sp54); + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &sp54); if ((player->form == FORM_LANDMASTER) || (player->form == FORM_ON_FOOT)) { - sp78.x = player->pos.x - sp84.x; - sp78.y = player->pos.y - sp84.y; - sp78.z = player->trueZpos - sp84.z; + src.x = player->pos.x - sp84.x; + src.y = player->pos.y - sp84.y; + src.z = player->trueZpos - sp84.z; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp78, &sp6C); + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &sp6C); if (Play_CheckPolyCollision(objId, sp84.x, sp84.y, sp84.z, sp6C.x + sp84.x, sp6C.y + sp84.y, sp6C.z + sp84.z, &sp60, &sp54)) { @@ -1490,43 +1496,43 @@ s32 Player_CheckPolyCollision(Player* player, ObjectId objId, f32 x, f32 y, f32 } } - sp78.x = player->hit3.x - sp84.x; - sp78.y = player->hit3.y - sp84.y; - sp78.z = player->hit3.z - sp84.z; + src.x = player->hit3.x - sp84.x; + src.y = player->hit3.y - sp84.y; + src.z = player->hit3.z - sp84.z; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp78, &sp6C); + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &sp6C); if (Play_CheckPolyCollision(objId, sp84.x, sp84.y, sp84.z, sp6C.x + sp84.x, sp6C.y + sp84.y, sp6C.z + sp84.z, &sp60, &sp54)) { return 3; } - sp78.x = player->hit4.x - sp84.x; - sp78.y = player->hit4.y - sp84.y; - sp78.z = player->hit4.z - sp84.z; + src.x = player->hit4.x - sp84.x; + src.y = player->hit4.y - sp84.y; + src.z = player->hit4.z - sp84.z; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp78, &sp6C); + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &sp6C); if (Play_CheckPolyCollision(objId, sp84.x, sp84.y, sp84.z, sp6C.x + sp84.x, sp6C.y + sp84.y, sp6C.z + sp84.z, &sp60, &sp54)) { return 4; } - sp78.x = player->hit1.x - sp84.x; - sp78.y = player->hit1.y - sp84.y; - sp78.z = player->hit1.z - sp84.z; + src.x = player->hit1.x - sp84.x; + src.y = player->hit1.y - sp84.y; + src.z = player->hit1.z - sp84.z; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp78, &sp6C); + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &sp6C); if (Play_CheckPolyCollision(objId, sp84.x, sp84.y, sp84.z, sp6C.x + sp84.x, sp6C.y + sp84.y, sp6C.z + sp84.z, &sp60, &sp54)) { return 1; } - sp78.x = player->hit2.x - sp84.x; - sp78.y = player->hit2.y - sp84.y; - sp78.z = player->hit2.z - sp84.z; + src.x = player->hit2.x - sp84.x; + src.y = player->hit2.y - sp84.y; + src.z = player->hit2.z - sp84.z; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp78, &sp6C); + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &sp6C); if (Play_CheckPolyCollision(objId, sp84.x, sp84.y, sp84.z, sp6C.x + sp84.x, sp6C.y + sp84.y, sp6C.z + sp84.z, &sp60, &sp54)) { diff --git a/src/overlays/ovl_ending/fox_end1.c b/src/overlays/ovl_ending/fox_end1.c index 4079df32..9d8a5832 100644 --- a/src/overlays/ovl_ending/fox_end1.c +++ b/src/overlays/ovl_ending/fox_end1.c @@ -1767,11 +1767,11 @@ void Ending_8018C21C(void) { Matrix_SetGfxMtx(&gMasterDisp); if (gGreatFoxIntact) { - gSPDisplayList(gMasterDisp++, D_GREAT_FOX_E000000); + gSPDisplayList(gMasterDisp++, aGreatFoxIntactDL); } if (!gGreatFoxIntact) { - gSPDisplayList(gMasterDisp++, D_GREAT_FOX_E003AB0); + gSPDisplayList(gMasterDisp++, aGreatFoxDamagedDL); } RCP_SetupDL(&gMasterDisp, SETUPDL_49); diff --git a/src/overlays/ovl_i1/fox_co.c b/src/overlays/ovl_i1/fox_co.c index 4eef3cc8..74a0ae9a 100644 --- a/src/overlays/ovl_i1/fox_co.c +++ b/src/overlays/ovl_i1/fox_co.c @@ -1244,7 +1244,7 @@ void Corneria_CoGranga_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* data) { void Corneria_CoGranga_Draw(CoGranga* this) { Matrix_Translate(gCalcMatrix, 0.0f, 700.0f, 0.0f, MTXF_APPLY); - Animation_DrawSkeleton(2, D_CO_602BE64, this->vwork, Corneria_CoGranga_OverrideLimbDraw, + Animation_DrawSkeleton(2, aCoGrangaSkel, this->vwork, Corneria_CoGranga_OverrideLimbDraw, Corneria_CoGranga_PostLimbDraw, this, gCalcMatrix); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); diff --git a/src/overlays/ovl_i1/fox_ve1.c b/src/overlays/ovl_i1/fox_ve1.c index 32b8e7c5..91a0dc57 100644 --- a/src/overlays/ovl_i1/fox_ve1.c +++ b/src/overlays/ovl_i1/fox_ve1.c @@ -689,7 +689,7 @@ void Venom1_Ve1MonkeyStatue_Update(Ve1MonkeyStatue* this) { void Venom1_Ve1MonkeyStatue_Draw(Ve1MonkeyStatue* this) { Matrix_Translate(gGfxMatrix, 0.0f, -488.0f, 0.0f, MTXF_APPLY); - Animation_DrawSkeleton(0, D_VE1_900D164, this->vwork, NULL, NULL, this, &gIdentityMatrix); + Animation_DrawSkeleton(0, aVe1MonkeyStatueSkel, this->vwork, NULL, NULL, this, &gIdentityMatrix); } void Venom1_Ve1Generator_Update(Ve1Generator* this) { diff --git a/src/overlays/ovl_i2/fox_sx.c b/src/overlays/ovl_i2/fox_sx.c index d996891a..cb616ac2 100644 --- a/src/overlays/ovl_i2/fox_sx.c +++ b/src/overlays/ovl_i2/fox_sx.c @@ -23,7 +23,7 @@ void SectorX_8018F030(void) { if (actor->obj.status == OBJ_FREE) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_SLIPPY_SX; + actor->obj.id = OBJ_ACTOR_SX_SLIPPY; actor->animFrame = 1; actor->obj.rot.y = 180.0f; actor->obj.pos.x = gPlayer[0].cam.eye.x - 300.0f; @@ -43,7 +43,7 @@ void SectorX_SxSlippy_Setup(void) { Actor_Initialize(slippy); slippy->obj.status = OBJ_INIT; - slippy->obj.id = OBJ_ACTOR_SLIPPY_SX; + slippy->obj.id = OBJ_ACTOR_SX_SLIPPY; slippy->animFrame = -1; slippy->obj.pos.x = gPlayer[0].cam.eye.x + 3000.0f; @@ -174,7 +174,7 @@ void SectorX_SxSlippy_Draw(SxSlippy* this) { case 1: case 2: case 10: - func_edisplay_8005B388(this); + ActorTeamArwing_Draw(this); break; case -1: @@ -205,7 +205,7 @@ void SectorX_8018FA04(f32 x, f32 y, f32 z) { if (actor->obj.status == OBJ_FREE) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_SLIPPY_SX; + actor->obj.id = OBJ_ACTOR_SX_SLIPPY; actor->obj.pos.x = x; actor->obj.pos.y = y; actor->obj.pos.z = z; @@ -307,7 +307,7 @@ bool SectorX_8018FF40(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* } void SectorX_SxSpyborgLeftArm_Draw(SxSpyborgLeftArm* this) { - Animation_DrawSkeleton(3, D_SX_6020C68, this->vwork, SectorX_8018FF40, SectorX_SxSpyborg_PostLimbDraw, this, + Animation_DrawSkeleton(3, aSxSpyborgSkel, this->vwork, SectorX_8018FF40, SectorX_SxSpyborg_PostLimbDraw, this, gCalcMatrix); } @@ -320,7 +320,7 @@ bool SectorX_8018FFDC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* } void SectorX_SxSpyborgRightArm_Draw(SxSpyborgRightArm* this) { - Animation_DrawSkeleton(3, D_SX_6020C68, this->vwork, SectorX_8018FFDC, SectorX_SxSpyborg_PostLimbDraw, this, + Animation_DrawSkeleton(3, aSxSpyborgSkel, this->vwork, SectorX_8018FFDC, SectorX_SxSpyborg_PostLimbDraw, this, gCalcMatrix); } @@ -1103,7 +1103,7 @@ void SectorX_SxSpyborg_Update(SxSpyborg* this) { D_i2_80195640 = 1; - Animation_DrawSkeleton(1, D_SX_6020C68, this->vwork, SectorX_SxSpyborg_OverrideLimbDraw, + Animation_DrawSkeleton(1, aSxSpyborgSkel, this->vwork, SectorX_SxSpyborg_OverrideLimbDraw, SectorX_SxSpyborg_PostLimbDraw, this, &gIdentityMatrix); if (((this->swork[1] != 0) && (this->swork[3] > 0)) && ((this->fwork[4] < 45.0f) || (this->fwork[4] > 315.0f))) { @@ -1369,7 +1369,8 @@ void SectorX_SxSpyborg_Draw(SxSpyborg* this) { if (this->swork[5] == 0) { D_i2_80195640 = 0; - Animation_DrawSkeleton(3, D_SX_6020C68, this->vwork, SectorX_SxSpyborg_OverrideLimbDraw, 0, this, gCalcMatrix); + Animation_DrawSkeleton(3, aSxSpyborgSkel, this->vwork, SectorX_SxSpyborg_OverrideLimbDraw, 0, this, + gCalcMatrix); RCP_SetupDL_64(); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 96); diff --git a/src/overlays/ovl_i3/fox_aq.c b/src/overlays/ovl_i3/fox_aq.c index d2c3c147..58ed5123 100644 --- a/src/overlays/ovl_i3/fox_aq.c +++ b/src/overlays/ovl_i3/fox_aq.c @@ -3744,15 +3744,13 @@ void Aquas_AqSculpin_Draw(AqSculpin* this) { Vec3f jointTable[30]; Matrix_Scale(gCalcMatrix, this->scale, this->scale, this->scale, MTXF_APPLY); - Animation_GetFrameData(&D_AQ_6005954, this->animFrame, jointTable); - Animation_DrawSkeleton(3, D_AQ_6005A80, jointTable, Aquas_AqSculpin_OverrideLimbDraw, Aquas_AqSculpin_PostLimbDraw, - this, gCalcMatrix); + Animation_GetFrameData(&aAqSculpinAnim, this->animFrame, jointTable); + Animation_DrawSkeleton(3, aAqSculpinSkel, jointTable, Aquas_AqSculpin_OverrideLimbDraw, + Aquas_AqSculpin_PostLimbDraw, this, gCalcMatrix); } f32 D_i3_801C025C[2] = { 120.0f, 0.0f }; -s32 D_i3_801C0264[19] = { - 0, 0, 3, 4, 0, 5, 6, 7, 1, 2, 0, 0, 0, 0, 0, 0, 8, 9, 0, -}; +s32 D_i3_801C0264[19] = { 0, 0, 3, 4, 0, 5, 6, 7, 1, 2, 0, 0, 0, 0, 0, 0, 8, 9, 0 }; void Aquas_AqSculpin_Update(AqSculpin* this) { s32 i; @@ -3814,10 +3812,12 @@ void Aquas_AqSculpin_Update(AqSculpin* this) { Math_SmoothStepToF(&this->obj.pos.y, this->fwork[0], 1.0f, D_i3_801C0224[this->iwork[1]], 0); this->fwork[1] += 10.0f; this->vel.x = COS_DEG(this->fwork[1]) * this->iwork[1] * 0.1f; + if ((this->fwork[0] - 1.0f) <= this->obj.pos.y) { this->state = 5; } - if (((gGameFrameCount % 8) == 0)) { + + if ((gGameFrameCount % 8) == 0) { Aquas_Effect366_Spawn(this->obj.pos.x + RAND_FLOAT_CENTERED(100.0f), this->obj.pos.y + RAND_FLOAT_CENTERED(100.0f), this->obj.pos.z + RAND_FLOAT_CENTERED(100.0f), 1.0f, 1); @@ -3826,9 +3826,11 @@ void Aquas_AqSculpin_Update(AqSculpin* this) { case 5: this->vel.z = gPlayer[0].vel.z; + Math_SmoothStepToF(&this->obj.pos.z, gPlayer[0].trueZpos - 1000.0f, 0.1f, 100.0f, 0); Math_SmoothStepToF(&this->vel.x, 0.0f, 1.0f, 2.0f, 0.001f); Math_SmoothStepToAngle(&this->obj.rot.x, D_i3_801C025C[this->iwork[0]], 1.0f, 20.0f, 0); + if (this->obj.rot.x == D_i3_801C025C[this->iwork[0]]) { this->iwork[0]++; if (this->iwork[0] >= 2) { @@ -3853,7 +3855,8 @@ void Aquas_AqSculpin_Update(AqSculpin* this) { case 6: Math_SmoothStepToAngle(&this->obj.rot.x, this->fwork[3], 1.0f, 5.0f, 0); Math_SmoothStepToAngle(&this->obj.rot.y, this->fwork[2], 1.0f, 5.0f, 0); - if (((gGameFrameCount % 4) == 0)) { + + if ((gGameFrameCount % 4) == 0) { Aquas_Effect366_Spawn(this->obj.pos.x + RAND_FLOAT_CENTERED(100.0f), this->obj.pos.y + RAND_FLOAT_CENTERED(100.0f), this->obj.pos.z + RAND_FLOAT_CENTERED(100.0f), 1.0f, 1); @@ -3880,7 +3883,7 @@ void Aquas_AqSculpin_Update(AqSculpin* this) { } else { this->animFrame += 3; } - if (this->animFrame >= Animation_GetFrameCount(&D_AQ_6005954)) { + if (this->animFrame >= Animation_GetFrameCount(&aAqSculpinAnim)) { this->animFrame = 0; } } @@ -4037,14 +4040,14 @@ f32 D_i3_801C02C8[2] = { 255.0f, 68.0f }; s32 D_i3_801C02D0[2] = { 70, 100 }; void Aquas_AqAnglerFish_Draw(AqAnglerFish* this) { - Vec3f sp40[30]; + Vec3f frameTable[30]; Matrix_Push(&gCalcMatrix); Matrix_Push(&gGfxMatrix); Matrix_Scale(gCalcMatrix, this->scale, this->scale, this->scale, MTXF_APPLY); - Animation_GetFrameData(&D_AQ_6002628, this->animFrame, sp40); - Animation_DrawSkeleton(3, D_AQ_6002874, sp40, Aquas_AqAnglerFish_OverrideLimbDraw, Aquas_AqAnglerFish_PostLimbDraw, - this, gCalcMatrix); + Animation_GetFrameData(&aAqAnglerFishAnim, this->animFrame, frameTable); + Animation_DrawSkeleton(3, aAqAnglerFishSkel, frameTable, Aquas_AqAnglerFish_OverrideLimbDraw, + Aquas_AqAnglerFish_PostLimbDraw, this, gCalcMatrix); Matrix_Pop(&gGfxMatrix); Matrix_Pop(&gCalcMatrix); Matrix_Push(&gGfxMatrix); @@ -4127,7 +4130,7 @@ void Aquas_AqAnglerFish_Update(AqAnglerFish* this) { } this->animFrame++; - if (this->animFrame >= Animation_GetFrameCount(&D_AQ_6002628)) { + if (this->animFrame >= Animation_GetFrameCount(&aAqAnglerFishAnim)) { this->animFrame = 0; } @@ -4373,7 +4376,7 @@ void Aquas_AqSpindlyFish_Update(AqSpindlyFish* this) { } this->animFrame++; - if (Animation_GetFrameCount(&D_AQ_60260EC) < this->animFrame) { + if (Animation_GetFrameCount(&aAqSpindlyFishAnim) < this->animFrame) { this->animFrame = 0; } @@ -4491,15 +4494,15 @@ void Aquas_AqSpindlyFish_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { } void Aquas_AqSpindlyFish_Draw(Actor* this) { - Vec3f sp30[30]; + Vec3f frameTable[30]; RCP_SetupDL(&gMasterDisp, SETUPDL_57); if ((this->timer_0C6 % 2) != 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_61); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } - Animation_GetFrameData(&D_AQ_60260EC, this->animFrame, sp30); - Animation_DrawSkeleton(3, D_AQ_60263F8, sp30, Aquas_AqSpindlyFish_OverrideLimbDraw, + Animation_GetFrameData(&aAqSpindlyFishAnim, this->animFrame, frameTable); + Animation_DrawSkeleton(3, aAqSpindlyFishSkel, frameTable, Aquas_AqSpindlyFish_OverrideLimbDraw, Aquas_AqSpindlyFish_PostLimbDraw, this, gCalcMatrix); } @@ -4935,17 +4938,17 @@ void Aquas_AqGaroa_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { } void Aquas_AqGaroa_Draw(AqGaroa* this) { - Vec3f sp30[30]; + Vec3f frameTable[30]; if ((this->state >= 3) && (this->state < 5)) { - Animation_GetFrameData(&D_AQ_602AC28, this->animFrame, sp30); + Animation_GetFrameData(&D_AQ_602AC28, this->animFrame, frameTable); } else { - Animation_GetFrameData(&D_AQ_6024F80, this->animFrame, sp30); + Animation_GetFrameData(&D_AQ_6024F80, this->animFrame, frameTable); } Matrix_Translate(gCalcMatrix, 0.0f, -150.0f, 100.0f, MTXF_APPLY); - Animation_DrawSkeleton(3, D_AQ_602512C, sp30, Aquas_AqGaroa_OverrideLimbDraw, Aquas_AqGaroa_PostLimbDraw, this, - gCalcMatrix); + Animation_DrawSkeleton(3, aAqGaroaSkel, frameTable, Aquas_AqGaroa_OverrideLimbDraw, Aquas_AqGaroa_PostLimbDraw, + this, gCalcMatrix); } void Aquas_AqSquid_Update(AqSquid* this) { @@ -5028,7 +5031,7 @@ void Aquas_AqSquid_Update(AqSquid* this) { case 1: this->animFrame++; - if (this->animFrame >= Animation_GetFrameCount(&D_AQ_6000AE4)) { + if (this->animFrame >= Animation_GetFrameCount(&aAqSquidAnim)) { this->animFrame = 0; } if (this->animFrame == 36) { @@ -5076,7 +5079,7 @@ void Aquas_AqSquid_Update(AqSquid* this) { case 2: this->animFrame++; - if ((this->animFrame >= Animation_GetFrameCount(&D_AQ_6000AE4)) && (this->fwork[8] < 1.0f)) { + if ((this->animFrame >= Animation_GetFrameCount(&aAqSquidAnim)) && (this->fwork[8] < 1.0f)) { this->animFrame = 0; } if (this->animFrame == 40) { @@ -5215,7 +5218,7 @@ void Aquas_AqSquid_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { } void Aquas_AqSquid_Draw(AqSquid* this) { - Vec3f sp40[30]; + Vec3f frameTable[30]; RCP_SetupDL(&gMasterDisp, SETUPDL_29); if ((this->timer_0C6 % 2) != 0) { @@ -5232,8 +5235,8 @@ void Aquas_AqSquid_Draw(AqSquid* this) { Matrix_RotateX(gCalcMatrix, (this->obj.rot.x + 90.0f) * M_DTOR, MTXF_APPLY); } - Animation_GetFrameData(&D_AQ_6000AE4, this->animFrame, sp40); - Animation_DrawSkeleton(3, D_AQ_6000DB0, sp40, NULL, Aquas_AqSquid_PostLimbDraw, this, gCalcMatrix); + Animation_GetFrameData(&aAqSquidAnim, this->animFrame, frameTable); + Animation_DrawSkeleton(3, aAqSquidSkel, frameTable, NULL, Aquas_AqSquid_PostLimbDraw, this, gCalcMatrix); } void Aquas_AqSeaweed_Update(AqSeaweed* this) { @@ -5281,7 +5284,7 @@ void Aquas_AqSeaweed_Update(AqSeaweed* this) { void Aquas_AqSeaweed_Draw(AqSeaweed* this) { gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - Animation_DrawSkeleton(1, D_AQ_6020C6C, this->vwork, NULL, NULL, &this->index, &gIdentityMatrix); + Animation_DrawSkeleton(1, aAqSeaweedSkel, this->vwork, NULL, NULL, &this->index, &gIdentityMatrix); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); } diff --git a/src/overlays/ovl_i3/fox_so.c b/src/overlays/ovl_i3/fox_so.c index e6be1f26..c42de722 100644 --- a/src/overlays/ovl_i3/fox_so.c +++ b/src/overlays/ovl_i3/fox_so.c @@ -516,7 +516,7 @@ void Solar_SoRock_Draw(SoRock1* this) { switch (this->obj.id) { case OBJ_ACTOR_SO_ROCK_1: - gSPDisplayList(gMasterDisp++, D_SO_6017370); + gSPDisplayList(gMasterDisp++, aSoRock1DL); break; case OBJ_ACTOR_SO_ROCK_2: @@ -524,11 +524,11 @@ void Solar_SoRock_Draw(SoRock1* this) { RCP_SetupDL(&gMasterDisp, SETUPDL_41); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255); } - gSPDisplayList(gMasterDisp++, D_SO_6017090); + gSPDisplayList(gMasterDisp++, aSoRock2DL); break; case OBJ_ACTOR_SO_ROCK_3: - gSPDisplayList(gMasterDisp++, D_SO_6016CF0); + gSPDisplayList(gMasterDisp++, aSoRock3DL); break; } diff --git a/src/overlays/ovl_i3/fox_zo.c b/src/overlays/ovl_i3/fox_zo.c index ac5d4133..aacc4f55 100644 --- a/src/overlays/ovl_i3/fox_zo.c +++ b/src/overlays/ovl_i3/fox_zo.c @@ -521,53 +521,53 @@ bool Zoness_ZoBird_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3 } void Zoness_ZoBird_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { - Vec3f sp24 = { 0.0f, 0.0f, 0.0f }; + Vec3f src = { 0.0f, 0.0f, 0.0f }; ZoBird* this = (ZoBird*) thisx; if (this->state == 1) { switch (limbIndex) { case 0: - Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[0]); + Matrix_MultVec3f(gCalcMatrix, &src, &this->vwork[0]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[11]); break; case 1: - Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[1]); + Matrix_MultVec3f(gCalcMatrix, &src, &this->vwork[1]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[12]); break; case 2: - Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[2]); + Matrix_MultVec3f(gCalcMatrix, &src, &this->vwork[2]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[13]); break; case 3: - Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[3]); + Matrix_MultVec3f(gCalcMatrix, &src, &this->vwork[3]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[14]); break; case 4: - Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[4]); + Matrix_MultVec3f(gCalcMatrix, &src, &this->vwork[4]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[15]); break; case 5: - Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[5]); + Matrix_MultVec3f(gCalcMatrix, &src, &this->vwork[5]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[16]); break; case 6: - Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[6]); + Matrix_MultVec3f(gCalcMatrix, &src, &this->vwork[6]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[17]); break; case 7: - Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[7]); + Matrix_MultVec3f(gCalcMatrix, &src, &this->vwork[7]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[18]); break; case 8: - Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[8]); + Matrix_MultVec3f(gCalcMatrix, &src, &this->vwork[8]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[19]); break; case 9: - Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[9]); + Matrix_MultVec3f(gCalcMatrix, &src, &this->vwork[9]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[20]); break; case 10: - Matrix_MultVec3f(gCalcMatrix, &sp24, &this->vwork[10]); + Matrix_MultVec3f(gCalcMatrix, &src, &this->vwork[10]); Matrix_GetYRPAngles(gCalcMatrix, &this->vwork[21]); break; } @@ -578,9 +578,9 @@ void Zoness_ZoBird_Draw(ZoBird* this) { Vec3f frameTable[30]; Matrix_Scale(gCalcMatrix, this->scale, this->scale, this->scale, MTXF_APPLY); - Animation_GetFrameData(&D_ZO_600E5EC, this->animFrame, frameTable); - Animation_DrawSkeleton(3, D_ZO_600E7D8, frameTable, Zoness_ZoBird_OverrideLimbDraw, Zoness_ZoBird_PostLimbDraw, - this, gCalcMatrix); + Animation_GetFrameData(&aZoBirdAnim, this->animFrame, frameTable); + Animation_DrawSkeleton(3, aZoBirdSkel, frameTable, Zoness_ZoBird_OverrideLimbDraw, Zoness_ZoBird_PostLimbDraw, this, + gCalcMatrix); } void Zoness_ZoBird_Update(ZoBird* this) { @@ -618,7 +618,7 @@ void Zoness_ZoBird_Update(ZoBird* this) { this->animFrame++; - if (Animation_GetFrameCount(&D_ZO_600E5EC) < this->animFrame) { + if (Animation_GetFrameCount(&aZoBirdAnim) < this->animFrame) { this->animFrame = 0; } @@ -638,10 +638,10 @@ void Zoness_ZoBird_Update(ZoBird* this) { void Zoness_80190790(ZoDodora* this) { s32 pad[2]; - f32 temp1; - PosRot* snakePosRot; - Vec3f sp44; - Vec3f sp38; + f32 angle; + PosRot* zoDodoraPosRotPtr; + Vec3f src; + Vec3f dest; s32 i; Actor* otherActor; @@ -656,12 +656,14 @@ void Zoness_80190790(ZoDodora* this) { this->fwork[1] += 5.0f; this->rot_0F4.z = SIN_DEG(this->fwork[1]) * 30.0f; - for (i = 0, otherActor = gActors; i < ARRAY_COUNT(gActors); i++, otherActor++) { + for (i = 0, otherActor = &gActors[0]; i < ARRAY_COUNT(gActors); i++, otherActor++) { if ((otherActor->obj.status == OBJ_ACTIVE) && (otherActor->obj.id == OBJ_ACTOR_ZO_DODORA_WP_COUNT) && (otherActor->iwork[0] == this->iwork[0])) { - temp1 = Math_RadToDeg( + angle = Math_RadToDeg( Math_Atan2F(otherActor->obj.pos.x - this->obj.pos.x, otherActor->obj.pos.z - this->obj.pos.z)); - Math_SmoothStepToAngle(&this->rot_0F4.y, temp1, 0.2f, 3.0f, 0.0f); + + Math_SmoothStepToAngle(&this->rot_0F4.y, angle, 0.2f, 3.0f, 0.0f); + if ((fabsf(this->obj.pos.x - otherActor->obj.pos.x) < 500.0f) && (fabsf(this->obj.pos.z - otherActor->obj.pos.z) < 500.0f)) { otherActor->obj.status = OBJ_FREE; @@ -673,22 +675,22 @@ void Zoness_80190790(ZoDodora* this) { Matrix_RotateY(gCalcMatrix, this->rot_0F4.y * M_DTOR, MTXF_NEW); - sp44.x = 0.f; - sp44.y = 0.f; - sp44.z = 20.0f; + src.x = 0.f; + src.y = 0.f; + src.z = 20.0f; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - this->vel.x = sp38.x; - this->vel.z = sp38.z; + this->vel.x = dest.x; + this->vel.z = dest.z; - snakePosRot = &gZoDodoraPosRots[this->counter_04E]; - snakePosRot->pos.x = this->obj.pos.x; - snakePosRot->pos.y = this->obj.pos.y; - snakePosRot->pos.z = this->obj.pos.z; - snakePosRot->rot.x = this->rot_0F4.x; - snakePosRot->rot.y = this->rot_0F4.y; - snakePosRot->rot.z = this->rot_0F4.z; + zoDodoraPosRotPtr = &gZoDodoraPosRots[this->counter_04E]; + zoDodoraPosRotPtr->pos.x = this->obj.pos.x; + zoDodoraPosRotPtr->pos.y = this->obj.pos.y; + zoDodoraPosRotPtr->pos.z = this->obj.pos.z; + zoDodoraPosRotPtr->rot.x = this->rot_0F4.x; + zoDodoraPosRotPtr->rot.y = this->rot_0F4.y; + zoDodoraPosRotPtr->rot.z = this->rot_0F4.z; } void Zoness_ZoDodora_Update(ZoDodora* this) { @@ -708,6 +710,7 @@ void Zoness_ZoDodora_Update(ZoDodora* this) { Zoness_80190790(this); + // Invulnerable if (this->dmgType != DMG_NONE) { this->dmgType = DMG_NONE; AUDIO_PLAY_SFX(NA_SE_EN_REFLECT, this->sfxSource, 4); @@ -717,12 +720,13 @@ void Zoness_ZoDodora_Update(ZoDodora* this) { s16 D_i3_801BF56C[20] = { 0, 190, 180, 170, 160, 150, 140, 130, 120, 110, 100, 90, 80, 70, 60, 50, 40, 30, 20, 10, }; -u8 D_i3_801BF594[20] = { +u8 sZoDodoraPartIdx[20] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, }; -Gfx* D_i3_801BF5A8[3] = { D_ZO_60012A0, D_ZO_60239E0, D_ZO_6023730 }; +Gfx* sZoDodoraParts[3] = { aZoDodoraHeadDL, aZoDodoraBodyDL, aZoDodoraTailDL }; -void Zoness_80190B4C(f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 zRot, u8 arg6, s32 arg7) { +void Zoness_ZoDodora_DrawParts(f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 zRot, u8 partIdx, + bool colorFlicker) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, xPos, yPos, zPos + gPathProgress, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, M_DTOR * yRot, MTXF_APPLY); @@ -732,11 +736,11 @@ void Zoness_80190B4C(f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 zRot, Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); - if (arg7 != 0) { + if (colorFlicker) { RCP_SetupDL_64(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 40, 40, 255, 255); } - gSPDisplayList(gMasterDisp++, D_i3_801BF5A8[arg6]); + gSPDisplayList(gMasterDisp++, sZoDodoraParts[partIdx]); Matrix_Pop(&gGfxMatrix); } @@ -745,29 +749,32 @@ typedef struct { Hitbox boxes[1]; } JntHitbox; -void Zoness_80190D0C(ZoDodora* this) { +void Zoness_ZoDodora_Draw2(ZoDodora* this) { Hitbox* hitbox = (((JntHitbox*) SEGMENTED_TO_VIRTUAL(aZoDodoraHitbox))->boxes); s32 i; s32 k; - PosRot* temp_s0; + PosRot* zoDodoraPosRots; for (i = this->unk_04A = 0; i < 20; i++, hitbox++) { k = (D_i3_801BF56C[i] + this->counter_04E) % 200; - temp_s0 = &gZoDodoraPosRots[k]; + zoDodoraPosRots = &gZoDodoraPosRots[k]; + + hitbox->z.offset = zoDodoraPosRots->pos.z - this->obj.pos.z; + hitbox->y.offset = zoDodoraPosRots->pos.y - this->obj.pos.y; + hitbox->x.offset = zoDodoraPosRots->pos.x - this->obj.pos.x; + + Zoness_ZoDodora_DrawParts(zoDodoraPosRots->pos.x, zoDodoraPosRots->pos.y, zoDodoraPosRots->pos.z, + zoDodoraPosRots->rot.x, zoDodoraPosRots->rot.y, zoDodoraPosRots->rot.z, + sZoDodoraPartIdx[i], this->timer_0C6 % 2U); - hitbox->z.offset = temp_s0->pos.z - this->obj.pos.z; - hitbox->y.offset = temp_s0->pos.y - this->obj.pos.y; - hitbox->x.offset = temp_s0->pos.x - this->obj.pos.x; - Zoness_80190B4C(temp_s0->pos.x, temp_s0->pos.y, temp_s0->pos.z, temp_s0->rot.x, temp_s0->rot.y, temp_s0->rot.z, - D_i3_801BF594[i], this->timer_0C6 % 2U); if (gPlayState != PLAY_PAUSE) { - Math_SmoothStepToF(&temp_s0->pos.y, this->fwork[2], 1.0f, 10.0f, 0.0f); + Math_SmoothStepToF(&zoDodoraPosRots->pos.y, this->fwork[2], 1.0f, 10.0f, 0.0f); } } } void Zoness_ZoDodora_Draw(ZoDodora* this) { - Zoness_80190D0C(this); + Zoness_ZoDodora_Draw2(this); } void Zoness_ZoFish_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { @@ -2014,7 +2021,7 @@ void Zoness_ZoSarumarine_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { void Zoness_ZoSarumarine_Draw(ZoSarumarine* this) { Matrix_Translate(gCalcMatrix, 0.0f, this->fwork[ZO_FWK_3], 0.0f, MTXF_APPLY); Matrix_Scale(gCalcMatrix, 2.6f, 2.6f, 2.6f, MTXF_APPLY); - Animation_DrawSkeleton(3, D_ZO_6019E18, this->vwork, Zoness_ZoSarumarine_OverrideLimbDraw, + Animation_DrawSkeleton(3, aZoSarumarineSkel, this->vwork, Zoness_ZoSarumarine_OverrideLimbDraw, Zoness_ZoSarumarine_PostLimbDraw, this, gCalcMatrix); } diff --git a/src/overlays/ovl_i4/fox_bo.c b/src/overlays/ovl_i4/fox_bo.c index 8bec81f5..36a93e7b 100644 --- a/src/overlays/ovl_i4/fox_bo.c +++ b/src/overlays/ovl_i4/fox_bo.c @@ -2040,12 +2040,12 @@ void Bolse_BoBaseCore_PostLimbDraw(s32 index, Vec3f* vec, void* thisx) { } void Bolse_BoBaseCore_Draw(BoBaseCore* this) { - Animation_GetFrameData(&D_BO_6001C64, 0, this->vwork); + Animation_GetFrameData(&aBoBaseCoreAnim, 0, this->vwork); if (this->state >= 2) { - Animation_DrawSkeleton(3, D_BO_6001FB0, this->vwork, Bolse_BoBaseCore_OverrideLimbDraw, + Animation_DrawSkeleton(3, aBoBaseCoreSkel, this->vwork, Bolse_BoBaseCore_OverrideLimbDraw, Bolse_BoBaseCore_PostLimbDraw, this, gCalcMatrix); } else { - Animation_DrawSkeleton(3, D_BO_6001FB0, this->vwork, NULL, NULL, this, gCalcMatrix); + Animation_DrawSkeleton(3, aBoBaseCoreSkel, this->vwork, NULL, NULL, this, gCalcMatrix); } } diff --git a/src/overlays/ovl_i4/fox_sz.c b/src/overlays/ovl_i4/fox_sz.c index 12750276..254a2ebc 100644 --- a/src/overlays/ovl_i4/fox_sz.c +++ b/src/overlays/ovl_i4/fox_sz.c @@ -1749,7 +1749,7 @@ void SectorZ_SpaceJunkDraw(SzSpaceJunk* this) { gSPDisplayList(gMasterDisp++, aSzSpaceJunk2DL); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); RCP_SetupDL(&gMasterDisp, SETUPDL_57); - gSPDisplayList(gMasterDisp++, aSZSpaceJunk4DL); + gSPDisplayList(gMasterDisp++, aSzSpaceJunk4DL); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); } diff --git a/src/overlays/ovl_i5/fox_ma.c b/src/overlays/ovl_i5/fox_ma.c index d2683872..6190f0bb 100644 --- a/src/overlays/ovl_i5/fox_ma.c +++ b/src/overlays/ovl_i5/fox_ma.c @@ -1723,7 +1723,7 @@ void Macbeth_8019F164(MaTrainCar6* this) { sp6C.z = gPlayer[0].trueZpos - 500.0f - this->obj.pos.z; for (i = 0; i < ARRAY_COUNT(gActors); i++) { - if ((gActors[i].obj.id == OBJ_ACTOR_219) && (gActors[i].obj.status == OBJ_ACTIVE)) { + if ((gActors[i].obj.id == OBJ_ACTOR_MA_FALLING_BOULDER) && (gActors[i].obj.status == OBJ_ACTIVE)) { if ((this->obj.pos.z < (gActors[i].obj.pos.z + 3000.0f)) && ((gActors[i].obj.pos.z - this->obj.pos.z) < 5000.0f)) { sp6C.x = gActors[i].obj.pos.x - this->obj.pos.x + this->fwork[25]; @@ -3319,7 +3319,7 @@ void Macbeth_MaBoulder_Draw(MaBoulder* this) { Matrix_Scale(gGfxMatrix, this->scale, this->scale, this->scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); } - gSPDisplayList(gMasterDisp++, D_MA_601A2B0); + gSPDisplayList(gMasterDisp++, aMaBoulderDL); } } @@ -3785,7 +3785,7 @@ void Macbeth_MaProximityLight_Draw(MaProximityLight* this) { void Macbeth_801A67BC(s32 arg0) { } -void Macbeth_Actor219_Update(Actor219* this) { +void Macbeth_MaFallingBoulder_Update(MaFallingBoulder* this) { if ((gPlayer[0].trueZpos - this->obj.pos.z) < -300.0f) { Object_Kill(&this->obj, this->sfxSource); } @@ -3804,7 +3804,8 @@ void Macbeth_Actor219_Update(Actor219* this) { } } -void Macbeth_Actor219_Draw(Actor219* this) { +void Macbeth_MaFallingBoulder_Draw(MaFallingBoulder* this) { + /* Unimplemented */ } void Macbeth_801A68F8(Actor207* this, s16 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7) { diff --git a/src/overlays/ovl_i5/fox_ti.c b/src/overlays/ovl_i5/fox_ti.c index bce3610a..92915301 100644 --- a/src/overlays/ovl_i5/fox_ti.c +++ b/src/overlays/ovl_i5/fox_ti.c @@ -428,15 +428,15 @@ void Titania_TiFekuda_Update(TiFekuda* this) { } void Titania_TiFekuda_Draw(TiFekuda* this) { - gSPDisplayList(gMasterDisp++, D_TI1_700C4B0); + gSPDisplayList(gMasterDisp++, aTi1FekudaDL); Matrix_Translate(gGfxMatrix, 0.0f, -50.0f, 178.0f, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, this->fwork[4] * M_DTOR, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, this->fwork[3] * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if (this->health != 0) { - gSPDisplayList(gMasterDisp++, D_TI1_700B9C0); + gSPDisplayList(gMasterDisp++, aTi1FekudaGun1DL); RCP_SetupDL(&gMasterDisp, SETUPDL_33); - gSPDisplayList(gMasterDisp++, D_TI1_700C980); + gSPDisplayList(gMasterDisp++, aTi1FekudaGun2DL); } } @@ -598,7 +598,7 @@ void Titania_TiBoulder_Draw(TiBoulder* this) { Matrix_Scale(gGfxMatrix, this->scale, this->scale, this->scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); } - gSPDisplayList(gMasterDisp++, D_TI1_700E3F0); + gSPDisplayList(gMasterDisp++, aTiBoulderDL); } void Titania_TiLandmine_Update(TiLandmine* this) { @@ -853,7 +853,7 @@ void Titania_TiRasco_Update(Actor* this) { sp38->obj.pos.z = this->obj.pos.z + dest.z; } - if (++this->animFrame >= Animation_GetFrameCount(&D_TI1_700D534)) { + if (++this->animFrame >= Animation_GetFrameCount(&aTiRascoAnim)) { this->state++; } break; @@ -864,7 +864,7 @@ void Titania_TiRasco_Update(Actor* this) { if (this->health == 0) { this->obj.status = OBJ_DYING; - Animation_GetFrameData(&D_TI1_700D534, this->animFrame, this->vwork); + Animation_GetFrameData(&aTiRascoAnim, this->animFrame, this->vwork); Animation_DrawSkeleton(0, aTiRascoSkel, this->vwork, Titania_8018AFD4, Titania_8018B1B4, this, &gIdentityMatrix); func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 10.0f); @@ -874,7 +874,7 @@ void Titania_TiRasco_Update(Actor* this) { } void Titania_TiRasco_Draw(TiRasco* this) { - Animation_GetFrameData(&D_TI1_700D534, this->animFrame, this->vwork); + Animation_GetFrameData(&aTiRascoAnim, this->animFrame, this->vwork); Animation_DrawSkeleton(0, aTiRascoSkel, this->vwork, Titania_TiRasco_OverrideLimbDraw, Titania_TiRasco_PostLimbDraw, this, &gIdentityMatrix); } @@ -1057,12 +1057,12 @@ void Titania_TiBomb_Draw(TiBomb* this) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); Matrix_Scale(gGfxMatrix, 1.5f, 1.5f, 1.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_TI1_7009D60); + gSPDisplayList(gMasterDisp++, aTi1Bomb1DL); RCP_SetupDL(&gMasterDisp, SETUPDL_34); index = this->iwork[0]; gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, D_i5_801B75E4[0][index], D_i5_801B75E4[1][index], D_i5_801B75E4[2][index], 255); - gSPDisplayList(gMasterDisp++, aTi1BombDL); + gSPDisplayList(gMasterDisp++, aTi1Bomb2DL); } void Titania_TiDesertCrawler_Init(TiDesertCrawler* this) { diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index bae0875b..ffb856b0 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -192,7 +192,7 @@ void Andross_80187C5C(void) { scenery360->obj.pos.z += gLevelObjects[i].zPos2; scenery360->obj.pos.y = gLevelObjects[i].yPos; scenery360->obj.rot.y = gLevelObjects[i].rot.y; - if (scenery360->obj.id == OBJ_SCENERY_147) { + if (scenery360->obj.id == OBJ_SCENERY_LEVEL_OBJECTS) { scenery360->pathIndex = gLevelObjects[i].rot.z; } Object_SetInfo(&scenery360->info, scenery360->obj.id); @@ -240,7 +240,7 @@ void Andross_80187C5C(void) { } } -void Andross_Actor199_Update(Actor199* this) { +void Andross_ActorTeamArwing_Update(ActorTeamArwing* this) { s32 i; f32 xDisplacement; f32 yDisplacement; @@ -253,7 +253,7 @@ void Andross_Actor199_Update(Actor199* this) { f32 temp_fv1; for (scenery360 = gScenery360, i = 0; i < 200; i++, scenery360++) { - if ((scenery360->obj.id == OBJ_SCENERY_147) && (scenery360->pathIndex == (u8) this->counter_04E)) { + if ((scenery360->obj.id == OBJ_SCENERY_LEVEL_OBJECTS) && (scenery360->pathIndex == (u8) this->counter_04E)) { this->fwork[3] = scenery360->obj.pos.x; this->fwork[4] = scenery360->obj.pos.y; this->fwork[5] = scenery360->obj.pos.z; @@ -289,6 +289,7 @@ void Andross_Actor199_Update(Actor199* this) { Math_SmoothStepToAngle(&this->rot_0F4.x, Math_RadToDeg(Math_Atan2F(yDisplacement, sqrtf(SQ(xDisplacement) + SQ(zDisplacement)))), 0.1f, this->fwork[2], 0.0f); + temp_fv1 = Math_SmoothStepToAngle(&this->rot_0F4.y, yaw, 0.1f, this->fwork[2], 0.0001f) * 40.0f; if (temp_fv1 < 0.0f) { var_fv0 = temp_fv1 * -1.0f; @@ -314,8 +315,8 @@ void Andross_Actor199_Update(Actor199* this) { this->vel.z = vel.z; } -void Andross_Actor199_Draw(Actor199* this) { - func_edisplay_8005B388(this); +void Andross_ActorTeamArwing_Draw(ActorTeamArwing* this) { + ActorTeamArwing_Draw(this); } void Andross_80188468(void) { @@ -328,7 +329,7 @@ void Andross_80188468(void) { actor->obj.pos.z = -11959.0f; actor->iwork[11] = 1; actor->iwork[14] = 1; - actor->obj.id = OBJ_ACTOR_199; + actor->obj.id = OBJ_ACTOR_TEAM_ARWING; Object_SetInfo(&actor->info, actor->obj.id); AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } @@ -360,7 +361,7 @@ void Andross_AndBrainWaste_Draw(AndBrainWaste* this) { Matrix_Scale(gGfxMatrix, 1.1f, 0.9f, 1.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_VE2_6009300); + gSPDisplayList(gMasterDisp++, aAndBrainWasteDL); } void Andross_AndBrainWaste_Setup(AndBrainWaste* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel) { @@ -3625,7 +3626,7 @@ void Andross_AndLaserEmitter_Update(AndLaserEmitter* this) { } void Andross_AndLaserEmitter_Draw(AndLaserEmitter* this) { - gSPDisplayList(gMasterDisp++, D_VE2_6007E20); + gSPDisplayList(gMasterDisp++, aAndLaserEmitterDL); if (this->timer_0BC != 0) { f32 scale = 2.5f; diff --git a/src/overlays/ovl_i6/fox_ve2.c b/src/overlays/ovl_i6/fox_ve2.c index 1ec85a07..9c843d04 100644 --- a/src/overlays/ovl_i6/fox_ve2.c +++ b/src/overlays/ovl_i6/fox_ve2.c @@ -22,8 +22,8 @@ bool Venom2_Ve2Base_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec } void Venom2_Ve2Base_Draw(Ve2Base* this) { - Animation_GetFrameData(&D_VE2_6014904, 0, this->vwork); - Animation_DrawSkeleton(3, D_VE2_60149D0, this->vwork, Venom2_Ve2Base_OverrideLimbDraw, NULL, this, gCalcMatrix); + Animation_GetFrameData(&aVe2BaseAnim, 0, this->vwork); + Animation_DrawSkeleton(3, aVe2BaseSkel, this->vwork, Venom2_Ve2Base_OverrideLimbDraw, NULL, this, gCalcMatrix); } void Venom2_UpdateStarWolfEvents(ActorAllRange* this) { From 669fff8759859306d6ca8ae71f40073a934a188f Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Thu, 15 Aug 2024 15:31:20 -0300 Subject: [PATCH 145/151] SzGreatFox --- include/sf64object.h | 8 ++++---- src/overlays/ovl_i4/fox_sz.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/sf64object.h b/include/sf64object.h index af326665..6b396c61 100644 --- a/include/sf64object.h +++ b/include/sf64object.h @@ -1111,9 +1111,9 @@ typedef Sprite Ve1BossTrigger2; typedef Sprite Ve1BossTrigger3; typedef Sprite Ve1BossTrigger4; typedef Sprite GfoxTarget; -typedef Actor CoGaruda1; -typedef Actor CoGaruda2; -typedef Actor CoGaruda3; +typedef Actor CoGaruda1; // Robot that pushes buildings. +typedef Actor CoGaruda2; // Robot that throws I-Beams. +typedef Actor CoGaruda3; // Robot that spins I-Beams. typedef Actor CoGarudaDestroy; typedef Actor MeMolarRock; typedef Actor MeMeteor1; @@ -1248,7 +1248,7 @@ typedef Boss BoBase; typedef Boss BoBaseShield; typedef Boss BoBaseCore; typedef Boss Ve2Base; -typedef Boss GreatFoxSZ; +typedef Boss SzGreatFox; typedef Boss SyShogun; typedef Boss SoVulkain; typedef Boss KaSaucerer; diff --git a/src/overlays/ovl_i4/fox_sz.c b/src/overlays/ovl_i4/fox_sz.c index 254a2ebc..2bcbf72a 100644 --- a/src/overlays/ovl_i4/fox_sz.c +++ b/src/overlays/ovl_i4/fox_sz.c @@ -1141,7 +1141,7 @@ void SectorZ_LevelComplete(Player* player) { ActorCutscene* falco = &gActors[1]; ActorCutscene* peppy = &gActors[2]; ActorCutscene* slippy = &gActors[3]; - GreatFoxSZ* greatFox = &gBosses[SZ_GREAT_FOX]; + SzGreatFox* greatFox = &gBosses[SZ_GREAT_FOX]; f32 direction; PRINTF("Enm->time0 %d\n"); @@ -1758,7 +1758,7 @@ Vec3f sFireSmokeOffsetPos[] = { { 612.0f, 409.0f, 386.0f }, { 1027.0f, 141.0f, 3 { 600.0f, 385.0f, 380.0f }, { 776.0f, 245.0f, 384.0f }, { 376.0f, 123.0f, 384.0f }, { 428.0f, 174.0f, 383.0f }, { 722.0f, 306.0f, 383.0f }, { 530.0f, 380.0f, 385.0f } }; -void SectorZ_SzGreatFox_Update(GreatFoxSZ* this) { +void SectorZ_SzGreatFox_Update(SzGreatFox* this) { s32 i; s32 j; f32 x; @@ -1834,7 +1834,7 @@ void SectorZ_SzGreatFox_Update(GreatFoxSZ* this) { } } -void SectorZ_SzGreatFox_Draw(GreatFoxSZ* this) { +void SectorZ_SzGreatFox_Draw(SzGreatFox* this) { gSPFogPosition(gMasterDisp++, gFogNear, 1005); Cutscene_DrawGreatFox(); } @@ -1844,7 +1844,7 @@ void SectorZ_LoadLevelObjects(void) { s32 j; Actor* actor; Scenery360* scenery360; - GreatFoxSZ* greatFox = &gBosses[SZ_GREAT_FOX]; + SzGreatFox* greatFox = &gBosses[SZ_GREAT_FOX]; gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]); From e82019fa2bd527bca3a9dad48175a6b8f2a1fee7 Mon Sep 17 00:00:00 2001 From: Alejandro Asenjo Nitti <96613413+sonicdcer@users.noreply.github.com> Date: Sat, 24 Aug 2024 19:36:53 -0300 Subject: [PATCH 146/151] Actor Docs (#270) * Docs * actor timer_04C -> work_04C * Actor & Boss unk_04A -> work_04A * actor & boss unk_048 -> work_048 * actor & boss unk_046 -> work_046 * boss unk_044 -> work_044 * actor event docs * ActorEvent docs * name all Event Actor IDs * EVID names in EventActorInfo comments * refactor EVC_PASSED_ALL_RINGS by @inspectredc * clarification comment * some option docs * audio enums and macros * some audio renamings --- assets/yaml/jp/rev0/ast_7_ti_1.yaml | 8 +- assets/yaml/jp/rev0/ast_allies.yaml | 8 +- assets/yaml/jp/rev0/ast_aquas.yaml | 20 +- assets/yaml/jp/rev0/ast_area_6.yaml | 36 +- assets/yaml/jp/rev0/ast_common.yaml | 4 +- assets/yaml/jp/rev0/ast_corneria.yaml | 4 +- assets/yaml/jp/rev0/ast_enmy_planet.yaml | 40 +- assets/yaml/jp/rev0/ast_enmy_space.yaml | 48 +- assets/yaml/jp/rev0/ast_fortuna.yaml | 4 +- assets/yaml/jp/rev0/ast_katina.yaml | 8 +- assets/yaml/jp/rev0/ast_macbeth.yaml | 20 +- assets/yaml/jp/rev0/ast_map.yaml | 4 +- assets/yaml/jp/rev0/ast_meteo.yaml | 64 +- assets/yaml/jp/rev0/ast_sector_x.yaml | 108 +- assets/yaml/jp/rev0/ast_sector_y.yaml | 40 +- assets/yaml/jp/rev0/ast_sector_z.yaml | 4 +- assets/yaml/jp/rev0/ast_solar.yaml | 8 +- assets/yaml/jp/rev0/ast_star_wolf.yaml | 20 +- assets/yaml/jp/rev0/ast_training.yaml | 8 +- assets/yaml/jp/rev0/ast_ve1_boss.yaml | 16 +- assets/yaml/jp/rev0/ast_venom_1.yaml | 20 +- assets/yaml/jp/rev0/ast_venom_2.yaml | 8 +- assets/yaml/jp/rev0/ast_warp_zone.yaml | 24 +- assets/yaml/jp/rev0/ast_zoness.yaml | 16 +- assets/yaml/us/rev1/ast_7_ti_1.yaml | 8 +- assets/yaml/us/rev1/ast_allies.yaml | 8 +- assets/yaml/us/rev1/ast_aquas.yaml | 20 +- assets/yaml/us/rev1/ast_area_6.yaml | 36 +- assets/yaml/us/rev1/ast_common.yaml | 4 +- assets/yaml/us/rev1/ast_corneria.yaml | 4 +- assets/yaml/us/rev1/ast_enmy_planet.yaml | 40 +- assets/yaml/us/rev1/ast_enmy_space.yaml | 48 +- assets/yaml/us/rev1/ast_fortuna.yaml | 4 +- assets/yaml/us/rev1/ast_katina.yaml | 8 +- assets/yaml/us/rev1/ast_macbeth.yaml | 20 +- assets/yaml/us/rev1/ast_map.yaml | 4 +- assets/yaml/us/rev1/ast_meteo.yaml | 64 +- assets/yaml/us/rev1/ast_sector_x.yaml | 108 +- assets/yaml/us/rev1/ast_sector_y.yaml | 40 +- assets/yaml/us/rev1/ast_sector_z.yaml | 4 +- assets/yaml/us/rev1/ast_solar.yaml | 8 +- assets/yaml/us/rev1/ast_star_wolf.yaml | 22 +- assets/yaml/us/rev1/ast_training.yaml | 8 +- assets/yaml/us/rev1/ast_ve1_boss.yaml | 16 +- assets/yaml/us/rev1/ast_venom_1.yaml | 20 +- assets/yaml/us/rev1/ast_venom_2.yaml | 8 +- assets/yaml/us/rev1/ast_warp_zone.yaml | 24 +- assets/yaml/us/rev1/ast_zoness.yaml | 16 +- include/fox_option.h | 96 +- include/functions.h | 4 +- include/i6.h | 2 +- include/prevent_context_reordering.h | 6 +- include/sf64event.h | 221 ++-- include/sf64level.h | 2 - include/sf64object.h | 20 +- include/sf64player.h | 7 + include/variables.h | 8 +- .../eu/rev0/symbol_addrs_assets.txt | 4 +- linker_scripts/eu/rev0/undefined_syms.ld | 4 +- src/audio/audio_heap.c | 2 +- src/audio/audio_load.c | 46 +- src/audio/audio_seqplayer.c | 3 + src/audio/audio_synthesis.c | 93 +- src/audio/audio_thread.c | 11 +- src/engine/fox_360.c | 174 +-- src/engine/fox_beam.c | 31 +- src/engine/fox_demo.c | 71 +- src/engine/fox_display.c | 14 +- src/engine/fox_edata_info.c | 37 +- src/engine/fox_edisplay.c | 118 +- src/engine/fox_effect.c | 2 +- src/engine/fox_enmy.c | 22 +- src/engine/fox_enmy2.c | 1045 +++++++++-------- src/engine/fox_hud.c | 38 +- src/engine/fox_play.c | 6 +- src/mods/sfxjukebox.c | 8 +- src/mods/spawner.c | 2 +- src/overlays/ovl_ending/fox_end1.c | 6 +- src/overlays/ovl_ending/fox_end2.c | 4 +- src/overlays/ovl_i1/fox_co.c | 4 +- src/overlays/ovl_i1/fox_ve1.c | 2 +- src/overlays/ovl_i2/fox_me.c | 51 +- src/overlays/ovl_i2/fox_sx.c | 4 +- src/overlays/ovl_i3/fox_aq.c | 2 +- src/overlays/ovl_i3/fox_so.c | 16 +- src/overlays/ovl_i3/fox_zo.c | 16 +- src/overlays/ovl_i4/fox_bo.c | 4 +- src/overlays/ovl_i4/fox_ka.c | 2 +- src/overlays/ovl_i5/fox_ma.c | 34 +- src/overlays/ovl_i5/fox_ti.c | 64 +- src/overlays/ovl_i6/fox_andross.c | 43 +- src/overlays/ovl_i6/fox_sy.c | 82 +- src/overlays/ovl_menu/fox_map.c | 2 +- src/overlays/ovl_menu/fox_option.c | 566 ++++----- src/sys/sys_main.c | 5 + 95 files changed, 2126 insertions(+), 1960 deletions(-) diff --git a/assets/yaml/jp/rev0/ast_7_ti_1.yaml b/assets/yaml/jp/rev0/ast_7_ti_1.yaml index 75a2ee61..b80991f5 100644 --- a/assets/yaml/jp/rev0/ast_7_ti_1.yaml +++ b/assets/yaml/jp/rev0/ast_7_ti_1.yaml @@ -209,11 +209,11 @@ aTi1DesertRoverSkel: aTi1FekudaGun2DL: { type: GFX, offset: 0x700C980, symbol: aTi1FekudaGun2DL } -D_TI1_700CAF4: - { type: SF64:ANIM, offset: 0x700CAF4, symbol: D_TI1_700CAF4} +aTiBomberAnim: + { type: SF64:ANIM, offset: 0x700CAF4, symbol: aTiBomberAnim} -D_TI1_700CB60: - {type: SF64:SKELETON, offset: 0x700CB60, symbol: D_TI1_700CB60} +aTiBomberSkel: + {type: SF64:SKELETON, offset: 0x700CB60, symbol: aTiBomberSkel} aTiRascoAnim: { type: SF64:ANIM, offset: 0x700D534, symbol: aTiRascoAnim } diff --git a/assets/yaml/jp/rev0/ast_allies.yaml b/assets/yaml/jp/rev0/ast_allies.yaml index 57a24582..9ccff794 100644 --- a/assets/yaml/jp/rev0/ast_allies.yaml +++ b/assets/yaml/jp/rev0/ast_allies.yaml @@ -59,8 +59,8 @@ D_D0098B0: D_D009938: { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x0D009938, symbol: D_D009938 } -D_D009A40: - { type: GFX, offset: 0xD009A40, symbol: D_D009A40 } +aKattShipDL: + { type: GFX, offset: 0xD009A40, symbol: aKattShipDL } D_D00A3B8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0D00A3B8, symbol: D_D00A3B8 } @@ -97,8 +97,8 @@ aJamesMarkTex: aJamesMarkTLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0xD00B870, symbol: aJamesMarkTLUT } -D_D00B880: - { type: GFX, offset: 0xD00B880, symbol: D_D00B880 } +aBillShipDL: + { type: GFX, offset: 0xD00B880, symbol: aBillShipDL } ast_allies_seg13_vtx_BB70: { type: VTX, count: 144, offset: 0xD00BB70, symbol: ast_allies_seg13_vtx_BB70 } diff --git a/assets/yaml/jp/rev0/ast_aquas.yaml b/assets/yaml/jp/rev0/ast_aquas.yaml index 7140515e..ac9b2f32 100644 --- a/assets/yaml/jp/rev0/ast_aquas.yaml +++ b/assets/yaml/jp/rev0/ast_aquas.yaml @@ -22,8 +22,8 @@ aAqSquidAnim: aAqSquidSkel: { type: SF64:SKELETON, offset: 0x6000DB0, symbol: aAqSquidSkel } -D_AQ_6000E10: - { type: GFX, offset: 0x6000E10, symbol: D_AQ_6000E10 } +aAqShellDL: + { type: GFX, offset: 0x6000E10, symbol: aAqShellDL } D_AQ_6001130: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6001130, symbol: D_AQ_6001130 } @@ -98,8 +98,8 @@ D_AQ_6003FF0: D_AQ_6008168: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6008168, symbol: D_AQ_6008168 } -D_AQ_6008970: - { type: GFX, offset: 0x6008970, symbol: D_AQ_6008970 } +aAqStarfishDL: + { type: GFX, offset: 0x6008970, symbol: aAqStarfishDL } D_AQ_6008EC8: { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x6008EC8, symbol: D_AQ_6008EC8, tlut: 0x6008FC8 } @@ -659,14 +659,14 @@ D_AQ_60308B8: aBoss301Hitbox: { type: SF64:HITBOX, offset: 0x6030B10, symbol: aBoss301Hitbox } -D_AQ_6030B14_f32: - { type: SF64:HITBOX, offset: 0x6030B14, symbol: D_AQ_6030B14_f32 } +aAqShellHitbox: + { type: SF64:HITBOX, offset: 0x6030B14, symbol: aAqShellHitbox } -D_AQ_6030B30: - { type: SF64:HITBOX, offset: 0x6030B30, symbol: D_AQ_6030B30 } +aAqStarfishHitbox: + { type: SF64:HITBOX, offset: 0x6030B30, symbol: aAqStarfishHitbox } -D_AQ_6030B4C: - { type: SF64:HITBOX, offset: 0x6030B4C, symbol: D_AQ_6030B4C } +aAqOysterEvHitbox: + { type: SF64:HITBOX, offset: 0x6030B4C, symbol: aAqOysterEvHitbox } D_AQ_6030B68: { type: SF64:HITBOX, offset: 0x6030B68, symbol: D_AQ_6030B68 } diff --git a/assets/yaml/jp/rev0/ast_area_6.yaml b/assets/yaml/jp/rev0/ast_area_6.yaml index fe99d8e0..9b35795e 100644 --- a/assets/yaml/jp/rev0/ast_area_6.yaml +++ b/assets/yaml/jp/rev0/ast_area_6.yaml @@ -57,8 +57,8 @@ D_A6_6009718: D_A6_6009B18: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06009B18, symbol: D_A6_6009B18 } -D_A6_600E0C0: - { type: GFX, offset: 0x600E0C0, symbol: D_A6_600E0C0 } +aA6UmbraStationDL: + { type: GFX, offset: 0x600E0C0, symbol: aA6UmbraStationDL } D_A6_600EBE8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 16, offset: 0x0600EBE8, symbol: D_A6_600EBE8 } @@ -96,8 +96,8 @@ D_A6_6012550: D_A6_6012840: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06012840, symbol: D_A6_6012840 } -D_A6_6012A40: - { type: GFX, offset: 0x6012A40, symbol: D_A6_6012A40 } +aA6HarlockFrigateDL: + { type: GFX, offset: 0x6012A40, symbol: aA6HarlockFrigateDL } D_A6_6013CD8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06013CD8, symbol: D_A6_6013CD8 } @@ -117,8 +117,8 @@ D_A6_6015CD8: D_A6_6015EE0: { type: GFX, offset: 0x6015EE0, symbol: D_A6_6015EE0 } -D_A6_6016190: - { type: GFX, offset: 0x6016190, symbol: D_A6_6016190 } +aA6ZeramClassCruiserDL: + { type: GFX, offset: 0x6016190, symbol: aA6ZeramClassCruiserDL } D_A6_6017120: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06017120, symbol: D_A6_6017120 } @@ -150,8 +150,8 @@ D_A6_6018994: D_A6_6018BA0: { type: SF64:SKELETON, offset: 0x6018BA0, symbol: D_A6_6018BA0 } -D_A6_6018BF0: - { type: GFX, offset: 0x6018BF0, symbol: D_A6_6018BF0 } +aA6NinjinMissileDL: + { type: GFX, offset: 0x6018BF0, symbol: aA6NinjinMissileDL } D_A6_6019130: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06019130, symbol: D_A6_6019130 } @@ -162,8 +162,8 @@ D_A6_6019330: D_A6_6019530: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06019530, symbol: D_A6_6019530 } -D_A6_6019730: - { type: GFX, offset: 0x6019730, symbol: D_A6_6019730 } +aA6RocketDL: + { type: GFX, offset: 0x6019730, symbol: aA6RocketDL } D_A6_6019B20: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06019B20, symbol: D_A6_6019B20 } @@ -174,8 +174,8 @@ D_A6_6019D20: D_A6_6019F20: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06019F20, symbol: D_A6_6019F20 } -D_A6_601A120: - { type: GFX, offset: 0x601A120, symbol: D_A6_601A120 } +aA6SpaceMineDL: + { type: GFX, offset: 0x601A120, symbol: aA6SpaceMineDL } D_A6_601A220: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601A220, symbol: D_A6_601A220 } @@ -228,14 +228,14 @@ D_A6_6023F64: D_A6_6027F50: { type: SF64:SCRIPT, offset: 0x6027F50, symbol: D_A6_6027F50} -D_A6_60280E0: - { type: SF64:HITBOX, offset: 0x60280E0, symbol: D_A6_60280E0 } +aA6UmbraStationHitbox: + { type: SF64:HITBOX, offset: 0x60280E0, symbol: aA6UmbraStationHitbox } -D_A6_6028254: - { type: SF64:HITBOX, offset: 0x6028254, symbol: D_A6_6028254 } +aA6HarlockFrigateHitbox: + { type: SF64:HITBOX, offset: 0x6028254, symbol: aA6HarlockFrigateHitbox } -D_A6_60282A0: - { type: SF64:HITBOX, offset: 0x60282A0, symbol: D_A6_60282A0 } +aA6ZeramClassCruiserHitbox: + { type: SF64:HITBOX, offset: 0x60282A0, symbol: aA6ZeramClassCruiserHitbox } aA6GorgonHitbox: { type: SF64:HITBOX, offset: 0x6028454, symbol: aA6GorgonHitbox } diff --git a/assets/yaml/jp/rev0/ast_common.yaml b/assets/yaml/jp/rev0/ast_common.yaml index c35f3bba..7d8d20ff 100644 --- a/assets/yaml/jp/rev0/ast_common.yaml +++ b/assets/yaml/jp/rev0/ast_common.yaml @@ -980,8 +980,8 @@ D_1031EC0: D_1032578: { type: TEXTURE, format: RGBA16, width: 16, height: 16, ctype: u16, offset: 0x1032578, symbol: D_1032578 } -D_1032780: - { type: GFX, offset: 0x1032780, symbol: D_1032780 } +aArwingShadowDL: + { type: GFX, offset: 0x1032780, symbol: aArwingShadowDL } D_1032808: { type: TEXTURE, format: IA8, width: 32, height: 32, ctype: u8, offset: 0x1032808, symbol: D_1032808 } diff --git a/assets/yaml/jp/rev0/ast_corneria.yaml b/assets/yaml/jp/rev0/ast_corneria.yaml index a037337a..b53b86c7 100644 --- a/assets/yaml/jp/rev0/ast_corneria.yaml +++ b/assets/yaml/jp/rev0/ast_corneria.yaml @@ -111,8 +111,8 @@ aCoHighway5DL: D_CO_6011790: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06011790, symbol: D_CO_6011790 } -D_CO_6011F90: - { type: GFX, offset: 0x6011F90, symbol: D_CO_6011F90 } +aCoCornerianFighterDL: + { type: GFX, offset: 0x6011F90, symbol: aCoCornerianFighterDL } D_CO_6012640: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06012640, symbol: D_CO_6012640 } diff --git a/assets/yaml/jp/rev0/ast_enmy_planet.yaml b/assets/yaml/jp/rev0/ast_enmy_planet.yaml index 87e949c1..9b595a75 100644 --- a/assets/yaml/jp/rev0/ast_enmy_planet.yaml +++ b/assets/yaml/jp/rev0/ast_enmy_planet.yaml @@ -15,14 +15,14 @@ D_ENMY_PLANET_4000290: ast_enmy_planet_seg4_vtx_8F8: { type: VTX, count: 90, offset: 0x40008F8, symbol: ast_enmy_planet_seg4_vtx_8F8 } -D_ENMY_PLANET_40001A4: - { type: SF64:ANIM, offset: 0x40001A4, symbol: D_ENMY_PLANET_40001A4 } +aTripodAnim: + { type: SF64:ANIM, offset: 0x40001A4, symbol: aTripodAnim } -D_ENMY_PLANET_4000270: - { type: SF64:SKELETON, offset: 0x4000270, symbol: D_ENMY_PLANET_4000270 } +aTripodSkel: + { type: SF64:SKELETON, offset: 0x4000270, symbol: aTripodSkel } -D_ENMY_PLANET_4000710: - { type: GFX, offset: 0x4000710, symbol: D_ENMY_PLANET_4000710 } +aVenomTankDL: + { type: GFX, offset: 0x4000710, symbol: aVenomTankDL } D_ENMY_PLANET_4001298: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x04001298, symbol: D_ENMY_PLANET_4001298 } @@ -60,11 +60,11 @@ D_ENMY_PLANET_4004538: D_ENMY_PLANET_4004D38: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x04004D38, symbol: D_ENMY_PLANET_4004D38 } -D_ENMY_PLANET_40057AC: - { type: SF64:ANIM, offset: 0x40057AC, symbol: D_ENMY_PLANET_40057AC } +aFirebirdAnim: + { type: SF64:ANIM, offset: 0x40057AC, symbol: aFirebirdAnim } -D_ENMY_PLANET_40058B8: - { type: SF64:SKELETON, offset: 0x40058B8, symbol: D_ENMY_PLANET_40058B8 } +aFirebirdSkel: + { type: SF64:SKELETON, offset: 0x40058B8, symbol: aFirebirdSkel } D_ENMY_PLANET_4005E78: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x04005E78, symbol: D_ENMY_PLANET_4005E78 } @@ -81,17 +81,17 @@ D_ENMY_PLANET_40064E8: D_ENMY_PLANET_40066E8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x040066E8, symbol: D_ENMY_PLANET_40066E8 } -D_ENMY_PLANET_40068F0: - { type: GFX, offset: 0x40068F0, symbol: D_ENMY_PLANET_40068F0 } +aVenomFighter1DL: + { type: GFX, offset: 0x40068F0, symbol: aVenomFighter1DL } -D_ENMY_PLANET_4006E90: - { type: GFX, offset: 0x4006E90, symbol: D_ENMY_PLANET_4006E90 } +aVenomFighter2DL: + { type: GFX, offset: 0x4006E90, symbol: aVenomFighter2DL } -D_ENMY_PLANET_40073C0: - { type: GFX, offset: 0x40073C0, symbol: D_ENMY_PLANET_40073C0 } +aGrangaFighter1DL: + { type: GFX, offset: 0x40073C0, symbol: aGrangaFighter1DL } -D_ENMY_PLANET_4007AF0: - { type: GFX, offset: 0x4007AF0, symbol: D_ENMY_PLANET_4007AF0 } +aGrangaFighter2DL: + { type: GFX, offset: 0x4007AF0, symbol: aGrangaFighter2DL } D_ENMY_PLANET_4008100: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x04008100, symbol: D_ENMY_PLANET_4008100 } @@ -108,5 +108,5 @@ D_ENMY_PLANET_4008FF8: D_ENMY_PLANET_4008F70: { type: GFX, offset: 0x4008F70, symbol: D_ENMY_PLANET_4008F70 } -D_ENMY_PLANET_4009800: - { type: GFX, offset: 0x4009800, symbol: D_ENMY_PLANET_4009800 } +aSpyEyeDL: + { type: GFX, offset: 0x4009800, symbol: aSpyEyeDL } diff --git a/assets/yaml/jp/rev0/ast_enmy_space.yaml b/assets/yaml/jp/rev0/ast_enmy_space.yaml index af0fd04e..0ba24a61 100644 --- a/assets/yaml/jp/rev0/ast_enmy_space.yaml +++ b/assets/yaml/jp/rev0/ast_enmy_space.yaml @@ -8,26 +8,26 @@ - '#include "gfx.h"' - '#include "sf64object.h"' -D_ENMY_SPACE_4000080: - { type: SF64:ANIM, offset: 0x4000080, symbol: D_ENMY_SPACE_4000080 } +aKillerBeeAnim: + { type: SF64:ANIM, offset: 0x4000080, symbol: aKillerBeeAnim } -D_ENMY_SPACE_400014C: - { type: SF64:SKELETON, offset: 0x400014C, symbol: D_ENMY_SPACE_400014C } +aKillerBeeSkel: + { type: SF64:SKELETON, offset: 0x400014C, symbol: aKillerBeeSkel } aEnmySpMeMora1DL: { type: GFX, offset: 0x4000170, symbol: aEnmySpMeMora1DL } -D_ENMY_SPACE_4000650: - { type: GFX, offset: 0x4000650, symbol: D_ENMY_SPACE_4000650 } +aSpiderDL: + { type: GFX, offset: 0x4000650, symbol: aSpiderDL } -D_ENMY_SPACE_4000EC0: - { type: GFX, offset: 0x4000EC0, symbol: D_ENMY_SPACE_4000EC0 } +aGammaOnDL: + { type: GFX, offset: 0x4000EC0, symbol: aGammaOnDL } D_ENMY_SPACE_4001108: { type: TEXTURE, format: RGBA16, offset: 0x4001108, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4001108 } -D_ENMY_SPACE_4001310: - { type: GFX, offset: 0x4001310, symbol: D_ENMY_SPACE_4001310 } +aAttacker2DL: + { type: GFX, offset: 0x4001310, symbol: aAttacker2DL } D_ENMY_SPACE_4001A30: { type: TEXTURE, format: RGBA16, offset: 0x4001A30, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4001A30 } @@ -95,11 +95,11 @@ aEnmySpMeMora2DL: D_ENMY_SPACE_4008550: { type: TEXTURE, format: RGBA16, offset: 0x04008550, width: 32, height: 32, ctype: u16, symbol: D_ENMY_SPACE_4008550 } -D_ENMY_SPACE_4008D50: - { type: GFX, offset: 0x4008D50, symbol: D_ENMY_SPACE_4008D50 } +aGammaOffDL: + { type: GFX, offset: 0x4008D50, symbol: aGammaOffDL } -D_ENMY_SPACE_4008FA0: - { type: GFX, offset: 0x4008FA0, symbol: D_ENMY_SPACE_4008FA0 } +aVenomFighter3DL: + { type: GFX, offset: 0x4008FA0, symbol: aVenomFighter3DL } D_ENMY_SPACE_40096B8: { type: TEXTURE, format: RGBA16, offset: 0x040096B8, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_40096B8 } @@ -110,25 +110,25 @@ D_ENMY_SPACE_40098B8: D_ENMY_SPACE_4009AB8: { type: TEXTURE, format: RGBA16, offset: 0x04009AB8, width: 32, height: 32, ctype: u16, symbol: D_ENMY_SPACE_4009AB8 } -D_ENMY_SPACE_400A30C: - { type: SF64:ANIM, offset: 0x400A30C, symbol: D_ENMY_SPACE_400A30C } +aCruiserGunAnim: + { type: SF64:ANIM, offset: 0x400A30C, symbol: aCruiserGunAnim } -D_ENMY_SPACE_400A398: - { type: SF64:SKELETON, offset: 0x400A398, symbol: D_ENMY_SPACE_400A398 } +aCruiserGunSkel: + { type: SF64:SKELETON, offset: 0x400A398, symbol: aCruiserGunSkel } aEnmySpMeMora3DL: { type: GFX, offset: 0x400A630, symbol: aEnmySpMeMora3DL } -D_ENMY_SPACE_400AAE0: - { type: GFX, offset: 0x400AAE0, symbol: D_ENMY_SPACE_400AAE0 } +aCommanderDL: + { type: GFX, offset: 0x400AAE0, symbol: aCommanderDL } -D_ENMY_SPACE_400B390: - { type: GFX, offset: 0x400B390, symbol: D_ENMY_SPACE_400B390 } +aAttacker3DL: + { type: GFX, offset: 0x400B390, symbol: aAttacker3DL } -D_ENMY_SPACE_400BD20: - { type: GFX, offset: 0x400BD20, symbol: D_ENMY_SPACE_400BD20 } +aAttacker1DL: + { type: GFX, offset: 0x400BD20, symbol: aAttacker1DL } # size = 0xC510 \ No newline at end of file diff --git a/assets/yaml/jp/rev0/ast_fortuna.yaml b/assets/yaml/jp/rev0/ast_fortuna.yaml index 5e9c029f..23b03d8a 100644 --- a/assets/yaml/jp/rev0/ast_fortuna.yaml +++ b/assets/yaml/jp/rev0/ast_fortuna.yaml @@ -110,8 +110,8 @@ D_FO_6008150: D_FO_6009070: { type: TEXTURE, format: RGBA16, width: 44, height: 44, offset: 0x6009070, ctype: u16, symbol: D_FO_6009070 } -D_FO_6009F90: - { type: GFX, offset: 0x6009F90, symbol: D_FO_6009F90 } +aFoEnemyShadowDL: + { type: GFX, offset: 0x6009F90, symbol: aFoEnemyShadowDL } D_FO_600A018: { type: TEXTURE, format: IA8, width: 32, height: 32, offset: 0x600A018, ctype: u8, symbol: D_FO_600A018 } diff --git a/assets/yaml/jp/rev0/ast_katina.yaml b/assets/yaml/jp/rev0/ast_katina.yaml index 6ec0a0a3..293c4a92 100644 --- a/assets/yaml/jp/rev0/ast_katina.yaml +++ b/assets/yaml/jp/rev0/ast_katina.yaml @@ -109,14 +109,14 @@ aDestroyedHatch4DL: aDestroyedHatch3DL: { type: GFX, offset: 0x600D4E0, symbol: aDestroyedHatch3DL } -D_KA_600D730: - { type: GFX, offset: 0x600D730, symbol: D_KA_600D730 } +aKaCornerianFighterShadowDL: + { type: GFX, offset: 0x600D730, symbol: aKaCornerianFighterShadowDL } D_KA_600D7B8: { type: TEXTURE, format: IA8, width: 32, height: 32, offset: 0x600D7B8, ctype: u8, symbol: D_KA_600D7B8 } -D_KA_600DBC0: - { type: GFX, offset: 0x600DBC0, symbol: D_KA_600DBC0 } +aKaEnemyShadowDL: + { type: GFX, offset: 0x600DBC0, symbol: aKaEnemyShadowDL } D_KA_600DC48: { type: TEXTURE, format: IA8, width: 32, height: 32, offset: 0x600DC48, ctype: u8, symbol: D_KA_600DC48 } diff --git a/assets/yaml/jp/rev0/ast_macbeth.yaml b/assets/yaml/jp/rev0/ast_macbeth.yaml index 2209552e..f455462c 100644 --- a/assets/yaml/jp/rev0/ast_macbeth.yaml +++ b/assets/yaml/jp/rev0/ast_macbeth.yaml @@ -61,8 +61,8 @@ D_MA_60026F8: D_MA_60027F8: { type: TEXTURE, format: TLUT, ctype: u16, colors: 72, offset: 0x60027F8, symbol: D_MA_60027F8} -D_MA_6002890: - {type: GFX, offset: 0x6002890, symbol: D_MA_6002890} +aMaGuillotine2DL: + {type: GFX, offset: 0x6002890, symbol: aMaGuillotine2DL} D_MA_6002C20: { type: TEXTURE, format: CI8, ctype: u8, width: 32, height: 16, offset: 0x6002C20, symbol: D_MA_6002C20, tlut: 0x6002E20} @@ -238,8 +238,8 @@ D_MA_600AE18: D_MA_600AE98: { type: TEXTURE, format: TLUT, ctype: u16, colors: 80, offset: 0x600AE98, symbol: D_MA_600AE98} -aMaGuillotineDL: - {type: GFX, offset: 0x600AF40, symbol: aMaGuillotineDL} +aMaGuillotine1DL: + {type: GFX, offset: 0x600AF40, symbol: aMaGuillotine1DL} D_MA_600B2E0: { type: TEXTURE, format: RGBA16, ctype: u16, width: 32, height: 64, offset: 0x600B2E0, symbol: D_MA_600B2E0} @@ -274,8 +274,8 @@ D_MA_600D878: D_MA_600D978: { type: TEXTURE, format: TLUT, ctype: u16, colors: 72, offset: 0x600D978, symbol: D_MA_600D978} -D_MA_600DA10: - {type: GFX, offset: 0x600DA10, symbol: D_MA_600DA10} +aMaLaserTurretDL: + {type: GFX, offset: 0x600DA10, symbol: aMaLaserTurretDL} D_MA_600DF60: { type: TEXTURE, format: CI8, ctype: u8, width: 32, height: 32, offset: 0x600DF60, symbol: D_MA_600DF60, tlut: 0x600E360} @@ -478,8 +478,8 @@ aMaTowerTopDL: D_MA_601C170: {type: GFX, offset: 0x601C170, symbol: D_MA_601C170} -D_MA_601C520: - {type: GFX, offset: 0x601C520, symbol: D_MA_601C520} +aMaRailroadCartDL: + {type: GFX, offset: 0x601C520, symbol: aMaRailroadCartDL} D_MA_601D188: {type: SF64:ANIM, offset: 0x601D188, symbol: D_MA_601D188} @@ -922,8 +922,8 @@ aMaGuillotineHousingHitbox: aMaGuillotineHitbox: {type: SF64:HITBOX, offset: 0x60368E0, symbol: aMaGuillotineHitbox} -D_MA_60368FC: - {type: SF64:HITBOX, offset: 0x60368FC, symbol: D_MA_60368FC} +aMaRailroadCartHitbox: + {type: SF64:HITBOX, offset: 0x60368FC, symbol: aMaRailroadCartHitbox} aMaBombDropHitbox: {type: SF64:HITBOX, offset: 0x6036930, symbol: aMaBombDropHitbox} diff --git a/assets/yaml/jp/rev0/ast_map.yaml b/assets/yaml/jp/rev0/ast_map.yaml index 6f4f4692..070fee15 100644 --- a/assets/yaml/jp/rev0/ast_map.yaml +++ b/assets/yaml/jp/rev0/ast_map.yaml @@ -409,8 +409,8 @@ D_MAP_604A8D8: { type: TEXTURE, ctype: u16, format: TLUT, colors: 136, offset: 0x0604A8D8, symbol: D_MAP_604A8D8 } # Arwing Model, used in the map. -D_MAP_604A9F0: - { type: GFX, offset: 0x604A9F0, symbol: D_MAP_604A9F0 } +aMapArwingDL: + { type: GFX, offset: 0x604A9F0, symbol: aMapArwingDL } ast_map_seg6_vtx_4AD50: { type: VTX, offset: 0x604AD50, count: 124, symbol: ast_map_seg6_vtx_4AD50 } diff --git a/assets/yaml/jp/rev0/ast_meteo.yaml b/assets/yaml/jp/rev0/ast_meteo.yaml index c6bd7384..d06d59ca 100644 --- a/assets/yaml/jp/rev0/ast_meteo.yaml +++ b/assets/yaml/jp/rev0/ast_meteo.yaml @@ -62,8 +62,8 @@ D_ME_60080C0: D_ME_6008A18: { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x06008A18, symbol: D_ME_6008A18 } -D_ME_6008AA0: - { type: GFX, offset: 0x6008AA0, symbol: D_ME_6008AA0 } +aMeFlipBot1DL: + { type: GFX, offset: 0x6008AA0, symbol: aMeFlipBot1DL } D_ME_6009228: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06009228, symbol: D_ME_6009228 } @@ -74,35 +74,35 @@ D_ME_6009A28: D_ME_6009C28: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06009C28, symbol: D_ME_6009C28 } -D_ME_6009E30: - { type: GFX, offset: 0x6009E30, symbol: D_ME_6009E30 } +aMeFlipBot2DL: + { type: GFX, offset: 0x6009E30, symbol: aMeFlipBot2DL } -D_ME_6009F50: - { type: GFX, offset: 0x6009F50, symbol: D_ME_6009F50 } +aMeBigMeteorDL: + { type: GFX, offset: 0x6009F50, symbol: aMeBigMeteorDL } -D_ME_600AC70: - { type: GFX, offset: 0x600AC70, symbol: D_ME_600AC70 } +aMeMeteor7DL: + { type: GFX, offset: 0x600AC70, symbol: aMeMeteor7DL } D_ME_600B540: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0600B540, symbol: D_ME_600B540 } -D_ME_600BD40: - { type: GFX, offset: 0x600BD40, symbol: D_ME_600BD40 } +aMeSecretMarker2DL: + { type: GFX, offset: 0x600BD40, symbol: aMeSecretMarker2DL } D_ME_600BF30: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x0600BF30, symbol: D_ME_600BF30 } -D_ME_600C130: - { type: GFX, offset: 0x600C130, symbol: D_ME_600C130 } +aMeRockGull2DL: + { type: GFX, offset: 0x600C130, symbol: aMeRockGull2DL } -D_ME_600C2A0: - { type: GFX, offset: 0x600C2A0, symbol: D_ME_600C2A0 } +aMeMeteor6DL: + { type: GFX, offset: 0x600C2A0, symbol: aMeMeteor6DL } -D_ME_600C740: - { type: GFX, offset: 0x600C740, symbol: D_ME_600C740 } +aMeRockGull3DL: + { type: GFX, offset: 0x600C740, symbol: aMeRockGull3DL } -D_ME_600CAA0: - { type: GFX, offset: 0x600CAA0, symbol: D_ME_600CAA0 } +aMeRockGull1DL: + { type: GFX, offset: 0x600CAA0, symbol: aMeRockGull1DL } aMeMeteorShower3DL: { type: GFX, offset: 0x600CD60, symbol: aMeMeteorShower3DL } @@ -149,20 +149,20 @@ D_ME_60172C8: aMeMeteorShower1DL: { type: GFX, offset: 0x06017AD0, symbol: aMeMeteorShower1DL } -D_ME_6017B60: - { type: GFX, offset: 0x06017B60, symbol: D_ME_6017B60 } +aMeMeteor3DL: + { type: GFX, offset: 0x06017B60, symbol: aMeMeteor3DL } aMeLaserCannon2DL: { type: GFX, offset: 0x06018450, symbol: aMeLaserCannon2DL } -D_ME_6018960: - { type: GFX, offset: 0x06018960, symbol: D_ME_6018960 } +aMeMeteor5DL: + { type: GFX, offset: 0x06018960, symbol: aMeMeteor5DL } -aMeMeteorDL: - { type: GFX, offset: 0x06018C00, symbol: aMeMeteorDL } +aMeMeteor1DL: + { type: GFX, offset: 0x06018C00, symbol: aMeMeteor1DL } -D_ME_6019430: - { type: GFX, offset: 0x06019430, symbol: D_ME_6019430 } +aMeMeteor4DL: + { type: GFX, offset: 0x06019430, symbol: aMeMeteor4DL } D_ME_6019880: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06019880, symbol: D_ME_6019880 } @@ -170,8 +170,8 @@ D_ME_6019880: D_ME_601A080: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601A080, symbol: D_ME_601A080 } -D_ME_601A880: - { type: GFX, offset: 0x0601A880, symbol: D_ME_601A880 } +aMeSecretMarker1DL: + { type: GFX, offset: 0x0601A880, symbol: aMeSecretMarker1DL } aMeMeteoTunnelDL: { type: GFX, offset: 0x0601AE40, symbol: aMeMeteoTunnelDL } @@ -195,8 +195,8 @@ D_ME_601EA00: D_ME_601EA98: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601EA98, symbol: D_ME_601EA98 } -D_ME_601F2A0: - { type: GFX, offset: 0x0601F2A0, symbol: D_ME_601F2A0 } +aMeMeteor2DL: + { type: GFX, offset: 0x0601F2A0, symbol: aMeMeteor2DL } D_ME_601F778: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601F778, symbol: D_ME_601F778 } @@ -280,8 +280,8 @@ D_ME_602B148: D_ME_602F3AC: { type: SF64:SCRIPT, offset: 0x602F3AC, symbol: D_ME_602F3AC } -D_ME_602F604: - { type: SF64:HITBOX, offset: 0x602F604, symbol: D_ME_602F604 } +aMeFlipBotHitbox: + { type: SF64:HITBOX, offset: 0x602F604, symbol: aMeFlipBotHitbox } D_ME_602F638: { type: SF64:HITBOX, offset: 0x602F638, symbol: D_ME_602F638 } diff --git a/assets/yaml/jp/rev0/ast_sector_x.yaml b/assets/yaml/jp/rev0/ast_sector_x.yaml index 6cef80a6..88bf0b54 100644 --- a/assets/yaml/jp/rev0/ast_sector_x.yaml +++ b/assets/yaml/jp/rev0/ast_sector_x.yaml @@ -16,8 +16,8 @@ D_SX_6000000: { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 12, offset: 0x6000000, symbol: D_SX_6000000 } -D_SX_6000840: - { type: GFX, offset: 0x6000840, symbol: D_SX_6000840 } +aSxSpaceMineDL: + { type: GFX, offset: 0x6000840, symbol: aSxSpaceMineDL } # Flying mine D_SX_60008C0: @@ -30,14 +30,14 @@ D_SX_60010C0: D_SX_6001150: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6001150, symbol: D_SX_6001150 } -D_SX_6001950: - { type: GFX, offset: 0x6001950, symbol: D_SX_6001950 } +aSxLaserDestroyedDL: + { type: GFX, offset: 0x6001950, symbol: aSxLaserDestroyedDL } D_SX_6001AD8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6001AD8, symbol: D_SX_6001AD8 } -D_SX_6001CE0: - { type: GFX, offset: 0x6001CE0, symbol: D_SX_6001CE0 } +aSxWatchPostDL: + { type: GFX, offset: 0x6001CE0, symbol: aSxWatchPostDL } D_SX_60020C0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x60020C0, symbol: D_SX_60020C0 } @@ -75,8 +75,8 @@ D_SX_6004EE8: D_SX_6005EE8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6005EE8, symbol: D_SX_6005EE8 } -D_SX_60066F0: - { type: GFX, offset: 0x60066F0, symbol: D_SX_60066F0 } +aSxLaserDL: + { type: GFX, offset: 0x60066F0, symbol: aSxLaserDL } D_SX_6006810: { type: GFX, offset: 0x6006810, symbol: D_SX_6006810 } @@ -102,8 +102,8 @@ D_SX_6009548: D_SX_6009748: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6009748, symbol: D_SX_6009748 } -D_SX_6009950: - { type: GFX, offset: 0x6009950, symbol: D_SX_6009950 } +aSxBaseFloor1DL: + { type: GFX, offset: 0x6009950, symbol: aSxBaseFloor1DL } D_SX_6009C30: { type: GFX, offset: 0x6009C30, symbol: D_SX_6009C30 } @@ -117,8 +117,8 @@ D_SX_6009FF8: D_SX_600A2D4: { type: SF64:ANIM, offset: 0x600A2D4, symbol: D_SX_600A2D4 } -D_SX_600A2E0: - { type: GFX, offset: 0x600A2E0, symbol: D_SX_600A2E0 } +aSxBaseWall3DL: + { type: GFX, offset: 0x600A2E0, symbol: aSxBaseWall3DL } D_SX_600A570: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x600A570, symbol: D_SX_600A570 } @@ -126,17 +126,17 @@ D_SX_600A570: D_SX_600AD70: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x600AD70, symbol: D_SX_600AD70 } -D_SX_600AF70: - { type: GFX, offset: 0x600AF70, symbol: D_SX_600AF70 } +aSxBaseWall1DL: + { type: GFX, offset: 0x600AF70, symbol: aSxBaseWall1DL } -D_SX_600B2B0: - { type: GFX, offset: 0x600B2B0, symbol: D_SX_600B2B0 } +aSxBaseWall2DL: + { type: GFX, offset: 0x600B2B0, symbol: aSxBaseWall2DL } -D_SX_600B540: - { type: GFX, offset: 0x600B540, symbol: D_SX_600B540 } +aSxBaseWall4DL: + { type: GFX, offset: 0x600B540, symbol: aSxBaseWall4DL } -D_SX_600B830: - { type: GFX, offset: 0x600B830, symbol: D_SX_600B830 } +aSxBorzoiFighterDL: + { type: GFX, offset: 0x600B830, symbol: aSxBorzoiFighterDL } D_SX_600C000: { type: GFX, offset: 0x600C000, symbol: D_SX_600C000 } @@ -189,8 +189,8 @@ D_SX_60206DC: aSxSpyborgSkel: { type: SF64:SKELETON, offset: 0x6020C68, symbol: aSxSpyborgSkel } -D_SX_6020D20: - { type: GFX, offset: 0x6020D20, symbol: D_SX_6020D20 } +aSxBaseWallTile1DL: + { type: GFX, offset: 0x6020D20, symbol: aSxBaseWallTile1DL } # Spyborg Radio D_SX_6020FB0: @@ -199,20 +199,20 @@ D_SX_6020FB0: D_SX_6021ED0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x06021ED0, symbol: D_SX_6021ED0 } -D_SX_6022DF0: - { type: GFX, offset: 0x6022DF0, symbol: D_SX_6022DF0 } +aSxCanineDL: + { type: GFX, offset: 0x6022DF0, symbol: aSxCanineDL } -D_SX_6023500: - { type: GFX, offset: 0x6023500, symbol: D_SX_6023500 } +aSxSpyEyeDL: + { type: GFX, offset: 0x6023500, symbol: aSxSpyEyeDL } D_SX_6023C30: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06023C30, symbol: D_SX_6023C30 } -D_SX_6023E30: - { type: GFX, offset: 0x6023E30, symbol: D_SX_6023E30 } +aSxBaseDebris2DL: + { type: GFX, offset: 0x6023E30, symbol: aSxBaseDebris2DL } -D_SX_60285F0: - { type: GFX, offset: 0x60285F0, symbol: D_SX_60285F0 } +aSxBaseDebris1DL: + { type: GFX, offset: 0x60285F0, symbol: aSxBaseDebris1DL } D_SX_6029098: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06029098, symbol: D_SX_6029098 } @@ -241,8 +241,8 @@ D_SX_60320D0: D_SX_6032328: { type: SF64:HITBOX, offset: 0x6032328, symbol: D_SX_6032328 } -D_SX_603238C: - { type: SF64:HITBOX, offset: 0x603238C, symbol: D_SX_603238C } +aSxWarpGateHitbox: + { type: SF64:HITBOX, offset: 0x603238C, symbol: aSxWarpGateHitbox } D_SX_6032408: { type: SF64:HITBOX, offset: 0x6032408, symbol: D_SX_6032408 } @@ -256,20 +256,20 @@ aSxSpyborgRightArmHitbox: aSxSpyborgHitbox: { type: SF64:HITBOX, offset: 0x6032550, symbol: aSxSpyborgHitbox } -D_SX_603285C: - { type: SF64:HITBOX, offset: 0x603285C, symbol: D_SX_603285C } +aSxLaserHitbox: + { type: SF64:HITBOX, offset: 0x603285C, symbol: aSxLaserHitbox } -D_SX_6032878: - { type: SF64:HITBOX, offset: 0x6032878, symbol: D_SX_6032878 } +aSxBaseFloor1Hitbox: + { type: SF64:HITBOX, offset: 0x6032878, symbol: aSxBaseFloor1Hitbox } -D_SX_6032894: - { type: SF64:HITBOX, offset: 0x6032894, symbol: D_SX_6032894 } +aSxBaseWall2Hitbox: + { type: SF64:HITBOX, offset: 0x6032894, symbol: aSxBaseWall2Hitbox } -D_SX_60328B0: - { type: SF64:HITBOX, offset: 0x60328B0, symbol: D_SX_60328B0 } +aSxBaseWall3Hitbox: + { type: SF64:HITBOX, offset: 0x60328B0, symbol: aSxBaseWall3Hitbox } -D_SX_60328CC: - { type: SF64:HITBOX, offset: 0x60328CC, symbol: D_SX_60328CC } +aSxBaseWallTile1Hitbox: + { type: SF64:HITBOX, offset: 0x60328CC, symbol: aSxBaseWallTile1Hitbox } D_SX_603265C: { type: SF64:HITBOX, offset: 0x603265C, symbol: D_SX_603265C } @@ -277,22 +277,22 @@ D_SX_603265C: D_SX_6032768: { type: SF64:HITBOX, offset: 0x6032768, symbol: D_SX_6032768 } -D_SX_60328E8: - { type: SF64:HITBOX, offset: 0x60328E8, symbol: D_SX_60328E8 } +aSxBaseWall4Hitbox: + { type: SF64:HITBOX, offset: 0x60328E8, symbol: aSxBaseWall4Hitbox } -D_SX_6032904: - { type: SF64:HITBOX, offset: 0x6032904, symbol: D_SX_6032904 } +aSxBaseWall1Hitbox: + { type: SF64:HITBOX, offset: 0x6032904, symbol: aSxBaseWall1Hitbox } -D_SX_6032938: - { type: SF64:HITBOX, offset: 0x6032938, symbol: D_SX_6032938 } +aSxWatchPostHitbox: + { type: SF64:HITBOX, offset: 0x6032938, symbol: aSxWatchPostHitbox } -D_SX_6032954: - { type: SF64:HITBOX, offset: 0x6032954, symbol: D_SX_6032954 } +aSxSpaceMineHitbox: + { type: SF64:HITBOX, offset: 0x6032954, symbol: aSxSpaceMineHitbox } -D_SX_6032970: - { type: SF64:HITBOX, offset: 0x6032970, symbol: D_SX_6032970 } +aSxBaseDebris2Hitbox: + { type: SF64:HITBOX, offset: 0x6032970, symbol: aSxBaseDebris2Hitbox } -D_SX_603298C: - { type: SF64:HITBOX, offset: 0x603298C, symbol: D_SX_603298C } +aSxBaseDebris1Hitbox: + { type: SF64:HITBOX, offset: 0x603298C, symbol: aSxBaseDebris1Hitbox } # size = 0x32AC0 \ No newline at end of file diff --git a/assets/yaml/jp/rev0/ast_sector_y.yaml b/assets/yaml/jp/rev0/ast_sector_y.yaml index 4e0ef4dd..097b11cb 100644 --- a/assets/yaml/jp/rev0/ast_sector_y.yaml +++ b/assets/yaml/jp/rev0/ast_sector_y.yaml @@ -116,11 +116,11 @@ D_SY_60119D8: D_SY_60132A0: { type: GFX, offset: 0x60132A0, symbol: D_SY_60132A0 } -D_SY_6015D60: - { type: GFX, offset: 0x6015D60, symbol: D_SY_6015D60 } +aSyRobot4DL: + { type: GFX, offset: 0x6015D60, symbol: aSyRobot4DL } -D_SY_601F3D0: - { type: GFX, offset: 0x601F3D0, symbol: D_SY_601F3D0 } +aSySaruzinDL: + { type: GFX, offset: 0x601F3D0, symbol: aSySaruzinDL } D_SY_60121E0: { type: GFX, offset: 0x60121E0, symbol: D_SY_60121E0 } @@ -158,8 +158,8 @@ D_SY_6015960: D_SY_6015B60: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06015B60, symbol: D_SY_6015B60 } -aSyShipProjectileDL: - { type: GFX, offset: 0x60188D0, symbol: aSyShipProjectileDL } +aSyShipMissileDL: + { type: GFX, offset: 0x60188D0, symbol: aSyShipMissileDL } D_SY_60183B0: { type: GFX, offset: 0x60183B0, symbol: D_SY_60183B0 } @@ -170,8 +170,8 @@ D_SY_6018F30: D_SY_6019E50: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x06019E50, symbol: D_SY_6019E50 } -D_SY_601AD70: - { type: GFX, offset: 0x601AD70, symbol: D_SY_601AD70 } +aSyDebrisDL: + { type: GFX, offset: 0x601AD70, symbol: aSyDebrisDL } D_SY_601AE08: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601AE08, symbol: D_SY_601AE08 } @@ -194,11 +194,11 @@ aSyShip2DL: D_SY_601F3B8: { type: SF64:ANIM, offset: 0x601F3B8, symbol: D_SY_601F3B8 } -D_SY_60205D0: - { type: GFX, offset: 0x60205D0, symbol: D_SY_60205D0 } +aSyLaserTurretDL: + { type: GFX, offset: 0x60205D0, symbol: aSyLaserTurretDL } -D_SY_60209F0: - { type: GFX, offset: 0x60209F0, symbol: D_SY_60209F0 } +aSyRobotSpriteFrontDL: + { type: GFX, offset: 0x60209F0, symbol: aSyRobotSpriteFrontDL } D_SY_6020B08: { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06020B08, symbol: D_SY_6020B08 } @@ -206,8 +206,8 @@ D_SY_6020B08: D_SY_6021B08: { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06021B08, symbol: D_SY_6021B08 } -D_SY_6022B10: - { type: GFX, offset: 0x6022B10, symbol: D_SY_6022B10 } +aSyRobotSpriteSideDL: + { type: GFX, offset: 0x6022B10, symbol: aSyRobotSpriteSideDL } D_SY_6022C28: { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06022C28, symbol: D_SY_6022C28 } @@ -314,8 +314,8 @@ aSyRobotHitbox: D_SY_60340C0: { type: SF64:HITBOX, offset: 0x60340C0, symbol: D_SY_60340C0 } -D_SY_6034124: - { type: SF64:HITBOX, offset: 0x6034124, symbol: D_SY_6034124 } +aSyRobot4Hitbox: + { type: SF64:HITBOX, offset: 0x6034124, symbol: aSyRobot4Hitbox } D_SY_60341A8: { type: SF64:HITBOX, offset: 0x60341A8, symbol: D_SY_60341A8 } @@ -332,8 +332,8 @@ D_SY_6034304: aSyScenery156Hitbox: { type: SF64:HITBOX, offset: 0x6034368, symbol: aSyScenery156Hitbox } -D_SY_603445C: - { type: SF64:HITBOX, offset: 0x603445C, symbol: D_SY_603445C } +aSyLaserTurretHitbox: + { type: SF64:HITBOX, offset: 0x603445C, symbol: aSyLaserTurretHitbox } aSyShip1Hitbox: { type: SF64:HITBOX, offset: 0x6034478, symbol: aSyShip1Hitbox } @@ -356,7 +356,7 @@ aSyShipWindowsHitbox: aSyShip4DestroyedHitbox: { type: SF64:HITBOX, offset: 0x60347F0, symbol: aSyShip4DestroyedHitbox } -aSyShipProjectileHitbox: - { type: SF64:HITBOX, offset: 0x603486C, symbol: aSyShipProjectileHitbox } +aSyShipMissileHitbox: + { type: SF64:HITBOX, offset: 0x603486C, symbol: aSyShipMissileHitbox } # size = 0x34890 \ No newline at end of file diff --git a/assets/yaml/jp/rev0/ast_sector_z.yaml b/assets/yaml/jp/rev0/ast_sector_z.yaml index 112044ad..12c21624 100644 --- a/assets/yaml/jp/rev0/ast_sector_z.yaml +++ b/assets/yaml/jp/rev0/ast_sector_z.yaml @@ -142,8 +142,8 @@ D_SZ_6006BD8: D_SZ_6006CD8: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x06006CD8, symbol: D_SZ_6006CD8 } -D_SZ_6006D64: - { type: SF64:ANIM, offset: 0x6006D64, symbol: D_SZ_6006D64 } +aSzMissileAnim: + { type: SF64:ANIM, offset: 0x6006D64, symbol: aSzMissileAnim } aSzMissileSkel: { type: SF64:SKELETON, offset: 0x6006E50, symbol: aSzMissileSkel } diff --git a/assets/yaml/jp/rev0/ast_solar.yaml b/assets/yaml/jp/rev0/ast_solar.yaml index d5c5aa0a..88b2b591 100644 --- a/assets/yaml/jp/rev0/ast_solar.yaml +++ b/assets/yaml/jp/rev0/ast_solar.yaml @@ -31,11 +31,11 @@ D_SO_6004500: D_SO_6005710: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6005710, symbol: D_SO_6005710} -D_SO_600636C: - { type: SF64:ANIM, offset: 0x600636C, symbol: D_SO_600636C} +aSoGoreAnim: + { type: SF64:ANIM, offset: 0x600636C, symbol: aSoGoreAnim} -D_SO_6006558: - { type: SF64:SKELETON, offset: 0x6006558, symbol: D_SO_6006558} +aSoGoreSkel: + { type: SF64:SKELETON, offset: 0x6006558, symbol: aSoGoreSkel} D_SO_6006DD8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6006DD8, symbol: D_SO_6006DD8} diff --git a/assets/yaml/jp/rev0/ast_star_wolf.yaml b/assets/yaml/jp/rev0/ast_star_wolf.yaml index d7225ceb..e6e12660 100644 --- a/assets/yaml/jp/rev0/ast_star_wolf.yaml +++ b/assets/yaml/jp/rev0/ast_star_wolf.yaml @@ -56,8 +56,8 @@ D_STAR_WOLF_F00D3C0: D_STAR_WOLF_F00E2E0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x0F00E2E0, symbol: D_STAR_WOLF_F00E2E0 } -D_STAR_WOLF_F00F200: - { type: GFX, offset: 0xF00F200, symbol: D_STAR_WOLF_F00F200 } +aStarWolfStandardShipDL: + { type: GFX, offset: 0xF00F200, symbol: aStarWolfStandardShipDL } D_STAR_WOLF_F0101D0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x0F0101D0, symbol: D_STAR_WOLF_F0101D0 } @@ -68,8 +68,8 @@ D_STAR_WOLF_F011E80: D_STAR_WOLF_F011680: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0F011680, symbol: D_STAR_WOLF_F011680 } -D_STAR_WOLF_F0103D0: - { type: GFX, offset: 0xF0103D0, symbol: D_STAR_WOLF_F0103D0 } +aStarWolfUpgradedShipDL: + { type: GFX, offset: 0xF0103D0, symbol: aStarWolfUpgradedShipDL } D_STAR_WOLF_F011F00: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0F011F00, symbol: D_STAR_WOLF_F011F00 } @@ -89,14 +89,14 @@ D_STAR_WOLF_F013180: D_STAR_WOLF_F013980: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0F013980, symbol: D_STAR_WOLF_F013980 } -D_STAR_WOLF_F014180: - { type: GFX, offset: 0xF014180, symbol: D_STAR_WOLF_F014180 } +aStarWolfRadarMarkDL: + { type: GFX, offset: 0xF014180, symbol: aStarWolfRadarMarkDL } D_STAR_WOLF_F014208: { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x0F014208, symbol: D_STAR_WOLF_F014208 } -D_STAR_WOLF_F014310: - { type: GFX, offset: 0xF014310, symbol: D_STAR_WOLF_F014310 } +aStarWolfShadowDL: + { type: GFX, offset: 0xF014310, symbol: aStarWolfShadowDL } -D_STAR_WOLF_F014398: - { type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 32, offset: 0x0F014398, symbol: D_STAR_WOLF_F014398 } +aStarWolfShadowTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 32, offset: 0x0F014398, symbol: aStarWolfShadowTex } diff --git a/assets/yaml/jp/rev0/ast_training.yaml b/assets/yaml/jp/rev0/ast_training.yaml index 8c2f5bc9..4fda0b1c 100644 --- a/assets/yaml/jp/rev0/ast_training.yaml +++ b/assets/yaml/jp/rev0/ast_training.yaml @@ -25,8 +25,8 @@ D_TR_6000900: D_TR_6001820: { type: TEXTURE, format: RGBA16, offset: 0x6001820, width: 44, height: 44, ctype: u16, symbol: D_TR_6001820 } -D_TR_6002740: - { type: GFX, offset: 0x6002740, symbol: D_TR_6002740 } +aTrBarrierDL: + { type: GFX, offset: 0x6002740, symbol: aTrBarrierDL } D_TR_60028F0: { type: TEXTURE, format: RGBA16, offset: 0x060028F0, width: 32, height: 32, ctype: u16, symbol: D_TR_60028F0 } @@ -82,7 +82,7 @@ aTrBuildingHitbox: aItemTrainingRingHitbox: { type: SF64:HITBOX, offset: 0x6009CFC, symbol: aItemTrainingRingHitbox } -D_TR_6009D18: - { type: SF64:HITBOX, offset: 0x6009D18, symbol: D_TR_6009D18 } +aTrBarrierHitbox: + { type: SF64:HITBOX, offset: 0x6009D18, symbol: aTrBarrierHitbox } # size = 0x9D40 \ No newline at end of file diff --git a/assets/yaml/jp/rev0/ast_ve1_boss.yaml b/assets/yaml/jp/rev0/ast_ve1_boss.yaml index 436fc334..ff054630 100644 --- a/assets/yaml/jp/rev0/ast_ve1_boss.yaml +++ b/assets/yaml/jp/rev0/ast_ve1_boss.yaml @@ -29,8 +29,8 @@ D_VE1_90012F0: D_VE1_9002CD8: {type: SF64:ANIM, offset: 0x9002CD8, symbol: D_VE1_9002CD8} -D_VE1_9002CF0: - {type: GFX, offset: 0x9002CF0, symbol: D_VE1_9002CF0} +aVe1BlockerDL: + {type: GFX, offset: 0x9002CF0, symbol: aVe1BlockerDL} D_VE1_9002F30: {type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x9002F30, symbol: D_VE1_9002F30, tlut: 0x9003330} @@ -113,8 +113,8 @@ D_VE1_900DF20: D_VE1_900DFB8: {type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x900DFB8, symbol: D_VE1_900DFB8} -D_VE1_900EFC0: - {type: GFX, offset: 0x900EFC0, symbol: D_VE1_900EFC0} +aVe1TempleBgDL: + {type: GFX, offset: 0x900EFC0, symbol: aVe1TempleBgDL} aVe1TempleInterior2DL: {type: GFX, offset: 0x900F060, symbol: aVe1TempleInterior2DL} @@ -128,14 +128,14 @@ D_VE1_9010FC4: D_VE1_9010FD0: {type: GFX, offset: 0x9010FD0, symbol: D_VE1_9010FD0} -D_VE1_9011200: - {type: GFX, offset: 0x9011200, symbol: D_VE1_9011200} +aVe1PillarDL: + {type: GFX, offset: 0x9011200, symbol: aVe1PillarDL} D_VE1_9011980: {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x9011980, symbol: D_VE1_9011980} -D_VE1_9012180: - {type: GFX, offset: 0x9012180, symbol: D_VE1_9012180} +aVe1Pillar5DL: + {type: GFX, offset: 0x9012180, symbol: aVe1Pillar5DL} D_VE1_90123C0: {type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 16, offset: 0x90123C0, symbol: D_VE1_90123C0, tlut: 0x90125C0} diff --git a/assets/yaml/jp/rev0/ast_venom_1.yaml b/assets/yaml/jp/rev0/ast_venom_1.yaml index 777321f2..1655355a 100644 --- a/assets/yaml/jp/rev0/ast_venom_1.yaml +++ b/assets/yaml/jp/rev0/ast_venom_1.yaml @@ -25,8 +25,8 @@ D_VE1_6000D80: D_VE1_6001B80: { type: TEXTURE, format: IA8, width: 128, height: 19, offset: 0x6001B80, ctype: u8, symbol: D_VE1_6001B80 } -D_VE1_6002500: - { type: GFX, offset: 0x6002500, symbol: D_VE1_6002500 } +aVe1EnemyGateDL: + { type: GFX, offset: 0x6002500, symbol: aVe1EnemyGateDL } D_VE1_60029F8: { type: TEXTURE, format: CI8, width: 8, height: 16, offset: 0x60029F8, tlut: 0x6002A78, ctype: u8, symbol: D_VE1_60029F8 } @@ -52,11 +52,11 @@ aVe1WatchPostDL: D_VE1_6003B10: { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6003B10, ctype: u16, symbol: D_VE1_6003B10 } -D_VE1_6004310: - { type: GFX, offset: 0x6004310, symbol: D_VE1_6004310 } +aVe1EnemyGateDoorLeftDL: + { type: GFX, offset: 0x6004310, symbol: aVe1EnemyGateDoorLeftDL } -D_VE1_60043F0: - { type: GFX, offset: 0x60043F0, symbol: D_VE1_60043F0 } +aVe1EnemyGateDoorRightDL: + { type: GFX, offset: 0x60043F0, symbol: aVe1EnemyGateDoorRightDL } D_VE1_60044D0: { type: TEXTURE, format: CI8, width: 16, height: 16, offset: 0x60044D0, tlut: 0x60045D0, ctype: u8, symbol: D_VE1_60044D0 } @@ -124,8 +124,8 @@ D_VE1_601B1E4: D_VE1_6010088: { type: SF64:OBJECT_INIT, offset: 0x6010088, symbol: D_VE1_6010088 } -D_VE1_601B43C: - { type: SF64:HITBOX, offset: 0x601B43C, symbol: D_VE1_601B43C } +aVe1Pillar5Hitbox: + { type: SF64:HITBOX, offset: 0x601B43C, symbol: aVe1Pillar5Hitbox } D_VE1_601B474: { type: SF64:HITBOX, offset: 0x601B474, symbol: D_VE1_601B474 } @@ -178,5 +178,5 @@ aVe1Pillar4Hitbox: aVe1MonkeyStatueHitbox: { type: SF64:HITBOX, offset: 0x601B8D8, symbol: aVe1MonkeyStatueHitbox } -D_VE1_601B944: - { type: SF64:HITBOX, offset: 0x601B944, symbol: D_VE1_601B944 } \ No newline at end of file +aVe1EnemyGateHitbox: + { type: SF64:HITBOX, offset: 0x601B944, symbol: aVe1EnemyGateHitbox } \ No newline at end of file diff --git a/assets/yaml/jp/rev0/ast_venom_2.yaml b/assets/yaml/jp/rev0/ast_venom_2.yaml index c1f15a4b..3146fc88 100644 --- a/assets/yaml/jp/rev0/ast_venom_2.yaml +++ b/assets/yaml/jp/rev0/ast_venom_2.yaml @@ -174,11 +174,11 @@ D_VE2_60114A0: D_VE2_6013AF8: { type: TEXTURE, format: RGBA16, width: 16, height: 16, offset: 0x6013AF8, ctype: u16, symbol: D_VE2_6013AF8 } -D_VE2_6014658: - { type: SF64:ANIM, offset: 0x6014658, symbol: D_VE2_6014658 } +aVe2AndrossGateAnim: + { type: SF64:ANIM, offset: 0x6014658, symbol: aVe2AndrossGateAnim } -D_VE2_6014844: - { type: SF64:SKELETON, offset: 0x6014844, symbol: D_VE2_6014844 } +aVe2AndrossGateSkel: + { type: SF64:SKELETON, offset: 0x6014844, symbol: aVe2AndrossGateSkel } aVe2BaseAnim: { type: SF64:ANIM, offset: 0x6014904, symbol: aVe2BaseAnim } diff --git a/assets/yaml/jp/rev0/ast_warp_zone.yaml b/assets/yaml/jp/rev0/ast_warp_zone.yaml index 87af0cb6..d7ce93c7 100644 --- a/assets/yaml/jp/rev0/ast_warp_zone.yaml +++ b/assets/yaml/jp/rev0/ast_warp_zone.yaml @@ -8,14 +8,14 @@ - '#include "gfx.h"' - '#include "sf64object.h"' -D_WZ_7000000: - { type: GFX, offset: 0x7000000, symbol: D_WZ_7000000 } +aWzSxEnemy1DL: + { type: GFX, offset: 0x7000000, symbol: aWzSxEnemy1DL } -D_WZ_7000280: - { type: GFX, offset: 0x7000280, symbol: D_WZ_7000280 } +aWzGateDL: + { type: GFX, offset: 0x7000280, symbol: aWzGateDL } -D_WZ_70008F0: - { type: GFX, offset: 0x70008F0, symbol: D_WZ_70008F0 } +aWzMeteor2DL: + { type: GFX, offset: 0x70008F0, symbol: aWzMeteor2DL } D_WZ_7000260: { type: TEXTURE, ctype: u16, format: RGBA16, width: 4, height: 4, offset: 0x7000260, symbol: D_WZ_7000260 } @@ -26,14 +26,14 @@ D_WZ_7000A30: D_WZ_7000C30: { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x7000C30, symbol: D_WZ_7000C30 } -D_WZ_7000C40: - { type: GFX, offset: 0x7000C40, symbol: D_WZ_7000C40 } +aWzPillar1DL: + { type: GFX, offset: 0x7000C40, symbol: aWzPillar1DL } -D_WZ_7000E80: - { type: GFX, offset: 0x7000E80, symbol: D_WZ_7000E80 } +aWzMeteor1DL: + { type: GFX, offset: 0x7000E80, symbol: aWzMeteor1DL } -D_WZ_70010E0: - { type: GFX, offset: 0x70010E0, symbol: D_WZ_70010E0 } +aWzPillar2DL: + { type: GFX, offset: 0x70010E0, symbol: aWzPillar2DL } D_WZ_7001540: { type: GFX, offset: 0x7001540, symbol: D_WZ_7001540 } diff --git a/assets/yaml/jp/rev0/ast_zoness.yaml b/assets/yaml/jp/rev0/ast_zoness.yaml index f61f560b..129ddaf9 100644 --- a/assets/yaml/jp/rev0/ast_zoness.yaml +++ b/assets/yaml/jp/rev0/ast_zoness.yaml @@ -84,8 +84,8 @@ D_ZO_6004A70: D_ZO_6004B00: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6004B00, symbol: D_ZO_6004B00} -D_ZO_6004D00: - { type: GFX, offset: 0x6004D00, symbol: D_ZO_6004D00} +aZoPatrolBoatDL: + { type: GFX, offset: 0x6004D00, symbol: aZoPatrolBoatDL} D_ZO_6005958: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6005958, symbol: D_ZO_6005958} @@ -351,11 +351,11 @@ D_ZO_601F420: D_ZO_601F620: { type: GFX, offset: 0x601F620, symbol: D_ZO_601F620} -D_ZO_601F874: - { type: SF64:ANIM, offset: 0x601F874, symbol: D_ZO_601F874} +aZoSarumarinePeriscopeAnim: + { type: SF64:ANIM, offset: 0x601F874, symbol: aZoSarumarinePeriscopeAnim} -D_ZO_601F920: - { type: SF64:SKELETON, offset: 0x601F920, symbol: D_ZO_601F920} +aZoSarumarinePeriscopeSkel: + { type: SF64:SKELETON, offset: 0x601F920, symbol: aZoSarumarinePeriscopeSkel} D_ZO_601F940: { type: GFX, offset: 0x601F940, symbol: D_ZO_601F940} @@ -535,8 +535,8 @@ D_ZO_602C028: aZoSarumarineHitbox: { type: SF64:HITBOX, offset: 0x602C044, symbol: aZoSarumarineHitbox} -D_ZO_602C1A0: - { type: SF64:HITBOX, offset: 0x602C1A0, symbol: D_ZO_602C1A0} +aZoSarumarinePeriscopeHitbox: + { type: SF64:HITBOX, offset: 0x602C1A0, symbol: aZoSarumarinePeriscopeHitbox} aZoCargoShipHitbox: { type: SF64:HITBOX, offset: 0x602C1D4, symbol: aZoCargoShipHitbox} diff --git a/assets/yaml/us/rev1/ast_7_ti_1.yaml b/assets/yaml/us/rev1/ast_7_ti_1.yaml index c755070c..318224f2 100644 --- a/assets/yaml/us/rev1/ast_7_ti_1.yaml +++ b/assets/yaml/us/rev1/ast_7_ti_1.yaml @@ -209,11 +209,11 @@ aTi1DesertRoverSkel: aTi1FekudaGun2DL: { type: GFX, offset: 0x700C980, symbol: aTi1FekudaGun2DL } -D_TI1_700CAF4: - { type: SF64:ANIM, offset: 0x700CAF4, symbol: D_TI1_700CAF4} +aTiBomberAnim: + { type: SF64:ANIM, offset: 0x700CAF4, symbol: aTiBomberAnim} -D_TI1_700CB60: - {type: SF64:SKELETON, offset: 0x700CB60, symbol: D_TI1_700CB60} +aTiBomberSkel: + {type: SF64:SKELETON, offset: 0x700CB60, symbol: aTiBomberSkel} aTiRascoAnim: { type: SF64:ANIM, offset: 0x700D534, symbol: aTiRascoAnim } diff --git a/assets/yaml/us/rev1/ast_allies.yaml b/assets/yaml/us/rev1/ast_allies.yaml index d4997d4b..c22d8734 100644 --- a/assets/yaml/us/rev1/ast_allies.yaml +++ b/assets/yaml/us/rev1/ast_allies.yaml @@ -59,8 +59,8 @@ D_D0098B0: D_D009938: { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x0D009938, symbol: D_D009938 } -D_D009A40: - { type: GFX, offset: 0xD009A40, symbol: D_D009A40 } +aKattShipDL: + { type: GFX, offset: 0xD009A40, symbol: aKattShipDL } D_D00A3B8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0D00A3B8, symbol: D_D00A3B8 } @@ -97,8 +97,8 @@ aJamesMarkTex: aJamesMarkTLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0xD00B870, symbol: aJamesMarkTLUT } -D_D00B880: - { type: GFX, offset: 0xD00B880, symbol: D_D00B880 } +aBillShipDL: + { type: GFX, offset: 0xD00B880, symbol: aBillShipDL } ast_allies_seg13_vtx_BB70: { type: VTX, count: 144, offset: 0xD00BB70, symbol: ast_allies_seg13_vtx_BB70 } diff --git a/assets/yaml/us/rev1/ast_aquas.yaml b/assets/yaml/us/rev1/ast_aquas.yaml index b45cb0cd..32e9bdf2 100644 --- a/assets/yaml/us/rev1/ast_aquas.yaml +++ b/assets/yaml/us/rev1/ast_aquas.yaml @@ -22,8 +22,8 @@ aAqSquidAnim: aAqSquidSkel: { type: SF64:SKELETON, offset: 0x6000DB0, symbol: aAqSquidSkel } -D_AQ_6000E10: - { type: GFX, offset: 0x6000E10, symbol: D_AQ_6000E10 } +aAqShellDL: + { type: GFX, offset: 0x6000E10, symbol: aAqShellDL } D_AQ_6001130: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6001130, symbol: D_AQ_6001130 } @@ -98,8 +98,8 @@ D_AQ_6003FF0: D_AQ_6008168: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6008168, symbol: D_AQ_6008168 } -D_AQ_6008970: - { type: GFX, offset: 0x6008970, symbol: D_AQ_6008970 } +aAqStarfishDL: + { type: GFX, offset: 0x6008970, symbol: aAqStarfishDL } D_AQ_6008EC8: { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x6008EC8, symbol: D_AQ_6008EC8, tlut: 0x6008FC8 } @@ -659,14 +659,14 @@ D_AQ_60308B8: aBoss301Hitbox: { type: SF64:HITBOX, offset: 0x6030B10, symbol: aBoss301Hitbox } -D_AQ_6030B14_f32: - { type: SF64:HITBOX, offset: 0x6030B14, symbol: D_AQ_6030B14_f32 } +aAqShellHitbox: + { type: SF64:HITBOX, offset: 0x6030B14, symbol: aAqShellHitbox } -D_AQ_6030B30: - { type: SF64:HITBOX, offset: 0x6030B30, symbol: D_AQ_6030B30 } +aAqStarfishHitbox: + { type: SF64:HITBOX, offset: 0x6030B30, symbol: aAqStarfishHitbox } -D_AQ_6030B4C: - { type: SF64:HITBOX, offset: 0x6030B4C, symbol: D_AQ_6030B4C } +aAqOysterEvHitbox: + { type: SF64:HITBOX, offset: 0x6030B4C, symbol: aAqOysterEvHitbox } D_AQ_6030B68: { type: SF64:HITBOX, offset: 0x6030B68, symbol: D_AQ_6030B68 } diff --git a/assets/yaml/us/rev1/ast_area_6.yaml b/assets/yaml/us/rev1/ast_area_6.yaml index e673f924..7ff0e0cf 100644 --- a/assets/yaml/us/rev1/ast_area_6.yaml +++ b/assets/yaml/us/rev1/ast_area_6.yaml @@ -57,8 +57,8 @@ D_A6_6009718: D_A6_6009B18: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06009B18, symbol: D_A6_6009B18 } -D_A6_600E0C0: - { type: GFX, offset: 0x600E0C0, symbol: D_A6_600E0C0 } +aA6UmbraStationDL: + { type: GFX, offset: 0x600E0C0, symbol: aA6UmbraStationDL } D_A6_600EBE8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 16, offset: 0x0600EBE8, symbol: D_A6_600EBE8 } @@ -96,8 +96,8 @@ D_A6_6012550: D_A6_6012840: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06012840, symbol: D_A6_6012840 } -D_A6_6012A40: - { type: GFX, offset: 0x6012A40, symbol: D_A6_6012A40 } +aA6HarlockFrigateDL: + { type: GFX, offset: 0x6012A40, symbol: aA6HarlockFrigateDL } D_A6_6013CD8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06013CD8, symbol: D_A6_6013CD8 } @@ -117,8 +117,8 @@ D_A6_6015CD8: D_A6_6015EE0: { type: GFX, offset: 0x6015EE0, symbol: D_A6_6015EE0 } -D_A6_6016190: - { type: GFX, offset: 0x6016190, symbol: D_A6_6016190 } +aA6ZeramClassCruiserDL: + { type: GFX, offset: 0x6016190, symbol: aA6ZeramClassCruiserDL } D_A6_6017120: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06017120, symbol: D_A6_6017120 } @@ -150,8 +150,8 @@ D_A6_6018994: D_A6_6018BA0: { type: SF64:SKELETON, offset: 0x6018BA0, symbol: D_A6_6018BA0 } -D_A6_6018BF0: - { type: GFX, offset: 0x6018BF0, symbol: D_A6_6018BF0 } +aA6NinjinMissileDL: + { type: GFX, offset: 0x6018BF0, symbol: aA6NinjinMissileDL } D_A6_6019130: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06019130, symbol: D_A6_6019130 } @@ -162,8 +162,8 @@ D_A6_6019330: D_A6_6019530: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06019530, symbol: D_A6_6019530 } -D_A6_6019730: - { type: GFX, offset: 0x6019730, symbol: D_A6_6019730 } +aA6RocketDL: + { type: GFX, offset: 0x6019730, symbol: aA6RocketDL } D_A6_6019B20: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06019B20, symbol: D_A6_6019B20 } @@ -174,8 +174,8 @@ D_A6_6019D20: D_A6_6019F20: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06019F20, symbol: D_A6_6019F20 } -D_A6_601A120: - { type: GFX, offset: 0x601A120, symbol: D_A6_601A120 } +aA6SpaceMineDL: + { type: GFX, offset: 0x601A120, symbol: aA6SpaceMineDL } D_A6_601A220: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601A220, symbol: D_A6_601A220 } @@ -228,14 +228,14 @@ D_A6_6023F64: D_A6_6027F50: { type: SF64:SCRIPT, offset: 0x6027F50, symbol: D_A6_6027F50} -D_A6_60280E0: - { type: SF64:HITBOX, offset: 0x60280E0, symbol: D_A6_60280E0 } +aA6UmbraStationHitbox: + { type: SF64:HITBOX, offset: 0x60280E0, symbol: aA6UmbraStationHitbox } -D_A6_6028254: - { type: SF64:HITBOX, offset: 0x6028254, symbol: D_A6_6028254 } +aA6HarlockFrigateHitbox: + { type: SF64:HITBOX, offset: 0x6028254, symbol: aA6HarlockFrigateHitbox } -D_A6_60282A0: - { type: SF64:HITBOX, offset: 0x60282A0, symbol: D_A6_60282A0 } +aA6ZeramClassCruiserHitbox: + { type: SF64:HITBOX, offset: 0x60282A0, symbol: aA6ZeramClassCruiserHitbox } aA6GorgonHitbox: { type: SF64:HITBOX, offset: 0x6028454, symbol: aA6GorgonHitbox } diff --git a/assets/yaml/us/rev1/ast_common.yaml b/assets/yaml/us/rev1/ast_common.yaml index 81a615f3..3372ef0e 100644 --- a/assets/yaml/us/rev1/ast_common.yaml +++ b/assets/yaml/us/rev1/ast_common.yaml @@ -980,8 +980,8 @@ D_1031EC0: D_1032578: { type: TEXTURE, format: RGBA16, width: 16, height: 16, ctype: u16, offset: 0x1032578, symbol: D_1032578 } -D_1032780: - { type: GFX, offset: 0x1032780, symbol: D_1032780 } +aArwingShadowDL: + { type: GFX, offset: 0x1032780, symbol: aArwingShadowDL } D_1032808: { type: TEXTURE, format: IA8, width: 32, height: 32, ctype: u8, offset: 0x1032808, symbol: D_1032808 } diff --git a/assets/yaml/us/rev1/ast_corneria.yaml b/assets/yaml/us/rev1/ast_corneria.yaml index 424a0f8c..2cc6ece2 100644 --- a/assets/yaml/us/rev1/ast_corneria.yaml +++ b/assets/yaml/us/rev1/ast_corneria.yaml @@ -111,8 +111,8 @@ aCoHighway5DL: D_CO_6011790: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06011790, symbol: D_CO_6011790 } -D_CO_6011F90: - { type: GFX, offset: 0x6011F90, symbol: D_CO_6011F90 } +aCoCornerianFighterDL: + { type: GFX, offset: 0x6011F90, symbol: aCoCornerianFighterDL } D_CO_6012640: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06012640, symbol: D_CO_6012640 } diff --git a/assets/yaml/us/rev1/ast_enmy_planet.yaml b/assets/yaml/us/rev1/ast_enmy_planet.yaml index 9ea49f50..e74507f8 100644 --- a/assets/yaml/us/rev1/ast_enmy_planet.yaml +++ b/assets/yaml/us/rev1/ast_enmy_planet.yaml @@ -15,14 +15,14 @@ D_ENMY_PLANET_4000290: ast_enmy_planet_seg4_vtx_8F8: { type: VTX, count: 90, offset: 0x40008F8, symbol: ast_enmy_planet_seg4_vtx_8F8 } -D_ENMY_PLANET_40001A4: - { type: SF64:ANIM, offset: 0x40001A4, symbol: D_ENMY_PLANET_40001A4 } +aTripodAnim: + { type: SF64:ANIM, offset: 0x40001A4, symbol: aTripodAnim } -D_ENMY_PLANET_4000270: - { type: SF64:SKELETON, offset: 0x4000270, symbol: D_ENMY_PLANET_4000270 } +aTripodSkel: + { type: SF64:SKELETON, offset: 0x4000270, symbol: aTripodSkel } -D_ENMY_PLANET_4000710: - { type: GFX, offset: 0x4000710, symbol: D_ENMY_PLANET_4000710 } +aVenomTankDL: + { type: GFX, offset: 0x4000710, symbol: aVenomTankDL } D_ENMY_PLANET_4001298: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x04001298, symbol: D_ENMY_PLANET_4001298 } @@ -60,11 +60,11 @@ D_ENMY_PLANET_4004538: D_ENMY_PLANET_4004D38: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x04004D38, symbol: D_ENMY_PLANET_4004D38 } -D_ENMY_PLANET_40057AC: - { type: SF64:ANIM, offset: 0x40057AC, symbol: D_ENMY_PLANET_40057AC } +aFirebirdAnim: + { type: SF64:ANIM, offset: 0x40057AC, symbol: aFirebirdAnim } -D_ENMY_PLANET_40058B8: - { type: SF64:SKELETON, offset: 0x40058B8, symbol: D_ENMY_PLANET_40058B8 } +aFirebirdSkel: + { type: SF64:SKELETON, offset: 0x40058B8, symbol: aFirebirdSkel } D_ENMY_PLANET_4005E78: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x04005E78, symbol: D_ENMY_PLANET_4005E78 } @@ -81,17 +81,17 @@ D_ENMY_PLANET_40064E8: D_ENMY_PLANET_40066E8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x040066E8, symbol: D_ENMY_PLANET_40066E8 } -D_ENMY_PLANET_40068F0: - { type: GFX, offset: 0x40068F0, symbol: D_ENMY_PLANET_40068F0 } +aVenomFighter1DL: + { type: GFX, offset: 0x40068F0, symbol: aVenomFighter1DL } -D_ENMY_PLANET_4006E90: - { type: GFX, offset: 0x4006E90, symbol: D_ENMY_PLANET_4006E90 } +aVenomFighter2DL: + { type: GFX, offset: 0x4006E90, symbol: aVenomFighter2DL } -D_ENMY_PLANET_40073C0: - { type: GFX, offset: 0x40073C0, symbol: D_ENMY_PLANET_40073C0 } +aGrangaFighter1DL: + { type: GFX, offset: 0x40073C0, symbol: aGrangaFighter1DL } -D_ENMY_PLANET_4007AF0: - { type: GFX, offset: 0x4007AF0, symbol: D_ENMY_PLANET_4007AF0 } +aGrangaFighter2DL: + { type: GFX, offset: 0x4007AF0, symbol: aGrangaFighter2DL } D_ENMY_PLANET_4008100: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x04008100, symbol: D_ENMY_PLANET_4008100 } @@ -108,5 +108,5 @@ D_ENMY_PLANET_4008FF8: D_ENMY_PLANET_4008F70: { type: GFX, offset: 0x4008F70, symbol: D_ENMY_PLANET_4008F70 } -D_ENMY_PLANET_4009800: - { type: GFX, offset: 0x4009800, symbol: D_ENMY_PLANET_4009800 } +aSpyEyeDL: + { type: GFX, offset: 0x4009800, symbol: aSpyEyeDL } diff --git a/assets/yaml/us/rev1/ast_enmy_space.yaml b/assets/yaml/us/rev1/ast_enmy_space.yaml index 0b4663af..959efde9 100644 --- a/assets/yaml/us/rev1/ast_enmy_space.yaml +++ b/assets/yaml/us/rev1/ast_enmy_space.yaml @@ -8,26 +8,26 @@ - '#include "gfx.h"' - '#include "sf64object.h"' -D_ENMY_SPACE_4000080: - { type: SF64:ANIM, offset: 0x4000080, symbol: D_ENMY_SPACE_4000080 } +aKillerBeeAnim: + { type: SF64:ANIM, offset: 0x4000080, symbol: aKillerBeeAnim } -D_ENMY_SPACE_400014C: - { type: SF64:SKELETON, offset: 0x400014C, symbol: D_ENMY_SPACE_400014C } +aKillerBeeSkel: + { type: SF64:SKELETON, offset: 0x400014C, symbol: aKillerBeeSkel } aEnmySpMeMora1DL: { type: GFX, offset: 0x4000170, symbol: aEnmySpMeMora1DL } -D_ENMY_SPACE_4000650: - { type: GFX, offset: 0x4000650, symbol: D_ENMY_SPACE_4000650 } +aSpiderDL: + { type: GFX, offset: 0x4000650, symbol: aSpiderDL } -D_ENMY_SPACE_4000EC0: - { type: GFX, offset: 0x4000EC0, symbol: D_ENMY_SPACE_4000EC0 } +aGammaOnDL: + { type: GFX, offset: 0x4000EC0, symbol: aGammaOnDL } D_ENMY_SPACE_4001108: { type: TEXTURE, format: RGBA16, offset: 0x4001108, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4001108 } -D_ENMY_SPACE_4001310: - { type: GFX, offset: 0x4001310, symbol: D_ENMY_SPACE_4001310 } +aAttacker2DL: + { type: GFX, offset: 0x4001310, symbol: aAttacker2DL } D_ENMY_SPACE_4001A30: { type: TEXTURE, format: RGBA16, offset: 0x4001A30, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4001A30 } @@ -95,11 +95,11 @@ aEnmySpMeMora2DL: D_ENMY_SPACE_4008550: { type: TEXTURE, format: RGBA16, offset: 0x04008550, width: 32, height: 32, ctype: u16, symbol: D_ENMY_SPACE_4008550 } -D_ENMY_SPACE_4008D50: - { type: GFX, offset: 0x4008D50, symbol: D_ENMY_SPACE_4008D50 } +aGammaOffDL: + { type: GFX, offset: 0x4008D50, symbol: aGammaOffDL } -D_ENMY_SPACE_4008FA0: - { type: GFX, offset: 0x4008FA0, symbol: D_ENMY_SPACE_4008FA0 } +aVenomFighter3DL: + { type: GFX, offset: 0x4008FA0, symbol: aVenomFighter3DL } D_ENMY_SPACE_40096B8: { type: TEXTURE, format: RGBA16, offset: 0x040096B8, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_40096B8 } @@ -110,25 +110,25 @@ D_ENMY_SPACE_40098B8: D_ENMY_SPACE_4009AB8: { type: TEXTURE, format: RGBA16, offset: 0x04009AB8, width: 32, height: 32, ctype: u16, symbol: D_ENMY_SPACE_4009AB8 } -D_ENMY_SPACE_400A30C: - { type: SF64:ANIM, offset: 0x400A30C, symbol: D_ENMY_SPACE_400A30C } +aCruiserGunAnim: + { type: SF64:ANIM, offset: 0x400A30C, symbol: aCruiserGunAnim } -D_ENMY_SPACE_400A398: - { type: SF64:SKELETON, offset: 0x400A398, symbol: D_ENMY_SPACE_400A398 } +aCruiserGunSkel: + { type: SF64:SKELETON, offset: 0x400A398, symbol: aCruiserGunSkel } aEnmySpMeMora3DL: { type: GFX, offset: 0x400A630, symbol: aEnmySpMeMora3DL } -D_ENMY_SPACE_400AAE0: - { type: GFX, offset: 0x400AAE0, symbol: D_ENMY_SPACE_400AAE0 } +aCommanderDL: + { type: GFX, offset: 0x400AAE0, symbol: aCommanderDL } -D_ENMY_SPACE_400B390: - { type: GFX, offset: 0x400B390, symbol: D_ENMY_SPACE_400B390 } +aAttacker3DL: + { type: GFX, offset: 0x400B390, symbol: aAttacker3DL } -D_ENMY_SPACE_400BD20: - { type: GFX, offset: 0x400BD20, symbol: D_ENMY_SPACE_400BD20 } +aAttacker1DL: + { type: GFX, offset: 0x400BD20, symbol: aAttacker1DL } # size = 0xC510 \ No newline at end of file diff --git a/assets/yaml/us/rev1/ast_fortuna.yaml b/assets/yaml/us/rev1/ast_fortuna.yaml index 81adb759..9c931460 100644 --- a/assets/yaml/us/rev1/ast_fortuna.yaml +++ b/assets/yaml/us/rev1/ast_fortuna.yaml @@ -110,8 +110,8 @@ D_FO_6008150: D_FO_6009070: { type: TEXTURE, format: RGBA16, width: 44, height: 44, offset: 0x6009070, ctype: u16, symbol: D_FO_6009070 } -D_FO_6009F90: - { type: GFX, offset: 0x6009F90, symbol: D_FO_6009F90 } +aFoEnemyShadowDL: + { type: GFX, offset: 0x6009F90, symbol: aFoEnemyShadowDL } D_FO_600A018: { type: TEXTURE, format: IA8, width: 32, height: 32, offset: 0x600A018, ctype: u8, symbol: D_FO_600A018 } diff --git a/assets/yaml/us/rev1/ast_katina.yaml b/assets/yaml/us/rev1/ast_katina.yaml index 6198381e..7a1a7729 100644 --- a/assets/yaml/us/rev1/ast_katina.yaml +++ b/assets/yaml/us/rev1/ast_katina.yaml @@ -109,14 +109,14 @@ aDestroyedHatch4DL: aDestroyedHatch3DL: { type: GFX, offset: 0x600D4E0, symbol: aDestroyedHatch3DL } -D_KA_600D730: - { type: GFX, offset: 0x600D730, symbol: D_KA_600D730 } +aKaCornerianFighterShadowDL: + { type: GFX, offset: 0x600D730, symbol: aKaCornerianFighterShadowDL } D_KA_600D7B8: { type: TEXTURE, format: IA8, width: 32, height: 32, offset: 0x600D7B8, ctype: u8, symbol: D_KA_600D7B8 } -D_KA_600DBC0: - { type: GFX, offset: 0x600DBC0, symbol: D_KA_600DBC0 } +aKaEnemyShadowDL: + { type: GFX, offset: 0x600DBC0, symbol: aKaEnemyShadowDL } D_KA_600DC48: { type: TEXTURE, format: IA8, width: 32, height: 32, offset: 0x600DC48, ctype: u8, symbol: D_KA_600DC48 } diff --git a/assets/yaml/us/rev1/ast_macbeth.yaml b/assets/yaml/us/rev1/ast_macbeth.yaml index 771ccfef..6f435c7b 100644 --- a/assets/yaml/us/rev1/ast_macbeth.yaml +++ b/assets/yaml/us/rev1/ast_macbeth.yaml @@ -61,8 +61,8 @@ D_MA_60026F8: D_MA_60027F8: { type: TEXTURE, format: TLUT, ctype: u16, colors: 72, offset: 0x60027F8, symbol: D_MA_60027F8} -D_MA_6002890: - {type: GFX, offset: 0x6002890, symbol: D_MA_6002890} +aMaGuillotine2DL: + {type: GFX, offset: 0x6002890, symbol: aMaGuillotine2DL} D_MA_6002C20: { type: TEXTURE, format: CI8, ctype: u8, width: 32, height: 16, offset: 0x6002C20, symbol: D_MA_6002C20, tlut: 0x6002E20} @@ -238,8 +238,8 @@ D_MA_600AE18: D_MA_600AE98: { type: TEXTURE, format: TLUT, ctype: u16, colors: 80, offset: 0x600AE98, symbol: D_MA_600AE98} -aMaGuillotineDL: - {type: GFX, offset: 0x600AF40, symbol: aMaGuillotineDL} +aMaGuillotine1DL: + {type: GFX, offset: 0x600AF40, symbol: aMaGuillotine1DL} D_MA_600B2E0: { type: TEXTURE, format: RGBA16, ctype: u16, width: 32, height: 64, offset: 0x600B2E0, symbol: D_MA_600B2E0} @@ -274,8 +274,8 @@ D_MA_600D878: D_MA_600D978: { type: TEXTURE, format: TLUT, ctype: u16, colors: 72, offset: 0x600D978, symbol: D_MA_600D978} -D_MA_600DA10: - {type: GFX, offset: 0x600DA10, symbol: D_MA_600DA10} +aMaLaserTurretDL: + {type: GFX, offset: 0x600DA10, symbol: aMaLaserTurretDL} D_MA_600DF60: { type: TEXTURE, format: CI8, ctype: u8, width: 32, height: 32, offset: 0x600DF60, symbol: D_MA_600DF60, tlut: 0x600E360} @@ -478,8 +478,8 @@ aMaTowerTopDL: D_MA_601C170: {type: GFX, offset: 0x601C170, symbol: D_MA_601C170} -D_MA_601C520: - {type: GFX, offset: 0x601C520, symbol: D_MA_601C520} +aMaRailroadCartDL: + {type: GFX, offset: 0x601C520, symbol: aMaRailroadCartDL} D_MA_601D188: {type: SF64:ANIM, offset: 0x601D188, symbol: D_MA_601D188} @@ -922,8 +922,8 @@ aMaGuillotineHousingHitbox: aMaGuillotineHitbox: {type: SF64:HITBOX, offset: 0x60368E0, symbol: aMaGuillotineHitbox} -D_MA_60368FC: - {type: SF64:HITBOX, offset: 0x60368FC, symbol: D_MA_60368FC} +aMaRailroadCartHitbox: + {type: SF64:HITBOX, offset: 0x60368FC, symbol: aMaRailroadCartHitbox} aMaBombDropHitbox: {type: SF64:HITBOX, offset: 0x6036930, symbol: aMaBombDropHitbox} diff --git a/assets/yaml/us/rev1/ast_map.yaml b/assets/yaml/us/rev1/ast_map.yaml index a77becb0..d920225d 100644 --- a/assets/yaml/us/rev1/ast_map.yaml +++ b/assets/yaml/us/rev1/ast_map.yaml @@ -412,8 +412,8 @@ D_MAP_604A8D8: { type: TEXTURE, ctype: u16, format: TLUT, colors: 136, offset: 0x0604A8D8, symbol: D_MAP_604A8D8 } # Arwing Model, used in the map. -D_MAP_604A9F0: - { type: GFX, offset: 0x604A9F0, symbol: D_MAP_604A9F0 } +aMapArwingDL: + { type: GFX, offset: 0x604A9F0, symbol: aMapArwingDL } ast_map_seg6_vtx_4AD50: { type: VTX, offset: 0x604AD50, count: 124, symbol: ast_map_seg6_vtx_4AD50 } diff --git a/assets/yaml/us/rev1/ast_meteo.yaml b/assets/yaml/us/rev1/ast_meteo.yaml index 88d29573..9d364b6b 100644 --- a/assets/yaml/us/rev1/ast_meteo.yaml +++ b/assets/yaml/us/rev1/ast_meteo.yaml @@ -62,8 +62,8 @@ D_ME_60080C0: D_ME_6008A18: { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: 8, offset: 0x06008A18, symbol: D_ME_6008A18 } -D_ME_6008AA0: - { type: GFX, offset: 0x6008AA0, symbol: D_ME_6008AA0 } +aMeFlipBot1DL: + { type: GFX, offset: 0x6008AA0, symbol: aMeFlipBot1DL } D_ME_6009228: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06009228, symbol: D_ME_6009228 } @@ -74,35 +74,35 @@ D_ME_6009A28: D_ME_6009C28: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06009C28, symbol: D_ME_6009C28 } -D_ME_6009E30: - { type: GFX, offset: 0x6009E30, symbol: D_ME_6009E30 } +aMeFlipBot2DL: + { type: GFX, offset: 0x6009E30, symbol: aMeFlipBot2DL } -D_ME_6009F50: - { type: GFX, offset: 0x6009F50, symbol: D_ME_6009F50 } +aMeBigMeteorDL: + { type: GFX, offset: 0x6009F50, symbol: aMeBigMeteorDL } -D_ME_600AC70: - { type: GFX, offset: 0x600AC70, symbol: D_ME_600AC70 } +aMeMeteor7DL: + { type: GFX, offset: 0x600AC70, symbol: aMeMeteor7DL } D_ME_600B540: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0600B540, symbol: D_ME_600B540 } -D_ME_600BD40: - { type: GFX, offset: 0x600BD40, symbol: D_ME_600BD40 } +aMeSecretMarker2DL: + { type: GFX, offset: 0x600BD40, symbol: aMeSecretMarker2DL } D_ME_600BF30: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x0600BF30, symbol: D_ME_600BF30 } -D_ME_600C130: - { type: GFX, offset: 0x600C130, symbol: D_ME_600C130 } +aMeRockGull2DL: + { type: GFX, offset: 0x600C130, symbol: aMeRockGull2DL } -D_ME_600C2A0: - { type: GFX, offset: 0x600C2A0, symbol: D_ME_600C2A0 } +aMeMeteor6DL: + { type: GFX, offset: 0x600C2A0, symbol: aMeMeteor6DL } -D_ME_600C740: - { type: GFX, offset: 0x600C740, symbol: D_ME_600C740 } +aMeRockGull3DL: + { type: GFX, offset: 0x600C740, symbol: aMeRockGull3DL } -D_ME_600CAA0: - { type: GFX, offset: 0x600CAA0, symbol: D_ME_600CAA0 } +aMeRockGull1DL: + { type: GFX, offset: 0x600CAA0, symbol: aMeRockGull1DL } aMeMeteorShower3DL: { type: GFX, offset: 0x600CD60, symbol: aMeMeteorShower3DL } @@ -149,20 +149,20 @@ D_ME_60172C8: aMeMeteorShower1DL: { type: GFX, offset: 0x06017AD0, symbol: aMeMeteorShower1DL } -D_ME_6017B60: - { type: GFX, offset: 0x06017B60, symbol: D_ME_6017B60 } +aMeMeteor3DL: + { type: GFX, offset: 0x06017B60, symbol: aMeMeteor3DL } aMeLaserCannon2DL: { type: GFX, offset: 0x06018450, symbol: aMeLaserCannon2DL } -D_ME_6018960: - { type: GFX, offset: 0x06018960, symbol: D_ME_6018960 } +aMeMeteor5DL: + { type: GFX, offset: 0x06018960, symbol: aMeMeteor5DL } -aMeMeteorDL: - { type: GFX, offset: 0x06018C00, symbol: aMeMeteorDL } +aMeMeteor1DL: + { type: GFX, offset: 0x06018C00, symbol: aMeMeteor1DL } -D_ME_6019430: - { type: GFX, offset: 0x06019430, symbol: D_ME_6019430 } +aMeMeteor4DL: + { type: GFX, offset: 0x06019430, symbol: aMeMeteor4DL } D_ME_6019880: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06019880, symbol: D_ME_6019880 } @@ -170,8 +170,8 @@ D_ME_6019880: D_ME_601A080: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601A080, symbol: D_ME_601A080 } -D_ME_601A880: - { type: GFX, offset: 0x0601A880, symbol: D_ME_601A880 } +aMeSecretMarker1DL: + { type: GFX, offset: 0x0601A880, symbol: aMeSecretMarker1DL } aMeMeteoTunnelDL: { type: GFX, offset: 0x0601AE40, symbol: aMeMeteoTunnelDL } @@ -195,8 +195,8 @@ D_ME_601EA00: D_ME_601EA98: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601EA98, symbol: D_ME_601EA98 } -D_ME_601F2A0: - { type: GFX, offset: 0x0601F2A0, symbol: D_ME_601F2A0 } +aMeMeteor2DL: + { type: GFX, offset: 0x0601F2A0, symbol: aMeMeteor2DL } D_ME_601F778: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601F778, symbol: D_ME_601F778 } @@ -280,8 +280,8 @@ D_ME_602B148: D_ME_602F3AC: { type: SF64:SCRIPT, offset: 0x602F3AC, symbol: D_ME_602F3AC } -D_ME_602F604: - { type: SF64:HITBOX, offset: 0x602F604, symbol: D_ME_602F604 } +aMeFlipBotHitbox: + { type: SF64:HITBOX, offset: 0x602F604, symbol: aMeFlipBotHitbox } D_ME_602F638: { type: SF64:HITBOX, offset: 0x602F638, symbol: D_ME_602F638 } diff --git a/assets/yaml/us/rev1/ast_sector_x.yaml b/assets/yaml/us/rev1/ast_sector_x.yaml index 9faf8795..e36aea16 100644 --- a/assets/yaml/us/rev1/ast_sector_x.yaml +++ b/assets/yaml/us/rev1/ast_sector_x.yaml @@ -16,8 +16,8 @@ D_SX_6000000: { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 12, offset: 0x6000000, symbol: D_SX_6000000 } -D_SX_6000840: - { type: GFX, offset: 0x6000840, symbol: D_SX_6000840 } +aSxSpaceMineDL: + { type: GFX, offset: 0x6000840, symbol: aSxSpaceMineDL } # Flying mine D_SX_60008C0: @@ -30,14 +30,14 @@ D_SX_60010C0: D_SX_6001150: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6001150, symbol: D_SX_6001150 } -D_SX_6001950: - { type: GFX, offset: 0x6001950, symbol: D_SX_6001950 } +aSxLaserDestroyedDL: + { type: GFX, offset: 0x6001950, symbol: aSxLaserDestroyedDL } D_SX_6001AD8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6001AD8, symbol: D_SX_6001AD8 } -D_SX_6001CE0: - { type: GFX, offset: 0x6001CE0, symbol: D_SX_6001CE0 } +aSxWatchPostDL: + { type: GFX, offset: 0x6001CE0, symbol: aSxWatchPostDL } D_SX_60020C0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x60020C0, symbol: D_SX_60020C0 } @@ -75,8 +75,8 @@ D_SX_6004EE8: D_SX_6005EE8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6005EE8, symbol: D_SX_6005EE8 } -D_SX_60066F0: - { type: GFX, offset: 0x60066F0, symbol: D_SX_60066F0 } +aSxLaserDL: + { type: GFX, offset: 0x60066F0, symbol: aSxLaserDL } D_SX_6006810: { type: GFX, offset: 0x6006810, symbol: D_SX_6006810 } @@ -102,8 +102,8 @@ D_SX_6009548: D_SX_6009748: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6009748, symbol: D_SX_6009748 } -D_SX_6009950: - { type: GFX, offset: 0x6009950, symbol: D_SX_6009950 } +aSxBaseFloor1DL: + { type: GFX, offset: 0x6009950, symbol: aSxBaseFloor1DL } D_SX_6009C30: { type: GFX, offset: 0x6009C30, symbol: D_SX_6009C30 } @@ -117,8 +117,8 @@ D_SX_6009FF8: D_SX_600A2D4: { type: SF64:ANIM, offset: 0x600A2D4, symbol: D_SX_600A2D4 } -D_SX_600A2E0: - { type: GFX, offset: 0x600A2E0, symbol: D_SX_600A2E0 } +aSxBaseWall3DL: + { type: GFX, offset: 0x600A2E0, symbol: aSxBaseWall3DL } D_SX_600A570: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x600A570, symbol: D_SX_600A570 } @@ -126,17 +126,17 @@ D_SX_600A570: D_SX_600AD70: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x600AD70, symbol: D_SX_600AD70 } -D_SX_600AF70: - { type: GFX, offset: 0x600AF70, symbol: D_SX_600AF70 } +aSxBaseWall1DL: + { type: GFX, offset: 0x600AF70, symbol: aSxBaseWall1DL } -D_SX_600B2B0: - { type: GFX, offset: 0x600B2B0, symbol: D_SX_600B2B0 } +aSxBaseWall2DL: + { type: GFX, offset: 0x600B2B0, symbol: aSxBaseWall2DL } -D_SX_600B540: - { type: GFX, offset: 0x600B540, symbol: D_SX_600B540 } +aSxBaseWall4DL: + { type: GFX, offset: 0x600B540, symbol: aSxBaseWall4DL } -D_SX_600B830: - { type: GFX, offset: 0x600B830, symbol: D_SX_600B830 } +aSxBorzoiFighterDL: + { type: GFX, offset: 0x600B830, symbol: aSxBorzoiFighterDL } D_SX_600C000: { type: GFX, offset: 0x600C000, symbol: D_SX_600C000 } @@ -189,8 +189,8 @@ D_SX_60206DC: aSxSpyborgSkel: { type: SF64:SKELETON, offset: 0x6020C68, symbol: aSxSpyborgSkel } -D_SX_6020D20: - { type: GFX, offset: 0x6020D20, symbol: D_SX_6020D20 } +aSxBaseWallTile1DL: + { type: GFX, offset: 0x6020D20, symbol: aSxBaseWallTile1DL } # Spyborg Radio D_SX_6020FB0: @@ -199,20 +199,20 @@ D_SX_6020FB0: D_SX_6021ED0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x06021ED0, symbol: D_SX_6021ED0 } -D_SX_6022DF0: - { type: GFX, offset: 0x6022DF0, symbol: D_SX_6022DF0 } +aSxCanineDL: + { type: GFX, offset: 0x6022DF0, symbol: aSxCanineDL } -D_SX_6023500: - { type: GFX, offset: 0x6023500, symbol: D_SX_6023500 } +aSxSpyEyeDL: + { type: GFX, offset: 0x6023500, symbol: aSxSpyEyeDL } D_SX_6023C30: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06023C30, symbol: D_SX_6023C30 } -D_SX_6023E30: - { type: GFX, offset: 0x6023E30, symbol: D_SX_6023E30 } +aSxBaseDebris2DL: + { type: GFX, offset: 0x6023E30, symbol: aSxBaseDebris2DL } -D_SX_60285F0: - { type: GFX, offset: 0x60285F0, symbol: D_SX_60285F0 } +aSxBaseDebris1DL: + { type: GFX, offset: 0x60285F0, symbol: aSxBaseDebris1DL } D_SX_6029098: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06029098, symbol: D_SX_6029098 } @@ -241,8 +241,8 @@ D_SX_60320D0: D_SX_6032328: { type: SF64:HITBOX, offset: 0x6032328, symbol: D_SX_6032328 } -D_SX_603238C: - { type: SF64:HITBOX, offset: 0x603238C, symbol: D_SX_603238C } +aSxWarpGateHitbox: + { type: SF64:HITBOX, offset: 0x603238C, symbol: aSxWarpGateHitbox } D_SX_6032408: { type: SF64:HITBOX, offset: 0x6032408, symbol: D_SX_6032408 } @@ -256,20 +256,20 @@ aSxSpyborgRightArmHitbox: aSxSpyborgHitbox: { type: SF64:HITBOX, offset: 0x6032550, symbol: aSxSpyborgHitbox } -D_SX_603285C: - { type: SF64:HITBOX, offset: 0x603285C, symbol: D_SX_603285C } +aSxLaserHitbox: + { type: SF64:HITBOX, offset: 0x603285C, symbol: aSxLaserHitbox } -D_SX_6032878: - { type: SF64:HITBOX, offset: 0x6032878, symbol: D_SX_6032878 } +aSxBaseFloor1Hitbox: + { type: SF64:HITBOX, offset: 0x6032878, symbol: aSxBaseFloor1Hitbox } -D_SX_6032894: - { type: SF64:HITBOX, offset: 0x6032894, symbol: D_SX_6032894 } +aSxBaseWall2Hitbox: + { type: SF64:HITBOX, offset: 0x6032894, symbol: aSxBaseWall2Hitbox } -D_SX_60328B0: - { type: SF64:HITBOX, offset: 0x60328B0, symbol: D_SX_60328B0 } +aSxBaseWall3Hitbox: + { type: SF64:HITBOX, offset: 0x60328B0, symbol: aSxBaseWall3Hitbox } -D_SX_60328CC: - { type: SF64:HITBOX, offset: 0x60328CC, symbol: D_SX_60328CC } +aSxBaseWallTile1Hitbox: + { type: SF64:HITBOX, offset: 0x60328CC, symbol: aSxBaseWallTile1Hitbox } D_SX_603265C: { type: SF64:HITBOX, offset: 0x603265C, symbol: D_SX_603265C } @@ -277,22 +277,22 @@ D_SX_603265C: D_SX_6032768: { type: SF64:HITBOX, offset: 0x6032768, symbol: D_SX_6032768 } -D_SX_60328E8: - { type: SF64:HITBOX, offset: 0x60328E8, symbol: D_SX_60328E8 } +aSxBaseWall4Hitbox: + { type: SF64:HITBOX, offset: 0x60328E8, symbol: aSxBaseWall4Hitbox } -D_SX_6032904: - { type: SF64:HITBOX, offset: 0x6032904, symbol: D_SX_6032904 } +aSxBaseWall1Hitbox: + { type: SF64:HITBOX, offset: 0x6032904, symbol: aSxBaseWall1Hitbox } -D_SX_6032938: - { type: SF64:HITBOX, offset: 0x6032938, symbol: D_SX_6032938 } +aSxWatchPostHitbox: + { type: SF64:HITBOX, offset: 0x6032938, symbol: aSxWatchPostHitbox } -D_SX_6032954: - { type: SF64:HITBOX, offset: 0x6032954, symbol: D_SX_6032954 } +aSxSpaceMineHitbox: + { type: SF64:HITBOX, offset: 0x6032954, symbol: aSxSpaceMineHitbox } -D_SX_6032970: - { type: SF64:HITBOX, offset: 0x6032970, symbol: D_SX_6032970 } +aSxBaseDebris2Hitbox: + { type: SF64:HITBOX, offset: 0x6032970, symbol: aSxBaseDebris2Hitbox } -D_SX_603298C: - { type: SF64:HITBOX, offset: 0x603298C, symbol: D_SX_603298C } +aSxBaseDebris1Hitbox: + { type: SF64:HITBOX, offset: 0x603298C, symbol: aSxBaseDebris1Hitbox } # size = 0x32AC0 \ No newline at end of file diff --git a/assets/yaml/us/rev1/ast_sector_y.yaml b/assets/yaml/us/rev1/ast_sector_y.yaml index 3e107fe7..3039dccc 100644 --- a/assets/yaml/us/rev1/ast_sector_y.yaml +++ b/assets/yaml/us/rev1/ast_sector_y.yaml @@ -116,11 +116,11 @@ D_SY_60119D8: D_SY_60132A0: { type: GFX, offset: 0x60132A0, symbol: D_SY_60132A0 } -D_SY_6015D60: - { type: GFX, offset: 0x6015D60, symbol: D_SY_6015D60 } +aSyRobot4DL: + { type: GFX, offset: 0x6015D60, symbol: aSyRobot4DL } -D_SY_601F3D0: - { type: GFX, offset: 0x601F3D0, symbol: D_SY_601F3D0 } +aSySaruzinDL: + { type: GFX, offset: 0x601F3D0, symbol: aSySaruzinDL } D_SY_60121E0: { type: GFX, offset: 0x60121E0, symbol: D_SY_60121E0 } @@ -158,8 +158,8 @@ D_SY_6015960: D_SY_6015B60: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x06015B60, symbol: D_SY_6015B60 } -aSyShipProjectileDL: - { type: GFX, offset: 0x60188D0, symbol: aSyShipProjectileDL } +aSyShipMissileDL: + { type: GFX, offset: 0x60188D0, symbol: aSyShipMissileDL } D_SY_60183B0: { type: GFX, offset: 0x60183B0, symbol: D_SY_60183B0 } @@ -170,8 +170,8 @@ D_SY_6018F30: D_SY_6019E50: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x06019E50, symbol: D_SY_6019E50 } -D_SY_601AD70: - { type: GFX, offset: 0x601AD70, symbol: D_SY_601AD70 } +aSyDebrisDL: + { type: GFX, offset: 0x601AD70, symbol: aSyDebrisDL } D_SY_601AE08: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0601AE08, symbol: D_SY_601AE08 } @@ -194,11 +194,11 @@ aSyShip2DL: D_SY_601F3B8: { type: SF64:ANIM, offset: 0x601F3B8, symbol: D_SY_601F3B8 } -D_SY_60205D0: - { type: GFX, offset: 0x60205D0, symbol: D_SY_60205D0 } +aSyLaserTurretDL: + { type: GFX, offset: 0x60205D0, symbol: aSyLaserTurretDL } -D_SY_60209F0: - { type: GFX, offset: 0x60209F0, symbol: D_SY_60209F0 } +aSyRobotSpriteFrontDL: + { type: GFX, offset: 0x60209F0, symbol: aSyRobotSpriteFrontDL } D_SY_6020B08: { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06020B08, symbol: D_SY_6020B08 } @@ -206,8 +206,8 @@ D_SY_6020B08: D_SY_6021B08: { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06021B08, symbol: D_SY_6021B08 } -D_SY_6022B10: - { type: GFX, offset: 0x6022B10, symbol: D_SY_6022B10 } +aSyRobotSpriteSideDL: + { type: GFX, offset: 0x6022B10, symbol: aSyRobotSpriteSideDL } D_SY_6022C28: { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06022C28, symbol: D_SY_6022C28 } @@ -314,8 +314,8 @@ aSyRobotHitbox: D_SY_60340C0: { type: SF64:HITBOX, offset: 0x60340C0, symbol: D_SY_60340C0 } -D_SY_6034124: - { type: SF64:HITBOX, offset: 0x6034124, symbol: D_SY_6034124 } +aSyRobot4Hitbox: + { type: SF64:HITBOX, offset: 0x6034124, symbol: aSyRobot4Hitbox } D_SY_60341A8: { type: SF64:HITBOX, offset: 0x60341A8, symbol: D_SY_60341A8 } @@ -332,8 +332,8 @@ D_SY_6034304: aSyScenery156Hitbox: { type: SF64:HITBOX, offset: 0x6034368, symbol: aSyScenery156Hitbox } -D_SY_603445C: - { type: SF64:HITBOX, offset: 0x603445C, symbol: D_SY_603445C } +aSyLaserTurretHitbox: + { type: SF64:HITBOX, offset: 0x603445C, symbol: aSyLaserTurretHitbox } aSyShip1Hitbox: { type: SF64:HITBOX, offset: 0x6034478, symbol: aSyShip1Hitbox } @@ -356,7 +356,7 @@ aSyShipWindowsHitbox: aSyShip4DestroyedHitbox: { type: SF64:HITBOX, offset: 0x60347F0, symbol: aSyShip4DestroyedHitbox } -aSyShipProjectileHitbox: - { type: SF64:HITBOX, offset: 0x603486C, symbol: aSyShipProjectileHitbox } +aSyShipMissileHitbox: + { type: SF64:HITBOX, offset: 0x603486C, symbol: aSyShipMissileHitbox } # size = 0x34890 \ No newline at end of file diff --git a/assets/yaml/us/rev1/ast_sector_z.yaml b/assets/yaml/us/rev1/ast_sector_z.yaml index c8eb2fec..9dde3d7c 100644 --- a/assets/yaml/us/rev1/ast_sector_z.yaml +++ b/assets/yaml/us/rev1/ast_sector_z.yaml @@ -142,8 +142,8 @@ D_SZ_6006BD8: D_SZ_6006CD8: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x06006CD8, symbol: D_SZ_6006CD8 } -D_SZ_6006D64: - { type: SF64:ANIM, offset: 0x6006D64, symbol: D_SZ_6006D64 } +aSzMissileAnim: + { type: SF64:ANIM, offset: 0x6006D64, symbol: aSzMissileAnim } aSzMissileSkel: { type: SF64:SKELETON, offset: 0x6006E50, symbol: aSzMissileSkel } diff --git a/assets/yaml/us/rev1/ast_solar.yaml b/assets/yaml/us/rev1/ast_solar.yaml index edd4f615..a6e5ee0e 100644 --- a/assets/yaml/us/rev1/ast_solar.yaml +++ b/assets/yaml/us/rev1/ast_solar.yaml @@ -31,11 +31,11 @@ D_SO_6004500: D_SO_6005710: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6005710, symbol: D_SO_6005710} -D_SO_600636C: - { type: SF64:ANIM, offset: 0x600636C, symbol: D_SO_600636C} +aSoGoreAnim: + { type: SF64:ANIM, offset: 0x600636C, symbol: aSoGoreAnim} -D_SO_6006558: - { type: SF64:SKELETON, offset: 0x6006558, symbol: D_SO_6006558} +aSoGoreSkel: + { type: SF64:SKELETON, offset: 0x6006558, symbol: aSoGoreSkel} D_SO_6006DD8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6006DD8, symbol: D_SO_6006DD8} diff --git a/assets/yaml/us/rev1/ast_star_wolf.yaml b/assets/yaml/us/rev1/ast_star_wolf.yaml index 3bdb8ae4..763aaa05 100644 --- a/assets/yaml/us/rev1/ast_star_wolf.yaml +++ b/assets/yaml/us/rev1/ast_star_wolf.yaml @@ -56,8 +56,8 @@ D_STAR_WOLF_F00D3C0: D_STAR_WOLF_F00E2E0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x0F00E2E0, symbol: D_STAR_WOLF_F00E2E0 } -D_STAR_WOLF_F00F200: - { type: GFX, offset: 0xF00F200, symbol: D_STAR_WOLF_F00F200 } +aStarWolfStandardShipDL: + { type: GFX, offset: 0xF00F200, symbol: aStarWolfStandardShipDL } D_STAR_WOLF_F0101D0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x0F0101D0, symbol: D_STAR_WOLF_F0101D0 } @@ -68,8 +68,8 @@ D_STAR_WOLF_F011E80: D_STAR_WOLF_F011680: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0F011680, symbol: D_STAR_WOLF_F011680 } -D_STAR_WOLF_F0103D0: - { type: GFX, offset: 0xF0103D0, symbol: D_STAR_WOLF_F0103D0 } +aStarWolfUpgradedShipDL: + { type: GFX, offset: 0xF0103D0, symbol: aStarWolfUpgradedShipDL } D_STAR_WOLF_F011F00: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0F011F00, symbol: D_STAR_WOLF_F011F00 } @@ -89,14 +89,16 @@ D_STAR_WOLF_F013180: D_STAR_WOLF_F013980: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x0F013980, symbol: D_STAR_WOLF_F013980 } -D_STAR_WOLF_F014180: - { type: GFX, offset: 0xF014180, symbol: D_STAR_WOLF_F014180 } +# Star Wolf Radar mark +aStarWolfRadarMarkDL: + { type: GFX, offset: 0xF014180, symbol: aStarWolfRadarMarkDL } D_STAR_WOLF_F014208: { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x0F014208, symbol: D_STAR_WOLF_F014208 } -D_STAR_WOLF_F014310: - { type: GFX, offset: 0xF014310, symbol: D_STAR_WOLF_F014310 } +# Star Wolf Shadow +aStarWolfShadowDL: + { type: GFX, offset: 0xF014310, symbol: aStarWolfShadowDL } -D_STAR_WOLF_F014398: - { type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 32, offset: 0x0F014398, symbol: D_STAR_WOLF_F014398 } +aStarWolfShadowTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 32, offset: 0x0F014398, symbol: aStarWolfShadowTex } diff --git a/assets/yaml/us/rev1/ast_training.yaml b/assets/yaml/us/rev1/ast_training.yaml index 3fe0e9fb..7c57f02e 100644 --- a/assets/yaml/us/rev1/ast_training.yaml +++ b/assets/yaml/us/rev1/ast_training.yaml @@ -25,8 +25,8 @@ D_TR_6000900: D_TR_6001820: { type: TEXTURE, format: RGBA16, offset: 0x6001820, width: 44, height: 44, ctype: u16, symbol: D_TR_6001820 } -D_TR_6002740: - { type: GFX, offset: 0x6002740, symbol: D_TR_6002740 } +aTrBarrierDL: + { type: GFX, offset: 0x6002740, symbol: aTrBarrierDL } D_TR_60028F0: { type: TEXTURE, format: RGBA16, offset: 0x060028F0, width: 32, height: 32, ctype: u16, symbol: D_TR_60028F0 } @@ -82,7 +82,7 @@ aTrBuildingHitbox: aItemTrainingRingHitbox: { type: SF64:HITBOX, offset: 0x6009CFC, symbol: aItemTrainingRingHitbox } -D_TR_6009D18: - { type: SF64:HITBOX, offset: 0x6009D18, symbol: D_TR_6009D18 } +aTrBarrierHitbox: + { type: SF64:HITBOX, offset: 0x6009D18, symbol: aTrBarrierHitbox } # size = 0x9D40 \ No newline at end of file diff --git a/assets/yaml/us/rev1/ast_ve1_boss.yaml b/assets/yaml/us/rev1/ast_ve1_boss.yaml index 0be1c082..30a4d03e 100644 --- a/assets/yaml/us/rev1/ast_ve1_boss.yaml +++ b/assets/yaml/us/rev1/ast_ve1_boss.yaml @@ -29,8 +29,8 @@ D_VE1_90012F0: D_VE1_9002CD8: {type: SF64:ANIM, offset: 0x9002CD8, symbol: D_VE1_9002CD8} -D_VE1_9002CF0: - {type: GFX, offset: 0x9002CF0, symbol: D_VE1_9002CF0} +aVe1BlockerDL: + {type: GFX, offset: 0x9002CF0, symbol: aVe1BlockerDL} D_VE1_9002F30: {type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x9002F30, symbol: D_VE1_9002F30, tlut: 0x9003330} @@ -113,8 +113,8 @@ D_VE1_900DF20: D_VE1_900DFB8: {type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x900DFB8, symbol: D_VE1_900DFB8} -D_VE1_900EFC0: - {type: GFX, offset: 0x900EFC0, symbol: D_VE1_900EFC0} +aVe1TempleBgDL: + {type: GFX, offset: 0x900EFC0, symbol: aVe1TempleBgDL} aVe1TempleInterior2DL: {type: GFX, offset: 0x900F060, symbol: aVe1TempleInterior2DL} @@ -128,14 +128,14 @@ D_VE1_9010FC4: D_VE1_9010FD0: {type: GFX, offset: 0x9010FD0, symbol: D_VE1_9010FD0} -D_VE1_9011200: - {type: GFX, offset: 0x9011200, symbol: D_VE1_9011200} +aVe1PillarDL: + {type: GFX, offset: 0x9011200, symbol: aVe1PillarDL} D_VE1_9011980: {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x9011980, symbol: D_VE1_9011980} -D_VE1_9012180: - {type: GFX, offset: 0x9012180, symbol: D_VE1_9012180} +aVe1Pillar5DL: + {type: GFX, offset: 0x9012180, symbol: aVe1Pillar5DL} D_VE1_90123C0: {type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 16, offset: 0x90123C0, symbol: D_VE1_90123C0, tlut: 0x90125C0} diff --git a/assets/yaml/us/rev1/ast_venom_1.yaml b/assets/yaml/us/rev1/ast_venom_1.yaml index 2b67e7ba..95fc884a 100644 --- a/assets/yaml/us/rev1/ast_venom_1.yaml +++ b/assets/yaml/us/rev1/ast_venom_1.yaml @@ -25,8 +25,8 @@ D_VE1_6000D80: D_VE1_6001B80: { type: TEXTURE, format: IA8, width: 128, height: 19, offset: 0x6001B80, ctype: u8, symbol: D_VE1_6001B80 } -D_VE1_6002500: - { type: GFX, offset: 0x6002500, symbol: D_VE1_6002500 } +aVe1EnemyGateDL: + { type: GFX, offset: 0x6002500, symbol: aVe1EnemyGateDL } D_VE1_60029F8: { type: TEXTURE, format: CI8, width: 8, height: 16, offset: 0x60029F8, tlut: 0x6002A78, ctype: u8, symbol: D_VE1_60029F8 } @@ -52,11 +52,11 @@ aVe1WatchPostDL: D_VE1_6003B10: { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6003B10, ctype: u16, symbol: D_VE1_6003B10 } -D_VE1_6004310: - { type: GFX, offset: 0x6004310, symbol: D_VE1_6004310 } +aVe1EnemyGateDoorLeftDL: + { type: GFX, offset: 0x6004310, symbol: aVe1EnemyGateDoorLeftDL } -D_VE1_60043F0: - { type: GFX, offset: 0x60043F0, symbol: D_VE1_60043F0 } +aVe1EnemyGateDoorRightDL: + { type: GFX, offset: 0x60043F0, symbol: aVe1EnemyGateDoorRightDL } D_VE1_60044D0: { type: TEXTURE, format: CI8, width: 16, height: 16, offset: 0x60044D0, tlut: 0x60045D0, ctype: u8, symbol: D_VE1_60044D0 } @@ -124,8 +124,8 @@ D_VE1_601B1E4: D_VE1_6010088: { type: SF64:OBJECT_INIT, offset: 0x6010088, symbol: D_VE1_6010088 } -D_VE1_601B43C: - { type: SF64:HITBOX, offset: 0x601B43C, symbol: D_VE1_601B43C } +aVe1Pillar5Hitbox: + { type: SF64:HITBOX, offset: 0x601B43C, symbol: aVe1Pillar5Hitbox } D_VE1_601B474: { type: SF64:HITBOX, offset: 0x601B474, symbol: D_VE1_601B474 } @@ -178,5 +178,5 @@ aVe1Pillar4Hitbox: aVe1MonkeyStatueHitbox: { type: SF64:HITBOX, offset: 0x601B8D8, symbol: aVe1MonkeyStatueHitbox } -D_VE1_601B944: - { type: SF64:HITBOX, offset: 0x601B944, symbol: D_VE1_601B944 } \ No newline at end of file +aVe1EnemyGateHitbox: + { type: SF64:HITBOX, offset: 0x601B944, symbol: aVe1EnemyGateHitbox } \ No newline at end of file diff --git a/assets/yaml/us/rev1/ast_venom_2.yaml b/assets/yaml/us/rev1/ast_venom_2.yaml index 92e8061f..f3246b04 100644 --- a/assets/yaml/us/rev1/ast_venom_2.yaml +++ b/assets/yaml/us/rev1/ast_venom_2.yaml @@ -174,11 +174,11 @@ D_VE2_60114A0: D_VE2_6013AF8: { type: TEXTURE, format: RGBA16, width: 16, height: 16, offset: 0x6013AF8, ctype: u16, symbol: D_VE2_6013AF8 } -D_VE2_6014658: - { type: SF64:ANIM, offset: 0x6014658, symbol: D_VE2_6014658 } +aVe2AndrossGateAnim: + { type: SF64:ANIM, offset: 0x6014658, symbol: aVe2AndrossGateAnim } -D_VE2_6014844: - { type: SF64:SKELETON, offset: 0x6014844, symbol: D_VE2_6014844 } +aVe2AndrossGateSkel: + { type: SF64:SKELETON, offset: 0x6014844, symbol: aVe2AndrossGateSkel } aVe2BaseAnim: { type: SF64:ANIM, offset: 0x6014904, symbol: aVe2BaseAnim } diff --git a/assets/yaml/us/rev1/ast_warp_zone.yaml b/assets/yaml/us/rev1/ast_warp_zone.yaml index 67dc362d..21a650b6 100644 --- a/assets/yaml/us/rev1/ast_warp_zone.yaml +++ b/assets/yaml/us/rev1/ast_warp_zone.yaml @@ -8,14 +8,14 @@ - '#include "gfx.h"' - '#include "sf64object.h"' -D_WZ_7000000: - { type: GFX, offset: 0x7000000, symbol: D_WZ_7000000 } +aWzSxEnemy1DL: + { type: GFX, offset: 0x7000000, symbol: aWzSxEnemy1DL } -D_WZ_7000280: - { type: GFX, offset: 0x7000280, symbol: D_WZ_7000280 } +aWzGateDL: + { type: GFX, offset: 0x7000280, symbol: aWzGateDL } -D_WZ_70008F0: - { type: GFX, offset: 0x70008F0, symbol: D_WZ_70008F0 } +aWzMeteor2DL: + { type: GFX, offset: 0x70008F0, symbol: aWzMeteor2DL } D_WZ_7000260: { type: TEXTURE, ctype: u16, format: RGBA16, width: 4, height: 4, offset: 0x7000260, symbol: D_WZ_7000260 } @@ -26,14 +26,14 @@ D_WZ_7000A30: D_WZ_7000C30: { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x7000C30, symbol: D_WZ_7000C30 } -D_WZ_7000C40: - { type: GFX, offset: 0x7000C40, symbol: D_WZ_7000C40 } +aWzPillar1DL: + { type: GFX, offset: 0x7000C40, symbol: aWzPillar1DL } -D_WZ_7000E80: - { type: GFX, offset: 0x7000E80, symbol: D_WZ_7000E80 } +aWzMeteor1DL: + { type: GFX, offset: 0x7000E80, symbol: aWzMeteor1DL } -D_WZ_70010E0: - { type: GFX, offset: 0x70010E0, symbol: D_WZ_70010E0 } +aWzPillar2DL: + { type: GFX, offset: 0x70010E0, symbol: aWzPillar2DL } D_WZ_7001540: { type: GFX, offset: 0x7001540, symbol: D_WZ_7001540 } diff --git a/assets/yaml/us/rev1/ast_zoness.yaml b/assets/yaml/us/rev1/ast_zoness.yaml index c2dda637..15b5e989 100644 --- a/assets/yaml/us/rev1/ast_zoness.yaml +++ b/assets/yaml/us/rev1/ast_zoness.yaml @@ -84,8 +84,8 @@ D_ZO_6004A70: D_ZO_6004B00: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6004B00, symbol: D_ZO_6004B00} -D_ZO_6004D00: - { type: GFX, offset: 0x6004D00, symbol: D_ZO_6004D00} +aZoPatrolBoatDL: + { type: GFX, offset: 0x6004D00, symbol: aZoPatrolBoatDL} D_ZO_6005958: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6005958, symbol: D_ZO_6005958} @@ -351,11 +351,11 @@ D_ZO_601F420: D_ZO_601F620: { type: GFX, offset: 0x601F620, symbol: D_ZO_601F620} -D_ZO_601F874: - { type: SF64:ANIM, offset: 0x601F874, symbol: D_ZO_601F874} +aZoSarumarinePeriscopeAnim: + { type: SF64:ANIM, offset: 0x601F874, symbol: aZoSarumarinePeriscopeAnim} -D_ZO_601F920: - { type: SF64:SKELETON, offset: 0x601F920, symbol: D_ZO_601F920} +aZoSarumarinePeriscopeSkel: + { type: SF64:SKELETON, offset: 0x601F920, symbol: aZoSarumarinePeriscopeSkel} D_ZO_601F940: { type: GFX, offset: 0x601F940, symbol: D_ZO_601F940} @@ -535,8 +535,8 @@ D_ZO_602C028: aZoSarumarineHitbox: { type: SF64:HITBOX, offset: 0x602C044, symbol: aZoSarumarineHitbox} -D_ZO_602C1A0: - { type: SF64:HITBOX, offset: 0x602C1A0, symbol: D_ZO_602C1A0} +aZoSarumarinePeriscopeHitbox: + { type: SF64:HITBOX, offset: 0x602C1A0, symbol: aZoSarumarinePeriscopeHitbox} aZoCargoShipHitbox: { type: SF64:HITBOX, offset: 0x602C1D4, symbol: aZoCargoShipHitbox} diff --git a/include/fox_option.h b/include/fox_option.h index cefc10c5..46a4c6c5 100644 --- a/include/fox_option.h +++ b/include/fox_option.h @@ -3,46 +3,43 @@ #include "global.h" -//! TODO: RENAME. Member names inferred by Option_DrawCardLabel. typedef struct { - /* 0x00 */ s32 unk_00; // type + /* 0x00 */ s32 type; /* 0x04 */ s32 unk_04; - /* 0x08 */ void* unk_08; // texture - /* 0x0C */ u16* unk_0C; // palette - /* 0x10 */ s32 unk_10; // width - /* 0x14 */ s32 unk_14; // height - /* 0x18 */ f32 unk_18; // xPos - /* 0x1C */ f32 unk_1C; // yPos - /* 0x20 */ f32 unk_20; // xScale - /* 0x24 */ f32 unk_24; // yScale - /* 0x28 */ s32 unk_28; // red - /* 0x2C */ s32 unk_2C; // green - /* 0x30 */ s32 unk_30; // blue - /* 0x34 */ s32 unk_34; // alpha + /* 0x08 */ void* texture; + /* 0x0C */ u16* palette; + /* 0x10 */ s32 width; + /* 0x14 */ s32 height; + /* 0x18 */ f32 xPos; + /* 0x1C */ f32 yPos; + /* 0x20 */ f32 xScale; + /* 0x24 */ f32 yScale; + /* 0x28 */ s32 red; + /* 0x2C */ s32 green; + /* 0x30 */ s32 blue; + /* 0x34 */ s32 alpha; } OptionTexture; // size = 0x38 -//! TODO: RENAME. Member names inferred by Option_DrawMenuCard typedef struct { - /* 0x00 */ f32 unk_00; // x - /* 0x04 */ f32 unk_04; // y - /* 0x08 */ f32 unk_08; // z - /* 0x0C */ f32 unk_0C; // xScale - /* 0x10 */ f32 unk_10; // yScale + /* 0x00 */ f32 x; + /* 0x04 */ f32 y; + /* 0x08 */ f32 z; + /* 0x0C */ f32 xScale; + /* 0x10 */ f32 yScale; } MenuContext_38; // size = 0x14 -//! TODO: RENAME. Member names inferred by Option_DrawMenuArwing typedef struct { - /* 0x0 */ f32 unk_0; // x - /* 0x4 */ f32 unk_4; // y - /* 0x8 */ f32 unk_8; // range + /* 0x0 */ f32 x; + /* 0x4 */ f32 y; + /* 0x8 */ f32 range; } ArwingPosition; // size = 0xC typedef struct { /* 0x00 */ OptionTexture unk_00; /* 0x38 */ MenuContext_38 unk_38; /* 0x4C */ ArwingPosition unk_4C; - /* 0x58 */ s32 unk_58; - /* 0x5C */ s32 unk_5C; + /* 0x58 */ bool unk_58; + /* 0x5C */ bool unk_5C; } OptionEntry; // size = 0x60 typedef struct { @@ -57,22 +54,22 @@ typedef struct { } UnkStruct_D_menu_801B9250; typedef enum OptionId { - OPTION_MAIN_MENU = 1000, - OPTION_VERSUS_STAGE = 2000, - OPTION_MAP = 0, - OPTION_TRAINING = 1, - OPTION_VERSUS = 2, - OPTION_RANKING = 3, - OPTION_SOUND = 4, - OPTION_DATA = 5, - OPTION_EXPERT_SOUND = 6, - OPTION_POINT_MATCH = 10, - OPTION_BR_MATCH = 20, - OPTION_TT_MATCH = 30, - OPTION_NAME = 200, - OPTION_SCORE = 300, - OPTION_INVOICE = 400, - OPTION_MAX, + /* 1000 */ OPTION_MAIN_MENU = 1000, + /* 2000 */ OPTION_VERSUS_STAGE = 2000, + /* 0 */ OPTION_MAP = 0, + /* 1 */ OPTION_TRAINING = 1, + /* 2 */ OPTION_VERSUS = 2, + /* 3 */ OPTION_RANKING = 3, + /* 4 */ OPTION_SOUND = 4, + /* 5 */ OPTION_DATA = 5, + /* 6 */ OPTION_EXPERT_SOUND = 6, + /* 10 */ OPTION_POINT_MATCH = 10, + /* 20 */ OPTION_BR_MATCH = 20, + /* 30 */ OPTION_TT_MATCH = 30, + /* 200 */ OPTION_NAME = 200, + /* 300 */ OPTION_SCORE = 300, + /* 400 */ OPTION_INVOICE = 400, + /* 401 */ OPTION_MAX, } OptionId; #define OPTION_COUNT ARRAY_COUNT(sOptionCardList) @@ -81,7 +78,7 @@ extern u8* D_menu_801B68B0[]; extern u8* D_menu_801B68D4[]; extern s32 D_menu_801B8220[]; // total hits ranking? see Option_80197DE4 -extern s32 D_menu_801B827C; // engine +extern s32 D_menu_801B827C; // engine extern s32 D_menu_801B8280; extern s32 D_menu_801B8284; extern s32 D_menu_801B8288; @@ -98,7 +95,7 @@ extern u8 D_menu_801C9010[96 * 96]; extern u8 D_menu_801CB410[96 * 96]; void Title_UpdateEntry(void); - s32 Title_80187ABC(void); +s32 Title_80187ABC(void); void Title_80187B00(void); void Title_80187E28(void); void Title_801888E8(void); @@ -194,14 +191,15 @@ void Option_8019B8A0(s32 arg0); void Option_8019B8C8(void); void Option_DrawMenuLabel(void); void Option_DrawMenuCard(MenuContext_38 arg0); -void Option_DrawMenuArwing(ArwingPosition arg0); -void Option_8019BC44(f32, f32, f32, f32, f32, f32); +void Option_DrawMenuArwing(ArwingPosition arwing); +void Option_DrawArwing(f32, f32, f32, f32, f32, f32); void Option_8019BDF0(void); -void Option_8019BE7C(f32, f32, f32, f32 *, f32 *, f32 *); +void Option_8019BE7C(f32, f32, f32, f32*, f32*, f32*); void Option_8019BF34(void); void Option_8019C04C(void); -void Option_DrawCardLabel(OptionTexture arg0); -bool Option_8019C418(s32* arg0, s32 arg1, bool arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7, UnkStruct_D_menu_801B9250* arg8); +void Option_DrawCardLabel(OptionTexture tex); +bool Option_8019C418(s32* arg0, s32 arg1, bool arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7, + UnkStruct_D_menu_801B9250* arg8); s32 Option_8019C5A0(s32*); bool Option_8019C66C(f32* arg0, f32 arg1, f32 arg2, UnkStruct_D_menu_801B9250* arg3); void Option_8019C824(f32*); diff --git a/include/functions.h b/include/functions.h index 0754d9dc..8e603aa7 100644 --- a/include/functions.h +++ b/include/functions.h @@ -87,7 +87,7 @@ void Cutscene_DrawGreatFox(void); // fox_display void Display_ArwingWings(ArwingInfo*); -void Display_DrawEngineGlow(s32); +void Display_DrawEngineGlow(EngineGlowColor); void Display_SetupPlayerSfxPos(Player*); void Display_Update(void); @@ -112,7 +112,7 @@ void CoBuilding9_Draw(Scenery*); void CoBuilding10_Draw(Scenery*); void ActorDebris_Draw(Actor*); void Actor_DrawEngineAndContrails(Actor*); -void Actor_DrawEngineGlow(Actor*, s32); +void Actor_DrawEngineGlow(Actor*, EngineGlowColor); void ActorTeamArwing_Draw(Actor*); void MeMolarRock_Draw(Actor*); void MeMeteor2_Draw(MeMeteor2*); diff --git a/include/i6.h b/include/i6.h index a7c7f6c1..30d820e2 100644 --- a/include/i6.h +++ b/include/i6.h @@ -22,7 +22,7 @@ void SectorY_LevelComplete(Player*); void SectorY_8019FF00(Actor*); void SectorY_801A0AC0(Player*); -void Andross_8018769C(Actor*); +void Andross_Gate_Draw(Actor*); void OvlI6_CallFunction(u32 mode, void* ptr); void Andross_801878A8(void); void Andross_801888F4(Actor *); diff --git a/include/prevent_context_reordering.h b/include/prevent_context_reordering.h index a8176f1f..c0d50d89 100644 --- a/include/prevent_context_reordering.h +++ b/include/prevent_context_reordering.h @@ -1,7 +1,7 @@ #ifndef PREVENT_CONTEXT_REORDERING_H #define PREVENT_CONTEXT_REORDERING_H -// extern int Dummyhalf; +extern int Dummyhalf; // struct Dummy0 {int x;}; // struct Dummy1 {int x;}; // struct Dummy2 {int x;}; @@ -14,8 +14,8 @@ // struct Dummy9 {int x;}; // struct Dummy10 {int x;}; // struct Dummy11 {int x;}; -struct Dummy12 {int x;}; -struct Dummy13 {int x;}; +// struct Dummy12 {int x;}; +// struct Dummy13 {int x;}; struct Dummy14 {int x;}; struct Dummy15 {int x;}; struct Dummy16 {int x;}; diff --git a/include/sf64event.h b/include/sf64event.h index 264ad4a7..6e12fa46 100644 --- a/include/sf64event.h +++ b/include/sf64event.h @@ -1,3 +1,32 @@ +/** + * Glossary: + * EVID: Event ID + * EVACT: Event Action + * EVOP: Event Opcode + * EVC: Event Condition + * EVSTATE: Event State + * + * Level Prefixes: + * CO: Corneria + * ME: Meteo + * SX: Sector X + * SY: Sector Y + * SZ: Sector Z + * KA: Katina + * AQ: Aquas + * A6: Area 6 + * FO: Fortuna + * SO: Solar + * MA: Macbeth + * TI: Titania + * BO: Bolse + * ZO: Zoness + * VE1: Venom 1 + * VE2: Venom 2 + * AND: Venom Andross + * WZ: Warpzone + */ + #ifndef SF64_EVENT #define SF64_EVENT @@ -300,118 +329,118 @@ typedef enum EventAction { /* 16 */ EVACT_16, /* 17 */ EVACT_17, /* 18 */ EVACT_GFOX_COVER_FIRE, - /* 19 */ EVACT_19, + /* 19 */ EVACT_19, // projectile ring used by bee enemies } EventAction; typedef enum EventActorId { - /* 0 */ EVID_0, - /* 1 */ EVID_1, - /* 2 */ EVID_SLIPPY_METEO, - /* 3 */ EVID_3, - /* 4 */ EVID_4, - /* 5 */ EVID_5, - /* 6 */ EVID_6, - /* 7 */ EVID_7, - /* 8 */ EVID_8, - /* 9 */ EVID_9, - /* 10 */ EVID_10, - /* 11 */ EVID_11, - /* 12 */ EVID_12, - /* 13 */ EVID_13, - /* 14 */ EVID_14, - /* 15 */ EVID_15, - /* 16 */ EVID_16, - /* 17 */ EVID_17, - /* 18 */ EVID_18, - /* 19 */ EVID_19, - /* 20 */ EVID_20, - /* 21 */ EVID_A6_MISSILE, + /* 0 */ EVID_VENOM_FIGHTER_1, + /* 1 */ EVID_VENOM_FIGHTER_2, + /* 2 */ EVID_ME_SLIPPY, + /* 3 */ EVID_SPY_EYE, // jp name: Sunfish II + /* 4 */ EVID_GRANGA_FIGHTER_1, // jp name: Dragon + /* 5 */ EVID_GRANGA_FIGHTER_2, // jp name: Dragon II + /* 6 */ EVID_FIREBIRD, // Handles Firebird from Corneria and Gore from Solar + /* 7 */ EVID_CORNERIAN_FIGHTER, // Seems unused? + /* 8 */ EVID_VENOM_TANK, + /* 9 */ EVID_TRIPOD, // jp name: Butterfly + /* 10 */ EVID_ATTACKER_1, + /* 11 */ EVID_ATTACKER_2, + /* 12 */ EVID_ATTACKER_3, + /* 13 */ EVID_ME_METEOR_1, + /* 14 */ EVID_ME_METEOR_2, + /* 15 */ EVID_COMMANDER, + /* 16 */ EVID_SPIDER, + /* 17 */ EVID_ZERAM_CLASS_CRUISER, + /* 18 */ EVID_SX_SPY_EYE, // jp name: Sunfish I + /* 19 */ EVID_SX_CANINE, + /* 20 */ EVID_SPACE_MINE, + /* 21 */ EVID_A6_NINJIN_MISSILE, /* 22 */ EVID_A6_ROCKET, - /* 23 */ EVID_23, - /* 24 */ EVID_24, - /* 25 */ EVID_25, - /* 26 */ EVID_26, - /* 27 */ EVID_27, - /* 28 */ EVID_28, - /* 29 */ EVID_29, - /* 30 */ EVID_30, - /* 31 */ EVID_31, - /* 32 */ EVID_32, - /* 33 */ EVID_33, - /* 34 */ EVID_34, - /* 35 */ EVID_35, - /* 36 */ EVID_36, - /* 37 */ EVID_37, + /* 23 */ EVID_VENOM_FIGHTER_3, + /* 24 */ EVID_SX_BASE_DEBRIS_1, + /* 25 */ EVID_SX_BASE_WALL_1, + /* 26 */ EVID_SX_BASE_DEBRIS_2, + /* 27 */ EVID_SX_LASER, + /* 28 */ EVID_SX_WATCH_POST, // Invented name + /* 29 */ EVID_SX_SPACE_MINE, + /* 30 */ EVID_A6_HARLOCK_FRIGATE, + /* 31 */ EVID_A6_UMBRA_STATION, + /* 32 */ EVID_SX_BASE_FLOOR_1, + /* 33 */ EVID_CRUISER_GUN, // Guns located on Zeram-class Cruisers + /* 34 */ EVID_SX_BASE_WALL_2, + /* 35 */ EVID_SX_BASE_WALL_3, + /* 36 */ EVID_TI_BOMBER, // Bird-like ship that drops land mines + /* 37 */ EVID_SX_BORZOI_FIGHTER, /* 38 */ EVID_SX_WARP_GATE, - /* 39 */ EVID_39, + /* 39 */ EVID_SX_BASE_WALL_TILE_1, /* 40 */ EVID_EVENT_HANDLER, - /* 41 */ EVID_41, - /* 42 */ EVID_42, + /* 41 */ EVID_SY_SHIP_1, + /* 42 */ EVID_SY_SHIP_2, /* 43 */ EVID_TEAMMATE, - /* 44 */ EVID_44, - /* 45 */ EVID_45, - /* 46 */ EVID_46, - /* 47 */ EVID_47, - /* 48 */ EVID_48, - /* 49 */ EVID_49, - /* 50 */ EVID_50, - /* 51 */ EVID_51, - /* 52 */ EVID_52, - /* 53 */ EVID_53, - /* 54 */ EVID_54, - /* 55 */ EVID_55, - /* 56 */ EVID_56, - /* 57 */ EVID_57, - /* 58 */ EVID_58, - /* 59 */ EVID_59, - /* 60 */ EVID_60, - /* 61 */ EVID_61, - /* 62 */ EVID_62, - /* 63 */ EVID_63, - /* 64 */ EVID_64, - /* 65 */ EVID_65, - /* 66 */ EVID_66, - /* 67 */ EVID_METEO_PYRAMID_SHIP, - /* 68 */ EVID_68, - /* 69 */ EVID_69, - /* 70 */ EVID_70, - /* 71 */ EVID_WING_REPAIR, - /* 72 */ EVID_72, - /* 73 */ EVID_73, - /* 74 */ EVID_74, - /* 75 */ EVID_75, - /* 76 */ EVID_76, - /* 77 */ EVID_77, + /* 44 */ EVID_SY_SHIP_3, + /* 45 */ EVID_ME_METEOR_3, + /* 46 */ EVID_ZO_PATROL_BOAT, + /* 47 */ EVID_ME_SECRET_MARKER_1, // Metal spheres that mark secret items. Invented name + /* 48 */ EVID_SY_ROBOT_1, + /* 49 */ EVID_SY_ROBOT_2, + /* 50 */ EVID_SY_ROBOT_3, + /* 51 */ EVID_SY_ROBOT_4, // Unclear as to whether it's used or not, only it's hitbox gets used in code + /* 52 */ EVID_SARUMARINE_PERISCOPE, + /* 53 */ EVID_SX_BASE_WALL_4, + /* 54 */ EVID_GAMMA_ON, // Andross Army Gamma-Off Formation Leader (Orange Andross Fighter) + /* 55 */ EVID_GAMMA_OFF, // Blue Andross Fighter + /* 56 */ EVID_TI_GREAT_FOX, // Great Fox that flees after the intro cutscene + /* 57 */ EVID_SY_SHIP_3_2, // Another variant of EVID_SY_SHIP_3 without a hitbox, seems unused? + /* 58 */ EVID_SY_SARUZIN, // flagship of Sector Y, base of the Shogun Boss + /* 59 */ EVID_SY_ROBOT_SPRITE_SIDE, // Robot sprites that appear in Sector Y's background, side variant + /* 60 */ EVID_SY_ROBOT_SPRITE_FRONT, // Robot sprites that appear in Sector Y's background, front variant + /* 61 */ EVID_ME_METEOR_4, + /* 62 */ EVID_ME_METEOR_5, + /* 63 */ EVID_ME_BIG_METEOR, // Big meteor that bounces in Meteo + /* 64 */ EVID_ME_ROCK_GULL, // Enemy laser turret inside a meteorite + /* 65 */ EVID_ME_METEOR_6, + /* 66 */ EVID_ME_SECRET_MARKER_2, // Metal spheres that mark secret items. Invented name + /* 67 */ EVID_ME_FLIP_BOT, + /* 68 */ EVID_SY_LASER_TURRET, + /* 69 */ EVID_SY_SHIP_DESTROYED, + /* 70 */ EVID_SY_DEBRIS, // Sprite portraying small pieces of debris. Seems unused + /* 71 */ EVID_ITEM_WING_REPAIR, + /* 72 */ EVID_SY_SHIP_WINDOWS, + /* 73 */ EVID_SY_SHIP_4, + /* 74 */ EVID_SY_SHIP_4_DESTROYED, + /* 75 */ EVID_SY_SHIP_2_SPRITE, // Unused + /* 76 */ EVID_SY_SHIP_3_SPRITE, // Unused + /* 77 */ EVID_SY_SHIP_MISSILE, /* 78 */ EVID_SUPPLY_CRATE, - /* 79 */ EVID_79, - /* 80 */ EVID_80, - /* 81 */ EVID_81, - /* 82 */ EVID_82, - /* 83 */ EVID_AQ_CLAM, - /* 84 */ EVID_84, + /* 79 */ EVID_ZO_BIRD, + /* 80 */ EVID_VE1_PILLAR, + /* 81 */ EVID_VE1_BLOCKER, + /* 82 */ EVID_MA_LASER_TURRET, + /* 83 */ EVID_AQ_OYSTER, + /* 84 */ EVID_VE1_PILLAR_5, /* 85 */ EVID_BILL, /* 86 */ EVID_KATT, - /* 87 */ EVID_87, + /* 87 */ EVID_VE1_TEMPLE_BG, // Background used inside Venom 1 temple to hide drawing popup /* 88 */ EVID_AQ_STARFISH, - /* 89 */ EVID_89, - /* 90 */ EVID_90, - /* 91 */ EVID_91, - /* 92 */ EVID_92, - /* 93 */ EVID_93, - /* 94 */ EVID_94, - /* 95 */ EVID_95, - /* 96 */ EVID_96, - /* 97 */ EVID_97, - /* 98 */ EVID_98, - /* 99 */ EVID_99, - /* 100 */ EVID_100, - /* 101 */ EVID_101, + /* 89 */ EVID_AQ_SHELL, + /* 90 */ EVID_MA_RAILROAD_CART, + /* 91 */ EVID_MA_GUILLOTINE_1, + /* 92 */ EVID_WZ_PILLAR_1, + /* 93 */ EVID_WZ_PILLAR_2, + /* 94 */ EVID_WZ_METEOR_1, + /* 95 */ EVID_WZ_METEOR_2, + /* 96 */ EVID_WZ_GATE, + /* 97 */ EVID_ME_METEOR_7, + /* 98 */ EVID_MA_BOULDER, + /* 99 */ EVID_VE1_ENEMY_GATE, // Gate in Venom 1 for outcoming enemies + /* 100 */ EVID_ENEMY_GATE_DOOR_RIGHT, + /* 101 */ EVID_ENEMY_GATE_DOOR_LEFT, /* 102 */ EVID_TR_BARRIER, /* 103 */ EVID_ANDROSS_GATE, /* 104 */ EVID_ANDROSS_GATE_2, /* 105 */ EVID_SX_WARP_ENMY, /* 106 */ EVID_KILLER_BEE, - /* 107 */ EVID_MA_SHOT_GATE, + /* 107 */ EVID_MA_GUILLOTINE_2, // Variant of the Macbeth Guillotine that can be shot at to be opened /* 200 */ EVID_200 = 200, /* 300 */ EVID_300 = 300, /* 4095*/ EVID_FFF = 4095, diff --git a/include/sf64level.h b/include/sf64level.h index 186f0676..1891ae8d 100644 --- a/include/sf64level.h +++ b/include/sf64level.h @@ -8,8 +8,6 @@ typedef enum LevelType { /* 0 */ LEVELTYPE_PLANET, /* 1 */ LEVELTYPE_SPACE, - /* 2 */ LEVELTYPE_UNK2, - /* 3 */ LEVELTYPE_UNK3, } LevelType; typedef enum MissionStatus { diff --git a/include/sf64object.h b/include/sf64object.h index 6b396c61..ec5bb7d3 100644 --- a/include/sf64object.h +++ b/include/sf64object.h @@ -227,10 +227,10 @@ typedef struct Boss { /* 0x000 */ Object obj; /* 0x01C */ ObjectInfo info; /* 0x040 */ s32 index; - /* 0x044 */ s16 unk_044; - /* 0x046 */ s16 unk_046; - /* 0x048 */ s16 unk_048; - /* 0x04A */ s16 unk_04A; + /* 0x044 */ s16 work_044; + /* 0x046 */ s16 work_046; + /* 0x048 */ s16 work_048; + /* 0x04A */ s16 work_04A; /* 0x04C */ s16 animFrame; /* 0x04E */ s16 state; /* 0x050 */ s16 timer_050; @@ -268,10 +268,10 @@ typedef struct Actor { /* 0x01C */ ObjectInfo info; /* 0x040 */ s32 index; /* 0x044 */ u8 itemDrop; - /* 0x046 */ s16 unk_046; - /* 0x048 */ s16 unk_048; - /* 0x04A */ s16 unk_04A; - /* 0x04C */ s16 timer_04C; + /* 0x046 */ s16 work_046; + /* 0x048 */ s16 work_048; + /* 0x04A */ s16 work_04A; + /* 0x04C */ s16 work_04C; /* 0x04E */ s16 counter_04E; /* 0x050 */ s32 iwork[25]; /* 0x0B4 */ s16 eventType; @@ -421,7 +421,7 @@ typedef enum ObjectId { /* 112 */ OBJ_SCENERY_SY_SHIP_2_DESTROYED, /* 113 */ OBJ_SPRITE_SY_SHIP_2, // Unused /* 114 */ OBJ_SPRITE_SY_SHIP_3, // Unused - /* 115 */ OBJ_SCENERY_SY_SHIP_PROJECTILE, + /* 115 */ OBJ_SCENERY_SY_SHIP_MISSILE, /* 116 */ OBJ_SCENERY_SY_SHIP_WINDOWS, /* 117 */ OBJ_SCENERY_AQ_CORAL_REEF_1, /* 118 */ OBJ_SCENERY_AQ_TUNNEL_1, @@ -623,7 +623,7 @@ typedef enum ObjectId { /* 314 */ OBJ_BOSS_SY_SHOGUN, /* 315 */ OBJ_BOSS_SO_VULKAIN, /* 316 */ OBJ_BOSS_KA_SAUCERER, - /* 317 */ OBJ_BOSS_KA_FLBASE, + /* 317 */ OBJ_BOSS_KA_FLBASE, // Katina FrontLine Base /* 318 */ OBJ_BOSS_AQ_BACOON, /* 319 */ OBJ_BOSS_VE1_GOLEMECH, /* 320 */ OBJ_BOSS_AND_ANDROSS, diff --git a/include/sf64player.h b/include/sf64player.h index 0ac36061..511141fb 100644 --- a/include/sf64player.h +++ b/include/sf64player.h @@ -51,6 +51,13 @@ typedef enum DrawMode { /* 9 */ DRAW_MAX, } DrawMode; +typedef enum EngineGlowColor { + /* 0 */ EG_RED, + /* 1 */ EG_BLUE, + /* 2 */ EG_GREEN, + /* 3 */ EG_ORANGE +} EngineGlowColor; + typedef enum LevelMode { /* 0 */ LEVELMODE_ON_RAILS, /* 1 */ LEVELMODE_ALL_RANGE, diff --git a/include/variables.h b/include/variables.h index a0019f4e..502bdb6a 100644 --- a/include/variables.h +++ b/include/variables.h @@ -43,10 +43,10 @@ extern f32 gActorMissileSeekHitbox[]; extern f32 gMeMoraHitbox[]; extern f32 gTeamHitbox[]; extern f32 gActorAllRangeHItbox[]; -extern f32 gWarpZoneEvent94Hitbox[]; -extern f32 gWarpZoneEvent96Hitbox[]; -extern f32 gWarpZoneEvent92Hitbox[]; -extern f32 gWarpZoneEvent93Hitbox[]; +extern f32 aWzMeteor1Hitbox[]; +extern f32 aWzGateHitbox[]; +extern f32 aWzPillar1Hitbox[]; +extern f32 aWzPillar2Hitbox[]; extern ObjectInfo gObjectInfo[]; extern f32* D_edata_800CF964[]; diff --git a/linker_scripts/eu/rev0/symbol_addrs_assets.txt b/linker_scripts/eu/rev0/symbol_addrs_assets.txt index 1b309c0d..192ed16c 100644 --- a/linker_scripts/eu/rev0/symbol_addrs_assets.txt +++ b/linker_scripts/eu/rev0/symbol_addrs_assets.txt @@ -1007,8 +1007,8 @@ D_D006B50 = 0xD006B50; D_D007A70 = 0xD007A70; D_D008990 = 0xD008990; D_D0098B0 = 0xD0098B0; -D_D009A40 = 0xD009A40; -D_D00B880 = 0xD00B880; +aKattShipDL = 0xD009A40; +aBillShipDL = 0xD00B880; D_E000000 = 0xE000000; D_E003AB0 = 0xE003AB0; D_E00DFB0 = 0xE00DFB0; diff --git a/linker_scripts/eu/rev0/undefined_syms.ld b/linker_scripts/eu/rev0/undefined_syms.ld index 1b309c0d..192ed16c 100644 --- a/linker_scripts/eu/rev0/undefined_syms.ld +++ b/linker_scripts/eu/rev0/undefined_syms.ld @@ -1007,8 +1007,8 @@ D_D006B50 = 0xD006B50; D_D007A70 = 0xD007A70; D_D008990 = 0xD008990; D_D0098B0 = 0xD0098B0; -D_D009A40 = 0xD009A40; -D_D00B880 = 0xD00B880; +aKattShipDL = 0xD009A40; +aBillShipDL = 0xD00B880; D_E000000 = 0xE000000; D_E003AB0 = 0xE003AB0; D_E00DFB0 = 0xE00DFB0; diff --git a/src/audio/audio_heap.c b/src/audio/audio_heap.c index f19b6b21..9d6ca238 100644 --- a/src/audio/audio_heap.c +++ b/src/audio/audio_heap.c @@ -137,7 +137,7 @@ void* AudioHeap_Alloc(AudioAllocPool* pool, u32 size) { u32 aligned = ALIGN16(size); u8* ramAddr = pool->curRamAddr; - if (pool->startRamAddr + pool->size >= pool->curRamAddr + aligned) { + if ((pool->startRamAddr + pool->size) >= (pool->curRamAddr + aligned)) { pool->curRamAddr += aligned; } else { return NULL; diff --git a/src/audio/audio_load.c b/src/audio/audio_load.c index 641e2fbb..7b5a2216 100644 --- a/src/audio/audio_load.c +++ b/src/audio/audio_load.c @@ -214,6 +214,7 @@ void AudioLoad_InitSampleDmaBuffers(s32 numNotes) { gSampleDmaReuseQueue2WrPos = gSampleDmaCount - gSampleDmaListSize1; } +// Updates the audiotable entries with their absolute ROM addresses void AudioLoad_InitTable(AudioTable* table, u8* romAddr, u16 unkMediumParam) { s32 i; @@ -259,7 +260,7 @@ void AudioLoad_SyncLoadSeqParts(s32 seqId, s32 flags) { s32 AudioLoad_SyncLoadSample(Sample* sample, s32 fontId) { u8* sampleAddr; - if ((sample->isRelocated == 1) && (sample->medium != 0)) { + if ((sample->isRelocated == true) && (sample->medium != MEDIUM_RAM)) { sampleAddr = AudioHeap_AllocPersistentSampleCache(sample->size, fontId, sample->sampleAddr, sample->medium); if (sampleAddr == NULL) { return -1; @@ -486,6 +487,7 @@ void* AudioLoad_SyncLoadFont(s32 fontId) { if (didAllocate == 1) { AudioLoad_RelocateFontAndPreloadSamples(fontId, fontData, &relocInfo, AUDIOLOAD_SYNC); } + return fontData; } @@ -649,13 +651,14 @@ void AudioLoad_RelocateFont(s32 fontId, u32 fontBaseAddr, void* relocData) { } } } + for (i = 1; i <= numInstruments; i++) { if (fontDataPtrs[i] != 0) { fontDataPtrs[i] += fontBaseAddr; instrument = fontDataPtrs[i]; - if (instrument->isRelocated == 0) { + if (!instrument->isRelocated) { if (instrument->normalRangeLo != 0) { AudioLoad_RelocateSample(&instrument->lowPitchTunedSample, fontBaseAddr, relocData); } @@ -669,6 +672,7 @@ void AudioLoad_RelocateFont(s32 fontId, u32 fontBaseAddr, void* relocData) { } } } + gSoundFontList[fontId].drums = fontDataPtrs[0]; gSoundFontList[fontId].instruments = (u32) &fontDataPtrs[1]; } @@ -723,7 +727,7 @@ s32 AudioLoad_Dma(OSIoMesg* mesg, u32 priority, s32 direction, u32 devAddr, void return 0; } - if (size & 0xF) { + if (size % 16) { size = ALIGN16(size); } @@ -763,19 +767,19 @@ void* AudioLoad_AsyncLoadInner(s32 tableType, s32 id, s32 nChunks, s32 retData, switch (tableType) { case SEQUENCE_TABLE: - if (gSeqLoadStatus[id] == 1) { + if (gSeqLoadStatus[id] == LOAD_STATUS_IN_PROGRESS) { return NULL; } break; case FONT_TABLE: - if (gFontLoadStatus[id] == 1) { + if (gFontLoadStatus[id] == LOAD_STATUS_IN_PROGRESS) { return NULL; } break; case SAMPLE_TABLE: - if (gSampleFontLoadStatus[id] == 1) { + if (gSampleFontLoadStatus[id] == LOAD_STATUS_IN_PROGRESS) { return NULL; } break; @@ -783,7 +787,7 @@ void* AudioLoad_AsyncLoadInner(s32 tableType, s32 id, s32 nChunks, s32 retData, ramAddr = AudioLoad_SearchCaches(tableType, id); if (ramAddr != NULL) { - loadStatus = 2; + loadStatus = LOAD_STATUS_COMPLETE; osSendMesg(retQueue, (OSMesg) (retData << 0x18), OS_MESG_NOBLOCK); } else { table = AudioLoad_GetLoadTable(tableType); @@ -792,7 +796,7 @@ void* AudioLoad_AsyncLoadInner(s32 tableType, s32 id, s32 nChunks, s32 retData, medium = table->entries[id].medium; cachePolicy = table->entries[id].cachePolicy; romAddr = table->entries[id].romAddr; - loadStatus = 2; + loadStatus = LOAD_STATUS_COMPLETE; switch (cachePolicy) { case CACHEPOLICY_0: @@ -800,7 +804,7 @@ void* AudioLoad_AsyncLoadInner(s32 tableType, s32 id, s32 nChunks, s32 retData, if (ramAddr == NULL) { return ramAddr; } - loadStatus = 5; + loadStatus = LOAD_STATUS_PERMANENTLY_LOADED; break; case CACHEPOLICY_1: @@ -827,7 +831,7 @@ void* AudioLoad_AsyncLoadInner(s32 tableType, s32 id, s32 nChunks, s32 retData, } AudioLoad_StartAsyncLoad(romAddr, ramAddr, size, medium, nChunks, retQueue, (retData << 0x18) | (tableType << 0x10) | (id << 8) | loadStatus); - loadStatus = 1; + loadStatus = LOAD_STATUS_IN_PROGRESS; } switch (tableType) { @@ -892,21 +896,22 @@ void AudioLoad_Init(void) { *clearContext++ = 0; } + // 1000 is a conversion from seconds to milliseconds switch (osTvType) { case OS_TV_PAL: - gMaxTempoTvTypeFactors = 20.03042f; - gRefreshRate = 50; + gMaxTempoTvTypeFactors = 1000 * REFRESH_RATE_DEVIATION_PAL / REFRESH_RATE_PAL; + gRefreshRate = REFRESH_RATE_PAL; break; case OS_TV_MPAL: - gMaxTempoTvTypeFactors = 16.546f; - gRefreshRate = 60; + gMaxTempoTvTypeFactors = 1000 * REFRESH_RATE_DEVIATION_MPAL / REFRESH_RATE_MPAL; + gRefreshRate = REFRESH_RATE_MPAL; break; - default: case OS_TV_NTSC: - gMaxTempoTvTypeFactors = 16.713f; - gRefreshRate = 60; + default: + gMaxTempoTvTypeFactors = 1000 * REFRESH_RATE_DEVIATION_NTSC / REFRESH_RATE_NTSC; + gRefreshRate = REFRESH_RATE_NTSC; break; } @@ -940,6 +945,7 @@ void AudioLoad_Init(void) { gAiBuffers[i][j] = 0; } } + gAudioSpecId = AUDIOSPEC_0; gAudioResetStep = 1; AudioHeap_ResetStep(); @@ -977,6 +983,7 @@ void AudioLoad_Init(void) { static const char devstr38[] = "Entry--- %d %d\n"; static const char devstr39[] = "---Block LPS here\n"; static const char devstr40[] = "===Block LPS end\n"; + s32 AudioLoad_SlowLoadSample(s32 fontId, u8 instId, s8* status) { Sample* sample; AudioSlowLoad* slowLoad; @@ -995,10 +1002,13 @@ s32 AudioLoad_SlowLoadSample(s32 fontId, u8 instId, s8* status) { if (slowLoad->state == SLOW_LOAD_DONE) { slowLoad->state = SLOW_LOAD_WAITING; } + slowLoad->sample = *sample; slowLoad->status = status; + slowLoad->curRamAddr = AudioHeap_AllocTemporarySampleCache(sample->size, fontId, sample->sampleAddr, sample->medium); + if (slowLoad->curRamAddr == NULL) { if ((sample->medium == MEDIUM_UNK) || (sample->codec == 2)) { *status = SLOW_LOAD_STATUS_0; @@ -1008,6 +1018,7 @@ s32 AudioLoad_SlowLoadSample(s32 fontId, u8 instId, s8* status) { return -1; } } + slowLoad->state = SLOW_LOAD_START; slowLoad->bytesRemaining = ALIGN16(sample->size); slowLoad->ramAddr = slowLoad->curRamAddr; @@ -1016,6 +1027,7 @@ s32 AudioLoad_SlowLoadSample(s32 fontId, u8 instId, s8* status) { slowLoad->seqOrFontId = fontId; slowLoad->instId = instId; gSlowLoads.unk_00 ^= 1; + return 0; } diff --git a/src/audio/audio_seqplayer.c b/src/audio/audio_seqplayer.c index 524d96eb..2c4851df 100644 --- a/src/audio/audio_seqplayer.c +++ b/src/audio/audio_seqplayer.c @@ -1399,11 +1399,14 @@ void func_800168BC(void) { gSeqChannels[i].layers[j] = NULL; } } + func_8001463C(); + for (i = 0; i < ARRAY_COUNT(gSeqLayers); i++) { gSeqLayers[i].channel = NULL; gSeqLayers[i].enabled = false; } + for (i = 0; i < ARRAY_COUNT(gSeqPlayers); i++) { for (j = 0; j < 16; j++) { gSeqPlayers[i].channels[j] = &gSeqChannelNone; diff --git a/src/audio/audio_synthesis.c b/src/audio/audio_synthesis.c index 99eb52ad..de98438f 100644 --- a/src/audio/audio_synthesis.c +++ b/src/audio/audio_synthesis.c @@ -513,7 +513,7 @@ void func_80009504(s16* arg0, UnkStruct_800097A8* arg1) { func_80008364(D_80145D48, D_80146148, 8, D_80146548); - for (i = 0; i < 0x100; i++) { + for (i = 0; i < 256; i++) { if (D_80145D48[i] > 32767.0f) { D_80145D48[i] = 32767.0f; } @@ -537,6 +537,7 @@ s32 func_8000967C(s32 length, s16* ramAddr, UnkStruct_800097A8* arg2) { for (i = 0; i < arg2->unk_4; i++) { ramAddr[i] = temp_t7[i]; } + var_s1 = arg2->unk_4; temp_t0 = (length - arg2->unk_4 + 0xFF) / 256; arg2->unk_4 = (temp_t0 * 256) + arg2->unk_4 - length; @@ -545,6 +546,7 @@ s32 func_8000967C(s32 length, s16* ramAddr, UnkStruct_800097A8* arg2) { func_80009504(&ramAddr[var_s1], arg2); var_s1 += 0x100; } + for (i = 0; i < arg2->unk_4; i++) { temp_t7[i] = ramAddr[length + i]; } @@ -568,10 +570,13 @@ u8* func_800097A8(Sample* sample, s32 length, u32 flags, UnkStruct_800097A8* arg arg3->unk_14->sizeUnused = 0; } } + if (gSampleDmaReuseQueue1RdPos != gSampleDmaReuseQueue1WrPos) { sp1C = &gSampleDmas[gSampleDmaReuseQueue1[gSampleDmaReuseQueue1RdPos++]]; } - if (1) {} + + if (1) {} //! FAKE + sp1C->ttl = 2; sp1C->devAddr = sample->sampleAddr; sp1C->sizeUnused = length * 2; @@ -635,6 +640,7 @@ Acmd* func_80009B64(Acmd* aList, s32* cmdCount, s16* aiBufStart, s32 aiBufLen) { func_8001678C(i - 1); func_80009AAC(gAudioBufferParams.ticksPerUpdate - i); } + aiBufPtr = (s32*) aiBufStart; for (i = gAudioBufferParams.ticksPerUpdate; i > 0; i--) { if (i == 1) { @@ -646,22 +652,27 @@ Acmd* func_80009B64(Acmd* aList, s32* cmdCount, s16* aiBufStart, s32 aiBufLen) { } else { chunkLen = gAudioBufferParams.samplesPerTick; } + for (j = 0; j < gNumSynthReverbs; j++) { if (gSynthReverbs[j].useReverb) { func_800080C0(chunkLen, gAudioBufferParams.ticksPerUpdate - i, j); } } + aCmdPtr = func_8000A25C((s16*) aiBufPtr, chunkLen, aCmdPtr, gAudioBufferParams.ticksPerUpdate - i); aiBufLen -= chunkLen; aiBufPtr += chunkLen; } + for (j = 0; j < gNumSynthReverbs; j++) { if (gSynthReverbs[j].framesToIgnore != 0) { gSynthReverbs[j].framesToIgnore--; } gSynthReverbs[j].curFrame ^= 1; } + *cmdCount = aCmdPtr - aList; + return aCmdPtr; } @@ -715,6 +726,7 @@ Acmd* func_8000A128(Acmd* aList, s16 reverbIndex, s16 updateIndex) { aList = func_80009984(aList, sp24->lengthA + 0xC90, 0, sp24->lengthB, reverbIndex); } break; + default: aSaveBuffer(aList++, 0xC90, OS_K0_TO_PHYSICAL(gSynthReverbs[reverbIndex] @@ -724,6 +736,7 @@ Acmd* func_8000A128(Acmd* aList, s16 reverbIndex, s16 updateIndex) { gSynthReverbs[reverbIndex].resampleFlags = 0; break; } + return aList; } @@ -731,61 +744,66 @@ Acmd* func_8000A25C(s16* aiBuf, s32 aiBufLen, Acmd* aList, s32 updateIndex) { u8 sp84[0x3C]; NoteSubEu* temp_v0; s16 var_s2; - s16 var_s3; - s32 var_s1; + s16 i; + s32 j; var_s2 = 0; if (gNumSynthReverbs == 0) { - if (gSynthReverbs[var_s3].useReverb) {} // fake? - for (var_s1 = 0; var_s1 < gNumNotes; var_s1++) { - if (gNoteSubsEu[gNumNotes * updateIndex + var_s1].bitField0.enabled) { - sp84[var_s2++] = var_s1; + if (gSynthReverbs[i].useReverb) {} // fake? + for (j = 0; j < gNumNotes; j++) { + if (gNoteSubsEu[gNumNotes * updateIndex + j].bitField0.enabled) { + sp84[var_s2++] = j; } } } else { - for (var_s3 = 0; var_s3 < gNumSynthReverbs; var_s3++) { - for (var_s1 = 0; var_s1 < gNumNotes; var_s1++) { - temp_v0 = &gNoteSubsEu[gNumNotes * updateIndex + var_s1]; - if (temp_v0->bitField0.enabled && (temp_v0->bitField1.reverbIndex == var_s3)) { - sp84[var_s2++] = var_s1; + for (i = 0; i < gNumSynthReverbs; i++) { + for (j = 0; j < gNumNotes; j++) { + temp_v0 = &gNoteSubsEu[gNumNotes * updateIndex + j]; + if (temp_v0->bitField0.enabled && (temp_v0->bitField1.reverbIndex == i)) { + sp84[var_s2++] = j; } } } - for (var_s1 = 0; var_s1 < gNumNotes; var_s1++) { - temp_v0 = &gNoteSubsEu[gNumNotes * updateIndex + var_s1]; + for (j = 0; j < gNumNotes; j++) { + temp_v0 = &gNoteSubsEu[gNumNotes * updateIndex + j]; if (temp_v0->bitField0.enabled && (temp_v0->bitField1.reverbIndex >= gNumSynthReverbs)) { - sp84[var_s2++] = var_s1; + sp84[var_s2++] = j; } } } + aClearBuffer(aList++, 0x990, 0x300); - var_s1 = 0; - for (var_s3 = 0; var_s3 < gNumSynthReverbs; var_s3++) { - D_8014C1B2 = gSynthReverbs[var_s3].useReverb; + + j = 0; + for (i = 0; i < gNumSynthReverbs; i++) { + D_8014C1B2 = gSynthReverbs[i].useReverb; if (D_8014C1B2) { - aList = func_80009D78(aList, aiBufLen, var_s3, updateIndex); + aList = func_80009D78(aList, aiBufLen, i, updateIndex); } - while (var_s1 < var_s2) { - if (var_s3 != gNoteSubsEu[updateIndex * gNumNotes + sp84[var_s1]].bitField1.reverbIndex) { + while (j < var_s2) { + if (i != gNoteSubsEu[updateIndex * gNumNotes + sp84[j]].bitField1.reverbIndex) { break; } - aList = func_8000A700(sp84[var_s1], &gNoteSubsEu[updateIndex * gNumNotes + sp84[var_s1]], - &gNotes[sp84[var_s1]].synthesisState, aiBuf, aiBufLen, aList, updateIndex); - var_s1++; + aList = func_8000A700(sp84[j], &gNoteSubsEu[updateIndex * gNumNotes + sp84[j]], + &gNotes[sp84[j]].synthesisState, aiBuf, aiBufLen, aList, updateIndex); + j++; } - if (gSynthReverbs[var_s3].useReverb) { - aList = func_8000A128(aList, var_s3, updateIndex); + if (gSynthReverbs[i].useReverb) { + aList = func_8000A128(aList, i, updateIndex); } } - while (var_s1 < var_s2) { - aList = func_8000A700(sp84[var_s1], &gNoteSubsEu[updateIndex * gNumNotes + sp84[var_s1]], - &gNotes[sp84[var_s1]].synthesisState, aiBuf, aiBufLen, aList, updateIndex); - var_s1++; + + while (j < var_s2) { + aList = func_8000A700(sp84[j], &gNoteSubsEu[updateIndex * gNumNotes + sp84[j]], &gNotes[sp84[j]].synthesisState, + aiBuf, aiBufLen, aList, updateIndex); + j++; } - var_s1 = aiBufLen * 2; - aSetBuffer(aList++, 0, 0, 0x450, var_s1); + + j = aiBufLen * 2; + aSetBuffer(aList++, 0, 0, 0x450, j); aInterleave(aList++, 0, 0x990, 0xB10, 0); - aSaveBuffer(aList++, 0x450, OS_K0_TO_PHYSICAL(aiBuf), var_s1 * 2); + aSaveBuffer(aList++, 0x450, OS_K0_TO_PHYSICAL(aiBuf), j * 2); + return aList; } @@ -1209,8 +1227,10 @@ Acmd* func_8000B51C(Acmd* aList, NoteSubEu* noteSub, NoteSynthesisState* synthSt } else { var_a2 = 0; } + synthState->curVolLeft = temp_t1 + (var_t0 * (aiBufLen >> 3)); synthState->curVolRight = temp_t2 + (var_a3 * (aiBufLen >> 3)); + if (noteSub->bitField0.usesHeadsetPanEffects) { aClearBuffer(aList++, 0x650, 0x180); aEnvSetup1(aList++, (temp_a1 & 0x7F), var_a2, var_t0, var_a3); @@ -1255,6 +1275,7 @@ Acmd* func_8000B98C(Acmd* aList, NoteSubEu* noteSub, NoteSynthesisState* synthSt var_v1 = synthState->prevHaasEffectLeftDelaySize; synthState->prevHaasEffectLeftDelaySize = var_a1; break; + case 2: var_t0 = 0xB10; var_a1 = noteSub->rightDelaySize; @@ -1262,9 +1283,11 @@ Acmd* func_8000B98C(Acmd* aList, NoteSubEu* noteSub, NoteSynthesisState* synthSt var_v1 = synthState->prevHaasEffectRightDelaySize; synthState->prevHaasEffectRightDelaySize = var_a1; break; + default: return aList; } + if (flags != 1) { if (var_a1 != var_v1) { temp = (((size << 0xF) / 2) - 1) / ((size + var_a1 - var_v1 - 2) / 2); @@ -1289,6 +1312,8 @@ Acmd* func_8000B98C(Acmd* aList, NoteSubEu* noteSub, NoteSynthesisState* synthSt aSaveBuffer(aList++, size + 0x650, OS_K0_TO_PHYSICAL(synthState->synthesisBuffers->panSamplesBuffer), ALIGN16(var_a1)); } + aAddMixer(aList++, ALIGN64(size), 0x650, var_t0, 0x7FFF); + return aList; } diff --git a/src/audio/audio_thread.c b/src/audio/audio_thread.c index 93e95988..dfa3cfe1 100644 --- a/src/audio/audio_thread.c +++ b/src/audio/audio_thread.c @@ -57,26 +57,33 @@ SPTask* AudioThread_CreateTask(void) { if ((gAudioTaskCountQ % gAudioBufferParams.count) != 0) { return gWaitingAudioTask; } + osSendMesg(gAudioTaskStartQueue, (OSMesg) gAudioTaskCountQ, OS_MESG_NOBLOCK); + gAudioTaskIndexQ ^= 1; gCurAiBuffIndex++; gCurAiBuffIndex %= 3; aiBuffIndex = (gCurAiBuffIndex + 1) % 3; aiSamplesLeft = osAiGetLength() / 4; + if ((gAudioResetTimer < 16) && (gAiBuffLengths[aiBuffIndex] != 0)) { osAiSetNextBuffer(gAiBuffers[aiBuffIndex], gAiBuffLengths[aiBuffIndex] * 4); } - if (gCurAudioFrameDmaCount && gCurAudioFrameDmaCount) {} + + if (gCurAudioFrameDmaCount && gCurAudioFrameDmaCount) {} //! FAKE ? + gCurAudioFrameDmaCount = 0; AudioLoad_DecreaseSampleDmaTtls(); AudioLoad_ProcessLoads(gAudioResetStep); + if (MQ_GET_MESG(gAudioSpecQueue, &specId)) { if (gAudioResetStep == 0) { gAudioResetStep = 5; } gAudioSpecId = specId; } + if ((gAudioResetStep != 0) && (AudioHeap_ResetStep() == 0)) { if (gAudioResetStep == 0) { osSendMesg(gAudioResetQueue, (OSMesg) (s32) gAudioSpecId, OS_MESG_NOBLOCK); @@ -84,12 +91,14 @@ SPTask* AudioThread_CreateTask(void) { gWaitingAudioTask = NULL; return NULL; } + if (gAudioResetTimer > 16) { return NULL; } if (gAudioResetTimer != 0) { gAudioResetTimer++; } + gAudioCurTask = &gAudioRspTasks[gAudioTaskIndexQ]; gCurAbiCmdBuffer = gAbiCmdBuffs[gAudioTaskIndexQ]; aiBuffIndex = gCurAiBuffIndex; diff --git a/src/engine/fox_360.c b/src/engine/fox_360.c index 8cb0499d..161fafb0 100644 --- a/src/engine/fox_360.c +++ b/src/engine/fox_360.c @@ -295,8 +295,8 @@ void ActorAllRange_SetShadowData(Actor* this) { Vec3f temp1; f32 temp4; f32 temp5; - Vec3f spE4; - Vec3f spD8; + Vec3f src; + Vec3f dest; Vec3f spCC; Vec3f spC0; Vec3f spB4; @@ -306,6 +306,7 @@ void ActorAllRange_SetShadowData(Actor* this) { s32 pad[2]; this->fwork[25] = this->fwork[26] = this->fwork[28] = this->fwork[27] = 0.0f; + if (this->drawShadow && (gLevelMode == LEVELMODE_ALL_RANGE) && (gLevelType == LEVELTYPE_PLANET)) { for (i = 0, scenery360 = gScenery360; i < 200; i++, scenery360++) { if ((scenery360->obj.status == OBJ_ACTIVE) && @@ -321,17 +322,17 @@ void ActorAllRange_SetShadowData(Actor* this) { temp4 = scenery360->obj.rot.y; Matrix_RotateY(gCalcMatrix, -temp4 * M_DTOR, MTXF_NEW); - spE4.x = this->obj.pos.x - temp1.x; - spE4.y = 0.0f; - spE4.z = this->obj.pos.z - temp1.z; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &spE4, &spD8); + src.x = this->obj.pos.x - temp1.x; + src.y = 0.0f; + src.z = this->obj.pos.z - temp1.z; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); spC0.x = temp1.x; spC0.y = temp1.y; - spCC.x = spD8.x + temp1.x; + spCC.x = dest.x + temp1.x; spC0.z = temp1.z; // fake? weird ordering - spCC.y = spD8.y + temp1.y; - spCC.z = spD8.z + temp1.z; + spCC.y = dest.y + temp1.y; + spCC.z = dest.z + temp1.z; if ((scenery360->obj.id == OBJ_SCENERY_FO_MOUNTAIN_2) || (scenery360->obj.id == OBJ_SCENERY_FO_MOUNTAIN_3)) { @@ -618,7 +619,11 @@ void ActorAllRange_UpdateEnemyEvents(Actor* this) { ActorAllRange* enemy2; s32 j; +#ifdef AVOID_UB + for (j = 0, enemy2 = &gActors[AI360_ENEMY]; j < 50; j++, enemy2++) { +#else for (j = 0, enemy2 = &gActors[AI360_ENEMY]; j <= 50; j++, enemy2++) { // bug? should be < +#endif if ((enemy2->obj.status == OBJ_ACTIVE) && (enemy2->state == STATE360_2) && (enemy2->aiIndex == enemy->aiIndex)) { return; @@ -742,7 +747,14 @@ void ActorAllRange_UpdateEvents(Actor* this) { ActorAllRange_SpawnSupplies(this); } -s32 func_360_800301F4(Actor* this) { +/** + * Checks whether an actor is close to Scenery objects or Bosses in Space Levels. + * Return values: + * 1: Object nearby is found below the actor + * -1: Object nearby is found above the actor + * 0: No objects found + */ +s32 ActorAllRange_CheckObjectNearbySpace(Actor* this) { Boss* boss; f32 temp_ft4; f32 temp_ft5; @@ -775,6 +787,7 @@ s32 func_360_800301F4(Actor* this) { } boss = &gBosses[0]; + // Check if the actor is close to the Great Fox in Sector Z. if ((gCurrentLevel == LEVEL_SECTOR_Z) && (fabsf(boss->obj.pos.x - (this->obj.pos.x + temp_ft4)) < 2000.0f) && (fabsf(boss->obj.pos.z - (this->obj.pos.z + temp_ft5)) < 2000.0f)) { if (fabsf(boss->obj.pos.y - this->obj.pos.y) < 1500.0f) { @@ -788,15 +801,22 @@ s32 func_360_800301F4(Actor* this) { return 0; } -s32 func_360_8003049C(ActorAllRange* this) { +/** + * Checks whether an actor is close to Scenery objects or specific Bosses. + * Return values: + * 1: Object nearby is found below the actor + * -1: Object nearby is found above the actor + * 0: No objects found + */ +s32 ActorAllRange_CheckObjectNearby(ActorAllRange* this) { Scenery360* scenery360; s32 i; - f32 sp44; - f32 sp40; - f32 sp3C; - f32 temp_fa0; - f32 temp_ft4; - f32 var_ft5; + f32 distThreshold; + f32 sinRotY; + f32 cosRotY; + f32 xOffset; + f32 zOffset; + f32 yDistThreshold; Boss* boss = &gBosses[0]; s32 pad[4]; @@ -805,45 +825,45 @@ s32 func_360_8003049C(ActorAllRange* this) { } if ((gLevelType == LEVELTYPE_SPACE) && (gCurrentLevel != LEVEL_BOLSE)) { - return func_360_800301F4(this); + return ActorAllRange_CheckObjectNearbySpace(this); } - sp40 = SIN_DEG(this->obj.rot.y); - sp3C = COS_DEG(this->obj.rot.y); + sinRotY = SIN_DEG(this->obj.rot.y); + cosRotY = COS_DEG(this->obj.rot.y); - temp_fa0 = this->fwork[9] * 10.0f + (sp40 * 650.0f); - temp_ft4 = this->fwork[9] * 10.0f + (sp3C * 650.0f); + xOffset = this->fwork[9] * 10.0f + (sinRotY * 650.0f); + zOffset = this->fwork[9] * 10.0f + (cosRotY * 650.0f); if (gLevelMode == LEVELMODE_ALL_RANGE) { for (i = 0, scenery360 = gScenery360; i < 200; i++, scenery360++) { if ((scenery360->obj.status == OBJ_ACTIVE) && - (fabsf(scenery360->obj.pos.x - (this->obj.pos.x + temp_fa0)) < 1200.0f) && - (fabsf(scenery360->obj.pos.z - (this->obj.pos.z + temp_ft4)) < 1200.0f) && (this->obj.pos.y < 650.0f)) { + (fabsf(scenery360->obj.pos.x - (this->obj.pos.x + xOffset)) < 1200.0f) && + (fabsf(scenery360->obj.pos.z - (this->obj.pos.z + zOffset)) < 1200.0f) && (this->obj.pos.y < 650.0f)) { return 1; } } } - sp44 = 1200.0f; - var_ft5 = 650.0f; + distThreshold = 1200.0f; + yDistThreshold = 650.0f; - if (this->aiType < AI360_KATT) { - var_ft5 = 720.0f; + if (this->aiType <= AI360_ANDREW) { + yDistThreshold = 720.0f; } if (boss->obj.id == OBJ_BOSS_CO_CARRIER) { - var_ft5 = 350.0f; + yDistThreshold = 350.0f; } else if (boss->obj.id == OBJ_BOSS_BO_BASE) { - sp44 = 2000.0f; - var_ft5 = 750.0f; + distThreshold = 2000.0f; + yDistThreshold = 750.0f; } else if (boss->obj.id == OBJ_BOSS_KA_FLBASE) { - sp44 = 1500.0f; - var_ft5 = 700.0f; + distThreshold = 1500.0f; + yDistThreshold = 700.0f; } - if ((fabsf(boss->obj.pos.x - (this->obj.pos.x + temp_fa0)) < sp44) && - (fabsf(boss->obj.pos.z - (this->obj.pos.z + temp_ft4)) < sp44) && - (fabsf(boss->obj.pos.y - this->obj.pos.y) < var_ft5)) { + if ((fabsf(boss->obj.pos.x - (this->obj.pos.x + xOffset)) < distThreshold) && + (fabsf(boss->obj.pos.z - (this->obj.pos.z + zOffset)) < distThreshold) && + (fabsf(boss->obj.pos.y - this->obj.pos.y) < yDistThreshold)) { return 1; } else { return 0; @@ -945,7 +965,7 @@ void ActorAllRange_ApplyDamage(ActorAllRange* this) { this->timer_0C2 = 10; this->timer_0BE = 0; - this->timer_04C = RAND_INT(2.9f); + this->work_04C = RAND_INT(2.9f); switch (RAND_INT(4.0f)) { case 0: @@ -1262,7 +1282,7 @@ static Vec3f sSectorZRetreatPath[6] = { void ActorAllRange_Update(ActorAllRange* this) { u8 sp10F; - s32 sp108; + s32 objectNearby; s32 sp104; s32 temp_v0_27; RadarMark* radarMark; @@ -1336,7 +1356,7 @@ void ActorAllRange_Update(ActorAllRange* this) { if (this->rot_0F4.x > 180.0f) { this->rot_0F4.x -= 360.0f; } - this->unk_046 = 0; + this->work_046 = 0; break; case STATE360_9: @@ -1462,7 +1482,7 @@ void ActorAllRange_Update(ActorAllRange* this) { this->fwork[7] = 360.0f; this->fwork[8] = 0.0f; AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, this->sfxSource, 0); - this->unk_046 = 0; + this->work_046 = 0; } gTeamShields[this->aiType] = -1; gTeamDamage[this->aiType] = 0; @@ -1479,13 +1499,13 @@ void ActorAllRange_Update(ActorAllRange* this) { gTeamShields[this->aiType] = -1; gTeamDamage[this->aiType] = 0; if (gCurrentLevel == LEVEL_SECTOR_Z) { - this->fwork[4] = sSectorZRetreatPath[this->unk_046].x; - this->fwork[5] = sSectorZRetreatPath[this->unk_046].y; - this->fwork[6] = sSectorZRetreatPath[this->unk_046].z; - if ((fabsf(this->obj.pos.x - sSectorZRetreatPath[this->unk_046].x) < 800.0f) && - (fabsf(this->obj.pos.z - sSectorZRetreatPath[this->unk_046].z) < 800.0f)) { - this->unk_046++; - if (this->unk_046 >= 4) { + this->fwork[4] = sSectorZRetreatPath[this->work_046].x; + this->fwork[5] = sSectorZRetreatPath[this->work_046].y; + this->fwork[6] = sSectorZRetreatPath[this->work_046].z; + if ((fabsf(this->obj.pos.x - sSectorZRetreatPath[this->work_046].x) < 800.0f) && + (fabsf(this->obj.pos.z - sSectorZRetreatPath[this->work_046].z) < 800.0f)) { + this->work_046++; + if (this->work_046 >= 4) { Object_Kill(&this->obj, this->sfxSource); } } @@ -1989,7 +2009,7 @@ void ActorAllRange_Update(ActorAllRange* this) { Math_SmoothStepToAngle(&this->obj.rot.z, 5.0f, 0.1f, 3.0f, 0.01f); } - switch (this->unk_046) { + switch (this->work_046) { case 0: Math_SmoothStepToF(&this->rot_0F4.x, 200.0f, 0.1f, 6.0f, 0.0001f); if (this->rot_0F4.x > 190.0f) { @@ -2003,7 +2023,7 @@ void ActorAllRange_Update(ActorAllRange* this) { this->obj.rot.z -= 360.0f; } this->timer_0BC = 40; - this->unk_046++; + this->work_046++; } this->obj.pos.y -= 3.0f; break; @@ -2057,12 +2077,12 @@ void ActorAllRange_Update(ActorAllRange* this) { spD8 = this->fwork[20]; spD4 = this->fwork[19]; - sp108 = 0; + objectNearby = 0; if (sp104 == 1) { if (this->aiType < AI360_GREAT_FOX) { - sp108 = func_360_8003049C(this); - if ((sp108 != 0) && (this->aiType < AI360_ENEMY) && (this->timer_0BE == 0) && + objectNearby = ActorAllRange_CheckObjectNearby(this); + if ((objectNearby != 0) && (this->aiType < AI360_ENEMY) && (this->timer_0BE == 0) && ((this->fwork[7] < 0.01f) || (this->fwork[7] > 359.9f))) { this->timer_0BE = RAND_INT(200.0f) + 200; if (Rand_ZeroOne() < 0.5f) { @@ -2075,11 +2095,11 @@ void ActorAllRange_Update(ActorAllRange* this) { } } - if (sp108 != 0) { + if (objectNearby != 0) { if ((this->aiType < AI360_ENEMY) || (gCurrentLevel != LEVEL_FORTUNA)) { - spD8 += 40.0f * sp108; + spD8 += 40.0f * objectNearby; } else { - spD8 += 20.0f * sp108; + spD8 += 20.0f * objectNearby; } if (spD8 >= 360.0f) { spD8 -= 360.0f; @@ -2277,9 +2297,9 @@ void ActorAllRange_Update(ActorAllRange* this) { if (gCurrentLevel == LEVEL_FORTUNA) { ActorAllRange_SetShadowData(this); } else if (gCurrentLevel == LEVEL_VENOM_ANDROSS) { - this->unk_04A++; - if (this->unk_04A >= Animation_GetFrameCount(&D_VE2_600C200)) { - this->unk_04A = 0; + this->work_04A++; + if (this->work_04A >= Animation_GetFrameCount(&D_VE2_600C200)) { + this->work_04A = 0; } } @@ -2404,35 +2424,35 @@ void ActorAllRange_Draw(ActorAllRange* this) { case AI360_PIGMA: case AI360_ANDREW: if (gCurrentLevel == LEVEL_VENOM_2) { - gSPDisplayList(gMasterDisp++, D_STAR_WOLF_F0103D0); + gSPDisplayList(gMasterDisp++, aStarWolfUpgradedShipDL); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 30.0f, 0.0f, -60.0f, MTXF_APPLY); - Actor_DrawEngineGlow(this, 2); + Actor_DrawEngineGlow(this, EG_GREEN); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, -30.0f, 0.0f, -60.0f, MTXF_APPLY); - Actor_DrawEngineGlow(this, 2); + Actor_DrawEngineGlow(this, EG_GREEN); Matrix_Pop(&gGfxMatrix); ActorAllRange_DrawBarrelRoll(this); ActorAllRange_DrawShield(this); } else { - gSPDisplayList(gMasterDisp++, D_STAR_WOLF_F00F200); + gSPDisplayList(gMasterDisp++, aStarWolfStandardShipDL); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY); if (gCurrentLevel == LEVEL_BOLSE) { - Actor_DrawEngineGlow(this, 3); + Actor_DrawEngineGlow(this, EG_ORANGE); } else { - Actor_DrawEngineGlow(this, 2); + Actor_DrawEngineGlow(this, EG_GREEN); } } break; case AI360_KATT: - gSPDisplayList(gMasterDisp++, D_D009A40); + gSPDisplayList(gMasterDisp++, aKattShipDL); Actor_DrawEngineAndContrails(this); break; case AI360_BILL: - gSPDisplayList(gMasterDisp++, D_D00B880); + gSPDisplayList(gMasterDisp++, aBillShipDL); Actor_DrawEngineAndContrails(this); break; @@ -2443,12 +2463,12 @@ void ActorAllRange_Draw(ActorAllRange* this) { break; case AI360_MISSILE: - Animation_GetFrameData(&D_SZ_6006D64, 0, jointTable); + Animation_GetFrameData(&aSzMissileAnim, 0, jointTable); Animation_DrawSkeleton(3, aSzMissileSkel, jointTable, ActorAllRange_MissileOverrideLimbDraw, NULL, 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); - Actor_DrawEngineGlow(this, 3); + Actor_DrawEngineGlow(this, EG_ORANGE); break; default: @@ -2458,7 +2478,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); - Actor_DrawEngineGlow(this, 2); + Actor_DrawEngineGlow(this, EG_GREEN); } else if (gCurrentLevel == LEVEL_KATINA) { switch (this->animFrame) { case 0: @@ -2467,7 +2487,7 @@ void ActorAllRange_Draw(ActorAllRange* this) { case 1: gSPDisplayList(gMasterDisp++, aKaCornerianFighterDL); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY); - Actor_DrawEngineGlow(this, 0); + Actor_DrawEngineGlow(this, EG_RED); break; case 3: gSPDisplayList(gMasterDisp++, aKaEnemy1DL); @@ -2478,29 +2498,29 @@ void ActorAllRange_Draw(ActorAllRange* this) { } else if (gCurrentLevel == LEVEL_SECTOR_Z) { gSPDisplayList(gMasterDisp++, D_SZ_6004FE0); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY); - Actor_DrawEngineGlow(this, 2); + Actor_DrawEngineGlow(this, EG_GREEN); } else if (gCurrentLevel == LEVEL_BOLSE) { gSPDisplayList(gMasterDisp++, D_BO_6008770); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY); - Actor_DrawEngineGlow(this, 2); + Actor_DrawEngineGlow(this, EG_GREEN); Matrix_Pop(&gGfxMatrix); ActorAllRange_DrawShield(this); } else if (gCurrentLevel == LEVEL_VENOM_ANDROSS) { - Animation_GetFrameData(&D_VE2_600C200, this->unk_04A, this->vwork); + Animation_GetFrameData(&D_VE2_600C200, this->work_04A, this->vwork); Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 10.0f, MTXF_APPLY); Animation_DrawSkeleton(0, D_VE2_600C2AC, this->vwork, NULL, NULL, this, &gIdentityMatrix); } else if (gCurrentLevel == LEVEL_VERSUS) { gSPDisplayList(gMasterDisp++, D_versus_3015740); } else if (gCurrentLevel == LEVEL_TRAINING) { if (this->aiIndex == AI360_FOX) { - gSPDisplayList(gMasterDisp++, D_STAR_WOLF_F00F200); + gSPDisplayList(gMasterDisp++, aStarWolfStandardShipDL); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY); - Actor_DrawEngineGlow(this, 3); + Actor_DrawEngineGlow(this, EG_ORANGE); } else { - gSPDisplayList(gMasterDisp++, D_ENMY_PLANET_40068F0); + gSPDisplayList(gMasterDisp++, aVenomFighter1DL); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY); - Actor_DrawEngineGlow(this, 2); + Actor_DrawEngineGlow(this, EG_GREEN); } } break; diff --git a/src/engine/fox_beam.c b/src/engine/fox_beam.c index 0c27fc28..48feefa0 100644 --- a/src/engine/fox_beam.c +++ b/src/engine/fox_beam.c @@ -126,9 +126,11 @@ void PlayerShot_Impact(PlayerShot* shot) { Object_Kill(&shot->obj, shot->sfxSource); return; } + shot->obj.pos.z = gShotHitPosZ; // strange order on the globals shot->obj.pos.y = gShotHitPosY; shot->obj.pos.x = gShotHitPosX; + if ((shot->obj.id == PLAYERSHOT_BOMB) || ((gCurrentLevel != LEVEL_AQUAS) && (shot->obj.id == PLAYERSHOT_LOCK_ON) && (shot->unk_5C != 0))) { if (shot->obj.id == PLAYERSHOT_LOCK_ON) { @@ -138,10 +140,13 @@ void PlayerShot_Impact(PlayerShot* shot) { PlayerShot_ExplodeBomb(shot); } else if (shot->obj.id == PLAYERSHOT_LOCK_ON) { shot->scale = 7.5f; + for (i = 0; i < ARRAY_COUNT(gActors); i++) { gActors[i].lockOnTimers[shot->sourceId] = 0; } + shot->vel.x = shot->vel.y = shot->vel.z = 0.0f; + if (gCurrentLevel == LEVEL_AQUAS) { gLight3R = gLight3G = gLight3B = 0; Effect_Effect384_Spawn(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 10.0f, 4); @@ -195,7 +200,7 @@ void PlayerShot_SpawnEffect344(f32 xPos, f32 yPos, f32 zPos, f32 arg3, f32 arg4, } } -void PlayerShot_SetupEffect345(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yRot, f32 scale) { +void PlayerShot_LaserMark1_Setup(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 yRot, f32 scale) { Effect_Initialize(effect); effect->obj.status = OBJ_INIT; effect->obj.id = OBJ_EFFECT_LASER_MARK_1; @@ -216,7 +221,7 @@ void PlayerShot_HitGround(f32 xPos, f32 yPos, f32 zPos, f32 yRot, f32 scale) { (gCurrentLevel != LEVEL_TRAINING) && (gCurrentLevel != LEVEL_SOLAR) && (gCurrentLevel != LEVEL_ZONESS)) { for (i = 0; i < 50; i++) { if (gEffects[i].obj.status == OBJ_FREE) { - PlayerShot_SetupEffect345(&gEffects[i], xPos, yPos, zPos, yRot, scale); + PlayerShot_LaserMark1_Setup(&gEffects[i], xPos, yPos, zPos, yRot, scale); func_effect_8007D10C(xPos, yPos, zPos, 2.0f); break; } @@ -363,6 +368,7 @@ s32 PlayerShot_CheckEventHitbox(PlayerShot* shot, Actor* actor) { (fabsf(shot->obj.pos.y - actor->obj.pos.y) < 2000.0f) && (fabsf(shot->obj.pos.x - actor->obj.pos.x) < 2000.0f)) { hitboxData = actor->info.hitbox; + count = *hitboxData++; if (count != 0) { xySizeMod = 0.0f; @@ -373,6 +379,7 @@ s32 PlayerShot_CheckEventHitbox(PlayerShot* shot, Actor* actor) { xySizeMod += 30.0f; } } + for (i = 0; i < count; i++, hitboxData += 6) { if (actor->info.unk_16 == 1) { shotPx = shot->obj.pos.x; @@ -394,7 +401,7 @@ s32 PlayerShot_CheckEventHitbox(PlayerShot* shot, Actor* actor) { } if (((actor->vwork[29].z != 0.0f) || (actor->vwork[29].x != 0.0f) || (actor->rot_0F4.z != 0.0f) || (actor->vwork[29].y != 0.0f)) && - (actor->eventType != EVID_31)) { + (actor->eventType != EVID_A6_UMBRA_STATION)) { Matrix_RotateZ(gCalcMatrix, -(actor->vwork[29].z + actor->rot_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); @@ -407,6 +414,7 @@ s32 PlayerShot_CheckEventHitbox(PlayerShot* shot, Actor* actor) { shotPy = actor->obj.pos.y + sp70.y; shotPz = actor->obj.pos.z + sp70.z; } + hitbox = (Hitbox*) hitboxData; if ((fabsf(hitbox->z.offset + actor->obj.pos.z - shotPz) < (hitbox->z.size + 50.0f)) && (fabsf(hitbox->x.offset + actor->obj.pos.x - shotPx) < (hitbox->x.size + xySizeMod)) && @@ -687,10 +695,10 @@ void PlayerShot_ApplyDamageToActor(PlayerShot* shot, Actor* actor, s32 hitIndex) actor->hitPos.y = shot->obj.pos.y; actor->hitPos.z = shot->obj.pos.z; if (((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->dmgPart == 0) && - ((actor->eventType == EVID_48) || (actor->eventType == EVID_49) || (actor->eventType == EVID_50))) || + ((actor->eventType == EVID_SY_ROBOT_1) || (actor->eventType == EVID_SY_ROBOT_2) || + (actor->eventType == EVID_SY_ROBOT_3))) || ((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->fwork[23] > 1.0f)) || - ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->dmgPart == 0) && - (actor->eventType == EVID_METEO_PYRAMID_SHIP)) || + ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->dmgPart == 0) && (actor->eventType == EVID_ME_FLIP_BOT)) || ((actor->obj.id == OBJ_ACTOR_AQ_SCULPIN) && (shot->obj.id != PLAYERSHOT_LOCK_ON) && ((actor->state < 3) || (actor->state >= 5))) || ((actor->obj.id == OBJ_ACTOR_AQ_GAROA) && (shot->obj.id != PLAYERSHOT_LOCK_ON) && (actor->timer_0BC != 0))) { @@ -767,13 +775,13 @@ void PlayerShot_CollisionCheck(PlayerShot* shot) { } break; case OBJ_ACTOR_EVENT: - if (actor->eventType == EVID_42) { + if (actor->eventType == EVID_SY_SHIP_2) { if (PlayerShot_CheckPolyCollision(shot, ACTOR_EVENT_ID, &actor->obj)) { actor->dmgType = DMG_BEAM; actor->dmgPart = shot->sourceId; return; } - } else if (actor->eventType == EVID_63) { + } else if (actor->eventType == EVID_ME_BIG_METEOR) { test.x = fabsf(actor->obj.pos.x - shot->obj.pos.x); test.y = fabsf(actor->obj.pos.y - shot->obj.pos.y); test.z = fabsf(actor->obj.pos.z - shot->obj.pos.z); @@ -1929,7 +1937,7 @@ void PlayerShot_ApplyExplosionDamage(PlayerShot* shot, s32 damage) { actor->obj.status = OBJ_DYING; actor->timer_0BC = RAND_INT(15.0f) + 10; actor->timer_0BE = 0; - actor->timer_04C = 4; + actor->work_04C = 4; actor->obj.rot.x = Math_ModF(actor->obj.rot.x, 360.0f); if (actor->info.bonus != 0) { shot->bonus++; @@ -2267,12 +2275,14 @@ void PlayerShot_Update(PlayerShot* shot) { switch (shot->obj.status) { case SHOT_FREE: break; + case SHOT_ACTIVE: ticks = 1; switch (shot->obj.id) { case PLAYERSHOT_GFOX_LASER: ticks = 4; break; + case PLAYERSHOT_SINGLE_LASER: case PLAYERSHOT_TWIN_LASER: if ((shot->unk_58 == 0) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO)) { @@ -2281,10 +2291,12 @@ void PlayerShot_Update(PlayerShot* shot) { ticks = 3; } break; + case PLAYERSHOT_TANK: ticks = 2; break; } + for (i = 0; i < ticks && (shot->obj.status == SHOT_ACTIVE); i++) { if (shot->timer > 0) { shot->timer--; @@ -2295,6 +2307,7 @@ void PlayerShot_Update(PlayerShot* shot) { PlayerShot_UpdateShot(shot, i); } break; + case SHOT_HITMARK: PlayerShot_UpdateHitmark(shot); break; diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index fe973584..88ff4c93 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -90,6 +90,7 @@ void func_demo_80048CC4(ActorCutscene* this, s32 index) { this->rot_0F4.y = 0.0f; this->rot_0F4.z = D_demo_800C9F90[index]; + Object_SetInfo(&this->info, this->obj.id); if (index == 3) { @@ -103,8 +104,8 @@ void func_demo_80048CC4(ActorCutscene* this, s32 index) { } void Cutscene_WarpZoneComplete(Player* player) { - Vec3f sp5C; - Vec3f sp50; + Vec3f src; + Vec3f dest; s32 pad[2]; f32 temp_ft3; f32 temp_ret; @@ -140,10 +141,10 @@ void Cutscene_WarpZoneComplete(Player* player) { Math_SmoothStepToF(&player->baseSpeed, 0.0f, 1.0f, 0.5f, 0.0f); Matrix_RotateX(gCalcMatrix, -5.0f * M_DTOR, MTXF_NEW); Matrix_RotateY(gCalcMatrix, D_ctx_80177A48[1] * M_DTOR, MTXF_APPLY); - sp5C.x = 0.0f; - sp5C.y = 0.0f; - sp5C.z = 300.0f; - Matrix_MultVec3f(gCalcMatrix, &sp5C, &sp50); + src.x = 0.0f; + src.y = 0.0f; + src.z = 300.0f; + Matrix_MultVec3f(gCalcMatrix, &src, &dest); gCsCamAtX = player->pos.x; gCsCamAtY = player->pos.y; gCsCamAtZ = player->trueZpos + gPathProgress; @@ -221,9 +222,9 @@ void Cutscene_WarpZoneComplete(Player* player) { } } } else { - gCsCamEyeX = player->pos.x + sp50.x; - gCsCamEyeY = player->pos.y + sp50.y; - gCsCamEyeZ = player->trueZpos + gPathProgress + sp50.z; + gCsCamEyeX = player->pos.x + dest.x; + gCsCamEyeY = player->pos.y + dest.y; + gCsCamEyeZ = player->trueZpos + gPathProgress + dest.z; } break; @@ -238,14 +239,14 @@ void Cutscene_WarpZoneComplete(Player* player) { Matrix_RotateY(gCalcMatrix, (player->rot.y + 180.0f) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -((player->rot.x + player->aerobaticPitch) * M_DTOR), MTXF_APPLY); - sp5C.x = 0.0f; - sp5C.y = 0.0f; - sp5C.z = player->baseSpeed + player->boostSpeed; + src.x = 0.0f; + src.y = 0.0f; + src.z = player->baseSpeed + player->boostSpeed; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp5C, &sp50); - player->vel.x = sp50.x; - player->vel.z = sp50.z; - player->vel.y = sp50.y; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + player->vel.x = dest.x; + player->vel.z = dest.z; + player->vel.y = dest.y; player->pos.x += player->vel.x; player->pos.y += player->vel.y; @@ -267,8 +268,8 @@ static Vec3f D_demo_800C9FA0[] = { }; void func_demo_80049630(ActorCutscene* this) { - Vec3f sp3C; - Vec3f sp30; + Vec3f src; + Vec3f dest; switch (this->state) { case 0: @@ -300,15 +301,15 @@ void func_demo_80049630(ActorCutscene* this) { Matrix_RotateY(gCalcMatrix, (this->rot_0F4.y + 180.0f) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -(this->rot_0F4.x * M_DTOR), MTXF_APPLY); - sp3C.x = 0.0f; - sp3C.y = 0.0f; - sp3C.z = this->fwork[0]; + src.x = 0.0f; + src.y = 0.0f; + src.z = this->fwork[0]; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp3C, &sp30); + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - this->vel.x = sp30.x; - this->vel.y = sp30.y; - this->vel.z = sp30.z; + this->vel.x = dest.x; + this->vel.y = dest.y; + this->vel.z = dest.z; this->obj.rot.x = -this->rot_0F4.x; this->obj.rot.y = this->rot_0F4.y + 180.0f; @@ -2526,10 +2527,10 @@ void ActorCutscene_Draw(ActorCutscene* this) { switch (this->animFrame) { case 1000: RCP_SetupDL(&gMasterDisp, SETUPDL_45); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_046); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->work_046); gSPDisplayList(gMasterDisp++, D_ENMY_PLANET_40018A0); - if (this->unk_046 > 50) { + if (this->work_046 > 50) { Actor_DrawEngineAndContrails(this); } break; @@ -2568,11 +2569,11 @@ void ActorCutscene_Draw(ActorCutscene* this) { break; case 20: - gSPDisplayList(gMasterDisp++, D_ENMY_SPACE_400AAE0); + gSPDisplayList(gMasterDisp++, aCommanderDL); break; case 24: - gSPDisplayList(gMasterDisp++, D_D009A40); + gSPDisplayList(gMasterDisp++, aKattShipDL); Actor_DrawEngineAndContrails(this); break; @@ -2587,19 +2588,19 @@ void ActorCutscene_Draw(ActorCutscene* this) { case 26: gSPDisplayList(gMasterDisp++, D_SZ_6004FE0); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY); - Actor_DrawEngineGlow(this, 2); + Actor_DrawEngineGlow(this, EG_GREEN); break; case 28: - gSPDisplayList(gMasterDisp++, D_ENMY_SPACE_400AAE0); + gSPDisplayList(gMasterDisp++, aCommanderDL); Matrix_Translate(gGfxMatrix, 0.f, 0.f, -60.0f, MTXF_APPLY); - Actor_DrawEngineGlow(this, 2); + Actor_DrawEngineGlow(this, EG_GREEN); break; case 30: Display_SetSecondLight(&this->obj.pos); - if (this->unk_046 != 0) { + if (this->work_046 != 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_55); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); Rand_SetSeed(1, 29000, 9876); @@ -2729,12 +2730,12 @@ void ActorCutscene_Draw(ActorCutscene* this) { case 33: if ((this->index == 3) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { - gSPDisplayList(gMasterDisp++, D_D00B880); + gSPDisplayList(gMasterDisp++, aBillShipDL); } else { gSPDisplayList(gMasterDisp++, aKaCornerianFighterDL); } Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY); - Actor_DrawEngineGlow(this, 0); + Actor_DrawEngineGlow(this, EG_RED); break; case 34: diff --git a/src/engine/fox_display.c b/src/engine/fox_display.c index 38ead565..91014a98 100644 --- a/src/engine/fox_display.c +++ b/src/engine/fox_display.c @@ -780,7 +780,7 @@ void Display_PlayerShadow_Draw(Player* player) { Matrix_Scale(gGfxMatrix, 1.5f * 1.67f, 1.5f, 1.5f * 1.67f, MTXF_APPLY); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 30.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1032780); + gSPDisplayList(gMasterDisp++, aArwingShadowDL); break; case FORM_LANDMASTER: @@ -815,21 +815,21 @@ void Display_PlayerShadow_Draw(Player* player) { } } -void Display_DrawEngineGlow(s32 levelType) { +void Display_DrawEngineGlow(EngineGlowColor color) { RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); - switch (levelType) { - case LEVELTYPE_PLANET: + switch (color) { + case EG_RED: gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 255); break; - case LEVELTYPE_SPACE: + case EG_BLUE: gDPSetEnvColor(gMasterDisp++, 0, 0, 255, 255); break; - case LEVELTYPE_UNK2: + case EG_GREEN: gDPSetEnvColor(gMasterDisp++, 0, 255, 0, 255); break; - case LEVELTYPE_UNK3: + case EG_ORANGE: gDPSetEnvColor(gMasterDisp++, 255, 64, 0, 255); break; } diff --git a/src/engine/fox_edata_info.c b/src/engine/fox_edata_info.c index a070fe3c..a5dc6c08 100644 --- a/src/engine/fox_edata_info.c +++ b/src/engine/fox_edata_info.c @@ -1,3 +1,26 @@ +/** + * Glossary: + * + * Level Prefixes: + * CO: Corneria + * ME: Meteo + * SX: Sector X + * SY: Sector Y + * SZ: Sector Z + * KA: Katina + * AQ: Aquas + * A6: Area 6 + * FO: Fortuna + * SO: Solar + * MA: Macbeth + * TI: Titania + * BO: Bolse + * ZO: Zoness + * VE1: Venom 1 + * VE2: Venom 2 + * AND: Venom Andross + */ + #include "global.h" #include "assets/ast_versus.h" @@ -77,17 +100,17 @@ f32 gTeamHitbox[] = { f32 gActorAllRangeHItbox[] = { 1.0f, 0.0f, 40.0f, 0.0f, 40.0f, 0.0f, 40.0f, }; -f32 gWarpZoneEvent94Hitbox[] = { +f32 aWzMeteor1Hitbox[] = { 1.0f, 0.0f, 140.0f, 0.0f, 170.0f, 0.0f, 140.0f, }; -f32 gWarpZoneEvent96Hitbox[] = { +f32 aWzGateHitbox[] = { 4.0f, 0.0f, 140.0f, -675.0f, 140.0f, 0.0f, 810.0f, 0.0f, 140.0f, 675.0f, 140.0f, 0.0f, 810.0f, 0.0f, 140.0f, 0.0f, 810.0f, 675.0f, 140.0f, 0.0f, 140.0f, 0.0f, 810.0f, -675.0f, 140.0f, }; -f32 gWarpZoneEvent92Hitbox[] = { +f32 aWzPillar1Hitbox[] = { 1.0f, 0.0f, 140.0f, 0.0f, 140.0f, 0.0f, 1800.0f, }; -f32 gWarpZoneEvent93Hitbox[] = { +f32 aWzPillar2Hitbox[] = { 2.0f, 0.0f, 140.0f, 0.0f, 140.0f, 0.0f, 1800.0f, 1.0f, 141.0f, 1.0f, 1800.0f, 1.0f, 140.0f, }; @@ -157,7 +180,7 @@ ObjectInfo gObjectInfo[] = { /* OBJ_SCENERY_MA_TOWER, */ {(void*) Macbeth_MaTower_Draw, 1, (ObjectFunc) NULL, aMaTowerHitbox, 200.0f, 0, 0, 5, 0, 0.0f, 0 }, /* OBJ_SCENERY_MA_WALL_1, */ {(void*) aMaWall1DL, 0, (ObjectFunc) NULL, gNoHitbox, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_SCENERY_GUILLOTINE_HOUSING, */ {(void*) aMaGuillotineHousingDL, 0, (ObjectFunc) NULL, aMaGuillotineHousingHitbox, 500.0f, 0, 0, 5, 0, 0.0f, 0 }, - /* OBJ_SCENERY_MA_GUILLOTINE, */ {(void*) aMaGuillotineDL, 0, (ObjectFunc) NULL, aMaGuillotineHitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_MA_GUILLOTINE, */ {(void*) aMaGuillotine1DL, 0, (ObjectFunc) NULL, aMaGuillotineHitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_MA_PROXIMITY_LIGHT, */ {(void*) Macbeth_MaProximityLight_Draw, 1, (ObjectFunc) NULL, aMaProximityLightHitbox, 400.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_SCENERY_MA_WALL_2, */ {(void*) aMaWall2DL, 0, (ObjectFunc) NULL, aMaWall2Hitbox, 2500.0f, 0, 0, 5, 0, 0.0f, 0 }, /* OBJ_SCENERY_MA_WALL_3, */ {(void*) aMaWall3DL, 0, (ObjectFunc) NULL, aMaWall3Hitbox, 2000.0f, 0, 0, 5, 0, 0.0f, 0 }, @@ -208,7 +231,7 @@ ObjectInfo gObjectInfo[] = { /* OBJ_SCENERY_SY_SHIP_2_DESTROYED */ {(void*) aSyShip4DestroyedDL, 0, (ObjectFunc) SectorY_SyShip4Destroyed_Update, aSyShip4DestroyedHitbox, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, /* OBJ_SPRITE_SY_SHIP_2 */ {(void*) aSyShip2SpriteDL, 0, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SPRITE_SY_SHIP_3 */ {(void*) aSyShip3SpriteDL, 0, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_SY_SHIP_PROJECTILE */ {(void*) aSyShipProjectileDL, 0, (ObjectFunc) NULL, aSyShipProjectileHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_SY_SHIP_MISSILE */ {(void*) aSyShipMissileDL, 0, (ObjectFunc) NULL, aSyShipMissileHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_SY_SHIP_WINDOWS */ {(void*) aSyShipWindowsDL, 0, (ObjectFunc) NULL, aSyShipWindowsHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_AQ_CORAL_REEF_1 */ {(void*) aAqCoralReef1DL, 0, (ObjectFunc) NULL, aAqCoralReef1Hitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_AQ_TUNNEL_1 */ {(void*) aAqTunnel1DL, 0, (ObjectFunc) NULL, aAqTunnel1Hitbox, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, @@ -274,7 +297,7 @@ ObjectInfo gObjectInfo[] = { /* OBJ_ACTOR_CO_GARUDA_3 */ {(void*) Corneria_CoGaruda3_Draw, 2, (ObjectFunc) Corneria_CoGaruda3_Update, CoGarudaHitbox, 500.0f, 0, 0, 39, 1, 200.0f, 1 }, /* OBJ_ACTOR_CO_GARUDA_DESTROY */ {(void*) Corneria_CoGarudaDestroy_Draw, 2, (ObjectFunc) Corneria_CoGarudaDestroy_Update, aCoGarudaDestroyHitbox, 500.0f, 0, 0, 39, 1, 0.0f, 1 }, /* OBJ_ACTOR_ME_MOLAR_ROCK */ {(void*) MeMolarRock_Draw, 1, (ObjectFunc) MeMolarRock_Update, gNoHitbox, 1000.0f, 0, 0, 39, 0, 0.0f, 1 }, - /* OBJ_ACTOR_ME_METEOR_1 */ {(void*) aMeMeteorDL, 0, (ObjectFunc) Meteo_MeMeteor1_Update, aMeMeteor1Hitbox, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_ME_METEOR_1 */ {(void*) aMeMeteor1DL, 0, (ObjectFunc) Meteo_MeMeteor1_Update, aMeMeteor1Hitbox, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, /* OBJ_ACTOR_ME_METEOR_2 */ {(void*) MeMeteor2_Draw, 1, (ObjectFunc) Meteo_MeMeteor2_Update, aMeMeteor2Hitbox, 100.0f, 0, 1, 39, 0, 1.0f, 1 }, /* OBJ_ACTOR_ME_METEOR_SHOWER_1 */ {(void*) Meteo_MeMeteorShower1_Draw, 1, (ObjectFunc) Meteo_MeteorShower_Update, gNoHitbox, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, /* OBJ_ACTOR_ME_METEOR_SHOWER_2 */ {(void*) Meteo_MeMeteorShower2_Draw, 1, (ObjectFunc) Meteo_MeteorShower_Update, gNoHitbox, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, diff --git a/src/engine/fox_edisplay.c b/src/engine/fox_edisplay.c index 8ebda74c..ded922f6 100644 --- a/src/engine/fox_edisplay.c +++ b/src/engine/fox_edisplay.c @@ -92,9 +92,9 @@ f32 D_edisplay_800CFA2C[] = { void MeHopBot_Draw(MeHopBot* this) { Vec3f sp30[30]; - f32 temp = D_edisplay_800CF9B0[this->animFrame] - 114.0f; + f32 yTrans = D_edisplay_800CF9B0[this->animFrame] - 114.0f; - Matrix_Translate(gGfxMatrix, 0.f, -temp, 0.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.f, -yTrans, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); Animation_GetFrameData(&aMeHopBotAnim, this->animFrame, sp30); Animation_DrawSkeleton(1, aMeHopBotSkel, sp30, NULL, MeHopBot_PostLimbDraw, &this->index, &gIdentityMatrix); @@ -104,11 +104,11 @@ void MeteoTunnel_Draw(MeTunnel* this) { gSPDisplayList(gMasterDisp++, aMeMeteoTunnelDL); } -void Scenery_DrawTitaniaBones(Scenery* scenery) { - if (scenery->obj.id == OBJ_SCENERY_TI_SKULL) { +void Scenery_DrawTitaniaBones(Scenery* this) { + if (this->obj.id == OBJ_SCENERY_TI_SKULL) { gSPDisplayList(gMasterDisp++, D_TI1_7007350); } else { - Graphics_SetScaleMtx(D_edisplay_800CFA2C[scenery->obj.id - 29]); + Graphics_SetScaleMtx(D_edisplay_800CFA2C[this->obj.id - 29]); gSPDisplayList(gMasterDisp++, D_TI1_700BB10); } } @@ -282,12 +282,12 @@ void ActorDebris_Draw(ActorDebris* this) { case 39: gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - gSPDisplayList(gMasterDisp++, D_edisplay_800CFAC4[this->unk_048]); + gSPDisplayList(gMasterDisp++, D_edisplay_800CFAC4[this->work_048]); break; case 40: gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); - switch (this->unk_048) { + switch (this->work_048) { case 0: break; case 1: @@ -304,7 +304,7 @@ void ActorDebris_Draw(ActorDebris* this) { } if (gCurrentLevel != LEVEL_SOLAR) { - gSPDisplayList(gMasterDisp++, D_TI_801B769C[this->unk_046]); + gSPDisplayList(gMasterDisp++, D_TI_801B769C[this->work_046]); } else { if (gBosses[0].fwork[3] < 4800.0f) { RCP_SetupDL(&gMasterDisp, SETUPDL_30); @@ -316,28 +316,28 @@ void ActorDebris_Draw(ActorDebris* this) { gSPFogPosition(gMasterDisp++, gFogNear, gFogFar); } Graphics_SetScaleMtx(this->scale); - gSPDisplayList(gMasterDisp++, D_edisplay_800CFB40[this->unk_046]); + gSPDisplayList(gMasterDisp++, D_edisplay_800CFB40[this->work_046]); } break; case 41: Graphics_SetScaleMtx(this->scale); - gSPDisplayList(gMasterDisp++, D_edisplay_800CFADC[this->unk_048]); + gSPDisplayList(gMasterDisp++, D_edisplay_800CFADC[this->work_048]); break; case 42: Graphics_SetScaleMtx(this->scale); - gSPDisplayList(gMasterDisp++, D_edisplay_800CFB08[this->unk_048]); + gSPDisplayList(gMasterDisp++, D_edisplay_800CFB08[this->work_048]); break; case 43: Graphics_SetScaleMtx(this->scale); - gSPDisplayList(gMasterDisp++, D_edisplay_800CFB14[this->unk_048]); + gSPDisplayList(gMasterDisp++, D_edisplay_800CFB14[this->work_048]); break; case 44: Graphics_SetScaleMtx(this->scale); - gSPDisplayList(gMasterDisp++, D_edisplay_800CFB28[this->unk_048]); + gSPDisplayList(gMasterDisp++, D_edisplay_800CFB28[this->work_048]); break; case 45: @@ -345,25 +345,25 @@ void ActorDebris_Draw(ActorDebris* this) { break; case 46: - if ((this->unk_048 == 2) || (this->unk_048 == 3) || (this->unk_048 == 4)) { + if ((this->work_048 == 2) || (this->work_048 == 3) || (this->work_048 == 4)) { RCP_SetupDL(&gMasterDisp, SETUPDL_33); } gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - gSPDisplayList(gMasterDisp++, D_TI_801B7584[this->unk_048]); + gSPDisplayList(gMasterDisp++, D_TI_801B7584[this->work_048]); break; case 47: - gSPDisplayList(gMasterDisp++, D_TI_801B7608[this->unk_048]); + gSPDisplayList(gMasterDisp++, D_TI_801B7608[this->work_048]); break; case 48: Graphics_SetScaleMtx(this->scale); - gSPDisplayList(gMasterDisp++, D_edisplay_800CFB64[this->unk_048]); + gSPDisplayList(gMasterDisp++, D_edisplay_800CFB64[this->work_048]); break; case 49: Graphics_SetScaleMtx(this->scale); - gSPDisplayList(gMasterDisp++, D_edisplay_800CFB88[this->unk_048]); + gSPDisplayList(gMasterDisp++, D_edisplay_800CFB88[this->work_048]); break; case 50: @@ -401,27 +401,27 @@ void ActorDebris_Draw(ActorDebris* this) { case 51: Graphics_SetScaleMtx(this->scale); - gSPDisplayList(gMasterDisp++, D_edisplay_800CFBA8[this->unk_048]); + gSPDisplayList(gMasterDisp++, D_edisplay_800CFBA8[this->work_048]); break; case 52: Graphics_SetScaleMtx(this->scale); - gSPDisplayList(gMasterDisp++, D_edisplay_800CFBE4[this->unk_048]); + gSPDisplayList(gMasterDisp++, D_edisplay_800CFBE4[this->work_048]); break; case 53: Graphics_SetScaleMtx(this->scale); - gSPDisplayList(gMasterDisp++, D_edisplay_800CFC0C[this->unk_048]); + gSPDisplayList(gMasterDisp++, D_edisplay_800CFC0C[this->work_048]); break; case 54: Graphics_SetScaleMtx(this->scale); - gSPDisplayList(gMasterDisp++, D_edisplay_800CFC40[this->unk_048]); + gSPDisplayList(gMasterDisp++, D_edisplay_800CFC40[this->work_048]); break; case 55: Graphics_SetScaleMtx(this->scale); - gSPDisplayList(gMasterDisp++, D_edisplay_800CFC50[this->unk_048]); + gSPDisplayList(gMasterDisp++, D_edisplay_800CFC50[this->work_048]); break; case 56: @@ -429,7 +429,7 @@ void ActorDebris_Draw(ActorDebris* this) { RCP_SetupDL(&gMasterDisp, SETUPDL_41); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 191, 255, 223, 255); - gSPDisplayList(gMasterDisp++, D_edisplay_800CFC64[this->unk_048]); + gSPDisplayList(gMasterDisp++, D_edisplay_800CFC64[this->work_048]); break; case 58: @@ -441,7 +441,7 @@ void ActorDebris_Draw(ActorDebris* this) { case 59: Graphics_SetScaleMtx(this->scale); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_edisplay_800CFC7C[this->unk_048]); + gSPDisplayList(gMasterDisp++, D_edisplay_800CFC7C[this->work_048]); break; case 70: @@ -449,7 +449,7 @@ void ActorDebris_Draw(ActorDebris* this) { break; case 57: - gSPDisplayList(gMasterDisp++, D_VE1_8019A008[this->unk_048]); + gSPDisplayList(gMasterDisp++, D_VE1_8019A008[this->work_048]); break; default: @@ -467,7 +467,7 @@ void Actor_DrawEngineAndContrails(Actor* this) { f32 sp5C; f32 temp1; f32 sp54; - s32 pad[5]; // fake? seems like a lot of padding + s32 pad[5]; if ((this->iwork[11] != 0) && (this->obj.status == OBJ_ACTIVE)) { temp1 = 652.5f * 0.001f; // 0.65250003f; @@ -527,7 +527,7 @@ f32 D_edisplay_800CFCA0[] = { 1.7f, 1.8f, 2.0f, 3.0f, 3.0f, 3.0f, 3.0f, 3.0f, }; -void Actor_DrawEngineGlow(Actor* actor, s32 levelType) { +void Actor_DrawEngineGlow(Actor* actor, EngineGlowColor color) { f32 scale; if ((actor->iwork[11] != 0) && (actor->obj.status == OBJ_ACTIVE)) { @@ -545,7 +545,7 @@ void Actor_DrawEngineGlow(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); - Display_DrawEngineGlow(levelType); + Display_DrawEngineGlow(color); Matrix_Pop(&gGfxMatrix); } } @@ -609,14 +609,14 @@ void MeMolarRock_Draw(MeMolarRock* this) { } void MeMeteor2_Draw(MeMeteor2* this) { - RCP_SetupDL_29(this->unk_046, gFogGreen, gFogBlue, gFogAlpha, this->unk_048, gFogFar); + RCP_SetupDL_29(this->work_046, gFogGreen, gFogBlue, gFogAlpha, this->work_048, gFogFar); Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, aMeMeteorDL); + gSPDisplayList(gMasterDisp++, aMeMeteor1DL); } void MeLaserCannon1_Draw(MeLaserCannon1* this) { - RCP_SetupDL_29(this->unk_046, gFogGreen, gFogBlue, gFogAlpha, this->unk_048, gFogFar); + RCP_SetupDL_29(this->work_046, gFogGreen, gFogBlue, gFogAlpha, this->work_048, gFogFar); gSPDisplayList(gMasterDisp++, aMeLaserCannon1DL); } @@ -630,9 +630,9 @@ void ActorMissileSeek_Draw(Actor* missile) { case 1: if (gCurrentLevel == LEVEL_AREA_6) { - gSPDisplayList(gMasterDisp++, D_ENMY_SPACE_400B390); + gSPDisplayList(gMasterDisp++, aAttacker3DL); } else { - gSPDisplayList(gMasterDisp++, D_ENMY_PLANET_4007AF0); + gSPDisplayList(gMasterDisp++, aGrangaFighter2DL); } break; } @@ -645,7 +645,7 @@ void ActorMissileSeek_Draw(Actor* missile) { Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY); missile->iwork[11] = 1; Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY); - Actor_DrawEngineGlow(missile, 2); + Actor_DrawEngineGlow(missile, EG_GREEN); } void CoSkibot_Draw(CoSkibot* this) { @@ -689,14 +689,14 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { case OBJ_ACTOR_TEAM_BOSS: case OBJ_ACTOR_EVENT: switch (gActors[index].eventType) { - case EVID_3: + case EVID_SPY_EYE: Matrix_Scale(gGfxMatrix, 2.3f, 0.0f, 2.3f, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_102A010); break; - case EVID_81: + case EVID_VE1_BLOCKER: RCP_SetupDL(&gMasterDisp, SETUPDL_48); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 255); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 255); @@ -715,7 +715,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 30.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); - gSPDisplayList(gMasterDisp++, D_1032780); + gSPDisplayList(gMasterDisp++, aArwingShadowDL); break; } break; @@ -1084,7 +1084,7 @@ void Actor_DrawOnRails(Actor* this) { this->obj.pos.y += gCameraShakeY; func_edisplay_8005D008(&this->obj, this->info.drawType); this->obj.pos.y -= gCameraShakeY; - } else if ((this->obj.id == OBJ_ACTOR_EVENT) && (this->eventType != EVID_31)) { + } else if ((this->obj.id == OBJ_ACTOR_EVENT) && (this->eventType != EVID_A6_UMBRA_STATION)) { func_edisplay_8005D3CC(&this->obj, this->vwork[29].x, this->vwork[29].y, this->vwork[29].z + this->rot_0F4.z, this->info.drawType); } else { @@ -1383,37 +1383,37 @@ void Item_Draw(Item* this, s32 arg1) { } } -void ActorAllRange_DrawShadow(Actor* actor) { - Matrix_Translate(gGfxMatrix, actor->obj.pos.x, actor->fwork[25] + 3.0f, actor->obj.pos.z, MTXF_APPLY); +void ActorAllRange_DrawShadow(ActorAllRange* this) { + Matrix_Translate(gGfxMatrix, this->obj.pos.x, this->fwork[25] + 3.0f, this->obj.pos.z, MTXF_APPLY); if (gCurrentLevel == LEVEL_FORTUNA) { - Matrix_RotateY(gGfxMatrix, actor->fwork[27], MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, actor->fwork[26], MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, actor->fwork[28], MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, -actor->fwork[27], MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, this->fwork[27], MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, this->fwork[26], MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, this->fwork[28], MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, -this->fwork[27], MTXF_APPLY); } Matrix_Scale(gGfxMatrix, 1.4f, 0.0f, 1.4f, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, (actor->obj.rot.y + 180.0f) * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, actor->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, (this->obj.rot.y + 180.0f) * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - if (actor->aiType <= AI360_PEPPY) { + if (this->aiType <= AI360_PEPPY) { Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 30.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1032780); + gSPDisplayList(gMasterDisp++, aArwingShadowDL); } else if (gCurrentLevel == LEVEL_KATINA) { - if ((actor->animFrame == 1) || (actor->animFrame == 2)) { - gSPDisplayList(gMasterDisp++, D_KA_600D730); + if ((this->animFrame == 1) || (this->animFrame == 2)) { + gSPDisplayList(gMasterDisp++, aKaCornerianFighterShadowDL); } else { - gSPDisplayList(gMasterDisp++, D_KA_600DBC0); + gSPDisplayList(gMasterDisp++, aKaEnemyShadowDL); } - } else if ((actor->aiType <= AI360_ANDREW) || (gCurrentLevel != LEVEL_FORTUNA)) { - gSPDisplayList(gMasterDisp++, D_STAR_WOLF_F014310); + } else if ((this->aiType <= AI360_ANDREW) || (gCurrentLevel != LEVEL_FORTUNA)) { + gSPDisplayList(gMasterDisp++, aStarWolfShadowDL); } else if (gCurrentLevel == LEVEL_FORTUNA) { - gSPDisplayList(gMasterDisp++, D_FO_6009F90); + gSPDisplayList(gMasterDisp++, aFoEnemyShadowDL); } else { - gSPDisplayList(gMasterDisp++, D_STAR_WOLF_F014310); + gSPDisplayList(gMasterDisp++, aStarWolfShadowDL); } } @@ -1810,7 +1810,7 @@ void Object_DrawAll(s32 arg0) { Lights_SetOneLight(&gMasterDisp, -60, -60, 60, 150, 150, 150, 20, 20, 20); - for (i = 0, item = gItems; i < ARRAY_COUNT(gItems); i++, item++) { + for (i = 0, item = &gItems[0]; i < ARRAY_COUNT(gItems); i++, item++) { if (item->obj.status >= OBJ_ACTIVE) { Matrix_Push(&gGfxMatrix); RCP_SetupDL(&gMasterDisp, SETUPDL_29); @@ -1831,7 +1831,7 @@ void Effect_DrawAll(s32 arg0) { RCP_SetupDL(&gMasterDisp, SETUPDL_64); - for (i = 0, effect = gEffects; i < ARRAY_COUNT(gEffects); i++, effect++) { + for (i = 0, effect = &gEffects[0]; i < ARRAY_COUNT(gEffects); i++, effect++) { if (effect->obj.status >= OBJ_ACTIVE) { if (effect->info.unk_14 == 1) { effect->obj.rot.y = RAD_TO_DEG(-gPlayer[gPlayerNum].camYaw); @@ -1856,7 +1856,7 @@ void Effect_DrawAll(s32 arg0) { } } - for (i = 0, boss = gBosses; i < ARRAY_COUNT(gBosses); i++, boss++) { + for (i = 0, boss = &gBosses[0]; i < ARRAY_COUNT(gBosses); i++, boss++) { if ((boss->obj.status >= OBJ_ACTIVE) && (boss->obj.id == OBJ_BOSS_BO_BASE_SHIELD)) { if ((boss->timer_05C % 2) == 0) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); diff --git a/src/engine/fox_effect.c b/src/engine/fox_effect.c index 80db07cb..474cf117 100644 --- a/src/engine/fox_effect.c +++ b/src/engine/fox_effect.c @@ -3915,7 +3915,7 @@ void Effect_Effect395_Draw(Effect395* this) { case 3: RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); - gSPDisplayList(gMasterDisp++, D_A6_601A120); + gSPDisplayList(gMasterDisp++, aA6SpaceMineDL); break; case 4: diff --git a/src/engine/fox_enmy.c b/src/engine/fox_enmy.c index 6d9d1f9e..345b04d9 100644 --- a/src/engine/fox_enmy.c +++ b/src/engine/fox_enmy.c @@ -1179,8 +1179,8 @@ void Object_Init(s32 index, ObjectId objId) { break; case OBJ_ACTOR_ME_METEOR_2: case OBJ_ACTOR_ME_LASER_CANNON_1: - gActors[index].unk_046 = gFogRed; - gActors[index].unk_048 = gFogNear; + gActors[index].work_046 = gFogRed; + gActors[index].work_048 = gFogNear; gActors[index].obj.rot.x = RAND_FLOAT(360.0f); gActors[index].obj.rot.y = RAND_FLOAT(360.0f); break; @@ -1218,11 +1218,11 @@ void Object_Init(s32 index, ObjectId objId) { } break; case OBJ_ACTOR_ME_MORA: - gActors[index].unk_046 = 100; + gActors[index].work_046 = 100; for (i = 0; i < 2; i++) { if (gMeMoraStatus[i] == 0) { gMeMoraStatus[i] = 1; - gActors[index].unk_046 = i; + gActors[index].work_046 = i; for (j = 0; j < 100; j++) { gMeMoraYpos[i][j] = gActors[index].obj.pos.y; gMeMoraZpos[i][j] = gActors[index].obj.pos.z; @@ -1230,7 +1230,7 @@ void Object_Init(s32 index, ObjectId objId) { break; } } - if (gActors[index].unk_046 == 100) { + if (gActors[index].work_046 == 100) { gActors[index].obj.status = OBJ_FREE; } break; @@ -1425,8 +1425,8 @@ void func_enmy_80065380(MeMeteor2* this, f32 xPos, f32 yPos, f32 zPos, f32 arg4, this->obj.pos.x = xPos; this->obj.pos.y = yPos; this->obj.pos.z = zPos; - this->unk_046 = 255; - this->unk_048 = 900; + this->work_046 = 255; + this->work_048 = 900; this->obj.rot.z = RAND_FLOAT(360.0f); this->obj.rot.y = RAND_FLOAT(360.0f); Object_SetInfo(&this->info, this->obj.id); @@ -2658,7 +2658,7 @@ void Actor_Move(Actor* this) { var_fv0 = 4000.0f; if ((this->obj.id == OBJ_ACTOR_ZO_DODORA) || (gCurrentLevel == LEVEL_MACBETH) || - ((this->obj.id == OBJ_ACTOR_EVENT) && (this->eventType == EVID_56))) { + ((this->obj.id == OBJ_ACTOR_EVENT) && (this->eventType == EVID_TI_GREAT_FOX))) { var_fv0 = 8000.0f; } else if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ENTER_WARP_ZONE) { var_fv0 = 100000.0f; @@ -2680,13 +2680,13 @@ void Actor_Move(Actor* this) { break; case OBJ_ACTOR_ME_MORA: - gMeMoraStatus[this->unk_046] = 0; + gMeMoraStatus[this->work_046] = 0; break; case OBJ_ACTOR_EVENT: if ((this->eventType >= EVID_200) && (this->eventType < EVID_300)) { - gMeMoraStatus[this->unk_046] = 0; - } else if ((this->eventType == EVID_SX_WARP_GATE) && (this->unk_046 != 2)) { + gMeMoraStatus[this->work_046] = 0; + } else if ((this->eventType == EVID_SX_WARP_GATE) && (this->work_046 != 2)) { gRingPassCount = -1; } break; diff --git a/src/engine/fox_enmy2.c b/src/engine/fox_enmy2.c index b3548bb5..0a935802 100644 --- a/src/engine/fox_enmy2.c +++ b/src/engine/fox_enmy2.c @@ -77,7 +77,7 @@ void Actor237_Draw(Actor237* this) { /* Unimplemented */ } -void Obj54_8006A984(Effect* this, f32 xPos, f32 yPos, f32 zPos) { +void Obj54_8006A984(Effect365* this, f32 xPos, f32 yPos, f32 zPos) { Effect_Initialize(this); this->obj.status = OBJ_INIT; this->obj.id = OBJ_EFFECT_365; @@ -256,12 +256,12 @@ void MeMora_Dying(MeMora* this) { this->counter_04E = 0; } - gMeMoraXpos[this->unk_046][this->counter_04E] = this->obj.pos.x; - gMeMoraYpos[this->unk_046][this->counter_04E] = this->obj.pos.y; - gMeMoraZpos[this->unk_046][this->counter_04E] = this->obj.pos.z; - gMeMoraXrot[this->unk_046][this->counter_04E] = this->obj.rot.x; - gMeMoraYrot[this->unk_046][this->counter_04E] = this->obj.rot.y; - gMeMoraZrot[this->unk_046][this->counter_04E] = this->obj.rot.z; + gMeMoraXpos[this->work_046][this->counter_04E] = this->obj.pos.x; + gMeMoraYpos[this->work_046][this->counter_04E] = this->obj.pos.y; + gMeMoraZpos[this->work_046][this->counter_04E] = this->obj.pos.z; + gMeMoraXrot[this->work_046][this->counter_04E] = this->obj.rot.x; + gMeMoraYrot[this->work_046][this->counter_04E] = this->obj.rot.y; + gMeMoraZrot[this->work_046][this->counter_04E] = this->obj.rot.z; this->obj.rot.x -= 10.0f; this->obj.rot.y += 3.0f; @@ -274,21 +274,21 @@ void MeMora_Dying(MeMora* this) { this->vel.z = sp34.z; if ((this->timer_0BC == 0) && ((gGameFrameCount % 4) == 0)) { - index = (D_800CFF94[this->unk_04A] + this->counter_04E) % 100; - if (this->unk_04A == 0) { - func_effect_8007D2C8(gMeMoraXpos[this->unk_046][index], gMeMoraYpos[this->unk_046][index], - gMeMoraZpos[this->unk_046][index], 7.0f); + index = (D_800CFF94[this->work_04A] + this->counter_04E) % 100; + if (this->work_04A == 0) { + func_effect_8007D2C8(gMeMoraXpos[this->work_046][index], gMeMoraYpos[this->work_046][index], + gMeMoraZpos[this->work_046][index], 7.0f); } else { - func_effect_8007D2C8(gMeMoraXpos[this->unk_046][index], gMeMoraYpos[this->unk_046][index], - gMeMoraZpos[this->unk_046][index], 4.0f); + func_effect_8007D2C8(gMeMoraXpos[this->work_046][index], gMeMoraYpos[this->work_046][index], + gMeMoraZpos[this->work_046][index], 4.0f); } AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, this->sfxSource, 4); - this->unk_04A++; + this->work_04A++; - if (this->unk_04A > 15) { + if (this->work_04A > 15) { Object_Kill(&this->obj, this->sfxSource); - gMeMoraStatus[this->unk_046] = 0; + gMeMoraStatus[this->work_046] = 0; gHitCount += this->info.bonus; D_ctx_80177850 = 15; } @@ -338,11 +338,11 @@ void MeMora_Draw(MeMora* this) { s16 i; s16 j; - for (i = this->unk_04A; i < ARRAY_COUNT(D_800CFF94); i++) { + for (i = this->work_04A; i < ARRAY_COUNT(D_800CFF94); i++) { j = (D_800CFF94[i] + this->counter_04E) % 100; - Memora_DrawParts(this, gMeMoraXpos[this->unk_046][j], gMeMoraYpos[this->unk_046][j], - gMeMoraZpos[this->unk_046][j], gMeMoraXrot[this->unk_046][j], gMeMoraYrot[this->unk_046][j], - gMeMoraZrot[this->unk_046][j], gMeMoraPartIdx[i], gMeMoraScale[i], this->timer_0C6 % 2U); + Memora_DrawParts(this, gMeMoraXpos[this->work_046][j], gMeMoraYpos[this->work_046][j], + gMeMoraZpos[this->work_046][j], gMeMoraXrot[this->work_046][j], gMeMoraYrot[this->work_046][j], + gMeMoraZrot[this->work_046][j], gMeMoraPartIdx[i], gMeMoraScale[i], this->timer_0C6 % 2U); } } @@ -409,18 +409,18 @@ void CoMoleMissile_Update(CoMoleMissile* this) { break; case 1: - switch (this->unk_046) { + switch (this->work_046) { case 0: this->fwork[0] += 2.0f; if (this->fwork[0] > 10.0f) { - this->unk_046 = 1; + this->work_046 = 1; } break; case 1: this->fwork[0] -= 2.0f; if (this->fwork[0] < -10.0f) { - this->unk_046 = 0; + this->work_046 = 0; } break; } @@ -548,7 +548,7 @@ void ActorDebris_Update(ActorDebris* this) { switch (this->state) { case 40: - if (this->unk_04A & 4) { + if (this->work_04A & 4) { this->obj.pos.x = gPlayer[0].pos.x + this->fwork[3]; this->obj.pos.z = gPlayer[0].trueZpos + this->fwork[4]; } @@ -557,7 +557,7 @@ void ActorDebris_Update(ActorDebris* this) { this->obj.rot.y += this->fwork[1]; this->obj.rot.z += this->fwork[2]; - if (((this->unk_04A % 2U) == 1) && ((this->timer_0BC & 3) == 0)) { + if (((this->work_04A % 2U) == 1) && ((this->timer_0BC & 3) == 0)) { func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->scale); } @@ -571,8 +571,8 @@ void ActorDebris_Update(ActorDebris* this) { this->vel.z = 0.0f; this->gravity = 0.0f; } else { - if (this->unk_04A & 4) { - switch (this->unk_046) { + if (this->work_04A & 4) { + switch (this->work_046) { case 2: AUDIO_PLAY_SFX(NA_SE_OB_SAND_BOUND_S, this->sfxSource, 4); break; @@ -588,14 +588,14 @@ void ActorDebris_Update(ActorDebris* this) { this->obj.pos.y = 0.0f; this->iwork[0]++; if (this->vel.y < 0.0f) { - if (this->unk_04A & 2) { + if (this->work_04A & 2) { this->vel.y = this->vel.y * -0.05f; } else { this->vel.y = this->vel.y * -0.3f; } } } - this->unk_04A &= ~4; + this->work_04A &= ~4; } break; @@ -653,7 +653,7 @@ void ActorDebris_Update(ActorDebris* this) { } if (this->iwork[2] == 1) { - if ((this->iwork[1] == 1) && ((this->unk_048 == 8) || (this->unk_048 == 9))) { + if ((this->iwork[1] == 1) && ((this->work_048 == 8) || (this->work_048 == 9))) { func_effect_8007D2C8(this->obj.pos.x, sp48 + 20.0f, this->obj.pos.z, 8.0f); } Object_Kill(&this->obj, this->sfxSource); @@ -687,8 +687,8 @@ void ActorDebris_Update(ActorDebris* this) { break; case 58: - if (this->unk_046 == 0) { - this->unk_046++; + if (this->work_046 == 0) { + this->work_046++; this->fwork[0] = RAND_FLOAT_CENTERED(30.0f); this->fwork[1] = RAND_FLOAT_CENTERED(30.0f); this->fwork[2] = RAND_FLOAT_CENTERED(30.0f); @@ -762,8 +762,8 @@ void ActorDebris_Update(ActorDebris* this) { break; default: - if (this->unk_046 == 0) { - this->unk_046++; + if (this->work_046 == 0) { + this->work_046++; this->fwork[10] = RAND_FLOAT_CENTERED(30.0f); this->fwork[11] = RAND_FLOAT_CENTERED(30.0f); this->fwork[12] = RAND_FLOAT_CENTERED(30.0f); @@ -943,118 +943,121 @@ typedef struct { /* 0x1C */ u8 bonus; } EventActorInfo; // size = 0x20 +// clang-format off + static EventActorInfo sEventActorInfo[108] = { - /* 0 */ { D_ENMY_PLANET_40068F0, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, - /* 1 */ { D_ENMY_PLANET_4006E90, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, - /* 2 */ { NULL, gCubeHitbox100, 1.0f, 20000.0f, 3000.0f, 1, 0, EISFX_ARWING_ENGINE_FG, 0, 0.0f, 0 }, - /* 3 */ { D_ENMY_PLANET_4009800, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 1.0f, 1 }, - /* 4 */ { D_ENMY_PLANET_40073C0, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, - /* 5 */ { D_ENMY_PLANET_4007AF0, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, - /* 6 */ { NULL, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 1.0f, 1 }, - /* 7 */ { D_CO_6011F90, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, - /* 8 */ { D_ENMY_PLANET_4000710, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 2, 0, EISFX_EN_ENGINE_01, 1, 1.0f, 1 }, - /* 9 */ { NULL, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ALIEN_FLY, 0, 1.0f, 1 }, - /* 10 */ { D_ENMY_SPACE_400BD20, gCubeHitbox200, 2.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, - /* 11 */ { D_ENMY_SPACE_4001310, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ALIEN_FLY, 0, 1.0f, 1 }, - /* 12 */ { D_ENMY_SPACE_400B390, gCubeHitbox100, 2.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, - /* 13 */ { aMeMeteorDL, gCubeHitbox100, 2.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, - /* 14 */ { D_ME_601F2A0, gCubeHitbox400, 7.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, - /* 15 */ { D_ENMY_SPACE_400AAE0, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, - /* 16 */ { D_ENMY_SPACE_4000650, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ALIEN_FLY, 0, 1.0f, 1 }, - /* 17 */ { D_A6_6016190, D_A6_60282A0, -2.0f, 2100.0f, 3000.0f, 0, 0, EISFX_EN_SPACE_SHIP, 0, 0.0f, 5 }, - /* 18 */ { D_SX_6023500, gCubeHitbox200, 2.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, - /* 19 */ { D_SX_6022DF0, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, - /* 20 */ { NULL, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 2, 1, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, - /* 21 */ { NULL, gCubeHitbox200, 2.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, - /* 22 */ { NULL, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, - /* 23 */ { D_ENMY_SPACE_4008FA0, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, - /* 24 */ { D_SX_60285F0, D_SX_603298C, -1.0f, 2100.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 25 */ { D_SX_600AF70, D_SX_6032904, -1.0f, 2100.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 26 */ { D_SX_6023E30, D_SX_6032970, -1.0f, 2100.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 27 */ { NULL, D_SX_603285C, 2.5f, 100.0f, 3000.0f, 2, 0, EISFX_NONE, 0, 1.0f, 1 }, - /* 28 */ { D_SX_6001CE0, D_SX_6032938, 3.0f, 100.0f, 3000.0f, 2, 0, EISFX_NONE, 0, 1.0f, 1 }, - /* 29 */ { D_SX_6000840, D_SX_6032954, 1.0f, 100.0f, 3000.0f, 2, 1, EISFX_NONE, 0, 1.0f, 1 }, - /* 30 */ { D_A6_6012A40, D_A6_6028254, -2.0f, 2100.0f, 3001.0f, 0, 0, EISFX_EN_SPACE_SHIP, 0, 0.0f, 2 }, - /* 31 */ { NULL, D_A6_60280E0, -2.0f, 2100.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 3 }, - /* 32 */ { D_SX_6009950, D_SX_6032878, -1.0f, 2100.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 33 */ { NULL, gCubeHitbox200, 2.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 34 */ { D_SX_600B2B0, D_SX_6032894, -1.0f, 2100.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 35 */ { D_SX_600A2E0, D_SX_60328B0, -1.0f, 2100.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 36 */ { NULL, gCubeHitbox400, 2.0f, 200.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, - /* 37 */ { D_SX_600B830, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, - /* 38 */ { NULL, D_SX_603238C, 1.0f, 500.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 39 */ { D_SX_6020D20, D_SX_60328CC, -1.0f, 2100.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 40 */ { NULL, gNoHitbox, 1.0f, 100.0f, 3001.0f, 2, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 41 */ { aSyShip1DL, aSyShip1Hitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 42 */ { aSyShip2DL, aSyShip2Hitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 43 */ { NULL, gCubeHitbox100, 1.0f, 20000.0f, 3000.0f, 1, 0, EISFX_ARWING_ENGINE_FG, 0, 0.0f, 0 }, - /* 44 */ { aSyShip3DL, aSyShip3Hitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 45 */ { D_ME_6017B60, gCubeHitbox200, -1.0f, 300.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 1.0f, 1 }, - /* 46 */ { D_ZO_6004D00, gCubeHitbox200, 1.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_SHIP_ENGINE_S, 0, 1.0f, 1 }, - /* 47 */ { D_ME_601A880, gCubeHitbox100, -1.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 48 */ { NULL, aSyRobotHitbox, 0.3f, 100.0f, 3000.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, - /* 49 */ { NULL, aSyRobotHitbox, 0.3f, 100.0f, 3000.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, - /* 50 */ { NULL, aSyRobotHitbox, 0.3f, 100.0f, 3000.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, - /* 51 */ { D_SY_6015D60, D_SY_6034124, 2.0f, 100.0f, 3000.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, - /* 52 */ { NULL, D_ZO_602C1A0, -1.0f, 1000.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 53 */ { D_SX_600B540, D_SX_60328E8, -1.0f, 2100.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 54 */ { D_ENMY_SPACE_4000EC0, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, - /* 55 */ { D_ENMY_SPACE_4008D50, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, - /* 56 */ { NULL, gNoHitbox, -1.0f, 2000.0f, 3000.0f, 0, 0, EISFX_GREATFOX_ENGINE, 0, 0.0f, 1 }, - /* 57 */ { aSyShip3DL, gNoHitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 58 */ { D_SY_601F3D0, gNoHitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 59 */ { D_SY_6022B10, gNoHitbox, 2.0f, 100.0f, 3000.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, - /* 60 */ { D_SY_60209F0, gNoHitbox, 2.0f, 100.0f, 3000.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, - /* 61 */ { D_ME_6019430, gCubeHitbox200, 2.5f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 1.0f, 1 }, - /* 62 */ { D_ME_6018960, gCubeHitbox100, 2.5f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 1.0f, 1 }, - /* 63 */ { D_ME_6009F50, gNoHitbox, -1.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 64 */ { NULL, gCubeHitbox200, 3.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 1.0f, 1 }, - /* 65 */ { D_ME_600C2A0, gCubeHitbox200, -1.0f, 100.0f, 8000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 66 */ { D_ME_600BD40, gCubeHitbox100, -1.0f, 100.0f, 8000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 67 */ { NULL, D_ME_602F604, 3.0f, 100.0f, 3000.0f, 2, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, - /* 68 */ { D_SY_60205D0, D_SY_603445C, 3.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 1.0f, 1 }, - /* 69 */ { aSyShip3DestroyedDL, aSyShip3DestroyedHitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 70 */ { D_SY_601AD70, gNoHitbox, 4.0f, 100.0f, 3000.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, - /* 71 */ { aArwingItemLasersDL, gNoHitbox, 1.0f, 100.0f, 3000.0f, 2, 0, EISFX_OB_WING, 0, 0.0f, 1 }, - /* 72 */ { aSyShipWindowsDL, aSyShipWindowsHitbox, 3.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 73 */ { aSyShip4DL, aSyShip4Hitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 74 */ { aSyShip4DestroyedDL, aSyShip4DestroyedHitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 75 */ { aSyShip2SpriteDL, gNoHitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, - /* 76 */ { aSyShip3SpriteDL, gNoHitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, - /* 77 */ - { aSyShipProjectileDL, aSyShipProjectileHitbox, 3.0f, 100.0f, 3001.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, - /* 78 */ { NULL, gCubeHitbox150, 1.0f, 100.0f, 3000.0f, 2, 0, EISFX_NONE, 0, 1.0f, 0 }, - /* 79 */ { NULL, aZoBirdHitbox, 1.0f, 100.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 1.0f, 1 }, - /* 80 */ { NULL, D_VE1_601B474, -1.0f, 100.0f, 3000.0f, 2, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 81 */ { NULL, gNoHitbox, -1.0f, 100.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 82 */ { NULL, gCubeHitbox100, 2.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, - /* 83 */ { NULL, D_AQ_6030B4C, 1.0f, 100.0f, 3000.0f, 2, 0, EISFX_NONE, 0, 60.0f, 1 }, - /* 84 */ { D_VE1_9012180, D_VE1_601B43C, -1.0f, 100.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 85 */ { NULL, gCubeHitbox100, 1.0f, 20000.0f, 3000.0f, 1, 0, EISFX_ARWING_ENGINE_FG, 0, 0.0f, 0 }, - /* 86 */ { NULL, gCubeHitbox100, 1.0f, 20000.0f, 3000.0f, 1, 0, EISFX_ARWING_ENGINE_FG, 0, 0.0f, 0 }, - /* 87 */ { D_VE1_900EFC0, gNoHitbox, 1.0f, 100.0f, 3000.0f, 1, 1, EISFX_NONE, 0, 0.0f, 1 }, - /* 88 */ { NULL, D_AQ_6030B30, 1.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 1.0f, 1 }, - /* 89 */ { NULL, D_AQ_6030B14_f32, 1.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 1.0f, 1 }, - /* 90 */ { D_MA_601C520, D_MA_60368FC, 1.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 91 */ { aMaGuillotineDL, aMaGuillotineHitbox, -1.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 92 */ { D_WZ_7000C40, gWarpZoneEvent92Hitbox, -1.0f, 2100.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 93 */ { D_WZ_70010E0, gWarpZoneEvent93Hitbox, -1.0f, 2100.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 94 */ { D_WZ_7000E80, gWarpZoneEvent94Hitbox, 2.5f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 1.0f, 1 }, - /* 95 */ { D_WZ_70008F0, gCubeHitbox100, -1.0f, 100.0f, 8000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 0 }, - /* 96 */ { D_WZ_7000280, gWarpZoneEvent96Hitbox, -1.0f, 1000.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 0 }, - /* 97 */ { D_ME_600AC70, gCubeHitbox100, -1.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 98 */ { aMaBoulderDL, aMaBoulderHitbox, 1.0f, 100.0f, 3000.0f, 1, 1, EISFX_NONE, 0, 0.0f, 1 }, - /* 99 */ { D_VE1_6002500, D_VE1_601B944, -1.0f, 100.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 100 */ { D_VE1_60043F0, gNoHitbox, -1.0f, 100.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 101 */ { D_VE1_6004310, gNoHitbox, -1.0f, 100.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 102 */ { D_TR_6002740, D_TR_6009D18, -1.0f, 100.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, - /* 103 */ { NULL, gNoHitbox, -1.0f, 500.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 0.0f, 0 }, - /* 104 */ { NULL, gNoHitbox, -1.0f, 500.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 0.0f, 0 }, - /* 105 */ { NULL, gCubeHitbox200, 1.0f, 100.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 1.0f, 1 }, - /* 106 */ { NULL, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 0, 0, EISFX_EN_ALIEN_FLY, 0, 0.0f, 0 }, - /* 107 */ { D_MA_6002890, aMaGuillotineHitbox, -1.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* EVID_VENOM_FIGHTER_1 */ { aVenomFighter1DL, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* EVID_VENOM_FIGHTER_2 */ { aVenomFighter2DL, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* EVID_VENOM_FIGHTER_2 */ { NULL, gCubeHitbox100, 1.0f, 20000.0f, 3000.0f, 1, 0, EISFX_ARWING_ENGINE_FG, 0, 0.0f, 0 }, + /* EVID_ME_SLIPPY */ { aSpyEyeDL, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 1.0f, 1 }, + /* EVID_SPY_EYE */ { aGrangaFighter1DL, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* EVID_GRANGA_FIGHTER_2 */ { aGrangaFighter2DL, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* EVID_FIREBIRD */ { NULL, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 1.0f, 1 }, + /* EVID_CORNERIAN_FIGHTER */ { aCoCornerianFighterDL, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, + /* EVID_VENOM_TANK */ { aVenomTankDL, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 2, 0, EISFX_EN_ENGINE_01, 1, 1.0f, 1 }, + /* EVID_TRIPOD */ { NULL, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ALIEN_FLY, 0, 1.0f, 1 }, + /* EVID_ATTACKER_1 */ { aAttacker1DL, gCubeHitbox200, 2.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* EVID_ATTACKER_2 */ { aAttacker2DL, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ALIEN_FLY, 0, 1.0f, 1 }, + /* EVID_ATTACKER_3 */ { aAttacker3DL, gCubeHitbox100, 2.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* EVID_ME_METEOR_1 */ { aMeMeteor1DL, gCubeHitbox100, 2.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* EVID_ME_METEOR_2 */ { aMeMeteor2DL, gCubeHitbox400, 7.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* EVID_COMMANDER */ { aCommanderDL, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* EVID_SPIDER */ { aSpiderDL, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ALIEN_FLY, 0, 1.0f, 1 }, + /* EVID_ZERAM_CLASS_CRUISER */ { aA6ZeramClassCruiserDL, aA6ZeramClassCruiserHitbox, -2.0f, 2100.0f, 3000.0f, 0, 0, EISFX_EN_SPACE_SHIP, 0, 0.0f, 5 }, + /* EVID_SX_SPY_EYE */ { aSxSpyEyeDL, gCubeHitbox200, 2.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* EVID_SX_CANINE */ { aSxCanineDL, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* EVID_SPACE_MINE */ { NULL, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 2, 1, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, + /* EVID_A6_NINJIN_MISSILE */ { NULL, gCubeHitbox200, 2.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, + /* EVID_A6_ROCKET */ { NULL, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, + /* EVID_VENOM_FIGHTER_3 */ { aVenomFighter3DL, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* EVID_SX_BASE_DEBRIS_1 */ { aSxBaseDebris1DL, aSxBaseDebris1Hitbox, -1.0f, 2100.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* EVID_SX_BASE_WALL_1 */ { aSxBaseWall1DL, aSxBaseWall1Hitbox, -1.0f, 2100.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* EVID_SX_BASE_DEBRIS_2 */ { aSxBaseDebris2DL, aSxBaseDebris2Hitbox, -1.0f, 2100.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* EVID_SX_LASER */ { NULL, aSxLaserHitbox, 2.5f, 100.0f, 3000.0f, 2, 0, EISFX_NONE, 0, 1.0f, 1 }, + /* EVID_SX_WATCH_POST */ { aSxWatchPostDL, aSxWatchPostHitbox, 3.0f, 100.0f, 3000.0f, 2, 0, EISFX_NONE, 0, 1.0f, 1 }, + /* EVID_SX_SPACE_MINE */ { aSxSpaceMineDL, aSxSpaceMineHitbox, 1.0f, 100.0f, 3000.0f, 2, 1, EISFX_NONE, 0, 1.0f, 1 }, + /* EVID_A6_HARLOCK_FRIGATE */ { aA6HarlockFrigateDL, aA6HarlockFrigateHitbox, -2.0f, 2100.0f, 3001.0f, 0, 0, EISFX_EN_SPACE_SHIP, 0, 0.0f, 2 }, + /* EVID_A6_UMBRA_STATION */ { NULL, aA6UmbraStationHitbox, -2.0f, 2100.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 3 }, + /* EVID_SX_BASE_FLOOR_1 */ { aSxBaseFloor1DL, aSxBaseFloor1Hitbox, -1.0f, 2100.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* EVID_CRUISER_GUN */ { NULL, gCubeHitbox200, 2.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* EVID_SX_BASE_WALL_2 */ { aSxBaseWall2DL, aSxBaseWall2Hitbox, -1.0f, 2100.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* EVID_SX_BASE_WALL_3 */ { aSxBaseWall3DL, aSxBaseWall3Hitbox, -1.0f, 2100.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* EVID_TI_BOMBER */ { NULL, gCubeHitbox400, 2.0f, 200.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* EVID_SX_BORZOI_FIGHTER */ { aSxBorzoiFighterDL, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* EVID_SX_WARP_GATE */ { NULL, aSxWarpGateHitbox, 1.0f, 500.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* EVID_SX_BASE_WALL_TILE_1 */ { aSxBaseWallTile1DL, aSxBaseWallTile1Hitbox, -1.0f, 2100.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* EVID_EVENT_HANDLER */ { NULL, gNoHitbox, 1.0f, 100.0f, 3001.0f, 2, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* EVID_SY_SHIP_1 */ { aSyShip1DL, aSyShip1Hitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* EVID_SY_SHIP_2 */ { aSyShip2DL, aSyShip2Hitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* EVID_TEAMMATE */ { NULL, gCubeHitbox100, 1.0f, 20000.0f, 3000.0f, 1, 0, EISFX_ARWING_ENGINE_FG, 0, 0.0f, 0 }, + /* EVID_SY_SHIP_3 */ { aSyShip3DL, aSyShip3Hitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* EVID_ME_METEOR_3 */ { aMeMeteor3DL, gCubeHitbox200, -1.0f, 300.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 1.0f, 1 }, + /* EVID_ZO_PATROL_BOAT */ { aZoPatrolBoatDL, gCubeHitbox200, 1.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_SHIP_ENGINE_S, 0, 1.0f, 1 }, + /* EVID_ME_SECRET_MARKER_1 */ { aMeSecretMarker1DL, gCubeHitbox100, -1.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* EVID_SY_ROBOT_1 */ { NULL, aSyRobotHitbox, 0.3f, 100.0f, 3000.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* EVID_SY_ROBOT_2 */ { NULL, aSyRobotHitbox, 0.3f, 100.0f, 3000.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* EVID_SY_ROBOT_3 */ { NULL, aSyRobotHitbox, 0.3f, 100.0f, 3000.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* EVID_SY_ROBOT_4 */ { aSyRobot4DL, aSyRobot4Hitbox, 2.0f, 100.0f, 3000.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* EVID_SARUMARINE_PERISCOPE */ { NULL, aZoSarumarinePeriscopeHitbox, -1.0f, 1000.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* EVID_SX_BASE_WALL_4 */ { aSxBaseWall4DL, aSxBaseWall4Hitbox, -1.0f, 2100.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* EVID_GAMMA_ON */ { aGammaOnDL, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* EVID_GAMMA_OFF */ { aGammaOffDL, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* EVID_TI_GREAT_FOX */ { NULL, gNoHitbox, -1.0f, 2000.0f, 3000.0f, 0, 0, EISFX_GREATFOX_ENGINE, 0, 0.0f, 1 }, + /* EVID_SY_SHIP_3_2 */ { aSyShip3DL, gNoHitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* EVID_SY_SARUZIN */ { aSySaruzinDL, gNoHitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* EVID_SY_ROBOT_SPRITE_SIDE */ { aSyRobotSpriteSideDL, gNoHitbox, 2.0f, 100.0f, 3000.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, + /* EVID_SY_ROBOT_SPRITE_FRONT */ { aSyRobotSpriteFrontDL, gNoHitbox, 2.0f, 100.0f, 3000.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, + /* EVID_ME_METEOR_4 */ { aMeMeteor4DL, gCubeHitbox200, 2.5f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 1.0f, 1 }, + /* EVID_ME_METEOR_5 */ { aMeMeteor5DL, gCubeHitbox100, 2.5f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 1.0f, 1 }, + /* EVID_ME_BIG_METEOR */ { aMeBigMeteorDL, gNoHitbox, -1.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* EVID_ME_ROCK_GULL */ { NULL, gCubeHitbox200, 3.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 1.0f, 1 }, + /* EVID_ME_METEOR_6 */ { aMeMeteor6DL, gCubeHitbox200, -1.0f, 100.0f, 8000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* EVID_ME_SECRET_MARKER_2 */ { aMeSecretMarker2DL, gCubeHitbox100, -1.0f, 100.0f, 8000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* EVID_ME_FLIP_BOT */ { NULL, aMeFlipBotHitbox, 3.0f, 100.0f, 3000.0f, 2, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* EVID_SY_LASER_TURRET */ { aSyLaserTurretDL, aSyLaserTurretHitbox, 3.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 1.0f, 1 }, + /* EVID_SY_SHIP_DESTROYED */ { aSyShip3DestroyedDL, aSyShip3DestroyedHitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* EVID_SY_DEBRIS */ { aSyDebrisDL, gNoHitbox, 4.0f, 100.0f, 3000.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, + /* EVID_ITEM_WING_REPAIR */ { aArwingItemLasersDL, gNoHitbox, 1.0f, 100.0f, 3000.0f, 2, 0, EISFX_OB_WING, 0, 0.0f, 1 }, + /* EVID_SY_SHIP_WINDOWS */ { aSyShipWindowsDL, aSyShipWindowsHitbox, 3.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* EVID_SY_SHIP_4 */ { aSyShip4DL, aSyShip4Hitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* EVID_SY_SHIP_4_DESTROYED */ { aSyShip4DestroyedDL, aSyShip4DestroyedHitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* EVID_SY_SHIP_2_SPRITE */ { aSyShip2SpriteDL, gNoHitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, + /* EVID_SY_SHIP_3_SPRITE */ { aSyShip3SpriteDL, gNoHitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, + /* EVID_SY_SHIP_MISSILE */ { aSyShipMissileDL, aSyShipMissileHitbox, 3.0f, 100.0f, 3001.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, + /* EVID_SUPPLY_CRATE */ { NULL, gCubeHitbox150, 1.0f, 100.0f, 3000.0f, 2, 0, EISFX_NONE, 0, 1.0f, 0 }, + /* EVID_ZO_BIRD */ { NULL, aZoBirdHitbox, 1.0f, 100.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 1.0f, 1 }, + /* EVID_VE1_PILLAR */ { NULL, D_VE1_601B474, -1.0f, 100.0f, 3000.0f, 2, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* EVID_VE1_BLOCKER */ { NULL, gNoHitbox, -1.0f, 100.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* EVID_MA_LASER_TURRET */ { NULL, gCubeHitbox100, 2.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, + /* EVID_AQ_OYSTER */ { NULL, aAqOysterEvHitbox, 1.0f, 100.0f, 3000.0f, 2, 0, EISFX_NONE, 0, 60.0f, 1 }, + /* EVID_VE1_PILLAR_5 */ { aVe1Pillar5DL, aVe1Pillar5Hitbox, -1.0f, 100.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* EVID_BILL */ { NULL, gCubeHitbox100, 1.0f, 20000.0f, 3000.0f, 1, 0, EISFX_ARWING_ENGINE_FG, 0, 0.0f, 0 }, + /* EVID_KATT */ { NULL, gCubeHitbox100, 1.0f, 20000.0f, 3000.0f, 1, 0, EISFX_ARWING_ENGINE_FG, 0, 0.0f, 0 }, + /* EVID_VE1_TEMPLE_BG */ { aVe1TempleBgDL, gNoHitbox, 1.0f, 100.0f, 3000.0f, 1, 1, EISFX_NONE, 0, 0.0f, 1 }, + /* EVID_AQ_STARFISH */ { NULL, aAqStarfishHitbox, 1.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 1.0f, 1 }, + /* EVID_AQ_SHELL */ { NULL, aAqShellHitbox, 1.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 1.0f, 1 }, + /* EVID_MA_RAILROAD_CART */ { aMaRailroadCartDL, aMaRailroadCartHitbox, 1.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* EVID_MA_GUILLOTINE_1 */ { aMaGuillotine1DL, aMaGuillotineHitbox, -1.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* EVID_WZ_PILLAR_1 */ { aWzPillar1DL, aWzPillar1Hitbox, -1.0f, 2100.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* EVID_WZ_PILLAR_2 */ { aWzPillar2DL, aWzPillar2Hitbox, -1.0f, 2100.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* EVID_WZ_METEOR_1 */ { aWzMeteor1DL, aWzMeteor1Hitbox, 2.5f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 1.0f, 1 }, + /* EVID_WZ_METEOR_2 */ { aWzMeteor2DL, gCubeHitbox100, -1.0f, 100.0f, 8000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 0 }, + /* EVID_WZ_GATE */ { aWzGateDL, aWzGateHitbox, -1.0f, 1000.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 0 }, + /* EVID_ME_METEOR_7 */ { aMeMeteor7DL, gCubeHitbox100, -1.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* EVID_MA_BOULDER */ { aMaBoulderDL, aMaBoulderHitbox, 1.0f, 100.0f, 3000.0f, 1, 1, EISFX_NONE, 0, 0.0f, 1 }, + /* EVID_VE1_ENEMY_GATE */ { aVe1EnemyGateDL, aVe1EnemyGateHitbox, -1.0f, 100.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* EVID_ENEMY_GATE_DOOR_RIGHT */ { aVe1EnemyGateDoorRightDL, gNoHitbox, -1.0f, 100.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* EVID_ENEMY_GATE_DOOR_LEFT */ { aVe1EnemyGateDoorLeftDL, gNoHitbox, -1.0f, 100.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* EVID_TR_BARRIER */ { aTrBarrierDL, aTrBarrierHitbox, -1.0f, 100.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, + /* EVID_ANDROSS_GATE */ { NULL, gNoHitbox, -1.0f, 500.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 0.0f, 0 }, + /* EVID_ANDROSS_GATE_2 */ { NULL, gNoHitbox, -1.0f, 500.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 0.0f, 0 }, + /* EVID_SX_WARP_ENMY */ { NULL, gCubeHitbox200, 1.0f, 100.0f, 3000.0f, 0, 0, EISFX_NONE, 0, 1.0f, 1 }, + /* EVID_KILLER_BEE */ { NULL, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 0, 0, EISFX_EN_ALIEN_FLY, 0, 0.0f, 0 }, + /* EVID_MA_GUILLOTINE_2 */ { aMaGuillotine2DL, aMaGuillotineHitbox, -1.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, }; +// clang-format on + static Color_RGBA32 sEventTexLineColors[6] = { // could be in-function { 255, 255, 255, 255 }, { 160, 160, 255, 255 }, { 80, 80, 255, 255 }, @@ -1139,9 +1142,9 @@ void ActorEvent_ProcessScript(ActorEvent* this) { this->fwork[11] = 0.0f; this->fwork[12] = 0.0f; - if ((this->eventType == EVID_64) || (this->eventType == EVID_81)) { + if ((this->eventType == EVID_ME_ROCK_GULL) || (this->eventType == EVID_VE1_BLOCKER)) { this->fwork[15] = 0.0f; - } else if (this->eventType == EVID_79) { + } else if (this->eventType == EVID_ZO_BIRD) { this->info.drawType = 2; } @@ -1149,14 +1152,14 @@ void ActorEvent_ProcessScript(ActorEvent* this) { this->aiIndex += 2; if ((this->eventType >= EVID_200) && (this->eventType < EVID_300)) { - this->unk_046 = 100; + this->work_046 = 100; this->info.hitbox = gCubeHitbox200; this->info.targetOffset = 1.0f; for (i = 0; i < 2; i++) { if (gMeMoraStatus[i] == 0) { gMeMoraStatus[i] = 1; - this->unk_046 = i; + this->work_046 = i; for (j = 0; j < 100; j++) { gMeMoraYpos[i][j] = this->obj.pos.y; gMeMoraZpos[i][j] = this->obj.pos.z; @@ -1168,17 +1171,17 @@ void ActorEvent_ProcessScript(ActorEvent* this) { } } - if (this->unk_046 == 100) { + if (this->work_046 == 100) { Object_Kill(&this->obj, this->sfxSource); } } - if ((this->eventType == EVID_SLIPPY_METEO) || (this->eventType == EVID_TEAMMATE)) { + if ((this->eventType == EVID_ME_SLIPPY) || (this->eventType == EVID_TEAMMATE)) { this->drawShadow = true; this->iwork[11] = 1; } - if (this->eventType == EVID_81) { + if (this->eventType == EVID_VE1_BLOCKER) { this->drawShadow = true; } @@ -1196,7 +1199,7 @@ void ActorEvent_ProcessScript(ActorEvent* this) { } if (this->eventType == EVID_ANDROSS_GATE_2) { - this->animFrame = Animation_GetFrameCount(&D_VE2_6014658) - 1; + this->animFrame = Animation_GetFrameCount(&aVe2AndrossGateAnim) - 1; } if (this->eventType < EVID_200) { @@ -1217,8 +1220,8 @@ void ActorEvent_ProcessScript(ActorEvent* this) { switch (sEventActorInfo[this->eventType].sfx) { case EISFX_EN_ENGINE_01: - if (!((gCurrentLevel == LEVEL_SOLAR) || (this->eventType == EVID_6) || - ((gCurrentLevel == LEVEL_CORNERIA) && (this->eventType == EVID_8)))) { + if (!((gCurrentLevel == LEVEL_SOLAR) || (this->eventType == EVID_FIREBIRD) || + ((gCurrentLevel == LEVEL_CORNERIA) && (this->eventType == EVID_VENOM_TANK)))) { AUDIO_PLAY_SFX(NA_SE_EN_ENGINE_01, this->sfxSource, 4); } break; @@ -1248,7 +1251,7 @@ void ActorEvent_ProcessScript(ActorEvent* this) { if (this->info.unk_16 == 0) { this->obj.rot.z = this->fwork[23] = this->rot_0F4.z; - if (this->eventType != EVID_31) { + if (this->eventType != EVID_A6_UMBRA_STATION) { this->rot_0F4.z = 0.0f; } } @@ -1301,13 +1304,13 @@ void ActorEvent_ProcessScript(ActorEvent* this) { break; } - this->unk_048 = actorScript[this->aiIndex + 1]; + this->work_048 = actorScript[this->aiIndex + 1]; - if (this->unk_048 == EVACT_3) { - this->timer_04C = 4; + if (this->work_048 == EVACT_3) { + this->work_04C = 4; } - if (this->unk_048 == EVACT_TI_DROP_MINE) { + if (this->work_048 == EVACT_TI_DROP_MINE) { this->timer_0BE = 50; } @@ -1838,16 +1841,17 @@ void ActorEvent_ProcessActions(ActorEvent* this) { Vec3f sp6C; Sprite* sprite; - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (this->eventType != EVID_52) && + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (this->eventType != EVID_SARUMARINE_PERISCOPE) && (this->eventType != EVID_ANDROSS_GATE) && (this->eventType != EVID_ANDROSS_GATE_2) && - (this->eventType != EVID_48) && (this->eventType != EVID_49) && (this->eventType != EVID_50)) { - switch (this->unk_048) { + (this->eventType != EVID_SY_ROBOT_1) && (this->eventType != EVID_SY_ROBOT_2) && + (this->eventType != EVID_SY_ROBOT_3)) { + switch (this->work_048) { case EVACT_NONE: break; case EVACT_1: // shoot forward ActorEvent_8006F254(this); - this->unk_048 = EVACT_NONE; + this->work_048 = EVACT_NONE; break; case EVACT_2: // shoot at player @@ -1855,7 +1859,7 @@ void ActorEvent_ProcessActions(ActorEvent* this) { Effect_EnemyLaser(OBJ_EFFECT_ENEMY_LASER_1, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, gEnemyShotSpeed); } - this->unk_048 = EVACT_NONE; + this->work_048 = EVACT_NONE; break; case EVACT_3: // ally shoots forward @@ -1870,16 +1874,16 @@ void ActorEvent_ProcessActions(ActorEvent* this) { sp6C.y, sp6C.z, this->rot_0F4.x, this->rot_0F4.y, this->vwork[29].z + this->rot_0F4.z); this->timer_0C2 = 2; - this->timer_04C--; - if (this->timer_04C <= 0) { - this->unk_048 = EVACT_NONE; + this->work_04C--; + if (this->work_04C <= 0) { + this->work_048 = EVACT_NONE; } } break; case EVACT_4: // shoot blue energy balls ActorEvent_SpawnEffect374(this->obj.pos.x, this->obj.pos.y - 20.0f, this->obj.pos.z); - this->unk_048 = EVACT_NONE; + this->work_048 = EVACT_NONE; break; case EVACT_5: @@ -1898,7 +1902,7 @@ void ActorEvent_ProcessActions(ActorEvent* this) { this->obj.pos.z + sp6C.z, this->obj.rot.x, this->obj.rot.y, this->obj.rot.z, this->vwork[29].x, this->vwork[29].y, this->vwork[29].z + this->rot_0F4.z, sp6C.x, sp6C.y, sp6C.z, 1.0f); - this->unk_048 = EVACT_NONE; + this->work_048 = EVACT_NONE; break; case EVACT_6: @@ -1906,14 +1910,14 @@ void ActorEvent_ProcessActions(ActorEvent* this) { Effect_EnemyLaser(OBJ_EFFECT_355, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, gEnemyShotSpeed); } - this->unk_048 = EVACT_NONE; + this->work_048 = EVACT_NONE; break; case EVACT_7: if (this->obj.pos.z < (gPlayer[0].trueZpos - 600.0f)) { Effect_EnemyLaser(OBJ_EFFECT_356, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 60.0f); } - this->unk_048 = EVACT_NONE; + this->work_048 = EVACT_NONE; break; case EVACT_8: @@ -1925,7 +1929,7 @@ void ActorEvent_ProcessActions(ActorEvent* this) { gEnemyShotSpeed); gPlayer[0].pos.x = sp6C.x; gPlayer[0].pos.y = sp6C.y; - this->unk_048 = EVACT_NONE; + this->work_048 = EVACT_NONE; break; case EVACT_9: @@ -1970,7 +1974,7 @@ void ActorEvent_ProcessActions(ActorEvent* this) { ActorEvent_SpawnTIMine(this->obj.pos.x, this->obj.pos.y - 50.0f, this->obj.pos.z); } if (this->timer_0BE == 0) { - this->unk_048 = EVACT_NONE; + this->work_048 = EVACT_NONE; } break; @@ -1979,7 +1983,7 @@ void ActorEvent_ProcessActions(ActorEvent* this) { this->obj.pos.z + 220.0f, gEnemyShotSpeed); Effect_EnemyLaser(OBJ_EFFECT_ENEMY_LASER_1, this->obj.pos.x - 190.0f, this->obj.pos.y + 90.0f, this->obj.pos.z + 220.0f, gEnemyShotSpeed); - this->unk_048 = EVACT_NONE; + this->work_048 = EVACT_NONE; break; case EVACT_17: @@ -1987,7 +1991,7 @@ void ActorEvent_ProcessActions(ActorEvent* this) { func_effect_8007F20C(OBJ_EFFECT_ENEMY_LASER_1, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, gEnemyShotSpeed); } - this->unk_048 = EVACT_NONE; + this->work_048 = EVACT_NONE; break; case EVACT_GFOX_COVER_FIRE: @@ -2019,12 +2023,12 @@ void ActorEvent_ProcessActions(ActorEvent* this) { } } - this->unk_048 = EVACT_NONE; + this->work_048 = EVACT_NONE; break; case EVACT_19: // projectile ring used by bee enemies func_effect_80083D2C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 40.0f); - this->unk_048 = EVACT_NONE; + this->work_048 = EVACT_NONE; break; } } @@ -2100,23 +2104,23 @@ void ActorEvent_800701E0(ActorEvent* this) { if (ActorEvent_800700A4(this)) { return; } - if ((this->dmgType != DMG_NONE) && (this->eventType == EVID_METEO_PYRAMID_SHIP) && (this->dmgPart == 0)) { + if ((this->dmgType != DMG_NONE) && (this->eventType == EVID_ME_FLIP_BOT) && (this->dmgPart == 0)) { this->dmgType = DMG_NONE; } - if ((this->dmgType != DMG_NONE) && (this->eventType == EVID_AQ_CLAM) && (this->timer_0C2 >= 2)) { + if ((this->dmgType != DMG_NONE) && (this->eventType == EVID_AQ_OYSTER) && (this->timer_0C2 >= 2)) { this->dmgType = DMG_NONE; } if ((this->dmgType != DMG_NONE) && - (((this->eventType == EVID_64) && (this->dmgPart == 2)) || (this->eventType != EVID_64))) { + (((this->eventType == EVID_ME_ROCK_GULL) && (this->dmgPart == 2)) || (this->eventType != EVID_ME_ROCK_GULL))) { if (this->iwork[12] >= TEAM_ID_KATT) { this->damage = 0; } if ((this->iwork[12] >= TEAM_ID_FALCO) && (this->iwork[12] <= TEAM_ID_PEPPY)) { gTeamShields[this->iwork[12]] -= this->damage; - } else if ((this->eventType == EVID_AQ_CLAM) && ((this->damage == 30) || (this->damage == 31))) { + } else if ((this->eventType == EVID_AQ_OYSTER) && ((this->damage == 30) || (this->damage == 31))) { this->health = 0; } else { this->health -= this->damage; @@ -2130,8 +2134,8 @@ void ActorEvent_800701E0(ActorEvent* this) { D_ctx_80177850 = 15; } - if (this->eventType != EVID_AQ_CLAM) { - if ((this->eventType == EVID_6) && (gCurrentLevel == LEVEL_SOLAR)) { + if (this->eventType != EVID_AQ_OYSTER) { + if ((this->eventType == EVID_FIREBIRD) && (gCurrentLevel == LEVEL_SOLAR)) { AUDIO_PLAY_SFX(NA_SE_EN_BIRD_DOWN, this->sfxSource, 4); } else { AUDIO_PLAY_SFX(NA_SE_EN_CRASH_DOWN, this->sfxSource, 4); @@ -2145,23 +2149,24 @@ void ActorEvent_800701E0(ActorEvent* this) { } if (((Rand_ZeroOne() < chance) || (this->iwork[12] != 0)) && (this->info.unk_14 == 0) && - (this->eventType != EVID_13) && (this->eventType != EVID_14) && (this->eventType != EVID_61) && - (this->damage <= 30) && (this->eventType != EVID_62) && (this->eventType != EVID_64) && - (this->eventType != EVID_72) && (this->eventType != EVID_68)) { + (this->eventType != EVID_ME_METEOR_1) && (this->eventType != EVID_ME_METEOR_2) && + (this->eventType != EVID_ME_METEOR_4) && (this->damage <= 30) && + (this->eventType != EVID_ME_METEOR_5) && (this->eventType != EVID_ME_ROCK_GULL) && + (this->eventType != EVID_SY_SHIP_WINDOWS) && (this->eventType != EVID_SY_LASER_TURRET)) { func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->scale * 4.0f); this->dmgType = DMG_NONE; } this->timer_0C2 = 10; this->timer_0BE = 0; - this->unk_046 = 255; - this->unk_048 = 900; + this->work_046 = 255; + this->work_048 = 900; this->drawShadow = true; if (gLevelType == LEVELTYPE_PLANET) { - this->timer_04C = RAND_INT(2.9f); - if (this->eventType == EVID_SLIPPY_METEO) { - this->timer_04C = 1; + this->work_04C = RAND_INT(2.9f); + if (this->eventType == EVID_ME_SLIPPY) { + this->work_04C = 1; if (this->obj.pos.x < this->hitPos.x) { Play_SpawnDebris(1, this->obj.pos.x + 20.0f, this->obj.pos.y, this->obj.pos.z); this->fwork[17] = 777.0f; @@ -2185,20 +2190,20 @@ void ActorEvent_800701E0(ActorEvent* this) { } } - if (this->eventType == EVID_90) { - this->timer_04C = 999; + if (this->eventType == EVID_MA_RAILROAD_CART) { + this->work_04C = 999; } } else { switch (this->eventType) { - case EVID_13: + case EVID_ME_METEOR_1: func_enmy_800654E4(&this->obj); break; - case EVID_61: + case EVID_ME_METEOR_4: Meteo_Effect346_Spawn(this); break; - case EVID_27: + case EVID_SX_LASER: this->obj.pos.y -= this->vel.y; this->obj.status = OBJ_ACTIVE; func_effect_8007D0E0(this->obj.pos.x - this->vel.x, this->obj.pos.y + 30.0f, @@ -2212,7 +2217,7 @@ void ActorEvent_800701E0(ActorEvent* this) { default: this->timer_0BC = 35; - this->timer_04C = 2; + this->work_04C = 2; this->vel.y = RAND_FLOAT_CENTERED(20.0f); this->vel.x = RAND_FLOAT_CENTERED(20.0f); this->vel.z = 0.0f; @@ -2221,14 +2226,14 @@ void ActorEvent_800701E0(ActorEvent* this) { } } - if (this->eventType == EVID_82) { + if (this->eventType == EVID_MA_LASER_TURRET) { AUDIO_PLAY_SFX(NA_SE_OB_SMOKE, this->sfxSource, 0); this->dmgType = DMG_BEAM; Effect_Effect387_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 3.0f, 60); } } else { this->timer_0C6 = 20; - if ((this->eventType == EVID_6) && (gCurrentLevel == LEVEL_SOLAR)) { + if ((this->eventType == EVID_FIREBIRD) && (gCurrentLevel == LEVEL_SOLAR)) { AUDIO_PLAY_SFX(NA_SE_EN_BIRD_DAMAGE, this->sfxSource, 4); } else if (this->health < 20) { AUDIO_PLAY_SFX(NA_SE_EN_KNOCK_DOWN, this->sfxSource, 4); @@ -2236,12 +2241,13 @@ void ActorEvent_800701E0(ActorEvent* this) { AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, this->sfxSource, 4); } - if ((this->eventType != EVID_13) && (this->eventType != EVID_61) && (this->eventType != EVID_AQ_CLAM)) { + if ((this->eventType != EVID_ME_METEOR_1) && (this->eventType != EVID_ME_METEOR_4) && + (this->eventType != EVID_AQ_OYSTER)) { func_effect_8007D10C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->scale * 1.5f); } if (((gLevelMode == LEVELMODE_ALL_RANGE) || (gLevelMode == LEVELMODE_TURRET)) && - (this->eventType != EVID_A6_MISSILE) && (this->eventType != EVID_23)) { + (this->eventType != EVID_A6_NINJIN_MISSILE) && (this->eventType != EVID_VENOM_FIGHTER_3)) { this->fwork[13] = 20.0f; if (this->obj.pos.x < this->hitPos.x) { this->fwork[13] *= -1.0f; @@ -2297,12 +2303,12 @@ void ActorEvent_800701E0(ActorEvent* this) { this->obj.status = OBJ_DYING; this->obj.pos.z -= this->vel.z; this->dmgType = DMG_BEAM; - if (this->eventType == EVID_13) { + if (this->eventType == EVID_ME_METEOR_1) { this->obj.id = OBJ_ACTOR_ME_METEOR_2; func_enmy_800654E4(&this->obj); } - if (this->eventType == EVID_61) { + if (this->eventType == EVID_ME_METEOR_4) { Meteo_Effect346_Spawn(this); } } @@ -2312,7 +2318,8 @@ void ActorEvent_800701E0(ActorEvent* this) { void ActorEvent_80070BA8(ActorEvent* this) { if (this->dmgType != DMG_NONE) { this->dmgType = DMG_NONE; - if ((this->eventType != EVID_17) || ((this->eventType == EVID_17) && (this->dmgPart == 0))) { + if ((this->eventType != EVID_ZERAM_CLASS_CRUISER) || + ((this->eventType == EVID_ZERAM_CLASS_CRUISER) && (this->dmgPart == 0))) { this->timer_0C6 = 10; Effect_Effect390_Spawn(this->hitPos.x, this->hitPos.y, this->hitPos.z, this->vel.x, this->vel.y, this->vel.z, 0.2f, 10); @@ -2346,13 +2353,13 @@ void ActorEvent_TriggerBranch(ActorEvent* this) { void ActorEvent_ProcessTriggers(ActorEvent* this) { s32 i; - s32 var_v1 = 0; - s32 var_v1_4; + s32 teamAliveCount = 0; + s32 ringRequirement; Actor* otherActor; for (i = TEAM_ID_FALCO; i <= TEAM_ID_PEPPY; i++) { if (gTeamShields[i] > 0) { - var_v1++; + teamAliveCount++; } } @@ -2375,25 +2382,25 @@ void ActorEvent_ProcessTriggers(ActorEvent* this) { break; case EVC_TEAM_COUNT_3: - if (var_v1 == 3) { + if (teamAliveCount == 3) { ActorEvent_TriggerBranch(this); } break; case EVC_TEAM_COUNT_2: - if (var_v1 == 2) { + if (teamAliveCount == 2) { ActorEvent_TriggerBranch(this); } break; case EVC_TEAM_COUNT_1: - if (var_v1 == 1) { + if (teamAliveCount == 1) { ActorEvent_TriggerBranch(this); } break; case EVC_TEAM_COUNT_0: - if (var_v1 == 0) { + if (teamAliveCount == 0) { ActorEvent_TriggerBranch(this); } break; @@ -2654,26 +2661,29 @@ void ActorEvent_ProcessTriggers(ActorEvent* this) { break; case EVC_PASSED_ALL_RINGS: - var_v1_4 = 7; + ringRequirement = 7; switch (gCurrentLevel) { case LEVEL_CORNERIA: break; case LEVEL_SECTOR_X: - var_v1_4 = 4; + ringRequirement = 4; break; case LEVEL_TITANIA: - var_v1_4 = 9; + ringRequirement = 9; break; } - if (!((gCurrentLevel == LEVEL_CORNERIA) && (gTeamShields[TEAM_ID_FALCO] <= 0)) && - (gRingPassCount >= var_v1_4)) { - ActorEvent_TriggerBranch(this); + // Abort if Falco is dead or the requirement is not met. + if (((gCurrentLevel == LEVEL_CORNERIA) && (gTeamShields[TEAM_ID_FALCO] <= 0)) || + (gRingPassCount < ringRequirement)) { + break; } + + ActorEvent_TriggerBranch(this); break; case EVC_ATTACK_GROUP_CLEARED: - for (i = 0, otherActor = gActors; i < ARRAY_COUNT(gActors); i++, otherActor++) { + for (i = 0, otherActor = &gActors[0]; 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_TriggerBranch(this); @@ -2862,17 +2872,17 @@ void ActorEvent_80071DC0(ActorEvent* this) { Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); - if (this->eventType == EVID_30) { + if (this->eventType == EVID_A6_HARLOCK_FRIGATE) { rInd = RAND_FLOAT(ARRAY_COUNT(D_800D1074) - 1.1f); // off by 1 error? Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_800D1074[rInd], &sp38); } - if (this->eventType == EVID_17) { + if (this->eventType == EVID_ZERAM_CLASS_CRUISER) { rInd = RAND_FLOAT(ARRAY_COUNT(D_800D0DD4) - 0.1f); Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_800D0DD4[rInd], &sp38); } - if (this->eventType == EVID_31) { + if (this->eventType == EVID_A6_UMBRA_STATION) { rInd = RAND_FLOAT(ARRAY_COUNT(D_800D1194) - 0.1f); Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_800D1194[rInd], &sp38); } @@ -2902,7 +2912,7 @@ void ActorEvent_80071DC0(ActorEvent* this) { } void ActorEvent_800720E8(ActorEvent* this) { - switch (this->unk_046) { + switch (this->work_046) { case 0: if (this->dmgType != DMG_NONE) { if (this->dmgType == DMG_EXPLOSION) { @@ -2923,7 +2933,7 @@ void ActorEvent_800720E8(ActorEvent* this) { } if (this->health <= 0) { - this->unk_046 = 1; + this->work_046 = 1; this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SX_6032408); AUDIO_PLAY_SFX(NA_SE_OB_GATE_OPEN, this->sfxSource, 0); } else { @@ -2982,8 +2992,8 @@ void ActorEvent_SpawnEffect365(f32 xPos, f32 yPos, f32 zPos, f32 yRot) { void ActorEvent_80072474(ActorEvent* this) { f32 var_fv1; - if (this->unk_048 != EVACT_NONE) { - switch (this->unk_048) { + if (this->work_048 != EVACT_NONE) { + switch (this->work_048) { case EVACT_1: this->fwork[16] = 45.0f; break; @@ -2997,7 +3007,7 @@ void ActorEvent_80072474(ActorEvent* this) { this->iwork[15] = 0; break; } - this->unk_048 = EVACT_NONE; + this->work_048 = EVACT_NONE; } if (this->iwork[15] != 0) { @@ -3046,7 +3056,8 @@ void ActorEvent_Update(ActorEvent* this) { } return; } - if (((this->eventType == EVID_17) || (this->eventType == EVID_30) || (this->eventType == EVID_31)) && + if (((this->eventType == EVID_ZERAM_CLASS_CRUISER) || (this->eventType == EVID_A6_HARLOCK_FRIGATE) || + (this->eventType == EVID_A6_UMBRA_STATION)) && (this->health <= 0)) { ActorEvent_80071DC0(this); return; @@ -3061,12 +3072,12 @@ void ActorEvent_Update(ActorEvent* this) { this->counter_04E = 0; } - gMeMoraXpos[this->unk_046][this->counter_04E] = this->obj.pos.x; - gMeMoraYpos[this->unk_046][this->counter_04E] = this->obj.pos.y; - gMeMoraZpos[this->unk_046][this->counter_04E] = this->obj.pos.z; - gMeMoraXrot[this->unk_046][this->counter_04E] = this->obj.rot.x; - gMeMoraYrot[this->unk_046][this->counter_04E] = this->obj.rot.y; - gMeMoraZrot[this->unk_046][this->counter_04E] = this->obj.rot.z; + gMeMoraXpos[this->work_046][this->counter_04E] = this->obj.pos.x; + gMeMoraYpos[this->work_046][this->counter_04E] = this->obj.pos.y; + gMeMoraZpos[this->work_046][this->counter_04E] = this->obj.pos.z; + gMeMoraXrot[this->work_046][this->counter_04E] = this->obj.rot.x; + gMeMoraYrot[this->work_046][this->counter_04E] = this->obj.rot.y; + gMeMoraZrot[this->work_046][this->counter_04E] = this->obj.rot.z; if (this->dmgType != DMG_NONE) { this->dmgType = DMG_NONE; @@ -3086,7 +3097,7 @@ void ActorEvent_Update(ActorEvent* this) { } } - if ((this->eventType == EVID_27) && (this->timer_0C2 != 0)) { + if ((this->eventType == EVID_SX_LASER) && (this->timer_0C2 != 0)) { this->state = EVSTATE_READY; } @@ -3109,7 +3120,7 @@ void ActorEvent_Update(ActorEvent* this) { spEC = this->obj.pos.y; spE8 = this->obj.pos.z; - if ((this->eventType == EVID_33) || (this->eventType == EVID_68)) { + if ((this->eventType == EVID_CRUISER_GUN) || (this->eventType == EVID_SY_LASER_TURRET)) { Matrix_RotateZ(gCalcMatrix, -(this->vwork[29].z + this->rot_0F4.z) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -this->vwork[29].x * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, -this->vwork[29].y * M_DTOR, MTXF_APPLY); @@ -3164,7 +3175,7 @@ void ActorEvent_Update(ActorEvent* this) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &spB8, &spAC); - if (this->eventType == EVID_68) { + if (this->eventType == EVID_SY_LASER_TURRET) { var_fv0 = 80.0f; } else { var_fv0 = 0.0f; @@ -3398,10 +3409,12 @@ void ActorEvent_Update(ActorEvent* this) { } if (this->fwork[10] > 0.0f) { - if ((this->eventType == EVID_13) || (this->eventType == EVID_14) || (this->eventType == EVID_61) || - (this->eventType == EVID_62) || (this->eventType == EVID_63) || (this->eventType == EVID_64) || - (this->eventType == EVID_65) || (this->eventType == EVID_66) || (this->eventType == EVID_94) || - (this->eventType == EVID_95) || (this->eventType == EVID_97)) { + if ((this->eventType == EVID_ME_METEOR_1) || (this->eventType == EVID_ME_METEOR_2) || + (this->eventType == EVID_ME_METEOR_4) || (this->eventType == EVID_ME_METEOR_5) || + (this->eventType == EVID_ME_BIG_METEOR) || (this->eventType == EVID_ME_ROCK_GULL) || + (this->eventType == EVID_ME_METEOR_6) || (this->eventType == EVID_ME_SECRET_MARKER_2) || + (this->eventType == EVID_WZ_METEOR_1) || (this->eventType == EVID_WZ_METEOR_2) || + (this->eventType == EVID_ME_METEOR_7)) { this->obj.rot.y -= this->fwork[11] * this->fwork[12]; this->obj.rot.x += this->fwork[11] * this->fwork[12]; } else { @@ -3460,8 +3473,8 @@ void ActorEvent_Update(ActorEvent* this) { if (this->scale <= -1.999f) { ActorEvent_80070BA8(this); } else { - if ((this->dmgType == DMG_BEAM) && (this->scale < 0.5f) && (this->eventType != EVID_48) && - (this->eventType != EVID_49) && (this->eventType != EVID_50)) { + if ((this->dmgType == DMG_BEAM) && (this->scale < 0.5f) && (this->eventType != EVID_SY_ROBOT_1) && + (this->eventType != EVID_SY_ROBOT_2) && (this->eventType != EVID_SY_ROBOT_3)) { this->dmgType = DMG_NONE; if (gCurrentLevel == LEVEL_METEO) { AUDIO_PLAY_SFX(NA_SE_ROCK_REFLECT, this->sfxSource, 4); @@ -3472,10 +3485,10 @@ void ActorEvent_Update(ActorEvent* this) { if ((this->eventType < EVID_200) && (this->eventType != EVID_SUPPLY_CRATE) && (this->scale >= 0.5f)) { switch (this->eventType) { - case EVID_WING_REPAIR: + case EVID_ITEM_WING_REPAIR: ActorEvent_8006FE28(this); break; - case EVID_79: + case EVID_ZO_BIRD: ActorEvent_8006FEEC(this); break; default: @@ -3486,11 +3499,11 @@ void ActorEvent_Update(ActorEvent* this) { } } switch (this->eventType) { - case EVID_92: - case EVID_93: - case EVID_94: - case EVID_95: - case EVID_96: + case EVID_WZ_PILLAR_1: + case EVID_WZ_PILLAR_2: + case EVID_WZ_METEOR_1: + case EVID_WZ_METEOR_2: + case EVID_WZ_GATE: if ((gGameFrameCount % 8) == 0) { this->fwork[18] = RAND_FLOAT(255.0f); this->fwork[19] = RAND_FLOAT(255.0f); @@ -3501,7 +3514,7 @@ void ActorEvent_Update(ActorEvent* this) { Math_SmoothStepToF(&this->fwork[17], this->fwork[20], 1.0f, 10.0f, 0.0f); break; - case EVID_46: + case EVID_ZO_PATROL_BOAT: if (Play_CheckDynaFloorCollision(&spEC, &spFC, this->obj.pos.x, -100.0f, this->obj.pos.z)) { spF0 = 10.0f; @@ -3526,38 +3539,38 @@ void ActorEvent_Update(ActorEvent* this) { this->obj.rot.y = this->rot_0F4.y; break; - case EVID_31: + case EVID_A6_UMBRA_STATION: this->obj.rot.z = gGameFrameCount; break; - case EVID_A6_MISSILE: + case EVID_A6_NINJIN_MISSILE: case EVID_A6_ROCKET: this->obj.rot.z = gGameFrameCount * 3.0f; break; - case EVID_3: + case EVID_SPY_EYE: this->drawShadow = true; this->obj.rot.y -= 10.0f; break; - case EVID_6: + case EVID_FIREBIRD: this->animFrame++; if (gCurrentLevel == LEVEL_SOLAR) { - if (this->animFrame >= Animation_GetFrameCount(&D_SO_600636C)) { + if (this->animFrame >= Animation_GetFrameCount(&aSoGoreAnim)) { this->animFrame = 0; } if ((gGameFrameCount % 3) == 0) { Solar_8019E9F4(this->obj.pos.x, this->obj.pos.y - 20, this->obj.pos.z - 180.0f, 0.0f, RAND_FLOAT(20.0f) * -1.0f, 0.0f, 4.0f, 2); } - } else if (this->animFrame >= Animation_GetFrameCount(&D_ENMY_PLANET_40057AC)) { + } else if (this->animFrame >= Animation_GetFrameCount(&aFirebirdAnim)) { this->animFrame = 0; } break; - case EVID_9: + case EVID_TRIPOD: this->animFrame++; - if (this->animFrame >= Animation_GetFrameCount(&D_ENMY_PLANET_40001A4)) { + if (this->animFrame >= Animation_GetFrameCount(&aTripodAnim)) { this->animFrame = 0; } if (this->iwork[6] == 0) { @@ -3565,13 +3578,13 @@ void ActorEvent_Update(ActorEvent* this) { } break; - case EVID_48: - case EVID_49: - case EVID_50: + case EVID_SY_ROBOT_1: + case EVID_SY_ROBOT_2: + case EVID_SY_ROBOT_3: SectorY_SyRobot_Update(this); break; - case EVID_52: + case EVID_SARUMARINE_PERISCOPE: ActorEvent_80072474(this); break; @@ -3579,7 +3592,7 @@ void ActorEvent_Update(ActorEvent* this) { ActorSupplies_Update(this); break; - case EVID_79: + case EVID_ZO_BIRD: if (this->timer_0C4 == 0) { this->animFrame++; if (Animation_GetFrameCount(&aZoBirdAnim) < this->animFrame) { @@ -3588,14 +3601,14 @@ void ActorEvent_Update(ActorEvent* this) { } break; - case EVID_80: { + case EVID_VE1_PILLAR: { Effect* effect; Vec3f sp90; Vec3f sp84; Vec3f sp78; s32 sp74; - switch (this->unk_046) { + switch (this->work_046) { case 1: break; @@ -3631,7 +3644,7 @@ void ActorEvent_Update(ActorEvent* this) { effect->unk_60.z = RAND_FLOAT_CENTERED(1.0f) + 5.0f; } } - this->unk_046++; + this->work_046++; } break; } @@ -3695,29 +3708,29 @@ void ActorEvent_Update(ActorEvent* this) { } } break; - case EVID_81: + case EVID_VE1_BLOCKER: Math_SmoothStepToF(&this->fwork[15], 1.0f, 0.1f, 0.1f, 0.001f); if (this->fwork[15] > 0.5f) { this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_VE1_601B4C4); } - if (this->unk_046 == 0) { + if (this->work_046 == 0) { this->fwork[16] += 4.0f; if (this->fwork[16] >= 100.0f) { - this->unk_046 = 1; + this->work_046 = 1; this->fwork[16] = 100.0f; } } else { this->fwork[16] -= 4.0f; if (this->fwork[16] <= 0.0f) { - this->unk_046 = 0; + this->work_046 = 0; this->fwork[16] = 0.0f; } } break; - case EVID_AQ_CLAM: + case EVID_AQ_OYSTER: if (this->health <= 0) { if (this->animFrame == 20) { spD4 = this->obj.pos.z; @@ -3750,17 +3763,17 @@ void ActorEvent_Update(ActorEvent* this) { break; case EVID_AQ_STARFISH: - if (this->unk_04A == 0) { - this->unk_046 += 4; - if (this->unk_046 >= 255) { - this->unk_046 = 255; - this->unk_04A = 1; + if (this->work_04A == 0) { + this->work_046 += 4; + if (this->work_046 >= 255) { + this->work_046 = 255; + this->work_04A = 1; } } else { - this->unk_046 -= 4; - if (this->unk_046 <= 0) { - this->unk_046 = 0; - this->unk_04A = 0; + this->work_046 -= 4; + if (this->work_046 <= 0) { + this->work_046 = 0; + this->work_04A = 0; } } break; @@ -3832,13 +3845,13 @@ bool ActorEvent_OverrideLimbDraw2(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* } void ActorEvent_DrawEVID_SX_WARP_GATE(ActorEvent* this) { - Vec3f sp30[10]; + Vec3f frameTable[10]; - Animation_GetFrameData(&D_SX_6013820, 0, sp30); - sp30[6].y += this->fwork[15]; - sp30[5].z += this->fwork[16] + (s32) ((this->timer_0BE >> 2) % 2U); - sp30[4].z -= this->fwork[16] + (s32) ((this->timer_0BE >> 2) % 2U); - Animation_DrawSkeleton(1, D_SX_601390C, sp30, ActorEvent_OverrideLimbDraw2, NULL, this, &gIdentityMatrix); + Animation_GetFrameData(&D_SX_6013820, 0, frameTable); + frameTable[6].y += this->fwork[15]; + frameTable[5].z += this->fwork[16] + (s32) ((this->timer_0BE >> 2) % 2U); + frameTable[4].z -= this->fwork[16] + (s32) ((this->timer_0BE >> 2) % 2U); + Animation_DrawSkeleton(1, D_SX_601390C, frameTable, ActorEvent_OverrideLimbDraw2, NULL, this, &gIdentityMatrix); } bool ActorEvent_OverrideLimbDraw3(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { @@ -3852,31 +3865,33 @@ bool ActorEvent_OverrideLimbDraw3(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* s32 SyShipDebris_Draw(SyShipDebris* this) { RCP_SetupDL(&gMasterDisp, SETUPDL_60); - gSPDisplayList(gMasterDisp++, D_SY_601AD70); + gSPDisplayList(gMasterDisp++, aSyDebrisDL); RCP_SetupDL(&gMasterDisp, SETUPDL_64); return 0; } void ActorEvent_Draw(ActorEvent* this) { - Vec3f sp114[31]; + s32 pad2[3]; + Vec3f frameTable[30]; f32 sp40; - s16 temp_s0; + s16 savedState; s32 pad; - if (this->timer_0C6 && (this->eventType != EVID_90) && (this->eventType != EVID_68) && - (this->eventType != EVID_72)) { - if ((this->eventType != EVID_13) && (this->eventType != EVID_14) && (this->eventType != EVID_61) && - (this->eventType != EVID_62) && (this->eventType != EVID_AQ_CLAM) && (this->eventType != EVID_98) && - (this->scale > 0.5f) && (this->timer_0C6 >= 9) && ((this->timer_0C6 & 3) == 0) && - (gPlayState != PLAY_PAUSE)) { + if (this->timer_0C6 && (this->eventType != EVID_MA_RAILROAD_CART) && (this->eventType != EVID_SY_LASER_TURRET) && + (this->eventType != EVID_SY_SHIP_WINDOWS)) { + if ((this->eventType != EVID_ME_METEOR_1) && (this->eventType != EVID_ME_METEOR_2) && + (this->eventType != EVID_ME_METEOR_4) && (this->eventType != EVID_ME_METEOR_5) && + (this->eventType != EVID_AQ_OYSTER) && (this->eventType != EVID_MA_BOULDER) && (this->scale > 0.5f) && + (this->timer_0C6 >= 9) && ((this->timer_0C6 & 3) == 0) && (gPlayState != PLAY_PAUSE)) { Effect_Effect390_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, this->vel.z, this->scale * 0.07f, 3); } - if ((this->eventType != EVID_A6_MISSILE) && (this->eventType != EVID_23) && (this->eventType != EVID_79) && - (this->eventType != EVID_AQ_CLAM) && (this->eventType != EVID_27) && (this->eventType != EVID_51) && - (this->eventType != EVID_13) && (this->eventType != EVID_72) && (this->eventType != EVID_28) && - (this->scale > 0.5f)) { + if ((this->eventType != EVID_A6_NINJIN_MISSILE) && (this->eventType != EVID_VENOM_FIGHTER_3) && + (this->eventType != EVID_ZO_BIRD) && (this->eventType != EVID_AQ_OYSTER) && + (this->eventType != EVID_SX_LASER) && (this->eventType != EVID_SY_ROBOT_4) && + (this->eventType != EVID_ME_METEOR_1) && (this->eventType != EVID_SY_SHIP_WINDOWS) && + (this->eventType != EVID_SX_WATCH_POST) && (this->scale > 0.5f)) { sp40 = SIN_DEG(this->timer_0C6 * 400.0f) * this->timer_0C6; Matrix_RotateY(gGfxMatrix, M_DTOR * sp40, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_DTOR * sp40, MTXF_APPLY); @@ -3890,10 +3905,11 @@ void ActorEvent_Draw(ActorEvent* this) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); } - if ((this->eventType == EVID_29) || (this->eventType == EVID_59) || (this->eventType == EVID_60)) { + if ((this->eventType == EVID_SX_SPACE_MINE) || (this->eventType == EVID_SY_ROBOT_SPRITE_SIDE) || + (this->eventType == EVID_SY_ROBOT_SPRITE_FRONT)) { RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); - } else if ((this->eventType == EVID_82) || (this->eventType == EVID_90) || - ((this->eventType == EVID_6) && (gCurrentLevel == LEVEL_SOLAR))) { + } else if ((this->eventType == EVID_MA_LASER_TURRET) || (this->eventType == EVID_MA_RAILROAD_CART) || + ((this->eventType == EVID_FIREBIRD) && (gCurrentLevel == LEVEL_SOLAR))) { if ((this->timer_0C6 % 2) == 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_57); } else { @@ -3902,11 +3918,11 @@ void ActorEvent_Draw(ActorEvent* this) { } switch (this->eventType) { - case EVID_92: - case EVID_93: - case EVID_94: - case EVID_95: - case EVID_96: + case EVID_WZ_PILLAR_1: + case EVID_WZ_PILLAR_2: + case EVID_WZ_METEOR_1: + case EVID_WZ_METEOR_2: + case EVID_WZ_GATE: RCP_SetupDL(&gMasterDisp, SETUPDL_34); gDPSetTextureFilter(gMasterDisp++, G_TF_POINT); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, (s32) this->fwork[15], (s32) this->fwork[16], @@ -3921,16 +3937,16 @@ void ActorEvent_Draw(ActorEvent* this) { } switch (this->eventType) { - case EVID_56: + case EVID_TI_GREAT_FOX: Cutscene_DrawGreatFox(); break; - case EVID_0: + case EVID_VENOM_FIGHTER_1: this->iwork[11] = 1; Actor_DrawEngineAndContrails(this); break; - case EVID_SLIPPY_METEO: + case EVID_ME_SLIPPY: this->fwork[15] -= this->fwork[15] * 0.1f; this->fwork[26] -= this->fwork[26] * 0.1f; this->fwork[16] -= this->fwork[16] * 0.1f; @@ -3957,76 +3973,76 @@ void ActorEvent_Draw(ActorEvent* this) { Actor_DrawEngineAndContrails(this); break; - case EVID_5: + case EVID_GRANGA_FIGHTER_2: this->iwork[11] = 1; Actor_DrawEngineAndContrails(this); break; - case EVID_6: + case EVID_FIREBIRD: if (gCurrentLevel == LEVEL_SOLAR) { gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - Animation_GetFrameData(&D_SO_600636C, this->animFrame, sp114); - Animation_DrawSkeleton(1, D_SO_6006558, sp114, NULL, NULL, this, &gIdentityMatrix); + Animation_GetFrameData(&aSoGoreAnim, this->animFrame, frameTable); + Animation_DrawSkeleton(1, aSoGoreSkel, frameTable, NULL, NULL, this, &gIdentityMatrix); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); } else { - Animation_GetFrameData(&D_ENMY_PLANET_40057AC, this->animFrame, sp114); - Animation_DrawSkeleton(1, D_ENMY_PLANET_40058B8, sp114, NULL, NULL, this, &gIdentityMatrix); + Animation_GetFrameData(&aFirebirdAnim, this->animFrame, frameTable); + Animation_DrawSkeleton(1, aFirebirdSkel, frameTable, NULL, NULL, this, &gIdentityMatrix); } break; - case EVID_7: + case EVID_CORNERIAN_FIGHTER: this->iwork[11] = 1; Actor_DrawEngineAndContrails(this); break; - case EVID_9: + case EVID_TRIPOD: Matrix_Translate(gGfxMatrix, 0.0f, -30.0f, 0.0f, MTXF_APPLY); - Animation_GetFrameData(&D_ENMY_PLANET_40001A4, this->animFrame, sp114); - Animation_DrawSkeleton(1, D_ENMY_PLANET_4000270, sp114, NULL, NULL, this, &gIdentityMatrix); + Animation_GetFrameData(&aTripodAnim, this->animFrame, frameTable); + Animation_DrawSkeleton(1, aTripodSkel, frameTable, NULL, NULL, this, &gIdentityMatrix); break; - case EVID_18: + case EVID_SX_SPY_EYE: if (this->fwork[0] > 0.1f) { 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); - Actor_DrawEngineGlow(this, 2); + Actor_DrawEngineGlow(this, EG_GREEN); } break; - case EVID_19: + case EVID_SX_CANINE: if (this->fwork[0] > 0.1f) { 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); - Actor_DrawEngineGlow(this, 2); + Actor_DrawEngineGlow(this, EG_GREEN); } break; - case EVID_20: + case EVID_SPACE_MINE: RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); - gSPDisplayList(gMasterDisp++, D_A6_601A120); + gSPDisplayList(gMasterDisp++, aA6SpaceMineDL); break; - case EVID_A6_MISSILE: + case EVID_A6_NINJIN_MISSILE: gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - gSPDisplayList(gMasterDisp++, D_A6_6018BF0); + gSPDisplayList(gMasterDisp++, aA6NinjinMissileDL); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -30.0f, MTXF_APPLY); this->iwork[11] = 1; - Actor_DrawEngineGlow(this, 2); + Actor_DrawEngineGlow(this, EG_GREEN); break; case EVID_A6_ROCKET: gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - gSPDisplayList(gMasterDisp++, D_A6_6019730); + gSPDisplayList(gMasterDisp++, aA6RocketDL); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -30.0f, MTXF_APPLY); this->iwork[11] = 1; - Actor_DrawEngineGlow(this, 2); + Actor_DrawEngineGlow(this, EG_GREEN); break; - case EVID_27: + case EVID_SX_LASER: if (this->timer_0C2 != 0) { if (((this->timer_0C2 & 3) == 0) && (gPlayState != PLAY_PAUSE)) { func_effect_8007D0E0(RAND_FLOAT_CENTERED(200.0f) + this->obj.pos.x, @@ -4036,148 +4052,149 @@ void ActorEvent_Draw(ActorEvent* this) { } RCP_SetupDL(&gMasterDisp, SETUPDL_57); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); - gSPDisplayList(gMasterDisp++, D_SX_6001950); + gSPDisplayList(gMasterDisp++, aSxLaserDestroyedDL); } else { - gSPDisplayList(gMasterDisp++, D_SX_60066F0); + gSPDisplayList(gMasterDisp++, aSxLaserDL); } break; - case EVID_31: + case EVID_A6_UMBRA_STATION: Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_A6_600E0C0); + gSPDisplayList(gMasterDisp++, aA6UmbraStationDL); break; - case EVID_33: - Animation_GetFrameData(&D_ENMY_SPACE_400A30C, this->animFrame, sp114); + case EVID_CRUISER_GUN: + Animation_GetFrameData(&aCruiserGunAnim, this->animFrame, frameTable); Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 1.5f, 1.5f, 1.5f, MTXF_APPLY); - Animation_DrawSkeleton(1, D_ENMY_SPACE_400A398, sp114, ActorEvent_OverrideLimbDraw1, NULL, this, + Animation_DrawSkeleton(1, aCruiserGunSkel, frameTable, ActorEvent_OverrideLimbDraw1, NULL, this, &gIdentityMatrix); Math_SmoothStepToF(&this->fwork[16], 0.0f, 0.3f, 2.0f, 0.0001f); break; - case EVID_36: - Animation_GetFrameData(&D_TI1_700CAF4, this->animFrame, sp114); - sp114[2].z += this->fwork[15]; - Animation_DrawSkeleton(1, D_TI1_700CB60, sp114, NULL, NULL, this, &gIdentityMatrix); + case EVID_TI_BOMBER: + Animation_GetFrameData(&aTiBomberAnim, this->animFrame, frameTable); + frameTable[2].z += this->fwork[15]; + Animation_DrawSkeleton(1, aTiBomberSkel, frameTable, NULL, NULL, this, &gIdentityMatrix); break; case EVID_SX_WARP_GATE: ActorEvent_DrawEVID_SX_WARP_GATE(this); break; - case EVID_48: - case EVID_49: - case EVID_50: + case EVID_SY_ROBOT_1: + case EVID_SY_ROBOT_2: + case EVID_SY_ROBOT_3: SectorY_SyRobot_Draw(this); break; - case EVID_52: - Animation_GetFrameData(&D_ZO_601F874, this->animFrame, sp114); - sp114[2].z -= this->fwork[15]; + case EVID_SARUMARINE_PERISCOPE: + Animation_GetFrameData(&aZoSarumarinePeriscopeAnim, this->animFrame, frameTable); + frameTable[2].z -= this->fwork[15]; gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); Matrix_Scale(gGfxMatrix, 2.6f, 2.6f, 2.6f, MTXF_APPLY); - Animation_DrawSkeleton(1, D_ZO_601F920, sp114, NULL, NULL, this, &gIdentityMatrix); + Animation_DrawSkeleton(1, aZoSarumarinePeriscopeSkel, frameTable, NULL, NULL, this, + &gIdentityMatrix); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); break; - case EVID_64: + case EVID_ME_ROCK_GULL: Matrix_Push(&gGfxMatrix); Matrix_RotateX(gGfxMatrix, this->rot_0F4.x * M_DTOR, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, this->rot_0F4.y * M_DTOR, MTXF_APPLY); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, this->fwork[15], 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_ME_600CAA0); + gSPDisplayList(gMasterDisp++, aMeRockGull1DL); Matrix_Pop(&gGfxMatrix); - gSPDisplayList(gMasterDisp++, D_ME_600C130); + gSPDisplayList(gMasterDisp++, aMeRockGull2DL); Matrix_Translate(gGfxMatrix, 0.0f, -this->fwork[15], 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_ME_600C740); + gSPDisplayList(gMasterDisp++, aMeRockGull3DL); Matrix_Pop(&gGfxMatrix); break; - case EVID_METEO_PYRAMID_SHIP: - gSPDisplayList(gMasterDisp++, D_ME_6008AA0); + case EVID_ME_FLIP_BOT: + gSPDisplayList(gMasterDisp++, aMeFlipBot1DL); RCP_SetupDL(&gMasterDisp, SETUPDL_53); - gSPDisplayList(gMasterDisp++, D_ME_6009E30); + gSPDisplayList(gMasterDisp++, aMeFlipBot2DL); break; case EVID_SUPPLY_CRATE: ActorSupplies_Draw(this); break; - case EVID_79: - temp_s0 = this->state; - this->state = 2; // actor 235 state + case EVID_ZO_BIRD: + savedState = this->state; + this->state = 2; Zoness_ZoBird_Draw(this); - this->state = temp_s0; + this->state = savedState; break; - case EVID_80: + case EVID_VE1_PILLAR: Matrix_Scale(gGfxMatrix, 0.6f, 0.6f, 0.6f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_VE1_9011200); + gSPDisplayList(gMasterDisp++, aVe1PillarDL); break; - case EVID_81: + case EVID_VE1_BLOCKER: if (this->fwork[15] > 0.001f) { Matrix_Scale(gGfxMatrix, this->fwork[15], this->fwork[15], this->fwork[15], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); Texture_BlendRGBA16(this->fwork[16], 16 * 11, D_VE1_9003890, D_VE1_9003DF0, D_VE1_9003330); - gSPDisplayList(gMasterDisp++, D_VE1_9002CF0); + gSPDisplayList(gMasterDisp++, aVe1BlockerDL); } break; - case EVID_82: + case EVID_MA_LASER_TURRET: gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - gSPDisplayList(gMasterDisp++, D_MA_600DA10); + gSPDisplayList(gMasterDisp++, aMaLaserTurretDL); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); break; - case EVID_AQ_CLAM: + case EVID_AQ_OYSTER: Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 3.0f, MTXF_APPLY); - Animation_GetFrameData(&aAqOysterAnim, this->animFrame, sp114); - Animation_DrawSkeleton(1, aAqOysterSkel, sp114, NULL, NULL, this, &gIdentityMatrix); + Animation_GetFrameData(&aAqOysterAnim, this->animFrame, frameTable); + Animation_DrawSkeleton(1, aAqOysterSkel, frameTable, NULL, NULL, this, &gIdentityMatrix); break; case EVID_BILL: - gSPDisplayList(gMasterDisp++, D_D00B880); + gSPDisplayList(gMasterDisp++, aBillShipDL); Actor_DrawEngineAndContrails(this); break; case EVID_KATT: - gSPDisplayList(gMasterDisp++, D_D009A40); + gSPDisplayList(gMasterDisp++, aKattShipDL); Actor_DrawEngineAndContrails(this); break; case EVID_AQ_STARFISH: RCP_SetupDL(&gMasterDisp, SETUPDL_22); - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, this->unk_046, this->unk_046, this->unk_046, 255); - gSPDisplayList(gMasterDisp++, D_AQ_6008970); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, this->work_046, this->work_046, this->work_046, 255); + gSPDisplayList(gMasterDisp++, aAqStarfishDL); break; - case EVID_89: + case EVID_AQ_SHELL: RCP_SetupDL(&gMasterDisp, SETUPDL_21); - gSPDisplayList(gMasterDisp++, D_AQ_6000E10); + gSPDisplayList(gMasterDisp++, aAqShellDL); break; case EVID_ANDROSS_GATE: case EVID_ANDROSS_GATE_2: - Andross_8018769C(this); + Andross_Gate_Draw(this); break; case EVID_SX_WARP_ENMY: RCP_SetupDL(&gMasterDisp, SETUPDL_35); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, 143); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 0); - gSPDisplayList(gMasterDisp++, D_WZ_7000000); + gSPDisplayList(gMasterDisp++, aWzSxEnemy1DL); break; case EVID_KILLER_BEE: - Animation_GetFrameData(&D_ENMY_SPACE_4000080, this->animFrame, sp114); - Animation_DrawSkeleton(1, D_ENMY_SPACE_400014C, sp114, NULL, NULL, this, &gIdentityMatrix); + Animation_GetFrameData(&aKillerBeeAnim, this->animFrame, frameTable); + Animation_DrawSkeleton(1, aKillerBeeSkel, frameTable, NULL, NULL, this, &gIdentityMatrix); break; case EVID_FFF: @@ -4186,261 +4203,263 @@ void ActorEvent_Draw(ActorEvent* this) { } if ((gReflectY > 0) && ((this->iwork[12] >= TEAM_ID_FALCO) && (this->iwork[12] < TEAM_ID_MAX))) { - Vec3f sp58 = { 0.0f, 0.0f, 0.0f }; + Vec3f src = { 0.0f, 0.0f, 0.0f }; if ((this->iwork[12] == TEAM_ID_KATT) || (this->iwork[12] == TEAM_ID_BILL)) { - Matrix_MultVec3f(gGfxMatrix, &sp58, &gTeamArrowsViewPos[this->iwork[12] + 4]); + Matrix_MultVec3f(gGfxMatrix, &src, &gTeamArrowsViewPos[this->iwork[12] + 4]); } else { - Matrix_MultVec3f(gGfxMatrix, &sp58, &gTeamArrowsViewPos[this->iwork[12]]); + Matrix_MultVec3f(gGfxMatrix, &src, &gTeamArrowsViewPos[this->iwork[12]]); } } break; } } -void func_enmy2_800763A4(Actor* actor) { - s32 var_s0; +void func_enmy2_800763A4(Actor* this) { + s32 i; s32 sp60; - s32 sp5C; - f32 sp58; - Vec3f sp4C; + s32 triangleIndex; + f32 floorHeight; + Vec3f vel; s32 pad; - if (actor->eventType == EVID_27) { - actor->obj.pos.y -= actor->vel.y; - actor->obj.status = OBJ_ACTIVE; - func_effect_8007D0E0(actor->obj.pos.x - actor->vel.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z - actor->vel.z, - actor->scale * 5.0f); - actor->timer_0C2 = 10000; + if (this->eventType == EVID_SX_LASER) { + this->obj.pos.y -= this->vel.y; + this->obj.status = OBJ_ACTIVE; + func_effect_8007D0E0(this->obj.pos.x - this->vel.x, this->obj.pos.y + 30.0f, this->obj.pos.z - this->vel.z, + this->scale * 5.0f); + this->timer_0C2 = 10000; return; } - if (actor->timer_0BE != 0) { - actor->vel.z = 0.0f; - actor->vel.x = 0.0f; - actor->vel.y = 0.0f; + if (this->timer_0BE != 0) { + this->vel.z = 0.0f; + this->vel.x = 0.0f; + this->vel.y = 0.0f; - if (actor->timer_0BE == 1) { - Object_Kill(&actor->obj, actor->sfxSource); - Actor_Despawn(actor); + if (this->timer_0BE == 1) { + Object_Kill(&this->obj, this->sfxSource); + Actor_Despawn(this); if (gLevelMode == LEVELMODE_ALL_RANGE) { - D_ctx_80177F20[actor->index + 1] = actor->obj.pos.x; - D_ctx_80178028[actor->index + 1] = actor->obj.pos.z; - D_ctx_80178130[actor->index + 1] = 1001.0f; + D_ctx_80177F20[this->index + 1] = this->obj.pos.x; + D_ctx_80178028[this->index + 1] = this->obj.pos.z; + D_ctx_80178130[this->index + 1] = 1001.0f; } return; } } else { if ((gLevelType == LEVELTYPE_PLANET) || (gCurrentLevel == LEVEL_BOLSE)) { - actor->gravity = 0.4f; + this->gravity = 0.4f; } - switch (actor->timer_04C) { + + switch (this->work_04C) { case 0: case 1: - if ((actor->index % 2) != 0) { - actor->obj.rot.z -= 8.0f; + if ((this->index % 2) != 0) { + this->obj.rot.z -= 8.0f; } else { - actor->obj.rot.z += 8.0f; + this->obj.rot.z += 8.0f; } break; case 2: - actor->obj.rot.y += 5.0f; - actor->obj.rot.x += 7.3f; + this->obj.rot.y += 5.0f; + this->obj.rot.x += 7.3f; break; case 3: - actor->obj.rot.y += 6.0f; - actor->obj.rot.x += 18.3f; - actor->gravity = 0.7f; + this->obj.rot.y += 6.0f; + this->obj.rot.x += 18.3f; + this->gravity = 0.7f; break; case 4: - actor->obj.rot.x += (-90.0f - actor->obj.rot.x) * 0.1f; + this->obj.rot.x += (-90.0f - this->obj.rot.x) * 0.1f; break; } - if (((actor->timer_0BC % 4U) == 1) && (actor->eventType != EVID_13) && (actor->eventType != EVID_61)) { - func_effect_8007D24C(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 2.2f); + if (((this->timer_0BC % 4U) == 1) && (this->eventType != EVID_ME_METEOR_1) && + (this->eventType != EVID_ME_METEOR_4)) { + func_effect_8007D24C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 2.2f); } - if (gUseDynaFloor && - Play_CheckDynaFloorCollision(&sp58, &sp5C, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z)) { - Effect386_Spawn1(actor->obj.pos.x, sp58 + 20.0f, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, actor->scale * 3.0f, - 5); - Effect_Effect381_Spawn(actor->obj.pos.x, sp58, actor->obj.pos.z, 2.0f); - actor->timer_0BE = 2; - Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); + if (gUseDynaFloor && Play_CheckDynaFloorCollision(&floorHeight, &triangleIndex, this->obj.pos.x, + this->obj.pos.y, this->obj.pos.z)) { + Effect386_Spawn1(this->obj.pos.x, floorHeight + 20.0f, this->obj.pos.z, 0.0f, 0.0f, 0.0f, + this->scale * 3.0f, 5); + Effect_Effect381_Spawn(this->obj.pos.x, floorHeight, this->obj.pos.z, 2.0f); + this->timer_0BE = 2; + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); return; } if (gGroundType == 4) { - if (Ground_801B6AEC(actor->obj.pos.x, actor->obj.pos.y - 10.0f, actor->obj.pos.z + gPathProgress) != 0) { - func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y + 20.0f, actor->obj.pos.z, actor->scale * 6.0f); - Effect386_Spawn1(actor->obj.pos.x - actor->vel.x, actor->obj.pos.y + 30.0f, - actor->obj.pos.z - actor->vel.z, 0.0f, 0.0f, 0.0f, actor->scale * 4.0f, 20); - func_enmy_80062C38(actor->obj.pos.x, actor->obj.pos.z); - actor->timer_0BE = 2; - Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); + if (Ground_801B6AEC(this->obj.pos.x, this->obj.pos.y - 10.0f, this->obj.pos.z + gPathProgress) != 0) { + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y + 20.0f, this->obj.pos.z, this->scale * 6.0f); + Effect386_Spawn1(this->obj.pos.x - this->vel.x, this->obj.pos.y + 30.0f, this->obj.pos.z - this->vel.z, + 0.0f, 0.0f, 0.0f, this->scale * 4.0f, 20); + func_enmy_80062C38(this->obj.pos.x, this->obj.pos.z); + this->timer_0BE = 2; + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); return; } } else { - sp4C.x = actor->vel.x; - sp4C.y = actor->vel.y; - sp4C.z = actor->vel.z; + vel.x = this->vel.x; + vel.y = this->vel.y; + vel.z = this->vel.z; - sp60 = Object_CheckCollision(actor->index, &actor->obj.pos, &sp4C, 0); + sp60 = Object_CheckCollision(this->index, &this->obj.pos, &vel, 0); - if ((sp60 != 0) || (actor->obj.pos.y < (gGroundHeight + 30.0f))) { - if ((Rand_ZeroOne() < 0.5f) && (actor->timer_04C < 3) && (gLevelType == LEVELTYPE_PLANET) && + if ((sp60 != 0) || (this->obj.pos.y < (gGroundHeight + 30.0f))) { + if ((Rand_ZeroOne() < 0.5f) && (this->work_04C < 3) && (gLevelType == LEVELTYPE_PLANET) && (sp60 != 999) && (gGroundSurface != SURFACE_WATER) && - ((actor->vel.z < -20.0f) || (actor->vel.z > 0.0f))) { + ((this->vel.z < -20.0f) || (this->vel.z > 0.0f))) { if (gCurrentLevel == LEVEL_FORTUNA) { - func_enmy2_8006BF7C(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z - actor->vel.z); - func_enmy_80062C38(actor->obj.pos.x, actor->obj.pos.z); + func_enmy2_8006BF7C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z - this->vel.z); + func_enmy_80062C38(this->obj.pos.x, this->obj.pos.z); } - actor->obj.pos.y -= actor->vel.y; - actor->vel.y = RAND_FLOAT(10.0f); - actor->timer_04C = 3; + this->obj.pos.y -= this->vel.y; + this->vel.y = RAND_FLOAT(10.0f); + this->work_04C = 3; if (gLevelMode == LEVELMODE_ALL_RANGE) { - func_effect_8007D2C8(actor->obj.pos.x - actor->vel.x, actor->obj.pos.y, - actor->obj.pos.z - actor->vel.z, actor->scale * 3.0f); + func_effect_8007D2C8(this->obj.pos.x - this->vel.x, this->obj.pos.y, + this->obj.pos.z - this->vel.z, this->scale * 3.0f); } - func_effect_8007D2C8(actor->obj.pos.x - actor->vel.x, actor->obj.pos.y, - actor->obj.pos.z - actor->vel.z, actor->scale * 3.0f); + func_effect_8007D2C8(this->obj.pos.x - this->vel.x, this->obj.pos.y, this->obj.pos.z - this->vel.z, + this->scale * 3.0f); - if ((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->aiType < AI360_KATT)) { - Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); + if ((this->obj.id == OBJ_ACTOR_ALLRANGE) && (this->aiType < AI360_KATT)) { + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_M); } else { - Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); } - if ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->eventType == EVID_SLIPPY_METEO)) { - if (actor->fwork[17] < 360.0f) { - Play_SpawnDebris(1, actor->obj.pos.x + 20.0f, actor->obj.pos.y, actor->obj.pos.z); - actor->fwork[17] = 777.0f; + if ((this->obj.id == OBJ_ACTOR_EVENT) && (this->eventType == EVID_ME_SLIPPY)) { + if (this->fwork[17] < 360.0f) { + Play_SpawnDebris(1, this->obj.pos.x + 20.0f, this->obj.pos.y, this->obj.pos.z); + this->fwork[17] = 777.0f; } - if (actor->fwork[18] < 360.0f) { - Play_SpawnDebris(0, actor->obj.pos.x - 20.0f, actor->obj.pos.y, actor->obj.pos.z); - actor->fwork[18] = 777.0f; + if (this->fwork[18] < 360.0f) { + Play_SpawnDebris(0, this->obj.pos.x - 20.0f, this->obj.pos.y, this->obj.pos.z); + this->fwork[18] = 777.0f; } } } else { - if ((actor->obj.pos.y < (gGroundHeight + 30.0f)) && (gLevelType == LEVELTYPE_PLANET)) { - actor->vel.z = 0.0f; + if ((this->obj.pos.y < (gGroundHeight + 30.0f)) && (gLevelType == LEVELTYPE_PLANET)) { + this->vel.z = 0.0f; if (gGroundSurface == SURFACE_WATER) { - Effect_Effect367_Spawn(actor->obj.pos.x, gGroundHeight + 2.0f, actor->obj.pos.z, 3.0f, - 20.0f, 0); - Effect_Effect367_Spawn(actor->obj.pos.x, gGroundHeight + 2.0f, actor->obj.pos.z, 3.0f, - 20.0f, 10); - Effect_Effect367_Spawn(actor->obj.pos.x, gGroundHeight + 2.0f, actor->obj.pos.z, 3.0f, - 20.0f, 20); - Effect_Effect372_Spawn2(actor->obj.pos.x, gGroundHeight, actor->obj.pos.z, 0.1f, 3.0f); + Effect_Effect367_Spawn(this->obj.pos.x, gGroundHeight + 2.0f, this->obj.pos.z, 3.0f, 20.0f, + 0); + Effect_Effect367_Spawn(this->obj.pos.x, gGroundHeight + 2.0f, this->obj.pos.z, 3.0f, 20.0f, + 10); + Effect_Effect367_Spawn(this->obj.pos.x, gGroundHeight + 2.0f, this->obj.pos.z, 3.0f, 20.0f, + 20); + Effect_Effect372_Spawn2(this->obj.pos.x, gGroundHeight, this->obj.pos.z, 0.1f, 3.0f); } else { - PlayerShot_SpawnEffect344(actor->obj.pos.x, 3.0f, actor->obj.pos.z, actor->obj.pos.x, - actor->obj.pos.z, 0.0f, 0.0f, 90.0f, 6.5f, 0, 0); + PlayerShot_SpawnEffect344(this->obj.pos.x, 3.0f, this->obj.pos.z, this->obj.pos.x, + this->obj.pos.z, 0.0f, 0.0f, 90.0f, 6.5f, 0, 0); } - Effect_Effect390_Spawn(actor->obj.pos.x, 20.0f, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, - actor->scale * 0.05f, 30); + Effect_Effect390_Spawn(this->obj.pos.x, 20.0f, this->obj.pos.z, 0.0f, 0.0f, 0.0f, + this->scale * 0.05f, 30); if ((gCurrentLevel == LEVEL_FORTUNA) || (gCurrentLevel == LEVEL_VENOM_2)) { - Effect_Effect387_Spawn(actor->obj.pos.x, gGroundHeight + 30.0f, actor->obj.pos.z, 3.0f, 60); + Effect_Effect387_Spawn(this->obj.pos.x, gGroundHeight + 30.0f, this->obj.pos.z, 3.0f, 60); if (gCurrentLevel == LEVEL_FORTUNA) { - func_enmy_80062C38(actor->obj.pos.x, actor->obj.pos.z); + func_enmy_80062C38(this->obj.pos.x, this->obj.pos.z); } } } - actor->obj.pos.y -= actor->vel.y; - func_effect_8007D0E0(actor->obj.pos.x - actor->vel.x, actor->obj.pos.y + 30.0f, - actor->obj.pos.z - actor->vel.z, actor->scale * 5.0f); + this->obj.pos.y -= this->vel.y; + func_effect_8007D0E0(this->obj.pos.x - this->vel.x, this->obj.pos.y + 30.0f, + this->obj.pos.z - this->vel.z, this->scale * 5.0f); if (gLevelMode == LEVELMODE_ALL_RANGE) { - Effect386_Spawn1(actor->obj.pos.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z, actor->vel.x, - 10.0f, actor->vel.z, actor->scale * 3.0f, 20); + Effect386_Spawn1(this->obj.pos.x, this->obj.pos.y + 30.0f, this->obj.pos.z, this->vel.x, 10.0f, + this->vel.z, this->scale * 3.0f, 20); if (sp60 == 999) { - Effect_Effect387_Spawn(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, - actor->scale * 3.0f, 70); + Effect_Effect387_Spawn(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, + this->scale * 3.0f, 70); } - for (var_s0 = 0; var_s0 < 4; var_s0++) { + for (i = 0; i < 4; i++) { if (Rand_ZeroOne() < 0.7f) { if (gCurrentLevel == LEVEL_FORTUNA) { - Play_SpawnDebris(4, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z); + Play_SpawnDebris(4, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z); } else { - Effect_Effect357_Spawn50(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, - 1.0f); + Effect_Effect357_Spawn50(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1.0f); } } } } else { - Effect386_Spawn1(actor->obj.pos.x - actor->vel.x, actor->obj.pos.y + 30.0f, - (actor->obj.pos.z - actor->vel.z) + 48.0f, 0.0f, 0.0f, 0.0f, - actor->scale * 3.0f, 5); + Effect386_Spawn1(this->obj.pos.x - this->vel.x, this->obj.pos.y + 30.0f, + (this->obj.pos.z - this->vel.z) + 48.0f, 0.0f, 0.0f, 0.0f, this->scale * 3.0f, + 5); } - actor->timer_0BE = 2; + this->timer_0BE = 2; - if ((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->aiType < AI360_KATT)) { - Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); + if ((this->obj.id == OBJ_ACTOR_ALLRANGE) && (this->aiType < AI360_KATT)) { + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_M); } else { - Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); } } } } - if ((actor->dmgType != DMG_NONE) || (actor->timer_0BC == 0) || - ((actor->itemDrop != DROP_NONE) && (actor->obj.id != OBJ_ACTOR_ALLRANGE))) { + if ((this->dmgType != DMG_NONE) || (this->timer_0BC == 0) || + ((this->itemDrop != DROP_NONE) && (this->obj.id != OBJ_ACTOR_ALLRANGE))) { if (gLevelMode == LEVELMODE_ALL_RANGE) { - for (var_s0 = 0; var_s0 < 4; var_s0++) { + for (i = 0; i < 4; i++) { if (Rand_ZeroOne() < 0.7f) { if (gCurrentLevel == LEVEL_FORTUNA) { - Play_SpawnDebris(4, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z); + Play_SpawnDebris(4, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z); } else { - Effect_Effect357_Spawn50(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 1.0f); + Effect_Effect357_Spawn50(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1.0f); } } } - Effect386_Spawn1(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, actor->vel.x, actor->vel.y, - actor->vel.z, 5.0f, 15); - func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z - actor->vel.z, 8.0f); + Effect386_Spawn1(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, + this->vel.z, 5.0f, 15); + func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z - this->vel.z, 8.0f); } else { - if ((actor->eventType != EVID_13) && (actor->eventType != EVID_61)) { - func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z - actor->vel.z, - actor->scale * 5.0f); + if ((this->eventType != EVID_ME_METEOR_1) && (this->eventType != EVID_ME_METEOR_4)) { + func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z - this->vel.z, + this->scale * 5.0f); } - if (actor->eventType == EVID_36) { - Effect386_Spawn1(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, actor->vel.x, actor->vel.y, - actor->vel.z, 5.0f, 15); + if (this->eventType == EVID_TI_BOMBER) { + Effect386_Spawn1(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, + this->vel.z, 5.0f, 15); } } - actor->timer_0BE = 2; + this->timer_0BE = 2; - if ((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->aiType < AI360_KATT)) { - Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); + if ((this->obj.id == OBJ_ACTOR_ALLRANGE) && (this->aiType < AI360_KATT)) { + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_M); } else { - Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); } } } if (gLevelMode == LEVELMODE_ALL_RANGE) { - D_ctx_80177F20[actor->index + 1] = actor->obj.pos.x; - D_ctx_80178028[actor->index + 1] = actor->obj.pos.z; - D_ctx_80178130[actor->index + 1] = actor->rot_0F4.y + 180.0f; + D_ctx_80177F20[this->index + 1] = this->obj.pos.x; + D_ctx_80178028[this->index + 1] = this->obj.pos.z; + D_ctx_80178130[this->index + 1] = this->rot_0F4.y + 180.0f; } - if (actor->obj.id == OBJ_ACTOR_ALLRANGE) { - ActorAllRange_SetShadowData(actor); + if (this->obj.id == OBJ_ACTOR_ALLRANGE) { + ActorAllRange_SetShadowData(this); } } void ActorEvent_Dying(ActorEvent* this) { - if ((this->eventType == EVID_48) || (this->eventType == EVID_49) || (this->eventType == EVID_50)) { + if ((this->eventType == EVID_SY_ROBOT_1) || (this->eventType == EVID_SY_ROBOT_2) || + (this->eventType == EVID_SY_ROBOT_3)) { SectorY_SyRobot_Update(this); } else { func_enmy2_800763A4(this); diff --git a/src/engine/fox_hud.c b/src/engine/fox_hud.c index 825ce5a7..8d1dec54 100644 --- a/src/engine/fox_hud.c +++ b/src/engine/fox_hud.c @@ -1778,7 +1778,7 @@ void func_hud_80089AF4(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 0, 255); Matrix_Scale(gGfxMatrix, 54.0f, 54.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_STAR_WOLF_F014180); + gSPDisplayList(gMasterDisp++, aStarWolfRadarMarkDL); } void func_hud_80089B94(void) { @@ -2461,7 +2461,7 @@ s32 func_hud_8008B774(void) { (gCurrentLevel == LEVEL_SECTOR_Y))) { for (i = 0; i < ARRAY_COUNT(gActors); i++) { if ((gActors[i].obj.status == OBJ_ACTIVE) && (gActors[i].iwork[12] == temp)) { - if ((gActors[i].eventType == EVID_SLIPPY_METEO) || (gActors[i].eventType == EVID_TEAMMATE) || + if ((gActors[i].eventType == EVID_ME_SLIPPY) || (gActors[i].eventType == EVID_TEAMMATE) || ((gActors[i].obj.id == OBJ_ACTOR_TEAM_BOSS) && ((gActors[i].aiType == AI360_FALCO) || (gActors[i].aiType == AI360_SLIPPY) || (gActors[i].aiType == AI360_PEPPY)))) { @@ -4525,7 +4525,7 @@ bool func_hud_800927A0(ActorTeamBoss* this) { bool ret = false; if (this->iwork[11] == 0) { - this->unk_046 = 0; + this->work_046 = 0; this->iwork[11] = 1; this->iwork[1] = 1; this->vwork[29].x = this->obj.rot.x; @@ -4537,22 +4537,22 @@ bool func_hud_800927A0(ActorTeamBoss* this) { Math_SmoothStepToAngle(&this->vwork[29].x, 0.0f, 0.1f, 5.0f, 0.0f); sp50 = Math_RadToDeg(Math_Atan2F(0.0f - this->obj.pos.x, 0.0f - this->obj.pos.z)); - switch (this->unk_046) { + switch (this->work_046) { case 0: - if (this->unk_04A != 0) { + if (this->work_04A != 0) { this->timer_0BC = 30; } else { this->timer_0BC = 10; } - this->unk_046 = 1; + this->work_046 = 1; if (this->fwork[19] > 180.0f) { this->fwork[19] = this->fwork[19] - 360.0f; } case 1: if (this->timer_0BC == 0) { - this->unk_046 = 2; - if (this->unk_04A != 0) { + this->work_046 = 2; + if (this->work_04A != 0) { this->timer_0BC = 80; } else { this->timer_0BC = 60; @@ -4589,7 +4589,7 @@ bool func_hud_800927A0(ActorTeamBoss* this) { this->fwork[20] = -180.0f; } this->iwork[1] = 1; - this->unk_046 = 3; + this->work_046 = 3; } this->fwork[28] -= 0.2f; break; @@ -4607,7 +4607,7 @@ bool func_hud_800927A0(ActorTeamBoss* this) { Math_SmoothStepToF(&this->fwork[16], -sp54, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&this->fwork[27], -sp54, 0.3f, 100.0f, 0.0f); - if (this->unk_04A != 0) { + if (this->work_04A != 0) { Math_SmoothStepToAngle(&this->rot_0F4.y, sp50, 0.1f, 2.0f, 0.0f); } @@ -4622,7 +4622,7 @@ bool func_hud_800927A0(ActorTeamBoss* this) { if (this->timer_0BC == 0) { ret = true; this->iwork[11] = 0; - this->unk_046 = 0; + this->work_046 = 0; this->fwork[28] = 0.0f; this->fwork[20] = 0.0f; this->fwork[29] = 1.0f; @@ -4689,7 +4689,7 @@ void ActorTeamBoss_Update(ActorTeamBoss* this) { this->health = gTeamShields[this->aiType]; - switch (this->unk_048) { + switch (this->work_048) { case 0: func_hud_800914FC(this); func_hud_80091864(this); @@ -4724,29 +4724,29 @@ void ActorTeamBoss_Update(ActorTeamBoss* this) { if ((this->iwork[10] != 0) && (gLevelMode == LEVELMODE_ALL_RANGE) && (this->iwork[9] == 0) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) { - this->unk_048 = 2; - this->unk_04A = 0; + this->work_048 = 2; + this->work_04A = 0; } if ((gLevelMode == LEVELMODE_ALL_RANGE) && (fabsf(this->obj.pos.x > var_fv1) || fabsf(this->obj.pos.z > var_fv1)) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) { - this->unk_048 = 2; - this->unk_04A = 1; + this->work_048 = 2; + this->work_04A = 1; } break; case 1: if (func_hud_800924E0(this) != 0) { - this->unk_048 = 0; + this->work_048 = 0; this->iwork[9] = RAND_INT(30.0f) + 90; } break; case 2: if (func_hud_800927A0(this) != 0) { - this->unk_04A = 0; - this->unk_048 = this->unk_04A; + this->work_04A = 0; + this->work_048 = this->work_04A; this->iwork[9] = RAND_INT(30.0f) + 90; } break; diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index 1605f40c..b49886e4 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -2035,14 +2035,14 @@ void Player_CollisionCheck(Player* player) { Player_ApplyDamage(player, temp_v0, actor->info.damage); } } else if (actor->obj.id == OBJ_ACTOR_EVENT) { - if (actor->eventType == EVID_42) { + if (actor->eventType == EVID_SY_SHIP_2) { temp_v0 = Player_CheckPolyCollision(player, ACTOR_EVENT_ID, actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, actor->obj.rot.x, actor->obj.rot.y, actor->obj.rot.z); if (temp_v0 != 0) { Player_ApplyDamage(player, temp_v0, actor->info.damage); } - } else if (actor->eventType == EVID_63) { + } else if (actor->eventType == EVID_ME_BIG_METEOR) { spfD4.x = fabsf(actor->obj.pos.x - player->pos.x); spfD4.y = fabsf(actor->obj.pos.y - player->pos.y); spfD4.z = fabsf(actor->obj.pos.z - player->trueZpos); @@ -2059,7 +2059,7 @@ void Player_CollisionCheck(Player* player) { if ((temp_v0 < 0) && (actor->eventType == EVID_SX_WARP_GATE)) { actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SX_6032328); if (gRingPassCount >= 0) { - actor->unk_046 = 2; + actor->work_046 = 2; gRingPassCount++; if (gRingPassCount == 3) { Radio_PlayMessage(gMsg_ID_5504, RCID_FALCO); diff --git a/src/mods/sfxjukebox.c b/src/mods/sfxjukebox.c index b7d3d728..20ef358b 100644 --- a/src/mods/sfxjukebox.c +++ b/src/mods/sfxjukebox.c @@ -4,7 +4,7 @@ #include "sf64audio_provisional.h" extern s32 spectrumAnalyzerMode; -extern bool D_menu_801B9320; +extern bool sMusicPlaying; extern s32 D_menu_801B9244; extern OptionId D_menu_801B9124; extern s32 D_menu_801B912C; @@ -163,11 +163,11 @@ void Jukebox_Update(void) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); AUDIO_PLAY_SFX(sfx, sfxSource, 4); - D_menu_801B9320 = true; + sMusicPlaying = true; } if (contPress->button & B_BUTTON) { - if (!D_menu_801B9320) { + if (!sMusicPlaying) { AUDIO_PLAY_SFX(NA_SE_ARWING_CANCEL, gDefaultSfxSource, 4); AUDIO_PLAY_BGM(NA_BGM_SELECT); gDrawMode = DRAW_NONE; @@ -180,7 +180,7 @@ void Jukebox_Update(void) { Audio_KillSfxBySource(sfxSource); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); - D_menu_801B9320 = false; + sMusicPlaying = false; } } diff --git a/src/mods/spawner.c b/src/mods/spawner.c index b7cb964d..142fb6c0 100644 --- a/src/mods/spawner.c +++ b/src/mods/spawner.c @@ -345,7 +345,7 @@ void Spawner(void) { sObjType++; switch (sObjType) { case OBJ_SPAWN_EVENT: - sObjId = EVID_0; + sObjId = EVID_VENOM_FIGHTER_1; break; case OBJ_SPAWN_SCENERY: sObjId = OBJ_SCENERY_CO_STONE_ARCH; diff --git a/src/overlays/ovl_ending/fox_end1.c b/src/overlays/ovl_ending/fox_end1.c index 9d8a5832..24aee6be 100644 --- a/src/overlays/ovl_ending/fox_end1.c +++ b/src/overlays/ovl_ending/fox_end1.c @@ -1470,7 +1470,7 @@ void Ending_8018B6D8(Actor* actor, s32 arg1) { actor->iwork[1] = 100; actor->fwork[0] = 30.0f; actor->iwork[0] = sp20[arg1]; - actor->unk_046 = arg1; + actor->work_046 = arg1; } void Ending_8018B860(void) { @@ -1843,7 +1843,7 @@ void Ending_8018C21C(void) { Matrix_RotateX(gGfxMatrix, gActors[i].obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, gActors[i].obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_D00B880); + gSPDisplayList(gMasterDisp++, aBillShipDL); Matrix_Push(&gGfxMatrix); RCP_SetupDL(&gMasterDisp, SETUPDL_49); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 64); @@ -1857,7 +1857,7 @@ void Ending_8018C21C(void) { spE4 = gActors[i].fwork[1]; RCP_SetupDL(&gMasterDisp, SETUPDL_41); - switch (gActors[i].unk_046) { + switch (gActors[i].work_046) { case 0: gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 200, 0, 0, gActors[i].iwork[1]); break; diff --git a/src/overlays/ovl_ending/fox_end2.c b/src/overlays/ovl_ending/fox_end2.c index dd652136..6c37abed 100644 --- a/src/overlays/ovl_ending/fox_end2.c +++ b/src/overlays/ovl_ending/fox_end2.c @@ -554,7 +554,7 @@ void Ending_8018F64C(u32 arg0, AssetInfo* asset) { } Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_D009A40); + gSPDisplayList(gMasterDisp++, aKattShipDL); RCP_SetupDL(&gMasterDisp, SETUPDL_67); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY); @@ -621,7 +621,7 @@ void Ending_8018FC60(u32 arg0, AssetInfo* asset) { } Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_D00B880); + gSPDisplayList(gMasterDisp++, aBillShipDL); RCP_SetupDL(&gMasterDisp, SETUPDL_67); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -50.0f, MTXF_APPLY); diff --git a/src/overlays/ovl_i1/fox_co.c b/src/overlays/ovl_i1/fox_co.c index 74a0ae9a..4dff00a7 100644 --- a/src/overlays/ovl_i1/fox_co.c +++ b/src/overlays/ovl_i1/fox_co.c @@ -516,8 +516,8 @@ void Corneria_CoGranga_DecideNextAction(CoGranga* this) { } void Corneria_80188C7C(CoGranga* this) { - if (this->unk_044 == 0) { - this->unk_044++; + if (this->work_044 == 0) { + this->work_044++; this->fwork[GRANGA_FWK_12] *= -0.2f; AUDIO_PLAY_SFX(NA_SE_OB_METAL_BOUND_L, this->sfxSource, 4); func_enmy_80062B60(sCoGrangaWork[GRANGA_WORK_56], sCoGrangaWork[GRANGA_WORK_58], 0, 30.0f); diff --git a/src/overlays/ovl_i1/fox_ve1.c b/src/overlays/ovl_i1/fox_ve1.c index 91a0dc57..045259ff 100644 --- a/src/overlays/ovl_i1/fox_ve1.c +++ b/src/overlays/ovl_i1/fox_ve1.c @@ -1424,7 +1424,7 @@ void Venom1_Ve1Golemech_Update(Ve1Golemech* this) { actor->obj.rot.z = D_i1_8019B838[spF4].unk_30[0].z; actor->state = 57; actor->iwork[0] = 0; - actor->unk_048 = spF4; + actor->work_048 = spF4; if (this->swork[25] == 0) { actor->vel.x = RAND_FLOAT_CENTERED(5.0f); actor->vel.y = 10.0f + RAND_FLOAT_CENTERED(2.0f); diff --git a/src/overlays/ovl_i2/fox_me.c b/src/overlays/ovl_i2/fox_me.c index 7807287e..c0aab937 100644 --- a/src/overlays/ovl_i2/fox_me.c +++ b/src/overlays/ovl_i2/fox_me.c @@ -80,15 +80,15 @@ void Meteo_MeMeteor2_Update(MeMeteor2* this) { this->obj.rot.y += 1.7f; this->obj.rot.x += 3.3f; - this->unk_046 -= 15; + this->work_046 -= 15; - if (this->unk_046 < 0) { - this->unk_046 = 0; + if (this->work_046 < 0) { + this->work_046 = 0; } - this->unk_048 += 8; - if (this->unk_048 > 995) { - this->unk_048 = 995; + this->work_048 += 8; + if (this->work_048 > 995) { + this->work_048 = 995; } if ((this->timer_0BC % 4U) == 1) { @@ -175,15 +175,15 @@ void Meteo_80187B08(MeLaserCannon1* this) { this->obj.rot.y += 7.0f; this->obj.rot.x += 3.3f; - this->unk_046 -= 11; + this->work_046 -= 11; - if (this->unk_046 < 0) { - this->unk_046 = 0; + if (this->work_046 < 0) { + this->work_046 = 0; } - this->unk_048 += 4; - if (this->unk_048 > 995) { - this->unk_048 = 995; + this->work_048 += 4; + if (this->work_048 > 995) { + this->work_048 = 995; } if ((this->timer_0BC % 4) == 0) { @@ -199,7 +199,8 @@ void Meteo_80187B08(MeLaserCannon1* this) { } } -void Meteo_80187C68(Actor* this, f32 x, f32 y, f32 z, f32 arg4, f32 xRot, f32 yRot, s32 timerBC, s32 arg8, s32 objId) { +void Meteo_80187C68(Actor* this, f32 x, f32 y, f32 z, f32 arg4, f32 xRot, f32 yRot, s32 timerBC, s32 eventType, + s32 objId) { Actor_Initialize(this); this->obj.status = OBJ_INIT; this->obj.id = objId; @@ -213,7 +214,7 @@ void Meteo_80187C68(Actor* this, f32 x, f32 y, f32 z, f32 arg4, f32 xRot, f32 yR this->timer_0BC = timerBC; this->timer_0BE = 20; - this->eventType = arg8; + this->eventType = eventType; this->fwork[5] = arg4; Object_SetInfo(&this->info, this->obj.id); } @@ -394,15 +395,15 @@ void Meteo_MeCrusherShield_Update(MeCrusherShield* this) { this->timer_054 = 5; this->swork[0] += 32; - Audio_SetTransposeAndPlaySfx(this->sfxSource, NA_SE_EN_GRN_BEAM_CHARGE, this->unk_04A); + Audio_SetTransposeAndPlaySfx(this->sfxSource, NA_SE_EN_GRN_BEAM_CHARGE, this->work_04A); - this->unk_04A++; - if (this->unk_04A > 7) { - this->unk_04A = 7; + this->work_04A++; + if (this->work_04A > 7) { + this->work_04A = 7; } if (this->swork[0] >= 255) { - this->unk_04A = 0; + this->work_04A = 0; Audio_KillSfxBySource(this->sfxSource); @@ -520,7 +521,7 @@ void Meteo_MeCrusher_Init(MeCrusher* this) { this->fwork[9] = -3000.0f; this->fwork[15] = 8.0f; - i = this->unk_044 = 1; + i = this->work_044 = 1; Boss_Initialize(&gBosses[i]); @@ -1109,7 +1110,7 @@ void Meteo_MeCrusher_Update(MeCrusher* this) { if (this->fwork[0] >= 0.0f) { this->state = 2; this->timer_050 = 50; - gBosses[this->unk_044].state = 1; + gBosses[this->work_044].state = 1; } } @@ -1165,7 +1166,7 @@ void Meteo_MeCrusher_Update(MeCrusher* this) { } } - if (gBosses[this->unk_044].state < 3) { + if (gBosses[this->work_044].state < 3) { var_v0 = 0; if (this->swork[2] == 0) { var_v0 = 1; @@ -1184,14 +1185,14 @@ void Meteo_MeCrusher_Update(MeCrusher* this) { this->obj.rot.z += 0.1f; } if (var_v0 == 4) { - gBosses[this->unk_044].state = 3; + gBosses[this->work_044].state = 3; this->state = 4; this->timer_050 = 250; this->timer_05A = 30; this->fwork[10] = 0; } - if ((this->timer_050 == 0) && (gBosses[this->unk_044].state == 2)) { + if ((this->timer_050 == 0) && (gBosses[this->work_044].state == 2)) { this->fwork[2] = 90.0f; this->timer_050 = D_i2_80195520[var_v0] + 45; AUDIO_PLAY_SFX(NA_SE_EN_SHIELD_ROLL, this->sfxSource, 4); @@ -1199,7 +1200,7 @@ void Meteo_MeCrusher_Update(MeCrusher* this) { if (this->fwork[2] > 0.0f) { this->fwork[2] -= 2.0f; - gBosses[this->unk_044].rot_078.z -= 2.0f; + gBosses[this->work_044].rot_078.z -= 2.0f; } } diff --git a/src/overlays/ovl_i2/fox_sx.c b/src/overlays/ovl_i2/fox_sx.c index cb616ac2..da46ca18 100644 --- a/src/overlays/ovl_i2/fox_sx.c +++ b/src/overlays/ovl_i2/fox_sx.c @@ -168,7 +168,7 @@ void SectorX_SxSlippy_Update(SxSlippy* this) { void SectorX_SxSlippy_Draw(SxSlippy* this) { switch (this->animFrame) { case 0: - gSPDisplayList(gMasterDisp++, D_SX_6020D20); + gSPDisplayList(gMasterDisp++, aSxBaseWallTile1DL); break; case 1: @@ -210,7 +210,7 @@ void SectorX_8018FA04(f32 x, f32 y, f32 z) { actor->obj.pos.y = y; actor->obj.pos.z = z; Object_SetInfo(&actor->info, actor->obj.id); - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SX_60328CC); + actor->info.hitbox = SEGMENTED_TO_VIRTUAL(aSxBaseWallTile1Hitbox); xRot = Math_Atan2F(gPlayer[0].pos.x - x, gPlayer[0].trueZpos - z); pad = sqrtf(SQ(gPlayer[0].pos.x - x) + SQ(gPlayer[0].trueZpos - z)); yRot = -Math_Atan2F(gPlayer[0].pos.y - y, pad); diff --git a/src/overlays/ovl_i3/fox_aq.c b/src/overlays/ovl_i3/fox_aq.c index 58ed5123..9709ce67 100644 --- a/src/overlays/ovl_i3/fox_aq.c +++ b/src/overlays/ovl_i3/fox_aq.c @@ -344,7 +344,7 @@ void Aquas_SetupDebris(ActorDebris* this, Vec3f* pos, Vec3f* rot, f32 xVel, f32 this->obj.id = OBJ_ACTOR_DEBRIS; this->state = state; this->scale = scale; - this->unk_048 = unk48; + this->work_048 = unk48; this->obj.pos = *pos; this->obj.rot = *rot; this->vel.x = xVel; diff --git a/src/overlays/ovl_i3/fox_so.c b/src/overlays/ovl_i3/fox_so.c index c42de722..df8bd2d2 100644 --- a/src/overlays/ovl_i3/fox_so.c +++ b/src/overlays/ovl_i3/fox_so.c @@ -257,8 +257,8 @@ void Solar_SoWave_Update(SoWave* this) { } } - if ((this->unk_046 == 0) || (this->unk_046 == 1)) { - this->unk_046 = 3; + if ((this->work_046 == 0) || (this->work_046 == 1)) { + this->work_046 = 3; Object_SetSfxSourceToPos(this->sfxSource, &this->obj.pos); AUDIO_PLAY_SFX(NA_SE_OB_MAGMA_WAVE, this->sfxSource, 0); } @@ -947,7 +947,7 @@ void Solar_801A0CEC(SoWave* this, f32 xPos, f32 zPos, f32 zVel, s32 unkB8) { this->obj.pos.x = xPos; this->obj.pos.z = zPos; - this->unk_046 = 1; + this->work_046 = 1; this->state = unkB8; this->vel.z = zVel; this->fwork[1] = zVel; @@ -1288,8 +1288,8 @@ void Solar_801A1CD8(ActorDebris* this, f32 xPos, f32 yPos, f32 zPos, f32 xRot, f this->obj.id = OBJ_ACTOR_DEBRIS; this->state = 40; - this->unk_046 = unk46; - this->unk_04A = 3; + this->work_046 = unk46; + this->work_04A = 3; this->obj.pos.x = xPos; this->obj.pos.y = yPos; @@ -1801,7 +1801,7 @@ void Solar_801A3128(SoVulkain* this) { void Solar_801A3468(SoVulkain* this) { this->swork[SO_SWK_0] = 4; - this->unk_048 = 0; + this->work_048 = 0; if ((this->swork[SO_SWK_2] != 0) || (this->swork[SO_SWK_3] != 0)) { if (this->swork[SO_SWK_3] != 0) { @@ -1811,7 +1811,7 @@ void Solar_801A3468(SoVulkain* this) { } } else { if (Rand_ZeroOne() >= 0.5f) { - this->unk_048 = 1; + this->work_048 = 1; this->swork[SO_SWK_1] = 5; } else { this->timer_050 = 0; @@ -1885,7 +1885,7 @@ void Solar_801A3510(SoVulkain* this) { } } - if ((this->unk_048 != 0) && (this->animFrame == 68)) { + if ((this->work_048 != 0) && (this->animFrame == 68)) { this->swork[SO_SWK_1] = 9; this->fwork[SO_FWK_0] = 0.01f; this->animFrame = 20; diff --git a/src/overlays/ovl_i3/fox_zo.c b/src/overlays/ovl_i3/fox_zo.c index aacc4f55..2db978e3 100644 --- a/src/overlays/ovl_i3/fox_zo.c +++ b/src/overlays/ovl_i3/fox_zo.c @@ -488,7 +488,7 @@ void Zoness_ActorDebris_Setup(ActorDebris* this, Vec3f* pos, Vec3f* rot, f32 xVe this->state = state; this->scale = scale; - this->unk_048 = unk48; + this->work_048 = unk48; this->obj.pos = *pos; this->obj.rot = *rot; this->vel.x = xVel; @@ -755,7 +755,7 @@ void Zoness_ZoDodora_Draw2(ZoDodora* this) { s32 k; PosRot* zoDodoraPosRots; - for (i = this->unk_04A = 0; i < 20; i++, hitbox++) { + for (i = this->work_04A = 0; i < 20; i++, hitbox++) { k = (D_i3_801BF56C[i] + this->counter_04E) % 200; zoDodoraPosRots = &gZoDodoraPosRots[k]; @@ -960,7 +960,7 @@ void Zoness_ZGull_Update(ZGull* this) { } this->animFrame++; - if (this->animFrame >= Animation_GetFrameCount(&D_ENMY_PLANET_40057AC)) { + if (this->animFrame >= Animation_GetFrameCount(&aFirebirdAnim)) { this->animFrame = 0; } @@ -1035,8 +1035,8 @@ void Zoness_ZGull_Update(ZGull* this) { } void Zoness_ZGull_Draw(ZGull* this) { - Animation_GetFrameData(&D_ENMY_PLANET_40057AC, this->animFrame, this->vwork); - Animation_DrawSkeleton(1, D_ENMY_PLANET_40058B8, this->vwork, NULL, NULL, &this->index, &gIdentityMatrix); + Animation_GetFrameData(&aFirebirdAnim, this->animFrame, this->vwork); + Animation_DrawSkeleton(1, aFirebirdSkel, this->vwork, NULL, NULL, &this->index, &gIdentityMatrix); } void Zoness_ZoEnergyBall_Init2(ZoEnergyBall* this) { @@ -4620,7 +4620,7 @@ void Zoness_ZoBarrier_Init(ZoBarrier* this) { gActors[i].state = 1; - this->unk_046 = i + 1; + this->work_046 = i + 1; Object_SetInfo(&gActors[i].info, gActors[i].obj.id); gActors[i].info.hitbox = SEGMENTED_TO_VIRTUAL(D_ZO_602C028); break; @@ -4647,8 +4647,8 @@ void Zoness_ZoBarrier_Update(ZoBarrier* this) { } } - if (this->unk_046 != 0) { - otherActor = &gActors[this->unk_046 - 1]; + if (this->work_046 != 0) { + otherActor = &gActors[this->work_046 - 1]; otherActor->obj.pos.y += this->fwork[1] * 0.3f; if (otherActor->obj.pos.y > this->fwork[2] + 370.0f) { otherActor->obj.pos.y = this->fwork[2] + 370.0f; diff --git a/src/overlays/ovl_i4/fox_bo.c b/src/overlays/ovl_i4/fox_bo.c index 36a93e7b..9fe5a6b2 100644 --- a/src/overlays/ovl_i4/fox_bo.c +++ b/src/overlays/ovl_i4/fox_bo.c @@ -1537,7 +1537,7 @@ void Bolse_LevelComplete(Player* player) { actor50->obj.pos.y - RAND_FLOAT(2000.0f), RAND_FLOAT_CENTERED(300.0f) + actor50->obj.pos.z, 5.11f); }; - actor50->unk_046 = 1; + actor50->work_046 = 1; break; case 235: @@ -1673,7 +1673,7 @@ void Bolse_LevelComplete(Player* player) { break; } - if (actor50->unk_046 != 0) { + if (actor50->work_046 != 0) { Math_SmoothStepToF(&actor50->fwork[20], 3.0f, 0.03f, 0.01f, 0); if ((gGameFrameCount % 2U) == 0) { Effect_Effect389_Spawn( diff --git a/src/overlays/ovl_i4/fox_ka.c b/src/overlays/ovl_i4/fox_ka.c index 47b05099..620430d8 100644 --- a/src/overlays/ovl_i4/fox_ka.c +++ b/src/overlays/ovl_i4/fox_ka.c @@ -2652,7 +2652,7 @@ void Katina_EnemyDraw(ActorAllRange* this) { case 1: gSPDisplayList(gMasterDisp++, aKaCornerianFighterDL); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY); - Actor_DrawEngineGlow(this, 0); + Actor_DrawEngineGlow(this, EG_RED); break; } } diff --git a/src/overlays/ovl_i5/fox_ma.c b/src/overlays/ovl_i5/fox_ma.c index 6190f0bb..2d514076 100644 --- a/src/overlays/ovl_i5/fox_ma.c +++ b/src/overlays/ovl_i5/fox_ma.c @@ -1227,7 +1227,7 @@ void Macbeth_MaBoulder_Setup(MaBoulder* this, f32 xPos, f32 yPos, f32 zPos, f32 this->timer_0BE = 20; this->fwork[0] = arg4; this->vel.z = zVel; - this->unk_046 = arg9; + this->work_046 = arg9; Object_SetInfo(&this->info, this->obj.id); } @@ -3111,7 +3111,7 @@ bool Macbeth_801A3C20(f32 arg0) { void Macbeth_MaMaRailroadSwitch_Init(MaRailroadSwitch* this) { this->state = 0; - this->unk_046 = D_i5_801BA1D8; + this->work_046 = D_i5_801BA1D8; D_i5_801BA1D8++; } @@ -3144,7 +3144,7 @@ void Macbeth_MaRailroadSwitch_Update(MaRailroadSwitch* this) { Math_SmoothStepToF(&this->fwork[2], 41.0f, 0.6f, 8.0f, 0.0f); if (this->fwork[2] >= 40.0f) { this->state = 3; - D_i5_801BE308[this->unk_046] = 1; + D_i5_801BE308[this->work_046] = 1; } } else { this->iwork[0]--; @@ -3222,12 +3222,12 @@ void Macbeth_MaRailroadSwitch_Draw(MaRailroadSwitch* this) { void Macbeth_MaBoulder_Init(MaBoulder* this) { this->gravity = 0; - this->unk_04A = this->unk_046; + this->work_04A = this->work_046; this->health = 60; if (this->fwork[0] < 0.0f) { - this->unk_048 = 0; + this->work_048 = 0; } else { - this->unk_048 = 1; + this->work_048 = 1; } } @@ -3243,17 +3243,17 @@ void Macbeth_MaBoulder_Update(MaBoulder* this) { Math_SmoothStepToF(&this->gravity, 5.0f, 0.08f, 1.0f, 0.0f); if (this->obj.pos.y < 80.0f) { - if (this->unk_046 != 0) { + if (this->work_046 != 0) { AUDIO_PLAY_SFX(NA_SE_OB_ROCK_BOUND, this->sfxSource, 0); this->obj.pos.y = 80.0f; if (this->vel.y < 0) { - this->vel.y = -this->vel.y * (this->unk_046 * 0.07f); + this->vel.y = -this->vel.y * (this->work_046 * 0.07f); } this->fwork[0] /= 1.2f + RAND_FLOAT(1.0f) / 2; - this->unk_046--; + this->work_046--; this->vel.z /= 1.5f; - if (this->unk_046 == 0) { + if (this->work_046 == 0) { this->timer_0BE = RAND_INT(30.0f); } } else { @@ -3266,19 +3266,19 @@ void Macbeth_MaBoulder_Update(MaBoulder* this) { } } - if (this->unk_048 != 0) { + if (this->work_048 != 0) { this->obj.rot.z -= 0.5f * this->vel.x; } else { this->obj.rot.z -= 0.5f * this->vel.x; } - if (this->unk_046 != this->unk_04A) { + if (this->work_046 != this->work_04A) { this->obj.rot.x = this->obj.rot.x + (0.1 * this->vel.z); } } - if (this->unk_046 == 7) { - if (this->unk_048 != 0) { + if (this->work_046 == 7) { + if (this->work_048 != 0) { this->obj.rot.z -= 1.0f; } else { this->obj.rot.z += 1.0f; @@ -5835,7 +5835,7 @@ void Macbeth_MaBombDrop_Update(MaBombDrop* this) { this->state = 1; this->timer_0BC = 200; - this->unk_046 = 192; + this->work_046 = 192; this->scale = 2.5f; this->fwork[0] = 2.5f; @@ -5858,8 +5858,8 @@ void Macbeth_MaBombDrop_Update(MaBombDrop* this) { this->scale += ((20.0f - this->scale) * 0.1f); if (this->scale > 19.0f) { this->fwork[0] -= 0.3f; - this->unk_046 -= 20; - if (this->unk_046 < 0) { + this->work_046 -= 20; + if (this->work_046 < 0) { Object_Kill(&this->obj, this->sfxSource); } } diff --git a/src/overlays/ovl_i5/fox_ti.c b/src/overlays/ovl_i5/fox_ti.c index 92915301..9a72a1aa 100644 --- a/src/overlays/ovl_i5/fox_ti.c +++ b/src/overlays/ovl_i5/fox_ti.c @@ -529,7 +529,7 @@ void Titania_TiBoulder_Update(TiBoulder* this) { } } - if (this->unk_046 == 2) { + if (this->work_046 == 2) { this->gravity = 0.0f; Ground_801B6E20(this->obj.pos.x, this->obj.pos.z + gPathProgress, &sp4C, &sp44, &sp48); this->fwork[0] = sp4C; @@ -546,10 +546,10 @@ void Titania_TiBoulder_Update(TiBoulder* this) { temp_fv1 = (this->scale * 50.0f); if (this->obj.pos.y > sp44 + temp_fv1) { - this->unk_046 = 0; + this->work_046 = 0; } else { this->obj.pos.y = sp44 + temp_fv1; - if (this->unk_046 == 0) { + if (this->work_046 == 0) { if (this->vel.y < -6.0f) { AUDIO_PLAY_SFX(NA_SE_OB_BOUND_M, this->sfxSource, 4); } @@ -561,7 +561,7 @@ void Titania_TiBoulder_Update(TiBoulder* this) { if (this->vel.y < 10.0f) { this->vel.y = 0.0f; } - this->unk_046 = 1; + this->work_046 = 1; } else { if ((s32) sp48 == 0) { this->vel.x *= 0.9; @@ -692,7 +692,7 @@ void Titania_TiRasco_Init(TiRasco* this) { actorPtr->obj.pos.x = this->obj.pos.x + sp68[k].x; actorPtr->obj.pos.y = this->obj.pos.y + sp68[k].y; actorPtr->obj.pos.z = this->obj.pos.z + sp68[k].z; - actorPtr->unk_046 = 2; + actorPtr->work_046 = 2; actorPtr->iwork[0] = (uintptr_t) this; actorPtr->iwork[1] = k; Object_SetInfo(&actorPtr->info, actorPtr->obj.id); @@ -800,7 +800,7 @@ void Titania_TiRasco_Update(Actor* this) { Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); if ((this->animFrame >= 26) && (this->animFrame <= 53) && (sp3C != NULL)) { if (this->animFrame == 26) { - sp3C->unk_046 = 2; + sp3C->work_046 = 2; sp3C->vel.x = 0.0f; sp3C->vel.y = 0.0f; sp3C->vel.z = 0.0f; @@ -812,7 +812,7 @@ void Titania_TiRasco_Update(Actor* this) { sp3C->vel.x = dest.x; sp3C->vel.y = dest.y; sp3C->vel.z = dest.z; - sp3C->unk_046 = 0; + sp3C->work_046 = 0; sp3C->iwork[0] = (uintptr_t) NULL; this->iwork[0] = (uintptr_t) NULL; } @@ -827,7 +827,7 @@ void Titania_TiRasco_Update(Actor* this) { if ((this->animFrame >= 26) && (this->animFrame <= 57) && (sp38 != NULL)) { if (this->animFrame == 26) { - sp38->unk_046 = 2; + sp38->work_046 = 2; sp38->vel.x = 0.0f; sp38->vel.y = 0.0f; sp38->vel.z = 0.0f; @@ -840,7 +840,7 @@ void Titania_TiRasco_Update(Actor* this) { sp38->vel.x = dest.x; sp38->vel.y = dest.y; sp38->vel.z = dest.z; - sp38->unk_046 = 0; + sp38->work_046 = 0; sp38->iwork[0] = (uintptr_t) NULL; this->iwork[1] = (uintptr_t) NULL; } @@ -894,7 +894,7 @@ void Titania_TiRasco_Dying(TiRasco* this) { if (actorPtr != NULL) { actorPtr->obj.status = OBJ_ACTIVE; actorPtr->state = 46; - actorPtr->unk_048 = i; + actorPtr->work_048 = i; Matrix_MultVec3f(gCalcMatrix, &var_s1->pos, &sp70); actorPtr->obj.pos.x = this->obj.pos.x + sp70.x; actorPtr->obj.pos.y = this->obj.pos.y + sp70.y; @@ -916,12 +916,12 @@ void Titania_TiRasco_Dying(TiRasco* this) { if (actorPtr != NULL) { actorPtr->iwork[0] = (uintptr_t) NULL; this->iwork[0] = (uintptr_t) NULL; - actorPtr->unk_046 = 0; + actorPtr->work_046 = 0; } actorPtr = (Actor*) this->iwork[1]; if (actorPtr != NULL) { - actorPtr->unk_046 = 0; + actorPtr->work_046 = 0; actorPtr->iwork[0] = (uintptr_t) NULL; this->iwork[1] = (uintptr_t) NULL; } @@ -1611,7 +1611,7 @@ void Titania_TiDesertCrawler_Update(TiDesertCrawler* this) { actorPtr = Game_SpawnActor(OBJ_ACTOR_DEBRIS); if ((actorPtr != NULL) && D_i5_801B7630[i][1] == 1) { actorPtr->state = 47; - actorPtr->unk_048 = i; + actorPtr->work_048 = i; Matrix_MultVec3f(gCalcMatrix, &var_s1->unk_00.pos, &sp158); actorPtr->obj.pos.x = this->obj.pos.x + sp158.x; actorPtr->obj.pos.y = this->obj.pos.y + sp158.y; @@ -1647,7 +1647,7 @@ void Titania_TiDesertCrawler_Update(TiDesertCrawler* this) { actorPtr = Game_SpawnActor(OBJ_ACTOR_DEBRIS); if (actorPtr != NULL) { actorPtr->state = 47; - actorPtr->unk_048 = 9; + actorPtr->work_048 = 9; Matrix_MultVec3f(gCalcMatrix, &var_s1->unk_00.pos, &sp158); actorPtr->obj.pos.x = this->obj.pos.x + sp158.x; actorPtr->obj.pos.y = this->obj.pos.y + sp158.y; @@ -3836,8 +3836,8 @@ void Titania_80193DF0(TiGoras* this) { actor = Game_SpawnActor(OBJ_ACTOR_DEBRIS); if (actor != NULL) { actor->state = 40; - actor->unk_046 = D_i5_801B7770[i][5]; - actor->unk_048 = D_i5_801B7770[i][1]; + actor->work_046 = D_i5_801B7770[i][5]; + actor->work_048 = D_i5_801B7770[i][1]; if (D_i5_801B7770[i][0] == 85) { actor->fwork[0] = 5.0f; actor->fwork[1] = 5.0f; @@ -4215,8 +4215,8 @@ void Titania_80193DF0(TiGoras* this) { actor->obj.pos.y = 0.0f; actor->obj.pos.z = this->obj.pos.z + 2000.0f; actor->info.cullDistance = 5000.0f; - actor->unk_046 = D_i5_801B7770[D_i5_801B8198[i].unk_00][5]; - actor->unk_048 = D_i5_801B7770[D_i5_801B8198[i].unk_00][1]; + actor->work_046 = D_i5_801B7770[D_i5_801B8198[i].unk_00][5]; + actor->work_048 = D_i5_801B7770[D_i5_801B8198[i].unk_00][1]; D_i5_801B8198[i].unk_0C = D_i5_801B8198[i].unk_04; actor->vel.z = this->vel.z; D_i5_801BBF00[D_i5_801B8198[i].unk_00].unk_26 |= 1; @@ -4778,7 +4778,7 @@ void Titania_80193DF0(TiGoras* this) { this->obj.status = OBJ_DYING; D_i5_801BBEF4[12] = 0.0f; this->fwork[35] = 0.0f; - this->unk_044 = 0; + this->work_044 = 0; this->timer_050 = 280; D_i5_801BBEF0[16] = 0; D_i5_801BBEF0[17] = 0; @@ -5477,7 +5477,7 @@ void Titania_801990DC(TiGoras* this) { Vec3f sp60; Actor* actor; - if (this->unk_044 == 0) { + if (this->work_044 == 0) { AUDIO_PLAY_SFX(NA_SE_EN_TIBOSS_DW_CRY, this->sfxSource, 4); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); @@ -5501,8 +5501,8 @@ void Titania_801990DC(TiGoras* this) { if (actor != NULL) { actor->state = 40; - actor->unk_046 = D_i5_801B7770[i][5]; - actor->unk_048 = D_i5_801B7770[i][1]; + actor->work_046 = D_i5_801B7770[i][5]; + actor->work_048 = D_i5_801B7770[i][1]; Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, &D_i5_801BBF00[i].unk_00.pos, &sp60); @@ -5536,7 +5536,7 @@ void Titania_801990DC(TiGoras* this) { D_i5_801BBF00[i].unk_26 = 4; } } - this->unk_044 = 1; + this->work_044 = 1; } else { this->obj.pos.z = gPlayer[0].pos.z; } @@ -5550,9 +5550,9 @@ void Titania_801990DC(TiGoras* this) { actor->state = 40; - actor->unk_046 = 25; - actor->unk_048 = 0; - actor->unk_04A = 4 | 2; + actor->work_046 = 25; + actor->work_048 = 0; + actor->work_04A = 4 | 2; actor->fwork[3] = 0.0f; actor->fwork[4] = -200.0f; @@ -5577,9 +5577,9 @@ void Titania_801990DC(TiGoras* this) { actor->state = 40; - actor->unk_046 = 2; - actor->unk_048 = 1; - actor->unk_04A = 4 | 2; + actor->work_046 = 2; + actor->work_048 = 1; + actor->work_04A = 4 | 2; actor->iwork[1] = (s32) 1; actor->fwork[3] = -150.0f; @@ -5604,9 +5604,9 @@ void Titania_801990DC(TiGoras* this) { actor->state = 40; - actor->unk_046 = 2; - actor->unk_048 = 1; - actor->unk_04A = 4 | 2; + actor->work_046 = 2; + actor->work_048 = 1; + actor->work_04A = 4 | 2; actor->iwork[1] = 2; actor->fwork[3] = 100.0f; diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index ffb856b0..09eecb5b 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -32,14 +32,14 @@ void Andross_80193710(void); void Andross_80187530(ActorEvent* this) { s32 index; - switch (this->unk_048) { + switch (this->work_048) { case 0: break; case 1: this->animFrame += (s32) this->fwork[22]; - if (this->animFrame >= Animation_GetFrameCount(&D_VE2_6014658)) { - this->animFrame = Animation_GetFrameCount(&D_VE2_6014658) - 1; + if (this->animFrame >= Animation_GetFrameCount(&aVe2AndrossGateAnim)) { + this->animFrame = Animation_GetFrameCount(&aVe2AndrossGateAnim) - 1; } break; @@ -59,18 +59,19 @@ void Andross_80187530(ActorEvent* this) { this->obj.rot.z = D_Andross_801A7F68; } -bool Andross_8018767C(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { +bool Andross_Gate_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { if (limbIndex == 13) { *dList = NULL; } return 0; } -void Andross_8018769C(ActorEvent* this) { +void Andross_Gate_Draw(ActorEvent* this) { Vec3f frameTable[20]; - Animation_GetFrameData(&D_VE2_6014658, this->animFrame, frameTable); - Animation_DrawSkeleton(1, D_VE2_6014844, frameTable, Andross_8018767C, NULL, NULL, &gIdentityMatrix); + Animation_GetFrameData(&aVe2AndrossGateAnim, this->animFrame, frameTable); + Animation_DrawSkeleton(1, aVe2AndrossGateSkel, frameTable, Andross_Gate_OverrideLimbDraw, NULL, NULL, + &gIdentityMatrix); } void Andross_801876FC(void) { @@ -2545,7 +2546,7 @@ void Andross_AndAndross_Update(AndAndross* this) { if ((this->animFrame == 45) && (this->swork[8] == 2)) { this->state = 18; this->animFrame = 0; - this->unk_044 = 0; + this->work_044 = 0; this->timer_050 = 40; this->fwork[9] = 0.0f; } @@ -2739,13 +2740,13 @@ void Andross_AndAndross_Update(AndAndross* this) { Math_SmoothStepToF(&this->fwork[9], 1.0f, 1.0f, 0.05f, 0); - switch (this->unk_044) { + switch (this->work_044) { case 0: if (this->timer_050 != 0) { limbCount = Animation_GetFrameData(&D_ANDROSS_C00DE48, 45, spD0); Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, this->fwork[9], 100.0f, 0.0f); } else { - this->unk_044 = 1; + this->work_044 = 1; this->timer_050 = 30; this->swork[9] = 20; this->fwork[9] = 0.0f; @@ -2759,7 +2760,7 @@ void Andross_AndAndross_Update(AndAndross* this) { limbCount = Animation_GetFrameData(&D_ANDROSS_C017430, 0, spD0); Math_SmoothStepToVec3fArray(spD0, D_i6_801A7F80, 1, limbCount, this->fwork[9], 100.0f, 0.0f); } else { - this->unk_044 = 2; + this->work_044 = 2; this->timer_050 = 70; this->fwork[9] = 0.0f; AUDIO_PLAY_SFX(NA_SE_VO_ANDROSS_EXCITE, this->sfxSource, 4); @@ -3661,8 +3662,8 @@ void Andross_AndDoor_Update(AndDoor* this) { this->info.hitbox[17] = -130.0f - (this->unk_44 * 1.6f); this->info.hitbox[27] = -130.0f - (this->unk_44 * 1.6f); this->unk_44 += 2; - if (this->unk_44 >= Animation_GetFrameCount(&D_VE2_6014658)) { - this->unk_44 = Animation_GetFrameCount(&D_VE2_6014658) - 1; + if (this->unk_44 >= Animation_GetFrameCount(&aVe2AndrossGateAnim)) { + this->unk_44 = Animation_GetFrameCount(&aVe2AndrossGateAnim) - 1; } break; } @@ -3679,8 +3680,8 @@ bool Andross_801934EC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* void Andross_AndDoor_Draw(AndDoor* this) { Vec3f frameTable[20]; - Animation_GetFrameData(&D_VE2_6014658, this->unk_44, frameTable); - Animation_DrawSkeleton(1, D_VE2_6014844, frameTable, Andross_801934EC, NULL, NULL, &gIdentityMatrix); + Animation_GetFrameData(&aVe2AndrossGateAnim, this->unk_44, frameTable); + Animation_DrawSkeleton(1, aVe2AndrossGateSkel, frameTable, Andross_801934EC, NULL, NULL, &gIdentityMatrix); } void Andross_AndPassage_Update(AndPassage* this) { @@ -3701,11 +3702,11 @@ bool Andross_801935B4(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* void Andross_AndPassage_Draw(AndPassage* this) { Vec3f frameTable[20]; - Animation_GetFrameData(&D_VE2_6014658, this->unk_44, frameTable); + Animation_GetFrameData(&aVe2AndrossGateAnim, this->unk_44, frameTable); if (gLevelMode == LEVELMODE_ALL_RANGE) { gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); } - Animation_DrawSkeleton(1, D_VE2_6014844, frameTable, Andross_801935B4, NULL, NULL, &gIdentityMatrix); + Animation_DrawSkeleton(1, aVe2AndrossGateSkel, frameTable, Andross_801935B4, NULL, NULL, &gIdentityMatrix); } void Andross_AndPassage_Setup(AndPassage* this, f32 xPos, f32 yPos, f32 zPos, s32 arg4) { @@ -3791,7 +3792,7 @@ void Andross_801939A0(s32 actorIndex) { } if (actorIndex == 1) { actor->state = 1; - actor->unk_046 = 255; + actor->work_046 = 255; actor->animFrame = 1000; } @@ -4442,9 +4443,9 @@ void Andross_80195E44(ActorCutscene* this) { case 2: Math_SmoothStepToF(&this->rot_0F4.x, 180.0f, 0.1f, 1.0f, 0.0f); Math_SmoothStepToF(&this->rot_0F4.y, 200.0f, 0.1f, 1.0f, 0.0f); - this->unk_046 -= 5; - if (this->unk_046 < 0) { - this->unk_046 = 0; + this->work_046 -= 5; + if (this->work_046 < 0) { + this->work_046 = 0; Object_Kill(&this->obj, this->sfxSource); } break; diff --git a/src/overlays/ovl_i6/fox_sy.c b/src/overlays/ovl_i6/fox_sy.c index 9e719808..1b94f002 100644 --- a/src/overlays/ovl_i6/fox_sy.c +++ b/src/overlays/ovl_i6/fox_sy.c @@ -49,7 +49,7 @@ void SectorY_80197B30(ActorCutscene* this, s32 timer) { this->obj.rot.z = gPlayer[0].rot.z; this->state = 5; - this->timer_04C = timer; + this->work_04C = timer; this->iwork[11] = 1; Object_SetInfo(&this->info, this->obj.id); AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); @@ -625,8 +625,8 @@ void SectorY_80199438(SyShogun* this) { if (this->index != 0) { Object_Kill(&gActors[D_ctx_80177A10[9]].obj, gActors[D_ctx_80177A10[9]].sfxSource); if ((gBosses[1].obj.status == OBJ_FREE) || (gBosses[2].obj.status == OBJ_FREE)) { - gBosses[0].unk_04A = 1; - gScenery360[0].info.dList = D_SY_601F3D0; + gBosses[0].work_04A = 1; + gScenery360[0].info.dList = aSySaruzinDL; gScenery360[0].info.drawType = 0; } else { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ACTIVE; @@ -1002,15 +1002,15 @@ void SectorY_8019AEC0(SyShogun* this) { this->vel.x = 0.0f; this->vel.y = 0.0f; this->vel.z = 0.0f; - this->unk_044 = 0; + this->work_044 = 0; } void SectorY_8019AEEC(SyShogun* this) { if ((this->obj.pos.y != 365.0f) && (this->swork[21] != 1)) { - if (this->unk_04A != 0) { - if (this->unk_04A == 1) { + if (this->work_04A != 0) { + if (this->work_04A == 1) { Audio_PlaySequence(SEQ_PLAYER_BGM, NA_BGM_REAL_BOSS, 0, 0); - this->unk_04A++; + this->work_04A++; gPlayer[0].cam.eye.x = 0.0f; gPlayer[0].cam.eye.y = 200.0f; gPlayer[0].cam.eye.z = -20000.0f; @@ -1696,7 +1696,7 @@ void SectorY_SyShogun_Update(SyShogun* this) { if ((gBossFrameCount >= 350) || (this->swork[34] != 0)) { if (this->swork[34] != 0) { gBossHealthBar = this->health * 1.7f; - } else if (gBosses[0].unk_04A == 0) { + } else if (gBosses[0].work_04A == 0) { gBossHealthBar = (gBosses[1].health + gBosses[2].health) * 1.275f; } } @@ -2027,9 +2027,9 @@ void SectorY_8019EB80(void) { s32 actorCount; if (gHitCount >= 100) { - actorCount = 9; + actorCount = 9; // Teammates + Cornerian ships } else { - actorCount = 2; + actorCount = 2; // Teammates only } Rand_SetSeed(1, 29100, 9786); @@ -2437,8 +2437,8 @@ void SectorY_8019FF00(ActorCutscene* this) { case 5: Math_SmoothStepToF(&this->rot_0F4.x, 0.0f, 0.1f, 5.0f, 0.0f); - x = this->obj.pos.x - gBosses[this->timer_04C].obj.pos.x; - z = this->obj.pos.z - gBosses[this->timer_04C].obj.pos.z; + x = this->obj.pos.x - gBosses[this->work_04C].obj.pos.x; + z = this->obj.pos.z - gBosses[this->work_04C].obj.pos.z; Math_SmoothStepToAngle( &this->rot_0F4.z, Math_SmoothStepToAngle(&this->rot_0F4.y, Math_RadToDeg(Math_Atan2F(x, z)), 0.5f, 2.0f, 0.0001f) * 30.0f, @@ -3496,74 +3496,74 @@ void SectorY_SyRobot_Update(SyRobot* this) { this->iwork[18]--; } - if ((this->unk_048 != 0) && (this->unk_046 != 3)) { - switch (this->unk_048) { + if ((this->work_048 != 0) && (this->work_046 != 3)) { + switch (this->work_048) { case 1: - this->unk_046 = 1; + this->work_046 = 1; this->timer_0BE = 50; this->iwork[19] = 0; break; case 2: - this->unk_046 = 1; + this->work_046 = 1; this->timer_0BE = 20; this->iwork[19] = 0; break; case 3: - this->unk_046 = 2; + this->work_046 = 2; this->animFrame = 0; break; case 4: - this->unk_046 = 0; + this->work_046 = 0; this->animFrame = 0; break; case 8: - this->unk_046 = 1; + this->work_046 = 1; this->timer_0BE = 50; this->iwork[19] = 1; break; case 9: - this->unk_046 = 1; + this->work_046 = 1; this->timer_0BE = 20; this->iwork[19] = 1; break; case 10: - this->unk_046 = 1; + this->work_046 = 1; this->timer_0BE = 50; this->iwork[19] = -1; break; case 11: - this->unk_046 = 1; + this->work_046 = 1; this->timer_0BE = 20; this->iwork[19] = -1; break; case 6: - this->unk_046 = 4; + this->work_046 = 4; this->animFrame = 0; break; case 5: - this->unk_046 = 5; + this->work_046 = 5; this->animFrame = Animation_GetFrameCount(&D_SY_602B778) - 1; break; case 7: - this->unk_046 = 6; + this->work_046 = 6; this->animFrame = Animation_GetFrameCount(&D_SY_602B778) - 1; break; } - this->unk_048 = 0; + this->work_048 = 0; this->fwork[15] = 0.0f; } - switch (this->unk_046) { + switch (this->work_046) { case 0: i = this->iwork[17]; if (i != 0) { @@ -3612,12 +3612,12 @@ void SectorY_SyRobot_Update(SyRobot* this) { gPlayer[0].pos.y = sp1E0; AUDIO_PLAY_SFX(NA_SE_EN_MS_SHOT_S, this->sfxSource, 4); } - this->unk_048 = 0; + this->work_048 = 0; } if (this->timer_0BE == 0) { this->animFrame = 0; - this->unk_046 = 0; + this->work_046 = 0; this->fwork[15] = 0.0f; } break; @@ -3632,7 +3632,7 @@ void SectorY_SyRobot_Update(SyRobot* this) { case 4: this->animFrame++; if (this->animFrame >= (Animation_GetFrameCount(&D_SY_602B778) - 1)) { - this->unk_046 = 0; + this->work_046 = 0; this->iwork[17] = 0; this->fwork[15] = 0.0f; } @@ -3644,12 +3644,12 @@ void SectorY_SyRobot_Update(SyRobot* this) { this->animFrame--; if (this->animFrame < 8) { this->fwork[15] = 0.1f; - if (this->unk_046 == 5) { + if (this->work_046 == 5) { this->iwork[17] = 1; } else { this->iwork[17] = 2; } - this->unk_046 = 0; + this->work_046 = 0; } sp4C = Animation_GetFrameData(&D_SY_602B778, this->animFrame, sp68); break; @@ -3686,7 +3686,7 @@ void SectorY_SyRobot_Update(SyRobot* this) { break; } - if ((this->unk_046 == 1) || (this->unk_046 == 2)) { + if ((this->work_046 == 1) || (this->work_046 == 2)) { Matrix_RotateZ(gCalcMatrix, -this->vwork[29].z * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -this->vwork[29].x * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, -this->vwork[29].y * M_DTOR, MTXF_APPLY); @@ -3740,7 +3740,7 @@ void SectorY_SyRobot_Update(SyRobot* this) { Math_SmoothStepToAngle(&this->fwork[29], sp1D8, 0.2f, 5.0f, 0.0f); Math_SmoothStepToVec3fArray(sp68, this->vwork, 1, sp4C, this->fwork[15], 100.0f, 0.0f); - if ((this->unk_046 == 6) || (this->unk_046 == 5)) { + if ((this->work_046 == 6) || (this->work_046 == 5)) { Math_SmoothStepToF(&this->fwork[15], 0.3f, 1.0f, 0.05f, 0.0f); } else { Math_SmoothStepToF(&this->fwork[15], 0.2f, 1.0f, 0.015f, 0.0f); @@ -3754,23 +3754,23 @@ void SectorY_SyRobot_Update(SyRobot* this) { } this->info.hitbox = SEGMENTED_TO_VIRTUAL(aSyRobotHitbox); - if (this->unk_046 == 1) { + if (this->work_046 == 1) { this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_603421C); } i = this->iwork[17]; if (i != 0) { if (i == 1) { - this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_6034124); + this->info.hitbox = SEGMENTED_TO_VIRTUAL(aSyRobot4Hitbox); } else if (i == 2) { this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_60341A8); } } - if (this->unk_046 == 2) { + if (this->work_046 == 2) { this->info.hitbox = SEGMENTED_TO_VIRTUAL(D_SY_60340C0); } - if ((this->dmgType != DMG_NONE) && (this->unk_046 != 3)) { + if ((this->dmgType != DMG_NONE) && (this->work_046 != 3)) { if (this->dmgType == DMG_EXPLOSION) { this->dmgPart = 1; @@ -3788,8 +3788,8 @@ void SectorY_SyRobot_Update(SyRobot* this) { this->health -= this->damage; if (this->health <= 0) { - this->unk_046 = 3; - this->unk_048 = 0; + this->work_046 = 3; + this->work_048 = 0; this->animFrame = 0; this->timer_0BE = 50; this->fwork[15] = 0.0f; @@ -3828,7 +3828,7 @@ bool SectorY_SyRobot_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Ve if (limbIndex == 17) { rot->x += actor->fwork[28]; rot->y -= actor->fwork[29]; - if (actor->eventType == EVID_48) { + if (actor->eventType == EVID_SY_ROBOT_1) { *dList = D_SY_6014BD0; } } diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index 76e07b7f..4a81f05f 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -6254,7 +6254,7 @@ void Map_801AC530(s32 index) { Lights_SetOneLight(&gMasterDisp, dirX, dirY, dirZ, 50, 50, 40, 0, 0, 0); - gSPDisplayList(gMasterDisp++, D_MAP_604A9F0); + gSPDisplayList(gMasterDisp++, aMapArwingDL); Matrix_Pop(&gGfxMatrix); } diff --git a/src/overlays/ovl_menu/fox_option.c b/src/overlays/ovl_menu/fox_option.c index 7e5073a0..8487f7ec 100644 --- a/src/overlays/ovl_menu/fox_option.c +++ b/src/overlays/ovl_menu/fox_option.c @@ -93,12 +93,12 @@ f32 D_menu_801B921C; f32 D_menu_801B9220; f32 D_menu_801B9224; f32 D_menu_801B9228; -s32 D_menu_801B922C; -s32 D_menu_801B9230; -s32 D_menu_801B9234; -s32 D_menu_801B9238; -s32 D_menu_801B923C; -s32 D_menu_801B9240; +s32 sArwingLightColR; // colR +s32 sArwingLightColG; // colG +s32 sArwingLightColB; // colB +s32 sArwingLightAmbR; // ambR +s32 sArwingLightAmbG; // ambG +s32 sArwingLightAmbB; // ambB s32 D_menu_801B9244; s32 D_menu_801B9248; u8 D_menu_801B924C; @@ -113,7 +113,7 @@ UnkStruct_D_menu_801B9250 D_menu_801B9290; f32 D_menu_801B9298[32]; s32 spectrumAnalyzerMode; s32 D_menu_801B931C; -bool D_menu_801B9320; // MusicPlaying status in the expert sound options +bool sMusicPlaying; // MusicPlaying status in the expert sound options extern s32 BSS_PAD_0; s32 D_menu_801B9330[2]; s32 D_menu_801B933C; @@ -156,11 +156,11 @@ struct BssPad1 { // struct BssPad4 {int x;}; extern s32 BSS_PAD_2; -static f32 sOptionCardPosY[] = { 60.0f, 36.0f, 12.0f, -12.0f, -36.0f, -60.0f }; // D_menu_801AE570 -static f32 sOptionCardTextPosX[] = { 124.0f, 118.0f, 145.0f, 125.0f, 133.0f, 118.0f }; // D_menu_801AE588 -static f32 sOptionCardTextPosY[] = { 54.0f, 78.0f, 103.0f, 126.0f, 151.0f, 175.0f }; // D_menu_801AE5A0 -static f32 sOptionCardCurTextPosX[] = { 124.0f, 118.0f, 145.0f, 125.0f, 133.0f, 118.0f }; // D_menu_801AE5B8 -static f32 sOptionCardCurTextPosY[] = { 54.0f, 78.0f, 103.0f, 126.0f, 151.0f, 175.0f }; // D_menu_801AE5D0 +static f32 sOptionCardPosY[] = { 60.0f, 36.0f, 12.0f, -12.0f, -36.0f, -60.0f }; +static f32 sOptionCardTextPosX[] = { 124.0f, 118.0f, 145.0f, 125.0f, 133.0f, 118.0f }; +static f32 sOptionCardTextPosY[] = { 54.0f, 78.0f, 103.0f, 126.0f, 151.0f, 175.0f }; +static f32 sOptionCardCurTextPosX[] = { 124.0f, 118.0f, 145.0f, 125.0f, 133.0f, 118.0f }; +static f32 sOptionCardCurTextPosY[] = { 54.0f, 78.0f, 103.0f, 126.0f, 151.0f, 175.0f }; static f32 D_menu_801AE5E8[] = { 124.0f, 125.0f }; static f32 D_menu_801AE5F0[] = { 54.0f, 55.0f }; static f32 D_menu_801AE5F8[] = { 133.0f, 125.0f }; @@ -376,12 +376,12 @@ void Option_Setup(void) { #endif gVIsPerFrame = 2; - sOptionCardList[0].unk_00.unk_08 = D_OPT_8003B50; - sOptionCardList[0].unk_00.unk_10 = 72; - sOptionCardList[0].unk_00.unk_14 = 12; - sOptionCardList[4].unk_00.unk_08 = D_OPT_80046B0; - sOptionCardList[4].unk_00.unk_10 = 64; - sOptionCardList[4].unk_00.unk_14 = 10; + sOptionCardList[0].unk_00.texture = D_OPT_8003B50; + sOptionCardList[0].unk_00.width = 72; + sOptionCardList[0].unk_00.height = 12; + sOptionCardList[4].unk_00.texture = D_OPT_80046B0; + sOptionCardList[4].unk_00.width = 64; + sOptionCardList[4].unk_00.height = 10; for (i = 0; i < OPTION_COUNT; i++) { sOptionCardCurTextPosX[i] = sOptionCardTextPosX[i]; @@ -474,30 +474,30 @@ void Option_Setup(void) { if (i == 2) { continue; } - sOptionCardList[i].unk_38.unk_0C = 0.01f; - sOptionCardList[i].unk_38.unk_10 = 0.21f; - sOptionCardList[i].unk_38.unk_04 = sOptionCardPosY[i]; - sOptionCardList[i].unk_38.unk_00 = 0.0f; - sOptionCardList[i].unk_38.unk_08 = 0.0f; - sOptionCardList[i].unk_5C = 0; + sOptionCardList[i].unk_38.xScale = 0.01f; + sOptionCardList[i].unk_38.yScale = 0.21f; + sOptionCardList[i].unk_38.y = sOptionCardPosY[i]; + sOptionCardList[i].unk_38.x = 0.0f; + sOptionCardList[i].unk_38.z = 0.0f; + sOptionCardList[i].unk_5C = false; - sOptionCardList[i].unk_00.unk_20 = 0.01f; - sOptionCardList[i].unk_00.unk_24 = 1.0f; - sOptionCardList[i].unk_00.unk_18 = 158.0f; - sOptionCardList[i].unk_00.unk_1C = sOptionCardCurTextPosY[i]; - sOptionCardList[i].unk_58 = 0; + sOptionCardList[i].unk_00.xScale = 0.01f; + sOptionCardList[i].unk_00.yScale = 1.0f; + sOptionCardList[i].unk_00.xPos = 158.0f; + sOptionCardList[i].unk_00.yPos = sOptionCardCurTextPosY[i]; + sOptionCardList[i].unk_58 = false; } - sOptionCardList[2].unk_38.unk_00 = 0.0f; - sOptionCardList[2].unk_38.unk_08 = 0.0f; - sOptionCardList[2].unk_38.unk_04 = 90.0f; - sOptionCardList[2].unk_38.unk_0C = 0.4f; - sOptionCardList[2].unk_38.unk_10 = 0.21f; - sOptionCardList[2].unk_5C = 1; - sOptionCardList[2].unk_00.unk_20 = 1.0f; - sOptionCardList[2].unk_00.unk_24 = 1.0f; - sOptionCardList[2].unk_00.unk_18 = 145.0f; - sOptionCardList[2].unk_00.unk_1C = 25.0f; - sOptionCardList[2].unk_58 = 1; + sOptionCardList[2].unk_38.x = 0.0f; + sOptionCardList[2].unk_38.z = 0.0f; + sOptionCardList[2].unk_38.y = 90.0f; + sOptionCardList[2].unk_38.xScale = 0.4f; + sOptionCardList[2].unk_38.yScale = 0.21f; + sOptionCardList[2].unk_5C = true; + sOptionCardList[2].unk_00.xScale = 1.0f; + sOptionCardList[2].unk_00.yScale = 1.0f; + sOptionCardList[2].unk_00.xPos = 145.0f; + sOptionCardList[2].unk_00.yPos = 25.0f; + sOptionCardList[2].unk_58 = true; D_menu_801B9124 = OPTION_VERSUS; } else { @@ -527,12 +527,12 @@ void Option_Setup(void) { D_menu_801B9224 = -80.0f; D_menu_801B9228 = 0.0f; - D_menu_801B922C = 225; - D_menu_801B9230 = 225; - D_menu_801B9234 = 225; - D_menu_801B9238 = 30; - D_menu_801B923C = 30; - D_menu_801B9240 = 30; + sArwingLightColR = 225; + sArwingLightColG = 225; + sArwingLightColB = 225; + sArwingLightAmbR = 30; + sArwingLightAmbG = 30; + sArwingLightAmbB = 30; D_menu_801B91F8 = 0.1f; D_menu_801B91F4 = -130.0f; @@ -826,26 +826,26 @@ void Option_801929F0(void) { if (D_menu_801B9244 == 0) { D_menu_801B91BC = 1; for (i = 0; i < OPTION_COUNT; i++) { - sOptionCardList[i].unk_00.unk_18 = sOptionCardCurTextPosX[i]; - sOptionCardList[i].unk_00.unk_1C = sOptionCardCurTextPosY[i]; - sOptionCardList[i].unk_00.unk_20 = 1.0f; - sOptionCardList[i].unk_00.unk_24 = 1.0f; - sOptionCardList[i].unk_58 = 1; + sOptionCardList[i].unk_00.xPos = sOptionCardCurTextPosX[i]; + sOptionCardList[i].unk_00.yPos = sOptionCardCurTextPosY[i]; + sOptionCardList[i].unk_00.xScale = 1.0f; + sOptionCardList[i].unk_00.yScale = 1.0f; + sOptionCardList[i].unk_58 = true; - sOptionCardList[i].unk_38.unk_0C = 0.4f; - sOptionCardList[i].unk_38.unk_10 = 0.21f; - sOptionCardList[i].unk_38.unk_04 = sOptionCardPosY[i]; - sOptionCardList[i].unk_38.unk_08 = 0.0f; - sOptionCardList[i].unk_5C = 1; + sOptionCardList[i].unk_38.xScale = 0.4f; + sOptionCardList[i].unk_38.yScale = 0.21f; + sOptionCardList[i].unk_38.y = sOptionCardPosY[i]; + sOptionCardList[i].unk_38.z = 0.0f; + sOptionCardList[i].unk_5C = true; } } else { D_menu_801B91BC = 0; for (i = 0; i < OPTION_COUNT; i++) { - sOptionCardList[i].unk_00.unk_24 = 1.0f; - sOptionCardList[i].unk_38.unk_10 = 0.21f; - sOptionCardList[i].unk_38.unk_08 = 0.0f; - sOptionCardList[i].unk_5C = 1; - sOptionCardList[i].unk_58 = 1; + sOptionCardList[i].unk_00.yScale = 1.0f; + sOptionCardList[i].unk_38.yScale = 0.21f; + sOptionCardList[i].unk_38.z = 0.0f; + sOptionCardList[i].unk_5C = true; + sOptionCardList[i].unk_58 = true; } } @@ -881,32 +881,32 @@ void Option_MainMenuUpdate(void) { case 1000: for (i = 0; i < OPTION_COUNT; i++) { - if (sOptionCardList[i].unk_38.unk_0C < 0.4f) { - sOptionCardList[i].unk_38.unk_0C += 0.04f; - if (sOptionCardList[i].unk_38.unk_0C > 0.4f) { - sOptionCardList[i].unk_38.unk_0C = 0.4f; + if (sOptionCardList[i].unk_38.xScale < 0.4f) { + sOptionCardList[i].unk_38.xScale += 0.04f; + if (sOptionCardList[i].unk_38.xScale > 0.4f) { + sOptionCardList[i].unk_38.xScale = 0.4f; } } - if (sOptionCardList[i].unk_00.unk_20 < 1.0f) { - sOptionCardList[i].unk_00.unk_20 += 0.1f; - if (sOptionCardList[i].unk_00.unk_20 > 1.0f) { - sOptionCardList[i].unk_00.unk_20 = 1.0f; + if (sOptionCardList[i].unk_00.xScale < 1.0f) { + sOptionCardList[i].unk_00.xScale += 0.1f; + if (sOptionCardList[i].unk_00.xScale > 1.0f) { + sOptionCardList[i].unk_00.xScale = 1.0f; } } - Math_SmoothStepToF(&sOptionCardList[i].unk_00.unk_1C, sOptionCardCurTextPosY[i], 0.15f, 100.0f, 0.1f); - Math_SmoothStepToF(&sOptionCardList[i].unk_38.unk_04, sOptionCardPosY[i], 0.15f, 100.0f, 0.1f); - Math_SmoothStepToF(&sOptionCardList[i].unk_00.unk_18, sOptionCardCurTextPosX[i], 0.2f, - D_menu_801AE620[i], 0.1f); + Math_SmoothStepToF(&sOptionCardList[i].unk_00.yPos, sOptionCardCurTextPosY[i], 0.15f, 100.0f, 0.1f); + Math_SmoothStepToF(&sOptionCardList[i].unk_38.y, sOptionCardPosY[i], 0.15f, 100.0f, 0.1f); + Math_SmoothStepToF(&sOptionCardList[i].unk_00.xPos, sOptionCardCurTextPosX[i], 0.2f, D_menu_801AE620[i], + 0.1f); } gBlurAlpha += 4; - if (sOptionCardList[D_menu_801B91A4].unk_38.unk_04 == sOptionCardPosY[D_menu_801B91A4]) { + if (sOptionCardList[D_menu_801B91A4].unk_38.y == sOptionCardPosY[D_menu_801B91A4]) { for (i = 0; i < OPTION_COUNT; i++) { - sOptionCardList[i].unk_00.unk_20 = 1.0f; - sOptionCardList[i].unk_00.unk_18 = sOptionCardCurTextPosX[i]; - sOptionCardList[i].unk_00.unk_1C = sOptionCardCurTextPosY[i]; + sOptionCardList[i].unk_00.xScale = 1.0f; + sOptionCardList[i].unk_00.xPos = sOptionCardCurTextPosX[i]; + sOptionCardList[i].unk_00.yPos = sOptionCardCurTextPosY[i]; } D_menu_801B91BC = 1; gBlurAlpha = 255; @@ -925,17 +925,17 @@ void Option_MainMenuUpdate(void) { Option_8019C418(&D_menu_801B91B0, 1, 0, 0, 20, 5, 4, gMainController, &D_menu_801B9190)) { AUDIO_PLAY_SFX(NA_SE_ARWING_CURSOR, gDefaultSfxSource, 4); if (D_menu_801B91B0) { - sOptionCardList[0].unk_00.unk_08 = D_OPT_8004C50; - sOptionCardList[0].unk_00.unk_10 = 80; - sOptionCardList[0].unk_00.unk_14 = 12; - sOptionCardList[0].unk_00.unk_18 = 125.0f; - sOptionCardList[0].unk_00.unk_1C = 55.0f; + sOptionCardList[0].unk_00.texture = D_OPT_8004C50; + sOptionCardList[0].unk_00.width = 80; + sOptionCardList[0].unk_00.height = 12; + sOptionCardList[0].unk_00.xPos = 125.0f; + sOptionCardList[0].unk_00.yPos = 55.0f; } else { - sOptionCardList[0].unk_00.unk_08 = D_OPT_8003B50; - sOptionCardList[0].unk_00.unk_10 = 72; - sOptionCardList[0].unk_00.unk_14 = 12; - sOptionCardList[0].unk_00.unk_18 = 124.0f; - sOptionCardList[0].unk_00.unk_1C = 54.0f; + sOptionCardList[0].unk_00.texture = D_OPT_8003B50; + sOptionCardList[0].unk_00.width = 72; + sOptionCardList[0].unk_00.height = 12; + sOptionCardList[0].unk_00.xPos = 124.0f; + sOptionCardList[0].unk_00.yPos = 54.0f; } gExpertMode = D_menu_801B91B0; } @@ -944,17 +944,17 @@ void Option_MainMenuUpdate(void) { Option_8019C418(&D_menu_801B91AC, 1, 0, 0, 20, 5, 4, gMainController, &D_menu_801B9198)) { AUDIO_PLAY_SFX(NA_SE_ARWING_CURSOR, gDefaultSfxSource, 4); if (D_menu_801B91AC) { - sOptionCardList[4].unk_00.unk_08 = D_OPT_8004C50; - sOptionCardList[4].unk_00.unk_10 = 80; - sOptionCardList[4].unk_00.unk_14 = 12; - sOptionCardList[4].unk_00.unk_18 = 125.0f; - sOptionCardList[4].unk_00.unk_1C = 151.0f; + sOptionCardList[4].unk_00.texture = D_OPT_8004C50; + sOptionCardList[4].unk_00.width = 80; + sOptionCardList[4].unk_00.height = 12; + sOptionCardList[4].unk_00.xPos = 125.0f; + sOptionCardList[4].unk_00.yPos = 151.0f; } else { - sOptionCardList[4].unk_00.unk_08 = D_OPT_80046B0; - sOptionCardList[4].unk_00.unk_10 = 64; - sOptionCardList[4].unk_00.unk_14 = 10; - sOptionCardList[4].unk_00.unk_18 = 133.0f; - sOptionCardList[4].unk_00.unk_1C = 151.0f; + sOptionCardList[4].unk_00.texture = D_OPT_80046B0; + sOptionCardList[4].unk_00.width = 64; + sOptionCardList[4].unk_00.height = 10; + sOptionCardList[4].unk_00.xPos = 133.0f; + sOptionCardList[4].unk_00.yPos = 151.0f; } } @@ -975,22 +975,22 @@ void Option_MainMenuUpdate(void) { case 11: gBlurAlpha = 16; D_menu_801B9178 = 3; - sOptionCardList[D_menu_801B91A4].unk_38.unk_0C -= 0.01f; - sOptionCardList[D_menu_801B91A4].unk_38.unk_10 -= 0.01f; - sOptionCardList[D_menu_801B91A4].unk_00.unk_20 -= 0.1f; - sOptionCardList[D_menu_801B91A4].unk_00.unk_24 -= 0.1f; - sOptionCardList[D_menu_801B91A4].unk_00.unk_18 += 4.0f; + sOptionCardList[D_menu_801B91A4].unk_38.xScale -= 0.01f; + sOptionCardList[D_menu_801B91A4].unk_38.yScale -= 0.01f; + sOptionCardList[D_menu_801B91A4].unk_00.xScale -= 0.1f; + sOptionCardList[D_menu_801B91A4].unk_00.yScale -= 0.1f; + sOptionCardList[D_menu_801B91A4].unk_00.xPos += 4.0f; D_menu_801B917C = 3; D_menu_801B912C++; break; case 12: if (D_menu_801B9178 == 1) { - sOptionCardList[D_menu_801B91A4].unk_38.unk_0C += 0.01f; - sOptionCardList[D_menu_801B91A4].unk_38.unk_10 += 0.01f; - sOptionCardList[D_menu_801B91A4].unk_00.unk_20 += 0.1f; - sOptionCardList[D_menu_801B91A4].unk_00.unk_24 += 0.1f; - sOptionCardList[D_menu_801B91A4].unk_00.unk_18 -= 4.0f; + sOptionCardList[D_menu_801B91A4].unk_38.xScale += 0.01f; + sOptionCardList[D_menu_801B91A4].unk_38.yScale += 0.01f; + sOptionCardList[D_menu_801B91A4].unk_00.xScale += 0.1f; + sOptionCardList[D_menu_801B91A4].unk_00.yScale += 0.1f; + sOptionCardList[D_menu_801B91A4].unk_00.xPos -= 4.0f; D_menu_801B9214 = 1; } @@ -999,13 +999,13 @@ void Option_MainMenuUpdate(void) { continue; } - if (sOptionCardList[i].unk_38.unk_0C > 0.01f) { - sOptionCardList[i].unk_38.unk_0C -= 0.05f; - sOptionCardList[i].unk_00.unk_20 -= 0.19f; - Math_SmoothStepToF(&sOptionCardList[i].unk_00.unk_18, 158.0f, 0.2f, D_menu_801AE608[i], 0.1f); + if (sOptionCardList[i].unk_38.xScale > 0.01f) { + sOptionCardList[i].unk_38.xScale -= 0.05f; + sOptionCardList[i].unk_00.xScale -= 0.19f; + Math_SmoothStepToF(&sOptionCardList[i].unk_00.xPos, 158.0f, 0.2f, D_menu_801AE608[i], 0.1f); } else { - sOptionCardList[i].unk_5C = 0; - sOptionCardList[i].unk_58 = 0; + sOptionCardList[i].unk_5C = false; + sOptionCardList[i].unk_58 = false; } } @@ -1018,13 +1018,13 @@ void Option_MainMenuUpdate(void) { var_fs1 = 120.0f; } - Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_00.unk_1C, var_fs0, 0.25f, 100.0f, 0.1f); - Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_38.unk_04, var_fs1, 0.25f, 100.0f, 0.1f); + Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_00.yPos, var_fs0, 0.25f, 100.0f, 0.1f); + Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_38.y, var_fs1, 0.25f, 100.0f, 0.1f); gBlurAlpha += 4; - if ((sOptionCardList[D_menu_801B91A4].unk_00.unk_1C == var_fs0) && - (sOptionCardList[D_menu_801B91A4].unk_38.unk_04 == var_fs1)) { + if ((sOptionCardList[D_menu_801B91A4].unk_00.yPos == var_fs0) && + (sOptionCardList[D_menu_801B91A4].unk_38.y == var_fs1)) { gBlurAlpha += 255; D_menu_801B9124 = D_menu_801B91A4; @@ -1070,7 +1070,7 @@ void Option_MainMenuDraw(void) { Matrix_Pop(&gGfxMatrix); for (i = 0; i < OPTION_COUNT; i++) { - if (!(sOptionCardList[i].unk_58) || (sOptionCardList[i].unk_00.unk_20) <= 0.0f) { + if (!(sOptionCardList[i].unk_58) || (sOptionCardList[i].unk_00.xScale) <= 0.0f) { continue; } if ((i == 0) && D_menu_801B91C8 && ((D_menu_801B912C == 0) || (D_menu_801B912C == 1))) { @@ -1096,26 +1096,26 @@ void Option_80193B04(void) { D_menu_801B91BC = 1; for (i = 0; i < 3; i++) { - sOptionVSCardList[i].unk_00.unk_18 = D_menu_801AEF90[i]; - sOptionVSCardList[i].unk_00.unk_1C = D_menu_801AEF9C[i]; - sOptionVSCardList[i].unk_00.unk_20 = 1.0f; - sOptionVSCardList[i].unk_00.unk_24 = 1.0f; - sOptionVSCardList[i].unk_58 = 1; - sOptionVSCardList[i].unk_38.unk_0C = 0.4f; - sOptionVSCardList[i].unk_38.unk_10 = 0.21f; - sOptionVSCardList[i].unk_38.unk_04 = D_menu_801AEF84[i]; - sOptionVSCardList[i].unk_38.unk_08 = 0.0f; - sOptionVSCardList[i].unk_5C = 1; + sOptionVSCardList[i].unk_00.xPos = D_menu_801AEF90[i]; + sOptionVSCardList[i].unk_00.yPos = D_menu_801AEF9C[i]; + sOptionVSCardList[i].unk_00.xScale = 1.0f; + sOptionVSCardList[i].unk_00.yScale = 1.0f; + sOptionVSCardList[i].unk_58 = true; + sOptionVSCardList[i].unk_38.xScale = 0.4f; + sOptionVSCardList[i].unk_38.yScale = 0.21f; + sOptionVSCardList[i].unk_38.y = D_menu_801AEF84[i]; + sOptionVSCardList[i].unk_38.z = 0.0f; + sOptionVSCardList[i].unk_5C = true; } } else { D_menu_801B91BC = 0; for (i = 0; i < 3; i++) { - sOptionVSCardList[i].unk_00.unk_24 = 1.0f; - sOptionVSCardList[i].unk_38.unk_10 = 0.21f; - sOptionVSCardList[i].unk_38.unk_08 = 0.0f; - sOptionVSCardList[i].unk_58 = 1; - sOptionVSCardList[i].unk_5C = 1; + sOptionVSCardList[i].unk_00.yScale = 1.0f; + sOptionVSCardList[i].unk_38.yScale = 0.21f; + sOptionVSCardList[i].unk_38.z = 0.0f; + sOptionVSCardList[i].unk_58 = true; + sOptionVSCardList[i].unk_5C = true; } } @@ -1141,39 +1141,39 @@ void Option_VersusUpdate(void) { case 1000: for (i = 0; i < 3; i++) { - if (sOptionVSCardList[i].unk_38.unk_0C < 0.4f) { - sOptionVSCardList[i].unk_38.unk_0C += 0.04f; - if (sOptionVSCardList[i].unk_38.unk_0C > 0.4f) { - sOptionVSCardList[i].unk_38.unk_0C = 0.4f; + if (sOptionVSCardList[i].unk_38.xScale < 0.4f) { + sOptionVSCardList[i].unk_38.xScale += 0.04f; + if (sOptionVSCardList[i].unk_38.xScale > 0.4f) { + sOptionVSCardList[i].unk_38.xScale = 0.4f; } } - if (sOptionVSCardList[i].unk_00.unk_20 < 1.0f) { - sOptionVSCardList[i].unk_00.unk_20 += 0.15f; - if (sOptionVSCardList[i].unk_00.unk_20 > 1.0f) { - sOptionVSCardList[i].unk_00.unk_20 = 1.0f; + if (sOptionVSCardList[i].unk_00.xScale < 1.0f) { + sOptionVSCardList[i].unk_00.xScale += 0.15f; + if (sOptionVSCardList[i].unk_00.xScale > 1.0f) { + sOptionVSCardList[i].unk_00.xScale = 1.0f; } } - Math_SmoothStepToF(&sOptionVSCardList[i].unk_38.unk_04, D_menu_801AEF84[i], 0.15f, 100.0f, 0.1f); - Math_SmoothStepToF(&sOptionVSCardList[i].unk_00.unk_18, D_menu_801AEF90[i], 0.2f, 3.1f, 0.1f); - Math_SmoothStepToF(&sOptionVSCardList[i].unk_00.unk_1C, D_menu_801AEF9C[i], 0.15f, 100.0f, 0.1f); + Math_SmoothStepToF(&sOptionVSCardList[i].unk_38.y, D_menu_801AEF84[i], 0.15f, 100.0f, 0.1f); + Math_SmoothStepToF(&sOptionVSCardList[i].unk_00.xPos, D_menu_801AEF90[i], 0.2f, 3.1f, 0.1f); + Math_SmoothStepToF(&sOptionVSCardList[i].unk_00.yPos, D_menu_801AEF9C[i], 0.15f, 100.0f, 0.1f); } - Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_00.unk_1C, 25.0f, 0.25f, 100.0f, 0.1f); - Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_38.unk_04, 90.0f, 0.25f, 100.0f, 0.1f); + Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_00.yPos, 25.0f, 0.25f, 100.0f, 0.1f); + Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_38.y, 90.0f, 0.25f, 100.0f, 0.1f); gBlurAlpha += 4; - if (sOptionVSCardList[D_menu_801B91A8].unk_38.unk_04 == D_menu_801AEF84[D_menu_801B91A8]) { + if (sOptionVSCardList[D_menu_801B91A8].unk_38.y == D_menu_801AEF84[D_menu_801B91A8]) { for (i = 0; i < 3; i++) { - sOptionVSCardList[i].unk_00.unk_20 = 1.0f; - sOptionVSCardList[i].unk_00.unk_1C = D_menu_801AEF9C[i]; - sOptionVSCardList[i].unk_00.unk_18 = D_menu_801AEF90[i]; + sOptionVSCardList[i].unk_00.xScale = 1.0f; + sOptionVSCardList[i].unk_00.yPos = D_menu_801AEF9C[i]; + sOptionVSCardList[i].unk_00.xPos = D_menu_801AEF90[i]; } - sOptionCardList[D_menu_801B91A4].unk_00.unk_1C = 25.0f; - sOptionCardList[D_menu_801B91A4].unk_38.unk_04 = 90.0f; + sOptionCardList[D_menu_801B91A4].unk_00.yPos = 25.0f; + sOptionCardList[D_menu_801B91A4].unk_38.y = 90.0f; D_menu_801B91BC = 1; gBlurAlpha = 255; D_menu_801B912C = 1; @@ -1206,22 +1206,22 @@ void Option_VersusUpdate(void) { case 11: gBlurAlpha = 16; D_menu_801B9178 = 5; - sOptionVSCardList[D_menu_801B91A8].unk_38.unk_0C -= 0.01f; - sOptionVSCardList[D_menu_801B91A8].unk_38.unk_10 -= 0.01f; - sOptionVSCardList[D_menu_801B91A8].unk_00.unk_20 -= 0.1f; - sOptionVSCardList[D_menu_801B91A8].unk_00.unk_24 -= 0.1f; - sOptionVSCardList[D_menu_801B91A8].unk_00.unk_18 += 4.0f; + sOptionVSCardList[D_menu_801B91A8].unk_38.xScale -= 0.01f; + sOptionVSCardList[D_menu_801B91A8].unk_38.yScale -= 0.01f; + sOptionVSCardList[D_menu_801B91A8].unk_00.xScale -= 0.1f; + sOptionVSCardList[D_menu_801B91A8].unk_00.yScale -= 0.1f; + sOptionVSCardList[D_menu_801B91A8].unk_00.xPos += 4.0f; D_menu_801B917C = 5; D_menu_801B912C++; break; case 12: if (D_menu_801B9178 == 1) { - sOptionVSCardList[D_menu_801B91A8].unk_38.unk_0C += 0.01f; - sOptionVSCardList[D_menu_801B91A8].unk_38.unk_10 += 0.01f; - sOptionVSCardList[D_menu_801B91A8].unk_00.unk_20 += 0.1f; - sOptionVSCardList[D_menu_801B91A8].unk_00.unk_24 += 0.1f; - sOptionVSCardList[D_menu_801B91A8].unk_00.unk_18 -= 4.0f; + sOptionVSCardList[D_menu_801B91A8].unk_38.xScale += 0.01f; + sOptionVSCardList[D_menu_801B91A8].unk_38.yScale += 0.01f; + sOptionVSCardList[D_menu_801B91A8].unk_00.xScale += 0.1f; + sOptionVSCardList[D_menu_801B91A8].unk_00.yScale += 0.1f; + sOptionVSCardList[D_menu_801B91A8].unk_00.xPos -= 4.0f; D_menu_801B9214 = 1; } @@ -1230,13 +1230,13 @@ void Option_VersusUpdate(void) { continue; } - if (sOptionVSCardList[i].unk_38.unk_0C > 0.01f) { - sOptionVSCardList[i].unk_38.unk_0C -= 0.05f; - sOptionVSCardList[i].unk_00.unk_20 -= 0.19f; - Math_SmoothStepToF(&sOptionVSCardList[i].unk_00.unk_18, 158.0f, 0.2f, D_menu_801AE608[i + 1], 0.1f); + if (sOptionVSCardList[i].unk_38.xScale > 0.01f) { + sOptionVSCardList[i].unk_38.xScale -= 0.05f; + sOptionVSCardList[i].unk_00.xScale -= 0.19f; + Math_SmoothStepToF(&sOptionVSCardList[i].unk_00.xPos, 158.0f, 0.2f, D_menu_801AE608[i + 1], 0.1f); } else { - sOptionVSCardList[i].unk_5C = 0; - sOptionVSCardList[i].unk_58 = 0; + sOptionVSCardList[i].unk_5C = false; + sOptionVSCardList[i].unk_58 = false; } } @@ -1247,15 +1247,15 @@ void Option_VersusUpdate(void) { var_fs0 = 131.0f; } - Math_SmoothStepToF(&sOptionVSCardList[D_menu_801B91A8].unk_00.unk_1C, var_fs0, 0.25f, 100.0f, 0.1f); - Math_SmoothStepToF(&sOptionVSCardList[D_menu_801B91A8].unk_38.unk_04, -15.5f, 0.25f, 100.0f, 0.1f); - Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_00.unk_1C, -10.0f, 0.35f, 100.0f, 0.1f); - Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_38.unk_04, 150.0f, 0.35f, 100.0f, 0.1f); + Math_SmoothStepToF(&sOptionVSCardList[D_menu_801B91A8].unk_00.yPos, var_fs0, 0.25f, 100.0f, 0.1f); + Math_SmoothStepToF(&sOptionVSCardList[D_menu_801B91A8].unk_38.y, -15.5f, 0.25f, 100.0f, 0.1f); + Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_00.yPos, -10.0f, 0.35f, 100.0f, 0.1f); + Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_38.y, 150.0f, 0.35f, 100.0f, 0.1f); gBlurAlpha += 4; - if ((var_fs0 == sOptionVSCardList[D_menu_801B91A8].unk_00.unk_1C) && - (sOptionVSCardList[D_menu_801B91A8].unk_38.unk_04 == -15.5f)) { + if ((var_fs0 == sOptionVSCardList[D_menu_801B91A8].unk_00.yPos) && + (sOptionVSCardList[D_menu_801B91A8].unk_38.y == -15.5f)) { gBlurAlpha += 255; D_menu_801B9124 = (D_menu_801B91A8 + 1) * 10; gVsMatchType = D_menu_801B91A8; @@ -1274,7 +1274,7 @@ void Option_VersusDraw(void) { Option_8019BDF0(); for (i = 0; i < 3; i++) { - if (sOptionVSCardList[i].unk_5C != 0) { + if (sOptionVSCardList[i].unk_5C) { Option_DrawMenuCard(sOptionVSCardList[i].unk_38); } } @@ -1283,7 +1283,7 @@ void Option_VersusDraw(void) { Matrix_Pop(&gGfxMatrix); for (i = 0; i < 3; i++) { - if ((sOptionVSCardList[i].unk_58 != 0) && !(sOptionVSCardList[i].unk_00.unk_20 <= 0.0f)) { + if ((sOptionVSCardList[i].unk_58) && !(sOptionVSCardList[i].unk_00.xScale <= 0.0f)) { Option_DrawCardLabel(sOptionVSCardList[i].unk_00); } } @@ -1322,9 +1322,9 @@ void Option_SoundInit(void) { Audio_SetVolume(AUDIO_TYPE_VOICE, gVolumeSettings[AUDIO_TYPE_VOICE]); Audio_SetVolume(AUDIO_TYPE_SFX, gVolumeSettings[AUDIO_TYPE_SFX]); - D_menu_801AEB48[0].unk_18 = gVolumeSettings[AUDIO_TYPE_MUSIC] + 146.0f; - D_menu_801AEB48[1].unk_18 = gVolumeSettings[AUDIO_TYPE_VOICE] + 146.0f; - D_menu_801AEB48[2].unk_18 = gVolumeSettings[AUDIO_TYPE_SFX] + 146.0f; + D_menu_801AEB48[0].xPos = gVolumeSettings[AUDIO_TYPE_MUSIC] + 146.0f; + D_menu_801AEB48[1].xPos = gVolumeSettings[AUDIO_TYPE_VOICE] + 146.0f; + D_menu_801AEB48[2].xPos = gVolumeSettings[AUDIO_TYPE_SFX] + 146.0f; D_menu_801B9288 = 0; D_menu_801B9284 = 0; @@ -1414,8 +1414,8 @@ void Option_80194BD0(void) { D_menu_801B924C = D_menu_801AE99C[D_menu_801B9288 - 1]; - if (Option_8019C66C(&(D_menu_801AEB48[D_menu_801B9288 - 1].unk_18), 146.0f, 245.0f, &D_menu_801B9268)) { - var_v1 = D_menu_801AEB48[D_menu_801B9288 - 1].unk_18 - 146.0f; + if (Option_8019C66C(&(D_menu_801AEB48[D_menu_801B9288 - 1].xPos), 146.0f, 245.0f, &D_menu_801B9268)) { + var_v1 = D_menu_801AEB48[D_menu_801B9288 - 1].xPos - 146.0f; gVolumeSettings[D_menu_801B9288 - 1] = var_v1; @@ -1534,9 +1534,9 @@ void Option_801952B4(void) { } for (i = 2; i < 4; i++) { - D_menu_801AE9C0[i].unk_20 += 0.02f; - D_menu_801AE9C0[i].unk_24 += 0.02f; - D_menu_801AE9C0[i].unk_18 -= 0.1f; + D_menu_801AE9C0[i].xScale += 0.02f; + D_menu_801AE9C0[i].yScale += 0.02f; + D_menu_801AE9C0[i].xPos -= 0.1f; } D_menu_801B9178 = 2; @@ -1546,9 +1546,9 @@ void Option_801952B4(void) { case 2: if (D_menu_801B9178 == 0) { for (i = 2; i < 4; i++) { - D_menu_801AE9C0[i].unk_20 -= 0.02f; - D_menu_801AE9C0[i].unk_24 -= 0.02f; - D_menu_801AE9C0[i].unk_18 += 0.1f; + D_menu_801AE9C0[i].xScale -= 0.02f; + D_menu_801AE9C0[i].yScale -= 0.02f; + D_menu_801AE9C0[i].xPos += 0.1f; } D_menu_801B914C++; } @@ -1564,10 +1564,10 @@ void Option_801952B4(void) { case 0: if (D_menu_801B917C == 0) { for (i = 0; i < 4; i++) { - D_menu_801AE9C0[i].unk_20 += 0.08f; - D_menu_801AE9C0[i].unk_24 += 0.08f; - D_menu_801AE9C0[i].unk_18 -= 0.4f; - D_menu_801AE9C0[i].unk_1C -= 0.4f; + D_menu_801AE9C0[i].xScale += 0.08f; + D_menu_801AE9C0[i].yScale += 0.08f; + D_menu_801AE9C0[i].xPos -= 0.4f; + D_menu_801AE9C0[i].yPos -= 0.4f; } D_menu_801B917C = 2; @@ -1579,10 +1579,10 @@ void Option_801952B4(void) { if (D_menu_801B917C == 0) { for (i = 0; i < 4; i++) { - D_menu_801AE9C0[i].unk_20 -= 0.08f; - D_menu_801AE9C0[i].unk_24 -= 0.08f; - D_menu_801AE9C0[i].unk_18 += 0.4f; - D_menu_801AE9C0[i].unk_1C += 0.4f; + D_menu_801AE9C0[i].xScale -= 0.08f; + D_menu_801AE9C0[i].yScale -= 0.08f; + D_menu_801AE9C0[i].xPos += 0.4f; + D_menu_801AE9C0[i].yPos += 0.4f; } D_menu_801B917C = 2; @@ -1600,10 +1600,10 @@ void Option_801952B4(void) { } else { for (i = 0; i < 4; i++) { - D_menu_801AE9C0[i].unk_20 = 1.0f; - D_menu_801AE9C0[i].unk_24 = 1.0f; - D_menu_801AE9C0[i].unk_18 = D_menu_801AE9A0[i]; - D_menu_801AE9C0[i].unk_1C = D_menu_801AE9B0[i]; + D_menu_801AE9C0[i].xScale = 1.0f; + D_menu_801AE9C0[i].yScale = 1.0f; + D_menu_801AE9C0[i].xPos = D_menu_801AE9A0[i]; + D_menu_801AE9C0[i].yPos = D_menu_801AE9B0[i]; } } @@ -1628,7 +1628,7 @@ void Option_ExpertSoundInit(void) { D_menu_801B9290.unk_4 = 0; spectrumAnalyzerMode = 0; - D_menu_801B9320 = 0; + sMusicPlaying = false; // clang-format off for (i = 0; i < 32; i++) { D_menu_801B9298[i] = 0.0f; } @@ -1661,11 +1661,11 @@ void Option_ExpertSoundUpdate(void) { if (gControllerPress[gMainController].button & A_BUTTON) { Audio_PlaySoundTestTrack(D_menu_801B931C); - D_menu_801B9320 = true; + sMusicPlaying = true; } if (gControllerPress[gMainController].button & B_BUTTON) { - if (!D_menu_801B9320) { + if (!sMusicPlaying) { AUDIO_PLAY_SFX(NA_SE_ARWING_CANCEL, gDefaultSfxSource, 4); AUDIO_PLAY_BGM(NA_BGM_SELECT); gDrawMode = DRAW_NONE; @@ -1676,7 +1676,7 @@ void Option_ExpertSoundUpdate(void) { AUDIO_PLAY_SFX(NA_SE_CANCEL, gDefaultSfxSource, 4); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); - D_menu_801B9320 = false; + sMusicPlaying = false; } } @@ -1750,7 +1750,7 @@ void Option_ExpertSoundDraw(void) { D_menu_801AF034[i], D_menu_801AF044[i]); } - if (D_menu_801B9320 != 0) { + if (sMusicPlaying) { temp_v0_4 = Audio_UpdateFrequencyAnalysis(); var_fv1 = 60.0f; @@ -1874,12 +1874,12 @@ void Option_DataUpdate(void) { gExpertMode = false; - sOptionCardList[0].unk_00.unk_08 = D_OPT_8003B50; - sOptionCardList[0].unk_00.unk_10 = 72; - sOptionCardList[0].unk_00.unk_14 = 12; - sOptionCardList[4].unk_00.unk_08 = D_OPT_80046B0; - sOptionCardList[4].unk_00.unk_10 = 64; - sOptionCardList[4].unk_00.unk_14 = 10; + sOptionCardList[0].unk_00.texture = D_OPT_8003B50; + sOptionCardList[0].unk_00.width = 72; + sOptionCardList[0].unk_00.height = 12; + sOptionCardList[4].unk_00.texture = D_OPT_80046B0; + sOptionCardList[4].unk_00.width = 64; + sOptionCardList[4].unk_00.height = 10; for (i = 0; i < OPTION_COUNT; i++) { sOptionCardCurTextPosX[i] = sOptionCardTextPosX[i]; @@ -2343,18 +2343,15 @@ void Option_801982B0(s32 arg0, s32 arg1, f32 arg2, f32 arg3, s32 arg4) { if ((arg3 > 30.0f) && (arg3 < 200.0f)) { RCP_SetupDL(&gMasterDisp, SETUPDL_76); if (arg1 < 6) { - b = 255; - g = 255; - r = 255; + r = g = b = 255; + if (arg1 < (arg4 - 1)) { start = gSaveFile.save.data.unk_5E[arg0][arg1].unk_8 & 0xF; end = gSaveFile.save.data.unk_5E[arg0][arg1 + 1].unk_8 & 0xF; temp_v0 = Option_80199284(start, end); - g = 255; - b = 255; - r = 255; + r = g = b = 255; switch (temp_v0) { case 0: @@ -2395,24 +2392,24 @@ void Option_801984D0(s32 arg0, s32 arg1, f32 arg2, f32 arg3) { } } -void Option_80198608(s32 arg0, s32 arg1, f32 arg2, f32 arg3) { - f32 var_fs1; +void Option_80198608(s32 arg0, s32 arg1, f32 xPos, f32 yPos) { + f32 xOffset; s32 sp90[3]; s32 i; - if ((arg3 > 12.0f) && (arg3 < 154.0f)) { + if ((yPos > 12.0f) && (yPos < 154.0f)) { RCP_SetupDL(&gMasterDisp, SETUPDL_83); sp90[0] = gSaveFile.save.data.unk_5E[arg0][arg1].unk_D & 1; sp90[1] = gSaveFile.save.data.unk_5E[arg0][arg1].unk_F & 1; sp90[2] = gSaveFile.save.data.unk_5E[arg0][arg1].unk_E & 1; - for (var_fs1 = 0.0f, i = 0; i < 3; i++, var_fs1 += 9.0f) { + for (xOffset = 0.0f, i = 0; i < 3; i++, xOffset += 9.0f) { if (sp90[i] == 0) { continue; } gDPSetPrimColor(gMasterDisp++, 0, 0, D_menu_801AF0D0[i], D_menu_801AF0DC[i], D_menu_801AF0E8[i], 255); - Graphics_DisplaySmallText(arg2 + var_fs1 - 1.0f, arg3 + 24.0f + 8.0f + 1.0f, 1.0f, 1.0f, + Graphics_DisplaySmallText(xPos + xOffset - 1.0f, yPos + 24.0f + 8.0f + 1.0f, 1.0f, 1.0f, D_menu_801AF0C4[i]); } } @@ -2434,9 +2431,9 @@ void Option_8019882C(s32 arg0, s32 arg1, f32 arg2, f32 arg3) { } void Option_8019896C(s32 arg0, f32 y, s32 arg2) { - static f32 D_menu_801AF130 = 0.0f; - static f32 D_menu_801AF134 = -121.0f; - static f32 D_menu_801AF138 = 40.1f; + static f32 zAngle = 0.0f; + static f32 xStart = -121.0f; + static f32 xAdvance = 40.1f; s32 i; PlanetId planet; s32 spFC; @@ -2451,7 +2448,7 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) { Lib_InitOrtho(&gMasterDisp); spFC = gSaveFile.save.data.unk_4A[arg0]; - for (x = D_menu_801AF134, i = 0; i < arg2; i++, x += D_menu_801AF138) { + for (x = xStart, i = 0; i < arg2; i++, x += xAdvance) { planet = gSaveFile.save.data.unk_5E[arg0][i].unk_8 & 0xF; switch (planet) { @@ -2463,7 +2460,7 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, x, y, 0.0f, MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, M_DTOR * D_menu_801AF130, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, M_DTOR * zAngle, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.3f, 0.3f, 0.3f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -2583,7 +2580,7 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) { Option_80192738(); - D_menu_801AF130 += 0.1f; + zAngle += 0.1f; Lib_InitPerspective(&gMasterDisp); } @@ -2624,8 +2621,8 @@ void Option_VersusMenuInit(void) { D_menu_801B93D0 = D_menu_801B9124; if (D_game_800D2870) { - sOptionCardList[1].unk_00.unk_1C = 129.0f; - sOptionCardList[1].unk_38.unk_04 = -7.5f; + sOptionCardList[1].unk_00.yPos = 129.0f; + sOptionCardList[1].unk_38.y = -7.5f; } gVsPointsToWin = 3; @@ -3479,8 +3476,8 @@ void Option_DrawMenuCard(MenuContext_38 arg0) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, arg0.unk_00, arg0.unk_04, arg0.unk_08, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, arg0.unk_0C, arg0.unk_10, 1.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, arg0.x, arg0.y, arg0.z, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, arg0.xScale, arg0.yScale, 1.0f, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_DTOR * 90.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -3492,36 +3489,36 @@ void Option_DrawMenuCard(MenuContext_38 arg0) { Lib_InitPerspective(&gMasterDisp); } -void Option_DrawMenuArwing(ArwingPosition arg0) { +void Option_DrawMenuArwing(ArwingPosition arwing) { if (D_menu_801B91BC != 0) { - Option_8019BC44(arg0.unk_0, arg0.unk_4, D_menu_801B91F4, D_menu_801B9200, 90.0f, D_menu_801B91F8); - Option_8019BC44(arg0.unk_0 + arg0.unk_8, arg0.unk_4, D_menu_801B91F4, D_menu_801B91FC, -90.0f, D_menu_801B91F8); + Option_DrawArwing(arwing.x, arwing.y, D_menu_801B91F4, D_menu_801B9200, 90.0f, D_menu_801B91F8); + Option_DrawArwing(arwing.x + arwing.range, arwing.y, D_menu_801B91F4, D_menu_801B91FC, -90.0f, D_menu_801B91F8); } } -void Option_8019BC44(f32 x, f32 y, f32 arg2, f32 arg3, f32 arg4, f32 arg5) { - f32 sp44; - f32 sp40; - f32 sp3C; +void Option_DrawArwing(f32 x, f32 y, f32 z, f32 yRot, f32 zRot, f32 scale) { + f32 dirX; + f32 dirY; + f32 dirZ; - Option_8019BE7C(D_menu_801B9224, D_menu_801B9228, 100.0f, &sp44, &sp40, &sp3C); + Option_8019BE7C(D_menu_801B9224, D_menu_801B9228, 100.0f, &dirX, &dirY, &dirZ); - Lights_SetOneLight(&gMasterDisp, sp44, sp40, sp3C, D_menu_801B922C, D_menu_801B9230, D_menu_801B9234, - D_menu_801B9238, D_menu_801B923C, D_menu_801B9240); + Lights_SetOneLight(&gMasterDisp, dirX, dirY, dirZ, sArwingLightColR, sArwingLightColG, sArwingLightColB, + sArwingLightAmbR, sArwingLightAmbG, sArwingLightAmbB); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, x, y, arg2, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, x, y, z, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, arg5, arg5, arg5, MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, M_DTOR * arg4, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, M_DTOR * arg3, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, M_DTOR * zRot, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_DTOR * yRot, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL_55(); - gSPDisplayList(gMasterDisp++, D_MAP_604A9F0); + gSPDisplayList(gMasterDisp++, aMapArwingDL); Matrix_Pop(&gGfxMatrix); } @@ -3532,21 +3529,21 @@ void Option_8019BDF0(void) { MTXF_APPLY); } -void Option_8019BE7C(f32 arg0, f32 arg1, f32 arg2, f32* arg3, f32* arg4, f32* arg5) { - Vec3f sp24; - Vec3f sp18; +void Option_8019BE7C(f32 xRot, f32 yRot, f32 arg2, f32* arg3, f32* arg4, f32* arg5) { + Vec3f dest; + Vec3f src; - sp18.x = 0.0f; - sp18.y = 0.0f; - sp18.z = arg2; + src.x = 0.0f; + src.y = 0.0f; + src.z = arg2; - Matrix_RotateY(gCalcMatrix, M_DTOR * arg1, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, M_DTOR * arg0, MTXF_APPLY); - Matrix_MultVec3f(gCalcMatrix, &sp18, &sp24); + Matrix_RotateY(gCalcMatrix, M_DTOR * yRot, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, M_DTOR * xRot, MTXF_APPLY); + Matrix_MultVec3f(gCalcMatrix, &src, &dest); - *arg3 = sp24.x; - *arg4 = sp24.y; - *arg5 = sp24.z; + *arg3 = dest.x; + *arg4 = dest.y; + *arg5 = dest.z; } void Option_8019BF34(void) { @@ -3595,35 +3592,37 @@ void Option_8019C04C(void) { Lib_InitPerspective(&gMasterDisp); } -void Option_DrawCardLabel(OptionTexture arg0) { - if (!(arg0.unk_20 <= 0.0f) && !(arg0.unk_24 <= 0.0f)) { - switch (arg0.unk_00) { +//! TODO: Enum for Texture types + +void Option_DrawCardLabel(OptionTexture tex) { + if (!(tex.xScale <= 0.0f) && !(tex.yScale <= 0.0f)) { + switch (tex.type) { case 1: RCP_SetupDL(&gMasterDisp, SETUPDL_78); - gDPSetPrimColor(gMasterDisp++, 0, 0, arg0.unk_28, arg0.unk_2C, arg0.unk_30, arg0.unk_34); - TextureRect_CI4(&gMasterDisp, arg0.unk_08, arg0.unk_0C, arg0.unk_10, arg0.unk_14, arg0.unk_18, - arg0.unk_1C, arg0.unk_20, arg0.unk_24); + gDPSetPrimColor(gMasterDisp++, 0, 0, tex.red, tex.green, tex.blue, tex.alpha); + TextureRect_CI4(&gMasterDisp, tex.texture, tex.palette, tex.width, tex.height, tex.xPos, tex.yPos, + tex.xScale, tex.yScale); break; case 2: RCP_SetupDL(&gMasterDisp, SETUPDL_78); - gDPSetPrimColor(gMasterDisp++, 0, 0, arg0.unk_28, arg0.unk_2C, arg0.unk_30, arg0.unk_34); - TextureRect_CI8(&gMasterDisp, arg0.unk_08, arg0.unk_0C, arg0.unk_10, arg0.unk_14, arg0.unk_18, - arg0.unk_1C, arg0.unk_20, arg0.unk_24); + gDPSetPrimColor(gMasterDisp++, 0, 0, tex.red, tex.green, tex.blue, tex.alpha); + TextureRect_CI8(&gMasterDisp, tex.texture, tex.palette, tex.width, tex.height, tex.xPos, tex.yPos, + tex.xScale, tex.yScale); break; case 0: RCP_SetupDL(&gMasterDisp, SETUPDL_76); - gDPSetPrimColor(gMasterDisp++, 0, 0, arg0.unk_28, arg0.unk_2C, arg0.unk_30, arg0.unk_34); - TextureRect_IA8(&gMasterDisp, arg0.unk_08, arg0.unk_10, arg0.unk_14, arg0.unk_18, arg0.unk_1C, - arg0.unk_20, arg0.unk_24); + gDPSetPrimColor(gMasterDisp++, 0, 0, tex.red, tex.green, tex.blue, tex.alpha); + TextureRect_IA8(&gMasterDisp, tex.texture, tex.width, tex.height, tex.xPos, tex.yPos, tex.xScale, + tex.yScale); break; case 3: RCP_SetupDL(&gMasterDisp, SETUPDL_76); - gDPSetPrimColor(gMasterDisp++, 0, 0, arg0.unk_28, arg0.unk_2C, arg0.unk_30, arg0.unk_34); - TextureRect_RGBA16(&gMasterDisp, arg0.unk_08, arg0.unk_10, arg0.unk_14, arg0.unk_18, arg0.unk_1C, - arg0.unk_20, arg0.unk_24); + gDPSetPrimColor(gMasterDisp++, 0, 0, tex.red, tex.green, tex.blue, tex.alpha); + TextureRect_RGBA16(&gMasterDisp, tex.texture, tex.width, tex.height, tex.xPos, tex.yPos, tex.xScale, + tex.yScale); break; } } @@ -4125,7 +4124,8 @@ void Option_8019D624(void) { s32 i; s32 j; s32 var_t2; - s32 var_a3, var_a0; + s32 var_a3; + s32 var_a0; s32 var_a1; u8 sp142[11][3]; u8 sp122[11]; @@ -4305,15 +4305,15 @@ void Option_8019DD44(void) { D_menu_801B91D4 = 114.0f - D_menu_801B93E4 * 130.0f; D_menu_801B91D8 = -6.0f + D_menu_801B93E4 * 130.0f; - sOptionCardList[3].unk_00.unk_18 = sOptionCardCurTextPosX[3]; - sOptionCardList[3].unk_00.unk_1C = 23.0f; - sOptionCardList[3].unk_00.unk_20 = 1.0f; - sOptionCardList[3].unk_00.unk_24 = 1.0f; - sOptionCardList[3].unk_58 = 1; - sOptionCardList[3].unk_38.unk_04 = 90.0f; - sOptionCardList[3].unk_38.unk_0C = 0.4f; - sOptionCardList[3].unk_38.unk_10 = 0.21f; - sOptionCardList[3].unk_5C = 1; + sOptionCardList[3].unk_00.xPos = sOptionCardCurTextPosX[3]; + sOptionCardList[3].unk_00.yPos = 23.0f; + sOptionCardList[3].unk_00.xScale = 1.0f; + sOptionCardList[3].unk_00.yScale = 1.0f; + sOptionCardList[3].unk_58 = true; + sOptionCardList[3].unk_38.y = 90.0f; + sOptionCardList[3].unk_38.xScale = 0.4f; + sOptionCardList[3].unk_38.yScale = 0.21f; + sOptionCardList[3].unk_5C = true; D_menu_801B912C++; break; diff --git a/src/sys/sys_main.c b/src/sys/sys_main.c index b3527876..8feb1455 100644 --- a/src/sys/sys_main.c +++ b/src/sys/sys_main.c @@ -105,6 +105,7 @@ void Audio_ThreadEntry(void* arg0) { AudioLoad_Init(); Audio_InitSounds(); + task = AudioThread_CreateTask(); if (task != NULL) { task->mesgQueue = &gAudioTaskMesgQueue; @@ -112,6 +113,7 @@ void Audio_ThreadEntry(void* arg0) { osWritebackDCacheAll(); osSendMesg(&gTaskMesgQueue, task, OS_MESG_NOBLOCK); } + while (true) { task = AudioThread_CreateTask(); if (task != NULL) { @@ -120,6 +122,7 @@ void Audio_ThreadEntry(void* arg0) { osWritebackDCacheAll(); } MQ_GET_MESG(&gAudioTaskMesgQueue, NULL); + if (task != NULL) { osSendMesg(&gTaskMesgQueue, task, OS_MESG_NOBLOCK); } @@ -176,6 +179,7 @@ void Main_SetVIMode(void) { (gControllerHold[3].button & R_TRIG) && (gControllerHold[3].button & Z_TRIG)) { sGammaMode = 1 - sGammaMode; } + switch (osTvType) { case OS_TV_PAL: osViSetMode(&osViModePalLan1); @@ -188,6 +192,7 @@ void Main_SetVIMode(void) { osViSetMode(&osViModeNtscLan1); break; } + if (sGammaMode != 0) { osViSetSpecialFeatures(OS_VI_DITHER_FILTER_ON | OS_VI_DIVOT_OFF | OS_VI_GAMMA_ON | OS_VI_GAMMA_DITHER_ON); } else { From bda6712db346b99d9fb6c21c48718195eee7a664 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Mon, 26 Aug 2024 02:25:16 -0300 Subject: [PATCH 147/151] asm_emit_size_directive: True --- yamls/us/rev1/header.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yamls/us/rev1/header.yaml b/yamls/us/rev1/header.yaml index 3827d794..d7951fa1 100644 --- a/yamls/us/rev1/header.yaml +++ b/yamls/us/rev1/header.yaml @@ -60,7 +60,7 @@ options: # section_order: [".text", ".data", ".rodata", ".bss", "bin"] # auto_all_sections: [".data", ".rodata", ".bss"] - + asm_emit_size_directive: True # REC mips_abi_float_regs: o32 From bfe2cd1c20638a93f61f787cbe666c38f5c66c96 Mon Sep 17 00:00:00 2001 From: Alejandro Asenjo Nitti <96613413+sonicdcer@users.noreply.github.com> Date: Tue, 27 Aug 2024 16:13:18 -0300 Subject: [PATCH 148/151] Remove static for file globals because they don't show up in the mapfile (#271) --- src/audio/audio_context.c | 58 ++++++------ src/engine/fox_360.c | 16 ++-- src/engine/fox_beam.c | 13 +-- src/engine/fox_colheaders.c | 8 +- src/engine/fox_demo.c | 58 ++++++------ src/engine/fox_effect.c | 26 +++--- src/engine/fox_enmy.c | 8 +- src/engine/fox_enmy2.c | 26 +++--- src/engine/fox_game.c | 10 +-- src/engine/fox_tank.c | 24 ++--- src/overlays/ovl_i1/fox_co.c | 81 ++++++++--------- src/overlays/ovl_i1/fox_i1.c | 2 +- src/overlays/ovl_i3/fox_i3.c | 4 +- src/overlays/ovl_i5/fox_ma.c | 83 ++++++++--------- src/overlays/ovl_i5/fox_ti.c | 106 +++++++++++----------- src/overlays/ovl_i6/fox_andross.c | 26 +++--- src/overlays/ovl_i6/fox_sy.c | 28 +++--- src/overlays/ovl_i6/fox_ve2.c | 4 +- src/overlays/ovl_menu/fox_option.c | 140 ++++++++++++++--------------- src/overlays/ovl_menu/fox_title.c | 14 +-- 20 files changed, 361 insertions(+), 374 deletions(-) diff --git a/src/audio/audio_context.c b/src/audio/audio_context.c index f356e1c6..5a34571d 100644 --- a/src/audio/audio_context.c +++ b/src/audio/audio_context.c @@ -104,39 +104,39 @@ volatile u32 gAudioResetTimer; u64 gAudioContextEnd[2]; -static ReverbSettings D_800C74D0[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x40, 0x4000, 0xD000, 0x3000 } }; -static ReverbSettings D_800C74E0[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x38, 0x6400, 0x1000, 0x1000 } }; -static ReverbSettings D_800C74F0[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x40, 0x4000, 0, 0 } }; -static ReverbSettings D_800C7500[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x30, 0x5000, 0, 0 } }; -static ReverbSettings D_800C7510[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x40, 0x6000, 0, 0 } }; -static ReverbSettings D_800C7520[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x30, 0x3000, 0, 0 } }; -static ReverbSettings D_800C7530[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x30, 0x5800, 0, 0 } }; -static ReverbSettings D_800C7540[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x30, 0x5000, 0, 0 } }; -static ReverbSettings D_800C7550[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x30, 0x3000, 0, 0 } }; -static ReverbSettings D_800C7560[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x40, 0x6000, 0, 0 } }; -static ReverbSettings D_800C7570[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x30, 0x3000, 0, 0 } }; -static ReverbSettings D_800C7580[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x40, 0x4000, 0, 0 } }; -static ReverbSettings D_800C7590[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 2, 0x28, 0x5800, 0, 0 } }; -static ReverbSettings D_800C75A0[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x30, 0x3000, 0, 0 } }; -static ReverbSettings D_800C75B0[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x38, 0x5000, 0, 0 } }; -static ReverbSettings D_800C75C0[3] = { +ReverbSettings D_800C74D0[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x40, 0x4000, 0xD000, 0x3000 } }; +ReverbSettings D_800C74E0[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x38, 0x6400, 0x1000, 0x1000 } }; +ReverbSettings D_800C74F0[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x40, 0x4000, 0, 0 } }; +ReverbSettings D_800C7500[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x30, 0x5000, 0, 0 } }; +ReverbSettings D_800C7510[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x40, 0x6000, 0, 0 } }; +ReverbSettings D_800C7520[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x30, 0x3000, 0, 0 } }; +ReverbSettings D_800C7530[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x30, 0x5800, 0, 0 } }; +ReverbSettings D_800C7540[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x30, 0x5000, 0, 0 } }; +ReverbSettings D_800C7550[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x30, 0x3000, 0, 0 } }; +ReverbSettings D_800C7560[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x40, 0x6000, 0, 0 } }; +ReverbSettings D_800C7570[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x30, 0x3000, 0, 0 } }; +ReverbSettings D_800C7580[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x40, 0x4000, 0, 0 } }; +ReverbSettings D_800C7590[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 2, 0x28, 0x5800, 0, 0 } }; +ReverbSettings D_800C75A0[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x30, 0x3000, 0, 0 } }; +ReverbSettings D_800C75B0[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x38, 0x5000, 0, 0 } }; +ReverbSettings D_800C75C0[3] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x38, 0x3000, 0, 0 }, { 2, 0x48, 0x6000, 0xC000, 0x4000 }, }; -static ReverbSettings D_800C75D8[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x30, 0x3000, 0, 0 } }; -static ReverbSettings D_800C75E8[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x30, 0x3000, 0, 0 } }; -static ReverbSettings D_800C75F8[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x30, 0x3000, 0, 0 } }; -static ReverbSettings D_800C7608[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x30, 0x3000, 0, 0 } }; -static ReverbSettings D_800C7618[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x30, 0x3000, 0, 0 } }; -static ReverbSettings D_800C7628[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x30, 0x3000, 0, 0 } }; -static ReverbSettings D_800C7638[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x30, 0x6800, 0, 0 } }; -static ReverbSettings D_800C7648[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x18, 0x3000, 0, 0 } }; -static ReverbSettings D_800C7658[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 2, 0x18, 0x3000, 0, 0 } }; -static ReverbSettings D_800C7668[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x18, 0x3000, 0, 0 } }; -static ReverbSettings D_800C7678[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x30, 0x3000, 0, 0 } }; -static ReverbSettings D_800C7688[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x30, 0x3000, 0, 0 } }; -static ReverbSettings D_800C76A8[] = { +ReverbSettings D_800C75D8[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x30, 0x3000, 0, 0 } }; +ReverbSettings D_800C75E8[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x30, 0x3000, 0, 0 } }; +ReverbSettings D_800C75F8[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x30, 0x3000, 0, 0 } }; +ReverbSettings D_800C7608[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x30, 0x3000, 0, 0 } }; +ReverbSettings D_800C7618[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x30, 0x3000, 0, 0 } }; +ReverbSettings D_800C7628[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x30, 0x3000, 0, 0 } }; +ReverbSettings D_800C7638[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x30, 0x6800, 0, 0 } }; +ReverbSettings D_800C7648[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x18, 0x3000, 0, 0 } }; +ReverbSettings D_800C7658[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 2, 0x18, 0x3000, 0, 0 } }; +ReverbSettings D_800C7668[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x18, 0x3000, 0, 0 } }; +ReverbSettings D_800C7678[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x30, 0x3000, 0, 0 } }; +ReverbSettings D_800C7688[2] = { { 1, 0x30, 0x3000, 0, 0 }, { 1, 0x30, 0x3000, 0, 0 } }; +ReverbSettings D_800C76A8[] = { // unused? { 1, 0x40, 0x4FFF, 0, 0 }, { 1, 0x30, 0x4FFF, 0, 0 }, diff --git a/src/engine/fox_360.c b/src/engine/fox_360.c index 161fafb0..d1be5ea4 100644 --- a/src/engine/fox_360.c +++ b/src/engine/fox_360.c @@ -364,15 +364,15 @@ void ActorAllRange_SetShadowData(Actor* this) { } } -static Vec3f sTeamSpawnPos[4] = { +Vec3f sTeamSpawnPos[4] = { { 0.0f, 20000.0f, 0.0f }, { 0.0f, 700.0f, 6500.0f }, { -300.0f, 800.0f, 6800.0f }, { 300.0f, 900.0f, 7200.0f }, }; -static AllRangeAi sTeamAi[4] = { AI360_FOX, AI360_FALCO, AI360_SLIPPY, AI360_PEPPY }; -static s32 sTeamSpawnTargets[4] = { -1, AI360_ENEMY, AI360_ENEMY + 1, AI360_ENEMY + 2 }; -static s32 sTeamSpawnTargetsKA[4] = { -1, AI360_ENEMY + 11, AI360_ENEMY + 13, AI360_ENEMY + 15 }; +AllRangeAi sTeamAi[4] = { AI360_FOX, AI360_FALCO, AI360_SLIPPY, AI360_PEPPY }; +s32 sTeamSpawnTargets[4] = { -1, AI360_ENEMY, AI360_ENEMY + 1, AI360_ENEMY + 2 }; +s32 sTeamSpawnTargetsKA[4] = { -1, AI360_ENEMY + 11, AI360_ENEMY + 13, AI360_ENEMY + 15 }; void ActorAllRange_SpawnTeam(void) { ActorAllRange* actor; @@ -430,14 +430,14 @@ void ActorAllRange_SpawnTeam(void) { } } -static Vec3f sStarWolfSpawnPos[4] = { +Vec3f sStarWolfSpawnPos[4] = { { 9500.0f, 5000.0f, 9500.0f }, { 10000.0f, 5000.0f, 10000.0f }, { 10000.0f, 5000.0f, 9500.0f }, { 9500.0f, 5000.0f, 10000.0f }, }; -static s32 sStarWolfSpawnTargets[4] = { AI360_FOX, AI360_FALCO, AI360_PEPPY, AI360_SLIPPY }; -static f32 sStarWolfVE2SpawnRot[4] = { 330.0f, 90.0f, 280.0f, 70.0f }; +s32 sStarWolfSpawnTargets[4] = { AI360_FOX, AI360_FALCO, AI360_PEPPY, AI360_SLIPPY }; +f32 sStarWolfVE2SpawnRot[4] = { 330.0f, 90.0f, 280.0f, 70.0f }; s32 gAllRangeSpawnEvent = 96 * 30; void ActorAllRange_SpawnStarWolf(void) { @@ -1275,7 +1275,7 @@ bool func_360_80031900(ActorAllRange* this) { } } -static Vec3f sSectorZRetreatPath[6] = { +Vec3f sSectorZRetreatPath[6] = { { 8000.0f, 500.0f, 0.0f }, { 5000.0f, 400.0f, 0.0f }, { 2000.0f, 300.0f, 0.0f }, { -500.0f, 250.0f, 0.0f }, { 0.0f, 250.0f, 0.0f }, { 0.0f, 250.0f, 0.0f }, }; diff --git a/src/engine/fox_beam.c b/src/engine/fox_beam.c index 48feefa0..adb02894 100644 --- a/src/engine/fox_beam.c +++ b/src/engine/fox_beam.c @@ -4,7 +4,7 @@ #include "assets/ast_great_fox.h" #include "assets/ast_versus.h" -static Vec3f sShotViewPos; +Vec3f sShotViewPos; void PlayerShot_SetupEffect351(Effect* effect, f32 xPos, f32 yPos, f32 zPos) { Effect_Initialize(effect); @@ -1222,10 +1222,10 @@ void PlayerShot_DrawLaser(PlayerShot* shot) { } } -static f32 D_800C9BD8[10] = { 100.0f, 100.0f, 0.0f, 0.0f, 0.0f, 50.0f, 0.0f, 40.0f, 30.0f, 100.0f }; -static u8 D_800C9C00[4] = { 255, 255, 32, 32 }; -static u8 D_800C9C04[4] = { 255, 32, 255, 32 }; -static u8 D_800C9C08[4] = { 32, 32, 32, 255 }; +f32 D_800C9BD8[10] = { 100.0f, 100.0f, 0.0f, 0.0f, 0.0f, 50.0f, 0.0f, 40.0f, 30.0f, 100.0f }; +u8 D_800C9C00[4] = { 255, 255, 32, 32 }; +u8 D_800C9C04[4] = { 255, 32, 255, 32 }; +u8 D_800C9C08[4] = { 32, 32, 32, 255 }; void PlayerShot_DrawShot(PlayerShot* shot) { Vec3f sp11C = { 0.0f, 0.0f, 0.0f }; s32 pad[4]; @@ -2083,7 +2083,8 @@ void PlayerShot_UpdateBomb(PlayerShot* shot) { } } -static Vec3f sLockOnPos = { 0.0f, 0.0f, 0.0f }; +Vec3f sLockOnPos = { 0.0f, 0.0f, 0.0f }; + void PlayerShot_UpdateLockOnShot(PlayerShot* shot) { s32 i; s32 var_a3; diff --git a/src/engine/fox_colheaders.c b/src/engine/fox_colheaders.c index 9ff133ac..1f15184a 100644 --- a/src/engine/fox_colheaders.c +++ b/src/engine/fox_colheaders.c @@ -12,23 +12,23 @@ #include "assets/ast_versus.h" #include "assets/ast_zoness.h" -static Vec3f D_800D2920[16] = { +Vec3f D_800D2920[16] = { { 1075.0f, 0.0f, 0.0f }, { 746.0f, 0.0f, -746.0f }, { 202.0f, 361.0f, -202.0f }, { 0.0f, 0.0f, -1075.0f }, { 291.0f, 558.0f, 0.0f }, { 0.0f, 354.0f, -291.0f }, { 202.0f, 594.0f, 202.0f }, { 772.0f, 0.0f, 622.0f }, { 0.0f, 473.0f, 291.0f }, { 144.0f, 0.0f, 1075.0f }, { -202.0f, 461.0f, 202.0f }, { -515.0f, 0.0f, 746.0f }, { -291.0f, 453.0f, 0.0f }, { -372.0f, 390.0f, -281.0f }, { -951.0f, 0.0f, 0.0f }, { -746.0f, 0.0f, -746.0f }, }; -static Triangle D_800D29E0[22] = { +Triangle D_800D29E0[22] = { { 0, 1, 2 }, { 2, 1, 3 }, { 4, 2, 5 }, { 3, 5, 2 }, { 2, 4, 0 }, { 4, 6, 7 }, { 7, 0, 4 }, { 6, 4, 5 }, { 7, 6, 8 }, { 8, 9, 7 }, { 8, 10, 11 }, { 10, 8, 6 }, { 11, 9, 8 }, { 12, 10, 6 }, { 6, 13, 12 }, { 14, 12, 13 }, { 10, 12, 14 }, { 14, 11, 10 }, { 5, 13, 6 }, { 5, 3, 15 }, { 15, 13, 5 }, { 13, 15, 14 }, }; -static Triangle D_800D2A64[13] = { +Triangle D_800D2A64[13] = { { 0, 1, 2 }, { 2, 3, 4 }, { 2, 5, 0 }, { 4, 5, 2 }, { 4, 3, 6 }, { 4, 7, 5 }, { 8, 7, 4 }, { 4, 6, 8 }, { 7, 8, 9 }, { 0, 7, 9 }, { 5, 7, 0 }, { 9, 10, 0 }, { 10, 1, 0 }, }; -static Vec3f D_800D2AB4[11] = { +Vec3f D_800D2AB4[11] = { { -218.0f, 131.0f, 0.0f }, { -435.0f, 0.0f, 0.0f }, { -336.0f, 0.0f, 218.0f }, { 0.0f, 0.0f, 435.0f }, { 0.0f, 160.0f, 218.0f }, { -168.0f, 131.0f, 109.0f }, { 336.0f, 0.0f, 218.0f }, { 0.0f, 174.0f, 0.0f }, { 435.0f, 0.0f, -204.0f }, { 0.0f, 0.0f, -435.0f }, { -318.0f, 0.0f, -218.0f }, diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index 88ff4c93..aeaa775c 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -71,13 +71,13 @@ void func_demo_80048AC0(TeamId teamId) { } } -static Vec3f D_demo_800C9F60[] = { +Vec3f D_demo_800C9F60[] = { { 2000.0f, 2000.0f, 2000.0f }, { -2000.0f, 2000.0f, 2000.0f }, { 0.0f, -3000.0f, 3000.0f }, { 5000.0f, -3000.0f, -3000.0f }, }; -static f32 D_demo_800C9F90[] = { 75.0f, -80.0f, 85.0f, 0.0f }; +f32 D_demo_800C9F90[] = { 75.0f, -80.0f, 85.0f, 0.0f }; void func_demo_80048CC4(ActorCutscene* this, s32 index) { Actor_Initialize(this); @@ -260,7 +260,7 @@ void Cutscene_WarpZoneComplete(Player* player) { player->rockAngle = SIN_DEG(player->rockPhase); } -static Vec3f D_demo_800C9FA0[] = { +Vec3f D_demo_800C9FA0[] = { { 200.0f, -10.0f, 200.0f }, { -200.0f, 20.0f, 200.0f }, { 0.0f, 50.0f, 400.0f }, @@ -324,14 +324,14 @@ void func_demo_8004990C(Player* player) { player->bankAngle = player->rot.z + player->zRotBank + player->zRotBarrelRoll; } -static f32 D_demo_800C9FD0[] = { -1200.0f, 1200.0f, 0.0f, 0.0f }; -static f32 D_demo_800C9FE0[] = { 0.0f, 0.0f, 600.0f, 2000.0f }; -static f32 D_demo_800C9FF0[] = { -100.0f, 0.0f, 100.0f, 500.0f }; -static f32 D_demo_800CA000[] = { -150.0f, 150.0f, 0.0f, 0.0f }; -static f32 D_demo_800CA010[] = { 0.0f, 0.0f, 80.0f, 1000.0f }; -static f32 D_demo_800CA020[] = { 45.0f, -45.0f, 10.0f, 0.0f }; -static s32 D_demo_800CA030[] = { 0, 0, 0, 1 }; -static s32 D_demo_800CA040[] = { 0, 0, 0, 0 }; +f32 D_demo_800C9FD0[] = { -1200.0f, 1200.0f, 0.0f, 0.0f }; +f32 D_demo_800C9FE0[] = { 0.0f, 0.0f, 600.0f, 2000.0f }; +f32 D_demo_800C9FF0[] = { -100.0f, 0.0f, 100.0f, 500.0f }; +f32 D_demo_800CA000[] = { -150.0f, 150.0f, 0.0f, 0.0f }; +f32 D_demo_800CA010[] = { 0.0f, 0.0f, 80.0f, 1000.0f }; +f32 D_demo_800CA020[] = { 45.0f, -45.0f, 10.0f, 0.0f }; +s32 D_demo_800CA030[] = { 0, 0, 0, 1 }; +s32 D_demo_800CA040[] = { 0, 0, 0, 0 }; void func_demo_80049968(ActorCutscene* this, s32 index) { Actor_Initialize(this); @@ -662,10 +662,10 @@ void Cutscene_LevelStart(Player* player) { } } -static f32 D_demo_800CA050[] = { 210.0f, -210.0f, 0.0f }; -static f32 D_demo_800CA05C[] = { -60.0f, -60.0f, -120.0f }; -static f32 D_demo_800CA068[] = { -150.0f, -150.0f, -300.0f }; -static f32 D_demo_800CA074[] = { 360.0f, -360.0f, 0.0f }; +f32 D_demo_800CA050[] = { 210.0f, -210.0f, 0.0f }; +f32 D_demo_800CA05C[] = { -60.0f, -60.0f, -120.0f }; +f32 D_demo_800CA068[] = { -150.0f, -150.0f, -300.0f }; +f32 D_demo_800CA074[] = { 360.0f, -360.0f, 0.0f }; void func_demo_8004A700(ActorCutscene* this, s32 index) { Actor_Initialize(this); @@ -744,8 +744,8 @@ void func_demo_8004AA84(void) { } } -static f32 D_demo_800CA080[] = { -400.0f, 0.0f, 400.0f }; -static f32 D_demo_800CA08C[] = { 0.0f, 200.0f, 0.0f }; +f32 D_demo_800CA080[] = { -400.0f, 0.0f, 400.0f }; +f32 D_demo_800CA08C[] = { 0.0f, 200.0f, 0.0f }; void Cutscene_AllRangeMode(Player* player) { s32 pad; @@ -1877,9 +1877,9 @@ void Cutscene_PlayerDown(Player* player) { } } -static f32 D_demo_800CA098[] = { 1.0f, -0.9f, 0.7f }; -static f32 D_demo_800CA0A4[] = { 150.0f, 100.0f, 200.0f }; -static f32 D_demo_800CA0B0[] = { 200.0f, 300.0f, 500.0f }; +f32 D_demo_800CA098[] = { 1.0f, -0.9f, 0.7f }; +f32 D_demo_800CA0A4[] = { 150.0f, 100.0f, 200.0f }; +f32 D_demo_800CA0B0[] = { 200.0f, 300.0f, 500.0f }; void func_demo_8004E4D4(ActorCutscene* this) { Vec3f sp54; @@ -2440,36 +2440,36 @@ void ActorCutscene_Update(ActorCutscene* this) { } } -static Vec3f D_demo_800CA0BC[] = { +Vec3f D_demo_800CA0BC[] = { { -1373.0, 484.0, -374.0 }, { 1373.0, 484.0, -374.0 }, { -1373.0, -704.0, -374.0 }, { 1373.0, -704.0, -374.0 }, }; -static Vec3f D_demo_800CA0EC[] = { +Vec3f D_demo_800CA0EC[] = { { 0.0, 40.0, -2278.0 }, { 295.0, -92.0, -1301.0 }, { -295.0, -92.0, -1301.0 }, }; -static Vec3f D_demo_800CA110[8] = { +Vec3f D_demo_800CA110[8] = { { 170.0f, -35.0f, -380.0f }, { -170.0f, -40.0f, -380.0f }, { 170.0f, -130.0f, -380.0f }, { -170.0f, -140.0f, -380.0f }, { 140.0f, 40.0f, -250.0f }, { -150.0f, 40.0f, -250.0f }, { 140.0f, 0.0f, -250.0f }, { -150.0f, 0.0f, -250.0f }, }; -static f32 D_demo_800CA170[] = { +f32 D_demo_800CA170[] = { 0.15f, 0.45f, 0.75f, 1.3f, 0.75f, 0.45f, 0.15f, 0.0f, }; -static f32 D_demo_800CA190[] = { 5.0f, 5.2f }; -static f32 D_demo_800CA198[] = { +f32 D_demo_800CA190[] = { 5.0f, 5.2f }; +f32 D_demo_800CA198[] = { 0.5f, 1.5f, 2.5f, 1.5f, 0.5f, 0.2f, 0.2f, }; -static f32 D_demo_800CA1B4[] = { +f32 D_demo_800CA1B4[] = { -30.0f, -60.0f, -90.0f, -120.0f, -150.0f, -180.0f, -200.0, -210.0, }; -static f32 D_demo_800CA1D4[] = { +f32 D_demo_800CA1D4[] = { 1.5f, 0.87f, 0.83f, 0.75f, 0.7f, 0.6f, 0.4f, 0.1f, }; -static Animation* D_demo_800CA1F4[] = { +Animation* D_demo_800CA1F4[] = { &D_SY_60265B4, &D_SY_602B8DC, &D_SY_60034C4, &D_SY_602A2CC, &D_SY_602CEB4, &D_SY_602B778, &D_SY_601F3B8, }; diff --git a/src/engine/fox_effect.c b/src/engine/fox_effect.c index 474cf117..d4a89a61 100644 --- a/src/engine/fox_effect.c +++ b/src/engine/fox_effect.c @@ -65,14 +65,14 @@ void BonusText_Update(void) { } } -static Gfx* sLargeBonusDLs[4][2] = { +Gfx* sLargeBonusDLs[4][2] = { { D_1016410, D_1003130 }, { D_10162A0, D_1003130 }, { D_1016130, D_1003130 }, { D_1015FC0, D_1003130 }, }; -static Gfx* sSmallBonusDLs[10] = { +Gfx* sSmallBonusDLs[10] = { D_1015810, D_1016410, D_10162A0, D_1016130, D_1015FC0, D_1015E50, D_10156A0, D_1015CE0, D_1015B70, D_1015320, }; @@ -303,7 +303,7 @@ void Effect_Effect385_Draw(Effect385* this) { } // Possibly the little sparks of electricity that come off the arwing and landmaster when low on health -static f32 D_800D1534[][10] = { +f32 D_800D1534[][10] = { { 38.45957f, -65.08043f, 8.068213f, 87.01006f, -86.956184f, -71.82677f, 37.854507f, 46.845963f, 23.723173f, 84.2551f }, { -77.50479f, 86.4889f, -8.664565f, -74.90449f, -42.23121f, 49.20716f, -18.885563f, -47.375793f, -58.059227f, @@ -422,7 +422,7 @@ void Effect_Effect345_Draw(Effect345* this) { RCP_SetupDL(&gMasterDisp, SETUPDL_64); } -static s32 D_800D173C[] = { 255, 255, 255, 0, 0, 0, 255, 0, 255, 0, 0, 0, 255, 255, 0, 0, 0, 255, 0, 0 }; +s32 D_800D173C[] = { 255, 255, 255, 0, 0, 0, 255, 0, 255, 0, 0, 0, 255, 255, 0, 0, 0, 255, 0, 0 }; void Effect_Effect346_Draw(Effect346* this) { s32 temp_ft3; @@ -1049,7 +1049,7 @@ void Effect_Effect359_Update(Effect359* this) { this->unk_4A++; } -static Gfx* D_800D178C[] = { D_TI_6003440, D_TI_60034E0, D_TI_6003580, D_TI_6003620, D_TI_60036C0, D_TI_6003760 }; +Gfx* D_800D178C[] = { D_TI_6003440, D_TI_60034E0, D_TI_6003580, D_TI_6003620, D_TI_60036C0, D_TI_6003760 }; void Effect_Effect359_Draw(Effect359* this) { RCP_SetupDL(&gMasterDisp, SETUPDL_68); @@ -2043,7 +2043,7 @@ void Effect_Effect339_Update(EffectFireSmoke* this) { Math_SmoothStepToF(&this->scale1, 0.0f, 1.0f, 0.05f, 0.0f); } -static Gfx* D_800D17A4[] = { +Gfx* D_800D17A4[] = { D_BG_PLANET_200B630, D_BG_PLANET_200B630, D_BG_PLANET_200B630, D_BG_PLANET_200B630, D_BG_PLANET_200A5A0, D_BG_PLANET_2009510, D_BG_PLANET_2008480, D_BG_PLANET_20073F0, D_BG_PLANET_2006360, D_BG_PLANET_200C6C0, D_BG_PLANET_20052D0, D_BG_PLANET_2004240, D_BG_PLANET_20031B0, D_BG_PLANET_2002120, D_BG_PLANET_2001090, @@ -2051,12 +2051,12 @@ static Gfx* D_800D17A4[] = { D_BG_PLANET_200E7F0, }; -static f32 D_800D17F8[] = { +f32 D_800D17F8[] = { 1.0f, 1.1f, 1.1f, 1.2f, 1.2f, 1.3f, 1.3f, 1.4f, 1.4f, 1.5f, 1.5f, 1.6f, 1.6f, 1.7f, 1.7f, 1.8f, 1.8f, 1.9f, 1.9f, 2.0f, 2.0f, }; -static Color_RGBA32 D_800D184C[] = { +Color_RGBA32 D_800D184C[] = { { 255, 255, 255, 255 }, { 255, 0, 0, 255 }, { 255, 40, 40, 255 }, { 255, 80, 80, 255 }, { 255, 120, 120, 255 }, { 255, 160, 160, 255 }, { 255, 200, 200, 255 }, { 255, 240, 240, 255 }, { 255, 255, 255, 255 }, { 255, 255, 255, 255 }, { 255, 255, 255, 255 }, { 255, 255, 255, 255 }, @@ -2065,7 +2065,7 @@ static Color_RGBA32 D_800D184C[] = { { 0, 0, 0, 50 }, }; -static Gfx* D_800D18A0[] = { +Gfx* D_800D18A0[] = { D_BG_SPACE_20066C0, D_BG_SPACE_20066C0, D_BG_SPACE_2005E30, D_BG_SPACE_20055A0, D_BG_SPACE_2004D10, D_BG_SPACE_2004480, D_BG_SPACE_2003BF0, D_BG_SPACE_2003360, D_BG_SPACE_2002AD0, D_BG_SPACE_2002240, D_BG_SPACE_20019B0, D_BG_SPACE_2001120, D_BG_SPACE_2000890, D_BG_SPACE_2000000, @@ -3481,8 +3481,8 @@ void func_effect_80081BEC(f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 arg4) { } } -static f32 D_800D18E8 = 0.0f; -static f32 D_800D18EC = 0.0f; +f32 D_800D18E8 = 0.0f; +f32 D_800D18EC = 0.0f; void Effect_Effect395_Update(Effect395* this) { f32 sp84; @@ -4212,10 +4212,10 @@ void Effect_Effect399_Update(Effect399* this) { } // RGB Values. Used like an array of [8][3], but only matches this way. -static s32 D_800D18F0[] = { 32, 32, 255, 0, 255, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 255, 255, 0, 255, 0, 255, 0 }; +s32 D_800D18F0[] = { 32, 32, 255, 0, 255, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, 255, 255, 0, 255, 0, 255, 0 }; // Alpha values -static s32 D_800D1950[] = { 255, 210, 180, 120, 70, 30, 0, 0 }; +s32 D_800D1950[] = { 255, 210, 180, 120, 70, 30, 0, 0 }; void Effect_Effect399_Draw(Effect399* this) { s32 tmp; diff --git a/src/engine/fox_enmy.c b/src/engine/fox_enmy.c index 345b04d9..cafc06d7 100644 --- a/src/engine/fox_enmy.c +++ b/src/engine/fox_enmy.c @@ -31,7 +31,7 @@ ObjectInit* gLevelObjectInits[] = { D_KA_6011044, D_BO_600FF74, D_SZ_6006EB4, D_VE2_6014D94, D_versus_302DE3C, }; -static s32 D_enmy_800CFDF4[] = { +s32 D_enmy_800CFDF4[] = { /* 0 */ OBJ_SCENERY_CO_STONE_ARCH, /* 1 */ OBJ_ITEM_SILVER_RING, /* 2 */ OBJ_ITEM_SILVER_RING, @@ -59,15 +59,15 @@ static s32 D_enmy_800CFDF4[] = { /* 24 */ OBJ_SCENERY_CO_STONE_ARCH, /* 25 */ OBJ_ITEM_SILVER_STAR, }; -static f32 D_enmy_800CFE5C[] = { +f32 D_enmy_800CFE5C[] = { 0.0f, 1.0f, 0.5f, 0.33f, 0.25f, 1.0f, 0.5f, 0.33f, 0.25f, 1.0f, 0.5f, 0.33f, 0.25f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -1.0f, 0.1f, 1.0f, 1.0f, 1.0f, }; -static Vec3f D_enmy_800CFEC4[] = { +Vec3f D_enmy_800CFEC4[] = { { 0.0f, 0.0f, 50.0f }, { -50.0f, 0.0f, 0.0f }, { 50.0f, 0.0f, 0.0f }, { 0.0f, 50.0f, 0.0f }, { 0.0f, 0.0f, -50.0f }, { 0.0f, -50.0f, 0.0f }, }; -static Vec3f D_enmy_800CFF0C[] = { +Vec3f D_enmy_800CFF0C[] = { { 0.0f, 0.0f, 0.0f }, { 0.0f, -90.0f, 0.0f }, { 0.0f, 90.0f, 0.0f }, { -90.0f, 0.0f, 0.0f }, { 0.0f, 180.0f, 0.0f }, { 90.0f, 0.0f, 0.0f }, }; diff --git a/src/engine/fox_enmy2.c b/src/engine/fox_enmy2.c index 0a935802..e35f7a0a 100644 --- a/src/engine/fox_enmy2.c +++ b/src/engine/fox_enmy2.c @@ -237,14 +237,14 @@ void MeHopBot_Update(MeHopBot* this) { void MeMora_Update(MeMora* this) { } -static s16 D_800CFF94[16] = { +s16 D_800CFF94[16] = { 0, 98, 96, 94, 92, 90, 88, 86, 84, 82, 80, 78, 76, 74, 72, 70, }; -static u8 gMeMoraPartIdx[16] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2 }; -static f32 gMeMoraScale[16] = { +u8 gMeMoraPartIdx[16] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2 }; +f32 gMeMoraScale[16] = { 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.99f, 0.98f, 0.94f, 0.88f, 0.8f, 1.0f, }; -static Gfx* gMemoraPartDL[3] = { aEnmySpMeMora1DL, aEnmySpMeMora2DL, aEnmySpMeMora3DL }; +Gfx* gMemoraPartDL[3] = { aEnmySpMeMora1DL, aEnmySpMeMora2DL, aEnmySpMeMora3DL }; void MeMora_Dying(MeMora* this) { Vec3f sp34; @@ -539,7 +539,8 @@ typedef enum DebrisType { DEBRIS_70 = 70, } DebrisType; -static Vec3f D_800D0030 = { 0.0f, -10.0f, 0.0f }; // could be in-function +Vec3f D_800D0030 = { 0.0f, -10.0f, 0.0f }; // could be in-function + void ActorDebris_Update(ActorDebris* this) { f32 sp4C; f32 sp48; @@ -945,7 +946,7 @@ typedef struct { // clang-format off -static EventActorInfo sEventActorInfo[108] = { +EventActorInfo sEventActorInfo[108] = { /* EVID_VENOM_FIGHTER_1 */ { aVenomFighter1DL, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, /* EVID_VENOM_FIGHTER_2 */ { aVenomFighter2DL, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, EISFX_EN_ENGINE_01, 0, 1.0f, 1 }, /* EVID_VENOM_FIGHTER_2 */ { NULL, gCubeHitbox100, 1.0f, 20000.0f, 3000.0f, 1, 0, EISFX_ARWING_ENGINE_FG, 0, 0.0f, 0 }, @@ -1058,7 +1059,7 @@ static EventActorInfo sEventActorInfo[108] = { // clang-format on -static Color_RGBA32 sEventTexLineColors[6] = { +Color_RGBA32 sEventTexLineColors[6] = { // could be in-function { 255, 255, 255, 255 }, { 160, 160, 255, 255 }, { 80, 80, 255, 255 }, { 80, 255, 80, 255 }, { 255, 80, 80, 255 }, { 255, 255, 80, 255 }, @@ -2824,7 +2825,7 @@ void ActorEvent_ProcessTriggers(ActorEvent* this) { } // could be in-function, but probably weren't -static Vec3f D_800D0DD4[56] = { +Vec3f D_800D0DD4[56] = { { 158.0f, 256.0f, 1513.0f }, { 384.0f, 42.0f, 1187.0f }, { 284.0f, 129.0f, 769.0f }, { 482.0f, 19.0f, 769.0f }, { 386.0f, 105.0f, 253.0f }, { 221.0f, 209.0f, 33.0f }, { 78.0f, 263.0f, 637.0f }, { 78.0f, 263.0f, 76.0f }, { 18.0f, 263.0f, 1683.0f }, @@ -2845,7 +2846,7 @@ static Vec3f D_800D0DD4[56] = { { -73.0f, 337.0f, -426.0f }, { -73.0f, 548.0f, -411.0f }, { -65.0f, 391.0f, -1237.0f }, { -193.0f, 250.0f, -1026.0f }, { -292.0f, 271.0f, -587.0f }, }; -static Vec3f D_800D1074[24] = { +Vec3f D_800D1074[24] = { { 100.0f, 55.0f, 450.0f }, { 117.0f, 57.0f, 738.0f }, { 14.0f, 31.0f, 894.0f }, { 204.0f, 0.0f, -72.0f }, { 204.0f, 33.0f, -253.0f }, { 344.0f, 0.0f, -295.0f }, { 344.0f, -51.0f, -457.0f }, { 87.0f, 124.0f, -699.0f }, { 169.0f, -40.0f, -564.0f }, @@ -2855,7 +2856,7 @@ static Vec3f D_800D1074[24] = { { -344.0f, -51.0f, -457.0f }, { -87.0f, 124.0f, -699.0f }, { -169.0f, -40.0f, -564.0f }, { -113.0f, -147.0f, -367.0f }, { -112.0f, -146.0f, -13.0f }, { -69.0f, -118.0f, 158.0f }, }; -static Vec3f D_800D1194[21] = { +Vec3f D_800D1194[21] = { { 764.0f, 13.0f, 71.0f }, { 390.0f, 13.0f, 67.0f }, { 390.0f, 332.0f, 67.0f }, { 504.0f, 508.0f, 67.0f }, { 251.0f, 508.0f, 67.0f }, { -35.0f, 341.0f, 67.0f }, { -35.0f, 673.0f, 67.0f }, { -354.0f, 594.0f, 67.0f }, { -354.0f, 273.0f, 67.0f }, { -695.0f, 97.0f, 67.0f }, { -378.0f, -57.0f, 67.0f }, { -378.0f, -266.0f, 67.0f }, @@ -3021,7 +3022,8 @@ void ActorEvent_80072474(ActorEvent* this) { Math_SmoothStepToAngle(&this->fwork[15], this->fwork[16], 0.5f, 8.0f, 0.0f); } -static Vec3f D_800D1290 = { 0.0f, 837.00006f, 0.0f }; // could be in-function +Vec3f D_800D1290 = { 0.0f, 837.00006f, 0.0f }; // could be in-function + void ActorEvent_Update(ActorEvent* this) { s32 spFC; f32 var_fv0; @@ -3799,7 +3801,7 @@ void ActorEvent_Update(ActorEvent* this) { } } -static UNK_TYPE D_800D129C[140] = { 0 }; // unused +UNK_TYPE D_800D129C[140] = { 0 }; // unused bool ActorEvent_OverrideLimbDraw1(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { Actor* this = thisx; diff --git a/src/engine/fox_game.c b/src/engine/fox_game.c index 88550a7f..6cd74a2f 100644 --- a/src/engine/fox_game.c +++ b/src/engine/fox_game.c @@ -22,11 +22,11 @@ f32 gProjectFar; bool gShowReticles[4] = { true, true, true, true }; bool D_game_800D2870 = false; -static s32 sVsCameraULx[] = { 0, SCREEN_WIDTH / 2, 0, SCREEN_WIDTH / 2 }; -static s32 sVsCameraLRx[] = { SCREEN_WIDTH / 2 - 1, SCREEN_WIDTH - 1, SCREEN_WIDTH / 2 - 1, SCREEN_WIDTH - 1 }; -static s32 sVsCameraULy[] = { 0, 0, SCREEN_HEIGHT / 2, SCREEN_HEIGHT / 2 }; -static s32 sVsCameraLRy[] = { SCREEN_HEIGHT / 2 - 1, SCREEN_HEIGHT / 2 - 1, SCREEN_HEIGHT - 1, SCREEN_HEIGHT - 1 }; -static s32 sLevelSceneIds[] = { +s32 sVsCameraULx[] = { 0, SCREEN_WIDTH / 2, 0, SCREEN_WIDTH / 2 }; +s32 sVsCameraLRx[] = { SCREEN_WIDTH / 2 - 1, SCREEN_WIDTH - 1, SCREEN_WIDTH / 2 - 1, SCREEN_WIDTH - 1 }; +s32 sVsCameraULy[] = { 0, 0, SCREEN_HEIGHT / 2, SCREEN_HEIGHT / 2 }; +s32 sVsCameraLRy[] = { SCREEN_HEIGHT / 2 - 1, SCREEN_HEIGHT / 2 - 1, SCREEN_HEIGHT - 1, SCREEN_HEIGHT - 1 }; +s32 sLevelSceneIds[] = { /* LEVEL_CORNERIA */ SCENE_CORNERIA, /* LEVEL_METEO */ SCENE_METEO, /* LEVEL_SECTOR_X */ SCENE_SECTOR_X, diff --git a/src/engine/fox_tank.c b/src/engine/fox_tank.c index 3ef5166f..98b3d0b4 100644 --- a/src/engine/fox_tank.c +++ b/src/engine/fox_tank.c @@ -10,18 +10,18 @@ void func_tank_800481F4(Player* player); s32 func_tank_80046E40(Player* player, f32* hitboxData, s32* index, f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 zRot, f32 arg9, f32 argA, f32 argB); -static u8 D_800C9F00 = 0; -static u8 D_800C9F04 = 0; -static u8 D_800C9F08 = 0; -static s32 D_800C9F0C = 0; // unused. -static f32 D_800C9F10 = 0.0f; -static s32 D_800C9F14 = 0; -static s32 D_800C9F18[2] = { 0, 0 }; // unused. -static f32 D_800C9F20 = 0.0f; -static f32 D_800C9F24 = 0.0f; -static f32 D_800C9F28 = 0.0f; +u8 D_800C9F00 = 0; +u8 D_800C9F04 = 0; +u8 D_800C9F08 = 0; +s32 D_800C9F0C = 0; // unused. +f32 D_800C9F10 = 0.0f; +s32 D_800C9F14 = 0; +s32 D_800C9F18[2] = { 0, 0 }; // unused. +f32 D_800C9F20 = 0.0f; +f32 D_800C9F24 = 0.0f; +f32 D_800C9F28 = 0.0f; Vec3f D_tank_800C9F2C = { 0.0f, 0.0f, 0.0f }; -static s32 D_800C9F38 = 0; // unused +s32 D_800C9F38 = 0; // unused void func_tank_80043280(u16* text0, u16* text1, f32 zRot) { s32 py; @@ -873,7 +873,7 @@ void func_tank_8004641C(Player* player, s32 arg1, f32 arg2, f32 arg3, f32 arg4, } } -static f32 D_800C9F4C[5] = { 0.0f, -1.0f, 1.0f, 0.5f, -0.5f }; +f32 D_800C9F4C[5] = { 0.0f, -1.0f, 1.0f, 0.5f, -0.5f }; void func_tank_80046704(Player* player) { s32 pad[7]; diff --git a/src/overlays/ovl_i1/fox_co.c b/src/overlays/ovl_i1/fox_co.c index 4dff00a7..196a0889 100644 --- a/src/overlays/ovl_i1/fox_co.c +++ b/src/overlays/ovl_i1/fox_co.c @@ -1706,31 +1706,31 @@ void Corneria_CoCarrier_WaterSplash(CoCarrier* this) { Effect_Effect372_Spawn2(this->obj.pos.x, gGroundHeight, this->obj.pos.z, 1.0f, 10.0f); } -static Vec3f D_i1_801998CC = { 442.0f, 5.0f, 360.0f }; -static Vec3f D_i1_801998D8 = { -439.0f, 180.0f, 323.0f }; -static Vec3f D_i1_801998E4 = { -439.0f, -180.0f, 323.0f }; -static Vec3f D_i1_801998F0[2] = { +Vec3f D_i1_801998CC = { 442.0f, 5.0f, 360.0f }; +Vec3f D_i1_801998D8 = { -439.0f, 180.0f, 323.0f }; +Vec3f D_i1_801998E4 = { -439.0f, -180.0f, 323.0f }; +Vec3f D_i1_801998F0[2] = { { 0.0f, 50.0f, 473.0f }, { 300.0f, 70.0f, 200.0f }, }; -static Vec3f D_i1_80199908 = { 230.0f, 30.0f, -200.0f }; -static Vec3f D_i1_80199914[2] = { +Vec3f D_i1_80199908 = { 230.0f, 30.0f, -200.0f }; +Vec3f D_i1_80199914[2] = { { 434.0f, -74.0f, -580.0f }, { -438.0f, -277.0f, -750.0f }, }; -static Vec3f D_i1_8019992C = { -438.0f, 275.0f, -750.0f }; -static Vec3f D_i1_80199938 = { -426.0f, 147.0f, 2.0f }; -static Vec3f D_i1_80199944 = { -437.0f, -135.0f, 2.0f }; -static Vec3f D_i1_80199950 = { -250.0f, 30.0f, -200.0f }; -static Vec3f D_i1_8019995C[20] = { - { 67.0f, 44.0f, 377.0f }, { -146.0f, 24.0f, 376.0f }, { -88.0f, 85.0f, -15.0f }, { 105.0f, 89.0f, -169.0f }, - { -107.0f, -36.0f, 367.0f }, { 110.0f, -39.0f, 286.0f }, { -126.0f, -93.0f, 221.0f }, { 88.0f, -94.0f, 155.0f }, - { 126.0f, -179.0f, -101.0f }, { -94.0f, -151.0f, 29.0f }, { 105.0f, -140.0f, 2.0f }, { -18.0f, -101.0f, 77.0f }, - { -60.0f, -151.0f, 29.0f }, { -132.0f, 9.0f, 430.0f }, { 52.0f, 29.0f, 431.0f }, { -23.0f, 68.0f, 325.0f }, - { 116.0f, 34.0f, 368.0f }, { -49.0f, -53.0f, 366.0f }, { 113.0f, -62.0f, 255.0f }, { -114.0f, -88.0f, 182.0f } -}; -static s32 D_i1_80199A4C[4] = { 150, 200, 150, 200 }; -static f32 D_i1_80199A5C[4] = { -225.0f, 0.0f, 225.0f, 0.0f }; +Vec3f D_i1_8019992C = { -438.0f, 275.0f, -750.0f }; +Vec3f D_i1_80199938 = { -426.0f, 147.0f, 2.0f }; +Vec3f D_i1_80199944 = { -437.0f, -135.0f, 2.0f }; +Vec3f D_i1_80199950 = { -250.0f, 30.0f, -200.0f }; +Vec3f D_i1_8019995C[20] = { { 67.0f, 44.0f, 377.0f }, { -146.0f, 24.0f, 376.0f }, { -88.0f, 85.0f, -15.0f }, + { 105.0f, 89.0f, -169.0f }, { -107.0f, -36.0f, 367.0f }, { 110.0f, -39.0f, 286.0f }, + { -126.0f, -93.0f, 221.0f }, { 88.0f, -94.0f, 155.0f }, { 126.0f, -179.0f, -101.0f }, + { -94.0f, -151.0f, 29.0f }, { 105.0f, -140.0f, 2.0f }, { -18.0f, -101.0f, 77.0f }, + { -60.0f, -151.0f, 29.0f }, { -132.0f, 9.0f, 430.0f }, { 52.0f, 29.0f, 431.0f }, + { -23.0f, 68.0f, 325.0f }, { 116.0f, 34.0f, 368.0f }, { -49.0f, -53.0f, 366.0f }, + { 113.0f, -62.0f, 255.0f }, { -114.0f, -88.0f, 182.0f } }; +s32 D_i1_80199A4C[4] = { 150, 200, 150, 200 }; +f32 D_i1_80199A5C[4] = { -225.0f, 0.0f, 225.0f, 0.0f }; void Corneria_CoCarrier_Update(CoCarrier* this) { Vec3f sp84[33]; @@ -2302,8 +2302,8 @@ void Corneria_CoCarrier_Update(CoCarrier* this) { } } -static Vec3f D_i1_80199A6C = { -270.0f, 0.0f, 200.0f }; -static Vec3f D_i1_80199A78 = { 440.0f, 0.0f, 0.0f }; +Vec3f D_i1_80199A6C = { -270.0f, 0.0f, 200.0f }; +Vec3f D_i1_80199A78 = { 440.0f, 0.0f, 0.0f }; void Corneria_CarrierLeft_Update(CoCarrierLeft* this) { Vec3f sp4C; @@ -2405,8 +2405,8 @@ void Corneria_CarrierLeft_Update(CoCarrierLeft* this) { } } -static Vec3f D_i1_80199A84 = { 20.0f, -90.0f, 0.0f }; -static Vec3f D_i1_80199A90 = { -440.0f, 210.0f, 0.0f }; +Vec3f D_i1_80199A84 = { 20.0f, -90.0f, 0.0f }; +Vec3f D_i1_80199A90 = { -440.0f, 210.0f, 0.0f }; void Corneria_CarrierUpper_Update(CoCarrierUpper* this) { Vec3f sp4C; @@ -2513,8 +2513,8 @@ void Corneria_CarrierUpper_Update(CoCarrierUpper* this) { } } -static Vec3f D_i1_80199A9C = { 20.0f, 90.0f, 0.0f }; -static Vec3f D_i1_80199AA8 = { -440.0f, -210.0f, 0.0f }; +Vec3f D_i1_80199A9C = { 20.0f, 90.0f, 0.0f }; +Vec3f D_i1_80199AA8 = { -440.0f, -210.0f, 0.0f }; void Corneria_CarrierBottom_Update(CoCarrierBottom* this) { Vec3f sp4C; @@ -2825,13 +2825,10 @@ void Corneria_SpawnClouds(void) { } } -static f32 sCoLevelStartTeamXpos[3] = { 180.0f, -180.0f, 0.0f }; - -static f32 sCoLevelStartTeamYpos[3] = { 200.0f, 140.0f, 200.0f }; - -static f32 sCoLevelStartTeamZpos[3] = { 160.0f, 160.0f, 320.0f }; - -static f32 sCoLevelStartTeamZrot[3] = { -60.0f, 60.0f, -45.0f }; +f32 sCoLevelStartTeamXpos[3] = { 180.0f, -180.0f, 0.0f }; +f32 sCoLevelStartTeamYpos[3] = { 200.0f, 140.0f, 200.0f }; +f32 sCoLevelStartTeamZpos[3] = { 160.0f, 160.0f, 320.0f }; +f32 sCoLevelStartTeamZrot[3] = { -60.0f, 60.0f, -45.0f }; void Corneria_CsTeamSetup(ActorCutscene* this, s32 teamIdx) { Actor_Initialize(this); @@ -3380,19 +3377,13 @@ void Corneria_LevelStart(Player* player) { slippy->obj.pos.y -= 3.0f; } -static f32 D_i1_80199AE4[3] = { -1500.0f, 700.0f, 0.0f }; - -static f32 D_i1_80199AF0[3] = { -300.0f, 400.0f, 500.0f }; - -static f32 D_i1_80199AFC[3] = { 500.0f, 800.0f, 1200.0f }; - -static f32 D_i1_80199B08[3] = { -150.0f, 150.0f, 0.0f }; - -static f32 D_i1_80199B14[3] = { 0.0f, 0.0f, 0.0f }; - -static f32 D_i1_80199B20[3] = { 200.0f, 200.0f, 400.0f }; - -static f32 D_i1_80199B2C[3] = { 180.0f, -120.0f, 180.0f }; +f32 D_i1_80199AE4[3] = { -1500.0f, 700.0f, 0.0f }; +f32 D_i1_80199AF0[3] = { -300.0f, 400.0f, 500.0f }; +f32 D_i1_80199AFC[3] = { 500.0f, 800.0f, 1200.0f }; +f32 D_i1_80199B08[3] = { -150.0f, 150.0f, 0.0f }; +f32 D_i1_80199B14[3] = { 0.0f, 0.0f, 0.0f }; +f32 D_i1_80199B20[3] = { 200.0f, 200.0f, 400.0f }; +f32 D_i1_80199B2C[3] = { 180.0f, -120.0f, 180.0f }; void Corneria_CsLevelComplete1_TeamSetup(ActorCutscene* this, s32 index) { Vec3f sp5C; diff --git a/src/overlays/ovl_i1/fox_i1.c b/src/overlays/ovl_i1/fox_i1.c index 75b14f47..0c98ead5 100644 --- a/src/overlays/ovl_i1/fox_i1.c +++ b/src/overlays/ovl_i1/fox_i1.c @@ -1,6 +1,6 @@ #include "global.h" -static s32 D_i1_801997D0 = 0; +s32 D_i1_801997D0 = 0; s32 D_i1_8019B6C0; diff --git a/src/overlays/ovl_i3/fox_i3.c b/src/overlays/ovl_i3/fox_i3.c index eb81c8ba..79a98767 100644 --- a/src/overlays/ovl_i3/fox_i3.c +++ b/src/overlays/ovl_i3/fox_i3.c @@ -1,7 +1,7 @@ #include "global.h" -static s32 D_i3_801BECA0 = 0; -static s32 D_i3_801C2240; +s32 D_i3_801BECA0 = 0; +s32 D_i3_801C2240; void OvlI3_CallFunction(s32 mode, void* ptr) { } diff --git a/src/overlays/ovl_i5/fox_ma.c b/src/overlays/ovl_i5/fox_ma.c index 2d514076..d0b92417 100644 --- a/src/overlays/ovl_i5/fox_ma.c +++ b/src/overlays/ovl_i5/fox_ma.c @@ -60,7 +60,7 @@ Vec3f D_i5_801BE6A0[6]; Vec3f D_i5_801BE6E8[6]; s32 D_i5_801BE734[4]; -static UnkStruct_D_i5_801B8E50 D_i5_801B8E50[156] = { +UnkStruct_D_i5_801B8E50 D_i5_801B8E50[156] = { { 5174.4f, -2141.0f, 0.0f, 350.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, { 3401.4f, -1828.0f, 0.0f, 350.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, { 1627.8999f, -1515.0f, 0.0f, 350.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, @@ -218,7 +218,7 @@ static UnkStruct_D_i5_801B8E50 D_i5_801B8E50[156] = { { -507035.0f, -319.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, }; -static UnkStruct_D_i5_801B8E50 D_i5_801B9A80[86] = { +UnkStruct_D_i5_801B8E50 D_i5_801B9A80[86] = { { 5174.4f, -2141.0f, 0.0f, 350.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, { 3401.4f, -1828.0f, 0.0f, 350.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, { 1627.8999f, -1515.0f, 0.0f, 350.0f, OBJ_SCENERY_MA_TRAIN_TRACK_3 }, @@ -306,21 +306,21 @@ static UnkStruct_D_i5_801B8E50 D_i5_801B9A80[86] = { { -507035.0f, -489.0f, 0.0f, 0.0f, OBJ_SCENERY_MA_TRAIN_TRACK_6 }, }; -static UnkStruct_D_i5_801B8E50 D_i5_801BA138[8] = { +UnkStruct_D_i5_801B8E50 D_i5_801BA138[8] = { { -43605.8f, -1095.0f, 450.0f, -350.0f, 105 }, { -44786.7f, -884.0f, 450.0f, -350.0f, 105 }, { -50739.8f, -519.0f, 450.0f, -340.0f, 105 }, { -51871.2f, -110.0f, 450.0f, -340.0f, 105 }, { -84502.5f, 356.0f, 200.0f, -0.0f, 105 }, { -86080.9f, 352.0f, 200.0f, -0.0f, 105 }, { -87278.9f, 347.0f, 200.0f, -0.0f, 105 }, { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f }, }; -static u8 D_i5_801BA1D8 = 0; +u8 D_i5_801BA1D8 = 0; -static f32 sMaTrainSpeedTarget = 0.0f; -static f32 D_i5_801BA1E0 = 10000000.0f; -static u8 D_i5_801BA1E4 = 0; +f32 sMaTrainSpeedTarget = 0.0f; +f32 D_i5_801BA1E0 = 10000000.0f; +u8 D_i5_801BA1E4 = 0; u8 D_MA_801BA1E8 = 0; -static UnkStruct_D_i5_801BA1EC D_i5_801BA1EC[45] = { +UnkStruct_D_i5_801BA1EC D_i5_801BA1EC[45] = { { -0.0f, 16, -2000.0f, -3500.0f, 0 }, { -3500.0f, 16, -2000.0f, -5500.0f, 0 }, { -6500.0f, 16, -3500.0f, -5500.0f, 0 }, { -7300.0f, 16, -3500.0f, -5500.0f, 0 }, { -9000.0f, 16, -3000.0f, -5500.0f, 0 }, { -12000.0f, 16, -3000.0f, -4000.0f, 0 }, @@ -346,7 +346,7 @@ static UnkStruct_D_i5_801BA1EC D_i5_801BA1EC[45] = { { -1.0f, -1, -1.0f, -1.0f, -1 }, }; -static f32 D_i5_801BA570[5][10] = { +f32 D_i5_801BA570[5][10] = { { 450.0f, 350.0f, 250.0f, 150.0f, 50.0f, -50.0f, -150.0f, -250.0f, -350.0f, -450.0f }, { 50.0f, -50.0f, 150.0f, -150.0f, 250.0f, -250.0f, 350.0f, -350.0f, 450.0f, -450.0f }, { 50.0f, -50.0f, 250.0f, -250.0f, 150.0f, -150.0f, 350.0f, -350.0f, 450.0f, -450.0f }, @@ -354,7 +354,7 @@ static f32 D_i5_801BA570[5][10] = { { -200.0f, -100.0f, 0.0f, 100.0f, 200.0f, 400.0f, 300.0f, 200.0f, 100.0f, 0.0f }, }; -static f32 D_i5_801BA638[5][10] = { +f32 D_i5_801BA638[5][10] = { { 1000.0f, 1000.0f, 1000.0f, 1000.0f, 1000.0f, 1000.0f, 1000.0f, 1000.0f, 1000.0f, 1000.0f }, { 700.0f, 700.0f, 850.0f, 850.0f, 1000.0f, 1000.0f, 1150.0f, 1150.0f, 1300.0f, 1300.0f }, { 1000.0f, 1000.0f, 1000.0f, 1000.0f, 1500.0f, 1500.0f, 1500.0f, 1500.0f, 1500.0f, 1500.0f }, @@ -362,7 +362,7 @@ static f32 D_i5_801BA638[5][10] = { { 700.0f, 850.0f, 1000.0f, 1150.0f, 1300.0f, 1800.0f, 1950.0f, 2100.0f, 2250.0f, 2400.0f }, }; -static f32 D_i5_801BA700[] = { 610.0f, 0.0f }; // unused? +f32 D_i5_801BA700[] = { 610.0f, 0.0f }; // unused? void Macbeth_InitLevel(void) { s16 i; @@ -4205,8 +4205,8 @@ void Macbeth_Actor207_Init(Actor207* this) { gBossFrameCount = 0; } -static Vec3f D_i5_801BA744 = { 0.0f, 0.0f, 0.0f }; -static Vec3f D_i5_801BA750 = { 0.0f, 0.0f, 30.0f }; +Vec3f D_i5_801BA744 = { 0.0f, 0.0f, 0.0f }; +Vec3f D_i5_801BA750 = { 0.0f, 0.0f, 30.0f }; void Macbeth_Actor207_Update(Actor207* this) { s32 pad; @@ -5512,7 +5512,7 @@ void Macbeth_801AC6B4(ActorCutscene* this) { this->animFrame = 1; } -static f32 D_i5_801BA768 = 0.0f; +f32 D_i5_801BA768 = 0.0f; void Macbeth_LevelStart(Player* player) { f32 sp4C; @@ -6030,7 +6030,7 @@ void Macbeth_MaSpear_Update(MaSpear* this) { this->dmgType = DMG_NONE; } -static Vec3f D_i5_801BA784[8] = { +Vec3f D_i5_801BA784[8] = { { 40.0f, 10.0f, 30.0f }, { 41.0f, 10.0f, 10.0f }, { 43.0f, 10.0f, -10.0f }, { 45.0f, 10.0f, -30.0f }, { -40.0f, 10.0f, 30.0f }, { -41.0f, 10.0f, 10.0f }, { -43.0f, 10.0f, -10.0f }, { -45.0f, 10.0f, -30.0f }, }; // unused? @@ -6320,13 +6320,10 @@ void Macbeth_MaShockBox_Spawn(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, } } -static f32 D_i5_801BA7E4[5] = { 0.0f, 0.0f, 1180.0f, 200.0f, 1000.0f }; - -static f32 D_i5_801BA7F8[5] = { 600.0f, 200.0f, 400.0f, 2000.0f, 1200.0f }; - -static f32 D_i5_801BA80C[5] = { 500.0f, 600.0f, 200.0f, 4500.0f, 2300.0f }; - -static f32 D_i5_801BA820[5] = { 90.0f, -90.0f, 25.0f, 0.0f, 225.0f }; +f32 D_i5_801BA7E4[5] = { 0.0f, 0.0f, 1180.0f, 200.0f, 1000.0f }; +f32 D_i5_801BA7F8[5] = { 600.0f, 200.0f, 400.0f, 2000.0f, 1200.0f }; +f32 D_i5_801BA80C[5] = { 500.0f, 600.0f, 200.0f, 4500.0f, 2300.0f }; +f32 D_i5_801BA820[5] = { 90.0f, -90.0f, 25.0f, 0.0f, 225.0f }; void Macbeth_801AF27C(ActorCutscene* this, s32 arg1) { Player* player = &gPlayer[0]; @@ -6402,12 +6399,12 @@ void Macbeth_801AF44C(void) { AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); } -static Vec3f D_i5_801BA834[2] = { +Vec3f D_i5_801BA834[2] = { { 2000.0f, 300.0f, 500.0f }, { 2500.0f, 300.0f, -3300.0f }, }; -static f32 D_i5_801BA84C[2] = { 0.0f, 60.0f }; +f32 D_i5_801BA84C[2] = { 0.0f, 60.0f }; // Unused void Macbeth_801AF628(ActorCutscene* this, s32 index) { @@ -6458,19 +6455,18 @@ void Macbeth_Effect357_Spawn2(f32 xPos, f32 yPos, f32 zPos, f32 arg3) { } } -static f32 D_i5_801BA854[4] = { 1.5f, -1.0f, 0.7f, 0.0f }; - -static f32 D_i5_801BA864 = 0.9f; -static f32 D_i5_801BA868 = 0.7f; // unused? -static f32 D_i5_801BA86C = -1.0f; -static f32 D_i5_801BA870 = 1.5f; // unused? -static f32 D_i5_801BA874[4] = { 200.0f, 300.0f, 400.0f, 0.0f }; -static f32 D_i5_801BA884 = 500.0f; -static f32 D_i5_801BA888 = 100.0f; -static f32 D_i5_801BA88C = 120.0f; -static f32 D_i5_801BA890 = 100.0f; // unused? -static f32 D_i5_801BA894[5] = { 200.0f, 250.0f, 220.0f, 0.0f, 200.0f }; -static f32 D_i5_801BA8A8[3] = { 230.0f, 220.0f, 350.0f }; // unused? +f32 D_i5_801BA854[4] = { 1.5f, -1.0f, 0.7f, 0.0f }; +f32 D_i5_801BA864 = 0.9f; +f32 D_i5_801BA868 = 0.7f; // unused? +f32 D_i5_801BA86C = -1.0f; +f32 D_i5_801BA870 = 1.5f; // unused? +f32 D_i5_801BA874[4] = { 200.0f, 300.0f, 400.0f, 0.0f }; +f32 D_i5_801BA884 = 500.0f; +f32 D_i5_801BA888 = 100.0f; +f32 D_i5_801BA88C = 120.0f; +f32 D_i5_801BA890 = 100.0f; // unused? +f32 D_i5_801BA894[5] = { 200.0f, 250.0f, 220.0f, 0.0f, 200.0f }; +f32 D_i5_801BA8A8[3] = { 230.0f, 220.0f, 350.0f }; // unused? void Macbeth_LevelComplete2(Player* player) { s32 i; @@ -7434,13 +7430,10 @@ void Macbeth_801B28BC(ActorCutscene* this) { this->vel.z = sp50.z; } -static f32 D_i5_801BA8B4[5] = { -100.0f, 380.0f, -450.0f, 0.0f, -340.0f }; - -static f32 D_i5_801BA8C8[5] = { 500.0f, 400.0f, 850.0f, 650.0f, 950.0f }; - -static f32 D_i5_801BA8DC[5] = { 500.0f, 500.0f, 600.0f, 2500.0f, 590.0f }; - -static f32 D_i5_801BA8F0[4] = { 90.0f, -90.0f, 0.0f, 0.0f }; +f32 D_i5_801BA8B4[5] = { -100.0f, 380.0f, -450.0f, 0.0f, -340.0f }; +f32 D_i5_801BA8C8[5] = { 500.0f, 400.0f, 850.0f, 650.0f, 950.0f }; +f32 D_i5_801BA8DC[5] = { 500.0f, 500.0f, 600.0f, 2500.0f, 590.0f }; +f32 D_i5_801BA8F0[4] = { 90.0f, -90.0f, 0.0f, 0.0f }; void Macbeth_LevelComplete1_TeamSetup(Actor* this, s32 teamIndex) { Player* player = &gPlayer[0]; @@ -7478,7 +7471,7 @@ void Macbeth_LevelComplete1_TeamSetup(Actor* this, s32 teamIndex) { this->fwork[9] = 20.0f; } -static f32 D_i5_801BA900 = 90.0f; +f32 D_i5_801BA900 = 90.0f; void Macbeth_801B3718(void) { ActorCutscene* actor = &gActors[8]; diff --git a/src/overlays/ovl_i5/fox_ti.c b/src/overlays/ovl_i5/fox_ti.c index 9a72a1aa..36838191 100644 --- a/src/overlays/ovl_i5/fox_ti.c +++ b/src/overlays/ovl_i5/fox_ti.c @@ -49,7 +49,7 @@ UnkStruct_i5_801BD738 D_i5_801BD738[3][9]; PosRot D_i5_801BDA30[10]; f32 D_i5_801BDB20[3][151]; -static f32 D_i5_801B7360[25][4] = { +f32 D_i5_801B7360[25][4] = { { 165.0f, 120.0f, 0.0f, 90.0f }, { 127.5f, 7.5f, 0.0f, 90.0f }, { 7.5f, -112.5f, 0.0f, 90.0f }, { 255.0f, 285.0f, -60.0f, 60.0f }, { 255.0f, 285.0f, 60.0f, 60.0f }, { 247.5f, 120.0f, -90.0f, 75.0f }, { 247.5f, 120.0f, 90.0f, 75.0f }, { 217.5f, -75.0f, -135.0f, 90.0f }, { 217.5f, -75.0f, 135.0f, 90.0f }, @@ -61,14 +61,14 @@ static f32 D_i5_801B7360[25][4] = { { 117.0f, -3.0f, 18.0f, 45.0f } }; -static u8 D_i5_801B74F0[9][3] = { +u8 D_i5_801B74F0[9][3] = { { 13, 0, 11 }, { 1, 11, 2 }, { 2, 13, 1 }, { 3, 14, 2 }, { 4, 16, 1 }, { 5, 17, 3 }, { 6, 20, 1 }, { 7, 21, 3 }, { 8, 24, 1 }, }; -static bool D_i5_801B750C[3] = { false, false, false }; +bool D_i5_801B750C[3] = { false, false, false }; -static f32 D_i5_801B7518[2] = { 20.0f, 60.0f }; +f32 D_i5_801B7518[2] = { 20.0f, 60.0f }; void Titania_80188F30(void) { s32 i; @@ -126,7 +126,7 @@ void Titania_TiTerrain_Update(TiTerrain* this) { Ground_801B49D0(this); } -static Vec3f D_i5_801B7520 = { -150.0f, 0.0f, 0.0f }; +Vec3f D_i5_801B7520 = { -150.0f, 0.0f, 0.0f }; void Titania_TiDesertRover_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* data) { TiDesertRover* this = (TiDesertRover*) data; @@ -214,8 +214,8 @@ void Titania_80189380(TiDesertRover* this) { func_effect_8007EE68(OBJ_EFFECT_ENEMY_LASER_1, &sp80, &sp74, &sp68, &sp5C, 1.0f); } -static Vec3f D_i5_801B752C = { -50.0f, 0.0f, -20.0f }; -static Vec3f D_i5_801B7538 = { 50.0f, 0.0f, -20.0f }; +Vec3f D_i5_801B752C = { -50.0f, 0.0f, -20.0f }; +Vec3f D_i5_801B7538 = { 50.0f, 0.0f, -20.0f }; void Titania_TiDesertRover_Update(TiDesertRover* this) { Vec3f sp54; @@ -328,7 +328,7 @@ void Titania_TiDesertRover_Draw(TiDesertRover* this) { &gIdentityMatrix); } -static Vec3f D_i5_801B7544 = { 0.0f, -50.0f, 178.0f }; +Vec3f D_i5_801B7544 = { 0.0f, -50.0f, 178.0f }; void Titania_TiFekuda_Init(TiFekuda* this) { f32 sp2C; @@ -440,7 +440,7 @@ void Titania_TiFekuda_Draw(TiFekuda* this) { } } -static f32 sTiBoulderHitbox[7] = { 1.0f, 0.0f, 25.0f, 0.0f, 12.0f, 0.0f, 12.0f }; +f32 sTiBoulderHitbox[7] = { 1.0f, 0.0f, 25.0f, 0.0f, 12.0f, 0.0f, 12.0f }; Gfx* D_TI_801B7584[10] = { D_TI1_700DDF0, D_TI1_700D9B0, D_TI1_700DF70, D_TI1_700DC50, D_TI1_700DED0, @@ -656,8 +656,8 @@ void Titania_TiLandmine_Update(TiLandmine* this) { this->dmgType = DMG_NONE; } -static Vec3f D_i5_801B75AC = { -70.0f, 50.0f, 212.0f }; -static Vec3f D_i5_801B75B8 = { 70.0f, 50.0f, 212.0f }; +Vec3f D_i5_801B75AC = { -70.0f, 50.0f, 212.0f }; +Vec3f D_i5_801B75B8 = { 70.0f, 50.0f, 212.0f }; void Titania_TiRasco_Init(TiRasco* this) { Vec3f sp68[2]; @@ -736,7 +736,7 @@ bool Titania_TiRasco_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Ve } } -static Vec3f D_i5_801B75C4 = { 110.0f, 0.0f, 0.0f }; +Vec3f D_i5_801B75C4 = { 110.0f, 0.0f, 0.0f }; void Titania_TiRasco_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { TiRasco* this = (TiRasco*) thisx; @@ -751,7 +751,7 @@ void Titania_TiRasco_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { } } -static s16 D_i5_801B75D0[] = { +s16 D_i5_801B75D0[] = { 1, 2, 3, 4, 5, 6, 7, 10, 12, 13, }; @@ -1039,7 +1039,7 @@ void Titania_TiBomb_Update(TiBomb* this) { } } -static s32 D_i5_801B75E4[3][3] = { +s32 D_i5_801B75E4[3][3] = { { 15, 255, 255 }, { 0, 255, 0 }, { 0, 0, 0 }, @@ -1101,7 +1101,7 @@ bool Titania_8018C118(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return false; } -static s16 D_i5_801B7630[9][2] = { +s16 D_i5_801B7630[9][2] = { { 1, 0 }, { 2, 1 }, { 3, 0 }, { 4, 1 }, { 5, 1 }, { 6, 0 }, { 7, 1 }, { 8, 0 }, { 13, 1 }, }; @@ -1150,8 +1150,8 @@ void Titania_TiDesertCrawler_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx } } -static Vec3f D_i5_801B7654 = { 387.0f, 0.0f, 0.0f }; -static Vec3f D_i5_801B7660 = { 199.5f, 0.0f, 0.0f }; +Vec3f D_i5_801B7654 = { 387.0f, 0.0f, 0.0f }; +Vec3f D_i5_801B7660 = { 199.5f, 0.0f, 0.0f }; void Titania_8018C3D8(s32 limbIndex, Vec3f* rot, void* thisx) { s32 i; @@ -1268,7 +1268,7 @@ void Titania_8018C72C(TiDesertCrawler* this) { this->iwork[8] = 0; } -static Vec3f D_i5_801B766C = { 0.0f, 0.0f, 15.0f }; +Vec3f D_i5_801B766C = { 0.0f, 0.0f, 15.0f }; void Titania_TiDesertCrawler_Update(TiDesertCrawler* this) { s32 i; @@ -1712,8 +1712,8 @@ void Titania_8018E3B0(TiDesertCrawler* this) { D_i5_801B750C[this->iwork[0]] = false; } -static Vec3f D_i5_801B7678 = { 0.0f, 388.0f, 103.0f }; -static Vec3f D_i5_801B7684 = { 0.0f, 0.0f, 0.0f }; // unused +Vec3f D_i5_801B7678 = { 0.0f, 388.0f, 103.0f }; +Vec3f D_i5_801B7684 = { 0.0f, 0.0f, 0.0f }; // unused void Titania_TiDelphor_Init(TiDelphor* this) { Actor* delphorHead; @@ -2051,7 +2051,7 @@ void Titania_TiPillar_Init(TiPillar* this) { this->vel.z = this->obj.pos.x; } -static Vec3f D_i5_801B7690 = { 0.0f, 460.0f, 0.0f }; +Vec3f D_i5_801B7690 = { 0.0f, 460.0f, 0.0f }; Gfx* D_TI_801B769C[39] = { D_TI2_7009700, D_TI2_7004E80, D_TI2_70049C0, D_TI2_70045D0, D_TI_A001FA0, D_TI_900FE80, D_TI_80018D0, D_TI_9005450, @@ -2349,10 +2349,10 @@ bool Titania_8018FC70(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return true; } -static f32 D_i5_801B7738[14] = { -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, - 871.0f, 580.0f, 637.0f, 637.0f, 1000.0f, 380.0f, 1400.0f }; +f32 D_i5_801B7738[14] = { -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, + 871.0f, 580.0f, 637.0f, 637.0f, 1000.0f, 380.0f, 1400.0f }; -static u8 D_i5_801B7770[][6] = { +u8 D_i5_801B7770[][6] = { { 1, 0, 0, 0, 0, 4 }, { 2, 0, 0, 0, 0, 5 }, { 3, 0, 0, 0, 0, 3 }, { 4, 0, 0, 0, 0, 6 }, { 5, 0, 0, 0, 0, 7 }, { 7, 0, 2, 0, 2, 10 }, { 8, 0, 2, 0, 2, 10 }, { 9, 0, 2, 0, 2, 10 }, { 10, 0, 3, 0, 3, 9 }, { 11, 0, 3, 17, 3, 37 }, { 12, 1, 3, 27, 3, 2 }, { 13, 1, 3, 27, 3, 2 }, @@ -2372,14 +2372,14 @@ static u8 D_i5_801B7770[][6] = { { 88, 0, 0, 19, 0, 35 }, { 89, 0, 0, 20, 0, 36 }, { 90, 0, 0, 5, 0, 38 }, }; -static u8 D_i5_801B7904[92] = { +u8 D_i5_801B7904[92] = { 29, 30, 31, 32, 33, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 28, 8, 8, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 12, 12, 13, 14, 15, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 18, 19, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 22, 22, 23, 24, 25, 26, 27, }; -static s16 D_i5_801B7960[][4] = { +s16 D_i5_801B7960[][4] = { { 3, 7, 12, 90 }, { 1, 9, 12, 90 }, { 1, 9, 12, 90 }, { 1, 7, 12, 90 }, { 1, 7, 12, 90 }, { 1, 7, 12, 90 }, { 2, 14, 30, 90 }, { 2, 14, 12, 90 }, { 2, 14, 12, 90 }, { 2, 7, 6, 90 }, { 2, 7, 6, 90 }, { 1, 7, 6, 90 }, { 1, 7, 6, 90 }, { 0, 7, 6, 90 }, { 1, 7, 6, 90 }, { 1, 7, 6, 90 }, { 2, 14, 12, 90 }, { 2, 14, 12, 90 }, @@ -2388,7 +2388,7 @@ static s16 D_i5_801B7960[][4] = { { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, { 0, 0, 0, 0 }, }; -static f32 D_i5_801B7A70[86][4] = { +f32 D_i5_801B7A70[86][4] = { { 99.0f, 9.0f, 0.0f, 0.0f }, { 99.0f, 9.0f, 0.0f, 0.0f }, { 45.0f, 26.0f, 0.0f, 0.0f }, { 45.0f, 26.0f, 0.0f, 0.0f }, { 21.0f, 42.0f, 0.0f, 0.0f }, { 50.0f, -3.0f, 0.0f, 24.0f }, { 103.0f, 2.0f, 0.0f, 24.0f }, { 143.0f, -1.0f, 0.0f, 12.0f }, { 173.0f, 0.0f, 0.0f, 15.0f }, @@ -2420,7 +2420,7 @@ static f32 D_i5_801B7A70[86][4] = { { 78.0f, 40.0f, -25.0f, 0.0f }, { 21.0f, 42.0f, 0.0f, 40.0f }, }; -static s16 D_i5_801B7FD0[45][4] = { +s16 D_i5_801B7FD0[45][4] = { { 61, 1, 1, 44 }, { 55, 2, 1, 39 }, { 10, 3, 1, 8 }, { 16, 4, 1, 14 }, { 51, 0, 1, 38 }, { 28, 5, 4, 26 }, { 29, 9, 1, 27 }, { 30, 10, 1, 28 }, { 31, 11, 1, 29 }, { 32, 12, 1, 30 }, { 34, 13, 3, 32 }, { 37, 16, 3, 35 }, { 39, 19, 2, 37 }, { 90, 21, 2, 66 }, { 36, 23, 2, 34 }, { 1, 25, 1, 0 }, { 2, 26, 1, 1 }, { 4, 27, 1, 3 }, @@ -2431,15 +2431,15 @@ static s16 D_i5_801B7FD0[45][4] = { { 26, 77, 6, 24 }, { 86, 83, 2, 62 }, { 51, 85, 1, 38 }, }; -static s16 D_i5_801B8138[9] = { 12, 15, 18, 45, 48, 51, 78, 84, 102 }; +s16 D_i5_801B8138[9] = { 12, 15, 18, 45, 48, 51, 78, 84, 102 }; -static s16 D_i5_801B814C[9] = { 21, 24, 27, 54, 57, 60, 81, 87, 105 }; +s16 D_i5_801B814C[9] = { 21, 24, 27, 54, 57, 60, 81, 87, 105 }; -static s32 D_i5_801B8160[14] = { +s32 D_i5_801B8160[14] = { 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 89, 90, }; -static UnkStruct_i5_801B8198 D_i5_801B8198[33] = { +UnkStruct_i5_801B8198 D_i5_801B8198[33] = { { 61, 0, NULL, 0 }, { 22, 30, NULL, 0 }, { 21, 30, NULL, 0 }, { 20, 30, NULL, 0 }, { 44, 25, NULL, 0 }, { 45, 20, NULL, 0 }, { 46, 15, NULL, 0 }, { 47, 10, NULL, 0 }, { 48, 5, NULL, 0 }, { 57, 0, NULL, 0 }, { 5, 30, NULL, 0 }, { 6, 30, NULL, 0 }, { 7, 30, NULL, 0 }, { 39, 25, NULL, 0 }, { 40, 20, NULL, 0 }, @@ -2480,43 +2480,43 @@ f32 aTiGorasHitbox[517] = { 0.0f, 0.0f, 0.0f, 0.0f }; -static f32 D_i5_801B8BBC[5][4] = { { 36.0f, -40.0f, 0.0f, 20.0f }, - { 99.0f, 9.0f, 0.0f, 0.0f }, - { 99.0f, 9.0f, 0.0f, 35.0f }, - { 23.0f, 6.0f, 0.0f, 30.0f }, - { 180.0f, 28.0f, -11.0f, 32.0f } }; +f32 D_i5_801B8BBC[5][4] = { { 36.0f, -40.0f, 0.0f, 20.0f }, + { 99.0f, 9.0f, 0.0f, 0.0f }, + { 99.0f, 9.0f, 0.0f, 35.0f }, + { 23.0f, 6.0f, 0.0f, 30.0f }, + { 180.0f, 28.0f, -11.0f, 32.0f } }; -static u8 D_i5_801B8C0C[21] = { +u8 D_i5_801B8C0C[21] = { 0, 0, 0, 0, 0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, }; -static s32 D_i5_801B8C24[4][4] = { +s32 D_i5_801B8C24[4][4] = { { 1, 0, 1, 0 }, { 2, 0, 1, 1 }, { 3, 0, 1, 2 }, { 7, 1, 4, 3 }, }; -static f32 D_i5_801B8C64[7][4] = { +f32 D_i5_801B8C64[7][4] = { { 45.0f, 26.0f, 0.0f, 0.0f }, { 120.0f, 16.0f, 0.0f, 25.0f }, { 85.0f, 26.0f, 0.0f, 30.0f }, { 45.0f, 26.0f, 0.0f, 35.0f }, { -25.0f, 11.0f, 0.0f, 35.0f }, { 94.0f, 0.0f, 0.0f, 30.0f }, { 34.0f, 1.0f, 0.0f, 35.0f }, }; -static s32 D_i5_801B8CD4[2][4] = { +s32 D_i5_801B8CD4[2][4] = { { 1, 0, 5, 0 }, { 2, 4, 2, 5 }, }; -static s32 D_i5_801B8CF4[3] = { 0, 7, 14 }; +s32 D_i5_801B8CF4[3] = { 0, 7, 14 }; -static Vec3f D_i5_801B8D00 = { 104.0f, 23.0f, 0.0f }; -static Vec3f D_i5_801B8D0C = { 5.0f, 0.0f, 0.0f }; -static Vec3f D_i5_801B8D18 = { 0.0f, 0.0f, 30.0f }; -static Vec3f D_i5_801B8D24 = { 54.0f, 0.0f, 0.0f }; -static Vec3f D_i5_801B8D30 = { 47.0f, 0.0f, 0.0f }; -static Vec3f D_i5_801B8D3C = { 158.0f, 4.0f, 0.0f }; -static Vec3f D_i5_801B8D48 = { 0.0f, 0.0f, 60.0f }; +Vec3f D_i5_801B8D00 = { 104.0f, 23.0f, 0.0f }; +Vec3f D_i5_801B8D0C = { 5.0f, 0.0f, 0.0f }; +Vec3f D_i5_801B8D18 = { 0.0f, 0.0f, 30.0f }; +Vec3f D_i5_801B8D24 = { 54.0f, 0.0f, 0.0f }; +Vec3f D_i5_801B8D30 = { 47.0f, 0.0f, 0.0f }; +Vec3f D_i5_801B8D3C = { 158.0f, 4.0f, 0.0f }; +Vec3f D_i5_801B8D48 = { 0.0f, 0.0f, 60.0f }; void Titania_8019002C(s32 limbIndex, Vec3f* rot, void* thisx) { TiGoras* this = (TiGoras*) thisx; @@ -4980,7 +4980,7 @@ void Titania_80193DF0(TiGoras* this) { void Titania_80193DF0(Boss*); #endif -static s16 D_i5_801B8D54[4] = { 30, 35, 60, 70 }; +s16 D_i5_801B8D54[4] = { 30, 35, 60, 70 }; void Titania_TiGoras_Update(Boss* boss) { Vec3f sp3C; @@ -5187,14 +5187,14 @@ void Titania_TiGoras_Update(Boss* boss) { boss->swork[31]++; } -static f32 D_i5_801B8D5C[50] = { +f32 D_i5_801B8D5C[50] = { 0.0f, 0.03f, 0.06f, 0.12f, 0.18f, 0.25f, 0.425f, 0.6f, 0.775f, 0.95f, 1.125f, 1.3f, 1.475f, 1.65f, 1.825f, 2.0f, 1.8f, 1.6f, 1.4f, 1.2f, 1.0f, 0.8f, 0.6f, 0.4f, 0.2f, 0.0f, 0.8f, 1.6f, 2.4f, 3.2f, 4.0f, 3.4f, 3.2f, 3.0f, 2.8f, 2.4f, 2.2f, 2.0f, 1.8f, 1.6f, 1.4f, 1.2f, 1.0f, 0.8f, 0.6f, 0.4f, 0.2f, 0.0f, 0.0f, 0.0f, }; -static f32 D_i5_801B8E24[4][2] = { +f32 D_i5_801B8E24[4][2] = { { -1.0f, 1.0f }, { 1.0f, 1.0f }, { -1.0f, -1.0f }, @@ -5470,7 +5470,7 @@ void Titania_TiGoras_Draw(TiGoras* boss) { } } -static Vec3f D_i5_801B8E44 = { 3.0f, 0.0f, 0.0f }; +Vec3f D_i5_801B8E44 = { 3.0f, 0.0f, 0.0f }; void Titania_801990DC(TiGoras* this) { s32 i; diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index 09eecb5b..1e64785f 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -22,7 +22,7 @@ f32 D_Andross_801A7F68; f32 D_Andross_801A7F70; f32 D_Andross_801A7F78; -static f32* D_i6_801A6760[12] = { +f32* D_i6_801A6760[12] = { D_ANDROSS_C037FCC, D_ANDROSS_C0380C0, D_ANDROSS_C0381B4, D_ANDROSS_C0382A8, D_ANDROSS_C03839C, D_ANDROSS_C038490, D_ANDROSS_C038584, D_ANDROSS_C038678, D_ANDROSS_C03876C, D_ANDROSS_C038860, D_ANDROSS_C038954, D_ANDROSS_C038954, }; @@ -1652,7 +1652,7 @@ void Andross_Effect396_Update(Effect396* this) { } } -static Gfx* D_i6_801A6790[10] = { +Gfx* D_i6_801A6790[10] = { D_ANDROSS_C001880, D_ANDROSS_C001880, D_ANDROSS_C001880, D_ANDROSS_C001880, D_ANDROSS_C001880, D_ANDROSS_C001880, D_ANDROSS_C001880, D_ANDROSS_C001880, D_arwing_3016660, D_arwing_3015D80, }; @@ -1903,7 +1903,7 @@ void Andross_8018DA94(AndAndross* this, Vec3f* arg1) { AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, this->sfxSource, 4); } -static f32 D_i6_801A67B8[] = { 0.0f, 0.0f, 0.0f }; +f32 D_i6_801A67B8[] = { 0.0f, 0.0f, 0.0f }; void Andross_AndAndross_Update(AndAndross* this) { s32 i; @@ -3128,15 +3128,15 @@ void Andross_AndAndross_Update(AndAndross* this) { } } -static Vec3f D_i6_801A67C4 = { 40.0f, 0.0f, -10.0f }; -static f32 D_i6_801A67D0 = 180.0f; -static f32 D_i6_801A67D4 = 0.0f; -static f32 D_i6_801A67D8 = 0.0f; -static Vec3f D_i6_801A67DC = { 40.0f, 0.0f, 10.0f }; -static f32 D_i6_801A67E8 = 0.0f; -static f32 D_i6_801A67EC = 0.0f; -static f32 D_i6_801A67F0 = 0.0f; -static Vec3f D_i6_801A67F4 = { 0.0f, 0.0f, 0.0f }; +Vec3f D_i6_801A67C4 = { 40.0f, 0.0f, -10.0f }; +f32 D_i6_801A67D0 = 180.0f; +f32 D_i6_801A67D4 = 0.0f; +f32 D_i6_801A67D8 = 0.0f; +Vec3f D_i6_801A67DC = { 40.0f, 0.0f, 10.0f }; +f32 D_i6_801A67E8 = 0.0f; +f32 D_i6_801A67EC = 0.0f; +f32 D_i6_801A67F0 = 0.0f; +Vec3f D_i6_801A67F4 = { 0.0f, 0.0f, 0.0f }; bool Andross_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { Vec3f sp94; @@ -3801,7 +3801,7 @@ void Andross_801939A0(s32 actorIndex) { AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); } -static Vec3f D_i6_801A6878[4] = { +Vec3f D_i6_801A6878[4] = { { 1500.0f, 15000.0f, 0.0f }, { 0.0f, 15000.0f, -600.0f }, { -400.0f, 14950.0f, 0.0f }, diff --git a/src/overlays/ovl_i6/fox_sy.c b/src/overlays/ovl_i6/fox_sy.c index 1b94f002..c02074f0 100644 --- a/src/overlays/ovl_i6/fox_sy.c +++ b/src/overlays/ovl_i6/fox_sy.c @@ -1387,7 +1387,7 @@ void SectorY_8019C194(SyShogun* this, f32 zSpeed, f32 xSpeed) { } } -static BossFuncs D_i6_801A6910[] = { +BossFuncs D_i6_801A6910[] = { SectorY_80197F84, SectorY_80198238, SectorY_80198238, SectorY_801983E4, SectorY_80198CE4, SectorY_80199438, SectorY_80199DAC, SectorY_8019A520, SectorY_8019A66C, SectorY_8019A898, SectorY_8019AAF0, SectorY_8019AEEC, }; @@ -1895,8 +1895,8 @@ void SectorY_SyShogun_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { } } -static f32 D_i6_801A69AC[20] = { 0.3f, 0.7f, 1.3f, 0.7f, 0.3f, 0.0f, 10.0f, 20.0f, 300.0f, 100.0f, - 200.0f, 100.0f, 60.0f, -260.0f, 80.0f, 100.0f, 80.0f, 262.0f, 285.0f, 252.0f }; +f32 D_i6_801A69AC[20] = { 0.3f, 0.7f, 1.3f, 0.7f, 0.3f, 0.0f, 10.0f, 20.0f, 300.0f, 100.0f, + 200.0f, 100.0f, 60.0f, -260.0f, 80.0f, 100.0f, 80.0f, 262.0f, 285.0f, 252.0f }; void SectorY_SyShogun_Draw(SyShogun* this) { f32 sp9C; @@ -2014,7 +2014,7 @@ void SectorY_SyShogun_Draw(SyShogun* this) { } } -static Vec3f D_i6_801A69FC[10] = { +Vec3f D_i6_801A69FC[10] = { { 0.0f, -80.0f, 800.0f }, { -500.0f, -100.0f, 400.0f }, { 500.0f, -140.0f, 400.0f }, { 3250.0f, 600.0f, 3500.0f }, { -2000.0f, 400.0f, 5000.0f }, { 2500.0f, 400.0f, 5000.0f }, { -1000.0f, 400.0f, 6000.0f }, { 250.0f, 400.0f, 2500.0f }, { -2000.0f, 0.0f, 4000.0f }, @@ -2509,11 +2509,11 @@ void SectorY_8019FF00(ActorCutscene* this) { } } -static Vec3f D_i6_801A6A74[10] = { { -10100.0f, -300.0f, -600.0f }, { -10300.0f, 1200.0f, -1070.0f }, - { -10500.0f, 300.0f, 900.0f }, { 9000.0f, 0.0f, 1500.0f }, - { 5000.0f, -100.0f, -100.0f }, { 1150.0f, -1100.0f, -7500.0f }, - { -200.0f, -2400.0f, -12650.0f }, { 0.0f, 4000.0f, -600.0f }, - { -10800.0f, 900.0f, -600.0f }, { -2750.0f, 900.0f, -9150.0f } }; +Vec3f D_i6_801A6A74[10] = { { -10100.0f, -300.0f, -600.0f }, { -10300.0f, 1200.0f, -1070.0f }, + { -10500.0f, 300.0f, 900.0f }, { 9000.0f, 0.0f, 1500.0f }, + { 5000.0f, -100.0f, -100.0f }, { 1150.0f, -1100.0f, -7500.0f }, + { -200.0f, -2400.0f, -12650.0f }, { 0.0f, 4000.0f, -600.0f }, + { -10800.0f, 900.0f, -600.0f }, { -2750.0f, 900.0f, -9150.0f } }; void SectorY_801A0510(ActorCutscene* this, s32 arg1) { Actor_Initialize(this); @@ -2572,7 +2572,7 @@ void SectorY_801A0510(ActorCutscene* this, s32 arg1) { } } -static Vec3f D_i6_801A6AEC[5] = { +Vec3f D_i6_801A6AEC[5] = { { 100.0f, 50.0f, -200.0f }, { 100.0f, -100.0f, 200.0f }, { 200.0f, -100.0f, 0.0f }, { 0.0f, 345.0f, 350.0f }, { 90.0f, 87.0f, 93.0f }, }; @@ -3798,9 +3798,9 @@ void SectorY_SyRobot_Update(SyRobot* this) { } } -static s32 D_i6_801A6B28[3] = { 255, 150, 150 }; -static s32 D_i6_801A6B34[3] = { 150, 255, 150 }; -static s32 D_i6_801A6B40[6] = { 150, 150, 255 }; +s32 D_i6_801A6B28[3] = { 255, 150, 150 }; +s32 D_i6_801A6B34[3] = { 150, 255, 150 }; +s32 D_i6_801A6B40[6] = { 150, 150, 255 }; bool SectorY_SyRobot_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { SyRobot* actor = (SyRobot*) thisx; @@ -3852,7 +3852,7 @@ void SectorY_SyRobot_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { } } -static f32 D_i6_801A6B64[5] = { +f32 D_i6_801A6B64[5] = { 0.3f, 0.7f, 1.3f, 0.7f, 0.3f, }; diff --git a/src/overlays/ovl_i6/fox_ve2.c b/src/overlays/ovl_i6/fox_ve2.c index 9c843d04..716bd8d7 100644 --- a/src/overlays/ovl_i6/fox_ve2.c +++ b/src/overlays/ovl_i6/fox_ve2.c @@ -30,12 +30,12 @@ void Venom2_UpdateStarWolfEvents(ActorAllRange* this) { ActorAllRange_UpdateStarWolfEvents(this); } -static Vec3f sTeamInitPos[6] = { +Vec3f sTeamInitPos[6] = { { 0.0f, 4030.0f, 18000.0f }, { -500.0f, 3820.0f, 17200.0f }, { 550.0f, 3750.0f, 17000.0f }, { 1000.0f, 300.0f, 0.0f }, { -1000.0f, 300.0f, 0.0f }, { 0.0f, 500.0f, 0.0f }, }; -static f32 sTeamInitRot[3] = { 300.0f, 70.0f, 280.0f }; +f32 sTeamInitRot[3] = { 300.0f, 70.0f, 280.0f }; void Venom2_UpdateEvents(ActorAllRange* this) { ActorAllRange* team; diff --git a/src/overlays/ovl_menu/fox_option.c b/src/overlays/ovl_menu/fox_option.c index 8487f7ec..ad657918 100644 --- a/src/overlays/ovl_menu/fox_option.c +++ b/src/overlays/ovl_menu/fox_option.c @@ -156,20 +156,20 @@ struct BssPad1 { // struct BssPad4 {int x;}; extern s32 BSS_PAD_2; -static f32 sOptionCardPosY[] = { 60.0f, 36.0f, 12.0f, -12.0f, -36.0f, -60.0f }; -static f32 sOptionCardTextPosX[] = { 124.0f, 118.0f, 145.0f, 125.0f, 133.0f, 118.0f }; -static f32 sOptionCardTextPosY[] = { 54.0f, 78.0f, 103.0f, 126.0f, 151.0f, 175.0f }; -static f32 sOptionCardCurTextPosX[] = { 124.0f, 118.0f, 145.0f, 125.0f, 133.0f, 118.0f }; -static f32 sOptionCardCurTextPosY[] = { 54.0f, 78.0f, 103.0f, 126.0f, 151.0f, 175.0f }; -static f32 D_menu_801AE5E8[] = { 124.0f, 125.0f }; -static f32 D_menu_801AE5F0[] = { 54.0f, 55.0f }; -static f32 D_menu_801AE5F8[] = { 133.0f, 125.0f }; -static f32 D_menu_801AE600[] = { 151.0f, 151.0f }; -static f32 D_menu_801AE608[] = { 8.0f, 8.0f, 8.0f, 8.0f, 8.0f, 8.0f }; -static f32 D_menu_801AE620[] = { 1.9f, 2.4f, 0.9f, 1.9f, 1.8f, 2.4f }; +f32 sOptionCardPosY[] = { 60.0f, 36.0f, 12.0f, -12.0f, -36.0f, -60.0f }; +f32 sOptionCardTextPosX[] = { 124.0f, 118.0f, 145.0f, 125.0f, 133.0f, 118.0f }; +f32 sOptionCardTextPosY[] = { 54.0f, 78.0f, 103.0f, 126.0f, 151.0f, 175.0f }; +f32 sOptionCardCurTextPosX[] = { 124.0f, 118.0f, 145.0f, 125.0f, 133.0f, 118.0f }; +f32 sOptionCardCurTextPosY[] = { 54.0f, 78.0f, 103.0f, 126.0f, 151.0f, 175.0f }; +f32 D_menu_801AE5E8[] = { 124.0f, 125.0f }; +f32 D_menu_801AE5F0[] = { 54.0f, 55.0f }; +f32 D_menu_801AE5F8[] = { 133.0f, 125.0f }; +f32 D_menu_801AE600[] = { 151.0f, 151.0f }; +f32 D_menu_801AE608[] = { 8.0f, 8.0f, 8.0f, 8.0f, 8.0f, 8.0f }; +f32 D_menu_801AE620[] = { 1.9f, 2.4f, 0.9f, 1.9f, 1.8f, 2.4f }; // D_menu_801AE638 -static OptionEntry sOptionCardList[] = { +OptionEntry sOptionCardList[] = { { { 0, 0, D_OPT_8003B50, 0, 72, 12, 126.0f, 46.0f, 1.0f, 1.0f, 20, 0, 75, 255 }, { 0.0f, 30.0f, -130.0f, 0.2f, 0.11f }, @@ -215,7 +215,7 @@ static OptionEntry sOptionCardList[] = { }; // D_menu_801AE878 -static OptionEntry sOptionVSCardList[] = { +OptionEntry sOptionVSCardList[] = { { { 0, 0, D_OPT_8005010, 0, 96, 13, 110.0f, 91.0f, 1.0f, 1.0f, 20, 0, 75, 255 }, { 0.0f, 11.0f, -130.0f, 0.2f, 0.11f }, @@ -238,80 +238,80 @@ static OptionEntry sOptionVSCardList[] = { 1, }, }; -static u8 D_menu_801AE998[] = { SOUNDMODE_STEREO, SOUNDMODE_MONO, SOUNDMODE_HEADSET }; +u8 D_menu_801AE998[] = { SOUNDMODE_STEREO, SOUNDMODE_MONO, SOUNDMODE_HEADSET }; -static u8 D_menu_801AE99C[] = { 0, 1, 2 }; +u8 D_menu_801AE99C[] = { 0, 1, 2 }; -static f32 D_menu_801AE9A0[4] = { 62.0f, 222.0f, 75.0f, 235.0f }; +f32 D_menu_801AE9A0[4] = { 62.0f, 222.0f, 75.0f, 235.0f }; -static f32 D_menu_801AE9B0[4] = { 43.0f, 43.0f, 46.0f, 46.0f }; +f32 D_menu_801AE9B0[4] = { 43.0f, 43.0f, 46.0f, 46.0f }; -static OptionTexture D_menu_801AE9C0[4] = { +OptionTexture D_menu_801AE9C0[4] = { { 2, 0, D_OPT_80143B0, D_OPT_80147B0, 32, 32, 56.0f, 175.0f, 1.0f, 1.0f, 255, 255, 255, 255 }, { 2, 0, D_OPT_80143B0, D_OPT_80147B0, 32, 32, 216.0f, 175.0f, 1.0f, 1.0f, 255, 255, 255, 255 }, { 1, 0, D_OPT_80039D0, D_OPT_8003A50, 16, 16, 69.0f, 178.0f, 1.0f, 1.0f, 255, 255, 255, 255 }, { 1, 0, D_OPT_80039D0, D_OPT_8003A50, 16, 16, 229.0f, 178.0f, 1.0f, 1.0f, 255, 255, 255, 255 }, }; -static OptionTexture D_menu_801AEAA0[3] = { +OptionTexture D_menu_801AEAA0[3] = { { 3, 0, D_OPT_8013990, 0, 104, 10, 151.0f, 135.0f, 1.05f, 1.0f, 255, 255, 255, 255 }, { 3, 0, D_OPT_8013990, 0, 104, 10, 151.0f, 161.0f, 1.05f, 1.0f, 255, 255, 255, 255 }, { 3, 0, D_OPT_8013990, 0, 104, 10, 151.0f, 188.0f, 1.05f, 1.0f, 255, 255, 255, 255 }, }; -static OptionTexture D_menu_801AEB48[3] = { +OptionTexture D_menu_801AEB48[3] = { { 3, 0, D_OPT_80141B0, 0, 16, 16, 245.0f, 132.0f, 1.0f, 1.0f, 255, 255, 255, 255 }, { 3, 0, D_OPT_80141B0, 0, 16, 16, 245.0f, 158.0f, 1.0f, 1.0f, 255, 255, 255, 255 }, { 3, 0, D_OPT_80141B0, 0, 16, 16, 245.0f, 185.0f, 1.0f, 1.0f, 255, 255, 255, 255 }, }; -static Vtx D_menu_801AEBF0[] = { +Vtx D_menu_801AEBF0[] = { { 1, 1, 0, 0, 0, 0, 255, 255, 255, 255 }, { -1, 1, 0, 0, 0, 0, 255, 255, 255, 255 }, { -1, 0, 0, 0, 0, 0, 255, 255, 255, 255 }, { 1, 0, 0, 0, 0, 0, 255, 255, 255, 255 }, }; -static Gfx D_menu_801AEC30[] = { +Gfx D_menu_801AEC30[] = { gsSPVertex(D_menu_801AEBF0, 4, 0), gsSP1Quadrangle(1, 2, 3, 0, 0), gsSPEndDisplayList(), }; -static Vtx D_menu_801AEC48[] = { +Vtx D_menu_801AEC48[] = { { 1, 0, 0, 0, 0, 0, 255, 255, 255, 255 }, { -1, 0, 0, 0, 0, 0, 255, 255, 255, 255 }, { -1, -1, 0, 0, 0, 0, 255, 255, 255, 255 }, { 1, -1, 0, 0, 0, 0, 255, 255, 255, 255 }, }; -static Gfx D_menu_801AEC88[] = { +Gfx D_menu_801AEC88[] = { gsSPVertex(D_menu_801AEC48, 4, 0), gsSP1Quadrangle(1, 2, 3, 0, 0), gsSPEndDisplayList(), }; -static Vtx D_menu_801AECA0[] = { +Vtx D_menu_801AECA0[] = { { 1, 1, 0, 0, 0, 0, 255, 255, 255, 255 }, { -1, 1, 0, 0, 0, 0, 255, 255, 255, 255 }, { -1, -1, 0, 0, 0, 0, 255, 255, 255, 255 }, { 1, -1, 0, 0, 0, 0, 255, 255, 255, 255 }, }; -static Gfx D_menu_801AECE0[] = { +Gfx D_menu_801AECE0[] = { gsSPVertex(D_menu_801AECA0, 4, 0), gsSP1Quadrangle(1, 2, 3, 0, 0), gsSPEndDisplayList(), }; -static u8* D_menu_801AECF8[10] = { +u8* D_menu_801AECF8[10] = { aLargeText_0, aLargeText_1, aLargeText_2, aLargeText_3, aLargeText_4, aLargeText_5, aLargeText_6, aLargeText_7, aLargeText_8, aLargeText_9, }; -static f32 D_menu_801AED20[2] = { 255.0f, 255.0f }; +f32 D_menu_801AED20[2] = { 255.0f, 255.0f }; // TF is this? seems unused -static s32 D_menu_801AED28[] = { +s32 D_menu_801AED28[] = { /* EE73E8 801AED28 00000038 */ 56, /* EE73EC 801AED2C 00000043 */ 67, /* EE73F0 801AED30 0000004E */ 78, @@ -319,47 +319,47 @@ static s32 D_menu_801AED28[] = { /* EE73F8 801AED38 0000005B */ 91, }; -static s32 D_menu_801AED3C[4] = { 0, 0, 0, 0 }; +s32 D_menu_801AED3C[4] = { 0, 0, 0, 0 }; -static UnkStruct_D_menu_801AED4C D_menu_801AED4C[24] = { +UnkStruct_D_menu_801AED4C D_menu_801AED4C[24] = { { 9, 0, 0 }, { 0, 12, 0 }, { 12, 4, 0 }, { 4, 10, 0 }, { 10, 2, 0 }, { 6, 4, 0 }, { 7, 2, 0 }, { 3, 2, 0 }, { 2, 14, 0 }, { 5, 6, 1 }, { 6, 13, 1 }, { 13, 7, 1 }, { 4, 7, 1 }, { 12, 13, 1 }, { 8, 7, 1 }, { 9, 5, 2 }, { 5, 11, 2 }, { 11, 8, 2 }, { 8, 3, 2 }, { 3, 1, 2 }, { 7, 1, 2 }, { 1, 14, 2 }, { 0, 6, 3 }, { 4, 3, 4 }, }; -static Gfx* D_menu_801AEE6C[16] = { +Gfx* D_menu_801AEE6C[16] = { D_MAP_6060610, D_MAP_601DE80, D_MAP_604B750, D_MAP_601F6B0, D_MAP_601C0D0, D_MAP_601C960, D_menu_801B5E78, D_menu_801B61E0, D_menu_801B6548, D_menu_801B4D70, D_menu_801B5B10, D_menu_801B5440, D_menu_801B50D8, D_MAP_604DB10, D_menu_801B57A8, D_menu_801B57A8, }; -static char* D_menu_801AEEAC[] = { +char* D_menu_801AEEAC[] = { "ME", "A6", "BO", "SZ", "SX", "SY", "KA", "MA", "ZO", "CO", "TI", "AQ", "FO", "SO", "VE", "VE", }; -static s32 PAD_menu_801AEEEC = 0; +s32 PAD_menu_801AEEEC = 0; -static Vtx D_menu_801AEEF0[] = { +Vtx D_menu_801AEEF0[] = { { -11, -11, 0, 0, 0, 255, 0, 0, 0, 0 }, { 11, -11, 0, 0, 255, 255, 0, 0, 0, 0 }, { 11, 11, 0, 0, 255, 0, 0, 0, 0, 0 }, { -11, 11, 0, 0, 0, 0, 0, 0, 0, 0 }, }; -static Gfx D_menu_801AEF30[] = { +Gfx D_menu_801AEF30[] = { gsSPVertex(D_menu_801AEEF0, 4, 0), gsSP1Triangle(0, 1, 2, 0), gsSP1Triangle(0, 2, 3, 0), gsSPEndDisplayList(), }; -static s32 PAD_menu_801AEF50[] = { 0, 0, 0 }; +s32 PAD_menu_801AEF50[] = { 0, 0, 0 }; -static char D_menu_801AEF5C[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789."; +char D_menu_801AEF5C[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789."; -static f32 D_menu_801AEF84[] = { 24.0f, 0.0f, -24.0f }; -static f32 D_menu_801AEF90[] = { 111.0f, 112.0f, 121.0f }; -static f32 D_menu_801AEF9C[] = { 89.0f, 115.0f, 139.0f }; +f32 D_menu_801AEF84[] = { 24.0f, 0.0f, -24.0f }; +f32 D_menu_801AEF90[] = { 111.0f, 112.0f, 121.0f }; +f32 D_menu_801AEF9C[] = { 89.0f, 115.0f, 139.0f }; void Option_Setup(void) { bool enableExpertModes; @@ -2025,10 +2025,10 @@ void Option_DataDraw(void) { Option_8019B7D4(); } -static char* D_menu_801AF0C4[3] = { "P", "S", "F" }; -static s32 D_menu_801AF0D0[3] = { 255, 0, 30 }; -static s32 D_menu_801AF0DC[3] = { 30, 179, 30 }; -static s32 D_menu_801AF0E8[3] = { 0, 67, 255 }; +char* D_menu_801AF0C4[3] = { "P", "S", "F" }; +s32 D_menu_801AF0D0[3] = { 255, 0, 30 }; +s32 D_menu_801AF0DC[3] = { 30, 179, 30 }; +s32 D_menu_801AF0E8[3] = { 0, 67, 255 }; void Option_RankingInit(void) { Title_80188010(); @@ -2216,8 +2216,8 @@ void Option_8019752C(void) { TextureRect_IA8_MirY(&gMasterDisp, D_OPT_800D070, 16, 16, 150.0f, 200.0f, 1.0f, 1.0f); } -static Vec3f D_menu_801AF100[2] = { { 0.0f, 167.0f, 0.0f }, { 0.0f, -167.0f, 0.0f } }; -static Vec3f D_menu_801AF118[2] = { { 25.0f, 3.6f, 0.0f }, { 25.0f, 3.6f, 0.0f } }; +Vec3f D_menu_801AF100[2] = { { 0.0f, 167.0f, 0.0f }, { 0.0f, -167.0f, 0.0f } }; +Vec3f D_menu_801AF118[2] = { { 25.0f, 3.6f, 0.0f }, { 25.0f, 3.6f, 0.0f } }; void Option_80197914(void) { Vec3f* vec1; @@ -2585,9 +2585,9 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) { Lib_InitPerspective(&gMasterDisp); } -static f32 D_menu_801AF13C = 0.7f; -static f32 D_menu_801AF140 = 11.0f; -static f32 D_menu_801AF144 = 2.7f; +f32 D_menu_801AF13C = 0.7f; +f32 D_menu_801AF140 = 11.0f; +f32 D_menu_801AF144 = 2.7f; void Option_80199198(f32 arg0, f32 arg1, f32 arg2) { RCP_SetupDL(&gMasterDisp, SETUPDL_53); @@ -2723,26 +2723,26 @@ void Option_VersusMenuDraw(void) { } } -static f32 D_menu_801AF148[4] = { 30.0f, 214.0f, 30.0f, 215.0f }; -static f32 D_menu_801AF158[4] = { 18.0f, 18.0f, 151.0f, 151.0f }; -static s32 D_menu_801AF168[4] = { 56, 48, 56, 48 }; -static s32 D_menu_801AF178[4] = { 8, 10, 10, 8 }; -static f32 D_menu_801AF188[4] = { 12.0f, 16.0f, 12.0f, 18.0f }; -static f32 D_menu_801AF198 = -1.0f; -static f32 D_menu_801AF19C[4] = { 46.0f, 41.0f, 41.0f, 41.0f }; -static f32 D_menu_801AF1AC = 24.0f; -static f32 D_menu_801AF1B0 = 1.4f; -static f32 D_menu_801AF1B4 = 5.0f; -static f32 D_menu_801AF1B8 = 11.0f; -static f32 D_menu_801AF1BC = 8.0f; -static f32 D_menu_801AF1C0 = 45.0f; -static f32 D_menu_801AF1C4 = 20.0f; -static f32 D_menu_801AF1C8 = 55.0f; -static f32 D_menu_801AF1CC = 37.0f; -static f32 D_menu_801AF1D0 = 11.0f; -static f32 D_menu_801AF1D4 = 7.0f; -static f32 D_menu_801AF1D8 = 59.0f; -static f32 D_menu_801AF1DC = 58.0f; +f32 D_menu_801AF148[4] = { 30.0f, 214.0f, 30.0f, 215.0f }; +f32 D_menu_801AF158[4] = { 18.0f, 18.0f, 151.0f, 151.0f }; +s32 D_menu_801AF168[4] = { 56, 48, 56, 48 }; +s32 D_menu_801AF178[4] = { 8, 10, 10, 8 }; +f32 D_menu_801AF188[4] = { 12.0f, 16.0f, 12.0f, 18.0f }; +f32 D_menu_801AF198 = -1.0f; +f32 D_menu_801AF19C[4] = { 46.0f, 41.0f, 41.0f, 41.0f }; +f32 D_menu_801AF1AC = 24.0f; +f32 D_menu_801AF1B0 = 1.4f; +f32 D_menu_801AF1B4 = 5.0f; +f32 D_menu_801AF1B8 = 11.0f; +f32 D_menu_801AF1BC = 8.0f; +f32 D_menu_801AF1C0 = 45.0f; +f32 D_menu_801AF1C4 = 20.0f; +f32 D_menu_801AF1C8 = 55.0f; +f32 D_menu_801AF1CC = 37.0f; +f32 D_menu_801AF1D0 = 11.0f; +f32 D_menu_801AF1D4 = 7.0f; +f32 D_menu_801AF1D8 = 59.0f; +f32 D_menu_801AF1DC = 58.0f; void Option_80199820(s32 arg0) { s32 var_v0; diff --git a/src/overlays/ovl_menu/fox_title.c b/src/overlays/ovl_menu/fox_title.c index 6dc2e693..f2fa53c8 100644 --- a/src/overlays/ovl_menu/fox_title.c +++ b/src/overlays/ovl_menu/fox_title.c @@ -1284,7 +1284,7 @@ void Title_8018A338(void) { D_menu_801B86AC); } -static CameraPoint D_menu_801ADA94[50] = { +CameraPoint D_menu_801ADA94[50] = { { 70.68093f, 95.06561f, -146.52567f, 9.829767f, 121.2336f, -642.1186f }, { 205.506f, 142.9332f, -268.0091f, 168.6235f, 176.76671f, -765.49774f }, { 247.74275f, 218.72449f, -519.0222f, 186.81432f, 211.56888f, -1015.24445f }, @@ -1991,7 +1991,7 @@ void Title_8018C1C0(void) { D_menu_801B86AC); } -static CameraPoint D_menu_801ADF84[50] = { +CameraPoint D_menu_801ADF84[50] = { { -223.5775f, -61.156242f, -26.375984f, -53.867554f, -42.139626f, 44.77107f }, { -160.05501f, -67.74775f, 85.750084f, -61.486446f, -44.164986f, 29.322315f }, { -22.228004f, -79.54139f, 121.01903f, -15.555059f, -64.843475f, 85.51631f }, @@ -2944,24 +2944,24 @@ void Title_8018FD08(void) { } } -static Gfx* D_menu_801AE48C[12] = { +Gfx* D_menu_801AE48C[12] = { D_TITLE_6036290, D_TITLE_6036290, D_TITLE_6036290, D_TITLE_6036290, D_TITLE_6036B30, D_TITLE_6036290, D_TITLE_6036290, D_TITLE_6036290, D_TITLE_6036290, D_TITLE_6036290, D_TITLE_6036B30, D_TITLE_6036290, }; -static f32 D_menu_801AE4BC[12] = { +f32 D_menu_801AE4BC[12] = { 0.0f, 0.0f, 0.0f, 0.0f, 10.0f, 13.0f, 20.0f, 35.0f, 40.0f, 50.0f, 50.0f, 70.0f, }; -static f32 D_menu_801AE4EC[] = { +f32 D_menu_801AE4EC[] = { 20.0f, 22.0f, 24.0f, 28.0f, 30.0f, 14.0f, 16.0f, 18.0f, 27.0f, 28.0f, 70.0f, 40.0f, }; -static u8 D_menu_801AE51C[] = { +u8 D_menu_801AE51C[] = { 0xC0, 0x80, 0x60, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, }; -static s32 D_menu_801AE528[] = { +s32 D_menu_801AE528[] = { 80, 64, 48, 32, 12, 32, 44, 32, 42, 36, 12, 38, }; From 53363d66192a83996b9c2c874ff7f18e69068311 Mon Sep 17 00:00:00 2001 From: Alejandro Asenjo Nitti <96613413+sonicdcer@users.noreply.github.com> Date: Fri, 13 Sep 2024 00:59:33 -0300 Subject: [PATCH 149/151] Hud, Title, Map & Option Docs (#272) * hud title and option docs * hud docs * aspMain vram comment * more hud docs * HUD docs * Hud_ -> HUD_ consistency * ActorMissileSeekModes * fox_option docs * more option docs * more option docs * more option docs * fox_title docs * more fox_title docs * fox_map docs * fix map TLUTs * more fox_map docs * jp1 explore * explore us rev0 * SETUPDL comments * format * fox_map docs * more fox_map docs --- .vscode/settings.json | 3 +- assets/yaml/jp/rev0/ast_allies.yaml | 8 +- assets/yaml/jp/rev0/ast_andross.yaml | 4 +- assets/yaml/jp/rev0/ast_aquas.yaml | 4 +- assets/yaml/jp/rev0/ast_area_6.yaml | 4 +- assets/yaml/jp/rev0/ast_arwing.yaml | 60 +- assets/yaml/jp/rev0/ast_blue_marine.yaml | 8 +- assets/yaml/jp/rev0/ast_bolse.yaml | 4 +- assets/yaml/jp/rev0/ast_common.yaml | 204 +- assets/yaml/jp/rev0/ast_corneria.yaml | 4 +- assets/yaml/jp/rev0/ast_font_3d.yaml | 148 +- assets/yaml/jp/rev0/ast_fortuna.yaml | 4 +- assets/yaml/jp/rev0/ast_katina.yaml | 4 +- assets/yaml/jp/rev0/ast_landmaster.yaml | 8 +- assets/yaml/jp/rev0/ast_macbeth.yaml | 4 +- assets/yaml/jp/rev0/ast_map.yaml | 273 +- assets/yaml/jp/rev0/ast_meteo.yaml | 4 +- assets/yaml/jp/rev0/ast_option.yaml | 116 +- assets/yaml/jp/rev0/ast_sector_x.yaml | 4 +- assets/yaml/jp/rev0/ast_sector_y.yaml | 4 +- assets/yaml/jp/rev0/ast_sector_z.yaml | 8 +- assets/yaml/jp/rev0/ast_solar.yaml | 4 +- assets/yaml/jp/rev0/ast_text.yaml | 4 +- assets/yaml/jp/rev0/ast_titania.yaml | 4 +- assets/yaml/jp/rev0/ast_title.yaml | 122 +- assets/yaml/jp/rev0/ast_venom_1.yaml | 4 +- assets/yaml/jp/rev0/ast_venom_2.yaml | 4 +- assets/yaml/jp/rev0/ast_versus.yaml | 36 +- assets/yaml/jp/rev0/ast_vs_menu.yaml | 128 +- assets/yaml/jp/rev0/ast_zoness.yaml | 4 +- assets/yaml/us/rev1/ast_allies.yaml | 8 +- assets/yaml/us/rev1/ast_andross.yaml | 4 +- assets/yaml/us/rev1/ast_aquas.yaml | 4 +- assets/yaml/us/rev1/ast_area_6.yaml | 4 +- assets/yaml/us/rev1/ast_arwing.yaml | 74 +- assets/yaml/us/rev1/ast_blue_marine.yaml | 8 +- assets/yaml/us/rev1/ast_bolse.yaml | 4 +- assets/yaml/us/rev1/ast_common.yaml | 204 +- assets/yaml/us/rev1/ast_corneria.yaml | 4 +- assets/yaml/us/rev1/ast_font_3d.yaml | 148 +- assets/yaml/us/rev1/ast_fortuna.yaml | 4 +- assets/yaml/us/rev1/ast_katina.yaml | 4 +- assets/yaml/us/rev1/ast_landmaster.yaml | 8 +- assets/yaml/us/rev1/ast_macbeth.yaml | 4 +- assets/yaml/us/rev1/ast_map.yaml | 256 +- assets/yaml/us/rev1/ast_meteo.yaml | 4 +- assets/yaml/us/rev1/ast_option.yaml | 116 +- assets/yaml/us/rev1/ast_sector_x.yaml | 4 +- assets/yaml/us/rev1/ast_sector_y.yaml | 4 +- assets/yaml/us/rev1/ast_sector_z.yaml | 8 +- assets/yaml/us/rev1/ast_solar.yaml | 4 +- assets/yaml/us/rev1/ast_text.yaml | 4 +- assets/yaml/us/rev1/ast_titania.yaml | 4 +- assets/yaml/us/rev1/ast_title.yaml | 122 +- assets/yaml/us/rev1/ast_venom_1.yaml | 4 +- assets/yaml/us/rev1/ast_venom_2.yaml | 4 +- assets/yaml/us/rev1/ast_versus.yaml | 36 +- assets/yaml/us/rev1/ast_vs_menu.yaml | 128 +- assets/yaml/us/rev1/ast_zoness.yaml | 4 +- include/context.h | 4 +- include/fox_hud.h | 58 + include/fox_map.h | 32 +- include/fox_option.h | 306 +- include/functions.h | 79 +- include/gfx.h | 38 +- include/sf64audio_external.h | 28 +- include/sf64object.h | 2 +- include/sf64player.h | 6 +- include/sf64save.h | 45 +- include/variables.h | 2 +- linker_scripts/eu/rev0/symbol_addrs.txt | 4 +- .../eu/rev0/symbol_addrs_assets.txt | 4 +- linker_scripts/eu/rev0/undefined_syms.ld | 4 +- linker_scripts/jp/rev0/symbol_addrs.txt | 24 +- linker_scripts/jp/rev1/undefined_syms.ld | 1 + .../us/rev0/symbol_addrs_engine.txt | 1 + linker_scripts/us/rev1/symbol_addrs.txt | 2 +- .../us/rev1/symbol_addrs_EBFBE0.txt | 12 +- .../us/rev1/symbol_addrs_assets.txt | 6 +- .../us/rev1/symbol_addrs_engine.txt | 40 +- src/audio/audio_general.c | 60 +- src/audio/audio_load.c | 2 +- src/audio/audio_thread.c | 2 +- src/engine/fox_360.c | 2 +- src/engine/fox_beam.c | 12 +- src/engine/fox_bg.c | 12 +- src/engine/fox_context.c | 14 +- src/engine/fox_demo.c | 30 +- src/engine/fox_display.c | 57 +- src/engine/fox_edata_info.c | 4 +- src/engine/fox_edisplay.c | 28 +- src/engine/fox_effect.c | 34 +- src/engine/fox_enmy.c | 2 +- src/engine/fox_enmy2.c | 2 +- src/engine/fox_game.c | 24 +- src/engine/fox_hud.c | 1828 ++++++------ src/engine/fox_load.c | 4 +- src/engine/fox_play.c | 30 +- src/engine/fox_radio.c | 50 +- src/engine/fox_rcp_setup.c | 88 + src/engine/fox_std_lib.c | 88 +- src/engine/fox_tank.c | 4 +- src/engine/fox_versus.c | 126 +- src/mods/levelselect.c | 26 +- src/mods/sfxjukebox.c | 20 +- src/overlays/ovl_ending/fox_end1.c | 54 +- src/overlays/ovl_ending/fox_end2.c | 67 +- src/overlays/ovl_ending/fox_end2_data.c | 56 +- src/overlays/ovl_i1/fox_co.c | 30 +- src/overlays/ovl_i1/fox_tr.c | 2 +- src/overlays/ovl_i1/fox_tr360.c | 2 +- src/overlays/ovl_i1/fox_ve1.c | 4 +- src/overlays/ovl_i2/fox_me.c | 4 +- src/overlays/ovl_i2/fox_sx.c | 4 +- src/overlays/ovl_i3/fox_a6.c | 10 +- src/overlays/ovl_i3/fox_aq.c | 2 +- src/overlays/ovl_i3/fox_so.c | 8 +- src/overlays/ovl_i3/fox_zo.c | 4 +- src/overlays/ovl_i4/fox_bo.c | 12 +- src/overlays/ovl_i4/fox_fo.c | 10 +- src/overlays/ovl_i4/fox_ka.c | 14 +- src/overlays/ovl_i5/fox_ma.c | 21 +- src/overlays/ovl_i5/fox_ti.c | 8 +- src/overlays/ovl_i5/fox_ti_cs.c | 4 +- src/overlays/ovl_i6/fox_andross.c | 16 +- src/overlays/ovl_i6/fox_sy.c | 24 +- src/overlays/ovl_menu/fox_i_menu.c | 8 +- src/overlays/ovl_menu/fox_map.c | 2554 ++++++++-------- src/overlays/ovl_menu/fox_option.c | 2641 +++++++++-------- src/overlays/ovl_menu/fox_title.c | 2426 +++++++-------- src/overlays/ovl_menu/fox_title.h | 316 +- yamls/jp/rev1/assets.yaml | 444 +++ yamls/jp/rev1/header.yaml | 70 + yamls/jp/rev1/main.yaml | 37 + yamls/jp/rev1/overlays.yaml | 234 ++ yamls/us/rev0/assets.yaml | 453 +++ yamls/us/rev0/header.yaml | 77 + yamls/us/rev0/main.yaml | 168 ++ yamls/us/rev0/overlays.yaml | 139 + yamls/us/rev1/main.yaml | 2 +- 140 files changed, 8764 insertions(+), 6782 deletions(-) create mode 100644 include/fox_hud.h create mode 100644 linker_scripts/jp/rev1/undefined_syms.ld create mode 100644 linker_scripts/us/rev0/symbol_addrs_engine.txt create mode 100644 yamls/jp/rev1/assets.yaml create mode 100644 yamls/jp/rev1/header.yaml create mode 100644 yamls/jp/rev1/main.yaml create mode 100644 yamls/jp/rev1/overlays.yaml create mode 100644 yamls/us/rev0/assets.yaml create mode 100644 yamls/us/rev0/header.yaml create mode 100644 yamls/us/rev0/main.yaml create mode 100644 yamls/us/rev0/overlays.yaml diff --git a/.vscode/settings.json b/.vscode/settings.json index da500595..b45d5b77 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -150,7 +150,8 @@ "string": "c", "prevent_bss_reordering3.h": "c", "ast_a_ti.h": "c", - "fox_co.h": "c" + "fox_co.h": "c", + "ast_map.h": "c" }, "C_Cpp_Runner.msvcBatchPath": "" } \ No newline at end of file diff --git a/assets/yaml/jp/rev0/ast_allies.yaml b/assets/yaml/jp/rev0/ast_allies.yaml index 9ccff794..52856323 100644 --- a/assets/yaml/jp/rev0/ast_allies.yaml +++ b/assets/yaml/jp/rev0/ast_allies.yaml @@ -53,11 +53,11 @@ D_D007A70: D_D008990: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0xD008990, symbol: D_D008990 } -D_D0098B0: - { type: GFX, offset: 0xD0098B0, symbol: D_D0098B0 } +aKattRadarMarkDL: + { type: GFX, offset: 0xD0098B0, symbol: aKattRadarMarkDL } -D_D009938: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x0D009938, symbol: D_D009938 } +aKattRadarMarkTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x0D009938, symbol: aKattRadarMarkTex } aKattShipDL: { type: GFX, offset: 0xD009A40, symbol: aKattShipDL } diff --git a/assets/yaml/jp/rev0/ast_andross.yaml b/assets/yaml/jp/rev0/ast_andross.yaml index ea967a85..ece202c0 100644 --- a/assets/yaml/jp/rev0/ast_andross.yaml +++ b/assets/yaml/jp/rev0/ast_andross.yaml @@ -16,8 +16,8 @@ D_ANDROSS_C000000: {type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 28, offset: 0xC000000, symbol: D_ANDROSS_C000000} -D_ANDROSS_C000A80: - {type: TEXTURE, ctype: u8, format: IA8, width: 128, height: 28, offset: 0xC000A80, symbol: D_ANDROSS_C000A80} +aAndTitleCardTex: + {type: TEXTURE, ctype: u8, format: IA8, width: 128, height: 28, offset: 0xC000A80, symbol: aAndTitleCardTex} D_ANDROSS_C001880: {type: GFX, offset: 0xC001880, symbol: D_ANDROSS_C001880} diff --git a/assets/yaml/jp/rev0/ast_aquas.yaml b/assets/yaml/jp/rev0/ast_aquas.yaml index ac9b2f32..30c547e8 100644 --- a/assets/yaml/jp/rev0/ast_aquas.yaml +++ b/assets/yaml/jp/rev0/ast_aquas.yaml @@ -13,8 +13,8 @@ - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' -D_AQ_6000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 13, offset: 0x6000000, symbol: D_AQ_6000000 } +aAqTitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 13, offset: 0x6000000, symbol: aAqTitleCardTex } aAqSquidAnim: { type: SF64:ANIM, offset: 0x6000AE4, symbol: aAqSquidAnim } diff --git a/assets/yaml/jp/rev0/ast_area_6.yaml b/assets/yaml/jp/rev0/ast_area_6.yaml index 9b35795e..27e857a8 100644 --- a/assets/yaml/jp/rev0/ast_area_6.yaml +++ b/assets/yaml/jp/rev0/ast_area_6.yaml @@ -12,8 +12,8 @@ - '#include "sf64player.h"' - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' -D_A6_6000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 104, height: 28, offset: 0x6000000, symbol: D_A6_6000000 } +aA6TitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 104, height: 28, offset: 0x6000000, symbol: aA6TitleCardTex } D_A6_6000B60: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x06000B60, symbol: D_A6_6000B60 } diff --git a/assets/yaml/jp/rev0/ast_arwing.yaml b/assets/yaml/jp/rev0/ast_arwing.yaml index 7354410b..69cec0e5 100644 --- a/assets/yaml/jp/rev0/ast_arwing.yaml +++ b/assets/yaml/jp/rev0/ast_arwing.yaml @@ -8,17 +8,17 @@ - '#include "gfx.h"' - '#include "sf64object.h"' -D_arwing_3000000: - { type: TEXTURE, format: CI4, offset: 0x3000000, width: 16, height: 16, ctype: u8, tlut: 0x3000080, symbol: D_arwing_3000000 } +aArwingLifeIconTex: + { type: TEXTURE, format: CI4, offset: 0x3000000, width: 16, height: 16, ctype: u8, tlut: 0x3000080, symbol: aArwingLifeIconTex } -D_arwing_3000080: - { type: TEXTURE, format: TLUT, offset: 0x3000080, colors: 8, ctype: u16, symbol: D_arwing_3000080 } +aArwingLifeIconTLUT: + { type: TEXTURE, format: TLUT, offset: 0x3000080, colors: 8, ctype: u16, symbol: aArwingLifeIconTLUT } -D_arwing_3000090: - { type: GFX, offset: 0x3000090, symbol: D_arwing_3000090 } +aAwFoxHeadDL: + { type: GFX, offset: 0x3000090, symbol: aAwFoxHeadDL } -D_arwing_3001C90: - { type: GFX, offset: 0x3001C90, symbol: D_arwing_3001C90 } +aAwJamesHeadDL: + { type: GFX, offset: 0x3001C90, symbol: aAwJamesHeadDL } D_arwing_3003960: { type: TEXTURE, format: RGBA16, offset: 0x3003960, width: 8, height: 8, ctype: u16, symbol: D_arwing_3003960 } @@ -41,11 +41,11 @@ D_arwing_3003BE0: D_arwing_3003C60: { type: TEXTURE, format: RGBA16, offset: 0x3003C60, width: 8, height: 8, ctype: u16, symbol: D_arwing_3003C60 } -D_arwing_3003CE0: - { type: GFX, offset: 0x3003CE0, symbol: D_arwing_3003CE0 } +aAwPeppyHeadDL: + { type: GFX, offset: 0x3003CE0, symbol: aAwPeppyHeadDL } -D_arwing_3005AB0: - { type: GFX, offset: 0x3005AB0, symbol: D_arwing_3005AB0 } +aAwSlippyHeadDL: + { type: GFX, offset: 0x3005AB0, symbol: aAwSlippyHeadDL } D_arwing_30074D0: { type: TEXTURE, format: RGBA16, offset: 0x30074D0, width: 8, height: 8, ctype: u16, symbol: D_arwing_30074D0 } @@ -68,8 +68,8 @@ D_arwing_3008960: D_arwing_3009960: { type: TEXTURE, format: RGBA16, offset: 0x3009960, width: 16, height: 16, ctype: u16, symbol: D_arwing_3009960 } -D_arwing_3009B60: - { type: GFX, offset: 0x3009B60, symbol: D_arwing_3009B60 } +aAwBodyDL: + { type: GFX, offset: 0x3009B60, symbol: aAwBodyDL } D_arwing_300AC48: { type: TEXTURE, format: RGBA16, offset: 0x300AC48, width: 32, height: 32, ctype: u16, symbol: D_arwing_300AC48 } @@ -104,8 +104,8 @@ D_arwing_300F448: D_arwing_3010448: { type: TEXTURE, format: RGBA16, offset: 0x3010448, width: 64, height: 32, ctype: u16, symbol: D_arwing_3010448 } -D_arwing_3011720: - { type: GFX, offset: 0x3011720, symbol: D_arwing_3011720 } +aAwLaserGun1DL: + { type: GFX, offset: 0x3011720, symbol: aAwLaserGun1DL } D_arwing_30119F0: { type: TEXTURE, format: RGBA16, offset: 0x30119F0, width: 32, height: 32, ctype: u16, symbol: D_arwing_30119F0 } @@ -116,8 +116,8 @@ D_arwing_30121F0: D_arwing_30129F0: { type: TEXTURE, format: RGBA16, offset: 0x30129F0, width: 32, height: 32, ctype: u16, symbol: D_arwing_30129F0 } -D_arwing_30131F0: - { type: GFX, offset: 0x30131F0, symbol: D_arwing_30131F0 } +aAwCockpitViewDL: + { type: GFX, offset: 0x30131F0, symbol: aAwCockpitViewDL } D_arwing_30137E8: { type: TEXTURE, format: RGBA16, offset: 0x30137E8, width: 32, height: 32, ctype: u16, symbol: D_arwing_30137E8 } @@ -128,17 +128,17 @@ D_arwing_3013FE8: D_arwing_30147E8: { type: TEXTURE, format: RGBA16, offset: 0x30147E8, width: 16, height: 32, ctype: u16, symbol: D_arwing_30147E8 } -D_arwing_3014BF0: - { type: GFX, offset: 0x3014BF0, symbol: D_arwing_3014BF0 } +aAwRightWingBrokenDL: + { type: GFX, offset: 0x3014BF0, symbol: aAwRightWingBrokenDL } D_arwing_3014F20: { type: TEXTURE, format: RGBA16, offset: 0x3014F20, width: 16, height: 16, ctype: u16, symbol: D_arwing_3014F20 } -D_arwing_3015120: - { type: GFX, offset: 0x3015120, symbol: D_arwing_3015120 } +aAwLeftWingBrokenDL: + { type: GFX, offset: 0x3015120, symbol: aAwLeftWingBrokenDL } -D_arwing_30155E0: - { type: GFX, offset: 0x30155E0, symbol: D_arwing_30155E0} +aAwFlap1DL: + { type: GFX, offset: 0x30155E0, symbol: aAwFlap1DL} D_arwing_3015AF4: { type: SF64:ANIM, offset: 0x3015AF4, symbol: D_arwing_3015AF4 } @@ -149,8 +149,8 @@ D_arwing_3015C28: D_arwing_3015D68: { type: SF64:ANIM, offset: 0x3015D68, symbol: D_arwing_3015D68 } -D_arwing_3015D80: - { type: GFX, offset: 0x3015D80, symbol: D_arwing_3015D80 } +aAwRightWingDL: + { type: GFX, offset: 0x3015D80, symbol: aAwRightWingDL } D_arwing_30163C4: { type: SF64:ANIM, offset: 0x30163C4, symbol: D_arwing_30163C4 } @@ -158,8 +158,8 @@ D_arwing_30163C4: D_arwing_3016610: { type: SF64:SKELETON, offset: 0x3016610, symbol: D_arwing_3016610 } -D_arwing_3016660: - { type: GFX, offset: 0x3016660, symbol: D_arwing_3016660} +aAwLeftWingDL: + { type: GFX, offset: 0x3016660, symbol: aAwLeftWingDL} D_arwing_3016B30: { type: GFX, offset: 0x3016B30, symbol: D_arwing_3016B30 } @@ -167,8 +167,8 @@ D_arwing_3016B30: D_arwing_3016BB8: { type: TEXTURE, format: IA8, offset: 0x3016BB8, width: 16, height: 16, ctype: u8, symbol: D_arwing_3016BB8 } -D_arwing_3016CC0: - { type: GFX, offset: 0x3016CC0, symbol: D_arwing_3016CC0 } +aAwFalcoHeadDL: + { type: GFX, offset: 0x3016CC0, symbol: aAwFalcoHeadDL } D_arwing_30182C8: { type: TEXTURE, format: RGBA16, offset: 0x30182C8, width: 8, height: 8, ctype: u16, symbol: D_arwing_30182C8 } diff --git a/assets/yaml/jp/rev0/ast_blue_marine.yaml b/assets/yaml/jp/rev0/ast_blue_marine.yaml index 4d0809de..6233790f 100644 --- a/assets/yaml/jp/rev0/ast_blue_marine.yaml +++ b/assets/yaml/jp/rev0/ast_blue_marine.yaml @@ -8,11 +8,11 @@ - '#include "gfx.h"' - '#include "sf64object.h"' -D_blue_marine_3000000: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x3000000, symbol: D_blue_marine_3000000, tlut: 0x3000080 } +aBlueMarineLifeIconTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x3000000, symbol: aBlueMarineLifeIconTex, tlut: 0x3000080 } -D_blue_marine_3000080: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x3000080, symbol: D_blue_marine_3000080 } +aBlueMarineLifeIconTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x3000080, symbol: aBlueMarineLifeIconTLUT } D_blue_marine_3000090: { type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 9, offset: 0x3000090, symbol: D_blue_marine_3000090, tlut: 0x3000120 } diff --git a/assets/yaml/jp/rev0/ast_bolse.yaml b/assets/yaml/jp/rev0/ast_bolse.yaml index a1c3c57b..95a6e02c 100644 --- a/assets/yaml/jp/rev0/ast_bolse.yaml +++ b/assets/yaml/jp/rev0/ast_bolse.yaml @@ -13,8 +13,8 @@ - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' # Bolse Defense Outpost -D_BO_6000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 168, height: 19, offset: 0x6000000, symbol: D_BO_6000000 } +aBoTitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 168, height: 19, offset: 0x6000000, symbol: aBoTitleCardTex } D_BO_6000C80: { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x6000C80, symbol: D_BO_6000C80 } diff --git a/assets/yaml/jp/rev0/ast_common.yaml b/assets/yaml/jp/rev0/ast_common.yaml index 7d8d20ff..d7f7b08c 100644 --- a/assets/yaml/jp/rev0/ast_common.yaml +++ b/assets/yaml/jp/rev0/ast_common.yaml @@ -17,8 +17,8 @@ D_1000280: D_1000640: { type: TEXTURE, format: IA8, width: 96, height: 22, ctype: u8, offset: 0x1000640, symbol: D_1000640 } -D_1000E80: - { type: TEXTURE, format: IA8, width: 48, height: 9, ctype: u8, offset: 0x1000E80, symbol: D_1000E80 } +aBoostGaugeFrameTex: + { type: TEXTURE, format: IA8, width: 48, height: 9, ctype: u8, offset: 0x1000E80, symbol: aBoostGaugeFrameTex } D_1001030: { type: TEXTURE, format: IA8, width: 8, height: 8, ctype: u8, offset: 0x1001030, symbol: D_1001030 } @@ -41,8 +41,8 @@ D_1002040: D_1002220: { type: TEXTURE, format: IA8, width: 8, height: 12, ctype: u8, offset: 0x1002220, symbol: D_1002220 } -D_1002280: - { type: TEXTURE, format: IA8, width: 8, height: 12, ctype: u8, offset: 0x1002280, symbol: D_1002280 } +aShieldGaugeFrameEdgeTex: + { type: TEXTURE, format: IA8, width: 8, height: 12, ctype: u8, offset: 0x1002280, symbol: aShieldGaugeFrameEdgeTex } D_10022E0: { type: TEXTURE, format: IA8, width: 8, height: 12, ctype: u8, offset: 0x10022E0, symbol: D_10022E0 } @@ -53,8 +53,8 @@ D_1002340: D_10024D0: { type: TEXTURE, format: IA8, width: 96, height: 32, ctype: u8, offset: 0x10024D0, symbol: D_10024D0 } -D_10030D0: - { type: TEXTURE, format: IA8, width: 8, height: 12, ctype: u8, offset: 0x10030D0, symbol: D_10030D0 } +aShieldGaugeFrameTex: + { type: TEXTURE, format: IA8, width: 8, height: 12, ctype: u8, offset: 0x10030D0, symbol: aShieldGaugeFrameTex } D_1003130: { type: GFX, offset: 0x1003130, symbol: D_1003130 } @@ -65,14 +65,14 @@ D_1003208: D_1003288: { type: TEXTURE, format: TLUT, colors: 12, offset: 0x1003288, ctype: u16, symbol: D_1003288 } -D_10032A0: - { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x10032A0, symbol: D_10032A0 } +aFalcoPortraitTex: + { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x10032A0, symbol: aFalcoPortraitTex } D_10041C0: { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x10041C0, symbol: D_10041C0 } -D_10050E0: - { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x10050E0, symbol: D_10050E0 } +aFoxPortraitTex: + { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x10050E0, symbol: aFoxPortraitTex } D_1006000: { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x1006000, symbol: D_1006000 } @@ -92,14 +92,14 @@ D_1009C80: D_100ABA0: { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x100ABA0, symbol: D_100ABA0 } -D_100BAC0: - { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x100BAC0, symbol: D_100BAC0 } +aPeppyPortraitTex: + { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x100BAC0, symbol: aPeppyPortraitTex } D_100C9E0: { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x100C9E0, symbol: D_100C9E0 } -D_100D900: - { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x100D900, symbol: D_100D900 } +aSlippyPortraitTex: + { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x100D900, symbol: aSlippyPortraitTex } D_100E820: { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x100E820, symbol: D_100E820 } @@ -215,17 +215,17 @@ D_1011200: D_1011270: { type: TEXTURE, format: TLUT, colors: 6, ctype: u16, offset: 0x1011270, symbol: D_1011270 } -D_1011280: - { type: TEXTURE, format: CI4, width: 48, height: 44, ctype: u8, offset: 0x1011280, tlut: 0x10116A0, symbol: D_1011280 } +aRadarFrameTex: + { type: TEXTURE, format: CI4, width: 48, height: 44, ctype: u8, offset: 0x1011280, tlut: 0x10116A0, symbol: aRadarFrameTex } -D_10116A0: - { type: TEXTURE, format: TLUT, colors: 8, ctype: u16, offset: 0x10116A0, symbol: D_10116A0 } +aRadarFrameTLUT: + { type: TEXTURE, format: TLUT, colors: 8, ctype: u16, offset: 0x10116A0, symbol: aRadarFrameTLUT } -D_10116B0: - { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x10116B0, tlut: 0x1011730, symbol: D_10116B0 } +aVsBombIconTex: + { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x10116B0, tlut: 0x1011730, symbol: aVsBombIconTex } -D_1011730: - { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011730, symbol: D_1011730 } +aVsBombIconTLUT: + { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011730, symbol: aVsBombIconTLUT } D_1011750: { type: TEXTURE, format: CI4, width: 80, height: 13, ctype: u8, offset: 0x1011750, tlut: 0x1011958, symbol: D_1011750 } @@ -245,29 +245,29 @@ D_1011A40: D_1011AB0: { type: TEXTURE, format: TLUT, colors: 8, ctype: u16, offset: 0x1011AB0, symbol: D_1011AB0 } -D_1011AC0: - { type: TEXTURE, format: CI4, width: 16, height: 26, ctype: u8, offset: 0x1011AC0, tlut: 0x1011B90, symbol: D_1011AC0 } +aIncomingMsgButtonTex: + { type: TEXTURE, format: CI4, width: 16, height: 26, ctype: u8, offset: 0x1011AC0, tlut: 0x1011B90, symbol: aIncomingMsgButtonTex } -D_1011B90: - { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011B90, symbol: D_1011B90 } +aIncomingMsgButtonTLUT: + { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011B90, symbol: aIncomingMsgButtonTLUT } -D_1011BB0: - { type: TEXTURE, format: CI4, width: 16, height: 26, ctype: u8, offset: 0x1011BB0, tlut: 0x1011C80, symbol: D_1011BB0 } +aIncomingMsgSignal1Tex: + { type: TEXTURE, format: CI4, width: 16, height: 26, ctype: u8, offset: 0x1011BB0, tlut: 0x1011C80, symbol: aIncomingMsgSignal1Tex } -D_1011C80: - { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011C80, symbol: D_1011C80 } +aIncomingMsgSignal1TLUT: + { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011C80, symbol: aIncomingMsgSignal1TLUT } -D_1011CA0: - { type: TEXTURE, format: CI4, width: 16, height: 26, ctype: u8, offset: 0x1011CA0, tlut: 0x1011D70, symbol: D_1011CA0 } +aIncomingMsgSignal2Tex: + { type: TEXTURE, format: CI4, width: 16, height: 26, ctype: u8, offset: 0x1011CA0, tlut: 0x1011D70, symbol: aIncomingMsgSignal2Tex } -D_1011D70: - { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011D70, symbol: D_1011D70 } +aIncomingMsgSignal2TLUT: + { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011D70, symbol: aIncomingMsgSignal2TLUT } -D_1011D90: - { type: TEXTURE, format: CI4, width: 16, height: 26, ctype: u8, offset: 0x1011D90, tlut: 0x1011E60, symbol: D_1011D90 } +aIncomingMsgSignal3Tex: + { type: TEXTURE, format: CI4, width: 16, height: 26, ctype: u8, offset: 0x1011D90, tlut: 0x1011E60, symbol: aIncomingMsgSignal3Tex } -D_1011E60: - { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011E60, symbol: D_1011E60 } +aIncomingMsgSignal3TLUT: + { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011E60, symbol: aIncomingMsgSignal3TLUT } D_1011E80: { type: TEXTURE, format: CI4, width: 16, height: 8, ctype: u8, offset: 0x1011E80, tlut: 0x1011EC0, symbol: D_1011E80 } @@ -275,11 +275,11 @@ D_1011E80: D_1011EC0: { type: TEXTURE, format: TLUT, colors: 8, ctype: u16, offset: 0x1011EC0, symbol: D_1011EC0 } -D_1011ED0: - { type: TEXTURE, format: CI4, width: 16, height: 7, ctype: u8, offset: 0x1011ED0, tlut: 0x1011F08, symbol: D_1011ED0 } +aXTex: + { type: TEXTURE, format: CI4, width: 16, height: 7, ctype: u8, offset: 0x1011ED0, tlut: 0x1011F08, symbol: aXTex } -D_1011F08: - { type: TEXTURE, format: TLUT, colors: 12, ctype: u16, offset: 0x1011F08, symbol: D_1011F08 } +aXTLUT: + { type: TEXTURE, format: TLUT, colors: 12, ctype: u16, offset: 0x1011F08, symbol: aXTLUT } D_1011F20: { type: GFX, offset: 0x1011F20, symbol: D_1011F20 } @@ -290,11 +290,11 @@ D_1012000: D_1012100: { type: TEXTURE, format: TLUT, colors: 8, offset: 0x1012100, ctype: u16, symbol: D_1012100 } -D_1012110: - { type: GFX, offset: 0x1012110, symbol: D_1012110 } +aGoldRingEmptySlotDL: + { type: GFX, offset: 0x1012110, symbol: aGoldRingEmptySlotDL } -D_1012190: - { type: TEXTURE, format: IA8, width: 16, height: 16, ctype: u8, offset: 0x1012190, symbol: D_1012190 } +aGoldRingEmptySlotTex: + { type: TEXTURE, format: IA8, width: 16, height: 16, ctype: u8, offset: 0x1012190, symbol: aGoldRingEmptySlotTex } D_1012290: { type: TEXTURE, format: CI8, width: 48, height: 22, ctype: u8, offset: 0x1012290, tlut: 0x10126B0, symbol: D_1012290 } @@ -314,17 +314,17 @@ D_1013780: D_10151F0: { type: TEXTURE, format: TLUT, colors: 146, ctype: u16, offset: 0x10151F0, symbol: D_10151F0 } -D_10127D0: - { type: TEXTURE, format: CI8, width: 40, height: 5, ctype: u8, offset: 0x10127D0, tlut: 0x1012898, symbol: D_10127D0 } +aBoostGaugeCoolTex: + { type: TEXTURE, format: CI8, width: 40, height: 5, ctype: u8, offset: 0x10127D0, tlut: 0x1012898, symbol: aBoostGaugeCoolTex } -D_1012898: - { type: TEXTURE, format: TLUT, colors: 20, ctype: u16, offset: 0x1012898, symbol: D_1012898 } +aBoostGaugeCoolTLUT: + { type: TEXTURE, format: TLUT, colors: 20, ctype: u16, offset: 0x1012898, symbol: aBoostGaugeCoolTLUT } -D_10128C0: - { type: TEXTURE, format: CI8, width: 40, height: 5, ctype: u8, offset: 0x10128C0, tlut: 0x1012988, symbol: D_10128C0 } +aBoostGaugeOverheatTex: + { type: TEXTURE, format: CI8, width: 40, height: 5, ctype: u8, offset: 0x10128C0, tlut: 0x1012988, symbol: aBoostGaugeOverheatTex } -D_1012988: - { type: TEXTURE, format: TLUT, colors: 28, ctype: u16, offset: 0x1012988, symbol: D_1012988 } +aBoostGaugeOverheatTLUT: + { type: TEXTURE, format: TLUT, colors: 28, ctype: u16, offset: 0x1012988, symbol: aBoostGaugeOverheatTLUT } D_10129C0: { type: TEXTURE, format: CI8, width: 16, height: 109, ctype: u8, offset: 0x10129C0, tlut: 0x1013090, symbol: D_10129C0 } @@ -332,17 +332,17 @@ D_10129C0: D_1013090: { type: TEXTURE, format: TLUT, colors: 112, ctype: u16, offset: 0x1013090, symbol: D_1013090 } -D_1013170: - { type: TEXTURE, format: CI8, width: 32, height: 32, ctype: u8, offset: 0x1013170, tlut: 0x1013570, symbol: D_1013170 } +aMsgWindowBgTex: + { type: TEXTURE, format: CI8, width: 32, height: 32, ctype: u8, offset: 0x1013170, tlut: 0x1013570, symbol: aMsgWindowBgTex } -D_1013570: - { type: TEXTURE, format: TLUT, colors: 8, ctype: u16, offset: 0x1013570, symbol: D_1013570 } +aMsgWindowBgTLUT: + { type: TEXTURE, format: TLUT, colors: 8, ctype: u16, offset: 0x1013570, symbol: aMsgWindowBgTLUT } -D_1013580: - { type: TEXTURE, format: CI8, width: 48, height: 8, ctype: u8, offset: 0x1013580, tlut: 0x1013700, symbol: D_1013580 } +aShieldGaugeTex: + { type: TEXTURE, format: CI8, width: 48, height: 8, ctype: u8, offset: 0x1013580, tlut: 0x1013700, symbol: aShieldGaugeTex } -D_1013700: - { type: TEXTURE, format: TLUT, colors: 58, ctype: u16, offset: 0x1013700, symbol: D_1013700 } +aShieldGaugeTLUT: + { type: TEXTURE, format: TLUT, colors: 58, ctype: u16, offset: 0x1013700, symbol: aShieldGaugeTLUT } D_1015320: { type: GFX, offset: 0x1015320, symbol: D_1015320 } @@ -353,11 +353,11 @@ D_10153F8: D_10154F8: { type: TEXTURE, format: TLUT, colors: 12, offset: 0x10154F8, ctype: u16, symbol: D_10154F8 } -D_1015510: - { type: GFX, offset: 0x1015510, symbol: D_1015510 } +aRadarMarkArwingDL: + { type: GFX, offset: 0x1015510, symbol: aRadarMarkArwingDL } -D_1015598: - { type: TEXTURE, format: IA8, width: 16, height: 16, ctype: u8, offset: 0x1015598, symbol: D_1015598 } +aRadarMarkArwingTex: + { type: TEXTURE, format: IA8, width: 16, height: 16, ctype: u8, offset: 0x1015598, symbol: aRadarMarkArwingTex } D_10156A0: { type: GFX, offset: 0x10156A0, symbol: D_10156A0 } @@ -563,8 +563,8 @@ D_101AED0: D_101AF98: { type: TEXTURE, format: RGBA16, width: 16, height: 16, ctype: u16, offset: 0x101AF98, symbol: D_101AF98 } -D_101B1A0: - { type: GFX, offset: 0x101B1A0, symbol: D_101B1A0 } +aGoldRingFrame12DL: + { type: GFX, offset: 0x101B1A0, symbol: aGoldRingFrame12DL } D_101B268: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101B268, tlut: 0x101B2E8, symbol: D_101B268 } @@ -572,8 +572,8 @@ D_101B268: D_101B2E8: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101B2E8, ctype: u16, symbol: D_101B2E8 } -D_101B310: - { type: GFX, offset: 0x101B310, symbol: D_101B310 } +aGoldRingFrame11DL: + { type: GFX, offset: 0x101B310, symbol: aGoldRingFrame11DL } D_101B3D8: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101B3D8, tlut: 0x101B458, symbol: D_101B3D8 } @@ -581,8 +581,8 @@ D_101B3D8: D_101B458: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101B458, ctype: u16, symbol: D_101B458 } -D_101B480: - { type: GFX, offset: 0x101B480, symbol: D_101B480 } +aGoldRingFrame10DL: + { type: GFX, offset: 0x101B480, symbol: aGoldRingFrame10DL } D_101B548: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101B548, tlut: 0x101B5C8, symbol: D_101B548 } @@ -590,8 +590,8 @@ D_101B548: D_101B5C8: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101B5C8, ctype: u16, symbol: D_101B5C8 } -D_101B5F0: - { type: GFX, offset: 0x101B5F0, symbol: D_101B5F0 } +aGoldRingFrame9DL: + { type: GFX, offset: 0x101B5F0, symbol: aGoldRingFrame9DL } D_101B6B8: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101B6B8, tlut: 0x101B738, symbol: D_101B6B8 } @@ -599,8 +599,8 @@ D_101B6B8: D_101B738: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101B738, ctype: u16, symbol: D_101B738 } -D_101B760: - { type: GFX, offset: 0x101B760, symbol: D_101B760 } +aGoldRingFrame8DL: + { type: GFX, offset: 0x101B760, symbol: aGoldRingFrame8DL } D_101B828: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101B828, tlut: 0x101B8A8, symbol: D_101B828 } @@ -608,8 +608,8 @@ D_101B828: D_101B8A8: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101B8A8, ctype: u16, symbol: D_101B8A8 } -D_101B8D0: - { type: GFX, offset: 0x101B8D0, symbol: D_101B8D0 } +aGoldRingFrame7DL: + { type: GFX, offset: 0x101B8D0, symbol: aGoldRingFrame7DL } D_101B998: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101B998, tlut: 0x101BA18, symbol: D_101B998 } @@ -617,8 +617,8 @@ D_101B998: D_101BA18: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101BA18, ctype: u16, symbol: D_101BA18 } -D_101BA40: - { type: GFX, offset: 0x101BA40, symbol: D_101BA40 } +aGoldRingFrame6DL: + { type: GFX, offset: 0x101BA40, symbol: aGoldRingFrame6DL } D_101BB08: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101BB08, tlut: 0x101BB88, symbol: D_101BB08 } @@ -626,8 +626,8 @@ D_101BB08: D_101BB88: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101BB88, ctype: u16, symbol: D_101BB88 } -D_101BBB0: - { type: GFX, offset: 0x101BBB0, symbol: D_101BBB0 } +aGoldRingFrame5DL: + { type: GFX, offset: 0x101BBB0, symbol: aGoldRingFrame5DL } D_101BC78: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101BC78, tlut: 0x101BCF8, symbol: D_101BC78 } @@ -635,8 +635,8 @@ D_101BC78: D_101BCF8: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101BCF8, ctype: u16, symbol: D_101BCF8 } -D_101BD20: - { type: GFX, offset: 0x101BD20, symbol: D_101BD20 } +aGoldRingFrame4DL: + { type: GFX, offset: 0x101BD20, symbol: aGoldRingFrame4DL } D_101BDE8: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101BDE8, tlut: 0x101BE68, symbol: D_101BDE8 } @@ -644,8 +644,8 @@ D_101BDE8: D_101BE68: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101BE68, ctype: u16, symbol: D_101BE68 } -D_101BE90: - { type: GFX, offset: 0x101BE90, symbol: D_101BE90 } +aGoldRingFrame3DL: + { type: GFX, offset: 0x101BE90, symbol: aGoldRingFrame3DL } D_101BF58: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101BF58, tlut: 0x101BFD8, symbol: D_101BF58 } @@ -653,8 +653,8 @@ D_101BF58: D_101BFD8: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101BFD8, ctype: u16, symbol: D_101BFD8 } -D_101C000: - { type: GFX, offset: 0x101C000, symbol: D_101C000 } +aGoldRingFrame2DL: + { type: GFX, offset: 0x101C000, symbol: aGoldRingFrame2DL } D_101C0C8: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101C0C8, tlut: 0x101C148, symbol: D_101C0C8 } @@ -662,8 +662,8 @@ D_101C0C8: D_101C148: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101C148, ctype: u16, symbol: D_101C148 } -D_101C170: - { type: GFX, offset: 0x101C170, symbol: D_101C170 } +aGoldRingFrame1DL: + { type: GFX, offset: 0x101C170, symbol: aGoldRingFrame1DL } D_101C238: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101C238, tlut: 0x101C2B8, symbol: D_101C238 } @@ -671,11 +671,11 @@ D_101C238: D_101C2B8: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101C2B8, ctype: u16, symbol: D_101C2B8 } -D_101C2E0: - { type: GFX, offset: 0x101C2E0, symbol: D_101C2E0 } +aStarDL: + { type: GFX, offset: 0x101C2E0, symbol: aStarDL } -D_101C368: - { type: TEXTURE, format: IA8, width: 32, height: 32, ctype: u8, colors: 20, offset: 0x101C368, symbol: D_101C368 } +aStarTex: + { type: TEXTURE, format: IA8, width: 32, height: 32, ctype: u8, colors: 20, offset: 0x101C368, symbol: aStarTex } D_101C770: { type: GFX, offset: 0x101C770, symbol: D_101C770 } @@ -833,8 +833,8 @@ aSlippyMarkTex: aSlippyMarkTLUT: { type: TEXTURE, format: TLUT, colors: 12, offset: 0x1024818, ctype: u16, symbol: aSlippyMarkTLUT } -D_1024830: - { type: GFX, offset: 0x1024830, symbol: D_1024830 } +aRadarMarkBossDL: + { type: GFX, offset: 0x1024830, symbol: aRadarMarkBossDL } D_10248F8: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x10248F8, tlut: 0x1024978, symbol: D_10248F8 } @@ -842,8 +842,8 @@ D_10248F8: D_1024978: { type: TEXTURE, format: TLUT, colors: 12, offset: 0x1024978, ctype: u16, symbol: D_1024978 } -D_1024990: - { type: GFX, offset: 0x1024990, symbol: D_1024990 } +aArrowDL: + { type: GFX, offset: 0x1024990, symbol: aArrowDL } D_1024A58: { type: TEXTURE, format: CI4, width: 16, height: 8, ctype: u8, offset: 0x1024A58, tlut: 0x1024A98, symbol: D_1024A58 } @@ -851,8 +851,8 @@ D_1024A58: D_1024A98: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x1024A98, ctype: u16, symbol: D_1024A98 } -D_1024AC0: - { type: GFX, offset: 0x1024AC0, symbol: D_1024AC0 } +aOrbDL: + { type: GFX, offset: 0x1024AC0, symbol: aOrbDL } D_1024B58: { type: TEXTURE, format: IA8, width: 32, height: 32, ctype: u8, offset: 0x1024B58, symbol: D_1024B58 } @@ -920,8 +920,8 @@ D_102A010: D_102A098: { type: TEXTURE, format: RGBA16, width: 32, height: 32, ctype: u16, offset: 0x102A098, symbol: D_102A098 } -D_102A8A0: - { type: GFX, offset: 0x102A8A0, symbol: D_102A8A0 } +aRadarMarkKaSaucererDL: + { type: GFX, offset: 0x102A8A0, symbol: aRadarMarkKaSaucererDL } D_102A928: { type: TEXTURE, format: RGBA16, width: 16, height: 16, ctype: u16, offset: 0x102A928, symbol: D_102A928 } diff --git a/assets/yaml/jp/rev0/ast_corneria.yaml b/assets/yaml/jp/rev0/ast_corneria.yaml index b53b86c7..0916880d 100644 --- a/assets/yaml/jp/rev0/ast_corneria.yaml +++ b/assets/yaml/jp/rev0/ast_corneria.yaml @@ -15,8 +15,8 @@ # Corneria # Former Army Base -D_CO_6000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 128, height: 28, offset: 0x6000000, symbol: D_CO_6000000 } +aCoTitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 128, height: 28, offset: 0x6000000, symbol: aCoTitleCardTex } aCoWaterfallDL: { type: GFX, offset: 0x6000E00, symbol: aCoWaterfallDL } diff --git a/assets/yaml/jp/rev0/ast_font_3d.yaml b/assets/yaml/jp/rev0/ast_font_3d.yaml index 56c601e3..b2a5ff4c 100644 --- a/assets/yaml/jp/rev0/ast_font_3d.yaml +++ b/assets/yaml/jp/rev0/ast_font_3d.yaml @@ -8,11 +8,11 @@ - '#include "gfx.h"' - '#include "sf64object.h"' -D_FONT3D_9000000: - { type: GFX, offset: 0x9000000, symbol: D_FONT3D_9000000 } +aFont3D_DOT: + { type: GFX, offset: 0x9000000, symbol: aFont3D_DOT } -D_FONT3D_90001F0: - { type: GFX, offset: 0x90001F0, symbol: D_FONT3D_90001F0 } +aFont3D_1: + { type: GFX, offset: 0x90001F0, symbol: aFont3D_1 } D_FONT3D_9000528: { type: TEXTURE, ctype: u8, format: CI4, width: 8, height: 8, offset: 0x09000528, symbol: D_FONT3D_9000528, tlut: 0x09000548 } @@ -20,109 +20,109 @@ D_FONT3D_9000528: D_FONT3D_9000548: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x09000548, symbol: D_FONT3D_9000548 } -D_FONT3D_9000570: - { type: GFX, offset: 0x9000570, symbol: D_FONT3D_9000570 } +aFont3D_O: + { type: GFX, offset: 0x9000570, symbol: aFont3D_O } -D_FONT3D_9000980: - { type: GFX, offset: 0x9000980, symbol: D_FONT3D_9000980 } +aFont3D_D: + { type: GFX, offset: 0x9000980, symbol: aFont3D_D } -D_FONT3D_9001120: - { type: GFX, offset: 0x9001120, symbol: D_FONT3D_9001120 } +aFont3D_J: + { type: GFX, offset: 0x9001120, symbol: aFont3D_J } -D_FONT3D_90014E0: - { type: GFX, offset: 0x90014E0, symbol: D_FONT3D_90014E0 } +aFont3D_P: + { type: GFX, offset: 0x90014E0, symbol: aFont3D_P } -D_FONT3D_9001A10: - { type: GFX, offset: 0x9001A10, symbol: D_FONT3D_9001A10 } +aFont3D_Z: + { type: GFX, offset: 0x9001A10, symbol: aFont3D_Z } -D_FONT3D_9001E90: - { type: GFX, offset: 0x9001E90, symbol: D_FONT3D_9001E90 } +aFont3D_Y: + { type: GFX, offset: 0x9001E90, symbol: aFont3D_Y } -D_FONT3D_90022A0: - { type: GFX, offset: 0x90022A0, symbol: D_FONT3D_90022A0 } +aFont3D_X: + { type: GFX, offset: 0x90022A0, symbol: aFont3D_X } -D_FONT3D_9002890: - { type: GFX, offset: 0x9002890, symbol: D_FONT3D_9002890 } +aFont3D_W: + { type: GFX, offset: 0x9002890, symbol: aFont3D_W } -D_FONT3D_9002EA0: - { type: GFX, offset: 0x9002EA0, symbol: D_FONT3D_9002EA0 } +aFont3D_V: + { type: GFX, offset: 0x9002EA0, symbol: aFont3D_V } -D_FONT3D_9003230: - { type: GFX, offset: 0x9003230, symbol: D_FONT3D_9003230 } +aFont3D_U: + { type: GFX, offset: 0x9003230, symbol: aFont3D_U } -D_FONT3D_9003620: - { type: GFX, offset: 0x9003620, symbol: D_FONT3D_9003620 } +aFont3D_T: + { type: GFX, offset: 0x9003620, symbol: aFont3D_T } -D_FONT3D_9003A30: - { type: GFX, offset: 0x9003A30, symbol: D_FONT3D_9003A30 } +aFont3D_S: + { type: GFX, offset: 0x9003A30, symbol: aFont3D_S } -D_FONT3D_9004230: - { type: GFX, offset: 0x9004230, symbol: D_FONT3D_9004230 } +aFont3D_R: + { type: GFX, offset: 0x9004230, symbol: aFont3D_R } -D_FONT3D_9004920: - { type: GFX, offset: 0x9004920, symbol: D_FONT3D_9004920 } +aFont3D_Q: + { type: GFX, offset: 0x9004920, symbol: aFont3D_Q } -D_FONT3D_9004E10: - { type: GFX, offset: 0x9004E10, symbol: D_FONT3D_9004E10 } +aFont3D_N: + { type: GFX, offset: 0x9004E10, symbol: aFont3D_N } -D_FONT3D_9005380: - { type: GFX, offset: 0x9005380, symbol: D_FONT3D_9005380 } +aFont3D_M: + { type: GFX, offset: 0x9005380, symbol: aFont3D_M } -D_FONT3D_9005980: - { type: GFX, offset: 0x9005980, symbol: D_FONT3D_9005980 } +aFont3D_L: + { type: GFX, offset: 0x9005980, symbol: aFont3D_L } -D_FONT3D_9005CA0: - { type: GFX, offset: 0x9005CA0, symbol: D_FONT3D_9005CA0 } +aFont3D_K: + { type: GFX, offset: 0x9005CA0, symbol: aFont3D_K } -D_FONT3D_90062D0: - { type: GFX, offset: 0x90062D0, symbol: D_FONT3D_90062D0 } +aFont3D_I: + { type: GFX, offset: 0x90062D0, symbol: aFont3D_I } -D_FONT3D_9006500: - { type: GFX, offset: 0x9006500, symbol: D_FONT3D_9006500 } +aFont3D_H: + { type: GFX, offset: 0x9006500, symbol: aFont3D_H } -D_FONT3D_9006AE0: - { type: GFX, offset: 0x9006AE0, symbol: D_FONT3D_9006AE0 } +aFont3D_G: + { type: GFX, offset: 0x9006AE0, symbol: aFont3D_G } -D_FONT3D_90070C0: - { type: GFX, offset: 0x90070C0, symbol: D_FONT3D_90070C0 } +aFont3D_F: + { type: GFX, offset: 0x90070C0, symbol: aFont3D_F } -D_FONT3D_90075A0: - { type: GFX, offset: 0x90075A0, symbol: D_FONT3D_90075A0 } +aFont3D_E: + { type: GFX, offset: 0x90075A0, symbol: aFont3D_E } -D_FONT3D_9007BB0: - { type: GFX, offset: 0x9007BB0, symbol: D_FONT3D_9007BB0 } +aFont3D_C: + { type: GFX, offset: 0x9007BB0, symbol: aFont3D_C } -D_FONT3D_9007FD0: - { type: GFX, offset: 0x9007FD0, symbol: D_FONT3D_9007FD0 } +aFont3D_B: + { type: GFX, offset: 0x9007FD0, symbol: aFont3D_B } -D_FONT3D_90086F0: - { type: GFX, offset: 0x90086F0, symbol: D_FONT3D_90086F0 } +aFont3D_A: + { type: GFX, offset: 0x90086F0, symbol: aFont3D_A } -D_FONT3D_9008C60: - { type: GFX, offset: 0x9008C60, symbol: D_FONT3D_9008C60 } +aFont3D_9: + { type: GFX, offset: 0x9008C60, symbol: aFont3D_9 } -D_FONT3D_9009280: - { type: GFX, offset: 0x9009280, symbol: D_FONT3D_9009280 } +aFont3D_8: + { type: GFX, offset: 0x9009280, symbol: aFont3D_8 } -D_FONT3D_9009990: - { type: GFX, offset: 0x9009990, symbol: D_FONT3D_9009990 } +aFont3D_7: + { type: GFX, offset: 0x9009990, symbol: aFont3D_7 } -D_FONT3D_9009CB0: - { type: GFX, offset: 0x9009CB0, symbol: D_FONT3D_9009CB0 } +aFont3D_6: + { type: GFX, offset: 0x9009CB0, symbol: aFont3D_6 } -D_FONT3D_900A290: - { type: GFX, offset: 0x900A290, symbol: D_FONT3D_900A290 } +aFont3D_5: + { type: GFX, offset: 0x900A290, symbol: aFont3D_5 } -D_FONT3D_900A870: - { type: GFX, offset: 0x900A870, symbol: D_FONT3D_900A870 } +aFont3D_4: + { type: GFX, offset: 0x900A870, symbol: aFont3D_4 } -D_FONT3D_900AF60: - { type: GFX, offset: 0x900AF60, symbol: D_FONT3D_900AF60 } +aFont3D_3: + { type: GFX, offset: 0x900AF60, symbol: aFont3D_3 } -D_FONT3D_900B580: - { type: GFX, offset: 0x900B580, symbol: D_FONT3D_900B580 } +aFont3D_2: + { type: GFX, offset: 0x900B580, symbol: aFont3D_2 } -D_FONT3D_900BB90: - { type: GFX, offset: 0x900BB90, symbol: D_FONT3D_900BB90 } +aFont3D_0: + { type: GFX, offset: 0x900BB90, symbol: aFont3D_0 } # size = 0xC1D0 diff --git a/assets/yaml/jp/rev0/ast_fortuna.yaml b/assets/yaml/jp/rev0/ast_fortuna.yaml index 23b03d8a..06b71044 100644 --- a/assets/yaml/jp/rev0/ast_fortuna.yaml +++ b/assets/yaml/jp/rev0/ast_fortuna.yaml @@ -14,8 +14,8 @@ # Fortuna # Former Defense Post -D_FO_6000000: - { type: TEXTURE, format: IA8, width: 168, height: 28, offset: 0x6000000, ctype: u8, symbol: D_FO_6000000 } +aFoTitleCardTex: + { type: TEXTURE, format: IA8, width: 168, height: 28, offset: 0x6000000, ctype: u8, symbol: aFoTitleCardTex } D_FO_6001260: { type: TEXTURE, format: IA8, width: 16, height: 16, offset: 0x6001260, ctype: u8, symbol: D_FO_6001260 } diff --git a/assets/yaml/jp/rev0/ast_katina.yaml b/assets/yaml/jp/rev0/ast_katina.yaml index 293c4a92..485e8816 100644 --- a/assets/yaml/jp/rev0/ast_katina.yaml +++ b/assets/yaml/jp/rev0/ast_katina.yaml @@ -14,8 +14,8 @@ # Katina # Frontline Base -D_KA_6000000: - { type: TEXTURE, format: IA8, width: 168, height: 28, offset: 0x6000000, ctype: u8, symbol: D_KA_6000000 } +aKaTitleCardTex: + { type: TEXTURE, format: IA8, width: 168, height: 28, offset: 0x6000000, ctype: u8, symbol: aKaTitleCardTex } D_KA_6001260: { type: TEXTURE, format: IA8, width: 8, height: 8, offset: 0x6001260, ctype: u8, symbol: D_KA_6001260 } diff --git a/assets/yaml/jp/rev0/ast_landmaster.yaml b/assets/yaml/jp/rev0/ast_landmaster.yaml index 42b43cf1..082bac8b 100644 --- a/assets/yaml/jp/rev0/ast_landmaster.yaml +++ b/assets/yaml/jp/rev0/ast_landmaster.yaml @@ -8,11 +8,11 @@ - '#include "gfx.h"' - '#include "sf64object.h"' -D_landmaster_3000000: - { type: TEXTURE, format: CI4, offset: 0x3000000, width: 16, height: 16, ctype: u8, tlut: 0x3000080, symbol: D_landmaster_3000000 } +aLandmasterLifeIconTex: + { type: TEXTURE, format: CI4, offset: 0x3000000, width: 16, height: 16, ctype: u8, tlut: 0x3000080, symbol: aLandmasterLifeIconTex } -D_landmaster_3000080: - { type: TEXTURE, format: TLUT, offset: 0x3000080, colors: 8, ctype: u16, symbol: D_landmaster_3000080 } +aLandmasterLifeIconTLUT: + { type: TEXTURE, format: TLUT, offset: 0x3000080, colors: 8, ctype: u16, symbol: aLandmasterLifeIconTLUT } aLandmasterModelDL: { type: GFX, offset: 0x3000090, symbol: aLandmasterModelDL } diff --git a/assets/yaml/jp/rev0/ast_macbeth.yaml b/assets/yaml/jp/rev0/ast_macbeth.yaml index f455462c..7f559a58 100644 --- a/assets/yaml/jp/rev0/ast_macbeth.yaml +++ b/assets/yaml/jp/rev0/ast_macbeth.yaml @@ -13,8 +13,8 @@ - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' -D_MA_6000000: - {type: TEXTURE, format: IA8, ctype: u8, width: 160, height: 28, offset: 0x6000000, symbol: D_MA_6000000} +aMaTitleCardTex: + {type: TEXTURE, format: IA8, ctype: u8, width: 160, height: 28, offset: 0x6000000, symbol: aMaTitleCardTex} D_MA_6001180: {type: GFX, offset: 0x6001180, symbol: D_MA_6001180} diff --git a/assets/yaml/jp/rev0/ast_map.yaml b/assets/yaml/jp/rev0/ast_map.yaml index 070fee15..c470e617 100644 --- a/assets/yaml/jp/rev0/ast_map.yaml +++ b/assets/yaml/jp/rev0/ast_map.yaml @@ -9,20 +9,20 @@ - '#include "sf64object.h"' # Restart Game (Game Over) -D_MAP_6000000: - { type: TEXTURE, format: IA8, offset: 0x6000000, width: 96, height: 22, ctype: u8, symbol: D_MAP_6000000 } +aMapRetryCourseGameOverTex: + { type: TEXTURE, format: IA8, offset: 0x6000000, width: 96, height: 22, ctype: u8, symbol: aMapRetryCourseGameOverTex } # Proceed to Next Course -D_MAP_6000840: - { type: TEXTURE, format: IA8, offset: 0x6000840, width: 96, height: 22, ctype: u8, symbol: D_MAP_6000840 } +aMapProceedNextCourseTex: + { type: TEXTURE, format: IA8, offset: 0x6000840, width: 96, height: 22, ctype: u8, symbol: aMapProceedNextCourseTex } # Retry Course (Lose 1 Arwing) -D_MAP_6001080: - { type: TEXTURE, format: IA8, offset: 0x6001080, width: 96, height: 22, ctype: u8, symbol: D_MAP_6001080 } +aMapRetryCourseLose1UPTex: + { type: TEXTURE, format: IA8, offset: 0x6001080, width: 96, height: 22, ctype: u8, symbol: aMapRetryCourseLose1UPTex } # Change Course -D_MAP_60018C0: - { type: TEXTURE, format: IA8, offset: 0x60018C0, width: 96, height: 10, ctype: u8, symbol: D_MAP_60018C0 } +aMapChangeCourseTex: + { type: TEXTURE, format: IA8, offset: 0x60018C0, width: 96, height: 10, ctype: u8, symbol: aMapChangeCourseTex } # Aquas Ocean D_MAP_6001C80: @@ -141,62 +141,62 @@ D_MAP_6016760: # Zones # Toxic Waste Area -D_MAP_6017640: +D_MAP_6017640: { type: TEXTURE, format: IA8, offset: 0x6017640, width: 112, height: 28, ctype: u8, symbol: D_MAP_6017640 } # Invasion Aftermath -D_MAP_6018280: +D_MAP_6018280: { type: TEXTURE, format: IA8, offset: 0x6018280, width: 184, height: 19, ctype: u8, symbol: D_MAP_6018280 } -D_MAP_6019030: - { type: TEXTURE, format: IA8, offset: 0x6019030, width: 8, height: 16, ctype: u8, symbol: D_MAP_6019030 } +aMapPrologueTextFadeTex: + { type: TEXTURE, format: IA8, offset: 0x6019030, width: 8, height: 16, ctype: u8, symbol: aMapPrologueTextFadeTex } # Clouds ? -D_MAP_60190B0: - { type: TEXTURE, format: IA8, offset: 0x60190B0, width: 96, height: 96, ctype: u8, symbol: D_MAP_60190B0 } +aMapVenomCloudTex: + { type: TEXTURE, format: IA8, offset: 0x60190B0, width: 96, height: 96, ctype: u8, symbol: aMapVenomCloudTex } -D_MAP_601B4B0: - { type: TEXTURE, format: IA8, offset: 0x601B4B0, width: 32, height: 32, ctype: u8, symbol: D_MAP_601B4B0 } +aMapOptionBgTex: + { type: TEXTURE, format: IA8, offset: 0x601B4B0, width: 32, height: 32, ctype: u8, symbol: aMapOptionBgTex } # Some text in japanese -D_MAP_601B8B0: +D_MAP_601B8B0: { type: TEXTURE, format: IA8, offset: 0x601B8B0, width: 80, height: 26, ctype: u8, symbol: D_MAP_1B8B0 } -D_MAP_601C0D0: - { type: GFX, offset: 0x601C0D0, symbol: D_MAP_601C0D0 } +aMapSectorXDL: + { type: GFX, offset: 0x601C0D0, symbol: aMapSectorXDL } D_MAP_601C160: { type: TEXTURE, format: RGBA16, offset: 0x0601C160, width: 32, height: 32, ctype: u16, symbol: D_MAP_601C160 } -D_MAP_601C960: - { type: GFX, offset: 0x601C960, symbol: D_MAP_601C960 } +aMapSectorYDL: + { type: GFX, offset: 0x601C960, symbol: aMapSectorYDL } D_MAP_601C9F0: { type: TEXTURE, format: RGBA16, offset: 0x0601C9F0, width: 32, height: 32, ctype: u16, symbol: D_MAP_601C9F0 } -D_MAP_601D1F0: - { type: GFX, offset: 0x601D1F0, symbol: D_MAP_601D1F0 } +aMapMedalDL: + { type: GFX, offset: 0x601D1F0, symbol: aMapMedalDL } -D_MAP_601D2F0: - { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x0601D2F0, symbol: D_MAP_601D2F0, tlut: 0x0601DAF0 } +aMapMedalTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x0601D2F0, symbol: aMapMedalTex, tlut: 0x0601DAF0 } D_MAP_601DAF0: { type: TEXTURE, ctype: u16, format: TLUT, colors: 144, offset: 0x0601DAF0, symbol: D_MAP_601DAF0 } -D_MAP_601DC10: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0601DC10, symbol: D_MAP_601DC10, tlut: 0x0601DC90 } +aMapArwingIconTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0601DC10, symbol: aMapArwingIconTex, tlut: 0x0601DC90 } -D_MAP_601DC90: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x0601DC90, symbol: D_MAP_601DC90 } +aMapArwingIconTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x0601DC90, symbol: aMapArwingIconTLUT } -D_MAP_601DCA0: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 7, offset: 0x0601DCA0, symbol: D_MAP_601DCA0, tlut: 0x0601DCD8 } +aMapXTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 7, offset: 0x0601DCA0, symbol: aMapXTex, tlut: 0x0601DCD8 } -D_MAP_601DCD8: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 5, offset: 0x0601DCD8, symbol: D_MAP_601DCD8 } +aMapXTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 5, offset: 0x0601DCD8, symbol: aMapXTLUT } -D_MAP_601DCF0: - { type: GFX, offset: 0x601DCF0, symbol: D_MAP_601DCF0 } +aMapCursorDL: + { type: GFX, offset: 0x601DCF0, symbol: aMapCursorDL } D_MAP_601DDE8: { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0601DDE8, symbol: D_MAP_601DDE8, tlut: 0x0601DE68 } @@ -204,8 +204,8 @@ D_MAP_601DDE8: D_MAP_601DE68: { type: TEXTURE, ctype: u16, format: TLUT, colors: 12, offset: 0x0601DE68, symbol: D_MAP_601DE68 } -D_MAP_601DE80: - { type: GFX, offset: 0x601DE80, symbol: D_MAP_601DE80 } +aMapArea6DL: + { type: GFX, offset: 0x601DE80, symbol: aMapArea6DL } D_MAP_601F2B0: { type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 32, offset: 0x0601F2B0, symbol: D_MAP_601F2B0, tlut: 0x0601F4B0 } @@ -219,8 +219,8 @@ D_MAP_601E8F8: D_MAP_601E978: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x0601E978, symbol: D_MAP_601E978 } -D_MAP_601E9A0: - { type: GFX, offset: 0x601E9A0, symbol: D_MAP_601E9A0 } +aMapArea6ShipDL: + { type: GFX, offset: 0x601E9A0, symbol: aMapArea6ShipDL } D_MAP_601F4D0: { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0601F4D0, symbol: D_MAP_601F4D0, tlut: 0x0601F550 } @@ -240,110 +240,110 @@ D_MAP_601F610: D_MAP_601F690: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x0601F690, symbol: D_MAP_601F690 } -D_MAP_601F6B0: - { type: GFX, offset: 0x601F6B0, symbol: D_MAP_601F6B0 } +aMapSectorZDL: + { type: GFX, offset: 0x601F6B0, symbol: aMapSectorZDL } D_MAP_601F740: { type: TEXTURE, format: RGBA16, offset: 0x0601F740, width: 32, height: 32, ctype: u16, symbol: D_MAP_601F740 } # Looks like Aquas -D_MAP_601FF40: - { type: TEXTURE, format: CI8, offset: 0x601FF40, width: 96, height: 96, ctype: u8, symbol: D_MAP_601FF40, tlut: 0x06022340 } +aMapAquasTex: + { type: TEXTURE, format: CI8, offset: 0x601FF40, width: 96, height: 96, ctype: u8, symbol: aMapAquasTex, tlut: 0x06022340 } -D_MAP_6022340: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 75, offset: 0x06022340, symbol: D_MAP_6022340 } +gMapAquasTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 80, offset: 0x06022340, symbol: gMapAquasTLUT } # Looks like Venom -D_MAP_60223E0: - { type: TEXTURE, format: CI8, offset: 0x60223E0, width: 96, height: 96, ctype: u8, symbol: D_MAP_60223E0, tlut: 0x060247E0 } +aMapVenomTex: + { type: TEXTURE, format: CI8, offset: 0x60223E0, width: 96, height: 96, ctype: u8, symbol: aMapVenomTex, tlut: 0x060247E0 } -D_MAP_60247E0: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 84, offset: 0x060247E0, symbol: D_MAP_60247E0 } +gMapVenomTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 88, offset: 0x060247E0, symbol: gMapVenomTLUT } # Looks like Corneria -D_MAP_6024890: - { type: TEXTURE, format: CI8, offset: 0x6024890, width: 96, height: 96, ctype: u8, symbol: D_MAP_6024890, tlut: 0x06026C90 } +aMapCorneriaTex: + { type: TEXTURE, format: CI8, offset: 0x6024890, width: 96, height: 96, ctype: u8, symbol: aMapCorneriaTex, tlut: 0x06026C90 } -D_MAP_6026C90: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 108, offset: 0x06026C90, symbol: D_MAP_6026C90 } +gMapCorneriaTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 112, offset: 0x06026C90, symbol: gMapCorneriaTLUT } # Looks like Zones -D_MAP_6026D70: - { type: TEXTURE, format: CI8, offset: 0x6026D70, width: 96, height: 96, ctype: u8, symbol: D_MAP_6026D70, tlut: 0x06029170 } +aMapFortunaTex: + { type: TEXTURE, format: CI8, offset: 0x6026D70, width: 96, height: 96, ctype: u8, symbol: aMapFortunaTex, tlut: 0x06029170 } -D_MAP_6029170: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 84, offset: 0x06029170, symbol: D_MAP_6029170 } +gMapFortunaTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 88, offset: 0x06029170, symbol: gMapFortunaTLUT } # Looks like Solar -D_MAP_6029220: - { type: TEXTURE, format: CI8, offset: 0x6029220, width: 96, height: 96, ctype: u8, symbol: D_MAP_6029220, tlut: 0x0602B620 } +aMapKatinaTex: + { type: TEXTURE, format: CI8, offset: 0x6029220, width: 96, height: 96, ctype: u8, symbol: aMapKatinaTex, tlut: 0x0602B620 } -D_MAP_602B620: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 84, offset: 0x0602B620, symbol: D_MAP_602B620 } +gMapKatinaTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 88, offset: 0x0602B620, symbol: gMapKatinaTLUT } # Looks like Macbeth -D_MAP_602B6D0: - { type: TEXTURE, format: CI8, offset: 0x602B6D0, width: 96, height: 96, ctype: u8, symbol: D_MAP_602B6D0, tlut: 0x0602DAD0 } +aMapMacbethTex: + { type: TEXTURE, format: CI8, offset: 0x602B6D0, width: 96, height: 96, ctype: u8, symbol: aMapMacbethTex, tlut: 0x0602DAD0 } -D_MAP_602DAD0: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 68, offset: 0x0602DAD0, symbol: D_MAP_602DAD0 } +gMapMacbethTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 72, offset: 0x0602DAD0, symbol: gMapMacbethTLUT } # Looks like Sector Z -D_MAP_602DB60: - { type: TEXTURE, format: CI8, offset: 0x602DB60, width: 96, height: 96, ctype: u8, symbol: D_MAP_602DB60, tlut: 0x0602FF60 } +aMapTitaniaTex: + { type: TEXTURE, format: CI8, offset: 0x602DB60, width: 96, height: 96, ctype: u8, symbol: aMapTitaniaTex, tlut: 0x0602FF60 } -D_MAP_602FF60: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 56, offset: 0x0602FF60, symbol: D_MAP_602FF60 } +gMapTitaniaTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 56, offset: 0x0602FF60, symbol: gMapTitaniaTLUT } -D_MAP_602FFD0: - { type: TEXTURE, format: CI8, offset: 0x602FFD0, width: 96, height: 96, ctype: u8, symbol: D_MAP_602FFD0, tlut: 0x060323D0 } +aMapZonessTex: + { type: TEXTURE, format: CI8, offset: 0x602FFD0, width: 96, height: 96, ctype: u8, symbol: aMapZonessTex, tlut: 0x060323D0 } -D_MAP_60323D0: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 52, offset: 0x060323D0, symbol: D_MAP_60323D0 } +gMapZonessTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 56, offset: 0x060323D0, symbol: gMapZonessTLUT } # Portrait of Falco -D_MAP_6032440: - { type: TEXTURE, format: RGBA16, offset: 0x06032440, width: 28, height: 28, ctype: u16, symbol: D_MAP_6032440 } +aMapRadioCharFalcoTex: + { type: TEXTURE, format: RGBA16, offset: 0x06032440, width: 28, height: 28, ctype: u16, symbol: aMapRadioCharFalcoTex } # Portrait of Peppy -D_MAP_6032A60: - { type: TEXTURE, format: RGBA16, offset: 0x06032A60, width: 28, height: 28, ctype: u16, symbol: D_MAP_6032A60 } +aMapRadioCharPeppyTex: + { type: TEXTURE, format: RGBA16, offset: 0x06032A60, width: 28, height: 28, ctype: u16, symbol: aMapRadioCharPeppyTex } # Picture of Peppy, James and Pigma used in the narrated intro. -D_MAP_6033080: - { type: TEXTURE, format: RGBA16, offset: 0x06033080, width: 96, height: 52, ctype: u16, symbol: D_MAP_6033080 } +aMapPrologue3Tex: + { type: TEXTURE, format: RGBA16, offset: 0x06033080, width: 96, height: 52, ctype: u16, symbol: aMapPrologue3Tex } # Picture of Andross, General Pepper and Venom in the background, used in the narrated intro. -D_MAP_6035780: - { type: TEXTURE, format: RGBA16, offset: 0x06035780, width: 96, height: 52, ctype: u16, symbol: D_MAP_6035780 } +aMapPrologue2Tex: + { type: TEXTURE, format: RGBA16, offset: 0x06035780, width: 96, height: 52, ctype: u16, symbol: aMapPrologue2Tex } # Picture of Andross, hands open, Corneria in the middle, used in the narrated intro. -D_MAP_6037E80: - { type: TEXTURE, format: RGBA16, offset: 0x06037E80, width: 96, height: 52, ctype: u16, symbol: D_MAP_6037E80 } +aMapPrologue6Tex: + { type: TEXTURE, format: RGBA16, offset: 0x06037E80, width: 96, height: 52, ctype: u16, symbol: aMapPrologue6Tex } # Picture of an Arwing dodging attacks from enemies, used in the narrated intro. -D_MAP_603A580: - { type: TEXTURE, format: RGBA16, offset: 0x0603A580, width: 96, height: 52, ctype: u16, symbol: D_MAP_603A580 } +aMapPrologue4Tex: + { type: TEXTURE, format: RGBA16, offset: 0x0603A580, width: 96, height: 52, ctype: u16, symbol: aMapPrologue4Tex } # Picture of Slippy, Peppy, Fox and Falco, used in the narrated intro. -D_MAP_603CC80: - { type: TEXTURE, format: RGBA16, offset: 0x0603CC80, width: 96, height: 52, ctype: u16, symbol: D_MAP_603CC80 } +aMapPrologue7Tex: + { type: TEXTURE, format: RGBA16, offset: 0x0603CC80, width: 96, height: 52, ctype: u16, symbol: aMapPrologue7Tex } # Picture of Peppy returning from Vemon, used in the narrated intro. -D_MAP_603F380: - { type: TEXTURE, format: RGBA16, offset: 0x0603F380, width: 96, height: 52, ctype: u16, symbol: D_MAP_603F380 } +aMapPrologue5Tex: + { type: TEXTURE, format: RGBA16, offset: 0x0603F380, width: 96, height: 52, ctype: u16, symbol: aMapPrologue5Tex } # Picture of Corneria, used in the narrated intro. -D_MAP_6041A80: - { type: TEXTURE, format: RGBA16, offset: 0x06041A80, width: 96, height: 52, ctype: u16, symbol: D_MAP_6041A80 } +aMapPrologue1Tex: + { type: TEXTURE, format: RGBA16, offset: 0x06041A80, width: 96, height: 52, ctype: u16, symbol: aMapPrologue1Tex } # Portrait of Slippy -D_MAP_6044180: - { type: TEXTURE, format: RGBA16, offset: 0x06044180, width: 28, height: 28, ctype: u16, symbol: D_MAP_6044180 } +aMapRadioCharSlippyTex: + { type: TEXTURE, format: RGBA16, offset: 0x06044180, width: 28, height: 28, ctype: u16, symbol: aMapRadioCharSlippyTex } # White Square ? -D_MAP_60447A0: - { type: TEXTURE, format: RGBA16, offset: 0x060447A0, width: 8, height: 8, ctype: u16, symbol: D_MAP_60447A0 } +aMapWhiteSquareTex: + { type: TEXTURE, format: RGBA16, offset: 0x060447A0, width: 8, height: 8, ctype: u16, symbol: aMapWhiteSquareTex } # Picture of Fox receiving orders from General Pepper, used in the map (briefing) D_MAP_6044820: @@ -354,26 +354,29 @@ D_MAP_6046CD0: { type: TEXTURE, format: RGBA16, offset: 0x06046CD0, width: 32, height: 34, ctype: u16, symbol: D_MAP_6046CD0 } # Black Square with borders. -D_MAP_6047550: - { type: TEXTURE, format: RGBA16, offset: 0x06047550, width: 24, height: 24, ctype: u16, symbol: D_MAP_6047550 } +aMapPathBoxTex: + { type: TEXTURE, format: RGBA16, offset: 0x06047550, width: 24, height: 24, ctype: u16, symbol: aMapPathBoxTex } -D_MAP_60479D0: - { type: GFX, offset: 0x60479D0, symbol: D_MAP_60479D0 } +aMapPlanetExplosionDL: + { type: GFX, offset: 0x60479D0, symbol: aMapPlanetExplosionDL } D_MAP_6047A68: { type: TEXTURE, format: IA8, offset: 0x06047A68, width: 32, height: 32, ctype: u8, symbol: D_MAP_6047A68 } -D_MAP_6047E70: - { type: GFX, offset: 0x6047E70, symbol: D_MAP_6047E70 } +aMapVenomCloudDL: + { type: GFX, offset: 0x6047E70, symbol: aMapVenomCloudDL } -D_MAP_6047F80: - { type: TEXTURE, format: IA8, offset: 0x06047F80, width: 64, height: 64, ctype: u8, symbol: D_MAP_6047F80 } +aMapVenomCloud1Tex: + { type: TEXTURE, format: IA8, offset: 0x06047F80, width: 64, height: 32, ctype: u8, symbol: aMapVenomCloud1Tex } + +aMapVenomCloud2Tex: + { type: TEXTURE, format: IA8, offset: 0x06048780, width: 64, height: 32, ctype: u8, symbol: aMapVenomCloud2Tex } D_MAP_6048F80: { type: TEXTURE, format: IA8, offset: 0x06048F80, width: 64, height: 64, ctype: u8, symbol: D_MAP_6048F80 } - -D_MAP_6049F80: - { type: GFX, offset: 0x6049F80, symbol: D_MAP_6049F80 } + +aMapExplosion4DL: + { type: GFX, offset: 0x6049F80, symbol: aMapExplosion4DL } D_MAP_604A048: { type: TEXTURE, format: CI8, offset: 0x0604A048, width: 16, height: 16, ctype: u8, symbol: D_MAP_604A048, tlut: 0x0602FF60 } @@ -381,8 +384,8 @@ D_MAP_604A048: D_MAP_604A148: { type: TEXTURE, ctype: u16, format: TLUT, colors: 32, offset: 0x0604A148, symbol: D_MAP_604A148 } -D_MAP_604A190: - { type: GFX, offset: 0x604A190, symbol: D_MAP_604A190 } +aMapExplosion3DL: + { type: GFX, offset: 0x604A190, symbol: aMapExplosion3DL } D_MAP_604A258: { type: TEXTURE, format: CI8, offset: 0x0604A258, width: 16, height: 16, ctype: u8, symbol: D_MAP_604A258, tlut: 0x0604A358 } @@ -390,8 +393,8 @@ D_MAP_604A258: D_MAP_604A358: { type: TEXTURE, ctype: u16, format: TLUT, colors: 80, offset: 0x0604A358, symbol: D_MAP_604A358 } -D_MAP_604A400: - { type: GFX, offset: 0x604A400, symbol: D_MAP_604A400 } +aMapExplosion2DL: + { type: GFX, offset: 0x604A400, symbol: aMapExplosion2DL } D_MAP_604A4C8: { type: TEXTURE, format: CI8, offset: 0x0604A4C8, width: 16, height: 16, ctype: u8, symbol: D_MAP_604A4C8, tlut: 0x0604A5C8 } @@ -399,8 +402,8 @@ D_MAP_604A4C8: D_MAP_604A5C8: { type: TEXTURE, ctype: u16, format: TLUT, colors: 160, offset: 0x0604A5C8, symbol: D_MAP_604A5C8 } -D_MAP_604A710: - { type: GFX, offset: 0x604A710, symbol: D_MAP_604A710 } +aMapExplosion1DL: + { type: GFX, offset: 0x604A710, symbol: aMapExplosion1DL } D_MAP_604A7D8: { type: TEXTURE, format: CI8, offset: 0x0604A7D8, width: 16, height: 16, ctype: u8, symbol: D_MAP_604A7D8, tlut: 0x0604A8D8 } @@ -418,7 +421,7 @@ ast_map_seg6_vtx_4AD50: D_MAP_604B510: { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0604B510, symbol: D_MAP_604B510, tlut: 0x0604B590 } -D_MAP_604B590: +D_MAP_604B590: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x0604B590, symbol: D_MAP_604B590 } D_MAP_604B5B0: @@ -431,48 +434,48 @@ D_MAP_604B650: { type: TEXTURE, format: RGBA16, offset: 0x0604B650, width: 8, height: 16, ctype: u16, symbol: D_MAP_604B650 } # Model of Bolse -D_MAP_604B750: - { type: GFX, offset: 0x604B750, symbol: D_MAP_604B750 } +aMapBolseDL: + { type: GFX, offset: 0x604B750, symbol: aMapBolseDL } D_MAP_604BC48: { type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 32, offset: 0x0604BC48, symbol: D_MAP_604BC48, tlut: 0x0604BC48 } -D_MAP_604BE48: +D_MAP_604BE48: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x0604BE48, symbol: D_MAP_604BE48 } D_MAP_604BE68: { type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 32, offset: 0x0604BE68, symbol: D_MAP_604BE68, tlut: 0x0604C068 } -D_MAP_604C068: +D_MAP_604C068: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x0604C068, symbol: D_MAP_604C068 } D_MAP_604C088: { type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 32, offset: 0x0604C088, symbol: D_MAP_604C088, tlut: 0x0604C288 } -D_MAP_604C288: +D_MAP_604C288: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x0604C288, symbol: D_MAP_604C288 } D_MAP_604C2A8: { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0604C2A8, symbol: D_MAP_604C2A8, tlut: 0x0604C328 } -D_MAP_604C328: +D_MAP_604C328: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x0604C328, symbol: D_MAP_604C328 } # Television outcoming light Model, used during briefing. -D_MAP_604C350: - { type: GFX, offset: 0x604C350, symbol: D_MAP_604C350 } +aMapTvScreenGlowDL: + { type: GFX, offset: 0x604C350, symbol: aMapTvScreenGlowDL } -D_MAP_604C4C0: - { type: TEXTURE, format: IA8, offset: 0x0604C4C0, width: 8, height: 16, ctype: u8, symbol: D_MAP_604C4C0 } +aMapTvScreenGlowTex: + { type: TEXTURE, format: IA8, offset: 0x0604C4C0, width: 8, height: 16, ctype: u8, symbol: aMapTvScreenGlowTex } -D_MAP_604C540: - { type: GFX, offset: 0x604C540, symbol: D_MAP_604C540 } +aMapTitaniaRings1DL: + { type: GFX, offset: 0x604C540, symbol: aMapTitaniaRings1DL } D_MAP_604C5D8: { type: TEXTURE, format: IA8, offset: 0x0604C5D8, width: 32, height: 64, ctype: u8, symbol: D_MAP_604C5D8 } -D_MAP_604CDE0: - { type: GFX, offset: 0x604CDE0, symbol: D_MAP_604CDE0 } +aMapTitaniaRings2DL: + { type: GFX, offset: 0x604CDE0, symbol: aMapTitaniaRings2DL } D_MAP_604CE78: { type: TEXTURE, format: IA8, offset: 0x0604CE78, width: 32, height: 64, ctype: u8, symbol: D_MAP_604CE78 } @@ -484,8 +487,8 @@ D_MAP_604D708: { type: TEXTURE, format: IA8, offset: 0x0604D708, width: 32, height: 32, ctype: u8, symbol: D_MAP_604D708 } # Solar Rays -D_MAP_604DB10: - { type: GFX, offset: 0x604DB10, symbol: D_MAP_604DB10 } +aMapSolarDL: + { type: GFX, offset: 0x604DB10, symbol: aMapSolarDL } D_MAP_604DD20: { type: TEXTURE, format: IA8, offset: 0x0604DD20, width: 128, height: 32, ctype: u8, symbol: D_MAP_604DD20 } @@ -499,8 +502,8 @@ D_MAP_604FD20: D_MAP_6050D20: { type: TEXTURE, format: IA8, offset: 0x06050D20, width: 128, height: 32, ctype: u8, symbol: D_MAP_6050D20 } -D_MAP_6051D20: - { type: GFX, offset: 0x6051D20, symbol: D_MAP_6051D20 } +aMapGralPepperFace2DL: + { type: GFX, offset: 0x6051D20, symbol: aMapGralPepperFace2DL } D_MAP_6051F20: { type: TEXTURE, format: RGBA16, offset: 0x06051F20, width: 64, height: 32, ctype: u16, symbol: D_MAP_6051F20 } @@ -514,8 +517,8 @@ D_MAP_6053F20: D_MAP_6054F20: { type: TEXTURE, format: RGBA16, offset: 0x06054F20, width: 64, height: 32, ctype: u16, symbol: D_MAP_6054F20 } -D_MAP_6055F20: - { type: GFX, offset: 0x6055F20, symbol: D_MAP_6055F20 } +aMapGralPepperFace1DL: + { type: GFX, offset: 0x6055F20, symbol: aMapGralPepperFace1DL } D_MAP_6056120: { type: TEXTURE, format: RGBA16, offset: 0x06056120, width: 64, height: 32, ctype: u16, symbol: D_MAP_6056120 } @@ -565,8 +568,8 @@ D_MAP_605F610: D_MAP_605FE10: { type: TEXTURE, format: IA8, offset: 0x0605FE10, width: 64, height: 32, ctype: u8, symbol: D_MAP_605FE10 } -D_MAP_6060610: - { type: GFX, offset: 0x6060610, symbol: D_MAP_6060610 } +aMapMeteorDL: + { type: GFX, offset: 0x6060610, symbol: aMapMeteorDL } D_MAP_6060698: { type: TEXTURE, format: RGBA16, offset: 0x06060698, width: 32, height: 32, ctype: u16, symbol: D_MAP_6060698 } diff --git a/assets/yaml/jp/rev0/ast_meteo.yaml b/assets/yaml/jp/rev0/ast_meteo.yaml index d06d59ca..c214e7f7 100644 --- a/assets/yaml/jp/rev0/ast_meteo.yaml +++ b/assets/yaml/jp/rev0/ast_meteo.yaml @@ -14,8 +14,8 @@ - '#include "sf64mesg.h"' # Meteo # Asteroid Field -D_ME_6000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 28, offset: 0x6000000, symbol: D_ME_6000000 } +aMeTitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 28, offset: 0x6000000, symbol: aMeTitleCardTex } D_ME_6000A80: { type: GFX, offset: 0x6000A80, symbol: D_ME_6000A80 } diff --git a/assets/yaml/jp/rev0/ast_option.yaml b/assets/yaml/jp/rev0/ast_option.yaml index cb92e731..4b258326 100644 --- a/assets/yaml/jp/rev0/ast_option.yaml +++ b/assets/yaml/jp/rev0/ast_option.yaml @@ -30,82 +30,82 @@ D_OPT_80038C0: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x80038C0, symbol: D_OPT_80038C0 } # nd -D_OPT_80038E0: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 10, offset: 0x80038E0, symbol: D_OPT_80038E0, tlut: 0x8003930 } +aNdTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 10, offset: 0x80038E0, symbol: aNdTex, tlut: 0x8003930 } -D_OPT_8003930: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x8003930, symbol: D_OPT_8003930 } +aNdTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x8003930, symbol: aNdTLUT } # rd -D_OPT_8003950: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 11, offset: 0x8003950, symbol: D_OPT_8003950, tlut: 0x80039A8 } +aRdTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 11, offset: 0x8003950, symbol: aRdTex, tlut: 0x80039A8 } -D_OPT_80039A8: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x80039A8, symbol: D_OPT_80039A8 } +aRdTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x80039A8, symbol: aRdTLUT } # -D_OPT_80039D0: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x80039D0 , symbol: D_OPT_80039D0, tlut: 0x8003A50 } +aSpeakerCenterTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x80039D0 , symbol: aSpeakerCenterTex, tlut: 0x8003A50 } -D_OPT_8003A50: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x8003A50, symbol: D_OPT_8003A50 } +aSpeakerCenterTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x8003A50, symbol: aSpeakerCenterTLUT } # st -D_OPT_8003A70: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 9, offset: 0x8003A70, symbol: D_OPT_8003A70, tlut: 0x8003AB8 } +aStTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 9, offset: 0x8003A70, symbol: aStTex, tlut: 0x8003AB8 } -D_OPT_8003AB8: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x8003AB8, symbol: D_OPT_8003AB8 } +aStTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x8003AB8, symbol: aStTLUT } # th -D_OPT_8003AE0: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 9, offset: 0x8003AE0, symbol: D_OPT_8003AE0, tlut: 0x8003B28 } +aThTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 9, offset: 0x8003AE0, symbol: aThTex, tlut: 0x8003B28 } -D_OPT_8003B28: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x8003B28, symbol: D_OPT_8003B28 } +aThTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x8003B28, symbol: aThTLUT } # Option Title Cards # Main Game -D_OPT_8003B50: - { type: TEXTURE, ctype: u8, format: IA8, width: 72, height: 12, offset: 0x8003B50, symbol: D_OPT_8003B50 } +aMainGameCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 72, height: 12, offset: 0x8003B50, symbol: aMainGameCardTex } # Training -D_OPT_8003EB0: - { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 12, offset: 0x8003EB0, symbol: D_OPT_8003EB0 } +aTrainingCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 12, offset: 0x8003EB0, symbol: aTrainingCardTex } # Vs. -D_OPT_8004270: - { type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 10, offset: 0x8004270, symbol: D_OPT_8004270 } +aVsCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 10, offset: 0x8004270, symbol: aVsCardTex } # Ranking -D_OPT_80043B0: - { type: TEXTURE, ctype: u8, format: IA8, width: 64, height: 12, offset: 0x80043B0, symbol: D_OPT_80043B0 } +aRankingCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 64, height: 12, offset: 0x80043B0, symbol: aRankingCardTex } # Sound -D_OPT_80046B0: - { type: TEXTURE, ctype: u8, format: IA8, width: 64, height: 10, offset: 0x80046B0, symbol: D_OPT_80046B0 } +aSoundCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 64, height: 10, offset: 0x80046B0, symbol: aSoundCardTex } # Data -D_OPT_8004930: - { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 10, offset: 0x8004930, symbol: D_OPT_8004930 } +aDataCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 10, offset: 0x8004930, symbol: aDataCardTex } -D_OPT_8004C50: - { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 12, offset: 0x8004C50, symbol: D_OPT_8004C50 } +aExpertCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 12, offset: 0x8004C50, symbol: aExpertCardTex } # Option VS Cards # Point Match -D_OPT_8005010: - { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 13, offset: 0x8005010, symbol: D_OPT_8005010 } +aVsPointMatchCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 13, offset: 0x8005010, symbol: aVsPointMatchCardTex } # Battle Royal -D_OPT_80054F0: - { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 11, offset: 0x80054F0, symbol: D_OPT_80054F0 } +aVsBattleRoyalCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 11, offset: 0x80054F0, symbol: aVsBattleRoyalCardTex } # Time Trial -D_OPT_8005910: - { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 10, offset: 0x8005910, symbol: D_OPT_8005910 } +aVsTimeTrialCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 10, offset: 0x8005910, symbol: aVsTimeTrialCardTex } # Sound Options @@ -130,8 +130,8 @@ D_OPT_8006D10: { type: TEXTURE, ctype: u8, format: IA8, width: 24, height: 13, offset: 0x8006D10, symbol: D_OPT_8006D10 } # B to cancel -D_OPT_8006E50: - { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 10, offset: 0x8006E50, symbol: D_OPT_8006E50 } +aBtoCancelTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 10, offset: 0x8006E50, symbol: aBtoCancelTex } # Headphone D_OPT_8007210: @@ -146,8 +146,8 @@ D_OPT_80079F0: { type: TEXTURE, ctype: u8, format: IA8, width: 128, height: 14, offset: 0x80079F0, symbol: D_OPT_80079F0 } # A to confirm -D_OPT_80080F0: - { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 10, offset: 0x80080F0, symbol: D_OPT_80080F0 } +aAtoConfirmTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 10, offset: 0x80080F0, symbol: aAtoConfirmTex } # Clear Saved Data D_OPT_80084B0: @@ -193,27 +193,27 @@ D_OPT_800D1F0: D_OPT_800E0F0: { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x800E0F0, symbol: D_OPT_800E0F0 } -D_OPT_800E130: - { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x800E130, symbol: D_OPT_800E130 } +aArrowTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x800E130, symbol: aArrowTex } # Mercenary Unit STARFOX Fox Mccloud D_OPT_800E170: { type: TEXTURE, ctype: u16, format: RGBA16, width: 188, height: 60, offset: 0x800E170, symbol: D_OPT_800E170 } # ScrollBar -D_OPT_8013990: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 104, height: 10, offset: 0x8013990, symbol: D_OPT_8013990 } +aSliderFrameTex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 104, height: 10, offset: 0x8013990, symbol: aSliderFrameTex } # ScrollBar Indicator -D_OPT_80141B0: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x80141B0, symbol: D_OPT_80141B0 } +aSliderTex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x80141B0, symbol: aSliderTex } # Speaker -D_OPT_80143B0: - { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x80143B0, symbol: D_OPT_80143B0, tlut: 0x80147B0 } +aSpeakerTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x80143B0, symbol: aSpeakerTex, tlut: 0x80147B0 } -D_OPT_80147B0: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 32, offset: 0x80147B0, symbol: D_OPT_80147B0 } +aSpeakerTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 32, offset: 0x80147B0, symbol: aSpeakerTLUT } D_OPT_80147F0: { type: GFX, offset: 0x80147F0, symbol: D_OPT_80147F0 } @@ -242,8 +242,8 @@ D_OPT_8015550: D_OPT_80155E8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x080155E8, symbol: D_OPT_80155E8 } -D_OPT_8015DF0: - { type: GFX, offset: 0x8015DF0, symbol: D_OPT_8015DF0 } +aLightningDL: + { type: GFX, offset: 0x8015DF0, symbol: aLightningDL } -D_OPT_8015E88: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x08015E88, symbol: D_OPT_8015E88 } +aLightningTex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x08015E88, symbol: aLightningTex } diff --git a/assets/yaml/jp/rev0/ast_sector_x.yaml b/assets/yaml/jp/rev0/ast_sector_x.yaml index 88bf0b54..6d305b16 100644 --- a/assets/yaml/jp/rev0/ast_sector_x.yaml +++ b/assets/yaml/jp/rev0/ast_sector_x.yaml @@ -13,8 +13,8 @@ - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' -D_SX_6000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 12, offset: 0x6000000, symbol: D_SX_6000000 } +aSxTitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 12, offset: 0x6000000, symbol: aSxTitleCardTex } aSxSpaceMineDL: { type: GFX, offset: 0x6000840, symbol: aSxSpaceMineDL } diff --git a/assets/yaml/jp/rev0/ast_sector_y.yaml b/assets/yaml/jp/rev0/ast_sector_y.yaml index 097b11cb..87240ab0 100644 --- a/assets/yaml/jp/rev0/ast_sector_y.yaml +++ b/assets/yaml/jp/rev0/ast_sector_y.yaml @@ -15,8 +15,8 @@ - '#include "sf64mesg.h"' # Sector Y: Combat Zone -D_SY_6000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 12, offset: 0x6000000, symbol: D_SY_6000000 } +aSyTitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 12, offset: 0x6000000, symbol: aSyTitleCardTex } # Saruzin flagship icon in radar D_SY_6000840: diff --git a/assets/yaml/jp/rev0/ast_sector_z.yaml b/assets/yaml/jp/rev0/ast_sector_z.yaml index 12c21624..bac95644 100644 --- a/assets/yaml/jp/rev0/ast_sector_z.yaml +++ b/assets/yaml/jp/rev0/ast_sector_z.yaml @@ -14,8 +14,8 @@ - '#include "sf64mesg.h"' # Sector Z: Combat Zone -D_SZ_6000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 12, offset: 0x6000000, symbol: D_SZ_6000000 } +aSzTitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 12, offset: 0x6000000, symbol: aSzTitleCardTex } # One of the so called "Boss titles", unused in the game. A version of the same thing # seems to have been implemented in the 3DS version. @@ -94,8 +94,8 @@ D_SZ_6004458: D_SZ_6004558: { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x06004558, symbol: D_SZ_6004558 } -D_SZ_6004570: - { type: GFX, offset: 0x6004570, symbol: D_SZ_6004570 } +aSzMissileRadarMarkDL: + { type: GFX, offset: 0x6004570, symbol: aSzMissileRadarMarkDL } aSzSpaceJunk4DL: { type: GFX, offset: 0x60045E0, symbol: aSzSpaceJunk4DL } diff --git a/assets/yaml/jp/rev0/ast_solar.yaml b/assets/yaml/jp/rev0/ast_solar.yaml index 88b2b591..6af8cf4e 100644 --- a/assets/yaml/jp/rev0/ast_solar.yaml +++ b/assets/yaml/jp/rev0/ast_solar.yaml @@ -13,8 +13,8 @@ - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' -D_SO_6000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 112, height: 13, offset: 0x6000000, symbol: D_SO_6000000} +aSoTitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 112, height: 13, offset: 0x6000000, symbol: aSoTitleCardTex} D_SO_60005B0: { type: GFX, offset: 0x60005B0, symbol: D_SO_60005B0} diff --git a/assets/yaml/jp/rev0/ast_text.yaml b/assets/yaml/jp/rev0/ast_text.yaml index 5177eab1..68af92c8 100644 --- a/assets/yaml/jp/rev0/ast_text.yaml +++ b/assets/yaml/jp/rev0/ast_text.yaml @@ -53,8 +53,8 @@ aTextMissionNo: { type: TEXTURE, ctype: u8, format: IA8, width: 112, height: 19, offset: 0x5000500, symbol: aTextMissionNo } # Training -aTextTraining: - { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 12, offset: 0x5000D50, symbol: aTextTraining } +aTrTitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 12, offset: 0x5000D50, symbol: aTrTitleCardTex } # Enemies Down aTextEnemiesDown: diff --git a/assets/yaml/jp/rev0/ast_titania.yaml b/assets/yaml/jp/rev0/ast_titania.yaml index b4bf560a..41849551 100644 --- a/assets/yaml/jp/rev0/ast_titania.yaml +++ b/assets/yaml/jp/rev0/ast_titania.yaml @@ -13,8 +13,8 @@ - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' -D_TI_6000000: - {type: TEXTURE, format: IA8, ctype: u8, width: 96, height: 28, offset: 0x6000000, symbol: D_TI_6000000} +aTiTitleCardTex: + {type: TEXTURE, format: IA8, ctype: u8, width: 96, height: 28, offset: 0x6000000, symbol: aTiTitleCardTex} D_TI_6000A80: {type: GFX, offset: 0x6000A80, symbol: D_TI_6000A80} diff --git a/assets/yaml/jp/rev0/ast_title.yaml b/assets/yaml/jp/rev0/ast_title.yaml index 34b389fa..772a8c77 100644 --- a/assets/yaml/jp/rev0/ast_title.yaml +++ b/assets/yaml/jp/rev0/ast_title.yaml @@ -8,75 +8,75 @@ - '#include "gfx.h"' - '#include "sf64object.h"' -starfox_logo: { type: TEXTURE, ctype: u16, format: RGBA16, width: 236, height: 60, offset: 0x6000000, symbol: gTitleStarfoxLogo } +aTitleStarfoxLogoTex: { type: TEXTURE, ctype: u16, format: RGBA16, width: 236, height: 60, offset: 0x6000000, symbol: aTitleStarfoxLogoTex } -nintendo64_logo: { type: TEXTURE, ctype: u16, format: RGBA16, width: 128, height: 88, offset: 0x6006EA0, symbol: gTitleNintendo64Logo } +aTitleN64LogoTex: { type: TEXTURE, ctype: u16, format: RGBA16, width: 128, height: 88, offset: 0x6006EA0, symbol: aTitleN64LogoTex } -radio_static: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x600C6A0, symbol: gTitleRadioStatic } +gTitleRadioStatic: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x600C6A0, symbol: gTitleRadioStatic } -sun_beam: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x600D5C0, symbol: gTitleSunBeam } +aTitleSunGlareTex: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x600D5C0, symbol: aTitleSunGlareTex } -nintendo_copyright: { type: TEXTURE, ctype: u8, format: IA8, width: 120, height: 12, offset: 0x600DDC0, symbol: gTitleNintendoCopyright } +a1997NintendoTex: { type: TEXTURE, ctype: u8, format: IA8, width: 120, height: 12, offset: 0x600DDC0, symbol: a1997NintendoTex } -press_start: { type: TEXTURE, ctype: u8, format: IA8, width: 120, height: 13, offset: 0x600E360, symbol: gTitlePressStart } +aTitlePressStartTex: { type: TEXTURE, ctype: u8, format: IA8, width: 120, height: 13, offset: 0x600E360, symbol: aTitlePressStartTex } -great_fox_card: { type: TEXTURE, ctype: u8, format: IA8, width: 144, height: 28, offset: 0x600E980, symbol: gTitleGreatFoxCard } +aTitleGreatFoxCardTex: { type: TEXTURE, ctype: u8, format: IA8, width: 144, height: 28, offset: 0x600E980, symbol: aTitleGreatFoxCardTex } -slippy_card: { type: TEXTURE, ctype: u8, format: IA8, width: 144, height: 13, offset: 0x600F940, symbol: gTitleSlippyCard } +gTitleSlippyCard: { type: TEXTURE, ctype: u8, format: IA8, width: 144, height: 13, offset: 0x600F940, symbol: gTitleSlippyCard } -peppy_card: { type: TEXTURE, ctype: u8, format: IA8, width: 120, height: 13, offset: 0x6010090, symbol: gTitlePeppyCard } +gTitlePeppyCard: { type: TEXTURE, ctype: u8, format: IA8, width: 120, height: 13, offset: 0x6010090, symbol: gTitlePeppyCard } -falco_card: { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 13, offset: 0x60106B0, symbol: gTitleFalcoCard } +gTitleFalcoCard: { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 13, offset: 0x60106B0, symbol: gTitleFalcoCard } -fox_card: { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 13, offset: 0x6010FA0, symbol: gTitleFoxCard } +gTitleFoxCard: { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 13, offset: 0x6010FA0, symbol: gTitleFoxCard } -arwing_card: { type: TEXTURE, ctype: u8, format: IA8, width: 112, height: 26, offset: 0x6011890, symbol: gTitleArwingCard } +aTitleArwingCardTex: { type: TEXTURE, ctype: u8, format: IA8, width: 112, height: 26, offset: 0x6011890, symbol: aTitleArwingCardTex } -no_controller: { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 24, offset: 0x60123F0, symbol: gTitleNoController } +aTitleNoControllerTex: { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 24, offset: 0x60123F0, symbol: aTitleNoControllerTex } -copyright_symbol: { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x6013470, symbol: gTitleCopyrightSymbol } +aTitleCopyrightTex: { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x6013470, symbol: aTitleCopyrightTex } -unused_nintendo_copyright: { type: TEXTURE, ctype: u8, format: IA8, width: 168, height: 18, offset: 0x6013570, symbol: gTitleUnusedNintendoCopyright } +gTitleUnusedNintendoCopyright: { type: TEXTURE, ctype: u8, format: IA8, width: 168, height: 18, offset: 0x6013570, symbol: gTitleUnusedNintendoCopyright } -starfox_text_intro: { type: TEXTURE, ctype: u8, format: CI4, width: 256, height: 13, offset: 0x6014140, tlut: 0x60147C0, symbol: gTextIntroStarfox } +aIntroStarfoxLogoTex: { type: TEXTURE, ctype: u8, format: CI4, width: 256, height: 13, offset: 0x6014140, tlut: 0x60147C0, symbol: aIntroStarfoxLogoTex } -starfox_text_intro_palette: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x60147C0, symbol: gTextIntroStarfoxPalette } +aIntroStarfoxLogoTLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x60147C0, symbol: aIntroStarfoxLogoTLUT } -in_text_intro: { type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 13, offset: 0x60147E0, tlut: 0x60147C0, symbol: gTextIntroIn } +aIntroInTex: { type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 13, offset: 0x60147E0, tlut: 0x60147C0, symbol: aIntroInTex } -in_text_intro_palette: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x60148B0, symbol: gTextIntroInPalette } +aIntroInTLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x60148B0, symbol: aIntroInTLUT } -D_TITLE_60148D0: { type: GFX, offset: 0x60148D0, symbol: D_TITLE_60148D0 } +a64LogoDL: { type: GFX, offset: 0x60148D0, symbol: a64LogoDL } -D_TITLE_6014DE8: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x6014DE8, tlut: 0x60155E8, symbol: D_TITLE_6014DE8 } +a64Logo1Tex: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x6014DE8, tlut: 0x60155E8, symbol: a64Logo1Tex } -D_TITLE_60155E8: { type: TEXTURE, ctype: u16, format: TLUT, colors: 152, offset: 0x60155E8, symbol: D_TITLE_60155E8 } +a64Logo1TLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 152, offset: 0x60155E8, symbol: a64Logo1TLUT } -D_TITLE_6015718: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 63, offset: 0x6015718, tlut: 0x6015EF8, symbol: D_TITLE_6015718 } +a64Logo2Tex: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 63, offset: 0x6015718, tlut: 0x6015EF8, symbol: a64Logo2Tex } -D_TITLE_6015EF8: { type: TEXTURE, ctype: u16, format: TLUT, colors: 64, offset: 0x6015EF8, symbol: D_TITLE_6015EF8 } +a64Logo2TLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 64, offset: 0x6015EF8, symbol: a64Logo2TLUT } -D_TITLE_6015F78: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x6015F78, tlut: 0x6016778, symbol: D_TITLE_6015F78 } +a64Logo3Tex: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x6015F78, tlut: 0x6016778, symbol: a64Logo3Tex } -D_TITLE_6016778: { type: TEXTURE, ctype: u16, format: TLUT, colors: 200, offset: 0x6016778, symbol: D_TITLE_6016778 } +a64Logo3TLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 200, offset: 0x6016778, symbol: a64Logo3TLUT } -D_TITLE_6016908: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 63, offset: 0x6016908, tlut: 0x60170E8, symbol: D_TITLE_6016908 } +a64Logo4Tex: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 63, offset: 0x6016908, tlut: 0x60170E8, symbol: a64Logo4Tex } -D_TITLE_60170E8: { type: TEXTURE, ctype: u16, format: TLUT, colors: 144, offset: 0x60170E8, symbol: D_TITLE_60170E8 } +a64Logo4TLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 144, offset: 0x60170E8, symbol: a64Logo4TLUT } -D_TITLE_6017208: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x6017208, tlut: 0x6017A08, symbol: D_TITLE_6017208 } +a64Logo5Tex: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x6017208, tlut: 0x6017A08, symbol: a64Logo5Tex } -D_TITLE_6017A08: { type: TEXTURE, ctype: u16, format: TLUT, colors: 136, offset: 0x6017A08, symbol: D_TITLE_6017A08 } +a64Logo5TLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 136, offset: 0x6017A08, symbol: a64Logo5TLUT } -D_TITLE_6017B18: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x6017B18, tlut: 0x6018318, symbol: D_TITLE_6017B18 } +a64Logo6Tex: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x6017B18, tlut: 0x6018318, symbol: a64Logo6Tex } -D_TITLE_6018318: { type: TEXTURE, ctype: u16, format: TLUT, colors: 200, offset: 0x6018318, symbol: D_TITLE_6018318 } +a64Logo6TLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 200, offset: 0x6018318, symbol: a64Logo6TLUT } -D_TITLE_60184A8: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x60184A8, tlut: 0x6018CA8, symbol: D_TITLE_60184A8 } +a64Logo7Tex: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x60184A8, tlut: 0x6018CA8, symbol: a64Logo7Tex } -D_TITLE_6018CA8: { type: TEXTURE, ctype: u16, format: TLUT, colors: 76, offset: 0x6018CA8, symbol: D_TITLE_6018CA8 } +a64Logo7TLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 76, offset: 0x6018CA8, symbol: a64Logo7TLUT } -D_TITLE_6018D40: { type: GFX, offset: 0x6018D40, symbol: D_TITLE_6018D40 } +aTitleGreatFoxDeckDL: { type: GFX, offset: 0x6018D40, symbol: aTitleGreatFoxDeckDL } D_TITLE_60195C0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60195C0, symbol: D_TITLE_60195C0 } @@ -88,9 +88,9 @@ D_TITLE_601B5C0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: D_TITLE_601B7C0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x601B7C0, symbol: D_TITLE_601B7C0 } -D_TITLE_601BFC0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x601BFC0, symbol: D_TITLE_601BFC0 } +aTitleCsPassageWayWallTex: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x601BFC0, symbol: aTitleCsPassageWayWallTex } -D_TITLE_601C7C0: { type: GFX, offset: 0x601C7C0, symbol: D_TITLE_601C7C0 } +aTitleGreatFoxDeckLauncherDL: { type: GFX, offset: 0x601C7C0, symbol: aTitleGreatFoxDeckLauncherDL } D_TITLE_601CCD0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x601CCD0, symbol: D_TITLE_601CCD0 } @@ -98,9 +98,9 @@ D_TITLE_601CED0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: D_TITLE_601CF50: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x601CF50, symbol: D_TITLE_601CF50 } -D_TITLE_601D750: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x601D750, tlut: 0x601DB50, symbol: D_TITLE_601D750 } +aNoControllerBgTex: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x601D750, tlut: 0x601DB50, symbol: aNoControllerBgTex } -D_TITLE_601DB50: { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x601DB50, symbol: D_TITLE_601DB50 } +aNoControllerBgTLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x601DB50, symbol: aNoControllerBgTLUT } D_TITLE_601E424: { type: SF64:ANIM, offset: 0x601E424, symbol: D_TITLE_601E424 } @@ -164,9 +164,9 @@ D_TITLE_6029BE4: { type: SF64:ANIM, offset: 0x6029BE4, symbol: D_TITLE_6029BE4 } D_TITLE_602A710: { type: SF64:ANIM, offset: 0x602A710, symbol: D_TITLE_602A710 } -D_TITLE_602A720: { type: GFX, offset: 0x602A720, symbol: D_TITLE_602A720 } +aTitleGreatFoxDeckPlatformDL: { type: GFX, offset: 0x602A720, symbol: aTitleGreatFoxDeckPlatformDL } -D_TITLE_602A8C0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x602A8C0, symbol: D_TITLE_602A8C0 } +aTitleCsPassageWayCeilingTex: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x602A8C0, symbol: aTitleCsPassageWayCeilingTex } D_TITLE_602B8C0: { type: GFX, offset: 0x602B8C0, symbol: D_TITLE_602B8C0 } @@ -178,41 +178,41 @@ D_TITLE_602DD30: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: D_TITLE_602DF30: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x602DF30, symbol: D_TITLE_602DF30 } -D_TITLE_602E380: { type: GFX, offset: 0x602E380, symbol: D_TITLE_602E380 } +aTitleCsPassageWayDL: { type: GFX, offset: 0x602E380, symbol: aTitleCsPassageWayDL } -D_TITLE_602E550: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x602E550, symbol: D_TITLE_602E550 } +aTitleCsPassageWayFloorTex: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x602E550, symbol: aTitleCsPassageWayFloorTex } -D_TITLE_602F8E0: { type: SF64:ANIM, offset: 0x602F8E0, symbol: D_TITLE_602F8E0 } +aFoxRunningAnim: { type: SF64:ANIM, offset: 0x602F8E0, symbol: aFoxRunningAnim } -D_TITLE_602FBAC: {type: SF64:SKELETON, offset: 0x602FBAC, symbol: D_TITLE_602FBAC} +aFoxSkel: {type: SF64:SKELETON, offset: 0x602FBAC, symbol: aFoxSkel} -D_TITLE_60305C0: { type: SF64:ANIM, offset: 0x60305C0, symbol: D_TITLE_60305C0 } +aFalcoRunningAnim: { type: SF64:ANIM, offset: 0x60305C0, symbol: aFalcoRunningAnim } -D_TITLE_603088C: {type: SF64:SKELETON, offset: 0x603088C, symbol: D_TITLE_603088C} +aFalcoSkel: {type: SF64:SKELETON, offset: 0x603088C, symbol: aFalcoSkel} -D_TITLE_6031120: { type: SF64:ANIM, offset: 0x6031120, symbol: D_TITLE_6031120 } +aSlippyRunningAnim: { type: SF64:ANIM, offset: 0x6031120, symbol: aSlippyRunningAnim } -D_TITLE_60313AC: {type: SF64:SKELETON, offset: 0x60313AC, symbol: D_TITLE_60313AC} +aSlippySkel: {type: SF64:SKELETON, offset: 0x60313AC, symbol: aSlippySkel} -D_TITLE_6031DB8: { type: SF64:ANIM, offset: 0x6031DB8, symbol: D_TITLE_6031DB8 } +aPeppyRunningAnim: { type: SF64:ANIM, offset: 0x6031DB8, symbol: aPeppyRunningAnim } -D_TITLE_6032084: {type: SF64:SKELETON, offset: 0x6032084, symbol: D_TITLE_6032084} +aPeppySkel: {type: SF64:SKELETON, offset: 0x6032084, symbol: aPeppySkel} -D_TITLE_60320E0: { type: GFX, offset: 0x60320E0, symbol: D_TITLE_60320E0 } +aTitleArwingEngineGlowDL: { type: GFX, offset: 0x60320E0, symbol: aTitleArwingEngineGlowDL } -D_TITLE_6032178: {type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 32, offset: 0x6032178, symbol: D_TITLE_6032178} +aTitleArwingEngineGlowTex: {type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 32, offset: 0x6032178, symbol: aTitleArwingEngineGlowTex} -D_TITLE_6032580: { type: GFX, offset: 0x6032580, symbol: D_TITLE_6032580 } +aTitleArwingShadowDL: { type: GFX, offset: 0x6032580, symbol: aTitleArwingShadowDL } -D_TITLE_6032608: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6032608, symbol: D_TITLE_6032608 } +aTitleArwingShadowTex: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6032608, symbol: aTitleArwingShadowTex } -D_TITLE_60338DC: { type: SF64:ANIM, offset: 0x60338DC, symbol: D_TITLE_60338DC } +aFalcoAnim: { type: SF64:ANIM, offset: 0x60338DC, symbol: aFalcoAnim } -D_TITLE_6035024: { type: SF64:ANIM, offset: 0x6035024, symbol: D_TITLE_6035024 } +aFoxAnim: { type: SF64:ANIM, offset: 0x6035024, symbol: aFoxAnim } -D_TITLE_603531C: { type: SF64:ANIM, offset: 0x603531C, symbol: D_TITLE_603531C } +aPeppyAnim: { type: SF64:ANIM, offset: 0x603531C, symbol: aPeppyAnim } -D_TITLE_6036278: { type: SF64:ANIM, offset: 0x6036278, symbol: D_TITLE_6036278 } +aSlippyAnim: { type: SF64:ANIM, offset: 0x6036278, symbol: aSlippyAnim } D_TITLE_6036290: { type: GFX, offset: 0x6036290, symbol: D_TITLE_6036290 } @@ -222,7 +222,7 @@ D_TITLE_6036B30: { type: GFX, offset: 0x6036B30, symbol: D_TITLE_6036B30 } D_TITLE_6036BC8: { type: TEXTURE, ctype: u16, format: IA16, width: 32, height: 32, offset: 0x6036BC8, symbol: D_TITLE_6036BC8 } -D_TITLE_6037CF0: { type: GFX, offset: 0x6037CF0, symbol: D_TITLE_6037CF0 } +aPlanetCorneriaDL: { type: GFX, offset: 0x6037CF0, symbol: aPlanetCorneriaDL } D_TITLE_60380D0: {type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x60380D0, symbol: D_TITLE_60380D0} @@ -242,7 +242,7 @@ D_TITLE_603F0D0: {type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: D_TITLE_60408C0: { type: GFX, offset: 0x60408C0, symbol: D_TITLE_60408C0 } -D_TITLE_6041070: { type: GFX, offset: 0x6041070, symbol: D_TITLE_6041070 } +aTeamShadowDL: { type: GFX, offset: 0x6041070, symbol: aTeamShadowDL } D_TITLE_60410F8: {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60410F8, symbol: D_TITLE_60410F8} diff --git a/assets/yaml/jp/rev0/ast_venom_1.yaml b/assets/yaml/jp/rev0/ast_venom_1.yaml index 1655355a..80b6e931 100644 --- a/assets/yaml/jp/rev0/ast_venom_1.yaml +++ b/assets/yaml/jp/rev0/ast_venom_1.yaml @@ -19,8 +19,8 @@ D_VE1_6000000: D_VE1_6000A80: { type: TEXTURE, format: IA8, width: 40, height: 19, offset: 0x6000A80, ctype: u8, symbol: D_VE1_6000A80 } -D_VE1_6000D80: - { type: TEXTURE, format: IA8, width: 128, height: 28, offset: 0x6000D80, ctype: u8, symbol: D_VE1_6000D80 } +aVe1TitleCardTex: + { type: TEXTURE, format: IA8, width: 128, height: 28, offset: 0x6000D80, ctype: u8, symbol: aVe1TitleCardTex } D_VE1_6001B80: { type: TEXTURE, format: IA8, width: 128, height: 19, offset: 0x6001B80, ctype: u8, symbol: D_VE1_6001B80 } diff --git a/assets/yaml/jp/rev0/ast_venom_2.yaml b/assets/yaml/jp/rev0/ast_venom_2.yaml index 3146fc88..41871152 100644 --- a/assets/yaml/jp/rev0/ast_venom_2.yaml +++ b/assets/yaml/jp/rev0/ast_venom_2.yaml @@ -18,8 +18,8 @@ D_VE2_6000000: D_VE2_6000A80: { type: TEXTURE, format: IA8, width: 112, height: 19, offset: 0x6000A80, ctype: u8, symbol: D_VE2_6000A80 } -D_VE2_60012D0: - { type: TEXTURE, format: IA8, width: 128, height: 28, offset: 0x60012D0, ctype: u8, symbol: D_VE2_60012D0 } +aVe2TitleCardTex: + { type: TEXTURE, format: IA8, width: 128, height: 28, offset: 0x60012D0, ctype: u8, symbol: aVe2TitleCardTex } D_VE2_60020D0: { type: TEXTURE, format: IA8, width: 104, height: 19, offset: 0x60020D0, ctype: u8, symbol: D_VE2_60020D0 } diff --git a/assets/yaml/jp/rev0/ast_versus.yaml b/assets/yaml/jp/rev0/ast_versus.yaml index 75b6f5e2..fc8a060e 100644 --- a/assets/yaml/jp/rev0/ast_versus.yaml +++ b/assets/yaml/jp/rev0/ast_versus.yaml @@ -72,14 +72,14 @@ D_versus_3000A10: D_versus_3000B00: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x3000B00, symbol: D_versus_3000B00 } -D_versus_3000B20: - { type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 5, offset: 0x3000B20, symbol: D_versus_3000B20 } +aVsBoostGaugeFrameTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 5, offset: 0x3000B20, symbol: aVsBoostGaugeFrameTex } -D_versus_3000BC0: - { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 26, offset: 0x3000BC0, symbol: D_versus_3000BC0 } +aVsShieldGaugeFrameTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 26, offset: 0x3000BC0, symbol: aVsShieldGaugeFrameTex } -D_versus_30013E0: - { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x30013E0, symbol: D_versus_30013E0 } +aVsStarTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x30013E0, symbol: aVsStarTex } D_versus_3001420: { type: TEXTURE, ctype: u8, format: CI8, width: 256, height: 42, offset: 0x3001420, symbol: D_versus_3001420, tlut: 0x3003E20 } @@ -141,20 +141,20 @@ D_versus_300C660: D_versus_300D150: {type: TEXTURE, ctype: u16, format: TLUT, colors: 251, offset: 0x300D150, symbol: D_versus_300D150 } -D_versus_300D350: - { type: TEXTURE, ctype: u8, format: CI8, width: 24, height: 3, offset: 0x300D350, symbol: D_versus_300D350, tlut: 0x300D398 } -D_versus_300D398: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x300D398, symbol: D_versus_300D398 } +aVsBoostGaugeCoolTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 24, height: 3, offset: 0x300D350, symbol: aVsBoostGaugeCoolTex, tlut: 0x300D398 } +aVsBoostGaugeCoolTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x300D398, symbol: aVsBoostGaugeCoolTLUT } -D_versus_300D3C0: - { type: TEXTURE, ctype: u8, format: CI8, width: 24, height: 3, offset: 0x300D3C0, symbol: D_versus_300D3C0, tlut: 0x300D408 } -D_versus_300D408: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 24, offset: 0x300D408, symbol: D_versus_300D408 } +aVsBoostGaugeOverheatTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 24, height: 3, offset: 0x300D3C0, symbol: aVsBoostGaugeOverheatTex, tlut: 0x300D408 } +aVsBoostGaugeOverheatTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 24, offset: 0x300D408, symbol: aVsBoostGaugeOverheatTLUT } -D_versus_300D440: - { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 4, offset: 0x300D440, symbol: D_versus_300D440, tlut: 0x300D500 } -D_versus_300D500: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 40, offset: 0x300D500, symbol: D_versus_300D500 } +aVsShieldGaugeTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 4, offset: 0x300D440, symbol: aVsShieldGaugeTex, tlut: 0x300D500 } +aVsShieldGaugeTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 40, offset: 0x300D500, symbol: aVsShieldGaugeTLUT } D_versus_300D550: { type: GFX, offset: 0x300D550, symbol: D_versus_300D550} diff --git a/assets/yaml/jp/rev0/ast_vs_menu.yaml b/assets/yaml/jp/rev0/ast_vs_menu.yaml index a736b7c6..0fdc3d20 100644 --- a/assets/yaml/jp/rev0/ast_vs_menu.yaml +++ b/assets/yaml/jp/rev0/ast_vs_menu.yaml @@ -8,23 +8,23 @@ - '#include "gfx.h"' - '#include "sf64object.h"' -D_VS_MENU_7000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 13, offset: 0x7000000, symbol: D_VS_MENU_7000000} +aVsPlayerNum1Tex: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 13, offset: 0x7000000, symbol: aVsPlayerNum1Tex} -D_VS_MENU_70000D0: - { type: TEXTURE, ctype: u8, format: IA8, width: 24, height: 13, offset: 0x70000D0, symbol: D_VS_MENU_70000D0} +aVsPlayerNum2Tex: + { type: TEXTURE, ctype: u8, format: IA8, width: 24, height: 13, offset: 0x70000D0, symbol: aVsPlayerNum2Tex} -D_VS_MENU_7000210: - { type: TEXTURE, ctype: u8, format: IA8, width: 24, height: 13, offset: 0x7000210, symbol: D_VS_MENU_7000210} +aVsPlayerNum3Tex: + { type: TEXTURE, ctype: u8, format: IA8, width: 24, height: 13, offset: 0x7000210, symbol: aVsPlayerNum3Tex} -D_VS_MENU_7000350: - { type: TEXTURE, ctype: u8, format: IA8, width: 24, height: 13, offset: 0x7000350, symbol: D_VS_MENU_7000350} +aVsPlayerNum4Tex: + { type: TEXTURE, ctype: u8, format: IA8, width: 24, height: 13, offset: 0x7000350, symbol: aVsPlayerNum4Tex} D_VS_MENU_7000490: { type: TEXTURE, ctype: u8, format: IA8, width: 64, height: 42, offset: 0x7000490, symbol: D_VS_MENU_7000490} -D_VS_MENU_7000F10: - { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 7, offset: 0x7000F10, symbol: D_VS_MENU_7000F10} +aVsTextContTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 7, offset: 0x7000F10, symbol: aVsTextContTex} D_VS_MENU_7001030: { type: TEXTURE, ctype: u8, format: IA8, width: 64, height: 9, offset: 0x7001030, symbol: D_VS_MENU_7001030} @@ -32,14 +32,14 @@ D_VS_MENU_7001030: D_VS_MENU_7001270: { type: TEXTURE, ctype: u8, format: IA8, width: 112, height: 12, offset: 0x7001270, symbol: D_VS_MENU_7001270} -D_VS_MENU_70017B0: - { type: TEXTURE, ctype: u8, format: IA8, width: 56, height: 10, offset: 0x70017B0, symbol: D_VS_MENU_70017B0} +aVsTextCorneriaTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 56, height: 10, offset: 0x70017B0, symbol: aVsTextCorneriaTex} -D_VS_MENU_70019E0: - { type: TEXTURE, ctype: u8, format: IA8, width: 56, height: 10, offset: 0x70019E0, symbol: D_VS_MENU_70019E0} +aVsTextSectorZTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 56, height: 10, offset: 0x70019E0, symbol: aVsTextSectorZTex} -D_VS_MENU_7001C10: - { type: TEXTURE, ctype: u8, format: IA8, width: 48, height: 10, offset: 0x7001C10, symbol: D_VS_MENU_7001C10} +aVsTextKatinaTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 48, height: 10, offset: 0x7001C10, symbol: aVsTextKatinaTex} D_VS_MENU_7001DF0: { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 10, offset: 0x7001DF0, symbol: D_VS_MENU_7001DF0} @@ -62,14 +62,14 @@ D_VS_MENU_7002BF0: D_VS_MENU_7002E50: { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 15, offset: 0x7002E50, symbol: D_VS_MENU_7002E50} -D_VS_MENU_70030B0: - { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 12, offset: 0x70030B0, symbol: D_VS_MENU_70030B0} +aVsHandicapLvl1Tex: + { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 12, offset: 0x70030B0, symbol: aVsHandicapLvl1Tex} -D_VS_MENU_7003290: - { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 12, offset: 0x7003290, symbol: D_VS_MENU_7003290} +aVsHandicapLvl2Tex: + { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 12, offset: 0x7003290, symbol: aVsHandicapLvl2Tex} -D_VS_MENU_7003470: - { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 12, offset: 0x7003470, symbol: D_VS_MENU_7003470} +aVsHandicapLvl3Tex: + { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 12, offset: 0x7003470, symbol: aVsHandicapLvl3Tex} D_VS_MENU_7003650: { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 12, offset: 0x7003650, symbol: D_VS_MENU_7003650} @@ -116,29 +116,29 @@ D_VS_MENU_70044D0: D_VS_MENU_7004990: { type: TEXTURE, ctype: u16, format: TLUT, colors: 17, offset: 0x7004990, symbol: D_VS_MENU_7004990} -D_VS_MENU_70049C0: - { type: TEXTURE, ctype: u8, format: CI8, width: 56, height: 8, offset: 0x70049C0, symbol: D_VS_MENU_70049C0, tlut: 0x7004B80} +aVsFoxNameTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 56, height: 8, offset: 0x70049C0, symbol: aVsFoxNameTex, tlut: 0x7004B80} -D_VS_MENU_7004B80: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 18, offset: 0x7004B80, symbol: D_VS_MENU_7004B80} +aVsFoxNameTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 18, offset: 0x7004B80, symbol: aVsFoxNameTLUT} -D_VS_MENU_7004BB0: - { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 10, offset: 0x7004BB0, symbol: D_VS_MENU_7004BB0, tlut: 0x7004D90} +aVsPeppyNameTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 10, offset: 0x7004BB0, symbol: aVsPeppyNameTex, tlut: 0x7004D90} -D_VS_MENU_7004D90: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 18, offset: 0x7004D90, symbol: D_VS_MENU_7004D90} +aVsPeppyNameTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 18, offset: 0x7004D90, symbol: aVsPeppyNameTLUT} -D_VS_MENU_7004DC0: - { type: TEXTURE, ctype: u8, format: CI8, width: 56, height: 10, offset: 0x7004DC0, symbol: D_VS_MENU_7004DC0, tlut: 0x7004FF0} +aVsSlippyNameTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 56, height: 10, offset: 0x7004DC0, symbol: aVsSlippyNameTex, tlut: 0x7004FF0} -D_VS_MENU_7004FF0: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 18, offset: 0x7004FF0, symbol: D_VS_MENU_7004FF0} +aVsSlippyNameTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 18, offset: 0x7004FF0, symbol: aVsSlippyNameTLUT} -D_VS_MENU_7005020: - { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 8, offset: 0x7005020, symbol: D_VS_MENU_7005020, tlut: 0x70051A0} +aVsFalcoNameTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 8, offset: 0x7005020, symbol: aVsFalcoNameTex, tlut: 0x70051A0} -D_VS_MENU_70051A0: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 18, offset: 0x70051A0, symbol: D_VS_MENU_70051A0} +aVsFalcoNameTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 18, offset: 0x70051A0, symbol: aVsFalcoNameTLUT} D_VS_MENU_70051D0: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x70051D0, symbol: D_VS_MENU_70051D0, tlut: 0x70055D0} @@ -146,56 +146,56 @@ D_VS_MENU_70051D0: D_VS_MENU_70055D0: { type: TEXTURE, ctype: u16, format: TLUT, colors: 20, offset: 0x70055D0, symbol: D_VS_MENU_70055D0} -D_VS_MENU_7005600: - { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 38, offset: 0x7005600, symbol: D_VS_MENU_7005600, tlut: 0x7005D20} +aVsCorneriaTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 38, offset: 0x7005600, symbol: aVsCorneriaTex, tlut: 0x7005D20} -D_VS_MENU_7005D20: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 248, offset: 0x7005D20, symbol: D_VS_MENU_7005D20} +aVsCorneriaTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 248, offset: 0x7005D20, symbol: aVsCorneriaTLUT} -D_VS_MENU_7005F10: - { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 38, offset: 0x7005F10, symbol: D_VS_MENU_7005F10, tlut: 0x7006630} +aVsSectorZTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 38, offset: 0x7005F10, symbol: aVsSectorZTex, tlut: 0x7006630} -D_VS_MENU_7006630: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 168, offset: 0x7006630, symbol: D_VS_MENU_7006630} +aVsSectorZTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 168, offset: 0x7006630, symbol: aVsSectorZTLUT} -D_VS_MENU_7006780: - { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 38, offset: 0x7006780, symbol: D_VS_MENU_7006780, tlut: 0x7006EA0} +aVsKatinaTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 38, offset: 0x7006780, symbol: aVsKatinaTex, tlut: 0x7006EA0} -D_VS_MENU_7006EA0: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 256, offset: 0x7006EA0, symbol: D_VS_MENU_7006EA0} +aVsKatinaTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 256, offset: 0x7006EA0, symbol: aVsKatinaTLUT} -D_VS_MENU_70070A0: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x70070A0, symbol: D_VS_MENU_70070A0} +aVsFalcoFaceTex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x70070A0, symbol: aVsFalcoFaceTex} D_VS_MENU_7007FC0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x7007FC0, symbol: D_VS_MENU_7007FC0} -D_VS_MENU_7008EE0: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x7008EE0, symbol: D_VS_MENU_7008EE0} +aVsFoxFaceTex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x7008EE0, symbol: aVsFoxFaceTex} D_VS_MENU_7009E00: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x7009E00, symbol: D_VS_MENU_7009E00} -D_VS_MENU_700AD20: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x700AD20, symbol: D_VS_MENU_700AD20} +aVsPeppyFaceTex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x700AD20, symbol: aVsPeppyFaceTex} D_VS_MENU_700BC40: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x700BC40, symbol: D_VS_MENU_700BC40} -D_VS_MENU_700CB60: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x700CB60, symbol: D_VS_MENU_700CB60} +aVsSlippyFaceTex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x700CB60, symbol: aVsSlippyFaceTex} D_VS_MENU_700DA80: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x700DA80, symbol: D_VS_MENU_700DA80} -D_VS_MENU_700E9A0: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 144, height: 42, offset: 0x700E9A0, symbol: D_VS_MENU_700E9A0} +aVsN64ConsoleTex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 144, height: 42, offset: 0x700E9A0, symbol: aVsN64ConsoleTex} -D_VS_MENU_70118E0: - { type: TEXTURE, ctype: u8, format: CI4, width: 80, height: 71, offset: 0x70118E0, symbol: D_VS_MENU_70118E0, tlut: 0x70123F8} +aVsHandicapFrameTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 80, height: 71, offset: 0x70118E0, symbol: aVsHandicapFrameTex, tlut: 0x70123F8} -D_VS_MENU_70123F8: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 5, offset: 0x70123F8, symbol: D_VS_MENU_70123F8} +aVsHandicapFrameTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 5, offset: 0x70123F8, symbol: aVsHandicapFrameTLUT} D_VS_MENU_7012410: { type: GFX, offset: 0x7012410, symbol: D_VS_MENU_7012410} diff --git a/assets/yaml/jp/rev0/ast_zoness.yaml b/assets/yaml/jp/rev0/ast_zoness.yaml index 129ddaf9..2a2091eb 100644 --- a/assets/yaml/jp/rev0/ast_zoness.yaml +++ b/assets/yaml/jp/rev0/ast_zoness.yaml @@ -12,8 +12,8 @@ - '#include "sf64player.h"' - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' -D_ZO_6000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 112, height: 28, offset: 0x6000000, symbol: D_ZO_6000000} +aZoTitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 112, height: 28, offset: 0x6000000, symbol: aZoTitleCardTex} D_ZO_6000C40: { type: GFX, offset: 0x6000C40, symbol: D_ZO_6000C40} diff --git a/assets/yaml/us/rev1/ast_allies.yaml b/assets/yaml/us/rev1/ast_allies.yaml index c22d8734..41639e69 100644 --- a/assets/yaml/us/rev1/ast_allies.yaml +++ b/assets/yaml/us/rev1/ast_allies.yaml @@ -53,11 +53,11 @@ D_D007A70: D_D008990: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0xD008990, symbol: D_D008990 } -D_D0098B0: - { type: GFX, offset: 0xD0098B0, symbol: D_D0098B0 } +aKattRadarMarkDL: + { type: GFX, offset: 0xD0098B0, symbol: aKattRadarMarkDL } -D_D009938: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x0D009938, symbol: D_D009938 } +aKattRadarMarkTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x0D009938, symbol: aKattRadarMarkTex } aKattShipDL: { type: GFX, offset: 0xD009A40, symbol: aKattShipDL } diff --git a/assets/yaml/us/rev1/ast_andross.yaml b/assets/yaml/us/rev1/ast_andross.yaml index e6019ac5..04055bc3 100644 --- a/assets/yaml/us/rev1/ast_andross.yaml +++ b/assets/yaml/us/rev1/ast_andross.yaml @@ -16,8 +16,8 @@ D_ANDROSS_C000000: {type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 28, offset: 0xC000000, symbol: D_ANDROSS_C000000} -D_ANDROSS_C000A80: - {type: TEXTURE, ctype: u8, format: IA8, width: 128, height: 28, offset: 0xC000A80, symbol: D_ANDROSS_C000A80} +aAndTitleCardTex: + {type: TEXTURE, ctype: u8, format: IA8, width: 128, height: 28, offset: 0xC000A80, symbol: aAndTitleCardTex} D_ANDROSS_C001880: {type: GFX, offset: 0xC001880, symbol: D_ANDROSS_C001880} diff --git a/assets/yaml/us/rev1/ast_aquas.yaml b/assets/yaml/us/rev1/ast_aquas.yaml index 32e9bdf2..1bcc5582 100644 --- a/assets/yaml/us/rev1/ast_aquas.yaml +++ b/assets/yaml/us/rev1/ast_aquas.yaml @@ -13,8 +13,8 @@ - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' -D_AQ_6000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 13, offset: 0x6000000, symbol: D_AQ_6000000 } +aAqTitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 13, offset: 0x6000000, symbol: aAqTitleCardTex } aAqSquidAnim: { type: SF64:ANIM, offset: 0x6000AE4, symbol: aAqSquidAnim } diff --git a/assets/yaml/us/rev1/ast_area_6.yaml b/assets/yaml/us/rev1/ast_area_6.yaml index 7ff0e0cf..c725b464 100644 --- a/assets/yaml/us/rev1/ast_area_6.yaml +++ b/assets/yaml/us/rev1/ast_area_6.yaml @@ -12,8 +12,8 @@ - '#include "sf64player.h"' - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' -D_A6_6000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 104, height: 28, offset: 0x6000000, symbol: D_A6_6000000 } +aA6TitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 104, height: 28, offset: 0x6000000, symbol: aA6TitleCardTex } D_A6_6000B60: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x06000B60, symbol: D_A6_6000B60 } diff --git a/assets/yaml/us/rev1/ast_arwing.yaml b/assets/yaml/us/rev1/ast_arwing.yaml index 06cc46b3..a99ffc59 100644 --- a/assets/yaml/us/rev1/ast_arwing.yaml +++ b/assets/yaml/us/rev1/ast_arwing.yaml @@ -8,17 +8,17 @@ - '#include "gfx.h"' - '#include "sf64object.h"' -D_arwing_3000000: - { type: TEXTURE, format: CI4, offset: 0x3000000, width: 16, height: 16, ctype: u8, tlut: 0x3000080, symbol: D_arwing_3000000 } +aArwingLifeIconTex: + { type: TEXTURE, format: CI4, offset: 0x3000000, width: 16, height: 16, ctype: u8, tlut: 0x3000080, symbol: aArwingLifeIconTex } -D_arwing_3000080: - { type: TEXTURE, format: TLUT, offset: 0x3000080, colors: 8, ctype: u16, symbol: D_arwing_3000080 } +aArwingLifeIconTLUT: + { type: TEXTURE, format: TLUT, offset: 0x3000080, colors: 8, ctype: u16, symbol: aArwingLifeIconTLUT } -D_arwing_3000090: - { type: GFX, offset: 0x3000090, symbol: D_arwing_3000090 } +aAwFoxHeadDL: + { type: GFX, offset: 0x3000090, symbol: aAwFoxHeadDL } -D_arwing_3001C90: - { type: GFX, offset: 0x3001C90, symbol: D_arwing_3001C90 } +aAwJamesHeadDL: + { type: GFX, offset: 0x3001C90, symbol: aAwJamesHeadDL } D_arwing_3003960: { type: TEXTURE, format: RGBA16, offset: 0x3003960, width: 8, height: 8, ctype: u16, symbol: D_arwing_3003960 } @@ -41,11 +41,11 @@ D_arwing_3003BE0: D_arwing_3003C60: { type: TEXTURE, format: RGBA16, offset: 0x3003C60, width: 8, height: 8, ctype: u16, symbol: D_arwing_3003C60 } -D_arwing_3003CE0: - { type: GFX, offset: 0x3003CE0, symbol: D_arwing_3003CE0 } +aAwPeppyHeadDL: + { type: GFX, offset: 0x3003CE0, symbol: aAwPeppyHeadDL } -D_arwing_3005AB0: - { type: GFX, offset: 0x3005AB0, symbol: D_arwing_3005AB0 } +aAwSlippyHeadDL: + { type: GFX, offset: 0x3005AB0, symbol: aAwSlippyHeadDL } D_arwing_30074D0: { type: TEXTURE, format: RGBA16, offset: 0x30074D0, width: 8, height: 8, ctype: u16, symbol: D_arwing_30074D0 } @@ -68,8 +68,8 @@ D_arwing_3008960: D_arwing_3009960: { type: TEXTURE, format: RGBA16, offset: 0x3009960, width: 16, height: 16, ctype: u16, symbol: D_arwing_3009960 } -D_arwing_3009B60: - { type: GFX, offset: 0x3009B60, symbol: D_arwing_3009B60 } +aAwBodyDL: + { type: GFX, offset: 0x3009B60, symbol: aAwBodyDL } D_arwing_300AC48: { type: TEXTURE, format: RGBA16, offset: 0x300AC48, width: 32, height: 32, ctype: u16, symbol: D_arwing_300AC48 } @@ -104,8 +104,11 @@ D_arwing_300F448: D_arwing_3010448: { type: TEXTURE, format: RGBA16, offset: 0x3010448, width: 64, height: 32, ctype: u16, symbol: D_arwing_3010448 } -D_arwing_3011720: - { type: GFX, offset: 0x3011720, symbol: D_arwing_3011720 } +aAwLaserGun1DL: + { type: GFX, offset: 0x3011720, symbol: aAwLaserGun1DL } + +aAwLaserGun2L: + { type: GFX, offset: 0x3011450, symbol: aAwLaserGun2L } D_arwing_30119F0: { type: TEXTURE, format: RGBA16, offset: 0x30119F0, width: 32, height: 32, ctype: u16, symbol: D_arwing_30119F0 } @@ -116,8 +119,8 @@ D_arwing_30121F0: D_arwing_30129F0: { type: TEXTURE, format: RGBA16, offset: 0x30129F0, width: 32, height: 32, ctype: u16, symbol: D_arwing_30129F0 } -D_arwing_30131F0: - { type: GFX, offset: 0x30131F0, symbol: D_arwing_30131F0 } +aAwCockpitViewDL: + { type: GFX, offset: 0x30131F0, symbol: aAwCockpitViewDL } D_arwing_30137E8: { type: TEXTURE, format: RGBA16, offset: 0x30137E8, width: 32, height: 32, ctype: u16, symbol: D_arwing_30137E8 } @@ -128,17 +131,26 @@ D_arwing_3013FE8: D_arwing_30147E8: { type: TEXTURE, format: RGBA16, offset: 0x30147E8, width: 16, height: 32, ctype: u16, symbol: D_arwing_30147E8 } -D_arwing_3014BF0: - { type: GFX, offset: 0x3014BF0, symbol: D_arwing_3014BF0 } +aAwRightWingBrokenDL: + { type: GFX, offset: 0x3014BF0, symbol: aAwRightWingBrokenDL } D_arwing_3014F20: { type: TEXTURE, format: RGBA16, offset: 0x3014F20, width: 16, height: 16, ctype: u16, symbol: D_arwing_3014F20 } -D_arwing_3015120: - { type: GFX, offset: 0x3015120, symbol: D_arwing_3015120 } +aAwLeftWingBrokenDL: + { type: GFX, offset: 0x3015120, symbol: aAwLeftWingBrokenDL } -D_arwing_30155E0: - { type: GFX, offset: 0x30155E0, symbol: D_arwing_30155E0} +aAwFlap1DL: + { type: GFX, offset: 0x30155E0, symbol: aAwFlap1DL} + +aAwFlap2DL: + { type: GFX, offset: 0x30154A0, symbol: aAwFlap2DL} + +aAwFlap3DL: + { type: GFX, offset: 0x3015730, symbol: aAwFlap3DL} + +aAwFlap4DL: + { type: GFX, offset: 0x3015880, symbol: aAwFlap4DL} D_arwing_3015AF4: { type: SF64:ANIM, offset: 0x3015AF4, symbol: D_arwing_3015AF4 } @@ -149,8 +161,8 @@ D_arwing_3015C28: D_arwing_3015D68: { type: SF64:ANIM, offset: 0x3015D68, symbol: D_arwing_3015D68 } -D_arwing_3015D80: - { type: GFX, offset: 0x3015D80, symbol: D_arwing_3015D80 } +aAwRightWingDL: + { type: GFX, offset: 0x3015D80, symbol: aAwRightWingDL } D_arwing_30163C4: { type: SF64:ANIM, offset: 0x30163C4, symbol: D_arwing_30163C4 } @@ -158,8 +170,8 @@ D_arwing_30163C4: D_arwing_3016610: { type: SF64:SKELETON, offset: 0x3016610, symbol: D_arwing_3016610 } -D_arwing_3016660: - { type: GFX, offset: 0x3016660, symbol: D_arwing_3016660} +aAwLeftWingDL: + { type: GFX, offset: 0x3016660, symbol: aAwLeftWingDL} D_arwing_3016B30: { type: GFX, offset: 0x3016B30, symbol: D_arwing_3016B30 } @@ -167,8 +179,8 @@ D_arwing_3016B30: D_arwing_3016BB8: { type: TEXTURE, format: IA8, offset: 0x3016BB8, width: 16, height: 16, ctype: u8, symbol: D_arwing_3016BB8 } -D_arwing_3016CC0: - { type: GFX, offset: 0x3016CC0, symbol: D_arwing_3016CC0 } +aAwFalcoHeadDL: + { type: GFX, offset: 0x3016CC0, symbol: aAwFalcoHeadDL } D_arwing_30182C8: { type: TEXTURE, format: RGBA16, offset: 0x30182C8, width: 8, height: 8, ctype: u16, symbol: D_arwing_30182C8 } @@ -176,6 +188,7 @@ D_arwing_30182C8: D_arwing_3018348: { type: TEXTURE, format: RGBA16, offset: 0x3018348, width: 8, height: 8, ctype: u16, symbol: D_arwing_3018348 } +# Windshield used in corneria cutscenes D_arwing_30183D0: { type: GFX, offset: 0x30183D0, symbol: D_arwing_30183D0 } @@ -185,6 +198,7 @@ aWindshieldClouldReflextionTex: D_arwing_3018CD8: { type: TEXTURE, format: RGBA16, offset: 0x3018CD8, width: 64, height: 16, ctype: u16, symbol: D_arwing_3018CD8 } +# Windshield D_arwing_30194E0: { type: GFX, offset: 0x30194E0, symbol: D_arwing_30194E0 } diff --git a/assets/yaml/us/rev1/ast_blue_marine.yaml b/assets/yaml/us/rev1/ast_blue_marine.yaml index e682870e..ed1a6d10 100644 --- a/assets/yaml/us/rev1/ast_blue_marine.yaml +++ b/assets/yaml/us/rev1/ast_blue_marine.yaml @@ -8,11 +8,11 @@ - '#include "gfx.h"' - '#include "sf64object.h"' -D_blue_marine_3000000: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x3000000, symbol: D_blue_marine_3000000, tlut: 0x3000080 } +aBlueMarineLifeIconTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x3000000, symbol: aBlueMarineLifeIconTex, tlut: 0x3000080 } -D_blue_marine_3000080: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x3000080, symbol: D_blue_marine_3000080 } +aBlueMarineLifeIconTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x3000080, symbol: aBlueMarineLifeIconTLUT } D_blue_marine_3000090: { type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 9, offset: 0x3000090, symbol: D_blue_marine_3000090, tlut: 0x3000120 } diff --git a/assets/yaml/us/rev1/ast_bolse.yaml b/assets/yaml/us/rev1/ast_bolse.yaml index 40808dd0..ba001b6d 100644 --- a/assets/yaml/us/rev1/ast_bolse.yaml +++ b/assets/yaml/us/rev1/ast_bolse.yaml @@ -13,8 +13,8 @@ - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' # Bolse Defense Outpost -D_BO_6000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 168, height: 19, offset: 0x6000000, symbol: D_BO_6000000 } +aBoTitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 168, height: 19, offset: 0x6000000, symbol: aBoTitleCardTex } D_BO_6000C80: { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x6000C80, symbol: D_BO_6000C80 } diff --git a/assets/yaml/us/rev1/ast_common.yaml b/assets/yaml/us/rev1/ast_common.yaml index 3372ef0e..4ae37bd0 100644 --- a/assets/yaml/us/rev1/ast_common.yaml +++ b/assets/yaml/us/rev1/ast_common.yaml @@ -17,8 +17,8 @@ D_1000280: D_1000640: { type: TEXTURE, format: IA8, width: 96, height: 22, ctype: u8, offset: 0x1000640, symbol: D_1000640 } -D_1000E80: - { type: TEXTURE, format: IA8, width: 48, height: 9, ctype: u8, offset: 0x1000E80, symbol: D_1000E80 } +aBoostGaugeFrameTex: + { type: TEXTURE, format: IA8, width: 48, height: 9, ctype: u8, offset: 0x1000E80, symbol: aBoostGaugeFrameTex } D_1001030: { type: TEXTURE, format: IA8, width: 8, height: 8, ctype: u8, offset: 0x1001030, symbol: D_1001030 } @@ -41,8 +41,8 @@ D_1002040: D_1002220: { type: TEXTURE, format: IA8, width: 8, height: 12, ctype: u8, offset: 0x1002220, symbol: D_1002220 } -D_1002280: - { type: TEXTURE, format: IA8, width: 8, height: 12, ctype: u8, offset: 0x1002280, symbol: D_1002280 } +aShieldGaugeFrameEdgeTex: + { type: TEXTURE, format: IA8, width: 8, height: 12, ctype: u8, offset: 0x1002280, symbol: aShieldGaugeFrameEdgeTex } D_10022E0: { type: TEXTURE, format: IA8, width: 8, height: 12, ctype: u8, offset: 0x10022E0, symbol: D_10022E0 } @@ -53,8 +53,8 @@ D_1002340: D_10024D0: { type: TEXTURE, format: IA8, width: 96, height: 32, ctype: u8, offset: 0x10024D0, symbol: D_10024D0 } -D_10030D0: - { type: TEXTURE, format: IA8, width: 8, height: 12, ctype: u8, offset: 0x10030D0, symbol: D_10030D0 } +aShieldGaugeFrameTex: + { type: TEXTURE, format: IA8, width: 8, height: 12, ctype: u8, offset: 0x10030D0, symbol: aShieldGaugeFrameTex } D_1003130: { type: GFX, offset: 0x1003130, symbol: D_1003130 } @@ -65,14 +65,14 @@ D_1003208: D_1003288: { type: TEXTURE, format: TLUT, colors: 12, offset: 0x1003288, ctype: u16, symbol: D_1003288 } -D_10032A0: - { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x10032A0, symbol: D_10032A0 } +aFalcoPortraitTex: + { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x10032A0, symbol: aFalcoPortraitTex } D_10041C0: { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x10041C0, symbol: D_10041C0 } -D_10050E0: - { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x10050E0, symbol: D_10050E0 } +aFoxPortraitTex: + { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x10050E0, symbol: aFoxPortraitTex } D_1006000: { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x1006000, symbol: D_1006000 } @@ -92,14 +92,14 @@ D_1009C80: D_100ABA0: { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x100ABA0, symbol: D_100ABA0 } -D_100BAC0: - { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x100BAC0, symbol: D_100BAC0 } +aPeppyPortraitTex: + { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x100BAC0, symbol: aPeppyPortraitTex } D_100C9E0: { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x100C9E0, symbol: D_100C9E0 } -D_100D900: - { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x100D900, symbol: D_100D900 } +aSlippyPortraitTex: + { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x100D900, symbol: aSlippyPortraitTex } D_100E820: { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x100E820, symbol: D_100E820 } @@ -215,17 +215,17 @@ D_1011200: D_1011270: { type: TEXTURE, format: TLUT, colors: 6, ctype: u16, offset: 0x1011270, symbol: D_1011270 } -D_1011280: - { type: TEXTURE, format: CI4, width: 48, height: 44, ctype: u8, offset: 0x1011280, tlut: 0x10116A0, symbol: D_1011280 } +aRadarFrameTex: + { type: TEXTURE, format: CI4, width: 48, height: 44, ctype: u8, offset: 0x1011280, tlut: 0x10116A0, symbol: aRadarFrameTex } -D_10116A0: - { type: TEXTURE, format: TLUT, colors: 8, ctype: u16, offset: 0x10116A0, symbol: D_10116A0 } +aRadarFrameTLUT: + { type: TEXTURE, format: TLUT, colors: 8, ctype: u16, offset: 0x10116A0, symbol: aRadarFrameTLUT } -D_10116B0: - { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x10116B0, tlut: 0x1011730, symbol: D_10116B0 } +aVsBombIconTex: + { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x10116B0, tlut: 0x1011730, symbol: aVsBombIconTex } -D_1011730: - { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011730, symbol: D_1011730 } +aVsBombIconTLUT: + { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011730, symbol: aVsBombIconTLUT } D_1011750: { type: TEXTURE, format: CI4, width: 80, height: 13, ctype: u8, offset: 0x1011750, tlut: 0x1011958, symbol: D_1011750 } @@ -245,29 +245,29 @@ D_1011A40: D_1011AB0: { type: TEXTURE, format: TLUT, colors: 8, ctype: u16, offset: 0x1011AB0, symbol: D_1011AB0 } -D_1011AC0: - { type: TEXTURE, format: CI4, width: 16, height: 26, ctype: u8, offset: 0x1011AC0, tlut: 0x1011B90, symbol: D_1011AC0 } +aIncomingMsgButtonTex: + { type: TEXTURE, format: CI4, width: 16, height: 26, ctype: u8, offset: 0x1011AC0, tlut: 0x1011B90, symbol: aIncomingMsgButtonTex } -D_1011B90: - { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011B90, symbol: D_1011B90 } +aIncomingMsgButtonTLUT: + { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011B90, symbol: aIncomingMsgButtonTLUT } -D_1011BB0: - { type: TEXTURE, format: CI4, width: 16, height: 26, ctype: u8, offset: 0x1011BB0, tlut: 0x1011C80, symbol: D_1011BB0 } +aIncomingMsgSignal1Tex: + { type: TEXTURE, format: CI4, width: 16, height: 26, ctype: u8, offset: 0x1011BB0, tlut: 0x1011C80, symbol: aIncomingMsgSignal1Tex } -D_1011C80: - { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011C80, symbol: D_1011C80 } +aIncomingMsgSignal1TLUT: + { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011C80, symbol: aIncomingMsgSignal1TLUT } -D_1011CA0: - { type: TEXTURE, format: CI4, width: 16, height: 26, ctype: u8, offset: 0x1011CA0, tlut: 0x1011D70, symbol: D_1011CA0 } +aIncomingMsgSignal2Tex: + { type: TEXTURE, format: CI4, width: 16, height: 26, ctype: u8, offset: 0x1011CA0, tlut: 0x1011D70, symbol: aIncomingMsgSignal2Tex } -D_1011D70: - { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011D70, symbol: D_1011D70 } +aIncomingMsgSignal2TLUT: + { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011D70, symbol: aIncomingMsgSignal2TLUT } -D_1011D90: - { type: TEXTURE, format: CI4, width: 16, height: 26, ctype: u8, offset: 0x1011D90, tlut: 0x1011E60, symbol: D_1011D90 } +aIncomingMsgSignal3Tex: + { type: TEXTURE, format: CI4, width: 16, height: 26, ctype: u8, offset: 0x1011D90, tlut: 0x1011E60, symbol: aIncomingMsgSignal3Tex } -D_1011E60: - { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011E60, symbol: D_1011E60 } +aIncomingMsgSignal3TLUT: + { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011E60, symbol: aIncomingMsgSignal3TLUT } D_1011E80: { type: TEXTURE, format: CI4, width: 16, height: 8, ctype: u8, offset: 0x1011E80, tlut: 0x1011EC0, symbol: D_1011E80 } @@ -275,11 +275,11 @@ D_1011E80: D_1011EC0: { type: TEXTURE, format: TLUT, colors: 8, ctype: u16, offset: 0x1011EC0, symbol: D_1011EC0 } -D_1011ED0: - { type: TEXTURE, format: CI4, width: 16, height: 7, ctype: u8, offset: 0x1011ED0, tlut: 0x1011F08, symbol: D_1011ED0 } +aXTex: + { type: TEXTURE, format: CI4, width: 16, height: 7, ctype: u8, offset: 0x1011ED0, tlut: 0x1011F08, symbol: aXTex } -D_1011F08: - { type: TEXTURE, format: TLUT, colors: 12, ctype: u16, offset: 0x1011F08, symbol: D_1011F08 } +aXTLUT: + { type: TEXTURE, format: TLUT, colors: 12, ctype: u16, offset: 0x1011F08, symbol: aXTLUT } D_1011F20: { type: GFX, offset: 0x1011F20, symbol: D_1011F20 } @@ -290,11 +290,11 @@ D_1012000: D_1012100: { type: TEXTURE, format: TLUT, colors: 8, offset: 0x1012100, ctype: u16, symbol: D_1012100 } -D_1012110: - { type: GFX, offset: 0x1012110, symbol: D_1012110 } +aGoldRingEmptySlotDL: + { type: GFX, offset: 0x1012110, symbol: aGoldRingEmptySlotDL } -D_1012190: - { type: TEXTURE, format: IA8, width: 16, height: 16, ctype: u8, offset: 0x1012190, symbol: D_1012190 } +aGoldRingEmptySlotTex: + { type: TEXTURE, format: IA8, width: 16, height: 16, ctype: u8, offset: 0x1012190, symbol: aGoldRingEmptySlotTex } D_1012290: { type: TEXTURE, format: CI8, width: 48, height: 22, ctype: u8, offset: 0x1012290, tlut: 0x10126B0, symbol: D_1012290 } @@ -314,17 +314,17 @@ D_1013780: D_10151F0: { type: TEXTURE, format: TLUT, colors: 146, ctype: u16, offset: 0x10151F0, symbol: D_10151F0 } -D_10127D0: - { type: TEXTURE, format: CI8, width: 40, height: 5, ctype: u8, offset: 0x10127D0, tlut: 0x1012898, symbol: D_10127D0 } +aBoostGaugeCoolTex: + { type: TEXTURE, format: CI8, width: 40, height: 5, ctype: u8, offset: 0x10127D0, tlut: 0x1012898, symbol: aBoostGaugeCoolTex } -D_1012898: - { type: TEXTURE, format: TLUT, colors: 20, ctype: u16, offset: 0x1012898, symbol: D_1012898 } +aBoostGaugeCoolTLUT: + { type: TEXTURE, format: TLUT, colors: 20, ctype: u16, offset: 0x1012898, symbol: aBoostGaugeCoolTLUT } -D_10128C0: - { type: TEXTURE, format: CI8, width: 40, height: 5, ctype: u8, offset: 0x10128C0, tlut: 0x1012988, symbol: D_10128C0 } +aBoostGaugeOverheatTex: + { type: TEXTURE, format: CI8, width: 40, height: 5, ctype: u8, offset: 0x10128C0, tlut: 0x1012988, symbol: aBoostGaugeOverheatTex } -D_1012988: - { type: TEXTURE, format: TLUT, colors: 28, ctype: u16, offset: 0x1012988, symbol: D_1012988 } +aBoostGaugeOverheatTLUT: + { type: TEXTURE, format: TLUT, colors: 28, ctype: u16, offset: 0x1012988, symbol: aBoostGaugeOverheatTLUT } D_10129C0: { type: TEXTURE, format: CI8, width: 16, height: 109, ctype: u8, offset: 0x10129C0, tlut: 0x1013090, symbol: D_10129C0 } @@ -332,17 +332,17 @@ D_10129C0: D_1013090: { type: TEXTURE, format: TLUT, colors: 112, ctype: u16, offset: 0x1013090, symbol: D_1013090 } -D_1013170: - { type: TEXTURE, format: CI8, width: 32, height: 32, ctype: u8, offset: 0x1013170, tlut: 0x1013570, symbol: D_1013170 } +aMsgWindowBgTex: + { type: TEXTURE, format: CI8, width: 32, height: 32, ctype: u8, offset: 0x1013170, tlut: 0x1013570, symbol: aMsgWindowBgTex } -D_1013570: - { type: TEXTURE, format: TLUT, colors: 8, ctype: u16, offset: 0x1013570, symbol: D_1013570 } +aMsgWindowBgTLUT: + { type: TEXTURE, format: TLUT, colors: 8, ctype: u16, offset: 0x1013570, symbol: aMsgWindowBgTLUT } -D_1013580: - { type: TEXTURE, format: CI8, width: 48, height: 8, ctype: u8, offset: 0x1013580, tlut: 0x1013700, symbol: D_1013580 } +aShieldGaugeTex: + { type: TEXTURE, format: CI8, width: 48, height: 8, ctype: u8, offset: 0x1013580, tlut: 0x1013700, symbol: aShieldGaugeTex } -D_1013700: - { type: TEXTURE, format: TLUT, colors: 58, ctype: u16, offset: 0x1013700, symbol: D_1013700 } +aShieldGaugeTLUT: + { type: TEXTURE, format: TLUT, colors: 58, ctype: u16, offset: 0x1013700, symbol: aShieldGaugeTLUT } D_1015320: { type: GFX, offset: 0x1015320, symbol: D_1015320 } @@ -353,11 +353,11 @@ D_10153F8: D_10154F8: { type: TEXTURE, format: TLUT, colors: 12, offset: 0x10154F8, ctype: u16, symbol: D_10154F8 } -D_1015510: - { type: GFX, offset: 0x1015510, symbol: D_1015510 } +aRadarMarkArwingDL: + { type: GFX, offset: 0x1015510, symbol: aRadarMarkArwingDL } -D_1015598: - { type: TEXTURE, format: IA8, width: 16, height: 16, ctype: u8, offset: 0x1015598, symbol: D_1015598 } +aRadarMarkArwingTex: + { type: TEXTURE, format: IA8, width: 16, height: 16, ctype: u8, offset: 0x1015598, symbol: aRadarMarkArwingTex } D_10156A0: { type: GFX, offset: 0x10156A0, symbol: D_10156A0 } @@ -563,8 +563,8 @@ D_101AED0: D_101AF98: { type: TEXTURE, format: RGBA16, width: 16, height: 16, ctype: u16, offset: 0x101AF98, symbol: D_101AF98 } -D_101B1A0: - { type: GFX, offset: 0x101B1A0, symbol: D_101B1A0 } +aGoldRingFrame12DL: + { type: GFX, offset: 0x101B1A0, symbol: aGoldRingFrame12DL } D_101B268: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101B268, tlut: 0x101B2E8, symbol: D_101B268 } @@ -572,8 +572,8 @@ D_101B268: D_101B2E8: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101B2E8, ctype: u16, symbol: D_101B2E8 } -D_101B310: - { type: GFX, offset: 0x101B310, symbol: D_101B310 } +aGoldRingFrame11DL: + { type: GFX, offset: 0x101B310, symbol: aGoldRingFrame11DL } D_101B3D8: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101B3D8, tlut: 0x101B458, symbol: D_101B3D8 } @@ -581,8 +581,8 @@ D_101B3D8: D_101B458: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101B458, ctype: u16, symbol: D_101B458 } -D_101B480: - { type: GFX, offset: 0x101B480, symbol: D_101B480 } +aGoldRingFrame10DL: + { type: GFX, offset: 0x101B480, symbol: aGoldRingFrame10DL } D_101B548: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101B548, tlut: 0x101B5C8, symbol: D_101B548 } @@ -590,8 +590,8 @@ D_101B548: D_101B5C8: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101B5C8, ctype: u16, symbol: D_101B5C8 } -D_101B5F0: - { type: GFX, offset: 0x101B5F0, symbol: D_101B5F0 } +aGoldRingFrame9DL: + { type: GFX, offset: 0x101B5F0, symbol: aGoldRingFrame9DL } D_101B6B8: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101B6B8, tlut: 0x101B738, symbol: D_101B6B8 } @@ -599,8 +599,8 @@ D_101B6B8: D_101B738: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101B738, ctype: u16, symbol: D_101B738 } -D_101B760: - { type: GFX, offset: 0x101B760, symbol: D_101B760 } +aGoldRingFrame8DL: + { type: GFX, offset: 0x101B760, symbol: aGoldRingFrame8DL } D_101B828: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101B828, tlut: 0x101B8A8, symbol: D_101B828 } @@ -608,8 +608,8 @@ D_101B828: D_101B8A8: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101B8A8, ctype: u16, symbol: D_101B8A8 } -D_101B8D0: - { type: GFX, offset: 0x101B8D0, symbol: D_101B8D0 } +aGoldRingFrame7DL: + { type: GFX, offset: 0x101B8D0, symbol: aGoldRingFrame7DL } D_101B998: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101B998, tlut: 0x101BA18, symbol: D_101B998 } @@ -617,8 +617,8 @@ D_101B998: D_101BA18: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101BA18, ctype: u16, symbol: D_101BA18 } -D_101BA40: - { type: GFX, offset: 0x101BA40, symbol: D_101BA40 } +aGoldRingFrame6DL: + { type: GFX, offset: 0x101BA40, symbol: aGoldRingFrame6DL } D_101BB08: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101BB08, tlut: 0x101BB88, symbol: D_101BB08 } @@ -626,8 +626,8 @@ D_101BB08: D_101BB88: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101BB88, ctype: u16, symbol: D_101BB88 } -D_101BBB0: - { type: GFX, offset: 0x101BBB0, symbol: D_101BBB0 } +aGoldRingFrame5DL: + { type: GFX, offset: 0x101BBB0, symbol: aGoldRingFrame5DL } D_101BC78: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101BC78, tlut: 0x101BCF8, symbol: D_101BC78 } @@ -635,8 +635,8 @@ D_101BC78: D_101BCF8: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101BCF8, ctype: u16, symbol: D_101BCF8 } -D_101BD20: - { type: GFX, offset: 0x101BD20, symbol: D_101BD20 } +aGoldRingFrame4DL: + { type: GFX, offset: 0x101BD20, symbol: aGoldRingFrame4DL } D_101BDE8: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101BDE8, tlut: 0x101BE68, symbol: D_101BDE8 } @@ -644,8 +644,8 @@ D_101BDE8: D_101BE68: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101BE68, ctype: u16, symbol: D_101BE68 } -D_101BE90: - { type: GFX, offset: 0x101BE90, symbol: D_101BE90 } +aGoldRingFrame3DL: + { type: GFX, offset: 0x101BE90, symbol: aGoldRingFrame3DL } D_101BF58: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101BF58, tlut: 0x101BFD8, symbol: D_101BF58 } @@ -653,8 +653,8 @@ D_101BF58: D_101BFD8: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101BFD8, ctype: u16, symbol: D_101BFD8 } -D_101C000: - { type: GFX, offset: 0x101C000, symbol: D_101C000 } +aGoldRingFrame2DL: + { type: GFX, offset: 0x101C000, symbol: aGoldRingFrame2DL } D_101C0C8: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101C0C8, tlut: 0x101C148, symbol: D_101C0C8 } @@ -662,8 +662,8 @@ D_101C0C8: D_101C148: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101C148, ctype: u16, symbol: D_101C148 } -D_101C170: - { type: GFX, offset: 0x101C170, symbol: D_101C170 } +aGoldRingFrame1DL: + { type: GFX, offset: 0x101C170, symbol: aGoldRingFrame1DL } D_101C238: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101C238, tlut: 0x101C2B8, symbol: D_101C238 } @@ -671,11 +671,11 @@ D_101C238: D_101C2B8: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101C2B8, ctype: u16, symbol: D_101C2B8 } -D_101C2E0: - { type: GFX, offset: 0x101C2E0, symbol: D_101C2E0 } +aStarDL: + { type: GFX, offset: 0x101C2E0, symbol: aStarDL } -D_101C368: - { type: TEXTURE, format: IA8, width: 32, height: 32, ctype: u8, colors: 20, offset: 0x101C368, symbol: D_101C368 } +aStarTex: + { type: TEXTURE, format: IA8, width: 32, height: 32, ctype: u8, colors: 20, offset: 0x101C368, symbol: aStarTex } D_101C770: { type: GFX, offset: 0x101C770, symbol: D_101C770 } @@ -833,8 +833,8 @@ aSlippyMarkTex: aSlippyMarkTLUT: { type: TEXTURE, format: TLUT, colors: 12, offset: 0x1024818, ctype: u16, symbol: aSlippyMarkTLUT } -D_1024830: - { type: GFX, offset: 0x1024830, symbol: D_1024830 } +aRadarMarkBossDL: + { type: GFX, offset: 0x1024830, symbol: aRadarMarkBossDL } D_10248F8: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x10248F8, tlut: 0x1024978, symbol: D_10248F8 } @@ -842,8 +842,8 @@ D_10248F8: D_1024978: { type: TEXTURE, format: TLUT, colors: 12, offset: 0x1024978, ctype: u16, symbol: D_1024978 } -D_1024990: - { type: GFX, offset: 0x1024990, symbol: D_1024990 } +aArrowDL: + { type: GFX, offset: 0x1024990, symbol: aArrowDL } D_1024A58: { type: TEXTURE, format: CI4, width: 16, height: 8, ctype: u8, offset: 0x1024A58, tlut: 0x1024A98, symbol: D_1024A58 } @@ -851,8 +851,8 @@ D_1024A58: D_1024A98: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x1024A98, ctype: u16, symbol: D_1024A98 } -D_1024AC0: - { type: GFX, offset: 0x1024AC0, symbol: D_1024AC0 } +aOrbDL: + { type: GFX, offset: 0x1024AC0, symbol: aOrbDL } D_1024B58: { type: TEXTURE, format: IA8, width: 32, height: 32, ctype: u8, offset: 0x1024B58, symbol: D_1024B58 } @@ -920,8 +920,8 @@ D_102A010: D_102A098: { type: TEXTURE, format: RGBA16, width: 32, height: 32, ctype: u16, offset: 0x102A098, symbol: D_102A098 } -D_102A8A0: - { type: GFX, offset: 0x102A8A0, symbol: D_102A8A0 } +aRadarMarkKaSaucererDL: + { type: GFX, offset: 0x102A8A0, symbol: aRadarMarkKaSaucererDL } D_102A928: { type: TEXTURE, format: RGBA16, width: 16, height: 16, ctype: u16, offset: 0x102A928, symbol: D_102A928 } diff --git a/assets/yaml/us/rev1/ast_corneria.yaml b/assets/yaml/us/rev1/ast_corneria.yaml index 2cc6ece2..b7448683 100644 --- a/assets/yaml/us/rev1/ast_corneria.yaml +++ b/assets/yaml/us/rev1/ast_corneria.yaml @@ -15,8 +15,8 @@ # Corneria # Former Army Base -D_CO_6000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 128, height: 28, offset: 0x6000000, symbol: D_CO_6000000 } +aCoTitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 128, height: 28, offset: 0x6000000, symbol: aCoTitleCardTex } aCoWaterfallDL: { type: GFX, offset: 0x6000E00, symbol: aCoWaterfallDL } diff --git a/assets/yaml/us/rev1/ast_font_3d.yaml b/assets/yaml/us/rev1/ast_font_3d.yaml index 745d6518..eb676ff8 100644 --- a/assets/yaml/us/rev1/ast_font_3d.yaml +++ b/assets/yaml/us/rev1/ast_font_3d.yaml @@ -8,11 +8,11 @@ - '#include "gfx.h"' - '#include "sf64object.h"' -D_FONT3D_9000000: - { type: GFX, offset: 0x9000000, symbol: D_FONT3D_9000000 } +aFont3D_DOT: + { type: GFX, offset: 0x9000000, symbol: aFont3D_DOT } -D_FONT3D_90001F0: - { type: GFX, offset: 0x90001F0, symbol: D_FONT3D_90001F0 } +aFont3D_1: + { type: GFX, offset: 0x90001F0, symbol: aFont3D_1 } D_FONT3D_9000528: { type: TEXTURE, ctype: u8, format: CI4, width: 8, height: 8, offset: 0x09000528, symbol: D_FONT3D_9000528, tlut: 0x09000548 } @@ -20,109 +20,109 @@ D_FONT3D_9000528: D_FONT3D_9000548: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x09000548, symbol: D_FONT3D_9000548 } -D_FONT3D_9000570: - { type: GFX, offset: 0x9000570, symbol: D_FONT3D_9000570 } +aFont3D_O: + { type: GFX, offset: 0x9000570, symbol: aFont3D_O } -D_FONT3D_9000980: - { type: GFX, offset: 0x9000980, symbol: D_FONT3D_9000980 } +aFont3D_D: + { type: GFX, offset: 0x9000980, symbol: aFont3D_D } -D_FONT3D_9001120: - { type: GFX, offset: 0x9001120, symbol: D_FONT3D_9001120 } +aFont3D_J: + { type: GFX, offset: 0x9001120, symbol: aFont3D_J } -D_FONT3D_90014E0: - { type: GFX, offset: 0x90014E0, symbol: D_FONT3D_90014E0 } +aFont3D_P: + { type: GFX, offset: 0x90014E0, symbol: aFont3D_P } -D_FONT3D_9001A10: - { type: GFX, offset: 0x9001A10, symbol: D_FONT3D_9001A10 } +aFont3D_Z: + { type: GFX, offset: 0x9001A10, symbol: aFont3D_Z } -D_FONT3D_9001E90: - { type: GFX, offset: 0x9001E90, symbol: D_FONT3D_9001E90 } +aFont3D_Y: + { type: GFX, offset: 0x9001E90, symbol: aFont3D_Y } -D_FONT3D_90022A0: - { type: GFX, offset: 0x90022A0, symbol: D_FONT3D_90022A0 } +aFont3D_X: + { type: GFX, offset: 0x90022A0, symbol: aFont3D_X } -D_FONT3D_9002890: - { type: GFX, offset: 0x9002890, symbol: D_FONT3D_9002890 } +aFont3D_W: + { type: GFX, offset: 0x9002890, symbol: aFont3D_W } -D_FONT3D_9002EA0: - { type: GFX, offset: 0x9002EA0, symbol: D_FONT3D_9002EA0 } +aFont3D_V: + { type: GFX, offset: 0x9002EA0, symbol: aFont3D_V } -D_FONT3D_9003230: - { type: GFX, offset: 0x9003230, symbol: D_FONT3D_9003230 } +aFont3D_U: + { type: GFX, offset: 0x9003230, symbol: aFont3D_U } -D_FONT3D_9003620: - { type: GFX, offset: 0x9003620, symbol: D_FONT3D_9003620 } +aFont3D_T: + { type: GFX, offset: 0x9003620, symbol: aFont3D_T } -D_FONT3D_9003A30: - { type: GFX, offset: 0x9003A30, symbol: D_FONT3D_9003A30 } +aFont3D_S: + { type: GFX, offset: 0x9003A30, symbol: aFont3D_S } -D_FONT3D_9004230: - { type: GFX, offset: 0x9004230, symbol: D_FONT3D_9004230 } +aFont3D_R: + { type: GFX, offset: 0x9004230, symbol: aFont3D_R } -D_FONT3D_9004920: - { type: GFX, offset: 0x9004920, symbol: D_FONT3D_9004920 } +aFont3D_Q: + { type: GFX, offset: 0x9004920, symbol: aFont3D_Q } -D_FONT3D_9004E10: - { type: GFX, offset: 0x9004E10, symbol: D_FONT3D_9004E10 } +aFont3D_N: + { type: GFX, offset: 0x9004E10, symbol: aFont3D_N } -D_FONT3D_9005380: - { type: GFX, offset: 0x9005380, symbol: D_FONT3D_9005380 } +aFont3D_M: + { type: GFX, offset: 0x9005380, symbol: aFont3D_M } -D_FONT3D_9005980: - { type: GFX, offset: 0x9005980, symbol: D_FONT3D_9005980 } +aFont3D_L: + { type: GFX, offset: 0x9005980, symbol: aFont3D_L } -D_FONT3D_9005CA0: - { type: GFX, offset: 0x9005CA0, symbol: D_FONT3D_9005CA0 } +aFont3D_K: + { type: GFX, offset: 0x9005CA0, symbol: aFont3D_K } -D_FONT3D_90062D0: - { type: GFX, offset: 0x90062D0, symbol: D_FONT3D_90062D0 } +aFont3D_I: + { type: GFX, offset: 0x90062D0, symbol: aFont3D_I } -D_FONT3D_9006500: - { type: GFX, offset: 0x9006500, symbol: D_FONT3D_9006500 } +aFont3D_H: + { type: GFX, offset: 0x9006500, symbol: aFont3D_H } -D_FONT3D_9006AE0: - { type: GFX, offset: 0x9006AE0, symbol: D_FONT3D_9006AE0 } +aFont3D_G: + { type: GFX, offset: 0x9006AE0, symbol: aFont3D_G } -D_FONT3D_90070C0: - { type: GFX, offset: 0x90070C0, symbol: D_FONT3D_90070C0 } +aFont3D_F: + { type: GFX, offset: 0x90070C0, symbol: aFont3D_F } -D_FONT3D_90075A0: - { type: GFX, offset: 0x90075A0, symbol: D_FONT3D_90075A0 } +aFont3D_E: + { type: GFX, offset: 0x90075A0, symbol: aFont3D_E } -D_FONT3D_9007BB0: - { type: GFX, offset: 0x9007BB0, symbol: D_FONT3D_9007BB0 } +aFont3D_C: + { type: GFX, offset: 0x9007BB0, symbol: aFont3D_C } -D_FONT3D_9007FD0: - { type: GFX, offset: 0x9007FD0, symbol: D_FONT3D_9007FD0 } +aFont3D_B: + { type: GFX, offset: 0x9007FD0, symbol: aFont3D_B } -D_FONT3D_90086F0: - { type: GFX, offset: 0x90086F0, symbol: D_FONT3D_90086F0 } +aFont3D_A: + { type: GFX, offset: 0x90086F0, symbol: aFont3D_A } -D_FONT3D_9008C60: - { type: GFX, offset: 0x9008C60, symbol: D_FONT3D_9008C60 } +aFont3D_9: + { type: GFX, offset: 0x9008C60, symbol: aFont3D_9 } -D_FONT3D_9009280: - { type: GFX, offset: 0x9009280, symbol: D_FONT3D_9009280 } +aFont3D_8: + { type: GFX, offset: 0x9009280, symbol: aFont3D_8 } -D_FONT3D_9009990: - { type: GFX, offset: 0x9009990, symbol: D_FONT3D_9009990 } +aFont3D_7: + { type: GFX, offset: 0x9009990, symbol: aFont3D_7 } -D_FONT3D_9009CB0: - { type: GFX, offset: 0x9009CB0, symbol: D_FONT3D_9009CB0 } +aFont3D_6: + { type: GFX, offset: 0x9009CB0, symbol: aFont3D_6 } -D_FONT3D_900A290: - { type: GFX, offset: 0x900A290, symbol: D_FONT3D_900A290 } +aFont3D_5: + { type: GFX, offset: 0x900A290, symbol: aFont3D_5 } -D_FONT3D_900A870: - { type: GFX, offset: 0x900A870, symbol: D_FONT3D_900A870 } +aFont3D_4: + { type: GFX, offset: 0x900A870, symbol: aFont3D_4 } -D_FONT3D_900AF60: - { type: GFX, offset: 0x900AF60, symbol: D_FONT3D_900AF60 } +aFont3D_3: + { type: GFX, offset: 0x900AF60, symbol: aFont3D_3 } -D_FONT3D_900B580: - { type: GFX, offset: 0x900B580, symbol: D_FONT3D_900B580 } +aFont3D_2: + { type: GFX, offset: 0x900B580, symbol: aFont3D_2 } -D_FONT3D_900BB90: - { type: GFX, offset: 0x900BB90, symbol: D_FONT3D_900BB90 } +aFont3D_0: + { type: GFX, offset: 0x900BB90, symbol: aFont3D_0 } # size = 0xC1D0 diff --git a/assets/yaml/us/rev1/ast_fortuna.yaml b/assets/yaml/us/rev1/ast_fortuna.yaml index 9c931460..db19f082 100644 --- a/assets/yaml/us/rev1/ast_fortuna.yaml +++ b/assets/yaml/us/rev1/ast_fortuna.yaml @@ -14,8 +14,8 @@ # Fortuna # Former Defense Post -D_FO_6000000: - { type: TEXTURE, format: IA8, width: 168, height: 28, offset: 0x6000000, ctype: u8, symbol: D_FO_6000000 } +aFoTitleCardTex: + { type: TEXTURE, format: IA8, width: 168, height: 28, offset: 0x6000000, ctype: u8, symbol: aFoTitleCardTex } D_FO_6001260: { type: TEXTURE, format: IA8, width: 16, height: 16, offset: 0x6001260, ctype: u8, symbol: D_FO_6001260 } diff --git a/assets/yaml/us/rev1/ast_katina.yaml b/assets/yaml/us/rev1/ast_katina.yaml index 7a1a7729..9aee758d 100644 --- a/assets/yaml/us/rev1/ast_katina.yaml +++ b/assets/yaml/us/rev1/ast_katina.yaml @@ -14,8 +14,8 @@ # Katina # Frontline Base -D_KA_6000000: - { type: TEXTURE, format: IA8, width: 168, height: 28, offset: 0x6000000, ctype: u8, symbol: D_KA_6000000 } +aKaTitleCardTex: + { type: TEXTURE, format: IA8, width: 168, height: 28, offset: 0x6000000, ctype: u8, symbol: aKaTitleCardTex } D_KA_6001260: { type: TEXTURE, format: IA8, width: 8, height: 8, offset: 0x6001260, ctype: u8, symbol: D_KA_6001260 } diff --git a/assets/yaml/us/rev1/ast_landmaster.yaml b/assets/yaml/us/rev1/ast_landmaster.yaml index 3269c031..641ca684 100644 --- a/assets/yaml/us/rev1/ast_landmaster.yaml +++ b/assets/yaml/us/rev1/ast_landmaster.yaml @@ -8,11 +8,11 @@ - '#include "gfx.h"' - '#include "sf64object.h"' -D_landmaster_3000000: - { type: TEXTURE, format: CI4, offset: 0x3000000, width: 16, height: 16, ctype: u8, tlut: 0x3000080, symbol: D_landmaster_3000000 } +aLandmasterLifeIconTex: + { type: TEXTURE, format: CI4, offset: 0x3000000, width: 16, height: 16, ctype: u8, tlut: 0x3000080, symbol: aLandmasterLifeIconTex } -D_landmaster_3000080: - { type: TEXTURE, format: TLUT, offset: 0x3000080, colors: 8, ctype: u16, symbol: D_landmaster_3000080 } +aLandmasterLifeIconTLUT: + { type: TEXTURE, format: TLUT, offset: 0x3000080, colors: 8, ctype: u16, symbol: aLandmasterLifeIconTLUT } aLandmasterModelDL: { type: GFX, offset: 0x3000090, symbol: aLandmasterModelDL } diff --git a/assets/yaml/us/rev1/ast_macbeth.yaml b/assets/yaml/us/rev1/ast_macbeth.yaml index 6f435c7b..0b84ef9e 100644 --- a/assets/yaml/us/rev1/ast_macbeth.yaml +++ b/assets/yaml/us/rev1/ast_macbeth.yaml @@ -13,8 +13,8 @@ - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' -D_MA_6000000: - {type: TEXTURE, format: IA8, ctype: u8, width: 160, height: 28, offset: 0x6000000, symbol: D_MA_6000000} +aMaTitleCardTex: + {type: TEXTURE, format: IA8, ctype: u8, width: 160, height: 28, offset: 0x6000000, symbol: aMaTitleCardTex} D_MA_6001180: {type: GFX, offset: 0x6001180, symbol: D_MA_6001180} diff --git a/assets/yaml/us/rev1/ast_map.yaml b/assets/yaml/us/rev1/ast_map.yaml index d920225d..18189455 100644 --- a/assets/yaml/us/rev1/ast_map.yaml +++ b/assets/yaml/us/rev1/ast_map.yaml @@ -9,20 +9,20 @@ - '#include "sf64object.h"' # Restart Game (Game Over) -D_MAP_6000000: - { type: TEXTURE, format: IA8, offset: 0x6000000, width: 96, height: 22, ctype: u8, symbol: D_MAP_6000000 } +aMapRetryCourseGameOverTex: + { type: TEXTURE, format: IA8, offset: 0x6000000, width: 96, height: 22, ctype: u8, symbol: aMapRetryCourseGameOverTex } # Proceed to Next Course -D_MAP_6000840: - { type: TEXTURE, format: IA8, offset: 0x6000840, width: 96, height: 22, ctype: u8, symbol: D_MAP_6000840 } +aMapProceedNextCourseTex: + { type: TEXTURE, format: IA8, offset: 0x6000840, width: 96, height: 22, ctype: u8, symbol: aMapProceedNextCourseTex } # Retry Course (Lose 1 Arwing) -D_MAP_6001080: - { type: TEXTURE, format: IA8, offset: 0x6001080, width: 96, height: 22, ctype: u8, symbol: D_MAP_6001080 } +aMapRetryCourseLose1UPTex: + { type: TEXTURE, format: IA8, offset: 0x6001080, width: 96, height: 22, ctype: u8, symbol: aMapRetryCourseLose1UPTex } # Change Course -D_MAP_60018C0: - { type: TEXTURE, format: IA8, offset: 0x60018C0, width: 96, height: 10, ctype: u8, symbol: D_MAP_60018C0 } +aMapChangeCourseTex: + { type: TEXTURE, format: IA8, offset: 0x60018C0, width: 96, height: 10, ctype: u8, symbol: aMapChangeCourseTex } # Aquas Ocean D_MAP_6001C80: @@ -148,55 +148,55 @@ D_MAP_6017640: D_MAP_6018280: { type: TEXTURE, format: IA8, offset: 0x6018280, width: 184, height: 19, ctype: u8, symbol: D_MAP_6018280 } -D_MAP_6019030: - { type: TEXTURE, format: IA8, offset: 0x6019030, width: 8, height: 16, ctype: u8, symbol: D_MAP_6019030 } +aMapPrologueTextFadeTex: + { type: TEXTURE, format: IA8, offset: 0x6019030, width: 8, height: 16, ctype: u8, symbol: aMapPrologueTextFadeTex } # Clouds ? -D_MAP_60190B0: - { type: TEXTURE, format: IA8, offset: 0x60190B0, width: 96, height: 96, ctype: u8, symbol: D_MAP_60190B0 } +aMapVenomCloudTex: + { type: TEXTURE, format: IA8, offset: 0x60190B0, width: 96, height: 96, ctype: u8, symbol: aMapVenomCloudTex } -D_MAP_601B4B0: - { type: TEXTURE, format: IA8, offset: 0x601B4B0, width: 32, height: 32, ctype: u8, symbol: D_MAP_601B4B0 } +aMapOptionBgTex: + { type: TEXTURE, format: IA8, offset: 0x601B4B0, width: 32, height: 32, ctype: u8, symbol: aMapOptionBgTex } # Some text in japanese D_MAP_601B8B0: { type: TEXTURE, format: IA8, offset: 0x601B8B0, width: 80, height: 26, ctype: u8, symbol: D_MAP_1B8B0 } -D_MAP_601C0D0: - { type: GFX, offset: 0x601C0D0, symbol: D_MAP_601C0D0 } +aMapSectorXDL: + { type: GFX, offset: 0x601C0D0, symbol: aMapSectorXDL } D_MAP_601C160: { type: TEXTURE, format: RGBA16, offset: 0x0601C160, width: 32, height: 32, ctype: u16, symbol: D_MAP_601C160 } -D_MAP_601C960: - { type: GFX, offset: 0x601C960, symbol: D_MAP_601C960 } +aMapSectorYDL: + { type: GFX, offset: 0x601C960, symbol: aMapSectorYDL } D_MAP_601C9F0: { type: TEXTURE, format: RGBA16, offset: 0x0601C9F0, width: 32, height: 32, ctype: u16, symbol: D_MAP_601C9F0 } -D_MAP_601D1F0: - { type: GFX, offset: 0x601D1F0, symbol: D_MAP_601D1F0 } +aMapMedalDL: + { type: GFX, offset: 0x601D1F0, symbol: aMapMedalDL } -D_MAP_601D2F0: - { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x0601D2F0, symbol: D_MAP_601D2F0, tlut: 0x0601DAF0 } +aMapMedalTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x0601D2F0, symbol: aMapMedalTex, tlut: 0x0601DAF0 } D_MAP_601DAF0: { type: TEXTURE, ctype: u16, format: TLUT, colors: 144, offset: 0x0601DAF0, symbol: D_MAP_601DAF0 } -D_MAP_601DC10: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0601DC10, symbol: D_MAP_601DC10, tlut: 0x0601DC90 } +aMapArwingIconTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0601DC10, symbol: aMapArwingIconTex, tlut: 0x0601DC90 } -D_MAP_601DC90: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x0601DC90, symbol: D_MAP_601DC90 } +aMapArwingIconTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x0601DC90, symbol: aMapArwingIconTLUT } -D_MAP_601DCA0: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 7, offset: 0x0601DCA0, symbol: D_MAP_601DCA0, tlut: 0x0601DCD8 } +aMapXTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 7, offset: 0x0601DCA0, symbol: aMapXTex, tlut: 0x0601DCD8 } -D_MAP_601DCD8: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 5, offset: 0x0601DCD8, symbol: D_MAP_601DCD8 } +aMapXTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 5, offset: 0x0601DCD8, symbol: aMapXTLUT } -D_MAP_601DCF0: - { type: GFX, offset: 0x601DCF0, symbol: D_MAP_601DCF0 } +aMapCursorDL: + { type: GFX, offset: 0x601DCF0, symbol: aMapCursorDL } D_MAP_601DDE8: { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0601DDE8, symbol: D_MAP_601DDE8, tlut: 0x0601DE68 } @@ -204,8 +204,8 @@ D_MAP_601DDE8: D_MAP_601DE68: { type: TEXTURE, ctype: u16, format: TLUT, colors: 12, offset: 0x0601DE68, symbol: D_MAP_601DE68 } -D_MAP_601DE80: - { type: GFX, offset: 0x601DE80, symbol: D_MAP_601DE80 } +aMapArea6DL: + { type: GFX, offset: 0x601DE80, symbol: aMapArea6DL } D_MAP_601F2B0: { type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 32, offset: 0x0601F2B0, symbol: D_MAP_601F2B0, tlut: 0x0601F4B0 } @@ -219,8 +219,8 @@ D_MAP_601E8F8: D_MAP_601E978: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x0601E978, symbol: D_MAP_601E978 } -D_MAP_601E9A0: - { type: GFX, offset: 0x601E9A0, symbol: D_MAP_601E9A0 } +aMapArea6ShipDL: + { type: GFX, offset: 0x601E9A0, symbol: aMapArea6ShipDL } D_MAP_601F4D0: { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0601F4D0, symbol: D_MAP_601F4D0, tlut: 0x0601F550 } @@ -240,110 +240,110 @@ D_MAP_601F610: D_MAP_601F690: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x0601F690, symbol: D_MAP_601F690 } -D_MAP_601F6B0: - { type: GFX, offset: 0x601F6B0, symbol: D_MAP_601F6B0 } +aMapSectorZDL: + { type: GFX, offset: 0x601F6B0, symbol: aMapSectorZDL } D_MAP_601F740: { type: TEXTURE, format: RGBA16, offset: 0x0601F740, width: 32, height: 32, ctype: u16, symbol: D_MAP_601F740 } # Looks like Aquas -D_MAP_601FF40: - { type: TEXTURE, format: CI8, offset: 0x601FF40, width: 96, height: 96, ctype: u8, symbol: D_MAP_601FF40, tlut: 0x06022340 } +aMapAquasTex: + { type: TEXTURE, format: CI8, offset: 0x601FF40, width: 96, height: 96, ctype: u8, symbol: aMapAquasTex, tlut: 0x06022340 } -D_MAP_6022340: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 75, offset: 0x06022340, symbol: D_MAP_6022340 } +gMapAquasTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 80, offset: 0x06022340, symbol: gMapAquasTLUT } # Looks like Venom -D_MAP_60223E0: - { type: TEXTURE, format: CI8, offset: 0x60223E0, width: 96, height: 96, ctype: u8, symbol: D_MAP_60223E0, tlut: 0x060247E0 } +aMapVenomTex: + { type: TEXTURE, format: CI8, offset: 0x60223E0, width: 96, height: 96, ctype: u8, symbol: aMapVenomTex, tlut: 0x060247E0 } -D_MAP_60247E0: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 84, offset: 0x060247E0, symbol: D_MAP_60247E0 } +gMapVenomTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 88, offset: 0x060247E0, symbol: gMapVenomTLUT } # Looks like Corneria -D_MAP_6024890: - { type: TEXTURE, format: CI8, offset: 0x6024890, width: 96, height: 96, ctype: u8, symbol: D_MAP_6024890, tlut: 0x06026C90 } +aMapCorneriaTex: + { type: TEXTURE, format: CI8, offset: 0x6024890, width: 96, height: 96, ctype: u8, symbol: aMapCorneriaTex, tlut: 0x06026C90 } -D_MAP_6026C90: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 108, offset: 0x06026C90, symbol: D_MAP_6026C90 } +gMapCorneriaTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 112, offset: 0x06026C90, symbol: gMapCorneriaTLUT } # Looks like Zones -D_MAP_6026D70: - { type: TEXTURE, format: CI8, offset: 0x6026D70, width: 96, height: 96, ctype: u8, symbol: D_MAP_6026D70, tlut: 0x06029170 } +aMapFortunaTex: + { type: TEXTURE, format: CI8, offset: 0x6026D70, width: 96, height: 96, ctype: u8, symbol: aMapFortunaTex, tlut: 0x06029170 } -D_MAP_6029170: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 84, offset: 0x06029170, symbol: D_MAP_6029170 } +gMapFortunaTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 88, offset: 0x06029170, symbol: gMapFortunaTLUT } # Looks like Solar -D_MAP_6029220: - { type: TEXTURE, format: CI8, offset: 0x6029220, width: 96, height: 96, ctype: u8, symbol: D_MAP_6029220, tlut: 0x0602B620 } +aMapKatinaTex: + { type: TEXTURE, format: CI8, offset: 0x6029220, width: 96, height: 96, ctype: u8, symbol: aMapKatinaTex, tlut: 0x0602B620 } -D_MAP_602B620: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 84, offset: 0x0602B620, symbol: D_MAP_602B620 } +gMapKatinaTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 88, offset: 0x0602B620, symbol: gMapKatinaTLUT } # Looks like Macbeth -D_MAP_602B6D0: - { type: TEXTURE, format: CI8, offset: 0x602B6D0, width: 96, height: 96, ctype: u8, symbol: D_MAP_602B6D0, tlut: 0x0602DAD0 } +aMapMacbethTex: + { type: TEXTURE, format: CI8, offset: 0x602B6D0, width: 96, height: 96, ctype: u8, symbol: aMapMacbethTex, tlut: 0x0602DAD0 } -D_MAP_602DAD0: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 68, offset: 0x0602DAD0, symbol: D_MAP_602DAD0 } +gMapMacbethTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 72, offset: 0x0602DAD0, symbol: gMapMacbethTLUT } # Looks like Sector Z -D_MAP_602DB60: - { type: TEXTURE, format: CI8, offset: 0x602DB60, width: 96, height: 96, ctype: u8, symbol: D_MAP_602DB60, tlut: 0x0602FF60 } +aMapTitaniaTex: + { type: TEXTURE, format: CI8, offset: 0x602DB60, width: 96, height: 96, ctype: u8, symbol: aMapTitaniaTex, tlut: 0x0602FF60 } -D_MAP_602FF60: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 56, offset: 0x0602FF60, symbol: D_MAP_602FF60 } +gMapTitaniaTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 56, offset: 0x0602FF60, symbol: gMapTitaniaTLUT } -D_MAP_602FFD0: - { type: TEXTURE, format: CI8, offset: 0x602FFD0, width: 96, height: 96, ctype: u8, symbol: D_MAP_602FFD0, tlut: 0x060323D0 } +aMapZonessTex: + { type: TEXTURE, format: CI8, offset: 0x602FFD0, width: 96, height: 96, ctype: u8, symbol: aMapZonessTex, tlut: 0x060323D0 } -D_MAP_60323D0: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 52, offset: 0x060323D0, symbol: D_MAP_60323D0 } +gMapZonessTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 56, offset: 0x060323D0, symbol: gMapZonessTLUT } # Portrait of Falco -D_MAP_6032440: - { type: TEXTURE, format: RGBA16, offset: 0x06032440, width: 28, height: 28, ctype: u16, symbol: D_MAP_6032440 } +aMapRadioCharFalcoTex: + { type: TEXTURE, format: RGBA16, offset: 0x06032440, width: 28, height: 28, ctype: u16, symbol: aMapRadioCharFalcoTex } # Portrait of Peppy -D_MAP_6032A60: - { type: TEXTURE, format: RGBA16, offset: 0x06032A60, width: 28, height: 28, ctype: u16, symbol: D_MAP_6032A60 } +aMapRadioCharPeppyTex: + { type: TEXTURE, format: RGBA16, offset: 0x06032A60, width: 28, height: 28, ctype: u16, symbol: aMapRadioCharPeppyTex } # Picture of Peppy, James and Pigma used in the narrated intro. -D_MAP_6033080: - { type: TEXTURE, format: RGBA16, offset: 0x06033080, width: 96, height: 52, ctype: u16, symbol: D_MAP_6033080 } +aMapPrologue3Tex: + { type: TEXTURE, format: RGBA16, offset: 0x06033080, width: 96, height: 52, ctype: u16, symbol: aMapPrologue3Tex } # Picture of Andross, General Pepper and Venom in the background, used in the narrated intro. -D_MAP_6035780: - { type: TEXTURE, format: RGBA16, offset: 0x06035780, width: 96, height: 52, ctype: u16, symbol: D_MAP_6035780 } +aMapPrologue2Tex: + { type: TEXTURE, format: RGBA16, offset: 0x06035780, width: 96, height: 52, ctype: u16, symbol: aMapPrologue2Tex } # Picture of Andross, hands open, Corneria in the middle, used in the narrated intro. -D_MAP_6037E80: - { type: TEXTURE, format: RGBA16, offset: 0x06037E80, width: 96, height: 52, ctype: u16, symbol: D_MAP_6037E80 } +aMapPrologue6Tex: + { type: TEXTURE, format: RGBA16, offset: 0x06037E80, width: 96, height: 52, ctype: u16, symbol: aMapPrologue6Tex } # Picture of an Arwing dodging attacks from enemies, used in the narrated intro. -D_MAP_603A580: - { type: TEXTURE, format: RGBA16, offset: 0x0603A580, width: 96, height: 52, ctype: u16, symbol: D_MAP_603A580 } +aMapPrologue4Tex: + { type: TEXTURE, format: RGBA16, offset: 0x0603A580, width: 96, height: 52, ctype: u16, symbol: aMapPrologue4Tex } # Picture of Slippy, Peppy, Fox and Falco, used in the narrated intro. -D_MAP_603CC80: - { type: TEXTURE, format: RGBA16, offset: 0x0603CC80, width: 96, height: 52, ctype: u16, symbol: D_MAP_603CC80 } +aMapPrologue7Tex: + { type: TEXTURE, format: RGBA16, offset: 0x0603CC80, width: 96, height: 52, ctype: u16, symbol: aMapPrologue7Tex } # Picture of Peppy returning from Vemon, used in the narrated intro. -D_MAP_603F380: - { type: TEXTURE, format: RGBA16, offset: 0x0603F380, width: 96, height: 52, ctype: u16, symbol: D_MAP_603F380 } +aMapPrologue5Tex: + { type: TEXTURE, format: RGBA16, offset: 0x0603F380, width: 96, height: 52, ctype: u16, symbol: aMapPrologue5Tex } # Picture of Corneria, used in the narrated intro. -D_MAP_6041A80: - { type: TEXTURE, format: RGBA16, offset: 0x06041A80, width: 96, height: 52, ctype: u16, symbol: D_MAP_6041A80 } +aMapPrologue1Tex: + { type: TEXTURE, format: RGBA16, offset: 0x06041A80, width: 96, height: 52, ctype: u16, symbol: aMapPrologue1Tex } # Portrait of Slippy -D_MAP_6044180: - { type: TEXTURE, format: RGBA16, offset: 0x06044180, width: 28, height: 28, ctype: u16, symbol: D_MAP_6044180 } +aMapRadioCharSlippyTex: + { type: TEXTURE, format: RGBA16, offset: 0x06044180, width: 28, height: 28, ctype: u16, symbol: aMapRadioCharSlippyTex } # White Square ? -D_MAP_60447A0: - { type: TEXTURE, format: RGBA16, offset: 0x060447A0, width: 8, height: 8, ctype: u16, symbol: D_MAP_60447A0 } +aMapWhiteSquareTex: + { type: TEXTURE, format: RGBA16, offset: 0x060447A0, width: 8, height: 8, ctype: u16, symbol: aMapWhiteSquareTex } # Picture of Fox receiving orders from General Pepper, used in the map (briefing) D_MAP_6044820: @@ -354,29 +354,29 @@ D_MAP_6046CD0: { type: TEXTURE, format: RGBA16, offset: 0x06046CD0, width: 32, height: 34, ctype: u16, symbol: D_MAP_6046CD0 } # Black Square with borders. -D_MAP_6047550: - { type: TEXTURE, format: RGBA16, offset: 0x06047550, width: 24, height: 24, ctype: u16, symbol: D_MAP_6047550 } +aMapPathBoxTex: + { type: TEXTURE, format: RGBA16, offset: 0x06047550, width: 24, height: 24, ctype: u16, symbol: aMapPathBoxTex } -D_MAP_60479D0: - { type: GFX, offset: 0x60479D0, symbol: D_MAP_60479D0 } +aMapPlanetExplosionDL: + { type: GFX, offset: 0x60479D0, symbol: aMapPlanetExplosionDL } D_MAP_6047A68: { type: TEXTURE, format: IA8, offset: 0x06047A68, width: 32, height: 32, ctype: u8, symbol: D_MAP_6047A68 } -D_MAP_6047E70: - { type: GFX, offset: 0x6047E70, symbol: D_MAP_6047E70 } +aMapVenomCloudDL: + { type: GFX, offset: 0x6047E70, symbol: aMapVenomCloudDL } -D_MAP_6047F80: - { type: TEXTURE, format: IA8, offset: 0x06047F80, width: 64, height: 32, ctype: u8, symbol: D_MAP_6047F80 } +aMapVenomCloud1Tex: + { type: TEXTURE, format: IA8, offset: 0x06047F80, width: 64, height: 32, ctype: u8, symbol: aMapVenomCloud1Tex } -D_MAP_6048780: - { type: TEXTURE, format: IA8, offset: 0x06048780, width: 64, height: 32, ctype: u8, symbol: D_MAP_6048780 } +aMapVenomCloud2Tex: + { type: TEXTURE, format: IA8, offset: 0x06048780, width: 64, height: 32, ctype: u8, symbol: aMapVenomCloud2Tex } D_MAP_6048F80: { type: TEXTURE, format: IA8, offset: 0x06048F80, width: 64, height: 64, ctype: u8, symbol: D_MAP_6048F80 } -D_MAP_6049F80: - { type: GFX, offset: 0x6049F80, symbol: D_MAP_6049F80 } +aMapExplosion4DL: + { type: GFX, offset: 0x6049F80, symbol: aMapExplosion4DL } D_MAP_604A048: { type: TEXTURE, format: CI8, offset: 0x0604A048, width: 16, height: 16, ctype: u8, symbol: D_MAP_604A048, tlut: 0x0602FF60 } @@ -384,8 +384,8 @@ D_MAP_604A048: D_MAP_604A148: { type: TEXTURE, ctype: u16, format: TLUT, colors: 32, offset: 0x0604A148, symbol: D_MAP_604A148 } -D_MAP_604A190: - { type: GFX, offset: 0x604A190, symbol: D_MAP_604A190 } +aMapExplosion3DL: + { type: GFX, offset: 0x604A190, symbol: aMapExplosion3DL } D_MAP_604A258: { type: TEXTURE, format: CI8, offset: 0x0604A258, width: 16, height: 16, ctype: u8, symbol: D_MAP_604A258, tlut: 0x0604A358 } @@ -393,8 +393,8 @@ D_MAP_604A258: D_MAP_604A358: { type: TEXTURE, ctype: u16, format: TLUT, colors: 80, offset: 0x0604A358, symbol: D_MAP_604A358 } -D_MAP_604A400: - { type: GFX, offset: 0x604A400, symbol: D_MAP_604A400 } +aMapExplosion2DL: + { type: GFX, offset: 0x604A400, symbol: aMapExplosion2DL } D_MAP_604A4C8: { type: TEXTURE, format: CI8, offset: 0x0604A4C8, width: 16, height: 16, ctype: u8, symbol: D_MAP_604A4C8, tlut: 0x0604A5C8 } @@ -402,8 +402,8 @@ D_MAP_604A4C8: D_MAP_604A5C8: { type: TEXTURE, ctype: u16, format: TLUT, colors: 160, offset: 0x0604A5C8, symbol: D_MAP_604A5C8 } -D_MAP_604A710: - { type: GFX, offset: 0x604A710, symbol: D_MAP_604A710 } +aMapExplosion1DL: + { type: GFX, offset: 0x604A710, symbol: aMapExplosion1DL } D_MAP_604A7D8: { type: TEXTURE, format: CI8, offset: 0x0604A7D8, width: 16, height: 16, ctype: u8, symbol: D_MAP_604A7D8, tlut: 0x0604A8D8 } @@ -434,8 +434,8 @@ D_MAP_604B650: { type: TEXTURE, format: RGBA16, offset: 0x0604B650, width: 8, height: 16, ctype: u16, symbol: D_MAP_604B650 } # Model of Bolse -D_MAP_604B750: - { type: GFX, offset: 0x604B750, symbol: D_MAP_604B750 } +aMapBolseDL: + { type: GFX, offset: 0x604B750, symbol: aMapBolseDL } D_MAP_604BC48: { type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 32, offset: 0x0604BC48, symbol: D_MAP_604BC48, tlut: 0x0604BC48 } @@ -462,20 +462,20 @@ D_MAP_604C328: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x0604C328, symbol: D_MAP_604C328 } # Television outcoming light Model, used during briefing. -D_MAP_604C350: - { type: GFX, offset: 0x604C350, symbol: D_MAP_604C350 } +aMapTvScreenGlowDL: + { type: GFX, offset: 0x604C350, symbol: aMapTvScreenGlowDL } -D_MAP_604C4C0: - { type: TEXTURE, format: IA8, offset: 0x0604C4C0, width: 8, height: 16, ctype: u8, symbol: D_MAP_604C4C0 } +aMapTvScreenGlowTex: + { type: TEXTURE, format: IA8, offset: 0x0604C4C0, width: 8, height: 16, ctype: u8, symbol: aMapTvScreenGlowTex } -D_MAP_604C540: - { type: GFX, offset: 0x604C540, symbol: D_MAP_604C540 } +aMapTitaniaRings1DL: + { type: GFX, offset: 0x604C540, symbol: aMapTitaniaRings1DL } D_MAP_604C5D8: { type: TEXTURE, format: IA8, offset: 0x0604C5D8, width: 32, height: 64, ctype: u8, symbol: D_MAP_604C5D8 } -D_MAP_604CDE0: - { type: GFX, offset: 0x604CDE0, symbol: D_MAP_604CDE0 } +aMapTitaniaRings2DL: + { type: GFX, offset: 0x604CDE0, symbol: aMapTitaniaRings2DL } D_MAP_604CE78: { type: TEXTURE, format: IA8, offset: 0x0604CE78, width: 32, height: 64, ctype: u8, symbol: D_MAP_604CE78 } @@ -487,8 +487,8 @@ D_MAP_604D708: { type: TEXTURE, format: IA8, offset: 0x0604D708, width: 32, height: 32, ctype: u8, symbol: D_MAP_604D708 } # Solar Rays -D_MAP_604DB10: - { type: GFX, offset: 0x604DB10, symbol: D_MAP_604DB10 } +aMapSolarDL: + { type: GFX, offset: 0x604DB10, symbol: aMapSolarDL } D_MAP_604DD20: { type: TEXTURE, format: IA8, offset: 0x0604DD20, width: 128, height: 32, ctype: u8, symbol: D_MAP_604DD20 } @@ -502,8 +502,8 @@ D_MAP_604FD20: D_MAP_6050D20: { type: TEXTURE, format: IA8, offset: 0x06050D20, width: 128, height: 32, ctype: u8, symbol: D_MAP_6050D20 } -D_MAP_6051D20: - { type: GFX, offset: 0x6051D20, symbol: D_MAP_6051D20 } +aMapGralPepperFace2DL: + { type: GFX, offset: 0x6051D20, symbol: aMapGralPepperFace2DL } D_MAP_6051F20: { type: TEXTURE, format: RGBA16, offset: 0x06051F20, width: 64, height: 32, ctype: u16, symbol: D_MAP_6051F20 } @@ -517,8 +517,8 @@ D_MAP_6053F20: D_MAP_6054F20: { type: TEXTURE, format: RGBA16, offset: 0x06054F20, width: 64, height: 32, ctype: u16, symbol: D_MAP_6054F20 } -D_MAP_6055F20: - { type: GFX, offset: 0x6055F20, symbol: D_MAP_6055F20 } +aMapGralPepperFace1DL: + { type: GFX, offset: 0x6055F20, symbol: aMapGralPepperFace1DL } D_MAP_6056120: { type: TEXTURE, format: RGBA16, offset: 0x06056120, width: 64, height: 32, ctype: u16, symbol: D_MAP_6056120 } @@ -568,8 +568,8 @@ D_MAP_605F610: D_MAP_605FE10: { type: TEXTURE, format: IA8, offset: 0x0605FE10, width: 64, height: 32, ctype: u8, symbol: D_MAP_605FE10 } -D_MAP_6060610: - { type: GFX, offset: 0x6060610, symbol: D_MAP_6060610 } +aMapMeteorDL: + { type: GFX, offset: 0x6060610, symbol: aMapMeteorDL } D_MAP_6060698: { type: TEXTURE, format: RGBA16, offset: 0x06060698, width: 32, height: 32, ctype: u16, symbol: D_MAP_6060698 } diff --git a/assets/yaml/us/rev1/ast_meteo.yaml b/assets/yaml/us/rev1/ast_meteo.yaml index 9d364b6b..89e45169 100644 --- a/assets/yaml/us/rev1/ast_meteo.yaml +++ b/assets/yaml/us/rev1/ast_meteo.yaml @@ -14,8 +14,8 @@ - '#include "sf64mesg.h"' # Meteo # Asteroid Field -D_ME_6000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 28, offset: 0x6000000, symbol: D_ME_6000000 } +aMeTitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 28, offset: 0x6000000, symbol: aMeTitleCardTex } D_ME_6000A80: { type: GFX, offset: 0x6000A80, symbol: D_ME_6000A80 } diff --git a/assets/yaml/us/rev1/ast_option.yaml b/assets/yaml/us/rev1/ast_option.yaml index b3f3637a..b63cec13 100644 --- a/assets/yaml/us/rev1/ast_option.yaml +++ b/assets/yaml/us/rev1/ast_option.yaml @@ -30,82 +30,82 @@ D_OPT_80038C0: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x80038C0, symbol: D_OPT_80038C0 } # nd -D_OPT_80038E0: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 10, offset: 0x80038E0, symbol: D_OPT_80038E0, tlut: 0x8003930 } +aNdTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 10, offset: 0x80038E0, symbol: aNdTex, tlut: 0x8003930 } -D_OPT_8003930: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x8003930, symbol: D_OPT_8003930 } +aNdTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x8003930, symbol: aNdTLUT } # rd -D_OPT_8003950: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 11, offset: 0x8003950, symbol: D_OPT_8003950, tlut: 0x80039A8 } +aRdTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 11, offset: 0x8003950, symbol: aRdTex, tlut: 0x80039A8 } -D_OPT_80039A8: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x80039A8, symbol: D_OPT_80039A8 } +aRdTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x80039A8, symbol: aRdTLUT } # -D_OPT_80039D0: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x80039D0 , symbol: D_OPT_80039D0, tlut: 0x8003A50 } +aSpeakerCenterTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x80039D0 , symbol: aSpeakerCenterTex, tlut: 0x8003A50 } -D_OPT_8003A50: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x8003A50, symbol: D_OPT_8003A50 } +aSpeakerCenterTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x8003A50, symbol: aSpeakerCenterTLUT } # st -D_OPT_8003A70: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 9, offset: 0x8003A70, symbol: D_OPT_8003A70, tlut: 0x8003AB8 } +aStTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 9, offset: 0x8003A70, symbol: aStTex, tlut: 0x8003AB8 } -D_OPT_8003AB8: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x8003AB8, symbol: D_OPT_8003AB8 } +aStTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x8003AB8, symbol: aStTLUT } # th -D_OPT_8003AE0: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 9, offset: 0x8003AE0, symbol: D_OPT_8003AE0, tlut: 0x8003B28 } +aThTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 9, offset: 0x8003AE0, symbol: aThTex, tlut: 0x8003B28 } -D_OPT_8003B28: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x8003B28, symbol: D_OPT_8003B28 } +aThTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x8003B28, symbol: aThTLUT } # Option Title Cards # Main Game -D_OPT_8003B50: - { type: TEXTURE, ctype: u8, format: IA8, width: 72, height: 12, offset: 0x8003B50, symbol: D_OPT_8003B50 } +aMainGameCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 72, height: 12, offset: 0x8003B50, symbol: aMainGameCardTex } # Training -D_OPT_8003EB0: - { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 12, offset: 0x8003EB0, symbol: D_OPT_8003EB0 } +aTrainingCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 12, offset: 0x8003EB0, symbol: aTrainingCardTex } # Vs. -D_OPT_8004270: - { type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 10, offset: 0x8004270, symbol: D_OPT_8004270 } +aVsCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 10, offset: 0x8004270, symbol: aVsCardTex } # Ranking -D_OPT_80043B0: - { type: TEXTURE, ctype: u8, format: IA8, width: 64, height: 12, offset: 0x80043B0, symbol: D_OPT_80043B0 } +aRankingCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 64, height: 12, offset: 0x80043B0, symbol: aRankingCardTex } # Sound -D_OPT_80046B0: - { type: TEXTURE, ctype: u8, format: IA8, width: 64, height: 10, offset: 0x80046B0, symbol: D_OPT_80046B0 } +aSoundCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 64, height: 10, offset: 0x80046B0, symbol: aSoundCardTex } # Data -D_OPT_8004930: - { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 10, offset: 0x8004930, symbol: D_OPT_8004930 } +aDataCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 10, offset: 0x8004930, symbol: aDataCardTex } -D_OPT_8004C50: - { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 12, offset: 0x8004C50, symbol: D_OPT_8004C50 } +aExpertCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 12, offset: 0x8004C50, symbol: aExpertCardTex } # Option VS Cards # Point Match -D_OPT_8005010: - { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 13, offset: 0x8005010, symbol: D_OPT_8005010 } +aVsPointMatchCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 13, offset: 0x8005010, symbol: aVsPointMatchCardTex } # Battle Royal -D_OPT_80054F0: - { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 11, offset: 0x80054F0, symbol: D_OPT_80054F0 } +aVsBattleRoyalCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 11, offset: 0x80054F0, symbol: aVsBattleRoyalCardTex } # Time Trial -D_OPT_8005910: - { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 10, offset: 0x8005910, symbol: D_OPT_8005910 } +aVsTimeTrialCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 10, offset: 0x8005910, symbol: aVsTimeTrialCardTex } # Sound Options @@ -130,8 +130,8 @@ D_OPT_8006D10: { type: TEXTURE, ctype: u8, format: IA8, width: 24, height: 13, offset: 0x8006D10, symbol: D_OPT_8006D10 } # B to cancel -D_OPT_8006E50: - { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 10, offset: 0x8006E50, symbol: D_OPT_8006E50 } +aBtoCancelTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 10, offset: 0x8006E50, symbol: aBtoCancelTex } # Headphone D_OPT_8007210: @@ -146,8 +146,8 @@ D_OPT_80079F0: { type: TEXTURE, ctype: u8, format: IA8, width: 128, height: 14, offset: 0x80079F0, symbol: D_OPT_80079F0 } # A to confirm -D_OPT_80080F0: - { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 10, offset: 0x80080F0, symbol: D_OPT_80080F0 } +aAtoConfirmTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 10, offset: 0x80080F0, symbol: aAtoConfirmTex } # Clear Saved Data D_OPT_80084B0: @@ -193,27 +193,27 @@ D_OPT_800D1F0: D_OPT_800E0F0: { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x800E0F0, symbol: D_OPT_800E0F0 } -D_OPT_800E130: - { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x800E130, symbol: D_OPT_800E130 } +aArrowTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x800E130, symbol: aArrowTex } # Mercenary Unit STARFOX Fox Mccloud D_OPT_800E170: { type: TEXTURE, ctype: u16, format: RGBA16, width: 188, height: 60, offset: 0x800E170, symbol: D_OPT_800E170 } # ScrollBar -D_OPT_8013990: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 104, height: 10, offset: 0x8013990, symbol: D_OPT_8013990 } +aSliderFrameTex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 104, height: 10, offset: 0x8013990, symbol: aSliderFrameTex } # ScrollBar Indicator -D_OPT_80141B0: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x80141B0, symbol: D_OPT_80141B0 } +aSliderTex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x80141B0, symbol: aSliderTex } # Speaker -D_OPT_80143B0: - { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x80143B0, symbol: D_OPT_80143B0, tlut: 0x80147B0 } +aSpeakerTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x80143B0, symbol: aSpeakerTex, tlut: 0x80147B0 } -D_OPT_80147B0: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 32, offset: 0x80147B0, symbol: D_OPT_80147B0 } +aSpeakerTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 32, offset: 0x80147B0, symbol: aSpeakerTLUT } D_OPT_80147F0: { type: GFX, offset: 0x80147F0, symbol: D_OPT_80147F0 } @@ -242,8 +242,8 @@ D_OPT_8015550: D_OPT_80155E8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x080155E8, symbol: D_OPT_80155E8 } -D_OPT_8015DF0: - { type: GFX, offset: 0x8015DF0, symbol: D_OPT_8015DF0 } +aLightningDL: + { type: GFX, offset: 0x8015DF0, symbol: aLightningDL } -D_OPT_8015E88: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x08015E88, symbol: D_OPT_8015E88 } +aLightningTex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x08015E88, symbol: aLightningTex } diff --git a/assets/yaml/us/rev1/ast_sector_x.yaml b/assets/yaml/us/rev1/ast_sector_x.yaml index e36aea16..cc8fa3a8 100644 --- a/assets/yaml/us/rev1/ast_sector_x.yaml +++ b/assets/yaml/us/rev1/ast_sector_x.yaml @@ -13,8 +13,8 @@ - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' -D_SX_6000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 12, offset: 0x6000000, symbol: D_SX_6000000 } +aSxTitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 12, offset: 0x6000000, symbol: aSxTitleCardTex } aSxSpaceMineDL: { type: GFX, offset: 0x6000840, symbol: aSxSpaceMineDL } diff --git a/assets/yaml/us/rev1/ast_sector_y.yaml b/assets/yaml/us/rev1/ast_sector_y.yaml index 3039dccc..f4a999d5 100644 --- a/assets/yaml/us/rev1/ast_sector_y.yaml +++ b/assets/yaml/us/rev1/ast_sector_y.yaml @@ -15,8 +15,8 @@ - '#include "sf64mesg.h"' # Sector Y: Combat Zone -D_SY_6000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 12, offset: 0x6000000, symbol: D_SY_6000000 } +aSyTitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 12, offset: 0x6000000, symbol: aSyTitleCardTex } # Saruzin flagship icon in radar D_SY_6000840: diff --git a/assets/yaml/us/rev1/ast_sector_z.yaml b/assets/yaml/us/rev1/ast_sector_z.yaml index 9dde3d7c..0038ef9e 100644 --- a/assets/yaml/us/rev1/ast_sector_z.yaml +++ b/assets/yaml/us/rev1/ast_sector_z.yaml @@ -14,8 +14,8 @@ - '#include "sf64mesg.h"' # Sector Z: Combat Zone -D_SZ_6000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 12, offset: 0x6000000, symbol: D_SZ_6000000 } +aSzTitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 12, offset: 0x6000000, symbol: aSzTitleCardTex } # One of the so called "Boss titles", unused in the game. A version of the same thing # seems to have been implemented in the 3DS version. @@ -94,8 +94,8 @@ D_SZ_6004458: D_SZ_6004558: { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x06004558, symbol: D_SZ_6004558 } -D_SZ_6004570: - { type: GFX, offset: 0x6004570, symbol: D_SZ_6004570 } +aSzMissileRadarMarkDL: + { type: GFX, offset: 0x6004570, symbol: aSzMissileRadarMarkDL } aSzSpaceJunk4DL: { type: GFX, offset: 0x60045E0, symbol: aSzSpaceJunk4DL } diff --git a/assets/yaml/us/rev1/ast_solar.yaml b/assets/yaml/us/rev1/ast_solar.yaml index a6e5ee0e..80989a56 100644 --- a/assets/yaml/us/rev1/ast_solar.yaml +++ b/assets/yaml/us/rev1/ast_solar.yaml @@ -13,8 +13,8 @@ - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' -D_SO_6000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 112, height: 13, offset: 0x6000000, symbol: D_SO_6000000} +aSoTitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 112, height: 13, offset: 0x6000000, symbol: aSoTitleCardTex} D_SO_60005B0: { type: GFX, offset: 0x60005B0, symbol: D_SO_60005B0} diff --git a/assets/yaml/us/rev1/ast_text.yaml b/assets/yaml/us/rev1/ast_text.yaml index faaadd71..d68f5913 100644 --- a/assets/yaml/us/rev1/ast_text.yaml +++ b/assets/yaml/us/rev1/ast_text.yaml @@ -53,8 +53,8 @@ aTextMissionNo: { type: TEXTURE, ctype: u8, format: IA8, width: 112, height: 19, offset: 0x5000500, symbol: aTextMissionNo } # Training -aTextTraining: - { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 12, offset: 0x5000D50, symbol: aTextTraining } +aTrTitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 12, offset: 0x5000D50, symbol: aTrTitleCardTex } # Enemies Down aTextEnemiesDown: diff --git a/assets/yaml/us/rev1/ast_titania.yaml b/assets/yaml/us/rev1/ast_titania.yaml index a0cc8a19..3d9ad2ec 100644 --- a/assets/yaml/us/rev1/ast_titania.yaml +++ b/assets/yaml/us/rev1/ast_titania.yaml @@ -13,8 +13,8 @@ - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' -D_TI_6000000: - {type: TEXTURE, format: IA8, ctype: u8, width: 96, height: 28, offset: 0x6000000, symbol: D_TI_6000000} +aTiTitleCardTex: + {type: TEXTURE, format: IA8, ctype: u8, width: 96, height: 28, offset: 0x6000000, symbol: aTiTitleCardTex} D_TI_6000A80: {type: GFX, offset: 0x6000A80, symbol: D_TI_6000A80} diff --git a/assets/yaml/us/rev1/ast_title.yaml b/assets/yaml/us/rev1/ast_title.yaml index a369b62e..d1799354 100644 --- a/assets/yaml/us/rev1/ast_title.yaml +++ b/assets/yaml/us/rev1/ast_title.yaml @@ -8,75 +8,75 @@ - '#include "gfx.h"' - '#include "sf64object.h"' -starfox_logo: { type: TEXTURE, ctype: u16, format: RGBA16, width: 236, height: 60, offset: 0x6000000, symbol: gTitleStarfoxLogo } +aTitleStarfoxLogoTex: { type: TEXTURE, ctype: u16, format: RGBA16, width: 236, height: 60, offset: 0x6000000, symbol: aTitleStarfoxLogoTex } -nintendo64_logo: { type: TEXTURE, ctype: u16, format: RGBA16, width: 128, height: 88, offset: 0x6006EA0, symbol: gTitleNintendo64Logo } +aTitleN64LogoTex: { type: TEXTURE, ctype: u16, format: RGBA16, width: 128, height: 88, offset: 0x6006EA0, symbol: aTitleN64LogoTex } -radio_static: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x600C6A0, symbol: gTitleRadioStatic } +gTitleRadioStatic: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x600C6A0, symbol: gTitleRadioStatic } -sun_beam: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x600D5C0, symbol: gTitleSunBeam } +aTitleSunGlareTex: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x600D5C0, symbol: aTitleSunGlareTex } -nintendo_copyright: { type: TEXTURE, ctype: u8, format: IA8, width: 120, height: 12, offset: 0x600DDC0, symbol: gTitleNintendoCopyright } +a1997NintendoTex: { type: TEXTURE, ctype: u8, format: IA8, width: 120, height: 12, offset: 0x600DDC0, symbol: a1997NintendoTex } -press_start: { type: TEXTURE, ctype: u8, format: IA8, width: 120, height: 13, offset: 0x600E360, symbol: gTitlePressStart } +aTitlePressStartTex: { type: TEXTURE, ctype: u8, format: IA8, width: 120, height: 13, offset: 0x600E360, symbol: aTitlePressStartTex } -great_fox_card: { type: TEXTURE, ctype: u8, format: IA8, width: 144, height: 28, offset: 0x600E980, symbol: gTitleGreatFoxCard } +aTitleGreatFoxCardTex: { type: TEXTURE, ctype: u8, format: IA8, width: 144, height: 28, offset: 0x600E980, symbol: aTitleGreatFoxCardTex } -slippy_card: { type: TEXTURE, ctype: u8, format: IA8, width: 144, height: 13, offset: 0x600F940, symbol: gTitleSlippyCard } +gTitleSlippyCard: { type: TEXTURE, ctype: u8, format: IA8, width: 144, height: 13, offset: 0x600F940, symbol: gTitleSlippyCard } -peppy_card: { type: TEXTURE, ctype: u8, format: IA8, width: 120, height: 13, offset: 0x6010090, symbol: gTitlePeppyCard } +gTitlePeppyCard: { type: TEXTURE, ctype: u8, format: IA8, width: 120, height: 13, offset: 0x6010090, symbol: gTitlePeppyCard } -falco_card: { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 13, offset: 0x60106B0, symbol: gTitleFalcoCard } +gTitleFalcoCard: { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 13, offset: 0x60106B0, symbol: gTitleFalcoCard } -fox_card: { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 13, offset: 0x6010FA0, symbol: gTitleFoxCard } +gTitleFoxCard: { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 13, offset: 0x6010FA0, symbol: gTitleFoxCard } -arwing_card: { type: TEXTURE, ctype: u8, format: IA8, width: 112, height: 26, offset: 0x6011890, symbol: gTitleArwingCard } +aTitleArwingCardTex: { type: TEXTURE, ctype: u8, format: IA8, width: 112, height: 26, offset: 0x6011890, symbol: aTitleArwingCardTex } -no_controller: { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 24, offset: 0x60123F0, symbol: gTitleNoController } +aTitleNoControllerTex: { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 24, offset: 0x60123F0, symbol: aTitleNoControllerTex } -copyright_symbol: { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x6013470, symbol: gTitleCopyrightSymbol } +aTitleCopyrightTex: { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x6013470, symbol: aTitleCopyrightTex } -unused_nintendo_copyright: { type: TEXTURE, ctype: u8, format: IA8, width: 168, height: 18, offset: 0x6013570, symbol: gTitleUnusedNintendoCopyright } +gTitleUnusedNintendoCopyright: { type: TEXTURE, ctype: u8, format: IA8, width: 168, height: 18, offset: 0x6013570, symbol: gTitleUnusedNintendoCopyright } -starfox_text_intro: { type: TEXTURE, ctype: u8, format: CI4, width: 256, height: 13, offset: 0x6014140, tlut: 0x60147C0, symbol: gTextIntroStarfox } +aIntroStarfoxLogoTex: { type: TEXTURE, ctype: u8, format: CI4, width: 256, height: 13, offset: 0x6014140, tlut: 0x60147C0, symbol: aIntroStarfoxLogoTex } -starfox_text_intro_palette: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x60147C0, symbol: gTextIntroStarfoxPalette } +aIntroStarfoxLogoTLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x60147C0, symbol: aIntroStarfoxLogoTLUT } -in_text_intro: { type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 13, offset: 0x60147E0, tlut: 0x60147C0, symbol: gTextIntroIn } +aIntroInTex: { type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 13, offset: 0x60147E0, tlut: 0x60147C0, symbol: aIntroInTex } -in_text_intro_palette: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x60148B0, symbol: gTextIntroInPalette } +aIntroInTLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x60148B0, symbol: aIntroInTLUT } -D_TITLE_60148D0: { type: GFX, offset: 0x60148D0, symbol: D_TITLE_60148D0 } +a64LogoDL: { type: GFX, offset: 0x60148D0, symbol: a64LogoDL } -D_TITLE_6014DE8: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x6014DE8, tlut: 0x60155E8, symbol: D_TITLE_6014DE8 } +a64Logo1Tex: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x6014DE8, tlut: 0x60155E8, symbol: a64Logo1Tex } -D_TITLE_60155E8: { type: TEXTURE, ctype: u16, format: TLUT, colors: 152, offset: 0x60155E8, symbol: D_TITLE_60155E8 } +a64Logo1TLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 152, offset: 0x60155E8, symbol: a64Logo1TLUT } -D_TITLE_6015718: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 63, offset: 0x6015718, tlut: 0x6015EF8, symbol: D_TITLE_6015718 } +a64Logo2Tex: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 63, offset: 0x6015718, tlut: 0x6015EF8, symbol: a64Logo2Tex } -D_TITLE_6015EF8: { type: TEXTURE, ctype: u16, format: TLUT, colors: 64, offset: 0x6015EF8, symbol: D_TITLE_6015EF8 } +a64Logo2TLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 64, offset: 0x6015EF8, symbol: a64Logo2TLUT } -D_TITLE_6015F78: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x6015F78, tlut: 0x6016778, symbol: D_TITLE_6015F78 } +a64Logo3Tex: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x6015F78, tlut: 0x6016778, symbol: a64Logo3Tex } -D_TITLE_6016778: { type: TEXTURE, ctype: u16, format: TLUT, colors: 200, offset: 0x6016778, symbol: D_TITLE_6016778 } +a64Logo3TLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 200, offset: 0x6016778, symbol: a64Logo3TLUT } -D_TITLE_6016908: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 63, offset: 0x6016908, tlut: 0x60170E8, symbol: D_TITLE_6016908 } +a64Logo4Tex: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 63, offset: 0x6016908, tlut: 0x60170E8, symbol: a64Logo4Tex } -D_TITLE_60170E8: { type: TEXTURE, ctype: u16, format: TLUT, colors: 144, offset: 0x60170E8, symbol: D_TITLE_60170E8 } +a64Logo4TLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 144, offset: 0x60170E8, symbol: a64Logo4TLUT } -D_TITLE_6017208: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x6017208, tlut: 0x6017A08, symbol: D_TITLE_6017208 } +a64Logo5Tex: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x6017208, tlut: 0x6017A08, symbol: a64Logo5Tex } -D_TITLE_6017A08: { type: TEXTURE, ctype: u16, format: TLUT, colors: 136, offset: 0x6017A08, symbol: D_TITLE_6017A08 } +a64Logo5TLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 136, offset: 0x6017A08, symbol: a64Logo5TLUT } -D_TITLE_6017B18: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x6017B18, tlut: 0x6018318, symbol: D_TITLE_6017B18 } +a64Logo6Tex: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x6017B18, tlut: 0x6018318, symbol: a64Logo6Tex } -D_TITLE_6018318: { type: TEXTURE, ctype: u16, format: TLUT, colors: 200, offset: 0x6018318, symbol: D_TITLE_6018318 } +a64Logo6TLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 200, offset: 0x6018318, symbol: a64Logo6TLUT } -D_TITLE_60184A8: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x60184A8, tlut: 0x6018CA8, symbol: D_TITLE_60184A8 } +a64Logo7Tex: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x60184A8, tlut: 0x6018CA8, symbol: a64Logo7Tex } -D_TITLE_6018CA8: { type: TEXTURE, ctype: u16, format: TLUT, colors: 76, offset: 0x6018CA8, symbol: D_TITLE_6018CA8 } +a64Logo7TLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 76, offset: 0x6018CA8, symbol: a64Logo7TLUT } -D_TITLE_6018D40: { type: GFX, offset: 0x6018D40, symbol: D_TITLE_6018D40 } +aTitleGreatFoxDeckDL: { type: GFX, offset: 0x6018D40, symbol: aTitleGreatFoxDeckDL } D_TITLE_60195C0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60195C0, symbol: D_TITLE_60195C0 } @@ -88,9 +88,9 @@ D_TITLE_601B5C0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: D_TITLE_601B7C0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x601B7C0, symbol: D_TITLE_601B7C0 } -D_TITLE_601BFC0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x601BFC0, symbol: D_TITLE_601BFC0 } +aTitleCsPassageWayWallTex: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x601BFC0, symbol: aTitleCsPassageWayWallTex } -D_TITLE_601C7C0: { type: GFX, offset: 0x601C7C0, symbol: D_TITLE_601C7C0 } +aTitleGreatFoxDeckLauncherDL: { type: GFX, offset: 0x601C7C0, symbol: aTitleGreatFoxDeckLauncherDL } D_TITLE_601CCD0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x601CCD0, symbol: D_TITLE_601CCD0 } @@ -98,9 +98,9 @@ D_TITLE_601CED0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: D_TITLE_601CF50: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x601CF50, symbol: D_TITLE_601CF50 } -D_TITLE_601D750: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x601D750, tlut: 0x601DB50, symbol: D_TITLE_601D750 } +aNoControllerBgTex: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x601D750, tlut: 0x601DB50, symbol: aNoControllerBgTex } -D_TITLE_601DB50: { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x601DB50, symbol: D_TITLE_601DB50 } +aNoControllerBgTLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x601DB50, symbol: aNoControllerBgTLUT } D_TITLE_601E424: { type: SF64:ANIM, offset: 0x601E424, symbol: D_TITLE_601E424 } @@ -164,9 +164,9 @@ D_TITLE_6029BE4: { type: SF64:ANIM, offset: 0x6029BE4, symbol: D_TITLE_6029BE4 } D_TITLE_602A710: { type: SF64:ANIM, offset: 0x602A710, symbol: D_TITLE_602A710 } -D_TITLE_602A720: { type: GFX, offset: 0x602A720, symbol: D_TITLE_602A720 } +aTitleGreatFoxDeckPlatformDL: { type: GFX, offset: 0x602A720, symbol: aTitleGreatFoxDeckPlatformDL } -D_TITLE_602A8C0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x602A8C0, symbol: D_TITLE_602A8C0 } +aTitleCsPassageWayCeilingTex: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x602A8C0, symbol: aTitleCsPassageWayCeilingTex } D_TITLE_602B8C0: { type: GFX, offset: 0x602B8C0, symbol: D_TITLE_602B8C0 } @@ -178,41 +178,41 @@ D_TITLE_602DD30: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: D_TITLE_602DF30: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x602DF30, symbol: D_TITLE_602DF30 } -D_TITLE_602E380: { type: GFX, offset: 0x602E380, symbol: D_TITLE_602E380 } +aTitleCsPassageWayDL: { type: GFX, offset: 0x602E380, symbol: aTitleCsPassageWayDL } -D_TITLE_602E550: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x602E550, symbol: D_TITLE_602E550 } +aTitleCsPassageWayFloorTex: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x602E550, symbol: aTitleCsPassageWayFloorTex } -D_TITLE_602F8E0: { type: SF64:ANIM, offset: 0x602F8E0, symbol: D_TITLE_602F8E0 } +aFoxRunningAnim: { type: SF64:ANIM, offset: 0x602F8E0, symbol: aFoxRunningAnim } -D_TITLE_602FBAC: {type: SF64:SKELETON, offset: 0x602FBAC, symbol: D_TITLE_602FBAC} +aFoxSkel: {type: SF64:SKELETON, offset: 0x602FBAC, symbol: aFoxSkel} -D_TITLE_60305C0: { type: SF64:ANIM, offset: 0x60305C0, symbol: D_TITLE_60305C0 } +aFalcoRunningAnim: { type: SF64:ANIM, offset: 0x60305C0, symbol: aFalcoRunningAnim } -D_TITLE_603088C: {type: SF64:SKELETON, offset: 0x603088C, symbol: D_TITLE_603088C} +aFalcoSkel: {type: SF64:SKELETON, offset: 0x603088C, symbol: aFalcoSkel} -D_TITLE_6031120: { type: SF64:ANIM, offset: 0x6031120, symbol: D_TITLE_6031120 } +aSlippyRunningAnim: { type: SF64:ANIM, offset: 0x6031120, symbol: aSlippyRunningAnim } -D_TITLE_60313AC: {type: SF64:SKELETON, offset: 0x60313AC, symbol: D_TITLE_60313AC} +aSlippySkel: {type: SF64:SKELETON, offset: 0x60313AC, symbol: aSlippySkel} -D_TITLE_6031DB8: { type: SF64:ANIM, offset: 0x6031DB8, symbol: D_TITLE_6031DB8 } +aPeppyRunningAnim: { type: SF64:ANIM, offset: 0x6031DB8, symbol: aPeppyRunningAnim } -D_TITLE_6032084: {type: SF64:SKELETON, offset: 0x6032084, symbol: D_TITLE_6032084} +aPeppySkel: {type: SF64:SKELETON, offset: 0x6032084, symbol: aPeppySkel} -D_TITLE_60320E0: { type: GFX, offset: 0x60320E0, symbol: D_TITLE_60320E0 } +aTitleArwingEngineGlowDL: { type: GFX, offset: 0x60320E0, symbol: aTitleArwingEngineGlowDL } -D_TITLE_6032178: {type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 32, offset: 0x6032178, symbol: D_TITLE_6032178} +aTitleArwingEngineGlowTex: {type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 32, offset: 0x6032178, symbol: aTitleArwingEngineGlowTex} -D_TITLE_6032580: { type: GFX, offset: 0x6032580, symbol: D_TITLE_6032580 } +aTitleArwingShadowDL: { type: GFX, offset: 0x6032580, symbol: aTitleArwingShadowDL } -D_TITLE_6032608: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6032608, symbol: D_TITLE_6032608 } +aTitleArwingShadowTex: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6032608, symbol: aTitleArwingShadowTex } -D_TITLE_60338DC: { type: SF64:ANIM, offset: 0x60338DC, symbol: D_TITLE_60338DC } +aFalcoAnim: { type: SF64:ANIM, offset: 0x60338DC, symbol: aFalcoAnim } -D_TITLE_6035024: { type: SF64:ANIM, offset: 0x6035024, symbol: D_TITLE_6035024 } +aFoxAnim: { type: SF64:ANIM, offset: 0x6035024, symbol: aFoxAnim } -D_TITLE_603531C: { type: SF64:ANIM, offset: 0x603531C, symbol: D_TITLE_603531C } +aPeppyAnim: { type: SF64:ANIM, offset: 0x603531C, symbol: aPeppyAnim } -D_TITLE_6036278: { type: SF64:ANIM, offset: 0x6036278, symbol: D_TITLE_6036278 } +aSlippyAnim: { type: SF64:ANIM, offset: 0x6036278, symbol: aSlippyAnim } D_TITLE_6036290: { type: GFX, offset: 0x6036290, symbol: D_TITLE_6036290 } @@ -222,7 +222,7 @@ D_TITLE_6036B30: { type: GFX, offset: 0x6036B30, symbol: D_TITLE_6036B30 } D_TITLE_6036BC8: { type: TEXTURE, ctype: u16, format: IA16, width: 32, height: 32, offset: 0x6036BC8, symbol: D_TITLE_6036BC8 } -D_TITLE_6037CF0: { type: GFX, offset: 0x6037CF0, symbol: D_TITLE_6037CF0 } +aPlanetCorneriaDL: { type: GFX, offset: 0x6037CF0, symbol: aPlanetCorneriaDL } D_TITLE_60380D0: {type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x60380D0, symbol: D_TITLE_60380D0} @@ -242,7 +242,7 @@ D_TITLE_603F0D0: {type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: D_TITLE_60408C0: { type: GFX, offset: 0x60408C0, symbol: D_TITLE_60408C0 } -D_TITLE_6041070: { type: GFX, offset: 0x6041070, symbol: D_TITLE_6041070 } +aTeamShadowDL: { type: GFX, offset: 0x6041070, symbol: aTeamShadowDL } D_TITLE_60410F8: {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60410F8, symbol: D_TITLE_60410F8} diff --git a/assets/yaml/us/rev1/ast_venom_1.yaml b/assets/yaml/us/rev1/ast_venom_1.yaml index 95fc884a..cb8fd9f8 100644 --- a/assets/yaml/us/rev1/ast_venom_1.yaml +++ b/assets/yaml/us/rev1/ast_venom_1.yaml @@ -19,8 +19,8 @@ D_VE1_6000000: D_VE1_6000A80: { type: TEXTURE, format: IA8, width: 40, height: 19, offset: 0x6000A80, ctype: u8, symbol: D_VE1_6000A80 } -D_VE1_6000D80: - { type: TEXTURE, format: IA8, width: 128, height: 28, offset: 0x6000D80, ctype: u8, symbol: D_VE1_6000D80 } +aVe1TitleCardTex: + { type: TEXTURE, format: IA8, width: 128, height: 28, offset: 0x6000D80, ctype: u8, symbol: aVe1TitleCardTex } D_VE1_6001B80: { type: TEXTURE, format: IA8, width: 128, height: 19, offset: 0x6001B80, ctype: u8, symbol: D_VE1_6001B80 } diff --git a/assets/yaml/us/rev1/ast_venom_2.yaml b/assets/yaml/us/rev1/ast_venom_2.yaml index f3246b04..661e1bde 100644 --- a/assets/yaml/us/rev1/ast_venom_2.yaml +++ b/assets/yaml/us/rev1/ast_venom_2.yaml @@ -18,8 +18,8 @@ D_VE2_6000000: D_VE2_6000A80: { type: TEXTURE, format: IA8, width: 112, height: 19, offset: 0x6000A80, ctype: u8, symbol: D_VE2_6000A80 } -D_VE2_60012D0: - { type: TEXTURE, format: IA8, width: 128, height: 28, offset: 0x60012D0, ctype: u8, symbol: D_VE2_60012D0 } +aVe2TitleCardTex: + { type: TEXTURE, format: IA8, width: 128, height: 28, offset: 0x60012D0, ctype: u8, symbol: aVe2TitleCardTex } D_VE2_60020D0: { type: TEXTURE, format: IA8, width: 104, height: 19, offset: 0x60020D0, ctype: u8, symbol: D_VE2_60020D0 } diff --git a/assets/yaml/us/rev1/ast_versus.yaml b/assets/yaml/us/rev1/ast_versus.yaml index d0b75a41..b9ccd2f1 100644 --- a/assets/yaml/us/rev1/ast_versus.yaml +++ b/assets/yaml/us/rev1/ast_versus.yaml @@ -72,14 +72,14 @@ D_versus_3000A10: D_versus_3000B00: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x3000B00, symbol: D_versus_3000B00 } -D_versus_3000B20: - { type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 5, offset: 0x3000B20, symbol: D_versus_3000B20 } +aVsBoostGaugeFrameTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 5, offset: 0x3000B20, symbol: aVsBoostGaugeFrameTex } -D_versus_3000BC0: - { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 26, offset: 0x3000BC0, symbol: D_versus_3000BC0 } +aVsShieldGaugeFrameTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 26, offset: 0x3000BC0, symbol: aVsShieldGaugeFrameTex } -D_versus_30013E0: - { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x30013E0, symbol: D_versus_30013E0 } +aVsStarTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x30013E0, symbol: aVsStarTex } D_versus_3001420: { type: TEXTURE, ctype: u8, format: CI8, width: 256, height: 42, offset: 0x3001420, symbol: D_versus_3001420, tlut: 0x3003E20 } @@ -141,20 +141,20 @@ D_versus_300C660: D_versus_300D150: {type: TEXTURE, ctype: u16, format: TLUT, colors: 251, offset: 0x300D150, symbol: D_versus_300D150 } -D_versus_300D350: - { type: TEXTURE, ctype: u8, format: CI8, width: 24, height: 3, offset: 0x300D350, symbol: D_versus_300D350, tlut: 0x300D398 } -D_versus_300D398: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x300D398, symbol: D_versus_300D398 } +aVsBoostGaugeCoolTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 24, height: 3, offset: 0x300D350, symbol: aVsBoostGaugeCoolTex, tlut: 0x300D398 } +aVsBoostGaugeCoolTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x300D398, symbol: aVsBoostGaugeCoolTLUT } -D_versus_300D3C0: - { type: TEXTURE, ctype: u8, format: CI8, width: 24, height: 3, offset: 0x300D3C0, symbol: D_versus_300D3C0, tlut: 0x300D408 } -D_versus_300D408: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 24, offset: 0x300D408, symbol: D_versus_300D408 } +aVsBoostGaugeOverheatTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 24, height: 3, offset: 0x300D3C0, symbol: aVsBoostGaugeOverheatTex, tlut: 0x300D408 } +aVsBoostGaugeOverheatTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 24, offset: 0x300D408, symbol: aVsBoostGaugeOverheatTLUT } -D_versus_300D440: - { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 4, offset: 0x300D440, symbol: D_versus_300D440, tlut: 0x300D500 } -D_versus_300D500: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 40, offset: 0x300D500, symbol: D_versus_300D500 } +aVsShieldGaugeTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 4, offset: 0x300D440, symbol: aVsShieldGaugeTex, tlut: 0x300D500 } +aVsShieldGaugeTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 40, offset: 0x300D500, symbol: aVsShieldGaugeTLUT } D_versus_300D550: { type: GFX, offset: 0x300D550, symbol: D_versus_300D550} diff --git a/assets/yaml/us/rev1/ast_vs_menu.yaml b/assets/yaml/us/rev1/ast_vs_menu.yaml index 28cd189e..6f0cd152 100644 --- a/assets/yaml/us/rev1/ast_vs_menu.yaml +++ b/assets/yaml/us/rev1/ast_vs_menu.yaml @@ -8,23 +8,23 @@ - '#include "gfx.h"' - '#include "sf64object.h"' -D_VS_MENU_7000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 13, offset: 0x7000000, symbol: D_VS_MENU_7000000} +aVsPlayerNum1Tex: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 13, offset: 0x7000000, symbol: aVsPlayerNum1Tex} -D_VS_MENU_70000D0: - { type: TEXTURE, ctype: u8, format: IA8, width: 24, height: 13, offset: 0x70000D0, symbol: D_VS_MENU_70000D0} +aVsPlayerNum2Tex: + { type: TEXTURE, ctype: u8, format: IA8, width: 24, height: 13, offset: 0x70000D0, symbol: aVsPlayerNum2Tex} -D_VS_MENU_7000210: - { type: TEXTURE, ctype: u8, format: IA8, width: 24, height: 13, offset: 0x7000210, symbol: D_VS_MENU_7000210} +aVsPlayerNum3Tex: + { type: TEXTURE, ctype: u8, format: IA8, width: 24, height: 13, offset: 0x7000210, symbol: aVsPlayerNum3Tex} -D_VS_MENU_7000350: - { type: TEXTURE, ctype: u8, format: IA8, width: 24, height: 13, offset: 0x7000350, symbol: D_VS_MENU_7000350} +aVsPlayerNum4Tex: + { type: TEXTURE, ctype: u8, format: IA8, width: 24, height: 13, offset: 0x7000350, symbol: aVsPlayerNum4Tex} D_VS_MENU_7000490: { type: TEXTURE, ctype: u8, format: IA8, width: 64, height: 42, offset: 0x7000490, symbol: D_VS_MENU_7000490} -D_VS_MENU_7000F10: - { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 7, offset: 0x7000F10, symbol: D_VS_MENU_7000F10} +aVsTextContTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 7, offset: 0x7000F10, symbol: aVsTextContTex} D_VS_MENU_7001030: { type: TEXTURE, ctype: u8, format: IA8, width: 64, height: 9, offset: 0x7001030, symbol: D_VS_MENU_7001030} @@ -32,14 +32,14 @@ D_VS_MENU_7001030: D_VS_MENU_7001270: { type: TEXTURE, ctype: u8, format: IA8, width: 112, height: 12, offset: 0x7001270, symbol: D_VS_MENU_7001270} -D_VS_MENU_70017B0: - { type: TEXTURE, ctype: u8, format: IA8, width: 56, height: 10, offset: 0x70017B0, symbol: D_VS_MENU_70017B0} +aVsTextCorneriaTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 56, height: 10, offset: 0x70017B0, symbol: aVsTextCorneriaTex} -D_VS_MENU_70019E0: - { type: TEXTURE, ctype: u8, format: IA8, width: 56, height: 10, offset: 0x70019E0, symbol: D_VS_MENU_70019E0} +aVsTextSectorZTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 56, height: 10, offset: 0x70019E0, symbol: aVsTextSectorZTex} -D_VS_MENU_7001C10: - { type: TEXTURE, ctype: u8, format: IA8, width: 48, height: 10, offset: 0x7001C10, symbol: D_VS_MENU_7001C10} +aVsTextKatinaTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 48, height: 10, offset: 0x7001C10, symbol: aVsTextKatinaTex} D_VS_MENU_7001DF0: { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 10, offset: 0x7001DF0, symbol: D_VS_MENU_7001DF0} @@ -62,14 +62,14 @@ D_VS_MENU_7002BF0: D_VS_MENU_7002E50: { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 15, offset: 0x7002E50, symbol: D_VS_MENU_7002E50} -D_VS_MENU_70030B0: - { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 12, offset: 0x70030B0, symbol: D_VS_MENU_70030B0} +aVsHandicapLvl1Tex: + { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 12, offset: 0x70030B0, symbol: aVsHandicapLvl1Tex} -D_VS_MENU_7003290: - { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 12, offset: 0x7003290, symbol: D_VS_MENU_7003290} +aVsHandicapLvl2Tex: + { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 12, offset: 0x7003290, symbol: aVsHandicapLvl2Tex} -D_VS_MENU_7003470: - { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 12, offset: 0x7003470, symbol: D_VS_MENU_7003470} +aVsHandicapLvl3Tex: + { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 12, offset: 0x7003470, symbol: aVsHandicapLvl3Tex} D_VS_MENU_7003650: { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 12, offset: 0x7003650, symbol: D_VS_MENU_7003650} @@ -116,29 +116,29 @@ D_VS_MENU_70044D0: D_VS_MENU_7004990: { type: TEXTURE, ctype: u16, format: TLUT, colors: 17, offset: 0x7004990, symbol: D_VS_MENU_7004990} -D_VS_MENU_70049C0: - { type: TEXTURE, ctype: u8, format: CI8, width: 56, height: 8, offset: 0x70049C0, symbol: D_VS_MENU_70049C0, tlut: 0x7004B80} +aVsFoxNameTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 56, height: 8, offset: 0x70049C0, symbol: aVsFoxNameTex, tlut: 0x7004B80} -D_VS_MENU_7004B80: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 18, offset: 0x7004B80, symbol: D_VS_MENU_7004B80} +aVsFoxNameTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 18, offset: 0x7004B80, symbol: aVsFoxNameTLUT} -D_VS_MENU_7004BB0: - { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 10, offset: 0x7004BB0, symbol: D_VS_MENU_7004BB0, tlut: 0x7004D90} +aVsPeppyNameTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 10, offset: 0x7004BB0, symbol: aVsPeppyNameTex, tlut: 0x7004D90} -D_VS_MENU_7004D90: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 18, offset: 0x7004D90, symbol: D_VS_MENU_7004D90} +aVsPeppyNameTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 18, offset: 0x7004D90, symbol: aVsPeppyNameTLUT} -D_VS_MENU_7004DC0: - { type: TEXTURE, ctype: u8, format: CI8, width: 56, height: 10, offset: 0x7004DC0, symbol: D_VS_MENU_7004DC0, tlut: 0x7004FF0} +aVsSlippyNameTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 56, height: 10, offset: 0x7004DC0, symbol: aVsSlippyNameTex, tlut: 0x7004FF0} -D_VS_MENU_7004FF0: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 18, offset: 0x7004FF0, symbol: D_VS_MENU_7004FF0} +aVsSlippyNameTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 18, offset: 0x7004FF0, symbol: aVsSlippyNameTLUT} -D_VS_MENU_7005020: - { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 8, offset: 0x7005020, symbol: D_VS_MENU_7005020, tlut: 0x70051A0} +aVsFalcoNameTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 8, offset: 0x7005020, symbol: aVsFalcoNameTex, tlut: 0x70051A0} -D_VS_MENU_70051A0: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 18, offset: 0x70051A0, symbol: D_VS_MENU_70051A0} +aVsFalcoNameTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 18, offset: 0x70051A0, symbol: aVsFalcoNameTLUT} D_VS_MENU_70051D0: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x70051D0, symbol: D_VS_MENU_70051D0, tlut: 0x70055D0} @@ -146,56 +146,56 @@ D_VS_MENU_70051D0: D_VS_MENU_70055D0: { type: TEXTURE, ctype: u16, format: TLUT, colors: 20, offset: 0x70055D0, symbol: D_VS_MENU_70055D0} -D_VS_MENU_7005600: - { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 38, offset: 0x7005600, symbol: D_VS_MENU_7005600, tlut: 0x7005D20} +aVsCorneriaTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 38, offset: 0x7005600, symbol: aVsCorneriaTex, tlut: 0x7005D20} -D_VS_MENU_7005D20: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 248, offset: 0x7005D20, symbol: D_VS_MENU_7005D20} +aVsCorneriaTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 248, offset: 0x7005D20, symbol: aVsCorneriaTLUT} -D_VS_MENU_7005F10: - { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 38, offset: 0x7005F10, symbol: D_VS_MENU_7005F10, tlut: 0x7006630} +aVsSectorZTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 38, offset: 0x7005F10, symbol: aVsSectorZTex, tlut: 0x7006630} -D_VS_MENU_7006630: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 168, offset: 0x7006630, symbol: D_VS_MENU_7006630} +aVsSectorZTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 168, offset: 0x7006630, symbol: aVsSectorZTLUT} -D_VS_MENU_7006780: - { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 38, offset: 0x7006780, symbol: D_VS_MENU_7006780, tlut: 0x7006EA0} +aVsKatinaTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 38, offset: 0x7006780, symbol: aVsKatinaTex, tlut: 0x7006EA0} -D_VS_MENU_7006EA0: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 256, offset: 0x7006EA0, symbol: D_VS_MENU_7006EA0} +aVsKatinaTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 256, offset: 0x7006EA0, symbol: aVsKatinaTLUT} -D_VS_MENU_70070A0: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x70070A0, symbol: D_VS_MENU_70070A0} +aVsFalcoFaceTex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x70070A0, symbol: aVsFalcoFaceTex} D_VS_MENU_7007FC0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x7007FC0, symbol: D_VS_MENU_7007FC0} -D_VS_MENU_7008EE0: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x7008EE0, symbol: D_VS_MENU_7008EE0} +aVsFoxFaceTex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x7008EE0, symbol: aVsFoxFaceTex} D_VS_MENU_7009E00: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x7009E00, symbol: D_VS_MENU_7009E00} -D_VS_MENU_700AD20: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x700AD20, symbol: D_VS_MENU_700AD20} +aVsPeppyFaceTex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x700AD20, symbol: aVsPeppyFaceTex} D_VS_MENU_700BC40: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x700BC40, symbol: D_VS_MENU_700BC40} -D_VS_MENU_700CB60: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x700CB60, symbol: D_VS_MENU_700CB60} +aVsSlippyFaceTex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x700CB60, symbol: aVsSlippyFaceTex} D_VS_MENU_700DA80: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x700DA80, symbol: D_VS_MENU_700DA80} -D_VS_MENU_700E9A0: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 144, height: 42, offset: 0x700E9A0, symbol: D_VS_MENU_700E9A0} +aVsN64ConsoleTex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 144, height: 42, offset: 0x700E9A0, symbol: aVsN64ConsoleTex} -D_VS_MENU_70118E0: - { type: TEXTURE, ctype: u8, format: CI4, width: 80, height: 71, offset: 0x70118E0, symbol: D_VS_MENU_70118E0, tlut: 0x70123F8} +aVsHandicapFrameTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 80, height: 71, offset: 0x70118E0, symbol: aVsHandicapFrameTex, tlut: 0x70123F8} -D_VS_MENU_70123F8: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 5, offset: 0x70123F8, symbol: D_VS_MENU_70123F8} +aVsHandicapFrameTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 5, offset: 0x70123F8, symbol: aVsHandicapFrameTLUT} D_VS_MENU_7012410: { type: GFX, offset: 0x7012410, symbol: D_VS_MENU_7012410} diff --git a/assets/yaml/us/rev1/ast_zoness.yaml b/assets/yaml/us/rev1/ast_zoness.yaml index 15b5e989..efe86f24 100644 --- a/assets/yaml/us/rev1/ast_zoness.yaml +++ b/assets/yaml/us/rev1/ast_zoness.yaml @@ -12,8 +12,8 @@ - '#include "sf64player.h"' - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' -D_ZO_6000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 112, height: 28, offset: 0x6000000, symbol: D_ZO_6000000} +aZoTitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 112, height: 28, offset: 0x6000000, symbol: aZoTitleCardTex} D_ZO_6000C40: { type: GFX, offset: 0x6000C40, symbol: D_ZO_6000C40} diff --git a/include/context.h b/include/context.h index a1381601..600d5247 100644 --- a/include/context.h +++ b/include/context.h @@ -312,8 +312,8 @@ extern s32 gLeftWingDebrisTimer[4]; extern s32 gBombCount[4]; extern s32 gVsPoints[4]; extern s32 gVsKills[4][10]; -extern s32 gVsMatchOver; -extern s32 gVsMatchStart; +extern s32 gVsMatchWon; +extern bool gVsMatchStart; extern bool gChangeTo360; extern Vec3f gTeamArrowsViewPos[10]; extern f32 D_ctx_80177F20[65]; diff --git a/include/fox_hud.h b/include/fox_hud.h new file mode 100644 index 00000000..effc38e3 --- /dev/null +++ b/include/fox_hud.h @@ -0,0 +1,58 @@ +#ifndef FOX_HUD_H +#define FOX_HUD_H + +typedef struct { + /* 0x00 */ u8* levelIdxTex; + /* 0x04 */ s32 width; + /* 0x08 */ s32 height; + /* 0x0C */ u8* titleCardTex; + /* 0x10 */ s32 titleCardWidth; + /* 0x14 */ s32 titleCardHeight; +} LevelTitleCard; + +typedef enum LevelClearScreenState { + /* 0 */ LEVEL_CLEAR_STATE_0, + /* 1 */ LEVEL_CLEAR_STATE_1, + /* 2 */ LEVEL_CLEAR_STATE_2, + /* 3 */ LEVEL_CLEAR_STATE_3, + /* 4 */ LEVEL_CLEAR_STATE_4, + /* 5 */ LEVEL_CLEAR_STATE_5, +} LevelClearScreenState; + +typedef enum BombCounterStates { + /* 0 */ BOMB_COUNTER_INIT, + /* 1 */ BOMB_COUNTER_STATE_1, + /* 2 */ BOMB_COUNTER_STATE_2, + /* 3 */ BOMB_COUNTER_STATE_3, + /* 4 */ BOMB_COUNTER_STATE_4, + /* 5 */ BOMB_COUNTER_STATE_5, + /* 6 */ BOMB_COUNTER_STATE_6, + /* 7 */ BOMB_COUNTER_STATE_7, +} BombCounterStates; + +typedef enum RadarMarkTypes { + /* 0 */ RADARMARK_FOX, + /* 1 */ RADARMARK_FALCO, + /* 2 */ RADARMARK_SLIPPY, + /* 3 */ RADARMARK_PEPPY, + /* 4 */ RADARMARK_WOLF, + /* 5 */ RADARMARK_LEON, + /* 6 */ RADARMARK_PIGMA, + /* 7 */ RADARMARK_ANDREW, + /* 8 */ RADARMARK_KATT, + /* 100 */ RADARMARK_MISSILE = 100, + /* 101 */ RADARMARK_KA_SAUCERER, + /* 102 */ RADARMARK_BOSS, + /* 103 */ RADARMARK_SUPPIES, + /* 200 */ RADARMARK_ITEM_1 = 200, + /* 201 */ RADARMARK_ITEM_2, + /* 999 */ RADARMARK_NOTHING = 999 +} RadarMarkTypes; + +typedef enum ActorMissileSeekMode { + /* 0 */ MISSILE_SEEK_TEAMMATES, + /* 1 */ MISSILE_SEEK_PLAYER, + /* 2 */ MISSILE_SEEK_EITHER, +} ActorMissileSeekMode; + +#endif diff --git a/include/fox_map.h b/include/fox_map.h index caabbefa..31b52711 100644 --- a/include/fox_map.h +++ b/include/fox_map.h @@ -29,7 +29,7 @@ typedef struct { /* 0x18 */ s32 alpha; } PlanetPath; // size = 0x1C -typedef enum { +typedef enum PlanetAnim { /* 0 */ PL_ANIM_STATIC, /* 1 */ PL_ANIM_BILLBOARD, /* 2 */ PL_ANIM_ROTATE_Y, @@ -63,4 +63,34 @@ typedef struct { /* 0xC */ f32 xPos; } TitleCard; // size = 0x10 +typedef enum MapStates { + /* 0 */ MAP_PROLOGUE, + /* 1 */ MAP_LYLAT_CARD, + /* 2 */ MAP_ZOOM_PLANET, + /* 3 */ MAP_IDLE, + /* 4 */ MAP_LEVEL_START, + /* 5 */ MAP_ZOOM_PLANET_PATH, // After level ends + /* 6 */ MAP_PATH_CHANGE, // Path selection by the player + /* 7 */ MAP_GAME_OVER +} MapStates; + +typedef enum PlanetStatus { + /* 0 */ PLANET_UNCLEARED, + /* 1 */ PLANET_CLEARED, + /* 2 */ PLANET_MEDAL +} PlanetStatus; + +typedef enum PlanetExplosions { + /* 0 */ EXPLOSIONS_CORNERIA, + /* 1 */ EXPLOSIONS_KATINA, + /* 2 */ EXPLOSIONS_SECTOR_Y, + /* 3 */ EXPLOSIONS_MAX +} PlanetExplosions; + +typedef enum PlanetSaveSlotTypes { + /* 0 */ SAVETYPE_PLAYED, + /* 1 */ SAVETYPE_MEDAL, + /* 2 */ SAVETYPE_CLEAR +} PlanetSaveSlotTypes; + #endif diff --git a/include/fox_option.h b/include/fox_option.h index 46a4c6c5..e6b65f00 100644 --- a/include/fox_option.h +++ b/include/fox_option.h @@ -5,7 +5,7 @@ typedef struct { /* 0x00 */ s32 type; - /* 0x04 */ s32 unk_04; + /* 0x04 */ s32 unk_04; // Always set to 0 and never used /* 0x08 */ void* texture; /* 0x0C */ u16* palette; /* 0x10 */ s32 width; @@ -18,7 +18,7 @@ typedef struct { /* 0x2C */ s32 green; /* 0x30 */ s32 blue; /* 0x34 */ s32 alpha; -} OptionTexture; // size = 0x38 +} OptionCardTexture; // size = 0x38 typedef struct { /* 0x00 */ f32 x; @@ -26,32 +26,32 @@ typedef struct { /* 0x08 */ f32 z; /* 0x0C */ f32 xScale; /* 0x10 */ f32 yScale; -} MenuContext_38; // size = 0x14 +} OptionCardFrame; // size = 0x14 typedef struct { /* 0x0 */ f32 x; /* 0x4 */ f32 y; /* 0x8 */ f32 range; -} ArwingPosition; // size = 0xC +} ArwingCursorPos; // size = 0xC typedef struct { - /* 0x00 */ OptionTexture unk_00; - /* 0x38 */ MenuContext_38 unk_38; - /* 0x4C */ ArwingPosition unk_4C; - /* 0x58 */ bool unk_58; - /* 0x5C */ bool unk_5C; + /* 0x00 */ OptionCardTexture tex; + /* 0x38 */ OptionCardFrame frame; + /* 0x4C */ ArwingCursorPos pos; + /* 0x58 */ bool drawTex; + /* 0x5C */ bool drawFrame; } OptionEntry; // size = 0x60 typedef struct { - /* 0x0 */ PlanetId unk_0; - /* 0x4 */ PlanetId unk_4; - /* 0x8 */ s32 unk_8; -} UnkStruct_D_menu_801AED4C; // size = 0xC + /* 0x0 */ PlanetId start; + /* 0x4 */ PlanetId end; + /* 0x8 */ s32 color; +} RouteColoredLine; // size = 0xC typedef struct { s32 unk_0; s32 unk_4; -} UnkStruct_D_menu_801B9250; +} StickInput; typedef enum OptionId { /* 1000 */ OPTION_MAIN_MENU = 1000, @@ -63,163 +63,161 @@ typedef enum OptionId { /* 4 */ OPTION_SOUND = 4, /* 5 */ OPTION_DATA = 5, /* 6 */ OPTION_EXPERT_SOUND = 6, - /* 10 */ OPTION_POINT_MATCH = 10, - /* 20 */ OPTION_BR_MATCH = 20, - /* 30 */ OPTION_TT_MATCH = 30, - /* 200 */ OPTION_NAME = 200, + /* 10 */ OPTION_POINT_MATCH = 10, // Point Match + /* 20 */ OPTION_BR_MATCH = 20, // Battle Royal Match + /* 30 */ OPTION_TT_MATCH = 30, // Time Trial Match + /* 200 */ OPTION_NAME_ENTRY = 200, /* 300 */ OPTION_SCORE = 300, /* 400 */ OPTION_INVOICE = 400, /* 401 */ OPTION_MAX, } OptionId; -#define OPTION_COUNT ARRAY_COUNT(sOptionCardList) +extern u8* gBSSMapPlanetTextures[9]; +extern u8* gAssetMapPlanetTextures[9]; -extern u8* D_menu_801B68B0[]; -extern u8* D_menu_801B68D4[]; - -extern s32 D_menu_801B8220[]; // total hits ranking? see Option_80197DE4 -extern s32 D_menu_801B827C; // engine -extern s32 D_menu_801B8280; -extern s32 D_menu_801B8284; -extern s32 D_menu_801B8288; +extern s32 gTotalHitsRanking[]; +extern bool gGoToTitle; // engine +extern bool sLevelStartState; +extern s32 sWipeHeight; +extern s32 sTitleRankMaxRecords; // Planet textures -extern u8 D_menu_801B9410[96 * 96]; -extern u8 D_menu_801BB810[96 * 96]; -extern u8 D_menu_801BDC10[96 * 96]; -extern u8 D_menu_801C0010[96 * 96]; -extern u8 D_menu_801C2410[96 * 96]; -extern u8 D_menu_801C4810[96 * 96]; -extern u8 D_menu_801C6C10[96 * 96]; -extern u8 D_menu_801C9010[96 * 96]; -extern u8 D_menu_801CB410[96 * 96]; +extern u8 gMapVenomCloudTex[96 * 96]; +extern u8 gMapCorneriaTex[96 * 96]; +extern u8 gMapFortunaTex[96 * 96]; +extern u8 gMapAquasTex[96 * 96]; +extern u8 gMapVenomTex[96 * 96]; +extern u8 gMapTitaniaTex[96 * 96]; +extern u8 gMapKatinaTex[96 * 96]; +extern u8 gMapMacbethTex[96 * 96]; +extern u8 gMapZonessTex[96 * 96]; void Title_UpdateEntry(void); -s32 Title_80187ABC(void); -void Title_80187B00(void); -void Title_80187E28(void); -void Title_801888E8(void); -void Title_8018994C(void); -void Title_8018A644(void); -void Title_8018ACEC(void); -void Title_8018B5C4(void); -void Title_8018C644(void); -void Title_80187CA8(void); -s32 Title_80188010(void); -void Title_80189208(void); -void Title_8018A2F8(void); -void Title_8018A990(void); -void Title_8018B038(void); -void Title_8018C114(void); -void Title_8018CB90(void); -void Title_8018F680(void); -void Title_8018F77C(void); -void Title_8018F85C(void); -void Title_8018F8E4(void); -void Title_8018FC14(void); -void Title_8018FD08(void); -void Title_8018FF74(void); +s32 Title_CheckControllers(void); +void Title_Ranking_Update(void); +void Title_RankingData_Draw(void); +void Title_Screen_Update(void); +void Title_CsGreatFoxTraveling_Update(void); +void Title_CsTeamRunning_Update(void); +void Title_CsGreatFoxCloseUp_Update(void); +void Title_CsTakeOff_Update(void); +void Title_CsTakeOffSpace_Update(void); +void Title_Ranking_Draw(void); +s32 Title_GetRankTotalHits(void); +void Title_Screen_Draw(void); +void Title_CsGreatFoxTraveling_Draw(void); +void Title_CsTeamRunning_Draw(void); +void Title_CsGreatFoxCloseUp_Draw(void); +void Title_CsTakeOff_Draw(void); +void Title_CsTakeOffSpace_Draw(void); +void Title_StarfoxLogo_Draw(void); +void Title_64Logo_Draw(void); +void Title_CopyrightSymbol_Draw(void); +void Title_PressStart_Draw(void); +void Title_Copyright_Draw(void); +void Title_TeamName_Draw(void); +void Title_SunGlare_Draw(void); -void Option_UpdateEntry(void); -void Option_MapUpdate(void); -void Option_MainMenuUpdate(void); -void Option_TrainingUpdate(void); -void Option_MainMenuDraw(void); -void Option_VersusUpdate(void); -void Option_VersusDraw(void); -void Option_SoundInit(void); -void Option_SoundUpdate(void); -void Option_80194AEC(void); -void Option_80194BD0(void); -void Option_SoundDraw(void); -void Option_801952B4(void); -void Option_ExpertSoundInit(void); -void Option_ExpertSoundUpdate(void); -void Option_ExpertSoundDraw(void); -void Option_DataInit(void); -void Option_DataUpdate(void); -void Option_8019669C(void); -void Option_DataDraw(void); -void Option_RankingInit(void); -void Option_RankingUpdate(void); -void Option_RankingDraw(void); -void Option_80196FC4(void); -void Option_80197074(void); -void Option_8019715C(void); -void Option_RankingMenuDraw(void); -void Option_8019752C(void); +void Option_Entry_Update(void); +void Option_Map_Update(void); +void Option_MainMenu_Update(void); +void Option_Training_Update(void); +void Option_MainMenu_Draw(void); +void Option_Versus_Update(void); +void Option_Versus_Draw(void); +void Option_Sound_Setup(void); +void Option_Sound_Update(void); +void Option_Sound_SetSoundMode(void); +void Option_Sound_SetVolumeLevels(void); +void Option_Sound_Draw(void); +void Option_Sound_Speaker_Draw(void); +void Option_ExpertSound_Setup(void); +void Option_ExpertSound_Update(void); +void Option_ExpertSound_Draw(void); +void Option_Data_Setup(void); +void Option_Data_Update(void); +void Option_Data_Select(void); +void Option_Data_Draw(void); +void Option_Ranking_Setup(void); +void Option_Ranking_Update(void); +void Option_Ranking_Draw(void); +void Option_Ranking_Select(void); +void Option_Ranking_Cursor(void); +void Option_Ranking2_Cursor(void); +void Option_RankingMenu_Draw(void); +void Option_RankingMenu2_Draw(void); void Option_80197914(void); -void Option_80197A3C(s32, s32, s32); -void Option_80197D30(s32, s32, s32); -void Option_80197DE4(s32, s32, s32); -void Option_80197F74(s32, s32, s32); -void Option_80198164(s32, f32, f32); -void Option_801982B0(s32, s32, f32, f32, s32); -void Option_801984D0(s32, s32, f32, f32); -void Option_80198608(s32, s32, f32, f32); -void Option_8019882C(s32, s32, f32, f32); -void Option_8019896C(s32, f32, s32); -void Option_80199198(f32 arg0, f32 arg1, f32 arg2); -s32 Option_80199284(PlanetId start, PlanetId end); -void Option_VersusMenuInit(void); -void Option_VersusMenuUpdate(void); -void Option_8019949C(void); -void Option_VersusMenuDraw(void); -void Option_80199820(s32); -void Option_80199EA8(void); -void Option_VersusStageInit(void); +void Option_OrdinalNumbers_Draw(s32, s32, s32); +void Option_RankingName_Draw(s32, s32, s32); +void Option_RankingTotalHits_Draw(s32, s32, s32); +void Option_RankingTeamAlive_Draw(s32, s32, s32); +void Option_RankingRoute_Draw(s32, f32, f32); +void Option_RankingRouteFrame_Draw(s32, s32, f32, f32, s32); +void Option_RankingHitCount_Draw(s32, s32, f32, f32); +void Option_RankingTeamPresence_Draw(s32, s32, f32, f32); +void Option_RankingPlanetName_Draw(s32, s32, f32, f32); +void Option_RankingPlanetRoute_Draw(s32, f32, s32); +void Option_RankingRouteMedal_Draw(f32 xPos, f32 yPos, f32 zPos); +s32 Option_GetRouteLineColor(PlanetId start, PlanetId end); +void Option_VersusMenu_Setup(void); +void Option_VersusMenu_Update(void); +void Option_VersusMenu_Cursor(void); +void Option_VersusMenu_Draw(void); +void Option_VS_HandicapSet_Draw(s32); +void Option_VS_N64Console_Draw(void); +void Option_VersusStage_Setup(void); void Option_8019A080(void); -void Option_VersusStageUpdate(void); -void Option_8019A124(void); -void Option_8019A1A8(void); -void Option_8019A214(void); -void Option_8019A298(void); -void Option_8019A2E0(void); -void Option_8019A4DC(void); -void Option_8019A6DC(void); -void Option_8019A954(void); -void Option_VersusStageDraw(void); -void Option_8019AB30(void); -void Option_8019AD84(void); -void Option_8019AFFC(void); -void Option_8019B1F8(void); -void Option_8019B3DC(void); -void Option_8019B5AC(void); -void Option_8019B6D8(f32 xPos, f32 yPos, f32 offset, s32 r, s32 g, s32 b); -void Option_8019B7D4(void); -void Option_8019B8A0(s32 arg0); -void Option_8019B8C8(void); +void Option_VersusStage_Update(void); +void Option_Vs_PointMatch_Update(void); +void Option_Vs_BattleRoyal_Update(void); +void Option_Vs_TimeTrial_Update(void); +void Option_Vs_StartMatch(void); +void Option_Vs_Point_Selection(void); +void Option_VsTimeSelection(void); +void Option_VsStageSelection(void); +void Option_VsConfirmSelection(void); +void Option_VersusStage_Draw(void); +void Option_VsPointMatch_Draw(void); +void Option_VsTimeTrial_Draw(void); +void Option_VsStageSelect_Draw(void); +void Option_VsTimeTrialStageSelect_Draw(void); +void Option_VsStageSelect2_Draw(void); +void Option_VsOKConfirm_Draw(void); +void Option_VsSelectionArrows_Draw(f32 xPos, f32 yPos, f32 offset, s32 r, s32 g, s32 b); +void Option_AcceptCancel_Draw(void); +void Option_VsBackToSubMenu(OptionId menuEntryState); +void Option_VsMenuCard_Draw(void); void Option_DrawMenuLabel(void); -void Option_DrawMenuCard(MenuContext_38 arg0); -void Option_DrawMenuArwing(ArwingPosition arwing); +void Option_DrawMenuCard(OptionCardFrame arg0); +void Option_DrawMenuArwing(ArwingCursorPos arwing); void Option_DrawArwing(f32, f32, f32, f32, f32, f32); -void Option_8019BDF0(void); -void Option_8019BE7C(f32, f32, f32, f32*, f32*, f32*); -void Option_8019BF34(void); -void Option_8019C04C(void); -void Option_DrawCardLabel(OptionTexture tex); -bool Option_8019C418(s32* arg0, s32 arg1, bool arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7, - UnkStruct_D_menu_801B9250* arg8); -s32 Option_8019C5A0(s32*); -bool Option_8019C66C(f32* arg0, f32 arg1, f32 arg2, UnkStruct_D_menu_801B9250* arg3); -void Option_8019C824(f32*); -s32 Option_8019C8C4(void); -void Option_8019CAE0(void); -void Option_8019CBC0(void); -void Option_8019CD54(void); -void Option_8019D118(void); -void Option_8019D624(void); -void Option_8019DB20(s32, f32, f32, f32, f32, f32, f32, f32); -s32 Option_8019DCE8(s32 arg0); -void Option_8019DD44(void); -void Option_8019DE74(void); -void Option_8019DF64(void); -void Option_InvoiceUpdate(void); +void Option_Menu_Push(void); +void Option_SetMenuLightPos(f32, f32, f32, f32*, f32*, f32*); +void Option_CardLightning_Update(void); +void Option_CardLightning_Draw(void); +void Option_DrawCardLabel(OptionCardTexture tex); +bool Option_Input_MoveCursor_Y(s32* arg0, s32 arg1, bool arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 controllerNum, + StickInput* stickY); +s32 Option_Input_DataSelect_X(s32*); +bool Option_Input_Sound_X(f32* arg0, f32 arg1, f32 arg2, StickInput* arg3); +void Option_Color_FlashRed(f32*); +s32 Option_RankInPos_Check(void); +void Option_NameEntry_Update(void); +void Option_NameEntry_Setup(void); +void Option_NameEntry_Select(void); +void Option_NameEntry_Draw(void); +void Option_Ranking_SaveData(void); +void Option_3DFont_Draw(s32, f32, f32, f32, f32, f32, f32, f32); +s32 Option_GetCharIndex(s32 character); +void Option_Score_Update(void); +void Option_Score_Update2(void); +void Option_Score_Draw(void); +void Option_Invoice_Update(void); void Option_InvoiceDraw(void); void Map_Main(void); -void Map_801A07E8(u8*, u8*, f32*); -void Map_801AD7EC(s32, s32, s32); -void Map_801A9FD4(s32); +void Map_Texture_Sphere(u8*, u8*, f32*); +void Map_RemainingLives_Draw(s32, s32, s32); +void Map_801A9FD4(bool); #endif diff --git a/include/functions.h b/include/functions.h index 8e603aa7..c1d997fd 100644 --- a/include/functions.h +++ b/include/functions.h @@ -5,6 +5,7 @@ #include "sf64object.h" #include "sf64player.h" #include "sf64mesg.h" +#include "fox_hud.h" // fox_360 void AllRange_FortunaIntro(Player*); @@ -376,54 +377,54 @@ void Effect_Effect399_Draw(Effect*); void Wipe_Draw(WipeMode mode, s32 frame); // fox_hud -void func_hud_80084B94(s32); -void func_hud_800857DC(f32, f32, f32, f32); -void func_hud_80085890(f32, f32, f32, f32); -void func_hud_80086110(f32, f32, s32); -void func_hud_80086664(f32, f32); -void func_hud_800869A0(f32, f32, s32, f32, s32, s32); -void func_hud_80087530(f32, f32, s32); -void func_hud_800884E4(void); -void func_hud_80088564(void); +void HUD_TeamDownWrench_Draw(s32); +void HUD_BoostGaugeOverheat_Draw(f32, f32, f32, f32); +void HUD_BoostGaugeCool_Draw(f32, f32, f32, f32); +void HUD_TeamShields_Draw(f32, f32, s32); +void HUD_TitleCard_Draw(f32, f32); +void HUD_Number_Draw(f32, f32, s32, f32, bool, s32); +void HUD_LivesCount2_Draw(f32, f32, s32); +void HUD_SetMissionTeamStatus(void); +void HUD_Bolse_Area6_SaveData(void); void HUD_DrawStatusScreens(void); -s32 ActorMissileSeek_ModeCheck(s32); +s32 ActorMissileSeek_ModeCheck(ActorMissileSeekMode mode); void HUD_RadioCharacterName_Draw(void); -void func_hud_8008B5B0(f32 x, f32 y); -s32 func_hud_8008B774(void); -void func_hud_8008BD00(u8*, s32, s32, u8); -void func_hud_8008C104(u16*, u16*); +void HUD_PlayerShieldGauge_Draw(f32 x, f32 y); +s32 HUD_RadioDamage_Type(void); +void HUD_Texture_Scroll(u8*, s32, s32, u8); +void HUD_Texture_Wave(u16*, u16*); void HUD_DisplaySmallNumber(f32, f32, f32, s32); -void func_hud_8008C5C8(f32, f32, f32, s32); -void func_hud_8008C6F4(s32, s32); -s32 func_hud_8008BCBC(s32); -void HUD_DrawEdgeArrows(void); -s32 HUD_dummy_8008CB8C(void); -void func_hud_8008D0DC(f32, f32, f32, f32, f32); +void HUD_VsModePortraitTex_Draw(f32, f32, f32, s32); +void HUD_EdgeArrows_Draw(s32, bool); +s32 HUD_CountDigits(s32); +void HUD_EdgeArrows_Update(void); +s32 HUD_8008CB8C(void); +void HUD_VS_ShieldGaugeTex_Draw(f32, f32, f32, f32, f32); void HUD_DrawBossHealth(void); void HUD_DrawCountdown(s32* , f32); -void func_hud_8008E9EC(f32, f32); -void func_hud_8008EA14(f32, f32); +void HUD_Shield_GoldRings_HitPoints(f32, f32); +void HUD_BombCounter_Draw(f32, f32); void HUD_Draw(void); -void HUD_FoBase_Draw(Boss*); -void func_hud_8008FFF0(Boss*, s32); -s32 HUD_FoBase_ExplodeCs(Boss* this); -bool func_hud_8009092C(Actor*); -void HUD_FoBase_Update(Boss*); -bool func_hud_800915FC(Actor*); -bool func_hud_800924E0(Actor*); +void FoBase_Draw(Boss*); +void FoBase_BurnEffects(Boss*, s32); +s32 FoBase_ExplodeCs(Boss* this); +bool ActorTeamBoss_SetTarget(Actor*); +void FoBase_Update(Boss*); +bool ActorTeamBoss_ObstacleCheck(Actor*); +bool ActorTeamBoss_SomerSault(Actor*); void ActorTeamBoss_Init(Actor*); void ActorTeamBoss_Update(Actor* this); -void func_hud_80093164(Actor*); -void HUD_AquasStart(Player*); -void func_hud_800953A0(Actor*, s32); -void func_hud_8009546C(Actor*, s32); -void func_hud_80095538(Actor*, s32); -void HUD_AquasComplete(Player*); -void Hud_Effect363_Update(Effect*); -void Hud_Effect363_Draw(Effect*); -void func_hud_80094D20(f32, f32); -void func_hud_80096A74(Player* player); +void Aquas_CsIntroActors_Update(Actor*); +void Aquas_CsLevelStart(Player*); +void Aquas_AqBump2_Setup(Actor*, s32); +void Aquas_AqCoralReef2_Setup(Actor*, s32); +void Aquas_AqRock_Setup(Actor*, s32); +void Aquas_CsLevelComplete(Player*); +void Aquas_Effect363_Update(Effect*); +void Aquas_Effect363_Draw(Effect*); +void HUD_Hitpoints_Draw(f32, f32); +void Venom1_LevelStart2(Player* player); // fox_col1 void func_col1_80098860(PlaneF* plane, Vec3f* point, Vec3f* normal); diff --git a/include/gfx.h b/include/gfx.h index de8ba7ad..b110d953 100644 --- a/include/gfx.h +++ b/include/gfx.h @@ -118,8 +118,8 @@ void Lights_SetTwoLights(Gfx** dList, s32 dir1x, s32 dir1y, s32 dir1z, s32 dir2x char* Graphics_ClearPrintBuffer(char *buf, s32 fill, s32 len); s32 Graphics_Printf(const char *fmt, ...); -void Texture_Scroll(u16 *texture, s32 width, s32 height, u8 mode); -void Texture_Mottle(u16 *dst, u16 *src, u8 mode); +void Lib_Texture_Scroll(u16 *texture, s32 width, s32 height, u8 mode); +void Lib_Texture_Mottle(u16 *dst, u16 *src, u8 mode); s32 Animation_GetLimbIndex(Limb* limb, Limb** skeleton); void Animation_DrawLimb(s32 mode, Limb* limb, Limb* *skeleton, Vec3f* jointTable, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, void* data); void Animation_DrawSkeleton(s32 mode, Limb** skeletonSegment, Vec3f* jointTable, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, void* data, Matrix* transform); @@ -128,23 +128,23 @@ s32 Animation_GetFrameCount(Animation *animationSegment); void Animation_FindBoundingBox(Gfx* dList, s32 len, Vec3f *min, Vec3f *max, s32 *vtxFound, s32 *vtxCount, Vtx* *vtxList); void Animation_GetDListBoundingBox(Gfx *dList, s32 len, Vec3f *min, Vec3f *max); void Animation_GetSkeletonBoundingBox(Limb** skeletonSegment, Animation *animationSegment, s32 frame, Vec3f *min, Vec3f* max); -void TextureRect_CI4(Gfx **gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_CI4_Flip(Gfx **gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_CI4_MirX(Gfx **gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_CI4_MirY(Gfx **gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_CI8(Gfx **gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_RGBA16(Gfx **gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_RGBA16_MirX(Gfx **gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_IA8(Gfx **gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_IA8_FlipMirX(Gfx **gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_IA8_FlipMirY(Gfx **gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_IA8_MirX(Gfx **gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_IA8_MirY(Gfx **gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_IA16(Gfx **gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_IA16_MirX(Gfx **gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_IA16_MirY(Gfx **gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_IA16_MirXY(Gfx **gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_RGBA32(Gfx **gfxPtr, u32* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void Lib_TextureRect_CI4(Gfx **gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void Lib_TextureRect_CI4_Flip(Gfx **gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void Lib_TextureRect_CI4_MirX(Gfx **gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void Lib_TextureRect_CI4_MirY(Gfx **gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void Lib_TextureRect_CI8(Gfx **gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void Lib_TextureRect_RGBA16(Gfx **gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void Lib_TextureRect_RGBA16_MirX(Gfx **gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void Lib_TextureRect_IA8(Gfx **gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void Lib_TextureRect_IA8_FlipMirX(Gfx **gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void Lib_TextureRect_IA8_FlipMirY(Gfx **gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void Lib_TextureRect_IA8_MirX(Gfx **gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void Lib_TextureRect_IA8_MirY(Gfx **gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void Lib_TextureRect_IA16(Gfx **gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void Lib_TextureRect_IA16_MirX(Gfx **gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void Lib_TextureRect_IA16_MirY(Gfx **gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void Lib_TextureRect_IA16_MirXY(Gfx **gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void Lib_TextureRect_RGBA32(Gfx **gfxPtr, u32* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); void Graphics_FillRectangle(Gfx **gfxPtr, s32 ulx, s32 uly, s32 lrx, s32 lry, u8 r, u8 g, u8 b, u8 a); u16* Graphics_SetupTextureRender(Gfx **gfxPtr, u8 width, u8 height); void Graphics_DisplayHUDNumber(s32 xPos, s32 yPos, s32 number); diff --git a/include/sf64audio_external.h b/include/sf64audio_external.h index bfdb6acf..eea7762b 100644 --- a/include/sf64audio_external.h +++ b/include/sf64audio_external.h @@ -58,21 +58,21 @@ typedef enum { } SfxChannelLayout; typedef enum { - /* 0 */ AUDIOSPEC_0, - /* 1 */ AUDIOSPEC_1, - /* 2 */ AUDIOSPEC_2, - /* 3 */ AUDIOSPEC_3, - /* 4 */ AUDIOSPEC_4, - /* 5 */ AUDIOSPEC_5, + /* 0 */ AUDIOSPEC_CO, + /* 1 */ AUDIOSPEC_ME, + /* 2 */ AUDIOSPEC_TI, + /* 3 */ AUDIOSPEC_SX, + /* 4 */ AUDIOSPEC_ZO, + /* 5 */ AUDIOSPEC_A6, /* 6 */ AUDIOSPEC_6, - /* 7 */ AUDIOSPEC_7, - /* 8 */ AUDIOSPEC_8, - /* 9 */ AUDIOSPEC_9, - /* 10 */ AUDIOSPEC_10, - /* 11 */ AUDIOSPEC_11, - /* 12 */ AUDIOSPEC_12, - /* 13 */ AUDIOSPEC_13, - /* 14 */ AUDIOSPEC_14, + /* 7 */ AUDIOSPEC_SY, + /* 8 */ AUDIOSPEC_FO, + /* 9 */ AUDIOSPEC_SO, + /* 10 */ AUDIOSPEC_BO, + /* 11 */ AUDIOSPEC_KA, + /* 12 */ AUDIOSPEC_AQ, + /* 13 */ AUDIOSPEC_SZ, + /* 14 */ AUDIOSPEC_MA, /* 15 */ AUDIOSPEC_15, /* 16 */ AUDIOSPEC_16, /* 17 */ AUDIOSPEC_17, diff --git a/include/sf64object.h b/include/sf64object.h index ec5bb7d3..c31f3cc1 100644 --- a/include/sf64object.h +++ b/include/sf64object.h @@ -85,7 +85,7 @@ typedef struct { } ObjectInit; // size = 0x14 typedef struct { - /* 0x00 */ u8 status; + /* 0x00 */ u8 enabled; /* 0x02 */ u16 type; /* 0x04 */ Vec3f pos; /* 0x10 */ f32 yRot; diff --git a/include/sf64player.h b/include/sf64player.h index 511141fb..71f28f91 100644 --- a/include/sf64player.h +++ b/include/sf64player.h @@ -150,7 +150,7 @@ typedef struct ArwingInfo { /* 0x2C */ u8 drawFace; /* 0x30 */ f32 teamFaceXrot; /* 0x34 */ f32 teamFaceYrot; - /* 0x38 */ f32 windshieldXrot; + /* 0x38 */ f32 cockpitGlassXrot; } ArwingInfo; // size = 0x3C typedef struct PlayerSfx { @@ -246,8 +246,8 @@ typedef struct Player { /* 0x184 */ f32 unk_184; /* 0x188 */ f32 unk_188; /* 0x18C */ f32 unk_18C; - /* 0x190 */ f32 unk_190; - /* 0x194 */ f32 unk_194; + /* 0x190 */ f32 unk_190; // Related to engine glow. Investigate + /* 0x194 */ f32 unk_194; // Related to engine glow. Investigate /* 0x198 */ s32 savedAlternateView; /* 0x19C */ s32 unk_19C; // used to indicate whether a U-turn is forced, whether to draw ground in TI intro, and to stop the landmaster /* 0x1A0 */ s32 unk_1A0; // tank muzzle flash timer diff --git a/include/sf64save.h b/include/sf64save.h index 7be617a8..75e900bf 100644 --- a/include/sf64save.h +++ b/include/sf64save.h @@ -3,8 +3,17 @@ #include "PR/ultratypes.h" +#define RANKING_MAX (10) // Maximum number of entries in the ranking +#define ROUTE_MAX (7) // Maximum number of planets in a route +#define ENTRY_MAX (3) // Maximum number of letters for name entry + +#define TEAMSTATUS_PEPPY (0x00FF0000) +#define TEAMSTATUS_SLIPPY (0x0000FF00) +#define TEAMSTATUS_FALCO (0x000000FF) +#define TEAMSTATUS_ALIVE (0x00FFFFFF) + typedef struct { - /* bit 0 */ u8 unk_0 : 3; + /* bit 0 */ u8 unk_0 : 3; // unused /* bit 3 */ u8 expertMedal : 1; /* bit 4 */ u8 expertClear : 1; /* bit 5 */ u8 played : 1; @@ -12,27 +21,27 @@ typedef struct { /* bit 7 */ u8 normalClear : 1; } PlanetData; // size = 0x1 -typedef struct { - /* bit 0 */ u16 unk_0 : 8; - /* bit 8 */ u16 unk_8 : 4; - /* bit C */ u16 unk_C : 1; - /* bit D */ u16 unk_D : 1; - /* bit E */ u16 unk_E : 1; - /* bit F */ u16 unk_F : 1; -} Save_SubStruct_5E; // size = 0x10 +typedef struct PlanetStats { + /* bit 0 */ u16 hitCount : 8; + /* bit 8 */ u16 planetId : 4; + /* bit C */ u16 unk_C : 1; // hitCount related + /* bit D */ u16 peppyAlive : 1; + /* bit E */ u16 falcoAlive : 1; + /* bit F */ u16 slippyAlive : 1; +} PlanetStats; // size = 0x10 -typedef struct{ +typedef struct SaveData { /* 0x00 */ PlanetData planet[16]; /* 0x10 */ char pad10[0x4]; /* 0x14 */ u8 soundMode; /* 0x15 */ u8 musicVolume; /* 0x16 */ u8 voiceVolume; /* 0x17 */ u8 sfxVolume; - /* 0x18 */ u8 unk_18[10][3]; - /* 0x36 */ u8 unk_36[10]; - /* 0x40 */ u8 unk_40[10]; - /* 0x4A */ u16 unk_4A[10]; - /* 0x5E */ Save_SubStruct_5E unk_5E[10][7]; + /* 0x18 */ u8 rankNameEntry[RANKING_MAX][ENTRY_MAX]; // Name entries in the ranking + /* 0x36 */ u8 rankingRoute[RANKING_MAX]; // Maximum number of planets played in the current record + /* 0x40 */ u8 rankingLives[RANKING_MAX]; // Player lives left in the current record + /* 0x4A */ u16 rankingMedal[RANKING_MAX]; // Medals obtained in the current record + /* 0x5E */ PlanetStats stats[RANKING_MAX][ROUTE_MAX]; /* 0xEA */ u8 unk_EA; /* 0xEB */ char padEB[0x3]; /* 0xEE */ char padEE[0x10]; @@ -40,9 +49,9 @@ typedef struct{ typedef struct { /* 0x00 */ union { - u8 raw[sizeof(SaveData)]; - SaveData data; - }; + u8 raw[sizeof(SaveData)]; + SaveData data; + }; /* 0xFE */ u16 checksum; } Save; // size = 0x100 diff --git a/include/variables.h b/include/variables.h index 502bdb6a..dff14fc4 100644 --- a/include/variables.h +++ b/include/variables.h @@ -185,7 +185,7 @@ extern f32 gRadioPortraitPosX; extern f32 gRadioPortraitPosY; // fox_versus -extern s32 D_versus_80178750; +extern bool gVsMatchOver; extern s32 gVsMatchState; extern s32 D_versus_80178758; extern s32 sUnlockLandmaster; // sUnlockLandmaster diff --git a/linker_scripts/eu/rev0/symbol_addrs.txt b/linker_scripts/eu/rev0/symbol_addrs.txt index dc8958ef..219477ce 100644 --- a/linker_scripts/eu/rev0/symbol_addrs.txt +++ b/linker_scripts/eu/rev0/symbol_addrs.txt @@ -5956,7 +5956,7 @@ D_menu_801B56B8 = 0x801B56B8; //segment:ovl_menu D_menu_801B5728 = 0x801B5728; //segment:ovl_menu D_menu_801B574C = 0x801B574C; //segment:ovl_menu D_menu_801B5798 = 0x801B5798; //segment:ovl_menu -D_menu_801B57A8 = 0x801B57A8; //segment:ovl_menu +gMapVenomDL = 0x801B57A8; //segment:ovl_menu D_menu_801B59A0 = 0x801B59A0; //segment:ovl_menu D_menu_801B5B98 = 0x801B5B98; //segment:ovl_menu D_menu_801B5BD4 = 0x801B5BD4; //segment:ovl_menu @@ -5985,7 +5985,7 @@ D_menu_801B8930 = 0x801B8930; //segment:ovl_menu D_menu_801B8C98 = 0x801B8C98; //segment:ovl_menu D_menu_801B9000 = 0x801B9000; //segment:ovl_menu D_menu_801B9368 = 0x801B9368; //segment:ovl_menu -D_menu_801B936C = 0x801B936C; //segment:ovl_menu +sPointConfirmTimer = 0x801B936C; //segment:ovl_menu D_menu_801B9388 = 0x801B9388; //segment:ovl_menu D_menu_801B938C = 0x801B938C; //segment:ovl_menu D_menu_801B9390 = 0x801B9390; //segment:ovl_menu diff --git a/linker_scripts/eu/rev0/symbol_addrs_assets.txt b/linker_scripts/eu/rev0/symbol_addrs_assets.txt index 192ed16c..b8b2fabb 100644 --- a/linker_scripts/eu/rev0/symbol_addrs_assets.txt +++ b/linker_scripts/eu/rev0/symbol_addrs_assets.txt @@ -20,7 +20,7 @@ D_10124B0 = 0x10124B0; D_10124C0 = 0x10124C0; D_1012540 = 0x1012540; D_1012850 = 0x1012850; -D_10128C0 = 0x10128C0; +aBoostGaugeOverheatTex = 0x10128C0; D_10128D0 = 0x10128D0; D_10129A0 = 0x10129A0; D_10129C0 = 0x10129C0; @@ -1006,7 +1006,7 @@ D_D005C30 = 0xD005C30; D_D006B50 = 0xD006B50; D_D007A70 = 0xD007A70; D_D008990 = 0xD008990; -D_D0098B0 = 0xD0098B0; +aKattRadarMarkDL = 0xD0098B0; aKattShipDL = 0xD009A40; aBillShipDL = 0xD00B880; D_E000000 = 0xE000000; diff --git a/linker_scripts/eu/rev0/undefined_syms.ld b/linker_scripts/eu/rev0/undefined_syms.ld index 192ed16c..b8b2fabb 100644 --- a/linker_scripts/eu/rev0/undefined_syms.ld +++ b/linker_scripts/eu/rev0/undefined_syms.ld @@ -20,7 +20,7 @@ D_10124B0 = 0x10124B0; D_10124C0 = 0x10124C0; D_1012540 = 0x1012540; D_1012850 = 0x1012850; -D_10128C0 = 0x10128C0; +aBoostGaugeOverheatTex = 0x10128C0; D_10128D0 = 0x10128D0; D_10129A0 = 0x10129A0; D_10129C0 = 0x10129C0; @@ -1006,7 +1006,7 @@ D_D005C30 = 0xD005C30; D_D006B50 = 0xD006B50; D_D007A70 = 0xD007A70; D_D008990 = 0xD008990; -D_D0098B0 = 0xD0098B0; +aKattRadarMarkDL = 0xD0098B0; aKattShipDL = 0xD009A40; aBillShipDL = 0xD00B880; D_E000000 = 0xE000000; diff --git a/linker_scripts/jp/rev0/symbol_addrs.txt b/linker_scripts/jp/rev0/symbol_addrs.txt index 40ff4f45..6d14e396 100644 --- a/linker_scripts/jp/rev0/symbol_addrs.txt +++ b/linker_scripts/jp/rev0/symbol_addrs.txt @@ -2261,7 +2261,7 @@ D_800D19B8 = 0x800D19B8; D_800D19C8 = 0x800D19C8; D_800D19D8 = 0x800D19D8; D_800D19E8 = 0x800D19E8; -D_800D19F8 = 0x800D19F8; +sBombCounterState = 0x800D19F8; D_800D1A10 = 0x800D1A10; D_800D1DA0 = 0x800D1DA0; D_800D1DD0 = 0x800D1DD0; @@ -3392,7 +3392,7 @@ D_801617E1 = 0x801617E1; D_80161808 = 0x80161808; D_80161820 = 0x80161820; D_80161830 = 0x80161830; -D_801618B0 = 0x801618B0; +sGoldRingsFwork = 0x801618B0; D_801618C0 = 0x801618C0; D_801618C8 = 0x801618C8; D_801618D0 = 0x801618D0; @@ -6511,16 +6511,16 @@ D_menu_801ADFD0 = 0x801ADFD0; //segment:ovl_menu D_menu_801AE0F0 = 0x801AE0F0; //segment:ovl_menu D_menu_801AF0B0 = 0x801AF0B0; D_menu_801AF0C0 = 0x801AF0C0; //segment:ovl_menu -D_menu_801AF0C4 = 0x801AF0C4; //segment:ovl_menu +sTeamLetter = 0x801AF0C4; //segment:ovl_menu D_menu_801AF0C8 = 0x801AF0C8; //segment:ovl_menu D_menu_801AF0CC = 0x801AF0CC; //segment:ovl_menu -D_menu_801AF0D0 = 0x801AF0D0; //segment:ovl_menu +sTeamAlivePrimR = 0x801AF0D0; //segment:ovl_menu D_menu_801AF0D4 = 0x801AF0D4; //segment:ovl_menu D_menu_801AF0D8 = 0x801AF0D8; //segment:ovl_menu -D_menu_801AF0DC = 0x801AF0DC; //segment:ovl_menu +sTeamAlivePrimG = 0x801AF0DC; //segment:ovl_menu D_menu_801AF0E0 = 0x801AF0E0; //segment:ovl_menu D_menu_801AF0E4 = 0x801AF0E4; //segment:ovl_menu -D_menu_801AF0E8 = 0x801AF0E8; //segment:ovl_menu +sTeamAlivePrimB = 0x801AF0E8; //segment:ovl_menu D_menu_801AF0EC = 0x801AF0EC; //segment:ovl_menu D_menu_801AF0F0 = 0x801AF0F0; //segment:ovl_menu D_menu_801AF0F4 = 0x801AF0F4; //segment:ovl_menu @@ -6544,26 +6544,26 @@ D_menu_801AF138 = 0x801AF138; //segment:ovl_menu D_menu_801AF13C = 0x801AF13C; //segment:ovl_menu D_menu_801AF140 = 0x801AF140; //segment:ovl_menu D_menu_801AF144 = 0x801AF144; //segment:ovl_menu -D_menu_801AF148 = 0x801AF148; //segment:ovl_menu +sVsHandicapFrameXpos = 0x801AF148; //segment:ovl_menu D_menu_801AF14C = 0x801AF14C; //segment:ovl_menu D_menu_801AF150 = 0x801AF150; //segment:ovl_menu D_menu_801AF154 = 0x801AF154; //segment:ovl_menu -D_menu_801AF158 = 0x801AF158; //segment:ovl_menu +sVsHandicapFrameYpos = 0x801AF158; //segment:ovl_menu D_menu_801AF15C = 0x801AF15C; //segment:ovl_menu D_menu_801AF160 = 0x801AF160; //segment:ovl_menu D_menu_801AF164 = 0x801AF164; //segment:ovl_menu -D_menu_801AF168 = 0x801AF168; //segment:ovl_menu +sCharNameWidth = 0x801AF168; //segment:ovl_menu D_menu_801AF16C = 0x801AF16C; //segment:ovl_menu D_menu_801AF170 = 0x801AF170; //segment:ovl_menu D_menu_801AF174 = 0x801AF174; //segment:ovl_menu -D_menu_801AF178 = 0x801AF178; //segment:ovl_menu +sCharNameHeight = 0x801AF178; //segment:ovl_menu D_menu_801AF17C = 0x801AF17C; //segment:ovl_menu D_menu_801AF180 = 0x801AF180; //segment:ovl_menu D_menu_801AF1A8 = 0x801AF1A8; //segment:ovl_menu D_menu_801AF1AC = 0x801AF1AC; //segment:ovl_menu D_menu_801AF1B0 = 0x801AF1B0; //segment:ovl_menu -D_menu_801AF1B4 = 0x801AF1B4; //segment:ovl_menu -D_menu_801AF1B8 = 0x801AF1B8; //segment:ovl_menu +sPlayerFaceXoffsetPos = 0x801AF1B4; //segment:ovl_menu +sPlayerFaceYoffsetPos = 0x801AF1B8; //segment:ovl_menu D_menu_801AF1BC = 0x801AF1BC; //segment:ovl_menu D_menu_801AF1C0 = 0x801AF1C0; //segment:ovl_menu D_menu_801AF1C4 = 0x801AF1C4; //segment:ovl_menu diff --git a/linker_scripts/jp/rev1/undefined_syms.ld b/linker_scripts/jp/rev1/undefined_syms.ld new file mode 100644 index 00000000..b74d60e3 --- /dev/null +++ b/linker_scripts/jp/rev1/undefined_syms.ld @@ -0,0 +1 @@ +bootproc = 0x80004EB8; diff --git a/linker_scripts/us/rev0/symbol_addrs_engine.txt b/linker_scripts/us/rev0/symbol_addrs_engine.txt new file mode 100644 index 00000000..4cd84ae7 --- /dev/null +++ b/linker_scripts/us/rev0/symbol_addrs_engine.txt @@ -0,0 +1 @@ +Save_Read = 0x800BED14; \ No newline at end of file diff --git a/linker_scripts/us/rev1/symbol_addrs.txt b/linker_scripts/us/rev1/symbol_addrs.txt index a428d50b..3e1538a7 100644 --- a/linker_scripts/us/rev1/symbol_addrs.txt +++ b/linker_scripts/us/rev1/symbol_addrs.txt @@ -69,7 +69,7 @@ gTeamEventActorIndex = 0x800CFF80;//size:0x10 gLockOnTargetViewPos = 0x80161578;//size:0x30 D_display_800CA23C = 0x800CA23C;//size:0x18 -D_display_800CA26C = 0x800CA26C;//size:0x20 +sFaceDL = 0x800CA26C;//size:0x20 D_800CA260 = 0x800CA260;//size:0xC D_display_801613E0 = 0x801613E0;//size:0x18 gObjectInfo = 0x800CC124;//type:u8 diff --git a/linker_scripts/us/rev1/symbol_addrs_EBFBE0.txt b/linker_scripts/us/rev1/symbol_addrs_EBFBE0.txt index 4fe5c3c2..4b589a82 100644 --- a/linker_scripts/us/rev1/symbol_addrs_EBFBE0.txt +++ b/linker_scripts/us/rev1/symbol_addrs_EBFBE0.txt @@ -1,5 +1,5 @@ -Option_ExpertSoundUpdate = 0x80195944; // segment:ovl_menu -Option_VersusStageInit = 0x80199FA8; // segment:ovl_menu +Option_ExpertSound_Update = 0x80195944; // segment:ovl_menu +Option_VersusStage_Setup = 0x80199FA8; // segment:ovl_menu planet = 0x801AF4A0; // type:Planet segment:ovl_menu size:0x38 sPlanetNames = 0x801AF9F4; // type:s32 segment:ovl_menu size:0xF Map_GetPlanetId = 0x801A6480; // force_migration:True segment:ovl_menu @@ -7,13 +7,13 @@ sOptionCardList = 0x801AE638; // type:OptionEntry segment:ovl_menu size:0x240 D_menu_801AE99C = 0x801AE99C; // force_migration:True segment:ovl_menu sTimeTrialMinuteTextures = 0x801AF28C; // force_migration:True segment:ovl_menu sPlanetList = 0x801AF7E8;// segment:ovl_menu -spectrumAnalyzerMode = 0x801B9318;// segment:ovl_menu -D_menu_801AE998 = 0x801AE998; //size:4 segment:ovl_menu +sSpectrumAnalyzerMode = 0x801B9318;// segment:ovl_menu +sSoundMode = 0x801AE998; //size:4 segment:ovl_menu sPaths = 0x801AFD18; // segment:ovl_menu D_menu_801B6E50 = 0x801B6E50; // force_migration:True segment:ovl_menu D_menu_801B7BA0 = 0x801B7BA0;// segment:ovl_menu -D_menu_801B8248 = 0x801B8248; // size:0x28 segment:ovl_menu -D_menu_801B827C = 0x801B827C; // segment:ovl_menu +sRankNameEntry = 0x801B8248; // size:0x28 segment:ovl_menu +gGoToTitle = 0x801B827C; // segment:ovl_menu D_menu_801B9710 = 0x801B9710; // segment:ovl_menu D_menu_801B9A10 = 0x801B9A10; // segment:ovl_menu D_menu_801B9D10 = 0x801B9D10; // segment:ovl_menu diff --git a/linker_scripts/us/rev1/symbol_addrs_assets.txt b/linker_scripts/us/rev1/symbol_addrs_assets.txt index 6c36a3a3..acb0c6ac 100644 --- a/linker_scripts/us/rev1/symbol_addrs_assets.txt +++ b/linker_scripts/us/rev1/symbol_addrs_assets.txt @@ -92,6 +92,6 @@ D_A6_6028578 = 0x6028578; aA6GorgonHitbox = 0x6028454; D_TITLE_60246F8 = 0x60246F8; -D_TITLE_60338DC = 0x60338DC; -D_TITLE_6036278 = 0x6036278; -D_TITLE_603531C = 0x603531C; \ No newline at end of file +aFalcoAnim = 0x60338DC; +aSlippyAnim = 0x6036278; +aPeppyAnim = 0x603531C; \ No newline at end of file diff --git a/linker_scripts/us/rev1/symbol_addrs_engine.txt b/linker_scripts/us/rev1/symbol_addrs_engine.txt index e622ea48..3a5ed4c3 100644 --- a/linker_scripts/us/rev1/symbol_addrs_engine.txt +++ b/linker_scripts/us/rev1/symbol_addrs_engine.txt @@ -6,8 +6,8 @@ sSmallChars = 0x800D2660;//type:asciz size:42 Graphics_ClearPrintBuffer = 0x80099980; Graphics_Printf = 0x800999D8; -Texture_Scroll = 0x80099A2C; -Texture_Mottle = 0x80099E28; +Lib_Texture_Scroll = 0x80099A2C; +Lib_Texture_Mottle = 0x80099E28; Animation_GetLimbIndex = 0x8009A400; Animation_DrawLimb = 0x8009A440; Animation_DrawSkeleton = 0x8009A72C; @@ -20,23 +20,23 @@ Math_SmoothStepToF = 0x8009BC2C; Math_SmoothStepToAngle = 0x8009BD38; Math_SmoothStepToVec3fArray = 0x8009BEEC; Math_PursueVec3f = 0x8009C124; -TextureRect_CI4 = 0x8009C320; -TextureRect_CI4_Flip = 0x8009C674; -TextureRect_CI4_MirX = 0x8009C9C8; -TextureRect_CI4_MirY = 0x8009CD3C; -TextureRect_CI8 = 0x8009D0BC; -TextureRect_RGBA16 = 0x8009D418; -TextureRect_RGBA16_MirX = 0x8009D6CC; -TextureRect_IA8 = 0x8009D994; -TextureRect_IA8_FlipMirX = 0x8009DC4C; -TextureRect_IA8_FlipMirY = 0x8009DF14; -TextureRect_IA8_MirX = 0x8009E1E8; -TextureRect_IA8_MirY = 0x8009E4B0; -TextureRect_IA16 = 0x8009E784; -TextureRect_IA16_MirX = 0x8009EA38; -TextureRect_IA16_MirY = 0x8009ED04; -TextureRect_IA16_MirXY = 0x8009EFDC; -TextureRect_RGBA32 = 0x8009F2C0; +Lib_TextureRect_CI4 = 0x8009C320; +Lib_TextureRect_CI4_Flip = 0x8009C674; +Lib_TextureRect_CI4_MirX = 0x8009C9C8; +Lib_TextureRect_CI4_MirY = 0x8009CD3C; +Lib_TextureRect_CI8 = 0x8009D0BC; +Lib_TextureRect_RGBA16 = 0x8009D418; +Lib_TextureRect_RGBA16_MirX = 0x8009D6CC; +Lib_TextureRect_IA8 = 0x8009D994; +Lib_TextureRect_IA8_FlipMirX = 0x8009DC4C; +Lib_TextureRect_IA8_FlipMirY = 0x8009DF14; +Lib_TextureRect_IA8_MirX = 0x8009E1E8; +Lib_TextureRect_IA8_MirY = 0x8009E4B0; +Lib_TextureRect_IA16 = 0x8009E784; +Lib_TextureRect_IA16_MirX = 0x8009EA38; +Lib_TextureRect_IA16_MirY = 0x8009ED04; +Lib_TextureRect_IA16_MirXY = 0x8009EFDC; +Lib_TextureRect_RGBA32 = 0x8009F2C0; Graphics_FillRectangle = 0x8009F574; Math_Vec3fFromAngles = 0x8009F6CC; Math_RadToDeg = 0x8009F768; @@ -394,7 +394,7 @@ gTotalHits = 0x80161714; gShowBossHealth = 0x80161734; gMedalStatus = 0x801617B4; gMedalFlashTimer = 0x801617B8; -D_800D1AEC = 0x800D1AEC; //type:s32 size:0x1B0 +sLevelTitleCard = 0x800D1AEC; //type:s32 size:0x1B0 // fox_play gSavedZoSearchlightStatus = 0x80161A50; diff --git a/src/audio/audio_general.c b/src/audio/audio_general.c index 6bf0178c..c860a2ea 100644 --- a/src/audio/audio_general.c +++ b/src/audio/audio_general.c @@ -82,7 +82,7 @@ u8 sSeqCmdWritePos = 0; u8 sSeqCmdReadPos = 0; u8 sStartSeqDisabled = 0; u8 sSoundModeList[4] = { SOUNDMODE_STEREO, SOUNDMODE_HEADSET, SOUNDMODE_SURROUND, SOUNDMODE_MONO }; -u8 sAudioSpecId = AUDIOSPEC_0; +u8 sAudioSpecId = AUDIOSPEC_CO; u8 sAudioResetStatus = AUDIORESET_READY; s32 D_800C5D5C = 0; // unused. file split? s8 sEnvReverb = 0; @@ -130,35 +130,35 @@ SoundTestTrack sSoundTestTracks[] = { /* 1 */ { NA_BGM_TITLE, AUDIOSPEC_23 | (SFXCHAN_0 << 8), -1 }, /* 2 */ { NA_BGM_SELECT, AUDIOSPEC_23 | (SFXCHAN_0 << 8), -1 }, /* 3 */ { NA_BGM_MAP, AUDIOSPEC_24 | (SFXCHAN_1 << 8), -1 }, - /* 4 */ { NA_BGM_START_DEMO, AUDIOSPEC_0 | (SFXCHAN_0 << 8), -1 }, - /* 5 */ { NA_BGM_START_DEMO_S, AUDIOSPEC_1 | (SFXCHAN_0 << 8), -1 }, - /* 6 */ { NA_BGM_START_DEMO_M, AUDIOSPEC_1 | (SFXCHAN_0 << 8), -1 }, - /* 7 */ { NA_BGM_ME_START_DEMO, AUDIOSPEC_1 | (SFXCHAN_0 << 8), -1 }, - /* 8 */ { NA_BGM_FO_START_DEMO, AUDIOSPEC_8 | (SFXCHAN_0 << 8), -1 }, - /* 9 */ { NA_BGM_STAGE_CO, AUDIOSPEC_0 | (SFXCHAN_0 << 8), -1 }, - /* 10 */ { NA_BGM_STAGE_ME, AUDIOSPEC_1 | (SFXCHAN_0 << 8), -1 }, - /* 11 */ { NA_BGM_STAGE_TI, AUDIOSPEC_2 | (SFXCHAN_0 << 8), -1 }, - /* 12 */ { NA_BGM_STAGE_SX, AUDIOSPEC_3 | (SFXCHAN_0 << 8), -1 }, - /* 13 */ { NA_BGM_STAGE_ZO, AUDIOSPEC_4 | (SFXCHAN_0 << 8), -1 }, - /* 14 */ { NA_BGM_STAGE_A6, AUDIOSPEC_5 | (SFXCHAN_0 << 8), -1 }, + /* 4 */ { NA_BGM_START_DEMO, AUDIOSPEC_CO | (SFXCHAN_0 << 8), -1 }, + /* 5 */ { NA_BGM_START_DEMO_S, AUDIOSPEC_ME | (SFXCHAN_0 << 8), -1 }, + /* 6 */ { NA_BGM_START_DEMO_M, AUDIOSPEC_ME | (SFXCHAN_0 << 8), -1 }, + /* 7 */ { NA_BGM_ME_START_DEMO, AUDIOSPEC_ME | (SFXCHAN_0 << 8), -1 }, + /* 8 */ { NA_BGM_FO_START_DEMO, AUDIOSPEC_FO | (SFXCHAN_0 << 8), -1 }, + /* 9 */ { NA_BGM_STAGE_CO, AUDIOSPEC_CO | (SFXCHAN_0 << 8), -1 }, + /* 10 */ { NA_BGM_STAGE_ME, AUDIOSPEC_ME | (SFXCHAN_0 << 8), -1 }, + /* 11 */ { NA_BGM_STAGE_TI, AUDIOSPEC_TI | (SFXCHAN_0 << 8), -1 }, + /* 12 */ { NA_BGM_STAGE_SX, AUDIOSPEC_SX | (SFXCHAN_0 << 8), -1 }, + /* 13 */ { NA_BGM_STAGE_ZO, AUDIOSPEC_ZO | (SFXCHAN_0 << 8), -1 }, + /* 14 */ { NA_BGM_STAGE_A6, AUDIOSPEC_A6 | (SFXCHAN_0 << 8), -1 }, /* 15 */ { NA_BGM_STAGE_VE1, AUDIOSPEC_6 | (SFXCHAN_0 << 8), -1 }, - /* 16 */ { NA_BGM_STAGE_SY, AUDIOSPEC_7 | (SFXCHAN_0 << 8), -1 }, - /* 17 */ { NA_BGM_STAGE_FO, AUDIOSPEC_8 | (SFXCHAN_0 << 8), -1 }, - /* 18 */ { NA_BGM_STAGE_BO, AUDIOSPEC_10 | (SFXCHAN_0 << 8), -1 }, - /* 19 */ { NA_BGM_STAGE_KA, AUDIOSPEC_11 | (SFXCHAN_0 << 8), -1 }, - /* 20 */ { NA_BGM_STAGE_AQ, AUDIOSPEC_12 | (SFXCHAN_0 << 8), -1 }, - /* 21 */ { NA_BGM_STAGE_WZ, AUDIOSPEC_1 | (SFXCHAN_0 << 8), -1 }, - /* 22 */ { NA_BGM_KATT, AUDIOSPEC_13 | (SFXCHAN_0 << 8), -1 }, - /* 23 */ { NA_BGM_BILL, AUDIOSPEC_11 | (SFXCHAN_0 << 8), -1 }, - /* 24 */ { NA_BGM_BOSS_CO, AUDIOSPEC_0 | (SFXCHAN_0 << 8), -1 }, - /* 25 */ { NA_BGM_BOSS_ME, AUDIOSPEC_1 | (SFXCHAN_0 << 8), 0 }, - /* 26 */ { NA_BGM_BOSS_ME, AUDIOSPEC_1 | (SFXCHAN_0 << 8), -1 }, - /* 27 */ { NA_BGM_REAL_BOSS, AUDIOSPEC_7 | (SFXCHAN_0 << 8), -1 }, - /* 28 */ { NA_BGM_BOSS_BO, AUDIOSPEC_10 | (SFXCHAN_0 << 8), -1 }, + /* 16 */ { NA_BGM_STAGE_SY, AUDIOSPEC_SY | (SFXCHAN_0 << 8), -1 }, + /* 17 */ { NA_BGM_STAGE_FO, AUDIOSPEC_FO | (SFXCHAN_0 << 8), -1 }, + /* 18 */ { NA_BGM_STAGE_BO, AUDIOSPEC_BO | (SFXCHAN_0 << 8), -1 }, + /* 19 */ { NA_BGM_STAGE_KA, AUDIOSPEC_KA | (SFXCHAN_0 << 8), -1 }, + /* 20 */ { NA_BGM_STAGE_AQ, AUDIOSPEC_AQ | (SFXCHAN_0 << 8), -1 }, + /* 21 */ { NA_BGM_STAGE_WZ, AUDIOSPEC_ME | (SFXCHAN_0 << 8), -1 }, + /* 22 */ { NA_BGM_KATT, AUDIOSPEC_SZ | (SFXCHAN_0 << 8), -1 }, + /* 23 */ { NA_BGM_BILL, AUDIOSPEC_KA | (SFXCHAN_0 << 8), -1 }, + /* 24 */ { NA_BGM_BOSS_CO, AUDIOSPEC_CO | (SFXCHAN_0 << 8), -1 }, + /* 25 */ { NA_BGM_BOSS_ME, AUDIOSPEC_ME | (SFXCHAN_0 << 8), 0 }, + /* 26 */ { NA_BGM_BOSS_ME, AUDIOSPEC_ME | (SFXCHAN_0 << 8), -1 }, + /* 27 */ { NA_BGM_REAL_BOSS, AUDIOSPEC_SY | (SFXCHAN_0 << 8), -1 }, + /* 28 */ { NA_BGM_BOSS_BO, AUDIOSPEC_BO | (SFXCHAN_0 << 8), -1 }, /* 29 */ { NA_BGM_STARWOLF, AUDIOSPEC_6 | (SFXCHAN_0 << 8), -1 }, - /* 30 */ { NA_BGM_COURSE_CLEAR, AUDIOSPEC_0 | (SFXCHAN_0 << 8), -1 }, - /* 31 */ { NA_BGM_COURSE_FAILURE, AUDIOSPEC_0 | (SFXCHAN_0 << 8), -1 }, - /* 32 */ { NA_BGM_PLAYER_DOWN, AUDIOSPEC_0 | (SFXCHAN_0 << 8), -1 }, + /* 30 */ { NA_BGM_COURSE_CLEAR, AUDIOSPEC_CO | (SFXCHAN_0 << 8), -1 }, + /* 31 */ { NA_BGM_COURSE_FAILURE, AUDIOSPEC_CO | (SFXCHAN_0 << 8), -1 }, + /* 32 */ { NA_BGM_PLAYER_DOWN, AUDIOSPEC_CO | (SFXCHAN_0 << 8), -1 }, /* 33 */ { NA_BGM_GAME_OVER, AUDIOSPEC_25 | (SFXCHAN_0 << 8), -1 }, /* 34 */ { NA_BGM_TRAINING, AUDIOSPEC_28 | (SFXCHAN_0 << 8), -1 }, /* 35 */ { NA_BGM_BATTLE, AUDIOSPEC_16 | (SFXCHAN_3 << 8), -1 }, @@ -618,7 +618,7 @@ void Audio_LoadInstruments(void) { } void Audio_LoadAquasSequence(void) { - if (sAudioSpecId == AUDIOSPEC_12) { + if (sAudioSpecId == AUDIOSPEC_AQ) { AUDIOCMD_GLOBAL_SYNC_LOAD_SEQ_PARTS(NA_BGM_STAGE_AQ, 0); } } @@ -2714,7 +2714,7 @@ void Audio_RestartSeqPlayers(void) { u16 fadeIn = 1; Audio_StartSequence(SEQ_PLAYER_VOICE, NA_BGM_VO, -1, 1); - if (sAudioSpecId == AUDIOSPEC_12) { + if (sAudioSpecId == AUDIOSPEC_AQ) { fadeIn = 360; } else if (sAudioSpecId < AUDIOSPEC_23) { fadeIn = 90; diff --git a/src/audio/audio_load.c b/src/audio/audio_load.c index 7b5a2216..b8d5d6b1 100644 --- a/src/audio/audio_load.c +++ b/src/audio/audio_load.c @@ -946,7 +946,7 @@ void AudioLoad_Init(void) { } } - gAudioSpecId = AUDIOSPEC_0; + gAudioSpecId = AUDIOSPEC_CO; gAudioResetStep = 1; AudioHeap_ResetStep(); diff --git a/src/audio/audio_thread.c b/src/audio/audio_thread.c index dfa3cfe1..14e07fd2 100644 --- a/src/audio/audio_thread.c +++ b/src/audio/audio_thread.c @@ -432,7 +432,7 @@ void AudioThread_ResetAudioHeap(s32 specId) { void AudioThread_PreNMIReset(void) { gAudioResetTimer = 1; - AudioThread_ResetAudioHeap(AUDIOSPEC_0); + AudioThread_ResetAudioHeap(AUDIOSPEC_CO); gAudioResetStep = 0; } diff --git a/src/engine/fox_360.c b/src/engine/fox_360.c index d1be5ea4..a283479b 100644 --- a/src/engine/fox_360.c +++ b/src/engine/fox_360.c @@ -2223,7 +2223,7 @@ void ActorAllRange_Update(ActorAllRange* this) { ActorAllRange_ApplyDamage(this); radarMark = &gRadarMarks[this->index]; - radarMark->status = 1; + radarMark->enabled = true; if (this->aiType == AI360_MISSILE) { radarMark->type = 100; diff --git a/src/engine/fox_beam.c b/src/engine/fox_beam.c index adb02894..ffe9c215 100644 --- a/src/engine/fox_beam.c +++ b/src/engine/fox_beam.c @@ -1306,7 +1306,7 @@ void PlayerShot_DrawShot(PlayerShot* shot) { gDPSetEnvColor(gMasterDisp++, 0, 128, 255, 255); } Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); } else { Matrix_Scale(gGfxMatrix, shot->scale, shot->scale, shot->scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -1422,7 +1422,7 @@ void PlayerShot_DrawShot(PlayerShot* shot) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 32, 32, 0, shot->unk_58); gDPSetEnvColor(gMasterDisp++, 32, 16, 16, shot->unk_58); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); } else if (shot->unk_5C == 0) { if (shot->scale > 1.5f) { break; @@ -1457,10 +1457,10 @@ void PlayerShot_DrawShot(PlayerShot* shot) { } Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 53.0f * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_101C2E0); + gSPDisplayList(gMasterDisp++, aStarDL); Matrix_RotateZ(gGfxMatrix, gGameFrameCount * -53.0f * 2.0f * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_101C2E0); + gSPDisplayList(gMasterDisp++, aStarDL); Matrix_Pop(&gGfxMatrix); if (((gGameFrameCount % 2) == 0)) { Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.7f, MTXF_APPLY); @@ -1468,7 +1468,7 @@ void PlayerShot_DrawShot(PlayerShot* shot) { Matrix_Scale(gGfxMatrix, 1.3f, 1.3f, 1.3f, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); } else { RCP_SetupDL(&gMasterDisp, SETUPDL_29); gSPDisplayList(gMasterDisp++, D_10231A0); @@ -1487,7 +1487,7 @@ void PlayerShot_DrawShot(PlayerShot* shot) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255); gDPSetEnvColor(gMasterDisp++, 255, 128, 128, 255); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); } break; case PLAYERSHOT_GFOX_LASER: diff --git a/src/engine/fox_bg.c b/src/engine/fox_bg.c index 09669d29..4b623be9 100644 --- a/src/engine/fox_bg.c +++ b/src/engine/fox_bg.c @@ -45,12 +45,16 @@ u16 gStarColors[16] = { 0x294B, 0x18DF, 0x294B, 0x1085, 0x39FF, 0x108B, 0x18CD, 0x108B, }; Gfx* sSunDLs[13] = { - D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_BG_PLANET_20112C0, D_102A8A0, - D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_BG_PLANET_20112C0, D_102A8A0, + aRadarMarkKaSaucererDL, aRadarMarkKaSaucererDL, aRadarMarkKaSaucererDL, aRadarMarkKaSaucererDL, + aRadarMarkKaSaucererDL, D_BG_PLANET_20112C0, aRadarMarkKaSaucererDL, aRadarMarkKaSaucererDL, + aRadarMarkKaSaucererDL, aRadarMarkKaSaucererDL, aRadarMarkKaSaucererDL, D_BG_PLANET_20112C0, + aRadarMarkKaSaucererDL, }; Gfx* sKaSunDLs[13] = { - D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, - D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, + aRadarMarkKaSaucererDL, aRadarMarkKaSaucererDL, aRadarMarkKaSaucererDL, aRadarMarkKaSaucererDL, + aRadarMarkKaSaucererDL, aRadarMarkKaSaucererDL, aRadarMarkKaSaucererDL, aRadarMarkKaSaucererDL, + aRadarMarkKaSaucererDL, aRadarMarkKaSaucererDL, aRadarMarkKaSaucererDL, aRadarMarkKaSaucererDL, + aRadarMarkKaSaucererDL, }; f32 sSunShifts[13] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 10.0f, 13.0f, 20.0f, 35.0f, 40.0f, 50.0f, 50.0f, 70.0f, diff --git a/src/engine/fox_context.c b/src/engine/fox_context.c index cfe7acf3..7396c973 100644 --- a/src/engine/fox_context.c +++ b/src/engine/fox_context.c @@ -18,6 +18,11 @@ LevelMode gLevelMode; DrawMode gDrawMode; s32 gPlayerNum; s32 gCamCount; +/** + * gTeamShields[1] = Falco + * gTeamShields[2] = Slippy + * gTeamShields[3] = Peppy + */ s32 gTeamShields[6]; s32 gSavedTeamShields[6]; s32 gPrevPlanetSavedTeamShields[6]; @@ -46,6 +51,11 @@ s32 gTitleState; s32 gMainController; s32 gMapState; s32 gMissionNumber; +/** + * 0x 00 FF 00 00 Peppy + * 0x 00 00 FF 00 Slippy + * 0x 00 00 00 FF Falco + */ s32 gMissionTeamStatus[7]; s32 gMissionHitCount[7]; PlanetId gMissionPlanet[7]; @@ -351,8 +361,8 @@ s32 gLeftWingDebrisTimer[4]; s32 gBombCount[4]; s32 gVsPoints[4]; s32 gVsKills[4][10]; -s32 gVsMatchOver; -s32 gVsMatchStart; +s32 gVsMatchWon; +bool gVsMatchStart; bool gChangeTo360; Vec3f gTeamArrowsViewPos[10]; f32 D_ctx_80177F20[65]; // Seem to be an early implementation of RadarMark diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index aeaa775c..224c0e8e 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -167,11 +167,11 @@ void Cutscene_WarpZoneComplete(Player* player) { break; case 200: - gShowLevelClearStatusScreen = 1; + gShowLevelClearStatusScreen = true; break; case 400: - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; break; case 420: @@ -623,7 +623,7 @@ void Cutscene_LevelStart(Player* player) { break; case LEVEL_AQUAS: - HUD_AquasStart(player); + Aquas_CsLevelStart(player); break; case LEVEL_AREA_6: @@ -1251,11 +1251,11 @@ void Cutscene_CoComplete2(Player* player) { switch (gCsFrameCount) { case 961: - gShowLevelClearStatusScreen = 1; + gShowLevelClearStatusScreen = true; break; case 1161: - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; break; case 1255: @@ -1389,7 +1389,7 @@ void Cutscene_LevelComplete(Player* player) { case FORM_BLUE_MARINE: if (gCurrentLevel == LEVEL_AQUAS) { - HUD_AquasComplete(player); + Aquas_CsLevelComplete(player); } break; } @@ -2301,7 +2301,7 @@ void func_demo_8004F798(ActorCutscene* this) { void ActorCutscene_Update(ActorCutscene* this) { if (gCurrentLevel == LEVEL_AQUAS) { - func_hud_80093164(this); + Aquas_CsIntroActors_Update(this); return; } @@ -2499,7 +2499,7 @@ void func_demo_8004FCB8(ActorCutscene* this, s32 arg1) { Matrix_RotateY(gGfxMatrix, angle, MTXF_APPLY); Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); } } } @@ -2565,7 +2565,7 @@ void ActorCutscene_Draw(ActorCutscene* this) { RCP_SetupDL_49(); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->iwork[0]); gDPSetEnvColor(gMasterDisp++, 255, 255, 00, this->iwork[0]); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); break; case 20: @@ -2764,7 +2764,7 @@ void ActorCutscene_Draw(ActorCutscene* this) { gDPSetEnvColor(gMasterDisp++, this->iwork[4], this->iwork[5], this->iwork[6], this->iwork[7]); Matrix_Scale(gGfxMatrix, this->scale, this->fwork[4], 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); break; case 38: @@ -2794,7 +2794,7 @@ void ActorCutscene_Draw(ActorCutscene* this) { Matrix_RotateX(gGfxMatrix, -x, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); Math_SmoothStepToF(&this->fwork[0], 0.0f, 0.1f, 0.2f, 0.05f); } @@ -2826,7 +2826,7 @@ void ActorCutscene_Draw(ActorCutscene* this) { Matrix_RotateX(gGfxMatrix, -x, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); Math_SmoothStepToF(&this->fwork[6], 0.00f, 0.1f, 0.6f, 0); } break; @@ -2856,7 +2856,7 @@ void ActorCutscene_Draw(ActorCutscene* this) { Matrix_Scale(gGfxMatrix, this->fwork[0], this->fwork[0], this->fwork[0], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); if (this->iwork[0] != 0) { this->iwork[0] -= 7; @@ -2899,11 +2899,11 @@ void Cutscene_DrawGreatFox(void) { PRINTF("d Enm->wrk0 %d\n"); if (gGameState == GSTATE_TITLE) { - dList = D_TITLE_60320E0; + dList = aTitleArwingEngineGlowDL; } else if (gGameState == GSTATE_ENDING) { dList = D_END_7010970; } else { - dList = D_1024AC0; + dList = aOrbDL; } if (gCurrentLevel == LEVEL_TITANIA) { diff --git a/src/engine/fox_display.c b/src/engine/fox_display.c index 91014a98..77927cd2 100644 --- a/src/engine/fox_display.c +++ b/src/engine/fox_display.c @@ -333,8 +333,8 @@ void Display_Landmaster(Player* player) { Matrix_Pop(&gGfxMatrix); } -Gfx* D_display_800CA26C[] = { D_arwing_3000090, D_arwing_3016CC0, D_arwing_3005AB0, D_arwing_3003CE0 }; -Gfx* D_display_800CA27C[] = { D_arwing_3001C90, D_arwing_3016CC0, D_arwing_3005AB0, D_arwing_3003CE0 }; +Gfx* sFaceDL[] = { aAwFoxHeadDL, aAwFalcoHeadDL, aAwSlippyHeadDL, aAwPeppyHeadDL }; +Gfx* sExpertFaceDL[] = { aAwJamesHeadDL, aAwFalcoHeadDL, aAwSlippyHeadDL, aAwPeppyHeadDL }; f32 D_display_800CA28C = 2.0f; f32 D_display_800CA290 = 13.0f; f32 D_display_800CA294 = -10.0f; @@ -361,7 +361,7 @@ void Display_LandmasterMuzzleFlash(Player* player) { RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 0, 255, 0, 255); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); } } Matrix_Pop(&gGfxMatrix); @@ -463,7 +463,7 @@ bool Display_ArwingWingsOverrideLimbDraw(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos *gfxPtr = NULL; } if (arwing->rightWingState == WINGSTATE_BROKEN) { - *gfxPtr = D_arwing_3015120; + *gfxPtr = aAwLeftWingBrokenDL; } if (D_display_800CA22C && ((gRightWingFlashTimer[0] % 2) != 0)) { RCP_SetupDL(&gMasterDisp, SETUPDL_34); @@ -497,7 +497,7 @@ bool Display_ArwingWingsOverrideLimbDraw(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos *gfxPtr = NULL; } if (arwing->leftWingState == WINGSTATE_BROKEN) { - *gfxPtr = D_arwing_3014BF0; + *gfxPtr = aAwRightWingBrokenDL; } if (D_display_800CA22C && ((gLeftWingFlashTimer[0] % 2) != 0)) { RCP_SetupDL(&gMasterDisp, SETUPDL_34); @@ -595,20 +595,23 @@ void Display_ArwingWings(ArwingInfo* arwing) { Matrix_RotateY(gGfxMatrix, arwing->teamFaceYrot * M_DTOR, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, arwing->teamFaceXrot * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 1.0f / 70.925f, 1.0f / 70.925f, 1.0f / 70.925f, MTXF_APPLY); + if (gGameState == GSTATE_ENDING) { Matrix_Scale(gGfxMatrix, 0.95f, 0.95f, 0.95f, MTXF_APPLY); } + Matrix_SetGfxMtx(&gMasterDisp); + if (gExpertMode) { - gSPDisplayList(gMasterDisp++, D_display_800CA27C[drawFace - 1]); + gSPDisplayList(gMasterDisp++, sExpertFaceDL[drawFace - 1]); } else { - gSPDisplayList(gMasterDisp++, D_display_800CA26C[drawFace - 1]); + gSPDisplayList(gMasterDisp++, sFaceDL[drawFace - 1]); } Matrix_Pop(&gGfxMatrix); } Matrix_Translate(gGfxMatrix, 0.0f, 17.2f, -25.8f, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, arwing->windshieldXrot * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, arwing->cockpitGlassXrot * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL_64_2(); @@ -674,7 +677,7 @@ void Display_Arwing(Player* player, s32 reflectY) { Matrix_Translate(gGfxMatrix, 0.0f, -8.0f, 5.0f, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_arwing_30131F0); + gSPDisplayList(gMasterDisp++, aAwCockpitViewDL); Matrix_Pop(&gGfxMatrix); } } else { @@ -808,7 +811,7 @@ void Display_PlayerShadow_Draw(Player* player) { Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - gSPDisplayList(gMasterDisp++, D_102A8A0); + gSPDisplayList(gMasterDisp++, aRadarMarkKaSaucererDL); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); Matrix_Pop(&gGfxMatrix); break; @@ -833,7 +836,7 @@ void Display_DrawEngineGlow(EngineGlowColor color) { gDPSetEnvColor(gMasterDisp++, 255, 64, 0, 255); break; } - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); } void Display_LandmasterEngineGlow_Draw(Player* player) { @@ -927,8 +930,8 @@ void Display_UnusedShield(Player* player) { gDPSetEnvColor(gMasterDisp++, 255, 0, 255, (s32) gShieldAlpha[player->num]); gSPDisplayList(gMasterDisp++, aUnusedShieldDL); Matrix_Pop(&gGfxMatrix); - Texture_Scroll(aUnusedShieldTex, 32, 32, 3); - Texture_Scroll(aUnusedShieldTex, 32, 32, 3); + Lib_Texture_Scroll(aUnusedShieldTex, 32, 32, 3); + Lib_Texture_Scroll(aUnusedShieldTex, 32, 32, 3); } } @@ -990,10 +993,10 @@ void Display_ArwingLaserCharge(Player* player) { Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 53.0f * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_101C2E0); + gSPDisplayList(gMasterDisp++, aStarDL); Matrix_RotateZ(gGfxMatrix, gGameFrameCount * -53.0f * 2.0f * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_101C2E0); + gSPDisplayList(gMasterDisp++, aStarDL); Matrix_Pop(&gGfxMatrix); if (player->alternateView && (gLevelMode == LEVELMODE_ON_RAILS)) { @@ -1008,7 +1011,7 @@ void Display_ArwingLaserCharge(Player* player) { Matrix_Scale(gGfxMatrix, 1.3f, 1.3f, 1.0f, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); Matrix_Pop(&gGfxMatrix); } @@ -1039,7 +1042,7 @@ void Display_ArwingLaserCharge(Player* player) { Matrix_Scale(gGfxMatrix, gMuzzleFlashScale[player->num], gMuzzleFlashScale[player->num], 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); Matrix_Pop(&gGfxMatrix); break; @@ -1060,7 +1063,7 @@ void Display_ArwingLaserCharge(Player* player) { Matrix_Scale(gGfxMatrix, gMuzzleFlashScale[player->num], gMuzzleFlashScale[player->num], 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); @@ -1068,7 +1071,7 @@ void Display_ArwingLaserCharge(Player* player) { Matrix_Scale(gGfxMatrix, gMuzzleFlashScale[player->num], gMuzzleFlashScale[player->num], 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); Matrix_Pop(&gGfxMatrix); break; @@ -1119,11 +1122,11 @@ void Display_LandmasterLaserCharge(Player* player) { Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 53.0f * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_101C2E0); + gSPDisplayList(gMasterDisp++, aStarDL); Matrix_RotateZ(gGfxMatrix, gGameFrameCount * -53.0f * 2.0f * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_101C2E0); + gSPDisplayList(gMasterDisp++, aStarDL); Matrix_Pop(&gGfxMatrix); Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 1.0f, MTXF_APPLY); @@ -1134,7 +1137,7 @@ void Display_LandmasterLaserCharge(Player* player) { Matrix_Scale(gGfxMatrix, 1.3f, 1.3f, 1.0f, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); Matrix_Pop(&gGfxMatrix); } } @@ -1243,7 +1246,7 @@ void Display_ArwingWingTrail_Draw(Player* player) { Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, M_DTOR * sp54, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_102A8A0); + gSPDisplayList(gMasterDisp++, aRadarMarkKaSaucererDL); Matrix_Pop(&gGfxMatrix); } if (player->arwing.rightWingState == WINGSTATE_INTACT) { @@ -1256,7 +1259,7 @@ void Display_ArwingWingTrail_Draw(Player* player) { Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, M_DTOR * sp54, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_102A8A0); + gSPDisplayList(gMasterDisp++, aRadarMarkKaSaucererDL); Matrix_Pop(&gGfxMatrix); } } @@ -1712,7 +1715,9 @@ void Display_Update(void) { tempVec.x = camPlayer->cam.eye.x - camPlayer->pos.x; tempVec.y = camPlayer->cam.eye.y - camPlayer->pos.y; tempVec.z = camPlayer->cam.eye.z - (camPlayer->trueZpos + camPlayer->zPath); + Matrix_MultVec3f(gCalcMatrix, &tempVec, &gPlayCamEye); + gPlayCamEye.x += camPlayer->pos.x; gPlayCamEye.y += camPlayer->pos.y; gPlayCamEye.z += camPlayer->trueZpos + camPlayer->zPath; @@ -1720,7 +1725,9 @@ void Display_Update(void) { tempVec.x = camPlayer->cam.at.x - camPlayer->pos.x; tempVec.y = camPlayer->cam.at.y - camPlayer->pos.y; tempVec.z = camPlayer->cam.at.z - (camPlayer->trueZpos + camPlayer->zPath); + Matrix_MultVec3f(gCalcMatrix, &tempVec, &gPlayCamAt); + gPlayCamAt.x += camPlayer->pos.x; gPlayCamAt.y += camPlayer->pos.y; gPlayCamAt.z += camPlayer->trueZpos + camPlayer->zPath; @@ -1900,7 +1907,7 @@ void Display_Update(void) { if ((gCamCount != 1) && ((camPlayer->state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (camPlayer->state_1C8 == PLAYERSTATE_1C8_U_TURN))) { HUD_Draw(); - HUD_DrawEdgeArrows(); + HUD_EdgeArrows_Update(); } Matrix_Pop(&gGfxMatrix); Display_DrawHelpAlert(); diff --git a/src/engine/fox_edata_info.c b/src/engine/fox_edata_info.c index a5dc6c08..cad96ccd 100644 --- a/src/engine/fox_edata_info.c +++ b/src/engine/fox_edata_info.c @@ -424,7 +424,7 @@ ObjectInfo gObjectInfo[] = { /* OBJ_BOSS_SX_SPYBORG_RIGHT_ARM */ {(void*) SectorX_SxSpyborgRightArm_Draw, 2, (ObjectFunc) SectorX_SxSpyborgRightArm_Update, aSxSpyborgRightArmHitbox, 1000.0f, 0, 0, 20, 0, 0.0f, 10 }, /* OBJ_BOSS_TI_GORAS */ {(void*) Titania_TiGoras_Draw, 1, (ObjectFunc) Titania_TiGoras_Update, aTiGorasHitbox, 1000.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_ZO_SARUMARINE */ {(void*) Zoness_ZoSarumarine_Draw, 2, (ObjectFunc) Zoness_ZoSarumarine_Update, aZoSarumarineHitbox, 1000.0f, 0, 0, 40, 0, 1.0f, 10 }, - /* OBJ_BOSS_FO_BASE */ {(void*) HUD_FoBase_Draw, 1, (ObjectFunc) HUD_FoBase_Update, aFoBaseHitbox, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, + /* OBJ_BOSS_FO_BASE */ {(void*) FoBase_Draw, 1, (ObjectFunc) FoBase_Update, aFoBaseHitbox, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_BO_BASE */ {(void*) BoBase_Draw, 1, (ObjectFunc) BoBase_Update, gNoHitbox, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_BO_BASE_SHIELD */ {(void*) BoBaseShield_Draw, 1, (ObjectFunc) BoBaseShield_Update, gNoHitbox, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_BO_BASE_CORE */ {(void*) Bolse_BoBaseCore_Draw, 2, (ObjectFunc) Bolse_BoBaseCore_Update, aBoBaseCoreHitbox, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, @@ -479,7 +479,7 @@ ObjectInfo gObjectInfo[] = { /* OBJ_EFFECT_360 */ {(void*) Effect_Effect360_361_362_Draw, 1, (ObjectFunc) Effect_Effect360_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, /* OBJ_EFFECT_361 */ {(void*) Effect_Effect360_361_362_Draw, 1, (ObjectFunc) Effect_Effect361_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, /* OBJ_EFFECT_362 */ {(void*) Effect_Effect360_361_362_Draw, 1, (ObjectFunc) Effect_Effect362_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_363 */ {(void*) Hud_Effect363_Draw, 1, (ObjectFunc) Hud_Effect363_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_363 */ {(void*) Aquas_Effect363_Draw, 1, (ObjectFunc) Aquas_Effect363_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, /* OBJ_EFFECT_364 */ {(void*) Effect_Effect364_Draw, 1, (ObjectFunc) Effect_Effect364_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, /* OBJ_EFFECT_365 */ {(void*) Effect_Effect365_Draw, 1, (ObjectFunc) Effect_Effect365_Update, NULL, -200.0f, 1, 1, 0, 0, 0.0f, 0 }, /* OBJ_EFFECT_366 */ {(void*) Effect_Effect366_Draw, 1, (ObjectFunc) Aquas_Effect366_Update, NULL, 100.0f, 1, 2, 0, 0, 0.0f, 0 }, diff --git a/src/engine/fox_edisplay.c b/src/engine/fox_edisplay.c index ded922f6..0fc75bd5 100644 --- a/src/engine/fox_edisplay.c +++ b/src/engine/fox_edisplay.c @@ -252,23 +252,23 @@ void ActorDebris_Draw(ActorDebris* this) { Matrix_Translate(gGfxMatrix, 18.0f, 15.0f, -15.0f, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_arwing_3016660); + gSPDisplayList(gMasterDisp++, aAwLeftWingDL); break; case 1: Matrix_Translate(gGfxMatrix, -18.0f, 15.0f, -15.0f, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_arwing_3015D80); + gSPDisplayList(gMasterDisp++, aAwRightWingDL); break; case 2: Graphics_SetScaleMtx(this->scale); - gSPDisplayList(gMasterDisp++, D_arwing_30155E0); + gSPDisplayList(gMasterDisp++, aAwFlap1DL); break; case 3: - gSPDisplayList(gMasterDisp++, D_arwing_3011720); + gSPDisplayList(gMasterDisp++, aAwLaserGun1DL); break; case 4: @@ -509,7 +509,7 @@ void Actor_DrawEngineAndContrails(Actor* this) { Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, M_DTOR * sp54, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_102A8A0); + gSPDisplayList(gMasterDisp++, aRadarMarkKaSaucererDL); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, -70.0f, -10.0f, -100.0f, MTXF_APPLY); @@ -518,7 +518,7 @@ void Actor_DrawEngineAndContrails(Actor* this) { Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, M_DTOR * sp54, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_102A8A0); + gSPDisplayList(gMasterDisp++, aRadarMarkKaSaucererDL); Matrix_Pop(&gGfxMatrix); } } @@ -581,7 +581,7 @@ void ActorTeamArwing_Draw(ActorTeamArwing* this) { gActorTeamArwing.bottomRightFlapYrot = this->fwork[26]; gActorTeamArwing.bottomLeftFlapYrot = this->fwork[27]; gActorTeamArwing.laserGunsYpos = gActorTeamArwing.laserGunsXpos = gActorTeamArwing.wingsXrot = - gActorTeamArwing.wingsYrot = gActorTeamArwing.windshieldXrot = gActorTeamArwing.wingsZrot = 0.0f; + gActorTeamArwing.wingsYrot = gActorTeamArwing.cockpitGlassXrot = gActorTeamArwing.wingsZrot = 0.0f; gActorTeamArwing.unk_28 = this->fwork[17]; gActorTeamArwing.drawFace = this->iwork[14]; gActorTeamArwing.teamFaceXrot = this->fwork[20]; @@ -680,7 +680,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { Matrix_Scale(gGfxMatrix, 1.2f, 0.0f, 1.2f, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_102A8A0); + gSPDisplayList(gMasterDisp++, aRadarMarkKaSaucererDL); } RCP_SetupDL(&gMasterDisp, SETUPDL_64); break; @@ -704,7 +704,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { Matrix_Scale(gGfxMatrix, temp_fv0, temp_fv0, temp_fv0, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, -M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); break; default: @@ -731,7 +731,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { } Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Graphics_SetScaleMtx(150.0f); - gSPDisplayList(gMasterDisp++, D_102A8A0); + gSPDisplayList(gMasterDisp++, aRadarMarkKaSaucererDL); break; case OBJ_BOSS_CO_CARRIER: @@ -778,7 +778,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { Matrix_Scale(gGfxMatrix, gActors[index].scale, 1.0f, gActors[index].scale, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, -M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); break; case OBJ_ACTOR_TI_DESERT_CRAWLER: @@ -793,7 +793,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { Matrix_Scale(gGfxMatrix, 6.0f, 1.0f, 7.5f, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, -M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); break; case OBJ_ACTOR_TI_BOMB: @@ -806,7 +806,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { Matrix_Scale(gGfxMatrix, 1.2f, 1.0f, 1.2f, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, -M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); break; case OBJ_ACTOR_MA_BOULDER: @@ -815,7 +815,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 255); Matrix_Scale(gGfxMatrix, 4.0f, 4.0f, 4.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); break; case OBJ_BOSS_VE1_GOLEMECH: diff --git a/src/engine/fox_effect.c b/src/engine/fox_effect.c index d4a89a61..4133d968 100644 --- a/src/engine/fox_effect.c +++ b/src/engine/fox_effect.c @@ -288,7 +288,7 @@ void Effect_Effect384_Draw(Effect384* this) { break; } - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); RCP_SetupDL(&gMasterDisp, SETUPDL_64); } @@ -298,7 +298,7 @@ void Effect_Effect385_Draw(Effect385* this) { RCP_SetupDL(&gMasterDisp, SETUPDL_38); gDPSetPrimColor(gMasterDisp++, 0, 0, 64, 192, 255, this->unk_44); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, this->unk_44); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); RCP_SetupDL(&gMasterDisp, SETUPDL_64); } @@ -372,7 +372,7 @@ void Effect_Effect347_Draw(Effect347* this) { void Effect_Effect351_Draw(Effect351* this) { Graphics_SetScaleMtx(this->scale2); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_4A); - gSPDisplayList(gMasterDisp++, D_102A8A0); + gSPDisplayList(gMasterDisp++, aRadarMarkKaSaucererDL); } void Effect_Clouds_Draw(EffectClouds* this) { @@ -442,7 +442,7 @@ void Effect_Effect346_Draw(Effect346* this) { tmp = temp_ft3 * 4.0f; gDPSetEnvColor(gMasterDisp++, D_800D173C[tmp + 0], D_800D173C[tmp + 1], D_800D173C[tmp + 2], 255); Graphics_SetScaleMtx(this->scale2); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); RCP_SetupDL(&gMasterDisp, SETUPDL_64); break; } @@ -561,7 +561,7 @@ void Effect_Effect393_Draw(Effect393* this) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 255, 255, 0, 255); Graphics_SetScaleMtx(this->scale2 * this->scale1); - gSPDisplayList(gMasterDisp++, D_101C2E0); + gSPDisplayList(gMasterDisp++, aStarDL); RCP_SetupDL(&gMasterDisp, SETUPDL_64); } @@ -774,7 +774,7 @@ void Effect_Effect357_Draw(Effect357* this) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 255, 80, 0, 255); Graphics_SetScaleMtx(this->scale1); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); break; case 11: @@ -878,7 +878,7 @@ void Effect_Effect357_Draw(Effect357* this) { } void Effect_Effect383_Update(Effect383* this) { - Texture_Scroll(D_10190C0, 16, 32, 0); + Lib_Texture_Scroll(D_10190C0, 16, 32, 0); gGroundClipMode = 2; this->obj.rot.y += 1.0f; Math_SmoothStepToF(&this->scale2, this->scale1, 0.05f, 1.5f, 0.001f); @@ -3097,7 +3097,7 @@ void Effect_Effect398_Draw(Effect398* this) { Matrix_RotateZ(gGfxMatrix, 30.0f * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 3.0f, 1.5f, 3.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); break; } } @@ -3319,7 +3319,7 @@ void Effect_Effect394_Draw(Effect394* this) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 190, 255); gDPSetEnvColor(gMasterDisp++, 239, 15, 0, 255); Graphics_SetScaleMtx(this->scale2); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); break; } } @@ -3894,14 +3894,14 @@ void Effect_Effect395_Draw(Effect395* this) { Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 32, 32, 255, 255); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); break; case 1: RCP_SetupDL(&gMasterDisp, SETUPDL_41); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); Graphics_SetScaleMtx(this->scale2); - gSPDisplayList(gMasterDisp++, D_101C2E0); + gSPDisplayList(gMasterDisp++, aStarDL); break; case 2: @@ -3910,7 +3910,7 @@ void Effect_Effect395_Draw(Effect395* this) { Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 32, 32, 255, 255); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); break; case 3: @@ -3954,7 +3954,7 @@ void Effect_Effect395_Draw(Effect395* this) { Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 255, 0, 128, 255); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); break; case 9: @@ -3963,12 +3963,12 @@ void Effect_Effect395_Draw(Effect395* this) { Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->scale1); gDPSetEnvColor(gMasterDisp++, 255, 255, 128, 255); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); break; case 10: if (gPlayState != PLAY_PAUSE) { - Texture_Scroll(D_A6_6012840, 16, 16, 0); + Lib_Texture_Scroll(D_A6_6012840, 16, 16, 0); } RCP_SetupDL(&gMasterDisp, SETUPDL_53); Matrix_Scale(gGfxMatrix, this->unk_60.x, this->unk_60.y, this->unk_60.z, MTXF_APPLY); @@ -3982,7 +3982,7 @@ void Effect_Effect395_Draw(Effect395* this) { gDPSetPrimColor(gMasterDisp++, 0, 0, 111, 111, 111, (s32) this->scale1); gDPSetEnvColor(gMasterDisp++, 255, 255, 255, 255); Graphics_SetScaleMtx(this->scale2); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); break; case 12: @@ -4234,6 +4234,6 @@ void Effect_Effect399_Draw(Effect399* this) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, D_800D1950[this->unk_44]); gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 255); } - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); RCP_SetupDL(&gMasterDisp, SETUPDL_64); } diff --git a/src/engine/fox_enmy.c b/src/engine/fox_enmy.c index cafc06d7..431df8af 100644 --- a/src/engine/fox_enmy.c +++ b/src/engine/fox_enmy.c @@ -2131,7 +2131,7 @@ void ActorSupplies_Update(ActorSupplies* this) { Object_Kill(&this->obj, this->sfxSource); } } - gRadarMarks[63].status = 1; + gRadarMarks[63].enabled = true; gRadarMarks[63].type = 103; gRadarMarks[63].pos.x = this->obj.pos.x; gRadarMarks[63].pos.y = this->obj.pos.y; diff --git a/src/engine/fox_enmy2.c b/src/engine/fox_enmy2.c index e35f7a0a..b1847580 100644 --- a/src/engine/fox_enmy2.c +++ b/src/engine/fox_enmy2.c @@ -109,7 +109,7 @@ void CoWaterfall_Update(CoWaterfall* this) { Vec3f sp24; Vec3f sp18; - Texture_Scroll(D_CO_60038F8, 32, 32, 1); + Lib_Texture_Scroll(D_CO_60038F8, 32, 32, 1); if ((gGameFrameCount % 4) == 0) { Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); diff --git a/src/engine/fox_game.c b/src/engine/fox_game.c index 6cd74a2f..81ed9d83 100644 --- a/src/engine/fox_game.c +++ b/src/engine/fox_game.c @@ -376,11 +376,11 @@ void Game_Update(void) { case GSTATE_SHOW_LOGO: RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); - TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 0], 128, 16, 100.0f, 86.0f, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 1], 128, 16, 100.0f, 102.0f, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 2], 128, 16, 100.0f, 118.0f, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 3], 128, 16, 100.0f, 134.0f, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 4], 128, 10, 100.0f, 150.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 0], 128, 16, 100.0f, 86.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 1], 128, 16, 100.0f, 102.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 2], 128, 16, 100.0f, 118.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 3], 128, 16, 100.0f, 134.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 4], 128, 10, 100.0f, 150.0f, 1.0f, 1.0f); gGameState++; break; @@ -400,11 +400,11 @@ void Game_Update(void) { case GSTATE_LOGO_WAIT: RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); - TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 0], 128, 16, 100.0f, 86.0f, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 1], 128, 16, 100.0f, 102.0f, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 2], 128, 16, 100.0f, 118.0f, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 3], 128, 16, 100.0f, 134.0f, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 4], 128, 10, 100.0f, 150.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 0], 128, 16, 100.0f, 86.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 1], 128, 16, 100.0f, 102.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 2], 128, 16, 100.0f, 118.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 3], 128, 16, 100.0f, 134.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 4], 128, 10, 100.0f, 150.0f, 1.0f, 1.0f); break; case GSTATE_START: @@ -556,7 +556,7 @@ void Game_Update(void) { gDPFillRectangle(gMasterDisp++, SCREEN_MARGIN, SCREEN_HEIGHT / 2 - 1 - 1, SCREEN_WIDTH - SCREEN_MARGIN, SCREEN_HEIGHT / 2 + 1); - HUD_dummy_8008CB8C(); + HUD_8008CB8C(); } partialFill = false; @@ -568,7 +568,7 @@ void Game_Update(void) { Radio_Draw(); if (gShowHud) { HUD_Draw(); - HUD_DrawEdgeArrows(); + HUD_EdgeArrows_Update(); } HUD_DrawBossHealth(); } diff --git a/src/engine/fox_hud.c b/src/engine/fox_hud.c index 8d1dec54..f94ab410 100644 --- a/src/engine/fox_hud.c +++ b/src/engine/fox_hud.c @@ -1,13 +1,6 @@ #include "sf64math.h" +#include "fox_hud.h" #include "prevent_bss_reordering.h" -typedef struct { - /* 0x00 */ u8* unk_00; - /* 0x04 */ s32 width; - /* 0x08 */ s32 height; - /* 0x0C */ u8* unk_0C; - /* 0x10 */ s32 unk_10; - /* 0x14 */ s32 unk_14; -} UnkStruct_D_800D1AEC; Vec3f D_801616A0; Vec3f D_801616B0; @@ -37,8 +30,8 @@ f32 D_80161778; f32 D_8016177C; f32 D_80161780; f32 D_80161784; -s32 D_80161788; -s32 D_8016178C; +s32 D_80161788; // Looks like a timer related to RadioDamage +s32 D_8016178C; // Looks like a timer related to RadioDamage s32 D_80161790; s32 D_80161794; s32 D_80161798; @@ -52,10 +45,10 @@ s32 gMedalStatus; s32 gMedalFlashTimer; s32 D_801617C0[10]; s32 D_801617E8[10]; -s32 D_80161810[10]; -s32 D_80161838[10]; -s32 D_80161860[20]; -f32 D_801618B0[20]; +s32 sPauseScreenIwork[10]; +s32 sPauseScreenTimer[10]; +s32 sGoldRingsIwork[20]; +f32 sGoldRingsFwork[20]; s32 D_80161900[20]; #include "global.h" @@ -88,7 +81,7 @@ s32 D_80161900[20]; #include "assets/ast_allies.h" #include "assets/ast_star_wolf.h" -void func_hud_80087788(void); +void HUD_TeammateStatus_Draw(void); s16 D_hud_800D1970 = 0; @@ -104,9 +97,9 @@ f32 D_800D19E0[] = { 1.0f, 1.0f, 1.0f, 1.0f }; f32 D_800D19F0 = 0.0f; -s32 D_800D19F4 = 0; +s32 sHudBombCount = 0; -s32 D_800D19F8 = 0; +BombCounterStates sBombCounterState = BOMB_COUNTER_INIT; s32 D_800D19FC = 0; @@ -117,90 +110,88 @@ Vtx D_800D1A00[] = { { 10, -10, 0, 0, 0, 0, 255, 255, 255, 255 }, }; -Gfx D_800D1A40[] = { +Gfx sRadioDamageDL[] = { gsSPVertex(D_800D1A00, 4, 0), gsSP1Quadrangle(1, 2, 3, 0, 0), gsSPEndDisplayList(), }; -void func_hud_80084930(f32 arg0, f32 arg1, s32 arg2) { - u8* D_800D1A58[] = { - D_arwing_3000000, - D_blue_marine_3000000, - D_landmaster_3000000, - }; - u16* D_800D1A64[] = { - D_arwing_3000080, - D_blue_marine_3000080, - D_landmaster_3000080, - }; +// Used in the status screen, and when losing a life +void HUD_LivesCount1_Draw(f32 xPos, f32 yPos, s32 lifeCount) { + u8* sLifeIconTex[] = { aArwingLifeIconTex, aBlueMarineLifeIconTex, aLandmasterLifeIconTex }; + u16* sLifeIconTLUT[] = { aArwingLifeIconTLUT, aBlueMarineLifeIconTLUT, aLandmasterLifeIconTLUT }; Player* player; - s32 var_t0; - s32 var_v0; - s32 i; + s32 lifeIconIdx; + s32 maxLives; + s32 digits; RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - player = gPlayer; - var_t0 = 0; + player = &gPlayer[0]; + lifeIconIdx = 0; // default switch (player->form) { case FORM_ARWING: - var_t0 = 0; + lifeIconIdx = 0; break; case FORM_LANDMASTER: - var_t0 = 1; + lifeIconIdx = 1; break; case FORM_BLUE_MARINE: - var_t0 = 2; + lifeIconIdx = 2; break; } - TextureRect_CI4(&gMasterDisp, D_800D1A58[var_t0], D_800D1A64[var_t0], 16, 16, arg0, arg1 - 2.0f, 1.0f, 1.0f); - TextureRect_CI4(&gMasterDisp, D_1011ED0, D_1011F08, 16, 7, arg0 + 16.0f, arg1 + 7.0f, 1.0f, 1.0f); + // Draw Icon + Lib_TextureRect_CI4(&gMasterDisp, sLifeIconTex[lifeIconIdx], sLifeIconTLUT[lifeIconIdx], 16, 16, xPos, yPos - 2.0f, + 1.0f, 1.0f); + // Draw X + Lib_TextureRect_CI4(&gMasterDisp, aXTex, aXTLUT, 16, 7, xPos + 16.0f, yPos + 7.0f, 1.0f, 1.0f); - if (arg2 >= 0) { - arg0 += 11.0f; - arg1 -= 1.0f; + if (lifeCount >= 0) { + xPos += 11.0f; + yPos -= 1.0f; RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - var_v0 = 10; - - if (arg2 < 0) { - arg2 = 0; + if (lifeCount < 0) { + lifeCount = 0; } - if (arg2 > 99) { - arg2 = 99; + if (lifeCount > 99) { + lifeCount = 99; } - for (var_v0 = 10, i = 1; arg2 >= var_v0; i++) { - var_v0 *= 10; + // Count digits + for (maxLives = 10, digits = 1; lifeCount >= maxLives; digits++) { + maxLives *= 10; } - arg0 += 16.0f + 8 * (2 - i); - func_hud_800869A0(arg0, arg1, arg2, 1.0f, 1, 99); + xPos += 16.0f + 8 * (2 - digits); + HUD_Number_Draw(xPos, yPos, lifeCount, 1.0f, true, 99); } } -void func_hud_80084B94(s32 arg0) { +// Wrench drawn on top of teammates when they're down +void HUD_TeamDownWrench_Draw(s32 arg0) { s32 i; - Vec3f D_800D1A70[] = { + Vec3f sTeamDownWrenchPos[] = { { 191.0f, -129.0f, -600.0f }, { 0.0f, -129.0f, -600.0f }, { -191.0f, -129.0f, -600.0f }, }; RCP_SetupDL(&gMasterDisp, SETUPDL_36); + if (arg0 == 0) { for (i = 1; i < 4; i++) { if (((gTeamShields[i] != 0) || (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) && (gTeamShields[i] <= 0) && (gTeamShields[i] != -2)) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_800D1A70[i - 1].x, D_800D1A70[i - 1].y, D_800D1A70[i - 1].z, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sTeamDownWrenchPos[i - 1].x, sTeamDownWrenchPos[i - 1].y, + sTeamDownWrenchPos[i - 1].z, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.68f, 0.68f, 1.0f, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, M_PI / 4, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -225,7 +216,7 @@ void func_hud_80084B94(s32 arg0) { } } -void func_hud_80084E78(Gfx** gfxP, u8* texture, u16* palette, u32 tWidth, u32 tHeight, f32 xPos, f32 yPos, f32 xScale, +void TextureRect_CI8_2(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, palette); @@ -236,73 +227,83 @@ void func_hud_80084E78(Gfx** gfxP, u8* texture, u16* palette, u32 tWidth, u32 tH (s32) (1 / xScale * (32 * 32)), (s32) (1 / yScale * (32 * 32))); } -void func_hud_800853A4(f32 xPos, f32 yPos, f32 xScale, f32 yScale) { - TextureRect_CI8(&gMasterDisp, D_1013170, D_1013570, 24, 17, xPos, yPos, xScale, yScale); +void HUD_MsgWindowBg_Draw(f32 xPos, f32 yPos, f32 xScale, f32 yScale) { + Lib_TextureRect_CI8(&gMasterDisp, aMsgWindowBgTex, aMsgWindowBgTLUT, 24, 17, xPos, yPos, xScale, yScale); } -void func_hud_80085404(f32 xPos, f32 yPos, f32 xScale, f32 yScale) { - TextureRect_CI4(&gMasterDisp, D_1011280, D_10116A0, 48, 44, xPos, yPos, xScale, yScale); +void HUD_RadarWindowFrame_Draw(f32 xPos, f32 yPos, f32 xScale, f32 yScale) { + Lib_TextureRect_CI4(&gMasterDisp, aRadarFrameTex, aRadarFrameTLUT, 48, 44, xPos, yPos, xScale, yScale); } -void func_hud_80085464(f32 arg0, f32 arg1) { - TextureRect_CI4(&gMasterDisp, D_1011AC0, D_1011B90, 16, 26, arg0, arg1, 1.0f, 1.0f); +void HUD_IncomingMsgButton_Draw(f32 xPos, f32 yPos) { + Lib_TextureRect_CI4(&gMasterDisp, aIncomingMsgButtonTex, aIncomingMsgButtonTLUT, 16, 26, xPos, yPos, 1.0f, 1.0f); } -void func_hud_800854BC(f32 arg0, f32 arg1) { - TextureRect_CI4(&gMasterDisp, D_1011BB0, D_1011C80, 16, 26, arg0, arg1, 1.0f, 1.0f); +void HUD_IncomingMsgSignal1_Draw(f32 xPos, f32 yPos) { + Lib_TextureRect_CI4(&gMasterDisp, aIncomingMsgSignal1Tex, aIncomingMsgSignal1TLUT, 16, 26, xPos, yPos, 1.0f, 1.0f); } -void func_hud_80085514(f32 arg0, f32 arg1) { - TextureRect_CI4(&gMasterDisp, D_1011CA0, D_1011D70, 16, 26, arg0, arg1, 1.0f, 1.0f); +void HUD_IncomingMsgSignal2_Draw(f32 xPos, f32 yPos) { + Lib_TextureRect_CI4(&gMasterDisp, aIncomingMsgSignal2Tex, aIncomingMsgSignal2TLUT, 16, 26, xPos, yPos, 1.0f, 1.0f); } -void func_hud_8008556C(f32 arg0, f32 arg1) { - TextureRect_CI4(&gMasterDisp, D_1011D90, D_1011E60, 16, 26, arg0, arg1, 1.0f, 1.0f); +void HUD_IncomingMsgSignal3_Draw(f32 xPos, f32 yPos) { + Lib_TextureRect_CI4(&gMasterDisp, aIncomingMsgSignal3Tex, aIncomingMsgSignal3TLUT, 16, 26, xPos, yPos, 1.0f, 1.0f); } -void func_hud_800855C4(f32 arg0, f32 arg1, f32 arg2, f32 arg3) { - TextureRect_IA8_MirX(&gMasterDisp, D_1002280, 8, 12, arg0, arg1, arg2, arg3); +// Right part of the Player shield gauge frame +void HUD_ShieldGaugeEdgeRight_Draw(f32 xPos, f32 yPos, f32 xScale, f32 yScale) { + Lib_TextureRect_IA8_MirX(&gMasterDisp, aShieldGaugeFrameEdgeTex, 8, 12, xPos, yPos, xScale, yScale); } -void func_hud_80085618(f32 arg0, f32 arg1, f32 arg2, f32 arg3) { - TextureRect_IA8(&gMasterDisp, D_1002280, 8, 12, arg0, arg1, arg2, arg3); +// Left part of the Player shield gauge frame +void HUD_ShieldGaugeEdgeLeft_Draw(f32 xPos, f32 yPos, f32 xScale, f32 yScale) { + Lib_TextureRect_IA8(&gMasterDisp, aShieldGaugeFrameEdgeTex, 8, 12, xPos, yPos, xScale, yScale); } -void func_hud_8008566C(f32 x, f32 y, f32 arg2, f32 arg3) { - TextureRect_IA8(&gMasterDisp, D_10030D0, 8, 12, x, y, arg2, arg3); +// Top and bottom parts of the Player shield gauge frame +void HUD_ShieldGaugeFrame_Draw(f32 xPos, f32 yPos, f32 xScale, f32 yScale) { + Lib_TextureRect_IA8(&gMasterDisp, aShieldGaugeFrameTex, 8, 12, xPos, yPos, xScale, yScale); } -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); +void HUD_ShieldGaugeBars_Draw(f32 xPos, f32 yPos, f32 xScale, f32 yScale, f32 arg4) { + TextureRect_CI8_2(&gMasterDisp, aShieldGaugeTex, aShieldGaugeTLUT, 48, 12, xPos, yPos, xScale, yScale, 48.0f * arg4, + 8.0f); } -void func_hud_80085740(f32 arg0, f32 arg1, f32 arg2, f32 arg3) { +void HUD_BoostGaugeFrame_Draw(f32 xPos, f32 yPos, f32 xScale, f32 yScale) { if (gVersusMode) { - TextureRect_IA8(&gMasterDisp, D_versus_3000B20, 32, 5, arg0, arg1, arg2, arg3); + Lib_TextureRect_IA8(&gMasterDisp, aVsBoostGaugeFrameTex, 32, 5, xPos, yPos, xScale, yScale); } else { - TextureRect_IA8(&gMasterDisp, D_1000E80, 48, 9, arg0, arg1, arg2, arg3); + Lib_TextureRect_IA8(&gMasterDisp, aBoostGaugeFrameTex, 48, 9, xPos, yPos, xScale, yScale); } } -void func_hud_800857DC(f32 arg0, f32 arg1, f32 arg2, f32 arg3) { +void HUD_BoostGaugeOverheat_Draw(f32 xPos, f32 yPos, f32 xScale, f32 yScale) { if (gVersusMode) { - TextureRect_CI8(&gMasterDisp, D_versus_300D3C0, D_versus_300D408, 24, 3, arg0, arg1, arg2, arg3); + Lib_TextureRect_CI8(&gMasterDisp, aVsBoostGaugeOverheatTex, aVsBoostGaugeOverheatTLUT, 24, 3, xPos, yPos, + xScale, yScale); } else { - TextureRect_CI8(&gMasterDisp, D_10128C0, D_1012988, 40, 5, arg0, arg1, arg2, arg3); + Lib_TextureRect_CI8(&gMasterDisp, aBoostGaugeOverheatTex, aBoostGaugeOverheatTLUT, 40, 5, xPos, yPos, xScale, + yScale); } } -void func_hud_80085890(f32 arg0, f32 arg1, f32 arg2, f32 arg3) { +void HUD_BoostGaugeCool_Draw(f32 xPos, f32 yPos, f32 xScale, f32 yScale) { if (gVersusMode) { - TextureRect_CI8(&gMasterDisp, D_versus_300D350, D_versus_300D398, 24, 3, arg0, arg1, arg2, arg3); + Lib_TextureRect_CI8(&gMasterDisp, aVsBoostGaugeCoolTex, aVsBoostGaugeCoolTLUT, 24, 3, xPos, yPos, xScale, + yScale); } else { - TextureRect_CI8(&gMasterDisp, D_10127D0, D_1012898, 40, 5, arg0, arg1, arg2, arg3); + Lib_TextureRect_CI8(&gMasterDisp, aBoostGaugeCoolTex, aBoostGaugeCoolTLUT, 40, 5, xPos, yPos, xScale, yScale); } } -void func_hud_80085944(void) { - Gfx* D_800D1A94[] = { D_101C170, D_101C000, D_101BE90, D_101BD20, D_101BBB0, D_101BA40, - D_101B8D0, D_101B760, D_101B5F0, D_101B480, D_101B310, D_101B1A0 }; +void HUD_GoldRings_Draw(void) { + Gfx* sGoldRingDLs[] = { + aGoldRingFrame1DL, aGoldRingFrame2DL, aGoldRingFrame3DL, aGoldRingFrame4DL, + aGoldRingFrame5DL, aGoldRingFrame6DL, aGoldRingFrame7DL, aGoldRingFrame8DL, + aGoldRingFrame9DL, aGoldRingFrame10DL, aGoldRingFrame11DL, aGoldRingFrame12DL, + }; s32 i; s32 j; f32 D_800D1AC4[] = { 0.0f, -30.0f, -26.0f, -22.0f, -18.0f }; @@ -310,14 +311,14 @@ void func_hud_80085944(void) { f32 scale; f32 x; f32 y; - s32 temp; + s32 goldRingFrameIdx; - D_801618B0[6] += 0.7f; - if (D_801618B0[6] >= 12.0f) { - D_801618B0[6] = 0.0f; + sGoldRingsFwork[6] += 0.7f; + if (sGoldRingsFwork[6] >= 12.0f) { + sGoldRingsFwork[6] = 0.0f; } - if (D_80161900[4]) { + if (D_80161900[4] != 0) { D_80161900[4]--; } @@ -336,9 +337,9 @@ void func_hud_80085944(void) { i--; - D_80161860[1 + i] = 1; + sGoldRingsIwork[1 + i] = 1; D_80161900[0 + i] = 14; - D_801618B0[2 + i] = 0.0f; + sGoldRingsFwork[2 + i] = 0.0f; if (i == 2) { D_80161900[4] = 28; @@ -349,8 +350,9 @@ void func_hud_80085944(void) { } } + // One for each gold ring slot for (i = 0; i < 3; i++) { - switch (D_80161860[i + 1]) { + switch (sGoldRingsIwork[i + 1]) { case 0: RCP_SetupDL(&gMasterDisp, SETUPDL_62); Matrix_Push(&gGfxMatrix); @@ -369,7 +371,7 @@ void func_hud_80085944(void) { Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 180, 180, 0, 50); - gSPDisplayList(gMasterDisp++, D_1012110); + gSPDisplayList(gMasterDisp++, aGoldRingEmptySlotDL); Matrix_Pop(&gGfxMatrix); break; @@ -377,9 +379,9 @@ void func_hud_80085944(void) { case 2: if (D_80161900[i]) { if (D_80161900[i + 0] >= 7) { - D_801618B0[i + 2] += 0.15f; + sGoldRingsFwork[i + 2] += 0.15f; } else { - D_801618B0[i + 2] -= 0.15f; + sGoldRingsFwork[i + 2] -= 0.15f; } RCP_SetupDL(&gMasterDisp, SETUPDL_62); @@ -387,16 +389,17 @@ void func_hud_80085944(void) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, D_800D1AC4[i + 1], D_800D1AD8[i + 1], -100.0f, MTXF_NEW); - Matrix_RotateZ(gGfxMatrix, M_DTOR * D_801618B0[0], MTXF_APPLY); - Matrix_Scale(gGfxMatrix, D_801618B0[i + 2], D_801618B0[i + 2], D_801618B0[i + 2], MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, M_DTOR * sGoldRingsFwork[0], MTXF_APPLY); + Matrix_Scale(gGfxMatrix, sGoldRingsFwork[i + 2], sGoldRingsFwork[i + 2], sGoldRingsFwork[i + 2], + MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_101C2E0); + gSPDisplayList(gMasterDisp++, aStarDL); Matrix_Pop(&gGfxMatrix); } if (D_80161900[i] < 7) { - if (D_80161860[i + 1] == 2) { + if (sGoldRingsIwork[i + 1] == 2) { RCP_SetupDL(&gMasterDisp, SETUPDL_62); } else { RCP_SetupDL(&gMasterDisp, SETUPDL_36); @@ -418,12 +421,12 @@ void func_hud_80085944(void) { Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - if (D_80161860[i + 1] == 2) { + if (sGoldRingsIwork[i + 1] == 2) { gDPSetPrimColor(gMasterDisp++, 0, 0, 180, 180, 0, 50); - gSPDisplayList(gMasterDisp++, D_1012110); + gSPDisplayList(gMasterDisp++, aGoldRingEmptySlotDL); } else { - temp = D_801618B0[6]; - gSPDisplayList(gMasterDisp++, D_800D1A94[temp]); + goldRingFrameIdx = sGoldRingsFwork[6]; + gSPDisplayList(gMasterDisp++, sGoldRingDLs[goldRingFrameIdx]); } Matrix_Pop(&gGfxMatrix); } @@ -436,31 +439,31 @@ void func_hud_80085944(void) { if ((gGoldRingCount[1] && ((gGoldRingCount[1] % 3) == 0)) && (D_80161900[4] == 1)) { for (j = 0; j < 4; j++) { - if (D_80161860[j + 1] == 1) { - D_80161860[j + 1] = 2; + if (sGoldRingsIwork[j + 1] == 1) { + sGoldRingsIwork[j + 1] = 2; D_80161900[j + 0] = 14; - D_801618B0[j + 2] = 0.0f; + sGoldRingsFwork[j + 2] = 0.0f; D_80161900[4] = 28; } else { - D_80161860[j + 1] = 0; + sGoldRingsIwork[j + 1] = 0; D_80161900[j + 0] = 14; - D_801618B0[j + 2] = 0.0f; + sGoldRingsFwork[j + 2] = 0.0f; } } } - D_801618B0[0] += 35.0f; - D_801618B0[1] += 10.0f; + sGoldRingsFwork[0] += 35.0f; + sGoldRingsFwork[1] += 10.0f; } -void func_hud_80086110(f32 arg0, f32 arg1, s32 arg2) { - f32 temp = 0.82f; +void HUD_TeamShields_Draw(f32 xPos, f32 yPos, s32 arg2) { + f32 xScale = 0.82f; s32 pad; RCP_SetupDL(&gMasterDisp, SETUPDL_75); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); if (arg2 != 0) { - func_hud_800856C0((8.0f * temp) + arg0, arg1 + 2.0f, temp, 1.0f, arg2 / 255.0f); + HUD_ShieldGaugeBars_Draw((8.0f * xScale) + xPos, yPos + 2.0f, xScale, 1.0f, arg2 / 255.0f); } if ((arg2 <= 0) && (arg2 != -2) && @@ -468,20 +471,20 @@ void func_hud_80086110(f32 arg0, f32 arg1, s32 arg2) { RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); if ((arg2 == 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { - Graphics_DisplaySmallText(arg0 + (8.0f * temp) + 4.0f, arg1 + 2.0f, 1.0f, 1.0f, " OK "); + Graphics_DisplaySmallText(xPos + (8.0f * xScale) + 4.0f, yPos + 2.0f, 1.0f, 1.0f, " OK "); } else { - Graphics_DisplaySmallText(arg0 + (8.0f * temp) + 4.0f, arg1 + 2.0f, 1.0f, 1.0f, "DOWN"); + Graphics_DisplaySmallText(xPos + (8.0f * xScale) + 4.0f, yPos + 2.0f, 1.0f, 1.0f, "DOWN"); } } RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - func_hud_80085618(arg0, arg1, temp, 1.0f); - func_hud_800855C4(arg0 + (7.0f * temp) + (temp * 6.0f) * 8.0f, arg1, 1.0f, 1.0f); - func_hud_8008566C(arg0 + (7.0f * temp), arg1, temp * 6.0f, 1.0f); + HUD_ShieldGaugeEdgeLeft_Draw(xPos, yPos, xScale, 1.0f); + HUD_ShieldGaugeEdgeRight_Draw(xPos + (7.0f * xScale) + (xScale * 6.0f) * 8.0f, yPos, 1.0f, 1.0f); + HUD_ShieldGaugeFrame_Draw(xPos + (7.0f * xScale), yPos, xScale * 6.0f, 1.0f); } -s32 func_hud_800863C8(void) { +s32 HUD_GetLevelIndex(void) { s32 ret = 0; switch (gCurrentLevel) { @@ -542,29 +545,29 @@ s32 func_hud_800863C8(void) { return ret; } -UnkStruct_D_800D1AEC D_800D1AEC[] = { - { aLargeText_1, 16, 15, D_CO_6000000, 128, 28 }, { aLargeText_2, 16, 15, D_ME_6000000, 96, 28 }, - { aLargeText_2, 16, 15, D_SY_6000000, 176, 12 }, { aLargeText_3, 16, 15, D_FO_6000000, 168, 28 }, - { aLargeText_3, 16, 15, D_KA_6000000, 168, 28 }, { aLargeText_3, 16, 15, D_AQ_6000000, 96, 13 }, - { aLargeText_4, 16, 15, D_SX_6000000, 176, 12 }, { aLargeText_4, 16, 15, D_SO_6000000, 112, 13 }, - { aLargeText_4, 16, 15, D_ZO_6000000, 112, 28 }, { aLargeText_5, 16, 15, D_TI_6000000, 96, 28 }, - { aLargeText_5, 16, 15, D_MA_6000000, 160, 28 }, { aLargeText_5, 16, 15, D_SZ_6000000, 176, 12 }, - { aLargeText_6, 16, 15, D_BO_6000000, 168, 19 }, { aLargeText_6, 16, 15, D_A6_6000000, 104, 28 }, - { aLargeText_7, 16, 15, D_VE1_6000D80, 128, 28 }, { aLargeText_7, 16, 15, D_VE2_60012D0, 128, 28 }, - { aLargeText_7, 16, 15, D_ANDROSS_C000A80, 128, 28 }, { aLargeText_0, 16, 15, aTextTraining, 80, 12 }, +LevelTitleCard sLevelTitleCard[] = { + { aLargeText_1, 16, 15, aCoTitleCardTex, 128, 28 }, { aLargeText_2, 16, 15, aMeTitleCardTex, 96, 28 }, + { aLargeText_2, 16, 15, aSyTitleCardTex, 176, 12 }, { aLargeText_3, 16, 15, aFoTitleCardTex, 168, 28 }, + { aLargeText_3, 16, 15, aKaTitleCardTex, 168, 28 }, { aLargeText_3, 16, 15, aAqTitleCardTex, 96, 13 }, + { aLargeText_4, 16, 15, aSxTitleCardTex, 176, 12 }, { aLargeText_4, 16, 15, aSoTitleCardTex, 112, 13 }, + { aLargeText_4, 16, 15, aZoTitleCardTex, 112, 28 }, { aLargeText_5, 16, 15, aTiTitleCardTex, 96, 28 }, + { aLargeText_5, 16, 15, aMaTitleCardTex, 160, 28 }, { aLargeText_5, 16, 15, aSzTitleCardTex, 176, 12 }, + { aLargeText_6, 16, 15, aBoTitleCardTex, 168, 19 }, { aLargeText_6, 16, 15, aA6TitleCardTex, 104, 28 }, + { aLargeText_7, 16, 15, aVe1TitleCardTex, 128, 28 }, { aLargeText_7, 16, 15, aVe2TitleCardTex, 128, 28 }, + { aLargeText_7, 16, 15, aAndTitleCardTex, 128, 28 }, { aLargeText_0, 16, 15, aTrTitleCardTex, 80, 12 }, }; -void func_hud_80086444(void) { +void HUD_VenomTitleCard_Draw(void) { s32 i = 9; s32 j; - u8* D_800D1C9C[] = { D_VE1_6001B80, D_VE2_60020D0 }; - s32 D_800D1CA4[] = { 128, 104 }; - s32 D_800D1CAC[] = { 19, 19 }; - f32 D_800D1CB4[] = { 96.0f, 112.0f }; - f32 D_800D1CBC[] = { 89.0f, 89.0f }; - f32 D_800D1CC4[] = { 2.0f, 5.0f }; - f32 D_800D1CCC[] = { 1.6f, 1.6f }; + u8* sVenomTitleCardDLs[] = { D_VE1_6001B80, D_VE2_60020D0 }; + s32 sVenomTitleCardWidths[] = { 128, 104 }; + s32 D_800D1CAC[] = { 19, 19 }; // unused + f32 sVenomTitleCardHeights[] = { 96.0f, 112.0f }; + f32 sVenomTitleCardxPos[] = { 89.0f, 89.0f }; + f32 D_800D1CC4[] = { 2.0f, 5.0f }; // unused + f32 D_800D1CCC[] = { 1.6f, 1.6f }; // unused switch (gCurrentLevel) { case LEVEL_VENOM_2: @@ -584,15 +587,16 @@ void func_hud_80086444(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); for (j = 0; j < 19; j++) { - TextureRect_IA8(&gMasterDisp, D_800D1C9C[i] + (D_800D1CA4[i] * j), D_800D1CA4[i], 1, D_800D1CB4[i], - D_800D1CBC[i] + j - 28.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, sVenomTitleCardDLs[i] + (sVenomTitleCardWidths[i] * j), + sVenomTitleCardWidths[i], 1, sVenomTitleCardHeights[i], + sVenomTitleCardxPos[i] + j - 28.0f, 1.0f, 1.0f); } } } -void func_hud_80086664(f32 x, f32 y) { +void HUD_TitleCard_Draw(f32 x, f32 y) { s32 i; - s32 j; + s32 levelIdx; f32 x0; f32 y0; f32 x1; @@ -600,7 +604,7 @@ void func_hud_80086664(f32 x, f32 y) { f32 x2; f32 y2; - j = func_hud_800863C8(); + levelIdx = HUD_GetLevelIndex(); x0 = x; y0 = y; @@ -608,11 +612,10 @@ void func_hud_80086664(f32 x, f32 y) { x1 = x0 + 72.0f; y1 = y0; - x2 = x0 - ((D_800D1AEC[j].unk_10 - 88.0f - D_800D1AEC[j].width) / 2.0f); - + x2 = x0 - (sLevelTitleCard[levelIdx].titleCardWidth - 88.0f - sLevelTitleCard[levelIdx].width) / 2.0f; y2 = y0 + 19.0f + 8.0f; - if (j == 7) { + if (levelIdx == 7) { // LEVEL_SECTOR_Z x2 += 4.0f; } @@ -655,67 +658,67 @@ void func_hud_80086664(f32 x, f32 y) { RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - if ((j != 14) && (j != 15)) { - TextureRect_IA8(&gMasterDisp, aTextMissionNo, 112, 19, x0 - 12.0f, y0 + 4.0f, 1.0f, 1.0f); + if ((levelIdx != 14) && (levelIdx != 15)) { // LEVEL_KATINA || LEVEL_FORTUNA + Lib_TextureRect_IA8(&gMasterDisp, aTextMissionNo, 112, 19, x0 - 12.0f, y0 + 4.0f, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, D_800D1AEC[j].unk_00, D_800D1AEC[j].width, D_800D1AEC[j].height, x1 + 28.0f, - y1 + 4.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, sLevelTitleCard[levelIdx].levelIdxTex, sLevelTitleCard[levelIdx].width, + sLevelTitleCard[levelIdx].height, x1 + 28.0f, y1 + 4.0f, 1.0f, 1.0f); } else { - func_hud_80086444(); + HUD_VenomTitleCard_Draw(); } - for (i = 0; i < D_800D1AEC[j].unk_14; i++) { - TextureRect_IA8(&gMasterDisp, D_800D1AEC[j].unk_0C + (D_800D1AEC[j].unk_10 * i), D_800D1AEC[j].unk_10, 1, x2, - y2 + i, 1.0f, 1.0f); + for (i = 0; i < sLevelTitleCard[levelIdx].titleCardHeight; i++) { + Lib_TextureRect_IA8(&gMasterDisp, + sLevelTitleCard[levelIdx].titleCardTex + (sLevelTitleCard[levelIdx].titleCardWidth * i), + sLevelTitleCard[levelIdx].titleCardWidth, 1, x2, y2 + i, 1.0f, 1.0f); } if ((gSavedObjectLoadIndex == 0) && (gAllRangeCheckpoint == 0) && (gCurrentLevel != LEVEL_VENOM_ANDROSS) && (gCurrentLevel != LEVEL_TRAINING)) { - func_hud_80087788(); - func_hud_80084B94(0); + HUD_TeammateStatus_Draw(); + HUD_TeamDownWrench_Draw(0); } if (gCurrentLevel != LEVEL_TRAINING) { - func_hud_80084930(132.0f, 124.0f, gLifeCount[gPlayerNum]); + HUD_LivesCount1_Draw(132.0f, 124.0f, gLifeCount[gPlayerNum]); } } -void func_hud_800869A0(f32 arg0, f32 arg1, s32 k, f32 arg3, s32 arg4, s32 arg5) { - s32 var_s2; +void HUD_Number_Draw(f32 xPos, f32 yPos, s32 k, f32 scale, bool skipLeadingZeroes, s32 maxNumber) { + bool shouldDraw; s32 i; s32 j; - - u8* D_800D1CD4[] = { + u8* sNumber[] = { aLargeText_0, aLargeText_1, aLargeText_2, aLargeText_3, aLargeText_4, aLargeText_5, aLargeText_6, aLargeText_7, aLargeText_8, aLargeText_9, }; - if (arg4 != 0) { - var_s2 = false; + if (skipLeadingZeroes) { + shouldDraw = false; } else { - var_s2 = true; + shouldDraw = true; } - i = arg5 + 1; + i = maxNumber + 1; k %= i; for (i /= 10; i != 1; i /= 10) { j = k / i; - if ((j != 0) || (var_s2 == true)) { - TextureRect_IA8(&gMasterDisp, D_800D1CD4[j], 16, 15, arg0, arg1, arg3, arg3); - arg0 += 13.0f * arg3; + if ((j != 0) || (shouldDraw == true)) { + Lib_TextureRect_IA8(&gMasterDisp, sNumber[j], 16, 15, xPos, yPos, scale, scale); + xPos += 13.0f * scale; k %= i; - var_s2 = true; + shouldDraw = true; } } - TextureRect_IA8(&gMasterDisp, D_800D1CD4[k], 16, 15, arg0, arg1, arg3, arg3); + Lib_TextureRect_IA8(&gMasterDisp, sNumber[k], 16, 15, xPos, yPos, scale, scale); } -void func_hud_80086C08(f32 xPos, f32 yPos, f32 xScale, f32 yScale) { +void HUD_MsgWindowBg_Draw2(f32 xPos, f32 yPos, f32 xScale, f32 yScale) { RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, 60, 60, 128, 96); gDPSetAlphaDither(gMasterDisp++, G_AD_DISABLE); - TextureRect_CI8(&gMasterDisp, D_1013170, D_1013570, 24, 17, xPos, yPos, xScale, yScale); + Lib_TextureRect_CI8(&gMasterDisp, aMsgWindowBgTex, aMsgWindowBgTLUT, 24, 17, xPos, yPos, xScale, yScale); } void HUD_DrawLevelStartStatusScreen(void) { @@ -736,13 +739,13 @@ void HUD_DrawLevelStartStatusScreen(void) { sp18 = 81.0f; if (gLevelStartStatusScreenTimer != 0) { - func_hud_80086C08(temp - 4.5f - 32.0f, sp18 - 24.0f - 4.0f, 7.4f, 3.9f); + HUD_MsgWindowBg_Draw2(temp - 4.5f - 32.0f, sp18 - 24.0f - 4.0f, 7.4f, 3.9f); if (gCurrentLevel != LEVEL_TRAINING) { - func_hud_80086C08(122.0f, 122.0f, 2.9f, 1.2f); + HUD_MsgWindowBg_Draw2(122.0f, 122.0f, 2.9f, 1.2f); } - func_hud_80086664(temp, sp18 - 24.0f); + HUD_TitleCard_Draw(temp, sp18 - 24.0f); } } @@ -750,9 +753,9 @@ f32 D_800D1CFC = 0.0f; void HUD_DrawLevelClearScreen(void) { s32 i; - s32 j; - s32 temp; - bool boolTemp; + s32 levelIdx; + LevelClearScreenState levelClearState; + MissionStatus missionStatus; f32 x; f32 y; @@ -760,37 +763,36 @@ void HUD_DrawLevelClearScreen(void) { gLevelClearScreenTimer--; } - boolTemp = gMissionStatus; + missionStatus = gMissionStatus; if ((gCurrentLevel == LEVEL_TITANIA) || (gCurrentLevel == LEVEL_BOLSE) || (gCurrentLevel == LEVEL_VENOM_1) || (gCurrentLevel == LEVEL_VENOM_2) || (gCurrentLevel == LEVEL_AREA_6) || (gCurrentLevel == LEVEL_AQUAS) || (gCurrentLevel == LEVEL_SOLAR)) { - boolTemp = true; + missionStatus = MISSION_ACCOMPLISHED; } - temp = 0; - + levelClearState = LEVEL_CLEAR_STATE_0; if (gCurrentLevel == LEVEL_AQUAS) { if (gLevelClearScreenTimer <= 100) { - temp = 5; + levelClearState = LEVEL_CLEAR_STATE_5; } if (gLevelClearScreenTimer <= 96) { - temp = 5; + levelClearState = LEVEL_CLEAR_STATE_5; } if (gLevelClearScreenTimer <= 92) { - temp = 4; + levelClearState = LEVEL_CLEAR_STATE_4; } if (gLevelClearScreenTimer <= 87) { - temp = 3; + levelClearState = LEVEL_CLEAR_STATE_3; } if (gLevelClearScreenTimer <= 82) { - temp = 2; + levelClearState = LEVEL_CLEAR_STATE_2; } if (gLevelClearScreenTimer <= 77) { - temp = 1; + levelClearState = LEVEL_CLEAR_STATE_1; } if (gLevelClearScreenTimer == 0) { - temp = 0; + levelClearState = LEVEL_CLEAR_STATE_0; } if ((gLevelClearScreenTimer == 92) || (gLevelClearScreenTimer == 87) || (gLevelClearScreenTimer == 82) || @@ -799,30 +801,30 @@ void HUD_DrawLevelClearScreen(void) { } } else { if (gLevelClearScreenTimer <= 100) { - temp = 5; + levelClearState = LEVEL_CLEAR_STATE_5; } if (gLevelClearScreenTimer <= 90) { - temp = 5; + levelClearState = LEVEL_CLEAR_STATE_5; } if (gLevelClearScreenTimer <= 80) { - temp = 4; + levelClearState = LEVEL_CLEAR_STATE_4; } if (gLevelClearScreenTimer <= 72) { - temp = 3; + levelClearState = LEVEL_CLEAR_STATE_3; } if (gLevelClearScreenTimer <= 64) { - temp = 2; + levelClearState = LEVEL_CLEAR_STATE_2; } if (gLevelClearScreenTimer <= 56) { - temp = 1; + levelClearState = LEVEL_CLEAR_STATE_1; } if (gLevelClearScreenTimer == 0) { - temp = 0; + levelClearState = LEVEL_CLEAR_STATE_0; } if ((gLevelClearScreenTimer == 80) || (gLevelClearScreenTimer == 72) || (gLevelClearScreenTimer == 64) || (gLevelClearScreenTimer == 56)) { - if (!boolTemp) { + if (missionStatus == MISSION_COMPLETE) { AUDIO_PLAY_SFX(NA_SE_MISSION_COMPLETE, gDefaultSfxSource, 4); } else { AUDIO_PLAY_SFX(NA_SE_MISSION_ACCOMPLISHED, gDefaultSfxSource, 4); @@ -830,7 +832,7 @@ void HUD_DrawLevelClearScreen(void) { } } - switch (temp) { + switch (levelClearState) { case 0: D_800D1CFC = 330.0f; break; @@ -851,60 +853,60 @@ void HUD_DrawLevelClearScreen(void) { break; } - j = func_hud_800863C8(); + levelIdx = HUD_GetLevelIndex(); - if (temp != 0) { + if (levelClearState != LEVEL_CLEAR_STATE_0) { RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); x = 98.0f; y = 64.0f; } - switch (temp) { - case 1: - if (boolTemp) { + switch (levelClearState) { + case LEVEL_CLEAR_STATE_1: + if (missionStatus != MISSION_COMPLETE) { for (i = 0; i < 11; i++) { - TextureRect_IA8(&gMasterDisp, aTextPLISHED + (136 * 2 * i), 136, 2, x + 50.0f, y + 50.0f + (2 * i), - 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aTextPLISHED + (136 * 2 * i), 136, 2, x + 50.0f, + y + 50.0f + (2 * i), 1.0f, 1.0f); } - TextureRect_IA8(&gMasterDisp, aTextPLISHED + (136 * 2 * i), 136, 1, x + 50.0f, y + 50.0f + (2 * i), - 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aTextPLISHED + (136 * 2 * i), 136, 1, x + 50.0f, y + 50.0f + (2 * i), + 1.0f, 1.0f); } else { for (i = 0; i < 10; i++) { - TextureRect_IA8(&gMasterDisp, aTextLETE + (80 * 2 * i), 80, 2, x + 66.0f, y + 50.0f + (2 * i), 1.0f, - 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aTextLETE + (80 * 2 * i), 80, 2, x + 66.0f, y + 50.0f + (2 * i), + 1.0f, 1.0f); } - TextureRect_IA8(&gMasterDisp, aTextLETE + (80 * 2 * i), 80, 1, x + 66.0f, y + 50.0f + (2 * i), 1.0f, - 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aTextLETE + (80 * 2 * i), 80, 1, x + 66.0f, y + 50.0f + (2 * i), 1.0f, + 1.0f); } - case 2: - if (boolTemp) { + case LEVEL_CLEAR_STATE_2: + if (missionStatus != MISSION_COMPLETE) { for (i = 0; i < 11; i++) { - TextureRect_IA8(&gMasterDisp, aTextACCOM + (120 * 2 * i), 120, 2, x - 62.0f, y + 50.0f + (2 * i), - 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aTextACCOM + (120 * 2 * i), 120, 2, x - 62.0f, + y + 50.0f + (2 * i), 1.0f, 1.0f); } - TextureRect_IA8(&gMasterDisp, aTextACCOM + (120 * 2 * i), 120, 1, x - 62.0f, y + 50.0f + (2 * i), 1.0f, - 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aTextACCOM + (120 * 2 * i), 120, 1, x - 62.0f, y + 50.0f + (2 * i), + 1.0f, 1.0f); } else { for (i = 0; i < 11; i++) { - TextureRect_IA8(&gMasterDisp, aTextCOMP + (96 * 2 * i), 96, 2, x - 22.0f, y + 50.0f + (2 * i), 1.0f, - 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aTextCOMP + (96 * 2 * i), 96, 2, x - 22.0f, y + 50.0f + (2 * i), + 1.0f, 1.0f); } - TextureRect_IA8(&gMasterDisp, aTextCOMP + (96 * 2 * i), 96, 1, x - 22.0f, y + 50.0f + (2 * i), 1.0f, - 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aTextCOMP + (96 * 2 * i), 96, 1, x - 22.0f, y + 50.0f + (2 * i), 1.0f, + 1.0f); } - case 3: - TextureRect_IA8(&gMasterDisp, aTextMISSION, 128, 23, x, y + 25.0f, 1.0f, 1.0f); + case LEVEL_CLEAR_STATE_3: + Lib_TextureRect_IA8(&gMasterDisp, aTextMISSION, 128, 23, x, y + 25.0f, 1.0f, 1.0f); - case 4: - TextureRect_IA8(&gMasterDisp, aTextMissionNo, 112, 19, x, y, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, D_800D1AEC[j].unk_00, D_800D1AEC[j].width, D_800D1AEC[j].height, x + 112.0f, - y, 1.0f, 1.0f); + case LEVEL_CLEAR_STATE_4: + Lib_TextureRect_IA8(&gMasterDisp, aTextMissionNo, 112, 19, x, y, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, sLevelTitleCard[levelIdx].levelIdxTex, sLevelTitleCard[levelIdx].width, + sLevelTitleCard[levelIdx].height, x + 112.0f, y, 1.0f, 1.0f); - case 5: - func_hud_80086C08(30.0f + D_800D1CFC, 60.0f, 10.97f, 4.78f); + case LEVEL_CLEAR_STATE_5: + HUD_MsgWindowBg_Draw2(30.0f + D_800D1CFC, 60.0f, 10.97f, 4.78f); break; default: @@ -912,9 +914,10 @@ void HUD_DrawLevelClearScreen(void) { } } -void func_hud_80087530(f32 x, f32 y, s32 number) { - u8* D_800D1D00[] = { D_arwing_3000000, D_blue_marine_3000000, D_landmaster_3000000 }; - u16* D_800D1D0C[] = { D_arwing_3000080, D_blue_marine_3000080, D_landmaster_3000080 }; +// Used in gameplay hud +void HUD_LivesCount2_Draw(f32 x, f32 y, s32 number) { + u8* sLivesCounterTexs[] = { aArwingLifeIconTex, aBlueMarineLifeIconTex, aLandmasterLifeIconTex }; + u16* sLivesCounterTLUTs[] = { aArwingLifeIconTLUT, aBlueMarineLifeIconTLUT, aLandmasterLifeIconTLUT }; Player* player = &gPlayer[0]; f32 x0; f32 x1; @@ -968,19 +971,19 @@ void func_hud_80087530(f32 x, f32 y, s32 number) { } x2 += (2 - i) * 4; - TextureRect_CI4(&gMasterDisp, D_800D1D00[form], D_800D1D0C[form], 16, 16, x0, y0, 1.0f, 1.0f); - TextureRect_CI4(&gMasterDisp, D_1011ED0, D_1011F08, 16, 7, x1, y1, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, sLivesCounterTexs[form], sLivesCounterTLUTs[form], 16, 16, x0, y0, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, aXTex, aXTLUT, 16, 7, x1, y1, 1.0f, 1.0f); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); Graphics_DisplayHUDNumber(x2, y2, number); } -void func_hud_80087788(void) { - u16* D_800D1D18[] = { D_10050E0, D_100BAC0, D_100D900, D_10032A0 }; - u8* D_800D1D28[] = { aTextPeppy, aTextSlippy, aTextFalco }; +void HUD_TeammateStatus_Draw(void) { + u16* sPortraitTex[] = { aFoxPortraitTex, aPeppyPortraitTex, aSlippyPortraitTex, aFalcoPortraitTex }; + u8* sText[] = { aTextPeppy, aTextSlippy, aTextFalco }; s32 shield; - s32 D_800D1D34[] = { 48, 56, 48 }; // width - s32 D_800D1D40[] = { 10, 10, 8 }; // height + s32 sTextWidth[] = { 48, 56, 48 }; + s32 sTextHeght[] = { 10, 10, 8 }; s32 i; s32 j; f32 x[3][3], y[3][3]; @@ -1007,12 +1010,11 @@ void func_hud_80087788(void) { y[2][2] = y[1][2]; for (j = 0; j < 3; j++) { - - func_hud_80086C08(x[j][0] - 6.0f, y[j][1] - 1.0f, 2.4f, 0.7f); + HUD_MsgWindowBg_Draw2(x[j][0] - 6.0f, y[j][1] - 1.0f, 2.4f, 0.7f); RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_IA8(&gMasterDisp, D_800D1D28[j], D_800D1D34[j], D_800D1D40[j], x[j][1], y[j][1], 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, sText[j], sTextWidth[j], sTextHeght[j], x[j][1], y[j][1], 1.0f, 1.0f); RCP_SetupDL(&gMasterDisp, SETUPDL_76); shield = gTeamShields[3 - j]; @@ -1024,17 +1026,17 @@ void func_hud_80087788(void) { } for (i = 0; i < 2; i++) { - TextureRect_RGBA16(&gMasterDisp, D_800D1D18[j + 1] + (44 * 20 * i), 44, 20, x[j][0], - y[j][0] + (f32) (20 * i), 1.0f, 1.0f); + Lib_TextureRect_RGBA16(&gMasterDisp, sPortraitTex[j + 1] + (44 * 20 * i), 44, 20, x[j][0], + y[j][0] + (f32) (20 * i), 1.0f, 1.0f); } - TextureRect_RGBA16(&gMasterDisp, D_800D1D18[j + 1] + (44 * 20 * 2), 44, 4, x[j][0], y[j][0] + 40.0f, 1.0f, - 1.0f); + Lib_TextureRect_RGBA16(&gMasterDisp, sPortraitTex[j + 1] + (44 * 20 * 2), 44, 4, x[j][0], y[j][0] + 40.0f, 1.0f, + 1.0f); - func_hud_80086110(x[j][2], y[j][2], shield); + HUD_TeamShields_Draw(x[j][2], y[j][2], shield); } } -void HUD_DrawLevelClearStatusScreen(void) { +void HUD_LevelClearStatusScreen_Draw(void) { s32 i; s32 temp; f32 x0; @@ -1052,12 +1054,12 @@ void HUD_DrawLevelClearStatusScreen(void) { f32 y5; f32 y6; - if (gShowLevelClearStatusScreen == 0) { + if (gShowLevelClearStatusScreen == false) { Audio_KillSfxById(NA_SE_TEAM_SHIELD_UP); D_801617C0[0] = 0; } - if ((gPlayState != PLAY_PAUSE) && (gShowLevelClearStatusScreen == 1) && (D_801617E8[0] == 0)) { + if ((gPlayState != PLAY_PAUSE) && (gShowLevelClearStatusScreen == true) && (D_801617E8[0] == 0)) { switch (D_801617C0[0]) { case 0: D_801617C0[5] = gHitCount; @@ -1076,7 +1078,7 @@ void HUD_DrawLevelClearStatusScreen(void) { D_801617C0[4] = gHitCount / 2; D_801617C0[6] = 0; - func_hud_800884E4(); + HUD_SetMissionTeamStatus(); break; case 1: @@ -1153,7 +1155,7 @@ void HUD_DrawLevelClearStatusScreen(void) { D_801617E8[0] = 10; D_801617C0[0]++; } else { - if (((gGameFrameCount % 2) == 0)) { + if ((gGameFrameCount % 2) == 0) { AUDIO_PLAY_SFX(NA_SE_ONE_UP, gDefaultSfxSource, 4); D_801617C0[3]++; } @@ -1175,7 +1177,7 @@ void HUD_DrawLevelClearStatusScreen(void) { D_801617C0[6]--; } - if (gShowLevelClearStatusScreen == 1) { + if (gShowLevelClearStatusScreen == true) { x0 = 128.0f; y0 = 30.0f; @@ -1197,9 +1199,9 @@ void HUD_DrawLevelClearStatusScreen(void) { x6 = x2 - 56.0f + 16.0f; y6 = y3 + 18.0f; - func_hud_80086C08(x0 - 4.0f, y0 - 4.0f, 2.9f, 3.6f); - func_hud_80086C08(x3 - 4.0f, y3 - 4.0f, 10.0f, 1.0f); - func_hud_80086C08(x6 - 12.0f, y6 + 8.0f, 5.2f, 1.0f); + HUD_MsgWindowBg_Draw2(x0 - 4.0f, y0 - 4.0f, 2.9f, 3.6f); + HUD_MsgWindowBg_Draw2(x3 - 4.0f, y3 - 4.0f, 10.0f, 1.0f); + HUD_MsgWindowBg_Draw2(x6 - 12.0f, y6 + 8.0f, 5.2f, 1.0f); if (D_801617C0[1] < 0) { D_801617C0[1] = 0; @@ -1229,33 +1231,32 @@ void HUD_DrawLevelClearStatusScreen(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 90, 160, 200, 255); - func_hud_800869A0(24.0f, 30.0f + 3.0f, D_801617C0[5], 1.0f, 0, 999); + HUD_Number_Draw(24.0f, 30.0f + 3.0f, D_801617C0[5], 1.0f, false, 999); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_IA8(&gMasterDisp, aTextEnemiesDown, 64, 25, x0, y0 + 4.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aTextEnemiesDown, 64, 25, x0, y0 + 4.0f, 1.0f, 1.0f); - func_hud_800869A0(x1, y1 + 12.0f, D_801617C0[1], 1.0f, 1, 999); + HUD_Number_Draw(x1, y1 + 12.0f, D_801617C0[1], 1.0f, true, 999); - TextureRect_IA8(&gMasterDisp, aTextAccumTotal, 128, 10, x3, y3, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aTextAccumTotal, 128, 10, x3, y3, 1.0f, 1.0f); - func_hud_800869A0(x4 + 4.0f, y4 + 3.0f, D_801617C0[2], 1.00f, 1, 9999); + HUD_Number_Draw(x4 + 4.0f, y4 + 3.0f, D_801617C0[2], 1.00f, true, 9999); if ((D_801617C0[6] % 2) == 0) { - func_hud_80087530(232.0f, 90.0f, D_801617C0[3]); + HUD_LivesCount2_Draw(232.0f, 90.0f, D_801617C0[3]); } RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_IA8(&gMasterDisp, aTextStatusOfTeam, 120, 12, x6 - 8.0f, y6 + 10.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aTextStatusOfTeam, 120, 12, x6 - 8.0f, y6 + 10.0f, 1.0f, 1.0f); - func_hud_80087788(); - func_hud_80084B94(0); - func_hud_8008B5B0(20.0f, 18.0f); + HUD_TeammateStatus_Draw(); + HUD_TeamDownWrench_Draw(0); + HUD_PlayerShieldGauge_Draw(20.0f, 18.0f); } } - -void func_hud_800884E4(void) { +void HUD_SetMissionTeamStatus(void) { s32 mask; s32 i; @@ -1272,7 +1273,7 @@ void func_hud_800884E4(void) { } } -void func_hud_80088564(void) { +void HUD_Bolse_Area6_SaveData(void) { PlanetId planetId; if ((gCurrentLevel == LEVEL_BOLSE) || (gCurrentLevel == LEVEL_AREA_6)) { @@ -1317,74 +1318,75 @@ void HUD_DrawStatusScreens(void) { } HUD_DrawLevelStartStatusScreen(); HUD_DrawLevelClearScreen(); - HUD_DrawLevelClearStatusScreen(); + HUD_LevelClearStatusScreen_Draw(); } -s32 func_hud_800886B8(void) { - s32 var_v1 = 0; - f32 var_fv1 = gInputPress->stick_y; +s32 HUD_PauseScreenInput(void) { + s32 ret = 0; + f32 stickY = gInputPress->stick_y; - if ((var_fv1 != 0.0f) && (D_80161810[4] != 0)) { + if ((stickY != 0.0f) && (sPauseScreenIwork[4] != 0)) { return 0; } - D_80161810[4] = 0; + sPauseScreenIwork[4] = 0; - if (fabsf(var_fv1) < 30.0f) { - var_fv1 = 0.0f; + if (fabsf(stickY) < 30.0f) { + stickY = 0.0f; } - if (var_fv1 != 0.0f) { - if (D_80161810[2] == 0) { - if (var_fv1 > 0) { - var_v1 = 1; + if (stickY != 0.0f) { + if (sPauseScreenIwork[2] == 0) { + if (stickY > 0) { + ret = 1; } else { - var_v1 = -1; + ret = -1; } - D_80161810[2] = 1; + sPauseScreenIwork[2] = 1; } } else { - D_80161810[2] = 0; + sPauseScreenIwork[2] = 0; } - return var_v1; + + return ret; } -void func_hud_80088784(s32 arg0) { - Gfx* D_800D1D4C[] = { +void HUD_LoseLifeExplosion_Draw(s32 animFrames) { + Gfx* sLoseLifePlanetAnimDLs[] = { D_BG_PLANET_200B630, D_BG_PLANET_200A5A0, D_BG_PLANET_2009510, D_BG_PLANET_2008480, D_BG_PLANET_20073F0, D_BG_PLANET_2006360, D_BG_PLANET_200C6C0, D_BG_PLANET_20052D0, D_BG_PLANET_2004240, D_BG_PLANET_20031B0, D_BG_PLANET_2002120, D_BG_PLANET_2001090, D_BG_SPACE_2000000, D_BG_PLANET_2010A30, D_BG_PLANET_20101A0, D_BG_PLANET_200F910, D_BG_PLANET_200F080, D_BG_PLANET_200E7F0, }; - Gfx* D_800D1D94[] = { + Gfx* sLoseLifeSpaceAnimDLs[] = { D_BG_SPACE_20066C0, D_BG_SPACE_2005E30, D_BG_SPACE_20055A0, D_BG_SPACE_2004D10, D_BG_SPACE_2004480, D_BG_SPACE_2003BF0, D_BG_SPACE_2003360, D_BG_SPACE_2002AD0, D_BG_SPACE_2002240, D_BG_SPACE_20019B0, D_BG_SPACE_2001120, D_BG_SPACE_2000890, D_BG_SPACE_2000000, }; - s32 D_800D1DC8[] = { + s32 sLoseLifePrimColors[] = { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 200, 150, 100, 50, }; - if (arg0 != 0) { - arg0--; + if (animFrames != 0) { + animFrames--; RCP_SetupDL(&gMasterDisp, SETUPDL_36); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, D_800D1DC8[arg0]); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sLoseLifePrimColors[animFrames]); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 3.9f, -3.3f, -100.0f, MTXF_NEW); Matrix_Scale(gGfxMatrix, 0.37f, 0.37f, 0.37f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if (gLevelType == LEVELTYPE_PLANET) { - gSPDisplayList(gMasterDisp++, D_800D1D4C[arg0]); + gSPDisplayList(gMasterDisp++, sLoseLifePlanetAnimDLs[animFrames]); } else { - gSPDisplayList(gMasterDisp++, D_800D1D94[arg0]); + gSPDisplayList(gMasterDisp++, sLoseLifeSpaceAnimDLs[animFrames]); } Matrix_Pop(&gGfxMatrix); } } -void func_hud_80088970(void) { +void HUD_PauseScreen_Update(void) { s32 i; s32 j; Player* player; @@ -1398,50 +1400,52 @@ void func_hud_80088970(void) { s32 temp; s32 ret; - D_80161838[0]++; + sPauseScreenTimer[0]++; if (gPlayState != PLAY_PAUSE) { - D_80161838[0] = 0; - D_80161838[1] = 0; + sPauseScreenTimer[0] = 0; + sPauseScreenTimer[1] = 0; // clang-format off - for(i = 0; i < 5; i++) { D_80161810[i] = 0; } + for (i = 0; i < 5; i++) { \ + sPauseScreenIwork[i] = 0; + } // clang-format on - D_80161810[4] = 1; + sPauseScreenIwork[4] = 1; } - if (D_80161810[0] >= 2) { + if (sPauseScreenIwork[0] >= 2) { gPauseEnabled = false; } player = &gPlayer[gPlayerNum]; if ((gPlayState == PLAY_PAUSE) && (gLevelStartStatusScreenTimer == 0) && !gVersusMode) { - switch (D_80161810[0]) { + switch (sPauseScreenIwork[0]) { case 0: - D_80161838[0] = 0; - D_80161810[1] = 0; - D_80161810[0] = 1; + sPauseScreenTimer[0] = 0; + sPauseScreenIwork[1] = 0; + sPauseScreenIwork[0] = 1; break; case 1: - ret = func_hud_800886B8(); + ret = HUD_PauseScreenInput(); if (ret != 0) { - D_80161838[0] = 0; - if (((ret > 0) && (D_80161810[1] == 1)) || ((ret < 0) && (D_80161810[1] == 0))) { - D_80161810[1] ^= 1; + sPauseScreenTimer[0] = 0; + if (((ret > 0) && (sPauseScreenIwork[1] == 1)) || ((ret < 0) && (sPauseScreenIwork[1] == 0))) { + sPauseScreenIwork[1] ^= 1; AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); } } if (gInputPress->button & B_BUTTON) { - D_80161810[0] = 10; + sPauseScreenIwork[0] = 10; } if (gInputPress->button & A_BUTTON) { - if (D_80161810[1] == 0) { - D_80161810[0] = 10; + if (sPauseScreenIwork[1] == 0) { + sPauseScreenIwork[0] = 10; } else { - D_80161810[0] = 2; + sPauseScreenIwork[0] = 2; } } break; @@ -1468,13 +1472,13 @@ void func_hud_80088970(void) { gFillScreenAlpha = 255; if (gLifeCount[gPlayerNum] == 0) { - D_80161810[0] = 3; + sPauseScreenIwork[0] = 3; } else { - D_80161810[0] = 3; + sPauseScreenIwork[0] = 3; } - D_80161838[1] = 0; - D_80161838[0] = 0; + sPauseScreenTimer[1] = 0; + sPauseScreenTimer[0] = 0; case 3: Graphics_FillRectangle(&gMasterDisp, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, 0, 0, 0, 255); @@ -1496,29 +1500,29 @@ void func_hud_80088970(void) { } else { if (gFillScreenAlpha == 0) { if (gLevelType == LEVELTYPE_PLANET) { - if (D_80161838[1] == 0) { + if (sPauseScreenTimer[1] == 0) { Audio_PlayDeathSequence(); } - if (D_80161838[1] == 10) { + if (sPauseScreenTimer[1] == 10) { gLifeCount[gPlayerNum]--; } - D_80161838[1]++; - if (D_80161838[1] > 18) { - D_80161810[0] = 4; - D_80161838[1] = 0; + sPauseScreenTimer[1]++; + if (sPauseScreenTimer[1] > 18) { + sPauseScreenIwork[0] = 4; + sPauseScreenTimer[1] = 0; } } else { - if (D_80161838[1] == 0) { + if (sPauseScreenTimer[1] == 0) { Audio_PlayDeathSequence(); } - if (D_80161838[1] == 6) { + if (sPauseScreenTimer[1] == 6) { gLifeCount[gPlayerNum]--; } - D_80161838[1]++; - if (D_80161838[1] > 13) { - D_80161810[0] = 4; - D_80161838[1] = 0; + sPauseScreenTimer[1]++; + if (sPauseScreenTimer[1] > 13) { + sPauseScreenIwork[0] = 4; + sPauseScreenTimer[1] = 0; } } } @@ -1527,7 +1531,7 @@ void func_hud_80088970(void) { case 4: Graphics_FillRectangle(&gMasterDisp, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, 0, 0, 0, 255); - if (D_80161838[0] < 140) { + if (sPauseScreenTimer[0] < 140) { break; } @@ -1539,7 +1543,7 @@ void func_hud_80088970(void) { if (gFillScreenAlpha > 255) { gFillScreenAlpha = 255; } - if (D_80161838[0] < 160) { + if (sPauseScreenTimer[0] < 160) { break; } @@ -1584,11 +1588,12 @@ void func_hud_80088970(void) { } } - if ((D_80161810[3] == 0) && (gPlayState == PLAY_PAUSE) && !gVersusMode && (gLevelStartStatusScreenTimer == 0)) { - switch (D_80161810[0]) { + if ((sPauseScreenIwork[3] == 0) && (gPlayState == PLAY_PAUSE) && !gVersusMode && + (gLevelStartStatusScreenTimer == 0)) { + switch (sPauseScreenIwork[0]) { case 0: case 1: - j = func_hud_800863C8(); + j = HUD_GetLevelIndex(); x0 = 140.0f; y0 = 92.0f + 4.0f; @@ -1596,10 +1601,10 @@ void func_hud_80088970(void) { x1 = x0 - 28.0f; y1 = y0 + 18.0f; - x2 = 160.0f - (D_800D1AEC[j].unk_10 / 2.0f); + x2 = 160.0f - (sLevelTitleCard[j].titleCardWidth / 2.0f); y2 = y0 - 40.0f; - func_hud_80086C08(69.0f, y2 - 4.0f, 7.6f, 2.1f); + HUD_MsgWindowBg_Draw2(69.0f, y2 - 4.0f, 7.6f, 2.1f); switch (gCurrentLevel) { case LEVEL_CORNERIA: @@ -1640,17 +1645,18 @@ void func_hud_80088970(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - for (i = 0; i < D_800D1AEC[j].unk_14; i++) { - TextureRect_IA8(&gMasterDisp, D_800D1AEC[j].unk_0C + (D_800D1AEC[j].unk_10 * i), - D_800D1AEC[j].unk_10, 1, x2, y2 + i, 1.0f, 1.0f); + for (i = 0; i < sLevelTitleCard[j].titleCardHeight; i++) { + Lib_TextureRect_IA8(&gMasterDisp, + sLevelTitleCard[j].titleCardTex + (sLevelTitleCard[j].titleCardWidth * i), + sLevelTitleCard[j].titleCardWidth, 1, x2, y2 + i, 1.0f, 1.0f); } - func_hud_80086C08(x1 - 10.0f, y0 - 4.0f, 4.7f, 2.8f); + HUD_MsgWindowBg_Draw2(x1 - 10.0f, y0 - 4.0f, 4.7f, 2.8f); RCP_SetupDL(&gMasterDisp, SETUPDL_76); - if (D_80161810[1] == 0) { - temp = (D_80161838[0] % 20); + if (sPauseScreenIwork[1] == 0) { + temp = (sPauseScreenTimer[0] % 20); if (temp >= 10) { temp = 20 - temp; } @@ -1662,10 +1668,10 @@ void func_hud_80088970(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 64, 64, 64, 255); } - TextureRect_IA8(&gMasterDisp, D_1000000, 64, 10, x0 - 12.0f, y0, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_1000000, 64, 10, x0 - 12.0f, y0, 1.0f, 1.0f); - if (D_80161810[1] == 1) { - temp = (D_80161838[0] % 20); + if (sPauseScreenIwork[1] == 1) { + temp = (sPauseScreenTimer[0] % 20); if (temp >= 10) { temp = 20 - temp; } @@ -1678,26 +1684,26 @@ void func_hud_80088970(void) { } if (gCurrentLevel == LEVEL_TRAINING) { - TextureRect_IA8(&gMasterDisp, D_TR_6000000, 96, 12, x1, y1, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_TR_6000000, 96, 12, x1, y1, 1.0f, 1.0f); } else { if (gLifeCount[gPlayerNum]) { - TextureRect_IA8(&gMasterDisp, D_1000280, 96, 10, x1, y1, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_1000280, 96, 10, x1, y1, 1.0f, 1.0f); } else { - TextureRect_IA8(&gMasterDisp, D_1000640, 96, 22, x1, y1, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_1000640, 96, 22, x1, y1, 1.0f, 1.0f); } } if ((gCurrentLevel != LEVEL_VENOM_ANDROSS) && (gCurrentLevel != LEVEL_TRAINING)) { - func_hud_80087788(); - func_hud_80084B94(0); + HUD_TeammateStatus_Draw(); + HUD_TeamDownWrench_Draw(0); } break; case 3: case 4: if (gCurrentLevel != LEVEL_TRAINING) { - func_hud_80084930(132.0f, 124.0f, gLifeCount[gPlayerNum]); - func_hud_80088784(D_80161838[1]); + HUD_LivesCount1_Draw(132.0f, 124.0f, gLifeCount[gPlayerNum]); + HUD_LoseLifeExplosion_Draw(sPauseScreenTimer[1]); } break; @@ -1707,50 +1713,50 @@ void func_hud_80088970(void) { } } -void func_hud_80089670(void) { +void HUD_RadarMark_Item_Draw(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_62); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); Matrix_Scale(gGfxMatrix, 18.64f, 21.04f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); } -void func_hud_80089710(void) { +void HUD_RadarMark_Enemy_Draw(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_62); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); Matrix_Scale(gGfxMatrix, 11.0f, 11.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); } -void func_hud_800897B0(void) { +void HUD_RadarMark_Boss_Draw(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_62); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); Matrix_Scale(gGfxMatrix, 130.0f, 130.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024830); + gSPDisplayList(gMasterDisp++, aRadarMarkBossDL); } -void func_hud_80089850(void) { +void HUD_RadarMark_KaSaucerer_Draw(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_62); gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 0, 255); Matrix_Scale(gGfxMatrix, 125.0f, 125.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_102A8A0); + gSPDisplayList(gMasterDisp++, aRadarMarkKaSaucererDL); } -void func_hud_800898F0(void) { +void HUD_RadarMark_Missile_Draw(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_1); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 208, 80, 255); Matrix_Scale(gGfxMatrix, 30.0f, 30.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_SZ_6004570); + gSPDisplayList(gMasterDisp++, aSzMissileRadarMarkDL); } f32 D_800D1E10 = 0.0f; -void func_hud_80089994(s32 arg0) { - s32 D_800D1E14[][4] = { +void HUD_RadarMark_Arwing_Draw(s32 colorIdx) { + s32 arwingMarkColor[][4] = { { 177, 242, 12, 255 }, { 89, 121, 6, 128 }, { 90, 90, 255, 255 }, { 45, 45, 128, 128 }, { 0, 179, 67, 255 }, { 0, 90, 34, 128 }, { 255, 30, 0, 255 }, { 128, 15, 0, 128 }, }; @@ -1766,14 +1772,14 @@ void func_hud_80089994(s32 arg0) { } RCP_SetupDL(&gMasterDisp, SETUPDL_62); - gDPSetPrimColor(gMasterDisp++, 0, 0, D_800D1E14[arg0][0], D_800D1E14[arg0][1], D_800D1E14[arg0][2], - D_800D1E14[arg0][3]); + gDPSetPrimColor(gMasterDisp++, 0, 0, arwingMarkColor[colorIdx][0], arwingMarkColor[colorIdx][1], + arwingMarkColor[colorIdx][2], arwingMarkColor[colorIdx][3]); Matrix_Scale(gGfxMatrix, var_fv1, var_fv2, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1015510); + gSPDisplayList(gMasterDisp++, aRadarMarkArwingDL); } -void func_hud_80089AF4(void) { +void HUD_RadarMark_StarWolf_Draw(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_62); gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 0, 255); Matrix_Scale(gGfxMatrix, 54.0f, 54.0f, 1.0f, MTXF_APPLY); @@ -1781,15 +1787,15 @@ void func_hud_80089AF4(void) { gSPDisplayList(gMasterDisp++, aStarWolfRadarMarkDL); } -void func_hud_80089B94(void) { +void HUD_RadarMark_Katt_Draw(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_62); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 92, 92, 255); Matrix_Scale(gGfxMatrix, 54.0f, 54.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_D0098B0); + gSPDisplayList(gMasterDisp++, aKattRadarMarkDL); } -void func_hud_80089C38(void) { +void HUD_RadarMark_Supplies_Draw(void) { s32 alpha; RCP_SetupDL(&gMasterDisp, SETUPDL_12); @@ -1807,111 +1813,113 @@ void func_hud_80089C38(void) { gSPDisplayList(gMasterDisp++, D_1024230); } -void func_hud_80089D28(void) { - s32 gb; +void HUD_RadarMissileAlarm_Draw(void) { + s32 colorGB; RCP_SetupDL(&gMasterDisp, SETUPDL_1); - gb = gGameFrameCount % 21; + colorGB = gGameFrameCount % 21; - if (gb > 10) { - gb = 20 - gb; + if (colorGB > 10) { + colorGB = 20 - colorGB; } - gb *= 25.5f; + colorGB *= 25.5f; - if ((gb == 10) || (gb == 0)) { - // clang-format off - //! FAKE: Probably a MACRO - if (1) {AUDIO_PLAY_SFX(NA_SE_MISSILE_ALARM, gDefaultSfxSource, 4);} - // clang-format on + // clang-format off + if ((colorGB == 10) || (colorGB == 0)) { \ + AUDIO_PLAY_SFX(NA_SE_MISSILE_ALARM, gDefaultSfxSource, 4); } + // clang-format on - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, gb, gb, 255); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); Matrix_Translate(gGfxMatrix, 0.0f, -185.92001f, 0, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 3.55f, 0.13f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024230); } -void HUD_RadarMark_Draw(s32 arg0) { - s32 var_a1; - s32 var_a1_2; +void HUD_RadarMark_Draw(s32 type) { + s32 arwingMarkColor; + s32 playernum; - switch (arg0) { - case 0: - case 1: - case 2: - case 3: - var_a1_2 = var_a1 = arg0; - if (gCamCount != 1) { - if (arg0 == 1) { - var_a1 = 3; + switch (type) { + case RADARMARK_FOX: + case RADARMARK_FALCO: + case RADARMARK_SLIPPY: + case RADARMARK_PEPPY: + playernum = arwingMarkColor = type; + + if (gCamCount != 1) { // Multiplayer + if (type == RADARMARK_FALCO) { + arwingMarkColor = 3; } - if (arg0 == 3) { - var_a1 = 1; + if (type == RADARMARK_PEPPY) { + arwingMarkColor = 1; } - if (gPlayer[arg0].state_1C8 == PLAYERSTATE_1C8_VS_STANDBY) { + if (gPlayer[type].state_1C8 == PLAYERSTATE_1C8_VS_STANDBY) { break; } } - if ((var_a1_2 == gPlayerNum) && (gGameFrameCount & 2)) { - var_a1 = (var_a1 * 2) + 1; + + if ((playernum == gPlayerNum) && (gGameFrameCount & 2)) { + arwingMarkColor = (arwingMarkColor * 2) + 1; } else { - var_a1 = var_a1 * 2; + arwingMarkColor = arwingMarkColor * 2; } - func_hud_80089994(var_a1); + + HUD_RadarMark_Arwing_Draw(arwingMarkColor); break; - case 4: - case 5: - case 6: - case 7: - func_hud_80089AF4(); + case RADARMARK_WOLF: + case RADARMARK_LEON: + case RADARMARK_PIGMA: + case RADARMARK_ANDREW: + HUD_RadarMark_StarWolf_Draw(); break; - case 8: - func_hud_80089B94(); + case RADARMARK_KATT: + HUD_RadarMark_Katt_Draw(); break; - case 100: - func_hud_800898F0(); + case RADARMARK_MISSILE: + HUD_RadarMark_Missile_Draw(); break; - case 101: - func_hud_80089850(); + case RADARMARK_KA_SAUCERER: + HUD_RadarMark_KaSaucerer_Draw(); break; - case 102: - func_hud_800897B0(); + case RADARMARK_BOSS: + HUD_RadarMark_Boss_Draw(); break; - case 103: + case RADARMARK_SUPPIES: if (gVersusMode == true) { - func_hud_80089670(); + HUD_RadarMark_Item_Draw(); } else { - func_hud_80089C38(); + HUD_RadarMark_Supplies_Draw(); } break; - case 200: - case 201: - func_hud_80089670(); + case RADARMARK_ITEM_1: + case RADARMARK_ITEM_2: + HUD_RadarMark_Item_Draw(); break; - case 999: + case RADARMARK_NOTHING: break; default: - func_hud_80089710(); + HUD_RadarMark_Enemy_Draw(); break; } } -void func_hud_8008A07C(f32 x, f32 y) { - f32 D_800D1E94[] = { 20.0f, 180.0f, 20.0f, 180.0f }; - f32 D_800D1EA4[] = { 72.0f, 72.0f, 192.0f, 192.0f }; +void HUD_RadarWindow_Draw(f32 x, f32 y) { + f32 sVsRadarWindowXpos[] = { 20.0f, 180.0f, 20.0f, 180.0f }; + f32 sVsRadarWindowYpos[] = { 72.0f, 72.0f, 192.0f, 192.0f }; f32 xPos; f32 yPos; f32 xScale; @@ -1919,14 +1927,14 @@ void func_hud_8008A07C(f32 x, f32 y) { f32 xScale1; f32 yScale1; - if (gCamCount != 1) { - xPos = D_800D1E94[gPlayerNum]; - yPos = D_800D1EA4[gPlayerNum]; + if (gCamCount != 1) { // Versus mode + xPos = sVsRadarWindowXpos[gPlayerNum]; + yPos = sVsRadarWindowYpos[gPlayerNum]; xScale = 1.21f; yScale = 1.69f; xScale1 = 0.70f; yScale1 = 0.70f; - } else { + } else { // Simple player mode xPos = x - 32.0f; yPos = y - 14.0f; xScale = 2.98f; @@ -1937,13 +1945,12 @@ void func_hud_8008A07C(f32 x, f32 y) { RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, 60, 60, 255, 170); - func_hud_800853A4(xPos + 1.0f, yPos + 1.0f, xScale, yScale); - + HUD_MsgWindowBg_Draw(xPos + 1.0f, yPos + 1.0f, xScale, yScale); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - func_hud_80085404(xPos, yPos, xScale1, yScale1); + HUD_RadarWindowFrame_Draw(xPos, yPos, xScale1, yScale1); } -void func_hud_8008A240(void) { +void HUD_RadarMarks_Setup(void) { s32 i; Item* item; @@ -1951,7 +1958,7 @@ void func_hud_8008A240(void) { if (gPlayer[i].state_1C8 == PLAYERSTATE_1C8_NEXT) { continue; } - gRadarMarks[i].status = 1; + gRadarMarks[i].enabled = true; gRadarMarks[i].type = i; gRadarMarks[i].yRot = gPlayer[i].yRot_114 + gPlayer[i].rot.y; gRadarMarks[i].pos.z = gPlayer[i].trueZpos; @@ -1961,7 +1968,7 @@ void func_hud_8008A240(void) { continue; } - if (gVersusMode && gVersusStage == VS_STAGE_SECTOR_Z) { + if (gVersusMode && (gVersusStage == VS_STAGE_SECTOR_Z)) { continue; } @@ -1978,10 +1985,10 @@ void func_hud_8008A240(void) { } } - if (gVersusMode == 1) { - for (i = 0, item = gItems; i < ARRAY_COUNT(gItems); i++, item++) { + if (gVersusMode == true) { + for (i = 0, item = &gItems[0]; i < ARRAY_COUNT(gItems); i++, item++) { if (item->obj.status >= OBJ_ACTIVE) { - gRadarMarks[item->index + 50].status = 1; + gRadarMarks[item->index + 50].enabled = true; gRadarMarks[item->index + 50].type = 103; gRadarMarks[item->index + 50].pos.x = item->obj.pos.x; gRadarMarks[item->index + 50].pos.y = item->obj.pos.y; @@ -1992,7 +1999,7 @@ void func_hud_8008A240(void) { } } -s32 func_hud_8008A4DC(void) { +s32 HUD_RadarMarks_Update(void) { s32 i; f32 scale; f32 x1; @@ -2066,7 +2073,7 @@ s32 func_hud_8008A4DC(void) { y = 162.000f; x1 += D_800D1E10 * temp3; } else { - if (!gVsMatchStart || (D_versus_80178750 != 0)) { + if (!gVsMatchStart || gVsMatchOver) { return 0; } temp2 = 13000.00f; @@ -2077,8 +2084,8 @@ s32 func_hud_8008A4DC(void) { y1 = -166.00f; } - func_hud_8008A240(); - func_hud_8008A07C(x, y); + HUD_RadarMarks_Setup(); + HUD_RadarWindow_Draw(x, y); if (!gVersusMode && ((gCurrentLevel == LEVEL_SECTOR_Z) || (gCurrentLevel == LEVEL_FORTUNA) || (gCurrentLevel == LEVEL_VENOM_2) || @@ -2089,15 +2096,15 @@ s32 func_hud_8008A4DC(void) { switch (gCurrentLevel) { case LEVEL_SECTOR_Z: - TextureRect_IA8(&gMasterDisp, D_SZ_60012D0, 16, 9, 251.0f + D_800D1E10, 181.0f, 1.00f, 1.00f); + Lib_TextureRect_IA8(&gMasterDisp, D_SZ_60012D0, 16, 9, 251.0f + D_800D1E10, 181.0f, 1.00f, 1.00f); break; case LEVEL_FORTUNA: - TextureRect_IA8(&gMasterDisp, D_FO_6001260, 16, 16, 251.0f + D_800D1E10, 178.0f, 1.00f, 1.00f); + Lib_TextureRect_IA8(&gMasterDisp, D_FO_6001260, 16, 16, 251.0f + D_800D1E10, 178.0f, 1.00f, 1.00f); break; case LEVEL_BOLSE: - TextureRect_IA8(&gMasterDisp, D_BO_6000C80, 16, 16, 251.0f + D_800D1E10, 178.0f, 1.00f, 1.00f); + Lib_TextureRect_IA8(&gMasterDisp, D_BO_6000C80, 16, 16, 251.0f + D_800D1E10, 178.0f, 1.00f, 1.00f); break; case LEVEL_SECTOR_Y: @@ -2108,16 +2115,16 @@ s32 func_hud_8008A4DC(void) { if ((y < 150.0f) || (y > 206.0f)) { break; } - TextureRect_IA8(&gMasterDisp, D_SY_6000840, 64, 64, 250.0f + D_800D1E10, temp, 0.25f, 0.25f); + Lib_TextureRect_IA8(&gMasterDisp, D_SY_6000840, 64, 64, 250.0f + D_800D1E10, temp, 0.25f, 0.25f); } break; case LEVEL_KATINA: - TextureRect_IA8(&gMasterDisp, D_KA_6001260, 8, 8, 254.0f + D_800D1E10, 182.0f, 1.00f, 1.00f); + Lib_TextureRect_IA8(&gMasterDisp, D_KA_6001260, 8, 8, 254.0f + D_800D1E10, 182.0f, 1.00f, 1.00f); break; case LEVEL_VENOM_2: - TextureRect_IA8(&gMasterDisp, D_VE2_6002890, 16, 16, 251.0f + D_800D1E10, 178.0f, 1.00f, 1.00f); + Lib_TextureRect_IA8(&gMasterDisp, D_VE2_6002890, 16, 16, 251.0f + D_800D1E10, 178.0f, 1.00f, 1.00f); break; } } @@ -2127,13 +2134,13 @@ s32 func_hud_8008A4DC(void) { if ((gCurrentLevel == LEVEL_SECTOR_Z) && (D_hud_80161710 != 0)) { Matrix_Push(&gGfxMatrix); - func_hud_80089D28(); + HUD_RadarMissileAlarm_Draw(); Matrix_Pop(&gGfxMatrix); D_hud_80161710--; } for (i = ARRAY_COUNT(gRadarMarks) - 1; i >= 0; i--) { - if ((gRadarMarks[i].status == 0) || (fabsf(gRadarMarks[i].pos.x) >= (temp2 + 1000.0f)) || + if ((gRadarMarks[i].enabled == 0) || (fabsf(gRadarMarks[i].pos.x) >= (temp2 + 1000.0f)) || (fabsf(gRadarMarks[i].pos.z) >= (temp2 + 1000.0f))) { continue; } @@ -2152,34 +2159,33 @@ s32 func_hud_8008A4DC(void) { HUD_RadarMark_Draw(gRadarMarks[i].type); Matrix_Pop(&gGfxMatrix); - gRadarMarks[i].status = 0; + gRadarMarks[i].enabled = false; } Matrix_Pop(&gGfxMatrix); return 0; } -// Why is this function here in fox_hud? Weird. -s32 ActorMissileSeek_ModeCheck(s32 missileSeekMode) { +s32 ActorMissileSeek_ModeCheck(ActorMissileSeekMode mode) { Actor* actor; s32 i; s32 ret = 0; for (i = 0, actor = &gActors[0]; i < 60; i++, actor++) { - switch (missileSeekMode) { - case 0: // follows teammates + switch (mode) { + case MISSILE_SEEK_TEAMMATES: if ((actor->obj.status == OBJ_ACTIVE) && (actor->obj.id == OBJ_MISSILE_SEEK_TEAM)) { ret++; } break; - case 1: // follows player + case MISSILE_SEEK_PLAYER: if ((actor->obj.status == OBJ_ACTIVE) && (actor->obj.id == OBJ_MISSILE_SEEK_PLAYER)) { ret++; } break; - case 2: // follows either + case MISSILE_SEEK_EITHER: if (((actor->obj.id == OBJ_MISSILE_SEEK_TEAM) || (actor->obj.id == OBJ_MISSILE_SEEK_PLAYER)) && (actor->obj.status == OBJ_ACTIVE)) { ret++; @@ -2244,7 +2250,7 @@ void HUD_RadioCharacterName_Draw(void) { } } -void func_hud_8008B044(void) { +void HUD_IncomingMsg_Update(void) { switch (D_80161798) { case 0: if (gCallTimer == 0) { @@ -2280,34 +2286,35 @@ void func_hud_8008B044(void) { } } -void func_hud_8008B1B0(void) { - f32 temp = 142.0f; - f32 temp2 = 18.0f; +void HUD_IncomingMsg_Draw(void) { + f32 xPos = 142.0f; + f32 yPos = 18.0f; RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); switch (D_80161790 / 2) { case 3: - func_hud_8008556C(temp + 31.0f, temp2); + HUD_IncomingMsgSignal3_Draw(xPos + 31.0f, yPos); case 2: - func_hud_80085514(temp + 24.0f, temp2); + HUD_IncomingMsgSignal2_Draw(xPos + 24.0f, yPos); case 1: - func_hud_800854BC(temp + 18.0f, temp2); + HUD_IncomingMsgSignal1_Draw(xPos + 18.0f, yPos); case 0: - func_hud_80085464(temp, temp2); + HUD_IncomingMsgButton_Draw(xPos, yPos); break; + default: break; } } -void func_hud_8008B2A4(void) { +void HUD_IncomingMsg(void) { if (gPlayState != PLAY_PAUSE) { - func_hud_8008B044(); + HUD_IncomingMsg_Update(); } if (gCallTimer != 0) { - func_hud_8008B1B0(); + HUD_IncomingMsg_Draw(); } } @@ -2315,7 +2322,7 @@ s32 D_800D1EB4 = 255; s32 D_800D1EB8 = 255; s32 D_800D1EBC = 255; -void func_hud_8008B2F0(void) { +void HUD_PlayerShieldGauge_Update(void) { f32 shields; switch (D_hud_80161730) { @@ -2377,77 +2384,78 @@ void func_hud_8008B2F0(void) { } } -void func_hud_8008B5B0(f32 x, f32 y) { +void HUD_PlayerShieldGauge_Draw(f32 x, f32 y) { RCP_SetupDL(&gMasterDisp, SETUPDL_75); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - func_hud_800856C0(x + 8.0f, y + 2.0f, D_801617A8, 1.0f, D_801617AC); + HUD_ShieldGaugeBars_Draw(x + 8.0f, y + 2.0f, D_801617A8, 1.0f, D_801617AC); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, D_800D1EB4, D_800D1EB8, D_800D1EBC, 255); - func_hud_80085618(x, y, 1.0f, 1.0f); - func_hud_800855C4(x + 7.0f + (D_801617A8 * 6.0f * 8.0f), y, 1.0f, 1.0f); - func_hud_8008566C(x + 7.0f, y, D_801617A8 * 6.0f, 1.0f); + HUD_ShieldGaugeEdgeLeft_Draw(x, y, 1.0f, 1.0f); + HUD_ShieldGaugeEdgeRight_Draw(x + 7.0f + (D_801617A8 * 6.0f * 8.0f), y, 1.0f, 1.0f); + HUD_ShieldGaugeFrame_Draw(x + 7.0f, y, D_801617A8 * 6.0f, 1.0f); } -void func_hud_8008B734(void) { - func_hud_8008B2F0(); - func_hud_8008B5B0(20.0f, 18.0f); - func_hud_80085944(); +void HUD_PlayerShield_GoldRings(void) { + HUD_PlayerShieldGauge_Update(); + HUD_PlayerShieldGauge_Draw(20.0f, 18.0f); + HUD_GoldRings_Draw(); } -s32 func_hud_8008B774(void) { +s32 HUD_RadioDamage_Type(void) { s32 i; s32 ret = 0; s32 temp; switch (gCurrentRadioPortrait) { - case 0: - case 1: + case RCID_FOX: + case RCID_FOX + 1: i = 0; break; - case 10: - case 11: + case RCID_FALCO: + case RCID_FALCO + 1: temp = 1; i = 1; break; - case 20: - case 21: + case RCID_SLIPPY: + case RCID_SLIPPY + 1: temp = 2; i = 2; break; - case 30: - case 31: + case RCID_PEPPY: + case RCID_PEPPY + 1: temp = 3; i = 3; break; - case 240: - case 241: - case 200: - case 201: + case RCID_WOLF: + case RCID_WOLF + 1: + case RCID_WOLF_2: + case RCID_WOLF_2 + 1: i = 4; break; - case 260: - case 261: - case 220: - case 221: + case RCID_LEON: + case RCID_LEON + 1: + case RCID_LEON_2: + case RCID_LEON_2 + 1: i = 5; break; - case 250: - case 251: - case 210: - case 211: + case RCID_PIGMA: + case RCID_PIGMA + 1: + case RCID_PIGMA_2: + case RCID_PIGMA_2 + 1: i = 6; break; - case 270: - case 271: - case 230: - case 231: + case RCID_ANDREW: + case RCID_ANDREW + 1: + case RCID_ANDREW_2: + case RCID_ANDREW_2 + 1: i = 7; break; @@ -2478,12 +2486,14 @@ s32 func_hud_8008B774(void) { } switch (i) { + // Fox case 0: if (gPlayer[0].radioDamageTimer != 0) { ret = 1; } break; + // Star Wolf case 4: case 5: case 6: @@ -2502,6 +2512,7 @@ s32 func_hud_8008B774(void) { case 9: break; + // Teammates default: if (gActors[i].timer_0C6 != 0) { ret = 1; @@ -2512,8 +2523,8 @@ s32 func_hud_8008B774(void) { return ret; } -void func_hud_8008B9E8(void) { - s32 temp; +void HUD_RadioDamage_Update(void) { + s32 radioDamageType; // clang-format off if ((D_8016178C != 0) && (D_8016178C != 1)) { D_8016178C--; } @@ -2526,11 +2537,11 @@ void func_hud_8008B9E8(void) { if ((D_80161788 == 0) && (D_8016178C == 0)) { if ((gRadioState >= 4) && (gCurrentRadioPortrait != RCID_STATIC) && (gCurrentRadioPortrait != RCID_STATIC + 1)) { - temp = func_hud_8008B774(); - if (temp == 1) { + radioDamageType = HUD_RadioDamage_Type(); + if (radioDamageType == RCID_FOX + 1) { D_80161788 = 20; } - if (temp == 2) { + if (radioDamageType == RCID_STATIC) { D_8016178C = 60; } } else { @@ -2544,7 +2555,7 @@ void func_hud_8008B9E8(void) { } } -void func_hud_8008BAE4(void) { +void HUD_RadioDamage_Draw(void) { s32 r; s32 g; s32 b; @@ -2567,80 +2578,79 @@ void func_hud_8008BAE4(void) { Matrix_Translate(gGfxMatrix, -53.9f, -38.5f, -139.4f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_800D1A40); + gSPDisplayList(gMasterDisp++, sRadioDamageDL); Matrix_Pop(&gGfxMatrix); } } -void func_hud_8008BC80(void) { +void HUD_RadioDamage(void) { if (gPlayState != PLAY_PAUSE) { - func_hud_8008B9E8(); - func_hud_8008BAE4(); + HUD_RadioDamage_Update(); + HUD_RadioDamage_Draw(); } } -s32 func_hud_8008BCBC(s32 arg0) { - s32 temp = 10; - s32 ret; +s32 HUD_CountDigits(s32 number) { + s32 threshold = 10; + s32 digitCount; - if (arg0 < 0) { - arg0 = (s64) -arg0; + if (number < 0) { + number *= -1; // Convert to absolute value if negative } - ret = 1; - - while (arg0 >= temp) { - ret++; - temp *= 10; + for (digitCount = 1; threshold <= number; digitCount++) { + threshold *= 10; } - return ret; + return digitCount; } -void func_hud_8008BD00(u8* texturePtr, s32 xPos, s32 yPos, u8 arg3) { +void HUD_Texture_Scroll(u8* texturePtr, s32 xPos, s32 yPos, u8 type) { u8* texture = SEGMENTED_TO_VIRTUAL(texturePtr); - u8 temp; + u8 pixel; s32 x; s32 y; - switch (arg3) { - case 0: + switch (type) { + case 0: // Upwards vertical scroll for (x = 0; x < xPos; x++) { - temp = texture[x]; + pixel = texture[x]; for (y = 1; y < yPos; y++) { texture[(y - 1) * xPos + x] = texture[y * xPos + x]; } - texture[(yPos - 1) * xPos + x] = temp; + texture[(yPos - 1) * xPos + x] = pixel; } break; - case 1: + case 1: // Downwards vertical scroll for (x = 0; x < xPos; x++) { - temp = texture[(yPos - 1) * xPos + x]; + pixel = texture[(yPos - 1) * xPos + x]; for (y = yPos - 2; y >= 0; y--) { texture[(y + 1) * xPos + x] = texture[y * xPos + x]; } - texture[x] = temp; + texture[x] = pixel; } break; - case 2: + case 2: // Right horizontal scroll for (y = 0; y < yPos; y++) { - temp = texture[y * xPos + xPos - 1]; + pixel = texture[y * xPos + xPos - 1]; for (x = xPos - 2; x >= 0; x--) { texture[y * xPos + x + 1] = texture[y * xPos + x]; } - texture[y * xPos] = temp; + texture[y * xPos] = pixel; } break; - case 3: + case 3: // Left horizontal scroll for (y = 0; y < yPos; y++) { - temp = texture[y * xPos]; + pixel = texture[y * xPos]; // clang-format off - for (x = 1; x < xPos; x++) { texture[y * xPos + x - 1] = texture[y * xPos + x]; } + for (x = 1; x < xPos; x++) { \ + texture[y * xPos + x - 1] = texture[y * xPos + x]; + } + texture[(y * xPos) + xPos - 1] = pixel; // clang-format on - texture[(y * xPos) + xPos - 1] = temp; } break; @@ -2649,7 +2659,7 @@ void func_hud_8008BD00(u8* texturePtr, s32 xPos, s32 yPos, u8 arg3) { } } -void func_hud_8008C104(u16* srcTexture, u16* dstTexture) { +void HUD_Texture_Wave(u16* srcTexture, u16* dstTexture) { u16 *src, *dst; u16 buffer[1024]; f32 rowPhase; @@ -2664,7 +2674,7 @@ void func_hud_8008C104(u16* srcTexture, u16* dstTexture) { src = SEGMENTED_TO_VIRTUAL(srcTexture); dst = SEGMENTED_TO_VIRTUAL(dstTexture); - Texture_Scroll(srcTexture, width, height, 1); + Lib_Texture_Scroll(srcTexture, width, height, 1); halfHeight = height / 2; @@ -2692,7 +2702,7 @@ void func_hud_8008C104(u16* srcTexture, u16* dstTexture) { src[(((halfHeight - offset) + (halfHeight - 1)) * width) + j]; } } - Texture_Mottle(dst, buffer, 2); + Lib_Texture_Mottle(dst, buffer, 2); } void HUD_DisplaySmallNumber(f32 xPos, f32 yPos, f32 scale, s32 number) { @@ -2704,34 +2714,35 @@ void HUD_DisplaySmallNumber(f32 xPos, f32 yPos, f32 scale, s32 number) { for (i = 10; i != 1; i /= 10) { if ((xPos > 0.0f) && (yPos > 0.0f)) { - TextureRect_IA8(&gMasterDisp, sSmallNumberTex[number / i], 16, 8, xPos, yPos, scale, scale); + Lib_TextureRect_IA8(&gMasterDisp, sSmallNumberTex[number / i], 16, 8, xPos, yPos, scale, scale); } xPos += 9.0f * scale; number %= i; } if ((xPos > 0.0f) && (yPos > 0.0f)) { - TextureRect_IA8(&gMasterDisp, sSmallNumberTex[number / i], 16, 8, xPos, yPos, scale, scale); + Lib_TextureRect_IA8(&gMasterDisp, sSmallNumberTex[number / i], 16, 8, xPos, yPos, scale, scale); } } -void func_hud_8008C5C8(f32 arg0, f32 arg1, f32 arg2, s32 arg3) { - u16* D_800D1EE8[] = { - D_10050E0, - D_100BAC0, - D_100D900, - D_10032A0, +void HUD_VsModePortraitTex_Draw(f32 xPos, f32 yPos, f32 scale, s32 idx) { + u16* sVsModeFaceDL[] = { + aFoxPortraitTex, + aPeppyPortraitTex, + aSlippyPortraitTex, + aFalcoPortraitTex, }; s32 i; for (i = 0; i < 2; i++) { - TextureRect_RGBA16(&gMasterDisp, D_800D1EE8[arg3] + (44 * 20 * i), 44, 20, arg0, (20 * i * arg2) + arg1, arg2, - arg2); + Lib_TextureRect_RGBA16(&gMasterDisp, sVsModeFaceDL[idx] + (44 * 20 * i), 44, 20, xPos, (20 * i * scale) + yPos, + scale, scale); } - TextureRect_RGBA16(&gMasterDisp, D_800D1EE8[arg3] + 44 * 20 * 2, 44, 4, arg0, (40.0f * arg2) + arg1, arg2, arg2); + Lib_TextureRect_RGBA16(&gMasterDisp, sVsModeFaceDL[idx] + 44 * 20 * 2, 44, 4, xPos, (40.0f * scale) + yPos, scale, + scale); } -void func_hud_8008C6F4(s32 idx, s32 arg1) { +void HUD_EdgeArrows_Draw(s32 idx, bool arg1) { f32 D_800D1EF8[] = { 0.0f, 0.0f, -9.0f, 9.0f, 10.0f, 10.0f, 10.0f, 10.0f, 0.0f, 0.0f, -8.0f, 8.0f }; f32 D_800D1F28[] = { -7.0f, 7.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 8.0f, -8.0f, 0.0f, 0.0f }; f32 D_800D1F58[] = { @@ -2752,7 +2763,7 @@ void func_hud_8008C6F4(s32 idx, s32 arg1) { Matrix_RotateZ(gGfxMatrix, M_DTOR * D_800D1F88[idx], MTXF_APPLY); } - if (arg1 != 0) { + if (arg1) { Matrix_Translate(gGfxMatrix, D_800D1EF8[idx] + D_800D1FE8[idx], D_800D1F28[idx] + D_800D2018[idx], D_800D1F58[idx], MTXF_APPLY); } else { @@ -2765,12 +2776,12 @@ void func_hud_8008C6F4(s32 idx, s32 arg1) { RCP_SetupDL(&gMasterDisp, SETUPDL_62); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 150); - gSPDisplayList(gMasterDisp++, D_1024990); + gSPDisplayList(gMasterDisp++, aArrowDL); Matrix_Pop(&gGfxMatrix); } -void HUD_DrawEdgeArrows(void) { +void HUD_EdgeArrows_Update(void) { s32 D_800D2048[] = { 0x80, 0x40, 0x20, 0x10, 8 | 2, 8 | 1, 4 | 2, 4 | 1, 8, 4, 2, 1, }; @@ -2789,30 +2800,31 @@ void HUD_DrawEdgeArrows(void) { j = (D_800D2048[i] ^ 0xFF) & j; if (gGameFrameCount & 4) { - func_hud_8008C6F4(i, 0); + HUD_EdgeArrows_Draw(i, false); } if ((gGameFrameCount - 2) & 4) { - func_hud_8008C6F4(i, 1); + HUD_EdgeArrows_Draw(i, true); } } - func_hud_8008BD00(D_1024A58, 8, 8, 2); + HUD_Texture_Scroll(D_1024A58, 8, 8, 2); } } -s32 HUD_dummy_8008CB8C(void) { +// Unused +s32 HUD_8008CB8C(void) { return 0; } -void func_hud_8008CB98(f32 arg0, f32 arg1, f32 arg2) { - TextureRect_IA8(&gMasterDisp, D_versus_30013E0, 8, 8, arg0, arg1, arg2, arg2); +void HUD_StarTex_Draw(f32 arg0, f32 arg1, f32 arg2) { + Lib_TextureRect_IA8(&gMasterDisp, aVsStarTex, 8, 8, arg0, arg1, arg2, arg2); } -void func_hud_8008CBE4(void) { - f32 D_800D2078[] = { 62.0f, 222.0f, 62.0f, 222.0f }; // X - f32 D_800D2088[] = { 86.0f, 86.0f, 206.0f, 206.0f }; // Y - s32 D_800D2098[] = { 177, 255, 0, 30 }; // R - s32 D_800D20A8[] = { 242, 30, 179, 30 }; // G - s32 D_800D20B8[] = { 12, 0, 67, 255 }; // B +void HUD_KillCountStars_Update(void) { + f32 xPos[] = { 62.0f, 222.0f, 62.0f, 222.0f }; + f32 yPos[] = { 86.0f, 86.0f, 206.0f, 206.0f }; + s32 r[] = { 177, 255, 0, 30 }; + s32 g[] = { 242, 30, 179, 30 }; + s32 b[] = { 12, 0, 67, 255 }; s32 i; s32 j; @@ -2866,45 +2878,46 @@ void func_hud_8008CBE4(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_77); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - gDPSetEnvColor(gMasterDisp++, D_800D2098[j], D_800D20A8[j], D_800D20B8[j], 0); + gDPSetEnvColor(gMasterDisp++, r[j], g[j], b[j], 0); - func_hud_8008CB98(D_800D2078[gPlayerNum] + (i * 9.0f), D_800D2088[gPlayerNum], 1.0f); + HUD_StarTex_Draw(xPos[gPlayerNum] + (i * 9.0f), yPos[gPlayerNum], 1.0f); } break; } } -void func_hud_8008CFB8(f32 arg0, f32 arg1, f32 arg2, f32 arg3) { +void HUD_VS_ShieldGaugeFrame_Draw(f32 xPos, f32 yPos, f32 xScale, f32 yScale) { s32 i; for (i = 0; i < 3; i++) { - TextureRect_IA8(&gMasterDisp, D_versus_3000BC0 + 2 * ((80 * 8 * i) / 2), 80, 8, arg0, (8 * i * arg3) + arg1, - arg2, arg3); + Lib_TextureRect_IA8(&gMasterDisp, aVsShieldGaugeFrameTex + 2 * ((80 * 8 * i) / 2), 80, 8, xPos, + (8 * i * yScale) + yPos, xScale, yScale); } - TextureRect_IA8(&gMasterDisp, D_versus_3000BC0 + 2 * ((80 * 8 * i) / 2), 80, 2, arg0, (8 * i * arg3) + arg1, arg2, - arg3); + Lib_TextureRect_IA8(&gMasterDisp, aVsShieldGaugeFrameTex + 2 * ((80 * 8 * i) / 2), 80, 2, xPos, + (8 * i * yScale) + yPos, xScale, yScale); } -void func_hud_8008D0DC(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4) { - u32 var_t8 = 48.0f * arg4; +void HUD_VS_ShieldGaugeTex_Draw(f32 xPos, f32 yPos, f32 xScale, f32 yScale, f32 width) { + u32 xWidth = 48.0f * width; - func_hud_80084E78(&gMasterDisp, D_versus_300D440, D_versus_300D500, 48, 4, arg0, arg1, arg2, arg3, var_t8, 4); + TextureRect_CI8_2(&gMasterDisp, aVsShieldGaugeTex, aVsShieldGaugeTLUT, 48, 4, xPos, yPos, xScale, yScale, xWidth, + 4); } -void func_hud_8008D1F0(f32 arg0, f32 arg1, f32 arg2, f32 arg3) { - TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, arg0, arg1, arg2, arg3); +void HUD_VS_BombIcon_Draw(f32 arg0, f32 arg1, f32 arg2, f32 arg3) { + Lib_TextureRect_CI4(&gMasterDisp, aVsBombIconTex, aVsBombIconTLUT, 16, 16, arg0, arg1, arg2, arg3); } -void func_hud_8008D250(void) { - f32 D_800D20C8[] = { 113.0f, 273.0f, 113.0f, 273.0f }; - f32 D_800D20D8[] = { 79.0f, 79.0f, 199.0f, 199.0f }; +void HUD_VsModePortrait_Draw(void) { + f32 faceXpos[] = { 113.0f, 273.0f, 113.0f, 273.0f }; + f32 faceYpos[] = { 79.0f, 79.0f, 199.0f, 199.0f }; RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - func_hud_8008C5C8(D_800D20C8[gPlayerNum], D_800D20D8[gPlayerNum], 0.54f, gPlayerNum); + HUD_VsModePortraitTex_Draw(faceXpos[gPlayerNum], faceYpos[gPlayerNum], 0.54f, gPlayerNum); } -void func_hud_8008D31C(void) { +void HUD_VS_ShieldGauge_Draw(void) { f32 D_800D20E8[] = { 60.0f, 220.0f, 60.0f, 220.0f }; f32 D_800D20F8[] = { 78.0f, 78.0f, 198.0f, 198.0f }; @@ -2912,20 +2925,20 @@ void func_hud_8008D31C(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - func_hud_8008D0DC(D_800D20E8[gPlayerNum] + 3.0f, D_800D20F8[gPlayerNum] + 18.0f, 1.0f, 1.0f, - D_800D19E0[gPlayerNum]); + HUD_VS_ShieldGaugeTex_Draw(D_800D20E8[gPlayerNum] + 3.0f, D_800D20F8[gPlayerNum] + 18.0f, 1.0f, 1.0f, + D_800D19E0[gPlayerNum]); RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - func_hud_8008CFB8(D_800D20E8[gPlayerNum], D_800D20F8[gPlayerNum], 1.0f, 1.0f); + HUD_VS_ShieldGaugeFrame_Draw(D_800D20E8[gPlayerNum], D_800D20F8[gPlayerNum], 1.0f, 1.0f); } -void func_hud_8008D4F0(f32 arg0, f32 arg1) { - f32 D_800D2108[] = { +void HUD_BoostGauge_Draw(f32 xPos, f32 yPos) { + f32 boostGaugeXpos[] = { 110.0f, 270.0f, 110.0f, 270.0f, 0.0f, }; - f32 D_800D211C[] = { + f32 boostGaugeYpos[] = { 16.0f, 16.0f, 136.0f, 136.0f, 0.0f, }; f32 temp_fv0; @@ -2935,20 +2948,20 @@ void func_hud_8008D4F0(f32 arg0, f32 arg1) { f32 temp; f32 sp60; s32 temp_t9; - s32 var_v1; + s32 playerNum; if (gVersusMode) { temp = 2.0f; sp60 = 1.0f; - var_v1 = gPlayerNum; + playerNum = gPlayerNum; sp68 = 24.0f; } else { temp = 2.0f; sp60 = 2.0f; sp68 = 40.0f; - var_v1 = 4; - D_800D2108[var_v1] = arg0; - D_800D211C[var_v1] = arg1; + playerNum = 4; // index for Single Player + boostGaugeXpos[playerNum] = xPos; + boostGaugeYpos[playerNum] = yPos; } temp_fs0 = gPlayer[gPlayerNum].boostMeter * (1.0f / 90.0f); @@ -2957,64 +2970,68 @@ void func_hud_8008D4F0(f32 arg0, f32 arg1) { temp2 = sp68 * temp_fs0; if (!gPlayer[gPlayerNum].boostCooldown) { - Math_SmoothStepToF(&D_800D19AC[var_v1], 255.0f, 0.4f, 100.0f, 0.01f); + Math_SmoothStepToF(&D_800D19AC[playerNum], 255.0f, 0.4f, 100.0f, 0.01f); } else { - Math_SmoothStepToF(&D_800D19AC[var_v1], 100.0f, 0.4f, 100.0f, 0.01f); + Math_SmoothStepToF(&D_800D19AC[playerNum], 100.0f, 0.4f, 100.0f, 0.01f); } - temp_t9 = D_800D19AC[var_v1]; + temp_t9 = D_800D19AC[playerNum]; RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, temp_t9, temp_t9, temp_t9, 255); if (temp_fv0 > 0.01f) { - func_hud_80085890(D_800D2108[var_v1] + temp + temp2, D_800D211C[var_v1] + sp60, temp_fv0, 1.0f); + HUD_BoostGaugeCool_Draw(boostGaugeXpos[playerNum] + temp + temp2, boostGaugeYpos[playerNum] + sp60, temp_fv0, + 1.0f); } if (temp_fs0 > 0.01f) { - func_hud_800857DC(D_800D2108[var_v1] + temp + 1.0f, D_800D211C[var_v1] + sp60, temp_fs0, 1.0f); + HUD_BoostGaugeOverheat_Draw(boostGaugeXpos[playerNum] + temp + 1.0f, boostGaugeYpos[playerNum] + sp60, temp_fs0, + 1.0f); } RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - func_hud_80085740(D_800D2108[var_v1], D_800D211C[var_v1], 1.0f, 1.0f); + HUD_BoostGaugeFrame_Draw(boostGaugeXpos[playerNum], boostGaugeYpos[playerNum], 1.0f, 1.0f); } -void func_hud_8008D7F4(void) { - s32 D_800D2130[] = { 146, 165, 146, 165 }; - s32 D_800D2140[] = { 106, 106, 125, 125 }; - s32 D_800D2150[] = { 177, 255, 0, 30 }; - s32 D_800D2160[] = { 242, 30, 179, 30 }; - s32 D_800D2170[] = { 12, 0, 67, 255 }; +void HUD_VS_PlayerNumber_Draw(void) { + s32 playerNumberXpos[] = { 146, 165, 146, 165 }; + s32 playerNumberYpos[] = { 106, 106, 125, 125 }; + s32 playerNumberR[] = { 177, 255, 0, 30 }; + s32 playerNumberG[] = { 242, 30, 179, 30 }; + s32 playerNumberB[] = { 12, 0, 67, 255 }; RCP_SetupDL(&gMasterDisp, SETUPDL_78); - gDPSetPrimColor(gMasterDisp++, 0, 0, D_800D2150[gPlayerNum], D_800D2160[gPlayerNum], D_800D2170[gPlayerNum], 255); - Graphics_DisplayHUDNumber(D_800D2130[gPlayerNum], D_800D2140[gPlayerNum], gPlayerNum + 1); + gDPSetPrimColor(gMasterDisp++, 0, 0, playerNumberR[gPlayerNum], playerNumberG[gPlayerNum], + playerNumberB[gPlayerNum], 255); + Graphics_DisplayHUDNumber(playerNumberXpos[gPlayerNum], playerNumberYpos[gPlayerNum], gPlayerNum + 1); } -s32 D_800D2180[4] = { 0, 0, 0, 0 }; -s32 D_800D2190[4] = { 0, 0, 0, 0 }; +s32 sVsSavedBombCount[4] = { 0, 0, 0, 0 }; // Set but not used +s32 sVsBombCountFlashTimer[4] = { 0, 0, 0, 0 }; f32 D_800D21A0 = 255.0f; f32 D_800D21A4 = 0.0f; -void func_hud_8008D984(void) { - s32 D_800D21A8[] = { 146, 165, 146, 165 }; - s32 D_800D21B8[] = { 94, 94, 137, 137 }; +void HUD_VS_BombCount_Draw(void) { + s32 bombIconXpos[] = { 146, 165, 146, 165 }; + s32 bombIconYpos[] = { 94, 94, 137, 137 }; - if (gBombCount[gPlayerNum] != D_800D2180[gPlayerNum]) { - D_800D2180[gPlayerNum] = gBombCount[gPlayerNum]; + if (gBombCount[gPlayerNum] != sVsSavedBombCount[gPlayerNum]) { + sVsSavedBombCount[gPlayerNum] = gBombCount[gPlayerNum]; if (gBombCount[gPlayerNum] == 0) { - D_800D2190[gPlayerNum] = 0; + sVsBombCountFlashTimer[gPlayerNum] = 0; } else { - D_800D2190[gPlayerNum] = 30; + sVsBombCountFlashTimer[gPlayerNum] = 30; } } - if (D_800D2190[gPlayerNum] != 0) { - D_800D2190[gPlayerNum]--; + if (sVsBombCountFlashTimer[gPlayerNum] != 0) { + sVsBombCountFlashTimer[gPlayerNum]--; } - if (((D_800D2190[gPlayerNum] & 2) != 0) || ((D_800D2190[gPlayerNum] == 0) && (gBombCount[gPlayerNum] != 0))) { + if (((sVsBombCountFlashTimer[gPlayerNum] & 2) != 0) || + ((sVsBombCountFlashTimer[gPlayerNum] == 0) && (gBombCount[gPlayerNum] != 0))) { RCP_SetupDL_78(); if (gBombCount[gPlayerNum] >= 2) { if (Math_SmoothStepToF(&D_800D21A4, D_800D21A0, 0.4f, 100.0f, 0.1f) == 0.0f) { @@ -3028,38 +3045,38 @@ void func_hud_8008D984(void) { D_800D21A4 = 255.0f; } gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, D_800D21A4); - func_hud_8008D1F0(D_800D21A8[gPlayerNum], D_800D21B8[gPlayerNum], 1.0f, 1.0f); + HUD_VS_BombIcon_Draw(bombIconXpos[gPlayerNum], bombIconYpos[gPlayerNum], 1.0f, 1.0f); } } -void func_hud_8008DC34(void) { - if (gVsMatchStart && (D_versus_80178750 == 0)) { - func_hud_8008D250(); - func_hud_8008D7F4(); - func_hud_8008D4F0(0, 0); - func_hud_8008D31C(); - func_hud_8008D984(); +void HUD_VS_DrawHUD(void) { + if (gVsMatchStart && !gVsMatchOver) { + HUD_VsModePortrait_Draw(); + HUD_VS_PlayerNumber_Draw(); + HUD_BoostGauge_Draw(0, 0); + HUD_VS_ShieldGauge_Draw(); + HUD_VS_BombCount_Draw(); } - if (D_versus_80178750 == 0) { - func_hud_8008CBE4(); + if (!gVsMatchOver) { + HUD_KillCountStars_Update(); } } -void func_hud_8008DCB0(f32 arg0, f32 arg1, s32 arg2, s32 arg3, s32 arg4) { +void HUD_VS_X_Draw(f32 xPos, f32 yPos, s32 r, s32 g, s32 b) { RCP_SetupDL_78(); - gDPSetPrimColor(gMasterDisp++, 0, 0, arg2, arg3, arg4, D_hud_80161708); - TextureRect_CI4(&gMasterDisp, D_1011ED0, D_1011F08, 16, 7, arg0, arg1, 1.0f, 1.0f); + gDPSetPrimColor(gMasterDisp++, 0, 0, r, g, b, D_hud_80161708); + Lib_TextureRect_CI4(&gMasterDisp, aXTex, aXTLUT, 16, 7, xPos, yPos, 1.0f, 1.0f); } -void func_hud_8008DD78(f32 arg0, f32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5) { +void HUD_VS_LivesCount_Draw(f32 xPos, f32 yPos, s32 number, s32 r, s32 g, s32 b) { RCP_SetupDL_78(); - gDPSetPrimColor(gMasterDisp++, 0, 0, arg3, arg4, arg5, D_hud_80161708); + gDPSetPrimColor(gMasterDisp++, 0, 0, r, g, b, D_hud_80161708); - if (arg2 >= 10) { - Graphics_DisplayHUDNumber((s32) arg0 - (func_hud_8008BCBC(arg2) * 8) + 11, arg1, arg2); + if (number >= 10) { + Graphics_DisplayHUDNumber((s32) xPos - (HUD_CountDigits(number) * 8) + 11, yPos, number); } else { - Graphics_DisplayHUDNumber(arg0, arg1, arg2); + Graphics_DisplayHUDNumber(xPos, yPos, number); } } @@ -3091,10 +3108,10 @@ void HUD_DrawBossHealth(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_CI4(&gMasterDisp, D_1011A40, D_1011AB0, 32, 7, temp2, temp3, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, D_1011A40, D_1011AB0, 32, 7, temp2, temp3, 1.0f, 1.0f); RCP_SetupDL(&gMasterDisp, SETUPDL_76); - TextureRect_IA8(&gMasterDisp, D_1002040, 40, 12, sp3C, temp1, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_1002040, 40, 12, sp3C, temp1, 1.0f, 1.0f); if (sp3C >= 25.0f) { Math_SmoothStepToF(&D_801616C4, 0.88f, 0.3f, 0.2f, 0.1f); @@ -3103,7 +3120,7 @@ void HUD_DrawBossHealth(void) { if ((D_801616C4 >= 0.1f) && (sp3C >= 25.0f)) { RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_CI8(&gMasterDisp, D_10129C0, D_1013090, 16, 109, temp4, temp5, 1.0f, D_801616C4); + Lib_TextureRect_CI8(&gMasterDisp, D_10129C0, D_1013090, 16, 109, temp4, temp5, 1.0f, D_801616C4); } RCP_SetupDL(&gMasterDisp, SETUPDL_76); @@ -3126,7 +3143,7 @@ void HUD_DrawBossHealth(void) { temp6 = sp3C + 8.0f; temp7 = 101.0f - ((2200.0f / 69.0f) * D_801616C8) + temp1; if (D_801616C8 > 0.0f) { - TextureRect_RGBA16(&gMasterDisp, D_Tex_800D99F8, 32, 32, temp6, temp7, 0.2f, D_801616C8); + Lib_TextureRect_RGBA16(&gMasterDisp, D_Tex_800D99F8, 32, 32, temp6, temp7, 0.2f, D_801616C8); } } } else { @@ -3157,7 +3174,8 @@ void HUD_DisplayCountdown(f32 xPos, f32 yPos, s32* countdown, f32 scale) { if ((i % 2) != 0) { RCP_SetupDL_78(); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_CI4(&gMasterDisp, D_1011E80, D_1011EC0, 16, 8, (var_fs0 * scale) + xPos, yPos, scale, scale); + Lib_TextureRect_CI4(&gMasterDisp, D_1011E80, D_1011EC0, 16, 8, (var_fs0 * scale) + xPos, yPos, scale, + scale); } else { RCP_SetupDL_76(); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); @@ -3169,7 +3187,7 @@ void HUD_DisplayCountdown(f32 xPos, f32 yPos, s32* countdown, f32 scale) { } void HUD_DrawCountdown(s32* countdown, f32 scale) { - //! FAKE: + //! FAKE: Weird control flow if (1) {} if (gPlayState != PLAY_PAUSE) { @@ -3197,83 +3215,83 @@ void HUD_DrawCountdown(s32* countdown, f32 scale) { } } -void func_hud_8008E5E8(void) { +void HUD_Radar(void) { if (gVersusMode) { - func_hud_8008DC34(); + HUD_VS_DrawHUD(); } - func_hud_8008A4DC(); + HUD_RadarMarks_Update(); } -void func_hud_8008E620(f32 arg0, f32 arg1) { +void HUD_Hitpoints_Update(f32 xPos, f32 yPos) { f32 r; f32 g; f32 b; - s32 ret; + bool medalStatus; switch (gCurrentLevel) { case LEVEL_CORNERIA: - ret = Play_CheckMedalStatus(150); + medalStatus = Play_CheckMedalStatus(150); break; case LEVEL_METEO: - ret = Play_CheckMedalStatus(200); + medalStatus = Play_CheckMedalStatus(200); break; case LEVEL_FORTUNA: - ret = Play_CheckMedalStatus(50); + medalStatus = Play_CheckMedalStatus(50); break; case LEVEL_SECTOR_X: - ret = Play_CheckMedalStatus(150); + medalStatus = Play_CheckMedalStatus(150); break; case LEVEL_TITANIA: - ret = Play_CheckMedalStatus(150); + medalStatus = Play_CheckMedalStatus(150); break; case LEVEL_BOLSE: - ret = Play_CheckMedalStatus(150); + medalStatus = Play_CheckMedalStatus(150); break; case LEVEL_SECTOR_Y: - ret = Play_CheckMedalStatus(150); + medalStatus = Play_CheckMedalStatus(150); break; case LEVEL_KATINA: - ret = Play_CheckMedalStatus(150); + medalStatus = Play_CheckMedalStatus(150); break; case LEVEL_SOLAR: - ret = Play_CheckMedalStatus(100); + medalStatus = Play_CheckMedalStatus(100); break; case LEVEL_MACBETH: - ret = Play_CheckMedalStatus(150); + medalStatus = Play_CheckMedalStatus(150); break; case LEVEL_AQUAS: - ret = Play_CheckMedalStatus(150); + medalStatus = Play_CheckMedalStatus(150); break; case LEVEL_ZONESS: - ret = Play_CheckMedalStatus(250); + medalStatus = Play_CheckMedalStatus(250); break; case LEVEL_SECTOR_Z: - ret = Play_CheckMedalStatus(100); + medalStatus = Play_CheckMedalStatus(100); break; case LEVEL_AREA_6: - ret = Play_CheckMedalStatus(300); + medalStatus = Play_CheckMedalStatus(300); break; case LEVEL_VENOM_ANDROSS: case LEVEL_VENOM_2: - ret = Play_CheckMedalStatus(200); + medalStatus = Play_CheckMedalStatus(200); break; default: - ret = false; + medalStatus = false; break; } @@ -3281,9 +3299,9 @@ void func_hud_8008E620(f32 arg0, f32 arg1) { gMedalFlashTimer--; } - if (ret != gMedalStatus) { + if (medalStatus != gMedalStatus) { gMedalFlashTimer = 30; - gMedalStatus = ret; + gMedalStatus = medalStatus; } if ((gMedalFlashTimer % 2) != 0) { @@ -3291,7 +3309,7 @@ void func_hud_8008E620(f32 arg0, f32 arg1) { g = 255; b = 255; } else { - if (ret != 0) { + if (medalStatus) { r = 200; g = 100; b = 50; @@ -3301,121 +3319,123 @@ void func_hud_8008E620(f32 arg0, f32 arg1) { b = 200; } } + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, r, g, b, 255); - func_hud_80094D20(arg0, arg1); + HUD_Hitpoints_Draw(xPos, yPos); } -void func_hud_8008E9EC(f32 arg0, f32 arg1) { - func_hud_8008E620(arg0, arg1); - func_hud_8008B734(); +void HUD_Shield_GoldRings_HitPoints(f32 xPos, f32 yPos) { + HUD_Hitpoints_Update(xPos, yPos); + HUD_PlayerShield_GoldRings(); } -void func_hud_8008EA14(f32 x, f32 y) { +void HUD_BombCounter_Draw(f32 x, f32 y) { s32 i; s32 sp68; f32 temp_fv0; f32 temp; + // Max bombs if (gBombCount[gPlayerNum] > 9) { gBombCount[gPlayerNum] = 9; } - switch (D_800D19F8) { - case 0: - D_800D19F4 = gBombCount[gPlayerNum]; + switch (sBombCounterState) { + case BOMB_COUNTER_INIT: + sHudBombCount = gBombCount[gPlayerNum]; sp68 = 0; - D_800D19F8 = 1; + sBombCounterState = BOMB_COUNTER_STATE_1; D_80161770 = D_80161774 = D_80161778 = 255.0f; D_8016177C = D_80161780 = D_80161784 = 255.0f; break; - case 1: - temp_fv0 = gBombCount[gPlayerNum] - D_800D19F4; + case BOMB_COUNTER_STATE_1: + temp_fv0 = gBombCount[gPlayerNum] - sHudBombCount; if (temp_fv0 > 0.0f) { - D_800D19F4++; - if (D_800D19F4 > 5) { + sHudBombCount++; + if (sHudBombCount > 5) { sp68 = 0; break; } - if (D_800D19F4 == 5) { + if (sHudBombCount == 5) { D_800D19F0 = 0.0f; sp68 = 4; - D_800D19F8 = 6; + sBombCounterState = BOMB_COUNTER_STATE_6; break; } else { D_800D19F0 = 0.0f; sp68 = 3; - D_800D19F8 = 5; + sBombCounterState = BOMB_COUNTER_STATE_5; } break; } if (temp_fv0 < 0.0f) { - D_800D19F8 = 2; + sBombCounterState = BOMB_COUNTER_STATE_2; } sp68 = 0; break; - case 2: - D_800D19F4--; + case BOMB_COUNTER_STATE_2: + sHudBombCount--; sp68 = 0; - D_800D19F8 = 1; - if (D_800D19F4 <= 3) { + sBombCounterState = BOMB_COUNTER_STATE_1; + if (sHudBombCount <= 3) { D_800D19F0 = 0.0f; sp68 = 2; - D_800D19F8 = 4; + sBombCounterState = BOMB_COUNTER_STATE_4; break; } - if (D_800D19F4 == 4) { + if (sHudBombCount == 4) { D_800D19F0 = 0.0f; sp68 = 1; - D_800D19F8 = 3; + sBombCounterState = BOMB_COUNTER_STATE_3; break; } break; - case 3: + case BOMB_COUNTER_STATE_3: sp68 = 1; if (Math_SmoothStepToF(&D_800D19F0, 10.0f, 0.3f, 10.0f, 0.1f) == 0.0f) { - D_800D19F8 = 1; + sBombCounterState = BOMB_COUNTER_STATE_1; D_800D19F0 = 10.0f; sp68 = 1; } break; - case 4: + case BOMB_COUNTER_STATE_4: sp68 = 2; if (Math_SmoothStepToF(&D_800D19F0, 10.0f, 0.3f, 10.0f, 0.1f) == 0.0f) { - D_800D19F8 = 1; + sBombCounterState = BOMB_COUNTER_STATE_1; D_800D19F0 = 10.0f; sp68 = 2; } break; - case 5: + case BOMB_COUNTER_STATE_5: sp68 = 3; - if (Math_SmoothStepToF(&D_800D19F0, 20.0f + ((D_800D19F4 - 1) * 10), 0.3f, 10.0f, 0.001f) == 0.0f) { - D_800D19F8 = 1; - D_800D19F0 = 20.0f + ((D_800D19F4 - 1) * 10); + if (Math_SmoothStepToF(&D_800D19F0, 20.0f + ((sHudBombCount - 1) * 10), 0.3f, 10.0f, 0.001f) == 0.0f) { + sBombCounterState = BOMB_COUNTER_STATE_1; + D_800D19F0 = 20.0f + ((sHudBombCount - 1) * 10); sp68 = 3; } break; - case 6: + case BOMB_COUNTER_STATE_6: sp68 = 4; if (Math_SmoothStepToF(&D_800D19F0, 10.0f, 0.3f, 10.0f, 0.1f) == 0.0f) { - D_800D19F8 = 7; + sBombCounterState = BOMB_COUNTER_STATE_7; D_800D19F0 = 0.0f; sp68 = 5; } break; - case 7: + case BOMB_COUNTER_STATE_7: sp68 = 5; if (0.0f == Math_SmoothStepToF(&D_800D19F0, 12.0f, 0.3f, 10.0f, 5.0f)) { - D_800D19F8 = 1; + sBombCounterState = BOMB_COUNTER_STATE_1; D_800D19F0 = 0.0f; sp68 = 0; } @@ -3445,86 +3465,96 @@ void func_hud_8008EA14(f32 x, f32 y) { switch (sp68) { case 0: - if (D_800D19F4 >= 5) { - TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x, y, 1.0f, 1.0f); - func_hud_8008DCB0(x + 14.0f, y + 2.0f, D_8016177C, D_80161780, D_80161784); - func_hud_8008DD78(x + 29.0f, y + 1.0f, D_800D19F4, D_8016177C, D_80161780, D_80161784); + if (sHudBombCount >= 5) { + Lib_TextureRect_CI4(&gMasterDisp, aVsBombIconTex, aVsBombIconTLUT, 16, 16, x, y, 1.0f, 1.0f); + HUD_VS_X_Draw(x + 14.0f, y + 2.0f, D_8016177C, D_80161780, D_80161784); + HUD_VS_LivesCount_Draw(x + 29.0f, y + 1.0f, sHudBombCount, D_8016177C, D_80161780, D_80161784); } else { - for (i = (D_800D19F4 - 1); i >= 0; i--) { - TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + (30.0f - (i * 10)), y, 1.0f, 1.0f); + for (i = (sHudBombCount - 1); i >= 0; i--) { + Lib_TextureRect_CI4(&gMasterDisp, aVsBombIconTex, aVsBombIconTLUT, 16, 16, x + (30.0f - (i * 10)), + y, 1.0f, 1.0f); } } break; case 1: - TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + (D_800D19F0 * 3.0f), y, 1.0f, 1.0f); - TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + (D_800D19F0 * 2.0f), y, 1.0f, 1.0f); - TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + (D_800D19F0 * 1.0f), y, 1.0f, 1.0f); - TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + (D_800D19F0 * 0.0f), y, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, aVsBombIconTex, aVsBombIconTLUT, 16, 16, x + (D_800D19F0 * 3.0f), y, 1.0f, + 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, aVsBombIconTex, aVsBombIconTLUT, 16, 16, x + (D_800D19F0 * 2.0f), y, 1.0f, + 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, aVsBombIconTex, aVsBombIconTLUT, 16, 16, x + (D_800D19F0 * 1.0f), y, 1.0f, + 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, aVsBombIconTex, aVsBombIconTLUT, 16, 16, x + (D_800D19F0 * 0.0f), y, 1.0f, + 1.0f); break; case 2: - for (i = D_800D19F4; i >= 0; i--) { + for (i = sHudBombCount; i >= 0; i--) { if (i == 0) { temp = D_800D19F0 * 4.0f; } else { temp = D_800D19F0; } - TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + (30.0f - (i * 10)) + temp, y, 1.0f, - 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, aVsBombIconTex, aVsBombIconTLUT, 16, 16, + x + (30.0f - (i * 10)) + temp, y, 1.0f, 1.0f); } break; case 3: - for (i = (D_800D19F4 - 2); i >= 0; i--) { - TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + (30.0f - (i * 10)), y, 1.0f, 1.0f); + for (i = (sHudBombCount - 2); i >= 0; i--) { + Lib_TextureRect_CI4(&gMasterDisp, aVsBombIconTex, aVsBombIconTLUT, 16, 16, x + (30.0f - (i * 10)), y, + 1.0f, 1.0f); } - TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + 50.0f - D_800D19F0, y, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, aVsBombIconTex, aVsBombIconTLUT, 16, 16, x + 50.0f - D_800D19F0, y, 1.0f, + 1.0f); break; case 4: - TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + 30.0f - (D_800D19F0 * 3.0f), y, 1.0f, 1.0f); - TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + 20.0f - (D_800D19F0 * 2.0f), y, 1.0f, 1.0f); - TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + 10.0f - (D_800D19F0 * 1.0f), y, 1.0f, 1.0f); - TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x, y, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, aVsBombIconTex, aVsBombIconTLUT, 16, 16, x + 30.0f - (D_800D19F0 * 3.0f), + y, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, aVsBombIconTex, aVsBombIconTLUT, 16, 16, x + 20.0f - (D_800D19F0 * 2.0f), + y, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, aVsBombIconTex, aVsBombIconTLUT, 16, 16, x + 10.0f - (D_800D19F0 * 1.0f), + y, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, aVsBombIconTex, aVsBombIconTLUT, 16, 16, x, y, 1.0f, 1.0f); break; case 5: - func_hud_8008DCB0(x + D_800D19F0, y + 2.0f, D_8016177C, D_80161780, D_80161784); - func_hud_8008DD78(x + 15.0f + D_800D19F0, y + 1.0f, D_800D19F4, D_8016177C, D_80161780, D_80161784); - TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x, y, 1.0f, 1.0f); + HUD_VS_X_Draw(x + D_800D19F0, y + 2.0f, D_8016177C, D_80161780, D_80161784); + HUD_VS_LivesCount_Draw(x + 15.0f + D_800D19F0, y + 1.0f, sHudBombCount, D_8016177C, D_80161780, D_80161784); + Lib_TextureRect_CI4(&gMasterDisp, aVsBombIconTex, aVsBombIconTLUT, 16, 16, x, y, 1.0f, 1.0f); break; case 6: RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_CI4(&gMasterDisp, D_blue_marine_3000090, D_blue_marine_3000120, 32, 9, x + 1.0f, y, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, D_blue_marine_3000090, D_blue_marine_3000120, 32, 9, x + 1.0f, y, 1.0f, + 1.0f); break; } } -void func_hud_8008F94C(void) { - func_hud_8008E5E8(); +void HUD_VS_Radar(void) { + HUD_Radar(); } -void func_hud_8008F96C(void) { +void HUD_SinglePlayer(void) { if (gPlayState != PLAY_PAUSE) { - func_hud_8008E5E8(); + HUD_Radar(); } RCP_SetupDL_36(); - if ((gLevelMode != LEVELMODE_TURRET) && (D_hud_80161708 != 0)) { - func_hud_8008D4F0(246.0f, 28.0f); - func_hud_8008EA14(250.0f, 38.0f); + HUD_BoostGauge_Draw(246.0f, 28.0f); + HUD_BombCounter_Draw(250.0f, 38.0f); } - func_hud_8008B2A4(); + HUD_IncomingMsg(); if (D_hud_80161708 != 0) { - func_hud_8008E9EC(24.0f, 30.0f); + HUD_Shield_GoldRings_HitPoints(24.0f, 30.0f); if (gCurrentLevel != LEVEL_TRAINING) { - func_hud_80087530(248.0f, 11.0f, gLifeCount[gPlayerNum]); + HUD_LivesCount2_Draw(248.0f, 11.0f, gLifeCount[gPlayerNum]); } } @@ -3542,14 +3572,14 @@ void HUD_Draw(void) { for (i = 0; i < 10; i++) { D_801617E8[i] = 0; D_801617C0[i] = 0; - D_80161838[i] = 0; - D_80161810[i] = 0; + sPauseScreenTimer[i] = 0; + sPauseScreenIwork[i] = 0; } for (i = 0; i < 20; i++) { D_80161900[i] = 0; - D_80161860[i] = 0; - D_801618B0[i] = 0.0f; + sGoldRingsIwork[i] = 0; + sGoldRingsFwork[i] = 0.0f; } if (gGoldRingCount[0] != 0) { @@ -3560,7 +3590,7 @@ void HUD_Draw(void) { for (i = 0; i < goldRings; i++) { if (goldRings != 3) { - D_80161860[i + 1] = 1; + sGoldRingsIwork[i + 1] = 1; } } gGoldRingCount[1] = gGoldRingCount[0]; @@ -3568,7 +3598,7 @@ void HUD_Draw(void) { gGoldRingCount[1] = 0; } - D_800D19F8 = 0; + sBombCounterState = BOMB_COUNTER_INIT; D_80161788 = 0; D_8016178C = 0; gMedalStatus = 0; @@ -3639,15 +3669,15 @@ void HUD_Draw(void) { } if (gCamCount != 1) { - func_hud_8008F94C(); + HUD_VS_Radar(); } else { - func_hud_8008F96C(); + HUD_SinglePlayer(); } - func_hud_8008BC80(); - func_hud_80088970(); + HUD_RadioDamage(); + HUD_PauseScreen_Update(); } -void HUD_FoBase_Draw(Boss* boss) { +void FoBase_Draw(Boss* boss) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gSPDisplayList(gMasterDisp++, aFoBaseDL2); RCP_SetupDL_34(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); @@ -3658,7 +3688,7 @@ void HUD_FoBase_Draw(Boss* boss) { gDPSetTextureFilter(gMasterDisp++, G_TF_BILERP); } -void func_hud_8008FFF0(FoBase* this, s32 arg1) { +void FoBase_BurnEffects(FoBase* this, s32 timer) { Vec3s D_800D21C8[] = { { -385, 54, 233 }, { -324, 148, 193 }, { -267, 186, 136 }, { -128, 430, 180 }, { -231, 584, 140 }, { -431, 551, -120 }, { -285, 516, -32 }, { -285, 601, 18 }, { 300, 596, 18 }, { 300, 529, -65 }, @@ -3673,8 +3703,8 @@ void func_hud_8008FFF0(FoBase* this, s32 arg1) { f32 temp; s32 temp2; - if (arg1 >= 7000) { - temp2 = arg1 - 7000; + if (timer >= 7000) { + temp2 = timer - 7000; if (temp2 > 1596) { temp2 = 1596; @@ -3700,14 +3730,14 @@ void func_hud_8008FFF0(FoBase* this, s32 arg1) { } } -s32 HUD_FoBase_ExplodeCs(FoBase* this) { +s32 FoBase_ExplodeCs(FoBase* this) { Vec3f dest; Vec3f src; Player* player; s32 csState = 0; if (this->swork[0] == 1) { - func_hud_8008FFF0(this, 8596); + FoBase_BurnEffects(this, 8596); player = &gPlayer[0]; csState = 1; @@ -3808,7 +3838,7 @@ s32 HUD_FoBase_ExplodeCs(FoBase* this) { return csState; } -void HUD_FoBase_Update(FoBase* this) { +void FoBase_Update(FoBase* this) { switch (this->state) { case 0: if ((this->fwork[1] == 255.0f) && (this->fwork[2] == 212.0f)) { @@ -3829,13 +3859,13 @@ void HUD_FoBase_Update(FoBase* this) { } break; } - func_hud_8008FFF0(this, gAllRangeEventTimer); + FoBase_BurnEffects(this, gAllRangeEventTimer); } -bool func_hud_8009092C(ActorTeamBoss* this) { +bool ActorTeamBoss_SetTarget(ActorTeamBoss* this) { bool ret = false; Boss* boss; - s32 i = 0; + s32 i; if (this->aiIndex != 0) { return true; @@ -3858,7 +3888,7 @@ bool func_hud_8009092C(ActorTeamBoss* this) { return ret; } -bool func_hud_80090A00(ActorTeamBoss* this) { +bool ActorTeamBoss_SlippyEscapeFromTiBoss(ActorTeamBoss* this) { switch (this->iwork[5]) { case 0: this->fwork[8] = 0.0f; @@ -3932,10 +3962,10 @@ bool func_hud_80090A00(ActorTeamBoss* this) { return false; } -bool func_hud_80090CCC(ActorTeamBoss* this) { +bool ActorTeamBoss_Attack(ActorTeamBoss* this) { bool ret = false; - if (func_hud_8009092C(this)) { + if (ActorTeamBoss_SetTarget(this)) { this->fwork[6] = gBosses[this->aiIndex].obj.pos.z; this->fwork[5] = gBosses[this->aiIndex].obj.pos.y; this->fwork[4] = gBosses[this->aiIndex].obj.pos.x; @@ -3974,11 +4004,11 @@ bool func_hud_80090CCC(ActorTeamBoss* this) { return ret; } -s32 func_hud_80090E8C(ActorTeamBoss* this) { +s32 ActorTeamBoss_FlyAroundAllRange(ActorTeamBoss* this) { f32 x; f32 y; f32 z; - f32 var_fv1_2; + f32 range; if (this->timer_0BC == 0) { if (gLevelType == LEVELTYPE_SPACE) { @@ -4000,13 +4030,13 @@ s32 func_hud_80090E8C(ActorTeamBoss* this) { } if (this->aiType == AI360_FALCO) { - var_fv1_2 = 3000.0f; + range = 3000.0f; } else { - var_fv1_2 = 5000.0f; + range = 5000.0f; } - if ((var_fv1_2 < fabsf(this->obj.pos.x - gBosses[0].obj.pos.x)) && - (var_fv1_2 < fabsf(this->obj.pos.z - gBosses[0].obj.pos.z))) { + if ((range < fabsf(this->obj.pos.x - gBosses[0].obj.pos.x)) && + (range < fabsf(this->obj.pos.z - gBosses[0].obj.pos.z))) { this->state = 0; } @@ -4017,7 +4047,7 @@ s32 func_hud_80090E8C(ActorTeamBoss* this) { return false; } -bool func_hud_800910C0(ActorTeamBoss* this) { +bool ActorTeamBoss_FlyAroundOnRails(ActorTeamBoss* this) { f32 var_fv1; if (this->timer_0BC == 0) { @@ -4048,15 +4078,15 @@ bool func_hud_800910C0(ActorTeamBoss* this) { return false; } -void func_hud_80091254(ActorTeamBoss* this) { +void ActorTeamBoss_FlyAround(ActorTeamBoss* this) { if (gLevelMode == LEVELMODE_ALL_RANGE) { - func_hud_80090E8C(this); + ActorTeamBoss_FlyAroundAllRange(this); } else { - func_hud_800910C0(this); + ActorTeamBoss_FlyAroundOnRails(this); } } -bool func_hud_80091298(ActorTeamBoss* this) { +bool ActorTeamBoss_FlyAlongPlayer(ActorTeamBoss* this) { this->fwork[1] = gPlayer[0].baseSpeed + 10.0f; this->fwork[3] = 3.6f; this->fwork[4] = gPlayer[0].pos.x + ((f32) (this->aiType - 2) * 700.0f); @@ -4070,7 +4100,7 @@ bool func_hud_80091298(ActorTeamBoss* this) { return false; } -bool func_hud_80091368(ActorTeamBoss* this) { +bool ActorTeamBoss_Retreat(ActorTeamBoss* this) { switch (this->iwork[5]) { case 0: this->fwork[5] = 20000.0f; @@ -4113,26 +4143,26 @@ bool func_hud_80091368(ActorTeamBoss* this) { return false; } -void func_hud_800914FC(ActorTeamBoss* this) { +void ActorTeamBoss_SetAction(ActorTeamBoss* this) { switch (this->state) { case 0: - if (!func_hud_80090CCC(this)) { + if (!ActorTeamBoss_Attack(this)) { break; } case 1: - func_hud_80091254(this); + ActorTeamBoss_FlyAround(this); break; case 2: - func_hud_80091298(this); + ActorTeamBoss_FlyAlongPlayer(this); break; case 3: - func_hud_80091368(this); + ActorTeamBoss_Retreat(this); break; case 7: - func_hud_80090A00(this); + ActorTeamBoss_SlippyEscapeFromTiBoss(this); break; } @@ -4149,7 +4179,7 @@ void func_hud_800914FC(ActorTeamBoss* this) { } } -bool func_hud_800915FC(ActorTeamBoss* this) { +bool ActorTeamBoss_ObstacleCheck(ActorTeamBoss* this) { s32 i; f32 y; Vec3f vec; @@ -4203,7 +4233,7 @@ bool func_hud_800915FC(ActorTeamBoss* this) { return ret; } -bool func_hud_80091864(ActorTeamBoss* this) { +bool ActorTeamBoss_SetFlyingAngle(ActorTeamBoss* this) { f32 sp44; f32 sp40; f32 sp3C; @@ -4220,7 +4250,7 @@ bool func_hud_80091864(ActorTeamBoss* this) { sp40 = Math_RadToDeg(Math_Atan2F(x, z)); sp44 = Math_RadToDeg(Math_Atan2F(y, sqrtf(SQ(x) + SQ(z)))); - if ((func_hud_800915FC(this) != 0) && (this->iwork[4] == 0)) { + if (ActorTeamBoss_ObstacleCheck(this) && (this->iwork[4] == 0)) { sp44 += 40.0f; if (sp44 >= 360.0f) { sp44 -= 360.0f; @@ -4262,7 +4292,7 @@ bool func_hud_80091864(ActorTeamBoss* this) { return false; } -bool func_hud_80091B90(ActorTeamBoss* this) { +bool ActorTeamBoss_SetFlyingSpeed(ActorTeamBoss* this) { Vec3f vec; this->obj.rot.x = -this->rot_0F4.x; @@ -4290,7 +4320,7 @@ bool func_hud_80091B90(ActorTeamBoss* this) { return false; } -bool func_hud_80091CF8(ActorTeamBoss* this) { +bool ActorTeamBoss_SetBoost(ActorTeamBoss* this) { if (this->iwork[1] != 0) { if (this->fwork[10] < 0.1f) { this->fwork[10] = 20.0f; @@ -4309,7 +4339,7 @@ bool func_hud_80091CF8(ActorTeamBoss* this) { return false; } -bool func_hud_80091DF4(ActorTeamBoss* this) { +bool ActorTeamBoss_Shoot(ActorTeamBoss* this) { Vec3f src; Vec3f dest; @@ -4326,14 +4356,14 @@ bool func_hud_80091DF4(ActorTeamBoss* this) { return false; } -bool func_hud_80091F00(ActorTeamBoss* this) { - u8 temp_v0 = this->dmgType; - Vec3f sp40; - Vec3f sp34; +bool ActorTeamBoss_HandleDamage(ActorTeamBoss* this) { + u8 prevDmgType = this->dmgType; + Vec3f src; + Vec3f dest; this->dmgType = DMG_NONE; - if ((this->state == 3) || (temp_v0 == DMG_EXPLOSION)) { + if ((this->state == 3) || (prevDmgType == DMG_EXPLOSION)) { return false; } @@ -4344,23 +4374,25 @@ bool func_hud_80091F00(ActorTeamBoss* this) { this->timer_0C6 = 20; AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, this->sfxSource, 4); + func_effect_8007D10C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1.5f); + Matrix_RotateY(gCalcMatrix, this->rot_0F4.y * M_DTOR, MTXF_NEW); if (Rand_ZeroOne() < 0.5f) { - sp40.x = -20.0f; + src.x = -20.0f; } else { - sp40.x = 20.0f; + src.x = 20.0f; } - sp40.y = RAND_FLOAT_CENTERED(20.0f); - sp40.z = 0.0f; + src.y = RAND_FLOAT_CENTERED(20.0f); + src.z = 0.0f; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp40, &sp34); + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - this->fwork[13] = sp34.x; - this->fwork[14] = sp34.y; - this->fwork[12] = sp34.z; + this->fwork[13] = dest.x; + this->fwork[14] = dest.y; + this->fwork[12] = dest.z; gTeamShields[this->aiType] = this->health; @@ -4414,8 +4446,8 @@ bool func_hud_80091F00(ActorTeamBoss* this) { return false; } -void func_hud_80092244(ActorTeamBoss* this) { - gRadarMarks[this->index].status = 1; +void ActorTeamBoss_Radarmarks_Init(ActorTeamBoss* this) { + gRadarMarks[this->index].enabled = true; gRadarMarks[this->index].type = this->aiType; gRadarMarks[this->index].pos.x = this->obj.pos.x; gRadarMarks[this->index].pos.y = this->obj.pos.y; @@ -4423,7 +4455,7 @@ void func_hud_80092244(ActorTeamBoss* this) { gRadarMarks[this->index].yRot = this->rot_0F4.y + 180.0f; } -void func_hud_800922F4(ActorTeamBoss* this) { +void ActorTeamBoss_DmgEffect(ActorTeamBoss* this) { s32 mask; if ((gTeamShields[this->aiType] < 64) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) { @@ -4451,7 +4483,7 @@ void func_hud_800922F4(ActorTeamBoss* this) { } } -bool func_hud_800924E0(ActorTeamBoss* this) { +bool ActorTeamBoss_SomerSault(ActorTeamBoss* this) { Vec3f src; Vec3f dest; f32 var_fv0; @@ -4468,7 +4500,6 @@ bool func_hud_800924E0(ActorTeamBoss* this) { } var_fv0 = 60.0f; - if (this->fwork[19] > 240.0f) { var_fv0 = -50.0f; } @@ -4517,7 +4548,7 @@ bool func_hud_800924E0(ActorTeamBoss* this) { return ret; } -bool func_hud_800927A0(ActorTeamBoss* this) { +bool ActorTeamBoss_UTurn(ActorTeamBoss* this) { Vec3f src; Vec3f dest; f32 sp54; @@ -4685,19 +4716,19 @@ void ActorTeamBoss_Init(ActorTeamBoss* this) { } void ActorTeamBoss_Update(ActorTeamBoss* this) { - f32 var_fv1; + f32 range; this->health = gTeamShields[this->aiType]; switch (this->work_048) { case 0: - func_hud_800914FC(this); - func_hud_80091864(this); - func_hud_80091B90(this); - func_hud_80091DF4(this); + ActorTeamBoss_SetAction(this); + ActorTeamBoss_SetFlyingAngle(this); + ActorTeamBoss_SetFlyingSpeed(this); + ActorTeamBoss_Shoot(this); if (this->dmgType != DMG_NONE) { - func_hud_80091F00(this); + ActorTeamBoss_HandleDamage(this); } if (this->state == 3) { @@ -4706,19 +4737,19 @@ void ActorTeamBoss_Update(ActorTeamBoss* this) { switch (gCurrentLevel) { case LEVEL_SECTOR_Z: - var_fv1 = 20000.0f; + range = 20000.0f; break; case LEVEL_CORNERIA: - var_fv1 = 8000.0f; + range = 8000.0f; break; case LEVEL_BOLSE: - var_fv1 = 10000.0f; + range = 10000.0f; break; default: - var_fv1 = 12500.0f; + range = 12500.0f; break; } @@ -4729,7 +4760,7 @@ void ActorTeamBoss_Update(ActorTeamBoss* this) { } if ((gLevelMode == LEVELMODE_ALL_RANGE) && - (fabsf(this->obj.pos.x > var_fv1) || fabsf(this->obj.pos.z > var_fv1)) && + (fabsf(this->obj.pos.x > range) || fabsf(this->obj.pos.z > range)) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) { this->work_048 = 2; this->work_04A = 1; @@ -4737,14 +4768,14 @@ void ActorTeamBoss_Update(ActorTeamBoss* this) { break; case 1: - if (func_hud_800924E0(this) != 0) { + if (ActorTeamBoss_SomerSault(this) != 0) { this->work_048 = 0; this->iwork[9] = RAND_INT(30.0f) + 90; } break; case 2: - if (func_hud_800927A0(this) != 0) { + if (ActorTeamBoss_UTurn(this) != 0) { this->work_04A = 0; this->work_048 = this->work_04A; this->iwork[9] = RAND_INT(30.0f) + 90; @@ -4752,9 +4783,9 @@ void ActorTeamBoss_Update(ActorTeamBoss* this) { break; } - func_hud_80091CF8(this); - func_hud_800922F4(this); - func_hud_80092244(this); + ActorTeamBoss_SetBoost(this); + ActorTeamBoss_DmgEffect(this); + ActorTeamBoss_Radarmarks_Init(this); if (this->iwork[9] != 0) { this->iwork[9]--; @@ -4762,7 +4793,7 @@ void ActorTeamBoss_Update(ActorTeamBoss* this) { this->iwork[10] = 0; } -void func_hud_80093164(ActorCutscene* this) { +void Aquas_CsIntroActors_Update(ActorCutscene* this) { Vec3f src; Vec3f dest; Player* player = &gPlayer[0]; @@ -4807,7 +4838,7 @@ void func_hud_80093164(ActorCutscene* this) { this->obj.rot.z = -this->rot_0F4.z; } -void func_hud_80093310(void) { +void Aquas_CsIntroGreatFox_Init(void) { ActorCutscene* actor = &gActors[0]; Actor_Initialize(actor); @@ -4821,7 +4852,7 @@ void func_hud_80093310(void) { AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); } -void func_hud_800933D8(f32 x, f32 y, f32 z, f32 arg3) { +void Aquas_Effect363_Spawn(f32 x, f32 y, f32 z, f32 arg3) { s32 i; Effect* effect = &gEffects[ARRAY_COUNT(gEffects) - 1]; Player* player = gPlayer; @@ -4881,7 +4912,7 @@ f32 D_800D22CC = 260.0f; s32 D_800D22D0 = 50; s32 D_800D22D4 = 2; -void HUD_AquasStart(Player* player) { +void Aquas_CsLevelStart(Player* player) { Vec3f D_800D22D8[] = { { -1730.0f, 1600.0f, -6690.0f }, { -830.0f, 1600.0f, -7380.0f }, { 0.0f, 1600.0f, -7380.0f } }; @@ -4913,7 +4944,7 @@ void HUD_AquasStart(Player* player) { switch (player->csState) { case 0: - func_hud_80093310(); + Aquas_CsIntroGreatFox_Init(); gCsFrameCount = 0; gDrawBackdrop = 1; gAqDrawMode = 1; @@ -4964,7 +4995,7 @@ void HUD_AquasStart(Player* player) { y = dest.y; z = dest.z; - func_hud_800933D8(x, y, z, 20.0f); + Aquas_Effect363_Spawn(x, y, z, 20.0f); i = (i + 1) % 32; } @@ -4983,7 +5014,7 @@ void HUD_AquasStart(Player* player) { y = dest.y; z = dest.z; - func_hud_800933D8(x, y, z, 20.0f); + Aquas_Effect363_Spawn(x, y, z, 20.0f); i = (i + 1) % 32; } @@ -5163,10 +5194,10 @@ void HUD_AquasStart(Player* player) { if ((player->unk_018 > -200.0f) && (D_ctx_80177A10[8] < 6)) { if (D_ctx_80177A10[8] < 2) { - func_hud_800933D8(player->pos.x, player->pos.y - 400.0f, player->pos.z, 20.0f); + Aquas_Effect363_Spawn(player->pos.x, player->pos.y - 400.0f, player->pos.z, 20.0f); } if (D_ctx_80177A10[8] >= 2) { - func_hud_800933D8(player->pos.x, player->pos.y, player->pos.z, 10.0f); + Aquas_Effect363_Spawn(player->pos.x, player->pos.y, player->pos.z, 10.0f); } D_ctx_80177A10[8]++; } @@ -5249,7 +5280,7 @@ void HUD_AquasStart(Player* player) { gCsCamAtZ = player->pos.z + (gPathProgress - 1.0f); if (((player->csTimer % 2) == 0) && (player->csTimer > 962)) { - func_hud_800933D8(player->pos.x, player->pos.y, player->pos.z + 50.0f, 20.0f); + Aquas_Effect363_Spawn(player->pos.x, player->pos.y, player->pos.z + 50.0f, 20.0f); } if (player->csTimer <= 900) { @@ -5308,7 +5339,7 @@ f32 D_800D24C0[] = { 128.0f, 128.0f, 255.0f, 128.0f }; s32 D_800D24C8[] = { 0, 900 }; f32 D_800D24CC = 0.02f; -void Hud_Effect363_Update(Effect363* this) { +void Aquas_Effect363_Update(Effect363* this) { Player* player = &gPlayer[0]; if ((player->state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && (gCurrentLevel == LEVEL_AQUAS) && (player->csState < 2)) { @@ -5365,7 +5396,7 @@ void Hud_Effect363_Update(Effect363* this) { } } -void Hud_Effect363_Draw(Effect363* this) { +void Aquas_Effect363_Draw(Effect363* this) { if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && (gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].csState < 2)) { RCP_SetupDL(&gMasterDisp, SETUPDL_68); @@ -5385,7 +5416,7 @@ void stub_80094D10(void) { void stub_80094D18(void) { } -void func_hud_80094D20(f32 x, f32 y) { +void HUD_Hitpoints_Draw(f32 x, f32 y) { u8* D_800D24DC[] = { aLargeText_0, aLargeText_1, aLargeText_2, aLargeText_3, aLargeText_4, aLargeText_5, aLargeText_6, aLargeText_7, aLargeText_8, aLargeText_9 }; s32 D_800D2504[] = { 100, 10, 1 }; @@ -5455,13 +5486,13 @@ void func_hud_80094D20(f32 x, f32 y) { } if (xScale != 0.0f) { - TextureRect_IA8(&gMasterDisp, D_800D24DC[temp], 16, 15, x1, y1, xScale, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_800D24DC[temp], 16, 15, x1, y1, xScale, 1.0f); } boolTemp = true; } if (!boolTemp && (xScale != 0.0f)) { - TextureRect_IA8(&gMasterDisp, D_800D24DC[0], 16, 15, x1, y1, xScale, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_800D24DC[0], 16, 15, x1, y1, xScale, 1.0f); } x += 13.0f; @@ -5506,7 +5537,7 @@ void func_hud_80094D20(f32 x, f32 y) { } if (xScale != 0.0f) { - TextureRect_IA8(&gMasterDisp, D_800D24DC[temp3], 16, 15, x1, y1, xScale, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_800D24DC[temp3], 16, 15, x1, y1, xScale, 1.0f); } if ((gHitCount != gDisplayedHitCount) && (D_hud_80161720[0] == 0.0f) && (D_hud_80161720[1] == 0.0f) && @@ -5520,16 +5551,16 @@ void func_hud_80094D20(f32 x, f32 y) { } } -void func_hud_80095350(ActorCutscene* this) { +void Aquas_Camera_Setup(ActorCutscene* this) { Actor_Initialize(this); this->obj.status = OBJ_ACTIVE; this->obj.id = OBJ_ACTOR_CUTSCENE; - this->animFrame = 9999; + this->animFrame = 9999; // Invalid model type Object_SetInfo(&this->info, this->obj.id); } -void func_hud_800953A0(ActorCutscene* this, s32 arg1) { - Vec3f D_800D2510[] = { +void Aquas_AqBump2_Setup(ActorCutscene* this, s32 posIdx) { + Vec3f sAqBump2Pos[] = { { 1800.0f, 0.0f, -4000.0f }, { -1000.0f, 0.0f, -4800.0f }, { 800.0f, 0.0f, -5600.0f }, @@ -5539,14 +5570,14 @@ void func_hud_800953A0(ActorCutscene* this, s32 arg1) { Actor_Initialize(this); this->obj.status = OBJ_ACTIVE; this->obj.id = OBJ_ACTOR_CUTSCENE; - this->obj.pos = D_800D2510[arg1]; + this->obj.pos = sAqBump2Pos[posIdx]; this->obj.pos.z -= gPathProgress; this->animFrame = 45; Object_SetInfo(&this->info, this->obj.id); } -void func_hud_8009546C(ActorCutscene* this, s32 arg1) { - Vec3f D_800D2540[] = { +void Aquas_AqCoralReef2_Setup(ActorCutscene* this, s32 posIdx) { + Vec3f sAqCoralReef2Pos[] = { { 1300.0f, 0.0f, -2000.0f }, { -1000.0f, 0.0f, -3000.0f }, { 800.0f, 0.0f, 0.0f }, { -1200.0f, 0.0f, -1000.0f }, { -1400.0f, 0.0f, 700.0f }, }; @@ -5554,30 +5585,31 @@ void func_hud_8009546C(ActorCutscene* this, s32 arg1) { Actor_Initialize(this); this->obj.status = OBJ_ACTIVE; this->obj.id = OBJ_ACTOR_CUTSCENE; - this->obj.pos = D_800D2540[arg1]; + this->obj.pos = sAqCoralReef2Pos[posIdx]; this->obj.pos.z -= gPathProgress; this->animFrame = 46; Object_SetInfo(&this->info, this->obj.id); } -void func_hud_80095538(Actor* actor, s32 index) { - Vec3f D_800D257C[] = { +void Aquas_AqRock_Setup(ActorCutscene* this, s32 posIdx) { + Vec3f sAqRockPos[] = { { 0.0f, 0.0f, -200.0f }, { -300.0f, 0.0f, -700.0f }, { 400.0f, 0.0f, -900.0f }, { 300.0f, 0.0f, -1700.0f }, { -260.0f, 0.0f, -2000.0f }, { -200.0f, 0.0f, -2600.0f }, }; - Actor_Initialize(actor); - actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.pos = D_800D257C[index]; - actor->obj.pos.z -= gPathProgress; - actor->animFrame = 47; - Object_SetInfo(&actor->info, actor->obj.id); + Actor_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_ACTOR_CUTSCENE; + this->obj.pos = sAqRockPos[posIdx]; + this->obj.pos.z -= gPathProgress; + this->animFrame = 47; + Object_SetInfo(&this->info, this->obj.id); } -void HUD_AquasComplete(Player* player) { + +void Aquas_CsLevelComplete(Player* player) { s32 i; s32 j; - Actor* actor; + ActorCutscene* camera; f32 x; f32 y; f32 z; @@ -5589,7 +5621,7 @@ void HUD_AquasComplete(Player* player) { Vec3f dest; s32 shield; - actor = &gActors[0]; + camera = &gActors[0]; switch (player->csState) { case 0: @@ -5746,37 +5778,37 @@ void HUD_AquasComplete(Player* player) { player->zPath = gPathProgress = 0; j = 0; - func_hud_80095350(actor); + Aquas_Camera_Setup(camera); j++; for (i = 0; i < 6; i++, j++) { - func_hud_80095538(&gActors[j], i); + Aquas_AqRock_Setup(&gActors[j], i); } for (i = 0; i < 5; i++, j++) { - func_hud_8009546C(&gActors[j], i); + Aquas_AqCoralReef2_Setup(&gActors[j], i); } for (i = 0; i < 4; i++, j++) { - func_hud_800953A0(&gActors[j], i); + Aquas_AqBump2_Setup(&gActors[j], i); } player->pos.z -= gPathProgress; player->trueZpos = player->pos.z; - actor->fwork[1] = 0.0f; - actor->fwork[2] = 600.0f; - actor->fwork[3] = 2600.0f; - actor->fwork[7] = 0.5f; + camera->fwork[1] = 0.0f; + camera->fwork[2] = 600.0f; + camera->fwork[3] = 2600.0f; + camera->fwork[7] = 0.5f; - actor->rot_0F4.y = 130.0f; + camera->rot_0F4.y = 130.0f; - src.x = actor->fwork[1]; - src.y = actor->fwork[2]; - src.z = actor->fwork[3]; + src.x = camera->fwork[1]; + src.y = camera->fwork[2]; + src.z = camera->fwork[3]; Matrix_Translate(gCalcMatrix, player->pos.x, player->pos.y, player->trueZpos + gPathProgress, MTXF_NEW); - Matrix_RotateY(gCalcMatrix, -(M_DTOR * actor->rot_0F4.y), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -(M_DTOR * camera->rot_0F4.y), MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &src, &dest); player->cam.at.x = gCsCamAtX = player->pos.x; @@ -5800,22 +5832,22 @@ void HUD_AquasComplete(Player* player) { case 12: if ((gCsFrameCount >= 380) && (gCsFrameCount < 640 + 280)) { - Math_SmoothStepToF(&actor->fwork[2], 0.0f, 0.02f, 1000.0f, 0.001f); - Math_SmoothStepToF(&actor->fwork[3], 300.0f, 0.02f, 1000.0f, 0.001f); + Math_SmoothStepToF(&camera->fwork[2], 0.0f, 0.02f, 1000.0f, 0.001f); + Math_SmoothStepToF(&camera->fwork[3], 300.0f, 0.02f, 1000.0f, 0.001f); } if (gCsFrameCount >= 920) { - Math_SmoothStepToF(&actor->fwork[3], 200.0f, 0.02f, 1000.0f, 0.001f); + Math_SmoothStepToF(&camera->fwork[3], 200.0f, 0.02f, 1000.0f, 0.001f); } if (gCsFrameCount >= 1120) { - Math_SmoothStepToF(&actor->fwork[7], 0.1f, 0.05f, 1000.0f, 0.001f); + Math_SmoothStepToF(&camera->fwork[7], 0.1f, 0.05f, 1000.0f, 0.001f); } if (gCsFrameCount >= 1200) { - Math_SmoothStepToF(&actor->fwork[3], 800.0f, 0.02f, 1000.0f, 0.001f); + Math_SmoothStepToF(&camera->fwork[3], 800.0f, 0.02f, 1000.0f, 0.001f); Math_SmoothStepToF(&player->baseSpeed, 5.0f, 0.1f, 1000.0f, 0.001f); } else { - actor->fwork[4] = player->pos.x; - actor->fwork[5] = player->pos.y; - actor->fwork[6] = player->trueZpos + gPathProgress; + camera->fwork[4] = player->pos.x; + camera->fwork[5] = player->pos.y; + camera->fwork[6] = player->trueZpos + gPathProgress; } if (gCsFrameCount < 1200) { @@ -5829,20 +5861,20 @@ void HUD_AquasComplete(Player* player) { } D_ctx_80177A48[0] = 0.05f; - actor->rot_0F4.y += actor->fwork[7]; - if ((actor->rot_0F4.y) < 0.0f) { - actor->rot_0F4.y += 360.0f; + camera->rot_0F4.y += camera->fwork[7]; + if ((camera->rot_0F4.y) < 0.0f) { + camera->rot_0F4.y += 360.0f; } - if ((actor->rot_0F4.y) > 360.0f) { - actor->rot_0F4.y -= 360.0f; + if ((camera->rot_0F4.y) > 360.0f) { + camera->rot_0F4.y -= 360.0f; } - src.x = actor->fwork[1]; - src.y = actor->fwork[2]; - src.z = actor->fwork[3]; + src.x = camera->fwork[1]; + src.y = camera->fwork[2]; + src.z = camera->fwork[3]; - Matrix_Translate(gCalcMatrix, actor->fwork[4], actor->fwork[5], actor->fwork[6], MTXF_NEW); - Matrix_RotateY(gCalcMatrix, -(M_DTOR * actor->rot_0F4.y), MTXF_APPLY); + Matrix_Translate(gCalcMatrix, camera->fwork[4], camera->fwork[5], camera->fwork[6], MTXF_NEW); + Matrix_RotateY(gCalcMatrix, -(M_DTOR * camera->rot_0F4.y), MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &src, &dest); gCsCamEyeX = dest.x; @@ -5919,11 +5951,11 @@ void HUD_AquasComplete(Player* player) { break; case 1000: - gShowLevelClearStatusScreen = 1; + gShowLevelClearStatusScreen = true; break; case 1200: - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; break; } @@ -5974,7 +6006,7 @@ void HUD_AquasComplete(Player* player) { Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0.001f); } -void func_hud_80096A74(Player* player) { +void Venom1_LevelStart2(Player* player) { Vec3f src, dest; s32 button; diff --git a/src/engine/fox_load.c b/src/engine/fox_load.c index 4f05552d..bd428569 100644 --- a/src/engine/fox_load.c +++ b/src/engine/fox_load.c @@ -179,14 +179,14 @@ u8 Load_SceneSetup(u8 sceneId, u8 sceneSetup) { case SCENE_LOGO: changeScene = Load_SceneFiles(&sNoOvl_Logo[sceneSetup]); // Logo does not load an overlay file if (changeScene == true) { - AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_14); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_MA); } break; case SCENE_CREDITS: changeScene = Load_SceneFiles(&sOvlending_Ending[sceneSetup]); break; default: - (void) "DMA MODE ERROR %d\n"; + PRINTF("DMA MODE ERROR %d\n"); changeScene = false; break; } diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index b49886e4..bf0a8986 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -2674,7 +2674,7 @@ void Player_ResetVsData(void) { gLaserStrength[i] = LASERS_SINGLE; gBombCount[i] = 0; } - gVsMatchStart = gVsMatchOver = false; + gVsMatchStart = gVsMatchWon = false; } void Player_InitVersus(void) { @@ -2721,7 +2721,7 @@ void Play_Init(void) { gTraining360MsgTimer = gTraining360MsgIndex = gShowBossHealth = gStarWolfMsgTimer = gAllRangeWingRepairTimer = gAllRangeSuppliesSent = 0; D_display_800CA220 = 0; - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; if (gCurrentLevel != LEVEL_VERSUS) { gSceneSetup = 0; @@ -5834,7 +5834,7 @@ void Player_Update(Player* player) { player->csState = 0; Camera_FollowPlayer(player, player->attacker - 1, 1); } else { - if (gVsMatchStart == 1) { + if (gVsMatchStart == true) { gVsMatchStart++; for (i = 0; i < 4; i++) { Player_PlaySfx(gPlayer[i].sfxSource, NA_SE_ARWING_BOOST, gPlayer[i].num); @@ -5928,7 +5928,7 @@ void Player_Update(Player* player) { player->draw = false; if (gPlayerInactive[player->num] == true) { Camera_FollowPlayer(player, player->attacker - 1, 0); - } else if (!gVsMatchOver && (player->csState != 0)) { + } else if (!gVsMatchWon && (player->csState != 0)) { player->csState = 0; Player_Initialize(player); Player_Setup(player); @@ -6733,7 +6733,7 @@ void Play_UpdateLevel(void) { break; case LEVEL_METEO: - Texture_Scroll(D_102FF08, 8, 8, 1); + Lib_Texture_Scroll(D_102FF08, 8, 8, 1); /* fallthrough */ case LEVEL_SECTOR_X: if (gLevelPhase == 1) { @@ -6757,26 +6757,26 @@ void Play_UpdateLevel(void) { break; case LEVEL_CORNERIA: - func_hud_8008C104(D_CO_603EB38, D_CO_6028A60); + HUD_Texture_Wave(D_CO_603EB38, D_CO_6028A60); if ((gGameFrameCount % 2) != 0) { - Texture_Scroll(D_CO_600CBD8, 64, 32, 3); + Lib_Texture_Scroll(D_CO_600CBD8, 64, 32, 3); } break; case LEVEL_AQUAS: - func_hud_8008C104(D_AQ_603158C, D_AQ_602ACC0); + HUD_Texture_Wave(D_AQ_603158C, D_AQ_602ACC0); break; case LEVEL_SOLAR: Play_UpdateDynaFloor(); for (gPathTexScroll; gPathTexScroll >= 10.0f; gPathTexScroll -= 10.0f) { - Texture_Scroll(D_SO_6005710, 32, 32, 1); + Lib_Texture_Scroll(D_SO_6005710, 32, 32, 1); } if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_NEXT) { - Texture_Scroll(D_SO_6005710, 32, 32, 1); + Lib_Texture_Scroll(D_SO_6005710, 32, 32, 1); } - Texture_Mottle(D_SO_601E1E8, D_SO_6020F60, 3); + Lib_Texture_Mottle(D_SO_601E1E8, D_SO_6020F60, 3); if (gPlayer[0].pos.y > 600.0f) { cycleMask = 8 - 1; @@ -6827,7 +6827,7 @@ void Play_UpdateLevel(void) { RAND_FLOAT(10.0f) + 20.0f); // check } - func_hud_8008C104(D_SO_60229A4, D_SO_6010198); + HUD_Texture_Wave(D_SO_60229A4, D_SO_6010198); if (gPlayer[0].shields == 0) { gSoShieldsEmpty = 1; @@ -6837,13 +6837,13 @@ void Play_UpdateLevel(void) { case LEVEL_ZONESS: Play_UpdateDynaFloor(); for (gPathTexScroll; gPathTexScroll >= 20.0f; gPathTexScroll -= 20.0f) { - Texture_Scroll(D_ZO_602C2CC, 32, 32, 1); + Lib_Texture_Scroll(D_ZO_602C2CC, 32, 32, 1); } if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_NEXT) { - Texture_Scroll(D_ZO_602C2CC, 32, 32, 1); + Lib_Texture_Scroll(D_ZO_602C2CC, 32, 32, 1); } - func_hud_8008C104(D_ZO_602C2CC, D_ZO_600D990); + HUD_Texture_Wave(D_ZO_602C2CC, D_ZO_600D990); if (Play_CheckDynaFloorCollision(&sp3C, &sp40, gPlayer[0].cam.eye.x, gPlayer[0].cam.eye.y, gPlayer[0].cam.eye.z - gPathProgress)) { diff --git a/src/engine/fox_radio.c b/src/engine/fox_radio.c index 3a6200f6..c3faae27 100644 --- a/src/engine/fox_radio.c +++ b/src/engine/fox_radio.c @@ -169,7 +169,7 @@ void func_radio_800BAAE8(void) { sRadioUseRedBox = true; /* fallthrough */ case RCID_FOX: - radioPortraitTex = D_10050E0; + radioPortraitTex = aFoxPortraitTex; break; case RCID_FOX_RED + 1: sRadioUseRedBox = true; @@ -187,7 +187,7 @@ void func_radio_800BAAE8(void) { sRadioUseRedBox = true; /* fallthrough */ case RCID_FALCO: - radioPortraitTex = D_10032A0; + radioPortraitTex = aFalcoPortraitTex; break; case RCID_FALCO_RED + 1: sRadioUseRedBox = true; @@ -199,7 +199,7 @@ void func_radio_800BAAE8(void) { sRadioUseRedBox = true; /* fallthrough */ case RCID_SLIPPY: - radioPortraitTex = D_100D900; + radioPortraitTex = aSlippyPortraitTex; break; case RCID_SLIPPY_RED + 1: sRadioUseRedBox = true; @@ -211,7 +211,7 @@ void func_radio_800BAAE8(void) { sRadioUseRedBox = true; /* fallthrough */ case RCID_PEPPY: - radioPortraitTex = D_100BAC0; + radioPortraitTex = aPeppyPortraitTex; break; case RCID_PEPPY_RED + 1: sRadioUseRedBox = true; @@ -428,22 +428,22 @@ void func_radio_800BAAE8(void) { if (mirror) { for (i = 0, j = 0; i < 2; i++, j += 44 * 20) { - TextureRect_RGBA16_MirX(&gMasterDisp, &radioPortraitTex[j], 44, 20, gRadioPortraitPosX, - gRadioPortraitPosY + 20.0f + sp38 + (i * 20.0f * gRadioPortraitScaleY), 1.0f, - gRadioPortraitScaleY); + Lib_TextureRect_RGBA16_MirX(&gMasterDisp, &radioPortraitTex[j], 44, 20, gRadioPortraitPosX, + gRadioPortraitPosY + 20.0f + sp38 + (i * 20.0f * gRadioPortraitScaleY), + 1.0f, gRadioPortraitScaleY); } - TextureRect_RGBA16_MirX(&gMasterDisp, &radioPortraitTex[44 * 20 * 2], 44, 4, gRadioPortraitPosX, - gRadioPortraitPosY + 20.0f + sp38 + (40.0f * gRadioPortraitScaleY), 1.0f, - gRadioPortraitScaleY); + Lib_TextureRect_RGBA16_MirX(&gMasterDisp, &radioPortraitTex[44 * 20 * 2], 44, 4, gRadioPortraitPosX, + gRadioPortraitPosY + 20.0f + sp38 + (40.0f * gRadioPortraitScaleY), 1.0f, + gRadioPortraitScaleY); } else { for (i = 0, j = 0; i < 2; i++, j += 44 * 20) { - TextureRect_RGBA16(&gMasterDisp, &radioPortraitTex[j], 44, 20, gRadioPortraitPosX, - gRadioPortraitPosY + 20.0f + sp38 + (i * 20.0f * gRadioPortraitScaleY), 1.0f, - gRadioPortraitScaleY); + Lib_TextureRect_RGBA16(&gMasterDisp, &radioPortraitTex[j], 44, 20, gRadioPortraitPosX, + gRadioPortraitPosY + 20.0f + sp38 + (i * 20.0f * gRadioPortraitScaleY), 1.0f, + gRadioPortraitScaleY); } - TextureRect_RGBA16(&gMasterDisp, &radioPortraitTex[44 * 20 * 2], 44, 4, gRadioPortraitPosX, - gRadioPortraitPosY + 20.0f + sp38 + (40.0f * gRadioPortraitScaleY), 1.0f, - gRadioPortraitScaleY); + Lib_TextureRect_RGBA16(&gMasterDisp, &radioPortraitTex[44 * 20 * 2], 44, 4, gRadioPortraitPosX, + gRadioPortraitPosY + 20.0f + sp38 + (40.0f * gRadioPortraitScaleY), 1.0f, + gRadioPortraitScaleY); } } } @@ -471,13 +471,13 @@ void func_radio_800BB388(void) { switch (gGameState) { case GSTATE_TITLE: case GSTATE_ENDING: - texture = D_TITLE_601D750; - palette = D_TITLE_601DB50; + texture = aNoControllerBgTex; + palette = aNoControllerBgTLUT; break; case GSTATE_PLAY: - texture = D_1013170; - palette = D_1013570; + texture = aMsgWindowBgTex; + palette = aMsgWindowBgTLUT; break; } @@ -487,8 +487,8 @@ void func_radio_800BB388(void) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 60, 60, 255, 170); } - TextureRect_CI8(&gMasterDisp, texture, palette, 32, 32, gRadioTextBoxPosX, gRadioTextBoxPosY + 16.0f + sp30, - gRadioTextBoxScaleX, gRadioTextBoxScaleY); + Lib_TextureRect_CI8(&gMasterDisp, texture, palette, 32, 32, gRadioTextBoxPosX, gRadioTextBoxPosY + 16.0f + sp30, + gRadioTextBoxScaleX, gRadioTextBoxScaleY); } if (gRadioTextBoxScaleY == 1.3f) { @@ -712,11 +712,11 @@ void Radio_Draw(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255); Graphics_DisplaySmallText(31, 167, 1.0f, 1.0f, "DOWN"); - func_hud_80084B94(1); + HUD_TeamDownWrench_Draw(1); } if (((gCurrentRadioPortrait != RCID_STATIC) && (gCurrentRadioPortrait != RCID_STATIC + 1)) && (gCurrentRadioPortrait != RCID_1000)) { - func_hud_80086110(22.0f, 165.0f, gTeamShields[idx]); + HUD_TeamShields_Draw(22.0f, 165.0f, gTeamShields[idx]); } } @@ -764,7 +764,7 @@ void Radio_Draw(void) { } if (((gCurrentRadioPortrait != RCID_STATIC) && (gCurrentRadioPortrait != RCID_STATIC + 1)) && (gCurrentRadioPortrait != RCID_1000)) { - func_hud_80086110(22.0f, 165.0f, gActors[idx].health * 2.55f); + HUD_TeamShields_Draw(22.0f, 165.0f, gActors[idx].health * 2.55f); } } if (((gCurrentRadioPortrait != RCID_STATIC) && (gCurrentRadioPortrait != RCID_STATIC + 1)) && diff --git a/src/engine/fox_rcp_setup.c b/src/engine/fox_rcp_setup.c index 1623f140..d13ff44f 100644 --- a/src/engine/fox_rcp_setup.c +++ b/src/engine/fox_rcp_setup.c @@ -2,6 +2,7 @@ Gfx gRcpSetupDLs[][9] = { { + /* SETUPDL_0 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -15,6 +16,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_1 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -28,6 +30,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_2 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -41,6 +44,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_3 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -54,6 +58,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_4 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -67,6 +72,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_5 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -80,6 +86,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_6 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -93,6 +100,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_7 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -106,6 +114,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_8 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -119,6 +128,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_9 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -132,6 +142,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_10 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -146,6 +157,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_11 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -159,6 +171,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_12 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -172,6 +185,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_13 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -185,6 +199,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_14 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -198,6 +213,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_15 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -211,6 +227,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_16 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -224,6 +241,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_17 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -237,6 +255,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_18 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -250,6 +269,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_19 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -263,6 +283,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_20 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -276,6 +297,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_21 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -289,6 +311,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_22 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -302,6 +325,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_23 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -315,6 +339,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_24 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -328,6 +353,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_25 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -341,6 +367,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_26 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -357,6 +384,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_27 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -370,6 +398,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_28 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -384,6 +413,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_29 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -397,6 +427,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_30 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -410,6 +441,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_31 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -424,6 +456,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_32 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -437,6 +470,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_33 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -450,6 +484,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_34 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -463,6 +498,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_35 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -477,6 +513,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_36 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -490,6 +527,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_37 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -503,6 +541,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_38 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -517,6 +556,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_39 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -530,6 +570,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_40 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -543,6 +584,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_41 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -556,6 +598,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_42 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -569,6 +612,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_43 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -582,6 +626,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_44 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -595,6 +640,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_45 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -608,6 +654,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_46 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -621,6 +668,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_47 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -634,6 +682,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_48 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -647,6 +696,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_49 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -661,6 +711,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_50 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -674,6 +725,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_51 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -689,6 +741,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_52 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -702,6 +755,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_53 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -715,6 +769,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_54 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -728,6 +783,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_55 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -741,6 +797,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_56 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -754,6 +811,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_57 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -767,6 +825,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_58 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -780,6 +839,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_59 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -793,6 +853,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_60 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -806,6 +867,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_61 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -819,6 +881,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_62 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -832,6 +895,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_63 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -846,6 +910,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_64 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -859,6 +924,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_65 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -872,6 +938,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_66 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -885,6 +952,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_67 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -899,6 +967,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_68 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -913,6 +982,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_69 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -927,6 +997,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_70 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -943,6 +1014,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_71 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -958,6 +1030,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_72 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -975,6 +1048,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_73 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -988,6 +1062,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_74 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -1001,6 +1076,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_75 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -1014,6 +1090,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_76 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -1027,6 +1104,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_77 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -1041,6 +1119,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_78 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -1054,6 +1133,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_79 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -1067,6 +1147,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_80 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -1080,6 +1161,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_81 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -1093,6 +1175,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_82 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -1109,6 +1192,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_83 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -1122,6 +1206,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_84 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -1135,6 +1220,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_85 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -1148,6 +1234,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_86 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -1164,6 +1251,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_87 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), diff --git a/src/engine/fox_std_lib.c b/src/engine/fox_std_lib.c index 2e678ca7..86289379 100644 --- a/src/engine/fox_std_lib.c +++ b/src/engine/fox_std_lib.c @@ -25,7 +25,7 @@ s32 Graphics_Printf(const char* fmt, ...) { return 0; } -void Texture_Scroll(u16* texture, s32 width, s32 height, u8 mode) { +void Lib_Texture_Scroll(u16* texture, s32 width, s32 height, u8 mode) { u16* pixel = SEGMENTED_TO_VIRTUAL(texture); u16 tempPxl; s32 u; @@ -71,7 +71,7 @@ void Texture_Scroll(u16* texture, s32 width, s32 height, u8 mode) { } } -void Texture_Mottle(u16* dst, u16* src, u8 mode) { +void Lib_Texture_Mottle(u16* dst, u16* src, u8 mode) { s32 u; s32 v; u8* dst8; @@ -538,8 +538,8 @@ s32 Math_PursueVec3f(Vec3f* pos, Vec3f* target, Vec3f* rot, f32 stepSize, f32 sc return (VEC3F_MAG(&diff)) < dist; } -void TextureRect_CI4(Gfx** gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, - f32 yScale) { +void Lib_TextureRect_CI4(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, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); @@ -548,8 +548,8 @@ void TextureRect_CI4(Gfx** gfxPtr, u8* texture, u16* palette, u32 width, u32 hei (s32) (1.0f / yScale * 1024.0f)); } -void TextureRect_CI4_Flip(Gfx** gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, - f32 xScale, f32 yScale) { +void Lib_TextureRect_CI4_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, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); @@ -558,8 +558,8 @@ void TextureRect_CI4_Flip(Gfx** gfxPtr, u8* texture, u16* palette, u32 width, u3 G_TX_RENDERTILE, 0, 0, (s32) (1.0f / xScale * 1024.0f), (s32) (1.0f / yScale * 1024.0f)); } -void TextureRect_CI4_MirX(Gfx** gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, - f32 xScale, f32 yScale) { +void Lib_TextureRect_CI4_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, G_TX_MIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); @@ -568,8 +568,8 @@ void TextureRect_CI4_MirX(Gfx** gfxPtr, u8* texture, u16* palette, u32 width, u3 (u16) (s32) (-1.0f / xScale * 1024.0f), (s32) (1.0f / yScale * 1024.0f)); } -void TextureRect_CI4_MirY(Gfx** gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, - f32 xScale, f32 yScale) { +void Lib_TextureRect_CI4_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, G_TX_MIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); @@ -578,8 +578,8 @@ void TextureRect_CI4_MirY(Gfx** gfxPtr, u8* texture, u16* palette, u32 width, u3 (s32) (1.0f / xScale * 1024.0f), (u16) (s32) (-1.0f / yScale * 1024.0f)); } -void TextureRect_CI8(Gfx** gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, - f32 yScale) { +void Lib_TextureRect_CI8(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, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); @@ -588,7 +588,8 @@ void TextureRect_CI8(Gfx** gfxPtr, u8* texture, u16* palette, u32 width, u32 hei (s32) (1.0f / yScale * 1024.0f)); } -void TextureRect_RGBA16(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale) { +void Lib_TextureRect_RGBA16(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), @@ -596,8 +597,8 @@ void TextureRect_RGBA16(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f32 x (s32) (1.0f / yScale * 1024.0f)); } -void TextureRect_RGBA16_MirX(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, - f32 yScale) { +void Lib_TextureRect_RGBA16_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); gSPTextureRectangle((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), (s32) ((xPos + width * xScale) * 4.0f), @@ -605,7 +606,7 @@ void TextureRect_RGBA16_MirX(Gfx** gfxPtr, u16* texture, u32 width, u32 height, (u16) (s32) (-1.0f / xScale * 1024.0f), (s32) (1.0f / yScale * 1024.0f)); } -void TextureRect_IA8(Gfx** gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale) { +void Lib_TextureRect_IA8(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), @@ -613,8 +614,8 @@ void TextureRect_IA8(Gfx** gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, (s32) (1.0f / yScale * 1024.0f)); } -void TextureRect_IA8_FlipMirX(Gfx** gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, - f32 yScale) { +void Lib_TextureRect_IA8_FlipMirX(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); gSPTextureRectangleFlip((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), @@ -623,8 +624,8 @@ void TextureRect_IA8_FlipMirX(Gfx** gfxPtr, u8* texture, u32 width, u32 height, (s32) (1.0f / xScale * 1024.0f)); } -void TextureRect_IA8_FlipMirY(Gfx** gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, - f32 yScale) { +void Lib_TextureRect_IA8_FlipMirY(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); gSPTextureRectangleFlip((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), @@ -633,8 +634,8 @@ void TextureRect_IA8_FlipMirY(Gfx** gfxPtr, u8* texture, u32 width, u32 height, (u16) (s32) (-1.0f / xScale * 1024.0f)); } -void TextureRect_IA8_MirX(Gfx** gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, - f32 yScale) { +void Lib_TextureRect_IA8_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); gSPTextureRectangle((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), (s32) ((xPos + width * xScale) * 4.0f), @@ -642,8 +643,8 @@ void TextureRect_IA8_MirX(Gfx** gfxPtr, u8* texture, u32 width, u32 height, f32 (u16) (s32) (-1.0f / xScale * 1024.0f), (s32) (1.0f / yScale * 1024.0f)); } -void TextureRect_IA8_MirY(Gfx** gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, - f32 yScale) { +void Lib_TextureRect_IA8_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); gSPTextureRectangle((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), (s32) ((xPos + width * xScale) * 4.0f), @@ -651,7 +652,8 @@ void TextureRect_IA8_MirY(Gfx** gfxPtr, u8* texture, u32 width, u32 height, f32 (s32) (1.0f / xScale * 1024.0f), (u16) (s32) (-1.0f / yScale * 1024.0f)); } -void TextureRect_IA16(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale) { +void Lib_TextureRect_IA16(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), @@ -659,8 +661,8 @@ void TextureRect_IA16(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f32 xPo (s32) (1.0f / yScale * 1024.0f)); } -void TextureRect_IA16_MirX(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, - f32 yScale) { +void Lib_TextureRect_IA16_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); gSPTextureRectangle((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), (s32) ((xPos + width * xScale) * 4.0f), @@ -668,8 +670,8 @@ void TextureRect_IA16_MirX(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f3 (u16) (s32) (-1.0f / xScale * 1024.0f), (s32) (1.0f / yScale * 1024.0f)); } -void TextureRect_IA16_MirY(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, - f32 yScale) { +void Lib_TextureRect_IA16_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); gSPTextureRectangle((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), (s32) ((xPos + width * xScale) * 4.0f), @@ -677,8 +679,8 @@ void TextureRect_IA16_MirY(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f3 (s32) (1.0f / xScale * 1024.0f), (u16) (s32) (-1.0f / yScale * 1024.0f)); } -void TextureRect_IA16_MirXY(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, - f32 yScale) { +void Lib_TextureRect_IA16_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); gSPTextureRectangle((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), (s32) ((xPos + width * xScale) * 4.0f), @@ -686,7 +688,8 @@ void TextureRect_IA16_MirXY(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f (u16) (s32) (-1.0f / xScale * 1024.0f), (u16) (s32) (-1.0f / yScale * 1024.0f)); } -void TextureRect_RGBA32(Gfx** gfxPtr, u32* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale) { +void Lib_TextureRect_RGBA32(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); gSPTextureRectangle((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), (s32) ((xPos + width * xScale) * 4.0f), @@ -781,15 +784,15 @@ void Graphics_DisplayHUDNumber(s32 xPos, s32 yPos, s32 number) { place = 1000000; for (place = 1000000; place != 1; place /= 10) { if ((number / place != 0) || (startNumber == true)) { - TextureRect_CI4(&gMasterDisp, hudNumberTex[number / place], hudNumberPal[number / place], 16, 8, xPos, yPos, - 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, hudNumberTex[number / place], hudNumberPal[number / place], 16, 8, xPos, + yPos, 1.0f, 1.0f); startNumber = true; xPos += 9; number %= place; } } - TextureRect_CI4(&gMasterDisp, hudNumberTex[number / place], hudNumberPal[number / place], 16, 8, xPos, yPos, 1.0f, - 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, hudNumberTex[number / place], hudNumberPal[number / place], 16, 8, xPos, yPos, + 1.0f, 1.0f); } u8* sSmallNumberTex[] = { aSmallText_0, aSmallText_1, aSmallText_2, aSmallText_3, aSmallText_4, @@ -803,13 +806,13 @@ void Graphics_DisplaySmallNumber(s32 xPos, s32 yPos, s32 number) { place = 1000000; for (place = 1000000; place != 1; place /= 10) { if ((number / place != 0) || (startNumber == true)) { - TextureRect_IA8(&gMasterDisp, sSmallNumberTex[number / place], 16, 8, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, sSmallNumberTex[number / place], 16, 8, xPos, yPos, 1.0f, 1.0f); startNumber = true; xPos += 9; number %= place; } } - TextureRect_IA8(&gMasterDisp, sSmallNumberTex[number / place], 16, 8, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, sSmallNumberTex[number / place], 16, 8, xPos, yPos, 1.0f, 1.0f); } char sSmallChars[] = " ABCDEFGHIJKLMNOPQRSTUVWXYZ!:-.0123456789"; @@ -961,7 +964,8 @@ void Graphics_DisplayLargeText(s32 xPos, s32 yPos, f32 xScale, f32 yScale, char* if ((text[0] == 'W') || (text[0] == 'X')) { width = 32; } - TextureRect_IA8(&gMasterDisp, sLargeCharTex[charIndex], width, 15, xPosCurrent, yPos, xScale, yScale); + Lib_TextureRect_IA8(&gMasterDisp, sLargeCharTex[charIndex], width, 15, xPosCurrent, yPos, xScale, + yScale); } startPrint = true; xPosCurrent += (sLargeCharWidths[charIndex] * xScale) + 2.0f; @@ -1102,13 +1106,13 @@ void Graphics_DisplayLargeNumber(s32 xPos, s32 yPos, s32 number) { place = 1000000; for (place = 1000000; place != 1; place /= 10) { if ((number / place != 0) || (startNumber == true)) { - TextureRect_IA8(&gMasterDisp, sLargeNumberTex[number / place], 16, 15, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, sLargeNumberTex[number / place], 16, 15, xPos, yPos, 1.0f, 1.0f); startNumber = true; xPos += 13; number %= place; } } - TextureRect_IA8(&gMasterDisp, sLargeNumberTex[number / place], 16, 15, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, sLargeNumberTex[number / place], 16, 15, xPos, yPos, 1.0f, 1.0f); } void Graphics_DisplaySmallText(s32 xPos, s32 yPos, f32 xScale, f32 yScale, char* text) { @@ -1127,7 +1131,7 @@ void Graphics_DisplaySmallText(s32 xPos, s32 yPos, f32 xScale, f32 yScale, char* if (var_t0 > 30) { width = 16; } - TextureRect_IA8(&gMasterDisp, sSmallCharTex[var_t0], width, 8, xPosCurrent, yPos, xScale, yScale); + Lib_TextureRect_IA8(&gMasterDisp, sSmallCharTex[var_t0], width, 8, xPosCurrent, yPos, xScale, yScale); if (1) {} } switch (text[0]) { diff --git a/src/engine/fox_tank.c b/src/engine/fox_tank.c index 98b3d0b4..967aed0b 100644 --- a/src/engine/fox_tank.c +++ b/src/engine/fox_tank.c @@ -486,7 +486,7 @@ void func_tank_80044868(Player* player) { } } if (player->baseSpeed > 0.0f) { - Texture_Scroll(D_landmaster_3002E80, 32, 32, 0); + Lib_Texture_Scroll(D_landmaster_3002E80, 32, 32, 0); if ((gCurrentLevel == LEVEL_TITANIA) && !gBossActive) { func_tank_80043280(D_landmaster_3005EA8, D_TI_6009BB8, gGameFrameCount * -55.0f); } @@ -495,7 +495,7 @@ void func_tank_80044868(Player* player) { } } if (player->baseSpeed > 10.0f) { - Texture_Scroll(D_landmaster_3002E80, 32, 32, 0); + Lib_Texture_Scroll(D_landmaster_3002E80, 32, 32, 0); if ((gCurrentLevel == LEVEL_TITANIA) && !gBossActive) { func_tank_80043280(D_landmaster_3005EA8, D_TI_6009BB8, gGameFrameCount * -55.0f); } diff --git a/src/engine/fox_versus.c b/src/engine/fox_versus.c index 0ea9aa97..9b39e5ea 100644 --- a/src/engine/fox_versus.c +++ b/src/engine/fox_versus.c @@ -7,7 +7,7 @@ #define VS_TIE 99 -s32 D_versus_80178750; +bool gVsMatchOver; s32 gVsMatchState; s32 D_versus_80178758; s32 sUnlockLandmaster; @@ -84,19 +84,19 @@ void Versus_Exit(void) { } void func_versus_800BC88C(f32 xPos, f32 yPos, f32 scale) { - TextureRect_IA8(&gMasterDisp, D_VS_MENU_7003830, 64, 17, xPos, yPos, scale, scale); + Lib_TextureRect_IA8(&gMasterDisp, D_VS_MENU_7003830, 64, 17, xPos, yPos, scale, scale); } void func_versus_800BC8D8(f32 xPos, f32 yPos, f32 scale) { s32 i; for (i = 0; i < 2; i++) { - TextureRect_CI8(&gMasterDisp, D_versus_300A470 + (152 * 8 * i), D_versus_300B218, 152, 8, xPos, - yPos + (8 * i * scale), scale, scale); + Lib_TextureRect_CI8(&gMasterDisp, D_versus_300A470 + (152 * 8 * i), D_versus_300B218, 152, 8, xPos, + yPos + (8 * i * scale), scale, scale); } - TextureRect_CI8(&gMasterDisp, D_versus_300A470 + (152 * 8 * i), D_versus_300B218, 152, 7, xPos, - yPos + (8 * i * scale), scale, scale); + Lib_TextureRect_CI8(&gMasterDisp, D_versus_300A470 + (152 * 8 * i), D_versus_300B218, 152, 7, xPos, + yPos + (8 * i * scale), scale, scale); } void func_versus_800BC9DC(f32 xPos, f32 yPos, f32 scale, s32 yScale) { @@ -106,8 +106,8 @@ void func_versus_800BC9DC(f32 xPos, f32 yPos, f32 scale, s32 yScale) { s32 i; for (i = 0; i < 5; i++) { - TextureRect_CI8(&gMasterDisp, D_800D4ABC[yScale] + (D_800D4AB0[yScale] * 8 * i), D_800D4AA4[yScale], - D_800D4AB0[yScale], 8, xPos, yPos + (8 * i * scale), scale, scale); + Lib_TextureRect_CI8(&gMasterDisp, D_800D4ABC[yScale] + (D_800D4AB0[yScale] * 8 * i), D_800D4AA4[yScale], + D_800D4AB0[yScale], 8, xPos, yPos + (8 * i * scale), scale, scale); } } @@ -115,11 +115,11 @@ void func_versus_800BCB44(f32 xPos, f32 yPos, f32 scale) { s32 i; for (i = 0; i < 2; i++) { - TextureRect_CI8(&gMasterDisp, D_versus_3006C60 + (96 * 8 * i), D_versus_3007500, 96, 8, xPos, - yPos + (8 * i * scale), scale, scale); + Lib_TextureRect_CI8(&gMasterDisp, D_versus_3006C60 + (96 * 8 * i), D_versus_3007500, 96, 8, xPos, + yPos + (8 * i * scale), scale, scale); } - TextureRect_CI8(&gMasterDisp, D_versus_3006C60 + (96 * 8 * i), D_versus_3007500, 96, 7, xPos, - yPos + (8 * i * scale), scale, scale); + Lib_TextureRect_CI8(&gMasterDisp, D_versus_3006C60 + (96 * 8 * i), D_versus_3007500, 96, 7, xPos, + yPos + (8 * i * scale), scale, scale); } void func_versus_800BCC48(f32 xPos, f32 yPos, f32 xScale, f32 yScale, s32 arg4) { @@ -129,19 +129,19 @@ void func_versus_800BCC48(f32 xPos, f32 yPos, f32 xScale, f32 yScale, s32 arg4) s32 i; for (i = 0; i < 3; i++) { - TextureRect_CI8(&gMasterDisp, D_800D4AD8[arg4] + (D_800D4AE8[arg4] * 8 * i), D_800D4AC8[arg4], D_800D4AE8[arg4], - 8, xPos, yPos + (8 * i * yScale), xScale, yScale); + Lib_TextureRect_CI8(&gMasterDisp, D_800D4AD8[arg4] + (D_800D4AE8[arg4] * 8 * i), D_800D4AC8[arg4], + D_800D4AE8[arg4], 8, xPos, yPos + (8 * i * yScale), xScale, yScale); } - TextureRect_CI8(&gMasterDisp, D_800D4AD8[arg4] + (D_800D4AE8[arg4] * 8 * i), D_800D4AC8[arg4], D_800D4AE8[arg4], 1, - xPos, yPos + (8 * i * yScale), xScale, yScale); + Lib_TextureRect_CI8(&gMasterDisp, D_800D4AD8[arg4] + (D_800D4AE8[arg4] * 8 * i), D_800D4AC8[arg4], D_800D4AE8[arg4], + 1, xPos, yPos + (8 * i * yScale), xScale, yScale); } void func_versus_800BCE24(f32 xPos, f32 yPos, f32 xScale, f32 yScale) { s32 i; for (i = 0; i < 6; i++) { - TextureRect_CI8(&gMasterDisp, D_versus_3001420 + (256 * 7 * i), D_versus_3003E20, 256, 7, xPos, - yPos + (7 * i * yScale), xScale, yScale); + Lib_TextureRect_CI8(&gMasterDisp, D_versus_3001420 + (256 * 7 * i), D_versus_3003E20, 256, 7, xPos, + yPos + (7 * i * yScale), xScale, yScale); } } @@ -149,66 +149,66 @@ void func_versus_800BCEF8(f32 xPos, f32 yPos, f32 scale) { s32 i; for (i = 0; i < 12; i++) { - TextureRect_CI8(&gMasterDisp, D_versus_3004010 + (136 * 2 * i), D_versus_3004D58, 136, 2, xPos, - yPos + (2 * i * scale), scale, scale); + Lib_TextureRect_CI8(&gMasterDisp, D_versus_3004010 + (136 * 2 * i), D_versus_3004D58, 136, 2, xPos, + yPos + (2 * i * scale), scale, scale); } - TextureRect_CI8(&gMasterDisp, D_versus_3004010 + (136 * 2 * i), D_versus_3004D58, 136, 1, xPos, - yPos + (2 * i * scale), scale, scale); + Lib_TextureRect_CI8(&gMasterDisp, D_versus_3004010 + (136 * 2 * i), D_versus_3004D58, 136, 1, xPos, + yPos + (2 * i * scale), scale, scale); } void func_versus_800BCFFC(f32 xPos, f32 yPos, f32 xScale, f32 yScale) { - TextureRect_CI8(&gMasterDisp, D_1013170, D_1013570, 24, 17, xPos, yPos, xScale, yScale); + Lib_TextureRect_CI8(&gMasterDisp, aMsgWindowBgTex, aMsgWindowBgTLUT, 24, 17, xPos, yPos, xScale, yScale); } void func_versus_800BD05C(f32 xPos, f32 yPos, f32 scale) { - TextureRect_CI4(&gMasterDisp, D_versus_30003A0, D_versus_30004E0, 64, 10, xPos, yPos, scale, scale); + Lib_TextureRect_CI4(&gMasterDisp, D_versus_30003A0, D_versus_30004E0, 64, 10, xPos, yPos, scale, scale); } void func_versus_800BD0B4(f32 xPos, f32 yPos, f32 scale) { - TextureRect_CI4(&gMasterDisp, D_versus_3000510, D_versus_30006A0, 80, 10, xPos, yPos, scale, scale); + Lib_TextureRect_CI4(&gMasterDisp, D_versus_3000510, D_versus_30006A0, 80, 10, xPos, yPos, scale, scale); } void func_versus_800BD10C(f32 xPos, f32 yPos, f32 scale) { - TextureRect_CI4(&gMasterDisp, D_versus_30006D0, D_versus_3000810, 64, 10, xPos, yPos, scale, scale); + Lib_TextureRect_CI4(&gMasterDisp, D_versus_30006D0, D_versus_3000810, 64, 10, xPos, yPos, scale, scale); } void func_versus_800BD164(f32 xPos, f32 yPos) { - TextureRect_IA8(&gMasterDisp, D_VS_MENU_7003C70, 16, 16, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_VS_MENU_7003C70, 16, 16, xPos, yPos, 1.0f, 1.0f); } void func_versus_800BD1B0(f32 xPos, f32 yPos) { - TextureRect_IA8(&gMasterDisp, D_VS_MENU_7003F10, 16, 16, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_VS_MENU_7003F10, 16, 16, xPos, yPos, 1.0f, 1.0f); } void func_versus_800BD1FC(f32 xPos, f32 yPos) { - TextureRect_IA8(&gMasterDisp, D_VS_MENU_7003E10, 16, 16, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_VS_MENU_7003E10, 16, 16, xPos, yPos, 1.0f, 1.0f); } void func_versus_800BD248(f32 xPos, f32 yPos) { - TextureRect_CI8(&gMasterDisp, D_VS_MENU_7004050, D_VS_MENU_7004150, 16, 16, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_CI8(&gMasterDisp, D_VS_MENU_7004050, D_VS_MENU_7004150, 16, 16, xPos, yPos, 1.0f, 1.0f); } void func_versus_800BD2A0(f32 xPos, f32 yPos) { - TextureRect_CI8(&gMasterDisp, D_VS_MENU_70041F0, D_VS_MENU_70042F0, 16, 16, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_CI8(&gMasterDisp, D_VS_MENU_70041F0, D_VS_MENU_70042F0, 16, 16, xPos, yPos, 1.0f, 1.0f); } void func_versus_800BD2F8(f32 xPos, f32 yPos) { - TextureRect_CI8(&gMasterDisp, D_VS_MENU_7004360, D_VS_MENU_7004460, 16, 16, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_CI8(&gMasterDisp, D_VS_MENU_7004360, D_VS_MENU_7004460, 16, 16, xPos, yPos, 1.0f, 1.0f); } void func_versus_800BD350(f32 xPos, f32 yPos) { - TextureRect_CI8(&gMasterDisp, D_VS_MENU_70044D0, D_VS_MENU_7004990, 64, 19, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_CI8(&gMasterDisp, D_VS_MENU_70044D0, D_VS_MENU_7004990, 64, 19, xPos, yPos, 1.0f, 1.0f); } void func_versus_800BD3A8(f32 xPos, f32 yPos) { s32 i; for (i = 0; i < 8; i++) { - TextureRect_CI4(&gMasterDisp, D_VS_MENU_70118E0 + ((80 * 8 * i) / 2), D_VS_MENU_70123F8, 80, 8, xPos, - yPos + (i * 8), 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, aVsHandicapFrameTex + ((80 * 8 * i) / 2), aVsHandicapFrameTLUT, 80, 8, xPos, + yPos + (i * 8), 1.0f, 1.0f); } - TextureRect_CI4(&gMasterDisp, D_VS_MENU_70118E0 + ((80 * 8 * i) / 2), D_VS_MENU_70123F8, 80, 7, xPos, - yPos + (i * 8), 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, aVsHandicapFrameTex + ((80 * 8 * i) / 2), aVsHandicapFrameTLUT, 80, 7, xPos, + yPos + (i * 8), 1.0f, 1.0f); } void func_versus_800BD4D4(f32 xPos, f32 yPos, s32 arg2) { @@ -223,21 +223,21 @@ void func_versus_800BD4D4(f32 xPos, f32 yPos, s32 arg2) { for (i /= 10; i != 1; i /= 10) { j = arg2 / i; if (j || (var_s2 == true)) { - TextureRect_IA8(&gMasterDisp, D_800D4AF8[j / i], 16, 8, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_800D4AF8[j / i], 16, 8, xPos, yPos, 1.0f, 1.0f); xPos += 9.0f; arg2 %= i; var_s2 = true; } } - TextureRect_IA8(&gMasterDisp, D_800D4AF8[arg2 / i], 16, 8, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_800D4AF8[arg2 / i], 16, 8, xPos, yPos, 1.0f, 1.0f); } void func_versus_800BD720(f32 xPos, f32 yPos) { - TextureRect_IA8(&gMasterDisp, D_versus_30013E0, 8, 8, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aVsStarTex, 8, 8, xPos, yPos, 1.0f, 1.0f); } void func_versus_800BD76C(f32 xPos, f32 yPos) { - TextureRect_CI4(&gMasterDisp, D_versus_30001E0, D_versus_3000380, 64, 13, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, D_versus_30001E0, D_versus_3000380, 64, 13, xPos, yPos, 1.0f, 1.0f); } void func_versus_800BD7C4(f32 xPos, f32 yPos, s32 arg2) { @@ -247,23 +247,23 @@ void func_versus_800BD7C4(f32 xPos, f32 yPos, s32 arg2) { for (i = 10; i != 1; i /= 10) { if ((xPos > 0) && (yPos > 0)) { - TextureRect_IA8(&gMasterDisp, D_800D4B20[arg2 / i], 16, 8, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_800D4B20[arg2 / i], 16, 8, xPos, yPos, 1.0f, 1.0f); } xPos += 9.0f; arg2 %= i; } if ((xPos > 0) && (yPos > 0)) { - TextureRect_IA8(&gMasterDisp, D_800D4B20[arg2 / i], 16, 8, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_800D4B20[arg2 / i], 16, 8, xPos, yPos, 1.0f, 1.0f); } } void func_versus_800BD9FC(f32 xPos, f32 yPos) { - TextureRect_CI4(&gMasterDisp, D_1011E80, D_1011EC0, 16, 8, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, D_1011E80, D_1011EC0, 16, 8, xPos, yPos, 1.0f, 1.0f); } void func_versus_800BDA54(f32 xPos, f32 yPos) { - TextureRect_IA8(&gMasterDisp, aSmallText_L, 8, 8, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aSmallText_L, 8, 8, xPos, yPos, 1.0f, 1.0f); } void func_versus_800BDAA0(f32 xPos, f32 yPos, s32 arg2, s32 arg3, s32 arg4) { @@ -282,15 +282,19 @@ void func_versus_800BDAA0(f32 xPos, f32 yPos, s32 arg2, s32 arg3, s32 arg4) { temp1 = arg2 / i; temp2 = arg3 / i; if (temp1 == temp2) { - TextureRect_IA8(&gMasterDisp, D_800D4B48[temp1], 16, 15, xPos, yPos, 0.7f, 0.7f); + Lib_TextureRect_IA8(&gMasterDisp, D_800D4B48[temp1], 16, 15, xPos, yPos, 0.7f, 0.7f); } else { if (temp3 > y3) { - TextureRect_IA8(&gMasterDisp, D_800D4B48[temp2] + (16 * arg4), 16, 15 - arg4, xPos, yPos, 0.7f, 0.7f); - TextureRect_IA8(&gMasterDisp, D_800D4B48[temp1], 16, arg4, xPos, yPos + (15 - arg4) * 0.7f, 0.7f, 0.7f); + Lib_TextureRect_IA8(&gMasterDisp, D_800D4B48[temp2] + (16 * arg4), 16, 15 - arg4, xPos, yPos, 0.7f, + 0.7f); + Lib_TextureRect_IA8(&gMasterDisp, D_800D4B48[temp1], 16, arg4, xPos, yPos + (15 - arg4) * 0.7f, 0.7f, + 0.7f); } if (temp3 < y3) { - TextureRect_IA8(&gMasterDisp, D_800D4B48[temp2], 16, 15 - arg4, xPos, yPos + (arg4 * 0.7f), 0.7f, 0.7f); - TextureRect_IA8(&gMasterDisp, D_800D4B48[temp1] + (16 * (15 - arg4)), 16, arg4, xPos, yPos, 0.7f, 0.7f); + Lib_TextureRect_IA8(&gMasterDisp, D_800D4B48[temp2], 16, 15 - arg4, xPos, yPos + (arg4 * 0.7f), 0.7f, + 0.7f); + Lib_TextureRect_IA8(&gMasterDisp, D_800D4B48[temp1] + (16 * (15 - arg4)), 16, arg4, xPos, yPos, 0.7f, + 0.7f); } } xPos += 13.0f * 0.7f; @@ -388,7 +392,7 @@ s32 Versus_DrawCountdown(f32 xPos, f32 yPos, s32* countdown) { RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 0, 255); - TextureRect_CI8(&gMasterDisp, D_1013170, D_1013570, 24, 17, 120.0f, 115.0f, 3.33f, 0.53f); + Lib_TextureRect_CI8(&gMasterDisp, aMsgWindowBgTex, aMsgWindowBgTLUT, 24, 17, 120.0f, 115.0f, 3.33f, 0.53f); xTemp = 0.0f; @@ -790,7 +794,7 @@ bool Versus_CheckForWinner(void) { } if ((sVsPlayerCount == 1) && (numDown == 4)) { - gVsMatchOver = true; + gVsMatchWon = true; sVsWinner = VS_TIE; } else { for (i = 0; i < 4; i++) { @@ -818,7 +822,7 @@ bool Versus_CheckForWinner(void) { } gPlayer[j].state_1C8 = PLAYERSTATE_1C8_VS_STANDBY; } - gVsMatchOver = true; + gVsMatchWon = true; sVsWinner = i; } break; @@ -833,7 +837,7 @@ bool Versus_CheckForWinner(void) { } } if ((sVsPlayerCount == 1) && (numDown == 4)) { - gVsMatchOver = true; + gVsMatchWon = true; sVsWinner = VS_TIE; } else { if (numDown >= 2) { @@ -857,7 +861,7 @@ bool Versus_CheckForWinner(void) { } gPlayer[j].state_1C8 = PLAYERSTATE_1C8_VS_STANDBY; } - gVsMatchOver = true; + gVsMatchWon = true; } break; @@ -958,7 +962,7 @@ bool Versus_CheckForWinner(void) { gPlayer[j].state_1C8 = PLAYERSTATE_1C8_VS_STANDBY; } - gVsMatchOver = true; + gVsMatchWon = true; break; default: @@ -1043,7 +1047,7 @@ s32 func_versus_800C04DC(f32 xPos, f32 scale, s32 arg2) { Graphics_DisplaySmallText(x + 45.0f, y, 1.0f, 1.0f, "SCORE"); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - func_hud_800869A0(x + 18.0f, y + 16.0f, D_800D4A94, 1.0f, 0, 9999); + HUD_Number_Draw(x + 18.0f, y + 16.0f, D_800D4A94, 1.0f, 0, 9999); } else { if (arg2 < 4) { RCP_SetupDL(&gMasterDisp, SETUPDL_78); @@ -1262,7 +1266,7 @@ s32 func_versus_800C0E78(void) { Graphics_DisplaySmallText(D_800D4C90[i], D_800D4CA4[i], 1.0f, 1.0f, D_800D4C80[i]); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - func_hud_800869A0(D_800D4C90[i], D_800D4CA4[i] + 9.0f, D_80178838[i], 1.0f, 0, 999); + HUD_Number_Draw(D_800D4C90[i], D_800D4CA4[i] + 9.0f, D_80178838[i], 1.0f, 0, 999); } } @@ -1329,7 +1333,7 @@ void Versus_InitMatch(void) { sVsMatchMenuOption = 0; sVsWinner = VS_TIE; D_801787B8 = 0; - D_versus_80178750 = 0; + gVsMatchOver = false; gBgColor = 0; D_80178830 = 0; D_800D4A90 = 0; @@ -1538,7 +1542,7 @@ bool Versus_Update(void) { break; } - D_versus_80178750 = 1; + gVsMatchOver = true; gVsMatchState = VS_STATE_6; func_versus_800C024C(); } @@ -1660,7 +1664,7 @@ bool Versus_Update(void) { if (D_80178830 > 224) { Versus_Exit(); - D_menu_801B827C = 1; + gGoToTitle = true; } } break; diff --git a/src/mods/levelselect.c b/src/mods/levelselect.c index 30cc4d25..50d0e07e 100644 --- a/src/mods/levelselect.c +++ b/src/mods/levelselect.c @@ -3,15 +3,15 @@ extern PlanetId sPlanetList[15]; extern PlanetId sCurrentPlanetId; -extern s32 D_menu_801B8280; +extern bool sLevelStartState; extern s32 D_menu_801CD968; -extern s32 D_menu_801CD944; -extern s32 D_menu_801CD948; +extern s32 sMapState; +extern s32 sMapSubState; -void Map_801A61B4(LevelId level); -void Map_801A6368(void); -void Map_801A914C(void); -void Map_801A6628(void); +void Map_LevelStart_AudioSpecSetup(LevelId level); +void Map_CurrentLevel_Setup(void); +void Map_PositionCursor(void); +void Map_PlayLevel(void); static PlanetId sPlanetArray[][3] = { { PLANET_CORNERIA, PLANET_CORNERIA, PLANET_CORNERIA }, { PLANET_METEO, PLANET_METEO, PLANET_SECTOR_Y }, @@ -67,8 +67,8 @@ void Map_LevelSelect(void) { if (sCurrentPlanetId != nextPlanetId) { sCurrentPlanetId = nextPlanetId; startOption = 0; - Map_801A6368(); - Map_801A914C(); + Map_CurrentLevel_Setup(); + Map_PositionCursor(); } if (contPress->button & L_TRIG) { startOption ^= 1; @@ -113,7 +113,7 @@ void Map_LevelSelect(void) { } // Bypass briefing - if ((D_menu_801CD944 == 2) && (D_menu_801CD948 > 0)) { + if ((sMapState == 2) && (sMapSubState > 0)) { if (sCurrentPlanetId == PLANET_VENOM) { if (startOption) { gCurrentLevel = LEVEL_VENOM_ANDROSS; @@ -123,10 +123,10 @@ void Map_LevelSelect(void) { } else if ((sCurrentPlanetId == PLANET_AREA_6) && startOption) { gCurrentLevel = LEVEL_UNK_4; } - Map_801A61B4(gCurrentLevel); - D_menu_801B8280 = 0; + Map_LevelStart_AudioSpecSetup(gCurrentLevel); + sLevelStartState = 0; D_menu_801CD968 = 0; - Map_801A6628(); + Map_PlayLevel(); if (startOption && ((gCurrentLevel == LEVEL_METEO) || (gCurrentLevel == LEVEL_SECTOR_X) || (sPlanetArray[mission][difficulty] == SAVE_SLOT_VENOM_2))) { gLevelPhase = 1; diff --git a/src/mods/sfxjukebox.c b/src/mods/sfxjukebox.c index 20ef358b..a3e4d376 100644 --- a/src/mods/sfxjukebox.c +++ b/src/mods/sfxjukebox.c @@ -3,11 +3,11 @@ #include "fox_option.h" #include "sf64audio_provisional.h" -extern s32 spectrumAnalyzerMode; +extern s32 sSpectrumAnalyzerMode; extern bool sMusicPlaying; -extern s32 D_menu_801B9244; -extern OptionId D_menu_801B9124; -extern s32 D_menu_801B912C; +extern bool sMainMenuFromCancel; +extern OptionId sMenuEntryState; +extern s32 sMainMenuState; static s32 showJukebox = 0; static u32 prevSfx = NA_SE_NONE; @@ -171,9 +171,9 @@ void Jukebox_Update(void) { AUDIO_PLAY_SFX(NA_SE_ARWING_CANCEL, gDefaultSfxSource, 4); AUDIO_PLAY_BGM(NA_BGM_SELECT); gDrawMode = DRAW_NONE; - D_menu_801B9124 = 1000; - D_menu_801B912C = 0; - D_menu_801B9244 = 1; + sMenuEntryState = 1000; + sMainMenuState = 0; + sMainMenuFromCancel = 1; return; } else { AUDIO_PLAY_SFX(NA_SE_CANCEL, gDefaultSfxSource, 4); @@ -186,9 +186,9 @@ void Jukebox_Update(void) { // Spectrum Analyzer mode selector if (contPress->button & Z_TRIG) { - spectrumAnalyzerMode++; - if (spectrumAnalyzerMode > 2) { - spectrumAnalyzerMode = 0; + sSpectrumAnalyzerMode++; + if (sSpectrumAnalyzerMode > 2) { + sSpectrumAnalyzerMode = 0; } } diff --git a/src/overlays/ovl_ending/fox_end1.c b/src/overlays/ovl_ending/fox_end1.c index 24aee6be..27e93a9e 100644 --- a/src/overlays/ovl_ending/fox_end1.c +++ b/src/overlays/ovl_ending/fox_end1.c @@ -81,14 +81,14 @@ void Ending_80187520(s32 arg0) { switch (arg0) { case 0: for (j = 0, i = 0; i < 67; j += 316 * 4, i++) { - TextureRect_RGBA16(&gMasterDisp, gEndingAwardBack + j, 316, 4, 0.0f, 4 * i, 1.0f, 1.0f); + Lib_TextureRect_RGBA16(&gMasterDisp, gEndingAwardBack + j, 316, 4, 0.0f, 4 * i, 1.0f, 1.0f); } - TextureRect_RGBA16(&gMasterDisp, gEndingAwardBack + j, 316, 3, 0.0f, 4 * i, 1.0f, 1.0f); + Lib_TextureRect_RGBA16(&gMasterDisp, gEndingAwardBack + j, 316, 3, 0.0f, 4 * i, 1.0f, 1.0f); break; case 1: for (j = 0, i = 0; i < 60; j += 316 * 4, i++) { - TextureRect_RGBA16(&gMasterDisp, gEndingAwardFront + j, 316, 4, 0.0f, 4 * i, 1.0f, 1.0f); + Lib_TextureRect_RGBA16(&gMasterDisp, gEndingAwardFront + j, 316, 4, 0.0f, 4 * i, 1.0f, 1.0f); } break; } @@ -109,7 +109,7 @@ void Ending_801876A4(void) { Matrix_RotateX(gGfxMatrix, (D_ending_80196D08[i].rot.x + 5.0f) * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, D_ending_80196D08[i].rot.z * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_TITLE_6041070); + gSPDisplayList(gMasterDisp++, aTeamShadowDL); Matrix_Pop(&gGfxMatrix); } } @@ -118,7 +118,7 @@ void Ending_80187860(s32 arg0, s32 arg1) { Vec3f frameTable[50]; s32 i; s32 limbCount; - Animation* sp70[4] = { &D_TITLE_60246F8, &D_TITLE_60338DC, &D_TITLE_6036278, &D_TITLE_603531C }; + Animation* sp70[4] = { &D_TITLE_60246F8, &aFalcoAnim, &aSlippyAnim, &aPeppyAnim }; s32 pad; for (i = arg0; i < D_ending_80196F88; i++) { @@ -152,13 +152,13 @@ void Ending_80187860(s32 arg0, s32 arg1) { limbCount = Animation_GetFrameData(&D_TITLE_60246F8, 0, frameTable); break; case 1: - limbCount = Animation_GetFrameData(&D_TITLE_60338DC, 0, frameTable); + limbCount = Animation_GetFrameData(&aFalcoAnim, 0, frameTable); break; case 2: - limbCount = Animation_GetFrameData(&D_TITLE_6036278, 0, frameTable); + limbCount = Animation_GetFrameData(&aSlippyAnim, 0, frameTable); break; case 3: - limbCount = Animation_GetFrameData(&D_TITLE_603531C, 0, frameTable); + limbCount = Animation_GetFrameData(&aPeppyAnim, 0, frameTable); break; } Math_SmoothStepToVec3fArray(frameTable, D_ending_80197900[i], 1, limbCount, 0.1f, 100.0f, 0.01f); @@ -180,7 +180,7 @@ void Ending_80187D3C(s32 arg0) { Vec3f sp23C = { 0.0f, 0.0f, 0.0f }; UnkStruct_196D08 sp13C[4] = { { &D_TITLE_602A710, - D_TITLE_602FBAC, + aFoxSkel, 23, { 110.0f, -520.0f, -1390.0f }, { -20.0f, 0.0f, 0.0f }, @@ -190,7 +190,7 @@ void Ending_80187D3C(s32 arg0) { 0, { 0, 0, 0, 0 } }, { &D_TITLE_601E424, - D_TITLE_603088C, + aFalcoSkel, 23, { 380.0f, -670.0f, -1840.0f }, { -20.0f, 0.0f, 0.0f }, @@ -200,7 +200,7 @@ void Ending_80187D3C(s32 arg0) { 0, { 0, 0, 0, 0 } }, { &D_TITLE_6020058, - D_TITLE_60313AC, + aSlippySkel, 23, { -100.0f, -590.0f, -1630.0f }, { -20.0f, 0.0f, 0.0f }, @@ -210,7 +210,7 @@ void Ending_80187D3C(s32 arg0) { 0, { 0, 0, 0, 0 } }, { &D_TITLE_6029BE4, - D_TITLE_6032084, + aPeppySkel, 23, { -330.0f, -660.0f, -1840.0f }, { -20.0f, 0.0f, 0.0f }, @@ -222,7 +222,7 @@ void Ending_80187D3C(s32 arg0) { }; UnkStruct_196D08 sp3C[4] = { { &D_TITLE_602A710, - D_TITLE_602FBAC, + aFoxSkel, 23, { -80.0f, -400.0f, -50.0f }, { 0.0f, 180.0f, 0.0f }, @@ -232,7 +232,7 @@ void Ending_80187D3C(s32 arg0) { 0, { 0, 0, 0, 0 } }, { &D_TITLE_601E424, - D_TITLE_603088C, + aFalcoSkel, 23, { -160.0f, -400.0f, 350.0f }, { 0.0f, 180.0f, 0.0f }, @@ -242,7 +242,7 @@ void Ending_80187D3C(s32 arg0) { 0, { 0, 0, 0, 0 } }, { &D_TITLE_6020058, - D_TITLE_60313AC, + aSlippySkel, 23, { 60.0f, -400.0f, 150.0f }, { 0.0f, 180.0f, 0.0f }, @@ -252,7 +252,7 @@ void Ending_80187D3C(s32 arg0) { 0, { 0, 0, 0, 0 } }, { &D_TITLE_6029BE4, - D_TITLE_6032084, + aPeppySkel, 23, { 160.0f, -400.0f, 350.0f }, { 350.0f, 180.0f, 0.0f }, @@ -430,16 +430,16 @@ void Ending_801886F4(void) { switch ((D_ending_80196F90 % 8) / 2) { case 3: - TextureRect_CI4(&gMasterDisp, D_END_70110E0, D_END_70111B0, 16, 26, temp + 31.0f, 18.0f, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, D_END_70110E0, D_END_70111B0, 16, 26, temp + 31.0f, 18.0f, 1.0f, 1.0f); /* fallthrough */ case 2: - TextureRect_CI4(&gMasterDisp, D_END_7010FF0, D_END_70110C0, 16, 26, temp + 24.0f, 18.0f, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, D_END_7010FF0, D_END_70110C0, 16, 26, temp + 24.0f, 18.0f, 1.0f, 1.0f); /* fallthrough */ case 1: - TextureRect_CI4(&gMasterDisp, D_END_7010F00, D_END_7010FD0, 16, 26, temp + 18.0f, 18.0f, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, D_END_7010F00, D_END_7010FD0, 16, 26, temp + 18.0f, 18.0f, 1.0f, 1.0f); /* fallthrough */ case 0: - TextureRect_CI4(&gMasterDisp, D_END_7010E10, D_END_7010EE0, 16, 26, temp, 18.0f, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, D_END_7010E10, D_END_7010EE0, 16, 26, temp, 18.0f, 1.0f, 1.0f); } } @@ -504,8 +504,8 @@ void Ending_80188DB4(void) { 0, 0, { 0, 0, 0, 0 } }, - { &D_TITLE_60338DC, - D_TITLE_603088C, + { &aFalcoAnim, + aFalcoSkel, 23, { 230.0f, -370.0f, -620.0f }, { 350.0f, 0.0f, 0.0f }, @@ -514,8 +514,8 @@ void Ending_80188DB4(void) { 0, 0, { 0, 0, 0, 0 } }, - { &D_TITLE_6036278, - D_TITLE_60313AC, + { &aSlippyAnim, + aSlippySkel, 23, { -120.0f, -350.0f, -600.0f }, { 350.0f, 10.0f, 0.0f }, @@ -524,8 +524,8 @@ void Ending_80188DB4(void) { 0, 0, { 0, 0, 0, 0 } }, - { &D_TITLE_603531C, - D_TITLE_6032084, + { &aPeppyAnim, + aPeppySkel, 23, { -260.0f, -350.0f, -710.0f }, { 350.0f, 10.0f, 0.0f }, @@ -535,7 +535,7 @@ void Ending_80188DB4(void) { 0, { 0, 0, 0, 0 } }, { &D_TITLE_60246F8, - D_TITLE_602FBAC, + aFoxSkel, 23, { 30.0f, -330.0f, -320.0f }, { 350.0f, 0.0f, 0.0f }, diff --git a/src/overlays/ovl_ending/fox_end2.c b/src/overlays/ovl_ending/fox_end2.c index 6c37abed..a058a2de 100644 --- a/src/overlays/ovl_ending/fox_end2.c +++ b/src/overlays/ovl_ending/fox_end2.c @@ -44,18 +44,18 @@ void Ending_8018CE20(u32 arg0) { RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetTextureFilter(gMasterDisp++, G_TF_POINT); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, alpha); - TextureRect_IA8(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 0, 192, 5, 64.0f, 105.0f, - 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 1, 192, 5, 64.0f, 110.0f, - 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 2, 192, 5, 64.0f, 115.0f, - 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 3, 192, 5, 64.0f, 120.0f, - 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 4, 192, 5, 64.0f, 125.0f, - 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 5, 192, 5, 64.0f, 130.0f, - 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 0, 192, 5, 64.0f, + 105.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 1, 192, 5, 64.0f, + 110.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 2, 192, 5, 64.0f, + 115.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 3, 192, 5, 64.0f, + 120.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 4, 192, 5, 64.0f, + 125.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 5, 192, 5, 64.0f, + 130.0f, 1.0f, 1.0f); } else { xPos = (320 - Graphics_GetSmallTextWidth(D_ending_80192E74[i].unk_00)) / 2; RCP_SetupDL(&gMasterDisp, SETUPDL_83); @@ -158,9 +158,9 @@ void Ending_8018D638(u32 arg0, AssetInfo* asset) { if (gExpertMode != 0) { for (i = 0; i < 240; i += 4) { if (gVenomHardClear == 0) { - TextureRect_RGBA16(&gMasterDisp, gEndingNormalReward + 316 * i, 316, 4, 0.0f, i, 1.0f, 1.0f); + Lib_TextureRect_RGBA16(&gMasterDisp, gEndingNormalReward + 316 * i, 316, 4, 0.0f, i, 1.0f, 1.0f); } else { - TextureRect_RGBA16(&gMasterDisp, gEndingExpertReward + 316 * i, 316, 4, 0.0f, i, 1.0f, 1.0f); + Lib_TextureRect_RGBA16(&gMasterDisp, gEndingExpertReward + 316 * i, 316, 4, 0.0f, i, 1.0f, 1.0f); } } } else { @@ -183,10 +183,13 @@ void Ending_8018D814(u32 arg0, AssetInfo* asset) { gDPSetPrimColor(gMasterDisp++, 0, 0, asset->prim.r, asset->prim.g, asset->prim.b, alpha); - TextureRect_IA8(&gMasterDisp, sLargeText_1997_1, 16, 15, asset->unk_18.x, asset->unk_18.y, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, sLargeText_1997_9, 16, 15, asset->unk_18.x + 16.0f * 1, asset->unk_18.y, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, sLargeText_1997_9, 16, 15, asset->unk_18.x + 16.0f * 2, asset->unk_18.y, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, sLargeText_1997_7, 16, 15, asset->unk_18.x + 16.0f * 3, asset->unk_18.y, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, sLargeText_1997_1, 16, 15, asset->unk_18.x, asset->unk_18.y, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, sLargeText_1997_9, 16, 15, asset->unk_18.x + 16.0f * 1, asset->unk_18.y, 1.0f, + 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, sLargeText_1997_9, 16, 15, asset->unk_18.x + 16.0f * 2, asset->unk_18.y, 1.0f, + 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, sLargeText_1997_7, 16, 15, asset->unk_18.x + 16.0f * 3, asset->unk_18.y, 1.0f, + 1.0f); } void Ending_8018DA0C(u32 arg0, AssetInfo* asset) { @@ -234,27 +237,27 @@ bool Ending_8018DCB4(void) { s32 k; s32 m; s32 temp; - s32 temp2 = 0; + s32 teamAlive = 0; s32 temp3 = 0; s32 temp4[10]; - s32 unk_5E[10][7]; + s32 stats[10][7]; s32 unk40[10]; for (i = 0; i < gMissionNumber + 1; i++) { - temp2 += ((gMissionTeamStatus[i] & 0x00FF0000) >> 16) & 1; - temp2 += ((gMissionTeamStatus[i] & 0x0000FF00) >> 8) & 1; - temp2 += (gMissionTeamStatus[i] & 0x000000FF) & 1; + teamAlive += ((gMissionTeamStatus[i] & TEAMSTATUS_PEPPY) >> 16) & 1; + teamAlive += ((gMissionTeamStatus[i] & TEAMSTATUS_SLIPPY) >> 8) & 1; + teamAlive += (gMissionTeamStatus[i] & TEAMSTATUS_FALCO) & 1; } for (i = 0; i < 10; i += 1) { temp4[i] = 0; - unk40[i] = gSaveFile.save.data.unk_40[i]; + unk40[i] = gSaveFile.save.data.rankingLives[i]; for (j = 0; j < 7; j += 1) { - temp4[i] += gSaveFile.save.data.unk_5E[i][j].unk_0 + (gSaveFile.save.data.unk_5E[i][j].unk_C * 256); - unk_5E[i][0] += gSaveFile.save.data.unk_5E[i][j].unk_D & 1; - unk_5E[i][1] += gSaveFile.save.data.unk_5E[i][j].unk_F & 1; - unk_5E[i][2] += gSaveFile.save.data.unk_5E[i][j].unk_E & 1; + temp4[i] += gSaveFile.save.data.stats[i][j].hitCount + (gSaveFile.save.data.stats[i][j].unk_C * 256); + stats[i][0] += gSaveFile.save.data.stats[i][j].peppyAlive & 1; + stats[i][1] += gSaveFile.save.data.stats[i][j].slippyAlive & 1; + stats[i][2] += gSaveFile.save.data.stats[i][j].falcoAlive & 1; } } @@ -280,10 +283,10 @@ bool Ending_8018DCB4(void) { temp3 = 0; for (m = 0; m < 3; m++) { - temp3 += unk_5E[k][m]; + temp3 += stats[k][m]; } - if (temp2 > temp3) { + if (teamAlive > temp3) { temp = k; break; } @@ -733,7 +736,7 @@ void Ending_80190778(u32 arg0, AssetInfo* asset) { Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_arwing_3005AB0); + gSPDisplayList(gMasterDisp++, aAwSlippyHeadDL); } void Ending_80190CF0(u32 arg0, AssetInfo* asset) { @@ -861,7 +864,7 @@ void Ending_80191294(u32 arg0, AssetInfo* asset) { D_ending_80198590.drawFace = false; } - D_ending_80198590.windshieldXrot = 0.0f; + D_ending_80198590.cockpitGlassXrot = 0.0f; D_ending_80198590.teamFaceXrot = +D_ending_801985F0.x; D_ending_80198590.teamFaceYrot = -D_ending_801985F0.y; diff --git a/src/overlays/ovl_ending/fox_end2_data.c b/src/overlays/ovl_ending/fox_end2_data.c index 40923b13..cea5159b 100644 --- a/src/overlays/ovl_ending/fox_end2_data.c +++ b/src/overlays/ovl_ending/fox_end2_data.c @@ -194,10 +194,10 @@ AssetInfo D_ending_801934B4[] = { { NULL, Ending_8018F64C, 29, 100, 820, 1.0f, -900.0f, 600.0f, -1200.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 255, 0,}, {255, 255, 255, 255,}, 4, 0 }, { NULL, Ending_8018F64C, 29, 920, 960, 1.0f, -900.0f, 600.0f, -1200.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 255, 0,}, {255, 255, 255, 255,}, 4, 0 }, { &D_arwing_3015C28, D_arwing_3016610, 29, 100, 1780, 1.0f, -1000.0f, 500.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 3, 0 }, - { D_arwing_3016CC0, NULL, 29, 920, 150, 1.0f, -1000.0f, 506.8f, -16.0f, 5.0f, -40.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 7, 0 }, - { D_arwing_3016CC0, NULL, 29, 1070, 19, 1.0f, -1000.0f, 506.8f, -16.0f, 5.0f, -40.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 2.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 7, 0 }, - { D_arwing_3016CC0, NULL, 29, 1089, 1, 1.0f, -1000.0f, 506.8f, -16.0f, 5.0f, -1.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 7, 0 }, - { D_arwing_3016CC0, NULL, 29, 1090, 30, 1.0f, -1000.0f, 506.8f, -16.0f, 5.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 7, 0 }, + { aAwFalcoHeadDL, NULL, 29, 920, 150, 1.0f, -1000.0f, 506.8f, -16.0f, 5.0f, -40.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 7, 0 }, + { aAwFalcoHeadDL, NULL, 29, 1070, 19, 1.0f, -1000.0f, 506.8f, -16.0f, 5.0f, -40.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 2.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 7, 0 }, + { aAwFalcoHeadDL, NULL, 29, 1089, 1, 1.0f, -1000.0f, 506.8f, -16.0f, 5.0f, -1.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 7, 0 }, + { aAwFalcoHeadDL, NULL, 29, 1090, 30, 1.0f, -1000.0f, 506.8f, -16.0f, 5.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 7, 0 }, { D_arwing_30194E0, NULL, 45, 100, 1020, 1.0f, -1000.0f, 516.9f, -25.9f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {255, 255, 255, 140,}, 7, 0 }, { NULL, Ending_8018E1B8, 67, 100, 1780, 1.0f, -1000.0f, 500.0f, -64.0f, 0.0f, 0.0f, 0.0f, 0.5f, 0.3f, 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {240, 176, 64, 0}, 996, 1000, {0, 0, 255, 0,}, {255, 255, 255, 255,}, 0, 0 }, { &D_arwing_3015C28, D_arwing_3016610, 29, 100, 1780, 1.0f, -1000.0f, -500.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 5, 0 }, @@ -210,22 +210,22 @@ AssetInfo D_ending_801934B4[] = { { NULL, Ending_80191294, 29, 100, 1780, 1.0f, 1000.0f, 500.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 7, 0 }, { NULL, Ending_8018E1B8, 67, 100, 1780, 1.0f, 1000.0f, 500.0f, -57.0f, 0.0f, 0.0f, 0.0f, 0.5f, 0.3f, 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {240, 176, 64, 0}, 996, 1000, {0, 0, 255, 0,}, {255, 255, 255, 255,}, 0, 0 }, { &D_arwing_3015C28, D_arwing_3016610, 29, 100, 1780, 1.0f, 1000.0f, -500.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 11, 0 }, - { D_arwing_3003CE0, NULL, 29, 850, 20, 1.0f, 1000.0f, -493.2f, -16.0f, 5.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 870, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 7.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 871, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 10.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 872, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 14.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 873, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 16.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 874, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 14.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 875, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 11.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 876, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 7.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 877, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 7.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 878, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 10.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 879, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 14.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 880, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 16.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 881, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 14.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 882, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 10.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 883, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 7.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 884, 36, 1.0f, 1000.0f, -493.2f, -16.0f, 5.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { aAwPeppyHeadDL, NULL, 29, 850, 20, 1.0f, 1000.0f, -493.2f, -16.0f, 5.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { aAwPeppyHeadDL, NULL, 29, 870, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 7.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { aAwPeppyHeadDL, NULL, 29, 871, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 10.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { aAwPeppyHeadDL, NULL, 29, 872, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 14.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { aAwPeppyHeadDL, NULL, 29, 873, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 16.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { aAwPeppyHeadDL, NULL, 29, 874, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 14.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { aAwPeppyHeadDL, NULL, 29, 875, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 11.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { aAwPeppyHeadDL, NULL, 29, 876, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 7.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { aAwPeppyHeadDL, NULL, 29, 877, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 7.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { aAwPeppyHeadDL, NULL, 29, 878, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 10.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { aAwPeppyHeadDL, NULL, 29, 879, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 14.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { aAwPeppyHeadDL, NULL, 29, 880, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 16.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { aAwPeppyHeadDL, NULL, 29, 881, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 14.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { aAwPeppyHeadDL, NULL, 29, 882, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 10.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { aAwPeppyHeadDL, NULL, 29, 883, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 7.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { aAwPeppyHeadDL, NULL, 29, 884, 36, 1.0f, 1000.0f, -493.2f, -16.0f, 5.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, { D_arwing_30194E0, NULL, 45, 850, 70, 1.0f, 999.0f, -483.1f, -25.9f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {255, 255, 255, 140,}, 11, 0 }, { NULL, Ending_8018E1B8, 67, 100, 1780, 1.0f, 1000.0f, -500.0f, -34.0f, 0.0f, 0.0f, 0.0f, 0.5f, 0.3f, 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {240, 176, 64, 0}, 996, 1000, {0, 0, 255, 0,}, {255, 255, 255, 255,}, 0, 0 }, { NULL, Ending_8018F2A8, 29, 100, 420, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, @@ -248,14 +248,14 @@ AssetInfo D_ending_801934B4[] = { { NULL, Ending_8018E7B8, 67, 3800, 950, 1.0f, 15600.0f, -6710.0f, -9960.0f, 0.0f, 0.0f, -10.0f, 35.0f, 10.0f, 20.0f, -22.0f, 12.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {240, 176, 64, 0}, 996, 1000, {255, 255, 0, 0,}, {255, 255, 255, 164,}, 0, 0 }, { NULL, Ending_8018D4BC, 0, 3100, 1800, 0.0f, 0.0f, 32.0f, -32.0f, 200.0f, 70.0f, 10.0f, 10.0f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, { NULL, Ending_8018EDB8, 20, 3100, 1800, 1.0f, 0.0f, -470.0f, -3500.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 996, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, - { &D_TITLE_602F8E0, D_TITLE_602FBAC, 12, 3100, 1800, 5.0f, -300.0f, -300.0f, -1300.0f, 5.0f, -90.0f, -90.0f, 0.6f, 0.1f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 200,}, 10, 0 }, - { &D_TITLE_602F8E0, D_TITLE_602FBAC, 23, 3100, 1800, 5.0f, -300.0f, -300.0f, -1300.0f, 5.0f, -90.0f, 0.0f, 0.6f, 0.6f, 0.6f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, - { &D_TITLE_60305C0, D_TITLE_603088C, 12, 3100, 1800, 5.0f, -100.0f, -300.0f, -1300.0f, 10.0f, -90.0f, -90.0f, 0.6f, 0.1f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 200,}, 0, 0 }, - { &D_TITLE_60305C0, D_TITLE_603088C, 23, 3100, 1800, 5.0f, -100.0f, -300.0f, -1300.0f, 10.0f, -90.0f, 0.0f, 0.6f, 0.6f, 0.6f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, - { &D_TITLE_6031DB8, D_TITLE_6032084, 12, 3100, 1800, 6.0f, 100.0f, -300.0f, -1300.0f, -10.0f, -90.0f, -90.0f, 0.6f, 0.1f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 200,}, 0, 0 }, - { &D_TITLE_6031DB8, D_TITLE_6032084, 23, 3100, 1800, 6.0f, 100.0f, -300.0f, -1300.0f, -10.0f, -90.0f, 0.0f, 0.6f, 0.6f, 0.6f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, - { &D_TITLE_6031120, D_TITLE_60313AC, 12, 3100, 1800, 7.0f, 300.0f, -300.0f, -1300.0f, -15.0f, -90.0f, -90.0f, 0.6f, 0.1f, 6.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 200,}, 0, 0 }, - { &D_TITLE_6031120, D_TITLE_60313AC, 23, 3100, 1800, 7.0f, 300.0f, -300.0f, -1300.0f, -15.0f, -90.0f, 0.0f, 0.6f, 0.6f, 0.6f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { &aFoxRunningAnim, aFoxSkel, 12, 3100, 1800, 5.0f, -300.0f, -300.0f, -1300.0f, 5.0f, -90.0f, -90.0f, 0.6f, 0.1f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 200,}, 10, 0 }, + { &aFoxRunningAnim, aFoxSkel, 23, 3100, 1800, 5.0f, -300.0f, -300.0f, -1300.0f, 5.0f, -90.0f, 0.0f, 0.6f, 0.6f, 0.6f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { &aFalcoRunningAnim, aFalcoSkel, 12, 3100, 1800, 5.0f, -100.0f, -300.0f, -1300.0f, 10.0f, -90.0f, -90.0f, 0.6f, 0.1f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 200,}, 0, 0 }, + { &aFalcoRunningAnim, aFalcoSkel, 23, 3100, 1800, 5.0f, -100.0f, -300.0f, -1300.0f, 10.0f, -90.0f, 0.0f, 0.6f, 0.6f, 0.6f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { &aPeppyRunningAnim, aPeppySkel, 12, 3100, 1800, 6.0f, 100.0f, -300.0f, -1300.0f, -10.0f, -90.0f, -90.0f, 0.6f, 0.1f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 200,}, 0, 0 }, + { &aPeppyRunningAnim, aPeppySkel, 23, 3100, 1800, 6.0f, 100.0f, -300.0f, -1300.0f, -10.0f, -90.0f, 0.0f, 0.6f, 0.6f, 0.6f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { &aSlippyRunningAnim, aSlippySkel, 12, 3100, 1800, 7.0f, 300.0f, -300.0f, -1300.0f, -15.0f, -90.0f, -90.0f, 0.6f, 0.1f, 6.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 200,}, 0, 0 }, + { &aSlippyRunningAnim, aSlippySkel, 23, 3100, 1800, 7.0f, 300.0f, -300.0f, -1300.0f, -15.0f, -90.0f, 0.0f, 0.6f, 0.6f, 0.6f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, { NULL, Ending_8018D250, 5, 5000, 2000, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 2, 0 }, { NULL, Ending_8018D4BC, 0, 5100, 1800, 0.0f, 0.0f, 32.0f, -32.0f, 200.0f, 70.0f, 10.0f, 10.0f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, { D_END_7016540, NULL, 17, 5100, 310, 1.0f, 0.0f, -2800.0f, -6900.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -4.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, diff --git a/src/overlays/ovl_i1/fox_co.c b/src/overlays/ovl_i1/fox_co.c index 196a0889..3eed01e7 100644 --- a/src/overlays/ovl_i1/fox_co.c +++ b/src/overlays/ovl_i1/fox_co.c @@ -657,7 +657,7 @@ void Corneria_CoGranga_Update(CoGranga* this) { } gBossFrameCount++; - gRadarMarks[59].status = 1; + gRadarMarks[59].enabled = true; gRadarMarks[59].type = 102; gRadarMarks[59].pos.x = this->obj.pos.x; gRadarMarks[59].pos.y = this->obj.pos.y; @@ -1336,7 +1336,7 @@ void Corneria_CoGaruda1_Update(CoGaruda1* this) { switch (this->state) { case 0: this->fwork[1] += 20.0f; - Texture_Scroll(D_CO_60329C0, 16, 16, 1); + Lib_Texture_Scroll(D_CO_60329C0, 16, 16, 1); this->animFrame = 0; this->fwork[0] += 1.0f; @@ -1417,7 +1417,7 @@ void Corneria_CoGaruda2_Update(CoGaruda2* this) { case 1: this->fwork[0] = -10.0f; - Texture_Scroll(D_CO_60329C0, 16, 16, 1); + Lib_Texture_Scroll(D_CO_60329C0, 16, 16, 1); if (this->timer_0BC == 0) { this->state = 2; this->iwork[2] = RAND_INT(10.0f) + 10; @@ -1426,7 +1426,7 @@ void Corneria_CoGaruda2_Update(CoGaruda2* this) { case 2: this->fwork[0] = -10.0f; - Texture_Scroll(D_CO_60329C0, 16, 16, 1); + Lib_Texture_Scroll(D_CO_60329C0, 16, 16, 1); this->animFrame++; if (this->animFrame >= Animation_GetFrameCount(&D_CO_602AA04)) { @@ -1485,7 +1485,7 @@ void Corneria_CoGaruda3_Update(CoGaruda3* this) { case 1: this->fwork[0] = 5.0f; this->fwork[1] += 5.0f; - Texture_Scroll(D_CO_60329C0, 16, 16, 1); + Lib_Texture_Scroll(D_CO_60329C0, 16, 16, 1); this->animFrame++; if (this->animFrame >= Animation_GetFrameCount(&aCoGaruda3Anim)) { this->animFrame = 0; @@ -2918,26 +2918,26 @@ void Corneria_LevelStart(Player* player) { // Cloud reflexions on Arwing windshields if (sp2C >= 0.0f) { - Texture_Scroll(aWindshieldClouldReflextionTex, 64, 32, 2); - Texture_Scroll(aWindshieldClouldReflextionTex, 64, 32, 2); + Lib_Texture_Scroll(aWindshieldClouldReflextionTex, 64, 32, 2); + Lib_Texture_Scroll(aWindshieldClouldReflextionTex, 64, 32, 2); } else { - Texture_Scroll(aWindshieldClouldReflextionTex, 64, 32, 3); - Texture_Scroll(aWindshieldClouldReflextionTex, 64, 32, 3); + Lib_Texture_Scroll(aWindshieldClouldReflextionTex, 64, 32, 3); + Lib_Texture_Scroll(aWindshieldClouldReflextionTex, 64, 32, 3); } for (i = 0; (i < 40) && (D_ctx_80177A48[6] >= 0.2f); i++, D_ctx_80177A48[6] -= 0.2f) { if (sp44 >= 0) { - Texture_Scroll(aWindshieldClouldReflextionTex, 64, 32, 2); + Lib_Texture_Scroll(aWindshieldClouldReflextionTex, 64, 32, 2); } else { - Texture_Scroll(aWindshieldClouldReflextionTex, 64, 32, 3); + Lib_Texture_Scroll(aWindshieldClouldReflextionTex, 64, 32, 3); } } for (i = 0; (i < 40) && (D_ctx_80177A48[7] >= 0.3f); i++, D_ctx_80177A48[7] -= 0.3f) { if (sp40 >= 0) { - Texture_Scroll(aWindshieldClouldReflextionTex, 64, 32, 0); + Lib_Texture_Scroll(aWindshieldClouldReflextionTex, 64, 32, 0); } else { - Texture_Scroll(aWindshieldClouldReflextionTex, 64, 32, 1); + Lib_Texture_Scroll(aWindshieldClouldReflextionTex, 64, 32, 1); } } @@ -3626,11 +3626,11 @@ void Corneria_LevelComplete1(Player* player) { switch (gCsFrameCount) { case 981: - gShowLevelClearStatusScreen = 1; + gShowLevelClearStatusScreen = true; break; case 1181: - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; break; case 240: diff --git a/src/overlays/ovl_i1/fox_tr.c b/src/overlays/ovl_i1/fox_tr.c index 5bd61820..343566da 100644 --- a/src/overlays/ovl_i1/fox_tr.c +++ b/src/overlays/ovl_i1/fox_tr.c @@ -11,7 +11,7 @@ void Training_RingPassCount_Draw(void) { if (gRingPassCount != 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - func_hud_800869A0(250.0f, 50.0f, gRingPassCount, 1.0f, 0, 999); + HUD_Number_Draw(250.0f, 50.0f, gRingPassCount, 1.0f, 0, 999); } } diff --git a/src/overlays/ovl_i1/fox_tr360.c b/src/overlays/ovl_i1/fox_tr360.c index 6886ba18..55f03cdb 100644 --- a/src/overlays/ovl_i1/fox_tr360.c +++ b/src/overlays/ovl_i1/fox_tr360.c @@ -158,7 +158,7 @@ void Training_Enemy_Update(ActorAllRange* this) { ActorAllRange_ApplyDamage(this); radarMark = &gRadarMarks[this->index]; - radarMark->status = 1; + radarMark->enabled = true; radarMark->type = this->aiType; radarMark->pos.x = this->obj.pos.x; radarMark->pos.y = this->obj.pos.y; diff --git a/src/overlays/ovl_i1/fox_ve1.c b/src/overlays/ovl_i1/fox_ve1.c index 045259ff..4b4bd7da 100644 --- a/src/overlays/ovl_i1/fox_ve1.c +++ b/src/overlays/ovl_i1/fox_ve1.c @@ -2358,7 +2358,7 @@ void Venom1_Ve1Golemech_SetShadow(Ve1Golemech* this) { Matrix_Scale(gGfxMatrix, 10.0f, 0.0f, 8.0f, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, -90.0f * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); } void Venom1_80198414(void) { @@ -2442,5 +2442,5 @@ void Venom1_8019864C(PlayerShot* shot) { } void Venom1_LevelStart(Player* player) { - func_hud_80096A74(player); + Venom1_LevelStart2(player); } diff --git a/src/overlays/ovl_i2/fox_me.c b/src/overlays/ovl_i2/fox_me.c index c0aab937..9536c9ff 100644 --- a/src/overlays/ovl_i2/fox_me.c +++ b/src/overlays/ovl_i2/fox_me.c @@ -2418,11 +2418,11 @@ void Meteo_LevelComplete(Player* player) { break; case 976: - gShowLevelClearStatusScreen = 1; + gShowLevelClearStatusScreen = true; break; case 1176: - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; break; case 1300: diff --git a/src/overlays/ovl_i2/fox_sx.c b/src/overlays/ovl_i2/fox_sx.c index da46ca18..e892400e 100644 --- a/src/overlays/ovl_i2/fox_sx.c +++ b/src/overlays/ovl_i2/fox_sx.c @@ -1806,11 +1806,11 @@ void SectorX_LevelComplete(Player* player) { switch (gCsFrameCount) { case 706: - gShowLevelClearStatusScreen = 1; + gShowLevelClearStatusScreen = true; break; case 906: - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; break; case 100: diff --git a/src/overlays/ovl_i3/fox_a6.c b/src/overlays/ovl_i3/fox_a6.c index 3307d341..5e3c9cb2 100644 --- a/src/overlays/ovl_i3/fox_a6.c +++ b/src/overlays/ovl_i3/fox_a6.c @@ -1851,7 +1851,7 @@ void Area6_8018C0D0(f32* arg0, f32 arg1, Vec3f* arg2, f32 arg3, s32 arg4) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, (s32) D_i3_801C22F0.r[arg4], (s32) D_i3_801C22F0.g[arg4], (s32) D_i3_801C22F0.b[arg4], 255); gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 255); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); Matrix_MultVec3f(gCalcMatrix, &spB0, arg2); } else { RCP_SetupDL(&gMasterDisp, SETUPDL_47); @@ -1888,7 +1888,7 @@ void Area6_A6Gorgon_Draw(A6Gorgon* this) { Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 10.0f, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, this->fwork[A6_FWK_33] * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_101C2E0); + gSPDisplayList(gMasterDisp++, aStarDL); } else if (D_i3_801C22F0.unk_24 != 0.0f) { Animation_GetFrameData(&D_A6_6018994, 0, jointTable); @@ -2880,7 +2880,7 @@ void Area6_LevelComplete(Player* player) { gNextGameState = GSTATE_PLAY; gNextLevel = LEVEL_VENOM_2; - func_hud_80088564(); + HUD_Bolse_Area6_SaveData(); } } @@ -2901,11 +2901,11 @@ void Area6_LevelComplete(Player* player) { break; case 700: - gShowLevelClearStatusScreen = 1; + gShowLevelClearStatusScreen = true; break; case 900: - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; break; case 940: diff --git a/src/overlays/ovl_i3/fox_aq.c b/src/overlays/ovl_i3/fox_aq.c index 9709ce67..21e3cb9c 100644 --- a/src/overlays/ovl_i3/fox_aq.c +++ b/src/overlays/ovl_i3/fox_aq.c @@ -4057,7 +4057,7 @@ void Aquas_AqAnglerFish_Draw(AqAnglerFish* this) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) this->iwork[12]); gDPSetEnvColor(gMasterDisp++, 127, 127, 0, (s32) this->iwork[12]); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); Matrix_Pop(&gGfxMatrix); } diff --git a/src/overlays/ovl_i3/fox_so.c b/src/overlays/ovl_i3/fox_so.c index df8bd2d2..06f4ed24 100644 --- a/src/overlays/ovl_i3/fox_so.c +++ b/src/overlays/ovl_i3/fox_so.c @@ -3049,7 +3049,7 @@ void Solar_SoVulkain_Draw(SoVulkain* this) { MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_i3_801C2768[3], D_i3_801C2768[2], 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); for (i = 0; i < 9; i++) { Matrix_Pop(&gGfxMatrix); @@ -3060,7 +3060,7 @@ void Solar_SoVulkain_Draw(SoVulkain* this) { Matrix_RotateX(gGfxMatrix, spA0[i] * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_i3_801C2768[4 + i], 100.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); } if (D_i3_801C2768[13] > 0.0f) { @@ -3460,11 +3460,11 @@ void Solar_LevelComplete(Player* player) { break; case 1186: - gShowLevelClearStatusScreen = 1; + gShowLevelClearStatusScreen = true; break; case 1386: - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; break; case 1460: diff --git a/src/overlays/ovl_i3/fox_zo.c b/src/overlays/ovl_i3/fox_zo.c index 2db978e3..23705049 100644 --- a/src/overlays/ovl_i3/fox_zo.c +++ b/src/overlays/ovl_i3/fox_zo.c @@ -4999,11 +4999,11 @@ void Zoness_LevelComplete(Player* player) { break; case 906: - gShowLevelClearStatusScreen = 1; + gShowLevelClearStatusScreen = true; break; case 1106: - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; break; case 1180: diff --git a/src/overlays/ovl_i4/fox_bo.c b/src/overlays/ovl_i4/fox_bo.c index 9fe5a6b2..7d11e33c 100644 --- a/src/overlays/ovl_i4/fox_bo.c +++ b/src/overlays/ovl_i4/fox_bo.c @@ -1653,7 +1653,7 @@ void Bolse_LevelComplete(Player* player) { gPrevPlanetTeamShields[i] = 255; } } - func_hud_80088564(); + HUD_Bolse_Area6_SaveData(); } } break; @@ -1661,11 +1661,11 @@ void Bolse_LevelComplete(Player* player) { switch (gCsFrameCount) { case 400: - gShowLevelClearStatusScreen = 1; + gShowLevelClearStatusScreen = true; break; case 600: - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; break; case 620: @@ -1852,7 +1852,7 @@ void Bolse_Effect397_Draw(Effect397* this) { gDPSetEnvColor(gMasterDisp++, 0, 128, 255, this->unk_44); Matrix_Scale(gGfxMatrix, this->scale2, this->scale2, this->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); RCP_SetupDL(&gMasterDisp, SETUPDL_64); break; } @@ -2054,8 +2054,8 @@ void Bolse_BoBaseShield_Update(BoBaseShield* this) { Math_SmoothStepToF(&this->fwork[0], D_BO_801A03DC * 9.0f + 10.0f, 1.0f, 10.0f, 0.0f); - Texture_Scroll(aBoBaseShieldTex, 16, 16, 0); - Texture_Scroll(aBoBaseShieldTex, 16, 16, 0); + Lib_Texture_Scroll(aBoBaseShieldTex, 16, 16, 0); + Lib_Texture_Scroll(aBoBaseShieldTex, 16, 16, 0); switch (this->state) { case 2: diff --git a/src/overlays/ovl_i4/fox_fo.c b/src/overlays/ovl_i4/fox_fo.c index ddea95a6..81799cb2 100644 --- a/src/overlays/ovl_i4/fox_fo.c +++ b/src/overlays/ovl_i4/fox_fo.c @@ -795,7 +795,7 @@ void Fortuna_LevelComplete(Player* player) { gBosses[0].swork[0] = 1; - if ((HUD_FoBase_ExplodeCs(&gBosses[0]) == 2) || (gMissionStatus != MISSION_COMPLETE)) { + if ((FoBase_ExplodeCs(&gBosses[0]) == 2) || (gMissionStatus != MISSION_COMPLETE)) { Play_ClearObjectData(); if (gMissionStatus == MISSION_COMPLETE) { player->csState = 10; @@ -1292,7 +1292,7 @@ void Fortuna_LevelComplete(Player* player) { break; case 1080: - gShowLevelClearStatusScreen = 1; + gShowLevelClearStatusScreen = true; break; case 1240: @@ -1317,7 +1317,7 @@ void Fortuna_LevelComplete(Player* player) { peppy->fwork[29] = 5.0f; peppy->iwork[11] = 2; } - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; break; case 1300: @@ -1425,10 +1425,10 @@ void Fortuna_LevelComplete(Player* player) { if (player->csState < 20) { switch (gCsFrameCount) { case 1020: - gShowLevelClearStatusScreen = 1; + gShowLevelClearStatusScreen = true; break; case 1220: - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; break; } } diff --git a/src/overlays/ovl_i4/fox_ka.c b/src/overlays/ovl_i4/fox_ka.c index 620430d8..87fad000 100644 --- a/src/overlays/ovl_i4/fox_ka.c +++ b/src/overlays/ovl_i4/fox_ka.c @@ -273,7 +273,7 @@ void Katina_LaserEnergyParticlesDraw(Effect358* this) { Matrix_Scale(gGfxMatrix, 0.4f, 0.4f, 0.4f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); RCP_SetupDL(&gMasterDisp, SETUPDL_64); } @@ -1491,7 +1491,7 @@ void Katina_KaSaucerer_Update(KaSaucerer* this) { this->obj.rot.y += 360.0f; } - gRadarMarks[64].status = 1; + gRadarMarks[64].enabled = true; gRadarMarks[64].type = 101; gRadarMarks[64].pos.x = this->obj.pos.x; gRadarMarks[64].pos.y = this->obj.pos.y; @@ -1665,7 +1665,7 @@ void Katina_KaSaucerer_Draw(KaSaucerer* this) { this->fwork[BOSS_LASER_LIGHT_SCALE], MTXF_APPLY); Matrix_RotateX(gGfxMatrix, -90 * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); @@ -1677,7 +1677,7 @@ void Katina_KaSaucerer_Draw(KaSaucerer* this) { MTXF_APPLY); Matrix_RotateX(gGfxMatrix, -90 * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); Matrix_Pop(&gGfxMatrix); } @@ -1982,11 +1982,11 @@ void Katina_LevelComplete(Player* player) { break; case 350: - gShowLevelClearStatusScreen = 1; + gShowLevelClearStatusScreen = true; break; case 550: - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; break; case 1010: @@ -2595,7 +2595,7 @@ void Katina_EnemyUpdate(ActorAllRange* this) { ActorAllRange_ApplyDamage(this); radarMark = &gRadarMarks[this->index]; - radarMark->status = 1; + radarMark->enabled = true; radarMark->type = this->aiType; radarMark->pos.x = this->obj.pos.x; radarMark->pos.y = this->obj.pos.y; diff --git a/src/overlays/ovl_i5/fox_ma.c b/src/overlays/ovl_i5/fox_ma.c index d0b92417..063862c2 100644 --- a/src/overlays/ovl_i5/fox_ma.c +++ b/src/overlays/ovl_i5/fox_ma.c @@ -2666,7 +2666,7 @@ void Macbeth_TrainTrack_Draw(Scenery* this) { Matrix_RotateX(gCalcMatrix, (D_PI / 2), MTXF_APPLY); Matrix_Scale(gGfxMatrix, this->vel.z, this->vel.z / 2, this->vel.z, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, D_i5_801BE688[1].x, D_i5_801BE688[1].y + 50.0f, @@ -2674,7 +2674,7 @@ void Macbeth_TrainTrack_Draw(Scenery* this) { Matrix_RotateX(gCalcMatrix, (D_PI / 2), MTXF_APPLY); Matrix_Scale(gGfxMatrix, this->vel.z, this->vel.z / 2, this->vel.z, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); RCP_SetupDL(&gMasterDisp, SETUPDL_29); Matrix_Pop(&gGfxMatrix); } else if (this->state == 2) { @@ -2687,7 +2687,7 @@ void Macbeth_TrainTrack_Draw(Scenery* this) { Matrix_RotateX(gCalcMatrix, (D_PI / 2), MTXF_APPLY); Matrix_Scale(gGfxMatrix, this->vel.z, this->vel.z / 2, this->vel.z, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); RCP_SetupDL(&gMasterDisp, SETUPDL_29); Matrix_Pop(&gGfxMatrix); } @@ -5625,6 +5625,7 @@ void Macbeth_LevelStart(Player* player) { break; case 4: + default: break; } @@ -5640,7 +5641,7 @@ void Macbeth_LevelStart(Player* player) { player->rockPhase += player->vel.z * 5.0f; player->rockAngle = SIN_DEG(player->rockPhase) * 0.7f; - Texture_Scroll(D_landmaster_3002E80, 32, 32, 0); + Lib_Texture_Scroll(D_landmaster_3002E80, 32, 32, 0); if ((gCsFrameCount > 150) && ((-player->trueZpos - player->zPath) > 200.0f)) { if (D_i5_801BA768 < 11.5f) { @@ -6213,7 +6214,7 @@ void Macbeth_Effect379_Draw(Effect379* this) { Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); RCP_SetupDL(&gMasterDisp, SETUPDL_64); } @@ -7151,7 +7152,7 @@ void Macbeth_LevelComplete2(Player* player) { break; case 1817: - gShowLevelClearStatusScreen = 1; + gShowLevelClearStatusScreen = true; break; case 1960: @@ -7160,7 +7161,7 @@ void Macbeth_LevelComplete2(Player* player) { break; case 2017: - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; break; case 2040: @@ -7513,7 +7514,7 @@ void Macbeth_801B38E0(void) { s16 j; for (i = 0; i < ARRAY_COUNT(gRadarMarks); i++) { - gRadarMarks[i].status = 0; + gRadarMarks[i].enabled = false; } for (i = 0; i < ARRAY_COUNT(gTexturedLines); i++) { @@ -7735,11 +7736,11 @@ void Macbeth_LevelComplete1(Player* player) { switch (gCsFrameCount) { case 755: - gShowLevelClearStatusScreen = 1; + gShowLevelClearStatusScreen = true; break; case 1025: - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; break; case 50: diff --git a/src/overlays/ovl_i5/fox_ti.c b/src/overlays/ovl_i5/fox_ti.c index 36838191..19212502 100644 --- a/src/overlays/ovl_i5/fox_ti.c +++ b/src/overlays/ovl_i5/fox_ti.c @@ -2570,7 +2570,7 @@ void Titania_8019002C(s32 limbIndex, Vec3f* rot, void* thisx) { RCP_SetupDL(&gMasterDisp, SETUPDL_72); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 255); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); RCP_SetupDL(&gMasterDisp, SETUPDL_30); Matrix_Pop(&gGfxMatrix); Matrix_MultVec3f(gCalcMatrix, &D_i5_801B8D3C, (Vec3f*) &this->fwork[29]); @@ -3136,7 +3136,7 @@ void Titania_80191AE8(s32 limbIndex, Vec3f* rot, void* thisx) { RCP_SetupDL(&gMasterDisp, SETUPDL_72); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 255); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); RCP_SetupDL(&gMasterDisp, SETUPDL_30); Matrix_Pop(&gGfxMatrix); Matrix_MultVec3f(gCalcMatrix, &D_i5_801B8D3C, (Vec3f*) &this->fwork[29]); @@ -5281,7 +5281,7 @@ void Titania_TiGoras_Draw(TiGoras* boss) { Matrix_Scale(gGfxMatrix, boss->fwork[47] * 10.0f, boss->fwork[47] * 10.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); Matrix_Pop(&gGfxMatrix); break; @@ -5304,7 +5304,7 @@ void Titania_TiGoras_Draw(TiGoras* boss) { Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); Matrix_Pop(&gGfxMatrix); break; diff --git a/src/overlays/ovl_i5/fox_ti_cs.c b/src/overlays/ovl_i5/fox_ti_cs.c index ad1013fa..90678564 100644 --- a/src/overlays/ovl_i5/fox_ti_cs.c +++ b/src/overlays/ovl_i5/fox_ti_cs.c @@ -416,11 +416,11 @@ void Titania_LevelComplete(Player* player) { switch (gCsFrameCount) { case 831: - gShowLevelClearStatusScreen = 1; + gShowLevelClearStatusScreen = true; break; case 1031: - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; break; case 50: diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index 1e64785f..79e89930 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -1200,7 +1200,7 @@ void Andross_AndBrain_Update(AndBrain* this) { this->vel.z = sp64.z - gPathVelZ; if (this->state < 20) { - gRadarMarks[59].status = 1; + gRadarMarks[59].enabled = true; gRadarMarks[59].type = 102; gRadarMarks[59].pos.x = this->obj.pos.x; gRadarMarks[59].pos.y = this->obj.pos.y; @@ -1654,7 +1654,7 @@ void Andross_Effect396_Update(Effect396* this) { Gfx* D_i6_801A6790[10] = { D_ANDROSS_C001880, D_ANDROSS_C001880, D_ANDROSS_C001880, D_ANDROSS_C001880, D_ANDROSS_C001880, - D_ANDROSS_C001880, D_ANDROSS_C001880, D_ANDROSS_C001880, D_arwing_3016660, D_arwing_3015D80, + D_ANDROSS_C001880, D_ANDROSS_C001880, D_ANDROSS_C001880, aAwLeftWingDL, aAwRightWingDL, }; void Andross_Effect396_Draw(Effect396* this) { @@ -3517,7 +3517,7 @@ void Andross_AndAndross_Draw(AndAndross* this) { Matrix_Scale(gGfxMatrix, 1.1f, 1.1f, 1.1f, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); Matrix_Pop(&gGfxMatrix); } @@ -3643,7 +3643,7 @@ void Andross_AndLaserEmitter_Draw(AndLaserEmitter* this) { RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, alpha); gDPSetEnvColor(gMasterDisp++, 255, 128, 128, alpha); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); } } @@ -4308,10 +4308,10 @@ void Andross_80193C4C(Player* player) { } break; case 1050: - gShowLevelClearStatusScreen = 1; + gShowLevelClearStatusScreen = true; break; case 1250: - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; break; } if (gCsFrameCount > 1300) { @@ -4333,10 +4333,10 @@ void Andross_80193C4C(Player* player) { gCsFrameCount += 230; break; case 1050: - gShowLevelClearStatusScreen = 1; + gShowLevelClearStatusScreen = true; break; case 1250: - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; break; } } diff --git a/src/overlays/ovl_i6/fox_sy.c b/src/overlays/ovl_i6/fox_sy.c index c02074f0..13946c8c 100644 --- a/src/overlays/ovl_i6/fox_sy.c +++ b/src/overlays/ovl_i6/fox_sy.c @@ -1664,7 +1664,7 @@ void SectorY_SyShogun_Update(SyShogun* this) { if (this->index == 0) { radarMark = &gRadarMarks[this->index + 1]; - radarMark->status = 1; + radarMark->enabled = true; radarMark->type = 102; radarMark->pos.x = this->obj.pos.x; radarMark->pos.y = this->obj.pos.y; @@ -1672,7 +1672,7 @@ void SectorY_SyShogun_Update(SyShogun* this) { radarMark->yRot = this->rot_078.y + 180.0f; } else { radarMark = &gRadarMarks[this->index + 4]; - radarMark->status = 1; + radarMark->enabled = true; radarMark->type = 10; radarMark->pos.x = this->obj.pos.x; radarMark->pos.y = this->obj.pos.y; @@ -1925,7 +1925,7 @@ void SectorY_SyShogun_Draw(SyShogun* this) { Matrix_Translate(gGfxMatrix, this->fwork[1], this->fwork[2], this->fwork[3], MTXF_APPLY); Matrix_Scale(gGfxMatrix, sp9C, sp9C, sp9C, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); } if (this->fwork[34] != 0.0f) { @@ -1947,7 +1947,7 @@ void SectorY_SyShogun_Draw(SyShogun* this) { Matrix_RotateY(gGfxMatrix, -sp8C, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, -sp88, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); } if (this->index == 0) { @@ -1963,7 +1963,7 @@ void SectorY_SyShogun_Draw(SyShogun* this) { Matrix_RotateZ(gGfxMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, this->fwork[41] * 2.0f, this->fwork[41], this->fwork[41] * 2.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); } if (this->fwork[42] != 0.0f) { @@ -1978,7 +1978,7 @@ void SectorY_SyShogun_Draw(SyShogun* this) { Matrix_RotateZ(gGfxMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, this->fwork[42] * 2.0f, this->fwork[42], this->fwork[42] * 2.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); } } @@ -1992,7 +1992,7 @@ void SectorY_SyShogun_Draw(SyShogun* this) { Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_Scale(gGfxMatrix, this->fwork[43], this->fwork[43], this->fwork[43], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); } if (this->fwork[46] != 0.0f) { @@ -2006,10 +2006,10 @@ void SectorY_SyShogun_Draw(SyShogun* this) { MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.4f, 0.2f, 0.2f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); Matrix_Translate(gGfxMatrix, -46.0f, 0, 0, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); } } } @@ -2347,11 +2347,11 @@ void SectorY_LevelComplete(Player* player) { break; case 1163: - gShowLevelClearStatusScreen = 1; + gShowLevelClearStatusScreen = true; break; case 1363: - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; break; case 1440: @@ -3874,7 +3874,7 @@ void SectorY_SyRobot_Draw(SyRobot* this) { Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); } } diff --git a/src/overlays/ovl_menu/fox_i_menu.c b/src/overlays/ovl_menu/fox_i_menu.c index 75b53315..b45b5ce2 100644 --- a/src/overlays/ovl_menu/fox_i_menu.c +++ b/src/overlays/ovl_menu/fox_i_menu.c @@ -3,8 +3,8 @@ void Title_Main(void); void Title_Draw(void); void Option_Main(void); -void Option_DrawEntry(void); -void Map_8019E85C(void); +void Option_Entry_Draw(void); +void Map_GameOver(void); void Map_8019E8C8(void); void Map_Main(void); void Map_Draw(void); @@ -35,11 +35,11 @@ void OvlMenu_CallFunction(u32 mode, void* ptr) { break; case OVLCALL_OPTION_DRAW: - Option_DrawEntry(); + Option_Entry_Draw(); break; case OVLCALL_GAME_OVER_UPDATE: - Map_8019E85C(); + Map_GameOver(); break; case OVLCALL_UNKMAP_DRAW: diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index 4a81f05f..f44d5bce 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -8,34 +8,36 @@ #include "global.h" #include "fox_map.h" #include "fox_option.h" +#include "sf64save.h" #include "prevent_bss_reordering.h" #include "prevent_bss_reordering2.h" -#include "prevent_bss_reordering3.h" +// #include "prevent_bss_reordering3.h" #include "assets/ast_map.h" #include "assets/ast_text.h" #include "assets/ast_font_3d.h" // BSS STARTS HERE -u8 D_menu_801B9410[96 * 96]; -u8 D_menu_801BB810[96 * 96]; -u8 D_menu_801BDC10[96 * 96]; -u8 D_menu_801C0010[96 * 96]; -u8 D_menu_801C2410[96 * 96]; -u8 D_menu_801C4810[96 * 96]; -u8 D_menu_801C6C10[96 * 96]; -u8 D_menu_801C9010[96 * 96]; -u8 D_menu_801CB410[96 * 96]; +u8 gMapVenomCloudTex[96 * 96]; +u8 gMapCorneriaTex[96 * 96]; +u8 gMapFortunaTex[96 * 96]; +u8 gMapAquasTex[96 * 96]; +u8 gMapVenomTex[96 * 96]; +u8 gMapTitaniaTex[96 * 96]; +u8 gMapKatinaTex[96 * 96]; +u8 gMapMacbethTex[96 * 96]; +u8 gMapZonessTex[96 * 96]; + s32 D_menu_801CD810; f32 D_menu_801CD818[9]; s32 D_menu_801CD83C; -s32 D_menu_801CD840[24]; +s32 sUnusedPathIdx[24]; // Path index, set but not used s32 D_menu_801CD8A0[15]; s32 D_menu_801CD8E0[7]; -s32 D_menu_801CD900[15]; +s32 D_menu_801CD900[15]; // planet alpha used for something? MissionStatus sPrevMissionStatus; s32 D_menu_801CD940; -s32 D_menu_801CD944; // mapState -s32 D_menu_801CD948; +s32 sMapState; +s32 sMapSubState; // Another type of map state? Investigate s32 D_menu_801CD94C; PlanetId sPrevPlanetId; PlanetId sCurrentPlanetId; // sCurrentPlanetId @@ -44,12 +46,12 @@ s32 D_menu_801CD95C; s32 D_menu_801CD960; s32 D_menu_801CD964; s32 D_menu_801CD968; -s32 D_menu_801CD96C; +bool D_menu_801CD96C; s32 D_menu_801CD970; -s32 D_menu_801CD974; +bool D_menu_801CD974; s32 D_menu_801CD978; s32 D_menu_801CD97C; -s32 D_menu_801CD980; +bool D_menu_801CD980; s32 D_menu_801CD984; s32 D_menu_801CD988; s32 D_menu_801CD98C; @@ -57,62 +59,62 @@ s32 D_menu_801CD990; s32 D_menu_801CD994; s32 D_menu_801CD998; f32 D_menu_801CD99C; -s32 D_menu_801CD9A0; +bool D_menu_801CD9A0; s32 D_menu_801CD9A4; -s32 D_menu_801CD9A8; +s32 sLevelPlayed; s32 D_menu_801CD9AC; f32 D_menu_801CD9B0; f32 D_menu_801CD9B4; -s32 D_menu_801CD9B8; -s32 D_menu_801CD9BC; -s32 D_menu_801CD9C0; +s32 sMapTimer1; +s32 sMapTimer2; +s32 sMapTimer3; s32 D_menu_801CD9C4; s32 D_menu_801CD9C8; -s32 D_menu_801CD9CC; -s32 D_menu_801CD9D0; +s32 sRestartLevelStates; +s32 sExplosionAnimIdx; s32 D_menu_801CD9D4; s32 D_menu_801CD9D8; -f32 D_menu_801CD9DC; -f32 D_menu_801CD9E0; -f32 D_menu_801CD9E4; -f32 D_menu_801CD9E8; +f32 sPrologueTextXpos; +f32 sPrologueTextYpos; +f32 sPrologueNextTexAlpha; +f32 sPrologueCurrentTexAlpha; f32 D_menu_801CD9EC; -s32 D_menu_801CD9F0; -f32 D_menu_801CD9F4; // x -f32 D_menu_801CD9F8; // y -f32 D_menu_801CD9FC; // z -f32 D_menu_801CDA00; // x -f32 D_menu_801CDA04; // y -f32 D_menu_801CDA08; // z +s32 sPrologueTexIdx; +f32 sMapCamEyeX; // x +f32 sMapCamEyeY; // y +f32 sMapCamEyeZ; // z +f32 sMapCamAtX; // x +f32 sMapCamAtY; // y +f32 sMapCamAtZ; // z f32 D_menu_801CDA0C; // camera x f32 D_menu_801CDA10; // camera y f32 D_menu_801CDA14; f32 D_menu_801CDA18; f32 D_menu_801CDA1C; -f32 D_menu_801CDA20; -f32 D_menu_801CDA24; -f32 D_menu_801CDA28; -f32 D_menu_801CDA2C; -f32 D_menu_801CDA30; -f32 D_menu_801CDA34; -f32 D_menu_801CDA38; -Vec3f D_menu_801CDA40; -Vec3f D_menu_801CDA50; +f32 sMapCamUpX; +f32 sMapCamUpY; +f32 sMapCamUpZ; +f32 sPathFollowCamAtX; +f32 sPathFollowCamAtY; +f32 sPathFollowCamEyeX; +f32 sPathFollowCamEyeY; +Vec3f sZoomPlanetCamAt; +Vec3f sZoomPlanetCamEye; Matrix D_menu_801CDA60[15]; Matrix D_menu_801CDE20[15]; // planet related Matrix D_menu_801CE1E0[15]; Matrix D_menu_801CE5A0[15]; -Vec3f D_menu_801CE960[15]; // sPlanetsPositions +Vec3f sPlanetPositions[15]; f32 D_menu_801CEA18[15]; -f32 D_menu_801CEA54; +f32 sCurrentPlanetCamZDist; f32 D_menu_801CEA58; f32 D_menu_801CEA5C; f32 D_menu_801CEA60; f32 D_menu_801CEA64; f32 D_menu_801CEA68; -f32 D_menu_801CEA6C; -f32 D_menu_801CEA70; -s32 D_menu_801CEA74; +f32 sMapPlanetCardAlpha; +f32 sMapPlanetCardAlphaScale; +s32 sTeamStatusAlpha; f32 D_menu_801CEA78; f32 D_menu_801CEA7C; f32 D_menu_801CEA80; @@ -125,7 +127,7 @@ s32 D_menu_801CEA98; f32 D_menu_801CEA9C; f32 D_menu_801CEAA0; f32 D_menu_801CEAA4; -f32 D_menu_801CEAA8; +f32 sCursorYpos; f32 D_menu_801CEAAC; f32 D_menu_801CEAB0; s32 D_menu_801CEAB4; @@ -133,9 +135,9 @@ f32 D_menu_801CEAB8[15]; f32 D_menu_801CEAF8[15]; s32 D_menu_801CEB34; s32 D_menu_801CEB38; -f32 D_menu_801CEB3C; +f32 sMapCorneriaExplosionScale; f32 D_menu_801CEB40; -s32 D_menu_801CEB48[3]; +bool sPlanetExplosions[EXPLOSIONS_MAX]; s32 D_menu_801CEB58[3][10]; s32 D_menu_801CEBD0[3][10]; f32 D_menu_801CEC48[3][10]; @@ -176,12 +178,12 @@ s32 D_menu_801CF00C; s32 D_menu_801CF010; s32 D_menu_801CF014; s32 D_menu_801CF018; -f32 D_menu_801CF020[8]; -f32 D_menu_801CF040[8]; -f32 D_menu_801CF060[8]; -f32 D_menu_801CF080; -f32 D_menu_801CF088[8]; -f32 D_menu_801CF0A8[8]; +f32 s3DFontXpos[8]; +f32 s3DFontYpos[8]; +f32 s3DFontZpos[8]; +f32 s3DFontScale; +f32 s3DFontXrot[8]; +f32 s3DFontYrot[8]; f32* D_menu_801CF0C8; f32* D_menu_801CF0CC; f32* D_menu_801CF0D0; @@ -189,12 +191,12 @@ s32 D_menu_801CF0D8[8]; s32 D_menu_801CF0F8[8]; s32 D_menu_801CF118; s32 D_menu_801CF11C; -s32 D_menu_801CF120; +bool D_menu_801CF120; f32 D_menu_801CF124; s32 D_menu_801AF420[2] = { 10, 20 }; -u16* D_menu_801AF428[15][2] = { +u16* sBriefingMsg[15][2] = { { gMsg_ID_1220, gMsg_ID_1230 }, { gMsg_ID_1320, gMsg_ID_1330 }, { gMsg_ID_1300, gMsg_ID_1310 }, { gMsg_ID_1420, gMsg_ID_1430 }, { gMsg_ID_1260, gMsg_ID_1270 }, { gMsg_ID_1440, gMsg_ID_1450 }, @@ -395,9 +397,9 @@ PlanetId sPlanetList[] = { PLANET_SECTOR_Z, PLANET_ZONESS, PLANET_KATINA, PLANET_SECTOR_Y, PLANET_SOLAR, }; -Gfx* D_menu_801AF824[4] = { D_MAP_604A710, D_MAP_604A400, D_MAP_604A190, D_MAP_6049F80 }; +Gfx* sExplosionAnimDLs[4] = { aMapExplosion1DL, aMapExplosion2DL, aMapExplosion3DL, aMapExplosion4DL }; -TitleCard D_menu_801AF834[14] = { +TitleCard sPlanetNameCards[14] = { { D_MAP_6007B90, 128, 28, 95.0f }, { D_MAP_60030D0, 96, 28, 110.0f }, { D_MAP_60131A0, 176, 12, 73.0f }, { D_MAP_6009AD0, 168, 28, 77.0f }, { D_MAP_600B9B0, 168, 28, 74.0f }, { D_MAP_6001C80, 96, 13, 106.0f }, { D_MAP_6011660, 176, 12, 75.0f }, { D_MAP_6010010, 112, 13, 109.0f }, { D_MAP_6017640, 112, 28, 101.0f }, @@ -405,7 +407,7 @@ TitleCard D_menu_801AF834[14] = { { D_MAP_6004AC0, 168, 19, 72.0f }, { D_MAP_6006320, 104, 28, 105.0f }, }; -TitleCard D_menu_801AF914[] = { +TitleCard sPlanetTitleCards[] = { { D_MAP_6008990, 232, 19, 46.0f }, { D_MAP_6003B50, 208, 19, 56.0f }, { D_MAP_60139E0, 128, 19, 98.0f }, { D_MAP_600AD30, 168, 19, 77.0f }, { D_MAP_600CC10, 128, 19, 95.0f }, { D_MAP_6002160, 208, 19, 57.0f }, { D_MAP_6011EA0, 256, 19, 40.0f }, { D_MAP_60105C0, 224, 19, 49.0f }, { D_MAP_6018280, 184, 19, 70.0f }, @@ -417,12 +419,12 @@ char* sPlanetNames[] = { "ME", "A6", "BO", "SZ", "SX", "SY", "KA", "MA", "ZO", "CO", "TI", "AQ", "FO", "VE", "SO", }; -Gfx* D_menu_801AFA30[2] = { - D_MAP_6055F20, - D_MAP_6051D20, +Gfx* sMapGralPepperFaceDLs[2] = { + aMapGralPepperFace1DL, + aMapGralPepperFace2DL, }; -ObjPosition D_menu_801AFA38[] = { +ObjPosition sMapMeteors[] = { { -491.0f, 1170.0f, 20.0f, 0.71f }, { -488.0f, 1135.0f, 15.0f, 0.6f }, { -496.0f, 1090.0f, 0.0f, 0.50f }, { -489.0f, 1200.0f, 0.0f, 0.6f }, { -489.0f, 1150.0f, -15.0f, 0.80f }, { -487.0f, 1143.0f, -15.0f, 0.8f }, { -493.0f, 1182.0f, -20.0f, 0.90f }, { -491.0f, 1080.0f, -25.0f, 0.8f }, { -497.0f, 1114.0f, -25.0f, 0.70f }, @@ -439,7 +441,7 @@ ObjPosition D_menu_801AFA38[] = { { -512.0f, 1099.0f, -15.0f, 0.5f }, { -523.0f, 1179.0f, -30.0f, 0.70f }, { -519.0f, 1176.0f, -30.0f, 0.5f }, }; -ObjPosition D_menu_801AFCD8[4] = { +ObjPosition sMapArea6Ships[4] = { { 50.0f, 1410.0f, 40.0f, 0.10f }, { 35.0f, 1235.0f, 40.0f, 0.03f }, { 42.0f, 1270.0f, 60.0f, 0.05f }, @@ -489,7 +491,7 @@ s32 D_menu_801B0004[47] = { // Looks like a quarter of a circle s32 - D_menu_801B00C0[47][96] = { + sMapQuarterCircleTex[47][96] = { { 0, 2, 2, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 11 }, { 0, 2, 3, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 15, 16, 17 }, { 0, 2, 3, 4, 5, 6, 6, 7, 8, 8, 9, 9, 10, 10, 11, 11, @@ -645,7 +647,7 @@ s32 48, 48, 49, 49, 50, 51, 51, 52, 52, 53, 54, 55, 55, 56, 57, 58, 59, 60, 61, 62, 64, 66 }, }; -Vtx D_menu_801B4740[] = { +Vtx gMapPlanetVTX[] = { VTX(30, 30, 0, 3072, 0, 255, 255, 255, 255), VTX(-30, 30, 0, 0, 0, 255, 255, 255, 255), VTX(-30, 25, 0, 0, 256, 255, 255, 255, 255), VTX(30, 25, 0, 3072, 256, 255, 255, 255, 255), VTX(30, 25, 0, 3072, 0, 255, 255, 255, 255), VTX(-30, 25, 0, 0, 0, 255, 255, 255, 255), @@ -672,44 +674,44 @@ Vtx D_menu_801B4740[] = { VTX(-30, -30, 0, 0, 256, 255, 255, 255, 255), VTX(30, -30, 0, 3072, 256, 255, 255, 255, 255), }; -Gfx D_menu_801B4A40[] = { - gsSPVertex(D_menu_801B4740, 16, 0), - gsDPLoadTextureBlock(D_menu_801B9410, G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, +Gfx gMapVenomCloudDL[] = { + gsSPVertex(gMapPlanetVTX, 16, 0), + gsDPLoadTextureBlock(gMapVenomCloudTex, G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801B9410[96 * 8 * 1], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapVenomCloudTex[96 * 8 * 1], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801B9410[96 * 8 * 2], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapVenomCloudTex[96 * 8 * 2], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801B9410[96 * 8 * 3], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapVenomCloudTex[96 * 8 * 3], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(13, 14, 15, 12, 0), - gsSPVertex(&D_menu_801B4740[16], 16, 0), - gsDPLoadTextureBlock(&D_menu_801B9410[96 * 8 * 4], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsSPVertex(&gMapPlanetVTX[16], 16, 0), + gsDPLoadTextureBlock(&gMapVenomCloudTex[96 * 8 * 4], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801B9410[96 * 8 * 5], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapVenomCloudTex[96 * 8 * 5], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801B9410[96 * 8 * 6], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapVenomCloudTex[96 * 8 * 6], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801B9410[96 * 8 * 7], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapVenomCloudTex[96 * 8 * 7], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(13, 14, 15, 12, 0), - gsSPVertex(&D_menu_801B4740[32], 16, 0), - gsDPLoadTextureBlock(&D_menu_801B9410[96 * 8 * 8], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsSPVertex(&gMapPlanetVTX[32], 16, 0), + gsDPLoadTextureBlock(&gMapVenomCloudTex[96 * 8 * 8], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801B9410[96 * 8 * 9], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapVenomCloudTex[96 * 8 * 9], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801B9410[96 * 8 * 10], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapVenomCloudTex[96 * 8 * 10], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801B9410[96 * 8 * 11], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 8, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapVenomCloudTex[96 * 8 * 11], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 8, 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), gsSP1Quadrangle(13, 14, 15, 12, 0), gsDPPipeSync(), @@ -717,46 +719,46 @@ Gfx D_menu_801B4A40[] = { gsSPEndDisplayList(), }; -Gfx D_menu_801B4D70[] = { - gsDPLoadTLUT_pal256(D_MAP_6026C90), - gsSPVertex(D_menu_801B4740, 16, 0), - gsDPLoadTextureBlock(D_menu_801BB810, G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, +Gfx gMapCorneriaDL[] = { + gsDPLoadTLUT_pal256(gMapCorneriaTLUT), + gsSPVertex(gMapPlanetVTX, 16, 0), + gsDPLoadTextureBlock(gMapCorneriaTex, G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsDPSetTextureLUT(G_TT_RGBA16), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801BB810[96 * 8 * 1], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapCorneriaTex[96 * 8 * 1], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801BB810[96 * 8 * 2], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapCorneriaTex[96 * 8 * 2], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801BB810[96 * 8 * 3], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapCorneriaTex[96 * 8 * 3], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(13, 14, 15, 12, 0), - gsSPVertex(&D_menu_801B4740[16], 16, 0), - gsDPLoadTextureBlock(&D_menu_801BB810[96 * 8 * 4], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsSPVertex(&gMapPlanetVTX[16], 16, 0), + gsDPLoadTextureBlock(&gMapCorneriaTex[96 * 8 * 4], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801BB810[96 * 8 * 5], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapCorneriaTex[96 * 8 * 5], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801BB810[96 * 8 * 6], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapCorneriaTex[96 * 8 * 6], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801BB810[96 * 8 * 7], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapCorneriaTex[96 * 8 * 7], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(13, 14, 15, 12, 0), - gsSPVertex(&D_menu_801B4740[32], 16, 0), - gsDPLoadTextureBlock(&D_menu_801BB810[96 * 8 * 8], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsSPVertex(&gMapPlanetVTX[32], 16, 0), + gsDPLoadTextureBlock(&gMapCorneriaTex[96 * 8 * 8], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801BB810[96 * 8 * 9], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapCorneriaTex[96 * 8 * 9], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801BB810[96 * 8 * 10], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapCorneriaTex[96 * 8 * 10], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801BB810[96 * 8 * 11], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 8, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapCorneriaTex[96 * 8 * 11], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 8, 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), gsSP1Quadrangle(13, 14, 15, 12, 0), gsDPPipeSync(), @@ -764,46 +766,46 @@ Gfx D_menu_801B4D70[] = { gsSPEndDisplayList(), }; -Gfx D_menu_801B50D8[] = { - gsDPLoadTLUT_pal256(D_MAP_6029170), - gsSPVertex(D_menu_801B4740, 16, 0), - gsDPLoadTextureBlock(&D_menu_801BDC10, G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, +Gfx gMapFortunaDL[] = { + gsDPLoadTLUT_pal256(gMapFortunaTLUT), + gsSPVertex(gMapPlanetVTX, 16, 0), + gsDPLoadTextureBlock(&gMapFortunaTex, G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsDPSetTextureLUT(G_TT_RGBA16), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801BDC10[96 * 8 * 1], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapFortunaTex[96 * 8 * 1], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801BDC10[96 * 8 * 2], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapFortunaTex[96 * 8 * 2], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801BDC10[96 * 8 * 3], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapFortunaTex[96 * 8 * 3], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(13, 14, 15, 12, 0), - gsSPVertex(&D_menu_801B4740[16], 16, 0), - gsDPLoadTextureBlock(&D_menu_801BDC10[96 * 8 * 4], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsSPVertex(&gMapPlanetVTX[16], 16, 0), + gsDPLoadTextureBlock(&gMapFortunaTex[96 * 8 * 4], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801BDC10[96 * 8 * 5], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapFortunaTex[96 * 8 * 5], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801BDC10[96 * 8 * 6], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapFortunaTex[96 * 8 * 6], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801BDC10[96 * 8 * 7], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapFortunaTex[96 * 8 * 7], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(13, 14, 15, 12, 0), - gsSPVertex(&D_menu_801B4740[32], 16, 0), - gsDPLoadTextureBlock(&D_menu_801BDC10[96 * 8 * 8], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsSPVertex(&gMapPlanetVTX[32], 16, 0), + gsDPLoadTextureBlock(&gMapFortunaTex[96 * 8 * 8], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801BDC10[96 * 8 * 9], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapFortunaTex[96 * 8 * 9], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801BDC10[96 * 8 * 10], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapFortunaTex[96 * 8 * 10], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801BDC10[96 * 8 * 11], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 8, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapFortunaTex[96 * 8 * 11], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 8, 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), gsSP1Quadrangle(13, 14, 15, 12, 0), gsDPPipeSync(), @@ -811,46 +813,46 @@ Gfx D_menu_801B50D8[] = { gsSPEndDisplayList(), }; -Gfx D_menu_801B5440[] = { - gsDPLoadTLUT_pal256(D_MAP_6022340), - gsSPVertex(D_menu_801B4740, 16, 0), - gsDPLoadTextureBlock(D_menu_801C0010, G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, +Gfx gMapAquasDL[] = { + gsDPLoadTLUT_pal256(gMapAquasTLUT), + gsSPVertex(gMapPlanetVTX, 16, 0), + gsDPLoadTextureBlock(gMapAquasTex, G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsDPSetTextureLUT(G_TT_RGBA16), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801C0010[96 * 8 * 1], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapAquasTex[96 * 8 * 1], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801C0010[96 * 8 * 2], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapAquasTex[96 * 8 * 2], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801C0010[96 * 8 * 3], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapAquasTex[96 * 8 * 3], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(13, 14, 15, 12, 0), - gsSPVertex(&D_menu_801B4740[16], 16, 0), - gsDPLoadTextureBlock(&D_menu_801C0010[96 * 8 * 4], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsSPVertex(&gMapPlanetVTX[16], 16, 0), + gsDPLoadTextureBlock(&gMapAquasTex[96 * 8 * 4], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801C0010[96 * 8 * 5], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapAquasTex[96 * 8 * 5], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801C0010[96 * 8 * 6], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapAquasTex[96 * 8 * 6], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801C0010[96 * 8 * 7], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapAquasTex[96 * 8 * 7], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(13, 14, 15, 12, 0), - gsSPVertex(&D_menu_801B4740[32], 16, 0), - gsDPLoadTextureBlock(&D_menu_801C0010[96 * 8 * 8], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsSPVertex(&gMapPlanetVTX[32], 16, 0), + gsDPLoadTextureBlock(&gMapAquasTex[96 * 8 * 8], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801C0010[96 * 8 * 9], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapAquasTex[96 * 8 * 9], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801C0010[96 * 8 * 10], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapAquasTex[96 * 8 * 10], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801C0010[96 * 8 * 11], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 8, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapAquasTex[96 * 8 * 11], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 8, 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), gsSP1Quadrangle(13, 14, 15, 12, 0), gsDPPipeSync(), @@ -858,46 +860,46 @@ Gfx D_menu_801B5440[] = { gsSPEndDisplayList(), }; -Gfx D_menu_801B57A8[] = { - gsDPLoadTLUT_pal256(D_MAP_60247E0), - gsSPVertex(D_menu_801B4740, 16, 0), - gsDPLoadTextureBlock(D_menu_801C2410, G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, +Gfx gMapVenomDL[] = { + gsDPLoadTLUT_pal256(gMapVenomTLUT), + gsSPVertex(gMapPlanetVTX, 16, 0), + gsDPLoadTextureBlock(gMapVenomTex, G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsDPSetTextureLUT(G_TT_RGBA16), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801C2410[96 * 8 * 1], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapVenomTex[96 * 8 * 1], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801C2410[96 * 8 * 2], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapVenomTex[96 * 8 * 2], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801C2410[96 * 8 * 3], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapVenomTex[96 * 8 * 3], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(13, 14, 15, 12, 0), - gsSPVertex(&D_menu_801B4740[16], 16, 0), - gsDPLoadTextureBlock(&D_menu_801C2410[96 * 8 * 4], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsSPVertex(&gMapPlanetVTX[16], 16, 0), + gsDPLoadTextureBlock(&gMapVenomTex[96 * 8 * 4], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801C2410[96 * 8 * 5], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapVenomTex[96 * 8 * 5], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801C2410[96 * 8 * 6], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapVenomTex[96 * 8 * 6], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801C2410[96 * 8 * 7], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapVenomTex[96 * 8 * 7], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(13, 14, 15, 12, 0), - gsSPVertex(&D_menu_801B4740[32], 16, 0), - gsDPLoadTextureBlock(&D_menu_801C2410[96 * 8 * 8], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsSPVertex(&gMapPlanetVTX[32], 16, 0), + gsDPLoadTextureBlock(&gMapVenomTex[96 * 8 * 8], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801C2410[96 * 8 * 9], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapVenomTex[96 * 8 * 9], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801C2410[96 * 8 * 10], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapVenomTex[96 * 8 * 10], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801C2410[96 * 8 * 11], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 8, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapVenomTex[96 * 8 * 11], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 8, 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), gsSP1Quadrangle(13, 14, 15, 12, 0), gsDPPipeSync(), @@ -905,46 +907,46 @@ Gfx D_menu_801B57A8[] = { gsSPEndDisplayList(), }; -Gfx D_menu_801B5B10[] = { - gsDPLoadTLUT_pal256(D_MAP_602FF60), - gsSPVertex(D_menu_801B4740, 16, 0), - gsDPLoadTextureBlock(D_menu_801C4810, G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, +Gfx gMapTitaniaDL[] = { + gsDPLoadTLUT_pal256(gMapTitaniaTLUT), + gsSPVertex(gMapPlanetVTX, 16, 0), + gsDPLoadTextureBlock(gMapTitaniaTex, G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsDPSetTextureLUT(G_TT_RGBA16), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801C4810[96 * 8 * 1], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapTitaniaTex[96 * 8 * 1], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801C4810[96 * 8 * 2], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapTitaniaTex[96 * 8 * 2], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801C4810[96 * 8 * 3], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapTitaniaTex[96 * 8 * 3], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(13, 14, 15, 12, 0), - gsSPVertex(&D_menu_801B4740[16], 16, 0), - gsDPLoadTextureBlock(&D_menu_801C4810[96 * 8 * 4], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsSPVertex(&gMapPlanetVTX[16], 16, 0), + gsDPLoadTextureBlock(&gMapTitaniaTex[96 * 8 * 4], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801C4810[96 * 8 * 5], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapTitaniaTex[96 * 8 * 5], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801C4810[96 * 8 * 6], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapTitaniaTex[96 * 8 * 6], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801C4810[96 * 8 * 7], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapTitaniaTex[96 * 8 * 7], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(13, 14, 15, 12, 0), - gsSPVertex(&D_menu_801B4740[32], 16, 0), - gsDPLoadTextureBlock(&D_menu_801C4810[96 * 8 * 8], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsSPVertex(&gMapPlanetVTX[32], 16, 0), + gsDPLoadTextureBlock(&gMapTitaniaTex[96 * 8 * 8], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801C4810[96 * 8 * 9], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapTitaniaTex[96 * 8 * 9], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801C4810[96 * 8 * 10], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapTitaniaTex[96 * 8 * 10], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801C4810[96 * 8 * 11], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 8, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapTitaniaTex[96 * 8 * 11], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 8, 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), gsSP1Quadrangle(13, 14, 15, 12, 0), gsDPPipeSync(), @@ -952,46 +954,46 @@ Gfx D_menu_801B5B10[] = { gsSPEndDisplayList(), }; -Gfx D_menu_801B5E78[] = { - gsDPLoadTLUT_pal256(D_MAP_602B620), - gsSPVertex(D_menu_801B4740, 16, 0), - gsDPLoadTextureBlock(D_menu_801C6C10, G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, +Gfx gMapKatinaDL[] = { + gsDPLoadTLUT_pal256(gMapKatinaTLUT), + gsSPVertex(gMapPlanetVTX, 16, 0), + gsDPLoadTextureBlock(gMapKatinaTex, G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsDPSetTextureLUT(G_TT_RGBA16), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801C6C10[96 * 8 * 1], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapKatinaTex[96 * 8 * 1], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801C6C10[96 * 8 * 2], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapKatinaTex[96 * 8 * 2], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801C6C10[96 * 8 * 3], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapKatinaTex[96 * 8 * 3], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(13, 14, 15, 12, 0), - gsSPVertex(&D_menu_801B4740[16], 16, 0), - gsDPLoadTextureBlock(&D_menu_801C6C10[96 * 8 * 4], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsSPVertex(&gMapPlanetVTX[16], 16, 0), + gsDPLoadTextureBlock(&gMapKatinaTex[96 * 8 * 4], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801C6C10[96 * 8 * 5], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapKatinaTex[96 * 8 * 5], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801C6C10[96 * 8 * 6], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapKatinaTex[96 * 8 * 6], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801C6C10[96 * 8 * 7], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapKatinaTex[96 * 8 * 7], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(13, 14, 15, 12, 0), - gsSPVertex(&D_menu_801B4740[32], 16, 0), - gsDPLoadTextureBlock(&D_menu_801C6C10[96 * 8 * 8], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsSPVertex(&gMapPlanetVTX[32], 16, 0), + gsDPLoadTextureBlock(&gMapKatinaTex[96 * 8 * 8], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801C6C10[96 * 8 * 9], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapKatinaTex[96 * 8 * 9], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801C6C10[96 * 8 * 10], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapKatinaTex[96 * 8 * 10], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801C6C10[96 * 8 * 11], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 8, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapKatinaTex[96 * 8 * 11], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 8, 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), gsSP1Quadrangle(13, 14, 15, 12, 0), gsDPPipeSync(), @@ -999,46 +1001,46 @@ Gfx D_menu_801B5E78[] = { gsSPEndDisplayList(), }; -Gfx D_menu_801B61E0[] = { - gsDPLoadTLUT_pal256(D_MAP_602DAD0), - gsSPVertex(D_menu_801B4740, 16, 0), - gsDPLoadTextureBlock(D_menu_801C9010, G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, +Gfx gMapMacbethDL[] = { + gsDPLoadTLUT_pal256(gMapMacbethTLUT), + gsSPVertex(gMapPlanetVTX, 16, 0), + gsDPLoadTextureBlock(gMapMacbethTex, G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsDPSetTextureLUT(G_TT_RGBA16), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801C9010[96 * 8 * 1], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapMacbethTex[96 * 8 * 1], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801C9010[96 * 8 * 2], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapMacbethTex[96 * 8 * 2], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801C9010[96 * 8 * 3], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapMacbethTex[96 * 8 * 3], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(13, 14, 15, 12, 0), - gsSPVertex(&D_menu_801B4740[16], 16, 0), - gsDPLoadTextureBlock(&D_menu_801C9010[96 * 8 * 4], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsSPVertex(&gMapPlanetVTX[16], 16, 0), + gsDPLoadTextureBlock(&gMapMacbethTex[96 * 8 * 4], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801C9010[96 * 8 * 5], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapMacbethTex[96 * 8 * 5], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801C9010[96 * 8 * 6], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapMacbethTex[96 * 8 * 6], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801C9010[96 * 8 * 7], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapMacbethTex[96 * 8 * 7], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(13, 14, 15, 12, 0), - gsSPVertex(&D_menu_801B4740[32], 16, 0), - gsDPLoadTextureBlock(&D_menu_801C9010[96 * 8 * 8], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsSPVertex(&gMapPlanetVTX[32], 16, 0), + gsDPLoadTextureBlock(&gMapMacbethTex[96 * 8 * 8], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801C9010[96 * 8 * 9], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapMacbethTex[96 * 8 * 9], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801C9010[96 * 8 * 10], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapMacbethTex[96 * 8 * 10], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801C9010[96 * 8 * 11], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 8, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapMacbethTex[96 * 8 * 11], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 8, 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), gsSP1Quadrangle(13, 14, 15, 12, 0), gsDPPipeSync(), @@ -1046,46 +1048,46 @@ Gfx D_menu_801B61E0[] = { gsSPEndDisplayList(), }; -Gfx D_menu_801B6548[] = { - gsDPLoadTLUT_pal256(D_MAP_60323D0), - gsSPVertex(D_menu_801B4740, 16, 0), - gsDPLoadTextureBlock(D_menu_801CB410, G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, +Gfx gMapZonessDL[] = { + gsDPLoadTLUT_pal256(gMapZonessTLUT), + gsSPVertex(gMapPlanetVTX, 16, 0), + gsDPLoadTextureBlock(gMapZonessTex, G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsDPSetTextureLUT(G_TT_RGBA16), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(D_menu_801CB410 + (96 * 8 * 1), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(gMapZonessTex + (96 * 8 * 1), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(D_menu_801CB410 + (96 * 8 * 2), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(gMapZonessTex + (96 * 8 * 2), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(D_menu_801CB410 + (96 * 8 * 3), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(gMapZonessTex + (96 * 8 * 3), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(13, 14, 15, 12, 0), - gsSPVertex(&D_menu_801B4740[16], 16, 0), - gsDPLoadTextureBlock(D_menu_801CB410 + (96 * 8 * 4), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsSPVertex(&gMapPlanetVTX[16], 16, 0), + gsDPLoadTextureBlock(gMapZonessTex + (96 * 8 * 4), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(D_menu_801CB410 + (96 * 8 * 5), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(gMapZonessTex + (96 * 8 * 5), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(D_menu_801CB410 + (96 * 8 * 6), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(gMapZonessTex + (96 * 8 * 6), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(D_menu_801CB410 + (96 * 8 * 7), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(gMapZonessTex + (96 * 8 * 7), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(13, 14, 15, 12, 0), - gsSPVertex(&D_menu_801B4740[32], 16, 0), - gsDPLoadTextureBlock(D_menu_801CB410 + (96 * 8 * 8), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsSPVertex(&gMapPlanetVTX[32], 16, 0), + gsDPLoadTextureBlock(gMapZonessTex + (96 * 8 * 8), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(D_menu_801CB410 + (96 * 8 * 9), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(gMapZonessTex + (96 * 8 * 9), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(D_menu_801CB410 + (96 * 8 * 10), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(gMapZonessTex + (96 * 8 * 10), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 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), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(D_menu_801CB410 + (96 * 8 * 11), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 8, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(gMapZonessTex + (96 * 8 * 11), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 8, 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), gsSP1Quadrangle(13, 14, 15, 12, 0), gsDPPipeSync(), @@ -1093,116 +1095,118 @@ Gfx D_menu_801B6548[] = { gsSPEndDisplayList(), }; -u8* D_menu_801B68B0[] = { - D_menu_801C6C10, D_menu_801C9010, D_menu_801CB410, D_menu_801BB810, D_menu_801C4810, - D_menu_801C0010, D_menu_801BDC10, D_menu_801C2410, D_menu_801B9410, +// BSS +u8* gBSSMapPlanetTextures[9] = { + gMapKatinaTex, gMapMacbethTex, gMapZonessTex, gMapCorneriaTex, gMapTitaniaTex, + gMapAquasTex, gMapFortunaTex, gMapVenomTex, gMapVenomCloudTex, }; -u8* D_menu_801B68D4[] = { - D_MAP_6029220, D_MAP_602B6D0, D_MAP_602FFD0, D_MAP_6024890, D_MAP_602DB60, - D_MAP_601FF40, D_MAP_6026D70, D_MAP_60223E0, D_MAP_60190B0, +// AST_MAP +u8* gAssetMapPlanetTextures[9] = { + aMapKatinaTex, aMapMacbethTex, aMapZonessTex, aMapCorneriaTex, aMapTitaniaTex, + aMapAquasTex, aMapFortunaTex, aMapVenomTex, aMapVenomCloudTex, }; -Gfx* D_menu_801B68F8[] = { - D_MAP_6060610, D_MAP_601DE80, D_MAP_604B750, D_MAP_601F6B0, D_MAP_601C0D0, - D_MAP_601C960, D_menu_801B5E78, D_menu_801B61E0, D_menu_801B6548, D_menu_801B4D70, - D_menu_801B5B10, D_menu_801B5440, D_menu_801B50D8, D_menu_801B57A8, D_MAP_604DB10, +Gfx* sMapPlanets[PLANET_MAX] = { + aMapMeteorDL, aMapArea6DL, aMapBolseDL, aMapSectorZDL, aMapSectorXDL, + aMapSectorYDL, gMapKatinaDL, gMapMacbethDL, gMapZonessDL, gMapCorneriaDL, + gMapTitaniaDL, gMapAquasDL, gMapFortunaDL, gMapVenomDL, aMapSolarDL, }; void Map_8019E800(void); -void Map_8019E99C(void); -void Map_8019F164(void); -void Map_8019F42C(void); -void Map_8019F600(void); -void Map_8019F910(void); -void Map_8019F97C(void); -void Map_8019F83C(void); -void Map_8019FA1C(void); -void Map_8019FC04(void); -bool Map_8019FD1C(LevelId levelId, s32 arg1); -void Map_8019FF48(void); +void Map_Setup(void); +void Map_Setup_Play(void); +void Map_Setup_GameOver(void); +void Map_Setup_Menu(void); +void Map_TeamStatus_Refill(void); +void Map_Level_CamSetup(void); +void Map_PathStatus_Setup(void); +void Map_CurrentPlanet_SetAlpha(void); +void Map_PlanetExplosions_Setup(void); +bool Map_PlanetSaveSlot_Setup(LevelId, PlanetSaveSlotTypes); +void Map_Update(void); s32 Map_801A05B4(void); -void Map_801A0788(void); -void Map_801A0954(void); -void Map_801A0D14(void); -void Map_801A1528(void); -void Map_801A116C(void); -void Map_801A19A8(void); -void Map_801A1C14(void); -bool Map_801A2304(void); -f32 Map_801A25C8(PlanetId); +void Map_Starfield_Setup(void); +void Map_Prologue_Update(void); +void Map_Prologue_Draw(void); +void Map_LylatCard_Update(void); +void Map_PrologueArwing_Draw(void); +void Map_LylatCard_Draw(void); +void Map_ZoomPlanet_Update(void); +bool Map_GralPepper_Talk(void); +f32 Map_GetPlanetCamZDist(PlanetId); void Map_801A2674(void); void Map_801A281C(void); -void Map_801A2B8C(void); +void Map_ZoomPlanetPath_Update(void); void Map_801A2EB8(void); void Map_801A3440(f32); void Map_801A3550(Vec3f*, Vec3f*, Vec3f*, f32); -void Map_801A36A8(void); -void Map_801A3A00(void); +void Map_GameOver_Update(void); +void Map_GameOver_3DFont(void); void Map_801A4394(void); -void Map_801A4650(void); +void Map_GameOver_Draw(void); void Map_801A48C0(f32 speed); void Map_801A4A38(f32 arg0); -void Map_801A4AE8(void); -void Map_801A4D0C(u32); -void Map_801A4D7C(void); -void Map_801A4F8C(void); -void Map_801A4FC4(void); -void Map_801A53C8(void); -void Map_801A5834(void); -void Map_801A5C90(void); -bool Map_801A5770(void); -void Map_801A5E80(void); -void Map_801A6368(void); -void Map_801A61B4(LevelId level); -bool Map_801A62FC(PlanetId planet); +void Map_PathChange_Update(void); +void Map_PathChange_UpdateEntry(u32); +void Map_PathChange_Input(void); +void Map_GoToGameOver(void); +void Map_RetryCourse(void); +void Map_ChangePath(void); +void Map_PathChange_DrawOptions(void); +void Map_RestartLevelLifeDown_Draw(void); +bool Map_Input_CursorY(void); +void Map_LevelStart_Update(void); +void Map_CurrentLevel_Setup(void); +void Map_LevelStart_AudioSpecSetup(LevelId level); +bool Map_LevelPlayedStatus_Check(PlanetId planet); s32 Map_GetPathId(PlanetId start, PlanetId end); -void Map_801A6628(void); -void Map_801A6694(void); -void Map_801A68E4(void); -void Map_801A6A24(void); -void Map_801A6A98(PlanetId); -s32 Map_801A6DAC(PlanetId planetId); -void Map_801A6EC0(PlanetId planetId); -void Map_801A7230(PlanetId planetId); -void Map_801A74F4(PlanetId); -void Map_801A7684(PlanetId planetId); -void Map_801A77B0(PlanetId planetId); -void Map_801A791C(PlanetId planetId); -void Map_801A7A84(PlanetId planetId); -void Map_801A7BEC(f32* zAngle, f32 next, f32 scale); -void Map_801A7D3C(PlanetId planetId); -void Map_801A7F1C(PlanetId planetId); -void Map_801A914C(void); -void Map_801A9EE4(void); -void Map_801AD11C(void); -void Map_801AD718(f32, f32, f32, f32*, f32*, f32*, f32, f32, f32); +void Map_PlayLevel(void); +void Map_PositionPlanets(void); +void Map_PlanetOrderZpos(void); +void Map_Fade_Update(void); +void Map_Planet_Draw(PlanetId); +s32 Map_CheckPlanetMedal(PlanetId planetId); +void Map_PlanetAnim2(PlanetId planetId); +void Map_PlanetAnim(PlanetId planetId); +void Map_SolarRays_Draw(PlanetId); +void Map_VenomCloud2_Draw(PlanetId planetId); +void Map_PlanetShadow_Draw(PlanetId planetId); +void Map_Titania_DrawRings1(PlanetId planetId); +void Map_Titania_DrawRings2(PlanetId planetId); +void Map_VenomCloud_Draw(f32* zAngle, f32 next, f32 scale); +void Map_PlanetCleared2_Draw(PlanetId planetId); +void Map_PlanetCleared_Draw(PlanetId planetId); +void Map_PositionCursor(void); +void Map_TotalHits_Draw(void); +void Map_Idle_Update(void); +void Map_SetCamRot(f32, f32, f32, f32*, f32*, f32*, f32, f32, f32); PlanetId Map_GetPlanetId(LevelId level); -void Map_801A809C(PlanetId planetId); -void Map_801A8738(void); -void Map_801A89BC(PlanetId, s32); -void Map_801A8F40(void); -void Map_801A9224(void); -void Map_801A9448(void); -void Map_801A9814(void); -void Map_801A9910(void); +void Map_PlanetMedal_Draw(PlanetId planetId); +void Map_CorneriaExplosion_Draw(void); +void Map_PlanetExplosions_Draw(PlanetId, PlanetExplosions); +void Map_Cursor_draw(void); +void Map_MeteoMeteors_Draw(void); +void Map_Area6Ships_Draw(void); +void Map_Wipe_Draw(void); +void Map_TitleCards_Draw(void); void Map_801A9A8C(void); void Map_801A9DE8(void); -void Map_801AA1CC(s32); -void Map_801AA434(s32, f32, f32, s32); -void Map_801AA778(s32, f32, f32, PlanetId); -void Map_801AB17C(f32 x, f32 y, f32 z); -void Map_801AB284(void); -void Map_801AB300(void); -void Map_801AB978(s32); -void Map_801ABCDC(s32 arg0, s32 alpha); -void Map_801ABF1C(void); -void Map_801AC200(s32); -void Map_801AC530(s32 index); -void Map_801AC80C(PathType); -void Map_801AC9A0(s32); -void Map_801ACD90(s32 index, Vec3f* src, Vec3f* dest); -void Map_801AD048(void); +void Map_PathLineBox_Draw(s32); +void Map_PathInfo_Draw(s32, f32, f32, s32); +void Map_PathPlanet_Draw(s32, f32, f32, PlanetId); +void Map_PathPlanetMedal_Draw(f32 x, f32 y, f32 z); +void Map_BriefingRadio_Setup(void); +void Map_BriefingRadio_Update(void); +void Map_BriefingRadio_Draw(s32); +void Map_TeamDownWrench_Draw(s32 teamIdx, s32 alpha); +void Map_GralPepperFace_Draw(void); +void Map_Path_Draw(s32); +void Map_Arwing_Draw(s32 index); +void Map_PathLine_Draw(PathType); +void Map_PathLines_Draw(s32); +void Map_PathLinePos(s32 index, Vec3f* src, Vec3f* dest); +void Map_CamMatrixRot(void); void Map_8019E800(void) { Memory_FreeAll(); @@ -1214,7 +1218,7 @@ void Map_8019E800(void) { gDrawMode = DRAW_NONE; } -void Map_8019E85C(void) { +void Map_GameOver(void) { switch (D_ctx_80177868) { case 0: if (gNextGameStateTimer == 0) { @@ -1235,14 +1239,14 @@ void Map_8019E8C8(void) { } void Map_Main(void) { - if (D_menu_801CD9B8 > 0) { - D_menu_801CD9B8--; + if (sMapTimer1 > 0) { + sMapTimer1--; } - if (D_menu_801CD9BC > 0) { - D_menu_801CD9BC--; + if (sMapTimer2 > 0) { + sMapTimer2--; } - if (D_menu_801CD9C0 > 0) { - D_menu_801CD9C0--; + if (sMapTimer3 > 0) { + sMapTimer3--; } switch (gMapState) { @@ -1254,17 +1258,17 @@ void Map_Main(void) { case 1: gDrawMode = DRAW_NONE; - Map_8019E99C(); + Map_Setup(); break; case 2: gDrawMode = DRAW_MAP; - Map_8019FF48(); + Map_Update(); break; } } -void Map_8019E99C(void) { +void Map_Setup(void) { s32 i; s32 j; @@ -1273,20 +1277,20 @@ void Map_8019E99C(void) { gVIsPerFrame = 2; gGameFrameCount = 0; - Title_80188010(); + Title_GetRankTotalHits(); D_menu_801CD83C = Map_801A05B4(); - D_menu_801CD980 = 0; + D_menu_801CD980 = false; D_menu_801CD984 = 0; D_menu_801CD98C = 0; D_menu_801CD990 = 0; D_menu_801CD994 = 0; - D_menu_801CD9CC = 0; + sRestartLevelStates = 0; - D_menu_801CEB48[0] = false; - D_menu_801CEB48[1] = false; - D_menu_801CEB48[2] = false; + sPlanetExplosions[EXPLOSIONS_CORNERIA] = false; + sPlanetExplosions[EXPLOSIONS_KATINA] = false; + sPlanetExplosions[EXPLOSIONS_SECTOR_Y] = false; for (i = 0; i < 10; i++) { D_menu_801CEB58[1][i] = 0; @@ -1316,21 +1320,20 @@ void Map_8019E99C(void) { D_menu_801CEAF8[j] = -90.0f; } - D_menu_801CDA20 = 0.0f; - D_menu_801CDA24 = 1.0f; - D_menu_801CDA28 = 0.0f; - D_menu_801CDA00 = -150.55215f; - D_menu_801CDA04 = -489.68f; - D_menu_801CDA08 = 0.0f; + sMapCamUpX = 0.0f; + sMapCamUpY = 1.0f; + sMapCamUpZ = 0.0f; + sMapCamAtX = -150.55215f; + sMapCamAtY = -489.68f; + sMapCamAtZ = 0.0f; D_menu_801CDA0C = -42.750008f; D_menu_801CDA10 = -9.849999f; D_menu_801CDA14 = 3375.0f; // 15^3 D_menu_801CDA18 = 0.0f; D_menu_801CDA1C = 0.0f; - Map_801AD718(D_menu_801CDA00, D_menu_801CDA04, D_menu_801CDA08, &D_menu_801CD9F4, &D_menu_801CD9F8, - &D_menu_801CD9FC, D_menu_801CDA14, D_menu_801CDA0C + D_menu_801CDA18, - D_menu_801CDA10 + D_menu_801CDA1C); + Map_SetCamRot(sMapCamAtX, sMapCamAtY, sMapCamAtZ, &sMapCamEyeX, &sMapCamEyeY, &sMapCamEyeZ, D_menu_801CDA14, + D_menu_801CDA0C + D_menu_801CDA18, D_menu_801CDA10 + D_menu_801CDA1C); for (i = 0; i < 15; i++) { D_menu_801CD8A0[i] = i; @@ -1352,72 +1355,73 @@ void Map_8019E99C(void) { D_menu_801CEA5C = 0.0f; D_menu_801CEA60 = 0.0f; - Map_801A0788(); + Map_Starfield_Setup(); - D_menu_801B8280 = 0; - D_menu_801B8284 = 0; - D_menu_801CD9B8 = 0; - D_menu_801CD9BC = 0; - D_menu_801CD9C0 = 0; + sLevelStartState = 0; + sWipeHeight = 0; + sMapTimer1 = 0; + sMapTimer2 = 0; + sMapTimer3 = 0; D_menu_801CD964 = 0; D_menu_801CD968 = 0; - D_menu_801CD96C = 0; - D_menu_801CEA6C = 0.0f; - D_menu_801CEA70 = 0.002f; + D_menu_801CD96C = false; + sMapPlanetCardAlpha = 0.0f; + sMapPlanetCardAlphaScale = 0.002f; AUDIO_PLAY_BGM(NA_BGM_MAP); D_menu_801CEFC4 = 0; D_menu_801CEFC8 = 0; - D_menu_801CEFD0 = 0; + D_menu_801CEFD0 = false; D_menu_801CD974 = 0; - for (i = 0; i < 24; i++) { - D_menu_801CD840[i] = i; + for (i = 0; i < ARRAY_COUNT(sPaths); i++) { + sUnusedPathIdx[i] = i; sPaths[i].unk_14 = 0; } - Map_801A6694(); + Map_PositionPlanets(); switch (gLastGameState) { default: - case 0: - Map_8019F600(); + case GSTATE_NONE: + Map_Setup_Menu(); break; - case 7: - Map_8019F164(); + case GSTATE_PLAY: + Map_Setup_Play(); break; - case 5: - Map_8019F42C(); + case GSTATE_GAME_OVER: + Map_Setup_GameOver(); break; } - Map_801A914C(); + Map_PositionCursor(); for (i = 0; i < 96 * 96; i++) { - D_menu_801BB810[i] = 106; - D_menu_801BDC10[i] = 84; - D_menu_801C0010[i] = 75; - D_menu_801C2410[i] = 81; - D_menu_801C4810[i] = 55; - D_menu_801C6C10[i] = 82; - D_menu_801C9010[i] = 68; - D_menu_801CB410[i] = 52; - D_menu_801B9410[i] = 0; + gMapCorneriaTex[i] = 106; + gMapFortunaTex[i] = 84; + gMapAquasTex[i] = 75; + gMapVenomTex[i] = 81; + gMapTitaniaTex[i] = 55; + gMapKatinaTex[i] = 82; + gMapMacbethTex[i] = 68; + gMapZonessTex[i] = 52; + gMapVenomCloudTex[i] = 0; } - for (i = 0; i < 9; i++) { + for (i = 0; i < ARRAY_COUNT(gBSSMapPlanetTextures); i++) { D_menu_801CD818[i] = 0.0f; - Map_801A07E8(D_menu_801B68B0[i], SEGMENTED_TO_VIRTUAL(D_menu_801B68D4[i]), &D_menu_801CD818[i]); + Map_Texture_Sphere(gBSSMapPlanetTextures[i], SEGMENTED_TO_VIRTUAL(gAssetMapPlanetTextures[i]), + &D_menu_801CD818[i]); } D_menu_801CD810 = 0; gMapState = 2; - D_menu_801CD948 = 0; + sMapSubState = 0; D_menu_801CEEC4 = 0; D_menu_801CEEC8 = 5; D_menu_801CEFF4 = 255.0f; @@ -1431,7 +1435,7 @@ void Map_8019E99C(void) { D_menu_801CEB34 = -1; } -void Map_8019F164(void) { +void Map_Setup_Play(void) { s32 i; D_menu_801CD974 = 1; @@ -1458,23 +1462,23 @@ void Map_8019F164(void) { sPrevPlanetId = sCurrentPlanetId; - D_menu_801CD980 = Map_8019FD1C(gCurrentLevel, 0); + D_menu_801CD980 = Map_PlanetSaveSlot_Setup(gCurrentLevel, SAVETYPE_PLAYED); - Map_8019FD1C(gCurrentLevel, 2); + Map_PlanetSaveSlot_Setup(gCurrentLevel, SAVETYPE_CLEAR); if (gLeveLClearStatus[gCurrentLevel] == 2) { D_menu_801CD98C = 1; gMissionMedal[gMissionNumber] = 1; - Map_8019FD1C(gCurrentLevel, 1); + Map_PlanetSaveSlot_Setup(gCurrentLevel, SAVETYPE_MEDAL); } Save_Write(); - Map_8019F97C(); + Map_Level_CamSetup(); - Map_8019F83C(); + Map_PathStatus_Setup(); - Map_8019FA1C(); + Map_CurrentPlanet_SetAlpha(); switch (sPrevMissionStatus) { case MISSION_COMPLETE: @@ -1492,10 +1496,10 @@ void Map_8019F164(void) { gMissionNumber++; - Map_8019FC04(); + Map_PlanetExplosions_Setup(); D_menu_801CEFC4 = 0; - D_menu_801CEFD0 = 0; + D_menu_801CEFD0 = false; D_menu_801CEFE0 = 32.0f; D_menu_801CEFE8[0] = 255.0f; @@ -1511,10 +1515,10 @@ void Map_8019F164(void) { gHitCount = 0; D_menu_801CD94C = 0; - D_menu_801CD944 = 5; + sMapState = MAP_ZOOM_PLANET_PATH; } -void Map_8019F42C(void) { +void Map_Setup_GameOver(void) { s32 i; gTotalHits += gHitCount; @@ -1525,10 +1529,10 @@ void Map_8019F42C(void) { gMissionHitCount[gMissionNumber] = gHitCount; - Map_8019F910(); - Map_8019FD1C(gCurrentLevel, 0); + Map_TeamStatus_Refill(); + Map_PlanetSaveSlot_Setup(gCurrentLevel, SAVETYPE_PLAYED); Save_Write(); - Map_8019F83C(); + Map_PathStatus_Setup(); for (i = 0; i < 7; i++) { D_menu_801CD8E0[i] = 0; @@ -1548,18 +1552,18 @@ void Map_8019F42C(void) { sPlanets[i].alpha = 0; } - Map_8019FC04(); + Map_PlanetExplosions_Setup(); D_menu_801CD9AC = 0; AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_25); - D_menu_801CD948 = 0; + sMapSubState = 0; D_menu_801CD94C = 0; - D_menu_801CD944 = 7; + sMapState = MAP_GAME_OVER; } -void Map_8019F600(void) { +void Map_Setup_Menu(void) { s32 i; s32 path1; s32 path2; @@ -1582,7 +1586,7 @@ void Map_8019F600(void) { sPrevPlanetId = PLANET_NONE; - for (i = 0; i < ARRAY_COUNT(sPlanets); i++) { + for (i = 0; i < PLANET_MAX; i++) { sPlanets[i].alpha = 0; } @@ -1598,6 +1602,7 @@ void Map_8019F600(void) { gMissionHitCount[i] = 0; gMissionTeamStatus[i] = 0x00FFFFFF; } + gMissionPlanet[0] = PLANET_CORNERIA; gMissionPlanet[1] = PLANET_NONE; gMissionPlanet[2] = PLANET_NONE; @@ -1617,7 +1622,7 @@ void Map_8019F600(void) { D_menu_801CEA9C = 0.0f; D_menu_801CD9B0 = 0.002f; D_menu_801CD9B4 = 0.01f; - D_menu_801CD944 = 0; + sMapState = MAP_PROLOGUE; path1 = Map_GetPathId(sCurrentPlanetId, sPlanets[sCurrentPlanetId].dest1); path2 = Map_GetPathId(sCurrentPlanetId, sPlanets[sCurrentPlanetId].dest2); @@ -1625,12 +1630,13 @@ void Map_8019F600(void) { gPlanetPathStatus[path2] = 1; } -void Map_8019F83C(void) { +void Map_PathStatus_Setup(void) { s32 i; D_menu_801CD970 = 0; - for (i = 0; i < 24; i++) { + //! @bug gPlanetPathStatus is 2 shorter than sPaths + for (i = 0; i < ARRAY_COUNT(sPaths); i++) { if ((gPlanetPathStatus[i] == 4) || (gPlanetPathStatus[i] == 5) || (gPlanetPathStatus[i] == 1) || (gPlanetPathStatus[i] == 11)) { gPlanetPathStatus[i] = 0; @@ -1645,7 +1651,7 @@ void Map_8019F83C(void) { } } -void Map_8019F910(void) { +void Map_TeamStatus_Refill(void) { s32 i; s32 mask = 0x00FF0000; @@ -1659,16 +1665,16 @@ void Map_8019F910(void) { } } -void Map_8019F97C(void) { - D_menu_801CEA54 = Map_801A25C8(sCurrentPlanetId); +void Map_Level_CamSetup(void) { + sCurrentPlanetCamZDist = Map_GetPlanetCamZDist(sCurrentPlanetId); - D_menu_801CD9F4 = D_menu_801CDA00 = sPlanets[sCurrentPlanetId].pos.x; - D_menu_801CD9F8 = D_menu_801CDA04 = sPlanets[sCurrentPlanetId].pos.y; - D_menu_801CDA08 = sPlanets[sCurrentPlanetId].pos.z; - D_menu_801CD9FC = sPlanets[sCurrentPlanetId].pos.z + D_menu_801CEA54; + sMapCamEyeX = sMapCamAtX = sPlanets[sCurrentPlanetId].pos.x; + sMapCamEyeY = sMapCamAtY = sPlanets[sCurrentPlanetId].pos.y; + sMapCamAtZ = sPlanets[sCurrentPlanetId].pos.z; + sMapCamEyeZ = sPlanets[sCurrentPlanetId].pos.z + sCurrentPlanetCamZDist; } -void Map_8019FA1C(void) { +void Map_CurrentPlanet_SetAlpha(void) { PlanetId planetId; for (planetId = 0; planetId < PLANET_MAX; planetId++) { @@ -1684,25 +1690,26 @@ void Map_8019FA1C(void) { } } -void Map_8019FC04(void) { +// For Katina and Sector Y +void Map_PlanetExplosions_Setup(void) { s32 i; if (gMissionNumber != PLANET_METEO) { - D_menu_801CEB48[1] = true; - D_menu_801CEB48[2] = true; + sPlanetExplosions[EXPLOSIONS_KATINA] = true; + sPlanetExplosions[EXPLOSIONS_SECTOR_Y] = true; } - for (i = 0; i < 7; i++) { + for (i = 0; i < ARRAY_COUNT(gMissionPlanet); i++) { if (gMissionPlanet[i] == PLANET_KATINA) { - D_menu_801CEB48[1] = false; + sPlanetExplosions[EXPLOSIONS_KATINA] = false; } if (gMissionPlanet[i] == PLANET_SECTOR_Y) { - D_menu_801CEB48[2] = false; + sPlanetExplosions[EXPLOSIONS_SECTOR_Y] = false; } } } -bool Map_8019FD1C(LevelId levelId, s32 arg1) { +bool Map_PlanetSaveSlot_Setup(LevelId levelId, PlanetSaveSlotTypes type) { s32 ret; s32 planetSaveSlot; @@ -1786,15 +1793,15 @@ bool Map_8019FD1C(LevelId levelId, s32 arg1) { ret = false; - switch (arg1) { - case 0: + switch (type) { + case SAVETYPE_PLAYED: if (!(gSaveFile.save.data.planet[planetSaveSlot].played & 1)) { gSaveFile.save.data.planet[planetSaveSlot].played = 1; ret = true; } break; - case 1: + case SAVETYPE_MEDAL: if (gExpertMode) { if (!(gSaveFile.save.data.planet[planetSaveSlot].expertMedal & 1)) { gSaveFile.save.data.planet[planetSaveSlot].expertMedal = 1; @@ -1808,7 +1815,7 @@ bool Map_8019FD1C(LevelId levelId, s32 arg1) { } break; - case 2: + case SAVETYPE_CLEAR: if (gExpertMode) { if (!(gSaveFile.save.data.planet[planetSaveSlot].expertClear & 1)) { gSaveFile.save.data.planet[planetSaveSlot].expertClear = 1; @@ -1826,59 +1833,59 @@ bool Map_8019FD1C(LevelId levelId, s32 arg1) { return ret; } -void Map_8019FF48(void) { - Map_801A6694(); - Map_801A68E4(); - Map_801A6A24(); +void Map_Update(void) { + Map_PositionPlanets(); + Map_PlanetOrderZpos(); + Map_Fade_Update(); - switch (D_menu_801CD944) { - case 0: - Map_801A0954(); + switch (sMapState) { + case MAP_PROLOGUE: + Map_Prologue_Update(); gStarfieldScrollX += 0.09f; break; - case 1: - Map_801A1528(); + case MAP_LYLAT_CARD: + Map_LylatCard_Update(); D_menu_801CDA1C += 0.03f; break; - case 3: - Map_801AD11C(); + case MAP_IDLE: + Map_Idle_Update(); D_menu_801CDA1C += 0.03f; break; - case 2: - Map_801A1C14(); + case MAP_ZOOM_PLANET: + Map_ZoomPlanet_Update(); break; - case 4: - Map_801A5E80(); + case MAP_LEVEL_START: + Map_LevelStart_Update(); break; - case 5: - Map_801A2B8C(); + case MAP_ZOOM_PLANET_PATH: + Map_ZoomPlanetPath_Update(); break; - case 6: - Map_801A4AE8(); + case MAP_PATH_CHANGE: + Map_PathChange_Update(); break; - case 7: - Map_801A36A8(); + case MAP_GAME_OVER: + Map_GameOver_Update(); break; default: break; } - if ((D_menu_801CD944 == 0) || (D_menu_801CD944 == 1) || (D_menu_801CD944 == 7) || (D_menu_801CD944 == 3)) { - Map_801AD718(D_menu_801CDA00, D_menu_801CDA04, D_menu_801CDA08, &D_menu_801CD9F4, &D_menu_801CD9F8, - &D_menu_801CD9FC, D_menu_801CDA14, D_menu_801CDA0C + D_menu_801CDA18, - D_menu_801CDA10 + D_menu_801CDA1C); - Camera_SetStarfieldPos(D_menu_801CD9F4, D_menu_801CD9F8, D_menu_801CD9FC, D_menu_801CDA00, D_menu_801CDA04, - D_menu_801CDA08); + if ((sMapState == MAP_PROLOGUE) || (sMapState == MAP_LYLAT_CARD) || (sMapState == MAP_GAME_OVER) || + (sMapState == MAP_IDLE)) { + Map_SetCamRot(sMapCamAtX, sMapCamAtY, sMapCamAtZ, &sMapCamEyeX, &sMapCamEyeY, &sMapCamEyeZ, D_menu_801CDA14, + D_menu_801CDA0C + D_menu_801CDA18, D_menu_801CDA10 + D_menu_801CDA1C); + Camera_SetStarfieldPos(sMapCamEyeX, sMapCamEyeY, sMapCamEyeZ, sMapCamAtX, sMapCamAtY, sMapCamAtZ); } gGameFrameCount++; + #if MODS_LEVEL_SELECT == true Map_LevelSelect(); #endif @@ -1889,12 +1896,12 @@ void Map_Draw(void) { s32* ptr; Matrix_Push(&gGfxMatrix); - Matrix_LookAt(gGfxMatrix, D_menu_801CD9F4, D_menu_801CD9F8, D_menu_801CD9FC, D_menu_801CDA00, D_menu_801CDA04, - D_menu_801CDA08, D_menu_801CDA20, D_menu_801CDA24, D_menu_801CDA28, MTXF_APPLY); + Matrix_LookAt(gGfxMatrix, sMapCamEyeX, sMapCamEyeY, sMapCamEyeZ, sMapCamAtX, sMapCamAtY, sMapCamAtZ, sMapCamUpX, + sMapCamUpY, sMapCamUpZ, MTXF_APPLY); Matrix_Translate(gGfxMatrix, D_menu_801CEA58, D_menu_801CEA5C, D_menu_801CEA60, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - if (D_menu_801CD974 && D_menu_801CD944 != 0) { + if (D_menu_801CD974 && (sMapState != MAP_PROLOGUE)) { for (i = 0; i < 24; i++) { if (gPlanetPathStatus[i] == 0) { continue; @@ -1903,45 +1910,45 @@ void Map_Draw(void) { continue; } - Map_801AC9A0(i); + Map_PathLines_Draw(i); if (sPaths[i].unk_14 != 0) { - Map_801AC200(i); + Map_Path_Draw(i); } TexturedLine_DrawPath(i); } } - Map_801A8F40(); + Map_Cursor_draw(); - Map_801A9224(); + Map_MeteoMeteors_Draw(); - Map_801A9448(); + Map_Area6Ships_Draw(); for (ptr = D_menu_801CD8A0, i = 0; i < 15; i++, ptr++) { - Map_801A6A98(*ptr); + Map_Planet_Draw(*ptr); } - Map_801A8738(); + Map_CorneriaExplosion_Draw(); Matrix_Pop(&gGfxMatrix); if (D_menu_801CD96C) { - Map_801ABF1C(); + Map_GralPepperFace_Draw(); } - Map_801AB300(); + Map_BriefingRadio_Update(); if (D_menu_801CEFC4) { - Map_801A5834(); + Map_PathChange_DrawOptions(); } if (D_menu_801CD964) { - Map_801A9910(); + Map_TitleCards_Draw(); } - Map_801A9814(); + Map_Wipe_Draw(); if (D_menu_801CD968) { Map_801A9A8C(); @@ -1949,36 +1956,39 @@ void Map_Draw(void) { Map_801A9DE8(); - Map_801A5C90(); + Map_RestartLevelLifeDown_Draw(); - if ((D_menu_801CD944 == 7) && (D_menu_801CD948 == 1)) { - Map_801A4650(); + if ((sMapState == MAP_GAME_OVER) && (sMapSubState == 1)) { + Map_GameOver_Draw(); } - if (D_menu_801CD944 == 0) { - Map_801A0D14(); + if (sMapState == MAP_PROLOGUE) { + Map_Prologue_Draw(); } - if (D_menu_801CD944 == 1) { - Map_801A19A8(); + if (sMapState == MAP_LYLAT_CARD) { + Map_LylatCard_Draw(); } if (D_menu_801CEEC8 == 0) { - Map_801A07E8(D_menu_801B68B0[8], SEGMENTED_TO_VIRTUAL(D_menu_801B68D4[8]), &D_menu_801CD818[8]); + Map_Texture_Sphere(gBSSMapPlanetTextures[8], SEGMENTED_TO_VIRTUAL(gAssetMapPlanetTextures[8]), + &D_menu_801CD818[8]); D_menu_801CEEC8 = 5; } else { D_menu_801CEEC8--; } - Map_801A07E8(D_menu_801B68B0[D_menu_801CEEC4 * 2], SEGMENTED_TO_VIRTUAL(D_menu_801B68D4[D_menu_801CEEC4 * 2]), - &D_menu_801CD818[D_menu_801CEEC4 * 2]); - Map_801A07E8(D_menu_801B68B0[(D_menu_801CEEC4 * 2) + 1], - SEGMENTED_TO_VIRTUAL(D_menu_801B68D4[(D_menu_801CEEC4 * 2) + 1]), - &D_menu_801CD818[(D_menu_801CEEC4 * 2) + 1]); + Map_Texture_Sphere(gBSSMapPlanetTextures[D_menu_801CEEC4 * 2], + SEGMENTED_TO_VIRTUAL(gAssetMapPlanetTextures[D_menu_801CEEC4 * 2]), + &D_menu_801CD818[D_menu_801CEEC4 * 2]); + Map_Texture_Sphere(gBSSMapPlanetTextures[(D_menu_801CEEC4 * 2) + 1], + SEGMENTED_TO_VIRTUAL(gAssetMapPlanetTextures[(D_menu_801CEEC4 * 2) + 1]), + &D_menu_801CD818[(D_menu_801CEEC4 * 2) + 1]); + D_menu_801CEEC4++; if (D_menu_801CEEC4 > 3) { D_menu_801CEEC4 = 0; } - Texture_Mottle((u16*) D_MAP_6047F80, (u16*) D_MAP_6048F80, 5); + Lib_Texture_Mottle((u16*) aMapVenomCloud1Tex, (u16*) D_MAP_6048F80, 5); } s32 Map_801A05B4(void) { @@ -1989,15 +1999,15 @@ s32 Map_801A05B4(void) { s32 var_a3; s32 temp_a0; - for (i = 0; i < 10; i++) { + for (i = 0; i < RANKING_MAX; i++) { sp30[i] = 0; } - for (i = 0; i < 10; i++) { - temp_a0 = gSaveFile.save.data.unk_36[i]; + for (i = 0; i < RANKING_MAX; i++) { + temp_a0 = gSaveFile.save.data.rankingRoute[i]; for (j = 0; j < temp_a0; j++) { - var_a3 = gSaveFile.save.data.unk_5E[i][j].unk_0; - if (gSaveFile.save.data.unk_5E[i][j].unk_C != 0) { + var_a3 = gSaveFile.save.data.stats[i][j].hitCount; + if (gSaveFile.save.data.stats[i][j].unk_C != 0) { var_a3 += 256; } sp30[i] += var_a3; @@ -2006,7 +2016,7 @@ s32 Map_801A05B4(void) { ret = sp30[0]; - for (i = 1; i < 10; i++) { + for (i = 1; i < RANKING_MAX; i++) { if (ret < sp30[i]) { ret = sp30[i]; } @@ -2015,7 +2025,7 @@ s32 Map_801A05B4(void) { return ret; } -void Map_801A0788(void) { +void Map_Starfield_Setup(void) { gStarCount = 800; Memory_FreeAll(); @@ -2027,7 +2037,7 @@ void Map_801A0788(void) { gStarfieldScrollY = 0.0f; } -void Map_801A07E8(u8* arg0, u8* arg1, f32* arg2) { +void Map_Texture_Sphere(u8* textureDest, u8* textureSrc, f32* offset) { s32* var_v0 = D_menu_801B0004; s32 temp; s32 i; @@ -2036,7 +2046,7 @@ void Map_801A07E8(u8* arg0, u8* arg1, f32* arg2) { for (i = 1; i < 48; i++, var_v0++) { for (k = 0, j = *var_v0; j < (95 - *var_v0); j++, k++) { - temp = D_menu_801B00C0[i - 1][k] + (s32) *arg2; + temp = sMapQuarterCircleTex[i - 1][k] + (s32) *offset; if (temp > 95) { temp -= 95; @@ -2045,101 +2055,93 @@ void Map_801A07E8(u8* arg0, u8* arg1, f32* arg2) { temp += 95; } - *(arg0 + ((i * 96) + j)) = *(arg1 + ((i * 96) + temp)); - *(arg0 + ((95 - i) * 96) + j) = *(arg1 + ((95 - i) * 96) + temp); + *(textureDest + ((i * 96) + j)) = *(textureSrc + ((i * 96) + temp)); + *(textureDest + ((95 - i) * 96) + j) = *(textureSrc + ((95 - i) * 96) + temp); } } - *arg2 -= 1.0f; + *offset -= 1.0f; - if (*arg2 <= 0.0f) { - *arg2 = 95.0f; + if (*offset <= 0.0f) { + *offset = 95.0f; } - if (*arg2 > 95.0f) { - *arg2 = 0.0f; + if (*offset > 95.0f) { + *offset = 0.0f; } } -void Map_801A0954(void) { +void Map_Prologue_Update(void) { PlanetId planetId; static f32 D_menu_801B6934[] = { 99.0f, 24, -90.0f, -150.0f, -208.0f, -276.0f, }; - switch (D_menu_801CD948) { + switch (sMapSubState) { case 100: break; case 0: - D_menu_801CD9F0 = 0; - D_menu_801CD9DC = 30.0f; - D_menu_801CD9E0 = 230.0f; - D_menu_801CD9E8 = 0; - D_menu_801CD9E4 = 0; + sPrologueTexIdx = 0; + sPrologueTextXpos = 30.0f; + sPrologueTextYpos = 230.0f; + sPrologueCurrentTexAlpha = 0; + sPrologueNextTexAlpha = 0; D_menu_801CD9EC = 0.29f; gStarCount = 800; - D_menu_801CD9C0 = 5; - D_menu_801CD948++; + sMapTimer3 = 5; + sMapSubState++; break; case 1: - if ((D_menu_801CD9C0 == 0) && (gFillScreenAlpha == 0)) { - // break; - // } - - // if (gFillScreenAlpha != 0) { - // break; - // } - - if ((s32) D_menu_801CD9E0 == 205) { + if ((sMapTimer3 == 0) && (gFillScreenAlpha == 0)) { + if ((s32) sPrologueTextYpos == 205) { Audio_PlayVoiceWithoutBGM(1000); } - if (D_menu_801CD9E0 > -355.0f) { - D_menu_801CD9E0 -= D_menu_801CD9EC; + if (sPrologueTextYpos > -355.0f) { + sPrologueTextYpos -= D_menu_801CD9EC; } - if ((D_menu_801CD9E0 < 200.0f) && (D_menu_801CD9E8 != 255)) { - D_menu_801CD9E8 += 8; - if (D_menu_801CD9E8 > 255) { - D_menu_801CD9E8 = 255; + if ((sPrologueTextYpos < 200.0f) && (sPrologueCurrentTexAlpha != 255)) { + sPrologueCurrentTexAlpha += 8; + if (sPrologueCurrentTexAlpha > 255) { + sPrologueCurrentTexAlpha = 255; } } - if (D_menu_801CD9E0 < D_menu_801B6934[D_menu_801CD9F0]) { - D_menu_801CD9E4 += 8; - if (D_menu_801CD9E4 > 255) { - D_menu_801CD9E4 = 255; + if (sPrologueTextYpos < D_menu_801B6934[sPrologueTexIdx]) { + sPrologueNextTexAlpha += 8; + if (sPrologueNextTexAlpha > 255) { + sPrologueNextTexAlpha = 255; } } - if (D_menu_801CD9E0 <= -355.0f) { - D_menu_801CD948++; + if (sPrologueTextYpos <= -355.0f) { + sMapSubState++; } } break; case 2: - D_menu_801CD9E8 -= 16; - if (D_menu_801CD9E8 < 0) { - D_menu_801CD9E8 = 0; - D_menu_801CD948++; - D_menu_801CD9C0 = 20; + sPrologueCurrentTexAlpha -= 16; + if (sPrologueCurrentTexAlpha < 0) { + sPrologueCurrentTexAlpha = 0; + sMapSubState++; + sMapTimer3 = 20; } break; case 3: - if (D_menu_801CD9C0 == 0) { - D_menu_801CD948 = 0; - D_menu_801CD944 = 1; + if (sMapTimer3 == 0) { + sMapSubState = 0; + sMapState = MAP_LYLAT_CARD; } break; } if (gControllerPress[gMainController].button & START_BUTTON) { AUDIO_PLAY_BGM(NA_BGM_MAP); - AUDIO_PLAY_SFX(NA_SE_MAP_MOVE_STOP, gDefaultSfxSource, 4); for (planetId = 0; planetId < PLANET_MAX; planetId++) { @@ -2157,64 +2159,68 @@ void Map_801A0954(void) { D_menu_801CD974 = 1; D_menu_801CD97C = 1; - D_menu_801CD948 = 0; - D_menu_801CD944 = 3; + sMapSubState = 0; + sMapState = MAP_IDLE; } } -void Map_801A0D14(void) { +void Map_Prologue_Draw(void) { s32 i; - static f32 D_menu_801B694C = 71.0f; - static f32 D_menu_801B6950 = 205.0f; - static u16* D_menu_801B6954[] = { - D_MAP_6041A80, D_MAP_6035780, D_MAP_6033080, D_MAP_603A580, D_MAP_603F380, D_MAP_6037E80, D_MAP_603CC80, + static f32 sPrologueTextFadeTexUpperYpos = 71.0f; + static f32 sPrologueTextFadeTexBottomYpos = 205.0f; + static u16* sPrologueTextures[] = { + aMapPrologue1Tex, aMapPrologue2Tex, aMapPrologue3Tex, aMapPrologue4Tex, + aMapPrologue5Tex, aMapPrologue6Tex, aMapPrologue7Tex, }; - Map_801A116C(); + Map_PrologueArwing_Draw(); RCP_SetupDL(&gMasterDisp, SETUPDL_81); - gDPSetPrimColor(gMasterDisp++, 0, 0, 180, 180, 180, 255); - Message_DisplayScrollingText(&gMasterDisp, gMsg_ID_1, D_menu_801CD9DC, D_menu_801CD9E0, 218, 70, + // Prologue text + Message_DisplayScrollingText(&gMasterDisp, gMsg_ID_1, sPrologueTextXpos, sPrologueTextYpos, 218, 70, Message_GetCharCount(gMsg_ID_1)); RCP_SetupDL(&gMasterDisp, SETUPDL_76); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_IA8(&gMasterDisp, D_MAP_6019030, 8, 16, 0.0f, D_menu_801B694C, 40.0f, 1.66f); - TextureRect_IA8_MirY(&gMasterDisp, D_MAP_6019030, 8, 16, 0.0f, D_menu_801B6950, 40.0f, 1.68f); + // Vertical Fade Margins for prologue text + Lib_TextureRect_IA8(&gMasterDisp, aMapPrologueTextFadeTex, 8, 16, 0.0f, sPrologueTextFadeTexUpperYpos, 40.0f, + 1.66f); + Lib_TextureRect_IA8_MirY(&gMasterDisp, aMapPrologueTextFadeTex, 8, 16, 0.0f, sPrologueTextFadeTexBottomYpos, 40.0f, + 1.68f); Background_DrawPartialStarfield(71, 118); Background_DrawPartialStarfield(205, 239); RCP_SetupDL(&gMasterDisp, SETUPDL_76); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sPrologueCurrentTexAlpha); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, D_menu_801CD9E8); - + // Current Prologue texture for (i = 0; i < 13; i++) { - TextureRect_RGBA16(&gMasterDisp, D_menu_801B6954[D_menu_801CD9F0] + (96 * 4 * i), 96, 4, 109.0f, - 24.0f + (4.0f * i), 1.0f, 1.0f); + Lib_TextureRect_RGBA16(&gMasterDisp, sPrologueTextures[sPrologueTexIdx] + (96 * 4 * i), 96, 4, 109.0f, + 24.0f + (4.0f * i), 1.0f, 1.0f); } - if ((D_menu_801CD9E4 != 0) && (D_menu_801CD9F0 + 1 < 7)) { - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, D_menu_801CD9E4); + // Next Prologue texture + if ((sPrologueNextTexAlpha != 0) && ((sPrologueTexIdx + 1) < 7)) { + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sPrologueNextTexAlpha); for (i = 0; i < 13; i++) { - TextureRect_RGBA16(&gMasterDisp, D_menu_801B6954[D_menu_801CD9F0 + 1] + (96 * 4 * i), 96, 4, 109.0f, - 24.0f + (i * 4.0f), 1.0f, 1.0f); + Lib_TextureRect_RGBA16(&gMasterDisp, sPrologueTextures[sPrologueTexIdx + 1] + (96 * 4 * i), 96, 4, 109.0f, + 24.0f + (i * 4.0f), 1.0f, 1.0f); } - if (D_menu_801CD9E4 == 255) { - D_menu_801CD9E4 = 0; - D_menu_801CD9F0++; + if (sPrologueNextTexAlpha == 255) { + sPrologueNextTexAlpha = 0; + sPrologueTexIdx++; } } } -void Map_801A116C(void) { - static f32 D_menu_801B6970 = 35.0f; +void Map_PrologueArwing_Draw(void) { + static f32 sMapArwingXrot = 35.0f; ArwingInfo arwing; Vec3f dest; Vec3f src; @@ -2229,7 +2235,7 @@ void Map_801A116C(void) { Matrix_RotateX(gCalcMatrix, M_DTOR * -70.0f, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &src, &dest); - if (D_menu_801CD948 >= 2) { + if (sMapSubState >= 2) { colR -= 10; if (colR < 0) { colR = 0; @@ -2246,12 +2252,12 @@ void Map_801A116C(void) { } RCP_SetupDL(&gMasterDisp, SETUPDL_46); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, D_menu_801CD9E8); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sPrologueCurrentTexAlpha); } else { RCP_SetupDL(&gMasterDisp, SETUPDL_23); } - if ((D_menu_801CD948 < 2) || (D_menu_801CD9E8 != 0)) { + if ((sMapSubState < 2) || (sPrologueCurrentTexAlpha != 0)) { Matrix_Push(&gGfxMatrix); Matrix_LookAt(gGfxMatrix, 0.0f, 0.0f, 430.0f, 0.0f, 180.0f, 0.0f, 0.0f, 1.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -2264,7 +2270,7 @@ void Map_801A116C(void) { Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 3.0f, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, M_DTOR * -15.0f, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, M_DTOR * D_menu_801B6970, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_DTOR * sMapArwingXrot, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, M_DTOR * -90.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -2279,14 +2285,14 @@ void Map_801A116C(void) { arwing.drawFace = true; arwing.teamFaceXrot = 0.0f; arwing.teamFaceYrot = 0.0f; - arwing.windshieldXrot = 0.0f; + arwing.cockpitGlassXrot = 0.0f; Display_ArwingWings(&arwing); Matrix_Pop(&gGfxMatrix); Matrix_Pop(&gGfxMatrix); } - D_menu_801B6970 += 0.6f; + sMapArwingXrot += 0.6f; } f32 D_menu_801B6974[8] = { -248.0f, -76.0f, 84.0f, 248.0f, -242.0f, -79.0f, 82.0f, 245.0f }; @@ -2301,11 +2307,11 @@ f32* D_menu_801B6A34[2] = { D_menu_801B69D4, D_menu_801B6974 }; f32* D_menu_801B6A3C[2] = { D_menu_801B69F4, D_menu_801B6994 }; f32* D_menu_801B6A44[2] = { D_menu_801B6A14, D_menu_801B69B4 }; -void Map_801A1528(void) { +void Map_LylatCard_Update(void) { PlanetId planetId; f32 temp; - switch (D_menu_801CD948) { + switch (sMapSubState) { case 0: temp = Math_SmoothStepToF(&D_menu_801CEA9C, 255.0f, D_menu_801CD9B0, 10.0f, 1.0f); @@ -2315,21 +2321,21 @@ void Map_801A1528(void) { D_menu_801CEAA0 = 0.0f; D_menu_801CEAA4 = 0.0f; D_menu_801CD9B0 = 0.002f; - D_menu_801CD9B8 = 10; - D_menu_801CD9BC = 45; - D_menu_801CD948++; + sMapTimer1 = 10; + sMapTimer2 = 45; + sMapSubState++; } break; case 1: - if (D_menu_801CD9B8 != 0) { + if (sMapTimer1 != 0) { break; } Math_SmoothStepToF(&D_menu_801CEA9C, 0.0f, D_menu_801CD9B4, 50.0f, 0.1f); D_menu_801CD9B4 *= 1.06f; - if (D_menu_801CD9BC != 0) { + if (sMapTimer2 != 0) { break; } @@ -2353,9 +2359,9 @@ void Map_801A1528(void) { if (temp == 0.0f) { AUDIO_PLAY_SFX(NA_SE_MAP_MOVE_STOP, gDefaultSfxSource, 4); - D_menu_801CD948 = 0; + sMapSubState = 0; D_menu_801CD97C = 1; - D_menu_801CD944 = 3; + sMapState = MAP_IDLE; } break; } @@ -2372,12 +2378,12 @@ void Map_801A1528(void) { D_menu_801CD900[planetId] = 255; } D_menu_801CD970 = 255; - D_menu_801CD944 = 3; + sMapState = MAP_IDLE; D_menu_801CD97C = 1; } } -void Map_801A19A8(void) { +void Map_LylatCard_Draw(void) { s32 i; RCP_SetupDL(&gMasterDisp, SETUPDL_83); @@ -2385,47 +2391,49 @@ void Map_801A19A8(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, (s32) D_menu_801CEA9C); for (i = 0; i < 4; i++) { - TextureRect_IA8(&gMasterDisp, D_MAP_600D590 + (168 * 4 * i), 168, 4, 72.0f, 104.0f + (4.0f * i), 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_MAP_600D590 + (168 * 4 * i), 168, 4, 72.0f, 104.0f + (4.0f * i), 1.0f, + 1.0f); } - TextureRect_IA8(&gMasterDisp, D_MAP_600D590 + (168 * 4 * 4), 168, 3, 72.0f, 104.0f + 16.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_MAP_600D590 + (168 * 4 * 4), 168, 3, 72.0f, 104.0f + 16.0f, 1.0f, 1.0f); } -void Map_801A1AE8(void) { +void Map_ZoomPlanet_Setup(void) { f32 x; f32 y; f32 z; D_menu_801CEA64 = 0.04f; - D_menu_801CEA54 = Map_801A25C8(sCurrentPlanetId); + sCurrentPlanetCamZDist = Map_GetPlanetCamZDist(sCurrentPlanetId); - D_menu_801CDA40.x = sPlanets[sCurrentPlanetId].pos.x; - D_menu_801CDA40.y = sPlanets[sCurrentPlanetId].pos.y; - D_menu_801CDA40.z = sPlanets[sCurrentPlanetId].pos.z; + sZoomPlanetCamAt.x = sPlanets[sCurrentPlanetId].pos.x; + sZoomPlanetCamAt.y = sPlanets[sCurrentPlanetId].pos.y; + sZoomPlanetCamAt.z = sPlanets[sCurrentPlanetId].pos.z; - D_menu_801CDA50.x = sPlanets[sCurrentPlanetId].pos.x; - D_menu_801CDA50.y = sPlanets[sCurrentPlanetId].pos.y; - D_menu_801CDA50.z = D_menu_801CDA40.z + D_menu_801CEA54; + sZoomPlanetCamEye.x = sPlanets[sCurrentPlanetId].pos.x; + sZoomPlanetCamEye.y = sPlanets[sCurrentPlanetId].pos.y; + sZoomPlanetCamEye.z = sZoomPlanetCamAt.z + sCurrentPlanetCamZDist; - D_menu_801CDA2C = D_menu_801CDA00; - D_menu_801CDA30 = D_menu_801CDA04; + sPathFollowCamAtX = sMapCamAtX; + sPathFollowCamAtY = sMapCamAtY; - D_menu_801CDA34 = D_menu_801CD9F4; - D_menu_801CDA38 = D_menu_801CD9F8; + sPathFollowCamEyeX = sMapCamEyeX; + sPathFollowCamEyeY = sMapCamEyeY; - x = D_menu_801CDA50.x - D_menu_801CD9F4; - y = D_menu_801CDA50.y - D_menu_801CD9F8; - z = D_menu_801CDA50.z - D_menu_801CD9FC; + x = sZoomPlanetCamEye.x - sMapCamEyeX; + y = sZoomPlanetCamEye.y - sMapCamEyeY; + z = sZoomPlanetCamEye.z - sMapCamEyeZ; D_menu_801CEA68 = sqrtf(SQ(x) + SQ(y) + SQ(z)); } -void Map_801A1C14(void) { +// Camera zooms into planet before briefing starts +void Map_ZoomPlanet_Update(void) { s32 i; - switch (D_menu_801CD948) { + switch (sMapSubState) { case 0: - Map_801A1AE8(); + Map_ZoomPlanet_Setup(); D_menu_801CD94C = 0; D_menu_801CD9C4 = 0; @@ -2458,21 +2466,21 @@ void Map_801A1C14(void) { gFillScreenBlue = 255; gFillScreenAlpha = 0; - D_menu_801CEB3C = 0.0f; + sMapCorneriaExplosionScale = 0.0f; D_menu_801CEB38 = 255; - D_menu_801CD948++; + sMapSubState++; break; case 1: if (D_menu_801CD95C == 0) { if (sCurrentPlanetId == PLANET_CORNERIA) { gFillScreenAlpha = 0; - D_menu_801CD948 = 10; + sMapSubState = 10; AUDIO_PLAY_SFX(NA_SE_BACKUP_CLEAR, gDefaultSfxSource, 4); } else { AUDIO_PLAY_SFX(NA_SE_MAP_ZOOM_START, gDefaultSfxSource, 4); - D_menu_801CD948++; + sMapSubState++; } } else { if (sCurrentPlanetId == PLANET_CORNERIA) { @@ -2488,17 +2496,17 @@ void Map_801A1C14(void) { case 10: if (D_menu_801CEB34 == 4) { AUDIO_PLAY_SFX(NA_SE_MAP_ZOOM_START, gDefaultSfxSource, 4); - D_menu_801CD948 = 2; + sMapSubState = 2; } break; case 2: Map_801A2674(); - if ((D_menu_801CD9FC == D_menu_801CDA50.z) && (D_menu_801CD9D8 == 0)) { + if ((sMapCamEyeZ == sZoomPlanetCamEye.z) && (D_menu_801CD9D8 == 0)) { AUDIO_PLAY_SFX(NA_SE_MAP_ZOOM_END, gDefaultSfxSource, 4); D_menu_801CD9D8 = 1; if (sCurrentPlanetId == PLANET_CORNERIA) { - D_menu_801CEB48[0] = true; + sPlanetExplosions[EXPLOSIONS_CORNERIA] = true; for (i = 0; i < 10; i++) { D_menu_801CEB58[0][i] = RAND_INT(3.0f); D_menu_801CEBD0[0][i] = 255; @@ -2510,60 +2518,60 @@ void Map_801A1C14(void) { } } } - if ((D_menu_801CDA34 == D_menu_801CDA50.x) && (D_menu_801CDA38 == D_menu_801CDA50.y) && - (D_menu_801CD9FC == D_menu_801CDA50.z) && (D_menu_801CDA08 == D_menu_801CDA40.z)) { + if ((sPathFollowCamEyeX == sZoomPlanetCamEye.x) && (sPathFollowCamEyeY == sZoomPlanetCamEye.y) && + (sMapCamEyeZ == sZoomPlanetCamEye.z) && (sMapCamAtZ == sZoomPlanetCamAt.z)) { D_menu_801CD964 = 1; - D_menu_801CD96C = 1; + D_menu_801CD96C = true; // clang-format off for (i = 0; i < 15; i++) {D_menu_801CD900[i] = 0;} // clang-format on D_menu_801CD970 = 0; - if (Map_801A2304()) { - D_menu_801CD948 = 3; + if (Map_GralPepper_Talk()) { + sMapSubState = 3; } } break; case 20: if (gControllerPress[gMainController].button & START_BUTTON) { - D_menu_801CD948 = 21; + sMapSubState = 21; } if (gControllerHold[gMainController].button & R_TRIG) { - D_menu_801CD9FC += 10.0f; + sMapCamEyeZ += 10.0f; } if (gControllerHold[gMainController].button & Z_TRIG) { - if (D_menu_801CD9FC - 10.0f > D_menu_801CDA08) { - D_menu_801CD9FC -= 10.0f; + if (sMapCamEyeZ - 10.0f > sMapCamAtZ) { + sMapCamEyeZ -= 10.0f; } } break; case 21: D_menu_801CD964 = 1; - D_menu_801CD96C = 1; + D_menu_801CD96C = true; // clang-format off for (i = 0; i < 15; i++) { D_menu_801CD900[i] = 0; } // clang-format on D_menu_801CD970 = 0; - if (Map_801A2304()) { - D_menu_801CD948 = 3; + if (Map_GralPepper_Talk()) { + sMapSubState = 3; } break; case 3: - D_menu_801CD948 = 0; - D_menu_801CD944 = 4; + sMapSubState = 0; + sMapState = MAP_LEVEL_START; break; } D_menu_801CD9C4++; } -bool Map_801A2304(void) { +bool Map_GralPepper_Talk(void) { bool ret = false; f32 sp28; f32 sp24; @@ -2579,7 +2587,7 @@ bool Map_801A2304(void) { D_menu_801CEA78 = 5.5f; D_menu_801CEA80 = 4.6f; D_menu_801CD94C++; - D_menu_801CD9B8 = 13; + sMapTimer1 = 13; } break; @@ -2607,7 +2615,7 @@ bool Map_801A2304(void) { D_menu_801CEA84 = 3.9f; } - if (D_menu_801CD9B8 == 0) { + if (sMapTimer1 == 0) { D_menu_801CEA98 = 255; D_menu_801CD94C = 100; } @@ -2627,20 +2635,20 @@ bool Map_801A2304(void) { return ret; } -f32 Map_801A25C8(PlanetId planetId) { - f32 sp4; +f32 Map_GetPlanetCamZDist(PlanetId planetId) { + f32 camZdist; switch (planetId) { case PLANET_AREA_6: - sp4 = 900.0f; + camZdist = 900.0f; break; case PLANET_BOLSE: - sp4 = 800.0f; + camZdist = 800.0f; break; case PLANET_METEO: - sp4 = 650.0f; + camZdist = 650.0f; break; case PLANET_KATINA: @@ -2649,32 +2657,32 @@ f32 Map_801A25C8(PlanetId planetId) { case PLANET_TITANIA: case PLANET_AQUAS: case PLANET_FORTUNA: - sp4 = 550.0f; + camZdist = 550.0f; break; case PLANET_CORNERIA: - sp4 = 1100.0f; + camZdist = 1100.0f; break; case PLANET_VENOM: - sp4 = 2100.0f; + camZdist = 2100.0f; break; case PLANET_SOLAR: - sp4 = 850.0f; + camZdist = 850.0f; break; case PLANET_SECTOR_Z: case PLANET_SECTOR_X: case PLANET_SECTOR_Y: - sp4 = 650.0f; + camZdist = 650.0f; break; default: break; } - return sp4; + return camZdist; } void Map_801A2674(void) { @@ -2744,13 +2752,13 @@ void Map_801A281C(void) { D_menu_801CEEDC = 0.0f; D_menu_801CEEE0 = 0.04f; - D_menu_801CEEE8[0].x = D_menu_801CEEE8[1].x = D_menu_801CD9F4; - D_menu_801CEEE8[0].y = D_menu_801CEEE8[1].y = D_menu_801CD9F8; - D_menu_801CEEE8[0].z = D_menu_801CEEE8[1].z = D_menu_801CD9FC; + D_menu_801CEEE8[0].x = D_menu_801CEEE8[1].x = sMapCamEyeX; + D_menu_801CEEE8[0].y = D_menu_801CEEE8[1].y = sMapCamEyeY; + D_menu_801CEEE8[0].z = D_menu_801CEEE8[1].z = sMapCamEyeZ; - D_menu_801CEF58[0].x = D_menu_801CEF58[1].x = D_menu_801CDA00; - D_menu_801CEF58[0].y = D_menu_801CEF58[1].y = D_menu_801CDA04; - D_menu_801CEF58[0].z = D_menu_801CEF58[1].z = D_menu_801CDA08; + D_menu_801CEF58[0].x = D_menu_801CEF58[1].x = sMapCamAtX; + D_menu_801CEF58[0].y = D_menu_801CEF58[1].y = sMapCamAtY; + D_menu_801CEF58[0].z = D_menu_801CEF58[1].z = sMapCamAtZ; D_menu_801CEF58[5].x = D_menu_801CEF58[4].x = D_menu_801CEF58[3].x = D_menu_801CEF58[2].x = sPlanets[sNextPlanetId].pos.x; @@ -2763,8 +2771,8 @@ void Map_801A281C(void) { D_menu_801CDA10 = 0.0f; D_menu_801CDA14 = 500.0f; - Map_801AD718(D_menu_801CEF58[2].x, D_menu_801CEF58[2].y, D_menu_801CEF58[2].z, &D_menu_801CEEE8[2].x, - &D_menu_801CEEE8[2].y, &D_menu_801CEEE8[2].z, D_menu_801CDA14, D_menu_801CDA0C, D_menu_801CDA10); + Map_SetCamRot(D_menu_801CEF58[2].x, D_menu_801CEF58[2].y, D_menu_801CEF58[2].z, &D_menu_801CEEE8[2].x, + &D_menu_801CEEE8[2].y, &D_menu_801CEEE8[2].z, D_menu_801CDA14, D_menu_801CDA0C, D_menu_801CDA10); D_menu_801CEEE8[5].x = D_menu_801CEEE8[4].x = D_menu_801CEEE8[3].x = D_menu_801CEEE8[2].x; D_menu_801CEEE8[5].y = D_menu_801CEEE8[4].y = D_menu_801CEEE8[3].y = D_menu_801CEEE8[2].y; @@ -2778,8 +2786,8 @@ void Map_801A281C(void) { D_menu_801CDA10 = -9.849999f; D_menu_801CDA14 = 3375.0f; // 15^3 - Map_801AD718(D_menu_801CEF58[6].x, D_menu_801CEF58[6].y, D_menu_801CEF58[6].z, &D_menu_801CEEE8[6].x, - &D_menu_801CEEE8[6].y, &D_menu_801CEEE8[6].z, D_menu_801CDA14, D_menu_801CDA0C, D_menu_801CDA10); + Map_SetCamRot(D_menu_801CEF58[6].x, D_menu_801CEF58[6].y, D_menu_801CEF58[6].z, &D_menu_801CEEE8[6].x, + &D_menu_801CEEE8[6].y, &D_menu_801CEEE8[6].z, D_menu_801CDA14, D_menu_801CDA0C, D_menu_801CDA10); D_menu_801CEEE8[7].x = D_menu_801CEEE8[6].x; D_menu_801CEEE8[7].y = D_menu_801CEEE8[6].y; @@ -2796,7 +2804,7 @@ void Map_801A281C(void) { } } -void Map_801A2B8C(void) { +void Map_ZoomPlanetPath_Update(void) { s32 i; switch (D_menu_801CD94C) { @@ -2812,9 +2820,9 @@ void Map_801A2B8C(void) { gFillScreenAlpha = 0; } } else { - D_menu_801CD9C0 = 30; + sMapTimer3 = 30; - if ((D_menu_801CD98C == 1) || (D_menu_801CD980 == 1)) { + if ((D_menu_801CD98C == true) || (D_menu_801CD980 == true)) { gFillScreenRed = 255; gFillScreenGreen = 255; gFillScreenBlue = 255; @@ -2829,13 +2837,13 @@ void Map_801A2B8C(void) { break; case 10: - if (D_menu_801CD9C0 != 0) { + if (sMapTimer3 != 0) { break; } if ((D_menu_801CD984 == 255) && (gFillScreenAlpha == 0)) { - D_menu_801CD980 = 0; - D_menu_801CD9C0 = 30; + D_menu_801CD980 = false; + sMapTimer3 = 30; D_menu_801CD94C = 20; } else if (D_menu_801CD988 != 0) { gFillScreenAlpha ^= 255; @@ -2861,49 +2869,48 @@ void Map_801A2B8C(void) { break; case 20: - if (D_menu_801CD9C0 != 0) { + if (sMapTimer3 != 0) { break; } - if ((D_menu_801CD98C == 1) || (D_menu_801CD980 == 1)) { + if ((D_menu_801CD98C == true) || (D_menu_801CD980 == true)) { break; } D_menu_801CD9C4 = 0; - D_menu_801CD9C0 = 30; + sMapTimer3 = 30; D_menu_801CD94C = 1; break; case 1: - if (D_menu_801CD9C0 != 0) { + if (sMapTimer3 != 0) { break; } Map_801A2EB8(); break; case 2: - if (D_menu_801CD9C0 != 0) { + if (sMapTimer3 != 0) { break; } for (i = 0; i < 15; i++) { D_menu_801CD900[i] = 255; } - D_menu_801CD9C0 = 0; + sMapTimer3 = 0; D_menu_801CD94C++; break; case 3: - if (D_menu_801CD9C0 != 0) { + if (sMapTimer3 != 0) { break; } D_menu_801CEFC8 = 1; D_menu_801CD97C = 1; D_menu_801CD94C = 0; - D_menu_801CD944 = 3; + sMapState = MAP_IDLE; break; } - Camera_SetStarfieldPos(D_menu_801CD9F4, D_menu_801CD9F8, D_menu_801CD9FC, D_menu_801CDA00, D_menu_801CDA04, - D_menu_801CDA08); + Camera_SetStarfieldPos(sMapCamEyeX, sMapCamEyeY, sMapCamEyeZ, sMapCamAtX, sMapCamAtY, sMapCamAtZ); D_menu_801CD9C4++; } @@ -2926,7 +2933,7 @@ void Map_801A2EB8(void) { if (D_menu_801CD9C4 == 80) { sCurrentPlanetId = sNextPlanetId; gMissionPlanet[gMissionNumber] = sCurrentPlanetId; - Map_801A6368(); + Map_CurrentLevel_Setup(); } if (D_menu_801CD9C4 < 80) { @@ -3015,7 +3022,7 @@ void Map_801A2EB8(void) { sPaths[temp2].alpha = 255; D_menu_801CEED0 = temp2; } - D_menu_801CD9C0 = 50; + sMapTimer3 = 50; D_menu_801CD94C++; } } @@ -3025,12 +3032,12 @@ void Map_801A3440(f32 arg0) { if (D_menu_801CEED8 != -1) { Map_801A3550(vec, &D_menu_801CEEE8[D_menu_801CEED8], &D_menu_801CEF58[D_menu_801CEED8], D_menu_801CEEDC); - D_menu_801CD9F4 = vec[0].x; - D_menu_801CD9F8 = vec[0].y; - D_menu_801CD9FC = vec[0].z; - D_menu_801CDA00 = vec[1].x; - D_menu_801CDA04 = vec[1].y; - D_menu_801CDA08 = vec[1].z; + sMapCamEyeX = vec[0].x; + sMapCamEyeY = vec[0].y; + sMapCamEyeZ = vec[0].z; + sMapCamAtX = vec[1].x; + sMapCamAtY = vec[1].y; + sMapCamAtZ = vec[1].z; D_menu_801CEEDC += arg0; if (D_menu_801CEEDC > 1.0f) { @@ -3043,6 +3050,7 @@ void Map_801A3440(f32 arg0) { } } +// Camera related void Map_801A3550(Vec3f* arg0, Vec3f* arg1, Vec3f* arg2, f32 arg3) { f32 temp_fa1; f32 temp_fs0; @@ -3061,11 +3069,11 @@ void Map_801A3550(Vec3f* arg0, Vec3f* arg1, Vec3f* arg2, f32 arg3) { (arg0 + 1)->z = (temp_fa1 * arg2->z) + (temp_fs0 * (arg2 + 1)->z) + (temp_ft5 * (arg2 + 2)->z); } -void Map_801A36A8(void) { +void Map_GameOver_Update(void) { s32 i; f32 temp; - switch (D_menu_801CD948) { + switch (sMapSubState) { case 0: gFillScreenRed = 0; gFillScreenGreen = 0; @@ -3073,19 +3081,19 @@ void Map_801A36A8(void) { gFillScreenAlpha = 255; for (i = 0; i < 8; i++) { - D_menu_801CF020[i] = D_menu_801B69D4[i]; - D_menu_801CF040[i] = D_menu_801B69F4[i]; - D_menu_801CF060[i] = D_menu_801B6A14[i]; + s3DFontXpos[i] = D_menu_801B69D4[i]; + s3DFontYpos[i] = D_menu_801B69F4[i]; + s3DFontZpos[i] = D_menu_801B6A14[i]; } D_menu_801CF0C8 = D_menu_801B6A34[1]; D_menu_801CF0CC = D_menu_801B6A3C[1]; D_menu_801CF0D0 = D_menu_801B6A44[1]; - D_menu_801CF120 = 0; + D_menu_801CF120 = false; D_menu_801CEA9C = 255.0f; - D_menu_801CF080 = 1.0f; - D_menu_801CD948 = 10; + s3DFontScale = 1.0f; + sMapSubState = 10; AUDIO_PLAY_BGM(NA_BGM_GAME_OVER); break; @@ -3097,28 +3105,27 @@ void Map_801A36A8(void) { if (temp == 0.0f) { gFillScreenAlpha = 0; - D_menu_801CD9C0 = 0; - D_menu_801CD948 = 20; + sMapTimer3 = 0; + sMapSubState = 20; } break; case 20: - if (D_menu_801CD9C0 != 0) { - break; // investigate + if (sMapTimer3 != 0) { + break; } D_menu_801CD94C = 0; - D_menu_801CD9C0 = 0; - D_menu_801CD948 = 1; + sMapTimer3 = 0; + sMapSubState = 1; break; case 1: if (D_menu_801CF120) { D_menu_801CDA1C += 0.03f; } - if (D_menu_801CD9C0 == 0) { - Map_801A3A00(); + if (sMapTimer3 == 0) { + Map_GameOver_3DFont(); } - break; case 2: @@ -3129,7 +3136,7 @@ void Map_801A36A8(void) { gFillScreenAlpha += 32; if (gFillScreenAlpha > 255) { gFillScreenAlpha = 255; - D_menu_801CD948++; + sMapSubState++; } break; @@ -3144,11 +3151,11 @@ void Map_801A36A8(void) { if (gControllerPress[gMainController].button & (A_BUTTON | START_BUTTON)) { AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); - D_menu_801CD948 = 3; + sMapSubState = 3; } } -void Map_801A3A00(void) { +void Map_GameOver_3DFont(void) { s32 i; bool boolTemp; f32 temp1[8]; @@ -3163,8 +3170,8 @@ void Map_801A3A00(void) { } else { D_menu_801CF0D8[i] = i * 3; } - D_menu_801CF088[i] = 0.0f; - D_menu_801CF0A8[i] = 0.0f; + s3DFontXrot[i] = 0.0f; + s3DFontYrot[i] = 0.0f; D_menu_801CF0F8[i] = 0; } D_menu_801CD94C++; @@ -3177,17 +3184,17 @@ void Map_801A3A00(void) { continue; } - temp1[i] = Math_SmoothStepToF(&D_menu_801CF020[i], *(D_menu_801CF0C8 + i), 0.05f, 100.0f, 10.0f); - temp2[i] = Math_SmoothStepToF(&D_menu_801CF040[i], *(D_menu_801CF0CC + i), 0.05f, 100.0f, 10.0f); - temp3[i] = Math_SmoothStepToF(&D_menu_801CF060[i], *(D_menu_801CF0D0 + i), 0.1f, 100.0f, 0.1f); + temp1[i] = Math_SmoothStepToF(&s3DFontXpos[i], D_menu_801CF0C8[i], 0.05f, 100.0f, 10.0f); + temp2[i] = Math_SmoothStepToF(&s3DFontYpos[i], D_menu_801CF0CC[i], 0.05f, 100.0f, 10.0f); + temp3[i] = Math_SmoothStepToF(&s3DFontZpos[i], D_menu_801CF0D0[i], 0.1f, 100.0f, 0.1f); if (temp1[i] == 0.0f && temp2[i] == 0.0f && temp3[i] == 0.0f) { - D_menu_801CF088[i] = 0.0f; + s3DFontXrot[i] = 0.0f; if (temp3[i] == 0.0f) { D_menu_801CF0F8[i] = 1; } } else { - D_menu_801CF088[i] += 10.0f; + s3DFontXrot[i] += 10.0f; } } @@ -3202,23 +3209,22 @@ void Map_801A3A00(void) { if (boolTemp == true) { D_menu_801CF118 = 0; for (i = 0; i < 8; i++) { - D_menu_801CF088[i] = 0.0f; + s3DFontXrot[i] = 0.0f; D_menu_801CF0D8[i] = i * 10; D_menu_801CF0F8[i] = 0; } - D_menu_801CD9C0 = 60; - D_menu_801CD9BC = 85; + sMapTimer3 = 60; + sMapTimer2 = 85; D_menu_801CD94C = 11; } break; case 11: - if (D_menu_801CD9C0 == 0) { - - if (D_menu_801CD9BC) { + if (sMapTimer3 == 0) { + if (sMapTimer2) { for (i = 0; i < 8; i++) { - Math_SmoothStepToF(&D_menu_801CF088[i], 360.0f, 0.3f, 100.0f, 1.0f); - Math_SmoothStepToF(&D_menu_801CF0A8[i], 360.0f, 0.3f, 100.0f, 1.0f); + Math_SmoothStepToF(&s3DFontXrot[i], 360.0f, 0.3f, 100.0f, 1.0f); + Math_SmoothStepToF(&s3DFontYrot[i], 360.0f, 0.3f, 100.0f, 1.0f); } } else { D_menu_801CD94C = 10; @@ -3227,15 +3233,15 @@ void Map_801A3A00(void) { break; case 10: - if (!D_menu_801CD9B8) { + if (!sMapTimer1) { if (!D_menu_801CF120) { D_menu_801CEAA0 = 0.0f; - D_menu_801CD9B8 = 25; + sMapTimer1 = 25; D_menu_801CD94C = 3; } else { for (i = 0; i < 8; i++) { - D_menu_801CF088[i] = 0.0f; - D_menu_801CF0A8[i] = 0.0f; + s3DFontXrot[i] = 0.0f; + s3DFontYrot[i] = 0.0f; D_menu_801CF0F8[i] = 0; } D_menu_801CEFCC = 0; @@ -3268,9 +3274,9 @@ void Map_801A3A00(void) { D_menu_801CF0CC = D_menu_801B6A3C[D_menu_801CF11C]; D_menu_801CF0D0 = D_menu_801B6A44[D_menu_801CF11C]; - D_menu_801CD9C0 = 15; + sMapTimer3 = 15; if (D_menu_801CF11C) { - D_menu_801CD9C0 = 240; + sMapTimer3 = 240; } D_menu_801CD94C = 0; } @@ -3284,29 +3290,29 @@ void Map_801A3A00(void) { continue; } - if (D_menu_801CF0A8[i] > 360.0f) { - D_menu_801CF0A8[i] = 0.0f; + if (s3DFontYrot[i] > 360.0f) { + s3DFontYrot[i] = 0.0f; D_menu_801CF0F8[i] = 1; } else { - D_menu_801CF0A8[i] += 10.0f; + s3DFontYrot[i] += 10.0f; } } break; case 3: - if (D_menu_801CD9B8 != 0) { + if (sMapTimer1 != 0) { break; } for (i = 0; i < 8; i++) { - D_menu_801CF088[i] += 30.0f; - D_menu_801CF060[i] += -300.0f; - if (D_menu_801CF060[i] <= -120000.0f) { - D_menu_801CF060[i] = -12000.0f; + s3DFontXrot[i] += 30.0f; + s3DFontZpos[i] += -300.0f; + if (s3DFontZpos[i] <= -120000.0f) { + s3DFontZpos[i] = -12000.0f; } } - if (D_menu_801CF060[0] <= -11000.0f) { + if (s3DFontZpos[0] <= -11000.0f) { D_menu_801CEAA0 += 32.0f; if (D_menu_801CEAA0 > 255.0f) { @@ -3328,8 +3334,8 @@ void Map_801A3A00(void) { } if (D_menu_801CEAA0 == 255.0f) { - D_menu_801CF080 = 0.0f; - D_menu_801CD948 = 2; + s3DFontScale = 0.0f; + sMapSubState = 2; D_menu_801CD94C = 0; } break; @@ -3342,7 +3348,7 @@ void Map_801A4394(void) { switch (D_menu_801CD94C) { case 0: if (gMissionNumber == 0) { - D_menu_801CD9C0 = 45; + sMapTimer3 = 45; D_menu_801CD94C = 3; } else { D_menu_801CD94C++; @@ -3352,7 +3358,7 @@ void Map_801A4394(void) { case 1: if (gMissionNumber == D_menu_801CD9AC) { D_menu_801CD94C = 3; - D_menu_801CD9C0 = 45; + sMapTimer3 = 45; break; } @@ -3380,63 +3386,59 @@ void Map_801A4394(void) { break; case 3: - if (D_menu_801CD9C0 != 0) { + if (sMapTimer3 != 0) { break; } for (i = 0; i < 8; i++) { - D_menu_801CF020[i] = D_menu_801B69D4[i]; - D_menu_801CF040[i] = D_menu_801B69F4[i]; - D_menu_801CF060[i] = D_menu_801B6A14[i]; + s3DFontXpos[i] = D_menu_801B69D4[i]; + s3DFontYpos[i] = D_menu_801B69F4[i]; + s3DFontZpos[i] = D_menu_801B6A14[i]; } D_menu_801CD978 = 1; - D_menu_801CF120 = 1; + D_menu_801CF120 = true; D_menu_801CF11C = 1; D_menu_801CF0C8 = D_menu_801B6A34[1]; D_menu_801CF0CC = D_menu_801B6A3C[1]; D_menu_801CF0D0 = D_menu_801B6A44[1]; - D_menu_801CF080 = 1.0f; - D_menu_801CD9C0 = 450; + s3DFontScale = 1.0f; + sMapTimer3 = 450; D_menu_801CD94C = 0; - D_menu_801CD948 = 1; + sMapSubState = 1; break; } } -void Map_801A4650(void) { +void Map_GameOver_Draw(void) { s32 i; - static Gfx* D_menu_801B6A4C[] = { - D_FONT3D_9006AE0, D_FONT3D_90086F0, D_FONT3D_9005380, D_FONT3D_90075A0, - D_FONT3D_9000570, D_FONT3D_9002EA0, D_FONT3D_90075A0, D_FONT3D_9004230, + static Gfx* sMap3DFontDLs[] = { + aFont3D_G, aFont3D_A, aFont3D_M, aFont3D_E, aFont3D_O, aFont3D_V, aFont3D_E, aFont3D_R, }; Lights_SetOneLight(&gMasterDisp, 0, 0, 127, 28, 58, 105, 65, 70, 48); RCP_SetupDL(&gMasterDisp, SETUPDL_23); - gSPTexture(gMasterDisp++, 2500, 200, 0, G_TX_RENDERTILE, G_ON); gSPSetGeometryMode(gMasterDisp++, G_TEXTURE_GEN); Matrix_Push(&gGfxMatrix); - Matrix_LookAt(gGfxMatrix, 0.0f, 0.0f, 500.0f, 0.0f, 0.0f, -500.0f, 0.0f, 1.0f, 0.0f, MTXF_APPLY); - Matrix_SetGfxMtx(&gMasterDisp); - for (i = 0; i < 8; i++) { + for (i = 0; i < ARRAY_COUNT(sMap3DFontDLs); i++) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_menu_801CF020[i], D_menu_801CF040[i], D_menu_801CF060[i], MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801CF0A8[i], MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, M_DTOR * D_menu_801CF088[i], MTXF_APPLY); - Matrix_Scale(gGfxMatrix, D_menu_801CF080, D_menu_801CF080, D_menu_801CF080, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, s3DFontXpos[i], s3DFontYpos[i], s3DFontZpos[i], MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_DTOR * s3DFontYrot[i], MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_DTOR * s3DFontXrot[i], MTXF_APPLY); + Matrix_Scale(gGfxMatrix, s3DFontScale, s3DFontScale, s3DFontScale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801B6A4C[i]); + gSPDisplayList(gMasterDisp++, sMap3DFontDLs[i]); Matrix_Pop(&gGfxMatrix); } @@ -3451,54 +3453,54 @@ void Map_801A48C0(f32 speed) { f32 temp; f32 angle; - Math_SmoothStepToF(&D_menu_801CDA34, D_menu_801CDA50.x, speed, 100.0f, 0.1f); - Math_SmoothStepToF(&D_menu_801CDA38, D_menu_801CDA50.y, speed, 100.0f, 0.1f); - Math_SmoothStepToF(&D_menu_801CD9FC, D_menu_801CDA50.z, speed, 100.0f, 0.1f); + Math_SmoothStepToF(&sPathFollowCamEyeX, sZoomPlanetCamEye.x, speed, 100.0f, 0.1f); + Math_SmoothStepToF(&sPathFollowCamEyeY, sZoomPlanetCamEye.y, speed, 100.0f, 0.1f); + Math_SmoothStepToF(&sMapCamEyeZ, sZoomPlanetCamEye.z, speed, 100.0f, 0.1f); - x = D_menu_801CDA50.x - D_menu_801CDA34; - y = D_menu_801CDA50.y - D_menu_801CDA38; - z = D_menu_801CDA50.z - D_menu_801CD9FC; + x = sZoomPlanetCamEye.x - sPathFollowCamEyeX; + y = sZoomPlanetCamEye.y - sPathFollowCamEyeY; + z = sZoomPlanetCamEye.z - sMapCamEyeZ; temp = sqrtf(SQ(x) + SQ(y) + SQ(z)); angle = M_DTOR * ((1 - (temp / D_menu_801CEA68)) * 180.0f); - D_menu_801CD9F4 = D_menu_801CDA34 * (1 + __sinf(angle) * 1.1f); - D_menu_801CD9F8 = D_menu_801CDA38 * (1 + __sinf(angle) * 1.3f); + sMapCamEyeX = sPathFollowCamEyeX * (1 + __sinf(angle) * 1.1f); + sMapCamEyeY = sPathFollowCamEyeY * (1 + __sinf(angle) * 1.3f); } void Map_801A4A38(f32 arg0) { - Math_SmoothStepToF(&D_menu_801CDA2C, D_menu_801CDA40.x, arg0, 100.0f, 0.1f); - Math_SmoothStepToF(&D_menu_801CDA30, D_menu_801CDA40.y, arg0, 100.0f, 0.1f); - Math_SmoothStepToF(&D_menu_801CDA08, D_menu_801CDA40.z, arg0, 100.0f, 0.1f); - D_menu_801CDA00 = D_menu_801CDA2C; - D_menu_801CDA04 = D_menu_801CDA30; + Math_SmoothStepToF(&sPathFollowCamAtX, sZoomPlanetCamAt.x, arg0, 100.0f, 0.1f); + Math_SmoothStepToF(&sPathFollowCamAtY, sZoomPlanetCamAt.y, arg0, 100.0f, 0.1f); + Math_SmoothStepToF(&sMapCamAtZ, sZoomPlanetCamAt.z, arg0, 100.0f, 0.1f); + sMapCamAtX = sPathFollowCamAtX; + sMapCamAtY = sPathFollowCamAtY; } -void Map_801A4AE8(void) { +// Player selecting the next destination after Mission Accomplised +void Map_PathChange_Update(void) { s32 var_a0; s32 i; switch (D_menu_801CD94C) { case 0: - Map_801A4D7C(); + Map_PathChange_Input(); break; case 1: if (D_menu_801CF000[D_menu_801CEFDC] == 0) { - if (D_menu_801CEFD0 != 0) { + if (D_menu_801CEFD0) { if (gLifeCount[gPlayerNum] != 0) { Audio_PlayDeathSequence(); - D_menu_801CD9CC = 1; - D_menu_801CD9D0 = 0; - D_menu_801CD9B8 = 120; + sRestartLevelStates = 1; + sExplosionAnimIdx = 0; + sMapTimer1 = 120; } else { D_menu_801CD9D4 = 1; - D_menu_801CD9B8 = 0; + sMapTimer1 = 0; } } else { - - D_menu_801CD9B8 = 0; + sMapTimer1 = 0; } D_menu_801CEFC4 = 0; D_menu_801CD94C = 2; @@ -3506,29 +3508,29 @@ void Map_801A4AE8(void) { break; case 2: - if ((D_menu_801CD9CC != 0) && (D_menu_801CD9B8 == 110)) { + if ((sRestartLevelStates != 0) && (sMapTimer1 == 110)) { gLifeCount[gPlayerNum]--; } - if (D_menu_801CD9B8 == 0) { - D_menu_801CD9CC = 0; + if (sMapTimer1 == 0) { + sRestartLevelStates = 0; var_a0 = D_menu_801CEFDC; if (sPrevMissionStatus != MISSION_COMPLETE) { var_a0 += 2; } - Map_801A4D0C(var_a0); + Map_PathChange_UpdateEntry(var_a0); if (D_menu_801CEFDC == 0) { for (i = 0; i < TEAM_ID_MAX; i++) { D_ctx_80177C58[i] = gTeamShields[i]; } D_menu_801CEFC8 = 0; - D_menu_801CD948 = 0; - D_menu_801CD944 = 2; + sMapSubState = 0; + sMapState = MAP_ZOOM_PLANET; } else { - D_menu_801CD944 = 3; + sMapState = MAP_IDLE; } D_menu_801CD94C = 0; } @@ -3536,19 +3538,19 @@ void Map_801A4AE8(void) { } } -void Map_801A4D0C(u32 arg0) { +void Map_PathChange_UpdateEntry(u32 arg0) { switch (arg0) { case 1: case 4: if (D_menu_801CD9D4 != 0) { - Map_801A4F8C(); + Map_GoToGameOver(); } else { - Map_801A4FC4(); + Map_RetryCourse(); } break; case 3: - Map_801A53C8(); + Map_ChangePath(); case 0: case 2: @@ -3556,10 +3558,10 @@ void Map_801A4D0C(u32 arg0) { } } -void Map_801A4D7C(void) { +void Map_PathChange_Input(void) { f32 temp; - if (Map_801A5770() != 0) { + if (Map_Input_CursorY() != 0) { D_menu_801CEFE8[D_menu_801CEFDC] = 255.0f; if (sPrevMissionStatus != MISSION_COMPLETE) { if (D_menu_801CEFD4 < 0) { @@ -3591,7 +3593,7 @@ void Map_801A4D7C(void) { if (gControllerPress[gMainController].button & (B_BUTTON | START_BUTTON)) { Audio_PlayMapMenuSfx(0); D_menu_801CEFC4 = 0; - D_menu_801CD944 = 3; + sMapState = MAP_IDLE; } else if (gControllerPress[gMainController].button & A_BUTTON) { Audio_PlayMapMenuSfx(0); AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); @@ -3599,14 +3601,14 @@ void Map_801A4D7C(void) { if (((sPrevMissionStatus != MISSION_COMPLETE) && (D_menu_801CEFDC == 2)) || ((sPrevMissionStatus == MISSION_COMPLETE) && (D_menu_801CEFDC == 1))) { - D_menu_801CEFD0 = 1; + D_menu_801CEFD0 = true; D_menu_801CF00C = 10; } D_menu_801CD94C = 1; } } -void Map_801A4F8C(void) { +void Map_GoToGameOver(void) { gStarCount = 0; gGameState = GSTATE_GAME_OVER; D_ctx_80177868 = 0; @@ -3614,7 +3616,7 @@ void Map_801A4F8C(void) { gDrawMode = DRAW_NONE; } -void Map_801A4FC4(void) { +void Map_RetryCourse(void) { s32 i; s32 temp; s32 temp2; @@ -3664,7 +3666,7 @@ void Map_801A4FC4(void) { gMissionPlanet[gMissionNumber] = PLANET_NONE; gMissionHitCount[gMissionNumber - 1] = 0; gMissionMedal[gMissionNumber - 1] = 0; - gMissionTeamStatus[gMissionNumber - 1] = 0x00FFFFFF; + gMissionTeamStatus[gMissionNumber - 1] = TEAMSTATUS_ALIVE; gHitCount = 0; gMissionNumber--; @@ -3690,10 +3692,10 @@ void Map_801A4FC4(void) { sPaths[temp].alpha = 0; } - Map_801A6368(); + Map_CurrentLevel_Setup(); } -void Map_801A53C8(void) { +void Map_ChangePath(void) { s32 temp; s32 temp2; @@ -3753,7 +3755,7 @@ void Map_801A53C8(void) { sCurrentPlanetId = sNextPlanetId; gMissionPlanet[gMissionNumber] = sCurrentPlanetId; - Map_801A6368(); + Map_CurrentLevel_Setup(); if (sPlanets[sNextPlanetId].dest1 != PLANET_NONE) { temp2 = Map_GetPathId(sNextPlanetId, sPlanets[sNextPlanetId].dest1); @@ -3768,19 +3770,19 @@ void Map_801A53C8(void) { } } -bool Map_801A5770(void) { +bool Map_Input_CursorY(void) { bool ret = false; - s8 y = gControllerPress[gMainController].stick_y; + s8 stickY = gControllerPress[gMainController].stick_y; - if ((y > -40) && (y < 40)) { - y = 0; + if ((stickY > -40) && (stickY < 40)) { + stickY = 0; } - if (y != 0) { + if (stickY != 0) { if (D_menu_801CEFD4 == 0) { ret = true; } - D_menu_801CEFD4 = y; + D_menu_801CEFD4 = stickY; } else { D_menu_801CEFD4 = 0; } @@ -3792,19 +3794,19 @@ bool Map_801A5770(void) { return ret; } -void Map_801A5834(void) { +void Map_PathChange_DrawOptions(void) { s32 i; f32 x; f32 y; f32 z; u8* texture; s32 colorIndex; - s32 var_t0; + s32 optionBgScaleIdx; s32 mask; s32 r[3]; s32 g[3]; s32 b[3]; - static f32 D_menu_801B6A6C[] = { 3.05f, 4.15f }; + static f32 sMapOptionBgTexScales[] = { 3.05f, 4.15f }; x = 101.0f; y = 92.0f; @@ -3823,22 +3825,22 @@ void Map_801A5834(void) { } } - var_t0 = 1; + optionBgScaleIdx = 1; if (sPrevMissionStatus == MISSION_COMPLETE) { - var_t0 = 0; + optionBgScaleIdx = 0; } if (gLifeCount[gPlayerNum] != 0) { - texture = D_MAP_6001080; + texture = aMapRetryCourseLose1UPTex; } else { - texture = D_MAP_6000000; + texture = aMapRetryCourseGameOverTex; } RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 60, 60, 255, 170); - TextureRect_IA8(&gMasterDisp, D_MAP_601B4B0, 24, 17, x, y, 4.6f, D_menu_801B6A6C[var_t0]); + Lib_TextureRect_IA8(&gMasterDisp, aMapOptionBgTex, 24, 17, x, y, 4.6f, sMapOptionBgTexScales[optionBgScaleIdx]); mask = 0xFFFFFFFF; if (D_menu_801CF000[colorIndex] != 0) { @@ -3849,7 +3851,7 @@ void Map_801A5834(void) { if (gGameFrameCount & mask) { // can't be != 0? RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, r[colorIndex], g[colorIndex], b[colorIndex], 255); - TextureRect_IA8(&gMasterDisp, D_MAP_6000840, 96, 22, x + 11.0f, y + 3.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aMapProceedNextCourseTex, 96, 22, x + 11.0f, y + 3.0f, 1.0f, 1.0f); } z = 24.0f; colorIndex++; @@ -3863,7 +3865,7 @@ void Map_801A5834(void) { if (gGameFrameCount & mask) { // can't be != 0? gDPSetPrimColor(gMasterDisp++, 0, 0, r[colorIndex], g[colorIndex], b[colorIndex], 255); - TextureRect_IA8(&gMasterDisp, D_MAP_60018C0, 96, 10, x + 10.0f, y + z + 8.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aMapChangeCourseTex, 96, 10, x + 10.0f, y + z + 8.0f, 1.0f, 1.0f); } z += 18.0f; colorIndex++; @@ -3877,38 +3879,38 @@ void Map_801A5834(void) { if ((gGameFrameCount & mask) != 0) { gDPSetPrimColor(gMasterDisp++, 0, 0, r[colorIndex], g[colorIndex], b[colorIndex], 255); - TextureRect_IA8(&gMasterDisp, texture, 96, 22, x + 9.0f, y + z + 5.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, texture, 96, 22, x + 9.0f, y + z + 5.0f, 1.0f, 1.0f); } } -void Map_801A5C90(void) { +void Map_RestartLevelLifeDown_Draw(void) { s32 pad[3]; f32 scale; - if (D_menu_801CD9CC != 0) { + if (sRestartLevelStates != 0) { if (gLifeCount[gPlayerNum] < 10) { scale = 0.13f; } else { scale = 0.18f; } - switch (D_menu_801CD9CC) { + switch (sRestartLevelStates) { case 1: - D_menu_801CD9C0 = 2; - D_menu_801CD9CC = 2; + sMapTimer3 = 2; + sRestartLevelStates = 2; break; case 2: - if (D_menu_801CD9C0 != 0) { + if (sMapTimer3 != 0) { break; } - if ((D_menu_801CD9D0 + 1) > 3) { - D_menu_801CD9D0 = 0; - D_menu_801CD9CC = 0; + if ((sExplosionAnimIdx + 1) > 3) { + sExplosionAnimIdx = 0; + sRestartLevelStates = 0; } else { - D_menu_801CD9D0++; - D_menu_801CD9CC = 1; + sExplosionAnimIdx++; + sRestartLevelStates = 1; } break; } @@ -3928,156 +3930,156 @@ void Map_801A5C90(void) { Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801AF824[D_menu_801CD9D0]); + gSPDisplayList(gMasterDisp++, sExplosionAnimDLs[sExplosionAnimIdx]); Matrix_Pop(&gGfxMatrix); } } -void Map_801A5E80(void) { - switch (D_menu_801B8280) { +void Map_LevelStart_Update(void) { + switch (sLevelStartState) { case 0: - D_menu_801B8284 = 0; - D_menu_801CD9A0 = 1; - Map_801A6368(); - D_menu_801CD9A8 = Map_801A62FC(sCurrentPlanetId); - Map_801AB284(); - D_menu_801B8280++; + sWipeHeight = 0; + D_menu_801CD9A0 = true; + Map_CurrentLevel_Setup(); + sLevelPlayed = Map_LevelPlayedStatus_Check(sCurrentPlanetId); + Map_BriefingRadio_Setup(); + sLevelStartState++; break; case 1: - if ((gControllerPress[gMainController].button & START_BUTTON) && !(D_menu_801CD9A8)) { + if ((gControllerPress[gMainController].button & START_BUTTON) && !sLevelPlayed) { Audio_KillSfxById(NA_SE_COMPUTER_NOISE); Audio_ClearVoice(); D_menu_801CF018 = 0; - D_menu_801B8280 = 2; - D_menu_801CD9B8 = 0; + sLevelStartState = 2; + sMapTimer1 = 0; } - if ((gControllerPress[gMainController].button & A_BUTTON) && (D_menu_801CD9A0 == 0) && !(D_menu_801CD9A8)) { + if ((gControllerPress[gMainController].button & A_BUTTON) && (D_menu_801CD9A0 == false) && !sLevelPlayed) { Audio_ClearVoice(); gRadioStateTimer = 0; } - if ((gControllerPress[gMainController].button & A_BUTTON) && (D_menu_801CD9A0 == 1) && !(D_menu_801CD9A8)) { - D_menu_801CD9A0 = 0; + if ((gControllerPress[gMainController].button & A_BUTTON) && (D_menu_801CD9A0 == true) && !sLevelPlayed) { + D_menu_801CD9A0 = false; } if (D_menu_801CF018 == 7) { - D_menu_801CD9B8 = 5; - D_menu_801B8280++; + sMapTimer1 = 5; + sLevelStartState++; } break; case 2: - if (D_menu_801CD9B8 != 0) { + if (sMapTimer1 != 0) { break; } - if (D_menu_801B8284 < 120) { - D_menu_801B8284 += 15; + if (sWipeHeight < 120) { + sWipeHeight += 15; if (sCurrentPlanetId == PLANET_CORNERIA) { - D_menu_801CEB48[0] = false; + sPlanetExplosions[EXPLOSIONS_CORNERIA] = false; } } else { - D_menu_801CD9B8 = 5; + sMapTimer1 = 5; D_menu_801CF018 = 0; - D_menu_801B8280++; + sLevelStartState++; } break; case 3: - if (D_menu_801CD9B8 == 0) { - D_menu_801CD9B8 = 5; + if (sMapTimer1 == 0) { + sMapTimer1 = 5; D_menu_801CD968 = 1; - D_menu_801B8280++; + sLevelStartState++; } break; case 4: - if (D_menu_801CD9B8 == 0) { + if (sMapTimer1 == 0) { AUDIO_PLAY_SFX(NA_SE_GOOD_LUCK, gDefaultSfxSource, 4); - D_menu_801CD9B8 = 75; - D_menu_801B8280++; + sMapTimer1 = 75; + sLevelStartState++; } break; case 5: - if (D_menu_801CD9B8 == 0) { - Map_801A61B4(gCurrentLevel); - D_menu_801B8280 = 0; + if (sMapTimer1 == 0) { + Map_LevelStart_AudioSpecSetup(gCurrentLevel); + sLevelStartState = 0; D_menu_801CD968 = 0; - Map_801A6628(); + Map_PlayLevel(); } break; } } -void Map_801A61B4(LevelId level) { +void Map_LevelStart_AudioSpecSetup(LevelId level) { switch (level) { case LEVEL_CORNERIA: - AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_0); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_CO); break; case LEVEL_METEO: - AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_1); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_ME); break; case LEVEL_TITANIA: - AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_2); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_TI); break; case LEVEL_AQUAS: - AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_12); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_AQ); break; case LEVEL_BOLSE: - AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_10); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_BO); break; case LEVEL_KATINA: - AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_11); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_KA); break; case LEVEL_AREA_6: - AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_5); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_A6); break; case LEVEL_SECTOR_Z: - AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_13); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_SZ); break; case LEVEL_FORTUNA: - AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_8); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_FO); break; case LEVEL_SECTOR_X: - AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_3); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_SX); break; case LEVEL_MACBETH: - AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_14); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_MA); break; case LEVEL_ZONESS: - AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_4); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_ZO); break; case LEVEL_SECTOR_Y: - AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_7); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_SY); break; case LEVEL_SOLAR: - AUDIO_SET_SPEC(SFXCHAN_2, AUDIOSPEC_9); + AUDIO_SET_SPEC(SFXCHAN_2, AUDIOSPEC_SO); default: break; } } -bool Map_801A62FC(PlanetId planet) { +bool Map_LevelPlayedStatus_Check(PlanetId planet) { u32 planetSaveSlot; - s32 ret = true; + s32 played = true; switch (planet) { case PLANET_METEO: @@ -4108,13 +4110,13 @@ bool Map_801A62FC(PlanetId planet) { #endif if (gSaveFile.save.data.planet[planetSaveSlot].played & 1) { - ret = false; + played = false; } - return ret; + return played; } -void Map_801A6368(void) { +void Map_CurrentLevel_Setup(void) { switch (sCurrentPlanetId) { case PLANET_CORNERIA: gCurrentLevel = LEVEL_CORNERIA; @@ -4261,7 +4263,7 @@ s32 Map_GetPathId(PlanetId start, PlanetId end) { return i; } -void Map_801A659C(void) { +void Map_SetState_ZoomPlanet(void) { Audio_KillSfxById(NA_SE_MAP_MOVE); Audio_KillSfxById(NA_SE_MAP_ROLL); @@ -4270,11 +4272,11 @@ void Map_801A659C(void) { } D_menu_801CEFC8 = 0; - D_menu_801CD944 = 2; - D_menu_801CD948 = 0; + sMapState = MAP_ZOOM_PLANET; + sMapSubState = 0; } -void Map_801A6628(void) { +void Map_PlayLevel(void) { gGameState = GSTATE_PLAY; gNextGameStateTimer = 2; gPlayState = PLAY_STANDBY; @@ -4288,7 +4290,7 @@ void Map_801A6628(void) { D_ctx_8017782C = true; } -void Map_801A6694(void) { +void Map_PositionPlanets(void) { PlanetId planetId; Vec3f dest; Vec3f src; @@ -4305,7 +4307,7 @@ void Map_801A6694(void) { Matrix_RotateY(gGfxMatrix, M_DTOR * -sPlanets[planetId].longitude, MTXF_APPLY); - Map_801AD048(); + Map_CamMatrixRot(); Matrix_SetGfxMtx(&gMasterDisp); @@ -4321,27 +4323,27 @@ void Map_801A6694(void) { Matrix_Push(&gGfxMatrix); - Matrix_LookAt(gGfxMatrix, D_menu_801CD9F4, D_menu_801CD9F8, D_menu_801CD9FC, D_menu_801CDA00, D_menu_801CDA04, - D_menu_801CDA08, D_menu_801CDA20, D_menu_801CDA24, D_menu_801CDA28, MTXF_APPLY); + Matrix_LookAt(gGfxMatrix, sMapCamEyeX, sMapCamEyeY, sMapCamEyeZ, sMapCamAtX, sMapCamAtY, sMapCamAtZ, sMapCamUpX, + sMapCamUpY, sMapCamUpZ, MTXF_APPLY); Matrix_Translate(gGfxMatrix, D_menu_801CEA58, D_menu_801CEA5C, D_menu_801CEA60, MTXF_APPLY); Matrix_Mult(gGfxMatrix, &D_menu_801CDA60[planetId], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - Matrix_MultVec3f(gGfxMatrix, &src, &D_menu_801CE960[planetId]); + Matrix_MultVec3f(gGfxMatrix, &src, &sPlanetPositions[planetId]); Matrix_Pop(&gGfxMatrix); } } -void Map_801A68E4(void) { +void Map_PlanetOrderZpos(void) { s32 i; s32 j; s32 var_a0; for (i = 0; i < 14; i++) { for (j = i; j < 15; j++) { - if (D_menu_801CE960[D_menu_801CD8A0[i]].z > D_menu_801CE960[D_menu_801CD8A0[j]].z) { + if (sPlanetPositions[D_menu_801CD8A0[i]].z > sPlanetPositions[D_menu_801CD8A0[j]].z) { var_a0 = D_menu_801CD8A0[i]; D_menu_801CD8A0[i] = D_menu_801CD8A0[j]; D_menu_801CD8A0[j] = var_a0; @@ -4350,7 +4352,7 @@ void Map_801A68E4(void) { } } -void Map_801A6A24(void) { +void Map_Fade_Update(void) { switch (D_menu_801CD960) { case 0: if (gFillScreenAlpha != 0) { @@ -4370,107 +4372,102 @@ void Map_801A6A24(void) { } } -void Map_801A6A98(PlanetId planetId) { +void Map_Planet_Draw(PlanetId planetId) { s32 mask; - s32 temp; + PlanetStatus planetStatus; if ((sPlanets[planetId].alpha == 0) && (planetId != sCurrentPlanetId)) { return; } - if ((planetId == sCurrentPlanetId) && (D_menu_801CD944 == 2) && (D_menu_801CD95C != 0)) { + if ((planetId == sCurrentPlanetId) && (sMapState == MAP_ZOOM_PLANET) && (D_menu_801CD95C != 0)) { mask = 0x00000001; } else { mask = 0xFFFFFFFF; } - temp = Map_801A6DAC(planetId); + planetStatus = Map_CheckPlanetMedal(planetId); - Map_801A6EC0(planetId); - Map_801A7D3C(planetId); + Map_PlanetAnim2(planetId); + Map_PlanetCleared2_Draw(planetId); Matrix_Push(&gGfxMatrix); if ((gGameFrameCount & mask) != 0) { if (planetId == PLANET_TITANIA) { - Map_801A791C(planetId); + Map_Titania_DrawRings1(planetId); } - if ((temp == 1) && (D_menu_801CE960[planetId].z > D_menu_801CEA18[planetId]) && (planetId != PLANET_AREA_6) && - (planetId != PLANET_BOLSE)) { - - Map_801A7F1C(planetId); + if ((planetStatus == PLANET_CLEARED) && (sPlanetPositions[planetId].z > D_menu_801CEA18[planetId]) && + (planetId != PLANET_AREA_6) && (planetId != PLANET_BOLSE)) { + Map_PlanetCleared_Draw(planetId); } - Map_801A7230(planetId); + Map_PlanetAnim(planetId); if (planetId == PLANET_SOLAR) { - Map_801A74F4(planetId); + Map_SolarRays_Draw(planetId); } if (sPlanets[planetId].anim == PL_ANIM_SPIN) { if (planetId != PLANET_VENOM) { - if ((planetId != PLANET_AQUAS) && (planetId != PLANET_TITANIA)) { - Map_801A7684(planetId); + Map_VenomCloud2_Draw(planetId); } - - Map_801A77B0(planetId); + Map_PlanetShadow_Draw(planetId); } if (planetId == PLANET_VENOM) { - Map_801A7BEC(&D_menu_801CEEBC, 0.1f, 3.1f); - Map_801A7BEC(&D_menu_801CEEC0, -0.1f, 2.9f); + Map_VenomCloud_Draw(&D_menu_801CEEBC, +0.1f, 3.1f); + Map_VenomCloud_Draw(&D_menu_801CEEC0, -0.1f, 2.9f); } } if (planetId == PLANET_TITANIA) { - Map_801A7A84(planetId); + Map_Titania_DrawRings2(planetId); } - if ((planetId == PLANET_CORNERIA) && D_menu_801CEB48[0]) { - Map_801A89BC(PLANET_CORNERIA, 0); + if ((planetId == PLANET_CORNERIA) && sPlanetExplosions[EXPLOSIONS_CORNERIA]) { + Map_PlanetExplosions_Draw(PLANET_CORNERIA, EXPLOSIONS_CORNERIA); } - if ((planetId == PLANET_KATINA) && D_menu_801CEB48[1]) { - Map_801A89BC(PLANET_KATINA, 1); + if ((planetId == PLANET_KATINA) && sPlanetExplosions[EXPLOSIONS_KATINA]) { + Map_PlanetExplosions_Draw(PLANET_KATINA, EXPLOSIONS_KATINA); } - if ((planetId == PLANET_SECTOR_Y) && D_menu_801CEB48[2]) { - Map_801A89BC(PLANET_SECTOR_Y, 2); + if ((planetId == PLANET_SECTOR_Y) && sPlanetExplosions[EXPLOSIONS_SECTOR_Y]) { + Map_PlanetExplosions_Draw(PLANET_SECTOR_Y, EXPLOSIONS_SECTOR_Y); } - if ((temp == 1) && (D_menu_801CE960[planetId].z <= D_menu_801CEA18[planetId]) && (planetId != PLANET_AREA_6) && - (planetId != PLANET_BOLSE)) { - - Map_801A7F1C(planetId); + if ((planetStatus == PLANET_CLEARED) && (sPlanetPositions[planetId].z <= D_menu_801CEA18[planetId]) && + (planetId != PLANET_AREA_6) && (planetId != PLANET_BOLSE)) { + Map_PlanetCleared_Draw(planetId); } - if ((temp == 1) && ((planetId == PLANET_AREA_6) || (planetId == PLANET_BOLSE))) { - - Map_801A7F1C(planetId); + if ((planetStatus == PLANET_CLEARED) && ((planetId == PLANET_AREA_6) || (planetId == PLANET_BOLSE))) { + Map_PlanetCleared_Draw(planetId); } - if (temp == 2) { - Map_801A809C(planetId); + if (planetStatus == PLANET_MEDAL) { + Map_PlanetMedal_Draw(planetId); } } Matrix_Pop(&gGfxMatrix); } -s32 Map_801A6DAC(PlanetId planetId) { +s32 Map_CheckPlanetMedal(PlanetId planetId) { s32 ret; s32 planetSaveSlot; - s32 var_v0; - s32 var_a0; + bool medal; + bool clear; if (planetId == PLANET_VENOM) { if (gExpertMode) { - var_v0 = gSaveFile.save.data.planet[SAVE_SLOT_VENOM_2].expertMedal & 1; - var_a0 = gSaveFile.save.data.planet[SAVE_SLOT_VENOM_1].expertClear & 1 | - gSaveFile.save.data.planet[SAVE_SLOT_VENOM_2].expertClear & 1; + medal = gSaveFile.save.data.planet[SAVE_SLOT_VENOM_2].expertMedal & 1; + clear = gSaveFile.save.data.planet[SAVE_SLOT_VENOM_1].expertClear & 1 | + gSaveFile.save.data.planet[SAVE_SLOT_VENOM_2].expertClear & 1; } else { - var_v0 = gSaveFile.save.data.planet[SAVE_SLOT_VENOM_2].normalMedal & 1; - var_a0 = gSaveFile.save.data.planet[SAVE_SLOT_VENOM_1].normalClear & 1 | - gSaveFile.save.data.planet[SAVE_SLOT_VENOM_2].normalClear & 1; + medal = gSaveFile.save.data.planet[SAVE_SLOT_VENOM_2].normalMedal & 1; + clear = gSaveFile.save.data.planet[SAVE_SLOT_VENOM_1].normalClear & 1 | + gSaveFile.save.data.planet[SAVE_SLOT_VENOM_2].normalClear & 1; } } else { planetSaveSlot = planetId; @@ -4480,26 +4477,25 @@ s32 Map_801A6DAC(PlanetId planetId) { } if (gExpertMode) { - var_v0 = gSaveFile.save.data.planet[planetSaveSlot].expertMedal & 1; - var_a0 = gSaveFile.save.data.planet[planetSaveSlot].expertClear & 1; + medal = gSaveFile.save.data.planet[planetSaveSlot].expertMedal & 1; + clear = gSaveFile.save.data.planet[planetSaveSlot].expertClear & 1; } else { - var_v0 = gSaveFile.save.data.planet[planetSaveSlot].normalMedal & 1; - var_a0 = gSaveFile.save.data.planet[planetSaveSlot].normalClear & 1; + medal = gSaveFile.save.data.planet[planetSaveSlot].normalMedal & 1; + clear = gSaveFile.save.data.planet[planetSaveSlot].normalClear & 1; } } - ret = 0; - - if (var_v0) { - ret = 2; - } else if (var_a0) { - ret = 1; + ret = 0; // Has no medal or hasn't been cleared + if (medal) { + ret = 2; // Has medal + } else if (clear) { + ret = 1; // Has been cleared } return ret; } -void Map_801A6EC0(PlanetId planetId) { +void Map_PlanetAnim2(PlanetId planetId) { f32 dirX; f32 dirY; f32 dirZ; @@ -4536,9 +4532,9 @@ void Map_801A6EC0(PlanetId planetId) { Matrix_SetGfxMtx(&gMasterDisp); if (sPlanets[planetId].anim == PL_ANIM_ROTATE_Y) { - x2 = D_menu_801CE960[PLANET_SOLAR].x - D_menu_801CE960[planetId].x; - y2 = D_menu_801CE960[PLANET_SOLAR].y - D_menu_801CE960[planetId].y; - z2 = D_menu_801CE960[PLANET_SOLAR].z - D_menu_801CE960[planetId].z; + x2 = sPlanetPositions[PLANET_SOLAR].x - sPlanetPositions[planetId].x; + y2 = sPlanetPositions[PLANET_SOLAR].y - sPlanetPositions[planetId].y; + z2 = sPlanetPositions[PLANET_SOLAR].z - sPlanetPositions[planetId].z; x1 = Math_Atan2F(y2, sqrtf(SQ(x2) + SQ(z2))); y1 = -Math_Atan2F(x2, z2); @@ -4566,11 +4562,11 @@ void Map_801A6EC0(PlanetId planetId) { D_menu_801AFFFC -= 0.09f; } -void Map_801A7230(PlanetId planetId) { +void Map_PlanetAnim(PlanetId planetId) { switch (sPlanets[planetId].anim) { case PL_ANIM_STATIC: - if (((D_menu_801CD944 == 3) || (planetId == sCurrentPlanetId) || (planetId == sNextPlanetId)) && - D_menu_801CD944 != 1 && D_menu_801CD944 != 7) { + if (((sMapState == MAP_IDLE) || (planetId == sCurrentPlanetId) || (planetId == sNextPlanetId)) && + (sMapState != MAP_LYLAT_CARD) && sMapState != MAP_GAME_OVER) { RCP_SetupDL(&gMasterDisp, SETUPDL_53); } else { RCP_SetupDL(&gMasterDisp, SETUPDL_41); @@ -4579,8 +4575,8 @@ void Map_801A7230(PlanetId planetId) { break; case PL_ANIM_ROTATE_Y: - if (((D_menu_801CD944 == 3) || (planetId == sCurrentPlanetId) || (planetId == sNextPlanetId)) && - D_menu_801CD944 != 1 && D_menu_801CD944 != 7) { + if (((sMapState == MAP_IDLE) || (planetId == sCurrentPlanetId) || (planetId == sNextPlanetId)) && + (sMapState != MAP_LYLAT_CARD) && (sMapState != MAP_GAME_OVER)) { RCP_SetupDL(&gMasterDisp, SETUPDL_23); } else { RCP_SetupDL(&gMasterDisp, SETUPDL_46); @@ -4591,7 +4587,6 @@ void Map_801A7230(PlanetId planetId) { case PL_ANIM_BILLBOARD: case PL_ANIM_SPIN: RCP_SetupDL(&gMasterDisp, SETUPDL_64); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sPlanets[planetId].alpha); break; @@ -4610,12 +4605,12 @@ void Map_801A7230(PlanetId planetId) { Matrix_Copy(gGfxMatrix, &D_menu_801CDE20[planetId]); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801B68F8[sPlanets[planetId].id]); + gSPDisplayList(gMasterDisp++, sMapPlanets[sPlanets[planetId].id]); Matrix_Pop(&gGfxMatrix); } -void Map_801A74F4(PlanetId planetId) { +void Map_SolarRays_Draw(PlanetId planetId) { static f32 D_menu_801B6A74 = 0.0f; s32 alpha = sPlanets[PLANET_VENOM].alpha; @@ -4636,14 +4631,14 @@ void Map_801A74F4(PlanetId planetId) { Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801B68F8[sPlanets[planetId].id]); + gSPDisplayList(gMasterDisp++, sMapPlanets[sPlanets[planetId].id]); Matrix_Pop(&gGfxMatrix); D_menu_801B6A74 -= 0.2f; } -void Map_801A7684(PlanetId planetId) { +void Map_VenomCloud2_Draw(PlanetId planetId) { s32 r; s32 g; s32 b; @@ -4662,12 +4657,12 @@ void Map_801A7684(PlanetId planetId) { Matrix_Copy(gGfxMatrix, &D_menu_801CDE20[planetId]); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801B4A40); + gSPDisplayList(gMasterDisp++, gMapVenomCloudDL); Matrix_Pop(&gGfxMatrix); } -void Map_801A77B0(PlanetId planetId) { +void Map_PlanetShadow_Draw(PlanetId planetId) { RCP_SetupDL(&gMasterDisp, SETUPDL_64); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sPlanets[planetId].alpha); @@ -4676,7 +4671,7 @@ void Map_801A77B0(PlanetId planetId) { Matrix_Copy(gGfxMatrix, &D_menu_801CDE20[planetId]); - if ((planetId == 10) || (planetId == 7) || (planetId == 8)) { + if ((planetId == PLANET_TITANIA) || (planetId == PLANET_MACBETH) || (planetId == PLANET_ZONESS)) { Matrix_RotateY(gGfxMatrix, M_DTOR * 180.0f, MTXF_APPLY); } @@ -4690,7 +4685,7 @@ void Map_801A77B0(PlanetId planetId) { Matrix_Pop(&gGfxMatrix); } -void Map_801A791C(PlanetId planetId) { +void Map_Titania_DrawRings1(PlanetId planetId) { RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 175, 175, sPlanets[planetId].alpha); @@ -4707,12 +4702,12 @@ void Map_801A791C(PlanetId planetId) { Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_MAP_604C540); + gSPDisplayList(gMasterDisp++, aMapTitaniaRings1DL); Matrix_Pop(&gGfxMatrix); } -void Map_801A7A84(PlanetId planetId) { +void Map_Titania_DrawRings2(PlanetId planetId) { RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 175, 175, sPlanets[planetId].alpha); @@ -4727,12 +4722,12 @@ void Map_801A7A84(PlanetId planetId) { Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_MAP_604CDE0); + gSPDisplayList(gMasterDisp++, aMapTitaniaRings2DL); Matrix_Pop(&gGfxMatrix); } -void Map_801A7BEC(f32* zAngle, f32 next, f32 scale) { +void Map_VenomCloud_Draw(f32* zAngle, f32 next, f32 scale) { s32 alpha = sPlanets[PLANET_VENOM].alpha; if (sPlanets[PLANET_VENOM].alpha > 128) { @@ -4752,14 +4747,14 @@ void Map_801A7BEC(f32* zAngle, f32 next, f32 scale) { Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_MAP_6047E70); + gSPDisplayList(gMasterDisp++, aMapVenomCloudDL); Matrix_Pop(&gGfxMatrix); *zAngle += next; } -void Map_801A7D3C(PlanetId planetId) { +void Map_PlanetCleared2_Draw(PlanetId planetId) { Vec3f src; Vec3f dest; f32 scale; @@ -4793,10 +4788,10 @@ void Map_801A7D3C(PlanetId planetId) { Matrix_Pop(&gGfxMatrix); } -void Map_801A7F1C(PlanetId planetId) { +void Map_PlanetCleared_Draw(PlanetId planetId) { s32 alpha; - if (D_menu_801CD980 != 1) { + if (D_menu_801CD980 != true) { alpha = D_menu_801CD900[planetId]; } else { alpha = D_menu_801CD984; @@ -4819,13 +4814,13 @@ void Map_801A7F1C(PlanetId planetId) { Matrix_Pop(&gGfxMatrix); D_menu_801CEAB8[planetId] += 45.0f; - if (D_menu_801CD980 == 0) { + if (D_menu_801CD980 == false) { D_menu_801CEAF8[planetId] += 5.0f; } } } -void Map_801A809C(PlanetId planetId) { +void Map_PlanetMedal_Draw(PlanetId planetId) { static f32 D_menu_801B6A78 = 0.0f; s32 i; s32 alpha; @@ -4918,7 +4913,7 @@ void Map_801A809C(PlanetId planetId) { Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_MAP_601D1F0); + gSPDisplayList(gMasterDisp++, aMapMedalDL); Matrix_Pop(&gGfxMatrix); @@ -4956,7 +4951,7 @@ void Map_801A809C(PlanetId planetId) { Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_MAP_601D1F0); + gSPDisplayList(gMasterDisp++, aMapMedalDL); Matrix_Pop(&gGfxMatrix); @@ -4964,7 +4959,7 @@ void Map_801A809C(PlanetId planetId) { } } -void Map_801A8738(void) { +void Map_CorneriaExplosion_Draw(void) { if (D_menu_801CEB34 >= 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_67); @@ -4972,9 +4967,9 @@ void Map_801A8738(void) { switch (D_menu_801CEB34) { case 0: - D_menu_801CEB3C += 0.15f; - if (D_menu_801CEB3C >= 0.7f) { - D_menu_801CEB3C = 0.8f; + sMapCorneriaExplosionScale += 0.15f; + if (sMapCorneriaExplosionScale >= 0.7f) { + sMapCorneriaExplosionScale = 0.8f; D_menu_801CEB34 = 2; D_menu_801CEB40 = 2.0f; } @@ -4984,13 +4979,13 @@ void Map_801A8738(void) { D_menu_801CEB40--; if (D_menu_801CEB40 <= 0.0f) { D_menu_801CEB34 = 3; - D_menu_801CEB3C = 0.7f; + sMapCorneriaExplosionScale = 0.7f; } break; case 3: D_menu_801CEB38 -= 8; - D_menu_801CEB3C -= 0.001f; + sMapCorneriaExplosionScale -= 0.001f; if (D_menu_801CEB38 < 0) { D_menu_801CEB38 = 0; @@ -5009,17 +5004,18 @@ void Map_801A8738(void) { Matrix_Copy(gGfxMatrix, &D_menu_801CDE20[PLANET_CORNERIA]); Matrix_RotateZ(gGfxMatrix, M_DTOR * -50.0f, MTXF_APPLY); Matrix_Translate(gGfxMatrix, 0.0f, 25.0f, 0.0f, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, D_menu_801CEB3C, D_menu_801CEB3C, D_menu_801CEB3C, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, sMapCorneriaExplosionScale, sMapCorneriaExplosionScale, sMapCorneriaExplosionScale, + MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_MAP_60479D0); + gSPDisplayList(gMasterDisp++, aMapPlanetExplosionDL); Matrix_Pop(&gGfxMatrix); } } -void Map_801A89BC(PlanetId planetId, s32 arg1) { +void Map_PlanetExplosions_Draw(PlanetId planetId, PlanetExplosions explosionIdx) { s32 i; s32 temp2; f32 temp; @@ -5028,7 +5024,7 @@ void Map_801A89BC(PlanetId planetId, s32 arg1) { return; } - if (!D_menu_801CEB48[arg1]) { + if (!sPlanetExplosions[explosionIdx]) { return; } @@ -5042,70 +5038,70 @@ void Map_801A89BC(PlanetId planetId, s32 arg1) { gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 0); for (i = 0; i < temp2; i++) { - switch (D_menu_801CEB58[arg1][i]) { + switch (D_menu_801CEB58[explosionIdx][i]) { case 0: - D_menu_801CEC48[arg1][i] += 0.1f; - if (D_menu_801CEC48[arg1][i] >= D_menu_801CECC0[arg1][i]) { - D_menu_801CEC48[arg1][i] = D_menu_801CECC0[arg1][i]; - D_menu_801CEB58[arg1][i] = 1; + D_menu_801CEC48[explosionIdx][i] += 0.1f; + if (D_menu_801CEC48[explosionIdx][i] >= D_menu_801CECC0[explosionIdx][i]) { + D_menu_801CEC48[explosionIdx][i] = D_menu_801CECC0[explosionIdx][i]; + D_menu_801CEB58[explosionIdx][i] = 1; } break; case 1: - D_menu_801CEE28[arg1][i]--; - if (D_menu_801CEE28[arg1][i] <= 0) { - D_menu_801CEB58[arg1][i] = 2; + D_menu_801CEE28[explosionIdx][i]--; + if (D_menu_801CEE28[explosionIdx][i] <= 0) { + D_menu_801CEB58[explosionIdx][i] = 2; } break; case 2: - D_menu_801CEBD0[arg1][i] -= 48; - if (D_menu_801CEBD0[arg1][i] < 0) { - D_menu_801CEBD0[arg1][i] = 0; - D_menu_801CEB58[arg1][i] = 3; + D_menu_801CEBD0[explosionIdx][i] -= 48; + if (D_menu_801CEBD0[explosionIdx][i] < 0) { + D_menu_801CEBD0[explosionIdx][i] = 0; + D_menu_801CEB58[explosionIdx][i] = 3; } break; case 3: - D_menu_801CEB58[arg1][i] = RAND_INT(3.0f); - D_menu_801CEBD0[arg1][i] = 255; - D_menu_801CEC48[arg1][i] = 0.0f; - D_menu_801CECC0[arg1][i] = 0.5f + RAND_FLOAT(0.3f); - D_menu_801CEE28[arg1][i] = 1 + RAND_INT(4.0f); + D_menu_801CEB58[explosionIdx][i] = RAND_INT(3.0f); + D_menu_801CEBD0[explosionIdx][i] = 255; + D_menu_801CEC48[explosionIdx][i] = 0.0f; + D_menu_801CECC0[explosionIdx][i] = 0.5f + RAND_FLOAT(0.3f); + D_menu_801CEE28[explosionIdx][i] = 1 + RAND_INT(4.0f); temp = 110.0f; - if (arg1 == 1) { + if (explosionIdx == EXPLOSIONS_KATINA) { temp = 50.0f; } - D_menu_801CED38[arg1][i] = temp + RAND_INT(30.0f); - D_menu_801CEDB0[arg1][i] = -10.0f + RAND_FLOAT(-60.0f); + D_menu_801CED38[explosionIdx][i] = temp + RAND_INT(30.0f); + D_menu_801CEDB0[explosionIdx][i] = -10.0f + RAND_FLOAT(-60.0f); break; } - if ((D_menu_801CECC0[arg1][i] == 0.0f) || (D_menu_801CEBD0[arg1][i] == 0)) { + if ((D_menu_801CECC0[explosionIdx][i] == 0.0f) || (D_menu_801CEBD0[explosionIdx][i] == 0)) { continue; } - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 200, 200, D_menu_801CEBD0[arg1][i]); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 200, 200, D_menu_801CEBD0[explosionIdx][i]); Matrix_Push(&gGfxMatrix); Matrix_Mult(gGfxMatrix, &D_menu_801CDA60[planetId], MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, M_DTOR * D_menu_801CEDB0[arg1][i], MTXF_APPLY); - Matrix_Translate(gGfxMatrix, 0.0f, D_menu_801CED38[arg1][i], 0.0f, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, D_menu_801CEC48[arg1][i], D_menu_801CEC48[arg1][i], D_menu_801CEC48[arg1][i], - MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, M_DTOR * D_menu_801CEDB0[explosionIdx][i], MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, D_menu_801CED38[explosionIdx][i], 0.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, D_menu_801CEC48[explosionIdx][i], D_menu_801CEC48[explosionIdx][i], + D_menu_801CEC48[explosionIdx][i], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_MAP_60479D0); + gSPDisplayList(gMasterDisp++, aMapPlanetExplosionDL); Matrix_Pop(&gGfxMatrix); } } -void Map_801A8F40(void) { +void Map_Cursor_draw(void) { static f32 D_menu_801B6A7C = 0.0f; s32 temp; @@ -5114,24 +5110,23 @@ void Map_801A8F40(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_23); - temp = Math_SmoothStepToF(&D_menu_801CEAA8, D_menu_801CEAB0, 0.1f, 100.0f, 1.0f); - + temp = Math_SmoothStepToF(&sCursorYpos, D_menu_801CEAB0, 0.1f, 100.0f, 1.0f); if (temp == 0.0f) { if (D_menu_801CEAB0 == D_menu_801CEAAC) { - D_menu_801CEAA8 = D_menu_801CEAAC + 50.0f; + sCursorYpos = D_menu_801CEAAC + 50.0f; } } Matrix_Push(&gGfxMatrix); Matrix_Mult(gGfxMatrix, &D_menu_801CDA60[sCurrentPlanetId], MTXF_APPLY); - Matrix_Translate(gGfxMatrix, 0.0f, D_menu_801CEAA8, 0.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, sCursorYpos, 0.0f, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801B6A7C, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 3.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_MAP_601DCF0); + gSPDisplayList(gMasterDisp++, aMapCursorDL); Matrix_Pop(&gGfxMatrix); @@ -5139,53 +5134,53 @@ void Map_801A8F40(void) { } } -void Map_801A914C(void) { - D_menu_801CEAA8 = 140.0f; +void Map_PositionCursor(void) { + sCursorYpos = 140.0f; if (sCurrentPlanetId == PLANET_CORNERIA) { - D_menu_801CEAA8 = 230.0f; + sCursorYpos = 230.0f; } if (sCurrentPlanetId == PLANET_AREA_6) { - D_menu_801CEAA8 = 210.0f; + sCursorYpos = 210.0f; } if (sCurrentPlanetId == PLANET_SOLAR) { - D_menu_801CEAA8 = 250.0f; + sCursorYpos = 250.0f; } if (sCurrentPlanetId == PLANET_SECTOR_X) { - D_menu_801CEAA8 = 150.0f; + sCursorYpos = 150.0f; } if (sCurrentPlanetId == PLANET_SECTOR_Y) { - D_menu_801CEAA8 = 150.0f; + sCursorYpos = 150.0f; } if (sCurrentPlanetId == PLANET_SECTOR_Z) { - D_menu_801CEAA8 = 150.0f; + sCursorYpos = 150.0f; } if (sCurrentPlanetId == PLANET_VENOM) { - D_menu_801CEAA8 = 300.0f; + sCursorYpos = 300.0f; } - D_menu_801CEAAC = D_menu_801CEAA8; - D_menu_801CEAB0 = D_menu_801CEAA8; + D_menu_801CEAAC = sCursorYpos; + D_menu_801CEAB0 = sCursorYpos; } -void Map_801A9224(void) { +void Map_MeteoMeteors_Draw(void) { s32 i; s32 mask; if ((sPlanets[PLANET_METEO].alpha != 0) || (sCurrentPlanetId == PLANET_METEO)) { - if ((sCurrentPlanetId == PLANET_METEO) && (D_menu_801CD944 == 2) && (D_menu_801CD95C != 0)) { + if ((sCurrentPlanetId == PLANET_METEO) && (sMapState == MAP_ZOOM_PLANET) && (D_menu_801CD95C != 0)) { mask = 0x00000001; } else { mask = 0xFFFFFFFF; } - if ((D_menu_801CD944 == 3) || ((sCurrentPlanetId == PLANET_METEO) && (D_menu_801CD944 != 7))) { + if ((sMapState == MAP_IDLE) || ((sCurrentPlanetId == PLANET_METEO) && (sMapState != MAP_GAME_OVER))) { RCP_SetupDL(&gMasterDisp, SETUPDL_53); } else { RCP_SetupDL(&gMasterDisp, SETUPDL_64); @@ -5193,21 +5188,20 @@ void Map_801A9224(void) { } if ((gGameFrameCount & mask) != 0) { - for (i = 0; i < 42; i++) { + for (i = 0; i < ARRAY_COUNT(sMapMeteors); i++) { Matrix_Push(&gGfxMatrix); - Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801AFA38[i].angle, MTXF_APPLY); - Matrix_Translate(gGfxMatrix, D_menu_801AFA38[i].x, D_menu_801AFA38[i].y, 0.0f, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, M_DTOR * -D_menu_801AFA38[i].angle, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_DTOR * sMapMeteors[i].angle, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sMapMeteors[i].x, sMapMeteors[i].y, 0.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_DTOR * -sMapMeteors[i].angle, MTXF_APPLY); - Map_801AD048(); + Map_CamMatrixRot(); - Matrix_Scale(gGfxMatrix, D_menu_801AFA38[i].scale, D_menu_801AFA38[i].scale, D_menu_801AFA38[i].scale, - MTXF_APPLY); + Matrix_Scale(gGfxMatrix, sMapMeteors[i].scale, sMapMeteors[i].scale, sMapMeteors[i].scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801B68F8[PLANET_METEO]); + gSPDisplayList(gMasterDisp++, sMapPlanets[PLANET_METEO]); Matrix_Pop(&gGfxMatrix); } @@ -5215,7 +5209,7 @@ void Map_801A9224(void) { } } -void Map_801A9448(void) { +void Map_Area6Ships_Draw(void) { Vec3f src; Vec3f dest; f32 x1; @@ -5231,13 +5225,13 @@ void Map_801A9448(void) { return; } - if ((sCurrentPlanetId == PLANET_AREA_6) && (D_menu_801CD944 == 2) && (D_menu_801CD95C != 0)) { + if ((sCurrentPlanetId == PLANET_AREA_6) && (sMapState == MAP_ZOOM_PLANET) && (D_menu_801CD95C != 0)) { mask = 0x00000001; } else { mask = 0xFFFFFFFF; } - if ((D_menu_801CD944 == 3) || (sCurrentPlanetId == PLANET_AREA_6)) { + if ((sMapState == MAP_IDLE) || (sCurrentPlanetId == PLANET_AREA_6)) { RCP_SetupDL(&gMasterDisp, SETUPDL_23); } else { RCP_SetupDL(&gMasterDisp, SETUPDL_46); @@ -5249,26 +5243,26 @@ void Map_801A9448(void) { dest.z = 0.0f; if ((gGameFrameCount & mask) != 0) { - for (i = 0; i < 4; i++) { + for (i = 0; i < ARRAY_COUNT(sMapArea6Ships); i++) { Matrix_Push(&gGfxMatrix); - Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801AFCD8[i].angle, MTXF_APPLY); - Matrix_Translate(gGfxMatrix, D_menu_801AFCD8[i].x, D_menu_801AFCD8[i].y, 0.0f, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, M_DTOR * -(D_menu_801AFCD8[i].angle), MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_DTOR * sMapArea6Ships[i].angle, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sMapArea6Ships[i].x, sMapArea6Ships[i].y, 0.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_DTOR * -(sMapArea6Ships[i].angle), MTXF_APPLY); - Map_801AD048(); + Map_CamMatrixRot(); Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801B6A80, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, D_menu_801AFCD8[i].scale, D_menu_801AFCD8[i].scale, D_menu_801AFCD8[i].scale, + Matrix_Scale(gGfxMatrix, sMapArea6Ships[i].scale, sMapArea6Ships[i].scale, sMapArea6Ships[i].scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); Matrix_MultVec3f(gGfxMatrix, &dest, &src); - x = D_menu_801CE960[PLANET_SOLAR].x - src.x; - y = D_menu_801CE960[PLANET_SOLAR].y - src.y; - z = D_menu_801CE960[PLANET_SOLAR].z - src.z; + x = sPlanetPositions[PLANET_SOLAR].x - src.x; + y = sPlanetPositions[PLANET_SOLAR].y - src.y; + z = sPlanetPositions[PLANET_SOLAR].z - src.z; x1 = Math_Atan2F(y, sqrtf(SQ(x) + SQ(z))); y1 = -Math_Atan2F(x, z); @@ -5283,120 +5277,122 @@ void Map_801A9448(void) { Matrix_MultVec3f(gCalcMatrix, &dest, &src); Lights_SetOneLight(&gMasterDisp, src.x, src.y, src.z, 80, 80, 60, 0, 0, 0); - gSPDisplayList(gMasterDisp++, D_MAP_601E9A0); + gSPDisplayList(gMasterDisp++, aMapArea6ShipDL); Matrix_Pop(&gGfxMatrix); } } } -void Map_801A9814(void) { - if (D_menu_801B8280 != 0) { +void Map_Wipe_Draw(void) { + if (sLevelStartState != 0) { Matrix_Push(&gGfxMatrix); - Matrix_LookAt(gGfxMatrix, D_menu_801CD9F4, D_menu_801CD9F8, D_menu_801CD9FC, D_menu_801CDA00, D_menu_801CDA04, - D_menu_801CDA08, D_menu_801CDA20, D_menu_801CDA24, D_menu_801CDA28, MTXF_APPLY); + Matrix_LookAt(gGfxMatrix, sMapCamEyeX, sMapCamEyeY, sMapCamEyeZ, sMapCamAtX, sMapCamAtY, sMapCamAtZ, sMapCamUpX, + sMapCamUpY, sMapCamUpZ, MTXF_APPLY); Matrix_Translate(gGfxMatrix, D_menu_801CEA58, D_menu_801CEA5C, D_menu_801CEA60, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - Wipe_Draw(WIPE_VERTICAL, D_menu_801B8284); + Wipe_Draw(WIPE_VERTICAL, sWipeHeight); Matrix_Pop(&gGfxMatrix); } } -void Map_801A9910(void) { - static s32 D_menu_801B6A84[] = { 1, 13, 12, 11, 6, 2, 4, 10, 8, 0, 9, 5, 3, 7, 7 }; +void Map_TitleCards_Draw(void) { + static s32 sMapCurPlanetCards[] = { 1, 13, 12, 11, 6, 2, 4, 10, 8, 0, 9, 5, 3, 7, 7 }; s32 i; - s32 var_s0 = D_menu_801B6A84[sCurrentPlanetId]; + s32 planetCardIdx = sMapCurPlanetCards[sCurrentPlanetId]; RCP_SetupDL(&gMasterDisp, SETUPDL_83); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, (s32) D_menu_801CEA6C); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, (s32) sMapPlanetCardAlpha); - for (i = 0; i < D_menu_801AF834[var_s0].height; i++) { - TextureRect_IA8(&gMasterDisp, D_menu_801AF834[var_s0].texture + (D_menu_801AF834[var_s0].width * i), - D_menu_801AF834[var_s0].width, 1, D_menu_801AF834[var_s0].xPos, 20.0f + (1.0f * i), 1.0f, 1.0f); + for (i = 0; i < sPlanetNameCards[planetCardIdx].height; i++) { + Lib_TextureRect_IA8(&gMasterDisp, + sPlanetNameCards[planetCardIdx].texture + (sPlanetNameCards[planetCardIdx].width * i), + sPlanetNameCards[planetCardIdx].width, 1, sPlanetNameCards[planetCardIdx].xPos, + 20.0f + (1.0f * i), 1.0f, 1.0f); } - Math_SmoothStepToF(&D_menu_801CEA6C, 255.0f, D_menu_801CEA70, 10.0f, 1.0f); + Math_SmoothStepToF(&sMapPlanetCardAlpha, 255.0f, sMapPlanetCardAlphaScale, 10.0f, 1.0f); - D_menu_801CEA70 *= 1.08; + sMapPlanetCardAlphaScale *= 1.08; } void Map_801A9A8C(void) { s32 i; - s32 sp58; + s32 planetIdx; u8* missionNoTex; - static f32 D_menu_801B6AC0[2] = { 91.0f, 207.0f }; - static f32 D_menu_801B6AC8[2] = { 61.0f, 61.0f }; + static f32 sCardXpos[2] = { 91.0f, 207.0f }; + static f32 sCardYpos[2] = { 61.0f, 61.0f }; switch (gCurrentLevel) { case LEVEL_CORNERIA: missionNoTex = aLargeText_1; - sp58 = 0; + planetIdx = 0; break; case LEVEL_METEO: missionNoTex = aLargeText_2; - sp58 = 1; + planetIdx = 1; break; case LEVEL_SECTOR_Y: missionNoTex = aLargeText_2; - sp58 = 2; + planetIdx = 2; break; case LEVEL_FORTUNA: missionNoTex = aLargeText_3; - sp58 = 3; + planetIdx = 3; break; case LEVEL_KATINA: missionNoTex = aLargeText_3; - sp58 = 4; + planetIdx = 4; break; case LEVEL_AQUAS: missionNoTex = aLargeText_3; - sp58 = 5; + planetIdx = 5; break; case LEVEL_SECTOR_X: missionNoTex = aLargeText_4; - sp58 = 6; + planetIdx = 6; break; case LEVEL_SOLAR: missionNoTex = aLargeText_4; - sp58 = 7; + planetIdx = 7; break; case LEVEL_ZONESS: missionNoTex = aLargeText_4; - sp58 = 8; + planetIdx = 8; break; case LEVEL_TITANIA: missionNoTex = aLargeText_5; - sp58 = 9; + planetIdx = 9; break; case LEVEL_MACBETH: missionNoTex = aLargeText_5; - sp58 = 10; + planetIdx = 10; break; case LEVEL_SECTOR_Z: missionNoTex = aLargeText_5; - sp58 = 11; + planetIdx = 11; break; case LEVEL_BOLSE: missionNoTex = aLargeText_6; - sp58 = 12; + planetIdx = 12; break; case LEVEL_AREA_6: missionNoTex = aLargeText_6; - sp58 = 13; + planetIdx = 13; break; } @@ -5409,25 +5405,27 @@ void Map_801A9A8C(void) { } #endif - TextureRect_IA8(&gMasterDisp, aTextMissionNo, 112, 19, D_menu_801B6AC0[0], D_menu_801B6AC8[0], 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, missionNoTex, 16, 15, D_menu_801B6AC0[1], D_menu_801B6AC8[1], 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aTextMissionNo, 112, 19, sCardXpos[0], sCardYpos[0], 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, missionNoTex, 16, 15, sCardXpos[1], sCardYpos[1], 1.0f, 1.0f); - for (i = 0; i < D_menu_801AF834[sp58].height; i++) { - TextureRect_IA8(&gMasterDisp, D_menu_801AF834[sp58].texture + (D_menu_801AF834[sp58].width * i), - D_menu_801AF834[sp58].width, 1, D_menu_801AF834[sp58].xPos, 94.0f + (1.0f * i), 1.0f, 1.0f); + for (i = 0; i < sPlanetNameCards[planetIdx].height; i++) { + Lib_TextureRect_IA8(&gMasterDisp, sPlanetNameCards[planetIdx].texture + (sPlanetNameCards[planetIdx].width * i), + sPlanetNameCards[planetIdx].width, 1, sPlanetNameCards[planetIdx].xPos, 94.0f + (1.0f * i), + 1.0f, 1.0f); } - for (i = 0; i < D_menu_801AF914[sp58].height; i++) { - TextureRect_IA8(&gMasterDisp, D_menu_801AF914[sp58].texture + (D_menu_801AF914[sp58].width * i), - D_menu_801AF914[sp58].width, 1, D_menu_801AF914[sp58].xPos, 140.0f + (1.0f * i), 1.0f, 1.0f); + for (i = 0; i < sPlanetTitleCards[planetIdx].height; i++) { + Lib_TextureRect_IA8( + &gMasterDisp, sPlanetTitleCards[planetIdx].texture + (sPlanetTitleCards[planetIdx].width * i), + sPlanetTitleCards[planetIdx].width, 1, sPlanetTitleCards[planetIdx].xPos, 140.0f + (1.0f * i), 1.0f, 1.0f); } } void Map_801A9DE8(void) { s32 mask; - if ((D_menu_801CD978 == 0) && - !((D_menu_801CD944 == 3) || (D_menu_801CD944 == 6) || ((D_menu_801CD944 == 7) && (D_menu_801CD948 == 2)))) { + if ((D_menu_801CD978 == 0) && !((sMapState == MAP_IDLE) || (sMapState == MAP_PATH_CHANGE) || + ((sMapState == MAP_GAME_OVER) && (sMapSubState == 2)))) { return; } @@ -5438,55 +5436,55 @@ void Map_801A9DE8(void) { } if ((gGameFrameCount & mask) != 0) { - Map_801AD7EC(254, 16, gLifeCount[gPlayerNum]); + Map_RemainingLives_Draw(254, 16, gLifeCount[gPlayerNum]); } if ((gLastGameState == GSTATE_PLAY) || (gLastGameState == GSTATE_GAME_OVER)) { if (D_menu_801CD83C < gTotalHits) { D_menu_801CD83C = gTotalHits; } - Map_801A9EE4(); - Map_801A9FD4(0); + Map_TotalHits_Draw(); + Map_801A9FD4(false); } } -void Map_801A9EE4(void) { +void Map_TotalHits_Draw(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); Graphics_DisplaySmallText(24, 14, 1.0f, 1.0f, "TOTAL HITS"); - Graphics_DisplaySmallNumber(71 - (func_hud_8008BCBC(gTotalHits) * 8), 24, gTotalHits); + Graphics_DisplaySmallNumber(71 - (HUD_CountDigits(gTotalHits) * 8), 24, gTotalHits); Graphics_DisplaySmallText(143, 14, 1.0f, 1.0f, "TOP"); - Graphics_DisplaySmallNumber(167 - (func_hud_8008BCBC(D_menu_801CD83C) * 8), 24, D_menu_801CD83C); + Graphics_DisplaySmallNumber(167 - (HUD_CountDigits(D_menu_801CD83C) * 8), 24, D_menu_801CD83C); } -void Map_801A9FD4(s32 arg0) { +void Map_801A9FD4(bool arg0) { s32 i; - s32 var_s3; + s32 curMission; f32 var_fs0, var_fs1; s32 pad[2]; f32 temp = 16.0f; if (arg0) { - var_s3 = gMissionNumber; + curMission = gMissionNumber; } else { if ((gLastGameState == GSTATE_PLAY) || (gLastGameState == GSTATE_ENDING)) { - var_s3 = gMissionNumber; + curMission = gMissionNumber; } if (gLastGameState == GSTATE_GAME_OVER) { - var_s3 = D_menu_801CD9AC; + curMission = D_menu_801CD9AC; } } - Map_801AA1CC(var_s3); + Map_PathLineBox_Draw(curMission); if ((gLastGameState == GSTATE_PLAY) || (gLastGameState == GSTATE_ENDING)) { - var_s3 = 7; + curMission = 7; } if (gLastGameState == GSTATE_GAME_OVER) { - var_s3++; + curMission++; } Matrix_Push(&gGfxMatrix); @@ -5495,23 +5493,23 @@ void Map_801A9FD4(s32 arg0) { Matrix_SetGfxMtx(&gMasterDisp); - for (var_fs0 = 0.0f, var_fs1 = -41.5f, i = 0; i < var_s3; i++, var_fs0 += 24.0f + temp, var_fs1 += 13.8f) { + for (var_fs0 = 0.0f, var_fs1 = -41.5f, i = 0; i < curMission; i++, var_fs0 += 24.0f + temp, var_fs1 += 13.8f) { if (gMissionPlanet[i] != PLANET_NONE) { - Map_801AA434(i, 28.0f + var_fs0, 182.0f, gMissionPlanet[i]); - Map_801AA778(i, var_fs1, -25.4f, gMissionPlanet[i]); + Map_PathInfo_Draw(i, 28.0f + var_fs0, 182.0f, gMissionPlanet[i]); + Map_PathPlanet_Draw(i, var_fs1, -25.4f, gMissionPlanet[i]); } } Matrix_Pop(&gGfxMatrix); } -void Map_801AA1CC(s32 arg0) { +void Map_PathLineBox_Draw(s32 curMission) { s32 i; f32 x; s32 r; s32 g; s32 b; - s32 temp; + s32 pathId; f32 y = 182.0f; f32 x2 = 16.0f; PlanetId* ptr = &gMissionPlanet[0]; @@ -5521,9 +5519,9 @@ void Map_801AA1CC(s32 arg0) { if (i < 6) { r = g = b = 255; - if (i < arg0) { - temp = Map_GetPathId(*ptr, *(ptr + 1)); - switch (sPaths[temp].type) { + if (i < curMission) { + pathId = Map_GetPathId(*ptr, *(ptr + 1)); + switch (sPaths[pathId].type) { case 0: r = 16; g = 64; @@ -5546,19 +5544,19 @@ void Map_801AA1CC(s32 arg0) { } else { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); } - TextureRect_RGBA16(&gMasterDisp, D_MAP_60447A0, 8, 8, 28.0f + x + 24.0f, y + 11.0f, 2.0f, 0.2f); + Lib_TextureRect_RGBA16(&gMasterDisp, aMapWhiteSquareTex, 8, 8, 28.0f + x + 24.0f, y + 11.0f, 2.0f, 0.2f); } gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_RGBA16(&gMasterDisp, D_MAP_6047550, 24, 24, 28.0f + x, y, 1.0f, 1.0f); + Lib_TextureRect_RGBA16(&gMasterDisp, aMapPathBoxTex, 24, 24, 28.0f + x, y, 1.0f, 1.0f); } } -void Map_801AA434(s32 arg0, f32 x, f32 y, s32 idx) { +void Map_PathInfo_Draw(s32 missionIdx, f32 x, f32 y, s32 idx) { s32 i; f32 x2; s32 pad; s32 mask; - s32 temp; + s32 curMission; static char* D_menu_801B6AD0[] = { "P", "S", "F" }; static s32 D_menu_801B6ADC[] = { 255, 0, 30 }; static s32 D_menu_801B6AE8[] = { 30, 179, 30 }; @@ -5570,21 +5568,22 @@ void Map_801AA434(s32 arg0, f32 x, f32 y, s32 idx) { Graphics_DisplaySmallText(x + 12.0f - Graphics_GetSmallTextWidth(sPlanetNames[idx]) * 0.5f, y - 8.0f, 1.0f, 1.0f, sPlanetNames[idx]); - Graphics_DisplaySmallNumber(x + 15.0f - ((func_hud_8008BCBC(gMissionHitCount[arg0]) - 1) * 8), y + 24.0f + 1.0f, - gMissionHitCount[arg0]); + Graphics_DisplaySmallNumber(x + 15.0f - ((HUD_CountDigits(gMissionHitCount[missionIdx]) - 1) * 8), y + 24.0f + 1.0f, + gMissionHitCount[missionIdx]); if (gLastGameState == GSTATE_PLAY) { - temp = gMissionNumber; - } - if ((gLastGameState == GSTATE_GAME_OVER) || (gLastGameState == GSTATE_ENDING)) { - temp = gMissionNumber + 1; + curMission = gMissionNumber; } - if (arg0 < temp) { + if ((gLastGameState == GSTATE_GAME_OVER) || (gLastGameState == GSTATE_ENDING)) { + curMission = gMissionNumber + 1; + } + + if (missionIdx < curMission) { mask = 0x00FF0000; x2 = 0.0f; for (i = 0; i < 3; i++, x2 += 9.0f) { - if ((gMissionTeamStatus[arg0] & mask)) { + if ((gMissionTeamStatus[missionIdx] & mask) != 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, D_menu_801B6ADC[i], D_menu_801B6AE8[i], D_menu_801B6AF4[i], 255); Graphics_DisplaySmallText((s32) x + x2 - 1.0f, (s32) y + 24.0f + 8.0f + 2.0f, 1.0f, 1.0f, @@ -5595,7 +5594,7 @@ void Map_801AA434(s32 arg0, f32 x, f32 y, s32 idx) { } } -void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { +void Map_PathPlanet_Draw(s32 missionIdx, f32 x, f32 y, PlanetId planetId) { s32 mask = 0xFFFFFFFF; if ((gGameState == GSTATE_MAP) && (planetId == sCurrentPlanetId)) { @@ -5616,7 +5615,7 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { Matrix_Scale(gGfxMatrix, 0.11f, 0.11f, 0.11f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801B68F8[sPlanets[planetId].id]); + gSPDisplayList(gMasterDisp++, sMapPlanets[sPlanets[planetId].id]); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 128); gDPSetEnvColor(gMasterDisp++, 31, 0, 0, 0); @@ -5624,7 +5623,7 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { Matrix_Scale(gGfxMatrix, 0.8f, 0.8f, 0.8f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801B68F8[sPlanets[planetId].id]); + gSPDisplayList(gMasterDisp++, sMapPlanets[sPlanets[planetId].id]); Matrix_Pop(&gGfxMatrix); } @@ -5644,13 +5643,13 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801B68F8[sPlanets[planetId].id]); + gSPDisplayList(gMasterDisp++, sMapPlanets[sPlanets[planetId].id]); Matrix_Translate(gGfxMatrix, 18.0f, -20.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801B68F8[sPlanets[planetId].id]); + gSPDisplayList(gMasterDisp++, sMapPlanets[sPlanets[planetId].id]); Matrix_Pop(&gGfxMatrix); } break; @@ -5671,7 +5670,7 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801B68F8[sPlanets[planetId].id]); + gSPDisplayList(gMasterDisp++, sMapPlanets[sPlanets[planetId].id]); Matrix_Pop(&gGfxMatrix); } @@ -5693,7 +5692,7 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801B68F8[sPlanets[planetId].id]); + gSPDisplayList(gMasterDisp++, sMapPlanets[sPlanets[planetId].id]); Matrix_Pop(&gGfxMatrix); } @@ -5715,7 +5714,7 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801B68F8[sPlanets[planetId].id]); + gSPDisplayList(gMasterDisp++, sMapPlanets[sPlanets[planetId].id]); Matrix_Pop(&gGfxMatrix); } @@ -5735,7 +5734,7 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801B68F8[sPlanets[planetId].id]); + gSPDisplayList(gMasterDisp++, sMapPlanets[sPlanets[planetId].id]); if (sPlanets[planetId].anim == PL_ANIM_SPIN) { if (planetId != PLANET_VENOM && planetId != PLANET_AQUAS) { @@ -5745,7 +5744,7 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { } else { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); } - gSPDisplayList(gMasterDisp++, D_menu_801B4A40); + gSPDisplayList(gMasterDisp++, gMapVenomCloudDL); } Matrix_Scale(gGfxMatrix, 1.6f, 1.6f, 1.6f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -5756,12 +5755,12 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { break; } - if (gMissionMedal[arg0] != 0) { - Map_801AB17C(x, y, 0.0f); + if (gMissionMedal[missionIdx] != 0) { + Map_PathPlanetMedal_Draw(x, y, 0.0f); } } -void Map_801AB17C(f32 x, f32 y, f32 z) { +void Map_PathPlanetMedal_Draw(f32 x, f32 y, f32 z) { static f32 scale = 0.23f; static f32 xPos = 4.4f; static f32 yPos = 1.0f; @@ -5775,21 +5774,21 @@ void Map_801AB17C(f32 x, f32 y, f32 z) { Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_MAP_601D1F0); + gSPDisplayList(gMasterDisp++, aMapMedalDL); Matrix_Pop(&gGfxMatrix); } -void Map_801AB284(void) { +void Map_BriefingRadio_Setup(void) { D_menu_801CD940 = 0; - gRadioMsg = D_menu_801AF428[sCurrentPlanetId][D_menu_801CD940]; + gRadioMsg = sBriefingMsg[sCurrentPlanetId][D_menu_801CD940]; gRadioMsgRadioId = D_menu_801AF420[D_menu_801CD940]; D_menu_801CF018 = 100; gRadioPrintPosX = 78; gRadioPrintPosY = 166; } -void Map_801AB300(void) { +void Map_BriefingRadio_Update(void) { if (gRadioStateTimer > 0) { gRadioStateTimer--; } @@ -5802,7 +5801,7 @@ void Map_801AB300(void) { break; case 100: - D_menu_801CEA74 = 0; + sTeamStatusAlpha = 0; gCurrentRadioPortrait = 0 + gRadioMsgRadioId; D_menu_801CF018 = 1; gRadioTextBoxScaleY = 0.0f; @@ -5822,7 +5821,7 @@ void Map_801AB300(void) { } D_menu_801CD940 = 1; - gRadioMsg = D_menu_801AF428[sCurrentPlanetId][D_menu_801CD940]; + gRadioMsg = sBriefingMsg[sCurrentPlanetId][D_menu_801CD940]; Audio_PlayVoice(Message_IdFromPtr(gRadioMsg)); @@ -5830,13 +5829,13 @@ void Map_801AB300(void) { gRadioStateTimer = Message_GetCharCount(gRadioMsg) * 2; gCurrentRadioPortrait = gRadioMsgRadioId; D_menu_801CF018 = 4; - D_menu_801CD9A0 = 1; + D_menu_801CD9A0 = true; break; case 1: - D_menu_801CEA74 += 8; - if (D_menu_801CEA74 > 255) { - D_menu_801CEA74 = 255; + sTeamStatusAlpha += 8; + if (sTeamStatusAlpha > 255) { + sTeamStatusAlpha = 255; gRadioTextBoxScaleY = 1.3f; AUDIO_PLAY_SFX(NA_SE_COMPUTER_NOISE, gDefaultSfxSource, 4); @@ -5872,7 +5871,7 @@ void Map_801AB300(void) { D_menu_801CD9A4 = 1; } - if (D_menu_801CD9A0 == 1) { + if (D_menu_801CD9A0 == true) { D_menu_801CF124 += 0.7f; gRadioMsgCharIndex = D_menu_801CF124; } else { @@ -5900,14 +5899,14 @@ void Map_801AB300(void) { break; } else { D_menu_801CD940 = 1; - gRadioMsg = D_menu_801AF428[sCurrentPlanetId][D_menu_801CD940]; + gRadioMsg = sBriefingMsg[sCurrentPlanetId][D_menu_801CD940]; Audio_PlayVoice(Message_IdFromPtr(gRadioMsg)); gRadioMsgRadioId = D_menu_801AF420[D_menu_801CD940]; gCurrentRadioPortrait = gRadioMsgRadioId; gRadioMsgCharIndex = 0; D_menu_801CF124 = 0.0f; gRadioStateTimer = Message_GetCharCount(gRadioMsg) * 2; - D_menu_801CD9A0 = 1; + D_menu_801CD9A0 = true; D_menu_801CD9A4 = 0; D_menu_801CF018 = 4; } @@ -5935,24 +5934,24 @@ void Map_801AB300(void) { case 8: gCurrentRadioPortrait = gRadioMsgRadioId; gRadioTextBoxScaleY = 1.3f; - D_menu_801CEA74 = 255; + sTeamStatusAlpha = 255; break; } if ((D_menu_801CF018 > 0) && (D_menu_801CF018 != 100)) { - Map_801AB978(gCurrentRadioPortrait); - Map_801AB978(D_menu_801AF420[!D_menu_801CD940]); + Map_BriefingRadio_Draw(gCurrentRadioPortrait); + Map_BriefingRadio_Draw(D_menu_801AF420[!D_menu_801CD940]); func_radio_800BB388(); } } -void Map_801AB978(s32 arg0) { +void Map_BriefingRadio_Draw(s32 arg0) { s32 i; f32 xPos; f32 yPos; - s32 sp90[3]; - static f32 D_menu_801B6B0C[3] = { 205.0f, 237.0f, 269.0f }; - static u16* D_menu_801B6B18[3] = { D_MAP_6032A60, D_MAP_6044180, D_MAP_6032440 }; + s32 alpha[3]; + static f32 sTeamStatusPos[3] = { 205.0f, 237.0f, 269.0f }; + static u16* sRadioCharacterFaces[3] = { aMapRadioCharPeppyTex, aMapRadioCharSlippyTex, aMapRadioCharFalcoTex }; switch (arg0) { case 10: @@ -5962,30 +5961,31 @@ void Map_801AB978(s32 arg0) { case 20: case 21: - if (D_menu_801CEA74 != 0) { + if (sTeamStatusAlpha != 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_76); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, D_menu_801CEA74); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sTeamStatusAlpha); xPos = 205.0f; yPos = 77.0f; for (i = 0; i < 12; i++) { - TextureRect_RGBA16(&gMasterDisp, D_MAP_6044820 + (92 * 4 * i), 92, 4, xPos, yPos + (i * 4.0f), 1.0f, - 1.0f); + Lib_TextureRect_RGBA16(&gMasterDisp, D_MAP_6044820 + (92 * 4 * i), 92, 4, xPos, yPos + (i * 4.0f), + 1.0f, 1.0f); } - TextureRect_RGBA16(&gMasterDisp, D_MAP_6044820 + (92 * 4 * 12), 92, 3, xPos, yPos + 48.0f, 1.0f, 1.0f); + Lib_TextureRect_RGBA16(&gMasterDisp, D_MAP_6044820 + (92 * 4 * 12), 92, 3, xPos, yPos + 48.0f, 1.0f, + 1.0f); if (arg0 == 21) { - TextureRect_RGBA16(&gMasterDisp, D_MAP_6046CD0, 32, 34, xPos + 47.0, yPos, 1.0f, 1.0f); + Lib_TextureRect_RGBA16(&gMasterDisp, D_MAP_6046CD0, 32, 34, xPos + 47.0, yPos, 1.0f, 1.0f); } for (i = 0; i < 3; i++) { switch (gSavedTeamShields[3 - i]) { case -1: case -2: - if (D_menu_801CEA74 > 32) { - sp90[i] = 32; + if (sTeamStatusAlpha > 32) { + alpha[i] = 32; } else { - sp90[i] = D_menu_801CEA74; + alpha[i] = sTeamStatusAlpha; } break; @@ -5993,31 +5993,31 @@ void Map_801AB978(s32 arg0) { RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); if ((gGameFrameCount & 0x10) != 0) { - Graphics_DisplaySmallText(D_menu_801B6B0C[i], 131 + 28, 1.0f, 1.0f, "OK !"); + Graphics_DisplaySmallText(sTeamStatusPos[i], 131 + 28, 1.0f, 1.0f, "OK !"); } - sp90[i] = D_menu_801CEA74; + alpha[i] = sTeamStatusAlpha; break; default: - sp90[i] = D_menu_801CEA74; + alpha[i] = sTeamStatusAlpha; break; } RCP_SetupDL(&gMasterDisp, SETUPDL_76); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sp90[i]); - TextureRect_RGBA16(&gMasterDisp, D_menu_801B6B18[i], 28, 28, D_menu_801B6B0C[i], 131.0f, 1.0f, - 1.0f); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, alpha[i]); + Lib_TextureRect_RGBA16(&gMasterDisp, sRadioCharacterFaces[i], 28, 28, sTeamStatusPos[i], 131.0f, + 1.0f, 1.0f); if ((gSavedTeamShields[3 - i] < 0) && (gSavedTeamShields[3 - i] != -2)) { - Map_801ABCDC(i, D_menu_801CEA74); + Map_TeamDownWrench_Draw(i, sTeamStatusAlpha); } } } } } -void Map_801ABCDC(s32 arg0, s32 alpha) { - static s32 D_menu_801B6B24[] = { 81.0f, 125.0f, 170.0f }; +void Map_TeamDownWrench_Draw(s32 teamIdx, s32 alpha) { + static s32 sTeamDownXpos[] = { 81.0f, 125.0f, 170.0f }; Matrix_Push(&gGfxMatrix); @@ -6032,7 +6032,7 @@ void Map_801ABCDC(s32 arg0, s32 alpha) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_menu_801B6B24[arg0], -35.0f, -400.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sTeamDownXpos[teamIdx], -35.0f, -400.0f, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, M_DTOR * -40.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.3f, 0.3f, 1.0f, MTXF_APPLY); @@ -6043,7 +6043,7 @@ void Map_801ABCDC(s32 arg0, s32 alpha) { Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_menu_801B6B24[arg0], -35.0f, -400.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sTeamDownXpos[teamIdx], -35.0f, -400.0f, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, M_DTOR * 40.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.3f, 0.3f, 1.0f, MTXF_APPLY); @@ -6055,7 +6055,7 @@ void Map_801ABCDC(s32 arg0, s32 alpha) { Matrix_Pop(&gGfxMatrix); } -void Map_801ABF1C(void) { +void Map_GralPepperFace_Draw(void) { Matrix_Push(&gGfxMatrix); { Matrix_LookAt(gGfxMatrix, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -400.0f, 0.0f, 1.0f, 0.0f, MTXF_APPLY); @@ -6069,13 +6069,13 @@ void Map_801ABF1C(void) { Matrix_Translate(gGfxMatrix, D_menu_801CEA88, D_menu_801CEA8C, D_menu_801CEA90, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801CEA94, MTXF_APPLY); - Map_801AD048(); + Map_CamMatrixRot(); Matrix_Scale(gGfxMatrix, D_menu_801CEA78, D_menu_801CEA7C, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801AFA30[D_menu_801CD810]); + gSPDisplayList(gMasterDisp++, sMapGralPepperFaceDLs[D_menu_801CD810]); Matrix_SetGfxMtx(&gMasterDisp); @@ -6093,14 +6093,14 @@ void Map_801ABF1C(void) { Matrix_Translate(gGfxMatrix, D_menu_801CEA88, D_menu_801CEA8C - 1.5f, D_menu_801CEA90, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801CEA94, MTXF_APPLY); - Map_801AD048(); + Map_CamMatrixRot(); Matrix_Scale(gGfxMatrix, D_menu_801CEA80, D_menu_801CEA84, 3.3f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - gSPDisplayList(gMasterDisp++, D_MAP_604C350); + gSPDisplayList(gMasterDisp++, aMapTvScreenGlowDL); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); } Matrix_Pop(&gGfxMatrix); @@ -6108,7 +6108,7 @@ void Map_801ABF1C(void) { Matrix_Pop(&gGfxMatrix); } -void Map_801AC200(s32 index) { +void Map_Path_Draw(s32 index) { Vec3f v; f32 r; f32 r2; @@ -6138,21 +6138,21 @@ void Map_801AC200(s32 index) { break; case 100: - D_menu_801CD9BC = 5; + sMapTimer2 = 5; D_menu_801CEEA4 = 10; break; case 10: - if (D_menu_801CD9BC != 0) { - break; // investigate + if (sMapTimer2 != 0) { + break; } - D_menu_801CD9BC = 5; + sMapTimer2 = 5; D_menu_801CEEA4 = 20; break; case 20: - if (D_menu_801CD9BC != 0) { - break; // investigate + if (sMapTimer2 != 0) { + break; } D_menu_801CEEA0++; @@ -6190,13 +6190,13 @@ void Map_801AC200(s32 index) { } if (sPaths[index].unk_14 == 5) { - Map_801AC80C(sPaths[index].type); + Map_PathLine_Draw(sPaths[index].type); } else { - Map_801AC530(index); + Map_Arwing_Draw(index); } } -void Map_801AC530(s32 index) { +void Map_Arwing_Draw(s32 index) { f32 dirX; f32 dirY; f32 dirZ; @@ -6233,9 +6233,9 @@ void Map_801AC530(s32 index) { Matrix_MultVec3f(gGfxMatrix, &src, &dest); - x = D_menu_801CE960[PLANET_SOLAR].x - dest.x; - y = D_menu_801CE960[PLANET_SOLAR].y - dest.y; - z = D_menu_801CE960[PLANET_SOLAR].z - dest.z; + x = sPlanetPositions[PLANET_SOLAR].x - dest.x; + y = sPlanetPositions[PLANET_SOLAR].y - dest.y; + z = sPlanetPositions[PLANET_SOLAR].z - dest.z; x1 = Math_Atan2F(y, sqrtf(SQ(x) + SQ(z))); y1 = -Math_Atan2F(x, z); @@ -6259,7 +6259,7 @@ void Map_801AC530(s32 index) { Matrix_Pop(&gGfxMatrix); } -void Map_801AC80C(PathType pathType) { +void Map_PathLine_Draw(PathType pathType) { static f32 D_menu_801B6B30 = 0.0f; s32 r; s32 g; @@ -6284,7 +6284,7 @@ void Map_801AC80C(PathType pathType) { Matrix_Translate(gGfxMatrix, D_menu_801CEEB0.x, D_menu_801CEEB0.y, D_menu_801CEEB0.z, MTXF_APPLY); - Map_801AD048(); + Map_CamMatrixRot(); Matrix_RotateZ(gGfxMatrix, M_DTOR * D_menu_801B6B30, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 10.0f, MTXF_APPLY); @@ -6298,37 +6298,7 @@ void Map_801AC80C(PathType pathType) { D_menu_801B6B30 -= 45.0f; } -u32 padding_801B6B34[3] = { 0, 0, 0 }; - -CameraPoint D_menu_801B6B40[] = { - { { 0.0f, 260.47226f, 1477.2115f }, { 0.0f, -17.364819f, -98.480774f } }, - { { 0.0f, 20.159666f, 759.7326f }, { 0.0f, -2.652588f, -99.96481f } }, - { { -45.790363f, 0.712088f, 336.90164f }, { 13.467754f, -0.209438f, -99.08872f } }, - { { -59.033607f, -7.952868f, 104.171906f }, { 49.19467f, 6.62739f, -86.80992f } }, - { { -39.374687f, 50.69824f, 40.264343f }, { 65.62447f, -4.497063f, -67.10724f } }, - { { -57.28257f, 48.529156f, -34.806377f }, { 95.470955f, 7.118073f, -11.322705f } }, - { { -64.80925f, 53.131527f, -77.35162f }, { 81.011566f, 3.335592f, 15.689522f } }, - { { -32.061317f, 30.244366f, -127.72071f }, { 32.061317f, 29.755634f, 61.72071f } }, - { { -62.32031f, 25.741756f, -222.99486f }, { 31.160154f, 32.12912f, 61.99743f } }, - { { -105.85609f, 14.339533f, -355.72162f }, { 31.134144f, 34.606018f, 61.91813f } }, - { { -136.99023f, 9.733513f, -450.63974f }, { 31.134144f, 34.606018f, 61.91813f } }, - { { -189.91827f, 1.90328f, -612.00055f }, { 31.134144f, 34.606018f, 61.91813f } }, -}; - -CameraPoint D_menu_801B6C60[] = { - { { 230.0f, -20.0f, -0.000004f }, { 90.0f, -20.0f, 0.000002f } }, - { { 217.92657f, 45.0272f, -0.006961f }, { 96.70746f, -25.01511f, 0.003867f } }, - { { 161.75992f, 66.4626f, 50.403748f }, { 73.1124f, -6.102585f, -28.316711f } }, - { { 117.362366f, 2.619884f, 27.208603f }, { 84.39606f, -4.366472f, -45.34767f } }, - { { 19.168537f, 2.445203f, 27.57978f }, { 7.556181f, -4.366434f, -49.249607f } }, - { { -116.45978f, 1.270139f, 27.862812f }, { -109.60754f, -2.268106f, -49.75502f } }, - { { -117.43788f, 1.272571f, 27.864624f }, { -110.646645f, -2.272449f, -49.758255f } }, - { { -118.43771f, 1.314066f, 27.862713f }, { -111.646935f, -2.346546f, -49.754845f } }, - { { -118.44501f, 1.314066f, 27.862074f }, { -111.63391f, -2.346546f, -49.753704f } }, - { { -118.46446f, 1.314066f, 27.860361f }, { -111.59918f, -2.346546f, -49.750645f } }, -}; - -void Map_801AC9A0(s32 index) { +void Map_PathLines_Draw(s32 index) { Vec3f srcPos; Vec3f destPos; f32 x; @@ -6337,7 +6307,7 @@ void Map_801AC9A0(s32 index) { f32 target; f32 temp; - Map_801ACD90(index, &srcPos, &destPos); + Map_PathLinePos(index, &srcPos, &destPos); x = srcPos.x - destPos.x; y = srcPos.y - destPos.y; @@ -6385,7 +6355,7 @@ void Map_801AC9A0(s32 index) { case 2: temp = 0.04f; - if (D_menu_801CD944 == 7) { + if (sMapState == MAP_GAME_OVER) { temp = 0.25f; } Math_SmoothStepToF(&gTexturedLines[index].zScale, target, temp, 100.0f, 4.0f); @@ -6442,7 +6412,7 @@ void Map_801AC9A0(s32 index) { } } -void Map_801ACD90(s32 index, Vec3f* src, Vec3f* dest) { +void Map_PathLinePos(s32 index, Vec3f* src, Vec3f* dest) { f32 x1; f32 y1; f32 z1; @@ -6540,27 +6510,27 @@ void Map_801ACD90(s32 index, Vec3f* src, Vec3f* dest) { dest->z = z2; } -void Map_801AD048(void) { - f32 sp1C = Math_Atan2F(D_menu_801CD9F8 - D_menu_801CDA04, - sqrtf(SQ(D_menu_801CD9F4 - D_menu_801CDA00) + SQ(D_menu_801CD9FC - D_menu_801CDA08))); - f32 temp = -Math_Atan2F(D_menu_801CD9F4 - D_menu_801CDA00, D_menu_801CD9FC - D_menu_801CDA08); +void Map_CamMatrixRot(void) { + f32 xRot = + Math_Atan2F(sMapCamEyeY - sMapCamAtY, sqrtf(SQ(sMapCamEyeX - sMapCamAtX) + SQ(sMapCamEyeZ - sMapCamAtZ))); + f32 yRot = -Math_Atan2F(sMapCamEyeX - sMapCamAtX, sMapCamEyeZ - sMapCamAtZ); - Matrix_RotateY(gGfxMatrix, -temp, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, -sp1C, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, -yRot, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -xRot, MTXF_APPLY); } -void Map_801AD11C(void) { +void Map_Idle_Update(void) { s32 i; - s32 var_t0; - s32 var_a3; + bool movingCamera; + bool movingCameraStick; u8 var_a1 = 0; u8 var_a2 = 0; u8 var_a0; - f32 x; - f32 y; + f32 stickX; + f32 stickY; - var_a3 = 0; - var_t0 = 0; + movingCameraStick = false; + movingCamera = false; if (gControllerPress[gMainController].button & A_BUTTON) { if ((gLastGameState == GSTATE_PLAY) && (sPrevMissionStatus != MISSION_COMPLETE) && !D_menu_801CEFD0) { @@ -6568,19 +6538,19 @@ void Map_801AD11C(void) { D_menu_801CEFC4 = 1; D_menu_801CEFD4 = 0; D_menu_801CEFDC = 0; - D_menu_801CD944 = 6; + sMapState = MAP_PATH_CHANGE; D_menu_801CD94C = 0; } else { for (i = 0; i < TEAM_ID_MAX; i++) { D_ctx_80177C58[i] = gTeamShields[i]; } - Map_801A659C(); + Map_SetState_ZoomPlanet(); } return; } if (gControllerPress[gMainController].button & START_BUTTON) { - if ((D_menu_801CD944 == 3) && (gLastGameState == GSTATE_PLAY)) { + if ((sMapState == MAP_IDLE) && (gLastGameState == GSTATE_PLAY)) { if (D_menu_801CEFD0) { AUDIO_PLAY_SFX(NA_SE_ERROR, gDefaultSfxSource, 4); } else { @@ -6588,34 +6558,34 @@ void Map_801AD11C(void) { D_menu_801CEFC4 = 1; D_menu_801CEFD4 = 0; D_menu_801CEFDC = 0; - D_menu_801CD944 = 6; + sMapState = MAP_PATH_CHANGE; D_menu_801CD94C = 0; } return; } } - x = gControllerPress[gMainController].stick_x; - y = gControllerPress[gMainController].stick_y; + stickX = gControllerPress[gMainController].stick_x; + stickY = gControllerPress[gMainController].stick_y; - if (y != 0.0f) { - if (D_menu_801CDA0C - (y * 0.05f) < -80.0f) { + if (stickY != 0.0f) { + if (D_menu_801CDA0C - (stickY * 0.05f) < -80.0f) { D_menu_801CDA0C = -80.0f; - y = 0.0f; - } else if (D_menu_801CDA0C - (y * 0.05f) > 80.0f) { + stickY = 0.0f; + } else if (D_menu_801CDA0C - (stickY * 0.05f) > 80.0f) { D_menu_801CDA0C = 80.0f; - y = 0.0f; + stickY = 0.0f; } else { - D_menu_801CDA0C -= y * 0.05f; - var_a3 = 1; - var_a1 = (s32) fabsf(((y * 0.05f) / 0.27f)); + D_menu_801CDA0C -= stickY * 0.05f; + movingCameraStick = true; + var_a1 = (s32) fabsf(((stickY * 0.05f) / 0.27f)); } } - if (x != 0.0f) { - D_menu_801CDA10 += x * 0.05f; - var_a2 = (s32) fabsf((x * 0.05f) / 0.27f); - var_a3 = 1; + if (stickX != 0.0f) { + D_menu_801CDA10 += stickX * 0.05f; + var_a2 = (s32) fabsf((stickX * 0.05f) / 0.27f); + movingCameraStick = true; } if (D_menu_801CF014 == 1) { @@ -6626,12 +6596,12 @@ void Map_801AD11C(void) { Audio_SetSfxMapModulation(var_a0); } - if (D_menu_801CF014 == 0 && var_a3 == 1) { + if ((D_menu_801CF014 == 0) && (movingCameraStick == true)) { Audio_PlaySfxModulated(gDefaultSfxSource, NA_SE_MAP_ROLL); D_menu_801CF014 = 1; } - if ((D_menu_801CF014 == 1) && (var_a3 == 0) && (y == 0.0f) && (x == 0.0f)) { + if ((D_menu_801CF014 == 1) && (movingCameraStick == false) && (stickY == 0.0f) && (stickX == 0.0f)) { var_a1 = 0; var_a2 = 0; Audio_KillSfxById(NA_SE_MAP_ROLL); @@ -6641,51 +6611,51 @@ void Map_801AD11C(void) { if (gControllerHold[gMainController].button & R_TRIG) { if ((D_menu_801CDA14 - 20.0f) > 2475.0f) { D_menu_801CDA14 -= 20.0f; - var_t0 = 1; + movingCamera = true; } } if (gControllerHold[gMainController].button & Z_TRIG) { if ((D_menu_801CDA14 + 20.0f) < 7695.0f) { D_menu_801CDA14 += 20.0f; - var_t0 = 1; + movingCamera = true; } } if (gControllerHold[gMainController].button & U_CBUTTONS) { - if ((D_menu_801CDA04 - 10.0f) >= -1200.0f) { - D_menu_801CDA04 -= 10.0f; - var_t0 = 1; + if ((sMapCamAtY - 10.0f) >= -1200.0f) { + sMapCamAtY -= 10.0f; + movingCamera = true; } } if (gControllerHold[gMainController].button & D_CBUTTONS) { - if ((D_menu_801CDA04 + 10.0f) <= 1200.0f) { - D_menu_801CDA04 += 10.0f; - var_t0 = 1; + if ((sMapCamAtY + 10.0f) <= 1200.0f) { + sMapCamAtY += 10.0f; + movingCamera = true; } } if (gControllerHold[gMainController].button & L_CBUTTONS) { - if ((D_menu_801CDA00 + 10.0f) <= 1200.0f) { - D_menu_801CDA00 += 10.0f; - var_t0 = 1; + if ((sMapCamAtX + 10.0f) <= 1200.0f) { + sMapCamAtX += 10.0f; + movingCamera = true; } } if (gControllerHold[gMainController].button & R_CBUTTONS) { - if ((D_menu_801CDA00 - 10.0f) >= -1200.0f) { - D_menu_801CDA00 -= 10.0f; - var_t0 = 1; + if ((sMapCamAtX - 10.0f) >= -1200.0f) { + sMapCamAtX -= 10.0f; + movingCamera = true; } } - if ((D_menu_801CF010 == 0) && (var_t0 == 1)) { + if ((D_menu_801CF010 == 0) && (movingCamera == true)) { AUDIO_PLAY_SFX(NA_SE_MAP_MOVE, gDefaultSfxSource, 4); D_menu_801CF010 = 1; } - if ((D_menu_801CF010 == 1) && (var_t0 == 0)) { + if ((D_menu_801CF010 == 1) && (movingCamera == false)) { Audio_KillSfxById(NA_SE_MAP_MOVE); D_menu_801CF010 = 0; } @@ -6694,46 +6664,76 @@ void Map_801AD11C(void) { void func_dummy_() { } -void Map_801AD718(f32 arg0, f32 arg1, f32 arg2, f32* arg3, f32* arg4, f32* arg5, f32 arg6, f32 arg7, f32 arg8) { - Vec3f sp2C; - Vec3f sp20; +void Map_SetCamRot(f32 camAtX, f32 camAtY, f32 camAtZ, f32* camEyeX, f32* camEyeY, f32* camEyeZ, f32 srcZ, f32 xRot, + f32 yRot) { + Vec3f dest; + Vec3f src; - sp20.x = 0.0f; - sp20.y = 0.0f; - sp20.z = arg6; + src.x = 0.0f; + src.y = 0.0f; + src.z = srcZ; - Matrix_Translate(gCalcMatrix, arg0, arg1, arg2, MTXF_NEW); - Matrix_RotateY(gCalcMatrix, M_DTOR * arg8, MTXF_APPLY); - Matrix_RotateX(gCalcMatrix, M_DTOR * arg7, MTXF_APPLY); - Matrix_MultVec3f(gCalcMatrix, &sp20, &sp2C); + Matrix_Translate(gCalcMatrix, camAtX, camAtY, camAtZ, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, M_DTOR * yRot, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, M_DTOR * xRot, MTXF_APPLY); + Matrix_MultVec3f(gCalcMatrix, &src, &dest); - *arg3 = sp2C.x; - *arg4 = sp2C.y; - *arg5 = sp2C.z; + *camEyeX = dest.x; + *camEyeY = dest.y; + *camEyeZ = dest.z; } -void Map_801AD7EC(s32 xPos, s32 yPos, s32 number) { +void Map_RemainingLives_Draw(s32 xPos, s32 yPos, s32 number) { RCP_SetupDL(&gMasterDisp, SETUPDL_85); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - - TextureRect_CI4(&gMasterDisp, D_MAP_601DC10, D_MAP_601DC90, 16, 16, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, aMapArwingIconTex, aMapArwingIconTLUT, 16, 16, xPos, yPos, 1.0f, 1.0f); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); - - TextureRect_CI4(&gMasterDisp, D_MAP_601DCA0, D_MAP_601DCD8, 16, 7, xPos + 18.0f, yPos + 9.0f, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, aMapXTex, aMapXTLUT, 16, 7, xPos + 18.0f, yPos + 9.0f, 1.0f, 1.0f); RCP_SetupDL(&gMasterDisp, SETUPDL_83); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); if (number >= 10) { - Graphics_DisplaySmallNumber(xPos + 33.0f - ((func_hud_8008BCBC(number) - 1) * 8) + 3, yPos + 8.0f, number); + Graphics_DisplaySmallNumber(xPos + 33.0f - ((HUD_CountDigits(number) - 1) * 8) + 3, yPos + 8.0f, number); } else { Graphics_DisplaySmallNumber(xPos + 33.0f, yPos + 8.0f, number); } } +// these probably belong to fox_title data + +u32 padding_801B6B34[3] = { 0, 0, 0 }; + +CameraPoint D_menu_801B6B40[] = { + { { 0.0f, 260.47226f, 1477.2115f }, { 0.0f, -17.364819f, -98.480774f } }, + { { 0.0f, 20.159666f, 759.7326f }, { 0.0f, -2.652588f, -99.96481f } }, + { { -45.790363f, 0.712088f, 336.90164f }, { 13.467754f, -0.209438f, -99.08872f } }, + { { -59.033607f, -7.952868f, 104.171906f }, { 49.19467f, 6.62739f, -86.80992f } }, + { { -39.374687f, 50.69824f, 40.264343f }, { 65.62447f, -4.497063f, -67.10724f } }, + { { -57.28257f, 48.529156f, -34.806377f }, { 95.470955f, 7.118073f, -11.322705f } }, + { { -64.80925f, 53.131527f, -77.35162f }, { 81.011566f, 3.335592f, 15.689522f } }, + { { -32.061317f, 30.244366f, -127.72071f }, { 32.061317f, 29.755634f, 61.72071f } }, + { { -62.32031f, 25.741756f, -222.99486f }, { 31.160154f, 32.12912f, 61.99743f } }, + { { -105.85609f, 14.339533f, -355.72162f }, { 31.134144f, 34.606018f, 61.91813f } }, + { { -136.99023f, 9.733513f, -450.63974f }, { 31.134144f, 34.606018f, 61.91813f } }, + { { -189.91827f, 1.90328f, -612.00055f }, { 31.134144f, 34.606018f, 61.91813f } }, +}; + +CameraPoint D_menu_801B6C60[] = { + { { 230.0f, -20.0f, -0.000004f }, { 90.0f, -20.0f, 0.000002f } }, + { { 217.92657f, 45.0272f, -0.006961f }, { 96.70746f, -25.01511f, 0.003867f } }, + { { 161.75992f, 66.4626f, 50.403748f }, { 73.1124f, -6.102585f, -28.316711f } }, + { { 117.362366f, 2.619884f, 27.208603f }, { 84.39606f, -4.366472f, -45.34767f } }, + { { 19.168537f, 2.445203f, 27.57978f }, { 7.556181f, -4.366434f, -49.249607f } }, + { { -116.45978f, 1.270139f, 27.862812f }, { -109.60754f, -2.268106f, -49.75502f } }, + { { -117.43788f, 1.272571f, 27.864624f }, { -110.646645f, -2.272449f, -49.758255f } }, + { { -118.43771f, 1.314066f, 27.862713f }, { -111.646935f, -2.346546f, -49.754845f } }, + { { -118.44501f, 1.314066f, 27.862074f }, { -111.63391f, -2.346546f, -49.753704f } }, + { { -118.46446f, 1.314066f, 27.860361f }, { -111.59918f, -2.346546f, -49.750645f } }, +}; + #if MODS_LEVEL_SELECT == 1 #include "../../mods/levelselect.c" #endif diff --git a/src/overlays/ovl_menu/fox_option.c b/src/overlays/ovl_menu/fox_option.c index ad657918..af42d5e9 100644 --- a/src/overlays/ovl_menu/fox_option.c +++ b/src/overlays/ovl_menu/fox_option.c @@ -14,21 +14,21 @@ #include "assets/ast_vs_menu.h" #include "assets/ast_map.h" -extern s32 D_menu_801B81A8[][3]; -extern Gfx D_menu_801B4A40[]; -extern Gfx D_menu_801B5E78[]; -extern Gfx D_menu_801B61E0[]; -extern Gfx D_menu_801B6548[]; -extern Gfx D_menu_801B4D70[]; -extern Gfx D_menu_801B5B10[]; -extern Gfx D_menu_801B5440[]; -extern Gfx D_menu_801B50D8[]; -extern Gfx D_menu_801B5E78[]; -extern Gfx D_menu_801B57A8[]; -extern f32 D_menu_801CD818[]; +extern s32 gRankingTeamAlive[][3]; +extern Gfx gMapVenomCloudDL[]; +extern Gfx gMapKatinaDL[]; +extern Gfx gMapMacbethDL[]; +extern Gfx gMapZonessDL[]; +extern Gfx gMapCorneriaDL[]; +extern Gfx gMapTitaniaDL[]; +extern Gfx gMapAquasDL[]; +extern Gfx gMapFortunaDL[]; +extern Gfx gMapKatinaDL[]; +extern Gfx gMapVenomDL[]; +extern f32 D_menu_801CD818[9]; s32 D_menu_801B9090; -s32 D_menu_801B9094; +s32 sRankInPos; s32 D_menu_801B9098; s32 D_menu_801B90A0[3]; s32 D_menu_801B90B0[3]; @@ -38,11 +38,11 @@ f32 D_menu_801B90E0[3]; f32 D_menu_801B90F0[3]; f32 D_menu_801B9100[3]; f32 D_menu_801B9110[3]; -f32 D_menu_801B911C; -f32 D_menu_801B9120; -OptionId D_menu_801B9124; +f32 sNameEntryLightXrot; +f32 sNameEntryLightYrot; +OptionId sMenuEntryState; s32 D_menu_801B9128; -s32 D_menu_801B912C; +s32 sMainMenuState; s32 D_menu_801B9130; s32 D_menu_801B9134; s32 D_menu_801B9138; @@ -51,24 +51,24 @@ s32 D_menu_801B9140[3]; s32 D_menu_801B914C; u8 D_menu_801B9150[3][2]; s32 D_menu_801B9158; -UnkStruct_D_menu_801B9250 D_menu_801B9160[3]; -s32 D_menu_801B9178; -s32 D_menu_801B917C; -UnkStruct_D_menu_801B9250 D_menu_801B9180; -UnkStruct_D_menu_801B9250 D_menu_801B9188; -UnkStruct_D_menu_801B9250 D_menu_801B9190; -UnkStruct_D_menu_801B9250 D_menu_801B9198; +StickInput D_menu_801B9160[3]; +s32 D_menu_801B9178; // timer of some kind +s32 D_menu_801B917C; // timer of some kind +StickInput D_menu_801B9180; +StickInput D_menu_801B9188; +StickInput D_menu_801B9190; +StickInput D_menu_801B9198; s32 D_menu_801B91A0; -s32 D_menu_801B91A4; -s32 D_menu_801B91A8; -s32 D_menu_801B91AC; -s32 D_menu_801B91B0; -s32 D_menu_801B91B4; +s32 sMainMenuCursor; // Position of the cursor in the main menu. +s32 sVsMenuCursor; // Position of the cursor in the versus menu. +s32 sExpertSoundCursor; // Whether the Expert Sound options are selected in the menu. +s32 sExpertModeCursor; // Whether the Expert Main Game mode is selected in the menu. +s32 D_menu_801B91B4; // Set to 0 and never used. s32 D_menu_801B91B8; -s32 D_menu_801B91BC; +bool sDrawCursor; s32 D_menu_801B91C0; s32 D_menu_801B91C4; -bool D_menu_801B91C8; +bool sExpertModesEnabled; s32 D_menu_801B91CC; s32 D_menu_801B91D0; f32 D_menu_801B91D4; @@ -77,72 +77,72 @@ f32 D_menu_801B91DC; f32 D_menu_801B91E0; f32 D_menu_801B91E4; f32 D_menu_801B91E8; -f32 D_menu_801B91EC; -s32 D_menu_801B91F0; +f32 sOkConfirmTimer; // Time before going to the next screen after confirming "OK?" in the versus menu. +bool sVsSubMenuFirstState; // Whether the first sub menu option has yet to be selected f32 D_menu_801B91F4; f32 D_menu_801B91F8; -f32 D_menu_801B91FC; -f32 D_menu_801B9200; -f32 D_menu_801B9204; -f32 D_menu_801B9208; -f32 D_menu_801B920C; -f32 D_menu_801B9210; +f32 sRightArwingCursorYrot; +f32 sLeftArwingCursorYrot; +f32 sLightningXpos; +f32 sLightningYpos; +f32 sLightningXScale; +f32 sLightningYScale; s32 D_menu_801B9214; f32 D_menu_801B9218; f32 D_menu_801B921C; f32 D_menu_801B9220; -f32 D_menu_801B9224; -f32 D_menu_801B9228; -s32 sArwingLightColR; // colR -s32 sArwingLightColG; // colG -s32 sArwingLightColB; // colB -s32 sArwingLightAmbR; // ambR -s32 sArwingLightAmbG; // ambG -s32 sArwingLightAmbB; // ambB -s32 D_menu_801B9244; -s32 D_menu_801B9248; +f32 sArwingLightXrot; +f32 sArwingLightYrot; +s32 sArwingLightColR; +s32 sArwingLightColG; +s32 sArwingLightColB; +s32 sArwingLightAmbR; +s32 sArwingLightAmbG; +s32 sArwingLightAmbB; +bool sMainMenuFromCancel; +bool sVsSubMenuFromCancel; u8 D_menu_801B924C; -UnkStruct_D_menu_801B9250 D_menu_801B9250; -UnkStruct_D_menu_801B9250 D_menu_801B9258; -UnkStruct_D_menu_801B9250 D_menu_801B9260; -UnkStruct_D_menu_801B9250 D_menu_801B9268; +StickInput D_menu_801B9250; +StickInput D_menu_801B9258; +StickInput D_menu_801B9260; +StickInput D_menu_801B9268; f32 D_menu_801B9270[5]; s32 D_menu_801B9284; -s32 D_menu_801B9288; // gap -UnkStruct_D_menu_801B9250 D_menu_801B9290; +s32 D_menu_801B9288; +StickInput D_menu_801B9290; f32 D_menu_801B9298[32]; -s32 spectrumAnalyzerMode; +s32 sSpectrumAnalyzerMode; s32 D_menu_801B931C; -bool sMusicPlaying; // MusicPlaying status in the expert sound options +bool sMusicPlaying; // Music is playing status in the expert sound options extern s32 BSS_PAD_0; s32 D_menu_801B9330[2]; s32 D_menu_801B933C; -s32 D_menu_801B9340; // gap +s32 D_menu_801B9340; s32 D_menu_801B9348[4]; f32 D_menu_801B9358[4]; f32 D_menu_801B9368; -s32 D_menu_801B936C; +s32 sPointConfirmTimer; f32 D_menu_801B9370; -s32 D_menu_801B9374; +s32 sStageSelectConfirmTimer; f32 D_menu_801B9378; -s32 D_menu_801B937C; -UnkStruct_D_menu_801B9250 D_menu_801B9380[4]; -UnkStruct_D_menu_801B9250 D_menu_801B93A0[4]; +s32 sTimeTrialConfirmTimer; +StickInput D_menu_801B9380[4]; +StickInput D_menu_801B93A0[4]; u8 D_menu_801B93C4; extern s32 BSS_PAD_1; -s32 D_menu_801B93D0; +s32 sVsMenuSelection; s32 D_menu_801B93D4; s32 D_menu_801B93D8; s32 D_menu_801B93DC; -s32 D_menu_801B93E0; +bool sRanking2ndPage; s32 D_menu_801B93E4; s32 D_menu_801B93E8; s32 D_menu_801B93EC; f32 D_menu_801B93F0; f32 D_menu_801B93F4; -f32 D_menu_801B93F8; // gap -UnkStruct_D_menu_801B9250 D_menu_801B9400; -UnkStruct_D_menu_801B9250 D_menu_801B9408; +f32 D_menu_801B93F8; +StickInput D_menu_801B9400; +StickInput D_menu_801B9408; #include "prevent_bss_reordering2.h" struct BssPad0 { @@ -168,45 +168,44 @@ f32 D_menu_801AE600[] = { 151.0f, 151.0f }; f32 D_menu_801AE608[] = { 8.0f, 8.0f, 8.0f, 8.0f, 8.0f, 8.0f }; f32 D_menu_801AE620[] = { 1.9f, 2.4f, 0.9f, 1.9f, 1.8f, 2.4f }; -// D_menu_801AE638 OptionEntry sOptionCardList[] = { { - { 0, 0, D_OPT_8003B50, 0, 72, 12, 126.0f, 46.0f, 1.0f, 1.0f, 20, 0, 75, 255 }, + { 0, 0, aMainGameCardTex, 0, 72, 12, 126.0f, 46.0f, 1.0f, 1.0f, 20, 0, 75, 255 }, { 0.0f, 30.0f, -130.0f, 0.2f, 0.11f }, { -40.0f, 27.0f, 80.0f }, 1, 1, }, { - { 0, 0, D_OPT_8003EB0, 0, 80, 12, 126.0f, 184.0f, 1.0f, 1.0f, 20, 0, 75, 255 }, + { 0, 0, aTrainingCardTex, 0, 80, 12, 126.0f, 184.0f, 1.0f, 1.0f, 20, 0, 75, 255 }, { 0.0f, 18.0f, -130.0f, 0.2f, 0.11f }, { -40.0f, 16.0f, 80.0f }, 1, 1, }, { - { 0, 0, D_OPT_8004270, 0, 32, 10, 126.0f, 184.0f, 1.0f, 1.0f, 20, 0, 75, 255 }, + { 0, 0, aVsCardTex, 0, 32, 10, 126.0f, 184.0f, 1.0f, 1.0f, 20, 0, 75, 255 }, { 0.0f, 6.0f, -130.0f, 0.2f, 0.11f }, { -40.0f, 6.0f, 80.0f }, 1, 1, }, { - { 0, 0, D_OPT_80043B0, 0, 64, 12, 110.0f, 91.0f, 1.0f, 1.0f, 20, 0, 75, 255 }, + { 0, 0, aRankingCardTex, 0, 64, 12, 110.0f, 91.0f, 1.0f, 1.0f, 20, 0, 75, 255 }, { 0.0f, -6.0f, -130.0f, 0.2f, 0.11f }, { -40.0f, -5.0f, 80.0f }, 1, 1, }, { - { 0, 0, D_OPT_80046B0, 0, 64, 10, 110.0f, 116.0f, 1.0f, 1.0f, 20, 0, 75, 255 }, + { 0, 0, aSoundCardTex, 0, 64, 10, 110.0f, 116.0f, 1.0f, 1.0f, 20, 0, 75, 255 }, { 0.0f, -18.0f, -130.0f, 0.2f, 0.11f }, { -40.0f, -16.0f, 80.0f }, 1, 1, }, { - { 0, 0, D_OPT_8004930, 0, 80, 10, 126.0f, 184.0f, 1.0f, 1.0f, 20, 0, 75, 255 }, + { 0, 0, aDataCardTex, 0, 80, 10, 126.0f, 184.0f, 1.0f, 1.0f, 20, 0, 75, 255 }, { 0.0f, -30.0f, -130.0f, 0.2f, 0.11f }, { -40.0f, -27.0f, 80.0f }, 1, @@ -214,31 +213,31 @@ OptionEntry sOptionCardList[] = { }, }; -// D_menu_801AE878 OptionEntry sOptionVSCardList[] = { { - { 0, 0, D_OPT_8005010, 0, 96, 13, 110.0f, 91.0f, 1.0f, 1.0f, 20, 0, 75, 255 }, + { 0, 0, aVsPointMatchCardTex, 0, 96, 13, 110.0f, 91.0f, 1.0f, 1.0f, 20, 0, 75, 255 }, { 0.0f, 11.0f, -130.0f, 0.2f, 0.11f }, { -40.0f, 11.0f, 80.0f }, 1, 1, }, { - { 0, 0, D_OPT_80054F0, 0, 96, 10, 110.0f, 116.0f, 1.0f, 1.0f, 20, 0, 75, 255 }, + { 0, 0, aVsBattleRoyalCardTex, 0, 96, 10, 110.0f, 116.0f, 1.0f, 1.0f, 20, 0, 75, 255 }, { 0.0f, 0.0f, -130.0f, 0.2f, 0.11f }, { -40.0f, 0.0f, 80.0f }, 1, 1, }, { - { 0, 0, D_OPT_8005910, 0, 96, 10, 110.0f, 138.0f, 1.0f, 1.0f, 20, 0, 75, 255 }, + { 0, 0, aVsTimeTrialCardTex, 0, 96, 10, 110.0f, 138.0f, 1.0f, 1.0f, 20, 0, 75, 255 }, { 0.0f, -11.0f, -130.0f, 0.2f, 0.11f }, { -40.0f, -11.0f, 80.0f }, 1, 1, }, }; -u8 D_menu_801AE998[] = { SOUNDMODE_STEREO, SOUNDMODE_MONO, SOUNDMODE_HEADSET }; + +u8 sSoundMode[] = { SOUNDMODE_STEREO, SOUNDMODE_MONO, SOUNDMODE_HEADSET }; u8 D_menu_801AE99C[] = { 0, 1, 2 }; @@ -246,23 +245,23 @@ f32 D_menu_801AE9A0[4] = { 62.0f, 222.0f, 75.0f, 235.0f }; f32 D_menu_801AE9B0[4] = { 43.0f, 43.0f, 46.0f, 46.0f }; -OptionTexture D_menu_801AE9C0[4] = { - { 2, 0, D_OPT_80143B0, D_OPT_80147B0, 32, 32, 56.0f, 175.0f, 1.0f, 1.0f, 255, 255, 255, 255 }, - { 2, 0, D_OPT_80143B0, D_OPT_80147B0, 32, 32, 216.0f, 175.0f, 1.0f, 1.0f, 255, 255, 255, 255 }, - { 1, 0, D_OPT_80039D0, D_OPT_8003A50, 16, 16, 69.0f, 178.0f, 1.0f, 1.0f, 255, 255, 255, 255 }, - { 1, 0, D_OPT_80039D0, D_OPT_8003A50, 16, 16, 229.0f, 178.0f, 1.0f, 1.0f, 255, 255, 255, 255 }, +OptionCardTexture D_menu_801AE9C0[4] = { + { 2, 0, aSpeakerTex, aSpeakerTLUT, 32, 32, 56.0f, 175.0f, 1.0f, 1.0f, 255, 255, 255, 255 }, + { 2, 0, aSpeakerTex, aSpeakerTLUT, 32, 32, 216.0f, 175.0f, 1.0f, 1.0f, 255, 255, 255, 255 }, + { 1, 0, aSpeakerCenterTex, aSpeakerCenterTLUT, 16, 16, 69.0f, 178.0f, 1.0f, 1.0f, 255, 255, 255, 255 }, + { 1, 0, aSpeakerCenterTex, aSpeakerCenterTLUT, 16, 16, 229.0f, 178.0f, 1.0f, 1.0f, 255, 255, 255, 255 }, }; -OptionTexture D_menu_801AEAA0[3] = { - { 3, 0, D_OPT_8013990, 0, 104, 10, 151.0f, 135.0f, 1.05f, 1.0f, 255, 255, 255, 255 }, - { 3, 0, D_OPT_8013990, 0, 104, 10, 151.0f, 161.0f, 1.05f, 1.0f, 255, 255, 255, 255 }, - { 3, 0, D_OPT_8013990, 0, 104, 10, 151.0f, 188.0f, 1.05f, 1.0f, 255, 255, 255, 255 }, +OptionCardTexture D_menu_801AEAA0[3] = { + { 3, 0, aSliderFrameTex, 0, 104, 10, 151.0f, 135.0f, 1.05f, 1.0f, 255, 255, 255, 255 }, + { 3, 0, aSliderFrameTex, 0, 104, 10, 151.0f, 161.0f, 1.05f, 1.0f, 255, 255, 255, 255 }, + { 3, 0, aSliderFrameTex, 0, 104, 10, 151.0f, 188.0f, 1.05f, 1.0f, 255, 255, 255, 255 }, }; -OptionTexture D_menu_801AEB48[3] = { - { 3, 0, D_OPT_80141B0, 0, 16, 16, 245.0f, 132.0f, 1.0f, 1.0f, 255, 255, 255, 255 }, - { 3, 0, D_OPT_80141B0, 0, 16, 16, 245.0f, 158.0f, 1.0f, 1.0f, 255, 255, 255, 255 }, - { 3, 0, D_OPT_80141B0, 0, 16, 16, 245.0f, 185.0f, 1.0f, 1.0f, 255, 255, 255, 255 }, +OptionCardTexture D_menu_801AEB48[3] = { + { 3, 0, aSliderTex, 0, 16, 16, 245.0f, 132.0f, 1.0f, 1.0f, 255, 255, 255, 255 }, + { 3, 0, aSliderTex, 0, 16, 16, 245.0f, 158.0f, 1.0f, 1.0f, 255, 255, 255, 255 }, + { 3, 0, aSliderTex, 0, 16, 16, 245.0f, 185.0f, 1.0f, 1.0f, 255, 255, 255, 255 }, }; Vtx D_menu_801AEBF0[] = { @@ -321,16 +320,16 @@ s32 D_menu_801AED28[] = { s32 D_menu_801AED3C[4] = { 0, 0, 0, 0 }; -UnkStruct_D_menu_801AED4C D_menu_801AED4C[24] = { +RouteColoredLine sRouteColoredLine[24] = { { 9, 0, 0 }, { 0, 12, 0 }, { 12, 4, 0 }, { 4, 10, 0 }, { 10, 2, 0 }, { 6, 4, 0 }, { 7, 2, 0 }, { 3, 2, 0 }, { 2, 14, 0 }, { 5, 6, 1 }, { 6, 13, 1 }, { 13, 7, 1 }, { 4, 7, 1 }, { 12, 13, 1 }, { 8, 7, 1 }, { 9, 5, 2 }, { 5, 11, 2 }, { 11, 8, 2 }, { 8, 3, 2 }, { 3, 1, 2 }, { 7, 1, 2 }, { 1, 14, 2 }, { 0, 6, 3 }, { 4, 3, 4 }, }; Gfx* D_menu_801AEE6C[16] = { - D_MAP_6060610, D_MAP_601DE80, D_MAP_604B750, D_MAP_601F6B0, D_MAP_601C0D0, D_MAP_601C960, - D_menu_801B5E78, D_menu_801B61E0, D_menu_801B6548, D_menu_801B4D70, D_menu_801B5B10, D_menu_801B5440, - D_menu_801B50D8, D_MAP_604DB10, D_menu_801B57A8, D_menu_801B57A8, + aMapMeteorDL, aMapArea6DL, aMapBolseDL, aMapSectorZDL, aMapSectorXDL, aMapSectorYDL, + gMapKatinaDL, gMapMacbethDL, gMapZonessDL, gMapCorneriaDL, gMapTitaniaDL, gMapAquasDL, + gMapFortunaDL, aMapSolarDL, gMapVenomDL, gMapVenomDL, }; char* D_menu_801AEEAC[] = { @@ -355,7 +354,7 @@ Gfx D_menu_801AEF30[] = { s32 PAD_menu_801AEF50[] = { 0, 0, 0 }; -char D_menu_801AEF5C[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789."; +char sCharMap[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789."; f32 D_menu_801AEF84[] = { 24.0f, 0.0f, -24.0f }; f32 D_menu_801AEF90[] = { 111.0f, 112.0f, 121.0f }; @@ -367,29 +366,31 @@ void Option_Setup(void) { s32 i; #if MODS_LEVEL_SELECT == 1 - for (i = 0; i < PLANET_MAX; i++) { + for (i = 0; i < ARRAY_COUNT(gSaveFile.save.data.planet); i++) { gSaveFile.save.data.planet[i].expertClear = 1; gSaveFile.save.data.planet[i].normalClear = 1; + gSaveFile.save.data.planet[i].normalMedal = 1; + gSaveFile.save.data.planet[i].expertMedal = 1; gSaveFile.save.data.planet[i].played = 1; } Save_Write(); #endif gVIsPerFrame = 2; - sOptionCardList[0].unk_00.texture = D_OPT_8003B50; - sOptionCardList[0].unk_00.width = 72; - sOptionCardList[0].unk_00.height = 12; - sOptionCardList[4].unk_00.texture = D_OPT_80046B0; - sOptionCardList[4].unk_00.width = 64; - sOptionCardList[4].unk_00.height = 10; + sOptionCardList[OPTION_MAP].tex.texture = aMainGameCardTex; + sOptionCardList[OPTION_MAP].tex.width = 72; + sOptionCardList[OPTION_MAP].tex.height = 12; + sOptionCardList[OPTION_SOUND].tex.texture = aSoundCardTex; + sOptionCardList[OPTION_SOUND].tex.width = 64; + sOptionCardList[OPTION_SOUND].tex.height = 10; - for (i = 0; i < OPTION_COUNT; i++) { + for (i = 0; i < ARRAY_COUNT(sOptionCardList); i++) { sOptionCardCurTextPosX[i] = sOptionCardTextPosX[i]; sOptionCardCurTextPosY[i] = sOptionCardTextPosY[i]; } enableExpertModes = true; - for (i = 0; i < 16; i++) { + for (i = 0; i < ARRAY_COUNT(gSaveFile.save.data.planet); i++) { if (i == SAVE_SLOT_VENOM_1) { continue; } @@ -405,34 +406,34 @@ void Option_Setup(void) { } } - D_menu_801B91C8 = enableExpertModes; + sExpertModesEnabled = enableExpertModes; + gFillScreenRed = 0; gFillScreenGreen = 0; gFillScreenBlue = 0; gFillScreenAlpha = 0; gBlurAlpha = 255; - gBgColor = 0; - D_menu_801B91A4 = 0; + sMainMenuCursor = OPTION_MAP; if ((gLastGameState == GSTATE_PLAY) && (gCurrentLevel == LEVEL_TRAINING)) { gLastGameState = GSTATE_NONE; - D_menu_801B91A4 = 1; + sMainMenuCursor = OPTION_TRAINING; } - D_menu_801B91A8 = 0; - D_menu_801B91AC = 0; - D_menu_801B91B0 = 0; + sVsMenuCursor = 0; + sExpertSoundCursor = 0; + sExpertModeCursor = 0; playedExpertMode = gExpertMode; gExpertMode = false; gGameFrameCount = 0; - D_menu_801B8284 = 0; + sWipeHeight = 0; D_menu_801B9178 = 0; D_menu_801B917C = 0; - D_menu_801B9124 = OPTION_MAIN_MENU; + sMenuEntryState = OPTION_MAIN_MENU; if ((gLastGameState == GSTATE_GAME_OVER) || (gLastGameState == GSTATE_ENDING)) { if (gLastGameState == GSTATE_ENDING) { @@ -459,52 +460,53 @@ void Option_Setup(void) { } } - Title_80188010(); - D_menu_801B9094 = Option_8019C8C4(); + Title_GetRankTotalHits(); - if (D_menu_801B9094 != -1) { - D_menu_801B9124 = 200; + sRankInPos = Option_RankInPos_Check(); + + if (sRankInPos != -1) { + sMenuEntryState = OPTION_NAME_ENTRY; } else { - D_menu_801B9124 = 300; + sMenuEntryState = OPTION_SCORE; } } else if (D_game_800D2870) { - D_menu_801B91A4 = 2; - D_menu_801B91A8 = gVsMatchType; - for (i = 0; i < OPTION_COUNT; i++) { - if (i == 2) { + sMainMenuCursor = OPTION_VERSUS; + sVsMenuCursor = gVsMatchType; + for (i = 0; i < ARRAY_COUNT(sOptionCardList); i++) { + if (i == OPTION_VERSUS) { continue; } - sOptionCardList[i].unk_38.xScale = 0.01f; - sOptionCardList[i].unk_38.yScale = 0.21f; - sOptionCardList[i].unk_38.y = sOptionCardPosY[i]; - sOptionCardList[i].unk_38.x = 0.0f; - sOptionCardList[i].unk_38.z = 0.0f; - sOptionCardList[i].unk_5C = false; + sOptionCardList[i].frame.xScale = 0.01f; + sOptionCardList[i].frame.yScale = 0.21f; + sOptionCardList[i].frame.y = sOptionCardPosY[i]; + sOptionCardList[i].frame.x = 0.0f; + sOptionCardList[i].frame.z = 0.0f; + sOptionCardList[i].drawFrame = false; - sOptionCardList[i].unk_00.xScale = 0.01f; - sOptionCardList[i].unk_00.yScale = 1.0f; - sOptionCardList[i].unk_00.xPos = 158.0f; - sOptionCardList[i].unk_00.yPos = sOptionCardCurTextPosY[i]; - sOptionCardList[i].unk_58 = false; + sOptionCardList[i].tex.xScale = 0.01f; + sOptionCardList[i].tex.yScale = 1.0f; + sOptionCardList[i].tex.xPos = 158.0f; + sOptionCardList[i].tex.yPos = sOptionCardCurTextPosY[i]; + sOptionCardList[i].drawTex = false; } - sOptionCardList[2].unk_38.x = 0.0f; - sOptionCardList[2].unk_38.z = 0.0f; - sOptionCardList[2].unk_38.y = 90.0f; - sOptionCardList[2].unk_38.xScale = 0.4f; - sOptionCardList[2].unk_38.yScale = 0.21f; - sOptionCardList[2].unk_5C = true; - sOptionCardList[2].unk_00.xScale = 1.0f; - sOptionCardList[2].unk_00.yScale = 1.0f; - sOptionCardList[2].unk_00.xPos = 145.0f; - sOptionCardList[2].unk_00.yPos = 25.0f; - sOptionCardList[2].unk_58 = true; + sOptionCardList[OPTION_VERSUS].frame.x = 0.0f; + sOptionCardList[OPTION_VERSUS].frame.z = 0.0f; + sOptionCardList[OPTION_VERSUS].frame.y = 90.0f; + sOptionCardList[OPTION_VERSUS].frame.xScale = 0.4f; + sOptionCardList[OPTION_VERSUS].frame.yScale = 0.21f; + sOptionCardList[OPTION_VERSUS].drawFrame = true; + sOptionCardList[OPTION_VERSUS].tex.xScale = 1.0f; + sOptionCardList[OPTION_VERSUS].tex.yScale = 1.0f; + sOptionCardList[OPTION_VERSUS].tex.xPos = 145.0f; + sOptionCardList[OPTION_VERSUS].tex.yPos = 25.0f; + sOptionCardList[OPTION_VERSUS].drawTex = true; - D_menu_801B9124 = OPTION_VERSUS; + sMenuEntryState = OPTION_VERSUS; } else { - D_menu_801B9124 = OPTION_MAIN_MENU; + sMenuEntryState = OPTION_MAIN_MENU; } - D_menu_801B912C = 0; + sMainMenuState = 0; D_menu_801B9134 = 0; D_menu_801B913C = 0; @@ -524,8 +526,8 @@ void Option_Setup(void) { gCsCamAtY = 0.0f; gCsCamAtZ = 0.0f; - D_menu_801B9224 = -80.0f; - D_menu_801B9228 = 0.0f; + sArwingLightXrot = -80.0f; + sArwingLightYrot = 0.0f; sArwingLightColR = 225; sArwingLightColG = 225; @@ -536,16 +538,23 @@ void Option_Setup(void) { D_menu_801B91F8 = 0.1f; D_menu_801B91F4 = -130.0f; - D_menu_801B91FC = 0.0f; - D_menu_801B9200 = 0.0f; + sRightArwingCursorYrot = 0.0f; + sLeftArwingCursorYrot = 0.0f; - D_menu_801B91EC = 0; - D_menu_801B9244 = 0; - D_menu_801B9248 = 0; + sOkConfirmTimer = 0; + sMainMenuFromCancel = false; + sVsSubMenuFromCancel = false; AUDIO_PLAY_BGM(NA_BGM_SELECT); } void Option_Main(void) { +#if 0 // Docs debug + { + RCP_SetupDL(&gMasterDisp, SETUPDL_83); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); + Graphics_DisplaySmallNumber(80, 220, sVsSubMenuFromCancel); + } +#endif if (D_menu_801B9178 > 0) { D_menu_801B9178--; } @@ -568,117 +577,117 @@ void Option_Main(void) { case OPTION_UPDATE: gDrawMode = DRAW_OPTION; - Option_UpdateEntry(); + Option_Entry_Update(); break; } gGameFrameCount++; } -void Option_UpdateEntry(void) { - switch (D_menu_801B9124) { +void Option_Entry_Update(void) { + switch (sMenuEntryState) { case OPTION_MAIN_MENU: - Option_MainMenuUpdate(); + Option_MainMenu_Update(); break; case OPTION_MAP: - Option_MapUpdate(); + Option_Map_Update(); break; case OPTION_TRAINING: - Option_TrainingUpdate(); + Option_Training_Update(); break; case OPTION_VERSUS: - Option_VersusUpdate(); + Option_Versus_Update(); break; case OPTION_RANKING: - Option_RankingUpdate(); + Option_Ranking_Update(); break; case OPTION_SOUND: - Option_SoundUpdate(); + Option_Sound_Update(); break; case OPTION_DATA: - Option_DataUpdate(); + Option_Data_Update(); break; case OPTION_EXPERT_SOUND: - Option_ExpertSoundUpdate(); + Option_ExpertSound_Update(); break; case OPTION_VERSUS_STAGE: - Option_VersusStageUpdate(); + Option_VersusStage_Update(); break; case OPTION_POINT_MATCH: case OPTION_BR_MATCH: case OPTION_TT_MATCH: - Option_VersusMenuUpdate(); + Option_VersusMenu_Update(); break; - case OPTION_NAME: - Option_8019CAE0(); + case OPTION_NAME_ENTRY: + Option_NameEntry_Update(); break; case OPTION_SCORE: - Option_8019DD44(); + Option_Score_Update(); break; case OPTION_INVOICE: - Option_InvoiceUpdate(); + Option_Invoice_Update(); break; } - if (D_menu_801B91BC != 0) { - D_menu_801B91FC += 3.8f; - D_menu_801B9200 += 4.2f; + if (sDrawCursor) { + sRightArwingCursorYrot += 3.8f; + sLeftArwingCursorYrot += 4.2f; } } -void Option_DrawEntry(void) { - switch (D_menu_801B9124) { +void Option_Entry_Draw(void) { + switch (sMenuEntryState) { case OPTION_MAIN_MENU: - Option_MainMenuDraw(); + Option_MainMenu_Draw(); break; case OPTION_VERSUS: - Option_VersusDraw(); + Option_Versus_Draw(); break; case OPTION_RANKING: - Option_RankingDraw(); + Option_Ranking_Draw(); break; case OPTION_SOUND: - Option_SoundDraw(); + Option_Sound_Draw(); break; case OPTION_EXPERT_SOUND: - Option_ExpertSoundDraw(); + Option_ExpertSound_Draw(); break; case OPTION_DATA: - Option_DataDraw(); + Option_Data_Draw(); break; case OPTION_VERSUS_STAGE: - Option_VersusStageDraw(); + Option_VersusStage_Draw(); break; case OPTION_POINT_MATCH: case OPTION_BR_MATCH: case OPTION_TT_MATCH: - Option_VersusMenuDraw(); + Option_VersusMenu_Draw(); break; - case OPTION_NAME: - Option_8019D118(); + case OPTION_NAME_ENTRY: + Option_NameEntry_Draw(); break; case OPTION_SCORE: - Option_8019DF64(); + Option_Score_Draw(); break; case OPTION_INVOICE: @@ -686,18 +695,18 @@ void Option_DrawEntry(void) { break; } - if (D_menu_801B8280 != 0) { - Option_8019BDF0(); - Wipe_Draw(WIPE_VERTICAL, D_menu_801B8284); + if (sLevelStartState) { + Option_Menu_Push(); + Wipe_Draw(WIPE_VERTICAL, sWipeHeight); Matrix_Pop(&gGfxMatrix); } } -void Option_InitEntry(void) { +void Option_Entry_Setup(void) { gBlurAlpha = 255; - D_menu_801B912C = 0; + sMainMenuState = 0; - switch (D_menu_801B9124) { + switch (sMenuEntryState) { case OPTION_MAP: gDrawMode = DRAW_NONE; break; @@ -705,32 +714,33 @@ void Option_InitEntry(void) { case OPTION_POINT_MATCH: case OPTION_BR_MATCH: case OPTION_TT_MATCH: - Option_VersusMenuInit(); + Option_VersusMenu_Setup(); break; case OPTION_VERSUS_STAGE: - Option_VersusStageInit(); + Option_VersusStage_Setup(); break; case OPTION_RANKING: - Option_RankingInit(); + Option_Ranking_Setup(); break; case OPTION_SOUND: - Option_SoundInit(); + Option_Sound_Setup(); break; case OPTION_EXPERT_SOUND: - Option_ExpertSoundInit(); + Option_ExpertSound_Setup(); break; case OPTION_DATA: - Option_DataInit(); + Option_Data_Setup(); break; } } -void Option_80192598(void) { +// Initialize the Planet textures before any drawing occurs +void Option_PlanetTextures_Setup(void) { s32 i; D_menu_801B93E8 = 0; @@ -738,37 +748,40 @@ void Option_80192598(void) { for (i = 0; i < (96 * 96); i++) { // Planet Textures - D_menu_801BB810[i] = 106; - D_menu_801BDC10[i] = 84; - D_menu_801C0010[i] = 75; - D_menu_801C2410[i] = 81; - D_menu_801C4810[i] = 55; - D_menu_801C6C10[i] = 82; - D_menu_801C9010[i] = 68; - D_menu_801CB410[i] = 52; - D_menu_801B9410[i] = 0; + gMapCorneriaTex[i] = 106; + gMapFortunaTex[i] = 84; + gMapAquasTex[i] = 75; + gMapVenomTex[i] = 81; + gMapTitaniaTex[i] = 55; + gMapKatinaTex[i] = 82; + gMapMacbethTex[i] = 68; + gMapZonessTex[i] = 52; + gMapVenomCloudTex[i] = 0; } - for (i = 0; i < 9; i++) { + for (i = 0; i < ARRAY_COUNT(gBSSMapPlanetTextures); i++) { D_menu_801CD818[i] = 0.0f; - Map_801A07E8(D_menu_801B68B0[i], SEGMENTED_TO_VIRTUAL(D_menu_801B68D4[i]), &D_menu_801CD818[i]); + Map_Texture_Sphere(gBSSMapPlanetTextures[i], SEGMENTED_TO_VIRTUAL(gAssetMapPlanetTextures[i]), + &D_menu_801CD818[i]); } } -void Option_80192738(void) { +void Option_ScrollPlanetTexture(void) { if (D_menu_801B93E8 == 5) { - Map_801A07E8(D_menu_801B68B0[8], SEGMENTED_TO_VIRTUAL(D_menu_801B68D4[8]), &D_menu_801CD818[8]); + Map_Texture_Sphere(gBSSMapPlanetTextures[8], SEGMENTED_TO_VIRTUAL(gAssetMapPlanetTextures[8]), + &D_menu_801CD818[8]); D_menu_801B93E8 = 0; } else { D_menu_801B93E8++; } - Map_801A07E8(D_menu_801B68B0[D_menu_801B93EC * 2], SEGMENTED_TO_VIRTUAL(D_menu_801B68D4[D_menu_801B93EC * 2]), - &D_menu_801CD818[D_menu_801B93EC * 2]); + Map_Texture_Sphere(gBSSMapPlanetTextures[D_menu_801B93EC * 2], + SEGMENTED_TO_VIRTUAL(gAssetMapPlanetTextures[D_menu_801B93EC * 2]), + &D_menu_801CD818[D_menu_801B93EC * 2]); - Map_801A07E8(D_menu_801B68B0[(D_menu_801B93EC * 2) + 1], - SEGMENTED_TO_VIRTUAL(D_menu_801B68D4[(D_menu_801B93EC * 2) + 1]), - &D_menu_801CD818[(D_menu_801B93EC * 2) + 1]); + Map_Texture_Sphere(gBSSMapPlanetTextures[(D_menu_801B93EC * 2) + 1], + SEGMENTED_TO_VIRTUAL(gAssetMapPlanetTextures[(D_menu_801B93EC * 2) + 1]), + &D_menu_801CD818[(D_menu_801B93EC * 2) + 1]); D_menu_801B93EC++; if (D_menu_801B93EC >= 4) { @@ -776,10 +789,10 @@ void Option_80192738(void) { } } -void Option_MapUpdate(void) { +void Option_Map_Update(void) { if (gFillScreenAlpha == 255) { gStarCount = 0; - D_menu_801B9124 = 100; + sMenuEntryState = 100; gGameState = GSTATE_MAP; gNextGameStateTimer = 2; gMapState = 0; @@ -793,7 +806,7 @@ void Option_MapUpdate(void) { } } -void Option_TrainingUpdate(void) { +void Option_Training_Update(void) { if (gFillScreenAlpha == 255) { gCurrentLevel = LEVEL_TRAINING; gGameState = GSTATE_PLAY; @@ -814,42 +827,42 @@ void Option_TrainingUpdate(void) { } } -void Option_801929F0(void) { +void Option_MainMenu_Setup(void) { s32 i; D_game_800D2870 = false; gBlurAlpha = 255; gControllerLock = 0; gStarCount = 800; - D_menu_801B9248 = 0; + sVsSubMenuFromCancel = false; - if (D_menu_801B9244 == 0) { - D_menu_801B91BC = 1; - for (i = 0; i < OPTION_COUNT; i++) { - sOptionCardList[i].unk_00.xPos = sOptionCardCurTextPosX[i]; - sOptionCardList[i].unk_00.yPos = sOptionCardCurTextPosY[i]; - sOptionCardList[i].unk_00.xScale = 1.0f; - sOptionCardList[i].unk_00.yScale = 1.0f; - sOptionCardList[i].unk_58 = true; + if (!sMainMenuFromCancel) { + sDrawCursor = true; + for (i = 0; i < ARRAY_COUNT(sOptionCardList); i++) { + sOptionCardList[i].tex.xPos = sOptionCardCurTextPosX[i]; + sOptionCardList[i].tex.yPos = sOptionCardCurTextPosY[i]; + sOptionCardList[i].tex.xScale = 1.0f; + sOptionCardList[i].tex.yScale = 1.0f; + sOptionCardList[i].drawTex = true; - sOptionCardList[i].unk_38.xScale = 0.4f; - sOptionCardList[i].unk_38.yScale = 0.21f; - sOptionCardList[i].unk_38.y = sOptionCardPosY[i]; - sOptionCardList[i].unk_38.z = 0.0f; - sOptionCardList[i].unk_5C = true; + sOptionCardList[i].frame.xScale = 0.4f; + sOptionCardList[i].frame.yScale = 0.21f; + sOptionCardList[i].frame.y = sOptionCardPosY[i]; + sOptionCardList[i].frame.z = 0.0f; + sOptionCardList[i].drawFrame = true; } } else { - D_menu_801B91BC = 0; - for (i = 0; i < OPTION_COUNT; i++) { - sOptionCardList[i].unk_00.yScale = 1.0f; - sOptionCardList[i].unk_38.yScale = 0.21f; - sOptionCardList[i].unk_38.z = 0.0f; - sOptionCardList[i].unk_5C = true; - sOptionCardList[i].unk_58 = true; + sDrawCursor = false; + for (i = 0; i < ARRAY_COUNT(sOptionCardList); i++) { + sOptionCardList[i].tex.yScale = 1.0f; + sOptionCardList[i].frame.yScale = 0.21f; + sOptionCardList[i].frame.z = 0.0f; + sOptionCardList[i].drawFrame = true; + sOptionCardList[i].drawTex = true; } } - D_menu_801B9204 = -45.0f; + sLightningXpos = -45.0f; D_menu_801B9214 = 0; D_menu_801B9180.unk_0 = 0; @@ -860,152 +873,152 @@ void Option_801929F0(void) { D_menu_801B9198.unk_4 = 0; } -void Option_MainMenuUpdate(void) { +void Option_MainMenu_Update(void) { s32 i; f32 var_fs0; f32 var_fs1; - switch (D_menu_801B912C) { + switch (sMainMenuState) { case 0: - Option_801929F0(); - if (D_menu_801B9244 == 0) { - D_menu_801B912C++; + Option_MainMenu_Setup(); + if (!sMainMenuFromCancel) { + sMainMenuState++; } else { - sOptionCardCurTextPosX[0] = D_menu_801AE5E8[D_menu_801B91B0]; - sOptionCardCurTextPosY[0] = D_menu_801AE5F0[D_menu_801B91B0]; - sOptionCardCurTextPosX[4] = D_menu_801AE5F8[D_menu_801B91AC]; - sOptionCardCurTextPosY[4] = D_menu_801AE600[D_menu_801B91AC]; - D_menu_801B912C = 1000; + sOptionCardCurTextPosX[0] = D_menu_801AE5E8[sExpertModeCursor]; + sOptionCardCurTextPosY[0] = D_menu_801AE5F0[sExpertModeCursor]; + sOptionCardCurTextPosX[4] = D_menu_801AE5F8[sExpertSoundCursor]; + sOptionCardCurTextPosY[4] = D_menu_801AE600[sExpertSoundCursor]; + sMainMenuState = 1000; } break; case 1000: - for (i = 0; i < OPTION_COUNT; i++) { - if (sOptionCardList[i].unk_38.xScale < 0.4f) { - sOptionCardList[i].unk_38.xScale += 0.04f; - if (sOptionCardList[i].unk_38.xScale > 0.4f) { - sOptionCardList[i].unk_38.xScale = 0.4f; + for (i = 0; i < ARRAY_COUNT(sOptionCardList); i++) { + if (sOptionCardList[i].frame.xScale < 0.4f) { + sOptionCardList[i].frame.xScale += 0.04f; + if (sOptionCardList[i].frame.xScale > 0.4f) { + sOptionCardList[i].frame.xScale = 0.4f; } } - if (sOptionCardList[i].unk_00.xScale < 1.0f) { - sOptionCardList[i].unk_00.xScale += 0.1f; - if (sOptionCardList[i].unk_00.xScale > 1.0f) { - sOptionCardList[i].unk_00.xScale = 1.0f; + if (sOptionCardList[i].tex.xScale < 1.0f) { + sOptionCardList[i].tex.xScale += 0.1f; + if (sOptionCardList[i].tex.xScale > 1.0f) { + sOptionCardList[i].tex.xScale = 1.0f; } } - Math_SmoothStepToF(&sOptionCardList[i].unk_00.yPos, sOptionCardCurTextPosY[i], 0.15f, 100.0f, 0.1f); - Math_SmoothStepToF(&sOptionCardList[i].unk_38.y, sOptionCardPosY[i], 0.15f, 100.0f, 0.1f); - Math_SmoothStepToF(&sOptionCardList[i].unk_00.xPos, sOptionCardCurTextPosX[i], 0.2f, D_menu_801AE620[i], + Math_SmoothStepToF(&sOptionCardList[i].tex.yPos, sOptionCardCurTextPosY[i], 0.15f, 100.0f, 0.1f); + Math_SmoothStepToF(&sOptionCardList[i].frame.y, sOptionCardPosY[i], 0.15f, 100.0f, 0.1f); + Math_SmoothStepToF(&sOptionCardList[i].tex.xPos, sOptionCardCurTextPosX[i], 0.2f, D_menu_801AE620[i], 0.1f); } gBlurAlpha += 4; - if (sOptionCardList[D_menu_801B91A4].unk_38.y == sOptionCardPosY[D_menu_801B91A4]) { - for (i = 0; i < OPTION_COUNT; i++) { - sOptionCardList[i].unk_00.xScale = 1.0f; - sOptionCardList[i].unk_00.xPos = sOptionCardCurTextPosX[i]; - sOptionCardList[i].unk_00.yPos = sOptionCardCurTextPosY[i]; + if (sOptionCardList[sMainMenuCursor].frame.y == sOptionCardPosY[sMainMenuCursor]) { + for (i = 0; i < ARRAY_COUNT(sOptionCardList); i++) { + sOptionCardList[i].tex.xScale = 1.0f; + sOptionCardList[i].tex.xPos = sOptionCardCurTextPosX[i]; + sOptionCardList[i].tex.yPos = sOptionCardCurTextPosY[i]; } - D_menu_801B91BC = 1; + sDrawCursor = true; gBlurAlpha = 255; - D_menu_801B912C = 1; + sMainMenuState = 1; } break; case 1: // clang-format off - if (Option_8019C418(&D_menu_801B91A4, OPTION_COUNT - 1, 1, 0, 20, 5, 4, gMainController, &D_menu_801B9180)) {\ - AUDIO_PLAY_SFX(NA_SE_ARWING_CURSOR, gDefaultSfxSource, 4);\ + if (Option_Input_MoveCursor_Y(&sMainMenuCursor, ARRAY_COUNT(sOptionCardList) - 1, 1, 0, 20, 5, 4, gMainController, &D_menu_801B9180)) { \ + AUDIO_PLAY_SFX(NA_SE_ARWING_CURSOR, gDefaultSfxSource, 4); } // clang-format on - if ((D_menu_801B91A4 == 0) && D_menu_801B91C8 && - Option_8019C418(&D_menu_801B91B0, 1, 0, 0, 20, 5, 4, gMainController, &D_menu_801B9190)) { + if ((sMainMenuCursor == OPTION_MAP) && sExpertModesEnabled && + Option_Input_MoveCursor_Y(&sExpertModeCursor, 1, 0, 0, 20, 5, 4, gMainController, &D_menu_801B9190)) { AUDIO_PLAY_SFX(NA_SE_ARWING_CURSOR, gDefaultSfxSource, 4); - if (D_menu_801B91B0) { - sOptionCardList[0].unk_00.texture = D_OPT_8004C50; - sOptionCardList[0].unk_00.width = 80; - sOptionCardList[0].unk_00.height = 12; - sOptionCardList[0].unk_00.xPos = 125.0f; - sOptionCardList[0].unk_00.yPos = 55.0f; + if (sExpertModeCursor) { + sOptionCardList[OPTION_MAP].tex.texture = aExpertCardTex; + sOptionCardList[OPTION_MAP].tex.width = 80; + sOptionCardList[OPTION_MAP].tex.height = 12; + sOptionCardList[OPTION_MAP].tex.xPos = 125.0f; + sOptionCardList[OPTION_MAP].tex.yPos = 55.0f; } else { - sOptionCardList[0].unk_00.texture = D_OPT_8003B50; - sOptionCardList[0].unk_00.width = 72; - sOptionCardList[0].unk_00.height = 12; - sOptionCardList[0].unk_00.xPos = 124.0f; - sOptionCardList[0].unk_00.yPos = 54.0f; + sOptionCardList[OPTION_MAP].tex.texture = aMainGameCardTex; + sOptionCardList[OPTION_MAP].tex.width = 72; + sOptionCardList[OPTION_MAP].tex.height = 12; + sOptionCardList[OPTION_MAP].tex.xPos = 124.0f; + sOptionCardList[OPTION_MAP].tex.yPos = 54.0f; } - gExpertMode = D_menu_801B91B0; + gExpertMode = sExpertModeCursor; } - if ((D_menu_801B91A4 == 4) && D_menu_801B91C8 && - Option_8019C418(&D_menu_801B91AC, 1, 0, 0, 20, 5, 4, gMainController, &D_menu_801B9198)) { + if ((sMainMenuCursor == OPTION_SOUND) && sExpertModesEnabled && + Option_Input_MoveCursor_Y(&sExpertSoundCursor, 1, 0, 0, 20, 5, 4, gMainController, &D_menu_801B9198)) { AUDIO_PLAY_SFX(NA_SE_ARWING_CURSOR, gDefaultSfxSource, 4); - if (D_menu_801B91AC) { - sOptionCardList[4].unk_00.texture = D_OPT_8004C50; - sOptionCardList[4].unk_00.width = 80; - sOptionCardList[4].unk_00.height = 12; - sOptionCardList[4].unk_00.xPos = 125.0f; - sOptionCardList[4].unk_00.yPos = 151.0f; + if (sExpertSoundCursor) { + sOptionCardList[OPTION_SOUND].tex.texture = aExpertCardTex; + sOptionCardList[OPTION_SOUND].tex.width = 80; + sOptionCardList[OPTION_SOUND].tex.height = 12; + sOptionCardList[OPTION_SOUND].tex.xPos = 125.0f; + sOptionCardList[OPTION_SOUND].tex.yPos = 151.0f; } else { - sOptionCardList[4].unk_00.texture = D_OPT_80046B0; - sOptionCardList[4].unk_00.width = 64; - sOptionCardList[4].unk_00.height = 10; - sOptionCardList[4].unk_00.xPos = 133.0f; - sOptionCardList[4].unk_00.yPos = 151.0f; + sOptionCardList[OPTION_SOUND].tex.texture = aSoundCardTex; + sOptionCardList[OPTION_SOUND].tex.width = 64; + sOptionCardList[OPTION_SOUND].tex.height = 10; + sOptionCardList[OPTION_SOUND].tex.xPos = 133.0f; + sOptionCardList[OPTION_SOUND].tex.yPos = 151.0f; } } if (gControllerPress[gMainController].button & (A_BUTTON | START_BUTTON)) { AUDIO_PLAY_SFX(NA_SE_ARWING_DECIDE, gDefaultSfxSource, 4); - D_menu_801B9208 = sOptionCardPosY[D_menu_801B91A4]; - D_menu_801B91BC = 0; - D_menu_801B912C = 11; + sLightningYpos = sOptionCardPosY[sMainMenuCursor]; + sDrawCursor = false; + sMainMenuState = 11; } if (gControllerPress[gMainController].button & B_BUTTON) { AUDIO_PLAY_SFX(NA_SE_ARWING_CANCEL, gDefaultSfxSource, 4); - D_menu_801B8284 = 0; - D_menu_801B8280 = 1; - D_menu_801B912C = 100; + sWipeHeight = 0; + sLevelStartState = true; + sMainMenuState = 100; } break; case 11: gBlurAlpha = 16; D_menu_801B9178 = 3; - sOptionCardList[D_menu_801B91A4].unk_38.xScale -= 0.01f; - sOptionCardList[D_menu_801B91A4].unk_38.yScale -= 0.01f; - sOptionCardList[D_menu_801B91A4].unk_00.xScale -= 0.1f; - sOptionCardList[D_menu_801B91A4].unk_00.yScale -= 0.1f; - sOptionCardList[D_menu_801B91A4].unk_00.xPos += 4.0f; + sOptionCardList[sMainMenuCursor].frame.xScale -= 0.01f; + sOptionCardList[sMainMenuCursor].frame.yScale -= 0.01f; + sOptionCardList[sMainMenuCursor].tex.xScale -= 0.1f; + sOptionCardList[sMainMenuCursor].tex.yScale -= 0.1f; + sOptionCardList[sMainMenuCursor].tex.xPos += 4.0f; D_menu_801B917C = 3; - D_menu_801B912C++; + sMainMenuState++; break; case 12: if (D_menu_801B9178 == 1) { - sOptionCardList[D_menu_801B91A4].unk_38.xScale += 0.01f; - sOptionCardList[D_menu_801B91A4].unk_38.yScale += 0.01f; - sOptionCardList[D_menu_801B91A4].unk_00.xScale += 0.1f; - sOptionCardList[D_menu_801B91A4].unk_00.yScale += 0.1f; - sOptionCardList[D_menu_801B91A4].unk_00.xPos -= 4.0f; + sOptionCardList[sMainMenuCursor].frame.xScale += 0.01f; + sOptionCardList[sMainMenuCursor].frame.yScale += 0.01f; + sOptionCardList[sMainMenuCursor].tex.xScale += 0.1f; + sOptionCardList[sMainMenuCursor].tex.yScale += 0.1f; + sOptionCardList[sMainMenuCursor].tex.xPos -= 4.0f; D_menu_801B9214 = 1; } - for (i = 0; i < OPTION_COUNT; i++) { - if (i == D_menu_801B91A4) { + for (i = 0; i < ARRAY_COUNT(sOptionCardList); i++) { + if (i == sMainMenuCursor) { continue; } - if (sOptionCardList[i].unk_38.xScale > 0.01f) { - sOptionCardList[i].unk_38.xScale -= 0.05f; - sOptionCardList[i].unk_00.xScale -= 0.19f; - Math_SmoothStepToF(&sOptionCardList[i].unk_00.xPos, 158.0f, 0.2f, D_menu_801AE608[i], 0.1f); + if (sOptionCardList[i].frame.xScale > 0.01f) { + sOptionCardList[i].frame.xScale -= 0.05f; + sOptionCardList[i].tex.xScale -= 0.19f; + Math_SmoothStepToF(&sOptionCardList[i].tex.xPos, 158.0f, 0.2f, D_menu_801AE608[i], 0.1f); } else { - sOptionCardList[i].unk_5C = false; - sOptionCardList[i].unk_58 = false; + sOptionCardList[i].drawFrame = false; + sOptionCardList[i].drawTex = false; } } @@ -1013,296 +1026,295 @@ void Option_MainMenuUpdate(void) { var_fs0 = 25.0f; var_fs1 = 90.0f; - if ((D_menu_801B91A4 == 0) || (D_menu_801B91A4 == 1)) { + if ((sMainMenuCursor == OPTION_MAP) || (sMainMenuCursor == OPTION_TRAINING)) { var_fs0 = 0.0f; var_fs1 = 120.0f; } - Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_00.yPos, var_fs0, 0.25f, 100.0f, 0.1f); - Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_38.y, var_fs1, 0.25f, 100.0f, 0.1f); + Math_SmoothStepToF(&sOptionCardList[sMainMenuCursor].tex.yPos, var_fs0, 0.25f, 100.0f, 0.1f); + Math_SmoothStepToF(&sOptionCardList[sMainMenuCursor].frame.y, var_fs1, 0.25f, 100.0f, 0.1f); gBlurAlpha += 4; - if ((sOptionCardList[D_menu_801B91A4].unk_00.yPos == var_fs0) && - (sOptionCardList[D_menu_801B91A4].unk_38.y == var_fs1)) { + if ((sOptionCardList[sMainMenuCursor].tex.yPos == var_fs0) && + (sOptionCardList[sMainMenuCursor].frame.y == var_fs1)) { gBlurAlpha += 255; - D_menu_801B9124 = D_menu_801B91A4; + sMenuEntryState = sMainMenuCursor; - if (D_menu_801B91A4 == 4 && D_menu_801B91AC) { - D_menu_801B9124 = 6; + if ((sMainMenuCursor == OPTION_SOUND) && sExpertSoundCursor) { + sMenuEntryState = OPTION_EXPERT_SOUND; } - - Option_InitEntry(); + Option_Entry_Setup(); } } break; case 100: - if (D_menu_801B8284 < 120) { - D_menu_801B8284 += 18; + if (sWipeHeight < 120) { + sWipeHeight += 18; } else { gStarCount = 0; gGameState = GSTATE_TITLE; gNextGameStateTimer = 2; gTitleState = 0; - D_menu_801B827C = 1; + gGoToTitle = true; gDrawMode = DRAW_NONE; - D_menu_801B8280 = 0; - D_menu_801B8284 = 0; + sLevelStartState = false; + sWipeHeight = 0; gControllerLock = 3; } break; } } -void Option_MainMenuDraw(void) { +void Option_MainMenu_Draw(void) { s32 i; - Option_8019BDF0(); + Option_Menu_Push(); - for (i = 0; i < OPTION_COUNT; i++) { - if (sOptionCardList[i].unk_5C) { - Option_DrawMenuCard(sOptionCardList[i].unk_38); + for (i = 0; i < ARRAY_COUNT(sOptionCardList); i++) { + if (sOptionCardList[i].drawFrame) { + Option_DrawMenuCard(sOptionCardList[i].frame); } } - Option_DrawMenuArwing(sOptionCardList[D_menu_801B91A4].unk_4C); + Option_DrawMenuArwing(sOptionCardList[sMainMenuCursor].pos); Matrix_Pop(&gGfxMatrix); - for (i = 0; i < OPTION_COUNT; i++) { - if (!(sOptionCardList[i].unk_58) || (sOptionCardList[i].unk_00.xScale) <= 0.0f) { + for (i = 0; i < ARRAY_COUNT(sOptionCardList); i++) { + if (!(sOptionCardList[i].drawTex) || (sOptionCardList[i].tex.xScale) <= 0.0f) { continue; } - if ((i == 0) && D_menu_801B91C8 && ((D_menu_801B912C == 0) || (D_menu_801B912C == 1))) { - Option_8019B6D8(106.0f, 56.0f, 98.0f, 20, 0, 75); + if ((i == 0) && sExpertModesEnabled && ((sMainMenuState == 0) || (sMainMenuState == 1))) { + Option_VsSelectionArrows_Draw(106.0f, 56.0f, 98.0f, 20, 0, 75); } - if ((i == 4) && D_menu_801B91C8 && ((D_menu_801B912C == 0) || (D_menu_801B912C == 1))) { - Option_8019B6D8(106.0f, 152.0f, 98.0f, 20, 0, 75); + if ((i == 4) && sExpertModesEnabled && ((sMainMenuState == 0) || (sMainMenuState == 1))) { + Option_VsSelectionArrows_Draw(106.0f, 152.0f, 98.0f, 20, 0, 75); } - Option_DrawCardLabel(sOptionCardList[i].unk_00); + Option_DrawCardLabel(sOptionCardList[i].tex); } - Option_8019BF34(); + Option_CardLightning_Update(); } -void Option_80193B04(void) { +void Option_Versus_Setup(void) { s32 i; gBlurAlpha = 255; gControllerLock = 0; gStarCount = 800; - if (D_menu_801B9248 == 0) { - D_menu_801B91BC = 1; + if (!sVsSubMenuFromCancel) { + sDrawCursor = true; - for (i = 0; i < 3; i++) { - sOptionVSCardList[i].unk_00.xPos = D_menu_801AEF90[i]; - sOptionVSCardList[i].unk_00.yPos = D_menu_801AEF9C[i]; - sOptionVSCardList[i].unk_00.xScale = 1.0f; - sOptionVSCardList[i].unk_00.yScale = 1.0f; - sOptionVSCardList[i].unk_58 = true; - sOptionVSCardList[i].unk_38.xScale = 0.4f; - sOptionVSCardList[i].unk_38.yScale = 0.21f; - sOptionVSCardList[i].unk_38.y = D_menu_801AEF84[i]; - sOptionVSCardList[i].unk_38.z = 0.0f; - sOptionVSCardList[i].unk_5C = true; + for (i = 0; i < ARRAY_COUNT(sOptionVSCardList); i++) { + sOptionVSCardList[i].tex.xPos = D_menu_801AEF90[i]; + sOptionVSCardList[i].tex.yPos = D_menu_801AEF9C[i]; + sOptionVSCardList[i].tex.xScale = 1.0f; + sOptionVSCardList[i].tex.yScale = 1.0f; + sOptionVSCardList[i].drawTex = true; + sOptionVSCardList[i].frame.xScale = 0.4f; + sOptionVSCardList[i].frame.yScale = 0.21f; + sOptionVSCardList[i].frame.y = D_menu_801AEF84[i]; + sOptionVSCardList[i].frame.z = 0.0f; + sOptionVSCardList[i].drawFrame = true; } } else { - D_menu_801B91BC = 0; + sDrawCursor = false; - for (i = 0; i < 3; i++) { - sOptionVSCardList[i].unk_00.yScale = 1.0f; - sOptionVSCardList[i].unk_38.yScale = 0.21f; - sOptionVSCardList[i].unk_38.z = 0.0f; - sOptionVSCardList[i].unk_58 = true; - sOptionVSCardList[i].unk_5C = true; + for (i = 0; i < ARRAY_COUNT(sOptionVSCardList); i++) { + sOptionVSCardList[i].tex.yScale = 1.0f; + sOptionVSCardList[i].frame.yScale = 0.21f; + sOptionVSCardList[i].frame.z = 0.0f; + sOptionVSCardList[i].drawTex = true; + sOptionVSCardList[i].drawFrame = true; } } - D_menu_801B9204 = -45.0f; + sLightningXpos = -45.0f; D_menu_801B9214 = 0; D_menu_801B9188.unk_0 = 0; D_menu_801B9188.unk_4 = 0; } -void Option_VersusUpdate(void) { +void Option_Versus_Update(void) { f32 var_fs0; s32 i; - switch (D_menu_801B912C) { + switch (sMainMenuState) { case 0: - Option_80193B04(); - if (D_menu_801B9248 == 0) { - D_menu_801B912C++; + Option_Versus_Setup(); + if (!sVsSubMenuFromCancel) { + sMainMenuState++; } else { - D_menu_801B912C = 1000; + sMainMenuState = 1000; } break; case 1000: - for (i = 0; i < 3; i++) { - if (sOptionVSCardList[i].unk_38.xScale < 0.4f) { - sOptionVSCardList[i].unk_38.xScale += 0.04f; - if (sOptionVSCardList[i].unk_38.xScale > 0.4f) { - sOptionVSCardList[i].unk_38.xScale = 0.4f; + for (i = 0; i < ARRAY_COUNT(sOptionVSCardList); i++) { + if (sOptionVSCardList[i].frame.xScale < 0.4f) { + sOptionVSCardList[i].frame.xScale += 0.04f; + if (sOptionVSCardList[i].frame.xScale > 0.4f) { + sOptionVSCardList[i].frame.xScale = 0.4f; } } - if (sOptionVSCardList[i].unk_00.xScale < 1.0f) { - sOptionVSCardList[i].unk_00.xScale += 0.15f; - if (sOptionVSCardList[i].unk_00.xScale > 1.0f) { - sOptionVSCardList[i].unk_00.xScale = 1.0f; + if (sOptionVSCardList[i].tex.xScale < 1.0f) { + sOptionVSCardList[i].tex.xScale += 0.15f; + if (sOptionVSCardList[i].tex.xScale > 1.0f) { + sOptionVSCardList[i].tex.xScale = 1.0f; } } - Math_SmoothStepToF(&sOptionVSCardList[i].unk_38.y, D_menu_801AEF84[i], 0.15f, 100.0f, 0.1f); - Math_SmoothStepToF(&sOptionVSCardList[i].unk_00.xPos, D_menu_801AEF90[i], 0.2f, 3.1f, 0.1f); - Math_SmoothStepToF(&sOptionVSCardList[i].unk_00.yPos, D_menu_801AEF9C[i], 0.15f, 100.0f, 0.1f); + Math_SmoothStepToF(&sOptionVSCardList[i].frame.y, D_menu_801AEF84[i], 0.15f, 100.0f, 0.1f); + Math_SmoothStepToF(&sOptionVSCardList[i].tex.xPos, D_menu_801AEF90[i], 0.2f, 3.1f, 0.1f); + Math_SmoothStepToF(&sOptionVSCardList[i].tex.yPos, D_menu_801AEF9C[i], 0.15f, 100.0f, 0.1f); } - Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_00.yPos, 25.0f, 0.25f, 100.0f, 0.1f); - Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_38.y, 90.0f, 0.25f, 100.0f, 0.1f); + Math_SmoothStepToF(&sOptionCardList[sMainMenuCursor].tex.yPos, 25.0f, 0.25f, 100.0f, 0.1f); + Math_SmoothStepToF(&sOptionCardList[sMainMenuCursor].frame.y, 90.0f, 0.25f, 100.0f, 0.1f); gBlurAlpha += 4; - if (sOptionVSCardList[D_menu_801B91A8].unk_38.y == D_menu_801AEF84[D_menu_801B91A8]) { - for (i = 0; i < 3; i++) { - sOptionVSCardList[i].unk_00.xScale = 1.0f; - sOptionVSCardList[i].unk_00.yPos = D_menu_801AEF9C[i]; - sOptionVSCardList[i].unk_00.xPos = D_menu_801AEF90[i]; + if (sOptionVSCardList[sVsMenuCursor].frame.y == D_menu_801AEF84[sVsMenuCursor]) { + for (i = 0; i < ARRAY_COUNT(sOptionVSCardList); i++) { + sOptionVSCardList[i].tex.xScale = 1.0f; + sOptionVSCardList[i].tex.yPos = D_menu_801AEF9C[i]; + sOptionVSCardList[i].tex.xPos = D_menu_801AEF90[i]; } - sOptionCardList[D_menu_801B91A4].unk_00.yPos = 25.0f; - sOptionCardList[D_menu_801B91A4].unk_38.y = 90.0f; - D_menu_801B91BC = 1; + sOptionCardList[sMainMenuCursor].tex.yPos = 25.0f; + sOptionCardList[sMainMenuCursor].frame.y = 90.0f; + sDrawCursor = true; gBlurAlpha = 255; - D_menu_801B912C = 1; + sMainMenuState = 1; } break; case 1: // clang-format off - if (Option_8019C418(&D_menu_801B91A8, 2, 1, 0, 20, 5, 4, gMainController, &D_menu_801B9188)) {\ + if (Option_Input_MoveCursor_Y(&sVsMenuCursor, 2, 1, 0, 20, 5, 4, gMainController, &D_menu_801B9188)) {\ AUDIO_PLAY_SFX(NA_SE_ARWING_CURSOR, gDefaultSfxSource, 4);\ } // clang-format on if (gControllerPress[gMainController].button & (A_BUTTON | START_BUTTON)) { AUDIO_PLAY_SFX(NA_SE_ARWING_DECIDE, gDefaultSfxSource, 4); - D_menu_801B9208 = D_menu_801AEF84[D_menu_801B91A8]; - D_menu_801B91BC = 0; - D_menu_801B912C = 11; + sLightningYpos = D_menu_801AEF84[sVsMenuCursor]; + sDrawCursor = false; + sMainMenuState = 11; } if (gControllerPress[gMainController].button & B_BUTTON) { AUDIO_PLAY_SFX(NA_SE_ARWING_CANCEL, gDefaultSfxSource, 4); - D_menu_801B912C = 0; - D_menu_801B9124 = 1000; + sMainMenuState = 0; + sMenuEntryState = OPTION_MAIN_MENU; gDrawMode = DRAW_NONE; - D_menu_801B9244 = 1; + sMainMenuFromCancel = true; } break; case 11: gBlurAlpha = 16; D_menu_801B9178 = 5; - sOptionVSCardList[D_menu_801B91A8].unk_38.xScale -= 0.01f; - sOptionVSCardList[D_menu_801B91A8].unk_38.yScale -= 0.01f; - sOptionVSCardList[D_menu_801B91A8].unk_00.xScale -= 0.1f; - sOptionVSCardList[D_menu_801B91A8].unk_00.yScale -= 0.1f; - sOptionVSCardList[D_menu_801B91A8].unk_00.xPos += 4.0f; + sOptionVSCardList[sVsMenuCursor].frame.xScale -= 0.01f; + sOptionVSCardList[sVsMenuCursor].frame.yScale -= 0.01f; + sOptionVSCardList[sVsMenuCursor].tex.xScale -= 0.1f; + sOptionVSCardList[sVsMenuCursor].tex.yScale -= 0.1f; + sOptionVSCardList[sVsMenuCursor].tex.xPos += 4.0f; D_menu_801B917C = 5; - D_menu_801B912C++; + sMainMenuState++; break; case 12: if (D_menu_801B9178 == 1) { - sOptionVSCardList[D_menu_801B91A8].unk_38.xScale += 0.01f; - sOptionVSCardList[D_menu_801B91A8].unk_38.yScale += 0.01f; - sOptionVSCardList[D_menu_801B91A8].unk_00.xScale += 0.1f; - sOptionVSCardList[D_menu_801B91A8].unk_00.yScale += 0.1f; - sOptionVSCardList[D_menu_801B91A8].unk_00.xPos -= 4.0f; + sOptionVSCardList[sVsMenuCursor].frame.xScale += 0.01f; + sOptionVSCardList[sVsMenuCursor].frame.yScale += 0.01f; + sOptionVSCardList[sVsMenuCursor].tex.xScale += 0.1f; + sOptionVSCardList[sVsMenuCursor].tex.yScale += 0.1f; + sOptionVSCardList[sVsMenuCursor].tex.xPos -= 4.0f; D_menu_801B9214 = 1; } - for (i = 0; i < 3; i++) { - if (i == D_menu_801B91A8) { + for (i = 0; i < ARRAY_COUNT(sOptionVSCardList); i++) { + if (i == sVsMenuCursor) { continue; } - if (sOptionVSCardList[i].unk_38.xScale > 0.01f) { - sOptionVSCardList[i].unk_38.xScale -= 0.05f; - sOptionVSCardList[i].unk_00.xScale -= 0.19f; - Math_SmoothStepToF(&sOptionVSCardList[i].unk_00.xPos, 158.0f, 0.2f, D_menu_801AE608[i + 1], 0.1f); + if (sOptionVSCardList[i].frame.xScale > 0.01f) { + sOptionVSCardList[i].frame.xScale -= 0.05f; + sOptionVSCardList[i].tex.xScale -= 0.19f; + Math_SmoothStepToF(&sOptionVSCardList[i].tex.xPos, 158.0f, 0.2f, D_menu_801AE608[i + 1], 0.1f); } else { - sOptionVSCardList[i].unk_5C = false; - sOptionVSCardList[i].unk_58 = false; + sOptionVSCardList[i].drawFrame = false; + sOptionVSCardList[i].drawTex = false; } } if (D_menu_801B917C == 0) { - if (D_menu_801B91A8 == 0) { + if (sVsMenuCursor == 0) { var_fs0 = 129.0f; } else { var_fs0 = 131.0f; } - Math_SmoothStepToF(&sOptionVSCardList[D_menu_801B91A8].unk_00.yPos, var_fs0, 0.25f, 100.0f, 0.1f); - Math_SmoothStepToF(&sOptionVSCardList[D_menu_801B91A8].unk_38.y, -15.5f, 0.25f, 100.0f, 0.1f); - Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_00.yPos, -10.0f, 0.35f, 100.0f, 0.1f); - Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_38.y, 150.0f, 0.35f, 100.0f, 0.1f); + Math_SmoothStepToF(&sOptionVSCardList[sVsMenuCursor].tex.yPos, var_fs0, 0.25f, 100.0f, 0.1f); + Math_SmoothStepToF(&sOptionVSCardList[sVsMenuCursor].frame.y, -15.5f, 0.25f, 100.0f, 0.1f); + Math_SmoothStepToF(&sOptionCardList[sMainMenuCursor].tex.yPos, -10.0f, 0.35f, 100.0f, 0.1f); + Math_SmoothStepToF(&sOptionCardList[sMainMenuCursor].frame.y, 150.0f, 0.35f, 100.0f, 0.1f); gBlurAlpha += 4; - if ((var_fs0 == sOptionVSCardList[D_menu_801B91A8].unk_00.yPos) && - (sOptionVSCardList[D_menu_801B91A8].unk_38.y == -15.5f)) { + if ((var_fs0 == sOptionVSCardList[sVsMenuCursor].tex.yPos) && + (sOptionVSCardList[sVsMenuCursor].frame.y == -15.5f)) { gBlurAlpha += 255; - D_menu_801B9124 = (D_menu_801B91A8 + 1) * 10; - gVsMatchType = D_menu_801B91A8; + sMenuEntryState = (sVsMenuCursor + 1) * 10; + gVsMatchType = sVsMenuCursor; D_menu_801B91C4 = 1; - Option_InitEntry(); + Option_Entry_Setup(); } } break; } } -void Option_VersusDraw(void) { +void Option_Versus_Draw(void) { s32 i; Option_DrawMenuLabel(); - Option_8019BDF0(); + Option_Menu_Push(); - for (i = 0; i < 3; i++) { - if (sOptionVSCardList[i].unk_5C) { - Option_DrawMenuCard(sOptionVSCardList[i].unk_38); + for (i = 0; i < ARRAY_COUNT(sOptionVSCardList); i++) { + if (sOptionVSCardList[i].drawFrame) { + Option_DrawMenuCard(sOptionVSCardList[i].frame); } } - Option_DrawMenuArwing(sOptionVSCardList[D_menu_801B91A8].unk_4C); + Option_DrawMenuArwing(sOptionVSCardList[sVsMenuCursor].pos); Matrix_Pop(&gGfxMatrix); - for (i = 0; i < 3; i++) { - if ((sOptionVSCardList[i].unk_58) && !(sOptionVSCardList[i].unk_00.xScale <= 0.0f)) { - Option_DrawCardLabel(sOptionVSCardList[i].unk_00); + for (i = 0; i < ARRAY_COUNT(sOptionVSCardList); i++) { + if ((sOptionVSCardList[i].drawTex) && !(sOptionVSCardList[i].tex.xScale <= 0.0f)) { + Option_DrawCardLabel(sOptionVSCardList[i].tex); } } - Option_8019BF34(); + Option_CardLightning_Update(); } -void Option_SoundInit(void) { +void Option_Sound_Setup(void) { s32 i; gStarCount = 800; D_menu_801B91B4 = 0; D_menu_801B91B8 = 0; - D_menu_801B91BC = 1; + sDrawCursor = true; D_menu_801B91A0 = 0; gOptionSoundMode = gSaveFile.save.data.soundMode; - SEQCMD_SET_SOUND_MODE(D_menu_801AE998[gOptionSoundMode]); + SEQCMD_SET_SOUND_MODE(sSoundMode[gOptionSoundMode]); gVolumeSettings[AUDIO_TYPE_MUSIC] = gSaveFile.save.data.musicVolume; gVolumeSettings[AUDIO_TYPE_VOICE] = gSaveFile.save.data.voiceVolume; @@ -1334,7 +1346,7 @@ void Option_SoundInit(void) { D_menu_801B917C = 0; // clang-format off - for (i = 0; i < 5; i++) { D_menu_801B9270[i] = 255.0f; } + for (i = 0; i < ARRAY_COUNT(D_menu_801B9270); i++) { D_menu_801B9270[i] = 255.0f; } // clang-format on D_menu_801B91E4 = 255.0f; @@ -1355,18 +1367,18 @@ void Option_SoundInit(void) { D_menu_801B9268.unk_4 = 0; } -void Option_SoundUpdate(void) { +void Option_Sound_Update(void) { s32 sp34 = D_menu_801B9288; - if (Option_8019C418(&D_menu_801B9288, 3, 1, 0, 20, 5, 4, gMainController, &D_menu_801B9250)) { + if (Option_Input_MoveCursor_Y(&D_menu_801B9288, 3, 1, 0, 20, 5, 4, gMainController, &D_menu_801B9250)) { D_menu_801B9270[sp34] = 255.0f; AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); } if (D_menu_801B9288 == 0) { - Option_80194AEC(); + Option_Sound_SetSoundMode(); } else { - Option_80194BD0(); + Option_Sound_SetVolumeLevels(); } // Test sound @@ -1388,33 +1400,33 @@ void Option_SoundUpdate(void) { } Save_Write(); gDrawMode = DRAW_NONE; - D_menu_801B9124 = 1000; - D_menu_801B912C = 0; - D_menu_801B9244 = 1; + sMenuEntryState = OPTION_MAIN_MENU; + sMainMenuState = 0; + sMainMenuFromCancel = true; } } -void Option_80194AEC(void) { +void Option_Sound_SetSoundMode(void) { s32 sp3C = gOptionSoundMode; s32 pad; - if (Option_8019C418(&sp3C, 2, 0, 0, 20, 5, 4, gMainController, &D_menu_801B9260)) { + if (Option_Input_MoveCursor_Y(&sp3C, 2, 0, 0, 20, 5, 4, gMainController, &D_menu_801B9260)) { AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); gOptionSoundMode = sp3C; if (gOptionSoundMode >= OPTIONSOUND_MAX) { gOptionSoundMode = OPTIONSOUND_STEREO; } gSaveFile.save.data.soundMode = gOptionSoundMode; - SEQCMD_SET_SOUND_MODE(D_menu_801AE998[gOptionSoundMode]); + SEQCMD_SET_SOUND_MODE(sSoundMode[gOptionSoundMode]); } } -void Option_80194BD0(void) { +void Option_Sound_SetVolumeLevels(void) { s32 var_v1; D_menu_801B924C = D_menu_801AE99C[D_menu_801B9288 - 1]; - if (Option_8019C66C(&(D_menu_801AEB48[D_menu_801B9288 - 1].xPos), 146.0f, 245.0f, &D_menu_801B9268)) { + if (Option_Input_Sound_X(&(D_menu_801AEB48[D_menu_801B9288 - 1].xPos), 146.0f, 245.0f, &D_menu_801B9268)) { var_v1 = D_menu_801AEB48[D_menu_801B9288 - 1].xPos - 146.0f; gVolumeSettings[D_menu_801B9288 - 1] = var_v1; @@ -1440,7 +1452,7 @@ void Option_80194BD0(void) { } } -void Option_SoundDraw(void) { +void Option_Sound_Draw(void) { s32 i; s32 colorGB; @@ -1454,20 +1466,20 @@ void Option_SoundDraw(void) { Option_DrawMenuLabel(); - Option_801952B4(); + Option_Sound_Speaker_Draw(); RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_RGBA16(&gMasterDisp, D_MAP_60447A0, 8, 8, D_menu_801AEFA8[0], D_menu_801AEFD4[0], D_menu_801AF000, - 0.2f); + Lib_TextureRect_RGBA16(&gMasterDisp, aMapWhiteSquareTex, 8, 8, D_menu_801AEFA8[0], D_menu_801AEFD4[0], + D_menu_801AF000, 0.2f); RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_IA8(&gMasterDisp, D_OPT_8005CD0, 112, 13, D_menu_801AEFA8[1], D_menu_801AEFD4[1], 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_8005CD0, 112, 13, D_menu_801AEFA8[1], D_menu_801AEFD4[1], 1.0f, 1.0f); for (i = 0; i < 4; i++) { if (D_menu_801B9288 == i) { - Option_8019C824(&D_menu_801B9270[i]); + Option_Color_FlashRed(&D_menu_801B9270[i]); } else { D_menu_801B9270[i] = 255.0f; } @@ -1475,51 +1487,54 @@ void Option_SoundDraw(void) { colorGB = D_menu_801B9270[0]; gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); - TextureRect_IA8(&gMasterDisp, D_OPT_8006280, 48, 13, D_menu_801AEFA8[2], D_menu_801AEFD4[2], 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_8006280, 48, 13, D_menu_801AEFA8[2], D_menu_801AEFD4[2], 1.0f, 1.0f); colorGB = D_menu_801B9270[1]; gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); - TextureRect_IA8(&gMasterDisp, D_OPT_80064F0, 88, 14, D_menu_801AEFA8[3], D_menu_801AEFD4[3], 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_80064F0, 88, 14, D_menu_801AEFA8[3], D_menu_801AEFD4[3], 1.0f, 1.0f); colorGB = D_menu_801B9270[2]; gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); - TextureRect_IA8(&gMasterDisp, D_OPT_80069C0, 56, 15, D_menu_801AEFA8[4], D_menu_801AEFD4[4], 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_80069C0, 56, 15, D_menu_801AEFA8[4], D_menu_801AEFD4[4], 1.0f, 1.0f); colorGB = D_menu_801B9270[3]; gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); - TextureRect_IA8(&gMasterDisp, D_OPT_8006D10, 24, 13, D_menu_801AEFA8[5], D_menu_801AEFD4[5], 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_8006D10, 24, 13, D_menu_801AEFA8[5], D_menu_801AEFD4[5], 1.0f, 1.0f); if (D_menu_801B9288 == 0) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_IA8_MirX(&gMasterDisp, D_OPT_800E130, 8, 8, D_menu_801AEFA8[6], D_menu_801AEFD4[6], 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, D_OPT_800E130, 8, 8, D_menu_801AEFA8[7], D_menu_801AEFD4[7], 1.0f, 1.0f); + Lib_TextureRect_IA8_MirX(&gMasterDisp, aArrowTex, 8, 8, D_menu_801AEFA8[6], D_menu_801AEFD4[6], 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aArrowTex, 8, 8, D_menu_801AEFA8[7], D_menu_801AEFD4[7], 1.0f, 1.0f); } gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); switch (gOptionSoundMode) { case OPTIONSOUND_STEREO: - TextureRect_IA8(&gMasterDisp, D_OPT_800CD90, 56, 13, D_menu_801AEFA8[8], D_menu_801AEFD4[8], 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_800CD90, 56, 13, D_menu_801AEFA8[8], D_menu_801AEFD4[8], 1.0f, + 1.0f); break; case OPTIONSOUND_MONO: - TextureRect_IA8(&gMasterDisp, D_OPT_80076E0, 56, 14, D_menu_801AEFA8[9], D_menu_801AEFD4[9], 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_80076E0, 56, 14, D_menu_801AEFA8[9], D_menu_801AEFD4[9], 1.0f, + 1.0f); break; case OPTIONSOUND_HEADSET: - TextureRect_IA8(&gMasterDisp, D_OPT_8007210, 88, 14, D_menu_801AEFA8[10], D_menu_801AEFD4[10], 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_8007210, 88, 14, D_menu_801AEFA8[10], D_menu_801AEFD4[10], 1.0f, + 1.0f); break; } - TextureRect_IA8(&gMasterDisp, D_OPT_8006E50, 96, 10, 166.0f, 213.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aBtoCancelTex, 96, 10, 166.0f, 213.0f, 1.0f, 1.0f); - for (i = 0; i < 3; i++) { + for (i = 0; i < ARRAY_COUNT(D_menu_801AEAA0); i++) { Option_DrawCardLabel(D_menu_801AEAA0[i]); Option_DrawCardLabel(D_menu_801AEB48[i]); } } -void Option_801952B4(void) { +void Option_Sound_Speaker_Draw(void) { s32 i; if (D_menu_801B9284 == 1) { @@ -1533,7 +1548,7 @@ void Option_801952B4(void) { break; // looks fake, but isn't } - for (i = 2; i < 4; i++) { + for (i = 2; i < ARRAY_COUNT(D_menu_801AE9C0); i++) { D_menu_801AE9C0[i].xScale += 0.02f; D_menu_801AE9C0[i].yScale += 0.02f; D_menu_801AE9C0[i].xPos -= 0.1f; @@ -1545,7 +1560,7 @@ void Option_801952B4(void) { case 2: if (D_menu_801B9178 == 0) { - for (i = 2; i < 4; i++) { + for (i = 2; i < ARRAY_COUNT(D_menu_801AE9C0); i++) { D_menu_801AE9C0[i].xScale -= 0.02f; D_menu_801AE9C0[i].yScale -= 0.02f; D_menu_801AE9C0[i].xPos += 0.1f; @@ -1563,7 +1578,7 @@ void Option_801952B4(void) { switch (D_menu_801B9158) { case 0: if (D_menu_801B917C == 0) { - for (i = 0; i < 4; i++) { + for (i = 0; i < ARRAY_COUNT(D_menu_801AE9C0); i++) { D_menu_801AE9C0[i].xScale += 0.08f; D_menu_801AE9C0[i].yScale += 0.08f; D_menu_801AE9C0[i].xPos -= 0.4f; @@ -1578,7 +1593,7 @@ void Option_801952B4(void) { case 1: if (D_menu_801B917C == 0) { - for (i = 0; i < 4; i++) { + for (i = 0; i < ARRAY_COUNT(D_menu_801AE9C0); i++) { D_menu_801AE9C0[i].xScale -= 0.08f; D_menu_801AE9C0[i].yScale -= 0.08f; D_menu_801AE9C0[i].xPos += 0.4f; @@ -1599,7 +1614,7 @@ void Option_801952B4(void) { } } else { - for (i = 0; i < 4; i++) { + for (i = 0; i < ARRAY_COUNT(D_menu_801AE9C0); i++) { D_menu_801AE9C0[i].xScale = 1.0f; D_menu_801AE9C0[i].yScale = 1.0f; D_menu_801AE9C0[i].xPos = D_menu_801AE9A0[i]; @@ -1611,14 +1626,14 @@ void Option_801952B4(void) { Option_DrawCardLabel(D_menu_801AE9C0[i]); } - for (i = 2; i < 4; i++) { + for (i = 2; i < ARRAY_COUNT(D_menu_801AE9C0); i++) { if (D_menu_801B914C != 3) { Option_DrawCardLabel(D_menu_801AE9C0[i]); } } } -void Option_ExpertSoundInit(void) { +void Option_ExpertSound_Setup(void) { s32 i; gStarCount = 800; @@ -1627,11 +1642,11 @@ void Option_ExpertSoundInit(void) { D_menu_801B9290.unk_0 = 0; D_menu_801B9290.unk_4 = 0; - spectrumAnalyzerMode = 0; + sSpectrumAnalyzerMode = 0; sMusicPlaying = false; // clang-format off - for (i = 0; i < 32; i++) { D_menu_801B9298[i] = 0.0f; } + for (i = 0; i < ARRAY_COUNT(D_menu_801B9298); i++) { D_menu_801B9298[i] = 0.0f; } // clang-format on } @@ -1640,7 +1655,7 @@ void Option_ExpertSoundInit(void) { #endif // Expert Sound Options -void Option_ExpertSoundUpdate(void) { +void Option_ExpertSound_Update(void) { s32 pad; f32 sp28 = D_menu_801B931C; @@ -1654,7 +1669,7 @@ void Option_ExpertSoundUpdate(void) { } #endif - if (Option_8019C66C(&sp28, 0.0f, 49.0f, &D_menu_801B9290) != 0) { + if (Option_Input_Sound_X(&sp28, 0.0f, 49.0f, &D_menu_801B9290) != 0) { AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); D_menu_801B931C = sp28; } @@ -1669,9 +1684,9 @@ void Option_ExpertSoundUpdate(void) { AUDIO_PLAY_SFX(NA_SE_ARWING_CANCEL, gDefaultSfxSource, 4); AUDIO_PLAY_BGM(NA_BGM_SELECT); gDrawMode = DRAW_NONE; - D_menu_801B9124 = 1000; - D_menu_801B912C = 0; - D_menu_801B9244 = 1; + sMenuEntryState = OPTION_MAIN_MENU; + sMainMenuState = 0; + sMainMenuFromCancel = true; } else { AUDIO_PLAY_SFX(NA_SE_CANCEL, gDefaultSfxSource, 4); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); @@ -1682,14 +1697,14 @@ void Option_ExpertSoundUpdate(void) { // Spectrum Analyzer mode selector if (gControllerPress[gMainController].button & R_CBUTTONS) { - spectrumAnalyzerMode++; - if (spectrumAnalyzerMode > 2) { - spectrumAnalyzerMode = 0; + sSpectrumAnalyzerMode++; + if (sSpectrumAnalyzerMode > 2) { + sSpectrumAnalyzerMode = 0; } } } -void Option_ExpertSoundDraw(void) { +void Option_ExpertSound_Draw(void) { u8* temp_v0_4; f32 var_fs0; f32 var_fv1; @@ -1729,44 +1744,44 @@ void Option_ExpertSoundDraw(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_IA8(&gMasterDisp, D_OPT_80079F0, 128, 14, 49.0f, 81.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_80079F0, 128, 14, 49.0f, 81.0f, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, D_menu_801AECF8[D_menu_801B931C / 10], 16, 15, 230.0f, 82.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_menu_801AECF8[D_menu_801B931C / 10], 16, 15, 230.0f, 82.0f, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, D_menu_801AECF8[D_menu_801B931C % 10], 16, 15, 244.0f, 82.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_menu_801AECF8[D_menu_801B931C % 10], 16, 15, 244.0f, 82.0f, 1.0f, 1.0f); #if MODS_SFX_JUKEBOX == 1 } #endif - Option_8019B7D4(); + Option_AcceptCancel_Draw(); RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 50, 50, 200, 255); for (i = 0; i < 4; i++) { - TextureRect_RGBA16(&gMasterDisp, D_MAP_60447A0, 8, 8, D_menu_801AF014[i], D_menu_801AF024[i], - D_menu_801AF034[i], D_menu_801AF044[i]); + Lib_TextureRect_RGBA16(&gMasterDisp, aMapWhiteSquareTex, 8, 8, D_menu_801AF014[i], D_menu_801AF024[i], + D_menu_801AF034[i], D_menu_801AF044[i]); } if (sMusicPlaying) { temp_v0_4 = Audio_UpdateFrequencyAnalysis(); var_fv1 = 60.0f; - if (spectrumAnalyzerMode == 2) { + if (sSpectrumAnalyzerMode == 2) { var_fv1 = 30.0f; } - for (i = 0; i < 32; i++) { - if (spectrumAnalyzerMode == 0 || spectrumAnalyzerMode == 2) { + for (i = 0; i < ARRAY_COUNT(D_menu_801B9298); i++) { + if ((sSpectrumAnalyzerMode == 0) || (sSpectrumAnalyzerMode == 2)) { D_menu_801B9298[i] = (var_fv1 / 255.0f) * temp_v0_4[i]; } else { D_menu_801B9298[i] = var_fv1 - ((var_fv1 / 255.0f) * temp_v0_4[i]); } } } else { - for (i = 0; i < 32; i++) { + for (i = 0; i < ARRAY_COUNT(D_menu_801B9298); i++) { Math_SmoothStepToF(&D_menu_801B9298[i], 0.0f, 0.2f, 100.0f, 0.1f); } } @@ -1779,7 +1794,7 @@ void Option_ExpertSoundDraw(void) { Matrix_LookAt(gGfxMatrix, 0.0f, 0.0f, 100.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - for (var_fs0 = D_menu_801AF004, i = 0; i < 32; i++, var_fs0 += D_menu_801AF010) { + for (var_fs0 = D_menu_801AF004, i = 0; i < ARRAY_COUNT(D_menu_801B9298); i++, var_fs0 += D_menu_801AF010) { r = D_menu_801AF054 + ((D_menu_801AF060 - D_menu_801AF054) / 31.0f) * i; g = D_menu_801AF058 + ((D_menu_801AF064 - D_menu_801AF058) / 31.0f) * i; b = D_menu_801AF05C + ((D_menu_801AF068 - D_menu_801AF05C) / 31.0f) * i; @@ -1787,11 +1802,11 @@ void Option_ExpertSoundDraw(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, (s32) r, (s32) g, (s32) b, 255); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, var_fs0, D_menu_801AF078[spectrumAnalyzerMode], D_menu_801AF008, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, var_fs0, D_menu_801AF078[sSpectrumAnalyzerMode], D_menu_801AF008, MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_menu_801AF00C, D_menu_801B9298[i], 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801AF06C[spectrumAnalyzerMode]); + gSPDisplayList(gMasterDisp++, D_menu_801AF06C[sSpectrumAnalyzerMode]); Matrix_Pop(&gGfxMatrix); } @@ -1800,7 +1815,7 @@ void Option_ExpertSoundDraw(void) { Lib_InitPerspective(&gMasterDisp); } -void Option_DataInit(void) { +void Option_Data_Setup(void) { gStarCount = 800; D_menu_801B91E4 = 255.0f; D_menu_801B9330[0] = 0; @@ -1809,13 +1824,13 @@ void Option_DataInit(void) { D_menu_801B91CC = 0; } -void Option_DataUpdate(void) { +void Option_Data_Update(void) { f32 temp_fv0; s32 i; - switch (D_menu_801B912C) { + switch (sMainMenuState) { case 0: - Option_8019669C(); + Option_Data_Select(); break; case 2: @@ -1824,15 +1839,15 @@ void Option_DataUpdate(void) { } D_menu_801B91CC = 0; D_menu_801B91C0 = 0; - D_menu_801B912C = 0; + sMainMenuState = 0; break; case 3: if (D_menu_801B9330[D_menu_801B91C0] == 0) { gDrawMode = DRAW_NONE; - D_menu_801B9124 = 1000; - D_menu_801B912C = 0; - D_menu_801B9244 = 1; + sMenuEntryState = OPTION_MAIN_MENU; + sMainMenuState = 0; + sMainMenuFromCancel = true; } break; @@ -1842,7 +1857,7 @@ void Option_DataUpdate(void) { case 0: D_menu_801B91CC = 1; D_menu_801B91C0 = 0; - D_menu_801B912C = 0; + sMainMenuState = 0; break; case 1: @@ -1868,29 +1883,29 @@ void Option_DataUpdate(void) { Save_Write(); - D_menu_801B91AC = 0; - D_menu_801B91B0 = 0; - D_menu_801B91C8 = false; + sExpertSoundCursor = 0; + sExpertModeCursor = 0; + sExpertModesEnabled = false; gExpertMode = false; - sOptionCardList[0].unk_00.texture = D_OPT_8003B50; - sOptionCardList[0].unk_00.width = 72; - sOptionCardList[0].unk_00.height = 12; - sOptionCardList[4].unk_00.texture = D_OPT_80046B0; - sOptionCardList[4].unk_00.width = 64; - sOptionCardList[4].unk_00.height = 10; + sOptionCardList[OPTION_MAP].tex.texture = aMainGameCardTex; + sOptionCardList[OPTION_MAP].tex.width = 72; + sOptionCardList[OPTION_MAP].tex.height = 12; + sOptionCardList[OPTION_SOUND].tex.texture = aSoundCardTex; + sOptionCardList[OPTION_SOUND].tex.width = 64; + sOptionCardList[OPTION_SOUND].tex.height = 10; - for (i = 0; i < OPTION_COUNT; i++) { + for (i = 0; i < ARRAY_COUNT(sOptionCardList); i++) { sOptionCardCurTextPosX[i] = sOptionCardTextPosX[i]; sOptionCardCurTextPosY[i] = sOptionCardTextPosY[i]; } - Title_80188010(); + Title_GetRankTotalHits(); } break; case 3: - D_menu_801B912C = 0; + sMainMenuState = 0; break; } } @@ -1898,9 +1913,9 @@ void Option_DataUpdate(void) { } } -void Option_8019669C(void) { +void Option_Data_Select(void) { if ((D_menu_801B91CC == 0) || (D_menu_801B91CC == 1)) { - if (Option_8019C5A0(&D_menu_801B91C0) != 0) { + if (Option_Input_DataSelect_X(&D_menu_801B91C0) != 0) { AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); } if (1) {} @@ -1909,37 +1924,37 @@ void Option_8019669C(void) { if (gControllerPress[gMainController].button & A_BUTTON) { if (D_menu_801B91CC == 3) { AUDIO_PLAY_SFX(NA_SE_ARWING_CANCEL, gDefaultSfxSource, 4); - D_menu_801B912C = 3; + sMainMenuState = 3; } else { D_menu_801B9330[D_menu_801B91C0] = 10; if (D_menu_801B91C0 == 0) { if (D_menu_801B91CC == 1) { AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); - D_menu_801B912C = 2; + sMainMenuState = 2; } else { AUDIO_PLAY_SFX(NA_SE_ARWING_CANCEL, gDefaultSfxSource, 4); - D_menu_801B912C = 3; + sMainMenuState = 3; } } else { AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); - D_menu_801B912C = 4; + sMainMenuState = 4; } } } else if (gControllerPress[gMainController].button & B_BUTTON) { if (D_menu_801B91CC == 1) { AUDIO_PLAY_SFX(NA_SE_CANCEL, gDefaultSfxSource, 4); - D_menu_801B912C = 2; + sMainMenuState = 2; } else { AUDIO_PLAY_SFX(NA_SE_ARWING_CANCEL, gDefaultSfxSource, 4); - D_menu_801B912C = 3; + sMainMenuState = 3; } } } -void Option_DataDraw(void) { +void Option_Data_Draw(void) { s32 i; s32 sp7C[2]; - s32 sp74[2]; + s32 mask[2]; static f32 D_menu_801AF084[2] = { 172.0f, 76.0f }; static f32 D_menu_801AF08C[2] = { 228.0f, 121.0f }; @@ -1953,85 +1968,90 @@ void Option_DataDraw(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); for (i = 0; i < 2; i++) { - TextureRect_IA8(&gMasterDisp, D_OPT_80084B0 + (176 * 4 * i), 176, 4, D_menu_801AF094[0], - D_menu_801AF0AC[0] + (4.0f * i), 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_80084B0 + (176 * 4 * i), 176, 4, D_menu_801AF094[0], + D_menu_801AF0AC[0] + (4.0f * i), 1.0f, 1.0f); } - TextureRect_IA8(&gMasterDisp, D_OPT_80084B0 + 176 * 4 * 2, 176, 5, D_menu_801AF094[0], D_menu_801AF0AC[0] + 8.0f, - 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_80084B0 + 176 * 4 * 2, 176, 5, D_menu_801AF094[0], + D_menu_801AF0AC[0] + 8.0f, 1.0f, 1.0f); if (D_menu_801B91CC < 2) { - TextureRect_IA8_MirX(&gMasterDisp, D_OPT_800E130, 8, 8, D_menu_801AF084[D_menu_801B91C0], 140.0f, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, D_OPT_800E130, 8, 8, D_menu_801AF08C[D_menu_801B91C0], 140.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8_MirX(&gMasterDisp, aArrowTex, 8, 8, D_menu_801AF084[D_menu_801B91C0], 140.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aArrowTex, 8, 8, D_menu_801AF08C[D_menu_801B91C0], 140.0f, 1.0f, 1.0f); - Option_8019C824(&D_menu_801AED20[D_menu_801B91C0]); + Option_Color_FlashRed(&D_menu_801AED20[D_menu_801B91C0]); D_menu_801AED20[!D_menu_801B91C0] = 255.0f; - sp74[0] = sp74[1] = 0xFFFFFFFF; + mask[0] = mask[1] = 0xFFFFFFFF; - for (i = 0; i < 2; i++) { + for (i = 0; i < ARRAY_COUNT(D_menu_801B9330); i++) { if (D_menu_801B9330[i] != 0) { - sp74[i] = 1; + mask[i] = 1; sp7C[i] = 255; D_menu_801B9330[i]--; } } - if ((gGameFrameCount & sp74[1]) != 0) { + if ((gGameFrameCount & mask[1]) != 0) { sp7C[1] = D_menu_801AED20[1]; gDPSetPrimColor(gMasterDisp++, 0, 0, 255, sp7C[1], sp7C[1], 255); - TextureRect_IA8(&gMasterDisp, D_OPT_8009980, 32, 12, D_menu_801AF094[1], D_menu_801AF0AC[1], 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_8009980, 32, 12, D_menu_801AF094[1], D_menu_801AF0AC[1], 1.0f, + 1.0f); } - if ((gGameFrameCount & sp74[0]) != 0) { + if ((gGameFrameCount & mask[0]) != 0) { sp7C[0] = D_menu_801AED20[0]; gDPSetPrimColor(gMasterDisp++, 0, 0, 255, sp7C[0], sp7C[0], 255); - TextureRect_IA8(&gMasterDisp, D_OPT_8009B00, 40, 12, D_menu_801AF094[2], D_menu_801AF0AC[2], 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_8009B00, 40, 12, D_menu_801AF094[2], D_menu_801AF0AC[2], 1.0f, + 1.0f); } } switch (D_menu_801B91CC) { case 0: gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - - for (i = 0; i < 9; i++) { - TextureRect_IA8(&gMasterDisp, D_OPT_8008DA0 + (160 * 2 * i), 160, 2, D_menu_801AF094[3], - D_menu_801AF0AC[3] + (2.0f * i), 1.0f, 1.0f); + { + for (i = 0; i < 9; i++) { + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_8008DA0 + (160 * 2 * i), 160, 2, D_menu_801AF094[3], + D_menu_801AF0AC[3] + (2.0f * i), 1.0f, 1.0f); + } + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_8008DA0 + 160 * 2 * 9, 160, 1, D_menu_801AF094[3], + D_menu_801AF0AC[3] + 18.0f, 1.0f, 1.0f); } - TextureRect_IA8(&gMasterDisp, D_OPT_8008DA0 + 160 * 2 * 9, 160, 1, D_menu_801AF094[3], - D_menu_801AF0AC[3] + 18.0f, 1.0f, 1.0f); break; case 1: case 2: gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - - for (i = 0; i < 20; i++) { - TextureRect_IA8(&gMasterDisp, D_OPT_8009CE0 + (160 * 2 * i), 160, 2, D_menu_801AF094[4], - D_menu_801AF0AC[4] + (2.0f * i), 1.0f, 1.0f); + { + for (i = 0; i < 20; i++) { + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_8009CE0 + (160 * 2 * i), 160, 2, D_menu_801AF094[4], + D_menu_801AF0AC[4] + (2.0f * i), 1.0f, 1.0f); + } + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_8009CE0 + 160 * 2 * 20, 160, 1, D_menu_801AF094[4], + D_menu_801AF0AC[4] + 40.0f, 1.0f, 1.0f); } - TextureRect_IA8(&gMasterDisp, D_OPT_8009CE0 + 160 * 2 * 20, 160, 1, D_menu_801AF094[4], - D_menu_801AF0AC[4] + 40.0f, 1.0f, 1.0f); break; case 3: gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 32, 32, 255); - TextureRect_IA8(&gMasterDisp, D_OPT_800B680, 144, 28, D_menu_801AF094[5], D_menu_801AF0AC[5], 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, D_OPT_800B680 + 4032, 144, 13, D_menu_801AF094[5], D_menu_801AF0AC[5] + 28.0f, - 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_800B680, 144, 28, D_menu_801AF094[5], D_menu_801AF0AC[5], 1.0f, + 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_800B680 + 4032, 144, 13, D_menu_801AF094[5], + D_menu_801AF0AC[5] + 28.0f, 1.0f, 1.0f); break; } - Option_8019B7D4(); + Option_AcceptCancel_Draw(); } -char* D_menu_801AF0C4[3] = { "P", "S", "F" }; -s32 D_menu_801AF0D0[3] = { 255, 0, 30 }; -s32 D_menu_801AF0DC[3] = { 30, 179, 30 }; -s32 D_menu_801AF0E8[3] = { 0, 67, 255 }; +char* sTeamLetter[3] = { "P", "S", "F" }; +s32 sTeamAlivePrimR[3] = { 255, 0, 30 }; +s32 sTeamAlivePrimG[3] = { 30, 179, 30 }; +s32 sTeamAlivePrimB[3] = { 0, 67, 255 }; -void Option_RankingInit(void) { - Title_80188010(); +void Option_Ranking_Setup(void) { + Title_GetRankTotalHits(); gStarCount = 800; @@ -2044,50 +2064,51 @@ void Option_RankingInit(void) { D_menu_801B91D8 = -6.0f; D_menu_801B91E0 = -6.0f; - D_menu_801B93E0 = 0; - D_menu_801B8288 = 10; + sRanking2ndPage = false; + sTitleRankMaxRecords = 10; D_menu_801B9400.unk_0 = 0; D_menu_801B9400.unk_4 = 0; D_menu_801B9408.unk_0 = 0; D_menu_801B9408.unk_4 = 0; - Option_80192598(); + Option_PlanetTextures_Setup(); } -void Option_RankingUpdate(void) { - Option_80196FC4(); +void Option_Ranking_Update(void) { + Option_Ranking_Select(); if (gControllerPress[gMainController].button & B_BUTTON) { AUDIO_PLAY_SFX(NA_SE_ARWING_CANCEL, gDefaultSfxSource, 4); gDrawMode = DRAW_NONE; - D_menu_801B9124 = 1000; - D_menu_801B912C = 0; - D_menu_801B9244 = 1; + sMenuEntryState = OPTION_MAIN_MENU; + sMainMenuState = 0; + sMainMenuFromCancel = true; } } -void Option_RankingDraw(void) { - Option_RankingMenuDraw(); +void Option_Ranking_Draw(void) { + Option_RankingMenu_Draw(); Option_DrawMenuLabel(); } -void Option_80196FC4(void) { +void Option_Ranking_Select(void) { + // Press A to go to the 2nd page if (gControllerPress[gMainController].button & A_BUTTON) { AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); - D_menu_801B93E0 ^= 1; + sRanking2ndPage ^= 1; } - if (D_menu_801B93E0 != 0) { - Option_8019715C(); + if (sRanking2ndPage) { + Option_Ranking2_Cursor(); return; } - Option_80197074(); + Option_Ranking_Cursor(); } -void Option_80197074(void) { - if (Option_8019C418(&D_menu_801B93E4, 9, 1, 0, 20, 5, 4, gMainController, &D_menu_801B9400)) { +void Option_Ranking_Cursor(void) { + if (Option_Input_MoveCursor_Y(&D_menu_801B93E4, 9, 1, 0, 20, 5, 4, gMainController, &D_menu_801B9400)) { AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); D_menu_801B91D4 = 114.0f - D_menu_801B93E4 * 130.0f; D_menu_801B91DC = 114.0f - D_menu_801B93E4 * 130.0f; @@ -2096,7 +2117,7 @@ void Option_80197074(void) { } } -void Option_8019715C(void) { +void Option_Ranking2_Cursor(void) { s32 pad; f32 sp30; f32 temp_fv0_2; @@ -2104,7 +2125,8 @@ void Option_8019715C(void) { s32 temp2; if (D_menu_801B91D0 != 0) { - if (Option_8019C418(&D_menu_801B93E4, 9, 1, 1, 20, 2, 9, gMainController, &D_menu_801B9408) != 0.00f) { + if (Option_Input_MoveCursor_Y(&D_menu_801B93E4, 9, 1, 1, 20, 2, 9, gMainController, &D_menu_801B9408) != + 0.00f) { AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); D_menu_801B91DC = 114.0f - D_menu_801B93E4 * 130.0f; D_menu_801B91E0 = -6.0f + D_menu_801B93E4 * 130.0f; @@ -2138,28 +2160,30 @@ void Option_8019715C(void) { } } -void Option_RankingMenuDraw(void) { - s32 temp_t0; +void Option_RankingMenu_Draw(void) { + s32 colorGB; - if (D_menu_801B93E0 != 0) { - Option_8019752C(); + if (sRanking2ndPage) { + Option_RankingMenu2_Draw(); } else { - Title_80187E28(); + Title_RankingData_Draw(); RCP_SetupDL(&gMasterDisp, SETUPDL_83); - Option_8019C824(&D_menu_801B93F0); - temp_t0 = D_menu_801B93F0; - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, temp_t0, temp_t0, 255); - TextureRect_IA8(&gMasterDisp, D_VS_MENU_7004010, 8, 8, 70.0f, (D_menu_801B93E4 * 17.0f) + 55.0f, 1.0f, 1.0f); + Option_Color_FlashRed(&D_menu_801B93F0); + colorGB = D_menu_801B93F0; + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); + Lib_TextureRect_IA8(&gMasterDisp, D_VS_MENU_7004010, 8, 8, 70.0f, (D_menu_801B93E4 * 17.0f) + 55.0f, 1.0f, + 1.0f); } RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); Graphics_DisplaySmallText(242, 215, 1.0f, 1.0f, "PUSH A"); } -void Option_8019752C(void) { +// 2nd page and more detailed version of the Ranking +void Option_RankingMenu2_Draw(void) { f32 var_fs0; f32 var_fs1; - s32 temp_a0; + s32 colorGB; s32 i; static f32 D_menu_801AF0F4 = 130.0f; static f32 D_menu_801AF0F8[] = { 48.0f, 175.0f }; @@ -2167,53 +2191,54 @@ void Option_8019752C(void) { var_fs0 = D_menu_801B91D4; var_fs1 = D_menu_801B91D8; - for (i = 0; i < 10; i++) { + for (i = 0; i < RANKING_MAX; i++) { if ((var_fs0 > 69.0f) && (var_fs0 < 230.0f)) { - Option_80197A3C(i, 41, var_fs0); - Option_80197D30(i, 75, var_fs0 - 25.0f); - Option_80197DE4(i, 130, (var_fs0 - 26.0f)); - Map_801AD7EC(210, (var_fs0 - 24.0f), gSaveFile.save.data.unk_40[i]); - Option_80197F74(i, 258, var_fs0 - 25.0f); + Option_OrdinalNumbers_Draw(i, 41, var_fs0); + Option_RankingName_Draw(i, 75, var_fs0 - 25.0f); + Option_RankingTotalHits_Draw(i, 130, (var_fs0 - 26.0f)); + Map_RemainingLives_Draw(210, (var_fs0 - 24.0f), gSaveFile.save.data.rankingLives[i]); + Option_RankingTeamAlive_Draw(i, 258, var_fs0 - 25.0f); } - Option_80198164(i, var_fs0, var_fs1); + Option_RankingRoute_Draw(i, var_fs0, var_fs1); var_fs0 += D_menu_801AF0F4; var_fs1 -= D_menu_801AF0F4; } - Option_8019BDF0(); + Option_Menu_Push(); Option_80197914(); Matrix_Pop(&gGfxMatrix); - RCP_SetupDL(&gMasterDisp, SETUPDL_76); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_IA8(&gMasterDisp, D_OPT_800D170, 8, 16, 0.0f, D_menu_801AF0F8[0], 40.0f, 1.5f); - TextureRect_IA8_MirY(&gMasterDisp, D_OPT_800D170, 8, 16, 0.0f, D_menu_801AF0F8[1], 40.0f, 1.5f); + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_800D170, 8, 16, 0.0f, D_menu_801AF0F8[0], 40.0f, 1.5f); + Lib_TextureRect_IA8_MirY(&gMasterDisp, D_OPT_800D170, 8, 16, 0.0f, D_menu_801AF0F8[1], 40.0f, 1.5f); Background_DrawPartialStarfield(0, 70); Background_DrawPartialStarfield(170, 239); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); if (D_menu_801B91D4 >= 114.0f) { gDPSetPrimColor(gMasterDisp++, 0, 0, 32, 32, 32, 255); } else { - Option_8019C824(&D_menu_801B93F4); - temp_a0 = D_menu_801B93F4; - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, temp_a0, temp_a0, 255); + Option_Color_FlashRed(&D_menu_801B93F4); + colorGB = D_menu_801B93F4; + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); } - TextureRect_IA8(&gMasterDisp, D_OPT_800D070, 16, 16, 150.0f, 44.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_800D070, 16, 16, 150.0f, 44.0f, 1.0f, 1.0f); if (D_menu_801B91D4 <= -1055.0f) { gDPSetPrimColor(gMasterDisp++, 0, 0, 32, 32, 32, 255); } else { - Option_8019C824(&D_menu_801B93F8); - temp_a0 = D_menu_801B93F8; - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, temp_a0, temp_a0, 255); + Option_Color_FlashRed(&D_menu_801B93F8); + colorGB = D_menu_801B93F8; + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); } - TextureRect_IA8_MirY(&gMasterDisp, D_OPT_800D070, 16, 16, 150.0f, 200.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8_MirY(&gMasterDisp, D_OPT_800D070, 16, 16, 150.0f, 200.0f, 1.0f, 1.0f); } Vec3f D_menu_801AF100[2] = { { 0.0f, 167.0f, 0.0f }, { 0.0f, -167.0f, 0.0f } }; @@ -2236,124 +2261,126 @@ void Option_80197914(void) { } } -void Option_80197A3C(s32 arg0, s32 arg1, s32 arg2) { +void Option_OrdinalNumbers_Draw(s32 ordinalType, s32 xPos, s32 yPos) { RCP_SetupDL(&gMasterDisp, SETUPDL_83); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - if (arg0 != 9) { - TextureRect_IA8(&gMasterDisp, D_menu_801AECF8[arg0 + 1], 16, 15, arg1, arg2 - 25.0f, 1.0f, 1.0f); + if (ordinalType != 9) { + Lib_TextureRect_IA8(&gMasterDisp, D_menu_801AECF8[ordinalType + 1], 16, 15, xPos, yPos - 25.0f, 1.0f, 1.0f); } else { - TextureRect_IA8(&gMasterDisp, aLargeText_1, 16, 15, arg1 - 14.0f, arg2 - 25.0f, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, aLargeText_0, 16, 15, arg1, arg2 - 25.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aLargeText_1, 16, 15, xPos - 14.0f, yPos - 25.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aLargeText_0, 16, 15, xPos, yPos - 25.0f, 1.0f, 1.0f); } RCP_SetupDL(&gMasterDisp, SETUPDL_85); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - switch (arg0) { - case 0: - TextureRect_CI4(&gMasterDisp, D_OPT_8003A70, D_OPT_8003AB8, 16, 9, arg1 + 17.0f, arg2 - 19.0f, 1.0f, 1.0f); + switch (ordinalType) { + case 0: // st + Lib_TextureRect_CI4(&gMasterDisp, aStTex, aStTLUT, 16, 9, xPos + 17.0f, yPos - 19.0f, 1.0f, 1.0f); break; - case 1: - TextureRect_CI4(&gMasterDisp, D_OPT_80038E0, D_OPT_8003930, 16, 10, arg1 + 17.0f, arg2 - 19.0f, 1.0f, 1.0f); + case 1: // nd + Lib_TextureRect_CI4(&gMasterDisp, aNdTex, aNdTLUT, 16, 10, xPos + 17.0f, yPos - 19.0f, 1.0f, 1.0f); break; - case 2: - TextureRect_CI4(&gMasterDisp, D_OPT_8003950, D_OPT_80039A8, 16, 11, arg1 + 17.0f, arg2 - 20.0f, 1.0f, 1.0f); + case 2: // rd + Lib_TextureRect_CI4(&gMasterDisp, aRdTex, aRdTLUT, 16, 11, xPos + 17.0f, yPos - 20.0f, 1.0f, 1.0f); break; - default: - TextureRect_CI4(&gMasterDisp, D_OPT_8003AE0, D_OPT_8003B28, 16, 9, arg1 + 17.0f, arg2 - 19.0f, 1.0f, 1.0f); + default: // th + Lib_TextureRect_CI4(&gMasterDisp, aThTex, aThTLUT, 16, 9, xPos + 17.0f, yPos - 19.0f, 1.0f, 1.0f); break; } } -void Option_80197D30(s32 arg0, s32 arg1, s32 arg2) { - char temp[4]; +void Option_RankingName_Draw(s32 rankIdx, s32 xPos, s32 yPos) { + char rankName[4]; RCP_SetupDL(&gMasterDisp, SETUPDL_83); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); - temp[0] = gSaveFile.save.data.unk_18[arg0][0] & 0xFF; - temp[1] = gSaveFile.save.data.unk_18[arg0][1] & 0xFF; - temp[2] = gSaveFile.save.data.unk_18[arg0][2] & 0xFF; - temp[3] = '\0'; + rankName[0] = gSaveFile.save.data.rankNameEntry[rankIdx][0] & 0xFF; + rankName[1] = gSaveFile.save.data.rankNameEntry[rankIdx][1] & 0xFF; + rankName[2] = gSaveFile.save.data.rankNameEntry[rankIdx][2] & 0xFF; + rankName[3] = '\0'; - Graphics_DisplayLargeText(arg1, arg2, 1.0f, 1.0f, temp); + Graphics_DisplayLargeText(xPos, yPos, 1.0f, 1.0f, rankName); } -void Option_80197DE4(s32 arg0, s32 arg1, s32 arg2) { +void Option_RankingTotalHits_Draw(s32 rankIdx, s32 xPos, s32 yPos) { RCP_SetupDL(&gMasterDisp, SETUPDL_83); + gDPSetPrimColor(gMasterDisp++, 0, 0, 60, 60, 255, 170); - TextureRect_IA8(&gMasterDisp, D_MAP_601B4B0, 24, 17, arg1, arg2, 3.17f, 1.05f); + Lib_TextureRect_IA8(&gMasterDisp, aMapOptionBgTex, 24, 17, xPos, yPos, 3.17f, 1.05f); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); - Graphics_DisplaySmallText(arg1, arg2, 1.0f, 1.0f, "TOTAL HITS"); + Graphics_DisplaySmallText(xPos, yPos, 1.0f, 1.0f, "TOTAL HITS"); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - Graphics_DisplaySmallNumber((arg1 + 40.0f) - ((func_hud_8008BCBC(D_menu_801B8220[arg0]) * 8) - 8), (arg2 + 9.0f), - D_menu_801B8220[arg0]); + Graphics_DisplaySmallNumber((xPos + 40.0f) - ((HUD_CountDigits(gTotalHitsRanking[rankIdx]) * 8) - 8), (yPos + 9.0f), + gTotalHitsRanking[rankIdx]); } -void Option_80197F74(s32 arg0, s32 arg1, s32 arg2) { - f32 temp_fs1; +void Option_RankingTeamAlive_Draw(s32 rankIdx, s32 xPos, s32 yPos) { + f32 xOffset; s32 i; RCP_SetupDL(&gMasterDisp, SETUPDL_83); - for (temp_fs1 = 0.0f, i = 0; i < 3; i++, temp_fs1 += 12.0f) { - gDPSetPrimColor(gMasterDisp++, 0, 0, D_menu_801AF0D0[i], D_menu_801AF0DC[i], D_menu_801AF0E8[i], 255); - Graphics_DisplaySmallText(temp_fs1 + arg1, arg2, 1.0f, 1.0f, D_menu_801AF0C4[i]); + for (xOffset = 0.0f, i = 0; i < ARRAY_COUNT(sTeamAlivePrimR); i++, xOffset += 12.0f) { + gDPSetPrimColor(gMasterDisp++, 0, 0, sTeamAlivePrimR[i], sTeamAlivePrimG[i], sTeamAlivePrimB[i], 255); + Graphics_DisplaySmallText(xOffset + xPos, yPos, 1.0f, 1.0f, sTeamLetter[i]); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - Graphics_DisplaySmallNumber(arg1 + temp_fs1 - ((func_hud_8008BCBC(D_menu_801B81A8[arg0][i]) - 1) * 8), - arg2 + 9.0f, D_menu_801B81A8[arg0][i]); + Graphics_DisplaySmallNumber(xPos + xOffset - ((HUD_CountDigits(gRankingTeamAlive[rankIdx][i]) - 1) * 8), + yPos + 9.0f, gRankingTeamAlive[rankIdx][i]); } } -void Option_80198164(s32 arg0, f32 arg1, f32 arg2) { +void Option_RankingRoute_Draw(s32 rankIdx, f32 arg1, f32 arg2) { f32 temp = 16.0f; - s32 temp_s2 = gSaveFile.save.data.unk_36[arg0]; + s32 routeMax = gSaveFile.save.data.rankingRoute[rankIdx]; f32 var_fs2; s32 i; - for (var_fs2 = 0.0f, i = 0; i < 7; i++, var_fs2 += 24.0f + temp) { - Option_801982B0(arg0, i, 28.0f + var_fs2, arg1, temp_s2); - if (i < temp_s2) { - Option_8019882C(arg0, i, 28.0f + var_fs2, arg1); - Option_801984D0(arg0, i, 28.0f + var_fs2, arg1); - Option_80198608(arg0, i, 28.0f + var_fs2, arg1); + for (var_fs2 = 0.0f, i = 0; i < ROUTE_MAX; i++, var_fs2 += 24.0f + temp) { + Option_RankingRouteFrame_Draw(rankIdx, i, 28.0f + var_fs2, arg1, routeMax); + if (i < routeMax) { + Option_RankingPlanetName_Draw(rankIdx, i, 28.0f + var_fs2, arg1); + Option_RankingHitCount_Draw(rankIdx, i, 28.0f + var_fs2, arg1); + Option_RankingTeamPresence_Draw(rankIdx, i, 28.0f + var_fs2, arg1); } } if ((arg2 < 75.0f) && (arg2 > -80.0f)) { - Option_8019896C(arg0, arg2, temp_s2); + Option_RankingPlanetRoute_Draw(rankIdx, arg2, routeMax); } } -void Option_801982B0(s32 arg0, s32 arg1, f32 arg2, f32 arg3, s32 arg4) { +void Option_RankingRouteFrame_Draw(s32 rankIdx, s32 routeIdx, f32 xPos, f32 yPos, s32 arg4) { s32 r; s32 g; s32 b; - s32 temp_v0; + s32 routeLineColor; PlanetId start; PlanetId end; - if ((arg3 > 30.0f) && (arg3 < 200.0f)) { + if ((yPos > 30.0f) && (yPos < 200.0f)) { RCP_SetupDL(&gMasterDisp, SETUPDL_76); - if (arg1 < 6) { + + if (routeIdx < 6) { r = g = b = 255; - if (arg1 < (arg4 - 1)) { - start = gSaveFile.save.data.unk_5E[arg0][arg1].unk_8 & 0xF; - end = gSaveFile.save.data.unk_5E[arg0][arg1 + 1].unk_8 & 0xF; + if (routeIdx < (arg4 - 1)) { + start = gSaveFile.save.data.stats[rankIdx][routeIdx].planetId & 0xF; + end = gSaveFile.save.data.stats[rankIdx][routeIdx + 1].planetId & 0xF; - temp_v0 = Option_80199284(start, end); + routeLineColor = Option_GetRouteLineColor(start, end); - r = g = b = 255; + r = g = b = 255; // white by default - switch (temp_v0) { + switch (routeLineColor) { case 0: r = 16; g = 64; @@ -2373,71 +2400,71 @@ void Option_801982B0(s32 arg0, s32 arg1, f32 arg2, f32 arg3, s32 arg4) { } } gDPSetPrimColor(gMasterDisp++, 0, 0, r, g, b, 255); - TextureRect_RGBA16(&gMasterDisp, D_MAP_60447A0, 8, 8, arg2 + 24.0f, arg3 + 11.0f, 2.0f, 0.2f); + Lib_TextureRect_RGBA16(&gMasterDisp, aMapWhiteSquareTex, 8, 8, xPos + 24.0f, yPos + 11.0f, 2.0f, 0.2f); } gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_RGBA16(&gMasterDisp, D_MAP_6047550, 24, 24, arg2, arg3, 1.0f, 1.0f); + Lib_TextureRect_RGBA16(&gMasterDisp, aMapPathBoxTex, 24, 24, xPos, yPos, 1.0f, 1.0f); } } -void Option_801984D0(s32 arg0, s32 arg1, f32 arg2, f32 arg3) { - s32 sp1C; +void Option_RankingHitCount_Draw(s32 rankIdx, s32 routeIdx, f32 xPos, f32 yPos) { + s32 hitCount; - if ((arg3 > 22.0f) && (arg3 < 162.0f)) { + if ((yPos > 22.0f) && (yPos < 162.0f)) { RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); - sp1C = (gSaveFile.save.data.unk_5E[arg0][arg1].unk_C & 1) << 8; - sp1C |= gSaveFile.save.data.unk_5E[arg0][arg1].unk_0; - Graphics_DisplaySmallNumber(arg2 + 15.0f - (func_hud_8008BCBC(sp1C) - 1) * 8, arg3 + 24.0f + 1.0f, sp1C); + hitCount = (gSaveFile.save.data.stats[rankIdx][routeIdx].unk_C & 1) << 8; + hitCount |= gSaveFile.save.data.stats[rankIdx][routeIdx].hitCount; + Graphics_DisplaySmallNumber(xPos + 15.0f - (HUD_CountDigits(hitCount) - 1) * 8, yPos + 24.0f + 1.0f, hitCount); } } -void Option_80198608(s32 arg0, s32 arg1, f32 xPos, f32 yPos) { +void Option_RankingTeamPresence_Draw(s32 rankIdx, s32 routeIdx, f32 xPos, f32 yPos) { f32 xOffset; - s32 sp90[3]; + s32 teamAlive[3]; s32 i; if ((yPos > 12.0f) && (yPos < 154.0f)) { RCP_SetupDL(&gMasterDisp, SETUPDL_83); - sp90[0] = gSaveFile.save.data.unk_5E[arg0][arg1].unk_D & 1; - sp90[1] = gSaveFile.save.data.unk_5E[arg0][arg1].unk_F & 1; - sp90[2] = gSaveFile.save.data.unk_5E[arg0][arg1].unk_E & 1; + teamAlive[0] = gSaveFile.save.data.stats[rankIdx][routeIdx].peppyAlive & 1; + teamAlive[1] = gSaveFile.save.data.stats[rankIdx][routeIdx].slippyAlive & 1; + teamAlive[2] = gSaveFile.save.data.stats[rankIdx][routeIdx].falcoAlive & 1; - for (xOffset = 0.0f, i = 0; i < 3; i++, xOffset += 9.0f) { - if (sp90[i] == 0) { + for (xOffset = 0.0f, i = 0; i < ARRAY_COUNT(teamAlive); i++, xOffset += 9.0f) { + if (teamAlive[i] == 0) { continue; } - gDPSetPrimColor(gMasterDisp++, 0, 0, D_menu_801AF0D0[i], D_menu_801AF0DC[i], D_menu_801AF0E8[i], 255); - Graphics_DisplaySmallText(xPos + xOffset - 1.0f, yPos + 24.0f + 8.0f + 1.0f, 1.0f, 1.0f, - D_menu_801AF0C4[i]); + gDPSetPrimColor(gMasterDisp++, 0, 0, sTeamAlivePrimR[i], sTeamAlivePrimG[i], sTeamAlivePrimB[i], 255); + Graphics_DisplaySmallText(xPos + xOffset - 1.0f, yPos + 24.0f + 8.0f + 1.0f, 1.0f, 1.0f, sTeamLetter[i]); } } } -void Option_8019882C(s32 arg0, s32 arg1, f32 arg2, f32 arg3) { - PlanetId temp; - char* sp20; - f32 temp2; +void Option_RankingPlanetName_Draw(s32 rankIdx, s32 routeIdx, f32 xPos, f32 yPos) { + PlanetId planetIdx; + char* planetName; + f32 textWidth; + + if ((yPos > 58.0f) && (yPos < 197.0f)) { + planetIdx = gSaveFile.save.data.stats[rankIdx][routeIdx].planetId & 0xF; + planetName = D_menu_801AEEAC[planetIdx]; - if ((arg3 > 58.0f) && (arg3 < 197.0f)) { - temp = gSaveFile.save.data.unk_5E[arg0][arg1].unk_8 & 0xF; - sp20 = D_menu_801AEEAC[temp]; RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); - temp2 = Graphics_GetSmallTextWidth(sp20) / 2.0f; - Graphics_DisplaySmallText(arg2 + 12.0f - temp2, arg3 - 8.0f, 1.0f, 1.0f, sp20); + textWidth = Graphics_GetSmallTextWidth(planetName) / 2.0f; + Graphics_DisplaySmallText(xPos + 12.0f - textWidth, yPos - 8.0f, 1.0f, 1.0f, planetName); } } -void Option_8019896C(s32 arg0, f32 y, s32 arg2) { +void Option_RankingPlanetRoute_Draw(s32 rankIdx, f32 y, s32 routeMax) { static f32 zAngle = 0.0f; static f32 xStart = -121.0f; static f32 xAdvance = 40.1f; s32 i; PlanetId planet; - s32 spFC; - s32 spF4; + bool gotMedal; + bool drawPlanetMedal; f32 x; s32 pad[2]; @@ -2447,9 +2474,10 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) { Lib_InitOrtho(&gMasterDisp); - spFC = gSaveFile.save.data.unk_4A[arg0]; - for (x = xStart, i = 0; i < arg2; i++, x += xAdvance) { - planet = gSaveFile.save.data.unk_5E[arg0][i].unk_8 & 0xF; + gotMedal = gSaveFile.save.data.rankingMedal[rankIdx]; + + for (x = xStart, i = 0; i < routeMax; i++, x += xAdvance) { + planet = gSaveFile.save.data.stats[rankIdx][i].planetId & 0xF; switch (planet) { case SAVE_SLOT_SOLAR: @@ -2463,13 +2491,14 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) { Matrix_RotateZ(gGfxMatrix, M_DTOR * zAngle, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.3f, 0.3f, 0.3f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801AEE6C[planet]); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 128); gDPSetEnvColor(gMasterDisp++, 31, 0, 0, 0); Matrix_Scale(gGfxMatrix, 0.8f, 0.8f, 0.8f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_menu_801AEE6C[planet]); + Matrix_Pop(&gGfxMatrix); break; @@ -2482,12 +2511,10 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) { Matrix_Translate(gGfxMatrix, x - 1.0f, y + 4.0f, 0.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.3f, 0.3f, 0.3f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801AEE6C[planet]); Matrix_Translate(gGfxMatrix, 18.0f, -20.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801AEE6C[planet]); Matrix_Pop(&gGfxMatrix); @@ -2504,7 +2531,6 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) { Matrix_Translate(gGfxMatrix, x, y, 0.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.3f, 0.3f, 0.3f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801AEE6C[planet]); Matrix_Pop(&gGfxMatrix); @@ -2519,7 +2545,6 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) { Matrix_RotateX(gGfxMatrix, M_DTOR * 20.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.01f, 0.01f, 0.01f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801AEE6C[planet]); Matrix_Pop(&gGfxMatrix); @@ -2549,7 +2574,6 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) { Matrix_Translate(gGfxMatrix, x, y, 0.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.3f, 0.3f, 0.3f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801AEE6C[planet]); if ((planet != SAVE_SLOT_VENOM_1) && (planet != SAVE_SLOT_VENOM_2) && (planet != PLANET_AQUAS)) { @@ -2559,7 +2583,7 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); } Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801B4A40); + gSPDisplayList(gMasterDisp++, gMapVenomCloudDL); } Matrix_Scale(gGfxMatrix, 1.6f, 1.6f, 1.6f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -2570,15 +2594,15 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) { break; } - spF4 = (spFC >> i) & 1; - if (spF4 != 0) { - Option_80199198(x, y, 0.0f); + drawPlanetMedal = (gotMedal >> i) & 1; + if (drawPlanetMedal) { + Option_RankingRouteMedal_Draw(x, y, 0.0f); } } Matrix_Pop(&gGfxMatrix); - Option_80192738(); + Option_ScrollPlanetTexture(); zAngle += 0.1f; @@ -2589,40 +2613,40 @@ f32 D_menu_801AF13C = 0.7f; f32 D_menu_801AF140 = 11.0f; f32 D_menu_801AF144 = 2.7f; -void Option_80199198(f32 arg0, f32 arg1, f32 arg2) { +void Option_RankingRouteMedal_Draw(f32 xPos, f32 yPos, f32 zPos) { RCP_SetupDL(&gMasterDisp, SETUPDL_53); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, arg0 - D_menu_801AF140, arg1 + D_menu_801AF144, arg2, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, xPos - D_menu_801AF140, yPos + D_menu_801AF144, zPos, MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_menu_801AF13C, D_menu_801AF13C, D_menu_801AF13C, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_MAP_601D1F0); + gSPDisplayList(gMasterDisp++, aMapMedalDL); Matrix_Pop(&gGfxMatrix); } -s32 Option_80199284(PlanetId start, PlanetId end) { +s32 Option_GetRouteLineColor(PlanetId start, PlanetId end) { s32 i; - for (i = 0; i < 24; i++) { - if ((D_menu_801AED4C[i].unk_0 == start) && (D_menu_801AED4C[i].unk_4 == end)) { + for (i = 0; i < ARRAY_COUNT(sRouteColoredLine); i++) { + if ((sRouteColoredLine[i].start == start) && (sRouteColoredLine[i].end == end)) { break; } } - return D_menu_801AED4C[i].unk_8; + return sRouteColoredLine[i].color; } -void Option_VersusMenuInit(void) { +void Option_VersusMenu_Setup(void) { s32 i; if (D_menu_801B91C4) { AUDIO_PLAY_BGM(NA_BGM_VS_SELECT); } - D_menu_801B93D0 = D_menu_801B9124; + sVsMenuSelection = sMenuEntryState; if (D_game_800D2870) { - sOptionCardList[1].unk_00.yPos = 129.0f; - sOptionCardList[1].unk_38.y = -7.5f; + sOptionCardList[OPTION_TRAINING].tex.yPos = 129.0f; + sOptionCardList[OPTION_TRAINING].frame.y = -7.5f; } gVsPointsToWin = 3; @@ -2634,7 +2658,7 @@ void Option_VersusMenuInit(void) { D_menu_801B93C4 = 0; - for (i = 0; i < 4; i++) { + for (i = 0; i < ARRAY_COUNT(gControllerPlugged); i++) { gPlayerInactive[i] = false; if (gControllerPlugged[i] == 0) { gPlayerInactive[i] = true; @@ -2648,28 +2672,28 @@ void Option_VersusMenuInit(void) { D_menu_801B91E8 = 255.0f; } -void Option_VersusMenuUpdate(void) { - switch (D_menu_801B912C) { +void Option_VersusMenu_Update(void) { + switch (sMainMenuState) { case 0: - Option_8019949C(); + Option_VersusMenu_Cursor(); break; case 1: - if (D_menu_801B91EC == 0.0f) { - D_menu_801B9124 = 2000; - Option_InitEntry(); + if (sOkConfirmTimer == 0.0f) { + sMenuEntryState = OPTION_VERSUS_STAGE; + Option_Entry_Setup(); } break; } } -void Option_8019949C(void) { +void Option_VersusMenu_Cursor(void) { s32 i; - for (i = 0; i < 4; i++) { + for (i = 0; i < ARRAY_COUNT(gControllerPress); i++) { if (!(D_menu_801B93C4 & (1 << i))) { - Option_8019C824(&D_menu_801B9358[i]); - if (Option_8019C418(&D_menu_801AED3C[i], 2, 0, 0, 20, 2, 4, i, &D_menu_801B93A0[i])) { + Option_Color_FlashRed(&D_menu_801B9358[i]); + if (Option_Input_MoveCursor_Y(&D_menu_801AED3C[i], 2, 0, 0, 20, 2, 4, i, &D_menu_801B93A0[i])) { AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); } } @@ -2677,8 +2701,8 @@ void Option_8019949C(void) { if (gControllerPress[i].button & A_BUTTON) { if (D_menu_801B93C4 == 15) { AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); - D_menu_801B91EC = 10; - D_menu_801B912C++; + sOkConfirmTimer = 10; + sMainMenuState++; break; } else { if (!(D_menu_801B93C4 & (1 << i))) { @@ -2698,42 +2722,42 @@ void Option_8019949C(void) { } else { AUDIO_PLAY_BGM(NA_BGM_SELECT); AUDIO_PLAY_SFX(NA_SE_ARWING_CANCEL, gDefaultSfxSource, 4); - Option_8019B8A0(2); - D_menu_801B9248 = 1; + Option_VsBackToSubMenu(2); + sVsSubMenuFromCancel = true; break; } } } } -void Option_VersusMenuDraw(void) { +void Option_VersusMenu_Draw(void) { s32 i; - Option_8019B8C8(); - Option_80199EA8(); + Option_VsMenuCard_Draw(); + Option_VS_N64Console_Draw(); - for (i = 0; i < 4; i++) { + for (i = 0; i < ARRAY_COUNT(gControllerPlugged); i++) { if (gControllerPlugged[i] == 1) { - Option_80199820(i); + Option_VS_HandicapSet_Draw(i); } } if (D_menu_801B93C4 == 15) { - Option_8019B5AC(); + Option_VsOKConfirm_Draw(); } } -f32 D_menu_801AF148[4] = { 30.0f, 214.0f, 30.0f, 215.0f }; -f32 D_menu_801AF158[4] = { 18.0f, 18.0f, 151.0f, 151.0f }; -s32 D_menu_801AF168[4] = { 56, 48, 56, 48 }; -s32 D_menu_801AF178[4] = { 8, 10, 10, 8 }; -f32 D_menu_801AF188[4] = { 12.0f, 16.0f, 12.0f, 18.0f }; -f32 D_menu_801AF198 = -1.0f; +f32 sVsHandicapFrameXpos[4] = { 30.0f, 214.0f, 30.0f, 215.0f }; +f32 sVsHandicapFrameYpos[4] = { 18.0f, 18.0f, 151.0f, 151.0f }; +s32 sCharNameWidth[4] = { 56, 48, 56, 48 }; +s32 sCharNameHeight[4] = { 8, 10, 10, 8 }; +f32 sCharNameXoffsetPos[4] = { 12.0f, 16.0f, 12.0f, 18.0f }; +f32 sCharNameYoffsetPos = -1.0f; f32 D_menu_801AF19C[4] = { 46.0f, 41.0f, 41.0f, 41.0f }; f32 D_menu_801AF1AC = 24.0f; f32 D_menu_801AF1B0 = 1.4f; -f32 D_menu_801AF1B4 = 5.0f; -f32 D_menu_801AF1B8 = 11.0f; +f32 sPlayerFaceXoffsetPos = 5.0f; +f32 sPlayerFaceYoffsetPos = 11.0f; f32 D_menu_801AF1BC = 8.0f; f32 D_menu_801AF1C0 = 45.0f; f32 D_menu_801AF1C4 = 20.0f; @@ -2744,132 +2768,137 @@ f32 D_menu_801AF1D4 = 7.0f; f32 D_menu_801AF1D8 = 59.0f; f32 D_menu_801AF1DC = 58.0f; -void Option_80199820(s32 arg0) { - s32 var_v0; - s32 var_a2; +void Option_VS_HandicapSet_Draw(s32 PlayerIdx) { + s32 mask; + s32 width; s32 colorGB; s32 i; - static u8* D_menu_801AF1E0[3] = { - D_VS_MENU_70030B0, - D_VS_MENU_7003290, - D_VS_MENU_7003470, + static u8* sVsHandicapLvlTex[3] = { + aVsHandicapLvl1Tex, + aVsHandicapLvl2Tex, + aVsHandicapLvl3Tex, }; - static u8* D_menu_801AF1EC[4] = { - D_VS_MENU_70049C0, - D_VS_MENU_7004BB0, - D_VS_MENU_7004DC0, - D_VS_MENU_7005020, + static u8* sVsCharNameTex[4] = { + aVsFoxNameTex, + aVsPeppyNameTex, + aVsSlippyNameTex, + aVsFalcoNameTex, }; - static u16* D_menu_801AF1FC[4] = { - D_VS_MENU_7004B80, - D_VS_MENU_7004D90, - D_VS_MENU_7004FF0, - D_VS_MENU_70051A0, + static u16* sVsCharNameTLUT[4] = { + aVsFoxNameTLUT, + aVsPeppyNameTLUT, + aVsSlippyNameTLUT, + aVsFalcoNameTLUT, }; - static u16* D_menu_801AF20C[4] = { - D_VS_MENU_7008EE0, - D_VS_MENU_700AD20, - D_VS_MENU_700CB60, - D_VS_MENU_70070A0, + static u16* sVsPlayerFaceTex[4] = { + aVsFoxFaceTex, + aVsPeppyFaceTex, + aVsSlippyFaceTex, + aVsFalcoFaceTex, }; - static u8* D_menu_801AF21C[4] = { - D_VS_MENU_7000000, - D_VS_MENU_70000D0, - D_VS_MENU_7000210, - D_VS_MENU_7000350, + static u8* sVsPlayerNumTex[4] = { + aVsPlayerNum1Tex, + aVsPlayerNum2Tex, + aVsPlayerNum3Tex, + aVsPlayerNum4Tex, }; - static s32 D_menu_801AF22C[4] = { 177, 255, 0, 30 }; - static s32 D_menu_801AF23C[4] = { 242, 30, 255, 30 }; - static s32 D_menu_801AF24C[4] = { 12, 0, 67, 255 }; + static s32 sCharNameR[4] = { 177, 255, 0, 30 }; + static s32 sCharNameG[4] = { 242, 30, 255, 30 }; + static s32 sCharNameB[4] = { 12, 0, 67, 255 }; RCP_SetupDL(&gMasterDisp, SETUPDL_85); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - for (i = 0; i < 4; i++) { - TextureRect_CI4(&gMasterDisp, D_VS_MENU_70118E0 + (80 * 16 * i) / 2, D_VS_MENU_70123F8, 80, 16, - D_menu_801AF148[arg0], D_menu_801AF158[arg0] + (16.0f * i), 1.0f, 1.0f); + { + for (i = 0; i < 4; i++) { + Lib_TextureRect_CI4(&gMasterDisp, aVsHandicapFrameTex + (80 * 16 * i) / 2, aVsHandicapFrameTLUT, 80, 16, + sVsHandicapFrameXpos[PlayerIdx], sVsHandicapFrameYpos[PlayerIdx] + (16.0f * i), 1.0f, + 1.0f); + } + Lib_TextureRect_CI4(&gMasterDisp, aVsHandicapFrameTex + (80 * 16 * 4) / 2, aVsHandicapFrameTLUT, 80, 7, + sVsHandicapFrameXpos[PlayerIdx], sVsHandicapFrameYpos[PlayerIdx] + (16.0f * 4), 1.0f, 1.0f); } - TextureRect_CI4(&gMasterDisp, D_VS_MENU_70118E0 + (80 * 16 * 4) / 2, D_VS_MENU_70123F8, 80, 7, - D_menu_801AF148[arg0], D_menu_801AF158[arg0] + (16.0f * 4), 1.0f, 1.0f); + gDPSetPrimColor(gMasterDisp++, 0, 0, sCharNameR[PlayerIdx], sCharNameG[PlayerIdx], sCharNameB[PlayerIdx], 255); - gDPSetPrimColor(gMasterDisp++, 0, 0, D_menu_801AF22C[arg0], D_menu_801AF23C[arg0], D_menu_801AF24C[arg0], 255); - - TextureRect_CI8(&gMasterDisp, D_menu_801AF1EC[arg0], D_menu_801AF1FC[arg0], D_menu_801AF168[arg0], - D_menu_801AF178[arg0], D_menu_801AF148[arg0] + D_menu_801AF188[arg0], - D_menu_801AF158[arg0] + D_menu_801AF198, 1.0f, 1.0f); + Lib_TextureRect_CI8(&gMasterDisp, sVsCharNameTex[PlayerIdx], sVsCharNameTLUT[PlayerIdx], sCharNameWidth[PlayerIdx], + sCharNameHeight[PlayerIdx], sVsHandicapFrameXpos[PlayerIdx] + sCharNameXoffsetPos[PlayerIdx], + sVsHandicapFrameYpos[PlayerIdx] + sCharNameYoffsetPos, 1.0f, 1.0f); RCP_SetupDL(&gMasterDisp, SETUPDL_83); - var_v0 = 0xFFFFFFFF; - if (D_menu_801B9348[arg0] != 0) { - var_v0 = 1; - D_menu_801B9348[arg0]--; + mask = 0xFFFFFFFF; + if (D_menu_801B9348[PlayerIdx] != 0) { + mask = 0x00000001; + D_menu_801B9348[PlayerIdx]--; } - if ((gGameFrameCount & var_v0) != 0) { - colorGB = D_menu_801B9358[arg0]; + if ((gGameFrameCount & mask) != 0) { + colorGB = D_menu_801B9358[PlayerIdx]; gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); - TextureRect_IA8(&gMasterDisp, D_VS_MENU_7001030, 64, 9, D_menu_801AF148[arg0] + D_menu_801AF1BC, - D_menu_801AF158[arg0] + D_menu_801AF1C0, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_VS_MENU_7001030, 64, 9, sVsHandicapFrameXpos[PlayerIdx] + D_menu_801AF1BC, + sVsHandicapFrameYpos[PlayerIdx] + D_menu_801AF1C0, 1.0f, 1.0f); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); - TextureRect_IA8(&gMasterDisp, D_menu_801AF1E0[D_menu_801AED3C[arg0]], 40, 12, - D_menu_801AF148[arg0] + D_menu_801AF1C4, D_menu_801AF158[arg0] + D_menu_801AF1C8, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, sVsHandicapLvlTex[D_menu_801AED3C[PlayerIdx]], 40, 12, + sVsHandicapFrameXpos[PlayerIdx] + D_menu_801AF1C4, + sVsHandicapFrameYpos[PlayerIdx] + D_menu_801AF1C8, 1.0f, 1.0f); } gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_IA8_MirX(&gMasterDisp, D_OPT_800E130, 8, 8, D_menu_801AF148[arg0] + D_menu_801AF1D4, - D_menu_801AF158[arg0] + D_menu_801AF1DC, 1.0f, 1.0f); + Lib_TextureRect_IA8_MirX(&gMasterDisp, aArrowTex, 8, 8, sVsHandicapFrameXpos[PlayerIdx] + D_menu_801AF1D4, + sVsHandicapFrameYpos[PlayerIdx] + D_menu_801AF1DC, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, D_OPT_800E130, 8, 8, D_menu_801AF148[arg0] + D_menu_801AF1D8, - D_menu_801AF158[arg0] + D_menu_801AF1DC, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aArrowTex, 8, 8, sVsHandicapFrameXpos[PlayerIdx] + D_menu_801AF1D8, + sVsHandicapFrameYpos[PlayerIdx] + D_menu_801AF1DC, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, D_VS_MENU_7000F10, 40, 7, D_menu_801AF148[arg0] + D_menu_801AF1CC, - D_menu_801AF158[arg0] + D_menu_801AF1D0, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aVsTextContTex, 40, 7, sVsHandicapFrameXpos[PlayerIdx] + D_menu_801AF1CC, + sVsHandicapFrameYpos[PlayerIdx] + D_menu_801AF1D0, 1.0f, 1.0f); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - for (i = 0; i < 2; i++) { - TextureRect_RGBA16(&gMasterDisp, D_menu_801AF20C[arg0] + (44 * 20 * i), 44, 20, - D_menu_801AF148[arg0] + D_menu_801AF1B4, - D_menu_801AF158[arg0] + D_menu_801AF1B8 + (i * 20.0f * 0.7f), 0.7f, 0.7f); + { + for (i = 0; i < 2; i++) { + Lib_TextureRect_RGBA16(&gMasterDisp, sVsPlayerFaceTex[PlayerIdx] + (44 * 20 * i), 44, 20, + sVsHandicapFrameXpos[PlayerIdx] + sPlayerFaceXoffsetPos, + sVsHandicapFrameYpos[PlayerIdx] + sPlayerFaceYoffsetPos + (i * 20.0f * 0.7f), 0.7f, + 0.7f); + } + Lib_TextureRect_RGBA16(&gMasterDisp, sVsPlayerFaceTex[PlayerIdx] + 44 * 20 * 2, 44, 4, + sVsHandicapFrameXpos[PlayerIdx] + sPlayerFaceXoffsetPos, + sVsHandicapFrameYpos[PlayerIdx] + sPlayerFaceYoffsetPos + 28.0f, 0.7f, 0.7f); } - TextureRect_RGBA16(&gMasterDisp, D_menu_801AF20C[arg0] + 44 * 20 * 2, 44, 4, - D_menu_801AF148[arg0] + D_menu_801AF1B4, D_menu_801AF158[arg0] + D_menu_801AF1B8 + 28.0f, 0.7f, - 0.7f); - - var_a2 = 24; - if (arg0 == 0) { - var_a2 = 16; + width = 24; + if (PlayerIdx == 0) { + width = 16; } - gDPSetPrimColor(gMasterDisp++, 0, 0, D_menu_801AF22C[arg0], D_menu_801AF23C[arg0], D_menu_801AF24C[arg0], 255); + gDPSetPrimColor(gMasterDisp++, 0, 0, sCharNameR[PlayerIdx], sCharNameG[PlayerIdx], sCharNameB[PlayerIdx], 255); - TextureRect_IA8(&gMasterDisp, D_menu_801AF21C[arg0], var_a2, 13, D_menu_801AF148[arg0] + D_menu_801AF19C[arg0], - D_menu_801AF158[arg0] + D_menu_801AF1AC, D_menu_801AF1B0, D_menu_801AF1B0); + Lib_TextureRect_IA8(&gMasterDisp, sVsPlayerNumTex[PlayerIdx], width, 13, + sVsHandicapFrameXpos[PlayerIdx] + D_menu_801AF19C[PlayerIdx], + sVsHandicapFrameYpos[PlayerIdx] + D_menu_801AF1AC, D_menu_801AF1B0, D_menu_801AF1B0); } -void Option_80199EA8(void) { +void Option_VS_N64Console_Draw(void) { s32 i; RCP_SetupDL_76(); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); for (i = 0; i < 3; i++) { - TextureRect_RGBA16(&gMasterDisp, D_VS_MENU_700E9A0 + (144 * 14 * i), 144, 14, 87.0f, 84 + (i * 14.0f), 1.0f, - 1.0f); + Lib_TextureRect_RGBA16(&gMasterDisp, aVsN64ConsoleTex + (144 * 14 * i), 144, 14, 87.0f, 84 + (i * 14.0f), 1.0f, + 1.0f); } } -void Option_VersusStageInit(void) { +void Option_VersusStage_Setup(void) { s32 i; gStarCount = 0; @@ -2880,102 +2909,101 @@ void Option_VersusStageInit(void) { D_menu_801B93DC = D_menu_801B9340; gVsTimeTrialLimit = D_menu_801B93DC; // clang-format off - for (i = 0; i < 4; i++) {\ + for (i = 0; i < ARRAY_COUNT(D_menu_801B9358); i++) { \ D_menu_801B9358[i] = 0; } // clang-format on - D_menu_801B936C = 0; - D_menu_801B9374 = 0; - D_menu_801B937C = 0; - D_menu_801B91EC = 0; - D_menu_801B91F0 = 0; + sPointConfirmTimer = 0; + sStageSelectConfirmTimer = 0; + sTimeTrialConfirmTimer = 0; + sOkConfirmTimer = 0; + sVsSubMenuFirstState = false; D_menu_801B9368 = 255.0f; D_menu_801B9370 = 255.0f; D_menu_801B9378 = 255.0f; Option_8019A080(); } -// D_menu_801B9380 needs to be static but belongs to bss section? void Option_8019A080(void) { s32 i; - for (i = 0; i < 4; i++) { + for (i = 0; i < ARRAY_COUNT(D_menu_801B9380); i++) { D_menu_801B9380[i].unk_0 = 0; D_menu_801B9380[i].unk_4 = 0; } } -void Option_VersusStageUpdate(void) { - switch (D_menu_801B93D0) { +void Option_VersusStage_Update(void) { + switch (sVsMenuSelection) { case OPTION_POINT_MATCH: - Option_8019A124(); + Option_Vs_PointMatch_Update(); break; case OPTION_BR_MATCH: - Option_8019A1A8(); + Option_Vs_BattleRoyal_Update(); break; case OPTION_TT_MATCH: - Option_8019A214(); + Option_Vs_TimeTrial_Update(); break; } } -void Option_8019A124(void) { - switch (D_menu_801B912C) { +void Option_Vs_PointMatch_Update(void) { + switch (sMainMenuState) { case 0: - Option_8019A2E0(); + Option_Vs_Point_Selection(); break; case 1: - Option_8019A6DC(); + Option_VsStageSelection(); break; case 2: - Option_8019A954(); + Option_VsConfirmSelection(); break; case 3: - Option_8019A298(); + Option_Vs_StartMatch(); break; } } -void Option_8019A1A8(void) { - switch (D_menu_801B912C) { +void Option_Vs_BattleRoyal_Update(void) { + switch (sMainMenuState) { case 0: - Option_8019A6DC(); + Option_VsStageSelection(); break; case 1: - Option_8019A954(); + Option_VsConfirmSelection(); break; case 2: - Option_8019A298(); + Option_Vs_StartMatch(); break; } } -void Option_8019A214(void) { - switch (D_menu_801B912C) { +void Option_Vs_TimeTrial_Update(void) { + switch (sMainMenuState) { case 0: - Option_8019A4DC(); + Option_VsTimeSelection(); break; case 1: - Option_8019A6DC(); + Option_VsStageSelection(); break; case 2: - Option_8019A954(); + Option_VsConfirmSelection(); break; case 3: - Option_8019A298(); + Option_Vs_StartMatch(); break; } } -void Option_8019A298(void) { - if (D_menu_801B91EC == 0.0f) { +void Option_Vs_StartMatch(void) { + if (sOkConfirmTimer == 0.0f) { gGameState = GSTATE_VS_INIT; gNextGameStateTimer = 2; gOptionMenuStatus = OPTION_WAIT; @@ -2983,25 +3011,25 @@ void Option_8019A298(void) { } } -void Option_8019A2E0(void) { +void Option_Vs_Point_Selection(void) { s32 i; - if (D_menu_801B936C != 0) { + if (sPointConfirmTimer != 0) { return; } - if (D_menu_801B91F0) { - D_menu_801B912C++; - D_menu_801B91F0 = 0; + if (sVsSubMenuFirstState) { + sMainMenuState++; + sVsSubMenuFirstState = false; return; } - for (i = 0; i < 4; i++) { + for (i = 0; i < ARRAY_COUNT(gControllerPlugged); i++) { if (gControllerPlugged[i] == 0) { continue; } - if (Option_8019C418(&D_menu_801B93D4, 4, 0, 0, 20, 2, 4, i, &D_menu_801B9380[i])) { + if (Option_Input_MoveCursor_Y(&D_menu_801B93D4, 4, 0, 0, 20, 2, 4, i, &D_menu_801B9380[i])) { AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); gVsPointsToWin = D_menu_801B93D4 + 1; } @@ -3009,39 +3037,39 @@ void Option_8019A2E0(void) { if (gControllerPress[i].button & A_BUTTON) { AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); Option_8019A080(); - D_menu_801B936C = 10; + sPointConfirmTimer = 10; break; } if (gControllerPress[i].button & B_BUTTON) { AUDIO_PLAY_SFX(NA_SE_CANCEL, gDefaultSfxSource, 4); - D_menu_801B9124 = D_menu_801B93D0; + sMenuEntryState = sVsMenuSelection; D_menu_801B91C4 = 0; - Option_InitEntry(); + Option_Entry_Setup(); break; } } } -void Option_8019A4DC(void) { +void Option_VsTimeSelection(void) { s32 i; - if (D_menu_801B937C != 0) { - return; // investigate - } - - if (D_menu_801B91F0) { - D_menu_801B912C++; - D_menu_801B91F0 = 0; + if (sTimeTrialConfirmTimer != 0) { return; } - for (i = 0; i < 4; i++) { + if (sVsSubMenuFirstState) { + sMainMenuState++; + sVsSubMenuFirstState = false; + return; + } + + for (i = 0; i < ARRAY_COUNT(gControllerPlugged); i++) { if (!gControllerPlugged[i]) { continue; } - if (Option_8019C418(&D_menu_801B93DC, 4, 0, 0, 20, 2, 4, i, &D_menu_801B9380[i])) { + if (Option_Input_MoveCursor_Y(&D_menu_801B93DC, 4, 0, 0, 20, 2, 4, i, &D_menu_801B9380[i])) { AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); D_menu_801B9340 = D_menu_801B93DC; gVsTimeTrialLimit = D_menu_801B93DC; @@ -3050,39 +3078,39 @@ void Option_8019A4DC(void) { if (gControllerPress[i].button & A_BUTTON) { AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); Option_8019A080(); - D_menu_801B937C = 10; + sTimeTrialConfirmTimer = 10; break; } if (gControllerPress[i].button & B_BUTTON) { AUDIO_PLAY_SFX(NA_SE_CANCEL, gDefaultSfxSource, 4); - D_menu_801B9124 = D_menu_801B93D0; + sMenuEntryState = sVsMenuSelection; D_menu_801B91C4 = 0; - Option_InitEntry(); + Option_Entry_Setup(); break; } } } -void Option_8019A6DC(void) { +void Option_VsStageSelection(void) { s32 i; - if (D_menu_801B9374 != 0) { - return; // investigate - } - - if (D_menu_801B91F0) { - D_menu_801B933C = 1; - D_menu_801B91F0 = 0; - D_menu_801B912C++; + if (sStageSelectConfirmTimer != 0) { return; } - for (i = 0; i < 4; i++) { + if (sVsSubMenuFirstState) { + D_menu_801B933C = 1; + sVsSubMenuFirstState = false; + sMainMenuState++; + return; + } + + for (i = 0; i < ARRAY_COUNT(gControllerPlugged); i++) { if (gControllerPlugged[i] == 0) { continue; } - if (Option_8019C418(&D_menu_801B93D8, 1, 0, 1, 20, 2, 4, i, &D_menu_801B9380[i])) { + if (Option_Input_MoveCursor_Y(&D_menu_801B93D8, 1, 0, 1, 20, 2, 4, i, &D_menu_801B9380[i])) { AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); gVsMenuSelection = D_menu_801B93D8; } @@ -3091,56 +3119,55 @@ void Option_8019A6DC(void) { AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); if (gVsMenuSelection == 0) { gVersusStage = VS_STAGE_CORNERIA; - if (D_menu_801B93D0 == 30) { + if (sVsMenuSelection == OPTION_TT_MATCH) { gVersusStage = VS_STAGE_KATINA; } } else { gVersusStage = VS_STAGE_SECTOR_Z; } - D_menu_801B9374 = 10; + sStageSelectConfirmTimer = 10; Option_8019A080(); break; } if (gControllerPress[i].button & B_BUTTON) { AUDIO_PLAY_SFX(NA_SE_CANCEL, gDefaultSfxSource, 4); - if (D_menu_801B93D0 == 20) { - D_menu_801B9124 = D_menu_801B93D0; + if (sVsMenuSelection == OPTION_BR_MATCH) { + sMenuEntryState = sVsMenuSelection; D_menu_801B91C4 = 0; - Option_InitEntry(); + Option_Entry_Setup(); } else { Option_8019A080(); - D_menu_801B91F0 = 0; - D_menu_801B912C--; + sVsSubMenuFirstState = false; + sMainMenuState--; } break; } } } -void Option_8019A954(void) { +void Option_VsConfirmSelection(void) { s32 i; - if (D_menu_801B91EC != 0) { - return; // investigate - } - - if (D_menu_801B91F0) { - - D_menu_801B91F0 = 0; - D_menu_801B912C++; + if (sOkConfirmTimer != 0) { return; } - for (i = 0; i < 4; i++) { + if (sVsSubMenuFirstState) { + sVsSubMenuFirstState = false; + sMainMenuState++; + return; + } + + for (i = 0; i < ARRAY_COUNT(gControllerPlugged); i++) { if (gControllerPlugged[i] == 0) { continue; } if (gControllerPress[i].button & A_BUTTON) { AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); - D_menu_801B91EC = 10; + sOkConfirmTimer = 10; break; } @@ -3148,80 +3175,80 @@ void Option_8019A954(void) { AUDIO_PLAY_SFX(NA_SE_CANCEL, gDefaultSfxSource, 4); Option_8019A080(); D_menu_801B933C = 0; - D_menu_801B91F0 = 0; - D_menu_801B912C--; + sVsSubMenuFirstState = false; + sMainMenuState--; break; } } } -void Option_VersusStageDraw(void) { - switch (D_menu_801B93D0) { +void Option_VersusStage_Draw(void) { + switch (sVsMenuSelection) { case OPTION_BR_MATCH: break; case OPTION_POINT_MATCH: - Option_8019AB30(); + Option_VsPointMatch_Draw(); break; case OPTION_TT_MATCH: - Option_8019AD84(); + Option_VsTimeTrial_Draw(); break; } - Option_8019AFFC(); + Option_VsStageSelect_Draw(); if (D_menu_801B933C != 0) { - Option_8019B5AC(); + Option_VsOKConfirm_Draw(); } } -void Option_8019AB30(void) { +void Option_VsPointMatch_Draw(void) { s32 pad[5]; s32 colorGB; s32 sp44 = gVsPointsToWin; - s32 var_v0; + s32 mask; RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 60, 60, 255, 190); - TextureRect_IA8(&gMasterDisp, D_MAP_601B4B0, 24, 17, 94.0f, 43.0f, 5.0f, 1.1f); + Lib_TextureRect_IA8(&gMasterDisp, aMapOptionBgTex, 24, 17, 94.0f, 43.0f, 5.0f, 1.1f); - if (D_menu_801B912C == 0) { - Option_8019B6D8(97.0f, 50.0f, 107.0f, 255, 255, 255); - Option_8019C824(&D_menu_801B9368); + if (sMainMenuState == 0) { + Option_VsSelectionArrows_Draw(97.0f, 50.0f, 107.0f, 255, 255, 255); + Option_Color_FlashRed(&D_menu_801B9368); } else { D_menu_801B9368 = 255.0f; } colorGB = D_menu_801B9368; - var_v0 = 0xFFFFFFFF; + mask = 0xFFFFFFFF; - if (D_menu_801B936C != 0) { + if (sPointConfirmTimer != 0) { colorGB = 255; - var_v0 = 1; - D_menu_801B936C--; - if (D_menu_801B936C == 0) { - D_menu_801B91F0 = 1; + mask = 0x00000001; + sPointConfirmTimer--; + if (sPointConfirmTimer == 0) { + sVsSubMenuFirstState = true; } } - if ((gGameFrameCount & var_v0) != 0) { + if ((gGameFrameCount & mask) != 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); - TextureRect_IA8(&gMasterDisp, D_menu_801AECF8[sp44], 16, 15, 109.0f, 45.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_menu_801AECF8[sp44], 16, 15, 109.0f, 45.0f, 1.0f, 1.0f); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); - TextureRect_IA8(&gMasterDisp, D_VS_MENU_7001DF0, 80, 10, 122.0f, 49.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_VS_MENU_7001DF0, 80, 10, 122.0f, 49.0f, 1.0f, 1.0f); } } -void Option_8019AD84(void) { +void Option_VsTimeTrial_Draw(void) { static f32 D_menu_801AF25C[6] = { 156.0f, 112.0f, 112.0f, 112.0f, 112.0f, 112.0f }; static f32 D_menu_801AF274[6] = { 46.0f, 43.0f, 43.0f, 43.0f, 43.0f, 43.0f }; static f32 D_menu_801B9324; @@ -3229,7 +3256,7 @@ void Option_8019AD84(void) { static f32 D_menu_801B9338; s32 pad[2]; s32 colorGB; - s32 var_v0; + s32 mask; static u8* sTimeTrialMinuteTextures[] = { D_VS_MENU_70024D0, D_VS_MENU_7002730, D_VS_MENU_7002990, D_VS_MENU_7002BF0, D_VS_MENU_7002E50 }; @@ -3238,95 +3265,97 @@ void Option_8019AD84(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 60, 60, 255, 190); - TextureRect_IA8(&gMasterDisp, D_MAP_601B4B0, 24, 17, 93.0f, 42.0f, 5.1f, 1.1f); + Lib_TextureRect_IA8(&gMasterDisp, aMapOptionBgTex, 24, 17, 93.0f, 42.0f, 5.1f, 1.1f); - if (D_menu_801B912C == 0) { + if (sMainMenuState == 0) { D_menu_801B9324 = 97.0f; D_menu_801B9328 = 49.0f; D_menu_801B9338 = 107.0f; - Option_8019B6D8(D_menu_801B9324, D_menu_801B9328, D_menu_801B9338, 255, 255, 255); - Option_8019C824(&D_menu_801B9378); + Option_VsSelectionArrows_Draw(D_menu_801B9324, D_menu_801B9328, D_menu_801B9338, 255, 255, 255); + Option_Color_FlashRed(&D_menu_801B9378); } else { D_menu_801B9378 = 255.0f; } colorGB = D_menu_801B9378; - var_v0 = 0xFFFFFFFF; + mask = 0xFFFFFFFF; - if (D_menu_801B937C != 0) { + if (sTimeTrialConfirmTimer != 0) { colorGB = 255; - var_v0 = 1; - D_menu_801B937C--; - if (D_menu_801B937C == 0) { - D_menu_801B91F0 = 1; + mask = 0x00000001; + sTimeTrialConfirmTimer--; + if (sTimeTrialConfirmTimer == 0) { + sVsSubMenuFirstState = true; } } - if ((gGameFrameCount & var_v0) != 0) { + if ((gGameFrameCount & mask) != 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); - TextureRect_IA8(&gMasterDisp, sTimeTrialMinuteTextures[D_menu_801B9340], 40, 15, - D_menu_801AF25C[D_menu_801B9340 + 1], D_menu_801AF274[D_menu_801B9340 + 1], 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, sTimeTrialMinuteTextures[D_menu_801B9340], 40, 15, + D_menu_801AF25C[D_menu_801B9340 + 1], D_menu_801AF274[D_menu_801B9340 + 1], 1.0f, 1.0f); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); - TextureRect_IA8(&gMasterDisp, D_VS_MENU_7002110, 80, 12, D_menu_801AF25C[0], D_menu_801AF274[0], 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_VS_MENU_7002110, 80, 12, D_menu_801AF25C[0], D_menu_801AF274[0], 1.0f, + 1.0f); } } -void Option_8019AFFC(void) { +void Option_VsStageSelect_Draw(void) { static f32 D_menu_801B93C0; static f32 D_menu_801B93C8; static f32 D_menu_801B93CC; static f32 D_menu_801AF2A0 = 101.0f; static f32 D_menu_801AF2A4 = 86.0f; - s32 var_v0; + s32 mask; s32 colorGB; - if ((D_menu_801B912C == 0 && D_menu_801B93D0 == 20) || (D_menu_801B912C == 1 && D_menu_801B93D0 != 20)) { + if (((sMainMenuState == 0) && (sVsMenuSelection == OPTION_BR_MATCH)) || + ((sMainMenuState == 1) && (sVsMenuSelection != OPTION_BR_MATCH))) { D_menu_801B93C0 = 94.0f; D_menu_801B93C8 = 88.0f; D_menu_801B93CC = 114.0f; RCP_SetupDL(&gMasterDisp, SETUPDL_83); - Option_8019B6D8(D_menu_801B93C0, D_menu_801B93C8, D_menu_801B93CC, 255, 255, 255); - Option_8019C824(&D_menu_801B9370); + Option_VsSelectionArrows_Draw(D_menu_801B93C0, D_menu_801B93C8, D_menu_801B93CC, 255, 255, 255); + Option_Color_FlashRed(&D_menu_801B9370); } else { D_menu_801B9370 = 255.0f; } colorGB = D_menu_801B9370; - var_v0 = 0xFFFFFFFF; - if (D_menu_801B9374 != 0) { - var_v0 = 1; + mask = 0xFFFFFFFF; + if (sStageSelectConfirmTimer != 0) { + mask = 0x00000001; colorGB = 255; - D_menu_801B9374--; - if (D_menu_801B9374 == 0) { - D_menu_801B91F0 = 1; + sStageSelectConfirmTimer--; + if (sStageSelectConfirmTimer == 0) { + sVsSubMenuFirstState = true; } } - if ((gGameFrameCount & var_v0) != 0) { + if ((gGameFrameCount & mask) != 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); - TextureRect_IA8(&gMasterDisp, D_VS_MENU_7001270, 112, 12, D_menu_801AF2A0, D_menu_801AF2A4, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_VS_MENU_7001270, 112, 12, D_menu_801AF2A0, D_menu_801AF2A4, 1.0f, 1.0f); } - if (D_menu_801B93D0 == 30) { - Option_8019B1F8(); + if (sVsMenuSelection == OPTION_TT_MATCH) { + Option_VsTimeTrialStageSelect_Draw(); } else { - Option_8019B3DC(); + Option_VsStageSelect2_Draw(); } } -void Option_8019B1F8(void) { +void Option_VsTimeTrialStageSelect_Draw(void) { static f32 D_menu_801AF2A8 = 69.0f; static f32 D_menu_801AF2AC = 110.0f; static f32 D_menu_801AF2B0 = 123.0f; @@ -3334,142 +3363,142 @@ void Option_8019B1F8(void) { f32 xPos; s32 i; s32 width; - s32 sp8C[2]; - static u8* D_menu_801AF2BC[] = { D_VS_MENU_7001C10, D_VS_MENU_70019E0 }; - static u8* D_menu_801AF2C4[] = { D_VS_MENU_7006780, D_VS_MENU_7005F10 }; - static u16* D_menu_801AF2CC[] = { D_VS_MENU_7006EA0, D_VS_MENU_7006630 }; + s32 alpha[2]; + static u8* sVsTextLevelTex[] = { aVsTextKatinaTex, aVsTextSectorZTex }; + static u8* sVsLevelTex[] = { aVsKatinaTex, aVsSectorZTex }; + static u16* sVsLevelTLUT[] = { aVsKatinaTLUT, aVsSectorZTLUT }; - for (xPos = D_menu_801AF2A8, i = 0; i < 2; i++, xPos += D_menu_801AF2B0) { + for (xPos = D_menu_801AF2A8, i = 0; i < ARRAY_COUNT(sVsTextLevelTex); i++, xPos += D_menu_801AF2B0) { if (i == gVsMenuSelection) { - sp8C[i] = 255; + alpha[i] = 255; } else { - sp8C[i] = 32; + alpha[i] = 32; } RCP_SetupDL(&gMasterDisp, SETUPDL_85); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sp8C[i]); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, alpha[i]); - TextureRect_CI8(&gMasterDisp, D_menu_801AF2C4[i], D_menu_801AF2CC[i], 48, 38, xPos, D_menu_801AF2AC, 1.0f, - 1.0f); + Lib_TextureRect_CI8(&gMasterDisp, sVsLevelTex[i], sVsLevelTLUT[i], 48, 38, xPos, D_menu_801AF2AC, 1.0f, 1.0f); width = 48; if (i == 1) { width = 56; } + RCP_SetupDL(&gMasterDisp, SETUPDL_83); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sp8C[i]); - TextureRect_IA8(&gMasterDisp, D_menu_801AF2BC[i], width, 10, D_menu_801AF2B4[i], D_menu_801AF2AC + 40.0f, 1.0f, - 1.0f); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, alpha[i]); + Lib_TextureRect_IA8(&gMasterDisp, sVsTextLevelTex[i], width, 10, D_menu_801AF2B4[i], D_menu_801AF2AC + 40.0f, + 1.0f, 1.0f); } } -void Option_8019B3DC(void) { +void Option_VsStageSelect2_Draw(void) { static f32 D_menu_801AF2D4 = 69.0f; static f32 D_menu_801AF2D8 = 110.0f; static f32 D_menu_801AF2DC = 123.0f; static f32 D_menu_801AF2E0[] = { 66.0f, 189.0f }; f32 xPos; s32 i; - s32 sp8C[3]; - static u8* D_menu_801AF2E8[] = { - D_VS_MENU_70017B0, - D_VS_MENU_70019E0, + s32 alpha[3]; + static u8* sVsTextLevelTex[] = { + aVsTextCorneriaTex, + aVsTextSectorZTex, }; - static u8* D_menu_801AF2F0[] = { - D_VS_MENU_7005600, - D_VS_MENU_7005F10, + static u8* sVsLevelTex[] = { + aVsCorneriaTex, + aVsSectorZTex, }; - static u16* D_menu_801AF2F8[] = { - D_VS_MENU_7005D20, - D_VS_MENU_7006630, + static u16* sVsLevelTLUT[] = { + aVsCorneriaTLUT, + aVsSectorZTLUT, }; - for (xPos = D_menu_801AF2D4, i = 0; i < 2; i++, xPos += D_menu_801AF2DC) { + for (xPos = D_menu_801AF2D4, i = 0; i < ARRAY_COUNT(sVsTextLevelTex); i++, xPos += D_menu_801AF2DC) { if (i == gVsMenuSelection) { - sp8C[i] = 255; + alpha[i] = 255; } else { - sp8C[i] = 32; + alpha[i] = 32; } RCP_SetupDL(&gMasterDisp, SETUPDL_85); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sp8C[i]); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, alpha[i]); - TextureRect_CI8(&gMasterDisp, D_menu_801AF2F0[i], D_menu_801AF2F8[i], 48, 38, xPos, D_menu_801AF2D8, 1.0f, - 1.0f); + Lib_TextureRect_CI8(&gMasterDisp, sVsLevelTex[i], sVsLevelTLUT[i], 48, 38, xPos, D_menu_801AF2D8, 1.0f, 1.0f); RCP_SetupDL(&gMasterDisp, SETUPDL_83); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sp8C[i]); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, alpha[i]); - TextureRect_IA8(&gMasterDisp, D_menu_801AF2E8[i], 56, 10, D_menu_801AF2E0[i], D_menu_801AF2D8 + 40.0f, 1.0f, - 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, sVsTextLevelTex[i], 56, 10, D_menu_801AF2E0[i], D_menu_801AF2D8 + 40.0f, 1.0f, + 1.0f); } } -void Option_8019B5AC(void) { +void Option_VsOKConfirm_Draw(void) { s32 pad[2]; s32 colorGB; s32 bitmask; - Option_8019C824(&D_menu_801B91E8); + Option_Color_FlashRed(&D_menu_801B91E8); colorGB = D_menu_801B91E8; bitmask = 0xFFFFFFFF; - if (D_menu_801B91EC != 0) { + if (sOkConfirmTimer != 0) { colorGB = 255; bitmask = 0x00000001; - D_menu_801B91EC--; - if (D_menu_801B91EC == 0) { - D_menu_801B91F0 = 1; + sOkConfirmTimer--; + if (sOkConfirmTimer == 0) { + sVsSubMenuFirstState = true; } } if (gGameFrameCount & bitmask) { RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); - TextureRect_IA8(&gMasterDisp, D_VS_MENU_7003650, 40, 12, 143.0f, 210.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_VS_MENU_7003650, 40, 12, 143.0f, 210.0f, 1.0f, 1.0f); } } -void Option_8019B6D8(f32 xPos, f32 yPos, f32 offset, s32 r, s32 g, s32 b) { +void Option_VsSelectionArrows_Draw(f32 xPos, f32 yPos, f32 offset, s32 r, s32 g, s32 b) { RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, r, g, b, 255); - TextureRect_IA8_MirX(&gMasterDisp, D_VS_MENU_7004010, 8, 8, xPos, yPos, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, D_VS_MENU_7004010, 8, 8, xPos + offset, yPos, 1.0f, 1.0f); + Lib_TextureRect_IA8_MirX(&gMasterDisp, D_VS_MENU_7004010, 8, 8, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_VS_MENU_7004010, 8, 8, xPos + offset, yPos, 1.0f, 1.0f); } -void Option_8019B7D4(void) { +void Option_AcceptCancel_Draw(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_IA8(&gMasterDisp, D_OPT_80080F0, 96, 10, 62.0f, 213.0f, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, D_OPT_8006E50, 96, 10, 166.0f, 213.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aAtoConfirmTex, 96, 10, 62.0f, 213.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aBtoCancelTex, 96, 10, 166.0f, 213.0f, 1.0f, 1.0f); } -void Option_8019B8A0(s32 arg0) { - D_menu_801B9124 = arg0; +void Option_VsBackToSubMenu(OptionId menuEntryState) { + sMenuEntryState = menuEntryState; gDrawMode = DRAW_NONE; - D_menu_801B912C = 0; + sMainMenuState = 0; D_menu_801B91B4 = 0; } -void Option_8019B8C8(void) { - Option_8019BDF0(); - Option_DrawMenuCard(sOptionVSCardList[D_menu_801B91A8].unk_38); +// Menu card drawned below the N64 console +void Option_VsMenuCard_Draw(void) { + Option_Menu_Push(); + Option_DrawMenuCard(sOptionVSCardList[sVsMenuCursor].frame); Matrix_Pop(&gGfxMatrix); - Option_DrawCardLabel(sOptionVSCardList[D_menu_801B91A8].unk_00); + Option_DrawCardLabel(sOptionVSCardList[sVsMenuCursor].tex); } void Option_DrawMenuLabel(void) { - Option_8019BDF0(); - Option_DrawMenuCard(sOptionCardList[D_menu_801B91A4].unk_38); + Option_Menu_Push(); + Option_DrawMenuCard(sOptionCardList[sMainMenuCursor].frame); Matrix_Pop(&gGfxMatrix); - Option_DrawCardLabel(sOptionCardList[D_menu_801B91A4].unk_00); + Option_DrawCardLabel(sOptionCardList[sMainMenuCursor].tex); } -void Option_DrawMenuCard(MenuContext_38 arg0) { +void Option_DrawMenuCard(OptionCardFrame arg0) { RCP_SetupDL(&gMasterDisp, SETUPDL_17); Lib_InitOrtho(&gMasterDisp); @@ -3489,10 +3518,11 @@ void Option_DrawMenuCard(MenuContext_38 arg0) { Lib_InitPerspective(&gMasterDisp); } -void Option_DrawMenuArwing(ArwingPosition arwing) { - if (D_menu_801B91BC != 0) { - Option_DrawArwing(arwing.x, arwing.y, D_menu_801B91F4, D_menu_801B9200, 90.0f, D_menu_801B91F8); - Option_DrawArwing(arwing.x + arwing.range, arwing.y, D_menu_801B91F4, D_menu_801B91FC, -90.0f, D_menu_801B91F8); +void Option_DrawMenuArwing(ArwingCursorPos arwing) { + if (sDrawCursor) { + Option_DrawArwing(arwing.x, arwing.y, D_menu_801B91F4, sLeftArwingCursorYrot, 90.0f, D_menu_801B91F8); + Option_DrawArwing(arwing.x + arwing.range, arwing.y, D_menu_801B91F4, sRightArwingCursorYrot, -90.0f, + D_menu_801B91F8); } } @@ -3501,7 +3531,7 @@ void Option_DrawArwing(f32 x, f32 y, f32 z, f32 yRot, f32 zRot, f32 scale) { f32 dirY; f32 dirZ; - Option_8019BE7C(D_menu_801B9224, D_menu_801B9228, 100.0f, &dirX, &dirY, &dirZ); + Option_SetMenuLightPos(sArwingLightXrot, sArwingLightYrot, 100.0f, &dirX, &dirY, &dirZ); Lights_SetOneLight(&gMasterDisp, dirX, dirY, dirZ, sArwingLightColR, sArwingLightColG, sArwingLightColB, sArwingLightAmbR, sArwingLightAmbG, sArwingLightAmbB); @@ -3523,69 +3553,69 @@ void Option_DrawArwing(f32 x, f32 y, f32 z, f32 yRot, f32 zRot, f32 scale) { Matrix_Pop(&gGfxMatrix); } -void Option_8019BDF0(void) { +void Option_Menu_Push(void) { Matrix_Push(&gGfxMatrix); Matrix_LookAt(gGfxMatrix, gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ, 0.0f, 1.0f, 0.0f, MTXF_APPLY); } -void Option_8019BE7C(f32 xRot, f32 yRot, f32 arg2, f32* arg3, f32* arg4, f32* arg5) { +void Option_SetMenuLightPos(f32 xRot, f32 yRot, f32 zSrc, f32* dirX, f32* dirY, f32* dirZ) { Vec3f dest; Vec3f src; src.x = 0.0f; src.y = 0.0f; - src.z = arg2; + src.z = zSrc; Matrix_RotateY(gCalcMatrix, M_DTOR * yRot, MTXF_NEW); Matrix_RotateX(gCalcMatrix, M_DTOR * xRot, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &src, &dest); - *arg3 = dest.x; - *arg4 = dest.y; - *arg5 = dest.z; + *dirX = dest.x; + *dirY = dest.y; + *dirZ = dest.z; } -void Option_8019BF34(void) { +void Option_CardLightning_Update(void) { s32 i; - f32 sp40; + f32 savedLightningXpos; if (D_menu_801B9214 != 0) { - sp40 = D_menu_801B9204; - Option_8019BDF0(); + savedLightningXpos = sLightningXpos; + Option_Menu_Push(); for (i = 0; i < 3; i++) { - D_menu_801B920C = RAND_FLOAT(0.5f); - D_menu_801B9210 = 0.5f; - Option_8019C04C(); - D_menu_801B9204 += 6.0f; + sLightningXScale = RAND_FLOAT(0.5f); + sLightningYScale = 0.5f; + Option_CardLightning_Draw(); + sLightningXpos += 6.0f; } Matrix_Pop(&gGfxMatrix); - D_menu_801B9204 = sp40; + sLightningXpos = savedLightningXpos; - if (D_menu_801B9204 < 23.0f) { - D_menu_801B9204 += 18.0f; + if (sLightningXpos < 23.0f) { + sLightningXpos += 18.0f; } else { - D_menu_801B9204 = 23.0f; + sLightningXpos = 23.0f; D_menu_801B9214 = 0; } } } -void Option_8019C04C(void) { +void Option_CardLightning_Draw(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_36); Lib_InitOrtho(&gMasterDisp); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_menu_801B9204, D_menu_801B9208, 0.0f, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, D_menu_801B920C, D_menu_801B9210, 1.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sLightningXpos, sLightningYpos, 0.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, sLightningXScale, sLightningYScale, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_OPT_8015DF0); + gSPDisplayList(gMasterDisp++, aLightningDL); Matrix_Pop(&gGfxMatrix); @@ -3594,42 +3624,43 @@ void Option_8019C04C(void) { //! TODO: Enum for Texture types -void Option_DrawCardLabel(OptionTexture tex) { +void Option_DrawCardLabel(OptionCardTexture tex) { if (!(tex.xScale <= 0.0f) && !(tex.yScale <= 0.0f)) { switch (tex.type) { case 1: RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, tex.red, tex.green, tex.blue, tex.alpha); - TextureRect_CI4(&gMasterDisp, tex.texture, tex.palette, tex.width, tex.height, tex.xPos, tex.yPos, - tex.xScale, tex.yScale); + Lib_TextureRect_CI4(&gMasterDisp, tex.texture, tex.palette, tex.width, tex.height, tex.xPos, tex.yPos, + tex.xScale, tex.yScale); break; case 2: RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, tex.red, tex.green, tex.blue, tex.alpha); - TextureRect_CI8(&gMasterDisp, tex.texture, tex.palette, tex.width, tex.height, tex.xPos, tex.yPos, - tex.xScale, tex.yScale); + Lib_TextureRect_CI8(&gMasterDisp, tex.texture, tex.palette, tex.width, tex.height, tex.xPos, tex.yPos, + tex.xScale, tex.yScale); break; case 0: RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, tex.red, tex.green, tex.blue, tex.alpha); - TextureRect_IA8(&gMasterDisp, tex.texture, tex.width, tex.height, tex.xPos, tex.yPos, tex.xScale, - tex.yScale); + Lib_TextureRect_IA8(&gMasterDisp, tex.texture, tex.width, tex.height, tex.xPos, tex.yPos, tex.xScale, + tex.yScale); break; case 3: RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, tex.red, tex.green, tex.blue, tex.alpha); - TextureRect_RGBA16(&gMasterDisp, tex.texture, tex.width, tex.height, tex.xPos, tex.yPos, tex.xScale, - tex.yScale); + Lib_TextureRect_RGBA16(&gMasterDisp, tex.texture, tex.width, tex.height, tex.xPos, tex.yPos, tex.xScale, + tex.yScale); break; } } } -bool Option_8019C418(s32* arg0, s32 arg1, bool arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7, - UnkStruct_D_menu_801B9250* arg8) { +// Input for vertical movement of the cursor +bool Option_Input_MoveCursor_Y(s32* arg0, s32 arg1, bool arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, + s32 controllerNum, StickInput* stickY) { s32 axis; s32 x; s32 y; @@ -3642,8 +3673,8 @@ bool Option_8019C418(s32* arg0, s32 arg1, bool arg2, s32 arg3, s32 arg4, s32 arg temp = *arg0; - x = gControllerPress[arg7].stick_x; - y = -gControllerPress[arg7].stick_y; + x = +gControllerPress[controllerNum].stick_x; + y = -gControllerPress[controllerNum].stick_y; if (arg2 == true) { axis = y; @@ -3661,7 +3692,7 @@ bool Option_8019C418(s32* arg0, s32 arg1, bool arg2, s32 arg3, s32 arg4, s32 arg axis = 0; } - if (!(arg8->unk_4)) { + if (!(stickY->unk_4)) { if (axis != 0) { if (axis > 0) { (*arg0)++; @@ -3685,18 +3716,18 @@ bool Option_8019C418(s32* arg0, s32 arg1, bool arg2, s32 arg3, s32 arg4, s32 arg } } - arg8->unk_4 = arg5 + arg8->unk_0; - if (arg8->unk_0 > 0) { - arg8->unk_0 -= arg6; + stickY->unk_4 = arg5 + stickY->unk_0; + if (stickY->unk_0 > 0) { + stickY->unk_0 -= arg6; } } else { - arg8->unk_4 = 0; - arg8->unk_0 = arg6; + stickY->unk_4 = 0; + stickY->unk_0 = arg6; } } - if (arg8->unk_4 > 0) { - arg8->unk_4--; + if (stickY->unk_4 > 0) { + stickY->unk_4--; } if (temp != *arg0) { @@ -3706,10 +3737,11 @@ bool Option_8019C418(s32* arg0, s32 arg1, bool arg2, s32 arg3, s32 arg4, s32 arg return ret; } -s32 Option_8019C5A0(s32* arg0) { +// Input for horizontal selection in DataSelect +s32 Option_Input_DataSelect_X(s32* arg0) { s32 ret = 0; s32 temp = *arg0; - s32 x = gControllerPress[gMainController].stick_x; + s32 x = +gControllerPress[gMainController].stick_x; s32 y = -gControllerPress[gMainController].stick_y; if ((y > 40) || (y < -40)) { @@ -3730,7 +3762,7 @@ s32 Option_8019C5A0(s32* arg0) { *arg0 = 1; ret = -1; } - D_menu_801B91A0 = OPTION_COUNT; + D_menu_801B91A0 = ARRAY_COUNT(sOptionCardList); } } @@ -3745,12 +3777,13 @@ s32 Option_8019C5A0(s32* arg0) { return ret; } -bool Option_8019C66C(f32* arg0, f32 arg1, f32 arg2, UnkStruct_D_menu_801B9250* arg3) { +// Input for horizontal selection in Sound menus +bool Option_Input_Sound_X(f32* arg0, f32 arg1, f32 arg2, StickInput* arg3) { f32 var_fv1; f32 temp2; bool var_a2 = false; f32 temp = *arg0; - s32 x = gControllerPress[gMainController].stick_x; + s32 x = +gControllerPress[gMainController].stick_x; s32 y = -gControllerPress[gMainController].stick_y; if ((y > 10) || (y < -10)) { @@ -3810,9 +3843,9 @@ bool Option_8019C66C(f32* arg0, f32 arg1, f32 arg2, UnkStruct_D_menu_801B9250* a return var_a2; } -void Option_8019C824(f32* arg0) { - if ((s32) Math_SmoothStepToF(arg0, D_menu_801B91E4, 0.5f, 100.0f, 1.0f) == 0.0f) { - if (*arg0 == 32.0f) { +void Option_Color_FlashRed(f32* color) { + if ((s32) Math_SmoothStepToF(color, D_menu_801B91E4, 0.5f, 100.0f, 1.0f) == 0.0f) { + if (*color == 32.0f) { D_menu_801B91E4 = 255.0f; } else { D_menu_801B91E4 = 32.0f; @@ -3820,100 +3853,104 @@ void Option_8019C824(f32* arg0) { } } -s32 Option_8019C8C4(void) { +s32 Option_RankInPos_Check(void) { s32 i; s32 j; s32 k; s32 m; - s32 ret; - s32 var_v0 = 0; - s32 var_a0 = 0; - s32 temp[10]; + s32 rankInPos; + s32 missionTeamStatus = 0; + s32 rankingTeamAlive = 0; + s32 rankingLives[10]; for (i = 0; i < gMissionNumber + 1; i++) { - var_v0 += ((gMissionTeamStatus[i] & 0x00FF0000) >> 16) & 1; - var_v0 += ((gMissionTeamStatus[i] & 0x0000FF00) >> 8) & 1; - var_v0 += (gMissionTeamStatus[i] & 0x000000FF) & 1; + missionTeamStatus += ((gMissionTeamStatus[i] & TEAMSTATUS_PEPPY) >> 16) & 1; + missionTeamStatus += ((gMissionTeamStatus[i] & TEAMSTATUS_SLIPPY) >> 8) & 1; + missionTeamStatus += (gMissionTeamStatus[i] & TEAMSTATUS_FALCO) & 1; } - for (i = 0; i < 10; i++) { - temp[i] = gSaveFile.save.data.unk_40[i]; + for (i = 0; i < RANKING_MAX; i++) { + rankingLives[i] = gSaveFile.save.data.rankingLives[i]; } - ret = -1; + rankInPos = -1; // Didn't get into the ranking - for (i = 0; i < 10; i++) { - if (D_menu_801B8220[i] <= gTotalHits) { - if (D_menu_801B8220[i] == gTotalHits) { - for (j = i; j < 10; j++) { - if (D_menu_801B8220[j] != gTotalHits) { - ret = j; + // Ranking + for (i = 0; i < RANKING_MAX; i++) { + if (gTotalHitsRanking[i] <= gTotalHits) { + if (gTotalHitsRanking[i] == gTotalHits) { + for (j = i; j < RANKING_MAX; j++) { + if (gTotalHitsRanking[j] != gTotalHits) { + rankInPos = j; break; } - if (temp[j] <= gLifeCount[gPlayerNum]) { - if (temp[j] == gLifeCount[gPlayerNum]) { - for (k = j; k < 10; k++) { - if ((temp[k] != gLifeCount[gPlayerNum]) || (D_menu_801B8220[k] != gTotalHits)) { - ret = k; + // Lives count + if (rankingLives[j] <= gLifeCount[gPlayerNum]) { + if (rankingLives[j] == gLifeCount[gPlayerNum]) { + for (k = j; k < RANKING_MAX; k++) { + if ((rankingLives[k] != gLifeCount[gPlayerNum]) || + (gTotalHitsRanking[k] != gTotalHits)) { + rankInPos = k; break; } - for (var_a0 = 0, m = 0; m < 3; m++) { - var_a0 += D_menu_801B81A8[k][m]; + // Team count + for (rankingTeamAlive = 0, m = 0; m < 3; m++) { + rankingTeamAlive += gRankingTeamAlive[k][m]; } - if (var_v0 > var_a0) { - ret = k; + if (missionTeamStatus > rankingTeamAlive) { + rankInPos = k; break; } } } else { - ret = j; + rankInPos = j; } break; } } } else { - ret = i; + rankInPos = i; } break; } } - return ret; + return rankInPos; } -void Option_8019CAE0(void) { - switch (D_menu_801B912C) { +void Option_NameEntry_Update(void) { + switch (sMainMenuState) { case 0: - Option_8019CBC0(); - D_menu_801B912C++; + Option_NameEntry_Setup(); + sMainMenuState++; break; case 1: - Option_8019CD54(); + Option_NameEntry_Select(); break; case 2: - Option_8019D624(); - Title_80188010(); + Option_Ranking_SaveData(); + Title_GetRankTotalHits(); D_menu_801B917C = 15; - D_menu_801B912C++; + sMainMenuState++; break; case 3: if (D_menu_801B917C == 0) { gBlurAlpha = 255; gDrawMode = DRAW_NONE; - D_menu_801B912C = 0; - D_menu_801B9124 = 300; + sMainMenuState = 0; + sMenuEntryState = OPTION_SCORE; } break; } } -void Option_8019CBC0(void) { +void Option_NameEntry_Setup(void) { s32 temp; s32 i; @@ -3924,8 +3961,8 @@ void Option_8019CBC0(void) { D_menu_801B9130 = 1; D_menu_801B9128 = 0; - D_menu_801B911C = 0.0f; - D_menu_801B9120 = 70.0f; + sNameEntryLightXrot = 0.0f; + sNameEntryLightYrot = 70.0f; temp = gSaveFile.save.data.unk_EA & 0xFF; @@ -3933,12 +3970,12 @@ void Option_8019CBC0(void) { D_menu_801B9098 = 3; D_menu_801B9138 = 1; - D_menu_801B9150[0][0] = gSaveFile.save.data.unk_18[temp][0] & 0xFF; - D_menu_801B9150[1][0] = gSaveFile.save.data.unk_18[temp][1] & 0xFF; - D_menu_801B9150[2][0] = gSaveFile.save.data.unk_18[temp][2] & 0xFF; + D_menu_801B9150[0][0] = gSaveFile.save.data.rankNameEntry[temp][0] & 0xFF; + D_menu_801B9150[1][0] = gSaveFile.save.data.rankNameEntry[temp][1] & 0xFF; + D_menu_801B9150[2][0] = gSaveFile.save.data.rankNameEntry[temp][2] & 0xFF; for (i = 0; i < 3; i++) { - D_menu_801B90A0[i] = Option_8019DCE8(D_menu_801B9150[i][0]); + D_menu_801B90A0[i] = Option_GetCharIndex(D_menu_801B9150[i][0]); D_menu_801B90B0[i] = 1; D_menu_801B9150[i][1] = 0; } @@ -3953,16 +3990,17 @@ void Option_8019CBC0(void) { D_menu_801B9150[i][1] = 0; } } - Option_80192598(); + Option_PlanetTextures_Setup(); } -void Option_8019CD54(void) { +void Option_NameEntry_Select(void) { switch (D_menu_801B9128) { case 0: - if ((D_menu_801B9138 == 0) && (Option_8019C418(&D_menu_801B90A0[D_menu_801B9098], 36, 0, 0, 50, 5, 10, - gMainController, &D_menu_801B9160[D_menu_801B9098]))) { + if ((D_menu_801B9138 == 0) && + (Option_Input_MoveCursor_Y(&D_menu_801B90A0[D_menu_801B9098], 36, 0, 0, 50, 5, 10, gMainController, + &D_menu_801B9160[D_menu_801B9098]))) { AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); - D_menu_801B9150[D_menu_801B9098][0] = D_menu_801AEF5C[D_menu_801B90A0[D_menu_801B9098]]; + D_menu_801B9150[D_menu_801B9098][0] = sCharMap[D_menu_801B90A0[D_menu_801B9098]]; D_menu_801B90D0[D_menu_801B9098] = 0.0f; D_menu_801B9100[D_menu_801B9098] = 0.0f; } @@ -4031,13 +4069,13 @@ void Option_8019CD54(void) { case 3: if (D_menu_801B917C == 0) { - D_menu_801B912C = 2; + sMainMenuState = 2; } break; } } -void Option_8019D118(void) { +void Option_NameEntry_Draw(void) { static f32 D_menu_801AF300[] = { -120.0f, 0.0f, 120.0f }; f32 dirX; f32 dirY; @@ -4067,22 +4105,22 @@ void Option_8019D118(void) { if (D_menu_801B9138 == 1) { if ((gGameFrameCount & 0x10) != 0) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); - TextureRect_IA8(&gMasterDisp, aTextEnd, 32, 8, D_menu_801AF30C[5], D_menu_801AF324[5], 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aTextEnd, 32, 8, D_menu_801AF30C[5], D_menu_801AF324[5], 1.0f, 1.0f); } } - Option_80197A3C(D_menu_801B9094, D_menu_801AF30C[4], D_menu_801AF324[4]); + Option_OrdinalNumbers_Draw(sRankInPos, D_menu_801AF30C[4], D_menu_801AF324[4]); RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - Graphics_DisplayLargeNumber(D_menu_801AF30C[3] - ((func_hud_8008BCBC(gTotalHits) - 1) * 13), D_menu_801AF324[3], + Graphics_DisplayLargeNumber(D_menu_801AF30C[3] - ((HUD_CountDigits(gTotalHits) - 1) * 13), D_menu_801AF324[3], gTotalHits); - Map_801A9FD4(1); + Map_801A9FD4(true); - Option_80192738(); + Option_ScrollPlanetTexture(); for (i = 0; i < 3; i++) { if (i == D_menu_801B9098) { @@ -4099,7 +4137,7 @@ void Option_8019D118(void) { } } - Option_8019BE7C(D_menu_801B911C, D_menu_801B9120, 127.0f, &dirX, &dirY, &dirZ); + Option_SetMenuLightPos(sNameEntryLightXrot, sNameEntryLightYrot, 127.0f, &dirX, &dirY, &dirZ); Lights_SetOneLight(&gMasterDisp, dirX, dirY, dirZ, 255, 255, 255, 65, 70, 48); @@ -4111,139 +4149,135 @@ void Option_8019D118(void) { for (i = 0; i < 3; i++) { if (gGameFrameCount & bitmask[i]) { - Option_8019DB20(D_menu_801B9150[i][0], D_menu_801AF300[i], 18.0f, -455.0f, 1.0f, - D_menu_801B90C0[i] + D_menu_801B90F0[i], D_menu_801B90D0[i] + D_menu_801B9100[i], - D_menu_801B90E0[i] + D_menu_801B9110[i]); + Option_3DFont_Draw(D_menu_801B9150[i][0], D_menu_801AF300[i], 18.0f, -455.0f, 1.0f, + D_menu_801B90C0[i] + D_menu_801B90F0[i], D_menu_801B90D0[i] + D_menu_801B9100[i], + D_menu_801B90E0[i] + D_menu_801B9110[i]); } } Matrix_Pop(&gGfxMatrix); } -void Option_8019D624(void) { +void Option_Ranking_SaveData(void) { s32 i; s32 j; - s32 var_t2; - s32 var_a3; - s32 var_a0; - s32 var_a1; - u8 sp142[11][3]; - u8 sp122[11]; - u8 sp116[11]; - u8 sp10A[11]; - Save_SubStruct_5E var_s0[11][7]; + s32 missionHitCount; + s32 originalRankIdx; + PlanetId planetId; + s32 currentRankIdx; + u8 rankNameEntry[11][3]; + u8 rankingRoute[11]; + u8 rankingLives[11]; + u8 rankingMedal[11]; + PlanetStats planetStats[11][7]; - sp142[10][0] = D_menu_801B9150[0][0]; - sp142[10][1] = D_menu_801B9150[1][0]; - sp142[10][2] = D_menu_801B9150[2][0]; + rankNameEntry[10][0] = D_menu_801B9150[0][0]; + rankNameEntry[10][1] = D_menu_801B9150[1][0]; + rankNameEntry[10][2] = D_menu_801B9150[2][0]; - sp122[10] = gMissionNumber + 1; + rankingRoute[10] = gMissionNumber + 1; - sp116[10] = gLifeCount[0]; + rankingLives[10] = gLifeCount[0]; - sp10A[10] = 0; + rankingMedal[10] = 0; - for (i = 0; i < 7; i++) { - sp10A[10] |= (gMissionMedal[i] << i); + for (i = 0; i < ROUTE_MAX; i++) { + rankingMedal[10] |= (gMissionMedal[i] << i); } - for (j = 0; j < 7; j++) { - var_s0[10][j].unk_C = 0; + for (j = 0; j < ROUTE_MAX; j++) { + planetStats[10][j].unk_C = 0; - var_t2 = gMissionHitCount[j]; + missionHitCount = gMissionHitCount[j]; - if (var_t2 > 255) { - var_t2 = var_t2 - 256; - var_s0[10][j].unk_C = 1; + if (missionHitCount > 255) { + missionHitCount -= 256; + planetStats[10][j].unk_C = 1; } - var_s0[10][j].unk_0 = var_t2; + planetStats[10][j].hitCount = missionHitCount; - var_a0 = gMissionPlanet[j]; + planetId = gMissionPlanet[j]; if (gMissionPlanet[j] == PLANET_VENOM) { - var_a0 = SAVE_SLOT_VENOM_1; + planetId = SAVE_SLOT_VENOM_1; } if (gMissionPlanet[j] == PLANET_SOLAR) { - var_a0 = SAVE_SLOT_SOLAR; + planetId = SAVE_SLOT_SOLAR; } - var_s0[10][j].unk_8 = var_a0; + planetStats[10][j].planetId = planetId; - var_s0[10][j].unk_D = ((gMissionTeamStatus[j] & 0x00FF0000) >> 16) & 1; - var_s0[10][j].unk_F = ((gMissionTeamStatus[j] & 0x0000FF00) >> 8) & 1; - var_s0[10][j].unk_E = (gMissionTeamStatus[j] & 0x000000FF) & 1; + planetStats[10][j].peppyAlive = ((gMissionTeamStatus[j] & TEAMSTATUS_PEPPY) >> 16) & 1; + planetStats[10][j].slippyAlive = ((gMissionTeamStatus[j] & TEAMSTATUS_SLIPPY) >> 8) & 1; + planetStats[10][j].falcoAlive = (gMissionTeamStatus[j] & TEAMSTATUS_FALCO) & 1; } - for (i = 0; i < 10; i++) { - sp142[i][0] = gSaveFile.save.data.unk_18[i][0]; - sp142[i][1] = gSaveFile.save.data.unk_18[i][1]; - sp142[i][2] = gSaveFile.save.data.unk_18[i][2]; - sp122[i] = gSaveFile.save.data.unk_36[i]; - sp116[i] = gSaveFile.save.data.unk_40[i]; - sp10A[i] = gSaveFile.save.data.unk_4A[i]; + for (i = 0; i < RANKING_MAX; i++) { + rankNameEntry[i][0] = gSaveFile.save.data.rankNameEntry[i][0]; + rankNameEntry[i][1] = gSaveFile.save.data.rankNameEntry[i][1]; + rankNameEntry[i][2] = gSaveFile.save.data.rankNameEntry[i][2]; + rankingRoute[i] = gSaveFile.save.data.rankingRoute[i]; + rankingLives[i] = gSaveFile.save.data.rankingLives[i]; + rankingMedal[i] = gSaveFile.save.data.rankingMedal[i]; - for (j = 0; j < 7; j++) { - var_s0[i][j].unk_0 = gSaveFile.save.data.unk_5E[i][j].unk_0; - var_s0[i][j].unk_8 = gSaveFile.save.data.unk_5E[i][j].unk_8; - var_s0[i][j].unk_C = gSaveFile.save.data.unk_5E[i][j].unk_C; - var_s0[i][j].unk_D = gSaveFile.save.data.unk_5E[i][j].unk_D; - var_s0[i][j].unk_E = gSaveFile.save.data.unk_5E[i][j].unk_E; - var_s0[i][j].unk_F = gSaveFile.save.data.unk_5E[i][j].unk_F; + for (j = 0; j < ROUTE_MAX; j++) { + planetStats[i][j].hitCount = gSaveFile.save.data.stats[i][j].hitCount; + planetStats[i][j].planetId = gSaveFile.save.data.stats[i][j].planetId; + planetStats[i][j].unk_C = gSaveFile.save.data.stats[i][j].unk_C; + planetStats[i][j].peppyAlive = gSaveFile.save.data.stats[i][j].peppyAlive; + planetStats[i][j].falcoAlive = gSaveFile.save.data.stats[i][j].falcoAlive; + planetStats[i][j].slippyAlive = gSaveFile.save.data.stats[i][j].slippyAlive; } } - for (var_a1 = 0, i = 0; i < 10; i++) { - if (i == D_menu_801B9094) { - var_a3 = var_a1; - var_a1 = 10; + for (currentRankIdx = 0, i = 0; i < RANKING_MAX; i++) { + if (i == sRankInPos) { + originalRankIdx = currentRankIdx; + currentRankIdx = 10; } - gSaveFile.save.data.unk_18[i][0] = sp142[var_a1][0]; - gSaveFile.save.data.unk_18[i][1] = sp142[var_a1][1]; - gSaveFile.save.data.unk_18[i][2] = sp142[var_a1][2]; - gSaveFile.save.data.unk_36[i] = sp122[var_a1]; - gSaveFile.save.data.unk_40[i] = sp116[var_a1]; - gSaveFile.save.data.unk_4A[i] = sp10A[var_a1]; + gSaveFile.save.data.rankNameEntry[i][0] = rankNameEntry[currentRankIdx][0]; + gSaveFile.save.data.rankNameEntry[i][1] = rankNameEntry[currentRankIdx][1]; + gSaveFile.save.data.rankNameEntry[i][2] = rankNameEntry[currentRankIdx][2]; + gSaveFile.save.data.rankingRoute[i] = rankingRoute[currentRankIdx]; + gSaveFile.save.data.rankingLives[i] = rankingLives[currentRankIdx]; + gSaveFile.save.data.rankingMedal[i] = rankingMedal[currentRankIdx]; - for (j = 0; j < 7; j++) { - gSaveFile.save.data.unk_5E[i][j].unk_0 = var_s0[var_a1][j].unk_0; - gSaveFile.save.data.unk_5E[i][j].unk_8 = var_s0[var_a1][j].unk_8; - gSaveFile.save.data.unk_5E[i][j].unk_C = var_s0[var_a1][j].unk_C; - gSaveFile.save.data.unk_5E[i][j].unk_D = var_s0[var_a1][j].unk_D; - gSaveFile.save.data.unk_5E[i][j].unk_E = var_s0[var_a1][j].unk_E; - gSaveFile.save.data.unk_5E[i][j].unk_F = var_s0[var_a1][j].unk_F; + for (j = 0; j < ROUTE_MAX; j++) { + gSaveFile.save.data.stats[i][j].hitCount = planetStats[currentRankIdx][j].hitCount; + gSaveFile.save.data.stats[i][j].planetId = planetStats[currentRankIdx][j].planetId; + gSaveFile.save.data.stats[i][j].unk_C = planetStats[currentRankIdx][j].unk_C; + gSaveFile.save.data.stats[i][j].peppyAlive = planetStats[currentRankIdx][j].peppyAlive; + gSaveFile.save.data.stats[i][j].falcoAlive = planetStats[currentRankIdx][j].falcoAlive; + gSaveFile.save.data.stats[i][j].slippyAlive = planetStats[currentRankIdx][j].slippyAlive; } - if (i == D_menu_801B9094) { - var_a1 = var_a3; + if (i == sRankInPos) { + currentRankIdx = originalRankIdx; } else { - var_a1++; + currentRankIdx++; } } - gSaveFile.save.data.unk_EA = D_menu_801B9094; + gSaveFile.save.data.unk_EA = sRankInPos; Save_Write(); } -void Option_8019DB20(s32 character, f32 x, f32 y, f32 z, f32 scale, f32 xAngle, f32 yAngle, f32 zAngle) { - static Gfx* D_menu_801AF33C[37] = { - D_FONT3D_90086F0, D_FONT3D_9007FD0, D_FONT3D_9007BB0, D_FONT3D_9000980, D_FONT3D_90075A0, D_FONT3D_90070C0, - D_FONT3D_9006AE0, D_FONT3D_9006500, D_FONT3D_90062D0, D_FONT3D_9001120, D_FONT3D_9005CA0, D_FONT3D_9005980, - D_FONT3D_9005380, D_FONT3D_9004E10, D_FONT3D_9000570, D_FONT3D_90014E0, D_FONT3D_9004920, D_FONT3D_9004230, - D_FONT3D_9003A30, D_FONT3D_9003620, D_FONT3D_9003230, D_FONT3D_9002EA0, D_FONT3D_9002890, D_FONT3D_90022A0, - D_FONT3D_9001E90, D_FONT3D_9001A10, D_FONT3D_900BB90, D_FONT3D_90001F0, D_FONT3D_900B580, D_FONT3D_900AF60, - D_FONT3D_900A870, D_FONT3D_900A290, D_FONT3D_9009CB0, D_FONT3D_9009990, D_FONT3D_9009280, D_FONT3D_9008C60, - D_FONT3D_9000000, +void Option_3DFont_Draw(s32 character, f32 x, f32 y, f32 z, f32 scale, f32 xAngle, f32 yAngle, f32 zAngle) { + static Gfx* s3DFont[37] = { + aFont3D_A, aFont3D_B, aFont3D_C, aFont3D_D, aFont3D_E, aFont3D_F, aFont3D_G, aFont3D_H, aFont3D_I, aFont3D_J, + aFont3D_K, aFont3D_L, aFont3D_M, aFont3D_N, aFont3D_O, aFont3D_P, aFont3D_Q, aFont3D_R, aFont3D_S, aFont3D_T, + aFont3D_U, aFont3D_V, aFont3D_W, aFont3D_X, aFont3D_Y, aFont3D_Z, aFont3D_0, aFont3D_1, aFont3D_2, aFont3D_3, + aFont3D_4, aFont3D_5, aFont3D_6, aFont3D_7, aFont3D_8, aFont3D_9, aFont3D_DOT, }; - s32 i; s32 charIndex = -1; - for (i = 0; D_menu_801AEF5C[i] != NULL; i++) { - if (character == D_menu_801AEF5C[i]) { + for (i = 0; sCharMap[i] != NULL; i++) { + if (character == sCharMap[i]) { charIndex = i; break; } @@ -4269,69 +4303,69 @@ void Option_8019DB20(s32 character, f32 x, f32 y, f32 z, f32 scale, f32 xAngle, Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801AF33C[charIndex]); + gSPDisplayList(gMasterDisp++, s3DFont[charIndex]); Matrix_Pop(&gGfxMatrix); } -s32 Option_8019DCE8(s32 arg0) { - s32 i = 0; +s32 Option_GetCharIndex(s32 character) { + s32 charIdx = 0; // 'for()' causes instruction reorder - while (D_menu_801AEF5C[i] != 0) { - if (D_menu_801AEF5C[i] == arg0) { + while (sCharMap[charIdx] != 0) { + if (sCharMap[charIdx] == character) { break; } - i++; + charIdx++; } - if (D_menu_801AEF5C[i] == 0) { - i = 0; + if (sCharMap[charIdx] == 0) { + charIdx = 0; } - return i; + return charIdx; } -void Option_8019DD44(void) { - switch (D_menu_801B912C) { +void Option_Score_Update(void) { + switch (sMainMenuState) { case 0: - Option_RankingInit(); + Option_Ranking_Setup(); - D_menu_801B93E4 = D_menu_801B9094; + D_menu_801B93E4 = sRankInPos; - if ((D_menu_801B9094 < 0) || (D_menu_801B9094 >= 10)) { + if ((sRankInPos < 0) || (sRankInPos >= 10)) { D_menu_801B93E4 = 0; } D_menu_801B91D4 = 114.0f - D_menu_801B93E4 * 130.0f; D_menu_801B91D8 = -6.0f + D_menu_801B93E4 * 130.0f; - sOptionCardList[3].unk_00.xPos = sOptionCardCurTextPosX[3]; - sOptionCardList[3].unk_00.yPos = 23.0f; - sOptionCardList[3].unk_00.xScale = 1.0f; - sOptionCardList[3].unk_00.yScale = 1.0f; - sOptionCardList[3].unk_58 = true; - sOptionCardList[3].unk_38.y = 90.0f; - sOptionCardList[3].unk_38.xScale = 0.4f; - sOptionCardList[3].unk_38.yScale = 0.21f; - sOptionCardList[3].unk_5C = true; - D_menu_801B912C++; + sOptionCardList[3].tex.xPos = sOptionCardCurTextPosX[3]; + sOptionCardList[3].tex.yPos = 23.0f; + sOptionCardList[3].tex.xScale = 1.0f; + sOptionCardList[3].tex.yScale = 1.0f; + sOptionCardList[3].drawTex = true; + sOptionCardList[3].frame.y = 90.0f; + sOptionCardList[3].frame.xScale = 0.4f; + sOptionCardList[3].frame.yScale = 0.21f; + sOptionCardList[3].drawFrame = true; + sMainMenuState++; break; case 1: - Option_8019DE74(); + Option_Score_Update2(); break; } } -void Option_8019DE74(void) { - Option_8019715C(); +void Option_Score_Update2(void) { + Option_Ranking2_Cursor(); if (gControllerPress[gMainController].button & (START_BUTTON | A_BUTTON | B_BUTTON | D_CBUTTONS | L_CBUTTONS | U_CBUTTONS)) { AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); gDrawMode = DRAW_NONE; - D_menu_801B912C = 0; + sMainMenuState = 0; if (gLastGameState == GSTATE_GAME_OVER) { gStarCount = 0; @@ -4341,21 +4375,21 @@ void Option_8019DE74(void) { } else if (gLastGameState == GSTATE_ENDING) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); - D_menu_801B9124 = 400; + sMenuEntryState = OPTION_INVOICE; } } } -void Option_8019DF64(void) { - Option_8019752C(); - Option_8019BDF0(); - Option_DrawMenuCard(sOptionCardList[3].unk_38); +void Option_Score_Draw(void) { + Option_RankingMenu2_Draw(); + Option_Menu_Push(); + Option_DrawMenuCard(sOptionCardList[3].frame); Matrix_Pop(&gGfxMatrix); - Option_DrawCardLabel(sOptionCardList[3].unk_00); + Option_DrawCardLabel(sOptionCardList[3].tex); } -void Option_InvoiceUpdate(void) { - switch (D_menu_801B912C) { +void Option_Invoice_Update(void) { + switch (sMainMenuState) { case 0: gStarCount = 0; gBgColor = 0; @@ -4365,7 +4399,7 @@ void Option_InvoiceUpdate(void) { gFillScreenAlpha = 0; D_menu_801B9090 = 0; D_menu_801B9178 = 30; - D_menu_801B912C++; + sMainMenuState++; break; case 1: @@ -4377,7 +4411,7 @@ void Option_InvoiceUpdate(void) { AUDIO_PLAY_SFX(NA_SE_VO_PEPPER_SURPRISE, gDefaultSfxSource, 4); } D_menu_801B9178 = 20; - D_menu_801B912C++; + sMainMenuState++; } break; @@ -4388,7 +4422,7 @@ void Option_InvoiceUpdate(void) { AUDIO_PLAY_SFX(NA_SE_STARFOX_SEAL, gDefaultSfxSource, 4); D_menu_801B9090 = 1; D_menu_801B9178 = 60; - D_menu_801B912C++; + sMainMenuState++; } break; @@ -4414,55 +4448,52 @@ void Option_InvoiceDraw(void) { Graphics_FillRectangle(&gMasterDisp, 25, 18, SCREEN_WIDTH - 25, SCREEN_HEIGHT - 18, 255, 255, 255, 255); RCP_SetupDL(&gMasterDisp, SETUPDL_78); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_CI4(&gMasterDisp, D_OPT_8000000, D_OPT_8000680, 128, 16, D_menu_801AF3D0[0], D_menu_801AF3F0[0], 1.0f, - 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, D_OPT_8000000, D_OPT_8000680, 128, 16, D_menu_801AF3D0[0], D_menu_801AF3F0[0], + 1.0f, 1.0f); - TextureRect_CI4(&gMasterDisp, D_OPT_8000000 + 128 * 16 / 2, D_OPT_8000680, 128, 10, D_menu_801AF3D0[0], - D_menu_801AF3F0[0] + 16.0f, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, D_OPT_8000000 + 128 * 16 / 2, D_OPT_8000680, 128, 10, D_menu_801AF3D0[0], + D_menu_801AF3F0[0] + 16.0f, 1.0f, 1.0f); for (i = 0; i < 2; i++) { - TextureRect_CI4(&gMasterDisp, D_OPT_80006A0 + (256 * 16 * i) / 2, D_OPT_80017A0, 256, 16, D_menu_801AF3D0[1], - D_menu_801AF3F0[1] + (16 * i), 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, D_OPT_80006A0 + (256 * 16 * i) / 2, D_OPT_80017A0, 256, 16, + D_menu_801AF3D0[1], D_menu_801AF3F0[1] + (16 * i), 1.0f, 1.0f); } - TextureRect_CI4(&gMasterDisp, D_OPT_80006A0 + 256 * 32 / 2, D_OPT_80017A0, 256, 2, D_menu_801AF3D0[1], - D_menu_801AF3F0[1] + 32.0f, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, D_OPT_80006A0 + 256 * 32 / 2, D_OPT_80017A0, 256, 2, D_menu_801AF3D0[1], + D_menu_801AF3F0[1] + 32.0f, 1.0f, 1.0f); for (i = 0; i < 4; i++) { - TextureRect_CI4(&gMasterDisp, D_OPT_80017C0 + (256 * 16 * i) / 2, D_OPT_80038C0, 256, 16, D_menu_801AF3D0[2], - D_menu_801AF3F0[2] + (16 * i), 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, D_OPT_80017C0 + (256 * 16 * i) / 2, D_OPT_80038C0, 256, 16, + D_menu_801AF3D0[2], D_menu_801AF3F0[2] + (16 * i), 1.0f, 1.0f); } - TextureRect_CI4(&gMasterDisp, D_OPT_80017C0 + 256 * 16 * 4 / 2, D_OPT_80038C0, 256, 2, D_menu_801AF3D0[2], - D_menu_801AF3F0[2] + 64.0f, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, D_OPT_80017C0 + 256 * 16 * 4 / 2, D_OPT_80038C0, 256, 2, D_menu_801AF3D0[2], + D_menu_801AF3F0[2] + 64.0f, 1.0f, 1.0f); RCP_SetupDL(&gMasterDisp, SETUPDL_76); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); for (i = 0; i < 30; i++) { - TextureRect_RGBA16(&gMasterDisp, D_OPT_800E170 + (188 * 2 * i), 188, 2, D_menu_801AF3D0[3], - D_menu_801AF3F0[3] + (2.0f * i), 1.0f, 1.0f); + Lib_TextureRect_RGBA16(&gMasterDisp, D_OPT_800E170 + (188 * 2 * i), 188, 2, D_menu_801AF3D0[3], + D_menu_801AF3F0[3] + (2.0f * i), 1.0f, 1.0f); } gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 0, 255); - - Graphics_DisplayLargeNumber(D_menu_801AF3D0[6] - ((func_hud_8008BCBC(gTotalHits) - 1) * 13), D_menu_801AF3F0[6], + Graphics_DisplayLargeNumber(D_menu_801AF3D0[6] - ((HUD_CountDigits(gTotalHits) - 1) * 13), D_menu_801AF3F0[6], gTotalHits); temp_a0 = gTotalHits * 64; - Graphics_DisplayLargeNumber(D_menu_801AF3D0[7] - ((func_hud_8008BCBC(temp_a0) - 1) * 13), D_menu_801AF3F0[7], + Graphics_DisplayLargeNumber(D_menu_801AF3D0[7] - ((HUD_CountDigits(temp_a0) - 1) * 13), D_menu_801AF3F0[7], temp_a0); if (D_menu_801B9090) { gDPSetPrimColor(gMasterDisp++, 0, 0, 120, 0, 0, 192); for (i = 0; i < 3; i++) { - TextureRect_IA8(&gMasterDisp, D_OPT_800D1F0 + (80 * 16 * i), 80, 16, D_menu_801AF3D0[5], - D_menu_801AF3F0[5] + (16.0f * i), 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_800D1F0 + (80 * 16 * i), 80, 16, D_menu_801AF3D0[5], + D_menu_801AF3F0[5] + (16.0f * i), 1.0f, 1.0f); } } diff --git a/src/overlays/ovl_menu/fox_title.c b/src/overlays/ovl_menu/fox_title.c index f2fa53c8..7cf21285 100644 --- a/src/overlays/ovl_menu/fox_title.c +++ b/src/overlays/ovl_menu/fox_title.c @@ -3,7 +3,9 @@ * System: Title * Description: Starfox Title Handler */ -// #include "prevent_bss_reordering.h" + +#include "prevent_bss_reordering.h" +#include "prevent_bss_reordering2.h" #include "global.h" #include "fox_title.h" #include "assets/ast_title.h" @@ -15,22 +17,22 @@ f32 D_menu_801B7BB8; f32 D_menu_801B7BBC; f32 D_menu_801B7BC0; f32 D_menu_801B7BC4; -f32 D_menu_801B7BC8; -f32 D_menu_801B7BCC; +f32 sTitleTextPrimCol; +f32 sTitleTextPrimColTarget; s32 D_menu_801B7BD0; -s32 D_menu_801B7BD4; +TitleLogoStates sTitleLogoState; s32 D_menu_801B7BD8; -f32 D_menu_801B7BDC; -f32 D_menu_801B7BE0; +f32 sStarfoxLogoAlpha; +f32 sInAlpha; s32 D_menu_801B7BE4; f32 D_menu_801B7BE8; s32 D_menu_801B7BEC; -s32 D_menu_801B7BF0; +TitleCardStates sTitleCardState; f32 D_menu_801B7BF8[10]; f32 D_menu_801B7C20[10]; f32 D_menu_801B7C48[10]; f32 D_menu_801B7C70[10]; -s32 D_menu_801B7C98; +s32 sMaxExplosions; s32 D_menu_801B7CA0[10]; s32 D_menu_801B7CC8[10]; s32 D_menu_801B7CF0[10]; @@ -43,30 +45,30 @@ f32 D_menu_801B7FC0[40]; f32 D_menu_801B8060[40]; s32 D_menu_801B8100; s32 D_menu_801B8108[40]; -s32 D_menu_801B81A8[10][3]; -s32 D_menu_801B8220[10]; -u8 D_menu_801B8248[10][4]; +s32 gRankingTeamAlive[10][3]; +s32 gTotalHitsRanking[10]; +u8 sRankNameEntry[10][4]; UNK_TYPE D_menu_801B8270[3]; -s32 D_menu_801B827C; -s32 D_menu_801B8280; -s32 D_menu_801B8284; -s32 D_menu_801B8288; +bool gGoToTitle; +bool sLevelStartState; +s32 sWipeHeight; +s32 sTitleRankMaxRecords; f32 D_menu_801B828C; f32 D_menu_801B8290; CameraPoint* D_menu_801B8294; s32 D_menu_801B8298; -f32 D_menu_801B829C; -f32 D_menu_801B82A0; -f32 D_menu_801B82A4; -s32 D_menu_801B82A8; -s32 D_menu_801B82AC; +f32 sTitleCamUpX; +f32 sTitleCamUpY; +f32 sTitleCamUpZ; +s32 sTimer1; +s32 sTimer2; s32 D_menu_801B82B0; -s32 D_menu_801B82B4; -s32 D_menu_801B82B8; +s32 sTimer3; +s32 sTitleMsgFrameCount; s32 D_menu_801B82BC; -s32 D_menu_801B82C0; -s32 D_menu_801B82C4; -f32 D_menu_801B82C8; +s32 sSceneState; +s32 sCutsceneState; +f32 sPassageWayZoffset; f32 D_menu_801B82CC; f32 D_menu_801B82D0; f32 D_menu_801B82D4; @@ -90,24 +92,24 @@ s32 D_menu_801B8318; s32 D_menu_801B831C; s32 D_menu_801B8320; s32 D_menu_801B8324; -f32 D_menu_801B8328; -f32 D_menu_801B832C; -f32 D_menu_801B8330; +f32 sAmbientR; +f32 sAmbientG; +f32 sAmbientB; s32 D_menu_801B8334; bool D_menu_801B8338; -f32 D_menu_801B833C; -s32 D_menu_801B8340; -s32 D_menu_801B8344; -s32 D_menu_801B8348; -UnkStruct_D_801B8350 D_menu_801B8350[4]; +f32 D_menu_801B833C; // Set but never unused +TitleTeam D_menu_801B8340; +bool sDrawTeamName; +bool D_menu_801B8348; +TitleTeamInfo sTitleTeam[4]; f32 D_menu_801B84D0; f32 D_menu_801B84D4; f32 D_menu_801B84D8[3]; -UnkStruct_D_menu_801B84E8 D_menu_801B84E8[4]; -UnkStruct_D_menu_801B8658 D_menu_801B8658; -UnkStruct_D_menu_801B8688 D_menu_801B8688; +TitleArwingInfo sTitleArwing[4]; +TitleGreatFoxInfo sTitleGreatFox; +TitleCorneria sTitleCorneria; s32 D_menu_801B869C; -s32 D_menu_801B86A0; +bool sDrawTakeOffSpace; s32 D_menu_801B86A4; f32 D_menu_801B86A8; f32 D_menu_801B86AC; @@ -123,14 +125,14 @@ f32 D_menu_801B86D0; f32 D_menu_801B86D4; f32 D_menu_801B86D8; f32 D_menu_801B86DC; -Vec3f D_menu_801B86E0[4][50]; -s32 D_menu_801B9040; -f32 D_menu_801B9044; +Vec3f sCharFrameTable[4][50]; +bool D_menu_801B9040; +f32 sTitleDeckLauncherZpos; f32 D_menu_801B9048; f32 D_menu_801B904C; f32 D_menu_801B9050; -f32 D_menu_801B9054; -f32 D_menu_801B9058; +f32 sTitleStarfoxLogoXpos; +f32 sTitleStarfoxLogoYpos; f32 D_menu_801B905C; f32 D_menu_801B9060; f32 D_menu_801B9064; @@ -143,34 +145,25 @@ f32 D_menu_801B907C; f32 D_menu_801B9080; f32 D_menu_801B9084; -typedef struct { - /* 0x00 */ Animation* unk_0; - /* 0x04 */ Animation* unk_4; - /* 0x08 */ Limb** skeleton; -} TitleAnimation; // size = 0x0C - -TitleAnimation D_menu_801ADA00[4] = { - { &D_TITLE_602F8E0, &D_TITLE_6035024, D_TITLE_602FBAC }, - { &D_TITLE_60305C0, &D_TITLE_60338DC, D_TITLE_603088C }, - { &D_TITLE_6031DB8, &D_TITLE_603531C, D_TITLE_6032084 }, - { &D_TITLE_6031120, &D_TITLE_6036278, D_TITLE_60313AC }, +TitleAnimation sTeamAnim[4] = { + { &aFoxRunningAnim, &aFoxAnim, aFoxSkel }, + { &aFalcoRunningAnim, &aFalcoAnim, aFalcoSkel }, + { &aPeppyRunningAnim, &aPeppyAnim, aPeppySkel }, + { &aSlippyRunningAnim, &aSlippyAnim, aSlippySkel }, }; -u16* D_menu_801ADA30[5] = { +u16* sGralPepperMsg[5] = { gMsg_ID_10, gMsg_ID_20, gMsg_ID_30, gMsg_ID_40, gMsg_ID_50, }; -void Title_Init(void) { +void Title_Setup(void) { gVIsPerFrame = 2; - gGameFrameCount = 0; - - gTitleState = 2; - + gTitleState = TITLE_UPDATE_ENTRY; gLastGameState = GSTATE_NONE; D_game_800D2870 = false; - gMainController = Title_80187ABC(); + gMainController = Title_CheckControllers(); gFillScreenRed = 0; gFillScreenGreen = 0; @@ -183,17 +176,17 @@ void Title_Init(void) { gBgColor = 0; - D_menu_801B8284 = 0; - D_menu_801B82A8 = 0; - D_menu_801B82AC = 0; + sWipeHeight = 0; + sTimer1 = 0; + sTimer2 = 0; - D_menu_801B833C = 0.0f; + D_menu_801B833C = 0; - D_menu_801B82C0 = 0; - D_menu_801B8280 = 0; + sSceneState = 0; + sLevelStartState = false; - D_menu_801B7BCC = 255.0f; - D_menu_801B7BC8 = 255.0f; + sTitleTextPrimColTarget = 255.0f; + sTitleTextPrimCol = 255.0f; Memory_FreeAll(); @@ -201,34 +194,34 @@ void Title_Init(void) { gStarfieldX = SCREEN_WIDTH; gStarfieldY = SCREEN_HEIGHT; - Title_80188010(); + Title_GetRankTotalHits(); - if ((gMainController == -1) || (D_menu_801B827C != 0)) { + if ((gMainController == -1) || gGoToTitle) { AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_23); - D_menu_801B82C4 = 0; - D_menu_801B827C = 0; + sCutsceneState = TITLE_SCREEN; + gGoToTitle = false; } else { AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_22); - D_menu_801B82C4 = 1; + sCutsceneState = TITLE_GREAT_FOX_TRAVELING; } gControllerLock = 30; } void Title_Main(void) { switch (gTitleState) { - case 0: + case TITLE_IDLE: if (gNextGameStateTimer == 0) { gDrawMode = DRAW_NONE; - gTitleState = 1; + gTitleState = TITLE_SETUP; } break; - case 1: + case TITLE_SETUP: gDrawMode = DRAW_NONE; - Title_Init(); + Title_Setup(); break; - case 2: + case TITLE_UPDATE_ENTRY: gDrawMode = DRAW_TITLE; Title_UpdateEntry(); break; @@ -237,115 +230,133 @@ void Title_Main(void) { } void Title_UpdateEntry(void) { - if (D_menu_801B82A8 > 0) { - D_menu_801B82A8--; + if (sTimer1 > 0) { + sTimer1--; + } + if (sTimer2 > 0) { + sTimer2--; } - if (D_menu_801B82AC > 0) { - D_menu_801B82AC--; - } - - switch (D_menu_801B82C4) { - case 7: - Title_80187B00(); + switch (sCutsceneState) { + case TITLE_RANKING: + Title_Ranking_Update(); break; - case 0: - Title_801888E8(); - Title_8019111C(); + case TITLE_SCREEN: + Title_Screen_Update(); + Title_Screen_Input(); break; - case 1: - Title_8018994C(); + case TITLE_GREAT_FOX_TRAVELING: + Title_CsGreatFoxTraveling_Update(); break; - case 2: - Title_8018A644(); + case TITLE_CS_TEAM_RUNNING: + Title_CsTeamRunning_Update(); break; - case 3: - Title_8018ACEC(); + case TITLE_GREAT_FOX_CLOSE_UP: + Title_CsGreatFoxCloseUp_Update(); break; - case 4: - Title_8018B5C4(); + case TITLE_TAKE_OFF: + Title_CsTakeOff_Update(); break; - case 5: - Title_8018C644(); + case TITLE_TAKE_OFF_SPACE: + Title_CsTakeOffSpace_Update(); break; } - Title_80190E64(); + Title_NextState_Check(); } void Title_Draw(void) { - switch (D_menu_801B82C4) { - case 7: - Title_80187CA8(); + switch (sCutsceneState) { + case TITLE_RANKING: + Title_Ranking_Draw(); break; - case 0: - Title_801918FC(); - Title_80189208(); + case TITLE_SCREEN: + Title_Matrix_Push(); + Title_Screen_Draw(); + Matrix_Pop(&gGfxMatrix); - Title_8018F680(); - Title_8018F85C(); - Title_8018FC14(); - Title_8018F8E4(); - Title_801918FC(); - Title_8018F77C(); + + Title_StarfoxLogo_Draw(); + Title_CopyrightSymbol_Draw(); + Title_Copyright_Draw(); + Title_PressStart_Draw(); + Title_Matrix_Push(); + Title_64Logo_Draw(); + Matrix_Pop(&gGfxMatrix); break; - case 1: - if (D_menu_801B8348 != 0) { - Title_801918FC(); - Title_8018A2F8(); + case TITLE_GREAT_FOX_TRAVELING: + if (D_menu_801B8348) { + Title_Matrix_Push(); + Title_CsGreatFoxTraveling_Draw(); + Matrix_Pop(&gGfxMatrix); + Radio_Draw(); - Title_80190C9C(); + Title_TitleCard_Draw(); } - Title_8018FF74(); - Title_801906A0(); + Title_SunGlare_Draw(); + Title_Logos_Draw(); break; - case 2: - Title_801918FC(); - Title_8018A990(); + case TITLE_CS_TEAM_RUNNING: + Title_Matrix_Push(); + Title_CsTeamRunning_Draw(); + Matrix_Pop(&gGfxMatrix); - if (D_menu_801B8344 != 0) { - Title_8018FD08(); + + if (sDrawTeamName) { + Title_TeamName_Draw(); } break; - case 3: - Title_801918FC(); - Title_8018B038(); + case TITLE_GREAT_FOX_CLOSE_UP: + Title_Matrix_Push(); + + Title_CsGreatFoxCloseUp_Draw(); + Matrix_Pop(&gGfxMatrix); break; - case 4: - Title_801918FC(); - Title_8018C114(); + case TITLE_TAKE_OFF: + Title_Matrix_Push(); + Title_CsTakeOff_Draw(); + Matrix_Pop(&gGfxMatrix); - Title_80190C9C(); + + Title_TitleCard_Draw(); break; - case 5: - Title_801918FC(); - Title_8018CB90(); + case TITLE_TAKE_OFF_SPACE: + Title_Matrix_Push(); + + Title_CsTakeOffSpace_Draw(); + Matrix_Pop(&gGfxMatrix); break; } - if (D_menu_801B8284 != 0) { + if (sWipeHeight != 0) { gFillScreenAlpha = 0; gFillScreenRed = 0; gFillScreenGreen = 0; gFillScreenBlue = 0; - Wipe_Draw(WIPE_VERTICAL, D_menu_801B8284); + Wipe_Draw(WIPE_VERTICAL, sWipeHeight); } +#if 0 + // @decomp Debug: + RCP_SetupDL(&gMasterDisp, SETUPDL_83); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); + Graphics_DisplaySmallNumber(80, 220, sSceneState); +#endif } -s32 Title_80187ABC(void) { - s32 ret = -1; +s32 Title_CheckControllers(void) { + s32 ret = -1; // No controller s32 i; - for (i = 0; i < 4; i++) { + for (i = 0; i < ARRAY_COUNT(gControllerPlugged); i++) { if (gControllerPlugged[i] == 1) { ret = i; break; @@ -355,14 +366,14 @@ s32 Title_80187ABC(void) { return ret; } -void Title_80187B00(void) { - switch (D_menu_801B82C0) { +void Title_Ranking_Update(void) { + switch (sSceneState) { case 0: - D_menu_801B8288 = 0; + sTitleRankMaxRecords = 0; gStarCount = 800; D_menu_801B82BC = 450; - D_menu_801B82C0++; - D_menu_801B82A8 = 20; + sSceneState++; + sTimer1 = 20; break; case 1: @@ -376,49 +387,50 @@ void Title_80187B00(void) { } else { gStarCount = 0; gRadioState = 0; - D_menu_801B82C0 = 0; + sSceneState = 0; gDrawMode = DRAW_NONE; AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_22); - D_menu_801B82C4 = 1; + sCutsceneState = TITLE_GREAT_FOX_TRAVELING; } - if (D_menu_801B8288 == 10) { + if (sTitleRankMaxRecords == 10) { D_menu_801B82BC--; } break; } - if ((D_menu_801B82A8 == 0) && ((gGameFrameCount % 8U) == 7) && (D_menu_801B8288 < 10)) { - D_menu_801B8288++; + if ((sTimer1 == 0) && ((gGameFrameCount % 8U) == 7) && (sTitleRankMaxRecords < 10)) { + sTitleRankMaxRecords++; } } -void Title_80187CA8(void) { - static char D_menu_801ADA44[] = "S T A R F O X R A N K I N G"; - s32 temp = 20; - s32 temp2 = 36; +void Title_Ranking_Draw(void) { + static char sSTARFOX_RANKING[] = "S T A R F O X R A N K I N G"; + s32 yPos = 20; + s32 xPos = 36; + // Ranking header RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); - - Graphics_DisplaySmallText(temp2, temp, 1.0f, 1.0f, D_menu_801ADA44); + Graphics_DisplaySmallText(xPos, yPos, 1.0f, 1.0f, sSTARFOX_RANKING); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - - TextureRect_IA8(&gMasterDisp, aSmallText_6, 16, 8, 148.0f, temp, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, aSmallText_4, 16, 8, 164, temp, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aSmallText_6, 16, 8, 148.0f, yPos, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aSmallText_4, 16, 8, 164, yPos, 1.0f, 1.0f); RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_IA8(&gMasterDisp, &aTextKanjiCOMPLETE[48 * 6], 16, 2, 36, 32, 15.2f, 1.0f); - Title_80187E28(); + // This Kanji texture was used to draw a white line. + Lib_TextureRect_IA8(&gMasterDisp, &aTextKanjiCOMPLETE[288], 16, 2, 36, 32, 15.2f, 1.0f); + + Title_RankingData_Draw(); } -void Title_80187E28(void) { - s32 temp; +void Title_RankingData_Draw(void) { + s32 yPos; s32 i; RCP_SetupDL(&gMasterDisp, SETUPDL_83); @@ -428,76 +440,73 @@ void Title_80187E28(void) { Graphics_DisplaySmallText(94, 38, 1.0f, 1.0f, "RANK"); Graphics_DisplaySmallText(146, 38, 1.0f, 1.0f, "NAME"); Graphics_DisplaySmallText(192, 38, 1.0f, 1.0f, "HITS"); - temp = 55; - for (i = 0; i < D_menu_801B8288; i++) { + for (yPos = 55, i = 0; i < sTitleRankMaxRecords; i++) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - - Graphics_DisplaySmallNumber(105 - ((func_hud_8008BCBC(i + 1) - 1) * 8), temp, i + 1); + Graphics_DisplaySmallNumber(105 - ((HUD_CountDigits(i + 1) - 1) * 8), yPos, i + 1); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); - - Graphics_DisplaySmallText(150, temp, 1.0f, 1.0f, &D_menu_801B8248[i][0]); + Graphics_DisplaySmallText(150, yPos, 1.0f, 1.0f, &sRankNameEntry[i][0]); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - - Graphics_DisplaySmallNumber(211 - ((func_hud_8008BCBC(D_menu_801B8220[i]) - 1) * 8), temp, D_menu_801B8220[i]); - temp += 17; + Graphics_DisplaySmallNumber(211 - ((HUD_CountDigits(gTotalHitsRanking[i]) - 1) * 8), yPos, + gTotalHitsRanking[i]); + yPos += 17; } } -s32 Title_80188010(void) { - s32 temp1; - s32 temp2; - s32 temp3; +s32 Title_GetRankTotalHits(void) { + s32 rankTotalHits; + s32 hitCount; + s32 rankingRoute; s32 i; s32 j; - for (i = 0; i < 10; i++) { - D_menu_801B8220[i] = 0; + for (i = 0; i < RANKING_MAX; i++) { + gTotalHitsRanking[i] = 0; for (j = 0; j < 3; j++) { - D_menu_801B81A8[i][j] = 0; + gRankingTeamAlive[i][j] = 0; } } - for (i = 0; i < 10; i++) { - D_menu_801B8248[i][0] = gSaveFile.save.data.unk_18[i][0] & 0xFF; - D_menu_801B8248[i][1] = gSaveFile.save.data.unk_18[i][1] & 0xFF; - D_menu_801B8248[i][2] = gSaveFile.save.data.unk_18[i][2] & 0xFF; - D_menu_801B8248[i][3] = '\0'; + for (i = 0; i < RANKING_MAX; i++) { + sRankNameEntry[i][0] = gSaveFile.save.data.rankNameEntry[i][0] & 0xFF; + sRankNameEntry[i][1] = gSaveFile.save.data.rankNameEntry[i][1] & 0xFF; + sRankNameEntry[i][2] = gSaveFile.save.data.rankNameEntry[i][2] & 0xFF; + sRankNameEntry[i][3] = '\0'; - temp3 = gSaveFile.save.data.unk_36[i]; + rankingRoute = gSaveFile.save.data.rankingRoute[i]; - for (j = 0; j < temp3; j++) { - temp2 = gSaveFile.save.data.unk_5E[i][j].unk_0; - temp2 |= (gSaveFile.save.data.unk_5E[i][j].unk_C & 1) * 256; + for (j = 0; j < rankingRoute; j++) { + hitCount = gSaveFile.save.data.stats[i][j].hitCount; + hitCount |= (gSaveFile.save.data.stats[i][j].unk_C & 1) << 8; - D_menu_801B8220[i] += temp2; + gTotalHitsRanking[i] += hitCount; - D_menu_801B81A8[i][0] += gSaveFile.save.data.unk_5E[i][j].unk_D & 1; - D_menu_801B81A8[i][1] += gSaveFile.save.data.unk_5E[i][j].unk_F & 1; - D_menu_801B81A8[i][2] += gSaveFile.save.data.unk_5E[i][j].unk_E & 1; + gRankingTeamAlive[i][0] += gSaveFile.save.data.stats[i][j].peppyAlive & 1; + gRankingTeamAlive[i][1] += gSaveFile.save.data.stats[i][j].slippyAlive & 1; + gRankingTeamAlive[i][2] += gSaveFile.save.data.stats[i][j].falcoAlive & 1; } } - temp1 = D_menu_801B8220[0]; + rankTotalHits = gTotalHitsRanking[0]; - for (i = 1; i < 10; i++) { - if (temp1 < D_menu_801B8220[i]) { - temp1 = D_menu_801B8220[i]; + for (i = 1; i < RANKING_MAX; i++) { + if (rankTotalHits < gTotalHitsRanking[i]) { + rankTotalHits = gTotalHitsRanking[i]; } } - return temp1; + return rankTotalHits; } -void Title_801881FC(void) { - bool var_a1 = true; +void Title_Screen_Setup(void) { + bool allExpertMedals = true; s32 i; - for (i = 0; i < 16; i++) { - if ((i != 14) && (!(gSaveFile.save.data.planet[i].expertMedal & 1))) { - var_a1 = false; + for (i = 0; i < ARRAY_COUNT(gSaveFile.save.data.planet); i++) { + if ((i != SAVE_SLOT_VENOM_1) && ((gSaveFile.save.data.planet[i].expertMedal & 1) == 0)) { + allExpertMedals = false; break; } } @@ -527,8 +536,8 @@ void Title_801881FC(void) { D_menu_801B831C = 6; D_menu_801B8320 = 1; D_menu_801B8324 = 11; - D_menu_801B9054 = 26.0f; - D_menu_801B9058 = 37.0f; + sTitleStarfoxLogoXpos = 26.0f; + sTitleStarfoxLogoYpos = 37.0f; D_menu_801B9068 = 1.5f; D_menu_801B906C = 3.0f; D_menu_801B905C = 124.0f; @@ -548,160 +557,164 @@ void Title_801881FC(void) { gCsCamAtY = 180.0f; gCsCamAtZ = 0.0f; - D_menu_801B829C = 0.0f; - D_menu_801B82A0 = 1.0f; - D_menu_801B82A4 = 0.0f; + sTitleCamUpX = 0.0f; + sTitleCamUpY = 1.0f; + sTitleCamUpZ = 0.0f; D_menu_801B84D4 = 0.5f; - D_menu_801B84E8[0].unk_00.x = -80.0f; - D_menu_801B84E8[0].unk_00.y = 220.0f; - D_menu_801B84E8[0].unk_00.z = -360.0f; - D_menu_801B84E8[0].unk_0C = 4.0f; - D_menu_801B84E8[0].unk_18 = 35.0f; - D_menu_801B84E8[0].unk_1C = -90.0f; - D_menu_801B84E8[0].unk_20 = -15.0f; - D_menu_801B84E8[0].unk_24 = 0.0f; - D_menu_801B84E8[0].unk_28 = 0.0f; - D_menu_801B84E8[0].unk_2C = 0.0f; - D_menu_801B84E8[0].unk_30 = 0.0f; - D_menu_801B84E8[0].unk_34 = 1; - D_menu_801B84E8[0].unk_3C = 0; - D_menu_801B84E8[0].unk_40 = 0; - D_menu_801B84E8[0].unk_48 = 0; + sTitleArwing[TEAM_FOX].pos.x = -80.0f; + sTitleArwing[TEAM_FOX].pos.y = 220.0f; + sTitleArwing[TEAM_FOX].pos.z = -360.0f; + sTitleArwing[TEAM_FOX].scale = 4.0f; + sTitleArwing[TEAM_FOX].xRot = 35.0f; + sTitleArwing[TEAM_FOX].yRot = -90.0f; + sTitleArwing[TEAM_FOX].zRot = -15.0f; + sTitleArwing[TEAM_FOX].cockpitGlassXrot = 0.0f; + sTitleArwing[TEAM_FOX].laserGunsYpos = 0.0f; + sTitleArwing[TEAM_FOX].teamFaceXrot = 0.0f; + sTitleArwing[TEAM_FOX].teamFaceYrot = 0.0f; + sTitleArwing[TEAM_FOX].drawFace = 1; + sTitleArwing[TEAM_FOX].unk_3C = 0; + sTitleArwing[TEAM_FOX].unk_40 = 0; + sTitleArwing[TEAM_FOX].drawShadow = 0; - if (var_a1) { - D_menu_801B8350[0].unk_00.x = -299.0f; - D_menu_801B8350[0].unk_00.y = -32.0f; - D_menu_801B8350[0].unk_00.z = 90.0f; - D_menu_801B8350[0].unk_48 = -9.660022f; - D_menu_801B8350[0].unk_4C = 60.330208f; - D_menu_801B8350[0].unk_50 = 0.00f; + if (allExpertMedals) { + sTitleTeam[TEAM_FOX].pos.x = -299.0f; + sTitleTeam[TEAM_FOX].pos.y = -32.0f; + sTitleTeam[TEAM_FOX].pos.z = 90.0f; + sTitleTeam[TEAM_FOX].unk_48 = -9.660022f; + sTitleTeam[TEAM_FOX].unk_4C = 60.330208f; + sTitleTeam[TEAM_FOX].unk_50 = 0.00f; } else { - D_menu_801B8350[0].unk_00.x = 33.00f; - D_menu_801B8350[0].unk_00.y = 23.00f; - D_menu_801B8350[0].unk_00.z = 4.00f; - D_menu_801B8350[0].unk_48 = -7.800007f; - D_menu_801B8350[0].unk_4C = 0.589999f; - D_menu_801B8350[0].unk_50 = 0.00f; + sTitleTeam[TEAM_FOX].pos.x = 33.00f; + sTitleTeam[TEAM_FOX].pos.y = 23.00f; + sTitleTeam[TEAM_FOX].pos.z = 4.00f; + sTitleTeam[TEAM_FOX].unk_48 = -7.800007f; + sTitleTeam[TEAM_FOX].unk_4C = 0.589999f; + sTitleTeam[TEAM_FOX].unk_50 = 0.00f; } - D_menu_801B8350[0].unk_30 = 0.0f; - D_menu_801B8350[0].unk_34 = 0.0f; - D_menu_801B8350[0].unk_28 = 0.0f; - D_menu_801B8350[0].unk_2C = 0.0f; - D_menu_801B8350[0].unk_14 = 150.0f; - D_menu_801B8350[0].unk_18 = 0.0f; - D_menu_801B8350[0].unk_1C = 1.0f; - D_menu_801B8350[0].unk_20 = 0.0f; - D_menu_801B8350[0].unk_24 = 0.0f; - D_menu_801B8350[0].unk_54 = 0; - D_menu_801B8350[0].unk_38 = 0.0f; - D_menu_801B8350[0].unk_3C = 0.0f; - D_menu_801B8350[0].unk_40 = 0.0f; - D_menu_801B8350[0].unk_44 = 0.0f; - D_menu_801B8350[0].unk_58 = 0; - D_menu_801B8350[0].unk_5C = 0; - if (var_a1) { - D_menu_801B8350[1].unk_00.x = -42.0f; - D_menu_801B8350[1].unk_00.y = -7.0f; - D_menu_801B8350[1].unk_00.z = -12.0f; - D_menu_801B8350[1].unk_48 = -2.009996f; - D_menu_801B8350[1].unk_4C = 56.90997f; - D_menu_801B8350[1].unk_50 = 0.00f; + sTitleTeam[TEAM_FOX].unk_30 = 0.0f; + sTitleTeam[TEAM_FOX].unk_34 = 0.0f; + sTitleTeam[TEAM_FOX].unk_28 = 0.0f; + sTitleTeam[TEAM_FOX].unk_2C = 0.0f; + sTitleTeam[TEAM_FOX].unk_14 = 150.0f; + sTitleTeam[TEAM_FOX].unk_18 = 0.0f; + sTitleTeam[TEAM_FOX].unk_1C = 1.0f; + sTitleTeam[TEAM_FOX].unk_20 = 0.0f; + sTitleTeam[TEAM_FOX].unk_24 = 0.0f; + sTitleTeam[TEAM_FOX].unk_54 = false; + sTitleTeam[TEAM_FOX].unk_38 = 0.0f; + sTitleTeam[TEAM_FOX].unk_3C = 0.0f; + sTitleTeam[TEAM_FOX].unk_40 = 0.0f; + sTitleTeam[TEAM_FOX].unk_44 = 0.0f; + sTitleTeam[TEAM_FOX].frameCount = 0; + sTitleTeam[TEAM_FOX].unk_5C = 0; + + if (allExpertMedals) { + sTitleTeam[TEAM_FALCO].pos.x = -42.0f; + sTitleTeam[TEAM_FALCO].pos.y = -7.0f; + sTitleTeam[TEAM_FALCO].pos.z = -12.0f; + sTitleTeam[TEAM_FALCO].unk_48 = -2.009996f; + sTitleTeam[TEAM_FALCO].unk_4C = 56.90997f; + sTitleTeam[TEAM_FALCO].unk_50 = 0.00f; } else { - D_menu_801B8350[1].unk_00.x = 147.0f; - D_menu_801B8350[1].unk_00.y = 18.0f; - D_menu_801B8350[1].unk_00.z = -32.0f; - D_menu_801B8350[1].unk_48 = -6.009995f; - D_menu_801B8350[1].unk_4C = 22.620012f; - D_menu_801B8350[1].unk_50 = 0.00f; + sTitleTeam[TEAM_FALCO].pos.x = 147.0f; + sTitleTeam[TEAM_FALCO].pos.y = 18.0f; + sTitleTeam[TEAM_FALCO].pos.z = -32.0f; + sTitleTeam[TEAM_FALCO].unk_48 = -6.009995f; + sTitleTeam[TEAM_FALCO].unk_4C = 22.620012f; + sTitleTeam[TEAM_FALCO].unk_50 = 0.00f; } - D_menu_801B8350[1].unk_30 = 0.0f; - D_menu_801B8350[1].unk_34 = 0.0f; - D_menu_801B8350[1].unk_28 = 0.0f; - D_menu_801B8350[1].unk_2C = 0.0f; - D_menu_801B8350[1].unk_14 = 180.0f; - D_menu_801B8350[1].unk_18 = 0.0f; - D_menu_801B8350[1].unk_1C = 1.0f; - D_menu_801B8350[1].unk_20 = 0.0f; - D_menu_801B8350[1].unk_24 = -4.0f; - D_menu_801B8350[1].unk_54 = 0; - D_menu_801B8350[1].unk_38 = 0.0f; - D_menu_801B8350[1].unk_3C = 0.0f; - D_menu_801B8350[1].unk_40 = 0.0f; - D_menu_801B8350[1].unk_44 = 0.0f; - D_menu_801B8350[1].unk_58 = 0; - D_menu_801B8350[1].unk_5C = 0; - if (var_a1) { - D_menu_801B8350[2].unk_00.x = 90.0f; - D_menu_801B8350[2].unk_00.y = 1.00f; - D_menu_801B8350[2].unk_00.z = -143.0f; - D_menu_801B8350[2].unk_48 = -0.500016f; - D_menu_801B8350[2].unk_4C = -33.31999f; - D_menu_801B8350[2].unk_50 = 0.00f; + sTitleTeam[TEAM_FALCO].unk_30 = 0.0f; + sTitleTeam[TEAM_FALCO].unk_34 = 0.0f; + sTitleTeam[TEAM_FALCO].unk_28 = 0.0f; + sTitleTeam[TEAM_FALCO].unk_2C = 0.0f; + sTitleTeam[TEAM_FALCO].unk_14 = 180.0f; + sTitleTeam[TEAM_FALCO].unk_18 = 0.0f; + sTitleTeam[TEAM_FALCO].unk_1C = 1.0f; + sTitleTeam[TEAM_FALCO].unk_20 = 0.0f; + sTitleTeam[TEAM_FALCO].unk_24 = -4.0f; + sTitleTeam[TEAM_FALCO].unk_54 = false; + sTitleTeam[TEAM_FALCO].unk_38 = 0.0f; + sTitleTeam[TEAM_FALCO].unk_3C = 0.0f; + sTitleTeam[TEAM_FALCO].unk_40 = 0.0f; + sTitleTeam[TEAM_FALCO].unk_44 = 0.0f; + sTitleTeam[TEAM_FALCO].frameCount = 0; + sTitleTeam[TEAM_FALCO].unk_5C = 0; + + if (allExpertMedals) { + sTitleTeam[TEAM_PEPPY].pos.x = 90.0f; + sTitleTeam[TEAM_PEPPY].pos.y = 1.00f; + sTitleTeam[TEAM_PEPPY].pos.z = -143.0f; + sTitleTeam[TEAM_PEPPY].unk_48 = -0.500016f; + sTitleTeam[TEAM_PEPPY].unk_4C = -33.31999f; + sTitleTeam[TEAM_PEPPY].unk_50 = 0.00f; } else { - D_menu_801B8350[2].unk_00.x = -143.0f; - D_menu_801B8350[2].unk_00.y = 22.00f; - D_menu_801B8350[2].unk_00.z = -57.0f; - D_menu_801B8350[2].unk_48 = -5.950006f; - D_menu_801B8350[2].unk_4C = -7.689997f; - D_menu_801B8350[2].unk_50 = 0.00f; + sTitleTeam[TEAM_PEPPY].pos.x = -143.0f; + sTitleTeam[TEAM_PEPPY].pos.y = 22.00f; + sTitleTeam[TEAM_PEPPY].pos.z = -57.0f; + sTitleTeam[TEAM_PEPPY].unk_48 = -5.950006f; + sTitleTeam[TEAM_PEPPY].unk_4C = -7.689997f; + sTitleTeam[TEAM_PEPPY].unk_50 = 0.00f; } - D_menu_801B8350[2].unk_30 = 0.0f; - D_menu_801B8350[2].unk_34 = 0.0f; - D_menu_801B8350[2].unk_28 = 0.0f; - D_menu_801B8350[2].unk_2C = 0.0f; - D_menu_801B8350[2].unk_14 = 130.0f; - D_menu_801B8350[2].unk_18 = 0.0f; - D_menu_801B8350[2].unk_1C = 1.0f; - D_menu_801B8350[2].unk_20 = 0.0f; - D_menu_801B8350[2].unk_24 = 0.0f; - D_menu_801B8350[2].unk_54 = 0; - D_menu_801B8350[2].unk_38 = 0.0f; - D_menu_801B8350[2].unk_3C = 0.0f; - D_menu_801B8350[2].unk_40 = 0.0f; - D_menu_801B8350[2].unk_44 = 0.0f; - D_menu_801B8350[2].unk_58 = 0; - D_menu_801B8350[2].unk_5C = 0; - if (var_a1) { - D_menu_801B8350[3].unk_00.x = 58.0f; - D_menu_801B8350[3].unk_00.y = -5.0f; - D_menu_801B8350[3].unk_00.z = 22.00f; - D_menu_801B8350[3].unk_48 = -17.899979f; - D_menu_801B8350[3].unk_4C = -8.890011f; - D_menu_801B8350[3].unk_50 = 0.00f; + sTitleTeam[TEAM_PEPPY].unk_30 = 0.0f; + sTitleTeam[TEAM_PEPPY].unk_34 = 0.0f; + sTitleTeam[TEAM_PEPPY].unk_28 = 0.0f; + sTitleTeam[TEAM_PEPPY].unk_2C = 0.0f; + sTitleTeam[TEAM_PEPPY].unk_14 = 130.0f; + sTitleTeam[TEAM_PEPPY].unk_18 = 0.0f; + sTitleTeam[TEAM_PEPPY].unk_1C = 1.0f; + sTitleTeam[TEAM_PEPPY].unk_20 = 0.0f; + sTitleTeam[TEAM_PEPPY].unk_24 = 0.0f; + sTitleTeam[TEAM_PEPPY].unk_54 = false; + sTitleTeam[TEAM_PEPPY].unk_38 = 0.0f; + sTitleTeam[TEAM_PEPPY].unk_3C = 0.0f; + sTitleTeam[TEAM_PEPPY].unk_40 = 0.0f; + sTitleTeam[TEAM_PEPPY].unk_44 = 0.0f; + sTitleTeam[TEAM_PEPPY].frameCount = 0; + sTitleTeam[TEAM_PEPPY].unk_5C = 0; + + if (allExpertMedals) { + sTitleTeam[TEAM_SLIPPY].pos.x = 58.0f; + sTitleTeam[TEAM_SLIPPY].pos.y = -5.0f; + sTitleTeam[TEAM_SLIPPY].pos.z = 22.00f; + sTitleTeam[TEAM_SLIPPY].unk_48 = -17.899979f; + sTitleTeam[TEAM_SLIPPY].unk_4C = -8.890011f; + sTitleTeam[TEAM_SLIPPY].unk_50 = 0.00f; } else { - D_menu_801B8350[3].unk_00.x = -50.0f; - D_menu_801B8350[3].unk_00.y = 25.0f; - D_menu_801B8350[3].unk_00.z = 15.0f; - D_menu_801B8350[3].unk_48 = -15.870002f; - D_menu_801B8350[3].unk_4C = -17.549995f; - D_menu_801B8350[3].unk_50 = 0.00f; + sTitleTeam[TEAM_SLIPPY].pos.x = -50.0f; + sTitleTeam[TEAM_SLIPPY].pos.y = 25.0f; + sTitleTeam[TEAM_SLIPPY].pos.z = 15.0f; + sTitleTeam[TEAM_SLIPPY].unk_48 = -15.870002f; + sTitleTeam[TEAM_SLIPPY].unk_4C = -17.549995f; + sTitleTeam[TEAM_SLIPPY].unk_50 = 0.00f; } - D_menu_801B8350[3].unk_30 = 0.0f; - D_menu_801B8350[3].unk_34 = 0.0f; - D_menu_801B8350[3].unk_28 = 0.0f; - D_menu_801B8350[3].unk_2C = 0.0f; - D_menu_801B8350[3].unk_14 = 140.0f; - D_menu_801B8350[3].unk_18 = 0.0f; - D_menu_801B8350[3].unk_1C = 1.0f; - D_menu_801B8350[3].unk_20 = 0.0f; - D_menu_801B8350[3].unk_24 = 0.0f; - D_menu_801B8350[3].unk_54 = 0; - D_menu_801B8350[3].unk_38 = 0.0f; - D_menu_801B8350[3].unk_3C = 0.0f; - D_menu_801B8350[3].unk_40 = 0.0f; - D_menu_801B8350[3].unk_44 = 0.0f; - D_menu_801B8350[3].unk_58 = 254; - D_menu_801B8350[3].unk_5C = 0; - for (i = 0; i < 4; i++) { - Animation_GetFrameData(D_menu_801ADA00[i].unk_4, - D_menu_801B8350[i].unk_58 % Animation_GetFrameCount(D_menu_801ADA00[i].unk_4), - D_menu_801B86E0[i]); + sTitleTeam[TEAM_SLIPPY].unk_30 = 0.0f; + sTitleTeam[TEAM_SLIPPY].unk_34 = 0.0f; + sTitleTeam[TEAM_SLIPPY].unk_28 = 0.0f; + sTitleTeam[TEAM_SLIPPY].unk_2C = 0.0f; + sTitleTeam[TEAM_SLIPPY].unk_14 = 140.0f; + sTitleTeam[TEAM_SLIPPY].unk_18 = 0.0f; + sTitleTeam[TEAM_SLIPPY].unk_1C = 1.0f; + sTitleTeam[TEAM_SLIPPY].unk_20 = 0.0f; + sTitleTeam[TEAM_SLIPPY].unk_24 = 0.0f; + sTitleTeam[TEAM_SLIPPY].unk_54 = false; + sTitleTeam[TEAM_SLIPPY].unk_38 = 0.0f; + sTitleTeam[TEAM_SLIPPY].unk_3C = 0.0f; + sTitleTeam[TEAM_SLIPPY].unk_40 = 0.0f; + sTitleTeam[TEAM_SLIPPY].unk_44 = 0.0f; + sTitleTeam[TEAM_SLIPPY].frameCount = 254; + sTitleTeam[TEAM_SLIPPY].unk_5C = 0; + + for (i = 0; i < ARRAY_COUNT(sTeamAnim); i++) { + Animation_GetFrameData(sTeamAnim[i].title, + sTitleTeam[i].frameCount % Animation_GetFrameCount(sTeamAnim[i].title), + sCharFrameTable[i]); } D_menu_801B86A4 = 0; @@ -710,19 +723,19 @@ void Title_801881FC(void) { AUDIO_PLAY_BGM(NA_BGM_TITLE); } -void Title_801888E8(void) { +void Title_Screen_Update(void) { f32 temp_fv1; s32 i; static f32 D_menu_801ADA64[4] = { 10.0f, 20.0f, 20.0f, 20.0f }; static f32 D_menu_801ADA74[4] = { 2.0f, 5.0f, 4.0f, 4.0f }; - switch (D_menu_801B82C0) { + switch (sSceneState) { case 0: - Title_801881FC(); + Title_Screen_Setup(); D_menu_801B82CC = 0.04f; D_menu_801B82D0 = 0.1f; D_menu_801B8340 = 0; - D_menu_801B82C0++; + sSceneState++; break; case 1: @@ -734,74 +747,74 @@ void Title_801888E8(void) { D_menu_801B82CC *= 1.04f; if (D_menu_801B86CC == 57.0f) { - D_menu_801B82C0++; + sSceneState++; } break; case 2: if (D_menu_801B82B0 == 0) { - D_menu_801B82C0++; + sSceneState++; } break; case 3: - D_menu_801B82A8 = (s32) (RAND_FLOAT(5.0f) + 1.0f) * 10; + sTimer1 = (s32) (RAND_FLOAT(5.0f) + 1.0f) * 10; temp_fv1 = D_menu_801B8340; - D_menu_801B8350[D_menu_801B8340].unk_5C = 0; - D_menu_801B8350[D_menu_801B8340].unk_18 = 0.0f; + sTitleTeam[D_menu_801B8340].unk_5C = 0; + sTitleTeam[D_menu_801B8340].unk_18 = 0.0f; if (D_menu_801B8340 == 2) { - D_menu_801B8350[D_menu_801B8340].unk_58 = 0; + sTitleTeam[D_menu_801B8340].frameCount = 0; } while (temp_fv1 == D_menu_801B8340) { D_menu_801B8340 = RAND_INT(4.0f); } - D_menu_801B8350[D_menu_801B8340].unk_5C = RAND_INT(6.0f) + 5; - D_menu_801B8350[D_menu_801B8340].unk_54 = 1; + sTitleTeam[D_menu_801B8340].unk_5C = RAND_INT(6.0f) + 5; + sTitleTeam[D_menu_801B8340].unk_54 = true; D_menu_801B82CC = 0.07f; - D_menu_801B82C0++; + sSceneState++; break; case 4: - if (D_menu_801B82A8 == 0) { - D_menu_801B8350[D_menu_801B8340].unk_54 = 0; - Math_SmoothStepToF(&D_menu_801B8350[D_menu_801B8340].unk_18, 0.0f, D_menu_801B82CC, 100.0f, 0.001f); + if (sTimer1 == 0) { + sTitleTeam[D_menu_801B8340].unk_54 = false; + Math_SmoothStepToF(&sTitleTeam[D_menu_801B8340].unk_18, 0.0f, D_menu_801B82CC, 100.0f, 0.001f); D_menu_801B82CC *= 1.07f; - if (D_menu_801B8350[D_menu_801B8340].unk_18 == 0.0f) { - D_menu_801B82C0 = 3; + if (sTitleTeam[D_menu_801B8340].unk_18 == 0.0f) { + sSceneState = 3; } } break; } - if (D_menu_801B8350[D_menu_801B8340].unk_54 != 0) { - if ((D_menu_801B8350[D_menu_801B8340].unk_18 + D_menu_801B8350[D_menu_801B8340].unk_1C) < 0.0f) { - D_menu_801B8350[D_menu_801B8340].unk_1C = D_menu_801ADA74[D_menu_801B8340]; + if (sTitleTeam[D_menu_801B8340].unk_54) { + if ((sTitleTeam[D_menu_801B8340].unk_18 + sTitleTeam[D_menu_801B8340].unk_1C) < 0.0f) { + sTitleTeam[D_menu_801B8340].unk_1C = D_menu_801ADA74[D_menu_801B8340]; } - if ((D_menu_801B8350[D_menu_801B8340].unk_18 + D_menu_801B8350[D_menu_801B8340].unk_1C) > + if ((sTitleTeam[D_menu_801B8340].unk_18 + sTitleTeam[D_menu_801B8340].unk_1C) > D_menu_801ADA64[D_menu_801B8340]) { - D_menu_801B8350[D_menu_801B8340].unk_1C = -D_menu_801ADA74[D_menu_801B8340]; + sTitleTeam[D_menu_801B8340].unk_1C = -D_menu_801ADA74[D_menu_801B8340]; } - D_menu_801B8350[D_menu_801B8340].unk_18 += D_menu_801B8350[D_menu_801B8340].unk_1C; + sTitleTeam[D_menu_801B8340].unk_18 += sTitleTeam[D_menu_801B8340].unk_1C; } if (D_menu_801B82B0 == 0) { if ((gGameFrameCount & 0x80) != 0) { - if (D_menu_801B8350[1].unk_20 + D_menu_801B8350[1].unk_24 < -20.0f) { - D_menu_801B8350[1].unk_24 = 4.0f; + if (sTitleTeam[TEAM_FALCO].unk_20 + sTitleTeam[TEAM_FALCO].unk_24 < -20.0f) { + sTitleTeam[TEAM_FALCO].unk_24 = 4.0f; } - if (D_menu_801B8350[1].unk_20 + D_menu_801B8350[1].unk_24 > 0.0f) { - D_menu_801B8350[1].unk_24 = -4.0f; + if (sTitleTeam[TEAM_FALCO].unk_20 + sTitleTeam[TEAM_FALCO].unk_24 > 0.0f) { + sTitleTeam[TEAM_FALCO].unk_24 = -4.0f; } - D_menu_801B8350[1].unk_20 += D_menu_801B8350[1].unk_24; + sTitleTeam[TEAM_FALCO].unk_20 += sTitleTeam[TEAM_FALCO].unk_24; } else { - Math_SmoothStepToF(&D_menu_801B8350[1].unk_20, 0.0f, 0.3f, 100.0f, 0.1f); + Math_SmoothStepToF(&sTitleTeam[TEAM_FALCO].unk_20, 0.0f, 0.3f, 100.0f, 0.1f); } } @@ -811,15 +824,15 @@ void Title_801888E8(void) { Math_SmoothStepToF(&D_menu_801B905C, 124.0f, D_menu_801B82D0, 100.0f, 0.0001f); Math_SmoothStepToF(&D_menu_801B9060, 242.0f, D_menu_801B82D0, 100.0f, 0.0001f); - for (i = 0; i < 4; i++) { - Math_SmoothStepToF(&D_menu_801B8350[i].unk_28, 0.0f, D_menu_801B82D0, 100.0f, 0.01f); - Math_SmoothStepToF(&D_menu_801B8350[i].unk_2C, 0.0f, D_menu_801B82D0, 100.0f, 0.01f); - Math_SmoothStepToF(&D_menu_801B8350[i].unk_30, 0.0f, D_menu_801B82D0, 100.0f, 0.01f); - Math_SmoothStepToF(&D_menu_801B8350[i].unk_34, 0.0f, D_menu_801B82D0, 100.0f, 0.01f); - Math_SmoothStepToF(&D_menu_801B8350[i].unk_38, 0.0f, D_menu_801B82D0, 100.0f, 0.01f); - Math_SmoothStepToF(&D_menu_801B8350[i].unk_3C, 0.0f, D_menu_801B82D0, 100.0f, 0.01f); - Math_SmoothStepToF(&D_menu_801B8350[i].unk_40, 0.0f, D_menu_801B82D0, 100.0f, 0.01f); - Math_SmoothStepToF(&D_menu_801B8350[i].unk_44, 0.0f, D_menu_801B82D0, 100.0f, 0.01f); + for (i = 0; i < ARRAY_COUNT(sTitleTeam); i++) { + Math_SmoothStepToF(&sTitleTeam[i].unk_28, 0.0f, D_menu_801B82D0, 100.0f, 0.01f); + Math_SmoothStepToF(&sTitleTeam[i].unk_2C, 0.0f, D_menu_801B82D0, 100.0f, 0.01f); + Math_SmoothStepToF(&sTitleTeam[i].unk_30, 0.0f, D_menu_801B82D0, 100.0f, 0.01f); + Math_SmoothStepToF(&sTitleTeam[i].unk_34, 0.0f, D_menu_801B82D0, 100.0f, 0.01f); + Math_SmoothStepToF(&sTitleTeam[i].unk_38, 0.0f, D_menu_801B82D0, 100.0f, 0.01f); + Math_SmoothStepToF(&sTitleTeam[i].unk_3C, 0.0f, D_menu_801B82D0, 100.0f, 0.01f); + Math_SmoothStepToF(&sTitleTeam[i].unk_40, 0.0f, D_menu_801B82D0, 100.0f, 0.01f); + Math_SmoothStepToF(&sTitleTeam[i].unk_44, 0.0f, D_menu_801B82D0, 100.0f, 0.01f); } D_menu_801B82D0 *= 1.1f; @@ -835,10 +848,10 @@ void Title_801888E8(void) { } } - D_menu_801B84E8->unk_18 += 0.6f; + sTitleArwing->xRot += 0.6f; - Title_80191320(1, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86A8, - D_menu_801B86AC, D_menu_801B86B0); + Title_SetCamUp3(1, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86A8, + D_menu_801B86AC, D_menu_801B86B0); Camera_SetStarfieldPos(gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ); gStarfieldScrollX -= 0.5f; @@ -858,16 +871,16 @@ void Title_801888E8(void) { gStarCount = 0; - D_menu_801B82C0 = 0; + sSceneState = 0; gDrawMode = DRAW_NONE; - D_menu_801B82C4 = 7; + sCutsceneState = TITLE_RANKING; } -void Title_80189208(void) { +void Title_Screen_Draw(void) { s32 i; - static s32 D_menu_801ADA84[4] = { 0, 1, 3, 2 }; + static TitleTeam D_menu_801ADA84[4] = { TEAM_FOX, TEAM_FALCO, TEAM_SLIPPY, TEAM_PEPPY }; gLight1R = D_menu_801B82F8; gLight1G = D_menu_801B82FC; @@ -884,11 +897,11 @@ void Title_80189208(void) { Math_SmoothStepToF(&D_menu_801B86CC, D_menu_801B86DC, 0.1f, 100.0f, 0.0001f); } - Title_80191674(D_menu_801B86C8, D_menu_801B86CC, 100.0f, &D_menu_801B82E0, &D_menu_801B82E4, &D_menu_801B82E8); + Title_SetLightRot(D_menu_801B86C8, D_menu_801B86CC, 100.0f, &D_menu_801B82E0, &D_menu_801B82E4, &D_menu_801B82E8); - for (i = 0; i < 4; i++) { - Title_8018EA78(D_menu_801ADA84[i]); - D_menu_801B8350[D_menu_801ADA84[i]].unk_58 += D_menu_801B8350[D_menu_801ADA84[i]].unk_5C; + for (i = 0; i < ARRAY_COUNT(D_menu_801ADA84); i++) { + Title_Team_Draw(D_menu_801ADA84[i]); + sTitleTeam[D_menu_801ADA84[i]].frameCount += sTitleTeam[D_menu_801ADA84[i]].unk_5C; } gLight1R = D_menu_801B8310; @@ -899,16 +912,16 @@ void Title_80189208(void) { gAmbientG = D_menu_801B8320; gAmbientB = D_menu_801B8324; - Title_80191674(D_menu_801B86D0, D_menu_801B86D4, 100.0f, &D_menu_801B82E0, &D_menu_801B82E4, &D_menu_801B82E8); + Title_SetLightRot(D_menu_801B86D0, D_menu_801B86D4, 100.0f, &D_menu_801B82E0, &D_menu_801B82E4, &D_menu_801B82E8); - Title_8018D2B8(0); + Title_Arwing_Draw(0); } -void Title_801894E8(void) { +void Title_CsGreatFox_Setup(void) { s32 i; gStarCount = 800; - D_menu_801B7C98 = 10; + sMaxExplosions = 10; for (i = 0; i < 10; i++) { D_menu_801B7BF8[i] = 10.0f + RAND_FLOAT(10.0f); @@ -931,9 +944,9 @@ void Title_801894E8(void) { D_menu_801B9074 = 70.0f; D_menu_801B9078 = 1.0f; D_menu_801B907C = 1.0f; - D_menu_801B7BDC = 0.0f; - D_menu_801B7BE0 = 0.0f; - D_menu_801B7BD4 = 0; + sStarfoxLogoAlpha = 0.0f; + sInAlpha = 0.0f; + sTitleLogoState = TITLE_LOGO_STARFOX_IN; D_menu_801B7BD8 = 0; D_menu_801B9080 = 0.0f; D_menu_801B9084 = 60.0f; @@ -954,21 +967,21 @@ void Title_801894E8(void) { gAmbientG = 4; gAmbientB = 10; - D_menu_801B8688.pos.y = 0.0f; - D_menu_801B8688.unk_0C = 0; - D_menu_801B8688.pos.x = -80.0f; - D_menu_801B8688.pos.z = 500.0f; - D_menu_801B8688.scale = 5.0f; + sTitleCorneria.pos.y = 0.0f; + sTitleCorneria.draw = false; + sTitleCorneria.pos.x = -80.0f; + sTitleCorneria.pos.z = 500.0f; + sTitleCorneria.scale = 5.0f; - D_menu_801B8348 = 0; + D_menu_801B8348 = false; - D_menu_801B8658.pos.x = 20.0f; - D_menu_801B8658.pos.y = 0.0f; - D_menu_801B8658.pos.z = 30.0f; - D_menu_801B8658.angleX = 0.0f; - D_menu_801B8658.angleY = 0.0f; - D_menu_801B8658.angleZ = 0.0f; - D_menu_801B8658.scale = 0.1f; + sTitleGreatFox.pos.x = 20.0f; + sTitleGreatFox.pos.y = 0.0f; + sTitleGreatFox.pos.z = 30.0f; + sTitleGreatFox.xRot = 0.0f; + sTitleGreatFox.yRot = 0.0f; + sTitleGreatFox.zRot = 0.0f; + sTitleGreatFox.scale = 0.1f; D_menu_801B86BC = 0.0f; D_menu_801B86C0 = 0.0f; @@ -978,31 +991,31 @@ void Title_801894E8(void) { D_menu_801B86B4 = 1500.0f; D_menu_801B86B8 = -100.0f; - D_menu_801B829C = 0.0f; - D_menu_801B82A0 = 1.0f; - D_menu_801B82A4 = 0.0f; + sTitleCamUpX = 0.0f; + sTitleCamUpY = 1.0f; + sTitleCamUpZ = 0.0f; - Title_801914AC(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, - D_menu_801B86B4, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86B8, D_menu_801B86A8, - D_menu_801B86AC); + Title_SetCamUp2(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, + D_menu_801B86B4, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86B8, D_menu_801B86A8, + D_menu_801B86AC); - D_menu_801B7BF0 = 0; + sTitleCardState = TITLE_CARD_NONE; AUDIO_PLAY_BGM(NA_BGM_OPENING); } -void Title_8018994C(void) { +void Title_CsGreatFoxTraveling_Update(void) { f32 temp; f32 temp2; - switch (D_menu_801B82C0) { + switch (sSceneState) { case 0: - Title_801894E8(); + Title_CsGreatFox_Setup(); D_menu_801B8294 = D_menu_801B6B40; D_menu_801B7BE8 = 1.0f; D_menu_801B82CC = 0.002f; - D_menu_801B82C0 = 100; - D_menu_801B82B8 = 0; + sSceneState = 100; + sTitleMsgFrameCount = 0; gRadioState = 0; gHideRadio = false; @@ -1013,36 +1026,36 @@ void Title_8018994C(void) { if (gFillScreenAlpha != 0) { gFillScreenAlpha -= 5; } else { - D_menu_801B82A8 = 19; - D_menu_801B82C0 = 1; + sTimer1 = 19; + sSceneState = 1; } break; case 1: - if (D_menu_801B82A8 == 0) { - temp2 = Math_SmoothStepToF(&D_menu_801B7BDC, 255.0f, D_menu_801B82CC, 100.0f, 1.0f); + if (sTimer1 == 0) { + temp2 = Math_SmoothStepToF(&sStarfoxLogoAlpha, 255.0f, D_menu_801B82CC, 100.0f, 1.0f); D_menu_801B82CC *= 1.08f; if (temp2 == 0.0f) { - D_menu_801B82A8 = 50; - D_menu_801B82AC = 85; + sTimer1 = 50; + sTimer2 = 85; D_menu_801B82D0 = 0.01f; D_menu_801B82CC = 0.002f; - D_menu_801B82C0++; + sSceneState++; } } break; case 2: - if (D_menu_801B82A8 == 0) { - Math_SmoothStepToF(&D_menu_801B7BDC, 0.0f, D_menu_801B82D0, 100.0f, 0.1f); + if (sTimer1 == 0) { + Math_SmoothStepToF(&sStarfoxLogoAlpha, 0.0f, D_menu_801B82D0, 100.0f, 0.1f); D_menu_801B82D0 *= 1.06f; - if (D_menu_801B82AC == 0) { - temp2 = Math_SmoothStepToF(&D_menu_801B7BE0, 255.0f, D_menu_801B82CC, 100.0f, 1.0f); + if (sTimer2 == 0) { + temp2 = Math_SmoothStepToF(&sInAlpha, 255.0f, D_menu_801B82CC, 100.0f, 1.0f); D_menu_801B82CC *= 1.08f; if (temp2 == 0.0f) { - D_menu_801B82A8 = 30; + sTimer1 = 30; D_menu_801B82D0 = 0.02f; - D_menu_801B82C0++; + sSceneState++; D_menu_801B7BD8 = 1; gFillScreenAlpha = 0; } @@ -1051,29 +1064,29 @@ void Title_8018994C(void) { break; case 3: - if (D_menu_801B82A8 == 0) { - Math_SmoothStepToF(&D_menu_801B7BE0, 0.0f, D_menu_801B82D0, 100.0f, 0.1f); + if (sTimer1 == 0) { + Math_SmoothStepToF(&sInAlpha, 0.0f, D_menu_801B82D0, 100.0f, 0.1f); D_menu_801B82D0 *= 1.07f; if (D_menu_801B7BB8 < 1200.0f) { D_menu_801B7BB8 += 10.0f; if (D_menu_801B7BB8 > 50.0f) { - D_menu_801B7BD4 = 1; - D_menu_801B7BDC += 1.8f; + sTitleLogoState = TITLE_LOGO_NINTENDO_64; + sStarfoxLogoAlpha += 1.8f; } } else { D_menu_801B7BD8 = 0; - D_menu_801B82C0++; + sSceneState++; } } break; case 4: - if (D_menu_801B7BDC < 255.0f) { - D_menu_801B7BDC += 1.0f; + if (sStarfoxLogoAlpha < 255.0f) { + sStarfoxLogoAlpha += 1.0f; } else { - D_menu_801B7BDC = 255.0f; - D_menu_801B82A8 = 70; - D_menu_801B82B4 = 0; + sStarfoxLogoAlpha = 255.0f; + sTimer1 = 70; + sTimer3 = 0; D_menu_801B82D4 = 0.02f; D_menu_801B82D8 = 0.00005f; D_menu_801B82DC = 0.02f; @@ -1088,34 +1101,34 @@ void Title_8018994C(void) { gCsCamAtY = D_menu_801B6B40[0].at.y; gCsCamAtZ = D_menu_801B6B40[0].at.z; - D_menu_801B82C0 = 10; + sSceneState = 10; } break; case 10: - if (D_menu_801B82B4 == 45) { - D_menu_801B7BF0 = 1; + if (sTimer3 == 45) { + sTitleCardState = TITLE_CARD_GREAT_FOX; } - if (D_menu_801B82B4 == 145) { - D_menu_801B7BF0 = 0; + if (sTimer3 == 145) { + sTitleCardState = TITLE_CARD_NONE; } - if (D_menu_801B82B8 == 638) { - AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, D_menu_801B8658.unk_24, 0); - AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, D_menu_801B8658.unk_24, 0); + if (sTitleMsgFrameCount == 638) { + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, sTitleGreatFox.sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, sTitleGreatFox.sfxSource, 0); Radio_PlayMessage(gMsg_ID_60, RCID_ROB64_TITLE); } - if (D_menu_801B82B8 == 838) { - Title_801919C4(D_menu_801ADA30, RCID_GEN_PEPPER_TITLE); + if (sTitleMsgFrameCount == 838) { + Title_Radio_PlayMessage(sGralPepperMsg, RCID_GEN_PEPPER_TITLE); } - if (D_menu_801B82A8 == 1) { - D_menu_801B8348 = 1; + if (sTimer1 == 1) { + D_menu_801B8348 = true; } - if (D_menu_801B82A8 != 0) { + if (sTimer1 != 0) { break; } @@ -1126,20 +1139,20 @@ void Title_8018994C(void) { D_menu_801B9074 -= 0.5f; } - temp = Math_SmoothStepToF(&D_menu_801B7BDC, 0.0f, D_menu_801B82DC, 100.0f, 0.1f); + temp = Math_SmoothStepToF(&sStarfoxLogoAlpha, 0.0f, D_menu_801B82DC, 100.0f, 0.1f); D_menu_801B82DC *= 1.06f; if (temp == 0.0f) { - D_menu_801B7BD4 = -1; + sTitleLogoState = TITLE_LOGO_NONE; } - Title_8018CC30(D_menu_801B8294, 12, D_menu_801B8290); + Title_Cutscene_SetCamera(D_menu_801B8294, 12, D_menu_801B8290); - Title_80191798(&D_menu_801B86A8, &D_menu_801B86AC); - Title_80191844(D_menu_801B86A8, D_menu_801B86AC); + Title_GetCamRot(&D_menu_801B86A8, &D_menu_801B86AC); + Title_SetCamUp(D_menu_801B86A8, D_menu_801B86AC); - if ((D_menu_801B82B8 > 960) && (D_menu_801B7BE8 > 0.0f)) { + if ((sTitleMsgFrameCount > 960) && (D_menu_801B7BE8 > 0.0f)) { D_menu_801B7BE8 -= 0.0022f; if (D_menu_801B7BE8 < 0.0f) { D_menu_801B7BE8 = 0.0f; @@ -1154,18 +1167,18 @@ void Title_8018994C(void) { Math_SmoothStepToF(&D_menu_801B86C8, -20.0f, D_menu_801B82D8, 100.0f, 0.0001f); Math_SmoothStepToF(&D_menu_801B86CC, -25.0f, D_menu_801B82D8, 100.0f, 0.0001f); - if (D_menu_801B82B4 > 550) { + if (sTimer3 > 550) { D_menu_801B82D8 += 0.0001f; } else { D_menu_801B82D8 += 0.000001f; } } - if (D_menu_801B82B4 == 260) { - D_menu_801B8688.unk_0C = 1; + if (sTimer3 == 260) { + sTitleCorneria.draw = true; } - if (D_menu_801B82B4 == 750) { + if (sTimer3 == 750) { gFillScreenAlpha = 0; gFillScreenRed = 0; gFillScreenGreen = 0; @@ -1174,38 +1187,38 @@ void Title_8018994C(void) { } if (gFillScreenAlpha == 255) { - Audio_KillSfxBySourceAndId(D_menu_801B8658.unk_24, NA_SE_GREATFOX_ENGINE); - Audio_KillSfxBySourceAndId(D_menu_801B8658.unk_24, NA_SE_GREATFOX_BURNER); + Audio_KillSfxBySourceAndId(sTitleGreatFox.sfxSource, NA_SE_GREATFOX_ENGINE); + Audio_KillSfxBySourceAndId(sTitleGreatFox.sfxSource, NA_SE_GREATFOX_BURNER); - D_menu_801B82C0 = 0; + sSceneState = 0; gDrawMode = DRAW_NONE; - D_menu_801B82C4 = 2; + sCutsceneState = TITLE_CS_TEAM_RUNNING; } - D_menu_801B82B4++; + sTimer3++; break; } - Title_801912A0(); - Title_80191674(D_menu_801B86C8, D_menu_801B86CC, 100.0f, &D_menu_801B82E0, &D_menu_801B82E4, &D_menu_801B82E8); + Title_ScreenFade_Update(); + Title_SetLightRot(D_menu_801B86C8, D_menu_801B86CC, 100.0f, &D_menu_801B82E0, &D_menu_801B82E4, &D_menu_801B82E8); if (D_menu_801B7BE8 != 0) { Camera_SetStarfieldPos(gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ); } gStarfieldScrollX -= D_menu_801B7BE8; - D_menu_801B82B8++; + sTitleMsgFrameCount++; } -void Title_8018A2F8(void) { - if (D_menu_801B8688.unk_0C != 0) { - Title_8018DF0C(-700.0f); +void Title_CsGreatFoxTraveling_Draw(void) { + if (sTitleCorneria.draw) { + Title_Corneria_Draw(-700.0f); } - Title_8018E058(); + Title_GreatFox_Draw(); } -void Title_8018A338(void) { +void Title_CsTeamRunning_Setup(void) { gStarCount = 0; D_menu_801B869C = 255; @@ -1215,15 +1228,14 @@ void Title_8018A338(void) { gFillScreenGreen = 0; gFillScreenBlue = 0; - D_menu_801B8344 = 0; + sDrawTeamName = false; D_menu_801B8334 = 0; D_menu_801B8338 = 1; - D_menu_801B8328 = D_menu_801B832C = D_menu_801B8330 = 155.0f; - - D_menu_801B8328 = 77.0f; - D_menu_801B832C = 77.0f; - D_menu_801B8330 = 77.0f; + sAmbientR = sAmbientG = sAmbientB = 155.0f; + sAmbientR = 77.0f; + sAmbientG = 77.0f; + sAmbientB = 77.0f; D_menu_801B86C8 = 0.0f; D_menu_801B86CC = -90.0f; @@ -1235,37 +1247,37 @@ void Title_8018A338(void) { D_menu_801B830C = 1.0f; D_menu_801B84D4 = 0.5f; - D_menu_801B8350[0].unk_00.x = -20.0f; - D_menu_801B8350[0].unk_00.y = 0.0f; - D_menu_801B8350[0].unk_00.z = -600.0f; - D_menu_801B8350[0].unk_0C = 0.0f; - D_menu_801B8350[0].unk_10 = 3.0f; - D_menu_801B8350[0].unk_58 = 14; - D_menu_801B8350[0].unk_5C = 5; + sTitleTeam[TEAM_FOX].pos.x = -20.0f; + sTitleTeam[TEAM_FOX].pos.y = 0.0f; + sTitleTeam[TEAM_FOX].pos.z = -600.0f; + sTitleTeam[TEAM_FOX].unk_0C = 0.0f; + sTitleTeam[TEAM_FOX].shadowScale = 3.0f; + sTitleTeam[TEAM_FOX].frameCount = 14; + sTitleTeam[TEAM_FOX].unk_5C = 5; - D_menu_801B8350[1].unk_00.x = -209.0f; - D_menu_801B8350[1].unk_00.y = 0.0f; - D_menu_801B8350[1].unk_00.z = -820.0f; - D_menu_801B8350[1].unk_0C = 0.0f; - D_menu_801B8350[1].unk_10 = 3.0f; - D_menu_801B8350[1].unk_58 = 0; - D_menu_801B8350[1].unk_5C = 5; + sTitleTeam[TEAM_FALCO].pos.x = -209.0f; + sTitleTeam[TEAM_FALCO].pos.y = 0.0f; + sTitleTeam[TEAM_FALCO].pos.z = -820.0f; + sTitleTeam[TEAM_FALCO].unk_0C = 0.0f; + sTitleTeam[TEAM_FALCO].shadowScale = 3.0f; + sTitleTeam[TEAM_FALCO].frameCount = 0; + sTitleTeam[TEAM_FALCO].unk_5C = 5; - D_menu_801B8350[2].unk_00.x = 62.0f; - D_menu_801B8350[2].unk_00.y = 0.0f; - D_menu_801B8350[2].unk_00.z = -813.0f; - D_menu_801B8350[2].unk_0C = 0.0f; - D_menu_801B8350[2].unk_10 = 3.0f; - D_menu_801B8350[2].unk_58 = 29; - D_menu_801B8350[2].unk_5C = 6; + sTitleTeam[TEAM_PEPPY].pos.x = 62.0f; + sTitleTeam[TEAM_PEPPY].pos.y = 0.0f; + sTitleTeam[TEAM_PEPPY].pos.z = -813.0f; + sTitleTeam[TEAM_PEPPY].unk_0C = 0.0f; + sTitleTeam[TEAM_PEPPY].shadowScale = 3.0f; + sTitleTeam[TEAM_PEPPY].frameCount = 29; + sTitleTeam[TEAM_PEPPY].unk_5C = 6; - D_menu_801B8350[3].unk_00.x = 183.0f; - D_menu_801B8350[3].unk_00.y = 0.0f; - D_menu_801B8350[3].unk_00.z = -990.0f; - D_menu_801B8350[3].unk_0C = 0.0f; - D_menu_801B8350[3].unk_10 = 3.0f; - D_menu_801B8350[3].unk_58 = 41; - D_menu_801B8350[3].unk_5C = 7; + sTitleTeam[TEAM_SLIPPY].pos.x = 183.0f; + sTitleTeam[TEAM_SLIPPY].pos.y = 0.0f; + sTitleTeam[TEAM_SLIPPY].pos.z = -990.0f; + sTitleTeam[TEAM_SLIPPY].unk_0C = 0.0f; + sTitleTeam[TEAM_SLIPPY].shadowScale = 3.0f; + sTitleTeam[TEAM_SLIPPY].frameCount = 41; + sTitleTeam[TEAM_SLIPPY].unk_5C = 7; D_menu_801B84D0 = -6000.0f; D_menu_801B86BC = 22.0f; @@ -1275,13 +1287,13 @@ void Title_8018A338(void) { D_menu_801B86AC = 7.0f; D_menu_801B86B4 = 400.0f; D_menu_801B86B8 = -100.0f; - D_menu_801B829C = 0.0f; - D_menu_801B82A0 = 1.0f; - D_menu_801B82A4 = 0.0f; + sTitleCamUpX = 0.0f; + sTitleCamUpY = 1.0f; + sTitleCamUpZ = 0.0f; - Title_801914AC(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, - D_menu_801B86B4, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86B8, D_menu_801B86A8, - D_menu_801B86AC); + Title_SetCamUp2(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, + D_menu_801B86B4, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86B8, D_menu_801B86A8, + D_menu_801B86AC); } CameraPoint D_menu_801ADA94[50] = { @@ -1321,23 +1333,23 @@ CameraPoint D_menu_801ADA94[50] = { { -357.60858f, 192.84035f, -1394.141f, 41.881878f, 129.81488f, -738.9043f }, }; -void Title_8018A644(void) { +void Title_CsTeamRunning_Update(void) { static s32 D_menu_801ADF44[] = { 63, 170, 268, 368 }; - switch (D_menu_801B82C0) { + switch (sSceneState) { case 0: - Title_8018A338(); + Title_CsTeamRunning_Setup(); AUDIO_PLAY_SFX(NA_SE_DEMO_SIREN, gDefaultSfxSource, 4); AUDIO_PLAY_SFX(NA_SE_DEMO_RUNNING, D_menu_801B84D8, 0); - D_menu_801B82B4 = 0; - D_menu_801B82C8 = 0.0f; + sTimer3 = 0; + sPassageWayZoffset = 0.0f; D_menu_801B7BEC = 0; - D_menu_801B82C0++; + sSceneState++; break; case 1: - if (D_menu_801B82B4 == 20) { + if (sTimer3 == 20) { D_menu_801B869C = 0; } @@ -1346,29 +1358,29 @@ void Title_8018A644(void) { } if (D_menu_801B84D0 == 0.0f) { - D_menu_801B82B4 = 0; + sTimer3 = 0; D_menu_801B8340 = 0; D_menu_801B8294 = D_menu_801ADA94; D_menu_801B8298 = 0; D_menu_801B828C = 0.0f; D_menu_801B8290 = 0.06f; - D_menu_801B82C0++; + sSceneState++; } - D_menu_801B82B4++; + sTimer3++; break; case 2: - Title_80191798(&D_menu_801B86A8, &D_menu_801B86AC); - Title_80191844(D_menu_801B86A8, D_menu_801B86AC); - Title_8018CC30(D_menu_801B8294, 34, D_menu_801B8290); + Title_GetCamRot(&D_menu_801B86A8, &D_menu_801B86AC); + Title_SetCamUp(D_menu_801B86A8, D_menu_801B86AC); + Title_Cutscene_SetCamera(D_menu_801B8294, 34, D_menu_801B8290); - if (D_menu_801B82B4 == D_menu_801ADF44[D_menu_801B8340]) { - D_menu_801B8344 = 1; - D_menu_801B82A8 = 40; - D_menu_801B82C0 = 3; + if (sTimer3 == D_menu_801ADF44[D_menu_801B8340]) { + sDrawTeamName = true; + sTimer1 = 40; + sSceneState = 3; } - if (D_menu_801B82B4 == 475) { + if (sTimer3 == 475) { D_menu_801B869C = 1; } @@ -1376,33 +1388,33 @@ void Title_8018A644(void) { Audio_KillSfxById(NA_SE_DEMO_SIREN); Audio_KillSfxBySourceAndId(D_menu_801B84D8, NA_SE_DEMO_RUNNING); - D_menu_801B82C0 = 0; + sSceneState = 0; gDrawMode = DRAW_NONE; - D_menu_801B82C4 = 3; + sCutsceneState = TITLE_GREAT_FOX_CLOSE_UP; } - D_menu_801B82B4++; + sTimer3++; break; case 3: - if (D_menu_801B82A8 == 0) { - D_menu_801B8344 = 0; - D_menu_801B82C0 = 2; + if (sTimer1 == 0) { + sDrawTeamName = false; + sSceneState = 2; D_menu_801B8340++; } break; } - Title_801912A0(); - Title_80191674(D_menu_801B86C8, D_menu_801B86CC, 100.0f, &D_menu_801B82E0, &D_menu_801B82E4, &D_menu_801B82E8); + Title_ScreenFade_Update(); + Title_SetLightRot(D_menu_801B86C8, D_menu_801B86CC, 100.0f, &D_menu_801B82E0, &D_menu_801B82E4, &D_menu_801B82E8); D_menu_801B7BEC++; } -void Title_8018A990(void) { +void Title_CsTeamRunning_Draw(void) { s32 i; - static UnkStruct_D_menu_801ADF54 D_menu_801ADF54[4] = { + static AmbientRGB sAmbientRGB[4] = { { 255.0f, 155.0f, 155.0f }, { 155.0f, 255.0f, 155.0f }, { 135.0f, 206.0f, 255.0f }, @@ -1412,13 +1424,13 @@ void Title_8018A990(void) { if ((gGameFrameCount % 8U) == 7) { if (D_menu_801B8338 != 0) { D_menu_801B8334 = (D_menu_801B8334 + 1) % 4U; - D_menu_801B8328 = D_menu_801ADF54[D_menu_801B8334].unk_0; - D_menu_801B832C = D_menu_801ADF54[D_menu_801B8334].unk_4; - D_menu_801B8330 = D_menu_801ADF54[D_menu_801B8334].unk_8; + sAmbientR = sAmbientRGB[D_menu_801B8334].r; + sAmbientG = sAmbientRGB[D_menu_801B8334].g; + sAmbientB = sAmbientRGB[D_menu_801B8334].b; } else { - D_menu_801B8328 = 155.0f; - D_menu_801B832C = 155.0f; - D_menu_801B8330 = 155.0f; + sAmbientR = 155.0f; + sAmbientG = 155.0f; + sAmbientB = 155.0f; } D_menu_801B8338 ^= 1; } @@ -1430,11 +1442,11 @@ void Title_8018A990(void) { } } - gAmbientR = D_menu_801B8328; - gAmbientG = D_menu_801B832C; - gAmbientB = D_menu_801B8330; + gAmbientR = sAmbientR; + gAmbientG = sAmbientG; + gAmbientB = sAmbientB; - Title_8018F438(); + Title_Passage_Draw(); gLight1R = D_menu_801B82F8; gLight1G = D_menu_801B82FC; @@ -1443,13 +1455,13 @@ void Title_8018A990(void) { gAmbientG = D_menu_801B8308; gAmbientB = D_menu_801B830C; - for (i = 0; i < 4; i++) { - Title_8018E67C(i); - D_menu_801B8350[i].unk_58 += D_menu_801B8350[i].unk_5C; + for (i = 0; i < ARRAY_COUNT(sTitleTeam); i++) { + Title_TeamRunning_Draw(i); + sTitleTeam[i].frameCount += sTitleTeam[i].unk_5C; } } -void Title_8018ABC0(void) { +void Title_CsGreatFoxCloseUp_Setup(void) { gStarCount = 800; D_menu_801B869C = 255; @@ -1475,28 +1487,28 @@ void Title_8018ABC0(void) { gCsCamAtY = 0.0f; gCsCamAtZ = 0.0f; - D_menu_801B829C = 0.0f; - D_menu_801B82A0 = 1.0f; - D_menu_801B82A4 = 0.0f; + sTitleCamUpX = 0.0f; + sTitleCamUpY = 1.0f; + sTitleCamUpZ = 0.0f; - D_menu_801B8658.pos.x = 0.0f; - D_menu_801B8658.pos.y = 0.0f; - D_menu_801B8658.pos.z = 0.0f; - D_menu_801B8658.angleX = 0.0f; - D_menu_801B8658.angleY = 0.0f; - D_menu_801B8658.angleZ = 0.0f; + sTitleGreatFox.pos.x = 0.0f; + sTitleGreatFox.pos.y = 0.0f; + sTitleGreatFox.pos.z = 0.0f; + sTitleGreatFox.xRot = 0.0f; + sTitleGreatFox.yRot = 0.0f; + sTitleGreatFox.zRot = 0.0f; } -void Title_8018ACEC(void) { - switch (D_menu_801B82C0) { +void Title_CsGreatFoxCloseUp_Update(void) { + switch (sSceneState) { case 0: - Title_8018ABC0(); - AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, D_menu_801B8658.unk_24, 0); - AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, D_menu_801B8658.unk_24, 0); + Title_CsGreatFoxCloseUp_Setup(); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, sTitleGreatFox.sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, sTitleGreatFox.sfxSource, 0); D_menu_801B82CC = 0.01f; - D_menu_801B82B4 = 0; - D_menu_801B82C0++; + sTimer3 = 0; + sSceneState++; break; case 1: @@ -1507,42 +1519,42 @@ void Title_8018ACEC(void) { Math_SmoothStepToF(&D_menu_801B86B0, 100.0f, D_menu_801B82CC, 100.0f, 0.0001f); D_menu_801B82CC *= 1.04f; - if (D_menu_801B82B4 == 50) { + if (sTimer3 == 50) { D_menu_801B869C = 1; } if (gFillScreenAlpha == 255) { - Audio_KillSfxBySourceAndId(D_menu_801B8658.unk_24, NA_SE_GREATFOX_ENGINE); - Audio_KillSfxBySourceAndId(D_menu_801B8658.unk_24, NA_SE_GREATFOX_BURNER); + Audio_KillSfxBySourceAndId(sTitleGreatFox.sfxSource, NA_SE_GREATFOX_ENGINE); + Audio_KillSfxBySourceAndId(sTitleGreatFox.sfxSource, NA_SE_GREATFOX_BURNER); gDrawMode = DRAW_NONE; - D_menu_801B82C0 = 0; - D_menu_801B82C4 = 4; + sSceneState = 0; + sCutsceneState = TITLE_TAKE_OFF; } - Title_801912A0(); - D_menu_801B82B4++; + Title_ScreenFade_Update(); + sTimer3++; break; } - Title_80191320(1, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86A8, - D_menu_801B86AC, D_menu_801B86B0); - Title_80191674(D_menu_801B86C8, D_menu_801B86CC, 100.0f, &D_menu_801B82E0, &D_menu_801B82E4, &D_menu_801B82E8); + Title_SetCamUp3(1, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86A8, + D_menu_801B86AC, D_menu_801B86B0); + Title_SetLightRot(D_menu_801B86C8, D_menu_801B86CC, 100.0f, &D_menu_801B82E0, &D_menu_801B82E4, &D_menu_801B82E8); Camera_SetStarfieldPos(gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ); gStarfieldScrollX += 2.0f; gStarfieldScrollY += 2.0f; } -void Title_8018B038(void) { - Title_8018E058(); +void Title_CsGreatFoxCloseUp_Draw(void) { + Title_GreatFox_Draw(); } -void Title_8018B058(void) { +void Title_CsTakeOff_Setup(void) { f32 var_fv0; s32 i; - D_menu_801B7C98 = 10; + sMaxExplosions = 10; for (i = 0; i < 10; i++) { D_menu_801B7BF8[i] = 10.0f + RAND_FLOAT(10.0f); @@ -1583,41 +1595,42 @@ void Title_8018B058(void) { gLight1R = 90; gLight1G = 75; gLight1B = 90; + gAmbientR = 45; gAmbientG = 34; gAmbientB = 56; - D_menu_801B8688.pos.x = 0.0f; - D_menu_801B8688.pos.y = 0.0f; - D_menu_801B8688.pos.z = 1000.0f; - D_menu_801B8688.scale = 2.0f; - D_menu_801B8688.unk_0C = 0; + sTitleCorneria.pos.x = 0.0f; + sTitleCorneria.pos.y = 0.0f; + sTitleCorneria.pos.z = 1000.0f; + sTitleCorneria.scale = 2.0f; + sTitleCorneria.draw = false; D_menu_801B7BE4 = 1; var_fv0 = -120.0f; - for (i = 0; i < 4; i++, var_fv0 += 75.0f) { - D_menu_801B84E8[i].unk_00.x = var_fv0; - D_menu_801B84E8[i].unk_00.y = 0.0f; - D_menu_801B84E8[i].unk_00.z = 0.0f; - D_menu_801B84E8[i].unk_0C = 0.5f; - D_menu_801B84E8[i].unk_18 = 0.0f; - D_menu_801B84E8[i].unk_1C = 0.0f; - D_menu_801B84E8[i].unk_20 = 0.0f; - D_menu_801B84E8[i].unk_24 = -60.0f; - D_menu_801B84E8[i].unk_28 = -10.0f; - D_menu_801B84E8[i].unk_2C = 0.0f; - D_menu_801B84E8[i].unk_30 = 0.0f; - D_menu_801B84E8[i].unk_34 = 4 - i; + for (i = 0; i < ARRAY_COUNT(sTitleArwing); i++, var_fv0 += 75.0f) { + sTitleArwing[i].pos.x = var_fv0; + sTitleArwing[i].pos.y = 0.0f; + sTitleArwing[i].pos.z = 0.0f; + sTitleArwing[i].scale = 0.5f; + sTitleArwing[i].xRot = 0.0f; + sTitleArwing[i].yRot = 0.0f; + sTitleArwing[i].zRot = 0.0f; + sTitleArwing[i].cockpitGlassXrot = -60.0f; + sTitleArwing[i].laserGunsYpos = -10.0f; + sTitleArwing[i].teamFaceXrot = 0.0f; + sTitleArwing[i].teamFaceYrot = 0.0f; + sTitleArwing[i].drawFace = 4 - i; - D_menu_801B84E8[i].unk_3C = 0; - D_menu_801B84E8[i].unk_40 = 0; - D_menu_801B84E8[i].unk_44 = 0.0f; - D_menu_801B84E8[i].unk_10 = 0.05f; + sTitleArwing[i].unk_3C = 0; + sTitleArwing[i].unk_40 = 0; + sTitleArwing[i].unk_44 = 0.0f; + sTitleArwing[i].vel = 0.05f; - D_menu_801B84E8[i].unk_48 = 1; - D_menu_801B84E8[i].unk_4C = 1; + sTitleArwing[i].drawShadow = true; + sTitleArwing[i].draw = true; } D_menu_801B86BC = 140.0f; @@ -1627,57 +1640,57 @@ void Title_8018B058(void) { D_menu_801B86AC = 90.0f; D_menu_801B86B4 = 90.0f; D_menu_801B86B8 = -50.0f; - D_menu_801B829C = 0.0f; - D_menu_801B82A0 = 1.0f; - D_menu_801B82A4 = 0.0f; + sTitleCamUpX = 0.0f; + sTitleCamUpY = 1.0f; + sTitleCamUpZ = 0.0f; - Title_801914AC(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, - D_menu_801B86B4, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86B8, D_menu_801B86A8, - D_menu_801B86AC); + Title_SetCamUp2(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, + D_menu_801B86B4, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86B8, D_menu_801B86A8, + D_menu_801B86AC); - D_menu_801B9044 = 25.0f; + sTitleDeckLauncherZpos = 25.0f; D_menu_801B9048 = 84.0f; D_menu_801B904C = -20.0f; D_menu_801B9050 = -33.0f; } -void Title_8018B5C4(void) { +void Title_CsTakeOff_Update(void) { s32 i; f32 temp[4]; - switch (D_menu_801B82C0) { + switch (sSceneState) { case 0: D_menu_801B7BEC = 0; - Title_8018B058(); + Title_CsTakeOff_Setup(); Audio_SetEnvSfxReverb(104); - D_menu_801B82A8 = 30; + sTimer1 = 30; - D_menu_801B84E8[3].unk_38 = 70; - D_menu_801B84E8[2].unk_38 = 102; - D_menu_801B84E8[1].unk_38 = 132; - D_menu_801B84E8[0].unk_38 = 171; + sTitleArwing[TEAM_SLIPPY].timer = 70; + sTitleArwing[TEAM_PEPPY].timer = 102; + sTitleArwing[TEAM_FALCO].timer = 132; + sTitleArwing[TEAM_FOX].timer = 171; D_menu_801B8294 = D_menu_801B6C60; D_menu_801B8298 = 0; D_menu_801B828C = 0.0f; D_menu_801B8290 = 0.024f; - D_menu_801B82C0 = 10; + sSceneState = 10; break; case 10: - if (D_menu_801B82A8 == 0) { + if (sTimer1 == 0) { AUDIO_PLAY_SFX(NA_SE_LIFT_UP, gDefaultSfxSource, 4); - D_menu_801B82B4 = 0; - D_menu_801B82C0 = 1; + sTimer3 = 0; + sSceneState = 1; } break; case 1: - Title_80191798(&D_menu_801B86A8, &D_menu_801B86AC); - Title_80191844(D_menu_801B86A8, D_menu_801B86AC); - Title_8018CC30(D_menu_801B8294, 10, D_menu_801B8290); + Title_GetCamRot(&D_menu_801B86A8, &D_menu_801B86AC); + Title_SetCamUp(D_menu_801B86A8, D_menu_801B86AC); + Title_Cutscene_SetCamera(D_menu_801B8294, 10, D_menu_801B8290); if (D_menu_801B9048 > 0.0f) { D_menu_801B9048 -= 0.41f; @@ -1687,52 +1700,52 @@ void Title_8018B5C4(void) { } } - if (D_menu_801B82B4 == 60) { - D_menu_801B7BF0 = 2; + if (sTimer3 == 60) { + sTitleCardState = TITLE_CARD_ARWING; } - for (i = 3; i >= 0; i--) { - if (D_menu_801B84E8[i].unk_38 > 0) { - D_menu_801B84E8[i].unk_38--; + for (i = ARRAY_COUNT(sTitleArwing) - 1; i >= 0; i--) { + if (sTitleArwing[i].timer > 0) { + sTitleArwing[i].timer--; } - if (D_menu_801B84E8[i].unk_38 == 1) { - AUDIO_PLAY_SFX(NA_SE_ARWING_HATCH, D_menu_801B84E8[i].unk_50, 0); + if (sTitleArwing[i].timer == 1) { + AUDIO_PLAY_SFX(NA_SE_ARWING_HATCH, sTitleArwing[i].sfxSource, 0); }; - if (D_menu_801B84E8[i].unk_38 == 0) { - Math_SmoothStepToF(&D_menu_801B84E8[i].unk_28, 0.0f, D_menu_801B84E8[i].unk_10, 100.0f, 0.01f); - temp[i] = Math_SmoothStepToF(&(D_menu_801B84E8[i].unk_24), 0.0f, D_menu_801B84E8[i].unk_10, 100.0f, + if (sTitleArwing[i].timer == 0) { + Math_SmoothStepToF(&sTitleArwing[i].laserGunsYpos, 0.0f, sTitleArwing[i].vel, 100.0f, 0.01f); + temp[i] = Math_SmoothStepToF(&(sTitleArwing[i].cockpitGlassXrot), 0.0f, sTitleArwing[i].vel, 100.0f, 0.01f); - D_menu_801B84E8[i].unk_10 *= 1.04f; + sTitleArwing[i].vel *= 1.04f; if (temp[i] == 0.0f) { - Audio_KillSfxBySourceAndId(D_menu_801B84E8[i].unk_50, NA_SE_ARWING_HATCH); + Audio_KillSfxBySourceAndId(sTitleArwing[i].sfxSource, NA_SE_ARWING_HATCH); } } } - if (D_menu_801B82B4 == 70) { + if (sTimer3 == 70) { D_menu_801B7BE4 = 0; - D_menu_801B84E8[0].unk_4C = 0; + sTitleArwing[TEAM_FOX].draw = false; } - if (D_menu_801B82B4 == 80) { - D_menu_801B84E8[1].unk_4C = 0; + if (sTimer3 == 80) { + sTitleArwing[TEAM_FALCO].draw = false; for (i = 0; i < 4; i++) { - D_menu_801B84E8[i].unk_48 = 0; + sTitleArwing[i].drawShadow = false; } } - if (D_menu_801B82B4 == 115) { - D_menu_801B84E8[0].unk_4C = 1; - D_menu_801B84E8[1].unk_4C = 1; + if (sTimer3 == 115) { + sTitleArwing[TEAM_FOX].draw = true; + sTitleArwing[TEAM_FALCO].draw = true; } - if (D_menu_801B82B4 == 226) { - D_menu_801B7BF0 = 0; + if (sTimer3 == 226) { + sTitleCardState = TITLE_CARD_NONE; - AUDIO_PLAY_SFX(NA_SE_ENGINE_START, D_menu_801B84E8[3].unk_50, 0); + AUDIO_PLAY_SFX(NA_SE_ENGINE_START, sTitleArwing[TEAM_SLIPPY].sfxSource, 0); D_menu_801B86BC = 105.0f; D_menu_801B86C0 = 0.0f; @@ -1742,13 +1755,13 @@ void Title_8018B5C4(void) { D_menu_801B86B4 = 36.0f; D_menu_801B86B8 = -70.0f; - Title_801914AC(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, - D_menu_801B86B4, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86B8, D_menu_801B86A8, - D_menu_801B86AC); + Title_SetCamUp2(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &gCsCamEyeX, &gCsCamEyeY, + &gCsCamEyeZ, D_menu_801B86B4, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86B8, + D_menu_801B86A8, D_menu_801B86AC); - D_menu_801B82B4 = 0; + sTimer3 = 0; - D_menu_801B84E8[3].unk_44 = 0.0f; + sTitleArwing[TEAM_SLIPPY].unk_44 = 0.0f; D_menu_801B86C8 = 60.0f; D_menu_801B86CC = 0.0f; @@ -1764,25 +1777,25 @@ void Title_8018B5C4(void) { gAmbientG = 24; gAmbientB = 46; - D_menu_801B82C0++; + sSceneState++; } - D_menu_801B82B4++; + sTimer3++; break; case 2: - if (D_menu_801B82B4 == 30) { - D_menu_801B84E8[3].unk_40 = 1; + if (sTimer3 == 30) { + sTitleArwing[TEAM_SLIPPY].unk_40 = 1; } - if (D_menu_801B82B4 == 40) { - D_menu_801B84E8[3].unk_3C = 1; + if (sTimer3 == 40) { + sTitleArwing[TEAM_SLIPPY].unk_3C = 1; } - if (D_menu_801B82B4 > 40) { - D_menu_801B84E8[3].unk_44 += 0.002f; + if (sTimer3 > 40) { + sTitleArwing[TEAM_SLIPPY].unk_44 += 0.002f; - if (D_menu_801B84E8[3].unk_44 > 0.2f) { - D_menu_801B84E8[3].unk_44 = 0.2f; + if (sTitleArwing[TEAM_SLIPPY].unk_44 > 0.2f) { + sTitleArwing[TEAM_SLIPPY].unk_44 = 0.2f; } Math_SmoothStepToF(&D_menu_801B82EC, 240.0f, 0.06f, 2.0f, 0.01f); @@ -1794,111 +1807,111 @@ void Title_8018B5C4(void) { gLight1B = D_menu_801B82F4; } - if ((D_menu_801B82B4 > 60) && (gFillScreenAlpha < 255)) { + if ((sTimer3 > 60) && (gFillScreenAlpha < 255)) { gFillScreenAlpha++; } if (gFillScreenAlpha == 128) { - D_menu_801B82A8 = 7; - D_menu_801B84E8[3].unk_3C = 0; - D_menu_801B84E8[3].unk_40 = 0; + sTimer1 = 7; + sTitleArwing[TEAM_SLIPPY].unk_3C = 0; + sTitleArwing[TEAM_SLIPPY].unk_40 = 0; gFillScreenAlpha = 255; - D_menu_801B82C0++; + sSceneState++; } - if (D_menu_801B82B4 == 50) { - D_menu_801B84E8[0].unk_4C = 0; + if (sTimer3 == 50) { + sTitleArwing[TEAM_FOX].draw = false; } - if (D_menu_801B82B4 == 60) { - D_menu_801B84E8[1].unk_4C = 0; + if (sTimer3 == 60) { + sTitleArwing[TEAM_FALCO].draw = false; } Math_SmoothStepToF(&D_menu_801B86B4, 16.0f, 0.01f, 100.0f, 0.01f); Math_SmoothStepToF(&D_menu_801B86AC, 138.0f, 0.01f, 100.0f, 0.01f); - Title_801914AC(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, - D_menu_801B86B4, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86B8, D_menu_801B86A8, - D_menu_801B86AC); - D_menu_801B82B4++; + Title_SetCamUp2(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, + D_menu_801B86B4, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86B8, D_menu_801B86A8, + D_menu_801B86AC); + sTimer3++; break; case 3: - if (D_menu_801B82A8 == 0) { - Audio_KillSfxBySourceAndId(D_menu_801B84E8[3].unk_50, NA_SE_ENGINE_START); - AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, D_menu_801B84E8[3].unk_50, 0); + if (sTimer1 == 0) { + Audio_KillSfxBySourceAndId(sTitleArwing[TEAM_SLIPPY].sfxSource, NA_SE_ENGINE_START); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, sTitleArwing[TEAM_SLIPPY].sfxSource, 0); - D_menu_801B82A8 = 4; + sTimer1 = 4; gFillScreenAlpha = 0; for (i = 0; i < 4; i++) { - D_menu_801B84E8[i].unk_3C = 1; - D_menu_801B84E8[i].unk_44 = 0.9f; + sTitleArwing[i].unk_3C = 1; + sTitleArwing[i].unk_44 = 0.9f; } - D_menu_801B82B4 = 0; + sTimer3 = 0; gStarCount = 800; - D_menu_801B82C0++; + sSceneState++; } break; case 4: - if (D_menu_801B82A8 == 0) { - D_menu_801B84E8[3].unk_44 = 1.2f; + if (sTimer1 == 0) { + sTitleArwing[TEAM_SLIPPY].unk_44 = 1.2f; - Math_SmoothStepToF(&D_menu_801B84E8[3].unk_00.z, 900.0f, 0.06f, 100.0f, 0.0001f); + Math_SmoothStepToF(&sTitleArwing[TEAM_SLIPPY].pos.z, 900.0f, 0.06f, 100.0f, 0.0001f); Math_SmoothStepToF(&D_menu_801B86AC, 154.0f, 0.2f, 100.0f, 0.01f); Math_SmoothStepToF(&D_menu_801B86A8, -5.0f, 0.2f, 100.0f, 0.01f); Math_SmoothStepToF(&D_menu_801B86BC, 100.0f, 0.2f, 100.0f, 0.01f); Math_SmoothStepToF(&D_menu_801B86B4, 40.0f, 0.2f, 100.0f, 0.01f); - Title_801914AC(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, - D_menu_801B86B4, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86B8, D_menu_801B86A8, - D_menu_801B86AC); + Title_SetCamUp2(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &gCsCamEyeX, &gCsCamEyeY, + &gCsCamEyeZ, D_menu_801B86B4, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86B8, + D_menu_801B86A8, D_menu_801B86AC); - if (D_menu_801B82B4 > 8) { + if (sTimer3 > 8) { Audio_SetEnvSfxReverb(0); - D_menu_801B82C0 = 0; - D_menu_801B82C4 = 5; + sSceneState = 0; + sCutsceneState = TITLE_TAKE_OFF_SPACE; } - D_menu_801B82B4++; + sTimer3++; } break; } - Title_80191674(D_menu_801B86C8, D_menu_801B86CC, 100.0f, &D_menu_801B82E0, &D_menu_801B82E4, &D_menu_801B82E8); + Title_SetLightRot(D_menu_801B86C8, D_menu_801B86CC, 100.0f, &D_menu_801B82E0, &D_menu_801B82E4, &D_menu_801B82E8); D_menu_801B7BEC++; } -void Title_8018C114(void) { +void Title_CsTakeOff_Draw(void) { s32 i; - if (D_menu_801B8688.unk_0C != 0) { - Title_8018DF0C(0.0f); + if (sTitleCorneria.draw) { + Title_Corneria_Draw(0.0f); } - Title_80190950(); + Title_GreatFoxDeck_Draw(); - for (i = 3; i >= 0; i--) { - if (D_menu_801B84E8[i].unk_4C) { - Title_80190B30(i); + for (i = ARRAY_COUNT(sTitleArwing) - 1; i >= 0; i--) { + if (sTitleArwing[i].draw) { + Title_GreatFoxDeckLauncher_Draw(i); } } - for (i = 0; i < 4; i++) { - if (D_menu_801B84E8[i].unk_4C) { - Title_8018D2B8(i); + for (i = 0; i < ARRAY_COUNT(sTitleArwing); i++) { + if (sTitleArwing[i].draw) { + Title_Arwing_Draw(i); } } } -void Title_8018C1C0(void) { +void Title_CsTakeOffSpace_Setup(void) { s32 i; gStarCount = 1; - D_menu_801B7C98 = 10; + sMaxExplosions = 10; for (i = 0; i < 10; i++) { D_menu_801B7BF8[i] = RAND_FLOAT(10.0f) + 10.0f; @@ -1911,7 +1924,7 @@ void Title_8018C1C0(void) { D_menu_801B7CA0[i] = 0; } - D_menu_801B86A0 = 1; + sDrawTakeOffSpace = true; D_menu_801B86BC = 0.0f; D_menu_801B86C0 = -38.0f; D_menu_801B86C4 = 35.0f; @@ -1928,19 +1941,19 @@ void Title_8018C1C0(void) { gFillScreenGreen = 0; gFillScreenBlue = 0; - D_menu_801B8688.pos.x = 130.0f; - D_menu_801B8688.pos.y = -30.0f; - D_menu_801B8688.pos.z = 2000.0f; - D_menu_801B8688.scale = 8.0f; - D_menu_801B8688.unk_0C = 0; + sTitleCorneria.pos.x = 130.0f; + sTitleCorneria.pos.y = -30.0f; + sTitleCorneria.pos.z = 2000.0f; + sTitleCorneria.scale = 8.0f; + sTitleCorneria.draw = false; - D_menu_801B8658.pos.x = 0.0f; - D_menu_801B8658.pos.y = 0.0f; - D_menu_801B8658.pos.z = 0.0f; - D_menu_801B8658.angleX = 0.0f; - D_menu_801B8658.angleY = 0.0f; - D_menu_801B8658.angleZ = 0.0f; - D_menu_801B8658.scale = 0.1f; + sTitleGreatFox.pos.x = 0.0f; + sTitleGreatFox.pos.y = 0.0f; + sTitleGreatFox.pos.z = 0.0f; + sTitleGreatFox.xRot = 0.0f; + sTitleGreatFox.yRot = 0.0f; + sTitleGreatFox.zRot = 0.0f; + sTitleGreatFox.scale = 0.1f; D_menu_801B86C8 = 0.0f; D_menu_801B86CC = 0.0f; @@ -1952,25 +1965,25 @@ void Title_8018C1C0(void) { gAmbientG = 4; gAmbientB = 10; - for (i = 0; i < 4; i++) { - D_menu_801B84E8[i].unk_00.x = 0.0f; - D_menu_801B84E8[i].unk_00.y = -40.0f; - D_menu_801B84E8[i].unk_00.z = -30.0f; - D_menu_801B84E8[i].unk_0C = 0.1f; - D_menu_801B84E8[i].unk_18 = 0.0f; - D_menu_801B84E8[i].unk_1C = 0.0f; - D_menu_801B84E8[i].unk_20 = 0.0f; - D_menu_801B84E8[i].unk_10 = 0.05f; - D_menu_801B84E8[i].unk_24 = 0.0f; - D_menu_801B84E8[i].unk_28 = 0.0f; - D_menu_801B84E8[i].unk_2C = 0.0f; - D_menu_801B84E8[i].unk_30 = 0.0f; - D_menu_801B84E8[i].unk_34 = i + 1; - D_menu_801B84E8[i].unk_3C = 1; - D_menu_801B84E8[i].unk_40 = 0; - D_menu_801B84E8[i].unk_44 = 1.2f; - D_menu_801B84E8[i].unk_48 = 0; - D_menu_801B84E8[i].unk_4C = 0; + for (i = 0; i < ARRAY_COUNT(sTitleArwing); i++) { + sTitleArwing[i].pos.x = 0.0f; + sTitleArwing[i].pos.y = -40.0f; + sTitleArwing[i].pos.z = -30.0f; + sTitleArwing[i].scale = 0.1f; + sTitleArwing[i].xRot = 0.0f; + sTitleArwing[i].yRot = 0.0f; + sTitleArwing[i].zRot = 0.0f; + sTitleArwing[i].vel = 0.05f; + sTitleArwing[i].cockpitGlassXrot = 0.0f; + sTitleArwing[i].laserGunsYpos = 0.0f; + sTitleArwing[i].teamFaceXrot = 0.0f; + sTitleArwing[i].teamFaceYrot = 0.0f; + sTitleArwing[i].drawFace = i + 1; + sTitleArwing[i].unk_3C = 1; + sTitleArwing[i].unk_40 = 0; + sTitleArwing[i].unk_44 = 1.2f; + sTitleArwing[i].drawShadow = false; + sTitleArwing[i].draw = false; } D_menu_801B86BC = -8.0f; @@ -1982,13 +1995,13 @@ void Title_8018C1C0(void) { D_menu_801B86B4 = 235.0f; D_menu_801B86B8 = 50.00f; - D_menu_801B829C = 0.0f; - D_menu_801B82A0 = 1.0f; - D_menu_801B82A4 = 0.0f; + sTitleCamUpX = 0.0f; + sTitleCamUpY = 1.0f; + sTitleCamUpZ = 0.0f; - Title_801914AC(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, - D_menu_801B86B4, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86B8, D_menu_801B86A8, - D_menu_801B86AC); + Title_SetCamUp2(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, + D_menu_801B86B4, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86B8, D_menu_801B86A8, + D_menu_801B86AC); } CameraPoint D_menu_801ADF84[50] = { @@ -2003,7 +2016,7 @@ CameraPoint D_menu_801ADF84[50] = { { 481.63818f, -313.2934f, -628.9213f, 96.2103f, -5.343582f, -4.23885f }, }; -void Title_8018C644(void) { +void Title_CsTakeOffSpace_Update(void) { s32 i; f32 x; f32 y; @@ -2012,127 +2025,124 @@ void Title_8018C644(void) { static f32 D_menu_801AE444[4] = { -50.0f, -45.0f, -55.0f, -60.0f }; static f32 D_menu_801AE454[4] = { 265.0f, 260.0f, 255.0f, 230.0f }; - switch (D_menu_801B82C0) { + switch (sSceneState) { case 0: - AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, D_menu_801B8658.unk_24, 0); - AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, D_menu_801B8658.unk_24, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, sTitleGreatFox.sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, sTitleGreatFox.sfxSource, 0); - Title_8018C1C0(); + Title_CsTakeOffSpace_Setup(); - D_menu_801B82B4 = 0; + sTimer3 = 0; D_menu_801B7BEC = 0; - D_menu_801B8688.unk_0C = 1; + sTitleCorneria.draw = true; - D_menu_801B84E8[0].unk_38 = 3; - D_menu_801B84E8[1].unk_38 = 23; - D_menu_801B84E8[2].unk_38 = 43; - D_menu_801B84E8[3].unk_38 = 63; + sTitleArwing[TEAM_FOX].timer = 3; + sTitleArwing[TEAM_FALCO].timer = 23; + sTitleArwing[TEAM_PEPPY].timer = 43; + sTitleArwing[TEAM_SLIPPY].timer = 63; D_menu_801B8294 = D_menu_801ADF84; D_menu_801B8298 = 0; D_menu_801B828C = 0.0f; D_menu_801B8290 = 0.042f; - D_menu_801B82C0++; + sSceneState++; break; case 1: - for (i = 0; i < 4; i++) { - if (D_menu_801B84E8[i].unk_38 > 0) { - D_menu_801B84E8[i].unk_38--; + for (i = 0; i < ARRAY_COUNT(sTitleArwing); i++) { + if (sTitleArwing[i].timer > 0) { + sTitleArwing[i].timer--; } else { - if (D_menu_801B84E8[i].unk_38 == 0) { - AUDIO_PLAY_SFX(NA_SE_PASS, D_menu_801B84E8[i].unk_50, 0); - D_menu_801B84E8[i].unk_38 = -1; - D_menu_801B84E8[i].unk_4C = 1; + if (sTitleArwing[i].timer == 0) { + AUDIO_PLAY_SFX(NA_SE_PASS, sTitleArwing[i].sfxSource, 0); + sTitleArwing[i].timer = -1; + sTitleArwing[i].draw = true; } - Math_SmoothStepToF(&D_menu_801B84E8[i].unk_00.y, D_menu_801AE444[i], D_menu_801B84E8[i].unk_10, - 100.0f, 0.001f); - Math_SmoothStepToF(&D_menu_801B84E8[i].unk_00.x, D_menu_801AE434[i], D_menu_801B84E8[i].unk_10, - 100.0f, 0.001f); - Math_SmoothStepToF(&D_menu_801B84E8[i].unk_00.z, D_menu_801AE454[i], D_menu_801B84E8[i].unk_10, - 100.0f, 0.001f); + Math_SmoothStepToF(&sTitleArwing[i].pos.y, D_menu_801AE444[i], sTitleArwing[i].vel, 100.0f, 0.001f); + Math_SmoothStepToF(&sTitleArwing[i].pos.x, D_menu_801AE434[i], sTitleArwing[i].vel, 100.0f, 0.001f); + Math_SmoothStepToF(&sTitleArwing[i].pos.z, D_menu_801AE454[i], sTitleArwing[i].vel, 100.0f, 0.001f); - D_menu_801B84E8[i].unk_10 *= 1.05f; + sTitleArwing[i].vel *= 1.05f; - if (D_menu_801B84E8[i].unk_00.z == D_menu_801AE454[i]) { - D_menu_801B84E8[i].unk_0C -= 0.002f; - if (D_menu_801B84E8[i].unk_0C < 0.0f) { - D_menu_801B84E8[i].unk_0C = 0.0f; - D_menu_801B84E8[i].unk_4C = 0; + if (sTitleArwing[i].pos.z == D_menu_801AE454[i]) { + sTitleArwing[i].scale -= 0.002f; + if (sTitleArwing[i].scale < 0.0f) { + sTitleArwing[i].scale = 0.0f; + sTitleArwing[i].draw = false; } } - x = D_menu_801AE434[i] - D_menu_801B84E8[i].unk_00.x; - y = D_menu_801AE444[i] - D_menu_801B84E8[i].unk_00.y; - z = D_menu_801AE454[i] + 10.0f - D_menu_801B84E8[i].unk_00.z; + x = D_menu_801AE434[i] - sTitleArwing[i].pos.x; + y = D_menu_801AE444[i] - sTitleArwing[i].pos.y; + z = D_menu_801AE454[i] + 10.0f - sTitleArwing[i].pos.z; - D_menu_801B84E8[i].unk_18 = RAD_TO_DEG(-Math_Atan2F(y, sqrtf(SQ(x) + SQ(z)))); - D_menu_801B84E8[i].unk_1C = RAD_TO_DEG(Math_Atan2F(x, z)); + sTitleArwing[i].xRot = RAD_TO_DEG(-Math_Atan2F(y, sqrtf(SQ(x) + SQ(z)))); + sTitleArwing[i].yRot = RAD_TO_DEG(Math_Atan2F(x, z)); } } - if (D_menu_801B82B4 == 125) { + if (sTimer3 == 125) { D_menu_801B869C = 1; } if (gFillScreenAlpha == 255) { - Audio_KillSfxBySourceAndId(D_menu_801B8658.unk_24, NA_SE_GREATFOX_ENGINE); - Audio_KillSfxBySourceAndId(D_menu_801B8658.unk_24, NA_SE_GREATFOX_BURNER); - D_menu_801B82C0++; + Audio_KillSfxBySourceAndId(sTitleGreatFox.sfxSource, NA_SE_GREATFOX_ENGINE); + Audio_KillSfxBySourceAndId(sTitleGreatFox.sfxSource, NA_SE_GREATFOX_BURNER); + sSceneState++; } - Title_801912A0(); - D_menu_801B82B4++; + Title_ScreenFade_Update(); + sTimer3++; break; case 2: gFillScreenAlpha = 0; gStarCount = 0; - D_menu_801B86A0 = 0; - D_menu_801B82A8 = 20; - D_menu_801B82C0++; + sDrawTakeOffSpace = false; + sTimer1 = 20; + sSceneState++; break; case 3: - if (D_menu_801B82A8 != 0) { + if (sTimer1 != 0) { break; } - D_menu_801B82C0 = 0; + sSceneState = 0; gDrawMode = DRAW_NONE; - D_menu_801B82C4 = 0; + sCutsceneState = TITLE_SCREEN; AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_23); break; } - Title_80191798(&D_menu_801B86A8, &D_menu_801B86AC); - Title_80191844(D_menu_801B86A8, D_menu_801B86AC); - Title_8018CC30(D_menu_801B8294, 9, D_menu_801B8290); - Title_80191674(D_menu_801B86C8, D_menu_801B86CC, 100.0f, &D_menu_801B82E0, &D_menu_801B82E4, &D_menu_801B82E8); + Title_GetCamRot(&D_menu_801B86A8, &D_menu_801B86AC); + Title_SetCamUp(D_menu_801B86A8, D_menu_801B86AC); + Title_Cutscene_SetCamera(D_menu_801B8294, 9, D_menu_801B8290); + Title_SetLightRot(D_menu_801B86C8, D_menu_801B86CC, 100.0f, &D_menu_801B82E0, &D_menu_801B82E4, &D_menu_801B82E8); Camera_SetStarfieldPos(gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ); D_menu_801B7BEC++; } -void Title_8018CB90(void) { +void Title_CsTakeOffSpace_Draw(void) { s32 i; - if (D_menu_801B86A0 != 0) { - if (D_menu_801B8688.unk_0C != 0) { - Title_8018DF0C(-1000.0f); + if (sDrawTakeOffSpace) { + if (sTitleCorneria.draw) { + Title_Corneria_Draw(-1000.0f); } - Title_8018E058(); + Title_GreatFox_Draw(); for (i = 0; i < 4; i++) { - if ((D_menu_801B84E8[i].unk_38 <= 0) && (D_menu_801B84E8[i].unk_4C != 0)) { - Title_8018D2B8(i); + if ((sTitleArwing[i].timer <= 0) && sTitleArwing[i].draw) { + Title_Arwing_Draw(i); } } } } -void Title_8018CC30(CameraPoint* arg0, s32 arg1, f32 arg2) { +void Title_Cutscene_SetCamera(CameraPoint* arg0, s32 arg1, f32 arg2) { s32 var_a3; CameraPoint pos; @@ -2152,7 +2162,8 @@ void Title_8018CC30(CameraPoint* arg0, s32 arg1, f32 arg2) { var_a3 = 2; } - Title_8018CD9C(&pos, &arg0[D_menu_801B8298], D_menu_801B828C, var_a3); + Title_Camera_Calc(&pos, &arg0[D_menu_801B8298], D_menu_801B828C, var_a3); + gCsCamEyeX = pos.eye.x; gCsCamEyeY = pos.eye.y; gCsCamEyeZ = pos.eye.z; @@ -2172,7 +2183,8 @@ void Title_8018CC30(CameraPoint* arg0, s32 arg1, f32 arg2) { } } -void Title_8018CD9C(CameraPoint* pos, CameraPoint* arg1, f32 weight, s32 arg3) { +// Calculation of camera movements using Cubic spline interpolation +void Title_Camera_Calc(CameraPoint* pos, CameraPoint* arg1, f32 weight, s32 arg3) { f32 temp1; f32 temp2; f32 temp3; @@ -2231,7 +2243,8 @@ void Title_8018CD9C(CameraPoint* pos, CameraPoint* arg1, f32 weight, s32 arg3) { (temp4 * (arg1 + 3)->at.z); } -void Title_8018D2B8(s32 arg0) { +// Arwings in the take off cutscene +void Title_Arwing_Draw(TitleTeam teamIdx) { ArwingInfo arwing; Lights_SetOneLight(&gMasterDisp, D_menu_801B82E0, D_menu_801B82E4, D_menu_801B82E8, gLight1R, gLight1G, gLight1B, @@ -2241,15 +2254,15 @@ void Title_8018D2B8(s32 arg0) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_menu_801B84E8[arg0].unk_00.x, D_menu_801B84E8[arg0].unk_00.y, - D_menu_801B84E8[arg0].unk_00.z, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sTitleArwing[teamIdx].pos.x, sTitleArwing[teamIdx].pos.y, sTitleArwing[teamIdx].pos.z, + MTXF_APPLY); - Matrix_Scale(gGfxMatrix, D_menu_801B84E8[arg0].unk_0C, D_menu_801B84E8[arg0].unk_0C, D_menu_801B84E8[arg0].unk_0C, + Matrix_Scale(gGfxMatrix, sTitleArwing[teamIdx].scale, sTitleArwing[teamIdx].scale, sTitleArwing[teamIdx].scale, MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, D_menu_801B84E8[arg0].unk_20 * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, D_menu_801B84E8[arg0].unk_18 * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, D_menu_801B84E8[arg0].unk_1C * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, sTitleArwing[teamIdx].zRot * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, sTitleArwing[teamIdx].xRot * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, sTitleArwing[teamIdx].yRot * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -2257,33 +2270,34 @@ void Title_8018D2B8(s32 arg0) { arwing.laserGunsXpos = arwing.wingsXrot = arwing.wingsYrot = arwing.wingsZrot = arwing.upperRightFlapYrot = arwing.bottomRightFlapYrot = arwing.upperLeftFlapYrot = arwing.bottomLeftFlapYrot = arwing.unk_28 = 0.0f; - arwing.laserGunsYpos = D_menu_801B84E8[arg0].unk_28; - arwing.drawFace = D_menu_801B84E8[arg0].unk_34; - arwing.teamFaceXrot = D_menu_801B84E8[arg0].unk_2C; - arwing.teamFaceYrot = D_menu_801B84E8[arg0].unk_30; - arwing.windshieldXrot = D_menu_801B84E8[arg0].unk_24; + arwing.laserGunsYpos = sTitleArwing[teamIdx].laserGunsYpos; + arwing.drawFace = sTitleArwing[teamIdx].drawFace; + arwing.teamFaceXrot = sTitleArwing[teamIdx].teamFaceXrot; + arwing.teamFaceYrot = sTitleArwing[teamIdx].teamFaceYrot; + arwing.cockpitGlassXrot = sTitleArwing[teamIdx].cockpitGlassXrot; Display_ArwingWings(&arwing); - Object_UpdateSfxSource(D_menu_801B84E8[arg0].unk_50); + Object_UpdateSfxSource(sTitleArwing[teamIdx].sfxSource); - if (D_menu_801B84E8[arg0].unk_40 != 0) { - Title_8018D80C(arg0); + if (sTitleArwing[teamIdx].unk_40 != 0) { + Title_EngineGlowParticles_Draw(teamIdx); } - if (D_menu_801B84E8[arg0].unk_3C != 0) { - Title_8018D510(arg0); + if (sTitleArwing[teamIdx].unk_3C != 0) { + Title_Arwing_DrawEngineGlow(teamIdx); } - if (D_menu_801B84E8[arg0].unk_48 != 0) { - Title_8018DDB8(arg0); + if (sTitleArwing[teamIdx].drawShadow) { + Title_ArwingShadow_Draw(teamIdx); } Matrix_Pop(&gGfxMatrix); } -void Title_8018D510(s32 arg0) { - f32 var_fv0; +// Engine glow of Team Arwing in the take off cutscene +void Title_Arwing_DrawEngineGlow(TitleTeam teamIdx) { + f32 engineGlowScale; f32 sp40; f32 sp3C; f32 var_fv1; @@ -2293,7 +2307,7 @@ void Title_8018D510(s32 arg0) { RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - if (D_menu_801B84E8[arg0].unk_40 == 1) { + if (sTitleArwing[teamIdx].unk_40 == 1) { var_fa0 = -30.0f; var_fv1 = 0.02f; gDPSetEnvColor(gMasterDisp++, 128, 128, 255, 255); @@ -2303,36 +2317,36 @@ void Title_8018D510(s32 arg0) { gDPSetEnvColor(gMasterDisp++, 0, 0, 255, 255); } - var_fv0 = D_menu_801B84E8[arg0].unk_44; + engineGlowScale = sTitleArwing[teamIdx].unk_44; if ((gGameFrameCount % 2) != 0) { - var_fv0 += var_fv1; + engineGlowScale += var_fv1; } Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, var_fa0, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, var_fv0, var_fv0 * 0.7f, var_fv0, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, engineGlowScale, engineGlowScale * 0.7f, engineGlowScale, MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, -D_menu_801B84E8[arg0].unk_20 * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, -D_menu_801B84E8[arg0].unk_18 * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, -D_menu_801B84E8[arg0].unk_1C * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, -sTitleArwing[teamIdx].zRot * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -sTitleArwing[teamIdx].xRot * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, -sTitleArwing[teamIdx].yRot * M_DTOR, MTXF_APPLY); - sp3C = -Math_Atan2F(gCsCamEyeX - D_menu_801B84E8[arg0].unk_00.x, gCsCamEyeZ - D_menu_801B84E8[arg0].unk_00.z); - temp = sqrtf(SQ(gCsCamEyeZ - D_menu_801B84E8[arg0].unk_00.z) + SQ(gCsCamEyeX - D_menu_801B84E8[arg0].unk_00.x)); - sp40 = Math_Atan2F(gCsCamEyeY - D_menu_801B84E8[arg0].unk_00.y, temp); + sp3C = -Math_Atan2F(gCsCamEyeX - sTitleArwing[teamIdx].pos.x, gCsCamEyeZ - sTitleArwing[teamIdx].pos.z); + temp = sqrtf(SQ(gCsCamEyeZ - sTitleArwing[teamIdx].pos.z) + SQ(gCsCamEyeX - sTitleArwing[teamIdx].pos.x)); + sp40 = Math_Atan2F(gCsCamEyeY - sTitleArwing[teamIdx].pos.y, temp); Matrix_RotateY(gGfxMatrix, -sp3C, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, -sp40, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - gSPDisplayList(gMasterDisp++, D_TITLE_60320E0); + gSPDisplayList(gMasterDisp++, aTitleArwingEngineGlowDL); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); Matrix_Pop(&gGfxMatrix); } -void Title_8018D80C(s32 arg0) { +void Title_EngineGlowParticles_Draw(TitleTeam teamIdx) { s32 i; f32 sp70; f32 sp6C; @@ -2373,9 +2387,9 @@ void Title_8018D80C(s32 arg0) { } } - sp6C = -Math_Atan2F(gCsCamEyeX - D_menu_801B84E8[arg0].unk_00.x, gCsCamEyeZ - D_menu_801B84E8[arg0].unk_00.z); - temp = sqrtf(SQ(gCsCamEyeZ - D_menu_801B84E8[arg0].unk_00.z) + SQ(gCsCamEyeX - D_menu_801B84E8[arg0].unk_00.x)); - sp70 = Math_Atan2F(gCsCamEyeY - D_menu_801B84E8[arg0].unk_00.y, temp); + sp6C = -Math_Atan2F(gCsCamEyeX - sTitleArwing[teamIdx].pos.x, gCsCamEyeZ - sTitleArwing[teamIdx].pos.z); + temp = sqrtf(SQ(gCsCamEyeZ - sTitleArwing[teamIdx].pos.z) + SQ(gCsCamEyeX - sTitleArwing[teamIdx].pos.x)); + sp70 = Math_Atan2F(gCsCamEyeY - sTitleArwing[teamIdx].pos.y, temp); RCP_SetupDL(&gMasterDisp, SETUPDL_49); @@ -2392,26 +2406,26 @@ void Title_8018D80C(s32 arg0) { Matrix_Translate(gGfxMatrix, D_menu_801B7D40[i], D_menu_801B7DE0[i], D_menu_801B7E80[i], MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_menu_801B7FC0[i], D_menu_801B7FC0[i], D_menu_801B7FC0[i], MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, -D_menu_801B84E8[arg0].unk_20 * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, -D_menu_801B84E8[arg0].unk_18 * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, -D_menu_801B84E8[arg0].unk_1C * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, -sTitleArwing[teamIdx].zRot * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -sTitleArwing[teamIdx].xRot * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, -sTitleArwing[teamIdx].yRot * M_DTOR, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, -sp6C, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, -sp70, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_TITLE_60320E0); + gSPDisplayList(gMasterDisp++, aTitleArwingEngineGlowDL); Matrix_Pop(&gGfxMatrix); } } -void Title_8018DDB8(s32 arg0) { +void Title_ArwingShadow_Draw(s32 arg0) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, - (D_menu_801B9050 - D_menu_801B84E8[arg0].unk_00.y * 2.05f) + (D_menu_801B9048 - 84.0f) * 1.99f, - 0.0f, MTXF_APPLY); + (D_menu_801B9050 - sTitleArwing[arg0].pos.y * 2.05f) + (D_menu_801B9048 - 84.0f) * 1.99f, 0.0f, + MTXF_APPLY); Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 1.0f, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -2419,64 +2433,65 @@ void Title_8018DDB8(s32 arg0) { RCP_SetupDL_64(); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 240); - gSPDisplayList(gMasterDisp++, D_TITLE_6032580); + gSPDisplayList(gMasterDisp++, aTitleArwingShadowDL); Matrix_Pop(&gGfxMatrix); } -void Title_8018DF0C(f32 arg0) { - f32 sp34; - f32 sp30; +void Title_Corneria_Draw(f32 zPos) { + f32 xRot; + f32 yRot; - Title_80191798(&sp34, &sp30); + Title_GetCamRot(&xRot, &yRot); RCP_SetupDL(&gMasterDisp, SETUPDL_53); - if (arg0 != 0.0f) { - D_menu_801B8688.pos.z = gCsCamEyeZ - arg0; + if (zPos != 0.0f) { + sTitleCorneria.pos.z = gCsCamEyeZ - zPos; } Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_menu_801B8688.pos.x, D_menu_801B8688.pos.y, D_menu_801B8688.pos.z, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, M_DTOR * sp30, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, M_DTOR * sp34, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, D_menu_801B8688.scale, D_menu_801B8688.scale, D_menu_801B8688.scale, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sTitleCorneria.pos.x, sTitleCorneria.pos.y, sTitleCorneria.pos.z, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_DTOR * yRot, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_DTOR * xRot, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, sTitleCorneria.scale, sTitleCorneria.scale, sTitleCorneria.scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_TITLE_6037CF0); - Title_8018E200(); + gSPDisplayList(gMasterDisp++, aPlanetCorneriaDL); + Title_CorneriaExplosions_Draw(); Matrix_Pop(&gGfxMatrix); } -void Title_8018E058(void) { +void Title_GreatFox_Draw(void) { Lights_SetOneLight(&gMasterDisp, D_menu_801B82E0, D_menu_801B82E4, D_menu_801B82E8, gLight1R, gLight1G, gLight1B, gAmbientR, gAmbientG, gAmbientB); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_menu_801B8658.pos.x, D_menu_801B8658.pos.y, D_menu_801B8658.pos.z, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sTitleGreatFox.pos.x, sTitleGreatFox.pos.y, sTitleGreatFox.pos.z, MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, M_DTOR * D_menu_801B8658.angleZ, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, M_DTOR * D_menu_801B8658.angleX, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801B8658.angleY, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, M_DTOR * sTitleGreatFox.zRot, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_DTOR * sTitleGreatFox.xRot, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_DTOR * sTitleGreatFox.yRot, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, D_menu_801B8658.scale, D_menu_801B8658.scale, D_menu_801B8658.scale, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, sTitleGreatFox.scale, sTitleGreatFox.scale, sTitleGreatFox.scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL(&gMasterDisp, SETUPDL_23); - gGreatFoxIntact = true; + gGreatFoxIntact = true; // Unused here Cutscene_DrawGreatFox(); - Object_UpdateSfxSource(D_menu_801B8658.unk_24); + + Object_UpdateSfxSource(sTitleGreatFox.sfxSource); Matrix_Pop(&gGfxMatrix); } -void Title_8018E200(void) { +void Title_CorneriaExplosions_Draw(void) { f32 scale; s32 i; - for (i = 0; i < D_menu_801B7C98; i++) { + for (i = 0; i < sMaxExplosions; i++) { switch (D_menu_801B7CA0[i]) { case 0: D_menu_801B7C48[i] += 0.15f; @@ -2522,11 +2537,11 @@ void Title_8018E200(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_49); - for (i = 0; i < D_menu_801B7C98; i++) { + for (i = 0; i < sMaxExplosions; i++) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 200, 200, D_menu_801B7CC8[i]); gDPSetEnvColor(gMasterDisp++, 255, 0, 0, D_menu_801B7CF0[i]); - scale = D_menu_801B7C48[i] / D_menu_801B8688.scale; + scale = D_menu_801B7C48[i] / sTitleCorneria.scale; Matrix_Push(&gGfxMatrix); @@ -2534,84 +2549,83 @@ void Title_8018E200(void) { Matrix_RotateZ(gGfxMatrix, D_menu_801B7C20[i] * M_DTOR, MTXF_APPLY); Matrix_Translate(gGfxMatrix, 0.0f, D_menu_801B7BF8[i], 0.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY); - Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_TITLE_60320E0); + gSPDisplayList(gMasterDisp++, aTitleArwingEngineGlowDL); Matrix_Pop(&gGfxMatrix); } } -void Title_8018E67C(s32 arg0) { - Vec3f sp60[50]; - s32 sp5C; +void Title_TeamRunning_Draw(TitleTeam teamIdx) { + Vec3f frameTable[50]; + s32 frame; f32 temp_fv1; Lights_SetOneLight(&gMasterDisp, D_menu_801B82E0, D_menu_801B82E4, D_menu_801B82E8, gLight1R, gLight1G, gLight1B, gAmbientR, gAmbientG, gAmbientB); - sp5C = D_menu_801B8350[arg0].unk_58 % Animation_GetFrameCount(D_menu_801ADA00[arg0].unk_0); + frame = sTitleTeam[teamIdx].frameCount % Animation_GetFrameCount(sTeamAnim[teamIdx].cutscene); RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, 255, 995, 1000); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_menu_801B8350[arg0].unk_00.x, D_menu_801B8350[arg0].unk_00.y, - D_menu_801B8350[arg0].unk_00.z + D_menu_801B84D0, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sTitleTeam[teamIdx].pos.x, sTitleTeam[teamIdx].pos.y, + sTitleTeam[teamIdx].pos.z + D_menu_801B84D0, MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_menu_801B84D4, D_menu_801B84D4, D_menu_801B84D4, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - if (arg0 == 2) { + if (teamIdx == TEAM_PEPPY) { gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); } - Animation_GetFrameData(D_menu_801ADA00[arg0].unk_0, sp5C, sp60); - Animation_DrawSkeleton(0, D_menu_801ADA00[arg0].skeleton, sp60, NULL, NULL, NULL, &gIdentityMatrix); + Animation_GetFrameData(sTeamAnim[teamIdx].cutscene, frame, frameTable); + Animation_DrawSkeleton(0, sTeamAnim[teamIdx].skeleton, frameTable, NULL, NULL, NULL, &gIdentityMatrix); - if (arg0 == 2) { + if (teamIdx == TEAM_PEPPY) { gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); } - if (arg0 == 0) { + if (teamIdx == TEAM_FOX) { Object_UpdateSfxSource(D_menu_801B84D8); } Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_menu_801B8350[arg0].unk_00.x - 5.0f, 5.0f, - D_menu_801B8350[arg0].unk_00.z + 10.0f + D_menu_801B84D0, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sTitleTeam[teamIdx].pos.x - 5.0f, 5.0f, + sTitleTeam[teamIdx].pos.z + 10.0f + D_menu_801B84D0, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, D_menu_801B8350[arg0].unk_10, D_menu_801B8350[arg0].unk_10, D_menu_801B8350[arg0].unk_10, - MTXF_APPLY); + Matrix_Scale(gGfxMatrix, sTitleTeam[teamIdx].shadowScale, sTitleTeam[teamIdx].shadowScale, + sTitleTeam[teamIdx].shadowScale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL_64(); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 128); - gSPDisplayList(gMasterDisp++, D_TITLE_6041070); + gSPDisplayList(gMasterDisp++, aTeamShadowDL); Matrix_Pop(&gGfxMatrix); - temp_fv1 = SIN_DEG(sp5C * 12.0f) * 15.0f; + temp_fv1 = SIN_DEG(frame * 12.0f) * 15.0f; if (temp_fv1 >= 0) { - D_menu_801B8350[arg0].unk_0C = temp_fv1; + sTitleTeam[teamIdx].unk_0C = temp_fv1; } else if (temp_fv1 > -2.0f) { - D_menu_801B8350[arg0].unk_0C = -temp_fv1; + sTitleTeam[teamIdx].unk_0C = -temp_fv1; } else { - D_menu_801B8350[arg0].unk_0C = 0.0f; + sTitleTeam[teamIdx].unk_0C = 0.0f; } - D_menu_801B8350[arg0].unk_10 = 3.0f - (D_menu_801B8350[arg0].unk_0C / 100.0f); + sTitleTeam[teamIdx].shadowScale = 3.0f - (sTitleTeam[teamIdx].unk_0C / 100.0f); } -void Title_8018EA78(s32 arg0) { - Vec3f sp48[50]; - s32 sp44; - - sp44 = D_menu_801B8350[arg0].unk_58 % Animation_GetFrameCount(D_menu_801ADA00[arg0].unk_4); +void Title_Team_Draw(TitleTeam teamIdx) { + Vec3f frameTable[50]; + s32 frame; + // return; // DEBUG + frame = sTitleTeam[teamIdx].frameCount % Animation_GetFrameCount(sTeamAnim[teamIdx].title); RCP_SetupDL(&gMasterDisp, SETUPDL_23); @@ -2620,150 +2634,151 @@ void Title_8018EA78(s32 arg0) { Matrix_Push(&gGfxMatrix); - Matrix_RotateX(gGfxMatrix, D_menu_801B8350[arg0].unk_48 * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, D_menu_801B8350[arg0].unk_4C * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, D_menu_801B8350[arg0].unk_50 * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, sTitleTeam[teamIdx].unk_48 * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, sTitleTeam[teamIdx].unk_4C * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, sTitleTeam[teamIdx].unk_50 * M_DTOR, MTXF_APPLY); - Matrix_Translate(gGfxMatrix, D_menu_801B8350[arg0].unk_00.x, D_menu_801B8350[arg0].unk_00.y, - D_menu_801B8350[arg0].unk_00.z, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sTitleTeam[teamIdx].pos.x, sTitleTeam[teamIdx].pos.y, sTitleTeam[teamIdx].pos.z, + MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_menu_801B84D4, D_menu_801B84D4, D_menu_801B84D4, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - Math_SmoothStepToVec3fArray(sp48, D_menu_801B86E0[arg0], 1, - Animation_GetFrameData(D_menu_801ADA00[arg0].unk_4, sp44, sp48), 0.2f, 100.0f, 0.0001f); - Animation_DrawSkeleton(1, D_menu_801ADA00[arg0].skeleton, D_menu_801B86E0[arg0], Title_8018EDC8, NULL, &arg0, - &gIdentityMatrix); + Math_SmoothStepToVec3fArray(frameTable, sCharFrameTable[teamIdx], 1, + Animation_GetFrameData(sTeamAnim[teamIdx].title, frame, frameTable), 0.2f, 100.0f, + 0.0001f); + Animation_DrawSkeleton(1, sTeamAnim[teamIdx].skeleton, sCharFrameTable[teamIdx], Title_Team_OverrideLimbDraw, NULL, + &teamIdx, &gIdentityMatrix); Matrix_Pop(&gGfxMatrix); } -bool Title_8018EDC8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { +bool Title_Team_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { f32 x; f32 y; f32 z; - s32 i = *(s32*) data; + TitleTeam teamIdx = *(TitleTeam*) thisx; if ((D_menu_801B86A4 < 2) && D_menu_801B9040) { - x = D_menu_801B905C - D_menu_801B8350[i].unk_00.x; - y = D_menu_801B9060 - (D_menu_801B8350[i].unk_00.y + D_menu_801B8350[i].unk_14); - z = D_menu_801B9064 - D_menu_801B8350[i].unk_00.z; + x = D_menu_801B905C - sTitleTeam[teamIdx].pos.x; + y = D_menu_801B9060 - (sTitleTeam[teamIdx].pos.y + sTitleTeam[teamIdx].unk_14); + z = D_menu_801B9064 - sTitleTeam[teamIdx].pos.z; - D_menu_801B8350[i].unk_28 = Math_Atan2F(x, sqrtf(SQ(y) + SQ(z))) * M_RTOD; - D_menu_801B8350[i].unk_2C = Math_Atan2F(y, z) * M_RTOD; + sTitleTeam[teamIdx].unk_28 = Math_Atan2F(x, sqrtf(SQ(y) + SQ(z))) * M_RTOD; + sTitleTeam[teamIdx].unk_2C = Math_Atan2F(y, z) * M_RTOD; - D_menu_801B8350[i].unk_38 = D_menu_801B8350[i].unk_28; - D_menu_801B8350[i].unk_3C = D_menu_801B8350[i].unk_2C; + sTitleTeam[teamIdx].unk_38 = sTitleTeam[teamIdx].unk_28; + sTitleTeam[teamIdx].unk_3C = sTitleTeam[teamIdx].unk_2C; - if (D_menu_801B8350[i].unk_28 < -45.0f) { - D_menu_801B8350[i].unk_28 = -45.0f; - } else if (D_menu_801B8350[i].unk_28 > 45.0f) { - D_menu_801B8350[i].unk_28 = 45.0f; + if (sTitleTeam[teamIdx].unk_28 < -45.0f) { + sTitleTeam[teamIdx].unk_28 = -45.0f; + } else if (sTitleTeam[teamIdx].unk_28 > 45.0f) { + sTitleTeam[teamIdx].unk_28 = 45.0f; } - if (D_menu_801B8350[i].unk_2C < -40.0f) { - D_menu_801B8350[i].unk_2C = -40.0f; - } else if (D_menu_801B8350[i].unk_2C > 55.0f) { - D_menu_801B8350[i].unk_2C = 55.0f; + if (sTitleTeam[teamIdx].unk_2C < -40.0f) { + sTitleTeam[teamIdx].unk_2C = -40.0f; + } else if (sTitleTeam[teamIdx].unk_2C > 55.0f) { + sTitleTeam[teamIdx].unk_2C = 55.0f; } - if (D_menu_801B8350[i].unk_38 < -20.0f) { - D_menu_801B8350[i].unk_38 = D_menu_801B8350[i].unk_38 - (-20.0f); - if (D_menu_801B8350[i].unk_38 < -20.0f) { - D_menu_801B8350[i].unk_38 = -20.0f; + if (sTitleTeam[teamIdx].unk_38 < -20.0f) { + sTitleTeam[teamIdx].unk_38 = sTitleTeam[teamIdx].unk_38 - (-20.0f); + if (sTitleTeam[teamIdx].unk_38 < -20.0f) { + sTitleTeam[teamIdx].unk_38 = -20.0f; } - } else if (D_menu_801B8350[i].unk_38 > 20.0f) { - D_menu_801B8350[i].unk_38 = D_menu_801B8350[i].unk_38 - 20.0f; - if (D_menu_801B8350[i].unk_38 > 20.0f) { - D_menu_801B8350[i].unk_38 = 20.0f; + } else if (sTitleTeam[teamIdx].unk_38 > 20.0f) { + sTitleTeam[teamIdx].unk_38 = sTitleTeam[teamIdx].unk_38 - 20.0f; + if (sTitleTeam[teamIdx].unk_38 > 20.0f) { + sTitleTeam[teamIdx].unk_38 = 20.0f; } } else { - D_menu_801B8350[i].unk_38 = 0.0f; + sTitleTeam[teamIdx].unk_38 = 0.0f; } - if (D_menu_801B8350[i].unk_3C < -35.0f) { - D_menu_801B8350[i].unk_3C = D_menu_801B8350[i].unk_3C - (-35.0f); - if (D_menu_801B8350[i].unk_3C < -10.0f) { - D_menu_801B8350[i].unk_3C = -10.0f; + if (sTitleTeam[teamIdx].unk_3C < -35.0f) { + sTitleTeam[teamIdx].unk_3C = sTitleTeam[teamIdx].unk_3C - (-35.0f); + if (sTitleTeam[teamIdx].unk_3C < -10.0f) { + sTitleTeam[teamIdx].unk_3C = -10.0f; } - } else if (D_menu_801B8350[i].unk_3C > 40.0f) { - D_menu_801B8350[i].unk_3C = D_menu_801B8350[i].unk_3C - 40.0f; - if (D_menu_801B8350[i].unk_3C > 10.0f) { - D_menu_801B8350[i].unk_3C = 10.0f; + } else if (sTitleTeam[teamIdx].unk_3C > 40.0f) { + sTitleTeam[teamIdx].unk_3C = sTitleTeam[teamIdx].unk_3C - 40.0f; + if (sTitleTeam[teamIdx].unk_3C > 10.0f) { + sTitleTeam[teamIdx].unk_3C = 10.0f; } } else { - D_menu_801B8350[i].unk_3C = 0.0f; + sTitleTeam[teamIdx].unk_3C = 0.0f; } - Math_SmoothStepToF(&D_menu_801B8350[i].unk_30, D_menu_801B8350[i].unk_28, 0.01f, 100.0f, 0.0001f); - Math_SmoothStepToF(&D_menu_801B8350[i].unk_34, D_menu_801B8350[i].unk_2C, 0.01f, 100.0f, 0.0001f); - Math_SmoothStepToF(&D_menu_801B8350[i].unk_40, D_menu_801B8350[i].unk_38, 0.005f, 100.0f, 0.0001f); - Math_SmoothStepToF(&D_menu_801B8350[i].unk_44, D_menu_801B8350[i].unk_3C, 0.005f, 100.0f, 0.0001f); + Math_SmoothStepToF(&sTitleTeam[teamIdx].unk_30, sTitleTeam[teamIdx].unk_28, 0.01f, 100.0f, 0.0001f); + Math_SmoothStepToF(&sTitleTeam[teamIdx].unk_34, sTitleTeam[teamIdx].unk_2C, 0.01f, 100.0f, 0.0001f); + Math_SmoothStepToF(&sTitleTeam[teamIdx].unk_40, sTitleTeam[teamIdx].unk_38, 0.005f, 100.0f, 0.0001f); + Math_SmoothStepToF(&sTitleTeam[teamIdx].unk_44, sTitleTeam[teamIdx].unk_3C, 0.005f, 100.0f, 0.0001f); } - switch (i) { - case 0: + switch (teamIdx) { + case TEAM_FOX: if (limbIndex == 1) { - rot->z += D_menu_801B8350[i].unk_18; + rot->z += sTitleTeam[teamIdx].unk_18; } if (limbIndex == 19) { - rot->x += D_menu_801B8350[i].unk_30; - rot->y += D_menu_801B8350[i].unk_34; + rot->x += sTitleTeam[teamIdx].unk_30; + rot->y += sTitleTeam[teamIdx].unk_34; } if (limbIndex == 20) { - rot->x += D_menu_801B8350[i].unk_40; - rot->y += D_menu_801B8350[i].unk_44; + rot->x += sTitleTeam[teamIdx].unk_40; + rot->y += sTitleTeam[teamIdx].unk_44; } break; - case 1: + case TEAM_FALCO: if (limbIndex == 1) { - rot->z += D_menu_801B8350[i].unk_18; + rot->z += sTitleTeam[teamIdx].unk_18; } if (limbIndex == 11) { - rot->z += D_menu_801B8350[i].unk_20; + rot->z += sTitleTeam[teamIdx].unk_20; } if (limbIndex == 19) { - rot->x += D_menu_801B8350[i].unk_30; - rot->y += D_menu_801B8350[i].unk_34; + rot->x += sTitleTeam[teamIdx].unk_30; + rot->y += sTitleTeam[teamIdx].unk_34; } if (limbIndex == 20) { - rot->x += D_menu_801B8350[i].unk_40; - rot->y += D_menu_801B8350[i].unk_44; + rot->x += sTitleTeam[teamIdx].unk_40; + rot->y += sTitleTeam[teamIdx].unk_44; } if (limbIndex == 21) { rot->x += -5.0f; } break; - case 2: + case TEAM_PEPPY: if (limbIndex == 1) { - rot->z += D_menu_801B8350[i].unk_18; + rot->z += sTitleTeam[teamIdx].unk_18; } if (limbIndex == 19) { - rot->x += D_menu_801B8350[i].unk_30; - rot->y += D_menu_801B8350[i].unk_34; + rot->x += sTitleTeam[teamIdx].unk_30; + rot->y += sTitleTeam[teamIdx].unk_34; } if (limbIndex == 20) { - rot->x += D_menu_801B8350[i].unk_40; - rot->y += D_menu_801B8350[i].unk_44; + rot->x += sTitleTeam[teamIdx].unk_40; + rot->y += sTitleTeam[teamIdx].unk_44; } if (limbIndex == 21) { rot->x += 10.0f; } break; - case 3: + case TEAM_SLIPPY: if (limbIndex == 1) { - rot->z += D_menu_801B8350[i].unk_18; + rot->z += sTitleTeam[teamIdx].unk_18; } if (limbIndex == 17) { - rot->x += D_menu_801B8350[i].unk_30; - rot->y += D_menu_801B8350[i].unk_34; + rot->x += sTitleTeam[teamIdx].unk_30; + rot->y += sTitleTeam[teamIdx].unk_34; } if (limbIndex == 18) { - rot->x += D_menu_801B8350[i].unk_40; - rot->y += D_menu_801B8350[i].unk_44; + rot->x += sTitleTeam[teamIdx].unk_40; + rot->y += sTitleTeam[teamIdx].unk_44; } if (limbIndex == 19) { rot->x += 4.0f; @@ -2774,134 +2789,136 @@ bool Title_8018EDC8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* da return false; } -void Title_8018F438(void) { - f32 sp54; +void Title_Passage_Draw(void) { + f32 sZoffsetScale; Lights_SetOneLight(&gMasterDisp, 0, 0, 0, 0, 0, 0, gAmbientR, gAmbientG, gAmbientB); if (gCsCamAtZ < gCsCamEyeZ) { - sp54 = 1.0f; + sZoffsetScale = 1.0f; } else { - sp54 = 3.0f; + sZoffsetScale = 3.0f; } - D_menu_801B82C8 += 70.0f; - D_menu_801B82C8 = Math_ModF(D_menu_801B82C8, 4101.6f); + sPassageWayZoffset += 70.0f; + sPassageWayZoffset = Math_ModF(sPassageWayZoffset, 4101.6f); RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, 255, 995, 1000); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, (3079.2002f * sp54) - D_menu_801B82C8, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, (3079.2002f * sZoffsetScale) - sPassageWayZoffset, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.6f, 0.6f, 0.6f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_TITLE_602E380); + gSPDisplayList(gMasterDisp++, aTitleCsPassageWayDL); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -6836.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_TITLE_602E380); + gSPDisplayList(gMasterDisp++, aTitleCsPassageWayDL); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -6836.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_TITLE_602E380); + gSPDisplayList(gMasterDisp++, aTitleCsPassageWayDL); Matrix_Pop(&gGfxMatrix); } -void Title_8018F680(void) { +void Title_StarfoxLogo_Draw(void) { s32 i; RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); for (i = 0; i < 30; i++) { - TextureRect_RGBA16(&gMasterDisp, gTitleStarfoxLogo + (236 * 2 * i), 236, 2, D_menu_801B9054, - D_menu_801B9058 + (i * 2.0f), 1.0f, 1.0f); + Lib_TextureRect_RGBA16(&gMasterDisp, aTitleStarfoxLogoTex + (236 * 2 * i), 236, 2, sTitleStarfoxLogoXpos, + sTitleStarfoxLogoYpos + (i * 2.0f), 1.0f, 1.0f); } } -void Title_8018F77C(void) { +void Title_64Logo_Draw(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_53); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, D_menu_801B905C, D_menu_801B9060, D_menu_801B9064, MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_menu_801B9068, D_menu_801B906C, 1.0f, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_DTOR * 90, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_TITLE_60148D0); + gSPDisplayList(gMasterDisp++, a64LogoDL); Matrix_Pop(&gGfxMatrix); } -void Title_8018F85C(void) { +void Title_CopyrightSymbol_Draw(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_IA8(&gMasterDisp, gTitleCopyrightSymbol, 16, 16, 234.0f, 20.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aTitleCopyrightTex, 16, 16, 234.0f, 20.0f, 1.0f, 1.0f); } -void Title_8018F8E4(void) { - f32 temp2; +void Title_PressStart_Draw(void) { + f32 yPos; s32 i; - static f32 D_menu_801AE464 = 68.0f; - static f32 D_menu_801AE468 = 170.0f; - static f32 D_menu_801AE46C = 5.55f; - static f32 D_menu_801AE470 = 0.9f; + static f32 sNoControllerBgXpos = 68.0f; + static f32 sNoControllerBgYpos = 170.0f; + static f32 sNoControllerBgXscale = 5.55f; + static f32 sNoControllerBgYscale = 0.9f; static f32 D_menu_801AE474 = 70.0f; static f32 D_menu_801AE478 = 172.0f; if (gControllerLock == 0) { - temp2 = 188.0f; + yPos = 188.0f; - if ((s32) Math_SmoothStepToF(&D_menu_801B7BC8, D_menu_801B7BCC, 0.5f, 100.0f, 1.0f) == 0.0f) { - if (D_menu_801B7BC8 == 32.0f) { - D_menu_801B7BCC = 255.0f; + if ((s32) Math_SmoothStepToF(&sTitleTextPrimCol, sTitleTextPrimColTarget, 0.5f, 100.0f, 1.0f) == 0.0f) { + if (sTitleTextPrimCol == 32.0f) { + sTitleTextPrimColTarget = 255.0f; } else { - D_menu_801B7BCC = 32.0f; + sTitleTextPrimColTarget = 32.0f; } } if (gMainController < 0) { + // No Controller background RCP_SetupDL(&gMasterDisp, SETUPDL_85); - gDPSetPrimColor(gMasterDisp++, 0, 0, 60, 60, 255, 200); - TextureRect_CI8(&gMasterDisp, D_TITLE_601D750, D_TITLE_601DB50, 32, 32, D_menu_801AE464, D_menu_801AE468, - D_menu_801AE46C, D_menu_801AE470); - RCP_SetupDL(&gMasterDisp, SETUPDL_83); + Lib_TextureRect_CI8(&gMasterDisp, aNoControllerBgTex, aNoControllerBgTLUT, 32, 32, sNoControllerBgXpos, + sNoControllerBgYpos, sNoControllerBgXscale, sNoControllerBgYscale); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, (s32) D_menu_801B7BC8, (s32) D_menu_801B7BC8, 255); + // No Controller + RCP_SetupDL(&gMasterDisp, SETUPDL_83); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, (s32) sTitleTextPrimCol, (s32) sTitleTextPrimCol, 255); for (i = 0; i < 6; i++) { - TextureRect_IA8(&gMasterDisp, gTitleNoController + (176 * 4 * i), 176, 4, D_menu_801AE474, - D_menu_801AE478 + (i * 4.0f), 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aTitleNoControllerTex + (176 * 4 * i), 176, 4, D_menu_801AE474, + D_menu_801AE478 + (i * 4.0f), 1.0f, 1.0f); } } else { + // Press Start RCP_SetupDL(&gMasterDisp, SETUPDL_83); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, (s32) D_menu_801B7BC8, (s32) D_menu_801B7BC8, 255); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, (s32) sTitleTextPrimCol, (s32) sTitleTextPrimCol, 255); for (i = 0; i < 2; i++) { - TextureRect_IA8(&gMasterDisp, gTitlePressStart + (120 * 6 * i), 120, 6, 101.0f, temp2 + (i * 6.0f), - 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aTitlePressStartTex + (120 * 6 * i), 120, 6, 101.0f, + yPos + (i * 6.0f), 1.0f, 1.0f); } - TextureRect_IA8(&gMasterDisp, gTitlePressStart + 120 * 6 * 2, 120, 1, 101.0f, temp2 + 12, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aTitlePressStartTex + 120 * 6 * 2, 120, 1, 101.0f, yPos + 12, 1.0f, 1.0f); } } } -void Title_8018FC14(void) { +void Title_Copyright_Draw(void) { s32 i; RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); for (i = 0; i < 2; i++) { - TextureRect_IA8(&gMasterDisp, gTitleNintendoCopyright + (120 * 6 * i), 120, 6, 102.0f, 209.0f + (i * 6.0f), - 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, a1997NintendoTex + (120 * 6 * i), 120, 6, 102.0f, 209.0f + (i * 6.0f), 1.0f, + 1.0f); } } -void Title_8018FD08(void) { +void Title_TeamName_Draw(void) { s32 i; Gfx* temp_v1; f32 temp_fs2; @@ -2919,27 +2936,28 @@ void Title_8018FD08(void) { switch (D_menu_801B8340) { case 0: - TextureRect_IA8(&gMasterDisp, gTitleSlippyCard, 144, 13, temp_fs2, temp, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, gTitleSlippyCard, 144, 13, temp_fs2, temp, 1.0f, 1.0f); break; case 1: - TextureRect_IA8(&gMasterDisp, gTitlePeppyCard, 120, 13, temp_fs2, temp, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, gTitlePeppyCard, 120, 13, temp_fs2, temp, 1.0f, 1.0f); break; case 2: for (i = 0; i < 3; i++) { - TextureRect_IA8(&gMasterDisp, gTitleFalcoCard + (176 * 4 * i), 176, 4, temp_fs2, temp + (i * 4), 1.0f, - 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, gTitleFalcoCard + (176 * 4 * i), 176, 4, temp_fs2, temp + (i * 4), + 1.0f, 1.0f); } - TextureRect_IA8(&gMasterDisp, gTitleFalcoCard + 176 * 4 * 3, 176, 1, temp_fs2, temp + 12.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, gTitleFalcoCard + 176 * 4 * 3, 176, 1, temp_fs2, temp + 12.0f, 1.0f, + 1.0f); break; case 3: for (i = 0; i < 3; i++) { - TextureRect_IA8(&gMasterDisp, gTitleFoxCard + (176 * 4 * i), 176, 4, temp_fs2, temp + (i * 4), 1.0f, - 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, gTitleFoxCard + (176 * 4 * i), 176, 4, temp_fs2, temp + (i * 4), 1.0f, + 1.0f); } - TextureRect_IA8(&gMasterDisp, gTitleFoxCard + 176 * 4 * 3, 176, 1, temp_fs2, temp + 12, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, gTitleFoxCard + 176 * 4 * 3, 176, 1, temp_fs2, temp + 12, 1.0f, 1.0f); break; } } @@ -2965,7 +2983,7 @@ s32 D_menu_801AE528[] = { 80, 64, 48, 32, 12, 32, 44, 32, 42, 36, 12, 38, }; -void Title_8018FF74(void) { +void Title_SunGlare_Draw(void) { if (D_menu_801B7BD8 != 0) { if ((D_menu_801B7BB8 > -870.0f) && (D_menu_801B7BB8 < 900.0f) && (gFillScreenAlpha > 0)) { if ((D_menu_801B7BB8 < 0.0f) && (D_menu_801B7BD0 < 255)) { @@ -2981,20 +2999,20 @@ void Title_8018FF74(void) { gDPSetColorDither(gMasterDisp++, G_CD_NOISE); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, D_menu_801B7BD0); - TextureRect_RGBA16(&gMasterDisp, gTitleSunBeam, 32, 32, D_menu_801B9080, D_menu_801B9084, D_menu_801B7BB0, - D_menu_801B7BB4); + Lib_TextureRect_RGBA16(&gMasterDisp, aTitleSunGlareTex, 32, 32, D_menu_801B9080, D_menu_801B9084, + D_menu_801B7BB0, D_menu_801B7BB4); D_menu_801B9080 += 1.66f; } - Title_801918FC(); - Title_80190144(); - Title_801903B8(); + Title_Matrix_Push(); + Title_Sun_Draw(); + Title_SunGlare2_Draw(); Matrix_Pop(&gGfxMatrix); } } -void Title_80190144(void) { +void Title_Sun_Draw(void) { s32 i; if (gFillScreenAlpha > 0) { @@ -3040,7 +3058,7 @@ void Title_80190144(void) { } } -void Title_801903B8(void) { +void Title_SunGlare2_Draw(void) { static s32 D_menu_801AE558 = 12; f32 temp_fs3; f32 temp_fs4; @@ -3090,36 +3108,37 @@ void Title_801903B8(void) { } } -void Title_801906A0(void) { +// Draws the Starfox and N64 logos +void Title_Logos_Draw(void) { s32 i; - switch (D_menu_801B7BD4) { - case 0: + switch (sTitleLogoState) { + case TITLE_LOGO_STARFOX_IN: RCP_SetupDL(&gMasterDisp, SETUPDL_85); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, (s32) D_menu_801B7BDC); - TextureRect_CI4(&gMasterDisp, gTextIntroStarfox, gTextIntroStarfoxPalette, 256, 13, 90.0f, 110.0f, 1.0f, - 1.0f); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, (s32) D_menu_801B7BE0); - TextureRect_CI4(&gMasterDisp, gTextIntroIn, gTextIntroInPalette, 32, 13, 150.0f, 110.0f, 1.0f, 1.0f); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, (s32) sStarfoxLogoAlpha); + Lib_TextureRect_CI4(&gMasterDisp, aIntroStarfoxLogoTex, aIntroStarfoxLogoTLUT, 256, 13, 90.0f, 110.0f, 1.0f, + 1.0f); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, (s32) sInAlpha); + Lib_TextureRect_CI4(&gMasterDisp, aIntroInTex, aIntroInTLUT, 32, 13, 150.0f, 110.0f, 1.0f, 1.0f); break; - case 1: + case TITLE_LOGO_NINTENDO_64: RCP_SetupDL(&gMasterDisp, SETUPDL_83); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, (s32) D_menu_801B7BDC); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, (s32) sStarfoxLogoAlpha); for (i = 0; i < 5; i++) { - TextureRect_RGBA16(&gMasterDisp, gTitleNintendo64Logo + (128 * 16 * i), 128, 16, D_menu_801B9070, - D_menu_801B9074 + (16 * i * D_menu_801B907C), D_menu_801B9078, D_menu_801B907C); + Lib_TextureRect_RGBA16(&gMasterDisp, aTitleN64LogoTex + (128 * 16 * i), 128, 16, D_menu_801B9070, + D_menu_801B9074 + (16 * i * D_menu_801B907C), D_menu_801B9078, D_menu_801B907C); } - TextureRect_RGBA16(&gMasterDisp, gTitleNintendo64Logo + (128 * 16 * 5), 128, 8, D_menu_801B9070, - (80.0f * D_menu_801B907C) + D_menu_801B9074, D_menu_801B9078, D_menu_801B907C); + Lib_TextureRect_RGBA16(&gMasterDisp, aTitleN64LogoTex + (128 * 16 * 5), 128, 8, D_menu_801B9070, + (80.0f * D_menu_801B907C) + D_menu_801B9074, D_menu_801B9078, D_menu_801B907C); - case -1: + case TITLE_LOGO_NONE: break; } } -void Title_80190950(void) { +void Title_GreatFoxDeck_Draw(void) { Lights_SetOneLight(&gMasterDisp, D_menu_801B82E0, D_menu_801B82E4, D_menu_801B82E8, 0, 0, 0, gAmbientR, gAmbientG, gAmbientB); RCP_SetupDL(&gMasterDisp, SETUPDL_23); @@ -3129,132 +3148,133 @@ void Title_80190950(void) { Matrix_Scale(gGfxMatrix, 0.4f, 0.4f, 0.4f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_TITLE_6018D40); + gSPDisplayList(gMasterDisp++, aTitleGreatFoxDeckDL); if (D_menu_801B7BE4 != 0) { - Title_80190A98(); + Title_GreatFoxDeckPlatform_Draw(); } Matrix_Pop(&gGfxMatrix); } -void Title_80190A98(void) { +void Title_GreatFoxDeckPlatform_Draw(void) { Matrix_Translate(gGfxMatrix, 401.0f, -249.0f, -22.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_TITLE_602A720); + gSPDisplayList(gMasterDisp++, aTitleGreatFoxDeckPlatformDL); } -void Title_80190B30(s32 arg0) { +void Title_GreatFoxDeckLauncher_Draw(TitleTeam teamidx) { Lights_SetOneLight(&gMasterDisp, D_menu_801B82E0, D_menu_801B82E4, D_menu_801B82E8, gLight1R, gLight1G, gLight1B, gAmbientR, gAmbientG, gAmbientB); RCP_SetupDL(&gMasterDisp, SETUPDL_23); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_menu_801B84E8[arg0].unk_00.x, -12.8f, D_menu_801B9044, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sTitleArwing[teamidx].pos.x, -12.8f, sTitleDeckLauncherZpos, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.8f, 0.8f, 0.8f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_TITLE_601C7C0); + gSPDisplayList(gMasterDisp++, aTitleGreatFoxDeckLauncherDL); Matrix_Pop(&gGfxMatrix); } -void Title_80190C9C(void) { +void Title_TitleCard_Draw(void) { s32 i; - static f32 D_menu_801AE55C = 89.0f; - static f32 D_menu_801AE560 = 17.0f; - static f32 D_menu_801AE564 = 101.0f; - static f32 D_menu_801AE568 = 197.0f; + static f32 aTitleGreatFoxCardXpos = 89.0f; + static f32 aTitleGreatFoxCardYpos = 17.0f; + static f32 sTitleArwingCardXpos = 101.0f; + static f32 sTitleArwingCardYpos = 197.0f; - switch (D_menu_801B7BF0) { - case 0: + switch (sTitleCardState) { + case TITLE_CARD_NONE: break; - case 1: + case TITLE_CARD_GREAT_FOX: RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_IA8(&gMasterDisp, gTitleGreatFoxCard, 144, 28, D_menu_801AE55C, D_menu_801AE560, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aTitleGreatFoxCardTex, 144, 28, aTitleGreatFoxCardXpos, + aTitleGreatFoxCardYpos, 1.0f, 1.0f); break; - case 2: + case TITLE_CARD_ARWING: RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); for (i = 0; i < 4; i++) { - TextureRect_IA8(&gMasterDisp, gTitleArwingCard + (112 * 6 * i), 112, 6, D_menu_801AE564, - D_menu_801AE568 + (6.0f * i), 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aTitleArwingCardTex + (112 * 6 * i), 112, 6, sTitleArwingCardXpos, + sTitleArwingCardYpos + (6.0f * i), 1.0f, 1.0f); } - TextureRect_IA8(&gMasterDisp, gTitleArwingCard + (112 * 6 * 4), 112, 2, D_menu_801AE564, - D_menu_801AE568 + (6.0f * 4), 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aTitleArwingCardTex + (112 * 6 * 4), 112, 2, sTitleArwingCardXpos, + sTitleArwingCardYpos + (6.0f * 4), 1.0f, 1.0f); } } -void Title_80190E64(void) { - if (D_menu_801B82C4 == 0) { - Title_80190FD0(); +// Redirect to either Title Screen or Option menu +void Title_NextState_Check(void) { + if (sCutsceneState == TITLE_SCREEN) { + Title_NextState_OptionMenu(); } else { - Title_80190EA4(); + Title_NextState_TitleScreen(); } } -void Title_80190EA4(void) { - switch (D_menu_801B8280) { - case 0: +void Title_NextState_TitleScreen(void) { + switch (sLevelStartState) { + case 0: // Wait for input if (gControllerPress[gMainController].button & - (START_BUTTON | A_BUTTON | B_BUTTON | D_CBUTTONS | L_CBUTTONS | U_CBUTTONS | - R_CBUTTONS)) { // START, A, B, C-left, C-Down, C-Up, C-Right + (START_BUTTON | A_BUTTON | B_BUTTON | D_CBUTTONS | L_CBUTTONS | U_CBUTTONS | R_CBUTTONS)) { AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); - D_menu_801B8284 = 0; - D_menu_801B8280 = 1; + sWipeHeight = 0; + sLevelStartState = true; gControllerLock = 30; } break; - case 1: - if (D_menu_801B8284 < 120) { - D_menu_801B8284 += 18; + case 1: // Go to the title screen + if (sWipeHeight < 120) { + sWipeHeight += 18; } else { AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_23); gStarCount = 0; gRadioState = 0; - D_menu_801B82C0 = 0; + sSceneState = 0; gDrawMode = DRAW_NONE; - D_menu_801B82C4 = 0; + sCutsceneState = TITLE_SCREEN; gControllerLock = 30; - D_menu_801B8284 = 0; - D_menu_801B8280 = 0; + sWipeHeight = 0; + sLevelStartState = false; } break; } } -void Title_80190FD0(void) { +void Title_NextState_OptionMenu(void) { if (gControllerLock == 0) { - switch (D_menu_801B8280) { - case 0: + switch (sLevelStartState) { + case 0: // Wait for input if (((gControllerPress[gMainController].button & START_BUTTON) || (gControllerPress[gMainController].button & A_BUTTON)) && - (D_menu_801B8280 == 0)) { + !sLevelStartState) { AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 30); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 30); - D_menu_801B8284 = 0; - D_menu_801B8280 = 1; + sWipeHeight = 0; + sLevelStartState = true; } break; - case 1: - if (D_menu_801B8284 < 120) { - D_menu_801B8284 += 18; + case 1: // Go to the Option Menu + if (sWipeHeight < 120) { + sWipeHeight += 18; } else { gGameState = GSTATE_MENU; gNextGameStateTimer = 2; gOptionMenuStatus = OPTION_WAIT; gDrawMode = DRAW_NONE; gStarCount = 0; - D_menu_801B8280 = 0; - D_menu_801B8284 = 0; + sLevelStartState = false; + sWipeHeight = 0; gControllerLock = 3; } break; @@ -3262,29 +3282,29 @@ void Title_80190FD0(void) { } } -void Title_8019111C(void) { - f32 x; - f32 y; +void Title_Screen_Input(void) { + f32 stickX; + f32 stickY; - if ((D_menu_801B82B0 == 0) && (D_menu_801B9040 == 0) && + if ((D_menu_801B82B0 == 0) && !D_menu_801B9040 && ((gControllerPress[gMainController].stick_x != 0) || (gControllerPress[gMainController].stick_y != 0))) { - D_menu_801B9040 = 1; - D_menu_801B86A4 = 0; + D_menu_801B9040 = true; + D_menu_801B86A4 = false; } - x = gControllerPress[gMainController].stick_x; - y = gControllerPress[gMainController].stick_y; + stickX = gControllerPress[gMainController].stick_x; + stickY = gControllerPress[gMainController].stick_y; - if (D_menu_801B9040 != 0) { - if (((x * 0.2f) + D_menu_801B905C > -500.0f) && ((x * 0.2f) + D_menu_801B905C < 500.0f)) { - D_menu_801B905C += x * 0.2f; + if (D_menu_801B9040) { + if (((D_menu_801B905C + (stickX * 0.2f)) > -500.0f) && ((D_menu_801B905C + (stickX * 0.2f)) < 500.0f)) { + D_menu_801B905C += stickX * 0.2f; } - if (((y * 0.2f) + D_menu_801B9060 > -500.0f) && ((y * 0.2f) + D_menu_801B9060 < 500.0f)) { - D_menu_801B9060 += y * 0.2f; + if (((D_menu_801B9060 + (stickY * 0.2f)) > -500.0f) && ((D_menu_801B9060 + (stickY * 0.2f)) < 500.0f)) { + D_menu_801B9060 += stickY * 0.2f; } } - if ((D_menu_801B9040 != 0) && (gControllerPress[gMainController].stick_x == 0) && + if (D_menu_801B9040 && (gControllerPress[gMainController].stick_x == 0) && (gControllerPress[gMainController].stick_y == 0)) { D_menu_801B86A4++; } else { @@ -3292,7 +3312,7 @@ void Title_8019111C(void) { } } -void Title_801912A0(void) { +void Title_ScreenFade_Update(void) { switch (D_menu_801B869C) { case 0: gFillScreenAlpha -= 4; @@ -3312,8 +3332,8 @@ void Title_801912A0(void) { } } -void Title_80191320(s32 arg0, f32* arg1, f32* arg2, f32* arg3, f32* arg4, f32* arg5, f32* arg6, f32 arg7, f32 arg8, - f32 arg9) { +void Title_SetCamUp3(bool arg0, f32* arg1, f32* arg2, f32* arg3, f32* arg4, f32* arg5, f32* arg6, f32 arg7, f32 arg8, + f32 arg9) { Vec3f sp54; Vec3f sp48; f32* sp44; @@ -3323,7 +3343,7 @@ void Title_80191320(s32 arg0, f32* arg1, f32* arg2, f32* arg3, f32* arg4, f32* a f32* var_v0; f32* var_v1; - if (arg0 != 0) { + if (arg0) { var_v0 = arg4; var_v1 = arg5; var_t0 = arg6; @@ -3361,117 +3381,117 @@ void Title_80191320(s32 arg0, f32* arg1, f32* arg2, f32* arg3, f32* arg4, f32* a Matrix_RotateX(gCalcMatrix, M_DTOR * arg7, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &sp48, &sp54); - D_menu_801B829C = sp54.x; - D_menu_801B82A0 = sp54.y; - D_menu_801B82A4 = sp54.z; + sTitleCamUpX = sp54.x; + sTitleCamUpY = sp54.y; + sTitleCamUpZ = sp54.z; } -void Title_801914AC(f32 arg0, f32 arg1, f32 arg2, f32* arg3, f32* arg4, f32* arg5, f32 arg6, f32* arg7, f32* arg8, - f32* arg9, f32 argA, f32 argB, f32 argC) { - Vec3f sp44; - Vec3f sp38; +void Title_SetCamUp2(f32 arg0, f32 arg1, f32 arg2, f32* arg3, f32* arg4, f32* arg5, f32 arg6, f32* arg7, f32* arg8, + f32* arg9, f32 argA, f32 argB, f32 argC) { + Vec3f dest; + Vec3f src; - sp38.x = 0.0f; - sp38.y = 0.0f; - sp38.z = argA; + src.x = 0.0f; + src.y = 0.0f; + src.z = argA; Matrix_Translate(gCalcMatrix, arg0, arg1, arg2, MTXF_NEW); Matrix_RotateY(gCalcMatrix, M_DTOR * argC, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, M_DTOR * argB, MTXF_APPLY); - Matrix_MultVec3f(gCalcMatrix, &sp38, &sp44); + Matrix_MultVec3f(gCalcMatrix, &src, &dest); - *arg7 = sp44.x; - *arg8 = sp44.y; - *arg9 = sp44.z; + *arg7 = dest.x; + *arg8 = dest.y; + *arg9 = dest.z; - sp38.x = 0.0f; - sp38.y = 0.0f; - sp38.z = arg6; + src.x = 0.0f; + src.y = 0.0f; + src.z = arg6; Matrix_Translate(gCalcMatrix, arg0, arg1, arg2, MTXF_NEW); Matrix_RotateY(gCalcMatrix, M_DTOR * argC, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, M_DTOR * argB, MTXF_APPLY); - Matrix_MultVec3f(gCalcMatrix, &sp38, &sp44); + Matrix_MultVec3f(gCalcMatrix, &src, &dest); - *arg3 = sp44.x; - *arg4 = sp44.y; - *arg5 = sp44.z; + *arg3 = dest.x; + *arg4 = dest.y; + *arg5 = dest.z; - sp38.x = 0.0f; - sp38.y = 1.0f; - sp38.z = 0.0f; + src.x = 0.0f; + src.y = 1.0f; + src.z = 0.0f; Matrix_RotateY(gCalcMatrix, M_DTOR * argC, MTXF_NEW); Matrix_RotateX(gCalcMatrix, M_DTOR * argB, MTXF_APPLY); - Matrix_MultVec3f(gCalcMatrix, &sp38, &sp44); + Matrix_MultVec3f(gCalcMatrix, &src, &dest); - D_menu_801B829C = sp44.x; - D_menu_801B82A0 = sp44.y; - D_menu_801B82A4 = sp44.z; + sTitleCamUpX = dest.x; + sTitleCamUpY = dest.y; + sTitleCamUpZ = dest.z; } -void Title_80191674(f32 arg0, f32 arg1, f32 arg2, f32* arg3, f32* arg4, f32* arg5) { - f32 sp34; - f32 sp30; - Vec3f sp24; - Vec3f sp18; +void Title_SetLightRot(f32 xRot, f32 yRot, f32 zSrc, f32* dirX, f32* dirY, f32* dirZ) { + f32 xRotTarget; + f32 yRotTarget; + Vec3f dest; + Vec3f src; - sp18.x = 0.0f; - sp18.y = 0.0f; - sp18.z = arg2; + src.x = 0.0f; + src.y = 0.0f; + src.z = zSrc; - Title_80191798(&sp34, &sp30); + Title_GetCamRot(&xRotTarget, &yRotTarget); - Matrix_RotateX(gCalcMatrix, M_DTOR * -sp34, MTXF_NEW); - Matrix_RotateY(gCalcMatrix, M_DTOR * -sp30, MTXF_APPLY); - Matrix_RotateY(gCalcMatrix, M_DTOR * arg1, MTXF_APPLY); - Matrix_RotateX(gCalcMatrix, M_DTOR * arg0, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, M_DTOR * -xRotTarget, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, M_DTOR * -yRotTarget, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, M_DTOR * yRot, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, M_DTOR * xRot, MTXF_APPLY); - Matrix_MultVec3f(gCalcMatrix, &sp18, &sp24); + Matrix_MultVec3f(gCalcMatrix, &src, &dest); - *arg3 = sp24.x; - *arg4 = sp24.y; - *arg5 = sp24.z; + *dirX = dest.x; + *dirY = dest.y; + *dirZ = dest.z; } -void Title_80191798(f32* arg0, f32* arg1) { - f32 temp_fv1 = gCsCamEyeX - gCsCamAtX; - f32 temp_fv2 = gCsCamEyeY - gCsCamAtY; - f32 temp_ft4 = gCsCamEyeZ - gCsCamAtZ; +void Title_GetCamRot(f32* xRot, f32* yRot) { + f32 x = gCsCamEyeX - gCsCamAtX; + f32 y = gCsCamEyeY - gCsCamAtY; + f32 z = gCsCamEyeZ - gCsCamAtZ; - *arg0 = -Math_Atan2F(temp_fv2, sqrtf(SQ(temp_fv1) + SQ(temp_ft4))) * M_RTOD; - *arg1 = Math_Atan2F(temp_fv1, temp_ft4) * M_RTOD; + *xRot = -Math_Atan2F(y, sqrtf(SQ(x) + SQ(z))) * M_RTOD; + *yRot = +Math_Atan2F(x, z) * M_RTOD; } -void Title_80191844(f32 arg0, f32 arg1) { - Vec3f sp24; - Vec3f sp18; +void Title_SetCamUp(f32 xRot, f32 yRot) { + Vec3f dest; + Vec3f src; - sp18.x = 0.0f; - sp18.y = 1.0f; - sp18.z = 0.0f; + src.x = 0.0f; + src.y = 1.0f; + src.z = 0.0f; - Matrix_RotateY(gCalcMatrix, M_DTOR * arg1, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, M_DTOR * arg0, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, M_DTOR * yRot, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, M_DTOR * xRot, MTXF_APPLY); - Matrix_MultVec3f(gCalcMatrix, &sp18, &sp24); + Matrix_MultVec3f(gCalcMatrix, &src, &dest); - D_menu_801B829C = sp24.x; - D_menu_801B82A0 = sp24.y; - D_menu_801B82A4 = sp24.z; + sTitleCamUpX = dest.x; + sTitleCamUpY = dest.y; + sTitleCamUpZ = dest.z; } -void Title_801918FC(void) { +void Title_Matrix_Push(void) { Matrix_Push(&gGfxMatrix); - Matrix_LookAt(gGfxMatrix, gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ, D_menu_801B829C, - D_menu_801B82A0, D_menu_801B82A4, MTXF_APPLY); + Matrix_LookAt(gGfxMatrix, gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ, sTitleCamUpX, + sTitleCamUpY, sTitleCamUpZ, MTXF_APPLY); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); } -void Title_801919C4(u16** msgList, RadioCharacterId character) { +void Title_Radio_PlayMessage(u16** msgList, RadioCharacterId character) { gRadioMsgList = msgList; gRadioMsgListIndex = 0; gRadioMsg = msgList[gRadioMsgListIndex]; diff --git a/src/overlays/ovl_menu/fox_title.h b/src/overlays/ovl_menu/fox_title.h index e6064c41..f6f33717 100644 --- a/src/overlays/ovl_menu/fox_title.h +++ b/src/overlays/ovl_menu/fox_title.h @@ -3,16 +3,57 @@ #include "global.h" -typedef struct { - /* 0x00 */ f32 unk_0; - /* 0x04 */ f32 unk_4; - /* 0x08 */ f32 unk_8; -} UnkStruct_D_menu_801ADF54; // size = 0xC +typedef enum TitleStates { + /* 0 */ TITLE_IDLE, + /* 1 */ TITLE_SETUP, + /* 2 */ TITLE_UPDATE_ENTRY +} TitleStates; -typedef struct UnkStruct_D_801B8350 { - /* 0x00 */ Vec3f unk_00; +typedef enum TitleTeam { + /* 0 */ TEAM_FOX, + /* 1 */ TEAM_FALCO, + /* 2 */ TEAM_PEPPY, + /* 3 */ TEAM_SLIPPY +} TitleTeam; + +typedef enum TitleCsStates { + /* 0 */ TITLE_SCREEN, // In the Title Screen. + /* 1 */ TITLE_GREAT_FOX_TRAVELING, // Close up to the Great Fox while it's traveling to corneria. + /* 2 */ TITLE_CS_TEAM_RUNNING, // Team is running in Great Fox's the passage way before take-off. + /* 3 */ TITLE_GREAT_FOX_CLOSE_UP, // Closing up to the Great Fox before take-off. + /* 4 */ TITLE_TAKE_OFF, // Take-off cutscene. + /* 5 */ TITLE_TAKE_OFF_SPACE, // Arwings coming out of the Great Fox out to space. + /* 7 */ TITLE_RANKING = 7 // Show ranking +} TitleCsStates; + +typedef enum TitleCardStates { + /* 0 */ TITLE_CARD_NONE, + /* 1 */ TITLE_CARD_GREAT_FOX, + /* 2 */ TITLE_CARD_ARWING +} TitleCardStates; + +typedef enum TitleLogoStates { + /* -1 */ TITLE_LOGO_NONE = -1, + /* 0 */ TITLE_LOGO_STARFOX_IN, + /* 1 */ TITLE_LOGO_NINTENDO_64 +} TitleLogoStates; + +typedef struct AmbientRGB { + /* 0x00 */ f32 r; + /* 0x04 */ f32 g; + /* 0x08 */ f32 b; +} AmbientRGB; // size = 0xC + +typedef struct { + /* 0x00 */ Animation* cutscene; + /* 0x04 */ Animation* title; + /* 0x08 */ Limb** skeleton; +} TitleAnimation; // size = 0x0C + +typedef struct TitleTeamInfo { + /* 0x00 */ Vec3f pos; /* 0x0C */ f32 unk_0C; - /* 0x10 */ f32 unk_10; + /* 0x10 */ f32 shadowScale; /* 0x14 */ f32 unk_14; /* 0x18 */ f32 unk_18; /* 0x1C */ f32 unk_1C; @@ -29,49 +70,49 @@ typedef struct UnkStruct_D_801B8350 { /* 0x48 */ f32 unk_48; /* 0x4C */ f32 unk_4C; /* 0x50 */ f32 unk_50; - /* 0x54 */ s32 unk_54; - /* 0x58 */ s32 unk_58; + /* 0x54 */ bool unk_54; + /* 0x58 */ s32 frameCount; /* 0x5C */ s32 unk_5C; -} UnkStruct_D_801B8350; // size = 0x60 +} TitleTeamInfo; // size = 0x60 -typedef struct { - /* 0x00 */ Vec3f unk_00; - /* 0x0C */ f32 unk_0C; - /* 0x10 */ f32 unk_10; +typedef struct TitleArwingInfo { + /* 0x00 */ Vec3f pos; + /* 0x0C */ f32 scale; + /* 0x10 */ f32 vel; // Assumption /* 0x14 */ char pad14[0x4]; - /* 0x18 */ f32 unk_18; - /* 0x1C */ f32 unk_1C; - /* 0x20 */ f32 unk_20; - /* 0x24 */ f32 unk_24; - /* 0x28 */ f32 unk_28; - /* 0x2C */ f32 unk_2C; - /* 0x30 */ f32 unk_30; - /* 0x34 */ s32 unk_34; - /* 0x38 */ s32 unk_38; - /* 0x3C */ s32 unk_3C; - /* 0x40 */ s32 unk_40; - /* 0x44 */ f32 unk_44; - /* 0x48 */ s32 unk_48; - /* 0x4C */ s32 unk_4C; - /* 0x50 */ f32 unk_50[3]; -} UnkStruct_D_menu_801B84E8; // size = 0x5C + /* 0x18 */ f32 xRot; + /* 0x1C */ f32 yRot; + /* 0x20 */ f32 zRot; + /* 0x24 */ f32 cockpitGlassXrot; + /* 0x28 */ f32 laserGunsYpos; + /* 0x2C */ f32 teamFaceXrot; + /* 0x30 */ f32 teamFaceYrot; + /* 0x34 */ s32 drawFace; + /* 0x38 */ s32 timer; // Used for closing the cockpit glass and take off + /* 0x3C */ s32 unk_3C; // Related to engine glow. Investigate + /* 0x40 */ s32 unk_40; // Related to engine glow. Investigate + /* 0x44 */ f32 unk_44; // Related to engine glow. Investigate + /* 0x48 */ bool drawShadow; + /* 0x4C */ bool draw; + /* 0x50 */ f32 sfxSource[3]; +} TitleArwingInfo; // size = 0x5C typedef struct { /* 0x00 */ Vec3f pos; /* 0x0C */ char pad0C[0x4]; - /* 0x10 */ f32 angleX; - /* 0x14 */ f32 angleY; - /* 0x18 */ f32 angleZ; + /* 0x10 */ f32 xRot; + /* 0x14 */ f32 yRot; + /* 0x18 */ f32 zRot; /* 0x1C */ f32 scale; /* 0x20 */ char pad20[0x4]; - /* 0x24 */ f32 unk_24[3]; -} UnkStruct_D_menu_801B8658; // size = 0x30 + /* 0x24 */ f32 sfxSource[3]; +} TitleGreatFoxInfo; // size = 0x30 typedef struct { /* 0x00 */ Vec3f pos; - /* 0x0C */ s32 unk_0C; + /* 0x0C */ bool draw; /* 0x10 */ f32 scale; -} UnkStruct_D_menu_801B8688; // size = 0x14 +} TitleCorneria; // size = 0x14 extern CameraPoint D_menu_801B6B40[]; extern CameraPoint D_menu_801B6C60[]; @@ -81,22 +122,22 @@ extern f32 D_menu_801B7BB8; extern f32 D_menu_801B7BBC; extern f32 D_menu_801B7BC0; extern f32 D_menu_801B7BC4; -extern f32 D_menu_801B7BC8; -extern f32 D_menu_801B7BCC; +extern f32 sTitleTextPrimCol; +extern f32 sTitleTextPrimColTarget; extern s32 D_menu_801B7BD0; -extern s32 D_menu_801B7BD4; +extern TitleLogoStates sTitleLogoState; extern s32 D_menu_801B7BD8; -extern f32 D_menu_801B7BDC; -extern f32 D_menu_801B7BE0; +extern f32 sStarfoxLogoAlpha; +extern f32 sInAlpha; extern s32 D_menu_801B7BE4; extern f32 D_menu_801B7BE8; extern s32 D_menu_801B7BEC; -extern s32 D_menu_801B7BF0; +extern TitleCardStates sTitleCardState; extern f32 D_menu_801B7BF8[10]; extern f32 D_menu_801B7C20[10]; extern f32 D_menu_801B7C48[10]; extern f32 D_menu_801B7C70[10]; -extern s32 D_menu_801B7C98; +extern s32 sMaxExplosions; extern s32 D_menu_801B7CA0[10]; extern s32 D_menu_801B7CC8[10]; extern s32 D_menu_801B7CF0[10]; @@ -109,30 +150,30 @@ extern f32 D_menu_801B7FC0[40]; extern f32 D_menu_801B8060[40]; extern s32 D_menu_801B8100; extern s32 D_menu_801B8108[40]; -extern s32 D_menu_801B81A8[10][3]; -extern s32 D_menu_801B8220[10]; -extern u8 D_menu_801B8248[10][4]; +extern s32 gRankingTeamAlive[10][3]; +extern s32 gTotalHitsRanking[10]; +extern u8 sRankNameEntry[10][4]; extern UNK_TYPE D_menu_801B8270[3]; -extern s32 D_menu_801B827C; -extern s32 D_menu_801B8280; -extern s32 D_menu_801B8284; -extern s32 D_menu_801B8288; +extern bool gGoToTitle; +extern bool sLevelStartState; +extern s32 sWipeHeight; +extern s32 sTitleRankMaxRecords; extern f32 D_menu_801B828C; extern f32 D_menu_801B8290; extern CameraPoint* D_menu_801B8294; extern s32 D_menu_801B8298; -extern f32 D_menu_801B829C; -extern f32 D_menu_801B82A0; -extern f32 D_menu_801B82A4; -extern s32 D_menu_801B82A8; -extern s32 D_menu_801B82AC; +extern f32 sTitleCamUpX; +extern f32 sTitleCamUpY; +extern f32 sTitleCamUpZ; +extern s32 sTimer1; +extern s32 sTimer2; extern s32 D_menu_801B82B0; -extern s32 D_menu_801B82B4; -extern s32 D_menu_801B82B8; +extern s32 sTimer3; +extern s32 sTitleMsgFrameCount; extern s32 D_menu_801B82BC; -extern s32 D_menu_801B82C0; -extern s32 D_menu_801B82C4; -extern f32 D_menu_801B82C8; +extern s32 sSceneState; +extern s32 sCutsceneState; +extern f32 sPassageWayZoffset; extern f32 D_menu_801B82CC; extern f32 D_menu_801B82D0; extern f32 D_menu_801B82D4; @@ -156,24 +197,24 @@ extern s32 D_menu_801B8318; extern s32 D_menu_801B831C; extern s32 D_menu_801B8320; extern s32 D_menu_801B8324; -extern f32 D_menu_801B8328; -extern f32 D_menu_801B832C; -extern f32 D_menu_801B8330; +extern f32 sAmbientR; +extern f32 sAmbientG; +extern f32 sAmbientB; extern s32 D_menu_801B8334; extern bool D_menu_801B8338; extern f32 D_menu_801B833C; -extern s32 D_menu_801B8340; -extern s32 D_menu_801B8344; -extern s32 D_menu_801B8348; -extern UnkStruct_D_801B8350 D_menu_801B8350[4]; +extern TitleTeam D_menu_801B8340; +extern bool sDrawTeamName; +extern bool D_menu_801B8348; +extern TitleTeamInfo sTitleTeam[4]; extern f32 D_menu_801B84D0; extern f32 D_menu_801B84D4; extern f32 D_menu_801B84D8[3]; -extern UnkStruct_D_menu_801B84E8 D_menu_801B84E8[4]; -extern UnkStruct_D_menu_801B8658 D_menu_801B8658; -extern UnkStruct_D_menu_801B8688 D_menu_801B8688; +extern TitleArwingInfo sTitleArwing[4]; +extern TitleGreatFoxInfo sTitleGreatFox; +extern TitleCorneria sTitleCorneria; extern s32 D_menu_801B869C; -extern s32 D_menu_801B86A0; +extern bool sDrawTakeOffSpace; extern s32 D_menu_801B86A4; extern f32 D_menu_801B86A8; extern f32 D_menu_801B86AC; @@ -189,14 +230,14 @@ extern f32 D_menu_801B86D0; extern f32 D_menu_801B86D4; extern f32 D_menu_801B86D8; extern f32 D_menu_801B86DC; -extern Vec3f D_menu_801B86E0[4][50]; -extern s32 D_menu_801B9040; -extern f32 D_menu_801B9044; +extern Vec3f sCharFrameTable[4][50]; +extern bool D_menu_801B9040; +extern f32 sTitleDeckLauncherZpos; extern f32 D_menu_801B9048; extern f32 D_menu_801B904C; extern f32 D_menu_801B9050; -extern f32 D_menu_801B9054; -extern f32 D_menu_801B9058; +extern f32 sTitleStarfoxLogoXpos; +extern f32 sTitleStarfoxLogoYpos; extern f32 D_menu_801B905C; extern f32 D_menu_801B9060; extern f32 D_menu_801B9064; @@ -209,66 +250,65 @@ extern f32 D_menu_801B907C; extern f32 D_menu_801B9080; extern f32 D_menu_801B9084; -void Title_8019111C(void); -void Title_8018CC30(CameraPoint*, s32, f32); -void Title_8018CD9C(CameraPoint *pos, CameraPoint *arg1, f32 weight, s32 arg3); -void Title_8018D510(s32); -void Title_8018D80C(s32); -void Title_8018DDB8(s32); -void Title_8018DF0C(f32 arg0); -void Title_8018E058(void); -void Title_8018E200(void); -bool Title_8018EDC8(s32, Gfx **, Vec3f *, Vec3f *, void *); -void Title_8018E67C(s32); -void Title_8018F438(void); -void Title_80190144(void); -void Title_801903B8(void); -void Title_80190950(void); -void Title_80190A98(void); -void Title_80190B30(s32 arg0); -void Title_80190EA4(void); -void Title_80190FD0(void); -void Title_801912A0(void); -void Title_80191320(s32 arg0, f32* arg1, f32* arg2, f32* arg3, f32* arg4, f32* arg5, f32* arg6, f32 arg7, - f32 arg8, f32 arg9); -void Title_801914AC(f32 arg0, f32 arg1, f32 arg2, f32* arg3, f32* arg4, f32* arg5, f32 arg6, f32* arg7, f32* arg8, - f32* arg9, f32 argA, f32 argB, f32 argC); -void Title_80191798(f32* arg0, f32* arg1); -void Title_80191844(f32 arg0, f32 arg1); -void Title_801918FC(void); -void Title_801919C4(u16** msgList, RadioCharacterId character); -s32 Title_80188010(void); -void Title_80190C9C(void); -void Title_8018D2B8(s32); -void Title_8018EA78(s32); -void Title_801906A0(void); +void Title_Screen_Input(void); +void Title_Cutscene_SetCamera(CameraPoint*, s32, f32); +void Title_Camera_Calc(CameraPoint* pos, CameraPoint* arg1, f32 weight, s32 arg3); +void Title_Arwing_DrawEngineGlow(TitleTeam); +void Title_EngineGlowParticles_Draw(TitleTeam); +void Title_ArwingShadow_Draw(s32); +void Title_Corneria_Draw(f32 zPos); +void Title_GreatFox_Draw(void); +void Title_CorneriaExplosions_Draw(void); +bool Title_Team_OverrideLimbDraw(s32, Gfx**, Vec3f*, Vec3f*, void*); +void Title_TeamRunning_Draw(TitleTeam); +void Title_Passage_Draw(void); +void Title_Sun_Draw(void); +void Title_SunGlare2_Draw(void); +void Title_GreatFoxDeck_Draw(void); +void Title_GreatFoxDeckPlatform_Draw(void); +void Title_GreatFoxDeckLauncher_Draw(TitleTeam teamidx); +void Title_NextState_TitleScreen(void); +void Title_NextState_OptionMenu(void); +void Title_ScreenFade_Update(void); +void Title_SetCamUp3(bool arg0, f32* arg1, f32* arg2, f32* arg3, f32* arg4, f32* arg5, f32* arg6, f32 arg7, f32 arg8, + f32 arg9); +void Title_SetCamUp2(f32 arg0, f32 arg1, f32 arg2, f32* arg3, f32* arg4, f32* arg5, f32 arg6, f32* arg7, f32* arg8, + f32* arg9, f32 argA, f32 argB, f32 argC); +void Title_GetCamRot(f32* xRot, f32* yRot); +void Title_SetCamUp(f32 xRot, f32 yRot); +void Title_Matrix_Push(void); +void Title_Radio_PlayMessage(u16** msgList, RadioCharacterId character); +s32 Title_GetRankTotalHits(void); +void Title_TitleCard_Draw(void); +void Title_Arwing_Draw(TitleTeam); +void Title_Team_Draw(TitleTeam); +void Title_Logos_Draw(void); void Title_UpdateEntry(void); - s32 Title_80187ABC(void); -void Title_80187B00(void); -void Title_80187E28(void); -void Title_801888E8(void); -void Title_8018994C(void); -void Title_8018A644(void); -void Title_8018ACEC(void); -void Title_8018B5C4(void); -void Title_8018C644(void); -void Title_80187CA8(void); -s32 Title_80188010(void); -void Title_80189208(void); -void Title_8018A2F8(void); -void Title_8018A990(void); -void Title_8018B038(void); -void Title_8018C114(void); -void Title_8018CB90(void); -void Title_8018F680(void); -void Title_8018F77C(void); -void Title_8018F85C(void); -void Title_8018F8E4(void); -void Title_8018FC14(void); -void Title_8018FD08(void); -void Title_8018FF74(void); -void Title_80190E64(void); -void Title_80191674(f32, f32, f32, f32*, f32*, f32*); - +s32 Title_CheckControllers(void); +void Title_Ranking_Update(void); +void Title_RankingData_Draw(void); +void Title_Screen_Update(void); +void Title_CsGreatFoxTraveling_Update(void); +void Title_CsTeamRunning_Update(void); +void Title_CsGreatFoxCloseUp_Update(void); +void Title_CsTakeOff_Update(void); +void Title_CsTakeOffSpace_Update(void); +void Title_Ranking_Draw(void); +s32 Title_GetRankTotalHits(void); +void Title_Screen_Draw(void); +void Title_CsGreatFoxTraveling_Draw(void); +void Title_CsTeamRunning_Draw(void); +void Title_CsGreatFoxCloseUp_Draw(void); +void Title_CsTakeOff_Draw(void); +void Title_CsTakeOffSpace_Draw(void); +void Title_StarfoxLogo_Draw(void); +void Title_64Logo_Draw(void); +void Title_CopyrightSymbol_Draw(void); +void Title_PressStart_Draw(void); +void Title_Copyright_Draw(void); +void Title_TeamName_Draw(void); +void Title_SunGlare_Draw(void); +void Title_NextState_Check(void); +void Title_SetLightRot(f32, f32, f32, f32*, f32*, f32*); #endif diff --git a/yamls/jp/rev1/assets.yaml b/yamls/jp/rev1/assets.yaml new file mode 100644 index 00000000..89e749c1 --- /dev/null +++ b/yamls/jp/rev1/assets.yaml @@ -0,0 +1,444 @@ + - name: audio_seq + type: bin + start: 0xE9950 + + - name: audio_bank + type: bin + start: 0x124920 + + - name: audio_table + type: bin + start: 0x143A40 + + - name: ast_common + exclusive_ram_id: segment_01 + type: code + dir: assets + start: 0x844660 + vram: 0x01000000 + subsegments: + - [0x844660, bin, ast_common/ast_common] + + - name: ast_bg_space + exclusive_ram_id: segment_02 + type: code + dir: assets + start: 0x8763F0 + vram: 0x02000000 + subsegments: + - [0x8763F0, bin, ast_bg_space/ast_bg_space] + + - name: ast_bg_planet + exclusive_ram_id: segment_02 + type: code + dir: assets + start: 0x87DBD0 + vram: 0x02000000 + subsegments: + - [0x87DBD0, bin, ast_bg_planet/ast_bg_planet] + + - name: ast_arwing + exclusive_ram_id: segment_03 + type: code + dir: assets + start: 0x88F730 + vram: 0x03000000 + subsegments: + - [0x88F730, bin, ast_arwing/ast_arwing] + + - name: ast_landmaster + exclusive_ram_id: segment_03 + type: code + dir: assets + start: 0x8A9520 + vram: 0x03000000 + subsegments: + - [0x8A9520, bin, ast_landmaster/ast_landmaster] + + - name: ast_blue_marine + exclusive_ram_id: segment_03 + type: code + dir: assets + start: 0x8B1AB0 + vram: 0x03000000 + subsegments: + - [0x8B1AB0, bin, ast_blue_marine/ast_blue_marine] + + - name: ast_versus + exclusive_ram_id: segment_03 + type: code + dir: assets + start: 0x8B8E00 + vram: 0x03000000 + subsegments: + - [0x8B8E00, bin, ast_versus/ast_versus] + + - name: ast_enmy_planet + exclusive_ram_id: segment_04 + type: code + dir: assets + start: 0x8E8AE0 + vram: 0x04000000 + subsegments: + - [0x8E8AE0, bin, ast_enmy_planet/ast_enmy_planet] + + - name: ast_enmy_space + exclusive_ram_id: segment_04 + type: code + dir: assets + start: 0x8F2DE0 + vram: 0x04000000 + subsegments: + - [0x8F2DE0, bin, ast_enmy_space/ast_enmy_space] + + - name: ast_great_fox + exclusive_ram_id: segment_0E + type: code + dir: assets + start: 0x8FF2F0 + vram: 0x0E000000 + subsegments: + - [0x8FF2F0, bin, ast_great_fox/ast_great_fox] + + - name: ast_star_wolf + exclusive_ram_id: segment_0F + type: code + dir: assets + start: 0x911000 + vram: 0x0F000000 + subsegments: + - [0x911000, bin, ast_star_wolf/ast_star_wolf] + + - name: ast_allies + exclusive_ram_id: segment_0D + type: code + dir: assets + start: 0x9257A0 + vram: 0x0D000000 + subsegments: + - [0x9257A0, bin, ast_allies/ast_allies] + + - name: ast_corneria + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0x932200 + vram: 0x06000000 + subsegments: + - [0x932200, bin, ast_corneria/ast_corneria] + + - name: ast_meteo + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0x971980 + vram: 0x06000000 + subsegments: + - [0x971980, bin, ast_meteo/ast_meteo] + + - name: ast_titania + exclusive_ram_id: segment_06 + type: code + dir: assets + vram: 0x06000000 + start: 0x9A3370 + subsegments: + - [0x9A3370, bin, ast_titania/ast_titania] + + - name: ast_7_ti_2 + exclusive_ram_id: segment_07 + type: code + dir: assets + vram: 0x07000000 + start: 0x9AD730 + subsegments: + - [0x9AD730, bin, ast_7_ti_2/ast_7_ti_2] + + - name: ast_8_ti + exclusive_ram_id: segment_08 + type: code + dir: assets + start: 0x9BB980 + vram: 0x08000000 + subsegments: + - [0x9BB980, bin, ast_8_ti/ast_8_ti] + + - name: ast_9_ti + exclusive_ram_id: segment_09 + type: code + dir: assets + start: 0x9C4C20 + vram: 0x09000000 + subsegments: + - [0x9C4C20, bin, ast_9_ti/ast_9_ti] + + - name: ast_A_ti + type: code + dir: assets + exclusive_ram_id: segment_0A + start: 0x9D4D40 + vram: 0x0A000000 + subsegments: + - [0x9D4D40, bin, ast_A_ti/ast_A_ti] + + - name: ast_7_ti_1 + exclusive_ram_id: segment_07 + type: code + dir: assets + start: 0x9DE6E0 + vram: 0x07000000 + subsegments: + - [0x9DE6E0, bin, ast_7_ti_1/ast_7_ti_1] + + - name: ast_sector_x + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0x9ED490 + vram: 0x06000000 + subsegments: + - [0x9ED490, bin, ast_sector_x/ast_sector_x] + + - name: ast_sector_z + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0xA1FCD0 + vram: 0x06000000 + subsegments: + - [0xA1FCD0, bin, ast_sector_z/ast_sector_z] + + - name: ast_aquas + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0xA28E60 + vram: 0x06000000 + subsegments: + - [0xA28E60, bin, ast_aquas/ast_aquas] + + - name: ast_area_6 + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0xA5B8F0 + vram: 0x06000000 + subsegments: + - [0xA5B8F0, bin, ast_area_6/ast_area_6] + + - name: ast_venom_1 + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0xA84390 + vram: 0x06000000 + subsegments: + - [0xA84390, bin, ast_venom_1/ast_venom_1] + + - name: ast_venom_2 + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0xA9E570 + vram: 0x06000000 + subsegments: + - [0xA9E570, bin, ast_venom_2/ast_venom_2] + + - name: ast_ve1_boss + # exclusive_ram_id: segment_06 + exclusive_ram_id: segment_09 + type: code + dir: assets + start: 0xAB36F0 + vram: 0x09000000 + subsegments: + - [0xAB36F0, bin, ast_ve1_boss/ast_ve1_boss] + + - name: ast_bolse + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0xAD8050 + vram: 0x06000000 + subsegments: + - [0xAD8050, bin, ast_bolse/ast_bolse] + + - name: ast_fortuna + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0xAE9DC0 + vram: 0x06000000 + subsegments: + - [0xAE9DC0, bin, ast_fortuna/ast_fortuna] + + - name: ast_sector_y + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0xAF9DC0 + vram: 0x06000000 + subsegments: + - [0xAF9DC0, bin, ast_sector_y/ast_sector_y] + + - name: ast_solar + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0xB2E3F0 + vram: 0x06000000 + subsegments: + - [0xB2E3F0, bin, ast_solar/ast_solar] + + - name: ast_zoness + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0xB51670 + vram: 0x06000000 + subsegments: + - [0xB51670, bin, ast_zoness/ast_zoness] + + - name: ast_katina + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0xB7E0B0 + vram: 0x06000000 + subsegments: + - [0xB7E0B0, bin, ast_katina/ast_katina] + + - name: ast_macbeth + exclusive_ram_id: segment_06 + type: code + dir: assets + vram: 0x06000000 + start: 0xB8F2B0 + subsegments: + - [0xB8F2B0, bin, ast_macbeth/ast_macbeth] + + - name: ast_warp_zone + exclusive_ram_id: segment_07 + type: code + dir: assets + start: 0xBC7460 + vram: 0x07000000 + subsegments: + - [0xBC7460, bin, ast_warp_zone/ast_warp_zone] + + - name: ast_title + exclusive_ram_id: segment_06 + type: code + dir: assets + vram: 0x06000000 + start: 0xBC9230 + subsegments: + - [0xBC9230, bin, ast_title/ast_title] + + - name: ast_map + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0xC12690 + vram: 0x06000000 + subsegments: + - [0xC12690, bin, ast_map/ast_map] + + - name: ast_option + exclusive_ram_id: segment_08 + type: code + dir: assets + start: 0xC6FA00 + vram: 0x08000000 + subsegments: + - [0xC6FA00, bin, ast_option/ast_option] + + - name: ast_vs_menu + exclusive_ram_id: segment_07 + type: code + dir: assets + start: 0xC83960 + vram: 0x07000000 + subsegments: + - [0xC83960, bin, ast_vs_menu/ast_vs_menu] + + - name: ast_text + exclusive_ram_id: segment_05 + type: code + dir: assets + vram: 0x05000000 + start: 0xC98590 + subsegments: + - [0xC98590, bin, ast_text/ast_text] + + - name: ast_font_3d + exclusive_ram_id: segment_09 + type: code + dir: assets + vram: 0x09000000 + start: 0xCA2860 + subsegments: + - [0xCA2860, bin, ast_font_3d/ast_font_3d] + + - name: ast_andross + exclusive_ram_id: segment_0C + type: code + dir: assets + vram: 0x0C000000 + start: 0xCAEA30 + subsegments: + - [0xCAEA30, bin, ast_andross/ast_andross] + + - name: ast_logo + exclusive_ram_id: segment_0F + type: code + dir: assets + start: 0xCE8EC0 + vram: 0x0F000000 + subsegments: + - [0xCE8EC0, bin, ast_logo/ast_logo] + + - name: ast_ending + exclusive_ram_id: segment_07 + type: code + dir: assets + start: 0xCEB3C0 + vram: 0x07000000 + subsegments: + - [0xCEB3C0, bin, ast_ending/ast_ending] + + - name: ast_ending_award_front + exclusive_ram_id: segment_08 + type: code + dir: assets + start: 0xD071C0 + vram: 0x08000000 + subsegments: + - [0xD071C0, bin, ast_ending_award_front/ast_ending_award_front] + + - name: ast_ending_award_back + exclusive_ram_id: segment_08 + type: code + dir: assets + start: 0xD2C240 + vram: 0x08000000 + subsegments: + - [0xD2C240, bin, ast_ending_award_back/ast_ending_award_back] + + - name: ast_ending_expert + exclusive_ram_id: segment_08 + type: code + dir: assets + start: 0xD55CD0 + vram: 0x08000000 + subsegments: + - [0xD55CD0, bin, ast_ending_expert/ast_ending_expert] + + - name: ast_training + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0xD9FDD0 + vram: 0x06000000 + subsegments: + - [0xD9FDD0, bin, ast_training/ast_training] diff --git a/yamls/jp/rev1/header.yaml b/yamls/jp/rev1/header.yaml new file mode 100644 index 00000000..a501bfeb --- /dev/null +++ b/yamls/jp/rev1/header.yaml @@ -0,0 +1,70 @@ +name: Starfox64 JAP REV 1 (v1.1) +sha1: af2875bb8c0ef8135cae75f55e98b6ae44ec7925 +options: + basename: starfox64 + target_path: baserom.jp.rev1.uncompressed.z64 + elf_path: build/starfox64.jp.rev1.elf + ld_script_path: linker_scripts/jp/rev1/starfox64.ld + base_path: . + compiler: IDO + find_file_boundaries: True + header_encoding: ASCII + platform: n64 + undefined_funcs_auto_path: linker_scripts/jp/rev1/auto/undefined_funcs_auto.ld + undefined_syms_auto_path: linker_scripts/jp/rev1/auto/undefined_syms_auto.ld + + symbol_addrs_path: + - linker_scripts/jp/rev1/symbol_addrs.txt + - linker_scripts/jp/rev1/symbol_addrs_fix.txt + - linker_scripts/jp/rev1/symbol_addrs_assets.txt + + asm_path: asm/jp/rev1 + src_path: srcjp + asset_path: bin/jp/rev1 + + build_path: build + + extensions_path: tools/splat_ext + mips_abi_float_regs: o32 + create_asm_dependencies: True + do_c_func_detection: True + o_as_suffix: True + gfx_ucode: f3dex + mnemonic_ljust: 12 + rom_address_padding: True + dump_symbols: True + include_macro_inc: False + libultra_symbols: True + hardware_regs: True + + ld_dependencies: True + + + use_legacy_include_asm: False + + asm_function_macro: glabel + asm_jtbl_label_macro: jlabel + asm_data_macro: dlabel + + ld_legacy_generation: True + check_consecutive_segment_types: False + + # section_order: [".text", ".data", ".rodata", ".bss"] + # auto_all_sections: [".data", ".rodata", ".bss"] + + + + + mips_abi_float_regs: o32 + + + disasm_unknown: True + # string_encoding: ASCII + # data_string_encoding: ASCII + rodata_string_guesser_level: 2 + data_string_guesser_level: 2 + # libultra_symbols: True + # hardware_regs: True + # gfx_ucode: # one of [f3d, f3db, f3dex, f3dexb, f3dex2] +segments: + diff --git a/yamls/jp/rev1/main.yaml b/yamls/jp/rev1/main.yaml new file mode 100644 index 00000000..fe89dba5 --- /dev/null +++ b/yamls/jp/rev1/main.yaml @@ -0,0 +1,37 @@ + - name: makerom + type: code + start: 0x0 + subsegments: + - {start: 0x0, type: header, name: header} + - {start: 0x40, type: textbin, name: ipl3} + - {start: 0x1000, type: asm, vram: 0x80000400, name: entry} + + - name: main + type: code + start: 0x1050 + vram: 0x80000450 + bss_size: 0x95A50 + subsegments: + # Microcode + - [0x01050, textbin, rspboot] + - [0x01120, textbin, aspmain] + - [0x02020, textbin, f3dex] + + # Nintendo libraries + - [0x03450, asm] + + - name: dma_table + type: code + start: 0xE93C0 + vram: 0x8017E210 + follows_vram: main + subsegments: + - [0xE93C0, .data, dmatable] + + - name: buffers + exclusive_ram_id: buffer + type: code + vram: 0x80281000 + bss_size: 0x17F000 + subsegments: + - { type: .bss, vram: 0x80281000, name: buffers } diff --git a/yamls/jp/rev1/overlays.yaml b/yamls/jp/rev1/overlays.yaml new file mode 100644 index 00000000..925cc2db --- /dev/null +++ b/yamls/jp/rev1/overlays.yaml @@ -0,0 +1,234 @@ + - name: ovl_i1 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i1 + start: 0xDA9680 + vram: 0x8017E7A0 + follows_vram: dma_table + bss_size: 0xA10 + symbol_name_format: i1_$VRAM + subsegments: + - [0xDA9680, c, fox_i1] + - [0xDA9690, c, fox_co] + - [0xDB4240, c, fox_ve1] + - [0xDBAA40, c, fox_tr] + - [0xDBADB0, c, fox_tr360] + - [0xDBB930, data, fox_i1] + - [0xDBB940, data, fox_co] + - [0xDBBCA0, data, fox_ve1] + - [0xDBCFB0, data, fox_tr360] + - [0xDBD050, .rodata, fox_co] + - [0xDBD410, .rodata, fox_ve1] + - [0xDBD7A0, .rodata, fox_tr] + - [0xDBD7E0, .rodata, fox_tr360] + - { type: bss, vram: 0x80192940, name: fox_i1 } + - { type: bss, vram: 0x80192950, name: fox_co } + - { type: bss, vram: 0x80192A70, name: fox_ve1 } + + - name: ovl_i2 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i2 + start: 0xDBD820 + vram: 0x8017E7A0 + follows_vram: dma_table + bss_size: 0x30 + symbol_name_format: i2_$VRAM + subsegments: + - [0xDBD820, c, fox_i2] + - [0xDBD830, c, fox_me] + - [0xDC52D0, c, fox_sx] + - [0xDCB6D0, data, fox_i2] + - [0xDCB6E0, data, fox_me] + - [0xDCB8F0, data, fox_sx] + - [0xDCBA40, .rodata, fox_me] + - [0xDCBD00, .rodata, fox_sx] + - { type: bss, vram: 0x8018CFA0, name: fox_i2 } + - { type: bss, vram: 0x8018CFB0, name: fox_sx } + + - name: ovl_i3 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i3 + start: 0xDCC020 + vram: 0x8017E7A0 + follows_vram: dma_table + bss_size: 0x2220 + symbol_name_format: i3_$VRAM + subsegments: + - [0xDCC020, c, fox_i3] + - [0xDCC030, c, fox_a6] + - [0xDD4A50, c, fox_zo] + - [0xDE3300, c, fox_so] + - [0xDED940, c, fox_aq] + - [0xE037D0, data, fox_i3] + - [0xE037E0, data, fox_a6] + - [0xE04090, data, fox_zo] + - [0xE04410, data, fox_so] + - [0xE04690, data, fox_aq] + - [0xE05430, .rodata, fox_a6] + - [0xE058E0, .rodata, fox_zo] + - [0xE06000, .rodata, fox_so] + - [0xE06560, .rodata, fox_aq] + - { type: bss, vram: 0x801B94F0, name: fox_i3 } + - { type: bss, vram: 0x801B9500, name: fox_a6 } + - { type: bss, vram: 0x801B95E0, name: fox_zo } + - { type: bss, vram: 0x801B99F0, name: fox_so } + - { type: bss, vram: 0x801B9A70, name: fox_aq } + + + - name: ovl_i4 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i4 + start: 0xE06D70 + vram: 0x8017E7A0 + follows_vram: dma_table + bss_size: 0x1B0 + symbol_name_format: i4_$VRAM + subsegments: + - [0xE06D70, c, fox_i4] + - [0xE06E40, c, fox_fo] + - [0xE0B580, c, fox_bo] + - [0xE11FD0, c, fox_ka] + - [0xE18DD0, c, fox_sz] + - [0xE1E2A0, data, fox_i4] + - [0xE1E2B0, data, fox_fo] + - [0xE1E350, data, fox_bo] + - [0xE1E5C0, data, fox_ka] + - [0xE1E980, data, fox_sz] + - [0xE1EBA0, .rodata, fox_i4] + - [0xE1EBE0, .rodata, fox_fo] + - [0xE1EDE0, .rodata, fox_bo] + - [0xE1F1E0, .rodata, fox_ka] + - [0xE1F570, .rodata, fox_sz] + - { type: bss, vram: 0x801972A0, name: fox_i4 } + - { type: bss, vram: 0x801972B0, name: fox_bo } + - { type: bss, vram: 0x80197420, name: fox_ka } + - { type: bss, vram: 0x80197440, name: fox_sz } + + + - name: ovl_i5 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i5 + start: 0xE1F870 + vram: 0x8017E7A0 + follows_vram: dma_table + bss_size: 0xAF70 + symbol_name_format: i5_$VRAM + subsegments: + - [0xE1F870, c, fox_i5] + - [0xE1F880, c, fox_ti_cs] + - [0xE21280, c, fox_ti] + - [0xE31C90, c, fox_ma] + - [0xE4CDB0, c, fox_ground] + - [0xE4F670, data, fox_i5] + - [0xE4F680, data, fox_ti_cs] + - [0xE4F740, data, fox_ti] + - [0xE51230, data, fox_ma] + - [0xE52CF0, data, fox_ground] + - [0xE52DC0, .rodata, fox_i5] + - [0xE52DD0, .rodata, fox_ti_cs] + - [0xE52E30, .rodata, fox_ti] + - [0xE53690, .rodata, fox_ma] + - [0xE541D0, .rodata, fox_ground] + - { type: bss, vram: 0x801B31F0, name: fox_i5 } + - { type: bss, vram: 0x801B3200, name: fox_ti } + - { type: bss, vram: 0x801B5540, name: fox_ma } + - { type: bss, vram: 0x801B5A40, name: fox_ground } + + + - name: ovl_i6 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i6 + start: 0xE542C0 + vram: 0x8017E7A0 + follows_vram: dma_table + bss_size: 0x520 + symbol_name_format: i6_$VRAM + subsegments: + - [0xE542C0, c, fox_i6] + - [0xE542D0, c, fox_andross] + - [0xE62FF0, c, fox_ve2] + - [0xE648F0, c, fox_sy] + - [0xE72330, c, fox_turret] + - [0xE73520, data, fox_i6] + - [0xE73530, data, fox_andross] + - [0xE73680, data, fox_ve2] + - [0xE736E0, data, fox_sy] + - [0xE73950, data, fox_turret] + - [0xE73960, .rodata, fox_i6] + - [0xE73970, .rodata, fox_andross] + - [0xE74210, .rodata, fox_ve2] + - [0xE74250, .rodata, fox_sy] + - [0xE74CA0, .rodata, fox_turret] + - { type: bss, vram: 0x8019F1E0, name: fox_i6 } + - { type: bss, vram: 0x8019F1F0, name: fox_andross } + - { type: bss, vram: 0x8019F6E0, name: fox_sy } + + + - name: ovl_menu + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_menu + start: 0xE74D00 + vram: 0x8017E7A0 + follows_vram: dma_table + bss_size: 0x17570 + symbol_name_format: menu_$VRAM + subsegments: + - [0xE74D00, c, fox_i_menu] + - [0xE74DC0, c, fox_title] + - [0xE7F410, c, fox_option] + - [0xE8C1E0, c, fox_map] + - [0xE9B3E0, data, fox_i_menu] + - [0xE9B3F0, data, fox_title] + - [0xE9BF60, data, fox_option] + - [0xE9CE00, data, fox_map] + - [0xEA4740, .rodata, fox_i_menu] + - [0xEA4760, .rodata, fox_title] + - [0xEA4B00, .rodata, fox_option] + - [0xEA4F00, .rodata, fox_map] + - { type: bss, vram: 0x801AF0B0, name: fox_menu } + - { type: bss, vram: 0x801AF0C0, name: fox_title } + - { type: bss, vram: 0x801B05A0, name: fox_option } + - { type: bss, vram: 0x801B0910, name: fox_map } + + + - name: ovl_ending + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_ending + start: 0xEA5610 + vram: 0x8017E7A0 + follows_vram: dma_table + bss_size: 0x2710 + symbol_name_format: ending_$VRAM + subsegments: + - [0xEA5610, c, fox_end1] + - [0xEAAF10, c, fox_end2] + - [0xEB0800, data, fox_end1] + - [0xEB0E50, data, fox_end2] + - [0xEB41A0, .rodata, fox_end1] + - [0xEB45A0, .rodata, fox_end2] + - { type: bss, vram: 0x8018DD90, name: fox_end1 } + - { type: bss, vram: 0x8018F620, name: fox_end2 } + + + - name: ovl_unused + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_unused + start: 0xEB4C00 + vram: 0x8017E7A0 + follows_vram: dma_table + bss_size: 0x10 + symbol_name_format: unused_$VRAM + subsegments: + - [0xEB4C00, c, fox_unused] + - [0xEB4C10, data, fox_unused] + - { type: bss, vram: 0x8017E840, name: fox_unused } + + - [0xEB4CA0] \ No newline at end of file diff --git a/yamls/us/rev0/assets.yaml b/yamls/us/rev0/assets.yaml new file mode 100644 index 00000000..1bacd757 --- /dev/null +++ b/yamls/us/rev0/assets.yaml @@ -0,0 +1,453 @@ + + - name: audio_seq + type: bin + start: 0xDA030 + +# - name: audio_bank +# type: bin +# start: 0x114D20 +# +# - name: audio_table +# type: bin +# start: 0x132D40 +# +# - name: ast_common +# type: bin +# start: 0x86F2C0 +# +# - name: assets_in_between # start of ast_bg_space +# type: bin +# start: 0x8A1ED0 + +# - name: ast_bg_space +# exclusive_ram_id: segment_02 +# type: code +# dir: assets +# start: 0x8A1ED0 +# vram: 0x02000000 +# subsegments: +# - [0x8A68C0, .data, ast_bg_space/ast_bg_space] +# +# - name: ast_bg_planet +# exclusive_ram_id: segment_02 +# type: code +# dir: assets +# start: 0x8AE0A0 +# vram: 0x02000000 +# subsegments: +# - [0x8AE0A0, .data, ast_bg_planet/ast_bg_planet] +# +# - name: ast_arwing +# exclusive_ram_id: segment_03 +# type: code +# dir: assets +# start: 0x8BFC00 +# vram: 0x03000000 +# subsegments: +# - [0x8BFC00, .data, ast_arwing/ast_arwing] +# +# - name: ast_landmaster +# exclusive_ram_id: segment_03 +# type: code +# dir: assets +# start: 0x8D99F0 +# vram: 0x03000000 +# subsegments: +# - [0x8D99F0, .data, ast_landmaster/ast_landmaster] +# +# - name: ast_blue_marine +# exclusive_ram_id: segment_03 +# type: code +# dir: assets +# start: 0x8E1F80 +# vram: 0x03000000 +# subsegments: +# - [0x8E1F80, .data, ast_blue_marine/ast_blue_marine] +# +# - name: ast_versus +# exclusive_ram_id: segment_03 +# type: code +# dir: assets +# start: 0x8E92D0 +# vram: 0x03000000 +# subsegments: +# - [0x8E92D0, .data, ast_versus/ast_versus] +# +# - name: ast_enmy_planet +# exclusive_ram_id: segment_04 +# type: code +# dir: assets +# start: 0x918430 +# vram: 0x04000000 +# subsegments: +# - [0x918430, .data, ast_enmy_planet/ast_enmy_planet] +# +# - name: ast_enmy_space +# exclusive_ram_id: segment_04 +# type: code +# dir: assets +# start: 0x922730 +# vram: 0x04000000 +# subsegments: +# - [0x922730, .data, ast_enmy_space/ast_enmy_space] +# +# - name: ast_great_fox +# exclusive_ram_id: segment_0E +# type: code +# dir: assets +# start: 0x92EC40 +# vram: 0x0E000000 +# subsegments: +# - [0x92EC40, .data, ast_great_fox/ast_great_fox] +# +# - name: ast_star_wolf +# exclusive_ram_id: segment_0F +# type: code +# dir: assets +# start: 0x940AD0 +# vram: 0x0F000000 +# subsegments: +# - [0x940AD0, .data, ast_star_wolf/ast_star_wolf] +# +# - name: ast_allies +# exclusive_ram_id: segment_0D +# type: code +# dir: assets +# start: 0x955270 +# vram: 0x0D000000 +# subsegments: +# - [0x955270, .data, ast_allies/ast_allies] +# +# - name: ast_corneria +# exclusive_ram_id: segment_06 +# type: code +# dir: assets +# start: 0x961CE0 +# vram: 0x06000000 +# subsegments: +# - [0x961CE0, .data, ast_corneria/ast_corneria] +# +# - name: ast_meteo +# exclusive_ram_id: segment_06 +# type: code +# dir: assets +# start: 0x9A1460 +# vram: 0x06000000 +# subsegments: +# - [0x9A1460, .data, ast_meteo/ast_meteo] +# +# - name: ast_titania +# exclusive_ram_id: segment_06 +# type: code +# dir: assets +# vram: 0x06000000 +# start: 0x9D2FD0 +# subsegments: +# - [0x9D2FD0, .data, ast_titania/ast_titania] +# +# - name: ast_7_ti_2 +# exclusive_ram_id: segment_07 +# type: code +# dir: assets +# vram: 0x07000000 +# start: 0x9DD390 +# subsegments: +# - [0x9DD390, .data, ast_7_ti_2/ast_7_ti_2] +# +# - name: ast_8_ti +# exclusive_ram_id: segment_08 +# type: code +# dir: assets +# start: 0x9EB5E0 +# vram: 0x08000000 +# subsegments: +# - [0x9EB5E0, .data, ast_8_ti/ast_8_ti] +# +# - name: ast_9_ti +# exclusive_ram_id: segment_09 +# type: code +# dir: assets +# start: 0x9F4880 +# vram: 0x09000000 +# subsegments: +# - [0x9F4880, .data, ast_9_ti/ast_9_ti] +# +# - name: ast_A_ti +# type: code +# dir: assets +# exclusive_ram_id: segment_0A +# start: 0xA049A0 +# vram: 0x0A000000 +# subsegments: +# - [0xA049A0, .data, ast_A_ti/ast_A_ti] +# +# - name: ast_7_ti_1 +# exclusive_ram_id: segment_07 +# type: code +# dir: assets +# start: 0xA0E340 +# vram: 0x07000000 +# subsegments: +# - [0xA0E340, .data, ast_7_ti_1/ast_7_ti_1] +# +# - name: ast_sector_x +# exclusive_ram_id: segment_06 +# type: code +# dir: assets +# start: 0xA1D0F0 +# vram: 0x06000000 +# subsegments: +# - [0xA1D0F0, .data, ast_sector_x/ast_sector_x] +# +# - name: ast_sector_z +# exclusive_ram_id: segment_06 +# type: code +# dir: assets +# start: 0xA4FBB0 +# vram: 0x06000000 +# subsegments: +# - [0xA4FBB0, .data, ast_sector_z/ast_sector_z] +# +# - name: ast_aquas +# exclusive_ram_id: segment_06 +# type: code +# dir: assets +# start: 0xA58F60 +# vram: 0x06000000 +# subsegments: +# - [0xA58F60, .data, ast_aquas/ast_aquas] +# +# - name: ast_area_6 +# exclusive_ram_id: segment_06 +# type: code +# dir: assets +# start: 0xA8B470 +# vram: 0x06000000 +# subsegments: +# - [0xA8B470, .data, ast_area_6/ast_area_6] +# +# - name: ast_venom_1 +# exclusive_ram_id: segment_06 +# type: code +# dir: assets +# start: 0xAB4000 +# vram: 0x06000000 +# subsegments: +# - [0xA4FBB0, .data, ast_venom_1/ast_venom_1] +# +# - name: ast_venom_2 +# exclusive_ram_id: segment_06 +# type: code +# dir: assets +# start: 0xACF960 +# vram: 0x06000000 +# subsegments: +# - [0xA4FBB0, .data, ast_venom_2/ast_venom_2] +# +# - name: ast_ve1_boss +# # exclusive_ram_id: segment_06 +# exclusive_ram_id: segment_09 +# type: code +# dir: assets +# start: 0xAE60A0 +# vram: 0x09000000 +# subsegments: +# - [0xAE60A0, .data, ast_ve1_boss/ast_ve1_boss] +# +# - name: ast_bolse +# exclusive_ram_id: segment_06 +# type: code +# dir: assets +# start: 0xB0AA00 +# vram: 0x06000000 +# subsegments: +# - [0xB0AA00, .data, ast_bolse/ast_bolse] +# +# - name: ast_fortuna +# exclusive_ram_id: segment_06 +# type: code +# dir: assets +# start: 0xB1CA50 +# vram: 0x06000000 +# subsegments: +# - [0xB1CA50, .data, ast_fortuna/ast_fortuna] +# +# - name: ast_sector_y +# exclusive_ram_id: segment_06 +# type: code +# dir: assets +# start: 0xB2CA50 +# vram: 0x06000000 +# subsegments: +# - [0xB2CA50, .data, ast_sector_y/ast_sector_y] +# +# - name: ast_solar +# exclusive_ram_id: segment_06 +# type: code +# dir: assets +# start: 0xB612E0 +# vram: 0x06000000 +# subsegments: +# - [0xB612E0, .data, ast_solar/ast_solar] +# +# - name: ast_zoness +# exclusive_ram_id: segment_06 +# type: code +# dir: assets +# start: 0xB84560 +# vram: 0x06000000 +# subsegments: +# - [0xB84560, .data, ast_zoness/ast_zoness] +# +# - name: ast_katina +# exclusive_ram_id: segment_06 +# type: code +# dir: assets +# start: 0xBB11D0 +# vram: 0x06000000 +# subsegments: +# - [0xBB11D0, .data, ast_katina/ast_katina] +# +# - name: ast_macbeth +# exclusive_ram_id: segment_06 +# type: code +# dir: assets +# vram: 0x06000000 +# start: 0xBC23D0 +# subsegments: +# - [0xBC23D0, .data, ast_macbeth/ast_macbeth] +# +# - name: ast_warp_zone +# exclusive_ram_id: segment_07 +# type: code +# dir: assets +# start: 0xBFA740 +# vram: 0x07000000 +# subsegments: +# - [0xBFA740, .data, ast_warp_zone/ast_warp_zone] +# +# - name: ast_title +# exclusive_ram_id: segment_06 +# type: code +# dir: assets +# vram: 0x06000000 +# start: 0xBFC510 +# subsegments: +# - [0xBFC510, .data, ast_title/ast_title] +# +# - name: ast_map +# exclusive_ram_id: segment_06 +# type: code +# dir: assets +# start: 0xC48F40 +# vram: 0x06000000 +# subsegments: +# - [0xC48F40, .data, ast_map/ast_map] +# +# - name: ast_option +# exclusive_ram_id: segment_08 +# type: code +# dir: assets +# start: 0xCA9DE0 +# vram: 0x08000000 +# subsegments: +# - [0xCA9DE0, .data, ast_option/ast_option] +# +# - name: ast_vs_menu +# exclusive_ram_id: segment_07 +# type: code +# dir: assets +# start: 0xCBFE70 +# vram: 0x07000000 +# subsegments: +# - [0xCBFE70, .data, ast_vs_menu/ast_vs_menu] +# +# - name: ast_text +# exclusive_ram_id: segment_05 +# type: code +# dir: assets +# vram: 0x05000000 +# start: 0xCD2410 +# subsegments: +# - [0xCD2410, .data, ast_text/ast_text] +# +# - name: ast_font_3d +# exclusive_ram_id: segment_09 +# type: code +# dir: assets +# vram: 0x09000000 +# start: 0xCDDCA0 +# subsegments: +# - [0xCDDCA0, .data, ast_font_3d/ast_font_3d] +# +# - name: ast_andross +# exclusive_ram_id: segment_0C +# type: code +# dir: assets +# vram: 0x0C000000 +# start: 0xCE9E70 +# subsegments: +# - [0xCE9E70, .data, ast_andross/ast_andross] +# +# - name: ast_logo +# exclusive_ram_id: segment_0F +# type: code +# dir: assets +# start: 0xD25100 +# vram: 0x0F000000 +# subsegments: +# - [0xD25100, .data, ast_logo/ast_logo] +# +# - name: ast_ending +# exclusive_ram_id: segment_07 +# type: code +# dir: assets +# start: 0xD27600 +# vram: 0x07000000 +# subsegments: +# - [0xD27600, .data, ast_ending/ast_ending] +# +# - name: ast_ending_award_front +# exclusive_ram_id: segment_08 +# type: code +# dir: assets +# start: 0xD43400 +# vram: 0x08000000 +# subsegments: +# - [0xD43400, .data, ast_ending_award_front/ast_ending_award_front] +# +# - name: ast_ending_award_back +# exclusive_ram_id: segment_08 +# type: code +# dir: assets +# start: 0xD68480 +# vram: 0x08000000 +# subsegments: +# - [0xD68480, .data, ast_ending_award_back/ast_ending_award_back] +# +# - name: ast_ending_expert +# exclusive_ram_id: segment_08 +# type: code +# dir: assets +# start: 0xD91F10 +# vram: 0x08000000 +# subsegments: +# - [0xD91F10, .data, ast_ending_expert/ast_ending_expert] +# +# - name: ast_training +# exclusive_ram_id: segment_06 +# type: code +# dir: assets +# start: 0xDDC010 +# vram: 0x06000000 +# subsegments: +# - [0xDDC010, .data, ast_training/ast_training] +# +# - name: ast_radio +# type: code +# dir: assets +# start: 0xDE5D50 +# vram: 0x80179010 +# follows_vram: dma_table +# subsegments: +# - [0xDE5D50, .data, ast_radio/ast_radio] diff --git a/yamls/us/rev0/header.yaml b/yamls/us/rev0/header.yaml new file mode 100644 index 00000000..a616da0a --- /dev/null +++ b/yamls/us/rev0/header.yaml @@ -0,0 +1,77 @@ +name: Starfox64 US REV 0 (v1.0) +sha1: 63b69f0ef36306257481afc250f9bc304c7162b2 +options: + basename: starfox64 + target_path: baserom.us.rev0.uncompressed.z64 + elf_path: build/starfox64.us.rev0.elf + ld_script_path: linker_scripts/us/rev0/starfox64.ld + base_path: . + compiler: IDO + find_file_boundaries: True + header_encoding: ASCII + platform: n64 + undefined_funcs_auto_path: linker_scripts/us/rev0/auto/undefined_funcs_auto.ld + undefined_syms_auto_path: linker_scripts/us/rev0/auto/undefined_syms_auto.ld + + symbol_addrs_path: + - linker_scripts/us/rev0/symbol_addrs.txt + - linker_scripts/us/rev0/symbol_addrs_engine.txt + - linker_scripts/us/rev0/symbol_addrs_libultra.txt + - linker_scripts/us/rev0/symbol_addrs_nlib_funcs.txt + - linker_scripts/us/rev0/symbol_addrs_nlib_vars.txt + - linker_scripts/us/rev0/symbol_addrs_assets.txt + - linker_scripts/us/rev0/symbol_addrs_mesg.txt + - linker_scripts/us/rev0/symbol_addrs_audio.txt + - linker_scripts/us/rev0/symbol_addrs_overlays.txt + - linker_scripts/us/rev0/symbol_addrs_EBFBE0.txt + - linker_scripts/us/rev0/ignored_addresses.txt + + asm_path: asm/us/rev0 + src_path: srcusrev0 + asset_path: bin/us/rev0 + + build_path: build + + extensions_path: tools/splat_ext + mips_abi_float_regs: o32 + create_asm_dependencies: True + do_c_func_detection: True + o_as_suffix: True + gfx_ucode: f3dex + mnemonic_ljust: 12 + rom_address_padding: True + dump_symbols: True + include_macro_inc: False + libultra_symbols: True + hardware_regs: True + + ld_dependencies: True + + + use_legacy_include_asm: False + + asm_function_macro: glabel + asm_jtbl_label_macro: jlabel + asm_data_macro: dlabel + + ld_legacy_generation: True + check_consecutive_segment_types: False + + # section_order: [".text", ".data", ".rodata", ".bss", "bin"] + # auto_all_sections: [".data", ".rodata", ".bss"] + + asm_emit_size_directive: True # REC + + + mips_abi_float_regs: o32 + + + disasm_unknown: True + # string_encoding: ASCII + # data_string_encoding: ASCII + rodata_string_guesser_level: 2 + data_string_guesser_level: 2 + # libultra_symbols: True + # hardware_regs: True + # gfx_ucode: # one of [f3d, f3db, f3dex, f3dexb, f3dex2] +segments: diff --git a/yamls/us/rev0/main.yaml b/yamls/us/rev0/main.yaml new file mode 100644 index 00000000..653bb608 --- /dev/null +++ b/yamls/us/rev0/main.yaml @@ -0,0 +1,168 @@ + - name: makerom + type: code + start: 0x0 + subsegments: + - {start: 0x0, type: header, name: header} + - {start: 0x40, type: textbin, name: ipl3} + - {start: 0x1000, type: asm, vram: 0x80000400, name: entry} + + - name: main + type: code + start: 0x1050 + vram: 0x80000450 + bss_size: 0x9B1F0 + subsegments: + # Microcode + - [0x01050, textbin, rspboot] + - [0x01120, textbin, aspmain] # vram: 0x04001080 + - [0x02010, textbin, f3dex] + + # Nintendo libraries + - [0x03440, asm] + - [0x3A80, asm] + - [0x41D0, asm] + - [0x4650, asm] + - [0x5A20, asm] + - [0x7B20, asm] + - [0x7D30, asm] + - [0x7FC0, asm] + - [0x8CC0, asm] + - [0xC870, asm] + - [0xF0A0, asm] + - [0x12490, asm] + - [0x14AA0, asm] + - [0x17650, asm] + - [0x1EB50, asm] + - [0x1FA60, asm] + - [0x1FA70, asm] + - [0x1FB10, asm] + - [0x205E0, asm] + - [0x206B0, asm] + - [0x20A60, asm] + - [0x20F80, asm] + - [0x211E0, asm] + - [0x21320, asm] + - [0x21470, asm] + - [0x21520, asm] + - [0x21B40, asm] + - [0x21DD0, asm] + - [0x222C0, asm] + - [0x22340, asm] + - [0x223F0, asm] + - [0x22500, asm] + - [0x225A0, asm] + - [0x226C0, asm] + - [0x22730, asm] + - [0x228F0, asm] + - [0x22920, asm] + - [0x22990, asm] + - [0x22A00, asm] + - [0x22D90, asm] + - [0x22DA0, asm] + - [0x22EF0, asm] + - [0x233A0, asm] + - [0x23530, asm] + - [0x238A0, asm] + - [0x23930, asm] + - [0x23C60, asm] + - [0x23C70, asm] + - [0x23D50, asm] + - [0x24050, asm] + - [0x24860, asm] + - [0x24900, asm] + - [0x255C0, asm] + - [0x255F0, asm] + - [0x25600, asm] + - [0x25850, asm] + - [0x25930, asm] + - [0x25940, asm] + - [0x259F0, asm] + - [0x25A00, asm] + - [0x25AB0, asm] + - [0x25BB0, asm] + - [0x26870, asm] + - [0x27100, asm] + - [0x27370, asm] + - [0x274F0, asm] + - [0x27630, asm] + - [0x27640, asm] + - [0x27650, asm] + - [0x279E0, asm] + - [0x27A60, asm] + - [0x27AA0, asm] + - [0x27B30, asm] + - [0x27B60, asm] + - [0x27F80, asm] + - [0x27F90, asm] + - [0x282F0, asm] + - [0x283F0, asm] + - [0x287C0, asm] + - [0x28C70, asm] + - [0x28D20, asm] + - [0x28D80, asm] + - [0x28DE0, asm] + - [0x28E80, asm] + - [0x29120, asm] + - [0x29BE0, asm] + - [0x29C40, asm] + - [0x2A4C0, asm] + - [0x2A660, asm] + - [0x2A770, asm] + - [0x2A830, asm] + - [0x2A840, asm] + - [0x2A8A0, asm] + - [0x2A8F0, asm] + - [0x2A990, asm] + - [0x2A9E0, asm] + - [0x2AB70, asm] + - [0x324C0, asm] + - [0x3F650, asm] + - [0x3FA10, asm] + - [0x45250, asm] + - [0x4E2C0, asm] + - [0x55310, asm] + - [0x55E50, asm] + - [0x66F40, asm] + - [0x739D0, asm] + - [0x80B00, asm] + - [0x810C0, asm] + - [0x93B10, asm] + - [0x96110, asm] + - [0x9E040, asm] + - [0xA0430, asm] + - [0xA06E0, asm] + - [0xB5550, asm] + - [0xB6EE0, asm] + - [0xB8EE0, asm] + - [0xBEFB0, asm] + - [0xBFA60, data] + + # dma_table + - [0xD9A90, data, dma_table] + + # - [0xDA030, bin] # assets (ast_audioseq) + + + # last overlay data + # - [0xDE1360, bin, ast_radio] + + # overlay vram: 0x80187520 + + # - [0xDEF870, asm, ovl_i1] + # - [0xE039D0, asm, ovl_i2] + # - [0xE12220, asm, ovl_i3] + # - [0xE4CF40, asm, ovl_i4] + # - [0xE65DE0, asm, ovl_i5] + # - [0xE9A7A0, asm, ovl_i6] + # - [0xEBB1B0, asm, ovl_menu] + # - [0xEEB830, asm, fox_ending] + # - [0xEFB010, asm, fox_unused] + +# - name: dma_table +# type: code +# start: 0xD9A90 +# vram: 0x80178A70 +# follows_vram: main +# subsegments: +# - [0xD9A90, data, dmatable] + diff --git a/yamls/us/rev0/overlays.yaml b/yamls/us/rev0/overlays.yaml new file mode 100644 index 00000000..8e60e0ac --- /dev/null +++ b/yamls/us/rev0/overlays.yaml @@ -0,0 +1,139 @@ + - name: ovl_i1 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i1 + start: 0xDEF870 + vram: 0x80187520 + follows_vram: main + # bss_size: 0xA10 + symbol_name_format: i1_$VRAM + subsegments: + - [0xDEF870, asm, fox_i1] + - [0xDEF880, asm, fox_co] + - [0xDFA440, asm, fox_ve1] + - [0xE00BF0, asm, fox_tr] + - [0xE00F60, asm, fox_tr360] + + - name: ovl_i2 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i2 + start: 0xE039D0 + vram: 0x80187520 + follows_vram: main + # bss_size: 0x40 + symbol_name_format: i2_$VRAM + subsegments: + - [0xE039D0, asm, fox_i2] + - [0xE039E0, asm, fox_me] + - [0xE118E0, asm, fox_sx] + + - name: ovl_i3 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i3 + start: 0xE12220 + vram: 0x80187520 + follows_vram: main + # bss_size: 0x2220 + symbol_name_format: i3_$VRAM + subsegments: + - [0xE12220, asm, fox_i3] + - [0xE1AC50, asm, fox_a6] + - [0xE294F0, asm, fox_zo] + - [0xE33B30, asm, fox_so] + - [0xE499B0, asm, fox_aq] + + - name: ovl_i4 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i4 + start: 0xE4CF40 + vram: 0x80187520 + follows_vram: main + # bss_size: 0x1B0 + symbol_name_format: i4_$VRAM + subsegments: + - [0xE4CF40, asm, fox_i4] + - [0xE4D010, asm, fox_fo] + - [0xE51780, asm, fox_bo] + - [0xE58200, asm, fox_ka] + - [0xE5F320, asm, fox_sz] + - [0xE64800, data] + + - name: ovl_i5 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i5 + start: 0xE65DE0 + vram: 0x80187520 + follows_vram: main + # bss_size: 0xAF80 + symbol_name_format: i5_$VRAM + subsegments: + # should be one more file split here + - [0xE65DE0, asm, fox_i5] + - [0xE65DF0, asm] + - [0xE677F0, asm] + - [0xE93290, asm] + - [0xE95B60, asm] + + - name: ovl_i6 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i6 + start: 0xE9A7A0 + vram: 0x80187520 + follows_vram: main + # bss_size: 0x520 + symbol_name_format: i6_$VRAM + subsegments: + - [0xE9A7A0, asm, fox_i6] + - [0xEA9490, asm, fox_andross] + - [0xEAADB0, asm, fox_ve2] + - [0xEB87E0, asm, fox_sy] + - [0xEB99E0, asm, fox_turret] + + - name: ovl_menu + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_menu + start: 0xEBB1B0 + vram: 0x80187520 + follows_vram: main + # bss_size: 0x17590 + symbol_name_format: menu_$VRAM + subsegments: + - [0xEBB1B0, asm, fox_i_menu] + - [0xEBB270, asm, fox_title] + - [0xEC57B0, asm, fox_option] + - [0xEE1690, asm, fox_map] + + - name: ovl_ending + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_ending + start: 0xEEB830 + vram: 0x80187520 + follows_vram: main + # bss_size: 0x2710 + symbol_name_format: ending_$VRAM + subsegments: + - [0xEEB830, asm, fox_end1] + - [0xEF1130, asm, fox_end2] + - [0xEF6B30, data] + + - name: ovl_unused + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_unused + start: 0xEFB010 + vram: 0x80187520 + follows_vram: main + # bss_size: 0x10 + symbol_name_format: unused_$VRAM + subsegments: + - [0xEFB010, asm, fox_unused] + - [0xEFB040, asm] + + - [0xEFB0B0] diff --git a/yamls/us/rev1/main.yaml b/yamls/us/rev1/main.yaml index b7895c70..bca97f06 100644 --- a/yamls/us/rev1/main.yaml +++ b/yamls/us/rev1/main.yaml @@ -14,7 +14,7 @@ subsegments: # Microcode - [0x01050, textbin, rspboot] - - [0x01120, textbin, aspmain] + - [0x01120, textbin, aspmain] # vram: 0x04001080 - [0x02010, textbin, f3dex] # Nintendo libraries From 0022481a0394fe24a215bfe57167bda599a55393 Mon Sep 17 00:00:00 2001 From: Alejandro Asenjo Nitti <96613413+sonicdcer@users.noreply.github.com> Date: Tue, 17 Sep 2024 02:04:15 -0300 Subject: [PATCH 150/151] ActorCutsceneModels Enum (#274) * ActorCutsceneModels * ACTOR_CS_FO_EXPLOSION * update --- assets/yaml/jp/rev0/ast_aquas.yaml | 4 +- assets/yaml/jp/rev0/ast_common.yaml | 4 +- assets/yaml/jp/rev0/ast_corneria.yaml | 4 +- assets/yaml/jp/rev0/ast_enmy_space.yaml | 24 +-- assets/yaml/jp/rev0/ast_katina.yaml | 8 +- assets/yaml/jp/rev0/ast_meteo.yaml | 16 +- assets/yaml/jp/rev0/ast_sector_z.yaml | 20 +- assets/yaml/jp/rev0/ast_zoness.yaml | 16 +- assets/yaml/us/rev1/ast_aquas.yaml | 4 +- assets/yaml/us/rev1/ast_common.yaml | 4 +- assets/yaml/us/rev1/ast_corneria.yaml | 4 +- assets/yaml/us/rev1/ast_enmy_space.yaml | 24 +-- assets/yaml/us/rev1/ast_katina.yaml | 8 +- assets/yaml/us/rev1/ast_meteo.yaml | 16 +- assets/yaml/us/rev1/ast_sector_z.yaml | 20 +- assets/yaml/us/rev1/ast_zoness.yaml | 16 +- include/i3.h | 10 +- include/prevent_context_reordering.h | 4 +- include/sf64object.h | 37 +++- include/variables.h | 2 +- .../us/rev1/symbol_addrs_overlays.txt | 6 +- src/engine/fox_360.c | 18 +- src/engine/fox_beam.c | 8 +- src/engine/fox_demo.c | 96 ++++----- src/engine/fox_display.c | 38 ++-- src/engine/fox_edata_info.c | 4 +- src/engine/fox_edisplay.c | 4 +- src/engine/fox_effect.c | 2 +- src/engine/fox_enmy.c | 10 +- src/engine/fox_fade.c | 8 +- src/engine/fox_game.c | 2 +- src/engine/fox_hud.c | 2 +- src/engine/fox_play.c | 4 +- src/engine/fox_tank.c | 17 +- src/overlays/ovl_ending/fox_end1.c | 1 + src/overlays/ovl_i1/fox_co.c | 8 +- src/overlays/ovl_i1/fox_ve1.c | 6 +- src/overlays/ovl_i2/fox_me.c | 192 +++++++++--------- src/overlays/ovl_i2/fox_sx.c | 106 +++++----- src/overlays/ovl_i3/fox_a6.c | 21 +- src/overlays/ovl_i3/fox_aq.c | 56 ++--- src/overlays/ovl_i3/fox_zo.c | 78 +++---- src/overlays/ovl_i4/fox_bo.c | 8 +- src/overlays/ovl_i4/fox_fo.c | 4 +- src/overlays/ovl_i4/fox_ka.c | 10 +- src/overlays/ovl_i4/fox_sz.c | 12 +- src/overlays/ovl_i5/fox_ma.c | 12 +- src/overlays/ovl_i5/fox_ti.c | 4 +- src/overlays/ovl_i5/fox_ti_cs.c | 4 +- src/overlays/ovl_i6/fox_andross.c | 14 +- src/overlays/ovl_i6/fox_sy.c | 40 ++-- 51 files changed, 542 insertions(+), 498 deletions(-) diff --git a/assets/yaml/jp/rev0/ast_aquas.yaml b/assets/yaml/jp/rev0/ast_aquas.yaml index 30c547e8..e8709e48 100644 --- a/assets/yaml/jp/rev0/ast_aquas.yaml +++ b/assets/yaml/jp/rev0/ast_aquas.yaml @@ -410,8 +410,8 @@ D_AQ_601F830: D_AQ_601FD70: { type: GFX, offset: 0x601FD70, symbol: D_AQ_601FD70 } -D_AQ_6020A40: - { type: SF64:ANIM, offset: 0x6020A40, symbol: D_AQ_6020A40 } +aAqSeaweedAnim: + { type: SF64:ANIM, offset: 0x6020A40, symbol: aAqSeaweedAnim } aAqSeaweedSkel: { type: SF64:SKELETON, offset: 0x6020C6C, symbol: aAqSeaweedSkel } diff --git a/assets/yaml/jp/rev0/ast_common.yaml b/assets/yaml/jp/rev0/ast_common.yaml index d7f7b08c..d84b5613 100644 --- a/assets/yaml/jp/rev0/ast_common.yaml +++ b/assets/yaml/jp/rev0/ast_common.yaml @@ -944,8 +944,8 @@ D_102CD50: D_102DD50: { type: TEXTURE, format: RGBA16, width: 32, height: 64, ctype: u16, offset: 0x102DD50, symbol: D_102DD50 } -D_102ED50: - { type: GFX, offset: 0x102ED50, symbol: D_102ED50 } +aBlueSphereDL: + { type: GFX, offset: 0x102ED50, symbol: aBlueSphereDL } D_102EDD8: { type: TEXTURE, format: RGBA16, width: 32, height: 32, ctype: u16, offset: 0x102EDD8, symbol: D_102EDD8 } diff --git a/assets/yaml/jp/rev0/ast_corneria.yaml b/assets/yaml/jp/rev0/ast_corneria.yaml index 0916880d..10081e3f 100644 --- a/assets/yaml/jp/rev0/ast_corneria.yaml +++ b/assets/yaml/jp/rev0/ast_corneria.yaml @@ -369,8 +369,8 @@ D_CO_6031130: D_CO_6031280: { type: GFX, offset: 0x6031280, symbol: D_CO_6031280 } -D_CO_60329C0: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x060329C0, symbol: D_CO_60329C0 } +aCoGarudaTracksTex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x060329C0, symbol: aCoGarudaTracksTex } CoMoleMissileDL: { type: GFX, offset: 0x6032BC0, symbol: CoMoleMissileDL } diff --git a/assets/yaml/jp/rev0/ast_enmy_space.yaml b/assets/yaml/jp/rev0/ast_enmy_space.yaml index 0ba24a61..e718d610 100644 --- a/assets/yaml/jp/rev0/ast_enmy_space.yaml +++ b/assets/yaml/jp/rev0/ast_enmy_space.yaml @@ -29,17 +29,17 @@ D_ENMY_SPACE_4001108: aAttacker2DL: { type: GFX, offset: 0x4001310, symbol: aAttacker2DL } -D_ENMY_SPACE_4001A30: - { type: TEXTURE, format: RGBA16, offset: 0x4001A30, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4001A30 } +aCommanderTex1: + { type: TEXTURE, format: RGBA16, offset: 0x4001A30, width: 16, height: 16, ctype: u16, symbol: aCommanderTex1 } -D_ENMY_SPACE_4001C30: - { type: TEXTURE, format: RGBA16, offset: 0x04001C30, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4001C30 } +aCommanderTex2: + { type: TEXTURE, format: RGBA16, offset: 0x04001C30, width: 16, height: 16, ctype: u16, symbol: aCommanderTex2 } -D_ENMY_SPACE_4001E30: - { type: TEXTURE, format: RGBA16, offset: 0x04001E30, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4001E30 } +aCommanderTex3: + { type: TEXTURE, format: RGBA16, offset: 0x04001E30, width: 16, height: 16, ctype: u16, symbol: aCommanderTex3 } -D_ENMY_SPACE_4002030: - { type: TEXTURE, format: RGBA16, offset: 0x04002030, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4002030 } +aCommanderTex4: + { type: TEXTURE, format: RGBA16, offset: 0x04002030, width: 16, height: 16, ctype: u16, symbol: aCommanderTex4 } D_ENMY_SPACE_4002230: { type: GFX, offset: 0x4002230, symbol: D_ENMY_SPACE_4002230 } @@ -50,8 +50,8 @@ D_ENMY_SPACE_4002C50: D_ENMY_SPACE_4002E50: { type: TEXTURE, format: RGBA16, offset: 0x04002E50, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4002E50 } -D_ENMY_SPACE_4003050: - { type: TEXTURE, format: RGBA16, offset: 0x04003050, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4003050 } +aCommanderTex6: + { type: TEXTURE, format: RGBA16, offset: 0x04003050, width: 16, height: 16, ctype: u16, symbol: aCommanderTex6 } D_ENMY_SPACE_4003250: { type: TEXTURE, format: RGBA16, offset: 0x04003250, width: 4, height: 4, ctype: u16, symbol: D_ENMY_SPACE_4003250 } @@ -59,8 +59,8 @@ D_ENMY_SPACE_4003250: D_ENMY_SPACE_4003270: { type: TEXTURE, format: RGBA16, offset: 0x04003270, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4003270 } -D_ENMY_SPACE_4003470: - { type: TEXTURE, format: RGBA16, offset: 0x04003470, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4003470 } +aCommanderTex5: + { type: TEXTURE, format: RGBA16, offset: 0x04003470, width: 16, height: 16, ctype: u16, symbol: aCommanderTex5 } D_ENMY_SPACE_4003670: { type: TEXTURE, format: RGBA16, offset: 0x04003670, width: 8, height: 8, ctype: u16, symbol: D_ENMY_SPACE_4003670 } diff --git a/assets/yaml/jp/rev0/ast_katina.yaml b/assets/yaml/jp/rev0/ast_katina.yaml index 485e8816..404f5fd0 100644 --- a/assets/yaml/jp/rev0/ast_katina.yaml +++ b/assets/yaml/jp/rev0/ast_katina.yaml @@ -23,8 +23,8 @@ D_KA_6001260: aKaDestroyedHatchDL: { type: GFX, offset: 0x60012A0, symbol: aKaDestroyedHatchDL } -aKaEnemy1DL: - { type: GFX, offset: 0x6001530, symbol: aKaEnemy1DL } +aKaEnemyDL: + { type: GFX, offset: 0x6001530, symbol: aKaEnemyDL } D_KA_6001968: { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6001968, ctype: u16, symbol: D_KA_6001968 } @@ -136,8 +136,8 @@ D_KA_600EBE8: D_KA_600EDE8: { type: TEXTURE, format: RGBA16, width: 16, height: 16, offset: 0x600EDE8, ctype: u16, symbol: D_KA_600EDE8 } -aKaEnemy1LowPolyDL: - { type: GFX, offset: 0x600EFF0, symbol: aKaEnemy1LowPolyDL } +aKaEnemyLowPolyDL: + { type: GFX, offset: 0x600EFF0, symbol: aKaEnemyLowPolyDL } D_KA_600F1D0: { type: GFX, offset: 0x600F1D0, symbol: D_KA_600F1D0 } diff --git a/assets/yaml/jp/rev0/ast_meteo.yaml b/assets/yaml/jp/rev0/ast_meteo.yaml index c214e7f7..3a6dd382 100644 --- a/assets/yaml/jp/rev0/ast_meteo.yaml +++ b/assets/yaml/jp/rev0/ast_meteo.yaml @@ -23,8 +23,8 @@ D_ME_6000A80: D_ME_6000B10: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06000B10, symbol: D_ME_6000B10 } -D_ME_6001310: - { type: GFX, offset: 0x6001310, symbol: D_ME_6001310 } +aMeCrusherDL: + { type: GFX, offset: 0x6001310, symbol: aMeCrusherDL } D_ME_6004738: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06004738, symbol: D_ME_6004738 } @@ -207,14 +207,14 @@ D_ME_601FF80: D_ME_6020008: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06020008, symbol: D_ME_6020008 } -D_ME_6020810: - { type: GFX, offset: 0x06020810, symbol: D_ME_6020810 } +aMeCorneriaBgDL: + { type: GFX, offset: 0x06020810, symbol: aMeCorneriaBgDL } -D_ME_6020920: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06020920, symbol: D_ME_6020920 } +aMeCorneriaBg1Tex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06020920, symbol: aMeCorneriaBg1Tex } -D_ME_6021920: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06021920, symbol: D_ME_6021920 } +aMeCorneriaBg2Tex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06021920, symbol: aMeCorneriaBg2Tex } aMeLaserCannon1DL: { type: GFX, offset: 0x06022920, symbol: aMeLaserCannon1DL } diff --git a/assets/yaml/jp/rev0/ast_sector_z.yaml b/assets/yaml/jp/rev0/ast_sector_z.yaml index bac95644..3cb0f2db 100644 --- a/assets/yaml/jp/rev0/ast_sector_z.yaml +++ b/assets/yaml/jp/rev0/ast_sector_z.yaml @@ -103,20 +103,20 @@ aSzSpaceJunk4DL: D_SZ_60047E0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60047E0, symbol: D_SZ_60047E0 } -D_SZ_6004FE0: - { type: GFX, offset: 0x6004FE0, symbol: D_SZ_6004FE0 } +aSzInvaderIIIDL: + { type: GFX, offset: 0x6004FE0, symbol: aSzInvaderIIIDL } -D_SZ_60054E0: - { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x060054E0, symbol: D_SZ_60054E0, tlut: 0x060058E0 } +aSzInvaderIIITex2: + { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x060054E0, symbol: aSzInvaderIIITex2, tlut: 0x060058E0 } -D_SZ_60058E0: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 240, offset: 0x060058E0, symbol: D_SZ_60058E0 } +aSzInvaderIIITex2TLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 240, offset: 0x060058E0, symbol: aSzInvaderIIITex2TLUT } -D_SZ_6005AC0: - { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x06005AC0, symbol: D_SZ_6005AC0, tlut: 0x06005BC0 } +aSzInvaderIIITex1: + { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x06005AC0, symbol: aSzInvaderIIITex1, tlut: 0x06005BC0 } -D_SZ_6005BC0: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 24, offset: 0x06005BC0, symbol: D_SZ_6005BC0 } +aSzInvaderIIITex1TLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 24, offset: 0x06005BC0, symbol: aSzInvaderIIITex1TLUT } D_SZ_6005BF0: { type: GFX, offset: 0x6005BF0, symbol: D_SZ_6005BF0 } diff --git a/assets/yaml/jp/rev0/ast_zoness.yaml b/assets/yaml/jp/rev0/ast_zoness.yaml index 2a2091eb..917fab23 100644 --- a/assets/yaml/jp/rev0/ast_zoness.yaml +++ b/assets/yaml/jp/rev0/ast_zoness.yaml @@ -48,8 +48,8 @@ D_ZO_6002810: D_ZO_6002A10: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 16, offset: 0x6002A10, symbol: D_ZO_6002A10} -D_ZO_6002E10: - { type: GFX, offset: 0x6002E10, symbol: D_ZO_6002E10} +aZoRadarBuoyDL: + { type: GFX, offset: 0x6002E10, symbol: aZoRadarBuoyDL} D_ZO_6003288: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6003288, symbol: D_ZO_6003288} @@ -363,8 +363,8 @@ D_ZO_601F940: D_ZO_601FBC4: { type: SF64:ANIM, offset: 0x601FBC4, symbol: D_ZO_601FBC4} -D_ZO_601FC90: - { type: SF64:SKELETON, offset: 0x601FC90, symbol: D_ZO_601FC90} +aZoBarrierSkel: + { type: SF64:SKELETON, offset: 0x601FC90, symbol: aZoBarrierSkel} aZoIslandDL: { type: GFX, offset: 0x601FCB0, symbol: aZoIslandDL} @@ -529,8 +529,8 @@ aZoObnemaHitbox: aZoBarrierHitbox: { type: SF64:HITBOX, offset: 0x602BFC4, symbol: aZoBarrierHitbox} -D_ZO_602C028: - { type: SF64:HITBOX, offset: 0x602C028, symbol: D_ZO_602C028} +aZoBarrierHitbox2: + { type: SF64:HITBOX, offset: 0x602C028, symbol: aZoBarrierHitbox2} aZoSarumarineHitbox: { type: SF64:HITBOX, offset: 0x602C044, symbol: aZoSarumarineHitbox} @@ -538,8 +538,8 @@ aZoSarumarineHitbox: aZoSarumarinePeriscopeHitbox: { type: SF64:HITBOX, offset: 0x602C1A0, symbol: aZoSarumarinePeriscopeHitbox} -aZoCargoShipHitbox: - { type: SF64:HITBOX, offset: 0x602C1D4, symbol: aZoCargoShipHitbox} +aZoTankerHitbox: + { type: SF64:HITBOX, offset: 0x602C1D4, symbol: aZoTankerHitbox} aZoContainerHitbox: { type: SF64:HITBOX, offset: 0x602C218, symbol: aZoContainerHitbox} diff --git a/assets/yaml/us/rev1/ast_aquas.yaml b/assets/yaml/us/rev1/ast_aquas.yaml index 1bcc5582..cc828208 100644 --- a/assets/yaml/us/rev1/ast_aquas.yaml +++ b/assets/yaml/us/rev1/ast_aquas.yaml @@ -410,8 +410,8 @@ D_AQ_601F830: D_AQ_601FD70: { type: GFX, offset: 0x601FD70, symbol: D_AQ_601FD70 } -D_AQ_6020A40: - { type: SF64:ANIM, offset: 0x6020A40, symbol: D_AQ_6020A40 } +aAqSeaweedAnim: + { type: SF64:ANIM, offset: 0x6020A40, symbol: aAqSeaweedAnim } aAqSeaweedSkel: { type: SF64:SKELETON, offset: 0x6020C6C, symbol: aAqSeaweedSkel } diff --git a/assets/yaml/us/rev1/ast_common.yaml b/assets/yaml/us/rev1/ast_common.yaml index 4ae37bd0..5fa0ca74 100644 --- a/assets/yaml/us/rev1/ast_common.yaml +++ b/assets/yaml/us/rev1/ast_common.yaml @@ -944,8 +944,8 @@ D_102CD50: D_102DD50: { type: TEXTURE, format: RGBA16, width: 32, height: 64, ctype: u16, offset: 0x102DD50, symbol: D_102DD50 } -D_102ED50: - { type: GFX, offset: 0x102ED50, symbol: D_102ED50 } +aBlueSphereDL: + { type: GFX, offset: 0x102ED50, symbol: aBlueSphereDL } D_102EDD8: { type: TEXTURE, format: RGBA16, width: 32, height: 32, ctype: u16, offset: 0x102EDD8, symbol: D_102EDD8 } diff --git a/assets/yaml/us/rev1/ast_corneria.yaml b/assets/yaml/us/rev1/ast_corneria.yaml index b7448683..7eadcb7b 100644 --- a/assets/yaml/us/rev1/ast_corneria.yaml +++ b/assets/yaml/us/rev1/ast_corneria.yaml @@ -369,8 +369,8 @@ D_CO_6031130: D_CO_6031280: { type: GFX, offset: 0x6031280, symbol: D_CO_6031280 } -D_CO_60329C0: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x060329C0, symbol: D_CO_60329C0 } +aCoGarudaTracksTex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x060329C0, symbol: aCoGarudaTracksTex } CoMoleMissileDL: { type: GFX, offset: 0x6032BC0, symbol: CoMoleMissileDL } diff --git a/assets/yaml/us/rev1/ast_enmy_space.yaml b/assets/yaml/us/rev1/ast_enmy_space.yaml index 959efde9..3cc28023 100644 --- a/assets/yaml/us/rev1/ast_enmy_space.yaml +++ b/assets/yaml/us/rev1/ast_enmy_space.yaml @@ -29,17 +29,17 @@ D_ENMY_SPACE_4001108: aAttacker2DL: { type: GFX, offset: 0x4001310, symbol: aAttacker2DL } -D_ENMY_SPACE_4001A30: - { type: TEXTURE, format: RGBA16, offset: 0x4001A30, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4001A30 } +aCommanderTex1: + { type: TEXTURE, format: RGBA16, offset: 0x4001A30, width: 16, height: 16, ctype: u16, symbol: aCommanderTex1 } -D_ENMY_SPACE_4001C30: - { type: TEXTURE, format: RGBA16, offset: 0x04001C30, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4001C30 } +aCommanderTex2: + { type: TEXTURE, format: RGBA16, offset: 0x04001C30, width: 16, height: 16, ctype: u16, symbol: aCommanderTex2 } -D_ENMY_SPACE_4001E30: - { type: TEXTURE, format: RGBA16, offset: 0x04001E30, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4001E30 } +aCommanderTex3: + { type: TEXTURE, format: RGBA16, offset: 0x04001E30, width: 16, height: 16, ctype: u16, symbol: aCommanderTex3 } -D_ENMY_SPACE_4002030: - { type: TEXTURE, format: RGBA16, offset: 0x04002030, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4002030 } +aCommanderTex4: + { type: TEXTURE, format: RGBA16, offset: 0x04002030, width: 16, height: 16, ctype: u16, symbol: aCommanderTex4 } D_ENMY_SPACE_4002230: { type: GFX, offset: 0x4002230, symbol: D_ENMY_SPACE_4002230 } @@ -50,8 +50,8 @@ D_ENMY_SPACE_4002C50: D_ENMY_SPACE_4002E50: { type: TEXTURE, format: RGBA16, offset: 0x04002E50, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4002E50 } -D_ENMY_SPACE_4003050: - { type: TEXTURE, format: RGBA16, offset: 0x04003050, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4003050 } +aCommanderTex6: + { type: TEXTURE, format: RGBA16, offset: 0x04003050, width: 16, height: 16, ctype: u16, symbol: aCommanderTex6 } D_ENMY_SPACE_4003250: { type: TEXTURE, format: RGBA16, offset: 0x04003250, width: 4, height: 4, ctype: u16, symbol: D_ENMY_SPACE_4003250 } @@ -59,8 +59,8 @@ D_ENMY_SPACE_4003250: D_ENMY_SPACE_4003270: { type: TEXTURE, format: RGBA16, offset: 0x04003270, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4003270 } -D_ENMY_SPACE_4003470: - { type: TEXTURE, format: RGBA16, offset: 0x04003470, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4003470 } +aCommanderTex5: + { type: TEXTURE, format: RGBA16, offset: 0x04003470, width: 16, height: 16, ctype: u16, symbol: aCommanderTex5 } D_ENMY_SPACE_4003670: { type: TEXTURE, format: RGBA16, offset: 0x04003670, width: 8, height: 8, ctype: u16, symbol: D_ENMY_SPACE_4003670 } diff --git a/assets/yaml/us/rev1/ast_katina.yaml b/assets/yaml/us/rev1/ast_katina.yaml index 9aee758d..19941a9b 100644 --- a/assets/yaml/us/rev1/ast_katina.yaml +++ b/assets/yaml/us/rev1/ast_katina.yaml @@ -23,8 +23,8 @@ D_KA_6001260: aKaDestroyedHatchDL: { type: GFX, offset: 0x60012A0, symbol: aKaDestroyedHatchDL } -aKaEnemy1DL: - { type: GFX, offset: 0x6001530, symbol: aKaEnemy1DL } +aKaEnemyDL: + { type: GFX, offset: 0x6001530, symbol: aKaEnemyDL } D_KA_6001968: { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6001968, ctype: u16, symbol: D_KA_6001968 } @@ -136,8 +136,8 @@ D_KA_600EBE8: D_KA_600EDE8: { type: TEXTURE, format: RGBA16, width: 16, height: 16, offset: 0x600EDE8, ctype: u16, symbol: D_KA_600EDE8 } -aKaEnemy1LowPolyDL: - { type: GFX, offset: 0x600EFF0, symbol: aKaEnemy1LowPolyDL } +aKaEnemyLowPolyDL: + { type: GFX, offset: 0x600EFF0, symbol: aKaEnemyLowPolyDL } D_KA_600F1D0: { type: GFX, offset: 0x600F1D0, symbol: D_KA_600F1D0 } diff --git a/assets/yaml/us/rev1/ast_meteo.yaml b/assets/yaml/us/rev1/ast_meteo.yaml index 89e45169..f7bc3a50 100644 --- a/assets/yaml/us/rev1/ast_meteo.yaml +++ b/assets/yaml/us/rev1/ast_meteo.yaml @@ -23,8 +23,8 @@ D_ME_6000A80: D_ME_6000B10: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06000B10, symbol: D_ME_6000B10 } -D_ME_6001310: - { type: GFX, offset: 0x6001310, symbol: D_ME_6001310 } +aMeCrusherDL: + { type: GFX, offset: 0x6001310, symbol: aMeCrusherDL } D_ME_6004738: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06004738, symbol: D_ME_6004738 } @@ -207,14 +207,14 @@ D_ME_601FF80: D_ME_6020008: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06020008, symbol: D_ME_6020008 } -D_ME_6020810: - { type: GFX, offset: 0x06020810, symbol: D_ME_6020810 } +aMeCorneriaBgDL: + { type: GFX, offset: 0x06020810, symbol: aMeCorneriaBgDL } -D_ME_6020920: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06020920, symbol: D_ME_6020920 } +aMeCorneriaBg1Tex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06020920, symbol: aMeCorneriaBg1Tex } -D_ME_6021920: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06021920, symbol: D_ME_6021920 } +aMeCorneriaBg2Tex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06021920, symbol: aMeCorneriaBg2Tex } aMeLaserCannon1DL: { type: GFX, offset: 0x06022920, symbol: aMeLaserCannon1DL } diff --git a/assets/yaml/us/rev1/ast_sector_z.yaml b/assets/yaml/us/rev1/ast_sector_z.yaml index 0038ef9e..621ffc6d 100644 --- a/assets/yaml/us/rev1/ast_sector_z.yaml +++ b/assets/yaml/us/rev1/ast_sector_z.yaml @@ -103,20 +103,20 @@ aSzSpaceJunk4DL: D_SZ_60047E0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60047E0, symbol: D_SZ_60047E0 } -D_SZ_6004FE0: - { type: GFX, offset: 0x6004FE0, symbol: D_SZ_6004FE0 } +aSzInvaderIIIDL: + { type: GFX, offset: 0x6004FE0, symbol: aSzInvaderIIIDL } -D_SZ_60054E0: - { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x060054E0, symbol: D_SZ_60054E0, tlut: 0x060058E0 } +aSzInvaderIIITex2: + { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x060054E0, symbol: aSzInvaderIIITex2, tlut: 0x060058E0 } -D_SZ_60058E0: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 240, offset: 0x060058E0, symbol: D_SZ_60058E0 } +aSzInvaderIIITex2TLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 240, offset: 0x060058E0, symbol: aSzInvaderIIITex2TLUT } -D_SZ_6005AC0: - { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x06005AC0, symbol: D_SZ_6005AC0, tlut: 0x06005BC0 } +aSzInvaderIIITex1: + { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x06005AC0, symbol: aSzInvaderIIITex1, tlut: 0x06005BC0 } -D_SZ_6005BC0: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 24, offset: 0x06005BC0, symbol: D_SZ_6005BC0 } +aSzInvaderIIITex1TLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 24, offset: 0x06005BC0, symbol: aSzInvaderIIITex1TLUT } D_SZ_6005BF0: { type: GFX, offset: 0x6005BF0, symbol: D_SZ_6005BF0 } diff --git a/assets/yaml/us/rev1/ast_zoness.yaml b/assets/yaml/us/rev1/ast_zoness.yaml index efe86f24..b71cba7f 100644 --- a/assets/yaml/us/rev1/ast_zoness.yaml +++ b/assets/yaml/us/rev1/ast_zoness.yaml @@ -48,8 +48,8 @@ D_ZO_6002810: D_ZO_6002A10: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 16, offset: 0x6002A10, symbol: D_ZO_6002A10} -D_ZO_6002E10: - { type: GFX, offset: 0x6002E10, symbol: D_ZO_6002E10} +aZoRadarBuoyDL: + { type: GFX, offset: 0x6002E10, symbol: aZoRadarBuoyDL} D_ZO_6003288: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6003288, symbol: D_ZO_6003288} @@ -363,8 +363,8 @@ D_ZO_601F940: D_ZO_601FBC4: { type: SF64:ANIM, offset: 0x601FBC4, symbol: D_ZO_601FBC4} -D_ZO_601FC90: - { type: SF64:SKELETON, offset: 0x601FC90, symbol: D_ZO_601FC90} +aZoBarrierSkel: + { type: SF64:SKELETON, offset: 0x601FC90, symbol: aZoBarrierSkel} aZoIslandDL: { type: GFX, offset: 0x601FCB0, symbol: aZoIslandDL} @@ -529,8 +529,8 @@ aZoObnemaHitbox: aZoBarrierHitbox: { type: SF64:HITBOX, offset: 0x602BFC4, symbol: aZoBarrierHitbox} -D_ZO_602C028: - { type: SF64:HITBOX, offset: 0x602C028, symbol: D_ZO_602C028} +aZoBarrierHitbox2: + { type: SF64:HITBOX, offset: 0x602C028, symbol: aZoBarrierHitbox2} aZoSarumarineHitbox: { type: SF64:HITBOX, offset: 0x602C044, symbol: aZoSarumarineHitbox} @@ -538,8 +538,8 @@ aZoSarumarineHitbox: aZoSarumarinePeriscopeHitbox: { type: SF64:HITBOX, offset: 0x602C1A0, symbol: aZoSarumarinePeriscopeHitbox} -aZoCargoShipHitbox: - { type: SF64:HITBOX, offset: 0x602C1D4, symbol: aZoCargoShipHitbox} +aZoTankerHitbox: + { type: SF64:HITBOX, offset: 0x602C1D4, symbol: aZoTankerHitbox} aZoContainerHitbox: { type: SF64:HITBOX, offset: 0x602C218, symbol: aZoContainerHitbox} diff --git a/include/i3.h b/include/i3.h index 73036185..433b533d 100644 --- a/include/i3.h +++ b/include/i3.h @@ -54,9 +54,9 @@ void Zoness_ZoCraneMagnet_Update(Actor* this); void Zoness_ZoCraneMagnet_Draw(Actor* this); void Zoness_ZoSpikeBall_Update(Actor* this); void Zoness_ZoSpikeBall_Draw(Actor* this); -void Zoness_ZoCargoShip_Init(Actor* actor); -void Zoness_ZoCargoShip_Update(Actor* this); -void Zoness_ZoCargoShip_Draw(Actor* actor); +void Zoness_ZoTanker_Init(Actor* actor); +void Zoness_ZoTanker_Update(Actor* this); +void Zoness_ZoTanker_Draw(Actor* actor); void Zoness_ZoContainer_Init(Actor* this); void Zoness_ZoContainer_Update(Actor* this); void Zoness_ZoContainer_Draw(Actor* this); @@ -127,12 +127,12 @@ void Aquas_AqSquid_Update(Actor*); void Aquas_AqSquid_Draw(Actor*); void Aquas_AqSeaweed_Update(Actor*); void Aquas_AqSeaweed_Draw(Actor*); -void Venom1_AqBoulder_Init(Actor *); +void Aquas_AqBoulder_Init(Actor *); void Aquas_AqBoulder_Update(Actor*); void Aquas_AqBoulder_Draw(Actor*); void Aquas_AqCoral_Update(Actor*); void Aquas_AqCoral_Draw(Actor*); -void Venom1_AqJellyfish_Init(Actor *); +void Aquas_AqJellyfish_Init(Actor *); void Aquas_AqJellyfish_Update(Actor*); void Aquas_AqJellyfish_Draw(Actor*); void Aquas_AqStoneColumn_Update(Actor*); diff --git a/include/prevent_context_reordering.h b/include/prevent_context_reordering.h index c0d50d89..2d25120c 100644 --- a/include/prevent_context_reordering.h +++ b/include/prevent_context_reordering.h @@ -1,7 +1,7 @@ #ifndef PREVENT_CONTEXT_REORDERING_H #define PREVENT_CONTEXT_REORDERING_H -extern int Dummyhalf; +// extern int Dummyhalf; // struct Dummy0 {int x;}; // struct Dummy1 {int x;}; // struct Dummy2 {int x;}; @@ -16,7 +16,7 @@ extern int Dummyhalf; // struct Dummy11 {int x;}; // struct Dummy12 {int x;}; // struct Dummy13 {int x;}; -struct Dummy14 {int x;}; +// struct Dummy14 {int x;}; struct Dummy15 {int x;}; struct Dummy16 {int x;}; struct Dummy17 {int x;}; diff --git a/include/sf64object.h b/include/sf64object.h index c31f3cc1..3fe085f3 100644 --- a/include/sf64object.h +++ b/include/sf64object.h @@ -462,7 +462,7 @@ typedef enum ObjectId { /* 153 */ OBJ_SCENERY_BO_BUILDING, /* 154 */ OBJ_SCENERY_KA_FLBASE, /* 155 */ OBJ_SCENERY_UNK_155, - /* 156 */ OBJ_SCENERY_UNK_156, + /* 156 */ OBJ_SCENERY_SY_SHOGUN_SHIP, /* 157 */ OBJ_SCENERY_SZ_SPACE_JUNK_3, /* 158 */ OBJ_SCENERY_SZ_SPACE_JUNK_1, /* 159 */ OBJ_SCENERY_VE2_TOWER, @@ -556,7 +556,7 @@ typedef enum ObjectId { /* 247 */ OBJ_ACTOR_ZO_BARRIER, // Barrier with opening rudders on the sides. /* 248 */ OBJ_ACTOR_ZO_CRANE_MAGNET, /* 249 */ OBJ_ACTOR_SPIKEBALL, // Spikeball shot by Zoness boss. - /* 250 */ OBJ_ACTOR_ZO_CARGOSHIP, + /* 250 */ OBJ_ACTOR_ZO_TANKER, // Cargo ship, usually carries contaners. /* 251 */ OBJ_ACTOR_ZO_CONTAINER, /* 252 */ OBJ_ACTOR_ZO_RADARBUOY, // Zoness searchlight. /* 253 */ OBJ_ACTOR_ZO_SUPPLYCRANE, @@ -779,6 +779,37 @@ typedef enum AllRangeAi { /* 200 */ AI360_EVENT_HANDLER = 1000, } AllRangeAi; +typedef enum ActorCutsceneModels { + /* 0 */ ACTOR_CS_TEAM_ARWING, + /* 1 */ ACTOR_CS_GREAT_FOX, + /* 10 */ ACTOR_CS_ME_CORNERIA_BG = 10, // Planet Corneria in the background of level start CS. + /* 11 */ ACTOR_CS_FO_EXPLOSION, // Fortuna explosion in a mission complete ending. + /* 20 */ ACTOR_CS_COMMANDER = 20, + /* 24 */ ACTOR_CS_KATT = 24, + /* 25 */ ACTOR_CS_SZ_SPACE_JUNK, + /* 26 */ ACTOR_CS_SZ_INVADER, + /* 28 */ ACTOR_CS_COMMANDER_GLOW = 28, // Commander with Engine Glow. + /* 30 */ ACTOR_CS_30 = 30, // Related to LEVEL_BOLSE + /* 31 */ ACTOR_CS_31, + /* 32 */ ACTOR_CS_32, + /* 33 */ ACTOR_CS_CORNERIAN_FIGHTER, // Bill's ship when actor->index is 3. + /* 34 */ ACTOR_CS_KA_ENEMY, + /* 35 */ ACTOR_CS_SY_SHIP_1_SHRINK, // Scale Matrix by 1/8. + /* 36 */ ACTOR_CS_SY_SHIP_2, + /* 37 */ ACTOR_CS_37, + /* 38 */ ACTOR_CS_38, // Related to Sector Y + /* 39 */ ACTOR_CS_SY_SHIP_1 = 39, + /* 40 */ ACTOR_CS_40, + /* 41 */ ACTOR_CS_AQ_FISHGROUP, + /* 42 */ ACTOR_CS_42, // Related to Sector Y + /* 43 */ ACTOR_CS_43, // Related to Sector Y + /* 44 */ ACTOR_CS_AQ_SEAWEED, + /* 45 */ ACTOR_CS_AQ_BUMP_2, + /* 46 */ ACTOR_CS_AQ_CORAL_REEF_2, + /* 47 */ ACTOR_CS_AQ_ROCK, + /* 1000 */ ACTOR_CS_1000 = 1000 // James? Is that you? +} ActorCutsceneModels; + Actor* Game_SpawnActor(ObjectId); // template enums for boss work buffers @@ -1185,7 +1216,7 @@ typedef Actor ZoMine; typedef Actor ZoBarrier; typedef Actor ZoCraneMagnet; typedef Actor ZoSpikeBall; -typedef Actor ZoCargoShip; +typedef Actor ZoTanker; typedef Actor ZoContainer; typedef Actor ZoRadarBuoy; typedef Actor ZoSupplyCrane; diff --git a/include/variables.h b/include/variables.h index dff14fc4..ea946e71 100644 --- a/include/variables.h +++ b/include/variables.h @@ -193,7 +193,7 @@ extern s32 sUnlockOnFoot; // sUnlockOnFoot extern s32 gVsCountdown[]; // gfx_data -extern u16 D_Tex_800DACB8[][32]; +extern u16 D_Tex_800DACB8[]; extern u16 D_Tex_800D99F8[]; extern u16 gTextCharPalettes[]; extern Gfx gRcpInitDL[]; diff --git a/linker_scripts/us/rev1/symbol_addrs_overlays.txt b/linker_scripts/us/rev1/symbol_addrs_overlays.txt index 3e8124c4..ec00441f 100644 --- a/linker_scripts/us/rev1/symbol_addrs_overlays.txt +++ b/linker_scripts/us/rev1/symbol_addrs_overlays.txt @@ -85,7 +85,7 @@ Zoness_801991D0 = 0x801991D0;//segment:ovl_i3 Zoness_80199394 = 0x80199394;//segment:ovl_i3 Zoness_80199470 = 0x80199470;//segment:ovl_i3 Zoness_8019962C = 0x8019962C;//segment:ovl_i3 -Zoness_ZoCargoShip_Init = 0x8019B1F0;//segment:ovl_i3 +Zoness_ZoTanker_Init = 0x8019B1F0;//segment:ovl_i3 Zoness_ZoContainer_Init = 0x8019B810;//segment:ovl_i3 Zoness_ZoSupplyCrane_Init = 0x8019C200;//segment:ovl_i3 Zoness_ZoBarrier_Init = 0x8019D060;//segment:ovl_i3 @@ -108,8 +108,8 @@ Aquas_AqAnglerFish_Update = 0x801B638C;//segment:ovl_i3 Aquas_AqSpindlyFish_Init = 0x801B6E54;//segment:ovl_i3 Aquas_AqSpindlyFish_Update = 0x801B6FF8;//segment:ovl_i3 Aquas_AqGaroa_Init = 0x801B7AF0;//segment:ovl_i3 -Venom1_AqBoulder_Init = 0x801BA57C;//segment:ovl_i3 -Venom1_AqJellyfish_Init = 0x801BB26C;//segment:ovl_i3 +Aquas_AqBoulder_Init = 0x801BA57C;//segment:ovl_i3 +Aquas_AqJellyfish_Init = 0x801BB26C;//segment:ovl_i3 D_i3_801C2240 = 0x801C2240;//segment:ovl_i3 D_AQ_801C4188 = 0x801C4188;//segment:ovl_i3 D_i3_801C2250 = 0x801C2250;//size:0xA0 segment:ovl_i3 diff --git a/src/engine/fox_360.c b/src/engine/fox_360.c index a283479b..8f86dd96 100644 --- a/src/engine/fox_360.c +++ b/src/engine/fox_360.c @@ -2313,12 +2313,12 @@ void ActorAllRange_Update(ActorAllRange* this) { void ActorAllRange_DrawShield(ActorAllRange* this) { f32 sp24; - s32 sp20; + s32 alpha; if (this->fwork[22] > 0) { Matrix_Push(&gGfxMatrix); sp24 = 3.5f; - sp20 = (s32) (this->fwork[22] * 60.0f); + alpha = (s32) (this->fwork[22] * 60.0f); if (gCurrentLevel == LEVEL_VENOM_2) { sp24 *= 1.5f; } @@ -2328,11 +2328,11 @@ void ActorAllRange_DrawShield(ActorAllRange* this) { Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL(&gMasterDisp, SETUPDL_41); if (gCurrentLevel == LEVEL_KATINA) { - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 128, 255, 255, sp20); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 128, 255, 255, alpha); } else if (gCurrentLevel == LEVEL_BOLSE) { - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 128, 128, sp20); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 128, 128, alpha); } else { - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 48, 255, 255, sp20); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 48, 255, 255, alpha); } gSPDisplayList(gMasterDisp++, D_1031630); Matrix_Pop(&gGfxMatrix); @@ -2367,7 +2367,7 @@ void ActorAllRange_DrawBarrelRoll(ActorAllRange* this) { } bool ActorAllRange_MissileOverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { - Actor* this = thisx; + ActorAllRange* this = (ActorAllRange*) thisx; if ((this->timer_0C6 % 2) != 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_34); @@ -2482,7 +2482,7 @@ void ActorAllRange_Draw(ActorAllRange* this) { } else if (gCurrentLevel == LEVEL_KATINA) { switch (this->animFrame) { case 0: - gSPDisplayList(gMasterDisp++, aKaEnemy1LowPolyDL); + gSPDisplayList(gMasterDisp++, aKaEnemyLowPolyDL); break; case 1: gSPDisplayList(gMasterDisp++, aKaCornerianFighterDL); @@ -2490,13 +2490,13 @@ void ActorAllRange_Draw(ActorAllRange* this) { Actor_DrawEngineGlow(this, EG_RED); break; case 3: - gSPDisplayList(gMasterDisp++, aKaEnemy1DL); + gSPDisplayList(gMasterDisp++, aKaEnemyDL); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 30.0f, MTXF_APPLY); ActorAllRange_DrawShield(this); break; } } else if (gCurrentLevel == LEVEL_SECTOR_Z) { - gSPDisplayList(gMasterDisp++, D_SZ_6004FE0); + gSPDisplayList(gMasterDisp++, aSzInvaderIIIDL); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY); Actor_DrawEngineGlow(this, EG_GREEN); } else if (gCurrentLevel == LEVEL_BOLSE) { diff --git a/src/engine/fox_beam.c b/src/engine/fox_beam.c index ffe9c215..5d79a369 100644 --- a/src/engine/fox_beam.c +++ b/src/engine/fox_beam.c @@ -764,7 +764,7 @@ void PlayerShot_CollisionCheck(PlayerShot* shot) { } } } - for (i = 0, actor = gActors; i < ARRAY_COUNT(gActors); i++, actor++) { + for (i = 0, actor = &gActors[0]; i < ARRAY_COUNT(gActors); i++, actor++) { if ((actor->obj.status >= OBJ_ACTIVE) && (actor->timer_0C2 == 0)) { switch (actor->obj.id) { case OBJ_ACTOR_ME_MOLAR_ROCK: @@ -1716,7 +1716,7 @@ bool PlayerShot_FindLockTarget(PlayerShot* shot) { } else { lockRange = 200.0f; } - for (i = 0, actor = gActors; i < ARRAY_COUNT(gActors); i++, actor++) { + for (i = 0, actor = &gActors[0]; i < ARRAY_COUNT(gActors); i++, actor++) { if ((actor->obj.status == OBJ_ACTIVE) && (actor->info.targetOffset != 0.0f) && ((actor->lockOnTimers[shot->sourceId] == 0) && (fabsf(shot->obj.pos.x - actor->obj.pos.x) <= lockRange) && (fabsf(shot->obj.pos.y - (actor->obj.pos.y + actor->info.targetOffset)) <= lockRange) && @@ -1898,7 +1898,7 @@ void PlayerShot_ApplyExplosionDamage(PlayerShot* shot, s32 damage) { } } } - actor = gActors; + actor = &gActors[0]; for (i = 0; i < ARRAY_COUNT(gActors); i++, actor++) { if ((actor->obj.status == OBJ_ACTIVE) && (actor->timer_0C2 == 0) && !((gCurrentLevel == LEVEL_MACBETH) && (OBJ_ACTOR_MA_LOCOMOTIVE <= actor->obj.id) && @@ -2112,7 +2112,7 @@ void PlayerShot_UpdateLockOnShot(PlayerShot* shot) { } else { var_a3 = 0; if (shot->unk_60 == 0) { - for (i = 0, actor = gActors; i < ARRAY_COUNT(gActors); i++, actor++) { + for (i = 0, actor = &gActors[0]; i < ARRAY_COUNT(gActors); i++, actor++) { if ((actor->obj.status == OBJ_ACTIVE) && (actor->info.targetOffset != 0.0f) && (actor->lockOnTimers[shot->sourceId] != 0)) { var_a3 = 1; diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index 224c0e8e..5e40b643 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -96,7 +96,7 @@ void func_demo_80048CC4(ActorCutscene* this, s32 index) { if (index == 3) { AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, this->sfxSource, 0); AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, this->sfxSource, 0); - this->animFrame = 1; + this->animFrame = ACTOR_CS_GREAT_FOX; } else { this->iwork[11] = 1; AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); @@ -330,7 +330,7 @@ f32 D_demo_800C9FF0[] = { -100.0f, 0.0f, 100.0f, 500.0f }; f32 D_demo_800CA000[] = { -150.0f, 150.0f, 0.0f, 0.0f }; f32 D_demo_800CA010[] = { 0.0f, 0.0f, 80.0f, 1000.0f }; f32 D_demo_800CA020[] = { 45.0f, -45.0f, 10.0f, 0.0f }; -s32 D_demo_800CA030[] = { 0, 0, 0, 1 }; +s32 D_demo_800CA030[] = { ACTOR_CS_TEAM_ARWING, ACTOR_CS_TEAM_ARWING, ACTOR_CS_TEAM_ARWING, ACTOR_CS_GREAT_FOX }; s32 D_demo_800CA040[] = { 0, 0, 0, 0 }; void func_demo_80049968(ActorCutscene* this, s32 index) { @@ -2125,7 +2125,7 @@ void func_demo_8004F05C(ActorCutscene* this) { switch (gCurrentLevel) { case LEVEL_BOLSE: switch (this->animFrame) { - case 0: + case ACTOR_CS_TEAM_ARWING: if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) { this->rot_0F4.z += this->rot_0F4.y; this->vel.x = SIN_DEG(this->rot_0F4.z) * 10.0f; @@ -2155,20 +2155,20 @@ void func_demo_8004F05C(ActorCutscene* this) { } break; - case 31: + case ACTOR_CS_31: if (this->timer_0BC == 0) { Object_Kill(&this->obj, this->sfxSource); } break; - case 32: + case ACTOR_CS_32: this->obj.rot.z += this->rot_0F4.z; if (this->timer_0BC == 0) { Object_Kill(&this->obj, this->sfxSource); } break; - case 30: + case ACTOR_CS_30: break; } break; @@ -2179,11 +2179,11 @@ void func_demo_8004F05C(ActorCutscene* this) { case LEVEL_SECTOR_Y: switch (this->animFrame) { - case 0: + case ACTOR_CS_TEAM_ARWING: SectorY_8019FF00(this); break; - case 42: + case ACTOR_CS_42: if (this->timer_0BC == 0) { if (this->obj.pos.x >= -3500.0f) { if (this->obj.pos.z <= 3000.0f) { @@ -2196,7 +2196,7 @@ void func_demo_8004F05C(ActorCutscene* this) { } break; - case 43: + case ACTOR_CS_43: if (this->timer_0BC == 0) { Object_Kill(&this->obj, this->sfxSource); } @@ -2451,7 +2451,7 @@ Vec3f D_demo_800CA0EC[] = { { 295.0, -92.0, -1301.0 }, { -295.0, -92.0, -1301.0 }, }; -Vec3f D_demo_800CA110[8] = { +Vec3f sCsSyShipPos[8] = { { 170.0f, -35.0f, -380.0f }, { -170.0f, -40.0f, -380.0f }, { 170.0f, -130.0f, -380.0f }, { -170.0f, -140.0f, -380.0f }, { 140.0f, 40.0f, -250.0f }, { -150.0f, 40.0f, -250.0f }, { 140.0f, 0.0f, -250.0f }, { -150.0f, 0.0f, -250.0f }, @@ -2473,7 +2473,7 @@ Animation* D_demo_800CA1F4[] = { &D_SY_60265B4, &D_SY_602B8DC, &D_SY_60034C4, &D_SY_602A2CC, &D_SY_602CEB4, &D_SY_602B778, &D_SY_601F3B8, }; -void func_demo_8004FCB8(ActorCutscene* this, s32 arg1) { +void ActorCutscene_SyShip_Setup(ActorCutscene* this, s32 idx) { f32 angle; f32 scale; s32 i; @@ -2491,11 +2491,11 @@ void func_demo_8004FCB8(ActorCutscene* this, s32 arg1) { gDPSetEnvColor(gMasterDisp++, 16, 16, 240, 255); angle = Math_Atan2F(gPlayer[0].cam.eye.x - gPlayer[0].cam.at.x, gPlayer[0].cam.eye.z - gPlayer[0].cam.at.z); - for (i = arg1; i < (arg1 + 4); i++) { + for (i = idx; i < (idx + 4); i++) { Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_demo_800CA110[i].x + this->obj.pos.x, D_demo_800CA110[i].y + this->obj.pos.y, - D_demo_800CA110[i].z + this->obj.pos.z, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sCsSyShipPos[i].x + this->obj.pos.x, sCsSyShipPos[i].y + this->obj.pos.y, + sCsSyShipPos[i].z + this->obj.pos.z, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, angle, MTXF_APPLY); Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -2525,7 +2525,7 @@ void ActorCutscene_Draw(ActorCutscene* this) { f32 x; switch (this->animFrame) { - case 1000: + case ACTOR_CS_1000: RCP_SetupDL(&gMasterDisp, SETUPDL_45); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->work_046); gSPDisplayList(gMasterDisp++, D_ENMY_PLANET_40018A0); @@ -2535,11 +2535,11 @@ void ActorCutscene_Draw(ActorCutscene* this) { } break; - case 0: + case ACTOR_CS_TEAM_ARWING: ActorTeamArwing_Draw(this); break; - case 1: + case ACTOR_CS_GREAT_FOX: if (gCurrentLevel == LEVEL_SECTOR_Z) { gSPFogPosition(gMasterDisp++, gFogNear, 1005); } @@ -2547,14 +2547,14 @@ void ActorCutscene_Draw(ActorCutscene* this) { Cutscene_DrawGreatFox(); break; - case 10: + case ACTOR_CS_ME_CORNERIA_BG: RCP_SetupDL_40(); Matrix_Scale(gGfxMatrix, 60.0f, 60.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_ME_6020810); + gSPDisplayList(gMasterDisp++, aMeCorneriaBgDL); break; - case 11: + case ACTOR_CS_FO_EXPLOSION: RCP_SetupDL_64_2(); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); Matrix_Scale(gGfxMatrix, 60.0f, 60.0f, 1.0f, MTXF_APPLY); @@ -2568,16 +2568,16 @@ void ActorCutscene_Draw(ActorCutscene* this) { gSPDisplayList(gMasterDisp++, aOrbDL); break; - case 20: + case ACTOR_CS_COMMANDER: gSPDisplayList(gMasterDisp++, aCommanderDL); break; - case 24: + case ACTOR_CS_KATT: gSPDisplayList(gMasterDisp++, aKattShipDL); Actor_DrawEngineAndContrails(this); break; - case 25: + case ACTOR_CS_SZ_SPACE_JUNK: if ((this->index % 2) != 0) { gSPDisplayList(gMasterDisp++, aSzSpaceJunk3DL); } else { @@ -2585,19 +2585,19 @@ void ActorCutscene_Draw(ActorCutscene* this) { } break; - case 26: - gSPDisplayList(gMasterDisp++, D_SZ_6004FE0); + case ACTOR_CS_SZ_INVADER: + gSPDisplayList(gMasterDisp++, aSzInvaderIIIDL); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY); Actor_DrawEngineGlow(this, EG_GREEN); break; - case 28: + case ACTOR_CS_COMMANDER_GLOW: gSPDisplayList(gMasterDisp++, aCommanderDL); Matrix_Translate(gGfxMatrix, 0.f, 0.f, -60.0f, MTXF_APPLY); Actor_DrawEngineGlow(this, EG_GREEN); break; - case 30: + case ACTOR_CS_30: Display_SetSecondLight(&this->obj.pos); if (this->work_046 != 0) { @@ -2717,18 +2717,18 @@ void ActorCutscene_Draw(ActorCutscene* this) { } break; - case 31: + case ACTOR_CS_31: RCP_SetupDL_21(); Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 2.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_101ABD0); break; - case 32: + case ACTOR_CS_32: gSPDisplayList(gMasterDisp++, D_BO_6008770); break; - case 33: + case ACTOR_CS_CORNERIAN_FIGHTER: if ((this->index == 3) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { gSPDisplayList(gMasterDisp++, aBillShipDL); } else { @@ -2738,27 +2738,27 @@ void ActorCutscene_Draw(ActorCutscene* this) { Actor_DrawEngineGlow(this, EG_RED); break; - case 34: - gSPDisplayList(gMasterDisp++, aKaEnemy1DL); + case ACTOR_CS_KA_ENEMY: + gSPDisplayList(gMasterDisp++, aKaEnemyDL); break; - case 35: + case ACTOR_CS_SY_SHIP_1_SHRINK: Matrix_Scale(gGfxMatrix, 0.125f, 0.125f, 0.125f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); /* fallthrough */ - case 39: + case ACTOR_CS_SY_SHIP_1: gSPDisplayList(gMasterDisp++, aSyShip1DL); - func_demo_8004FCB8(this, 4); + ActorCutscene_SyShip_Setup(this, 4); break; - case 36: + case ACTOR_CS_SY_SHIP_2: Matrix_Scale(gGfxMatrix, this->scale, this->scale, this->scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, aSyShip2DL); - func_demo_8004FCB8(this, 0); + ActorCutscene_SyShip_Setup(this, 0); break; - case 37: + case ACTOR_CS_37: RCP_SetupDL_49(); gDPSetPrimColor(gMasterDisp++, 0, 0, this->iwork[0], this->iwork[1], this->iwork[2], this->iwork[3]); gDPSetEnvColor(gMasterDisp++, this->iwork[4], this->iwork[5], this->iwork[6], this->iwork[7]); @@ -2767,7 +2767,7 @@ void ActorCutscene_Draw(ActorCutscene* this) { gSPDisplayList(gMasterDisp++, aOrbDL); break; - case 38: + case ACTOR_CS_38: animFrameData = Animation_GetFrameData(D_demo_800CA1F4[this->iwork[4]], this->iwork[5], sp144); Math_SmoothStepToVec3fArray(sp144, this->vwork, 1, animFrameData, this->fwork[2], 100.0f, .0f); RCP_SetupDL_30(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); @@ -2831,19 +2831,19 @@ void ActorCutscene_Draw(ActorCutscene* this) { } break; - case 40: + case ACTOR_CS_40: gSPDisplayList(gMasterDisp++, D_SY_60132A0); break; - case 41: + case ACTOR_CS_AQ_FISHGROUP: Aquas_801BE0F0(this); break; - case 42: + case ACTOR_CS_42: gSPDisplayList(gMasterDisp++, D_SY_6014A40); break; - case 43: + case ACTOR_CS_43: RCP_SetupDL_49(); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->iwork[0]); @@ -2864,24 +2864,24 @@ void ActorCutscene_Draw(ActorCutscene* this) { this->fwork[0] += 0.2f; break; - case 44: - Animation_GetFrameData(&D_AQ_6020A40, this->iwork[0], this->vwork); + case ACTOR_CS_AQ_SEAWEED: + Animation_GetFrameData(&aAqSeaweedAnim, this->iwork[0], this->vwork); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); Animation_DrawSkeleton(1, aAqSeaweedSkel, this->vwork, 0, 0, &this->index, &gIdentityMatrix); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); break; - case 45: + case ACTOR_CS_AQ_BUMP_2: Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, aAqBump2DL); break; - case 46: + case ACTOR_CS_AQ_CORAL_REEF_2: gSPDisplayList(gMasterDisp++, aAqCoralReef2DL); break; - case 47: + case ACTOR_CS_AQ_ROCK: gSPDisplayList(gMasterDisp++, aAqRockDL); break; } diff --git a/src/engine/fox_display.c b/src/engine/fox_display.c index 77927cd2..a1cf1c50 100644 --- a/src/engine/fox_display.c +++ b/src/engine/fox_display.c @@ -1207,7 +1207,7 @@ void Display_ArwingWingTrail_Draw(Player* player) { f32 sp58 = -18.0f; f32 sp54; f32 sp50; - f32 var_fs0; + f32 yRot; if (player->wingPosition == 2) { sp5C = 108.0f; @@ -1220,16 +1220,16 @@ void Display_ArwingWingTrail_Draw(Player* player) { sp54 = 180.0f; } - var_fs0 = player->rot.y; - if (var_fs0 > 90.0f) { - var_fs0 -= 180.0f; + yRot = player->rot.y; + if (yRot > 90.0f) { + yRot -= 180.0f; } - var_fs0 = var_fs0 * 0.25f; + yRot *= 0.25f; sp50 = player->rot.x * 0.25f; if (player->state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) { - var_fs0 = 0.0f; + yRot = 0.0f; sp50 = 0.0f; } @@ -1240,7 +1240,7 @@ void Display_ArwingWingTrail_Draw(Player* player) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, sp5C, sp58, -100.0f, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_DTOR * sp50, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, -(M_DTOR * var_fs0), MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, -(M_DTOR * yRot), MTXF_APPLY); Matrix_Scale(gGfxMatrix, player->contrailScale, 1.0f, 50.0f, MTXF_APPLY); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -17.5f, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); @@ -1253,7 +1253,7 @@ void Display_ArwingWingTrail_Draw(Player* player) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, -sp5C, sp58, -100.0f, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_DTOR * sp50, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, -(M_DTOR * var_fs0), MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, -(M_DTOR * yRot), MTXF_APPLY); Matrix_Scale(gGfxMatrix, player->contrailScale, 1.0f, 50.0f, MTXF_APPLY); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -17.5f, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); @@ -1451,16 +1451,16 @@ f32 D_display_800CA388 = -300.0f; f32 D_display_800CA38C[] = { 0.0f, -300.0f, -150.0f, -50.0f }; void Display_PlayerShadow_Update(Player* player) { - f32 sp34; - f32 sp30; - f32 sp2C; + f32 xScale; + f32 zScale; + f32 angle; if (player->draw && !player->hideShadow) { - sp34 = D_display_800CA334[gGameFrameCount % 8U]; - sp30 = D_display_800CA334[(gGameFrameCount + 4) % 8U]; + xScale = D_display_800CA334[gGameFrameCount % 8U]; + zScale = D_display_800CA334[(gGameFrameCount + 4) % 8U]; if (player->grounded) { - sp34 = sp30 = 0.0f; + xScale = zScale = 0.0f; } Matrix_Push(&gGfxMatrix); @@ -1482,12 +1482,12 @@ void Display_PlayerShadow_Update(Player* player) { Matrix_RotateX(gGfxMatrix, player->shadowRotX, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, player->shadowRotZ, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, 0.8f + sp34, 0.0f, 0.8f + sp30, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.8f + xScale, 0.0f, 0.8f + zScale, MTXF_APPLY); if ((player->form == FORM_ARWING) || (player->form == FORM_BLUE_MARINE) || (player->form == FORM_ON_FOOT)) { - sp2C = player->bankAngle + player->rockAngle + player->damageShake; - if (((sp2C > 70.0f) && (sp2C < 110.0f)) || ((sp2C < -70.0f) && (sp2C > -110.0f))) { - sp2C = 70.0f; + angle = player->bankAngle + player->rockAngle + player->damageShake; + if (((angle > 70.0f) && (angle < 110.0f)) || ((angle < -70.0f) && (angle > -110.0f))) { + angle = 70.0f; } Matrix_RotateY(gGfxMatrix, -player->groundRotY, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, (player->yRot_114 + player->rot.y + player->damageShake) * M_DTOR, MTXF_APPLY); @@ -1495,7 +1495,7 @@ void Display_PlayerShadow_Update(Player* player) { gGfxMatrix, -((player->xRot_120 + player->rot.x + player->aerobaticPitch + player->damageShake) * M_DTOR), MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, M_DTOR * sp2C, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, M_DTOR * angle, MTXF_APPLY); } else { Matrix_RotateY(gGfxMatrix, player->yRot_114 * M_DTOR, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, (player->rot.x + player->aerobaticPitch + player->damageShake) * M_DTOR, diff --git a/src/engine/fox_edata_info.c b/src/engine/fox_edata_info.c index cad96ccd..71b324cf 100644 --- a/src/engine/fox_edata_info.c +++ b/src/engine/fox_edata_info.c @@ -272,7 +272,7 @@ ObjectInfo gObjectInfo[] = { /* OBJ_SCENERY_BO_BUILDING */ {(void*) aBoBuildingDL, 0, (ObjectFunc) NULL, aBoBuildingHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_KA_FLBASE */ {(void*) aKaFLBaseDL, 0, (ObjectFunc) NULL, aKaFrontlineBaseHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_UNK_155 */ {(void*) NULL, 0, (ObjectFunc) NULL, gNoHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_UNK_156 */ {(void*) SectorY_Scenery156_Draw, 1, (ObjectFunc) NULL, aSyScenery156Hitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_SY_SHOGUN_SHIP */ {(void*) SectorY_Scenery156_Draw, 1, (ObjectFunc) NULL, aSyScenery156Hitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_SZ_SPACE_JUNK_3 */ {(void*) aSzSpaceJunk3DL, 0, (ObjectFunc) NULL, aSzSpaceJunk3Hitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_SZ_SPACE_JUNK_1 */ {(void*) aSzSpaceJunk1DL, 0, (ObjectFunc) NULL, aSzSpaceJunk1Hitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_VE2_TOWER */ {(void*) aVe2TowerDL, 0, (ObjectFunc) NULL, aVe2TowerHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, @@ -366,7 +366,7 @@ ObjectInfo gObjectInfo[] = { /* OBJ_ACTOR_ZO_BARRIER */ {(void*) Zoness_ZoBarrier_Draw, 1, (ObjectFunc) Zoness_ZoBarrier_Update, aZoBarrierHitbox, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_ZO_CRANE_MAGNET */ {(void*) Zoness_ZoCraneMagnet_Draw, 1, (ObjectFunc) Zoness_ZoCraneMagnet_Update, gCubeHitbox150, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_SPIKEBALL */ {(void*) Zoness_ZoSpikeBall_Draw, 1, (ObjectFunc) Zoness_ZoSpikeBall_Update, gCubeHitbox200, 5000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_ZO_CARGOSHIP */ {(void*) Zoness_ZoCargoShip_Draw, 1, (ObjectFunc) Zoness_ZoCargoShip_Update, aZoCargoShipHitbox, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_ZO_TANKER */ {(void*) Zoness_ZoTanker_Draw, 1, (ObjectFunc) Zoness_ZoTanker_Update, aZoTankerHitbox, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_ZO_CONTAINER */ {(void*) Zoness_ZoContainer_Draw, 2, (ObjectFunc) Zoness_ZoContainer_Update, aZoContainerHitbox, 1000.0f, 0, 0, 40, 0, 1.0f, 1 }, /* OBJ_ACTOR_ZO_RADARBUOY */ {(void*) Zoness_ZoRadarBuoy_Draw, 1, (ObjectFunc) Zoness_ZoRadarBuoy_Update, aZoRadarBuoyHitbox, 200.0f, 0, 0, 40, 0, 80.0f, 1 }, /* OBJ_ACTOR_ZO_SUPPLYCRANE */ {(void*) Zoness_ZoSupplyCrane_Draw, 1, (ObjectFunc) Zoness_ZoSupplyCrane_Update, aZoSupplyCraneHitbox, 300.0f, 0, 0, 40, 0, 0.0f, 0 }, diff --git a/src/engine/fox_edisplay.c b/src/engine/fox_edisplay.c index 0fc75bd5..7534ccfd 100644 --- a/src/engine/fox_edisplay.c +++ b/src/engine/fox_edisplay.c @@ -1537,7 +1537,7 @@ void Scenery360_Draw(Scenery360* this) { f32 sp3C = 2000.0f; f32 sp38 = 0.5f; - if (this->obj.id == OBJ_SCENERY_UNK_156) { + if (this->obj.id == OBJ_SCENERY_SY_SHOGUN_SHIP) { sp44 = 4000.0f; sp40 = -13000.0f; sp3C = 4500.0f; @@ -1751,7 +1751,7 @@ void Object_DrawAll(s32 arg0) { } } - for (i = 0, actor = gActors; i < ARRAY_COUNT(gActors); i++, actor++) { + for (i = 0, actor = &gActors[0]; i < ARRAY_COUNT(gActors); i++, actor++) { if (actor->obj.status >= OBJ_ACTIVE) { if ((actor->timer_0C6 % 2) == 0) { if (gCurrentLevel == LEVEL_UNK_15) { diff --git a/src/engine/fox_effect.c b/src/engine/fox_effect.c index 4133d968..a64f8914 100644 --- a/src/engine/fox_effect.c +++ b/src/engine/fox_effect.c @@ -461,7 +461,7 @@ void func_effect_80078AE0(Effect* this) { void Effect_Effect355_Draw(Effect355* this) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 180); Graphics_SetScaleMtx(this->scale2 * (13.0f + ((s32) (gGameFrameCount % 2U) * 2.5f))); - gSPDisplayList(gMasterDisp++, D_102ED50); + gSPDisplayList(gMasterDisp++, aBlueSphereDL); } void Effect_Effect353_Draw(Effect353* this) { diff --git a/src/engine/fox_enmy.c b/src/engine/fox_enmy.c index 431df8af..2ad93532 100644 --- a/src/engine/fox_enmy.c +++ b/src/engine/fox_enmy.c @@ -1341,8 +1341,8 @@ void Object_Init(s32 index, ObjectId objId) { case OBJ_BOSS_ZO_SARUMARINE: Zoness_ZoSarumarine_Init(&gBosses[index]); break; - case OBJ_ACTOR_ZO_CARGOSHIP: - Zoness_ZoCargoShip_Init(&gActors[index]); + case OBJ_ACTOR_ZO_TANKER: + Zoness_ZoTanker_Init(&gActors[index]); break; case OBJ_ACTOR_ZO_CONTAINER: Zoness_ZoContainer_Init(&gActors[index]); @@ -1391,10 +1391,10 @@ void Object_Init(s32 index, ObjectId objId) { Venom1_Ve1MonkeyStatue_Init(&gActors[index]); break; case OBJ_ACTOR_AQ_BOULDER: - Venom1_AqBoulder_Init(&gActors[index]); + Aquas_AqBoulder_Init(&gActors[index]); break; case OBJ_ACTOR_AQ_JELLYFISH: - Venom1_AqJellyfish_Init(&gActors[index]); + Aquas_AqJellyfish_Init(&gActors[index]); break; } } @@ -1757,7 +1757,7 @@ void Actor_Despawn(Actor* this) { if (this->itemDrop) { if (D_enmy_800CFE5C[this->itemDrop] < 0.0f) { otherActor = &gActors[0]; - for (i = 0, otherActor = gActors; i < ARRAY_COUNT(gActors); i++, otherActor++) { + for (i = 0, otherActor = &gActors[0]; i < ARRAY_COUNT(gActors); i++, otherActor++) { if ((otherActor->obj.status != OBJ_FREE) && (otherActor->index != this->index) && (otherActor->iwork[15] == this->iwork[15])) { return; diff --git a/src/engine/fox_fade.c b/src/engine/fox_fade.c index adca18a9..449cf264 100644 --- a/src/engine/fox_fade.c +++ b/src/engine/fox_fade.c @@ -11,15 +11,15 @@ void Wipe_Vertical(s32 frame) { } void Wipe_Circular(s32 frame) { - s32 var_s1; + s32 angle; RCP_SetupDL_12(); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -150.0f, MTXF_NEW); - for (var_s1 = 0; var_s1 < MIN(360, frame * 15); var_s1 += 15) { - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, MIN((frame - (var_s1 / 15)) * 15, 255)); + for (angle = 0; angle < MIN(360, frame * 15); angle += 15) { + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, MIN((frame - (angle / 15)) * 15, 255)); Matrix_Push(&gGfxMatrix); - Matrix_RotateZ(gGfxMatrix, var_s1 * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, angle * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.53f, 1.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_Gfx_800D9688); diff --git a/src/engine/fox_game.c b/src/engine/fox_game.c index 81ed9d83..4efbd2c9 100644 --- a/src/engine/fox_game.c +++ b/src/engine/fox_game.c @@ -626,7 +626,7 @@ void Game_Update(void) { #endif Actor* Game_SpawnActor(ObjectId objId) { - Actor* actor = gActors; + Actor* actor = &gActors[0]; s32 i; for (i = 0; i < ARRAY_COUNT(gActors); i++, actor++) { diff --git a/src/engine/fox_hud.c b/src/engine/fox_hud.c index f94ab410..861ef5bf 100644 --- a/src/engine/fox_hud.c +++ b/src/engine/fox_hud.c @@ -4846,7 +4846,7 @@ void Aquas_CsIntroGreatFox_Init(void) { actor->obj.pos.x = 0.0f; actor->obj.pos.y += 1700.0f; actor->obj.pos.z -= 5000.0f; - actor->animFrame = 1; + actor->animFrame = ACTOR_CS_GREAT_FOX; actor->obj.id = OBJ_ACTOR_CUTSCENE; Object_SetInfo(&actor->info, actor->obj.id); AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index bf0a8986..a8806c42 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -2025,7 +2025,7 @@ void Player_CollisionCheck(Player* player) { } } - for (i = 0, actor = gActors; i < ARRAY_COUNT(gActors); i++, actor++) { + for (i = 0, actor = &gActors[0]; i < ARRAY_COUNT(gActors); i++, actor++) { if ((actor->obj.status == OBJ_ACTIVE) && (actor->timer_0C2 == 0)) { if (actor->obj.id == OBJ_ACTOR_ME_MOLAR_ROCK) { temp_v0 = Player_CheckPolyCollision(player, actor->obj.id, actor->obj.pos.x, actor->obj.pos.y, @@ -3166,7 +3166,7 @@ bool Player_CanLockOn(s32 playerNum) { Actor* actor; s32 i; - for (i = 0, actor = gActors; i < ARRAY_COUNT(gActors); i++, actor++) { + for (i = 0, actor = &gActors[0]; i < ARRAY_COUNT(gActors); i++, actor++) { if ((actor->obj.status == OBJ_ACTIVE) && (actor->lockOnTimers[playerNum] != 0)) { return false; } diff --git a/src/engine/fox_tank.c b/src/engine/fox_tank.c index 967aed0b..3e3211b3 100644 --- a/src/engine/fox_tank.c +++ b/src/engine/fox_tank.c @@ -491,7 +491,7 @@ void func_tank_80044868(Player* player) { func_tank_80043280(D_landmaster_3005EA8, D_TI_6009BB8, gGameFrameCount * -55.0f); } if ((gCurrentLevel == LEVEL_MACBETH) && (player->state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { - func_tank_80043280(D_landmaster_3005EA8, *D_Tex_800DACB8, gGameFrameCount * -55.0f); + func_tank_80043280(D_landmaster_3005EA8, D_Tex_800DACB8, gGameFrameCount * -55.0f); } } if (player->baseSpeed > 10.0f) { @@ -506,6 +506,7 @@ void func_tank_80044868(Player* player) { void func_tank_80045130(Player* player) { Math_SmoothStepToF(&player->unk_170, 0.0f, 1.0f, 0.2f, 0.0f); Math_SmoothStepToF(&player->unk_16C, 0.0f, 1.0f, 0.2f, 0.0f); + if (gInputPress->button & Z_TRIG) { player->sfx.bank = 1; if ((player->rollInputTimerL != 0) && (player->zRotBank > 0.0f) && (player->boostMeter < 10.0f)) { @@ -519,6 +520,7 @@ void func_tank_80045130(Player* player) { player->rollInputTimerL = 10; } } + if (gInputPress->button & R_TRIG) { player->sfx.bank = 1; if ((player->rollInputTimerR != 0) && (player->zRotBank < 0.0f) && (player->boostMeter < 10.0f)) { @@ -790,7 +792,7 @@ void func_tank_80046260(Player* player) { Scenery* scenery; s32 i; - for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) { + for (i = 0, scenery = &gScenery[0]; i < ARRAY_COUNT(gScenery); i++, scenery++) { if ((scenery->obj.status == OBJ_ACTIVE) && (scenery->obj.id == OBJ_SCENERY_TI_BRIDGE) && ((player->trueZpos - 2000.0f) < scenery->obj.pos.z) && (scenery->obj.pos.y < player->pos.y)) { func_tank_800460E0(player, scenery->info.hitbox, scenery->obj.pos.x, scenery->obj.pos.y, scenery->obj.pos.z, @@ -843,6 +845,7 @@ void func_tank_8004641C(Player* player, s32 arg1, f32 arg2, f32 arg3, f32 arg4, sp84 = sp64.x + arg2; sp80 = sp64.y + arg3; sp7C = sp64.z + arg4; + if (Play_CheckPolyCollision(arg1, arg2, arg3, arg4, sp84, sp80, sp7C, &sp58, &sp4C)) { if (D_MA_801BE250[27] < arg3 + sp58.y) { D_MA_801BE250[27] = arg3 + sp58.y; @@ -863,6 +866,7 @@ void func_tank_8004641C(Player* player, s32 arg1, f32 arg2, f32 arg3, f32 arg4, player->rollRate = player->baseRollRate = -20; } } + if (Play_CheckPolyCollision(arg1, arg2, arg3, arg4, sp84, arg3, sp7C, &sp58, &sp4C) && (D_800C9F10 <= arg3 + sp58.y)) { D_800C9F10 = arg3 + sp58.y; @@ -1344,7 +1348,7 @@ void func_tank_800481F4(Player* player) { Player_UpdateHitbox(player); func_tank_800444BC(player); if (player->mercyTimer == 0) { - for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) { + for (i = 0, scenery = &gScenery[0]; i < ARRAY_COUNT(gScenery); i++, scenery++) { if ((scenery->obj.status == OBJ_ACTIVE) && (scenery->obj.id != OBJ_SCENERY_TI_BRIDGE) && (scenery->obj.id != OBJ_SCENERY_MA_TRAIN_TRACK_13) && (scenery->obj.id != OBJ_SCENERY_MA_BUILDING_1) && (scenery->obj.id != OBJ_SCENERY_MA_BUILDING_2) && (scenery->obj.id != OBJ_SCENERY_GUILLOTINE_HOUSING) && @@ -1386,7 +1390,7 @@ void func_tank_800481F4(Player* player) { } } - for (i = 0, boss = gBosses; i < ARRAY_COUNT(gBosses); i++, boss++) { + for (i = 0, boss = &gBosses[0]; i < ARRAY_COUNT(gBosses); i++, boss++) { if (boss->obj.status == OBJ_ACTIVE) { temp_v0 = Player_CheckHitboxCollision(player, boss->info.hitbox, &sp98, boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, boss->obj.rot.x, @@ -1397,7 +1401,7 @@ void func_tank_800481F4(Player* player) { } } - for (i = 0, actor = gActors; i < ARRAY_COUNT(gActors); i++, actor++) { + for (i = 0, actor = &gActors[0]; i < ARRAY_COUNT(gActors); i++, actor++) { if ((actor->obj.status == OBJ_ACTIVE) && (actor->timer_0C2 == 0)) { if (actor->obj.id == OBJ_ACTOR_EVENT) { temp_v0 = Player_CheckHitboxCollision(player, actor->info.hitbox, &sp98, actor->obj.pos.x, @@ -1454,6 +1458,7 @@ void func_tank_800481F4(Player* player) { player->vel.x = 0.0f; player->vel.y = 30.0f; player->pos.x = player->basePos.x; + actor->dmgType = DMG_COLLISION; if (actor->info.damage != 0) { Player_ApplyDamage(player, 0, 20); @@ -1482,7 +1487,7 @@ void func_tank_800481F4(Player* player) { } } } - for (i = 0, sprite = gSprites; i < ARRAY_COUNT(gSprites); i++, sprite++) { + for (i = 0, sprite = &gSprites[0]; i < ARRAY_COUNT(gSprites); i++, sprite++) { if (sprite->obj.status == OBJ_ACTIVE) { if ((player->trueZpos - 200.0f) < sprite->obj.pos.z) { temp_v0 = Player_CheckHitboxCollision(player, sprite->info.hitbox, &sp98, sprite->obj.pos.x, diff --git a/src/overlays/ovl_ending/fox_end1.c b/src/overlays/ovl_ending/fox_end1.c index 27e93a9e..5ee274b8 100644 --- a/src/overlays/ovl_ending/fox_end1.c +++ b/src/overlays/ovl_ending/fox_end1.c @@ -5,6 +5,7 @@ #include "assets/ast_allies.h" #include "assets/ast_great_fox.h" #include "assets/ast_ending.h" +#include "prevent_bss_reordering.h" void Ending_8018CE20(s32); void Ending_801926D4(void); diff --git a/src/overlays/ovl_i1/fox_co.c b/src/overlays/ovl_i1/fox_co.c index 3eed01e7..14e51264 100644 --- a/src/overlays/ovl_i1/fox_co.c +++ b/src/overlays/ovl_i1/fox_co.c @@ -1336,7 +1336,7 @@ void Corneria_CoGaruda1_Update(CoGaruda1* this) { switch (this->state) { case 0: this->fwork[1] += 20.0f; - Lib_Texture_Scroll(D_CO_60329C0, 16, 16, 1); + Lib_Texture_Scroll(aCoGarudaTracksTex, 16, 16, 1); this->animFrame = 0; this->fwork[0] += 1.0f; @@ -1417,7 +1417,7 @@ void Corneria_CoGaruda2_Update(CoGaruda2* this) { case 1: this->fwork[0] = -10.0f; - Lib_Texture_Scroll(D_CO_60329C0, 16, 16, 1); + Lib_Texture_Scroll(aCoGarudaTracksTex, 16, 16, 1); if (this->timer_0BC == 0) { this->state = 2; this->iwork[2] = RAND_INT(10.0f) + 10; @@ -1426,7 +1426,7 @@ void Corneria_CoGaruda2_Update(CoGaruda2* this) { case 2: this->fwork[0] = -10.0f; - Lib_Texture_Scroll(D_CO_60329C0, 16, 16, 1); + Lib_Texture_Scroll(aCoGarudaTracksTex, 16, 16, 1); this->animFrame++; if (this->animFrame >= Animation_GetFrameCount(&D_CO_602AA04)) { @@ -1485,7 +1485,7 @@ void Corneria_CoGaruda3_Update(CoGaruda3* this) { case 1: this->fwork[0] = 5.0f; this->fwork[1] += 5.0f; - Lib_Texture_Scroll(D_CO_60329C0, 16, 16, 1); + Lib_Texture_Scroll(aCoGarudaTracksTex, 16, 16, 1); this->animFrame++; if (this->animFrame >= Animation_GetFrameCount(&aCoGaruda3Anim)) { this->animFrame = 0; diff --git a/src/overlays/ovl_i1/fox_ve1.c b/src/overlays/ovl_i1/fox_ve1.c index 4b4bd7da..c863e1db 100644 --- a/src/overlays/ovl_i1/fox_ve1.c +++ b/src/overlays/ovl_i1/fox_ve1.c @@ -323,7 +323,7 @@ void Venom1_Ve1TempleEntrance_Update(Ve1TempleEntrance* this) { } } -void Venom1_Ve1Pillar1_Init(Actor* this) { +void Venom1_Ve1Pillar1_Init(Ve1Pillar1* this) { } void Venom1_Ve1Pillar1_Update(Ve1Pillar1* this) { @@ -880,7 +880,7 @@ void Venom1_Ve1Golemech_Init(Ve1Golemech* this) { } bool Venom1_801937F4(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { - Boss* this = thisx; + Ve1Golemech* this = (Ve1Golemech*) thisx; bool override; s32 i; s32 lum; @@ -975,7 +975,7 @@ bool Venom1_801937F4(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* t void Venom1_80193D64(s32 limbIndex, Vec3f* rot, void* thisx) { s32 spBC; - Boss* this = thisx; + Ve1Golemech* this = (Ve1Golemech*) thisx; Vec3f spAC; UnkStruct_i1_8019A058* var_s1; UnkStruct_i1_8019B838* var_s7; diff --git a/src/overlays/ovl_i2/fox_me.c b/src/overlays/ovl_i2/fox_me.c index 9536c9ff..7973cde3 100644 --- a/src/overlays/ovl_i2/fox_me.c +++ b/src/overlays/ovl_i2/fox_me.c @@ -21,20 +21,21 @@ f32 D_i2_80195534[] = { 0.15f, 0.45f, 0.75f, 1.3f, 0.75f, 0.45f, 0.15f, 0.0f }; f32 D_i2_80195554[] = { 101.0f, 96.0f, 85.0f, 80.0f, 69.0f, 64.0f, 53.0f, 48.0f, 37.0f, 32.0f, 21.0f, 16.0f }; -f32 D_i2_80195584[] = { 180.0f, -180.0f, 0.0f, -1500.0f }; +f32 sMeLevelStartTeamSetupXpos[] = { 180.0f, -180.0f, 0.0f, -1500.0f }; -f32 D_i2_80195594[] = { 50.0f, 100.0f, -50.0f, 0.0f }; +f32 sMeLevelStartTeamSetupYpos[] = { 50.0f, 100.0f, -50.0f, 0.0f }; -f32 D_i2_801955A4[] = { 240.0f, 480.0f, 720.0f, -5000.0f }; +f32 sMeLevelStartTeamSetupZpos[] = { 240.0f, 480.0f, 720.0f, -5000.0f }; -s32 D_i2_801955B4[] = { 0, 0, 0, 1 }; +s32 sMeLevelStartTeamSetupModel[] = { ACTOR_CS_TEAM_ARWING, ACTOR_CS_TEAM_ARWING, ACTOR_CS_TEAM_ARWING, + ACTOR_CS_GREAT_FOX }; Vec3f D_i2_801955C4 = { 0.0f, 0.0f, 100.0f }; -Vec3f D_i2_801955D0[] = { 2000.0f, 2000.0f, 2000.0f, -2000.0f, 2000.0f, 2000.0f, - 0.0f, -3000.0f, 3000.0f, 5000.0f, -3000.0f, -3000.0f }; +Vec3f sMeLevelCompleteTeamSetupPos[] = { 2000.0f, 2000.0f, 2000.0f, -2000.0f, 2000.0f, 2000.0f, + 0.0f, -3000.0f, 3000.0f, 5000.0f, -3000.0f, -3000.0f }; -f32 D_i2_80195600[] = { 75.0f, -80.0f, 85.0f, 0.0f }; +f32 sMeLevelCompleteTeamSetupModel[] = { 75.0f, -80.0f, 85.0f, 0.0f }; Vec3f D_i2_80195610[] = { { 200.0f, -10.0f, 200.0f }, @@ -230,7 +231,7 @@ void Meteo_80187D08(f32 x, f32 y, f32 z, f32 arg3, f32 xRot, f32 yRot, s32 arg6, } } -void Meteo_80187D98(Effect369* this, f32 x, f32 y, f32 z, f32 arg4, bool arg5) { +void Meteo_80187D98(Effect369* this, f32 x, f32 y, f32 z, f32 arg4, bool rotate) { Effect_Initialize(this); this->obj.status = OBJ_INIT; this->obj.id = OBJ_EFFECT_369; @@ -240,10 +241,10 @@ void Meteo_80187D98(Effect369* this, f32 x, f32 y, f32 z, f32 arg4, bool arg5) { this->obj.pos.z = z; this->unk_60.z = arg4; - this->unk_48 = arg5; + this->unk_48 = rotate; this->obj.rot.x = 45.0f; - if (arg5) { + if (rotate) { this->obj.rot.x = -45.0f; } @@ -1500,8 +1501,8 @@ void Meteo_MeCrusher_Update(MeCrusher* this) { } } -void Meteo_8018B7C4(s32 arg0) { - f32 xScale = arg0 * 0.83333f; // approx 5 / 6 +void Meteo_MeCrusherEngineGlow_Draw(s32 scale) { + f32 xScale = scale * 0.83333f; // approx 5 / 6 if ((gGameFrameCount % 2) != 0) { xScale *= 1.1f; @@ -1514,7 +1515,7 @@ void Meteo_8018B7C4(s32 arg0) { Matrix_Scale(gGfxMatrix, 10.0f * xScale, 10.0f * xScale, 10.0f * xScale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 70); - gSPDisplayList(gMasterDisp++, D_102ED50); + gSPDisplayList(gMasterDisp++, aBlueSphereDL); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); @@ -1523,7 +1524,7 @@ void Meteo_8018B7C4(s32 arg0) { Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 60); - gSPDisplayList(gMasterDisp++, D_102ED50); + gSPDisplayList(gMasterDisp++, aBlueSphereDL); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); @@ -1532,7 +1533,7 @@ void Meteo_8018B7C4(s32 arg0) { Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 50); - gSPDisplayList(gMasterDisp++, D_102ED50); + gSPDisplayList(gMasterDisp++, aBlueSphereDL); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); @@ -1541,7 +1542,7 @@ void Meteo_8018B7C4(s32 arg0) { Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 40); - gSPDisplayList(gMasterDisp++, D_102ED50); + gSPDisplayList(gMasterDisp++, aBlueSphereDL); Matrix_Pop(&gGfxMatrix); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); } @@ -1552,7 +1553,8 @@ void Meteo_MeCrusher_Draw(MeCrusher* this) { f32 var_fs1; s32 pad; - gSPDisplayList(gMasterDisp++, D_ME_6001310); + gSPDisplayList(gMasterDisp++, aMeCrusherDL); + RCP_SetupDL_64(); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); @@ -1591,12 +1593,12 @@ void Meteo_MeCrusher_Draw(MeCrusher* this) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 32, 32, 128); Matrix_Scale(gGfxMatrix, var_fs1, var_fs1, var_fs1, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_102ED50); + gSPDisplayList(gMasterDisp++, aBlueSphereDL); } else { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 128); Matrix_Scale(gGfxMatrix, var_fs1 * 6.0f, var_fs1 * 6.0f, var_fs1 * 6.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_102ED50); + gSPDisplayList(gMasterDisp++, aBlueSphereDL); } Matrix_Pop(&gGfxMatrix); } @@ -1687,7 +1689,7 @@ void Meteo_MeCrusher_Draw(MeCrusher* this) { } Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_102ED50); + gSPDisplayList(gMasterDisp++, aBlueSphereDL); Matrix_Pop(&gGfxMatrix); Matrix_RotateX(gGfxMatrix, -M_PI / 6, MTXF_APPLY); @@ -1713,7 +1715,7 @@ void Meteo_MeCrusher_Draw(MeCrusher* this) { Matrix_Scale(gGfxMatrix, var_fs1, var_fs1, var_fs1, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_102ED50); + gSPDisplayList(gMasterDisp++, aBlueSphereDL); Matrix_Pop(&gGfxMatrix); } @@ -1761,7 +1763,7 @@ void Meteo_MeCrusher_Draw(MeCrusher* this) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, 650.0f, 600.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - Meteo_8018B7C4(this->swork[0] - 1); + Meteo_MeCrusherEngineGlow_Draw(this->swork[0] - 1); Matrix_Pop(&gGfxMatrix); } @@ -1769,23 +1771,23 @@ void Meteo_MeCrusher_Draw(MeCrusher* this) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, -650.0f, 600.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - Meteo_8018B7C4(this->swork[1] - 1); + Meteo_MeCrusherEngineGlow_Draw(this->swork[1] - 1); Matrix_Pop(&gGfxMatrix); } gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); } -void Meteo_8018C77C(ActorCutscene* this, s32 arg1) { +void Meteo_LevelStart_SetupTeam(ActorCutscene* this, s32 teamIdx) { Actor_Initialize(this); this->obj.status = OBJ_INIT; this->obj.id = OBJ_ACTOR_CUTSCENE; - this->obj.pos.x = D_i2_80195584[arg1] + gPlayer[0].pos.x; - this->obj.pos.y = D_i2_80195594[arg1] + gPlayer[0].pos.y; - this->obj.pos.z = D_i2_801955A4[arg1] + gPlayer[0].trueZpos; + this->obj.pos.x = sMeLevelStartTeamSetupXpos[teamIdx] + gPlayer[0].pos.x; + this->obj.pos.y = sMeLevelStartTeamSetupYpos[teamIdx] + gPlayer[0].pos.y; + this->obj.pos.z = sMeLevelStartTeamSetupZpos[teamIdx] + gPlayer[0].trueZpos; - this->animFrame = D_i2_801955B4[arg1]; + this->animFrame = sMeLevelStartTeamSetupModel[teamIdx]; this->obj.rot.y = 180.0f; Object_SetInfo(&this->info, this->obj.id); this->info.cullDistance = 200.0f; @@ -1800,38 +1802,38 @@ void Meteo_8018C77C(ActorCutscene* this, s32 arg1) { AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, this->sfxSource, 0); } -void Meteo_8018C8F4(MeMeteor2* actor182, ActorCutscene* actorCs) { - Actor_Initialize(actor182); - actor182->obj.status = OBJ_INIT; - actor182->obj.id = OBJ_ACTOR_ME_METEOR_2; +void Meteo_8018C8F4(MeMeteor2* this, ActorCutscene* actorCs) { + Actor_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_ACTOR_ME_METEOR_2; - actor182->obj.pos.x = RAND_FLOAT_CENTERED_SEEDED(2000.0f) + actorCs->obj.pos.x; - actor182->obj.pos.y = RAND_FLOAT_CENTERED_SEEDED(2000.0f) + actorCs->obj.pos.y; - actor182->obj.pos.z = RAND_FLOAT_CENTERED_SEEDED(500.0f) + actorCs->obj.pos.z - 9000.0f; + this->obj.pos.x = RAND_FLOAT_CENTERED_SEEDED(2000.0f) + actorCs->obj.pos.x; + this->obj.pos.y = RAND_FLOAT_CENTERED_SEEDED(2000.0f) + actorCs->obj.pos.y; + this->obj.pos.z = RAND_FLOAT_CENTERED_SEEDED(500.0f) + actorCs->obj.pos.z - 9000.0f; - actor182->obj.rot.y = RAND_FLOAT_SEEDED(360.0f); - actor182->obj.rot.x = RAND_FLOAT_SEEDED(360.0f); + this->obj.rot.y = RAND_FLOAT_SEEDED(360.0f); + this->obj.rot.x = RAND_FLOAT_SEEDED(360.0f); - actor182->timer_0C2 = 10000; - actor182->vel.z = 30.0f; - Object_SetInfo(&actor182->info, actor182->obj.id); + this->timer_0C2 = 10000; + this->vel.z = 30.0f; + Object_SetInfo(&this->info, this->obj.id); } -void Meteo_8018CA10(Actor* actor182, ActorCutscene* actorCs, f32 x, f32 y, f32 z) { - Actor_Initialize(actor182); - actor182->obj.status = OBJ_INIT; - actor182->obj.id = OBJ_ACTOR_ME_METEOR_2; +void Meteo_8018CA10(MeMeteor2* this, ActorCutscene* actorCs, f32 x, f32 y, f32 z) { + Actor_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_ACTOR_ME_METEOR_2; - actor182->obj.pos.x = actorCs->obj.pos.x + x; - actor182->obj.pos.y = actorCs->obj.pos.y + y; - actor182->obj.pos.z = actorCs->obj.pos.x + z; + this->obj.pos.x = actorCs->obj.pos.x + x; + this->obj.pos.y = actorCs->obj.pos.y + y; + this->obj.pos.z = actorCs->obj.pos.x + z; - actor182->obj.rot.y = RAND_FLOAT_SEEDED(360.0f); - actor182->obj.rot.x = RAND_FLOAT_SEEDED(360.0f); + this->obj.rot.y = RAND_FLOAT_SEEDED(360.0f); + this->obj.rot.x = RAND_FLOAT_SEEDED(360.0f); - actor182->timer_0C2 = 10000; - actor182->vel.z = 30.0f; - Object_SetInfo(&actor182->info, actor182->obj.id); + this->timer_0C2 = 10000; + this->vel.z = 30.0f; + Object_SetInfo(&this->info, this->obj.id); } void Meteo_8018CAD8(void) { @@ -1845,7 +1847,7 @@ void Meteo_8018CAD8(void) { actorCs->obj.pos.y = 0.0f; actorCs->obj.pos.z = 9000.0f; - actorCs->animFrame = 10; + actorCs->animFrame = ACTOR_CS_ME_CORNERIA_BG; Object_SetInfo(&actorCs->info, actorCs->obj.id); } @@ -1875,7 +1877,7 @@ void Meteo_Effect346_Spawn(ActorEvent* this) { Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); - for (i = 0; i < 25; ++i) { + for (i = 0; i < 25; i++) { for (j = 0; j < ARRAY_COUNT(gEffects); j++) { if (gEffects[j].obj.status == OBJ_FREE) { Meteo_Effect346_Setup(&gEffects[j], this); @@ -1888,10 +1890,10 @@ void Meteo_Effect346_Spawn(ActorEvent* this) { void Meteo_LevelStart(Player* player) { u8 sp8F; s32 i; - Actor* actor0 = &gActors[0]; - Actor* actor1 = &gActors[1]; - Actor* actor2 = &gActors[2]; - Actor* actor3 = &gActors[3]; + Actor* falco = &gActors[0]; + Actor* slippy = &gActors[1]; + Actor* peppy = &gActors[2]; + Actor* greatFox = &gActors[3]; f32 x; f32 y; f32 z; @@ -1909,20 +1911,20 @@ void Meteo_LevelStart(Player* player) { gCsFrameCount = 0; if (gTeamShields[TEAM_ID_FALCO] > 0) { - Meteo_8018C77C(actor0, 0); + Meteo_LevelStart_SetupTeam(falco, 0); } if (gTeamShields[TEAM_ID_SLIPPY] > 0) { - Meteo_8018C77C(actor1, 1); + Meteo_LevelStart_SetupTeam(slippy, 1); } if (gTeamShields[TEAM_ID_PEPPY] > 0) { - Meteo_8018C77C(actor2, 2); + Meteo_LevelStart_SetupTeam(peppy, 2); } - Meteo_8018C77C(actor3, 3); + Meteo_LevelStart_SetupTeam(greatFox, 3); Meteo_8018CAD8(); for (i = 5; i < 15; i++) { - Meteo_8018C8F4(&gActors[i], actor3); + Meteo_8018C8F4(&gActors[i], greatFox); } D_ctx_80177A48[1] = -13000.0f; @@ -1942,7 +1944,7 @@ void Meteo_LevelStart(Player* player) { D_ctx_80177A48[3] = 1.0f; case 1: - actor3->vel.z = 4.0f; + greatFox->vel.z = 4.0f; gCsCamEyeX = player->pos.x + 100.0f; gCsCamEyeY = player->pos.y; gCsCamEyeZ = D_ctx_80177A48[1] + player->trueZpos; @@ -1956,16 +1958,16 @@ void Meteo_LevelStart(Player* player) { D_ctx_80177A48[0] = 0.1f; if (gCsFrameCount == 680) { - actor3->state = 10; + greatFox->state = 10; } if (gCsFrameCount == 720) { - actor0->state = 11; + falco->state = 11; } if (gCsFrameCount == 750) { - actor2->state = 12; + peppy->state = 12; } if (gCsFrameCount == 780) { - actor1->state = 13; + slippy->state = 13; } if (gCsFrameCount > 810) { player->csState = 2; @@ -1995,27 +1997,27 @@ void Meteo_LevelStart(Player* player) { sp8F = true; } if (gCsFrameCount == 600) { - Meteo_8018CA10(&gActors[16], actor3, 100.0f, 500.0f, 1500.0f); - Meteo_8018CA10(&gActors[17], actor3, 300.0f, 400.0f, 2000.0f); + Meteo_8018CA10(&gActors[16], greatFox, 100.0f, 500.0f, 1500.0f); + Meteo_8018CA10(&gActors[17], greatFox, 300.0f, 400.0f, 2000.0f); } if (gCsFrameCount == 660) { for (i = 4; i < 15; i++) { gActors[i].obj.status = OBJ_FREE; } - actor3->obj.pos.x += 1000.0f; - actor3->obj.pos.z += 4000.0f; + greatFox->obj.pos.x += 1000.0f; + greatFox->obj.pos.z += 4000.0f; for (i = 4; i < 9; i++) { - Meteo_8018C8F4(&gActors[i], actor3); + Meteo_8018C8F4(&gActors[i], greatFox); } - actor3->obj.pos.x -= 1000.0f; - actor3->obj.pos.z -= 4000.0f; + greatFox->obj.pos.x -= 1000.0f; + greatFox->obj.pos.z -= 4000.0f; - Meteo_8018CA10(&gActors[13], actor3, 1500.0f, 200.0f, 100.0f); - Meteo_8018CA10(&gActors[14], actor3, 1200.0f, -200.0f, -500.0f); - Meteo_8018CA10(&gActors[15], actor3, 2000.0f, -100.0f, -1000.0f); + Meteo_8018CA10(&gActors[13], greatFox, 1500.0f, 200.0f, 100.0f); + Meteo_8018CA10(&gActors[14], greatFox, 1200.0f, -200.0f, -500.0f); + Meteo_8018CA10(&gActors[15], greatFox, 2000.0f, -100.0f, -1000.0f); gActors[50].obj.status = gActors[16].obj.status = gActors[17].obj.status = OBJ_FREE; } @@ -2034,9 +2036,9 @@ void Meteo_LevelStart(Player* player) { if (sp8F != 0) { sp58 = D_i2_801955C4; D_ctx_80177A48[3] *= -1.0f; - x = gActors[player->meTargetIndex].obj.pos.x - (actor3->obj.pos.x + (D_ctx_80177A48[3] * 74.0f)); - y = gActors[player->meTargetIndex].obj.pos.y - (actor3->obj.pos.y - 232.0f); - z = gActors[player->meTargetIndex].obj.pos.z - (actor3->obj.pos.z - 1190.0f); + x = gActors[player->meTargetIndex].obj.pos.x - (greatFox->obj.pos.x + (D_ctx_80177A48[3] * 74.0f)); + y = gActors[player->meTargetIndex].obj.pos.y - (greatFox->obj.pos.y - 232.0f); + z = gActors[player->meTargetIndex].obj.pos.z - (greatFox->obj.pos.z - 1190.0f); sp64 = Math_RadToDeg(Math_Atan2F(x, z)); x = sqrtf(SQ(x) + SQ(z)); @@ -2046,9 +2048,9 @@ void Meteo_LevelStart(Player* player) { Matrix_RotateX(gCalcMatrix, M_DTOR * sp68, MTXF_APPLY); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp58, &sp4C); - Actor_SpawnGreatFoxLaser(100, actor3->obj.pos.x + (D_ctx_80177A48[3] * 74.0f) + (sp4C.x * 0.6f), - actor3->obj.pos.y - 232.0f + (sp4C.y * 0.8f), - actor3->obj.pos.z - 1190.0f + (sp4C.z * 0.8f), sp4C.x, sp4C.y, sp4C.z, + Actor_SpawnGreatFoxLaser(100, greatFox->obj.pos.x + (D_ctx_80177A48[3] * 74.0f) + (sp4C.x * 0.6f), + greatFox->obj.pos.y - 232.0f + (sp4C.y * 0.8f), + greatFox->obj.pos.z - 1190.0f + (sp4C.z * 0.8f), sp4C.x, sp4C.y, sp4C.z, sp68, sp64, 0.0f); } if (player->csEventTimer == 1) { @@ -2190,24 +2192,24 @@ void Meteo_Effect371_Draw(Effect371* this) { } } -void Meteo_8018DF08(ActorCutscene* this, s32 idx) { +void Meteo_LevelComplete_SetupTeam(ActorCutscene* this, s32 teamIdx) { Actor_Initialize(this); this->obj.status = OBJ_INIT; this->obj.id = OBJ_ACTOR_CUTSCENE; - this->obj.pos.x = D_i2_801955D0[idx].x + gPlayer[0].pos.x; - this->obj.pos.y = D_i2_801955D0[idx].y + gPlayer[0].pos.y; - this->obj.pos.z = D_i2_801955D0[idx].z + gPlayer[0].trueZpos; + this->obj.pos.x = sMeLevelCompleteTeamSetupPos[teamIdx].x + gPlayer[0].pos.x; + this->obj.pos.y = sMeLevelCompleteTeamSetupPos[teamIdx].y + gPlayer[0].pos.y; + this->obj.pos.z = sMeLevelCompleteTeamSetupPos[teamIdx].z + gPlayer[0].trueZpos; this->rot_0F4.y = 0.0f; - this->rot_0F4.z = D_i2_80195600[idx]; + this->rot_0F4.z = sMeLevelCompleteTeamSetupModel[teamIdx]; Object_SetInfo(&this->info, this->obj.id); - if (idx == 3) { + if (teamIdx == 3) { AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, this->sfxSource, 0); AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, this->sfxSource, 0); - this->animFrame = 1; + this->animFrame = ACTOR_CS_GREAT_FOX; } else { this->iwork[11] = 1; AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); @@ -2356,15 +2358,15 @@ void Meteo_LevelComplete(Player* player) { Object_Kill(&gActors[2].obj, gActors[2].sfxSource); if (gTeamShields[TEAM_ID_FALCO] > 0) { - Meteo_8018DF08(&gActors[0], 0); + Meteo_LevelComplete_SetupTeam(&gActors[0], 0); } if (gTeamShields[TEAM_ID_SLIPPY] > 0) { - Meteo_8018DF08(&gActors[1], 1); + Meteo_LevelComplete_SetupTeam(&gActors[1], 1); } if (gTeamShields[TEAM_ID_PEPPY] > 0) { - Meteo_8018DF08(&gActors[2], 2); + Meteo_LevelComplete_SetupTeam(&gActors[2], 2); } - Meteo_8018DF08(&gActors[3], 3); + Meteo_LevelComplete_SetupTeam(&gActors[3], 3); break; case 370: diff --git a/src/overlays/ovl_i2/fox_sx.c b/src/overlays/ovl_i2/fox_sx.c index e892400e..4f8399d3 100644 --- a/src/overlays/ovl_i2/fox_sx.c +++ b/src/overlays/ovl_i2/fox_sx.c @@ -17,21 +17,21 @@ void SectorX_SxSpyborg_PostLimbDraw(s32, Vec3f*, void*); void SectorX_8018F030(void) { s32 i; - Actor* actor = &gActors[0]; + SxSlippy* slippy = &gActors[0]; - for (i = 0; i < ARRAY_COUNT(gActors); i++, actor++) { - if (actor->obj.status == OBJ_FREE) { - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_SX_SLIPPY; - actor->animFrame = 1; - actor->obj.rot.y = 180.0f; - actor->obj.pos.x = gPlayer[0].cam.eye.x - 300.0f; - actor->obj.pos.y = gPlayer[0].cam.eye.y + 200.0f; - actor->obj.pos.z = gPlayer[0].cam.eye.z - gPathProgress + 300.0f; - actor->iwork[11] = 1; - actor->aiType = AI360_SLIPPY; - Object_SetInfo(&actor->info, actor->obj.id); + for (i = 0; i < ARRAY_COUNT(gActors); i++, slippy++) { + if (slippy->obj.status == OBJ_FREE) { + Actor_Initialize(slippy); + slippy->obj.status = OBJ_INIT; + slippy->obj.id = OBJ_ACTOR_SX_SLIPPY; + slippy->animFrame = 1; + slippy->obj.rot.y = 180.0f; + slippy->obj.pos.x = gPlayer[0].cam.eye.x - 300.0f; + slippy->obj.pos.y = gPlayer[0].cam.eye.y + 200.0f; + slippy->obj.pos.z = gPlayer[0].cam.eye.z - gPathProgress + 300.0f; + slippy->iwork[11] = 1; + slippy->aiType = AI360_SLIPPY; + Object_SetInfo(&slippy->info, slippy->obj.id); Radio_PlayMessage(gMsg_ID_5475, RCID_SLIPPY); break; } @@ -193,7 +193,7 @@ void SectorX_SxSlippy_Draw(SxSlippy* this) { void SectorX_8018FA04(f32 x, f32 y, f32 z) { s32 i; - Actor* actor; + Actor* slippy; f32 yRot; f32 xRot; f32 pad; @@ -201,16 +201,16 @@ void SectorX_8018FA04(f32 x, f32 y, f32 z) { Vec3f dest; for (i = 0; i < ARRAY_COUNT(gActors); i++) { - actor = &gActors[i]; - if (actor->obj.status == OBJ_FREE) { - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_SX_SLIPPY; - actor->obj.pos.x = x; - actor->obj.pos.y = y; - actor->obj.pos.z = z; - Object_SetInfo(&actor->info, actor->obj.id); - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(aSxBaseWallTile1Hitbox); + slippy = &gActors[i]; + if (slippy->obj.status == OBJ_FREE) { + Actor_Initialize(slippy); + slippy->obj.status = OBJ_INIT; + slippy->obj.id = OBJ_ACTOR_SX_SLIPPY; + slippy->obj.pos.x = x; + slippy->obj.pos.y = y; + slippy->obj.pos.z = z; + Object_SetInfo(&slippy->info, slippy->obj.id); + slippy->info.hitbox = SEGMENTED_TO_VIRTUAL(aSxBaseWallTile1Hitbox); xRot = Math_Atan2F(gPlayer[0].pos.x - x, gPlayer[0].trueZpos - z); pad = sqrtf(SQ(gPlayer[0].pos.x - x) + SQ(gPlayer[0].trueZpos - z)); yRot = -Math_Atan2F(gPlayer[0].pos.y - y, pad); @@ -220,9 +220,9 @@ void SectorX_8018FA04(f32 x, f32 y, f32 z) { src.y = 0.0f; src.z = 60.0f; Matrix_MultVec3f(gCalcMatrix, &src, &dest); - actor->vel.x = dest.x; - actor->vel.y = dest.y; - actor->vel.z = dest.z - gPathVelZ; + slippy->vel.x = dest.x; + slippy->vel.y = dest.y; + slippy->vel.z = dest.z - gPathVelZ; break; } } @@ -230,36 +230,36 @@ void SectorX_8018FA04(f32 x, f32 y, f32 z) { void SectorX_8018FBBC(Vec3f* pos) { s32 i; - Actor* actor; + Actor* slippy; f32 xRot; f32 yRot; Vec3f src; Vec3f dest; for (i = 0; i < ARRAY_COUNT(gActors); i++) { - actor = &gActors[i]; - if ((actor->obj.status >= OBJ_ACTIVE) && (fabsf(pos->x - actor->obj.pos.x) < 2500.0f) && - (fabsf(pos->z - actor->obj.pos.z) < 2500.0f) && (actor->state != 1000) && (actor->timer_0C2 == 0) && - (actor->scale < 0.0f) && - Object_CheckHitboxCollision(pos, actor->info.hitbox, &actor->obj, actor->vwork[29].x, actor->vwork[29].y, - actor->vwork[29].z + actor->rot_0F4.z)) { - Play_PlaySfxFirstPlayer(actor->sfxSource, NA_SE_SLIPPY_HIT); - actor->state = 1000; - xRot = Math_Atan2F(actor->obj.pos.x - pos->x, actor->obj.pos.z - pos->z); - yRot = -Math_Atan2F(actor->obj.pos.y - pos->y, - sqrtf(SQ(actor->obj.pos.x - pos->x) + SQ(actor->obj.pos.z - pos->z))); + slippy = &gActors[i]; + if ((slippy->obj.status >= OBJ_ACTIVE) && (fabsf(pos->x - slippy->obj.pos.x) < 2500.0f) && + (fabsf(pos->z - slippy->obj.pos.z) < 2500.0f) && (slippy->state != 1000) && (slippy->timer_0C2 == 0) && + (slippy->scale < 0.0f) && + Object_CheckHitboxCollision(pos, slippy->info.hitbox, &slippy->obj, slippy->vwork[29].x, + slippy->vwork[29].y, slippy->vwork[29].z + slippy->rot_0F4.z)) { + Play_PlaySfxFirstPlayer(slippy->sfxSource, NA_SE_SLIPPY_HIT); + slippy->state = 1000; + xRot = Math_Atan2F(slippy->obj.pos.x - pos->x, slippy->obj.pos.z - pos->z); + yRot = -Math_Atan2F(slippy->obj.pos.y - pos->y, + sqrtf(SQ(slippy->obj.pos.x - pos->x) + SQ(slippy->obj.pos.z - pos->z))); Matrix_RotateY(gCalcMatrix, xRot, MTXF_NEW); Matrix_RotateX(gCalcMatrix, yRot, MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; src.z = 20.0f; Matrix_MultVec3f(gCalcMatrix, &src, &dest); - actor->vel.x = dest.x; - actor->vel.z = 10.0f; - actor->vel.y = dest.y; - actor->fwork[15] = actor->vel.x * 0.2f; - actor->fwork[16] = actor->vel.y * -0.2f; - actor->timer_0C6 = 10; + slippy->vel.x = dest.x; + slippy->vel.z = 10.0f; + slippy->vel.y = dest.y; + slippy->fwork[15] = slippy->vel.x * 0.2f; + slippy->fwork[16] = slippy->vel.y * -0.2f; + slippy->timer_0C6 = 10; } } } @@ -1162,10 +1162,10 @@ void SectorX_SxSpyborg_Update(SxSpyborg* this) { } } -bool SectorX_SxSpyborg_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { +bool SectorX_SxSpyborg_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { Vec3f src = { 0.0f, 0.0f, 0.0f }; Vec3f dest; - SxSpyborg* boss = (SxSpyborg*) data; + SxSpyborg* boss = (SxSpyborg*) thisx; if (D_i2_80195640 != 0) { *dList = NULL; @@ -1284,14 +1284,14 @@ bool SectorX_SxSpyborg_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, return false; } -void SectorX_SxSpyborg_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* data) { +void SectorX_SxSpyborg_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp64 = { 87.0f, -323.0f, 200.0f }; Vec3f sp58 = { 87.0f, -323.0f, -200.0f }; Vec3f sp4C = { 87.0f, -323.0f, 200.0f }; Vec3f sp40 = { 87.0f, -323.0f, -200.0f }; Vec3f src; Vec3f dest; - Boss* boss = (Boss*) data; + SxSpyborg* boss = (SxSpyborg*) thisx; src.x = 0.0f; src.y = 0.0f; @@ -1386,7 +1386,7 @@ void SectorX_SxSpyborg_Draw(SxSpyborg* this) { Matrix_Translate(gGfxMatrix, this->fwork[35], this->fwork[36], this->fwork[37], MTXF_APPLY); Matrix_Scale(gGfxMatrix, fwork, fwork, fwork, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_102ED50); + gSPDisplayList(gMasterDisp++, aBlueSphereDL); Matrix_Pop(&gGfxMatrix); } @@ -1402,7 +1402,7 @@ void SectorX_SxSpyborg_Draw(SxSpyborg* this) { Matrix_Translate(gGfxMatrix, this->fwork[38], this->fwork[39], this->fwork[40], MTXF_APPLY); Matrix_Scale(gGfxMatrix, fwork, fwork, fwork, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_102ED50); + gSPDisplayList(gMasterDisp++, aBlueSphereDL); Matrix_Pop(&gGfxMatrix); } @@ -1699,7 +1699,7 @@ void SectorX_801944D4(ActorCutscene* this, s32 index) { Object_SetInfo(&this->info, this->obj.id); if (index == 3) { - this->animFrame = 1; + this->animFrame = ACTOR_CS_GREAT_FOX; this->state = 20; this->obj.rot.x = -player->rot.x - 10.0f; this->obj.rot.y = (player->rot.y + 180.0f) - 10.0f; diff --git a/src/overlays/ovl_i3/fox_a6.c b/src/overlays/ovl_i3/fox_a6.c index 5e3c9cb2..8b1230f9 100644 --- a/src/overlays/ovl_i3/fox_a6.c +++ b/src/overlays/ovl_i3/fox_a6.c @@ -2137,7 +2137,7 @@ void Area6_8018D4E0(Actor* this) { } void Area6_8018D5C8(void) { - s32 i = 0; + s32 i = 0; // Fake ? Actor_Initialize(&gActors[i]); gActors[i].obj.status = OBJ_INIT; @@ -2146,16 +2146,17 @@ void Area6_8018D5C8(void) { gActors[i].obj.pos.y = 3750.0f; gActors[i].obj.pos.z = 13000.0f; - gActors[i].animFrame = 1; + gActors[i].animFrame = ACTOR_CS_GREAT_FOX; gActors[i].state = 90; gActors[i].fwork[0] = 0.0f; gActors[i].obj.id = OBJ_ACTOR_CUTSCENE; + Object_SetInfo(&gActors[i].info, gActors[i].obj.id); AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, gActors[i].sfxSource, 0); } void Area6_8018D694(ActorCutscene* this, s32 index) { - Vec3f sp2C[5] = { + Vec3f commanderSetupPos[5] = { { -150.0f, 0.0f, 200.0f }, { 0.0f, 50.0f, 0.0f }, { 150.0f, -50.0f, 100.0f }, { -350.0f, 100.0f, 300.0f }, { 100.0f, -300.0f, 100.0f }, }; @@ -2164,18 +2165,19 @@ void Area6_8018D694(ActorCutscene* this, s32 index) { this->obj.status = OBJ_ACTIVE; this->obj.id = OBJ_ACTOR_CUTSCENE; - this->obj.pos.x = sp2C[index].x + 100.0f; - this->obj.pos.y = sp2C[index].y + 350.0f; - this->obj.pos.z = sp2C[index].z + 1000.0f; + this->obj.pos.x = commanderSetupPos[index].x + 100.0f; + this->obj.pos.y = commanderSetupPos[index].y + 350.0f; + this->obj.pos.z = commanderSetupPos[index].z + 1000.0f; this->state = 1; - this->animFrame = 28; + this->animFrame = ACTOR_CS_COMMANDER_GLOW; this->iwork[11] = 1; this->rot_0F4.y = 90.0f; this->fwork[0] = 1.5f; this->fwork[7] = RAND_FLOAT_SEEDED(360.0f); this->fwork[8] = RAND_FLOAT_SEEDED(360.0f); this->fwork[9] = RAND_FLOAT_SEEDED(360.0f); + Object_SetInfo(&this->info, this->obj.id); AUDIO_PLAY_SFX(NA_SE_EN_ENGINE_01, this->sfxSource, 4); } @@ -2575,7 +2577,7 @@ void Area6_8018EA88(ActorCutscene* this) { this->obj.pos.x = 0.0f; this->obj.pos.y = 0.0f; this->obj.pos.z = gBosses[0].obj.pos.z + 500.0f; - this->animFrame = 37; + this->animFrame = ACTOR_CS_37; this->state = 100; this->iwork[0] = 255; this->iwork[1] = 255; @@ -2599,9 +2601,10 @@ void Area6_8018EB3C(ActorCutscene* this) { this->obj.pos.x = player->pos.x; this->obj.pos.y = player->pos.y + 600.0f; this->obj.pos.z = player->pos.z + 2800.0f; - this->animFrame = 1; + this->animFrame = ACTOR_CS_GREAT_FOX; this->state = 100; this->fwork[0] = 0.0f; + Object_SetInfo(&this->info, this->obj.id); AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, this->sfxSource, 0); AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, this->sfxSource, 0); diff --git a/src/overlays/ovl_i3/fox_aq.c b/src/overlays/ovl_i3/fox_aq.c index 21e3cb9c..39455786 100644 --- a/src/overlays/ovl_i3/fox_aq.c +++ b/src/overlays/ovl_i3/fox_aq.c @@ -801,20 +801,20 @@ void Aquas_801AA4BC(Player* player) { } void Aquas_UpdateCamera(Player* player) { - f32 var_fv0 = gInputPress->stick_x; - f32 var_fv1 = -gInputPress->stick_y; - f32 temp; + f32 stickX = +gInputPress->stick_x; + f32 stickY = -gInputPress->stick_y; + f32 zRot; if (player->state_1C8 != PLAYERSTATE_1C8_ACTIVE) { - var_fv0 = var_fv1 = 0.0f; + stickX = stickY = 0.0f; } - Math_SmoothStepToF(&player->unk_030, var_fv0, 0.05f, 1.0f, 0.05f); + Math_SmoothStepToF(&player->unk_030, stickX, 0.05f, 1.0f, 0.05f); if (player->pos.y < (gGroundHeight + 50.0f)) { - Math_SmoothStepToF(&player->unk_02C, var_fv1 * 0.3f, 0.05f, 1.0f, 0.05f); + Math_SmoothStepToF(&player->unk_02C, stickY * 0.3f, 0.05f, 1.0f, 0.05f); } else { - Math_SmoothStepToF(&player->unk_02C, var_fv1, 0.05f, 2.0f, 0.05f); + Math_SmoothStepToF(&player->unk_02C, stickY, 0.05f, 2.0f, 0.05f); } gCsCamEyeX = (player->pos.x - player->xPath) * (600.0f / player->pathWidth); @@ -852,9 +852,9 @@ void Aquas_UpdateCamera(Player* player) { Math_SmoothStepToF(&player->unk_014, 1.0f, 1.0f, 0.05f, 0.0f); - temp = -player->rot.z; + zRot = -player->rot.z; - Math_SmoothStepToF(&player->camRoll, temp * 0.3f, 0.1f, 1.5f, 0.0f); + Math_SmoothStepToF(&player->camRoll, zRot * 0.3f, 0.1f, 1.5f, 0.0f); } void Aquas_BlueMarineMove(Player* player) { @@ -862,9 +862,9 @@ void Aquas_BlueMarineMove(Player* player) { Vec3f sp80; Vec3f sp74; Vec3f sp68; - f32 sp64; + f32 stickX; f32 sp60; - f32 sp5C; + f32 stickY; f32 sp58; f32 var_fa0; f32 var_fa1; @@ -875,12 +875,12 @@ void Aquas_BlueMarineMove(Player* player) { Aquas_801A99D4(player); Aquas_801A8E30(); - sp64 = -gInputPress->stick_x; - sp5C = gInputPress->stick_y; + stickX = -gInputPress->stick_x; + stickY = +gInputPress->stick_y; gPlayerTurnStickMod = 0.68f; - Math_SmoothStepToF(&player->unk_180, sp64 * gPlayerTurnStickMod, 1.0f, 10.0f, 0.0001f); + Math_SmoothStepToF(&player->unk_180, stickX * gPlayerTurnStickMod, 1.0f, 10.0f, 0.0001f); var_fa0 = fabsf(player->unk_180 * 0.5f); if (var_fa0 > 2.0f) { @@ -917,7 +917,7 @@ void Aquas_BlueMarineMove(Player* player) { Math_SmoothStepToF(&D_i3_801C41B8[9], 0.0f, 0.1f, 20.0f, 0.0001f); } - Math_SmoothStepToF(&player->unk_17C, sp5C * gPlayerTurnStickMod, 1.0f, 7.0f, 0.0001f); + Math_SmoothStepToF(&player->unk_17C, stickY * gPlayerTurnStickMod, 1.0f, 7.0f, 0.0001f); var_fa1 = fabsf(player->unk_17C * 0.05f); if (var_fa1 > 2.0f) { @@ -963,7 +963,7 @@ void Aquas_BlueMarineMove(Player* player) { Math_SmoothStepToF(&player->rot.x, sp58, 1.0f, gPlayerTurnRate, 0.00001f); var_fv1_2 = 2.0f; - if (sp64 == 0.0f) { + if (stickX == 0.0f) { var_fv1_2 = 1.0f; } @@ -3677,7 +3677,7 @@ f32 D_i3_801C0224[11] = { Vec3f D_i3_801C0250 = { 0.0f, 0.0f, 0.0f }; bool Aquas_AqSculpin_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { - Actor* this = (Actor*) thisx; + AqSculpin* this = (AqSculpin*) thisx; if ((this->timer_0C6 % 2) == 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_57); @@ -3693,7 +3693,7 @@ bool Aquas_AqSculpin_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Ve void Aquas_AqSculpin_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp24 = D_i3_801C0250; - Actor* this = (Actor*) thisx; + AqSculpin* this = (AqSculpin*) thisx; if (this->health == 0) { switch (limbIndex) { @@ -4411,7 +4411,7 @@ bool Aquas_AqSpindlyFish_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos void Aquas_AqSpindlyFish_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp24 = { 0.0f, 0.0f, 0.0f }; - Actor* this = (Actor*) thisx; + AqSpindlyFish* this = (AqSpindlyFish*) thisx; if (this->health == -100) { switch (limbIndex) { @@ -4493,7 +4493,7 @@ void Aquas_AqSpindlyFish_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { } } -void Aquas_AqSpindlyFish_Draw(Actor* this) { +void Aquas_AqSpindlyFish_Draw(AqSpindlyFish* this) { Vec3f frameTable[30]; RCP_SetupDL(&gMasterDisp, SETUPDL_57); @@ -4832,7 +4832,7 @@ void Aquas_AqGaroa_Update(AqGaroa* this) { } bool Aquas_AqGaroa_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { - Actor* this = thisx; + AqGaroa* this = (AqGaroa*) thisx; RCP_SetupDL(&gMasterDisp, SETUPDL_58); if ((this->timer_0C6 % 2) != 0) { @@ -4853,7 +4853,7 @@ void Aquas_AqGaroa_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp40 = { 108.0f, 0.0f, 24.0f }; Vec3f sp34 = { 102.0f, 14.0f, -21.0f }; Vec3f sp28 = { 0.0f, 0.0f, 0.0f }; - Actor* this = (Actor*) thisx; + AqGaroa* this = (AqGaroa*) thisx; switch (limbIndex) { case 1: @@ -5099,7 +5099,7 @@ void Aquas_AqSquid_Update(AqSquid* this) { if (this->animFrame >= 37) { this->obj.rot.y += 20.0f; this->fwork[2] += 20.0f; - if (((gGameFrameCount % 4) == 0)) { + if ((gGameFrameCount % 4) == 0) { Matrix_RotateY(gCalcMatrix, this->fwork[2] * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, this->vwork[27].x * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, this->vwork[27].z * M_DTOR, MTXF_APPLY); @@ -5137,7 +5137,7 @@ void Aquas_AqSquid_Update(AqSquid* this) { void Aquas_AqSquid_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp34 = { 0.0f, 0.0f, 0.0f }; Vec3f sp28 = { -27.0f, 7.0f, 5.0f }; - Actor* this = (Actor*) thisx; + AqSquid* this = (AqSquid*) thisx; if ((this->health == 0) || (limbIndex == 12)) { switch (limbIndex) { @@ -5250,11 +5250,11 @@ void Aquas_AqSeaweed_Update(AqSeaweed* this) { /* fallthrough */ case 1: this->animFrame += 2; - if (this->animFrame >= Animation_GetFrameCount(&D_AQ_6020A40)) { + if (this->animFrame >= Animation_GetFrameCount(&aAqSeaweedAnim)) { this->animFrame = 0; } - sp3E = Animation_GetFrameData(&D_AQ_6020A40, this->animFrame, frameTable); + sp3E = Animation_GetFrameData(&aAqSeaweedAnim, this->animFrame, frameTable); if ((fabsf(this->obj.pos.x - gPlayer[0].pos.x) < 150.0f) && (fabsf(this->obj.pos.y - gPlayer[0].pos.y) < 500.0f) && @@ -5288,7 +5288,7 @@ void Aquas_AqSeaweed_Draw(AqSeaweed* this) { gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); } -void Venom1_AqBoulder_Init(AqBoulder* this) { +void Aquas_AqBoulder_Init(AqBoulder* this) { if (this->state == 0) { this->scale = 1.0f; this->gravity = 0.3f; @@ -5507,7 +5507,7 @@ s32 D_i3_801C04A0[6] = { 15, -15, 10, -10, 7, -7, }; -void Venom1_AqJellyfish_Init(AqJellyfish* this) { +void Aquas_AqJellyfish_Init(AqJellyfish* this) { s32 sp64; s32 sp60; Vec3f sp54; diff --git a/src/overlays/ovl_i3/fox_zo.c b/src/overlays/ovl_i3/fox_zo.c index 23705049..e0fd89b4 100644 --- a/src/overlays/ovl_i3/fox_zo.c +++ b/src/overlays/ovl_i3/fox_zo.c @@ -3286,7 +3286,7 @@ void Zoness_801989FC(ZoSarumarine* this) { for (i = 0; i < 2; i++) { if (sZoSwork[ZO_BSS_11 + i] != 0) { - for (j = 0, actor246 = gActors; j < ARRAY_COUNT(gActors); j++, actor246++) { + for (j = 0, actor246 = &gActors[0]; j < ARRAY_COUNT(gActors); j++, actor246++) { if (actor246->obj.status == OBJ_FREE) { Actor_Initialize(actor246); actor246->obj.status = OBJ_INIT; @@ -4010,7 +4010,7 @@ s32 D_i3_801BF78C[30] = { }; f32 D_i3_801BF804[8] = { 0.0f, 0.0f, 270.0f, 90.0f, 0.0f, 180.0f, 400.0f, 400.0f }; -void Zoness_ZoCargoShip_Init(Actor* actor) { +void Zoness_ZoTanker_Init(ZoTanker* actor) { s32 temp_v1; s32 var_s3; s32 i; @@ -4080,38 +4080,38 @@ void Zoness_ZoCargoShip_Init(Actor* actor) { AUDIO_PLAY_SFX(NA_SE_EN_SHIP_ENGINE_L, actor->sfxSource, 4); } -void Zoness_ZoCargoShip_Update(Actor* this) { +void Zoness_ZoTanker_Update(ZoTanker* this) { f32 sp6C; s32 sp68; s32 i; Vec3f sp58; - Actor* otherActor; + Actor* actor; Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); switch (this->state) { case 0: for (i = 1; i < 3; i++) { - otherActor = &gActors[this->iwork[i]]; - if ((otherActor->obj.status != OBJ_FREE) && (otherActor->iwork[1] == this->index) && - (otherActor->obj.id == OBJ_ACTOR_ZO_CONTAINER)) { + actor = &gActors[this->iwork[i]]; + if ((actor->obj.status != OBJ_FREE) && (actor->iwork[1] == this->index) && + (actor->obj.id == OBJ_ACTOR_ZO_CONTAINER)) { Matrix_MultVec3f(gCalcMatrix, &D_i3_801BF744[i], &sp58); - otherActor->obj.pos.x = this->obj.pos.x + sp58.x; - otherActor->obj.pos.y = this->obj.pos.y + sp58.y; - otherActor->obj.pos.z = this->obj.pos.z + sp58.z; + actor->obj.pos.x = this->obj.pos.x + sp58.x; + actor->obj.pos.y = this->obj.pos.y + sp58.y; + actor->obj.pos.z = this->obj.pos.z + sp58.z; } } break; case 1: for (i = 1; i < 3; i++) { - otherActor = &gActors[this->iwork[i]]; - if ((otherActor->obj.status != OBJ_FREE) && (otherActor->obj.id == OBJ_ACTOR_ZO_SUPPLYCRANE) && - (otherActor->iwork[1] == this->index)) { + actor = &gActors[this->iwork[i]]; + if ((actor->obj.status != OBJ_FREE) && (actor->obj.id == OBJ_ACTOR_ZO_SUPPLYCRANE) && + (actor->iwork[1] == this->index)) { Matrix_MultVec3f(gCalcMatrix, &D_i3_801BF768[i], &sp58); - otherActor->obj.pos.x = this->obj.pos.x + sp58.x; - otherActor->obj.pos.y = this->obj.pos.y + sp58.y; - otherActor->obj.pos.z = this->obj.pos.z + sp58.z; + actor->obj.pos.x = this->obj.pos.x + sp58.x; + actor->obj.pos.y = this->obj.pos.y + sp58.y; + actor->obj.pos.z = this->obj.pos.z + sp58.z; } } break; @@ -4123,11 +4123,11 @@ void Zoness_ZoCargoShip_Update(Actor* this) { } } -void Zoness_ZoCargoShip_Draw(Actor* this) { +void Zoness_ZoTanker_Draw(ZoTanker* this) { gSPDisplayList(gMasterDisp++, D_ZO_6006360); } -void Zoness_ZoContainer_Init(Actor* this) { +void Zoness_ZoContainer_Init(ZoContainer* this) { if (this->iwork[3] == 0) { this->iwork[0] = this->obj.rot.z / 10.0f; this->obj.rot.z = 0.0f; @@ -4260,7 +4260,7 @@ void Zoness_ZoRadarBuoy_Update(ZoRadarBuoy* this) { switch (this->state) { case 0: - for (i = 0, searchLight = gActors; i < ARRAY_COUNT(gActors); i++, searchLight++) { + for (i = 0, searchLight = &gActors[0]; i < ARRAY_COUNT(gActors); i++, searchLight++) { if (searchLight->obj.status == OBJ_FREE) { Actor_Initialize(searchLight); searchLight->obj.status = OBJ_INIT; @@ -4329,18 +4329,18 @@ void Zoness_ZoRadarBuoy_Update(ZoRadarBuoy* this) { } } -void Zoness_ZoRadarBuoy_Draw(Actor* this) { - gSPDisplayList(gMasterDisp++, D_ZO_6002E10); +void Zoness_ZoRadarBuoy_Draw(ZoRadarBuoy* this) { + gSPDisplayList(gMasterDisp++, aZoRadarBuoyDL); } Vec3f D_i3_801BF8AC = { 230.0f, -50.0f, 0.0f }; Vec3f D_i3_801BF8B8 = { 230.0f, -250.0f, 0.0f }; -void Zoness_ZoSupplyCrane_Init(Actor* this) { +void Zoness_ZoSupplyCrane_Init(ZoSupplyCrane* this) { s32 i; s32 sp38; Vec3f dest; - ZoContainer* actor251; + ZoContainer* container; this->scale = -1.0f; @@ -4372,24 +4372,24 @@ void Zoness_ZoSupplyCrane_Init(Actor* this) { Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, &D_i3_801BF8B8, &dest); - for (i = 0, actor251 = &gActors[0]; i < ARRAY_COUNT(gActors); i++, actor251++) { - if (actor251->obj.status == OBJ_FREE) { - Actor_Initialize(actor251); - actor251->obj.status = OBJ_INIT; - actor251->obj.id = OBJ_ACTOR_ZO_CONTAINER; - actor251->obj.pos.x = this->obj.pos.x + dest.x; - actor251->obj.pos.y = this->obj.pos.y + dest.y + this->fwork[2]; - actor251->obj.pos.z = this->obj.pos.z + dest.z + this->fwork[0]; - actor251->obj.rot.y = this->obj.rot.y; - actor251->iwork[0] = sp38; - actor251->iwork[3] = 777; - Object_SetInfo(&actor251->info, actor251->obj.id); + for (i = 0, container = &gActors[0]; i < ARRAY_COUNT(gActors); i++, container++) { + if (container->obj.status == OBJ_FREE) { + Actor_Initialize(container); + container->obj.status = OBJ_INIT; + container->obj.id = OBJ_ACTOR_ZO_CONTAINER; + container->obj.pos.x = this->obj.pos.x + dest.x; + container->obj.pos.y = this->obj.pos.y + dest.y + this->fwork[2]; + container->obj.pos.z = this->obj.pos.z + dest.z + this->fwork[0]; + container->obj.rot.y = this->obj.rot.y; + container->iwork[0] = sp38; + container->iwork[3] = 777; + Object_SetInfo(&container->info, container->obj.id); this->iwork[3] = i; break; } } if (i >= ARRAY_COUNT(gActors)) { - actor251->obj.status = OBJ_FREE; + container->obj.status = OBJ_FREE; } } @@ -4622,7 +4622,7 @@ void Zoness_ZoBarrier_Init(ZoBarrier* this) { this->work_046 = i + 1; Object_SetInfo(&gActors[i].info, gActors[i].obj.id); - gActors[i].info.hitbox = SEGMENTED_TO_VIRTUAL(D_ZO_602C028); + gActors[i].info.hitbox = SEGMENTED_TO_VIRTUAL(aZoBarrierHitbox2); break; } } @@ -4687,11 +4687,11 @@ bool Zoness_ZoBarrier_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, V return false; } -void Zoness_ZoBarrier_Draw(Actor* this) { +void Zoness_ZoBarrier_Draw(ZoBarrier* this) { Vec3f frameTable[10]; Animation_GetFrameData(&D_ZO_601FBC4, 0, frameTable); - Animation_DrawSkeleton(1, D_ZO_601FC90, frameTable, Zoness_ZoBarrier_OverrideLimbDraw, NULL, this, + Animation_DrawSkeleton(1, aZoBarrierSkel, frameTable, Zoness_ZoBarrier_OverrideLimbDraw, NULL, this, &gIdentityMatrix); } diff --git a/src/overlays/ovl_i4/fox_bo.c b/src/overlays/ovl_i4/fox_bo.c index 7d11e33c..69051b10 100644 --- a/src/overlays/ovl_i4/fox_bo.c +++ b/src/overlays/ovl_i4/fox_bo.c @@ -1030,7 +1030,7 @@ void Bolse_BoBase_Draw(BoBase* this) { f32 D_i4_8019EFDC[] = { 180.0f, -180.0f, 0.0f }; f32 D_i4_8019EFE8[] = { 100.0f, 200.0f, -80.0f }; f32 D_i4_8019EFF4[] = { 400.0f, 800.0f, 1200.0f }; -s32 D_i4_8019F000[] = { 0, 0, 0 }; +s32 D_i4_8019F000[] = { ACTOR_CS_TEAM_ARWING, ACTOR_CS_TEAM_ARWING, ACTOR_CS_TEAM_ARWING }; f32 D_i4_8019F00C[] = { 0.0f, 80.0f, 150.0f }; f32 D_i4_8019F018[] = { 3.0f, -4.0f, 5.0f, 700.0f, 300.0f, 1000.0f }; @@ -1059,7 +1059,7 @@ void Bolse_8018EC1C(void) { actor->obj.pos.x = 0; actor->obj.pos.y = 0.0f; actor->obj.pos.z = -9000.0f; - actor->animFrame = 30; + actor->animFrame = ACTOR_CS_30; actor->fwork[20] = 1.0f; actor->obj.id = OBJ_ACTOR_CUTSCENE; Object_SetInfo(&actor->info, actor->obj.id); @@ -1093,7 +1093,7 @@ void Bolse_8018ED44(void) { actor->obj.pos.y = gActors[50].obj.pos.y + RAND_FLOAT(100.0f); actor->obj.pos.z = -9000.0f; actor->timer_0BC = 50; - actor->animFrame = 31; + actor->animFrame = ACTOR_CS_31; actor->vel.z = 200.0f; Object_SetInfo(&actor->info, actor->obj.id); AUDIO_PLAY_SFX(NA_SE_EN_SHOT_0, actor->sfxSource, 4); @@ -1115,7 +1115,7 @@ void Bolse_8018EE4C(f32 x, f32 y) { actor->obj.pos.y = gActors[50].obj.pos.y + y; actor->obj.pos.z = -9000.0f; actor->timer_0BC = 200; - actor->animFrame = 32; + actor->animFrame = ACTOR_CS_32; actor->vel.z = 80.0f; actor->obj.rot.z = RAND_FLOAT_CENTERED(120.0f); actor->rot_0F4.z = RAND_FLOAT_CENTERED(1.0f); diff --git a/src/overlays/ovl_i4/fox_fo.c b/src/overlays/ovl_i4/fox_fo.c index 81799cb2..c548facc 100644 --- a/src/overlays/ovl_i4/fox_fo.c +++ b/src/overlays/ovl_i4/fox_fo.c @@ -609,7 +609,7 @@ void Fortuna_CsExplosion(void) { actor->obj.pos.x = 0.0f; actor->obj.pos.y = 0.0f; actor->obj.pos.z = -9000.0f; - actor->animFrame = 11; + actor->animFrame = ACTOR_CS_FO_EXPLOSION; actor->scale = 0.0f; Object_SetInfo(&actor->info, actor->obj.id); } @@ -636,7 +636,7 @@ void Fortuna_LevelComplete_CsSpawnTeam(ActorCutscene* this, s32 actorIdx) { AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); } else { this->obj.pos.z = -9500.0f; - this->animFrame = 1; + this->animFrame = ACTOR_CS_GREAT_FOX; this->vel.z = 22.0f; AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, this->sfxSource, 0); AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, this->sfxSource, 0); diff --git a/src/overlays/ovl_i4/fox_ka.c b/src/overlays/ovl_i4/fox_ka.c index 87fad000..a231b690 100644 --- a/src/overlays/ovl_i4/fox_ka.c +++ b/src/overlays/ovl_i4/fox_ka.c @@ -11,7 +11,7 @@ Vec3f D_i4_8019F0F0[] = { { 7000.0f, 500.0f, -50 }, { 7700.0f, 550.0f, -50.0f }, { 6000.0f, 300.0f, 1950.0f } }; Vec3f D_i4_8019F114[] = { { -30.0f, 0.0f, 0.0f }, { -30.0f, 0.0f, 0.0f }, { 0.0f, 5.0f, -40.0f } }; Vec3f D_i4_8019F138[] = { { 0.0f, -135.0f, -5.0f }, { 0.0f, -135.0f, 15.0f }, { -10.0f, 135.0f, 0.0f } }; -s32 D_i4_8019F15C[] = { 33, 34, 33 }; +s32 sKaStartCsModels[] = { ACTOR_CS_CORNERIAN_FIGHTER, ACTOR_CS_KA_ENEMY, ACTOR_CS_CORNERIAN_FIGHTER }; Vec3f D_i4_8019F168[] = { { 700.0f, 50.0f, -700.0f }, { -500.0f, 150.0f, -500 }, { 100.0f, 100.0f, -1200.0f } }; f32 D_i4_8019F18C[] = { 200.0f, 160.0f, 185.0f }; u8 D_i4_8019F198[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -338,7 +338,7 @@ void Katina_StartCutsceneUpdate(void) { actor->vel.x = dest.x; actor->vel.y = dest.y; actor->vel.z = dest.z; - actor->animFrame = D_i4_8019F15C[i]; + actor->animFrame = sKaStartCsModels[i]; actor->drawShadow = true; actor->iwork[KA_ACTOR_IWORK_11] = 1; Object_SetInfo(&actor->info, actor->obj.id); @@ -1781,7 +1781,7 @@ void Katina_SFTeam_LevelComplete_Update(void) { actor->state = 1; if (i >= 3) { - actor->animFrame = 33; + actor->animFrame = ACTOR_CS_CORNERIAN_FIGHTER; } Object_SetInfo(&actor->info, actor->obj.id); @@ -2643,9 +2643,9 @@ void Katina_EnemyDraw(ActorAllRange* this) { switch (this->animFrame) { case 0: if (this->iwork[KA_ACTOR_LOW_POLY]) { - gSPDisplayList(gMasterDisp++, aKaEnemy1LowPolyDL); + gSPDisplayList(gMasterDisp++, aKaEnemyLowPolyDL); } else { - gSPDisplayList(gMasterDisp++, aKaEnemy1DL); + gSPDisplayList(gMasterDisp++, aKaEnemyDL); } break; diff --git a/src/overlays/ovl_i4/fox_sz.c b/src/overlays/ovl_i4/fox_sz.c index 2bcbf72a..dbadf9d5 100644 --- a/src/overlays/ovl_i4/fox_sz.c +++ b/src/overlays/ovl_i4/fox_sz.c @@ -698,7 +698,7 @@ void SectorZ_CsObjectInit(void) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; actor->obj.id = OBJ_ACTOR_CUTSCENE; - actor->animFrame = 25; + actor->animFrame = ACTOR_CS_SZ_SPACE_JUNK; actor->obj.pos.x = sInitialCsObjectPos[i].x; actor->obj.pos.y = sInitialCsObjectPos[i].y; actor->obj.pos.z = sInitialCsObjectPos[i].z; @@ -718,7 +718,7 @@ void SectorZ_CsGreatFoxInit(void) { greatFox->obj.pos.y = 0.0f; greatFox->obj.pos.z = 0.0f; greatFox->obj.rot.y = 270.0f; - greatFox->animFrame = 1; + greatFox->animFrame = ACTOR_CS_GREAT_FOX; greatFox->vel.x = -20.0f; Object_SetInfo(&greatFox->info, greatFox->obj.id); AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, greatFox->sfxSource, 0); @@ -747,7 +747,7 @@ void SectorZ_CsEnemies(ActorCutscene* this, s32 index) { this->obj.rot.x = 10.0f; this->obj.rot.z = sInitialCsEnemyZrot[index]; - this->animFrame = 26; + this->animFrame = ACTOR_CS_SZ_INVADER; this->iwork[11] = 1; Object_SetInfo(&this->info, this->obj.id); AUDIO_PLAY_SFX(NA_SE_EN_ENGINE_01, this->sfxSource, 4); @@ -1097,7 +1097,7 @@ void SectorZ_CsLevelCompleteTeamInit(ActorCutscene* this, s32 index) { this->iwork[11] = 1; AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); } else { - this->animFrame = 1; + this->animFrame = ACTOR_CS_GREAT_FOX; this->fwork[0] = 20.0f; AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, this->sfxSource, 0); AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, this->sfxSource, 0); @@ -1124,7 +1124,7 @@ void SectorZ_CsLevelCompleteKattInit(void) { katt->obj.rot.z = -katt->rot_0F4.z; katt->fwork[0] = 30.0f; - katt->animFrame = 24; + katt->animFrame = ACTOR_CS_KATT; katt->iwork[11] = 1; katt->state = 10; katt->timer_0BC = 130; @@ -1656,7 +1656,7 @@ void SectorZ_LevelCompleteCsUpdate(ActorCutscene* this) { break; } - if (this->animFrame == 24) { + if (this->animFrame == ACTOR_CS_KATT) { switch (gCsFrameCount) { case 290: if (gTeamShields[TEAM_ID_FALCO] > 0) { diff --git a/src/overlays/ovl_i5/fox_ma.c b/src/overlays/ovl_i5/fox_ma.c index 063862c2..d519b371 100644 --- a/src/overlays/ovl_i5/fox_ma.c +++ b/src/overlays/ovl_i5/fox_ma.c @@ -5509,7 +5509,7 @@ void Macbeth_801AC6B4(ActorCutscene* this) { this->obj.rot.y = 180.0f; Object_SetInfo(&this->info, this->obj.id); AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, this->sfxSource, 0); - this->animFrame = 1; + this->animFrame = ACTOR_CS_GREAT_FOX; } f32 D_i5_801BA768 = 0.0f; @@ -6355,7 +6355,7 @@ void Macbeth_801AF27C(ActorCutscene* this, s32 arg1) { this->state = 30; AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); } else { - this->animFrame = 1; + this->animFrame = ACTOR_CS_GREAT_FOX; this->state = 21; this->obj.rot.z = 32.5f; AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, this->sfxSource, 0); @@ -6391,7 +6391,7 @@ void Macbeth_801AF44C(void) { actor->obj.rot.z = -330.0f; actor->fwork[0] = 0.0f; - actor->animFrame = 24; + actor->animFrame = ACTOR_CS_KATT; actor->iwork[11] = 1; actor->state = 15; actor->fwork[3] = D_i5_801BA820[4]; @@ -6415,7 +6415,7 @@ void Macbeth_801AF628(ActorCutscene* this, s32 index) { this->obj.pos.x = gPlayer[0].xPath + D_i5_801BA834[index].x; this->obj.pos.y = D_i5_801BA834[index].y; this->obj.pos.z = D_i5_801BA834[index].z - gPathProgress; - this->animFrame = 37; + this->animFrame = ACTOR_CS_37; this->obj.rot.y = D_i5_801BA84C[index]; this->iwork[4] = this->iwork[5] = 192; this->iwork[0] = this->iwork[1] = this->iwork[2] = this->iwork[7] = this->iwork[3] = 255; @@ -7466,7 +7466,7 @@ void Macbeth_LevelComplete1_TeamSetup(Actor* this, s32 teamIndex) { AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); return; } - this->animFrame = 1; + this->animFrame = ACTOR_CS_GREAT_FOX; this->state = 20; AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, this->sfxSource, 0); this->fwork[9] = 20.0f; @@ -7500,7 +7500,7 @@ void Macbeth_801B3718(void) { actor->obj.rot.z = -actor->rot_0F4.z; actor->fwork[0] = 30.0f; - actor->animFrame = 24; + actor->animFrame = ACTOR_CS_KATT; actor->iwork[11] = 1; actor->state = 10; actor->fwork[3] = D_i5_801BA900; diff --git a/src/overlays/ovl_i5/fox_ti.c b/src/overlays/ovl_i5/fox_ti.c index 19212502..3fc15072 100644 --- a/src/overlays/ovl_i5/fox_ti.c +++ b/src/overlays/ovl_i5/fox_ti.c @@ -770,7 +770,7 @@ void Titania_8018B1B4(s32 limbIndex, Vec3f* rot, void* thisx) { } } -void Titania_TiRasco_Update(Actor* this) { +void Titania_TiRasco_Update(TiRasco* this) { Vec3f src; Vec3f dest; Actor* sp3C = this->iwork[0]; @@ -1724,7 +1724,7 @@ void Titania_TiDelphor_Init(TiDelphor* this) { Ground_801B6E20(this->obj.pos.x, this->obj.pos.z + gPathProgress, &sp40, &this->obj.pos.y, &sp40); this->obj.pos.y -= 20.0f; - delphorHead = gActors; + delphorHead = &gActors[0]; for (i = 0; i < ARRAY_COUNT(gActors); i++, delphorHead++) { if (delphorHead->obj.status == OBJ_FREE) { diff --git a/src/overlays/ovl_i5/fox_ti_cs.c b/src/overlays/ovl_i5/fox_ti_cs.c index 90678564..871d6425 100644 --- a/src/overlays/ovl_i5/fox_ti_cs.c +++ b/src/overlays/ovl_i5/fox_ti_cs.c @@ -20,7 +20,7 @@ void Titania_80187530(ActorCutscene* this) { this->obj.rot.y = 180.0f; Object_SetInfo(&this->info, this->obj.id); AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, this->sfxSource, 0); - this->animFrame = 1; + this->animFrame = ACTOR_CS_GREAT_FOX; } void Titania_801875D0(ActorCutscene* this, s32 arg1) { @@ -276,7 +276,7 @@ void Titania_80188108(Actor* this, s32 index) { this->state = 30; AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); } else { - this->animFrame = 1; + this->animFrame = ACTOR_CS_GREAT_FOX; this->state = 20; AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, this->sfxSource, 0); this->fwork[9] = 20.0f; diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index 79e89930..5092f2d8 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -3582,7 +3582,7 @@ void Andross_AndLaserEmitter_Update(AndLaserEmitter* this) { break; case 1: - otherActor = gActors; + otherActor = &gActors[0]; for (i = 0; i < ARRAY_COUNT(gActors); i++, otherActor++) { if ((i != this->index) && (otherActor->obj.status == OBJ_ACTIVE) && (otherActor->obj.id == OBJ_ACTOR_AND_LASER_EMITTER) && @@ -3773,8 +3773,8 @@ void Andross_80193710(void) { Object_SetInfo(&boss->info, boss->obj.id); } -void Andross_801939A0(s32 actorIndex) { - Actor* actor = &gActors[actorIndex]; +void Andross_801939A0(s32 actorIdx) { + Actor* actor = &gActors[actorIdx]; Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; @@ -3787,13 +3787,13 @@ void Andross_801939A0(s32 actorIndex) { actor->fwork[0] = 50.0f; actor->fwork[1] = 6.5f; - if (actorIndex == 10) { + if (actorIdx == 10) { actor->iwork[14] = 1; } - if (actorIndex == 1) { + if (actorIdx == 1) { actor->state = 1; actor->work_046 = 255; - actor->animFrame = 1000; + actor->animFrame = ACTOR_CS_1000; } Object_SetInfo(&actor->info, actor->obj.id); @@ -3823,7 +3823,7 @@ void Andross_80193AE4(s32 actorIndex) { if (actorIndex == 0) { actor->state = 200; - actor->animFrame = 1; + actor->animFrame = ACTOR_CS_GREAT_FOX; AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); } else { actor->iwork[11] = 1; diff --git a/src/overlays/ovl_i6/fox_sy.c b/src/overlays/ovl_i6/fox_sy.c index 13946c8c..b5f3a9a0 100644 --- a/src/overlays/ovl_i6/fox_sy.c +++ b/src/overlays/ovl_i6/fox_sy.c @@ -7,6 +7,8 @@ #include "global.h" #include "assets/ast_sector_y.h" +#define SHOGUN_SHIP (0) + typedef void (*BossFuncs)(SyShogun*); void SectorY_80198244(SyShogun*); @@ -83,7 +85,7 @@ void SectorY_SyShogun_Init(SyShogun* this) { if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_START_360) { this->obj.pos.z = -28900.0f; - gScenery360[0].obj.pos.z = -30000.0f; + gScenery360[SHOGUN_SHIP].obj.pos.z = -30000.0f; } this->rot_078.y = 0.0f; @@ -626,8 +628,8 @@ void SectorY_80199438(SyShogun* this) { Object_Kill(&gActors[D_ctx_80177A10[9]].obj, gActors[D_ctx_80177A10[9]].sfxSource); if ((gBosses[1].obj.status == OBJ_FREE) || (gBosses[2].obj.status == OBJ_FREE)) { gBosses[0].work_04A = 1; - gScenery360[0].info.dList = aSySaruzinDL; - gScenery360[0].info.drawType = 0; + gScenery360[SHOGUN_SHIP].info.dList = aSySaruzinDL; + gScenery360[SHOGUN_SHIP].info.drawType = 0; } else { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ACTIVE; Camera_UpdateArwing360(&gPlayer[0], true); @@ -1091,7 +1093,7 @@ void SectorY_8019AEEC(SyShogun* this) { this->vel.z = 80.0f; this->fwork[13] = 80.0f; this->obj.pos.z = -12000.0f; - gScenery360[0].obj.pos.z = -20000.0f; + gScenery360[SHOGUN_SHIP].obj.pos.z = -20000.0f; this->fwork[43] = 0.0f; this->vel.y = 0.0f; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ACTIVE; @@ -1133,9 +1135,9 @@ bool SectorY_8019B5CC(SyShogun* this) { Math_Vec3fFromAngles(&pos, this->rot_078.x, this->rot_078.y, 700.0f); - if ((fabsf(gScenery360[0].obj.pos.x - (this->obj.pos.x + pos.x)) < 2500.0f) && - (fabsf(gScenery360[0].obj.pos.z - (this->obj.pos.z + pos.z)) < 5000.0f) && - (fabsf(gScenery360[0].obj.pos.y - (this->obj.pos.y + pos.y)) < 1800.0f)) { + if ((fabsf(gScenery360[SHOGUN_SHIP].obj.pos.x - (this->obj.pos.x + pos.x)) < 2500.0f) && + (fabsf(gScenery360[SHOGUN_SHIP].obj.pos.z - (this->obj.pos.z + pos.z)) < 5000.0f) && + (fabsf(gScenery360[SHOGUN_SHIP].obj.pos.y - (this->obj.pos.y + pos.y)) < 1800.0f)) { return true; } @@ -1410,9 +1412,9 @@ void SectorY_SyShogun_Update(SyShogun* this) { if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_START_360) { if (this->swork[34] == 1) { if (this->health > 0) { - gScenery360[0].obj.pos.z += 20.0f; + gScenery360[SHOGUN_SHIP].obj.pos.z += 20.0f; } - if (gScenery360[0].obj.pos.z == 0.0f) { + if (gScenery360[SHOGUN_SHIP].obj.pos.z == 0.0f) { this->swork[34]++; } } @@ -2058,11 +2060,11 @@ void SectorY_8019EB80(void) { Object_SetInfo(&actor->info, actor->obj.id); if (i >= 3) { - actor->animFrame = 35; + actor->animFrame = ACTOR_CS_SY_SHIP_1_SHRINK; actor->rot_0F4.z = 0.0f; } if (i >= 7) { - actor->animFrame = 36; + actor->animFrame = ACTOR_CS_SY_SHIP_2; actor->scale = 0.125f; } actor->iwork[11] = 1; @@ -2529,13 +2531,13 @@ void SectorY_801A0510(ActorCutscene* this, s32 arg1) { case 1: case 2: case 8: - this->animFrame = 38; + this->animFrame = ACTOR_CS_38; this->obj.rot.y = 90.0f; Object_SetInfo(&this->info, this->obj.id); break; case 3: - this->animFrame = 36; + this->animFrame = ACTOR_CS_SY_SHIP_2; this->vel.z = -5.0f; this->scale = 1.0f; this->obj.rot.y = 180.0f; @@ -2543,27 +2545,27 @@ void SectorY_801A0510(ActorCutscene* this, s32 arg1) { break; case 4: - this->animFrame = 37; + this->animFrame = ACTOR_CS_37; this->obj.rot.y = 90.0f; Object_SetInfo(&this->info, this->obj.id); break; case 5: case 9: - this->animFrame = 39; + this->animFrame = ACTOR_CS_SY_SHIP_1; this->obj.rot.y = 180.0f; Object_SetInfo(&this->info, this->obj.id); break; case 6: - this->animFrame = 36; + this->animFrame = ACTOR_CS_SY_SHIP_2; this->obj.rot.y = 180.0f; this->scale = 1.0f; Object_SetInfo(&this->info, this->obj.id); break; case 7: - this->animFrame = 40; + this->animFrame = ACTOR_CS_40; Object_SetInfo(&this->info, this->obj.id); break; @@ -2629,7 +2631,7 @@ void SectorY_801A07FC(Actor* actor0, ActorCutscene* actor1) { actor1->vel.z = dest.z; actor1->obj.rot.x = actor0->obj.rot.x; actor1->obj.rot.y = actor0->obj.rot.y; - actor1->animFrame = 42; + actor1->animFrame = ACTOR_CS_42; AUDIO_PLAY_SFX(NA_SE_EN_MS_SHOT_S, actor1->sfxSource, 4); } @@ -2645,7 +2647,7 @@ void SectorY_801A0A08(ActorCutscene* this, f32 xPos, f32 yPos, f32 zPos, f32 arg Object_SetInfo(&this->info, this->obj.id); this->timer_0BC = 35; this->iwork[0] = 255; - this->animFrame = 43; + this->animFrame = ACTOR_CS_43; AUDIO_PLAY_SFX(NA_SE_EN_MS_SHOT_S, this->sfxSource, 4); } From 0a8c61789e5a04811a6efcd5c6af91637c5d8e57 Mon Sep 17 00:00:00 2001 From: Alejandro Javier Asenjo Nitti Date: Tue, 17 Sep 2024 15:52:13 -0300 Subject: [PATCH 151/151] ActorEvent_SxWarpGate_Draw --- src/engine/fox_enmy2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/fox_enmy2.c b/src/engine/fox_enmy2.c index b1847580..ae47c3c2 100644 --- a/src/engine/fox_enmy2.c +++ b/src/engine/fox_enmy2.c @@ -3846,7 +3846,7 @@ bool ActorEvent_OverrideLimbDraw2(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* return false; } -void ActorEvent_DrawEVID_SX_WARP_GATE(ActorEvent* this) { +void ActorEvent_SxWarpGate_Draw(ActorEvent* this) { Vec3f frameTable[10]; Animation_GetFrameData(&D_SX_6013820, 0, frameTable); @@ -4082,7 +4082,7 @@ void ActorEvent_Draw(ActorEvent* this) { break; case EVID_SX_WARP_GATE: - ActorEvent_DrawEVID_SX_WARP_GATE(this); + ActorEvent_SxWarpGate_Draw(this); break; case EVID_SY_ROBOT_1: